diff --git a/build/README.kernel-source b/build/README.kernel-source
deleted file mode 100644
index bb985e9c974092623fea7f0d8b8e178fe94d666e..0000000000000000000000000000000000000000
--- a/build/README.kernel-source
+++ /dev/null
@@ -1,103 +0,0 @@
-Lustre can currently build against Red Hat 2.4 and SuSE 2.6
-kernel-source RPMs.  All other kernel-source RPMs are *unsupported* at
-this time.
-
-Note that a Lustre-patched kernel is required for building Lustre; in
-most cases a kernel-source RPM from your Linux vendor will not contain
-the necessary patches.
-
-##
-## Instructions for Red Hat 2.4.x kernel-source RPMs
-##
-
-1.  kernel.h
-
-Building against a kernel-source RPM requires a special header.  On
-Red Hat systems, this file should be automatically created at boot
-time, and saved in /boot/kernel.h.
-
- *** If you are not running Red Hat Linux, or are not booted into the
- *** kernel you are trying to build against, you need to create this
- *** file manually.
-
- *** If you do not, the Lustre build may fail, or may fail to build
- *** modules that work with your kernel.
-
-Here is an example /boot/kernel.h file.  If you are building on
-x86_64, the first defines should be __MODULE_KERNEL_x86_64, etc.  The
-other defines should be simple to figure out.
-
-/* This file is automatically generated at boot time. */
-#ifndef __BOOT_KERNEL_H_
-#define __BOOT_KERNEL_H_
-
-/* Kernel type i686-smp */
-
-#ifndef __MODULE_KERNEL_i686
-#define __MODULE_KERNEL_i686 1
-#endif
-
-#ifndef __BOOT_KERNEL_ENTERPRISE
-#define __BOOT_KERNEL_ENTERPRISE 0
-#endif
-
-#ifndef __BOOT_KERNEL_BIGMEM
-#define __BOOT_KERNEL_BIGMEM 0
-#endif
-
-#ifndef __BOOT_KERNEL_HUGEMEM
-#define __BOOT_KERNEL_HUGEMEM 0
-#endif
-
-#ifndef __BOOT_KERNEL_SMP
-#define __BOOT_KERNEL_SMP 1
-#endif
-
-#ifndef __BOOT_KERNEL_UP
-#define __BOOT_KERNEL_UP 0
-#endif
-
-#endif
-
-You should save this somewhere, and pass the location of this file to
-./configure using the --with-kernel-source-header option.
-
-2.  .config
-
-You will also need to tell Lustre about the .config file for your
-kernel.  The two likely locations of this file are
-/boot/config-$(uname -r), and /usr/src/linux-2.4/configs/.  You should
-pass the location of this file to Lustre using the --with-linux-config
-option.
-
-3.  An Example
-
-Here is an example for configuring Lustre:
-
-./configure --with-linux=/usr/src/linux-2.4.20-28.9_lustre.1.0.3 \
---with-kernel-source-header=/boot/kernel.h \
---with-linux-config=/boot/config-2.4.20-28.9_lustre.1.0.3smp
-
-##
-## Instructions for SuSE 2.6.x kernel-source RPMs
-##
-
-1.  kernel-syms
-
-In addition to the kernel-source rpm, you may need to install a
-kernel-syms rpm.  This should be included where you got your kernel
-rpm.
-
-2.  linux-obj
-
-You will need to choose the correct linux-obj directory for your
-machine.  They will be located in /usr/src/linux-$(uname
--r)-obj/$ARCH/$FLAVOR.  Lustre should be configured with the
---with-linux-obj option.
-
-3.  Example
-
-Here is an example for configuring Lustre:
-
-./configure --with-linux=/usr/src/linux-2.6.5-7.97 \
---with-linux-obj=/usr/src/linux-2.6.5-7.97-obj/ppc64/pseries64
diff --git a/build/Rules.in b/build/Rules.in
deleted file mode 100644
index 815b3da57c29ede9192619685191129efdeac3d2..0000000000000000000000000000000000000000
--- a/build/Rules.in
+++ /dev/null
@@ -1,78 +0,0 @@
-# Directories building kernel modules should have two files:
-#
-# Makefile.in:
-#
-# MODULES := <module-name>
-# <module-name>-objs := file1.o file2.o file3.o
-# @INCLUDE_RULES@
-#
-# and autoMakefile.am:
-#
-# if LIBLUSTRE
-# <liblustre rules>
-# endif
-#
-# if MODULES
-# modulefs_DATA = <module-name>$(KMODEXT)
-# endif
-#
-# DIST_SOURCES = $(<module-name>-objs:.o=.c) <other sources>
-# MOSTLYCLEANFILES = *.o *.ko *.mod.c
-
-ifeq ($(PATCHLEVEL),)
-
-include autoMakefile
-
-# The kernel ABI files for the nonfree modules.
-KABIS := $(NONFREE_MODULES:%$(KMODEXT)=%.kabi)
-
-all: archive-nonfree-modules
-
-# Where to archive the nonfree modules for binary distribution.
-# If this directory has a colon in it, SSH/SCP are used to go out on the network.
-nonfreedir := $$HOME/nonfree
-#nonfreedir := moraine.clusterfs.com:/home/lustre-nonfree
-
-# Put the nonfree modules and corresponding KABI files into the binary
-# archive.  We assume that if the CVS subdirectory doesn't exist, we
-# don't want to archive.
-archive-nonfree-modules: $(KABIS) $(NONFREE_MODULES)
-	test -d CVS || exit 0; \
-	list="$(NONFREE_MODULES)"; for mod in $$list; do \
-	  perl $(top_srcdir)/build/kabi -v archive $(nonfreedir) $$mod || exit $$?; \
-	done
-
-# Generate the Kernel ABI files for the nonfree modules.
-$(KABIS): $(NONFREE_MODULES)
-	for mod in $(NONFREE_MODULES); do \
-	  CC="$(CC)" perl $(top_srcdir)/build/kabi --with-linux="$(LINUX)" module $$mod || exit $$?; \
-	done
-
-fix-kext-ownership:
-	@if test -d $(DESTDIR)$(kextdir) ; then \
-		echo chown -R root:wheel $(DESTDIR)$(kextdir) ; \
-		chown -R root:wheel $(DESTDIR)$(kextdir) || \
-			echo >&2 "*** WARNING: Could not fix kext ownership for $(DESTDIR)$(kextdir)" ; \
-	fi
-
-else
-
-include @LINUX_CONFIG@
-
-EXTRA_CFLAGS := $(EXTRA_PRE_CFLAGS)
-EXTRA_CFLAGS += @EXTRA_KCFLAGS@ @UML_CFLAGS@ @CFLAGS@
-EXTRA_CFLAGS += $(EXTRA_POST_CFLAGS)
-
-obj-m := $(patsubst %,%.o,$(MODULES))
-
-ifeq ($(PATCHLEVEL),4)
-# 2.4 rules
-O_TARGET := $(firstword $(obj-m))
-obj-y := $($(firstword $(MODULES))-objs)
-export-objs := $(obj-y) $(filter-out $(O_TARGET),$(obj-m))
-include $(TOPDIR)/Rules.make
-$(MODINCL)/%.ver: %.c
-	@true
-endif # PATCHLEVEL
-
-endif # KERNELRELEASE
diff --git a/build/autoconf/.cvsignore b/build/autoconf/.cvsignore
deleted file mode 100644
index 282522db0342d8750454b3dc162493b5fc709cc8..0000000000000000000000000000000000000000
--- a/build/autoconf/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/build/autoconf/Makefile.am b/build/autoconf/Makefile.am
deleted file mode 100644
index 5ee43813b4697a5a0f4fe0c462e461428688f99d..0000000000000000000000000000000000000000
--- a/build/autoconf/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST := lustre-build.m4 lustre-build-linux.m4
-if DARWIN
-EXTRA_DIST += lustre-build-darwin.m4
-endif
diff --git a/build/autoconf/lustre-build-darwin.m4 b/build/autoconf/lustre-build-darwin.m4
deleted file mode 100644
index a14ebf8cd6c06da73eeff398a329b183faee5430..0000000000000000000000000000000000000000
--- a/build/autoconf/lustre-build-darwin.m4
+++ /dev/null
@@ -1,106 +0,0 @@
-#
-# LB_DARWIN_CHECK_FUNCS
-#
-# check for functions in the darwin kernel
-# Note that this is broken for cross compiling
-#
-AC_DEFUN([LB_DARWIN_CHECK_FUNCS],
-[AC_FOREACH([AC_Func], [$1],
-  [AH_TEMPLATE(AS_TR_CPP(HAVE_[]AC_Func),
-               [Define to 1 if you have the `]AC_Func[' function.])])dnl
-for ac_func in $1
-do
-AC_MSG_CHECKING([for $1])
-AS_IF([AC_TRY_COMMAND(nm /mach | grep "[$1]" >/dev/null 2>/dev/null)],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE_UNQUOTED([AS_TR_CPP([HAVE_$ac_func])]) $2
-],[
-	AC_MSG_RESULT([no]) $3
-])dnl
-done
-])
-
-#
-# LB_DARWIN_CONDITIONALS
-#
-# AM_CONDITIONALs for darwin
-#
-AC_DEFUN([LB_DARWIN_CONDITIONALS],
-[
-])
-
-#
-# LB_PROG_DARWIN
-#
-# darwin tests
-#
-AC_DEFUN([LB_PROG_DARWIN],
-[kernel_framework="/System/Library/Frameworks/Kernel.framework"
-#
-# FIXME: there should be a better way to get these than hard coding them
-#
-case $target_cpu in 
-	powerpc*)
-		EXTRA_KCFLAGS="$EXTRA_KCFLAGS -arch ppc -mtune=G4 -mlong-branch"
-		EXTRA_KLDFLAGS="-arch ppc"
-		;;
-	i?86 | x86_64)
-		EXTRA_KCFLAGS="$EXTRA_KCFLAGS -arch i386"
-		EXTRA_KLDFLAGS="-arch i386"
-		;;
-esac
-
-# Kernel of OS X is not 64bits(even in Tiger), but -m64 can be taken by gcc in Tiger
-# (Tiger can support 64bits applications), so we have to eliminate -m64 while 
-# building kextensions for and OS X.
-CC=`echo $CC | sed -e "s/\-m64//g"`
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -x c -pipe -Wno-trigraphs -fasm-blocks -g -O0"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -Wno-four-char-constants -Wmost -O0"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -fmessage-length=0"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -I$kernel_framework/Headers"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -I$kernel_framework/Headers/bsd"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -I$kernel_framework/PrivateHeaders"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -fno-common -nostdinc -fno-builtin"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -finline -fno-keep-inline-functions"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -force_cpusubtype_ALL -fno-exceptions"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -msoft-float -static"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -DKERNEL -DKERNEL_PRIVATE"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -DDRIVER_PRIVATE -DAPPLE -DNeXT"
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__KERNEL__ -D__DARWIN__"
-#
-# C flags for Panther/Tiger
-#
-case $target_os in
-        darwin8*)
-                EXTRA_KCFLAGS="$EXTRA_KCFLAGS -D__DARWIN8__"
-	;;
-        darwin7*)
-                EXTRA_KCFLAGS="$EXTRA_KCFLAGS -ffix-and-continue"
-        ;;
-esac
-
-#
-# Debugging flags. Remove!
-#
-EXTRA_KCFLAGS="$EXTRA_KCFLAGS -O0 -DMACH_ASSERT=1"
-EXTRA_KLDFLAGS="$EXTRA_KLDFLAGS -static -nostdlib -r"
-EXTRA_KLIBS="-lkmodc++ -lkmod -lcc_kext"
-KMODEXT=""
-
-AC_SUBST(EXTRA_KLDFLAGS)
-AC_SUBST(EXTRA_KLIBS)
-
-kextdir='/System/Library/Extensions/$(firstword $(macos_PROGRAMS)).kext'
-plistdir='$(kextdir)/Contents'
-macosdir='$(plistdir)/MacOS'
-
-AC_SUBST(kextdir)
-AC_SUBST(plistdir)
-AC_SUBST(macosdir)
-
-LN_PROG_DARWIN
-
-LP_PROG_DARWIN
-
-LC_PROG_DARWIN
-])
diff --git a/build/checkstack.pl b/build/checkstack.pl
deleted file mode 100644
index 6bdab11260c1a7dadbd840d5a39358439975bc03..0000000000000000000000000000000000000000
--- a/build/checkstack.pl
+++ /dev/null
@@ -1,87 +0,0 @@
-#!/usr/bin/perl
-#	Check the stack usage of functions
-#
-#	Copyright Joern Engel <joern@wh.fh-wedel.de>
-#	Inspired by Linus Torvalds
-#	Original idea maybe from Keith Owens
-#	s390 port and big speedup by Arnd Bergmann <arnd@bergmann-dalldorf.de>
-#	Modified to have simpler output format by Dan Kegel
-#
-#	Usage:
-#	objdump -d vmlinux | stackcheck.pl [arch]
-#
-#	find <moduledir> -name "*.o" | while read M; do
-#		objdump -d $M | perl ~/checkstack.pl <arch> | \
-#			sed "s/^/`basename $M`: /" ; done | \
-#	awk '/esp/ { print $5, $2, $4 }' | sort -nr
-
-#	TODO :	Port to all architectures (one regex per arch)
-
-# check for arch
-# 
-# $re is used for three matches:
-# $& (whole re) matches the complete objdump line with the stack growth
-# $1 (first bracket) matches the code that will be displayed in the output
-# $2 (second bracket) matches the size of the stack growth
-#
-# use anything else and feel the pain ;)
-{
-	my $arch = shift;
-	$x	= "[0-9a-f]{2,5}";		# hex number     >= 256
-	$d	= "([0-9]{2}|[2-9])[0-9]{2}";	# decimal number >= 200
-	if ($arch eq "") {
-		$arch = `uname -m`;
-	}
-	if ($arch =~ /^i[3456]86$/) {
-		#c0105234:       81 ec ac 05 00 00       sub    $0x5ac,%esp
-		$re = qr/^.*(sub    \$(0x$x),\%esp)$/o;
-		$todec = sub { return hex($_[0]); };
-	} elsif ($arch =~ 'x86_64') {
-		#    2f60:	48 81 ec e8 05 00 00 	sub    $0x5e8,%rsp
-		$re = qr/^.*(add    \$(0x$x),\%rsp)$/o;
-		$todec = sub { return hex($_[0]); };
-	} elsif ($arch =~ /^ia64$/) {
-		#e0000000044011fc:       01 0f fc 8c     adds r12=-384,r12
-		$re = qr/.*(adds.*r12=-($d),r12)/o;
-		$todec = sub { return $_[0]; };
-	} elsif ($arch =~ /^mips64$/) {
-		#8800402c:       67bdfff0        daddiu  sp,sp,-16
-		$re = qr/.*(daddiu.*sp,sp,-($d))/o;
-		$todec = sub { return $_[0]; };
-	} elsif ($arch =~ /^mips$/) {
-		#88003254:       27bdffe0        addiu   sp,sp,-32
-		$re = qr/.*(addiu.*sp,sp,-($d))/o;
-		$todec = sub { return $_[0]; };
-	} elsif ($arch =~ /^ppc$/) {
-		#c00029f4:       94 21 ff 30     stwu    r1,-208(r1)
-		$re = qr/.*(stwu.*r1,-($x)\(r1\))/o;
-		$todec = sub { return hex($_[0]); };
-	} elsif ($arch =~ /^s390x?$/) {
-		#   11160:       a7 fb ff 60             aghi   %r15,-160
-		$re = qr/.*(ag?hi.*\%r15,-($d))/o;
-		$todec = sub { return $_[0]; };
-	} else {
-		print "Usage:  objdump -d vmlinux | checkstack.pl [arch]\n";
-		print "where arch is i386, ia64, mips, mips64, ppc, or s390\n";
-		print "Each output line gives a function's stack usage, name\n";
-		print "Lines are output in order of decreasing stack usage\n";
-		die("wrong or unknown architecture\n");
-	}
-}
-
-$funcre = qr/^[0-9a-f]* \<(.*)\>:$/;
-while ($line = <STDIN>) {
-	if ($line =~ m/$funcre/) {
-		($func = $line) =~ s/$funcre/\1/;
-		chomp($func);
-	}
-	if ($line =~ m/$re/) {
-		push(@stack, &$todec($2)." ".$func);
-		# don't expect more than one stack allocation per function
-		$func .= " ** bug **";
-	}
-}
-
-foreach (sort { $b - $a } (@stack)) {
-	print $_."\n";
-}
diff --git a/build/clearpatches.sh b/build/clearpatches.sh
deleted file mode 100644
index a0f574133119e0914e04a1720bde7d4abca6f2dd..0000000000000000000000000000000000000000
--- a/build/clearpatches.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-BASEDIR=${BASEDIR:-lustre/kernel_patches}
-SERIESPATH=${SERIESPATH:-$BASEDIR/series}
-PATCHESPATH=${PATCHESPATH:-$BASEDIR/patches}
-NOUSEPATH=${NOUSEPATH:-$BASEDIR/unused}
-
-#mkdir -p $NOUSEPATH
-for PATCH in `ls $PATCHESPATH | grep -v CVS` ; do
-	#echo $PATCH
- 	if ! grep -rq $PATCH $SERIESPATH ; then
-		echo "$PATCH"
-	  	#mv $PATCHESPATH/$PATCH $NOUSEPATH
-	fi
-done
diff --git a/build/confirmpatches.sh b/build/confirmpatches.sh
deleted file mode 100644
index 1c160dac867c29d4c0fe025daa3c2cc3e557b8cb..0000000000000000000000000000000000000000
--- a/build/confirmpatches.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-BASEDIR=${BASEDIR:-lustre/kernel_patches}
-SERIESPATH=${SERIESPATH:-$BASEDIR/series}
-PATCHESPATH=${PATCHESPATH:-$BASEDIR/patches}
-for SERIES in `ls $SERIESPATH | egrep -v "CVS|~$|.orig"` ; do
-	#echo $SERIES
-	for PATCH in `cat $SERIESPATH/$SERIES`; do
-		#echo $PATCH
-		if [ ! `find $PATCHESPATH -name $PATCH` ]; then
-			echo "$SERIESPATH/$SERIES: patch $PATCH was not found !"
-		fi
-	done
-done
diff --git a/build/cvs-modified-files.pl b/build/cvs-modified-files.pl
deleted file mode 100755
index d13c4d3d715b73dd2688b428bd5106ab709faecb..0000000000000000000000000000000000000000
--- a/build/cvs-modified-files.pl
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env perl
-
-my $mode = "NONE";
-my @modified, @added, @removed;
-
-while($line = <>) {
-  if ($line =~ /Modified Files:/) {
-    $mode = "MODIFIED";
-    next;
-  }
-
-  if ($line =~ /Added Files:/) {
-    $mode = "ADDED";
-    next;
-  }
-
-  if ($line =~ /Removed Files:/) {
-    $mode = "REMOVED";
-    next;
-  }
-
-  if ($mode eq "NONE") { next; }
-  if ($line =~ /-------/) { next; }
-
-  chop($line);
-  $line =~ s/^CVS:\s+//;
-  $line =~ s/\s+$//;
-  # print "processing $line for $mode\n";
-  @files = split(/ /, $line);
-  # print "new files for $mode: ", join(', ', @files), "\n";
-
-  if ($mode eq "MODIFIED") {
-    push(@modified, @files);
-  } elsif ($mode eq "ADDED") {
-    push(@added, @files);
-  } elsif ($mode eq "REMOVED") {
-    push(@removed, @files);
-  } else {
-    die "Unknown mode $mode!";
-  }
-}
-
-print join(' ', @modified);
-if ($ENV{"SHOW_ALL_FILES"} ne "no") {
-  print ' ', join(' ', @added), ' ', join(' ', @removed);
-}
-print "\n";
diff --git a/build/land2.sh b/build/land2.sh
deleted file mode 100755
index ea616a91cde2030194ae42f829430e91ed2abe93..0000000000000000000000000000000000000000
--- a/build/land2.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash -e 
-
-CVS=cvs
-
-if [ ! -f .mergeinfo ] ; then
-    echo ".mergeinfo doesn't exist - exit"
-    exit 
-fi
-
-. .mergeinfo
-
-if [ "$OPERATION" != "Land" ] ; then
-    echo "OPERATION must be Land - is $OPERATION"
-    echo "You should probably be running ${OPERATION}2.sh"
-    exit
-fi
-
-if [ -f "$CONFLICTS" ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    cat $CONFLICTS
-    exit 
-fi
-
-cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1
-
-echo -n "Tagging as ${CHILD}_BASE_$date ..."
-$CVS rtag -r $parent ${CHILD}_BASE_$date $module
-echo "done"
-echo -n "Tagging as ${CHILD}_BASE ..."
-$CVS rtag -F -r $parent ${CHILD}_BASE $module
-
-echo "saving .mergeinfo as .mergeinfo-$date"
-mv .mergeinfo .mergeinfo-$date
-echo "done"
diff --git a/build/linux-merge-config.awk b/build/linux-merge-config.awk
deleted file mode 100644
index 9a9338cc542ecbd34aae26f042eca9c8bb59b428..0000000000000000000000000000000000000000
--- a/build/linux-merge-config.awk
+++ /dev/null
@@ -1,317 +0,0 @@
-#!/bin/awk -f
-BEGIN {
-	nsects = 0
-}
-{
-	ARCH = $1
-	ARCHES[ARCH] = 1
-	TYPE = $2
-	TYPES[TYPE] = 1
-	NTOTAL++
-	ARCHTYPES[ARCH ":" TYPE] = 1
-	NARCHES[TYPE]++
-	if (NARCHES[TYPE] == 1)
-	    NTOTALTYPES++
-	NTYPES[ARCH]++
-	if (NTYPES[ARCH] == 1)
-	    NTOTALARCHES++
-	FILE = $3
-	cursects = nsects
-	while ((getline < FILE) > 0) {
-		if ($0 ~ /^\/\*/ || $0 ~ /^ \*\// || $0 ~ /^[ 	]*$/)
-			continue
-		if ($0 ~ /^ * /) {
-			SECTION = gensub(/^ \* /,"",$0)
-			if (!(SECTION in sectno)) {
-				sectno[SECTION] = nsects
-				counts[SECTION] = 0
-				nsects++
-			} else if (cursects && cursects != nsects) {
-				no = sectno[SECTION]
-				diff = nsects - cursects
-				for (s in sectno) {
-					if (sectno[s] >= cursects)
-						sectno[s] = sectno[s] - cursects + no
-					else if (sectno[s] >= no)
-						sectno[s] += diff
-				}
-			}
-			cursects = nsect
-			cursym[SECTION] = counts[SECTION]
-			continue
-		}
-		if ($1 != "#define" && $1 != "#undef")
-			exit 1
-		SYMBOL = $2
-		n = index($0,SYMBOL)+length(SYMBOL)
-		if ($1 == "#define") {
-			n = index($0,SYMBOL)+length(SYMBOL)
-			VALUE = gensub(/^[ 	]*/,"","",substr($0,n))
-			if (VALUE == "") VALUE = "__novalue__"
-		} else
-			VALUE = "__undefined__"
-		if (values[SYMBOL]) {
-			if (present[SYMBOL,ARCH,TYPE]) continue
-			present[SYMBOL,ARCH,TYPE] = 1
-			values[SYMBOL] = values[SYMBOL] SUBSEP ARCH ":" TYPE ":" VALUE
-			if (SECTION == sections[SYMBOL] && cursym[SECTION] && cursym[SECTION] != counts[SECTION]) {
-				no = pos[SYMBOL]
-				diff = counts[SECTION]-cursym[SECTION]
-				for (s in pos)
-					if (sections[s] == SECTION) {
-						if (pos[s] >= cursym[SECTION])
-							pos[s] = pos[s] - cursym[SECTION] + no
-						else if (pos[s] >= no)
-							pos[s] += diff
-					}
-				cursym[SECTION] = counts[SECTION]
-			}
-		} else {
-			present[SYMBOL,ARCH,TYPE] = 1
-			values[SYMBOL] = ARCH ":" TYPE ":" VALUE
-			sections[SYMBOL] = SECTION
-			pos[SYMBOL] = counts[SECTION]
-			counts[SECTION]++
-		}
-	}
-	close(FILE)
-}
-END {
-	for (SECTION in sectno)
-		x[sectno[SECTION]] = SECTION
-	for (i = 0; i < nsects; i++) {
-		SECTION = x[i]
-		if (i > 0)
-			printf "\n"
-		printf "/*\n * %s\n */\n", SECTION
-		split("",lines)
-		lastelse = ""
-		for (SYMBOL in sections)
-			if (sections[SYMBOL] == SECTION)
-				y[pos[SYMBOL]] = SYMBOL
-		for (j = 0; j < counts[SECTION]; j++) {
-			SYMBOL = y[j]
-			split("",ntype)
-			split("",total)
-			split(values[SYMBOL],z,SUBSEP)
-			split("",val)
-			totalsum = 0
-			for (k in z) {
-				split(z[k],l,":")
-				ARCH = l[1]
-				TYPE = l[2]
-				VALUE = substr(z[k],length(ARCH)+length(TYPE)+3)
-				if (val[VALUE])
-					val[VALUE] = val[VALUE] " "
-				val[VALUE] = val[VALUE] ARCH ":" TYPE
-				ntype[VALUE,TYPE] += 1
-				total[VALUE] += 1
-				totalsum += 1
-			}
-			split("",curlines)
-			append = 1
-			for (VALUE in val) {
-			    if (total[VALUE] == NTOTAL) {
-				if (VALUE == "__undefined__")
-				    curlines["1"] = "#undef  " SYMBOL "\n"
-				else if (VALUE == "__novalue__")
-				    curlines["1"] = "#define " SYMBOL "\n"
-				else
-				    curlines["1"] = "#define " SYMBOL " " VALUE "\n"
-				if (!lines["1"])
-				    append = 0
-				break
-			    }
-			    shorteststr = ""
-			    curcount = 0
-			    for (m = 0; m < 4; m++) {
-				str = ""
-				split(val[VALUE],yy)
-				if (total[VALUE] > 1 && total[VALUE] == NTOTAL - 1) {
-				    found = 0
-				    for (arch in ARCHES) {
-					for (type in TYPES) {
-					    archtype = arch ":" type
-					    if (ARCHTYPES [archtype] == 1) {
-						for (n in yy)
-						    if (yy[n] == archtype)
-							break
-						if (yy[n] != archtype) {
-						    found = 1
-						    break
-						}
-					    }
-					}
-					if (found)
-					    break
-				    }
-				    if (NARCHES[type] > 1 && NTYPES[arch] > 1) {
-					str = "!defined(__module__" arch "_" type ")"
-					shorteststr = str
-					break
-				    }
-				}
-				if (m == 0 || m == 2) {
-				    nfull = 0
-				    split("",yysave)
-				    for (type in TYPES)
-					if (ntype[VALUE,type] == NARCHES[type]) {
-					    if (str) str = str " || "
-					    str = str "defined(__module__" type ")"
-					    for (k in yy) {
-						split(yy[k], z, ":")
-						if (z[2] == type) {
-						    yysave[k] = yy[k]
-						    delete yy[k]
-						}
-					    }
-					    nfull++
-					} else
-					    NOTYPE = type
-				    if (m < 2 && nfull > 1 && nfull == NTOTALTYPES - 1) {
-					str = "!defined(__module__" NOTYPE ")"
-					for (k in yysave)
-					    yy[k] = yysave[k]
-					for (k in yy) {
-					    split(yy[k], z, ":")
-					    if (z[2] != NOTYPE)
-						delete yy[k]
-					}
-				    }
-				}
-				savestr = str
-				nfull = 0
-				split("",yysave)
-				for (arch in ARCHES) {
-				    narch = 0
-				    for (k in yy) {
-					split(yy[k], z, ":")
-					if (z[1] == arch)
-					    narch++
-				    }
-				    if (narch == NTYPES[arch]) {
-					if (str) str = str " || "
-					str = str "defined(__module__" arch ")"
-					for (k in yy) {
-					    split(yy[k], z, ":")
-					    if (z[1] == arch) {
-						yysave[k] = yy[k]
-						delete yy[k]
-					    }
-					}
-					nfull++
-				    } else
-					NOARCH = arch
-				}
-				if (m < 2 && nfull > 1 && nfull == NTOTALARCHES - 1) {
-				    str = savestr
-				    for (k in yysave)
-					yy[k] = yysave[k]
-				    if (str) str = str " || "
-				    str = str "!defined(__module__" NOARCH ")"
-				    for (k in yy) {
-					split(yy[k], z, ":")
-					if (z[1] != NOARCH)
-					    delete yy[k]
-				    }
-				}
-				if (m == 1 || m == 3) {
-				    savestr = str
-				    nfull = 0
-				    split("",yysave)
-				    for (type in TYPES) {
-					ntypex = 0
-					for (k in yy) {
-					    split(yy[k], z, ":")
-					    if (z[2] == type)
-						ntypex++
-					}
-					if (ntypex == NARCHES[type]) {
-					    if (str) str = str " || "
-					    str = str "defined(__module__" type ")"
-					    for (k in yy) {
-						split(yy[k], z, ":")
-						if (z[2] == type) {
-						    yysave[k] = yy[k]
-						    delete yy[k]
-						}
-					    }
-					    nfull++
-					} else
-					    NOTYPE = type
-				    }
-				    if (m < 2 && nfull > 1 && nfull == NTOTALTYPES - 1) {
-					str = savestr
-				 	for (k in yysave)
-					    yy[k] = yysave[k]
-					if (str) str = str " || "
-					str = "!defined(__module__" NOTYPE ")"
-					for (k in yy) {
-					    split(yy[k], z, ":")
-					    if (z[2] != NOTYPE)
-						delete yy[k]
-					}
-				    }
-				}
-				for (k in yy) {
-				    split(yy[k], z, ":")
-				    if (str) str = str " || "
-				    str = str "defined(__module__" z[1] "_" z[2] ")"
-				}
-				if (m == 0 || length(str) < length(shorteststr))
-				    shorteststr = str
-			    }
-			    str = shorteststr
-			    if (VALUE == "__undefined__")
-				curlines[str] = "#undef  " SYMBOL "\n"
-			    else if (VALUE == "__novalue__")
-				curlines[str] = "#define " SYMBOL "\n"
-			    else
-				curlines[str] = "#define " SYMBOL " " VALUE "\n"
-			    if (!lines[str])
-				append = 0
-			}
-			if (append) {
-			    for (str in curlines)
-				if (curlines[str])
-				    lines[str] = lines[str] curlines[str]
-			} else {
-			    if (lines["1"])
-				printf "%s", lines["1"]
-			    else if (j > 0) {
-				ifstr = "#if "
-				for (str in lines)
-				    if (lines[str] && str != lastelse) {
-					printf "%s %s\n%s", ifstr, str, lines[str]
-					ifstr = "#elif "
-				    }
-				if (lastelse != "")
-				    printf "#else\n%s", lines[lastelse]
-				printf "#endif\n"
-			    }
-			    split("",lines)
-			    lastelse = ""
-			    for (str in curlines)
-				if (curlines[str]) {
-				    lines[str] = curlines[str]
-				    if (totalsum == NTOTAL && length(str) > length(lastelse)) {
-					lastelse = str
-				    }
-				}
-			}
-		}
-		if (lines["1"])
-		    printf "%s", lines["1"]
-		else if (j > 0) {
-		    ifstr = "#if "
-		    for (str in lines)
-			if (lines[str] && str != lastelse) {
-			    printf "%s %s\n%s", ifstr, str, lines[str]
-			    ifstr = "#elif "
-			}
-		    if (lastelse != "")
-			printf "#else\n%s", lines[lastelse]
-		    printf "#endif\n"
-		}
-	}
-}
diff --git a/build/linux-merge-modules.awk b/build/linux-merge-modules.awk
deleted file mode 100644
index babc81583969e2ab2679acf47aaab627703bb35d..0000000000000000000000000000000000000000
--- a/build/linux-merge-modules.awk
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/awk -f
-{
-	# lines in input look like ARCH TYPE path/to/TYPE/ARCH/modules/foo.ver
-	ARCH=$1
-	ARCHES[ARCH]=1
-	TYPE=$2
-	TYPES[TYPE]=1
-	NTOTAL++
-	NARCHES[TYPE]++
-	NTYPES[ARCH]++
-	FILE=$3
-
-	# read files that look like pairs of repeating
-	# #define __ver_foo hexstring
-	# #define foo _set_ver(foo)
-	while ((getline < FILE) > 0) {
-		if ($0 ~ /^[ 	]*$/)
-			continue
-		if ($1 != "#define" || $2 !~ /^__ver_/)
-			exit 1
-
-		# this is a "#define __ver_foo somehex" line
-		SYMBOL=gensub(/^__ver_/,"","",$2)
-		VALUE=gensub(/^(smp_|2gig_|smp2gig_)/,"","",$3)
-		VALUE=gensub(/^(smp|2gig|smp2gig)/,"","",VALUE)
-		values[SYMBOL,ARCH,TYPE]=VALUE
-
-		# skip the "#define foo _set_ver(foo)" line
-		if ((getline < FILE) <= 0)
-			exit 2
-		if ($1 != "#define" || $2 != SYMBOL || $3 != "_set_ver(" SYMBOL ")")
-			exit 3
-	}
-	close(FILE)
-}
-END {
-	count=0
-	for (key in values)
-		if (values[key]) {
-			count++
-			split(key,x,SUBSEP)
-			SYMBOL=x[1]
-			ARCH=x[2]
-			TYPE=x[3]
-
-			# (re)initialize a few arrays to have no elements
-			split("",x)
-			split("",ntype)
-			split("",total)
-
-			totalsum=0
-			for (arch in ARCHES)
-			    for (type in TYPES)
-				if (values[SYMBOL,arch,type]) {
-				    VALUE = values[SYMBOL,arch,type]
-				    values[SYMBOL,arch,type] = ""
-				    ntype[VALUE,type] += 1
-				    total[VALUE] += 1
-				    if (x[VALUE])
-					x[VALUE] = x[VALUE] " "
-				    x[VALUE] = x[VALUE] arch ":" type
-				}
-			ifstr="#if "
-			for (VALUE in x) {
-			    if (total[VALUE] == NTOTAL) {
-				# there is only one checksum for this symbol
-				printf "#define __ver_%s\t_ver_str(%s)\n", SYMBOL, VALUE
-				printf "#define %s _set_ver(%s)\n", SYMBOL, SYMBOL
-				break
-			    }
-
-			    totalsum += total[VALUE]
-			    if (totalsum == NTOTAL && ifstr == "#elif") {
-				# this is the last unique checksum for this symbol
-				printf "#else\n#define __ver_%s\t_ver_str(%s)\n", SYMBOL, VALUE
-				printf "#define %s _set_ver(%s)\n", SYMBOL, SYMBOL
-				break
-			    }
-
-			    # there must be more than one checksum still to
-			    # print for this symbol
-			    str=""
-			    split(x[VALUE],y)
-			    for (type in TYPES)
-				if (ntype[VALUE,type] == NARCHES[type]) {
-				    if (str) str = str " || "
-				    str = str "defined(__module__" type ")"
-				    for (k in y) {
-					split(y[k], z, ":")
-					if (z[2] == type)
-					    delete y[k]
-				    }
-				}
-			    for (arch in ARCHES) {
-				narch=0
-				for (k in y) {
-				    split(y[k], z, ":")
-				    if (z[1] == arch)
-					narch++
-				}
-				if (narch == NTYPES[arch]) {
-				    if (str) str = str " || "
-				    str = str "defined(__module__" arch ")"
-				    for (k in y) {
-					split(y[k], z, ":")
-					if (z[1] == arch)
-					    delete y[k]
-				    }
-				}
-			    }
-			    for (k in y) {
-				split(y[k], z, ":")
-				if (str) str = str " || "
-				str = str "defined(__module__" z[1] "_" z[2] ")"
-			    }
-			    printf "%s %s\n#define __ver_%s\t_ver_str(%s)\n", ifstr, str, SYMBOL, VALUE
-			    printf "#define %s _set_ver(%s)\n", SYMBOL, SYMBOL
-			    ifstr="#elif "
-			}
-			if (ifstr == "#elif ")
-			    printf "#endif\n"
-		}
-	if (!count)
-		printf "\n"
-}
diff --git a/build/merge1.sh b/build/merge1.sh
deleted file mode 100755
index cbd32279c7a97d4434a525fbaa461ad266437c9a..0000000000000000000000000000000000000000
--- a/build/merge1.sh
+++ /dev/null
@@ -1,104 +0,0 @@
-#!/bin/bash -e 
-
-CONFLICTS=cvs-merge-conflicts
-CVS="cvs -z3"
-
-if [ -f .mergeinfo ] ; then
-    echo ".mergeinfo exists - clean up first"
-    exit 
-fi
-
-if [ -f $CONFLICTS ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    exit 
-fi
-
-if [ $# -lt 2 -o $# -gt 3 ]; then
-    echo "This is phase 1 of merging branches. Usage: $0 parent child dir"
-    exit
-fi
-
-parent=$1
-PARENT=`echo $parent | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-child=$2
-CHILD=`echo $child | sed -e "s/^b_//" | tr "[a-z]" "[A-Z]"`
-date=`date +%Y%m%d_%H%M`
-
-dir=${3:-.}
-module=$(basename $(<$dir/CVS/Repository))
-
-if [ "$module" = "lustre" ] ; then
-    echo >&2 "${progname}: You probably want to merge lustre or portals, not the whole tree."
-    echo >&2 "${progname}: Try using ${0} $parent $child lustre"
-    exit 1
-fi
-
-
-case $parent in
-  HEAD) : ;;
-  b_*|b[1-4]*) : ;;
-  *) parent="b_$parent" ;;
-esac
-case $child in
-  HEAD) : ;;
-  b_*|b[1-4]*) : ;;
-  *) child="b_$child"
-esac
-
-if [ "$child" != "HEAD" -a "`cat $dir/CVS/Tag 2> /dev/null`" != "T$child" ]; then
-	echo "This script must be run within the $child branch"
-	exit 1
-fi
-
-TEST_FILE=${TEST_FILE:-ChangeLog} # does this need to be smarter?
-[ $dir = "build" ] && TEST_FILE=lbuild
-check_tag() {
-	[ -z "$1" ] && echo "check_tag() missing arg" && exit3
-	[ "$1" = "HEAD" ] && return
-	$CVS log $dir/$TEST_FILE 2> /dev/null | grep -q "	$1: " && return
-	echo "$0: tag $1 not found in $dir/$TEST_FILE"
-	exit 2
-}
-
-check_tag $parent
-check_tag ${CHILD}_BASE
-
-cat << EOF > .mergeinfo
-parent=$parent
-PARENT=$PARENT
-child=$child
-CHILD=$CHILD
-date=$date
-dir=$dir
-module=$module
-CONFLICTS=$CONFLICTS
-OPERATION=Merge
-OPERWHERE=from
-EOF
-
-echo PARENT: $PARENT parent: $parent CHILD: $CHILD child: $child date: $date
-
-echo -n "tagging $parent as '${PARENT}_${CHILD}_UPDATE_PARENT_$date' ...."
-$CVS rtag -r $parent ${PARENT}_${CHILD}_UPDATE_PARENT_$date $module
-echo "done"
-echo -n "tagging $child as '${PARENT}_${CHILD}_UPDATE_CHILD_$date' ...."
-$CVS rtag -r $child ${PARENT}_${CHILD}_UPDATE_CHILD_$date $module
-echo "done"
-
-# Apply all of the changes to your local tree:
-echo "Updating: -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date ...."
-$CVS update -j ${CHILD}_BASE -j ${PARENT}_${CHILD}_UPDATE_PARENT_$date -dP $dir
-echo "done"
-
-echo -n "Recording conflicts in $CONFLICTS ..."
-$CVS update | awk '/^C/ { print $2 }' > $CONFLICTS
-if [ -s $CONFLICTS ] ; then
-    echo "Conflicts found, fix before committing."
-    cat $CONFLICTS
-else 
-    echo "No conflicts found"
-    rm -f $CONFLICTS
-fi
-echo "done"
-
-echo "Build, test, commit and then run merge2.sh (no arguments)"
diff --git a/build/merge2.sh b/build/merge2.sh
deleted file mode 100755
index 0ef27cc45ac04dbd68395c7bb6df3b057e252f76..0000000000000000000000000000000000000000
--- a/build/merge2.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/bash -e 
-
-if [ ! -f .mergeinfo ] ; then
-    echo ".mergeinfo doesn't exist - exit"
-    exit 
-fi
-
-. .mergeinfo
-
-if [ "$OPERATION" != "Merge" ] ; then
-    echo "OPERATION must be Merge - is $OPERATION"
-    echo "You should probably be running ${OPERATION}2.sh"
-    exit
-fi
-
-if [ -f $CONFLICTS ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    cat $CONFLICTS
-    exit 
-fi
-
-cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1
-
-echo -n "Tagging ${PARENT}_${CHILD}_UPDATE_PARENT_$date as ${CHILD}_BASE_$date ..."
-cvs rtag -r ${PARENT}_${CHILD}_UPDATE_PARENT_$date ${CHILD}_BASE_$date $module
-echo  "done"
-echo -n "Tagging ${CHILD}_BASE as ${CHILD}_BASE_PREV ...."
-cvs rtag -F -r ${CHILD}_BASE ${CHILD}_BASE_PREV $module
-echo  "done"
-echo "${CHILD}_BASE_$date as ${CHILD}_BASE ..."
-cvs rtag -F -r ${CHILD}_BASE_$date ${CHILD}_BASE $module
-
-echo "saving .mergeinfo as .mergeinfo-$date"
-mv .mergeinfo .mergeinfo-$date
-echo  "done"
diff --git a/build/osxpack/ReadMe.txt b/build/osxpack/ReadMe.txt
deleted file mode 100644
index 06555ba501480c314b5d5f22136f88af6d058f8e..0000000000000000000000000000000000000000
--- a/build/osxpack/ReadMe.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-This is release 0.9.2 Beta of the Lustre OS X client.
-
-This is not a production quality release, so use it with care, and on non-production systems.  The installation will overwrite the OS X kernel on your system.  Un-installing this package will restore your current kernel.
-
diff --git a/build/osxpack/Welcome.txt b/build/osxpack/Welcome.txt
deleted file mode 100644
index f6fa0ce991970892073a6b4014c96fd51e286460..0000000000000000000000000000000000000000
--- a/build/osxpack/Welcome.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Welcome to the Lustre OS X client installation  
-
-You will be guided through the steps necessary to install this software.  During installation you will be required to reboot your Mac, so make sure you have saved all your data and closed applications before continuing the installation.
-
diff --git a/build/osxpack/packlustre.sh b/build/osxpack/packlustre.sh
deleted file mode 100755
index 7392c0eb32712bce59b1d9104622207dcabb240e..0000000000000000000000000000000000000000
--- a/build/osxpack/packlustre.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-#
-# This script is used to create package directory tree used
-# by PackageMaker in OS X.
-
-PREFIX=$1
-STAGE=$2
-
-RESOURCE=$PWD/build/osxpack
-if ! [ -d $RESOURCE ]; then
-	echo "Your tree seems to be missing $RESOURCE." >&2
-fi
-
-if [ "x$PREFIX" == "x" ]; then
-	PREFIX=/home/cfs/package
-fi
-
-if [ "x$STAGE" == "x" ]; then
-	STAGE=/System/Library/Extensions
-fi
-
-if ! [ -d $STAGE/llite.kext ]; then
-	echo "Sorry, cannot find stage files for package"
-	exit 1
-fi
-
-if ! [ -d $PREFIX ]; then
-	mkdir -p $PREFIX
-fi
-
-if ! [ -d $PREFIX/Install_resources ]; then
-	mkdir -p $PREFIX/Install_resources
-fi
-
-if ! [ -d $PREFIX/Package_contents ]; then
-	mkdir -p $PREFIX/Package_contents
-fi
-
-CONTENTS=$PREFIX/Package_contents
-
-if ! [ -d $CONTENTS/System/Libraray/Extensions ]; then
-	mkdir -p $CONTENTS/System/Library/Extensions
-fi
-# IMPORTANT
-# /etc is symlink of /private/etc in OS X, if we 
-# just use $CONTENTS/etc, it will OVERWRITE /etc in
-# installation target, that means all files in /etc 
-# will be lost, the system will be corrupted.
-if ! [ -d $CONTENTS/private/etc ]; then
-	mkdir -p $CONTENTS/private/etc
-fi
-
-if ! [ -d $CONTENTS/sbin ]; then
-	mkdir -p $CONTENTS/sbin
-fi
-
-cp -f $RESOURCE/*.txt $PREFIX/Install_resources/
-cp -f $RESOURCE/*flight $PREFIX/Install_resources/
-cp -f $RESOURCE/sysctl.conf $CONTENTS/private/etc
-cp -f $RESOURCE/uninstall_lustre $CONTENTS/sbin
-cp -f $RESOURCE/unload_lustre $CONTENTS/sbin
-cp -rf $STAGE/llite.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/mdc.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/lov.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/osc.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/ptlrpc.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/ptlrpcs.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/obdclass.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/lvfs.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/ksocknal.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/portals.kext $CONTENTS/System/Library/Extensions
-cp -rf $STAGE/libcfs.kext $CONTENTS/System/Library/Extensions
diff --git a/build/osxpack/postflight b/build/osxpack/postflight
deleted file mode 100755
index a4e663300a22f1e7ee2b2f898e67efaf0421f178..0000000000000000000000000000000000000000
--- a/build/osxpack/postflight
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-/usr/sbin/nvram boot-args="debug=0xe zsize=256"
-
-# Delete cache files
-if [ -f /System/Library/Extensions.kextcache ]; then
-	rm -f /System/Library/Extensions.kextcache
-fi
-
-if [ -d /System/Library/Caches/com.apple.kernelcaches ]; then
-	rm -rf /System/Library/Caches/com.apple.kernelcaches
-fi
-
-touch /System/Library
diff --git a/build/osxpack/preflight b/build/osxpack/preflight
deleted file mode 100755
index 582aea3449f430c536c8a5435b92f295d46d8775..0000000000000000000000000000000000000000
--- a/build/osxpack/preflight
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-
-date=`date +%Y%m%d_%H%M`
-
-backpath=/System/LustreBackup
-if ! [ -d $backpath ]; then
-	mkdir -p $backpath
-fi
-
-backdir=${backpath}/SystemBackup
-
-# If system has been backed up, just exit
-if [ -d ${backdir} ]; then
-	exit 0
-fi
-
-mkdir $backdir
-chmod 700 $backdir
-
-# create backup directory
-mkdir -p $backdir/System/Library/Frameworks
-mkdir -p $backdir/System/Library/Extensions
-mkdir -p $backdir/usr/lib
-mkdir -p $backdir/usr/include
-mkdir -p $backdir/private/etc
-
-# backup the old system
-cp /mach_kernel $backdir/
-cp -rf /System/Library/Frameworks/IOKit.framework $backdir/System/Library/Frameworks/
-cp -rf /System/Library/Frameworks/Kernel.framework $backdir/System/Library/Frameworks/
-cp -rf /System/Library/Frameworks/System.framework $backdir/System/Library/Frameworks/
-cp -rf /System/Library/Extensions/System.kext $backdir/System/Library/Extensions/
-cp -rf /usr/include/bsm $backdir/usr/include/bsm
-cp -rf /usr/include/default_pager $backdir/usr/include/default_pager
-cp -rf /usr/include/dev $backdir/usr/include/dev
-cp -rf /usr/include/device $backdir/usr/include/device
-cp -rf /usr/include/drivers $backdir/usr/include/drivers
-cp -rf /usr/include/hfs $backdir/usr/include/hfs
-cp -rf /usr/include/isofs $backdir/usr/include/isofs
-cp -rf /usr/include/libkern $backdir/usr/include/libkern
-cp -rf /usr/include/mach $backdir/usr/include/mach
-cp -rf /usr/include/mach_debug $backdir/usr/include/mach_debug
-cp -rf /usr/include/machine $backdir/usr/include/machine
-cp -rf /usr/include/miscfs $backdir/usr/include/miscfs
-cp -rf /usr/include/net $backdir/usr/include/net
-cp -rf /usr/include/netat $backdir/usr/include/netat
-cp -rf /usr/include/netinet $backdir/usr/include/netinet
-cp -rf /usr/include/netinet6 $backdir/usr/include/netinet6
-cp -rf /usr/include/netkey $backdir/usr/include/netkey
-cp -rf /usr/include/nfs $backdir/usr/include/nfs
-cp -rf /usr/include/pexpert $backdir/usr/include/pexpert
-cp -rf /usr/include/ppc $backdir/usr/include/ppc
-cp -rf /usr/include/profile $backdir/usr/include/profile
-cp -rf /usr/include/sys $backdir/usr/include/sys
-cp -rf /usr/include/ufs $backdir/usr/include/ufs
-cp -rf /usr/include/vfs $backdir/usr/include/vfs
-cp -f /usr/lib/libIOKit.A.dylib $backdir/usr/lib/libIOKit.A.dylib
-cp -f /usr/lib/libIOKit.dylib $backdir/usr/lib/libIOKit.dylib
-cp -f /usr/lib/libkmod.a $backdir/usr/lib/libkmod.a
-cp -f /usr/lib/libkmodc++.a $backdir/usr/lib/libkmodc++.a
-if [ -f /private/etc/sysctl.conf ]; then
-	cp -f /private/etc/sysctl.conf $backdir/private/etc/sysctl.conf
-fi
-
-# record sysctem backup path of current installation 
-# echo $backdir >> $backpath/lustre-current
-# echo $date > $backdir/install_date
diff --git a/build/osxpack/sysctl.conf b/build/osxpack/sysctl.conf
deleted file mode 100644
index f8d2cc2fc1750fbda4ca150a1ecfa1009001aed9..0000000000000000000000000000000000000000
--- a/build/osxpack/sysctl.conf
+++ /dev/null
@@ -1,15 +0,0 @@
-# nmbclusters can not be modified by sysctl(it's read only)
-# so we have to change it in kernel patch
-## kern.ipc.nmbclusters=32768
-
-# Keep a long enough reassembly queue. 
-net.inet.tcp.reass.maxsegments=4096
-
-# max permited sockbuf
-kern.ipc.maxsockbuf=8388608
-
-# XXX 
-net.inet.tcp.sendspace=3217968
-net.inet.tcp.recvspace=3217968
-
-kern.maxvnodes=65536
diff --git a/build/osxpack/uninstall_lustre b/build/osxpack/uninstall_lustre
deleted file mode 100755
index d2624d2d3ad51064ecdea3b73509181e2a87f4e0..0000000000000000000000000000000000000000
--- a/build/osxpack/uninstall_lustre
+++ /dev/null
@@ -1,111 +0,0 @@
-#!/bin/sh
-#
-# It's the uninstall programe of lustre
-
-mount | grep lustre > /dev/null
-if [ $? -eq 0 ]; then
-        echo "Please unmount Lustre before uninstall Lustre."
-        exit 1
-fi
-
-echo "unloading modules......"
-/sbin/unload_lustre 2 > /dev/null
-
-backdir=/System/LustreBackup/SystemBackup
-if ! [ -d $backdir ]; then
-	echo "No backup directory is found, you have not installed lustre or uninstall failed!"
-	exit 1
-fi
-
-# if ! [ -f $backpath/lustre-current ]; then
-#	echo "No version information of Lustre installation, you have uninstalled or uninstall failed!"
-#	exit 2
-# fi
-#
-# get information of the the backup system
-#
-# backdir=`tail -1 $backpath/lustre-current`
-# if ! [ -d $backdir ]; then
-#	echo "Miss backup directory, uninstall failed!"
-#	exit 3
-# fi
-
-# recover the old system
-echo "recover orignal kernel......"
-cp -f $backdir/mach_kernel /mach_kernel
-echo "recover orignal frameworks......"
-cp -rf $backdir/System/Library/Frameworks/IOKit.framework /System/Library/Frameworks/
-cp -rf $backdir/System/Library/Frameworks/Kernel.framework /System/Library/Frameworks/
-cp -rf $backdir/System/Library/Frameworks/System.framework /System/Library/Frameworks/
-echo "recover orignal kernel extensions......"
-cp -rf $backdir/System/Library/Extensions/System.kext /System/Library/Extensions/
-echo "recover orignal system headers......"
-cp -rf $backdir/usr/include/bsm /usr/include/bsm
-cp -rf $backdir/usr/include/default_pager /usr/include/default_pager
-cp -rf $backdir/usr/include/dev /usr/include/dev
-cp -rf $backdir/usr/include/device /usr/include/device
-cp -rf $backdir/usr/include/drivers /usr/include/drivers
-cp -rf $backdir/usr/include/hfs /usr/include/hfs
-cp -rf $backdir/usr/include/isofs /usr/include/isofs
-cp -rf $backdir/usr/include/libkern /usr/include/libkern
-cp -rf $backdir/usr/include/mach /usr/include/mach
-cp -rf $backdir/usr/include/mach_debug /usr/include/mach_debug
-cp -rf $backdir/usr/include/machine /usr/include/machine
-cp -rf $backdir/usr/include/miscfs /usr/include/miscfs
-cp -rf $backdir/usr/include/net /usr/include/net
-cp -rf $backdir/usr/include/netat /usr/include/netat
-cp -rf $backdir/usr/include/netinet /usr/include/netinet
-cp -rf $backdir/usr/include/netinet6 /usr/include/netinet6
-cp -rf $backdir/usr/include/netkey /usr/include/netkey
-cp -rf $backdir/usr/include/nfs /usr/include/nfs
-cp -rf $backdir/usr/include/pexpert /usr/include/pexpert
-cp -rf $backdir/usr/include/ppc /usr/include/ppc
-cp -rf $backdir/usr/include/profile /usr/include/profile
-cp -rf $backdir/usr/include/sys /usr/include/sys
-cp -rf $backdir/usr/include/ufs /usr/include/ufs
-cp -rf $backdir/usr/include/vfs /usr/include/vfs
-echo "recover orignal system libraries......"
-cp -f $backdir/usr/lib/libIOKit.A.dylib /usr/lib/libIOKit.A.dylib
-cp -f $backdir/usr/lib/libIOKit.dylib /usr/lib/libIOKit.dylib
-cp -f $backdir/usr/lib/libkmod.a /usr/lib/libkmod.a
-cp -f $backdir/usr/lib/libkmodc++.a /usr/lib/libkmodc++.a
-if [ -f $backdir/private/etc/sysctl.conf ]; then
-	cp -f $backdir/private/etc/sysctl.conf /private/etc/sysctl.conf
-else
-	rm -f /private/etc/sysctl.conf
-fi
-
-# 
-# cp $backpath/lustre-current /tmp/lustre-v
-# count=`grep "SystemBackup" /tmp/lustre-v|wc -l`
-# count=`expr $count - 1`
-# if [ $count -gt 0 ]; then
-# 	head -$count /tmp/lustre-v > $backpath/lustre-current
-# else
-# 	# The file should be empty now, it's the last uninstall
-#	rm -f $backpath/lustre-current
-# fi
-# rm -f /tmp/lustre-v
-
-# remove unused files
-echo "uninstall lustre modules and utilities......"
-rm -rf $backdir
-rm -f /sbin/lctl
-rm -f /sbin/mount_lustre
-rm -f /sbin/unload_lustre
-rm -rf /System/Library/Extensions/libcfs.kext
-rm -rf /System/Library/Extensions/portals.kext
-rm -rf /System/Library/Extensions/ksocknal.kext
-rm -rf /System/Library/Extensions/lvfs.kext
-rm -rf /System/Library/Extensions/obdclass.kext
-rm -rf /System/Library/Extensions/ptlrpc.kext
-rm -rf /System/Library/Extensions/ptlrpcs.kext
-rm -rf /System/Library/Extensions/osc.kext
-rm -rf /System/Library/Extensions/lov.kext
-rm -rf /System/Library/Extensions/obdecho.kext
-rm -rf /System/Library/Extensions/mdc.kext
-rm -rf /System/Library/Extensions/llite.kext
-
-# disable kernel cache by touch /System/Library
-touch /System/Library
-echo "Uninstall Lustre successfully, please reboot your computer!"
diff --git a/build/osxpack/unload_lustre b/build/osxpack/unload_lustre
deleted file mode 100755
index 54404c1b5beebce066e19ef752dd841efd32d461..0000000000000000000000000000000000000000
--- a/build/osxpack/unload_lustre
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/bin/sh
-
-mount | grep lustre > /dev/null
-if [ $? -eq 0 ]; then
-	echo "Please unmount lustre before unload modules."
-	exit 1
-fi
-kextunload /System/Library/Extensions/llite.kext
-kextunload /System/Library/Extensions/mdc.kext
-kextunload /System/Library/Extensions/lov.kext
-kextunload /System/Library/Extensions/osc.kext
-kextunload /System/Library/Extensions/ptlrpc.kext
-kextunload /System/Library/Extensions/ptlrpcs.kext
-kextunload /System/Library/Extensions/obdclass.kext
-kextunload /System/Library/Extensions/lvfs.kext
-kextunload /System/Library/Extensions/ksocknal.kext
-kextunload /System/Library/Extensions/portals.kext
-kextunload /System/Library/Extensions/libcfs.kext
diff --git a/build/replace2.sh b/build/replace2.sh
deleted file mode 100755
index e0f7b2b05dd55f7d01283e812d264224e5ec4a5a..0000000000000000000000000000000000000000
--- a/build/replace2.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/bash -e 
-
-CVS=cvs
-
-if [ ! -f .mergeinfo ] ; then
-    echo ".mergeinfo doesn't exist - exit"
-    exit 
-fi
-
-. .mergeinfo
-
-if [ "$OPERATION" != "Replace" ] ; then
-    echo "OPERATION must be Replace - is $OPERATION"
-    echo "You should probably be running ${OPERATION}2.sh"
-    exit
-fi
-
-if [ -f "$CONFLICTS" ] ; then
-    echo "$CONFLICTS exists - clean up first"
-    cat $CONFLICTS
-    exit 
-fi
-
-cvs update $dir 2>&1 | grep "^M" && echo "uncommitted changes" && exit 1
-
-# Tag parent
-echo -n "Tagging as ${CHILD}_REPLACED_${PARENT}_$date ..."
-$CVS rtag -r $parent ${CHILD}_REPLACED_${PARENT}_$date $module
-echo "done"
-# In case someone tries to re-land later
-echo -n "Tagging as ${CHILD}_BASE ..."
-$CVS rtag -F -r $parent ${CHILD}_BASE $module
-
-echo "saving .mergeinfo as .mergeinfo-$date"
-mv .mergeinfo .mergeinfo-$date
-echo "done"
diff --git a/build/sles8-post.sh b/build/sles8-post.sh
deleted file mode 100644
index d8a2e6bc985965efa87c949a95267e5e23668c80..0000000000000000000000000000000000000000
--- a/build/sles8-post.sh
+++ /dev/null
@@ -1,49 +0,0 @@
-# Replace fake symlinks with the real ones
-relink vmlinuz-%ver_str /boot/vmlinuz
-relink initrd-%ver_str /boot/initrd
-
-if [ -e /etc/sysconfig/kernel ]; then
-    update_rcfile_setting /etc/sysconfig/kernel INITRD_MODULES 2>&1
-elif [ -e /etc/rc.config ]; then
-    update_rcfile_setting /etc/rc.config INITRD_MODULES 2>&1
-fi
-
-# If any trigger scripts have created additional modules, we need to
-# run depmod.
-run_depmod=
-if [ -x /sbin/depmod ]; then
-    for module in $(find /lib/modules/%ver_str \
-	    		 /lib/modules/%{version}-override-%{cfg_name} \
-			 -type f) ; do
-	if [ $module -nt /lib/modules/%ver_str/modules.dep ]; then
-	    run_depmod=1
-	    break
-	fi
-    done
-fi
-if [ -n "$run_depmod" ]; then
-    depmod -ae %ver_str
-fi
-
-if [ -f /etc/fstab -a -x /sbin/mkinitrd ]; then
-    cd /boot && \
-    /sbin/mkinitrd -k "vmlinuz-%ver_str" -i "initrd-%ver_str"
-elif [ -f /etc/fstab -a -x /sbin/mk_initrd ]; then
-    cd /boot && \
-    /sbin/mk_initrd -k "vmlinuz-%ver_str" -i "initrd-%ver_str"
-else
-    echo "please run mkinitrd as soon as your system is complete"
-fi
-
-# Only call new-kernel-pkg during package updates: Otherwise we might
-# call this during an initial installation, with a half-initialized
-# boot loader. ($1 = number of instances of this package currently
-# installed.)
-if [ "$1" -gt 1 ]; then
-    # Notify boot loader that a new kernel image has been installed.
-    if [ -x /sbin/new-kernel-pkg ]; then
-	/sbin/new-kernel-pkg %ver_str
-    elif [ -e /etc/lilo.conf -a -x /sbin/lilo ]; then
-    	/sbin/lilo
-    fi
-fi
diff --git a/build/sles8-postun.sh b/build/sles8-postun.sh
deleted file mode 100644
index fe1ded589939f5cccafc5d379ad0c91f0bbffc20..0000000000000000000000000000000000000000
--- a/build/sles8-postun.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-rm -f /boot/initrd-%ver_str  # created in %post -- clean up.
-
-if [ "$(readlink /boot/vmlinuz)" = "vmlinuz-%ver_str" -o \
-     "$(readlink /boot/initrd)"  = "initrd-%ver_str" ]; then
-    # This may be the last kernel RPM on the system, or it may
-    # be an update. In both of those cases the symlinks will
-    # eventually be correct. On the other hand, if this kernel
-    # is removed and other kernel rpms remain installed,
-    # find the most recent of the remaining kernels, and make
-    # the symlinks point to it. This makes sure that the boot
-    # manager will always have a kernel to boot in its default
-    # configuration.
-    for vmlinuz in $(cd /boot ; ls -dt vmlinuz-*); do
-	version="${vmlinuz#vmlinuz-}"
-	initrd="initrd-$version"
-	if [ -f "/boot/$vmlinuz" -a -f "/boot/$initrd" ]; then
-	    relink "$vmlinuz" /boot/vmlinuz
-	    relink "$initrd" /boot/initrd
-	    break
-	fi
-    done
-fi
diff --git a/build/sles8-pre.sh b/build/sles8-pre.sh
deleted file mode 100644
index a542caf5a9c919d8f2ed743353a082d5636b7be2..0000000000000000000000000000000000000000
--- a/build/sles8-pre.sh
+++ /dev/null
@@ -1,2 +0,0 @@
-rm -f /boot/vmlinuz.suse
-rm -f /boot/initrd.suse
diff --git a/build/sles8-update_INITRD_MODULES.sh b/build/sles8-update_INITRD_MODULES.sh
deleted file mode 100644
index 38d5e3d5fb3baa75f65af9f7fa05802a9cbb0ab9..0000000000000000000000000000000000000000
--- a/build/sles8-update_INITRD_MODULES.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-# Check if $1 is equal to any argument in $1 .. $*.
-#
-contains() {
-    local x=$1
-    shift
-
-    case " $@ " in
-    *" $x "*)	return 0 ;;
-    *)		return 1 ;;
-    esac
-}
-
-# Check the old value of INITRD_MODULES:
-#  - Remove modules that no longer exist.
-#  - Add modules that were built into the kernel before.
-#
-update_INITRD_MODULES() {
-    # MD_MODS is the list of modules that require md.o.
-    local MD_MODS="linear multipath raid0 raid1 raid5"
-
-    # NON_SCSI is a whitelist of modules that are no scsi drivers. Any
-    # module not listed here is assumed to be a scsi driver, and the
-    # low-level scsi modules are added to INITRD_MODULES.
-    local NON_SCSI="jbd ext3 jfs xfs reiserfs $MD_MODS md"
-
-    local result maybe_scsi need_md have_md have_scsi have_sd m
-    for m in "$@" ; do
-	m="${m%.o}" ; m="${m%.ko}"
-	
-	contains "$m" $NON_SCSI || maybe_scsi=1
-	contains "$m" $MD_MODS && need_md=1
-	[ "$m" == md ] && have_md=1
-	if contains "$m" scsi_mod sd_mod ; then
-	    eval have_${m%_mod}=1
-	    continue
-	fi
-	if contains "$m" xfs_dmapi xfs_support ; then
-	    echo "Module $m no longer exists, and was removed from" \
-		 "INITRD_MODULES." >&2
-	    continue
-	fi
-	
-	result[${#result[@]}]="$m"
-    done
-    if [ -n "$maybe_scsi" -o -n "$have_scsi" -o -n "$have_sd" ]; then
-	[ -z "$have_scsi" -o -z "$have_sd" ] \
-	    && echo "Adding SCSI disk modules to INITRD_MODULES" >&2
-	result=(scsi_mod sd_mod ${result[@]})
-    fi
-    if [ -n "$need_md" -a -z "$have_md" ]; then
-        echo "Adding RAID support module to INITRD_MODULES" >&2
-    	result=(md ${result[@]})
-    fi
-
-    echo ${result[@]}
-}
diff --git a/build/sles8-update_rcfile_setting.sh b/build/sles8-update_rcfile_setting.sh
deleted file mode 100644
index 6165cc7da8aeb1a8e246e61bd3af42640920fe66..0000000000000000000000000000000000000000
--- a/build/sles8-update_rcfile_setting.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-# Update the variable $var in $rcfile: The function update_$VAR must
-# exist. It is called with the old value of $var, and must return the
-# new value.
-# 
-update_rcfile_setting() {
-    local rcfile=$1 var=$2
-
-    # The characters $, `, ", and \ have special meaning inside double
-    # quoted shell variables. The characters " and \ have special meaning
-    # inside awk double-quoted variables.
-
-    local old=$(source "$rcfile" ;
-    		eval echo \$$var \
-		| sed -e 's/\([$`"\\]\)/\\\1/g')
-    local new=$(eval update_$var "$old" \
-    		| sed -e 's/\([$`"\\]\)/\\\1/g' \
-		      -e 's/\(["\\]\)/\\\1/g')
-    local tmp=$(mktemp /tmp/${rcfile##/*}.XXXXXX)
-    
-    # This script breaks for multi-line varables -- I don't think
-    # we need to handle this special case.
-    awk '
-	function replace() {
-	    if (!done)
-		print "'"$var"'=\"'"$new"'\""
-	    done=1
-	}
-	
-	/^'"$var"'=/	{ replace() ; next }
-			{ print }
-    ' < $rcfile > $tmp &&
-    cat $tmp > $rcfile
-
-    rm -f $tmp
-}
diff --git a/build/suse-functions.sh b/build/suse-functions.sh
deleted file mode 100644
index a7e421d2c5d0e0b9154067d378d0f2e5c643cca3..0000000000000000000000000000000000000000
--- a/build/suse-functions.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-# Readlink is not present on some older distributions: emulate it.
-readlink() {
-    local path=$1 ll
-
-    if [ -L "$path" ]; then
-	ll="$(LC_ALL=C ls -l "$path" 2> /dev/null)" &&
-	echo "${ll/* -> }"
-    else
-	return 1
-    fi
-}
-relink() {
-    if [ -h "$2" ]; then
-	local old=$(readlink "$2")
-	[ "$old" = "$1" ] && return 0
-	echo "Changing symlink $2 from $old to $1"
-    elif [ -e "$2" ]; then
-	echo "Replacing file $2 with symlink to $1"
-    fi
-    rm -f "$2" \
-    && ln -s "$1" "$2"
-}
diff --git a/build/suse-trigger-script.sh.in b/build/suse-trigger-script.sh.in
deleted file mode 100644
index 0ead9e86f2a4dfad18472045317cdc8dd27551a1..0000000000000000000000000000000000000000
--- a/build/suse-trigger-script.sh.in
+++ /dev/null
@@ -1,9 +0,0 @@
-old_shopt=$(shopt -p nullglob || :)
-shopt -s nullglob
-for script in /lib/modules/scripts/* ; do
-    if [ -f "$script" -a -x "$script" ] \
-	&& ! "$script" --@when@ %ver_str $1 ; then
-	echo "$script failed."
-    fi
-done
-eval $old_shopt
diff --git a/build/update_oldconfig b/build/update_oldconfig
deleted file mode 100755
index 6d4d87045063c802e693fbb7c3df7f3ee0b136e7..0000000000000000000000000000000000000000
--- a/build/update_oldconfig
+++ /dev/null
@@ -1,74 +0,0 @@
-#!/usr/bin/expect -f
-
-#enables some diagnostic output
-exp_internal 1
-
-# log all interaction to a file to diagnose failures
-log_file -a [lindex $argv 0]
-
-# and not stddout
-log_user 0
-
-set spawnid [spawn make oldconfig]
-
-#match_max 200
-
-# need to allow for the config tool to be built initially
-set timeout 30
-
-expect {
-    timeout {
-        puts "timeout in update_oldconfig waiting for a prompt we recognize"
-        exit 1
-    }
-    -re "\n *(\[^\n]* \\\[N\/y\/\\?] \\(NEW\\)) " {
-         puts "$expect_out(1,string) n"
-         send "n\r"
-         exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[N\/m\/y\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) m"
-        send "m\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[N\/y\/m\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) m"
-        send "m\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[N\/m\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) m"
-        send "m\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[Y\/n\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) y"
-        send "y\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[\[0-9]*] \\(NEW\\)) " {
-        puts "$expect_out(1,string) <cr>"
-        send "\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[M\/n\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) m"
-        send "m\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[M\/n\/y\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) m"
-        send "m\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[Y\/n\/m\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) m"
-        send "m\r"
-        exp_continue
-    }
-    -re "\n *(\[^\n]* \\\[Y\/\\?] \\(NEW\\)) " {
-        puts "$expect_out(1,string) y"
-        send "y\r"
-        exp_continue
-    }
-}
diff --git a/ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch
deleted file mode 100644
index 9f443b49b8d8187f4bef55d862d104add369ad97..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/export-ext3-2.6-rhel4.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: linux-2.6.9-42.0.10.EL_lustre.1.4.10/fs/ext3/super.c
-===================================================================
---- linux-2.6.9-42.0.10.EL_lustre.1.4.10.orig/fs/ext3/super.c	2007-05-16 08:46:24.000000000 +0200
-+++ linux-2.6.9-42.0.10.EL_lustre.1.4.10/fs/ext3/super.c	2007-05-16 08:48:58.000000000 +0200
-@@ -123,6 +123,8 @@ void ext3_journal_abort_handle(const cha
- 	journal_abort_handle(handle);
- }
- 
-+EXPORT_SYMBOL(ext3_journal_abort_handle);
-+
- /* Deal with the reporting of failure conditions on a filesystem such as
-  * inconsistencies detected or read IO failures.
-  *
-@@ -2064,6 +2066,8 @@ int ext3_force_commit(struct super_block
- 	return ret;
- }
- 
-+EXPORT_SYMBOL(ext3_force_commit);
-+
- /*
-  * Ext3 always journals updates to the superblock itself, so we don't
-  * have to propagate any other updates to the superblock on disk at this
-@@ -2586,6 +2590,12 @@ int ext3_map_inode_page(struct inode *in
-                         unsigned long *blocks, int *created, int create);
- EXPORT_SYMBOL(ext3_map_inode_page);
- 
-+EXPORT_SYMBOL(ext3_xattr_get);
-+EXPORT_SYMBOL(ext3_xattr_set_handle);
-+EXPORT_SYMBOL(ext3_bread);
-+EXPORT_SYMBOL(ext3_journal_start_sb);
-+EXPORT_SYMBOL(__ext3_journal_stop);
-+
- MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
- MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions");
- MODULE_LICENSE("GPL");
diff --git a/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch b/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch
deleted file mode 100644
index c10431bf43ea66ce41328e4b4c82b5c84da0dc35..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/export-ext3-2.6-suse.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-Index: linux-2.6.5-7.283_lustre-1.4.10.1/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-7.283_lustre-1.4.10.1.orig/fs/ext3/super.c	2007-05-30 08:48:29.000000000 +0200
-+++ linux-2.6.5-7.283_lustre-1.4.10.1/fs/ext3/super.c	2007-05-30 08:48:37.000000000 +0200
-@@ -116,6 +116,8 @@ void ext3_journal_abort_handle(const cha
- 		handle->h_err = err;
- }
- 
-+EXPORT_SYMBOL(ext3_journal_abort_handle);
-+
- static char error_buf[1024];
- 
- /* Deal with the reporting of failure conditions on a filesystem such as
-@@ -1895,6 +1897,8 @@ int ext3_force_commit(struct super_block
- 	return ret;
- }
- 
-+EXPORT_SYMBOL(ext3_force_commit);
-+
- /*
-  * Ext3 always journals updates to the superblock itself, so we don't
-  * have to propagate any other updates to the superblock on disk at this
-@@ -2334,6 +2338,12 @@ int ext3_map_inode_page(struct inode *in
-                         unsigned long *blocks, int *created, int create);
- EXPORT_SYMBOL(ext3_map_inode_page);
- 
-+EXPORT_SYMBOL(ext3_xattr_get);
-+EXPORT_SYMBOL(ext3_xattr_set_handle);
-+EXPORT_SYMBOL(ext3_bread);
-+EXPORT_SYMBOL(ext3_journal_start);
-+EXPORT_SYMBOL(__ext3_journal_stop);
-+
- MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
- MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions");
- MODULE_LICENSE("GPL");
diff --git a/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch b/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch
deleted file mode 100644
index 294a9cdffb2efd89d543a9888762aa0f60b75d2f..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/export_symbols-ext3-2.6-suse.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Index: linux-2.6.5-sles9/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_sb.h	2004-11-03 08:36:51.000000000 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_fs_sb.h	2004-11-09 02:20:51.598024096 +0300
-@@ -19,9 +19,12 @@
- #ifdef __KERNEL__
- #include <linux/timer.h>
- #include <linux/wait.h>
-+#ifndef EXT_INCLUDE
-+#define EXT_INCLUDE
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
- #endif
-+#endif
- #include <linux/rbtree.h>
- 
- /*
diff --git a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch b/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch
deleted file mode 100644
index e54774ff7088b35177d28d3e0b2c0bd54536c6ea..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.5.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-Index: linux-2.6.5-7.201-full/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.5-7.201-full.orig/include/linux/ext3_fs.h	2006-08-09 17:59:34.000000000 +0400
-+++ linux-2.6.5-7.201-full/include/linux/ext3_fs.h	2006-08-22 12:35:55.000000000 +0400
-@@ -793,6 +793,7 @@ extern void ext3_put_super (struct super
- extern void ext3_write_super (struct super_block *);
- extern void ext3_write_super_lockfs (struct super_block *);
- extern void ext3_unlockfs (struct super_block *);
-+extern void ext3_commit_super (struct super_block *, struct ext3_super_block *, int);
- extern int ext3_remount (struct super_block *, int *, char *);
- extern int ext3_statfs (struct super_block *, struct kstatfs *);
- 
-Index: linux-2.6.5-7.201-full/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-7.201-full.orig/fs/ext3/super.c	2006-08-09 17:59:37.000000000 +0400
-+++ linux-2.6.5-7.201-full/fs/ext3/super.c	2006-08-09 17:59:37.000000000 +0400
-@@ -39,7 +39,7 @@
- static int ext3_load_journal(struct super_block *, struct ext3_super_block *);
- static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
- 			       int);
--static void ext3_commit_super (struct super_block * sb,
-+void ext3_commit_super (struct super_block * sb,
- 			       struct ext3_super_block * es,
- 			       int sync);
- static void ext3_mark_recovery_complete(struct super_block * sb,
-@@ -1781,7 +1781,7 @@ static int ext3_create_journal(struct su
- 	return 0;
- }
- 
--static void ext3_commit_super (struct super_block * sb,
-+void ext3_commit_super (struct super_block * sb,
- 			       struct ext3_super_block * es,
- 			       int sync)
- {
-Index: linux-2.6.5-7.201-full/fs/ext3/namei.c
-===================================================================
---- linux-2.6.5-7.201-full.orig/fs/ext3/namei.c	2006-08-09 17:59:37.000000000 +0400
-+++ linux-2.6.5-7.201-full/fs/ext3/namei.c	2006-08-09 17:59:37.000000000 +0400
-@@ -1598,7 +1598,7 @@ static int ext3_delete_entry (handle_t *
- 			      struct buffer_head * bh)
- {
- 	struct ext3_dir_entry_2 * de, * pde;
--	int i;
-+	int i, err;
- 
- 	i = 0;
- 	pde = NULL;
-@@ -1608,7 +1608,9 @@ static int ext3_delete_entry (handle_t *
- 			return -EIO;
- 		if (de == de_del)  {
- 			BUFFER_TRACE(bh, "get_write_access");
--			ext3_journal_get_write_access(handle, bh);
-+			err = ext3_journal_get_write_access(handle, bh);
-+			if (err)
-+				return err;
- 			if (pde)
- 				pde->rec_len =
- 					cpu_to_le16(le16_to_cpu(pde->rec_len) +
-Index: linux-2.6.5-7.201-full/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.5-7.201-full.orig/fs/ext3/xattr.c	2006-07-14 01:53:23.000000000 +0400
-+++ linux-2.6.5-7.201-full/fs/ext3/xattr.c	2006-08-09 17:59:37.000000000 +0400
-@@ -107,7 +107,7 @@ ext3_xattr_register(int name_index, stru
- {
- 	int error = -EINVAL;
- 
--	if (name_index > 0 && name_index <= EXT3_XATTR_INDEX_MAX) {
-+	if (name_index > 0 && name_index < EXT3_XATTR_INDEX_MAX) {
- 		write_lock(&ext3_handler_lock);
- 		if (!ext3_xattr_handlers[name_index-1]) {
- 			ext3_xattr_handlers[name_index-1] = handler;
-Index: linux-2.6.5-7.201-full/fs/ext3/inode.c
-===================================================================
---- linux-2.6.5-7.201-full.orig/fs/ext3/inode.c	2006-07-14 01:53:22.000000000 +0400
-+++ linux-2.6.5-7.201-full/fs/ext3/inode.c	2006-08-22 12:35:28.000000000 +0400
-@@ -1517,9 +1517,14 @@ out_stop:
- 			if (end > inode->i_size) {
- 				ei->i_disksize = end;
- 				i_size_write(inode, end);
--				err = ext3_mark_inode_dirty(handle, inode);
--				if (!ret) 
--					ret = err;
-+				/*
-+				 * We're going to return a positive `ret'
-+				 * here due to non-zero-length I/O, so there's
-+				 * no way of reporting error returns from
-+				 * ext3_mark_inode_dirty() to userspace.  So
-+				 * ignore it.
-+				 */
-+				ext3_mark_inode_dirty(handle, inode);
- 			}
- 		}
- 		err = ext3_journal_stop(handle);
-@@ -1811,8 +1816,18 @@ ext3_clear_blocks(handle_t *handle, stru
- 		ext3_mark_inode_dirty(handle, inode);
- 		ext3_journal_test_restart(handle, inode);
- 		if (bh) {
-+			int err;
- 			BUFFER_TRACE(bh, "retaking write access");
--			ext3_journal_get_write_access(handle, bh);
-+			err = ext3_journal_get_write_access(handle, bh);
-+			if (err) {
-+				struct super_block *sb = inode->i_sb;
-+				struct ext3_super_block *es = EXT3_SB(sb)->s_es;
-+				printk (KERN_CRIT"EXT3-fs: can't continue truncate\n");
-+				EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS;
-+				es->s_state |= cpu_to_le16(EXT3_ERROR_FS);
-+				ext3_commit_super(sb, es, 1);
-+				return;
-+			}
- 		}
- 	}
- 
diff --git a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch
deleted file mode 100644
index f6904f29b583134dc33ae05a68412e04a514ab7b..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-check-jbd-errors-2.6.9.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-Index: linux-2.6.9-full/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.9-full.orig/include/linux/ext3_fs.h	2006-08-09 17:56:39.000000000 +0400
-+++ linux-2.6.9-full/include/linux/ext3_fs.h	2006-08-22 12:36:22.000000000 +0400
-@@ -826,6 +826,7 @@ extern void ext3_put_super (struct super
- extern void ext3_write_super (struct super_block *);
- extern void ext3_write_super_lockfs (struct super_block *);
- extern void ext3_unlockfs (struct super_block *);
-+extern void ext3_commit_super (struct super_block *, struct ext3_super_block *, int);
- extern int ext3_remount (struct super_block *, int *, char *);
- extern int ext3_statfs (struct super_block *, struct kstatfs *);
- 
-Index: linux-2.6.9-full/fs/ext3/super.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/super.c	2006-08-09 17:56:40.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/super.c	2006-08-09 17:56:40.000000000 +0400
-@@ -43,7 +43,7 @@ static int ext3_load_journal(struct supe
- 			     unsigned long journal_devnum);
- static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
- 			       int);
--static void ext3_commit_super (struct super_block * sb,
-+void ext3_commit_super (struct super_block * sb,
- 			       struct ext3_super_block * es,
- 			       int sync);
- static void ext3_mark_recovery_complete(struct super_block * sb,
-@@ -1991,7 +1991,7 @@ static int ext3_create_journal(struct su
- 	return 0;
- }
- 
--static void ext3_commit_super (struct super_block * sb,
-+void ext3_commit_super (struct super_block * sb,
- 			       struct ext3_super_block * es,
- 			       int sync)
- {
-Index: linux-2.6.9-full/fs/ext3/namei.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/namei.c	2006-08-09 17:56:40.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/namei.c	2006-08-09 17:56:40.000000000 +0400
-@@ -1599,7 +1599,7 @@ static int ext3_delete_entry (handle_t *
- 			      struct buffer_head * bh)
- {
- 	struct ext3_dir_entry_2 * de, * pde;
--	int i;
-+	int i, err;
- 
- 	i = 0;
- 	pde = NULL;
-@@ -1609,7 +1609,9 @@ static int ext3_delete_entry (handle_t *
- 			return -EIO;
- 		if (de == de_del)  {
- 			BUFFER_TRACE(bh, "get_write_access");
--			ext3_journal_get_write_access(handle, bh);
-+			err = ext3_journal_get_write_access(handle, bh);
-+			if (err)
-+				return err;
- 			if (pde)
- 				pde->rec_len =
- 					cpu_to_le16(le16_to_cpu(pde->rec_len) +
-Index: linux-2.6.9-full/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/xattr.c	2006-06-01 14:58:48.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/xattr.c	2006-08-09 17:56:40.000000000 +0400
-@@ -132,7 +132,7 @@ ext3_xattr_handler(int name_index)
- {
- 	struct xattr_handler *handler = NULL;
- 
--	if (name_index > 0 && name_index <= EXT3_XATTR_INDEX_MAX)
-+	if (name_index > 0 && name_index < EXT3_XATTR_INDEX_MAX)
- 		handler = ext3_xattr_handler_map[name_index];
- 	return handler;
- }
-Index: linux-2.6.9-full/fs/ext3/inode.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/inode.c	2006-06-02 23:37:38.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/inode.c	2006-08-22 12:34:28.000000000 +0400
-@@ -1513,9 +1513,14 @@ out_stop:
- 			if (end > inode->i_size) {
- 				ei->i_disksize = end;
- 				i_size_write(inode, end);
--				err = ext3_mark_inode_dirty(handle, inode);
--				if (!ret) 
--					ret = err;
-+				/*
-+				 * We're going to return a positive `ret'
-+				 * here due to non-zero-length I/O, so there's
-+				 * no way of reporting error returns from
-+				 * ext3_mark_inode_dirty() to userspace.  So
-+				 * ignore it.
-+				 */
-+				ext3_mark_inode_dirty(handle, inode);
- 			}
- 		}
- 		err = ext3_journal_stop(handle);
-@@ -1807,8 +1812,18 @@ ext3_clear_blocks(handle_t *handle, stru
- 		ext3_mark_inode_dirty(handle, inode);
- 		ext3_journal_test_restart(handle, inode);
- 		if (bh) {
-+			int err;
- 			BUFFER_TRACE(bh, "retaking write access");
--			ext3_journal_get_write_access(handle, bh);
-+			err = ext3_journal_get_write_access(handle, bh);
-+			if (err) {
-+				struct super_block *sb = inode->i_sb;
-+				struct ext3_super_block *es = EXT3_SB(sb)->s_es;
-+				printk (KERN_CRIT"EXT3-fs: can't continue truncate\n");
-+				EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS;
-+				es->s_state |= cpu_to_le16(EXT3_ERROR_FS);
-+				ext3_commit_super(sb, es, 1);
-+				return;
-+			}
- 		}
- 	}
- 
diff --git a/ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch
deleted file mode 100644
index 9b8d33152ebbed9a23dbd66e6ec32a221bbdeb72..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-disable-write-bar-by-default-2.6-sles10.patch
+++ /dev/null
@@ -1,15 +0,0 @@
----
- fs/ext3/super.c |    2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- linux-2.6.16.21-0.8.orig/fs/ext3/super.c
-+++ linux-2.6.16.21-0.8/fs/ext3/super.c
-@@ -1425,7 +1425,7 @@ static int ext3_fill_super (struct super
- 	sbi->s_resgid = le16_to_cpu(es->s_def_resgid);
- 
- 	/* enable barriers by default */
--	set_opt(sbi->s_mount_opt, BARRIER);
-+	/* set_opt(sbi->s_mount_opt, BARRIER); */
- 	set_opt(sbi->s_mount_opt, RESERVATION);
- 
- 	if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum,
diff --git a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch
deleted file mode 100644
index 89cc1b5d4bf0b3d5a5cd6364ac33c45ea6362825..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-rhel4.patch
+++ /dev/null
@@ -1,840 +0,0 @@
-Index: linux-stage/fs/ext3/ialloc.c
-===================================================================
---- linux-stage.orig/fs/ext3/ialloc.c	2005-10-04 16:53:24.000000000 -0600
-+++ linux-stage/fs/ext3/ialloc.c	2005-10-04 17:07:25.000000000 -0600
-@@ -629,6 +629,9 @@
- 	spin_unlock(&sbi->s_next_gen_lock);
- 
- 	ei->i_state = EXT3_STATE_NEW;
-+	ei->i_extra_isize =
-+		(EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
-+		sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
- 
- 	ret = inode;
- 	if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c	2005-10-04 17:00:22.000000000 -0600
-+++ linux-stage/fs/ext3/inode.c	2005-10-04 17:07:25.000000000 -0600
-@@ -2274,7 +2274,7 @@
-  * trying to determine the inode's location on-disk and no read need be
-  * performed.
-  */
--static int ext3_get_inode_loc(struct inode *inode,
-+int ext3_get_inode_loc(struct inode *inode,
- 				struct ext3_iloc *iloc, int in_mem)
- {
- 	unsigned long block;
-@@ -2484,6 +2484,11 @@ void ext3_read_inode(struct inode * inod
- 		ei->i_data[block] = raw_inode->i_block[block];
- 	INIT_LIST_HEAD(&ei->i_orphan);
- 
-+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
-+		ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
-+	else
-+		ei->i_extra_isize = 0;
-+
- 	if (S_ISREG(inode->i_mode)) {
- 		inode->i_op = &ext3_file_inode_operations;
- 		inode->i_fop = &ext3_file_operations;
-@@ -2619,6 +2624,9 @@ static int ext3_do_update_inode(handle_t
- 	} else for (block = 0; block < EXT3_N_BLOCKS; block++)
- 		raw_inode->i_block[block] = ei->i_data[block];
- 
-+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
-+		raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
-+
- 	BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
- 	rc = ext3_journal_dirty_metadata(handle, bh);
- 	if (!err)
-@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
- {
- 	int err = 0;
- 	if (handle) {
--		err = ext3_get_inode_loc(inode, iloc, 1);
-+		err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
-+							EXT3_STATE_NEW);
- 		if (!err) {
- 			BUFFER_TRACE(iloc->bh, "get_write_access");
- 			err = ext3_journal_get_write_access(handle, iloc->bh);
-Index: linux-stage/fs/ext3/xattr.c
-===================================================================
---- linux-stage.orig/fs/ext3/xattr.c	2005-10-04 16:50:11.000000000 -0600
-+++ linux-stage/fs/ext3/xattr.c	2005-10-04 17:19:43.000000000 -0600
-@@ -149,17 +149,12 @@
- }
- 
- /*
-- * ext3_xattr_get()
-- *
-- * Copy an extended attribute into the buffer
-- * provided, or compute the buffer size required.
-- * Buffer is NULL to compute the size of the buffer required.
-+ * ext3_xattr_block_get()
-  *
-- * Returns a negative error number on failure, or the number of bytes
-- * used / required on success.
-+ * routine looks for attribute in EA block and returns it's value and size
-  */
- int
--ext3_xattr_get(struct inode *inode, int name_index, const char *name,
-+ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
- 	       void *buffer, size_t buffer_size)
- {
- 	struct buffer_head *bh = NULL;
-@@ -173,7 +168,6 @@
- 
- 	if (name == NULL)
- 		return -EINVAL;
--	down_read(&EXT3_I(inode)->xattr_sem);
- 	error = -ENODATA;
- 	if (!EXT3_I(inode)->i_file_acl)
- 		goto cleanup;
-@@ -246,15 +240,87 @@
- 
- cleanup:
- 	brelse(bh);
--	up_read(&EXT3_I(inode)->xattr_sem);
- 
- 	return error;
- }
- 
- /*
-- * ext3_xattr_list()
-+ * ext3_xattr_ibody_get()
-  *
-- * Copy a list of attribute names into the buffer
-+ * routine looks for attribute in inode body and returns it's value and size
-+ */
-+int
-+ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
-+	       void *buffer, size_t buffer_size)
-+{
-+	int size, name_len = strlen(name), storage_size;
-+	struct ext3_xattr_entry *last;
-+	struct ext3_inode *raw_inode;
-+	struct ext3_iloc iloc;
-+	char *start, *end;
-+	int ret = -ENOENT;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return -ENOENT;
-+
-+	ret = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (ret)
-+		return ret;
-+	raw_inode = ext3_raw_inode(&iloc);
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
-+		brelse(iloc.bh);
-+		return -ENOENT;
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_get",
-+				"inode %ld", inode->i_ino);
-+			brelse(iloc.bh);
-+			return -EIO;
-+		}
-+		if (name_index == last->e_name_index &&
-+		    name_len == last->e_name_len &&
-+		    !memcmp(name, last->e_name, name_len))
-+			goto found;
-+		last = next;
-+	}
-+
-+	/* can't find EA */
-+	brelse(iloc.bh);
-+	return -ENOENT;
-+	
-+found:
-+	size = le32_to_cpu(last->e_value_size);
-+	if (buffer) {
-+		ret = -ERANGE;
-+		if (buffer_size >= size) {
-+			memcpy(buffer, start + le16_to_cpu(last->e_value_offs),
-+				size);
-+			ret = size;
-+		}
-+	} else
-+		ret = size;
-+	brelse(iloc.bh);
-+	return ret;
-+}
-+
-+/*
-+ * ext3_xattr_get()
-+ *
-+ * Copy an extended attribute into the buffer
-  * provided, or compute the buffer size required.
-  * Buffer is NULL to compute the size of the buffer required.
-  *
-@@ -262,7 +328,31 @@
-  * used / required on success.
-  */
- int
--ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
-+ext3_xattr_get(struct inode *inode, int name_index, const char *name,
-+	       void *buffer, size_t buffer_size)
-+{
-+	int err;
-+
-+	down_read(&EXT3_I(inode)->xattr_sem);
-+
-+	/* try to find attribute in inode body */
-+	err = ext3_xattr_ibody_get(inode, name_index, name,
-+					buffer, buffer_size);
-+	if (err < 0)
-+		/* search was unsuccessful, try to find EA in dedicated block */
-+		err = ext3_xattr_block_get(inode, name_index, name,
-+				buffer, buffer_size);
-+	up_read(&EXT3_I(inode)->xattr_sem);
-+
-+	return err;
-+}
-+
-+/* ext3_xattr_ibody_list()
-+ *
-+ * generate list of attributes stored in EA block
-+ */
-+int
-+ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
- {
- 	struct buffer_head *bh = NULL;
- 	struct ext3_xattr_entry *entry;
-@@ -273,7 +363,6 @@
- 	ea_idebug(inode, "buffer=%p, buffer_size=%ld",
- 		  buffer, (long)buffer_size);
- 
--	down_read(&EXT3_I(inode)->xattr_sem);
- 	error = 0;
- 	if (!EXT3_I(inode)->i_file_acl)
- 		goto cleanup;
-@@ -330,11 +419,149 @@
- 
- cleanup:
- 	brelse(bh);
--	up_read(&EXT3_I(inode)->xattr_sem);
- 
- 	return error;
- }
- 
-+/* ext3_xattr_ibody_list()
-+ *
-+ * generate list of attributes stored in inode body
-+ */
-+int
-+ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size)
-+{
-+	struct ext3_xattr_entry *last;
-+	struct ext3_inode *raw_inode;
-+	char *start, *end, *buf;
-+	struct ext3_iloc iloc;
-+	int storage_size;
-+	size_t rest = buffer_size;
-+	int ret;
-+	int size = 0;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return 0;
-+
-+	ret = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (ret)
-+		return ret;
-+	raw_inode = ext3_raw_inode(&iloc);
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
-+		brelse(iloc.bh);
-+		return 0;
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		struct xattr_handler *handler;
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_list",
-+				"inode %ld", inode->i_ino);
-+			brelse(iloc.bh);
-+			return -EIO;
-+		}
-+		handler = ext3_xattr_handler(last->e_name_index);
-+		if (handler)
-+			size += handler->list(inode, NULL, 0, last->e_name,
-+					      last->e_name_len);
-+		last = next;
-+	}
-+
-+	if (!buffer) {
-+		ret = size;
-+		goto cleanup;
-+	} else {
-+		ret = -ERANGE;
-+		if (size > buffer_size)
-+			goto cleanup;
-+	}
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	buf = buffer;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		struct xattr_handler *handler;
-+		handler = ext3_xattr_handler(last->e_name_index);
-+		if (handler) {
-+			size_t size = handler->list(inode, buffer, rest,
-+						    last->e_name,
-+						    last->e_name_len);
-+			if (buffer) {
-+				if (size > rest) {
-+					ret = -ERANGE;
-+					goto cleanup;
-+				}
-+				buffer += size;
-+			}
-+			rest -= size;
-+		}
-+		last = next;
-+	}
-+	ret = size;
-+cleanup:
-+	brelse(iloc.bh);
-+	return ret;
-+}
-+
-+/*
-+ * ext3_xattr_list()
-+ *
-+ * Copy a list of attribute names into the buffer
-+ * provided, or compute the buffer size required.
-+ * Buffer is NULL to compute the size of the buffer required.
-+ *
-+ * Returns a negative error number on failure, or the number of bytes
-+ * used / required on success.
-+ */
-+int
-+ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
-+{
-+	int error;
-+	int size = buffer_size;
-+
-+	down_read(&EXT3_I(inode)->xattr_sem);
-+
-+	/* get list of attributes stored in inode body */
-+	error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
-+	if (error < 0) {
-+		/* some error occured while collecting
-+		 * attributes in inode body */
-+		size = 0;
-+		goto cleanup;
-+	}
-+	size = error;
-+
-+	/* get list of attributes stored in dedicated block */
-+	if (buffer) {
-+		buffer_size -= error;
-+		if (buffer_size <= 0) {
-+			buffer = NULL;
-+			buffer_size = 0;
-+		} else
-+			buffer += error;
-+	}
-+
-+	error = ext3_xattr_block_list(inode, buffer, buffer_size);
-+	if (error < 0)
-+		/* listing was successful, so we return len */
-+		size = 0;
-+
-+cleanup:
-+	up_read(&EXT3_I(inode)->xattr_sem);
-+	return error + size;
-+}
-+
- /*
-  * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
-  * not set, set it.
-@@ -356,6 +583,279 @@
- }
- 
- /*
-+ * ext3_xattr_ibody_find()
-+ *
-+ * search attribute and calculate free space in inode body
-+ * NOTE: free space includes space our attribute hold
-+ */
-+int
-+ext3_xattr_ibody_find(struct inode *inode, int name_index,
-+		const char *name, struct ext3_xattr_entry *rentry, int *free)
-+{
-+	struct ext3_xattr_entry *last;
-+	struct ext3_inode *raw_inode;
-+	int name_len = strlen(name);
-+	int err, storage_size;
-+	struct ext3_iloc iloc;
-+	char *start, *end;
-+	int ret = -ENOENT;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return ret;
-+
-+	err = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (err)
-+		return -EIO;
-+	raw_inode = ext3_raw_inode(&iloc);
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	*free = storage_size - sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
-+		brelse(iloc.bh);
-+		return -ENOENT;
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_find",
-+				"inode %ld", inode->i_ino);
-+			brelse(iloc.bh);
-+			return -EIO;
-+		}
-+
-+		if (name_index == last->e_name_index &&
-+		    name_len == last->e_name_len &&
-+		    !memcmp(name, last->e_name, name_len)) {
-+			memcpy(rentry, last, sizeof(struct ext3_xattr_entry));
-+			ret = 0;
-+		} else {
-+			*free -= EXT3_XATTR_LEN(last->e_name_len);
-+			*free -= le32_to_cpu(last->e_value_size);
-+		}
-+		last = next;
-+	}
-+	
-+	brelse(iloc.bh);
-+	return ret;
-+}
-+
-+/*
-+ * ext3_xattr_block_find()
-+ *
-+ * search attribute and calculate free space in EA block (if it allocated)
-+ * NOTE: free space includes space our attribute hold
-+ */
-+int
-+ext3_xattr_block_find(struct inode *inode, int name_index, const char *name,
-+	       struct ext3_xattr_entry *rentry, int *free)
-+{
-+	struct buffer_head *bh = NULL;
-+	struct ext3_xattr_entry *entry;
-+	char *end;
-+	int name_len, error = -ENOENT;
-+
-+	if (!EXT3_I(inode)->i_file_acl) {
-+		*free = inode->i_sb->s_blocksize -
-+			sizeof(struct ext3_xattr_header) -
-+			sizeof(__u32);
-+		return -ENOENT;
-+	}
-+	ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl);
-+	bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl);
-+	if (!bh)
-+		return -EIO;
-+	ea_bdebug(bh, "b_count=%d, refcount=%d",
-+		atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
-+	end = bh->b_data + bh->b_size;
-+	if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
-+	    HDR(bh)->h_blocks != cpu_to_le32(1)) {
-+bad_block:	ext3_error(inode->i_sb, "ext3_xattr_get",
-+			"inode %ld: bad block %d", inode->i_ino,
-+			EXT3_I(inode)->i_file_acl);
-+		brelse(bh);
-+		return -EIO;
-+	}
-+	/* find named attribute */
-+	name_len = strlen(name);
-+	*free = bh->b_size - sizeof(__u32);
-+
-+	entry = FIRST_ENTRY(bh);
-+	while (!IS_LAST_ENTRY(entry)) {
-+		struct ext3_xattr_entry *next =
-+			EXT3_XATTR_NEXT(entry);
-+		if ((char *)next >= end)
-+			goto bad_block;
-+		if (name_index == entry->e_name_index &&
-+		    name_len == entry->e_name_len &&
-+		    memcmp(name, entry->e_name, name_len) == 0) {
-+			memcpy(rentry, entry, sizeof(struct ext3_xattr_entry));
-+			error = 0;
-+		} else {
-+			*free -= EXT3_XATTR_LEN(entry->e_name_len);
-+			*free -= le32_to_cpu(entry->e_value_size);
-+		}
-+		entry = next;
-+	}
-+	brelse(bh);
-+
-+	return error;
-+}
-+
-+/*
-+ * ext3_xattr_inode_set()
-+ *
-+ * this routine add/remove/replace attribute in inode body
-+ */
-+int
-+ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index,
-+		      const char *name, const void *value, size_t value_len,
-+		      int flags)
-+{
-+	struct ext3_xattr_entry *last, *next, *here = NULL;
-+	struct ext3_inode *raw_inode;
-+	int name_len = strlen(name);
-+	int esize = EXT3_XATTR_LEN(name_len);
-+	struct buffer_head *bh;
-+	int err, storage_size;
-+	struct ext3_iloc iloc;
-+	int free, min_offs;
-+	char *start, *end;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return -ENOSPC;
-+
-+	err = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (err)
-+		return err;
-+	raw_inode = ext3_raw_inode(&iloc);
-+	bh = iloc.bh;
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if ((*(__u32*) start) != EXT3_XATTR_MAGIC) {
-+		/* inode had no attributes before */
-+		*((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC);
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+	min_offs = storage_size;
-+	free = storage_size - sizeof(__u32);
-+
-+	last = (struct ext3_xattr_entry *) start;	
-+	while (!IS_LAST_ENTRY(last)) {
-+		next = EXT3_XATTR_NEXT(last);
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_set",
-+				"inode %ld", inode->i_ino);
-+			brelse(bh);
-+			return -EIO;
-+		}
-+		
-+		if (last->e_value_size) {
-+			int offs = le16_to_cpu(last->e_value_offs);
-+			if (offs < min_offs)
-+				min_offs = offs;
-+		}
-+		if (name_index == last->e_name_index &&
-+			name_len == last->e_name_len &&
-+			!memcmp(name, last->e_name, name_len))
-+			here = last;
-+		else {
-+			/* we calculate all but our attribute
-+			 * because it will be removed before changing */
-+			free -= EXT3_XATTR_LEN(last->e_name_len);
-+			free -= le32_to_cpu(last->e_value_size);
-+		}
-+		last = next;
-+	}
-+
-+	if (value && (esize + value_len > free)) {
-+		brelse(bh);
-+		return -ENOSPC;
-+	}
-+	
-+	err = ext3_reserve_inode_write(handle, inode, &iloc);
-+	if (err) {
-+		brelse(bh);	
-+		return err;
-+	}
-+
-+	if (here) {
-+		/* time to remove old value */
-+		struct ext3_xattr_entry *e;
-+		int size = le32_to_cpu(here->e_value_size);
-+		int border = le16_to_cpu(here->e_value_offs);
-+		char *src;
-+
-+		/* move tail */
-+		memmove(start + min_offs + size, start + min_offs,
-+				border - min_offs);
-+
-+		/* recalculate offsets */
-+		e = (struct ext3_xattr_entry *) start;
-+		while (!IS_LAST_ENTRY(e)) {
-+			struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
-+			int offs = le16_to_cpu(e->e_value_offs);
-+			if (offs < border)
-+				e->e_value_offs =
-+					cpu_to_le16(offs + size);
-+			e = next;
-+		}
-+		min_offs += size;
-+
-+		/* remove entry */
-+		border = EXT3_XATTR_LEN(here->e_name_len);
-+		src = (char *) here + EXT3_XATTR_LEN(here->e_name_len);
-+		size = (char *) last - src;
-+		if ((char *) here + size > end)
-+			printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n",
-+					__FILE__, __LINE__, here, size, end);
-+		memmove(here, src, size);
-+		last = (struct ext3_xattr_entry *) ((char *) last - border);
-+		*((__u32 *) last) = 0;
-+	}
-+	
-+	if (value) {
-+		int offs = min_offs - value_len;
-+		/* use last to create new entry */
-+		last->e_name_len = strlen(name);
-+		last->e_name_index = name_index;
-+		last->e_value_offs = cpu_to_le16(offs);
-+		last->e_value_size = cpu_to_le32(value_len);
-+		last->e_hash = last->e_value_block = 0;
-+		memset(last->e_name, 0, esize);
-+		memcpy(last->e_name, name, last->e_name_len);
-+		if (start + offs + value_len > end)
-+			printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",
-+			       __FILE__, __LINE__, start, offs,
-+			       value_len, end);
-+		memcpy(start + offs, value, value_len);
-+		last = EXT3_XATTR_NEXT(last);
-+		*((__u32 *) last) = 0;
-+	}
-+	
-+	ext3_mark_iloc_dirty(handle, inode, &iloc);
-+	brelse(bh);
-+
-+	return 0;
-+}
-+
-+/*
-  * ext3_xattr_set_handle()
-  *
-  * Create, replace or remove an extended attribute for this inode. Buffer
-@@ -369,6 +869,104 @@
-  */
- int
- ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
-+		const char *name, const void *value, size_t value_len,
-+		int flags)
-+{
-+	struct ext3_xattr_entry entry;
-+	int err, where = 0, found = 0, total;
-+	int free1 = -1, free2 = -1;
-+	int name_len;
-+	
-+	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
-+		  name_index, name, value, (long)value_len);
-+
-+	if (IS_RDONLY(inode))
-+		return -EROFS;
-+	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-+		return -EPERM;
-+	if (value == NULL)
-+		value_len = 0;
-+	if (name == NULL)
-+		return -EINVAL;
-+	name_len = strlen(name);
-+	if (name_len > 255 || value_len > inode->i_sb->s_blocksize)
-+		return -ERANGE;
-+	down_write(&EXT3_I(inode)->xattr_sem);
-+
-+	/* try to find attribute in inode body */
-+	err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1);
-+	if (err == 0) {
-+		/* found EA in inode */
-+		found = 1;
-+		where = 0;
-+	} else if (err == -ENOENT) {
-+		/* there is no such attribute in inode body */
-+		/* try to find attribute in dedicated block */
-+		err = ext3_xattr_block_find(inode, name_index, name,
-+						&entry, &free2);
-+		if (err != 0 && err != -ENOENT) {
-+			/* not found EA in block */
-+			goto finish;	
-+		} else if (err == 0) {
-+			/* found EA in block */
-+			where = 1;
-+			found = 1;
-+		}
-+	} else
-+		goto finish;
-+
-+	/* check flags: may replace? may create ? */
-+	if (found && (flags & XATTR_CREATE)) {
-+		err = -EEXIST;
-+		goto finish;
-+	} else if (!found && (flags & XATTR_REPLACE)) {
-+		err = -ENODATA;
-+		goto finish;
-+	}
-+
-+	/* check if we have enough space to store attribute */
-+	total = EXT3_XATTR_LEN(strlen(name)) + value_len;
-+	if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) {
-+		/* have no enough space */
-+		err = -ENOSPC;
-+		goto finish;
-+	}
-+	
-+	/* time to remove attribute */
-+	if (found) {
-+		if (where == 0) {
-+			/* EA is stored in inode body */
-+			ext3_xattr_ibody_set(handle, inode, name_index, name,
-+					NULL, 0, flags);
-+		} else {
-+			/* EA is stored in separated block */
-+			ext3_xattr_block_set(handle, inode, name_index, name,
-+					NULL, 0, flags);
-+		}
-+	}
-+
-+	/* try to store EA in inode body */
-+	err = ext3_xattr_ibody_set(handle, inode, name_index, name,
-+				value, value_len, flags);
-+	if (err) {
-+		/* can't store EA in inode body */
-+		/* try to store in block */
-+		err = ext3_xattr_block_set(handle, inode, name_index,
-+					name, value, value_len, flags);	
-+	}
-+
-+finish:	
-+	up_write(&EXT3_I(inode)->xattr_sem);
-+	return err;
-+}
-+
-+/*
-+ * ext3_xattr_block_set()
-+ *
-+ * this routine add/remove/replace attribute in EA block
-+ */
-+int
-+ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index,
- 		      const char *name, const void *value, size_t value_len,
- 		      int flags)
- {
-@@ -391,22 +989,7 @@
- 	 *             towards the end of the block).
- 	 * end -- Points right after the block pointed to by header.
- 	 */
--
--	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
--		  name_index, name, value, (long)value_len);
--
--	if (IS_RDONLY(inode))
--		return -EROFS;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		return -EPERM;
--	if (value == NULL)
--		value_len = 0;
--	if (name == NULL)
--		return -EINVAL;
- 	name_len = strlen(name);
--	if (name_len > 255 || value_len > sb->s_blocksize)
--		return -ERANGE;
--	down_write(&EXT3_I(inode)->xattr_sem);
- 	if (EXT3_I(inode)->i_file_acl) {
- 		/* The inode already has an extended attribute block. */
- 		bh = sb_bread(sb, EXT3_I(inode)->i_file_acl);
-@@ -638,7 +1221,6 @@
- 	brelse(bh);
- 	if (!(bh && header == HDR(bh)))
- 		kfree(header);
--	up_write(&EXT3_I(inode)->xattr_sem);
- 
- 	return error;
- }
-Index: linux-stage/fs/ext3/xattr.h
-===================================================================
---- linux-stage.orig/fs/ext3/xattr.h	2005-10-04 16:50:11.000000000 -0600
-+++ linux-stage/fs/ext3/xattr.h	2005-10-04 17:07:25.000000000 -0600
-@@ -67,7 +67,8 @@
- extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
- extern int ext3_xattr_list(struct inode *, char *, size_t);
- extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
--extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
-+extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
-+extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
- 
- extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
- extern void ext3_xattr_put_super(struct super_block *);
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2005-10-04 16:53:29.000000000 -0600
-+++ linux-stage/include/linux/ext3_fs.h	2005-10-04 17:07:25.000000000 -0600
-@@ -293,6 +293,8 @@
- 			__u32	m_i_reserved2[2];
- 		} masix2;
- 	} osd2;				/* OS dependent 2 */
-+	__u16	i_extra_isize;
-+	__u16	i_pad1;
- };
- 
- #define i_size_high	i_dir_acl
-@@ -757,6 +759,7 @@
- extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-+int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem);
- 
- extern void ext3_read_inode (struct inode *);
- extern int  ext3_write_inode (struct inode *, int);
-Index: linux-stage/include/linux/ext3_fs_i.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs_i.h	2005-10-04 16:50:11.000000000 -0600
-+++ linux-stage/include/linux/ext3_fs_i.h	2005-10-04 17:07:25.000000000 -0600
-@@ -113,6 +113,9 @@
- 	 */
- 	loff_t	i_disksize;
- 
-+	/* on-disk additional length */
-+	__u16 i_extra_isize;
-+
- 	/*
- 	 * truncate_sem is for serialising ext3_truncate() against
- 	 * ext3_getblock().  In the 2.4 ext2 design, great chunks of inode's
diff --git a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch
deleted file mode 100644
index 72c25a4def3e5e01a3bb60a932a7665890627d9b..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-ea-in-inode-2.6-suse.patch
+++ /dev/null
@@ -1,840 +0,0 @@
-%patch
-Index: linux-2.6.0/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.0.orig/fs/ext3/ialloc.c	2004-01-14 18:54:11.000000000 +0300
-+++ linux-2.6.0/fs/ext3/ialloc.c	2004-01-14 18:54:12.000000000 +0300
-@@ -627,6 +627,9 @@
- 	inode->i_generation = EXT3_SB(sb)->s_next_generation++;
- 
- 	ei->i_state = EXT3_STATE_NEW;
-+	ei->i_extra_isize =
-+		(EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
-+		sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
- 
- 	ret = inode;
- 	if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-2.6.0/fs/ext3/inode.c
-===================================================================
---- linux-2.6.0.orig/fs/ext3/inode.c	2004-01-14 18:54:12.000000000 +0300
-+++ linux-2.6.0/fs/ext3/inode.c	2004-01-14 19:09:46.000000000 +0300
-@@ -2339,7 +2339,7 @@
-  * trying to determine the inode's location on-disk and no read need be
-  * performed.
-  */
--static int ext3_get_inode_loc(struct inode *inode,
-+int ext3_get_inode_loc(struct inode *inode,
- 				struct ext3_iloc *iloc, int in_mem)
- {
- 	unsigned long block;
-@@ -2547,6 +2547,11 @@
- 		ei->i_data[block] = raw_inode->i_block[block];
- 	INIT_LIST_HEAD(&ei->i_orphan);
- 
-+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
-+		ei->i_extra_isize = le16_to_cpu(raw_inode->i_extra_isize);
-+	else
-+		ei->i_extra_isize = 0;
-+
- 	if (S_ISREG(inode->i_mode)) {
- 		inode->i_op = &ext3_file_inode_operations;
- 		inode->i_fop = &ext3_file_operations;
-@@ -2682,6 +2687,9 @@
- 	} else for (block = 0; block < EXT3_N_BLOCKS; block++)
- 		raw_inode->i_block[block] = ei->i_data[block];
- 
-+	if (EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE)
-+		raw_inode->i_extra_isize = cpu_to_le16(ei->i_extra_isize);
-+
- 	BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
- 	rc = ext3_journal_dirty_metadata(handle, bh);
- 	if (!err)
-@@ -2849,7 +2857,8 @@ ext3_reserve_inode_write(handle_t *handl
- {
- 	int err = 0;
- 	if (handle) {
--		err = ext3_get_inode_loc(inode, iloc, 1);
-+		err = ext3_get_inode_loc(inode, iloc, EXT3_I(inode)->i_state &
-+							EXT3_STATE_NEW);
- 		if (!err) {
- 			BUFFER_TRACE(iloc->bh, "get_write_access");
- 			err = ext3_journal_get_write_access(handle, iloc->bh);
-Index: linux-2.6.0/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.0.orig/fs/ext3/xattr.c	2003-12-30 08:33:13.000000000 +0300
-+++ linux-2.6.0/fs/ext3/xattr.c	2004-01-14 18:54:12.000000000 +0300
-@@ -246,17 +246,12 @@
- }
- 
- /*
-- * ext3_xattr_get()
-- *
-- * Copy an extended attribute into the buffer
-- * provided, or compute the buffer size required.
-- * Buffer is NULL to compute the size of the buffer required.
-+ * ext3_xattr_block_get()
-  *
-- * Returns a negative error number on failure, or the number of bytes
-- * used / required on success.
-+ * routine looks for attribute in EA block and returns it's value and size
-  */
- int
--ext3_xattr_get(struct inode *inode, int name_index, const char *name,
-+ext3_xattr_block_get(struct inode *inode, int name_index, const char *name,
- 	       void *buffer, size_t buffer_size)
- {
- 	struct buffer_head *bh = NULL;
-@@ -270,7 +265,6 @@
- 
- 	if (name == NULL)
- 		return -EINVAL;
--	down_read(&EXT3_I(inode)->xattr_sem);
- 	error = -ENODATA;
- 	if (!EXT3_I(inode)->i_file_acl)
- 		goto cleanup;
-@@ -343,15 +337,87 @@
- 
- cleanup:
- 	brelse(bh);
--	up_read(&EXT3_I(inode)->xattr_sem);
- 
- 	return error;
- }
- 
- /*
-- * ext3_xattr_list()
-+ * ext3_xattr_ibody_get()
-  *
-- * Copy a list of attribute names into the buffer
-+ * routine looks for attribute in inode body and returns it's value and size
-+ */
-+int
-+ext3_xattr_ibody_get(struct inode *inode, int name_index, const char *name,
-+	       void *buffer, size_t buffer_size)
-+{
-+	int size, name_len = strlen(name), storage_size;
-+	struct ext3_xattr_entry *last;
-+	struct ext3_inode *raw_inode;
-+	struct ext3_iloc iloc;
-+	char *start, *end;
-+	int ret = -ENOENT;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return -ENOENT;
-+
-+	ret = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (ret)
-+		return ret;
-+	raw_inode = ext3_raw_inode(&iloc);
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
-+		brelse(iloc.bh);
-+		return -ENOENT;
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_get",
-+				"inode %ld", inode->i_ino);
-+			brelse(iloc.bh);
-+			return -EIO;
-+		}
-+		if (name_index == last->e_name_index &&
-+		    name_len == last->e_name_len &&
-+		    !memcmp(name, last->e_name, name_len))
-+			goto found;
-+		last = next;
-+	}
-+
-+	/* can't find EA */
-+	brelse(iloc.bh);
-+	return -ENOENT;
-+	
-+found:
-+	size = le32_to_cpu(last->e_value_size);
-+	if (buffer) {
-+		ret = -ERANGE;
-+		if (buffer_size >= size) {
-+			memcpy(buffer, start + le16_to_cpu(last->e_value_offs),
-+				size);
-+			ret = size;
-+		}
-+	} else
-+		ret = size;
-+	brelse(iloc.bh);
-+	return ret;
-+}
-+
-+/*
-+ * ext3_xattr_get()
-+ *
-+ * Copy an extended attribute into the buffer
-  * provided, or compute the buffer size required.
-  * Buffer is NULL to compute the size of the buffer required.
-  *
-@@ -359,7 +425,31 @@
-  * used / required on success.
-  */
- int
--ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
-+ext3_xattr_get(struct inode *inode, int name_index, const char *name,
-+	       void *buffer, size_t buffer_size)
-+{
-+	int err;
-+
-+	down_read(&EXT3_I(inode)->xattr_sem);
-+
-+	/* try to find attribute in inode body */
-+	err = ext3_xattr_ibody_get(inode, name_index, name,
-+					buffer, buffer_size);
-+	if (err < 0)
-+		/* search was unsuccessful, try to find EA in dedicated block */
-+		err = ext3_xattr_block_get(inode, name_index, name,
-+				buffer, buffer_size);
-+	up_read(&EXT3_I(inode)->xattr_sem);
-+
-+	return err;
-+}
-+
-+/* ext3_xattr_ibody_list()
-+ *
-+ * generate list of attributes stored in EA block
-+ */
-+int
-+ext3_xattr_block_list(struct inode *inode, char *buffer, size_t buffer_size)
- {
- 	struct buffer_head *bh = NULL;
- 	struct ext3_xattr_entry *entry;
-@@ -370,7 +460,6 @@
- 	ea_idebug(inode, "buffer=%p, buffer_size=%ld",
- 		  buffer, (long)buffer_size);
- 
--	down_read(&EXT3_I(inode)->xattr_sem);
- 	error = 0;
- 	if (!EXT3_I(inode)->i_file_acl)
- 		goto cleanup;
-@@ -431,11 +520,138 @@
- 
- cleanup:
- 	brelse(bh);
--	up_read(&EXT3_I(inode)->xattr_sem);
- 
- 	return error;
- }
- 
-+/* ext3_xattr_ibody_list()
-+ *
-+ * generate list of attributes stored in inode body
-+ */
-+int
-+ext3_xattr_ibody_list(struct inode *inode, char *buffer, size_t buffer_size)
-+{
-+	struct ext3_xattr_entry *last;
-+	struct ext3_inode *raw_inode;
-+	char *start, *end, *buf;
-+	struct ext3_iloc iloc;
-+	int storage_size;
-+	int ret;
-+	int size = 0;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return 0;
-+
-+	ret = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (ret)
-+		return ret;
-+	raw_inode = ext3_raw_inode(&iloc);
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
-+		brelse(iloc.bh);
-+		return 0;
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		struct ext3_xattr_handler *handler;
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_list",
-+				"inode %ld", inode->i_ino);
-+			brelse(iloc.bh);
-+			return -EIO;
-+		}
-+		handler = ext3_xattr_handler(last->e_name_index);
-+		if (handler)
-+			size += handler->list(NULL, inode, last->e_name,
-+					      last->e_name_len);
-+		last = next;
-+	}
-+
-+	if (!buffer) {
-+		ret = size;
-+		goto cleanup;
-+	} else {
-+		ret = -ERANGE;
-+		if (size > buffer_size)
-+			goto cleanup;
-+	}
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	buf = buffer;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		struct ext3_xattr_handler *handler;
-+		handler = ext3_xattr_handler(last->e_name_index);
-+		if (handler)
-+			buf += handler->list(buf, inode, last->e_name,
-+					      last->e_name_len);
-+		last = next;
-+	}
-+	ret = size;
-+cleanup:
-+	brelse(iloc.bh);
-+	return ret;
-+}
-+
-+/*
-+ * ext3_xattr_list()
-+ *
-+ * Copy a list of attribute names into the buffer
-+ * provided, or compute the buffer size required.
-+ * Buffer is NULL to compute the size of the buffer required.
-+ *
-+ * Returns a negative error number on failure, or the number of bytes
-+ * used / required on success.
-+ */
-+int
-+ext3_xattr_list(struct inode *inode, char *buffer, size_t buffer_size)
-+{
-+	int error;
-+	int size = buffer_size;
-+
-+	down_read(&EXT3_I(inode)->xattr_sem);
-+
-+	/* get list of attributes stored in inode body */
-+	error = ext3_xattr_ibody_list(inode, buffer, buffer_size);
-+	if (error < 0) {
-+		/* some error occured while collecting
-+		 * attributes in inode body */
-+		size = 0;
-+		goto cleanup;
-+	}
-+	size = error;
-+
-+	/* get list of attributes stored in dedicated block */
-+	if (buffer) {
-+		buffer_size -= error;
-+		if (buffer_size <= 0) {
-+			buffer = NULL;
-+			buffer_size = 0;
-+		} else
-+			buffer += error;
-+	}
-+
-+	error = ext3_xattr_block_list(inode, buffer, buffer_size);
-+	if (error < 0)
-+		/* listing was successful, so we return len */
-+		size = 0;
-+
-+cleanup:
-+	up_read(&EXT3_I(inode)->xattr_sem);
-+	return error + size;
-+}
-+
- /*
-  * If the EXT3_FEATURE_COMPAT_EXT_ATTR feature of this file system is
-  * not set, set it.
-@@ -457,6 +673,279 @@
- }
- 
- /*
-+ * ext3_xattr_ibody_find()
-+ *
-+ * search attribute and calculate free space in inode body
-+ * NOTE: free space includes space our attribute hold
-+ */
-+int
-+ext3_xattr_ibody_find(struct inode *inode, int name_index,
-+		const char *name, struct ext3_xattr_entry *rentry, int *free)
-+{
-+	struct ext3_xattr_entry *last;
-+	struct ext3_inode *raw_inode;
-+	int name_len = strlen(name);
-+	int err, storage_size;
-+	struct ext3_iloc iloc;
-+	char *start, *end;
-+	int ret = -ENOENT;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return ret;
-+
-+	err = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (err)
-+		return -EIO;
-+	raw_inode = ext3_raw_inode(&iloc);
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	*free = storage_size - sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if (le32_to_cpu((*(__u32*) start)) != EXT3_XATTR_MAGIC) {
-+		brelse(iloc.bh);
-+		return -ENOENT;
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+
-+	last = (struct ext3_xattr_entry *) start;
-+	while (!IS_LAST_ENTRY(last)) {
-+		struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(last);
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_find",
-+				"inode %ld", inode->i_ino);
-+			brelse(iloc.bh);
-+			return -EIO;
-+		}
-+
-+		if (name_index == last->e_name_index &&
-+		    name_len == last->e_name_len &&
-+		    !memcmp(name, last->e_name, name_len)) {
-+			memcpy(rentry, last, sizeof(struct ext3_xattr_entry));
-+			ret = 0;
-+		} else {
-+			*free -= EXT3_XATTR_LEN(last->e_name_len);
-+			*free -= le32_to_cpu(last->e_value_size);
-+		}
-+		last = next;
-+	}
-+	
-+	brelse(iloc.bh);
-+	return ret;
-+}
-+
-+/*
-+ * ext3_xattr_block_find()
-+ *
-+ * search attribute and calculate free space in EA block (if it allocated)
-+ * NOTE: free space includes space our attribute hold
-+ */
-+int
-+ext3_xattr_block_find(struct inode *inode, int name_index, const char *name,
-+	       struct ext3_xattr_entry *rentry, int *free)
-+{
-+	struct buffer_head *bh = NULL;
-+	struct ext3_xattr_entry *entry;
-+	char *end;
-+	int name_len, error = -ENOENT;
-+
-+	if (!EXT3_I(inode)->i_file_acl) {
-+		*free = inode->i_sb->s_blocksize -
-+			sizeof(struct ext3_xattr_header) -
-+			sizeof(__u32);
-+		return -ENOENT;
-+	}
-+	ea_idebug(inode, "reading block %d", EXT3_I(inode)->i_file_acl);
-+	bh = sb_bread(inode->i_sb, EXT3_I(inode)->i_file_acl);
-+	if (!bh)
-+		return -EIO;
-+	ea_bdebug(bh, "b_count=%d, refcount=%d",
-+		atomic_read(&(bh->b_count)), le32_to_cpu(HDR(bh)->h_refcount));
-+	end = bh->b_data + bh->b_size;
-+	if (HDR(bh)->h_magic != cpu_to_le32(EXT3_XATTR_MAGIC) ||
-+	    HDR(bh)->h_blocks != cpu_to_le32(1)) {
-+bad_block:	ext3_error(inode->i_sb, "ext3_xattr_get",
-+			"inode %ld: bad block %d", inode->i_ino,
-+			EXT3_I(inode)->i_file_acl);
-+		brelse(bh);
-+		return -EIO;
-+	}
-+	/* find named attribute */
-+	name_len = strlen(name);
-+	*free = bh->b_size - sizeof(__u32);
-+
-+	entry = FIRST_ENTRY(bh);
-+	while (!IS_LAST_ENTRY(entry)) {
-+		struct ext3_xattr_entry *next =
-+			EXT3_XATTR_NEXT(entry);
-+		if ((char *)next >= end)
-+			goto bad_block;
-+		if (name_index == entry->e_name_index &&
-+		    name_len == entry->e_name_len &&
-+		    memcmp(name, entry->e_name, name_len) == 0) {
-+			memcpy(rentry, entry, sizeof(struct ext3_xattr_entry));
-+			error = 0;
-+		} else {
-+			*free -= EXT3_XATTR_LEN(entry->e_name_len);
-+			*free -= le32_to_cpu(entry->e_value_size);
-+		}
-+		entry = next;
-+	}
-+	brelse(bh);
-+
-+	return error;
-+}
-+
-+/*
-+ * ext3_xattr_inode_set()
-+ *
-+ * this routine add/remove/replace attribute in inode body
-+ */
-+int
-+ext3_xattr_ibody_set(handle_t *handle, struct inode *inode, int name_index,
-+		      const char *name, const void *value, size_t value_len,
-+		      int flags)
-+{
-+	struct ext3_xattr_entry *last, *next, *here = NULL;
-+	struct ext3_inode *raw_inode;
-+	int name_len = strlen(name);
-+	int esize = EXT3_XATTR_LEN(name_len);
-+	struct buffer_head *bh;
-+	int err, storage_size;
-+	struct ext3_iloc iloc;
-+	int free, min_offs;
-+	char *start, *end;
-+	
-+	if (EXT3_SB(inode->i_sb)->s_inode_size <= EXT3_GOOD_OLD_INODE_SIZE)
-+		return -ENOSPC;
-+
-+	err = ext3_get_inode_loc(inode, &iloc, 0);
-+	if (err)
-+		return err;
-+	raw_inode = ext3_raw_inode(&iloc);
-+	bh = iloc.bh;
-+
-+	storage_size = EXT3_SB(inode->i_sb)->s_inode_size -
-+				EXT3_GOOD_OLD_INODE_SIZE -
-+				EXT3_I(inode)->i_extra_isize -
-+				sizeof(__u32);
-+	start = (char *) raw_inode + EXT3_GOOD_OLD_INODE_SIZE +
-+			EXT3_I(inode)->i_extra_isize;
-+	if ((*(__u32*) start) != EXT3_XATTR_MAGIC) {
-+		/* inode had no attributes before */
-+		*((__u32*) start) = cpu_to_le32(EXT3_XATTR_MAGIC);
-+	}
-+	start += sizeof(__u32);
-+	end = (char *) raw_inode + EXT3_SB(inode->i_sb)->s_inode_size;
-+	min_offs = storage_size;
-+	free = storage_size - sizeof(__u32);
-+
-+	last = (struct ext3_xattr_entry *) start;	
-+	while (!IS_LAST_ENTRY(last)) {
-+		next = EXT3_XATTR_NEXT(last);
-+		if (le32_to_cpu(last->e_value_size) > storage_size ||
-+				(char *) next >= end) {
-+			ext3_error(inode->i_sb, "ext3_xattr_ibody_set",
-+				"inode %ld", inode->i_ino);
-+			brelse(bh);
-+			return -EIO;
-+		}
-+		
-+		if (last->e_value_size) {
-+			int offs = le16_to_cpu(last->e_value_offs);
-+			if (offs < min_offs)
-+				min_offs = offs;
-+		}
-+		if (name_index == last->e_name_index &&
-+			name_len == last->e_name_len &&
-+			!memcmp(name, last->e_name, name_len))
-+			here = last;
-+		else {
-+			/* we calculate all but our attribute
-+			 * because it will be removed before changing */
-+			free -= EXT3_XATTR_LEN(last->e_name_len);
-+			free -= le32_to_cpu(last->e_value_size);
-+		}
-+		last = next;
-+	}
-+
-+	if (value && (esize + value_len > free)) {
-+		brelse(bh);
-+		return -ENOSPC;
-+	}
-+	
-+	err = ext3_reserve_inode_write(handle, inode, &iloc);
-+	if (err) {
-+		brelse(bh);	
-+		return err;
-+	}
-+
-+	if (here) {
-+		/* time to remove old value */
-+		struct ext3_xattr_entry *e;
-+		int size = le32_to_cpu(here->e_value_size);
-+		int border = le16_to_cpu(here->e_value_offs);
-+		char *src;
-+
-+		/* move tail */
-+		memmove(start + min_offs + size, start + min_offs,
-+				border - min_offs);
-+
-+		/* recalculate offsets */
-+		e = (struct ext3_xattr_entry *) start;
-+		while (!IS_LAST_ENTRY(e)) {
-+			struct ext3_xattr_entry *next = EXT3_XATTR_NEXT(e);
-+			int offs = le16_to_cpu(e->e_value_offs);
-+			if (offs < border)
-+				e->e_value_offs =
-+					cpu_to_le16(offs + size);
-+			e = next;
-+		}
-+		min_offs += size;
-+
-+		/* remove entry */
-+		border = EXT3_XATTR_LEN(here->e_name_len);
-+		src = (char *) here + EXT3_XATTR_LEN(here->e_name_len);
-+		size = (char *) last - src;
-+		if ((char *) here + size > end)
-+			printk("ALERT at %s:%d: 0x%p + %d > 0x%p\n",
-+					__FILE__, __LINE__, here, size, end);
-+		memmove(here, src, size);
-+		last = (struct ext3_xattr_entry *) ((char *) last - border);
-+		*((__u32 *) last) = 0;
-+	}
-+	
-+	if (value) {
-+		int offs = min_offs - value_len;
-+		/* use last to create new entry */
-+		last->e_name_len = strlen(name);
-+		last->e_name_index = name_index;
-+		last->e_value_offs = cpu_to_le16(offs);
-+		last->e_value_size = cpu_to_le32(value_len);
-+		last->e_hash = last->e_value_block = 0;
-+		memset(last->e_name, 0, esize);
-+		memcpy(last->e_name, name, last->e_name_len);
-+		if (start + offs + value_len > end)
-+			printk("ALERT at %s:%d: 0x%p + %d + %zd > 0x%p\n",
-+			       __FILE__, __LINE__, start, offs,
-+			       value_len, end);
-+		memcpy(start + offs, value, value_len);
-+		last = EXT3_XATTR_NEXT(last);
-+		*((__u32 *) last) = 0;
-+	}
-+	
-+	ext3_mark_iloc_dirty(handle, inode, &iloc);
-+	brelse(bh);
-+
-+	return 0;
-+}
-+
-+/*
-  * ext3_xattr_set_handle()
-  *
-  * Create, replace or remove an extended attribute for this inode. Buffer
-@@ -470,6 +959,104 @@
-  */
- int
- ext3_xattr_set_handle(handle_t *handle, struct inode *inode, int name_index,
-+		const char *name, const void *value, size_t value_len,
-+		int flags)
-+{
-+	struct ext3_xattr_entry entry;
-+	int err, where = 0, found = 0, total;
-+	int free1 = -1, free2 = -1;
-+	int name_len;
-+	
-+	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
-+		  name_index, name, value, (long)value_len);
-+
-+	if (IS_RDONLY(inode))
-+		return -EROFS;
-+	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-+		return -EPERM;
-+	if (value == NULL)
-+		value_len = 0;
-+	if (name == NULL)
-+		return -EINVAL;
-+	name_len = strlen(name);
-+	if (name_len > 255 || value_len > inode->i_sb->s_blocksize)
-+		return -ERANGE;
-+	down_write(&EXT3_I(inode)->xattr_sem);
-+
-+	/* try to find attribute in inode body */
-+	err = ext3_xattr_ibody_find(inode, name_index, name, &entry, &free1);
-+	if (err == 0) {
-+		/* found EA in inode */
-+		found = 1;
-+		where = 0;
-+	} else if (err == -ENOENT) {
-+		/* there is no such attribute in inode body */
-+		/* try to find attribute in dedicated block */
-+		err = ext3_xattr_block_find(inode, name_index, name,
-+						&entry, &free2);
-+		if (err != 0 && err != -ENOENT) {
-+			/* not found EA in block */
-+			goto finish;	
-+		} else if (err == 0) {
-+			/* found EA in block */
-+			where = 1;
-+			found = 1;
-+		}
-+	} else
-+		goto finish;
-+
-+	/* check flags: may replace? may create ? */
-+	if (found && (flags & XATTR_CREATE)) {
-+		err = -EEXIST;
-+		goto finish;
-+	} else if (!found && (flags & XATTR_REPLACE)) {
-+		err = -ENODATA;
-+		goto finish;
-+	}
-+
-+	/* check if we have enough space to store attribute */
-+	total = EXT3_XATTR_LEN(strlen(name)) + value_len;
-+	if (free1 >= 0 && total > free1 && free2 >= 0 && total > free2) {
-+		/* have no enough space */
-+		err = -ENOSPC;
-+		goto finish;
-+	}
-+	
-+	/* time to remove attribute */
-+	if (found) {
-+		if (where == 0) {
-+			/* EA is stored in inode body */
-+			ext3_xattr_ibody_set(handle, inode, name_index, name,
-+					NULL, 0, flags);
-+		} else {
-+			/* EA is stored in separated block */
-+			ext3_xattr_block_set(handle, inode, name_index, name,
-+					NULL, 0, flags);
-+		}
-+	}
-+
-+	/* try to store EA in inode body */
-+	err = ext3_xattr_ibody_set(handle, inode, name_index, name,
-+				value, value_len, flags);
-+	if (err) {
-+		/* can't store EA in inode body */
-+		/* try to store in block */
-+		err = ext3_xattr_block_set(handle, inode, name_index,
-+					name, value, value_len, flags);	
-+	}
-+
-+finish:	
-+	up_write(&EXT3_I(inode)->xattr_sem);
-+	return err;
-+}
-+
-+/*
-+ * ext3_xattr_block_set()
-+ *
-+ * this routine add/remove/replace attribute in EA block
-+ */
-+int
-+ext3_xattr_block_set(handle_t *handle, struct inode *inode, int name_index,
- 		      const char *name, const void *value, size_t value_len,
- 		      int flags)
- {
-@@ -492,22 +1078,7 @@
- 	 *             towards the end of the block).
- 	 * end -- Points right after the block pointed to by header.
- 	 */
--
--	ea_idebug(inode, "name=%d.%s, value=%p, value_len=%ld",
--		  name_index, name, value, (long)value_len);
--
--	if (IS_RDONLY(inode))
--		return -EROFS;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		return -EPERM;
--	if (value == NULL)
--		value_len = 0;
--	if (name == NULL)
--		return -EINVAL;
- 	name_len = strlen(name);
--	if (name_len > 255 || value_len > sb->s_blocksize)
--		return -ERANGE;
--	down_write(&EXT3_I(inode)->xattr_sem);
- 	if (EXT3_I(inode)->i_file_acl) {
- 		/* The inode already has an extended attribute block. */
- 		bh = sb_bread(sb, EXT3_I(inode)->i_file_acl);
-@@ -733,7 +1304,6 @@
- 	brelse(bh);
- 	if (!(bh && header == HDR(bh)))
- 		kfree(header);
--	up_write(&EXT3_I(inode)->xattr_sem);
- 
- 	return error;
- }
-Index: linux-2.6.0/fs/ext3/xattr.h
-===================================================================
---- linux-2.6.0.orig/fs/ext3/xattr.h	2003-06-24 18:04:43.000000000 +0400
-+++ linux-2.6.0/fs/ext3/xattr.h	2004-01-14 18:54:12.000000000 +0300
-@@ -77,7 +77,8 @@
- extern int ext3_xattr_get(struct inode *, int, const char *, void *, size_t);
- extern int ext3_xattr_list(struct inode *, char *, size_t);
- extern int ext3_xattr_set(struct inode *, int, const char *, const void *, size_t, int);
--extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *, const void *, size_t, int);
-+extern int ext3_xattr_set_handle(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
-+extern int ext3_xattr_block_set(handle_t *, struct inode *, int, const char *,const void *,size_t,int);
- 
- extern void ext3_xattr_delete_inode(handle_t *, struct inode *);
- extern void ext3_xattr_put_super(struct super_block *);
-Index: linux-2.6.0/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.0.orig/include/linux/ext3_fs.h	2004-01-14 18:54:11.000000000 +0300
-+++ linux-2.6.0/include/linux/ext3_fs.h	2004-01-14 18:54:12.000000000 +0300
-@@ -265,6 +265,8 @@
- 			__u32	m_i_reserved2[2];
- 		} masix2;
- 	} osd2;				/* OS dependent 2 */
-+	__u16	i_extra_isize;
-+	__u16	i_pad1;
- };
- 
- #define i_size_high	i_dir_acl
-@@ -721,6 +723,7 @@
- extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-+int ext3_get_inode_loc(struct inode *inode, struct ext3_iloc *iloc, int in_mem);
- 
- extern void ext3_read_inode (struct inode *);
- extern void ext3_write_inode (struct inode *, int);
-Index: linux-2.6.0/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.0.orig/include/linux/ext3_fs_i.h	2003-12-30 08:32:44.000000000 +0300
-+++ linux-2.6.0/include/linux/ext3_fs_i.h	2004-01-14 18:54:12.000000000 +0300
-@@ -96,6 +96,9 @@
- 	 */
- 	loff_t	i_disksize;
- 
-+	/* on-disk additional length */
-+	__u16 i_extra_isize;
-+
- 	/*
- 	 * truncate_sem is for serialising ext3_truncate() against
- 	 * ext3_getblock().  In the 2.4 ext2 design, great chunks of inode's
-
-%diffstat
- fs/ext3/ialloc.c          |    5 
- fs/ext3/inode.c           |   10 
- fs/ext3/xattr.c           |  634 +++++++++++++++++++++++++++++++++++++++++++---
- fs/ext3/xattr.h           |    3 
- include/linux/ext3_fs.h   |    2 
- include/linux/ext3_fs_i.h |    3 
- 6 files changed, 623 insertions(+), 34 deletions(-)
-
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch
deleted file mode 100644
index f421f88e9563db2db9c7593fbe1cea410af6149a..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.12.patch
+++ /dev/null
@@ -1,2940 +0,0 @@
-Index: linux-2.6.12-rc6/fs/ext3/extents.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/extents.c	2005-06-14 16:31:25.756503133 +0200
-+++ linux-2.6.12-rc6/fs/ext3/extents.c	2005-06-14 16:31:25.836581257 +0200
-@@ -0,0 +1,2359 @@
-+/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+/*
-+ * Extents support for EXT3
-+ *
-+ * TODO:
-+ *   - ext3_ext_walk_space() sould not use ext3_ext_find_extent()
-+ *   - ext3_ext_calc_credits() could take 'mergable' into account
-+ *   - ext3*_error() should be used in some situations
-+ *   - find_goal() [to be tested and improved]
-+ *   - smart tree reduction
-+ *   - arch-independence
-+ *     common on-disk format for big/little-endian arch
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/fs.h>
-+#include <linux/time.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/smp_lock.h>
-+#include <linux/highuid.h>
-+#include <linux/pagemap.h>
-+#include <linux/quotaops.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/ext3_extents.h>
-+#include <asm/uaccess.h>
-+
-+
-+static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
-+{
-+	if (eh->eh_magic != EXT3_EXT_MAGIC) {
-+		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
-+		       (unsigned)eh->eh_magic);
-+		return -EIO;
-+	}
-+	if (eh->eh_max == 0) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
-+		       (unsigned)eh->eh_max);
-+		return -EIO;
-+	}
-+	if (eh->eh_entries > eh->eh_max) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
-+		       (unsigned)eh->eh_entries);
-+		return -EIO;
-+	}
-+	return 0;
-+}
-+
-+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
-+{
-+	int err;
-+
-+	if (handle->h_buffer_credits > needed)
-+		return handle;
-+	if (!ext3_journal_extend(handle, needed))
-+		return handle;
-+	err = ext3_journal_restart(handle, needed);
-+	
-+	return handle;
-+}
-+
-+static int inline
-+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->get_write_access)
-+		return tree->ops->get_write_access(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+static int inline
-+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->mark_buffer_dirty)
-+		return tree->ops->mark_buffer_dirty(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ */
-+static int ext3_ext_get_access(handle_t *handle,
-+			       struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+	int err;
-+
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err = ext3_journal_get_write_access(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_get_access_for_root(handle, tree);
-+	}
-+	return err;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ *  - EIO
-+ */
-+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path)
-+{
-+	int err;
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err =ext3_journal_dirty_metadata(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_mark_root_dirty(handle, tree);
-+	}
-+	return err;
-+}
-+
-+static int inline
-+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, struct ext3_extent *ex,
-+		   int *err)
-+{
-+	int goal, depth, newblock;
-+	struct inode *inode;
-+
-+	EXT_ASSERT(tree);
-+	if (tree->ops->new_block)
-+		return tree->ops->new_block(handle, tree, path, ex, err);
-+
-+	inode = tree->inode;
-+	depth = EXT_DEPTH(tree);
-+	if (path && depth > 0) {
-+		goal = path[depth-1].p_block;
-+	} else {
-+		struct ext3_inode_info *ei = EXT3_I(inode);
-+		unsigned long bg_start;
-+		unsigned long colour;
-+
-+		bg_start = (ei->i_block_group *
-+			    EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+			le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+		colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+		goal = bg_start + colour;
-+	}
-+
-+	newblock = ext3_new_block(handle, inode, goal, err);
-+	return newblock;
-+}
-+
-+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *neh = EXT_ROOT_HDR(tree);
-+	neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) |
-+			     (EXT_HDR_GEN(neh) + 1);
-+}
-+
-+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 6;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 5;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 3;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 4;
-+#endif
-+	return size;
-+}
-+
-+static void ext3_ext_show_path(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int k, l = path->p_depth;
-+
-+	ext_debug(tree, "path:");
-+	for (k = 0; k <= l; k++, path++) {
-+		if (path->p_idx) {
-+			ext_debug(tree, "  %d->%d", path->p_idx->ei_block,
-+				  path->p_idx->ei_leaf);
-+		} else if (path->p_ext) {
-+			ext_debug(tree, "  %d:%d:%d",
-+				  path->p_ext->ee_block,
-+				  path->p_ext->ee_len,
-+				  path->p_ext->ee_start);
-+		} else
-+			ext_debug(tree, "  []");
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *eh;
-+	struct ext3_extent *ex;
-+	int i;
-+
-+	if (!path)
-+		return;
-+
-+	eh = path[depth].p_hdr;
-+	ex = EXT_FIRST_EXTENT(eh);
-+
-+	for (i = 0; i < eh->eh_entries; i++, ex++) {
-+		ext_debug(tree, "%d:%d:%d ",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_drop_refs(struct ext3_ext_path *path)
-+{
-+	int depth = path->p_depth;
-+	int i;
-+
-+	for (i = 0; i <= depth; i++, path++) {
-+		if (path->p_bh) {
-+			brelse(path->p_bh);
-+			path->p_bh = NULL;
-+		}
-+	}
-+}
-+
-+/*
-+ * binary search for closest index by given block
-+ */
-+static inline void
-+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree,
-+		       struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent_idx *ix;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_entries > 0);
-+
-+	ext_debug(tree, "binsearch for %d(idx):  ", block);
-+
-+	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ix[l + k].ei_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ix += l;
-+	path->p_idx = ix;
-+	ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf);
-+
-+	while (l++ < r) {
-+		if (block < ix->ei_block) 
-+			break;
-+		path->p_idx = ix++;
-+	}
-+	ext_debug(tree, "  -> %d->%d\n", path->p_idx->ei_block,
-+		  path->p_idx->ei_leaf);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent_idx *chix;
-+
-+		chix = ix = EXT_FIRST_INDEX(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ix++) {
-+			if (k != 0 && ix->ei_block <= ix[-1].ei_block) {
-+				printk("k=%d, ix=0x%p, first=0x%p\n", k,
-+				       ix, EXT_FIRST_INDEX(eh));
-+				printk("%u <= %u\n",
-+				       ix->ei_block,ix[-1].ei_block);
-+			}
-+			EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block);
-+			if (block < ix->ei_block) 
-+				break;
-+			chix = ix;
-+		}
-+		EXT_ASSERT(chix == path->p_idx);
-+	}
-+#endif
-+}
-+
-+/*
-+ * binary search for closest extent by given block
-+ */
-+static inline void
-+ext3_ext_binsearch(struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent *ex;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+
-+	if (eh->eh_entries == 0) {
-+		/*
-+		 * this leaf is empty yet:
-+		 *  we get such a leaf in split/add case
-+		 */
-+		return;
-+	}
-+	
-+	ext_debug(tree, "binsearch for %d:  ", block);
-+
-+	path->p_ext = ex = EXT_FIRST_EXTENT(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ex[l + k].ee_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ex += l;
-+	path->p_ext = ex;
-+	ext_debug(tree, "  -> %d:%d:%d ", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+	while (l++ < r) {
-+		if (block < ex->ee_block) 
-+			break;
-+		path->p_ext = ex++;
-+	}
-+	ext_debug(tree, "  -> %d:%d:%d\n", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent *chex;
-+
-+		chex = ex = EXT_FIRST_EXTENT(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ex++) {
-+			EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block);
-+			if (block < ex->ee_block) 
-+				break;
-+			chex = ex;
-+		}
-+		EXT_ASSERT(chex == path->p_ext);
-+	}
-+#endif
-+}
-+
-+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *eh;
-+
-+	BUG_ON(tree->buffer_len == 0);
-+	ext3_ext_get_access_for_root(handle, tree);
-+	eh = EXT_ROOT_HDR(tree);
-+	eh->eh_depth = 0;
-+	eh->eh_entries = 0;
-+	eh->eh_magic = EXT3_EXT_MAGIC;
-+	eh->eh_max = ext3_ext_space_root(tree);
-+	ext3_ext_mark_root_dirty(handle, tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return 0;
-+}
-+
-+struct ext3_ext_path *
-+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block,
-+		     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	struct buffer_head *bh;
-+	int depth, i, ppos = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	eh = EXT_ROOT_HDR(tree);
-+	EXT_ASSERT(eh);
-+	if (ext3_ext_check_header(eh)) {
-+		/* don't free previously allocated path
-+		 * -- caller should take care */
-+		path = NULL;
-+		goto err;
-+	}
-+
-+	i = depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* account possible depth increase */
-+	if (!path) {
-+		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-+			       GFP_NOFS);
-+		if (!path)
-+			return ERR_PTR(-ENOMEM);
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[0].p_hdr = eh;
-+
-+	/* walk through the tree */
-+	while (i) {
-+		ext_debug(tree, "depth %d: num %d, max %d\n",
-+			  ppos, eh->eh_entries, eh->eh_max);
-+		ext3_ext_binsearch_idx(tree, path + ppos, block);
-+		path[ppos].p_block = path[ppos].p_idx->ei_leaf;
-+		path[ppos].p_depth = i;
-+		path[ppos].p_ext = NULL;
-+
-+		bh = sb_bread(tree->inode->i_sb, path[ppos].p_block);
-+		if (!bh)
-+			goto err;
-+
-+		eh = EXT_BLOCK_HDR(bh);
-+		ppos++;
-+		EXT_ASSERT(ppos <= depth);
-+		path[ppos].p_bh = bh;
-+		path[ppos].p_hdr = eh;
-+		i--;
-+
-+		if (ext3_ext_check_header(eh))
-+			goto err;
-+	}
-+
-+	path[ppos].p_depth = i;
-+	path[ppos].p_hdr = eh;
-+	path[ppos].p_ext = NULL;
-+	path[ppos].p_idx = NULL;
-+
-+	if (ext3_ext_check_header(eh))
-+		goto err;
-+
-+	/* find extent */
-+	ext3_ext_binsearch(tree, path + ppos, block);
-+
-+	ext3_ext_show_path(tree, path);
-+
-+	return path;
-+
-+err:
-+	printk(KERN_ERR "EXT3-fs: header is corrupted!\n");
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	return ERR_PTR(-EIO);
-+}
-+
-+/*
-+ * insert new index [logical;ptr] into the block at cupr
-+ * it check where to insert: before curp or after curp
-+ */
-+static int ext3_ext_insert_index(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *curp,
-+				 int logical, int ptr)
-+{
-+	struct ext3_extent_idx *ix;
-+	int len, err;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		return err;
-+
-+	EXT_ASSERT(logical != curp->p_idx->ei_block);
-+	len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx;
-+	if (logical > curp->p_idx->ei_block) {
-+		/* insert after */
-+		if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
-+			len = (len - 1) * sizeof(struct ext3_extent_idx);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert new index %d after: %d. "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  logical, ptr, len,
-+				  (curp->p_idx + 1), (curp->p_idx + 2));
-+			memmove(curp->p_idx + 2, curp->p_idx + 1, len);
-+		}
-+		ix = curp->p_idx + 1;
-+	} else {
-+		/* insert before */
-+		len = len * sizeof(struct ext3_extent_idx);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert new index %d before: %d. "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  logical, ptr, len,
-+			  curp->p_idx, (curp->p_idx + 1));
-+		memmove(curp->p_idx + 1, curp->p_idx, len);
-+		ix = curp->p_idx;
-+	}
-+
-+	ix->ei_block = logical;
-+	ix->ei_leaf = ptr;
-+	ix->ei_leaf_hi = ix->ei_unused = 0;
-+	curp->p_hdr->eh_entries++;
-+
-+	EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
-+	EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
-+
-+	err = ext3_ext_dirty(handle, tree, curp);
-+	ext3_std_error(tree->inode->i_sb, err);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine inserts new subtree into the path, using free index entry
-+ * at depth 'at:
-+ *  - allocates all needed blocks (new leaf and all intermediate index blocks)
-+ *  - makes decision where to split
-+ *  - moves remaining extens and index entries (right to the split point)
-+ *    into the newly allocated blocks
-+ *  - initialize subtree
-+ */
-+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_extent *newext, int at)
-+{
-+	struct buffer_head *bh = NULL;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct ext3_extent *ex;
-+	int i = at, k, m, a;
-+	unsigned long newblock, oldblock, border;
-+	int *ablocks = NULL; /* array of allocated blocks */
-+	int err = 0;
-+
-+	/* make decision: where to split? */
-+	/* FIXME: now desicion is simplest: at current extent */
-+
-+	/* if current leaf will be splitted, then we should use 
-+	 * border from split point */
-+	EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
-+	if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		border = path[depth].p_ext[1].ee_block;
-+		ext_debug(tree, "leaf will be splitted."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	} else {
-+		border = newext->ee_block;
-+		ext_debug(tree, "leaf will be added."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	}
-+
-+	/* 
-+	 * if error occurs, then we break processing
-+	 * and turn filesystem read-only. so, index won't
-+	 * be inserted and tree will be in consistent
-+	 * state. next mount will repair buffers too
-+	 */
-+
-+	/*
-+	 * get array to track all allocated blocks
-+	 * we need this to handle errors and free blocks
-+	 * upon them
-+	 */
-+	ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS);
-+	if (!ablocks)
-+		return -ENOMEM;
-+	memset(ablocks, 0, sizeof(unsigned long) * depth);
-+
-+	/* allocate all needed blocks */
-+	ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at);
-+	for (a = 0; a < depth - at; a++) {
-+		newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+		if (newblock == 0)
-+			goto cleanup;
-+		ablocks[a] = newblock;
-+	}
-+
-+	/* initialize new leaf */
-+	newblock = ablocks[--a];
-+	EXT_ASSERT(newblock);
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		goto cleanup;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh)))
-+		goto cleanup;
-+
-+	neh = EXT_BLOCK_HDR(bh);
-+	neh->eh_entries = 0;
-+	neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	neh->eh_depth = 0;
-+	ex = EXT_FIRST_EXTENT(neh);
-+
-+	/* move remain of path[depth] to the new leaf */
-+	EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max);
-+	/* start copy from next extent */
-+	/* TODO: we could do it by single memmove */
-+	m = 0;
-+	path[depth].p_ext++;
-+	while (path[depth].p_ext <=
-+			EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		ext_debug(tree, "move %d:%d:%d in new leaf %lu\n",
-+			  path[depth].p_ext->ee_block,
-+			  path[depth].p_ext->ee_start,
-+			  path[depth].p_ext->ee_len,
-+			  newblock);
-+		memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent));
-+		neh->eh_entries++;
-+		m++;
-+	}
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto cleanup;	
-+	brelse(bh);
-+	bh = NULL;
-+
-+	/* correct old leaf */
-+	if (m) {
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			goto cleanup;
-+		path[depth].p_hdr->eh_entries -= m;
-+		if ((err = ext3_ext_dirty(handle, tree, path + depth)))
-+			goto cleanup;
-+		
-+	}
-+
-+	/* create intermediate indexes */
-+	k = depth - at - 1;
-+	EXT_ASSERT(k >= 0);
-+	if (k)
-+		ext_debug(tree,	"create %d intermediate indices\n", k);
-+	/* insert new index into current index block */
-+	/* current depth stored in i var */
-+	i = depth - 1;
-+	while (k--) {
-+		oldblock = newblock;
-+		newblock = ablocks[--a];
-+		bh = sb_getblk(tree->inode->i_sb, newblock);
-+		if (!bh) {
-+			err = -EIO;
-+			goto cleanup;
-+		}
-+		lock_buffer(bh);
-+
-+		if ((err = ext3_journal_get_create_access(handle, bh)))
-+			goto cleanup;
-+
-+		neh = EXT_BLOCK_HDR(bh);
-+		neh->eh_entries = 1;
-+		neh->eh_magic = EXT3_EXT_MAGIC;
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+		neh->eh_depth = depth - i; 
-+		fidx = EXT_FIRST_INDEX(neh);
-+		fidx->ei_block = border;
-+		fidx->ei_leaf = oldblock;
-+		fidx->ei_leaf_hi = fidx->ei_unused = 0;
-+
-+		ext_debug(tree,	"int.index at %d (block %lu): %lu -> %lu\n",
-+			  i, newblock, border, oldblock);
-+		/* copy indexes */
-+		m = 0;
-+		path[i].p_idx++;
-+
-+		ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
-+			  EXT_MAX_INDEX(path[i].p_hdr));
-+		EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
-+			   EXT_LAST_INDEX(path[i].p_hdr));
-+		while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
-+			ext_debug(tree, "%d: move %d:%d in new index %lu\n",
-+				  i, path[i].p_idx->ei_block,
-+				  path[i].p_idx->ei_leaf, newblock);
-+			memmove(++fidx, path[i].p_idx++,
-+				sizeof(struct ext3_extent_idx));
-+			neh->eh_entries++;
-+			EXT_ASSERT(neh->eh_entries <= neh->eh_max);
-+			m++;
-+		}
-+		set_buffer_uptodate(bh);
-+		unlock_buffer(bh);
-+
-+		if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+			goto cleanup;
-+		brelse(bh);
-+		bh = NULL;
-+
-+		/* correct old index */
-+		if (m) {
-+			err = ext3_ext_get_access(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+			path[i].p_hdr->eh_entries -= m;
-+			err = ext3_ext_dirty(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+		}
-+
-+		i--;
-+	}
-+
-+	/* insert new index */
-+	if (!err)
-+		err = ext3_ext_insert_index(handle, tree, path + at,
-+					    border, newblock);
-+
-+cleanup:
-+	if (bh) {
-+		if (buffer_locked(bh))
-+			unlock_buffer(bh);
-+		brelse(bh);
-+	}
-+
-+	if (err) {
-+		/* free all allocated blocks in error case */
-+		for (i = 0; i < depth; i++) {
-+			if (!ablocks[i])
-+				continue;
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+		}
-+	}
-+	kfree(ablocks);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine implements tree growing procedure:
-+ *  - allocates new block
-+ *  - moves top-level data (index block or leaf) into the new block
-+ *  - initialize new top-level, creating index that points to the
-+ *    just created block
-+ */
-+static int ext3_ext_grow_indepth(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *path,
-+				 struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp = path;
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct buffer_head *bh;
-+	unsigned long newblock;
-+	int err = 0;
-+
-+	newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+	if (newblock == 0)
-+		return err;
-+
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		ext3_std_error(tree->inode->i_sb, err);
-+		return err;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh))) {
-+		unlock_buffer(bh);
-+		goto out;	
-+	}
-+
-+	/* move top-level index/leaf into new block */
-+	memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
-+
-+	/* set size of new block */
-+	neh = EXT_BLOCK_HDR(bh);
-+	/* old root could have indexes or leaves
-+	 * so calculate eh_max right way */
-+	if (EXT_DEPTH(tree))
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+	else
-+		neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto out;
-+
-+	/* create index in new top-level index: num,max,pointer */
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		goto out;
-+
-+	curp->p_hdr->eh_magic = EXT3_EXT_MAGIC;
-+	curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree);
-+	curp->p_hdr->eh_entries = 1;
-+	curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
-+	/* FIXME: it works, but actually path[0] can be index */
-+	curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
-+	curp->p_idx->ei_leaf = newblock;
-+	curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
-+
-+	neh = EXT_ROOT_HDR(tree);
-+	fidx = EXT_FIRST_INDEX(neh);
-+	ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n",
-+		  neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); 
-+
-+	neh->eh_depth = path->p_depth + 1;
-+	err = ext3_ext_dirty(handle, tree, curp);
-+out:
-+	brelse(bh);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine finds empty index and adds new leaf. if no free index found
-+ * then it requests in-depth growing
-+ */
-+static int ext3_ext_create_new_leaf(handle_t *handle,
-+				    struct ext3_extents_tree *tree,
-+				    struct ext3_ext_path *path,
-+				    struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp;
-+	int depth, i, err = 0;
-+
-+repeat:
-+	i = depth = EXT_DEPTH(tree);
-+	
-+	/* walk up to the tree and look for free index entry */
-+	curp = path + depth;
-+	while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) {
-+		i--;
-+		curp--;
-+	}
-+
-+	/* we use already allocated block for index block
-+	 * so, subsequent data blocks should be contigoues */
-+	if (EXT_HAS_FREE_INDEX(curp)) {
-+		/* if we found index with free entry, then use that
-+		 * entry: create all needed subtree and add new leaf */
-+		err = ext3_ext_split(handle, tree, path, newext, i);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+	} else {
-+		/* tree is full, time to grow in depth */
-+		err = ext3_ext_grow_indepth(handle, tree, path, newext);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+
-+		/*
-+		 * only first (depth 0 -> 1) produces free space
-+		 * in all other cases we have to split growed tree
-+		 */
-+		depth = EXT_DEPTH(tree);
-+		if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) {
-+			/* now we need split */
-+			goto repeat;
-+		}
-+	}
-+
-+	if (err)
-+		return err;
-+
-+	return 0;
-+}
-+
-+/*
-+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK
-+ * NOTE: it consider block number from index entry as
-+ * allocated block. thus, index entries have to be consistent
-+ * with leafs
-+ */
-+static unsigned long
-+ext3_ext_next_allocated_block(struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	if (depth == 0 && path->p_ext == NULL)
-+		return EXT_MAX_BLOCK;
-+
-+	/* FIXME: what if index isn't full ?! */
-+	while (depth >= 0) {
-+		if (depth == path->p_depth) {
-+			/* leaf */
-+			if (path[depth].p_ext !=
-+			    EXT_LAST_EXTENT(path[depth].p_hdr))
-+				return path[depth].p_ext[1].ee_block;
-+		} else {
-+			/* index */
-+			if (path[depth].p_idx !=
-+			    EXT_LAST_INDEX(path[depth].p_hdr))
-+				return path[depth].p_idx[1].ei_block;
-+		}
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * returns first allocated block from next leaf or EXT_MAX_BLOCK
-+ */
-+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree,
-+					 struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	/* zero-tree has no leaf blocks at all */
-+	if (depth == 0)
-+		return EXT_MAX_BLOCK;
-+
-+	/* go to index block */
-+	depth--;
-+	
-+	while (depth >= 0) {
-+		if (path[depth].p_idx !=
-+		    EXT_LAST_INDEX(path[depth].p_hdr))
-+			return path[depth].p_idx[1].ei_block;
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * if leaf gets modified and modified extent is first in the leaf
-+ * then we have to correct all indexes above
-+ * TODO: do we need to correct tree in all cases?
-+ */
-+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	int depth = EXT_DEPTH(tree);	
-+	struct ext3_extent *ex;
-+	unsigned long border;
-+	int k, err = 0;
-+	
-+	eh = path[depth].p_hdr;
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(eh);
-+	
-+	if (depth == 0) {
-+		/* there is no tree at all */
-+		return 0;
-+	}
-+	
-+	if (ex != EXT_FIRST_EXTENT(eh)) {
-+		/* we correct tree if first leaf got modified only */
-+		return 0;
-+	}
-+	
-+	/*
-+	 * TODO: we need correction if border is smaller then current one
-+	 */
-+	k = depth - 1;
-+	border = path[depth].p_ext->ee_block;
-+	if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+		return err;
-+	path[k].p_idx->ei_block = border;
-+	if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+		return err;
-+
-+	while (k--) {
-+		/* change all left-side indexes */
-+		if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr))
-+			break;
-+		if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+			break;
-+		path[k].p_idx->ei_block = border;
-+		if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+			break;
-+	}
-+
-+	return err;
-+}
-+
-+static int inline
-+ext3_can_extents_be_merged(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex1,
-+			   struct ext3_extent *ex2)
-+{
-+	if (ex1->ee_block + ex1->ee_len != ex2->ee_block)
-+		return 0;
-+
-+#ifdef AGRESSIVE_TEST
-+	if (ex1->ee_len >= 4)
-+		return 0;
-+#endif
-+
-+	if (!tree->ops->mergable)
-+		return 1;
-+
-+	return tree->ops->mergable(ex1, ex2);
-+}
-+
-+/*
-+ * this routine tries to merge requsted extent into the existing
-+ * extent or inserts requested extent as new one into the tree,
-+ * creating new leaf in no-space case
-+ */
-+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree,
-+			   struct ext3_ext_path *path,
-+			   struct ext3_extent *newext)
-+{
-+	struct ext3_extent_header * eh;
-+	struct ext3_extent *ex, *fex;
-+	struct ext3_extent *nearex; /* nearest extent */
-+	struct ext3_ext_path *npath = NULL;
-+	int depth, len, err, next;
-+
-+	EXT_ASSERT(newext->ee_len > 0);
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(path[depth].p_hdr);
-+
-+	/* try to insert block into found extent and return */
-+	if (ex && ext3_can_extents_be_merged(tree, ex, newext)) {
-+		ext_debug(tree, "append %d block to %d:%d (from %d)\n",
-+			  newext->ee_len, ex->ee_block, ex->ee_len,
-+			  ex->ee_start);
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			return err;
-+		ex->ee_len += newext->ee_len;
-+		eh = path[depth].p_hdr;
-+		nearex = ex;
-+		goto merge;
-+	}
-+
-+repeat:
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+	if (eh->eh_entries < eh->eh_max)
-+		goto has_space;
-+
-+	/* probably next leaf has space for us? */
-+	fex = EXT_LAST_EXTENT(eh);
-+	next = ext3_ext_next_leaf_block(tree, path);
-+	if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) {
-+		ext_debug(tree, "next leaf block - %d\n", next);
-+		EXT_ASSERT(!npath);
-+		npath = ext3_ext_find_extent(tree, next, NULL);
-+		if (IS_ERR(npath))
-+			return PTR_ERR(npath);
-+		EXT_ASSERT(npath->p_depth == path->p_depth);
-+		eh = npath[depth].p_hdr;
-+		if (eh->eh_entries < eh->eh_max) {
-+			ext_debug(tree,	"next leaf isnt full(%d)\n",
-+				  eh->eh_entries);
-+			path = npath;
-+			goto repeat;
-+		}
-+		ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
-+			  eh->eh_entries, eh->eh_max);
-+	}
-+
-+	/*
-+	 * there is no free space in found leaf
-+	 * we're gonna add new leaf in the tree
-+	 */
-+	err = ext3_ext_create_new_leaf(handle, tree, path, newext);
-+	if (err)
-+		goto cleanup;
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+
-+has_space:
-+	nearex = path[depth].p_ext;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+		goto cleanup;
-+
-+	if (!nearex) {
-+		/* there is no extent in this leaf, create first one */
-+		ext_debug(tree, "first extent in the leaf: %d:%d:%d\n",
-+			  newext->ee_block, newext->ee_start,
-+			  newext->ee_len);
-+		path[depth].p_ext = EXT_FIRST_EXTENT(eh);
-+	} else if (newext->ee_block > nearex->ee_block) {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		if (nearex != EXT_LAST_EXTENT(eh)) {
-+			len = EXT_MAX_EXTENT(eh) - nearex;
-+			len = (len - 1) * sizeof(struct ext3_extent);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  newext->ee_block, newext->ee_start,
-+				  newext->ee_len,
-+				  nearex, len, nearex + 1, nearex + 2);
-+			memmove(nearex + 2, nearex + 1, len);
-+		}
-+		path[depth].p_ext = nearex + 1;
-+	} else {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  newext->ee_block, newext->ee_start, newext->ee_len,
-+			  nearex, len, nearex + 1, nearex + 2);
-+		memmove(nearex + 1, nearex, len);
-+		path[depth].p_ext = nearex;
-+	}
-+
-+	eh->eh_entries++;
-+	nearex = path[depth].p_ext;
-+	nearex->ee_block = newext->ee_block;
-+	nearex->ee_start = newext->ee_start;
-+	nearex->ee_len = newext->ee_len;
-+	/* FIXME: support for large fs */
-+	nearex->ee_start_hi = 0;
-+
-+merge:
-+	/* try to merge extents to the right */
-+	while (nearex < EXT_LAST_EXTENT(eh)) {
-+		if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1))
-+			break;
-+		/* merge with next extent! */
-+		nearex->ee_len += nearex[1].ee_len;
-+		if (nearex + 1 < EXT_LAST_EXTENT(eh)) {
-+			len = (EXT_LAST_EXTENT(eh) - nearex - 1) *
-+				sizeof(struct ext3_extent);
-+			memmove(nearex + 1, nearex + 2, len);
-+		}
-+		eh->eh_entries--;
-+		EXT_ASSERT(eh->eh_entries > 0);
-+	}
-+
-+	/* try to merge extents to the left */
-+
-+	/* time to correct all indexes above */
-+	err = ext3_ext_correct_indexes(handle, tree, path);
-+	if (err)
-+		goto cleanup;
-+
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+
-+cleanup:
-+	if (npath) {
-+		ext3_ext_drop_refs(npath);
-+		kfree(npath);
-+	}
-+	ext3_ext_tree_changed(tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return err;
-+}
-+
-+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block,
-+			unsigned long num, ext_prepare_callback func)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_ext_cache cbex;
-+	struct ext3_extent *ex;
-+	unsigned long next, start = 0, end = 0;
-+	unsigned long last = block + num;
-+	int depth, exists, err = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(func);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	while (block < last && block != EXT_MAX_BLOCK) {
-+		num = last - block;
-+		/* find extent for this block */
-+		path = ext3_ext_find_extent(tree, block, path);
-+		if (IS_ERR(path)) {
-+			err = PTR_ERR(path);
-+			path = NULL;
-+			break;
-+		}
-+
-+		depth = EXT_DEPTH(tree);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		ex = path[depth].p_ext;
-+		next = ext3_ext_next_allocated_block(path);
-+
-+		exists = 0;
-+		if (!ex) {
-+			/* there is no extent yet, so try to allocate
-+			 * all requested space */
-+			start = block;
-+			end = block + num;
-+		} else if (ex->ee_block > block) {
-+			/* need to allocate space before found extent */
-+			start = block;
-+			end = ex->ee_block;
-+			if (block + num < end)
-+				end = block + num;
-+		} else if (block >= ex->ee_block + ex->ee_len) {
-+			/* need to allocate space after found extent */
-+			start = block;
-+			end = block + num;
-+			if (end >= next)
-+				end = next;
-+		} else if (block >= ex->ee_block) {
-+			/* 
-+			 * some part of requested space is covered
-+			 * by found extent
-+			 */
-+			start = block;
-+			end = ex->ee_block + ex->ee_len;
-+			if (block + num < end)
-+				end = block + num;
-+			exists = 1;
-+		} else {
-+			BUG();
-+		}
-+		EXT_ASSERT(end > start);
-+
-+		if (!exists) {
-+			cbex.ec_block = start;
-+			cbex.ec_len = end - start;
-+			cbex.ec_start = 0;
-+			cbex.ec_type = EXT3_EXT_CACHE_GAP;
-+		} else {
-+			cbex.ec_block = ex->ee_block;
-+			cbex.ec_len = ex->ee_len;
-+			cbex.ec_start = ex->ee_start;
-+			cbex.ec_type = EXT3_EXT_CACHE_EXTENT;
-+		}
-+
-+		EXT_ASSERT(cbex.ec_len > 0);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		err = func(tree, path, &cbex);
-+		ext3_ext_drop_refs(path);
-+
-+		if (err < 0)
-+			break;
-+		if (err == EXT_REPEAT)
-+			continue;
-+		else if (err == EXT_BREAK) {
-+			err = 0;
-+			break;
-+		}
-+
-+		if (EXT_DEPTH(tree) != depth) {
-+			/* depth was changed. we have to realloc path */
-+			kfree(path);
-+			path = NULL;
-+		}
-+
-+		block = cbex.ec_block + cbex.ec_len;
-+	}
-+
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+
-+	return err;
-+}
-+
-+static inline void
-+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block,
-+		      __u32 len, __u32 start, int type)
-+{
-+	EXT_ASSERT(len > 0);
-+	if (tree->cex) {
-+		tree->cex->ec_type = type;
-+		tree->cex->ec_block = block;
-+		tree->cex->ec_len = len;
-+		tree->cex->ec_start = start;
-+	}
-+}
-+
-+/*
-+ * this routine calculate boundaries of the gap requested block fits into
-+ * and cache this gap
-+ */
-+static inline void
-+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  unsigned long block)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	unsigned long lblock, len;
-+	struct ext3_extent *ex;
-+
-+	if (!tree->cex)
-+		return;
-+
-+	ex = path[depth].p_ext;
-+	if (ex == NULL) {
-+		/* there is no extent yet, so gap is [0;-] */
-+		lblock = 0;
-+		len = EXT_MAX_BLOCK;
-+		ext_debug(tree, "cache gap(whole file):");
-+	} else if (block < ex->ee_block) {
-+		lblock = block;
-+		len = ex->ee_block - block;
-+		ext_debug(tree, "cache gap(before): %lu [%lu:%lu]",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len);
-+	} else if (block >= ex->ee_block + ex->ee_len) {
-+		lblock = ex->ee_block + ex->ee_len;
-+		len = ext3_ext_next_allocated_block(path);
-+		ext_debug(tree, "cache gap(after): [%lu:%lu] %lu",
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) block);
-+		EXT_ASSERT(len > lblock);
-+		len = len - lblock;
-+	} else {
-+		lblock = len = 0;
-+		BUG();
-+	}
-+
-+	ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len);
-+	ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP);
-+}
-+
-+static inline int
-+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block,
-+		  struct ext3_extent *ex)
-+{
-+	struct ext3_ext_cache *cex = tree->cex;
-+
-+	/* is there cache storage at all? */
-+	if (!cex)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	/* has cache valid data? */
-+	if (cex->ec_type == EXT3_EXT_CACHE_NO)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP ||
-+		   cex->ec_type == EXT3_EXT_CACHE_EXTENT);
-+	if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
-+		ex->ee_block = cex->ec_block;
-+		ex->ee_start = cex->ec_start;
-+		ex->ee_start_hi = 0;
-+		ex->ee_len = cex->ec_len;
-+		ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) ex->ee_start);
-+		return cex->ec_type;
-+	}
-+
-+	/* not in cache */
-+	return EXT3_EXT_CACHE_NO;
-+}
-+
-+/*
-+ * routine removes index from the index block
-+ * it's used in truncate case only. thus all requests are for
-+ * last index in the block only
-+ */
-+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree,
-+		    struct ext3_ext_path *path)
-+{
-+	struct buffer_head *bh;
-+	int err;
-+	
-+	/* free index block */
-+	path--;
-+	EXT_ASSERT(path->p_hdr->eh_entries);
-+	if ((err = ext3_ext_get_access(handle, tree, path)))
-+		return err;
-+	path->p_hdr->eh_entries--;
-+	if ((err = ext3_ext_dirty(handle, tree, path)))
-+		return err;
-+	ext_debug(tree, "index is empty, remove it, free block %d\n",
-+		  path->p_idx->ei_leaf);
-+	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
-+	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	return err;
-+}
-+
-+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree,
-+				     struct ext3_ext_path *path)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	int needed;
-+
-+	if (path) {
-+		/* probably there is space in leaf? */
-+		if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max)
-+			return 1;
-+	}
-+	
-+	/*
-+	 * the worste case we're expecting is creation of the
-+	 * new root (growing in depth) with index splitting
-+	 * for splitting we have to consider depth + 1 because
-+	 * previous growing could increase it
-+	 */
-+	depth = depth + 1;
-+
-+	/* 
-+	 * growing in depth:
-+	 * block allocation + new root + old root
-+	 */
-+	needed = EXT3_ALLOC_NEEDED + 2;
-+
-+	/* index split. we may need:
-+	 *   allocate intermediate indexes and new leaf
-+	 *   change two blocks at each level, but root
-+	 *   modify root block (inode)
-+	 */
-+	needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1;
-+
-+	return needed;
-+}
-+
-+static int
-+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree,
-+		      struct ext3_ext_path *path, unsigned long start,
-+		      unsigned long end)
-+{
-+	struct ext3_extent *ex, tex;
-+	struct ext3_ext_path *npath;
-+	int depth, creds, err;
-+
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1);
-+	EXT_ASSERT(ex->ee_block < start);
-+
-+	/* calculate tail extent */
-+	tex.ee_block = end + 1;
-+	EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len);
-+	tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block;
-+
-+	creds = ext3_ext_calc_credits_for_insert(tree, path);
-+	handle = ext3_ext_journal_restart(handle, creds);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	
-+	/* calculate head extent. use primary extent */
-+	err = ext3_ext_get_access(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+	ex->ee_len = start - ex->ee_block;
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+
-+	/* FIXME: some callback to free underlying resource
-+	 * and correct ee_start? */
-+	ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n",
-+		  ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len);
-+
-+	npath = ext3_ext_find_extent(tree, ex->ee_block, NULL);
-+	if (IS_ERR(npath))
-+		return PTR_ERR(npath);
-+	depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block);
-+	EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len);
-+
-+	err = ext3_ext_insert_extent(handle, tree, npath, &tex);
-+	ext3_ext_drop_refs(npath);
-+	kfree(npath);
-+
-+	return err;
-+}
-+
-+static int
-+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree,
-+		 struct ext3_ext_path *path, unsigned long start,
-+		 unsigned long end)
-+{
-+	struct ext3_extent *ex, *fu = NULL, *lu, *le;
-+	int err = 0, correct_index = 0;
-+	int depth = EXT_DEPTH(tree), credits;
-+	struct ext3_extent_header *eh;
-+	unsigned a, b, block, num;
-+
-+	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
-+	if (!path[depth].p_hdr)
-+		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+	eh = path[depth].p_hdr;
-+	EXT_ASSERT(eh);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* find where to start removing */
-+	le = ex = EXT_LAST_EXTENT(eh);
-+	while (ex != EXT_FIRST_EXTENT(eh)) {
-+		if (ex->ee_block <= end)
-+			break;
-+		ex--;
-+	}
-+
-+	if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) {
-+		/* removal of internal part of the extent requested
-+		 * tail and head must be placed in different extent
-+		 * so, we have to insert one more extent */
-+		path[depth].p_ext = ex;
-+		return ext3_ext_split_for_rm(handle, tree, path, start, end);
-+	}
-+	
-+	lu = ex;
-+	while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) {
-+		ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len);
-+		path[depth].p_ext = ex;
-+	
-+		a = ex->ee_block > start ? ex->ee_block : start;
-+		b = ex->ee_block + ex->ee_len - 1 < end ?
-+			ex->ee_block + ex->ee_len - 1 : end;
-+		
-+		ext_debug(tree, "  border %u:%u\n", a, b);
-+
-+		if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) {
-+			block = 0;
-+			num = 0;
-+			BUG();
-+		} else if (a != ex->ee_block) {
-+			/* remove tail of the extent */
-+			block = ex->ee_block;
-+			num = a - block;
-+		} else if (b != ex->ee_block + ex->ee_len - 1) {
-+			/* remove head of the extent */
-+			block = a;
-+			num = b - a;
-+		} else {
-+			/* remove whole extent: excelent! */
-+			block = ex->ee_block; 
-+			num = 0;
-+			EXT_ASSERT(a == ex->ee_block &&
-+				   b == ex->ee_block + ex->ee_len - 1);
-+		}
-+
-+		if (ex == EXT_FIRST_EXTENT(eh))
-+			correct_index = 1;
-+
-+		credits = 1;
-+		if (correct_index)
-+			credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1;
-+		if (tree->ops->remove_extent_credits)
-+			credits+=tree->ops->remove_extent_credits(tree,ex,a,b);
-+		
-+		handle = ext3_ext_journal_restart(handle, credits);
-+		if (IS_ERR(handle)) {
-+			err = PTR_ERR(handle);
-+			goto out;
-+		}
-+
-+		err = ext3_ext_get_access(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		if (tree->ops->remove_extent)
-+			err = tree->ops->remove_extent(tree, ex, a, b);
-+		if (err)
-+			goto out;
-+
-+		if (num == 0) {
-+			/* this extent is removed entirely mark slot unused */
-+			ex->ee_start = ex->ee_start_hi = 0;
-+			eh->eh_entries--;
-+			fu = ex;
-+		}
-+
-+		ex->ee_block = block;
-+		ex->ee_len = num;
-+
-+		err = ext3_ext_dirty(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		ext_debug(tree, "new extent: %u:%u:%u\n",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+		ex--;
-+	}
-+
-+	if (fu) {
-+		/* reuse unused slots */
-+		while (lu < le) {
-+			if (lu->ee_start) {
-+				*fu = *lu;
-+				lu->ee_start = lu->ee_start_hi = 0;
-+				fu++;
-+			}
-+			lu++;
-+		}
-+	}
-+
-+	if (correct_index && eh->eh_entries)
-+		err = ext3_ext_correct_indexes(handle, tree, path);
-+
-+	/* if this leaf is free, then we should
-+	 * remove it from index block above */
-+	if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
-+		err = ext3_ext_rm_idx(handle, tree, path + depth);
-+
-+out:
-+	return err;
-+}
-+
-+
-+static struct ext3_extent_idx *
-+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block)
-+{
-+	struct ext3_extent_idx *ix;
-+	
-+	ix = EXT_LAST_INDEX(hdr);
-+	while (ix != EXT_FIRST_INDEX(hdr)) {
-+		if (ix->ei_block <= block)
-+			break;
-+		ix--;
-+	}
-+	return ix;
-+}
-+
-+/*
-+ * returns 1 if current index have to be freed (even partial)
-+ */
-+static int inline
-+ext3_ext_more_to_rm(struct ext3_ext_path *path)
-+{
-+	EXT_ASSERT(path->p_idx);
-+
-+	if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
-+		return 0;
-+
-+	/*
-+	 * if truncate on deeper level happened it it wasn't partial
-+	 * so we have to consider current index for truncation
-+	 */
-+	if (path->p_hdr->eh_entries == path->p_block)
-+		return 0;
-+	return 1;
-+}
-+
-+int ext3_ext_remove_space(struct ext3_extents_tree *tree,
-+			  unsigned long start, unsigned long end)
-+{
-+	struct inode *inode = tree->inode;
-+	struct super_block *sb = inode->i_sb;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_ext_path *path;
-+	handle_t *handle;
-+	int i = 0, err = 0;
-+
-+	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
-+
-+	/* probably first extent we're gonna free will be last in block */
-+	handle = ext3_journal_start(inode, depth + 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	ext3_ext_invalidate_cache(tree);
-+
-+	/*
-+	 * we start scanning from right side freeing all the blocks
-+	 * after i_size and walking into the deep
-+	 */
-+	path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL);
-+	if (IS_ERR(path)) {
-+		ext3_error(sb, __FUNCTION__, "Can't allocate path array");
-+		ext3_journal_stop(handle);
-+		return -ENOMEM;
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[i].p_hdr = EXT_ROOT_HDR(tree);
-+	
-+	while (i >= 0 && err == 0) {
-+		if (i == depth) {
-+			/* this is leaf block */
-+			err = ext3_ext_rm_leaf(handle, tree, path, start, end);
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			continue;
-+		}
-+		
-+		/* this is index block */
-+		if (!path[i].p_hdr) {
-+			ext_debug(tree, "initialize header\n");
-+			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
-+		}
-+
-+		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
-+		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
-+		
-+		if (!path[i].p_idx) {
-+			/* this level hasn't touched yet */
-+			path[i].p_idx =
-+				ext3_ext_last_covered(path[i].p_hdr, end);
-+			path[i].p_block = path[i].p_hdr->eh_entries + 1;
-+			ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n",
-+				  path[i].p_hdr, path[i].p_hdr->eh_entries);
-+		} else {
-+			/* we've already was here, see at next index */
-+			path[i].p_idx--;
-+		}
-+
-+		ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n",
-+			  i, EXT_FIRST_INDEX(path[i].p_hdr),
-+			  path[i].p_idx);
-+		if (ext3_ext_more_to_rm(path + i)) {
-+			/* go to the next level */
-+			ext_debug(tree, "move to level %d (block %d)\n",
-+				  i + 1, path[i].p_idx->ei_leaf);
-+			memset(path + i + 1, 0, sizeof(*path));
-+			path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf);
-+			if (!path[i+1].p_bh) {
-+				/* should we reset i_size? */
-+				err = -EIO;
-+				break;
-+			}
-+			/* put actual number of indexes to know is this
-+			 * number got changed at the next iteration */
-+			path[i].p_block = path[i].p_hdr->eh_entries;
-+			i++;
-+		} else {
-+			/* we finish processing this index, go up */
-+			if (path[i].p_hdr->eh_entries == 0 && i > 0) {
-+				/* index is empty, remove it
-+				 * handle must be already prepared by the
-+				 * truncatei_leaf() */
-+				err = ext3_ext_rm_idx(handle, tree, path + i);
-+			}
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			ext_debug(tree, "return to level %d\n", i);
-+		}
-+	}
-+
-+	/* TODO: flexible tree reduction should be here */
-+	if (path->p_hdr->eh_entries == 0) {
-+		/*
-+		 * truncate to zero freed all the tree
-+		 * so, we need to correct eh_depth
-+		 */
-+		err = ext3_ext_get_access(handle, tree, path);
-+		if (err == 0) {
-+			EXT_ROOT_HDR(tree)->eh_depth = 0;
-+			EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree);
-+			err = ext3_ext_dirty(handle, tree, path);
-+		}
-+	}
-+	ext3_ext_tree_changed(tree);
-+
-+	kfree(path);
-+	ext3_journal_stop(handle);
-+
-+	return err;
-+}
-+
-+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks)
-+{
-+	int lcap, icap, rcap, leafs, idxs, num;
-+
-+	rcap = ext3_ext_space_root(tree);
-+	if (blocks <= rcap) {
-+		/* all extents fit to the root */
-+		return 0;
-+	}
-+
-+	rcap = ext3_ext_space_root_idx(tree);
-+	lcap = ext3_ext_space_block(tree);
-+	icap = ext3_ext_space_block_idx(tree);
-+
-+	num = leafs = (blocks + lcap - 1) / lcap;
-+	if (leafs <= rcap) {
-+		/* all pointers to leafs fit to the root */
-+		return leafs;
-+	}
-+
-+	/* ok. we need separate index block(s) to link all leaf blocks */
-+	idxs = (leafs + icap - 1) / icap;
-+	do {
-+		num += idxs;
-+		idxs = (idxs + icap - 1) / icap;
-+	} while (idxs > rcap);
-+
-+	return num;
-+}
-+
-+/*
-+ * called at mount time
-+ */
-+void ext3_ext_init(struct super_block *sb)
-+{
-+	/*
-+	 * possible initialization would be here
-+	 */
-+
-+	if (test_opt(sb, EXTENTS)) {
-+		printk("EXT3-fs: file extents enabled");
-+#ifdef AGRESSIVE_TEST
-+		printk(", agressive tests");
-+#endif
-+#ifdef CHECK_BINSEARCH
-+		printk(", check binsearch");
-+#endif
-+		printk("\n");
-+	}
-+}
-+
-+/*
-+ * called at umount time
-+ */
-+void ext3_ext_release(struct super_block *sb)
-+{
-+}
-+
-+/************************************************************************
-+ * VFS related routines
-+ ************************************************************************/
-+
-+static int ext3_get_inode_write_access(handle_t *handle, void *buffer)
-+{
-+	/* we use in-core data, not bh */
-+	return 0;
-+}
-+
-+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer)
-+{
-+	struct inode *inode = buffer;
-+	return ext3_mark_inode_dirty(handle, inode);
-+}
-+
-+static int ext3_ext_mergable(struct ext3_extent *ex1,
-+			     struct ext3_extent *ex2)
-+{
-+	/* FIXME: support for large fs */
-+	if (ex1->ee_start + ex1->ee_len == ex2->ee_start)
-+		return 1;
-+	return 0;
-+}
-+
-+static int
-+ext3_remove_blocks_credits(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex,
-+			   unsigned long from, unsigned long to)
-+{
-+	int needed;
-+	
-+	/* at present, extent can't cross block group */;
-+	needed = 4; /* bitmap + group desc + sb + inode */
-+
-+#ifdef CONFIG_QUOTA
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+	return needed;
-+}
-+
-+static int
-+ext3_remove_blocks(struct ext3_extents_tree *tree,
-+		   struct ext3_extent *ex,
-+		   unsigned long from, unsigned long to)
-+{
-+	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
-+	handle_t *handle = ext3_journal_start(tree->inode, needed);
-+	struct buffer_head *bh;
-+	int i;
-+
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
-+		/* tail removal */
-+		unsigned long num, start;
-+		num = ex->ee_block + ex->ee_len - from;
-+		start = ex->ee_start + ex->ee_len - num;
-+		ext_debug(tree, "free last %lu blocks starting %lu\n",
-+			  num, start);
-+		for (i = 0; i < num; i++) {
-+			bh = sb_find_get_block(tree->inode->i_sb, start + i);
-+			ext3_forget(handle, 0, tree->inode, bh, start + i);
-+		}
-+		ext3_free_blocks(handle, tree->inode, start, num);
-+	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
-+		printk("strange request: removal %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	} else {
-+		printk("strange request: removal(2) %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	}
-+	ext3_journal_stop(handle);
-+	return 0;
-+}
-+
-+static int ext3_ext_find_goal(struct inode *inode,
-+			      struct ext3_ext_path *path, unsigned long block)
-+{
-+	struct ext3_inode_info *ei = EXT3_I(inode);
-+	unsigned long bg_start;
-+	unsigned long colour;
-+	int depth;
-+	
-+	if (path) {
-+		struct ext3_extent *ex;
-+		depth = path->p_depth;
-+		
-+		/* try to predict block placement */
-+		if ((ex = path[depth].p_ext))
-+			return ex->ee_start + (block - ex->ee_block);
-+
-+		/* it looks index is empty
-+		 * try to find starting from index itself */
-+		if (path[depth].p_bh)
-+			return path[depth].p_bh->b_blocknr;
-+	}
-+
-+	/* OK. use inode's group */
-+	bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+		le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+	colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+	return bg_start + colour + block;
-+}
-+
-+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path,
-+			     struct ext3_extent *ex, int *err)
-+{
-+	struct inode *inode = tree->inode;
-+	int newblock, goal;
-+	
-+	EXT_ASSERT(path);
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(ex->ee_start);
-+	EXT_ASSERT(ex->ee_len);
-+	
-+	/* reuse block from the extent to order data/metadata */
-+	newblock = ex->ee_start++;
-+	ex->ee_len--;
-+	if (ex->ee_len == 0) {
-+		ex->ee_len = 1;
-+		/* allocate new block for the extent */
-+		goal = ext3_ext_find_goal(inode, path, ex->ee_block);
-+		ex->ee_start = ext3_new_block(handle, inode, goal, err);
-+		ex->ee_start_hi = 0;
-+		if (ex->ee_start == 0) {
-+			/* error occured: restore old extent */
-+			ex->ee_start = newblock;
-+			return 0;
-+		}
-+	}
-+	return newblock;
-+}
-+
-+static struct ext3_extents_helpers ext3_blockmap_helpers = {
-+	.get_write_access	= ext3_get_inode_write_access,
-+	.mark_buffer_dirty	= ext3_mark_buffer_dirty,
-+	.mergable		= ext3_ext_mergable,
-+	.new_block		= ext3_new_block_cb,
-+	.remove_extent		= ext3_remove_blocks,
-+	.remove_extent_credits	= ext3_remove_blocks_credits,
-+};
-+
-+void ext3_init_tree_desc(struct ext3_extents_tree *tree,
-+			 struct inode *inode)
-+{
-+	tree->inode = inode;
-+	tree->root = (void *) EXT3_I(inode)->i_data;
-+	tree->buffer = (void *) inode;
-+	tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
-+	tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent;
-+	tree->ops = &ext3_blockmap_helpers;
-+}
-+
-+int ext3_ext_get_block(handle_t *handle, struct inode *inode,
-+		       long iblock, struct buffer_head *bh_result,
-+		       int create, int extend_disksize)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_extent newex;
-+	struct ext3_extent *ex;
-+	int goal, newblock, err = 0, depth;
-+	struct ext3_extents_tree tree;
-+
-+	clear_buffer_new(bh_result);
-+	ext3_init_tree_desc(&tree, inode);
-+	ext_debug(&tree, "block %d requested for inode %u\n",
-+		  (int) iblock, (unsigned) inode->i_ino);
-+	down(&EXT3_I(inode)->truncate_sem);
-+
-+	/* check in cache */
-+	if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) {
-+		if (goal == EXT3_EXT_CACHE_GAP) {
-+			if (!create) {
-+				/* block isn't allocated yet and
-+				 * user don't want to allocate it */
-+				goto out2;
-+			}
-+			/* we should allocate requested block */
-+		} else if (goal == EXT3_EXT_CACHE_EXTENT) {
-+			/* block is already allocated */
-+			newblock = iblock - newex.ee_block + newex.ee_start;
-+			goto out;
-+		} else {
-+			EXT_ASSERT(0);
-+		}
-+	}
-+
-+	/* find extent for this block */
-+	path = ext3_ext_find_extent(&tree, iblock, NULL);
-+	if (IS_ERR(path)) {
-+		err = PTR_ERR(path);
-+		path = NULL;
-+		goto out2;
-+	}
-+
-+	depth = EXT_DEPTH(&tree);
-+
-+	/*
-+	 * consistent leaf must not be empty
-+	 * this situations is possible, though, _during_ tree modification
-+	 * this is why assert can't be put in ext3_ext_find_extent()
-+	 */
-+	EXT_ASSERT(path[depth].p_ext != NULL || depth == 0);
-+
-+	if ((ex = path[depth].p_ext)) {
-+		/* if found exent covers block, simple return it */
-+		if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) {
-+			newblock = iblock - ex->ee_block + ex->ee_start;
-+			ext_debug(&tree, "%d fit into %d:%d -> %d\n",
-+				  (int) iblock, ex->ee_block, ex->ee_len,
-+				  newblock);
-+			ext3_ext_put_in_cache(&tree, ex->ee_block,
-+					      ex->ee_len, ex->ee_start,
-+					      EXT3_EXT_CACHE_EXTENT);
-+			goto out;
-+		}
-+	}
-+
-+	/*
-+	 * requested block isn't allocated yet
-+	 * we couldn't try to create block if create flag is zero 
-+	 */
-+	if (!create) {
-+		/* put just found gap into cache to speedup subsequest reqs */
-+		ext3_ext_put_gap_in_cache(&tree, path, iblock);
-+		goto out2;
-+	}
-+
-+	/* allocate new block */
-+	goal = ext3_ext_find_goal(inode, path, iblock);
-+	newblock = ext3_new_block(handle, inode, goal, &err);
-+	if (!newblock)
-+		goto out2;
-+	ext_debug(&tree, "allocate new block: goal %d, found %d\n",
-+		  goal, newblock);
-+
-+	/* try to insert new extent into found leaf and return */
-+	newex.ee_block = iblock;
-+	newex.ee_start = newblock;
-+	newex.ee_start_hi = 0;
-+	newex.ee_len = 1;
-+	err = ext3_ext_insert_extent(handle, &tree, path, &newex);
-+	if (err)
-+		goto out2;
-+	
-+	if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize)
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+
-+	/* previous routine could use block we allocated */
-+	newblock = newex.ee_start;
-+	set_buffer_new(bh_result);
-+
-+	ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len,
-+			      newex.ee_start, EXT3_EXT_CACHE_EXTENT);
-+out:
-+	ext3_ext_show_leaf(&tree, path);
-+	map_bh(bh_result, inode->i_sb, newblock);
-+out2:
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	up(&EXT3_I(inode)->truncate_sem);
-+
-+	return err;	
-+}
-+
-+void ext3_ext_truncate(struct inode * inode, struct page *page)
-+{
-+	struct address_space *mapping = inode->i_mapping;
-+	struct super_block *sb = inode->i_sb;
-+	struct ext3_extents_tree tree;
-+	unsigned long last_block;
-+	handle_t *handle;
-+	int err = 0;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+
-+	/*
-+	 * probably first extent we're gonna free will be last in block
-+	 */
-+	err = ext3_writepage_trans_blocks(inode) + 3;
-+	handle = ext3_journal_start(inode, err);
-+	if (IS_ERR(handle)) {
-+		if (page) {
-+			clear_highpage(page);
-+			flush_dcache_page(page);
-+			unlock_page(page);
-+			page_cache_release(page);
-+		}
-+		return;
-+	}
-+
-+	if (page)
-+		ext3_block_truncate_page(handle, page, mapping, inode->i_size);
-+
-+	down(&EXT3_I(inode)->truncate_sem);
-+	ext3_ext_invalidate_cache(&tree);
-+
-+	/* 
-+	 * TODO: optimization is possible here
-+	 * probably we need not scaning at all,
-+	 * because page truncation is enough
-+	 */
-+	if (ext3_orphan_add(handle, inode))
-+		goto out_stop;
-+
-+	/* we have to know where to truncate from in crash case */
-+	EXT3_I(inode)->i_disksize = inode->i_size;
-+	ext3_mark_inode_dirty(handle, inode);
-+
-+	last_block = (inode->i_size + sb->s_blocksize - 1) >>
-+			EXT3_BLOCK_SIZE_BITS(sb);
-+	err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK);
-+	
-+	/* In a multi-transaction truncate, we only make the final
-+	 * transaction synchronous */
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+
-+out_stop:
-+	/*
-+	 * If this was a simple ftruncate(), and the file will remain alive
-+	 * then we need to clear up the orphan record which we created above.
-+	 * However, if this was a real unlink then we were called by
-+	 * ext3_delete_inode(), and we allow that function to clean up the
-+	 * orphan info for us.
-+	 */
-+	if (inode->i_nlink)
-+		ext3_orphan_del(handle, inode);
-+
-+	up(&EXT3_I(inode)->truncate_sem);
-+	ext3_journal_stop(handle);
-+}
-+
-+/*
-+ * this routine calculate max number of blocks we could modify
-+ * in order to allocate new block for an inode
-+ */
-+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num)
-+{
-+	struct ext3_extents_tree tree;
-+	int needed;
-+	
-+	ext3_init_tree_desc(&tree, inode);
-+	
-+	needed = ext3_ext_calc_credits_for_insert(&tree, NULL);
-+
-+	/* caller want to allocate num blocks */
-+	needed *= num;
-+	
-+#ifdef CONFIG_QUOTA
-+	/* 
-+	 * FIXME: real calculation should be here
-+	 * it depends on blockmap format of qouta file
-+	 */
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return needed;
-+}
-+
-+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	ext3_extent_tree_init(handle, &tree);
-+}
-+
-+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	return ext3_ext_calc_metadata_amount(&tree, blocks);
-+}
-+	
-+static int
-+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree,
-+			 struct ext3_ext_path *path,
-+			 struct ext3_ext_cache *newex)
-+{
-+	struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private;
-+
-+	if (newex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	if (buf->err < 0)
-+		return EXT_BREAK;
-+	if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen)
-+		return EXT_BREAK;
-+
-+	if (!copy_to_user(buf->cur, newex, sizeof(*newex))) {
-+		buf->err++;
-+		buf->cur += sizeof(*newex);
-+	} else {
-+		buf->err = -EFAULT;
-+		return EXT_BREAK;
-+	}
-+	return EXT_CONTINUE;
-+}
-+
-+static int
-+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_ext_cache *ex)
-+{
-+	struct ext3_extent_tree_stats *buf =
-+		(struct ext3_extent_tree_stats *) tree->private;
-+	int depth;
-+
-+	if (ex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	depth = EXT_DEPTH(tree);
-+	buf->extents_num++;
-+	if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr))
-+		buf->leaf_num++;
-+	return EXT_CONTINUE;
-+}
-+
-+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-+		   unsigned long arg)
-+{
-+	int err = 0;
-+
-+	if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL))
-+		return -EINVAL;
-+
-+	if (cmd == EXT3_IOC_GET_EXTENTS) {
-+		struct ext3_extent_buf buf;
-+		struct ext3_extents_tree tree;
-+
-+		if (copy_from_user(&buf, (void *) arg, sizeof(buf)))
-+			return -EFAULT;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		buf.cur = buf.buffer;
-+		buf.err = 0;
-+		tree.private = &buf;
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK,
-+					  ext3_ext_store_extent_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (err == 0)
-+			err = buf.err;
-+	} else if (cmd == EXT3_IOC_GET_TREE_STATS) {
-+		struct ext3_extent_tree_stats buf;
-+		struct ext3_extents_tree tree;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		buf.depth = EXT_DEPTH(&tree);
-+		buf.extents_num = 0;
-+		buf.leaf_num = 0;
-+		tree.private = &buf;
-+		err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK,
-+					  ext3_ext_collect_stats_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (!err)
-+			err = copy_to_user((void *) arg, &buf, sizeof(buf));
-+	} else if (cmd == EXT3_IOC_GET_TREE_DEPTH) {
-+		struct ext3_extents_tree tree;
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = EXT_DEPTH(&tree);
-+		up(&EXT3_I(inode)->truncate_sem);
-+	}
-+
-+	return err;
-+}
-+
-+EXPORT_SYMBOL(ext3_init_tree_desc);
-+EXPORT_SYMBOL(ext3_mark_inode_dirty);
-+EXPORT_SYMBOL(ext3_ext_invalidate_cache);
-+EXPORT_SYMBOL(ext3_ext_insert_extent);
-+EXPORT_SYMBOL(ext3_ext_walk_space);
-+EXPORT_SYMBOL(ext3_ext_find_goal);
-+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert);
-Index: linux-2.6.12-rc6/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/ialloc.c	2005-06-14 16:31:08.634433030 +0200
-+++ linux-2.6.12-rc6/fs/ext3/ialloc.c	2005-06-14 16:31:25.846346882 +0200
-@@ -598,7 +598,7 @@
- 	ei->i_dir_start_lookup = 0;
- 	ei->i_disksize = 0;
- 
--	ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL;
-+	ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL);
- 	if (S_ISLNK(mode))
- 		ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL);
- 	/* dirsync only applies to directories */
-@@ -639,6 +639,18 @@
- 		DQUOT_FREE_INODE(inode);
- 		goto fail2;
-   	}
-+	if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
-+		EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
-+		ext3_extents_initialize_blockmap(handle, inode);
-+		if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
-+			err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-+			if (err) goto fail;
-+			EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS);
-+			BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata");
-+			err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-+		}
-+	}
-+
- 	err = ext3_mark_inode_dirty(handle, inode);
- 	if (err) {
- 		ext3_std_error(sb, err);
-Index: linux-2.6.12-rc6/fs/ext3/inode.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/inode.c	2005-06-14 16:31:09.701815830 +0200
-+++ linux-2.6.12-rc6/fs/ext3/inode.c	2005-06-14 16:31:25.861971882 +0200
-@@ -40,7 +40,7 @@
- #include "iopen.h"
- #include "acl.h"
- 
--static int ext3_writepage_trans_blocks(struct inode *inode);
-+int ext3_writepage_trans_blocks(struct inode *inode);
- 
- /*
-  * Test whether an inode is a fast symlink.
-@@ -784,6 +784,17 @@
- 	return err;
- }
- 
-+static inline int
-+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block,
-+		    struct buffer_head *bh, int create, int extend_disksize)
-+{
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_get_block(handle, inode, block, bh, create,
-+					  extend_disksize);
-+	return ext3_get_block_handle(handle, inode, block, bh, create,
-+				     extend_disksize);
-+}
-+
- static int ext3_get_block(struct inode *inode, sector_t iblock,
- 			struct buffer_head *bh_result, int create)
- {
-@@ -794,8 +805,8 @@
- 		handle = ext3_journal_current_handle();
- 		J_ASSERT(handle != 0);
- 	}
--	ret = ext3_get_block_handle(handle, inode, iblock,
--				bh_result, create, 1);
-+	ret = ext3_get_block_wrap(handle, inode, iblock,
-+				  bh_result, create, 1);
- 	return ret;
- }
- 
-@@ -839,7 +850,7 @@
- 
- get_block:
- 	if (ret == 0)
--		ret = ext3_get_block_handle(handle, inode, iblock,
-+		ret = ext3_get_block_wrap(handle, inode, iblock,
- 					bh_result, create, 0);
- 	bh_result->b_size = (1 << inode->i_blkbits);
- 	return ret;
-@@ -859,7 +870,7 @@
- 	dummy.b_state = 0;
- 	dummy.b_blocknr = -1000;
- 	buffer_trace_init(&dummy.b_history);
--	*errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1);
-+	*errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1);
- 	if (!*errp && buffer_mapped(&dummy)) {
- 		struct buffer_head *bh;
- 		bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
-@@ -1593,7 +1604,7 @@
-  * This required during truncate. We need to physically zero the tail end
-  * of that block so it doesn't yield old data if the file is later grown.
-  */
--static int ext3_block_truncate_page(handle_t *handle, struct page *page,
-+int ext3_block_truncate_page(handle_t *handle, struct page *page,
- 		struct address_space *mapping, loff_t from)
- {
- 	unsigned long index = from >> PAGE_CACHE_SHIFT;
-@@ -2104,6 +2115,9 @@
- 			return;
- 	}
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_truncate(inode, page);
-+
- 	handle = start_transaction(inode);
- 	if (IS_ERR(handle)) {
- 		if (page) {
-@@ -2850,12 +2864,15 @@
-  * block and work out the exact number of indirects which are touched.  Pah.
-  */
- 
--static int ext3_writepage_trans_blocks(struct inode *inode)
-+int ext3_writepage_trans_blocks(struct inode *inode)
- {
- 	int bpp = ext3_journal_blocks_per_page(inode);
- 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
- 	int ret;
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_writepage_trans_blocks(inode, bpp);
-+
- 	if (ext3_should_journal_data(inode))
- 		ret = 3 * (bpp + indirects) + 2;
- 	else
-Index: linux-2.6.12-rc6/fs/ext3/Makefile
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/Makefile	2005-06-14 16:31:09.179354899 +0200
-+++ linux-2.6.12-rc6/fs/ext3/Makefile	2005-06-14 16:31:25.872714069 +0200
-@@ -5,7 +5,8 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
--	   ioctl.o namei.o super.o symlink.o hash.o resize.o
-+	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
-+	   extents.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-2.6.12-rc6/fs/ext3/super.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/super.c	2005-06-14 16:31:09.950839264 +0200
-+++ linux-2.6.12-rc6/fs/ext3/super.c	2005-06-14 16:31:25.886385944 +0200
-@@ -387,6 +387,7 @@
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
- 	if (!(sb->s_flags & MS_RDONLY)) {
-@@ -451,6 +452,8 @@
- #endif
- 	ei->i_block_alloc_info = NULL;
- 	ei->vfs_inode.i_version = 1;
-+	
-+	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
- 	return &ei->vfs_inode;
- }
- 
-@@ -593,6 +596,7 @@
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+	Opt_extents, Opt_noextents, Opt_extdebug,
- };
- 
- static match_table_t tokens = {
-@@ -644,6 +647,9 @@
- 	{Opt_iopen, "iopen"},
- 	{Opt_noiopen, "noiopen"},
- 	{Opt_iopen_nopriv, "iopen_nopriv"},
-+	{Opt_extents, "extents"},
-+	{Opt_noextents, "noextents"},
-+	{Opt_extdebug, "extdebug"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -953,6 +958,15 @@
- 		case Opt_nobh:
- 			set_opt(sbi->s_mount_opt, NOBH);
- 			break;
-+		case Opt_extents:
-+			set_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_noextents:
-+			clear_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_extdebug:
-+			set_opt (sbi->s_mount_opt, EXTDEBUG);
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1668,6 +1681,7 @@
- 	percpu_counter_mod(&sbi->s_dirs_counter,
- 		ext3_count_dirs(sb));
- 
-+	ext3_ext_init(sb);
- 	lock_kernel();
- 	return 0;
- 
-Index: linux-2.6.12-rc6/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/ioctl.c	2005-06-14 16:31:08.646151780 +0200
-+++ linux-2.6.12-rc6/fs/ext3/ioctl.c	2005-06-14 16:31:25.897128131 +0200
-@@ -124,6 +124,10 @@
- 			err = ext3_change_inode_journal_flag(inode, jflag);
- 		return err;
- 	}
-+	case EXT3_IOC_GET_EXTENTS:
-+	case EXT3_IOC_GET_TREE_STATS:
-+	case EXT3_IOC_GET_TREE_DEPTH:
-+		return ext3_ext_ioctl(inode, filp, cmd, arg);
- 	case EXT3_IOC_GETVERSION:
- 	case EXT3_IOC_GETVERSION_OLD:
- 		return put_user(inode->i_generation, (int __user *) arg);
-Index: linux-2.6.12-rc6/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.12-rc6.orig/include/linux/ext3_fs.h	2005-06-14 16:31:10.185214261 +0200
-+++ linux-2.6.12-rc6/include/linux/ext3_fs.h	2005-06-14 16:31:52.859041864 +0200
-@@ -186,8 +186,9 @@
- #define EXT3_NOTAIL_FL			0x00008000 /* don't merge file tail */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL			0x00080000 /* Inode uses extents */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
-+#define EXT3_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
- #define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
- 
-@@ -237,6 +238,9 @@
- #endif
- #define EXT3_IOC_GETRSVSZ		_IOR('f', 5, long)
- #define EXT3_IOC_SETRSVSZ		_IOW('f', 6, long)
-+#define EXT3_IOC_GET_EXTENTS		_IOR('f', 7, long)
-+#define EXT3_IOC_GET_TREE_DEPTH		_IOR('f', 8, long)
-+#define EXT3_IOC_GET_TREE_STATS		_IOR('f', 9, long)
- 
- /*
-  * Structure of an inode on the disk
-@@ -360,6 +364,8 @@
- #define EXT3_MOUNT_NOBH			0x40000 /* No bufferheads */
- #define EXT3_MOUNT_IOPEN		0x80000	/* Allow access via iopen */
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
-+#define EXT3_MOUNT_EXTENTS		0x200000/* Extents support */
-+#define EXT3_MOUNT_EXTDEBUG		0x400000/* Extents debug */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -548,11 +554,13 @@
- #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
- #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
-+#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
- 
- #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
- 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
--					 EXT3_FEATURE_INCOMPAT_META_BG)
-+					 EXT3_FEATURE_INCOMPAT_META_BG| \
-+					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-@@ -759,6 +767,9 @@
- 
- 
- /* inode.c */
-+extern int ext3_block_truncate_page(handle_t *, struct page *,
-+				    struct address_space *, loff_t);
-+extern int ext3_writepage_trans_blocks(struct inode *inode);
- extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-@@ -828,6 +837,16 @@
- extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
- 
-+/* extents.c */
-+extern int ext3_ext_writepage_trans_blocks(struct inode *, int);
-+extern int ext3_ext_get_block(handle_t *, struct inode *, long,
-+			      struct buffer_head *, int, int);
-+extern void ext3_ext_truncate(struct inode *, struct page *);
-+extern void ext3_ext_init(struct super_block *);
-+extern void ext3_ext_release(struct super_block *);
-+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
-+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
-+			  unsigned int cmd, unsigned long arg);
- 
- #endif	/* __KERNEL__ */
- 
-Index: linux-2.6.12-rc6/include/linux/ext3_extents.h
-===================================================================
---- linux-2.6.12-rc6.orig/include/linux/ext3_extents.h	2005-06-14 16:31:25.780917195 +0200
-+++ linux-2.6.12-rc6/include/linux/ext3_extents.h	2005-06-14 16:31:25.932284381 +0200
-@@ -0,0 +1,262 @@
-+/*
-+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+#ifndef _LINUX_EXT3_EXTENTS
-+#define _LINUX_EXT3_EXTENTS
-+
-+/*
-+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
-+ * become very little, so index split, in-depth growing and
-+ * other hard changes happens much more often
-+ * this is for debug purposes only
-+ */
-+#define AGRESSIVE_TEST_
-+
-+/*
-+ * if CHECK_BINSEARCH defined, then results of binary search
-+ * will be checked by linear search
-+ */
-+#define CHECK_BINSEARCH_
-+
-+/*
-+ * if EXT_DEBUG is defined you can use 'extdebug' mount option
-+ * to get lots of info what's going on
-+ */
-+#define EXT_DEBUG_
-+#ifdef EXT_DEBUG
-+#define ext_debug(tree,fmt,a...)			\
-+do {							\
-+	if (test_opt((tree)->inode->i_sb, EXTDEBUG))	\
-+		printk(fmt, ##a);			\
-+} while (0);
-+#else
-+#define ext_debug(tree,fmt,a...)
-+#endif
-+
-+/*
-+ * if EXT_STATS is defined then stats numbers are collected
-+ * these number will be displayed at umount time
-+ */
-+#define EXT_STATS_
-+
-+
-+#define EXT3_ALLOC_NEEDED	3	/* block bitmap + group desc. + sb */
-+
-+/*
-+ * ext3_inode has i_block array (total 60 bytes)
-+ * first 4 bytes are used to store:
-+ *  - tree depth (0 mean there is no tree yet. all extents in the inode)
-+ *  - number of alive extents in the inode
-+ */
-+
-+/*
-+ * this is extent on-disk structure
-+ * it's used at the bottom of the tree
-+ */
-+struct ext3_extent {
-+	__u32	ee_block;	/* first logical block extent covers */
-+	__u16	ee_len;		/* number of blocks covered by extent */
-+	__u16	ee_start_hi;	/* high 16 bits of physical block */
-+	__u32	ee_start;	/* low 32 bigs of physical block */
-+};
-+
-+/*
-+ * this is index on-disk structure
-+ * it's used at all the levels, but the bottom
-+ */
-+struct ext3_extent_idx {
-+	__u32	ei_block;	/* index covers logical blocks from 'block' */
-+	__u32	ei_leaf;	/* pointer to the physical block of the next *
-+				 * level. leaf or next index could bet here */
-+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
-+	__u16	ei_unused;
-+};
-+
-+/*
-+ * each block (leaves and indexes), even inode-stored has header
-+ */
-+struct ext3_extent_header {	
-+	__u16	eh_magic;	/* probably will support different formats */	
-+	__u16	eh_entries;	/* number of valid entries */
-+	__u16	eh_max;		/* capacity of store in entries */
-+	__u16	eh_depth;	/* has tree real underlaying blocks? */
-+	__u32	eh_generation;	/* flags(8 bits) | generation of the tree */
-+};
-+
-+#define EXT3_EXT_MAGIC		0xf30a
-+
-+/*
-+ * array of ext3_ext_path contains path to some extent
-+ * creation/lookup routines use it for traversal/splitting/etc
-+ * truncate uses it to simulate recursive walking
-+ */
-+struct ext3_ext_path {
-+	__u32				p_block;
-+	__u16				p_depth;
-+	struct ext3_extent		*p_ext;
-+	struct ext3_extent_idx		*p_idx;
-+	struct ext3_extent_header	*p_hdr;
-+	struct buffer_head		*p_bh;
-+};
-+
-+/*
-+ * structure for external API
-+ */
-+
-+/*
-+ * storage for cached extent
-+ */
-+struct ext3_ext_cache {
-+	__u32	ec_start;
-+	__u32	ec_block;
-+	__u32	ec_len;
-+	__u32	ec_type;
-+};
-+
-+#define EXT3_EXT_CACHE_NO	0
-+#define EXT3_EXT_CACHE_GAP	1
-+#define EXT3_EXT_CACHE_EXTENT	2
-+
-+/*
-+ * ext3_extents_tree is used to pass initial information
-+ * to top-level extents API
-+ */
-+struct ext3_extents_helpers;
-+struct ext3_extents_tree {
-+	struct inode *inode;	/* inode which tree belongs to */
-+	void *root;		/* ptr to data top of tree resides at */
-+	void *buffer;		/* will be passed as arg to ^^ routines	*/
-+	int buffer_len;
-+	void *private;
-+	struct ext3_ext_cache *cex;/* last found extent */
-+	struct ext3_extents_helpers *ops;
-+};
-+
-+struct ext3_extents_helpers {
-+	int (*get_write_access)(handle_t *h, void *buffer);
-+	int (*mark_buffer_dirty)(handle_t *h, void *buffer);
-+	int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2);
-+	int (*remove_extent_credits)(struct ext3_extents_tree *,
-+				     struct ext3_extent *, unsigned long,
-+				     unsigned long);
-+	int (*remove_extent)(struct ext3_extents_tree *,
-+			     struct ext3_extent *, unsigned long,
-+			     unsigned long);
-+	int (*new_block)(handle_t *, struct ext3_extents_tree *,
-+			 struct ext3_ext_path *, struct ext3_extent *,
-+			 int *);
-+};
-+
-+/*
-+ * to be called by ext3_ext_walk_space()
-+ * negative retcode - error
-+ * positive retcode - signal for ext3_ext_walk_space(), see below
-+ * callback must return valid extent (passed or newly created)
-+ */
-+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *,
-+				    struct ext3_ext_path *,
-+				    struct ext3_ext_cache *);
-+
-+#define EXT_CONTINUE	0
-+#define EXT_BREAK	1
-+#define EXT_REPEAT	2
-+
-+
-+#define EXT_MAX_BLOCK	0xffffffff
-+
-+
-+#define EXT_FIRST_EXTENT(__hdr__) \
-+	((struct ext3_extent *) (((char *) (__hdr__)) +		\
-+				 sizeof(struct ext3_extent_header)))
-+#define EXT_FIRST_INDEX(__hdr__) \
-+	((struct ext3_extent_idx *) (((char *) (__hdr__)) +	\
-+				     sizeof(struct ext3_extent_header)))
-+#define EXT_HAS_FREE_INDEX(__path__) \
-+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
-+#define EXT_LAST_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_LAST_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_MAX_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_MAX_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_HDR_GEN(__hdr__)	((__hdr__)->eh_generation & 0x00ffffff)
-+#define EXT_FLAGS(__hdr__)	((__hdr__)->eh_generation >> 24)
-+#define EXT_FLAGS_CLR_UNKNOWN	0x7	/* Flags cleared on modification */
-+
-+#define EXT_BLOCK_HDR(__bh__) 	((struct ext3_extent_header *)(__bh__)->b_data)
-+#define EXT_ROOT_HDR(__tree__)	((struct ext3_extent_header *)(__tree__)->root)
-+#define EXT_DEPTH(__tree__)	(EXT_ROOT_HDR(__tree__)->eh_depth)
-+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__))
-+
-+#define EXT_ASSERT(__x__) if (!(__x__)) BUG();
-+
-+#define EXT_CHECK_PATH(tree,path)					\
-+{									\
-+	int depth = EXT_DEPTH(tree);					\
-+	BUG_ON((unsigned long) (path) < __PAGE_OFFSET);			\
-+	BUG_ON((unsigned long) (path)[depth].p_idx <			\
-+			__PAGE_OFFSET && (path)[depth].p_idx != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_ext <			\
-+			__PAGE_OFFSET && (path)[depth].p_ext != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET);	\
-+	BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET	\
-+			&& depth != 0);					\
-+	BUG_ON((path)[0].p_depth != depth);				\
-+}
-+
-+
-+/*
-+ * this structure is used to gather extents from the tree via ioctl
-+ */
-+struct ext3_extent_buf {
-+	unsigned long start;
-+	int buflen;
-+	void *buffer;
-+	void *cur;
-+	int err;
-+};
-+
-+/*
-+ * this structure is used to collect stats info about the tree
-+ */
-+struct ext3_extent_tree_stats {
-+	int depth;
-+	int extents_num;
-+	int leaf_num;
-+};
-+
-+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *);
-+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *);
-+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *);
-+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *);
-+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback);
-+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
-+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
-+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int);
-+
-+static inline void
-+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree)
-+{
-+	if (tree->cex)
-+		tree->cex->ec_type = EXT3_EXT_CACHE_NO;
-+}
-+
-+
-+#endif /* _LINUX_EXT3_EXTENTS */
-Index: linux-2.6.12-rc6/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.12-rc6.orig/include/linux/ext3_fs_i.h	2005-06-06 17:22:29.000000000 +0200
-+++ linux-2.6.12-rc6/include/linux/ext3_fs_i.h	2005-06-14 16:31:25.941073443 +0200
-@@ -133,6 +133,8 @@
- 	 */
- 	struct semaphore truncate_sem;
- 	struct inode vfs_inode;
-+
-+	__u32 i_cached_extent[4];
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch
deleted file mode 100644
index ea69e84b465df5219f2704b472828e15ddea0d91..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.15.patch
+++ /dev/null
@@ -1,2947 +0,0 @@
-Index: linux-2.6.16.21-0.8/fs/ext3/extents.c
-===================================================================
---- /dev/null
-+++ linux-2.6.16.21-0.8/fs/ext3/extents.c
-@@ -0,0 +1,2359 @@
-+/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+/*
-+ * Extents support for EXT3
-+ *
-+ * TODO:
-+ *   - ext3_ext_walk_space() sould not use ext3_ext_find_extent()
-+ *   - ext3_ext_calc_credits() could take 'mergable' into account
-+ *   - ext3*_error() should be used in some situations
-+ *   - find_goal() [to be tested and improved]
-+ *   - smart tree reduction
-+ *   - arch-independence
-+ *     common on-disk format for big/little-endian arch
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/fs.h>
-+#include <linux/time.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/smp_lock.h>
-+#include <linux/highuid.h>
-+#include <linux/pagemap.h>
-+#include <linux/quotaops.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/ext3_extents.h>
-+#include <asm/uaccess.h>
-+
-+
-+static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
-+{
-+	if (eh->eh_magic != EXT3_EXT_MAGIC) {
-+		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
-+		       (unsigned)eh->eh_magic);
-+		return -EIO;
-+	}
-+	if (eh->eh_max == 0) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
-+		       (unsigned)eh->eh_max);
-+		return -EIO;
-+	}
-+	if (eh->eh_entries > eh->eh_max) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
-+		       (unsigned)eh->eh_entries);
-+		return -EIO;
-+	}
-+	return 0;
-+}
-+
-+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
-+{
-+	int err;
-+
-+	if (handle->h_buffer_credits > needed)
-+		return handle;
-+	if (!ext3_journal_extend(handle, needed))
-+		return handle;
-+	err = ext3_journal_restart(handle, needed);
-+	
-+	return handle;
-+}
-+
-+static int inline
-+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->get_write_access)
-+		return tree->ops->get_write_access(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+static int inline
-+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->mark_buffer_dirty)
-+		return tree->ops->mark_buffer_dirty(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ */
-+static int ext3_ext_get_access(handle_t *handle,
-+			       struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+	int err;
-+
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err = ext3_journal_get_write_access(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_get_access_for_root(handle, tree);
-+	}
-+	return err;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ *  - EIO
-+ */
-+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path)
-+{
-+	int err;
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err =ext3_journal_dirty_metadata(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_mark_root_dirty(handle, tree);
-+	}
-+	return err;
-+}
-+
-+static int inline
-+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, struct ext3_extent *ex,
-+		   int *err)
-+{
-+	int goal, depth, newblock;
-+	struct inode *inode;
-+
-+	EXT_ASSERT(tree);
-+	if (tree->ops->new_block)
-+		return tree->ops->new_block(handle, tree, path, ex, err);
-+
-+	inode = tree->inode;
-+	depth = EXT_DEPTH(tree);
-+	if (path && depth > 0) {
-+		goal = path[depth-1].p_block;
-+	} else {
-+		struct ext3_inode_info *ei = EXT3_I(inode);
-+		unsigned long bg_start;
-+		unsigned long colour;
-+
-+		bg_start = (ei->i_block_group *
-+			    EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+			le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+		colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+		goal = bg_start + colour;
-+	}
-+
-+	newblock = ext3_new_block(handle, inode, goal, err);
-+	return newblock;
-+}
-+
-+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *neh = EXT_ROOT_HDR(tree);
-+	neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) |
-+			     (EXT_HDR_GEN(neh) + 1);
-+}
-+
-+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 6;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 5;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 3;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 4;
-+#endif
-+	return size;
-+}
-+
-+static void ext3_ext_show_path(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int k, l = path->p_depth;
-+
-+	ext_debug(tree, "path:");
-+	for (k = 0; k <= l; k++, path++) {
-+		if (path->p_idx) {
-+			ext_debug(tree, "  %d->%d", path->p_idx->ei_block,
-+				  path->p_idx->ei_leaf);
-+		} else if (path->p_ext) {
-+			ext_debug(tree, "  %d:%d:%d",
-+				  path->p_ext->ee_block,
-+				  path->p_ext->ee_len,
-+				  path->p_ext->ee_start);
-+		} else
-+			ext_debug(tree, "  []");
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *eh;
-+	struct ext3_extent *ex;
-+	int i;
-+
-+	if (!path)
-+		return;
-+
-+	eh = path[depth].p_hdr;
-+	ex = EXT_FIRST_EXTENT(eh);
-+
-+	for (i = 0; i < eh->eh_entries; i++, ex++) {
-+		ext_debug(tree, "%d:%d:%d ",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_drop_refs(struct ext3_ext_path *path)
-+{
-+	int depth = path->p_depth;
-+	int i;
-+
-+	for (i = 0; i <= depth; i++, path++) {
-+		if (path->p_bh) {
-+			brelse(path->p_bh);
-+			path->p_bh = NULL;
-+		}
-+	}
-+}
-+
-+/*
-+ * binary search for closest index by given block
-+ */
-+static inline void
-+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree,
-+		       struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent_idx *ix;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_entries > 0);
-+
-+	ext_debug(tree, "binsearch for %d(idx):  ", block);
-+
-+	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ix[l + k].ei_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ix += l;
-+	path->p_idx = ix;
-+	ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf);
-+
-+	while (l++ < r) {
-+		if (block < ix->ei_block) 
-+			break;
-+		path->p_idx = ix++;
-+	}
-+	ext_debug(tree, "  -> %d->%d\n", path->p_idx->ei_block,
-+		  path->p_idx->ei_leaf);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent_idx *chix;
-+
-+		chix = ix = EXT_FIRST_INDEX(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ix++) {
-+			if (k != 0 && ix->ei_block <= ix[-1].ei_block) {
-+				printk("k=%d, ix=0x%p, first=0x%p\n", k,
-+				       ix, EXT_FIRST_INDEX(eh));
-+				printk("%u <= %u\n",
-+				       ix->ei_block,ix[-1].ei_block);
-+			}
-+			EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block);
-+			if (block < ix->ei_block) 
-+				break;
-+			chix = ix;
-+		}
-+		EXT_ASSERT(chix == path->p_idx);
-+	}
-+#endif
-+}
-+
-+/*
-+ * binary search for closest extent by given block
-+ */
-+static inline void
-+ext3_ext_binsearch(struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent *ex;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+
-+	if (eh->eh_entries == 0) {
-+		/*
-+		 * this leaf is empty yet:
-+		 *  we get such a leaf in split/add case
-+		 */
-+		return;
-+	}
-+	
-+	ext_debug(tree, "binsearch for %d:  ", block);
-+
-+	path->p_ext = ex = EXT_FIRST_EXTENT(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ex[l + k].ee_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ex += l;
-+	path->p_ext = ex;
-+	ext_debug(tree, "  -> %d:%d:%d ", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+	while (l++ < r) {
-+		if (block < ex->ee_block) 
-+			break;
-+		path->p_ext = ex++;
-+	}
-+	ext_debug(tree, "  -> %d:%d:%d\n", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent *chex;
-+
-+		chex = ex = EXT_FIRST_EXTENT(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ex++) {
-+			EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block);
-+			if (block < ex->ee_block) 
-+				break;
-+			chex = ex;
-+		}
-+		EXT_ASSERT(chex == path->p_ext);
-+	}
-+#endif
-+}
-+
-+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *eh;
-+
-+	BUG_ON(tree->buffer_len == 0);
-+	ext3_ext_get_access_for_root(handle, tree);
-+	eh = EXT_ROOT_HDR(tree);
-+	eh->eh_depth = 0;
-+	eh->eh_entries = 0;
-+	eh->eh_magic = EXT3_EXT_MAGIC;
-+	eh->eh_max = ext3_ext_space_root(tree);
-+	ext3_ext_mark_root_dirty(handle, tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return 0;
-+}
-+
-+struct ext3_ext_path *
-+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block,
-+		     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	struct buffer_head *bh;
-+	int depth, i, ppos = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	eh = EXT_ROOT_HDR(tree);
-+	EXT_ASSERT(eh);
-+	if (ext3_ext_check_header(eh)) {
-+		/* don't free previously allocated path
-+		 * -- caller should take care */
-+		path = NULL;
-+		goto err;
-+	}
-+
-+	i = depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* account possible depth increase */
-+	if (!path) {
-+		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-+			       GFP_NOFS);
-+		if (!path)
-+			return ERR_PTR(-ENOMEM);
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[0].p_hdr = eh;
-+
-+	/* walk through the tree */
-+	while (i) {
-+		ext_debug(tree, "depth %d: num %d, max %d\n",
-+			  ppos, eh->eh_entries, eh->eh_max);
-+		ext3_ext_binsearch_idx(tree, path + ppos, block);
-+		path[ppos].p_block = path[ppos].p_idx->ei_leaf;
-+		path[ppos].p_depth = i;
-+		path[ppos].p_ext = NULL;
-+
-+		bh = sb_bread(tree->inode->i_sb, path[ppos].p_block);
-+		if (!bh)
-+			goto err;
-+
-+		eh = EXT_BLOCK_HDR(bh);
-+		ppos++;
-+		EXT_ASSERT(ppos <= depth);
-+		path[ppos].p_bh = bh;
-+		path[ppos].p_hdr = eh;
-+		i--;
-+
-+		if (ext3_ext_check_header(eh))
-+			goto err;
-+	}
-+
-+	path[ppos].p_depth = i;
-+	path[ppos].p_hdr = eh;
-+	path[ppos].p_ext = NULL;
-+	path[ppos].p_idx = NULL;
-+
-+	if (ext3_ext_check_header(eh))
-+		goto err;
-+
-+	/* find extent */
-+	ext3_ext_binsearch(tree, path + ppos, block);
-+
-+	ext3_ext_show_path(tree, path);
-+
-+	return path;
-+
-+err:
-+	printk(KERN_ERR "EXT3-fs: header is corrupted!\n");
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	return ERR_PTR(-EIO);
-+}
-+
-+/*
-+ * insert new index [logical;ptr] into the block at cupr
-+ * it check where to insert: before curp or after curp
-+ */
-+static int ext3_ext_insert_index(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *curp,
-+				 int logical, int ptr)
-+{
-+	struct ext3_extent_idx *ix;
-+	int len, err;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		return err;
-+
-+	EXT_ASSERT(logical != curp->p_idx->ei_block);
-+	len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx;
-+	if (logical > curp->p_idx->ei_block) {
-+		/* insert after */
-+		if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
-+			len = (len - 1) * sizeof(struct ext3_extent_idx);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert new index %d after: %d. "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  logical, ptr, len,
-+				  (curp->p_idx + 1), (curp->p_idx + 2));
-+			memmove(curp->p_idx + 2, curp->p_idx + 1, len);
-+		}
-+		ix = curp->p_idx + 1;
-+	} else {
-+		/* insert before */
-+		len = len * sizeof(struct ext3_extent_idx);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert new index %d before: %d. "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  logical, ptr, len,
-+			  curp->p_idx, (curp->p_idx + 1));
-+		memmove(curp->p_idx + 1, curp->p_idx, len);
-+		ix = curp->p_idx;
-+	}
-+
-+	ix->ei_block = logical;
-+	ix->ei_leaf = ptr;
-+	ix->ei_leaf_hi = ix->ei_unused = 0;
-+	curp->p_hdr->eh_entries++;
-+
-+	EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
-+	EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
-+
-+	err = ext3_ext_dirty(handle, tree, curp);
-+	ext3_std_error(tree->inode->i_sb, err);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine inserts new subtree into the path, using free index entry
-+ * at depth 'at:
-+ *  - allocates all needed blocks (new leaf and all intermediate index blocks)
-+ *  - makes decision where to split
-+ *  - moves remaining extens and index entries (right to the split point)
-+ *    into the newly allocated blocks
-+ *  - initialize subtree
-+ */
-+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_extent *newext, int at)
-+{
-+	struct buffer_head *bh = NULL;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct ext3_extent *ex;
-+	int i = at, k, m, a;
-+	unsigned long newblock, oldblock, border;
-+	int *ablocks = NULL; /* array of allocated blocks */
-+	int err = 0;
-+
-+	/* make decision: where to split? */
-+	/* FIXME: now desicion is simplest: at current extent */
-+
-+	/* if current leaf will be splitted, then we should use 
-+	 * border from split point */
-+	EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
-+	if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		border = path[depth].p_ext[1].ee_block;
-+		ext_debug(tree, "leaf will be splitted."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	} else {
-+		border = newext->ee_block;
-+		ext_debug(tree, "leaf will be added."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	}
-+
-+	/* 
-+	 * if error occurs, then we break processing
-+	 * and turn filesystem read-only. so, index won't
-+	 * be inserted and tree will be in consistent
-+	 * state. next mount will repair buffers too
-+	 */
-+
-+	/*
-+	 * get array to track all allocated blocks
-+	 * we need this to handle errors and free blocks
-+	 * upon them
-+	 */
-+	ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS);
-+	if (!ablocks)
-+		return -ENOMEM;
-+	memset(ablocks, 0, sizeof(unsigned long) * depth);
-+
-+	/* allocate all needed blocks */
-+	ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at);
-+	for (a = 0; a < depth - at; a++) {
-+		newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+		if (newblock == 0)
-+			goto cleanup;
-+		ablocks[a] = newblock;
-+	}
-+
-+	/* initialize new leaf */
-+	newblock = ablocks[--a];
-+	EXT_ASSERT(newblock);
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		goto cleanup;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh)))
-+		goto cleanup;
-+
-+	neh = EXT_BLOCK_HDR(bh);
-+	neh->eh_entries = 0;
-+	neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	neh->eh_depth = 0;
-+	ex = EXT_FIRST_EXTENT(neh);
-+
-+	/* move remain of path[depth] to the new leaf */
-+	EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max);
-+	/* start copy from next extent */
-+	/* TODO: we could do it by single memmove */
-+	m = 0;
-+	path[depth].p_ext++;
-+	while (path[depth].p_ext <=
-+			EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		ext_debug(tree, "move %d:%d:%d in new leaf %lu\n",
-+			  path[depth].p_ext->ee_block,
-+			  path[depth].p_ext->ee_start,
-+			  path[depth].p_ext->ee_len,
-+			  newblock);
-+		memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent));
-+		neh->eh_entries++;
-+		m++;
-+	}
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto cleanup;	
-+	brelse(bh);
-+	bh = NULL;
-+
-+	/* correct old leaf */
-+	if (m) {
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			goto cleanup;
-+		path[depth].p_hdr->eh_entries -= m;
-+		if ((err = ext3_ext_dirty(handle, tree, path + depth)))
-+			goto cleanup;
-+		
-+	}
-+
-+	/* create intermediate indexes */
-+	k = depth - at - 1;
-+	EXT_ASSERT(k >= 0);
-+	if (k)
-+		ext_debug(tree,	"create %d intermediate indices\n", k);
-+	/* insert new index into current index block */
-+	/* current depth stored in i var */
-+	i = depth - 1;
-+	while (k--) {
-+		oldblock = newblock;
-+		newblock = ablocks[--a];
-+		bh = sb_getblk(tree->inode->i_sb, newblock);
-+		if (!bh) {
-+			err = -EIO;
-+			goto cleanup;
-+		}
-+		lock_buffer(bh);
-+
-+		if ((err = ext3_journal_get_create_access(handle, bh)))
-+			goto cleanup;
-+
-+		neh = EXT_BLOCK_HDR(bh);
-+		neh->eh_entries = 1;
-+		neh->eh_magic = EXT3_EXT_MAGIC;
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+		neh->eh_depth = depth - i; 
-+		fidx = EXT_FIRST_INDEX(neh);
-+		fidx->ei_block = border;
-+		fidx->ei_leaf = oldblock;
-+		fidx->ei_leaf_hi = fidx->ei_unused = 0;
-+
-+		ext_debug(tree,	"int.index at %d (block %lu): %lu -> %lu\n",
-+			  i, newblock, border, oldblock);
-+		/* copy indexes */
-+		m = 0;
-+		path[i].p_idx++;
-+
-+		ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
-+			  EXT_MAX_INDEX(path[i].p_hdr));
-+		EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
-+			   EXT_LAST_INDEX(path[i].p_hdr));
-+		while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
-+			ext_debug(tree, "%d: move %d:%d in new index %lu\n",
-+				  i, path[i].p_idx->ei_block,
-+				  path[i].p_idx->ei_leaf, newblock);
-+			memmove(++fidx, path[i].p_idx++,
-+				sizeof(struct ext3_extent_idx));
-+			neh->eh_entries++;
-+			EXT_ASSERT(neh->eh_entries <= neh->eh_max);
-+			m++;
-+		}
-+		set_buffer_uptodate(bh);
-+		unlock_buffer(bh);
-+
-+		if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+			goto cleanup;
-+		brelse(bh);
-+		bh = NULL;
-+
-+		/* correct old index */
-+		if (m) {
-+			err = ext3_ext_get_access(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+			path[i].p_hdr->eh_entries -= m;
-+			err = ext3_ext_dirty(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+		}
-+
-+		i--;
-+	}
-+
-+	/* insert new index */
-+	if (!err)
-+		err = ext3_ext_insert_index(handle, tree, path + at,
-+					    border, newblock);
-+
-+cleanup:
-+	if (bh) {
-+		if (buffer_locked(bh))
-+			unlock_buffer(bh);
-+		brelse(bh);
-+	}
-+
-+	if (err) {
-+		/* free all allocated blocks in error case */
-+		for (i = 0; i < depth; i++) {
-+			if (!ablocks[i])
-+				continue;
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+		}
-+	}
-+	kfree(ablocks);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine implements tree growing procedure:
-+ *  - allocates new block
-+ *  - moves top-level data (index block or leaf) into the new block
-+ *  - initialize new top-level, creating index that points to the
-+ *    just created block
-+ */
-+static int ext3_ext_grow_indepth(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *path,
-+				 struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp = path;
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct buffer_head *bh;
-+	unsigned long newblock;
-+	int err = 0;
-+
-+	newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+	if (newblock == 0)
-+		return err;
-+
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		ext3_std_error(tree->inode->i_sb, err);
-+		return err;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh))) {
-+		unlock_buffer(bh);
-+		goto out;	
-+	}
-+
-+	/* move top-level index/leaf into new block */
-+	memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
-+
-+	/* set size of new block */
-+	neh = EXT_BLOCK_HDR(bh);
-+	/* old root could have indexes or leaves
-+	 * so calculate eh_max right way */
-+	if (EXT_DEPTH(tree))
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+	else
-+		neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto out;
-+
-+	/* create index in new top-level index: num,max,pointer */
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		goto out;
-+
-+	curp->p_hdr->eh_magic = EXT3_EXT_MAGIC;
-+	curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree);
-+	curp->p_hdr->eh_entries = 1;
-+	curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
-+	/* FIXME: it works, but actually path[0] can be index */
-+	curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
-+	curp->p_idx->ei_leaf = newblock;
-+	curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
-+
-+	neh = EXT_ROOT_HDR(tree);
-+	fidx = EXT_FIRST_INDEX(neh);
-+	ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n",
-+		  neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); 
-+
-+	neh->eh_depth = path->p_depth + 1;
-+	err = ext3_ext_dirty(handle, tree, curp);
-+out:
-+	brelse(bh);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine finds empty index and adds new leaf. if no free index found
-+ * then it requests in-depth growing
-+ */
-+static int ext3_ext_create_new_leaf(handle_t *handle,
-+				    struct ext3_extents_tree *tree,
-+				    struct ext3_ext_path *path,
-+				    struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp;
-+	int depth, i, err = 0;
-+
-+repeat:
-+	i = depth = EXT_DEPTH(tree);
-+	
-+	/* walk up to the tree and look for free index entry */
-+	curp = path + depth;
-+	while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) {
-+		i--;
-+		curp--;
-+	}
-+
-+	/* we use already allocated block for index block
-+	 * so, subsequent data blocks should be contigoues */
-+	if (EXT_HAS_FREE_INDEX(curp)) {
-+		/* if we found index with free entry, then use that
-+		 * entry: create all needed subtree and add new leaf */
-+		err = ext3_ext_split(handle, tree, path, newext, i);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+	} else {
-+		/* tree is full, time to grow in depth */
-+		err = ext3_ext_grow_indepth(handle, tree, path, newext);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+
-+		/*
-+		 * only first (depth 0 -> 1) produces free space
-+		 * in all other cases we have to split growed tree
-+		 */
-+		depth = EXT_DEPTH(tree);
-+		if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) {
-+			/* now we need split */
-+			goto repeat;
-+		}
-+	}
-+
-+	if (err)
-+		return err;
-+
-+	return 0;
-+}
-+
-+/*
-+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK
-+ * NOTE: it consider block number from index entry as
-+ * allocated block. thus, index entries have to be consistent
-+ * with leafs
-+ */
-+static unsigned long
-+ext3_ext_next_allocated_block(struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	if (depth == 0 && path->p_ext == NULL)
-+		return EXT_MAX_BLOCK;
-+
-+	/* FIXME: what if index isn't full ?! */
-+	while (depth >= 0) {
-+		if (depth == path->p_depth) {
-+			/* leaf */
-+			if (path[depth].p_ext !=
-+			    EXT_LAST_EXTENT(path[depth].p_hdr))
-+				return path[depth].p_ext[1].ee_block;
-+		} else {
-+			/* index */
-+			if (path[depth].p_idx !=
-+			    EXT_LAST_INDEX(path[depth].p_hdr))
-+				return path[depth].p_idx[1].ei_block;
-+		}
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * returns first allocated block from next leaf or EXT_MAX_BLOCK
-+ */
-+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree,
-+					 struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	/* zero-tree has no leaf blocks at all */
-+	if (depth == 0)
-+		return EXT_MAX_BLOCK;
-+
-+	/* go to index block */
-+	depth--;
-+	
-+	while (depth >= 0) {
-+		if (path[depth].p_idx !=
-+		    EXT_LAST_INDEX(path[depth].p_hdr))
-+			return path[depth].p_idx[1].ei_block;
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * if leaf gets modified and modified extent is first in the leaf
-+ * then we have to correct all indexes above
-+ * TODO: do we need to correct tree in all cases?
-+ */
-+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	int depth = EXT_DEPTH(tree);	
-+	struct ext3_extent *ex;
-+	unsigned long border;
-+	int k, err = 0;
-+	
-+	eh = path[depth].p_hdr;
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(eh);
-+	
-+	if (depth == 0) {
-+		/* there is no tree at all */
-+		return 0;
-+	}
-+	
-+	if (ex != EXT_FIRST_EXTENT(eh)) {
-+		/* we correct tree if first leaf got modified only */
-+		return 0;
-+	}
-+	
-+	/*
-+	 * TODO: we need correction if border is smaller then current one
-+	 */
-+	k = depth - 1;
-+	border = path[depth].p_ext->ee_block;
-+	if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+		return err;
-+	path[k].p_idx->ei_block = border;
-+	if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+		return err;
-+
-+	while (k--) {
-+		/* change all left-side indexes */
-+		if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr))
-+			break;
-+		if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+			break;
-+		path[k].p_idx->ei_block = border;
-+		if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+			break;
-+	}
-+
-+	return err;
-+}
-+
-+static int inline
-+ext3_can_extents_be_merged(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex1,
-+			   struct ext3_extent *ex2)
-+{
-+	if (ex1->ee_block + ex1->ee_len != ex2->ee_block)
-+		return 0;
-+
-+#ifdef AGRESSIVE_TEST
-+	if (ex1->ee_len >= 4)
-+		return 0;
-+#endif
-+
-+	if (!tree->ops->mergable)
-+		return 1;
-+
-+	return tree->ops->mergable(ex1, ex2);
-+}
-+
-+/*
-+ * this routine tries to merge requsted extent into the existing
-+ * extent or inserts requested extent as new one into the tree,
-+ * creating new leaf in no-space case
-+ */
-+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree,
-+			   struct ext3_ext_path *path,
-+			   struct ext3_extent *newext)
-+{
-+	struct ext3_extent_header * eh;
-+	struct ext3_extent *ex, *fex;
-+	struct ext3_extent *nearex; /* nearest extent */
-+	struct ext3_ext_path *npath = NULL;
-+	int depth, len, err, next;
-+
-+	EXT_ASSERT(newext->ee_len > 0);
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(path[depth].p_hdr);
-+
-+	/* try to insert block into found extent and return */
-+	if (ex && ext3_can_extents_be_merged(tree, ex, newext)) {
-+		ext_debug(tree, "append %d block to %d:%d (from %d)\n",
-+			  newext->ee_len, ex->ee_block, ex->ee_len,
-+			  ex->ee_start);
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			return err;
-+		ex->ee_len += newext->ee_len;
-+		eh = path[depth].p_hdr;
-+		nearex = ex;
-+		goto merge;
-+	}
-+
-+repeat:
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+	if (eh->eh_entries < eh->eh_max)
-+		goto has_space;
-+
-+	/* probably next leaf has space for us? */
-+	fex = EXT_LAST_EXTENT(eh);
-+	next = ext3_ext_next_leaf_block(tree, path);
-+	if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) {
-+		ext_debug(tree, "next leaf block - %d\n", next);
-+		EXT_ASSERT(!npath);
-+		npath = ext3_ext_find_extent(tree, next, NULL);
-+		if (IS_ERR(npath))
-+			return PTR_ERR(npath);
-+		EXT_ASSERT(npath->p_depth == path->p_depth);
-+		eh = npath[depth].p_hdr;
-+		if (eh->eh_entries < eh->eh_max) {
-+			ext_debug(tree,	"next leaf isnt full(%d)\n",
-+				  eh->eh_entries);
-+			path = npath;
-+			goto repeat;
-+		}
-+		ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
-+			  eh->eh_entries, eh->eh_max);
-+	}
-+
-+	/*
-+	 * there is no free space in found leaf
-+	 * we're gonna add new leaf in the tree
-+	 */
-+	err = ext3_ext_create_new_leaf(handle, tree, path, newext);
-+	if (err)
-+		goto cleanup;
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+
-+has_space:
-+	nearex = path[depth].p_ext;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+		goto cleanup;
-+
-+	if (!nearex) {
-+		/* there is no extent in this leaf, create first one */
-+		ext_debug(tree, "first extent in the leaf: %d:%d:%d\n",
-+			  newext->ee_block, newext->ee_start,
-+			  newext->ee_len);
-+		path[depth].p_ext = EXT_FIRST_EXTENT(eh);
-+	} else if (newext->ee_block > nearex->ee_block) {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		if (nearex != EXT_LAST_EXTENT(eh)) {
-+			len = EXT_MAX_EXTENT(eh) - nearex;
-+			len = (len - 1) * sizeof(struct ext3_extent);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  newext->ee_block, newext->ee_start,
-+				  newext->ee_len,
-+				  nearex, len, nearex + 1, nearex + 2);
-+			memmove(nearex + 2, nearex + 1, len);
-+		}
-+		path[depth].p_ext = nearex + 1;
-+	} else {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  newext->ee_block, newext->ee_start, newext->ee_len,
-+			  nearex, len, nearex + 1, nearex + 2);
-+		memmove(nearex + 1, nearex, len);
-+		path[depth].p_ext = nearex;
-+	}
-+
-+	eh->eh_entries++;
-+	nearex = path[depth].p_ext;
-+	nearex->ee_block = newext->ee_block;
-+	nearex->ee_start = newext->ee_start;
-+	nearex->ee_len = newext->ee_len;
-+	/* FIXME: support for large fs */
-+	nearex->ee_start_hi = 0;
-+
-+merge:
-+	/* try to merge extents to the right */
-+	while (nearex < EXT_LAST_EXTENT(eh)) {
-+		if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1))
-+			break;
-+		/* merge with next extent! */
-+		nearex->ee_len += nearex[1].ee_len;
-+		if (nearex + 1 < EXT_LAST_EXTENT(eh)) {
-+			len = (EXT_LAST_EXTENT(eh) - nearex - 1) *
-+				sizeof(struct ext3_extent);
-+			memmove(nearex + 1, nearex + 2, len);
-+		}
-+		eh->eh_entries--;
-+		EXT_ASSERT(eh->eh_entries > 0);
-+	}
-+
-+	/* try to merge extents to the left */
-+
-+	/* time to correct all indexes above */
-+	err = ext3_ext_correct_indexes(handle, tree, path);
-+	if (err)
-+		goto cleanup;
-+
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+
-+cleanup:
-+	if (npath) {
-+		ext3_ext_drop_refs(npath);
-+		kfree(npath);
-+	}
-+	ext3_ext_tree_changed(tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return err;
-+}
-+
-+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block,
-+			unsigned long num, ext_prepare_callback func)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_ext_cache cbex;
-+	struct ext3_extent *ex;
-+	unsigned long next, start = 0, end = 0;
-+	unsigned long last = block + num;
-+	int depth, exists, err = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(func);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	while (block < last && block != EXT_MAX_BLOCK) {
-+		num = last - block;
-+		/* find extent for this block */
-+		path = ext3_ext_find_extent(tree, block, path);
-+		if (IS_ERR(path)) {
-+			err = PTR_ERR(path);
-+			path = NULL;
-+			break;
-+		}
-+
-+		depth = EXT_DEPTH(tree);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		ex = path[depth].p_ext;
-+		next = ext3_ext_next_allocated_block(path);
-+
-+		exists = 0;
-+		if (!ex) {
-+			/* there is no extent yet, so try to allocate
-+			 * all requested space */
-+			start = block;
-+			end = block + num;
-+		} else if (ex->ee_block > block) {
-+			/* need to allocate space before found extent */
-+			start = block;
-+			end = ex->ee_block;
-+			if (block + num < end)
-+				end = block + num;
-+		} else if (block >= ex->ee_block + ex->ee_len) {
-+			/* need to allocate space after found extent */
-+			start = block;
-+			end = block + num;
-+			if (end >= next)
-+				end = next;
-+		} else if (block >= ex->ee_block) {
-+			/* 
-+			 * some part of requested space is covered
-+			 * by found extent
-+			 */
-+			start = block;
-+			end = ex->ee_block + ex->ee_len;
-+			if (block + num < end)
-+				end = block + num;
-+			exists = 1;
-+		} else {
-+			BUG();
-+		}
-+		EXT_ASSERT(end > start);
-+
-+		if (!exists) {
-+			cbex.ec_block = start;
-+			cbex.ec_len = end - start;
-+			cbex.ec_start = 0;
-+			cbex.ec_type = EXT3_EXT_CACHE_GAP;
-+		} else {
-+			cbex.ec_block = ex->ee_block;
-+			cbex.ec_len = ex->ee_len;
-+			cbex.ec_start = ex->ee_start;
-+			cbex.ec_type = EXT3_EXT_CACHE_EXTENT;
-+		}
-+
-+		EXT_ASSERT(cbex.ec_len > 0);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		err = func(tree, path, &cbex);
-+		ext3_ext_drop_refs(path);
-+
-+		if (err < 0)
-+			break;
-+		if (err == EXT_REPEAT)
-+			continue;
-+		else if (err == EXT_BREAK) {
-+			err = 0;
-+			break;
-+		}
-+
-+		if (EXT_DEPTH(tree) != depth) {
-+			/* depth was changed. we have to realloc path */
-+			kfree(path);
-+			path = NULL;
-+		}
-+
-+		block = cbex.ec_block + cbex.ec_len;
-+	}
-+
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+
-+	return err;
-+}
-+
-+static inline void
-+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block,
-+		      __u32 len, __u32 start, int type)
-+{
-+	EXT_ASSERT(len > 0);
-+	if (tree->cex) {
-+		tree->cex->ec_type = type;
-+		tree->cex->ec_block = block;
-+		tree->cex->ec_len = len;
-+		tree->cex->ec_start = start;
-+	}
-+}
-+
-+/*
-+ * this routine calculate boundaries of the gap requested block fits into
-+ * and cache this gap
-+ */
-+static inline void
-+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  unsigned long block)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	unsigned long lblock, len;
-+	struct ext3_extent *ex;
-+
-+	if (!tree->cex)
-+		return;
-+
-+	ex = path[depth].p_ext;
-+	if (ex == NULL) {
-+		/* there is no extent yet, so gap is [0;-] */
-+		lblock = 0;
-+		len = EXT_MAX_BLOCK;
-+		ext_debug(tree, "cache gap(whole file):");
-+	} else if (block < ex->ee_block) {
-+		lblock = block;
-+		len = ex->ee_block - block;
-+		ext_debug(tree, "cache gap(before): %lu [%lu:%lu]",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len);
-+	} else if (block >= ex->ee_block + ex->ee_len) {
-+		lblock = ex->ee_block + ex->ee_len;
-+		len = ext3_ext_next_allocated_block(path);
-+		ext_debug(tree, "cache gap(after): [%lu:%lu] %lu",
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) block);
-+		EXT_ASSERT(len > lblock);
-+		len = len - lblock;
-+	} else {
-+		lblock = len = 0;
-+		BUG();
-+	}
-+
-+	ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len);
-+	ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP);
-+}
-+
-+static inline int
-+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block,
-+		  struct ext3_extent *ex)
-+{
-+	struct ext3_ext_cache *cex = tree->cex;
-+
-+	/* is there cache storage at all? */
-+	if (!cex)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	/* has cache valid data? */
-+	if (cex->ec_type == EXT3_EXT_CACHE_NO)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP ||
-+		   cex->ec_type == EXT3_EXT_CACHE_EXTENT);
-+	if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
-+		ex->ee_block = cex->ec_block;
-+		ex->ee_start = cex->ec_start;
-+		ex->ee_start_hi = 0;
-+		ex->ee_len = cex->ec_len;
-+		ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) ex->ee_start);
-+		return cex->ec_type;
-+	}
-+
-+	/* not in cache */
-+	return EXT3_EXT_CACHE_NO;
-+}
-+
-+/*
-+ * routine removes index from the index block
-+ * it's used in truncate case only. thus all requests are for
-+ * last index in the block only
-+ */
-+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree,
-+		    struct ext3_ext_path *path)
-+{
-+	struct buffer_head *bh;
-+	int err;
-+	
-+	/* free index block */
-+	path--;
-+	EXT_ASSERT(path->p_hdr->eh_entries);
-+	if ((err = ext3_ext_get_access(handle, tree, path)))
-+		return err;
-+	path->p_hdr->eh_entries--;
-+	if ((err = ext3_ext_dirty(handle, tree, path)))
-+		return err;
-+	ext_debug(tree, "index is empty, remove it, free block %d\n",
-+		  path->p_idx->ei_leaf);
-+	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
-+	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	return err;
-+}
-+
-+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree,
-+				     struct ext3_ext_path *path)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	int needed;
-+
-+	if (path) {
-+		/* probably there is space in leaf? */
-+		if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max)
-+			return 1;
-+	}
-+	
-+	/*
-+	 * the worste case we're expecting is creation of the
-+	 * new root (growing in depth) with index splitting
-+	 * for splitting we have to consider depth + 1 because
-+	 * previous growing could increase it
-+	 */
-+	depth = depth + 1;
-+
-+	/* 
-+	 * growing in depth:
-+	 * block allocation + new root + old root
-+	 */
-+	needed = EXT3_ALLOC_NEEDED + 2;
-+
-+	/* index split. we may need:
-+	 *   allocate intermediate indexes and new leaf
-+	 *   change two blocks at each level, but root
-+	 *   modify root block (inode)
-+	 */
-+	needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1;
-+
-+	return needed;
-+}
-+
-+static int
-+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree,
-+		      struct ext3_ext_path *path, unsigned long start,
-+		      unsigned long end)
-+{
-+	struct ext3_extent *ex, tex;
-+	struct ext3_ext_path *npath;
-+	int depth, creds, err;
-+
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1);
-+	EXT_ASSERT(ex->ee_block < start);
-+
-+	/* calculate tail extent */
-+	tex.ee_block = end + 1;
-+	EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len);
-+	tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block;
-+
-+	creds = ext3_ext_calc_credits_for_insert(tree, path);
-+	handle = ext3_ext_journal_restart(handle, creds);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	
-+	/* calculate head extent. use primary extent */
-+	err = ext3_ext_get_access(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+	ex->ee_len = start - ex->ee_block;
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+
-+	/* FIXME: some callback to free underlying resource
-+	 * and correct ee_start? */
-+	ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n",
-+		  ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len);
-+
-+	npath = ext3_ext_find_extent(tree, ex->ee_block, NULL);
-+	if (IS_ERR(npath))
-+		return PTR_ERR(npath);
-+	depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block);
-+	EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len);
-+
-+	err = ext3_ext_insert_extent(handle, tree, npath, &tex);
-+	ext3_ext_drop_refs(npath);
-+	kfree(npath);
-+
-+	return err;
-+}
-+
-+static int
-+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree,
-+		 struct ext3_ext_path *path, unsigned long start,
-+		 unsigned long end)
-+{
-+	struct ext3_extent *ex, *fu = NULL, *lu, *le;
-+	int err = 0, correct_index = 0;
-+	int depth = EXT_DEPTH(tree), credits;
-+	struct ext3_extent_header *eh;
-+	unsigned a, b, block, num;
-+
-+	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
-+	if (!path[depth].p_hdr)
-+		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+	eh = path[depth].p_hdr;
-+	EXT_ASSERT(eh);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* find where to start removing */
-+	le = ex = EXT_LAST_EXTENT(eh);
-+	while (ex != EXT_FIRST_EXTENT(eh)) {
-+		if (ex->ee_block <= end)
-+			break;
-+		ex--;
-+	}
-+
-+	if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) {
-+		/* removal of internal part of the extent requested
-+		 * tail and head must be placed in different extent
-+		 * so, we have to insert one more extent */
-+		path[depth].p_ext = ex;
-+		return ext3_ext_split_for_rm(handle, tree, path, start, end);
-+	}
-+	
-+	lu = ex;
-+	while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) {
-+		ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len);
-+		path[depth].p_ext = ex;
-+	
-+		a = ex->ee_block > start ? ex->ee_block : start;
-+		b = ex->ee_block + ex->ee_len - 1 < end ?
-+			ex->ee_block + ex->ee_len - 1 : end;
-+		
-+		ext_debug(tree, "  border %u:%u\n", a, b);
-+
-+		if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) {
-+			block = 0;
-+			num = 0;
-+			BUG();
-+		} else if (a != ex->ee_block) {
-+			/* remove tail of the extent */
-+			block = ex->ee_block;
-+			num = a - block;
-+		} else if (b != ex->ee_block + ex->ee_len - 1) {
-+			/* remove head of the extent */
-+			block = a;
-+			num = b - a;
-+		} else {
-+			/* remove whole extent: excelent! */
-+			block = ex->ee_block; 
-+			num = 0;
-+			EXT_ASSERT(a == ex->ee_block &&
-+				   b == ex->ee_block + ex->ee_len - 1);
-+		}
-+
-+		if (ex == EXT_FIRST_EXTENT(eh))
-+			correct_index = 1;
-+
-+		credits = 1;
-+		if (correct_index)
-+			credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1;
-+		if (tree->ops->remove_extent_credits)
-+			credits+=tree->ops->remove_extent_credits(tree,ex,a,b);
-+		
-+		handle = ext3_ext_journal_restart(handle, credits);
-+		if (IS_ERR(handle)) {
-+			err = PTR_ERR(handle);
-+			goto out;
-+		}
-+
-+		err = ext3_ext_get_access(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		if (tree->ops->remove_extent)
-+			err = tree->ops->remove_extent(tree, ex, a, b);
-+		if (err)
-+			goto out;
-+
-+		if (num == 0) {
-+			/* this extent is removed entirely mark slot unused */
-+			ex->ee_start = ex->ee_start_hi = 0;
-+			eh->eh_entries--;
-+			fu = ex;
-+		}
-+
-+		ex->ee_block = block;
-+		ex->ee_len = num;
-+
-+		err = ext3_ext_dirty(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		ext_debug(tree, "new extent: %u:%u:%u\n",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+		ex--;
-+	}
-+
-+	if (fu) {
-+		/* reuse unused slots */
-+		while (lu < le) {
-+			if (lu->ee_start) {
-+				*fu = *lu;
-+				lu->ee_start = lu->ee_start_hi = 0;
-+				fu++;
-+			}
-+			lu++;
-+		}
-+	}
-+
-+	if (correct_index && eh->eh_entries)
-+		err = ext3_ext_correct_indexes(handle, tree, path);
-+
-+	/* if this leaf is free, then we should
-+	 * remove it from index block above */
-+	if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
-+		err = ext3_ext_rm_idx(handle, tree, path + depth);
-+
-+out:
-+	return err;
-+}
-+
-+
-+static struct ext3_extent_idx *
-+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block)
-+{
-+	struct ext3_extent_idx *ix;
-+	
-+	ix = EXT_LAST_INDEX(hdr);
-+	while (ix != EXT_FIRST_INDEX(hdr)) {
-+		if (ix->ei_block <= block)
-+			break;
-+		ix--;
-+	}
-+	return ix;
-+}
-+
-+/*
-+ * returns 1 if current index have to be freed (even partial)
-+ */
-+static int inline
-+ext3_ext_more_to_rm(struct ext3_ext_path *path)
-+{
-+	EXT_ASSERT(path->p_idx);
-+
-+	if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
-+		return 0;
-+
-+	/*
-+	 * if truncate on deeper level happened it it wasn't partial
-+	 * so we have to consider current index for truncation
-+	 */
-+	if (path->p_hdr->eh_entries == path->p_block)
-+		return 0;
-+	return 1;
-+}
-+
-+int ext3_ext_remove_space(struct ext3_extents_tree *tree,
-+			  unsigned long start, unsigned long end)
-+{
-+	struct inode *inode = tree->inode;
-+	struct super_block *sb = inode->i_sb;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_ext_path *path;
-+	handle_t *handle;
-+	int i = 0, err = 0;
-+
-+	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
-+
-+	/* probably first extent we're gonna free will be last in block */
-+	handle = ext3_journal_start(inode, depth + 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	ext3_ext_invalidate_cache(tree);
-+
-+	/*
-+	 * we start scanning from right side freeing all the blocks
-+	 * after i_size and walking into the deep
-+	 */
-+	path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL);
-+	if (IS_ERR(path)) {
-+		ext3_error(sb, __FUNCTION__, "Can't allocate path array");
-+		ext3_journal_stop(handle);
-+		return -ENOMEM;
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[i].p_hdr = EXT_ROOT_HDR(tree);
-+	
-+	while (i >= 0 && err == 0) {
-+		if (i == depth) {
-+			/* this is leaf block */
-+			err = ext3_ext_rm_leaf(handle, tree, path, start, end);
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			continue;
-+		}
-+		
-+		/* this is index block */
-+		if (!path[i].p_hdr) {
-+			ext_debug(tree, "initialize header\n");
-+			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
-+		}
-+
-+		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
-+		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
-+		
-+		if (!path[i].p_idx) {
-+			/* this level hasn't touched yet */
-+			path[i].p_idx =
-+				ext3_ext_last_covered(path[i].p_hdr, end);
-+			path[i].p_block = path[i].p_hdr->eh_entries + 1;
-+			ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n",
-+				  path[i].p_hdr, path[i].p_hdr->eh_entries);
-+		} else {
-+			/* we've already was here, see at next index */
-+			path[i].p_idx--;
-+		}
-+
-+		ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n",
-+			  i, EXT_FIRST_INDEX(path[i].p_hdr),
-+			  path[i].p_idx);
-+		if (ext3_ext_more_to_rm(path + i)) {
-+			/* go to the next level */
-+			ext_debug(tree, "move to level %d (block %d)\n",
-+				  i + 1, path[i].p_idx->ei_leaf);
-+			memset(path + i + 1, 0, sizeof(*path));
-+			path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf);
-+			if (!path[i+1].p_bh) {
-+				/* should we reset i_size? */
-+				err = -EIO;
-+				break;
-+			}
-+			/* put actual number of indexes to know is this
-+			 * number got changed at the next iteration */
-+			path[i].p_block = path[i].p_hdr->eh_entries;
-+			i++;
-+		} else {
-+			/* we finish processing this index, go up */
-+			if (path[i].p_hdr->eh_entries == 0 && i > 0) {
-+				/* index is empty, remove it
-+				 * handle must be already prepared by the
-+				 * truncatei_leaf() */
-+				err = ext3_ext_rm_idx(handle, tree, path + i);
-+			}
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			ext_debug(tree, "return to level %d\n", i);
-+		}
-+	}
-+
-+	/* TODO: flexible tree reduction should be here */
-+	if (path->p_hdr->eh_entries == 0) {
-+		/*
-+		 * truncate to zero freed all the tree
-+		 * so, we need to correct eh_depth
-+		 */
-+		err = ext3_ext_get_access(handle, tree, path);
-+		if (err == 0) {
-+			EXT_ROOT_HDR(tree)->eh_depth = 0;
-+			EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree);
-+			err = ext3_ext_dirty(handle, tree, path);
-+		}
-+	}
-+	ext3_ext_tree_changed(tree);
-+
-+	kfree(path);
-+	ext3_journal_stop(handle);
-+
-+	return err;
-+}
-+
-+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks)
-+{
-+	int lcap, icap, rcap, leafs, idxs, num;
-+
-+	rcap = ext3_ext_space_root(tree);
-+	if (blocks <= rcap) {
-+		/* all extents fit to the root */
-+		return 0;
-+	}
-+
-+	rcap = ext3_ext_space_root_idx(tree);
-+	lcap = ext3_ext_space_block(tree);
-+	icap = ext3_ext_space_block_idx(tree);
-+
-+	num = leafs = (blocks + lcap - 1) / lcap;
-+	if (leafs <= rcap) {
-+		/* all pointers to leafs fit to the root */
-+		return leafs;
-+	}
-+
-+	/* ok. we need separate index block(s) to link all leaf blocks */
-+	idxs = (leafs + icap - 1) / icap;
-+	do {
-+		num += idxs;
-+		idxs = (idxs + icap - 1) / icap;
-+	} while (idxs > rcap);
-+
-+	return num;
-+}
-+
-+/*
-+ * called at mount time
-+ */
-+void ext3_ext_init(struct super_block *sb)
-+{
-+	/*
-+	 * possible initialization would be here
-+	 */
-+
-+	if (test_opt(sb, EXTENTS)) {
-+		printk("EXT3-fs: file extents enabled");
-+#ifdef AGRESSIVE_TEST
-+		printk(", agressive tests");
-+#endif
-+#ifdef CHECK_BINSEARCH
-+		printk(", check binsearch");
-+#endif
-+		printk("\n");
-+	}
-+}
-+
-+/*
-+ * called at umount time
-+ */
-+void ext3_ext_release(struct super_block *sb)
-+{
-+}
-+
-+/************************************************************************
-+ * VFS related routines
-+ ************************************************************************/
-+
-+static int ext3_get_inode_write_access(handle_t *handle, void *buffer)
-+{
-+	/* we use in-core data, not bh */
-+	return 0;
-+}
-+
-+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer)
-+{
-+	struct inode *inode = buffer;
-+	return ext3_mark_inode_dirty(handle, inode);
-+}
-+
-+static int ext3_ext_mergable(struct ext3_extent *ex1,
-+			     struct ext3_extent *ex2)
-+{
-+	/* FIXME: support for large fs */
-+	if (ex1->ee_start + ex1->ee_len == ex2->ee_start)
-+		return 1;
-+	return 0;
-+}
-+
-+static int
-+ext3_remove_blocks_credits(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex,
-+			   unsigned long from, unsigned long to)
-+{
-+	int needed;
-+	
-+	/* at present, extent can't cross block group */;
-+	needed = 4; /* bitmap + group desc + sb + inode */
-+
-+#ifdef CONFIG_QUOTA
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+	return needed;
-+}
-+
-+static int
-+ext3_remove_blocks(struct ext3_extents_tree *tree,
-+		   struct ext3_extent *ex,
-+		   unsigned long from, unsigned long to)
-+{
-+	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
-+	handle_t *handle = ext3_journal_start(tree->inode, needed);
-+	struct buffer_head *bh;
-+	int i;
-+
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
-+		/* tail removal */
-+		unsigned long num, start;
-+		num = ex->ee_block + ex->ee_len - from;
-+		start = ex->ee_start + ex->ee_len - num;
-+		ext_debug(tree, "free last %lu blocks starting %lu\n",
-+			  num, start);
-+		for (i = 0; i < num; i++) {
-+			bh = sb_find_get_block(tree->inode->i_sb, start + i);
-+			ext3_forget(handle, 0, tree->inode, bh, start + i);
-+		}
-+		ext3_free_blocks(handle, tree->inode, start, num);
-+	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
-+		printk("strange request: removal %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	} else {
-+		printk("strange request: removal(2) %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	}
-+	ext3_journal_stop(handle);
-+	return 0;
-+}
-+
-+static int ext3_ext_find_goal(struct inode *inode,
-+			      struct ext3_ext_path *path, unsigned long block)
-+{
-+	struct ext3_inode_info *ei = EXT3_I(inode);
-+	unsigned long bg_start;
-+	unsigned long colour;
-+	int depth;
-+	
-+	if (path) {
-+		struct ext3_extent *ex;
-+		depth = path->p_depth;
-+		
-+		/* try to predict block placement */
-+		if ((ex = path[depth].p_ext))
-+			return ex->ee_start + (block - ex->ee_block);
-+
-+		/* it looks index is empty
-+		 * try to find starting from index itself */
-+		if (path[depth].p_bh)
-+			return path[depth].p_bh->b_blocknr;
-+	}
-+
-+	/* OK. use inode's group */
-+	bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+		le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+	colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+	return bg_start + colour + block;
-+}
-+
-+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path,
-+			     struct ext3_extent *ex, int *err)
-+{
-+	struct inode *inode = tree->inode;
-+	int newblock, goal;
-+	
-+	EXT_ASSERT(path);
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(ex->ee_start);
-+	EXT_ASSERT(ex->ee_len);
-+	
-+	/* reuse block from the extent to order data/metadata */
-+	newblock = ex->ee_start++;
-+	ex->ee_len--;
-+	if (ex->ee_len == 0) {
-+		ex->ee_len = 1;
-+		/* allocate new block for the extent */
-+		goal = ext3_ext_find_goal(inode, path, ex->ee_block);
-+		ex->ee_start = ext3_new_block(handle, inode, goal, err);
-+		ex->ee_start_hi = 0;
-+		if (ex->ee_start == 0) {
-+			/* error occured: restore old extent */
-+			ex->ee_start = newblock;
-+			return 0;
-+		}
-+	}
-+	return newblock;
-+}
-+
-+static struct ext3_extents_helpers ext3_blockmap_helpers = {
-+	.get_write_access	= ext3_get_inode_write_access,
-+	.mark_buffer_dirty	= ext3_mark_buffer_dirty,
-+	.mergable		= ext3_ext_mergable,
-+	.new_block		= ext3_new_block_cb,
-+	.remove_extent		= ext3_remove_blocks,
-+	.remove_extent_credits	= ext3_remove_blocks_credits,
-+};
-+
-+void ext3_init_tree_desc(struct ext3_extents_tree *tree,
-+			 struct inode *inode)
-+{
-+	tree->inode = inode;
-+	tree->root = (void *) EXT3_I(inode)->i_data;
-+	tree->buffer = (void *) inode;
-+	tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
-+	tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent;
-+	tree->ops = &ext3_blockmap_helpers;
-+}
-+
-+int ext3_ext_get_block(handle_t *handle, struct inode *inode,
-+		       long iblock, struct buffer_head *bh_result,
-+		       int create, int extend_disksize)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_extent newex;
-+	struct ext3_extent *ex;
-+	int goal, newblock, err = 0, depth;
-+	struct ext3_extents_tree tree;
-+
-+	clear_buffer_new(bh_result);
-+	ext3_init_tree_desc(&tree, inode);
-+	ext_debug(&tree, "block %d requested for inode %u\n",
-+		  (int) iblock, (unsigned) inode->i_ino);
-+	down(&EXT3_I(inode)->truncate_sem);
-+
-+	/* check in cache */
-+	if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) {
-+		if (goal == EXT3_EXT_CACHE_GAP) {
-+			if (!create) {
-+				/* block isn't allocated yet and
-+				 * user don't want to allocate it */
-+				goto out2;
-+			}
-+			/* we should allocate requested block */
-+		} else if (goal == EXT3_EXT_CACHE_EXTENT) {
-+			/* block is already allocated */
-+			newblock = iblock - newex.ee_block + newex.ee_start;
-+			goto out;
-+		} else {
-+			EXT_ASSERT(0);
-+		}
-+	}
-+
-+	/* find extent for this block */
-+	path = ext3_ext_find_extent(&tree, iblock, NULL);
-+	if (IS_ERR(path)) {
-+		err = PTR_ERR(path);
-+		path = NULL;
-+		goto out2;
-+	}
-+
-+	depth = EXT_DEPTH(&tree);
-+
-+	/*
-+	 * consistent leaf must not be empty
-+	 * this situations is possible, though, _during_ tree modification
-+	 * this is why assert can't be put in ext3_ext_find_extent()
-+	 */
-+	EXT_ASSERT(path[depth].p_ext != NULL || depth == 0);
-+
-+	if ((ex = path[depth].p_ext)) {
-+		/* if found exent covers block, simple return it */
-+		if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) {
-+			newblock = iblock - ex->ee_block + ex->ee_start;
-+			ext_debug(&tree, "%d fit into %d:%d -> %d\n",
-+				  (int) iblock, ex->ee_block, ex->ee_len,
-+				  newblock);
-+			ext3_ext_put_in_cache(&tree, ex->ee_block,
-+					      ex->ee_len, ex->ee_start,
-+					      EXT3_EXT_CACHE_EXTENT);
-+			goto out;
-+		}
-+	}
-+
-+	/*
-+	 * requested block isn't allocated yet
-+	 * we couldn't try to create block if create flag is zero 
-+	 */
-+	if (!create) {
-+		/* put just found gap into cache to speedup subsequest reqs */
-+		ext3_ext_put_gap_in_cache(&tree, path, iblock);
-+		goto out2;
-+	}
-+
-+	/* allocate new block */
-+	goal = ext3_ext_find_goal(inode, path, iblock);
-+	newblock = ext3_new_block(handle, inode, goal, &err);
-+	if (!newblock)
-+		goto out2;
-+	ext_debug(&tree, "allocate new block: goal %d, found %d\n",
-+		  goal, newblock);
-+
-+	/* try to insert new extent into found leaf and return */
-+	newex.ee_block = iblock;
-+	newex.ee_start = newblock;
-+	newex.ee_start_hi = 0;
-+	newex.ee_len = 1;
-+	err = ext3_ext_insert_extent(handle, &tree, path, &newex);
-+	if (err)
-+		goto out2;
-+	
-+	if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize)
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+
-+	/* previous routine could use block we allocated */
-+	newblock = newex.ee_start;
-+	set_buffer_new(bh_result);
-+
-+	ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len,
-+			      newex.ee_start, EXT3_EXT_CACHE_EXTENT);
-+out:
-+	ext3_ext_show_leaf(&tree, path);
-+	map_bh(bh_result, inode->i_sb, newblock);
-+out2:
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	up(&EXT3_I(inode)->truncate_sem);
-+
-+	return err;	
-+}
-+
-+void ext3_ext_truncate(struct inode * inode, struct page *page)
-+{
-+	struct address_space *mapping = inode->i_mapping;
-+	struct super_block *sb = inode->i_sb;
-+	struct ext3_extents_tree tree;
-+	unsigned long last_block;
-+	handle_t *handle;
-+	int err = 0;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+
-+	/*
-+	 * probably first extent we're gonna free will be last in block
-+	 */
-+	err = ext3_writepage_trans_blocks(inode) + 3;
-+	handle = ext3_journal_start(inode, err);
-+	if (IS_ERR(handle)) {
-+		if (page) {
-+			clear_highpage(page);
-+			flush_dcache_page(page);
-+			unlock_page(page);
-+			page_cache_release(page);
-+		}
-+		return;
-+	}
-+
-+	if (page)
-+		ext3_block_truncate_page(handle, page, mapping, inode->i_size);
-+
-+	down(&EXT3_I(inode)->truncate_sem);
-+	ext3_ext_invalidate_cache(&tree);
-+
-+	/* 
-+	 * TODO: optimization is possible here
-+	 * probably we need not scaning at all,
-+	 * because page truncation is enough
-+	 */
-+	if (ext3_orphan_add(handle, inode))
-+		goto out_stop;
-+
-+	/* we have to know where to truncate from in crash case */
-+	EXT3_I(inode)->i_disksize = inode->i_size;
-+	ext3_mark_inode_dirty(handle, inode);
-+
-+	last_block = (inode->i_size + sb->s_blocksize - 1) >>
-+			EXT3_BLOCK_SIZE_BITS(sb);
-+	err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK);
-+	
-+	/* In a multi-transaction truncate, we only make the final
-+	 * transaction synchronous */
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+
-+out_stop:
-+	/*
-+	 * If this was a simple ftruncate(), and the file will remain alive
-+	 * then we need to clear up the orphan record which we created above.
-+	 * However, if this was a real unlink then we were called by
-+	 * ext3_delete_inode(), and we allow that function to clean up the
-+	 * orphan info for us.
-+	 */
-+	if (inode->i_nlink)
-+		ext3_orphan_del(handle, inode);
-+
-+	up(&EXT3_I(inode)->truncate_sem);
-+	ext3_journal_stop(handle);
-+}
-+
-+/*
-+ * this routine calculate max number of blocks we could modify
-+ * in order to allocate new block for an inode
-+ */
-+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num)
-+{
-+	struct ext3_extents_tree tree;
-+	int needed;
-+	
-+	ext3_init_tree_desc(&tree, inode);
-+	
-+	needed = ext3_ext_calc_credits_for_insert(&tree, NULL);
-+
-+	/* caller want to allocate num blocks */
-+	needed *= num;
-+	
-+#ifdef CONFIG_QUOTA
-+	/* 
-+	 * FIXME: real calculation should be here
-+	 * it depends on blockmap format of qouta file
-+	 */
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return needed;
-+}
-+
-+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	ext3_extent_tree_init(handle, &tree);
-+}
-+
-+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	return ext3_ext_calc_metadata_amount(&tree, blocks);
-+}
-+	
-+static int
-+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree,
-+			 struct ext3_ext_path *path,
-+			 struct ext3_ext_cache *newex)
-+{
-+	struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private;
-+
-+	if (newex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	if (buf->err < 0)
-+		return EXT_BREAK;
-+	if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen)
-+		return EXT_BREAK;
-+
-+	if (!copy_to_user(buf->cur, newex, sizeof(*newex))) {
-+		buf->err++;
-+		buf->cur += sizeof(*newex);
-+	} else {
-+		buf->err = -EFAULT;
-+		return EXT_BREAK;
-+	}
-+	return EXT_CONTINUE;
-+}
-+
-+static int
-+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_ext_cache *ex)
-+{
-+	struct ext3_extent_tree_stats *buf =
-+		(struct ext3_extent_tree_stats *) tree->private;
-+	int depth;
-+
-+	if (ex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	depth = EXT_DEPTH(tree);
-+	buf->extents_num++;
-+	if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr))
-+		buf->leaf_num++;
-+	return EXT_CONTINUE;
-+}
-+
-+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-+		   unsigned long arg)
-+{
-+	int err = 0;
-+
-+	if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL))
-+		return -EINVAL;
-+
-+	if (cmd == EXT3_IOC_GET_EXTENTS) {
-+		struct ext3_extent_buf buf;
-+		struct ext3_extents_tree tree;
-+
-+		if (copy_from_user(&buf, (void *) arg, sizeof(buf)))
-+			return -EFAULT;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		buf.cur = buf.buffer;
-+		buf.err = 0;
-+		tree.private = &buf;
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK,
-+					  ext3_ext_store_extent_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (err == 0)
-+			err = buf.err;
-+	} else if (cmd == EXT3_IOC_GET_TREE_STATS) {
-+		struct ext3_extent_tree_stats buf;
-+		struct ext3_extents_tree tree;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		buf.depth = EXT_DEPTH(&tree);
-+		buf.extents_num = 0;
-+		buf.leaf_num = 0;
-+		tree.private = &buf;
-+		err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK,
-+					  ext3_ext_collect_stats_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (!err)
-+			err = copy_to_user((void *) arg, &buf, sizeof(buf));
-+	} else if (cmd == EXT3_IOC_GET_TREE_DEPTH) {
-+		struct ext3_extents_tree tree;
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = EXT_DEPTH(&tree);
-+		up(&EXT3_I(inode)->truncate_sem);
-+	}
-+
-+	return err;
-+}
-+
-+EXPORT_SYMBOL(ext3_init_tree_desc);
-+EXPORT_SYMBOL(ext3_mark_inode_dirty);
-+EXPORT_SYMBOL(ext3_ext_invalidate_cache);
-+EXPORT_SYMBOL(ext3_ext_insert_extent);
-+EXPORT_SYMBOL(ext3_ext_walk_space);
-+EXPORT_SYMBOL(ext3_ext_find_goal);
-+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert);
-Index: linux-2.6.16.21-0.8/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/ext3/ialloc.c
-+++ linux-2.6.16.21-0.8/fs/ext3/ialloc.c
-@@ -598,7 +598,7 @@ got:
- 	ei->i_dir_start_lookup = 0;
- 	ei->i_disksize = 0;
- 
--	ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL;
-+	ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL);
- 	if (S_ISLNK(mode))
- 		ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL);
- 	/* dirsync only applies to directories */
-@@ -642,6 +642,18 @@ got:
- 	if (err)
- 		goto fail_free_drop;
- 
-+	if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
-+		EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
-+		ext3_extents_initialize_blockmap(handle, inode);
-+		if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
-+			err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-+			if (err) goto fail;
-+			EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS);
-+			BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata");
-+			err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-+		}
-+	}
-+
- 	err = ext3_mark_inode_dirty(handle, inode);
- 	if (err) {
- 		ext3_std_error(sb, err);
-Index: linux-2.6.16.21-0.8/fs/ext3/inode.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/ext3/inode.c
-+++ linux-2.6.16.21-0.8/fs/ext3/inode.c
-@@ -40,7 +40,7 @@
- #include "iopen.h"
- #include "acl.h"
- 
--static int ext3_writepage_trans_blocks(struct inode *inode);
-+int ext3_writepage_trans_blocks(struct inode *inode);
- 
- /*
-  * Test whether an inode is a fast symlink.
-@@ -788,6 +788,17 @@ out:
- 	return err;
- }
- 
-+static inline int
-+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block,
-+		    struct buffer_head *bh, int create, int extend_disksize)
-+{
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_get_block(handle, inode, block, bh, create,
-+					  extend_disksize);
-+	return ext3_get_block_handle(handle, inode, block, bh, create,
-+				     extend_disksize);
-+}
-+
- static int ext3_get_block(struct inode *inode, sector_t iblock,
- 			struct buffer_head *bh_result, int create)
- {
-@@ -798,8 +809,8 @@ static int ext3_get_block(struct inode *
- 		handle = ext3_journal_current_handle();
- 		J_ASSERT(handle != 0);
- 	}
--	ret = ext3_get_block_handle(handle, inode, iblock,
--				bh_result, create, 1);
-+	ret = ext3_get_block_wrap(handle, inode, iblock,
-+				  bh_result, create, 1);
- 	return ret;
- }
- 
-@@ -843,7 +854,7 @@ ext3_direct_io_get_blocks(struct inode *
- 
- get_block:
- 	if (ret == 0)
--		ret = ext3_get_block_handle(handle, inode, iblock,
-+		ret = ext3_get_block_wrap(handle, inode, iblock,
- 					bh_result, create, 0);
- 	bh_result->b_size = (1 << inode->i_blkbits);
- 	return ret;
-@@ -863,7 +874,7 @@ struct buffer_head *ext3_getblk(handle_t
- 	dummy.b_state = 0;
- 	dummy.b_blocknr = -1000;
- 	buffer_trace_init(&dummy.b_history);
--	*errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1);
-+	*errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1);
- 	if (!*errp && buffer_mapped(&dummy)) {
- 		struct buffer_head *bh;
- 		bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
-@@ -1606,7 +1617,7 @@ void ext3_set_aops(struct inode *inode)
-  * This required during truncate. We need to physically zero the tail end
-  * of that block so it doesn't yield old data if the file is later grown.
-  */
--static int ext3_block_truncate_page(handle_t *handle, struct page *page,
-+int ext3_block_truncate_page(handle_t *handle, struct page *page,
- 		struct address_space *mapping, loff_t from)
- {
- 	unsigned long index = from >> PAGE_CACHE_SHIFT;
-@@ -2116,6 +2127,9 @@ void ext3_truncate(struct inode * inode)
- 			return;
- 	}
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_truncate(inode, page);
-+
- 	handle = start_transaction(inode);
- 	if (IS_ERR(handle)) {
- 		if (page) {
-@@ -2863,12 +2877,15 @@ err_out:
-  * block and work out the exact number of indirects which are touched.  Pah.
-  */
- 
--static int ext3_writepage_trans_blocks(struct inode *inode)
-+int ext3_writepage_trans_blocks(struct inode *inode)
- {
- 	int bpp = ext3_journal_blocks_per_page(inode);
- 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
- 	int ret;
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_writepage_trans_blocks(inode, bpp);
-+
- 	if (ext3_should_journal_data(inode))
- 		ret = 3 * (bpp + indirects) + 2;
- 	else
-Index: linux-2.6.16.21-0.8/fs/ext3/Makefile
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/ext3/Makefile
-+++ linux-2.6.16.21-0.8/fs/ext3/Makefile
-@@ -5,7 +5,8 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
--	   ioctl.o namei.o super.o symlink.o hash.o resize.o
-+	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
-+	   extents.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-2.6.16.21-0.8/fs/ext3/super.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/ext3/super.c
-+++ linux-2.6.16.21-0.8/fs/ext3/super.c
-@@ -392,6 +392,7 @@ static void ext3_put_super (struct super
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
- 	if (!(sb->s_flags & MS_RDONLY)) {
-@@ -456,6 +457,8 @@ static struct inode *ext3_alloc_inode(st
- #endif
- 	ei->i_block_alloc_info = NULL;
- 	ei->vfs_inode.i_version = 1;
-+	
-+	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
- 	return &ei->vfs_inode;
- }
- 
-@@ -638,6 +641,7 @@ enum {
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+	Opt_extents, Opt_noextents, Opt_extdebug,
- 	Opt_grpquota
- };
- 
-@@ -689,6 +693,9 @@ static match_table_t tokens = {
- 	{Opt_iopen, "iopen"},
- 	{Opt_noiopen, "noiopen"},
- 	{Opt_iopen_nopriv, "iopen_nopriv"},
-+	{Opt_extents, "extents"},
-+	{Opt_noextents, "noextents"},
-+	{Opt_extdebug, "extdebug"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -1030,6 +1036,15 @@ clear_qf_name:
- 		case Opt_nobh:
- 			set_opt(sbi->s_mount_opt, NOBH);
- 			break;
-+		case Opt_extents:
-+			set_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_noextents:
-+			clear_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_extdebug:
-+			set_opt (sbi->s_mount_opt, EXTDEBUG);
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1756,6 +1768,7 @@ static int ext3_fill_super (struct super
- 	percpu_counter_mod(&sbi->s_dirs_counter,
- 		ext3_count_dirs(sb));
- 
-+	ext3_ext_init(sb);
- 	lock_kernel();
- 	return 0;
- 
-Index: linux-2.6.16.21-0.8/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/ext3/ioctl.c
-+++ linux-2.6.16.21-0.8/fs/ext3/ioctl.c
-@@ -125,6 +125,10 @@ flags_err:
- 			err = ext3_change_inode_journal_flag(inode, jflag);
- 		return err;
- 	}
-+	case EXT3_IOC_GET_EXTENTS:
-+	case EXT3_IOC_GET_TREE_STATS:
-+	case EXT3_IOC_GET_TREE_DEPTH:
-+		return ext3_ext_ioctl(inode, filp, cmd, arg);
- 	case EXT3_IOC_GETVERSION:
- 	case EXT3_IOC_GETVERSION_OLD:
- 		return put_user(inode->i_generation, (int __user *) arg);
-Index: linux-2.6.16.21-0.8/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.16.21-0.8.orig/include/linux/ext3_fs.h
-+++ linux-2.6.16.21-0.8/include/linux/ext3_fs.h
-@@ -185,9 +185,10 @@ struct ext3_group_desc
- #define EXT3_NOTAIL_FL			0x00008000 /* file tail should not be merged */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL			0x00080000 /* Inode uses extents */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
-+#define EXT3_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
- #define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
- 
- /*
-@@ -237,6 +238,9 @@ struct ext3_new_group_data {
- #endif
- #define EXT3_IOC_GETRSVSZ		_IOR('f', 5, long)
- #define EXT3_IOC_SETRSVSZ		_IOW('f', 6, long)
-+#define EXT3_IOC_GET_EXTENTS		_IOR('f', 7, long)
-+#define EXT3_IOC_GET_TREE_DEPTH		_IOR('f', 8, long)
-+#define EXT3_IOC_GET_TREE_STATS		_IOR('f', 9, long)
- 
- /*
-  *  Mount options
-@@ -377,6 +381,8 @@ struct ext3_inode {
- #define EXT3_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
- #define EXT3_MOUNT_IOPEN		0x400000	/* Allow access via iopen */
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x800000/* Make iopen world-readable */
-+#define EXT3_MOUNT_EXTENTS		0x1000000/* Extents support */
-+#define EXT3_MOUNT_EXTDEBUG		0x2000000/* Extents debug */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -565,11 +571,13 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
- #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
-+#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
- 
- #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
- 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
--					 EXT3_FEATURE_INCOMPAT_META_BG)
-+					 EXT3_FEATURE_INCOMPAT_META_BG| \
-+					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-@@ -776,6 +784,7 @@ extern unsigned long ext3_count_free (st
- 
- 
- /* inode.c */
-+extern int ext3_block_truncate_page(handle_t *, struct page *, struct address_space *, loff_t);
- extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-@@ -792,6 +801,7 @@ extern int ext3_get_inode_loc(struct ino
- extern void ext3_truncate (struct inode *);
- extern void ext3_set_inode_flags(struct inode *);
- extern void ext3_set_aops(struct inode *inode);
-+extern int ext3_writepage_trans_blocks(struct inode *inode);
- 
- /* ioctl.c */
- extern int ext3_ioctl (struct inode *, struct file *, unsigned int,
-@@ -845,6 +855,16 @@ extern struct inode_operations ext3_spec
- extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
- 
-+/* extents.c */
-+extern int ext3_ext_writepage_trans_blocks(struct inode *, int);
-+extern int ext3_ext_get_block(handle_t *, struct inode *, long,
-+			      struct buffer_head *, int, int);
-+extern void ext3_ext_truncate(struct inode *, struct page *);
-+extern void ext3_ext_init(struct super_block *);
-+extern void ext3_ext_release(struct super_block *);
-+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
-+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
-+			  unsigned int cmd, unsigned long arg);
- 
- #endif	/* __KERNEL__ */
- 
-Index: linux-2.6.16.21-0.8/include/linux/ext3_extents.h
-===================================================================
---- /dev/null
-+++ linux-2.6.16.21-0.8/include/linux/ext3_extents.h
-@@ -0,0 +1,262 @@
-+/*
-+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+#ifndef _LINUX_EXT3_EXTENTS
-+#define _LINUX_EXT3_EXTENTS
-+
-+/*
-+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
-+ * become very little, so index split, in-depth growing and
-+ * other hard changes happens much more often
-+ * this is for debug purposes only
-+ */
-+#define AGRESSIVE_TEST_
-+
-+/*
-+ * if CHECK_BINSEARCH defined, then results of binary search
-+ * will be checked by linear search
-+ */
-+#define CHECK_BINSEARCH_
-+
-+/*
-+ * if EXT_DEBUG is defined you can use 'extdebug' mount option
-+ * to get lots of info what's going on
-+ */
-+#define EXT_DEBUG_
-+#ifdef EXT_DEBUG
-+#define ext_debug(tree,fmt,a...)			\
-+do {							\
-+	if (test_opt((tree)->inode->i_sb, EXTDEBUG))	\
-+		printk(fmt, ##a);			\
-+} while (0);
-+#else
-+#define ext_debug(tree,fmt,a...)
-+#endif
-+
-+/*
-+ * if EXT_STATS is defined then stats numbers are collected
-+ * these number will be displayed at umount time
-+ */
-+#define EXT_STATS_
-+
-+
-+#define EXT3_ALLOC_NEEDED	3	/* block bitmap + group desc. + sb */
-+
-+/*
-+ * ext3_inode has i_block array (total 60 bytes)
-+ * first 4 bytes are used to store:
-+ *  - tree depth (0 mean there is no tree yet. all extents in the inode)
-+ *  - number of alive extents in the inode
-+ */
-+
-+/*
-+ * this is extent on-disk structure
-+ * it's used at the bottom of the tree
-+ */
-+struct ext3_extent {
-+	__u32	ee_block;	/* first logical block extent covers */
-+	__u16	ee_len;		/* number of blocks covered by extent */
-+	__u16	ee_start_hi;	/* high 16 bits of physical block */
-+	__u32	ee_start;	/* low 32 bigs of physical block */
-+};
-+
-+/*
-+ * this is index on-disk structure
-+ * it's used at all the levels, but the bottom
-+ */
-+struct ext3_extent_idx {
-+	__u32	ei_block;	/* index covers logical blocks from 'block' */
-+	__u32	ei_leaf;	/* pointer to the physical block of the next *
-+				 * level. leaf or next index could bet here */
-+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
-+	__u16	ei_unused;
-+};
-+
-+/*
-+ * each block (leaves and indexes), even inode-stored has header
-+ */
-+struct ext3_extent_header {	
-+	__u16	eh_magic;	/* probably will support different formats */	
-+	__u16	eh_entries;	/* number of valid entries */
-+	__u16	eh_max;		/* capacity of store in entries */
-+	__u16	eh_depth;	/* has tree real underlaying blocks? */
-+	__u32	eh_generation;	/* flags(8 bits) | generation of the tree */
-+};
-+
-+#define EXT3_EXT_MAGIC		0xf30a
-+
-+/*
-+ * array of ext3_ext_path contains path to some extent
-+ * creation/lookup routines use it for traversal/splitting/etc
-+ * truncate uses it to simulate recursive walking
-+ */
-+struct ext3_ext_path {
-+	__u32				p_block;
-+	__u16				p_depth;
-+	struct ext3_extent		*p_ext;
-+	struct ext3_extent_idx		*p_idx;
-+	struct ext3_extent_header	*p_hdr;
-+	struct buffer_head		*p_bh;
-+};
-+
-+/*
-+ * structure for external API
-+ */
-+
-+/*
-+ * storage for cached extent
-+ */
-+struct ext3_ext_cache {
-+	__u32	ec_start;
-+	__u32	ec_block;
-+	__u32	ec_len;
-+	__u32	ec_type;
-+};
-+
-+#define EXT3_EXT_CACHE_NO	0
-+#define EXT3_EXT_CACHE_GAP	1
-+#define EXT3_EXT_CACHE_EXTENT	2
-+
-+/*
-+ * ext3_extents_tree is used to pass initial information
-+ * to top-level extents API
-+ */
-+struct ext3_extents_helpers;
-+struct ext3_extents_tree {
-+	struct inode *inode;	/* inode which tree belongs to */
-+	void *root;		/* ptr to data top of tree resides at */
-+	void *buffer;		/* will be passed as arg to ^^ routines	*/
-+	int buffer_len;
-+	void *private;
-+	struct ext3_ext_cache *cex;/* last found extent */
-+	struct ext3_extents_helpers *ops;
-+};
-+
-+struct ext3_extents_helpers {
-+	int (*get_write_access)(handle_t *h, void *buffer);
-+	int (*mark_buffer_dirty)(handle_t *h, void *buffer);
-+	int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2);
-+	int (*remove_extent_credits)(struct ext3_extents_tree *,
-+				     struct ext3_extent *, unsigned long,
-+				     unsigned long);
-+	int (*remove_extent)(struct ext3_extents_tree *,
-+			     struct ext3_extent *, unsigned long,
-+			     unsigned long);
-+	int (*new_block)(handle_t *, struct ext3_extents_tree *,
-+			 struct ext3_ext_path *, struct ext3_extent *,
-+			 int *);
-+};
-+
-+/*
-+ * to be called by ext3_ext_walk_space()
-+ * negative retcode - error
-+ * positive retcode - signal for ext3_ext_walk_space(), see below
-+ * callback must return valid extent (passed or newly created)
-+ */
-+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *,
-+				    struct ext3_ext_path *,
-+				    struct ext3_ext_cache *);
-+
-+#define EXT_CONTINUE	0
-+#define EXT_BREAK	1
-+#define EXT_REPEAT	2
-+
-+
-+#define EXT_MAX_BLOCK	0xffffffff
-+
-+
-+#define EXT_FIRST_EXTENT(__hdr__) \
-+	((struct ext3_extent *) (((char *) (__hdr__)) +		\
-+				 sizeof(struct ext3_extent_header)))
-+#define EXT_FIRST_INDEX(__hdr__) \
-+	((struct ext3_extent_idx *) (((char *) (__hdr__)) +	\
-+				     sizeof(struct ext3_extent_header)))
-+#define EXT_HAS_FREE_INDEX(__path__) \
-+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
-+#define EXT_LAST_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_LAST_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_MAX_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_MAX_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_HDR_GEN(__hdr__)	((__hdr__)->eh_generation & 0x00ffffff)
-+#define EXT_FLAGS(__hdr__)	((__hdr__)->eh_generation >> 24)
-+#define EXT_FLAGS_CLR_UNKNOWN	0x7	/* Flags cleared on modification */
-+
-+#define EXT_BLOCK_HDR(__bh__) 	((struct ext3_extent_header *)(__bh__)->b_data)
-+#define EXT_ROOT_HDR(__tree__)	((struct ext3_extent_header *)(__tree__)->root)
-+#define EXT_DEPTH(__tree__)	(EXT_ROOT_HDR(__tree__)->eh_depth)
-+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__))
-+
-+#define EXT_ASSERT(__x__) if (!(__x__)) BUG();
-+
-+#define EXT_CHECK_PATH(tree,path)					\
-+{									\
-+	int depth = EXT_DEPTH(tree);					\
-+	BUG_ON((unsigned long) (path) < __PAGE_OFFSET);			\
-+	BUG_ON((unsigned long) (path)[depth].p_idx <			\
-+			__PAGE_OFFSET && (path)[depth].p_idx != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_ext <			\
-+			__PAGE_OFFSET && (path)[depth].p_ext != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET);	\
-+	BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET	\
-+			&& depth != 0);					\
-+	BUG_ON((path)[0].p_depth != depth);				\
-+}
-+
-+
-+/*
-+ * this structure is used to gather extents from the tree via ioctl
-+ */
-+struct ext3_extent_buf {
-+	unsigned long start;
-+	int buflen;
-+	void *buffer;
-+	void *cur;
-+	int err;
-+};
-+
-+/*
-+ * this structure is used to collect stats info about the tree
-+ */
-+struct ext3_extent_tree_stats {
-+	int depth;
-+	int extents_num;
-+	int leaf_num;
-+};
-+
-+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *);
-+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *);
-+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *);
-+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *);
-+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback);
-+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
-+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
-+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int);
-+
-+static inline void
-+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree)
-+{
-+	if (tree->cex)
-+		tree->cex->ec_type = EXT3_EXT_CACHE_NO;
-+}
-+
-+
-+#endif /* _LINUX_EXT3_EXTENTS */
-Index: linux-2.6.16.21-0.8/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.16.21-0.8.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.16.21-0.8/include/linux/ext3_fs_i.h
-@@ -133,6 +133,8 @@ struct ext3_inode_info {
- 	 */
- 	struct semaphore truncate_sem;
- 	struct inode vfs_inode;
-+
-+	__u32 i_cached_extent[4];
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch
deleted file mode 100644
index fd17dab39e65a0515a095b74947a739c28a405ea..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.16-sles10.patch
+++ /dev/null
@@ -1,2947 +0,0 @@
-Index: linux-2.6.16.27-0.9/fs/ext3/extents.c
-===================================================================
---- /dev/null
-+++ linux-2.6.16.27-0.9/fs/ext3/extents.c
-@@ -0,0 +1,2359 @@
-+/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+/*
-+ * Extents support for EXT3
-+ *
-+ * TODO:
-+ *   - ext3_ext_walk_space() sould not use ext3_ext_find_extent()
-+ *   - ext3_ext_calc_credits() could take 'mergable' into account
-+ *   - ext3*_error() should be used in some situations
-+ *   - find_goal() [to be tested and improved]
-+ *   - smart tree reduction
-+ *   - arch-independence
-+ *     common on-disk format for big/little-endian arch
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/fs.h>
-+#include <linux/time.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/smp_lock.h>
-+#include <linux/highuid.h>
-+#include <linux/pagemap.h>
-+#include <linux/quotaops.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/ext3_extents.h>
-+#include <asm/uaccess.h>
-+
-+
-+static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
-+{
-+	if (eh->eh_magic != EXT3_EXT_MAGIC) {
-+		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
-+		       (unsigned)eh->eh_magic);
-+		return -EIO;
-+	}
-+	if (eh->eh_max == 0) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
-+		       (unsigned)eh->eh_max);
-+		return -EIO;
-+	}
-+	if (eh->eh_entries > eh->eh_max) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
-+		       (unsigned)eh->eh_entries);
-+		return -EIO;
-+	}
-+	return 0;
-+}
-+
-+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
-+{
-+	int err;
-+
-+	if (handle->h_buffer_credits > needed)
-+		return handle;
-+	if (!ext3_journal_extend(handle, needed))
-+		return handle;
-+	err = ext3_journal_restart(handle, needed);
-+	
-+	return handle;
-+}
-+
-+static int inline
-+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->get_write_access)
-+		return tree->ops->get_write_access(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+static int inline
-+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->mark_buffer_dirty)
-+		return tree->ops->mark_buffer_dirty(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ */
-+static int ext3_ext_get_access(handle_t *handle,
-+			       struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+	int err;
-+
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err = ext3_journal_get_write_access(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_get_access_for_root(handle, tree);
-+	}
-+	return err;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ *  - EIO
-+ */
-+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path)
-+{
-+	int err;
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err =ext3_journal_dirty_metadata(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_mark_root_dirty(handle, tree);
-+	}
-+	return err;
-+}
-+
-+static int inline
-+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, struct ext3_extent *ex,
-+		   int *err)
-+{
-+	int goal, depth, newblock;
-+	struct inode *inode;
-+
-+	EXT_ASSERT(tree);
-+	if (tree->ops->new_block)
-+		return tree->ops->new_block(handle, tree, path, ex, err);
-+
-+	inode = tree->inode;
-+	depth = EXT_DEPTH(tree);
-+	if (path && depth > 0) {
-+		goal = path[depth-1].p_block;
-+	} else {
-+		struct ext3_inode_info *ei = EXT3_I(inode);
-+		unsigned long bg_start;
-+		unsigned long colour;
-+
-+		bg_start = (ei->i_block_group *
-+			    EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+			le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+		colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+		goal = bg_start + colour;
-+	}
-+
-+	newblock = ext3_new_block(handle, inode, goal, err);
-+	return newblock;
-+}
-+
-+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *neh = EXT_ROOT_HDR(tree);
-+	neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) |
-+			     (EXT_HDR_GEN(neh) + 1);
-+}
-+
-+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 6;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 5;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 3;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 4;
-+#endif
-+	return size;
-+}
-+
-+static void ext3_ext_show_path(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int k, l = path->p_depth;
-+
-+	ext_debug(tree, "path:");
-+	for (k = 0; k <= l; k++, path++) {
-+		if (path->p_idx) {
-+			ext_debug(tree, "  %d->%d", path->p_idx->ei_block,
-+				  path->p_idx->ei_leaf);
-+		} else if (path->p_ext) {
-+			ext_debug(tree, "  %d:%d:%d",
-+				  path->p_ext->ee_block,
-+				  path->p_ext->ee_len,
-+				  path->p_ext->ee_start);
-+		} else
-+			ext_debug(tree, "  []");
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *eh;
-+	struct ext3_extent *ex;
-+	int i;
-+
-+	if (!path)
-+		return;
-+
-+	eh = path[depth].p_hdr;
-+	ex = EXT_FIRST_EXTENT(eh);
-+
-+	for (i = 0; i < eh->eh_entries; i++, ex++) {
-+		ext_debug(tree, "%d:%d:%d ",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_drop_refs(struct ext3_ext_path *path)
-+{
-+	int depth = path->p_depth;
-+	int i;
-+
-+	for (i = 0; i <= depth; i++, path++) {
-+		if (path->p_bh) {
-+			brelse(path->p_bh);
-+			path->p_bh = NULL;
-+		}
-+	}
-+}
-+
-+/*
-+ * binary search for closest index by given block
-+ */
-+static inline void
-+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree,
-+		       struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent_idx *ix;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_entries > 0);
-+
-+	ext_debug(tree, "binsearch for %d(idx):  ", block);
-+
-+	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ix[l + k].ei_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ix += l;
-+	path->p_idx = ix;
-+	ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf);
-+
-+	while (l++ < r) {
-+		if (block < ix->ei_block) 
-+			break;
-+		path->p_idx = ix++;
-+	}
-+	ext_debug(tree, "  -> %d->%d\n", path->p_idx->ei_block,
-+		  path->p_idx->ei_leaf);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent_idx *chix;
-+
-+		chix = ix = EXT_FIRST_INDEX(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ix++) {
-+			if (k != 0 && ix->ei_block <= ix[-1].ei_block) {
-+				printk("k=%d, ix=0x%p, first=0x%p\n", k,
-+				       ix, EXT_FIRST_INDEX(eh));
-+				printk("%u <= %u\n",
-+				       ix->ei_block,ix[-1].ei_block);
-+			}
-+			EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block);
-+			if (block < ix->ei_block) 
-+				break;
-+			chix = ix;
-+		}
-+		EXT_ASSERT(chix == path->p_idx);
-+	}
-+#endif
-+}
-+
-+/*
-+ * binary search for closest extent by given block
-+ */
-+static inline void
-+ext3_ext_binsearch(struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent *ex;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+
-+	if (eh->eh_entries == 0) {
-+		/*
-+		 * this leaf is empty yet:
-+		 *  we get such a leaf in split/add case
-+		 */
-+		return;
-+	}
-+	
-+	ext_debug(tree, "binsearch for %d:  ", block);
-+
-+	path->p_ext = ex = EXT_FIRST_EXTENT(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ex[l + k].ee_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ex += l;
-+	path->p_ext = ex;
-+	ext_debug(tree, "  -> %d:%d:%d ", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+	while (l++ < r) {
-+		if (block < ex->ee_block) 
-+			break;
-+		path->p_ext = ex++;
-+	}
-+	ext_debug(tree, "  -> %d:%d:%d\n", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent *chex;
-+
-+		chex = ex = EXT_FIRST_EXTENT(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ex++) {
-+			EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block);
-+			if (block < ex->ee_block) 
-+				break;
-+			chex = ex;
-+		}
-+		EXT_ASSERT(chex == path->p_ext);
-+	}
-+#endif
-+}
-+
-+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *eh;
-+
-+	BUG_ON(tree->buffer_len == 0);
-+	ext3_ext_get_access_for_root(handle, tree);
-+	eh = EXT_ROOT_HDR(tree);
-+	eh->eh_depth = 0;
-+	eh->eh_entries = 0;
-+	eh->eh_magic = EXT3_EXT_MAGIC;
-+	eh->eh_max = ext3_ext_space_root(tree);
-+	ext3_ext_mark_root_dirty(handle, tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return 0;
-+}
-+
-+struct ext3_ext_path *
-+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block,
-+		     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	struct buffer_head *bh;
-+	int depth, i, ppos = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	eh = EXT_ROOT_HDR(tree);
-+	EXT_ASSERT(eh);
-+	if (ext3_ext_check_header(eh)) {
-+		/* don't free previously allocated path
-+		 * -- caller should take care */
-+		path = NULL;
-+		goto err;
-+	}
-+
-+	i = depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* account possible depth increase */
-+	if (!path) {
-+		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-+			       GFP_NOFS);
-+		if (!path)
-+			return ERR_PTR(-ENOMEM);
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[0].p_hdr = eh;
-+
-+	/* walk through the tree */
-+	while (i) {
-+		ext_debug(tree, "depth %d: num %d, max %d\n",
-+			  ppos, eh->eh_entries, eh->eh_max);
-+		ext3_ext_binsearch_idx(tree, path + ppos, block);
-+		path[ppos].p_block = path[ppos].p_idx->ei_leaf;
-+		path[ppos].p_depth = i;
-+		path[ppos].p_ext = NULL;
-+
-+		bh = sb_bread(tree->inode->i_sb, path[ppos].p_block);
-+		if (!bh)
-+			goto err;
-+
-+		eh = EXT_BLOCK_HDR(bh);
-+		ppos++;
-+		EXT_ASSERT(ppos <= depth);
-+		path[ppos].p_bh = bh;
-+		path[ppos].p_hdr = eh;
-+		i--;
-+
-+		if (ext3_ext_check_header(eh))
-+			goto err;
-+	}
-+
-+	path[ppos].p_depth = i;
-+	path[ppos].p_hdr = eh;
-+	path[ppos].p_ext = NULL;
-+	path[ppos].p_idx = NULL;
-+
-+	if (ext3_ext_check_header(eh))
-+		goto err;
-+
-+	/* find extent */
-+	ext3_ext_binsearch(tree, path + ppos, block);
-+
-+	ext3_ext_show_path(tree, path);
-+
-+	return path;
-+
-+err:
-+	printk(KERN_ERR "EXT3-fs: header is corrupted!\n");
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	return ERR_PTR(-EIO);
-+}
-+
-+/*
-+ * insert new index [logical;ptr] into the block at cupr
-+ * it check where to insert: before curp or after curp
-+ */
-+static int ext3_ext_insert_index(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *curp,
-+				 int logical, int ptr)
-+{
-+	struct ext3_extent_idx *ix;
-+	int len, err;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		return err;
-+
-+	EXT_ASSERT(logical != curp->p_idx->ei_block);
-+	len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx;
-+	if (logical > curp->p_idx->ei_block) {
-+		/* insert after */
-+		if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
-+			len = (len - 1) * sizeof(struct ext3_extent_idx);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert new index %d after: %d. "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  logical, ptr, len,
-+				  (curp->p_idx + 1), (curp->p_idx + 2));
-+			memmove(curp->p_idx + 2, curp->p_idx + 1, len);
-+		}
-+		ix = curp->p_idx + 1;
-+	} else {
-+		/* insert before */
-+		len = len * sizeof(struct ext3_extent_idx);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert new index %d before: %d. "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  logical, ptr, len,
-+			  curp->p_idx, (curp->p_idx + 1));
-+		memmove(curp->p_idx + 1, curp->p_idx, len);
-+		ix = curp->p_idx;
-+	}
-+
-+	ix->ei_block = logical;
-+	ix->ei_leaf = ptr;
-+	ix->ei_leaf_hi = ix->ei_unused = 0;
-+	curp->p_hdr->eh_entries++;
-+
-+	EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
-+	EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
-+
-+	err = ext3_ext_dirty(handle, tree, curp);
-+	ext3_std_error(tree->inode->i_sb, err);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine inserts new subtree into the path, using free index entry
-+ * at depth 'at:
-+ *  - allocates all needed blocks (new leaf and all intermediate index blocks)
-+ *  - makes decision where to split
-+ *  - moves remaining extens and index entries (right to the split point)
-+ *    into the newly allocated blocks
-+ *  - initialize subtree
-+ */
-+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_extent *newext, int at)
-+{
-+	struct buffer_head *bh = NULL;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct ext3_extent *ex;
-+	int i = at, k, m, a;
-+	unsigned long newblock, oldblock, border;
-+	int *ablocks = NULL; /* array of allocated blocks */
-+	int err = 0;
-+
-+	/* make decision: where to split? */
-+	/* FIXME: now desicion is simplest: at current extent */
-+
-+	/* if current leaf will be splitted, then we should use 
-+	 * border from split point */
-+	EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
-+	if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		border = path[depth].p_ext[1].ee_block;
-+		ext_debug(tree, "leaf will be splitted."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	} else {
-+		border = newext->ee_block;
-+		ext_debug(tree, "leaf will be added."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	}
-+
-+	/* 
-+	 * if error occurs, then we break processing
-+	 * and turn filesystem read-only. so, index won't
-+	 * be inserted and tree will be in consistent
-+	 * state. next mount will repair buffers too
-+	 */
-+
-+	/*
-+	 * get array to track all allocated blocks
-+	 * we need this to handle errors and free blocks
-+	 * upon them
-+	 */
-+	ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS);
-+	if (!ablocks)
-+		return -ENOMEM;
-+	memset(ablocks, 0, sizeof(unsigned long) * depth);
-+
-+	/* allocate all needed blocks */
-+	ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at);
-+	for (a = 0; a < depth - at; a++) {
-+		newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+		if (newblock == 0)
-+			goto cleanup;
-+		ablocks[a] = newblock;
-+	}
-+
-+	/* initialize new leaf */
-+	newblock = ablocks[--a];
-+	EXT_ASSERT(newblock);
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		goto cleanup;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh)))
-+		goto cleanup;
-+
-+	neh = EXT_BLOCK_HDR(bh);
-+	neh->eh_entries = 0;
-+	neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	neh->eh_depth = 0;
-+	ex = EXT_FIRST_EXTENT(neh);
-+
-+	/* move remain of path[depth] to the new leaf */
-+	EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max);
-+	/* start copy from next extent */
-+	/* TODO: we could do it by single memmove */
-+	m = 0;
-+	path[depth].p_ext++;
-+	while (path[depth].p_ext <=
-+			EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		ext_debug(tree, "move %d:%d:%d in new leaf %lu\n",
-+			  path[depth].p_ext->ee_block,
-+			  path[depth].p_ext->ee_start,
-+			  path[depth].p_ext->ee_len,
-+			  newblock);
-+		memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent));
-+		neh->eh_entries++;
-+		m++;
-+	}
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto cleanup;	
-+	brelse(bh);
-+	bh = NULL;
-+
-+	/* correct old leaf */
-+	if (m) {
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			goto cleanup;
-+		path[depth].p_hdr->eh_entries -= m;
-+		if ((err = ext3_ext_dirty(handle, tree, path + depth)))
-+			goto cleanup;
-+		
-+	}
-+
-+	/* create intermediate indexes */
-+	k = depth - at - 1;
-+	EXT_ASSERT(k >= 0);
-+	if (k)
-+		ext_debug(tree,	"create %d intermediate indices\n", k);
-+	/* insert new index into current index block */
-+	/* current depth stored in i var */
-+	i = depth - 1;
-+	while (k--) {
-+		oldblock = newblock;
-+		newblock = ablocks[--a];
-+		bh = sb_getblk(tree->inode->i_sb, newblock);
-+		if (!bh) {
-+			err = -EIO;
-+			goto cleanup;
-+		}
-+		lock_buffer(bh);
-+
-+		if ((err = ext3_journal_get_create_access(handle, bh)))
-+			goto cleanup;
-+
-+		neh = EXT_BLOCK_HDR(bh);
-+		neh->eh_entries = 1;
-+		neh->eh_magic = EXT3_EXT_MAGIC;
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+		neh->eh_depth = depth - i; 
-+		fidx = EXT_FIRST_INDEX(neh);
-+		fidx->ei_block = border;
-+		fidx->ei_leaf = oldblock;
-+		fidx->ei_leaf_hi = fidx->ei_unused = 0;
-+
-+		ext_debug(tree,	"int.index at %d (block %lu): %lu -> %lu\n",
-+			  i, newblock, border, oldblock);
-+		/* copy indexes */
-+		m = 0;
-+		path[i].p_idx++;
-+
-+		ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
-+			  EXT_MAX_INDEX(path[i].p_hdr));
-+		EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
-+			   EXT_LAST_INDEX(path[i].p_hdr));
-+		while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
-+			ext_debug(tree, "%d: move %d:%d in new index %lu\n",
-+				  i, path[i].p_idx->ei_block,
-+				  path[i].p_idx->ei_leaf, newblock);
-+			memmove(++fidx, path[i].p_idx++,
-+				sizeof(struct ext3_extent_idx));
-+			neh->eh_entries++;
-+			EXT_ASSERT(neh->eh_entries <= neh->eh_max);
-+			m++;
-+		}
-+		set_buffer_uptodate(bh);
-+		unlock_buffer(bh);
-+
-+		if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+			goto cleanup;
-+		brelse(bh);
-+		bh = NULL;
-+
-+		/* correct old index */
-+		if (m) {
-+			err = ext3_ext_get_access(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+			path[i].p_hdr->eh_entries -= m;
-+			err = ext3_ext_dirty(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+		}
-+
-+		i--;
-+	}
-+
-+	/* insert new index */
-+	if (!err)
-+		err = ext3_ext_insert_index(handle, tree, path + at,
-+					    border, newblock);
-+
-+cleanup:
-+	if (bh) {
-+		if (buffer_locked(bh))
-+			unlock_buffer(bh);
-+		brelse(bh);
-+	}
-+
-+	if (err) {
-+		/* free all allocated blocks in error case */
-+		for (i = 0; i < depth; i++) {
-+			if (!ablocks[i])
-+				continue;
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+		}
-+	}
-+	kfree(ablocks);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine implements tree growing procedure:
-+ *  - allocates new block
-+ *  - moves top-level data (index block or leaf) into the new block
-+ *  - initialize new top-level, creating index that points to the
-+ *    just created block
-+ */
-+static int ext3_ext_grow_indepth(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *path,
-+				 struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp = path;
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct buffer_head *bh;
-+	unsigned long newblock;
-+	int err = 0;
-+
-+	newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+	if (newblock == 0)
-+		return err;
-+
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		ext3_std_error(tree->inode->i_sb, err);
-+		return err;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh))) {
-+		unlock_buffer(bh);
-+		goto out;	
-+	}
-+
-+	/* move top-level index/leaf into new block */
-+	memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
-+
-+	/* set size of new block */
-+	neh = EXT_BLOCK_HDR(bh);
-+	/* old root could have indexes or leaves
-+	 * so calculate eh_max right way */
-+	if (EXT_DEPTH(tree))
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+	else
-+		neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto out;
-+
-+	/* create index in new top-level index: num,max,pointer */
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		goto out;
-+
-+	curp->p_hdr->eh_magic = EXT3_EXT_MAGIC;
-+	curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree);
-+	curp->p_hdr->eh_entries = 1;
-+	curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
-+	/* FIXME: it works, but actually path[0] can be index */
-+	curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
-+	curp->p_idx->ei_leaf = newblock;
-+	curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
-+
-+	neh = EXT_ROOT_HDR(tree);
-+	fidx = EXT_FIRST_INDEX(neh);
-+	ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n",
-+		  neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); 
-+
-+	neh->eh_depth = path->p_depth + 1;
-+	err = ext3_ext_dirty(handle, tree, curp);
-+out:
-+	brelse(bh);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine finds empty index and adds new leaf. if no free index found
-+ * then it requests in-depth growing
-+ */
-+static int ext3_ext_create_new_leaf(handle_t *handle,
-+				    struct ext3_extents_tree *tree,
-+				    struct ext3_ext_path *path,
-+				    struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp;
-+	int depth, i, err = 0;
-+
-+repeat:
-+	i = depth = EXT_DEPTH(tree);
-+	
-+	/* walk up to the tree and look for free index entry */
-+	curp = path + depth;
-+	while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) {
-+		i--;
-+		curp--;
-+	}
-+
-+	/* we use already allocated block for index block
-+	 * so, subsequent data blocks should be contigoues */
-+	if (EXT_HAS_FREE_INDEX(curp)) {
-+		/* if we found index with free entry, then use that
-+		 * entry: create all needed subtree and add new leaf */
-+		err = ext3_ext_split(handle, tree, path, newext, i);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+	} else {
-+		/* tree is full, time to grow in depth */
-+		err = ext3_ext_grow_indepth(handle, tree, path, newext);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+
-+		/*
-+		 * only first (depth 0 -> 1) produces free space
-+		 * in all other cases we have to split growed tree
-+		 */
-+		depth = EXT_DEPTH(tree);
-+		if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) {
-+			/* now we need split */
-+			goto repeat;
-+		}
-+	}
-+
-+	if (err)
-+		return err;
-+
-+	return 0;
-+}
-+
-+/*
-+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK
-+ * NOTE: it consider block number from index entry as
-+ * allocated block. thus, index entries have to be consistent
-+ * with leafs
-+ */
-+static unsigned long
-+ext3_ext_next_allocated_block(struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	if (depth == 0 && path->p_ext == NULL)
-+		return EXT_MAX_BLOCK;
-+
-+	/* FIXME: what if index isn't full ?! */
-+	while (depth >= 0) {
-+		if (depth == path->p_depth) {
-+			/* leaf */
-+			if (path[depth].p_ext !=
-+			    EXT_LAST_EXTENT(path[depth].p_hdr))
-+				return path[depth].p_ext[1].ee_block;
-+		} else {
-+			/* index */
-+			if (path[depth].p_idx !=
-+			    EXT_LAST_INDEX(path[depth].p_hdr))
-+				return path[depth].p_idx[1].ei_block;
-+		}
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * returns first allocated block from next leaf or EXT_MAX_BLOCK
-+ */
-+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree,
-+					 struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	/* zero-tree has no leaf blocks at all */
-+	if (depth == 0)
-+		return EXT_MAX_BLOCK;
-+
-+	/* go to index block */
-+	depth--;
-+	
-+	while (depth >= 0) {
-+		if (path[depth].p_idx !=
-+		    EXT_LAST_INDEX(path[depth].p_hdr))
-+			return path[depth].p_idx[1].ei_block;
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * if leaf gets modified and modified extent is first in the leaf
-+ * then we have to correct all indexes above
-+ * TODO: do we need to correct tree in all cases?
-+ */
-+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	int depth = EXT_DEPTH(tree);	
-+	struct ext3_extent *ex;
-+	unsigned long border;
-+	int k, err = 0;
-+	
-+	eh = path[depth].p_hdr;
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(eh);
-+	
-+	if (depth == 0) {
-+		/* there is no tree at all */
-+		return 0;
-+	}
-+	
-+	if (ex != EXT_FIRST_EXTENT(eh)) {
-+		/* we correct tree if first leaf got modified only */
-+		return 0;
-+	}
-+	
-+	/*
-+	 * TODO: we need correction if border is smaller then current one
-+	 */
-+	k = depth - 1;
-+	border = path[depth].p_ext->ee_block;
-+	if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+		return err;
-+	path[k].p_idx->ei_block = border;
-+	if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+		return err;
-+
-+	while (k--) {
-+		/* change all left-side indexes */
-+		if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr))
-+			break;
-+		if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+			break;
-+		path[k].p_idx->ei_block = border;
-+		if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+			break;
-+	}
-+
-+	return err;
-+}
-+
-+static int inline
-+ext3_can_extents_be_merged(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex1,
-+			   struct ext3_extent *ex2)
-+{
-+	if (ex1->ee_block + ex1->ee_len != ex2->ee_block)
-+		return 0;
-+
-+#ifdef AGRESSIVE_TEST
-+	if (ex1->ee_len >= 4)
-+		return 0;
-+#endif
-+
-+	if (!tree->ops->mergable)
-+		return 1;
-+
-+	return tree->ops->mergable(ex1, ex2);
-+}
-+
-+/*
-+ * this routine tries to merge requsted extent into the existing
-+ * extent or inserts requested extent as new one into the tree,
-+ * creating new leaf in no-space case
-+ */
-+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree,
-+			   struct ext3_ext_path *path,
-+			   struct ext3_extent *newext)
-+{
-+	struct ext3_extent_header * eh;
-+	struct ext3_extent *ex, *fex;
-+	struct ext3_extent *nearex; /* nearest extent */
-+	struct ext3_ext_path *npath = NULL;
-+	int depth, len, err, next;
-+
-+	EXT_ASSERT(newext->ee_len > 0);
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(path[depth].p_hdr);
-+
-+	/* try to insert block into found extent and return */
-+	if (ex && ext3_can_extents_be_merged(tree, ex, newext)) {
-+		ext_debug(tree, "append %d block to %d:%d (from %d)\n",
-+			  newext->ee_len, ex->ee_block, ex->ee_len,
-+			  ex->ee_start);
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			return err;
-+		ex->ee_len += newext->ee_len;
-+		eh = path[depth].p_hdr;
-+		nearex = ex;
-+		goto merge;
-+	}
-+
-+repeat:
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+	if (eh->eh_entries < eh->eh_max)
-+		goto has_space;
-+
-+	/* probably next leaf has space for us? */
-+	fex = EXT_LAST_EXTENT(eh);
-+	next = ext3_ext_next_leaf_block(tree, path);
-+	if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) {
-+		ext_debug(tree, "next leaf block - %d\n", next);
-+		EXT_ASSERT(!npath);
-+		npath = ext3_ext_find_extent(tree, next, NULL);
-+		if (IS_ERR(npath))
-+			return PTR_ERR(npath);
-+		EXT_ASSERT(npath->p_depth == path->p_depth);
-+		eh = npath[depth].p_hdr;
-+		if (eh->eh_entries < eh->eh_max) {
-+			ext_debug(tree,	"next leaf isnt full(%d)\n",
-+				  eh->eh_entries);
-+			path = npath;
-+			goto repeat;
-+		}
-+		ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
-+			  eh->eh_entries, eh->eh_max);
-+	}
-+
-+	/*
-+	 * there is no free space in found leaf
-+	 * we're gonna add new leaf in the tree
-+	 */
-+	err = ext3_ext_create_new_leaf(handle, tree, path, newext);
-+	if (err)
-+		goto cleanup;
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+
-+has_space:
-+	nearex = path[depth].p_ext;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+		goto cleanup;
-+
-+	if (!nearex) {
-+		/* there is no extent in this leaf, create first one */
-+		ext_debug(tree, "first extent in the leaf: %d:%d:%d\n",
-+			  newext->ee_block, newext->ee_start,
-+			  newext->ee_len);
-+		path[depth].p_ext = EXT_FIRST_EXTENT(eh);
-+	} else if (newext->ee_block > nearex->ee_block) {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		if (nearex != EXT_LAST_EXTENT(eh)) {
-+			len = EXT_MAX_EXTENT(eh) - nearex;
-+			len = (len - 1) * sizeof(struct ext3_extent);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  newext->ee_block, newext->ee_start,
-+				  newext->ee_len,
-+				  nearex, len, nearex + 1, nearex + 2);
-+			memmove(nearex + 2, nearex + 1, len);
-+		}
-+		path[depth].p_ext = nearex + 1;
-+	} else {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  newext->ee_block, newext->ee_start, newext->ee_len,
-+			  nearex, len, nearex + 1, nearex + 2);
-+		memmove(nearex + 1, nearex, len);
-+		path[depth].p_ext = nearex;
-+	}
-+
-+	eh->eh_entries++;
-+	nearex = path[depth].p_ext;
-+	nearex->ee_block = newext->ee_block;
-+	nearex->ee_start = newext->ee_start;
-+	nearex->ee_len = newext->ee_len;
-+	/* FIXME: support for large fs */
-+	nearex->ee_start_hi = 0;
-+
-+merge:
-+	/* try to merge extents to the right */
-+	while (nearex < EXT_LAST_EXTENT(eh)) {
-+		if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1))
-+			break;
-+		/* merge with next extent! */
-+		nearex->ee_len += nearex[1].ee_len;
-+		if (nearex + 1 < EXT_LAST_EXTENT(eh)) {
-+			len = (EXT_LAST_EXTENT(eh) - nearex - 1) *
-+				sizeof(struct ext3_extent);
-+			memmove(nearex + 1, nearex + 2, len);
-+		}
-+		eh->eh_entries--;
-+		EXT_ASSERT(eh->eh_entries > 0);
-+	}
-+
-+	/* try to merge extents to the left */
-+
-+	/* time to correct all indexes above */
-+	err = ext3_ext_correct_indexes(handle, tree, path);
-+	if (err)
-+		goto cleanup;
-+
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+
-+cleanup:
-+	if (npath) {
-+		ext3_ext_drop_refs(npath);
-+		kfree(npath);
-+	}
-+	ext3_ext_tree_changed(tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return err;
-+}
-+
-+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block,
-+			unsigned long num, ext_prepare_callback func)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_ext_cache cbex;
-+	struct ext3_extent *ex;
-+	unsigned long next, start = 0, end = 0;
-+	unsigned long last = block + num;
-+	int depth, exists, err = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(func);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	while (block < last && block != EXT_MAX_BLOCK) {
-+		num = last - block;
-+		/* find extent for this block */
-+		path = ext3_ext_find_extent(tree, block, path);
-+		if (IS_ERR(path)) {
-+			err = PTR_ERR(path);
-+			path = NULL;
-+			break;
-+		}
-+
-+		depth = EXT_DEPTH(tree);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		ex = path[depth].p_ext;
-+		next = ext3_ext_next_allocated_block(path);
-+
-+		exists = 0;
-+		if (!ex) {
-+			/* there is no extent yet, so try to allocate
-+			 * all requested space */
-+			start = block;
-+			end = block + num;
-+		} else if (ex->ee_block > block) {
-+			/* need to allocate space before found extent */
-+			start = block;
-+			end = ex->ee_block;
-+			if (block + num < end)
-+				end = block + num;
-+		} else if (block >= ex->ee_block + ex->ee_len) {
-+			/* need to allocate space after found extent */
-+			start = block;
-+			end = block + num;
-+			if (end >= next)
-+				end = next;
-+		} else if (block >= ex->ee_block) {
-+			/* 
-+			 * some part of requested space is covered
-+			 * by found extent
-+			 */
-+			start = block;
-+			end = ex->ee_block + ex->ee_len;
-+			if (block + num < end)
-+				end = block + num;
-+			exists = 1;
-+		} else {
-+			BUG();
-+		}
-+		EXT_ASSERT(end > start);
-+
-+		if (!exists) {
-+			cbex.ec_block = start;
-+			cbex.ec_len = end - start;
-+			cbex.ec_start = 0;
-+			cbex.ec_type = EXT3_EXT_CACHE_GAP;
-+		} else {
-+			cbex.ec_block = ex->ee_block;
-+			cbex.ec_len = ex->ee_len;
-+			cbex.ec_start = ex->ee_start;
-+			cbex.ec_type = EXT3_EXT_CACHE_EXTENT;
-+		}
-+
-+		EXT_ASSERT(cbex.ec_len > 0);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		err = func(tree, path, &cbex);
-+		ext3_ext_drop_refs(path);
-+
-+		if (err < 0)
-+			break;
-+		if (err == EXT_REPEAT)
-+			continue;
-+		else if (err == EXT_BREAK) {
-+			err = 0;
-+			break;
-+		}
-+
-+		if (EXT_DEPTH(tree) != depth) {
-+			/* depth was changed. we have to realloc path */
-+			kfree(path);
-+			path = NULL;
-+		}
-+
-+		block = cbex.ec_block + cbex.ec_len;
-+	}
-+
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+
-+	return err;
-+}
-+
-+static inline void
-+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block,
-+		      __u32 len, __u32 start, int type)
-+{
-+	EXT_ASSERT(len > 0);
-+	if (tree->cex) {
-+		tree->cex->ec_type = type;
-+		tree->cex->ec_block = block;
-+		tree->cex->ec_len = len;
-+		tree->cex->ec_start = start;
-+	}
-+}
-+
-+/*
-+ * this routine calculate boundaries of the gap requested block fits into
-+ * and cache this gap
-+ */
-+static inline void
-+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  unsigned long block)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	unsigned long lblock, len;
-+	struct ext3_extent *ex;
-+
-+	if (!tree->cex)
-+		return;
-+
-+	ex = path[depth].p_ext;
-+	if (ex == NULL) {
-+		/* there is no extent yet, so gap is [0;-] */
-+		lblock = 0;
-+		len = EXT_MAX_BLOCK;
-+		ext_debug(tree, "cache gap(whole file):");
-+	} else if (block < ex->ee_block) {
-+		lblock = block;
-+		len = ex->ee_block - block;
-+		ext_debug(tree, "cache gap(before): %lu [%lu:%lu]",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len);
-+	} else if (block >= ex->ee_block + ex->ee_len) {
-+		lblock = ex->ee_block + ex->ee_len;
-+		len = ext3_ext_next_allocated_block(path);
-+		ext_debug(tree, "cache gap(after): [%lu:%lu] %lu",
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) block);
-+		EXT_ASSERT(len > lblock);
-+		len = len - lblock;
-+	} else {
-+		lblock = len = 0;
-+		BUG();
-+	}
-+
-+	ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len);
-+	ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP);
-+}
-+
-+static inline int
-+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block,
-+		  struct ext3_extent *ex)
-+{
-+	struct ext3_ext_cache *cex = tree->cex;
-+
-+	/* is there cache storage at all? */
-+	if (!cex)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	/* has cache valid data? */
-+	if (cex->ec_type == EXT3_EXT_CACHE_NO)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP ||
-+		   cex->ec_type == EXT3_EXT_CACHE_EXTENT);
-+	if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
-+		ex->ee_block = cex->ec_block;
-+		ex->ee_start = cex->ec_start;
-+		ex->ee_start_hi = 0;
-+		ex->ee_len = cex->ec_len;
-+		ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) ex->ee_start);
-+		return cex->ec_type;
-+	}
-+
-+	/* not in cache */
-+	return EXT3_EXT_CACHE_NO;
-+}
-+
-+/*
-+ * routine removes index from the index block
-+ * it's used in truncate case only. thus all requests are for
-+ * last index in the block only
-+ */
-+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree,
-+		    struct ext3_ext_path *path)
-+{
-+	struct buffer_head *bh;
-+	int err;
-+	
-+	/* free index block */
-+	path--;
-+	EXT_ASSERT(path->p_hdr->eh_entries);
-+	if ((err = ext3_ext_get_access(handle, tree, path)))
-+		return err;
-+	path->p_hdr->eh_entries--;
-+	if ((err = ext3_ext_dirty(handle, tree, path)))
-+		return err;
-+	ext_debug(tree, "index is empty, remove it, free block %d\n",
-+		  path->p_idx->ei_leaf);
-+	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
-+	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	return err;
-+}
-+
-+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree,
-+				     struct ext3_ext_path *path)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	int needed;
-+
-+	if (path) {
-+		/* probably there is space in leaf? */
-+		if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max)
-+			return 1;
-+	}
-+	
-+	/*
-+	 * the worste case we're expecting is creation of the
-+	 * new root (growing in depth) with index splitting
-+	 * for splitting we have to consider depth + 1 because
-+	 * previous growing could increase it
-+	 */
-+	depth = depth + 1;
-+
-+	/* 
-+	 * growing in depth:
-+	 * block allocation + new root + old root
-+	 */
-+	needed = EXT3_ALLOC_NEEDED + 2;
-+
-+	/* index split. we may need:
-+	 *   allocate intermediate indexes and new leaf
-+	 *   change two blocks at each level, but root
-+	 *   modify root block (inode)
-+	 */
-+	needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1;
-+
-+	return needed;
-+}
-+
-+static int
-+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree,
-+		      struct ext3_ext_path *path, unsigned long start,
-+		      unsigned long end)
-+{
-+	struct ext3_extent *ex, tex;
-+	struct ext3_ext_path *npath;
-+	int depth, creds, err;
-+
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1);
-+	EXT_ASSERT(ex->ee_block < start);
-+
-+	/* calculate tail extent */
-+	tex.ee_block = end + 1;
-+	EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len);
-+	tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block;
-+
-+	creds = ext3_ext_calc_credits_for_insert(tree, path);
-+	handle = ext3_ext_journal_restart(handle, creds);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	
-+	/* calculate head extent. use primary extent */
-+	err = ext3_ext_get_access(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+	ex->ee_len = start - ex->ee_block;
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+
-+	/* FIXME: some callback to free underlying resource
-+	 * and correct ee_start? */
-+	ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n",
-+		  ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len);
-+
-+	npath = ext3_ext_find_extent(tree, ex->ee_block, NULL);
-+	if (IS_ERR(npath))
-+		return PTR_ERR(npath);
-+	depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block);
-+	EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len);
-+
-+	err = ext3_ext_insert_extent(handle, tree, npath, &tex);
-+	ext3_ext_drop_refs(npath);
-+	kfree(npath);
-+
-+	return err;
-+}
-+
-+static int
-+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree,
-+		 struct ext3_ext_path *path, unsigned long start,
-+		 unsigned long end)
-+{
-+	struct ext3_extent *ex, *fu = NULL, *lu, *le;
-+	int err = 0, correct_index = 0;
-+	int depth = EXT_DEPTH(tree), credits;
-+	struct ext3_extent_header *eh;
-+	unsigned a, b, block, num;
-+
-+	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
-+	if (!path[depth].p_hdr)
-+		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+	eh = path[depth].p_hdr;
-+	EXT_ASSERT(eh);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* find where to start removing */
-+	le = ex = EXT_LAST_EXTENT(eh);
-+	while (ex != EXT_FIRST_EXTENT(eh)) {
-+		if (ex->ee_block <= end)
-+			break;
-+		ex--;
-+	}
-+
-+	if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) {
-+		/* removal of internal part of the extent requested
-+		 * tail and head must be placed in different extent
-+		 * so, we have to insert one more extent */
-+		path[depth].p_ext = ex;
-+		return ext3_ext_split_for_rm(handle, tree, path, start, end);
-+	}
-+	
-+	lu = ex;
-+	while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) {
-+		ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len);
-+		path[depth].p_ext = ex;
-+	
-+		a = ex->ee_block > start ? ex->ee_block : start;
-+		b = ex->ee_block + ex->ee_len - 1 < end ?
-+			ex->ee_block + ex->ee_len - 1 : end;
-+		
-+		ext_debug(tree, "  border %u:%u\n", a, b);
-+
-+		if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) {
-+			block = 0;
-+			num = 0;
-+			BUG();
-+		} else if (a != ex->ee_block) {
-+			/* remove tail of the extent */
-+			block = ex->ee_block;
-+			num = a - block;
-+		} else if (b != ex->ee_block + ex->ee_len - 1) {
-+			/* remove head of the extent */
-+			block = a;
-+			num = b - a;
-+		} else {
-+			/* remove whole extent: excelent! */
-+			block = ex->ee_block; 
-+			num = 0;
-+			EXT_ASSERT(a == ex->ee_block &&
-+				   b == ex->ee_block + ex->ee_len - 1);
-+		}
-+
-+		if (ex == EXT_FIRST_EXTENT(eh))
-+			correct_index = 1;
-+
-+		credits = 1;
-+		if (correct_index)
-+			credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1;
-+		if (tree->ops->remove_extent_credits)
-+			credits+=tree->ops->remove_extent_credits(tree,ex,a,b);
-+		
-+		handle = ext3_ext_journal_restart(handle, credits);
-+		if (IS_ERR(handle)) {
-+			err = PTR_ERR(handle);
-+			goto out;
-+		}
-+
-+		err = ext3_ext_get_access(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		if (tree->ops->remove_extent)
-+			err = tree->ops->remove_extent(tree, ex, a, b);
-+		if (err)
-+			goto out;
-+
-+		if (num == 0) {
-+			/* this extent is removed entirely mark slot unused */
-+			ex->ee_start = ex->ee_start_hi = 0;
-+			eh->eh_entries--;
-+			fu = ex;
-+		}
-+
-+		ex->ee_block = block;
-+		ex->ee_len = num;
-+
-+		err = ext3_ext_dirty(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		ext_debug(tree, "new extent: %u:%u:%u\n",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+		ex--;
-+	}
-+
-+	if (fu) {
-+		/* reuse unused slots */
-+		while (lu < le) {
-+			if (lu->ee_start) {
-+				*fu = *lu;
-+				lu->ee_start = lu->ee_start_hi = 0;
-+				fu++;
-+			}
-+			lu++;
-+		}
-+	}
-+
-+	if (correct_index && eh->eh_entries)
-+		err = ext3_ext_correct_indexes(handle, tree, path);
-+
-+	/* if this leaf is free, then we should
-+	 * remove it from index block above */
-+	if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
-+		err = ext3_ext_rm_idx(handle, tree, path + depth);
-+
-+out:
-+	return err;
-+}
-+
-+
-+static struct ext3_extent_idx *
-+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block)
-+{
-+	struct ext3_extent_idx *ix;
-+	
-+	ix = EXT_LAST_INDEX(hdr);
-+	while (ix != EXT_FIRST_INDEX(hdr)) {
-+		if (ix->ei_block <= block)
-+			break;
-+		ix--;
-+	}
-+	return ix;
-+}
-+
-+/*
-+ * returns 1 if current index have to be freed (even partial)
-+ */
-+static int inline
-+ext3_ext_more_to_rm(struct ext3_ext_path *path)
-+{
-+	EXT_ASSERT(path->p_idx);
-+
-+	if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
-+		return 0;
-+
-+	/*
-+	 * if truncate on deeper level happened it it wasn't partial
-+	 * so we have to consider current index for truncation
-+	 */
-+	if (path->p_hdr->eh_entries == path->p_block)
-+		return 0;
-+	return 1;
-+}
-+
-+int ext3_ext_remove_space(struct ext3_extents_tree *tree,
-+			  unsigned long start, unsigned long end)
-+{
-+	struct inode *inode = tree->inode;
-+	struct super_block *sb = inode->i_sb;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_ext_path *path;
-+	handle_t *handle;
-+	int i = 0, err = 0;
-+
-+	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
-+
-+	/* probably first extent we're gonna free will be last in block */
-+	handle = ext3_journal_start(inode, depth + 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	ext3_ext_invalidate_cache(tree);
-+
-+	/*
-+	 * we start scanning from right side freeing all the blocks
-+	 * after i_size and walking into the deep
-+	 */
-+	path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL);
-+	if (IS_ERR(path)) {
-+		ext3_error(sb, __FUNCTION__, "Can't allocate path array");
-+		ext3_journal_stop(handle);
-+		return -ENOMEM;
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[i].p_hdr = EXT_ROOT_HDR(tree);
-+	
-+	while (i >= 0 && err == 0) {
-+		if (i == depth) {
-+			/* this is leaf block */
-+			err = ext3_ext_rm_leaf(handle, tree, path, start, end);
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			continue;
-+		}
-+		
-+		/* this is index block */
-+		if (!path[i].p_hdr) {
-+			ext_debug(tree, "initialize header\n");
-+			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
-+		}
-+
-+		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
-+		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
-+		
-+		if (!path[i].p_idx) {
-+			/* this level hasn't touched yet */
-+			path[i].p_idx =
-+				ext3_ext_last_covered(path[i].p_hdr, end);
-+			path[i].p_block = path[i].p_hdr->eh_entries + 1;
-+			ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n",
-+				  path[i].p_hdr, path[i].p_hdr->eh_entries);
-+		} else {
-+			/* we've already was here, see at next index */
-+			path[i].p_idx--;
-+		}
-+
-+		ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n",
-+			  i, EXT_FIRST_INDEX(path[i].p_hdr),
-+			  path[i].p_idx);
-+		if (ext3_ext_more_to_rm(path + i)) {
-+			/* go to the next level */
-+			ext_debug(tree, "move to level %d (block %d)\n",
-+				  i + 1, path[i].p_idx->ei_leaf);
-+			memset(path + i + 1, 0, sizeof(*path));
-+			path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf);
-+			if (!path[i+1].p_bh) {
-+				/* should we reset i_size? */
-+				err = -EIO;
-+				break;
-+			}
-+			/* put actual number of indexes to know is this
-+			 * number got changed at the next iteration */
-+			path[i].p_block = path[i].p_hdr->eh_entries;
-+			i++;
-+		} else {
-+			/* we finish processing this index, go up */
-+			if (path[i].p_hdr->eh_entries == 0 && i > 0) {
-+				/* index is empty, remove it
-+				 * handle must be already prepared by the
-+				 * truncatei_leaf() */
-+				err = ext3_ext_rm_idx(handle, tree, path + i);
-+			}
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			ext_debug(tree, "return to level %d\n", i);
-+		}
-+	}
-+
-+	/* TODO: flexible tree reduction should be here */
-+	if (path->p_hdr->eh_entries == 0) {
-+		/*
-+		 * truncate to zero freed all the tree
-+		 * so, we need to correct eh_depth
-+		 */
-+		err = ext3_ext_get_access(handle, tree, path);
-+		if (err == 0) {
-+			EXT_ROOT_HDR(tree)->eh_depth = 0;
-+			EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree);
-+			err = ext3_ext_dirty(handle, tree, path);
-+		}
-+	}
-+	ext3_ext_tree_changed(tree);
-+
-+	kfree(path);
-+	ext3_journal_stop(handle);
-+
-+	return err;
-+}
-+
-+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks)
-+{
-+	int lcap, icap, rcap, leafs, idxs, num;
-+
-+	rcap = ext3_ext_space_root(tree);
-+	if (blocks <= rcap) {
-+		/* all extents fit to the root */
-+		return 0;
-+	}
-+
-+	rcap = ext3_ext_space_root_idx(tree);
-+	lcap = ext3_ext_space_block(tree);
-+	icap = ext3_ext_space_block_idx(tree);
-+
-+	num = leafs = (blocks + lcap - 1) / lcap;
-+	if (leafs <= rcap) {
-+		/* all pointers to leafs fit to the root */
-+		return leafs;
-+	}
-+
-+	/* ok. we need separate index block(s) to link all leaf blocks */
-+	idxs = (leafs + icap - 1) / icap;
-+	do {
-+		num += idxs;
-+		idxs = (idxs + icap - 1) / icap;
-+	} while (idxs > rcap);
-+
-+	return num;
-+}
-+
-+/*
-+ * called at mount time
-+ */
-+void ext3_ext_init(struct super_block *sb)
-+{
-+	/*
-+	 * possible initialization would be here
-+	 */
-+
-+	if (test_opt(sb, EXTENTS)) {
-+		printk("EXT3-fs: file extents enabled");
-+#ifdef AGRESSIVE_TEST
-+		printk(", agressive tests");
-+#endif
-+#ifdef CHECK_BINSEARCH
-+		printk(", check binsearch");
-+#endif
-+		printk("\n");
-+	}
-+}
-+
-+/*
-+ * called at umount time
-+ */
-+void ext3_ext_release(struct super_block *sb)
-+{
-+}
-+
-+/************************************************************************
-+ * VFS related routines
-+ ************************************************************************/
-+
-+static int ext3_get_inode_write_access(handle_t *handle, void *buffer)
-+{
-+	/* we use in-core data, not bh */
-+	return 0;
-+}
-+
-+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer)
-+{
-+	struct inode *inode = buffer;
-+	return ext3_mark_inode_dirty(handle, inode);
-+}
-+
-+static int ext3_ext_mergable(struct ext3_extent *ex1,
-+			     struct ext3_extent *ex2)
-+{
-+	/* FIXME: support for large fs */
-+	if (ex1->ee_start + ex1->ee_len == ex2->ee_start)
-+		return 1;
-+	return 0;
-+}
-+
-+static int
-+ext3_remove_blocks_credits(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex,
-+			   unsigned long from, unsigned long to)
-+{
-+	int needed;
-+	
-+	/* at present, extent can't cross block group */;
-+	needed = 4; /* bitmap + group desc + sb + inode */
-+
-+#ifdef CONFIG_QUOTA
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+	return needed;
-+}
-+
-+static int
-+ext3_remove_blocks(struct ext3_extents_tree *tree,
-+		   struct ext3_extent *ex,
-+		   unsigned long from, unsigned long to)
-+{
-+	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
-+	handle_t *handle = ext3_journal_start(tree->inode, needed);
-+	struct buffer_head *bh;
-+	int i;
-+
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
-+		/* tail removal */
-+		unsigned long num, start;
-+		num = ex->ee_block + ex->ee_len - from;
-+		start = ex->ee_start + ex->ee_len - num;
-+		ext_debug(tree, "free last %lu blocks starting %lu\n",
-+			  num, start);
-+		for (i = 0; i < num; i++) {
-+			bh = sb_find_get_block(tree->inode->i_sb, start + i);
-+			ext3_forget(handle, 0, tree->inode, bh, start + i);
-+		}
-+		ext3_free_blocks(handle, tree->inode, start, num);
-+	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
-+		printk("strange request: removal %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	} else {
-+		printk("strange request: removal(2) %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	}
-+	ext3_journal_stop(handle);
-+	return 0;
-+}
-+
-+static int ext3_ext_find_goal(struct inode *inode,
-+			      struct ext3_ext_path *path, unsigned long block)
-+{
-+	struct ext3_inode_info *ei = EXT3_I(inode);
-+	unsigned long bg_start;
-+	unsigned long colour;
-+	int depth;
-+	
-+	if (path) {
-+		struct ext3_extent *ex;
-+		depth = path->p_depth;
-+		
-+		/* try to predict block placement */
-+		if ((ex = path[depth].p_ext))
-+			return ex->ee_start + (block - ex->ee_block);
-+
-+		/* it looks index is empty
-+		 * try to find starting from index itself */
-+		if (path[depth].p_bh)
-+			return path[depth].p_bh->b_blocknr;
-+	}
-+
-+	/* OK. use inode's group */
-+	bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+		le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+	colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+	return bg_start + colour + block;
-+}
-+
-+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path,
-+			     struct ext3_extent *ex, int *err)
-+{
-+	struct inode *inode = tree->inode;
-+	int newblock, goal;
-+	
-+	EXT_ASSERT(path);
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(ex->ee_start);
-+	EXT_ASSERT(ex->ee_len);
-+	
-+	/* reuse block from the extent to order data/metadata */
-+	newblock = ex->ee_start++;
-+	ex->ee_len--;
-+	if (ex->ee_len == 0) {
-+		ex->ee_len = 1;
-+		/* allocate new block for the extent */
-+		goal = ext3_ext_find_goal(inode, path, ex->ee_block);
-+		ex->ee_start = ext3_new_block(handle, inode, goal, err);
-+		ex->ee_start_hi = 0;
-+		if (ex->ee_start == 0) {
-+			/* error occured: restore old extent */
-+			ex->ee_start = newblock;
-+			return 0;
-+		}
-+	}
-+	return newblock;
-+}
-+
-+static struct ext3_extents_helpers ext3_blockmap_helpers = {
-+	.get_write_access	= ext3_get_inode_write_access,
-+	.mark_buffer_dirty	= ext3_mark_buffer_dirty,
-+	.mergable		= ext3_ext_mergable,
-+	.new_block		= ext3_new_block_cb,
-+	.remove_extent		= ext3_remove_blocks,
-+	.remove_extent_credits	= ext3_remove_blocks_credits,
-+};
-+
-+void ext3_init_tree_desc(struct ext3_extents_tree *tree,
-+			 struct inode *inode)
-+{
-+	tree->inode = inode;
-+	tree->root = (void *) EXT3_I(inode)->i_data;
-+	tree->buffer = (void *) inode;
-+	tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
-+	tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent;
-+	tree->ops = &ext3_blockmap_helpers;
-+}
-+
-+int ext3_ext_get_block(handle_t *handle, struct inode *inode,
-+		       long iblock, struct buffer_head *bh_result,
-+		       int create, int extend_disksize)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_extent newex;
-+	struct ext3_extent *ex;
-+	int goal, newblock, err = 0, depth;
-+	struct ext3_extents_tree tree;
-+
-+	clear_buffer_new(bh_result);
-+	ext3_init_tree_desc(&tree, inode);
-+	ext_debug(&tree, "block %d requested for inode %u\n",
-+		  (int) iblock, (unsigned) inode->i_ino);
-+	down(&EXT3_I(inode)->truncate_sem);
-+
-+	/* check in cache */
-+	if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) {
-+		if (goal == EXT3_EXT_CACHE_GAP) {
-+			if (!create) {
-+				/* block isn't allocated yet and
-+				 * user don't want to allocate it */
-+				goto out2;
-+			}
-+			/* we should allocate requested block */
-+		} else if (goal == EXT3_EXT_CACHE_EXTENT) {
-+			/* block is already allocated */
-+			newblock = iblock - newex.ee_block + newex.ee_start;
-+			goto out;
-+		} else {
-+			EXT_ASSERT(0);
-+		}
-+	}
-+
-+	/* find extent for this block */
-+	path = ext3_ext_find_extent(&tree, iblock, NULL);
-+	if (IS_ERR(path)) {
-+		err = PTR_ERR(path);
-+		path = NULL;
-+		goto out2;
-+	}
-+
-+	depth = EXT_DEPTH(&tree);
-+
-+	/*
-+	 * consistent leaf must not be empty
-+	 * this situations is possible, though, _during_ tree modification
-+	 * this is why assert can't be put in ext3_ext_find_extent()
-+	 */
-+	EXT_ASSERT(path[depth].p_ext != NULL || depth == 0);
-+
-+	if ((ex = path[depth].p_ext)) {
-+		/* if found exent covers block, simple return it */
-+		if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) {
-+			newblock = iblock - ex->ee_block + ex->ee_start;
-+			ext_debug(&tree, "%d fit into %d:%d -> %d\n",
-+				  (int) iblock, ex->ee_block, ex->ee_len,
-+				  newblock);
-+			ext3_ext_put_in_cache(&tree, ex->ee_block,
-+					      ex->ee_len, ex->ee_start,
-+					      EXT3_EXT_CACHE_EXTENT);
-+			goto out;
-+		}
-+	}
-+
-+	/*
-+	 * requested block isn't allocated yet
-+	 * we couldn't try to create block if create flag is zero 
-+	 */
-+	if (!create) {
-+		/* put just found gap into cache to speedup subsequest reqs */
-+		ext3_ext_put_gap_in_cache(&tree, path, iblock);
-+		goto out2;
-+	}
-+
-+	/* allocate new block */
-+	goal = ext3_ext_find_goal(inode, path, iblock);
-+	newblock = ext3_new_block(handle, inode, goal, &err);
-+	if (!newblock)
-+		goto out2;
-+	ext_debug(&tree, "allocate new block: goal %d, found %d\n",
-+		  goal, newblock);
-+
-+	/* try to insert new extent into found leaf and return */
-+	newex.ee_block = iblock;
-+	newex.ee_start = newblock;
-+	newex.ee_start_hi = 0;
-+	newex.ee_len = 1;
-+	err = ext3_ext_insert_extent(handle, &tree, path, &newex);
-+	if (err)
-+		goto out2;
-+	
-+	if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize)
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+
-+	/* previous routine could use block we allocated */
-+	newblock = newex.ee_start;
-+	set_buffer_new(bh_result);
-+
-+	ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len,
-+			      newex.ee_start, EXT3_EXT_CACHE_EXTENT);
-+out:
-+	ext3_ext_show_leaf(&tree, path);
-+	map_bh(bh_result, inode->i_sb, newblock);
-+out2:
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	up(&EXT3_I(inode)->truncate_sem);
-+
-+	return err;	
-+}
-+
-+void ext3_ext_truncate(struct inode * inode, struct page *page)
-+{
-+	struct address_space *mapping = inode->i_mapping;
-+	struct super_block *sb = inode->i_sb;
-+	struct ext3_extents_tree tree;
-+	unsigned long last_block;
-+	handle_t *handle;
-+	int err = 0;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+
-+	/*
-+	 * probably first extent we're gonna free will be last in block
-+	 */
-+	err = ext3_writepage_trans_blocks(inode) + 3;
-+	handle = ext3_journal_start(inode, err);
-+	if (IS_ERR(handle)) {
-+		if (page) {
-+			clear_highpage(page);
-+			flush_dcache_page(page);
-+			unlock_page(page);
-+			page_cache_release(page);
-+		}
-+		return;
-+	}
-+
-+	if (page)
-+		ext3_block_truncate_page(handle, page, mapping, inode->i_size);
-+
-+	down(&EXT3_I(inode)->truncate_sem);
-+	ext3_ext_invalidate_cache(&tree);
-+
-+	/* 
-+	 * TODO: optimization is possible here
-+	 * probably we need not scaning at all,
-+	 * because page truncation is enough
-+	 */
-+	if (ext3_orphan_add(handle, inode))
-+		goto out_stop;
-+
-+	/* we have to know where to truncate from in crash case */
-+	EXT3_I(inode)->i_disksize = inode->i_size;
-+	ext3_mark_inode_dirty(handle, inode);
-+
-+	last_block = (inode->i_size + sb->s_blocksize - 1) >>
-+			EXT3_BLOCK_SIZE_BITS(sb);
-+	err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK);
-+	
-+	/* In a multi-transaction truncate, we only make the final
-+	 * transaction synchronous */
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+
-+out_stop:
-+	/*
-+	 * If this was a simple ftruncate(), and the file will remain alive
-+	 * then we need to clear up the orphan record which we created above.
-+	 * However, if this was a real unlink then we were called by
-+	 * ext3_delete_inode(), and we allow that function to clean up the
-+	 * orphan info for us.
-+	 */
-+	if (inode->i_nlink)
-+		ext3_orphan_del(handle, inode);
-+
-+	up(&EXT3_I(inode)->truncate_sem);
-+	ext3_journal_stop(handle);
-+}
-+
-+/*
-+ * this routine calculate max number of blocks we could modify
-+ * in order to allocate new block for an inode
-+ */
-+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num)
-+{
-+	struct ext3_extents_tree tree;
-+	int needed;
-+	
-+	ext3_init_tree_desc(&tree, inode);
-+	
-+	needed = ext3_ext_calc_credits_for_insert(&tree, NULL);
-+
-+	/* caller want to allocate num blocks */
-+	needed *= num;
-+	
-+#ifdef CONFIG_QUOTA
-+	/* 
-+	 * FIXME: real calculation should be here
-+	 * it depends on blockmap format of qouta file
-+	 */
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return needed;
-+}
-+
-+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	ext3_extent_tree_init(handle, &tree);
-+}
-+
-+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	return ext3_ext_calc_metadata_amount(&tree, blocks);
-+}
-+	
-+static int
-+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree,
-+			 struct ext3_ext_path *path,
-+			 struct ext3_ext_cache *newex)
-+{
-+	struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private;
-+
-+	if (newex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	if (buf->err < 0)
-+		return EXT_BREAK;
-+	if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen)
-+		return EXT_BREAK;
-+
-+	if (!copy_to_user(buf->cur, newex, sizeof(*newex))) {
-+		buf->err++;
-+		buf->cur += sizeof(*newex);
-+	} else {
-+		buf->err = -EFAULT;
-+		return EXT_BREAK;
-+	}
-+	return EXT_CONTINUE;
-+}
-+
-+static int
-+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_ext_cache *ex)
-+{
-+	struct ext3_extent_tree_stats *buf =
-+		(struct ext3_extent_tree_stats *) tree->private;
-+	int depth;
-+
-+	if (ex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	depth = EXT_DEPTH(tree);
-+	buf->extents_num++;
-+	if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr))
-+		buf->leaf_num++;
-+	return EXT_CONTINUE;
-+}
-+
-+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-+		   unsigned long arg)
-+{
-+	int err = 0;
-+
-+	if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL))
-+		return -EINVAL;
-+
-+	if (cmd == EXT3_IOC_GET_EXTENTS) {
-+		struct ext3_extent_buf buf;
-+		struct ext3_extents_tree tree;
-+
-+		if (copy_from_user(&buf, (void *) arg, sizeof(buf)))
-+			return -EFAULT;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		buf.cur = buf.buffer;
-+		buf.err = 0;
-+		tree.private = &buf;
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK,
-+					  ext3_ext_store_extent_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (err == 0)
-+			err = buf.err;
-+	} else if (cmd == EXT3_IOC_GET_TREE_STATS) {
-+		struct ext3_extent_tree_stats buf;
-+		struct ext3_extents_tree tree;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		buf.depth = EXT_DEPTH(&tree);
-+		buf.extents_num = 0;
-+		buf.leaf_num = 0;
-+		tree.private = &buf;
-+		err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK,
-+					  ext3_ext_collect_stats_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (!err)
-+			err = copy_to_user((void *) arg, &buf, sizeof(buf));
-+	} else if (cmd == EXT3_IOC_GET_TREE_DEPTH) {
-+		struct ext3_extents_tree tree;
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = EXT_DEPTH(&tree);
-+		up(&EXT3_I(inode)->truncate_sem);
-+	}
-+
-+	return err;
-+}
-+
-+EXPORT_SYMBOL(ext3_init_tree_desc);
-+EXPORT_SYMBOL(ext3_mark_inode_dirty);
-+EXPORT_SYMBOL(ext3_ext_invalidate_cache);
-+EXPORT_SYMBOL(ext3_ext_insert_extent);
-+EXPORT_SYMBOL(ext3_ext_walk_space);
-+EXPORT_SYMBOL(ext3_ext_find_goal);
-+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert);
-Index: linux-2.6.16.27-0.9/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/ialloc.c
-+++ linux-2.6.16.27-0.9/fs/ext3/ialloc.c
-@@ -601,7 +601,7 @@ got:
- 	ei->i_dir_start_lookup = 0;
- 	ei->i_disksize = 0;
- 
--	ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL;
-+	ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL);
- 	if (S_ISLNK(mode))
- 		ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL);
- 	/* dirsync only applies to directories */
-@@ -645,6 +645,18 @@ got:
- 	if (err)
- 		goto fail_free_drop;
- 
-+	if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
-+		EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
-+		ext3_extents_initialize_blockmap(handle, inode);
-+		if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
-+			err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-+			if (err) goto fail;
-+			EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS);
-+			BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata");
-+			err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-+		}
-+	}
-+
- 	err = ext3_mark_inode_dirty(handle, inode);
- 	if (err) {
- 		ext3_std_error(sb, err);
-Index: linux-2.6.16.27-0.9/fs/ext3/inode.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c
-+++ linux-2.6.16.27-0.9/fs/ext3/inode.c
-@@ -40,7 +40,7 @@
- #include "iopen.h"
- #include "acl.h"
- 
--static int ext3_writepage_trans_blocks(struct inode *inode);
-+int ext3_writepage_trans_blocks(struct inode *inode);
- 
- /*
-  * Test whether an inode is a fast symlink.
-@@ -788,6 +788,17 @@ out:
- 	return err;
- }
- 
-+static inline int
-+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block,
-+		    struct buffer_head *bh, int create, int extend_disksize)
-+{
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_get_block(handle, inode, block, bh, create,
-+					  extend_disksize);
-+	return ext3_get_block_handle(handle, inode, block, bh, create,
-+				     extend_disksize);
-+}
-+
- static int ext3_get_block(struct inode *inode, sector_t iblock,
- 			struct buffer_head *bh_result, int create)
- {
-@@ -798,8 +809,8 @@ static int ext3_get_block(struct inode *
- 		handle = ext3_journal_current_handle();
- 		J_ASSERT(handle != 0);
- 	}
--	ret = ext3_get_block_handle(handle, inode, iblock,
--				bh_result, create, 1);
-+	ret = ext3_get_block_wrap(handle, inode, iblock,
-+				  bh_result, create, 1);
- 	return ret;
- }
- 
-@@ -843,7 +854,7 @@ ext3_direct_io_get_blocks(struct inode *
- 
- get_block:
- 	if (ret == 0)
--		ret = ext3_get_block_handle(handle, inode, iblock,
-+		ret = ext3_get_block_wrap(handle, inode, iblock,
- 					bh_result, create, 0);
- 	bh_result->b_size = (1 << inode->i_blkbits);
- 	return ret;
-@@ -863,7 +874,7 @@ struct buffer_head *ext3_getblk(handle_t
- 	dummy.b_state = 0;
- 	dummy.b_blocknr = -1000;
- 	buffer_trace_init(&dummy.b_history);
--	*errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1);
-+	*errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1);
- 	if (!*errp && buffer_mapped(&dummy)) {
- 		struct buffer_head *bh;
- 		bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
-@@ -1606,7 +1617,7 @@ void ext3_set_aops(struct inode *inode)
-  * This required during truncate. We need to physically zero the tail end
-  * of that block so it doesn't yield old data if the file is later grown.
-  */
--static int ext3_block_truncate_page(handle_t *handle, struct page *page,
-+int ext3_block_truncate_page(handle_t *handle, struct page *page,
- 		struct address_space *mapping, loff_t from)
- {
- 	unsigned long index = from >> PAGE_CACHE_SHIFT;
-@@ -2116,6 +2127,9 @@ void ext3_truncate(struct inode * inode)
- 			return;
- 	}
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_truncate(inode, page);
-+
- 	handle = start_transaction(inode);
- 	if (IS_ERR(handle)) {
- 		if (page) {
-@@ -2863,12 +2877,15 @@ err_out:
-  * block and work out the exact number of indirects which are touched.  Pah.
-  */
- 
--static int ext3_writepage_trans_blocks(struct inode *inode)
-+int ext3_writepage_trans_blocks(struct inode *inode)
- {
- 	int bpp = ext3_journal_blocks_per_page(inode);
- 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
- 	int ret;
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_writepage_trans_blocks(inode, bpp);
-+
- 	if (ext3_should_journal_data(inode))
- 		ret = 3 * (bpp + indirects) + 2;
- 	else
-Index: linux-2.6.16.27-0.9/fs/ext3/Makefile
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/Makefile
-+++ linux-2.6.16.27-0.9/fs/ext3/Makefile
-@@ -5,7 +5,8 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
--	   ioctl.o namei.o super.o symlink.o hash.o resize.o
-+	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
-+	   extents.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-2.6.16.27-0.9/fs/ext3/super.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/super.c
-+++ linux-2.6.16.27-0.9/fs/ext3/super.c
-@@ -392,6 +392,7 @@ static void ext3_put_super (struct super
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
- 	if (!(sb->s_flags & MS_RDONLY)) {
-@@ -456,6 +457,8 @@ static struct inode *ext3_alloc_inode(st
- #endif
- 	ei->i_block_alloc_info = NULL;
- 	ei->vfs_inode.i_version = 1;
-+	
-+	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
- 	return &ei->vfs_inode;
- }
- 
-@@ -681,6 +684,7 @@ enum {
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+	Opt_extents, Opt_noextents, Opt_extdebug,
- 	Opt_grpquota
- };
- 
-@@ -732,6 +736,9 @@ static match_table_t tokens = {
- 	{Opt_iopen, "iopen"},
- 	{Opt_noiopen, "noiopen"},
- 	{Opt_iopen_nopriv, "iopen_nopriv"},
-+	{Opt_extents, "extents"},
-+	{Opt_noextents, "noextents"},
-+	{Opt_extdebug, "extdebug"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -1073,6 +1080,15 @@ clear_qf_name:
- 		case Opt_nobh:
- 			set_opt(sbi->s_mount_opt, NOBH);
- 			break;
-+		case Opt_extents:
-+			set_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_noextents:
-+			clear_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_extdebug:
-+			set_opt (sbi->s_mount_opt, EXTDEBUG);
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1799,6 +1815,7 @@ static int ext3_fill_super (struct super
- 	percpu_counter_mod(&sbi->s_dirs_counter,
- 		ext3_count_dirs(sb));
- 
-+	ext3_ext_init(sb);
- 	lock_kernel();
- 	return 0;
- 
-Index: linux-2.6.16.27-0.9/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/ioctl.c
-+++ linux-2.6.16.27-0.9/fs/ext3/ioctl.c
-@@ -125,6 +125,10 @@ flags_err:
- 			err = ext3_change_inode_journal_flag(inode, jflag);
- 		return err;
- 	}
-+	case EXT3_IOC_GET_EXTENTS:
-+	case EXT3_IOC_GET_TREE_STATS:
-+	case EXT3_IOC_GET_TREE_DEPTH:
-+		return ext3_ext_ioctl(inode, filp, cmd, arg);
- 	case EXT3_IOC_GETVERSION:
- 	case EXT3_IOC_GETVERSION_OLD:
- 		return put_user(inode->i_generation, (int __user *) arg);
-Index: linux-2.6.16.27-0.9/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs.h
-+++ linux-2.6.16.27-0.9/include/linux/ext3_fs.h
-@@ -185,9 +185,10 @@ struct ext3_group_desc
- #define EXT3_NOTAIL_FL			0x00008000 /* file tail should not be merged */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL			0x00080000 /* Inode uses extents */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
-+#define EXT3_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
- #define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
- 
- /*
-@@ -237,6 +238,9 @@ struct ext3_new_group_data {
- #endif
- #define EXT3_IOC_GETRSVSZ		_IOR('f', 5, long)
- #define EXT3_IOC_SETRSVSZ		_IOW('f', 6, long)
-+#define EXT3_IOC_GET_EXTENTS		_IOR('f', 7, long)
-+#define EXT3_IOC_GET_TREE_DEPTH		_IOR('f', 8, long)
-+#define EXT3_IOC_GET_TREE_STATS		_IOR('f', 9, long)
- 
- /*
-  *  Mount options
-@@ -377,6 +381,8 @@ struct ext3_inode {
- #define EXT3_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
- #define EXT3_MOUNT_IOPEN		0x400000	/* Allow access via iopen */
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x800000/* Make iopen world-readable */
-+#define EXT3_MOUNT_EXTENTS		0x1000000/* Extents support */
-+#define EXT3_MOUNT_EXTDEBUG		0x2000000/* Extents debug */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -565,11 +571,13 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
- #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
-+#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
- 
- #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
- 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
--					 EXT3_FEATURE_INCOMPAT_META_BG)
-+					 EXT3_FEATURE_INCOMPAT_META_BG| \
-+					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-@@ -776,6 +784,7 @@ extern unsigned long ext3_count_free (st
- 
- 
- /* inode.c */
-+extern int ext3_block_truncate_page(handle_t *, struct page *, struct address_space *, loff_t);
- int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-@@ -795,6 +804,7 @@ extern int ext3_get_inode_loc(struct ino
- extern void ext3_truncate (struct inode *);
- extern void ext3_set_inode_flags(struct inode *);
- extern void ext3_set_aops(struct inode *inode);
-+extern int ext3_writepage_trans_blocks(struct inode *inode);
- 
- /* ioctl.c */
- extern int ext3_ioctl (struct inode *, struct file *, unsigned int,
-@@ -848,6 +858,16 @@ extern struct inode_operations ext3_spec
- extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
- 
-+/* extents.c */
-+extern int ext3_ext_writepage_trans_blocks(struct inode *, int);
-+extern int ext3_ext_get_block(handle_t *, struct inode *, long,
-+			      struct buffer_head *, int, int);
-+extern void ext3_ext_truncate(struct inode *, struct page *);
-+extern void ext3_ext_init(struct super_block *);
-+extern void ext3_ext_release(struct super_block *);
-+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
-+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
-+			  unsigned int cmd, unsigned long arg);
- 
- #endif	/* __KERNEL__ */
- 
-Index: linux-2.6.16.27-0.9/include/linux/ext3_extents.h
-===================================================================
---- /dev/null
-+++ linux-2.6.16.27-0.9/include/linux/ext3_extents.h
-@@ -0,0 +1,262 @@
-+/*
-+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+#ifndef _LINUX_EXT3_EXTENTS
-+#define _LINUX_EXT3_EXTENTS
-+
-+/*
-+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
-+ * become very little, so index split, in-depth growing and
-+ * other hard changes happens much more often
-+ * this is for debug purposes only
-+ */
-+#define AGRESSIVE_TEST_
-+
-+/*
-+ * if CHECK_BINSEARCH defined, then results of binary search
-+ * will be checked by linear search
-+ */
-+#define CHECK_BINSEARCH_
-+
-+/*
-+ * if EXT_DEBUG is defined you can use 'extdebug' mount option
-+ * to get lots of info what's going on
-+ */
-+#define EXT_DEBUG_
-+#ifdef EXT_DEBUG
-+#define ext_debug(tree,fmt,a...)			\
-+do {							\
-+	if (test_opt((tree)->inode->i_sb, EXTDEBUG))	\
-+		printk(fmt, ##a);			\
-+} while (0);
-+#else
-+#define ext_debug(tree,fmt,a...)
-+#endif
-+
-+/*
-+ * if EXT_STATS is defined then stats numbers are collected
-+ * these number will be displayed at umount time
-+ */
-+#define EXT_STATS_
-+
-+
-+#define EXT3_ALLOC_NEEDED	3	/* block bitmap + group desc. + sb */
-+
-+/*
-+ * ext3_inode has i_block array (total 60 bytes)
-+ * first 4 bytes are used to store:
-+ *  - tree depth (0 mean there is no tree yet. all extents in the inode)
-+ *  - number of alive extents in the inode
-+ */
-+
-+/*
-+ * this is extent on-disk structure
-+ * it's used at the bottom of the tree
-+ */
-+struct ext3_extent {
-+	__u32	ee_block;	/* first logical block extent covers */
-+	__u16	ee_len;		/* number of blocks covered by extent */
-+	__u16	ee_start_hi;	/* high 16 bits of physical block */
-+	__u32	ee_start;	/* low 32 bigs of physical block */
-+};
-+
-+/*
-+ * this is index on-disk structure
-+ * it's used at all the levels, but the bottom
-+ */
-+struct ext3_extent_idx {
-+	__u32	ei_block;	/* index covers logical blocks from 'block' */
-+	__u32	ei_leaf;	/* pointer to the physical block of the next *
-+				 * level. leaf or next index could bet here */
-+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
-+	__u16	ei_unused;
-+};
-+
-+/*
-+ * each block (leaves and indexes), even inode-stored has header
-+ */
-+struct ext3_extent_header {	
-+	__u16	eh_magic;	/* probably will support different formats */	
-+	__u16	eh_entries;	/* number of valid entries */
-+	__u16	eh_max;		/* capacity of store in entries */
-+	__u16	eh_depth;	/* has tree real underlaying blocks? */
-+	__u32	eh_generation;	/* flags(8 bits) | generation of the tree */
-+};
-+
-+#define EXT3_EXT_MAGIC		0xf30a
-+
-+/*
-+ * array of ext3_ext_path contains path to some extent
-+ * creation/lookup routines use it for traversal/splitting/etc
-+ * truncate uses it to simulate recursive walking
-+ */
-+struct ext3_ext_path {
-+	__u32				p_block;
-+	__u16				p_depth;
-+	struct ext3_extent		*p_ext;
-+	struct ext3_extent_idx		*p_idx;
-+	struct ext3_extent_header	*p_hdr;
-+	struct buffer_head		*p_bh;
-+};
-+
-+/*
-+ * structure for external API
-+ */
-+
-+/*
-+ * storage for cached extent
-+ */
-+struct ext3_ext_cache {
-+	__u32	ec_start;
-+	__u32	ec_block;
-+	__u32	ec_len;
-+	__u32	ec_type;
-+};
-+
-+#define EXT3_EXT_CACHE_NO	0
-+#define EXT3_EXT_CACHE_GAP	1
-+#define EXT3_EXT_CACHE_EXTENT	2
-+
-+/*
-+ * ext3_extents_tree is used to pass initial information
-+ * to top-level extents API
-+ */
-+struct ext3_extents_helpers;
-+struct ext3_extents_tree {
-+	struct inode *inode;	/* inode which tree belongs to */
-+	void *root;		/* ptr to data top of tree resides at */
-+	void *buffer;		/* will be passed as arg to ^^ routines	*/
-+	int buffer_len;
-+	void *private;
-+	struct ext3_ext_cache *cex;/* last found extent */
-+	struct ext3_extents_helpers *ops;
-+};
-+
-+struct ext3_extents_helpers {
-+	int (*get_write_access)(handle_t *h, void *buffer);
-+	int (*mark_buffer_dirty)(handle_t *h, void *buffer);
-+	int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2);
-+	int (*remove_extent_credits)(struct ext3_extents_tree *,
-+				     struct ext3_extent *, unsigned long,
-+				     unsigned long);
-+	int (*remove_extent)(struct ext3_extents_tree *,
-+			     struct ext3_extent *, unsigned long,
-+			     unsigned long);
-+	int (*new_block)(handle_t *, struct ext3_extents_tree *,
-+			 struct ext3_ext_path *, struct ext3_extent *,
-+			 int *);
-+};
-+
-+/*
-+ * to be called by ext3_ext_walk_space()
-+ * negative retcode - error
-+ * positive retcode - signal for ext3_ext_walk_space(), see below
-+ * callback must return valid extent (passed or newly created)
-+ */
-+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *,
-+				    struct ext3_ext_path *,
-+				    struct ext3_ext_cache *);
-+
-+#define EXT_CONTINUE	0
-+#define EXT_BREAK	1
-+#define EXT_REPEAT	2
-+
-+
-+#define EXT_MAX_BLOCK	0xffffffff
-+
-+
-+#define EXT_FIRST_EXTENT(__hdr__) \
-+	((struct ext3_extent *) (((char *) (__hdr__)) +		\
-+				 sizeof(struct ext3_extent_header)))
-+#define EXT_FIRST_INDEX(__hdr__) \
-+	((struct ext3_extent_idx *) (((char *) (__hdr__)) +	\
-+				     sizeof(struct ext3_extent_header)))
-+#define EXT_HAS_FREE_INDEX(__path__) \
-+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
-+#define EXT_LAST_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_LAST_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_MAX_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_MAX_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_HDR_GEN(__hdr__)	((__hdr__)->eh_generation & 0x00ffffff)
-+#define EXT_FLAGS(__hdr__)	((__hdr__)->eh_generation >> 24)
-+#define EXT_FLAGS_CLR_UNKNOWN	0x7	/* Flags cleared on modification */
-+
-+#define EXT_BLOCK_HDR(__bh__) 	((struct ext3_extent_header *)(__bh__)->b_data)
-+#define EXT_ROOT_HDR(__tree__)	((struct ext3_extent_header *)(__tree__)->root)
-+#define EXT_DEPTH(__tree__)	(EXT_ROOT_HDR(__tree__)->eh_depth)
-+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__))
-+
-+#define EXT_ASSERT(__x__) if (!(__x__)) BUG();
-+
-+#define EXT_CHECK_PATH(tree,path)					\
-+{									\
-+	int depth = EXT_DEPTH(tree);					\
-+	BUG_ON((unsigned long) (path) < __PAGE_OFFSET);			\
-+	BUG_ON((unsigned long) (path)[depth].p_idx <			\
-+			__PAGE_OFFSET && (path)[depth].p_idx != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_ext <			\
-+			__PAGE_OFFSET && (path)[depth].p_ext != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET);	\
-+	BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET	\
-+			&& depth != 0);					\
-+	BUG_ON((path)[0].p_depth != depth);				\
-+}
-+
-+
-+/*
-+ * this structure is used to gather extents from the tree via ioctl
-+ */
-+struct ext3_extent_buf {
-+	unsigned long start;
-+	int buflen;
-+	void *buffer;
-+	void *cur;
-+	int err;
-+};
-+
-+/*
-+ * this structure is used to collect stats info about the tree
-+ */
-+struct ext3_extent_tree_stats {
-+	int depth;
-+	int extents_num;
-+	int leaf_num;
-+};
-+
-+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *);
-+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *);
-+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *);
-+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *);
-+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback);
-+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
-+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
-+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int);
-+
-+static inline void
-+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree)
-+{
-+	if (tree->cex)
-+		tree->cex->ec_type = EXT3_EXT_CACHE_NO;
-+}
-+
-+
-+#endif /* _LINUX_EXT3_EXTENTS */
-Index: linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h
-@@ -133,6 +133,8 @@ struct ext3_inode_info {
- 	 */
- 	struct semaphore truncate_sem;
- 	struct inode vfs_inode;
-+
-+	__u32 i_cached_extent[4];
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch
deleted file mode 100644
index 7bc712e236d34c05e00cafb99c2e7f68959d3abc..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,2950 +0,0 @@
-Index: linux-stage/fs/ext3/extents.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-stage/fs/ext3/extents.c	2006-07-16 14:10:21.000000000 +0800
-@@ -0,0 +1,2359 @@
-+/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+/*
-+ * Extents support for EXT3
-+ *
-+ * TODO:
-+ *   - ext3_ext_walk_space() sould not use ext3_ext_find_extent()
-+ *   - ext3_ext_calc_credits() could take 'mergable' into account
-+ *   - ext3*_error() should be used in some situations
-+ *   - find_goal() [to be tested and improved]
-+ *   - smart tree reduction
-+ *   - arch-independence
-+ *     common on-disk format for big/little-endian arch
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/fs.h>
-+#include <linux/time.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/smp_lock.h>
-+#include <linux/highuid.h>
-+#include <linux/pagemap.h>
-+#include <linux/quotaops.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/ext3_extents.h>
-+#include <asm/uaccess.h>
-+
-+
-+static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
-+{
-+	if (eh->eh_magic != EXT3_EXT_MAGIC) {
-+		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
-+		       (unsigned)eh->eh_magic);
-+		return -EIO;
-+	}
-+	if (eh->eh_max == 0) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
-+		       (unsigned)eh->eh_max);
-+		return -EIO;
-+	}
-+	if (eh->eh_entries > eh->eh_max) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
-+		       (unsigned)eh->eh_entries);
-+		return -EIO;
-+	}
-+	return 0;
-+}
-+
-+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
-+{
-+	int err;
-+
-+	if (handle->h_buffer_credits > needed)
-+		return handle;
-+	if (!ext3_journal_extend(handle, needed))
-+		return handle;
-+	err = ext3_journal_restart(handle, needed);
-+	
-+	return handle;
-+}
-+
-+static int inline
-+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->get_write_access)
-+		return tree->ops->get_write_access(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+static int inline
-+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->mark_buffer_dirty)
-+		return tree->ops->mark_buffer_dirty(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ */
-+static int ext3_ext_get_access(handle_t *handle,
-+			       struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+	int err;
-+
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err = ext3_journal_get_write_access(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_get_access_for_root(handle, tree);
-+	}
-+	return err;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ *  - EIO
-+ */
-+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path)
-+{
-+	int err;
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err =ext3_journal_dirty_metadata(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_mark_root_dirty(handle, tree);
-+	}
-+	return err;
-+}
-+
-+static int inline
-+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, struct ext3_extent *ex,
-+		   int *err)
-+{
-+	int goal, depth, newblock;
-+	struct inode *inode;
-+
-+	EXT_ASSERT(tree);
-+	if (tree->ops->new_block)
-+		return tree->ops->new_block(handle, tree, path, ex, err);
-+
-+	inode = tree->inode;
-+	depth = EXT_DEPTH(tree);
-+	if (path && depth > 0) {
-+		goal = path[depth-1].p_block;
-+	} else {
-+		struct ext3_inode_info *ei = EXT3_I(inode);
-+		unsigned long bg_start;
-+		unsigned long colour;
-+
-+		bg_start = (ei->i_block_group *
-+			    EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+			le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+		colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+		goal = bg_start + colour;
-+	}
-+
-+	newblock = ext3_new_block(handle, inode, goal, err);
-+	return newblock;
-+}
-+
-+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *neh = EXT_ROOT_HDR(tree);
-+	neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) |
-+			     (EXT_HDR_GEN(neh) + 1);
-+}
-+
-+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 6;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 5;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 3;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 4;
-+#endif
-+	return size;
-+}
-+
-+static void ext3_ext_show_path(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int k, l = path->p_depth;
-+
-+	ext_debug(tree, "path:");
-+	for (k = 0; k <= l; k++, path++) {
-+		if (path->p_idx) {
-+			ext_debug(tree, "  %d->%d", path->p_idx->ei_block,
-+				  path->p_idx->ei_leaf);
-+		} else if (path->p_ext) {
-+			ext_debug(tree, "  %d:%d:%d",
-+				  path->p_ext->ee_block,
-+				  path->p_ext->ee_len,
-+				  path->p_ext->ee_start);
-+		} else
-+			ext_debug(tree, "  []");
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *eh;
-+	struct ext3_extent *ex;
-+	int i;
-+
-+	if (!path)
-+		return;
-+
-+	eh = path[depth].p_hdr;
-+	ex = EXT_FIRST_EXTENT(eh);
-+
-+	for (i = 0; i < eh->eh_entries; i++, ex++) {
-+		ext_debug(tree, "%d:%d:%d ",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_drop_refs(struct ext3_ext_path *path)
-+{
-+	int depth = path->p_depth;
-+	int i;
-+
-+	for (i = 0; i <= depth; i++, path++) {
-+		if (path->p_bh) {
-+			brelse(path->p_bh);
-+			path->p_bh = NULL;
-+		}
-+	}
-+}
-+
-+/*
-+ * binary search for closest index by given block
-+ */
-+static inline void
-+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree,
-+		       struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent_idx *ix;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_entries > 0);
-+
-+	ext_debug(tree, "binsearch for %d(idx):  ", block);
-+
-+	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ix[l + k].ei_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ix += l;
-+	path->p_idx = ix;
-+	ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf);
-+
-+	while (l++ < r) {
-+		if (block < ix->ei_block) 
-+			break;
-+		path->p_idx = ix++;
-+	}
-+	ext_debug(tree, "  -> %d->%d\n", path->p_idx->ei_block,
-+		  path->p_idx->ei_leaf);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent_idx *chix;
-+
-+		chix = ix = EXT_FIRST_INDEX(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ix++) {
-+			if (k != 0 && ix->ei_block <= ix[-1].ei_block) {
-+				printk("k=%d, ix=0x%p, first=0x%p\n", k,
-+				       ix, EXT_FIRST_INDEX(eh));
-+				printk("%u <= %u\n",
-+				       ix->ei_block,ix[-1].ei_block);
-+			}
-+			EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block);
-+			if (block < ix->ei_block) 
-+				break;
-+			chix = ix;
-+		}
-+		EXT_ASSERT(chix == path->p_idx);
-+	}
-+#endif
-+}
-+
-+/*
-+ * binary search for closest extent by given block
-+ */
-+static inline void
-+ext3_ext_binsearch(struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent *ex;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+
-+	if (eh->eh_entries == 0) {
-+		/*
-+		 * this leaf is empty yet:
-+		 *  we get such a leaf in split/add case
-+		 */
-+		return;
-+	}
-+	
-+	ext_debug(tree, "binsearch for %d:  ", block);
-+
-+	path->p_ext = ex = EXT_FIRST_EXTENT(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ex[l + k].ee_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ex += l;
-+	path->p_ext = ex;
-+	ext_debug(tree, "  -> %d:%d:%d ", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+	while (l++ < r) {
-+		if (block < ex->ee_block) 
-+			break;
-+		path->p_ext = ex++;
-+	}
-+	ext_debug(tree, "  -> %d:%d:%d\n", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent *chex;
-+
-+		chex = ex = EXT_FIRST_EXTENT(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ex++) {
-+			EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block);
-+			if (block < ex->ee_block) 
-+				break;
-+			chex = ex;
-+		}
-+		EXT_ASSERT(chex == path->p_ext);
-+	}
-+#endif
-+}
-+
-+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *eh;
-+
-+	BUG_ON(tree->buffer_len == 0);
-+	ext3_ext_get_access_for_root(handle, tree);
-+	eh = EXT_ROOT_HDR(tree);
-+	eh->eh_depth = 0;
-+	eh->eh_entries = 0;
-+	eh->eh_magic = EXT3_EXT_MAGIC;
-+	eh->eh_max = ext3_ext_space_root(tree);
-+	ext3_ext_mark_root_dirty(handle, tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return 0;
-+}
-+
-+struct ext3_ext_path *
-+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block,
-+		     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	struct buffer_head *bh;
-+	int depth, i, ppos = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	eh = EXT_ROOT_HDR(tree);
-+	EXT_ASSERT(eh);
-+	if (ext3_ext_check_header(eh)) {
-+		/* don't free previously allocated path
-+		 * -- caller should take care */
-+		path = NULL;
-+		goto err;
-+	}
-+
-+	i = depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* account possible depth increase */
-+	if (!path) {
-+		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-+			       GFP_NOFS);
-+		if (!path)
-+			return ERR_PTR(-ENOMEM);
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[0].p_hdr = eh;
-+
-+	/* walk through the tree */
-+	while (i) {
-+		ext_debug(tree, "depth %d: num %d, max %d\n",
-+			  ppos, eh->eh_entries, eh->eh_max);
-+		ext3_ext_binsearch_idx(tree, path + ppos, block);
-+		path[ppos].p_block = path[ppos].p_idx->ei_leaf;
-+		path[ppos].p_depth = i;
-+		path[ppos].p_ext = NULL;
-+
-+		bh = sb_bread(tree->inode->i_sb, path[ppos].p_block);
-+		if (!bh)
-+			goto err;
-+
-+		eh = EXT_BLOCK_HDR(bh);
-+		ppos++;
-+		EXT_ASSERT(ppos <= depth);
-+		path[ppos].p_bh = bh;
-+		path[ppos].p_hdr = eh;
-+		i--;
-+
-+		if (ext3_ext_check_header(eh))
-+			goto err;
-+	}
-+
-+	path[ppos].p_depth = i;
-+	path[ppos].p_hdr = eh;
-+	path[ppos].p_ext = NULL;
-+	path[ppos].p_idx = NULL;
-+
-+	if (ext3_ext_check_header(eh))
-+		goto err;
-+
-+	/* find extent */
-+	ext3_ext_binsearch(tree, path + ppos, block);
-+
-+	ext3_ext_show_path(tree, path);
-+
-+	return path;
-+
-+err:
-+	printk(KERN_ERR "EXT3-fs: header is corrupted!\n");
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	return ERR_PTR(-EIO);
-+}
-+
-+/*
-+ * insert new index [logical;ptr] into the block at cupr
-+ * it check where to insert: before curp or after curp
-+ */
-+static int ext3_ext_insert_index(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *curp,
-+				 int logical, int ptr)
-+{
-+	struct ext3_extent_idx *ix;
-+	int len, err;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		return err;
-+
-+	EXT_ASSERT(logical != curp->p_idx->ei_block);
-+	len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx;
-+	if (logical > curp->p_idx->ei_block) {
-+		/* insert after */
-+		if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
-+			len = (len - 1) * sizeof(struct ext3_extent_idx);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert new index %d after: %d. "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  logical, ptr, len,
-+				  (curp->p_idx + 1), (curp->p_idx + 2));
-+			memmove(curp->p_idx + 2, curp->p_idx + 1, len);
-+		}
-+		ix = curp->p_idx + 1;
-+	} else {
-+		/* insert before */
-+		len = len * sizeof(struct ext3_extent_idx);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert new index %d before: %d. "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  logical, ptr, len,
-+			  curp->p_idx, (curp->p_idx + 1));
-+		memmove(curp->p_idx + 1, curp->p_idx, len);
-+		ix = curp->p_idx;
-+	}
-+
-+	ix->ei_block = logical;
-+	ix->ei_leaf = ptr;
-+	ix->ei_leaf_hi = ix->ei_unused = 0;
-+	curp->p_hdr->eh_entries++;
-+
-+	EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
-+	EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
-+
-+	err = ext3_ext_dirty(handle, tree, curp);
-+	ext3_std_error(tree->inode->i_sb, err);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine inserts new subtree into the path, using free index entry
-+ * at depth 'at:
-+ *  - allocates all needed blocks (new leaf and all intermediate index blocks)
-+ *  - makes decision where to split
-+ *  - moves remaining extens and index entries (right to the split point)
-+ *    into the newly allocated blocks
-+ *  - initialize subtree
-+ */
-+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_extent *newext, int at)
-+{
-+	struct buffer_head *bh = NULL;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct ext3_extent *ex;
-+	int i = at, k, m, a;
-+	unsigned long newblock, oldblock, border;
-+	int *ablocks = NULL; /* array of allocated blocks */
-+	int err = 0;
-+
-+	/* make decision: where to split? */
-+	/* FIXME: now desicion is simplest: at current extent */
-+
-+	/* if current leaf will be splitted, then we should use 
-+	 * border from split point */
-+	EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
-+	if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		border = path[depth].p_ext[1].ee_block;
-+		ext_debug(tree, "leaf will be splitted."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	} else {
-+		border = newext->ee_block;
-+		ext_debug(tree, "leaf will be added."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	}
-+
-+	/* 
-+	 * if error occurs, then we break processing
-+	 * and turn filesystem read-only. so, index won't
-+	 * be inserted and tree will be in consistent
-+	 * state. next mount will repair buffers too
-+	 */
-+
-+	/*
-+	 * get array to track all allocated blocks
-+	 * we need this to handle errors and free blocks
-+	 * upon them
-+	 */
-+	ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS);
-+	if (!ablocks)
-+		return -ENOMEM;
-+	memset(ablocks, 0, sizeof(unsigned long) * depth);
-+
-+	/* allocate all needed blocks */
-+	ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at);
-+	for (a = 0; a < depth - at; a++) {
-+		newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+		if (newblock == 0)
-+			goto cleanup;
-+		ablocks[a] = newblock;
-+	}
-+
-+	/* initialize new leaf */
-+	newblock = ablocks[--a];
-+	EXT_ASSERT(newblock);
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		goto cleanup;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh)))
-+		goto cleanup;
-+
-+	neh = EXT_BLOCK_HDR(bh);
-+	neh->eh_entries = 0;
-+	neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	neh->eh_depth = 0;
-+	ex = EXT_FIRST_EXTENT(neh);
-+
-+	/* move remain of path[depth] to the new leaf */
-+	EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max);
-+	/* start copy from next extent */
-+	/* TODO: we could do it by single memmove */
-+	m = 0;
-+	path[depth].p_ext++;
-+	while (path[depth].p_ext <=
-+			EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		ext_debug(tree, "move %d:%d:%d in new leaf %lu\n",
-+			  path[depth].p_ext->ee_block,
-+			  path[depth].p_ext->ee_start,
-+			  path[depth].p_ext->ee_len,
-+			  newblock);
-+		memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent));
-+		neh->eh_entries++;
-+		m++;
-+	}
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto cleanup;	
-+	brelse(bh);
-+	bh = NULL;
-+
-+	/* correct old leaf */
-+	if (m) {
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			goto cleanup;
-+		path[depth].p_hdr->eh_entries -= m;
-+		if ((err = ext3_ext_dirty(handle, tree, path + depth)))
-+			goto cleanup;
-+		
-+	}
-+
-+	/* create intermediate indexes */
-+	k = depth - at - 1;
-+	EXT_ASSERT(k >= 0);
-+	if (k)
-+		ext_debug(tree,	"create %d intermediate indices\n", k);
-+	/* insert new index into current index block */
-+	/* current depth stored in i var */
-+	i = depth - 1;
-+	while (k--) {
-+		oldblock = newblock;
-+		newblock = ablocks[--a];
-+		bh = sb_getblk(tree->inode->i_sb, newblock);
-+		if (!bh) {
-+			err = -EIO;
-+			goto cleanup;
-+		}
-+		lock_buffer(bh);
-+
-+		if ((err = ext3_journal_get_create_access(handle, bh)))
-+			goto cleanup;
-+
-+		neh = EXT_BLOCK_HDR(bh);
-+		neh->eh_entries = 1;
-+		neh->eh_magic = EXT3_EXT_MAGIC;
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+		neh->eh_depth = depth - i; 
-+		fidx = EXT_FIRST_INDEX(neh);
-+		fidx->ei_block = border;
-+		fidx->ei_leaf = oldblock;
-+		fidx->ei_leaf_hi = fidx->ei_unused = 0;
-+
-+		ext_debug(tree,	"int.index at %d (block %lu): %lu -> %lu\n",
-+			  i, newblock, border, oldblock);
-+		/* copy indexes */
-+		m = 0;
-+		path[i].p_idx++;
-+
-+		ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
-+			  EXT_MAX_INDEX(path[i].p_hdr));
-+		EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
-+			   EXT_LAST_INDEX(path[i].p_hdr));
-+		while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
-+			ext_debug(tree, "%d: move %d:%d in new index %lu\n",
-+				  i, path[i].p_idx->ei_block,
-+				  path[i].p_idx->ei_leaf, newblock);
-+			memmove(++fidx, path[i].p_idx++,
-+				sizeof(struct ext3_extent_idx));
-+			neh->eh_entries++;
-+			EXT_ASSERT(neh->eh_entries <= neh->eh_max);
-+			m++;
-+		}
-+		set_buffer_uptodate(bh);
-+		unlock_buffer(bh);
-+
-+		if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+			goto cleanup;
-+		brelse(bh);
-+		bh = NULL;
-+
-+		/* correct old index */
-+		if (m) {
-+			err = ext3_ext_get_access(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+			path[i].p_hdr->eh_entries -= m;
-+			err = ext3_ext_dirty(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+		}
-+
-+		i--;
-+	}
-+
-+	/* insert new index */
-+	if (!err)
-+		err = ext3_ext_insert_index(handle, tree, path + at,
-+					    border, newblock);
-+
-+cleanup:
-+	if (bh) {
-+		if (buffer_locked(bh))
-+			unlock_buffer(bh);
-+		brelse(bh);
-+	}
-+
-+	if (err) {
-+		/* free all allocated blocks in error case */
-+		for (i = 0; i < depth; i++) {
-+			if (!ablocks[i])
-+				continue;
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+		}
-+	}
-+	kfree(ablocks);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine implements tree growing procedure:
-+ *  - allocates new block
-+ *  - moves top-level data (index block or leaf) into the new block
-+ *  - initialize new top-level, creating index that points to the
-+ *    just created block
-+ */
-+static int ext3_ext_grow_indepth(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *path,
-+				 struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp = path;
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct buffer_head *bh;
-+	unsigned long newblock;
-+	int err = 0;
-+
-+	newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+	if (newblock == 0)
-+		return err;
-+
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		ext3_std_error(tree->inode->i_sb, err);
-+		return err;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh))) {
-+		unlock_buffer(bh);
-+		goto out;	
-+	}
-+
-+	/* move top-level index/leaf into new block */
-+	memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
-+
-+	/* set size of new block */
-+	neh = EXT_BLOCK_HDR(bh);
-+	/* old root could have indexes or leaves
-+	 * so calculate eh_max right way */
-+	if (EXT_DEPTH(tree))
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+	else
-+		neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto out;
-+
-+	/* create index in new top-level index: num,max,pointer */
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		goto out;
-+
-+	curp->p_hdr->eh_magic = EXT3_EXT_MAGIC;
-+	curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree);
-+	curp->p_hdr->eh_entries = 1;
-+	curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
-+	/* FIXME: it works, but actually path[0] can be index */
-+	curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
-+	curp->p_idx->ei_leaf = newblock;
-+	curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
-+
-+	neh = EXT_ROOT_HDR(tree);
-+	fidx = EXT_FIRST_INDEX(neh);
-+	ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n",
-+		  neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); 
-+
-+	neh->eh_depth = path->p_depth + 1;
-+	err = ext3_ext_dirty(handle, tree, curp);
-+out:
-+	brelse(bh);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine finds empty index and adds new leaf. if no free index found
-+ * then it requests in-depth growing
-+ */
-+static int ext3_ext_create_new_leaf(handle_t *handle,
-+				    struct ext3_extents_tree *tree,
-+				    struct ext3_ext_path *path,
-+				    struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp;
-+	int depth, i, err = 0;
-+
-+repeat:
-+	i = depth = EXT_DEPTH(tree);
-+	
-+	/* walk up to the tree and look for free index entry */
-+	curp = path + depth;
-+	while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) {
-+		i--;
-+		curp--;
-+	}
-+
-+	/* we use already allocated block for index block
-+	 * so, subsequent data blocks should be contigoues */
-+	if (EXT_HAS_FREE_INDEX(curp)) {
-+		/* if we found index with free entry, then use that
-+		 * entry: create all needed subtree and add new leaf */
-+		err = ext3_ext_split(handle, tree, path, newext, i);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+	} else {
-+		/* tree is full, time to grow in depth */
-+		err = ext3_ext_grow_indepth(handle, tree, path, newext);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+
-+		/*
-+		 * only first (depth 0 -> 1) produces free space
-+		 * in all other cases we have to split growed tree
-+		 */
-+		depth = EXT_DEPTH(tree);
-+		if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) {
-+			/* now we need split */
-+			goto repeat;
-+		}
-+	}
-+
-+	if (err)
-+		return err;
-+
-+	return 0;
-+}
-+
-+/*
-+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK
-+ * NOTE: it consider block number from index entry as
-+ * allocated block. thus, index entries have to be consistent
-+ * with leafs
-+ */
-+static unsigned long
-+ext3_ext_next_allocated_block(struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	if (depth == 0 && path->p_ext == NULL)
-+		return EXT_MAX_BLOCK;
-+
-+	/* FIXME: what if index isn't full ?! */
-+	while (depth >= 0) {
-+		if (depth == path->p_depth) {
-+			/* leaf */
-+			if (path[depth].p_ext !=
-+			    EXT_LAST_EXTENT(path[depth].p_hdr))
-+				return path[depth].p_ext[1].ee_block;
-+		} else {
-+			/* index */
-+			if (path[depth].p_idx !=
-+			    EXT_LAST_INDEX(path[depth].p_hdr))
-+				return path[depth].p_idx[1].ei_block;
-+		}
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * returns first allocated block from next leaf or EXT_MAX_BLOCK
-+ */
-+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree,
-+					 struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	/* zero-tree has no leaf blocks at all */
-+	if (depth == 0)
-+		return EXT_MAX_BLOCK;
-+
-+	/* go to index block */
-+	depth--;
-+	
-+	while (depth >= 0) {
-+		if (path[depth].p_idx !=
-+		    EXT_LAST_INDEX(path[depth].p_hdr))
-+			return path[depth].p_idx[1].ei_block;
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * if leaf gets modified and modified extent is first in the leaf
-+ * then we have to correct all indexes above
-+ * TODO: do we need to correct tree in all cases?
-+ */
-+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	int depth = EXT_DEPTH(tree);	
-+	struct ext3_extent *ex;
-+	unsigned long border;
-+	int k, err = 0;
-+	
-+	eh = path[depth].p_hdr;
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(eh);
-+	
-+	if (depth == 0) {
-+		/* there is no tree at all */
-+		return 0;
-+	}
-+	
-+	if (ex != EXT_FIRST_EXTENT(eh)) {
-+		/* we correct tree if first leaf got modified only */
-+		return 0;
-+	}
-+	
-+	/*
-+	 * TODO: we need correction if border is smaller then current one
-+	 */
-+	k = depth - 1;
-+	border = path[depth].p_ext->ee_block;
-+	if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+		return err;
-+	path[k].p_idx->ei_block = border;
-+	if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+		return err;
-+
-+	while (k--) {
-+		/* change all left-side indexes */
-+		if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr))
-+			break;
-+		if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+			break;
-+		path[k].p_idx->ei_block = border;
-+		if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+			break;
-+	}
-+
-+	return err;
-+}
-+
-+static int inline
-+ext3_can_extents_be_merged(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex1,
-+			   struct ext3_extent *ex2)
-+{
-+	if (ex1->ee_block + ex1->ee_len != ex2->ee_block)
-+		return 0;
-+
-+#ifdef AGRESSIVE_TEST
-+	if (ex1->ee_len >= 4)
-+		return 0;
-+#endif
-+
-+	if (!tree->ops->mergable)
-+		return 1;
-+
-+	return tree->ops->mergable(ex1, ex2);
-+}
-+
-+/*
-+ * this routine tries to merge requsted extent into the existing
-+ * extent or inserts requested extent as new one into the tree,
-+ * creating new leaf in no-space case
-+ */
-+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree,
-+			   struct ext3_ext_path *path,
-+			   struct ext3_extent *newext)
-+{
-+	struct ext3_extent_header * eh;
-+	struct ext3_extent *ex, *fex;
-+	struct ext3_extent *nearex; /* nearest extent */
-+	struct ext3_ext_path *npath = NULL;
-+	int depth, len, err, next;
-+
-+	EXT_ASSERT(newext->ee_len > 0);
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(path[depth].p_hdr);
-+
-+	/* try to insert block into found extent and return */
-+	if (ex && ext3_can_extents_be_merged(tree, ex, newext)) {
-+		ext_debug(tree, "append %d block to %d:%d (from %d)\n",
-+			  newext->ee_len, ex->ee_block, ex->ee_len,
-+			  ex->ee_start);
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			return err;
-+		ex->ee_len += newext->ee_len;
-+		eh = path[depth].p_hdr;
-+		nearex = ex;
-+		goto merge;
-+	}
-+
-+repeat:
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+	if (eh->eh_entries < eh->eh_max)
-+		goto has_space;
-+
-+	/* probably next leaf has space for us? */
-+	fex = EXT_LAST_EXTENT(eh);
-+	next = ext3_ext_next_leaf_block(tree, path);
-+	if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) {
-+		ext_debug(tree, "next leaf block - %d\n", next);
-+		EXT_ASSERT(!npath);
-+		npath = ext3_ext_find_extent(tree, next, NULL);
-+		if (IS_ERR(npath))
-+			return PTR_ERR(npath);
-+		EXT_ASSERT(npath->p_depth == path->p_depth);
-+		eh = npath[depth].p_hdr;
-+		if (eh->eh_entries < eh->eh_max) {
-+			ext_debug(tree,	"next leaf isnt full(%d)\n",
-+				  eh->eh_entries);
-+			path = npath;
-+			goto repeat;
-+		}
-+		ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
-+			  eh->eh_entries, eh->eh_max);
-+	}
-+
-+	/*
-+	 * there is no free space in found leaf
-+	 * we're gonna add new leaf in the tree
-+	 */
-+	err = ext3_ext_create_new_leaf(handle, tree, path, newext);
-+	if (err)
-+		goto cleanup;
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+
-+has_space:
-+	nearex = path[depth].p_ext;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+		goto cleanup;
-+
-+	if (!nearex) {
-+		/* there is no extent in this leaf, create first one */
-+		ext_debug(tree, "first extent in the leaf: %d:%d:%d\n",
-+			  newext->ee_block, newext->ee_start,
-+			  newext->ee_len);
-+		path[depth].p_ext = EXT_FIRST_EXTENT(eh);
-+	} else if (newext->ee_block > nearex->ee_block) {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		if (nearex != EXT_LAST_EXTENT(eh)) {
-+			len = EXT_MAX_EXTENT(eh) - nearex;
-+			len = (len - 1) * sizeof(struct ext3_extent);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  newext->ee_block, newext->ee_start,
-+				  newext->ee_len,
-+				  nearex, len, nearex + 1, nearex + 2);
-+			memmove(nearex + 2, nearex + 1, len);
-+		}
-+		path[depth].p_ext = nearex + 1;
-+	} else {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  newext->ee_block, newext->ee_start, newext->ee_len,
-+			  nearex, len, nearex + 1, nearex + 2);
-+		memmove(nearex + 1, nearex, len);
-+		path[depth].p_ext = nearex;
-+	}
-+
-+	eh->eh_entries++;
-+	nearex = path[depth].p_ext;
-+	nearex->ee_block = newext->ee_block;
-+	nearex->ee_start = newext->ee_start;
-+	nearex->ee_len = newext->ee_len;
-+	/* FIXME: support for large fs */
-+	nearex->ee_start_hi = 0;
-+
-+merge:
-+	/* try to merge extents to the right */
-+	while (nearex < EXT_LAST_EXTENT(eh)) {
-+		if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1))
-+			break;
-+		/* merge with next extent! */
-+		nearex->ee_len += nearex[1].ee_len;
-+		if (nearex + 1 < EXT_LAST_EXTENT(eh)) {
-+			len = (EXT_LAST_EXTENT(eh) - nearex - 1) *
-+				sizeof(struct ext3_extent);
-+			memmove(nearex + 1, nearex + 2, len);
-+		}
-+		eh->eh_entries--;
-+		EXT_ASSERT(eh->eh_entries > 0);
-+	}
-+
-+	/* try to merge extents to the left */
-+
-+	/* time to correct all indexes above */
-+	err = ext3_ext_correct_indexes(handle, tree, path);
-+	if (err)
-+		goto cleanup;
-+
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+
-+cleanup:
-+	if (npath) {
-+		ext3_ext_drop_refs(npath);
-+		kfree(npath);
-+	}
-+	ext3_ext_tree_changed(tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return err;
-+}
-+
-+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block,
-+			unsigned long num, ext_prepare_callback func)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_ext_cache cbex;
-+	struct ext3_extent *ex;
-+	unsigned long next, start = 0, end = 0;
-+	unsigned long last = block + num;
-+	int depth, exists, err = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(func);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	while (block < last && block != EXT_MAX_BLOCK) {
-+		num = last - block;
-+		/* find extent for this block */
-+		path = ext3_ext_find_extent(tree, block, path);
-+		if (IS_ERR(path)) {
-+			err = PTR_ERR(path);
-+			path = NULL;
-+			break;
-+		}
-+
-+		depth = EXT_DEPTH(tree);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		ex = path[depth].p_ext;
-+		next = ext3_ext_next_allocated_block(path);
-+
-+		exists = 0;
-+		if (!ex) {
-+			/* there is no extent yet, so try to allocate
-+			 * all requested space */
-+			start = block;
-+			end = block + num;
-+		} else if (ex->ee_block > block) {
-+			/* need to allocate space before found extent */
-+			start = block;
-+			end = ex->ee_block;
-+			if (block + num < end)
-+				end = block + num;
-+		} else if (block >= ex->ee_block + ex->ee_len) {
-+			/* need to allocate space after found extent */
-+			start = block;
-+			end = block + num;
-+			if (end >= next)
-+				end = next;
-+		} else if (block >= ex->ee_block) {
-+			/* 
-+			 * some part of requested space is covered
-+			 * by found extent
-+			 */
-+			start = block;
-+			end = ex->ee_block + ex->ee_len;
-+			if (block + num < end)
-+				end = block + num;
-+			exists = 1;
-+		} else {
-+			BUG();
-+		}
-+		EXT_ASSERT(end > start);
-+
-+		if (!exists) {
-+			cbex.ec_block = start;
-+			cbex.ec_len = end - start;
-+			cbex.ec_start = 0;
-+			cbex.ec_type = EXT3_EXT_CACHE_GAP;
-+		} else {
-+			cbex.ec_block = ex->ee_block;
-+			cbex.ec_len = ex->ee_len;
-+			cbex.ec_start = ex->ee_start;
-+			cbex.ec_type = EXT3_EXT_CACHE_EXTENT;
-+		}
-+
-+		EXT_ASSERT(cbex.ec_len > 0);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		err = func(tree, path, &cbex);
-+		ext3_ext_drop_refs(path);
-+
-+		if (err < 0)
-+			break;
-+		if (err == EXT_REPEAT)
-+			continue;
-+		else if (err == EXT_BREAK) {
-+			err = 0;
-+			break;
-+		}
-+
-+		if (EXT_DEPTH(tree) != depth) {
-+			/* depth was changed. we have to realloc path */
-+			kfree(path);
-+			path = NULL;
-+		}
-+
-+		block = cbex.ec_block + cbex.ec_len;
-+	}
-+
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+
-+	return err;
-+}
-+
-+static inline void
-+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block,
-+		      __u32 len, __u32 start, int type)
-+{
-+	EXT_ASSERT(len > 0);
-+	if (tree->cex) {
-+		tree->cex->ec_type = type;
-+		tree->cex->ec_block = block;
-+		tree->cex->ec_len = len;
-+		tree->cex->ec_start = start;
-+	}
-+}
-+
-+/*
-+ * this routine calculate boundaries of the gap requested block fits into
-+ * and cache this gap
-+ */
-+static inline void
-+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  unsigned long block)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	unsigned long lblock, len;
-+	struct ext3_extent *ex;
-+
-+	if (!tree->cex)
-+		return;
-+
-+	ex = path[depth].p_ext;
-+	if (ex == NULL) {
-+		/* there is no extent yet, so gap is [0;-] */
-+		lblock = 0;
-+		len = EXT_MAX_BLOCK;
-+		ext_debug(tree, "cache gap(whole file):");
-+	} else if (block < ex->ee_block) {
-+		lblock = block;
-+		len = ex->ee_block - block;
-+		ext_debug(tree, "cache gap(before): %lu [%lu:%lu]",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len);
-+	} else if (block >= ex->ee_block + ex->ee_len) {
-+		lblock = ex->ee_block + ex->ee_len;
-+		len = ext3_ext_next_allocated_block(path);
-+		ext_debug(tree, "cache gap(after): [%lu:%lu] %lu",
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) block);
-+		EXT_ASSERT(len > lblock);
-+		len = len - lblock;
-+	} else {
-+		lblock = len = 0;
-+		BUG();
-+	}
-+
-+	ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len);
-+	ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP);
-+}
-+
-+static inline int
-+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block,
-+		  struct ext3_extent *ex)
-+{
-+	struct ext3_ext_cache *cex = tree->cex;
-+
-+	/* is there cache storage at all? */
-+	if (!cex)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	/* has cache valid data? */
-+	if (cex->ec_type == EXT3_EXT_CACHE_NO)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP ||
-+		   cex->ec_type == EXT3_EXT_CACHE_EXTENT);
-+	if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
-+		ex->ee_block = cex->ec_block;
-+		ex->ee_start = cex->ec_start;
-+		ex->ee_start_hi = 0;
-+		ex->ee_len = cex->ec_len;
-+		ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) ex->ee_start);
-+		return cex->ec_type;
-+	}
-+
-+	/* not in cache */
-+	return EXT3_EXT_CACHE_NO;
-+}
-+
-+/*
-+ * routine removes index from the index block
-+ * it's used in truncate case only. thus all requests are for
-+ * last index in the block only
-+ */
-+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree,
-+		    struct ext3_ext_path *path)
-+{
-+	struct buffer_head *bh;
-+	int err;
-+	
-+	/* free index block */
-+	path--;
-+	EXT_ASSERT(path->p_hdr->eh_entries);
-+	if ((err = ext3_ext_get_access(handle, tree, path)))
-+		return err;
-+	path->p_hdr->eh_entries--;
-+	if ((err = ext3_ext_dirty(handle, tree, path)))
-+		return err;
-+	ext_debug(tree, "index is empty, remove it, free block %d\n",
-+		  path->p_idx->ei_leaf);
-+	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
-+	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	return err;
-+}
-+
-+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree,
-+				     struct ext3_ext_path *path)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	int needed;
-+
-+	if (path) {
-+		/* probably there is space in leaf? */
-+		if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max)
-+			return 1;
-+	}
-+	
-+	/*
-+	 * the worste case we're expecting is creation of the
-+	 * new root (growing in depth) with index splitting
-+	 * for splitting we have to consider depth + 1 because
-+	 * previous growing could increase it
-+	 */
-+	depth = depth + 1;
-+
-+	/* 
-+	 * growing in depth:
-+	 * block allocation + new root + old root
-+	 */
-+	needed = EXT3_ALLOC_NEEDED + 2;
-+
-+	/* index split. we may need:
-+	 *   allocate intermediate indexes and new leaf
-+	 *   change two blocks at each level, but root
-+	 *   modify root block (inode)
-+	 */
-+	needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1;
-+
-+	return needed;
-+}
-+
-+static int
-+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree,
-+		      struct ext3_ext_path *path, unsigned long start,
-+		      unsigned long end)
-+{
-+	struct ext3_extent *ex, tex;
-+	struct ext3_ext_path *npath;
-+	int depth, creds, err;
-+
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1);
-+	EXT_ASSERT(ex->ee_block < start);
-+
-+	/* calculate tail extent */
-+	tex.ee_block = end + 1;
-+	EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len);
-+	tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block;
-+
-+	creds = ext3_ext_calc_credits_for_insert(tree, path);
-+	handle = ext3_ext_journal_restart(handle, creds);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	
-+	/* calculate head extent. use primary extent */
-+	err = ext3_ext_get_access(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+	ex->ee_len = start - ex->ee_block;
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+
-+	/* FIXME: some callback to free underlying resource
-+	 * and correct ee_start? */
-+	ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n",
-+		  ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len);
-+
-+	npath = ext3_ext_find_extent(tree, ex->ee_block, NULL);
-+	if (IS_ERR(npath))
-+		return PTR_ERR(npath);
-+	depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block);
-+	EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len);
-+
-+	err = ext3_ext_insert_extent(handle, tree, npath, &tex);
-+	ext3_ext_drop_refs(npath);
-+	kfree(npath);
-+
-+	return err;
-+}
-+
-+static int
-+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree,
-+		 struct ext3_ext_path *path, unsigned long start,
-+		 unsigned long end)
-+{
-+	struct ext3_extent *ex, *fu = NULL, *lu, *le;
-+	int err = 0, correct_index = 0;
-+	int depth = EXT_DEPTH(tree), credits;
-+	struct ext3_extent_header *eh;
-+	unsigned a, b, block, num;
-+
-+	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
-+	if (!path[depth].p_hdr)
-+		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+	eh = path[depth].p_hdr;
-+	EXT_ASSERT(eh);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* find where to start removing */
-+	le = ex = EXT_LAST_EXTENT(eh);
-+	while (ex != EXT_FIRST_EXTENT(eh)) {
-+		if (ex->ee_block <= end)
-+			break;
-+		ex--;
-+	}
-+
-+	if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) {
-+		/* removal of internal part of the extent requested
-+		 * tail and head must be placed in different extent
-+		 * so, we have to insert one more extent */
-+		path[depth].p_ext = ex;
-+		return ext3_ext_split_for_rm(handle, tree, path, start, end);
-+	}
-+	
-+	lu = ex;
-+	while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) {
-+		ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len);
-+		path[depth].p_ext = ex;
-+	
-+		a = ex->ee_block > start ? ex->ee_block : start;
-+		b = ex->ee_block + ex->ee_len - 1 < end ?
-+			ex->ee_block + ex->ee_len - 1 : end;
-+		
-+		ext_debug(tree, "  border %u:%u\n", a, b);
-+
-+		if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) {
-+			block = 0;
-+			num = 0;
-+			BUG();
-+		} else if (a != ex->ee_block) {
-+			/* remove tail of the extent */
-+			block = ex->ee_block;
-+			num = a - block;
-+		} else if (b != ex->ee_block + ex->ee_len - 1) {
-+			/* remove head of the extent */
-+			block = a;
-+			num = b - a;
-+		} else {
-+			/* remove whole extent: excelent! */
-+			block = ex->ee_block; 
-+			num = 0;
-+			EXT_ASSERT(a == ex->ee_block &&
-+				   b == ex->ee_block + ex->ee_len - 1);
-+		}
-+
-+		if (ex == EXT_FIRST_EXTENT(eh))
-+			correct_index = 1;
-+
-+		credits = 1;
-+		if (correct_index)
-+			credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1;
-+		if (tree->ops->remove_extent_credits)
-+			credits+=tree->ops->remove_extent_credits(tree,ex,a,b);
-+		
-+		handle = ext3_ext_journal_restart(handle, credits);
-+		if (IS_ERR(handle)) {
-+			err = PTR_ERR(handle);
-+			goto out;
-+		}
-+
-+		err = ext3_ext_get_access(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		if (tree->ops->remove_extent)
-+			err = tree->ops->remove_extent(tree, ex, a, b);
-+		if (err)
-+			goto out;
-+
-+		if (num == 0) {
-+			/* this extent is removed entirely mark slot unused */
-+			ex->ee_start = ex->ee_start_hi = 0;
-+			eh->eh_entries--;
-+			fu = ex;
-+		}
-+
-+		ex->ee_block = block;
-+		ex->ee_len = num;
-+
-+		err = ext3_ext_dirty(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		ext_debug(tree, "new extent: %u:%u:%u\n",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+		ex--;
-+	}
-+
-+	if (fu) {
-+		/* reuse unused slots */
-+		while (lu < le) {
-+			if (lu->ee_start) {
-+				*fu = *lu;
-+				lu->ee_start = lu->ee_start_hi = 0;
-+				fu++;
-+			}
-+			lu++;
-+		}
-+	}
-+
-+	if (correct_index && eh->eh_entries)
-+		err = ext3_ext_correct_indexes(handle, tree, path);
-+
-+	/* if this leaf is free, then we should
-+	 * remove it from index block above */
-+	if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
-+		err = ext3_ext_rm_idx(handle, tree, path + depth);
-+
-+out:
-+	return err;
-+}
-+
-+
-+static struct ext3_extent_idx *
-+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block)
-+{
-+	struct ext3_extent_idx *ix;
-+	
-+	ix = EXT_LAST_INDEX(hdr);
-+	while (ix != EXT_FIRST_INDEX(hdr)) {
-+		if (ix->ei_block <= block)
-+			break;
-+		ix--;
-+	}
-+	return ix;
-+}
-+
-+/*
-+ * returns 1 if current index have to be freed (even partial)
-+ */
-+static int inline
-+ext3_ext_more_to_rm(struct ext3_ext_path *path)
-+{
-+	EXT_ASSERT(path->p_idx);
-+
-+	if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
-+		return 0;
-+
-+	/*
-+	 * if truncate on deeper level happened it it wasn't partial
-+	 * so we have to consider current index for truncation
-+	 */
-+	if (path->p_hdr->eh_entries == path->p_block)
-+		return 0;
-+	return 1;
-+}
-+
-+int ext3_ext_remove_space(struct ext3_extents_tree *tree,
-+			  unsigned long start, unsigned long end)
-+{
-+	struct inode *inode = tree->inode;
-+	struct super_block *sb = inode->i_sb;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_ext_path *path;
-+	handle_t *handle;
-+	int i = 0, err = 0;
-+
-+	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
-+
-+	/* probably first extent we're gonna free will be last in block */
-+	handle = ext3_journal_start(inode, depth + 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	ext3_ext_invalidate_cache(tree);
-+
-+	/*
-+	 * we start scanning from right side freeing all the blocks
-+	 * after i_size and walking into the deep
-+	 */
-+	path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL);
-+	if (IS_ERR(path)) {
-+		ext3_error(sb, __FUNCTION__, "Can't allocate path array");
-+		ext3_journal_stop(handle);
-+		return -ENOMEM;
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[i].p_hdr = EXT_ROOT_HDR(tree);
-+	
-+	while (i >= 0 && err == 0) {
-+		if (i == depth) {
-+			/* this is leaf block */
-+			err = ext3_ext_rm_leaf(handle, tree, path, start, end);
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			continue;
-+		}
-+		
-+		/* this is index block */
-+		if (!path[i].p_hdr) {
-+			ext_debug(tree, "initialize header\n");
-+			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
-+		}
-+
-+		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
-+		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
-+		
-+		if (!path[i].p_idx) {
-+			/* this level hasn't touched yet */
-+			path[i].p_idx =
-+				ext3_ext_last_covered(path[i].p_hdr, end);
-+			path[i].p_block = path[i].p_hdr->eh_entries + 1;
-+			ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n",
-+				  path[i].p_hdr, path[i].p_hdr->eh_entries);
-+		} else {
-+			/* we've already was here, see at next index */
-+			path[i].p_idx--;
-+		}
-+
-+		ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n",
-+			  i, EXT_FIRST_INDEX(path[i].p_hdr),
-+			  path[i].p_idx);
-+		if (ext3_ext_more_to_rm(path + i)) {
-+			/* go to the next level */
-+			ext_debug(tree, "move to level %d (block %d)\n",
-+				  i + 1, path[i].p_idx->ei_leaf);
-+			memset(path + i + 1, 0, sizeof(*path));
-+			path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf);
-+			if (!path[i+1].p_bh) {
-+				/* should we reset i_size? */
-+				err = -EIO;
-+				break;
-+			}
-+			/* put actual number of indexes to know is this
-+			 * number got changed at the next iteration */
-+			path[i].p_block = path[i].p_hdr->eh_entries;
-+			i++;
-+		} else {
-+			/* we finish processing this index, go up */
-+			if (path[i].p_hdr->eh_entries == 0 && i > 0) {
-+				/* index is empty, remove it
-+				 * handle must be already prepared by the
-+				 * truncatei_leaf() */
-+				err = ext3_ext_rm_idx(handle, tree, path + i);
-+			}
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			ext_debug(tree, "return to level %d\n", i);
-+		}
-+	}
-+
-+	/* TODO: flexible tree reduction should be here */
-+	if (path->p_hdr->eh_entries == 0) {
-+		/*
-+		 * truncate to zero freed all the tree
-+		 * so, we need to correct eh_depth
-+		 */
-+		err = ext3_ext_get_access(handle, tree, path);
-+		if (err == 0) {
-+			EXT_ROOT_HDR(tree)->eh_depth = 0;
-+			EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree);
-+			err = ext3_ext_dirty(handle, tree, path);
-+		}
-+	}
-+	ext3_ext_tree_changed(tree);
-+
-+	kfree(path);
-+	ext3_journal_stop(handle);
-+
-+	return err;
-+}
-+
-+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks)
-+{
-+	int lcap, icap, rcap, leafs, idxs, num;
-+
-+	rcap = ext3_ext_space_root(tree);
-+	if (blocks <= rcap) {
-+		/* all extents fit to the root */
-+		return 0;
-+	}
-+
-+	rcap = ext3_ext_space_root_idx(tree);
-+	lcap = ext3_ext_space_block(tree);
-+	icap = ext3_ext_space_block_idx(tree);
-+
-+	num = leafs = (blocks + lcap - 1) / lcap;
-+	if (leafs <= rcap) {
-+		/* all pointers to leafs fit to the root */
-+		return leafs;
-+	}
-+
-+	/* ok. we need separate index block(s) to link all leaf blocks */
-+	idxs = (leafs + icap - 1) / icap;
-+	do {
-+		num += idxs;
-+		idxs = (idxs + icap - 1) / icap;
-+	} while (idxs > rcap);
-+
-+	return num;
-+}
-+
-+/*
-+ * called at mount time
-+ */
-+void ext3_ext_init(struct super_block *sb)
-+{
-+	/*
-+	 * possible initialization would be here
-+	 */
-+
-+	if (test_opt(sb, EXTENTS)) {
-+		printk("EXT3-fs: file extents enabled");
-+#ifdef AGRESSIVE_TEST
-+		printk(", agressive tests");
-+#endif
-+#ifdef CHECK_BINSEARCH
-+		printk(", check binsearch");
-+#endif
-+		printk("\n");
-+	}
-+}
-+
-+/*
-+ * called at umount time
-+ */
-+void ext3_ext_release(struct super_block *sb)
-+{
-+}
-+
-+/************************************************************************
-+ * VFS related routines
-+ ************************************************************************/
-+
-+static int ext3_get_inode_write_access(handle_t *handle, void *buffer)
-+{
-+	/* we use in-core data, not bh */
-+	return 0;
-+}
-+
-+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer)
-+{
-+	struct inode *inode = buffer;
-+	return ext3_mark_inode_dirty(handle, inode);
-+}
-+
-+static int ext3_ext_mergable(struct ext3_extent *ex1,
-+			     struct ext3_extent *ex2)
-+{
-+	/* FIXME: support for large fs */
-+	if (ex1->ee_start + ex1->ee_len == ex2->ee_start)
-+		return 1;
-+	return 0;
-+}
-+
-+static int
-+ext3_remove_blocks_credits(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex,
-+			   unsigned long from, unsigned long to)
-+{
-+	int needed;
-+	
-+	/* at present, extent can't cross block group */;
-+	needed = 4; /* bitmap + group desc + sb + inode */
-+
-+#ifdef CONFIG_QUOTA
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+	return needed;
-+}
-+
-+static int
-+ext3_remove_blocks(struct ext3_extents_tree *tree,
-+		   struct ext3_extent *ex,
-+		   unsigned long from, unsigned long to)
-+{
-+	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
-+	handle_t *handle = ext3_journal_start(tree->inode, needed);
-+	struct buffer_head *bh;
-+	int i;
-+
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
-+		/* tail removal */
-+		unsigned long num, start;
-+		num = ex->ee_block + ex->ee_len - from;
-+		start = ex->ee_start + ex->ee_len - num;
-+		ext_debug(tree, "free last %lu blocks starting %lu\n",
-+			  num, start);
-+		for (i = 0; i < num; i++) {
-+			bh = sb_find_get_block(tree->inode->i_sb, start + i);
-+			ext3_forget(handle, 0, tree->inode, bh, start + i);
-+		}
-+		ext3_free_blocks(handle, tree->inode, start, num);
-+	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
-+		printk("strange request: removal %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	} else {
-+		printk("strange request: removal(2) %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	}
-+	ext3_journal_stop(handle);
-+	return 0;
-+}
-+
-+static int ext3_ext_find_goal(struct inode *inode,
-+			      struct ext3_ext_path *path, unsigned long block)
-+{
-+	struct ext3_inode_info *ei = EXT3_I(inode);
-+	unsigned long bg_start;
-+	unsigned long colour;
-+	int depth;
-+	
-+	if (path) {
-+		struct ext3_extent *ex;
-+		depth = path->p_depth;
-+		
-+		/* try to predict block placement */
-+		if ((ex = path[depth].p_ext))
-+			return ex->ee_start + (block - ex->ee_block);
-+
-+		/* it looks index is empty
-+		 * try to find starting from index itself */
-+		if (path[depth].p_bh)
-+			return path[depth].p_bh->b_blocknr;
-+	}
-+
-+	/* OK. use inode's group */
-+	bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+		le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+	colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+	return bg_start + colour + block;
-+}
-+
-+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path,
-+			     struct ext3_extent *ex, int *err)
-+{
-+	struct inode *inode = tree->inode;
-+	int newblock, goal;
-+	
-+	EXT_ASSERT(path);
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(ex->ee_start);
-+	EXT_ASSERT(ex->ee_len);
-+	
-+	/* reuse block from the extent to order data/metadata */
-+	newblock = ex->ee_start++;
-+	ex->ee_len--;
-+	if (ex->ee_len == 0) {
-+		ex->ee_len = 1;
-+		/* allocate new block for the extent */
-+		goal = ext3_ext_find_goal(inode, path, ex->ee_block);
-+		ex->ee_start = ext3_new_block(handle, inode, goal, err);
-+		ex->ee_start_hi = 0;
-+		if (ex->ee_start == 0) {
-+			/* error occured: restore old extent */
-+			ex->ee_start = newblock;
-+			return 0;
-+		}
-+	}
-+	return newblock;
-+}
-+
-+static struct ext3_extents_helpers ext3_blockmap_helpers = {
-+	.get_write_access	= ext3_get_inode_write_access,
-+	.mark_buffer_dirty	= ext3_mark_buffer_dirty,
-+	.mergable		= ext3_ext_mergable,
-+	.new_block		= ext3_new_block_cb,
-+	.remove_extent		= ext3_remove_blocks,
-+	.remove_extent_credits	= ext3_remove_blocks_credits,
-+};
-+
-+void ext3_init_tree_desc(struct ext3_extents_tree *tree,
-+			 struct inode *inode)
-+{
-+	tree->inode = inode;
-+	tree->root = (void *) EXT3_I(inode)->i_data;
-+	tree->buffer = (void *) inode;
-+	tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
-+	tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent;
-+	tree->ops = &ext3_blockmap_helpers;
-+}
-+
-+int ext3_ext_get_block(handle_t *handle, struct inode *inode,
-+		       long iblock, struct buffer_head *bh_result,
-+		       int create, int extend_disksize)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_extent newex;
-+	struct ext3_extent *ex;
-+	int goal, newblock, err = 0, depth;
-+	struct ext3_extents_tree tree;
-+
-+	clear_buffer_new(bh_result);
-+	ext3_init_tree_desc(&tree, inode);
-+	ext_debug(&tree, "block %d requested for inode %u\n",
-+		  (int) iblock, (unsigned) inode->i_ino);
-+	mutex_lock(&EXT3_I(inode)->truncate_mutex);
-+
-+	/* check in cache */
-+	if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) {
-+		if (goal == EXT3_EXT_CACHE_GAP) {
-+			if (!create) {
-+				/* block isn't allocated yet and
-+				 * user don't want to allocate it */
-+				goto out2;
-+			}
-+			/* we should allocate requested block */
-+		} else if (goal == EXT3_EXT_CACHE_EXTENT) {
-+			/* block is already allocated */
-+			newblock = iblock - newex.ee_block + newex.ee_start;
-+			goto out;
-+		} else {
-+			EXT_ASSERT(0);
-+		}
-+	}
-+
-+	/* find extent for this block */
-+	path = ext3_ext_find_extent(&tree, iblock, NULL);
-+	if (IS_ERR(path)) {
-+		err = PTR_ERR(path);
-+		path = NULL;
-+		goto out2;
-+	}
-+
-+	depth = EXT_DEPTH(&tree);
-+
-+	/*
-+	 * consistent leaf must not be empty
-+	 * this situations is possible, though, _during_ tree modification
-+	 * this is why assert can't be put in ext3_ext_find_extent()
-+	 */
-+	EXT_ASSERT(path[depth].p_ext != NULL || depth == 0);
-+
-+	if ((ex = path[depth].p_ext)) {
-+		/* if found exent covers block, simple return it */
-+		if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) {
-+			newblock = iblock - ex->ee_block + ex->ee_start;
-+			ext_debug(&tree, "%d fit into %d:%d -> %d\n",
-+				  (int) iblock, ex->ee_block, ex->ee_len,
-+				  newblock);
-+			ext3_ext_put_in_cache(&tree, ex->ee_block,
-+					      ex->ee_len, ex->ee_start,
-+					      EXT3_EXT_CACHE_EXTENT);
-+			goto out;
-+		}
-+	}
-+
-+	/*
-+	 * requested block isn't allocated yet
-+	 * we couldn't try to create block if create flag is zero 
-+	 */
-+	if (!create) {
-+		/* put just found gap into cache to speedup subsequest reqs */
-+		ext3_ext_put_gap_in_cache(&tree, path, iblock);
-+		goto out2;
-+	}
-+
-+	/* allocate new block */
-+	goal = ext3_ext_find_goal(inode, path, iblock);
-+	newblock = ext3_new_block(handle, inode, goal, &err);
-+	if (!newblock)
-+		goto out2;
-+	ext_debug(&tree, "allocate new block: goal %d, found %d\n",
-+		  goal, newblock);
-+
-+	/* try to insert new extent into found leaf and return */
-+	newex.ee_block = iblock;
-+	newex.ee_start = newblock;
-+	newex.ee_start_hi = 0;
-+	newex.ee_len = 1;
-+	err = ext3_ext_insert_extent(handle, &tree, path, &newex);
-+	if (err)
-+		goto out2;
-+	
-+	if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize)
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+
-+	/* previous routine could use block we allocated */
-+	newblock = newex.ee_start;
-+	set_buffer_new(bh_result);
-+
-+	ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len,
-+			      newex.ee_start, EXT3_EXT_CACHE_EXTENT);
-+out:
-+	ext3_ext_show_leaf(&tree, path);
-+	map_bh(bh_result, inode->i_sb, newblock);
-+out2:
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	mutex_unlock(&EXT3_I(inode)->truncate_mutex);
-+
-+	return err;	
-+}
-+
-+void ext3_ext_truncate(struct inode * inode, struct page *page)
-+{
-+	struct address_space *mapping = inode->i_mapping;
-+	struct super_block *sb = inode->i_sb;
-+	struct ext3_extents_tree tree;
-+	unsigned long last_block;
-+	handle_t *handle;
-+	int err = 0;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+
-+	/*
-+	 * probably first extent we're gonna free will be last in block
-+	 */
-+	err = ext3_writepage_trans_blocks(inode) + 3;
-+	handle = ext3_journal_start(inode, err);
-+	if (IS_ERR(handle)) {
-+		if (page) {
-+			clear_highpage(page);
-+			flush_dcache_page(page);
-+			unlock_page(page);
-+			page_cache_release(page);
-+		}
-+		return;
-+	}
-+
-+	if (page)
-+		ext3_block_truncate_page(handle, page, mapping, inode->i_size);
-+
-+	mutex_lock(&EXT3_I(inode)->truncate_mutex);
-+	ext3_ext_invalidate_cache(&tree);
-+
-+	/* 
-+	 * TODO: optimization is possible here
-+	 * probably we need not scaning at all,
-+	 * because page truncation is enough
-+	 */
-+	if (ext3_orphan_add(handle, inode))
-+		goto out_stop;
-+
-+	/* we have to know where to truncate from in crash case */
-+	EXT3_I(inode)->i_disksize = inode->i_size;
-+	ext3_mark_inode_dirty(handle, inode);
-+
-+	last_block = (inode->i_size + sb->s_blocksize - 1) >>
-+			EXT3_BLOCK_SIZE_BITS(sb);
-+	err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK);
-+	
-+	/* In a multi-transaction truncate, we only make the final
-+	 * transaction synchronous */
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+
-+out_stop:
-+	/*
-+	 * If this was a simple ftruncate(), and the file will remain alive
-+	 * then we need to clear up the orphan record which we created above.
-+	 * However, if this was a real unlink then we were called by
-+	 * ext3_delete_inode(), and we allow that function to clean up the
-+	 * orphan info for us.
-+	 */
-+	if (inode->i_nlink)
-+		ext3_orphan_del(handle, inode);
-+
-+	mutex_unlock(&EXT3_I(inode)->truncate_mutex);
-+	ext3_journal_stop(handle);
-+}
-+
-+/*
-+ * this routine calculate max number of blocks we could modify
-+ * in order to allocate new block for an inode
-+ */
-+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num)
-+{
-+	struct ext3_extents_tree tree;
-+	int needed;
-+	
-+	ext3_init_tree_desc(&tree, inode);
-+	
-+	needed = ext3_ext_calc_credits_for_insert(&tree, NULL);
-+
-+	/* caller want to allocate num blocks */
-+	needed *= num;
-+	
-+#ifdef CONFIG_QUOTA
-+	/* 
-+	 * FIXME: real calculation should be here
-+	 * it depends on blockmap format of qouta file
-+	 */
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return needed;
-+}
-+
-+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	ext3_extent_tree_init(handle, &tree);
-+}
-+
-+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	return ext3_ext_calc_metadata_amount(&tree, blocks);
-+}
-+	
-+static int
-+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree,
-+			 struct ext3_ext_path *path,
-+			 struct ext3_ext_cache *newex)
-+{
-+	struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private;
-+
-+	if (newex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	if (buf->err < 0)
-+		return EXT_BREAK;
-+	if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen)
-+		return EXT_BREAK;
-+
-+	if (!copy_to_user(buf->cur, newex, sizeof(*newex))) {
-+		buf->err++;
-+		buf->cur += sizeof(*newex);
-+	} else {
-+		buf->err = -EFAULT;
-+		return EXT_BREAK;
-+	}
-+	return EXT_CONTINUE;
-+}
-+
-+static int
-+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_ext_cache *ex)
-+{
-+	struct ext3_extent_tree_stats *buf =
-+		(struct ext3_extent_tree_stats *) tree->private;
-+	int depth;
-+
-+	if (ex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	depth = EXT_DEPTH(tree);
-+	buf->extents_num++;
-+	if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr))
-+		buf->leaf_num++;
-+	return EXT_CONTINUE;
-+}
-+
-+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-+		   unsigned long arg)
-+{
-+	int err = 0;
-+
-+	if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL))
-+		return -EINVAL;
-+
-+	if (cmd == EXT3_IOC_GET_EXTENTS) {
-+		struct ext3_extent_buf buf;
-+		struct ext3_extents_tree tree;
-+
-+		if (copy_from_user(&buf, (void *) arg, sizeof(buf)))
-+			return -EFAULT;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		buf.cur = buf.buffer;
-+		buf.err = 0;
-+		tree.private = &buf;
-+		mutex_lock(&EXT3_I(inode)->truncate_mutex);
-+		err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK,
-+					  ext3_ext_store_extent_cb);
-+		mutex_unlock(&EXT3_I(inode)->truncate_mutex);
-+		if (err == 0)
-+			err = buf.err;
-+	} else if (cmd == EXT3_IOC_GET_TREE_STATS) {
-+		struct ext3_extent_tree_stats buf;
-+		struct ext3_extents_tree tree;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		mutex_lock(&EXT3_I(inode)->truncate_mutex);
-+		buf.depth = EXT_DEPTH(&tree);
-+		buf.extents_num = 0;
-+		buf.leaf_num = 0;
-+		tree.private = &buf;
-+		err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK,
-+					  ext3_ext_collect_stats_cb);
-+		mutex_unlock(&EXT3_I(inode)->truncate_mutex);
-+		if (!err)
-+			err = copy_to_user((void *) arg, &buf, sizeof(buf));
-+	} else if (cmd == EXT3_IOC_GET_TREE_DEPTH) {
-+		struct ext3_extents_tree tree;
-+		ext3_init_tree_desc(&tree, inode);
-+		mutex_lock(&EXT3_I(inode)->truncate_mutex);
-+		err = EXT_DEPTH(&tree);
-+		mutex_unlock(&EXT3_I(inode)->truncate_mutex);
-+	}
-+
-+	return err;
-+}
-+
-+EXPORT_SYMBOL(ext3_init_tree_desc);
-+EXPORT_SYMBOL(ext3_mark_inode_dirty);
-+EXPORT_SYMBOL(ext3_ext_invalidate_cache);
-+EXPORT_SYMBOL(ext3_ext_insert_extent);
-+EXPORT_SYMBOL(ext3_ext_walk_space);
-+EXPORT_SYMBOL(ext3_ext_find_goal);
-+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert);
-Index: linux-stage/fs/ext3/ialloc.c
-===================================================================
---- linux-stage.orig/fs/ext3/ialloc.c	2006-07-16 13:55:31.000000000 +0800
-+++ linux-stage/fs/ext3/ialloc.c	2006-07-16 14:10:20.000000000 +0800
-@@ -600,7 +600,7 @@ got:
- 	ei->i_dir_start_lookup = 0;
- 	ei->i_disksize = 0;
- 
--	ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL;
-+	ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL);
- 	if (S_ISLNK(mode))
- 		ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL);
- 	/* dirsync only applies to directories */
-@@ -644,6 +644,18 @@ got:
- 	if (err)
- 		goto fail_free_drop;
- 
-+	if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
-+		EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
-+		ext3_extents_initialize_blockmap(handle, inode);
-+		if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
-+			err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-+			if (err) goto fail;
-+			EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS);
-+			BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata");
-+			err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-+		}
-+	}
-+
- 	err = ext3_mark_inode_dirty(handle, inode);
- 	if (err) {
- 		ext3_std_error(sb, err);
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c	2006-07-16 13:55:31.000000000 +0800
-+++ linux-stage/fs/ext3/inode.c	2006-07-16 14:11:28.000000000 +0800
-@@ -40,7 +40,7 @@
- #include "iopen.h"
- #include "acl.h"
- 
--static int ext3_writepage_trans_blocks(struct inode *inode);
-+int ext3_writepage_trans_blocks(struct inode *inode);
- 
- /*
-  * Test whether an inode is a fast symlink.
-@@ -944,6 +944,17 @@ out:
- 
- #define DIO_CREDITS (EXT3_RESERVE_TRANS_BLOCKS + 32)
- 
-+static inline int
-+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block,
-+		    struct buffer_head *bh, int create, int extend_disksize)
-+{
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_get_block(handle, inode, block, bh, create,
-+					  extend_disksize);
-+	return ext3_get_blocks_handle(handle, inode, block, 1, bh, create,
-+				     extend_disksize);
-+}
-+
- static int ext3_get_block(struct inode *inode, sector_t iblock,
- 			struct buffer_head *bh_result, int create)
- {
-@@ -984,8 +995,8 @@ static int ext3_get_block(struct inode *
- 
- get_block:
- 	if (ret == 0) {
--		ret = ext3_get_blocks_handle(handle, inode, iblock,
--					max_blocks, bh_result, create, 0);
-+		ret = ext3_get_block_wrap(handle, inode, iblock,
-+						bh_result, create, 0);
- 		if (ret > 0) {
- 			bh_result->b_size = (ret << inode->i_blkbits);
- 			ret = 0;
-@@ -1008,7 +1019,7 @@ struct buffer_head *ext3_getblk(handle_t
- 	dummy.b_state = 0;
- 	dummy.b_blocknr = -1000;
- 	buffer_trace_init(&dummy.b_history);
--	err = ext3_get_blocks_handle(handle, inode, block, 1,
-+	err = ext3_get_block_wrap(handle, inode, block,
- 					&dummy, create, 1);
- 	if (err == 1) {
- 		err = 0;
-@@ -1756,7 +1767,7 @@ void ext3_set_aops(struct inode *inode)
-  * This required during truncate. We need to physically zero the tail end
-  * of that block so it doesn't yield old data if the file is later grown.
-  */
--static int ext3_block_truncate_page(handle_t *handle, struct page *page,
-+int ext3_block_truncate_page(handle_t *handle, struct page *page,
- 		struct address_space *mapping, loff_t from)
- {
- 	ext3_fsblk_t index = from >> PAGE_CACHE_SHIFT;
-@@ -2260,6 +2271,9 @@ void ext3_truncate(struct inode *inode)
- 			return;
- 	}
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_truncate(inode, page);
-+
- 	handle = start_transaction(inode);
- 	if (IS_ERR(handle)) {
- 		if (page) {
-@@ -3004,12 +3018,15 @@ err_out:
-  * block and work out the exact number of indirects which are touched.  Pah.
-  */
- 
--static int ext3_writepage_trans_blocks(struct inode *inode)
-+int ext3_writepage_trans_blocks(struct inode *inode)
- {
- 	int bpp = ext3_journal_blocks_per_page(inode);
- 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
- 	int ret;
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_writepage_trans_blocks(inode, bpp);
-+
- 	if (ext3_should_journal_data(inode))
- 		ret = 3 * (bpp + indirects) + 2;
- 	else
-@@ -3277,7 +3294,7 @@ int ext3_prep_san_write(struct inode *in
- 
- 	/* alloc blocks one by one */
- 	for (i = 0; i < nblocks; i++) {
--		ret = ext3_get_block_handle(handle, inode, blocks[i],
-+		ret = ext3_get_blocks_handle(handle, inode, blocks[i], 1,
- 						&bh_tmp, 1, 1);
- 		if (ret)
- 			break;
-@@ -3337,7 +3354,7 @@ int ext3_map_inode_page(struct inode *in
-                 if (blocks[i] != 0)
-                         continue;
- 
--                rc = ext3_get_block_handle(handle, inode, iblock, &dummy, 1, 1);
-+                rc = ext3_get_blocks_handle(handle, inode, iblock, 1, &dummy, 1, 1);
-                 if (rc) {
-                         printk(KERN_INFO "ext3_map_inode_page: error reading "
-                                "block %ld\n", iblock);
-Index: linux-stage/fs/ext3/Makefile
-===================================================================
---- linux-stage.orig/fs/ext3/Makefile	2006-07-16 13:55:31.000000000 +0800
-+++ linux-stage/fs/ext3/Makefile	2006-07-16 14:10:21.000000000 +0800
-@@ -5,7 +5,8 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
--	   ioctl.o namei.o super.o symlink.o hash.o resize.o
-+	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
-+	   extents.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c	2006-07-16 13:55:31.000000000 +0800
-+++ linux-stage/fs/ext3/super.c	2006-07-16 14:10:21.000000000 +0800
-@@ -391,6 +391,7 @@ static void ext3_put_super (struct super
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
- 	if (!(sb->s_flags & MS_RDONLY)) {
-@@ -455,6 +456,8 @@ static struct inode *ext3_alloc_inode(st
- #endif
- 	ei->i_block_alloc_info = NULL;
- 	ei->vfs_inode.i_version = 1;
-+	
-+	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
- 	return &ei->vfs_inode;
- }
- 
-@@ -638,6 +641,7 @@ enum {
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+	Opt_extents, Opt_noextents, Opt_extdebug,
- 	Opt_grpquota
- };
- 
-@@ -690,6 +694,9 @@ static match_table_t tokens = {
- 	{Opt_iopen, "iopen"},
- 	{Opt_noiopen, "noiopen"},
- 	{Opt_iopen_nopriv, "iopen_nopriv"},
-+	{Opt_extents, "extents"},
-+	{Opt_noextents, "noextents"},
-+	{Opt_extdebug, "extdebug"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -1035,6 +1041,15 @@ clear_qf_name:
- 		case Opt_bh:
- 			clear_opt(sbi->s_mount_opt, NOBH);
- 			break;
-+		case Opt_extents:
-+			set_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_noextents:
-+			clear_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_extdebug:
-+			set_opt (sbi->s_mount_opt, EXTDEBUG);
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1760,6 +1772,7 @@ static int ext3_fill_super (struct super
- 		test_opt(sb,DATA_FLAGS) == EXT3_MOUNT_ORDERED_DATA ? "ordered":
- 		"writeback");
- 
-+	ext3_ext_init(sb);
- 	lock_kernel();
- 	return 0;
- 
-Index: linux-stage/fs/ext3/ioctl.c
-===================================================================
---- linux-stage.orig/fs/ext3/ioctl.c	2006-07-16 13:55:31.000000000 +0800
-+++ linux-stage/fs/ext3/ioctl.c	2006-07-16 13:55:31.000000000 +0800
-@@ -135,6 +135,10 @@ flags_err:
- 		mutex_unlock(&inode->i_mutex);
- 		return err;
- 	}
-+	case EXT3_IOC_GET_EXTENTS:
-+	case EXT3_IOC_GET_TREE_STATS:
-+	case EXT3_IOC_GET_TREE_DEPTH:
-+		return ext3_ext_ioctl(inode, filp, cmd, arg);
- 	case EXT3_IOC_GETVERSION:
- 	case EXT3_IOC_GETVERSION_OLD:
- 		return put_user(inode->i_generation, (int __user *) arg);
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2006-07-16 13:55:31.000000000 +0800
-+++ linux-stage/include/linux/ext3_fs.h	2006-07-16 14:10:21.000000000 +0800
-@@ -181,9 +181,10 @@ struct ext3_group_desc
- #define EXT3_NOTAIL_FL			0x00008000 /* file tail should not be merged */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL			0x00080000 /* Inode uses extents */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
-+#define EXT3_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
- #define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
- 
- /*
-@@ -233,6 +234,9 @@ struct ext3_new_group_data {
- #endif
- #define EXT3_IOC_GETRSVSZ		_IOR('f', 5, long)
- #define EXT3_IOC_SETRSVSZ		_IOW('f', 6, long)
-+#define EXT3_IOC_GET_EXTENTS		_IOR('f', 7, long)
-+#define EXT3_IOC_GET_TREE_DEPTH		_IOR('f', 8, long)
-+#define EXT3_IOC_GET_TREE_STATS		_IOR('f', 9, long)
- 
- /*
-  *  Mount options
-@@ -373,6 +377,8 @@ struct ext3_inode {
- #define EXT3_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
- #define EXT3_MOUNT_IOPEN		0x400000	/* Allow access via iopen */
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x800000/* Make iopen world-readable */
-+#define EXT3_MOUNT_EXTENTS		0x1000000/* Extents support */
-+#define EXT3_MOUNT_EXTDEBUG		0x2000000/* Extents debug */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -563,11 +569,13 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
- #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
-+#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
- 
- #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
- 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
--					 EXT3_FEATURE_INCOMPAT_META_BG)
-+					 EXT3_FEATURE_INCOMPAT_META_BG| \
-+					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-@@ -787,6 +795,9 @@ extern unsigned long ext3_count_free (st
- 
- 
- /* inode.c */
-+extern int ext3_block_truncate_page(handle_t *, struct page *,
-+					struct address_space *, loff_t);
-+extern int ext3_writepage_trans_blocks(struct inode *inode);
- int ext3_forget(handle_t *handle, int is_metadata, struct inode *inode,
- 		struct buffer_head *bh, ext3_fsblk_t blocknr);
- struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
-@@ -860,6 +870,16 @@ extern struct inode_operations ext3_spec
- extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
- 
-+/* extents.c */
-+extern int ext3_ext_writepage_trans_blocks(struct inode *, int);
-+extern int ext3_ext_get_block(handle_t *, struct inode *, long,
-+			      struct buffer_head *, int, int);
-+extern void ext3_ext_truncate(struct inode *, struct page *);
-+extern void ext3_ext_init(struct super_block *);
-+extern void ext3_ext_release(struct super_block *);
-+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
-+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
-+			  unsigned int cmd, unsigned long arg);
- 
- #endif	/* __KERNEL__ */
- 
-Index: linux-stage/include/linux/ext3_extents.h
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-stage/include/linux/ext3_extents.h	2006-07-16 13:55:31.000000000 +0800
-@@ -0,0 +1,262 @@
-+/*
-+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+#ifndef _LINUX_EXT3_EXTENTS
-+#define _LINUX_EXT3_EXTENTS
-+
-+/*
-+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
-+ * become very little, so index split, in-depth growing and
-+ * other hard changes happens much more often
-+ * this is for debug purposes only
-+ */
-+#define AGRESSIVE_TEST_
-+
-+/*
-+ * if CHECK_BINSEARCH defined, then results of binary search
-+ * will be checked by linear search
-+ */
-+#define CHECK_BINSEARCH_
-+
-+/*
-+ * if EXT_DEBUG is defined you can use 'extdebug' mount option
-+ * to get lots of info what's going on
-+ */
-+#define EXT_DEBUG_
-+#ifdef EXT_DEBUG
-+#define ext_debug(tree,fmt,a...)			\
-+do {							\
-+	if (test_opt((tree)->inode->i_sb, EXTDEBUG))	\
-+		printk(fmt, ##a);			\
-+} while (0);
-+#else
-+#define ext_debug(tree,fmt,a...)
-+#endif
-+
-+/*
-+ * if EXT_STATS is defined then stats numbers are collected
-+ * these number will be displayed at umount time
-+ */
-+#define EXT_STATS_
-+
-+
-+#define EXT3_ALLOC_NEEDED	3	/* block bitmap + group desc. + sb */
-+
-+/*
-+ * ext3_inode has i_block array (total 60 bytes)
-+ * first 4 bytes are used to store:
-+ *  - tree depth (0 mean there is no tree yet. all extents in the inode)
-+ *  - number of alive extents in the inode
-+ */
-+
-+/*
-+ * this is extent on-disk structure
-+ * it's used at the bottom of the tree
-+ */
-+struct ext3_extent {
-+	__u32	ee_block;	/* first logical block extent covers */
-+	__u16	ee_len;		/* number of blocks covered by extent */
-+	__u16	ee_start_hi;	/* high 16 bits of physical block */
-+	__u32	ee_start;	/* low 32 bigs of physical block */
-+};
-+
-+/*
-+ * this is index on-disk structure
-+ * it's used at all the levels, but the bottom
-+ */
-+struct ext3_extent_idx {
-+	__u32	ei_block;	/* index covers logical blocks from 'block' */
-+	__u32	ei_leaf;	/* pointer to the physical block of the next *
-+				 * level. leaf or next index could bet here */
-+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
-+	__u16	ei_unused;
-+};
-+
-+/*
-+ * each block (leaves and indexes), even inode-stored has header
-+ */
-+struct ext3_extent_header {	
-+	__u16	eh_magic;	/* probably will support different formats */	
-+	__u16	eh_entries;	/* number of valid entries */
-+	__u16	eh_max;		/* capacity of store in entries */
-+	__u16	eh_depth;	/* has tree real underlaying blocks? */
-+	__u32	eh_generation;	/* flags(8 bits) | generation of the tree */
-+};
-+
-+#define EXT3_EXT_MAGIC		0xf30a
-+
-+/*
-+ * array of ext3_ext_path contains path to some extent
-+ * creation/lookup routines use it for traversal/splitting/etc
-+ * truncate uses it to simulate recursive walking
-+ */
-+struct ext3_ext_path {
-+	__u32				p_block;
-+	__u16				p_depth;
-+	struct ext3_extent		*p_ext;
-+	struct ext3_extent_idx		*p_idx;
-+	struct ext3_extent_header	*p_hdr;
-+	struct buffer_head		*p_bh;
-+};
-+
-+/*
-+ * structure for external API
-+ */
-+
-+/*
-+ * storage for cached extent
-+ */
-+struct ext3_ext_cache {
-+	__u32	ec_start;
-+	__u32	ec_block;
-+	__u32	ec_len;
-+	__u32	ec_type;
-+};
-+
-+#define EXT3_EXT_CACHE_NO	0
-+#define EXT3_EXT_CACHE_GAP	1
-+#define EXT3_EXT_CACHE_EXTENT	2
-+
-+/*
-+ * ext3_extents_tree is used to pass initial information
-+ * to top-level extents API
-+ */
-+struct ext3_extents_helpers;
-+struct ext3_extents_tree {
-+	struct inode *inode;	/* inode which tree belongs to */
-+	void *root;		/* ptr to data top of tree resides at */
-+	void *buffer;		/* will be passed as arg to ^^ routines	*/
-+	int buffer_len;
-+	void *private;
-+	struct ext3_ext_cache *cex;/* last found extent */
-+	struct ext3_extents_helpers *ops;
-+};
-+
-+struct ext3_extents_helpers {
-+	int (*get_write_access)(handle_t *h, void *buffer);
-+	int (*mark_buffer_dirty)(handle_t *h, void *buffer);
-+	int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2);
-+	int (*remove_extent_credits)(struct ext3_extents_tree *,
-+				     struct ext3_extent *, unsigned long,
-+				     unsigned long);
-+	int (*remove_extent)(struct ext3_extents_tree *,
-+			     struct ext3_extent *, unsigned long,
-+			     unsigned long);
-+	int (*new_block)(handle_t *, struct ext3_extents_tree *,
-+			 struct ext3_ext_path *, struct ext3_extent *,
-+			 int *);
-+};
-+
-+/*
-+ * to be called by ext3_ext_walk_space()
-+ * negative retcode - error
-+ * positive retcode - signal for ext3_ext_walk_space(), see below
-+ * callback must return valid extent (passed or newly created)
-+ */
-+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *,
-+				    struct ext3_ext_path *,
-+				    struct ext3_ext_cache *);
-+
-+#define EXT_CONTINUE	0
-+#define EXT_BREAK	1
-+#define EXT_REPEAT	2
-+
-+
-+#define EXT_MAX_BLOCK	0xffffffff
-+
-+
-+#define EXT_FIRST_EXTENT(__hdr__) \
-+	((struct ext3_extent *) (((char *) (__hdr__)) +		\
-+				 sizeof(struct ext3_extent_header)))
-+#define EXT_FIRST_INDEX(__hdr__) \
-+	((struct ext3_extent_idx *) (((char *) (__hdr__)) +	\
-+				     sizeof(struct ext3_extent_header)))
-+#define EXT_HAS_FREE_INDEX(__path__) \
-+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
-+#define EXT_LAST_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_LAST_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_MAX_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_MAX_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_HDR_GEN(__hdr__)	((__hdr__)->eh_generation & 0x00ffffff)
-+#define EXT_FLAGS(__hdr__)	((__hdr__)->eh_generation >> 24)
-+#define EXT_FLAGS_CLR_UNKNOWN	0x7	/* Flags cleared on modification */
-+
-+#define EXT_BLOCK_HDR(__bh__) 	((struct ext3_extent_header *)(__bh__)->b_data)
-+#define EXT_ROOT_HDR(__tree__)	((struct ext3_extent_header *)(__tree__)->root)
-+#define EXT_DEPTH(__tree__)	(EXT_ROOT_HDR(__tree__)->eh_depth)
-+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__))
-+
-+#define EXT_ASSERT(__x__) if (!(__x__)) BUG();
-+
-+#define EXT_CHECK_PATH(tree,path)					\
-+{									\
-+	int depth = EXT_DEPTH(tree);					\
-+	BUG_ON((unsigned long) (path) < __PAGE_OFFSET);			\
-+	BUG_ON((unsigned long) (path)[depth].p_idx <			\
-+			__PAGE_OFFSET && (path)[depth].p_idx != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_ext <			\
-+			__PAGE_OFFSET && (path)[depth].p_ext != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET);	\
-+	BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET	\
-+			&& depth != 0);					\
-+	BUG_ON((path)[0].p_depth != depth);				\
-+}
-+
-+
-+/*
-+ * this structure is used to gather extents from the tree via ioctl
-+ */
-+struct ext3_extent_buf {
-+	unsigned long start;
-+	int buflen;
-+	void *buffer;
-+	void *cur;
-+	int err;
-+};
-+
-+/*
-+ * this structure is used to collect stats info about the tree
-+ */
-+struct ext3_extent_tree_stats {
-+	int depth;
-+	int extents_num;
-+	int leaf_num;
-+};
-+
-+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *);
-+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *);
-+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *);
-+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *);
-+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback);
-+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
-+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
-+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int);
-+
-+static inline void
-+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree)
-+{
-+	if (tree->cex)
-+		tree->cex->ec_type = EXT3_EXT_CACHE_NO;
-+}
-+
-+
-+#endif /* _LINUX_EXT3_EXTENTS */
-Index: linux-stage/include/linux/ext3_fs_i.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs_i.h	2006-07-16 13:55:30.000000000 +0800
-+++ linux-stage/include/linux/ext3_fs_i.h	2006-07-16 14:10:20.000000000 +0800
-@@ -142,6 +142,8 @@ struct ext3_inode_info {
- 	 */
- 	struct mutex truncate_mutex;
- 	struct inode vfs_inode;
-+
-+	__u32 i_cached_extent[4];
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch
deleted file mode 100644
index b6c37c15ac5244d3299e6515b4b539adacc8591a..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.5.patch
+++ /dev/null
@@ -1,2951 +0,0 @@
-%patch
-Index: linux-2.6.5-sles9/fs/ext3/extents.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/extents.c	2005-02-17 22:07:57.023609040 +0300
-+++ linux-2.6.5-sles9/fs/ext3/extents.c	2005-02-23 01:02:37.396435640 +0300
-@@ -0,0 +1,2361 @@
-+/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+/*
-+ * Extents support for EXT3
-+ *
-+ * TODO:
-+ *   - ext3_ext_walk_space() sould not use ext3_ext_find_extent()
-+ *   - ext3_ext_calc_credits() could take 'mergable' into account
-+ *   - ext3*_error() should be used in some situations
-+ *   - find_goal() [to be tested and improved]
-+ *   - smart tree reduction
-+ *   - arch-independence
-+ *     common on-disk format for big/little-endian arch
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/fs.h>
-+#include <linux/time.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/smp_lock.h>
-+#include <linux/highuid.h>
-+#include <linux/pagemap.h>
-+#include <linux/quotaops.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/ext3_extents.h>
-+#include <asm/uaccess.h>
-+
-+
-+static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
-+{
-+	if (eh->eh_magic != EXT3_EXT_MAGIC) {
-+		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
-+		       (unsigned)eh->eh_magic);
-+		return -EIO;
-+	}
-+	if (eh->eh_max == 0) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
-+		       (unsigned)eh->eh_max);
-+		return -EIO;
-+	}
-+	if (eh->eh_entries > eh->eh_max) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
-+		       (unsigned)eh->eh_entries);
-+		return -EIO;
-+	}
-+	return 0;
-+}
-+
-+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
-+{
-+	int err;
-+
-+	if (handle->h_buffer_credits > needed)
-+		return handle;
-+	if (!ext3_journal_extend(handle, needed))
-+		return handle;
-+	err = ext3_journal_restart(handle, needed);
-+	
-+	return handle;
-+}
-+
-+static int inline
-+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->get_write_access)
-+		return tree->ops->get_write_access(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+static int inline
-+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->mark_buffer_dirty)
-+		return tree->ops->mark_buffer_dirty(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ */
-+static int ext3_ext_get_access(handle_t *handle,
-+			       struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+	int err;
-+
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err = ext3_journal_get_write_access(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_get_access_for_root(handle, tree);
-+	}
-+	return err;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ *  - EIO
-+ */
-+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path)
-+{
-+	int err;
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err =ext3_journal_dirty_metadata(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_mark_root_dirty(handle, tree);
-+	}
-+	return err;
-+}
-+
-+static int inline
-+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, struct ext3_extent *ex,
-+		   int *err)
-+{
-+	int goal, depth, newblock;
-+	struct inode *inode;
-+
-+	EXT_ASSERT(tree);
-+	if (tree->ops->new_block)
-+		return tree->ops->new_block(handle, tree, path, ex, err);
-+
-+	inode = tree->inode;
-+	depth = EXT_DEPTH(tree);
-+	if (path && depth > 0) {
-+		goal = path[depth-1].p_block;
-+	} else {
-+		struct ext3_inode_info *ei = EXT3_I(inode);
-+		unsigned long bg_start;
-+		unsigned long colour;
-+
-+		bg_start = (ei->i_block_group *
-+			    EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+			le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+		colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+		goal = bg_start + colour;
-+	}
-+
-+	newblock = ext3_new_block(handle, inode, goal, err);
-+	return newblock;
-+}
-+
-+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *neh = EXT_ROOT_HDR(tree);
-+	neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) << 24) |
-+			     (EXT_HDR_GEN(neh) + 1);
-+}
-+
-+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 6;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 5;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 3;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 4;
-+#endif
-+	return size;
-+}
-+
-+static void ext3_ext_show_path(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int k, l = path->p_depth;
-+
-+	ext_debug(tree, "path:");
-+	for (k = 0; k <= l; k++, path++) {
-+		if (path->p_idx) {
-+			ext_debug(tree, "  %d->%d", path->p_idx->ei_block,
-+				  path->p_idx->ei_leaf);
-+		} else if (path->p_ext) {
-+			ext_debug(tree, "  %d:%d:%d",
-+				  path->p_ext->ee_block,
-+				  path->p_ext->ee_len,
-+				  path->p_ext->ee_start);
-+		} else
-+			ext_debug(tree, "  []");
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *eh;
-+	struct ext3_extent *ex;
-+	int i;
-+
-+	if (!path)
-+		return;
-+
-+	eh = path[depth].p_hdr;
-+	ex = EXT_FIRST_EXTENT(eh);
-+
-+	for (i = 0; i < eh->eh_entries; i++, ex++) {
-+		ext_debug(tree, "%d:%d:%d ",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_drop_refs(struct ext3_ext_path *path)
-+{
-+	int depth = path->p_depth;
-+	int i;
-+
-+	for (i = 0; i <= depth; i++, path++) {
-+		if (path->p_bh) {
-+			brelse(path->p_bh);
-+			path->p_bh = NULL;
-+		}
-+	}
-+}
-+
-+/*
-+ * binary search for closest index by given block
-+ */
-+static inline void
-+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree,
-+		       struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent_idx *ix;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_entries > 0);
-+
-+	ext_debug(tree, "binsearch for %d(idx):  ", block);
-+
-+	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ix[l + k].ei_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ix += l;
-+	path->p_idx = ix;
-+	ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf);
-+
-+	while (l++ < r) {
-+		if (block < ix->ei_block) 
-+			break;
-+		path->p_idx = ix++;
-+	}
-+	ext_debug(tree, "  -> %d->%d\n", path->p_idx->ei_block,
-+		  path->p_idx->ei_leaf);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent_idx *chix;
-+
-+		chix = ix = EXT_FIRST_INDEX(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ix++) {
-+			if (k != 0 && ix->ei_block <= ix[-1].ei_block) {
-+				printk("k=%d, ix=0x%p, first=0x%p\n", k,
-+				       ix, EXT_FIRST_INDEX(eh));
-+				printk("%u <= %u\n",
-+				       ix->ei_block,ix[-1].ei_block);
-+			}
-+			EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block);
-+			if (block < ix->ei_block) 
-+				break;
-+			chix = ix;
-+		}
-+		EXT_ASSERT(chix == path->p_idx);
-+	}
-+#endif
-+}
-+
-+/*
-+ * binary search for closest extent by given block
-+ */
-+static inline void
-+ext3_ext_binsearch(struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent *ex;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+
-+	if (eh->eh_entries == 0) {
-+		/*
-+		 * this leaf is empty yet:
-+		 *  we get such a leaf in split/add case
-+		 */
-+		return;
-+	}
-+	
-+	ext_debug(tree, "binsearch for %d:  ", block);
-+
-+	path->p_ext = ex = EXT_FIRST_EXTENT(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ex[l + k].ee_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ex += l;
-+	path->p_ext = ex;
-+	ext_debug(tree, "  -> %d:%d:%d ", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+	while (l++ < r) {
-+		if (block < ex->ee_block) 
-+			break;
-+		path->p_ext = ex++;
-+	}
-+	ext_debug(tree, "  -> %d:%d:%d\n", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent *chex;
-+
-+		chex = ex = EXT_FIRST_EXTENT(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ex++) {
-+			EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block);
-+			if (block < ex->ee_block) 
-+				break;
-+			chex = ex;
-+		}
-+		EXT_ASSERT(chex == path->p_ext);
-+	}
-+#endif
-+}
-+
-+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *eh;
-+
-+	BUG_ON(tree->buffer_len == 0);
-+	ext3_ext_get_access_for_root(handle, tree);
-+	eh = EXT_ROOT_HDR(tree);
-+	eh->eh_depth = 0;
-+	eh->eh_entries = 0;
-+	eh->eh_magic = EXT3_EXT_MAGIC;
-+	eh->eh_max = ext3_ext_space_root(tree);
-+	ext3_ext_mark_root_dirty(handle, tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return 0;
-+}
-+
-+struct ext3_ext_path *
-+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block,
-+		     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	struct buffer_head *bh;
-+	int depth, i, ppos = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	eh = EXT_ROOT_HDR(tree);
-+	EXT_ASSERT(eh);
-+	if (ext3_ext_check_header(eh)) {
-+		/* don't free previously allocated path
-+		 * -- caller should take care */
-+		path = NULL;
-+		goto err;
-+	}
-+
-+	i = depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* account possible depth increase */
-+	if (!path) {
-+		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-+			       GFP_NOFS);
-+		if (!path)
-+			return ERR_PTR(-ENOMEM);
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[0].p_hdr = eh;
-+
-+	/* walk through the tree */
-+	while (i) {
-+		ext_debug(tree, "depth %d: num %d, max %d\n",
-+			  ppos, eh->eh_entries, eh->eh_max);
-+		ext3_ext_binsearch_idx(tree, path + ppos, block);
-+		path[ppos].p_block = path[ppos].p_idx->ei_leaf;
-+		path[ppos].p_depth = i;
-+		path[ppos].p_ext = NULL;
-+
-+		bh = sb_bread(tree->inode->i_sb, path[ppos].p_block);
-+		if (!bh)
-+			goto err;
-+
-+		eh = EXT_BLOCK_HDR(bh);
-+		ppos++;
-+		EXT_ASSERT(ppos <= depth);
-+		path[ppos].p_bh = bh;
-+		path[ppos].p_hdr = eh;
-+		i--;
-+
-+		if (ext3_ext_check_header(eh))
-+			goto err;
-+	}
-+
-+	path[ppos].p_depth = i;
-+	path[ppos].p_hdr = eh;
-+	path[ppos].p_ext = NULL;
-+	path[ppos].p_idx = NULL;
-+
-+	if (ext3_ext_check_header(eh))
-+		goto err;
-+
-+	/* find extent */
-+	ext3_ext_binsearch(tree, path + ppos, block);
-+
-+	ext3_ext_show_path(tree, path);
-+
-+	return path;
-+
-+err:
-+	printk(KERN_ERR "EXT3-fs: header is corrupted!\n");
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	return ERR_PTR(-EIO);
-+}
-+
-+/*
-+ * insert new index [logical;ptr] into the block at cupr
-+ * it check where to insert: before curp or after curp
-+ */
-+static int ext3_ext_insert_index(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *curp,
-+				 int logical, int ptr)
-+{
-+	struct ext3_extent_idx *ix;
-+	int len, err;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		return err;
-+
-+	EXT_ASSERT(logical != curp->p_idx->ei_block);
-+	len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx;
-+	if (logical > curp->p_idx->ei_block) {
-+		/* insert after */
-+		if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
-+			len = (len - 1) * sizeof(struct ext3_extent_idx);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert new index %d after: %d. "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  logical, ptr, len,
-+				  (curp->p_idx + 1), (curp->p_idx + 2));
-+			memmove(curp->p_idx + 2, curp->p_idx + 1, len);
-+		}
-+		ix = curp->p_idx + 1;
-+	} else {
-+		/* insert before */
-+		len = len * sizeof(struct ext3_extent_idx);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert new index %d before: %d. "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  logical, ptr, len,
-+			  curp->p_idx, (curp->p_idx + 1));
-+		memmove(curp->p_idx + 1, curp->p_idx, len);
-+		ix = curp->p_idx;
-+	}
-+
-+	ix->ei_block = logical;
-+	ix->ei_leaf = ptr;
-+	ix->ei_leaf_hi = ix->ei_unused = 0;
-+	curp->p_hdr->eh_entries++;
-+
-+	EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
-+	EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
-+
-+	err = ext3_ext_dirty(handle, tree, curp);
-+	ext3_std_error(tree->inode->i_sb, err);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine inserts new subtree into the path, using free index entry
-+ * at depth 'at:
-+ *  - allocates all needed blocks (new leaf and all intermediate index blocks)
-+ *  - makes decision where to split
-+ *  - moves remaining extens and index entries (right to the split point)
-+ *    into the newly allocated blocks
-+ *  - initialize subtree
-+ */
-+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_extent *newext, int at)
-+{
-+	struct buffer_head *bh = NULL;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct ext3_extent *ex;
-+	int i = at, k, m, a;
-+	unsigned long newblock, oldblock, border;
-+	int *ablocks = NULL; /* array of allocated blocks */
-+	int err = 0;
-+
-+	/* make decision: where to split? */
-+	/* FIXME: now desicion is simplest: at current extent */
-+
-+	/* if current leaf will be splitted, then we should use 
-+	 * border from split point */
-+	EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
-+	if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		border = path[depth].p_ext[1].ee_block;
-+		ext_debug(tree, "leaf will be splitted."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	} else {
-+		border = newext->ee_block;
-+		ext_debug(tree, "leaf will be added."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	}
-+
-+	/* 
-+	 * if error occurs, then we break processing
-+	 * and turn filesystem read-only. so, index won't
-+	 * be inserted and tree will be in consistent
-+	 * state. next mount will repair buffers too
-+	 */
-+
-+	/*
-+	 * get array to track all allocated blocks
-+	 * we need this to handle errors and free blocks
-+	 * upon them
-+	 */
-+	ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS);
-+	if (!ablocks)
-+		return -ENOMEM;
-+	memset(ablocks, 0, sizeof(unsigned long) * depth);
-+
-+	/* allocate all needed blocks */
-+	ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at);
-+	for (a = 0; a < depth - at; a++) {
-+		newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+		if (newblock == 0)
-+			goto cleanup;
-+		ablocks[a] = newblock;
-+	}
-+
-+	/* initialize new leaf */
-+	newblock = ablocks[--a];
-+	EXT_ASSERT(newblock);
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		goto cleanup;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh)))
-+		goto cleanup;
-+
-+	neh = EXT_BLOCK_HDR(bh);
-+	neh->eh_entries = 0;
-+	neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	neh->eh_depth = 0;
-+	ex = EXT_FIRST_EXTENT(neh);
-+
-+	/* move remain of path[depth] to the new leaf */
-+	EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max);
-+	/* start copy from next extent */
-+	/* TODO: we could do it by single memmove */
-+	m = 0;
-+	path[depth].p_ext++;
-+	while (path[depth].p_ext <=
-+			EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		ext_debug(tree, "move %d:%d:%d in new leaf %lu\n",
-+			  path[depth].p_ext->ee_block,
-+			  path[depth].p_ext->ee_start,
-+			  path[depth].p_ext->ee_len,
-+			  newblock);
-+		memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent));
-+		neh->eh_entries++;
-+		m++;
-+	}
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto cleanup;	
-+	brelse(bh);
-+	bh = NULL;
-+
-+	/* correct old leaf */
-+	if (m) {
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			goto cleanup;
-+		path[depth].p_hdr->eh_entries -= m;
-+		if ((err = ext3_ext_dirty(handle, tree, path + depth)))
-+			goto cleanup;
-+		
-+	}
-+
-+	/* create intermediate indexes */
-+	k = depth - at - 1;
-+	EXT_ASSERT(k >= 0);
-+	if (k)
-+		ext_debug(tree,	"create %d intermediate indices\n", k);
-+	/* insert new index into current index block */
-+	/* current depth stored in i var */
-+	i = depth - 1;
-+	while (k--) {
-+		oldblock = newblock;
-+		newblock = ablocks[--a];
-+		bh = sb_getblk(tree->inode->i_sb, newblock);
-+		if (!bh) {
-+			err = -EIO;
-+			goto cleanup;
-+		}
-+		lock_buffer(bh);
-+
-+		if ((err = ext3_journal_get_create_access(handle, bh)))
-+			goto cleanup;
-+
-+		neh = EXT_BLOCK_HDR(bh);
-+		neh->eh_entries = 1;
-+		neh->eh_magic = EXT3_EXT_MAGIC;
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+		neh->eh_depth = depth - i; 
-+		fidx = EXT_FIRST_INDEX(neh);
-+		fidx->ei_block = border;
-+		fidx->ei_leaf = oldblock;
-+		fidx->ei_leaf_hi = fidx->ei_unused = 0;
-+
-+		ext_debug(tree,	"int.index at %d (block %lu): %lu -> %lu\n",
-+			  i, newblock, border, oldblock);
-+		/* copy indexes */
-+		m = 0;
-+		path[i].p_idx++;
-+
-+		ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
-+			  EXT_MAX_INDEX(path[i].p_hdr));
-+		EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
-+			   EXT_LAST_INDEX(path[i].p_hdr));
-+		while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
-+			ext_debug(tree, "%d: move %d:%d in new index %lu\n",
-+				  i, path[i].p_idx->ei_block,
-+				  path[i].p_idx->ei_leaf, newblock);
-+			memmove(++fidx, path[i].p_idx++,
-+				sizeof(struct ext3_extent_idx));
-+			neh->eh_entries++;
-+			EXT_ASSERT(neh->eh_entries <= neh->eh_max);
-+			m++;
-+		}
-+		set_buffer_uptodate(bh);
-+		unlock_buffer(bh);
-+
-+		if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+			goto cleanup;
-+		brelse(bh);
-+		bh = NULL;
-+
-+		/* correct old index */
-+		if (m) {
-+			err = ext3_ext_get_access(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+			path[i].p_hdr->eh_entries -= m;
-+			err = ext3_ext_dirty(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+		}
-+
-+		i--;
-+	}
-+
-+	/* insert new index */
-+	if (!err)
-+		err = ext3_ext_insert_index(handle, tree, path + at,
-+					    border, newblock);
-+
-+cleanup:
-+	if (bh) {
-+		if (buffer_locked(bh))
-+			unlock_buffer(bh);
-+		brelse(bh);
-+	}
-+
-+	if (err) {
-+		/* free all allocated blocks in error case */
-+		for (i = 0; i < depth; i++) {
-+			if (!ablocks[i])
-+				continue;
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+		}
-+	}
-+	kfree(ablocks);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine implements tree growing procedure:
-+ *  - allocates new block
-+ *  - moves top-level data (index block or leaf) into the new block
-+ *  - initialize new top-level, creating index that points to the
-+ *    just created block
-+ */
-+static int ext3_ext_grow_indepth(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *path,
-+				 struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp = path;
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct buffer_head *bh;
-+	unsigned long newblock;
-+	int err = 0;
-+
-+	newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+	if (newblock == 0)
-+		return err;
-+
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		ext3_std_error(tree->inode->i_sb, err);
-+		return err;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh))) {
-+		unlock_buffer(bh);
-+		goto out;	
-+	}
-+
-+	/* move top-level index/leaf into new block */
-+	memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
-+
-+	/* set size of new block */
-+	neh = EXT_BLOCK_HDR(bh);
-+	/* old root could have indexes or leaves
-+	 * so calculate eh_max right way */
-+	if (EXT_DEPTH(tree))
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+	else
-+		neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto out;
-+
-+	/* create index in new top-level index: num,max,pointer */
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		goto out;
-+
-+	curp->p_hdr->eh_magic = EXT3_EXT_MAGIC;
-+	curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree);
-+	curp->p_hdr->eh_entries = 1;
-+	curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
-+	/* FIXME: it works, but actually path[0] can be index */
-+	curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
-+	curp->p_idx->ei_leaf = newblock;
-+	curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
-+
-+	neh = EXT_ROOT_HDR(tree);
-+	fidx = EXT_FIRST_INDEX(neh);
-+	ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n",
-+		  neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); 
-+
-+	neh->eh_depth = path->p_depth + 1;
-+	err = ext3_ext_dirty(handle, tree, curp);
-+out:
-+	brelse(bh);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine finds empty index and adds new leaf. if no free index found
-+ * then it requests in-depth growing
-+ */
-+static int ext3_ext_create_new_leaf(handle_t *handle,
-+				    struct ext3_extents_tree *tree,
-+				    struct ext3_ext_path *path,
-+				    struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp;
-+	int depth, i, err = 0;
-+
-+repeat:
-+	i = depth = EXT_DEPTH(tree);
-+	
-+	/* walk up to the tree and look for free index entry */
-+	curp = path + depth;
-+	while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) {
-+		i--;
-+		curp--;
-+	}
-+
-+	/* we use already allocated block for index block
-+	 * so, subsequent data blocks should be contigoues */
-+	if (EXT_HAS_FREE_INDEX(curp)) {
-+		/* if we found index with free entry, then use that
-+		 * entry: create all needed subtree and add new leaf */
-+		err = ext3_ext_split(handle, tree, path, newext, i);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+	} else {
-+		/* tree is full, time to grow in depth */
-+		err = ext3_ext_grow_indepth(handle, tree, path, newext);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+
-+		/*
-+		 * only first (depth 0 -> 1) produces free space
-+		 * in all other cases we have to split growed tree
-+		 */
-+		depth = EXT_DEPTH(tree);
-+		if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) {
-+			/* now we need split */
-+			goto repeat;
-+		}
-+	}
-+
-+	if (err)
-+		return err;
-+
-+	return 0;
-+}
-+
-+/*
-+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK
-+ * NOTE: it consider block number from index entry as
-+ * allocated block. thus, index entries have to be consistent
-+ * with leafs
-+ */
-+static unsigned long
-+ext3_ext_next_allocated_block(struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	if (depth == 0 && path->p_ext == NULL)
-+		return EXT_MAX_BLOCK;
-+
-+	/* FIXME: what if index isn't full ?! */
-+	while (depth >= 0) {
-+		if (depth == path->p_depth) {
-+			/* leaf */
-+			if (path[depth].p_ext !=
-+			    EXT_LAST_EXTENT(path[depth].p_hdr))
-+				return path[depth].p_ext[1].ee_block;
-+		} else {
-+			/* index */
-+			if (path[depth].p_idx !=
-+			    EXT_LAST_INDEX(path[depth].p_hdr))
-+				return path[depth].p_idx[1].ei_block;
-+		}
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * returns first allocated block from next leaf or EXT_MAX_BLOCK
-+ */
-+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree,
-+					 struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	/* zero-tree has no leaf blocks at all */
-+	if (depth == 0)
-+		return EXT_MAX_BLOCK;
-+
-+	/* go to index block */
-+	depth--;
-+	
-+	while (depth >= 0) {
-+		if (path[depth].p_idx !=
-+		    EXT_LAST_INDEX(path[depth].p_hdr))
-+			return path[depth].p_idx[1].ei_block;
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * if leaf gets modified and modified extent is first in the leaf
-+ * then we have to correct all indexes above
-+ * TODO: do we need to correct tree in all cases?
-+ */
-+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	int depth = EXT_DEPTH(tree);	
-+	struct ext3_extent *ex;
-+	unsigned long border;
-+	int k, err = 0;
-+	
-+	eh = path[depth].p_hdr;
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(eh);
-+	
-+	if (depth == 0) {
-+		/* there is no tree at all */
-+		return 0;
-+	}
-+	
-+	if (ex != EXT_FIRST_EXTENT(eh)) {
-+		/* we correct tree if first leaf got modified only */
-+		return 0;
-+	}
-+	
-+	/*
-+	 * TODO: we need correction if border is smaller then current one
-+	 */
-+	k = depth - 1;
-+	border = path[depth].p_ext->ee_block;
-+	if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+		return err;
-+	path[k].p_idx->ei_block = border;
-+	if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+		return err;
-+
-+	while (k--) {
-+		/* change all left-side indexes */
-+		if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr))
-+			break;
-+		if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+			break;
-+		path[k].p_idx->ei_block = border;
-+		if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+			break;
-+	}
-+
-+	return err;
-+}
-+
-+static int inline
-+ext3_can_extents_be_merged(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex1,
-+			   struct ext3_extent *ex2)
-+{
-+	if (ex1->ee_block + ex1->ee_len != ex2->ee_block)
-+		return 0;
-+
-+#ifdef AGRESSIVE_TEST
-+	if (ex1->ee_len >= 4)
-+		return 0;
-+#endif
-+
-+	if (!tree->ops->mergable)
-+		return 1;
-+
-+	return tree->ops->mergable(ex1, ex2);
-+}
-+
-+/*
-+ * this routine tries to merge requsted extent into the existing
-+ * extent or inserts requested extent as new one into the tree,
-+ * creating new leaf in no-space case
-+ */
-+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree,
-+			   struct ext3_ext_path *path,
-+			   struct ext3_extent *newext)
-+{
-+	struct ext3_extent_header * eh;
-+	struct ext3_extent *ex, *fex;
-+	struct ext3_extent *nearex; /* nearest extent */
-+	struct ext3_ext_path *npath = NULL;
-+	int depth, len, err, next;
-+
-+	EXT_ASSERT(newext->ee_len > 0);
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(path[depth].p_hdr);
-+
-+	/* try to insert block into found extent and return */
-+	if (ex && ext3_can_extents_be_merged(tree, ex, newext)) {
-+		ext_debug(tree, "append %d block to %d:%d (from %d)\n",
-+			  newext->ee_len, ex->ee_block, ex->ee_len,
-+			  ex->ee_start);
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			return err;
-+		ex->ee_len += newext->ee_len;
-+		eh = path[depth].p_hdr;
-+		nearex = ex;
-+		goto merge;
-+	}
-+
-+repeat:
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+	if (eh->eh_entries < eh->eh_max)
-+		goto has_space;
-+
-+	/* probably next leaf has space for us? */
-+	fex = EXT_LAST_EXTENT(eh);
-+	next = ext3_ext_next_leaf_block(tree, path);
-+	if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) {
-+		ext_debug(tree, "next leaf block - %d\n", next);
-+		EXT_ASSERT(!npath);
-+		npath = ext3_ext_find_extent(tree, next, NULL);
-+		if (IS_ERR(npath))
-+			return PTR_ERR(npath);
-+		EXT_ASSERT(npath->p_depth == path->p_depth);
-+		eh = npath[depth].p_hdr;
-+		if (eh->eh_entries < eh->eh_max) {
-+			ext_debug(tree,	"next leaf isnt full(%d)\n",
-+				  eh->eh_entries);
-+			path = npath;
-+			goto repeat;
-+		}
-+		ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
-+			  eh->eh_entries, eh->eh_max);
-+	}
-+
-+	/*
-+	 * there is no free space in found leaf
-+	 * we're gonna add new leaf in the tree
-+	 */
-+	err = ext3_ext_create_new_leaf(handle, tree, path, newext);
-+	if (err)
-+		goto cleanup;
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+
-+has_space:
-+	nearex = path[depth].p_ext;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+		goto cleanup;
-+
-+	if (!nearex) {
-+		/* there is no extent in this leaf, create first one */
-+		ext_debug(tree, "first extent in the leaf: %d:%d:%d\n",
-+			  newext->ee_block, newext->ee_start,
-+			  newext->ee_len);
-+		path[depth].p_ext = EXT_FIRST_EXTENT(eh);
-+	} else if (newext->ee_block > nearex->ee_block) {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		if (nearex != EXT_LAST_EXTENT(eh)) {
-+			len = EXT_MAX_EXTENT(eh) - nearex;
-+			len = (len - 1) * sizeof(struct ext3_extent);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  newext->ee_block, newext->ee_start,
-+				  newext->ee_len,
-+				  nearex, len, nearex + 1, nearex + 2);
-+			memmove(nearex + 2, nearex + 1, len);
-+		}
-+		path[depth].p_ext = nearex + 1;
-+	} else {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  newext->ee_block, newext->ee_start, newext->ee_len,
-+			  nearex, len, nearex + 1, nearex + 2);
-+		memmove(nearex + 1, nearex, len);
-+		path[depth].p_ext = nearex;
-+	}
-+
-+	eh->eh_entries++;
-+	nearex = path[depth].p_ext;
-+	nearex->ee_block = newext->ee_block;
-+	nearex->ee_start = newext->ee_start;
-+	nearex->ee_len = newext->ee_len;
-+	/* FIXME: support for large fs */
-+	nearex->ee_start_hi = 0;
-+
-+merge:
-+	/* try to merge extents to the right */
-+	while (nearex < EXT_LAST_EXTENT(eh)) {
-+		if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1))
-+			break;
-+		/* merge with next extent! */
-+		nearex->ee_len += nearex[1].ee_len;
-+		if (nearex + 1 < EXT_LAST_EXTENT(eh)) {
-+			len = (EXT_LAST_EXTENT(eh) - nearex - 1) *
-+				sizeof(struct ext3_extent);
-+			memmove(nearex + 1, nearex + 2, len);
-+		}
-+		eh->eh_entries--;
-+		EXT_ASSERT(eh->eh_entries > 0);
-+	}
-+
-+	/* try to merge extents to the left */
-+
-+	/* time to correct all indexes above */
-+	err = ext3_ext_correct_indexes(handle, tree, path);
-+	if (err)
-+		goto cleanup;
-+
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+
-+cleanup:
-+	if (npath) {
-+		ext3_ext_drop_refs(npath);
-+		kfree(npath);
-+	}
-+	ext3_ext_tree_changed(tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return err;
-+}
-+
-+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block,
-+			unsigned long num, ext_prepare_callback func)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_ext_cache cbex;
-+	struct ext3_extent *ex;
-+	unsigned long next, start = 0, end = 0;
-+	unsigned long last = block + num;
-+	int depth, exists, err = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(func);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	while (block < last && block != EXT_MAX_BLOCK) {
-+		num = last - block;
-+		/* find extent for this block */
-+		path = ext3_ext_find_extent(tree, block, path);
-+		if (IS_ERR(path)) {
-+			err = PTR_ERR(path);
-+			path = NULL;
-+			break;
-+		}
-+
-+		depth = EXT_DEPTH(tree);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		ex = path[depth].p_ext;
-+		next = ext3_ext_next_allocated_block(path);
-+
-+		exists = 0;
-+		if (!ex) {
-+			/* there is no extent yet, so try to allocate
-+			 * all requested space */
-+			start = block;
-+			end = block + num;
-+		} else if (ex->ee_block > block) {
-+			/* need to allocate space before found extent */
-+			start = block;
-+			end = ex->ee_block;
-+			if (block + num < end)
-+				end = block + num;
-+		} else if (block >= ex->ee_block + ex->ee_len) {
-+			/* need to allocate space after found extent */
-+			start = block;
-+			end = block + num;
-+			if (end >= next)
-+				end = next;
-+		} else if (block >= ex->ee_block) {
-+			/* 
-+			 * some part of requested space is covered
-+			 * by found extent
-+			 */
-+			start = block;
-+			end = ex->ee_block + ex->ee_len;
-+			if (block + num < end)
-+				end = block + num;
-+			exists = 1;
-+		} else {
-+			BUG();
-+		}
-+		EXT_ASSERT(end > start);
-+
-+		if (!exists) {
-+			cbex.ec_block = start;
-+			cbex.ec_len = end - start;
-+			cbex.ec_start = 0;
-+			cbex.ec_type = EXT3_EXT_CACHE_GAP;
-+		} else {
-+			cbex.ec_block = ex->ee_block;
-+			cbex.ec_len = ex->ee_len;
-+			cbex.ec_start = ex->ee_start;
-+			cbex.ec_type = EXT3_EXT_CACHE_EXTENT;
-+		}
-+
-+		EXT_ASSERT(cbex.ec_len > 0);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		err = func(tree, path, &cbex);
-+		ext3_ext_drop_refs(path);
-+
-+		if (err < 0)
-+			break;
-+		if (err == EXT_REPEAT)
-+			continue;
-+		else if (err == EXT_BREAK) {
-+			err = 0;
-+			break;
-+		}
-+
-+		if (EXT_DEPTH(tree) != depth) {
-+			/* depth was changed. we have to realloc path */
-+			kfree(path);
-+			path = NULL;
-+		}
-+
-+		block = cbex.ec_block + cbex.ec_len;
-+	}
-+
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+
-+	return err;
-+}
-+
-+static inline void
-+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block,
-+		      __u32 len, __u32 start, int type)
-+{
-+	EXT_ASSERT(len > 0);
-+	if (tree->cex) {
-+		tree->cex->ec_type = type;
-+		tree->cex->ec_block = block;
-+		tree->cex->ec_len = len;
-+		tree->cex->ec_start = start;
-+	}
-+}
-+
-+/*
-+ * this routine calculate boundaries of the gap requested block fits into
-+ * and cache this gap
-+ */
-+static inline void
-+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  unsigned long block)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	unsigned long lblock, len;
-+	struct ext3_extent *ex;
-+
-+	if (!tree->cex)
-+		return;
-+
-+	ex = path[depth].p_ext;
-+	if (ex == NULL) {
-+		/* there is no extent yet, so gap is [0;-] */
-+		lblock = 0;
-+		len = EXT_MAX_BLOCK;
-+		ext_debug(tree, "cache gap(whole file):");
-+	} else if (block < ex->ee_block) {
-+		lblock = block;
-+		len = ex->ee_block - block;
-+		ext_debug(tree, "cache gap(before): %lu [%lu:%lu]",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len);
-+	} else if (block >= ex->ee_block + ex->ee_len) {
-+		lblock = ex->ee_block + ex->ee_len;
-+		len = ext3_ext_next_allocated_block(path);
-+		ext_debug(tree, "cache gap(after): [%lu:%lu] %lu",
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) block);
-+		EXT_ASSERT(len > lblock);
-+		len = len - lblock;
-+	} else {
-+		lblock = len = 0;
-+		BUG();
-+	}
-+
-+	ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len);
-+	ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP);
-+}
-+
-+static inline int
-+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block,
-+		  struct ext3_extent *ex)
-+{
-+	struct ext3_ext_cache *cex = tree->cex;
-+
-+	/* is there cache storage at all? */
-+	if (!cex)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	/* has cache valid data? */
-+	if (cex->ec_type == EXT3_EXT_CACHE_NO)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP ||
-+		   cex->ec_type == EXT3_EXT_CACHE_EXTENT);
-+	if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
-+		ex->ee_block = cex->ec_block;
-+		ex->ee_start = cex->ec_start;
-+		ex->ee_start_hi = 0;
-+		ex->ee_len = cex->ec_len;
-+		ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) ex->ee_start);
-+		return cex->ec_type;
-+	}
-+
-+	/* not in cache */
-+	return EXT3_EXT_CACHE_NO;
-+}
-+
-+/*
-+ * routine removes index from the index block
-+ * it's used in truncate case only. thus all requests are for
-+ * last index in the block only
-+ */
-+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree,
-+		    struct ext3_ext_path *path)
-+{
-+	struct buffer_head *bh;
-+	int err;
-+	
-+	/* free index block */
-+	path--;
-+	EXT_ASSERT(path->p_hdr->eh_entries);
-+	if ((err = ext3_ext_get_access(handle, tree, path)))
-+		return err;
-+	path->p_hdr->eh_entries--;
-+	if ((err = ext3_ext_dirty(handle, tree, path)))
-+		return err;
-+	ext_debug(tree, "index is empty, remove it, free block %d\n",
-+		  path->p_idx->ei_leaf);
-+	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
-+	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	return err;
-+}
-+
-+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree,
-+				     struct ext3_ext_path *path)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	int needed;
-+
-+	if (path) {
-+		/* probably there is space in leaf? */
-+		if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max)
-+			return 1;
-+	}
-+	
-+	/*
-+	 * the worste case we're expecting is creation of the
-+	 * new root (growing in depth) with index splitting
-+	 * for splitting we have to consider depth + 1 because
-+	 * previous growing could increase it
-+	 */
-+	depth = depth + 1;
-+
-+	/* 
-+	 * growing in depth:
-+	 * block allocation + new root + old root
-+	 */
-+	needed = EXT3_ALLOC_NEEDED + 2;
-+
-+	/* index split. we may need:
-+	 *   allocate intermediate indexes and new leaf
-+	 *   change two blocks at each level, but root
-+	 *   modify root block (inode)
-+	 */
-+	needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1;
-+
-+	return needed;
-+}
-+
-+static int
-+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree,
-+		      struct ext3_ext_path *path, unsigned long start,
-+		      unsigned long end)
-+{
-+	struct ext3_extent *ex, tex;
-+	struct ext3_ext_path *npath;
-+	int depth, creds, err;
-+
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1);
-+	EXT_ASSERT(ex->ee_block < start);
-+
-+	/* calculate tail extent */
-+	tex.ee_block = end + 1;
-+	EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len);
-+	tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block;
-+
-+	creds = ext3_ext_calc_credits_for_insert(tree, path);
-+	handle = ext3_ext_journal_restart(handle, creds);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	
-+	/* calculate head extent. use primary extent */
-+	err = ext3_ext_get_access(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+	ex->ee_len = start - ex->ee_block;
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+
-+	/* FIXME: some callback to free underlying resource
-+	 * and correct ee_start? */
-+	ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n",
-+		  ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len);
-+
-+	npath = ext3_ext_find_extent(tree, ex->ee_block, NULL);
-+	if (IS_ERR(npath))
-+		return PTR_ERR(npath);
-+	depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block);
-+	EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len);
-+
-+	err = ext3_ext_insert_extent(handle, tree, npath, &tex);
-+	ext3_ext_drop_refs(npath);
-+	kfree(npath);
-+
-+	return err;
-+}
-+
-+static int
-+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree,
-+		 struct ext3_ext_path *path, unsigned long start,
-+		 unsigned long end)
-+{
-+	struct ext3_extent *ex, *fu = NULL, *lu, *le;
-+	int err = 0, correct_index = 0;
-+	int depth = EXT_DEPTH(tree), credits;
-+	struct ext3_extent_header *eh;
-+	unsigned a, b, block, num;
-+
-+	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
-+	if (!path[depth].p_hdr)
-+		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+	eh = path[depth].p_hdr;
-+	EXT_ASSERT(eh);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* find where to start removing */
-+	le = ex = EXT_LAST_EXTENT(eh);
-+	while (ex != EXT_FIRST_EXTENT(eh)) {
-+		if (ex->ee_block <= end)
-+			break;
-+		ex--;
-+	}
-+
-+	if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) {
-+		/* removal of internal part of the extent requested
-+		 * tail and head must be placed in different extent
-+		 * so, we have to insert one more extent */
-+		path[depth].p_ext = ex;
-+		return ext3_ext_split_for_rm(handle, tree, path, start, end);
-+	}
-+	
-+	lu = ex;
-+	while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) {
-+		ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len);
-+		path[depth].p_ext = ex;
-+	
-+		a = ex->ee_block > start ? ex->ee_block : start;
-+		b = ex->ee_block + ex->ee_len - 1 < end ?
-+			ex->ee_block + ex->ee_len - 1 : end;
-+		
-+		ext_debug(tree, "  border %u:%u\n", a, b);
-+
-+		if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) {
-+			block = 0;
-+			num = 0;
-+			BUG();
-+		} else if (a != ex->ee_block) {
-+			/* remove tail of the extent */
-+			block = ex->ee_block;
-+			num = a - block;
-+		} else if (b != ex->ee_block + ex->ee_len - 1) {
-+			/* remove head of the extent */
-+			block = a;
-+			num = b - a;
-+		} else {
-+			/* remove whole extent: excelent! */
-+			block = ex->ee_block; 
-+			num = 0;
-+			EXT_ASSERT(a == ex->ee_block &&
-+				   b == ex->ee_block + ex->ee_len - 1);
-+		}
-+
-+		if (ex == EXT_FIRST_EXTENT(eh))
-+			correct_index = 1;
-+
-+		credits = 1;
-+		if (correct_index)
-+			credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1;
-+		if (tree->ops->remove_extent_credits)
-+			credits+=tree->ops->remove_extent_credits(tree,ex,a,b);
-+		
-+		handle = ext3_ext_journal_restart(handle, credits);
-+		if (IS_ERR(handle)) {
-+			err = PTR_ERR(handle);
-+			goto out;
-+		}
-+
-+		err = ext3_ext_get_access(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		if (tree->ops->remove_extent)
-+			err = tree->ops->remove_extent(tree, ex, a, b);
-+		if (err)
-+			goto out;
-+
-+		if (num == 0) {
-+			/* this extent is removed entirely mark slot unused */
-+			ex->ee_start = ex->ee_start_hi = 0;
-+			eh->eh_entries--;
-+			fu = ex;
-+		}
-+
-+		ex->ee_block = block;
-+		ex->ee_len = num;
-+
-+		err = ext3_ext_dirty(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		ext_debug(tree, "new extent: %u:%u:%u\n",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+		ex--;
-+	}
-+
-+	if (fu) {
-+		/* reuse unused slots */
-+		while (lu < le) {
-+			if (lu->ee_start) {
-+				*fu = *lu;
-+				lu->ee_start = lu->ee_start_hi = 0;
-+				fu++;
-+			}
-+			lu++;
-+		}
-+	}
-+
-+	if (correct_index && eh->eh_entries)
-+		err = ext3_ext_correct_indexes(handle, tree, path);
-+
-+	/* if this leaf is free, then we should
-+	 * remove it from index block above */
-+	if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
-+		err = ext3_ext_rm_idx(handle, tree, path + depth);
-+
-+out:
-+	return err;
-+}
-+
-+
-+static struct ext3_extent_idx *
-+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block)
-+{
-+	struct ext3_extent_idx *ix;
-+	
-+	ix = EXT_LAST_INDEX(hdr);
-+	while (ix != EXT_FIRST_INDEX(hdr)) {
-+		if (ix->ei_block <= block)
-+			break;
-+		ix--;
-+	}
-+	return ix;
-+}
-+
-+/*
-+ * returns 1 if current index have to be freed (even partial)
-+ */
-+static int inline
-+ext3_ext_more_to_rm(struct ext3_ext_path *path)
-+{
-+	EXT_ASSERT(path->p_idx);
-+
-+	if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
-+		return 0;
-+
-+	/*
-+	 * if truncate on deeper level happened it it wasn't partial
-+	 * so we have to consider current index for truncation
-+	 */
-+	if (path->p_hdr->eh_entries == path->p_block)
-+		return 0;
-+	return 1;
-+}
-+
-+int ext3_ext_remove_space(struct ext3_extents_tree *tree,
-+			  unsigned long start, unsigned long end)
-+{
-+	struct inode *inode = tree->inode;
-+	struct super_block *sb = inode->i_sb;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_ext_path *path;
-+	handle_t *handle;
-+	int i = 0, err = 0;
-+
-+	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
-+
-+	/* probably first extent we're gonna free will be last in block */
-+	handle = ext3_journal_start(inode, depth + 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	ext3_ext_invalidate_cache(tree);
-+
-+	/*
-+	 * we start scanning from right side freeing all the blocks
-+	 * after i_size and walking into the deep
-+	 */
-+	path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL);
-+	if (IS_ERR(path)) {
-+		ext3_error(sb, __FUNCTION__, "Can't allocate path array");
-+		ext3_journal_stop(handle);
-+		return -ENOMEM;
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[i].p_hdr = EXT_ROOT_HDR(tree);
-+	
-+	while (i >= 0 && err == 0) {
-+		if (i == depth) {
-+			/* this is leaf block */
-+			err = ext3_ext_rm_leaf(handle, tree, path, start, end);
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			continue;
-+		}
-+		
-+		/* this is index block */
-+		if (!path[i].p_hdr) {
-+			ext_debug(tree, "initialize header\n");
-+			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
-+		}
-+
-+		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
-+		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
-+		
-+		if (!path[i].p_idx) {
-+			/* this level hasn't touched yet */
-+			path[i].p_idx =
-+				ext3_ext_last_covered(path[i].p_hdr, end);
-+			path[i].p_block = path[i].p_hdr->eh_entries + 1;
-+			ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n",
-+				  path[i].p_hdr, path[i].p_hdr->eh_entries);
-+		} else {
-+			/* we've already was here, see at next index */
-+			path[i].p_idx--;
-+		}
-+
-+		ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n",
-+			  i, EXT_FIRST_INDEX(path[i].p_hdr),
-+			  path[i].p_idx);
-+		if (ext3_ext_more_to_rm(path + i)) {
-+			/* go to the next level */
-+			ext_debug(tree, "move to level %d (block %d)\n",
-+				  i + 1, path[i].p_idx->ei_leaf);
-+			memset(path + i + 1, 0, sizeof(*path));
-+			path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf);
-+			if (!path[i+1].p_bh) {
-+				/* should we reset i_size? */
-+				err = -EIO;
-+				break;
-+			}
-+			/* put actual number of indexes to know is this
-+			 * number got changed at the next iteration */
-+			path[i].p_block = path[i].p_hdr->eh_entries;
-+			i++;
-+		} else {
-+			/* we finish processing this index, go up */
-+			if (path[i].p_hdr->eh_entries == 0 && i > 0) {
-+				/* index is empty, remove it
-+				 * handle must be already prepared by the
-+				 * truncatei_leaf() */
-+				err = ext3_ext_rm_idx(handle, tree, path + i);
-+			}
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			ext_debug(tree, "return to level %d\n", i);
-+		}
-+	}
-+
-+	/* TODO: flexible tree reduction should be here */
-+	if (path->p_hdr->eh_entries == 0) {
-+		/*
-+		 * truncate to zero freed all the tree
-+		 * so, we need to correct eh_depth
-+		 */
-+		err = ext3_ext_get_access(handle, tree, path);
-+		if (err == 0) {
-+			EXT_ROOT_HDR(tree)->eh_depth = 0;
-+			EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree);
-+			err = ext3_ext_dirty(handle, tree, path);
-+		}
-+	}
-+	ext3_ext_tree_changed(tree);
-+
-+	kfree(path);
-+	ext3_journal_stop(handle);
-+
-+	return err;
-+}
-+
-+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks)
-+{
-+	int lcap, icap, rcap, leafs, idxs, num;
-+
-+	rcap = ext3_ext_space_root(tree);
-+	if (blocks <= rcap) {
-+		/* all extents fit to the root */
-+		return 0;
-+	}
-+
-+	rcap = ext3_ext_space_root_idx(tree);
-+	lcap = ext3_ext_space_block(tree);
-+	icap = ext3_ext_space_block_idx(tree);
-+
-+	num = leafs = (blocks + lcap - 1) / lcap;
-+	if (leafs <= rcap) {
-+		/* all pointers to leafs fit to the root */
-+		return leafs;
-+	}
-+
-+	/* ok. we need separate index block(s) to link all leaf blocks */
-+	idxs = (leafs + icap - 1) / icap;
-+	do {
-+		num += idxs;
-+		idxs = (idxs + icap - 1) / icap;
-+	} while (idxs > rcap);
-+
-+	return num;
-+}
-+
-+/*
-+ * called at mount time
-+ */
-+void ext3_ext_init(struct super_block *sb)
-+{
-+	/*
-+	 * possible initialization would be here
-+	 */
-+
-+	if (test_opt(sb, EXTENTS)) {
-+		printk("EXT3-fs: file extents enabled");
-+#ifdef AGRESSIVE_TEST
-+		printk(", agressive tests");
-+#endif
-+#ifdef CHECK_BINSEARCH
-+		printk(", check binsearch");
-+#endif
-+		printk("\n");
-+	}
-+}
-+
-+/*
-+ * called at umount time
-+ */
-+void ext3_ext_release(struct super_block *sb)
-+{
-+}
-+
-+/************************************************************************
-+ * VFS related routines
-+ ************************************************************************/
-+
-+static int ext3_get_inode_write_access(handle_t *handle, void *buffer)
-+{
-+	/* we use in-core data, not bh */
-+	return 0;
-+}
-+
-+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer)
-+{
-+	struct inode *inode = buffer;
-+	return ext3_mark_inode_dirty(handle, inode);
-+}
-+
-+static int ext3_ext_mergable(struct ext3_extent *ex1,
-+			     struct ext3_extent *ex2)
-+{
-+	/* FIXME: support for large fs */
-+	if (ex1->ee_start + ex1->ee_len == ex2->ee_start)
-+		return 1;
-+	return 0;
-+}
-+
-+static int
-+ext3_remove_blocks_credits(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex,
-+			   unsigned long from, unsigned long to)
-+{
-+	int needed;
-+	
-+	/* at present, extent can't cross block group */;
-+	needed = 4; /* bitmap + group desc + sb + inode */
-+
-+#ifdef CONFIG_QUOTA
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+	return needed;
-+}
-+
-+static int
-+ext3_remove_blocks(struct ext3_extents_tree *tree,
-+		   struct ext3_extent *ex,
-+		   unsigned long from, unsigned long to)
-+{
-+	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
-+	handle_t *handle = ext3_journal_start(tree->inode, needed);
-+	struct buffer_head *bh;
-+	int i;
-+
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
-+		/* tail removal */
-+		unsigned long num, start;
-+		num = ex->ee_block + ex->ee_len - from;
-+		start = ex->ee_start + ex->ee_len - num;
-+		ext_debug(tree, "free last %lu blocks starting %lu\n",
-+			  num, start);
-+		for (i = 0; i < num; i++) {
-+			bh = sb_find_get_block(tree->inode->i_sb, start + i);
-+			ext3_forget(handle, 0, tree->inode, bh, start + i);
-+		}
-+		ext3_free_blocks(handle, tree->inode, start, num);
-+	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
-+		printk("strange request: removal %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	} else {
-+		printk("strange request: removal(2) %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	}
-+	ext3_journal_stop(handle);
-+	return 0;
-+}
-+
-+static int ext3_ext_find_goal(struct inode *inode,
-+			      struct ext3_ext_path *path, unsigned long block)
-+{
-+	struct ext3_inode_info *ei = EXT3_I(inode);
-+	unsigned long bg_start;
-+	unsigned long colour;
-+	int depth;
-+	
-+	if (path) {
-+		struct ext3_extent *ex;
-+		depth = path->p_depth;
-+		
-+		/* try to predict block placement */
-+		if ((ex = path[depth].p_ext))
-+			return ex->ee_start + (block - ex->ee_block);
-+
-+		/* it looks index is empty
-+		 * try to find starting from index itself */
-+		if (path[depth].p_bh)
-+			return path[depth].p_bh->b_blocknr;
-+	}
-+
-+	/* OK. use inode's group */
-+	bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+		le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+	colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+	return bg_start + colour + block;
-+}
-+
-+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path,
-+			     struct ext3_extent *ex, int *err)
-+{
-+	struct inode *inode = tree->inode;
-+	int newblock, goal;
-+	
-+	EXT_ASSERT(path);
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(ex->ee_start);
-+	EXT_ASSERT(ex->ee_len);
-+	
-+	/* reuse block from the extent to order data/metadata */
-+	newblock = ex->ee_start++;
-+	ex->ee_len--;
-+	if (ex->ee_len == 0) {
-+		ex->ee_len = 1;
-+		/* allocate new block for the extent */
-+		goal = ext3_ext_find_goal(inode, path, ex->ee_block);
-+		ex->ee_start = ext3_new_block(handle, inode, goal, err);
-+		ex->ee_start_hi = 0;
-+		if (ex->ee_start == 0) {
-+			/* error occured: restore old extent */
-+			ex->ee_start = newblock;
-+			return 0;
-+		}
-+	}
-+	return newblock;
-+}
-+
-+static struct ext3_extents_helpers ext3_blockmap_helpers = {
-+	.get_write_access	= ext3_get_inode_write_access,
-+	.mark_buffer_dirty	= ext3_mark_buffer_dirty,
-+	.mergable		= ext3_ext_mergable,
-+	.new_block		= ext3_new_block_cb,
-+	.remove_extent		= ext3_remove_blocks,
-+	.remove_extent_credits	= ext3_remove_blocks_credits,
-+};
-+
-+void ext3_init_tree_desc(struct ext3_extents_tree *tree,
-+			 struct inode *inode)
-+{
-+	tree->inode = inode;
-+	tree->root = (void *) EXT3_I(inode)->i_data;
-+	tree->buffer = (void *) inode;
-+	tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
-+	tree->cex = &EXT3_I(inode)->i_cached_extent;
-+	tree->ops = &ext3_blockmap_helpers;
-+}
-+
-+int ext3_ext_get_block(handle_t *handle, struct inode *inode,
-+		       long iblock, struct buffer_head *bh_result,
-+		       int create, int extend_disksize)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_extent newex;
-+	struct ext3_extent *ex;
-+	int goal, newblock, err = 0, depth;
-+	struct ext3_extents_tree tree;
-+
-+	__clear_bit(BH_New, &bh_result->b_state);
-+	ext3_init_tree_desc(&tree, inode);
-+	ext_debug(&tree, "block %d requested for inode %u\n",
-+		  (int) iblock, (unsigned) inode->i_ino);
-+	down(&EXT3_I(inode)->truncate_sem);
-+
-+	/* check in cache */
-+	if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) {
-+		if (goal == EXT3_EXT_CACHE_GAP) {
-+			if (!create) {
-+				/* block isn't allocated yet and
-+				 * user don't want to allocate it */
-+				goto out2;
-+			}
-+			/* we should allocate requested block */
-+		} else if (goal == EXT3_EXT_CACHE_EXTENT) {
-+			/* block is already allocated */
-+			newblock = iblock - newex.ee_block + newex.ee_start;
-+			goto out;
-+		} else {
-+			EXT_ASSERT(0);
-+		}
-+	}
-+
-+	/* find extent for this block */
-+	path = ext3_ext_find_extent(&tree, iblock, NULL);
-+	if (IS_ERR(path)) {
-+		err = PTR_ERR(path);
-+		path = NULL;
-+		goto out2;
-+	}
-+
-+	depth = EXT_DEPTH(&tree);
-+
-+	/*
-+	 * consistent leaf must not be empty
-+	 * this situations is possible, though, _during_ tree modification
-+	 * this is why assert can't be put in ext3_ext_find_extent()
-+	 */
-+	EXT_ASSERT(path[depth].p_ext != NULL || depth == 0);
-+
-+	if ((ex = path[depth].p_ext)) {
-+		/* if found exent covers block, simple return it */
-+		if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) {
-+			newblock = iblock - ex->ee_block + ex->ee_start;
-+			ext_debug(&tree, "%d fit into %d:%d -> %d\n",
-+				  (int) iblock, ex->ee_block, ex->ee_len,
-+				  newblock);
-+			ext3_ext_put_in_cache(&tree, ex->ee_block,
-+					      ex->ee_len, ex->ee_start,
-+					      EXT3_EXT_CACHE_EXTENT);
-+			goto out;
-+		}
-+	}
-+
-+	/*
-+	 * requested block isn't allocated yet
-+	 * we couldn't try to create block if create flag is zero 
-+	 */
-+	if (!create) {
-+		/* put just found gap into cache to speedup subsequest reqs */
-+		ext3_ext_put_gap_in_cache(&tree, path, iblock);
-+		goto out2;
-+	}
-+
-+	/* allocate new block */
-+	goal = ext3_ext_find_goal(inode, path, iblock);
-+	newblock = ext3_new_block(handle, inode, goal, &err);
-+	if (!newblock)
-+		goto out2;
-+	ext_debug(&tree, "allocate new block: goal %d, found %d\n",
-+		  goal, newblock);
-+
-+	/* try to insert new extent into found leaf and return */
-+	newex.ee_block = iblock;
-+	newex.ee_start = newblock;
-+	newex.ee_start_hi = 0;
-+	newex.ee_len = 1;
-+	err = ext3_ext_insert_extent(handle, &tree, path, &newex);
-+	if (err)
-+		goto out2;
-+	
-+	if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize)
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+
-+	/* previous routine could use block we allocated */
-+	newblock = newex.ee_start;
-+	__set_bit(BH_New, &bh_result->b_state);
-+
-+	ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len,
-+			      newex.ee_start, EXT3_EXT_CACHE_EXTENT);
-+out:
-+	ext3_ext_show_leaf(&tree, path);
-+	__set_bit(BH_Mapped, &bh_result->b_state);
-+	bh_result->b_bdev = inode->i_sb->s_bdev;
-+	bh_result->b_blocknr = newblock;
-+out2:
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	up(&EXT3_I(inode)->truncate_sem);
-+
-+	return err;	
-+}
-+
-+void ext3_ext_truncate(struct inode * inode, struct page *page)
-+{
-+	struct address_space *mapping = inode->i_mapping;
-+	struct super_block *sb = inode->i_sb;
-+	struct ext3_extents_tree tree;
-+	unsigned long last_block;
-+	handle_t *handle;
-+	int err = 0;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+
-+	/*
-+	 * probably first extent we're gonna free will be last in block
-+	 */
-+	err = ext3_writepage_trans_blocks(inode) + 3;
-+	handle = ext3_journal_start(inode, err);
-+	if (IS_ERR(handle)) {
-+		if (page) {
-+			clear_highpage(page);
-+			flush_dcache_page(page);
-+			unlock_page(page);
-+			page_cache_release(page);
-+		}
-+		return;
-+	}
-+
-+	if (page)
-+		ext3_block_truncate_page(handle, page, mapping, inode->i_size);
-+
-+	down(&EXT3_I(inode)->truncate_sem);
-+	ext3_ext_invalidate_cache(&tree);
-+
-+	/* 
-+	 * TODO: optimization is possible here
-+	 * probably we need not scaning at all,
-+	 * because page truncation is enough
-+	 */
-+	if (ext3_orphan_add(handle, inode))
-+		goto out_stop;
-+
-+	/* we have to know where to truncate from in crash case */
-+	EXT3_I(inode)->i_disksize = inode->i_size;
-+	ext3_mark_inode_dirty(handle, inode);
-+
-+	last_block = (inode->i_size + sb->s_blocksize - 1) >>
-+			EXT3_BLOCK_SIZE_BITS(sb);
-+	err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK);
-+	
-+	/* In a multi-transaction truncate, we only make the final
-+	 * transaction synchronous */
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+
-+out_stop:
-+	/*
-+	 * If this was a simple ftruncate(), and the file will remain alive
-+	 * then we need to clear up the orphan record which we created above.
-+	 * However, if this was a real unlink then we were called by
-+	 * ext3_delete_inode(), and we allow that function to clean up the
-+	 * orphan info for us.
-+	 */
-+	if (inode->i_nlink)
-+		ext3_orphan_del(handle, inode);
-+
-+	up(&EXT3_I(inode)->truncate_sem);
-+	ext3_journal_stop(handle);
-+}
-+
-+/*
-+ * this routine calculate max number of blocks we could modify
-+ * in order to allocate new block for an inode
-+ */
-+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num)
-+{
-+	struct ext3_extents_tree tree;
-+	int needed;
-+	
-+	ext3_init_tree_desc(&tree, inode);
-+	
-+	needed = ext3_ext_calc_credits_for_insert(&tree, NULL);
-+
-+	/* caller want to allocate num blocks */
-+	needed *= num;
-+	
-+#ifdef CONFIG_QUOTA
-+	/* 
-+	 * FIXME: real calculation should be here
-+	 * it depends on blockmap format of qouta file
-+	 */
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return needed;
-+}
-+
-+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	ext3_extent_tree_init(handle, &tree);
-+}
-+
-+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	return ext3_ext_calc_metadata_amount(&tree, blocks);
-+}
-+	
-+static int
-+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree,
-+			 struct ext3_ext_path *path,
-+			 struct ext3_ext_cache *newex)
-+{
-+	struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private;
-+
-+	if (newex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	if (buf->err < 0)
-+		return EXT_BREAK;
-+	if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen)
-+		return EXT_BREAK;
-+
-+	if (!copy_to_user(buf->cur, newex, sizeof(*newex))) {
-+		buf->err++;
-+		buf->cur += sizeof(*newex);
-+	} else {
-+		buf->err = -EFAULT;
-+		return EXT_BREAK;
-+	}
-+	return EXT_CONTINUE;
-+}
-+
-+static int
-+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_ext_cache *ex)
-+{
-+	struct ext3_extent_tree_stats *buf =
-+		(struct ext3_extent_tree_stats *) tree->private;
-+	int depth;
-+
-+	if (ex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	depth = EXT_DEPTH(tree);
-+	buf->extents_num++;
-+	if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr))
-+		buf->leaf_num++;
-+	return EXT_CONTINUE;
-+}
-+
-+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-+		   unsigned long arg)
-+{
-+	int err = 0;
-+
-+	if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL))
-+		return -EINVAL;
-+
-+	if (cmd == EXT3_IOC_GET_EXTENTS) {
-+		struct ext3_extent_buf buf;
-+		struct ext3_extents_tree tree;
-+
-+		if (copy_from_user(&buf, (void *) arg, sizeof(buf)))
-+			return -EFAULT;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		buf.cur = buf.buffer;
-+		buf.err = 0;
-+		tree.private = &buf;
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK,
-+					  ext3_ext_store_extent_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (err == 0)
-+			err = buf.err;
-+	} else if (cmd == EXT3_IOC_GET_TREE_STATS) {
-+		struct ext3_extent_tree_stats buf;
-+		struct ext3_extents_tree tree;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		buf.depth = EXT_DEPTH(&tree);
-+		buf.extents_num = 0;
-+		buf.leaf_num = 0;
-+		tree.private = &buf;
-+		err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK,
-+					  ext3_ext_collect_stats_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (!err)
-+			err = copy_to_user((void *) arg, &buf, sizeof(buf));
-+	} else if (cmd == EXT3_IOC_GET_TREE_DEPTH) {
-+		struct ext3_extents_tree tree;
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = EXT_DEPTH(&tree);
-+		up(&EXT3_I(inode)->truncate_sem);
-+	}
-+
-+	return err;
-+}
-+
-+EXPORT_SYMBOL(ext3_init_tree_desc);
-+EXPORT_SYMBOL(ext3_mark_inode_dirty);
-+EXPORT_SYMBOL(ext3_ext_invalidate_cache);
-+EXPORT_SYMBOL(ext3_ext_insert_extent);
-+EXPORT_SYMBOL(ext3_ext_walk_space);
-+EXPORT_SYMBOL(ext3_ext_find_goal);
-+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert);
-Index: linux-2.6.5-sles9/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/ialloc.c	2005-02-23 01:01:52.366281264 +0300
-+++ linux-2.6.5-sles9/fs/ext3/ialloc.c	2005-02-23 01:02:37.398435336 +0300
-@@ -566,7 +566,7 @@ repeat:
- 	ei->i_dir_start_lookup = 0;
- 	ei->i_disksize = 0;
- 
--	ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL;
-+	ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL);
- 	if (S_ISLNK(mode))
- 		ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL);
- 	/* dirsync only applies to directories */
-@@ -647,6 +647,18 @@
- 		DQUOT_FREE_INODE(inode);
- 		goto fail2;
-   	}
-+	if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
-+		EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
-+		ext3_extents_initialize_blockmap(handle, inode);
-+		if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
-+			err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-+			if (err) goto fail;
-+			EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS);
-+			BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata");
-+			err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-+		}
-+	}
-+
- 	err = ext3_mark_inode_dirty(handle, inode);
- 	if (err) {
- 		ext3_std_error(sb, err);
-Index: linux-2.6.5-sles9/fs/ext3/inode.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/inode.c	2005-02-23 01:01:52.373280200 +0300
-+++ linux-2.6.5-sles9/fs/ext3/inode.c	2005-02-23 01:02:37.404434424 +0300
-@@ -796,6 +796,17 @@
- 	goto reread;
- }
- 
-+static inline int
-+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block,
-+		    struct buffer_head *bh, int create, int extend_disksize)
-+{
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_get_block(handle, inode, block, bh, create,
-+					  extend_disksize);
-+	return ext3_get_block_handle(handle, inode, block, bh, create,
-+				     extend_disksize);
-+}
-+
- static int ext3_get_block(struct inode *inode, sector_t iblock,
- 			struct buffer_head *bh_result, int create)
- {
-@@ -806,8 +817,8 @@
- 		handle = ext3_journal_current_handle();
- 		J_ASSERT(handle != 0);
- 	}
--	ret = ext3_get_block_handle(handle, inode, iblock,
--				bh_result, create, 1);
-+	ret = ext3_get_block_wrap(handle, inode, iblock,
-+				  bh_result, create, 1);
- 	return ret;
- }
- 
-@@ -833,8 +844,8 @@
- 		}
- 	}
- 	if (ret == 0)
--		ret = ext3_get_block_handle(handle, inode, iblock,
--					bh_result, create, 0);
-+		ret = ext3_get_block_wrap(handle, inode, iblock,
-+					  bh_result, create, 0);
- 	if (ret == 0)
- 		bh_result->b_size = (1 << inode->i_blkbits);
- 	return ret;
-@@ -855,7 +866,7 @@
- 	dummy.b_state = 0;
- 	dummy.b_blocknr = -1000;
- 	buffer_trace_init(&dummy.b_history);
--	*errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1);
-+	*errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1);
- 	if (!*errp && buffer_mapped(&dummy)) {
- 		struct buffer_head *bh;
- 		bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
-@@ -1587,7 +1598,7 @@
-  * This required during truncate. We need to physically zero the tail end
-  * of that block so it doesn't yield old data if the file is later grown.
-  */
--static int ext3_block_truncate_page(handle_t *handle, struct page *page,
-+int ext3_block_truncate_page(handle_t *handle, struct page *page,
- 		struct address_space *mapping, loff_t from)
- {
- 	unsigned long index = from >> PAGE_CACHE_SHIFT;
-@@ -2083,6 +2094,9 @@
- 			return;
- 	}
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_truncate(inode, page);
-+
- 	handle = start_transaction(inode);
- 	if (IS_ERR(handle)) {
- 		if (page) {
-@@ -2789,6 +2803,9 @@
- 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
- 	int ret;
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_writepage_trans_blocks(inode, bpp);
-+
- 	if (ext3_should_journal_data(inode))
- 		ret = 3 * (bpp + indirects) + 2;
- 	else
-Index: linux-2.6.5-sles9/fs/ext3/Makefile
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/Makefile	2005-02-23 01:01:46.501172896 +0300
-+++ linux-2.6.5-sles9/fs/ext3/Makefile	2005-02-23 01:02:37.405434272 +0300
-@@ -5,7 +5,8 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
--	   ioctl.o namei.o super.o symlink.o hash.o
-+	   ioctl.o namei.o super.o symlink.o hash.o \
-+	   extents.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-2.6.5-sles9/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/super.c	2005-02-23 01:02:34.072940888 +0300
-+++ linux-2.6.5-sles9/fs/ext3/super.c	2005-02-23 01:47:15.291333736 +0300
-@@ -389,6 +389,7 @@
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
- 	if (!(sb->s_flags & MS_RDONLY)) {
-@@ -447,6 +448,8 @@
- #endif
- 	ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- 	ei->vfs_inode.i_version = 1;
-+	
-+	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
- 	return &ei->vfs_inode;
- }
- 
-@@ -537,6 +540,7 @@
- 	Opt_ignore, Opt_barrier,
- 	Opt_err,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+	Opt_extents, Opt_noextents, Opt_extdebug,
- };
- 
- static match_table_t tokens = {
-@@ -582,6 +585,9 @@
- 	{Opt_iopen, "iopen"},
- 	{Opt_noiopen, "noiopen"},
- 	{Opt_iopen_nopriv, "iopen_nopriv"},
-+	{Opt_extents, "extents"},
-+	{Opt_noextents, "noextents"},
-+	{Opt_extdebug, "extdebug"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL}
- };
-@@ -797,6 +802,15 @@
- 			break;
- 		case Opt_ignore:
- 			break;
-+		case Opt_extents:
-+			set_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_noextents:
-+			clear_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_extdebug:
-+			set_opt (sbi->s_mount_opt, EXTDEBUG);
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1449,6 +1460,8 @@
- 	percpu_counter_mod(&sbi->s_dirs_counter,
- 		ext3_count_dirs(sb));
- 
-+	ext3_ext_init(sb);
-+
- 	return 0;
- 
- failed_mount3:
-Index: linux-2.6.5-sles9/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/ioctl.c	2005-02-23 01:01:42.887722224 +0300
-+++ linux-2.6.5-sles9/fs/ext3/ioctl.c	2005-02-23 01:02:37.412433208 +0300
-@@ -124,6 +124,10 @@
- 			err = ext3_change_inode_journal_flag(inode, jflag);
- 		return err;
- 	}
-+	case EXT3_IOC_GET_EXTENTS:
-+	case EXT3_IOC_GET_TREE_STATS:
-+	case EXT3_IOC_GET_TREE_DEPTH:
-+		return ext3_ext_ioctl(inode, filp, cmd, arg);
- 	case EXT3_IOC_GETVERSION:
- 	case EXT3_IOC_GETVERSION_OLD:
- 		return put_user(inode->i_generation, (int *) arg);
-Index: linux-2.6.5-sles9/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_fs.h	2005-02-23 01:02:35.823674736 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_fs.h	2005-02-23 01:02:37.414432904 +0300
-@@ -186,8 +186,9 @@
- #define EXT3_NOTAIL_FL			0x00008000 /* don't merge file tail */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL			0x00080000 /* Inode uses extents */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
-+#define EXT3_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
- #define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
- 
-@@ -211,6 +212,9 @@
- #endif
- #define EXT3_IOC_GETRSVSZ		_IOR('f', 5, long)
- #define EXT3_IOC_SETRSVSZ		_IOW('f', 6, long)
-+#define EXT3_IOC_GET_EXTENTS		_IOR('f', 7, long)
-+#define EXT3_IOC_GET_TREE_DEPTH		_IOR('f', 8, long)
-+#define EXT3_IOC_GET_TREE_STATS		_IOR('f', 9, long)
- 
- /*
-  * Structure of an inode on the disk
-@@ -333,6 +337,8 @@
- #define EXT3_MOUNT_BARRIER		0x20000 /* Use block barriers */
- #define EXT3_MOUNT_IOPEN		0x80000	/* Allow access via iopen */
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
-+#define EXT3_MOUNT_EXTENTS		0x200000/* Extents support */
-+#define EXT3_MOUNT_EXTDEBUG		0x400000/* Extents debug */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -503,11 +509,13 @@
- #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
- #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
-+#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
- 
- #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
- 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
--					 EXT3_FEATURE_INCOMPAT_META_BG)
-+					 EXT3_FEATURE_INCOMPAT_META_BG| \
-+					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-@@ -729,6 +735,9 @@
- 
- 
- /* inode.c */
-+extern int ext3_block_truncate_page(handle_t *, struct page *,
-+				    struct address_space *, loff_t);
-+extern int ext3_writepage_trans_blocks(struct inode *inode);
- extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-@@ -802,6 +809,16 @@
- extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
- 
-+/* extents.c */
-+extern int ext3_ext_writepage_trans_blocks(struct inode *, int);
-+extern int ext3_ext_get_block(handle_t *, struct inode *, long,
-+			      struct buffer_head *, int, int);
-+extern void ext3_ext_truncate(struct inode *, struct page *);
-+extern void ext3_ext_init(struct super_block *);
-+extern void ext3_ext_release(struct super_block *);
-+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
-+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
-+			  unsigned int cmd, unsigned long arg);
- 
- #endif	/* __KERNEL__ */
- 
-Index: linux-2.6.5-sles9/include/linux/ext3_extents.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_extents.h	2005-02-17 22:07:57.023609040 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_extents.h	2005-02-23 01:02:37.416432600 +0300
-@@ -0,0 +1,262 @@
-+/*
-+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+#ifndef _LINUX_EXT3_EXTENTS
-+#define _LINUX_EXT3_EXTENTS
-+
-+/*
-+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
-+ * become very little, so index split, in-depth growing and
-+ * other hard changes happens much more often
-+ * this is for debug purposes only
-+ */
-+#define AGRESSIVE_TEST_
-+
-+/*
-+ * if CHECK_BINSEARCH defined, then results of binary search
-+ * will be checked by linear search
-+ */
-+#define CHECK_BINSEARCH_
-+
-+/*
-+ * if EXT_DEBUG is defined you can use 'extdebug' mount option
-+ * to get lots of info what's going on
-+ */
-+#define EXT_DEBUG_
-+#ifdef EXT_DEBUG
-+#define ext_debug(tree,fmt,a...)			\
-+do {							\
-+	if (test_opt((tree)->inode->i_sb, EXTDEBUG))	\
-+		printk(fmt, ##a);			\
-+} while (0);
-+#else
-+#define ext_debug(tree,fmt,a...)
-+#endif
-+
-+/*
-+ * if EXT_STATS is defined then stats numbers are collected
-+ * these number will be displayed at umount time
-+ */
-+#define EXT_STATS_
-+
-+
-+#define EXT3_ALLOC_NEEDED	3	/* block bitmap + group desc. + sb */
-+
-+/*
-+ * ext3_inode has i_block array (total 60 bytes)
-+ * first 4 bytes are used to store:
-+ *  - tree depth (0 mean there is no tree yet. all extents in the inode)
-+ *  - number of alive extents in the inode
-+ */
-+
-+/*
-+ * this is extent on-disk structure
-+ * it's used at the bottom of the tree
-+ */
-+struct ext3_extent {
-+	__u32	ee_block;	/* first logical block extent covers */
-+	__u16	ee_len;		/* number of blocks covered by extent */
-+	__u16	ee_start_hi;	/* high 16 bits of physical block */
-+	__u32	ee_start;	/* low 32 bigs of physical block */
-+};
-+
-+/*
-+ * this is index on-disk structure
-+ * it's used at all the levels, but the bottom
-+ */
-+struct ext3_extent_idx {
-+	__u32	ei_block;	/* index covers logical blocks from 'block' */
-+	__u32	ei_leaf;	/* pointer to the physical block of the next *
-+				 * level. leaf or next index could bet here */
-+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
-+	__u16	ei_unused;
-+};
-+
-+/*
-+ * each block (leaves and indexes), even inode-stored has header
-+ */
-+struct ext3_extent_header {	
-+	__u16	eh_magic;	/* probably will support different formats */	
-+	__u16	eh_entries;	/* number of valid entries */
-+	__u16	eh_max;		/* capacity of store in entries */
-+	__u16	eh_depth;	/* has tree real underlaying blocks? */
-+	__u32	eh_generation;	/* flags(8 bits) | generation of the tree */
-+};
-+
-+#define EXT3_EXT_MAGIC		0xf30a
-+
-+/*
-+ * array of ext3_ext_path contains path to some extent
-+ * creation/lookup routines use it for traversal/splitting/etc
-+ * truncate uses it to simulate recursive walking
-+ */
-+struct ext3_ext_path {
-+	__u32				p_block;
-+	__u16				p_depth;
-+	struct ext3_extent		*p_ext;
-+	struct ext3_extent_idx		*p_idx;
-+	struct ext3_extent_header	*p_hdr;
-+	struct buffer_head		*p_bh;
-+};
-+
-+/*
-+ * structure for external API
-+ */
-+
-+/*
-+ * storage for cached extent
-+ */
-+struct ext3_ext_cache {
-+	__u32	ec_start;
-+	__u32	ec_block;
-+	__u32	ec_len;
-+	__u32	ec_type;
-+};
-+
-+#define EXT3_EXT_CACHE_NO	0
-+#define EXT3_EXT_CACHE_GAP	1
-+#define EXT3_EXT_CACHE_EXTENT	2
-+
-+/*
-+ * ext3_extents_tree is used to pass initial information
-+ * to top-level extents API
-+ */
-+struct ext3_extents_helpers;
-+struct ext3_extents_tree {
-+	struct inode *inode;	/* inode which tree belongs to */
-+	void *root;		/* ptr to data top of tree resides at */
-+	void *buffer;		/* will be passed as arg to ^^ routines	*/
-+	int buffer_len;
-+	void *private;
-+	struct ext3_ext_cache *cex;/* last found extent */
-+	struct ext3_extents_helpers *ops;
-+};
-+
-+struct ext3_extents_helpers {
-+	int (*get_write_access)(handle_t *h, void *buffer);
-+	int (*mark_buffer_dirty)(handle_t *h, void *buffer);
-+	int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2);
-+	int (*remove_extent_credits)(struct ext3_extents_tree *,
-+				     struct ext3_extent *, unsigned long,
-+				     unsigned long);
-+	int (*remove_extent)(struct ext3_extents_tree *,
-+			     struct ext3_extent *, unsigned long,
-+			     unsigned long);
-+	int (*new_block)(handle_t *, struct ext3_extents_tree *,
-+			 struct ext3_ext_path *, struct ext3_extent *,
-+			 int *);
-+};
-+
-+/*
-+ * to be called by ext3_ext_walk_space()
-+ * negative retcode - error
-+ * positive retcode - signal for ext3_ext_walk_space(), see below
-+ * callback must return valid extent (passed or newly created)
-+ */
-+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *,
-+				    struct ext3_ext_path *,
-+				    struct ext3_ext_cache *);
-+
-+#define EXT_CONTINUE	0
-+#define EXT_BREAK	1
-+#define EXT_REPEAT	2
-+
-+
-+#define EXT_MAX_BLOCK	0xffffffff
-+
-+
-+#define EXT_FIRST_EXTENT(__hdr__) \
-+	((struct ext3_extent *) (((char *) (__hdr__)) +		\
-+				 sizeof(struct ext3_extent_header)))
-+#define EXT_FIRST_INDEX(__hdr__) \
-+	((struct ext3_extent_idx *) (((char *) (__hdr__)) +	\
-+				     sizeof(struct ext3_extent_header)))
-+#define EXT_HAS_FREE_INDEX(__path__) \
-+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
-+#define EXT_LAST_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_LAST_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_MAX_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_MAX_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_HDR_GEN(__hdr__)	((__hdr__)->eh_generation & 0x00ffffff)
-+#define EXT_FLAGS(__hdr__)	((__hdr__)->eh_generation >> 24)
-+#define EXT_FLAGS_CLR_UNKNOWN	0x7	/* Flags cleared on modification */
-+
-+#define EXT_BLOCK_HDR(__bh__) 	((struct ext3_extent_header *)(__bh__)->b_data)
-+#define EXT_ROOT_HDR(__tree__)	((struct ext3_extent_header *)(__tree__)->root)
-+#define EXT_DEPTH(__tree__)	(EXT_ROOT_HDR(__tree__)->eh_depth)
-+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__))
-+
-+#define EXT_ASSERT(__x__) if (!(__x__)) BUG();
-+
-+#define EXT_CHECK_PATH(tree,path)					\
-+{									\
-+	int depth = EXT_DEPTH(tree);					\
-+	BUG_ON((unsigned long) (path) < __PAGE_OFFSET);			\
-+	BUG_ON((unsigned long) (path)[depth].p_idx <			\
-+			__PAGE_OFFSET && (path)[depth].p_idx != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_ext <			\
-+			__PAGE_OFFSET && (path)[depth].p_ext != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET);	\
-+	BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET	\
-+			&& depth != 0);					\
-+	BUG_ON((path)[0].p_depth != depth);				\
-+}
-+
-+
-+/*
-+ * this structure is used to gather extents from the tree via ioctl
-+ */
-+struct ext3_extent_buf {
-+	unsigned long start;
-+	int buflen;
-+	void *buffer;
-+	void *cur;
-+	int err;
-+};
-+
-+/*
-+ * this structure is used to collect stats info about the tree
-+ */
-+struct ext3_extent_tree_stats {
-+	int depth;
-+	int extents_num;
-+	int leaf_num;
-+};
-+
-+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *);
-+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *);
-+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *);
-+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *);
-+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback);
-+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
-+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
-+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int);
-+
-+static inline void
-+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree)
-+{
-+	if (tree->cex)
-+		tree->cex->ec_type = EXT3_EXT_CACHE_NO;
-+}
-+
-+
-+#endif /* _LINUX_EXT3_EXTENTS */
-Index: linux-2.6.5-sles9/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_i.h	2005-02-23 01:01:52.425272296 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_fs_i.h	2005-02-23 01:45:55.611446920 +0300
-@@ -19,6 +19,7 @@
- #include <linux/rwsem.h>
- #include <linux/rbtree.h>
- #include <linux/seqlock.h>
-+#include <linux/ext3_extents.h>
- 
- struct reserve_window {
- 	__u32			_rsv_start;	/* First byte reserved */
-@@ -128,6 +129,8 @@
- 	 */
- 	struct semaphore truncate_sem;
- 	struct inode vfs_inode;
-+
-+	struct ext3_ext_cache i_cached_extent;
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
-
-%diffstat
- fs/ext3/Makefile             |    2 
- fs/ext3/extents.c            | 2356 +++++++++++++++++++++++++++++++++++++++++++
- fs/ext3/ialloc.c             |    4 
- fs/ext3/inode.c              |   29 
- fs/ext3/ioctl.c              |    4 
- fs/ext3/super.c              |   15 
- include/linux/ext3_extents.h |  265 ++++
- include/linux/ext3_fs.h      |   17 
- include/linux/ext3_fs_i.h    |    3 
- 9 files changed, 2687 insertions(+), 8 deletions(-)
-
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch
deleted file mode 100644
index 67d62365dc28f486ed393798007bd74efe9d65e5..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-2.6.9-rhel4.patch
+++ /dev/null
@@ -1,2926 +0,0 @@
-Index: linux-stage/fs/ext3/extents.c
-===================================================================
---- linux-stage.orig/fs/ext3/extents.c	2005-02-25 15:33:48.890198160 +0200
-+++ linux-stage/fs/ext3/extents.c	2005-02-25 15:33:48.917194056 +0200
-@@ -0,0 +1,2360 @@
-+/*
-+ * Copyright(c) 2003, 2004, 2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+/*
-+ * Extents support for EXT3
-+ *
-+ * TODO:
-+ *   - ext3_ext_walk_space() sould not use ext3_ext_find_extent()
-+ *   - ext3_ext_calc_credits() could take 'mergable' into account
-+ *   - ext3*_error() should be used in some situations
-+ *   - find_goal() [to be tested and improved]
-+ *   - smart tree reduction
-+ *   - arch-independence
-+ *     common on-disk format for big/little-endian arch
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/fs.h>
-+#include <linux/time.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/smp_lock.h>
-+#include <linux/highuid.h>
-+#include <linux/pagemap.h>
-+#include <linux/quotaops.h>
-+#include <linux/string.h>
-+#include <linux/slab.h>
-+#include <linux/ext3_extents.h>
-+#include <asm/uaccess.h>
-+
-+
-+static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
-+{
-+	if (eh->eh_magic != EXT3_EXT_MAGIC) {
-+		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
-+		       (unsigned)eh->eh_magic);
-+		return -EIO;
-+	}
-+	if (eh->eh_max == 0) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
-+		       (unsigned)eh->eh_max);
-+		return -EIO;
-+	}
-+	if (eh->eh_entries > eh->eh_max) {
-+		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
-+		       (unsigned)eh->eh_entries);
-+		return -EIO;
-+	}
-+	return 0;
-+}
-+
-+static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
-+{
-+	int err;
-+
-+	if (handle->h_buffer_credits > needed)
-+		return handle;
-+	if (!ext3_journal_extend(handle, needed))
-+		return handle;
-+	err = ext3_journal_restart(handle, needed);
-+	
-+	return handle;
-+}
-+
-+static int inline
-+ext3_ext_get_access_for_root(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->get_write_access)
-+		return tree->ops->get_write_access(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+static int inline
-+ext3_ext_mark_root_dirty(handle_t *h, struct ext3_extents_tree *tree)
-+{
-+	if (tree->ops->mark_buffer_dirty)
-+		return tree->ops->mark_buffer_dirty(h,tree->buffer);
-+	else
-+		return 0;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ */
-+static int ext3_ext_get_access(handle_t *handle,
-+			       struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+	int err;
-+
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err = ext3_journal_get_write_access(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_get_access_for_root(handle, tree);
-+	}
-+	return err;
-+}
-+
-+/*
-+ * could return:
-+ *  - EROFS
-+ *  - ENOMEM
-+ *  - EIO
-+ */
-+static int ext3_ext_dirty(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path)
-+{
-+	int err;
-+	if (path->p_bh) {
-+		/* path points to block */
-+		err =ext3_journal_dirty_metadata(handle, path->p_bh);
-+	} else {
-+		/* path points to leaf/index in inode body */
-+		err = ext3_ext_mark_root_dirty(handle, tree);
-+	}
-+	return err;
-+}
-+
-+static int inline
-+ext3_ext_new_block(handle_t *handle, struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, struct ext3_extent *ex,
-+		   int *err)
-+{
-+	int goal, depth, newblock;
-+	struct inode *inode;
-+
-+	EXT_ASSERT(tree);
-+	if (tree->ops->new_block)
-+		return tree->ops->new_block(handle, tree, path, ex, err);
-+
-+	inode = tree->inode;
-+	depth = EXT_DEPTH(tree);
-+	if (path && depth > 0) {
-+		goal = path[depth-1].p_block;
-+	} else {
-+		struct ext3_inode_info *ei = EXT3_I(inode);
-+		unsigned long bg_start;
-+		unsigned long colour;
-+
-+		bg_start = (ei->i_block_group *
-+			    EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+			le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+		colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+		goal = bg_start + colour;
-+	}
-+
-+	newblock = ext3_new_block(handle, inode, goal, err);
-+	return newblock;
-+}
-+
-+static inline void ext3_ext_tree_changed(struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *neh = EXT_ROOT_HDR(tree);
-+	neh->eh_generation = ((EXT_FLAGS(neh) & ~EXT_FLAGS_CLR_UNKNOWN) <<
-+			      EXT_HDR_GEN_BITS) |
-+			     ((EXT_HDR_GEN(neh) + 1) & EXT_HDR_GEN_MASK);
-+}
-+
-+static inline int ext3_ext_space_block(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 6;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_block_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->inode->i_sb->s_blocksize -
-+		sizeof(struct ext3_extent_header)) /
-+				sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 5;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent);
-+#ifdef AGRESSIVE_TEST
-+	size = 3;
-+#endif
-+	return size;
-+}
-+
-+static inline int ext3_ext_space_root_idx(struct ext3_extents_tree *tree)
-+{
-+	int size;
-+
-+	size = (tree->buffer_len - sizeof(struct ext3_extent_header)) /
-+			sizeof(struct ext3_extent_idx);
-+#ifdef AGRESSIVE_TEST
-+	size = 4;
-+#endif
-+	return size;
-+}
-+
-+static void ext3_ext_show_path(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int k, l = path->p_depth;
-+
-+	ext_debug(tree, "path:");
-+	for (k = 0; k <= l; k++, path++) {
-+		if (path->p_idx) {
-+			ext_debug(tree, "  %d->%d", path->p_idx->ei_block,
-+				  path->p_idx->ei_leaf);
-+		} else if (path->p_ext) {
-+			ext_debug(tree, "  %d:%d:%d",
-+				  path->p_ext->ee_block,
-+				  path->p_ext->ee_len,
-+				  path->p_ext->ee_start);
-+		} else
-+			ext_debug(tree, "  []");
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_show_leaf(struct ext3_extents_tree *tree,
-+			       struct ext3_ext_path *path)
-+{
-+#ifdef EXT_DEBUG
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *eh;
-+	struct ext3_extent *ex;
-+	int i;
-+
-+	if (!path)
-+		return;
-+
-+	eh = path[depth].p_hdr;
-+	ex = EXT_FIRST_EXTENT(eh);
-+
-+	for (i = 0; i < eh->eh_entries; i++, ex++) {
-+		ext_debug(tree, "%d:%d:%d ",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+	}
-+	ext_debug(tree, "\n");
-+#endif
-+}
-+
-+static void ext3_ext_drop_refs(struct ext3_ext_path *path)
-+{
-+	int depth = path->p_depth;
-+	int i;
-+
-+	for (i = 0; i <= depth; i++, path++) {
-+		if (path->p_bh) {
-+			brelse(path->p_bh);
-+			path->p_bh = NULL;
-+		}
-+	}
-+}
-+
-+/*
-+ * binary search for closest index by given block
-+ */
-+static inline void
-+ext3_ext_binsearch_idx(struct ext3_extents_tree *tree,
-+		       struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent_idx *ix;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_entries > 0);
-+
-+	ext_debug(tree, "binsearch for %d(idx):  ", block);
-+
-+	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ix[l + k].ei_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ix += l;
-+	path->p_idx = ix;
-+	ext_debug(tree," -> %d->%d ",path->p_idx->ei_block,path->p_idx->ei_leaf);
-+
-+	while (l++ < r) {
-+		if (block < ix->ei_block) 
-+			break;
-+		path->p_idx = ix++;
-+	}
-+	ext_debug(tree, "  -> %d->%d\n", path->p_idx->ei_block,
-+		  path->p_idx->ei_leaf);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent_idx *chix;
-+
-+		chix = ix = EXT_FIRST_INDEX(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ix++) {
-+			if (k != 0 && ix->ei_block <= ix[-1].ei_block) {
-+				printk("k=%d, ix=0x%p, first=0x%p\n", k,
-+				       ix, EXT_FIRST_INDEX(eh));
-+				printk("%u <= %u\n",
-+				       ix->ei_block,ix[-1].ei_block);
-+			}
-+			EXT_ASSERT(k == 0 || ix->ei_block > ix[-1].ei_block);
-+			if (block < ix->ei_block) 
-+				break;
-+			chix = ix;
-+		}
-+		EXT_ASSERT(chix == path->p_idx);
-+	}
-+#endif
-+}
-+
-+/*
-+ * binary search for closest extent by given block
-+ */
-+static inline void
-+ext3_ext_binsearch(struct ext3_extents_tree *tree,
-+		   struct ext3_ext_path *path, int block)
-+{
-+	struct ext3_extent_header *eh = path->p_hdr;
-+	struct ext3_extent *ex;
-+	int l = 0, k, r;
-+
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+
-+	if (eh->eh_entries == 0) {
-+		/*
-+		 * this leaf is empty yet:
-+		 *  we get such a leaf in split/add case
-+		 */
-+		return;
-+	}
-+	
-+	ext_debug(tree, "binsearch for %d:  ", block);
-+
-+	path->p_ext = ex = EXT_FIRST_EXTENT(eh);
-+
-+	r = k = eh->eh_entries;
-+	while (k > 1) {
-+		k = (r - l) / 2;
-+		if (block < ex[l + k].ee_block)
-+			r -= k;
-+		else
-+			l += k;
-+		ext_debug(tree, "%d:%d:%d ", k, l, r);
-+	}
-+
-+	ex += l;
-+	path->p_ext = ex;
-+	ext_debug(tree, "  -> %d:%d:%d ", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+	while (l++ < r) {
-+		if (block < ex->ee_block) 
-+			break;
-+		path->p_ext = ex++;
-+	}
-+	ext_debug(tree, "  -> %d:%d:%d\n", path->p_ext->ee_block,
-+		  path->p_ext->ee_start, path->p_ext->ee_len);
-+
-+#ifdef CHECK_BINSEARCH 
-+	{
-+		struct ext3_extent *chex;
-+
-+		chex = ex = EXT_FIRST_EXTENT(eh);
-+		for (k = 0; k < eh->eh_entries; k++, ex++) {
-+			EXT_ASSERT(k == 0 || ex->ee_block > ex[-1].ee_block);
-+			if (block < ex->ee_block) 
-+				break;
-+			chex = ex;
-+		}
-+		EXT_ASSERT(chex == path->p_ext);
-+	}
-+#endif
-+}
-+
-+int ext3_extent_tree_init(handle_t *handle, struct ext3_extents_tree *tree)
-+{
-+	struct ext3_extent_header *eh;
-+
-+	BUG_ON(tree->buffer_len == 0);
-+	ext3_ext_get_access_for_root(handle, tree);
-+	eh = EXT_ROOT_HDR(tree);
-+	eh->eh_depth = 0;
-+	eh->eh_entries = 0;
-+	eh->eh_magic = EXT3_EXT_MAGIC;
-+	eh->eh_max = ext3_ext_space_root(tree);
-+	ext3_ext_mark_root_dirty(handle, tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return 0;
-+}
-+
-+struct ext3_ext_path *
-+ext3_ext_find_extent(struct ext3_extents_tree *tree, int block,
-+		     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	struct buffer_head *bh;
-+	int depth, i, ppos = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	eh = EXT_ROOT_HDR(tree);
-+	EXT_ASSERT(eh);
-+	if (ext3_ext_check_header(eh)) {
-+		/* don't free previously allocated path
-+		 * -- caller should take care */
-+		path = NULL;
-+		goto err;
-+	}
-+
-+	i = depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* account possible depth increase */
-+	if (!path) {
-+		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-+			       GFP_NOFS);
-+		if (!path)
-+			return ERR_PTR(-ENOMEM);
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[0].p_hdr = eh;
-+
-+	/* walk through the tree */
-+	while (i) {
-+		ext_debug(tree, "depth %d: num %d, max %d\n",
-+			  ppos, eh->eh_entries, eh->eh_max);
-+		ext3_ext_binsearch_idx(tree, path + ppos, block);
-+		path[ppos].p_block = path[ppos].p_idx->ei_leaf;
-+		path[ppos].p_depth = i;
-+		path[ppos].p_ext = NULL;
-+
-+		bh = sb_bread(tree->inode->i_sb, path[ppos].p_block);
-+		if (!bh)
-+			goto err;
-+
-+		eh = EXT_BLOCK_HDR(bh);
-+		ppos++;
-+		EXT_ASSERT(ppos <= depth);
-+		path[ppos].p_bh = bh;
-+		path[ppos].p_hdr = eh;
-+		i--;
-+
-+		if (ext3_ext_check_header(eh))
-+			goto err;
-+	}
-+
-+	path[ppos].p_depth = i;
-+	path[ppos].p_hdr = eh;
-+	path[ppos].p_ext = NULL;
-+	path[ppos].p_idx = NULL;
-+
-+	if (ext3_ext_check_header(eh))
-+		goto err;
-+
-+	/* find extent */
-+	ext3_ext_binsearch(tree, path + ppos, block);
-+
-+	ext3_ext_show_path(tree, path);
-+
-+	return path;
-+
-+err:
-+	printk(KERN_ERR "EXT3-fs: header is corrupted!\n");
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	return ERR_PTR(-EIO);
-+}
-+
-+/*
-+ * insert new index [logical;ptr] into the block at cupr
-+ * it check where to insert: before curp or after curp
-+ */
-+static int ext3_ext_insert_index(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *curp,
-+				 int logical, int ptr)
-+{
-+	struct ext3_extent_idx *ix;
-+	int len, err;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		return err;
-+
-+	EXT_ASSERT(logical != curp->p_idx->ei_block);
-+	len = EXT_MAX_INDEX(curp->p_hdr) - curp->p_idx;
-+	if (logical > curp->p_idx->ei_block) {
-+		/* insert after */
-+		if (curp->p_idx != EXT_LAST_INDEX(curp->p_hdr)) {
-+			len = (len - 1) * sizeof(struct ext3_extent_idx);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert new index %d after: %d. "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  logical, ptr, len,
-+				  (curp->p_idx + 1), (curp->p_idx + 2));
-+			memmove(curp->p_idx + 2, curp->p_idx + 1, len);
-+		}
-+		ix = curp->p_idx + 1;
-+	} else {
-+		/* insert before */
-+		len = len * sizeof(struct ext3_extent_idx);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert new index %d before: %d. "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  logical, ptr, len,
-+			  curp->p_idx, (curp->p_idx + 1));
-+		memmove(curp->p_idx + 1, curp->p_idx, len);
-+		ix = curp->p_idx;
-+	}
-+
-+	ix->ei_block = logical;
-+	ix->ei_leaf = ptr;
-+	ix->ei_leaf_hi = ix->ei_unused = 0;
-+	curp->p_hdr->eh_entries++;
-+
-+	EXT_ASSERT(curp->p_hdr->eh_entries <= curp->p_hdr->eh_max);
-+	EXT_ASSERT(ix <= EXT_LAST_INDEX(curp->p_hdr));
-+
-+	err = ext3_ext_dirty(handle, tree, curp);
-+	ext3_std_error(tree->inode->i_sb, err);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine inserts new subtree into the path, using free index entry
-+ * at depth 'at:
-+ *  - allocates all needed blocks (new leaf and all intermediate index blocks)
-+ *  - makes decision where to split
-+ *  - moves remaining extens and index entries (right to the split point)
-+ *    into the newly allocated blocks
-+ *  - initialize subtree
-+ */
-+static int ext3_ext_split(handle_t *handle, struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_extent *newext, int at)
-+{
-+	struct buffer_head *bh = NULL;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct ext3_extent *ex;
-+	int i = at, k, m, a;
-+	unsigned long newblock, oldblock, border;
-+	int *ablocks = NULL; /* array of allocated blocks */
-+	int err = 0;
-+
-+	/* make decision: where to split? */
-+	/* FIXME: now desicion is simplest: at current extent */
-+
-+	/* if current leaf will be splitted, then we should use 
-+	 * border from split point */
-+	EXT_ASSERT(path[depth].p_ext <= EXT_MAX_EXTENT(path[depth].p_hdr));
-+	if (path[depth].p_ext != EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		border = path[depth].p_ext[1].ee_block;
-+		ext_debug(tree, "leaf will be splitted."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	} else {
-+		border = newext->ee_block;
-+		ext_debug(tree, "leaf will be added."
-+			  " next leaf starts at %d\n",
-+			  (int)border);
-+	}
-+
-+	/* 
-+	 * if error occurs, then we break processing
-+	 * and turn filesystem read-only. so, index won't
-+	 * be inserted and tree will be in consistent
-+	 * state. next mount will repair buffers too
-+	 */
-+
-+	/*
-+	 * get array to track all allocated blocks
-+	 * we need this to handle errors and free blocks
-+	 * upon them
-+	 */
-+	ablocks = kmalloc(sizeof(unsigned long) * depth, GFP_NOFS);
-+	if (!ablocks)
-+		return -ENOMEM;
-+	memset(ablocks, 0, sizeof(unsigned long) * depth);
-+
-+	/* allocate all needed blocks */
-+	ext_debug(tree, "allocate %d blocks for indexes/leaf\n", depth - at);
-+	for (a = 0; a < depth - at; a++) {
-+		newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+		if (newblock == 0)
-+			goto cleanup;
-+		ablocks[a] = newblock;
-+	}
-+
-+	/* initialize new leaf */
-+	newblock = ablocks[--a];
-+	EXT_ASSERT(newblock);
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		goto cleanup;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh)))
-+		goto cleanup;
-+
-+	neh = EXT_BLOCK_HDR(bh);
-+	neh->eh_entries = 0;
-+	neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	neh->eh_depth = 0;
-+	ex = EXT_FIRST_EXTENT(neh);
-+
-+	/* move remain of path[depth] to the new leaf */
-+	EXT_ASSERT(path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max);
-+	/* start copy from next extent */
-+	/* TODO: we could do it by single memmove */
-+	m = 0;
-+	path[depth].p_ext++;
-+	while (path[depth].p_ext <=
-+			EXT_MAX_EXTENT(path[depth].p_hdr)) {
-+		ext_debug(tree, "move %d:%d:%d in new leaf %lu\n",
-+			  path[depth].p_ext->ee_block,
-+			  path[depth].p_ext->ee_start,
-+			  path[depth].p_ext->ee_len,
-+			  newblock);
-+		memmove(ex++, path[depth].p_ext++, sizeof(struct ext3_extent));
-+		neh->eh_entries++;
-+		m++;
-+	}
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto cleanup;	
-+	brelse(bh);
-+	bh = NULL;
-+
-+	/* correct old leaf */
-+	if (m) {
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			goto cleanup;
-+		path[depth].p_hdr->eh_entries -= m;
-+		if ((err = ext3_ext_dirty(handle, tree, path + depth)))
-+			goto cleanup;
-+		
-+	}
-+
-+	/* create intermediate indexes */
-+	k = depth - at - 1;
-+	EXT_ASSERT(k >= 0);
-+	if (k)
-+		ext_debug(tree,	"create %d intermediate indices\n", k);
-+	/* insert new index into current index block */
-+	/* current depth stored in i var */
-+	i = depth - 1;
-+	while (k--) {
-+		oldblock = newblock;
-+		newblock = ablocks[--a];
-+		bh = sb_getblk(tree->inode->i_sb, newblock);
-+		if (!bh) {
-+			err = -EIO;
-+			goto cleanup;
-+		}
-+		lock_buffer(bh);
-+
-+		if ((err = ext3_journal_get_create_access(handle, bh)))
-+			goto cleanup;
-+
-+		neh = EXT_BLOCK_HDR(bh);
-+		neh->eh_entries = 1;
-+		neh->eh_magic = EXT3_EXT_MAGIC;
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+		neh->eh_depth = depth - i; 
-+		fidx = EXT_FIRST_INDEX(neh);
-+		fidx->ei_block = border;
-+		fidx->ei_leaf = oldblock;
-+		fidx->ei_leaf_hi = fidx->ei_unused = 0;
-+
-+		ext_debug(tree,	"int.index at %d (block %lu): %lu -> %lu\n",
-+			  i, newblock, border, oldblock);
-+		/* copy indexes */
-+		m = 0;
-+		path[i].p_idx++;
-+
-+		ext_debug(tree, "cur 0x%p, last 0x%p\n", path[i].p_idx,
-+			  EXT_MAX_INDEX(path[i].p_hdr));
-+		EXT_ASSERT(EXT_MAX_INDEX(path[i].p_hdr) ==
-+			   EXT_LAST_INDEX(path[i].p_hdr));
-+		while (path[i].p_idx <= EXT_MAX_INDEX(path[i].p_hdr)) {
-+			ext_debug(tree, "%d: move %d:%d in new index %lu\n",
-+				  i, path[i].p_idx->ei_block,
-+				  path[i].p_idx->ei_leaf, newblock);
-+			memmove(++fidx, path[i].p_idx++,
-+				sizeof(struct ext3_extent_idx));
-+			neh->eh_entries++;
-+			EXT_ASSERT(neh->eh_entries <= neh->eh_max);
-+			m++;
-+		}
-+		set_buffer_uptodate(bh);
-+		unlock_buffer(bh);
-+
-+		if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+			goto cleanup;
-+		brelse(bh);
-+		bh = NULL;
-+
-+		/* correct old index */
-+		if (m) {
-+			err = ext3_ext_get_access(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+			path[i].p_hdr->eh_entries -= m;
-+			err = ext3_ext_dirty(handle, tree, path + i);
-+			if (err)
-+				goto cleanup;
-+		}
-+
-+		i--;
-+	}
-+
-+	/* insert new index */
-+	if (!err)
-+		err = ext3_ext_insert_index(handle, tree, path + at,
-+					    border, newblock);
-+
-+cleanup:
-+	if (bh) {
-+		if (buffer_locked(bh))
-+			unlock_buffer(bh);
-+		brelse(bh);
-+	}
-+
-+	if (err) {
-+		/* free all allocated blocks in error case */
-+		for (i = 0; i < depth; i++) {
-+			if (!ablocks[i])
-+				continue;
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+		}
-+	}
-+	kfree(ablocks);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine implements tree growing procedure:
-+ *  - allocates new block
-+ *  - moves top-level data (index block or leaf) into the new block
-+ *  - initialize new top-level, creating index that points to the
-+ *    just created block
-+ */
-+static int ext3_ext_grow_indepth(handle_t *handle,
-+				 struct ext3_extents_tree *tree,
-+				 struct ext3_ext_path *path,
-+				 struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp = path;
-+	struct ext3_extent_header *neh;
-+	struct ext3_extent_idx *fidx;
-+	struct buffer_head *bh;
-+	unsigned long newblock;
-+	int err = 0;
-+
-+	newblock = ext3_ext_new_block(handle, tree, path, newext, &err);
-+	if (newblock == 0)
-+		return err;
-+
-+	bh = sb_getblk(tree->inode->i_sb, newblock);
-+	if (!bh) {
-+		err = -EIO;
-+		ext3_std_error(tree->inode->i_sb, err);
-+		return err;
-+	}
-+	lock_buffer(bh);
-+
-+	if ((err = ext3_journal_get_create_access(handle, bh))) {
-+		unlock_buffer(bh);
-+		goto out;	
-+	}
-+
-+	/* move top-level index/leaf into new block */
-+	memmove(bh->b_data, curp->p_hdr, tree->buffer_len);
-+
-+	/* set size of new block */
-+	neh = EXT_BLOCK_HDR(bh);
-+	/* old root could have indexes or leaves
-+	 * so calculate eh_max right way */
-+	if (EXT_DEPTH(tree))
-+		neh->eh_max = ext3_ext_space_block_idx(tree);
-+	else
-+		neh->eh_max = ext3_ext_space_block(tree);
-+	neh->eh_magic = EXT3_EXT_MAGIC;
-+	set_buffer_uptodate(bh);
-+	unlock_buffer(bh);
-+
-+	if ((err = ext3_journal_dirty_metadata(handle, bh)))
-+		goto out;
-+
-+	/* create index in new top-level index: num,max,pointer */
-+	if ((err = ext3_ext_get_access(handle, tree, curp)))
-+		goto out;
-+
-+	curp->p_hdr->eh_magic = EXT3_EXT_MAGIC;
-+	curp->p_hdr->eh_max = ext3_ext_space_root_idx(tree);
-+	curp->p_hdr->eh_entries = 1;
-+	curp->p_idx = EXT_FIRST_INDEX(curp->p_hdr);
-+	/* FIXME: it works, but actually path[0] can be index */
-+	curp->p_idx->ei_block = EXT_FIRST_EXTENT(path[0].p_hdr)->ee_block;
-+	curp->p_idx->ei_leaf = newblock;
-+	curp->p_idx->ei_leaf_hi = curp->p_idx->ei_unused = 0;
-+
-+	neh = EXT_ROOT_HDR(tree);
-+	fidx = EXT_FIRST_INDEX(neh);
-+	ext_debug(tree, "new root: num %d(%d), lblock %d, ptr %d\n",
-+		  neh->eh_entries, neh->eh_max, fidx->ei_block, fidx->ei_leaf); 
-+
-+	neh->eh_depth = path->p_depth + 1;
-+	err = ext3_ext_dirty(handle, tree, curp);
-+out:
-+	brelse(bh);
-+
-+	return err;
-+}
-+
-+/*
-+ * routine finds empty index and adds new leaf. if no free index found
-+ * then it requests in-depth growing
-+ */
-+static int ext3_ext_create_new_leaf(handle_t *handle,
-+				    struct ext3_extents_tree *tree,
-+				    struct ext3_ext_path *path,
-+				    struct ext3_extent *newext)
-+{
-+	struct ext3_ext_path *curp;
-+	int depth, i, err = 0;
-+
-+repeat:
-+	i = depth = EXT_DEPTH(tree);
-+	
-+	/* walk up to the tree and look for free index entry */
-+	curp = path + depth;
-+	while (i > 0 && !EXT_HAS_FREE_INDEX(curp)) {
-+		i--;
-+		curp--;
-+	}
-+
-+	/* we use already allocated block for index block
-+	 * so, subsequent data blocks should be contigoues */
-+	if (EXT_HAS_FREE_INDEX(curp)) {
-+		/* if we found index with free entry, then use that
-+		 * entry: create all needed subtree and add new leaf */
-+		err = ext3_ext_split(handle, tree, path, newext, i);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+	} else {
-+		/* tree is full, time to grow in depth */
-+		err = ext3_ext_grow_indepth(handle, tree, path, newext);
-+
-+		/* refill path */
-+		ext3_ext_drop_refs(path);
-+		path = ext3_ext_find_extent(tree, newext->ee_block, path);
-+		if (IS_ERR(path))
-+			err = PTR_ERR(path);
-+
-+		/*
-+		 * only first (depth 0 -> 1) produces free space
-+		 * in all other cases we have to split growed tree
-+		 */
-+		depth = EXT_DEPTH(tree);
-+		if (path[depth].p_hdr->eh_entries == path[depth].p_hdr->eh_max) {
-+			/* now we need split */
-+			goto repeat;
-+		}
-+	}
-+
-+	if (err)
-+		return err;
-+
-+	return 0;
-+}
-+
-+/*
-+ * returns allocated block in subsequent extent or EXT_MAX_BLOCK
-+ * NOTE: it consider block number from index entry as
-+ * allocated block. thus, index entries have to be consistent
-+ * with leafs
-+ */
-+static unsigned long
-+ext3_ext_next_allocated_block(struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	if (depth == 0 && path->p_ext == NULL)
-+		return EXT_MAX_BLOCK;
-+
-+	/* FIXME: what if index isn't full ?! */
-+	while (depth >= 0) {
-+		if (depth == path->p_depth) {
-+			/* leaf */
-+			if (path[depth].p_ext !=
-+			    EXT_LAST_EXTENT(path[depth].p_hdr))
-+				return path[depth].p_ext[1].ee_block;
-+		} else {
-+			/* index */
-+			if (path[depth].p_idx !=
-+			    EXT_LAST_INDEX(path[depth].p_hdr))
-+				return path[depth].p_idx[1].ei_block;
-+		}
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * returns first allocated block from next leaf or EXT_MAX_BLOCK
-+ */
-+static unsigned ext3_ext_next_leaf_block(struct ext3_extents_tree *tree,
-+					 struct ext3_ext_path *path)
-+{
-+	int depth;
-+
-+	EXT_ASSERT(path != NULL);
-+	depth = path->p_depth;
-+
-+	/* zero-tree has no leaf blocks at all */
-+	if (depth == 0)
-+		return EXT_MAX_BLOCK;
-+
-+	/* go to index block */
-+	depth--;
-+	
-+	while (depth >= 0) {
-+		if (path[depth].p_idx !=
-+		    EXT_LAST_INDEX(path[depth].p_hdr))
-+			return path[depth].p_idx[1].ei_block;
-+		depth--;        
-+	}
-+
-+	return EXT_MAX_BLOCK;
-+}
-+
-+/*
-+ * if leaf gets modified and modified extent is first in the leaf
-+ * then we have to correct all indexes above
-+ * TODO: do we need to correct tree in all cases?
-+ */
-+int ext3_ext_correct_indexes(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path)
-+{
-+	struct ext3_extent_header *eh;
-+	int depth = EXT_DEPTH(tree);	
-+	struct ext3_extent *ex;
-+	unsigned long border;
-+	int k, err = 0;
-+	
-+	eh = path[depth].p_hdr;
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(eh);
-+	
-+	if (depth == 0) {
-+		/* there is no tree at all */
-+		return 0;
-+	}
-+	
-+	if (ex != EXT_FIRST_EXTENT(eh)) {
-+		/* we correct tree if first leaf got modified only */
-+		return 0;
-+	}
-+	
-+	/*
-+	 * TODO: we need correction if border is smaller then current one
-+	 */
-+	k = depth - 1;
-+	border = path[depth].p_ext->ee_block;
-+	if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+		return err;
-+	path[k].p_idx->ei_block = border;
-+	if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+		return err;
-+
-+	while (k--) {
-+		/* change all left-side indexes */
-+		if (path[k+1].p_idx != EXT_FIRST_INDEX(path[k+1].p_hdr))
-+			break;
-+		if ((err = ext3_ext_get_access(handle, tree, path + k)))
-+			break;
-+		path[k].p_idx->ei_block = border;
-+		if ((err = ext3_ext_dirty(handle, tree, path + k)))
-+			break;
-+	}
-+
-+	return err;
-+}
-+
-+static int inline
-+ext3_can_extents_be_merged(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex1,
-+			   struct ext3_extent *ex2)
-+{
-+	if (ex1->ee_block + ex1->ee_len != ex2->ee_block)
-+		return 0;
-+
-+#ifdef AGRESSIVE_TEST
-+	if (ex1->ee_len >= 4)
-+		return 0;
-+#endif
-+
-+	if (!tree->ops->mergable)
-+		return 1;
-+
-+	return tree->ops->mergable(ex1, ex2);
-+}
-+
-+/*
-+ * this routine tries to merge requsted extent into the existing
-+ * extent or inserts requested extent as new one into the tree,
-+ * creating new leaf in no-space case
-+ */
-+int ext3_ext_insert_extent(handle_t *handle, struct ext3_extents_tree *tree,
-+			   struct ext3_ext_path *path,
-+			   struct ext3_extent *newext)
-+{
-+	struct ext3_extent_header * eh;
-+	struct ext3_extent *ex, *fex;
-+	struct ext3_extent *nearex; /* nearest extent */
-+	struct ext3_ext_path *npath = NULL;
-+	int depth, len, err, next;
-+
-+	EXT_ASSERT(newext->ee_len > 0);
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(path[depth].p_hdr);
-+
-+	/* try to insert block into found extent and return */
-+	if (ex && ext3_can_extents_be_merged(tree, ex, newext)) {
-+		ext_debug(tree, "append %d block to %d:%d (from %d)\n",
-+			  newext->ee_len, ex->ee_block, ex->ee_len,
-+			  ex->ee_start);
-+		if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+			return err;
-+		ex->ee_len += newext->ee_len;
-+		eh = path[depth].p_hdr;
-+		nearex = ex;
-+		goto merge;
-+	}
-+
-+repeat:
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+	if (eh->eh_entries < eh->eh_max)
-+		goto has_space;
-+
-+	/* probably next leaf has space for us? */
-+	fex = EXT_LAST_EXTENT(eh);
-+	next = ext3_ext_next_leaf_block(tree, path);
-+	if (newext->ee_block > fex->ee_block && next != EXT_MAX_BLOCK) {
-+		ext_debug(tree, "next leaf block - %d\n", next);
-+		EXT_ASSERT(!npath);
-+		npath = ext3_ext_find_extent(tree, next, NULL);
-+		if (IS_ERR(npath))
-+			return PTR_ERR(npath);
-+		EXT_ASSERT(npath->p_depth == path->p_depth);
-+		eh = npath[depth].p_hdr;
-+		if (eh->eh_entries < eh->eh_max) {
-+			ext_debug(tree,	"next leaf isnt full(%d)\n",
-+				  eh->eh_entries);
-+			path = npath;
-+			goto repeat;
-+		}
-+		ext_debug(tree, "next leaf hasno free space(%d,%d)\n",
-+			  eh->eh_entries, eh->eh_max);
-+	}
-+
-+	/*
-+	 * there is no free space in found leaf
-+	 * we're gonna add new leaf in the tree
-+	 */
-+	err = ext3_ext_create_new_leaf(handle, tree, path, newext);
-+	if (err)
-+		goto cleanup;
-+	depth = EXT_DEPTH(tree);
-+	eh = path[depth].p_hdr;
-+
-+has_space:
-+	nearex = path[depth].p_ext;
-+
-+	if ((err = ext3_ext_get_access(handle, tree, path + depth)))
-+		goto cleanup;
-+
-+	if (!nearex) {
-+		/* there is no extent in this leaf, create first one */
-+		ext_debug(tree, "first extent in the leaf: %d:%d:%d\n",
-+			  newext->ee_block, newext->ee_start,
-+			  newext->ee_len);
-+		path[depth].p_ext = EXT_FIRST_EXTENT(eh);
-+	} else if (newext->ee_block > nearex->ee_block) {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		if (nearex != EXT_LAST_EXTENT(eh)) {
-+			len = EXT_MAX_EXTENT(eh) - nearex;
-+			len = (len - 1) * sizeof(struct ext3_extent);
-+			len = len < 0 ? 0 : len;
-+			ext_debug(tree, "insert %d:%d:%d after: nearest 0x%p, "
-+				  "move %d from 0x%p to 0x%p\n",
-+				  newext->ee_block, newext->ee_start,
-+				  newext->ee_len,
-+				  nearex, len, nearex + 1, nearex + 2);
-+			memmove(nearex + 2, nearex + 1, len);
-+		}
-+		path[depth].p_ext = nearex + 1;
-+	} else {
-+		EXT_ASSERT(newext->ee_block != nearex->ee_block);
-+		len = (EXT_MAX_EXTENT(eh) - nearex) * sizeof(struct ext3_extent);
-+		len = len < 0 ? 0 : len;
-+		ext_debug(tree, "insert %d:%d:%d before: nearest 0x%p, "
-+			  "move %d from 0x%p to 0x%p\n",
-+			  newext->ee_block, newext->ee_start, newext->ee_len,
-+			  nearex, len, nearex + 1, nearex + 2);
-+		memmove(nearex + 1, nearex, len);
-+		path[depth].p_ext = nearex;
-+	}
-+
-+	eh->eh_entries++;
-+	nearex = path[depth].p_ext;
-+	nearex->ee_block = newext->ee_block;
-+	nearex->ee_start = newext->ee_start;
-+	nearex->ee_len = newext->ee_len;
-+	/* FIXME: support for large fs */
-+	nearex->ee_start_hi = 0;
-+
-+merge:
-+	/* try to merge extents to the right */
-+	while (nearex < EXT_LAST_EXTENT(eh)) {
-+		if (!ext3_can_extents_be_merged(tree, nearex, nearex + 1))
-+			break;
-+		/* merge with next extent! */
-+		nearex->ee_len += nearex[1].ee_len;
-+		if (nearex + 1 < EXT_LAST_EXTENT(eh)) {
-+			len = (EXT_LAST_EXTENT(eh) - nearex - 1) *
-+				sizeof(struct ext3_extent);
-+			memmove(nearex + 1, nearex + 2, len);
-+		}
-+		eh->eh_entries--;
-+		EXT_ASSERT(eh->eh_entries > 0);
-+	}
-+
-+	/* try to merge extents to the left */
-+
-+	/* time to correct all indexes above */
-+	err = ext3_ext_correct_indexes(handle, tree, path);
-+	if (err)
-+		goto cleanup;
-+
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+
-+cleanup:
-+	if (npath) {
-+		ext3_ext_drop_refs(npath);
-+		kfree(npath);
-+	}
-+	ext3_ext_tree_changed(tree);
-+	ext3_ext_invalidate_cache(tree);
-+	return err;
-+}
-+
-+int ext3_ext_walk_space(struct ext3_extents_tree *tree, unsigned long block,
-+			unsigned long num, ext_prepare_callback func)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_ext_cache cbex;
-+	struct ext3_extent *ex;
-+	unsigned long next, start = 0, end = 0;
-+	unsigned long last = block + num;
-+	int depth, exists, err = 0;
-+
-+	EXT_ASSERT(tree);
-+	EXT_ASSERT(func);
-+	EXT_ASSERT(tree->inode);
-+	EXT_ASSERT(tree->root);
-+
-+	while (block < last && block != EXT_MAX_BLOCK) {
-+		num = last - block;
-+		/* find extent for this block */
-+		path = ext3_ext_find_extent(tree, block, path);
-+		if (IS_ERR(path)) {
-+			err = PTR_ERR(path);
-+			path = NULL;
-+			break;
-+		}
-+
-+		depth = EXT_DEPTH(tree);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		ex = path[depth].p_ext;
-+		next = ext3_ext_next_allocated_block(path);
-+
-+		exists = 0;
-+		if (!ex) {
-+			/* there is no extent yet, so try to allocate
-+			 * all requested space */
-+			start = block;
-+			end = block + num;
-+		} else if (ex->ee_block > block) {
-+			/* need to allocate space before found extent */
-+			start = block;
-+			end = ex->ee_block;
-+			if (block + num < end)
-+				end = block + num;
-+		} else if (block >= ex->ee_block + ex->ee_len) {
-+			/* need to allocate space after found extent */
-+			start = block;
-+			end = block + num;
-+			if (end >= next)
-+				end = next;
-+		} else if (block >= ex->ee_block) {
-+			/* 
-+			 * some part of requested space is covered
-+			 * by found extent
-+			 */
-+			start = block;
-+			end = ex->ee_block + ex->ee_len;
-+			if (block + num < end)
-+				end = block + num;
-+			exists = 1;
-+		} else {
-+			BUG();
-+		}
-+		EXT_ASSERT(end > start);
-+
-+		if (!exists) {
-+			cbex.ec_block = start;
-+			cbex.ec_len = end - start;
-+			cbex.ec_start = 0;
-+			cbex.ec_type = EXT3_EXT_CACHE_GAP;
-+		} else {
-+			cbex.ec_block = ex->ee_block;
-+			cbex.ec_len = ex->ee_len;
-+			cbex.ec_start = ex->ee_start;
-+			cbex.ec_type = EXT3_EXT_CACHE_EXTENT;
-+		}
-+
-+		EXT_ASSERT(cbex.ec_len > 0);
-+		EXT_ASSERT(path[depth].p_hdr);
-+		err = func(tree, path, &cbex);
-+		ext3_ext_drop_refs(path);
-+
-+		if (err < 0)
-+			break;
-+		if (err == EXT_REPEAT)
-+			continue;
-+		else if (err == EXT_BREAK) {
-+			err = 0;
-+			break;
-+		}
-+
-+		if (EXT_DEPTH(tree) != depth) {
-+			/* depth was changed. we have to realloc path */
-+			kfree(path);
-+			path = NULL;
-+		}
-+
-+		block = cbex.ec_block + cbex.ec_len;
-+	}
-+
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+
-+	return err;
-+}
-+
-+static inline void
-+ext3_ext_put_in_cache(struct ext3_extents_tree *tree, __u32 block,
-+		      __u32 len, __u32 start, int type)
-+{
-+	EXT_ASSERT(len > 0);
-+	if (tree->cex) {
-+		tree->cex->ec_type = type;
-+		tree->cex->ec_block = block;
-+		tree->cex->ec_len = len;
-+		tree->cex->ec_start = start;
-+	}
-+}
-+
-+/*
-+ * this routine calculate boundaries of the gap requested block fits into
-+ * and cache this gap
-+ */
-+static inline void
-+ext3_ext_put_gap_in_cache(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  unsigned long block)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	unsigned long lblock, len;
-+	struct ext3_extent *ex;
-+
-+	if (!tree->cex)
-+		return;
-+
-+	ex = path[depth].p_ext;
-+	if (ex == NULL) {
-+		/* there is no extent yet, so gap is [0;-] */
-+		lblock = 0;
-+		len = EXT_MAX_BLOCK;
-+		ext_debug(tree, "cache gap(whole file):");
-+	} else if (block < ex->ee_block) {
-+		lblock = block;
-+		len = ex->ee_block - block;
-+		ext_debug(tree, "cache gap(before): %lu [%lu:%lu]",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len);
-+	} else if (block >= ex->ee_block + ex->ee_len) {
-+		lblock = ex->ee_block + ex->ee_len;
-+		len = ext3_ext_next_allocated_block(path);
-+		ext_debug(tree, "cache gap(after): [%lu:%lu] %lu",
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) block);
-+		EXT_ASSERT(len > lblock);
-+		len = len - lblock;
-+	} else {
-+		lblock = len = 0;
-+		BUG();
-+	}
-+
-+	ext_debug(tree, " -> %lu:%lu\n", (unsigned long) lblock, len);
-+	ext3_ext_put_in_cache(tree, lblock, len, 0, EXT3_EXT_CACHE_GAP);
-+}
-+
-+static inline int
-+ext3_ext_in_cache(struct ext3_extents_tree *tree, unsigned long block,
-+		  struct ext3_extent *ex)
-+{
-+	struct ext3_ext_cache *cex = tree->cex;
-+
-+	/* is there cache storage at all? */
-+	if (!cex)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	/* has cache valid data? */
-+	if (cex->ec_type == EXT3_EXT_CACHE_NO)
-+		return EXT3_EXT_CACHE_NO;
-+
-+	EXT_ASSERT(cex->ec_type == EXT3_EXT_CACHE_GAP ||
-+		   cex->ec_type == EXT3_EXT_CACHE_EXTENT);
-+	if (block >= cex->ec_block && block < cex->ec_block + cex->ec_len) {
-+		ex->ee_block = cex->ec_block;
-+		ex->ee_start = cex->ec_start;
-+		ex->ee_start_hi = 0;
-+		ex->ee_len = cex->ec_len;
-+		ext_debug(tree, "%lu cached by %lu:%lu:%lu\n",
-+			  (unsigned long) block,
-+			  (unsigned long) ex->ee_block,
-+			  (unsigned long) ex->ee_len,
-+			  (unsigned long) ex->ee_start);
-+		return cex->ec_type;
-+	}
-+
-+	/* not in cache */
-+	return EXT3_EXT_CACHE_NO;
-+}
-+
-+/*
-+ * routine removes index from the index block
-+ * it's used in truncate case only. thus all requests are for
-+ * last index in the block only
-+ */
-+int ext3_ext_rm_idx(handle_t *handle, struct ext3_extents_tree *tree,
-+		    struct ext3_ext_path *path)
-+{
-+	struct buffer_head *bh;
-+	int err;
-+	
-+	/* free index block */
-+	path--;
-+	EXT_ASSERT(path->p_hdr->eh_entries);
-+	if ((err = ext3_ext_get_access(handle, tree, path)))
-+		return err;
-+	path->p_hdr->eh_entries--;
-+	if ((err = ext3_ext_dirty(handle, tree, path)))
-+		return err;
-+	ext_debug(tree, "index is empty, remove it, free block %d\n",
-+		  path->p_idx->ei_leaf);
-+	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
-+	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	return err;
-+}
-+
-+int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *tree,
-+				     struct ext3_ext_path *path)
-+{
-+	int depth = EXT_DEPTH(tree);
-+	int needed;
-+
-+	if (path) {
-+		/* probably there is space in leaf? */
-+		if (path[depth].p_hdr->eh_entries < path[depth].p_hdr->eh_max)
-+			return 1;
-+	}
-+	
-+	/*
-+	 * the worste case we're expecting is creation of the
-+	 * new root (growing in depth) with index splitting
-+	 * for splitting we have to consider depth + 1 because
-+	 * previous growing could increase it
-+	 */
-+	depth = depth + 1;
-+
-+	/* 
-+	 * growing in depth:
-+	 * block allocation + new root + old root
-+	 */
-+	needed = EXT3_ALLOC_NEEDED + 2;
-+
-+	/* index split. we may need:
-+	 *   allocate intermediate indexes and new leaf
-+	 *   change two blocks at each level, but root
-+	 *   modify root block (inode)
-+	 */
-+	needed += (depth * EXT3_ALLOC_NEEDED) + (2 * depth) + 1;
-+
-+	return needed;
-+}
-+
-+static int
-+ext3_ext_split_for_rm(handle_t *handle, struct ext3_extents_tree *tree,
-+		      struct ext3_ext_path *path, unsigned long start,
-+		      unsigned long end)
-+{
-+	struct ext3_extent *ex, tex;
-+	struct ext3_ext_path *npath;
-+	int depth, creds, err;
-+
-+	depth = EXT_DEPTH(tree);
-+	ex = path[depth].p_ext;
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(end < ex->ee_block + ex->ee_len - 1);
-+	EXT_ASSERT(ex->ee_block < start);
-+
-+	/* calculate tail extent */
-+	tex.ee_block = end + 1;
-+	EXT_ASSERT(tex.ee_block < ex->ee_block + ex->ee_len);
-+	tex.ee_len = ex->ee_block + ex->ee_len - tex.ee_block;
-+
-+	creds = ext3_ext_calc_credits_for_insert(tree, path);
-+	handle = ext3_ext_journal_restart(handle, creds);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	
-+	/* calculate head extent. use primary extent */
-+	err = ext3_ext_get_access(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+	ex->ee_len = start - ex->ee_block;
-+	err = ext3_ext_dirty(handle, tree, path + depth);
-+	if (err)
-+		return err;
-+
-+	/* FIXME: some callback to free underlying resource
-+	 * and correct ee_start? */
-+	ext_debug(tree, "split extent: head %u:%u, tail %u:%u\n",
-+		  ex->ee_block, ex->ee_len, tex.ee_block, tex.ee_len);
-+
-+	npath = ext3_ext_find_extent(tree, ex->ee_block, NULL);
-+	if (IS_ERR(npath))
-+		return PTR_ERR(npath);
-+	depth = EXT_DEPTH(tree);
-+	EXT_ASSERT(npath[depth].p_ext->ee_block == ex->ee_block);
-+	EXT_ASSERT(npath[depth].p_ext->ee_len == ex->ee_len);
-+
-+	err = ext3_ext_insert_extent(handle, tree, npath, &tex);
-+	ext3_ext_drop_refs(npath);
-+	kfree(npath);
-+
-+	return err;
-+}
-+
-+static int
-+ext3_ext_rm_leaf(handle_t *handle, struct ext3_extents_tree *tree,
-+		 struct ext3_ext_path *path, unsigned long start,
-+		 unsigned long end)
-+{
-+	struct ext3_extent *ex, *fu = NULL, *lu, *le;
-+	int err = 0, correct_index = 0;
-+	int depth = EXT_DEPTH(tree), credits;
-+	struct ext3_extent_header *eh;
-+	unsigned a, b, block, num;
-+
-+	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
-+	if (!path[depth].p_hdr)
-+		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+	eh = path[depth].p_hdr;
-+	EXT_ASSERT(eh);
-+	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-+	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
-+	
-+	/* find where to start removing */
-+	le = ex = EXT_LAST_EXTENT(eh);
-+	while (ex != EXT_FIRST_EXTENT(eh)) {
-+		if (ex->ee_block <= end)
-+			break;
-+		ex--;
-+	}
-+
-+	if (start > ex->ee_block && end < ex->ee_block + ex->ee_len - 1) {
-+		/* removal of internal part of the extent requested
-+		 * tail and head must be placed in different extent
-+		 * so, we have to insert one more extent */
-+		path[depth].p_ext = ex;
-+		return ext3_ext_split_for_rm(handle, tree, path, start, end);
-+	}
-+	
-+	lu = ex;
-+	while (ex >= EXT_FIRST_EXTENT(eh) && ex->ee_block + ex->ee_len > start) {
-+		ext_debug(tree, "remove ext %u:%u\n", ex->ee_block, ex->ee_len);
-+		path[depth].p_ext = ex;
-+	
-+		a = ex->ee_block > start ? ex->ee_block : start;
-+		b = ex->ee_block + ex->ee_len - 1 < end ?
-+			ex->ee_block + ex->ee_len - 1 : end;
-+		
-+		ext_debug(tree, "  border %u:%u\n", a, b);
-+
-+		if (a != ex->ee_block && b != ex->ee_block + ex->ee_len - 1) {
-+			block = 0;
-+			num = 0;
-+			BUG();
-+		} else if (a != ex->ee_block) {
-+			/* remove tail of the extent */
-+			block = ex->ee_block;
-+			num = a - block;
-+		} else if (b != ex->ee_block + ex->ee_len - 1) {
-+			/* remove head of the extent */
-+			block = a;
-+			num = b - a;
-+		} else {
-+			/* remove whole extent: excelent! */
-+			block = ex->ee_block; 
-+			num = 0;
-+			EXT_ASSERT(a == ex->ee_block &&
-+				   b == ex->ee_block + ex->ee_len - 1);
-+		}
-+
-+		if (ex == EXT_FIRST_EXTENT(eh))
-+			correct_index = 1;
-+
-+		credits = 1;
-+		if (correct_index)
-+			credits += (EXT_DEPTH(tree) * EXT3_ALLOC_NEEDED) + 1;
-+		if (tree->ops->remove_extent_credits)
-+			credits+=tree->ops->remove_extent_credits(tree,ex,a,b);
-+		
-+		handle = ext3_ext_journal_restart(handle, credits);
-+		if (IS_ERR(handle)) {
-+			err = PTR_ERR(handle);
-+			goto out;
-+		}
-+
-+		err = ext3_ext_get_access(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		if (tree->ops->remove_extent)
-+			err = tree->ops->remove_extent(tree, ex, a, b);
-+		if (err)
-+			goto out;
-+
-+		if (num == 0) {
-+			/* this extent is removed entirely mark slot unused */
-+			ex->ee_start = ex->ee_start_hi = 0;
-+			eh->eh_entries--;
-+			fu = ex;
-+		}
-+
-+		ex->ee_block = block;
-+		ex->ee_len = num;
-+
-+		err = ext3_ext_dirty(handle, tree, path + depth);
-+		if (err)
-+			goto out;
-+
-+		ext_debug(tree, "new extent: %u:%u:%u\n",
-+			  ex->ee_block, ex->ee_len, ex->ee_start);
-+		ex--;
-+	}
-+
-+	if (fu) {
-+		/* reuse unused slots */
-+		while (lu < le) {
-+			if (lu->ee_start) {
-+				*fu = *lu;
-+				lu->ee_start = lu->ee_start_hi = 0;
-+				fu++;
-+			}
-+			lu++;
-+		}
-+	}
-+
-+	if (correct_index && eh->eh_entries)
-+		err = ext3_ext_correct_indexes(handle, tree, path);
-+
-+	/* if this leaf is free, then we should
-+	 * remove it from index block above */
-+	if (err == 0 && eh->eh_entries == 0 && path[depth].p_bh != NULL)
-+		err = ext3_ext_rm_idx(handle, tree, path + depth);
-+
-+out:
-+	return err;
-+}
-+
-+
-+static struct ext3_extent_idx *
-+ext3_ext_last_covered(struct ext3_extent_header *hdr, unsigned long block)
-+{
-+	struct ext3_extent_idx *ix;
-+	
-+	ix = EXT_LAST_INDEX(hdr);
-+	while (ix != EXT_FIRST_INDEX(hdr)) {
-+		if (ix->ei_block <= block)
-+			break;
-+		ix--;
-+	}
-+	return ix;
-+}
-+
-+/*
-+ * returns 1 if current index have to be freed (even partial)
-+ */
-+static int inline
-+ext3_ext_more_to_rm(struct ext3_ext_path *path)
-+{
-+	EXT_ASSERT(path->p_idx);
-+
-+	if (path->p_idx < EXT_FIRST_INDEX(path->p_hdr))
-+		return 0;
-+
-+	/*
-+	 * if truncate on deeper level happened it it wasn't partial
-+	 * so we have to consider current index for truncation
-+	 */
-+	if (path->p_hdr->eh_entries == path->p_block)
-+		return 0;
-+	return 1;
-+}
-+
-+int ext3_ext_remove_space(struct ext3_extents_tree *tree,
-+			  unsigned long start, unsigned long end)
-+{
-+	struct inode *inode = tree->inode;
-+	struct super_block *sb = inode->i_sb;
-+	int depth = EXT_DEPTH(tree);
-+	struct ext3_ext_path *path;
-+	handle_t *handle;
-+	int i = 0, err = 0;
-+
-+	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
-+
-+	/* probably first extent we're gonna free will be last in block */
-+	handle = ext3_journal_start(inode, depth + 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	ext3_ext_invalidate_cache(tree);
-+
-+	/*
-+	 * we start scanning from right side freeing all the blocks
-+	 * after i_size and walking into the deep
-+	 */
-+	path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 1), GFP_KERNEL);
-+	if (IS_ERR(path)) {
-+		ext3_error(sb, __FUNCTION__, "Can't allocate path array");
-+		ext3_journal_stop(handle);
-+		return -ENOMEM;
-+	}
-+	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
-+	path[i].p_hdr = EXT_ROOT_HDR(tree);
-+	
-+	while (i >= 0 && err == 0) {
-+		if (i == depth) {
-+			/* this is leaf block */
-+			err = ext3_ext_rm_leaf(handle, tree, path, start, end);
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			continue;
-+		}
-+		
-+		/* this is index block */
-+		if (!path[i].p_hdr) {
-+			ext_debug(tree, "initialize header\n");
-+			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
-+		}
-+
-+		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
-+		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
-+		
-+		if (!path[i].p_idx) {
-+			/* this level hasn't touched yet */
-+			path[i].p_idx =
-+				ext3_ext_last_covered(path[i].p_hdr, end);
-+			path[i].p_block = path[i].p_hdr->eh_entries + 1;
-+			ext_debug(tree, "init index ptr: hdr 0x%p, num %d\n",
-+				  path[i].p_hdr, path[i].p_hdr->eh_entries);
-+		} else {
-+			/* we've already was here, see at next index */
-+			path[i].p_idx--;
-+		}
-+
-+		ext_debug(tree, "level %d - index, first 0x%p, cur 0x%p\n",
-+			  i, EXT_FIRST_INDEX(path[i].p_hdr),
-+			  path[i].p_idx);
-+		if (ext3_ext_more_to_rm(path + i)) {
-+			/* go to the next level */
-+			ext_debug(tree, "move to level %d (block %d)\n",
-+				  i + 1, path[i].p_idx->ei_leaf);
-+			memset(path + i + 1, 0, sizeof(*path));
-+			path[i+1].p_bh = sb_bread(sb, path[i].p_idx->ei_leaf);
-+			if (!path[i+1].p_bh) {
-+				/* should we reset i_size? */
-+				err = -EIO;
-+				break;
-+			}
-+			/* put actual number of indexes to know is this
-+			 * number got changed at the next iteration */
-+			path[i].p_block = path[i].p_hdr->eh_entries;
-+			i++;
-+		} else {
-+			/* we finish processing this index, go up */
-+			if (path[i].p_hdr->eh_entries == 0 && i > 0) {
-+				/* index is empty, remove it
-+				 * handle must be already prepared by the
-+				 * truncatei_leaf() */
-+				err = ext3_ext_rm_idx(handle, tree, path + i);
-+			}
-+			/* root level have p_bh == NULL, brelse() eats this */
-+			brelse(path[i].p_bh);
-+			i--;
-+			ext_debug(tree, "return to level %d\n", i);
-+		}
-+	}
-+
-+	/* TODO: flexible tree reduction should be here */
-+	if (path->p_hdr->eh_entries == 0) {
-+		/*
-+		 * truncate to zero freed all the tree
-+		 * so, we need to correct eh_depth
-+		 */
-+		err = ext3_ext_get_access(handle, tree, path);
-+		if (err == 0) {
-+			EXT_ROOT_HDR(tree)->eh_depth = 0;
-+			EXT_ROOT_HDR(tree)->eh_max = ext3_ext_space_root(tree);
-+			err = ext3_ext_dirty(handle, tree, path);
-+		}
-+	}
-+	ext3_ext_tree_changed(tree);
-+
-+	kfree(path);
-+	ext3_journal_stop(handle);
-+
-+	return err;
-+}
-+
-+int ext3_ext_calc_metadata_amount(struct ext3_extents_tree *tree, int blocks)
-+{
-+	int lcap, icap, rcap, leafs, idxs, num;
-+
-+	rcap = ext3_ext_space_root(tree);
-+	if (blocks <= rcap) {
-+		/* all extents fit to the root */
-+		return 0;
-+	}
-+
-+	rcap = ext3_ext_space_root_idx(tree);
-+	lcap = ext3_ext_space_block(tree);
-+	icap = ext3_ext_space_block_idx(tree);
-+
-+	num = leafs = (blocks + lcap - 1) / lcap;
-+	if (leafs <= rcap) {
-+		/* all pointers to leafs fit to the root */
-+		return leafs;
-+	}
-+
-+	/* ok. we need separate index block(s) to link all leaf blocks */
-+	idxs = (leafs + icap - 1) / icap;
-+	do {
-+		num += idxs;
-+		idxs = (idxs + icap - 1) / icap;
-+	} while (idxs > rcap);
-+
-+	return num;
-+}
-+
-+/*
-+ * called at mount time
-+ */
-+void ext3_ext_init(struct super_block *sb)
-+{
-+	/*
-+	 * possible initialization would be here
-+	 */
-+
-+	if (test_opt(sb, EXTENTS)) {
-+		printk("EXT3-fs: file extents enabled");
-+#ifdef AGRESSIVE_TEST
-+		printk(", agressive tests");
-+#endif
-+#ifdef CHECK_BINSEARCH
-+		printk(", check binsearch");
-+#endif
-+		printk("\n");
-+	}
-+}
-+
-+/*
-+ * called at umount time
-+ */
-+void ext3_ext_release(struct super_block *sb)
-+{
-+}
-+
-+/************************************************************************
-+ * VFS related routines
-+ ************************************************************************/
-+
-+static int ext3_get_inode_write_access(handle_t *handle, void *buffer)
-+{
-+	/* we use in-core data, not bh */
-+	return 0;
-+}
-+
-+static int ext3_mark_buffer_dirty(handle_t *handle, void *buffer)
-+{
-+	struct inode *inode = buffer;
-+	return ext3_mark_inode_dirty(handle, inode);
-+}
-+
-+static int ext3_ext_mergable(struct ext3_extent *ex1,
-+			     struct ext3_extent *ex2)
-+{
-+	/* FIXME: support for large fs */
-+	if (ex1->ee_start + ex1->ee_len == ex2->ee_start)
-+		return 1;
-+	return 0;
-+}
-+
-+static int
-+ext3_remove_blocks_credits(struct ext3_extents_tree *tree,
-+			   struct ext3_extent *ex,
-+			   unsigned long from, unsigned long to)
-+{
-+	int needed;
-+	
-+	/* at present, extent can't cross block group */;
-+	needed = 4; /* bitmap + group desc + sb + inode */
-+
-+#ifdef CONFIG_QUOTA
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+	return needed;
-+}
-+
-+static int
-+ext3_remove_blocks(struct ext3_extents_tree *tree,
-+		   struct ext3_extent *ex,
-+		   unsigned long from, unsigned long to)
-+{
-+	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
-+	handle_t *handle = ext3_journal_start(tree->inode, needed);
-+	struct buffer_head *bh;
-+	int i;
-+
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
-+		/* tail removal */
-+		unsigned long num, start;
-+		num = ex->ee_block + ex->ee_len - from;
-+		start = ex->ee_start + ex->ee_len - num;
-+		ext_debug(tree, "free last %lu blocks starting %lu\n",
-+			  num, start);
-+		for (i = 0; i < num; i++) {
-+			bh = sb_find_get_block(tree->inode->i_sb, start + i);
-+			ext3_forget(handle, 0, tree->inode, bh, start + i);
-+		}
-+		ext3_free_blocks(handle, tree->inode, start, num);
-+	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
-+		printk("strange request: removal %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	} else {
-+		printk("strange request: removal(2) %lu-%lu from %u:%u\n",
-+		       from, to, ex->ee_block, ex->ee_len);
-+	}
-+	ext3_journal_stop(handle);
-+	return 0;
-+}
-+
-+static int ext3_ext_find_goal(struct inode *inode,
-+			      struct ext3_ext_path *path, unsigned long block)
-+{
-+	struct ext3_inode_info *ei = EXT3_I(inode);
-+	unsigned long bg_start;
-+	unsigned long colour;
-+	int depth;
-+	
-+	if (path) {
-+		struct ext3_extent *ex;
-+		depth = path->p_depth;
-+		
-+		/* try to predict block placement */
-+		if ((ex = path[depth].p_ext))
-+			return ex->ee_start + (block - ex->ee_block);
-+
-+		/* it looks index is empty
-+		 * try to find starting from index itself */
-+		if (path[depth].p_bh)
-+			return path[depth].p_bh->b_blocknr;
-+	}
-+
-+	/* OK. use inode's group */
-+	bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-+		le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-+	colour = (current->pid % 16) *
-+			(EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-+	return bg_start + colour + block;
-+}
-+
-+static int ext3_new_block_cb(handle_t *handle, struct ext3_extents_tree *tree,
-+			     struct ext3_ext_path *path,
-+			     struct ext3_extent *ex, int *err)
-+{
-+	struct inode *inode = tree->inode;
-+	int newblock, goal;
-+	
-+	EXT_ASSERT(path);
-+	EXT_ASSERT(ex);
-+	EXT_ASSERT(ex->ee_start);
-+	EXT_ASSERT(ex->ee_len);
-+	
-+	/* reuse block from the extent to order data/metadata */
-+	newblock = ex->ee_start++;
-+	ex->ee_len--;
-+	if (ex->ee_len == 0) {
-+		ex->ee_len = 1;
-+		/* allocate new block for the extent */
-+		goal = ext3_ext_find_goal(inode, path, ex->ee_block);
-+		ex->ee_start = ext3_new_block(handle, inode, goal, err);
-+		ex->ee_start_hi = 0;
-+		if (ex->ee_start == 0) {
-+			/* error occured: restore old extent */
-+			ex->ee_start = newblock;
-+			return 0;
-+		}
-+	}
-+	return newblock;
-+}
-+
-+static struct ext3_extents_helpers ext3_blockmap_helpers = {
-+	.get_write_access	= ext3_get_inode_write_access,
-+	.mark_buffer_dirty	= ext3_mark_buffer_dirty,
-+	.mergable		= ext3_ext_mergable,
-+	.new_block		= ext3_new_block_cb,
-+	.remove_extent		= ext3_remove_blocks,
-+	.remove_extent_credits	= ext3_remove_blocks_credits,
-+};
-+
-+void ext3_init_tree_desc(struct ext3_extents_tree *tree,
-+			 struct inode *inode)
-+{
-+	tree->inode = inode;
-+	tree->root = (void *) EXT3_I(inode)->i_data;
-+	tree->buffer = (void *) inode;
-+	tree->buffer_len = sizeof(EXT3_I(inode)->i_data);
-+	tree->cex = (struct ext3_ext_cache *) &EXT3_I(inode)->i_cached_extent;
-+	tree->ops = &ext3_blockmap_helpers;
-+}
-+
-+int ext3_ext_get_block(handle_t *handle, struct inode *inode,
-+		       long iblock, struct buffer_head *bh_result,
-+		       int create, int extend_disksize)
-+{
-+	struct ext3_ext_path *path = NULL;
-+	struct ext3_extent newex;
-+	struct ext3_extent *ex;
-+	int goal, newblock, err = 0, depth;
-+	struct ext3_extents_tree tree;
-+
-+	clear_buffer_new(bh_result);
-+	ext3_init_tree_desc(&tree, inode);
-+	ext_debug(&tree, "block %d requested for inode %u\n",
-+		  (int) iblock, (unsigned) inode->i_ino);
-+	down(&EXT3_I(inode)->truncate_sem);
-+
-+	/* check in cache */
-+	if ((goal = ext3_ext_in_cache(&tree, iblock, &newex))) {
-+		if (goal == EXT3_EXT_CACHE_GAP) {
-+			if (!create) {
-+				/* block isn't allocated yet and
-+				 * user don't want to allocate it */
-+				goto out2;
-+			}
-+			/* we should allocate requested block */
-+		} else if (goal == EXT3_EXT_CACHE_EXTENT) {
-+			/* block is already allocated */
-+			newblock = iblock - newex.ee_block + newex.ee_start;
-+			goto out;
-+		} else {
-+			EXT_ASSERT(0);
-+		}
-+	}
-+
-+	/* find extent for this block */
-+	path = ext3_ext_find_extent(&tree, iblock, NULL);
-+	if (IS_ERR(path)) {
-+		err = PTR_ERR(path);
-+		path = NULL;
-+		goto out2;
-+	}
-+
-+	depth = EXT_DEPTH(&tree);
-+
-+	/*
-+	 * consistent leaf must not be empty
-+	 * this situations is possible, though, _during_ tree modification
-+	 * this is why assert can't be put in ext3_ext_find_extent()
-+	 */
-+	EXT_ASSERT(path[depth].p_ext != NULL || depth == 0);
-+
-+	if ((ex = path[depth].p_ext)) {
-+		/* if found exent covers block, simple return it */
-+		if (iblock >= ex->ee_block && iblock < ex->ee_block + ex->ee_len) {
-+			newblock = iblock - ex->ee_block + ex->ee_start;
-+			ext_debug(&tree, "%d fit into %d:%d -> %d\n",
-+				  (int) iblock, ex->ee_block, ex->ee_len,
-+				  newblock);
-+			ext3_ext_put_in_cache(&tree, ex->ee_block,
-+					      ex->ee_len, ex->ee_start,
-+					      EXT3_EXT_CACHE_EXTENT);
-+			goto out;
-+		}
-+	}
-+
-+	/*
-+	 * requested block isn't allocated yet
-+	 * we couldn't try to create block if create flag is zero 
-+	 */
-+	if (!create) {
-+		/* put just found gap into cache to speedup subsequest reqs */
-+		ext3_ext_put_gap_in_cache(&tree, path, iblock);
-+		goto out2;
-+	}
-+
-+	/* allocate new block */
-+	goal = ext3_ext_find_goal(inode, path, iblock);
-+	newblock = ext3_new_block(handle, inode, goal, &err);
-+	if (!newblock)
-+		goto out2;
-+	ext_debug(&tree, "allocate new block: goal %d, found %d\n",
-+		  goal, newblock);
-+
-+	/* try to insert new extent into found leaf and return */
-+	newex.ee_block = iblock;
-+	newex.ee_start = newblock;
-+	newex.ee_start_hi = 0;
-+	newex.ee_len = 1;
-+	err = ext3_ext_insert_extent(handle, &tree, path, &newex);
-+	if (err)
-+		goto out2;
-+	
-+	if (extend_disksize && inode->i_size > EXT3_I(inode)->i_disksize)
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+
-+	/* previous routine could use block we allocated */
-+	newblock = newex.ee_start;
-+	set_buffer_new(bh_result);
-+
-+	ext3_ext_put_in_cache(&tree, newex.ee_block, newex.ee_len,
-+			      newex.ee_start, EXT3_EXT_CACHE_EXTENT);
-+out:
-+	ext3_ext_show_leaf(&tree, path);
-+	map_bh(bh_result, inode->i_sb, newblock);
-+out2:
-+	if (path) {
-+		ext3_ext_drop_refs(path);
-+		kfree(path);
-+	}
-+	up(&EXT3_I(inode)->truncate_sem);
-+
-+	return err;	
-+}
-+
-+void ext3_ext_truncate(struct inode * inode, struct page *page)
-+{
-+	struct address_space *mapping = inode->i_mapping;
-+	struct super_block *sb = inode->i_sb;
-+	struct ext3_extents_tree tree;
-+	unsigned long last_block;
-+	handle_t *handle;
-+	int err = 0;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+
-+	/*
-+	 * probably first extent we're gonna free will be last in block
-+	 */
-+	err = ext3_writepage_trans_blocks(inode) + 3;
-+	handle = ext3_journal_start(inode, err);
-+	if (IS_ERR(handle)) {
-+		if (page) {
-+			clear_highpage(page);
-+			flush_dcache_page(page);
-+			unlock_page(page);
-+			page_cache_release(page);
-+		}
-+		return;
-+	}
-+
-+	if (page)
-+		ext3_block_truncate_page(handle, page, mapping, inode->i_size);
-+
-+	down(&EXT3_I(inode)->truncate_sem);
-+	ext3_ext_invalidate_cache(&tree);
-+
-+	/* 
-+	 * TODO: optimization is possible here
-+	 * probably we need not scaning at all,
-+	 * because page truncation is enough
-+	 */
-+	if (ext3_orphan_add(handle, inode))
-+		goto out_stop;
-+
-+	/* we have to know where to truncate from in crash case */
-+	EXT3_I(inode)->i_disksize = inode->i_size;
-+	ext3_mark_inode_dirty(handle, inode);
-+
-+	last_block = (inode->i_size + sb->s_blocksize - 1) >>
-+			EXT3_BLOCK_SIZE_BITS(sb);
-+	err = ext3_ext_remove_space(&tree, last_block, EXT_MAX_BLOCK);
-+	
-+	/* In a multi-transaction truncate, we only make the final
-+	 * transaction synchronous */
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+
-+out_stop:
-+	/*
-+	 * If this was a simple ftruncate(), and the file will remain alive
-+	 * then we need to clear up the orphan record which we created above.
-+	 * However, if this was a real unlink then we were called by
-+	 * ext3_delete_inode(), and we allow that function to clean up the
-+	 * orphan info for us.
-+	 */
-+	if (inode->i_nlink)
-+		ext3_orphan_del(handle, inode);
-+
-+	up(&EXT3_I(inode)->truncate_sem);
-+	ext3_journal_stop(handle);
-+}
-+
-+/*
-+ * this routine calculate max number of blocks we could modify
-+ * in order to allocate new block for an inode
-+ */
-+int ext3_ext_writepage_trans_blocks(struct inode *inode, int num)
-+{
-+	struct ext3_extents_tree tree;
-+	int needed;
-+	
-+	ext3_init_tree_desc(&tree, inode);
-+	
-+	needed = ext3_ext_calc_credits_for_insert(&tree, NULL);
-+
-+	/* caller want to allocate num blocks */
-+	needed *= num;
-+	
-+#ifdef CONFIG_QUOTA
-+	/* 
-+	 * FIXME: real calculation should be here
-+	 * it depends on blockmap format of qouta file
-+	 */
-+	needed += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return needed;
-+}
-+
-+void ext3_extents_initialize_blockmap(handle_t *handle, struct inode *inode)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	ext3_extent_tree_init(handle, &tree);
-+}
-+
-+int ext3_ext_calc_blockmap_metadata(struct inode *inode, int blocks)
-+{
-+	struct ext3_extents_tree tree;
-+
-+	ext3_init_tree_desc(&tree, inode);
-+	return ext3_ext_calc_metadata_amount(&tree, blocks);
-+}
-+	
-+static int
-+ext3_ext_store_extent_cb(struct ext3_extents_tree *tree,
-+			 struct ext3_ext_path *path,
-+			 struct ext3_ext_cache *newex)
-+{
-+	struct ext3_extent_buf *buf = (struct ext3_extent_buf *) tree->private;
-+
-+	if (newex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	if (buf->err < 0)
-+		return EXT_BREAK;
-+	if (buf->cur - buf->buffer + sizeof(*newex) > buf->buflen)
-+		return EXT_BREAK;
-+
-+	if (!copy_to_user(buf->cur, newex, sizeof(*newex))) {
-+		buf->err++;
-+		buf->cur += sizeof(*newex);
-+	} else {
-+		buf->err = -EFAULT;
-+		return EXT_BREAK;
-+	}
-+	return EXT_CONTINUE;
-+}
-+
-+static int
-+ext3_ext_collect_stats_cb(struct ext3_extents_tree *tree,
-+			  struct ext3_ext_path *path,
-+			  struct ext3_ext_cache *ex)
-+{
-+	struct ext3_extent_tree_stats *buf =
-+		(struct ext3_extent_tree_stats *) tree->private;
-+	int depth;
-+
-+	if (ex->ec_type != EXT3_EXT_CACHE_EXTENT)
-+		return EXT_CONTINUE;
-+
-+	depth = EXT_DEPTH(tree);
-+	buf->extents_num++;
-+	if (path[depth].p_ext == EXT_FIRST_EXTENT(path[depth].p_hdr))
-+		buf->leaf_num++;
-+	return EXT_CONTINUE;
-+}
-+
-+int ext3_ext_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
-+		   unsigned long arg)
-+{
-+	int err = 0;
-+
-+	if (!(EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL))
-+		return -EINVAL;
-+
-+	if (cmd == EXT3_IOC_GET_EXTENTS) {
-+		struct ext3_extent_buf buf;
-+		struct ext3_extents_tree tree;
-+
-+		if (copy_from_user(&buf, (void *) arg, sizeof(buf)))
-+			return -EFAULT;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		buf.cur = buf.buffer;
-+		buf.err = 0;
-+		tree.private = &buf;
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = ext3_ext_walk_space(&tree, buf.start, EXT_MAX_BLOCK,
-+					  ext3_ext_store_extent_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (err == 0)
-+			err = buf.err;
-+	} else if (cmd == EXT3_IOC_GET_TREE_STATS) {
-+		struct ext3_extent_tree_stats buf;
-+		struct ext3_extents_tree tree;
-+
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		buf.depth = EXT_DEPTH(&tree);
-+		buf.extents_num = 0;
-+		buf.leaf_num = 0;
-+		tree.private = &buf;
-+		err = ext3_ext_walk_space(&tree, 0, EXT_MAX_BLOCK,
-+					  ext3_ext_collect_stats_cb);
-+		up(&EXT3_I(inode)->truncate_sem);
-+		if (!err)
-+			err = copy_to_user((void *) arg, &buf, sizeof(buf));
-+	} else if (cmd == EXT3_IOC_GET_TREE_DEPTH) {
-+		struct ext3_extents_tree tree;
-+		ext3_init_tree_desc(&tree, inode);
-+		down(&EXT3_I(inode)->truncate_sem);
-+		err = EXT_DEPTH(&tree);
-+		up(&EXT3_I(inode)->truncate_sem);
-+	}
-+
-+	return err;
-+}
-+
-+EXPORT_SYMBOL(ext3_init_tree_desc);
-+EXPORT_SYMBOL(ext3_mark_inode_dirty);
-+EXPORT_SYMBOL(ext3_ext_invalidate_cache);
-+EXPORT_SYMBOL(ext3_ext_insert_extent);
-+EXPORT_SYMBOL(ext3_ext_walk_space);
-+EXPORT_SYMBOL(ext3_ext_find_goal);
-+EXPORT_SYMBOL(ext3_ext_calc_credits_for_insert);
-Index: linux-stage/fs/ext3/ialloc.c
-===================================================================
---- linux-stage.orig/fs/ext3/ialloc.c	2005-02-25 14:50:50.304202816 +0200
-+++ linux-stage/fs/ext3/ialloc.c	2005-02-25 15:33:48.920193600 +0200
-@@ -566,7 +566,7 @@ repeat:
- 	ei->i_dir_start_lookup = 0;
- 	ei->i_disksize = 0;
- 
--	ei->i_flags = EXT3_I(dir)->i_flags & ~EXT3_INDEX_FL;
-+	ei->i_flags = EXT3_I(dir)->i_flags & ~(EXT3_INDEX_FL|EXT3_EXTENTS_FL);
- 	if (S_ISLNK(mode))
- 		ei->i_flags &= ~(EXT3_IMMUTABLE_FL|EXT3_APPEND_FL);
- 	/* dirsync only applies to directories */
-@@ -646,6 +646,18 @@
- 		DQUOT_FREE_INODE(inode);
- 		goto fail2;
-   	}
-+	if (test_opt(sb, EXTENTS) && S_ISREG(inode->i_mode)) {
-+		EXT3_I(inode)->i_flags |= EXT3_EXTENTS_FL;
-+		ext3_extents_initialize_blockmap(handle, inode);
-+		if (!EXT3_HAS_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS)) {
-+			err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-+			if (err) goto fail;
-+			EXT3_SET_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_EXTENTS);
-+			BUFFER_TRACE(EXT3_SB(sb)->s_sbh, "call ext3_journal_dirty_metadata");
-+			err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-+		}
-+	}
-+
- 	err = ext3_mark_inode_dirty(handle, inode);
- 	if (err) {
- 		ext3_std_error(sb, err);
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c	2005-02-25 14:50:50.309202056 +0200
-+++ linux-stage/fs/ext3/inode.c	2005-02-25 15:36:51.846384592 +0200
-@@ -796,6 +796,17 @@
- 	goto reread;
- }
- 
-+static inline int
-+ext3_get_block_wrap(handle_t *handle, struct inode *inode, long block,
-+		    struct buffer_head *bh, int create, int extend_disksize)
-+{
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_get_block(handle, inode, block, bh, create,
-+					  extend_disksize);
-+	return ext3_get_block_handle(handle, inode, block, bh, create,
-+				     extend_disksize);
-+}
-+
- static int ext3_get_block(struct inode *inode, sector_t iblock,
- 			struct buffer_head *bh_result, int create)
- {
-@@ -806,8 +817,8 @@
- 		handle = ext3_journal_current_handle();
- 		J_ASSERT(handle != 0);
- 	}
--	ret = ext3_get_block_handle(handle, inode, iblock,
--				bh_result, create, 1);
-+	ret = ext3_get_block_wrap(handle, inode, iblock,
-+				  bh_result, create, 1);
- 	return ret;
- }
- 
-@@ -851,7 +862,7 @@
- 
- get_block:
- 	if (ret == 0)
--		ret = ext3_get_block_handle(handle, inode, iblock,
-+		ret = ext3_get_block_wrap(handle, inode, iblock,
- 					bh_result, create, 0);
- 	bh_result->b_size = (1 << inode->i_blkbits);
- 	return ret;
-@@ -871,7 +882,7 @@
- 	dummy.b_state = 0;
- 	dummy.b_blocknr = -1000;
- 	buffer_trace_init(&dummy.b_history);
--	*errp = ext3_get_block_handle(handle, inode, block, &dummy, create, 1);
-+	*errp = ext3_get_block_wrap(handle, inode, block, &dummy, create, 1);
- 	if (!*errp && buffer_mapped(&dummy)) {
- 		struct buffer_head *bh;
- 		bh = sb_getblk(inode->i_sb, dummy.b_blocknr);
-@@ -1589,7 +1600,7 @@
-  * This required during truncate. We need to physically zero the tail end
-  * of that block so it doesn't yield old data if the file is later grown.
-  */
--static int ext3_block_truncate_page(handle_t *handle, struct page *page,
-+int ext3_block_truncate_page(handle_t *handle, struct page *page,
- 		struct address_space *mapping, loff_t from)
- {
- 	unsigned long index = from >> PAGE_CACHE_SHIFT;
-@@ -2087,6 +2098,9 @@
- 			return;
- 	}
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_truncate(inode, page);
-+
- 	handle = start_transaction(inode);
- 	if (IS_ERR(handle)) {
- 		if (page) {
-@@ -2814,6 +2828,9 @@
- 	int indirects = (EXT3_NDIR_BLOCKS % bpp) ? 5 : 3;
- 	int ret;
- 
-+	if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL)
-+		return ext3_ext_writepage_trans_blocks(inode, bpp);
-+
- 	if (ext3_should_journal_data(inode))
- 		ret = 3 * (bpp + indirects) + 2;
- 	else
-Index: linux-stage/fs/ext3/Makefile
-===================================================================
---- linux-stage.orig/fs/ext3/Makefile	2005-02-25 14:49:42.168561008 +0200
-+++ linux-stage/fs/ext3/Makefile	2005-02-25 15:39:28.384587168 +0200
-@@ -5,7 +5,8 @@
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
--	   ioctl.o namei.o super.o symlink.o hash.o resize.o
-+	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
-+	   extents.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c	2005-02-25 14:52:33.550506992 +0200
-+++ linux-stage/fs/ext3/super.c	2005-02-25 15:38:10.474431312 +0200
-@@ -394,6 +394,7 @@
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
- 	if (!(sb->s_flags & MS_RDONLY)) {
-@@ -457,6 +458,8 @@
- #endif
- 	ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- 	ei->vfs_inode.i_version = 1;
-+	
-+	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
- 	return &ei->vfs_inode;
- }
- 
-@@ -589,6 +594,7 @@
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
-+	Opt_extents, Opt_noextents, Opt_extdebug,
- };
- 
- static match_table_t tokens = {
-@@ -639,6 +644,9 @@
- 	{Opt_iopen, "iopen"},
- 	{Opt_noiopen, "noiopen"},
- 	{Opt_iopen_nopriv, "iopen_nopriv"},
-+	{Opt_extents, "extents"},
-+	{Opt_noextents, "noextents"},
-+	{Opt_extdebug, "extdebug"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -943,6 +950,15 @@
- 			match_int(&args[0], &option);
- 			*n_blocks_count = option;
- 			break;
-+		case Opt_extents:
-+			set_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_noextents:
-+			clear_opt (sbi->s_mount_opt, EXTENTS);
-+			break;
-+		case Opt_extdebug:
-+			set_opt (sbi->s_mount_opt, EXTDEBUG);
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1625,6 +1638,8 @@
- 	percpu_counter_mod(&sbi->s_dirs_counter,
- 		ext3_count_dirs(sb));
- 
-+	ext3_ext_init(sb);
-+
- 	return 0;
- 
- failed_mount3:
-Index: linux-stage/fs/ext3/ioctl.c
-===================================================================
---- linux-stage.orig/fs/ext3/ioctl.c	2005-02-25 14:37:28.971023976 +0200
-+++ linux-stage/fs/ext3/ioctl.c	2005-02-25 15:33:48.938190864 +0200
-@@ -124,6 +124,10 @@
- 			err = ext3_change_inode_journal_flag(inode, jflag);
- 		return err;
- 	}
-+	case EXT3_IOC_GET_EXTENTS:
-+	case EXT3_IOC_GET_TREE_STATS:
-+	case EXT3_IOC_GET_TREE_DEPTH:
-+		return ext3_ext_ioctl(inode, filp, cmd, arg);
- 	case EXT3_IOC_GETVERSION:
- 	case EXT3_IOC_GETVERSION_OLD:
- 		return put_user(inode->i_generation, (int __user *) arg);
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2005-02-25 14:53:56.424908168 +0200
-+++ linux-stage/include/linux/ext3_fs.h	2005-02-25 15:39:12.841950008 +0200
-@@ -186,8 +186,9 @@
- #define EXT3_NOTAIL_FL			0x00008000 /* don't merge file tail */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_EXTENTS_FL			0x00080000 /* Inode uses extents */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
-+#define EXT3_FL_USER_VISIBLE		0x000BDFFF /* User visible flags */
- #define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
- 
-@@ -237,6 +238,9 @@
- #endif
- #define EXT3_IOC_GETRSVSZ		_IOR('f', 5, long)
- #define EXT3_IOC_SETRSVSZ		_IOW('f', 6, long)
-+#define EXT3_IOC_GET_EXTENTS		_IOR('f', 7, long)
-+#define EXT3_IOC_GET_TREE_DEPTH		_IOR('f', 8, long)
-+#define EXT3_IOC_GET_TREE_STATS		_IOR('f', 9, long)
- 
- /*
-  * Structure of an inode on the disk
-@@ -359,6 +363,8 @@
- #define EXT3_MOUNT_RESERVATION		0x20000	/* Preallocation */
- #define EXT3_MOUNT_IOPEN		0x80000	/* Allow access via iopen */
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
-+#define EXT3_MOUNT_EXTENTS		0x200000/* Extents support */
-+#define EXT3_MOUNT_EXTDEBUG		0x400000/* Extents debug */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
-@@ -503,11 +509,13 @@
- #define EXT3_FEATURE_INCOMPAT_RECOVER		0x0004 /* Needs recovery */
- #define EXT3_FEATURE_INCOMPAT_JOURNAL_DEV	0x0008 /* Journal device */
- #define EXT3_FEATURE_INCOMPAT_META_BG		0x0010
-+#define EXT3_FEATURE_INCOMPAT_EXTENTS		0x0040 /* extents support */
- 
- #define EXT3_FEATURE_COMPAT_SUPP	EXT2_FEATURE_COMPAT_EXT_ATTR
- #define EXT3_FEATURE_INCOMPAT_SUPP	(EXT3_FEATURE_INCOMPAT_FILETYPE| \
- 					 EXT3_FEATURE_INCOMPAT_RECOVER| \
--					 EXT3_FEATURE_INCOMPAT_META_BG)
-+					 EXT3_FEATURE_INCOMPAT_META_BG| \
-+					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
-@@ -756,6 +763,9 @@
- 
- 
- /* inode.c */
-+extern int ext3_block_truncate_page(handle_t *, struct page *,
-+				    struct address_space *, loff_t);
-+extern int ext3_writepage_trans_blocks(struct inode *inode);
- extern int ext3_forget(handle_t *, int, struct inode *, struct buffer_head *, int);
- extern struct buffer_head * ext3_getblk (handle_t *, struct inode *, long, int, int *);
- extern struct buffer_head * ext3_bread (handle_t *, struct inode *, int, int, int *);
-@@ -836,6 +844,16 @@
- extern struct inode_operations ext3_symlink_inode_operations;
- extern struct inode_operations ext3_fast_symlink_inode_operations;
- 
-+/* extents.c */
-+extern int ext3_ext_writepage_trans_blocks(struct inode *, int);
-+extern int ext3_ext_get_block(handle_t *, struct inode *, long,
-+			      struct buffer_head *, int, int);
-+extern void ext3_ext_truncate(struct inode *, struct page *);
-+extern void ext3_ext_init(struct super_block *);
-+extern void ext3_ext_release(struct super_block *);
-+extern void ext3_extents_initialize_blockmap(handle_t *, struct inode *);
-+extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
-+			  unsigned int cmd, unsigned long arg);
- 
- #endif	/* __KERNEL__ */
- 
-Index: linux-stage/include/linux/ext3_extents.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_extents.h	2005-02-25 15:33:48.891198008 +0200
-+++ linux-stage/include/linux/ext3_extents.h	2005-02-25 15:33:48.944189952 +0200
-@@ -0,0 +1,262 @@
-+/*
-+ * Copyright (c) 2003, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+#ifndef _LINUX_EXT3_EXTENTS
-+#define _LINUX_EXT3_EXTENTS
-+
-+/*
-+ * with AGRESSIVE_TEST defined capacity of index/leaf blocks
-+ * become very little, so index split, in-depth growing and
-+ * other hard changes happens much more often
-+ * this is for debug purposes only
-+ */
-+#define AGRESSIVE_TEST_
-+
-+/*
-+ * if CHECK_BINSEARCH defined, then results of binary search
-+ * will be checked by linear search
-+ */
-+#define CHECK_BINSEARCH_
-+
-+/*
-+ * if EXT_DEBUG is defined you can use 'extdebug' mount option
-+ * to get lots of info what's going on
-+ */
-+#define EXT_DEBUG_
-+#ifdef EXT_DEBUG
-+#define ext_debug(tree,fmt,a...)			\
-+do {							\
-+	if (test_opt((tree)->inode->i_sb, EXTDEBUG))	\
-+		printk(fmt, ##a);			\
-+} while (0);
-+#else
-+#define ext_debug(tree,fmt,a...)
-+#endif
-+
-+/*
-+ * if EXT_STATS is defined then stats numbers are collected
-+ * these number will be displayed at umount time
-+ */
-+#define EXT_STATS_
-+
-+
-+#define EXT3_ALLOC_NEEDED	3	/* block bitmap + group desc. + sb */
-+
-+/*
-+ * ext3_inode has i_block array (total 60 bytes)
-+ * first 4 bytes are used to store:
-+ *  - tree depth (0 mean there is no tree yet. all extents in the inode)
-+ *  - number of alive extents in the inode
-+ */
-+
-+/*
-+ * this is extent on-disk structure
-+ * it's used at the bottom of the tree
-+ */
-+struct ext3_extent {
-+	__u32	ee_block;	/* first logical block extent covers */
-+	__u16	ee_len;		/* number of blocks covered by extent */
-+	__u16	ee_start_hi;	/* high 16 bits of physical block */
-+	__u32	ee_start;	/* low 32 bits of physical block */
-+};
-+
-+/*
-+ * this is index on-disk structure
-+ * it's used at all the levels, but the bottom
-+ */
-+struct ext3_extent_idx {
-+	__u32	ei_block;	/* index covers logical blocks from 'block' */
-+	__u32	ei_leaf;	/* pointer to the physical block of the next *
-+				 * level. leaf or next index could bet here */
-+	__u16	ei_leaf_hi;	/* high 16 bits of physical block */
-+	__u16	ei_unused;
-+};
-+
-+/*
-+ * each block (leaves and indexes), even inode-stored has header
-+ */
-+struct ext3_extent_header {	
-+	__u16	eh_magic;	/* probably will support different formats */	
-+	__u16	eh_entries;	/* number of valid entries */
-+	__u16	eh_max;		/* capacity of store in entries */
-+	__u16	eh_depth;	/* has tree real underlaying blocks? */
-+	__u32	eh_generation;	/* flags(8 bits) | generation of the tree */
-+};
-+
-+#define EXT3_EXT_MAGIC		0xf30a
-+
-+/*
-+ * array of ext3_ext_path contains path to some extent
-+ * creation/lookup routines use it for traversal/splitting/etc
-+ * truncate uses it to simulate recursive walking
-+ */
-+struct ext3_ext_path {
-+	__u32				p_block;
-+	__u16				p_depth;
-+	struct ext3_extent		*p_ext;
-+	struct ext3_extent_idx		*p_idx;
-+	struct ext3_extent_header	*p_hdr;
-+	struct buffer_head		*p_bh;
-+};
-+
-+/*
-+ * structure for external API
-+ */
-+
-+/*
-+ * storage for cached extent
-+ */
-+struct ext3_ext_cache {
-+	__u32	ec_start;
-+	__u32	ec_block;
-+	__u32	ec_len;
-+	__u32	ec_type;
-+};
-+
-+#define EXT3_EXT_CACHE_NO	0
-+#define EXT3_EXT_CACHE_GAP	1
-+#define EXT3_EXT_CACHE_EXTENT	2
-+
-+/*
-+ * ext3_extents_tree is used to pass initial information
-+ * to top-level extents API
-+ */
-+struct ext3_extents_helpers;
-+struct ext3_extents_tree {
-+	struct inode *inode;	/* inode which tree belongs to */
-+	void *root;		/* ptr to data top of tree resides at */
-+	void *buffer;		/* will be passed as arg to ^^ routines	*/
-+	int buffer_len;
-+	void *private;
-+	struct ext3_ext_cache *cex;/* last found extent */
-+	struct ext3_extents_helpers *ops;
-+};
-+
-+struct ext3_extents_helpers {
-+	int (*get_write_access)(handle_t *h, void *buffer);
-+	int (*mark_buffer_dirty)(handle_t *h, void *buffer);
-+	int (*mergable)(struct ext3_extent *ex1, struct ext3_extent *ex2);
-+	int (*remove_extent_credits)(struct ext3_extents_tree *,
-+				     struct ext3_extent *, unsigned long,
-+				     unsigned long);
-+	int (*remove_extent)(struct ext3_extents_tree *,
-+			     struct ext3_extent *, unsigned long,
-+			     unsigned long);
-+	int (*new_block)(handle_t *, struct ext3_extents_tree *,
-+			 struct ext3_ext_path *, struct ext3_extent *,
-+			 int *);
-+};
-+
-+/*
-+ * to be called by ext3_ext_walk_space()
-+ * negative retcode - error
-+ * positive retcode - signal for ext3_ext_walk_space(), see below
-+ * callback must return valid extent (passed or newly created)
-+ */
-+typedef int (*ext_prepare_callback)(struct ext3_extents_tree *,
-+				    struct ext3_ext_path *,
-+				    struct ext3_ext_cache *);
-+
-+#define EXT_CONTINUE	0
-+#define EXT_BREAK	1
-+#define EXT_REPEAT	2
-+
-+
-+#define EXT_MAX_BLOCK	0xffffffff
-+
-+
-+#define EXT_FIRST_EXTENT(__hdr__) \
-+	((struct ext3_extent *) (((char *) (__hdr__)) +		\
-+				 sizeof(struct ext3_extent_header)))
-+#define EXT_FIRST_INDEX(__hdr__) \
-+	((struct ext3_extent_idx *) (((char *) (__hdr__)) +	\
-+				     sizeof(struct ext3_extent_header)))
-+#define EXT_HAS_FREE_INDEX(__path__) \
-+	((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max)
-+#define EXT_LAST_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_LAST_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1)
-+#define EXT_MAX_EXTENT(__hdr__) \
-+	(EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_MAX_INDEX(__hdr__) \
-+	(EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1)
-+#define EXT_HDR_GEN_BITS	24
-+#define EXT_HDR_GEN_MASK	((1 << EXT_HDR_GEN_BITS) - 1)
-+#define EXT_HDR_GEN(__hdr__)	((__hdr__)->eh_generation & EXT_HDR_GEN_MASK)
-+#define EXT_FLAGS(__hdr__)	((__hdr__)->eh_generation >> EXT_HDR_GEN_BITS)
-+#define EXT_FLAGS_CLR_UNKNOWN	0x7	/* Flags cleared on modification */
-+
-+#define EXT_BLOCK_HDR(__bh__) 	((struct ext3_extent_header *)(__bh__)->b_data)
-+#define EXT_ROOT_HDR(__tree__)	((struct ext3_extent_header *)(__tree__)->root)
-+#define EXT_DEPTH(__tree__)	(EXT_ROOT_HDR(__tree__)->eh_depth)
-+#define EXT_GENERATION(__tree__) EXT_HDR_GEN(EXT_ROOT_HDR(__tree__))
-+
-+#define EXT_ASSERT(__x__) if (!(__x__)) BUG();
-+
-+#define EXT_CHECK_PATH(tree,path)					\
-+{									\
-+	int depth = EXT_DEPTH(tree);					\
-+	BUG_ON((unsigned long) (path) < __PAGE_OFFSET);			\
-+	BUG_ON((unsigned long) (path)[depth].p_idx <			\
-+			__PAGE_OFFSET && (path)[depth].p_idx != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_ext <			\
-+			__PAGE_OFFSET && (path)[depth].p_ext != NULL);	\
-+	BUG_ON((unsigned long) (path)[depth].p_hdr < __PAGE_OFFSET);	\
-+	BUG_ON((unsigned long) (path)[depth].p_bh < __PAGE_OFFSET	\
-+			&& depth != 0);					\
-+	BUG_ON((path)[0].p_depth != depth);				\
-+}
-+
-+
-+/*
-+ * this structure is used to gather extents from the tree via ioctl
-+ */
-+struct ext3_extent_buf {
-+	unsigned long start;
-+	int buflen;
-+	void *buffer;
-+	void *cur;
-+	int err;
-+};
-+
-+/*
-+ * this structure is used to collect stats info about the tree
-+ */
-+struct ext3_extent_tree_stats {
-+	int depth;
-+	int extents_num;
-+	int leaf_num;
-+};
-+
-+extern void ext3_init_tree_desc(struct ext3_extents_tree *, struct inode *);
-+extern int ext3_extent_tree_init(handle_t *, struct ext3_extents_tree *);
-+extern int ext3_ext_calc_credits_for_insert(struct ext3_extents_tree *, struct ext3_ext_path *);
-+extern int ext3_ext_insert_extent(handle_t *, struct ext3_extents_tree *, struct ext3_ext_path *, struct ext3_extent *);
-+extern int ext3_ext_walk_space(struct ext3_extents_tree *, unsigned long, unsigned long, ext_prepare_callback);
-+extern int ext3_ext_remove_space(struct ext3_extents_tree *, unsigned long, unsigned long);
-+extern struct ext3_ext_path * ext3_ext_find_extent(struct ext3_extents_tree *, int, struct ext3_ext_path *);
-+extern int ext3_ext_calc_blockmap_metadata(struct inode *, int);
-+
-+static inline void
-+ext3_ext_invalidate_cache(struct ext3_extents_tree *tree)
-+{
-+	if (tree->cex)
-+		tree->cex->ec_type = EXT3_EXT_CACHE_NO;
-+}
-+#endif /* _LINUX_EXT3_EXTENTS */
-Index: linux-stage/include/linux/ext3_fs_i.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs_i.h	2005-02-25 14:50:50.320200384 +0200
-+++ linux-stage/include/linux/ext3_fs_i.h	2005-02-25 15:33:48.945189800 +0200
-@@ -128,6 +128,8 @@
- 	 */
- 	struct semaphore truncate_sem;
- 	struct inode vfs_inode;
-+
-+	__u32 i_cached_extent[4];
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
diff --git a/ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch b/ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch
deleted file mode 100644
index c7ed475da265de7eb48b8e003bc0631f08d7b85c..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-extents-bug11324.patch
+++ /dev/null
@@ -1,252 +0,0 @@
-Index: linux-stage/fs/ext3/extents.c
-===================================================================
---- linux-stage.orig/fs/ext3/extents.c	2007-04-17 22:09:19.000000000 -0700
-+++ linux-stage/fs/ext3/extents.c	2007-04-17 22:12:05.000000000 -0700
-@@ -44,26 +44,49 @@
- #include <asm/uaccess.h>
- 
- 
--static inline int ext3_ext_check_header(struct ext3_extent_header *eh)
--{
--	if (eh->eh_magic != EXT3_EXT_MAGIC) {
--		printk(KERN_ERR "EXT3-fs: invalid magic = 0x%x\n",
--		       (unsigned)eh->eh_magic);
--		return -EIO;
--	}
--	if (eh->eh_max == 0) {
--		printk(KERN_ERR "EXT3-fs: invalid eh_max = %u\n",
--		       (unsigned)eh->eh_max);
--		return -EIO;
--	}
--	if (eh->eh_entries > eh->eh_max) {
--		printk(KERN_ERR "EXT3-fs: invalid eh_entries = %u\n",
--		       (unsigned)eh->eh_entries);
--		return -EIO;
-+static int __ext3_ext_check_header(const char *function, struct inode *inode,
-+				struct ext3_extent_header *eh, int depth,
-+				int max)
-+{
-+	const char *error_msg = NULL;
-+
-+	if (unlikely(eh->eh_magic != EXT3_EXT_MAGIC)) {
-+		error_msg = "invalid magic";
-+		goto corrupted;
-+	}
-+	if (unlikely(eh->eh_depth != depth)) {
-+		error_msg = "unexpected eh_depth";
-+		goto corrupted;
-+	}
-+	if (unlikely(eh->eh_max == 0)) {
-+		error_msg = "too small eh_max";
-+		goto corrupted;
-+	}
-+	if (unlikely(eh->eh_max > max)) {
-+		error_msg = "too large eh_max";
-+		goto corrupted;
-+	}
-+	if (unlikely(eh->eh_entries > eh->eh_max)) {
-+		error_msg = "invalid eh_entries";
-+		goto corrupted;
- 	}
- 	return 0;
-+
-+corrupted:
-+	ext3_error(inode->i_sb, function,
-+			"bad header in inode #%lu: %s - magic %x, "
-+			"entries %u, max %u(%u), depth %u(%u)",
-+			inode->i_ino, error_msg, eh->eh_magic,
-+			eh->eh_entries, eh->eh_max, max,
-+			eh->eh_depth, depth);
-+
-+	return -EIO;
- }
- 
-+#define ext3_ext_check_header(inode,eh,depth,max)	\
-+	__ext3_ext_check_header(__FUNCTION__,inode,eh,depth,max)
-+
-+
- static handle_t *ext3_ext_journal_restart(handle_t *handle, int needed)
- {
- 	int err;
-@@ -226,6 +249,26 @@
- 	return size;
- }
- 
-+static inline int
-+ext3_ext_max_entries(struct ext3_extents_tree *tree, int root, int depth)
-+{
-+	int max;
-+
-+	if (root) {
-+		if (depth == 0)
-+			max = ext3_ext_space_root(tree);
-+		else
-+			max = ext3_ext_space_root_idx(tree);
-+	} else {
-+		if (depth == 0)
-+			max = ext3_ext_space_block(tree);
-+		else
-+			max = ext3_ext_space_block_idx(tree);
-+	}
-+
-+	return max;
-+}
-+
- static void ext3_ext_show_path(struct ext3_extents_tree *tree,
- 			       struct ext3_ext_path *path)
- {
-@@ -296,10 +339,6 @@
- 	struct ext3_extent_idx *ix;
- 	int l = 0, k, r;
- 
--	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
--	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
--	EXT_ASSERT(eh->eh_entries > 0);
--
- 	ext_debug(tree, "binsearch for %d(idx):  ", block);
- 
- 	path->p_idx = ix = EXT_FIRST_INDEX(eh);
-@@ -359,9 +398,6 @@
- 	struct ext3_extent *ex;
- 	int l = 0, k, r;
- 
--	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
--	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
--
- 	if (eh->eh_entries == 0) {
- 		/*
- 		 * this leaf is empty yet:
-@@ -436,6 +472,7 @@
- 	struct ext3_extent_header *eh;
- 	struct buffer_head *bh;
- 	int depth, i, ppos = 0;
-+	int max;
- 
- 	EXT_ASSERT(tree);
- 	EXT_ASSERT(tree->inode);
-@@ -443,17 +480,15 @@
- 
- 	eh = EXT_ROOT_HDR(tree);
- 	EXT_ASSERT(eh);
--	if (ext3_ext_check_header(eh)) {
-+	i = depth = EXT_DEPTH(tree);
-+	max = ext3_ext_max_entries(tree, 1, i);
-+	if (ext3_ext_check_header(tree->inode, eh, i, max)) {
- 		/* don't free previously allocated path
- 		 * -- caller should take care */
- 		path = NULL;
- 		goto err;
- 	}
- 
--	i = depth = EXT_DEPTH(tree);
--	EXT_ASSERT(eh->eh_max);
--	EXT_ASSERT(eh->eh_magic == EXT3_EXT_MAGIC);
--	
- 	/* account possible depth increase */
- 	if (!path) {
- 		path = kmalloc(sizeof(struct ext3_ext_path) * (depth + 2),
-@@ -484,8 +519,10 @@
- 		path[ppos].p_hdr = eh;
- 		i--;
- 
--		if (ext3_ext_check_header(eh))
-+		max = ext3_ext_max_entries(tree, 0, i);
-+		if (ext3_ext_check_header(tree->inode, eh, i, max))
- 			goto err;
-+	
- 	}
- 
- 	path[ppos].p_depth = i;
-@@ -493,9 +530,6 @@
- 	path[ppos].p_ext = NULL;
- 	path[ppos].p_idx = NULL;
- 
--	if (ext3_ext_check_header(eh))
--		goto err;
--
- 	/* find extent */
- 	ext3_ext_binsearch(tree, path + ppos, block);
- 
-@@ -1545,6 +1579,8 @@
- 	ext_debug(tree, "remove [%lu:%lu] in leaf\n", start, end);
- 	if (!path[depth].p_hdr)
- 		path[depth].p_hdr = EXT_BLOCK_HDR(path[depth].p_bh);
-+
-+	/* the header must be checked already in ext3_ext_remove_space() */
- 	eh = path[depth].p_hdr;
- 	EXT_ASSERT(eh);
- 	EXT_ASSERT(eh->eh_entries <= eh->eh_max);
-@@ -1707,7 +1743,7 @@
- 	int depth = EXT_DEPTH(tree);
- 	struct ext3_ext_path *path;
- 	handle_t *handle;
--	int i = 0, err = 0;
-+	int i = 0, err = 0, max;
- 
- 	ext_debug(tree, "space to be removed: %lu:%lu\n", start, end);
- 
-@@ -1730,7 +1766,13 @@
- 	}
- 	memset(path, 0, sizeof(struct ext3_ext_path) * (depth + 1));
- 	path[i].p_hdr = EXT_ROOT_HDR(tree);
--	
-+
-+	max = ext3_ext_max_entries(tree, 1, depth);
-+	if (ext3_ext_check_header(inode, path[i].p_hdr, depth, max)) {
-+		err = -EIO;
-+		goto out;
-+	}
-+
- 	while (i >= 0 && err == 0) {
- 		if (i == depth) {
- 			/* this is leaf block */
-@@ -1740,16 +1782,13 @@
- 			i--;
- 			continue;
- 		}
--		
-+
- 		/* this is index block */
- 		if (!path[i].p_hdr) {
- 			ext_debug(tree, "initialize header\n");
- 			path[i].p_hdr = EXT_BLOCK_HDR(path[i].p_bh);
- 		}
- 
--		EXT_ASSERT(path[i].p_hdr->eh_entries <= path[i].p_hdr->eh_max);
--		EXT_ASSERT(path[i].p_hdr->eh_magic == EXT3_EXT_MAGIC);
--		
- 		if (!path[i].p_idx) {
- 			/* this level hasn't touched yet */
- 			path[i].p_idx =
-@@ -1776,6 +1815,14 @@
- 				err = -EIO;
- 				break;
- 			}
-+			BUG_ON(i + 1 > depth);
-+			max = ext3_ext_max_entries(tree, 0, depth - i - 1);
-+			if (ext3_ext_check_header(inode,
-+						EXT_BLOCK_HDR(path[i+1].p_bh),
-+						depth - i - 1, max)) {
-+				err = -EIO;
-+				break;
-+			}
- 			/* put actual number of indexes to know is this
- 			 * number got changed at the next iteration */
- 			path[i].p_block = path[i].p_hdr->eh_entries;
-@@ -1796,7 +1843,7 @@
- 	}
- 
- 	/* TODO: flexible tree reduction should be here */
--	if (path->p_hdr->eh_entries == 0) {
-+	if (err == 0 && path->p_hdr->eh_entries == 0) {
- 		/*
- 		 * truncate to zero freed all the tree
- 		 * so, we need to correct eh_depth
-@@ -1810,6 +1857,7 @@
- 	}
- 	ext3_ext_tree_changed(tree);
- 
-+out:
- 	kfree(path);
- 	ext3_journal_stop(handle);
- 
diff --git a/ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch
deleted file mode 100644
index bcfdae293f8bbfe38ce861e0f03024341cf3dd52..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-external-journal-2.6.12.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-Signed-off-by: Johann Lombardi <johann.lombardi@bull.net>
-
---- linux-2.6.12.orig/fs/ext3/super.c	2005-06-17 21:48:29.000000000 +0200
-+++ linux-2.6.12/fs/ext3/super.c	2005-11-07 13:37:30.000000000 +0100
-@@ -39,7 +39,8 @@
- #include "xattr.h"
- #include "acl.h"
- 
--static int ext3_load_journal(struct super_block *, struct ext3_super_block *);
-+static int ext3_load_journal(struct super_block *, struct ext3_super_block *,
-+			     unsigned long journal_devnum);
- static int ext3_create_journal(struct super_block *, struct ext3_super_block *,
- 			       int);
- static void ext3_commit_super (struct super_block * sb,
-@@ -586,7 +587,7 @@ enum {
- 	Opt_nouid32, Opt_check, Opt_nocheck, Opt_debug, Opt_oldalloc, Opt_orlov,
- 	Opt_user_xattr, Opt_nouser_xattr, Opt_acl, Opt_noacl,
- 	Opt_reservation, Opt_noreservation, Opt_noload, Opt_nobh,
--	Opt_commit, Opt_journal_update, Opt_journal_inum,
-+	Opt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev,
- 	Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
- 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
-@@ -624,6 +625,7 @@ static match_table_t tokens = {
- 	{Opt_commit, "commit=%u"},
- 	{Opt_journal_update, "journal=update"},
- 	{Opt_journal_inum, "journal=%u"},
-+	{Opt_journal_dev, "journal_dev=%u"},
- 	{Opt_abort, "abort"},
- 	{Opt_data_journal, "data=journal"},
- 	{Opt_data_ordered, "data=ordered"},
-@@ -663,8 +665,9 @@ static unsigned long get_sb_block(void *
- 	return sb_block;
- }
- 
--static int parse_options (char * options, struct super_block *sb,
--			  unsigned long * inum, unsigned long *n_blocks_count, int is_remount)
-+static int parse_options (char *options, struct super_block *sb,
-+			  unsigned long *inum, unsigned long *journal_devnum, 
-+			  unsigned long *n_blocks_count, int is_remount)
- {
- 	struct ext3_sb_info *sbi = EXT3_SB(sb);
- 	char * p;
-@@ -805,6 +808,16 @@ static int parse_options (char * options
- 				return 0;
- 			*inum = option;
- 			break;
-+		case Opt_journal_dev:
-+			if (is_remount) {
-+				printk(KERN_ERR "EXT3-fs: cannot specify "
-+				       "journal on remount\n");
-+				return 0;
-+			}
-+			if (match_int(&args[0], &option))
-+				return 0;
-+			*journal_devnum = option;
-+			break;
- 		case Opt_noload:
- 			set_opt (sbi->s_mount_opt, NOLOAD);
- 			break;
-@@ -1250,6 +1263,7 @@ static int ext3_fill_super (struct super
- 	unsigned long logic_sb_block;
- 	unsigned long offset = 0;
- 	unsigned long journal_inum = 0;
-+	unsigned long journal_devnum = 0;
- 	unsigned long def_mount_opts;
- 	struct inode *root;
- 	int blocksize;
-@@ -1330,7 +1344,8 @@ static int ext3_fill_super (struct super
- 
- 	set_opt(sbi->s_mount_opt, RESERVATION);
- 
--	if (!parse_options ((char *) data, sb, &journal_inum, NULL, 0))
-+	if (!parse_options ((char *) data, sb, &journal_inum, &journal_devnum, 
-+			    NULL, 0))
- 		goto failed_mount;
- 
- 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
-@@ -1541,7 +1556,7 @@ static int ext3_fill_super (struct super
- 	 */
- 	if (!test_opt(sb, NOLOAD) &&
- 	    EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
--		if (ext3_load_journal(sb, es))
-+		if (ext3_load_journal(sb, es, journal_devnum))
- 			goto failed_mount2;
- 	} else if (journal_inum) {
- 		if (ext3_create_journal(sb, es, journal_inum))
-@@ -1821,15 +1836,24 @@ out_bdev:
- 	return NULL;
- }
- 
--static int ext3_load_journal(struct super_block * sb,
--			     struct ext3_super_block * es)
-+static int ext3_load_journal(struct super_block *sb,
-+			     struct ext3_super_block *es,
-+			     unsigned long journal_devnum)
- {
- 	journal_t *journal;
- 	int journal_inum = le32_to_cpu(es->s_journal_inum);
--	dev_t journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev));
-+	dev_t journal_dev;
- 	int err = 0;
- 	int really_read_only;
- 
-+	if (journal_devnum &&
-+	    journal_devnum != le32_to_cpu(es->s_journal_dev)) {
-+		printk(KERN_INFO "EXT3-fs: external journal device major/minor "
-+			"numbers have changed\n");
-+		journal_dev = new_decode_dev(journal_devnum);
-+	} else
-+		journal_dev = new_decode_dev(le32_to_cpu(es->s_journal_dev));
-+
- 	really_read_only = bdev_read_only(sb->s_bdev);
- 
- 	/*
-@@ -1888,6 +1912,16 @@ static int ext3_load_journal(struct supe
- 
- 	EXT3_SB(sb)->s_journal = journal;
- 	ext3_clear_journal_err(sb, es);
-+
-+	if (journal_devnum &&
-+	    journal_devnum != le32_to_cpu(es->s_journal_dev)) {
-+		es->s_journal_dev = cpu_to_le32(journal_devnum);
-+		sb->s_dirt = 1;
-+
-+		/* Make sure we flush the recovery flag to disk. */
-+		ext3_commit_super(sb, es, 1);
-+	}
-+
- 	return 0;
- }
- 
-@@ -2093,13 +2127,13 @@ static int ext3_remount (struct super_bl
- {
- 	struct ext3_super_block * es;
- 	struct ext3_sb_info *sbi = EXT3_SB(sb);
--	unsigned long tmp;
-+	unsigned long tmp1, tmp2;
- 	unsigned long n_blocks_count = 0;
- 
- 	/*
- 	 * Allow the "check" option to be passed as a remount option.
- 	 */
--	if (!parse_options(data, sb, &tmp, &n_blocks_count, 1))
-+	if (!parse_options(data, sb, &tmp1, &tmp2, &n_blocks_count, 1))
- 		return -EINVAL;
- 
- 	if (sbi->s_mount_opt & EXT3_MOUNT_ABORT)
diff --git a/ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch b/ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch
deleted file mode 100644
index e6d431f86784ab82bd217da160a4ecfc1d19a689..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-filterdata-2.6.15.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.15/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.15.orig/include/linux/ext3_fs_i.h	2006-02-24 15:41:30.000000000 +0300
-+++ linux-2.6.15/include/linux/ext3_fs_i.h	2006-02-24 15:41:31.000000000 +0300
-@@ -135,6 +135,8 @@ struct ext3_inode_info {
- 	struct inode vfs_inode;
- 
- 	__u32 i_cached_extent[4];
-+
-+	void *i_filterdata;
- };
- 
- #endif	/* _LINUX_EXT3_FS_I */
-Index: linux-2.6.15/fs/ext3/super.c
-===================================================================
---- linux-2.6.15.orig/fs/ext3/super.c	2006-02-24 15:41:30.000000000 +0300
-+++ linux-2.6.15/fs/ext3/super.c	2006-02-24 15:42:02.000000000 +0300
-@@ -459,6 +459,7 @@ static struct inode *ext3_alloc_inode(st
- 	ei->vfs_inode.i_version = 1;
- 	
- 	memset(&ei->i_cached_extent, 0, sizeof(ei->i_cached_extent));
-+	ei->i_filterdata = NULL;
- 	return &ei->vfs_inode;
- }
- 
diff --git a/ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch b/ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch
deleted file mode 100644
index 919211223cdcaf6f59dd632b48c6f587da40c5f9..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-htree-dot-2.6.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/namei.c
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/fs/ext3/namei.c	2005-04-04 05:06:46.000000000 -0600
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/namei.c	2005-04-04 05:09:18.000000000 -0600
-@@ -926,8 +926,16 @@
- 	struct inode *dir = dentry->d_parent->d_inode;
- 
- 	sb = dir->i_sb;
--	if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err)))
--		return NULL;
-+	/* NFS may look up ".." - look at dx_root directory block */
-+	if (namelen > 2 || name[0] != '.'||(name[1] != '.' && name[1] != '\0')){
-+		if (!(frame = dx_probe(dentry, NULL, &hinfo, frames, err)))
-+			return NULL;
-+	} else {
-+		frame = frames;
-+		frame->bh = NULL;			/* for dx_release() */
-+		frame->at = (struct dx_entry *)frames;	/* hack for zero entry*/
-+		dx_set_block(frame->at, 0);		/* dx_root block is 0 */
-+	}
- 	hash = hinfo.hash;
- 	do {
- 		block = dx_get_block(frame->at);
diff --git a/ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch b/ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch
deleted file mode 100644
index 15d37a91dc37fede6796069be437514219bbe5a6..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-ialloc-2.6.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/fs/ext3/ialloc.c	2005-05-16 14:10:54.000000000 -0600
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/ialloc.c	2005-05-16 14:18:29.000000000 -0600
-@@ -352,13 +352,17 @@
- 	return -1;
- }
- 
--static int find_group_other(struct super_block *sb, struct inode *parent)
-+static int find_group_other(struct super_block *sb, struct inode *parent,
-+			    int mode)
- {
- 	int parent_group = EXT3_I(parent)->i_block_group;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
- 	int ngroups = EXT3_SB(sb)->s_groups_count;
- 	struct ext3_group_desc *desc;
- 	struct buffer_head *bh;
- 	int group, i;
-+	int best_group = -1;
-+	int avefreeb, freeb, best_group_freeb = 0;
- 
- 	/*
- 	 * Try to place the inode in its parent directory
-@@ -366,9 +370,9 @@
- 	group = parent_group;
- 	desc = ext3_get_group_desc (sb, group, &bh);
- 	if (desc && le16_to_cpu(desc->bg_free_inodes_count) &&
--			le16_to_cpu(desc->bg_free_blocks_count))
-+	    (!S_ISREG(mode) || le16_to_cpu(desc->bg_free_blocks_count)))
- 		return group;
--
-+	avefreeb = le32_to_cpu(sbi->s_es->s_free_blocks_count) / ngroups;
- 	/*
- 	 * We're going to place this inode in a different blockgroup from its
- 	 * parent.  We want to cause files in a common directory to all land in
-@@ -381,33 +385,47 @@
- 	group = (group + parent->i_ino) % ngroups;
- 
- 	/*
--	 * Use a quadratic hash to find a group with a free inode and some free
--	 * blocks.
-+	 * Use a quadratic hash to find a group with a free inode and
-+	 * average number of free blocks.
- 	 */
- 	for (i = 1; i < ngroups; i <<= 1) {
- 		group += i;
- 		if (group >= ngroups)
- 			group -= ngroups;
- 		desc = ext3_get_group_desc (sb, group, &bh);
--		if (desc && le16_to_cpu(desc->bg_free_inodes_count) &&
--				le16_to_cpu(desc->bg_free_blocks_count))
-+		if (!desc || !desc->bg_free_inodes_count)
-+			continue;
-+		if (!S_ISREG(mode))
-+			return group;
-+		if (le16_to_cpu(desc->bg_free_blocks_count) >= avefreeb)
- 			return group;
- 	}
- 
- 	/*
--	 * That failed: try linear search for a free inode, even if that group
--	 * has no free blocks.
-+	 * That failed: start from last group used to allocate inode
-+	 * try linear search for a free inode and prefereably
-+	 * free blocks.
- 	 */
--	group = parent_group;
-+	group = sbi->s_last_alloc_group;
-+	if (group == -1)
-+		group = parent_group;
-+
- 	for (i = 0; i < ngroups; i++) {
- 		if (++group >= ngroups)
- 			group = 0;
- 		desc = ext3_get_group_desc (sb, group, &bh);
--		if (desc && le16_to_cpu(desc->bg_free_inodes_count))
--			return group;
-+		if (!desc || !desc->bg_free_inodes_count)
-+			continue;
-+		freeb = le16_to_cpu(desc->bg_free_blocks_count);
-+		if (freeb > best_group_freeb) {
-+			best_group_freeb = freeb;
-+			best_group = group;
-+			if (freeb >= avefreeb || !S_ISREG(mode))
-+				break;
-+		}
- 	}
--
--	return -1;
-+	sbi->s_last_alloc_group = best_group;
-+	return best_group;
- }
- 
- /*
-@@ -454,7 +472,7 @@
- 		else
- 			group = find_group_orlov(sb, dir);
- 	} else 
--		group = find_group_other(sb, dir);
-+		group = find_group_other(sb, dir, mode);
- 
- 	err = -ENOSPC;
- 	if (group == -1)
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/fs/ext3/super.c	2005-05-16 14:10:54.000000000 -0600
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/fs/ext3/super.c	2005-05-16 14:17:14.000000000 -0600
-@@ -1297,6 +1297,7 @@
- 	percpu_counter_init(&sbi->s_dirs_counter);
- 	bgl_lock_init(&sbi->s_blockgroup_lock);
- 
-+	sbi->s_last_alloc_group = -1;
- 	for (i = 0; i < db_count; i++) {
- 		block = descriptor_loc(sb, logic_sb_block, i);
- 		sbi->s_group_desc[i] = sb_bread(sb, block);
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891.orig/include/linux/ext3_fs_sb.h	2005-05-16 14:10:54.000000000 -0600
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891/include/linux/ext3_fs_sb.h	2005-05-16 14:17:14.000000000 -0600
-@@ -59,6 +59,8 @@
- 	struct percpu_counter s_freeinodes_counter;
- 	struct percpu_counter s_dirs_counter;
- 	struct blockgroup_lock s_blockgroup_lock;
-+	/* Last group used to allocate inode */
-+	int s_last_alloc_group;
- 
- 	/* root of the per fs reservation window tree */
- 	spinlock_t s_rsv_window_lock;
diff --git a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch
deleted file mode 100644
index 52e55210924a6d3b65a189afecdda090c372ebd9..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-rhel4.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2005-02-25 14:53:56.424908168 +0200
-+++ linux-stage/include/linux/ext3_fs.h	2005-02-25 14:53:59.376459464 +0200
-@@ -361,12 +361,13 @@
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
--#ifndef _LINUX_EXT2_FS_H
-+#ifndef clear_opt
- #define clear_opt(o, opt)		o &= ~EXT3_MOUNT_##opt
- #define set_opt(o, opt)			o |= EXT3_MOUNT_##opt
- #define test_opt(sb, opt)		(EXT3_SB(sb)->s_mount_opt & \
- 					 EXT3_MOUNT_##opt)
--#else
-+#endif
-+#ifndef EXT2_MOUNT_NOLOAD
- #define EXT2_MOUNT_NOLOAD		EXT3_MOUNT_NOLOAD
- #define EXT2_MOUNT_ABORT		EXT3_MOUNT_ABORT
- #define EXT2_MOUNT_DATA_FLAGS		EXT3_MOUNT_DATA_FLAGS
diff --git a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch
deleted file mode 100644
index 1ac944bf4064c6ed40027411aefbac92be9ba3d6..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-include-fixes-2.6-suse.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2004-04-02 16:43:37.000000000 -0500
-+++ linux-stage/include/linux/ext3_fs.h	2004-04-02 16:43:37.000000000 -0500
-@@ -331,12 +331,13 @@
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
--#ifndef _LINUX_EXT2_FS_H
-+#ifndef clear_opt
- #define clear_opt(o, opt)		o &= ~EXT3_MOUNT_##opt
- #define set_opt(o, opt)			o |= EXT3_MOUNT_##opt
- #define test_opt(sb, opt)		(EXT3_SB(sb)->s_mount_opt & \
- 					 EXT3_MOUNT_##opt)
--#else
-+#endif
-+#ifndef EXT2_MOUNT_NOLOAD
- #define EXT2_MOUNT_NOLOAD		EXT3_MOUNT_NOLOAD
- #define EXT2_MOUNT_ABORT		EXT3_MOUNT_ABORT
- #define EXT2_MOUNT_DATA_FLAGS		EXT3_MOUNT_DATA_FLAGS
diff --git a/ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch
deleted file mode 100644
index a05256ba5867515a58faee6f3d9b8c268d2bea15..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-lookup-dotdot-2.6.9.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-Index: linux-2.6.9-full/fs/ext3/iopen.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/iopen.c	2006-04-25 08:51:11.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/iopen.c	2006-05-06 01:21:11.000000000 +0400
-@@ -94,9 +94,12 @@ static struct dentry *iopen_lookup(struc
- 		assert(!(alternate->d_flags & DCACHE_DISCONNECTED));
- 	}
- 
--	if (!list_empty(&inode->i_dentry)) {
--		alternate = list_entry(inode->i_dentry.next,
--				       struct dentry, d_alias);
-+	list_for_each(lp, &inode->i_dentry) {
-+		alternate = list_entry(lp, struct dentry, d_alias);
-+		/* ignore dentries created for ".." to preserve
-+		 * proper dcache hierarchy -- bug 10458 */
-+		if (alternate->d_flags & DCACHE_NFSFS_RENAMED)
-+			continue;
- 		dget_locked(alternate);
- 		spin_lock(&alternate->d_lock);
- 		alternate->d_flags |= DCACHE_REFERENCED;
-Index: linux-2.6.9-full/fs/ext3/namei.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/namei.c	2006-05-06 01:21:10.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/namei.c	2006-05-06 01:29:30.000000000 +0400
-@@ -1003,6 +1003,38 @@ static struct dentry *ext3_lookup(struct
- 			return ERR_PTR(-EACCES);
- 	}
- 
-+	/* ".." shouldn't go into dcache to preserve dcache hierarchy
-+	 * otherwise we'll get parent being a child of actual child.
-+	 * see bug 10458 for details -bzzz */
-+	if (inode && (dentry->d_name.name[0] == '.' && (dentry->d_name.len == 1 ||
-+		(dentry->d_name.len == 2 && dentry->d_name.name[1] == '.')))) {
-+		struct dentry *tmp, *goal = NULL;
-+		struct list_head *lp;
-+
-+		/* first, look for an existing dentry - any one is good */
-+		spin_lock(&dcache_lock);
-+		list_for_each(lp, &inode->i_dentry) {
-+			tmp = list_entry(lp, struct dentry, d_alias);
-+			goal = tmp;
-+			dget_locked(goal);
-+			break;
-+		}
-+		if (goal == NULL) {
-+			/* there is no alias, we need to make current dentry:
-+			 *  a) inaccessible for __d_lookup()
-+			 *  b) inaccessible for iopen */
-+			J_ASSERT(list_empty(&dentry->d_alias));
-+			dentry->d_flags |= DCACHE_NFSFS_RENAMED;
-+			/* this is d_instantiate() ... */
-+			list_add(&dentry->d_alias, &inode->i_dentry);
-+			dentry->d_inode = inode;
-+		}
-+		spin_unlock(&dcache_lock);
-+		if (goal)
-+			iput(inode);
-+		return goal;
-+	}
-+
- 	return iopen_connect_dentry(dentry, inode, 1);
- }
- 
diff --git a/ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch
deleted file mode 100644
index 2b6bcf1a3b35dd1d33efbb5c09eab9f1a8a97bd4..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-map_inode_page-2.6-suse.patch
+++ /dev/null
@@ -1,86 +0,0 @@
- fs/ext3/inode.c |   52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- fs/ext3/super.c |    3 +++
- 2 files changed, 55 insertions(+)
-
-Index: linux-2.6.0/fs/ext3/inode.c
-===================================================================
---- linux-2.6.0.orig/fs/ext3/inode.c	2003-12-31 00:33:49.000000000 +0300
-+++ linux-2.6.0/fs/ext3/inode.c	2003-12-31 01:14:17.000000000 +0300
-@@ -3136,3 +3136,62 @@
- 		ret = ret2;
- 	return ret;
- }
-+
-+int ext3_map_inode_page(struct inode *inode, struct page *page,
-+                        unsigned long *blocks, int *created, int create)
-+{
-+        unsigned int blocksize, blocks_per_page;
-+        unsigned long iblock;
-+        struct buffer_head dummy;
-+        void *handle;
-+        int i, rc = 0, failed = 0, needed_blocks;
-+
-+        blocksize = inode->i_sb->s_blocksize;
-+        blocks_per_page = PAGE_SIZE >> inode->i_sb->s_blocksize_bits;
-+        iblock = page->index * blocks_per_page;
-+
-+        for (i = 0; i < blocks_per_page; i++, iblock++) {
-+                blocks[i] = ext3_bmap(inode->i_mapping, iblock);
-+                if (blocks[i] == 0) {
-+                        failed++;
-+			if (created)
-+				created[i] = -1;
-+		} else if (created) {
-+                        created[i] = 0;
-+                }
-+        }
-+
-+        if (failed == 0 || create == 0)
-+                return 0;
-+
-+        needed_blocks = ext3_writepage_trans_blocks(inode);
-+        handle = ext3_journal_start(inode, needed_blocks);
-+        if (IS_ERR(handle))
-+                return PTR_ERR(handle);
-+
-+        iblock = page->index * blocks_per_page;
-+        for (i = 0; i < blocks_per_page; i++, iblock++) {
-+                if (blocks[i] != 0)
-+                        continue;
-+
-+                rc = ext3_get_block_handle(handle, inode, iblock, &dummy, 1, 1);
-+                if (rc) {
-+                        printk(KERN_INFO "ext3_map_inode_page: error reading "
-+                               "block %ld\n", iblock);
-+                        goto out;
-+                }
-+		/* Unmap any metadata buffers from the block mapping, to avoid
-+		 * data corruption due to direct-write from Lustre being
-+		 * clobbered by a later flush of the blockdev metadata buffer.*/
-+                if (buffer_new(&dummy))
-+                        unmap_underlying_metadata(dummy.b_bdev,
-+                                                      dummy.b_blocknr);
-+                blocks[i] = dummy.b_blocknr;
-+		if (created)
-+			created[i] = 1;
-+        }
-+
-+ out:
-+	ext3_journal_stop(handle);
-+        return rc;
-+}
-Index: linux-2.6.0/fs/ext3/super.c
-===================================================================
---- linux-2.6.0.orig/fs/ext3/super.c	2003-12-31 00:33:49.000000000 +0300
-+++ linux-2.6.0/fs/ext3/super.c	2003-12-31 01:10:40.000000000 +0300
-@@ -2051,6 +2051,10 @@
-                         int nblocks, loff_t newsize);
- EXPORT_SYMBOL(ext3_prep_san_write);
- 
-+int ext3_map_inode_page(struct inode *inode, struct page *page,
-+                        unsigned long *blocks, int *created, int create);
-+EXPORT_SYMBOL(ext3_map_inode_page);
-+
- MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
- MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions");
- MODULE_LICENSE("GPL");
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch
deleted file mode 100644
index 90a9123f723315e43c1f6710d63b7207b5cb4b75..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-fc5.patch
+++ /dev/null
@@ -1,3103 +0,0 @@
-Index: linux-2.6.16.i686/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.16.i686.orig/include/linux/ext3_fs.h	2006-05-30 22:55:32.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/ext3_fs.h	2006-05-30 23:02:59.000000000 +0800
-@@ -57,6 +57,14 @@
- #define ext3_debug(f, a...)	do {} while (0)
- #endif
- 
-+#define EXT3_MULTIBLOCK_ALLOCATOR	1
-+
-+#define EXT3_MB_HINT_MERGE		1
-+#define EXT3_MB_HINT_RESERVED		2
-+#define EXT3_MB_HINT_METADATA		4
-+#define EXT3_MB_HINT_FIRST		8
-+#define EXT3_MB_HINT_BEST		16
-+
- /*
-  * Special inodes numbers
-  */
-@@ -383,6 +391,7 @@
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x800000/* Make iopen world-readable */
- #define EXT3_MOUNT_EXTENTS		0x1000000/* Extents support */
- #define EXT3_MOUNT_EXTDEBUG		0x2000000/* Extents debug */
-+#define EXT3_MOUNT_MBALLOC		0x4000000/* Buddy allocation support */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -404,6 +413,14 @@
- #define ext3_find_first_zero_bit	ext2_find_first_zero_bit
- #define ext3_find_next_zero_bit		ext2_find_next_zero_bit
- 
-+#ifndef ext2_find_next_le_bit
-+#ifdef __LITTLE_ENDIAN
-+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off))
-+#else
-+#error "mballoc needs a patch for big-endian systems - CFS bug 10634"
-+#endif	/* __LITTLE_ENDIAN */
-+#endif	/* !ext2_find_next_le_bit */
-+
- /*
-  * Maximal mount counts between two filesystem checks
-  */
-@@ -744,7 +753,9 @@
- extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
- extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
- extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
--			      unsigned long);
-+			      unsigned long, int);
-+extern int ext3_new_block_old(handle_t *handle, struct inode *inode,
-+			      unsigned long goal, int *errp);
- extern void ext3_free_blocks_sb (handle_t *, struct super_block *,
- 				 unsigned long, unsigned long, int *);
- extern unsigned long ext3_count_free_blocks (struct super_block *);
-@@ -865,6 +874,17 @@
- extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
- 			  unsigned int cmd, unsigned long arg);
- 
-+/* mballoc.c */
-+extern long ext3_mb_stats;
-+extern long ext3_mb_max_to_scan;
-+extern int ext3_mb_init(struct super_block *, int);
-+extern int ext3_mb_release(struct super_block *);
-+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *);
-+extern int ext3_mb_reserve_blocks(struct super_block *, int);
-+extern void ext3_mb_release_blocks(struct super_block *, int);
-+int __init init_ext3_proc(void);
-+void exit_ext3_proc(void);
-+
- #endif	/* __KERNEL__ */
- 
- /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */
-Index: linux-2.6.16.i686/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.16.i686.orig/include/linux/ext3_fs_sb.h	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/ext3_fs_sb.h	2006-05-30 23:02:59.000000000 +0800
-@@ -21,8 +21,14 @@
- #include <linux/wait.h>
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
-+#include <linux/list.h>
- #endif
- #include <linux/rbtree.h>
-+#include <linux/proc_fs.h>
-+
-+struct ext3_buddy_group_blocks;
-+struct ext3_mb_history;
-+#define EXT3_BB_MAX_BLOCKS
- 
- /*
-  * third extended-fs super-block data in memory
-@@ -78,6 +84,43 @@
- 	char *s_qf_names[MAXQUOTAS];		/* Names of quota files with journalled quota */
- 	int s_jquota_fmt;			/* Format of quota to use */
- #endif
-+
-+	/* for buddy allocator */
-+	struct ext3_group_info ***s_group_info;
-+	struct inode *s_buddy_cache;
-+	long s_blocks_reserved;
-+	spinlock_t s_reserve_lock;
-+	struct list_head s_active_transaction;
-+	struct list_head s_closed_transaction;
-+	struct list_head s_committed_transaction;
-+	spinlock_t s_md_lock;
-+	tid_t s_last_transaction;
-+	int s_mb_factor;
-+	unsigned short *s_mb_offsets, *s_mb_maxs;
-+	unsigned long s_stripe;
-+
-+	/* history to debug policy */
-+	struct ext3_mb_history *s_mb_history;
-+	int s_mb_history_cur;
-+	int s_mb_history_max;
-+	struct proc_dir_entry *s_mb_proc;
-+	spinlock_t s_mb_history_lock;
-+
-+	/* stats for buddy allocator */
-+	atomic_t s_bal_reqs;	/* number of reqs with len > 1 */
-+	atomic_t s_bal_success;	/* we found long enough chunks */
-+	atomic_t s_bal_allocated;	/* in blocks */
-+	atomic_t s_bal_ex_scanned;	/* total extents scanned */
-+	atomic_t s_bal_goals;	/* goal hits */
-+	atomic_t s_bal_breaks;	/* too long searches */
-+	atomic_t s_bal_2orders;	/* 2^order hits */
-+	spinlock_t s_bal_lock;
-+	unsigned long s_mb_buddies_generated;
-+	unsigned long long s_mb_generation_time;
- };
-+
-+#define EXT3_GROUP_INFO(sb, group)					   \
-+	EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \
-+				 [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)]
- 
- #endif	/* _LINUX_EXT3_FS_SB */
-Index: linux-2.6.16.i686/fs/ext3/super.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/super.c	2006-05-30 22:55:32.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/super.c	2006-05-30 23:02:59.000000000 +0800
-@@ -392,6 +392,7 @@
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_mb_release(sb);
- 	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
-@@ -640,6 +641,7 @@
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- 	Opt_extents, Opt_noextents, Opt_extdebug,
-+	Opt_mballoc, Opt_nomballoc, Opt_stripe,
- 	Opt_grpquota
- };
- 
-@@ -694,6 +695,9 @@
- 	{Opt_extents, "extents"},
- 	{Opt_noextents, "noextents"},
- 	{Opt_extdebug, "extdebug"},
-+	{Opt_mballoc, "mballoc"},
-+	{Opt_nomballoc, "nomballoc"},
-+	{Opt_stripe, "stripe=%u"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -1041,6 +1043,19 @@
- 		case Opt_extdebug:
- 			set_opt (sbi->s_mount_opt, EXTDEBUG);
- 			break;
-+		case Opt_mballoc:
-+			set_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_nomballoc:
-+			clear_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_stripe:
-+			if (match_int(&args[0], &option))
-+				return 0;
-+			if (option < 0)
-+				return 0;
-+			sbi->s_stripe = option;
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1766,6 +1771,7 @@
- 		ext3_count_dirs(sb));
- 
- 	ext3_ext_init(sb);
-+	ext3_mb_init(sb, needs_recovery);
- 	lock_kernel();
- 	return 0;
- 
-@@ -2699,7 +2705,13 @@
- 
- static int __init init_ext3_fs(void)
- {
--	int err = init_ext3_xattr();
-+	int err;
-+
-+	err = init_ext3_proc();
-+	if (err)
-+		return err;
-+
-+	err = init_ext3_xattr();
- 	if (err)
- 		return err;
- 	err = init_inodecache();
-@@ -2721,6 +2733,7 @@
- 	unregister_filesystem(&ext3_fs_type);
- 	destroy_inodecache();
- 	exit_ext3_xattr();
-+	exit_ext3_proc();
- }
- 
- int ext3_prep_san_write(struct inode *inode, long *blocks,
-Index: linux-2.6.16.i686/fs/ext3/extents.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/extents.c	2006-05-30 22:55:32.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/extents.c	2006-05-30 23:02:59.000000000 +0800
-@@ -771,7 +771,7 @@
- 		for (i = 0; i < depth; i++) {
- 			if (!ablocks[i])
- 				continue;
--			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1);
- 		}
- 	}
- 	kfree(ablocks);
-@@ -1428,7 +1428,7 @@
- 		  path->p_idx->ei_leaf);
- 	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
- 	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
--	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1);
- 	return err;
- }
- 
-@@ -1913,10 +1913,12 @@
- 	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
- 	handle_t *handle = ext3_journal_start(tree->inode, needed);
- 	struct buffer_head *bh;
--	int i;
-+	int i, metadata = 0;
- 
- 	if (IS_ERR(handle))
- 		return PTR_ERR(handle);
-+	if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode))
-+		metadata = 1;
- 	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
- 		/* tail removal */
- 		unsigned long num, start;
-@@ -1928,7 +1930,7 @@
- 			bh = sb_find_get_block(tree->inode->i_sb, start + i);
- 			ext3_forget(handle, 0, tree->inode, bh, start + i);
- 		}
--		ext3_free_blocks(handle, tree->inode, start, num);
-+		ext3_free_blocks(handle, tree->inode, start, num, metadata);
- 	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
- 		printk("strange request: removal %lu-%lu from %u:%u\n",
- 		       from, to, ex->ee_block, ex->ee_len);
-Index: linux-2.6.16.i686/fs/ext3/inode.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/inode.c	2006-05-30 22:55:32.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/inode.c	2006-05-30 23:02:59.000000000 +0800
-@@ -568,7 +568,7 @@
- 		ext3_journal_forget(handle, branch[i].bh);
- 	}
- 	for (i = 0; i < keys; i++)
--		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1);
-+		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1);
- 	return err;
- }
- 
-@@ -1862,7 +1862,7 @@
- 		}
- 	}
- 
--	ext3_free_blocks(handle, inode, block_to_free, count);
-+	ext3_free_blocks(handle, inode, block_to_free, count, 1);
- }
- 
- /**
-@@ -2035,7 +2035,7 @@
- 				ext3_journal_test_restart(handle, inode);
- 			}
- 
--			ext3_free_blocks(handle, inode, nr, 1);
-+			ext3_free_blocks(handle, inode, nr, 1, 1);
- 
- 			if (parent_bh) {
- 				/*
-Index: linux-2.6.16.i686/fs/ext3/balloc.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/balloc.c	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/balloc.c	2006-05-30 23:02:59.000000000 +0800
-@@ -80,7 +80,7 @@
-  *
-  * Return buffer_head on success or NULL in case of failure.
-  */
--static struct buffer_head *
-+struct buffer_head *
- read_block_bitmap(struct super_block *sb, unsigned int block_group)
- {
- 	struct ext3_group_desc * desc;
-@@ -491,24 +491,6 @@
- 	return;
- }
- 
--/* Free given blocks, update quota and i_blocks field */
--void ext3_free_blocks(handle_t *handle, struct inode *inode,
--			unsigned long block, unsigned long count)
--{
--	struct super_block * sb;
--	int dquot_freed_blocks;
--
--	sb = inode->i_sb;
--	if (!sb) {
--		printk ("ext3_free_blocks: nonexistent device");
--		return;
--	}
--	ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
--	if (dquot_freed_blocks)
--		DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
--	return;
--}
--
- /*
-  * For ext3 allocations, we must not reuse any blocks which are
-  * allocated in the bitmap buffer's "last committed data" copy.  This
-@@ -1154,7 +1136,7 @@
-  * bitmap, and then for any free bit if that fails.
-  * This function also updates quota and i_blocks field.
-  */
--int ext3_new_block(handle_t *handle, struct inode *inode,
-+int ext3_new_block_old(handle_t *handle, struct inode *inode,
- 			unsigned long goal, int *errp)
- {
- 	struct buffer_head *bitmap_bh = NULL;
-Index: linux-2.6.16.i686/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/xattr.c	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/xattr.c	2006-05-30 23:02:59.000000000 +0800
-@@ -484,7 +484,7 @@
- 		ea_bdebug(bh, "refcount now=0; freeing");
- 		if (ce)
- 			mb_cache_entry_free(ce);
--		ext3_free_blocks(handle, inode, bh->b_blocknr, 1);
-+		ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1);
- 		get_bh(bh);
- 		ext3_forget(handle, 1, inode, bh, bh->b_blocknr);
- 	} else {
-@@ -804,7 +804,7 @@
- 			new_bh = sb_getblk(sb, block);
- 			if (!new_bh) {
- getblk_failed:
--				ext3_free_blocks(handle, inode, block, 1);
-+				ext3_free_blocks(handle, inode, block, 1, 1);
- 				error = -EIO;
- 				goto cleanup;
- 			}
-Index: linux-2.6.16.i686/fs/ext3/mballoc.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/mballoc.c	2006-05-31 04:14:15.752410384 +0800
-+++ linux-2.6.16.i686/fs/ext3/mballoc.c	2006-05-30 23:03:38.000000000 +0800
-@@ -0,0 +1,2725 @@
-+/*
-+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+
-+/*
-+ * mballoc.c contains the multiblocks allocation routines
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/time.h>
-+#include <linux/fs.h>
-+#include <linux/namei.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/quotaops.h>
-+#include <linux/buffer_head.h>
-+#include <linux/module.h>
-+#include <linux/swap.h>
-+#include <linux/proc_fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/seq_file.h>
-+
-+/*
-+ * TODO:
-+ *   - bitmap read-ahead (proposed by Oleg Drokin aka green)
-+ *   - track min/max extents in each group for better group selection
-+ *   - mb_mark_used() may allocate chunk right after splitting buddy
-+ *   - special flag to advice allocator to look for requested + N blocks
-+ *     this may improve interaction between extents and mballoc
-+ *   - tree of groups sorted by number of free blocks
-+ *   - percpu reservation code (hotpath)
-+ *   - error handling
-+ */
-+
-+/*
-+ * with AGRESSIVE_CHECK allocator runs consistency checks over
-+ * structures. these checks slow things down a lot
-+ */
-+#define AGGRESSIVE_CHECK__
-+
-+/*
-+ */
-+#define MB_DEBUG__
-+#ifdef MB_DEBUG
-+#define mb_debug(fmt,a...)	printk(fmt, ##a)
-+#else
-+#define mb_debug(fmt,a...)
-+#endif
-+
-+/*
-+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory
-+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history
-+ */
-+#define EXT3_MB_HISTORY
-+
-+/*
-+ * How long mballoc can look for a best extent (in found extents)
-+ */
-+long ext3_mb_max_to_scan = 500;
-+
-+/*
-+ * How long mballoc must look for a best extent
-+ */
-+long ext3_mb_min_to_scan = 30;
-+
-+/*
-+ * with 'ext3_mb_stats' allocator will collect stats that will be
-+ * shown at umount. The collecting costs though!
-+ */
-+
-+long ext3_mb_stats = 1;
-+
-+/*
-+ * for which requests use 2^N search using buddies
-+ */
-+long ext3_mb_order2_reqs = 8;
-+
-+#ifdef EXT3_BB_MAX_BLOCKS
-+#undef EXT3_BB_MAX_BLOCKS
-+#endif
-+#define EXT3_BB_MAX_BLOCKS	30
-+
-+struct ext3_free_metadata {
-+	unsigned short group;
-+	unsigned short num;
-+	unsigned short blocks[EXT3_BB_MAX_BLOCKS];
-+	struct list_head list;
-+};
-+
-+struct ext3_group_info {
-+	unsigned long	bb_state;
-+	unsigned long 	bb_tid;
-+	struct ext3_free_metadata *bb_md_cur;
-+	unsigned short	bb_first_free;
-+	unsigned short	bb_free;
-+	unsigned short	bb_fragments;
-+	unsigned short	bb_counters[];
-+};
-+
-+
-+#define EXT3_GROUP_INFO_NEED_INIT_BIT	0
-+#define EXT3_GROUP_INFO_LOCKED_BIT	1
-+
-+#define EXT3_MB_GRP_NEED_INIT(grp)	\
-+	(test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state))
-+
-+struct ext3_free_extent {
-+	__u16 fe_start;
-+	__u16 fe_len;
-+	__u16 fe_group;
-+};
-+
-+struct ext3_allocation_context {
-+	struct super_block *ac_sb;
-+
-+	/* search goals */
-+	struct ext3_free_extent ac_g_ex;
-+
-+	/* the best found extent */
-+	struct ext3_free_extent ac_b_ex;
-+
-+	/* number of iterations done. we have to track to limit searching */
-+	unsigned long ac_ex_scanned;
-+	__u16 ac_groups_scanned;
-+	__u16 ac_found;
-+	__u16 ac_tail;
-+	__u16 ac_buddy;
-+	__u8 ac_status;	
-+	__u8 ac_flags;		/* allocation hints */
-+	__u8 ac_criteria;
-+	__u8 ac_repeats;
-+	__u8 ac_2order;		/* if request is to allocate 2^N blocks and
-+				 * N > 0, the field stores N, otherwise 0 */
-+
-+	struct page *ac_buddy_page;
-+	struct page *ac_bitmap_page;
-+};
-+
-+#define AC_STATUS_CONTINUE	1
-+#define AC_STATUS_FOUND		2
-+#define AC_STATUS_BREAK		3
-+
-+struct ext3_mb_history {
-+	struct ext3_free_extent goal;	/* goal allocation */
-+	struct ext3_free_extent result;	/* result allocation */
-+	unsigned pid;
-+	unsigned ino;
-+	__u16 found;	/* how many extents have been found */
-+	__u16 groups;	/* how many groups have been scanned */
-+	__u16 tail;	/* what tail broke some buddy */
-+	__u16 buddy;	/* buddy the tail ^^^ broke */
-+	__u8 cr;	/* which phase the result extent was found at */
-+	__u8 merged;
-+};
-+
-+struct ext3_buddy {
-+	struct page *bd_buddy_page;
-+	void *bd_buddy;
-+	struct page *bd_bitmap_page;
-+	void *bd_bitmap;
-+	struct ext3_group_info *bd_info;
-+	struct super_block *bd_sb;
-+	__u16 bd_blkbits;
-+	__u16 bd_group;
-+};
-+#define EXT3_MB_BITMAP(e3b)	((e3b)->bd_bitmap)
-+#define EXT3_MB_BUDDY(e3b)	((e3b)->bd_buddy)
-+
-+#ifndef EXT3_MB_HISTORY
-+#define ext3_mb_store_history(sb,ino,ac)
-+#else
-+static void ext3_mb_store_history(struct super_block *, unsigned ino,
-+				struct ext3_allocation_context *ac);
-+#endif
-+
-+#define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
-+
-+static struct proc_dir_entry *proc_root_ext3;
-+
-+struct buffer_head *read_block_bitmap(struct super_block *, unsigned int);
-+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
-+void ext3_mb_free_committed_blocks(struct super_block *);
-+
-+#if BITS_PER_LONG == 64
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 7UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~7UL);	\
-+}
-+#elif BITS_PER_LONG == 32
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 3UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~3UL);	\
-+}
-+#else
-+#error "how many bits you are?!"
-+#endif
-+
-+static inline int mb_test_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	return ext2_test_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline void mb_clear_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit(bit, addr);
-+}
-+
-+static inline void mb_clear_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline int mb_find_next_zero_bit(void *addr, int max, int start)
-+{
-+	int fix;
-+#if BITS_PER_LONG == 64
-+	fix = ((unsigned long) addr & 7UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~7UL);
-+#elif BITS_PER_LONG == 32
-+	fix = ((unsigned long) addr & 3UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~3UL);
-+#else
-+#error "how many bits you are?!"
-+#endif
-+	max += fix;
-+	start += fix;
-+	return ext2_find_next_zero_bit(addr, max, start) - fix;
-+}
-+
-+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max)
-+{
-+	char *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(max != NULL);
-+
-+	if (order > e3b->bd_blkbits + 1) {
-+		*max = 0;
-+		return NULL;
-+	}
-+
-+	/* at order 0 we see each particular block */
-+	*max = 1 << (e3b->bd_blkbits + 3);
-+	if (order == 0)
-+		return EXT3_MB_BITMAP(e3b);
-+
-+	bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order];
-+	*max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order];
-+
-+	return bb;
-+}
-+
-+#ifdef AGGRESSIVE_CHECK
-+
-+static void mb_check_buddy(struct ext3_buddy *e3b)
-+{
-+	int order = e3b->bd_blkbits + 1;
-+	int max, max2, i, j, k, count;
-+	int fragments = 0, fstart;
-+	void *buddy, *buddy2;
-+
-+	if (!test_opt(e3b->bd_sb, MBALLOC))
-+		return;
-+
-+	{
-+		static int mb_check_counter = 0;
-+		if (mb_check_counter++ % 300 != 0)
-+			return;
-+	}
-+
-+	while (order > 1) {
-+		buddy = mb_find_buddy(e3b, order, &max);
-+		J_ASSERT(buddy);
-+		buddy2 = mb_find_buddy(e3b, order - 1, &max2);
-+		J_ASSERT(buddy2);
-+		J_ASSERT(buddy != buddy2);
-+		J_ASSERT(max * 2 == max2);
-+
-+		count = 0;
-+		for (i = 0; i < max; i++) {
-+
-+			if (mb_test_bit(i, buddy)) {
-+				/* only single bit in buddy2 may be 1 */
-+				if (!mb_test_bit(i << 1, buddy2))
-+					J_ASSERT(mb_test_bit((i<<1)+1, buddy2));
-+				else if (!mb_test_bit((i << 1) + 1, buddy2))
-+					J_ASSERT(mb_test_bit(i << 1, buddy2));
-+				continue;
-+			}
-+
-+			/* both bits in buddy2 must be 0 */
-+			J_ASSERT(mb_test_bit(i << 1, buddy2));
-+			J_ASSERT(mb_test_bit((i << 1) + 1, buddy2));
-+
-+			for (j = 0; j < (1 << order); j++) {
-+				k = (i * (1 << order)) + j;
-+				J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b)));
-+			}
-+			count++;
-+		}
-+		J_ASSERT(e3b->bd_info->bb_counters[order] == count);
-+		order--;
-+	}
-+
-+	fstart = -1;
-+	buddy = mb_find_buddy(e3b, 0, &max);
-+	for (i = 0; i < max; i++) {
-+		if (!mb_test_bit(i, buddy)) {
-+			J_ASSERT(i >= e3b->bd_info->bb_first_free);
-+			if (fstart == -1) {
-+				fragments++;
-+				fstart = i;
-+			}
-+			continue;
-+		}
-+		fstart = -1;
-+		/* check used bits only */
-+		for (j = 0; j < e3b->bd_blkbits + 1; j++) {
-+			buddy2 = mb_find_buddy(e3b, j, &max2);
-+			k = i >> j;
-+			J_ASSERT(k < max2);
-+			J_ASSERT(mb_test_bit(k, buddy2));
-+		}
-+	}
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info));
-+	J_ASSERT(e3b->bd_info->bb_fragments == fragments);
-+}
-+
-+#else
-+#define mb_check_buddy(e3b)
-+#endif
-+
-+/* find most significant bit */
-+static int inline fmsb(unsigned short word)
-+{
-+	int order;
-+
-+	if (word > 255) {
-+		order = 7;
-+		word >>= 8;
-+	} else {
-+		order = -1;
-+	}
-+
-+	do {
-+		order++;
-+		word >>= 1;
-+	} while (word != 0);
-+
-+	return order;
-+}
-+
-+static void inline
-+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first,
-+				int len, struct ext3_group_info *grp)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	unsigned short min, max, chunk, border;
-+
-+	mb_debug("mark %u/%u free\n", first, len);
-+	J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	border = 2 << sb->s_blocksize_bits;
-+
-+	while (len > 0) {
-+		/* find how many blocks can be covered since this position */
-+		max = ffs(first | border) - 1;
-+
-+		/* find how many blocks of power 2 we need to mark */
-+		min = fmsb(len);
-+
-+		mb_debug("  %u/%u -> max %u, min %u\n",
-+			first & ((2 << sb->s_blocksize_bits) - 1),
-+			len, max, min);
-+
-+		if (max < min)
-+			min = max;
-+		chunk = 1 << min;
-+
-+		/* mark multiblock chunks only */
-+		grp->bb_counters[min]++;
-+		if (min > 0) {
-+			mb_debug("    set %u at %u \n", first >> min,
-+				sbi->s_mb_offsets[min]);
-+			mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]);
-+		}
-+
-+		len -= chunk;
-+		first += chunk;
-+	}
-+}
-+
-+static void
-+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap,
-+			int group)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group);
-+	unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
-+	unsigned short i = 0, first, len;
-+	unsigned free = 0, fragments = 0;
-+	unsigned long long period = get_cycles();
-+
-+	i = mb_find_next_zero_bit(bitmap, max, 0);
-+	grp->bb_first_free = i;
-+	while (i < max) {
-+		fragments++;
-+		first = i;
-+		i = ext2_find_next_le_bit(bitmap, max, i);
-+		len = i - first;
-+		free += len;
-+		if (len > 1)
-+			ext3_mb_mark_free_simple(sb, buddy, first, len, grp);
-+		else
-+			grp->bb_counters[0]++;
-+		if (i < max)
-+			i = mb_find_next_zero_bit(bitmap, max, i);
-+	}
-+	grp->bb_fragments = fragments;
-+
-+	/* bb_state shouldn't being modified because all
-+	 * others waits for init completion on page lock */
-+	clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state);
-+	if (free != grp->bb_free) {
-+		printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n",
-+			group, free, grp->bb_free);
-+		grp->bb_free = free;
-+	}
-+
-+	period = get_cycles() - period;
-+	spin_lock(&EXT3_SB(sb)->s_bal_lock);
-+	EXT3_SB(sb)->s_mb_buddies_generated++;
-+	EXT3_SB(sb)->s_mb_generation_time += period;
-+	spin_unlock(&EXT3_SB(sb)->s_bal_lock);
-+}
-+
-+static int ext3_mb_init_cache(struct page *page)
-+{
-+	int blocksize, blocks_per_page, groups_per_page;
-+	int err = 0, i, first_group, first_block;
-+	struct super_block *sb;
-+	struct buffer_head *bhs;
-+	struct buffer_head **bh;
-+	struct inode *inode;
-+	char *data, *bitmap;
-+
-+	mb_debug("init page %lu\n", page->index);
-+
-+	inode = page->mapping->host;
-+	sb = inode->i_sb;
-+	blocksize = 1 << inode->i_blkbits;
-+	blocks_per_page = PAGE_CACHE_SIZE / blocksize;
-+
-+	groups_per_page = blocks_per_page >> 1;
-+	if (groups_per_page == 0)
-+		groups_per_page = 1;
-+
-+	/* allocate buffer_heads to read bitmaps */
-+	if (groups_per_page > 1) {
-+		err = -ENOMEM;
-+		i = sizeof(struct buffer_head *) * groups_per_page;
-+		bh = kmalloc(i, GFP_NOFS);
-+		if (bh == NULL)
-+			goto out;
-+		memset(bh, 0, i);
-+	} else
-+		bh = &bhs;
-+
-+	first_group = page->index * blocks_per_page / 2;
-+
-+	/* read all groups the page covers into the cache */
-+	for (i = 0; i < groups_per_page; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		if (first_group + i >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		err = -EIO;
-+		desc = ext3_get_group_desc(sb, first_group + i, NULL);
-+		if (desc == NULL)
-+			goto out;
-+
-+		err = -ENOMEM;
-+		bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap));
-+		if (bh[i] == NULL)
-+			goto out;
-+
-+		if (buffer_uptodate(bh[i]))
-+			continue;
-+
-+		lock_buffer(bh[i]);
-+		if (buffer_uptodate(bh[i])) {
-+			unlock_buffer(bh[i]);
-+			continue;
-+		}
-+
-+		get_bh(bh[i]);
-+		bh[i]->b_end_io = end_buffer_read_sync;
-+		submit_bh(READ, bh[i]);
-+		mb_debug("read bitmap for group %u\n", first_group + i);
-+	}
-+
-+	/* wait for I/O completion */
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		wait_on_buffer(bh[i]);
-+
-+	err = -EIO;
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		if (!buffer_uptodate(bh[i]))
-+			goto out;
-+
-+	first_block = page->index * blocks_per_page;
-+	for (i = 0; i < blocks_per_page; i++) {
-+		int group;
-+
-+		group = (first_block + i) >> 1;
-+		if (group >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		data = page_address(page) + (i * blocksize);
-+		bitmap = bh[group - first_group]->b_data;
-+
-+		if ((first_block + i) & 1) {
-+			/* this is block of buddy */
-+			mb_debug("put buddy for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memset(data, 0xff, blocksize);
-+			EXT3_GROUP_INFO(sb, group)->bb_fragments = 0;
-+			memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0,
-+			       sizeof(unsigned short)*(sb->s_blocksize_bits+2));
-+			ext3_mb_generate_buddy(sb, data, bitmap, group);
-+		} else {
-+			/* this is block of bitmap */
-+			mb_debug("put bitmap for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memcpy(data, bitmap, blocksize);
-+		}
-+	}
-+	SetPageUptodate(page);
-+
-+out:
-+	if (bh) {
-+		for (i = 0; i < groups_per_page && bh[i]; i++)
-+			brelse(bh[i]);
-+		if (bh != &bhs)
-+			kfree(bh);
-+	}
-+	return err;
-+}
-+
-+static int ext3_mb_load_buddy(struct super_block *sb, int group,
-+		struct ext3_buddy *e3b)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *inode = sbi->s_buddy_cache;
-+	int blocks_per_page, block, pnum, poff;
-+	struct page *page;
-+
-+	mb_debug("load group %u\n", group);
-+
-+	blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
-+
-+	e3b->bd_blkbits = sb->s_blocksize_bits;
-+	e3b->bd_info = EXT3_GROUP_INFO(sb, group);
-+	e3b->bd_sb = sb;
-+	e3b->bd_group = group;
-+	e3b->bd_buddy_page = NULL;
-+	e3b->bd_bitmap_page = NULL;
-+
-+	block = group * 2;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	/* we could use find_or_create_page(), but it locks page
-+	 * what we'd like to avoid in fast path ... */
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_bitmap_page = page;
-+	e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	block++;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_buddy_page = page;
-+	e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	return 0;
-+
-+err:
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+	e3b->bd_buddy = NULL;
-+	e3b->bd_bitmap = NULL;
-+	return -EIO;
-+}
-+
-+static void ext3_mb_release_desc(struct ext3_buddy *e3b)
-+{
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+}
-+
-+
-+static inline void
-+ext3_lock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT,
-+		      &EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static inline void
-+ext3_unlock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT,
-+			&EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block)
-+{
-+	int order = 1;
-+	void *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(block < (1 << (e3b->bd_blkbits + 3)));
-+
-+	bb = EXT3_MB_BUDDY(e3b);
-+	while (order <= e3b->bd_blkbits + 1) {
-+		block = block >> 1;
-+		if (!mb_test_bit(block, bb)) {
-+			/* this block is part of buddy of order 'order' */
-+			return order;
-+		}
-+		bb += 1 << (e3b->bd_blkbits - order);
-+		order++;
-+	}
-+	return 0;
-+}
-+
-+static inline void mb_clear_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_clear_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static inline void mb_set_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0xffffffff;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_set_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count)
-+{
-+	int block = 0, max = 0, order;
-+	void *buddy, *buddy2;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free += count;
-+	if (first < e3b->bd_info->bb_first_free)
-+		e3b->bd_info->bb_first_free = first;
-+
-+	/* let's maintain fragments counter */
-+	if (first != 0)
-+		block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b));
-+	if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b));
-+	if (block && max)
-+		e3b->bd_info->bb_fragments--;
-+	else if (!block && !max)
-+		e3b->bd_info->bb_fragments++;
-+
-+	/* let's maintain buddy itself */
-+	while (count-- > 0) {
-+		block = first++;
-+		order = 0;
-+
-+		J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b)));
-+		mb_clear_bit(block, EXT3_MB_BITMAP(e3b));
-+		e3b->bd_info->bb_counters[order]++;
-+
-+		/* start of the buddy */
-+		buddy = mb_find_buddy(e3b, order, &max);
-+
-+		do {
-+			block &= ~1UL;
-+			if (mb_test_bit(block, buddy) ||
-+					mb_test_bit(block + 1, buddy))
-+				break;
-+
-+			/* both the buddies are free, try to coalesce them */
-+			buddy2 = mb_find_buddy(e3b, order + 1, &max);
-+
-+			if (!buddy2)
-+				break;
-+
-+			if (order > 0) {
-+				/* for special purposes, we don't set
-+				 * free bits in bitmap */
-+				mb_set_bit(block, buddy);
-+				mb_set_bit(block + 1, buddy);
-+			}
-+			e3b->bd_info->bb_counters[order]--;
-+			e3b->bd_info->bb_counters[order]--;
-+
-+			block = block >> 1;
-+			order++;
-+			e3b->bd_info->bb_counters[order]++;
-+
-+			mb_clear_bit(block, buddy2);
-+			buddy = buddy2;
-+		} while (1);
-+	}
-+	mb_check_buddy(e3b);
-+
-+	return 0;
-+}
-+
-+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block,
-+				int needed, struct ext3_free_extent *ex)
-+{
-+	int next = block, max, ord;
-+	void *buddy;
-+
-+	J_ASSERT(ex != NULL);
-+
-+	buddy = mb_find_buddy(e3b, order, &max);
-+	J_ASSERT(buddy);
-+	J_ASSERT(block < max);
-+	if (mb_test_bit(block, buddy)) {
-+		ex->fe_len = 0;
-+		ex->fe_start = 0;
-+		ex->fe_group = 0;
-+		return 0;
-+	}
-+
-+	if (likely(order == 0)) {
-+		/* find actual order */
-+		order = mb_find_order_for_block(e3b, block);
-+		block = block >> order;
-+	}
-+
-+	ex->fe_len = 1 << order;
-+	ex->fe_start = block << order;
-+	ex->fe_group = e3b->bd_group;
-+
-+	/* calc difference from given start */
-+	next = next - ex->fe_start;
-+	ex->fe_len -= next;
-+	ex->fe_start += next;
-+
-+	while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) {
-+
-+		if (block + 1 >= max)
-+			break;
-+
-+		next = (block + 1) * (1 << order);
-+		if (mb_test_bit(next, EXT3_MB_BITMAP(e3b)))
-+			break;
-+
-+		ord = mb_find_order_for_block(e3b, next);
-+
-+		order = ord;
-+		block = next >> order;
-+		ex->fe_len += 1 << order;
-+	}
-+
-+	J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3)));
-+	return ex->fe_len;
-+}
-+
-+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex)
-+{
-+	int ord, mlen = 0, max = 0, cur;
-+	int start = ex->fe_start;
-+	int len = ex->fe_len;
-+	unsigned ret = 0;
-+	int len0 = len;
-+	void *buddy;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free -= len;
-+	if (e3b->bd_info->bb_first_free == start)
-+		e3b->bd_info->bb_first_free += len;
-+
-+	/* let's maintain fragments counter */
-+	if (start != 0)
-+		mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b));
-+	if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b));
-+	if (mlen && max)
-+		e3b->bd_info->bb_fragments++;
-+	else if (!mlen && !max)
-+		e3b->bd_info->bb_fragments--;
-+
-+	/* let's maintain buddy itself */
-+	while (len) {
-+		ord = mb_find_order_for_block(e3b, start);
-+
-+		if (((start >> ord) << ord) == start && len >= (1 << ord)) {
-+			/* the whole chunk may be allocated at once! */
-+			mlen = 1 << ord;
-+			buddy = mb_find_buddy(e3b, ord, &max);
-+			J_ASSERT((start >> ord) < max);
-+			mb_set_bit(start >> ord, buddy);
-+			e3b->bd_info->bb_counters[ord]--;
-+			start += mlen;
-+			len -= mlen;
-+			J_ASSERT(len >= 0);
-+			continue;
-+		}
-+
-+		/* store for history */
-+		if (ret == 0)
-+			ret = len | (ord << 16);
-+
-+		/* we have to split large buddy */
-+		J_ASSERT(ord > 0);
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_set_bit(start >> ord, buddy);
-+		e3b->bd_info->bb_counters[ord]--;
-+
-+		ord--;
-+		cur = (start >> ord) & ~1U;
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_clear_bit(cur, buddy);
-+		mb_clear_bit(cur + 1, buddy);
-+		e3b->bd_info->bb_counters[ord]++;
-+		e3b->bd_info->bb_counters[ord]++;
-+	}
-+
-+	/* now drop all the bits in bitmap */
-+	mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
-+
-+	mb_check_buddy(e3b);
-+
-+	return ret;
-+}
-+
-+/*
-+ * Must be called under group lock!
-+ */
-+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	unsigned long ret;
-+
-+	ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len);
-+	ret = mb_mark_used(e3b, &ac->ac_b_ex);
-+
-+	ac->ac_status = AC_STATUS_FOUND;
-+	ac->ac_tail = ret & 0xffff;
-+	ac->ac_buddy = ret >> 16;
-+
-+	/* hold in-core structures until allocated
-+	 * blocks are marked non-free in on-disk bitmap */
-+	ac->ac_buddy_page = e3b->bd_buddy_page;
-+	page_cache_get(e3b->bd_buddy_page);
-+	ac->ac_bitmap_page = e3b->bd_bitmap_page;
-+	page_cache_get(e3b->bd_bitmap_page);
-+}
-+
-+/*
-+ * The routine checks whether found extent is good enough. If it is,
-+ * then the extent gets marked used and flag is set to the context
-+ * to stop scanning. Otherwise, the extent is compared with the
-+ * previous found extent and if new one is better, then it's stored
-+ * in the context. Later, the best found extent will be used, if
-+ * mballoc can't find good enough extent.
-+ *
-+ * FIXME: real allocation policy is to be designed yet!
-+ */
-+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac,
-+					struct ext3_free_extent *ex,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent *bex = &ac->ac_b_ex;
-+	struct ext3_free_extent *gex = &ac->ac_g_ex;
-+
-+	J_ASSERT(ex->fe_len > 0);
-+	J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+	J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+
-+	ac->ac_found++;
-+
-+	/*
-+	 * The special case - take what you catch first
-+	 */
-+	if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * Let's check whether the chunk is good enough
-+	 */
-+	if (ex->fe_len == gex->fe_len) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * If this is first found extent, just store it in the context
-+	 */
-+	if (bex->fe_len == 0) {
-+		*bex = *ex;
-+		return;
-+	}
-+
-+	/*
-+	 * If new found extent is better, store it in the context
-+	 */
-+	if (bex->fe_len < gex->fe_len) {
-+		/* if the request isn't satisfied, any found extent
-+		 * larger than previous best one is better */
-+		if (ex->fe_len > bex->fe_len)
-+			*bex = *ex;
-+	} else if (ex->fe_len > gex->fe_len) {
-+		/* if the request is satisfied, then we try to find
-+		 * an extent that still satisfy the request, but is
-+		 * smaller than previous one */
-+		*bex = *ex;
-+	}
-+
-+	/*
-+	 * Let's scan at least few extents and don't pick up a first one
-+	 */
-+	if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+
-+	/*
-+	 * We don't want to scan for a whole year
-+	 */
-+	if (ac->ac_found > ext3_mb_max_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+}
-+
-+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent ex = ac->ac_b_ex;
-+	int group = ex.fe_group, max, err;
-+
-+	J_ASSERT(ex.fe_len > 0);
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex);
-+
-+	if (max > 0) {
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac,
-+				struct ext3_buddy *e3b)
-+{
-+	int group = ac->ac_g_ex.fe_group, max, err;
-+	struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb);
-+	struct ext3_super_block *es = sbi->s_es;
-+	struct ext3_free_extent ex;
-+
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start,
-+			     ac->ac_g_ex.fe_len, &ex);
-+
-+	if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) {
-+		unsigned long start;
-+		start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) +
-+			ex.fe_start + le32_to_cpu(es->s_first_data_block));
-+		if (start % sbi->s_stripe == 0) {
-+			ac->ac_found++;
-+			ac->ac_b_ex = ex;
-+			ext3_mb_use_best_found(ac, e3b);
-+		}
-+	} else if (max >= ac->ac_g_ex.fe_len) {
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	} else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) {
-+		/* Sometimes, caller may want to merge even small
-+		 * number of blocks to an existing extent */
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+/*
-+ * The routine scans buddy structures (not bitmap!) from given order
-+ * to max order and tries to find big enough chunk to satisfy the req
-+ */
-+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_group_info *grp = e3b->bd_info;
-+	void *buddy;
-+	int i, k, max;
-+
-+	J_ASSERT(ac->ac_2order > 0);
-+	for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) {
-+		if (grp->bb_counters[i] == 0)
-+			continue;
-+
-+		buddy = mb_find_buddy(e3b, i, &max);
-+		if (buddy == NULL) {
-+			printk(KERN_ALERT "looking for wrong order?\n");
-+			break;
-+		}
-+
-+		k = mb_find_next_zero_bit(buddy, max, 0);
-+		J_ASSERT(k < max);
-+
-+		ac->ac_found++;
-+
-+		ac->ac_b_ex.fe_len = 1 << i;
-+		ac->ac_b_ex.fe_start = k << i;
-+		ac->ac_b_ex.fe_group = e3b->bd_group;
-+
-+		ext3_mb_use_best_found(ac, e3b);
-+		J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len);
-+
-+		if (unlikely(ext3_mb_stats))
-+			atomic_inc(&EXT3_SB(sb)->s_bal_2orders);
-+
-+		break;
-+	}
-+}
-+
-+/*
-+ * The routine scans the group and measures all found extents.
-+ * In order to optimize scanning, caller must pass number of
-+ * free blocks in the group, so the routine can know upper limit.
-+ */
-+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	int i, free;
-+
-+	free = e3b->bd_info->bb_free;
-+	J_ASSERT(free > 0);
-+
-+	i = e3b->bd_info->bb_first_free;
-+
-+	while (free && ac->ac_status == AC_STATUS_CONTINUE) {
-+		i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i);
-+		if (i >= sb->s_blocksize * 8) {
-+			J_ASSERT(free == 0);
-+			break;
-+		}
-+
-+		mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex);
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(free >= ex.fe_len);
-+
-+		ext3_mb_measure_extent(ac, &ex, e3b);
-+
-+		i += ex.fe_len;
-+		free -= ex.fe_len;
-+	}
-+}
-+
-+/*
-+ * This is a special case for storages like raid5
-+ * we try to find stripe-aligned chunks for stripe-size requests
-+ */
-+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac,
-+				 struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	unsigned long i, max;
-+
-+	J_ASSERT(sbi->s_stripe != 0);
-+
-+	/* find first stripe-aligned block */
-+	i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb)
-+		+ le32_to_cpu(sbi->s_es->s_first_data_block);
-+	i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe;
-+	i = (i - le32_to_cpu(sbi->s_es->s_first_data_block))
-+			% EXT3_BLOCKS_PER_GROUP(sb);
-+
-+	while (i < sb->s_blocksize * 8) {
-+		if (!mb_test_bit(i, bitmap)) {
-+			max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex);
-+			if (max >= sbi->s_stripe) {
-+				ac->ac_found++;
-+				ac->ac_b_ex = ex;
-+				ext3_mb_use_best_found(ac, e3b);
-+				break;
-+			}
-+		}
-+		i += sbi->s_stripe;
-+	}
-+}
-+
-+static int ext3_mb_good_group(struct ext3_allocation_context *ac,
-+				int group, int cr)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group);
-+	unsigned free, fragments, i, bits;
-+
-+	J_ASSERT(cr >= 0 && cr < 4);
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp));
-+
-+	free = grp->bb_free;
-+	fragments = grp->bb_fragments;
-+	if (free == 0)
-+		return 0;
-+	if (fragments == 0)
-+		return 0;
-+
-+	switch (cr) {
-+		case 0:
-+			J_ASSERT(ac->ac_2order != 0);
-+			bits = ac->ac_sb->s_blocksize_bits + 1;
-+			for (i = ac->ac_2order; i <= bits; i++)
-+				if (grp->bb_counters[i] > 0)
-+					return 1;
-+			break;
-+		case 1:
-+			if ((free / fragments) >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 2:
-+			if (free >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 3:
-+			return 1;
-+		default:
-+			BUG();
-+	}
-+
-+	return 0;
-+}
-+
-+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode,
-+		       unsigned long goal, int *len, int flags, int *errp)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_allocation_context ac;
-+	int i, group, block, cr, err = 0;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	struct buffer_head *gdp_bh;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+
-+	J_ASSERT(len != NULL);
-+	J_ASSERT(*len > 0);
-+
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk("ext3_mb_new_nblocks: nonexistent device");
-+		return 0;
-+	}
-+
-+	if (!test_opt(sb, MBALLOC)) {
-+		static int ext3_mballoc_warning = 0;
-+		if (ext3_mballoc_warning == 0) {
-+			printk(KERN_ERR "EXT3-fs: multiblock request with "
-+				"mballoc disabled!\n");
-+			ext3_mballoc_warning++;
-+		}
-+		*len = 1;
-+		err = ext3_new_block_old(handle, inode, goal, errp);
-+		return err;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+
-+	/*
-+	 * We can't allocate > group size
-+	 */
-+	if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10)
-+		*len = EXT3_BLOCKS_PER_GROUP(sb) - 10;
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* someone asks for non-reserved blocks */
-+		BUG_ON(*len > 1);
-+		err = ext3_mb_reserve_blocks(sb, 1);
-+		if (err) {
-+			*errp = err;
-+			return 0;
-+		}
-+	}
-+
-+	ac.ac_buddy_page = NULL;
-+	ac.ac_bitmap_page = NULL;
-+
-+	/*
-+	 * Check quota for allocation of this blocks.
-+	 */
-+	while (*len && DQUOT_ALLOC_BLOCK(inode, *len))
-+		*len -= 1;
-+	if (*len == 0) {
-+		*errp = -EDQUOT;
-+		block = 0;
-+		goto out;
-+	}
-+
-+	/* start searching from the goal */
-+	if (goal < le32_to_cpu(es->s_first_data_block) ||
-+	    goal >= le32_to_cpu(es->s_blocks_count))
-+		goal = le32_to_cpu(es->s_first_data_block);
-+	group = (goal - le32_to_cpu(es->s_first_data_block)) /
-+			EXT3_BLOCKS_PER_GROUP(sb);
-+	block = ((goal - le32_to_cpu(es->s_first_data_block)) %
-+			EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	/* set up allocation goals */
-+	ac.ac_b_ex.fe_group = 0;
-+	ac.ac_b_ex.fe_start = 0;
-+	ac.ac_b_ex.fe_len = 0;
-+	ac.ac_status = AC_STATUS_CONTINUE;
-+	ac.ac_groups_scanned = 0;
-+	ac.ac_ex_scanned = 0;
-+	ac.ac_found = 0;
-+	ac.ac_sb = inode->i_sb;
-+	ac.ac_g_ex.fe_group = group;
-+	ac.ac_g_ex.fe_start = block;
-+	ac.ac_g_ex.fe_len = *len;
-+	ac.ac_flags = flags;
-+	ac.ac_2order = 0;
-+	ac.ac_criteria = 0;
-+
-+	if (*len == 1 && sbi->s_stripe) {
-+		/* looks like a metadata, let's use a dirty hack for raid5
-+		 * move all metadata in first groups in hope to hit cached
-+		 * sectors and thus avoid read-modify cycles in raid5 */
-+		ac.ac_g_ex.fe_group = group = 0;
-+	}
-+
-+	/* probably, the request is for 2^8+ blocks (1/2/3/... MB) */
-+	i = ffs(*len);
-+	if (i >= ext3_mb_order2_reqs) {
-+		i--;
-+		if ((*len & (~(1 << i))) == 0)
-+			ac.ac_2order = i;
-+	}
-+
-+	/* first, try the goal */
-+	err = ext3_mb_find_by_goal(&ac, &e3b);
-+	if (err)
-+		goto out_err;
-+	if (ac.ac_status == AC_STATUS_FOUND)
-+		goto found;
-+
-+	/* Let's just scan groups to find more-less suitable blocks */
-+	cr = ac.ac_2order ? 0 : 1;
-+repeat:
-+	for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) {
-+		ac.ac_criteria = cr;
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) {
-+			if (group == EXT3_SB(sb)->s_groups_count)
-+				group = 0;
-+
-+			if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) {
-+				/* we need full data about the group
-+				 * to make a good selection */
-+				err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+				if (err)
-+					goto out_err;
-+				ext3_mb_release_desc(&e3b);
-+			}
-+
-+			/* check is group good for our criteries */
-+			if (!ext3_mb_good_group(&ac, group, cr))
-+				continue;
-+
-+			err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+			if (err)
-+				goto out_err;
-+
-+			ext3_lock_group(sb, group);
-+			if (!ext3_mb_good_group(&ac, group, cr)) {
-+				/* someone did allocation from this group */
-+				ext3_unlock_group(sb, group);
-+				ext3_mb_release_desc(&e3b);
-+				continue;
-+			}
-+
-+			ac.ac_groups_scanned++;
-+			if (cr == 0)
-+				ext3_mb_simple_scan_group(&ac, &e3b);
-+			else if (cr == 1 && *len == sbi->s_stripe)
-+				ext3_mb_scan_aligned(&ac, &e3b);
-+			else
-+				ext3_mb_complex_scan_group(&ac, &e3b);
-+
-+			ext3_unlock_group(sb, group);
-+
-+			ext3_mb_release_desc(&e3b);
-+
-+			if (ac.ac_status != AC_STATUS_CONTINUE)
-+				break;
-+		}
-+	}
-+
-+	if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND &&
-+	    !(ac.ac_flags & EXT3_MB_HINT_FIRST)) {
-+		/*
-+		 * We've been searching too long. Let's try to allocate
-+		 * the best chunk we've found so far
-+		 */
-+
-+		/*if (ac.ac_found > ext3_mb_max_to_scan)
-+			printk(KERN_DEBUG "EXT3-fs: too long searching at "
-+				"%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len,
-+				ac.ac_g_ex.fe_len);*/
-+		ext3_mb_try_best_found(&ac, &e3b);
-+		if (ac.ac_status != AC_STATUS_FOUND) {
-+			/*
-+			 * Someone more lucky has already allocated it.
-+			 * The only thing we can do is just take first
-+			 * found block(s)
-+			printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n");
-+			 */
-+			ac.ac_b_ex.fe_group = 0;
-+			ac.ac_b_ex.fe_start = 0;
-+			ac.ac_b_ex.fe_len = 0;
-+			ac.ac_status = AC_STATUS_CONTINUE;
-+			ac.ac_flags |= EXT3_MB_HINT_FIRST;
-+			cr = 3;
-+			goto repeat;
-+		}
-+	}
-+
-+	if (ac.ac_status != AC_STATUS_FOUND) {
-+		/*
-+		 * We aren't lucky definitely
-+		 */
-+		DQUOT_FREE_BLOCK(inode, *len);
-+		*errp = -ENOSPC;
-+		block = 0;
-+#if 1
-+		printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n",
-+			ac.ac_status, ac.ac_flags);
-+		printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n",
-+			ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group,
-+			ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr);
-+		printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n",
-+			sbi->s_blocks_reserved, ac.ac_found);
-+		printk("EXT3-fs: groups: ");
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++)
-+			printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free);
-+		printk("\n");
-+#endif
-+		goto out;
-+	}
-+
-+found:
-+	J_ASSERT(ac.ac_b_ex.fe_len > 0);
-+
-+	/* good news - free block(s) have been found. now it's time
-+	 * to mark block(s) in good old journaled bitmap */
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	/* we made a desicion, now mark found blocks in good old
-+	 * bitmap to be journaled */
-+
-+	ext3_debug("using block group %d(%d)\n",
-+			ac.ac_b_group.group, gdp->bg_free_blocks_count);
-+
-+	bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group);
-+	if (!bitmap_bh) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err) {
-+		*errp = err;
-+		goto out_err;
-+	}
-+
-+	gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh);
-+	if (!gdp) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	if (block == le32_to_cpu(gdp->bg_block_bitmap) ||
-+	    block == le32_to_cpu(gdp->bg_inode_bitmap) ||
-+	    in_range(block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error(sb, "ext3_new_block",
-+			    "Allocating block in system zone - "
-+			    "block = %u", block);
-+#ifdef AGGRESSIVE_CHECK
-+	for (i = 0; i < ac.ac_b_ex.fe_len; i++)
-+		J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data));
-+#endif
-+	mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len);
-+
-+	spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	gdp->bg_free_blocks_count =
-+			cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)
-+					- ac.ac_b_ex.fe_len);
-+	spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len);
-+
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+	if (err)
-+		goto out_err;
-+	err = ext3_journal_dirty_metadata(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	sb->s_dirt = 1;
-+	*errp = 0;
-+	brelse(bitmap_bh);
-+
-+	/* drop non-allocated, but dquote'd blocks */
-+	J_ASSERT(*len >= ac.ac_b_ex.fe_len);
-+	DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len);
-+
-+	*len = ac.ac_b_ex.fe_len;
-+	J_ASSERT(*len > 0);
-+	J_ASSERT(block != 0);
-+	goto out;
-+
-+out_err:
-+	/* if we've already allocated something, roll it back */
-+	if (ac.ac_status == AC_STATUS_FOUND) {
-+		/* FIXME: free blocks here */
-+	}
-+
-+	DQUOT_FREE_BLOCK(inode, *len);
-+	brelse(bitmap_bh);
-+	*errp = err;
-+	block = 0;
-+out:
-+	if (ac.ac_buddy_page)
-+		page_cache_release(ac.ac_buddy_page);
-+	if (ac.ac_bitmap_page)
-+		page_cache_release(ac.ac_bitmap_page);
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* block wasn't reserved before and we reserved it
-+		 * at the beginning of allocation. it doesn't matter
-+		 * whether we allocated anything or we failed: time
-+		 * to release reservation. NOTE: because I expect
-+		 * any multiblock request from delayed allocation
-+		 * path only, here is single block always */
-+		ext3_mb_release_blocks(sb, 1);
-+	}
-+
-+	if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) {
-+		atomic_inc(&sbi->s_bal_reqs);
-+		atomic_add(*len, &sbi->s_bal_allocated);
-+		if (*len >= ac.ac_g_ex.fe_len)
-+			atomic_inc(&sbi->s_bal_success);
-+		atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned);
-+		if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start &&
-+				ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group)
-+			atomic_inc(&sbi->s_bal_goals);
-+		if (ac.ac_found > ext3_mb_max_to_scan)
-+			atomic_inc(&sbi->s_bal_breaks);
-+	}
-+
-+	ext3_mb_store_history(sb, inode->i_ino, &ac);
-+
-+	return block;
-+}
-+EXPORT_SYMBOL(ext3_mb_new_blocks);
-+
-+#ifdef EXT3_MB_HISTORY
-+struct ext3_mb_proc_session {
-+	struct ext3_mb_history *history;
-+	struct super_block *sb;
-+	int start;
-+	int max;
-+};
-+
-+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s,
-+					struct ext3_mb_history *hs,
-+					int first)
-+{
-+	if (hs == s->history + s->max)
-+		hs = s->history;
-+	if (!first && hs == s->history + s->start)
-+		return NULL;
-+	while (hs->goal.fe_len == 0) {
-+		hs++;
-+		if (hs == s->history + s->max)
-+			hs = s->history;
-+		if (hs == s->history + s->start)
-+			return NULL;
-+	}
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	if (!hs)
-+		return NULL;
-+	while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL);
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	else
-+		return ext3_mb_history_skip_empty(s, ++hs, 0);
-+}
-+
-+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct ext3_mb_history *hs = v;
-+	char buf[20], buf2[20];
-+
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n",
-+			 "pid", "inode", "goal", "result", "found", "grps", "cr",
-+			 "merge", "tail", "broken");
-+		return 0;
-+	}
-+
-+	sprintf(buf, "%u/%u/%u", hs->goal.fe_group,
-+		hs->goal.fe_start, hs->goal.fe_len);
-+	sprintf(buf2, "%u/%u/%u", hs->result.fe_group,
-+		hs->result.fe_start, hs->result.fe_len);
-+	seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n",
-+			hs->pid, hs->ino, buf, buf2, hs->found, hs->groups,
-+			hs->cr, hs->merged ? "M" : "", hs->tail,
-+			hs->buddy ? 1 << hs->buddy : 0);
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_history_ops = {
-+	.start  = ext3_mb_seq_history_start,
-+	.next   = ext3_mb_seq_history_next,
-+	.stop   = ext3_mb_seq_history_stop,
-+	.show   = ext3_mb_seq_history_show,
-+};
-+
-+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
-+	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(s->history, sbi->s_mb_history, size);
-+	s->max = sbi->s_mb_history_max;
-+	s->start = sbi->s_mb_history_cur % s->max;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+
-+	rc = seq_open(file, &ext3_mb_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->history);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct ext3_mb_proc_session *s = seq->private;
-+	kfree(s->history);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations ext3_mb_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_history_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= ext3_mb_seq_history_release,
-+};
-+
-+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+
-+	group = *pos + 1;
-+	return (void *) group;
-+}
-+
-+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	++*pos;
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+	group = *pos + 1;
-+	return (void *) group;;
-+}
-+
-+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v)
-+{
-+	struct super_block *sb = seq->private;
-+	long group = (long) v, i;
-+	struct sg {
-+		struct ext3_group_info info;
-+		unsigned short counters[16];
-+	} sg;
-+
-+	group--;
-+	if (group == 0)
-+		seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
-+			 "group", "free", "frags", "first", "2^0", "2^1", "2^2",
-+			 "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10",
-+			 "2^11", "2^12", "2^13");
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
-+		sizeof(struct ext3_group_info);
-+	ext3_lock_group(sb, group);
-+	memcpy(&sg, EXT3_GROUP_INFO(sb, group), i);
-+	ext3_unlock_group(sb, group);
-+
-+	if (EXT3_MB_GRP_NEED_INIT(&sg.info))
-+		return 0;
-+
-+	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free,
-+			sg.info.bb_fragments, sg.info.bb_first_free);
-+	for (i = 0; i <= 13; i++)
-+		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-+				sg.info.bb_counters[i] : 0);
-+	seq_printf(seq, " ]\n");
-+
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_groups_ops = {
-+	.start  = ext3_mb_seq_groups_start,
-+	.next   = ext3_mb_seq_groups_next,
-+	.stop   = ext3_mb_seq_groups_stop,
-+	.show   = ext3_mb_seq_groups_show,
-+};
-+
-+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	int rc;
-+
-+	rc = seq_open(file, &ext3_mb_seq_groups_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = sb;
-+	}
-+	return rc;
-+
-+}
-+
-+static struct file_operations ext3_mb_seq_groups_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_groups_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= seq_release,
-+};
-+
-+static void ext3_mb_history_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	remove_proc_entry("mb_groups", sbi->s_mb_proc);
-+	remove_proc_entry("mb_history", sbi->s_mb_proc);
-+	remove_proc_entry(name, proc_root_ext3);
-+
-+	if (sbi->s_mb_history)
-+		kfree(sbi->s_mb_history);
-+}
-+
-+static void ext3_mb_history_init(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+	int i;
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3);
-+	if (sbi->s_mb_proc != NULL) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_history_fops;
-+			p->data = sb;
-+		}
-+		p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_groups_fops;
-+			p->data = sb;
-+		}
-+	}
-+
-+	sbi->s_mb_history_max = 1000;
-+	sbi->s_mb_history_cur = 0;
-+	spin_lock_init(&sbi->s_mb_history_lock);
-+	i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history);
-+	sbi->s_mb_history = kmalloc(i, GFP_KERNEL);
-+	memset(sbi->s_mb_history, 0, i);
-+	/* if we can't allocate history, then we simple won't use it */
-+}
-+
-+static void
-+ext3_mb_store_history(struct super_block *sb, unsigned ino,
-+			struct ext3_allocation_context *ac)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_history h;
-+
-+	if (likely(sbi->s_mb_history == NULL))
-+		return;
-+
-+	h.pid = current->pid;
-+	h.ino = ino;
-+	h.goal = ac->ac_g_ex;
-+	h.result = ac->ac_b_ex;
-+	h.found = ac->ac_found;
-+	h.cr = ac->ac_criteria;
-+	h.groups = ac->ac_groups_scanned;
-+	h.tail = ac->ac_tail;
-+	h.buddy = ac->ac_buddy;
-+	h.merged = 0;
-+	if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&
-+			ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group)
-+		h.merged = 1;
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h));
-+	if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max)
-+		sbi->s_mb_history_cur = 0;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+}
-+
-+#else
-+#define ext3_mb_history_release(sb)
-+#define ext3_mb_history_init(sb)
-+#endif
-+
-+int ext3_mb_init_backend(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, j, len, metalen;
-+	int num_meta_group_infos =
-+		(sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+	struct ext3_group_info **meta_group_info;
-+
-+	/* An 8TB filesystem with 64-bit pointers requires a 4096 byte
-+	 * kmalloc. A 128kb malloc should suffice for a 256TB filesystem.
-+	 * So a two level scheme suffices for now. */
-+	sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) *
-+				    num_meta_group_infos, GFP_KERNEL);
-+	if (sbi->s_group_info == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n");
-+		return -ENOMEM;
-+	}
-+	sbi->s_buddy_cache = new_inode(sb);
-+	if (sbi->s_buddy_cache == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't get new inode\n");
-+		goto err_freesgi;
-+	}
-+
-+	metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb);
-+	for (i = 0; i < num_meta_group_infos; i++) {
-+		if ((i + 1) == num_meta_group_infos)
-+			metalen = sizeof(*meta_group_info) *
-+				(sbi->s_groups_count -
-+					(i << EXT3_DESC_PER_BLOCK_BITS(sb)));
-+		meta_group_info = kmalloc(metalen, GFP_KERNEL);
-+		if (meta_group_info == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate mem for a "
-+			       "buddy group\n");
-+			goto err_freemeta;
-+		}
-+		sbi->s_group_info[i] = meta_group_info;
-+	}
-+
-+	/*
-+	 * calculate needed size. if change bb_counters size,
-+	 * don't forget about ext3_mb_generate_buddy()
-+	 */
-+	len = sizeof(struct ext3_group_info);
-+	len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2);
-+	for (i = 0; i < sbi->s_groups_count; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		meta_group_info =
-+			sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)];
-+		j = i & (EXT3_DESC_PER_BLOCK(sb) - 1);
-+
-+		meta_group_info[j] = kmalloc(len, GFP_KERNEL);
-+		if (meta_group_info[j] == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n");
-+			i--;
-+			goto err_freebuddy;
-+		}
-+		desc = ext3_get_group_desc(sb, i, NULL);
-+		if (desc == NULL) {
-+			printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i);
-+			goto err_freebuddy;
-+		}
-+		memset(meta_group_info[j], 0, len);
-+		set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT,
-+			&meta_group_info[j]->bb_state);
-+		meta_group_info[j]->bb_free =
-+			le16_to_cpu(desc->bg_free_blocks_count);
-+	}
-+
-+	return 0;
-+
-+err_freebuddy:
-+	while (i >= 0) {
-+		kfree(EXT3_GROUP_INFO(sb, i));
-+		i--;
-+	}
-+	i = num_meta_group_infos;
-+err_freemeta:
-+	while (--i >= 0)
-+		kfree(sbi->s_group_info[i]);
-+	iput(sbi->s_buddy_cache);
-+err_freesgi:
-+	kfree(sbi->s_group_info);
-+	return -ENOMEM;
-+}
-+
-+int ext3_mb_init(struct super_block *sb, int needs_recovery)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *root = sb->s_root->d_inode;
-+	unsigned i, offset, max;
-+	struct dentry *dentry;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short);
-+
-+	sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_offsets == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		return -ENOMEM;
-+	}
-+	sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_maxs == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_maxs);
-+		return -ENOMEM;
-+	}
-+
-+	 /* order 0 is regular bitmap */
-+	sbi->s_mb_maxs[0] = sb->s_blocksize << 3;
-+	sbi->s_mb_offsets[0] = 0;
-+
-+	i = 1;
-+	offset = 0;
-+	max = sb->s_blocksize << 2;
-+	do {
-+		sbi->s_mb_offsets[i] = offset;
-+		sbi->s_mb_maxs[i] = max;
-+		offset += 1 << (sb->s_blocksize_bits - i);
-+		max = max >> 1;
-+		i++;
-+	} while (i <= sb->s_blocksize_bits + 1);
-+
-+	/* init file for buddy data */
-+	if ((i = ext3_mb_init_backend(sb))) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_offsets);
-+		kfree(sbi->s_mb_maxs);
-+		return i;
-+	}
-+
-+	spin_lock_init(&sbi->s_reserve_lock);
-+	spin_lock_init(&sbi->s_md_lock);
-+	INIT_LIST_HEAD(&sbi->s_active_transaction);
-+	INIT_LIST_HEAD(&sbi->s_closed_transaction);
-+	INIT_LIST_HEAD(&sbi->s_committed_transaction);
-+	spin_lock_init(&sbi->s_bal_lock);
-+
-+	/* remove old on-disk buddy file */
-+	mutex_lock(&root->i_mutex);
-+	dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy"));
-+	if (dentry->d_inode != NULL) {
-+		i = vfs_unlink(root, dentry);
-+		if (i != 0)
-+			printk("EXT3-fs: can't remove .buddy file: %d\n", i);
-+	}
-+	dput(dentry);
-+	mutex_unlock(&root->i_mutex);
-+
-+	ext3_mb_history_init(sb);
-+
-+	printk("EXT3-fs: mballoc enabled\n");
-+	return 0;
-+}
-+
-+int ext3_mb_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, num_meta_group_infos;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	/* release freed, non-committed blocks */
-+	spin_lock(&sbi->s_md_lock);
-+	list_splice_init(&sbi->s_closed_transaction,
-+			&sbi->s_committed_transaction);
-+	list_splice_init(&sbi->s_active_transaction,
-+			&sbi->s_committed_transaction);
-+	spin_unlock(&sbi->s_md_lock);
-+	ext3_mb_free_committed_blocks(sb);
-+
-+	if (sbi->s_group_info) {
-+		for (i = 0; i < sbi->s_groups_count; i++)
-+			kfree(EXT3_GROUP_INFO(sb, i));
-+		num_meta_group_infos = (sbi->s_groups_count +
-+			EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+		for (i = 0; i < num_meta_group_infos; i++)
-+			kfree(sbi->s_group_info[i]);
-+		kfree(sbi->s_group_info);
-+	}
-+	if (sbi->s_mb_offsets)
-+		kfree(sbi->s_mb_offsets);
-+	if (sbi->s_mb_maxs)
-+		kfree(sbi->s_mb_maxs);
-+	if (sbi->s_buddy_cache)
-+		iput(sbi->s_buddy_cache);
-+	if (sbi->s_blocks_reserved)
-+		printk("ext3-fs: %ld blocks being reserved at umount!\n",
-+				sbi->s_blocks_reserved);
-+	if (ext3_mb_stats) {
-+		printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n",
-+			atomic_read(&sbi->s_bal_allocated),
-+			atomic_read(&sbi->s_bal_reqs),
-+			atomic_read(&sbi->s_bal_success));
-+		printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, "
-+			"%u 2^N hits, %u breaks\n",
-+			atomic_read(&sbi->s_bal_ex_scanned),
-+			atomic_read(&sbi->s_bal_goals),
-+			atomic_read(&sbi->s_bal_2orders),
-+			atomic_read(&sbi->s_bal_breaks));
-+		printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n",
-+			sbi->s_mb_buddies_generated++,
-+			sbi->s_mb_generation_time);
-+	}
-+
-+	ext3_mb_history_release(sb);
-+
-+	return 0;
-+}
-+
-+void ext3_mb_free_committed_blocks(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int err, i, count = 0, count2 = 0;
-+	struct ext3_free_metadata *md;
-+	struct ext3_buddy e3b;
-+
-+	if (list_empty(&sbi->s_committed_transaction))
-+		return;
-+
-+	/* there is committed blocks to be freed yet */
-+	do {
-+		/* get next array of blocks */
-+		md = NULL;
-+		spin_lock(&sbi->s_md_lock);
-+		if (!list_empty(&sbi->s_committed_transaction)) {
-+			md = list_entry(sbi->s_committed_transaction.next,
-+					struct ext3_free_metadata, list);
-+			list_del(&md->list);
-+		}
-+		spin_unlock(&sbi->s_md_lock);
-+
-+		if (md == NULL)
-+			break;
-+
-+		mb_debug("gonna free %u blocks in group %u (0x%p):",
-+				md->num, md->group, md);
-+
-+		err = ext3_mb_load_buddy(sb, md->group, &e3b);
-+		/* we expect to find existing buddy because it's pinned */
-+		BUG_ON(err != 0);
-+
-+		/* there are blocks to put in buddy to make them really free */
-+		count += md->num;
-+		count2++;
-+		ext3_lock_group(sb, md->group);
-+		for (i = 0; i < md->num; i++) {
-+			mb_debug(" %u", md->blocks[i]);
-+			mb_free_blocks(&e3b, md->blocks[i], 1);
-+		}
-+		mb_debug("\n");
-+		ext3_unlock_group(sb, md->group);
-+
-+		/* balance refcounts from ext3_mb_free_metadata() */
-+		page_cache_release(e3b.bd_buddy_page);
-+		page_cache_release(e3b.bd_bitmap_page);
-+
-+		kfree(md);
-+		ext3_mb_release_desc(&e3b);
-+
-+	} while (md);
-+	mb_debug("freed %u blocks in %u structures\n", count, count2);
-+}
-+
-+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	if (sbi->s_last_transaction == handle->h_transaction->t_tid)
-+		return;
-+
-+	/* new transaction! time to close last one and free blocks for
-+	 * committed transaction. we know that only transaction can be
-+	 * active, so previos transaction can be being logged and we
-+	 * know that transaction before previous is known to be already
-+	 * logged. this means that now we may free blocks freed in all
-+	 * transactions before previous one. hope I'm clear enough ... */
-+
-+	spin_lock(&sbi->s_md_lock);
-+	if (sbi->s_last_transaction != handle->h_transaction->t_tid) {
-+		mb_debug("new transaction %lu, old %lu\n",
-+				(unsigned long) handle->h_transaction->t_tid,
-+				(unsigned long) sbi->s_last_transaction);
-+		list_splice_init(&sbi->s_closed_transaction,
-+					&sbi->s_committed_transaction);
-+		list_splice_init(&sbi->s_active_transaction,
-+					&sbi->s_closed_transaction);
-+		sbi->s_last_transaction = handle->h_transaction->t_tid;
-+	}
-+	spin_unlock(&sbi->s_md_lock);
-+
-+	ext3_mb_free_committed_blocks(sb);
-+}
-+
-+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b,
-+				int group, int block, int count)
-+{
-+	struct ext3_group_info *db = e3b->bd_info;
-+	struct super_block *sb = e3b->bd_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_free_metadata *md;
-+	int i;
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	ext3_lock_group(sb, group);
-+	for (i = 0; i < count; i++) {
-+		md = db->bb_md_cur;
-+		if (md && db->bb_tid != handle->h_transaction->t_tid) {
-+			db->bb_md_cur = NULL;
-+			md = NULL;
-+		}
-+
-+		if (md == NULL) {
-+			ext3_unlock_group(sb, group);
-+			md = kmalloc(sizeof(*md), GFP_KERNEL);
-+			if (md == NULL)
-+				return -ENOMEM;
-+			md->num = 0;
-+			md->group = group;
-+
-+			ext3_lock_group(sb, group);
-+			if (db->bb_md_cur == NULL) {
-+				spin_lock(&sbi->s_md_lock);
-+				list_add(&md->list, &sbi->s_active_transaction);
-+				spin_unlock(&sbi->s_md_lock);
-+				/* protect buddy cache from being freed,
-+				 * otherwise we'll refresh it from
-+				 * on-disk bitmap and lose not-yet-available
-+				 * blocks */
-+				page_cache_get(e3b->bd_buddy_page);
-+				page_cache_get(e3b->bd_bitmap_page);
-+				db->bb_md_cur = md;
-+				db->bb_tid = handle->h_transaction->t_tid;
-+				mb_debug("new md 0x%p for group %u\n",
-+							md, md->group);
-+			} else {
-+				kfree(md);
-+				md = db->bb_md_cur;
-+			}
-+		}
-+
-+		BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS);
-+		md->blocks[md->num] = block + i;
-+		md->num++;
-+		if (md->num == EXT3_BB_MAX_BLOCKS) {
-+			/* no more space, put full container on a sb's list */
-+			db->bb_md_cur = NULL;
-+		}
-+	}
-+	ext3_unlock_group(sb, group);
-+	return 0;
-+}
-+
-+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,
-+			unsigned long block, unsigned long count,
-+			int metadata, int *freed)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	unsigned long bit, overflow;
-+	struct buffer_head *gd_bh;
-+	unsigned long block_group;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+	int err = 0, ret;
-+
-+	*freed = 0;
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk ("ext3_free_blocks: nonexistent device");
-+		return;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+	if (block < le32_to_cpu(es->s_first_data_block) ||
-+	    block + count < block ||
-+	    block + count > le32_to_cpu(es->s_blocks_count)) {
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks not in datazone - "
-+			    "block = %lu, count = %lu", block, count);
-+		goto error_return;
-+	}
-+
-+	ext3_debug("freeing block %lu\n", block);
-+
-+do_more:
-+	overflow = 0;
-+	block_group = (block - le32_to_cpu(es->s_first_data_block)) /
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	bit = (block - le32_to_cpu(es->s_first_data_block)) %
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	/*
-+	 * Check to see if we are freeing blocks across a group
-+	 * boundary.
-+	 */
-+	if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) {
-+		overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb);
-+		count -= overflow;
-+	}
-+	brelse(bitmap_bh);
-+	bitmap_bh = read_block_bitmap(sb, block_group);
-+	if (!bitmap_bh)
-+		goto error_return;
-+	gdp = ext3_get_group_desc (sb, block_group, &gd_bh);
-+	if (!gdp)
-+		goto error_return;
-+
-+	if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
-+	    in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
-+	    in_range (block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group) ||
-+	    in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks in system zones - "
-+			    "Block = %lu, count = %lu",
-+			    block, count);
-+
-+	BUFFER_TRACE(bitmap_bh, "getting write access");
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err)
-+		goto error_return;
-+
-+	/*
-+	 * We are about to modify some metadata.  Call the journal APIs
-+	 * to unshare ->b_data if a currently-committing transaction is
-+	 * using it
-+	 */
-+	BUFFER_TRACE(gd_bh, "get_write_access");
-+	err = ext3_journal_get_write_access(handle, gd_bh);
-+	if (err)
-+		goto error_return;
-+
-+	err = ext3_mb_load_buddy(sb, block_group, &e3b);
-+	if (err)
-+		goto error_return;
-+
-+#ifdef AGGRESSIVE_CHECK
-+	{
-+		int i;
-+		for (i = 0; i < count; i++)
-+			J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
-+	}
-+#endif
-+	mb_clear_bits(bitmap_bh->b_data, bit, count);
-+
-+	/* We dirtied the bitmap block */
-+	BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+
-+	if (metadata) {
-+		/* blocks being freed are metadata. these blocks shouldn't
-+		 * be used until this transaction is committed */
-+		ext3_mb_free_metadata(handle, &e3b, block_group, bit, count);
-+	} else {
-+		ext3_lock_group(sb, block_group);
-+		mb_free_blocks(&e3b, bit, count);
-+		ext3_unlock_group(sb, block_group);
-+	}
-+
-+	spin_lock(sb_bgl_lock(sbi, block_group));
-+	gdp->bg_free_blocks_count =
-+		cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
-+	spin_unlock(sb_bgl_lock(sbi, block_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, count);
-+
-+	ext3_mb_release_desc(&e3b);
-+
-+	*freed = count;
-+
-+	/* And the group descriptor block */
-+	BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
-+	ret = ext3_journal_dirty_metadata(handle, gd_bh);
-+	if (!err) err = ret;
-+
-+	if (overflow && !err) {
-+		block += count;
-+		count = overflow;
-+		goto do_more;
-+	}
-+	sb->s_dirt = 1;
-+error_return:
-+	brelse(bitmap_bh);
-+	ext3_std_error(sb, err);
-+	return;
-+}
-+
-+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int free, ret = -ENOSPC;
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	free = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
-+	if (blocks <= free - sbi->s_blocks_reserved) {
-+		sbi->s_blocks_reserved += blocks;
-+		ret = 0;
-+	}
-+	spin_unlock(&sbi->s_reserve_lock);
-+	return ret;
-+}
-+
-+void ext3_mb_release_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	sbi->s_blocks_reserved -= blocks;
-+	WARN_ON(sbi->s_blocks_reserved < 0);
-+	if (sbi->s_blocks_reserved < 0)
-+		sbi->s_blocks_reserved = 0;
-+	spin_unlock(&sbi->s_reserve_lock);
-+}
-+
-+int ext3_new_block(handle_t *handle, struct inode *inode,
-+		unsigned long goal, int *errp)
-+{
-+	int ret, len;
-+
-+	if (!test_opt(inode->i_sb, MBALLOC)) {
-+		ret = ext3_new_block_old(handle, inode, goal, errp);
-+		goto out;
-+	}
-+	len = 1;
-+	ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp);
-+out:
-+	return ret;
-+}
-+
-+
-+void ext3_free_blocks(handle_t *handle, struct inode * inode,
-+			unsigned long block, unsigned long count, int metadata)
-+{
-+	struct super_block *sb;
-+	int freed;
-+
-+	sb = inode->i_sb;
-+	if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info)
-+		ext3_free_blocks_sb(handle, sb, block, count, &freed);
-+	else
-+		ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed);
-+	if (freed)
-+		DQUOT_FREE_BLOCK(inode, freed);
-+	return;
-+}
-+
-+#define EXT3_ROOT		   "ext3"
-+#define EXT3_MB_STATS_NAME	   "mb_stats"
-+#define EXT3_MB_MAX_TO_SCAN_NAME  "mb_max_to_scan"
-+#define EXT3_MB_MIN_TO_SCAN_NAME  "mb_min_to_scan"
-+#define EXT3_MB_ORDER2_REQ	   "mb_order2_req"
-+
-+static int ext3_mb_stats_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_stats);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_stats_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_STATS_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0);
-+	return count;
-+}
-+
-+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_max_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_max_to_scan = value;	
-+
-+	return count;
-+}
-+
-+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_min_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_min_to_scan = value;	
-+
-+	return count;
-+}
-+
-+static int ext3_mb_order2_req_read(char *page, char **start, off_t off,
-+				   int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_order2_reqs);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_order2_req_write(struct file *file, const char *buffer,
-+				    unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_order2_reqs = value;	
-+
-+	return count;
-+}
-+
-+int __init init_ext3_proc(void)
-+{
-+	struct proc_dir_entry *proc_ext3_mb_stats;
-+	struct proc_dir_entry *proc_ext3_mb_max_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_min_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_order2_req;
-+
-+	proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs);
-+	if (proc_root_ext3 == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT);
-+		return -EIO;
-+	}
-+
-+	/* Initialize EXT3_MB_STATS_NAME */
-+	proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_stats == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_STATS_NAME);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_stats->data = NULL;
-+	proc_ext3_mb_stats->read_proc  = ext3_mb_stats_read;
-+	proc_ext3_mb_stats->write_proc = ext3_mb_stats_write;
-+
-+	/* Initialize EXT3_MAX_TO_SCAN_NAME */
-+	proc_ext3_mb_max_to_scan = create_proc_entry(
-+			EXT3_MB_MAX_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_max_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MAX_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_max_to_scan->data = NULL;
-+	proc_ext3_mb_max_to_scan->read_proc  = ext3_mb_max_to_scan_read;
-+	proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write;
-+
-+	/* Initialize EXT3_MIN_TO_SCAN_NAME */
-+	proc_ext3_mb_min_to_scan = create_proc_entry(
-+			EXT3_MB_MIN_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_min_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MIN_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_min_to_scan->data = NULL;
-+	proc_ext3_mb_min_to_scan->read_proc  = ext3_mb_min_to_scan_read;
-+	proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write;
-+
-+	/* Initialize EXT3_ORDER2_REQ */
-+	proc_ext3_mb_order2_req = create_proc_entry(
-+			EXT3_MB_ORDER2_REQ,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_order2_req == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_ORDER2_REQ);
-+		remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_order2_req->data = NULL;
-+	proc_ext3_mb_order2_req->read_proc  = ext3_mb_order2_req_read;
-+	proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write;
-+
-+	return 0;
-+}
-+
-+void exit_ext3_proc(void)
-+{
-+	remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3);
-+	remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+}
-Index: linux-2.6.16.i686/fs/ext3/Makefile
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/Makefile	2006-05-30 22:55:32.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/Makefile	2006-05-30 23:02:59.000000000 +0800
-@@ -6,7 +6,7 @@
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
--	   extents.o
-+	   extents.o mballoc.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch
deleted file mode 100644
index cec18779bd6b6235ce7ca21b9c039af494b1827e..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6-suse.patch
+++ /dev/null
@@ -1,3108 +0,0 @@
-Index: linux-2.6.5-7.282-full/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.5-7.282-full.orig/include/linux/ext3_fs.h	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/include/linux/ext3_fs.h	2006-10-24 22:18:28.000000000 +0400
-@@ -57,6 +57,14 @@ struct statfs;
- #define ext3_debug(f, a...)	do {} while (0)
- #endif
- 
-+#define EXT3_MULTIBLOCK_ALLOCATOR	1
-+
-+#define EXT3_MB_HINT_MERGE		1
-+#define EXT3_MB_HINT_RESERVED		2
-+#define EXT3_MB_HINT_METADATA		4
-+#define EXT3_MB_HINT_FIRST		8
-+#define EXT3_MB_HINT_BEST		16
-+
- /*
-  * Special inodes numbers
-  */
-@@ -339,6 +347,7 @@ struct ext3_inode {
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- #define EXT3_MOUNT_EXTENTS		0x200000/* Extents support */
- #define EXT3_MOUNT_EXTDEBUG		0x400000/* Extents debug */
-+#define EXT3_MOUNT_MBALLOC		0x800000/* Buddy allocation support */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -361,6 +370,14 @@ struct ext3_inode {
- #define ext3_find_first_zero_bit	ext2_find_first_zero_bit
- #define ext3_find_next_zero_bit		ext2_find_next_zero_bit
- 
-+#ifndef ext2_find_next_le_bit
-+#ifdef __LITTLE_ENDIAN
-+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off))
-+#else
-+#error "mballoc needs a patch for big-endian systems - CFS bug 10634"
-+#endif	/* __LITTLE_ENDIAN */
-+#endif	/* !ext2_find_next_le_bit */
-+
- /*
-  * Maximal mount counts between two filesystem checks
-  */
-@@ -700,7 +717,10 @@ extern int ext3_bg_has_super(struct supe
- extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
- extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
- extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
--			      unsigned long);
-+			      unsigned long, int);
-+extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *);
-+extern void ext3_free_blocks_old(handle_t *, struct inode *, unsigned long,
-+				 unsigned long);
- extern unsigned long ext3_count_free_blocks (struct super_block *);
- extern void ext3_check_blocks_bitmap (struct super_block *);
- extern struct ext3_group_desc * ext3_get_group_desc(struct super_block * sb,
-@@ -824,6 +843,17 @@ extern void ext3_extents_initialize_bloc
- extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
- 			  unsigned int cmd, unsigned long arg);
- 
-+/* mballoc.c */
-+extern long ext3_mb_stats;
-+extern long ext3_mb_max_to_scan;
-+extern int ext3_mb_init(struct super_block *, int);
-+extern int ext3_mb_release(struct super_block *);
-+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *);
-+extern int ext3_mb_reserve_blocks(struct super_block *, int);
-+extern void ext3_mb_release_blocks(struct super_block *, int);
-+int __init init_ext3_proc(void);
-+void exit_ext3_proc(void);
-+
- #endif	/* __KERNEL__ */
- 
- #define EXT3_IOC_CREATE_INUM			_IOW('f', 5, long)
-Index: linux-2.6.5-7.282-full/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.5-7.282-full.orig/include/linux/ext3_fs_sb.h	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/include/linux/ext3_fs_sb.h	2006-10-24 22:18:28.000000000 +0400
-@@ -23,9 +23,15 @@
- #define EXT_INCLUDE
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
-+#include <linux/list.h>
- #endif
- #endif
- #include <linux/rbtree.h>
-+#include <linux/proc_fs.h>
-+
-+struct ext3_buddy_group_blocks;
-+struct ext3_mb_history;
-+#define EXT3_BB_MAX_BLOCKS
- 
- /*
-  * third extended-fs super-block data in memory
-@@ -78,6 +84,43 @@ struct ext3_sb_info {
- 	struct timer_list turn_ro_timer;	/* For turning read-only (crash simulation) */
- 	wait_queue_head_t ro_wait_queue;	/* For people waiting for the fs to go read-only */
- #endif
-+
-+	/* for buddy allocator */
-+	struct ext3_group_info ***s_group_info;
-+	struct inode *s_buddy_cache;
-+	long s_blocks_reserved;
-+	spinlock_t s_reserve_lock;
-+	struct list_head s_active_transaction;
-+	struct list_head s_closed_transaction;
-+	struct list_head s_committed_transaction;
-+	spinlock_t s_md_lock;
-+	tid_t s_last_transaction;
-+	int s_mb_factor;
-+	unsigned short *s_mb_offsets, *s_mb_maxs;
-+	unsigned long s_stripe;
-+
-+	/* history to debug policy */
-+	struct ext3_mb_history *s_mb_history;
-+	int s_mb_history_cur;
-+	int s_mb_history_max;
-+	struct proc_dir_entry *s_mb_proc;
-+	spinlock_t s_mb_history_lock;
-+
-+	/* stats for buddy allocator */
-+	atomic_t s_bal_reqs;	/* number of reqs with len > 1 */
-+	atomic_t s_bal_success;	/* we found long enough chunks */
-+	atomic_t s_bal_allocated;	/* in blocks */
-+	atomic_t s_bal_ex_scanned;	/* total extents scanned */
-+	atomic_t s_bal_goals;	/* goal hits */
-+	atomic_t s_bal_breaks;	/* too long searches */
-+	atomic_t s_bal_2orders;	/* 2^order hits */
-+	spinlock_t s_bal_lock;
-+	unsigned long s_mb_buddies_generated;
-+	unsigned long long s_mb_generation_time;
- };
- 
-+#define EXT3_GROUP_INFO(sb, group)					   \
-+	EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \
-+				 [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)]
-+
- #endif	/* _LINUX_EXT3_FS_SB */
-Index: linux-2.6.5-7.282-full/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/super.c	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/super.c	2006-10-24 22:18:28.000000000 +0400
-@@ -389,6 +389,7 @@ void ext3_put_super (struct super_block 
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_mb_release(sb);
- 	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
-@@ -588,6 +589,7 @@ enum {
- 	Opt_err,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- 	Opt_extents, Opt_noextents, Opt_extdebug,
-+	Opt_mballoc, Opt_nomballoc, Opt_stripe,
- };
- 
- static match_table_t tokens = {
-@@ -634,6 +636,9 @@ static match_table_t tokens = {
- 	{Opt_extents, "extents"},
- 	{Opt_noextents, "noextents"},
- 	{Opt_extdebug, "extdebug"},
-+	{Opt_mballoc, "mballoc"},
-+	{Opt_nomballoc, "nomballoc"},
-+	{Opt_stripe, "stripe=%u"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL}
- };
-@@ -859,6 +864,19 @@ static int parse_options (char * options
- 		case Opt_extdebug:
- 			set_opt (sbi->s_mount_opt, EXTDEBUG);
- 			break;
-+		case Opt_mballoc:
-+			set_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_nomballoc:
-+			clear_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_stripe:
-+			if (match_int(&args[0], &option))
-+				return 0;
-+			if (option < 0)
-+				return 0;
-+			sbi->s_stripe = option;
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1512,6 +1530,7 @@ static int ext3_fill_super (struct super
- 		ext3_count_dirs(sb));
- 
- 	ext3_ext_init(sb);
-+	ext3_mb_init(sb, needs_recovery);
- 
- 	return 0;
- 
-@@ -2160,7 +2179,13 @@ static struct file_system_type ext3_fs_t
- 
- static int __init init_ext3_fs(void)
- {
--	int err = init_ext3_xattr();
-+	int err;
-+
-+	err = init_ext3_proc();
-+	if (err)
-+		return err;
-+
-+	err = init_ext3_xattr();
- 	if (err)
- 		return err;
- 	err = init_inodecache();
-@@ -2189,6 +2214,7 @@ static void __exit exit_ext3_fs(void)
- 	unregister_filesystem(&ext3_fs_type);
- 	destroy_inodecache();
- 	exit_ext3_xattr();
-+	exit_ext3_proc();
- }
- 
- int ext3_prep_san_write(struct inode *inode, long *blocks,
-Index: linux-2.6.5-7.282-full/fs/ext3/extents.c
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/extents.c	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/extents.c	2006-10-24 22:18:28.000000000 +0400
-@@ -779,7 +779,7 @@ cleanup:
- 		for (i = 0; i < depth; i++) {
- 			if (!ablocks[i])
- 				continue;
--			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1);
- 		}
- 	}
- 	kfree(ablocks);
-@@ -1438,7 +1438,7 @@ int ext3_ext_rm_idx(handle_t *handle, st
- 		  path->p_idx->ei_leaf);
- 	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
- 	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
--	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1);
- 	return err;
- }
- 
-@@ -1923,10 +1923,12 @@ ext3_remove_blocks(struct ext3_extents_t
- 	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
- 	handle_t *handle = ext3_journal_start(tree->inode, needed);
- 	struct buffer_head *bh;
--	int i;
-+	int i, metadata = 0;
- 
- 	if (IS_ERR(handle))
- 		return PTR_ERR(handle);
-+	if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode))
-+		metadata = 1;
- 	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
- 		/* tail removal */
- 		unsigned long num, start;
-@@ -1938,7 +1940,7 @@ ext3_remove_blocks(struct ext3_extents_t
- 			bh = sb_find_get_block(tree->inode->i_sb, start + i);
- 			ext3_forget(handle, 0, tree->inode, bh, start + i);
- 		}
--		ext3_free_blocks(handle, tree->inode, start, num);
-+		ext3_free_blocks(handle, tree->inode, start, num, metadata);
- 	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
- 		printk("strange request: removal %lu-%lu from %u:%u\n",
- 		       from, to, ex->ee_block, ex->ee_len);
-Index: linux-2.6.5-7.282-full/fs/ext3/inode.c
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/inode.c	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/inode.c	2006-10-24 22:18:28.000000000 +0400
-@@ -574,7 +574,7 @@ static int ext3_alloc_branch(handle_t *h
- 		ext3_journal_forget(handle, branch[i].bh);
- 	}
- 	for (i = 0; i < keys; i++)
--		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1);
-+		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1);
- 	return err;
- }
- 
-@@ -675,7 +675,7 @@ err_out:
- 	if (err == -EAGAIN)
- 		for (i = 0; i < num; i++)
- 			ext3_free_blocks(handle, inode, 
--					 le32_to_cpu(where[i].key), 1);
-+					 le32_to_cpu(where[i].key), 1, 1);
- 	return err;
- }
- 
-@@ -1837,7 +1837,7 @@ ext3_clear_blocks(handle_t *handle, stru
- 		}
- 	}
- 
--	ext3_free_blocks(handle, inode, block_to_free, count);
-+	ext3_free_blocks(handle, inode, block_to_free, count, 1);
- }
- 
- /**
-@@ -2008,7 +2008,7 @@ static void ext3_free_branches(handle_t 
- 				ext3_journal_test_restart(handle, inode);
- 			}
- 
--			ext3_free_blocks(handle, inode, nr, 1);
-+			ext3_free_blocks(handle, inode, nr, 1, 1);
- 
- 			if (parent_bh) {
- 				/*
-Index: linux-2.6.5-7.282-full/fs/ext3/balloc.c
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/balloc.c	2006-08-30 18:12:13.000000000 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/balloc.c	2006-10-24 22:18:28.000000000 +0400
-@@ -78,7 +78,7 @@ struct ext3_group_desc * ext3_get_group_
-  *
-  * Return buffer_head on success or NULL in case of failure.
-  */
--static struct buffer_head *
-+struct buffer_head *
- read_block_bitmap(struct super_block *sb, unsigned int block_group)
- {
- 	struct ext3_group_desc * desc;
-@@ -274,7 +274,7 @@ void ext3_discard_reservation(struct ino
- }
- 
- /* Free given blocks, update quota and i_blocks field */
--void ext3_free_blocks(handle_t *handle, struct inode *inode,
-+void ext3_free_blocks_old(handle_t *handle, struct inode *inode,
- 			unsigned long block, unsigned long count)
- {
- 	struct buffer_head *bitmap_bh = NULL;
-@@ -1142,7 +1142,7 @@ int ext3_should_retry_alloc(struct super
-  * bitmap, and then for any free bit if that fails.
-  * This function also updates quota and i_blocks field.
-  */
--int ext3_new_block(handle_t *handle, struct inode *inode,
-+int ext3_new_block_old(handle_t *handle, struct inode *inode,
- 			unsigned long goal, int *errp)
- {
- 	struct buffer_head *bitmap_bh = NULL;
-Index: linux-2.6.5-7.282-full/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/xattr.c	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/xattr.c	2006-10-24 22:18:28.000000000 +0400
-@@ -1371,7 +1371,7 @@ ext3_xattr_set_handle2(handle_t *handle,
- 			new_bh = sb_getblk(sb, block);
- 			if (!new_bh) {
- getblk_failed:
--				ext3_free_blocks(handle, inode, block, 1);
-+				ext3_free_blocks(handle, inode, block, 1, 1);
- 				error = -EIO;
- 				goto cleanup;
- 			}
-@@ -1411,7 +1411,7 @@ getblk_failed:
- 		if (HDR(old_bh)->h_refcount == cpu_to_le32(1)) {
- 			/* Free the old block. */
- 			ea_bdebug(old_bh, "freeing");
--			ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1);
-+			ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1, 1);
- 
- 			/* ext3_forget() calls bforget() for us, but we
- 			   let our caller release old_bh, so we need to
-@@ -1519,7 +1519,7 @@ ext3_xattr_delete_inode(handle_t *handle
- 			mb_cache_entry_free(ce);
- 			ce = NULL;
- 		}
--		ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1);
-+		ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1, 1);
- 		get_bh(bh);
- 		ext3_forget(handle, 1, inode, bh, EXT3_I(inode)->i_file_acl);
- 	} else {
-Index: linux-2.6.5-7.282-full/fs/ext3/mballoc.c
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/mballoc.c	2006-10-23 18:07:54.821533176 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/mballoc.c	2006-10-24 22:20:45.000000000 +0400
-@@ -0,0 +1,2726 @@
-+/*
-+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+
-+/*
-+ * mballoc.c contains the multiblocks allocation routines
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/time.h>
-+#include <linux/fs.h>
-+#include <linux/namei.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/quotaops.h>
-+#include <linux/buffer_head.h>
-+#include <linux/module.h>
-+#include <linux/swap.h>
-+#include <linux/proc_fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/seq_file.h>
-+
-+/*
-+ * TODO:
-+ *   - bitmap read-ahead (proposed by Oleg Drokin aka green)
-+ *   - track min/max extents in each group for better group selection
-+ *   - mb_mark_used() may allocate chunk right after splitting buddy
-+ *   - special flag to advice allocator to look for requested + N blocks
-+ *     this may improve interaction between extents and mballoc
-+ *   - tree of groups sorted by number of free blocks
-+ *   - percpu reservation code (hotpath)
-+ *   - error handling
-+ */
-+
-+/*
-+ * with AGRESSIVE_CHECK allocator runs consistency checks over
-+ * structures. these checks slow things down a lot
-+ */
-+#define AGGRESSIVE_CHECK__
-+
-+/*
-+ */
-+#define MB_DEBUG__
-+#ifdef MB_DEBUG
-+#define mb_debug(fmt,a...)	printk(fmt, ##a)
-+#else
-+#define mb_debug(fmt,a...)
-+#endif
-+
-+/*
-+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory
-+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history
-+ */
-+#define EXT3_MB_HISTORY
-+
-+/*
-+ * How long mballoc can look for a best extent (in found extents)
-+ */
-+long ext3_mb_max_to_scan = 500;
-+
-+/*
-+ * How long mballoc must look for a best extent
-+ */
-+long ext3_mb_min_to_scan = 30;
-+
-+/*
-+ * with 'ext3_mb_stats' allocator will collect stats that will be
-+ * shown at umount. The collecting costs though!
-+ */
-+
-+long ext3_mb_stats = 1;
-+
-+/*
-+ * for which requests use 2^N search using buddies
-+ */
-+long ext3_mb_order2_reqs = 8;
-+
-+#ifdef EXT3_BB_MAX_BLOCKS
-+#undef EXT3_BB_MAX_BLOCKS
-+#endif
-+#define EXT3_BB_MAX_BLOCKS	30
-+
-+struct ext3_free_metadata {
-+	unsigned short group;
-+	unsigned short num;
-+	unsigned short blocks[EXT3_BB_MAX_BLOCKS];
-+	struct list_head list;
-+};
-+
-+struct ext3_group_info {
-+	unsigned long	bb_state;
-+	unsigned long 	bb_tid;
-+	struct ext3_free_metadata *bb_md_cur;
-+	unsigned short	bb_first_free;
-+	unsigned short	bb_free;
-+	unsigned short	bb_fragments;
-+	unsigned short	bb_counters[];
-+};
-+
-+
-+#define EXT3_GROUP_INFO_NEED_INIT_BIT	0
-+#define EXT3_GROUP_INFO_LOCKED_BIT	1
-+
-+#define EXT3_MB_GRP_NEED_INIT(grp)	\
-+	(test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state))
-+
-+struct ext3_free_extent {
-+	__u16 fe_start;
-+	__u16 fe_len;
-+	__u16 fe_group;
-+};
-+
-+struct ext3_allocation_context {
-+	struct super_block *ac_sb;
-+
-+	/* search goals */
-+	struct ext3_free_extent ac_g_ex;
-+
-+	/* the best found extent */
-+	struct ext3_free_extent ac_b_ex;
-+
-+	/* number of iterations done. we have to track to limit searching */
-+	unsigned long ac_ex_scanned;
-+	__u16 ac_groups_scanned;
-+	__u16 ac_found;
-+	__u16 ac_tail;
-+	__u16 ac_buddy;
-+	__u8 ac_status;	
-+	__u8 ac_flags;		/* allocation hints */
-+	__u8 ac_criteria;
-+	__u8 ac_repeats;
-+	__u8 ac_2order;		/* if request is to allocate 2^N blocks and
-+				 * N > 0, the field stores N, otherwise 0 */
-+
-+	struct page *ac_buddy_page;
-+	struct page *ac_bitmap_page;
-+};
-+
-+#define AC_STATUS_CONTINUE	1
-+#define AC_STATUS_FOUND		2
-+#define AC_STATUS_BREAK		3
-+
-+struct ext3_mb_history {
-+	struct ext3_free_extent goal;	/* goal allocation */
-+	struct ext3_free_extent result;	/* result allocation */
-+	unsigned pid;
-+	unsigned ino;
-+	__u16 found;	/* how many extents have been found */
-+	__u16 groups;	/* how many groups have been scanned */
-+	__u16 tail;	/* what tail broke some buddy */
-+	__u16 buddy;	/* buddy the tail ^^^ broke */
-+	__u8 cr;	/* which phase the result extent was found at */
-+	__u8 merged;
-+};
-+
-+struct ext3_buddy {
-+	struct page *bd_buddy_page;
-+	void *bd_buddy;
-+	struct page *bd_bitmap_page;
-+	void *bd_bitmap;
-+	struct ext3_group_info *bd_info;
-+	struct super_block *bd_sb;
-+	__u16 bd_blkbits;
-+	__u16 bd_group;
-+};
-+#define EXT3_MB_BITMAP(e3b)	((e3b)->bd_bitmap)
-+#define EXT3_MB_BUDDY(e3b)	((e3b)->bd_buddy)
-+
-+#ifndef EXT3_MB_HISTORY
-+#define ext3_mb_store_history(sb,ino,ac)
-+#else
-+static void ext3_mb_store_history(struct super_block *, unsigned ino,
-+				struct ext3_allocation_context *ac);
-+#endif
-+
-+#define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
-+
-+static struct proc_dir_entry *proc_root_ext3;
-+
-+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
-+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
-+void ext3_mb_free_committed_blocks(struct super_block *);
-+
-+#if BITS_PER_LONG == 64
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 7UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~7UL);	\
-+}
-+#elif BITS_PER_LONG == 32
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 3UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~3UL);	\
-+}
-+#else
-+#error "how many bits you are?!"
-+#endif
-+
-+static inline int mb_test_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	return ext2_test_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline void mb_clear_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit(bit, addr);
-+}
-+
-+static inline void mb_clear_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline int mb_find_next_zero_bit(void *addr, int max, int start)
-+{
-+	int fix;
-+#if BITS_PER_LONG == 64
-+	fix = ((unsigned long) addr & 7UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~7UL);
-+#elif BITS_PER_LONG == 32
-+	fix = ((unsigned long) addr & 3UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~3UL);
-+#else
-+#error "how many bits you are?!"
-+#endif
-+	max += fix;
-+	start += fix;
-+	return ext2_find_next_zero_bit(addr, max, start) - fix;
-+}
-+
-+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max)
-+{
-+	char *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(max != NULL);
-+
-+	if (order > e3b->bd_blkbits + 1) {
-+		*max = 0;
-+		return NULL;
-+	}
-+
-+	/* at order 0 we see each particular block */
-+	*max = 1 << (e3b->bd_blkbits + 3);
-+	if (order == 0)
-+		return EXT3_MB_BITMAP(e3b);
-+
-+	bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order];
-+	*max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order];
-+
-+	return bb;
-+}
-+
-+#ifdef AGGRESSIVE_CHECK
-+
-+static void mb_check_buddy(struct ext3_buddy *e3b)
-+{
-+	int order = e3b->bd_blkbits + 1;
-+	int max, max2, i, j, k, count;
-+	int fragments = 0, fstart;
-+	void *buddy, *buddy2;
-+
-+	if (!test_opt(e3b->bd_sb, MBALLOC))
-+		return;
-+
-+	{
-+		static int mb_check_counter = 0;
-+		if (mb_check_counter++ % 300 != 0)
-+			return;
-+	}
-+
-+	while (order > 1) {
-+		buddy = mb_find_buddy(e3b, order, &max);
-+		J_ASSERT(buddy);
-+		buddy2 = mb_find_buddy(e3b, order - 1, &max2);
-+		J_ASSERT(buddy2);
-+		J_ASSERT(buddy != buddy2);
-+		J_ASSERT(max * 2 == max2);
-+
-+		count = 0;
-+		for (i = 0; i < max; i++) {
-+
-+			if (mb_test_bit(i, buddy)) {
-+				/* only single bit in buddy2 may be 1 */
-+				if (!mb_test_bit(i << 1, buddy2))
-+					J_ASSERT(mb_test_bit((i<<1)+1, buddy2));
-+				else if (!mb_test_bit((i << 1) + 1, buddy2))
-+					J_ASSERT(mb_test_bit(i << 1, buddy2));
-+				continue;
-+			}
-+
-+			/* both bits in buddy2 must be 0 */
-+			J_ASSERT(mb_test_bit(i << 1, buddy2));
-+			J_ASSERT(mb_test_bit((i << 1) + 1, buddy2));
-+
-+			for (j = 0; j < (1 << order); j++) {
-+				k = (i * (1 << order)) + j;
-+				J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b)));
-+			}
-+			count++;
-+		}
-+		J_ASSERT(e3b->bd_info->bb_counters[order] == count);
-+		order--;
-+	}
-+
-+	fstart = -1;
-+	buddy = mb_find_buddy(e3b, 0, &max);
-+	for (i = 0; i < max; i++) {
-+		if (!mb_test_bit(i, buddy)) {
-+			J_ASSERT(i >= e3b->bd_info->bb_first_free);
-+			if (fstart == -1) {
-+				fragments++;
-+				fstart = i;
-+			}
-+			continue;
-+		}
-+		fstart = -1;
-+		/* check used bits only */
-+		for (j = 0; j < e3b->bd_blkbits + 1; j++) {
-+			buddy2 = mb_find_buddy(e3b, j, &max2);
-+			k = i >> j;
-+			J_ASSERT(k < max2);
-+			J_ASSERT(mb_test_bit(k, buddy2));
-+		}
-+	}
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info));
-+	J_ASSERT(e3b->bd_info->bb_fragments == fragments);
-+}
-+
-+#else
-+#define mb_check_buddy(e3b)
-+#endif
-+
-+/* find most significant bit */
-+static int inline fmsb(unsigned short word)
-+{
-+	int order;
-+
-+	if (word > 255) {
-+		order = 7;
-+		word >>= 8;
-+	} else {
-+		order = -1;
-+	}
-+
-+	do {
-+		order++;
-+		word >>= 1;
-+	} while (word != 0);
-+
-+	return order;
-+}
-+
-+static void inline
-+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first,
-+				int len, struct ext3_group_info *grp)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	unsigned short min, max, chunk, border;
-+
-+	mb_debug("mark %u/%u free\n", first, len);
-+	J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	border = 2 << sb->s_blocksize_bits;
-+
-+	while (len > 0) {
-+		/* find how many blocks can be covered since this position */
-+		max = ffs(first | border) - 1;
-+
-+		/* find how many blocks of power 2 we need to mark */
-+		min = fmsb(len);
-+
-+		mb_debug("  %u/%u -> max %u, min %u\n",
-+			first & ((2 << sb->s_blocksize_bits) - 1),
-+			len, max, min);
-+
-+		if (max < min)
-+			min = max;
-+		chunk = 1 << min;
-+
-+		/* mark multiblock chunks only */
-+		grp->bb_counters[min]++;
-+		if (min > 0) {
-+			mb_debug("    set %u at %u \n", first >> min,
-+				sbi->s_mb_offsets[min]);
-+			mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]);
-+		}
-+
-+		len -= chunk;
-+		first += chunk;
-+	}
-+}
-+
-+static void
-+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap,
-+			int group)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group);
-+	unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
-+	unsigned short i = 0, first, len;
-+	unsigned free = 0, fragments = 0;
-+	unsigned long long period = get_cycles();
-+
-+	i = mb_find_next_zero_bit(bitmap, max, 0);
-+	grp->bb_first_free = i;
-+	while (i < max) {
-+		fragments++;
-+		first = i;
-+		i = ext2_find_next_le_bit(bitmap, max, i);
-+		len = i - first;
-+		free += len;
-+		if (len > 1)
-+			ext3_mb_mark_free_simple(sb, buddy, first, len, grp);
-+		else
-+			grp->bb_counters[0]++;
-+		if (i < max)
-+			i = mb_find_next_zero_bit(bitmap, max, i);
-+	}
-+	grp->bb_fragments = fragments;
-+
-+	/* bb_state shouldn't being modified because all
-+	 * others waits for init completion on page lock */
-+	clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state);
-+	if (free != grp->bb_free) {
-+		printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n",
-+			group, free, grp->bb_free);
-+		grp->bb_free = free;
-+	}
-+
-+	period = get_cycles() - period;
-+	spin_lock(&EXT3_SB(sb)->s_bal_lock);
-+	EXT3_SB(sb)->s_mb_buddies_generated++;
-+	EXT3_SB(sb)->s_mb_generation_time += period;
-+	spin_unlock(&EXT3_SB(sb)->s_bal_lock);
-+}
-+
-+static int ext3_mb_init_cache(struct page *page)
-+{
-+	int blocksize, blocks_per_page, groups_per_page;
-+	int err = 0, i, first_group, first_block;
-+	struct super_block *sb;
-+	struct buffer_head *bhs;
-+	struct buffer_head **bh;
-+	struct inode *inode;
-+	char *data, *bitmap;
-+
-+	mb_debug("init page %lu\n", page->index);
-+
-+	inode = page->mapping->host;
-+	sb = inode->i_sb;
-+	blocksize = 1 << inode->i_blkbits;
-+	blocks_per_page = PAGE_CACHE_SIZE / blocksize;
-+
-+	groups_per_page = blocks_per_page >> 1;
-+	if (groups_per_page == 0)
-+		groups_per_page = 1;
-+
-+	/* allocate buffer_heads to read bitmaps */
-+	if (groups_per_page > 1) {
-+		err = -ENOMEM;
-+		i = sizeof(struct buffer_head *) * groups_per_page;
-+		bh = kmalloc(i, GFP_NOFS);
-+		if (bh == NULL)
-+			goto out;
-+		memset(bh, 0, i);
-+	} else
-+		bh = &bhs;
-+
-+	first_group = page->index * blocks_per_page / 2;
-+
-+	/* read all groups the page covers into the cache */
-+	for (i = 0; i < groups_per_page; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		if (first_group + i >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		err = -EIO;
-+		desc = ext3_get_group_desc(sb, first_group + i, NULL);
-+		if (desc == NULL)
-+			goto out;
-+
-+		err = -ENOMEM;
-+		bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap));
-+		if (bh[i] == NULL)
-+			goto out;
-+
-+		if (buffer_uptodate(bh[i]))
-+			continue;
-+
-+		lock_buffer(bh[i]);
-+		if (buffer_uptodate(bh[i])) {
-+			unlock_buffer(bh[i]);
-+			continue;
-+		}
-+
-+		get_bh(bh[i]);
-+		bh[i]->b_end_io = end_buffer_read_sync;
-+		submit_bh(READ, bh[i]);
-+		mb_debug("read bitmap for group %u\n", first_group + i);
-+	}
-+
-+	/* wait for I/O completion */
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		wait_on_buffer(bh[i]);
-+
-+	err = -EIO;
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		if (!buffer_uptodate(bh[i]))
-+			goto out;
-+
-+	first_block = page->index * blocks_per_page;
-+	for (i = 0; i < blocks_per_page; i++) {
-+		int group;
-+
-+		group = (first_block + i) >> 1;
-+		if (group >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		data = page_address(page) + (i * blocksize);
-+		bitmap = bh[group - first_group]->b_data;
-+
-+		if ((first_block + i) & 1) {
-+			/* this is block of buddy */
-+			mb_debug("put buddy for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memset(data, 0xff, blocksize);
-+			EXT3_GROUP_INFO(sb, group)->bb_fragments = 0;
-+			memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0,
-+			       sizeof(unsigned short)*(sb->s_blocksize_bits+2));
-+			ext3_mb_generate_buddy(sb, data, bitmap, group);
-+		} else {
-+			/* this is block of bitmap */
-+			mb_debug("put bitmap for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memcpy(data, bitmap, blocksize);
-+		}
-+	}
-+	SetPageUptodate(page);
-+
-+out:
-+	if (bh) {
-+		for (i = 0; i < groups_per_page && bh[i]; i++)
-+			brelse(bh[i]);
-+		if (bh != &bhs)
-+			kfree(bh);
-+	}
-+	return err;
-+}
-+
-+static int ext3_mb_load_buddy(struct super_block *sb, int group,
-+		struct ext3_buddy *e3b)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *inode = sbi->s_buddy_cache;
-+	int blocks_per_page, block, pnum, poff;
-+	struct page *page;
-+
-+	mb_debug("load group %u\n", group);
-+
-+	blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
-+
-+	e3b->bd_blkbits = sb->s_blocksize_bits;
-+	e3b->bd_info = EXT3_GROUP_INFO(sb, group);
-+	e3b->bd_sb = sb;
-+	e3b->bd_group = group;
-+	e3b->bd_buddy_page = NULL;
-+	e3b->bd_bitmap_page = NULL;
-+
-+	block = group * 2;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	/* we could use find_or_create_page(), but it locks page
-+	 * what we'd like to avoid in fast path ... */
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_bitmap_page = page;
-+	e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	block++;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_buddy_page = page;
-+	e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	return 0;
-+
-+err:
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+	e3b->bd_buddy = NULL;
-+	e3b->bd_bitmap = NULL;
-+	return -EIO;
-+}
-+
-+static void ext3_mb_release_desc(struct ext3_buddy *e3b)
-+{
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+}
-+
-+
-+static inline void
-+ext3_lock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT,
-+		      &EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static inline void
-+ext3_unlock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT,
-+			&EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block)
-+{
-+	int order = 1;
-+	void *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(block < (1 << (e3b->bd_blkbits + 3)));
-+
-+	bb = EXT3_MB_BUDDY(e3b);
-+	while (order <= e3b->bd_blkbits + 1) {
-+		block = block >> 1;
-+		if (!mb_test_bit(block, bb)) {
-+			/* this block is part of buddy of order 'order' */
-+			return order;
-+		}
-+		bb += 1 << (e3b->bd_blkbits - order);
-+		order++;
-+	}
-+	return 0;
-+}
-+
-+static inline void mb_clear_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_clear_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static inline void mb_set_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0xffffffff;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_set_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count)
-+{
-+	int block = 0, max = 0, order;
-+	void *buddy, *buddy2;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free += count;
-+	if (first < e3b->bd_info->bb_first_free)
-+		e3b->bd_info->bb_first_free = first;
-+
-+	/* let's maintain fragments counter */
-+	if (first != 0)
-+		block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b));
-+	if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b));
-+	if (block && max)
-+		e3b->bd_info->bb_fragments--;
-+	else if (!block && !max)
-+		e3b->bd_info->bb_fragments++;
-+
-+	/* let's maintain buddy itself */
-+	while (count-- > 0) {
-+		block = first++;
-+		order = 0;
-+
-+		J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b)));
-+		mb_clear_bit(block, EXT3_MB_BITMAP(e3b));
-+		e3b->bd_info->bb_counters[order]++;
-+
-+		/* start of the buddy */
-+		buddy = mb_find_buddy(e3b, order, &max);
-+
-+		do {
-+			block &= ~1UL;
-+			if (mb_test_bit(block, buddy) ||
-+					mb_test_bit(block + 1, buddy))
-+				break;
-+
-+			/* both the buddies are free, try to coalesce them */
-+			buddy2 = mb_find_buddy(e3b, order + 1, &max);
-+
-+			if (!buddy2)
-+				break;
-+
-+			if (order > 0) {
-+				/* for special purposes, we don't set
-+				 * free bits in bitmap */
-+				mb_set_bit(block, buddy);
-+				mb_set_bit(block + 1, buddy);
-+			}
-+			e3b->bd_info->bb_counters[order]--;
-+			e3b->bd_info->bb_counters[order]--;
-+
-+			block = block >> 1;
-+			order++;
-+			e3b->bd_info->bb_counters[order]++;
-+
-+			mb_clear_bit(block, buddy2);
-+			buddy = buddy2;
-+		} while (1);
-+	}
-+	mb_check_buddy(e3b);
-+
-+	return 0;
-+}
-+
-+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block,
-+				int needed, struct ext3_free_extent *ex)
-+{
-+	int next = block, max, ord;
-+	void *buddy;
-+
-+	J_ASSERT(ex != NULL);
-+
-+	buddy = mb_find_buddy(e3b, order, &max);
-+	J_ASSERT(buddy);
-+	J_ASSERT(block < max);
-+	if (mb_test_bit(block, buddy)) {
-+		ex->fe_len = 0;
-+		ex->fe_start = 0;
-+		ex->fe_group = 0;
-+		return 0;
-+	}
-+
-+	if (likely(order == 0)) {
-+		/* find actual order */
-+		order = mb_find_order_for_block(e3b, block);
-+		block = block >> order;
-+	}
-+
-+	ex->fe_len = 1 << order;
-+	ex->fe_start = block << order;
-+	ex->fe_group = e3b->bd_group;
-+
-+	/* calc difference from given start */
-+	next = next - ex->fe_start;
-+	ex->fe_len -= next;
-+	ex->fe_start += next;
-+
-+	while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) {
-+
-+		if (block + 1 >= max)
-+			break;
-+
-+		next = (block + 1) * (1 << order);
-+		if (mb_test_bit(next, EXT3_MB_BITMAP(e3b)))
-+			break;
-+
-+		ord = mb_find_order_for_block(e3b, next);
-+
-+		order = ord;
-+		block = next >> order;
-+		ex->fe_len += 1 << order;
-+	}
-+
-+	J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3)));
-+	return ex->fe_len;
-+}
-+
-+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex)
-+{
-+	int ord, mlen = 0, max = 0, cur;
-+	int start = ex->fe_start;
-+	int len = ex->fe_len;
-+	unsigned ret = 0;
-+	int len0 = len;
-+	void *buddy;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free -= len;
-+	if (e3b->bd_info->bb_first_free == start)
-+		e3b->bd_info->bb_first_free += len;
-+
-+	/* let's maintain fragments counter */
-+	if (start != 0)
-+		mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b));
-+	if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b));
-+	if (mlen && max)
-+		e3b->bd_info->bb_fragments++;
-+	else if (!mlen && !max)
-+		e3b->bd_info->bb_fragments--;
-+
-+	/* let's maintain buddy itself */
-+	while (len) {
-+		ord = mb_find_order_for_block(e3b, start);
-+
-+		if (((start >> ord) << ord) == start && len >= (1 << ord)) {
-+			/* the whole chunk may be allocated at once! */
-+			mlen = 1 << ord;
-+			buddy = mb_find_buddy(e3b, ord, &max);
-+			J_ASSERT((start >> ord) < max);
-+			mb_set_bit(start >> ord, buddy);
-+			e3b->bd_info->bb_counters[ord]--;
-+			start += mlen;
-+			len -= mlen;
-+			J_ASSERT(len >= 0);
-+			continue;
-+		}
-+
-+		/* store for history */
-+		if (ret == 0)
-+			ret = len | (ord << 16);
-+
-+		/* we have to split large buddy */
-+		J_ASSERT(ord > 0);
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_set_bit(start >> ord, buddy);
-+		e3b->bd_info->bb_counters[ord]--;
-+
-+		ord--;
-+		cur = (start >> ord) & ~1U;
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_clear_bit(cur, buddy);
-+		mb_clear_bit(cur + 1, buddy);
-+		e3b->bd_info->bb_counters[ord]++;
-+		e3b->bd_info->bb_counters[ord]++;
-+	}
-+
-+	/* now drop all the bits in bitmap */
-+	mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
-+
-+	mb_check_buddy(e3b);
-+
-+	return ret;
-+}
-+
-+/*
-+ * Must be called under group lock!
-+ */
-+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	unsigned long ret;
-+
-+	ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len);
-+	ret = mb_mark_used(e3b, &ac->ac_b_ex);
-+
-+	ac->ac_status = AC_STATUS_FOUND;
-+	ac->ac_tail = ret & 0xffff;
-+	ac->ac_buddy = ret >> 16;
-+
-+	/* hold in-core structures until allocated
-+	 * blocks are marked non-free in on-disk bitmap */
-+	ac->ac_buddy_page = e3b->bd_buddy_page;
-+	page_cache_get(e3b->bd_buddy_page);
-+	ac->ac_bitmap_page = e3b->bd_bitmap_page;
-+	page_cache_get(e3b->bd_bitmap_page);
-+}
-+
-+/*
-+ * The routine checks whether found extent is good enough. If it is,
-+ * then the extent gets marked used and flag is set to the context
-+ * to stop scanning. Otherwise, the extent is compared with the
-+ * previous found extent and if new one is better, then it's stored
-+ * in the context. Later, the best found extent will be used, if
-+ * mballoc can't find good enough extent.
-+ *
-+ * FIXME: real allocation policy is to be designed yet!
-+ */
-+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac,
-+					struct ext3_free_extent *ex,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent *bex = &ac->ac_b_ex;
-+	struct ext3_free_extent *gex = &ac->ac_g_ex;
-+
-+	J_ASSERT(ex->fe_len > 0);
-+	J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+	J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+
-+	ac->ac_found++;
-+
-+	/*
-+	 * The special case - take what you catch first
-+	 */
-+	if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * Let's check whether the chunk is good enough
-+	 */
-+	if (ex->fe_len == gex->fe_len) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * If this is first found extent, just store it in the context
-+	 */
-+	if (bex->fe_len == 0) {
-+		*bex = *ex;
-+		return;
-+	}
-+
-+	/*
-+	 * If new found extent is better, store it in the context
-+	 */
-+	if (bex->fe_len < gex->fe_len) {
-+		/* if the request isn't satisfied, any found extent
-+		 * larger than previous best one is better */
-+		if (ex->fe_len > bex->fe_len)
-+			*bex = *ex;
-+	} else if (ex->fe_len > gex->fe_len) {
-+		/* if the request is satisfied, then we try to find
-+		 * an extent that still satisfy the request, but is
-+		 * smaller than previous one */
-+		*bex = *ex;
-+	}
-+
-+	/*
-+	 * Let's scan at least few extents and don't pick up a first one
-+	 */
-+	if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+
-+	/*
-+	 * We don't want to scan for a whole year
-+	 */
-+	if (ac->ac_found > ext3_mb_max_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+}
-+
-+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent ex = ac->ac_b_ex;
-+	int group = ex.fe_group, max, err;
-+
-+	J_ASSERT(ex.fe_len > 0);
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex);
-+
-+	if (max > 0) {
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac,
-+				struct ext3_buddy *e3b)
-+{
-+	int group = ac->ac_g_ex.fe_group, max, err;
-+	struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb);
-+	struct ext3_super_block *es = sbi->s_es;
-+	struct ext3_free_extent ex;
-+
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start,
-+			     ac->ac_g_ex.fe_len, &ex);
-+
-+	if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) {
-+		unsigned long start;
-+		start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) +
-+			ex.fe_start + le32_to_cpu(es->s_first_data_block));
-+		if (start % sbi->s_stripe == 0) {
-+			ac->ac_found++;
-+			ac->ac_b_ex = ex;
-+			ext3_mb_use_best_found(ac, e3b);
-+		}
-+	} else if (max >= ac->ac_g_ex.fe_len) {
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	} else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) {
-+		/* Sometimes, caller may want to merge even small
-+		 * number of blocks to an existing extent */
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+/*
-+ * The routine scans buddy structures (not bitmap!) from given order
-+ * to max order and tries to find big enough chunk to satisfy the req
-+ */
-+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_group_info *grp = e3b->bd_info;
-+	void *buddy;
-+	int i, k, max;
-+
-+	J_ASSERT(ac->ac_2order > 0);
-+	for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) {
-+		if (grp->bb_counters[i] == 0)
-+			continue;
-+
-+		buddy = mb_find_buddy(e3b, i, &max);
-+		if (buddy == NULL) {
-+			printk(KERN_ALERT "looking for wrong order?\n");
-+			break;
-+		}
-+
-+		k = mb_find_next_zero_bit(buddy, max, 0);
-+		J_ASSERT(k < max);
-+
-+		ac->ac_found++;
-+
-+		ac->ac_b_ex.fe_len = 1 << i;
-+		ac->ac_b_ex.fe_start = k << i;
-+		ac->ac_b_ex.fe_group = e3b->bd_group;
-+
-+		ext3_mb_use_best_found(ac, e3b);
-+		J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len);
-+
-+		if (unlikely(ext3_mb_stats))
-+			atomic_inc(&EXT3_SB(sb)->s_bal_2orders);
-+
-+		break;
-+	}
-+}
-+
-+/*
-+ * The routine scans the group and measures all found extents.
-+ * In order to optimize scanning, caller must pass number of
-+ * free blocks in the group, so the routine can know upper limit.
-+ */
-+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	int i, free;
-+
-+	free = e3b->bd_info->bb_free;
-+	J_ASSERT(free > 0);
-+
-+	i = e3b->bd_info->bb_first_free;
-+
-+	while (free && ac->ac_status == AC_STATUS_CONTINUE) {
-+		i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i);
-+		if (i >= sb->s_blocksize * 8) {
-+			J_ASSERT(free == 0);
-+			break;
-+		}
-+
-+		mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex);
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(free >= ex.fe_len);
-+
-+		ext3_mb_measure_extent(ac, &ex, e3b);
-+
-+		i += ex.fe_len;
-+		free -= ex.fe_len;
-+	}
-+}
-+
-+/*
-+ * This is a special case for storages like raid5
-+ * we try to find stripe-aligned chunks for stripe-size requests
-+ */
-+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac,
-+				 struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	unsigned long i, max;
-+
-+	J_ASSERT(sbi->s_stripe != 0);
-+
-+	/* find first stripe-aligned block */
-+	i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb)
-+		+ le32_to_cpu(sbi->s_es->s_first_data_block);
-+	i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe;
-+	i = (i - le32_to_cpu(sbi->s_es->s_first_data_block))
-+			% EXT3_BLOCKS_PER_GROUP(sb);
-+
-+	while (i < sb->s_blocksize * 8) {
-+		if (!mb_test_bit(i, bitmap)) {
-+			max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex);
-+			if (max >= sbi->s_stripe) {
-+				ac->ac_found++;
-+				ac->ac_b_ex = ex;
-+				ext3_mb_use_best_found(ac, e3b);
-+				break;
-+			}
-+		}
-+		i += sbi->s_stripe;
-+	}
-+}
-+
-+static int ext3_mb_good_group(struct ext3_allocation_context *ac,
-+				int group, int cr)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group);
-+	unsigned free, fragments, i, bits;
-+
-+	J_ASSERT(cr >= 0 && cr < 4);
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp));
-+
-+	free = grp->bb_free;
-+	fragments = grp->bb_fragments;
-+	if (free == 0)
-+		return 0;
-+	if (fragments == 0)
-+		return 0;
-+
-+	switch (cr) {
-+		case 0:
-+			J_ASSERT(ac->ac_2order != 0);
-+			bits = ac->ac_sb->s_blocksize_bits + 1;
-+			for (i = ac->ac_2order; i <= bits; i++)
-+				if (grp->bb_counters[i] > 0)
-+					return 1;
-+			break;
-+		case 1:
-+			if ((free / fragments) >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 2:
-+			if (free >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 3:
-+			return 1;
-+		default:
-+			BUG();
-+	}
-+
-+	return 0;
-+}
-+
-+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode,
-+		       unsigned long goal, int *len, int flags, int *errp)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_allocation_context ac;
-+	int i, group, block, cr, err = 0;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	struct buffer_head *gdp_bh;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+
-+	J_ASSERT(len != NULL);
-+	J_ASSERT(*len > 0);
-+
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk("ext3_mb_new_nblocks: nonexistent device");
-+		return 0;
-+	}
-+
-+	if (!test_opt(sb, MBALLOC)) {
-+		static int ext3_mballoc_warning = 0;
-+		if (ext3_mballoc_warning == 0) {
-+			printk(KERN_ERR "EXT3-fs: multiblock request with "
-+				"mballoc disabled!\n");
-+			ext3_mballoc_warning++;
-+		}
-+		*len = 1;
-+		err = ext3_new_block_old(handle, inode, goal, errp);
-+		return err;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+
-+	/*
-+	 * We can't allocate > group size
-+	 */
-+	if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10)
-+		*len = EXT3_BLOCKS_PER_GROUP(sb) - 10;
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* someone asks for non-reserved blocks */
-+		BUG_ON(*len > 1);
-+		err = ext3_mb_reserve_blocks(sb, 1);
-+		if (err) {
-+			*errp = err;
-+			return 0;
-+		}
-+	}
-+
-+	ac.ac_buddy_page = NULL;
-+	ac.ac_bitmap_page = NULL;
-+
-+	/*
-+	 * Check quota for allocation of this blocks.
-+	 */
-+	while (*len && DQUOT_ALLOC_BLOCK(inode, *len))
-+		*len -= 1;
-+	if (*len == 0) {
-+		*errp = -EDQUOT;
-+		block = 0;
-+		goto out;
-+	}
-+
-+	/* start searching from the goal */
-+	if (goal < le32_to_cpu(es->s_first_data_block) ||
-+	    goal >= le32_to_cpu(es->s_blocks_count))
-+		goal = le32_to_cpu(es->s_first_data_block);
-+	group = (goal - le32_to_cpu(es->s_first_data_block)) /
-+			EXT3_BLOCKS_PER_GROUP(sb);
-+	block = ((goal - le32_to_cpu(es->s_first_data_block)) %
-+			EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	/* set up allocation goals */
-+	ac.ac_b_ex.fe_group = 0;
-+	ac.ac_b_ex.fe_start = 0;
-+	ac.ac_b_ex.fe_len = 0;
-+	ac.ac_status = AC_STATUS_CONTINUE;
-+	ac.ac_groups_scanned = 0;
-+	ac.ac_ex_scanned = 0;
-+	ac.ac_found = 0;
-+	ac.ac_sb = inode->i_sb;
-+	ac.ac_g_ex.fe_group = group;
-+	ac.ac_g_ex.fe_start = block;
-+	ac.ac_g_ex.fe_len = *len;
-+	ac.ac_flags = flags;
-+	ac.ac_2order = 0;
-+	ac.ac_criteria = 0;
-+
-+	if (*len == 1 && sbi->s_stripe) {
-+		/* looks like a metadata, let's use a dirty hack for raid5
-+		 * move all metadata in first groups in hope to hit cached
-+		 * sectors and thus avoid read-modify cycles in raid5 */
-+		ac.ac_g_ex.fe_group = group = 0;
-+	}
-+
-+	/* probably, the request is for 2^8+ blocks (1/2/3/... MB) */
-+	i = ffs(*len);
-+	if (i >= ext3_mb_order2_reqs) {
-+		i--;
-+		if ((*len & (~(1 << i))) == 0)
-+			ac.ac_2order = i;
-+	}
-+
-+	/* first, try the goal */
-+	err = ext3_mb_find_by_goal(&ac, &e3b);
-+	if (err)
-+		goto out_err;
-+	if (ac.ac_status == AC_STATUS_FOUND)
-+		goto found;
-+
-+	/* Let's just scan groups to find more-less suitable blocks */
-+	cr = ac.ac_2order ? 0 : 1;
-+repeat:
-+	for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) {
-+		ac.ac_criteria = cr;
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) {
-+			if (group == EXT3_SB(sb)->s_groups_count)
-+				group = 0;
-+
-+			if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) {
-+				/* we need full data about the group
-+				 * to make a good selection */
-+				err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+				if (err)
-+					goto out_err;
-+				ext3_mb_release_desc(&e3b);
-+			}
-+
-+			/* check is group good for our criteries */
-+			if (!ext3_mb_good_group(&ac, group, cr))
-+				continue;
-+
-+			err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+			if (err)
-+				goto out_err;
-+
-+			ext3_lock_group(sb, group);
-+			if (!ext3_mb_good_group(&ac, group, cr)) {
-+				/* someone did allocation from this group */
-+				ext3_unlock_group(sb, group);
-+				ext3_mb_release_desc(&e3b);
-+				continue;
-+			}
-+
-+			ac.ac_groups_scanned++;
-+			if (cr == 0)
-+				ext3_mb_simple_scan_group(&ac, &e3b);
-+			else if (cr == 1 && *len == sbi->s_stripe)
-+				ext3_mb_scan_aligned(&ac, &e3b);
-+			else
-+				ext3_mb_complex_scan_group(&ac, &e3b);
-+
-+			ext3_unlock_group(sb, group);
-+
-+			ext3_mb_release_desc(&e3b);
-+
-+			if (ac.ac_status != AC_STATUS_CONTINUE)
-+				break;
-+		}
-+	}
-+
-+	if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND &&
-+	    !(ac.ac_flags & EXT3_MB_HINT_FIRST)) {
-+		/*
-+		 * We've been searching too long. Let's try to allocate
-+		 * the best chunk we've found so far
-+		 */
-+
-+		/*if (ac.ac_found > ext3_mb_max_to_scan)
-+			printk(KERN_DEBUG "EXT3-fs: too long searching at "
-+				"%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len,
-+				ac.ac_g_ex.fe_len);*/
-+		ext3_mb_try_best_found(&ac, &e3b);
-+		if (ac.ac_status != AC_STATUS_FOUND) {
-+			/*
-+			 * Someone more lucky has already allocated it.
-+			 * The only thing we can do is just take first
-+			 * found block(s)
-+			printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n");
-+			 */
-+			ac.ac_b_ex.fe_group = 0;
-+			ac.ac_b_ex.fe_start = 0;
-+			ac.ac_b_ex.fe_len = 0;
-+			ac.ac_status = AC_STATUS_CONTINUE;
-+			ac.ac_flags |= EXT3_MB_HINT_FIRST;
-+			cr = 3;
-+			goto repeat;
-+		}
-+	}
-+
-+	if (ac.ac_status != AC_STATUS_FOUND) {
-+		/*
-+		 * We aren't lucky definitely
-+		 */
-+		DQUOT_FREE_BLOCK(inode, *len);
-+		*errp = -ENOSPC;
-+		block = 0;
-+#if 1
-+		printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n",
-+			ac.ac_status, ac.ac_flags);
-+		printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n",
-+			ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group,
-+			ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr);
-+		printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n",
-+			sbi->s_blocks_reserved, ac.ac_found);
-+		printk("EXT3-fs: groups: ");
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++)
-+			printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free);
-+		printk("\n");
-+#endif
-+		goto out;
-+	}
-+
-+found:
-+	J_ASSERT(ac.ac_b_ex.fe_len > 0);
-+
-+	/* good news - free block(s) have been found. now it's time
-+	 * to mark block(s) in good old journaled bitmap */
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	/* we made a desicion, now mark found blocks in good old
-+	 * bitmap to be journaled */
-+
-+	ext3_debug("using block group %d(%d)\n",
-+			ac.ac_b_group.group, gdp->bg_free_blocks_count);
-+
-+	bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group);
-+	if (!bitmap_bh) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err) {
-+		*errp = err;
-+		goto out_err;
-+	}
-+
-+	gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh);
-+	if (!gdp) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	if (block == le32_to_cpu(gdp->bg_block_bitmap) ||
-+	    block == le32_to_cpu(gdp->bg_inode_bitmap) ||
-+	    in_range(block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error(sb, "ext3_new_block",
-+			    "Allocating block in system zone - "
-+			    "block = %u", block);
-+#ifdef AGGRESSIVE_CHECK
-+	for (i = 0; i < ac.ac_b_ex.fe_len; i++)
-+		J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data));
-+#endif
-+	mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len);
-+
-+	spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	gdp->bg_free_blocks_count =
-+			cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)
-+					- ac.ac_b_ex.fe_len);
-+	spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len);
-+
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+	if (err)
-+		goto out_err;
-+	err = ext3_journal_dirty_metadata(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	sb->s_dirt = 1;
-+	*errp = 0;
-+	brelse(bitmap_bh);
-+
-+	/* drop non-allocated, but dquote'd blocks */
-+	J_ASSERT(*len >= ac.ac_b_ex.fe_len);
-+	DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len);
-+
-+	*len = ac.ac_b_ex.fe_len;
-+	J_ASSERT(*len > 0);
-+	J_ASSERT(block != 0);
-+	goto out;
-+
-+out_err:
-+	/* if we've already allocated something, roll it back */
-+	if (ac.ac_status == AC_STATUS_FOUND) {
-+		/* FIXME: free blocks here */
-+	}
-+
-+	DQUOT_FREE_BLOCK(inode, *len);
-+	brelse(bitmap_bh);
-+	*errp = err;
-+	block = 0;
-+out:
-+	if (ac.ac_buddy_page)
-+		page_cache_release(ac.ac_buddy_page);
-+	if (ac.ac_bitmap_page)
-+		page_cache_release(ac.ac_bitmap_page);
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* block wasn't reserved before and we reserved it
-+		 * at the beginning of allocation. it doesn't matter
-+		 * whether we allocated anything or we failed: time
-+		 * to release reservation. NOTE: because I expect
-+		 * any multiblock request from delayed allocation
-+		 * path only, here is single block always */
-+		ext3_mb_release_blocks(sb, 1);
-+	}
-+
-+	if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) {
-+		atomic_inc(&sbi->s_bal_reqs);
-+		atomic_add(*len, &sbi->s_bal_allocated);
-+		if (*len >= ac.ac_g_ex.fe_len)
-+			atomic_inc(&sbi->s_bal_success);
-+		atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned);
-+		if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start &&
-+				ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group)
-+			atomic_inc(&sbi->s_bal_goals);
-+		if (ac.ac_found > ext3_mb_max_to_scan)
-+			atomic_inc(&sbi->s_bal_breaks);
-+	}
-+
-+	ext3_mb_store_history(sb, inode->i_ino, &ac);
-+
-+	return block;
-+}
-+EXPORT_SYMBOL(ext3_mb_new_blocks);
-+
-+#ifdef EXT3_MB_HISTORY
-+struct ext3_mb_proc_session {
-+	struct ext3_mb_history *history;
-+	struct super_block *sb;
-+	int start;
-+	int max;
-+};
-+
-+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s,
-+					struct ext3_mb_history *hs,
-+					int first)
-+{
-+	if (hs == s->history + s->max)
-+		hs = s->history;
-+	if (!first && hs == s->history + s->start)
-+		return NULL;
-+	while (hs->goal.fe_len == 0) {
-+		hs++;
-+		if (hs == s->history + s->max)
-+			hs = s->history;
-+		if (hs == s->history + s->start)
-+			return NULL;
-+	}
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	if (!hs)
-+		return NULL;
-+	while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL);
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	else
-+		return ext3_mb_history_skip_empty(s, ++hs, 0);
-+}
-+
-+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct ext3_mb_history *hs = v;
-+	char buf[20], buf2[20];
-+
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n",
-+			 "pid", "inode", "goal", "result", "found", "grps", "cr",
-+			 "merge", "tail", "broken");
-+		return 0;
-+	}
-+
-+	sprintf(buf, "%u/%u/%u", hs->goal.fe_group,
-+		hs->goal.fe_start, hs->goal.fe_len);
-+	sprintf(buf2, "%u/%u/%u", hs->result.fe_group,
-+		hs->result.fe_start, hs->result.fe_len);
-+	seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n",
-+			hs->pid, hs->ino, buf, buf2, hs->found, hs->groups,
-+			hs->cr, hs->merged ? "M" : "", hs->tail,
-+			hs->buddy ? 1 << hs->buddy : 0);
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_history_ops = {
-+	.start  = ext3_mb_seq_history_start,
-+	.next   = ext3_mb_seq_history_next,
-+	.stop   = ext3_mb_seq_history_stop,
-+	.show   = ext3_mb_seq_history_show,
-+};
-+
-+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
-+	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(s->history, sbi->s_mb_history, size);
-+	s->max = sbi->s_mb_history_max;
-+	s->start = sbi->s_mb_history_cur % s->max;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+
-+	rc = seq_open(file, &ext3_mb_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->history);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct ext3_mb_proc_session *s = seq->private;
-+	kfree(s->history);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations ext3_mb_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_history_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= ext3_mb_seq_history_release,
-+};
-+
-+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+
-+	group = *pos + 1;
-+	return (void *) group;
-+}
-+
-+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	++*pos;
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+	group = *pos + 1;
-+	return (void *) group;;
-+}
-+
-+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v)
-+{
-+	struct super_block *sb = seq->private;
-+	long group = (long) v, i;
-+	struct sg {
-+		struct ext3_group_info info;
-+		unsigned short counters[16];
-+	} sg;
-+
-+	group--;
-+	if (group == 0)
-+		seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
-+			 "group", "free", "frags", "first", "2^0", "2^1", "2^2",
-+			 "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10",
-+			 "2^11", "2^12", "2^13");
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
-+		sizeof(struct ext3_group_info);
-+	ext3_lock_group(sb, group);
-+	memcpy(&sg, EXT3_GROUP_INFO(sb, group), i);
-+	ext3_unlock_group(sb, group);
-+
-+	if (EXT3_MB_GRP_NEED_INIT(&sg.info))
-+		return 0;
-+
-+	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free,
-+			sg.info.bb_fragments, sg.info.bb_first_free);
-+	for (i = 0; i <= 13; i++)
-+		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-+				sg.info.bb_counters[i] : 0);
-+	seq_printf(seq, " ]\n");
-+
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_groups_ops = {
-+	.start  = ext3_mb_seq_groups_start,
-+	.next   = ext3_mb_seq_groups_next,
-+	.stop   = ext3_mb_seq_groups_stop,
-+	.show   = ext3_mb_seq_groups_show,
-+};
-+
-+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	int rc;
-+
-+	rc = seq_open(file, &ext3_mb_seq_groups_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = sb;
-+	}
-+	return rc;
-+
-+}
-+
-+static struct file_operations ext3_mb_seq_groups_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_groups_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= seq_release,
-+};
-+
-+static void ext3_mb_history_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	remove_proc_entry("mb_groups", sbi->s_mb_proc);
-+	remove_proc_entry("mb_history", sbi->s_mb_proc);
-+	remove_proc_entry(name, proc_root_ext3);
-+
-+	if (sbi->s_mb_history)
-+		kfree(sbi->s_mb_history);
-+}
-+
-+static void ext3_mb_history_init(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+	int i;
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3);
-+	if (sbi->s_mb_proc != NULL) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_history_fops;
-+			p->data = sb;
-+		}
-+		p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_groups_fops;
-+			p->data = sb;
-+		}
-+	}
-+
-+	sbi->s_mb_history_max = 1000;
-+	sbi->s_mb_history_cur = 0;
-+	spin_lock_init(&sbi->s_mb_history_lock);
-+	i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history);
-+	sbi->s_mb_history = kmalloc(i, GFP_KERNEL);
-+	memset(sbi->s_mb_history, 0, i);
-+	/* if we can't allocate history, then we simple won't use it */
-+}
-+
-+static void
-+ext3_mb_store_history(struct super_block *sb, unsigned ino,
-+			struct ext3_allocation_context *ac)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_history h;
-+
-+	if (likely(sbi->s_mb_history == NULL))
-+		return;
-+
-+	h.pid = current->pid;
-+	h.ino = ino;
-+	h.goal = ac->ac_g_ex;
-+	h.result = ac->ac_b_ex;
-+	h.found = ac->ac_found;
-+	h.cr = ac->ac_criteria;
-+	h.groups = ac->ac_groups_scanned;
-+	h.tail = ac->ac_tail;
-+	h.buddy = ac->ac_buddy;
-+	h.merged = 0;
-+	if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&
-+			ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group)
-+		h.merged = 1;
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h));
-+	if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max)
-+		sbi->s_mb_history_cur = 0;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+}
-+
-+#else
-+#define ext3_mb_history_release(sb)
-+#define ext3_mb_history_init(sb)
-+#endif
-+
-+int ext3_mb_init_backend(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, j, len, metalen;
-+	int num_meta_group_infos =
-+		(sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+	struct ext3_group_info **meta_group_info;
-+
-+	/* An 8TB filesystem with 64-bit pointers requires a 4096 byte
-+	 * kmalloc. A 128kb malloc should suffice for a 256TB filesystem.
-+	 * So a two level scheme suffices for now. */
-+	sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) *
-+				    num_meta_group_infos, GFP_KERNEL);
-+	if (sbi->s_group_info == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n");
-+		return -ENOMEM;
-+	}
-+	sbi->s_buddy_cache = new_inode(sb);
-+	if (sbi->s_buddy_cache == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't get new inode\n");
-+		goto err_freesgi;
-+	}
-+
-+	metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb);
-+	for (i = 0; i < num_meta_group_infos; i++) {
-+		if ((i + 1) == num_meta_group_infos)
-+			metalen = sizeof(*meta_group_info) *
-+				(sbi->s_groups_count -
-+					(i << EXT3_DESC_PER_BLOCK_BITS(sb)));
-+		meta_group_info = kmalloc(metalen, GFP_KERNEL);
-+		if (meta_group_info == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate mem for a "
-+			       "buddy group\n");
-+			goto err_freemeta;
-+		}
-+		sbi->s_group_info[i] = meta_group_info;
-+	}
-+
-+	/*
-+	 * calculate needed size. if change bb_counters size,
-+	 * don't forget about ext3_mb_generate_buddy()
-+	 */
-+	len = sizeof(struct ext3_group_info);
-+	len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2);
-+	for (i = 0; i < sbi->s_groups_count; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		meta_group_info =
-+			sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)];
-+		j = i & (EXT3_DESC_PER_BLOCK(sb) - 1);
-+
-+		meta_group_info[j] = kmalloc(len, GFP_KERNEL);
-+		if (meta_group_info[j] == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n");
-+			i--;
-+			goto err_freebuddy;
-+		}
-+		desc = ext3_get_group_desc(sb, i, NULL);
-+		if (desc == NULL) {
-+			printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i);
-+			goto err_freebuddy;
-+		}
-+		memset(meta_group_info[j], 0, len);
-+		set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT,
-+			&meta_group_info[j]->bb_state);
-+		meta_group_info[j]->bb_free =
-+			le16_to_cpu(desc->bg_free_blocks_count);
-+	}
-+
-+	return 0;
-+
-+err_freebuddy:
-+	while (i >= 0) {
-+		kfree(EXT3_GROUP_INFO(sb, i));
-+		i--;
-+	}
-+	i = num_meta_group_infos;
-+err_freemeta:
-+	while (--i >= 0)
-+		kfree(sbi->s_group_info[i]);
-+	iput(sbi->s_buddy_cache);
-+err_freesgi:
-+	kfree(sbi->s_group_info);
-+	return -ENOMEM;
-+}
-+
-+int ext3_mb_init(struct super_block *sb, int needs_recovery)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *root = sb->s_root->d_inode;
-+	unsigned i, offset, max;
-+	struct dentry *dentry;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short);
-+
-+	sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_offsets == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		return -ENOMEM;
-+	}
-+	sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_maxs == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_maxs);
-+		return -ENOMEM;
-+	}
-+
-+	 /* order 0 is regular bitmap */
-+	sbi->s_mb_maxs[0] = sb->s_blocksize << 3;
-+	sbi->s_mb_offsets[0] = 0;
-+
-+	i = 1;
-+	offset = 0;
-+	max = sb->s_blocksize << 2;
-+	do {
-+		sbi->s_mb_offsets[i] = offset;
-+		sbi->s_mb_maxs[i] = max;
-+		offset += 1 << (sb->s_blocksize_bits - i);
-+		max = max >> 1;
-+		i++;
-+	} while (i <= sb->s_blocksize_bits + 1);
-+
-+	/* init file for buddy data */
-+	if ((i = ext3_mb_init_backend(sb))) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_offsets);
-+		kfree(sbi->s_mb_maxs);
-+		return i;
-+	}
-+
-+	spin_lock_init(&sbi->s_reserve_lock);
-+	spin_lock_init(&sbi->s_md_lock);
-+	INIT_LIST_HEAD(&sbi->s_active_transaction);
-+	INIT_LIST_HEAD(&sbi->s_closed_transaction);
-+	INIT_LIST_HEAD(&sbi->s_committed_transaction);
-+	spin_lock_init(&sbi->s_bal_lock);
-+
-+	/* remove old on-disk buddy file */
-+	down(&root->i_sem);
-+	dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy"));
-+	if (dentry->d_inode != NULL) {
-+		i = vfs_unlink(root, dentry);
-+		if (i != 0)
-+			printk("EXT3-fs: can't remove .buddy file: %d\n", i);
-+	}
-+	dput(dentry);
-+	up(&root->i_sem);
-+
-+	ext3_mb_history_init(sb);
-+
-+	printk("EXT3-fs: mballoc enabled\n");
-+	return 0;
-+}
-+
-+int ext3_mb_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, num_meta_group_infos;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	/* release freed, non-committed blocks */
-+	spin_lock(&sbi->s_md_lock);
-+	list_splice_init(&sbi->s_closed_transaction,
-+			&sbi->s_committed_transaction);
-+	list_splice_init(&sbi->s_active_transaction,
-+			&sbi->s_committed_transaction);
-+	spin_unlock(&sbi->s_md_lock);
-+	ext3_mb_free_committed_blocks(sb);
-+
-+	if (sbi->s_group_info) {
-+		for (i = 0; i < sbi->s_groups_count; i++)
-+			kfree(EXT3_GROUP_INFO(sb, i));
-+		num_meta_group_infos = (sbi->s_groups_count +
-+			EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+		for (i = 0; i < num_meta_group_infos; i++)
-+			kfree(sbi->s_group_info[i]);
-+		kfree(sbi->s_group_info);
-+	}
-+	if (sbi->s_mb_offsets)
-+		kfree(sbi->s_mb_offsets);
-+	if (sbi->s_mb_maxs)
-+		kfree(sbi->s_mb_maxs);
-+	if (sbi->s_buddy_cache)
-+		iput(sbi->s_buddy_cache);
-+	if (sbi->s_blocks_reserved)
-+		printk("ext3-fs: %ld blocks being reserved at umount!\n",
-+				sbi->s_blocks_reserved);
-+	if (ext3_mb_stats) {
-+		printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n",
-+			atomic_read(&sbi->s_bal_allocated),
-+			atomic_read(&sbi->s_bal_reqs),
-+			atomic_read(&sbi->s_bal_success));
-+		printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, "
-+			"%u 2^N hits, %u breaks\n",
-+			atomic_read(&sbi->s_bal_ex_scanned),
-+			atomic_read(&sbi->s_bal_goals),
-+			atomic_read(&sbi->s_bal_2orders),
-+			atomic_read(&sbi->s_bal_breaks));
-+		printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n",
-+			sbi->s_mb_buddies_generated++,
-+			sbi->s_mb_generation_time);
-+	}
-+
-+	ext3_mb_history_release(sb);
-+
-+	return 0;
-+}
-+
-+void ext3_mb_free_committed_blocks(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int err, i, count = 0, count2 = 0;
-+	struct ext3_free_metadata *md;
-+	struct ext3_buddy e3b;
-+
-+	if (list_empty(&sbi->s_committed_transaction))
-+		return;
-+
-+	/* there is committed blocks to be freed yet */
-+	do {
-+		/* get next array of blocks */
-+		md = NULL;
-+		spin_lock(&sbi->s_md_lock);
-+		if (!list_empty(&sbi->s_committed_transaction)) {
-+			md = list_entry(sbi->s_committed_transaction.next,
-+					struct ext3_free_metadata, list);
-+			list_del(&md->list);
-+		}
-+		spin_unlock(&sbi->s_md_lock);
-+
-+		if (md == NULL)
-+			break;
-+
-+		mb_debug("gonna free %u blocks in group %u (0x%p):",
-+				md->num, md->group, md);
-+
-+		err = ext3_mb_load_buddy(sb, md->group, &e3b);
-+		/* we expect to find existing buddy because it's pinned */
-+		BUG_ON(err != 0);
-+
-+		/* there are blocks to put in buddy to make them really free */
-+		count += md->num;
-+		count2++;
-+		ext3_lock_group(sb, md->group);
-+		for (i = 0; i < md->num; i++) {
-+			mb_debug(" %u", md->blocks[i]);
-+			mb_free_blocks(&e3b, md->blocks[i], 1);
-+		}
-+		mb_debug("\n");
-+		ext3_unlock_group(sb, md->group);
-+
-+		/* balance refcounts from ext3_mb_free_metadata() */
-+		page_cache_release(e3b.bd_buddy_page);
-+		page_cache_release(e3b.bd_bitmap_page);
-+
-+		kfree(md);
-+		ext3_mb_release_desc(&e3b);
-+
-+	} while (md);
-+	mb_debug("freed %u blocks in %u structures\n", count, count2);
-+}
-+
-+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	if (sbi->s_last_transaction == handle->h_transaction->t_tid)
-+		return;
-+
-+	/* new transaction! time to close last one and free blocks for
-+	 * committed transaction. we know that only transaction can be
-+	 * active, so previos transaction can be being logged and we
-+	 * know that transaction before previous is known to be already
-+	 * logged. this means that now we may free blocks freed in all
-+	 * transactions before previous one. hope I'm clear enough ... */
-+
-+	spin_lock(&sbi->s_md_lock);
-+	if (sbi->s_last_transaction != handle->h_transaction->t_tid) {
-+		mb_debug("new transaction %lu, old %lu\n",
-+				(unsigned long) handle->h_transaction->t_tid,
-+				(unsigned long) sbi->s_last_transaction);
-+		list_splice_init(&sbi->s_closed_transaction,
-+					&sbi->s_committed_transaction);
-+		list_splice_init(&sbi->s_active_transaction,
-+					&sbi->s_closed_transaction);
-+		sbi->s_last_transaction = handle->h_transaction->t_tid;
-+	}
-+	spin_unlock(&sbi->s_md_lock);
-+
-+	ext3_mb_free_committed_blocks(sb);
-+}
-+
-+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b,
-+				int group, int block, int count)
-+{
-+	struct ext3_group_info *db = e3b->bd_info;
-+	struct super_block *sb = e3b->bd_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_free_metadata *md;
-+	int i;
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	ext3_lock_group(sb, group);
-+	for (i = 0; i < count; i++) {
-+		md = db->bb_md_cur;
-+		if (md && db->bb_tid != handle->h_transaction->t_tid) {
-+			db->bb_md_cur = NULL;
-+			md = NULL;
-+		}
-+
-+		if (md == NULL) {
-+			ext3_unlock_group(sb, group);
-+			md = kmalloc(sizeof(*md), GFP_KERNEL);
-+			if (md == NULL)
-+				return -ENOMEM;
-+			md->num = 0;
-+			md->group = group;
-+
-+			ext3_lock_group(sb, group);
-+			if (db->bb_md_cur == NULL) {
-+				spin_lock(&sbi->s_md_lock);
-+				list_add(&md->list, &sbi->s_active_transaction);
-+				spin_unlock(&sbi->s_md_lock);
-+				/* protect buddy cache from being freed,
-+				 * otherwise we'll refresh it from
-+				 * on-disk bitmap and lose not-yet-available
-+				 * blocks */
-+				page_cache_get(e3b->bd_buddy_page);
-+				page_cache_get(e3b->bd_bitmap_page);
-+				db->bb_md_cur = md;
-+				db->bb_tid = handle->h_transaction->t_tid;
-+				mb_debug("new md 0x%p for group %u\n",
-+							md, md->group);
-+			} else {
-+				kfree(md);
-+				md = db->bb_md_cur;
-+			}
-+		}
-+
-+		BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS);
-+		md->blocks[md->num] = block + i;
-+		md->num++;
-+		if (md->num == EXT3_BB_MAX_BLOCKS) {
-+			/* no more space, put full container on a sb's list */
-+			db->bb_md_cur = NULL;
-+		}
-+	}
-+	ext3_unlock_group(sb, group);
-+	return 0;
-+}
-+
-+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,
-+			unsigned long block, unsigned long count,
-+			int metadata, int *freed)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	unsigned long bit, overflow;
-+	struct buffer_head *gd_bh;
-+	unsigned long block_group;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+	int err = 0, ret;
-+
-+	*freed = 0;
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk ("ext3_free_blocks: nonexistent device");
-+		return;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+	if (block < le32_to_cpu(es->s_first_data_block) ||
-+	    block + count < block ||
-+	    block + count > le32_to_cpu(es->s_blocks_count)) {
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks not in datazone - "
-+			    "block = %lu, count = %lu", block, count);
-+		goto error_return;
-+	}
-+
-+	ext3_debug("freeing block %lu\n", block);
-+
-+do_more:
-+	overflow = 0;
-+	block_group = (block - le32_to_cpu(es->s_first_data_block)) /
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	bit = (block - le32_to_cpu(es->s_first_data_block)) %
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	/*
-+	 * Check to see if we are freeing blocks across a group
-+	 * boundary.
-+	 */
-+	if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) {
-+		overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb);
-+		count -= overflow;
-+	}
-+	brelse(bitmap_bh);
-+	bitmap_bh = read_block_bitmap(sb, block_group);
-+	if (!bitmap_bh)
-+		goto error_return;
-+	gdp = ext3_get_group_desc (sb, block_group, &gd_bh);
-+	if (!gdp)
-+		goto error_return;
-+
-+	if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
-+	    in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
-+	    in_range (block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group) ||
-+	    in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks in system zones - "
-+			    "Block = %lu, count = %lu",
-+			    block, count);
-+
-+	BUFFER_TRACE(bitmap_bh, "getting write access");
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err)
-+		goto error_return;
-+
-+	/*
-+	 * We are about to modify some metadata.  Call the journal APIs
-+	 * to unshare ->b_data if a currently-committing transaction is
-+	 * using it
-+	 */
-+	BUFFER_TRACE(gd_bh, "get_write_access");
-+	err = ext3_journal_get_write_access(handle, gd_bh);
-+	if (err)
-+		goto error_return;
-+
-+	err = ext3_mb_load_buddy(sb, block_group, &e3b);
-+	if (err)
-+		goto error_return;
-+
-+#ifdef AGGRESSIVE_CHECK
-+	{
-+		int i;
-+		for (i = 0; i < count; i++)
-+			J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
-+	}
-+#endif
-+	mb_clear_bits(bitmap_bh->b_data, bit, count);
-+
-+	/* We dirtied the bitmap block */
-+	BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+
-+	if (metadata) {
-+		/* blocks being freed are metadata. these blocks shouldn't
-+		 * be used until this transaction is committed */
-+		ext3_mb_free_metadata(handle, &e3b, block_group, bit, count);
-+	} else {
-+		ext3_lock_group(sb, block_group);
-+		mb_free_blocks(&e3b, bit, count);
-+		ext3_unlock_group(sb, block_group);
-+	}
-+
-+	spin_lock(sb_bgl_lock(sbi, block_group));
-+	gdp->bg_free_blocks_count =
-+		cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
-+	spin_unlock(sb_bgl_lock(sbi, block_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, count);
-+
-+	ext3_mb_release_desc(&e3b);
-+
-+	*freed = count;
-+
-+	/* And the group descriptor block */
-+	BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
-+	ret = ext3_journal_dirty_metadata(handle, gd_bh);
-+	if (!err) err = ret;
-+
-+	if (overflow && !err) {
-+		block += count;
-+		count = overflow;
-+		goto do_more;
-+	}
-+	sb->s_dirt = 1;
-+error_return:
-+	brelse(bitmap_bh);
-+	ext3_std_error(sb, err);
-+	return;
-+}
-+
-+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int free, ret = -ENOSPC;
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	free = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
-+	if (blocks <= free - sbi->s_blocks_reserved) {
-+		sbi->s_blocks_reserved += blocks;
-+		ret = 0;
-+	}
-+	spin_unlock(&sbi->s_reserve_lock);
-+	return ret;
-+}
-+
-+void ext3_mb_release_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	sbi->s_blocks_reserved -= blocks;
-+	WARN_ON(sbi->s_blocks_reserved < 0);
-+	if (sbi->s_blocks_reserved < 0)
-+		sbi->s_blocks_reserved = 0;
-+	spin_unlock(&sbi->s_reserve_lock);
-+}
-+
-+int ext3_new_block(handle_t *handle, struct inode *inode,
-+		unsigned long goal, int *errp)
-+{
-+	int ret, len;
-+
-+	if (!test_opt(inode->i_sb, MBALLOC)) {
-+		ret = ext3_new_block_old(handle, inode, goal, errp);
-+		goto out;
-+	}
-+	len = 1;
-+	ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp);
-+out:
-+	return ret;
-+}
-+
-+
-+void ext3_free_blocks(handle_t *handle, struct inode * inode,
-+			unsigned long block, unsigned long count, int metadata)
-+{
-+	struct super_block *sb;
-+	int freed;
-+
-+	sb = inode->i_sb;
-+	if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info)
-+		ext3_free_blocks_old(handle, inode, block, count);
-+	else {
-+		ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed);
-+		if (freed)
-+			DQUOT_FREE_BLOCK(inode, freed);
-+	}
-+	return;
-+}
-+
-+#define EXT3_ROOT		   "ext3"
-+#define EXT3_MB_STATS_NAME	   "mb_stats"
-+#define EXT3_MB_MAX_TO_SCAN_NAME  "mb_max_to_scan"
-+#define EXT3_MB_MIN_TO_SCAN_NAME  "mb_min_to_scan"
-+#define EXT3_MB_ORDER2_REQ	   "mb_order2_req"
-+
-+static int ext3_mb_stats_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_stats);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_stats_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_STATS_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0);
-+	return count;
-+}
-+
-+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_max_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_max_to_scan = value;	
-+
-+	return count;
-+}
-+
-+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_min_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_min_to_scan = value;	
-+
-+	return count;
-+}
-+
-+static int ext3_mb_order2_req_read(char *page, char **start, off_t off,
-+				   int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_order2_reqs);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_order2_req_write(struct file *file, const char *buffer,
-+				    unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_order2_reqs = value;	
-+
-+	return count;
-+}
-+
-+int __init init_ext3_proc(void)
-+{
-+	struct proc_dir_entry *proc_ext3_mb_stats;
-+	struct proc_dir_entry *proc_ext3_mb_max_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_min_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_order2_req;
-+
-+	proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs);
-+	if (proc_root_ext3 == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT);
-+		return -EIO;
-+	}
-+
-+	/* Initialize EXT3_MB_STATS_NAME */
-+	proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_stats == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_STATS_NAME);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_stats->data = NULL;
-+	proc_ext3_mb_stats->read_proc  = ext3_mb_stats_read;
-+	proc_ext3_mb_stats->write_proc = ext3_mb_stats_write;
-+
-+	/* Initialize EXT3_MAX_TO_SCAN_NAME */
-+	proc_ext3_mb_max_to_scan = create_proc_entry(
-+			EXT3_MB_MAX_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_max_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MAX_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_max_to_scan->data = NULL;
-+	proc_ext3_mb_max_to_scan->read_proc  = ext3_mb_max_to_scan_read;
-+	proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write;
-+
-+	/* Initialize EXT3_MIN_TO_SCAN_NAME */
-+	proc_ext3_mb_min_to_scan = create_proc_entry(
-+			EXT3_MB_MIN_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_min_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MIN_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_min_to_scan->data = NULL;
-+	proc_ext3_mb_min_to_scan->read_proc  = ext3_mb_min_to_scan_read;
-+	proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write;
-+
-+	/* Initialize EXT3_ORDER2_REQ */
-+	proc_ext3_mb_order2_req = create_proc_entry(
-+			EXT3_MB_ORDER2_REQ,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_order2_req == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_ORDER2_REQ);
-+		remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_order2_req->data = NULL;
-+	proc_ext3_mb_order2_req->read_proc  = ext3_mb_order2_req_read;
-+	proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write;
-+
-+	return 0;
-+}
-+
-+void exit_ext3_proc(void)
-+{
-+	remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3);
-+	remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+}
-Index: linux-2.6.5-7.282-full/fs/ext3/Makefile
-===================================================================
---- linux-2.6.5-7.282-full.orig/fs/ext3/Makefile	2006-10-24 22:18:28.000000000 +0400
-+++ linux-2.6.5-7.282-full/fs/ext3/Makefile	2006-10-24 22:18:28.000000000 +0400
-@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o \
--	   extents.o
-+	   extents.o mballoc.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch
deleted file mode 100644
index 135262a0ff891b73bb7ee32882f18eb0cbf14719..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.12.patch
+++ /dev/null
@@ -1,3102 +0,0 @@
-Index: linux-2.6.12.6-bull/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.12.6-bull.orig/include/linux/ext3_fs.h	2006-04-29 20:39:09.000000000 +0400
-+++ linux-2.6.12.6-bull/include/linux/ext3_fs.h	2006-04-29 20:39:10.000000000 +0400
-@@ -57,6 +57,14 @@ struct statfs;
- #define ext3_debug(f, a...)	do {} while (0)
- #endif
- 
-+#define EXT3_MULTIBLOCK_ALLOCATOR	1
-+
-+#define EXT3_MB_HINT_MERGE		1
-+#define EXT3_MB_HINT_RESERVED		2
-+#define EXT3_MB_HINT_METADATA		4
-+#define EXT3_MB_HINT_FIRST		8
-+#define EXT3_MB_HINT_BEST		16
-+
- /*
-  * Special inodes numbers
-  */
-@@ -366,6 +374,7 @@ struct ext3_inode {
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- #define EXT3_MOUNT_EXTENTS		0x200000/* Extents support */
- #define EXT3_MOUNT_EXTDEBUG		0x400000/* Extents debug */
-+#define EXT3_MOUNT_MBALLOC		0x800000/* Buddy allocation support */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -387,6 +396,14 @@ struct ext3_inode {
- #define ext3_find_first_zero_bit	ext2_find_first_zero_bit
- #define ext3_find_next_zero_bit		ext2_find_next_zero_bit
- 
-+#ifndef ext2_find_next_le_bit
-+#ifdef __LITTLE_ENDIAN
-+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off))
-+#else
-+#error "mballoc needs a patch for big-endian systems - CFS bug 10634"
-+#endif	/* __LITTLE_ENDIAN */
-+#endif	/* !ext2_find_next_le_bit */
-+
- /*
-  * Maximal mount counts between two filesystem checks
-  */
-@@ -727,7 +736,8 @@ extern int ext3_bg_has_super(struct supe
- extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
- extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
- extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
--			      unsigned long);
-+			      unsigned long, int);
-+extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *);
- extern void ext3_free_blocks_sb (handle_t *, struct super_block *,
- 				 unsigned long, unsigned long, int *);
- extern unsigned long ext3_count_free_blocks (struct super_block *);
-@@ -848,6 +857,17 @@ extern void ext3_extents_initialize_bloc
- extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
- 			  unsigned int cmd, unsigned long arg);
- 
-+/* mballoc.c */
-+extern long ext3_mb_stats;
-+extern long ext3_mb_max_to_scan;
-+extern int ext3_mb_init(struct super_block *, int);
-+extern int ext3_mb_release(struct super_block *);
-+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *);
-+extern int ext3_mb_reserve_blocks(struct super_block *, int);
-+extern void ext3_mb_release_blocks(struct super_block *, int);
-+int __init init_ext3_proc(void);
-+void exit_ext3_proc(void);
-+
- #endif	/* __KERNEL__ */
- 
- /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */
-Index: linux-2.6.12.6-bull/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.12.6-bull.orig/include/linux/ext3_fs_sb.h	2005-08-29 20:55:27.000000000 +0400
-+++ linux-2.6.12.6-bull/include/linux/ext3_fs_sb.h	2006-04-29 20:39:10.000000000 +0400
-@@ -21,8 +21,14 @@
- #include <linux/wait.h>
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
-+#include <linux/list.h>
- #endif
- #include <linux/rbtree.h>
-+#include <linux/proc_fs.h>
-+
-+struct ext3_buddy_group_blocks;
-+struct ext3_mb_history;
-+#define EXT3_BB_MAX_BLOCKS
- 
- /*
-  * third extended-fs super-block data in memory
-@@ -78,6 +84,43 @@ struct ext3_sb_info {
- 	char *s_qf_names[MAXQUOTAS];		/* Names of quota files with journalled quota */
- 	int s_jquota_fmt;			/* Format of quota to use */
- #endif
-+
-+	/* for buddy allocator */
-+	struct ext3_group_info ***s_group_info;
-+	struct inode *s_buddy_cache;
-+	long s_blocks_reserved;
-+	spinlock_t s_reserve_lock;
-+	struct list_head s_active_transaction;
-+	struct list_head s_closed_transaction;
-+	struct list_head s_committed_transaction;
-+	spinlock_t s_md_lock;
-+	tid_t s_last_transaction;
-+	int s_mb_factor;
-+	unsigned short *s_mb_offsets, *s_mb_maxs;
-+	unsigned long s_stripe;
-+
-+	/* history to debug policy */
-+	struct ext3_mb_history *s_mb_history;
-+	int s_mb_history_cur;
-+	int s_mb_history_max;
-+	struct proc_dir_entry *s_mb_proc;
-+	spinlock_t s_mb_history_lock;
-+
-+	/* stats for buddy allocator */
-+	atomic_t s_bal_reqs;	/* number of reqs with len > 1 */
-+	atomic_t s_bal_success;	/* we found long enough chunks */
-+	atomic_t s_bal_allocated;	/* in blocks */
-+	atomic_t s_bal_ex_scanned;	/* total extents scanned */
-+	atomic_t s_bal_goals;	/* goal hits */
-+	atomic_t s_bal_breaks;	/* too long searches */
-+	atomic_t s_bal_2orders;	/* 2^order hits */
-+	spinlock_t s_bal_lock;
-+	unsigned long s_mb_buddies_generated;
-+	unsigned long long s_mb_generation_time;
- };
-+
-+#define EXT3_GROUP_INFO(sb, group)					   \
-+	EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \
-+				 [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)]
- 
- #endif	/* _LINUX_EXT3_FS_SB */
-Index: linux-2.6.12.6-bull/fs/ext3/super.c
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/super.c	2006-04-29 20:39:09.000000000 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/super.c	2006-04-29 20:39:10.000000000 +0400
-@@ -387,6 +387,7 @@ static void ext3_put_super (struct super
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_mb_release(sb);
- 	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
-@@ -597,6 +598,7 @@ enum {
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- 	Opt_extents, Opt_noextents, Opt_extdebug,
-+	Opt_mballoc, Opt_nomballoc, Opt_stripe,
- };
- 
- static match_table_t tokens = {
-@@ -650,6 +651,9 @@ static match_table_t tokens = {
- 	{Opt_extents, "extents"},
- 	{Opt_noextents, "noextents"},
- 	{Opt_extdebug, "extdebug"},
-+	{Opt_mballoc, "mballoc"},
-+	{Opt_nomballoc, "nomballoc"},
-+	{Opt_stripe, "stripe=%u"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -965,6 +967,19 @@ clear_qf_name:
- 		case Opt_extdebug:
- 			set_opt (sbi->s_mount_opt, EXTDEBUG);
- 			break;
-+		case Opt_mballoc:
-+			set_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_nomballoc:
-+			clear_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_stripe:
-+			if (match_int(&args[0], &option))
-+				return 0;
-+			if (option < 0)
-+				return 0;
-+			sbi->s_stripe = option;
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1670,6 +1675,7 @@ static int ext3_fill_super (struct super
- 		ext3_count_dirs(sb));
- 
- 	ext3_ext_init(sb);
-+	ext3_mb_init(sb, needs_recovery);
- 	lock_kernel();
- 	return 0;
- 
-@@ -2549,7 +2555,13 @@ static struct file_system_type ext3_fs_t
- 
- static int __init init_ext3_fs(void)
- {
--	int err = init_ext3_xattr();
-+	int err;
-+
-+	err = init_ext3_proc();
-+	if (err)
-+		return err;
-+
-+	err = init_ext3_xattr();
- 	if (err)
- 		return err;
- 	err = init_inodecache();
-@@ -2571,6 +2583,7 @@ static void __exit exit_ext3_fs(void)
- 	unregister_filesystem(&ext3_fs_type);
- 	destroy_inodecache();
- 	exit_ext3_xattr();
-+	exit_ext3_proc();
- }
- 
- int ext3_prep_san_write(struct inode *inode, long *blocks,
-Index: linux-2.6.12.6-bull/fs/ext3/extents.c
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/extents.c	2006-04-29 20:39:09.000000000 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/extents.c	2006-04-29 20:39:10.000000000 +0400
-@@ -777,7 +777,7 @@ cleanup:
- 		for (i = 0; i < depth; i++) {
- 			if (!ablocks[i])
- 				continue;
--			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1);
- 		}
- 	}
- 	kfree(ablocks);
-@@ -1434,7 +1434,7 @@ int ext3_ext_rm_idx(handle_t *handle, st
- 		  path->p_idx->ei_leaf);
- 	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
- 	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
--	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1);
- 	return err;
- }
- 
-@@ -1919,10 +1919,12 @@ ext3_remove_blocks(struct ext3_extents_t
- 	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
- 	handle_t *handle = ext3_journal_start(tree->inode, needed);
- 	struct buffer_head *bh;
--	int i;
-+	int i, metadata = 0;
- 
- 	if (IS_ERR(handle))
- 		return PTR_ERR(handle);
-+	if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode))
-+		metadata = 1;
- 	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
- 		/* tail removal */
- 		unsigned long num, start;
-@@ -1934,7 +1936,7 @@ ext3_remove_blocks(struct ext3_extents_t
- 			bh = sb_find_get_block(tree->inode->i_sb, start + i);
- 			ext3_forget(handle, 0, tree->inode, bh, start + i);
- 		}
--		ext3_free_blocks(handle, tree->inode, start, num);
-+		ext3_free_blocks(handle, tree->inode, start, num, metadata);
- 	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
- 		printk("strange request: removal %lu-%lu from %u:%u\n",
- 		       from, to, ex->ee_block, ex->ee_len);
-Index: linux-2.6.12.6-bull/fs/ext3/inode.c
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/inode.c	2006-04-29 20:39:09.000000000 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/inode.c	2006-04-29 20:39:10.000000000 +0400
-@@ -564,7 +564,7 @@ static int ext3_alloc_branch(handle_t *h
- 		ext3_journal_forget(handle, branch[i].bh);
- 	}
- 	for (i = 0; i < keys; i++)
--		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1);
-+		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1);
- 	return err;
- }
- 
-@@ -1850,7 +1850,7 @@ ext3_clear_blocks(handle_t *handle, stru
- 		}
- 	}
- 
--	ext3_free_blocks(handle, inode, block_to_free, count);
-+	ext3_free_blocks(handle, inode, block_to_free, count, 1);
- }
- 
- /**
-@@ -2023,7 +2023,7 @@ static void ext3_free_branches(handle_t 
- 				ext3_journal_test_restart(handle, inode);
- 			}
- 
--			ext3_free_blocks(handle, inode, nr, 1);
-+			ext3_free_blocks(handle, inode, nr, 1, 1);
- 
- 			if (parent_bh) {
- 				/*
-Index: linux-2.6.12.6-bull/fs/ext3/balloc.c
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/balloc.c	2005-08-29 20:55:27.000000000 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/balloc.c	2006-04-29 20:39:10.000000000 +0400
-@@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_
-  *
-  * Return buffer_head on success or NULL in case of failure.
-  */
--static struct buffer_head *
-+struct buffer_head *
- read_block_bitmap(struct super_block *sb, unsigned int block_group)
- {
- 	struct ext3_group_desc * desc;
-@@ -490,24 +490,6 @@ error_return:
- 	return;
- }
- 
--/* Free given blocks, update quota and i_blocks field */
--void ext3_free_blocks(handle_t *handle, struct inode *inode,
--			unsigned long block, unsigned long count)
--{
--	struct super_block * sb;
--	int dquot_freed_blocks;
--
--	sb = inode->i_sb;
--	if (!sb) {
--		printk ("ext3_free_blocks: nonexistent device");
--		return;
--	}
--	ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
--	if (dquot_freed_blocks)
--		DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
--	return;
--}
--
- /*
-  * For ext3 allocations, we must not reuse any blocks which are
-  * allocated in the bitmap buffer's "last committed data" copy.  This
-@@ -1162,7 +1144,7 @@ int ext3_should_retry_alloc(struct super
-  * bitmap, and then for any free bit if that fails.
-  * This function also updates quota and i_blocks field.
-  */
--int ext3_new_block(handle_t *handle, struct inode *inode,
-+int ext3_new_block_old(handle_t *handle, struct inode *inode,
- 			unsigned long goal, int *errp)
- {
- 	struct buffer_head *bitmap_bh = NULL;
-Index: linux-2.6.12.6-bull/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/xattr.c	2005-08-29 20:55:27.000000000 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/xattr.c	2006-04-29 20:39:10.000000000 +0400
-@@ -484,7 +484,7 @@ ext3_xattr_release_block(handle_t *handl
- 		ea_bdebug(bh, "refcount now=0; freeing");
- 		if (ce)
- 			mb_cache_entry_free(ce);
--		ext3_free_blocks(handle, inode, bh->b_blocknr, 1);
-+		ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1);
- 		get_bh(bh);
- 		ext3_forget(handle, 1, inode, bh, bh->b_blocknr);
- 	} else {
-@@ -804,7 +804,7 @@ inserted:
- 			new_bh = sb_getblk(sb, block);
- 			if (!new_bh) {
- getblk_failed:
--				ext3_free_blocks(handle, inode, block, 1);
-+				ext3_free_blocks(handle, inode, block, 1, 1);
- 				error = -EIO;
- 				goto cleanup;
- 			}
-Index: linux-2.6.12.6-bull/fs/ext3/mballoc.c
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/mballoc.c	2006-04-22 17:31:47.543334750 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/mballoc.c	2006-04-30 01:24:11.000000000 +0400
-@@ -0,0 +1,2725 @@
-+/*
-+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+
-+/*
-+ * mballoc.c contains the multiblocks allocation routines
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/time.h>
-+#include <linux/fs.h>
-+#include <linux/namei.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/quotaops.h>
-+#include <linux/buffer_head.h>
-+#include <linux/module.h>
-+#include <linux/swap.h>
-+#include <linux/proc_fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/seq_file.h>
-+
-+/*
-+ * TODO:
-+ *   - bitmap read-ahead (proposed by Oleg Drokin aka green)
-+ *   - track min/max extents in each group for better group selection
-+ *   - mb_mark_used() may allocate chunk right after splitting buddy
-+ *   - special flag to advice allocator to look for requested + N blocks
-+ *     this may improve interaction between extents and mballoc
-+ *   - tree of groups sorted by number of free blocks
-+ *   - percpu reservation code (hotpath)
-+ *   - error handling
-+ */
-+
-+/*
-+ * with AGRESSIVE_CHECK allocator runs consistency checks over
-+ * structures. these checks slow things down a lot
-+ */
-+#define AGGRESSIVE_CHECK__
-+
-+/*
-+ */
-+#define MB_DEBUG__
-+#ifdef MB_DEBUG
-+#define mb_debug(fmt,a...)	printk(fmt, ##a)
-+#else
-+#define mb_debug(fmt,a...)
-+#endif
-+
-+/*
-+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory
-+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history
-+ */
-+#define EXT3_MB_HISTORY
-+
-+/*
-+ * How long mballoc can look for a best extent (in found extents)
-+ */
-+long ext3_mb_max_to_scan = 500;
-+
-+/*
-+ * How long mballoc must look for a best extent
-+ */
-+long ext3_mb_min_to_scan = 30;
-+
-+/*
-+ * with 'ext3_mb_stats' allocator will collect stats that will be
-+ * shown at umount. The collecting costs though!
-+ */
-+
-+long ext3_mb_stats = 1;
-+
-+/*
-+ * for which requests use 2^N search using buddies
-+ */
-+long ext3_mb_order2_reqs = 8;
-+
-+#ifdef EXT3_BB_MAX_BLOCKS
-+#undef EXT3_BB_MAX_BLOCKS
-+#endif
-+#define EXT3_BB_MAX_BLOCKS	30
-+
-+struct ext3_free_metadata {
-+	unsigned short group;
-+	unsigned short num;
-+	unsigned short blocks[EXT3_BB_MAX_BLOCKS];
-+	struct list_head list;
-+};
-+
-+struct ext3_group_info {
-+	unsigned long	bb_state;
-+	unsigned long	bb_tid;
-+	struct ext3_free_metadata *bb_md_cur;
-+	unsigned short	bb_first_free;
-+	unsigned short	bb_free;
-+	unsigned short	bb_fragments;
-+	unsigned short	bb_counters[];
-+};
-+
-+
-+#define EXT3_GROUP_INFO_NEED_INIT_BIT	0
-+#define EXT3_GROUP_INFO_LOCKED_BIT	1
-+
-+#define EXT3_MB_GRP_NEED_INIT(grp)	\
-+	(test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state))
-+
-+struct ext3_free_extent {
-+	__u16 fe_start;
-+	__u16 fe_len;
-+	__u16 fe_group;
-+};
-+
-+struct ext3_allocation_context {
-+	struct super_block *ac_sb;
-+
-+	/* search goals */
-+	struct ext3_free_extent ac_g_ex;
-+
-+	/* the best found extent */
-+	struct ext3_free_extent ac_b_ex;
-+
-+	/* number of iterations done. we have to track to limit searching */
-+	unsigned long ac_ex_scanned;
-+	__u16 ac_groups_scanned;
-+	__u16 ac_found;
-+	__u16 ac_tail;
-+	__u16 ac_buddy;
-+	__u8 ac_status;
-+	__u8 ac_flags;		/* allocation hints */
-+	__u8 ac_criteria;
-+	__u8 ac_repeats;
-+	__u8 ac_2order;		/* if request is to allocate 2^N blocks and
-+				 * N > 0, the field stores N, otherwise 0 */
-+
-+	struct page *ac_buddy_page;
-+	struct page *ac_bitmap_page;
-+};
-+
-+#define AC_STATUS_CONTINUE	1
-+#define AC_STATUS_FOUND		2
-+#define AC_STATUS_BREAK		3
-+
-+struct ext3_mb_history {
-+	struct ext3_free_extent goal;	/* goal allocation */
-+	struct ext3_free_extent result;	/* result allocation */
-+	unsigned pid;
-+	unsigned ino;
-+	__u16 found;	/* how many extents have been found */
-+	__u16 groups;	/* how many groups have been scanned */
-+	__u16 tail;	/* what tail broke some buddy */
-+	__u16 buddy;	/* buddy the tail ^^^ broke */
-+	__u8 cr;	/* which phase the result extent was found at */
-+	__u8 merged;
-+};
-+
-+struct ext3_buddy {
-+	struct page *bd_buddy_page;
-+	void *bd_buddy;
-+	struct page *bd_bitmap_page;
-+	void *bd_bitmap;
-+	struct ext3_group_info *bd_info;
-+	struct super_block *bd_sb;
-+	__u16 bd_blkbits;
-+	__u16 bd_group;
-+};
-+#define EXT3_MB_BITMAP(e3b)	((e3b)->bd_bitmap)
-+#define EXT3_MB_BUDDY(e3b)	((e3b)->bd_buddy)
-+
-+#ifndef EXT3_MB_HISTORY
-+#define ext3_mb_store_history(sb,ino,ac)
-+#else
-+static void ext3_mb_store_history(struct super_block *, unsigned ino,
-+				struct ext3_allocation_context *ac);
-+#endif
-+
-+#define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
-+
-+static struct proc_dir_entry *proc_root_ext3;
-+
-+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
-+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
-+void ext3_mb_free_committed_blocks(struct super_block *);
-+
-+#if BITS_PER_LONG == 64
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 7UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~7UL);	\
-+}
-+#elif BITS_PER_LONG == 32
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 3UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~3UL);	\
-+}
-+#else
-+#error "how many bits you are?!"
-+#endif
-+
-+static inline int mb_test_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	return ext2_test_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline void mb_clear_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit(bit, addr);
-+}
-+
-+static inline void mb_clear_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline int mb_find_next_zero_bit(void *addr, int max, int start)
-+{
-+	int fix;
-+#if BITS_PER_LONG == 64
-+	fix = ((unsigned long) addr & 7UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~7UL);
-+#elif BITS_PER_LONG == 32
-+	fix = ((unsigned long) addr & 3UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~3UL);
-+#else
-+#error "how many bits you are?!"
-+#endif
-+	max += fix;
-+	start += fix;
-+	return ext2_find_next_zero_bit(addr, max, start) - fix;
-+}
-+
-+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max)
-+{
-+	char *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(max != NULL);
-+
-+	if (order > e3b->bd_blkbits + 1) {
-+		*max = 0;
-+		return NULL;
-+	}
-+
-+	/* at order 0 we see each particular block */
-+	*max = 1 << (e3b->bd_blkbits + 3);
-+	if (order == 0)
-+		return EXT3_MB_BITMAP(e3b);
-+
-+	bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order];
-+	*max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order];
-+
-+	return bb;
-+}
-+
-+#ifdef AGGRESSIVE_CHECK
-+
-+static void mb_check_buddy(struct ext3_buddy *e3b)
-+{
-+	int order = e3b->bd_blkbits + 1;
-+	int max, max2, i, j, k, count;
-+	int fragments = 0, fstart;
-+	void *buddy, *buddy2;
-+
-+	if (!test_opt(e3b->bd_sb, MBALLOC))
-+		return;
-+
-+	{
-+		static int mb_check_counter = 0;
-+		if (mb_check_counter++ % 300 != 0)
-+			return;
-+	}
-+
-+	while (order > 1) {
-+		buddy = mb_find_buddy(e3b, order, &max);
-+		J_ASSERT(buddy);
-+		buddy2 = mb_find_buddy(e3b, order - 1, &max2);
-+		J_ASSERT(buddy2);
-+		J_ASSERT(buddy != buddy2);
-+		J_ASSERT(max * 2 == max2);
-+
-+		count = 0;
-+		for (i = 0; i < max; i++) {
-+
-+			if (mb_test_bit(i, buddy)) {
-+				/* only single bit in buddy2 may be 1 */
-+				if (!mb_test_bit(i << 1, buddy2))
-+					J_ASSERT(mb_test_bit((i<<1)+1, buddy2));
-+				else if (!mb_test_bit((i << 1) + 1, buddy2))
-+					J_ASSERT(mb_test_bit(i << 1, buddy2));
-+				continue;
-+			}
-+
-+			/* both bits in buddy2 must be 0 */
-+			J_ASSERT(mb_test_bit(i << 1, buddy2));
-+			J_ASSERT(mb_test_bit((i << 1) + 1, buddy2));
-+
-+			for (j = 0; j < (1 << order); j++) {
-+				k = (i * (1 << order)) + j;
-+				J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b)));
-+			}
-+			count++;
-+		}
-+		J_ASSERT(e3b->bd_info->bb_counters[order] == count);
-+		order--;
-+	}
-+
-+	fstart = -1;
-+	buddy = mb_find_buddy(e3b, 0, &max);
-+	for (i = 0; i < max; i++) {
-+		if (!mb_test_bit(i, buddy)) {
-+			J_ASSERT(i >= e3b->bd_info->bb_first_free);
-+			if (fstart == -1) {
-+				fragments++;
-+				fstart = i;
-+			}
-+			continue;
-+		}
-+		fstart = -1;
-+		/* check used bits only */
-+		for (j = 0; j < e3b->bd_blkbits + 1; j++) {
-+			buddy2 = mb_find_buddy(e3b, j, &max2);
-+			k = i >> j;
-+			J_ASSERT(k < max2);
-+			J_ASSERT(mb_test_bit(k, buddy2));
-+		}
-+	}
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info));
-+	J_ASSERT(e3b->bd_info->bb_fragments == fragments);
-+}
-+
-+#else
-+#define mb_check_buddy(e3b)
-+#endif
-+
-+/* find most significant bit */
-+static int inline fmsb(unsigned short word)
-+{
-+	int order;
-+
-+	if (word > 255) {
-+		order = 7;
-+		word >>= 8;
-+	} else {
-+		order = -1;
-+	}
-+
-+	do {
-+		order++;
-+		word >>= 1;
-+	} while (word != 0);
-+
-+	return order;
-+}
-+
-+static void inline
-+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first,
-+				int len, struct ext3_group_info *grp)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	unsigned short min, max, chunk, border;
-+
-+	mb_debug("mark %u/%u free\n", first, len);
-+	J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	border = 2 << sb->s_blocksize_bits;
-+
-+	while (len > 0) {
-+		/* find how many blocks can be covered since this position */
-+		max = ffs(first | border) - 1;
-+
-+		/* find how many blocks of power 2 we need to mark */
-+		min = fmsb(len);
-+
-+		mb_debug("  %u/%u -> max %u, min %u\n",
-+			first & ((2 << sb->s_blocksize_bits) - 1),
-+			len, max, min);
-+
-+		if (max < min)
-+			min = max;
-+		chunk = 1 << min;
-+
-+		/* mark multiblock chunks only */
-+		grp->bb_counters[min]++;
-+		if (min > 0) {
-+			mb_debug("    set %u at %u \n", first >> min,
-+				sbi->s_mb_offsets[min]);
-+			mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]);
-+		}
-+
-+		len -= chunk;
-+		first += chunk;
-+	}
-+}
-+
-+static void
-+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap,
-+			int group)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group);
-+	unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
-+	unsigned short i = 0, first, len;
-+	unsigned free = 0, fragments = 0;
-+	unsigned long long period = get_cycles();
-+
-+	i = mb_find_next_zero_bit(bitmap, max, 0);
-+	grp->bb_first_free = i;
-+	while (i < max) {
-+		fragments++;
-+		first = i;
-+		i = ext2_find_next_le_bit(bitmap, max, i);
-+		len = i - first;
-+		free += len;
-+		if (len > 1)
-+			ext3_mb_mark_free_simple(sb, buddy, first, len, grp);
-+		else
-+			grp->bb_counters[0]++;
-+		if (i < max)
-+			i = mb_find_next_zero_bit(bitmap, max, i);
-+	}
-+	grp->bb_fragments = fragments;
-+
-+	/* bb_state shouldn't being modified because all
-+	 * others waits for init completion on page lock */
-+	clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state);
-+	if (free != grp->bb_free) {
-+		printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n",
-+			group, free, grp->bb_free);
-+		grp->bb_free = free;
-+	}
-+
-+	period = get_cycles() - period;
-+	spin_lock(&EXT3_SB(sb)->s_bal_lock);
-+	EXT3_SB(sb)->s_mb_buddies_generated++;
-+	EXT3_SB(sb)->s_mb_generation_time += period;
-+	spin_unlock(&EXT3_SB(sb)->s_bal_lock);
-+}
-+
-+static int ext3_mb_init_cache(struct page *page)
-+{
-+	int blocksize, blocks_per_page, groups_per_page;
-+	int err = 0, i, first_group, first_block;
-+	struct super_block *sb;
-+	struct buffer_head *bhs;
-+	struct buffer_head **bh;
-+	struct inode *inode;
-+	char *data, *bitmap;
-+
-+	mb_debug("init page %lu\n", page->index);
-+
-+	inode = page->mapping->host;
-+	sb = inode->i_sb;
-+	blocksize = 1 << inode->i_blkbits;
-+	blocks_per_page = PAGE_CACHE_SIZE / blocksize;
-+
-+	groups_per_page = blocks_per_page >> 1;
-+	if (groups_per_page == 0)
-+		groups_per_page = 1;
-+
-+	/* allocate buffer_heads to read bitmaps */
-+	if (groups_per_page > 1) {
-+		err = -ENOMEM;
-+		i = sizeof(struct buffer_head *) * groups_per_page;
-+		bh = kmalloc(i, GFP_NOFS);
-+		if (bh == NULL)
-+			goto out;
-+		memset(bh, 0, i);
-+	} else
-+		bh = &bhs;
-+
-+	first_group = page->index * blocks_per_page / 2;
-+
-+	/* read all groups the page covers into the cache */
-+	for (i = 0; i < groups_per_page; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		if (first_group + i >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		err = -EIO;
-+		desc = ext3_get_group_desc(sb, first_group + i, NULL);
-+		if (desc == NULL)
-+			goto out;
-+
-+		err = -ENOMEM;
-+		bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap));
-+		if (bh[i] == NULL)
-+			goto out;
-+
-+		if (buffer_uptodate(bh[i]))
-+			continue;
-+
-+		lock_buffer(bh[i]);
-+		if (buffer_uptodate(bh[i])) {
-+			unlock_buffer(bh[i]);
-+			continue;
-+		}
-+
-+		get_bh(bh[i]);
-+		bh[i]->b_end_io = end_buffer_read_sync;
-+		submit_bh(READ, bh[i]);
-+		mb_debug("read bitmap for group %u\n", first_group + i);
-+	}
-+
-+	/* wait for I/O completion */
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		wait_on_buffer(bh[i]);
-+
-+	err = -EIO;
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		if (!buffer_uptodate(bh[i]))
-+			goto out;
-+
-+	first_block = page->index * blocks_per_page;
-+	for (i = 0; i < blocks_per_page; i++) {
-+		int group;
-+
-+		group = (first_block + i) >> 1;
-+		if (group >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		data = page_address(page) + (i * blocksize);
-+		bitmap = bh[group - first_group]->b_data;
-+
-+		if ((first_block + i) & 1) {
-+			/* this is block of buddy */
-+			mb_debug("put buddy for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memset(data, 0xff, blocksize);
-+			EXT3_GROUP_INFO(sb, group)->bb_fragments = 0;
-+			memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0,
-+			       sizeof(unsigned short)*(sb->s_blocksize_bits+2));
-+			ext3_mb_generate_buddy(sb, data, bitmap, group);
-+		} else {
-+			/* this is block of bitmap */
-+			mb_debug("put bitmap for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memcpy(data, bitmap, blocksize);
-+		}
-+	}
-+	SetPageUptodate(page);
-+
-+out:
-+	if (bh) {
-+		for (i = 0; i < groups_per_page && bh[i]; i++)
-+			brelse(bh[i]);
-+		if (bh != &bhs)
-+			kfree(bh);
-+	}
-+	return err;
-+}
-+
-+static int ext3_mb_load_buddy(struct super_block *sb, int group,
-+		struct ext3_buddy *e3b)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *inode = sbi->s_buddy_cache;
-+	int blocks_per_page, block, pnum, poff;
-+	struct page *page;
-+
-+	mb_debug("load group %u\n", group);
-+
-+	blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
-+
-+	e3b->bd_blkbits = sb->s_blocksize_bits;
-+	e3b->bd_info = EXT3_GROUP_INFO(sb, group);
-+	e3b->bd_sb = sb;
-+	e3b->bd_group = group;
-+	e3b->bd_buddy_page = NULL;
-+	e3b->bd_bitmap_page = NULL;
-+
-+	block = group * 2;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	/* we could use find_or_create_page(), but it locks page
-+	 * what we'd like to avoid in fast path ... */
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_bitmap_page = page;
-+	e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	block++;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_buddy_page = page;
-+	e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	return 0;
-+
-+err:
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+	e3b->bd_buddy = NULL;
-+	e3b->bd_bitmap = NULL;
-+	return -EIO;
-+}
-+
-+static void ext3_mb_release_desc(struct ext3_buddy *e3b)
-+{
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+}
-+
-+
-+static inline void
-+ext3_lock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT,
-+		      &EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static inline void
-+ext3_unlock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT,
-+			&EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block)
-+{
-+	int order = 1;
-+	void *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(block < (1 << (e3b->bd_blkbits + 3)));
-+
-+	bb = EXT3_MB_BUDDY(e3b);
-+	while (order <= e3b->bd_blkbits + 1) {
-+		block = block >> 1;
-+		if (!mb_test_bit(block, bb)) {
-+			/* this block is part of buddy of order 'order' */
-+			return order;
-+		}
-+		bb += 1 << (e3b->bd_blkbits - order);
-+		order++;
-+	}
-+	return 0;
-+}
-+
-+static inline void mb_clear_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_clear_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static inline void mb_set_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0xffffffff;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_set_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count)
-+{
-+	int block = 0, max = 0, order;
-+	void *buddy, *buddy2;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free += count;
-+	if (first < e3b->bd_info->bb_first_free)
-+		e3b->bd_info->bb_first_free = first;
-+
-+	/* let's maintain fragments counter */
-+	if (first != 0)
-+		block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b));
-+	if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b));
-+	if (block && max)
-+		e3b->bd_info->bb_fragments--;
-+	else if (!block && !max)
-+		e3b->bd_info->bb_fragments++;
-+
-+	/* let's maintain buddy itself */
-+	while (count-- > 0) {
-+		block = first++;
-+		order = 0;
-+
-+		J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b)));
-+		mb_clear_bit(block, EXT3_MB_BITMAP(e3b));
-+		e3b->bd_info->bb_counters[order]++;
-+
-+		/* start of the buddy */
-+		buddy = mb_find_buddy(e3b, order, &max);
-+
-+		do {
-+			block &= ~1UL;
-+			if (mb_test_bit(block, buddy) ||
-+					mb_test_bit(block + 1, buddy))
-+				break;
-+
-+			/* both the buddies are free, try to coalesce them */
-+			buddy2 = mb_find_buddy(e3b, order + 1, &max);
-+
-+			if (!buddy2)
-+				break;
-+
-+			if (order > 0) {
-+				/* for special purposes, we don't set
-+				 * free bits in bitmap */
-+				mb_set_bit(block, buddy);
-+				mb_set_bit(block + 1, buddy);
-+			}
-+			e3b->bd_info->bb_counters[order]--;
-+			e3b->bd_info->bb_counters[order]--;
-+
-+			block = block >> 1;
-+			order++;
-+			e3b->bd_info->bb_counters[order]++;
-+
-+			mb_clear_bit(block, buddy2);
-+			buddy = buddy2;
-+		} while (1);
-+	}
-+	mb_check_buddy(e3b);
-+
-+	return 0;
-+}
-+
-+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block,
-+				int needed, struct ext3_free_extent *ex)
-+{
-+	int next = block, max, ord;
-+	void *buddy;
-+
-+	J_ASSERT(ex != NULL);
-+
-+	buddy = mb_find_buddy(e3b, order, &max);
-+	J_ASSERT(buddy);
-+	J_ASSERT(block < max);
-+	if (mb_test_bit(block, buddy)) {
-+		ex->fe_len = 0;
-+		ex->fe_start = 0;
-+		ex->fe_group = 0;
-+		return 0;
-+	}
-+
-+	if (likely(order == 0)) {
-+		/* find actual order */
-+		order = mb_find_order_for_block(e3b, block);
-+		block = block >> order;
-+	}
-+
-+	ex->fe_len = 1 << order;
-+	ex->fe_start = block << order;
-+	ex->fe_group = e3b->bd_group;
-+
-+	/* calc difference from given start */
-+	next = next - ex->fe_start;
-+	ex->fe_len -= next;
-+	ex->fe_start += next;
-+
-+	while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) {
-+
-+		if (block + 1 >= max)
-+			break;
-+
-+		next = (block + 1) * (1 << order);
-+		if (mb_test_bit(next, EXT3_MB_BITMAP(e3b)))
-+			break;
-+
-+		ord = mb_find_order_for_block(e3b, next);
-+
-+		order = ord;
-+		block = next >> order;
-+		ex->fe_len += 1 << order;
-+	}
-+
-+	J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3)));
-+	return ex->fe_len;
-+}
-+
-+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex)
-+{
-+	int ord, mlen = 0, max = 0, cur;
-+	int start = ex->fe_start;
-+	int len = ex->fe_len;
-+	unsigned ret = 0;
-+	int len0 = len;
-+	void *buddy;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free -= len;
-+	if (e3b->bd_info->bb_first_free == start)
-+		e3b->bd_info->bb_first_free += len;
-+
-+	/* let's maintain fragments counter */
-+	if (start != 0)
-+		mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b));
-+	if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b));
-+	if (mlen && max)
-+		e3b->bd_info->bb_fragments++;
-+	else if (!mlen && !max)
-+		e3b->bd_info->bb_fragments--;
-+
-+	/* let's maintain buddy itself */
-+	while (len) {
-+		ord = mb_find_order_for_block(e3b, start);
-+
-+		if (((start >> ord) << ord) == start && len >= (1 << ord)) {
-+			/* the whole chunk may be allocated at once! */
-+			mlen = 1 << ord;
-+			buddy = mb_find_buddy(e3b, ord, &max);
-+			J_ASSERT((start >> ord) < max);
-+			mb_set_bit(start >> ord, buddy);
-+			e3b->bd_info->bb_counters[ord]--;
-+			start += mlen;
-+			len -= mlen;
-+			J_ASSERT(len >= 0);
-+			continue;
-+		}
-+
-+		/* store for history */
-+		if (ret == 0)
-+			ret = len | (ord << 16);
-+
-+		/* we have to split large buddy */
-+		J_ASSERT(ord > 0);
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_set_bit(start >> ord, buddy);
-+		e3b->bd_info->bb_counters[ord]--;
-+
-+		ord--;
-+		cur = (start >> ord) & ~1U;
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_clear_bit(cur, buddy);
-+		mb_clear_bit(cur + 1, buddy);
-+		e3b->bd_info->bb_counters[ord]++;
-+		e3b->bd_info->bb_counters[ord]++;
-+	}
-+
-+	/* now drop all the bits in bitmap */
-+	mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
-+
-+	mb_check_buddy(e3b);
-+
-+	return ret;
-+}
-+
-+/*
-+ * Must be called under group lock!
-+ */
-+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	unsigned long ret;
-+
-+	ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len);
-+	ret = mb_mark_used(e3b, &ac->ac_b_ex);
-+
-+	ac->ac_status = AC_STATUS_FOUND;
-+	ac->ac_tail = ret & 0xffff;
-+	ac->ac_buddy = ret >> 16;
-+
-+	/* hold in-core structures until allocated
-+	 * blocks are marked non-free in on-disk bitmap */
-+	ac->ac_buddy_page = e3b->bd_buddy_page;
-+	page_cache_get(e3b->bd_buddy_page);
-+	ac->ac_bitmap_page = e3b->bd_bitmap_page;
-+	page_cache_get(e3b->bd_bitmap_page);
-+}
-+
-+/*
-+ * The routine checks whether found extent is good enough. If it is,
-+ * then the extent gets marked used and flag is set to the context
-+ * to stop scanning. Otherwise, the extent is compared with the
-+ * previous found extent and if new one is better, then it's stored
-+ * in the context. Later, the best found extent will be used, if
-+ * mballoc can't find good enough extent.
-+ *
-+ * FIXME: real allocation policy is to be designed yet!
-+ */
-+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac,
-+					struct ext3_free_extent *ex,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent *bex = &ac->ac_b_ex;
-+	struct ext3_free_extent *gex = &ac->ac_g_ex;
-+
-+	J_ASSERT(ex->fe_len > 0);
-+	J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+	J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+
-+	ac->ac_found++;
-+
-+	/*
-+	 * The special case - take what you catch first
-+	 */
-+	if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * Let's check whether the chunk is good enough
-+	 */
-+	if (ex->fe_len == gex->fe_len) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * If this is first found extent, just store it in the context
-+	 */
-+	if (bex->fe_len == 0) {
-+		*bex = *ex;
-+		return;
-+	}
-+
-+	/*
-+	 * If new found extent is better, store it in the context
-+	 */
-+	if (bex->fe_len < gex->fe_len) {
-+		/* if the request isn't satisfied, any found extent
-+		 * larger than previous best one is better */
-+		if (ex->fe_len > bex->fe_len)
-+			*bex = *ex;
-+	} else if (ex->fe_len > gex->fe_len) {
-+		/* if the request is satisfied, then we try to find
-+		 * an extent that still satisfy the request, but is
-+		 * smaller than previous one */
-+		*bex = *ex;
-+	}
-+
-+	/*
-+	 * Let's scan at least few extents and don't pick up a first one
-+	 */
-+	if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+
-+	/*
-+	 * We don't want to scan for a whole year
-+	 */
-+	if (ac->ac_found > ext3_mb_max_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+}
-+
-+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent ex = ac->ac_b_ex;
-+	int group = ex.fe_group, max, err;
-+
-+	J_ASSERT(ex.fe_len > 0);
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex);
-+
-+	if (max > 0) {
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac,
-+				struct ext3_buddy *e3b)
-+{
-+	int group = ac->ac_g_ex.fe_group, max, err;
-+	struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb);
-+	struct ext3_super_block *es = sbi->s_es;
-+	struct ext3_free_extent ex;
-+
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start,
-+			     ac->ac_g_ex.fe_len, &ex);
-+
-+	if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) {
-+		unsigned long start;
-+		start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) +
-+			ex.fe_start + le32_to_cpu(es->s_first_data_block));
-+		if (start % sbi->s_stripe == 0) {
-+			ac->ac_found++;
-+			ac->ac_b_ex = ex;
-+			ext3_mb_use_best_found(ac, e3b);
-+		}
-+	} else if (max >= ac->ac_g_ex.fe_len) {
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	} else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) {
-+		/* Sometimes, caller may want to merge even small
-+		 * number of blocks to an existing extent */
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+/*
-+ * The routine scans buddy structures (not bitmap!) from given order
-+ * to max order and tries to find big enough chunk to satisfy the req
-+ */
-+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_group_info *grp = e3b->bd_info;
-+	void *buddy;
-+	int i, k, max;
-+
-+	J_ASSERT(ac->ac_2order > 0);
-+	for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) {
-+		if (grp->bb_counters[i] == 0)
-+			continue;
-+
-+		buddy = mb_find_buddy(e3b, i, &max);
-+		if (buddy == NULL) {
-+			printk(KERN_ALERT "looking for wrong order?\n");
-+			break;
-+		}
-+
-+		k = mb_find_next_zero_bit(buddy, max, 0);
-+		J_ASSERT(k < max);
-+
-+		ac->ac_found++;
-+
-+		ac->ac_b_ex.fe_len = 1 << i;
-+		ac->ac_b_ex.fe_start = k << i;
-+		ac->ac_b_ex.fe_group = e3b->bd_group;
-+
-+		ext3_mb_use_best_found(ac, e3b);
-+		J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len);
-+
-+		if (unlikely(ext3_mb_stats))
-+			atomic_inc(&EXT3_SB(sb)->s_bal_2orders);
-+
-+		break;
-+	}
-+}
-+
-+/*
-+ * The routine scans the group and measures all found extents.
-+ * In order to optimize scanning, caller must pass number of
-+ * free blocks in the group, so the routine can know upper limit.
-+ */
-+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	int i, free;
-+
-+	free = e3b->bd_info->bb_free;
-+	J_ASSERT(free > 0);
-+
-+	i = e3b->bd_info->bb_first_free;
-+
-+	while (free && ac->ac_status == AC_STATUS_CONTINUE) {
-+		i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i);
-+		if (i >= sb->s_blocksize * 8) {
-+			J_ASSERT(free == 0);
-+			break;
-+		}
-+
-+		mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex);
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(free >= ex.fe_len);
-+
-+		ext3_mb_measure_extent(ac, &ex, e3b);
-+
-+		i += ex.fe_len;
-+		free -= ex.fe_len;
-+	}
-+}
-+
-+/*
-+ * This is a special case for storages like raid5
-+ * we try to find stripe-aligned chunks for stripe-size requests
-+ */
-+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac,
-+				 struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	unsigned long i, max;
-+
-+	J_ASSERT(sbi->s_stripe != 0);
-+
-+	/* find first stripe-aligned block */
-+	i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) +
-+		le32_to_cpu(sbi->s_es->s_first_data_block);
-+	i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe;
-+	i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) %
-+		EXT3_BLOCKS_PER_GROUP(sb);
-+
-+	while (i < sb->s_blocksize * 8) {
-+		if (!mb_test_bit(i, bitmap)) {
-+			max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex);
-+			if (max >= sbi->s_stripe) {
-+				ac->ac_found++;
-+				ac->ac_b_ex = ex;
-+				ext3_mb_use_best_found(ac, e3b);
-+				break;
-+			}
-+		}
-+		i += sbi->s_stripe;
-+	}
-+}
-+
-+static int ext3_mb_good_group(struct ext3_allocation_context *ac,
-+				int group, int cr)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group);
-+	unsigned free, fragments, i, bits;
-+
-+	J_ASSERT(cr >= 0 && cr < 4);
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp));
-+
-+	free = grp->bb_free;
-+	fragments = grp->bb_fragments;
-+	if (free == 0)
-+		return 0;
-+	if (fragments == 0)
-+		return 0;
-+
-+	switch (cr) {
-+		case 0:
-+			J_ASSERT(ac->ac_2order != 0);
-+			bits = ac->ac_sb->s_blocksize_bits + 1;
-+			for (i = ac->ac_2order; i <= bits; i++)
-+				if (grp->bb_counters[i] > 0)
-+					return 1;
-+			break;
-+		case 1:
-+			if ((free / fragments) >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 2:
-+			if (free >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 3:
-+			return 1;
-+		default:
-+			BUG();
-+	}
-+
-+	return 0;
-+}
-+
-+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode,
-+		       unsigned long goal, int *len, int flags, int *errp)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_allocation_context ac;
-+	int i, group, block, cr, err = 0;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	struct buffer_head *gdp_bh;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+
-+	J_ASSERT(len != NULL);
-+	J_ASSERT(*len > 0);
-+
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk("ext3_mb_new_nblocks: nonexistent device");
-+		return 0;
-+	}
-+
-+	if (!test_opt(sb, MBALLOC)) {
-+		static int ext3_mballoc_warning = 0;
-+		if (ext3_mballoc_warning == 0) {
-+			printk(KERN_ERR "EXT3-fs: multiblock request with "
-+				"mballoc disabled!\n");
-+			ext3_mballoc_warning++;
-+		}
-+		*len = 1;
-+		err = ext3_new_block_old(handle, inode, goal, errp);
-+		return err;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+
-+	/*
-+	 * We can't allocate > group size
-+	 */
-+	if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10)
-+		*len = EXT3_BLOCKS_PER_GROUP(sb) - 10;
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* someone asks for non-reserved blocks */
-+		BUG_ON(*len > 1);
-+		err = ext3_mb_reserve_blocks(sb, 1);
-+		if (err) {
-+			*errp = err;
-+			return 0;
-+		}
-+	}
-+
-+	ac.ac_buddy_page = NULL;
-+	ac.ac_bitmap_page = NULL;
-+
-+	/*
-+	 * Check quota for allocation of this blocks.
-+	 */
-+	while (*len && DQUOT_ALLOC_BLOCK(inode, *len))
-+		*len -= 1;
-+	if (*len == 0) {
-+		*errp = -EDQUOT;
-+		block = 0;
-+		goto out;
-+	}
-+
-+	/* start searching from the goal */
-+	if (goal < le32_to_cpu(es->s_first_data_block) ||
-+	    goal >= le32_to_cpu(es->s_blocks_count))
-+		goal = le32_to_cpu(es->s_first_data_block);
-+	group = (goal - le32_to_cpu(es->s_first_data_block)) /
-+			EXT3_BLOCKS_PER_GROUP(sb);
-+	block = ((goal - le32_to_cpu(es->s_first_data_block)) %
-+			EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	/* set up allocation goals */
-+	ac.ac_b_ex.fe_group = 0;
-+	ac.ac_b_ex.fe_start = 0;
-+	ac.ac_b_ex.fe_len = 0;
-+	ac.ac_status = AC_STATUS_CONTINUE;
-+	ac.ac_groups_scanned = 0;
-+	ac.ac_ex_scanned = 0;
-+	ac.ac_found = 0;
-+	ac.ac_sb = inode->i_sb;
-+	ac.ac_g_ex.fe_group = group;
-+	ac.ac_g_ex.fe_start = block;
-+	ac.ac_g_ex.fe_len = *len;
-+	ac.ac_flags = flags;
-+	ac.ac_2order = 0;
-+	ac.ac_criteria = 0;
-+
-+	if (*len == 1 && sbi->s_stripe) {
-+		/* looks like a metadata, let's use a dirty hack for raid5
-+		 * move all metadata in first groups in hope to hit cached
-+		 * sectors and thus avoid read-modify cycles in raid5 */
-+		ac.ac_g_ex.fe_group = group = 0;
-+	}
-+
-+	/* probably, the request is for 2^8+ blocks (1/2/3/... MB) */
-+	i = ffs(*len);
-+	if (i >= ext3_mb_order2_reqs) {
-+		i--;
-+		if ((*len & (~(1 << i))) == 0)
-+			ac.ac_2order = i;
-+	}
-+
-+	/* first, try the goal */
-+	err = ext3_mb_find_by_goal(&ac, &e3b);
-+	if (err)
-+		goto out_err;
-+	if (ac.ac_status == AC_STATUS_FOUND)
-+		goto found;
-+
-+	/* Let's just scan groups to find more-less suitable blocks */
-+	cr = ac.ac_2order ? 0 : 1;
-+repeat:
-+	for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) {
-+		ac.ac_criteria = cr;
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) {
-+			if (group == EXT3_SB(sb)->s_groups_count)
-+				group = 0;
-+
-+			if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) {
-+				/* we need full data about the group
-+				 * to make a good selection */
-+				err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+				if (err)
-+					goto out_err;
-+				ext3_mb_release_desc(&e3b);
-+			}
-+
-+			/* check is group good for our criteries */
-+			if (!ext3_mb_good_group(&ac, group, cr))
-+				continue;
-+
-+			err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+			if (err)
-+				goto out_err;
-+
-+			ext3_lock_group(sb, group);
-+			if (!ext3_mb_good_group(&ac, group, cr)) {
-+				/* someone did allocation from this group */
-+				ext3_unlock_group(sb, group);
-+				ext3_mb_release_desc(&e3b);
-+				continue;
-+			}
-+
-+			ac.ac_groups_scanned++;
-+			if (cr == 0)
-+				ext3_mb_simple_scan_group(&ac, &e3b);
-+			else if (cr == 1 && *len == sbi->s_stripe)
-+				ext3_mb_scan_aligned(&ac, &e3b);
-+			else
-+				ext3_mb_complex_scan_group(&ac, &e3b);
-+
-+			ext3_unlock_group(sb, group);
-+
-+			ext3_mb_release_desc(&e3b);
-+
-+			if (ac.ac_status != AC_STATUS_CONTINUE)
-+				break;
-+		}
-+	}
-+
-+	if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND &&
-+	    !(ac.ac_flags & EXT3_MB_HINT_FIRST)) {
-+		/*
-+		 * We've been searching too long. Let's try to allocate
-+		 * the best chunk we've found so far
-+		 */
-+
-+		/*if (ac.ac_found > ext3_mb_max_to_scan)
-+			printk(KERN_DEBUG "EXT3-fs: too long searching at "
-+				"%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len,
-+				ac.ac_g_ex.fe_len);*/
-+		ext3_mb_try_best_found(&ac, &e3b);
-+		if (ac.ac_status != AC_STATUS_FOUND) {
-+			/*
-+			 * Someone more lucky has already allocated it.
-+			 * The only thing we can do is just take first
-+			 * found block(s)
-+			printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n");
-+			 */
-+			ac.ac_b_ex.fe_group = 0;
-+			ac.ac_b_ex.fe_start = 0;
-+			ac.ac_b_ex.fe_len = 0;
-+			ac.ac_status = AC_STATUS_CONTINUE;
-+			ac.ac_flags |= EXT3_MB_HINT_FIRST;
-+			cr = 3;
-+			goto repeat;
-+		}
-+	}
-+
-+	if (ac.ac_status != AC_STATUS_FOUND) {
-+		/*
-+		 * We aren't lucky definitely
-+		 */
-+		DQUOT_FREE_BLOCK(inode, *len);
-+		*errp = -ENOSPC;
-+		block = 0;
-+#if 1
-+		printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n",
-+			ac.ac_status, ac.ac_flags);
-+		printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n",
-+			ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group,
-+			ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr);
-+		printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n",
-+			sbi->s_blocks_reserved, ac.ac_found);
-+		printk("EXT3-fs: groups: ");
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++)
-+			printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free);
-+		printk("\n");
-+#endif
-+		goto out;
-+	}
-+
-+found:
-+	J_ASSERT(ac.ac_b_ex.fe_len > 0);
-+
-+	/* good news - free block(s) have been found. now it's time
-+	 * to mark block(s) in good old journaled bitmap */
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	/* we made a desicion, now mark found blocks in good old
-+	 * bitmap to be journaled */
-+
-+	ext3_debug("using block group %d(%d)\n",
-+			ac.ac_b_group.group, gdp->bg_free_blocks_count);
-+
-+	bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group);
-+	if (!bitmap_bh) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err) {
-+		*errp = err;
-+		goto out_err;
-+	}
-+
-+	gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh);
-+	if (!gdp) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	if (block == le32_to_cpu(gdp->bg_block_bitmap) ||
-+	    block == le32_to_cpu(gdp->bg_inode_bitmap) ||
-+	    in_range(block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error(sb, "ext3_new_block",
-+			    "Allocating block in system zone - "
-+			    "block = %u", block);
-+#ifdef AGGRESSIVE_CHECK
-+	for (i = 0; i < ac.ac_b_ex.fe_len; i++)
-+		J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data));
-+#endif
-+	mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len);
-+
-+	spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	gdp->bg_free_blocks_count =
-+			cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)
-+					- ac.ac_b_ex.fe_len);
-+	spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len);
-+
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+	if (err)
-+		goto out_err;
-+	err = ext3_journal_dirty_metadata(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	sb->s_dirt = 1;
-+	*errp = 0;
-+	brelse(bitmap_bh);
-+
-+	/* drop non-allocated, but dquote'd blocks */
-+	J_ASSERT(*len >= ac.ac_b_ex.fe_len);
-+	DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len);
-+
-+	*len = ac.ac_b_ex.fe_len;
-+	J_ASSERT(*len > 0);
-+	J_ASSERT(block != 0);
-+	goto out;
-+
-+out_err:
-+	/* if we've already allocated something, roll it back */
-+	if (ac.ac_status == AC_STATUS_FOUND) {
-+		/* FIXME: free blocks here */
-+	}
-+
-+	DQUOT_FREE_BLOCK(inode, *len);
-+	brelse(bitmap_bh);
-+	*errp = err;
-+	block = 0;
-+out:
-+	if (ac.ac_buddy_page)
-+		page_cache_release(ac.ac_buddy_page);
-+	if (ac.ac_bitmap_page)
-+		page_cache_release(ac.ac_bitmap_page);
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* block wasn't reserved before and we reserved it
-+		 * at the beginning of allocation. it doesn't matter
-+		 * whether we allocated anything or we failed: time
-+		 * to release reservation. NOTE: because I expect
-+		 * any multiblock request from delayed allocation
-+		 * path only, here is single block always */
-+		ext3_mb_release_blocks(sb, 1);
-+	}
-+
-+	if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) {
-+		atomic_inc(&sbi->s_bal_reqs);
-+		atomic_add(*len, &sbi->s_bal_allocated);
-+		if (*len >= ac.ac_g_ex.fe_len)
-+			atomic_inc(&sbi->s_bal_success);
-+		atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned);
-+		if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start &&
-+				ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group)
-+			atomic_inc(&sbi->s_bal_goals);
-+		if (ac.ac_found > ext3_mb_max_to_scan)
-+			atomic_inc(&sbi->s_bal_breaks);
-+	}
-+
-+	ext3_mb_store_history(sb, inode->i_ino, &ac);
-+
-+	return block;
-+}
-+EXPORT_SYMBOL(ext3_mb_new_blocks);
-+
-+#ifdef EXT3_MB_HISTORY
-+struct ext3_mb_proc_session {
-+	struct ext3_mb_history *history;
-+	struct super_block *sb;
-+	int start;
-+	int max;
-+};
-+
-+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s,
-+					struct ext3_mb_history *hs,
-+					int first)
-+{
-+	if (hs == s->history + s->max)
-+		hs = s->history;
-+	if (!first && hs == s->history + s->start)
-+		return NULL;
-+	while (hs->goal.fe_len == 0) {
-+		hs++;
-+		if (hs == s->history + s->max)
-+			hs = s->history;
-+		if (hs == s->history + s->start)
-+			return NULL;
-+	}
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	if (!hs)
-+		return NULL;
-+	while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL);
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	else
-+		return ext3_mb_history_skip_empty(s, ++hs, 0);
-+}
-+
-+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct ext3_mb_history *hs = v;
-+	char buf[20], buf2[20];
-+
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n",
-+			 "pid", "inode", "goal", "result", "found", "grps", "cr",
-+			 "merge", "tail", "broken");
-+		return 0;
-+	}
-+
-+	sprintf(buf, "%u/%u/%u", hs->goal.fe_group,
-+		hs->goal.fe_start, hs->goal.fe_len);
-+	sprintf(buf2, "%u/%u/%u", hs->result.fe_group,
-+		hs->result.fe_start, hs->result.fe_len);
-+	seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n",
-+			hs->pid, hs->ino, buf, buf2, hs->found, hs->groups,
-+			hs->cr, hs->merged ? "M" : "", hs->tail,
-+			hs->buddy ? 1 << hs->buddy : 0);
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_history_ops = {
-+	.start  = ext3_mb_seq_history_start,
-+	.next   = ext3_mb_seq_history_next,
-+	.stop   = ext3_mb_seq_history_stop,
-+	.show   = ext3_mb_seq_history_show,
-+};
-+
-+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
-+	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(s->history, sbi->s_mb_history, size);
-+	s->max = sbi->s_mb_history_max;
-+	s->start = sbi->s_mb_history_cur % s->max;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+
-+	rc = seq_open(file, &ext3_mb_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->history);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct ext3_mb_proc_session *s = seq->private;
-+	kfree(s->history);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations ext3_mb_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_history_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= ext3_mb_seq_history_release,
-+};
-+
-+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+
-+	group = *pos + 1;
-+	return (void *) group;
-+}
-+
-+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	++*pos;
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+	group = *pos + 1;
-+	return (void *) group;;
-+}
-+
-+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v)
-+{
-+	struct super_block *sb = seq->private;
-+	long group = (long) v, i;
-+	struct sg {
-+		struct ext3_group_info info;
-+		unsigned short counters[16];
-+	} sg;
-+
-+	group--;
-+	if (group == 0)
-+		seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
-+			 "group", "free", "frags", "first", "2^0", "2^1", "2^2",
-+			 "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10",
-+			 "2^11", "2^12", "2^13");
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
-+		sizeof(struct ext3_group_info);
-+	ext3_lock_group(sb, group);
-+	memcpy(&sg, EXT3_GROUP_INFO(sb, group), i);
-+	ext3_unlock_group(sb, group);
-+
-+	if (EXT3_MB_GRP_NEED_INIT(&sg.info))
-+		return 0;
-+
-+	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free,
-+			sg.info.bb_fragments, sg.info.bb_first_free);
-+	for (i = 0; i <= 13; i++)
-+		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-+				sg.info.bb_counters[i] : 0);
-+	seq_printf(seq, " ]\n");
-+
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_groups_ops = {
-+	.start  = ext3_mb_seq_groups_start,
-+	.next   = ext3_mb_seq_groups_next,
-+	.stop   = ext3_mb_seq_groups_stop,
-+	.show   = ext3_mb_seq_groups_show,
-+};
-+
-+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	int rc;
-+
-+	rc = seq_open(file, &ext3_mb_seq_groups_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = sb;
-+	}
-+	return rc;
-+
-+}
-+
-+static struct file_operations ext3_mb_seq_groups_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_groups_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= seq_release,
-+};
-+
-+static void ext3_mb_history_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	remove_proc_entry("mb_groups", sbi->s_mb_proc);
-+	remove_proc_entry("mb_history", sbi->s_mb_proc);
-+	remove_proc_entry(name, proc_root_ext3);
-+
-+	if (sbi->s_mb_history)
-+		kfree(sbi->s_mb_history);
-+}
-+
-+static void ext3_mb_history_init(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+	int i;
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3);
-+	if (sbi->s_mb_proc != NULL) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_history_fops;
-+			p->data = sb;
-+		}
-+		p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_groups_fops;
-+			p->data = sb;
-+		}
-+	}
-+
-+	sbi->s_mb_history_max = 1000;
-+	sbi->s_mb_history_cur = 0;
-+	spin_lock_init(&sbi->s_mb_history_lock);
-+	i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history);
-+	sbi->s_mb_history = kmalloc(i, GFP_KERNEL);
-+	memset(sbi->s_mb_history, 0, i);
-+	/* if we can't allocate history, then we simple won't use it */
-+}
-+
-+static void
-+ext3_mb_store_history(struct super_block *sb, unsigned ino,
-+			struct ext3_allocation_context *ac)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_history h;
-+
-+	if (likely(sbi->s_mb_history == NULL))
-+		return;
-+
-+	h.pid = current->pid;
-+	h.ino = ino;
-+	h.goal = ac->ac_g_ex;
-+	h.result = ac->ac_b_ex;
-+	h.found = ac->ac_found;
-+	h.cr = ac->ac_criteria;
-+	h.groups = ac->ac_groups_scanned;
-+	h.tail = ac->ac_tail;
-+	h.buddy = ac->ac_buddy;
-+	h.merged = 0;
-+	if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&
-+			ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group)
-+		h.merged = 1;
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h));
-+	if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max)
-+		sbi->s_mb_history_cur = 0;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+}
-+
-+#else
-+#define ext3_mb_history_release(sb)
-+#define ext3_mb_history_init(sb)
-+#endif
-+
-+int ext3_mb_init_backend(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, j, len, metalen;
-+	int num_meta_group_infos =
-+		(sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+	struct ext3_group_info **meta_group_info;
-+
-+	/* An 8TB filesystem with 64-bit pointers requires a 4096 byte
-+	 * kmalloc. A 128kb malloc should suffice for a 256TB filesystem.
-+	 * So a two level scheme suffices for now. */
-+	sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) *
-+				    num_meta_group_infos, GFP_KERNEL);
-+	if (sbi->s_group_info == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n");
-+		return -ENOMEM;
-+	}
-+	sbi->s_buddy_cache = new_inode(sb);
-+	if (sbi->s_buddy_cache == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't get new inode\n");
-+		goto err_freesgi;
-+	}
-+
-+	metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb);
-+	for (i = 0; i < num_meta_group_infos; i++) {
-+		if ((i + 1) == num_meta_group_infos)
-+			metalen = sizeof(*meta_group_info) *
-+				(sbi->s_groups_count -
-+					(i << EXT3_DESC_PER_BLOCK_BITS(sb)));
-+		meta_group_info = kmalloc(metalen, GFP_KERNEL);
-+		if (meta_group_info == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate mem for a "
-+			       "buddy group\n");
-+			goto err_freemeta;
-+		}
-+		sbi->s_group_info[i] = meta_group_info;
-+	}
-+
-+	/*
-+	 * calculate needed size. if change bb_counters size,
-+	 * don't forget about ext3_mb_generate_buddy()
-+	 */
-+	len = sizeof(struct ext3_group_info);
-+	len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2);
-+	for (i = 0; i < sbi->s_groups_count; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		meta_group_info =
-+			sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)];
-+		j = i & (EXT3_DESC_PER_BLOCK(sb) - 1);
-+
-+		meta_group_info[j] = kmalloc(len, GFP_KERNEL);
-+		if (meta_group_info[j] == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n");
-+			i--;
-+			goto err_freebuddy;
-+		}
-+		desc = ext3_get_group_desc(sb, i, NULL);
-+		if (desc == NULL) {
-+			printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i);
-+			goto err_freebuddy;
-+		}
-+		memset(meta_group_info[j], 0, len);
-+		set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT,
-+			&meta_group_info[j]->bb_state);
-+		meta_group_info[j]->bb_free =
-+			le16_to_cpu(desc->bg_free_blocks_count);
-+	}
-+
-+	return 0;
-+
-+err_freebuddy:
-+	while (i >= 0) {
-+		kfree(EXT3_GROUP_INFO(sb, i));
-+		i--;
-+	}
-+	i = num_meta_group_infos;
-+err_freemeta:
-+	while (--i >= 0)
-+		kfree(sbi->s_group_info[i]);
-+	iput(sbi->s_buddy_cache);
-+err_freesgi:
-+	kfree(sbi->s_group_info);
-+	return -ENOMEM;
-+}
-+
-+int ext3_mb_init(struct super_block *sb, int needs_recovery)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *root = sb->s_root->d_inode;
-+	unsigned i, offset, max;
-+	struct dentry *dentry;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short);
-+
-+	sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_offsets == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		return -ENOMEM;
-+	}
-+	sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_maxs == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_maxs);
-+		return -ENOMEM;
-+	}
-+
-+	 /* order 0 is regular bitmap */
-+	sbi->s_mb_maxs[0] = sb->s_blocksize << 3;
-+	sbi->s_mb_offsets[0] = 0;
-+
-+	i = 1;
-+	offset = 0;
-+	max = sb->s_blocksize << 2;
-+	do {
-+		sbi->s_mb_offsets[i] = offset;
-+		sbi->s_mb_maxs[i] = max;
-+		offset += 1 << (sb->s_blocksize_bits - i);
-+		max = max >> 1;
-+		i++;
-+	} while (i <= sb->s_blocksize_bits + 1);
-+
-+	/* init file for buddy data */
-+	if ((i = ext3_mb_init_backend(sb))) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_offsets);
-+		kfree(sbi->s_mb_maxs);
-+		return i;
-+	}
-+
-+	spin_lock_init(&sbi->s_reserve_lock);
-+	spin_lock_init(&sbi->s_md_lock);
-+	INIT_LIST_HEAD(&sbi->s_active_transaction);
-+	INIT_LIST_HEAD(&sbi->s_closed_transaction);
-+	INIT_LIST_HEAD(&sbi->s_committed_transaction);
-+	spin_lock_init(&sbi->s_bal_lock);
-+
-+	/* remove old on-disk buddy file */
-+	down(&root->i_sem);
-+	dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy"));
-+	if (dentry->d_inode != NULL) {
-+		i = vfs_unlink(root, dentry);
-+		if (i != 0)
-+			printk("EXT3-fs: can't remove .buddy file: %d\n", i);
-+	}
-+	dput(dentry);
-+	up(&root->i_sem);
-+
-+	ext3_mb_history_init(sb);
-+
-+	printk("EXT3-fs: mballoc enabled\n");
-+	return 0;
-+}
-+
-+int ext3_mb_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, num_meta_group_infos;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	/* release freed, non-committed blocks */
-+	spin_lock(&sbi->s_md_lock);
-+	list_splice_init(&sbi->s_closed_transaction,
-+			&sbi->s_committed_transaction);
-+	list_splice_init(&sbi->s_active_transaction,
-+			&sbi->s_committed_transaction);
-+	spin_unlock(&sbi->s_md_lock);
-+	ext3_mb_free_committed_blocks(sb);
-+
-+	if (sbi->s_group_info) {
-+		for (i = 0; i < sbi->s_groups_count; i++)
-+			kfree(EXT3_GROUP_INFO(sb, i));
-+		num_meta_group_infos = (sbi->s_groups_count +
-+			EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+		for (i = 0; i < num_meta_group_infos; i++)
-+			kfree(sbi->s_group_info[i]);
-+		kfree(sbi->s_group_info);
-+	}
-+	if (sbi->s_mb_offsets)
-+		kfree(sbi->s_mb_offsets);
-+	if (sbi->s_mb_maxs)
-+		kfree(sbi->s_mb_maxs);
-+	if (sbi->s_buddy_cache)
-+		iput(sbi->s_buddy_cache);
-+	if (sbi->s_blocks_reserved)
-+		printk("ext3-fs: %ld blocks being reserved at umount!\n",
-+				sbi->s_blocks_reserved);
-+	if (ext3_mb_stats) {
-+		printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n",
-+			atomic_read(&sbi->s_bal_allocated),
-+			atomic_read(&sbi->s_bal_reqs),
-+			atomic_read(&sbi->s_bal_success));
-+		printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, "
-+			"%u 2^N hits, %u breaks\n",
-+			atomic_read(&sbi->s_bal_ex_scanned),
-+			atomic_read(&sbi->s_bal_goals),
-+			atomic_read(&sbi->s_bal_2orders),
-+			atomic_read(&sbi->s_bal_breaks));
-+		printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n",
-+			sbi->s_mb_buddies_generated++,
-+			sbi->s_mb_generation_time);
-+	}
-+
-+	ext3_mb_history_release(sb);
-+
-+	return 0;
-+}
-+
-+void ext3_mb_free_committed_blocks(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int err, i, count = 0, count2 = 0;
-+	struct ext3_free_metadata *md;
-+	struct ext3_buddy e3b;
-+
-+	if (list_empty(&sbi->s_committed_transaction))
-+		return;
-+
-+	/* there is committed blocks to be freed yet */
-+	do {
-+		/* get next array of blocks */
-+		md = NULL;
-+		spin_lock(&sbi->s_md_lock);
-+		if (!list_empty(&sbi->s_committed_transaction)) {
-+			md = list_entry(sbi->s_committed_transaction.next,
-+					struct ext3_free_metadata, list);
-+			list_del(&md->list);
-+		}
-+		spin_unlock(&sbi->s_md_lock);
-+
-+		if (md == NULL)
-+			break;
-+
-+		mb_debug("gonna free %u blocks in group %u (0x%p):",
-+				md->num, md->group, md);
-+
-+		err = ext3_mb_load_buddy(sb, md->group, &e3b);
-+		/* we expect to find existing buddy because it's pinned */
-+		BUG_ON(err != 0);
-+
-+		/* there are blocks to put in buddy to make them really free */
-+		count += md->num;
-+		count2++;
-+		ext3_lock_group(sb, md->group);
-+		for (i = 0; i < md->num; i++) {
-+			mb_debug(" %u", md->blocks[i]);
-+			mb_free_blocks(&e3b, md->blocks[i], 1);
-+		}
-+		mb_debug("\n");
-+		ext3_unlock_group(sb, md->group);
-+
-+		/* balance refcounts from ext3_mb_free_metadata() */
-+		page_cache_release(e3b.bd_buddy_page);
-+		page_cache_release(e3b.bd_bitmap_page);
-+
-+		kfree(md);
-+		ext3_mb_release_desc(&e3b);
-+
-+	} while (md);
-+	mb_debug("freed %u blocks in %u structures\n", count, count2);
-+}
-+
-+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	if (sbi->s_last_transaction == handle->h_transaction->t_tid)
-+		return;
-+
-+	/* new transaction! time to close last one and free blocks for
-+	 * committed transaction. we know that only transaction can be
-+	 * active, so previos transaction can be being logged and we
-+	 * know that transaction before previous is known to be already
-+	 * logged. this means that now we may free blocks freed in all
-+	 * transactions before previous one. hope I'm clear enough ... */
-+
-+	spin_lock(&sbi->s_md_lock);
-+	if (sbi->s_last_transaction != handle->h_transaction->t_tid) {
-+		mb_debug("new transaction %lu, old %lu\n",
-+				(unsigned long) handle->h_transaction->t_tid,
-+				(unsigned long) sbi->s_last_transaction);
-+		list_splice_init(&sbi->s_closed_transaction,
-+					&sbi->s_committed_transaction);
-+		list_splice_init(&sbi->s_active_transaction,
-+					&sbi->s_closed_transaction);
-+		sbi->s_last_transaction = handle->h_transaction->t_tid;
-+	}
-+	spin_unlock(&sbi->s_md_lock);
-+
-+	ext3_mb_free_committed_blocks(sb);
-+}
-+
-+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b,
-+				int group, int block, int count)
-+{
-+	struct ext3_group_info *db = e3b->bd_info;
-+	struct super_block *sb = e3b->bd_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_free_metadata *md;
-+	int i;
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	ext3_lock_group(sb, group);
-+	for (i = 0; i < count; i++) {
-+		md = db->bb_md_cur;
-+		if (md && db->bb_tid != handle->h_transaction->t_tid) {
-+			db->bb_md_cur = NULL;
-+			md = NULL;
-+		}
-+
-+		if (md == NULL) {
-+			ext3_unlock_group(sb, group);
-+			md = kmalloc(sizeof(*md), GFP_KERNEL);
-+			if (md == NULL)
-+				return -ENOMEM;
-+			md->num = 0;
-+			md->group = group;
-+
-+			ext3_lock_group(sb, group);
-+			if (db->bb_md_cur == NULL) {
-+				spin_lock(&sbi->s_md_lock);
-+				list_add(&md->list, &sbi->s_active_transaction);
-+				spin_unlock(&sbi->s_md_lock);
-+				/* protect buddy cache from being freed,
-+				 * otherwise we'll refresh it from
-+				 * on-disk bitmap and lose not-yet-available
-+				 * blocks */
-+				page_cache_get(e3b->bd_buddy_page);
-+				page_cache_get(e3b->bd_bitmap_page);
-+				db->bb_md_cur = md;
-+				db->bb_tid = handle->h_transaction->t_tid;
-+				mb_debug("new md 0x%p for group %u\n",
-+							md, md->group);
-+			} else {
-+				kfree(md);
-+				md = db->bb_md_cur;
-+			}
-+		}
-+
-+		BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS);
-+		md->blocks[md->num] = block + i;
-+		md->num++;
-+		if (md->num == EXT3_BB_MAX_BLOCKS) {
-+			/* no more space, put full container on a sb's list */
-+			db->bb_md_cur = NULL;
-+		}
-+	}
-+	ext3_unlock_group(sb, group);
-+	return 0;
-+}
-+
-+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,
-+			unsigned long block, unsigned long count,
-+			int metadata, int *freed)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	unsigned long bit, overflow;
-+	struct buffer_head *gd_bh;
-+	unsigned long block_group;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+	int err = 0, ret;
-+
-+	*freed = 0;
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk ("ext3_free_blocks: nonexistent device");
-+		return;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+	if (block < le32_to_cpu(es->s_first_data_block) ||
-+	    block + count < block ||
-+	    block + count > le32_to_cpu(es->s_blocks_count)) {
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks not in datazone - "
-+			    "block = %lu, count = %lu", block, count);
-+		goto error_return;
-+	}
-+
-+	ext3_debug("freeing block %lu\n", block);
-+
-+do_more:
-+	overflow = 0;
-+	block_group = (block - le32_to_cpu(es->s_first_data_block)) /
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	bit = (block - le32_to_cpu(es->s_first_data_block)) %
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	/*
-+	 * Check to see if we are freeing blocks across a group
-+	 * boundary.
-+	 */
-+	if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) {
-+		overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb);
-+		count -= overflow;
-+	}
-+	brelse(bitmap_bh);
-+	bitmap_bh = read_block_bitmap(sb, block_group);
-+	if (!bitmap_bh)
-+		goto error_return;
-+	gdp = ext3_get_group_desc (sb, block_group, &gd_bh);
-+	if (!gdp)
-+		goto error_return;
-+
-+	if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
-+	    in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
-+	    in_range (block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group) ||
-+	    in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks in system zones - "
-+			    "Block = %lu, count = %lu",
-+			    block, count);
-+
-+	BUFFER_TRACE(bitmap_bh, "getting write access");
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err)
-+		goto error_return;
-+
-+	/*
-+	 * We are about to modify some metadata.  Call the journal APIs
-+	 * to unshare ->b_data if a currently-committing transaction is
-+	 * using it
-+	 */
-+	BUFFER_TRACE(gd_bh, "get_write_access");
-+	err = ext3_journal_get_write_access(handle, gd_bh);
-+	if (err)
-+		goto error_return;
-+
-+	err = ext3_mb_load_buddy(sb, block_group, &e3b);
-+	if (err)
-+		goto error_return;
-+
-+#ifdef AGGRESSIVE_CHECK
-+	{
-+		int i;
-+		for (i = 0; i < count; i++)
-+			J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
-+	}
-+#endif
-+	mb_clear_bits(bitmap_bh->b_data, bit, count);
-+
-+	/* We dirtied the bitmap block */
-+	BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+
-+	if (metadata) {
-+		/* blocks being freed are metadata. these blocks shouldn't
-+		 * be used until this transaction is committed */
-+		ext3_mb_free_metadata(handle, &e3b, block_group, bit, count);
-+	} else {
-+		ext3_lock_group(sb, block_group);
-+		mb_free_blocks(&e3b, bit, count);
-+		ext3_unlock_group(sb, block_group);
-+	}
-+
-+	spin_lock(sb_bgl_lock(sbi, block_group));
-+	gdp->bg_free_blocks_count =
-+		cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
-+	spin_unlock(sb_bgl_lock(sbi, block_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, count);
-+
-+	ext3_mb_release_desc(&e3b);
-+
-+	*freed = count;
-+
-+	/* And the group descriptor block */
-+	BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
-+	ret = ext3_journal_dirty_metadata(handle, gd_bh);
-+	if (!err) err = ret;
-+
-+	if (overflow && !err) {
-+		block += count;
-+		count = overflow;
-+		goto do_more;
-+	}
-+	sb->s_dirt = 1;
-+error_return:
-+	brelse(bitmap_bh);
-+	ext3_std_error(sb, err);
-+	return;
-+}
-+
-+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int free, ret = -ENOSPC;
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	free = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
-+	if (blocks <= free - sbi->s_blocks_reserved) {
-+		sbi->s_blocks_reserved += blocks;
-+		ret = 0;
-+	}
-+	spin_unlock(&sbi->s_reserve_lock);
-+	return ret;
-+}
-+
-+void ext3_mb_release_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	sbi->s_blocks_reserved -= blocks;
-+	WARN_ON(sbi->s_blocks_reserved < 0);
-+	if (sbi->s_blocks_reserved < 0)
-+		sbi->s_blocks_reserved = 0;
-+	spin_unlock(&sbi->s_reserve_lock);
-+}
-+
-+int ext3_new_block(handle_t *handle, struct inode *inode,
-+		unsigned long goal, int *errp)
-+{
-+	int ret, len;
-+
-+	if (!test_opt(inode->i_sb, MBALLOC)) {
-+		ret = ext3_new_block_old(handle, inode, goal, errp);
-+		goto out;
-+	}
-+	len = 1;
-+	ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp);
-+out:
-+	return ret;
-+}
-+
-+
-+void ext3_free_blocks(handle_t *handle, struct inode * inode,
-+			unsigned long block, unsigned long count, int metadata)
-+{
-+	struct super_block *sb;
-+	int freed;
-+
-+	sb = inode->i_sb;
-+	if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info)
-+		ext3_free_blocks_sb(handle, sb, block, count, &freed);
-+	else
-+		ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed);
-+	if (freed)
-+		DQUOT_FREE_BLOCK(inode, freed);
-+	return;
-+}
-+
-+#define EXT3_ROOT		   "ext3"
-+#define EXT3_MB_STATS_NAME	   "mb_stats"
-+#define EXT3_MB_MAX_TO_SCAN_NAME  "mb_max_to_scan"
-+#define EXT3_MB_MIN_TO_SCAN_NAME  "mb_min_to_scan"
-+#define EXT3_MB_ORDER2_REQ	   "mb_order2_req"
-+
-+static int ext3_mb_stats_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_stats);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_stats_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_STATS_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0);
-+	return count;
-+}
-+
-+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_max_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_max_to_scan = value;
-+
-+	return count;
-+}
-+
-+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_min_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_min_to_scan = value;
-+
-+	return count;
-+}
-+
-+static int ext3_mb_order2_req_read(char *page, char **start, off_t off,
-+				   int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_order2_reqs);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_order2_req_write(struct file *file, const char *buffer,
-+				    unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_order2_reqs = value;
-+
-+	return count;
-+}
-+
-+int __init init_ext3_proc(void)
-+{
-+	struct proc_dir_entry *proc_ext3_mb_stats;
-+	struct proc_dir_entry *proc_ext3_mb_max_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_min_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_order2_req;
-+
-+	proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs);
-+	if (proc_root_ext3 == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT);
-+		return -EIO;
-+	}
-+
-+	/* Initialize EXT3_MB_STATS_NAME */
-+	proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_stats == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_STATS_NAME);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_stats->data = NULL;
-+	proc_ext3_mb_stats->read_proc  = ext3_mb_stats_read;
-+	proc_ext3_mb_stats->write_proc = ext3_mb_stats_write;
-+
-+	/* Initialize EXT3_MAX_TO_SCAN_NAME */
-+	proc_ext3_mb_max_to_scan = create_proc_entry(
-+			EXT3_MB_MAX_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_max_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MAX_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_max_to_scan->data = NULL;
-+	proc_ext3_mb_max_to_scan->read_proc  = ext3_mb_max_to_scan_read;
-+	proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write;
-+
-+	/* Initialize EXT3_MIN_TO_SCAN_NAME */
-+	proc_ext3_mb_min_to_scan = create_proc_entry(
-+			EXT3_MB_MIN_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_min_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MIN_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_min_to_scan->data = NULL;
-+	proc_ext3_mb_min_to_scan->read_proc  = ext3_mb_min_to_scan_read;
-+	proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write;
-+
-+	/* Initialize EXT3_ORDER2_REQ */
-+	proc_ext3_mb_order2_req = create_proc_entry(
-+			EXT3_MB_ORDER2_REQ,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_order2_req == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_ORDER2_REQ);
-+		remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_order2_req->data = NULL;
-+	proc_ext3_mb_order2_req->read_proc  = ext3_mb_order2_req_read;
-+	proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write;
-+
-+	return 0;
-+}
-+
-+void exit_ext3_proc(void)
-+{
-+	remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3);
-+	remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+}
-Index: linux-2.6.12.6-bull/fs/ext3/Makefile
-===================================================================
---- linux-2.6.12.6-bull.orig/fs/ext3/Makefile	2006-04-29 20:39:09.000000000 +0400
-+++ linux-2.6.12.6-bull/fs/ext3/Makefile	2006-04-29 20:39:10.000000000 +0400
-@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
--	   extents.o
-+	   extents.o mballoc.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch
deleted file mode 100644
index 702dfcc50291bbf05c259706778083fd67905175..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,3140 +0,0 @@
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/include/linux/ext3_fs.h	2006-07-16 02:29:49.000000000 +0800
-@@ -53,6 +53,14 @@
- #define ext3_debug(f, a...)	do {} while (0)
- #endif
- 
-+#define EXT3_MULTIBLOCK_ALLOCATOR	1
-+
-+#define EXT3_MB_HINT_MERGE		1
-+#define EXT3_MB_HINT_RESERVED		2
-+#define EXT3_MB_HINT_METADATA		4
-+#define EXT3_MB_HINT_FIRST		8
-+#define EXT3_MB_HINT_BEST		16
-+
- /*
-  * Special inodes numbers
-  */
-@@ -379,6 +387,7 @@ struct ext3_inode {
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x800000/* Make iopen world-readable */
- #define EXT3_MOUNT_EXTENTS		0x1000000/* Extents support */
- #define EXT3_MOUNT_EXTDEBUG		0x2000000/* Extents debug */
-+#define EXT3_MOUNT_MBALLOC		0x4000000/* Buddy allocation support */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -405,6 +413,14 @@
- #define ext3_find_first_zero_bit	ext2_find_first_zero_bit
- #define ext3_find_next_zero_bit		ext2_find_next_zero_bit
- 
-+#ifndef ext2_find_next_le_bit
-+#ifdef __LITTLE_ENDIAN
-+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off))
-+#else
-+#error "mballoc needs a patch for big-endian systems - CFS bug 10634"
-+#endif	/* __LITTLE_ENDIAN */
-+#endif	/* !ext2_find_next_le_bit */
-+
- /*
-  * Maximal mount counts between two filesystem checks
-  */
-@@ -749,12 +758,12 @@ ext3_group_first_block_no(struct super_b
- /* balloc.c */
- extern int ext3_bg_has_super(struct super_block *sb, int group);
- extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
--extern ext3_fsblk_t ext3_new_block (handle_t *handle, struct inode *inode,
-+extern ext3_fsblk_t ext3_new_block_old(handle_t *handle, struct inode *inode,
- 			ext3_fsblk_t goal, int *errp);
- extern ext3_fsblk_t ext3_new_blocks (handle_t *handle, struct inode *inode,
- 			ext3_fsblk_t goal, unsigned long *count, int *errp);
- extern void ext3_free_blocks (handle_t *handle, struct inode *inode,
--			ext3_fsblk_t block, unsigned long count);
-+			ext3_fsblk_t block, unsigned long count, int metadata);
- extern void ext3_free_blocks_sb (handle_t *handle, struct super_block *sb,
- 				 ext3_fsblk_t block, unsigned long count,
- 				unsigned long *pdquot_freed_blocks);
-@@ -881,6 +890,21 @@ extern void ext3_extents_initialize_bloc
- extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
- 			  unsigned int cmd, unsigned long arg);
- 
-+/* mballoc.c */
-+extern long ext3_mb_stats;
-+extern long ext3_mb_max_to_scan;
-+extern int ext3_mb_init(struct super_block *sb, int needs_recovery);
-+extern int ext3_mb_release(struct super_block *sb);
-+extern ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode,
-+				   ext3_fsblk_t goal, int *errp);
-+extern ext3_fsblk_t ext3_mb_new_blocks(handle_t *handle, struct inode *inode,
-+				       ext3_fsblk_t goal, int *len, int flags,
-+				       int *errp);
-+extern int ext3_mb_reserve_blocks(struct super_block *sb, int);
-+extern void ext3_mb_release_blocks(struct super_block *sb, int);
-+int __init init_ext3_proc(void);
-+void exit_ext3_proc(void);
-+
- #endif	/* __KERNEL__ */
- 
- /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */
-Index: linux-stage/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs_sb.h	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/include/linux/ext3_fs_sb.h	2006-07-16 02:29:49.000000000 +0800
-@@ -21,8 +21,14 @@
- #include <linux/wait.h>
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
-+#include <linux/list.h>
- #endif
- #include <linux/rbtree.h>
-+#include <linux/proc_fs.h>
-+
-+struct ext3_buddy_group_blocks;
-+struct ext3_mb_history;
-+#define EXT3_BB_MAX_BLOCKS
- 
- /*
-  * third extended-fs super-block data in memory
-@@ -78,6 +84,43 @@ struct ext3_sb_info {
- 	char *s_qf_names[MAXQUOTAS];		/* Names of quota files with journalled quota */
- 	int s_jquota_fmt;			/* Format of quota to use */
- #endif
-+
-+	/* for buddy allocator */
-+	struct ext3_group_info ***s_group_info;
-+	struct inode *s_buddy_cache;
-+	long s_blocks_reserved;
-+	spinlock_t s_reserve_lock;
-+	struct list_head s_active_transaction;
-+	struct list_head s_closed_transaction;
-+	struct list_head s_committed_transaction;
-+	spinlock_t s_md_lock;
-+	tid_t s_last_transaction;
-+	int s_mb_factor;
-+	unsigned short *s_mb_offsets, *s_mb_maxs;
-+	unsigned long s_stripe;
-+
-+	/* history to debug policy */
-+	struct ext3_mb_history *s_mb_history;
-+	int s_mb_history_cur;
-+	int s_mb_history_max;
-+	struct proc_dir_entry *s_mb_proc;
-+	spinlock_t s_mb_history_lock;
-+
-+	/* stats for buddy allocator */
-+	atomic_t s_bal_reqs;	/* number of reqs with len > 1 */
-+	atomic_t s_bal_success;	/* we found long enough chunks */
-+	atomic_t s_bal_allocated;	/* in blocks */
-+	atomic_t s_bal_ex_scanned;	/* total extents scanned */
-+	atomic_t s_bal_goals;	/* goal hits */
-+	atomic_t s_bal_breaks;	/* too long searches */
-+	atomic_t s_bal_2orders;	/* 2^order hits */
-+	spinlock_t s_bal_lock;
-+	unsigned long s_mb_buddies_generated;
-+	unsigned long long s_mb_generation_time;
- };
-+
-+#define EXT3_GROUP_INFO(sb, group)					   \
-+	EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \
-+				 [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)]
- 
- #endif	/* _LINUX_EXT3_FS_SB */
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/fs/ext3/super.c	2006-07-16 02:29:49.000000000 +0800
-@@ -391,6 +391,7 @@ static void ext3_put_super (struct super
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_mb_release(sb);
- 	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
-@@ -642,6 +643,7 @@ enum {
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- 	Opt_extents, Opt_noextents, Opt_extdebug,
-+	Opt_mballoc, Opt_nomballoc, Opt_stripe,
- 	Opt_grpquota
- };
- 
-@@ -696,6 +697,9 @@ static match_table_t tokens = {
- 	{Opt_extents, "extents"},
- 	{Opt_noextents, "noextents"},
- 	{Opt_extdebug, "extdebug"},
-+	{Opt_mballoc, "mballoc"},
-+	{Opt_nomballoc, "nomballoc"},
-+	{Opt_stripe, "stripe=%u"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -1047,6 +1049,19 @@ clear_qf_name:
- 		case Opt_extdebug:
- 			set_opt (sbi->s_mount_opt, EXTDEBUG);
- 			break;
-+		case Opt_mballoc:
-+			set_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_nomballoc:
-+			clear_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_stripe:
-+			if (match_int(&args[0], &option))
-+				return 0;
-+			if (option < 0)
-+				return 0;
-+			sbi->s_stripe = option;
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1773,6 +1778,7 @@ static int ext3_fill_super (struct super
- 		"writeback");
- 
- 	ext3_ext_init(sb);
-+	ext3_mb_init(sb, needs_recovery);
- 	lock_kernel();
- 	return 0;
- 
-@@ -2712,7 +2718,13 @@ static struct file_system_type ext3_fs_t
- 
- static int __init init_ext3_fs(void)
- {
--	int err = init_ext3_xattr();
-+	int err;
-+
-+	err = init_ext3_proc();
-+	if (err)
-+		return err;
-+
-+	err = init_ext3_xattr();
- 	if (err)
- 		return err;
- 	err = init_inodecache();
-@@ -2734,6 +2746,7 @@ static void __exit exit_ext3_fs(void)
- 	unregister_filesystem(&ext3_fs_type);
- 	destroy_inodecache();
- 	exit_ext3_xattr();
-+	exit_ext3_proc();
- }
- 
- int ext3_prep_san_write(struct inode *inode, long *blocks,
-Index: linux-stage/fs/ext3/extents.c
-===================================================================
---- linux-stage.orig/fs/ext3/extents.c	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/fs/ext3/extents.c	2006-07-16 02:29:49.000000000 +0800
-@@ -771,7 +771,7 @@ cleanup:
- 		for (i = 0; i < depth; i++) {
- 			if (!ablocks[i])
- 				continue;
--			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1);
- 		}
- 	}
- 	kfree(ablocks);
-@@ -1428,7 +1428,7 @@ int ext3_ext_rm_idx(handle_t *handle, st
- 		  path->p_idx->ei_leaf);
- 	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
- 	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
--	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1);
- 	return err;
- }
- 
-@@ -1913,10 +1913,12 @@ ext3_remove_blocks(struct ext3_extents_t
- 	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
- 	handle_t *handle = ext3_journal_start(tree->inode, needed);
- 	struct buffer_head *bh;
--	int i;
-+	int i, metadata = 0;
- 
- 	if (IS_ERR(handle))
- 		return PTR_ERR(handle);
-+	if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode))
-+		metadata = 1;
- 	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
- 		/* tail removal */
- 		unsigned long num, start;
-@@ -1928,7 +1930,7 @@ ext3_remove_blocks(struct ext3_extents_t
- 			bh = sb_find_get_block(tree->inode->i_sb, start + i);
- 			ext3_forget(handle, 0, tree->inode, bh, start + i);
- 		}
--		ext3_free_blocks(handle, tree->inode, start, num);
-+		ext3_free_blocks(handle, tree->inode, start, num, metadata);
- 	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
- 		printk("strange request: removal %lu-%lu from %u:%u\n",
- 		       from, to, ex->ee_block, ex->ee_len);
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/fs/ext3/inode.c	2006-07-16 02:29:49.000000000 +0800
-@@ -562,7 +562,7 @@ static int ext3_alloc_blocks(handle_t *h
- 	return ret;
- failed_out:
- 	for (i = 0; i <index; i++)
--		ext3_free_blocks(handle, inode, new_blocks[i], 1);
-+		ext3_free_blocks(handle, inode, new_blocks[i], 1, 1);
- 	return ret;
- }
- 
-@@ -661,9 +661,9 @@ failed:
- 		ext3_journal_forget(handle, branch[i].bh);
- 	}
- 	for (i = 0; i <indirect_blks; i++)
--		ext3_free_blocks(handle, inode, new_blocks[i], 1);
-+		ext3_free_blocks(handle, inode, new_blocks[i], 1, 1);
- 
--	ext3_free_blocks(handle, inode, new_blocks[i], num);
-+	ext3_free_blocks(handle, inode, new_blocks[i], num, 1);
- 
- 	return err;
- }
-@@ -760,9 +760,9 @@ err_out:
- 	for (i = 1; i <= num; i++) {
- 		BUFFER_TRACE(where[i].bh, "call journal_forget");
- 		ext3_journal_forget(handle, where[i].bh);
--		ext3_free_blocks(handle,inode,le32_to_cpu(where[i-1].key),1);
-+		ext3_free_blocks(handle,inode,le32_to_cpu(where[i-1].key),1,1);
- 	}
--	ext3_free_blocks(handle, inode, le32_to_cpu(where[num].key), blks);
-+	ext3_free_blocks(handle, inode, le32_to_cpu(where[num].key), blks, 1);
- 
- 	return err;
- }
-@@ -2007,7 +2007,7 @@ static void ext3_clear_blocks(handle_t *
- 		}
- 	}
- 
--	ext3_free_blocks(handle, inode, block_to_free, count);
-+	ext3_free_blocks(handle, inode, block_to_free, count, 1);
- }
- 
- /**
-@@ -2180,7 +2180,7 @@ static void ext3_free_branches(handle_t 
- 				ext3_journal_test_restart(handle, inode);
- 			}
- 
--			ext3_free_blocks(handle, inode, nr, 1);
-+			ext3_free_blocks(handle, inode, nr, 1, 1);
- 
- 			if (parent_bh) {
- 				/*
-Index: linux-stage/fs/ext3/balloc.c
-===================================================================
---- linux-stage.orig/fs/ext3/balloc.c	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/fs/ext3/balloc.c	2006-07-16 02:33:13.000000000 +0800
-@@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_
-  *
-  * Return buffer_head on success or NULL in case of failure.
-  */
--static struct buffer_head *
-+struct buffer_head *
- read_block_bitmap(struct super_block *sb, unsigned int block_group)
- {
- 	struct ext3_group_desc * desc;
-@@ -490,24 +490,6 @@ error_return:
- 	return;
- }
- 
--/* Free given blocks, update quota and i_blocks field */
--void ext3_free_blocks(handle_t *handle, struct inode *inode,
--			ext3_fsblk_t block, unsigned long count)
--{
--	struct super_block * sb;
--	unsigned long dquot_freed_blocks;
--
--	sb = inode->i_sb;
--	if (!sb) {
--		printk ("ext3_free_blocks: nonexistent device");
--		return;
--	}
--	ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
--	if (dquot_freed_blocks)
--		DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
--	return;
--}
--
- /*
-  * For ext3 allocations, we must not reuse any blocks which are
-  * allocated in the bitmap buffer's "last committed data" copy.  This
-@@ -1463,7 +1445,7 @@ out:
- 	return 0;
- }
- 
--ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode,
-+ext3_fsblk_t ext3_new_block_old(handle_t *handle, struct inode *inode,
- 			ext3_fsblk_t goal, int *errp)
- {
- 	unsigned long count = 1;
-Index: linux-stage/fs/ext3/xattr.c
-===================================================================
---- linux-stage.orig/fs/ext3/xattr.c	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/fs/ext3/xattr.c	2006-07-16 02:29:49.000000000 +0800
-@@ -484,7 +484,7 @@ ext3_xattr_release_block(handle_t *handl
- 		ea_bdebug(bh, "refcount now=0; freeing");
- 		if (ce)
- 			mb_cache_entry_free(ce);
--		ext3_free_blocks(handle, inode, bh->b_blocknr, 1);
-+		ext3_free_blocks(handle, inode, bh->b_blocknr, 1, 1);
- 		get_bh(bh);
- 		ext3_forget(handle, 1, inode, bh, bh->b_blocknr);
- 	} else {
-@@ -805,7 +805,7 @@ inserted:
- 			new_bh = sb_getblk(sb, block);
- 			if (!new_bh) {
- getblk_failed:
--				ext3_free_blocks(handle, inode, block, 1);
-+				ext3_free_blocks(handle, inode, block, 1, 1);
- 				error = -EIO;
- 				goto cleanup;
- 			}
-Index: linux-stage/fs/ext3/mballoc.c
-===================================================================
---- /dev/null	1970-01-01 00:00:00.000000000 +0000
-+++ linux-stage/fs/ext3/mballoc.c	2006-07-16 02:29:49.000000000 +0800
-@@ -0,0 +1,2730 @@
-+/*
-+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+
-+/*
-+ * mballoc.c contains the multiblocks allocation routines
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/time.h>
-+#include <linux/fs.h>
-+#include <linux/namei.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/quotaops.h>
-+#include <linux/buffer_head.h>
-+#include <linux/module.h>
-+#include <linux/swap.h>
-+#include <linux/proc_fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/seq_file.h>
-+
-+/*
-+ * TODO:
-+ *   - bitmap read-ahead (proposed by Oleg Drokin aka green)
-+ *   - track min/max extents in each group for better group selection
-+ *   - mb_mark_used() may allocate chunk right after splitting buddy
-+ *   - special flag to advice allocator to look for requested + N blocks
-+ *     this may improve interaction between extents and mballoc
-+ *   - tree of groups sorted by number of free blocks
-+ *   - percpu reservation code (hotpath)
-+ *   - error handling
-+ */
-+
-+/*
-+ * with AGRESSIVE_CHECK allocator runs consistency checks over
-+ * structures. these checks slow things down a lot
-+ */
-+#define AGGRESSIVE_CHECK__
-+
-+/*
-+ */
-+#define MB_DEBUG__
-+#ifdef MB_DEBUG
-+#define mb_debug(fmt,a...)	printk(fmt, ##a)
-+#else
-+#define mb_debug(fmt,a...)
-+#endif
-+
-+/*
-+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory
-+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history
-+ */
-+#define EXT3_MB_HISTORY
-+
-+/*
-+ * How long mballoc can look for a best extent (in found extents)
-+ */
-+long ext3_mb_max_to_scan = 500;
-+
-+/*
-+ * How long mballoc must look for a best extent
-+ */
-+long ext3_mb_min_to_scan = 30;
-+
-+/*
-+ * with 'ext3_mb_stats' allocator will collect stats that will be
-+ * shown at umount. The collecting costs though!
-+ */
-+
-+long ext3_mb_stats = 1;
-+
-+/*
-+ * for which requests use 2^N search using buddies
-+ */
-+long ext3_mb_order2_reqs = 8;
-+
-+#ifdef EXT3_BB_MAX_BLOCKS
-+#undef EXT3_BB_MAX_BLOCKS
-+#endif
-+#define EXT3_BB_MAX_BLOCKS	30
-+
-+struct ext3_free_metadata {
-+	unsigned short group;
-+	unsigned short num;
-+	unsigned short blocks[EXT3_BB_MAX_BLOCKS];
-+	struct list_head list;
-+};
-+
-+struct ext3_group_info {
-+	unsigned long	bb_state;
-+	unsigned long	bb_tid;
-+	struct ext3_free_metadata *bb_md_cur;
-+	unsigned short	bb_first_free;
-+	unsigned short	bb_free;
-+	unsigned short	bb_fragments;
-+	unsigned short	bb_counters[];
-+};
-+
-+
-+#define EXT3_GROUP_INFO_NEED_INIT_BIT	0
-+#define EXT3_GROUP_INFO_LOCKED_BIT	1
-+
-+#define EXT3_MB_GRP_NEED_INIT(grp)	\
-+	(test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state))
-+
-+struct ext3_free_extent {
-+	__u16 fe_start;
-+	__u16 fe_len;
-+	__u16 fe_group;
-+};
-+
-+struct ext3_allocation_context {
-+	struct super_block *ac_sb;
-+
-+	/* search goals */
-+	struct ext3_free_extent ac_g_ex;
-+
-+	/* the best found extent */
-+	struct ext3_free_extent ac_b_ex;
-+
-+	/* number of iterations done. we have to track to limit searching */
-+	unsigned long ac_ex_scanned;
-+	__u16 ac_groups_scanned;
-+	__u16 ac_found;
-+	__u16 ac_tail;
-+	__u16 ac_buddy;
-+	__u8 ac_status;
-+	__u8 ac_flags;		/* allocation hints */
-+	__u8 ac_criteria;
-+	__u8 ac_repeats;
-+	__u8 ac_2order;		/* if request is to allocate 2^N blocks and
-+				 * N > 0, the field stores N, otherwise 0 */
-+
-+	struct page *ac_buddy_page;
-+	struct page *ac_bitmap_page;
-+};
-+
-+#define AC_STATUS_CONTINUE	1
-+#define AC_STATUS_FOUND		2
-+#define AC_STATUS_BREAK		3
-+
-+struct ext3_mb_history {
-+	struct ext3_free_extent goal;	/* goal allocation */
-+	struct ext3_free_extent result;	/* result allocation */
-+	unsigned pid;
-+	unsigned ino;
-+	__u16 found;	/* how many extents have been found */
-+	__u16 groups;	/* how many groups have been scanned */
-+	__u16 tail;	/* what tail broke some buddy */
-+	__u16 buddy;	/* buddy the tail ^^^ broke */
-+	__u8 cr;	/* which phase the result extent was found at */
-+	__u8 merged;
-+};
-+
-+struct ext3_buddy {
-+	struct page *bd_buddy_page;
-+	void *bd_buddy;
-+	struct page *bd_bitmap_page;
-+	void *bd_bitmap;
-+	struct ext3_group_info *bd_info;
-+	struct super_block *bd_sb;
-+	__u16 bd_blkbits;
-+	__u16 bd_group;
-+};
-+#define EXT3_MB_BITMAP(e3b)	((e3b)->bd_bitmap)
-+#define EXT3_MB_BUDDY(e3b)	((e3b)->bd_buddy)
-+
-+#ifndef EXT3_MB_HISTORY
-+#define ext3_mb_store_history(sb,ino,ac)
-+#else
-+static void ext3_mb_store_history(struct super_block *, unsigned ino,
-+				struct ext3_allocation_context *ac);
-+#endif
-+
-+#define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
-+
-+static struct proc_dir_entry *proc_root_ext3;
-+
-+int ext3_create (struct inode *, struct dentry *, int, struct nameidata *);
-+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
-+int ext3_mb_reserve_blocks(struct super_block *, int);
-+void ext3_mb_release_blocks(struct super_block *, int);
-+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
-+void ext3_mb_free_committed_blocks(struct super_block *);
-+
-+#if BITS_PER_LONG == 64
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 7UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~7UL);	\
-+}
-+#elif BITS_PER_LONG == 32
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 3UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~3UL);	\
-+}
-+#else
-+#error "how many bits you are?!"
-+#endif
-+
-+static inline int mb_test_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	return ext2_test_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline void mb_clear_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit(bit, addr);
-+}
-+
-+static inline void mb_clear_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline int mb_find_next_zero_bit(void *addr, int max, int start)
-+{
-+	int fix;
-+#if BITS_PER_LONG == 64
-+	fix = ((unsigned long) addr & 7UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~7UL);
-+#elif BITS_PER_LONG == 32
-+	fix = ((unsigned long) addr & 3UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~3UL);
-+#else
-+#error "how many bits you are?!"
-+#endif
-+	max += fix;
-+	start += fix;
-+	return ext2_find_next_zero_bit(addr, max, start) - fix;
-+}
-+
-+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max)
-+{
-+	char *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(max != NULL);
-+
-+	if (order > e3b->bd_blkbits + 1) {
-+		*max = 0;
-+		return NULL;
-+	}
-+
-+	/* at order 0 we see each particular block */
-+	*max = 1 << (e3b->bd_blkbits + 3);
-+	if (order == 0)
-+		return EXT3_MB_BITMAP(e3b);
-+
-+	bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order];
-+	*max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order];
-+
-+	return bb;
-+}
-+
-+#ifdef AGGRESSIVE_CHECK
-+
-+static void mb_check_buddy(struct ext3_buddy *e3b)
-+{
-+	int order = e3b->bd_blkbits + 1;
-+	int max, max2, i, j, k, count;
-+	int fragments = 0, fstart;
-+	void *buddy, *buddy2;
-+
-+	if (!test_opt(e3b->bd_sb, MBALLOC))
-+		return;
-+
-+	{
-+		static int mb_check_counter = 0;
-+		if (mb_check_counter++ % 300 != 0)
-+			return;
-+	}
-+
-+	while (order > 1) {
-+		buddy = mb_find_buddy(e3b, order, &max);
-+		J_ASSERT(buddy);
-+		buddy2 = mb_find_buddy(e3b, order - 1, &max2);
-+		J_ASSERT(buddy2);
-+		J_ASSERT(buddy != buddy2);
-+		J_ASSERT(max * 2 == max2);
-+
-+		count = 0;
-+		for (i = 0; i < max; i++) {
-+
-+			if (mb_test_bit(i, buddy)) {
-+				/* only single bit in buddy2 may be 1 */
-+				if (!mb_test_bit(i << 1, buddy2))
-+					J_ASSERT(mb_test_bit((i<<1)+1, buddy2));
-+				else if (!mb_test_bit((i << 1) + 1, buddy2))
-+					J_ASSERT(mb_test_bit(i << 1, buddy2));
-+				continue;
-+			}
-+
-+			/* both bits in buddy2 must be 0 */
-+			J_ASSERT(mb_test_bit(i << 1, buddy2));
-+			J_ASSERT(mb_test_bit((i << 1) + 1, buddy2));
-+
-+			for (j = 0; j < (1 << order); j++) {
-+				k = (i * (1 << order)) + j;
-+				J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b)));
-+			}
-+			count++;
-+		}
-+		J_ASSERT(e3b->bd_info->bb_counters[order] == count);
-+		order--;
-+	}
-+
-+	fstart = -1;
-+	buddy = mb_find_buddy(e3b, 0, &max);
-+	for (i = 0; i < max; i++) {
-+		if (!mb_test_bit(i, buddy)) {
-+			J_ASSERT(i >= e3b->bd_info->bb_first_free);
-+			if (fstart == -1) {
-+				fragments++;
-+				fstart = i;
-+			}
-+			continue;
-+		}
-+		fstart = -1;
-+		/* check used bits only */
-+		for (j = 0; j < e3b->bd_blkbits + 1; j++) {
-+			buddy2 = mb_find_buddy(e3b, j, &max2);
-+			k = i >> j;
-+			J_ASSERT(k < max2);
-+			J_ASSERT(mb_test_bit(k, buddy2));
-+		}
-+	}
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info));
-+	J_ASSERT(e3b->bd_info->bb_fragments == fragments);
-+}
-+
-+#else
-+#define mb_check_buddy(e3b)
-+#endif
-+
-+/* find most significant bit */
-+static int inline fmsb(unsigned short word)
-+{
-+	int order;
-+
-+	if (word > 255) {
-+		order = 7;
-+		word >>= 8;
-+	} else {
-+		order = -1;
-+	}
-+
-+	do {
-+		order++;
-+		word >>= 1;
-+	} while (word != 0);
-+
-+	return order;
-+}
-+
-+static void inline
-+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first,
-+				int len, struct ext3_group_info *grp)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	unsigned short min, max, chunk, border;
-+
-+	mb_debug("mark %u/%u free\n", first, len);
-+	J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	border = 2 << sb->s_blocksize_bits;
-+
-+	while (len > 0) {
-+		/* find how many blocks can be covered since this position */
-+		max = ffs(first | border) - 1;
-+
-+		/* find how many blocks of power 2 we need to mark */
-+		min = fmsb(len);
-+
-+		mb_debug("  %u/%u -> max %u, min %u\n",
-+			first & ((2 << sb->s_blocksize_bits) - 1),
-+			len, max, min);
-+
-+		if (max < min)
-+			min = max;
-+		chunk = 1 << min;
-+
-+		/* mark multiblock chunks only */
-+		grp->bb_counters[min]++;
-+		if (min > 0) {
-+			mb_debug("    set %u at %u \n", first >> min,
-+				sbi->s_mb_offsets[min]);
-+			mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]);
-+		}
-+
-+		len -= chunk;
-+		first += chunk;
-+	}
-+}
-+
-+static void
-+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap,
-+			int group)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group);
-+	unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
-+	unsigned short i = 0, first, len;
-+	unsigned free = 0, fragments = 0;
-+	unsigned long long period = get_cycles();
-+
-+	i = mb_find_next_zero_bit(bitmap, max, 0);
-+	grp->bb_first_free = i;
-+	while (i < max) {
-+		fragments++;
-+		first = i;
-+		i = ext2_find_next_le_bit(bitmap, max, i);
-+		len = i - first;
-+		free += len;
-+		if (len > 1)
-+			ext3_mb_mark_free_simple(sb, buddy, first, len, grp);
-+		else
-+			grp->bb_counters[0]++;
-+		if (i < max)
-+			i = mb_find_next_zero_bit(bitmap, max, i);
-+	}
-+	grp->bb_fragments = fragments;
-+
-+	/* bb_state shouldn't being modified because all
-+	 * others waits for init completion on page lock */
-+	clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state);
-+	if (free != grp->bb_free) {
-+		printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n",
-+			group, free, grp->bb_free);
-+		grp->bb_free = free;
-+	}
-+
-+	period = get_cycles() - period;
-+	spin_lock(&EXT3_SB(sb)->s_bal_lock);
-+	EXT3_SB(sb)->s_mb_buddies_generated++;
-+	EXT3_SB(sb)->s_mb_generation_time += period;
-+	spin_unlock(&EXT3_SB(sb)->s_bal_lock);
-+}
-+
-+static int ext3_mb_init_cache(struct page *page)
-+{
-+	int blocksize, blocks_per_page, groups_per_page;
-+	int err = 0, i, first_group, first_block;
-+	struct super_block *sb;
-+	struct buffer_head *bhs;
-+	struct buffer_head **bh;
-+	struct inode *inode;
-+	char *data, *bitmap;
-+
-+	mb_debug("init page %lu\n", page->index);
-+
-+	inode = page->mapping->host;
-+	sb = inode->i_sb;
-+	blocksize = 1 << inode->i_blkbits;
-+	blocks_per_page = PAGE_CACHE_SIZE / blocksize;
-+
-+	groups_per_page = blocks_per_page >> 1;
-+	if (groups_per_page == 0)
-+		groups_per_page = 1;
-+
-+	/* allocate buffer_heads to read bitmaps */
-+	if (groups_per_page > 1) {
-+		err = -ENOMEM;
-+		i = sizeof(struct buffer_head *) * groups_per_page;
-+		bh = kmalloc(i, GFP_NOFS);
-+		if (bh == NULL)
-+			goto out;
-+		memset(bh, 0, i);
-+	} else
-+		bh = &bhs;
-+
-+	first_group = page->index * blocks_per_page / 2;
-+
-+	/* read all groups the page covers into the cache */
-+	for (i = 0; i < groups_per_page; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		if (first_group + i >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		err = -EIO;
-+		desc = ext3_get_group_desc(sb, first_group + i, NULL);
-+		if (desc == NULL)
-+			goto out;
-+
-+		err = -ENOMEM;
-+		bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap));
-+		if (bh[i] == NULL)
-+			goto out;
-+
-+		if (buffer_uptodate(bh[i]))
-+			continue;
-+
-+		lock_buffer(bh[i]);
-+		if (buffer_uptodate(bh[i])) {
-+			unlock_buffer(bh[i]);
-+			continue;
-+		}
-+
-+		get_bh(bh[i]);
-+		bh[i]->b_end_io = end_buffer_read_sync;
-+		submit_bh(READ, bh[i]);
-+		mb_debug("read bitmap for group %u\n", first_group + i);
-+	}
-+
-+	/* wait for I/O completion */
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		wait_on_buffer(bh[i]);
-+
-+	err = -EIO;
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		if (!buffer_uptodate(bh[i]))
-+			goto out;
-+
-+	first_block = page->index * blocks_per_page;
-+	for (i = 0; i < blocks_per_page; i++) {
-+		int group;
-+
-+		group = (first_block + i) >> 1;
-+		if (group >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		data = page_address(page) + (i * blocksize);
-+		bitmap = bh[group - first_group]->b_data;
-+
-+		if ((first_block + i) & 1) {
-+			/* this is block of buddy */
-+			mb_debug("put buddy for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memset(data, 0xff, blocksize);
-+			EXT3_GROUP_INFO(sb, group)->bb_fragments = 0;
-+			memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0,
-+			       sizeof(unsigned short)*(sb->s_blocksize_bits+2));
-+			ext3_mb_generate_buddy(sb, data, bitmap, group);
-+		} else {
-+			/* this is block of bitmap */
-+			mb_debug("put bitmap for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memcpy(data, bitmap, blocksize);
-+		}
-+	}
-+	SetPageUptodate(page);
-+
-+out:
-+	if (bh) {
-+		for (i = 0; i < groups_per_page && bh[i]; i++)
-+			brelse(bh[i]);
-+		if (bh != &bhs)
-+			kfree(bh);
-+	}
-+	return err;
-+}
-+
-+static int ext3_mb_load_buddy(struct super_block *sb, int group,
-+		struct ext3_buddy *e3b)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *inode = sbi->s_buddy_cache;
-+	int blocks_per_page, block, pnum, poff;
-+	struct page *page;
-+
-+	mb_debug("load group %u\n", group);
-+
-+	blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
-+
-+	e3b->bd_blkbits = sb->s_blocksize_bits;
-+	e3b->bd_info = EXT3_GROUP_INFO(sb, group);
-+	e3b->bd_sb = sb;
-+	e3b->bd_group = group;
-+	e3b->bd_buddy_page = NULL;
-+	e3b->bd_bitmap_page = NULL;
-+
-+	block = group * 2;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	/* we could use find_or_create_page(), but it locks page
-+	 * what we'd like to avoid in fast path ... */
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_bitmap_page = page;
-+	e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	block++;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_buddy_page = page;
-+	e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	return 0;
-+
-+err:
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+	e3b->bd_buddy = NULL;
-+	e3b->bd_bitmap = NULL;
-+	return -EIO;
-+}
-+
-+static void ext3_mb_release_desc(struct ext3_buddy *e3b)
-+{
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+}
-+
-+
-+static inline void
-+ext3_lock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT,
-+		      &EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static inline void
-+ext3_unlock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT,
-+			&EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block)
-+{
-+	int order = 1;
-+	void *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(block < (1 << (e3b->bd_blkbits + 3)));
-+
-+	bb = EXT3_MB_BUDDY(e3b);
-+	while (order <= e3b->bd_blkbits + 1) {
-+		block = block >> 1;
-+		if (!mb_test_bit(block, bb)) {
-+			/* this block is part of buddy of order 'order' */
-+			return order;
-+		}
-+		bb += 1 << (e3b->bd_blkbits - order);
-+		order++;
-+	}
-+	return 0;
-+}
-+
-+static inline void mb_clear_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_clear_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static inline void mb_set_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0xffffffff;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_set_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count)
-+{
-+	int block = 0, max = 0, order;
-+	void *buddy, *buddy2;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free += count;
-+	if (first < e3b->bd_info->bb_first_free)
-+		e3b->bd_info->bb_first_free = first;
-+
-+	/* let's maintain fragments counter */
-+	if (first != 0)
-+		block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b));
-+	if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b));
-+	if (block && max)
-+		e3b->bd_info->bb_fragments--;
-+	else if (!block && !max)
-+		e3b->bd_info->bb_fragments++;
-+
-+	/* let's maintain buddy itself */
-+	while (count-- > 0) {
-+		block = first++;
-+		order = 0;
-+
-+		J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b)));
-+		mb_clear_bit(block, EXT3_MB_BITMAP(e3b));
-+		e3b->bd_info->bb_counters[order]++;
-+
-+		/* start of the buddy */
-+		buddy = mb_find_buddy(e3b, order, &max);
-+
-+		do {
-+			block &= ~1UL;
-+			if (mb_test_bit(block, buddy) ||
-+					mb_test_bit(block + 1, buddy))
-+				break;
-+
-+			/* both the buddies are free, try to coalesce them */
-+			buddy2 = mb_find_buddy(e3b, order + 1, &max);
-+
-+			if (!buddy2)
-+				break;
-+
-+			if (order > 0) {
-+				/* for special purposes, we don't set
-+				 * free bits in bitmap */
-+				mb_set_bit(block, buddy);
-+				mb_set_bit(block + 1, buddy);
-+			}
-+			e3b->bd_info->bb_counters[order]--;
-+			e3b->bd_info->bb_counters[order]--;
-+
-+			block = block >> 1;
-+			order++;
-+			e3b->bd_info->bb_counters[order]++;
-+
-+			mb_clear_bit(block, buddy2);
-+			buddy = buddy2;
-+		} while (1);
-+	}
-+	mb_check_buddy(e3b);
-+
-+	return 0;
-+}
-+
-+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block,
-+				int needed, struct ext3_free_extent *ex)
-+{
-+	int next = block, max, ord;
-+	void *buddy;
-+
-+	J_ASSERT(ex != NULL);
-+
-+	buddy = mb_find_buddy(e3b, order, &max);
-+	J_ASSERT(buddy);
-+	J_ASSERT(block < max);
-+	if (mb_test_bit(block, buddy)) {
-+		ex->fe_len = 0;
-+		ex->fe_start = 0;
-+		ex->fe_group = 0;
-+		return 0;
-+	}
-+
-+	if (likely(order == 0)) {
-+		/* find actual order */
-+		order = mb_find_order_for_block(e3b, block);
-+		block = block >> order;
-+	}
-+
-+	ex->fe_len = 1 << order;
-+	ex->fe_start = block << order;
-+	ex->fe_group = e3b->bd_group;
-+
-+	/* calc difference from given start */
-+	next = next - ex->fe_start;
-+	ex->fe_len -= next;
-+	ex->fe_start += next;
-+
-+	while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) {
-+
-+		if (block + 1 >= max)
-+			break;
-+
-+		next = (block + 1) * (1 << order);
-+		if (mb_test_bit(next, EXT3_MB_BITMAP(e3b)))
-+			break;
-+
-+		ord = mb_find_order_for_block(e3b, next);
-+
-+		order = ord;
-+		block = next >> order;
-+		ex->fe_len += 1 << order;
-+	}
-+
-+	J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3)));
-+	return ex->fe_len;
-+}
-+
-+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex)
-+{
-+	int ord, mlen = 0, max = 0, cur;
-+	int start = ex->fe_start;
-+	int len = ex->fe_len;
-+	unsigned ret = 0;
-+	int len0 = len;
-+	void *buddy;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free -= len;
-+	if (e3b->bd_info->bb_first_free == start)
-+		e3b->bd_info->bb_first_free += len;
-+
-+	/* let's maintain fragments counter */
-+	if (start != 0)
-+		mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b));
-+	if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b));
-+	if (mlen && max)
-+		e3b->bd_info->bb_fragments++;
-+	else if (!mlen && !max)
-+		e3b->bd_info->bb_fragments--;
-+
-+	/* let's maintain buddy itself */
-+	while (len) {
-+		ord = mb_find_order_for_block(e3b, start);
-+
-+		if (((start >> ord) << ord) == start && len >= (1 << ord)) {
-+			/* the whole chunk may be allocated at once! */
-+			mlen = 1 << ord;
-+			buddy = mb_find_buddy(e3b, ord, &max);
-+			J_ASSERT((start >> ord) < max);
-+			mb_set_bit(start >> ord, buddy);
-+			e3b->bd_info->bb_counters[ord]--;
-+			start += mlen;
-+			len -= mlen;
-+			J_ASSERT(len >= 0);
-+			continue;
-+		}
-+
-+		/* store for history */
-+		if (ret == 0)
-+			ret = len | (ord << 16);
-+
-+		/* we have to split large buddy */
-+		J_ASSERT(ord > 0);
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_set_bit(start >> ord, buddy);
-+		e3b->bd_info->bb_counters[ord]--;
-+
-+		ord--;
-+		cur = (start >> ord) & ~1U;
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_clear_bit(cur, buddy);
-+		mb_clear_bit(cur + 1, buddy);
-+		e3b->bd_info->bb_counters[ord]++;
-+		e3b->bd_info->bb_counters[ord]++;
-+	}
-+
-+	/* now drop all the bits in bitmap */
-+	mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
-+
-+	mb_check_buddy(e3b);
-+
-+	return ret;
-+}
-+
-+/*
-+ * Must be called under group lock!
-+ */
-+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	unsigned long ret;
-+
-+	ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len);
-+	ret = mb_mark_used(e3b, &ac->ac_b_ex);
-+
-+	ac->ac_status = AC_STATUS_FOUND;
-+	ac->ac_tail = ret & 0xffff;
-+	ac->ac_buddy = ret >> 16;
-+
-+	/* hold in-core structures until allocated
-+	 * blocks are marked non-free in on-disk bitmap */
-+	ac->ac_buddy_page = e3b->bd_buddy_page;
-+	page_cache_get(e3b->bd_buddy_page);
-+	ac->ac_bitmap_page = e3b->bd_bitmap_page;
-+	page_cache_get(e3b->bd_bitmap_page);
-+}
-+
-+/*
-+ * The routine checks whether found extent is good enough. If it is,
-+ * then the extent gets marked used and flag is set to the context
-+ * to stop scanning. Otherwise, the extent is compared with the
-+ * previous found extent and if new one is better, then it's stored
-+ * in the context. Later, the best found extent will be used, if
-+ * mballoc can't find good enough extent.
-+ *
-+ * FIXME: real allocation policy is to be designed yet!
-+ */
-+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac,
-+					struct ext3_free_extent *ex,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent *bex = &ac->ac_b_ex;
-+	struct ext3_free_extent *gex = &ac->ac_g_ex;
-+
-+	J_ASSERT(ex->fe_len > 0);
-+	J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+	J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+
-+	ac->ac_found++;
-+
-+	/*
-+	 * The special case - take what you catch first
-+	 */
-+	if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * Let's check whether the chunk is good enough
-+	 */
-+	if (ex->fe_len == gex->fe_len) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * If this is first found extent, just store it in the context
-+	 */
-+	if (bex->fe_len == 0) {
-+		*bex = *ex;
-+		return;
-+	}
-+
-+	/*
-+	 * If new found extent is better, store it in the context
-+	 */
-+	if (bex->fe_len < gex->fe_len) {
-+		/* if the request isn't satisfied, any found extent
-+		 * larger than previous best one is better */
-+		if (ex->fe_len > bex->fe_len)
-+			*bex = *ex;
-+	} else if (ex->fe_len > gex->fe_len) {
-+		/* if the request is satisfied, then we try to find
-+		 * an extent that still satisfy the request, but is
-+		 * smaller than previous one */
-+		*bex = *ex;
-+	}
-+
-+	/*
-+	 * Let's scan at least few extents and don't pick up a first one
-+	 */
-+	if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+
-+	/*
-+	 * We don't want to scan for a whole year
-+	 */
-+	if (ac->ac_found > ext3_mb_max_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+}
-+
-+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent ex = ac->ac_b_ex;
-+	int group = ex.fe_group, max, err;
-+
-+	J_ASSERT(ex.fe_len > 0);
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex);
-+
-+	if (max > 0) {
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac,
-+				struct ext3_buddy *e3b)
-+{
-+	int group = ac->ac_g_ex.fe_group, max, err;
-+	struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb);
-+	struct ext3_super_block *es = sbi->s_es;
-+	struct ext3_free_extent ex;
-+
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start,
-+			     ac->ac_g_ex.fe_len, &ex);
-+
-+	if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) {
-+		ext3_fsblk_t start;
-+		start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) +
-+			ex.fe_start + le32_to_cpu(es->s_first_data_block));
-+		if (start % sbi->s_stripe == 0) {
-+			ac->ac_found++;
-+			ac->ac_b_ex = ex;
-+			ext3_mb_use_best_found(ac, e3b);
-+		}
-+	} else if (max >= ac->ac_g_ex.fe_len) {
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	} else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) {
-+		/* Sometimes, caller may want to merge even small
-+		 * number of blocks to an existing extent */
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+/*
-+ * The routine scans buddy structures (not bitmap!) from given order
-+ * to max order and tries to find big enough chunk to satisfy the req
-+ */
-+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_group_info *grp = e3b->bd_info;
-+	void *buddy;
-+	int i, k, max;
-+
-+	J_ASSERT(ac->ac_2order > 0);
-+	for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) {
-+		if (grp->bb_counters[i] == 0)
-+			continue;
-+
-+		buddy = mb_find_buddy(e3b, i, &max);
-+		if (buddy == NULL) {
-+			printk(KERN_ALERT "looking for wrong order?\n");
-+			break;
-+		}
-+
-+		k = mb_find_next_zero_bit(buddy, max, 0);
-+		J_ASSERT(k < max);
-+
-+		ac->ac_found++;
-+
-+		ac->ac_b_ex.fe_len = 1 << i;
-+		ac->ac_b_ex.fe_start = k << i;
-+		ac->ac_b_ex.fe_group = e3b->bd_group;
-+
-+		ext3_mb_use_best_found(ac, e3b);
-+		J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len);
-+
-+		if (unlikely(ext3_mb_stats))
-+			atomic_inc(&EXT3_SB(sb)->s_bal_2orders);
-+
-+		break;
-+	}
-+}
-+
-+/*
-+ * The routine scans the group and measures all found extents.
-+ * In order to optimize scanning, caller must pass number of
-+ * free blocks in the group, so the routine can know upper limit.
-+ */
-+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	int i, free;
-+
-+	free = e3b->bd_info->bb_free;
-+	J_ASSERT(free > 0);
-+
-+	i = e3b->bd_info->bb_first_free;
-+
-+	while (free && ac->ac_status == AC_STATUS_CONTINUE) {
-+		i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i);
-+		if (i >= sb->s_blocksize * 8) {
-+			J_ASSERT(free == 0);
-+			break;
-+		}
-+
-+		mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex);
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(free >= ex.fe_len);
-+
-+		ext3_mb_measure_extent(ac, &ex, e3b);
-+
-+		i += ex.fe_len;
-+		free -= ex.fe_len;
-+	}
-+}
-+
-+/*
-+ * This is a special case for storages like raid5
-+ * we try to find stripe-aligned chunks for stripe-size requests
-+ */
-+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac,
-+				 struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	ext3_fsblk_t i, max;
-+
-+	J_ASSERT(sbi->s_stripe != 0);
-+
-+	/* find first stripe-aligned block */
-+	i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) +
-+		le32_to_cpu(sbi->s_es->s_first_data_block);
-+	i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe;
-+	i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) %
-+		EXT3_BLOCKS_PER_GROUP(sb);
-+
-+	while (i < sb->s_blocksize * 8) {
-+		if (!mb_test_bit(i, bitmap)) {
-+			max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex);
-+			if (max >= sbi->s_stripe) {
-+				ac->ac_found++;
-+				ac->ac_b_ex = ex;
-+				ext3_mb_use_best_found(ac, e3b);
-+				break;
-+			}
-+		}
-+		i += sbi->s_stripe;
-+	}
-+}
-+
-+static int ext3_mb_good_group(struct ext3_allocation_context *ac,
-+				int group, int cr)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group);
-+	unsigned free, fragments, i, bits;
-+
-+	J_ASSERT(cr >= 0 && cr < 4);
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp));
-+
-+	free = grp->bb_free;
-+	fragments = grp->bb_fragments;
-+	if (free == 0)
-+		return 0;
-+	if (fragments == 0)
-+		return 0;
-+
-+	switch (cr) {
-+		case 0:
-+			J_ASSERT(ac->ac_2order != 0);
-+			bits = ac->ac_sb->s_blocksize_bits + 1;
-+			for (i = ac->ac_2order; i <= bits; i++)
-+				if (grp->bb_counters[i] > 0)
-+					return 1;
-+			break;
-+		case 1:
-+			if ((free / fragments) >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 2:
-+			if (free >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 3:
-+			return 1;
-+		default:
-+			BUG();
-+	}
-+
-+	return 0;
-+}
-+
-+ext3_fsblk_t ext3_mb_new_blocks(handle_t *handle, struct inode *inode,
-+				ext3_fsblk_t goal, int *len,int flags,int *errp)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_allocation_context ac;
-+	int i, group, cr, err = 0;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	struct buffer_head *gdp_bh;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+	ext3_fsblk_t block;
-+
-+	J_ASSERT(len != NULL);
-+	J_ASSERT(*len > 0);
-+
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk("ext3_mb_new_nblocks: nonexistent device");
-+		return 0;
-+	}
-+
-+	if (!test_opt(sb, MBALLOC)) {
-+		static int ext3_mballoc_warning = 0;
-+		if (ext3_mballoc_warning == 0) {
-+			printk(KERN_ERR "EXT3-fs: multiblock request with "
-+				"mballoc disabled!\n");
-+			ext3_mballoc_warning++;
-+		}
-+		*len = 1;
-+		err = ext3_new_block_old(handle, inode, goal, errp);
-+		return err;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+
-+	/*
-+	 * We can't allocate > group size
-+	 */
-+	if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10)
-+		*len = EXT3_BLOCKS_PER_GROUP(sb) - 10;
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* someone asks for non-reserved blocks */
-+		BUG_ON(*len > 1);
-+		err = ext3_mb_reserve_blocks(sb, 1);
-+		if (err) {
-+			*errp = err;
-+			return 0;
-+		}
-+	}
-+
-+	ac.ac_buddy_page = NULL;
-+	ac.ac_bitmap_page = NULL;
-+
-+	/*
-+	 * Check quota for allocation of this blocks.
-+	 */
-+	while (*len && DQUOT_ALLOC_BLOCK(inode, *len))
-+		*len -= 1;
-+	if (*len == 0) {
-+		*errp = -EDQUOT;
-+		block = 0;
-+		goto out;
-+	}
-+
-+	/* start searching from the goal */
-+	if (goal < le32_to_cpu(es->s_first_data_block) ||
-+	    goal >= le32_to_cpu(es->s_blocks_count))
-+		goal = le32_to_cpu(es->s_first_data_block);
-+	group = (goal - le32_to_cpu(es->s_first_data_block)) /
-+			EXT3_BLOCKS_PER_GROUP(sb);
-+	block = ((goal - le32_to_cpu(es->s_first_data_block)) %
-+			EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	/* set up allocation goals */
-+	ac.ac_b_ex.fe_group = 0;
-+	ac.ac_b_ex.fe_start = 0;
-+	ac.ac_b_ex.fe_len = 0;
-+	ac.ac_status = AC_STATUS_CONTINUE;
-+	ac.ac_groups_scanned = 0;
-+	ac.ac_ex_scanned = 0;
-+	ac.ac_found = 0;
-+	ac.ac_sb = inode->i_sb;
-+	ac.ac_g_ex.fe_group = group;
-+	ac.ac_g_ex.fe_start = block;
-+	ac.ac_g_ex.fe_len = *len;
-+	ac.ac_flags = flags;
-+	ac.ac_2order = 0;
-+	ac.ac_criteria = 0;
-+
-+	if (*len == 1 && sbi->s_stripe) {
-+		/* looks like a metadata, let's use a dirty hack for raid5
-+		 * move all metadata in first groups in hope to hit cached
-+		 * sectors and thus avoid read-modify cycles in raid5 */
-+		ac.ac_g_ex.fe_group = group = 0;
-+	}
-+
-+	/* probably, the request is for 2^8+ blocks (1/2/3/... MB) */
-+	i = ffs(*len);
-+	if (i >= ext3_mb_order2_reqs) {
-+		i--;
-+		if ((*len & (~(1 << i))) == 0)
-+			ac.ac_2order = i;
-+	}
-+
-+	/* first, try the goal */
-+	err = ext3_mb_find_by_goal(&ac, &e3b);
-+	if (err)
-+		goto out_err;
-+	if (ac.ac_status == AC_STATUS_FOUND)
-+		goto found;
-+
-+	/* Let's just scan groups to find more-less suitable blocks */
-+	cr = ac.ac_2order ? 0 : 1;
-+repeat:
-+	for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) {
-+		ac.ac_criteria = cr;
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) {
-+			if (group == EXT3_SB(sb)->s_groups_count)
-+				group = 0;
-+
-+			if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) {
-+				/* we need full data about the group
-+				 * to make a good selection */
-+				err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+				if (err)
-+					goto out_err;
-+				ext3_mb_release_desc(&e3b);
-+			}
-+
-+			/* check is group good for our criteries */
-+			if (!ext3_mb_good_group(&ac, group, cr))
-+				continue;
-+
-+			err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+			if (err)
-+				goto out_err;
-+
-+			ext3_lock_group(sb, group);
-+			if (!ext3_mb_good_group(&ac, group, cr)) {
-+				/* someone did allocation from this group */
-+				ext3_unlock_group(sb, group);
-+				ext3_mb_release_desc(&e3b);
-+				continue;
-+			}
-+
-+			ac.ac_groups_scanned++;
-+			if (cr == 0)
-+				ext3_mb_simple_scan_group(&ac, &e3b);
-+			else if (cr == 1 && *len == sbi->s_stripe)
-+				ext3_mb_scan_aligned(&ac, &e3b);
-+			else
-+				ext3_mb_complex_scan_group(&ac, &e3b);
-+
-+			ext3_unlock_group(sb, group);
-+
-+			ext3_mb_release_desc(&e3b);
-+
-+			if (ac.ac_status != AC_STATUS_CONTINUE)
-+				break;
-+		}
-+	}
-+
-+	if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND &&
-+	    !(ac.ac_flags & EXT3_MB_HINT_FIRST)) {
-+		/*
-+		 * We've been searching too long. Let's try to allocate
-+		 * the best chunk we've found so far
-+		 */
-+
-+		/*if (ac.ac_found > ext3_mb_max_to_scan)
-+			printk(KERN_DEBUG "EXT3-fs: too long searching at "
-+				"%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len,
-+				ac.ac_g_ex.fe_len);*/
-+		ext3_mb_try_best_found(&ac, &e3b);
-+		if (ac.ac_status != AC_STATUS_FOUND) {
-+			/*
-+			 * Someone more lucky has already allocated it.
-+			 * The only thing we can do is just take first
-+			 * found block(s)
-+			printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n");
-+			 */
-+			ac.ac_b_ex.fe_group = 0;
-+			ac.ac_b_ex.fe_start = 0;
-+			ac.ac_b_ex.fe_len = 0;
-+			ac.ac_status = AC_STATUS_CONTINUE;
-+			ac.ac_flags |= EXT3_MB_HINT_FIRST;
-+			cr = 3;
-+			goto repeat;
-+		}
-+	}
-+
-+	if (ac.ac_status != AC_STATUS_FOUND) {
-+		/*
-+		 * We aren't lucky definitely
-+		 */
-+		DQUOT_FREE_BLOCK(inode, *len);
-+		*errp = -ENOSPC;
-+		block = 0;
-+#if 1
-+		printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n",
-+			ac.ac_status, ac.ac_flags);
-+		printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n",
-+			ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group,
-+			ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr);
-+		printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n",
-+			sbi->s_blocks_reserved, ac.ac_found);
-+		printk("EXT3-fs: groups: ");
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++)
-+			printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free);
-+		printk("\n");
-+#endif
-+		goto out;
-+	}
-+
-+found:
-+	J_ASSERT(ac.ac_b_ex.fe_len > 0);
-+
-+	/* good news - free block(s) have been found. now it's time
-+	 * to mark block(s) in good old journaled bitmap */
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	/* we made a desicion, now mark found blocks in good old
-+	 * bitmap to be journaled */
-+
-+	ext3_debug("using block group %d(%d)\n",
-+			ac.ac_b_group.group, gdp->bg_free_blocks_count);
-+
-+	bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group);
-+	if (!bitmap_bh) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err) {
-+		*errp = err;
-+		goto out_err;
-+	}
-+
-+	gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh);
-+	if (!gdp) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	if (block == le32_to_cpu(gdp->bg_block_bitmap) ||
-+	    block == le32_to_cpu(gdp->bg_inode_bitmap) ||
-+	    in_range(block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error(sb, "ext3_new_block",
-+			    "Allocating block in system zone - "
-+			    "block = "E3FSBLK, block);
-+#ifdef AGGRESSIVE_CHECK
-+	for (i = 0; i < ac.ac_b_ex.fe_len; i++)
-+		J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data));
-+#endif
-+	mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len);
-+
-+	spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	gdp->bg_free_blocks_count =
-+			cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)
-+					- ac.ac_b_ex.fe_len);
-+	spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len);
-+
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+	if (err)
-+		goto out_err;
-+	err = ext3_journal_dirty_metadata(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	sb->s_dirt = 1;
-+	*errp = 0;
-+	brelse(bitmap_bh);
-+
-+	/* drop non-allocated, but dquote'd blocks */
-+	J_ASSERT(*len >= ac.ac_b_ex.fe_len);
-+	DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len);
-+
-+	*len = ac.ac_b_ex.fe_len;
-+	J_ASSERT(*len > 0);
-+	J_ASSERT(block != 0);
-+	goto out;
-+
-+out_err:
-+	/* if we've already allocated something, roll it back */
-+	if (ac.ac_status == AC_STATUS_FOUND) {
-+		/* FIXME: free blocks here */
-+	}
-+
-+	DQUOT_FREE_BLOCK(inode, *len);
-+	brelse(bitmap_bh);
-+	*errp = err;
-+	block = 0;
-+out:
-+	if (ac.ac_buddy_page)
-+		page_cache_release(ac.ac_buddy_page);
-+	if (ac.ac_bitmap_page)
-+		page_cache_release(ac.ac_bitmap_page);
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* block wasn't reserved before and we reserved it
-+		 * at the beginning of allocation. it doesn't matter
-+		 * whether we allocated anything or we failed: time
-+		 * to release reservation. NOTE: because I expect
-+		 * any multiblock request from delayed allocation
-+		 * path only, here is single block always */
-+		ext3_mb_release_blocks(sb, 1);
-+	}
-+
-+	if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) {
-+		atomic_inc(&sbi->s_bal_reqs);
-+		atomic_add(*len, &sbi->s_bal_allocated);
-+		if (*len >= ac.ac_g_ex.fe_len)
-+			atomic_inc(&sbi->s_bal_success);
-+		atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned);
-+		if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start &&
-+				ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group)
-+			atomic_inc(&sbi->s_bal_goals);
-+		if (ac.ac_found > ext3_mb_max_to_scan)
-+			atomic_inc(&sbi->s_bal_breaks);
-+	}
-+
-+	ext3_mb_store_history(sb, inode->i_ino, &ac);
-+
-+	return block;
-+}
-+EXPORT_SYMBOL(ext3_mb_new_blocks);
-+
-+#ifdef EXT3_MB_HISTORY
-+struct ext3_mb_proc_session {
-+	struct ext3_mb_history *history;
-+	struct super_block *sb;
-+	int start;
-+	int max;
-+};
-+
-+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s,
-+					struct ext3_mb_history *hs,
-+					int first)
-+{
-+	if (hs == s->history + s->max)
-+		hs = s->history;
-+	if (!first && hs == s->history + s->start)
-+		return NULL;
-+	while (hs->goal.fe_len == 0) {
-+		hs++;
-+		if (hs == s->history + s->max)
-+			hs = s->history;
-+		if (hs == s->history + s->start)
-+			return NULL;
-+	}
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	if (!hs)
-+		return NULL;
-+	while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL);
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	else
-+		return ext3_mb_history_skip_empty(s, ++hs, 0);
-+}
-+
-+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct ext3_mb_history *hs = v;
-+	char buf[20], buf2[20];
-+
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n",
-+			 "pid", "inode", "goal", "result", "found", "grps", "cr",
-+			 "merge", "tail", "broken");
-+		return 0;
-+	}
-+
-+	sprintf(buf, "%u/%u/%u", hs->goal.fe_group,
-+		hs->goal.fe_start, hs->goal.fe_len);
-+	sprintf(buf2, "%u/%u/%u", hs->result.fe_group,
-+		hs->result.fe_start, hs->result.fe_len);
-+	seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n",
-+			hs->pid, hs->ino, buf, buf2, hs->found, hs->groups,
-+			hs->cr, hs->merged ? "M" : "", hs->tail,
-+			hs->buddy ? 1 << hs->buddy : 0);
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_history_ops = {
-+	.start  = ext3_mb_seq_history_start,
-+	.next   = ext3_mb_seq_history_next,
-+	.stop   = ext3_mb_seq_history_stop,
-+	.show   = ext3_mb_seq_history_show,
-+};
-+
-+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
-+	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(s->history, sbi->s_mb_history, size);
-+	s->max = sbi->s_mb_history_max;
-+	s->start = sbi->s_mb_history_cur % s->max;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+
-+	rc = seq_open(file, &ext3_mb_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->history);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct ext3_mb_proc_session *s = seq->private;
-+	kfree(s->history);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations ext3_mb_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_history_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= ext3_mb_seq_history_release,
-+};
-+
-+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+
-+	group = *pos + 1;
-+	return (void *) group;
-+}
-+
-+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	++*pos;
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+	group = *pos + 1;
-+	return (void *) group;;
-+}
-+
-+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v)
-+{
-+	struct super_block *sb = seq->private;
-+	long group = (long) v, i;
-+	struct sg {
-+		struct ext3_group_info info;
-+		unsigned short counters[16];
-+	} sg;
-+
-+	group--;
-+	if (group == 0)
-+		seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
-+			 "group", "free", "frags", "first", "2^0", "2^1", "2^2",
-+			 "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10",
-+			 "2^11", "2^12", "2^13");
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
-+		sizeof(struct ext3_group_info);
-+	ext3_lock_group(sb, group);
-+	memcpy(&sg, EXT3_GROUP_INFO(sb, group), i);
-+	ext3_unlock_group(sb, group);
-+
-+	if (EXT3_MB_GRP_NEED_INIT(&sg.info))
-+		return 0;
-+
-+	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free,
-+			sg.info.bb_fragments, sg.info.bb_first_free);
-+	for (i = 0; i <= 13; i++)
-+		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-+				sg.info.bb_counters[i] : 0);
-+	seq_printf(seq, " ]\n");
-+
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_groups_ops = {
-+	.start  = ext3_mb_seq_groups_start,
-+	.next   = ext3_mb_seq_groups_next,
-+	.stop   = ext3_mb_seq_groups_stop,
-+	.show   = ext3_mb_seq_groups_show,
-+};
-+
-+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	int rc;
-+
-+	rc = seq_open(file, &ext3_mb_seq_groups_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = sb;
-+	}
-+	return rc;
-+
-+}
-+
-+static struct file_operations ext3_mb_seq_groups_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_groups_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= seq_release,
-+};
-+
-+static void ext3_mb_history_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	remove_proc_entry("mb_groups", sbi->s_mb_proc);
-+	remove_proc_entry("mb_history", sbi->s_mb_proc);
-+	remove_proc_entry(name, proc_root_ext3);
-+
-+	if (sbi->s_mb_history)
-+		kfree(sbi->s_mb_history);
-+}
-+
-+static void ext3_mb_history_init(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+	int i;
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3);
-+	if (sbi->s_mb_proc != NULL) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_history_fops;
-+			p->data = sb;
-+		}
-+		p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_groups_fops;
-+			p->data = sb;
-+		}
-+	}
-+
-+	sbi->s_mb_history_max = 1000;
-+	sbi->s_mb_history_cur = 0;
-+	spin_lock_init(&sbi->s_mb_history_lock);
-+	i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history);
-+	sbi->s_mb_history = kmalloc(i, GFP_KERNEL);
-+	memset(sbi->s_mb_history, 0, i);
-+	/* if we can't allocate history, then we simple won't use it */
-+}
-+
-+static void
-+ext3_mb_store_history(struct super_block *sb, unsigned ino,
-+			struct ext3_allocation_context *ac)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_history h;
-+
-+	if (likely(sbi->s_mb_history == NULL))
-+		return;
-+
-+	h.pid = current->pid;
-+	h.ino = ino;
-+	h.goal = ac->ac_g_ex;
-+	h.result = ac->ac_b_ex;
-+	h.found = ac->ac_found;
-+	h.cr = ac->ac_criteria;
-+	h.groups = ac->ac_groups_scanned;
-+	h.tail = ac->ac_tail;
-+	h.buddy = ac->ac_buddy;
-+	h.merged = 0;
-+	if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&
-+			ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group)
-+		h.merged = 1;
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h));
-+	if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max)
-+		sbi->s_mb_history_cur = 0;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+}
-+
-+#else
-+#define ext3_mb_history_release(sb)
-+#define ext3_mb_history_init(sb)
-+#endif
-+
-+int ext3_mb_init_backend(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, j, len, metalen;
-+	int num_meta_group_infos =
-+		(sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+	struct ext3_group_info **meta_group_info;
-+
-+	/* An 8TB filesystem with 64-bit pointers requires a 4096 byte
-+	 * kmalloc. A 128kb malloc should suffice for a 256TB filesystem.
-+	 * So a two level scheme suffices for now. */
-+	sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) *
-+				    num_meta_group_infos, GFP_KERNEL);
-+	if (sbi->s_group_info == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n");
-+		return -ENOMEM;
-+	}
-+	sbi->s_buddy_cache = new_inode(sb);
-+	if (sbi->s_buddy_cache == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't get new inode\n");
-+		goto err_freesgi;
-+	}
-+
-+	metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb);
-+	for (i = 0; i < num_meta_group_infos; i++) {
-+		if ((i + 1) == num_meta_group_infos)
-+			metalen = sizeof(*meta_group_info) *
-+				(sbi->s_groups_count -
-+					(i << EXT3_DESC_PER_BLOCK_BITS(sb)));
-+		meta_group_info = kmalloc(metalen, GFP_KERNEL);
-+		if (meta_group_info == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate mem for a "
-+			       "buddy group\n");
-+			goto err_freemeta;
-+		}
-+		sbi->s_group_info[i] = meta_group_info;
-+	}
-+
-+	/*
-+	 * calculate needed size. if change bb_counters size,
-+	 * don't forget about ext3_mb_generate_buddy()
-+	 */
-+	len = sizeof(struct ext3_group_info);
-+	len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2);
-+	for (i = 0; i < sbi->s_groups_count; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		meta_group_info =
-+			sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)];
-+		j = i & (EXT3_DESC_PER_BLOCK(sb) - 1);
-+
-+		meta_group_info[j] = kmalloc(len, GFP_KERNEL);
-+		if (meta_group_info[j] == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n");
-+			i--;
-+			goto err_freebuddy;
-+		}
-+		desc = ext3_get_group_desc(sb, i, NULL);
-+		if (desc == NULL) {
-+			printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i);
-+			goto err_freebuddy;
-+		}
-+		memset(meta_group_info[j], 0, len);
-+		set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT,
-+			&meta_group_info[j]->bb_state);
-+		meta_group_info[j]->bb_free =
-+			le16_to_cpu(desc->bg_free_blocks_count);
-+	}
-+
-+	return 0;
-+
-+err_freebuddy:
-+	while (i >= 0) {
-+		kfree(EXT3_GROUP_INFO(sb, i));
-+		i--;
-+	}
-+	i = num_meta_group_infos;
-+err_freemeta:
-+	while (--i >= 0)
-+		kfree(sbi->s_group_info[i]);
-+	iput(sbi->s_buddy_cache);
-+err_freesgi:
-+	kfree(sbi->s_group_info);
-+	return -ENOMEM;
-+}
-+
-+int ext3_mb_init(struct super_block *sb, int needs_recovery)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *root = sb->s_root->d_inode;
-+	unsigned i, offset, max;
-+	struct dentry *dentry;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short);
-+
-+	sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_offsets == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		return -ENOMEM;
-+	}
-+	sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_maxs == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_maxs);
-+		return -ENOMEM;
-+	}
-+
-+	 /* order 0 is regular bitmap */
-+	sbi->s_mb_maxs[0] = sb->s_blocksize << 3;
-+	sbi->s_mb_offsets[0] = 0;
-+
-+	i = 1;
-+	offset = 0;
-+	max = sb->s_blocksize << 2;
-+	do {
-+		sbi->s_mb_offsets[i] = offset;
-+		sbi->s_mb_maxs[i] = max;
-+		offset += 1 << (sb->s_blocksize_bits - i);
-+		max = max >> 1;
-+		i++;
-+	} while (i <= sb->s_blocksize_bits + 1);
-+
-+	/* init file for buddy data */
-+	if ((i = ext3_mb_init_backend(sb))) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_offsets);
-+		kfree(sbi->s_mb_maxs);
-+		return i;
-+	}
-+
-+	spin_lock_init(&sbi->s_reserve_lock);
-+	spin_lock_init(&sbi->s_md_lock);
-+	INIT_LIST_HEAD(&sbi->s_active_transaction);
-+	INIT_LIST_HEAD(&sbi->s_closed_transaction);
-+	INIT_LIST_HEAD(&sbi->s_committed_transaction);
-+	spin_lock_init(&sbi->s_bal_lock);
-+
-+	/* remove old on-disk buddy file */
-+	mutex_lock(&root->i_mutex);
-+	dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy"));
-+	if (dentry->d_inode != NULL) {
-+		i = vfs_unlink(root, dentry);
-+		if (i != 0)
-+			printk("EXT3-fs: can't remove .buddy file: %d\n", i);
-+	}
-+	dput(dentry);
-+	mutex_unlock(&root->i_mutex);
-+
-+	ext3_mb_history_init(sb);
-+
-+	printk("EXT3-fs: mballoc enabled\n");
-+	return 0;
-+}
-+
-+int ext3_mb_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, num_meta_group_infos;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	/* release freed, non-committed blocks */
-+	spin_lock(&sbi->s_md_lock);
-+	list_splice_init(&sbi->s_closed_transaction,
-+			&sbi->s_committed_transaction);
-+	list_splice_init(&sbi->s_active_transaction,
-+			&sbi->s_committed_transaction);
-+	spin_unlock(&sbi->s_md_lock);
-+	ext3_mb_free_committed_blocks(sb);
-+
-+	if (sbi->s_group_info) {
-+		for (i = 0; i < sbi->s_groups_count; i++)
-+			kfree(EXT3_GROUP_INFO(sb, i));
-+		num_meta_group_infos = (sbi->s_groups_count +
-+			EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+		for (i = 0; i < num_meta_group_infos; i++)
-+			kfree(sbi->s_group_info[i]);
-+		kfree(sbi->s_group_info);
-+	}
-+	if (sbi->s_mb_offsets)
-+		kfree(sbi->s_mb_offsets);
-+	if (sbi->s_mb_maxs)
-+		kfree(sbi->s_mb_maxs);
-+	if (sbi->s_buddy_cache)
-+		iput(sbi->s_buddy_cache);
-+	if (sbi->s_blocks_reserved)
-+		printk("ext3-fs: %ld blocks being reserved at umount!\n",
-+				sbi->s_blocks_reserved);
-+	if (ext3_mb_stats) {
-+		printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n",
-+			atomic_read(&sbi->s_bal_allocated),
-+			atomic_read(&sbi->s_bal_reqs),
-+			atomic_read(&sbi->s_bal_success));
-+		printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, "
-+			"%u 2^N hits, %u breaks\n",
-+			atomic_read(&sbi->s_bal_ex_scanned),
-+			atomic_read(&sbi->s_bal_goals),
-+			atomic_read(&sbi->s_bal_2orders),
-+			atomic_read(&sbi->s_bal_breaks));
-+		printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n",
-+			sbi->s_mb_buddies_generated++,
-+			sbi->s_mb_generation_time);
-+	}
-+
-+	ext3_mb_history_release(sb);
-+
-+	return 0;
-+}
-+
-+void ext3_mb_free_committed_blocks(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int err, i, count = 0, count2 = 0;
-+	struct ext3_free_metadata *md;
-+	struct ext3_buddy e3b;
-+
-+	if (list_empty(&sbi->s_committed_transaction))
-+		return;
-+
-+	/* there is committed blocks to be freed yet */
-+	do {
-+		/* get next array of blocks */
-+		md = NULL;
-+		spin_lock(&sbi->s_md_lock);
-+		if (!list_empty(&sbi->s_committed_transaction)) {
-+			md = list_entry(sbi->s_committed_transaction.next,
-+					struct ext3_free_metadata, list);
-+			list_del(&md->list);
-+		}
-+		spin_unlock(&sbi->s_md_lock);
-+
-+		if (md == NULL)
-+			break;
-+
-+		mb_debug("gonna free %u blocks in group %u (0x%p):",
-+				md->num, md->group, md);
-+
-+		err = ext3_mb_load_buddy(sb, md->group, &e3b);
-+		/* we expect to find existing buddy because it's pinned */
-+		BUG_ON(err != 0);
-+
-+		/* there are blocks to put in buddy to make them really free */
-+		count += md->num;
-+		count2++;
-+		ext3_lock_group(sb, md->group);
-+		for (i = 0; i < md->num; i++) {
-+			mb_debug(" %u", md->blocks[i]);
-+			mb_free_blocks(&e3b, md->blocks[i], 1);
-+		}
-+		mb_debug("\n");
-+		ext3_unlock_group(sb, md->group);
-+
-+		/* balance refcounts from ext3_mb_free_metadata() */
-+		page_cache_release(e3b.bd_buddy_page);
-+		page_cache_release(e3b.bd_bitmap_page);
-+
-+		kfree(md);
-+		ext3_mb_release_desc(&e3b);
-+
-+	} while (md);
-+	mb_debug("freed %u blocks in %u structures\n", count, count2);
-+}
-+
-+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	if (sbi->s_last_transaction == handle->h_transaction->t_tid)
-+		return;
-+
-+	/* new transaction! time to close last one and free blocks for
-+	 * committed transaction. we know that only transaction can be
-+	 * active, so previos transaction can be being logged and we
-+	 * know that transaction before previous is known to be already
-+	 * logged. this means that now we may free blocks freed in all
-+	 * transactions before previous one. hope I'm clear enough ... */
-+
-+	spin_lock(&sbi->s_md_lock);
-+	if (sbi->s_last_transaction != handle->h_transaction->t_tid) {
-+		mb_debug("new transaction %lu, old %lu\n",
-+				(unsigned long) handle->h_transaction->t_tid,
-+				(unsigned long) sbi->s_last_transaction);
-+		list_splice_init(&sbi->s_closed_transaction,
-+					&sbi->s_committed_transaction);
-+		list_splice_init(&sbi->s_active_transaction,
-+					&sbi->s_closed_transaction);
-+		sbi->s_last_transaction = handle->h_transaction->t_tid;
-+	}
-+	spin_unlock(&sbi->s_md_lock);
-+
-+	ext3_mb_free_committed_blocks(sb);
-+}
-+
-+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b,
-+				int group, int block, int count)
-+{
-+	struct ext3_group_info *db = e3b->bd_info;
-+	struct super_block *sb = e3b->bd_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_free_metadata *md;
-+	int i;
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	ext3_lock_group(sb, group);
-+	for (i = 0; i < count; i++) {
-+		md = db->bb_md_cur;
-+		if (md && db->bb_tid != handle->h_transaction->t_tid) {
-+			db->bb_md_cur = NULL;
-+			md = NULL;
-+		}
-+
-+		if (md == NULL) {
-+			ext3_unlock_group(sb, group);
-+			md = kmalloc(sizeof(*md), GFP_KERNEL);
-+			if (md == NULL)
-+				return -ENOMEM;
-+			md->num = 0;
-+			md->group = group;
-+
-+			ext3_lock_group(sb, group);
-+			if (db->bb_md_cur == NULL) {
-+				spin_lock(&sbi->s_md_lock);
-+				list_add(&md->list, &sbi->s_active_transaction);
-+				spin_unlock(&sbi->s_md_lock);
-+				/* protect buddy cache from being freed,
-+				 * otherwise we'll refresh it from
-+				 * on-disk bitmap and lose not-yet-available
-+				 * blocks */
-+				page_cache_get(e3b->bd_buddy_page);
-+				page_cache_get(e3b->bd_bitmap_page);
-+				db->bb_md_cur = md;
-+				db->bb_tid = handle->h_transaction->t_tid;
-+				mb_debug("new md 0x%p for group %u\n",
-+							md, md->group);
-+			} else {
-+				kfree(md);
-+				md = db->bb_md_cur;
-+			}
-+		}
-+
-+		BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS);
-+		md->blocks[md->num] = block + i;
-+		md->num++;
-+		if (md->num == EXT3_BB_MAX_BLOCKS) {
-+			/* no more space, put full container on a sb's list */
-+			db->bb_md_cur = NULL;
-+		}
-+	}
-+	ext3_unlock_group(sb, group);
-+	return 0;
-+}
-+
-+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,
-+			ext3_fsblk_t block, unsigned long count,
-+			int metadata, unsigned long *freed)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	unsigned long bit, overflow;
-+	struct buffer_head *gd_bh;
-+	unsigned long block_group;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+	int err = 0, ret;
-+
-+	*freed = 0;
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk ("ext3_free_blocks: nonexistent device");
-+		return;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+	if (block < le32_to_cpu(es->s_first_data_block) ||
-+	    block + count < block ||
-+	    block + count > le32_to_cpu(es->s_blocks_count)) {
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks not in datazone - "
-+			    "block = %lu, count = %lu", block, count);
-+		goto error_return;
-+	}
-+
-+	ext3_debug("freeing block %lu\n", block);
-+
-+do_more:
-+	overflow = 0;
-+	block_group = (block - le32_to_cpu(es->s_first_data_block)) /
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	bit = (block - le32_to_cpu(es->s_first_data_block)) %
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	/*
-+	 * Check to see if we are freeing blocks across a group
-+	 * boundary.
-+	 */
-+	if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) {
-+		overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb);
-+		count -= overflow;
-+	}
-+	brelse(bitmap_bh);
-+	bitmap_bh = read_block_bitmap(sb, block_group);
-+	if (!bitmap_bh)
-+		goto error_return;
-+	gdp = ext3_get_group_desc (sb, block_group, &gd_bh);
-+	if (!gdp)
-+		goto error_return;
-+
-+	if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
-+	    in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
-+	    in_range (block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group) ||
-+	    in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks in system zones - "
-+			    "Block = %lu, count = %lu",
-+			    block, count);
-+
-+	BUFFER_TRACE(bitmap_bh, "getting write access");
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err)
-+		goto error_return;
-+
-+	/*
-+	 * We are about to modify some metadata.  Call the journal APIs
-+	 * to unshare ->b_data if a currently-committing transaction is
-+	 * using it
-+	 */
-+	BUFFER_TRACE(gd_bh, "get_write_access");
-+	err = ext3_journal_get_write_access(handle, gd_bh);
-+	if (err)
-+		goto error_return;
-+
-+	err = ext3_mb_load_buddy(sb, block_group, &e3b);
-+	if (err)
-+		goto error_return;
-+
-+#ifdef AGGRESSIVE_CHECK
-+	{
-+		int i;
-+		for (i = 0; i < count; i++)
-+			J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
-+	}
-+#endif
-+	mb_clear_bits(bitmap_bh->b_data, bit, count);
-+
-+	/* We dirtied the bitmap block */
-+	BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+
-+	if (metadata) {
-+		/* blocks being freed are metadata. these blocks shouldn't
-+		 * be used until this transaction is committed */
-+		ext3_mb_free_metadata(handle, &e3b, block_group, bit, count);
-+	} else {
-+		ext3_lock_group(sb, block_group);
-+		mb_free_blocks(&e3b, bit, count);
-+		ext3_unlock_group(sb, block_group);
-+	}
-+
-+	spin_lock(sb_bgl_lock(sbi, block_group));
-+	gdp->bg_free_blocks_count =
-+		cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
-+	spin_unlock(sb_bgl_lock(sbi, block_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, count);
-+
-+	ext3_mb_release_desc(&e3b);
-+
-+	*freed = count;
-+
-+	/* And the group descriptor block */
-+	BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
-+	ret = ext3_journal_dirty_metadata(handle, gd_bh);
-+	if (!err) err = ret;
-+
-+	if (overflow && !err) {
-+		block += count;
-+		count = overflow;
-+		goto do_more;
-+	}
-+	sb->s_dirt = 1;
-+error_return:
-+	brelse(bitmap_bh);
-+	ext3_std_error(sb, err);
-+	return;
-+}
-+
-+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int free, ret = -ENOSPC;
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	free = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
-+	if (blocks <= free - sbi->s_blocks_reserved) {
-+		sbi->s_blocks_reserved += blocks;
-+		ret = 0;
-+	}
-+	spin_unlock(&sbi->s_reserve_lock);
-+	return ret;
-+}
-+
-+void ext3_mb_release_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	sbi->s_blocks_reserved -= blocks;
-+	WARN_ON(sbi->s_blocks_reserved < 0);
-+	if (sbi->s_blocks_reserved < 0)
-+		sbi->s_blocks_reserved = 0;
-+	spin_unlock(&sbi->s_reserve_lock);
-+}
-+
-+ext3_fsblk_t ext3_new_block(handle_t *handle, struct inode *inode,
-+			    ext3_fsblk_t goal, int *errp)
-+{
-+	ext3_fsblk_t ret;
-+	int len;
-+
-+	if (!test_opt(inode->i_sb, MBALLOC)) {
-+		ret = ext3_new_block_old(handle, inode, goal, errp);
-+		goto out;
-+	}
-+	len = 1;
-+	ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp);
-+out:
-+	return ret;
-+}
-+
-+void ext3_free_blocks(handle_t *handle, struct inode * inode,
-+		      ext3_fsblk_t block, unsigned long count, int metadata)
-+{
-+	struct super_block *sb;
-+	unsigned long freed;
-+
-+	sb = inode->i_sb;
-+	if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info)
-+		ext3_free_blocks_sb(handle, sb, block, count, &freed);
-+	else
-+		ext3_mb_free_blocks(handle, inode, block, count, metadata,
-+				    &freed);
-+	if (freed)
-+		DQUOT_FREE_BLOCK(inode, freed);
-+	return;
-+}
-+
-+#define EXT3_ROOT		   "ext3"
-+#define EXT3_MB_STATS_NAME	   "mb_stats"
-+#define EXT3_MB_MAX_TO_SCAN_NAME  "mb_max_to_scan"
-+#define EXT3_MB_MIN_TO_SCAN_NAME  "mb_min_to_scan"
-+#define EXT3_MB_ORDER2_REQ	   "mb_order2_req"
-+
-+static int ext3_mb_stats_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_stats);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_stats_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_STATS_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0);
-+	return count;
-+}
-+
-+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_max_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_max_to_scan = value;
-+
-+	return count;
-+}
-+
-+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_min_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_min_to_scan = value;
-+
-+	return count;
-+}
-+
-+static int ext3_mb_order2_req_read(char *page, char **start, off_t off,
-+				   int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_order2_reqs);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_order2_req_write(struct file *file, const char *buffer,
-+				    unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_order2_reqs = value;
-+
-+	return count;
-+}
-+
-+int __init init_ext3_proc(void)
-+{
-+	struct proc_dir_entry *proc_ext3_mb_stats;
-+	struct proc_dir_entry *proc_ext3_mb_max_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_min_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_order2_req;
-+
-+	proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs);
-+	if (proc_root_ext3 == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT);
-+		return -EIO;
-+	}
-+
-+	/* Initialize EXT3_MB_STATS_NAME */
-+	proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_stats == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_STATS_NAME);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_stats->data = NULL;
-+	proc_ext3_mb_stats->read_proc  = ext3_mb_stats_read;
-+	proc_ext3_mb_stats->write_proc = ext3_mb_stats_write;
-+
-+	/* Initialize EXT3_MAX_TO_SCAN_NAME */
-+	proc_ext3_mb_max_to_scan = create_proc_entry(
-+			EXT3_MB_MAX_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_max_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MAX_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_max_to_scan->data = NULL;
-+	proc_ext3_mb_max_to_scan->read_proc  = ext3_mb_max_to_scan_read;
-+	proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write;
-+
-+	/* Initialize EXT3_MIN_TO_SCAN_NAME */
-+	proc_ext3_mb_min_to_scan = create_proc_entry(
-+			EXT3_MB_MIN_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_min_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MIN_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_min_to_scan->data = NULL;
-+	proc_ext3_mb_min_to_scan->read_proc  = ext3_mb_min_to_scan_read;
-+	proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write;
-+
-+	/* Initialize EXT3_ORDER2_REQ */
-+	proc_ext3_mb_order2_req = create_proc_entry(
-+			EXT3_MB_ORDER2_REQ,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_order2_req == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_ORDER2_REQ);
-+		remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_order2_req->data = NULL;
-+	proc_ext3_mb_order2_req->read_proc  = ext3_mb_order2_req_read;
-+	proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write;
-+
-+	return 0;
-+}
-+
-+void exit_ext3_proc(void)
-+{
-+	remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3);
-+	remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+}
-Index: linux-stage/fs/ext3/Makefile
-===================================================================
---- linux-stage.orig/fs/ext3/Makefile	2006-07-16 02:29:43.000000000 +0800
-+++ linux-stage/fs/ext3/Makefile	2006-07-16 02:29:49.000000000 +0800
-@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
--	   extents.o
-+	   extents.o mballoc.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
diff --git a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch
deleted file mode 100644
index 4512098da54c51aa62f2034d345506acc7e26ef4..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-mballoc2-2.6.9-rhel4.patch
+++ /dev/null
@@ -1,3121 +0,0 @@
-Index: linux-2.6.9-full/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.9-full.orig/include/linux/ext3_fs.h	2006-06-01 14:58:46.000000000 +0400
-+++ linux-2.6.9-full/include/linux/ext3_fs.h	2006-10-24 12:54:31.000000000 +0400
-@@ -57,6 +57,14 @@ struct statfs;
- #define ext3_debug(f, a...)	do {} while (0)
- #endif
- 
-+#define EXT3_MULTIBLOCK_ALLOCATOR	1
-+
-+#define EXT3_MB_HINT_MERGE		1
-+#define EXT3_MB_HINT_RESERVED		2
-+#define EXT3_MB_HINT_METADATA		4
-+#define EXT3_MB_HINT_FIRST		8
-+#define EXT3_MB_HINT_BEST		16
-+
- /*
-  * Special inodes numbers
-  */
-@@ -365,6 +373,7 @@ struct ext3_inode {
- #define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- #define EXT3_MOUNT_EXTENTS		0x200000/* Extents support */
- #define EXT3_MOUNT_EXTDEBUG		0x400000/* Extents debug */
-+#define EXT3_MOUNT_MBALLOC		0x800000/* Buddy allocation support */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef clear_opt
-@@ -387,6 +396,14 @@ struct ext3_inode {
- #define ext3_find_first_zero_bit	ext2_find_first_zero_bit
- #define ext3_find_next_zero_bit		ext2_find_next_zero_bit
- 
-+#ifndef ext2_find_next_le_bit
-+#ifdef __LITTLE_ENDIAN
-+#define ext2_find_next_le_bit(addr, size, off) find_next_bit((addr), (size), (off))
-+#else
-+#error "mballoc needs a patch for big-endian systems - CFS bug 10634"
-+#endif	/* __LITTLE_ENDIAN */
-+#endif	/* !ext2_find_next_le_bit */
-+
- /*
-  * Maximal mount counts between two filesystem checks
-  */
-@@ -726,7 +743,8 @@ extern int ext3_bg_has_super(struct supe
- extern unsigned long ext3_bg_num_gdb(struct super_block *sb, int group);
- extern int ext3_new_block (handle_t *, struct inode *, unsigned long, int *);
- extern void ext3_free_blocks (handle_t *, struct inode *, unsigned long,
--			      unsigned long);
-+			      unsigned long, int);
-+extern int ext3_new_block_old(handle_t *, struct inode *, unsigned long, int *);
- extern void ext3_free_blocks_sb (handle_t *, struct super_block *,
- 				 unsigned long, unsigned long, int *);
- extern unsigned long ext3_count_free_blocks (struct super_block *);
-@@ -857,6 +874,17 @@ extern void ext3_extents_initialize_bloc
- extern int ext3_ext_ioctl(struct inode *inode, struct file *filp,
- 			  unsigned int cmd, unsigned long arg);
- 
-+/* mballoc.c */
-+extern long ext3_mb_stats;
-+extern long ext3_mb_max_to_scan;
-+extern int ext3_mb_init(struct super_block *, int);
-+extern int ext3_mb_release(struct super_block *);
-+extern int ext3_mb_new_blocks(handle_t *, struct inode *, unsigned long, int *, int, int *);
-+extern int ext3_mb_reserve_blocks(struct super_block *, int);
-+extern void ext3_mb_release_blocks(struct super_block *, int);
-+int __init init_ext3_proc(void);
-+void exit_ext3_proc(void);
-+
- #endif	/* __KERNEL__ */
- 
- /* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */
-Index: linux-2.6.9-full/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.9-full.orig/include/linux/ext3_fs_sb.h	2006-05-18 23:57:04.000000000 +0400
-+++ linux-2.6.9-full/include/linux/ext3_fs_sb.h	2006-10-24 12:54:31.000000000 +0400
-@@ -23,9 +23,15 @@
- #define EXT_INCLUDE
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
-+#include <linux/list.h>
- #endif
- #endif
- #include <linux/rbtree.h>
-+#include <linux/proc_fs.h>
-+
-+struct ext3_buddy_group_blocks;
-+struct ext3_mb_history;
-+#define EXT3_BB_MAX_BLOCKS
- 
- /*
-  * third extended-fs super-block data in memory
-@@ -81,6 +87,43 @@ struct ext3_sb_info {
- 	char *s_qf_names[MAXQUOTAS];		/* Names of quota files with journalled quota */
- 	int s_jquota_fmt;			/* Format of quota to use */
- #endif
-+
-+	/* for buddy allocator */
-+	struct ext3_group_info ***s_group_info;
-+	struct inode *s_buddy_cache;
-+	long s_blocks_reserved;
-+	spinlock_t s_reserve_lock;
-+	struct list_head s_active_transaction;
-+	struct list_head s_closed_transaction;
-+	struct list_head s_committed_transaction;
-+	spinlock_t s_md_lock;
-+	tid_t s_last_transaction;
-+	int s_mb_factor;
-+	unsigned short *s_mb_offsets, *s_mb_maxs;
-+	unsigned long s_stripe;
-+
-+	/* history to debug policy */
-+	struct ext3_mb_history *s_mb_history;
-+	int s_mb_history_cur;
-+	int s_mb_history_max;
-+	struct proc_dir_entry *s_mb_proc;
-+	spinlock_t s_mb_history_lock;
-+
-+	/* stats for buddy allocator */
-+	atomic_t s_bal_reqs;	/* number of reqs with len > 1 */
-+	atomic_t s_bal_success;	/* we found long enough chunks */
-+	atomic_t s_bal_allocated;	/* in blocks */
-+	atomic_t s_bal_ex_scanned;	/* total extents scanned */
-+	atomic_t s_bal_goals;	/* goal hits */
-+	atomic_t s_bal_breaks;	/* too long searches */
-+	atomic_t s_bal_2orders;	/* 2^order hits */
-+	spinlock_t s_bal_lock;
-+	unsigned long s_mb_buddies_generated;
-+	unsigned long long s_mb_generation_time;
- };
- 
-+#define EXT3_GROUP_INFO(sb, group)					   \
-+	EXT3_SB(sb)->s_group_info[(group) >> EXT3_DESC_PER_BLOCK_BITS(sb)] \
-+				 [(group) & (EXT3_DESC_PER_BLOCK(sb) - 1)]
-+
- #endif	/* _LINUX_EXT3_FS_SB */
-Index: linux-2.6.9-full/fs/ext3/super.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/super.c	2006-06-01 14:58:46.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/super.c	2006-10-24 12:54:31.000000000 +0400
-@@ -394,6 +394,7 @@ void ext3_put_super (struct super_block 
- 	struct ext3_super_block *es = sbi->s_es;
- 	int i;
- 
-+	ext3_mb_release(sb);
- 	ext3_ext_release(sb);
- 	ext3_xattr_put_super(sb);
- 	journal_destroy(sbi->s_journal);
-@@ -597,6 +598,7 @@ enum {
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
- 	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- 	Opt_extents, Opt_noextents, Opt_extdebug,
-+	Opt_mballoc, Opt_nomballoc, Opt_stripe,
- };
- 
- static match_table_t tokens = {
-@@ -649,6 +651,9 @@ static match_table_t tokens = {
- 	{Opt_extents, "extents"},
- 	{Opt_noextents, "noextents"},
- 	{Opt_extdebug, "extdebug"},
-+	{Opt_mballoc, "mballoc"},
-+	{Opt_nomballoc, "nomballoc"},
-+	{Opt_stripe, "stripe=%u"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -962,6 +967,19 @@ clear_qf_name:
- 		case Opt_extdebug:
- 			set_opt (sbi->s_mount_opt, EXTDEBUG);
- 			break;
-+		case Opt_mballoc:
-+			set_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_nomballoc:
-+			clear_opt(sbi->s_mount_opt, MBALLOC);
-+			break;
-+		case Opt_stripe:
-+			if (match_int(&args[0], &option))
-+				return 0;
-+			if (option < 0)
-+				return 0;
-+			sbi->s_stripe = option;
-+			break;
- 		default:
- 			printk (KERN_ERR
- 				"EXT3-fs: Unrecognized mount option \"%s\" "
-@@ -1651,6 +1669,7 @@ static int ext3_fill_super (struct super
- 		ext3_count_dirs(sb));
- 
- 	ext3_ext_init(sb);
-+	ext3_mb_init(sb, needs_recovery);
- 
- 	return 0;
- 
-@@ -2433,7 +2452,13 @@ static struct file_system_type ext3_fs_t
- 
- static int __init init_ext3_fs(void)
- {
--	int err = init_ext3_xattr();
-+	int err;
-+
-+	err = init_ext3_proc();
-+	if (err)
-+		return err;
-+
-+	err = init_ext3_xattr();
- 	if (err)
- 		return err;
- 	err = init_inodecache();
-@@ -2455,6 +2480,7 @@ static void __exit exit_ext3_fs(void)
- 	unregister_filesystem(&ext3_fs_type);
- 	destroy_inodecache();
- 	exit_ext3_xattr();
-+	exit_ext3_proc();
- }
- 
- int ext3_prep_san_write(struct inode *inode, long *blocks,
-Index: linux-2.6.9-full/fs/ext3/extents.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/extents.c	2006-06-01 14:58:46.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/extents.c	2006-10-24 12:54:31.000000000 +0400
-@@ -777,7 +777,7 @@ cleanup:
- 		for (i = 0; i < depth; i++) {
- 			if (!ablocks[i])
- 				continue;
--			ext3_free_blocks(handle, tree->inode, ablocks[i], 1);
-+			ext3_free_blocks(handle, tree->inode, ablocks[i], 1, 1);
- 		}
- 	}
- 	kfree(ablocks);
-@@ -1434,7 +1434,7 @@ int ext3_ext_rm_idx(handle_t *handle, st
- 		  path->p_idx->ei_leaf);
- 	bh = sb_find_get_block(tree->inode->i_sb, path->p_idx->ei_leaf);
- 	ext3_forget(handle, 1, tree->inode, bh, path->p_idx->ei_leaf);
--	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1);
-+	ext3_free_blocks(handle, tree->inode, path->p_idx->ei_leaf, 1, 1);
- 	return err;
- }
- 
-@@ -1919,10 +1919,12 @@ ext3_remove_blocks(struct ext3_extents_t
- 	int needed = ext3_remove_blocks_credits(tree, ex, from, to);
- 	handle_t *handle = ext3_journal_start(tree->inode, needed);
- 	struct buffer_head *bh;
--	int i;
-+	int i, metadata = 0;
- 
- 	if (IS_ERR(handle))
- 		return PTR_ERR(handle);
-+	if (S_ISDIR(tree->inode->i_mode) || S_ISLNK(tree->inode->i_mode))
-+		metadata = 1;
- 	if (from >= ex->ee_block && to == ex->ee_block + ex->ee_len - 1) {
- 		/* tail removal */
- 		unsigned long num, start;
-@@ -1934,7 +1936,7 @@ ext3_remove_blocks(struct ext3_extents_t
- 			bh = sb_find_get_block(tree->inode->i_sb, start + i);
- 			ext3_forget(handle, 0, tree->inode, bh, start + i);
- 		}
--		ext3_free_blocks(handle, tree->inode, start, num);
-+		ext3_free_blocks(handle, tree->inode, start, num, metadata);
- 	} else if (from == ex->ee_block && to <= ex->ee_block + ex->ee_len - 1) {
- 		printk("strange request: removal %lu-%lu from %u:%u\n",
- 		       from, to, ex->ee_block, ex->ee_len);
-Index: linux-2.6.9-full/fs/ext3/inode.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/inode.c	2006-06-01 14:58:46.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/inode.c	2006-10-24 12:54:31.000000000 +0400
-@@ -572,7 +572,7 @@ static int ext3_alloc_branch(handle_t *h
- 		ext3_journal_forget(handle, branch[i].bh);
- 	}
- 	for (i = 0; i < keys; i++)
--		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1);
-+		ext3_free_blocks(handle, inode, le32_to_cpu(branch[i].key), 1, 1);
- 	return err;
- }
- 
-@@ -673,7 +673,7 @@ err_out:
- 	if (err == -EAGAIN)
- 		for (i = 0; i < num; i++)
- 			ext3_free_blocks(handle, inode, 
--					 le32_to_cpu(where[i].key), 1);
-+					 le32_to_cpu(where[i].key), 1, 1);
- 	return err;
- }
- 
-@@ -1831,7 +1831,7 @@ ext3_clear_blocks(handle_t *handle, stru
- 		}
- 	}
- 
--	ext3_free_blocks(handle, inode, block_to_free, count);
-+	ext3_free_blocks(handle, inode, block_to_free, count, 1);
- }
- 
- /**
-@@ -2004,7 +2004,7 @@ static void ext3_free_branches(handle_t 
- 				ext3_journal_test_restart(handle, inode);
- 			}
- 
--			ext3_free_blocks(handle, inode, nr, 1);
-+			ext3_free_blocks(handle, inode, nr, 1, 1);
- 
- 			if (parent_bh) {
- 				/*
-Index: linux-2.6.9-full/fs/ext3/balloc.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/balloc.c	2006-03-10 18:20:03.000000000 +0300
-+++ linux-2.6.9-full/fs/ext3/balloc.c	2006-10-24 12:54:31.000000000 +0400
-@@ -79,7 +79,7 @@ struct ext3_group_desc * ext3_get_group_
-  *
-  * Return buffer_head on success or NULL in case of failure.
-  */
--static struct buffer_head *
-+struct buffer_head *
- read_block_bitmap(struct super_block *sb, unsigned int block_group)
- {
- 	struct ext3_group_desc * desc;
-@@ -451,24 +451,6 @@ error_return:
- 	return;
- }
- 
--/* Free given blocks, update quota and i_blocks field */
--void ext3_free_blocks(handle_t *handle, struct inode *inode,
--			unsigned long block, unsigned long count)
--{
--	struct super_block * sb;
--	int dquot_freed_blocks;
--
--	sb = inode->i_sb;
--	if (!sb) {
--		printk ("ext3_free_blocks: nonexistent device");
--		return;
--	}
--	ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
--	if (dquot_freed_blocks)
--		DQUOT_FREE_BLOCK(inode, dquot_freed_blocks);
--	return;
--}
--
- /*
-  * For ext3 allocations, we must not reuse any blocks which are
-  * allocated in the bitmap buffer's "last committed data" copy.  This
-@@ -1131,7 +1113,7 @@ int ext3_should_retry_alloc(struct super
-  * bitmap, and then for any free bit if that fails.
-  * This function also updates quota and i_blocks field.
-  */
--int ext3_new_block(handle_t *handle, struct inode *inode,
-+int ext3_new_block_old(handle_t *handle, struct inode *inode,
- 			unsigned long goal, int *errp)
- {
- 	struct buffer_head *bitmap_bh = NULL;
-Index: linux-2.6.9-full/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/xattr.c	2006-05-18 23:57:04.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/xattr.c	2006-10-24 12:54:31.000000000 +0400
-@@ -1281,7 +1281,7 @@ ext3_xattr_set_handle2(handle_t *handle,
- 			new_bh = sb_getblk(sb, block);
- 			if (!new_bh) {
- getblk_failed:
--				ext3_free_blocks(handle, inode, block, 1);
-+				ext3_free_blocks(handle, inode, block, 1, 1);
- 				error = -EIO;
- 				goto cleanup;
- 			}
-@@ -1328,7 +1328,7 @@ getblk_failed:
- 			if (ce)
- 				mb_cache_entry_free(ce);
- 			ea_bdebug(old_bh, "freeing");
--			ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1);
-+			ext3_free_blocks(handle, inode, old_bh->b_blocknr, 1, 1);
- 
- 			/* ext3_forget() calls bforget() for us, but we
- 			   let our caller release old_bh, so we need to
-@@ -1427,7 +1427,7 @@ ext3_xattr_delete_inode(handle_t *handle
- 	if (HDR(bh)->h_refcount == cpu_to_le32(1)) {
- 		if (ce)
- 			mb_cache_entry_free(ce);
--		ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1);
-+		ext3_free_blocks(handle, inode, EXT3_I(inode)->i_file_acl, 1, 1);
- 		get_bh(bh);
- 		ext3_forget(handle, 1, inode, bh, EXT3_I(inode)->i_file_acl);
- 	} else {
-Index: linux-2.6.9-full/fs/ext3/mballoc.c
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/mballoc.c	2006-10-23 18:07:54.821533176 +0400
-+++ linux-2.6.9-full/fs/ext3/mballoc.c	2006-10-24 13:00:56.000000000 +0400
-@@ -0,0 +1,2725 @@
-+/*
-+ * Copyright (c) 2003-2005, Cluster File Systems, Inc, info@clusterfs.com
-+ * Written by Alex Tomas <alex@clusterfs.com>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License version 2 as
-+ * published by the Free Software Foundation.
-+ *
-+ * 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 Licens
-+ * along with this program; if not, write to the Free Software
-+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-
-+ */
-+
-+
-+/*
-+ * mballoc.c contains the multiblocks allocation routines
-+ */
-+
-+#include <linux/config.h>
-+#include <linux/time.h>
-+#include <linux/fs.h>
-+#include <linux/namei.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/quotaops.h>
-+#include <linux/buffer_head.h>
-+#include <linux/module.h>
-+#include <linux/swap.h>
-+#include <linux/proc_fs.h>
-+#include <linux/pagemap.h>
-+#include <linux/seq_file.h>
-+
-+/*
-+ * TODO:
-+ *   - bitmap read-ahead (proposed by Oleg Drokin aka green)
-+ *   - track min/max extents in each group for better group selection
-+ *   - mb_mark_used() may allocate chunk right after splitting buddy
-+ *   - special flag to advice allocator to look for requested + N blocks
-+ *     this may improve interaction between extents and mballoc
-+ *   - tree of groups sorted by number of free blocks
-+ *   - percpu reservation code (hotpath)
-+ *   - error handling
-+ */
-+
-+/*
-+ * with AGRESSIVE_CHECK allocator runs consistency checks over
-+ * structures. these checks slow things down a lot
-+ */
-+#define AGGRESSIVE_CHECK__
-+
-+/*
-+ */
-+#define MB_DEBUG__
-+#ifdef MB_DEBUG
-+#define mb_debug(fmt,a...)	printk(fmt, ##a)
-+#else
-+#define mb_debug(fmt,a...)
-+#endif
-+
-+/*
-+ * with EXT3_MB_HISTORY mballoc stores last N allocations in memory
-+ * and you can monitor it in /proc/fs/ext3/<dev>/mb_history
-+ */
-+#define EXT3_MB_HISTORY
-+
-+/*
-+ * How long mballoc can look for a best extent (in found extents)
-+ */
-+long ext3_mb_max_to_scan = 500;
-+
-+/*
-+ * How long mballoc must look for a best extent
-+ */
-+long ext3_mb_min_to_scan = 30;
-+
-+/*
-+ * with 'ext3_mb_stats' allocator will collect stats that will be
-+ * shown at umount. The collecting costs though!
-+ */
-+
-+long ext3_mb_stats = 1;
-+
-+/*
-+ * for which requests use 2^N search using buddies
-+ */
-+long ext3_mb_order2_reqs = 8;
-+
-+#ifdef EXT3_BB_MAX_BLOCKS
-+#undef EXT3_BB_MAX_BLOCKS
-+#endif
-+#define EXT3_BB_MAX_BLOCKS	30
-+
-+struct ext3_free_metadata {
-+	unsigned short group;
-+	unsigned short num;
-+	unsigned short blocks[EXT3_BB_MAX_BLOCKS];
-+	struct list_head list;
-+};
-+
-+struct ext3_group_info {
-+	unsigned long	bb_state;
-+	unsigned long	bb_tid;
-+	struct ext3_free_metadata *bb_md_cur;
-+	unsigned short	bb_first_free;
-+	unsigned short	bb_free;
-+	unsigned short	bb_fragments;
-+	unsigned short	bb_counters[];
-+};
-+
-+
-+#define EXT3_GROUP_INFO_NEED_INIT_BIT	0
-+#define EXT3_GROUP_INFO_LOCKED_BIT	1
-+
-+#define EXT3_MB_GRP_NEED_INIT(grp)	\
-+	(test_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &(grp)->bb_state))
-+
-+struct ext3_free_extent {
-+	__u16 fe_start;
-+	__u16 fe_len;
-+	__u16 fe_group;
-+};
-+
-+struct ext3_allocation_context {
-+	struct super_block *ac_sb;
-+
-+	/* search goals */
-+	struct ext3_free_extent ac_g_ex;
-+
-+	/* the best found extent */
-+	struct ext3_free_extent ac_b_ex;
-+
-+	/* number of iterations done. we have to track to limit searching */
-+	unsigned long ac_ex_scanned;
-+	__u16 ac_groups_scanned;
-+	__u16 ac_found;
-+	__u16 ac_tail;
-+	__u16 ac_buddy;
-+	__u8 ac_status;
-+	__u8 ac_flags;		/* allocation hints */
-+	__u8 ac_criteria;
-+	__u8 ac_repeats;
-+	__u8 ac_2order;		/* if request is to allocate 2^N blocks and
-+				 * N > 0, the field stores N, otherwise 0 */
-+
-+	struct page *ac_buddy_page;
-+	struct page *ac_bitmap_page;
-+};
-+
-+#define AC_STATUS_CONTINUE	1
-+#define AC_STATUS_FOUND		2
-+#define AC_STATUS_BREAK		3
-+
-+struct ext3_mb_history {
-+	struct ext3_free_extent goal;	/* goal allocation */
-+	struct ext3_free_extent result;	/* result allocation */
-+	unsigned pid;
-+	unsigned ino;
-+	__u16 found;	/* how many extents have been found */
-+	__u16 groups;	/* how many groups have been scanned */
-+	__u16 tail;	/* what tail broke some buddy */
-+	__u16 buddy;	/* buddy the tail ^^^ broke */
-+	__u8 cr;	/* which phase the result extent was found at */
-+	__u8 merged;
-+};
-+
-+struct ext3_buddy {
-+	struct page *bd_buddy_page;
-+	void *bd_buddy;
-+	struct page *bd_bitmap_page;
-+	void *bd_bitmap;
-+	struct ext3_group_info *bd_info;
-+	struct super_block *bd_sb;
-+	__u16 bd_blkbits;
-+	__u16 bd_group;
-+};
-+#define EXT3_MB_BITMAP(e3b)	((e3b)->bd_bitmap)
-+#define EXT3_MB_BUDDY(e3b)	((e3b)->bd_buddy)
-+
-+#ifndef EXT3_MB_HISTORY
-+#define ext3_mb_store_history(sb,ino,ac)
-+#else
-+static void ext3_mb_store_history(struct super_block *, unsigned ino,
-+				struct ext3_allocation_context *ac);
-+#endif
-+
-+#define in_range(b, first, len)	((b) >= (first) && (b) <= (first) + (len) - 1)
-+
-+static struct proc_dir_entry *proc_root_ext3;
-+
-+struct buffer_head * read_block_bitmap(struct super_block *, unsigned int);
-+void ext3_mb_poll_new_transaction(struct super_block *, handle_t *);
-+void ext3_mb_free_committed_blocks(struct super_block *);
-+
-+#if BITS_PER_LONG == 64
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 7UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~7UL);	\
-+}
-+#elif BITS_PER_LONG == 32
-+#define mb_correct_addr_and_bit(bit,addr)		\
-+{							\
-+	bit += ((unsigned long) addr & 3UL) << 3;	\
-+	addr = (void *) ((unsigned long) addr & ~3UL);	\
-+}
-+#else
-+#error "how many bits you are?!"
-+#endif
-+
-+static inline int mb_test_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	return ext2_test_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit(bit, addr);
-+}
-+
-+static inline void mb_set_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_set_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline void mb_clear_bit(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit(bit, addr);
-+}
-+
-+static inline void mb_clear_bit_atomic(int bit, void *addr)
-+{
-+	mb_correct_addr_and_bit(bit,addr);
-+	ext2_clear_bit_atomic(NULL, bit, addr);
-+}
-+
-+static inline int mb_find_next_zero_bit(void *addr, int max, int start)
-+{
-+	int fix;
-+#if BITS_PER_LONG == 64
-+	fix = ((unsigned long) addr & 7UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~7UL);
-+#elif BITS_PER_LONG == 32
-+	fix = ((unsigned long) addr & 3UL) << 3;
-+	addr = (void *) ((unsigned long) addr & ~3UL);
-+#else
-+#error "how many bits you are?!"
-+#endif
-+	max += fix;
-+	start += fix;
-+	return ext2_find_next_zero_bit(addr, max, start) - fix;
-+}
-+
-+static inline void *mb_find_buddy(struct ext3_buddy *e3b, int order, int *max)
-+{
-+	char *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(max != NULL);
-+
-+	if (order > e3b->bd_blkbits + 1) {
-+		*max = 0;
-+		return NULL;
-+	}
-+
-+	/* at order 0 we see each particular block */
-+	*max = 1 << (e3b->bd_blkbits + 3);
-+	if (order == 0)
-+		return EXT3_MB_BITMAP(e3b);
-+
-+	bb = EXT3_MB_BUDDY(e3b) + EXT3_SB(e3b->bd_sb)->s_mb_offsets[order];
-+	*max = EXT3_SB(e3b->bd_sb)->s_mb_maxs[order];
-+
-+	return bb;
-+}
-+
-+#ifdef AGGRESSIVE_CHECK
-+
-+static void mb_check_buddy(struct ext3_buddy *e3b)
-+{
-+	int order = e3b->bd_blkbits + 1;
-+	int max, max2, i, j, k, count;
-+	int fragments = 0, fstart;
-+	void *buddy, *buddy2;
-+
-+	if (!test_opt(e3b->bd_sb, MBALLOC))
-+		return;
-+
-+	{
-+		static int mb_check_counter = 0;
-+		if (mb_check_counter++ % 300 != 0)
-+			return;
-+	}
-+
-+	while (order > 1) {
-+		buddy = mb_find_buddy(e3b, order, &max);
-+		J_ASSERT(buddy);
-+		buddy2 = mb_find_buddy(e3b, order - 1, &max2);
-+		J_ASSERT(buddy2);
-+		J_ASSERT(buddy != buddy2);
-+		J_ASSERT(max * 2 == max2);
-+
-+		count = 0;
-+		for (i = 0; i < max; i++) {
-+
-+			if (mb_test_bit(i, buddy)) {
-+				/* only single bit in buddy2 may be 1 */
-+				if (!mb_test_bit(i << 1, buddy2))
-+					J_ASSERT(mb_test_bit((i<<1)+1, buddy2));
-+				else if (!mb_test_bit((i << 1) + 1, buddy2))
-+					J_ASSERT(mb_test_bit(i << 1, buddy2));
-+				continue;
-+			}
-+
-+			/* both bits in buddy2 must be 0 */
-+			J_ASSERT(mb_test_bit(i << 1, buddy2));
-+			J_ASSERT(mb_test_bit((i << 1) + 1, buddy2));
-+
-+			for (j = 0; j < (1 << order); j++) {
-+				k = (i * (1 << order)) + j;
-+				J_ASSERT(!mb_test_bit(k, EXT3_MB_BITMAP(e3b)));
-+			}
-+			count++;
-+		}
-+		J_ASSERT(e3b->bd_info->bb_counters[order] == count);
-+		order--;
-+	}
-+
-+	fstart = -1;
-+	buddy = mb_find_buddy(e3b, 0, &max);
-+	for (i = 0; i < max; i++) {
-+		if (!mb_test_bit(i, buddy)) {
-+			J_ASSERT(i >= e3b->bd_info->bb_first_free);
-+			if (fstart == -1) {
-+				fragments++;
-+				fstart = i;
-+			}
-+			continue;
-+		}
-+		fstart = -1;
-+		/* check used bits only */
-+		for (j = 0; j < e3b->bd_blkbits + 1; j++) {
-+			buddy2 = mb_find_buddy(e3b, j, &max2);
-+			k = i >> j;
-+			J_ASSERT(k < max2);
-+			J_ASSERT(mb_test_bit(k, buddy2));
-+		}
-+	}
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(e3b->bd_info));
-+	J_ASSERT(e3b->bd_info->bb_fragments == fragments);
-+}
-+
-+#else
-+#define mb_check_buddy(e3b)
-+#endif
-+
-+/* find most significant bit */
-+static int inline fmsb(unsigned short word)
-+{
-+	int order;
-+
-+	if (word > 255) {
-+		order = 7;
-+		word >>= 8;
-+	} else {
-+		order = -1;
-+	}
-+
-+	do {
-+		order++;
-+		word >>= 1;
-+	} while (word != 0);
-+
-+	return order;
-+}
-+
-+static void inline
-+ext3_mb_mark_free_simple(struct super_block *sb, void *buddy, unsigned first,
-+				int len, struct ext3_group_info *grp)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	unsigned short min, max, chunk, border;
-+
-+	mb_debug("mark %u/%u free\n", first, len);
-+	J_ASSERT(len < EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	border = 2 << sb->s_blocksize_bits;
-+
-+	while (len > 0) {
-+		/* find how many blocks can be covered since this position */
-+		max = ffs(first | border) - 1;
-+
-+		/* find how many blocks of power 2 we need to mark */
-+		min = fmsb(len);
-+
-+		mb_debug("  %u/%u -> max %u, min %u\n",
-+			first & ((2 << sb->s_blocksize_bits) - 1),
-+			len, max, min);
-+
-+		if (max < min)
-+			min = max;
-+		chunk = 1 << min;
-+
-+		/* mark multiblock chunks only */
-+		grp->bb_counters[min]++;
-+		if (min > 0) {
-+			mb_debug("    set %u at %u \n", first >> min,
-+				sbi->s_mb_offsets[min]);
-+			mb_clear_bit(first >> min, buddy + sbi->s_mb_offsets[min]);
-+		}
-+
-+		len -= chunk;
-+		first += chunk;
-+	}
-+}
-+
-+static void
-+ext3_mb_generate_buddy(struct super_block *sb, void *buddy, void *bitmap,
-+			int group)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(sb, group);
-+	unsigned short max = EXT3_BLOCKS_PER_GROUP(sb);
-+	unsigned short i = 0, first, len;
-+	unsigned free = 0, fragments = 0;
-+	unsigned long long period = get_cycles();
-+
-+	i = mb_find_next_zero_bit(bitmap, max, 0);
-+	grp->bb_first_free = i;
-+	while (i < max) {
-+		fragments++;
-+		first = i;
-+		i = ext2_find_next_le_bit(bitmap, max, i);
-+		len = i - first;
-+		free += len;
-+		if (len > 1)
-+			ext3_mb_mark_free_simple(sb, buddy, first, len, grp);
-+		else
-+			grp->bb_counters[0]++;
-+		if (i < max)
-+			i = mb_find_next_zero_bit(bitmap, max, i);
-+	}
-+	grp->bb_fragments = fragments;
-+
-+	/* bb_state shouldn't being modified because all
-+	 * others waits for init completion on page lock */
-+	clear_bit(EXT3_GROUP_INFO_NEED_INIT_BIT, &grp->bb_state);
-+	if (free != grp->bb_free) {
-+		printk("EXT3-fs: group %u: %u blocks in bitmap, %u in gd\n",
-+			group, free, grp->bb_free);
-+		grp->bb_free = free;
-+	}
-+
-+	period = get_cycles() - period;
-+	spin_lock(&EXT3_SB(sb)->s_bal_lock);
-+	EXT3_SB(sb)->s_mb_buddies_generated++;
-+	EXT3_SB(sb)->s_mb_generation_time += period;
-+	spin_unlock(&EXT3_SB(sb)->s_bal_lock);
-+}
-+
-+static int ext3_mb_init_cache(struct page *page)
-+{
-+	int blocksize, blocks_per_page, groups_per_page;
-+	int err = 0, i, first_group, first_block;
-+	struct super_block *sb;
-+	struct buffer_head *bhs;
-+	struct buffer_head **bh;
-+	struct inode *inode;
-+	char *data, *bitmap;
-+
-+	mb_debug("init page %lu\n", page->index);
-+
-+	inode = page->mapping->host;
-+	sb = inode->i_sb;
-+	blocksize = 1 << inode->i_blkbits;
-+	blocks_per_page = PAGE_CACHE_SIZE / blocksize;
-+
-+	groups_per_page = blocks_per_page >> 1;
-+	if (groups_per_page == 0)
-+		groups_per_page = 1;
-+
-+	/* allocate buffer_heads to read bitmaps */
-+	if (groups_per_page > 1) {
-+		err = -ENOMEM;
-+		i = sizeof(struct buffer_head *) * groups_per_page;
-+		bh = kmalloc(i, GFP_NOFS);
-+		if (bh == NULL)
-+			goto out;
-+		memset(bh, 0, i);
-+	} else
-+		bh = &bhs;
-+
-+	first_group = page->index * blocks_per_page / 2;
-+
-+	/* read all groups the page covers into the cache */
-+	for (i = 0; i < groups_per_page; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		if (first_group + i >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		err = -EIO;
-+		desc = ext3_get_group_desc(sb, first_group + i, NULL);
-+		if (desc == NULL)
-+			goto out;
-+
-+		err = -ENOMEM;
-+		bh[i] = sb_getblk(sb, le32_to_cpu(desc->bg_block_bitmap));
-+		if (bh[i] == NULL)
-+			goto out;
-+
-+		if (buffer_uptodate(bh[i]))
-+			continue;
-+
-+		lock_buffer(bh[i]);
-+		if (buffer_uptodate(bh[i])) {
-+			unlock_buffer(bh[i]);
-+			continue;
-+		}
-+
-+		get_bh(bh[i]);
-+		bh[i]->b_end_io = end_buffer_read_sync;
-+		submit_bh(READ, bh[i]);
-+		mb_debug("read bitmap for group %u\n", first_group + i);
-+	}
-+
-+	/* wait for I/O completion */
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		wait_on_buffer(bh[i]);
-+
-+	err = -EIO;
-+	for (i = 0; i < groups_per_page && bh[i]; i++)
-+		if (!buffer_uptodate(bh[i]))
-+			goto out;
-+
-+	first_block = page->index * blocks_per_page;
-+	for (i = 0; i < blocks_per_page; i++) {
-+		int group;
-+
-+		group = (first_block + i) >> 1;
-+		if (group >= EXT3_SB(sb)->s_groups_count)
-+			break;
-+
-+		data = page_address(page) + (i * blocksize);
-+		bitmap = bh[group - first_group]->b_data;
-+
-+		if ((first_block + i) & 1) {
-+			/* this is block of buddy */
-+			mb_debug("put buddy for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memset(data, 0xff, blocksize);
-+			EXT3_GROUP_INFO(sb, group)->bb_fragments = 0;
-+			memset(EXT3_GROUP_INFO(sb, group)->bb_counters, 0,
-+			       sizeof(unsigned short)*(sb->s_blocksize_bits+2));
-+			ext3_mb_generate_buddy(sb, data, bitmap, group);
-+		} else {
-+			/* this is block of bitmap */
-+			mb_debug("put bitmap for group %u in page %lu/%x\n",
-+				group, page->index, i * blocksize);
-+			memcpy(data, bitmap, blocksize);
-+		}
-+	}
-+	SetPageUptodate(page);
-+
-+out:
-+	if (bh) {
-+		for (i = 0; i < groups_per_page && bh[i]; i++)
-+			brelse(bh[i]);
-+		if (bh != &bhs)
-+			kfree(bh);
-+	}
-+	return err;
-+}
-+
-+static int ext3_mb_load_buddy(struct super_block *sb, int group,
-+		struct ext3_buddy *e3b)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *inode = sbi->s_buddy_cache;
-+	int blocks_per_page, block, pnum, poff;
-+	struct page *page;
-+
-+	mb_debug("load group %u\n", group);
-+
-+	blocks_per_page = PAGE_CACHE_SIZE / sb->s_blocksize;
-+
-+	e3b->bd_blkbits = sb->s_blocksize_bits;
-+	e3b->bd_info = EXT3_GROUP_INFO(sb, group);
-+	e3b->bd_sb = sb;
-+	e3b->bd_group = group;
-+	e3b->bd_buddy_page = NULL;
-+	e3b->bd_bitmap_page = NULL;
-+
-+	block = group * 2;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	/* we could use find_or_create_page(), but it locks page
-+	 * what we'd like to avoid in fast path ... */
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_bitmap_page = page;
-+	e3b->bd_bitmap = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	block++;
-+	pnum = block / blocks_per_page;
-+	poff = block % blocks_per_page;
-+
-+	page = find_get_page(inode->i_mapping, pnum);
-+	if (page == NULL || !PageUptodate(page)) {
-+		if (page)
-+			page_cache_release(page);
-+		page = find_or_create_page(inode->i_mapping, pnum, GFP_NOFS);
-+		if (page) {
-+			BUG_ON(page->mapping != inode->i_mapping);
-+			if (!PageUptodate(page))
-+				ext3_mb_init_cache(page);
-+			unlock_page(page);
-+		}
-+	}
-+	if (page == NULL || !PageUptodate(page))
-+		goto err;
-+	e3b->bd_buddy_page = page;
-+	e3b->bd_buddy = page_address(page) + (poff * sb->s_blocksize);
-+	mark_page_accessed(page);
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	return 0;
-+
-+err:
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+	e3b->bd_buddy = NULL;
-+	e3b->bd_bitmap = NULL;
-+	return -EIO;
-+}
-+
-+static void ext3_mb_release_desc(struct ext3_buddy *e3b)
-+{
-+	if (e3b->bd_bitmap_page)
-+		page_cache_release(e3b->bd_bitmap_page);
-+	if (e3b->bd_buddy_page)
-+		page_cache_release(e3b->bd_buddy_page);
-+}
-+
-+
-+static inline void
-+ext3_lock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_lock(EXT3_GROUP_INFO_LOCKED_BIT,
-+		      &EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static inline void
-+ext3_unlock_group(struct super_block *sb, int group)
-+{
-+	bit_spin_unlock(EXT3_GROUP_INFO_LOCKED_BIT,
-+			&EXT3_GROUP_INFO(sb, group)->bb_state);
-+}
-+
-+static int mb_find_order_for_block(struct ext3_buddy *e3b, int block)
-+{
-+	int order = 1;
-+	void *bb;
-+
-+	J_ASSERT(EXT3_MB_BITMAP(e3b) != EXT3_MB_BUDDY(e3b));
-+	J_ASSERT(block < (1 << (e3b->bd_blkbits + 3)));
-+
-+	bb = EXT3_MB_BUDDY(e3b);
-+	while (order <= e3b->bd_blkbits + 1) {
-+		block = block >> 1;
-+		if (!mb_test_bit(block, bb)) {
-+			/* this block is part of buddy of order 'order' */
-+			return order;
-+		}
-+		bb += 1 << (e3b->bd_blkbits - order);
-+		order++;
-+	}
-+	return 0;
-+}
-+
-+static inline void mb_clear_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_clear_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static inline void mb_set_bits(void *bm, int cur, int len)
-+{
-+	__u32 *addr;
-+
-+	len = cur + len;
-+	while (cur < len) {
-+		if ((cur & 31) == 0 && (len - cur) >= 32) {
-+			/* fast path: clear whole word at once */
-+			addr = bm + (cur >> 3);
-+			*addr = 0xffffffff;
-+			cur += 32;
-+			continue;
-+		}
-+		mb_set_bit_atomic(cur, bm);
-+		cur++;
-+	}
-+}
-+
-+static int mb_free_blocks(struct ext3_buddy *e3b, int first, int count)
-+{
-+	int block = 0, max = 0, order;
-+	void *buddy, *buddy2;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free += count;
-+	if (first < e3b->bd_info->bb_first_free)
-+		e3b->bd_info->bb_first_free = first;
-+
-+	/* let's maintain fragments counter */
-+	if (first != 0)
-+		block = !mb_test_bit(first - 1, EXT3_MB_BITMAP(e3b));
-+	if (first + count < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(first + count, EXT3_MB_BITMAP(e3b));
-+	if (block && max)
-+		e3b->bd_info->bb_fragments--;
-+	else if (!block && !max)
-+		e3b->bd_info->bb_fragments++;
-+
-+	/* let's maintain buddy itself */
-+	while (count-- > 0) {
-+		block = first++;
-+		order = 0;
-+
-+		J_ASSERT(mb_test_bit(block, EXT3_MB_BITMAP(e3b)));
-+		mb_clear_bit(block, EXT3_MB_BITMAP(e3b));
-+		e3b->bd_info->bb_counters[order]++;
-+
-+		/* start of the buddy */
-+		buddy = mb_find_buddy(e3b, order, &max);
-+
-+		do {
-+			block &= ~1UL;
-+			if (mb_test_bit(block, buddy) ||
-+					mb_test_bit(block + 1, buddy))
-+				break;
-+
-+			/* both the buddies are free, try to coalesce them */
-+			buddy2 = mb_find_buddy(e3b, order + 1, &max);
-+
-+			if (!buddy2)
-+				break;
-+
-+			if (order > 0) {
-+				/* for special purposes, we don't set
-+				 * free bits in bitmap */
-+				mb_set_bit(block, buddy);
-+				mb_set_bit(block + 1, buddy);
-+			}
-+			e3b->bd_info->bb_counters[order]--;
-+			e3b->bd_info->bb_counters[order]--;
-+
-+			block = block >> 1;
-+			order++;
-+			e3b->bd_info->bb_counters[order]++;
-+
-+			mb_clear_bit(block, buddy2);
-+			buddy = buddy2;
-+		} while (1);
-+	}
-+	mb_check_buddy(e3b);
-+
-+	return 0;
-+}
-+
-+static int mb_find_extent(struct ext3_buddy *e3b, int order, int block,
-+				int needed, struct ext3_free_extent *ex)
-+{
-+	int next = block, max, ord;
-+	void *buddy;
-+
-+	J_ASSERT(ex != NULL);
-+
-+	buddy = mb_find_buddy(e3b, order, &max);
-+	J_ASSERT(buddy);
-+	J_ASSERT(block < max);
-+	if (mb_test_bit(block, buddy)) {
-+		ex->fe_len = 0;
-+		ex->fe_start = 0;
-+		ex->fe_group = 0;
-+		return 0;
-+	}
-+
-+	if (likely(order == 0)) {
-+		/* find actual order */
-+		order = mb_find_order_for_block(e3b, block);
-+		block = block >> order;
-+	}
-+
-+	ex->fe_len = 1 << order;
-+	ex->fe_start = block << order;
-+	ex->fe_group = e3b->bd_group;
-+
-+	/* calc difference from given start */
-+	next = next - ex->fe_start;
-+	ex->fe_len -= next;
-+	ex->fe_start += next;
-+
-+	while (needed > ex->fe_len && (buddy = mb_find_buddy(e3b, order, &max))) {
-+
-+		if (block + 1 >= max)
-+			break;
-+
-+		next = (block + 1) * (1 << order);
-+		if (mb_test_bit(next, EXT3_MB_BITMAP(e3b)))
-+			break;
-+
-+		ord = mb_find_order_for_block(e3b, next);
-+
-+		order = ord;
-+		block = next >> order;
-+		ex->fe_len += 1 << order;
-+	}
-+
-+	J_ASSERT(ex->fe_start + ex->fe_len <= (1 << (e3b->bd_blkbits + 3)));
-+	return ex->fe_len;
-+}
-+
-+static int mb_mark_used(struct ext3_buddy *e3b, struct ext3_free_extent *ex)
-+{
-+	int ord, mlen = 0, max = 0, cur;
-+	int start = ex->fe_start;
-+	int len = ex->fe_len;
-+	unsigned ret = 0;
-+	int len0 = len;
-+	void *buddy;
-+
-+	mb_check_buddy(e3b);
-+
-+	e3b->bd_info->bb_free -= len;
-+	if (e3b->bd_info->bb_first_free == start)
-+		e3b->bd_info->bb_first_free += len;
-+
-+	/* let's maintain fragments counter */
-+	if (start != 0)
-+		mlen = !mb_test_bit(start - 1, EXT3_MB_BITMAP(e3b));
-+	if (start + len < EXT3_SB(e3b->bd_sb)->s_mb_maxs[0])
-+		max = !mb_test_bit(start + len, EXT3_MB_BITMAP(e3b));
-+	if (mlen && max)
-+		e3b->bd_info->bb_fragments++;
-+	else if (!mlen && !max)
-+		e3b->bd_info->bb_fragments--;
-+
-+	/* let's maintain buddy itself */
-+	while (len) {
-+		ord = mb_find_order_for_block(e3b, start);
-+
-+		if (((start >> ord) << ord) == start && len >= (1 << ord)) {
-+			/* the whole chunk may be allocated at once! */
-+			mlen = 1 << ord;
-+			buddy = mb_find_buddy(e3b, ord, &max);
-+			J_ASSERT((start >> ord) < max);
-+			mb_set_bit(start >> ord, buddy);
-+			e3b->bd_info->bb_counters[ord]--;
-+			start += mlen;
-+			len -= mlen;
-+			J_ASSERT(len >= 0);
-+			continue;
-+		}
-+
-+		/* store for history */
-+		if (ret == 0)
-+			ret = len | (ord << 16);
-+
-+		/* we have to split large buddy */
-+		J_ASSERT(ord > 0);
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_set_bit(start >> ord, buddy);
-+		e3b->bd_info->bb_counters[ord]--;
-+
-+		ord--;
-+		cur = (start >> ord) & ~1U;
-+		buddy = mb_find_buddy(e3b, ord, &max);
-+		mb_clear_bit(cur, buddy);
-+		mb_clear_bit(cur + 1, buddy);
-+		e3b->bd_info->bb_counters[ord]++;
-+		e3b->bd_info->bb_counters[ord]++;
-+	}
-+
-+	/* now drop all the bits in bitmap */
-+	mb_set_bits(EXT3_MB_BITMAP(e3b), ex->fe_start, len0);
-+
-+	mb_check_buddy(e3b);
-+
-+	return ret;
-+}
-+
-+/*
-+ * Must be called under group lock!
-+ */
-+static void ext3_mb_use_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	unsigned long ret;
-+
-+	ac->ac_b_ex.fe_len = min(ac->ac_b_ex.fe_len, ac->ac_g_ex.fe_len);
-+	ret = mb_mark_used(e3b, &ac->ac_b_ex);
-+
-+	ac->ac_status = AC_STATUS_FOUND;
-+	ac->ac_tail = ret & 0xffff;
-+	ac->ac_buddy = ret >> 16;
-+
-+	/* hold in-core structures until allocated
-+	 * blocks are marked non-free in on-disk bitmap */
-+	ac->ac_buddy_page = e3b->bd_buddy_page;
-+	page_cache_get(e3b->bd_buddy_page);
-+	ac->ac_bitmap_page = e3b->bd_bitmap_page;
-+	page_cache_get(e3b->bd_bitmap_page);
-+}
-+
-+/*
-+ * The routine checks whether found extent is good enough. If it is,
-+ * then the extent gets marked used and flag is set to the context
-+ * to stop scanning. Otherwise, the extent is compared with the
-+ * previous found extent and if new one is better, then it's stored
-+ * in the context. Later, the best found extent will be used, if
-+ * mballoc can't find good enough extent.
-+ *
-+ * FIXME: real allocation policy is to be designed yet!
-+ */
-+static void ext3_mb_measure_extent(struct ext3_allocation_context *ac,
-+					struct ext3_free_extent *ex,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent *bex = &ac->ac_b_ex;
-+	struct ext3_free_extent *gex = &ac->ac_g_ex;
-+
-+	J_ASSERT(ex->fe_len > 0);
-+	J_ASSERT(ex->fe_len < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+	J_ASSERT(ex->fe_start < (1 << ac->ac_sb->s_blocksize_bits) * 8);
-+
-+	ac->ac_found++;
-+
-+	/*
-+	 * The special case - take what you catch first
-+	 */
-+	if (unlikely(ac->ac_flags & EXT3_MB_HINT_FIRST)) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * Let's check whether the chunk is good enough
-+	 */
-+	if (ex->fe_len == gex->fe_len) {
-+		*bex = *ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+		return;
-+	}
-+
-+	/*
-+	 * If this is first found extent, just store it in the context
-+	 */
-+	if (bex->fe_len == 0) {
-+		*bex = *ex;
-+		return;
-+	}
-+
-+	/*
-+	 * If new found extent is better, store it in the context
-+	 */
-+	if (bex->fe_len < gex->fe_len) {
-+		/* if the request isn't satisfied, any found extent
-+		 * larger than previous best one is better */
-+		if (ex->fe_len > bex->fe_len)
-+			*bex = *ex;
-+	} else if (ex->fe_len > gex->fe_len) {
-+		/* if the request is satisfied, then we try to find
-+		 * an extent that still satisfy the request, but is
-+		 * smaller than previous one */
-+		*bex = *ex;
-+	}
-+
-+	/*
-+	 * Let's scan at least few extents and don't pick up a first one
-+	 */
-+	if (bex->fe_len > gex->fe_len && ac->ac_found > ext3_mb_min_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+
-+	/*
-+	 * We don't want to scan for a whole year
-+	 */
-+	if (ac->ac_found > ext3_mb_max_to_scan)
-+		ac->ac_status = AC_STATUS_BREAK;
-+}
-+
-+static int ext3_mb_try_best_found(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct ext3_free_extent ex = ac->ac_b_ex;
-+	int group = ex.fe_group, max, err;
-+
-+	J_ASSERT(ex.fe_len > 0);
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ex.fe_start, ex.fe_len, &ex);
-+
-+	if (max > 0) {
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+static int ext3_mb_find_by_goal(struct ext3_allocation_context *ac,
-+				struct ext3_buddy *e3b)
-+{
-+	int group = ac->ac_g_ex.fe_group, max, err;
-+	struct ext3_sb_info *sbi = EXT3_SB(ac->ac_sb);
-+	struct ext3_super_block *es = sbi->s_es;
-+	struct ext3_free_extent ex;
-+
-+	err = ext3_mb_load_buddy(ac->ac_sb, group, e3b);
-+	if (err)
-+		return err;
-+
-+	ext3_lock_group(ac->ac_sb, group);
-+	max = mb_find_extent(e3b, 0, ac->ac_g_ex.fe_start,
-+			     ac->ac_g_ex.fe_len, &ex);
-+
-+	if (max >= ac->ac_g_ex.fe_len && ac->ac_g_ex.fe_len == sbi->s_stripe) {
-+		unsigned long start;
-+		start = (e3b->bd_group * EXT3_BLOCKS_PER_GROUP(ac->ac_sb) +
-+			ex.fe_start + le32_to_cpu(es->s_first_data_block));
-+		if (start % sbi->s_stripe == 0) {
-+			ac->ac_found++;
-+			ac->ac_b_ex = ex;
-+			ext3_mb_use_best_found(ac, e3b);
-+		}
-+	} else if (max >= ac->ac_g_ex.fe_len) {
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	} else if (max > 0 && (ac->ac_flags & EXT3_MB_HINT_MERGE)) {
-+		/* Sometimes, caller may want to merge even small
-+		 * number of blocks to an existing extent */
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(ex.fe_group == ac->ac_g_ex.fe_group);
-+		J_ASSERT(ex.fe_start == ac->ac_g_ex.fe_start);
-+		ac->ac_found++;
-+		ac->ac_b_ex = ex;
-+		ext3_mb_use_best_found(ac, e3b);
-+	}
-+	ext3_unlock_group(ac->ac_sb, group);
-+
-+	ext3_mb_release_desc(e3b);
-+
-+	return 0;
-+}
-+
-+/*
-+ * The routine scans buddy structures (not bitmap!) from given order
-+ * to max order and tries to find big enough chunk to satisfy the req
-+ */
-+static void ext3_mb_simple_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_group_info *grp = e3b->bd_info;
-+	void *buddy;
-+	int i, k, max;
-+
-+	J_ASSERT(ac->ac_2order > 0);
-+	for (i = ac->ac_2order; i <= sb->s_blocksize_bits + 1; i++) {
-+		if (grp->bb_counters[i] == 0)
-+			continue;
-+
-+		buddy = mb_find_buddy(e3b, i, &max);
-+		if (buddy == NULL) {
-+			printk(KERN_ALERT "looking for wrong order?\n");
-+			break;
-+		}
-+
-+		k = mb_find_next_zero_bit(buddy, max, 0);
-+		J_ASSERT(k < max);
-+
-+		ac->ac_found++;
-+
-+		ac->ac_b_ex.fe_len = 1 << i;
-+		ac->ac_b_ex.fe_start = k << i;
-+		ac->ac_b_ex.fe_group = e3b->bd_group;
-+
-+		ext3_mb_use_best_found(ac, e3b);
-+		J_ASSERT(ac->ac_b_ex.fe_len == ac->ac_g_ex.fe_len);
-+
-+		if (unlikely(ext3_mb_stats))
-+			atomic_inc(&EXT3_SB(sb)->s_bal_2orders);
-+
-+		break;
-+	}
-+}
-+
-+/*
-+ * The routine scans the group and measures all found extents.
-+ * In order to optimize scanning, caller must pass number of
-+ * free blocks in the group, so the routine can know upper limit.
-+ */
-+static void ext3_mb_complex_scan_group(struct ext3_allocation_context *ac,
-+					struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	int i, free;
-+
-+	free = e3b->bd_info->bb_free;
-+	J_ASSERT(free > 0);
-+
-+	i = e3b->bd_info->bb_first_free;
-+
-+	while (free && ac->ac_status == AC_STATUS_CONTINUE) {
-+		i = mb_find_next_zero_bit(bitmap, sb->s_blocksize * 8, i);
-+		if (i >= sb->s_blocksize * 8) {
-+			J_ASSERT(free == 0);
-+			break;
-+		}
-+
-+		mb_find_extent(e3b, 0, i, ac->ac_g_ex.fe_len, &ex);
-+		J_ASSERT(ex.fe_len > 0);
-+		J_ASSERT(free >= ex.fe_len);
-+
-+		ext3_mb_measure_extent(ac, &ex, e3b);
-+
-+		i += ex.fe_len;
-+		free -= ex.fe_len;
-+	}
-+}
-+
-+/*
-+ * This is a special case for storages like raid5
-+ * we try to find stripe-aligned chunks for stripe-size requests
-+ */
-+static void ext3_mb_scan_aligned(struct ext3_allocation_context *ac,
-+				 struct ext3_buddy *e3b)
-+{
-+	struct super_block *sb = ac->ac_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	void *bitmap = EXT3_MB_BITMAP(e3b);
-+	struct ext3_free_extent ex;
-+	unsigned long i, max;
-+
-+	J_ASSERT(sbi->s_stripe != 0);
-+
-+	/* find first stripe-aligned block */
-+	i = e3b->bd_group * EXT3_BLOCKS_PER_GROUP(sb) +
-+		le32_to_cpu(sbi->s_es->s_first_data_block);
-+	i = ((i + sbi->s_stripe - 1) / sbi->s_stripe) * sbi->s_stripe;
-+	i = (i - le32_to_cpu(sbi->s_es->s_first_data_block)) %
-+		EXT3_BLOCKS_PER_GROUP(sb);
-+
-+	while (i < sb->s_blocksize * 8) {
-+		if (!mb_test_bit(i, bitmap)) {
-+			max = mb_find_extent(e3b, 0, i, sbi->s_stripe, &ex);
-+			if (max >= sbi->s_stripe) {
-+				ac->ac_found++;
-+				ac->ac_b_ex = ex;
-+				ext3_mb_use_best_found(ac, e3b);
-+				break;
-+			}
-+		}
-+		i += sbi->s_stripe;
-+	}
-+}
-+
-+static int ext3_mb_good_group(struct ext3_allocation_context *ac,
-+				int group, int cr)
-+{
-+	struct ext3_group_info *grp = EXT3_GROUP_INFO(ac->ac_sb, group);
-+	unsigned free, fragments, i, bits;
-+
-+	J_ASSERT(cr >= 0 && cr < 4);
-+	J_ASSERT(!EXT3_MB_GRP_NEED_INIT(grp));
-+
-+	free = grp->bb_free;
-+	fragments = grp->bb_fragments;
-+	if (free == 0)
-+		return 0;
-+	if (fragments == 0)
-+		return 0;
-+
-+	switch (cr) {
-+		case 0:
-+			J_ASSERT(ac->ac_2order != 0);
-+			bits = ac->ac_sb->s_blocksize_bits + 1;
-+			for (i = ac->ac_2order; i <= bits; i++)
-+				if (grp->bb_counters[i] > 0)
-+					return 1;
-+			break;
-+		case 1:
-+			if ((free / fragments) >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 2:
-+			if (free >= ac->ac_g_ex.fe_len)
-+				return 1;
-+			break;
-+		case 3:
-+			return 1;
-+		default:
-+			BUG();
-+	}
-+
-+	return 0;
-+}
-+
-+int ext3_mb_new_blocks(handle_t *handle, struct inode *inode,
-+		       unsigned long goal, int *len, int flags, int *errp)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_allocation_context ac;
-+	int i, group, block, cr, err = 0;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	struct buffer_head *gdp_bh;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+
-+	J_ASSERT(len != NULL);
-+	J_ASSERT(*len > 0);
-+
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk("ext3_mb_new_nblocks: nonexistent device");
-+		return 0;
-+	}
-+
-+	if (!test_opt(sb, MBALLOC)) {
-+		static int ext3_mballoc_warning = 0;
-+		if (ext3_mballoc_warning == 0) {
-+			printk(KERN_ERR "EXT3-fs: multiblock request with "
-+				"mballoc disabled!\n");
-+			ext3_mballoc_warning++;
-+		}
-+		*len = 1;
-+		err = ext3_new_block_old(handle, inode, goal, errp);
-+		return err;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+
-+	/*
-+	 * We can't allocate > group size
-+	 */
-+	if (*len >= EXT3_BLOCKS_PER_GROUP(sb) - 10)
-+		*len = EXT3_BLOCKS_PER_GROUP(sb) - 10;
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* someone asks for non-reserved blocks */
-+		BUG_ON(*len > 1);
-+		err = ext3_mb_reserve_blocks(sb, 1);
-+		if (err) {
-+			*errp = err;
-+			return 0;
-+		}
-+	}
-+
-+	ac.ac_buddy_page = NULL;
-+	ac.ac_bitmap_page = NULL;
-+
-+	/*
-+	 * Check quota for allocation of this blocks.
-+	 */
-+	while (*len && DQUOT_ALLOC_BLOCK(inode, *len))
-+		*len -= 1;
-+	if (*len == 0) {
-+		*errp = -EDQUOT;
-+		block = 0;
-+		goto out;
-+	}
-+
-+	/* start searching from the goal */
-+	if (goal < le32_to_cpu(es->s_first_data_block) ||
-+	    goal >= le32_to_cpu(es->s_blocks_count))
-+		goal = le32_to_cpu(es->s_first_data_block);
-+	group = (goal - le32_to_cpu(es->s_first_data_block)) /
-+			EXT3_BLOCKS_PER_GROUP(sb);
-+	block = ((goal - le32_to_cpu(es->s_first_data_block)) %
-+			EXT3_BLOCKS_PER_GROUP(sb));
-+
-+	/* set up allocation goals */
-+	ac.ac_b_ex.fe_group = 0;
-+	ac.ac_b_ex.fe_start = 0;
-+	ac.ac_b_ex.fe_len = 0;
-+	ac.ac_status = AC_STATUS_CONTINUE;
-+	ac.ac_groups_scanned = 0;
-+	ac.ac_ex_scanned = 0;
-+	ac.ac_found = 0;
-+	ac.ac_sb = inode->i_sb;
-+	ac.ac_g_ex.fe_group = group;
-+	ac.ac_g_ex.fe_start = block;
-+	ac.ac_g_ex.fe_len = *len;
-+	ac.ac_flags = flags;
-+	ac.ac_2order = 0;
-+	ac.ac_criteria = 0;
-+
-+	if (*len == 1 && sbi->s_stripe) {
-+		/* looks like a metadata, let's use a dirty hack for raid5
-+		 * move all metadata in first groups in hope to hit cached
-+		 * sectors and thus avoid read-modify cycles in raid5 */
-+		ac.ac_g_ex.fe_group = group = 0;
-+	}
-+
-+	/* probably, the request is for 2^8+ blocks (1/2/3/... MB) */
-+	i = ffs(*len);
-+	if (i >= ext3_mb_order2_reqs) {
-+		i--;
-+		if ((*len & (~(1 << i))) == 0)
-+			ac.ac_2order = i;
-+	}
-+
-+	/* first, try the goal */
-+	err = ext3_mb_find_by_goal(&ac, &e3b);
-+	if (err)
-+		goto out_err;
-+	if (ac.ac_status == AC_STATUS_FOUND)
-+		goto found;
-+
-+	/* Let's just scan groups to find more-less suitable blocks */
-+	cr = ac.ac_2order ? 0 : 1;
-+repeat:
-+	for (; cr < 4 && ac.ac_status == AC_STATUS_CONTINUE; cr++) {
-+		ac.ac_criteria = cr;
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; group++, i++) {
-+			if (group == EXT3_SB(sb)->s_groups_count)
-+				group = 0;
-+
-+			if (EXT3_MB_GRP_NEED_INIT(EXT3_GROUP_INFO(sb, group))) {
-+				/* we need full data about the group
-+				 * to make a good selection */
-+				err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+				if (err)
-+					goto out_err;
-+				ext3_mb_release_desc(&e3b);
-+			}
-+
-+			/* check is group good for our criteries */
-+			if (!ext3_mb_good_group(&ac, group, cr))
-+				continue;
-+
-+			err = ext3_mb_load_buddy(ac.ac_sb, group, &e3b);
-+			if (err)
-+				goto out_err;
-+
-+			ext3_lock_group(sb, group);
-+			if (!ext3_mb_good_group(&ac, group, cr)) {
-+				/* someone did allocation from this group */
-+				ext3_unlock_group(sb, group);
-+				ext3_mb_release_desc(&e3b);
-+				continue;
-+			}
-+
-+			ac.ac_groups_scanned++;
-+			if (cr == 0)
-+				ext3_mb_simple_scan_group(&ac, &e3b);
-+			else if (cr == 1 && *len == sbi->s_stripe)
-+				ext3_mb_scan_aligned(&ac, &e3b);
-+			else
-+				ext3_mb_complex_scan_group(&ac, &e3b);
-+
-+			ext3_unlock_group(sb, group);
-+
-+			ext3_mb_release_desc(&e3b);
-+
-+			if (ac.ac_status != AC_STATUS_CONTINUE)
-+				break;
-+		}
-+	}
-+
-+	if (ac.ac_b_ex.fe_len > 0 && ac.ac_status != AC_STATUS_FOUND &&
-+	    !(ac.ac_flags & EXT3_MB_HINT_FIRST)) {
-+		/*
-+		 * We've been searching too long. Let's try to allocate
-+		 * the best chunk we've found so far
-+		 */
-+
-+		/*if (ac.ac_found > ext3_mb_max_to_scan)
-+			printk(KERN_DEBUG "EXT3-fs: too long searching at "
-+				"%u (%d/%d)\n", cr, ac.ac_b_ex.fe_len,
-+				ac.ac_g_ex.fe_len);*/
-+		ext3_mb_try_best_found(&ac, &e3b);
-+		if (ac.ac_status != AC_STATUS_FOUND) {
-+			/*
-+			 * Someone more lucky has already allocated it.
-+			 * The only thing we can do is just take first
-+			 * found block(s)
-+			printk(KERN_DEBUG "EXT3-fs: someone won our chunk\n");
-+			 */
-+			ac.ac_b_ex.fe_group = 0;
-+			ac.ac_b_ex.fe_start = 0;
-+			ac.ac_b_ex.fe_len = 0;
-+			ac.ac_status = AC_STATUS_CONTINUE;
-+			ac.ac_flags |= EXT3_MB_HINT_FIRST;
-+			cr = 3;
-+			goto repeat;
-+		}
-+	}
-+
-+	if (ac.ac_status != AC_STATUS_FOUND) {
-+		/*
-+		 * We aren't lucky definitely
-+		 */
-+		DQUOT_FREE_BLOCK(inode, *len);
-+		*errp = -ENOSPC;
-+		block = 0;
-+#if 1
-+		printk(KERN_ERR "EXT3-fs: can't allocate: status %d flags %d\n",
-+			ac.ac_status, ac.ac_flags);
-+		printk(KERN_ERR "EXT3-fs: goal %d, best found %d/%d/%d cr %d\n",
-+			ac.ac_g_ex.fe_len, ac.ac_b_ex.fe_group,
-+			ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len, cr);
-+		printk(KERN_ERR "EXT3-fs: %lu block reserved, %d found\n",
-+			sbi->s_blocks_reserved, ac.ac_found);
-+		printk("EXT3-fs: groups: ");
-+		for (i = 0; i < EXT3_SB(sb)->s_groups_count; i++)
-+			printk("%d: %d ", i, EXT3_GROUP_INFO(sb, i)->bb_free);
-+		printk("\n");
-+#endif
-+		goto out;
-+	}
-+
-+found:
-+	J_ASSERT(ac.ac_b_ex.fe_len > 0);
-+
-+	/* good news - free block(s) have been found. now it's time
-+	 * to mark block(s) in good old journaled bitmap */
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	/* we made a desicion, now mark found blocks in good old
-+	 * bitmap to be journaled */
-+
-+	ext3_debug("using block group %d(%d)\n",
-+			ac.ac_b_group.group, gdp->bg_free_blocks_count);
-+
-+	bitmap_bh = read_block_bitmap(sb, ac.ac_b_ex.fe_group);
-+	if (!bitmap_bh) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err) {
-+		*errp = err;
-+		goto out_err;
-+	}
-+
-+	gdp = ext3_get_group_desc(sb, ac.ac_b_ex.fe_group, &gdp_bh);
-+	if (!gdp) {
-+		*errp = -EIO;
-+		goto out_err;
-+	}
-+
-+	err = ext3_journal_get_write_access(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	block = ac.ac_b_ex.fe_group * EXT3_BLOCKS_PER_GROUP(sb)
-+			+ ac.ac_b_ex.fe_start
-+			+ le32_to_cpu(es->s_first_data_block);
-+
-+	if (block == le32_to_cpu(gdp->bg_block_bitmap) ||
-+	    block == le32_to_cpu(gdp->bg_inode_bitmap) ||
-+	    in_range(block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error(sb, "ext3_new_block",
-+			    "Allocating block in system zone - "
-+			    "block = %u", block);
-+#ifdef AGGRESSIVE_CHECK
-+	for (i = 0; i < ac.ac_b_ex.fe_len; i++)
-+		J_ASSERT(!mb_test_bit(ac.ac_b_ex.fe_start + i, bitmap_bh->b_data));
-+#endif
-+	mb_set_bits(bitmap_bh->b_data, ac.ac_b_ex.fe_start, ac.ac_b_ex.fe_len);
-+
-+	spin_lock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	gdp->bg_free_blocks_count =
-+			cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count)
-+					- ac.ac_b_ex.fe_len);
-+	spin_unlock(sb_bgl_lock(sbi, ac.ac_b_ex.fe_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, - ac.ac_b_ex.fe_len);
-+
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+	if (err)
-+		goto out_err;
-+	err = ext3_journal_dirty_metadata(handle, gdp_bh);
-+	if (err)
-+		goto out_err;
-+
-+	sb->s_dirt = 1;
-+	*errp = 0;
-+	brelse(bitmap_bh);
-+
-+	/* drop non-allocated, but dquote'd blocks */
-+	J_ASSERT(*len >= ac.ac_b_ex.fe_len);
-+	DQUOT_FREE_BLOCK(inode, *len - ac.ac_b_ex.fe_len);
-+
-+	*len = ac.ac_b_ex.fe_len;
-+	J_ASSERT(*len > 0);
-+	J_ASSERT(block != 0);
-+	goto out;
-+
-+out_err:
-+	/* if we've already allocated something, roll it back */
-+	if (ac.ac_status == AC_STATUS_FOUND) {
-+		/* FIXME: free blocks here */
-+	}
-+
-+	DQUOT_FREE_BLOCK(inode, *len);
-+	brelse(bitmap_bh);
-+	*errp = err;
-+	block = 0;
-+out:
-+	if (ac.ac_buddy_page)
-+		page_cache_release(ac.ac_buddy_page);
-+	if (ac.ac_bitmap_page)
-+		page_cache_release(ac.ac_bitmap_page);
-+
-+	if (!(flags & EXT3_MB_HINT_RESERVED)) {
-+		/* block wasn't reserved before and we reserved it
-+		 * at the beginning of allocation. it doesn't matter
-+		 * whether we allocated anything or we failed: time
-+		 * to release reservation. NOTE: because I expect
-+		 * any multiblock request from delayed allocation
-+		 * path only, here is single block always */
-+		ext3_mb_release_blocks(sb, 1);
-+	}
-+
-+	if (unlikely(ext3_mb_stats) && ac.ac_g_ex.fe_len > 1) {
-+		atomic_inc(&sbi->s_bal_reqs);
-+		atomic_add(*len, &sbi->s_bal_allocated);
-+		if (*len >= ac.ac_g_ex.fe_len)
-+			atomic_inc(&sbi->s_bal_success);
-+		atomic_add(ac.ac_found, &sbi->s_bal_ex_scanned);
-+		if (ac.ac_g_ex.fe_start == ac.ac_b_ex.fe_start &&
-+				ac.ac_g_ex.fe_group == ac.ac_b_ex.fe_group)
-+			atomic_inc(&sbi->s_bal_goals);
-+		if (ac.ac_found > ext3_mb_max_to_scan)
-+			atomic_inc(&sbi->s_bal_breaks);
-+	}
-+
-+	ext3_mb_store_history(sb, inode->i_ino, &ac);
-+
-+	return block;
-+}
-+EXPORT_SYMBOL(ext3_mb_new_blocks);
-+
-+#ifdef EXT3_MB_HISTORY
-+struct ext3_mb_proc_session {
-+	struct ext3_mb_history *history;
-+	struct super_block *sb;
-+	int start;
-+	int max;
-+};
-+
-+static void *ext3_mb_history_skip_empty(struct ext3_mb_proc_session *s,
-+					struct ext3_mb_history *hs,
-+					int first)
-+{
-+	if (hs == s->history + s->max)
-+		hs = s->history;
-+	if (!first && hs == s->history + s->start)
-+		return NULL;
-+	while (hs->goal.fe_len == 0) {
-+		hs++;
-+		if (hs == s->history + s->max)
-+			hs = s->history;
-+		if (hs == s->history + s->start)
-+			return NULL;
-+	}
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	hs = ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	if (!hs)
-+		return NULL;
-+	while (--l && (hs = ext3_mb_history_skip_empty(s, ++hs, 0)) != NULL);
-+	return hs;
-+}
-+
-+static void *ext3_mb_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct ext3_mb_proc_session *s = seq->private;
-+	struct ext3_mb_history *hs = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return ext3_mb_history_skip_empty(s, s->history + s->start, 1);
-+	else
-+		return ext3_mb_history_skip_empty(s, ++hs, 0);
-+}
-+
-+static int ext3_mb_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct ext3_mb_history *hs = v;
-+	char buf[20], buf2[20];
-+
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-5s %-8s %-17s %-17s %-5s %-5s %-2s %-5s %-5s %-6s\n",
-+			 "pid", "inode", "goal", "result", "found", "grps", "cr",
-+			 "merge", "tail", "broken");
-+		return 0;
-+	}
-+
-+	sprintf(buf, "%u/%u/%u", hs->goal.fe_group,
-+		hs->goal.fe_start, hs->goal.fe_len);
-+	sprintf(buf2, "%u/%u/%u", hs->result.fe_group,
-+		hs->result.fe_start, hs->result.fe_len);
-+	seq_printf(seq, "%-5u %-8u %-17s %-17s %-5u %-5u %-2u %-5s %-5u %-6u\n",
-+			hs->pid, hs->ino, buf, buf2, hs->found, hs->groups,
-+			hs->cr, hs->merged ? "M" : "", hs->tail,
-+			hs->buddy ? 1 << hs->buddy : 0);
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_history_ops = {
-+	.start  = ext3_mb_seq_history_start,
-+	.next   = ext3_mb_seq_history_next,
-+	.stop   = ext3_mb_seq_history_stop,
-+	.show   = ext3_mb_seq_history_show,
-+};
-+
-+static int ext3_mb_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct ext3_mb_history) * sbi->s_mb_history_max;
-+	s->history = kmalloc(size, GFP_KERNEL);
-+	if (s == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(s->history, sbi->s_mb_history, size);
-+	s->max = sbi->s_mb_history_max;
-+	s->start = sbi->s_mb_history_cur % s->max;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+
-+	rc = seq_open(file, &ext3_mb_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->history);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int ext3_mb_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct ext3_mb_proc_session *s = seq->private;
-+	kfree(s->history);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations ext3_mb_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_history_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= ext3_mb_seq_history_release,
-+};
-+
-+static void *ext3_mb_seq_groups_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+
-+	group = *pos + 1;
-+	return (void *) group;
-+}
-+
-+static void *ext3_mb_seq_groups_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct super_block *sb = seq->private;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	long group;
-+
-+	++*pos;
-+	if (*pos < 0 || *pos >= sbi->s_groups_count)
-+		return NULL;
-+	group = *pos + 1;
-+	return (void *) group;;
-+}
-+
-+static int ext3_mb_seq_groups_show(struct seq_file *seq, void *v)
-+{
-+	struct super_block *sb = seq->private;
-+	long group = (long) v, i;
-+	struct sg {
-+		struct ext3_group_info info;
-+		unsigned short counters[16];
-+	} sg;
-+
-+	group--;
-+	if (group == 0)
-+		seq_printf(seq, "#%-5s: %-5s %-5s %-5s [ %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s %-5s ]\n",
-+			 "group", "free", "frags", "first", "2^0", "2^1", "2^2",
-+			 "2^3", "2^4", "2^5", "2^6", "2^7", "2^8", "2^9", "2^10",
-+			 "2^11", "2^12", "2^13");
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(sg.info.bb_counters[0]) +
-+		sizeof(struct ext3_group_info);
-+	ext3_lock_group(sb, group);
-+	memcpy(&sg, EXT3_GROUP_INFO(sb, group), i);
-+	ext3_unlock_group(sb, group);
-+
-+	if (EXT3_MB_GRP_NEED_INIT(&sg.info))
-+		return 0;
-+
-+	seq_printf(seq, "#%-5lu: %-5u %-5u %-5u [", group, sg.info.bb_free,
-+			sg.info.bb_fragments, sg.info.bb_first_free);
-+	for (i = 0; i <= 13; i++)
-+		seq_printf(seq, " %-5u", i <= sb->s_blocksize_bits + 1 ?
-+				sg.info.bb_counters[i] : 0);
-+	seq_printf(seq, " ]\n");
-+
-+	return 0;
-+}
-+
-+static void ext3_mb_seq_groups_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations ext3_mb_seq_groups_ops = {
-+	.start  = ext3_mb_seq_groups_start,
-+	.next   = ext3_mb_seq_groups_next,
-+	.stop   = ext3_mb_seq_groups_stop,
-+	.show   = ext3_mb_seq_groups_show,
-+};
-+
-+static int ext3_mb_seq_groups_open(struct inode *inode, struct file *file)
-+{
-+	struct super_block *sb = PDE(inode)->data;
-+	int rc;
-+
-+	rc = seq_open(file, &ext3_mb_seq_groups_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = sb;
-+	}
-+	return rc;
-+
-+}
-+
-+static struct file_operations ext3_mb_seq_groups_fops = {
-+	.owner		= THIS_MODULE,
-+	.open		= ext3_mb_seq_groups_open,
-+	.read		= seq_read,
-+	.llseek		= seq_lseek,
-+	.release	= seq_release,
-+};
-+
-+static void ext3_mb_history_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	remove_proc_entry("mb_groups", sbi->s_mb_proc);
-+	remove_proc_entry("mb_history", sbi->s_mb_proc);
-+	remove_proc_entry(name, proc_root_ext3);
-+
-+	if (sbi->s_mb_history)
-+		kfree(sbi->s_mb_history);
-+}
-+
-+static void ext3_mb_history_init(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	char name[64];
-+	int i;
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(sb->s_bdev, name));
-+	sbi->s_mb_proc = proc_mkdir(name, proc_root_ext3);
-+	if (sbi->s_mb_proc != NULL) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("mb_history", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_history_fops;
-+			p->data = sb;
-+		}
-+		p = create_proc_entry("mb_groups", S_IRUGO, sbi->s_mb_proc);
-+		if (p) {
-+			p->proc_fops = &ext3_mb_seq_groups_fops;
-+			p->data = sb;
-+		}
-+	}
-+
-+	sbi->s_mb_history_max = 1000;
-+	sbi->s_mb_history_cur = 0;
-+	spin_lock_init(&sbi->s_mb_history_lock);
-+	i = sbi->s_mb_history_max * sizeof(struct ext3_mb_history);
-+	sbi->s_mb_history = kmalloc(i, GFP_KERNEL);
-+	memset(sbi->s_mb_history, 0, i);
-+	/* if we can't allocate history, then we simple won't use it */
-+}
-+
-+static void
-+ext3_mb_store_history(struct super_block *sb, unsigned ino,
-+			struct ext3_allocation_context *ac)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_mb_history h;
-+
-+	if (likely(sbi->s_mb_history == NULL))
-+		return;
-+
-+	h.pid = current->pid;
-+	h.ino = ino;
-+	h.goal = ac->ac_g_ex;
-+	h.result = ac->ac_b_ex;
-+	h.found = ac->ac_found;
-+	h.cr = ac->ac_criteria;
-+	h.groups = ac->ac_groups_scanned;
-+	h.tail = ac->ac_tail;
-+	h.buddy = ac->ac_buddy;
-+	h.merged = 0;
-+	if (ac->ac_g_ex.fe_start == ac->ac_b_ex.fe_start &&
-+			ac->ac_g_ex.fe_group == ac->ac_b_ex.fe_group)
-+		h.merged = 1;
-+
-+	spin_lock(&sbi->s_mb_history_lock);
-+	memcpy(sbi->s_mb_history + sbi->s_mb_history_cur, &h, sizeof(h));
-+	if (++sbi->s_mb_history_cur >= sbi->s_mb_history_max)
-+		sbi->s_mb_history_cur = 0;
-+	spin_unlock(&sbi->s_mb_history_lock);
-+}
-+
-+#else
-+#define ext3_mb_history_release(sb)
-+#define ext3_mb_history_init(sb)
-+#endif
-+
-+int ext3_mb_init_backend(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, j, len, metalen;
-+	int num_meta_group_infos =
-+		(sbi->s_groups_count + EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+	struct ext3_group_info **meta_group_info;
-+
-+	/* An 8TB filesystem with 64-bit pointers requires a 4096 byte
-+	 * kmalloc. A 128kb malloc should suffice for a 256TB filesystem.
-+	 * So a two level scheme suffices for now. */
-+	sbi->s_group_info = kmalloc(sizeof(*sbi->s_group_info) *
-+				    num_meta_group_infos, GFP_KERNEL);
-+	if (sbi->s_group_info == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't allocate buddy meta group\n");
-+		return -ENOMEM;
-+	}
-+	sbi->s_buddy_cache = new_inode(sb);
-+	if (sbi->s_buddy_cache == NULL) {
-+		printk(KERN_ERR "EXT3-fs: can't get new inode\n");
-+		goto err_freesgi;
-+	}
-+
-+	metalen = sizeof(*meta_group_info) << EXT3_DESC_PER_BLOCK_BITS(sb);
-+	for (i = 0; i < num_meta_group_infos; i++) {
-+		if ((i + 1) == num_meta_group_infos)
-+			metalen = sizeof(*meta_group_info) *
-+				(sbi->s_groups_count -
-+					(i << EXT3_DESC_PER_BLOCK_BITS(sb)));
-+		meta_group_info = kmalloc(metalen, GFP_KERNEL);
-+		if (meta_group_info == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate mem for a "
-+			       "buddy group\n");
-+			goto err_freemeta;
-+		}
-+		sbi->s_group_info[i] = meta_group_info;
-+	}
-+
-+	/*
-+	 * calculate needed size. if change bb_counters size,
-+	 * don't forget about ext3_mb_generate_buddy()
-+	 */
-+	len = sizeof(struct ext3_group_info);
-+	len += sizeof(unsigned short) * (sb->s_blocksize_bits + 2);
-+	for (i = 0; i < sbi->s_groups_count; i++) {
-+		struct ext3_group_desc * desc;
-+
-+		meta_group_info =
-+			sbi->s_group_info[i >> EXT3_DESC_PER_BLOCK_BITS(sb)];
-+		j = i & (EXT3_DESC_PER_BLOCK(sb) - 1);
-+
-+		meta_group_info[j] = kmalloc(len, GFP_KERNEL);
-+		if (meta_group_info[j] == NULL) {
-+			printk(KERN_ERR "EXT3-fs: can't allocate buddy mem\n");
-+			i--;
-+			goto err_freebuddy;
-+		}
-+		desc = ext3_get_group_desc(sb, i, NULL);
-+		if (desc == NULL) {
-+			printk(KERN_ERR"EXT3-fs: can't read descriptor %u\n",i);
-+			goto err_freebuddy;
-+		}
-+		memset(meta_group_info[j], 0, len);
-+		set_bit(EXT3_GROUP_INFO_NEED_INIT_BIT,
-+			&meta_group_info[j]->bb_state);
-+		meta_group_info[j]->bb_free =
-+			le16_to_cpu(desc->bg_free_blocks_count);
-+	}
-+
-+	return 0;
-+
-+err_freebuddy:
-+	while (i >= 0) {
-+		kfree(EXT3_GROUP_INFO(sb, i));
-+		i--;
-+	}
-+	i = num_meta_group_infos;
-+err_freemeta:
-+	while (--i >= 0)
-+		kfree(sbi->s_group_info[i]);
-+	iput(sbi->s_buddy_cache);
-+err_freesgi:
-+	kfree(sbi->s_group_info);
-+	return -ENOMEM;
-+}
-+
-+int ext3_mb_init(struct super_block *sb, int needs_recovery)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct inode *root = sb->s_root->d_inode;
-+	unsigned i, offset, max;
-+	struct dentry *dentry;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	i = (sb->s_blocksize_bits + 2) * sizeof(unsigned short);
-+
-+	sbi->s_mb_offsets = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_offsets == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		return -ENOMEM;
-+	}
-+	sbi->s_mb_maxs = kmalloc(i, GFP_KERNEL);
-+	if (sbi->s_mb_maxs == NULL) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_maxs);
-+		return -ENOMEM;
-+	}
-+
-+	 /* order 0 is regular bitmap */
-+	sbi->s_mb_maxs[0] = sb->s_blocksize << 3;
-+	sbi->s_mb_offsets[0] = 0;
-+
-+	i = 1;
-+	offset = 0;
-+	max = sb->s_blocksize << 2;
-+	do {
-+		sbi->s_mb_offsets[i] = offset;
-+		sbi->s_mb_maxs[i] = max;
-+		offset += 1 << (sb->s_blocksize_bits - i);
-+		max = max >> 1;
-+		i++;
-+	} while (i <= sb->s_blocksize_bits + 1);
-+
-+	/* init file for buddy data */
-+	if ((i = ext3_mb_init_backend(sb))) {
-+		clear_opt(sbi->s_mount_opt, MBALLOC);
-+		kfree(sbi->s_mb_offsets);
-+		kfree(sbi->s_mb_maxs);
-+		return i;
-+	}
-+
-+	spin_lock_init(&sbi->s_reserve_lock);
-+	spin_lock_init(&sbi->s_md_lock);
-+	INIT_LIST_HEAD(&sbi->s_active_transaction);
-+	INIT_LIST_HEAD(&sbi->s_closed_transaction);
-+	INIT_LIST_HEAD(&sbi->s_committed_transaction);
-+	spin_lock_init(&sbi->s_bal_lock);
-+
-+	/* remove old on-disk buddy file */
-+	down(&root->i_sem);
-+	dentry = lookup_one_len(".buddy", sb->s_root, strlen(".buddy"));
-+	if (dentry->d_inode != NULL) {
-+		i = vfs_unlink(root, dentry);
-+		if (i != 0)
-+			printk("EXT3-fs: can't remove .buddy file: %d\n", i);
-+	}
-+	dput(dentry);
-+	up(&root->i_sem);
-+
-+	ext3_mb_history_init(sb);
-+
-+	printk("EXT3-fs: mballoc enabled\n");
-+	return 0;
-+}
-+
-+int ext3_mb_release(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int i, num_meta_group_infos;
-+
-+	if (!test_opt(sb, MBALLOC))
-+		return 0;
-+
-+	/* release freed, non-committed blocks */
-+	spin_lock(&sbi->s_md_lock);
-+	list_splice_init(&sbi->s_closed_transaction,
-+			&sbi->s_committed_transaction);
-+	list_splice_init(&sbi->s_active_transaction,
-+			&sbi->s_committed_transaction);
-+	spin_unlock(&sbi->s_md_lock);
-+	ext3_mb_free_committed_blocks(sb);
-+
-+	if (sbi->s_group_info) {
-+		for (i = 0; i < sbi->s_groups_count; i++)
-+			kfree(EXT3_GROUP_INFO(sb, i));
-+		num_meta_group_infos = (sbi->s_groups_count +
-+			EXT3_DESC_PER_BLOCK(sb) - 1) >>
-+			EXT3_DESC_PER_BLOCK_BITS(sb);
-+		for (i = 0; i < num_meta_group_infos; i++)
-+			kfree(sbi->s_group_info[i]);
-+		kfree(sbi->s_group_info);
-+	}
-+	if (sbi->s_mb_offsets)
-+		kfree(sbi->s_mb_offsets);
-+	if (sbi->s_mb_maxs)
-+		kfree(sbi->s_mb_maxs);
-+	if (sbi->s_buddy_cache)
-+		iput(sbi->s_buddy_cache);
-+	if (sbi->s_blocks_reserved)
-+		printk("ext3-fs: %ld blocks being reserved at umount!\n",
-+				sbi->s_blocks_reserved);
-+	if (ext3_mb_stats) {
-+		printk("EXT3-fs: mballoc: %u blocks %u reqs (%u success)\n",
-+			atomic_read(&sbi->s_bal_allocated),
-+			atomic_read(&sbi->s_bal_reqs),
-+			atomic_read(&sbi->s_bal_success));
-+		printk("EXT3-fs: mballoc: %u extents scanned, %u goal hits, "
-+			"%u 2^N hits, %u breaks\n",
-+			atomic_read(&sbi->s_bal_ex_scanned),
-+			atomic_read(&sbi->s_bal_goals),
-+			atomic_read(&sbi->s_bal_2orders),
-+			atomic_read(&sbi->s_bal_breaks));
-+		printk("EXT3-fs: mballoc: %lu generated and it took %Lu\n",
-+			sbi->s_mb_buddies_generated++,
-+			sbi->s_mb_generation_time);
-+	}
-+
-+	ext3_mb_history_release(sb);
-+
-+	return 0;
-+}
-+
-+void ext3_mb_free_committed_blocks(struct super_block *sb)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int err, i, count = 0, count2 = 0;
-+	struct ext3_free_metadata *md;
-+	struct ext3_buddy e3b;
-+
-+	if (list_empty(&sbi->s_committed_transaction))
-+		return;
-+
-+	/* there is committed blocks to be freed yet */
-+	do {
-+		/* get next array of blocks */
-+		md = NULL;
-+		spin_lock(&sbi->s_md_lock);
-+		if (!list_empty(&sbi->s_committed_transaction)) {
-+			md = list_entry(sbi->s_committed_transaction.next,
-+					struct ext3_free_metadata, list);
-+			list_del(&md->list);
-+		}
-+		spin_unlock(&sbi->s_md_lock);
-+
-+		if (md == NULL)
-+			break;
-+
-+		mb_debug("gonna free %u blocks in group %u (0x%p):",
-+				md->num, md->group, md);
-+
-+		err = ext3_mb_load_buddy(sb, md->group, &e3b);
-+		/* we expect to find existing buddy because it's pinned */
-+		BUG_ON(err != 0);
-+
-+		/* there are blocks to put in buddy to make them really free */
-+		count += md->num;
-+		count2++;
-+		ext3_lock_group(sb, md->group);
-+		for (i = 0; i < md->num; i++) {
-+			mb_debug(" %u", md->blocks[i]);
-+			mb_free_blocks(&e3b, md->blocks[i], 1);
-+		}
-+		mb_debug("\n");
-+		ext3_unlock_group(sb, md->group);
-+
-+		/* balance refcounts from ext3_mb_free_metadata() */
-+		page_cache_release(e3b.bd_buddy_page);
-+		page_cache_release(e3b.bd_bitmap_page);
-+
-+		kfree(md);
-+		ext3_mb_release_desc(&e3b);
-+
-+	} while (md);
-+	mb_debug("freed %u blocks in %u structures\n", count, count2);
-+}
-+
-+void ext3_mb_poll_new_transaction(struct super_block *sb, handle_t *handle)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	if (sbi->s_last_transaction == handle->h_transaction->t_tid)
-+		return;
-+
-+	/* new transaction! time to close last one and free blocks for
-+	 * committed transaction. we know that only transaction can be
-+	 * active, so previos transaction can be being logged and we
-+	 * know that transaction before previous is known to be already
-+	 * logged. this means that now we may free blocks freed in all
-+	 * transactions before previous one. hope I'm clear enough ... */
-+
-+	spin_lock(&sbi->s_md_lock);
-+	if (sbi->s_last_transaction != handle->h_transaction->t_tid) {
-+		mb_debug("new transaction %lu, old %lu\n",
-+				(unsigned long) handle->h_transaction->t_tid,
-+				(unsigned long) sbi->s_last_transaction);
-+		list_splice_init(&sbi->s_closed_transaction,
-+					&sbi->s_committed_transaction);
-+		list_splice_init(&sbi->s_active_transaction,
-+					&sbi->s_closed_transaction);
-+		sbi->s_last_transaction = handle->h_transaction->t_tid;
-+	}
-+	spin_unlock(&sbi->s_md_lock);
-+
-+	ext3_mb_free_committed_blocks(sb);
-+}
-+
-+int ext3_mb_free_metadata(handle_t *handle, struct ext3_buddy *e3b,
-+				int group, int block, int count)
-+{
-+	struct ext3_group_info *db = e3b->bd_info;
-+	struct super_block *sb = e3b->bd_sb;
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	struct ext3_free_metadata *md;
-+	int i;
-+
-+	J_ASSERT(e3b->bd_bitmap_page != NULL);
-+	J_ASSERT(e3b->bd_buddy_page != NULL);
-+
-+	ext3_lock_group(sb, group);
-+	for (i = 0; i < count; i++) {
-+		md = db->bb_md_cur;
-+		if (md && db->bb_tid != handle->h_transaction->t_tid) {
-+			db->bb_md_cur = NULL;
-+			md = NULL;
-+		}
-+
-+		if (md == NULL) {
-+			ext3_unlock_group(sb, group);
-+			md = kmalloc(sizeof(*md), GFP_KERNEL);
-+			if (md == NULL)
-+				return -ENOMEM;
-+			md->num = 0;
-+			md->group = group;
-+
-+			ext3_lock_group(sb, group);
-+			if (db->bb_md_cur == NULL) {
-+				spin_lock(&sbi->s_md_lock);
-+				list_add(&md->list, &sbi->s_active_transaction);
-+				spin_unlock(&sbi->s_md_lock);
-+				/* protect buddy cache from being freed,
-+				 * otherwise we'll refresh it from
-+				 * on-disk bitmap and lose not-yet-available
-+				 * blocks */
-+				page_cache_get(e3b->bd_buddy_page);
-+				page_cache_get(e3b->bd_bitmap_page);
-+				db->bb_md_cur = md;
-+				db->bb_tid = handle->h_transaction->t_tid;
-+				mb_debug("new md 0x%p for group %u\n",
-+							md, md->group);
-+			} else {
-+				kfree(md);
-+				md = db->bb_md_cur;
-+			}
-+		}
-+
-+		BUG_ON(md->num >= EXT3_BB_MAX_BLOCKS);
-+		md->blocks[md->num] = block + i;
-+		md->num++;
-+		if (md->num == EXT3_BB_MAX_BLOCKS) {
-+			/* no more space, put full container on a sb's list */
-+			db->bb_md_cur = NULL;
-+		}
-+	}
-+	ext3_unlock_group(sb, group);
-+	return 0;
-+}
-+
-+void ext3_mb_free_blocks(handle_t *handle, struct inode *inode,
-+			unsigned long block, unsigned long count,
-+			int metadata, int *freed)
-+{
-+	struct buffer_head *bitmap_bh = NULL;
-+	struct ext3_group_desc *gdp;
-+	struct ext3_super_block *es;
-+	unsigned long bit, overflow;
-+	struct buffer_head *gd_bh;
-+	unsigned long block_group;
-+	struct ext3_sb_info *sbi;
-+	struct super_block *sb;
-+	struct ext3_buddy e3b;
-+	int err = 0, ret;
-+
-+	*freed = 0;
-+	sb = inode->i_sb;
-+	if (!sb) {
-+		printk ("ext3_free_blocks: nonexistent device");
-+		return;
-+	}
-+
-+	ext3_mb_poll_new_transaction(sb, handle);
-+
-+	sbi = EXT3_SB(sb);
-+	es = EXT3_SB(sb)->s_es;
-+	if (block < le32_to_cpu(es->s_first_data_block) ||
-+	    block + count < block ||
-+	    block + count > le32_to_cpu(es->s_blocks_count)) {
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks not in datazone - "
-+			    "block = %lu, count = %lu", block, count);
-+		goto error_return;
-+	}
-+
-+	ext3_debug("freeing block %lu\n", block);
-+
-+do_more:
-+	overflow = 0;
-+	block_group = (block - le32_to_cpu(es->s_first_data_block)) /
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	bit = (block - le32_to_cpu(es->s_first_data_block)) %
-+		      EXT3_BLOCKS_PER_GROUP(sb);
-+	/*
-+	 * Check to see if we are freeing blocks across a group
-+	 * boundary.
-+	 */
-+	if (bit + count > EXT3_BLOCKS_PER_GROUP(sb)) {
-+		overflow = bit + count - EXT3_BLOCKS_PER_GROUP(sb);
-+		count -= overflow;
-+	}
-+	brelse(bitmap_bh);
-+	bitmap_bh = read_block_bitmap(sb, block_group);
-+	if (!bitmap_bh)
-+		goto error_return;
-+	gdp = ext3_get_group_desc (sb, block_group, &gd_bh);
-+	if (!gdp)
-+		goto error_return;
-+
-+	if (in_range (le32_to_cpu(gdp->bg_block_bitmap), block, count) ||
-+	    in_range (le32_to_cpu(gdp->bg_inode_bitmap), block, count) ||
-+	    in_range (block, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group) ||
-+	    in_range (block + count - 1, le32_to_cpu(gdp->bg_inode_table),
-+		      EXT3_SB(sb)->s_itb_per_group))
-+		ext3_error (sb, "ext3_free_blocks",
-+			    "Freeing blocks in system zones - "
-+			    "Block = %lu, count = %lu",
-+			    block, count);
-+
-+	BUFFER_TRACE(bitmap_bh, "getting write access");
-+	err = ext3_journal_get_write_access(handle, bitmap_bh);
-+	if (err)
-+		goto error_return;
-+
-+	/*
-+	 * We are about to modify some metadata.  Call the journal APIs
-+	 * to unshare ->b_data if a currently-committing transaction is
-+	 * using it
-+	 */
-+	BUFFER_TRACE(gd_bh, "get_write_access");
-+	err = ext3_journal_get_write_access(handle, gd_bh);
-+	if (err)
-+		goto error_return;
-+
-+	err = ext3_mb_load_buddy(sb, block_group, &e3b);
-+	if (err)
-+		goto error_return;
-+
-+#ifdef AGGRESSIVE_CHECK
-+	{
-+		int i;
-+		for (i = 0; i < count; i++)
-+			J_ASSERT(mb_test_bit(bit + i, bitmap_bh->b_data));
-+	}
-+#endif
-+	mb_clear_bits(bitmap_bh->b_data, bit, count);
-+
-+	/* We dirtied the bitmap block */
-+	BUFFER_TRACE(bitmap_bh, "dirtied bitmap block");
-+	err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+
-+	if (metadata) {
-+		/* blocks being freed are metadata. these blocks shouldn't
-+		 * be used until this transaction is committed */
-+		ext3_mb_free_metadata(handle, &e3b, block_group, bit, count);
-+	} else {
-+		ext3_lock_group(sb, block_group);
-+		mb_free_blocks(&e3b, bit, count);
-+		ext3_unlock_group(sb, block_group);
-+	}
-+
-+	spin_lock(sb_bgl_lock(sbi, block_group));
-+	gdp->bg_free_blocks_count =
-+		cpu_to_le16(le16_to_cpu(gdp->bg_free_blocks_count) + count);
-+	spin_unlock(sb_bgl_lock(sbi, block_group));
-+	percpu_counter_mod(&sbi->s_freeblocks_counter, count);
-+
-+	ext3_mb_release_desc(&e3b);
-+
-+	*freed = count;
-+
-+	/* And the group descriptor block */
-+	BUFFER_TRACE(gd_bh, "dirtied group descriptor block");
-+	ret = ext3_journal_dirty_metadata(handle, gd_bh);
-+	if (!err) err = ret;
-+
-+	if (overflow && !err) {
-+		block += count;
-+		count = overflow;
-+		goto do_more;
-+	}
-+	sb->s_dirt = 1;
-+error_return:
-+	brelse(bitmap_bh);
-+	ext3_std_error(sb, err);
-+	return;
-+}
-+
-+int ext3_mb_reserve_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+	int free, ret = -ENOSPC;
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	free = percpu_counter_read_positive(&sbi->s_freeblocks_counter);
-+	if (blocks <= free - sbi->s_blocks_reserved) {
-+		sbi->s_blocks_reserved += blocks;
-+		ret = 0;
-+	}
-+	spin_unlock(&sbi->s_reserve_lock);
-+	return ret;
-+}
-+
-+void ext3_mb_release_blocks(struct super_block *sb, int blocks)
-+{
-+	struct ext3_sb_info *sbi = EXT3_SB(sb);
-+
-+	BUG_ON(blocks < 0);
-+	spin_lock(&sbi->s_reserve_lock);
-+	sbi->s_blocks_reserved -= blocks;
-+	WARN_ON(sbi->s_blocks_reserved < 0);
-+	if (sbi->s_blocks_reserved < 0)
-+		sbi->s_blocks_reserved = 0;
-+	spin_unlock(&sbi->s_reserve_lock);
-+}
-+
-+int ext3_new_block(handle_t *handle, struct inode *inode,
-+		unsigned long goal, int *errp)
-+{
-+	int ret, len;
-+
-+	if (!test_opt(inode->i_sb, MBALLOC)) {
-+		ret = ext3_new_block_old(handle, inode, goal, errp);
-+		goto out;
-+	}
-+	len = 1;
-+	ret = ext3_mb_new_blocks(handle, inode, goal, &len, 0, errp);
-+out:
-+	return ret;
-+}
-+
-+
-+void ext3_free_blocks(handle_t *handle, struct inode * inode,
-+			unsigned long block, unsigned long count, int metadata)
-+{
-+	struct super_block *sb;
-+	int freed;
-+
-+	sb = inode->i_sb;
-+	if (!test_opt(sb, MBALLOC) || !EXT3_SB(sb)->s_group_info)
-+		ext3_free_blocks_sb(handle, sb, block, count, &freed);
-+	else
-+		ext3_mb_free_blocks(handle, inode, block, count, metadata, &freed);
-+	if (freed)
-+		DQUOT_FREE_BLOCK(inode, freed);
-+	return;
-+}
-+
-+#define EXT3_ROOT		   "ext3"
-+#define EXT3_MB_STATS_NAME	   "mb_stats"
-+#define EXT3_MB_MAX_TO_SCAN_NAME  "mb_max_to_scan"
-+#define EXT3_MB_MIN_TO_SCAN_NAME  "mb_min_to_scan"
-+#define EXT3_MB_ORDER2_REQ	   "mb_order2_req"
-+
-+static int ext3_mb_stats_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_stats);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_stats_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_STATS_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	ext3_mb_stats = (simple_strtol(str, NULL, 0) != 0);
-+	return count;
-+}
-+
-+static int ext3_mb_max_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_max_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_max_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MAX_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_max_to_scan = value;
-+
-+	return count;
-+}
-+
-+static int ext3_mb_min_to_scan_read(char *page, char **start, off_t off,
-+		int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_min_to_scan);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_min_to_scan_write(struct file *file, const char *buffer,
-+		unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_min_to_scan = value;
-+
-+	return count;
-+}
-+
-+static int ext3_mb_order2_req_read(char *page, char **start, off_t off,
-+				   int count, int *eof, void *data)
-+{
-+	int len;
-+
-+	*eof = 1;
-+	if (off != 0)
-+		return 0;
-+
-+	len = sprintf(page, "%ld\n", ext3_mb_order2_reqs);
-+	*start = page;
-+	return len;
-+}
-+
-+static int ext3_mb_order2_req_write(struct file *file, const char *buffer,
-+				    unsigned long count, void *data)
-+{
-+	char str[32];
-+	long value;
-+
-+	if (count >= sizeof(str)) {
-+		printk(KERN_ERR "EXT3-fs: %s string too long, max %u bytes\n",
-+		       EXT3_MB_MIN_TO_SCAN_NAME, (int)sizeof(str));
-+		return -EOVERFLOW;
-+	}
-+
-+	if (copy_from_user(str, buffer, count))
-+		return -EFAULT;
-+
-+	/* Only set to 0 or 1 respectively; zero->0; non-zero->1 */
-+	value = simple_strtol(str, NULL, 0);
-+	if (value <= 0)
-+		return -ERANGE;
-+
-+	ext3_mb_order2_reqs = value;
-+
-+	return count;
-+}
-+
-+int __init init_ext3_proc(void)
-+{
-+	struct proc_dir_entry *proc_ext3_mb_stats;
-+	struct proc_dir_entry *proc_ext3_mb_max_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_min_to_scan;
-+	struct proc_dir_entry *proc_ext3_mb_order2_req;
-+
-+	proc_root_ext3 = proc_mkdir(EXT3_ROOT, proc_root_fs);
-+	if (proc_root_ext3 == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n", EXT3_ROOT);
-+		return -EIO;
-+	}
-+
-+	/* Initialize EXT3_MB_STATS_NAME */
-+	proc_ext3_mb_stats = create_proc_entry(EXT3_MB_STATS_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_stats == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_STATS_NAME);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_stats->data = NULL;
-+	proc_ext3_mb_stats->read_proc  = ext3_mb_stats_read;
-+	proc_ext3_mb_stats->write_proc = ext3_mb_stats_write;
-+
-+	/* Initialize EXT3_MAX_TO_SCAN_NAME */
-+	proc_ext3_mb_max_to_scan = create_proc_entry(
-+			EXT3_MB_MAX_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_max_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MAX_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_max_to_scan->data = NULL;
-+	proc_ext3_mb_max_to_scan->read_proc  = ext3_mb_max_to_scan_read;
-+	proc_ext3_mb_max_to_scan->write_proc = ext3_mb_max_to_scan_write;
-+
-+	/* Initialize EXT3_MIN_TO_SCAN_NAME */
-+	proc_ext3_mb_min_to_scan = create_proc_entry(
-+			EXT3_MB_MIN_TO_SCAN_NAME,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_min_to_scan == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_MIN_TO_SCAN_NAME);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_min_to_scan->data = NULL;
-+	proc_ext3_mb_min_to_scan->read_proc  = ext3_mb_min_to_scan_read;
-+	proc_ext3_mb_min_to_scan->write_proc = ext3_mb_min_to_scan_write;
-+
-+	/* Initialize EXT3_ORDER2_REQ */
-+	proc_ext3_mb_order2_req = create_proc_entry(
-+			EXT3_MB_ORDER2_REQ,
-+			S_IFREG | S_IRUGO | S_IWUSR, proc_root_ext3);
-+	if (proc_ext3_mb_order2_req == NULL) {
-+		printk(KERN_ERR "EXT3-fs: Unable to create %s\n",
-+				EXT3_MB_ORDER2_REQ);
-+		remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+		remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+		return -EIO;
-+	}
-+
-+	proc_ext3_mb_order2_req->data = NULL;
-+	proc_ext3_mb_order2_req->read_proc  = ext3_mb_order2_req_read;
-+	proc_ext3_mb_order2_req->write_proc = ext3_mb_order2_req_write;
-+
-+	return 0;
-+}
-+
-+void exit_ext3_proc(void)
-+{
-+	remove_proc_entry(EXT3_MB_STATS_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MAX_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_MIN_TO_SCAN_NAME, proc_root_ext3);
-+	remove_proc_entry(EXT3_MB_ORDER2_REQ, proc_root_ext3);
-+	remove_proc_entry(EXT3_ROOT, proc_root_fs);
-+}
-Index: linux-2.6.9-full/fs/ext3/Makefile
-===================================================================
---- linux-2.6.9-full.orig/fs/ext3/Makefile	2006-06-01 14:58:46.000000000 +0400
-+++ linux-2.6.9-full/fs/ext3/Makefile	2006-10-24 12:54:31.000000000 +0400
-@@ -6,7 +6,7 @@ obj-$(CONFIG_EXT3_FS) += ext3.o
- 
- ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o \
--	   extents.o
-+	   extents.o mballoc.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
- ext3-$(CONFIG_EXT3_FS_POSIX_ACL) += acl.o
diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch
deleted file mode 100644
index de039fca901fa13a1823363ff17810c4c0ed17f1..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-rhel4.patch
+++ /dev/null
@@ -1,401 +0,0 @@
-Index: linux-stage/fs/ext3/ialloc.c
-===================================================================
---- linux-stage.orig/fs/ext3/ialloc.c
-+++ linux-stage/fs/ext3/ialloc.c
-@@ -726,7 +726,8 @@ got:
- 	/* This is the optimal IO size (for stat), not the fs block size */
- 	inode->i_blksize = PAGE_SIZE;
- 	inode->i_blocks = 0;
--	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
-+						       ext3_current_time(inode);
- 
- 	memset(ei->i_data, 0, sizeof(ei->i_data));
- 	ei->i_next_alloc_block = 0;
-@@ -764,9 +765,8 @@ got:
- 	spin_unlock(&sbi->s_next_gen_lock);
- 
- 	ei->i_state = EXT3_STATE_NEW;
--	ei->i_extra_isize =
--		(EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
--		sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
-+
-+	ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize;
- 
- 	ret = inode;
- 	if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c
-+++ linux-stage/fs/ext3/inode.c
-@@ -627,7 +627,7 @@ static int ext3_splice_branch(handle_t *
- 
- 	/* We are done with atomic stuff, now do the rest of housekeeping */
- 
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* had we spliced it onto indirect block? */
-@@ -2230,7 +2230,7 @@ do_indirects:
- 			;
- 	}
- 	up(&ei->truncate_sem);
--	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_mtime = inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* In a multi-transaction truncate, we only make the final
-@@ -2457,10 +2457,6 @@ void ext3_read_inode(struct inode * inod
- 	}
- 	inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
- 	inode->i_size = le32_to_cpu(raw_inode->i_size);
--	inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime);
--	inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime);
--	inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime);
--	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
- 
- 	ei->i_state = 0;
- 	ei->i_next_alloc_block = 0;
-@@ -2521,6 +2517,11 @@ void ext3_read_inode(struct inode * inod
- 	else
- 		ei->i_extra_isize = 0;
- 
-+	EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode);
-+	EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode);
-+	EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode);
-+	EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
-+
- 	if (S_ISREG(inode->i_mode)) {
- 		inode->i_op = &ext3_file_inode_operations;
- 		inode->i_fop = &ext3_file_operations;
-@@ -2601,9 +2602,12 @@ static int ext3_do_update_inode(handle_t
- 	}
- 	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 	raw_inode->i_size = cpu_to_le32(ei->i_disksize);
--	raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
--	raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
--	raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
-+
-+	EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode);
-+	EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode);
-+	EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode);
-+	EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
-+
- 	raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);
- 	raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 	raw_inode->i_flags = cpu_to_le32(ei->i_flags);
-Index: linux-stage/fs/ext3/ioctl.c
-===================================================================
---- linux-stage.orig/fs/ext3/ioctl.c
-+++ linux-stage/fs/ext3/ioctl.c
-@@ -112,7 +112,7 @@ int ext3_ioctl (struct inode * inode, st
- 		ei->i_flags = flags;
- 
- 		ext3_set_inode_flags(inode);
--		inode->i_ctime = CURRENT_TIME_SEC;
-+		inode->i_ctime = ext3_current_time(inode);
- 
- 		err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- flags_err:
-@@ -150,7 +150,7 @@ flags_err:
- 			return PTR_ERR(handle);
- 		err = ext3_reserve_inode_write(handle, inode, &iloc);
- 		if (err == 0) {
--			inode->i_ctime = CURRENT_TIME_SEC;
-+			inode->i_ctime = ext3_current_time(inode);
- 			inode->i_generation = generation;
- 			err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- 		}
-Index: linux-stage/fs/ext3/namei.c
-===================================================================
---- linux-stage.orig/fs/ext3/namei.c
-+++ linux-stage/fs/ext3/namei.c
-@@ -1302,7 +1302,7 @@ static int add_dirent_to_buf(handle_t *h
- 	 * happen is that the times are slightly out of date
- 	 * and/or different from the directory change time.
- 	 */
--	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
-+	dir->i_mtime = dir->i_ctime = ext3_current_time(dir);
- 	ext3_update_dx_flag(dir);
- 	dir->i_version++;
- 	ext3_mark_inode_dirty(handle, dir);
-@@ -2098,7 +2098,7 @@ static int ext3_rmdir (struct inode * di
- 	inode->i_version++;
- 	inode->i_nlink = 0;
- 	ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-+	inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	ext3_dec_count(handle, dir);
- 	ext3_update_dx_flag(dir);
-@@ -2148,13 +2148,13 @@ static int ext3_unlink(struct inode * di
- 	retval = ext3_delete_entry(handle, dir, de, bh);
- 	if (retval)
- 		goto end_unlink;
--	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-+	dir->i_ctime = dir->i_mtime = ext3_current_time(dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 	ext3_dec_count(handle, inode);
- 	if (!inode->i_nlink)
- 		ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	retval = 0;
- 
-@@ -2255,7 +2255,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
-@@ -2357,7 +2357,7 @@ static int ext3_rename (struct inode * o
- 	 * Like most other Unix systems, set the ctime for inodes on a
- 	 * rename.
- 	 */
--	old_inode->i_ctime = CURRENT_TIME_SEC;
-+	old_inode->i_ctime = ext3_current_time(old_inode);
- 	ext3_mark_inode_dirty(handle, old_inode);
- 
- 	/*
-@@ -2390,9 +2390,9 @@ static int ext3_rename (struct inode * o
- 
- 	if (new_inode) {
- 		ext3_dec_count(handle, new_inode);
--		new_inode->i_ctime = CURRENT_TIME_SEC;
-+		new_inode->i_ctime = ext3_current_time(new_inode);
- 	}
--	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
-+	old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir);
- 	ext3_update_dx_flag(old_dir);
- 	if (dir_bh) {
- 		BUFFER_TRACE(dir_bh, "get_write_access");
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c
-+++ linux-stage/fs/ext3/super.c
-@@ -1573,6 +1573,8 @@ static int ext3_fill_super (struct super
- 				sbi->s_inode_size);
- 			goto failed_mount;
- 		}
-+		if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE)
-+			sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2);
- 	}
- 	sbi->s_frag_size = EXT3_MIN_FRAG_SIZE <<
- 				   le32_to_cpu(es->s_log_frag_size);
-@@ -1759,6 +1761,32 @@ static int ext3_fill_super (struct super
- 	}
- 
- 	ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
-+
-+	/* determine the minimum size of new large inodes, if present */
-+	if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						     EXT3_GOOD_OLD_INODE_SIZE;
-+		if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
-+				       EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_want_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_want_extra_isize);
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_min_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_min_extra_isize);
-+		}
-+	}
-+	/* Check if enough inode space is available */
-+	if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
-+							sbi->s_inode_size) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						       EXT3_GOOD_OLD_INODE_SIZE;
-+		printk(KERN_INFO "EXT3-fs: required extra inode space not"
-+			"available.\n");
-+	}
-+
- 	/*
- 	 * akpm: core read_super() calls in here with the superblock locked.
- 	 * That deadlocks, because orphan cleanup needs to lock the superblock
-Index: linux-stage/fs/ext3/xattr.c
-===================================================================
---- linux-stage.orig/fs/ext3/xattr.c
-+++ linux-stage/fs/ext3/xattr.c
-@@ -1305,7 +1305,7 @@ getblk_failed:
- 
- 	/* Update the inode. */
- 	EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	if (IS_SYNC(inode))
- 		handle->h_sync = 1;
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h
-+++ linux-stage/include/linux/ext3_fs.h
-@@ -280,7 +280,7 @@ struct ext3_inode {
- 	__le16	i_uid;		/* Low 16 bits of Owner Uid */
- 	__le32	i_size;		/* Size in bytes */
- 	__le32	i_atime;	/* Access time */
--	__le32	i_ctime;	/* Creation time */
-+	__le32	i_ctime;	/* Inode Change time */
- 	__le32	i_mtime;	/* Modification time */
- 	__le32	i_dtime;	/* Deletion Time */
- 	__le16	i_gid;		/* Low 16 bits of Group Id */
-@@ -329,10 +329,73 @@ struct ext3_inode {
- 	} osd2;				/* OS dependent 2 */
- 	__u16	i_extra_isize;
- 	__u16	i_pad1;
-+	__le32  i_ctime_extra;	/* extra Change time      (nsec << 2 | epoch) */
-+	__le32  i_mtime_extra;	/* extra Modification time(nsec << 2 | epoch) */
-+	__le32  i_atime_extra;	/* extra Access time      (nsec << 2 | epoch) */
-+	__le32  i_crtime;	/* File Creation time */
-+	__le32  i_crtime_extra;	/* extra File Creation time (nsec << 2 | epoch) */
- };
- 
- #define i_size_high	i_dir_acl
- 
-+#define EXT3_EPOCH_BITS 2
-+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1)
-+#define EXT3_NSEC_MASK  (~0UL << EXT3_EPOCH_BITS)
-+
-+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field)   \
-+	((offsetof(typeof(*ext3_inode), field) +	\
-+	 sizeof((ext3_inode)->field))		 	\
-+	 <= (EXT3_GOOD_OLD_INODE_SIZE +	       		\
-+	     (einode)->i_extra_isize))			\
-+
-+static inline __le32 ext3_encode_extra_time(struct timespec *time)
-+{
-+	return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
-+			   time->tv_sec >> 32 : 0) |
-+			   ((time->tv_nsec << 2) & EXT3_NSEC_MASK));
-+}
-+
-+static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) {
-+       if (sizeof(time->tv_sec) > 4)
-+	       time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK)
-+				       << 32;
-+       time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2;
-+}
-+
-+#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode)			 \
-+do {									 \
-+       (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec);		 \
-+       if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))\
-+	       (raw_inode)->xtime ## _extra =				 \
-+			       ext3_encode_extra_time(&(inode)->xtime);  \
-+} while (0)
-+
-+#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode)			 \
-+do {									 \
-+       if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime))		 \
-+	       (raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \
-+       if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))	 \
-+	       (raw_inode)->xtime ## _extra =				 \
-+			       ext3_encode_extra_time(&(einode)->xtime); \
-+} while (0)
-+
-+#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode)			 \
-+do {									 \
-+       (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);		 \
-+       if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))\
-+	       ext3_decode_extra_time(&(inode)->xtime,			 \
-+				      raw_inode->xtime ## _extra);	 \
-+} while (0)
-+
-+#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode)		       	 \
-+do {									 \
-+       if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime))		 \
-+	       (einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \
-+       if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))	 \
-+	       ext3_decode_extra_time(&(einode)->xtime,			 \
-+				      raw_inode->xtime ## _extra);	 \
-+} while (0)
-+
- #if defined(__KERNEL__) || defined(__linux__)
- #define i_reserved1	osd1.linux1.l_i_reserved1
- #define i_frag		osd2.linux2.l_i_frag
-@@ -500,11 +563,19 @@ struct ext3_super_block {
- 	__le32	s_last_orphan;		/* start of list of inodes to delete */
- 	__le32	s_hash_seed[4];		/* HTREE hash seed */
- 	__u8	s_def_hash_version;	/* Default hash version to use */
--	__u8	s_reserved_char_pad;
--	__u16	s_reserved_word_pad;
-+	__u8	s_jnl_backup_type;	/* Default type of journal backup */
-+	__le16	s_desc_size;		/* Group desc. size: INCOMPAT_64BIT */
- 	__le32	s_default_mount_opts;
--	__le32	s_first_meta_bg; 	/* First metablock block group */
--	__u32	s_reserved[190];	/* Padding to the end of the block */
-+	__le32	s_first_meta_bg;	/* First metablock block group */
-+	__le32	s_mkfs_time;		/* When the filesystem was created */
-+	__le32	s_jnl_blocks[17];	/* Backup of the journal inode */
-+	__le32	s_blocks_count_hi;	/* Blocks count high 32 bits */
-+	__le32	s_r_blocks_count_hi;	/* Reserved blocks count high 32 bits*/
-+	__le32	s_free_blocks_hi;	/* Free blocks count high 32 bits */
-+	__le16	s_min_extra_isize;	/* All inodes have at least # bytes */
-+	__le16	s_want_extra_isize;	/* New inodes should reserve # bytes */
-+	__le32	s_flags;		/* Miscellaneous flags */
-+	__u32	s_reserved[167];	/* Padding to the end of the block */
- };
- 
- #ifdef __KERNEL__
-@@ -580,6 +651,7 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
- #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
- #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
-+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE	0x0040
- 
- #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
- #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
-@@ -597,6 +669,7 @@ static inline struct ext3_inode_info *EX
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
- 					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
-+					 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
- 
- /*
-@@ -724,6 +797,12 @@ static inline struct ext3_inode *ext3_ra
- 	return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset);
- }
- 
-+static inline struct timespec ext3_current_time(struct inode *inode)
-+{
-+	return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
-+		current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
-+}
-+
- /*
-  * This structure is stuffed into the struct file's private_data field
-  * for directories.  It is where we put information so that we can do
-Index: linux-stage/include/linux/ext3_fs_i.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs_i.h
-+++ linux-stage/include/linux/ext3_fs_i.h
-@@ -130,6 +130,7 @@ struct ext3_inode_info {
- 
- 	/* on-disk additional length */
- 	__u16 i_extra_isize;
-+	struct timespec i_crtime;
- 
- 	/*
- 	 * truncate_sem is for serialising ext3_truncate() against
-Index: linux-stage/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs_sb.h
-+++ linux-stage/include/linux/ext3_fs_sb.h
-@@ -71,6 +71,8 @@ struct ext3_sb_info {
- 	/* Last group used to allocate inode */
- 	int s_last_alloc_group;
- 
-+	unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
-+
- 	/* root of the per fs reservation window tree */
- 	spinlock_t s_rsv_window_lock;
- 	struct rb_root s_rsv_window_root;
diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch
deleted file mode 100644
index 04c6e61ab1bde90159f4d5b04e535b78a55bf5e3..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-sles10.patch
+++ /dev/null
@@ -1,404 +0,0 @@
-Index: linux-2.6.16.27-0.9/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/ialloc.c
-+++ linux-2.6.16.27-0.9/fs/ext3/ialloc.c
-@@ -577,7 +577,8 @@ got:
- 	/* This is the optimal IO size (for stat), not the fs block size */
- 	inode->i_blksize = PAGE_SIZE;
- 	inode->i_blocks = 0;
--	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
-+						       ext3_current_time(inode);
- 
- 	memset(ei->i_data, 0, sizeof(ei->i_data));
- 	ei->i_dir_start_lookup = 0;
-@@ -609,9 +610,8 @@ got:
- 	spin_unlock(&sbi->s_next_gen_lock);
- 
- 	ei->i_state = EXT3_STATE_NEW;
--	ei->i_extra_isize =
--		(EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
--		sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
-+
-+	ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize;
- 
- 	ret = inode;
- 	if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-2.6.16.27-0.9/fs/ext3/inode.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/inode.c
-+++ linux-2.6.16.27-0.9/fs/ext3/inode.c
-@@ -620,7 +620,7 @@ static int ext3_splice_branch(handle_t *
- 
- 	/* We are done with atomic stuff, now do the rest of housekeeping */
- 
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* had we spliced it onto indirect block? */
-@@ -2244,7 +2244,7 @@ do_indirects:
- 	ext3_discard_reservation(inode);
- 
- 	up(&ei->truncate_sem);
--	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_mtime = inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* In a multi-transaction truncate, we only make the final
-@@ -2479,10 +2479,6 @@ void ext3_read_inode(struct inode * inod
- 	}
- 	inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
- 	inode->i_size = le32_to_cpu(raw_inode->i_size);
--	inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime);
--	inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime);
--	inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime);
--	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
- 
- 	ei->i_state = 0;
- 	ei->i_dir_start_lookup = 0;
-@@ -2557,6 +2553,11 @@ void ext3_read_inode(struct inode * inod
- 	} else
- 		ei->i_extra_isize = 0;
- 
-+	EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode);
-+	EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode);
-+	EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode);
-+	EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
-+
- 	if (S_ISREG(inode->i_mode)) {
- 		inode->i_op = &ext3_file_inode_operations;
- 		inode->i_fop = &ext3_file_operations;
-@@ -2637,9 +2638,12 @@ static int ext3_do_update_inode(handle_t
- 	}
- 	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 	raw_inode->i_size = cpu_to_le32(ei->i_disksize);
--	raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
--	raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
--	raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
-+
-+	EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode);
-+	EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode);
-+	EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode);
-+	EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
-+
- 	raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);
- 	raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 	raw_inode->i_flags = cpu_to_le32(ei->i_flags);
-Index: linux-2.6.16.27-0.9/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/ioctl.c
-+++ linux-2.6.16.27-0.9/fs/ext3/ioctl.c
-@@ -88,7 +88,7 @@ int ext3_ioctl (struct inode * inode, st
- 		ei->i_flags = flags;
- 
- 		ext3_set_inode_flags(inode);
--		inode->i_ctime = CURRENT_TIME_SEC;
-+		inode->i_ctime = ext3_current_time(inode);
- 
- 		err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- flags_err:
-@@ -126,7 +126,7 @@ flags_err:
- 			return PTR_ERR(handle);
- 		err = ext3_reserve_inode_write(handle, inode, &iloc);
- 		if (err == 0) {
--			inode->i_ctime = CURRENT_TIME_SEC;
-+			inode->i_ctime = ext3_current_time(inode);
- 			inode->i_generation = generation;
- 			err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- 		}
-Index: linux-2.6.16.27-0.9/fs/ext3/namei.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/namei.c
-+++ linux-2.6.16.27-0.9/fs/ext3/namei.c
-@@ -1276,7 +1276,7 @@ static int add_dirent_to_buf(handle_t *h
- 	 * happen is that the times are slightly out of date
- 	 * and/or different from the directory change time.
- 	 */
--	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
-+	dir->i_mtime = dir->i_ctime = ext3_current_time(dir);
- 	ext3_update_dx_flag(dir);
- 	dir->i_version++;
- 	ext3_mark_inode_dirty(handle, dir);
-@@ -2056,7 +2056,7 @@ static int ext3_rmdir (struct inode * di
- 	inode->i_version++;
- 	inode->i_nlink = 0;
- 	ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-+	inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	ext3_dec_count(handle, dir);
- 	ext3_update_dx_flag(dir);
-@@ -2106,13 +2106,13 @@ static int ext3_unlink(struct inode * di
- 	retval = ext3_delete_entry(handle, dir, de, bh);
- 	if (retval)
- 		goto end_unlink;
--	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-+	dir->i_ctime = dir->i_mtime = ext3_current_time(dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 	ext3_dec_count(handle, inode);
- 	if (!inode->i_nlink)
- 		ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	retval = 0;
- 
-@@ -2214,7 +2214,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
-@@ -2317,7 +2317,7 @@ static int ext3_rename (struct inode * o
- 	 * Like most other Unix systems, set the ctime for inodes on a
- 	 * rename.
- 	 */
--	old_inode->i_ctime = CURRENT_TIME_SEC;
-+	old_inode->i_ctime = ext3_current_time(old_inode);
- 	ext3_mark_inode_dirty(handle, old_inode);
- 
- 	/*
-@@ -2350,9 +2350,9 @@ static int ext3_rename (struct inode * o
- 
- 	if (new_inode) {
- 		ext3_dec_count(handle, new_inode);
--		new_inode->i_ctime = CURRENT_TIME_SEC;
-+		new_inode->i_ctime = ext3_current_time(new_inode);
- 	}
--	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
-+	old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir);
- 	ext3_update_dx_flag(old_dir);
- 	if (dir_bh) {
- 		BUFFER_TRACE(dir_bh, "get_write_access");
-Index: linux-2.6.16.27-0.9/fs/ext3/super.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/super.c
-+++ linux-2.6.16.27-0.9/fs/ext3/super.c
-@@ -1614,6 +1614,8 @@ static int ext3_fill_super (struct super
- 				sbi->s_inode_size);
- 			goto failed_mount;
- 		}
-+		if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE)
-+			sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2);
- 	}
- 	sbi->s_frag_size = EXT3_MIN_FRAG_SIZE <<
- 				   le32_to_cpu(es->s_log_frag_size);
-@@ -1809,6 +1811,32 @@ static int ext3_fill_super (struct super
- 	}
- 
- 	ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
-+
-+	/* determine the minimum size of new large inodes, if present */
-+	if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						     EXT3_GOOD_OLD_INODE_SIZE;
-+		if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
-+				       EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_want_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_want_extra_isize);
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_min_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_min_extra_isize);
-+		}
-+	}
-+	/* Check if enough inode space is available */
-+	if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
-+							sbi->s_inode_size) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						       EXT3_GOOD_OLD_INODE_SIZE;
-+		printk(KERN_INFO "EXT3-fs: required extra inode space not"
-+			"available.\n");
-+	}
-+
- 	/*
- 	 * akpm: core read_super() calls in here with the superblock locked.
- 	 * That deadlocks, because orphan cleanup needs to lock the superblock
-Index: linux-2.6.16.27-0.9/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.16.27-0.9.orig/fs/ext3/xattr.c
-+++ linux-2.6.16.27-0.9/fs/ext3/xattr.c
-@@ -1006,8 +1006,8 @@ ext3_xattr_set_handle(handle_t *handle, 
- 	}
- 	if (!error) {
- 		ext3_xattr_update_super_block(handle, inode->i_sb);
--		inode->i_ctime = CURRENT_TIME_SEC;
--		error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
-+		inode->i_ctime = ext3_current_time(inode);
-+		ext3_mark_inode_dirty(handle, inode);
- 		/*
- 		 * The bh is consumed by ext3_mark_iloc_dirty, even with
- 		 * error != 0.
-Index: linux-2.6.16.27-0.9/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs.h
-+++ linux-2.6.16.27-0.9/include/linux/ext3_fs.h
-@@ -272,7 +272,7 @@ struct ext3_inode {
- 	__le16	i_uid;		/* Low 16 bits of Owner Uid */
- 	__le32	i_size;		/* Size in bytes */
- 	__le32	i_atime;	/* Access time */
--	__le32	i_ctime;	/* Creation time */
-+	__le32	i_ctime;	/* Inode Change time */
- 	__le32	i_mtime;	/* Modification time */
- 	__le32	i_dtime;	/* Deletion Time */
- 	__le16	i_gid;		/* Low 16 bits of Group Id */
-@@ -321,10 +321,73 @@ struct ext3_inode {
- 	} osd2;				/* OS dependent 2 */
- 	__le16	i_extra_isize;
- 	__le16	i_pad1;
-+	__le32  i_ctime_extra;  /* extra Change time      (nsec << 2 | epoch) */
-+	__le32  i_mtime_extra;  /* extra Modification time(nsec << 2 | epoch) */
-+	__le32  i_atime_extra;  /* extra Access time      (nsec << 2 | epoch) */
-+	__le32  i_crtime;       /* File Creation time */
-+	__le32  i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
- };
- 
- #define i_size_high	i_dir_acl
- 
-+#define EXT3_EPOCH_BITS 2
-+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1)
-+#define EXT3_NSEC_MASK  (~0UL << EXT3_EPOCH_BITS)
-+
-+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field)   \
-+	((offsetof(typeof(*ext3_inode), field) +	\
-+	 sizeof((ext3_inode)->field))		   	\
-+	 <= (EXT3_GOOD_OLD_INODE_SIZE +		 	\
-+	     (einode)->i_extra_isize))		  	\
-+
-+static inline __le32 ext3_encode_extra_time(struct timespec *time)
-+{
-+	return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
-+			   time->tv_sec >> 32 : 0) |
-+			   ((time->tv_nsec << 2) & EXT3_NSEC_MASK));
-+}
-+
-+static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) {
-+	if (sizeof(time->tv_sec) > 4)
-+		time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK)
-+					<< 32;
-+       time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2;
-+}
-+
-+#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode)		    	  \
-+do {								     	  \
-+       (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec);	  	  \
-+       if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra)) \
-+	       (raw_inode)->xtime ## _extra =				  \
-+			       ext3_encode_extra_time(&(inode)->xtime);   \
-+} while (0)
-+
-+#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode)			  \
-+do {								     	  \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime))		  \
-+		(raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec); \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))       \
-+		(raw_inode)->xtime ## _extra =			    	  \
-+			       ext3_encode_extra_time(&(einode)->xtime);  \
-+} while (0)
-+
-+#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode)			  \
-+do {									  \
-+	(inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);	  \
-+	if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))\
-+		ext3_decode_extra_time(&(inode)->xtime,		   	  \
-+				      raw_inode->xtime ## _extra);	  \
-+} while (0)
-+
-+#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode)			 \
-+do {								     	 \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime))		 \
-+		(einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);\
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))      \
-+		ext3_decode_extra_time(&(einode)->xtime,		 \
-+				      raw_inode->xtime ## _extra);       \
-+} while (0)
-+
- #if defined(__KERNEL__) || defined(__linux__)
- #define i_reserved1	osd1.linux1.l_i_reserved1
- #define i_frag		osd2.linux2.l_i_frag
-@@ -504,11 +567,19 @@ struct ext3_super_block {
- 	__le32	s_last_orphan;		/* start of list of inodes to delete */
- 	__le32	s_hash_seed[4];		/* HTREE hash seed */
- 	__u8	s_def_hash_version;	/* Default hash version to use */
--	__u8	s_reserved_char_pad;
--	__u16	s_reserved_word_pad;
-+	__u8	s_jnl_backup_type;	/* Default type of journal backup */
-+	__le16	s_desc_size;		/* Group desc. size: INCOMPAT_64BIT */
- 	__le32	s_default_mount_opts;
--	__le32	s_first_meta_bg; 	/* First metablock block group */
--	__u32	s_reserved[190];	/* Padding to the end of the block */
-+	__le32	s_first_meta_bg;	/* First metablock block group */
-+	__le32	s_mkfs_time;		/* When the filesystem was created */
-+	__le32	s_jnl_blocks[17];	/* Backup of the journal inode */
-+	__le32	s_blocks_count_hi;	/* Blocks count high 32 bits */
-+	__le32	s_r_blocks_count_hi;	/* Reserved blocks count high 32 bits*/
-+	__le32	s_free_blocks_hi;	/* Free blocks count high 32 bits */
-+	__le16	s_min_extra_isize;	/* All inodes have at least # bytes */
-+	__le16	s_want_extra_isize;	/* New inodes should reserve # bytes */
-+	__le32	s_flags;		/* Miscellaneous flags */
-+	__u32	s_reserved[167];	/* Padding to the end of the block */
- };
- 
- #ifdef __KERNEL__
-@@ -583,6 +648,8 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
- #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
- #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
-+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE	0x0040
-+
- 
- #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
- #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
-@@ -599,6 +666,7 @@ static inline struct ext3_inode_info *EX
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
- 					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
-+					 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
- 
- /*
-@@ -726,6 +794,12 @@ static inline struct ext3_inode *ext3_ra
- 	return (struct ext3_inode *) (iloc->bh->b_data + iloc->offset);
- }
- 
-+static inline struct timespec ext3_current_time(struct inode *inode)
-+{
-+	return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
-+		current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
-+}
-+
- /*
-  * This structure is stuffed into the struct file's private_data field
-  * for directories.  It is where we put information so that we can do
-Index: linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.16.27-0.9/include/linux/ext3_fs_i.h
-@@ -130,6 +130,7 @@ struct ext3_inode_info {
- 
- 	/* on-disk additional length */
- 	__u16 i_extra_isize;
-+	struct timespec i_crtime;
- 
- 	/*
- 	 * truncate_sem is for serialising ext3_truncate() against
-Index: linux-2.6.16.27-0.9/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.16.27-0.9.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.16.27-0.9/include/linux/ext3_fs_sb.h
-@@ -71,6 +71,8 @@ struct ext3_sb_info {
- 	/* Last group used to allocate inode */
- 	int s_last_alloc_group;
- 
-+	unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
-+
- 	/* root of the per fs reservation window tree */
- 	spinlock_t s_rsv_window_lock;
- 	struct rb_root s_rsv_window_root;
diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch
deleted file mode 100644
index 7824114a60b9c1f68a299781c82f1046364c626e..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6-suse.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-Index: linux-2.6.5-7.283/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/ext3/ialloc.c
-+++ linux-2.6.5-7.283/fs/ext3/ialloc.c
-@@ -613,7 +613,8 @@ got:
- 	/* This is the optimal IO size (for stat), not the fs block size */
- 	inode->i_blksize = PAGE_SIZE;
- 	inode->i_blocks = 0;
--	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
-+							       CURRENT_TIME;
- 
- 	memset(ei->i_data, 0, sizeof(ei->i_data));
- 	ei->i_next_alloc_block = 0;
-@@ -651,9 +652,8 @@ got:
- 	spin_unlock(&sbi->s_next_gen_lock);
- 
- 	ei->i_state = EXT3_STATE_NEW;
--	ei->i_extra_isize =
--		(EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
--		sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
-+
-+	ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize;
- 
- 	ret = inode;
- 	if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-2.6.5-7.283/fs/ext3/inode.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/ext3/inode.c
-+++ linux-2.6.5-7.283/fs/ext3/inode.c
-@@ -2459,7 +2459,11 @@ void ext3_read_inode(struct inode * inod
- 	inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime);
- 	inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime);
- 	inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime);
--	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
-+	if (EXT3_FITS_IN_INODE(raw_inode, ei, i_crtime)) {
-+		ei->i_crtime.tv_sec = le32_to_cpu(raw_inode->i_crtime);
-+	}
-+	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec =
-+							    ei->i_crtime.tv_nsec = 0;
- 
- 	ei->i_state = 0;
- 	ei->i_next_alloc_block = 0;
-@@ -2603,6 +2607,10 @@ static int ext3_do_update_inode(handle_t
- 	raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
- 	raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
- 	raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
-+	if (EXT3_FITS_IN_INODE(raw_inode, ei, i_crtime)) {
-+		raw_inode->i_crtime = cpu_to_le32(ei->i_crtime.tv_sec);
-+	}
-+
- 	raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);
- 	raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 	raw_inode->i_flags = cpu_to_le32(ei->i_flags);
-Index: linux-2.6.5-7.283/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/ext3/super.c
-+++ linux-2.6.5-7.283/fs/ext3/super.c
-@@ -1515,6 +1515,32 @@ static int ext3_fill_super (struct super
- 	}
- 
- 	ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
-+
-+	/* determine the minimum size of new large inodes, if present */
-+	if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						     EXT3_GOOD_OLD_INODE_SIZE;
-+		if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
-+				       EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_want_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_want_extra_isize);
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_min_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_min_extra_isize);
-+		}
-+	}
-+	/* Check if enough inode space is available */
-+	if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
-+							sbi->s_inode_size) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						       EXT3_GOOD_OLD_INODE_SIZE;
-+		printk(KERN_INFO "EXT3-fs: required extra inode space not"
-+			"available.\n");
-+	}
-+
- 	/*
- 	 * akpm: core read_super() calls in here with the superblock locked.
- 	 * That deadlocks, because orphan cleanup needs to lock the superblock
-Index: linux-2.6.5-7.283/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/ext3_fs.h
-+++ linux-2.6.5-7.283/include/linux/ext3_fs.h
-@@ -232,7 +232,7 @@ struct ext3_inode {
- 	__u16	i_uid;		/* Low 16 bits of Owner Uid */
- 	__u32	i_size;		/* Size in bytes */
- 	__u32	i_atime;	/* Access time */
--	__u32	i_ctime;	/* Creation time */
-+	__u32	i_ctime;	/* Inode Change time */
- 	__u32	i_mtime;	/* Modification time */
- 	__u32	i_dtime;	/* Deletion Time */
- 	__u16	i_gid;		/* Low 16 bits of Group Id */
-@@ -281,10 +281,25 @@ struct ext3_inode {
- 	} osd2;				/* OS dependent 2 */
- 	__u16	i_extra_isize;
- 	__u16	i_pad1;
-+	__le32  i_ctime_extra;	/* extra Change time      (nsec << 2 | epoch) */
-+	__le32  i_mtime_extra;	/* extra Modification time(nsec << 2 | epoch) */
-+	__le32  i_atime_extra;	/* extra Access time      (nsec << 2 | epoch) */
-+	__le32  i_crtime;	/* File Creation time */
-+	__le32  i_crtime_extra;	/* extra File Creation time (nsec << 2 | epoch) */
- };
- 
- #define i_size_high	i_dir_acl
- 
-+#define EXT3_EPOCH_BITS 2
-+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1)
-+#define EXT3_NSEC_MASK  (~0UL << EXT3_EPOCH_BITS)
-+
-+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field)	\
-+	((offsetof(typeof(*ext3_inode), field) +	\
-+	 sizeof((ext3_inode)->field))			\
-+	 <= (EXT3_GOOD_OLD_INODE_SIZE +			\
-+	     (einode)->i_extra_isize))			\
-+
- #if defined(__KERNEL__) || defined(__linux__)
- #define i_reserved1	osd1.linux1.l_i_reserved1
- #define i_frag		osd2.linux2.l_i_frag
-@@ -460,11 +475,19 @@ struct ext3_super_block {
- 	__u32	s_last_orphan;		/* start of list of inodes to delete */
- 	__u32	s_hash_seed[4];		/* HTREE hash seed */
- 	__u8	s_def_hash_version;	/* Default hash version to use */
--	__u8	s_reserved_char_pad;
--	__u16	s_reserved_word_pad;
-+	__u8	s_jnl_backup_type;	/* Default type of journal backup */
-+	__u16	s_desc_size;		/* Group desc. size: INCOMPAT_64BIT */
- 	__u32	s_default_mount_opts;
--	__u32	s_first_meta_bg; 	/* First metablock block group */
--	__u32	s_reserved[190];	/* Padding to the end of the block */
-+	__u32	s_first_meta_bg;	/* First metablock block group */
-+	__u32	s_mkfs_time;		/* When the filesystem was created */
-+	__u32	s_jnl_blocks[17];	/* Backup of the journal inode */
-+	__u32	s_blocks_count_hi;	/* Blocks count high 32 bits */
-+	__u32	s_r_blocks_count_hi;	/* Reserved blocks count high 32 bits*/
-+	__u32	s_free_blocks_hi;	/* Free blocks count high 32 bits */
-+	__u16	s_min_extra_isize;	/* All inodes have at least # bytes */
-+	__u16	s_want_extra_isize;	/* New inodes should reserve # bytes */
-+	__u32	s_flags;		/* Miscellaneous flags */
-+	__u32	s_reserved[167];	/* Padding to the end of the block */
- };
- 
- #ifdef __KERNEL__
-@@ -539,6 +556,7 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
- #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM		0x0010
- #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
-+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE	0x0040
- 
- #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
- #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
-@@ -555,6 +573,7 @@ static inline struct ext3_inode_info *EX
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT4_FEATURE_RO_COMPAT_GDT_CSUM| \
- 					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
-+					 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
- 
- /*
-Index: linux-2.6.5-7.283/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.5-7.283/include/linux/ext3_fs_i.h
-@@ -130,6 +130,7 @@ struct ext3_inode_info {
- 
- 	/* on-disk additional length */
- 	__u16 i_extra_isize;
-+	struct timespec i_crtime;
- 
- 	/*
- 	 * truncate_sem is for serialising ext3_truncate() against
-Index: linux-2.6.5-7.283/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.5-7.283/include/linux/ext3_fs_sb.h
-@@ -71,6 +71,8 @@ struct ext3_sb_info {
- 	/* Last group used to allocate inode */
- 	int s_last_alloc_group;
- 
-+	unsigned int s_want_extra_isize; /* New inodes should reserve # bytes */
-+
- 	/* root of the per fs reservation window tree */
- 	spinlock_t s_rsv_window_lock;
- 	struct rb_root s_rsv_window_root;
diff --git a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch b/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch
deleted file mode 100644
index 6dd7ad76d667f6d2d55f9c4acc99608e90a6a641..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-nanosecond-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,403 +0,0 @@
-Index: linux-2.6.18/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.18.orig/fs/ext3/ialloc.c
-+++ linux-2.6.18/fs/ext3/ialloc.c
-@@ -615,7 +615,8 @@ got:
- 	/* This is the optimal IO size (for stat), not the fs block size */
- 	inode->i_blksize = PAGE_SIZE;
- 	inode->i_blocks = 0;
--	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = ei->i_crtime =
-+						       ext3_current_time(inode);
- 
- 	memset(ei->i_data, 0, sizeof(ei->i_data));
- 	ei->i_dir_start_lookup = 0;
-@@ -647,9 +648,8 @@ got:
- 	spin_unlock(&sbi->s_next_gen_lock);
- 
- 	ei->i_state = EXT3_STATE_NEW;
--	ei->i_extra_isize =
--		(EXT3_INODE_SIZE(inode->i_sb) > EXT3_GOOD_OLD_INODE_SIZE) ?
--		sizeof(struct ext3_inode) - EXT3_GOOD_OLD_INODE_SIZE : 0;
-+
-+	ei->i_extra_isize = EXT3_SB(sb)->s_want_extra_isize;
- 
- 	ret = inode;
- 	if(DQUOT_ALLOC_INODE(inode)) {
-Index: linux-2.6.18/fs/ext3/inode.c
-===================================================================
---- linux-2.6.18.orig/fs/ext3/inode.c
-+++ linux-2.6.18/fs/ext3/inode.c
-@@ -729,7 +729,7 @@ static int ext3_splice_branch(handle_t *
- 
- 	/* We are done with atomic stuff, now do the rest of housekeeping */
- 
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* had we spliced it onto indirect block? */
-@@ -2388,7 +2388,7 @@ do_indirects:
- 	ext3_discard_reservation(inode);
- 
- 	mutex_unlock(&ei->truncate_mutex);
--	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_mtime = inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/*
-@@ -2624,10 +2624,6 @@ void ext3_read_inode(struct inode * inod
- 	}
- 	inode->i_nlink = le16_to_cpu(raw_inode->i_links_count);
- 	inode->i_size = le32_to_cpu(raw_inode->i_size);
--	inode->i_atime.tv_sec = le32_to_cpu(raw_inode->i_atime);
--	inode->i_ctime.tv_sec = le32_to_cpu(raw_inode->i_ctime);
--	inode->i_mtime.tv_sec = le32_to_cpu(raw_inode->i_mtime);
--	inode->i_atime.tv_nsec = inode->i_ctime.tv_nsec = inode->i_mtime.tv_nsec = 0;
- 
- 	ei->i_state = 0;
- 	ei->i_dir_start_lookup = 0;
-@@ -2702,6 +2698,11 @@ void ext3_read_inode(struct inode * inod
- 	} else
- 		ei->i_extra_isize = 0;
- 
-+	EXT3_INODE_GET_XTIME(i_ctime, inode, raw_inode);
-+	EXT3_INODE_GET_XTIME(i_mtime, inode, raw_inode);
-+	EXT3_INODE_GET_XTIME(i_atime, inode, raw_inode);
-+	EXT3_EINODE_GET_XTIME(i_crtime, ei, raw_inode);
-+
- 	if (S_ISREG(inode->i_mode)) {
- 		inode->i_op = &ext3_file_inode_operations;
- 		inode->i_fop = &ext3_file_operations;
-@@ -2782,9 +2783,12 @@ static int ext3_do_update_inode(handle_t
- 	}
- 	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 	raw_inode->i_size = cpu_to_le32(ei->i_disksize);
--	raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
--	raw_inode->i_ctime = cpu_to_le32(inode->i_ctime.tv_sec);
--	raw_inode->i_mtime = cpu_to_le32(inode->i_mtime.tv_sec);
-+
-+	EXT3_INODE_SET_XTIME(i_ctime, inode, raw_inode);
-+	EXT3_INODE_SET_XTIME(i_mtime, inode, raw_inode);
-+	EXT3_INODE_SET_XTIME(i_atime, inode, raw_inode);
-+	EXT3_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
-+
- 	raw_inode->i_blocks = cpu_to_le32(inode->i_blocks);
- 	raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 	raw_inode->i_flags = cpu_to_le32(ei->i_flags);
-Index: linux-2.6.18/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.18.orig/fs/ext3/ioctl.c
-+++ linux-2.6.18/fs/ext3/ioctl.c
-@@ -120,7 +120,7 @@ int ext3_ioctl (struct inode * inode, st
- 		ei->i_flags = flags;
- 
- 		ext3_set_inode_flags(inode);
--		inode->i_ctime = CURRENT_TIME_SEC;
-+		inode->i_ctime = ext3_current_time(inode);
- 
- 		err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- flags_err:
-@@ -161,7 +161,7 @@ flags_err:
- 			return PTR_ERR(handle);
- 		err = ext3_reserve_inode_write(handle, inode, &iloc);
- 		if (err == 0) {
--			inode->i_ctime = CURRENT_TIME_SEC;
-+			inode->i_ctime = ext3_current_time(inode);
- 			inode->i_generation = generation;
- 			err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- 		}
-Index: linux-2.6.18/fs/ext3/namei.c
-===================================================================
---- linux-2.6.18.orig/fs/ext3/namei.c
-+++ linux-2.6.18/fs/ext3/namei.c
-@@ -1287,7 +1287,7 @@ static int add_dirent_to_buf(handle_t *h
- 	 * happen is that the times are slightly out of date
- 	 * and/or different from the directory change time.
- 	 */
--	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
-+	dir->i_mtime = dir->i_ctime = ext3_current_time(dir);
- 	ext3_update_dx_flag(dir);
- 	dir->i_version++;
- 	ext3_mark_inode_dirty(handle, dir);
-@@ -2079,7 +2079,7 @@ static int ext3_rmdir (struct inode * di
- 	inode->i_version++;
- 	inode->i_nlink = 0;
- 	ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-+	inode->i_ctime = dir->i_ctime = dir->i_mtime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	ext3_dec_count(handle, dir);
- 	ext3_update_dx_flag(dir);
-@@ -2129,13 +2129,13 @@ static int ext3_unlink(struct inode * di
- 	retval = ext3_delete_entry(handle, dir, de, bh);
- 	if (retval)
- 		goto end_unlink;
--	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
-+	dir->i_ctime = dir->i_mtime = ext3_current_time(dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 	ext3_dec_count(handle, inode);
- 	if (!inode->i_nlink)
- 		ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_mark_inode_dirty(handle, inode);
- 	retval = 0;
- 
-@@ -2237,7 +2237,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode->i_ctime = CURRENT_TIME_SEC;
-+	inode->i_ctime = ext3_current_time(inode);
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
-@@ -2340,7 +2340,7 @@ static int ext3_rename (struct inode * o
- 	 * Like most other Unix systems, set the ctime for inodes on a
- 	 * rename.
- 	 */
--	old_inode->i_ctime = CURRENT_TIME_SEC;
-+	old_inode->i_ctime = ext3_current_time(old_inode);
- 	ext3_mark_inode_dirty(handle, old_inode);
- 
- 	/*
-@@ -2373,9 +2373,9 @@ static int ext3_rename (struct inode * o
- 
- 	if (new_inode) {
- 		ext3_dec_count(handle, new_inode);
--		new_inode->i_ctime = CURRENT_TIME_SEC;
-+		new_inode->i_ctime = ext3_current_time(new_inode);
- 	}
--	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
-+	old_dir->i_ctime = old_dir->i_mtime = ext3_current_time(old_dir);
- 	ext3_update_dx_flag(old_dir);
- 	if (dir_bh) {
- 		BUFFER_TRACE(dir_bh, "get_write_access");
-Index: linux-2.6.18/fs/ext3/super.c
-===================================================================
---- linux-2.6.18.orig/fs/ext3/super.c
-+++ linux-2.6.18/fs/ext3/super.c
-@@ -1615,6 +1615,8 @@ static int ext3_fill_super (struct super
- 				sbi->s_inode_size);
- 			goto failed_mount;
- 		}
-+		if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE)
-+			sb->s_time_gran = 1 << (EXT3_EPOCH_BITS - 2);
- 	}
- 	sbi->s_frag_size = EXT3_MIN_FRAG_SIZE <<
- 				   le32_to_cpu(es->s_log_frag_size);
-@@ -1819,6 +1821,32 @@ static int ext3_fill_super (struct super
- 	}
- 
- 	ext3_setup_super (sb, es, sb->s_flags & MS_RDONLY);
-+
-+	/* determine the minimum size of new large inodes, if present */
-+	if (sbi->s_inode_size > EXT3_GOOD_OLD_INODE_SIZE) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						     EXT3_GOOD_OLD_INODE_SIZE;
-+		if (EXT3_HAS_RO_COMPAT_FEATURE(sb,
-+				       EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE)) {
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_want_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_want_extra_isize);
-+			if (sbi->s_want_extra_isize <
-+			    le16_to_cpu(es->s_min_extra_isize))
-+				sbi->s_want_extra_isize =
-+					le16_to_cpu(es->s_min_extra_isize);
-+		}
-+	}
-+	/* Check if enough inode space is available */
-+	if (EXT3_GOOD_OLD_INODE_SIZE + sbi->s_want_extra_isize >
-+							sbi->s_inode_size) {
-+		sbi->s_want_extra_isize = sizeof(struct ext3_inode) -
-+						       EXT3_GOOD_OLD_INODE_SIZE;
-+		printk(KERN_INFO "EXT3-fs: required extra inode space not"
-+			"available.\n");
-+	}
-+
- 	/*
- 	 * akpm: core read_super() calls in here with the superblock locked.
- 	 * That deadlocks, because orphan cleanup needs to lock the superblock
-Index: linux-2.6.18/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.18.orig/fs/ext3/xattr.c
-+++ linux-2.6.18/fs/ext3/xattr.c
-@@ -1007,7 +1007,7 @@ ext3_xattr_set_handle(handle_t *handle, 
- 	}
- 	if (!error) {
- 		ext3_xattr_update_super_block(handle, inode->i_sb);
--		inode->i_ctime = CURRENT_TIME_SEC;
-+		inode->i_ctime = ext3_current_time(inode);
- 		error = ext3_mark_iloc_dirty(handle, inode, &is.iloc);
- 		/*
- 		 * The bh is consumed by ext3_mark_iloc_dirty, even with
-Index: linux-2.6.18/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.18.orig/include/linux/ext3_fs.h
-+++ linux-2.6.18/include/linux/ext3_fs.h
-@@ -268,7 +268,7 @@ struct ext3_inode {
- 	__le16	i_uid;		/* Low 16 bits of Owner Uid */
- 	__le32	i_size;		/* Size in bytes */
- 	__le32	i_atime;	/* Access time */
--	__le32	i_ctime;	/* Creation time */
-+	__le32	i_ctime;	/* Inode Change time */
- 	__le32	i_mtime;	/* Modification time */
- 	__le32	i_dtime;	/* Deletion Time */
- 	__le16	i_gid;		/* Low 16 bits of Group Id */
-@@ -317,10 +317,73 @@ struct ext3_inode {
- 	} osd2;				/* OS dependent 2 */
- 	__le16	i_extra_isize;
- 	__le16	i_pad1;
-+	__le32  i_ctime_extra;  /* extra Change time      (nsec << 2 | epoch) */
-+	__le32  i_mtime_extra;  /* extra Modification time(nsec << 2 | epoch) */
-+	__le32  i_atime_extra;  /* extra Access time      (nsec << 2 | epoch) */
-+	__le32  i_crtime;       /* File Creation time */
-+	__le32  i_crtime_extra; /* extra File Creation time (nsec << 2 | epoch) */
- };
- 
- #define i_size_high	i_dir_acl
- 
-+#define EXT3_EPOCH_BITS 2
-+#define EXT3_EPOCH_MASK ((1 << EXT3_EPOCH_BITS) - 1)
-+#define EXT3_NSEC_MASK  (~0UL << EXT3_EPOCH_BITS)
-+
-+#define EXT3_FITS_IN_INODE(ext3_inode, einode, field)	\
-+	((offsetof(typeof(*ext3_inode), field) +	\
-+	  sizeof((ext3_inode)->field))			\
-+	<= (EXT3_GOOD_OLD_INODE_SIZE +			\
-+	    (einode)->i_extra_isize))			\
-+
-+static inline __le32 ext3_encode_extra_time(struct timespec *time)
-+{
-+	return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
-+			    time->tv_sec >> 32 : 0) |
-+			    ((time->tv_nsec << 2) & EXT3_NSEC_MASK));
-+}
-+
-+static inline void ext3_decode_extra_time(struct timespec *time, __le32 extra) {
-+	if (sizeof(time->tv_sec) > 4)
-+		time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT3_EPOCH_MASK)
-+				<< 32;
-+	time->tv_nsec = (le32_to_cpu(extra) & EXT3_NSEC_MASK) >> 2;
-+}
-+
-+#define EXT3_INODE_SET_XTIME(xtime, inode, raw_inode)			       \
-+do {									       \
-+	(raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec);	       \
-+	if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))     \
-+		(raw_inode)->xtime ## _extra =				       \
-+				ext3_encode_extra_time(&(inode)->xtime);       \
-+} while (0)
-+
-+#define EXT3_EINODE_SET_XTIME(xtime, einode, raw_inode)\
-+do {									       \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime))		       \
-+		(raw_inode)->xtime = cpu_to_le32((einode)->xtime.tv_sec);      \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))	       \
-+		(raw_inode)->xtime ## _extra =				       \
-+				ext3_encode_extra_time(&(einode)->xtime);      \
-+} while (0)
-+
-+#define EXT3_INODE_GET_XTIME(xtime, inode, raw_inode)			       \
-+do {									       \
-+	(inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);	       \
-+	if (EXT3_FITS_IN_INODE(raw_inode, EXT3_I(inode), xtime ## _extra))     \
-+		ext3_decode_extra_time(&(inode)->xtime,			       \
-+				       raw_inode->xtime ## _extra);	       \
-+} while (0)
-+
-+#define EXT3_EINODE_GET_XTIME(xtime, einode, raw_inode) 		       \
-+do {									       \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime))		       \
-+		(einode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime);      \
-+	if (EXT3_FITS_IN_INODE(raw_inode, einode, xtime ## _extra))	       \
-+		ext3_decode_extra_time(&(einode)->xtime,		       \
-+				       raw_inode->xtime ## _extra);	       \
-+} while (0)
-+
- #if defined(__KERNEL__) || defined(__linux__)
- #define i_reserved1	osd1.linux1.l_i_reserved1
- #define i_frag		osd2.linux2.l_i_frag
-@@ -498,11 +562,19 @@ struct ext3_super_block {
- 	__le32	s_last_orphan;		/* start of list of inodes to delete */
- 	__le32	s_hash_seed[4];		/* HTREE hash seed */
- 	__u8	s_def_hash_version;	/* Default hash version to use */
--	__u8	s_reserved_char_pad;
--	__u16	s_reserved_word_pad;
-+	__u8	s_jnl_backup_type;	/* Default type of journal backup */
-+	__le16	s_desc_size;		/* Group desc. size: INCOMPAT_64BIT */
- 	__le32	s_default_mount_opts;
--	__le32	s_first_meta_bg; 	/* First metablock block group */
--	__u32	s_reserved[190];	/* Padding to the end of the block */
-+	__le32	s_first_meta_bg;	/* First metablock block group */
-+	__le32	s_mkfs_time;		/* When the filesystem was created */
-+	__le32	s_jnl_blocks[17];	/* Backup of the journal inode */
-+	__le32	s_blocks_count_hi;	/* Blocks count high 32 bits */
-+	__le32	s_r_blocks_count_hi;	/* Reserved blocks count high 32 bits*/
-+	__le32	s_free_blocks_count_hi;	/* Free blocks count high 32 bits */
-+	__le16	s_min_extra_isize;	/* All inodes have at least # bytes */
-+	__le16	s_want_extra_isize;	/* New inodes should reserve # bytes */
-+	__le32	s_flags;		/* Miscellaneous flags */
-+	__u32	s_reserved[167];	/* Padding to the end of the block */
- };
- 
- #ifdef __KERNEL__
-@@ -519,6 +584,13 @@ static inline struct ext3_inode_info *EX
- 	return container_of(inode, struct ext3_inode_info, vfs_inode);
- }
- 
-+static inline struct timespec ext3_current_time(struct inode *inode)
-+{
-+	return (inode->i_sb->s_time_gran < NSEC_PER_SEC) ?
-+		current_fs_time(inode->i_sb) : CURRENT_TIME_SEC;
-+}
-+
-+
- static inline int ext3_valid_inum(struct super_block *sb, unsigned long ino)
- {
- 	return ino == EXT3_ROOT_INO ||
-@@ -590,6 +662,8 @@ static inline int ext3_valid_inum(struct
- #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
- #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
- #define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
-+#define EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE	0x0040
-+
- 
- #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
- #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
-@@ -606,6 +680,7 @@ static inline int ext3_valid_inum(struct
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
- 					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
-+					 EXT4_FEATURE_RO_COMPAT_EXTRA_ISIZE| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
- 
- /*
-Index: linux-2.6.18/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.18.orig/include/linux/ext3_fs_sb.h
-+++ linux-2.6.18/include/linux/ext3_fs_sb.h
-@@ -119,6 +119,8 @@ struct ext3_sb_info {
- 	spinlock_t s_bal_lock;
- 	unsigned long s_mb_buddies_generated;
- 	unsigned long long s_mb_generation_time;
-+
-+	unsigned int  s_want_extra_isize;	/* New inodes should reserve # bytes */
- };
- 
- #define EXT3_GROUP_INFO(sb, group)					   \
-Index: linux-2.6.18/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.18.orig/include/linux/ext3_fs_i.h
-+++ linux-2.6.18/include/linux/ext3_fs_i.h
-@@ -144,6 +144,7 @@ struct ext3_inode_info {
- 	struct inode vfs_inode;
- 
- 	__u32 i_cached_extent[4];
-+	struct timespec i_crtime;
- 
- 	void *i_filterdata;
- };
diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch
deleted file mode 100644
index 5054b0c60b2571ea20979d97d99bb33d027bb145..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.7.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-Index: linux-2.6.5-7.283/fs/ext3/namei.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/ext3/namei.c
-+++ linux-2.6.5-7.283/fs/ext3/namei.c
-@@ -1613,11 +1613,17 @@ static int ext3_delete_entry (handle_t *
- static inline void ext3_inc_count(handle_t *handle, struct inode *inode)
- {
- 	inode->i_nlink++;
-+	if (is_dx(inode) && inode->i_nlink > 1) {
-+		/* limit is 16-bit i_links_count */
-+		if (inode->i_nlink >= EXT3_LINK_MAX || inode->i_nlink == 2)
-+			inode->i_nlink = 1;
-+        }
- }
- 
- static inline void ext3_dec_count(handle_t *handle, struct inode *inode)
- {
--	inode->i_nlink--;
-+	if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
-+		inode->i_nlink--;
- }
- 
- static int ext3_add_nondir(handle_t *handle,
-@@ -1730,7 +1736,7 @@ static int ext3_mkdir(struct inode * dir
- 	int retries = 0;
- 	int err;
- 
--	if (dir->i_nlink >= EXT3_LINK_MAX)
-+	if (EXT3_DIR_LINK_MAX(dir))
- 		return -EMLINK;
- 
- retry:
-@@ -1752,7 +1758,7 @@ retry:
- 	inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize;
- 	dir_block = ext3_bread (handle, inode, 0, 1, &err);
- 	if (!dir_block) {
--		inode->i_nlink--; /* is this nlink == 0? */
-+		ext3_dec_count(handle, inode); /* is this nlink == 0? */
- 		ext3_mark_inode_dirty(handle, inode);
- 		iput (inode);
- 		goto out_stop;
-@@ -1784,7 +1790,7 @@ retry:
- 		iput (inode);
- 		goto out_stop;
- 	}
--	dir->i_nlink++;
-+	ext3_inc_count(handle, dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 	d_instantiate(dentry, inode);
-@@ -2042,16 +2048,16 @@ static int ext3_rmdir (struct inode * di
- 	retval = ext3_delete_entry(handle, dir, de, bh);
- 	if (retval)
- 		goto end_rmdir;
--	if (inode->i_nlink != 2)
--		ext3_warning (inode->i_sb, "ext3_rmdir",
--			      "empty directory has nlink!=2 (%d)",
--			      inode->i_nlink);
-+	if (!EXT3_DIR_LINK_EMPTY(inode))
-+		ext3_warning(inode->i_sb, "ext3_rmdir",
-+			     "empty directory has too many links (%d)",
-+			     inode->i_nlink);
- 	inode->i_version++;
- 	inode->i_nlink = 0;
- 	ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- 	ext3_mark_inode_dirty(handle, inode);
--	dir->i_nlink--;
-+	ext3_dec_count(handle, dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 
-@@ -2100,7 +2106,7 @@ static int ext3_unlink(struct inode * di
- 	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
--	inode->i_nlink--;
-+	ext3_dec_count(handle, inode);
- 	if (!inode->i_nlink)
- 		ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime;
-@@ -2191,7 +2197,7 @@ static int ext3_link (struct dentry * ol
- 	struct inode *inode = old_dentry->d_inode;
- 	int err, retries = 0;
- 
--	if (inode->i_nlink >= EXT3_LINK_MAX)
-+	if (EXT3_DIR_LINK_MAX(inode))
- 		return -EMLINK;
- 
- retry:
-@@ -2277,8 +2283,8 @@ static int ext3_rename (struct inode * o
- 		if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino)
- 			goto end_rename;
- 		retval = -EMLINK;
--		if (!new_inode && new_dir!=old_dir &&
--				new_dir->i_nlink >= EXT3_LINK_MAX)
-+		if (!new_inode && new_dir != old_dir &&
-+		    EXT3_DIR_LINK_MAX(new_dir))
- 			goto end_rename;
- 	}
- 	if (!new_bh) {
-@@ -2335,7 +2341,7 @@ static int ext3_rename (struct inode * o
- 	}
- 
- 	if (new_inode) {
--		new_inode->i_nlink--;
-+		ext3_dec_count(handle, new_inode);
- 		new_inode->i_ctime = CURRENT_TIME;
- 	}
- 	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
-@@ -2346,11 +2352,13 @@ static int ext3_rename (struct inode * o
- 		PARENT_INO(dir_bh->b_data) = le32_to_cpu(new_dir->i_ino);
- 		BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata");
- 		ext3_journal_dirty_metadata(handle, dir_bh);
--		old_dir->i_nlink--;
-+		ext3_dec_count(handle, old_dir);
- 		if (new_inode) {
--			new_inode->i_nlink--;
-+			/* checked empty_dir above, can't have another parent,
-+			 * ext3_dec_count() won't work for many-linked dirs */
-+			new_inode->i_nlink = 0;
- 		} else {
--			new_dir->i_nlink++;
-+			ext3_inc_count(handle, new_dir);
- 			ext3_update_dx_flag(new_dir);
- 			ext3_mark_inode_dirty(handle, new_dir);
- 		}
-Index: linux-2.6.5-7.283/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/ext3_fs.h
-+++ linux-2.6.5-7.283/include/linux/ext3_fs.h
-@@ -86,7 +86,7 @@ struct statfs;
- /*
-  * Maximal count of links to a file
-  */
--#define EXT3_LINK_MAX		32000
-+#define EXT3_LINK_MAX		65000
- 
- /*
-  * Macro-instructions used to manage several block sizes
-@@ -538,6 +538,7 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER	0x0001
- #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
- #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
-+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
- 
- #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
- #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
-@@ -553,6 +554,7 @@ static inline struct ext3_inode_info *EX
- 					 EXT3_FEATURE_INCOMPAT_EXTENTS)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
-+					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
- 
- /*
diff --git a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch b/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch
deleted file mode 100644
index d572c8fe13cf158798dc207155198323ff7913ce..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-nlinks-2.6.9.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-Index: linux-2.6.12/fs/ext3/namei.c
-===================================================================
---- linux-2.6.12.orig/fs/ext3/namei.c
-+++ linux-2.6.12/fs/ext3/namei.c
-@@ -1600,11 +1600,17 @@ static int ext3_delete_entry (handle_t *
- static inline void ext3_inc_count(handle_t *handle, struct inode *inode)
- {
- 	inode->i_nlink++;
-+	if (is_dx(inode) && inode->i_nlink > 1) {
-+		/* limit is 16-bit i_links_count */
-+		if (inode->i_nlink >= EXT3_LINK_MAX || inode->i_nlink == 2)
-+			inode->i_nlink = 1;
-+	}
- }
- 
- static inline void ext3_dec_count(handle_t *handle, struct inode *inode)
- {
--	inode->i_nlink--;
-+	if (!S_ISDIR(inode->i_mode) || inode->i_nlink > 2)
-+		inode->i_nlink--;
- }
- 
- static int ext3_add_nondir(handle_t *handle,
-@@ -1703,7 +1709,7 @@ static int ext3_mkdir(struct inode * dir
- 	struct ext3_dir_entry_2 * de;
- 	int err, retries = 0;
- 
--	if (dir->i_nlink >= EXT3_LINK_MAX)
-+	if (EXT3_DIR_LINK_MAX(dir))
- 		return -EMLINK;
- 
- retry:
-@@ -1726,7 +1732,7 @@ retry:
- 	inode->i_size = EXT3_I(inode)->i_disksize = inode->i_sb->s_blocksize;
- 	dir_block = ext3_bread (handle, inode, 0, 1, &err);
- 	if (!dir_block) {
--		inode->i_nlink--; /* is this nlink == 0? */
-+		ext3_dec_count(handle, inode); /* is this nlink == 0? */
- 		ext3_mark_inode_dirty(handle, inode);
- 		iput (inode);
- 		goto out_stop;
-@@ -1758,7 +1764,7 @@ retry:
- 		iput (inode);
- 		goto out_stop;
- 	}
--	dir->i_nlink++;
-+	ext3_inc_count(handle, dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 	d_instantiate(dentry, inode);
-@@ -2023,10 +2029,10 @@ static int ext3_rmdir (struct inode * di
- 	retval = ext3_delete_entry(handle, dir, de, bh);
- 	if (retval)
- 		goto end_rmdir;
--	if (inode->i_nlink != 2)
--		ext3_warning (inode->i_sb, "ext3_rmdir",
--			      "empty directory has nlink!=2 (%d)",
--			      inode->i_nlink);
-+	if (!EXT3_DIR_LINK_EMPTY(inode))
-+		ext3_warning(inode->i_sb, "ext3_rmdir",
-+			     "empty directory has too many links (%d)",
-+			     inode->i_nlink);
- 	inode->i_version++;
- 	inode->i_nlink = 0;
- 	/* There's no need to set i_disksize: the fact that i_nlink is
-@@ -2036,7 +2042,7 @@ static int ext3_rmdir (struct inode * di
- 	ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
--	dir->i_nlink--;
-+	ext3_dec_count(handle, dir);
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 
-@@ -2087,7 +2093,7 @@ static int ext3_unlink(struct inode * di
- 	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
--	inode->i_nlink--;
-+	ext3_dec_count(handle, inode);
- 	if (!inode->i_nlink)
- 		ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime;
-@@ -2162,7 +2168,7 @@ static int ext3_link (struct dentry * ol
- 	struct inode *inode = old_dentry->d_inode;
- 	int err, retries = 0;
- 
--	if (inode->i_nlink >= EXT3_LINK_MAX)
-+	if (EXT3_DIR_LINK_MAX(inode))
- 		return -EMLINK;
- 
- retry:
-@@ -2249,8 +2255,8 @@ static int ext3_rename (struct inode * o
- 		if (le32_to_cpu(PARENT_INO(dir_bh->b_data)) != old_dir->i_ino)
- 			goto end_rename;
- 		retval = -EMLINK;
--		if (!new_inode && new_dir!=old_dir &&
--				new_dir->i_nlink >= EXT3_LINK_MAX)
-+		if (!new_inode && new_dir != old_dir &&
-+		    EXT3_DIR_LINK_MAX(new_dir))
- 			goto end_rename;
- 	}
- 	if (!new_bh) {
-@@ -2307,7 +2313,7 @@ static int ext3_rename (struct inode * o
- 	}
- 
- 	if (new_inode) {
--		new_inode->i_nlink--;
-+		ext3_dec_count(handle, new_inode);
- 		new_inode->i_ctime = CURRENT_TIME_SEC;
- 	}
- 	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
-@@ -2318,11 +2324,13 @@ static int ext3_rename (struct inode * o
- 		PARENT_INO(dir_bh->b_data) = cpu_to_le32(new_dir->i_ino);
- 		BUFFER_TRACE(dir_bh, "call ext3_journal_dirty_metadata");
- 		ext3_journal_dirty_metadata(handle, dir_bh);
--		old_dir->i_nlink--;
-+		ext3_dec_count(handle, old_dir);
- 		if (new_inode) {
--			new_inode->i_nlink--;
-+			/* checked empty_dir above, can't have another parent,
-+			 * ext3_dec_count() won't work for many-linked dirs */
-+			new_inode->i_nlink = 0;
- 		} else {
--			new_dir->i_nlink++;
-+			ext3_inc_count(handle, new_dir);
- 			ext3_update_dx_flag(new_dir);
- 			ext3_mark_inode_dirty(handle, new_dir);
- 		}
-Index: linux-2.6.12/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.12.orig/include/linux/ext3_fs.h
-+++ linux-2.6.12/include/linux/ext3_fs.h
-@@ -78,7 +78,7 @@ struct statfs;
- /*
-  * Maximal count of links to a file
-  */
--#define EXT3_LINK_MAX		32000
-+#define EXT3_LINK_MAX		65000
- 
- /*
-  * Macro-instructions used to manage several block sizes
-@@ -539,6 +539,7 @@ static inline struct ext3_inode_info *EX
- #define EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER	0x0001
- #define EXT3_FEATURE_RO_COMPAT_LARGE_FILE	0x0002
- #define EXT3_FEATURE_RO_COMPAT_BTREE_DIR	0x0004
-+#define EXT4_FEATURE_RO_COMPAT_DIR_NLINK	0x0020
- 
- #define EXT3_FEATURE_INCOMPAT_COMPRESSION	0x0001
- #define EXT3_FEATURE_INCOMPAT_FILETYPE		0x0002
-@@ -552,6 +553,7 @@ static inline struct ext3_inode_info *EX
- 					 EXT3_FEATURE_INCOMPAT_META_BG)
- #define EXT3_FEATURE_RO_COMPAT_SUPP	(EXT3_FEATURE_RO_COMPAT_SPARSE_SUPER| \
- 					 EXT3_FEATURE_RO_COMPAT_LARGE_FILE| \
-+					 EXT4_FEATURE_RO_COMPAT_DIR_NLINK| \
- 					 EXT3_FEATURE_RO_COMPAT_BTREE_DIR)
- 
- /*
diff --git a/ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch
deleted file mode 100644
index 57898d572fb5e506cbc238da490c2de851a22494..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-remove-cond_resched-calls-2.6.12.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-Index: linux-stage/fs/ext3/ialloc.c
-===================================================================
---- linux-stage.orig/fs/ext3/ialloc.c	2005-06-26 10:59:43.048185981 +0200
-+++ linux-stage/fs/ext3/ialloc.c	2005-06-26 11:01:21.317716027 +0200
-@@ -775,7 +775,6 @@
- 		if (!gdp)
- 			continue;
- 		desc_count += le16_to_cpu(gdp->bg_free_inodes_count);
--		cond_resched();
- 	}
- 	return desc_count;
- #endif
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c	2005-06-26 10:59:43.205412542 +0200
-+++ linux-stage/fs/ext3/super.c	2005-06-26 11:02:29.599941754 +0200
-@@ -2236,11 +2232,9 @@
- 		 * block group descriptors.  If the sparse superblocks
- 		 * feature is turned on, then not all groups have this.
- 		 */
--		for (i = 0; i < ngroups; i++) {
-+		for (i = 0; i < ngroups; i++)
- 			overhead += ext3_bg_has_super(sb, i) +
- 				ext3_bg_num_gdb(sb, i);
--			cond_resched();
--		}
- 
- 		/*
- 		 * Every block group has an inode bitmap, a block
diff --git a/ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch
deleted file mode 100644
index f323584f6f36cc6a2a9baf1a02e0a11efc1f7a43..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-rename-reserve-2.6-suse.patch
+++ /dev/null
@@ -1,263 +0,0 @@
-Index: linux-2.6.5-sles9/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_fs.h	2004-11-09 02:29:14.878513832 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_fs.h	2004-11-09 02:32:14.151260232 +0300
-@@ -709,7 +709,7 @@
- 						    unsigned int block_group,
- 						    struct buffer_head ** bh);
- extern int ext3_should_retry_alloc(struct super_block *sb, int *retries);
--extern void rsv_window_add(struct super_block *sb, struct reserve_window_node *rsv);
-+extern void rsv_window_add(struct super_block *sb, struct ext3_reserve_window_node *rsv);
- 
- /* dir.c */
- extern int ext3_check_dir_entry(const char *, struct inode *,
-Index: linux-2.6.5-sles9/include/linux/ext3_fs_sb.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_sb.h	2004-11-09 02:28:18.753046200 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_fs_sb.h	2004-11-09 02:32:27.996155488 +0300
-@@ -86,7 +86,7 @@
- 	/* root of the per fs reservation window tree */
- 	spinlock_t s_rsv_window_lock;
- 	struct rb_root s_rsv_window_root;
--	struct reserve_window_node s_rsv_window_head;
-+	struct ext3_reserve_window_node s_rsv_window_head;
- 
- 	/* Journaling */
- 	struct inode * s_journal_inode;
-Index: linux-2.6.5-sles9/include/linux/ext3_fs_i.h
-===================================================================
---- linux-2.6.5-sles9.orig/include/linux/ext3_fs_i.h	2004-11-09 02:23:21.606219384 +0300
-+++ linux-2.6.5-sles9/include/linux/ext3_fs_i.h	2004-11-09 02:32:08.752081032 +0300
-@@ -20,17 +20,17 @@
- #include <linux/rbtree.h>
- #include <linux/seqlock.h>
- 
--struct reserve_window {
-+struct ext3_reserve_window {
- 	__u32			_rsv_start;	/* First byte reserved */
- 	__u32			_rsv_end;	/* Last byte reserved or 0 */
- };
- 
--struct reserve_window_node {
-+struct ext3_reserve_window_node {
- 	struct rb_node	 	rsv_node;
- 	atomic_t		rsv_goal_size;
- 	atomic_t		rsv_alloc_hit;
- 	seqlock_t		rsv_seqlock;
--	struct reserve_window	rsv_window;
-+	struct ext3_reserve_window	rsv_window;
- };
- 
- #define rsv_start rsv_window._rsv_start
-@@ -76,7 +76,7 @@
- 	 */
- 	__u32	i_next_alloc_goal;
- 	/* block reservation window */
--	struct reserve_window_node i_rsv_window;
-+	struct ext3_reserve_window_node i_rsv_window;
- 
- 	__u32	i_dir_start_lookup;
- #ifdef CONFIG_EXT3_FS_XATTR
-Index: linux-2.6.5-sles9/fs/ext3/balloc.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/balloc.c	2004-11-09 02:26:53.078070776 +0300
-+++ linux-2.6.5-sles9/fs/ext3/balloc.c	2004-11-09 02:32:43.108858008 +0300
-@@ -115,7 +115,7 @@
- 			      const char *fn)
- {
- 	struct rb_node *n;
--	struct reserve_window_node *rsv, *prev;
-+	struct ext3_reserve_window_node *rsv, *prev;
- 	int bad;
- 
- restart:
-@@ -125,7 +125,7 @@
- 
- 	printk("Block Allocation Reservation Windows Map (%s):\n", fn);
- 	while (n) {
--		rsv = list_entry(n, struct reserve_window_node, rsv_node);
-+		rsv = list_entry(n, struct ext3_reserve_window_node, rsv_node);
- 		if (verbose)
- 			printk("reservation window 0x%p "
- 			       "start:  %d, end:  %d\n",
-@@ -161,7 +161,7 @@
- #endif
- 
- static int
--goal_in_my_reservation(struct reserve_window *rsv, int goal,
-+goal_in_my_reservation(struct ext3_reserve_window *rsv, int goal,
- 			unsigned int group, struct super_block * sb)
- {
- 	unsigned long group_first_block, group_last_block;
-@@ -184,18 +184,18 @@
-  * if the goal is not in any window.
-  * Returns NULL if there are no windows or if all windows start after the goal.
-  */
--static struct reserve_window_node *search_reserve_window(struct rb_root *root,
-+static struct ext3_reserve_window_node *search_ext3_reserve_window(struct rb_root *root,
- 							 unsigned long goal)
- {
- 	struct rb_node *n = root->rb_node;
--	struct reserve_window_node *rsv;
-+	struct ext3_reserve_window_node *rsv;
- 
- 	if (!n)
- 		return NULL;
- 
- 	while (n)
- 	{
--		rsv = rb_entry(n, struct reserve_window_node, rsv_node);
-+		rsv = rb_entry(n, struct ext3_reserve_window_node, rsv_node);
- 
- 		if (goal < rsv->rsv_start)
- 			n = n->rb_left;
-@@ -212,13 +212,13 @@
- 	 */
- 	if (rsv->rsv_start > goal) {
- 		n = rb_prev(&rsv->rsv_node);
--		rsv = rb_entry(n, struct reserve_window_node, rsv_node);
-+		rsv = rb_entry(n, struct ext3_reserve_window_node, rsv_node);
- 	}
- 	return rsv;
- }
- 
- void rsv_window_add(struct super_block *sb,
--		    struct reserve_window_node *rsv)
-+		    struct ext3_reserve_window_node *rsv)
- {
- 	struct rb_root *root = &EXT3_SB(sb)->s_rsv_window_root;
- 	struct rb_node *node = &rsv->rsv_node;
-@@ -226,12 +226,12 @@
- 
- 	struct rb_node ** p = &root->rb_node;
- 	struct rb_node * parent = NULL;
--	struct reserve_window_node *this;
-+	struct ext3_reserve_window_node *this;
- 
- 	while (*p)
- 	{
- 		parent = *p;
--		this = rb_entry(parent, struct reserve_window_node, rsv_node);
-+		this = rb_entry(parent, struct ext3_reserve_window_node, rsv_node);
- 
- 		if (start < this->rsv_start)
- 			p = &(*p)->rb_left;
-@@ -246,7 +246,7 @@
- }
- 
- static void rsv_window_remove(struct super_block *sb,
--			      struct reserve_window_node *rsv)
-+			      struct ext3_reserve_window_node *rsv)
- {
- 	rsv->rsv_start = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- 	rsv->rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
-@@ -254,7 +254,7 @@
- 	rb_erase(&rsv->rsv_node, &EXT3_SB(sb)->s_rsv_window_root);
- }
- 
--static inline int rsv_is_empty(struct reserve_window *rsv)
-+static inline int rsv_is_empty(struct ext3_reserve_window *rsv)
- {
- 	/* a valid reservation end block could not be 0 */
- 	return (rsv->_rsv_end == EXT3_RESERVE_WINDOW_NOT_ALLOCATED);
-@@ -263,7 +263,7 @@
- void ext3_discard_reservation(struct inode *inode)
- {
- 	struct ext3_inode_info *ei = EXT3_I(inode);
--	struct reserve_window_node *rsv = &ei->i_rsv_window;
-+	struct ext3_reserve_window_node *rsv = &ei->i_rsv_window;
- 	spinlock_t *rsv_lock = &EXT3_SB(inode->i_sb)->s_rsv_window_lock;
- 
- 	if (!rsv_is_empty(&rsv->rsv_window)) {
-@@ -600,7 +600,7 @@
-  */
- static int
- ext3_try_to_allocate(struct super_block *sb, handle_t *handle, int group,
--	struct buffer_head *bitmap_bh, int goal, struct reserve_window *my_rsv)
-+	struct buffer_head *bitmap_bh, int goal, struct ext3_reserve_window *my_rsv)
- {
- 	int group_first_block, start, end;
- 
-@@ -700,13 +700,13 @@
-  *	on succeed, it returns the reservation window to be appended to.
-  *	failed, return NULL.
-  */
--static struct reserve_window_node *find_next_reservable_window(
--				struct reserve_window_node *search_head,
-+static struct ext3_reserve_window_node *find_next_reservable_window(
-+				struct ext3_reserve_window_node *search_head,
- 				unsigned long size, int *start_block,
- 				int last_block)
- {
- 	struct rb_node *next;
--	struct reserve_window_node *rsv, *prev;
-+	struct ext3_reserve_window_node *rsv, *prev;
- 	int cur;
- 
- 	/* TODO: make the start of the reservation window byte-aligned */
-@@ -734,7 +734,7 @@
- 
- 		prev = rsv;
- 		next = rb_next(&rsv->rsv_node);
--		rsv = list_entry(next, struct reserve_window_node, rsv_node);
-+		rsv = list_entry(next, struct ext3_reserve_window_node, rsv_node);
- 
- 		/*
- 		 * Reached the last reservation, we can just append to the
-@@ -801,15 +801,15 @@
-  *	@group: the group we are trying to allocate in
-  *	@bitmap_bh: the block group block bitmap
-  */
--static int alloc_new_reservation(struct reserve_window_node *my_rsv,
-+static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv,
- 		int goal, struct super_block *sb,
- 		unsigned int group, struct buffer_head *bitmap_bh)
- {
--	struct reserve_window_node *search_head;
-+	struct ext3_reserve_window_node *search_head;
- 	int group_first_block, group_end_block, start_block;
- 	int first_free_block;
- 	int reservable_space_start;
--	struct reserve_window_node *prev_rsv;
-+	struct ext3_reserve_window_node *prev_rsv;
- 	struct rb_root *fs_rsv_root = &EXT3_SB(sb)->s_rsv_window_root;
- 	unsigned long size;
- 
-@@ -859,7 +859,7 @@
- 	/*
- 	 * shift the search start to the window near the goal block
- 	 */
--	search_head = search_reserve_window(fs_rsv_root, start_block);
-+	search_head = search_ext3_reserve_window(fs_rsv_root, start_block);
- 
- 	/*
- 	 * find_next_reservable_window() simply finds a reservable window
-@@ -968,7 +968,7 @@
- static int
- ext3_try_to_allocate_with_rsv(struct super_block *sb, handle_t *handle,
- 			unsigned int group, struct buffer_head *bitmap_bh,
--			int goal, struct reserve_window_node * my_rsv,
-+			int goal, struct ext3_reserve_window_node * my_rsv,
- 			int *errp)
- {
- 	spinlock_t *rsv_lock;
-@@ -1027,7 +1027,7 @@
- 	 * then we could go to allocate from the reservation window directly.
- 	 */
- 	while (1) {
--		struct reserve_window rsv_copy;
-+		struct ext3_reserve_window rsv_copy;
- 		unsigned int seq;
- 
- 		do {
-@@ -1159,8 +1159,8 @@
- 	struct ext3_group_desc *gdp;
- 	struct ext3_super_block *es;
- 	struct ext3_sb_info *sbi;
--	struct reserve_window_node *my_rsv = NULL;
--	struct reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window;
-+	struct ext3_reserve_window_node *my_rsv = NULL;
-+	struct ext3_reserve_window_node *rsv = &EXT3_I(inode)->i_rsv_window;
- 	unsigned short windowsz = 0;
- #ifdef EXT3FS_DEBUG
- 	static int goal_hits, goal_attempts;
diff --git a/ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch
deleted file mode 100644
index afda0bd8c58bf31a32ba6e9e2227ad410fe013c1..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-san-jdike-2.6-suse.patch
+++ /dev/null
@@ -1,106 +0,0 @@
- fs/ext3/inode.c |   81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- fs/ext3/super.c |    4 ++
- 2 files changed, 85 insertions(+)
-
---- linux-2.5.73/fs/ext3/inode.c~ext3-san-jdike-2.5.73	2003-06-22 12:32:58.000000000 -0600
-+++ linux-2.5.73-braam/fs/ext3/inode.c	2003-06-30 12:19:21.000000000 -0600
-@@ -2945,3 +2945,84 @@ int ext3_change_inode_journal_flag(struc
- 
- 	return err;
- }
-+
-+/* for each block: 1 ind + 1 dind + 1 tind
-+ * for each block: 3 bitmap blocks
-+ * for each block: 3 group descriptor blocks
-+ * i inode block
-+ * 1 superblock
-+ * 2 * EXT3_SINGLEDATA_TRANS_BLOCKS for the quote files
-+ * ((1+1+1) * 3 * nblocks) + 1 + 1 + 2 * EXT3_SINGLEDATA_TRANS_BLOCKS
-+ *
-+ * XXX assuming:
-+ * (1) fs logic block size == page size
-+ * (2) ext3 in writeback mode
-+ */
-+static inline int ext3_san_write_trans_blocks(int nblocks)
-+{
-+	int ret;
-+	
-+	ret = (1 + 1 + 1) * 3 * nblocks + 1 + 1;
-+
-+#ifdef CONFIG_QUOTA
-+	ret += 2 * EXT3_SINGLEDATA_TRANS_BLOCKS;
-+#endif
-+
-+	return ret;
-+}
-+
-+/* Alloc blocks for an inode, while don't create any buffer/page
-+ * for data I/O; set the inode size if file is extended.
-+ *
-+ * @inode:    target inode
-+ * @blocks:   array of logic block number
-+ * @nblocks:  how many blocks need be alloced
-+ * @newsize:  new filesize we should set
-+ *
-+ * return:    0 success, otherwise failed
-+ *            (*blocks) contains physical block number alloced
-+ *
-+ * XXX this assume the fs block size == page size
-+ */
-+int ext3_prep_san_write(struct inode *inode, long *blocks,
-+			int nblocks, loff_t newsize)
-+{
-+	handle_t *handle;
-+	struct buffer_head bh_tmp;
-+	int needed_blocks;
-+	int i, ret = 0, ret2;
-+
-+	needed_blocks = ext3_san_write_trans_blocks(nblocks);
-+
-+	lock_kernel();
-+	handle = ext3_journal_start(inode, needed_blocks);
-+	if (IS_ERR(handle)) {
-+		unlock_kernel();
-+		return PTR_ERR(handle);
-+	}
-+	unlock_kernel();
-+
-+	/* alloc blocks one by one */
-+	for (i = 0; i < nblocks; i++) {
-+		ret = ext3_get_block_handle(handle, inode, blocks[i],
-+						&bh_tmp, 1, 1);
-+		if (ret)
-+			break;
-+
-+		blocks[i] = bh_tmp.b_blocknr;
-+	}
-+
-+	/* set inode size if needed */
-+	if (!ret && (newsize > inode->i_size)) {
-+		inode->i_size = newsize;
-+		ext3_mark_inode_dirty(handle, inode);
-+	}
-+
-+	lock_kernel();
-+	ret2 = ext3_journal_stop(handle);
-+	unlock_kernel();
-+
-+	if (!ret)
-+		ret = ret2;
-+	return ret;
-+}
---- linux-2.5.73/fs/ext3/super.c~ext3-san-jdike-2.5.73	2003-06-22 12:33:16.000000000 -0600
-+++ linux-2.5.73-braam/fs/ext3/super.c	2003-06-30 12:16:36.000000000 -0600
-@@ -2080,6 +2080,10 @@ static void __exit exit_ext3_fs(void)
- 	exit_ext3_xattr();
- }
- 
-+int ext3_prep_san_write(struct inode *inode, long *blocks,
-+                        int nblocks, loff_t newsize);
-+EXPORT_SYMBOL(ext3_prep_san_write);
-+
- MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
- MODULE_DESCRIPTION("Second Extended Filesystem with journaling extensions");
- MODULE_LICENSE("GPL");
-
-_
diff --git a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch b/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch
deleted file mode 100644
index ef0f4a41bd77db4b66f7c959f316ba9a113ae2ba..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.12.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Subject: Avoid disk sector_t overflow for >2TB ext3 filesystem
-From: Mingming Cao <cmm@us.ibm.com>
-
-
-If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e.
-CONFIG_LBD not defined in the kernel), the calculation of the disk sector
-will overflow.  Add check at ext3_fill_super() and ext3_group_extend() to
-prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4
-bytes.
-
-Verified this patch on a 32 bit platform without CONFIG_LBD defined
-(sector_t is 32 bits long), mount refuse to mount a 10TB ext3.
-
-Signed-off-by: Mingming Cao<cmm@us.ibm.com>
-Acked-by: Andreas Dilger <adilger@clusterfs.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
----
-
- fs/ext3/resize.c |   10 ++++++++++
- fs/ext3/super.c  |   10 ++++++++++
- 2 files changed, 20 insertions(+)
-
-diff -puN fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/resize.c
---- devel/fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem	2006-05-22 14:09:53.000000000 -0700
-+++ devel-akpm/fs/ext3/resize.c	2006-05-22 14:10:56.000000000 -0700
-@@ -926,6 +926,16 @@ int ext3_group_extend(struct super_block
- 	if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
- 		return 0;
- 
-+	if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
-+		printk(KERN_ERR "EXT3-fs: filesystem on %s: "
-+		       "too large to resize to %lu blocks safely\n",
-+		       sb->s_id, n_blocks_count);
-+		if (sizeof(sector_t) < 8)
-+			ext3_warning(sb, __FUNCTION__,
-+				     "CONFIG_LBD not enabled\n");
-+		return -EINVAL;
-+	}
-+
- 	if (n_blocks_count < o_blocks_count) {
- 		ext3_warning(sb, __FUNCTION__,
- 			     "can't shrink FS - resize aborted");
-diff -puN fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/super.c
---- devel/fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem	2006-05-22 14:09:53.000000000 -0700
-+++ devel-akpm/fs/ext3/super.c	2006-05-22 14:11:10.000000000 -0700
-@@ -1565,6 +1565,17 @@ static int ext3_fill_super (struct super
- 		goto failed_mount;
- 	}
- 
-+	if (le32_to_cpu(es->s_blocks_count) >
-+	    (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
-+		printk(KERN_ERR "EXT3-fs: filesystem on %s: "
-+		       "too large to mount safely - %u blocks\n", sb->s_id,
-+		       le32_to_cpu(es->s_blocks_count));
-+		if (sizeof(sector_t) < 8)
-+			printk(KERN_WARNING
-+			       "EXT3-fs: CONFIG_LBD not enabled\n");
-+		goto failed_mount;
-+	}
-+
- 	if (EXT3_BLOCKS_PER_GROUP(sb) == 0)
- 		goto cantfind_ext3;
- 	sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) -
-_
diff --git a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch b/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch
deleted file mode 100644
index fe655da1eb483b3c5bc2b95d25877041e09b66b8..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.5-suse.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-Subject: Avoid disk sector_t overflow for >2TB ext3 filesystem
-From: Mingming Cao <cmm@us.ibm.com>
-
-
-If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e. 
-CONFIG_LBD not defined in the kernel), the calculation of the disk sector
-will overflow.  Add check at ext3_fill_super() and ext3_group_extend() to
-prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4
-bytes.
-
-Verified this patch on a 32 bit platform without CONFIG_LBD defined
-(sector_t is 32 bits long), mount refuse to mount a 10TB ext3.
-
-Signed-off-by: Mingming Cao<cmm@us.ibm.com>
-Acked-by: Andreas Dilger <adilger@clusterfs.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
----
-
- fs/ext3/resize.c |   10 ++++++++++
- fs/ext3/super.c  |   10 ++++++++++
- 2 files changed, 20 insertions(+)
-
-diff -puN fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/super.c
---- devel/fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem	2006-05-22 14:09:53.000000000 -0700
-+++ devel-akpm/fs/ext3/super.c	2006-05-22 14:11:10.000000000 -0700
-@@ -1565,6 +1565,17 @@ static int ext3_fill_super (struct super
- 		goto failed_mount;
- 	}
- 
-+	if (le32_to_cpu(es->s_blocks_count) >
-+	    (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
-+		printk(KERN_ERR "EXT3-fs: filesystem on %s: "
-+		       "too large to mount safely - %u blocks\n", sb->s_id,
-+		       le32_to_cpu(es->s_blocks_count));
-+		if (sizeof(sector_t) < 8)
-+			printk(KERN_WARNING
-+			       "EXT3-fs: CONFIG_LBD not enabled\n");
-+		goto failed_mount;
-+	}
-+
- 	sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) -
- 			       le32_to_cpu(es->s_first_data_block) +
- 			       EXT3_BLOCKS_PER_GROUP(sb) - 1) /
-_
diff --git a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch
deleted file mode 100644
index 9bfdf801b31f1276f76550e5232282a08c74efd1..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-sector_t-overflow-2.6.9-rhel4.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Subject: Avoid disk sector_t overflow for >2TB ext3 filesystem
-From: Mingming Cao <cmm@us.ibm.com>
-
-
-If ext3 filesystem is larger than 2TB, and sector_t is a u32 (i.e. 
-CONFIG_LBD not defined in the kernel), the calculation of the disk sector
-will overflow.  Add check at ext3_fill_super() and ext3_group_extend() to
-prevent mount/remount/resize >2TB ext3 filesystem if sector_t size is 4
-bytes.
-
-Verified this patch on a 32 bit platform without CONFIG_LBD defined
-(sector_t is 32 bits long), mount refuse to mount a 10TB ext3.
-
-Signed-off-by: Mingming Cao<cmm@us.ibm.com>
-Acked-by: Andreas Dilger <adilger@clusterfs.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
----
-
- fs/ext3/resize.c |   10 ++++++++++
- fs/ext3/super.c  |   10 ++++++++++
- 2 files changed, 20 insertions(+)
-
-diff -puN fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/resize.c
---- devel/fs/ext3/resize.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem	2006-05-22 14:09:53.000000000 -0700
-+++ devel-akpm/fs/ext3/resize.c	2006-05-22 14:10:56.000000000 -0700
-@@ -926,6 +926,16 @@ int ext3_group_extend(struct super_block
- 	if (n_blocks_count == 0 || n_blocks_count == o_blocks_count)
- 		return 0;
- 
-+	if (n_blocks_count > (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
-+		printk(KERN_ERR "EXT3-fs: filesystem on %s: "
-+		       "too large to resize to %lu blocks safely\n",
-+		       sb->s_id, n_blocks_count);
-+		if (sizeof(sector_t) < 8)
-+			ext3_warning(sb, __FUNCTION__,
-+				     "CONFIG_LBD not enabled\n");
-+		return -EINVAL;
-+	}
-+
- 	if (n_blocks_count < o_blocks_count) {
- 		ext3_warning(sb, __FUNCTION__,
- 			     "can't shrink FS - resize aborted");
-diff -puN fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem fs/ext3/super.c
---- devel/fs/ext3/super.c~avoid-disk-sector_t-overflow-for-2tb-ext3-filesystem	2006-05-22 14:09:53.000000000 -0700
-+++ devel-akpm/fs/ext3/super.c	2006-05-22 14:11:10.000000000 -0700
-@@ -1565,6 +1565,17 @@ static int ext3_fill_super (struct super
- 		goto failed_mount;
- 	}
- 
-+	if (le32_to_cpu(es->s_blocks_count) >
-+	    (sector_t)(~0ULL) >> (sb->s_blocksize_bits - 9)) {
-+		printk(KERN_ERR "EXT3-fs: filesystem on %s: "
-+		       "too large to mount safely - %u blocks\n", sb->s_id,
-+		       le32_to_cpu(es->s_blocks_count));
-+		if (sizeof(sector_t) < 8)
-+			printk(KERN_WARNING
-+			       "EXT3-fs: CONFIG_LBD not enabled\n");
-+		goto failed_mount;
-+	}
-+
- 	sbi->s_groups_count = (le32_to_cpu(es->s_blocks_count) -
- 			       le32_to_cpu(es->s_first_data_block) +
- 			       EXT3_BLOCKS_PER_GROUP(sb) - 1) /
-_
diff --git a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch
deleted file mode 100644
index f71e47000511df284012951849abd51a61a07008..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-rhel4.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-diff -urp RH_2_6_9_42_0_3.orig/fs/ext3/ialloc.c RH_2_6_9_42_0_3/fs/ext3/ialloc.c
---- RH_2_6_9_42_0_3.orig/fs/ext3/ialloc.c	2006-10-23 13:32:46.000000000 +0300
-+++ RH_2_6_9_42_0_3/fs/ext3/ialloc.c	2007-02-16 07:22:28.000000000 +0200
-@@ -419,7 +419,8 @@ static int find_group_other(struct super
-  * For other inodes, search forward from the parent directory's block
-  * group to find a free inode.
-  */
--struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode)
-+struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode,
-+				unsigned long goal)
- {
- 	struct super_block *sb;
- 	struct buffer_head *bitmap_bh = NULL;
-@@ -447,6 +448,41 @@ struct inode *ext3_new_inode(handle_t *h
- 
- 	sbi = EXT3_SB(sb);
- 	es = sbi->s_es;
-+	if (goal) {
-+		group = (goal - 1) / EXT3_INODES_PER_GROUP(sb);
-+		ino = (goal - 1) % EXT3_INODES_PER_GROUP(sb);
-+		err = -EIO;
-+
-+		gdp = ext3_get_group_desc(sb, group, &bh2);
-+		if (!gdp)
-+			goto fail;
-+
-+		bitmap_bh = read_inode_bitmap (sb, group);
-+		if (!bitmap_bh)
-+			goto fail;
-+
-+		BUFFER_TRACE(bh, "get_write_access");
-+		err = ext3_journal_get_write_access(handle, bitmap_bh);
-+		if (err) goto fail;
-+
-+		if (ext3_set_bit_atomic(sb_bgl_lock(sbi, group),
-+					ino, bitmap_bh->b_data)) {
-+			printk(KERN_ERR "goal inode %lu unavailable\n", goal);
-+			/* Oh well, we tried. */
-+			goto continue_allocation;
-+		}
-+
-+		BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
-+		err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+		if (err) goto fail;
-+
-+		/* We've shortcircuited the allocation system successfully,
-+		 * now finish filling in the inode.
-+		 */
-+		goto got;
-+	}
-+
-+continue_allocation:
- 	if (S_ISDIR(mode)) {
- 		if (test_opt (sb, OLDALLOC))
- 			group = find_group_dir(sb, dir);
-diff -urp RH_2_6_9_42_0_3.orig/fs/ext3/ioctl.c RH_2_6_9_42_0_3/fs/ext3/ioctl.c
---- RH_2_6_9_42_0_3.orig/fs/ext3/ioctl.c	2006-10-23 13:32:46.000000000 +0300
-+++ RH_2_6_9_42_0_3/fs/ext3/ioctl.c	2007-02-16 07:22:28.000000000 +0200
-@@ -25,6 +25,31 @@ int ext3_ioctl (struct inode * inode, st
- 	ext3_debug ("cmd = %u, arg = %lu\n", cmd, arg);
- 
- 	switch (cmd) {
-+	case EXT3_IOC_CREATE_INUM: {
-+		char name[32];
-+		struct dentry *dchild, *dparent;
-+		int rc = 0;
-+
-+		dparent = list_entry(inode->i_dentry.next, struct dentry,
-+				     d_alias);
-+		snprintf(name, sizeof name, "%lu", arg);
-+		dchild = lookup_one_len(name, dparent, strlen(name));
-+		if (dchild->d_inode) {
-+			printk(KERN_ERR "%*s/%lu already exists (ino %lu)\n",
-+			       dparent->d_name.len, dparent->d_name.name, arg,
-+			       dchild->d_inode->i_ino);
-+			rc = -EEXIST;
-+		} else {
-+			dchild->d_fsdata = (void *)arg;
-+			rc = vfs_create(inode, dchild, 0644, NULL);
-+			if (rc)
-+				printk(KERN_ERR "vfs_create: %d\n", rc);
-+			else if (dchild->d_inode->i_ino != arg)
-+				rc = -EEXIST;
-+		}
-+		dput(dchild);
-+		return rc;
-+	}
- 	case EXT3_IOC_GETFLAGS:
- 		flags = ei->i_flags & EXT3_FL_USER_VISIBLE;
- 		return put_user(flags, (int __user *) arg);
-diff -urp RH_2_6_9_42_0_3.orig/fs/ext3/namei.c RH_2_6_9_42_0_3/fs/ext3/namei.c
---- RH_2_6_9_42_0_3.orig/fs/ext3/namei.c	2006-10-23 13:32:59.000000000 +0300
-+++ RH_2_6_9_42_0_3/fs/ext3/namei.c	2007-02-22 18:58:13.000000000 +0200
-@@ -97,6 +97,7 @@ struct dx_entry
- 	__le32 block;
- };
- 
-+
- /*
-  * dx_root_info is laid out so that if it should somehow get overlaid by a
-  * dirent the two low bits of the hash version will be zero.  Therefore, the
-@@ -141,6 +142,14 @@ struct dx_map_entry
- 	u32 offs;
- };
- 
-+#define LVFS_DENTRY_PARAM_MAGIC		20070216UL
-+struct lvfs_dentry_params
-+{
-+	unsigned long   p_inum;
-+	void            *p_ptr;	
-+	u32		magic;
-+};
-+
- #ifdef CONFIG_EXT3_INDEX
- static inline unsigned dx_get_block (struct dx_entry *entry);
- static void dx_set_block (struct dx_entry *entry, unsigned value);
-@@ -1624,6 +1633,20 @@ static int ext3_add_nondir(handle_t *han
- 	return err;
- }
- 
-+static struct inode * ext3_new_inode_wantedi(handle_t *handle, struct inode *dir,
-+						int mode, struct dentry *dentry)
-+{
-+	unsigned long inum = 0;
-+
-+	if (dentry->d_fsdata != NULL) {
-+		struct lvfs_dentry_params *param = dentry->d_fsdata;
-+
-+		if (param->magic == LVFS_DENTRY_PARAM_MAGIC)
-+			inum = param->p_inum;
-+	}
-+	return ext3_new_inode(handle, dir, mode, inum);
-+}
-+
- /*
-  * By the time this is called, we already have created
-  * the directory cache entry for the new file, but it
-@@ -1649,7 +1672,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, mode);
-+	inode = ext3_new_inode_wantedi (handle, dir, mode, dentry);
- 	err = PTR_ERR(inode);
- 	if (!IS_ERR(inode)) {
- 		inode->i_op = &ext3_file_inode_operations;
-@@ -1683,7 +1706,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, mode);
-+	inode = ext3_new_inode_wantedi (handle, dir, mode, dentry);
- 	err = PTR_ERR(inode);
- 	if (!IS_ERR(inode)) {
- 		init_special_inode(inode, inode->i_mode, rdev);
-@@ -1719,7 +1742,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, S_IFDIR | mode);
-+	inode = ext3_new_inode_wantedi (handle, dir, S_IFDIR | mode, dentry);
- 	err = PTR_ERR(inode);
- 	if (IS_ERR(inode))
- 		goto out_stop;
-@@ -2124,7 +2147,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, S_IFLNK|S_IRWXUGO);
-+	inode = ext3_new_inode_wantedi (handle, dir, S_IFLNK|S_IRWXUGO, dentry);
- 	err = PTR_ERR(inode);
- 	if (IS_ERR(inode))
- 		goto out_stop;
-diff -urp RH_2_6_9_42_0_3.orig/include/linux/ext3_fs.h RH_2_6_9_42_0_3/include/linux/ext3_fs.h
---- RH_2_6_9_42_0_3.orig/include/linux/ext3_fs.h	2006-10-23 13:32:46.000000000 +0300
-+++ RH_2_6_9_42_0_3/include/linux/ext3_fs.h	2007-02-16 07:22:28.000000000 +0200
-@@ -741,7 +741,8 @@ extern int ext3fs_dirhash(const char *na
- 			  dx_hash_info *hinfo);
- 
- /* ialloc.c */
--extern struct inode * ext3_new_inode (handle_t *, struct inode *, int);
-+extern struct inode * ext3_new_inode (handle_t *, struct inode *, int,
-+				      unsigned long);
- extern void ext3_free_inode (handle_t *, struct inode *);
- extern struct inode * ext3_orphan_get (struct super_block *, unsigned long);
- extern unsigned long ext3_count_free_inodes (struct super_block *);
-@@ -833,4 +834,6 @@ extern struct inode_operations ext3_fast
- 
- #endif	/* __KERNEL__ */
- 
-+/* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */
-+#define EXT3_IOC_CREATE_INUM			_IOW('f', 5, long)
- #endif	/* _LINUX_EXT3_FS_H */
diff --git a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch b/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch
deleted file mode 100644
index e38bedb486c0630d363ec63f48590546d4e1282b..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/ext3-wantedi-2.6-suse.patch
+++ /dev/null
@@ -1,192 +0,0 @@
-diff -urp linux-2.6.5-7.282.orig/fs/ext3/ialloc.c linux-2.6.5-7.282/fs/ext3/ialloc.c
---- linux-2.6.5-7.282.orig/fs/ext3/ialloc.c	2006-08-30 17:12:13.000000000 +0300
-+++ linux-2.6.5-7.282/fs/ext3/ialloc.c	2007-02-16 07:43:08.000000000 +0200
-@@ -420,7 +420,8 @@ static int find_group_other(struct super
-  * For other inodes, search forward from the parent directory's block
-  * group to find a free inode.
-  */
--struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode)
-+struct inode *ext3_new_inode(handle_t *handle, struct inode * dir, int mode,
-+				unsigned long goal)
- {
- 	struct super_block *sb;
- 	struct buffer_head *bitmap_bh = NULL;
-@@ -448,6 +449,41 @@ struct inode *ext3_new_inode(handle_t *h
- 
- 	sbi = EXT3_SB(sb);
- 	es = sbi->s_es;
-+	if (goal) {
-+		group = (goal - 1) / EXT3_INODES_PER_GROUP(sb);
-+		ino = (goal - 1) % EXT3_INODES_PER_GROUP(sb);
-+		err = -EIO;
-+
-+		gdp = ext3_get_group_desc(sb, group, &bh2);
-+		if (!gdp)
-+			goto fail;
-+
-+		bitmap_bh = read_inode_bitmap (sb, group);
-+		if (!bitmap_bh)
-+			goto fail;
-+
-+		BUFFER_TRACE(bh, "get_write_access");
-+		err = ext3_journal_get_write_access(handle, bitmap_bh);
-+		if (err) goto fail;
-+
-+		if (ext3_set_bit_atomic(sb_bgl_lock(sbi, group),
-+					ino, bitmap_bh->b_data)) {
-+			printk(KERN_ERR "goal inode %lu unavailable\n", goal);
-+			/* Oh well, we tried. */
-+			goto continue_allocation;
-+		}
-+
-+		BUFFER_TRACE(bh, "call ext3_journal_dirty_metadata");
-+		err = ext3_journal_dirty_metadata(handle, bitmap_bh);
-+		if (err) goto fail;
-+
-+		/* We've shortcircuited the allocation system successfully,
-+		 * now finish filling in the inode.
-+		 */
-+		goto got;
-+	}
-+
-+continue_allocation:
- 	if (S_ISDIR(mode)) {
- 		if (test_opt (sb, OLDALLOC))
- 			group = find_group_dir(sb, dir);
-diff -urp linux-2.6.5-7.282.orig/fs/ext3/ioctl.c linux-2.6.5-7.282/fs/ext3/ioctl.c
---- linux-2.6.5-7.282.orig/fs/ext3/ioctl.c	2006-08-30 17:12:13.000000000 +0300
-+++ linux-2.6.5-7.282/fs/ext3/ioctl.c	2007-02-16 07:43:08.000000000 +0200
-@@ -25,6 +25,31 @@ int ext3_ioctl (struct inode * inode, st
- 	ext3_debug ("cmd = %u, arg = %lu\n", cmd, arg);
- 
- 	switch (cmd) {
-+	case EXT3_IOC_CREATE_INUM: {
-+		char name[32];
-+		struct dentry *dchild, *dparent;
-+		int rc = 0;
-+
-+		dparent = list_entry(inode->i_dentry.next, struct dentry,
-+				     d_alias);
-+		snprintf(name, sizeof name, "%lu", arg);
-+		dchild = lookup_one_len(name, dparent, strlen(name));
-+		if (dchild->d_inode) {
-+			printk(KERN_ERR "%*s/%lu already exists (ino %lu)\n",
-+			       dparent->d_name.len, dparent->d_name.name, arg,
-+			       dchild->d_inode->i_ino);
-+			rc = -EEXIST;
-+		} else {
-+			dchild->d_fsdata = (void *)arg;
-+			rc = vfs_create(inode, dchild, 0644, NULL);
-+			if (rc)
-+				printk(KERN_ERR "vfs_create: %d\n", rc);
-+			else if (dchild->d_inode->i_ino != arg)
-+				rc = -EEXIST;
-+		}
-+		dput(dchild);
-+		return rc;
-+	}
- 	case EXT3_IOC_GETFLAGS:
- 		flags = ei->i_flags & EXT3_FL_USER_VISIBLE;
- 		return put_user(flags, (int *) arg);
-diff -urp linux-2.6.5-7.282.orig/fs/ext3/namei.c linux-2.6.5-7.282/fs/ext3/namei.c
---- linux-2.6.5-7.282.orig/fs/ext3/namei.c	2006-08-30 17:12:34.000000000 +0300
-+++ linux-2.6.5-7.282/fs/ext3/namei.c	2007-02-16 07:46:13.000000000 +0200
-@@ -144,6 +144,14 @@ struct dx_map_entry
- 	u32 offs;
- };
- 
-+#define LVFS_DENTRY_PARAM_MAGIC		20070216UL
-+struct lvfs_dentry_params
-+{
-+	unsigned long   p_inum;
-+	void            *p_ptr;	
-+	u32		magic;
-+};
-+
- #ifdef CONFIG_EXT3_INDEX
- static inline unsigned dx_get_block (struct dx_entry *entry);
- static void dx_set_block (struct dx_entry *entry, unsigned value);
-@@ -1625,6 +1633,20 @@ static int ext3_add_nondir(handle_t *han
- 	return err;
- }
- 
-+static struct inode * ext3_new_inode_wantedi(handle_t *handle, struct inode *dir,
-+						int mode, struct dentry *dentry)
-+{
-+	unsigned long inum = 0;
-+
-+	if (dentry->d_fsdata != NULL) {
-+		struct lvfs_dentry_params *param = dentry->d_fsdata;
-+
-+		if (param->magic == LVFS_DENTRY_PARAM_MAGIC)
-+			inum = param->p_inum;
-+	}
-+	return ext3_new_inode(handle, dir, mode, inum);
-+}
-+
- /*
-  * By the time this is called, we already have created
-  * the directory cache entry for the new file, but it
-@@ -1649,7 +1671,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, mode);
-+	inode = ext3_new_inode_wantedi (handle, dir, mode, dentry);
- 	err = PTR_ERR(inode);
- 	if (!IS_ERR(inode)) {
- 		inode->i_op = &ext3_file_inode_operations;
-@@ -1682,7 +1704,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, mode);
-+	inode = ext3_new_inode_wantedi (handle, dir, mode, dentry);
- 	err = PTR_ERR(inode);
- 	if (!IS_ERR(inode)) {
- 		init_special_inode(inode, inode->i_mode, rdev);
-@@ -1718,7 +1740,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, S_IFDIR | mode);
-+	inode = ext3_new_inode_wantedi (handle, dir, S_IFDIR | mode, dentry);
- 	err = PTR_ERR(inode);
- 	if (IS_ERR(inode))
- 		goto out_stop;
-@@ -2113,7 +2135,7 @@ retry:
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode = ext3_new_inode (handle, dir, S_IFLNK|S_IRWXUGO);
-+	inode = ext3_new_inode_wantedi (handle, dir, S_IFLNK|S_IRWXUGO, dentry);
- 	err = PTR_ERR(inode);
- 	if (IS_ERR(inode))
- 		goto out_stop;
-diff -urp linux-2.6.5-7.282.orig/include/linux/ext3_fs.h linux-2.6.5-7.282/include/linux/ext3_fs.h
---- linux-2.6.5-7.282.orig/include/linux/ext3_fs.h	2006-08-30 17:12:13.000000000 +0300
-+++ linux-2.6.5-7.282/include/linux/ext3_fs.h	2007-02-16 07:43:08.000000000 +0200
-@@ -203,6 +203,7 @@ struct ext3_group_desc
- #define	EXT3_IOC_SETFLAGS		_IOW('f', 2, long)
- #define	EXT3_IOC_GETVERSION		_IOR('f', 3, long)
- #define	EXT3_IOC_SETVERSION		_IOW('f', 4, long)
-+/* EXT3_IOC_CREATE_INUM at bottom of file (visible to kernel and user). */
- #define	EXT3_IOC_GETVERSION_OLD		_IOR('v', 1, long)
- #define	EXT3_IOC_SETVERSION_OLD		_IOW('v', 2, long)
- #ifdef CONFIG_JBD_DEBUG
-@@ -712,7 +713,8 @@ extern int ext3fs_dirhash(const char *na
- 			  dx_hash_info *hinfo);
- 
- /* ialloc.c */
--extern struct inode * ext3_new_inode (handle_t *, struct inode *, int);
-+extern struct inode * ext3_new_inode (handle_t *, struct inode *, int,
-+				      unsigned long);
- extern void ext3_free_inode (handle_t *, struct inode *);
- extern struct inode * ext3_orphan_get (struct super_block *, unsigned long);
- extern unsigned long ext3_count_free_inodes (struct super_block *);
-@@ -797,4 +799,5 @@ extern struct inode_operations ext3_fast
- 
- #endif	/* __KERNEL__ */
- 
-+#define EXT3_IOC_CREATE_INUM			_IOW('f', 5, long)
- #endif	/* _LINUX_EXT3_FS_H */
diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch
deleted file mode 100644
index 6bbcec5a185bdcdf3e5a522c2ffac135292b4b5d..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/iopen-2.6-fc5.patch
+++ /dev/null
@@ -1,448 +0,0 @@
-Index: linux-2.6.16.i686/fs/ext3/iopen.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/iopen.c	2006-05-31 04:14:15.752410384 +0800
-+++ linux-2.6.16.i686/fs/ext3/iopen.c	2006-05-30 22:52:38.000000000 +0800
-@@ -0,0 +1,259 @@
-+/*
-+ * linux/fs/ext3/iopen.c
-+ *
-+ * Special support for open by inode number
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ *
-+ *
-+ * Invariants:
-+ *   - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias
-+ *     for an inode at one time.
-+ *   - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry
-+ *     aliases on an inode at the same time.
-+ *
-+ * If we have any connected dentry aliases for an inode, use one of those
-+ * in iopen_lookup().  Otherwise, we instantiate a single NFSD_DISCONNECTED
-+ * dentry for this inode, which thereafter will be found by the dcache
-+ * when looking up this inode number in __iopen__, so we don't return here
-+ * until it is gone.
-+ *
-+ * If we get an inode via a regular name lookup, then we "rename" the
-+ * NFSD_DISCONNECTED dentry to the proper name and parent.  This ensures
-+ * existing users of the disconnected dentry will continue to use the same
-+ * dentry as the connected users, and there will never be both kinds of
-+ * dentry aliases at one time.
-+ */
-+
-+#include <linux/sched.h>
-+#include <linux/fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/smp_lock.h>
-+#include <linux/dcache.h>
-+#include <linux/security.h>
-+#include "iopen.h"
-+
-+#ifndef assert
-+#define assert(test) J_ASSERT(test)
-+#endif
-+
-+#define IOPEN_NAME_LEN	32
-+
-+/*
-+ * This implements looking up an inode by number.
-+ */
-+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry,
-+				   struct nameidata *nd)
-+{
-+	struct inode *inode;
-+	unsigned long ino;
-+	struct list_head *lp;
-+	struct dentry *alternate;
-+	char buf[IOPEN_NAME_LEN];
-+
-+	if (dentry->d_name.len >= IOPEN_NAME_LEN)
-+		return ERR_PTR(-ENAMETOOLONG);
-+
-+	memcpy(buf, dentry->d_name.name, dentry->d_name.len);
-+	buf[dentry->d_name.len] = 0;
-+
-+	if (strcmp(buf, ".") == 0)
-+		ino = dir->i_ino;
-+	else if (strcmp(buf, "..") == 0)
-+		ino = EXT3_ROOT_INO;
-+	else
-+		ino = simple_strtoul(buf, 0, 0);
-+
-+	if ((ino != EXT3_ROOT_INO &&
-+	     //ino != EXT3_ACL_IDX_INO &&
-+	     //ino != EXT3_ACL_DATA_INO &&
-+	     ino < EXT3_FIRST_INO(dir->i_sb)) ||
-+	    ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count))
-+		return ERR_PTR(-ENOENT);
-+
-+	inode = iget(dir->i_sb, ino);
-+	if (!inode)
-+		return ERR_PTR(-EACCES);
-+	if (is_bad_inode(inode)) {
-+		iput(inode);
-+		return ERR_PTR(-ENOENT);
-+	}
-+
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	assert(d_unhashed(dentry));			/* d_rehash */
-+
-+	/* preferrably return a connected dentry */
-+	spin_lock(&dcache_lock);
-+	list_for_each(lp, &inode->i_dentry) {
-+		alternate = list_entry(lp, struct dentry, d_alias);
-+		assert(!(alternate->d_flags & DCACHE_DISCONNECTED));
-+	}
-+
-+	if (!list_empty(&inode->i_dentry)) {
-+		alternate = list_entry(inode->i_dentry.next,
-+				       struct dentry, d_alias);
-+		dget_locked(alternate);
-+		spin_lock(&alternate->d_lock);
-+		alternate->d_flags |= DCACHE_REFERENCED;
-+		spin_unlock(&alternate->d_lock);
-+		iput(inode);
-+		spin_unlock(&dcache_lock);
-+		return alternate;
-+	}
-+	dentry->d_flags |= DCACHE_DISCONNECTED;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+	spin_unlock(&dcache_lock);
-+
-+	d_rehash(dentry);
-+
-+	return NULL;
-+}
-+
-+/* This function is spliced into ext3_lookup and does the move of a
-+ * disconnected dentry (if it exists) to a connected dentry.
-+ */
-+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode,
-+				    int rehash)
-+{
-+	struct dentry *tmp, *goal = NULL;
-+	struct list_head *lp;
-+
-+	/* verify this dentry is really new */
-+	assert(dentry->d_inode == NULL);
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	if (rehash)
-+		assert(d_unhashed(dentry));		/* d_rehash */
-+	assert(list_empty(&dentry->d_subdirs));
-+
-+	spin_lock(&dcache_lock);
-+	if (!inode)
-+		goto do_rehash;
-+
-+	if (!test_opt(inode->i_sb, IOPEN))
-+		goto do_instantiate;
-+
-+	/* preferrably return a connected dentry */
-+	list_for_each(lp, &inode->i_dentry) {
-+		tmp = list_entry(lp, struct dentry, d_alias);
-+		if (tmp->d_flags & DCACHE_DISCONNECTED) {
-+			assert(tmp->d_alias.next == &inode->i_dentry);
-+			assert(tmp->d_alias.prev == &inode->i_dentry);
-+			goal = tmp;
-+			dget_locked(goal);
-+			break;
-+		}
-+	}
-+
-+	if (!goal)
-+		goto do_instantiate;
-+
-+	/* Move the goal to the de hash queue */
-+	goal->d_flags &= ~DCACHE_DISCONNECTED;
-+	security_d_instantiate(goal, inode);
-+	__d_drop(dentry);
-+	spin_unlock(&dcache_lock);
-+	d_rehash(dentry);
-+	d_move(goal, dentry);
-+	iput(inode);
-+
-+	return goal;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+do_instantiate:
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+do_rehash:
-+	spin_unlock(&dcache_lock);
-+	if (rehash)
-+		d_rehash(dentry);
-+
-+	return NULL;
-+}
-+
-+/*
-+ * These are the special structures for the iopen pseudo directory.
-+ */
-+
-+static struct inode_operations iopen_inode_operations = {
-+	lookup:		iopen_lookup,		/* BKL held */
-+};
-+
-+static struct file_operations iopen_file_operations = {
-+	read:		generic_read_dir,
-+};
-+
-+static int match_dentry(struct dentry *dentry, const char *name)
-+{
-+	int	len;
-+
-+	len = strlen(name);
-+	if (dentry->d_name.len != len)
-+		return 0;
-+	if (strncmp(dentry->d_name.name, name, len))
-+		return 0;
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into ext3_lookup and returns 1 the file
-+ * name is __iopen__ and dentry has been filled in appropriately.
-+ */
-+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry)
-+{
-+	struct inode *inode;
-+
-+	if (dir->i_ino != EXT3_ROOT_INO ||
-+	    !test_opt(dir->i_sb, IOPEN) ||
-+	    !match_dentry(dentry, "__iopen__"))
-+		return 0;
-+
-+	inode = iget(dir->i_sb, EXT3_BAD_INO);
-+
-+	if (!inode)
-+		return 0;
-+	d_add(dentry, inode);
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into read_inode; it returns 1 if inode
-+ * number is the one for /__iopen__, in which case the inode is filled
-+ * in appropriately.  Otherwise, this fuction returns 0.
-+ */
-+int ext3_iopen_get_inode(struct inode *inode)
-+{
-+	if (inode->i_ino != EXT3_BAD_INO)
-+		return 0;
-+
-+	inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR;
-+	if (test_opt(inode->i_sb, IOPEN_NOPRIV))
-+		inode->i_mode |= 0777;
-+	inode->i_uid = 0;
-+	inode->i_gid = 0;
-+	inode->i_nlink = 1;
-+	inode->i_size = 4096;
-+	inode->i_atime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = CURRENT_TIME;
-+	EXT3_I(inode)->i_dtime = 0;
-+	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size
-+					 * (for stat), not the fs block
-+					 * size */
-+	inode->i_blocks = 0;
-+	inode->i_version = 1;
-+	inode->i_generation = 0;
-+
-+	inode->i_op = &iopen_inode_operations;
-+	inode->i_fop = &iopen_file_operations;
-+	inode->i_mapping->a_ops = 0;
-+
-+	return 1;
-+}
-Index: linux-2.6.16.i686/fs/ext3/iopen.h
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/iopen.h	2006-05-31 04:14:15.752410384 +0800
-+++ linux-2.6.16.i686/fs/ext3/iopen.h	2006-05-30 22:52:38.000000000 +0800
-@@ -0,0 +1,15 @@
-+/*
-+ * iopen.h
-+ *
-+ * Special support for opening files by inode number.
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ */
-+
-+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
-+extern int ext3_iopen_get_inode(struct inode *inode);
-+extern struct dentry *iopen_connect_dentry(struct dentry *dentry,
-+					   struct inode *inode, int rehash);
-Index: linux-2.6.16.i686/fs/ext3/inode.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/inode.c	2006-05-30 22:52:03.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/inode.c	2006-05-30 22:52:38.000000000 +0800
-@@ -37,6 +37,7 @@
- #include <linux/mpage.h>
- #include <linux/uio.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- static int ext3_writepage_trans_blocks(struct inode *inode);
-@@ -2448,6 +2449,8 @@
- 	ei->i_default_acl = EXT3_ACL_NOT_CACHED;
- #endif
- 	ei->i_block_alloc_info = NULL;
-+ 	if (ext3_iopen_get_inode(inode))
-+ 		return;
- 
- 	if (__ext3_get_inode_loc(inode, &iloc, 0))
- 		goto bad_inode;
-Index: linux-2.6.16.i686/fs/ext3/super.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/super.c	2006-05-30 22:52:03.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/super.c	2006-05-30 22:52:38.000000000 +0800
-@@ -634,6 +634,7 @@
- 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota,
-+	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- 	Opt_grpquota
- };
- 
-@@ -682,6 +683,9 @@
- 	{Opt_noquota, "noquota"},
- 	{Opt_quota, "quota"},
- 	{Opt_usrquota, "usrquota"},
-+	{Opt_iopen, "iopen"},
-+	{Opt_noiopen, "noiopen"},
-+	{Opt_iopen_nopriv, "iopen_nopriv"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -996,6 +1000,18 @@
- 			else
- 				clear_opt(sbi->s_mount_opt, BARRIER);
- 			break;
-+		case Opt_iopen:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_noiopen:
-+			clear_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_iopen_nopriv:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			set_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
- 		case Opt_ignore:
- 			break;
- 		case Opt_resize:
-Index: linux-2.6.16.i686/fs/ext3/namei.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/namei.c	2006-05-30 22:52:00.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/namei.c	2006-05-30 22:55:19.000000000 +0800
-@@ -39,6 +39,7 @@
- 
- #include "namei.h"
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- /*
-@@ -995,6 +996,9 @@
- 	if (dentry->d_name.len > EXT3_NAME_LEN)
- 		return ERR_PTR(-ENAMETOOLONG);
- 
-+	if (ext3_check_for_iopen(dir, dentry))
-+		return NULL;
-+
- 	bh = ext3_find_entry(dentry, &de);
- 	inode = NULL;
- 	if (bh) {
-@@ -1005,7 +1009,7 @@
- 		if (!inode)
- 			return ERR_PTR(-EACCES);
- 	}
--	return d_splice_alias(inode, dentry);
-+ 	return iopen_connect_dentry(dentry, inode, 1);
- }
- 
- 
-@@ -2046,10 +2050,6 @@
- 			      inode->i_nlink);
- 	inode->i_version++;
- 	inode->i_nlink = 0;
--	/* There's no need to set i_disksize: the fact that i_nlink is
--	 * zero will ensure that the right thing happens during any
--	 * recovery. */
--	inode->i_size = 0;
- 	ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
-@@ -2173,6 +2173,23 @@
- 	return err;
- }
- 
-+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */
-+static int ext3_add_link(handle_t *handle, struct dentry *dentry,
-+			 struct inode *inode)
-+{
-+	int err = ext3_add_entry(handle, dentry, inode);
-+	if (!err) {
-+		err = ext3_mark_inode_dirty(handle, inode);
-+		if (err == 0) {
-+			dput(iopen_connect_dentry(dentry, inode, 0));
-+			return 0;
-+		}
-+	}
-+	ext3_dec_count(handle, inode);
-+	iput(inode);
-+	return err;
-+}
-+
- static int ext3_link (struct dentry * old_dentry,
- 		struct inode * dir, struct dentry *dentry)
- {
-@@ -2196,7 +2213,8 @@
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
--	err = ext3_add_nondir(handle, dentry, inode);
-+	err = ext3_add_link(handle, dentry, inode);
-+	ext3_orphan_del(handle, inode);
- 	ext3_journal_stop(handle);
- 	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
- 		goto retry;
-Index: linux-2.6.16.i686/fs/ext3/Makefile
-===================================================================
---- linux-2.6.16.i686.orig/fs/ext3/Makefile	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/ext3/Makefile	2006-05-30 22:52:38.000000000 +0800
-@@ -4,7 +4,7 @@
- 
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
--ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
-+ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
-Index: linux-2.6.16.i686/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.16.i686.orig/include/linux/ext3_fs.h	2006-05-30 22:52:00.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/ext3_fs.h	2006-05-30 22:52:38.000000000 +0800
-@@ -375,6 +375,8 @@
- #define EXT3_MOUNT_QUOTA		0x80000 /* Some quota option set */
- #define EXT3_MOUNT_USRQUOTA		0x100000 /* "old" user quota */
- #define EXT3_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
-+#define EXT3_MOUNT_IOPEN		0x400000	/* Allow access via iopen */
-+#define EXT3_MOUNT_IOPEN_NOPRIV		0x800000/* Make iopen world-readable */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch
deleted file mode 100644
index 98dbca4e64a082af1cecfcf801675c3c258b7027..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/iopen-2.6-rhel4.patch
+++ /dev/null
@@ -1,471 +0,0 @@
-Index: linux-stage/fs/ext3/Makefile
-===================================================================
---- linux-stage.orig/fs/ext3/Makefile	2005-02-25 14:31:53.151076368 +0200
-+++ linux-stage/fs/ext3/Makefile	2005-02-25 14:41:51.259150120 +0200
-@@ -4,7 +4,7 @@
- 
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
--ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
-+ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c	2005-02-25 14:37:30.983718000 +0200
-+++ linux-stage/fs/ext3/inode.c	2005-02-25 14:47:42.069818792 +0200
-@@ -37,6 +37,7 @@
- #include <linux/mpage.h>
- #include <linux/uio.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- /*
-@@ -2408,6 +2409,8 @@
- 	ei->i_default_acl = EXT3_ACL_NOT_CACHED;
- #endif
- 	ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
-+	if (ext3_iopen_get_inode(inode))
-+		return;
- 
- 	if (ext3_get_inode_loc(inode, &iloc, 0))
- 		goto bad_inode;
-Index: linux-stage/fs/ext3/iopen.c
-===================================================================
---- linux-stage.orig/fs/ext3/iopen.c	2005-02-25 14:41:01.017787968 +0200
-+++ linux-stage/fs/ext3/iopen.c	2005-02-25 14:41:01.045783712 +0200
-@@ -0,0 +1,278 @@
-+/*
-+ * linux/fs/ext3/iopen.c
-+ *
-+ * Special support for open by inode number
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ *
-+ *
-+ * Invariants:
-+ *   - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias
-+ *     for an inode at one time.
-+ *   - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry
-+ *     aliases on an inode at the same time.
-+ *
-+ * If we have any connected dentry aliases for an inode, use one of those
-+ * in iopen_lookup().  Otherwise, we instantiate a single NFSD_DISCONNECTED
-+ * dentry for this inode, which thereafter will be found by the dcache
-+ * when looking up this inode number in __iopen__, so we don't return here
-+ * until it is gone.
-+ *
-+ * If we get an inode via a regular name lookup, then we "rename" the
-+ * NFSD_DISCONNECTED dentry to the proper name and parent.  This ensures
-+ * existing users of the disconnected dentry will continue to use the same
-+ * dentry as the connected users, and there will never be both kinds of
-+ * dentry aliases at one time.
-+ */
-+
-+#include <linux/sched.h>
-+#include <linux/fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/smp_lock.h>
-+#include <linux/dcache.h>
-+#include <linux/security.h>
-+#include "iopen.h"
-+
-+#ifndef assert
-+#define assert(test) J_ASSERT(test)
-+#endif
-+
-+#define IOPEN_NAME_LEN	32
-+
-+/*
-+ * This implements looking up an inode by number.
-+ */
-+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry,
-+				   struct nameidata *nd)
-+{
-+	struct inode *inode;
-+	unsigned long ino;
-+	struct list_head *lp;
-+	struct dentry *alternate;
-+	char buf[IOPEN_NAME_LEN];
-+
-+	if (dentry->d_name.len >= IOPEN_NAME_LEN)
-+		return ERR_PTR(-ENAMETOOLONG);
-+
-+	memcpy(buf, dentry->d_name.name, dentry->d_name.len);
-+	buf[dentry->d_name.len] = 0;
-+
-+	if (strcmp(buf, ".") == 0)
-+		ino = dir->i_ino;
-+	else if (strcmp(buf, "..") == 0)
-+		ino = EXT3_ROOT_INO;
-+	else
-+		ino = simple_strtoul(buf, 0, 0);
-+
-+	if ((ino != EXT3_ROOT_INO &&
-+	     //ino != EXT3_ACL_IDX_INO &&
-+	     //ino != EXT3_ACL_DATA_INO &&
-+	     ino < EXT3_FIRST_INO(dir->i_sb)) ||
-+	    ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count))
-+		return ERR_PTR(-ENOENT);
-+
-+	inode = iget(dir->i_sb, ino);
-+	if (!inode)
-+		return ERR_PTR(-EACCES);
-+	if (is_bad_inode(inode)) {
-+		iput(inode);
-+		return ERR_PTR(-ENOENT);
-+	}
-+
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	assert(d_unhashed(dentry));			/* d_rehash */
-+
-+	/* preferrably return a connected dentry */
-+	spin_lock(&dcache_lock);
-+	list_for_each(lp, &inode->i_dentry) {
-+		alternate = list_entry(lp, struct dentry, d_alias);
-+		assert(!(alternate->d_flags & DCACHE_DISCONNECTED));
-+	}
-+
-+	if (!list_empty(&inode->i_dentry)) {
-+		alternate = list_entry(inode->i_dentry.next,
-+				       struct dentry, d_alias);
-+		dget_locked(alternate);
-+		spin_lock(&alternate->d_lock);
-+		alternate->d_flags |= DCACHE_REFERENCED;
-+		spin_unlock(&alternate->d_lock);
-+		iput(inode);
-+		spin_unlock(&dcache_lock);
-+		return alternate;
-+	}
-+	dentry->d_flags |= DCACHE_DISCONNECTED;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+
-+	__d_rehash(dentry, 0);				/* d_rehash */
-+	spin_unlock(&dcache_lock);
-+
-+	return NULL;
-+}
-+
-+#define do_switch(x,y) do { \
-+	__typeof__ (x) __tmp = x; \
-+	x = y; y = __tmp; } while (0)
-+
-+static inline void switch_names(struct dentry *dentry, struct dentry *target)
-+{
-+	const unsigned char *old_name, *new_name;
-+
-+	memcpy(dentry->d_iname, target->d_iname, DNAME_INLINE_LEN_MIN);
-+	old_name = target->d_name.name;
-+	new_name = dentry->d_name.name;
-+	if (old_name == target->d_iname)
-+		old_name = dentry->d_iname;
-+	if (new_name == dentry->d_iname)
-+		new_name = target->d_iname;
-+	target->d_name.name = new_name;
-+	dentry->d_name.name = old_name;
-+}
-+
-+/* This function is spliced into ext3_lookup and does the move of a
-+ * disconnected dentry (if it exists) to a connected dentry.
-+ */
-+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode,
-+				    int rehash)
-+{
-+	struct dentry *tmp, *goal = NULL;
-+	struct list_head *lp;
-+
-+	/* verify this dentry is really new */
-+	assert(dentry->d_inode == NULL);
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	if (rehash)
-+		assert(d_unhashed(dentry));		/* d_rehash */
-+	assert(list_empty(&dentry->d_subdirs));
-+
-+	spin_lock(&dcache_lock);
-+	if (!inode)
-+		goto do_rehash;
-+
-+	if (!test_opt(inode->i_sb, IOPEN))
-+		goto do_instantiate;
-+
-+	/* preferrably return a connected dentry */
-+	list_for_each(lp, &inode->i_dentry) {
-+		tmp = list_entry(lp, struct dentry, d_alias);
-+		if (tmp->d_flags & DCACHE_DISCONNECTED) {
-+			assert(tmp->d_alias.next == &inode->i_dentry);
-+			assert(tmp->d_alias.prev == &inode->i_dentry);
-+			goal = tmp;
-+			dget_locked(goal);
-+			break;
-+		}
-+	}
-+
-+	if (!goal)
-+		goto do_instantiate;
-+
-+	/* Move the goal to the de hash queue */
-+	goal->d_flags &= ~DCACHE_DISCONNECTED;
-+	security_d_instantiate(goal, inode);
-+	__d_drop(dentry);
-+	__d_rehash(dentry, 0);
-+	__d_move(goal, dentry);
-+	spin_unlock(&dcache_lock);
-+	iput(inode);
-+
-+	return goal;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+do_instantiate:
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+do_rehash:
-+	if (rehash)
-+		__d_rehash(dentry, 0);			/* d_rehash */
-+	spin_unlock(&dcache_lock);
-+
-+	return NULL;
-+}
-+
-+/*
-+ * These are the special structures for the iopen pseudo directory.
-+ */
-+
-+static struct inode_operations iopen_inode_operations = {
-+	lookup:		iopen_lookup,		/* BKL held */
-+};
-+
-+static struct file_operations iopen_file_operations = {
-+	read:		generic_read_dir,
-+};
-+
-+static int match_dentry(struct dentry *dentry, const char *name)
-+{
-+	int	len;
-+
-+	len = strlen(name);
-+	if (dentry->d_name.len != len)
-+		return 0;
-+	if (strncmp(dentry->d_name.name, name, len))
-+		return 0;
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into ext3_lookup and returns 1 the file
-+ * name is __iopen__ and dentry has been filled in appropriately.
-+ */
-+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry)
-+{
-+	struct inode *inode;
-+
-+	if (dir->i_ino != EXT3_ROOT_INO ||
-+	    !test_opt(dir->i_sb, IOPEN) ||
-+	    !match_dentry(dentry, "__iopen__"))
-+		return 0;
-+
-+	inode = iget(dir->i_sb, EXT3_BAD_INO);
-+
-+	if (!inode)
-+		return 0;
-+	d_add(dentry, inode);
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into read_inode; it returns 1 if inode
-+ * number is the one for /__iopen__, in which case the inode is filled
-+ * in appropriately.  Otherwise, this fuction returns 0.
-+ */
-+int ext3_iopen_get_inode(struct inode *inode)
-+{
-+	if (inode->i_ino != EXT3_BAD_INO)
-+		return 0;
-+
-+	inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR;
-+	if (test_opt(inode->i_sb, IOPEN_NOPRIV))
-+		inode->i_mode |= 0777;
-+	inode->i_uid = 0;
-+	inode->i_gid = 0;
-+	inode->i_nlink = 1;
-+	inode->i_size = 4096;
-+	inode->i_atime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = CURRENT_TIME;
-+	EXT3_I(inode)->i_dtime = 0;
-+	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size
-+					 * (for stat), not the fs block
-+					 * size */
-+	inode->i_blocks = 0;
-+	inode->i_version = 1;
-+	inode->i_generation = 0;
-+
-+	inode->i_op = &iopen_inode_operations;
-+	inode->i_fop = &iopen_file_operations;
-+	inode->i_mapping->a_ops = 0;
-+
-+	return 1;
-+}
-Index: linux-stage/fs/ext3/iopen.h
-===================================================================
---- linux-stage.orig/fs/ext3/iopen.h	2005-02-25 14:41:01.017787968 +0200
-+++ linux-stage/fs/ext3/iopen.h	2005-02-25 14:41:01.045783712 +0200
-@@ -0,0 +1,15 @@
-+/*
-+ * iopen.h
-+ *
-+ * Special support for opening files by inode number.
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ */
-+
-+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
-+extern int ext3_iopen_get_inode(struct inode *inode);
-+extern struct dentry *iopen_connect_dentry(struct dentry *dentry,
-+					   struct inode *inode, int rehash);
-Index: linux-stage/fs/ext3/namei.c
-===================================================================
---- linux-stage.orig/fs/ext3/namei.c	2005-02-25 14:37:28.975023368 +0200
-+++ linux-stage/fs/ext3/namei.c	2005-02-25 14:46:43.090784968 +0200
-@@ -37,6 +37,7 @@
- #include <linux/buffer_head.h>
- #include <linux/smp_lock.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- /*
-@@ -980,6 +981,9 @@
- 	if (dentry->d_name.len > EXT3_NAME_LEN)
- 		return ERR_PTR(-ENAMETOOLONG);
- 
-+	if (ext3_check_for_iopen(dir, dentry))
-+		return NULL;
-+
- 	bh = ext3_find_entry(dentry, &de);
- 	inode = NULL;
- 	if (bh) {
-@@ -990,10 +994,8 @@
- 		if (!inode)
- 			return ERR_PTR(-EACCES);
- 	}
--	if (inode)
--		return d_splice_alias(inode, dentry);
--	d_add(dentry, inode);
--	return NULL;
-+
-+	return iopen_connect_dentry(dentry, inode, 1);
- }
- 
- 
-@@ -2037,10 +2039,6 @@
- 			      inode->i_nlink);
- 	inode->i_version++;
- 	inode->i_nlink = 0;
--	/* There's no need to set i_disksize: the fact that i_nlink is
--	 * zero will ensure that the right thing happens during any
--	 * recovery. */
--	inode->i_size = 0;
- 	ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- 	ext3_mark_inode_dirty(handle, inode);
-@@ -2163,6 +2161,23 @@
- 	return err;
- }
- 
-+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */
-+static int ext3_add_link(handle_t *handle, struct dentry *dentry,
-+			 struct inode *inode)
-+{
-+	int err = ext3_add_entry(handle, dentry, inode);
-+	if (!err) {
-+		err = ext3_mark_inode_dirty(handle, inode);
-+		if (err == 0) {
-+			dput(iopen_connect_dentry(dentry, inode, 0));
-+			return 0;
-+		}
-+	}
-+	ext3_dec_count(handle, inode);
-+	iput(inode);
-+	return err;
-+}
-+
- static int ext3_link (struct dentry * old_dentry,
- 		struct inode * dir, struct dentry *dentry)
- {
-@@ -2186,7 +2201,8 @@
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
--	err = ext3_add_nondir(handle, dentry, inode);
-+	err = ext3_add_link(handle, dentry, inode);
-+	ext3_orphan_del(handle, inode);
- 	ext3_journal_stop(handle);
- 	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
- 		goto retry;
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c	2005-02-25 14:37:30.987717392 +0200
-+++ linux-stage/fs/ext3/super.c	2005-02-25 14:44:50.495901992 +0200
-@@ -586,6 +586,7 @@
- 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
-+	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- };
- 
- static match_table_t tokens = {
-@@ -633,6 +634,9 @@
- 	{Opt_ignore, "noquota"},
- 	{Opt_ignore, "quota"},
- 	{Opt_ignore, "usrquota"},
-+	{Opt_iopen, "iopen"},
-+	{Opt_noiopen, "noiopen"},
-+	{Opt_iopen_nopriv, "iopen_nopriv"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -914,6 +918,18 @@
- 			else
- 				clear_opt(sbi->s_mount_opt, BARRIER);
- 			break;
-+		case Opt_iopen:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_noiopen:
-+			clear_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_iopen_nopriv:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			set_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
- 		case Opt_ignore:
- 			break;
- 		case Opt_resize:
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2005-02-25 14:37:28.977023064 +0200
-+++ linux-stage/include/linux/ext3_fs.h	2005-02-25 14:49:00.569884968 +0200
-@@ -355,6 +355,8 @@
- #define EXT3_MOUNT_POSIX_ACL		0x08000	/* POSIX Access Control Lists */
- #define EXT3_MOUNT_BARRIER		0x10000 /* Use block barriers */
- #define EXT3_MOUNT_RESERVATION		0x20000	/* Preallocation */
-+#define EXT3_MOUNT_IOPEN		0x80000	/* Allow access via iopen */
-+#define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch b/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch
deleted file mode 100644
index 1c5e900555399ac6d8246a279aabcbd88988e9a9..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/iopen-2.6-suse.patch
+++ /dev/null
@@ -1,472 +0,0 @@
-Index: linux-stage/fs/ext3/Makefile
-===================================================================
---- linux-stage.orig/fs/ext3/Makefile	2005-02-25 14:31:53.151076368 +0200
-+++ linux-stage/fs/ext3/Makefile	2005-02-25 14:41:51.259150120 +0200
-@@ -4,7 +4,7 @@
- 
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
--ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
-+ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
-Index: linux-stage/fs/ext3/inode.c
-===================================================================
---- linux-stage.orig/fs/ext3/inode.c	2005-02-25 14:37:30.983718000 +0200
-+++ linux-stage/fs/ext3/inode.c	2005-02-25 14:47:42.069818792 +0200
-@@ -37,6 +37,7 @@
- #include <linux/mpage.h>
- #include <linux/uio.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- /*
-@@ -2408,6 +2409,9 @@
- #endif
- 	ei->i_rsv_window.rsv_end = EXT3_RESERVE_WINDOW_NOT_ALLOCATED;
- 
-+	if (ext3_iopen_get_inode(inode))
-+		return;
-+
- 	if (ext3_get_inode_loc(inode, &iloc, 0))
- 		goto bad_inode;
- 	bh = iloc.bh;
-Index: linux-stage/fs/ext3/iopen.c
-===================================================================
---- linux-2.6.5-sles9.orig/fs/ext3/iopen.c	2003-01-30 13:24:37.000000000 +0300
-+++ linux-2.6.5-sles9/fs/ext3/iopen.c	2004-11-09 02:18:27.611913312 +0300
-@@ -0,0 +1,278 @@
-+/*
-+ * linux/fs/ext3/iopen.c
-+ *
-+ * Special support for open by inode number
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ *
-+ *
-+ * Invariants:
-+ *   - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias
-+ *     for an inode at one time.
-+ *   - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry
-+ *     aliases on an inode at the same time.
-+ *
-+ * If we have any connected dentry aliases for an inode, use one of those
-+ * in iopen_lookup().  Otherwise, we instantiate a single NFSD_DISCONNECTED
-+ * dentry for this inode, which thereafter will be found by the dcache
-+ * when looking up this inode number in __iopen__, so we don't return here
-+ * until it is gone.
-+ *
-+ * If we get an inode via a regular name lookup, then we "rename" the
-+ * NFSD_DISCONNECTED dentry to the proper name and parent.  This ensures
-+ * existing users of the disconnected dentry will continue to use the same
-+ * dentry as the connected users, and there will never be both kinds of
-+ * dentry aliases at one time.
-+ */
-+
-+#include <linux/sched.h>
-+#include <linux/fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/smp_lock.h>
-+#include <linux/dcache.h>
-+#include <linux/security.h>
-+#include "iopen.h"
-+
-+#ifndef assert
-+#define assert(test) J_ASSERT(test)
-+#endif
-+
-+#define IOPEN_NAME_LEN	32
-+
-+/*
-+ * This implements looking up an inode by number.
-+ */
-+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry,
-+				   struct nameidata *nd)
-+{
-+	struct inode *inode;
-+	unsigned long ino;
-+	struct list_head *lp;
-+	struct dentry *alternate;
-+	char buf[IOPEN_NAME_LEN];
-+
-+	if (dentry->d_name.len >= IOPEN_NAME_LEN)
-+		return ERR_PTR(-ENAMETOOLONG);
-+
-+	memcpy(buf, dentry->d_name.name, dentry->d_name.len);
-+	buf[dentry->d_name.len] = 0;
-+
-+	if (strcmp(buf, ".") == 0)
-+		ino = dir->i_ino;
-+	else if (strcmp(buf, "..") == 0)
-+		ino = EXT3_ROOT_INO;
-+	else
-+		ino = simple_strtoul(buf, 0, 0);
-+
-+	if ((ino != EXT3_ROOT_INO &&
-+	     //ino != EXT3_ACL_IDX_INO &&
-+	     //ino != EXT3_ACL_DATA_INO &&
-+	     ino < EXT3_FIRST_INO(dir->i_sb)) ||
-+	    ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count))
-+		return ERR_PTR(-ENOENT);
-+
-+	inode = iget(dir->i_sb, ino);
-+	if (!inode)
-+		return ERR_PTR(-EACCES);
-+	if (is_bad_inode(inode)) {
-+		iput(inode);
-+		return ERR_PTR(-ENOENT);
-+	}
-+
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	assert(d_unhashed(dentry));			/* d_rehash */
-+
-+	/* preferrably return a connected dentry */
-+	spin_lock(&dcache_lock);
-+	list_for_each(lp, &inode->i_dentry) {
-+		alternate = list_entry(lp, struct dentry, d_alias);
-+		assert(!(alternate->d_flags & DCACHE_DISCONNECTED));
-+	}
-+
-+	if (!list_empty(&inode->i_dentry)) {
-+		alternate = list_entry(inode->i_dentry.next,
-+				       struct dentry, d_alias);
-+		dget_locked(alternate);
-+		spin_lock(&alternate->d_lock);
-+		alternate->d_vfs_flags |= DCACHE_REFERENCED;
-+		spin_unlock(&alternate->d_lock);
-+		iput(inode);
-+		spin_unlock(&dcache_lock);
-+		return alternate;
-+	}
-+	dentry->d_flags |= DCACHE_DISCONNECTED;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+
-+	__d_rehash(dentry, 0);				/* d_rehash */
-+	spin_unlock(&dcache_lock);
-+
-+	return NULL;
-+}
-+
-+#define do_switch(x,y) do { \
-+	__typeof__ (x) __tmp = x; \
-+	x = y; y = __tmp; } while (0)
-+
-+static inline void switch_names(struct dentry *dentry, struct dentry *target)
-+{
-+	const unsigned char *old_name, *new_name;
-+
-+	memcpy(dentry->d_iname, target->d_iname, DNAME_INLINE_LEN);
-+	old_name = target->d_name.name;
-+	new_name = dentry->d_name.name;
-+	if (old_name == target->d_iname)
-+		old_name = dentry->d_iname;
-+	if (new_name == dentry->d_iname)
-+		new_name = target->d_iname;
-+	target->d_name.name = new_name;
-+	dentry->d_name.name = old_name;
-+}
-+
-+/* This function is spliced into ext3_lookup and does the move of a
-+ * disconnected dentry (if it exists) to a connected dentry.
-+ */
-+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode,
-+				    int rehash)
-+{
-+	struct dentry *tmp, *goal = NULL;
-+	struct list_head *lp;
-+
-+	/* verify this dentry is really new */
-+	assert(dentry->d_inode == NULL);
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	if (rehash)
-+		assert(d_unhashed(dentry));	/* d_rehash */
-+	assert(list_empty(&dentry->d_subdirs));
-+
-+	spin_lock(&dcache_lock);
-+	if (!inode)
-+		goto do_rehash;
-+
-+	if (!test_opt(inode->i_sb, IOPEN))
-+		goto do_instantiate;
-+
-+	/* preferrably return a connected dentry */
-+	list_for_each(lp, &inode->i_dentry) {
-+		tmp = list_entry(lp, struct dentry, d_alias);
-+		if (tmp->d_flags & DCACHE_DISCONNECTED) {
-+			assert(tmp->d_alias.next == &inode->i_dentry);
-+			assert(tmp->d_alias.prev == &inode->i_dentry);
-+			goal = tmp;
-+			dget_locked(goal);
-+			break;
-+		}
-+	}
-+
-+	if (!goal)
-+		goto do_instantiate;
-+
-+	/* Move the goal to the de hash queue */
-+	goal->d_flags &= ~DCACHE_DISCONNECTED;
-+	security_d_instantiate(goal, inode);
-+	__d_drop(dentry);
-+	__d_rehash(dentry, 0);
-+	__d_move(goal, dentry);
-+	spin_unlock(&dcache_lock);
-+	iput(inode);
-+
-+	return goal;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+do_instantiate:
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+do_rehash:
-+	if (rehash)
-+		__d_rehash(dentry, 0);			/* d_rehash */
-+	spin_unlock(&dcache_lock);
-+
-+	return NULL;
-+}
-+
-+/*
-+ * These are the special structures for the iopen pseudo directory.
-+ */
-+
-+static struct inode_operations iopen_inode_operations = {
-+	lookup:		iopen_lookup,		/* BKL held */
-+};
-+
-+static struct file_operations iopen_file_operations = {
-+	read:		generic_read_dir,
-+};
-+
-+static int match_dentry(struct dentry *dentry, const char *name)
-+{
-+	int	len;
-+
-+	len = strlen(name);
-+	if (dentry->d_name.len != len)
-+		return 0;
-+	if (strncmp(dentry->d_name.name, name, len))
-+		return 0;
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into ext3_lookup and returns 1 the file
-+ * name is __iopen__ and dentry has been filled in appropriately.
-+ */
-+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry)
-+{
-+	struct inode *inode;
-+
-+	if (dir->i_ino != EXT3_ROOT_INO ||
-+	    !test_opt(dir->i_sb, IOPEN) ||
-+	    !match_dentry(dentry, "__iopen__"))
-+		return 0;
-+
-+	inode = iget(dir->i_sb, EXT3_BAD_INO);
-+
-+	if (!inode)
-+		return 0;
-+	d_add(dentry, inode);
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into read_inode; it returns 1 if inode
-+ * number is the one for /__iopen__, in which case the inode is filled
-+ * in appropriately.  Otherwise, this fuction returns 0.
-+ */
-+int ext3_iopen_get_inode(struct inode *inode)
-+{
-+	if (inode->i_ino != EXT3_BAD_INO)
-+		return 0;
-+
-+	inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR;
-+	if (test_opt(inode->i_sb, IOPEN_NOPRIV))
-+		inode->i_mode |= 0777;
-+	inode->i_uid = 0;
-+	inode->i_gid = 0;
-+	inode->i_nlink = 1;
-+	inode->i_size = 4096;
-+	inode->i_atime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = CURRENT_TIME;
-+	EXT3_I(inode)->i_dtime = 0;
-+	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size
-+					 * (for stat), not the fs block
-+					 * size */
-+	inode->i_blocks = 0;
-+	inode->i_version = 1;
-+	inode->i_generation = 0;
-+
-+	inode->i_op = &iopen_inode_operations;
-+	inode->i_fop = &iopen_file_operations;
-+	inode->i_mapping->a_ops = 0;
-+
-+	return 1;
-+}
-Index: linux-stage/fs/ext3/iopen.h
-===================================================================
---- linux-stage.orig/fs/ext3/iopen.h	2005-02-25 14:41:01.017787968 +0200
-+++ linux-stage/fs/ext3/iopen.h	2005-02-25 14:41:01.045783712 +0200
-@@ -0,0 +1,15 @@
-+/*
-+ * iopen.h
-+ *
-+ * Special support for opening files by inode number.
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ */
-+
-+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
-+extern int ext3_iopen_get_inode(struct inode *inode);
-+extern struct dentry *iopen_connect_dentry(struct dentry *dentry,
-+					   struct inode *inode, int rehash);
-Index: linux-stage/fs/ext3/namei.c
-===================================================================
---- linux-stage.orig/fs/ext3/namei.c	2005-02-25 14:37:28.975023368 +0200
-+++ linux-stage/fs/ext3/namei.c	2005-02-25 14:46:43.090784968 +0200
-@@ -37,6 +37,7 @@
- #include <linux/buffer_head.h>
- #include <linux/smp_lock.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- /*
-@@ -980,6 +981,9 @@
- 	if (dentry->d_name.len > EXT3_NAME_LEN)
- 		return ERR_PTR(-ENAMETOOLONG);
- 
-+	if (ext3_check_for_iopen(dir, dentry))
-+		return NULL;
-+
- 	bh = ext3_find_entry(dentry, &de);
- 	inode = NULL;
- 	if (bh) {
-@@ -990,10 +994,8 @@
- 		if (!inode)
- 			return ERR_PTR(-EACCES);
- 	}
--	if (inode)
--		return d_splice_alias(inode, dentry);
--	d_add(dentry, inode);
--	return NULL;
-+
-+	return iopen_connect_dentry(dentry, inode, 1);
- }
- 
- 
-@@ -2037,10 +2039,6 @@
- 			      inode->i_nlink);
- 	inode->i_version++;
- 	inode->i_nlink = 0;
--	/* There's no need to set i_disksize: the fact that i_nlink is
--	 * zero will ensure that the right thing happens during any
--	 * recovery. */
--	inode->i_size = 0;
- 	ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
- 	ext3_mark_inode_dirty(handle, inode);
-@@ -2163,6 +2161,23 @@
- 	return err;
- }
- 
-+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */
-+static int ext3_add_link(handle_t *handle, struct dentry *dentry,
-+			 struct inode *inode)
-+{
-+	int err = ext3_add_entry(handle, dentry, inode);
-+	if (!err) {
-+		err = ext3_mark_inode_dirty(handle, inode);
-+		if (err == 0) {
-+			dput(iopen_connect_dentry(dentry, inode, 0));
-+			return 0;
-+		}
-+	}
-+	ext3_dec_count(handle, inode);
-+	iput(inode);
-+	return err;
-+}
-+
- static int ext3_link (struct dentry * old_dentry,
- 		struct inode * dir, struct dentry *dentry)
- {
-@@ -2186,7 +2201,8 @@
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
--	err = ext3_add_nondir(handle, dentry, inode);
-+	err = ext3_add_link(handle, dentry, inode);
-+	ext3_orphan_del(handle, inode);
- 	ext3_journal_stop(handle);
- 	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
- 		goto retry;
-Index: linux-stage/fs/ext3/super.c
-===================================================================
---- linux-stage.orig/fs/ext3/super.c	2005-02-25 14:37:30.987717392 +0200
-+++ linux-stage/fs/ext3/super.c	2005-02-25 14:44:50.495901992 +0200
-@@ -586,6 +586,7 @@
- 	Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
- 	Opt_ignore, Opt_barrier,
- 	Opt_err,
-+	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- };
- 
- static match_table_t tokens = {
-@@ -633,6 +634,9 @@
- 	{Opt_ignore, "noquota"},
- 	{Opt_ignore, "quota"},
- 	{Opt_ignore, "usrquota"},
-+	{Opt_iopen, "iopen"},
-+	{Opt_noiopen, "noiopen"},
-+	{Opt_iopen_nopriv, "iopen_nopriv"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL}
- };
-@@ -914,6 +918,18 @@
- 			else
- 				clear_opt(sbi->s_mount_opt, BARRIER);
- 			break;
-+		case Opt_iopen:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_noiopen:
-+			clear_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_iopen_nopriv:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			set_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
- 		case Opt_ignore:
- 			break;
- 		default:
-Index: linux-stage/include/linux/ext3_fs.h
-===================================================================
---- linux-stage.orig/include/linux/ext3_fs.h	2005-02-25 14:37:28.977023064 +0200
-+++ linux-stage/include/linux/ext3_fs.h	2005-02-25 14:49:00.569884968 +0200
-@@ -355,6 +355,8 @@
- #define EXT3_MOUNT_POSIX_ACL		0x08000	/* POSIX Access Control Lists */
- #define EXT3_MOUNT_RESERVATION		0x10000	/* Preallocation */
- #define EXT3_MOUNT_BARRIER		0x20000 /* Use block barriers */
-+#define EXT3_MOUNT_IOPEN		0x80000	/* Allow access via iopen */
-+#define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
diff --git a/ldiskfs/kernel_patches/patches/iopen-2.6.12.patch b/ldiskfs/kernel_patches/patches/iopen-2.6.12.patch
deleted file mode 100644
index 8d456ac251dbecbdd0dd8eabb8d5b2ca1bd3bb37..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/patches/iopen-2.6.12.patch
+++ /dev/null
@@ -1,471 +0,0 @@
-Index: linux-2.6.12-rc6/fs/ext3/Makefile
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/Makefile	2005-06-14 16:00:45.206720992 +0200
-+++ linux-2.6.12-rc6/fs/ext3/Makefile	2005-06-14 16:14:33.595382720 +0200
-@@ -4,7 +4,7 @@
- 
- obj-$(CONFIG_EXT3_FS) += ext3.o
- 
--ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o \
-+ext3-y	:= balloc.o bitmap.o dir.o file.o fsync.o ialloc.o inode.o iopen.o \
- 	   ioctl.o namei.o super.o symlink.o hash.o resize.o
- 
- ext3-$(CONFIG_EXT3_FS_XATTR)	 += xattr.o xattr_user.o xattr_trusted.o
-Index: linux-2.6.12-rc6/fs/ext3/inode.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/inode.c	2005-06-14 16:01:16.272150299 +0200
-+++ linux-2.6.12-rc6/fs/ext3/inode.c	2005-06-14 16:24:55.686195412 +0200
-@@ -37,6 +37,7 @@
- #include <linux/mpage.h>
- #include <linux/uio.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- static int ext3_writepage_trans_blocks(struct inode *inode);
-@@ -2437,6 +2438,8 @@
- 	ei->i_default_acl = EXT3_ACL_NOT_CACHED;
- #endif
- 	ei->i_block_alloc_info = NULL;
-+ 	if (ext3_iopen_get_inode(inode))
-+ 		return;
- 
- 	if (__ext3_get_inode_loc(inode, &iloc, 0))
- 		goto bad_inode;
-Index: linux-2.6.12-rc6/fs/ext3/iopen.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/iopen.c	2005-06-14 16:14:33.530929595 +0200
-+++ linux-2.6.12-rc6/fs/ext3/iopen.c	2005-06-14 16:14:33.626632719 +0200
-@@ -0,0 +1,278 @@
-+/*
-+ * linux/fs/ext3/iopen.c
-+ *
-+ * Special support for open by inode number
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ *
-+ *
-+ * Invariants:
-+ *   - there is only ever a single DCACHE_NFSD_DISCONNECTED dentry alias
-+ *     for an inode at one time.
-+ *   - there are never both connected and DCACHE_NFSD_DISCONNECTED dentry
-+ *     aliases on an inode at the same time.
-+ *
-+ * If we have any connected dentry aliases for an inode, use one of those
-+ * in iopen_lookup().  Otherwise, we instantiate a single NFSD_DISCONNECTED
-+ * dentry for this inode, which thereafter will be found by the dcache
-+ * when looking up this inode number in __iopen__, so we don't return here
-+ * until it is gone.
-+ *
-+ * If we get an inode via a regular name lookup, then we "rename" the
-+ * NFSD_DISCONNECTED dentry to the proper name and parent.  This ensures
-+ * existing users of the disconnected dentry will continue to use the same
-+ * dentry as the connected users, and there will never be both kinds of
-+ * dentry aliases at one time.
-+ */
-+
-+#include <linux/sched.h>
-+#include <linux/fs.h>
-+#include <linux/ext3_jbd.h>
-+#include <linux/jbd.h>
-+#include <linux/ext3_fs.h>
-+#include <linux/smp_lock.h>
-+#include <linux/dcache.h>
-+#include <linux/security.h>
-+#include "iopen.h"
-+
-+#ifndef assert
-+#define assert(test) J_ASSERT(test)
-+#endif
-+
-+#define IOPEN_NAME_LEN	32
-+
-+/*
-+ * This implements looking up an inode by number.
-+ */
-+static struct dentry *iopen_lookup(struct inode * dir, struct dentry *dentry,
-+				   struct nameidata *nd)
-+{
-+	struct inode *inode;
-+	unsigned long ino;
-+	struct list_head *lp;
-+	struct dentry *alternate;
-+	char buf[IOPEN_NAME_LEN];
-+
-+	if (dentry->d_name.len >= IOPEN_NAME_LEN)
-+		return ERR_PTR(-ENAMETOOLONG);
-+
-+	memcpy(buf, dentry->d_name.name, dentry->d_name.len);
-+	buf[dentry->d_name.len] = 0;
-+
-+	if (strcmp(buf, ".") == 0)
-+		ino = dir->i_ino;
-+	else if (strcmp(buf, "..") == 0)
-+		ino = EXT3_ROOT_INO;
-+	else
-+		ino = simple_strtoul(buf, 0, 0);
-+
-+	if ((ino != EXT3_ROOT_INO &&
-+	     //ino != EXT3_ACL_IDX_INO &&
-+	     //ino != EXT3_ACL_DATA_INO &&
-+	     ino < EXT3_FIRST_INO(dir->i_sb)) ||
-+	    ino > le32_to_cpu(EXT3_SB(dir->i_sb)->s_es->s_inodes_count))
-+		return ERR_PTR(-ENOENT);
-+
-+	inode = iget(dir->i_sb, ino);
-+	if (!inode)
-+		return ERR_PTR(-EACCES);
-+	if (is_bad_inode(inode)) {
-+		iput(inode);
-+		return ERR_PTR(-ENOENT);
-+	}
-+
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	assert(d_unhashed(dentry));			/* d_rehash */
-+
-+	/* preferrably return a connected dentry */
-+	spin_lock(&dcache_lock);
-+	list_for_each(lp, &inode->i_dentry) {
-+		alternate = list_entry(lp, struct dentry, d_alias);
-+		assert(!(alternate->d_flags & DCACHE_DISCONNECTED));
-+	}
-+
-+	if (!list_empty(&inode->i_dentry)) {
-+		alternate = list_entry(inode->i_dentry.next,
-+				       struct dentry, d_alias);
-+		dget_locked(alternate);
-+		spin_lock(&alternate->d_lock);
-+		alternate->d_flags |= DCACHE_REFERENCED;
-+		spin_unlock(&alternate->d_lock);
-+		iput(inode);
-+		spin_unlock(&dcache_lock);
-+		return alternate;
-+	}
-+	dentry->d_flags |= DCACHE_DISCONNECTED;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+
-+	d_rehash_cond(dentry, 0);			/* d_rehash */
-+	spin_unlock(&dcache_lock);
-+
-+	return NULL;
-+}
-+
-+#define do_switch(x,y) do { \
-+	__typeof__ (x) __tmp = x; \
-+	x = y; y = __tmp; } while (0)
-+
-+static inline void switch_names(struct dentry *dentry, struct dentry *target)
-+{
-+	const unsigned char *old_name, *new_name;
-+
-+	memcpy(dentry->d_iname, target->d_iname, DNAME_INLINE_LEN_MIN);
-+	old_name = target->d_name.name;
-+	new_name = dentry->d_name.name;
-+	if (old_name == target->d_iname)
-+		old_name = dentry->d_iname;
-+	if (new_name == dentry->d_iname)
-+		new_name = target->d_iname;
-+	target->d_name.name = new_name;
-+	dentry->d_name.name = old_name;
-+}
-+
-+/* This function is spliced into ext3_lookup and does the move of a
-+ * disconnected dentry (if it exists) to a connected dentry.
-+ */
-+struct dentry *iopen_connect_dentry(struct dentry *dentry, struct inode *inode,
-+				    int rehash)
-+{
-+	struct dentry *tmp, *goal = NULL;
-+	struct list_head *lp;
-+
-+	/* verify this dentry is really new */
-+	assert(dentry->d_inode == NULL);
-+	assert(list_empty(&dentry->d_alias));		/* d_instantiate */
-+	if (rehash)
-+		assert(d_unhashed(dentry));		/* d_rehash */
-+	assert(list_empty(&dentry->d_subdirs));
-+
-+	spin_lock(&dcache_lock);
-+	if (!inode)
-+		goto do_rehash;
-+
-+	if (!test_opt(inode->i_sb, IOPEN))
-+		goto do_instantiate;
-+
-+	/* preferrably return a connected dentry */
-+	list_for_each(lp, &inode->i_dentry) {
-+		tmp = list_entry(lp, struct dentry, d_alias);
-+		if (tmp->d_flags & DCACHE_DISCONNECTED) {
-+			assert(tmp->d_alias.next == &inode->i_dentry);
-+			assert(tmp->d_alias.prev == &inode->i_dentry);
-+			goal = tmp;
-+			dget_locked(goal);
-+			break;
-+		}
-+	}
-+
-+	if (!goal)
-+		goto do_instantiate;
-+
-+	/* Move the goal to the de hash queue */
-+	goal->d_flags &= ~DCACHE_DISCONNECTED;
-+	security_d_instantiate(goal, inode);
-+	__d_drop(dentry);
-+	d_rehash_cond(dentry, 0);
-+	__d_move(goal, dentry);
-+	spin_unlock(&dcache_lock);
-+	iput(inode);
-+
-+	return goal;
-+
-+	/* d_add(), but don't drop dcache_lock before adding dentry to inode */
-+do_instantiate:
-+	list_add(&dentry->d_alias, &inode->i_dentry);	/* d_instantiate */
-+	dentry->d_inode = inode;
-+do_rehash:
-+	if (rehash)
-+		d_rehash_cond(dentry, 0);		/* d_rehash */
-+	spin_unlock(&dcache_lock);
-+
-+	return NULL;
-+}
-+
-+/*
-+ * These are the special structures for the iopen pseudo directory.
-+ */
-+
-+static struct inode_operations iopen_inode_operations = {
-+	lookup:		iopen_lookup,		/* BKL held */
-+};
-+
-+static struct file_operations iopen_file_operations = {
-+	read:		generic_read_dir,
-+};
-+
-+static int match_dentry(struct dentry *dentry, const char *name)
-+{
-+	int	len;
-+
-+	len = strlen(name);
-+	if (dentry->d_name.len != len)
-+		return 0;
-+	if (strncmp(dentry->d_name.name, name, len))
-+		return 0;
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into ext3_lookup and returns 1 the file
-+ * name is __iopen__ and dentry has been filled in appropriately.
-+ */
-+int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry)
-+{
-+	struct inode *inode;
-+
-+	if (dir->i_ino != EXT3_ROOT_INO ||
-+	    !test_opt(dir->i_sb, IOPEN) ||
-+	    !match_dentry(dentry, "__iopen__"))
-+		return 0;
-+
-+	inode = iget(dir->i_sb, EXT3_BAD_INO);
-+
-+	if (!inode)
-+		return 0;
-+	d_add(dentry, inode);
-+	return 1;
-+}
-+
-+/*
-+ * This function is spliced into read_inode; it returns 1 if inode
-+ * number is the one for /__iopen__, in which case the inode is filled
-+ * in appropriately.  Otherwise, this fuction returns 0.
-+ */
-+int ext3_iopen_get_inode(struct inode *inode)
-+{
-+	if (inode->i_ino != EXT3_BAD_INO)
-+		return 0;
-+
-+	inode->i_mode = S_IFDIR | S_IRUSR | S_IXUSR;
-+	if (test_opt(inode->i_sb, IOPEN_NOPRIV))
-+		inode->i_mode |= 0777;
-+	inode->i_uid = 0;
-+	inode->i_gid = 0;
-+	inode->i_nlink = 1;
-+	inode->i_size = 4096;
-+	inode->i_atime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = CURRENT_TIME;
-+	EXT3_I(inode)->i_dtime = 0;
-+	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size
-+					 * (for stat), not the fs block
-+					 * size */
-+	inode->i_blocks = 0;
-+	inode->i_version = 1;
-+	inode->i_generation = 0;
-+
-+	inode->i_op = &iopen_inode_operations;
-+	inode->i_fop = &iopen_file_operations;
-+	inode->i_mapping->a_ops = 0;
-+
-+	return 1;
-+}
-Index: linux-2.6.12-rc6/fs/ext3/iopen.h
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/iopen.h	2005-06-14 16:14:33.534835845 +0200
-+++ linux-2.6.12-rc6/fs/ext3/iopen.h	2005-06-14 16:14:33.633468657 +0200
-@@ -0,0 +1,15 @@
-+/*
-+ * iopen.h
-+ *
-+ * Special support for opening files by inode number.
-+ *
-+ * Copyright (C) 2001 by Theodore Ts'o (tytso@alum.mit.edu).
-+ *
-+ * This file may be redistributed under the terms of the GNU General
-+ * Public License.
-+ */
-+
-+extern int ext3_check_for_iopen(struct inode *dir, struct dentry *dentry);
-+extern int ext3_iopen_get_inode(struct inode *inode);
-+extern struct dentry *iopen_connect_dentry(struct dentry *dentry,
-+					   struct inode *inode, int rehash);
-Index: linux-2.6.12-rc6/fs/ext3/namei.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/namei.c	2005-06-14 16:01:14.701837819 +0200
-+++ linux-2.6.12-rc6/fs/ext3/namei.c	2005-06-14 16:14:33.644210844 +0200
-@@ -37,6 +37,7 @@
- #include <linux/buffer_head.h>
- #include <linux/smp_lock.h>
- #include "xattr.h"
-+#include "iopen.h"
- #include "acl.h"
- 
- /*
-@@ -985,6 +986,9 @@
- 	if (dentry->d_name.len > EXT3_NAME_LEN)
- 		return ERR_PTR(-ENAMETOOLONG);
- 
-+	if (ext3_check_for_iopen(dir, dentry))
-+		return NULL;
-+
- 	bh = ext3_find_entry(dentry, &de);
- 	inode = NULL;
- 	if (bh) {
-@@ -995,10 +999,8 @@
- 		if (!inode)
- 			return ERR_PTR(-EACCES);
- 	}
--	if (inode)
--		return d_splice_alias(inode, dentry);
--	d_add(dentry, inode);
--	return NULL;
-+
-+	return iopen_connect_dentry(dentry, inode, 1);
- }
- 
- 
-@@ -2042,10 +2044,6 @@
- 			      inode->i_nlink);
- 	inode->i_version++;
- 	inode->i_nlink = 0;
--	/* There's no need to set i_disksize: the fact that i_nlink is
--	 * zero will ensure that the right thing happens during any
--	 * recovery. */
--	inode->i_size = 0;
- 	ext3_orphan_add(handle, inode);
- 	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
-@@ -2168,6 +2166,23 @@
- 	return err;
- }
- 
-+/* Like ext3_add_nondir() except for call to iopen_connect_dentry */
-+static int ext3_add_link(handle_t *handle, struct dentry *dentry,
-+			 struct inode *inode)
-+{
-+	int err = ext3_add_entry(handle, dentry, inode);
-+	if (!err) {
-+		err = ext3_mark_inode_dirty(handle, inode);
-+		if (err == 0) {
-+			dput(iopen_connect_dentry(dentry, inode, 0));
-+			return 0;
-+		}
-+	}
-+	ext3_dec_count(handle, inode);
-+	iput(inode);
-+	return err;
-+}
-+
- static int ext3_link (struct dentry * old_dentry,
- 		struct inode * dir, struct dentry *dentry)
- {
-@@ -2191,7 +2206,8 @@
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
--	err = ext3_add_nondir(handle, dentry, inode);
-+	err = ext3_add_link(handle, dentry, inode);
-+	ext3_orphan_del(handle, inode);
- 	ext3_journal_stop(handle);
- 	if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries))
- 		goto retry;
-Index: linux-2.6.12-rc6/fs/ext3/super.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/ext3/super.c	2005-06-14 16:01:16.287775299 +0200
-+++ linux-2.6.12-rc6/fs/ext3/super.c	2005-06-14 16:14:33.656906156 +0200
-@@ -590,6 +590,7 @@
- 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0,
- 	Opt_ignore, Opt_barrier, Opt_err, Opt_resize,
-+	Opt_iopen, Opt_noiopen, Opt_iopen_nopriv,
- };
- 
- static match_table_t tokens = {
-@@ -638,6 +639,9 @@
- 	{Opt_ignore, "noquota"},
- 	{Opt_ignore, "quota"},
- 	{Opt_ignore, "usrquota"},
-+	{Opt_iopen, "iopen"},
-+	{Opt_noiopen, "noiopen"},
-+	{Opt_iopen_nopriv, "iopen_nopriv"},
- 	{Opt_barrier, "barrier=%u"},
- 	{Opt_err, NULL},
- 	{Opt_resize, "resize"},
-@@ -921,6 +925,18 @@
- 			else
- 				clear_opt(sbi->s_mount_opt, BARRIER);
- 			break;
-+		case Opt_iopen:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_noiopen:
-+			clear_opt (sbi->s_mount_opt, IOPEN);
-+			clear_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
-+		case Opt_iopen_nopriv:
-+			set_opt (sbi->s_mount_opt, IOPEN);
-+			set_opt (sbi->s_mount_opt, IOPEN_NOPRIV);
-+			break;
- 		case Opt_ignore:
- 			break;
- 		case Opt_resize:
-Index: linux-2.6.12-rc6/include/linux/ext3_fs.h
-===================================================================
---- linux-2.6.12-rc6.orig/include/linux/ext3_fs.h	2005-06-14 16:01:14.709650318 +0200
-+++ linux-2.6.12-rc6/include/linux/ext3_fs.h	2005-06-14 16:28:38.452794245 +0200
-@@ -358,6 +358,8 @@
- #define EXT3_MOUNT_RESERVATION		0x10000	/* Preallocation */
- #define EXT3_MOUNT_BARRIER		0x20000 /* Use block barriers */
- #define EXT3_MOUNT_NOBH			0x40000 /* No bufferheads */
-+#define EXT3_MOUNT_IOPEN		0x80000	/* Allow access via iopen */
-+#define EXT3_MOUNT_IOPEN_NOPRIV		0x100000/* Make iopen world-readable */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series
deleted file mode 100644
index 36610235b0ef7f2eb93540b812d5d568bc971758..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc3.series
+++ /dev/null
@@ -1,13 +0,0 @@
-ext3-wantedi-2.6-rhel4.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6-rhel4.patch 
-export_symbols-ext3-2.6-suse.patch
-ext3-map_inode_page-2.6-suse.patch
-ext3-ea-in-inode-2.6-rhel4.patch
-export-ext3-2.6-rhel4.patch
-ext3-include-fixes-2.6-rhel4.patch
-ext3-extents-2.6.9-rhel4.patch
-ext3-mballoc2-2.6.9-rhel4.patch 
-ext3-nlinks-2.6.9.patch
-ext3-ialloc-2.6.patch
-ext3-lookup-dotdot-2.6.9.patch
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series
deleted file mode 100644
index 1c853bddf8f2e2f474871d64a881fb43ca8eaad8..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-fc5.series
+++ /dev/null
@@ -1,12 +0,0 @@
-ext3-wantedi-2.6-rhel4.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6-fc5.patch
-ext3-map_inode_page-2.6-suse.patch
-export-ext3-2.6-rhel4.patch
-ext3-include-fixes-2.6-rhel4.patch
-ext3-extents-2.6.15.patch
-ext3-mballoc2-2.6-fc5.patch
-ext3-nlinks-2.6.9.patch
-ext3-ialloc-2.6.patch
-ext3-remove-cond_resched-calls-2.6.12.patch
-ext3-filterdata-2.6.15.patch
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series
deleted file mode 100644
index ee07d11812531f35bb8c2eb35f0902957b993e5c..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel4.series
+++ /dev/null
@@ -1,17 +0,0 @@
-ext3-wantedi-2.6-rhel4.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6-rhel4.patch 
-export_symbols-ext3-2.6-suse.patch
-ext3-map_inode_page-2.6-suse.patch
-ext3-ea-in-inode-2.6-rhel4.patch
-export-ext3-2.6-rhel4.patch
-ext3-include-fixes-2.6-rhel4.patch
-ext3-extents-2.6.9-rhel4.patch
-ext3-mballoc2-2.6.9-rhel4.patch 
-ext3-nlinks-2.6.9.patch
-ext3-ialloc-2.6.patch
-ext3-lookup-dotdot-2.6.9.patch
-ext3-sector_t-overflow-2.6.9-rhel4.patch
-ext3-check-jbd-errors-2.6.9.patch
-ext3-nanosecond-2.6-rhel4.patch
-ext3-extents-bug11324.patch
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series
deleted file mode 100644
index e9f3f1fb5a26d81e1e90a540349d5c955e67e354..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles10.series
+++ /dev/null
@@ -1,15 +0,0 @@
-ext3-wantedi-2.6-rhel4.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6-fc5.patch
-ext3-map_inode_page-2.6-suse.patch
-export-ext3-2.6-rhel4.patch
-ext3-include-fixes-2.6-rhel4.patch
-ext3-extents-2.6.16-sles10.patch
-ext3-mballoc2-2.6-fc5.patch
-ext3-nlinks-2.6.9.patch
-ext3-ialloc-2.6.patch
-ext3-remove-cond_resched-calls-2.6.12.patch
-ext3-filterdata-2.6.15.patch
-ext3-disable-write-bar-by-default-2.6-sles10.patch
-ext3-nanosecond-2.6-sles10.patch
-ext3-inode-version-2.6-sles10.patch
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series
deleted file mode 100644
index e27e861c1bd42c8d8e695e94e17f699c46d35d69..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-suse.series
+++ /dev/null
@@ -1,17 +0,0 @@
-ext3-wantedi-2.6-suse.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6-suse.patch
-export_symbols-ext3-2.6-suse.patch
-ext3-map_inode_page-2.6-suse.patch
-ext3-ea-in-inode-2.6-suse.patch
-export-ext3-2.6-suse.patch
-ext3-include-fixes-2.6-suse.patch
-ext3-extents-2.6.5.patch
-ext3-mballoc2-2.6-suse.patch 
-ext3-nlinks-2.6.7.patch
-ext3-rename-reserve-2.6-suse.patch
-ext3-ialloc-2.6.patch
-ext3-lookup-dotdot-2.6.9.patch
-ext3-sector_t-overflow-2.6.5-suse.patch
-ext3-check-jbd-errors-2.6.5.patch
-ext3-nanosecond-2.6-suse.patch
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series
deleted file mode 100644
index 53c060b352f1784e4089e8482eafe8cfd6744854..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6.12-vanilla.series
+++ /dev/null
@@ -1,15 +0,0 @@
-ext3-wantedi-2.6-rhel4.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6.12.patch 
-ext3-map_inode_page-2.6-suse.patch
-export-ext3-2.6-rhel4.patch
-ext3-include-fixes-2.6-rhel4.patch
-ext3-extents-2.6.12.patch 
-ext3-mballoc2-2.6.12.patch 
-ext3-nlinks-2.6.9.patch
-ext3-ialloc-2.6.patch
-ext3-remove-cond_resched-calls-2.6.12.patch
-ext3-htree-dot-2.6.patch
-ext3-external-journal-2.6.12.patch
-ext3-lookup-dotdot-2.6.9.patch
-ext3-sector_t-overflow-2.6.12.patch
diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series
deleted file mode 100644
index 350067db39230b8de9c4e85e35ea6d182371847d..0000000000000000000000000000000000000000
--- a/ldiskfs/kernel_patches/series/ldiskfs-2.6.18-vanilla.series
+++ /dev/null
@@ -1,14 +0,0 @@
-ext3-wantedi-2.6-rhel4.patch
-ext3-san-jdike-2.6-suse.patch
-iopen-2.6-fc5.patch
-ext3-map_inode_page-2.6-suse.patch
-export-ext3-2.6-rhel4.patch
-ext3-include-fixes-2.6-rhel4.patch
-ext3-extents-2.6.18-vanilla.patch
-ext3-mballoc2-2.6.18-vanilla.patch
-ext3-nlinks-2.6.9.patch
-ext3-ialloc-2.6.patch
-ext3-remove-cond_resched-calls-2.6.12.patch
-ext3-filterdata-2.6.15.patch
-ext3-nanosecond-2.6.18-vanilla.patch
-ext3-inode-version-2.6.18-vanilla.patch
diff --git a/ldiskfs/ldiskfs/Makefile.in b/ldiskfs/ldiskfs/Makefile.in
deleted file mode 100644
index eeb1bed045a9dee8e8712db3a51e9ccc36240903..0000000000000000000000000000000000000000
--- a/ldiskfs/ldiskfs/Makefile.in
+++ /dev/null
@@ -1,21 +0,0 @@
-default: all
-
-MODULES := ldiskfs
-
-# copy makefile over to not break patches
-ext3_extra := $(wildcard @LINUX@/fs/ext3/Makefile)
-
-ext3_headers := $(wildcard @LINUX@/fs/ext3/*.h)
-linux_headers := $(wildcard @LINUX@/include/linux/ext3*.h)
-
-ext3_sources := $(filter-out %.mod.c,$(wildcard @LINUX@/fs/ext3/*.c))
-new_sources := iopen.c iopen.h extents.c mballoc.c
-new_headers := ext3_extents.h
-ldiskfs_patched_sources := $(notdir $(ext3_sources) $(ext3_headers)) $(new_sources) $(new_headers)
-ldiskfs_sources := $(ldiskfs_patched_sources)
-
-ldiskfs-objs := $(filter %.o,$(ldiskfs_sources:.c=.o))
-
-EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LUSTRE@ -I@LUSTRE@/ldiskfs
-
-@INCLUDE_RULES@
diff --git a/ldiskfs/ldiskfs/autoMakefile.am b/ldiskfs/ldiskfs/autoMakefile.am
deleted file mode 100644
index 8ac1b877ba9eb627793dab79ff77c93bdd5170a8..0000000000000000000000000000000000000000
--- a/ldiskfs/ldiskfs/autoMakefile.am
+++ /dev/null
@@ -1,80 +0,0 @@
-if MODULES
-if LDISKFS
-modulefs_DATA = ldiskfs$(KMODEXT)
-endif
-endif
-
-ldiskfs_linux_headers := $(addprefix linux/,$(subst ext3,ldiskfs,$(notdir $(linux_headers))))
-
-$(filter %.c,$(ldiskfs_patched_sources)): sources $(ldiskfs_linux_headers) $(filter %.h,$(ldiskfs_patched_sources))
-
-ldiskfs_sed_flags = \
-	-e "s/dx_hash_info/ext3_dx_hash_info/g" \
-	-e "s/dir_private_info/ext3_dir_private_info/g" \
-	-e "s/DX_HASH/EXT3_DX_HASH/g" \
-	-e "s/reserve_window/ext3_reserve_window/g" \
-	-e "s/rsv_window_add/ext3_rsv_window_add/g" \
-	-e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g"
-
-%.c: linux-stage/fs/ext3/%.c
-	sed $(strip $(ldiskfs_sed_flags)) $< > $@
-
-%.h: linux-stage/fs/ext3/%.h
-	sed $(strip $(ldiskfs_sed_flags)) $< > $@
-
-linux/ldiskfs%.h: linux-stage/include/linux/ext3%.h
-	sed $(strip $(ldiskfs_sed_flags)) $< > $@
-
-#
-# FIXME: we need to grab the series in configure somehow
-# (see bug 1679)
-#
-series := @top_srcdir@/lustre/kernel_patches/series/ldiskfs-$(LDISKFS_SERIES)
-patches := @top_srcdir@/lustre/kernel_patches/patches
-
-sources: $(ext3_sources) $(ext3_headers) $(linux_headers) $(series)
-	rm -rf linux-stage linux sources $(ldiskfs_SOURCES)
-	mkdir -p linux-stage/fs/ext3 linux-stage/include/linux
-	cp $(ext3_sources) $(ext3_headers) $(ext3_extra) linux-stage/fs/ext3
-	cp $(linux_headers) linux-stage/include/linux
-if USE_QUILT
-	ln -s ../$(patches) linux-stage/patches
-	ln -s ../$(series) linux-stage/series
-	cd linux-stage && quilt push -a -q
-else
-	@echo -n "Applying ext3 patches:"
-	@cd linux-stage && for i in $$(<../$(series)) ; do \
-		echo -n " $$i" ; \
-		patch -s -p1 < ../$(patches)/$$i || exit 1 ; \
-	done
-	@echo
-endif
-	mkdir linux
-	@echo -n "Replacing 'ext3' with 'ldiskfs':"
-	@for i in $(notdir $(ext3_headers) $(ext3_sources)) $(new_sources) ; do \
-		echo -n " $$i" ; \
-		sed $(strip $(ldiskfs_sed_flags)) \
-			linux-stage/fs/ext3/$$i > $$i ; \
-	done
-	@for i in $(subst ext3,,$(notdir $(linux_headers) $(new_headers))) ; do \
-		echo -n " ext3$$i" ; \
-		sed $(strip $(ldiskfs_sed_flags)) \
-			linux-stage/include/linux/ext3$$i \
-			> linux/ldiskfs$$i ; \
-	done
-	@echo
-	touch sources
-
-foo-check:
-	@echo "ldiskfs_sources: $(ldiskfs_sources)"
-	@echo "ldiskfs_SOURCES: $(ldiskfs_SOURCES)"
-	@echo "ldiskfs_headers: $(ldiskfs_headers)"
-	@echo "ldiskfs_objects: $(ldiskfs_objects)"
-	@echo "ldiskfs_OBJECTS: $(ldiskfs_OBJECTS)"
-	@echo "ldiskfs_LDADD: $(ldiskfs_LDADD)"
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-CLEANFILES = sources $(notdir $(linux_headers) $(ext3_headers) $(ext3_sources) $(new_sources) $(new_headers))
-
-clean: clean-am
-	rm -rf linux linux-stage
diff --git a/lustre/.cvsignore b/lustre/.cvsignore
deleted file mode 100644
index 07a5c92e26cc8ee18671a97f35a34f4cb127f31d..0000000000000000000000000000000000000000
--- a/lustre/.cvsignore
+++ /dev/null
@@ -1,30 +0,0 @@
-.Xrefs
-.Xrefs-2.5
-aclocal.m4
-config.log
-config.status
-config.cache
-config.guess
-config.sub
-configure
-Makefile
-autoMakefile
-autoMakefile.in
-.deps
-tags
-TAGS
-lustre*.tar.gz
-cscope.files
-cscope.out
-autom4te-2.53.cache
-autom4te.cache
-depcomp
-compile
-.*.cmd
-.mergeinfo-*
-Rules
-missing
-mkinstalldirs
-install-sh
-.depend
-.tmp_versions
diff --git a/lustre/BUGS b/lustre/BUGS
deleted file mode 100644
index ba84777a16701c88a0ba1388e11cd88aaad69f1c..0000000000000000000000000000000000000000
--- a/lustre/BUGS
+++ /dev/null
@@ -1 +0,0 @@
-To report bugs, please visit http://bugzilla.clusterfs.com/
diff --git a/lustre/BUILDING b/lustre/BUILDING
deleted file mode 100644
index 1c69d3c852c79c5a4c852e5f690243cbafda097a..0000000000000000000000000000000000000000
--- a/lustre/BUILDING
+++ /dev/null
@@ -1,30 +0,0 @@
-BUILDING LUSTRE
----------------
-
-You must already have a Lustre-patched kernel, which is outside of the
-scope of this document.  For more information on this process, see the
-web sites below.  Also consider downloading a pre-packaged Lustre
-kernel and utilities from http://www.lustre.org/downloads.html
-
-To build:
-  sh autogen.sh
-  ./configure --with-linux=/usr/src/lustre_patched_kernel_tree
-  make
-
-To play with Lustre:
-  cd tests
-  sh llmount.sh
-
-To clean up:
-  sh llmountcleanup.sh
-
-More information about Lustre:
-  http://www.lustre.org/
-
-More information about Cluster File Systems:
-  http://www.clusterfs.com/
-
-Feedback: 
-  lustre-discuss@lists.clusterfs.com
-
-- The Lustre Team -
diff --git a/lustre/ChangeLog b/lustre/ChangeLog
deleted file mode 100644
index dc6bed354f3355a2fd6d827a31dd470a154f9522..0000000000000000000000000000000000000000
--- a/lustre/ChangeLog
+++ /dev/null
@@ -1,5207 +0,0 @@
-tbd  Sun Microsystems, Inc.
-       * version 1.6.5
-       * Support for kernels:
-        2.6.5-7.311 (SLES 9),
-        2.6.9-67.0.7.EL (RHEL 4),
-        2.6.16.54-0.2.5 (SLES 10),
-        2.6.18-53.1.14.el5 (RHEL 5),
-        2.6.18.8 vanilla (kernel.org)
-        2.6.22.14 vanilla (kernel.org)
-       * Client support for unpatched kernels:
-        (see http://wiki.lustre.org/index.php?title=Patchless_Client)
-        2.6.16 - 2.6.22 vanilla (kernel.org)
-       * Due to problems with nested symlinks and FMODE_EXEC (bug 12652),
-        we do not recommend using patchless RHEL4 clients with kernels
-        prior to 2.6.9-55EL (RHEL4U5).
-       * Recommended e2fsprogs version: 1.40.7-sun1
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
-       * RHEL 4 and RHEL 5/SLES 10 clients behaves differently on 'cd' to a
-        removed cwd "./" (refer to Bugzilla 14399).
-
-Severity   : normal
-Bugzilla   : 15069
-Description: don't put request into delay list while invalidate in flight.
-Details    : ptlrpc_delay_request sometimes put in delay list while invalidate
-             import in flight. this produce timeout for invalidate and sometimes
-	     can cause stale data.
-
-Severity   : enhancement
-Bugzilla   : 15416
-Description: Update kernel to SLES9 2.6.5-7.311.
-
-Severity   : enhancement
-Bugzilla   : 15240
-Description: Update kernel to RHEL4 2.6.9-67.0.7.
-
-Severity   : minor
-Bugzilla   : 14856
-Frequency  : on ppc only
-Description: not convert ost objects for directory because it's not exist.
-Details    : ll_dir_getstripe assume dirrectory has ost objects but this wrong.
-
-Severity   : minor
-Bugzilla   : 15517
-Description: Fix warnings with compile liblustre at sles10/rhel5 which have
-             __u64 as usingied long long type.
-
-Severity   : minor
-Bugzilla   : 15210
-Frequency  : rare, on shutdown
-Description: race process ast vs remove callback
-Details    : removing callback before disconnect import open race with processing
-             callback.
-
-Severity   : enhancement
-Bugzilla   : 15416
-Description: Update kernel to SLES9 2.6.5-7.311.
-
-Severity   : normal
-Bugzilla   : 12652
-Description: Add FMODE_EXEC to SLES10 SP1 series.
-
-Severity   : enhancement
-Bugzilla   : 13397
-Description: Add server support for vanilla-2.6.22.14.
-
-Severity   : normal
-Bugzilla   : 13375
-Descriptoin: make lov_create() will not stuck in obd_statfs_rqset()
-Details    : If an OST is down the MDS will hang indefinitely in
-             obd_statfs_rqset() waiting for the statfs data. While for
-             MDS QOS usage of statfs, it should not stuck in waiting.
-
-Severity   : normal
-Bugzilla   : 3055
-Description: Disable adaptive timeouts by default
-
-Severity   : major
-Bugzilla   : 15027
-Frequency  : on network error
-Description: panic with double free request if network error 
-Details    : mdc_finish_enqueue is finish request if any network error occuring,
-	     but it's true only for synchronus enqueue, for async enqueue 
-	     (via ptlrpcd) this incorrect and ptlrpcd want finish request
-	     himself.
-
-Severity   : normal
-Bugzilla   : 14533
-Frequency  : rare, on recovery
-Description: read procfs can produce deadlock in some situation
-Details    : Holding lprocfs lock with send rpc can produce block for destroy
-	     obd objects and this also block reconnect with -EALREADY. This isn't
-	     fix all lprocfs bugs - but make it rare.
-
-Severity   : enhancement
-Bugzilla   : 15152
-Description: Update kernel to RHEL5 2.6.18-53.1.14.el5.
-
-Severity   : major
-Frequency  : frequent on X2 node
-Bugzilla   : 15010
-Description: mdc_set_open_replay_data LBUG
-Details    : Set replay data for requests that are eligible for replay.
-
-Severity   : normal
-Bugzilla   : 14321
-Description: lustre_mgs: operation 101 on unconnected MGS
-Details    : When MGC is disconnected from MGS long enough, MGS will evict the
-	     MGC, and late on MGC cannot successfully connect to MGS and a lot
-	     of the error messages complaining that MGS is not connected.
-
-Severity   : major
-Frequency  : rare, depends on device drivers and load
-Bugzilla   : 14529
-Description: MDS or OSS nodes crash due to stack overflow
-Details    : Code changes in 1.6.4 increased the stack usage of some functions.
-	     In some cases, in conjunction with device drivers that use a lot
-	     of stack, the MDS (or possibly OSS) service threads could overflow
-	     the stack.  One change which was identified to consume additional
-	     stack has been reworked to avoid the extra stack usage.
-
-Severity   : enhancement
-Bugzilla   : 14876
-Description: Update to RHEL5 latest kernel-2.6.18-53.1.13.el5.
-
-Severity   : enhancement
-Bugzilla   : 14858
-Description: Update to SLES10 SP1 latest kernel-2.6.16.54-0.2.5.
-
-Severity   : enhancement
-Bugzilla   : 14720
-Description: Update to RHEL5 latest kernel-2.6.18-53.1.6.el5.
-
-Serverity  : enhancement
-Bugzilla   : 14793
-Description: Update RHEL4 kernel to 2.6.9-67.0.4.
-
-Severity   : minor
-Frequency  : rare on shutdown ost
-Bugzilla   : 13196
-Description: Don't allow skipping OSTs if index has been specified.
-Details    : Don't allow skipping OSTs if index has been specified, make locking
-	     in internal create lots better.
-
-Severity   : normal
-Bugzilla   : 14421
-Description: ASSERTION(!PageDirty(page)) failed
-Details    : Wrong check could lead to an assertion failure under specific 
-	     load patterns.
-
-Severity   : normal
-Bugzilla   : 12228
-Description: LBUG in ptlrpc_check_set() bad phase ebc0de00
-Details    : access to bitfield in structure is always rounded to long 
-	     and this produce problem with not atomic change any bit.
-
-Severity   : normal
-Bugzilla   : 13647
-Description: Lustre make rpms failed.
-Details    : Remove ldiskfs spec file to avoids rpmbuild be confused when
-	     builds Lustre rpms from tarball.
-
-Severity   : enhancement
-Bugzilla   : 14498
-Description: Update to SLES9 SP4 kernel-2.6.5-7.308.
-
-Severity   : normal
-Frequency  : rare on shutdown ost
-Bugzilla   : 14608
-Description: If llog cancel was not send before clean_exports phase, this can
-	     produce deadlock in llog code.
-Details    : If llog thread has last reference to obd and call class_import_put
-	     this produce deadlock because llog_cleanup_commit_master wait when
-	     last llog_commit_thread exited, but this never success because was
-	     called from llog_commit_thread.
-
-Severity   : normal
-Bugzilla   : 14607
-Description: NULL lov_tgts causing MDS oops
-Details    : more safe checks for NULL lov_tgts for avoid oops.
-
-Severity   : enhancement
-Bugzilla   : 14531
-Description: Update to RHEL4 latest kernel-2.6.9-67.0.1.EL.
-
-Severity   : enhancement
-Bugzilla   : 14368
-Description: Update to RHEL5 latest kernel-2.6.18-53.1.4.el5.
-
-Severity   : normal
-Bugzilla   : 14136
-Description: make mgs_setparam() handle fsname containing dash
-Details    : fsname containing a dash does not work with lctl conf_param
-
-Severity   : enhancement
-Bugzilla   : 14288
-Description: Update to RHEL4 Update-6 kernel-2.6.9-67.EL.
-
-Severity   : normal
-Bugzilla   : 12702
-Frequency  : rare, in recovery and (or) destroy lovobjid file.
-Description: rewrite lov objid code.
-Details    : Cleanup for lov objid code, remove scability problems and wrong
-	     locking. Fix sending last_id into ost.
-
-Severity   : enhancement
-Bugzilla   : 14388
-Description: Update to SLES10 SP1 latest kernel-2.6.16.54-0.2.3.
-
-Severity   : enhancement
-Bugzilla   : 14289
-Description: Update to RHEL5 Update-1 kernel 2.6.18-53.el5.
-Details    : Use d_move_locked instead of __d_move.
-
-Severity   : major
-Bugzilla   : 14260
-Frequency  : rare, at shutdown
-Description: access already free / zero obd_namespace.
-Details    : if client_disconnect_export was called without force flag set,
-	     and exist connect request in flight, this can produce access to
-	     NULL pointer (or already free pointer) when connect_interpret
-	     store ocd flags in obd_namespace.
-
-Severity   : minor
-Bugzilla   : 14418
-Frequency  : only at startup
-Description: not alloc memory with spinlock held.
-Details    : allocation memory with GFP_KERNEL can produce sleep deadlock,
-	     if any spinlock held.
-
-Severity   : major
-Frequency  : always
-Bugzilla   : 14270
-Description: lfs find does not continue on file error
-Details    : Continue other files processing when a file/dir is absent.
-
-Severity   : normal
-Bugzilla   : 11791
-Description: Inconsistent usage of lustre_pack_reply()
-Details    : Standardize the usage of lustre_pack_reply() such that it
-	     always generate a CERROR on failure.
-
-Severity   : normal
-Frequency  : very rare
-Bugzilla   : 3462
-Description: Fix replay if there is an un-replied request and open
-Details    : In some cases, older replay request will revert the
-	     mcd->mcd_last_xid on MDS which is used to record the client's
-	     latest sent request.
-
-Severity   : enhancement
-Bugzilla   : 13969
-Description: Update to RHEL5 kernel 2.6.18-8.1.15.el5.
-
-Severity   : enhancement
-Bugzilla   : 13874
-Description: Update to SLES10 SP1 kernel 2.6.16.53-0.16
-
-Severity   : enhancement
-Bugzilla   : 13889
-Description: Update to SLES9 kernel-2.6.5-7.287.3.
-
-Severity   : enhancement
-Bugzilla   : 14041
-Description: Update to RHEL4 kernel-2.6.9-55.0.12.EL.
-
-Severity   : enhancement
-Bugzilla   : 13690
-Description: Build SLES10 patchless client fails
-Details    : The configure was broken by run ./configure with
-	     --with-linux-obj=.... argument for patchless client. When the
-	     configure use --with-linux-obj, the LINUXINCLUDE= -Iinclude
-	     can't search header adequately. Use absolute path such as
-	     -I($LINUX)/include instead.
-
-Severity   : enhancement
-Bugzilla   : 11622
-Description: Lustre Page Accounting
-Details    : New macros for page alloc and free which enable accounting
-	     of page allocation of Lustre. Use percpu counters to store memory
-	     and page statistics.
-
-Severity   : normal
-Frequency  : only if debugging is disabled
-Bugzilla   : 13497
-Description: LASSERT_{REQ,REP}SWAB macros are buggy
-Details    : If SWAB_PARANOIA is disabled, the LASSERT_REQSWAB and
-	     LASSERT_REPSWAB macros become no-ops, which is incorrect. Drop
-	     these macros and replace them with their difinitions instead.
-
-Severity   : normal
-Frequency  : rarely
-Bugzilla   : 13888
-Description: interrupt oig_wait produce painc on resend.
-Details    : brw_redo_request can be used for resend requests from ptlrpcd and
-	     private set, and this produce situation when rq_ptlrpcd_data not
-	     copyed to new allocated request and triggered LBUG on assert
-	     req->rq_ptlrpcd_data != NULL. But this member used only for wakeup
-	     ptlrpcd set if request is changed and can be safety changed to use
-	     rq_set directly.
-
-Severity   : enhancement
-Bugzilla   : 11089
-Description: organize the server-side client stats on per-nid basis
-Details    : Change the structure of stats under obdfilter and mds to
-	     New structure:
-		+- exports
-			+- nid#1
-			|   + stats
-			|   + uuids
-			+- nid#2...
-			+- clear
-	     The "uuid"s file would list the uuids of _active_ exports.
-	     And the clear entry is to clear all stats and stale nids.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12266
-Description: Processes looping in ll_readdir() on Lustre clients finally causing
-	     a full node pseudo-hang
-Details    : Concurrent access to the same directory from multiple clients with
-	     intensive file creation/removal can cause a client node to spin in
-	     ll_readdir(). i_version must be increased every time the lock is
-	     cancelled to ensure a revalidate is done.
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 13976
-Description: touch file failed when fs is not full
-Details    : OST in recovery should not be discarded by MDS in alloc_qos(),
-	     otherwise we can get ENOSP while fs is not full.
-
-Severity   : normal
-Frequency  : only for Cray XT3
-Bugzilla   : 12829/13455
-Description: Changing primary group doesn't change the group lustre assigns to
-	     a file
-Details    : When CRAY_XT3 is defined, the fsgid supplied by the client is
-	     overridden with the primary group provided by the group upcall,
-	     whereas the supplied fsgid can be trusted if it is in the list of
-	     supplementary groups returned by the group upcall.
-
-Severity   : normal
-Bugzilla   : 12749
-Description: Root Squash Functionality
-Details    : Implementation of NFS-like root squash capability. Specifically,
-	     don't allow someone with root access on a client node to be able
-	     to manipulate files owned by root on a server node.
-
-Severity   : normal
-Bugzilla   : 10718
-Description: Slow trucate/writes to huge files at high offsets.
-Details    : Directly associate cached pages to lock that protect those pages,
-	     this allows us to quickly find what pages to write and remove
-	     once lock callback is received.
-
-Severity   : normal
-Bugzilla   : 14379
-Description: Too many locks accumulating on client during NFS usage
-Details    : mds_open improperly used accmode to find out access mode to a
-	     file. Also mdc_intent_lock logic to find out if we already have
-	     lock similar to just received was flawed since introduction of
-	     skiplists - locks are now added to the front of the granted
-	     queue.
-
-Severity   : normal
-Bugzilla   : 14477
-Description: Hit ASSERTION(obd->obd_stopping == 1) failed in some setup failed
-	     situation.
-Details    : In obd setup failure handler, obd_stopping will not necessarily to
-	     be 1, and obd_set_up should also be checked to make sure whether
-	     obd is completely setup.
-
-Severity   : enhancement
-Bugzilla   : 14398
-Description: Allow masking D_WARNING, D_ERROR messages from console
-Details    : Console messages can now be disabled via lnet.printk.
-
-Severity   : normal
-Bugzilla   : 14614
-Description: User code with malformed file open parameter crashes client node
-Details    : Before packing join_file req, all the related reference should be
-	     checked carefully in case some malformed flags cause fake join_file
-	     req on client.
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 10600
-Description: shrink/enlarge qunit size when needed; fix the problem of coarse
-	     grain of quota doing harm to quota's accuracy
-Details    : qunit size will be changed when quota limitation is too low/high;
-	     record the pending quota write in order to get more accureate
-	     quota; delete the patch for bug12588, which is unnecessary when
-	     this patch is landed. This bug also contains fixes for bug 14526,
-	     14299, 14601 and 13794.
-
-Severity   : normal
-Bugzilla   : 14225
-Description: LDLM_ENQUEUE races with LDLM_CP_CALLBACK
-Details    : ldlm_completion_ast() assumes that a lock is granted when the req
-	     mode is equal to the granted mode. However, it should also check
-	     that LDLM_FL_CP_REQD is not set.
-
-Severity   : normal
-Bugzilla   : 14360
-Description: Heavy nfs access might result in deadlocks
-Details    : After ELC code landed, it is now improper to enqueue any mds
-	     locks under och_sem, because enqueue might want to decide to
-	     cancel open locks for same inode we are holding och_sem for.
-
-Severity   : normal
-Bugzilla   : 14443
-Description: 35% write performance drop with ldiskfs2 when quotas are on
-Details    : Enable ext3 journalled quota by default to improve performance
-	     when quotas are turned on.
-
-Severity   : normal
-Bugzilla   : 13843
-Description: Client eviction while running blogbench
-Details    : A lot of unlink operations with concurrent I/O can lead to a
-	     deadlock causing evictions. To address the problem, the number of
-	     oustanding OST_DESTROY requests is now throttled to
-	     max_rpcs_in_flight per OSC and LDLM_FL_DISCARD_DATA blocking
-	     callbacks are processed in priority.
-
-Severity   : normal
-Frequency  : RHEL4 only
-Bugzilla   : 14618
-Description: mkfs is very slow on IA64/RHEL4
-Details    : A performance regression has been discovered in the MPT Fusion
-	     driver between versions 3.02.73rh and 3.02.99.00rh. As a
-	     consequence, we have downgraded the MPT Fusion driver in the RHEL4
-	     kernel from 3.02.99.00 to 3.02.73 until this problem is fixed.
-
-Severity   : normal
-Frequency  : PPC/PPC64 only
-Bugzilla   : 14845
-Description: conflicts between asm-ppc64/types.h and lustre_types.h
-Details    : fix duplicated definitions between asm-ppc64/types.h and
-	     lustre_types.h on PPC.
-
-Severity   : normal
-Frequency  : PPC/PPC64 only
-Bugzilla   : 14844
-Description: asm-ppc/segment.h does not exist
-Details    : fix compile issue on PPC.
-
-Severity   : normal
-Bugzilla   : 13805
-Description: data checksumming impacts single node performance
-Details    : add support for several checksum algorithms. Currently, CRC32 and
-	     Adler-32 are supported. The checksum type can be changed on the fly
-	     through /proc/fs/lustre/osc/*/checksum_type.
-
-Severity   : normal
-Bugzilla   : 14648
-Description: use adler32 for page checksums
-Details    : when available, use the Adler-32 algorithm instead of CRC32 for
-	     page checksums.
-
-Severity   : normal
-Bugzilla   : 14864
-Description: better handle error messages in extents code
-
-Severity   : enhancement
-Bugzilla   : 14729
-Description: SNMP support enhancement
-Details    : Adding total number of sampled request for an MDS node in snmp
-	     support.
-
-Severity   : enhancement
-Bugzilla   : 14748
-Description: Optimize ldlm waiting list processing for PR extent locks
-Details    : When processing waiting list for read extent lock and meeting read
-	     lock that is same or wider to it that is not contended, skip
-	     processing rest of the list and immediatelly return current
-	     status of conflictness, since we are guaranteed there are no
-	     conflicting locks in the rest of the list.
-
-Severity   : normal
-Bugzilla   : 14774
-Description: Time out and refuse to reconnect
-Details    : When the failover node is the primary node, it is possible
-	     to have two identical connections in imp_conn_list. We must
-	     compare not conn's pointers but NIDs, otherwise we
-	     can defeat connection throttling.
-
-Severity   : major
-Bugzilla   : 14775
-Description: Client not clear own cache if answer to reconnect is lost.
-Details    : Client gets evicted from server.  Now client also thinks it is
-	     disconnected (or gets ENOTCONN on its operation) and decides to
-	     reconnect.  Server receives reconnect message, but cannot find
-	     export.  New export is created that is fully valid (new cookie!),
-	     but reply is lost and not reported to client.  Client reconnects
-	     again and gets back a just-created connection, but it is not new
-	     so client thinks it was not evicted and does not do recovery.
-
-Severity   : normal
-Bugzilla   : 14483
-Description: Detect stride IO mode in read-ahead 
-Details    : When a client does stride read, read-ahead should detect that and
-	     read-ahead pages according to the detected stride pattern. 
-
-Severity   : normal
-Bugzilla   : 15033
-Description: build for x2 fails
-Details    : fix compile issue on Cray systems.
-
-Severity   : enhancement
-Bugzilla   : 13371
-Description: implement readv/writev APIs(aio_read/aio_writes in newer kernels)
-Details    : This greatly improves speed of NFS writes on 2.6 kernels.
-
-Severity   : normal
-Frequency  : only on PPC/SLES10
-Bugzilla   : 14855
-Description: "BITS_PER_LONG is not 32 or 64" in linux/idr.h
-Details    : On SLES10/PPC, fs.h includes idr.h which requires BITS_PER_LONG to
-	     be defined. Add a hack in mkfs_lustre.c to work around this compile
-	     issue.
-
-Severity   : normal
-Bugzilla   : 14257
-Description: LASSERT on MDS when client holding flock lock dies
-Details    : ldlm pool logic depends on number of granted locks equal to
-             number of released locks which is not true for flock locks, so
-	     just exclude such locks from consideration.
-
-Severity   : normal
-Bugzilla   : 15188
-Description: MDS deadlock with many ll_sync_lov threads and I/O stalled
-Details    : Use fsfilt_sync() for both the whole filesystem sync and
-             individual file sync to eliminate dangerous inode locking
-             with I_LOCK that can lead to a deadlock.
-
-Severity   : minor
-Bugzilla   : 15566
-Description: Update an obsolete wirecheck.c generator
-Details    : Update wirecheck.c/wirehdr.c and regenerate wiretest.c
-
-Severity   : normal
-Bugzilla   : 14712
-Description: Client can panic on open sometimes
-Details    : It is possible that we try to free already freed request in
-             ll_file_open in some error cases when we send request from
-	     ll_file_open
-
---------------------------------------------------------------------------------
-
-2007-12-07         Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.6.4
-       * Support for kernels:
-        2.6.5-7.286 (SLES 9),
-        2.6.9-55.0.9.EL (RHEL 4),
-        2.6.16.53-0.8 (SLES 10),
-        2.6.18-8.1.14.el5 (RHEL 5),
-        2.6.18.8 vanilla (kernel.org)
-       * Client support for unpatched kernels:
-        (see http://wiki.lustre.org/index.php?title=Patchless_Client)
-        2.6.16 - 2.6.22 vanilla (kernel.org)
-       * Due to recently discovered recovery problems, we do not recommend
-        using patchless RHEL 4 clients with this or any earlier release.
-       * Recommended e2fsprogs version: 1.40.2-cfs1
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
-
-Severity   : major
-Frequency  : occasional
-Bugzilla   : 13917
-Description: MDS hang or stay in waiting lock
-Details    : If client receive lock with CBPENDING flag ldlm need send lock
-	     cancel as separate rpc, to avoid situation when cancel request
-	     can't processed due all i/o threads stay in wait lock.
-
-Severity   : normal
-Frequency  : occasional
-Bugzilla   : 13730
-Description: Do not fail import if osc_interpret_create gets -EAGAIN
-Details    : If osc_interpret_create got -EAGAIN it immediately exits and 
-	     wakeup oscc_waitq.  After wakeup oscc_wait_for_objects call 
-	     oscc_has_objects and see OSC has no objests and call 
-	     oscc_internal_create to resend create request.
-
-Severity   : enhancement
-Bugzilla   : 13521
-Description: Update kernel patches for SLES10 2.6.16.53-0.8.
-Details    : Update which_patch & target file for SLES10 latest kernel.
-
-Severity   : enhancement
-Bugzilla   : 13128
-Description: add --type and --size parameters to lfs find
-Details    : Enhance lfs find by adding filetype and filesize parameters. Also
-	     multiple OBDs can now be specified for the --obd option.
-
-Severity   : enhancement
-Bugzilla   : 11270
-Description: eliminate client locks in face of contention
-Details    : file contention detection and lockless i/o implementation
-	     for contended files.
-
-Severity   : enhancement
-Bugzilla   : 12411
-Description: Remove client patches from SLES 10 kernel.
-Details    : This causes SLES 10 clients to behave as patchless clients
-	     even on a Lustre-patched (server) kernel.
-
-Severity   : enhancement
-Bugzilla   : 2369 
-Description: use i_size_read and i_size_write in 2.6 port
-Details    : replace inode->i_size access with i_size_read/write()
-
-Severity   : normal
-Frequency  : when removing large files
-Bugzilla   : 13181
-Description: scheduling issue during removal of large Lustre files
-Details    : Don't take the BKL in fsfilt_ext3_setattr() for 2.6 kernels.
-	     It causes scheduling issues when removing large files (17TB in the
-	     present case).
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 13358
-Description: 1.4.11 Can't handle directories with stripe set and extended ACLs
-Details    : Impossible (EPROTO is returned) to access a directory that has a
-	     non-default striping and ACLs.
-
-Severity   : normal
-Frequency  : only on ppc
-Bugzilla   : 12234
-Description: /proc/fs/lustre/devices broken on ppc
-Details    : The patch as applied to 1.6.2 doesn't look correct for all arches.
-	     We should make sure the type of 'index' is loff_t and then cast 
-	     explicitly as needed below. Do not assign an explicitly cast
-	     loff_t to an int.
-
-Severity   : normal
-Frequency  : only for rhel5
-Bugzilla   : 13616
-Description: Kernel patches update for RHEL5 2.6.18-8.1.10.el5.
-Details    : Modify the target file & which_kernel.
-
-Severity   : normal
-Frequency  : if the uninit_groups feature is enabled on ldiskfs
-Bugzilla   : 13706
-Description: e2fsck reports "invalid unused inodes count"
-Details    : If a new ldiskfs filesystem is created with the "uninit_groups"
-	     feature and only a single inode is created in a group then the
-	     "bg_unused_inodes" count is incorrectly updated.  Creating a
-	     second inode in that group would update it correctly.
-
-Severity   : minor
-Frequency  : rarely
-Bugzilla   : 12948
-Description: buffer overruns could theoretically occur
-Details    : llapi_semantic_traverse() modifies the "path" argument by
-	     appending values to the end of the origin string, and a buffer
-	     overrun may occur. Adding buffer overrun check in liblustreapi.
-
-Severity   : enhancement
-Bugzilla   : 13454
-Description: Add jbd statistics patch for RHEL5 and 2.6.18-vanilla.
-
-Severity   : normal
-Frequency  : only if filesystem is inconsistent
-Bugzilla   : 11673
-Description: handle "serious error: objid * already exists" more gracefully
-Details    : If LAST_ID value on disk is smaller than the objects existing in
-	     the O/0/d* directories, it indicates disk corruption and causes an
-	     LBUG(). If the object is 0-length, then we should use the existing
-	     object. This will help to avoid a full fsck in most cases.
-
-Severity   : enhancement
-Bugzilla   : 13518
-Description: Kernel patches update for RHEL4 2.6.9-55.0.6.
-Details    : Modify vm-tunables-rhel4.patch.
-
-Severity   : enhancement
-Bugzilla   : 13452
-Description: Kernel config for 2.6.18-vanilla.
-Details    : Modify targets/2.6-vanilla.target.in.
-	     Add config file kernel-2.6.18-2.6-vanilla-i686.config.
-	     Add config file kernel-2.6.18-2.6-vanilla-i686-smp.config.
-	     Add config file kernel-2.6.18-2.6-vanilla-x86_64.config.
-	     Add config file kernel-2.6.18-2.6-vanilla-x86_64-smp.config.
-
-Severity   : major
-Frequency  : occasional
-Bugzilla   : 11710
-Description: improve handling recoverable errors
-Details    : If request processed with error which can be recoverable on server
-	     request should be resend, otherwise page released from cache and
-	     marked as error.
-
-Severity   : critical
-Frequency  : always
-Bugzilla   : 13751
-Description: Kernel patches update for RHEL5 2.6.18-8.1.14.el5.
-Details    : Modify target file & which_patch.
-	     A flaw was found in the IA32 system call emulation provided 
-	     on AMD64 and Intel 64 platforms. An improperly validated 64-bit 
-	     value could be stored in the %RAX register, which could trigger an 
-	     out-of-bounds system call table access. An untrusted local user 
-	     could exploit this flaw to run code in the kernel 
-	     (ie a root privilege escalation). (CVE-2007-4573). 
-
-Severity   : minor
-Bugzilla   : 13732 
-Description: change order of libsysio includes
-Details    : '#include sysio.h' should always come before '#include xtio.h'
-
-Severity   : enhancement
-Bugzilla   : 13207
-Description: adapt the lustre_config script to support the upgrade case
-Details    : Add "-u" option for lustre_config script to support upgrading 1.4
-	     server targets to 1.6 in parallel.
-
-Severity   : normal
-Frequency  : rarely
-Bugzilla   : 13570
-Description: To avoid grant space > avaible space when the disk is almost
-	     full. Without this patch you might see the error "grant XXXX >
-	     available" or some LBUG about grant, when the disk is almost 
-	     full.
-Details    : In filter_check_grant, for non_grant cache write, we should
-	     check the left space by  if (*left > ungranted + bytes), instead 
-	     of (*left > ungranted), because only we are sure the left space 
-	     is enough for another "bytes", then the ungrant space should be 
-	     increase. In client, we should update cl_avail_grant only there is
-	     OBD_MD_FLGRANT in the reply.
-
-Severity   : critical
-Frequency  : always
-Bugzilla   : 13748
-Description: Update RHEL 4 kernel to fix local root privilege escalation.
-Details    : Update to the latest RHEL 4 kernel to fix the vulnerability
-	     described in CVE-2007-4573.  This problem could allow untrusted
-	     local users to gain root access.
-
-Severity   : normal
-Frequency  : when using O_DIRECT and quotas
-Bugzilla   : 13930
-Description: Incorrect file ownership on O_DIRECT output files
-Details    : block usage reported by 'lfs quota' does not take into account
-	     files that have been written with O_DIRECT.
-
---------------------------------------------------------------------------------
-
-2007-09-27         Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.6.3
-       * Support for kernels:
-        2.6.5-7.286 (SLES 9),
-        2.6.9-55.0.2.EL (RHEL 4),
-        2.6.16.46-0.14 (SLES 10),
-        2.6.18-8.1.8.el5 (RHEL 5),
-        2.6.18.8 vanilla (kernel.org)
-       * Client support for unpatched kernels:
-        (see http://wiki.lustre.org/index.php?title=Patchless_Client)
-        2.6.16 - 2.6.21 vanilla (kernel.org)
-       * Due to recently discovered recovery problems, we do not recommend
-        using patchless RHEL 4 clients with this or any earlier release.
-       * Recommended e2fsprogs version: 1.40.2-cfs1
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
-
-Severity   : minor
-Bugzilla   : 12186
-Description: Fix errors in lfs documentation
-Details    : Fixes man pages
-
-Severity   : enhancement
-Bugzilla   : 3055
-Description: Adaptive timeouts
-Details    : RPC timeouts adapt to changing server load and network
-	     conditions to reduce resend attempts and improve recovery time.
-
-Severity   : enhancement
-Bugzilla   : 12192
-Description: llapi_file_create() does not allow some changes
-Details    : add llapi_file_open() that allows specifying the file creation
-	     mode and open flags, and also returns an open file handle.
-
-Severity   : enhancement
-Bugzilla   : 12743
-Description: df doesn't work properly if diskfs blocksize != 4K
-Details    : Choose biggest blocksize of OST's as the LOV's blocksize.
-
-Severity   : normal
-Frequency  : always on directories with default striping set
-Bugzilla   : 12836
-Description: lfs find on -1 stripe looping in lsm_lmm_verify_common()
-Details    : Avoid lov_verify_lmm_common() on directory with -1 stripe count.
-
-Severity   : enhancement
-Bugzilla   : 11248
-Description: merge and cleanup kernel patches.
-Details    : Remove mnt_lustre_list in vfs_intent-2.6-rhel4.patch.
-
-Severity   : enhancement
-Bugzilla   : 13039
-Description: RedHat Update kernel for RHEL5
-Details    : Kernel config file for RHEL5.
-
-Severity   : enhancement
-Bugzilla   : 12446
-Description: OSS needs mutliple precreate threads
-Details    : Add ability to start more than one create thread per OSS.
-
-Severity   : major
-Frequency  : only with quota on the root user
-Bugzilla   : 12223
-Description: mds_obd_create error creating tmp object
-Details    : When the user sets quota on root, llog will be affected and can't
-	     create files and write files.
-
-Severity   : normal
-Frequency  : Always on ia64 patchless client, and possibly others.
-Bugzilla   : 12826
-Description: Add EXPORT_SYMBOL check for node_to_cpumask symbol.
-Details    : This allows the patchless client to be loaded on architectures
-	     without this export.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 13142
-Description: disorder of journal start and llog_add cause deadlock.
-Details    : in llog_origin_connect, journal start should happen before
-	     llog_add keep the same order as other functions to avoid
-	     the deadlock.
-
-Severity   : enhancement
-Bugzilla   : 13039
-Description: RedHat Update kernel for RHEL5
-Details    : Modify the kernel config file more closer RHEL5.
-
-Severity   : enhancement
-Bugzilla   : 13360
-Description: Build failure against Centos5 (RHEL5)
-Details    : Define PAGE_SIZE when it isn't present.
-
-Severity   : normal
-Frequency  : occasionally when using NFS
-Bugzilla   : 13030
-Description: "ll_intent_file_open()) lock enqueue: err: -13" with nfs
-Details    : with NFS, the anon dentry's parent was set to itself in
-	     d_alloc_anon(), so in MDS, we use rec->ur_fid1 to find the
-	     corresponding dentry other than use rec->ur_name.
-
-Severity   : enhancement
-Bugzilla   : 12398
-Description: enable data checksumming by default
-Details    : enable checksum by default, allow --disable-checksum
-	     configure option and "-o nochecksum" mount option.  Checksums
-	     can also be disabled at runtime via $LPROC/osc/*/checksum_pages.
-
-Severity   : normal
-Frequency  : Occasionally with failover
-Bugzilla   : 12459
-Description: Client eviction due to failover config
-Details    : after a connection loss, the lustre client should attempt to
-	     reconnect to the last active server first before trying the
-	     other potential connections.
-
-Severity   : enhancement
-Bugzilla   : 11401
-Description: client-side metadata stat-ahead during readdir(directory readahead)
-Details    : perform client-side metadata stat-ahead when the client detects
-	     readdir and sequential stat of dir entries therein
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 12588
-Description: when mds and osts use different quota unit(32bit and 64bit),
-	     quota will be released repeatly.
-Details    : void sending multiple quota reqs to mds, which will keep the
-	     status  between the reqs.
-
-Severity   : normal
-Frequency  : only with liblustre clients on XT3
-Bugzilla   : 12418
-Description: evictions taking too long
-Details    : allow llrd to evict clients directly on OSTs
-
-Severity   : normal
-Bugzilla   : 13125
-Description: osts not allocated evenly to files
-Details    : change the condition to increase offset_idx
-
-Severity   : enhancement
-Bugzilla   : 2262
-Description: self-adjustable client's lru lists
-Details    : use adaptive algorithm for managing client cached locks lru 
-	     lists according to current server load, other client's work
-	     pattern, memory activities, etc. Both, server and client 
-	     side namespaces provide number of proc tunables for controlling 
-	     things
-
-Severity   : cleanup
-Bugzilla   : 13532
-Description: rewrite ext2-derived code in llite/dir.c and obdclass/uuid.c
-Details    : rewrite inherited code (uuid parsing code from ext2 utils and
-	     readdir code from ext3) from scratch preserving functionality.
-
-Severity   : normal 
-Bugzilla   : 13436
-Description: Only those disconnect error should be returned by rq_status.
-Details    : In open/enqueue processs, Some errors, which will cause client 
-	     disconnected, should be returned by rq_status, while other 
-	     errors should still be returned by intent, then mdc or llite will
-	     detect them.
-
-Severity   : enhancement
-Bugzilla   : 11230
-Description: Tune the kernel for good SCSI performance. 
-Details    : Set the value of /sys/block/{dev}/queue/max_sectors_kb
-	     to the value of /sys/block/{dev}/queue/max_hw_sectors_kb
-	     in mount_lustre.
-
-Severity   : critical
-Frequency  : Always for filesystems larger than 2TB on 32-bit systems.
-Bugzilla   : 13547, 13627
-Description: Data corruption for OSTs that are formatted larger than 2TB
-	     on 32-bit servers.
-Details    : When generating the bio request for lustre file writes the
-	     sector number would overflow a temporary variable before being
-	     used for the IO.  The data reads correctly from Lustre (which
-	     will overflow in a similar manner) but other file data or
-	     filesystem metadata may be corrupted in some cases.
-
-Severity   : normal
-Bugzilla   : 13600
-Description: "lfs find -obd UUID" prints directories
-Details    : "lfs find -obd UUID" will return all directory names instead
-	     of just file names. It is incorrect because the directories
-	     do not reside on the OSTs.
-
-Severity   : normal
-Bugzilla   : 13596, 13614
-Description: MDS hang after unclean shutdown of lots of clients
-Details    : Never resend AST requests.
-
-Severity   : normal
-Bugzilla   : 13304
-Frequency  : Always, for kernels after 2.6.16
-Description: Fix warning idr_remove called for id=.. which is not allocated.
-Details    : Last kernels save old s_dev before kill super and not allow 
-	     to restore from callback - restore it before call kill_anon_super.
-
-Severity   : normal
-Bugzilla   : 13334
-Description: Fix error on 'ls .' at the top of the Lustre mount.
-Details    : Don't revalidate dentry if it is a root dentry.
-
---------------------------------------------------------------------------------
-
-2007-08-27         Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.6.2
-       * Support for kernels:
-        2.6.5-7.286 (SLES 9),
-        2.6.9-55.0.2.EL (RHEL 4),
-        2.6.16.46-0.14 (SLES 10),
-        2.6.18-8.1.8.el5 (RHEL 5),
-        2.6.18.8 vanilla (kernel.org)
-       * Client support for unpatched kernels:
-        (see http://wiki.lustre.org/index.php?title=Patchless_Client)
-        2.6.16 - 2.6.22 vanilla (kernel.org)
-       * Due to recently discovered recovery problems, we do not recommend
-        using patchless RHEL 4 clients with this or any earlier release.
-       * Recommended e2fsprogs version: 1.39.cfs8
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 13147
-Description: block reactivating mgc import until all deactivates complete
-Details    : Fix race when failing back MDT/MGS to itself (testing)
-
-Severity   : enhancement
-Bugzilla   : 12786
-Description: lfs setstripe enhancement
-Details    : Make lfs setstripe understand 'k', 'm' and 'g' for stripe size.
-
-Severity   : normal
-Frequency  : mds/oss recovery
-Bugzilla   : 10800
-Description: llog ctxt is refrenced after it has been freed.
-Details    : llog ctxt refcount was added to avoide the race between ctxt free
-	     and llog recovery process. Each llog user must hold ctxt refcount
-	     before it access the llog. And the llog ctxt can only be freed
-	     when its refcount is zero.
-
-Severity   : enhancement
-Bugzilla   : 12211
-Description: randomly memory allocation failure util
-Details    : Make lustre randomly failed allocating memory for testing purpose.
-
-Severity   : normal
-Frequency  : only for SLES10
-Bugzilla   : 12771
-Description: Update kernel patch for SLES10 SP1
-Details    : Add patch blkdev_tunables-2.6-sles10.patch to 2.6-sles10.series.
-
-Severity   : enhancement
-Bugzilla   : 10786
-Description: omit set fsid for export NFS
-Details    : fix set/restore device id for avoid EMFILE error and mark lustre fs
-	     as FS_REQUIRES_DEV for avoid problems with generate fsid.
-
-Severity   : major
-Frequency  : after network failures
-Bugzilla   : 12769
-Description: Add sync option to mount_lustre.c
-Details    : Client loses data written to lustre after a network interruption.
-
-Severity   : enhancement
-Bugzilla   : 10595
-Description: Error message improvement.
-Details    : Merging of two LCONSOLE_ERROR_MSG into one.
-
-Severity   : enhancement
-Bugzilla   : 12606
-Description: don't use GFP_* in generic Lustre code.
-Details    : Use cfs_alloc_* functions and CFS_* flags for code portability.
-
-Severity   : enhancement
-Bugzilla   : 12333
-Description: obdclass is limited by single OBD_ALLOC(idarray)
-Details    : replace OBD_ALLOC/OBD_FREE with OBD_VMALLOC/OBD_VFREE
-
-Severity   : enhancement
-Bugzilla   : 12415
-Description: updated patchess for new RHEL4 kernel
-Details    : Fixed ext3-unlink-race.patch per Kalpak's comment.
-
-Severity   : enhancement
-Bugzilla   : 13006
-Description: warnings with build patchless client with vanila 2.6.19 and up
-Details    : change old ctl_table style and replace ctl_table/ctl_table_header
-	     with cfs_sysctl_table_t/cfs_sysctl_table_header_t
-
-Severity   : enhancement
-Bugzilla   : 13093
-Description: O_DIRECT bypasses client statistics.
-Details    : When running with O_DIRECT I/O, neither the client rpc_stats nor
-	     read_ahead_stats were updated. Copied stats section from
-	     osc_send_oap_rpc() into async_internal().
-
-Severity   : minor
-Frequency  : only for Cray XT3
-Bugzilla   : 11706
-Description: peer credits not enough on many OST per OSS systems.
-Details    : Use new lnet way to add credits as we need those for pings and ASTs
-
-Severity   : minor
-Frequency  : only with liblustre
-Bugzilla   : 12790
-Description: Liblustre is not releasing flock locks on file close.
-Details    : Release flock locks on file close.
-
-Severity   : minor
-Frequency  : only for RHEL4
-Bugzilla   : 12839
-Description: Update kernel patches for kernel-2.6.9-55.0.2.EL
-Details    : Remove inode-nr_unused-2.6.9-rhel4.patch from 2.6-rhel4.series
-	     Update target file and kernel config.
-
-Severity   : normal
-Bugzilla   : 11802
-Description: lustre support for RHEL5
-Details    : Add support for RHEL5.
-
-Severity   : minor
-Bugzilla   : 11327
-Frequency  : rare
-Description: ASSERTION(export != NULL) failed in target_handle_connect
-Details    : Assetion hit is result of rare race between disconnect and connet
-	     to same nid. target_handle_connect found old connect cockie and
-	     tried to reconnect, but can't find export for this cockie.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11756
-Description: umount blocks forever on error
-Details    : In result of wrong using obd_no_recov and obd_force flags client
-	     can hand if cancel or some other requests is lost.
-
-Severity   : normal
-Frequency  : Only for SLES
-Bugzilla   : 13177
-Description: sanity_quota fail test_1
-Details    : There are multiple occurences of $TSTUSR in SLES's /etc/group
-	     file, which makes TSTID[2] inunique.
-
-Severity   : enhancement
-Bugzilla   : 13249
-Description: Kernel patches for SLES9 2.6.5-7.286 kernel
-Details    : Update target/ChangeLog/which_patch .
-
-Severity   : enhancement
-Bugzilla   : 12955
-Description: jbd statistics
-Details    : Port older jbd statistics patch for sles10
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 9977
-Description: lvbo_init failed for resource with missing objects.
-Details    : Fix returning error if we do stat for file with missing/corrupted
-	     objects and i_size set to all sum of size of all avaible objects.
-	     if we to truncate/write to missing object - it is recreated.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 13276
-Description: Oops in read and write path when failing to allocate lock.
-Details    : Check if lock allocation failed and return error back.
-
-Severity   : normal
-Frequency  : When flocks are used.
-Bugzilla   : 13103
-Description: assertion failure in ldlm_cli_enquque_fini for non NULL lock.
-Details    : Flock locks might destroy just granted lock if it could be merged
-	     with another existing flock, this is done in completion handler,
-	     so teach ldlm_cli_enquque_fini that this is a valid case for
-	     flock locks.
-
-Severity   : normal
-Frequency  : Rare
-Bugzilla   : 11974
-Description: reply_lock_interpret crash due to race with it and lock cancel.
-Details    : Do not replay locks that are being cancelled. Do not reference
-	     locks by their address during replay, just by their handle.
-
-Severity   : normal
-Frequency  : only with deactivated OSTs
-Bugzilla   : 11679
-Description: lstripe command fails for valid OST index
-Details    : The stripe offset is compared to 'lov->desc.ld_tgt_count'
-	     instead of lov->desc.ld_active_tgt_count.
-
-Severity   : enhancement
-Bugzilla   : 13360
-Description: Build failure against Centos5 (RHEL5)
-Details    : Use getpagesize() instead of PAGE_SIZE.
-
---------------------------------------------------------------------------------
-
-2007-07-30         Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.6.1
-       * Support for kernels:
-        2.6.5-7.283 (SLES 9),
-        2.6.9-55.EL (RHEL 4),
-        2.6.16.46-0.14 (SLES 10),
-        2.6.18.8 vanilla (kernel.org)
-       * Client support for unpatched kernels:
-        (see http://wiki.lustre.org/index.php?title=Patchless_Client)
-        2.6.16 - 2.6.22 vanilla (kernel.org)
-       * Due to recently discovered recovery problems, we do not recommend
-        using patchless RHEL 4 clients with this or any earlier release.
-       * Recommended e2fsprogs version: 1.39.cfs8
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel.
-       * Starting with this release, the ldiskfs backing filesystem required
-        by Lustre is now in its own package, lustre-ldiskfs.  This package
-        should be installed.  It is versioned separately from Lustre and
-        may be released separately in future.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 13129
-Description: server LBUG when shutting down
-Details    : Block umount forever until the mount refcount is zero rather
-	     than giving up after an arbitrary timeout.
-	
-Severity   : enhancement
-Bugzilla   : 12194
-Description: add optional extra BUILD_VERSION info
-Details    : add a new environment variable (namely LUSTRE_VERS) which allows
-	     to override the lustre version.
-
-Severity   : normal
-Frequency  : 2.6.18 servers only
-Bugzilla   : 12546
-Description: ll_kern_mount() doesn't release the module reference
-Details    : The ldiskfs module reference count never drops down to 0
-	     because ll_kern_mount() doesn't release the module reference.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12470
-Description: server LBUG when using old ost_num_threads parameter
-Details    : Accept the old ost_num_threads parameter but warn that it
-	     is deprecated, and fix an off-by-one error that caused an LBUG.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11722
-Description: Transient SCSI error results in persistent IO issue
-Details    : iobuf->dr_error is not reinitialized to 0 between two
-	     uses.
-
-Severity   : normal
-Frequency  : sometimes when underlying device returns I/O errors
-Bugzilla   : 11743
-Description: OSTs not going read-only during write failures
-Details    : OSTs are not remounted read-only when the journal commit threads
-	     get I/O errors because fsfilt_ext3 calls journal_start/stop()
-	     instead of the ext3 wrappers.
-
-Severity   : minor
-Frequency  : only with 10000 clients or more
-Bugzilla   : 12364
-Description: poor connect scaling with increasing client count
-Details    : Don't run filter_grant_sanity_check for more than 100 exports
-	     to improve scaling for large numbers of clients.
-
-Severity   : normal
-Frequency  : SLES10 only
-Bugzilla   : 12538
-Description: sanity-quota.sh quotacheck failed: rc = -22
-Details    : Quotas cannot be enabled on SLES10.
-
-Severity   : normal
-Frequency  : liblustre clients only
-Bugzilla   : 12229
-Description: getdirentries does not give error when run on compute nodes
-Details    : getdirentries does not fail when the size specified as an argument
-	     is too small to contain at least one entry
-
-Severity   : enhancement
-Bugzilla   : 11548
-Description: Add LNET router traceability for debug purposes
-Details    : If a checksum failure occurs with a router as part of the
-	     IO path, the NID of the last router that forwarded the bulk data
-	     is printed so it can be identified.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11315
-Description: OST "spontaneously" evicts client; client has imp_pingable == 0
-Details    : Due to a race condition, liblustre clients were occasionally
-	     evicted incorrectly.
-
-Severity   : enhancement
-Bugzilla   : 10997
-Description: lfs setstripe use optional parameters instead of postional
-	     parameters.
-
-Severity   : enhancement
-Bugzilla   : 10651
-Description: Nanosecond timestamp support for ldiskfs
-Details    : The on-disk ldiskfs filesystem has added support for nanosecond
-	     resolution timestamps.  There is not yet support for this at
-	     the Lustre filesystem level.
-
-Severity   : normal
-Frequency  : during server recovery
-Bugzilla   : 11203
-Description: MDS failing to send precreate requests due to OSCC_FLAG_RECOVERING
-Details    : request with rq_no_resend flag not awake l_wait_event if they get a
-	     timeout.
-
-Severity   : minor
-Frequency  : nfs export on patchless client
-Bugzilla   : 11970
-Description: connectathon hang when test nfs export over patchless client
-Details    : Disconnected dentry cannot be found with lookup, so we do not need
-	     to unhash it or make it invalid
-
-Bugzilla   : 11757
-Description: fix llapi_lov_get_uuids() to allow many OSTs to be returned
-Details:   : Change llapi_lov_get_uuids() to read the UUIDs from /proc instead
-	     of using an ioctl. This allows lfsck for > 160 OSTs to succeed.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 11546
-Description: open req refcounting wrong on reconnect
-Details    : If reconnect happened between getting open reply from server and
-	     call to mdc_set_replay_data in ll_file_open, we will schedule
-	     replay for unreferenced request that we are about to free.
-	     Subsequent close will crash in variety of ways.
-	     Check that request is still eligible for replay in
-	     mdc_set_replay_data().
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 11512
-Description: disable writes to filesystem when reading health_check file
-Details    : the default for reading the health_check proc file has changed
-	     to NOT do a journal transaction and write to disk, because this
-	     can cause reads of the /proc file to hang and block HA state
-	     checking on a healthy but otherwise heavily loaded system.  It
-	     is possible to return to the previous behaviour during configure
-	     with --enable-health-write.
-
-Severity   : enhancement
-Bugzilla   : 10768
-Description: 64-bit inode version
-Details:   : Add a on-disk 64-bit inode version for ext3 to track changes made
-	     to the inode. This will be required for version-based recovery.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11818
-Description: MDS fails to start if a duplicate client export is detected
-Details    : in some rare cases it was possible for a client to connect to
-	     an MDS multiple times.  Upon recovery the MDS would detect this
-	     and fail during startup.  Handle this more gracefully.
-
-Severity   : enhancement
-Bugzilla   : 11563
-Description: Add -o localflock option to simulate old noflock behaviour.
-Details    : This will achieve local-only flock/fcntl locks coherentness.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 11658
-Description: log_commit_thread vs filter_destroy race leads to crash
-Details    : Take import reference before releasing llog record semaphore
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12477
-Description: Wrong request locking in request set processing
-Details    : ptlrpc_check_set wrongly uses req->rq_lock for proctect add to
-	     imp_delayed_list, in this place should be used imp_lock.
-
-Severity   : normal
-Frequency  : when reconnecting
-Bugzilla   : 11662
-Description: Grant leak when OSC reconnect to OST
-Details    : When osc reconnect ost, OST(filter) should check whether it
-	     should grant more space to client by comparing fed_grant and
-	     cl_avail_grant, and return the granted space to client instead
-	     of "new granted" space, because client will call osc_init_grant
-	     to update the client grant space info.
-
-Severity   : normal
-Frequency  : when client reconnects to OST
-Bugzilla   : 11662
-Description: Grant leak when OSC does a resend and replays bulk write
-Details	   : When osc reconnect to OST, OST(filter) should clear grant info of
-	     bulk write request, because the grant info while be sync between
-	     OSC and OST when reconnect, and we should ignore the grant info
-	     these of resend/replay write req.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11662
-Description: Grant space more than avaiable space sometimes.
-Details	   : When then OST is about to be full, if two bulk writing from
-	     different clients came to OST. Accord the avaliable space of the
-	     OST, the first req should be permitted, and the second one
-	     should be denied by ENOSPC. But if the seconde arrived before
-	     the first one is commited. The OST might wrongly permit second
-	     writing, which will cause grant space > avaiable space.
-
-Severity   : normal
-Frequency  : when client is evicted
-Bugzilla   : 12371
-Description: Grant might be wrongly erased when osc is evicted by OST
-Details    : when the import is evicted by server, it will fork another
-	     thread ptlrpc_invalidate_import_thread to invalidate the
-	     import, where the grant will be set to 0.  While the original
-	     thread will update the grant it got when connecting. So if
-	     the former happened latter, the grant will be wrongly errased
-	     because of this race.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12401
-Description: Checking Stale with correct fid
-Details    : ll_revalidate_it should uses de_inode instead of op_data.fid2
-	     to check whether it is stale, because sometimes, we want the
-	     enqueue happened anyway, and op_data.fid2 will not be initialized.
-
-Severity   : enhancement
-Bugzilla   : 11647
-Description: update patchless client
-Details    : Add support for patchless client with 2.6.20, 2.6.21 and RHEL 5
-
-Severity   : normal
-Frequency  : only with 2.4 kernel
-Bugzilla   : 12134
-Description: random memory corruption
-Details    : size of struct ll_inode_info is to big for union inode.u and this
-	     can be cause of random memory corruption.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 10818
-Description: Memory leak in recovery
-Details    : Lov_mds_md was not free in an error handler in mds_create_object.
-	     It should also check obd_fail before fsfilt_start, otherwise if
-	     fsfilt_start return -EROFS,(failover mds during mds recovery).
-	     then the req will return with repmsg->transno = 0 and rc = EROFS.
-	     and we met hit the assert LASSERT(req->rq_reqmsg->transno ==
-	     req->rq_repmsg->transno) in ptlrpc_replay_interpret.  Fcc should
-	     be freed no matter whether fsfilt_commit success or not.
-
-Severity   : minor
-Frequency  : only with huge numbers of clients
-Bugzilla   : 11817
-Description: Prevents from taking the superblock lock in llap_from_page for
-	     a soon died page.
-Details    : using LL_ORIGIN_REMOVEPAGE origin flag instead of LL_ORIGIN_UNKNOW
-	     for llap_from_page call in ll_removepage() prevents from taking
-	     the superblock lock for a soon died page.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11935
-Description: Not check open intent error before release open handle
-Details    : in some rare cases, the open intent error is not checked before
-	     release open handle, which may cause
-	     ASSERTION(open_req->rq_transno != 0), because it tries to release
-	     the failed open handle.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12556
-Description: Set cat log bitmap only after create log success.
-Details    : in some rare cases, the cat log bitmap is set too early. and it
-	     should be set only after create log success.
-
-Severity   : major
-Bugzilla   : 11971
-Description: Accessing a block bevice can re-enable I/O when Lustre is
-	     tearing down a device.
-Details    : dev_clear_rdonly(bdev) must be called in kill_bdev() instead of
-	     blkdev_put().
-
-Severity   : minor
-Bugzilla   : 11706
-Description: service threads may hog cpus when there are a lot of requests
-Details    : Insert cond_resched to give other threads a chance to use some CPU
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12086
-Description: the cat log was not initialized in recovery
-Details    : When mds(mgs) do recovery, the tgt_count might be zero, so the
-	     unlink log on mds will not be initialized until mds post
-	     recovery. And also in mds post recovery, the unlink log will
-	     initialization will be done asynchronausly, so there will be race
-	     between add unlink log and unlink log initialization.
-
-Severity   : normal
-Bugzilla   : 12597
-Description: brw_stats were being printed incorrectly
-Details    : brw_stats were being printed as log2 but all of them were not
-	     recorded as log2. Also remove some code duplication arising from
-	     filter_tally_{read,write}.
-
-Severity   : normal
-Bugzilla   : 11674
-Frequency  : rare, only in recovery.
-Description: ASSERTION(req->rq_type != LI_POISON) failed
-Details    : imp_lock should be held while iterating over imp_sending_list for
-	     prevent destroy request after get timeout in ptlrpc_queue_wait.
-
-Severity   : normal
-Bugzilla   : 12689
-Description: replay-single.sh test 52 fails
-Details    : A lock's skiplist need to be cleanup when it being unlinked
-	     from its resource list.
-
-Severity   : normal
-Bugzilla   : 11737
-Frequency  : always
-Description: Short directio read returns full requested size rather than
-	     actual amount read.
-Details    : Direct I/O operations should return actual amount of bytes
-	     transferred rather than requested size.
-
-Severity   : enhancement
-Bugzilla   : 10589
-Description: metadata RPC reduction (e.g. for rm performance)
-Details    : decrease the amount of synchronous RPC between clients and servers
-	     by canceling conflicing lock before the operation on the client
-	     and packing thier handles into the main operation RPC to server.
-
-Severity   : enhancement
-Bugzilla   : 12605
-Description: add #ifdef HAVE_KERNEL_CONFIG_H
-Details    : kernels from 2.6.19 not need include linux/config.h, but add
-	     include linux/autoconf.h in commpiler command line.
-
-Severity   : enhancement
-Bugzilla   : 12764
-Description: patchless client support for 2.6.22 kernel
-Details    : 2.6.22 has only one visble change, SLAB_CTOR_* constants is
-	     removed. In this case we need drop using os depended interface to
-	     kmem_cache and use cfs_mem_cache API.
-
-Severity   : minor
-Bugzilla   : 12747
-Frequency  : always
-Description: fix mal-formatted messages
-Details    : fix some mal-formatted DEBUG_REQ and LCONSOLE_ERROR_MSG messages
-
-Severity   : minor
-Bugzilla   : 11737
-Frequency  : always in liblustre
-Description: wrong IS_ERR implementation in liblustre.h
-Details    : fix IS_ERR implementation in liblustre.h for right detect errors.
-
-Severity   : minor
-Bugzilla   : 10419
-Frequency  : always
-Description: Correct condition for output debug message.
-Details    : inode i_nlink equal zero is not enough for output message about
-	     disk corruption, i_ctime and i_mode should be also checked.
-
-Severity   : minor
-Bugzilla   : 12415
-Frequency  : always in patchless client
-Description: add configure check for truncate_complete_page
-Details    : improve checks for exported symbols. This allow run check without
-	     sources, but with Module.symvers shipped with kernel distribution.
-	     add check for truncate_complete_page used by patchless client.
-
-Severity   : normal
-Bugzilla   : 12646
-Description: sanity.sh test_77h fails with "test_77h file compare failed"
-Details    : test_77h uses a file which was messed by other test case.
-
-Severity   : normal
-Bugzilla   : 12576
-Description: Not Check whether lov_tgts is NULL in some lov functions
-Details    : Checking whether lov_tgts is NULL in some functions.
-
-Severity   : normal
-Bugzilla   : 11815
-Description: replace obdo_alloc() with OBDO_ALLOC macro
-Details    : nothing special is done in obdo_alloc() function, and for
-	     debugging purpose, it needs to be replaced with macros.
-
-Severity   : normal
-Bugzilla   : 12784
-Description: bad return value and errno from fcntl call
-Details    : In liblustre API, errno should be a negative value if error
-	     happens.
-
-Severity   : normal
-Bugzilla   : 11544
-Description: ptlrpc_check_set() LBUG
-Details    : In case of positive reply from server and failed client bulk
-	     callback after bulk transfer shouldn't LBUG, but process this
-	     request as erroneous.
-
-Severity   : enhancement
-Bugzilla   : 10968
-Description: VFS operations stats tool.
-Details    : Tool which collects stats by tracking value written in pid,
-	     ppid, gid and uses llstat to generate output to plot graph using
-	     plot-llstat
-	     Updated lustre/utils/Makefile.am
-	     Added lustre/utils/ltrack_stats.c
-
-Severity   : enhancement
-Bugzilla   : 11039
-Description: 2.6.18 server support (lustre 1.6.1)
-Details    : Support for 2.6.18 kernels on the server side.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12696
-Description: ASSERTION(imp->imp_conn_current) failed
-Details    : an assertion failure is hit if a client node boots and attempts to
-	     mount a lustre filesystem faster than RECONNECT_INTERVAL seconds.
-
-Severity   : normal
-Frequency  : only for i686
-Bugzilla   : 12695
-Description: 1.4.11 RC1 build fails for RHEL 4, i686
-Details    : Fixed config variable for build.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12415
-Description: Updated patchess for new RHEL4 kernel
-Details    : Updated patch inode-nr_unused-2.6.9-rhel4.patch
-	     Updated patch jbd-stats-2.6.9.patch
-	     Updated patch qsnet-rhel4-2.6.patch
-	     Updated patch quota-deadlock-on-pagelock-core.patch
-	     Updated patch vfs_intent-2.6-rhel4.patch
-	     Updated patch vfs_races-2.6-rhel4.patch
-	     Updated series file 2.6-rhel4-titech.series
-	     Updated series file 2.6-rhel4.series
-	     Updated kernel config files
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12374
-Description: lquota slave complains LBUG when reconnecting with mds
-	     or failover in mds.
-Details    : quota slave depends qctxt->lqc_import to send its quota request.
-	     This pointer will be invalid if mds did failover or broke its
-	     connect to osts, which leads to LBUG.
-
-Severity   : normal	
-Frequency  : when qunit size is too small(less than 20M)
-Bugzilla   : 12588
-Description: write is stopped by improper -EDQUOT
-Details    : If the master is busy and qunit size is small enough(let's say 1M),
-	     the slave can not get quota from master on time, which will lead
-	     slave to trigger a -EQUOTA to client.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12629
-Description: Deadlock during metadata tests
-Details    : in prune_dir_dentries(), shrink_dcache_parent() should not be
-	     called with the per-dentry lock held.
-
-Severity   : normal
-Frequency  : SLES9 only
-Bugzilla   : 12744
-Description: Lustre patched kernel for SLES9 SP3 has NR_CPUS set to 8
-Details    : set CONFIG_NR_CPUS to 128 instead of 8.
-
-Severity   : enhancement
-Bugzilla   : 12678
-Description: remove fs_prep_san_write operation and related patches
-Details    : remove the ext3-san-jdike patches which are no longer useful.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11324
-Description: LDISKFS-fs error (device sdc): ldiskfs_free_blocks
-Details    : a disk corruption can cause the mballoc code to assert on a
-	     double free or other extent corruptions. Handle these with
-	     ext3_error() instead of assertions.
-
-Severity   : major
-Frequency  : only with mballoc3 code and deep extent trees
-Bugzilla   : 12861
-Description: ldiskfs_ext_search_right: bad header in inode: unexpected eh_depth
-Details    : a wrong check of extent headers in ldiskfs_ext_search_right()
-	     can cause the filesystem to be remounted read-only.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 13063
-Description: lfsck built against 1.4.x cannot run against 1.6.0 lustre
-Details    : the definition for OBD_IOC_GETNAME changed in 1.6.0.  One of the
-	     few external users of this ioctl number is lfsck's call to
-	     llapi_lov_get_uuids() and this caused lfsck to fail at startup.
-	     Add the old ioctl number to the handler so both old and new
-	     lfsck can work.
-
-Severity   : normal
-Bugzilla   : 11301
-Description: parallel lock callbacks
-Details    : Instead of sending blocking and completion callbacks as separated
-	     requests, adding them to a set and sending in parallel.
-
-Severity   : normal
-Bugzilla   : 12417
-Description: Disable most debugging by default
-Details    : To improve performance, disable most logging (for debug purposes)
-	     by default.  VFSTRACE, RPCTRACE, and DLMTRACE are now off by
-	     default, and HA includes fewer messages.
-
-Severity   : minor
-Bugzilla   : 12858
-Frequency  : only run on patchless client.
-Description: use do_facet on sanity.sh for test handling recoverables errors
-Details    : use do_facet instead of direct use sysctl for set fail_loc on OST
-
-Severity   : normal
-Bugzilla   : 11013
-Description: hash tables for lists of nids, connections and uuids
-Details    : Hash tables noticeably help when a lot of clients connect to a
-	     server, to faster identify duplicate connections or reconnects,
-	     also to faster find export to evict in manual eviction case.
-
-Severity   : normal
-Bugzilla   : 11190
-Description: Sometimes, when the server evict a client, and the client will
-	     not be evicted as soon as possible.
-Details    : In enqueue req, the error was returned by intent, instead of
-	     rq_status which make ptlrpc layer not detect this error, and
-	     does not evict the client. So enqueue error should be returned
-	     by rq_status.
-
-Severity   : minor
-Frequency  : only at startup
-Bugzilla   : 11778
-Description: Delay client connections to MDT until fist MDT->OST connect
-Details    : If a client tried to create a new file before the MDT had
-	     connected to any OSTs, the create would return EIO.  Now
-	     the client will simply block until the MDT connects to the
-	     first OST and the create can succeed.
-	
-Severity   : normal
-Frequency  : only for SLES9
-Bugzilla   : 12543
-Description: Routinely utilize latest Quadrics drivers in CFS releases
-Details    : Update patch qsnet-suse-2.6.patch.
-
-Severity   : normal
-Frequency  : only for sles10
-Bugzilla   : 12771
-Description: Update patches for SLES 10 SP1 kernel.
-Details    : Update the patch vfs_intent-2.6-sles10.patch.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 12543
-Description: Routinely utilize latest Quadrics drivers in CFS releases
-Details    : Update patch qsnet-rhel4-2.6.patch.
-
-Severity   : minor
-Frequency  : at statup only
-Bugzilla   : 12860
-Description: mds_lov_synchronize race leads to various problems
-Details    : simultaneous MDT->OST connections at startup can cause the
-	     sync to abort, leaving the OSC in a bad state.
-
-Severity   : normal
-Bugzilla   : 12975
-Frequency  : rare
-Description: Using wrong pointer in osc_brw_prep_request
-Details    : Access to array[-1] can produce panic if kernel compiled with
-	     CONFIG_PAGE_ALLOC enabled
-
-Severity   : enhancement
-Bugzilla   : 4900
-Description: Async OSC create to avoid the blocking unnecessarily.
-Details    : If a OST has no remain object, system will block on the creating
-	     when need to create a new object on this OST. Now, ways use
-	     pre-created objects when available, instead of blocking on an
-	     empty osc while others are not empty.  If we must block, we block
-	     for the shortest possible period of time.
-
-Severity   : normal
-Bugzilla   : 13148
-Frequency  : only in recovery
-Description: Mark OST as early accessible if his start SYNC.
-Details    : osc_precreate return flag early accessible if oscc marked as
-	     OSCC_FLAG_SYNC_IN_PROGRESS.
-
-Severity   : normal
-Bugzilla   : 13196
-Frequency  : rare
-Description: Sometimes precreate code can triger create object on wrong ost
-Details    : Wrong protected or not not restored variables aftre precreate loop
-	     can produce creation object on wrong ost.
-	
-Severity   : normal
-Frequency  : oss recovery
-Bugzilla   : 10800
-Description: llog_commit_thread cleanup should sync with llog_commit_thread
-	     start
-Details    : llog_commit_thread_count should be synced between llog_commit
-	     start and cleanup, so new llog_commit thread should not be started
-	     when llog_commit threads being stopped to avoid accessing some
-	     freed stuff.
-
-Severity   : enhancement
-Bugzilla   : 11721
-Description: Add printing inode info into message about error in writepage.
-
---------------------------------------------------------------------------------
-
-2007-05-03  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.6.0.1
-       * bug fixes
-
-Severity   : normal
-Frequency  : on some architectures
-Bugzilla   : 12404
-Description: 1.6 client sometimes fails to mount from a 1.4 MDT
-Details    : Uninitialized flags sometimes cause configuration commands to
-	     be skipped.
-
-Severity   : normal
-Frequency  : patchless clients only
-Bugzilla   : 12391
-Description: missing __iget() symbol export
-Details    : The __iget() symbol export is missing.  To avoid the need for
-	     this on patchless clients the deathrow inode reaper is turned
-	     off, and we depend on the VM to clean up old inodes.  This
-	     dependency was during via the fix for bug 12181.
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 12848
-Description: sanity.sh fail: test_52b
-Details    : The ll_inode_to_ext_flags() has a glitch which makes MDS return
-	     incorrect inode's flags to client.
-
---------------------------------------------------------------------------------
-
-2007-04-19  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.6.0
-       * CONFIGURATION CHANGE.  This version of Lustre WILL NOT
-	 INTEROPERATE with older versions automatically.  In many cases a
-	 special upgrade step is needed. Please read the
-	 user documentation before upgrading any part of a 1.4.x system.
-       * WARNING: Lustre configuration and startup changes are required with
-	 this release.  See https://mail.clusterfs.com/wikis/lustre/MountConf
-	 for details.
-       * Support for kernels:
-        2.4.21-47.0.1.EL (RHEL 3),
-        2.6.5-7.283 (SLES 9),
-        2.6.9-42.0.10.EL (RHEL 4),
-        2.6.12.6 vanilla (kernel.org),
-        2.6.16.27-0.9 (SLES10)
-       * Client support for unpatched kernels:
-        (see https://mail.clusterfs.com/wikis/lustre/PatchlessClient)
-        2.6.16 - 2.6.19 vanilla (kernel.org),
-        2.6.9-42.0.8EL (RHEL 4)
-       * Recommended e2fsprogs version: 1.39.cfs6
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel
-       * bug fixes
-
-Severity   : enhancement
-Bugzilla   : 4900
-Description: Async OSC create to avoid the blocking unnecessarily.
-Details    : If a OST has no remain object, system will block on the creating
-            when need to create a new object on this OST. Now, ways use
-            pre-created objects when available, instead of blocking on an
-            empty osc while others are not empty.  If we must block, we block
-            for the shortest possible period of time.
-
-Severity   : enhancement
-Bugzilla   : 8007
-Description: MountConf
-Details    : Lustre configuration is now managed via mkfs and mount
-	     commands instead of lmc and lconf.  New obd types (MGS, MGC)
-	     are added for dynamic configuration management.  See
-	     https://mail.clusterfs.com/wikis/lustre/MountConf for
-	     details.
-
-Severity   : enhancement
-Bugzilla   : 4482
-Description: dynamic OST addition
-Details    : OSTs can now be added to a live filesystem
-
-Severity   : enhancement
-Bugzilla   : 9851
-Description: startup order invariance
-Details    : MDTs and OSTs can be started in any order.  Clients only
-	     require the MDT to complete startup.
-
-Severity   : enhancement
-Bugzilla   : 4899
-Description: parallel, asynchronous orphan cleanup
-Details    : orphan cleanup is now performed in separate threads for each
-	     OST, allowing parallel non-blocking operation.
-
-Severity   : enhancement
-Bugzilla   : 9862
-Description: optimized stripe assignment
-Details    : stripe assignments are now made based on ost space available,
-	     ost previous usage, and OSS previous usage, in order to try
-	     to optimize storage space and networking resources.
-
-Severity   : enhancement
-Bugzilla   : 4226
-Description: Permanently set tunables
-Details    : All writable /proc/fs/lustre tunables can now be permanently
-	     set on a per-server basis, at mkfs time or on a live
-	     system.
-
-Severity   : enhancement
-Bugzilla   : 10547
-Description: Lustre message v2
-Details    : Add lustre message format v2.
-
-Severity   : enhancement
-Bugzilla   : 9866
-Description: client OST exclusion list
-Details    : Clients can be started with a list of OSTs that should be
-	     declared "inactive" for known non-responsive OSTs.
-
-Severity   : normal
-Bugzilla   : 12123
-Description: ENOENT returned for valid filehandle during dbench.
-Details    : Check if a directory has children when invalidating dentries
-	     associated with an inode during lock cancellation.  This fixes
-	     an incorrect ENOENT sometimes seen for valid filehandles during
-	     testing with dbench.
-
-Severity   : minor
-Frequency  : SFS test only (otherwise harmless)
-Bugzilla   : 6062
-Description: SPEC SFS validation failure on NFS v2 over lustre.
-Details    : Changes the blocksize for regular files to be 2x RPC size,
-	     and not depend on stripe size.
-
-Severity   : enhancement
-Bugzilla   : 10088
-Description: fine-grained SMP locking inside DLM
-Details    : Improve DLM performance on SMP systems by removing the single
-	     per-namespace lock and replace it with per-resource locks.
-
-Severity   : enhancement
-Bugzilla   : 9332
-Description: don't hold multiple extent locks at one time
-Details    : To avoid client eviction during large writes, locks are not
-	     held on multiple stripes at one time or for very large writes.
-	     Otherwise, clients can block waiting for a lock on a failed OST
-	     while holding locks on other OSTs and be evicted.
-
-Severity   : enhancement
-Bugzilla   : 9293
-Description: Multiple MD RPCs in flight.
-Details    : Further unserialise some read-only MDT RPCs - learn about intents.
-	     To avoid overly-overloading MDT, introduce a limit on number of
-	     MDT RPCs in flight for a single client and add /proc controls
-	     to adjust this limit.
-
-Severity   : enhancement
-Bugzilla   : 22484
-Description: client read/write statistics
-Details    : Add client read/write call usage stats for performance
-	     analysis of user processes.
-	     /proc/fs/lustre/llite/*/offset_stats shows non-sequential
-	     file access. extents_stats shows chunk size distribution.
-	     extents_stats_per_process show chunk size distribution per
-	     user process.
-
-Severity   : enhancement
-Bugzilla   : 22485
-Description: per-client statistics on server
-Details    : Add ldlm and operations statistics for each client in
-	     /proc/fs/lustre/mds|obdfilter/*/exports/
-
-Severity   : enhancement
-Bugzilla   : 22486
-Description: improved MDT statistics
-Details    : Add detailed MDT operations statistics in
-	     /proc/fs/lustre/mds/*/stats
-
-Severity   : enhancement
-Bugzilla   : 10968
-Description: VFS operations stats
-Details    : Add client VFS call stats, trackable by pid, ppid, or gid
-	     /proc/fs/lustre/llite/*/stats_track_[pid|ppid|gid]
-
-Severity   : minor
-Frequency  : always
-Bugzilla   : 6380
-Description: Fix client-side osc byte counters
-Details    : The osc read/write byte counters in
-	     /proc/fs/lustre/osc/*/stats are now working
-
-Severity   : minor
-Frequency  : always as root on SLES
-Bugzilla   : 10667
-Description: Failure of copying files with lustre special EAs.
-Details    : Client side always return success for setxattr call for lustre
-	     special xattr (currently only "trusted.lov").
-
-Severity   : minor
-Frequency  : always
-Bugzilla   : 10345
-Description: Refcount LNET uuids
-Details    : The global LNET uuid list grew linearly with every startup;
-	     refcount repeated list entries instead of always adding to
-	     the list.
-
-Severity   : enhancement
-Bugzilla   : 2258
-Description: Dynamic service threads
-Details    : Within a small range, start extra service threads
-	     automatically when the request queue builds up.
-
-Severity   : major
-Frequency  : mixed-endian client/server environments
-Bugzilla   : 11214
-Description: mixed-endian crashes
-Details    : The new msg_v2 system had some failures in mixed-endian
-	     environments.
-
-Severity   : enhancement
-Bugzilla   : 11229
-Description: Easy OST removal
-Details    : OSTs can be permanently deactivated with e.g. 'lctl
-	     conf_param lustre-OST0001.osc.active=0'
-
-Severity   : enhancement
-Bugzilla   : 11335
-Description: MGS proc entries
-Details    : Added basic proc entries for the MGS showing what filesystems
-	     are served.
-
-Severity   : enhancement
-Bugzilla   : 10998
-Description: provide MGS failover
-Details    : Added config lock reacquisition after MGS server failover.
-
-Severity   : enhancement
-Bugzilla   : 11461
-Description: add Linux 2.4 support
-Details    : Added support for RHEL 2.4.21 kernel for 1.6 servers and clients
-
-Severity   : normal
-Bugzilla   : 11330
-Description: a large application tries to do I/O to the same resource and dies
-	     in the middle of it.
-Details    : Check the req->rq_arrival time after the call to
-	     ost_brw_lock_get(), but before we do anything about
-	     processing it & sending the BULK transfer request. This
-	     should help move old stale pending locks off the queue as
-	     quickly as obd_timeout.
-
-Severity   : major
-Frequency  : when an incorrect nid is specified during startup
-Bugzilla   : 10734
-Description: ptlrpc connect to non-existant node causes kernel crash
-Details    : LNET can't be re-entered from an event callback, which
-	     happened when we expire a message after the export has been
-	     cleaned up.  Instead, hand the zombie cleanup off to another
-	     thread.
-
-Severity   : enhancement
-Bugzilla   : 10902
-Description: plain/inodebits lock performance improvement
-Details    : Grouping plain/inodebits in granted list by their request modes
-	     and bits policy, thus improving the performance of search through
-	     the granted list.
-
-Severity   : major
-Frequency  : only if OST filesystem is corrupted
-Bugzilla   : 9829
-Description: client incorrectly hits assertion in ptlrpc_replay_req()
-Details    : for a short time RPCs with bulk IO are in the replay list,
-	     but replay of bulk IOs is unimplemented.  If the OST filesystem
-	     is corrupted due to disk cache incoherency and then replay is
-	     started it is possible to trip an assertion.  Avoid putting
-	     committed RPCs into the replay list at all to avoid this issue.
-
-Severity   : major
-Frequency  : liblustre (e.g. catamount) on a large cluster with >= 8 OSTs/OSS
-Bugzilla   : 11684
-Description: System hang on startup
-Details    : This bug allowed the liblustre (e.g. catamount) client to
-	     return to the app before handling all startup RPCs.  This
-	     could leave the node unresponsive to lustre network traffic
-	     and manifested as a server ptllnd timeout.
-
-Severity   : enhancement
-Bugzilla   : 11667
-Description: Add "/proc/sys/lustre/debug_peer_on_timeout"
-Details    : liblustre envirable: LIBLUSTRE_DEBUG_PEER_ON_TIMEOUT
-	     boolean to control whether to print peer debug info when a
-	     client's RPC times out.
-
-Severity   : minor
-Frequency  : only for kernels with patches from Lustre below 1.4.3
-Bugzilla   : 11248
-Description: Remove old rdonly API
-Details    : Remove old rdonly API which unused from at least lustre 1.4.3
-
-Severity   : major
-Frequency  : only for devices with external journals
-Bugzilla   : 10719
-Description: Set external device read-only also
-Details    : During a commanded failover stop, we set the disk device
-	     read-only while the server shuts down. We now also set any
-	     external journal device read-only at the same time.
-
-Severity   : minor
-Frequency  : when upgrading from 1.4 while trying to change parameters
-Bugzilla   : 11692
-Description: The wrong (new) MDC name was used when setting parameters for
-	     upgraded MDT's.  Also allows changing of OSC (and MDC)
-	     parameters if --writeconf is specified at tunefs upgrade time.
-
-Severity   : major
-Frequency  : when setting specific ost indicies
-Bugzilla   : 11149
-Description: QOS code breaks on skipped indicies
-Details    : Add checks for missing OST indicies in the QOS code, so OSTs
-	     created with --index need not be sequential.
-
-Severity   : enhancement
-Bugzilla   : 11264
-Description: Add uninit_groups feature to ldiskfs2 to speed up e2fsck
-Details    : The uninit_groups feature works in conjunction with the kernel
-	     filesystem code (ldiskfs2 only) and e2fsprogs-1.39-cfs6 to speed
-	     up the pass1 processing of e2fsck.  This is a read-only feature
-	     in ldiskfs2 only, so older kernels and current ldiskfs cannot
-	     mount filesystems that have had this feature enabled.
-
-Severity   : enhancement
-Bugzilla   : 10816
-Description: Improve multi-block allocation algorithm to avoid fragmentation
-Details    : The mballoc3 code (ldiskfs2 only) adds new mechanisms to improve
-	     allocation locality and avoid filesystem fragmentation.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 14036
-Description: lfs quota fails with deactivated OSTS
-Details    : With this patch, three improvements are included:
-	     1. detete the softlimit in mds and osts when use "lfs quota".
-	     2. display the inaccurate data in the output of "lfs quota".
-	     3. try to get quota info when "lfs quota" is executed.
-
-------------------------------------------------------------------------------
-
-2007-04-01  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.10
-       * Support for kernels:
-        2.4.21-47.0.1.EL (RHEL 3)
-        2.6.5-7.283 (SLES 9)
-        2.6.9-42.0.10.EL (RHEL 4)
-        2.6.12.6 vanilla (kernel.org)
-        2.6.16.27-0.9 (SLES 10)
-       * Recommended e2fsprogs version: 1.39.cfs5
-
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel
-       * bug fixes
-
-Severity   : critical
-Frequency  : occasional, depends on client load and configuration
-Bugzilla   : 12181, 12203
-Description: data loss for recently-modified files
-Introduced : 1.4.6
-Details    : In some cases it is possible that recently written or created
-	     files may not be written to disk in a timely manner (this should
-	     normally be within 30s unless client IO load is very high).
-	     The problem appears as zero-length files or files that are a
-	     multiple of 1MB in size after a client crash or client eviction
-	     that are missing data at the end of the file.
-
-	     This problem is more likely to be hit on clients where files are
-	     repeatedly created and unlinked in the same directory, clients
-	     have a large amount of RAM, have many CPUs, the filesystem has
-	     many OSTs, the clients are rebooted frequently, and/or the files
-	     are not accessed by other nodes after being written.
-
-	     The presence of the problem can be detected by looking at
-	     /proc/sys/fs/inode-state.  If the first number (nr_inodes) is
-	     smaller than the second (nr_unused) then dirty files will not
-	     be flushed automatically to disk.  "sync; sleep 10" should be
-	     run several times on the node before unmounting it to update
-	     Lustre (this is also safe to run on nodes without this problem).
-
-	     There is also a related kernel bug in the RHEL4 4 2.6.9 kernel
-	     that can cause this same problem, so customers using that kernel
-	     also need to update the kernel in addition to Lustre.  In order
-	     to properly fix this bug, the RHEL3 2.4.21 kernel is also updated.
-
-	     It is normal that files written just before a client crash (less
-	     than 30s) may not yet have been flushed to disk, even for local
-	     filesystems.
-
-Severity   : normal
-Frequency  : frequent on thin XT3 nodes
-Bugzilla   : 10802
-Description: UUID collision on thin XT3 Linux nodes
-Details    : UUIDs on Compute Node Linux XT3 nodes were not generated
-	     randomly, since we relied on an insufficiently-seeded PRNG.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 11693
-Description: OSS hangs after "All ost request buffers busy"
-Details    : A deadlock between quota and journal operations caused OSS
-	     hangs after printing "All ost request buffers busy."
-
-Severity   : minor
-Frequency  : always on liblustre builds
-Bugzilla   : 11175
-Description: Cleanup compiler warnings on liblustre
-
-Severity   : minor
-Frequency  : always on liblustre builds on XT3
-Bugzilla   : 12146
-Description: LC_CONFIG_CDEBUG don't run while build liblustre on XT3.
-
-Frequency  : always
-Bugzilla   : 3244
-Description: Addition of EXT3_FEATURE_RO_COMPAT_DIR_NLINKS flag for
-	     > 32000 subdirectories
-Details    : Add EXT3_FEATURE_RO_COMPAT_DIR_NLINK flag to
-	     EXT3_FEATURE_RO_COMPAT_SUPP. This flag will be set whenever
-	     subdirectory count crosses 32000. This will aid e2fsck to
-	     correctly handle more than 32000 subdirectories.
-
-Severity   : major
-Frequency  : liblustre (e.g. catamount) on a large cluster with >= 8 OSTs/OSS
-Bugzilla   : 11684
-Description: System hang on startup
-Details    : This bug allowed the liblustre (e.g. catamount) client to
-	     return to the app before handling all startup RPCs.  This
-	     could leave the node unresponsive to lustre network traffic
-	     and manifested as a server ptllnd timeout.
-
-Severity   : enhancement
-Bugzilla   : 11667
-Description: Add "/proc/sys/lustre/debug_peer_on_timeout"
-	     (liblustre envirable: LIBLUSTRE_DEBUG_PEER_ON_TIMEOUT)
-	     boolean to control whether to print peer debug info when a
-	     client's RPC times out.
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 10214
-Description: make O_SYNC working on 2.6 kernels
-Details    : 2.6 kernels use different method for mark pages for write,
-	     so need add a code to lustre for O_SYNC work.
-
-Severity   : minor
-Frequency  : always
-Bugzilla   : 11110
-Description: Failure to close file and release space on NFS
-Details    : Put inode details into lock acquired in ll_intent_file_open.
-	     Use mdc_intent_lock in ll_intent_open to properly
-	     detect all kind of errors unhandled by mdc_enqueue.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 10866
-Description: proc file read during shutdown sometimes raced obd removal,
-	     causing node crash
-Details    : Add lock to prevent obd access after proc file removal.
-
-Severity   : normal
-Frequency  : Only for files larger than 4GB on 32-bit clients.
-Bugzilla   : 11237
-Description: improperly doing page alignment of locks
-Details    : Modify lustre core code to use CFS_PAGE_* defines instead of
-	     PAGE_*.  Make CFS_PAGE_MASK a 64-bit mask.
-
-Severity   : normal
-Frequency  : rarely
-Bugzilla   : 11203
-Description: RPCs being resent when they shouldn't be
-Details    : Some RPCs that should not be resent are being resent.  This
-	     can cause inconsistencies in the RPC state machine.  Do not
-	     resend such requests.
-
-Severity   : normal
-Frequency  : rare, only with NFS export
-Bugzilla   : 11669
-Description: Crash on NFS re-export node
-Details    : under very unusual load conditions an assertion is hit in
-	     ll_intent_file_open()
-
-Severity   : major
-Frequency  : only if OST filesystem is corrupted
-Bugzilla   : 9829
-Description: client incorrectly hits assertion in ptlrpc_replay_req()
-Details    : for a short time RPCs with bulk IO are in the replay list,
-	     but replay of bulk IOs is unimplemented.  If the OST filesystem
-	     is corrupted due to disk cache incoherency and then replay is
-	     started it is possible to trip an assertion.  Avoid putting
-	     committed RPCs into the replay list at all to avoid this issue.
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 10901
-Description: large O_DIRECT requests fail under memory pressure/fragmentation
-Details    : Large single O_DIRECT read and write calls can fail to allocate
-	     a sufficiently large buffer to process the request.  In case of
-	     allocation failure the allocation is retried with a smaller
-	     buffer and broken into smaller requests.
-
-Severity   : enhancement
-Bugzilla   : 11563
-Description: Add -o localflock option to simulate  old noflock behaviour.
-Details    : This will achieve local-only flock/fcntl locks coherentness.
-
-Severity   : normal
-Frequency  : always
-Bugzilla   : 11090
-Description: versioning check is incomplete
-Details    : Checking the version difference of client vs. server, report
-	     error if the gap is too big.
-
-Severity   : major
-Bugzilla   : 11710
-Frequency  : always
-Description: add support PG_writeback bit
-Details    : add support for PG_writeback bit for Lustre, for more carefull
-	     work with page cache in 2.6 kernel. This also fix some deadlocks
-	     and remove hack for work O_SYNC with 2.6 kernel.
-
-Severity   : enhancement
-Bugzilla   : 11264
-Description: Add uninit_groups feature to ldiskfs2 to speed up e2fsck
-Details    : The uninit_groups feature works in conjunction with the kernel
-	     filesystem code (ldiskfs2 only) and e2fsprogs-1.39-cfs6 to speed
-	     up the pass1 processing of e2fsck.  This is a read-only feature
-	     in ldiskfs2 only, so older kernels and current ldiskfs cannot
-	     mount filesystems that have had this feature enabled.
-
-Severity   : enhancement
-Bugzilla   : 10816
-Description: Improve multi-block allocation algorithm to avoid fragmentation
-Details    : The mballoc3 code (ldiskfs2 only) adds new mechanisms to improve
-	     allocation locality and avoid filesystem fragmentation.
-
-------------------------------------------------------------------------------
-
-2007-02-09  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.9
-       * Support for kernels:
-        2.6.9-42.0.3.EL (RHEL 4)
-        2.6.5-7.276 (SLES 9)
-        2.4.21-47.0.1.EL (RHEL 3)
-        2.6.12.6 vanilla (kernel.org)
-        2.6.16.21-0.8 (SLES10)
-       * Recommended e2fsprogs version: 1.39.cfs2-0
-
-       * The backwards-compatible /proc/sys/portals symlink has been removed
-	 in this release.  Before upgrading, please ensure that you change
-	 any configuration scripts or /etc/sysctl.conf files that access
-	 /proc/sys/portals/* or sysctl portals.* to use the corresponding
-	 entry in /proc/sys/lnet or sysctl lnet.*.  This change can be made
-	 in advance of the upgrade on any system running Lustre 1.4.6 or
-	 newer, since /proc/sys/lnet was added in that version.
-       * Note that reiserfs quotas are disabled on SLES 10 in this kernel
-       * bug fixes
-
-Severity   : minor
-Frequency  : only when quota is used
-Bugzilla   : 11286
-Description: avoid scanning export list for quota master
-Details    : Change the algorithms to avoid scanning export list in order
-	     to improve the efficiency.
-
-Severity   : critical
-Frequency  : MDS failover only, very rarely
-Bugzilla   : 11125
-Description: "went back in time" messages on mds failover
-Details    : The greatest transno may be lost when the current operation
-	     finishes with an error (transno==0) and the client's last_rcvd
-	     record is over-written. Save the greatest transno in the
-	     mds_last_transno for this case.
-
-Severity   : minor
-Frequency  : always for specific kernels and striping counts
-Bugzilla   : 11042
-Description: client may get "Matching packet too big" without ACL support
-Details    : Clients compiled without CONFIG_FS_POSIX_ACL get an error message
-	     when trying to access files in certain configurations.  The
-	     clients should in fact be denied when mounting because they do
-	     not understand ACLs.
-
-Severity   : major
-Frequency  : Cray XT3 with more than 4000 clients and multiple jobs
-Bugzilla   : 10906
-Description: many clients connecting with IO in progress causes connect timeouts
-Details    : Avoid synchronous journal commits to avoid delays caused by many
-	     clients connecting/disconnecting when bulk IO is in progress.
-	     Queue liblustre connect requests on OST_REQUEST_PORTAL instead of
-	     OST_IO_PORTAL to avoid delays behind potentially many pending
-	     slow IO requests.
-
-Severity   : normal
-Frequency  : occasionally with multiple writers to a single file
-Bugzilla   : 11081
-Description: shared writes to file may result in wrong size reported by stat()
-Details    : Allow growing of kms when extent lock is cancelled
-
-Severity   : minor
-Frequency  : always with random mmap IO to multi-striped file
-Bugzilla   : 10919
-Description: mmap write might be lost if we are writing to a 'hole' in stripe
-Details    : Only if the hole is at the end of OST object so that kms is too
-	     small. Fix is to increase kms accordingly in ll_nopage.
-
-Severity   : normal
-Frequency  : rare, only if OST filesystem is inconsistent with MDS filesystem
-Bugzilla   : 11211
-Description: writes to a missing object would leak memory on the OST
-Details    : If there is an inconsistency between the MDS and OST filesystems,
-	     such that the MDS references an object that doesn't exist, writes
-	     to that object will leak memory due to incorrect cleanup in the
-	     error handling path, eventually running out of memory on the OST.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 11040
-Description: Creating too long symlink causes lustre errors
-Details    : Check symlink and name lengths before sending requests to MDS.
-
-Severity   : normal
-Frequency  : only if flock is enabled (not on by default)
-Bugzilla   : 11415
-Description: posix locks not released on fd closure on 2.6.9+
-Details    : We failed to add posix locks to list of inode locks on 2.6.9+
-	     kernels, this caused such locks not to be released on fd close and
-	     then assertions on fs unmount about still used locks.
-
-Severity   : minor
-Frequency  : MDS failover only, very rarely
-Bugzilla   : 11277
-Description: clients may get ASSERTION(granted_lock != NULL)
-Details    : When request was taking a long time, and a client was resending
-	     a getattr by name lock request. The were multiple lock requests
-	     with the same client lock handle and
-	     mds_getattr_name->fixup_handle_for_resent_request found one of the
-	     lock handles but later failed with ASSERTION(granted_lock != NULL).
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 10891
-Description: handle->h_buffer_credits > 0, assertion failure
-Details    : h_buffer_credits is zero after truncate, causing assertion
-	     failure.  This patch extends the transaction or creates a new
-	     one after truncate.
-
-Severity   : normal
-Frequency  : NFS re-export or patchless client
-Bugzilla   : 11179, 10796
-Description: Crash on NFS re-export node (__d_move)
-Details    : We do not want to hash the dentry if we don't have a lock.
-	     But if this dentry is later used in d_move, we'd hit uninitialised
-	     list head d_hash, so we just do this to init d_hash field but
-	     leave dentry unhashed.
-
-Severity   : normal
-Frequency  : NFS re-export or patchless client
-Bugzilla   : 11135
-Description: NFS exports has problem with symbolic link
-Details    : lustre client didn't properly install dentry when re-exported
-	     to NFS or running patchless client.
-
-Severity   : normal
-Frequency  : NFS re-export or patchless client
-Bugzilla   : 10796
-Description: Various nfs/patchless fixes.
-Details    : fixes reuse disconected alias for lookup process - this fixes
-	     warning "find_exported_dentry: npd != pd",
-	     fix permission error with open files at nfs.
-	     fix apply umask when do revalidate.
-
-Severity   : normal
-Frequency  : occasional
-Bugzilla   : 11191
-Description: Crash on NFS re-export node
-Details    : calling clear_page() on the wrong pointer triggered oops in
-	     generic_mapping_read().
-
-Severity   : normal
-Frequency  : rarely, using O_DIRECT IO
-Bugzilla   : 10903
-Description: unaligned directio crashes client with LASSERT
-Details    : check for unaligned buffers before trying any requests.
-
-Severity   : major
-Frequency  : rarely, using CFS RAID5 patches in non-standard kernel series
-Bugzilla   : 11313
-Description: stale data returned from RAID cache
-Details    : If only a small amount of IO is done to the RAID device before
-	     reading it again it is possible to get stale data from the RAID
-	     cache instead of reading it from disk.
-
-Severity   : normal
-Frequency  : always for sles10 kernel
-Bugzilla   : 10947
-Description: sles10 support
-Details    : ll_follow_link: compile fixes and using of nd_set_link
-	     under newer kernels.
-
-Severity   : major
-Frequency  : depends on arch, kernel and compiler version, always on sles10
-	     kernel and x86_64
-Bugzilla   : 11562
-Description: recursive or deep enough symlinks cause stack overflow
-Details    : getting rid of large stack-allocated variable in
-	     __vfs_follow_link
-
-Severity   : minor
-Frequency  : depends on hardware
-Bugzilla   : 11540
-Description: lustre write performance loss in the SLES10 kernel
-Details    : the performance loss is caused by using of write barriers in the
-	     ext3 code. The SLES10 kernel turns barrier support on by
-	     default. The fix is to undo that change for ldiskfs.
-
-------------------------------------------------------------------------------
-
-2006-12-09  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.8
-       * Support for kernels:
-        2.6.9-42.0.3EL (RHEL 4)
-        2.6.5-7.276 (SLES 9)
-        2.4.21-47.0.1.EL (RHEL 3)
-        2.6.12.6 vanilla (kernel.org)
-       * bug fixes
-
-Severity   : major
-Frequency  : quota enabled and large files being deleted
-Bugzilla   : 10707
-Description: releasing more than 4GB of quota at once hangs OST
-Details    : If a user deletes more than 4GB of files on a single OST it
-	     will cause the OST to spin in an infinite loop.  Release
-	     quota in < 4GB chunks, or use a 64-bit value for 1.4.7.1+.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10845
-Description: statfs data retrieved from /proc may be stale or zero
-Details    : When reading per-device statfs data from /proc, in the
-	     {kbytes,files}_{total,free,avail} files, it may appear
-	     as zero or be out of date.
-
-Severity   : minor
-Frequency  : systems with MD RAID1 external journal devices
-Bugzilla   : 10832
-Description: lconf's call to blkid is confused by RAID1 journal devices
-Details    : Use the "blkid -l" flag to locate the MD RAID device instead
-	     of returning all block devices that match the journal UUID.
-
-Severity   : normal
-Frequency  : always, for aggregate stripe size over 4GB
-Bugzilla   : 10725
-Description: "lfs setstripe" fails assertion when setting 4GB+ stripe width
-Details    : Using "lfs setstripe" to set stripe size * stripe count over 4GB
-	     will fail the kernel with "ASSERTION(lsm->lsm_xfersize != 0)"
-
-Severity   : minor
-Frequency  : always if "lfs find" used on a local file/directory
-Bugzilla   : 10864
-Description: "lfs find" segfaults if used on a local file/directory
-Details    : The case where a directory component was not specified wasn't
-	     handled correctly.  Handle this properly.
-
-Severity   : normal
-Frequency  : always on ppc64
-Bugzilla   : 10634
-Description: the write to an ext3 filesystem mounted with mballoc got stuck
-Details    : ext3_mb_generate_buddy() uses find_next_bit() which does not
-	     perform endianness conversion.
-
-Severity   : major
-Frequency  : rarely (truncate to non-zero file size after write under load)
-Bugzilla   : 10730, 10687
-Description: Files padded with zeros to next 4K multiple
-Details    : With filesystems mounted using the "extents" option (2.6 kernels)
-	     it is possible that files that are truncated to a non-zero size
-	     immediately after being written are filled with zero bytes beyond
-	     the truncated size.  No file data is lost.
-
-Severity   : enhancement
-Bugzilla   : 10452
-Description: Allow recovery/failover for liblustre clients.
-Details    : liblustre clients were unaware of failover configurations until
-	     now.
-
-Severity   : enhancement
-Bugzilla   : 10743
-Description: user file locks should fail when not mounting with flock option
-Details    : Set up an error-returning stub in ll_file_operations.lock field
-	     to prevent incorrect behaviour when client is mounted without
-	     flock option. Also, set up properly f_op->flock field for
-	     RHEL4 kernels.
-
-Severity   : minor
-Frequency  : always on ia64
-Bugzilla   : 10905
-Description: "lfs df" loops on printing out MDS statfs information
-Details    : The obd_ioctl_data was not initialized and in some systems
-	     this caused a failure during the ioctl that did not return
-	     an error.  Initialize the struct and return an error on failure.
-
-Severity   : minor
-Frequency  : SLES 9 only
-Bugzilla   : 10667
-Description: Error of copying files with lustre special EAs as root
-Details    : Client side always return success for setxattr call for lustre
-	     special xattr (currently only "trusted.lov").
-
-Severity   : normal
-Frequency  : rarely on clusters with both ia64+i386 clients
-Bugzilla   : 10672
-Description: ia64+i686 clients doing shared IO on the same file may LBUG
-Details    : In rare cases when both ia64+i686 (or other mixed-PAGE_SIZE)
-	     clients are doing concurrent writes to the same file it is
-	     possible that the ia64 clients may LASSERT because the OST
-	     extent locks are not PAGE_SIZE aligned.  Ensure that grown
-	     locks are always aligned on the request boundary.
-
-Severity   : normal
-Frequency  : specific use, occasional
-Bugzilla   : 7040
-Description: Overwriting in use executable truncates on-disk binary image
-Details    : If one node attempts to overwrite an executable in use by
-	     another node, we now correctly return ETXTBSY instead of
-	     truncating the file.
-
-Severity   : enhancement
-Bugzilla   : 4900
-Description: Async OSC create to avoid the blocking unnecessarily.
-Details    : If a OST has no remain object, system will block on the creating
-	     when need to create a new object on this OST. Now, ways use
-	     pre-created objects when available, instead of blocking on an
-	     empty osc while others are not empty.  If we must block, we block
-	     for the shortest possible period of time.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 2707
-Description: chmod on Lustre root is propagated to other clients
-Details    : Re-validate root's dentry in ll_lookup_it to avoid having it
-	     invalid by the follow_mount time.
-
-Severity   : minor
-Frequency  : liblustre clients only
-Bugzilla   : 10883
-Description: Race in 'instant cancel' lock handling could lead to such locks
-	     never to be granted in case of SMP MDS
-Details    : Do not destroy not yet granted but cbpending locks in
-	     handle_enqueue
-
-Severity   : minor
-Frequency  : replay/resend of open
-Bugzilla   : 10991
-Description: non null lock assetion failure in mds_intent_policy
-Details    : Trying to replay/resend lockless open requests resulted in
-	     mds_open() returning 0 with no lock.  Now it sets a flag if
-	     a lock is going to be returned.
-
-Severity   : enhancement
-Bugzilla   : 10889
-Description: Checksum enhancements
-Details    : New checksum enhancements allow for resending RPCs that failed
-	     checksum checks.
-
-Severity   : enhancement
-Bugzilla   : 7376
-Description: Tunables on number of dirty pages in cacche
-Details    : Allow to set limit on number of dirty pages cached.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 10643
-Description: client crash on unmount - lock still has references
-Details    : In some error handling cases it was possible to leak a lock
-	     reference on a client while accessing a file.  This was not
-	     harmful to the client during operation, but would cause the
-	     client to crash when the filesystem is unmounted.
-
-Severity   : normal
-Frequency  : specific case, rare
-Bugzilla   : 10921
-Description: ETXTBSY on mds though file not in use by client
-Details    : ETXTBSY is no longer incorrectly returned when attempting to
-	     chmod or chown a directory that the user previously tried to
-	     execute or a currently-executing binary.
-
-Severity   : major
-Frequency  : extremely rare except on liblustre-based clients
-Bugzilla   : 10480
-Description: Lustre space not freed when files are deleted
-Details    : Clean up open-unlinked files after client eviction.  Previously
-	     the unlink was skipped and the files remained as orphans.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 10999
-Description: OST failure "would be an LBUG" in waiting_locks_callback()
-Details    : In some cases it was possible to send a blocking callback to
-	     a client doing a glimpse, even though that client didn't get
-	     a lock granted.  When the glimpse lock is cancelled on the OST
-	     the freed lock is left on the waiting list and corrupted the list.
-
-Severity   : major
-Frequency  : all core dumps
-Bugzilla   : 11103
-Description: Broke core dumps to lustre
-Details    : Negative dentry may be unhashed if parent does not have UPDATE
-	     lock, but some callers, e.g. do_coredump, expect dentry to be
-	     hashed after successful create, hash it in ll_create_it.
-
-------------------------------------------------------------------------------
-
-2006-09-13  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.7.1
-       * Support for kernels:
-        2.6.9-42.0.2.EL (RHEL 4)
-        2.6.5-7.276 (SLES 9)
-        2.4.21-40.EL (RHEL 3)
-        2.6.12.6 vanilla (kernel.org)
-      * bug fix
-
-Severity   : major
-Frequency  : always on RHEL 3
-Bugzilla   : 10867
-Description: Number of open files grows over time
-Details    : The number of open files grows over time, whether or not
-	     Lustre is started.  This was due to a filp leak introduced
-	     by one of our kernel patches.
-
-------------------------------------------------------------------------------
-
-2006-08-20  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.7
-       * Support for kernels:
-        2.6.9-42.EL (RHEL 4)
-        2.6.5-7.267 (SLES 9)
-        2.4.21-40.EL (RHEL 3)
-        2.6.12.6 vanilla (kernel.org)
-       * bug fixes
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 5719, 9635, 9792, 9684
-Description: OST (or MDS) trips assertions in (re)connection under heavy load
-Details    : If a server is under heavy load and cannot reply to new
-	     connection requests before the client resends the (re)connect,
-	     the connection handling code can behave badly if two service
-	     threads are concurrently handing separate (re)connections from
-	     the same client.  Add better locking to the connection handling
-	     code, and ensure that only a single connection will be processed
-	     for a given client UUID, even if the lock is dropped.
-
-Severity   : enhancement
-Bugzilla   : 3627
-Description: add TCP zero-copy support to kernel
-Details    : Add support to the kernel TCP stack to allow zero-copy bulk
-	     sends if the hardware supports scatter-gather and checksumming.
-	     This allows socklnd to do client-write and server-read more
-	     efficiently and reduce CPU utilization from skbuf copying.
-
-Severity   : minor
-Frequency  : only if NFS exporting from client
-Bugzilla   : 10258
-Description: NULL pointer deref in ll_iocontrol() if chattr mknod file
-Details    : If setting attributes on a file created under NFS that had
-	     never been opened it would be possible to oops the client
-	     if the file had no objects.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 9326, 10402, 10897
-Description: client crash in ptlrpcd_wake() thread when sending async RPC
-Details    : It is possible that ptlrpcd_wake() dereferences a freed async
-	     RPC.  In rare cases the ptlrpcd thread alread processed the RPC
-	     before ptlrpcd_wake() was called and the request was freed.
-
-Severity   : minor
-Frequency  : always for liblustre
-Bugzilla   : 10290
-Description: liblustre client does MDS+OSTs setattr RPC for each write
-Details    : When doing a write from a liblustre client, the client
-	     incorrectly issued an RPC to the MDS and each OST the file was
-	     striped over in order to update the timestamps.  When writing
-	     with small chunks and many clients this could overwhelm the MDS
-	     with RPCs.  In all cases it would slow down the write because
-	     these RPCs are unnecessary.
-
-Severity   : enhancement
-Bugzilla   : 9340
-Description: allow number of MDS service threads to be changed at module load
-Details    : It is now possible to change the number of MDS service threads
-	     running.  Adding "options mds mds_num_threads={N}" to the MDS's
-	     /etc/modprobe.conf will set the number of threads for the next
-	     time Lustre is restarted (assuming the "mds" module is also
-	     reloaded at that time).  The default number of threads will
-	     stay the same, 32 for most systems.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 10300
-Description: OST crash if filesystem is unformatted or corrupt
-Details    : If an OST is started on a device that has never been formatted
-	     or if the filesystem is corrupt and cannot even mount then the
-	     error handling cleanup routines would dereference a NULL pointer.
-
-Severity   : normal
-Frequency  : rare
-Bugzilla   : 10047
-Description: NULL pointer deref in llap_from_page.
-Details    : get_cache_page_nowait can return a page with NULL (or otherwise
-	     incorrect) mapping if the page was truncated/reclaimed while it was
-	     searched for. Check for this condition and skip such pages when
-	     doing readahead. Introduce extra check to llap_from_page() to
-	     verify page->mapping->host is non-NULL (so page is not anonymous).
-
-Severity   : minor
-Frequency  : Sometimes when using sys_sendfile
-Bugzilla   : 7020
-Description: "page not covered by a lock" warnings from ll_readpage
-Details    : sendfile called ll_readpage without right page locks present.
-	     Now we introduced ll_file_sendfile that does necessary locking
-	     around call to generic_file_sendfile() much like we do in
-	     ll_file_read().
-
-Severity   : normal
-Frequency  : with certain MDS communication failures at client mount time
-Bugzilla   : 10268
-Description: NULL pointer deref after failed client mount
-Details    : a client connection request may delayed by the network layer
-	     and not be sent until after the PTLRPC layer has timed out the
-	     request.  If the client fails the mount immediately it will try
-	     to clean up before the network times out the request.  Add a
-	     reference from the request import to the obd device and delay
-	     the cleanup until the network drops the request.
-
-Severity   : normal
-Frequency  : occasionally during client (re)connect
-Bugzilla   : 9387
-Description: assertion failure during client (re)connect
-Details    : processing a client connection request may be delayed by the
-	     client or server longer than the client connect timeout.  This
-	     causes the client to resend the connection request.  If the
-	     original connection request is replied in this interval, the
-	     client may trip an assertion failure in ptlrpc_connect_interpret()
-	     which thought it would be the only running connect process.
-
-Severity   : normal
-Frequency  : only with obd_echo servers and clients that are rebooted
-Bugzilla   : 10140
-Description: kernel BUG accessing uninitialized data structure
-Details    : When running an obd_echo server it did not start the ping_evictor
-	     thread, and when a client was evicted an uninitialized data
-	     structure was accessed.  Start the ping_evictor in the RPC
-	     service startup instead of the OBD startup.
-
-Severity   : enhancement
-Bugzilla   : 10193 (patchless)
-Description: Remove dependency on various unexported kernel interfaces.
-Details    : No longer need reparent_to_init, exit_mm, exit_files,
-	     sock_getsockopt, filemap_populate, FMODE_EXEC, put_filp.
-
-Severity   : minor
-Frequency  : rare (only users of deprecated and unsupported LDAP config)
-Bugzilla   : 9337
-Description: write_conf for zeroconf mount queried LDAP incorrectly for client
-Details    : LDAP apparently contains 'lustreName' attributes instead of
-	     'name'.  A simple remapping of the name is sufficient.
-
-Severity   : major
-Frequency  : rare (only with non-default dump_on_timeout debug enabled)
-Bugzilla   : 10397
-Description: waiting_locks_callback trips kernel BUG if client is evicted
-Details    : Running with the dump_on_timeout debug flag turned on makes
-	     it possible that the waiting_locks_callback() can try to dump
-	     the Lustre kernel debug logs from an interrupt handler.  Defer
-	     this log dumping to the expired_lock_main() thread.
-
-Severity   : enhancement
-Bugzilla   : 10420
-Description: Support NFS exporting on 2.6 kernels.
-Details    : Implement non-rawops metadata methods for NFS server to use without
-	     changing NFS server code.
-
-Severity   : normal
-Frequency  : very rare (synthetic metadata workload only)
-Bugzilla   : 9974
-Description: two racing renames might cause an MDS thread to deadlock
-Details    : Running the "racer" program may cause one MDS thread to rename
-	     a file from being the source of a rename to being the target of
-	     a rename at exactly the same time that another thread is doing
-	     so, and the second thread has already enqueued these locks after
-	     doing a lookup of the target and is trying to relock them in
-	     order.  Ensure that we don't try to re-lock the same resource.
-
-Severity   : major
-Frequency  : only very large systems with liblustre clients
-Bugzilla   : 7304
-Description: slow eviction of liblustre clients with the "evict_by_nid" RPC
-Details    : Use asynchronous set_info RPCs to send the "evict_by_nid" to
-	     all OSTs in parallel.  This allows the eviction of stale liblustre
-	     clients to proceed much faster than if they were done in series,
-	     and also offers similar improvements for other set_info RPCs.
-
-Severity   : minor
-Frequency  : common
-Bugzilla   : 10265
-Description: excessive CPU usage during initial read phase on client
-Details    : During the initial read phase on a client, it would agressively
-	     retry readahead on the file, consuming too much CPU and impacting
-	     performance (since 1.4.5.8).  Improve the readahead algorithm
-	     to avoid this, and also improve some other common cases (read
-	     of small files in particular, where "small" is files smaller than
-	     /proc/fs/lustre/llite/*/max_read_ahead_whole_mb, 2MB by default).
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10450
-Description: MDS crash when receiving packet with unknown intent.
-Details    : Do not LBUG in unknown intent case, just return -EFAULT
-
-Severity   : enhancement
-Bugzilla   : 9293, 9385
-Description: MDS RPCs are serialised on client. This is unnecessary for some.
-Details    : Do not serialize getattr (non-intent version) and statfs.
-
-Severity   : minor
-Frequency  : occasional, when OST network is overloaded/intermittent
-Bugzilla   : 10416
-Description: client evicted by OST after bulk IO timeout
-Details    : If a client sends a bulk IO request (read or write) the OST
-	     may evict the client if it is unresposive to its data GET/PUT
-	     request.  This is incorrect if the network is overloaded (takes
-	     too long to transfer the RPC data) or dropped the OST GET/PUT
-	     request.  There is no need to evict the client at all, since
-	     the pinger and/or lock callbacks will handle this, and the
-	     client can restart the bulk request.
-
-Severity   : minor
-Frequency  : Always when mmapping file with no objects
-Bugzilla   : 10438
-Description: client crashes when mmapping file with no objects
-Details    : Check that we actually have objects in a file before doing any
-	     operations on objects in ll_vm_open, ll_vm_close and
-	     ll_glimpse_size.
-
-Severity   : minor
-Frequency  : Rare
-Bugzilla   : 10484
-Description: Request leak when working with deleted CWD
-Details    : Introduce advanced request refcount tracking for requests
-	     referenced from lustre intent.
-
-Severity   : Enhancement
-Bugzilla   : 10482
-Description: Cache open file handles on client.
-Details    : MDS now will return special lock along with openhandle, if
-	     requested and client is allowed to hold openhandle, even if unused,
-	     until such a lock is revoked. Helps NFS a lot, since NFS is opening
-	     closing files for every read/write openration.
-
-Severity   : Enhancement
-Bugzilla   : 9291
-Description: Cache open negative dentries on client when possible.
-Details    : Guard negative dentries with UPDATE lock on parent dir, drop
-	     negative dentries on lock revocation.
-
-Severity   : minor
-Frequency  : Always
-Bugzilla   : 10510
-Description: Remounting a client read-only wasn't possible with a zconf mount
-Details    : It wasn't possible to remount a client read-only with llmount.
-
-Severity   : enhancement
-Description: Include MPICH 1.2.6 Lustre ADIO interface patch
-Details    : In lustre/contrib/ or /usr/share/lustre in RPM a patch for
-	     MPICH is included to add Lustre-specific ADIO interfaces.
-	     This is based closely on the UFS ADIO layer and only differs
-	     in file creation, in order to allow the OST striping to be set.
-	     This is user-contributed code and not supported by CFS.
-
-Severity   : minor
-Frequency  : Always
-Bugzilla   : 9486
-Description: extended inode attributes (immutable, append-only) work improperly
-	     when 2.4 and 2.6 kernels are used on client/server or vice versa
-Details    : Introduce kernel-independent values for these flags.
-
-Severity   : enhancement
-Frequency  : Always
-Bugzilla   : 10248
-Description: Allow fractional MB tunings for lustre in /proc/ filesystem.
-Details    : Many of the /proc/ tunables can only be tuned at a megabyte
-	     granularity. Now, Fractional MB granularity is be supported,
-	     this is very useful for low memory system.
-
-Severity   : enhancement
-Bugzilla   : 9292
-Description: Getattr by fid
-Details    : Getting a file attributes by its fid, obtaining UPDATE|LOOKUP
-	     locks, avoids extra getattr rpc requests to MDS, allows '/' to
-	     have locks and avoids getattr rpc requests for it on every stat.
-
-Severity   : major
-Frequency  : Always, for filesystems larger than 2TB
-Bugzilla   : 6191
-Description: ldiskfs crash at mount for filesystem larger than 2TB with mballoc
-Details    : Kenrel kmalloc limits allocations to 128kB and this prevents
-	     filesystems larger than 2TB to be mounted with mballoc enabled.
-
-Severity   : critical
-Frequency  : Always, for 32-bit kernel without CONFIG_LBD and filesystem > 2TB
-Bugzilla   : 6191
-Description: filesystem corruption for non-standard kernels and very large OSTs
-Details    : If a 32-bit kernel is compiled without CONFIG_LBD enabled and a
-	     filesystems larger than 2TB is mounted then the kernel will
-	     silently corrupt the start of the filesystem.  CONFIG_LBD is
-	     enabled for all CFS-supported kernels, but the possibility of
-	     this happening with a modified kernel config exists.
-
-Severity   : enhancement
-Bugzilla   : 10462
-Description: add client O_DIRECT support for 2.6 kernels
-Details    : It is now possible to do O_DIRECT reads and writes to files
-	     in the Lustre client mountpoint on 2.6 kernel clients.
-
-Severity   : enhancement
-Bugzilla   : 10446
-Description: parallel glimpse, setattr, statfs, punch, destroy requests
-Details    : Sends glimpse, setattr, statfs, punch, destroy requests to OSTs in
-	     parallel, not waiting for response from every OST before sending
-	     a rpc to the next OST.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10150
-Description: setattr vs write race when updating file timestamps
-Details    : Client processes that update a file timestamp into the past
-	     right after writing to the file (e.g. tar) it is possible that
-	     the updated file modification time can be reset to the current
-	     time due to a race between processing the setattr and write RPC.
-
-Severity   : enhancement
-Bugzilla   : 10318
-Description: Bring 'lfs find' closer in line with regular Linux find.
-Details    : lfs find util supports -atime, -mtime, -ctime, -maxdepth, -print,
-	     -print0 options and obtains all the needed info through the lustre
-	     ioctls.
-
-Severity   : enhancement
-Bugzilla   : 6221
-Description: support up to 1024 configured devices on one node
-Details    : change obd_dev array from statically allocated to dynamically
-	     allocated structs as they are first used to reduce memory usage
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10437
-Description: Flush dirty partially truncated pages during truncate
-Details    : Immediatelly flush partially truncated pages in filter_setattr,
-	     this way we completely avoid having any pages in page cache on OST
-	     and can retire ugly workarounds during writes to flush such pages.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10409
-Description: i_sem vs transaction deadlock in mds_obd_destroy during unlink.
-Details    : protect inode from truncation within vfs_unlink() context
-	     just take a reference before calling vfs_unlink() and release it
-	     when parent's i_sem is free.
-
-Severity   : minor
-Frequency  : always, if extents are used on OSTs
-Bugzilla   : 10703
-Description: index ei_leaf_hi (48-bit extension) is not zeroed in extent index
-Details    : OSTs using the extents format would not zero the high 16 bits of
-	     the index physical block number.  This is not a problem for any
-	     OST filesystems smaller than 16TB, and no kernels support ext3
-	     filesystems larger than 16TB yet.  This is fixed in 1.4.7 (all
-	     new/modified files) and can be fixed for existing filesystems
-	     with e2fsprogs-1.39-cfs1.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 9387
-Description: import connection selection may be incorrect if timer wraps
-Details    : Using a 32-bit jiffies timer with HZ=1000 may cause backup
-	     import connections to be ignored if the 32-bit jiffies counter
-	     wraps.  Use a 64-bit jiffies counter.
-
-Severity   : major
-Frequency  : during server recovery
-Bugzilla   : 10479
-Description: crash after server is denying duplicate export
-Details    : If clients are resending connect requests to the server, the
-	     server refuses to allow a client to connect multiple times.
-	     Fixed a bug in the handling of this case.
-
-Severity   : minor
-Frequency  : very large clusters immediately after boot
-Bugzilla   : 10083
-Description: LNET request buffers exhausted under heavy short-term load
-Details    : If a large number of client requests are generated on a service
-	     that has previously never seen so many requests it is possible
-	     that the request buffer growth cannot keep up with the spike in
-	     demand.  Instead of dropping incoming requests, they are held in
-	     the LND until the RPC service can accept more requests.
-
-Severity   : minor
-Frequency  : Sometimes during replay
-Bugzilla   : 9314
-Description: Assertion failure in ll_local_open after replay.
-Details    : If replay happened on an open request reply before we were able
-	     to set replay handler, reply will become not swabbed tripping the
-	     assertion in ll_local_open. Now we set the handler right after
-	     recognising of open request
-
-Severity   : minor
-Frequency  : very rare
-Bugzilla   : 10584
-Description: kernel reports "badness in vsnprintf"
-Details    : Reading from the "recovery_status" /proc file in small chunks
-	     may cause a negative length in lprocfs_obd_rd_recovery_status()
-	     call to vsnprintf() (which is otherwise harmless).  Exit early
-	     if there is no more space in the output buffer.
-
-Severity   : enhancement
-Bugzilla   : 2259
-Description: clear OBD RPC statistics by writing to them
-Details    : It is now possible to clear the OBD RPC statistics by writing
-	     to the "stats" file.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10641
-Description: Client mtime is not the same on different clients after utimes
-Details    : In some cases, the client was using the utimes() syscall on
-	     a file cached on another node.  The clients now validate the
-	     ctime from the MDS + OSTs to determine which one is right.
-
-Severity   : minor
-Frequency  : always
-Bugzilla   : 10611
-Description: Inability to activate failout mode
-Details    : lconf script incorrectly assumed that in python string's numeric
-	     value is used in comparisons.
-
-Severity   : minor
-Frequency  : always with multiple stripes per file
-Bugzilla   : 10671
-Description: Inefficient object allocation for mutli-stripe files
-Details    : When selecting which OSTs to stripe files over, for files with
-	     a stripe count that divides evenly into the number of OSTs,
-	     the MDS is always picking the same starting OST for each file.
-	     Return the OST selection heuristic to the original design.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 10673
-Description: mount failures may take full timeout to return an error
-Details    : Under some heavy load conditions it is possible that a
-	     failed mount can wait for the full obd_timeout interval,
-	     possibly several minutes, before reporting an error.
-	     Instead return an error as soon as the status is known.
-
-------------------------------------------------------------------------------
-
-2006-02-14  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.6
-       * WIRE PROTOCOL CHANGE.  This version of Lustre networking WILL NOT
-	 INTEROPERATE with older versions automatically.  Please read the
-	 user documentation before upgrading any part of a live system.
-       * WARNING: Lustre networking configuration changes are required with
-	 this release.  See https://bugzilla.clusterfs.com/show_bug.cgi?id=10052
-	 for details.
-       * bug fixes
-       * Support for kernels:
-	2.6.9-22.0.2.EL (RHEL 4)
-	2.6.5-7.244 (SLES 9)
-	2.6.12.6 vanilla (kernel.org)
-
-
-Severity   : enhancement
-Bugzilla   : 7981/8208
-Description: Introduced Lustre Networking (LNET)
-Details    : LNET is new networking infrastructure for Lustre, it includes
-	     a reorganized network configuration mode (see the user
-	     documentation for full details) as well as support for routing
-	     between different network fabrics.  Lustre Networking Devices
-	     (LNDs) for the supported network fabrics have also been
-	     created for this new infrastructure.
-
-Severity   : enhancement
-Description: Introduced Access control lists
-Details    : clients can set ACLs on files and directories in order to have
-	     more fine-grained permissions than the standard Unix UGO+RWX.
-	     The MDS must be started with the "-o acl" mount option.
-
-Severity   : enhancement
-Description: Introduced filesystem quotas
-Details    : Administrators may now establish per-user quotas on the
-	     filesystem.
-
-Severity   : enhancement
-Bugzilla   : 7982
-Description: Configuration change for the XT3
-	     The PTLLND is now used to run Lustre over Portals on the XT3
-	     The configure option(s) --with-cray-portals are no longer used.
-	     Rather --with-portals=<path-to-portals-includes> is used to
-	     enable building on the XT3.  In addition to enable XT3 specific
-	     features the option --enable-cray-xt3 must be used.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 7407
-Description: Running on many-way SMP OSTs can trigger oops in llcd_send()
-Details    : A race between allocating a new llcd and re-getting the llcd_lock
-	     allowed another thread to grab newly-allocated llcd.
-
-Severity   : enhancement
-Bugzilla   : 7116
-Description: 2.6 OST async journal commit and locking fix to improve performance
-Details    : The filter_direct_io()+filter_commitrw_write() journal commits for
-	     2.6 kernels are now async as they already were in 2.4 kernels so
-	     that they can commit concurrently with the network bulk transfer.
-	     For block-allocated files the filter allocation semaphore is held
-	     to avoid filesystem fragmentation during allocation.  BKL lock
-	     removed for 2.6 xattr operations where it is no longer needed.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 8320
-Description: lconf incorrectly determined whether two IP networks could talk
-Details    : In some more complicated routing and multiple-network
-	     configurations, lconf will avoid trying to make a network
-	     connection to a disjoint part of the IP space.  It was doing the
-	     math incorrectly for one set of cases.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 7359
-Description: Fix for potential infinite loop processing records in an llog.
-Details    : If an llog record is corrupted/zeroed, it is possible to loop
-	     forever in llog_process().  Validate the llog record length
-	     and skip the remainder of the block on error.
-
-Severity   : minor
-Frequency  : occasional (liblustre only)
-Bugzilla   : 6363
-Description: liblustre could not open files whose last component is a symlink
-Details    : sysio_path_walk() would incorrectly pass the open intent to
-	     intermediate path components.
-
-Severity   : minor
-Frequency  : rare (liblustre only with non-standard tuning)
-Bugzilla   : 7201 (7350)
-Description: Tuning the MDC DLM LRU size to zero triggers client LASSERT
-Details    : llu_lookup_finish_locks() tries to set lock data on a lock
-	     after it has been released, only do this for referenced locks
-
-Severity   : enhancement
-Bugzilla   : 7328
-Description: specifying an (invalid) directory default stripe_size of -1
-	     would reset the directory default striping
-Details    : stripe_size -1 was used internally to signal directory stripe
-	     removal, now use "all default" to signal dir stripe removal
-	     as a directory striping of "all default" is not useful
-
-Severity   : minor
-Frequency  : common for large clusters running liblustre clients
-Bugzilla   : 7198
-Description: doing an ls when liblustre clients are running is slow
-Details    : sending a glimpse AST to a liblustre client waits for every AST
-	     to time out, as liblustre clients will not respond.  Since they
-	     cannot cache data we refresh the OST lock LVB from disk instead.
-
-Severity   : enhancement
-Bugzilla   : 7198
-Description: doing an ls at the same time as file IO can be slow
-Details    : enqueue and other "small" requests can be blocked behind many
-	     large IO requests.  Create a new OST IO portal for non-IO
-	     requests so they can be processed faster.
-
-Severity   : minor
-Frequency  : rare (only HPUX clients mounting unsupported re-exported NFS vol)
-Bugzilla   : 5781
-Description: an HPUX NFS client would get -EACCESS when ftruncate()ing a newly
-	     created file with mode 000
-Details    : the Linux NFS server relies on an MDS_OPEN_OWNEROVERRIDE hack to
-	     allow an ftruncate() as a non-root user to a file with mode 000.
-	     Lustre now respects this flag to disable mode checks when
-	     truncating a file owned by the user
-
-Severity   : minor
-Frequency  : liblustre-only, when liblustre client dies unexpectedly or becomes
-	     busy
-Bugzilla   : 7313
-Description: Revoking locks from clients that went dead or catatonic might take
-	     a lot of time.
-Details    : New lock flags FL_CANCEL_ON_BLOCK used by liblustre makes
-	     cancellation of such locks instant on servers without waiting for
-	     any reply from clients. Clients drops these locks when cancel
-	     notification from server is received without replying.
-
-Severity   : minor
-Frequency  : liblustre-only, when liblustre client dies or becomes busy
-Bugzilla   : 7311
-Description: Doing ls on Linux clients can take a long time with active
-	     liblustre clients
-Details    : Liblustre client cannot handle ASTs in timely manner, so avoid
-	     granting such locks to it in the first place if possible.  Locks
-	     are taken by proxy on the OST during the read or write and
-	     dropped immediately afterward.  Add connect flags handling, do
-	     not grant locks to liblustre clients for glimpse ASTs.
-
-Severity   : enhancement
-Bugzilla   : 6252
-Description: Improve read-ahead algorithm to avoid excessive IO for random reads
-Details    : Existing read-ahead algorithm is tuned for the case of streamlined
-	     sequential reads and behaves badly with applications doing random
-	     reads.  Improve it by reading ahead at least read region, and
-	     avoiding excessive large RPC for small reads.
-
-Severity   : enhancement
-Bugzilla   : 8330
-Description: Creating more than 1000 files for a single job may cause a load
-	     imbalance on the OSTs if there are also a large number of OSTs.
-Details    : qos_prep_create() uses an OST index reseed value that is an
-	     even multiple of the number of available OSTs so that if the
-	     reseed happens in the middle of the object allocation it will
-	     still utilize the OSTs as uniformly as possible.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 8322
-Description: OST or MDS may oops in ping_evictor_main()
-Details    : ping_evictor_main() drops obd_dev_lock if deleting a stale export
-	     but doesn't restart at beginning of obd_exports_timed list
-	     afterward.
-
-Severity   : enhancement
-Bugzilla   : 7304
-Description: improve by-nid export eviction on the MDS and OST
-Details    : allow multiple exports with the same NID to be evicted at one
-	     time without re-searching the exports list.
-
-Severity   : major
-Frequency  : rare, only with supplementary groups enabled on SMP 2.6 kernels
-Bugzilla   : 7273
-Description: MDS may oops in groups_free()
-Details    : in rare race conditions a newly allocated group_info struct is
-	     freed again, and this can be NULL.  The 2.4 compatibility code
-	     for groups_free() checked for a NULL pointer, but 2.6 did not.
-
-Severity   : minor
-Frequency  : common for liblustre clients doing little filesystem IO
-Bugzilla   : 9352, 7313
-Description: server may evict liblustre clients accessing contended locks
-Details    : if a client is granted a lock or receives a completion AST
-	     with a blocking AST already set it would not reply to the AST
-	     for LDLM_FL_CANCEL_ON_BLOCK locks.  It now replies to such ASTs.
-
-Severity   : minor
-Frequency  : lfs setstripe, only systems with more than 160 OSTs
-Bugzilla   : 9440
-Description: unable to set striping with a starting offset beyond OST 160
-Details    : llapi_create_file() incorrectly limited the starting stripe
-	     index to the maximum single-file stripe count.
-
-Severity   : minor
-Frequency  : LDAP users only
-Bugzilla   : 6163
-Description: lconf did not handle in-kernel recovery with LDAP properly
-Details    : lconf/LustreDB get_refs() is searching the wrong namespace
-
-Severity   : enhancement
-Bugzilla   : 7342
-Description: bind OST threads to NUMA nodes to improve performance
-Details    : all OST threads are uniformly bound to CPUs on a single NUMA
-	     node and do their allocations there to localize memory access
-
-Severity   : enhancement
-Bugzilla   : 7979
-Description: llmount can determine client NID directly from Myrinet (GM)
-Details    : the client NID code from gmnalnid was moved directly into
-	     llmount, removing the need to use this or specifying the
-	     client NID explicitly when mounting GM clients with zeroconf
-
-Severity   : minor
-Frequency  : if client is started with down MDS
-Bugzilla   : 7184
-Description: if client is started with down MDS mount hangs in ptlrpc_queue_wait
-Details    : Having an LWI_INTR() wait event (interruptible, but no timeout)
-	     will wait indefinitely in ptlrpc_queue_wait->l_wait_event() after
-	     ptlrpc_import_delayed_req() because we didn't check if the
-	     request was interrupted, and we also didn't break out of the
-	     event loop if there was no timeout
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 5047
-Description: data loss during non-page-aligned writes to a single file from
-	     both multiple nodes and multiple threads on one node at same time
-Details    : updates to KMS and lsm weren't protected by common lock. Resulting
-	     inconsistency led to false short-reads, that were cached and later
-	     used by ->prepare_write() to fill in partially written page,
-	     leading to data loss.
-
-Severity   : minor
-Frequency  : always, if lconf --abort_recovery used
-Bugzilla   : 7047
-Description: lconf --abort_recovery fails with 'Operation not supported'
-Details    : lconf was attempting to abort recovery on the MDT device and not
-	     the MDS device
-
-Severity   : enhancement
-Bugzilla   : 9445
-Description: remove cleanup logs
-Details    : replace lconf-generated cleanup logs with lustre internal
-	     cleanup routines.  Eliminates the need for client-cleanup and
-	     mds-cleanup logs.
-
-Severity   : enhancement
-Bugzilla   : 8592
-Description: add support for EAs (user and system) on lustre filesystems
-Details    : it is now possible to store extended attributes in the Lustre
-	     client filesystem, and with the user_xattr mount option it
-	     is possible to allow users to store EAs on their files also
-
-Severity   : enhancement
-Bugzilla   : 7293
-Description: Add possibility (config option) to show minimal available OST free
-	     space.
-Details    : When compiled with --enable-mindf configure option, statfs(2)
-	     (and so, df) will return least minimal free space available from
-	     all OSTs as amount of free space on FS, instead of summary of
-	     free spaces of all OSTs.
-
-Severity   : enhancement
-Bugzilla   : 7311
-Description: do not expand extent locks acquired on OST-side
-Details    : Modify ldlm_extent_policy() to not expand local locks, acquired
-	     by server: they are not cached anyway.
-
-Severity   : major
-Frequency  : when mmap is used/binaries executed from Lustre
-Bugzilla   : 9482
-Description: Unmmap pages before throwing them away from read cache.
-Details    : llap_shrink cache now attempts to unmap pages before discarding
-	     them (if unmapping failed - do not discard).  SLES9 kernel has
-	     extra checks that trigger if this unmapping is not done first.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 6034
-Description: lconf didn't resolve symlinks before checking to see whether a
-	     given mountpoint was already in use
-
-Severity   : minor
-Frequency  : when migrating failover services
-Bugzilla   : 6395, 9514
-Description: When migrating a subset of services from a node (e.g. failback
-	     from a failover service node) the remaining services would
-	     time out and evict clients.
-Details    : lconf --force (implied by --failover) sets the global obd_timeout
-	     to 5 seconds in order to quickly disconnect, but this caused
-	     other RPCs to time out too quickly.  Do not change the global
-	     obd_timeout for force cleanup, only set it for DISCONNECT RPCs.
-
-Severity   : enhancement
-Frequency  : if MDS is started with down OST
-Bugzilla   : 9439,5706
-Description: Allow startup/shutdown of an MDS without depending on the
-	     availability of the OSTs.
-Details    : Asynchronously call mds_lov_synchronize during MDS startup.
-	     Add appropriate locking and lov-osc refcounts for safe
-	     cleaning.  Add osc abort_inflight calls in case the
-	     synchronize never started.
-
-Severity   : minor
-Frequency  : occasional (Cray XT3 only)
-Bugzilla   : 7305
-Description: root not authorized to access files in CRAY_PORTALS environment
-Details    : The client process capabilities were not honoured on the MDS in
-	     a CRAY_PORTALS/CRAY_XT3 environment.  If the file had previously
-	     been accessed by an authorized user then root was able to access
-	     the file on the local client also.  The root user capabilities
-	     are now allowed on the MDS, as this environment has secure UID.
-
-Severity   : minor
-Frequency  : occasional
-Bugzilla   : 6449
-Description: ldiskfs "too long searching" message happens too often
-Details    : A debugging message (otherwise harmless) prints too often on
-	     the OST console.  This has been reduced to only happen when
-	     there are fragmentation problems on the filesystem.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 9598
-Description: Division by zero in statfs when all OSCs are inactive
-Details    : lov_get_stripecnt() returns zero due to incorrect order of checks,
-	     lov_statfs divides by value returned by lov_get_stripecnt().
-
-Severity   : minor
-Frequency  : common
-Bugzilla   : 9489, 3273
-Description: First write from each client to each OST was only 4kB in size,
-	     to initialize client writeback cache, which caused sub-optimal
-	     RPCs and poor layout on disk for the first writen file.
-Details    : Clients now request an initial cache grant at (re)connect time
-	     and so that they can start streaming writes to the cache right
-	     away and always do full-sized RPCs if there is enough data.
-	     If the OST is rebooted the client also re-establishes its grant
-	     so that client cached writes will be honoured under the grant.
-
-Severity   : minor
-Frequency  : common
-Bugzilla   : 7198
-Description: Slow ls (and stat(2) syscall) on files residing on IO-loaded OSTs
-Details    : Now I/O RPCs go to different portal number and (presumably) fast
-	     lock requests (and glimses) and other RPCs get their own service
-	     threads pool that should be able to service those RPCs
-	     immediatelly.
-
-Severity   : enhancement
-Bugzilla   : 7417
-Description: Ability to exchange lustre version between client and servers and
-	     issue warnings at client side if client is too old. Also for
-	     liblustre clients there is ability to refuse connection of too old
-	     clients.
-Details    : New 'version' field is added to connect data structure that is
-	     filled with version info. That info is later checked by server and
-	     by client.
-
-Severity   : minor
-Frequency  : rare, liblustre only.
-Bugzilla   : 9296, 9581
-Description: Two simultaneous writes from liblustre at offset within same page
-	     might proceed at the same time overwriting eachother with stale
-	     data.
-Details    : I/O lock withing llu_file_prwv was released too early, before data
-	     actually was hitting the wire. Extended lock-holding time until
-	     server acknowledges receiving data.
-
-Severity   : minor
-Frequency  : extremely rare. Never observed in practice.
-Bugzilla   : 9652
-Description: avoid generating lustre_handle cookie of 0.
-Details    : class_handle_hash() generates handle cookies by incrementing
-	     global counter, and can hit 0 occasionaly (this is unlikely, but
-	     not impossible, because initial value of cookie counter is
-	     selected randonly). Value of 0 is used as a sentinel meaning
-	     "unassigned handle" --- avoid it. Also coalesce two critical
-	     sections in this function into one.
-
-Severity   : enhancement
-Bugzilla   : 9528
-Description: allow liblustre clients to delegate truncate locking to OST
-Details    : To avoid overhead of locking, liblustre client instructs OST to
-	     take extent lock in ost_punch() on client's behalf. New connection
-	     flag is added to handle backward compatibility.
-
-Severity   : enhancement
-Bugzilla   : 4928, 7341, 9758
-Description: allow number of OST service threads to be specified
-Details    : a module parameter allows the number of OST service threads
-	     to be specified via "options ost ost_num_threads={N}" in the
-	     OSS's /etc/modules.conf or /etc/modprobe.conf.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 6146, 9635, 9895
-Description: servers crash with bad pointer in target_handle_connect()
-Details    : In rare cases when a client is reconnecting it was possible that
-	     the connection request was the last reference for that export.
-	     We would temporarily drop the export reference and get a new
-	     one, but this may have been the last reference and the export
-	     was just destroyed.  Get new reference before dropping old one.
-
-Severity   : enhancement
-Frequency  : if client is started with failover MDS
-Bugzilla   : 9818
-Description: Allow multiple MDS hostnames in the mount command
-Details    : Try to read the configuration from all specified MDS
-	     hostnames during a client mount in case the "primary"
-	     MDS is down.
-
-Severity   : enhancement
-Bugzilla   : 9297
-Description: Stop sending data to evicted clients as soon as possible.
-Details    : Check if the client we are about to send or are sending data to
-	     was evicted already. (Check is done every second of waiting,
-	     for which l_wait_event interface was extended to allow checking
-	     of exit condition at specified intervals).
-
-Severity   : minor
-Frequency  : rare, normally only when NFS exporting is done from client
-Bugzilla   : 9301
-Description: 'bad disk LOV MAGIC: 0x00000000' error when chown'ing files
-	     without objects
-Details    : Make mds_get_md() recognise empty md case and set lmm size to 0.
-
-Severity   : minor
-Frequency  : always, if srand() is called before liblustre initialization
-Bugzilla   : 9794
-Description: Liblustre uses system PRNG disturbing its usage by user application
-Details    : Introduce internal to lustre fast and high-quality PRNG for
-	     lustre usage and make liblustre and some other places in generic
-	     lustre code to use it.
-
-Severity   : enhancement
-Bugzilla   : 9477, 9557, 9870
-Description: Verify that the MDS configuration logs are updated when xml is
-Details    : Check if the .xml configuration logs are newer than the config
-	     logs stored on the MDS and report an error if this is the case.
-	     Request --write-conf, or allow starting with --old_conf.
-
-Severity   : enhancement
-Bugzilla   : 6034
-Description: Handle symlinks in the path when checking if Lustre is mounted.
-Details    : Resolve intermediate symlinks when checking if a client has
-	     mounted a filesystem to avoid duplicate client mounts.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 9309
-Description: lconf can hit an error exception but still return success.
-Details    : The lconf command catches the Command error exception at the top
-	     level script context and will exit with the associated exit
-	     status, but doesn't ensure that this exit status is non-zero.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 9493
-Description: failure of ptlrpc thread startup can cause oops
-Details    : Starting a ptlrpc service thread can fail if there are a large
-	     number of threads or the server memory is very fragmented.
-	     Handle this without oopsing.
-
-Severity   : minor
-Frequency  : always, only if liblustre and non-default acceptor port was used
-Bugzilla   : 9933
-Description: liblustre cannot connect to servers with non-default acceptor port
-Details    : tcpnal_set_default_params() was not called and was therefore
-	     ignoring the environment varaible TCPNAL_PORT, as well as other
-	     TCPNAL_ environment variables
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 9923
-Description: two objects could be created on the same OST for a single file
-Details    : If an OST is down, in some cases it was possible to create two
-	     objects on a single OST for a single file.  No problems other
-	     than potential performance impact and spurious error messages.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 5681, 9562
-Description: Client may oops in ll_unhash_aliases
-Details    : Client dcache may become inconsistent in race condition.
-	     In some cases "getcwd" can fail if the current directory is
-	     modified.
-
-Severity   : minor
-Frequency  : always
-Bugzilla   : 9942
-Description: Inode refcounting problems in NFS export code
-Details    : link_raw functions used to call d_instantiate without obtaining
-	     extra inode reference first.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 9942, 9903
-Description: Referencing freed requests leading to crash, memleaks with NFS.
-Details    : We used to require that call to ll_revalidate_it was always
-	     followed by ll_lookup_it. Also with revalidate_special() it is
-	     possible to call ll_revalidate_it() twice for the same dentry
-	     even if first occurence returned success. This fix changes semantic
-	     between DISP_ENQ_COMPLETE disposition flag to mean there is extra
-	     reference on a request referred from the intent.
-	     ll_intent_release() then releases such a request.
-
-Severity   : minor
-Frequency  : rare, normally benchmark loads only
-Bugzilla   : 1443
-Description: unlinked inodes were kept in memory on the client
-Details    : If a client is repeatedly creating and unlinking files it
-	     can accumulate a lot of stale inodes in the inode slab cache.
-	     If there is no other client load running this can cause the
-	     client node to run out of memory.  Instead flush old inodes
-	     from client cache that have the same inode number as a new inode.
-
-Severity   : minor
-Frequency  : SLES9 2.6.5 kernel and long filenames only
-Bugzilla   : 9969, 10379
-Description: utime reports stale NFS file handle
-Details    : SLES9 uses out-of-dentry names in some cases, which confused
-	     the lustre dentry revalidation.  Change it to always use the
-	     in-dentry qstr.
-
-Severity   : major
-Frequency  : rare, unless heavy write-truncate concurrency is continuous
-Bugzilla   : 4180, 6984, 7171, 9963, 9331
-Description: OST becomes very slow and/or deadlocked during object unlink
-Details    : filter_destroy() was holding onto the parent directory lock
-	     while truncating+unlinking objects.  For very large objects this
-	     may block other threads for a long time and slow overall OST
-	     responsiveness.  It may also be possible to get a lock ordering
-	     deadlock in this case, or run out of journal credits because of
-	     the combined truncate+unlink.  Solution is to do object truncate
-	     first in one transaction without parent lock, and then do the
-	     final unlink in a new transaction with the parent lock.  This
-	     reduces the lock hold time dramatically.
-
-Severity   : major
-Frequency  : rare, 2.4 kernels only
-Bugzilla   : 9967
-Description: MDS or OST cleanup may trip kernel BUG when dropping kernel lock
-Details    : mds_cleanup() and filter_cleanup() need to drop the kernel lock
-	     before unmounting their filesystem in order to avoid deadlock.
-	     The kernel_locked() function in 2.4 kernels only checks whether
-	     the kernel lock is held, not whether it is this process that is
-	     holding it as 2.6 kernels do.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 9635
-Description: MDS or OST may oops/LBUG if a client is connecting multiple times
-Details    : The client ptlrpc code may be trying to reconnect to a down
-	     server before a previous connection attempt has timed out.
-	     Increase the reconnect interval to be longer than the connection
-	     timeout interval to avoid sending duplicate connections to
-	     servers.
-
-Severity   : minor
-Frequency  : echo_client brw_test command
-Bugzilla   : 9919
-Description: fix echo_client to work with OST preallocated code
-Details    : OST preallocation code (5137) didn't take echo_client IO path
-	     into account: echo_client calls filter methods outside of any
-	     OST thread and, hence, there is no per-thread preallocated
-	     pages and buffers to use. Solution: hijack pga pages for IO. As
-	     a byproduct, this avoids unnecessary data copying.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 3555, 5962, 6025, 6155, 6296, 9574
-Description: Client can oops in mdc_commit_close() after open replay
-Details    : It was possible for the MDS to return an open request with no
-	     transaction number in mds_finish_transno() if the client was
-	     evicted, but without actually returning an error.  Clients
-	     would later try to replay that open and may trip an assertion
-	     Simplify the client close codepath, and always return an error
-	     from the MDS in case the open is not successful.
-
-Severity   : major
-Frequency  : rare, 2.6 OSTs only
-Bugzilla   : 10076
-Description: OST may deadlock under high load on fragmented files
-Details    : If there was a heavy load and highly-fragmented OST filesystems
-	     it was possible to have all the OST threads deadlock waiting on
-	     allocation of biovecs, because the biovecs were not released
-	     until the entire RPC IO was completed.  Instead, release biovecs
-	     as soon as they are complete to ensure forward IO progress.
-
-Severity   : enhancement
-Bugzilla   : 9578
-Description: Support for specifying external journal device at mount
-Details    : If an OST or MDS device is formatted with an external journal
-	     device, this device major/minor is stored in the ext3 superblock
-	     and may not be valid for failover.  Allow detecting and
-	     specifying the external journal at mount time.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 10235
-Description: Mounting an MDS with pending unlinked files may cause oops
-Details    : target_finish_recovery() calls mds_postrecov() which returned
-	     the number of orphans unlinked. mds_lov_connect->mds_postsetup()
-	     considers this an error and immediately begins cleaning up the
-	     lov, just after starting the mds_lov process
-
-Severity   : enhancement
-Bugzilla   : 9461
-Description: Implement 'lfs df' to report actual free space on per-OST basis
-Details    : Add sub-command 'df' on 'lfs' to report the disk space usage of
-	     MDS/OSDs. Usage: lfs df [-i][-h]. Command Options: '-i' to report
-	     usage of objects; '-h' to report in human readable format.
-
-------------------------------------------------------------------------------
-
-2005-08-26  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.5
-       * bug fixes
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 7264
-Description: Mounting an ldiskfs file system with mballoc may crash OST node.
-Details    : ldiskfs mballoc code may reference an uninitialized buddy struct
-	     at startup during orphan unlinking.  Instead, skip buddy update
-	     before setup, as it will be regenerated after recovery is complete.
-
-Severity   : minor
-Frequency  : rare
-Bugzilla   : 7039
-Description: If an OST is inactive, its locks might reference stale inodes.
-Details    : lov_change_cbdata() must iterate over all namespaces, even if
-	     they are inactive to clear inode references from the lock.
-
-Severity   : enhancement
-Frequency  : occasional, if non-standard max_dirty_mb used
-Bugzilla   : 7138
-Description: Client will block write RPCs if not enough grant
-Details    : If a client has max_dirty_mb smaller than max_rpcs_in_flight,
-	     then the client will block writes while waiting for another RPC
-	     to complete instead of consuming its dirty limit.  With change
-	     we get improved performance when max_dirty_mb is small.
-
-Severity   : enhancement
-Bugzilla   : 3389, 6253
-Description: Add support for supplementary groups on the MDS.
-Details    : The MDS has an upcall /proc/fs/lustre/mds/{mds}/group_upcall
-	     (set to /usr/sbin/l_getgroups if enabled) which will do MDS-side
-	     lookups for user supplementary groups into a cache.
-
-Severity   : minor
-Bugzilla   : 7278
-Description: O_CREAT|O_EXCL open flags in liblustre always return -EEXIST
-Details    : Make libsysio to not enforce O_EXCL by clearing the flag,
-	     for liblustre O_EXCL is enforced by MDS.
-
-Severity   : minor
-Bugzilla   : 6455
-Description: readdir never returns NULL in liblustre.
-Details    : Corrected llu_iop_getdirentries logic, to return offset of next
-	     dentry in struct dirent.
-
-Severity   : minor
-Bugzilla   : 7137
-Frequency  : liblustre only, depends on application IO pattern
-Description: liblustre clients evicted if not contacting servers
-Details    : Don't put liblustre clients into the ping_evictor list, so
-	     they will not be evicted by the pinger ever.
-
-Severity   : enhancement
-Bugzilla   : 6902
-Description: Add ability to evict clients by NID from MDS.
-Details    : By echoing "nid:$NID" string into
-	     /proc/fs/lustre/mds/.../evict_client client with nid that equals to
-	     $NID would be instantly evicted from this MDS and from all active
-	     OSTs connected to it.
-
-Severity   : minor
-Bugzilla   : 7198
-Description: Do not query file size twice, somewhat slowing stat(2) calls.
-Details    : lookup_it_finish() used to query file size from OSTs that was not
-	     needed.
-
-Severity   : minor
-Bugzilla   : 6237
-Description: service threads change working directory to that of init
-Details    : Starting lustre service threads may pin the working directory
-	     of the parent thread, making that filesystem busy.  Threads
-	     now change to the working directory of init to avoid this.
-
-Severity   : minor
-Bugzilla   : 6827
-Frequency  : during shutdown only
-Description: shutdown with a failed MDS or OST can cause unmount to hang
-Details    : Don't resend DISCONNECT messages in ptlrpc_disconnect_import()
-	     if server is down.
-
-Severity   : minor
-Bugzilla   : 7331
-Frequency  : 2.6 only
-Description: chmod/chown may include an extra supplementary group
-Details    : ll{,u}_mdc_pack_op_data() does not properly initialize the
-	     supplementary group and if none is specified this is used.
-
-Severity   : minor
-Bugzilla   : 5479 (6816)
-Frequency  : rare
-Description: Racing open + rm can assert client in mdc_set_open_replay_data()
-Details    : If lookup is in progress on a file that is unlinked we might try
-	     to revalidate the inode and fail in revalidate after lookup is
-	     complete and ll_file_open() enqueues the open again but
-	     it_open_error() was not checking DISP_OPEN_OPEN errors correctly.
-
-Severity   : minor
-Frequency  : always, if lconf --abort_recovery used
-Bugzilla   : 7047
-Description: lconf --abort_recovery fails with 'Operation not supported'
-Details    : lconf was attempting to abort recovery on the MDT device and not
-	     the MDS device
-
-------------------------------------------------------------------------------
-
-2005-08-08  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.4
-       * bug fixes
-
-Severity   : major
-Frequency  : rare (only unsupported configurations with a node running as an
-	     OST and a client)
-Bugzilla   : 6514, 5137
-Description: Mounting a Lustre file system on a node running as an OST could
-	     lead to deadlocks
-Details    : OSTs now preallocates memory needed to write out data at
-	     startup, instead of when needed, to avoid having to
-	     allocate memory in possibly low memory situations.
-	     Specifically, if the file system is mounted on on OST,
-	     memory pressure could force it to try to write out data,
-	     which it needed to allocate memory to do.  Due to the low
-	     memory, it would be unable to do so and the node would
-	     become unresponsive.
-
-Severity   : enhancement
-Bugzilla   : 7015
-Description: Addition of lconf --service command line option
-Details    : lconf now accepts a '--service <arg>' option, which is
-             shorthand for 'lconf --group <arg> --select <arg>=<hostname>'
-
-Severity   : enhancement
-Bugzilla   : 6101
-Description: Failover mode is now the default for OSTs.
-Details    : By default, OSTs will now run in failover mode.  To return to
-             the old behaviour, add '--failout' to the lmc line for OSTs.
-
-Severity   : enhancement
-Bugzilla   : 1693
-Description: Health checks are now provided for MDS and OSTs
-Details    : Additional detailed health check information on MSD and OSTs
-             is now provided through the procfs health_check value.
-
-Severity   : minor
-Frequency  : occasional, depends on IO load
-Bugzilla   : 4466
-Description: Disk fragmentation on the OSTs could eventually cause slowdowns
-             after numerous create/delete cycles
-Details    : The ext3 inode allocation policy would not allocate new inodes
-             very well on the OSTs because there are no new directories
-             being created.  Instead we look for groups with free space if
-             the parent directories are nearly full.
-
-Severity   : major
-Bugzilla   : 6302
-Frequency  : rare
-Description: Network or server problems during mount may cause partially
-             mounted clients instead of returning an error.
-Details    : The config llog parsing code may overwrite the error return
-             code during mount error handling, returning success instead
-             of an error.
-
-Severity   : minor
-Bugzilla   : 6422
-Frequency  : rare
-Description: MDS can fail to allocate large reply buffers
-Details    : After long uptimes the MDS can fail to allocate large reply
-	     buffers (e.g. zconf client mount config records) due to memory
-	     fragmentation or consumption by the buffer cache.  Preallocate
-	     some large reply buffers so that these replies can be sent even
-	     under memory pressure.
-
-Severity   : minor
-Bugzilla   : 6266
-Frequency  : rare (liblustre)
-Description: fsx running with liblustre complained that using truncate() to
-             extend the file doesn't work.  This patch corrects that issue.
-Details    : This is the liblustre equivalent of the fix for bug 6196.  Fixes
-             ATTR_SIZE and lsm use in llu_setattr_raw.
-
-Severity   : critical
-Bugzilla   : 6866
-Frequency  : rare, only 2.6 kernels
-Description: Unusual file access patterns on the MDS may result in inode
-             data being lost in very rare circumstances.
-Details    : Bad interaction between the ea-in-inode patch and the "no-read"
-             code in the 2.6 kernel caused the inode and/or EA data not to
-             be read from disk, causing single-file corruption.
-
-Severity   : critical
-Bugzilla   : 6998
-Frequency  : rare, only 2.6 filesystems using extents
-Description: Heavy concurrent write and delete load may cause data corruption.
-Details    : It was possible under high-load situations to have an extent
-             metadata block in the block device cache from a just-unlinked
-             file overwrite a newly-allocated data block.  We now unmap any
-             metadata buffers that alias just-allocated data blocks.
-
-Severity   : minor
-Bugzilla   : 7241
-Frequency  : filesystems with default stripe_count larger than 77
-Description: lconf+mke2fs fail when formatting filesystem with > 77 stripes
-Details    : lconf specifies an inode size of 4096 bytes when the default
-             stripe_count is larger than 77.  This conflicts with the default
-             inode density of 1 per 4096 bytes.  Allocate smaller inodes in
-             this case to avoid pinning too much memory for large EAs.
-
-------------------------------------------------------------------------------
-
-2005-07-07  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.3
-       * bug fixes
-
-Severity   : minor
-Frequency  : rare (extremely heavy IO load with hundreds of clients)
-Bugzilla   : 6172
-Description: Client is evicted, gets IO error writing to file
-Details    : lock ordering changes for bug 5492 reintroduced bug 3267 and
-             caused clients to be evicted for AST timeouts.  The fixes in
-             bug 5192 mean we no longer need to have such short AST timeouts
-             so ldlm_timeout has been increased.
-
-Severity   : major
-Frequency  : occasional during --force or --failover shutdown under load
-Bugzilla   : 5949, 4834
-Description: Server oops/LBUG if stopped with --force or --failover under load
-Details    : a collection of import/export refcount and cleanup ordering
-             issues fixed for safer force cleanup
-
-Severity   : major
-Frequency  : only filesystems larger than 120 OSTs
-Bugzilla   : 5990, 6223
-Description: lfs getstripe would oops on a very large filesystem
-Details    : lov_getconfig used kfree on vmalloc'd memory
-
-Severity   : minor
-Frequency  : only filesystems exporting via NFS to Solaris 10 clients
-Bugzilla   : 6242, 6243
-Description: reading from files that had been truncated to a non-zero size
-             but never opened returned no data
-Details    : ll_file_read() reads zeros from no-object files to EOF
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 6200
-Description: A bug in MDS/OSS recovery could cause the OSS to fail an assertion
-Details    : There's little harm in aborting MDS/OSS recovery and letting it
-             try again, so I removed the LASSERT and return an error instead.
-
-Severity   : enhancement
-Bugzilla   : 5902
-Description: New debugging infrastructure for tracking down data corruption
-Details    : The I/O checksum code was replaced to: (a) control it at runtime,
-             (b) cover more of the client-side code path, and (c) try to narrow
-             down where problems occurred
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 3819, 4364, 4397, 6313
-Description: Racing close and eviction MDS could cause assertion in mds_close
-Details    : It was possible to get multiple mfd references during close and
-             client eviction, leading to one thread referencing a freed mfd.
-
-Severity:  : enhancement
-Bugzilla   : 3262, 6359
-Description: Attempts to reconnect to servers are now more aggressive.
-Details    : This builds on the enhanced upcall-less recovery that was added
-             in 1.4.2.  When trying to reconnect to servers, clients will
-             now try each server in the failover group every 10 seconds.  By
-             default, clients would previously try one server every 25 seconds.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 6371
-Description: After recovery, certain operations trigger a failed
-             assertion on a client.
-Details    : Failing over an mds, using lconf -d --failover, while a
-             client was doing a readdir() call would cause the client to
-             LBUG after recovery completed and the readdir() was resent.
-
-Severity   : enhancement
-Bugzilla   : 6296
-Description: Default groups are now added by lconf
-Details    : You can now run lconf --group <servicename> without having to
-             manually add groups with lmc.
-
-Severity   : major
-Frequency  : occasional
-Bugzilla   : 6412
-Description: Nodes with an elan id of 0 trigger a failed assertion
-
-Severity   : minor
-Frequency  : always when accessing e.g. tty/console device nodes
-Bugzilla   : 3790
-Description: tty and some other devices nodes cannot be used on lustre
-Details    : file's private_data field is used by device data and lustre
-             values in there got lost. New field was added to struct file to
-             store fs-specific private data.
-
-Severity   : minor
-Frequency  : when exporting Lustre via NFS
-Bugzilla   : 5275
-Description: NFSD failed occasionally when looking up a path component
-Details    : NFSD is looking up ".." which was broken in ext3 directories
-             that had grown large enough to become hashed.
-
-Severity   : minor
-Frequency  : Clusters with multiple interfaces not on the same subnet
-Bugzilla   : 5541
-Description: Nodes will repeatedly try to reconnect to an interface which it
-             cannot reach and report an error to the log.
-Details    : Extra peer list entries will be created by lconf with some peers
-             unreachable.  lconf now validates the peer before adding it.
-
-Severity   : major
-Frequency  : Only if a default stripe is set on the filesystem root.
-Bugzilla   : 6367
-Description: Setting a default stripe on the filesystem root prevented the
-             filesystem from being remounted.
-Details    : The client was sending extra request flags in the root getattr
-             request and did not allocate a reply buffer for the dir EA.
-
-Severity   : major
-Frequency  : occasional, higher if lots of files are accessed by one client
-Bugzilla   : 6159, 6097
-Description: Client trips assertion regarding lsm mismatch/magic
-Details    : While revalidating inodes the VFS looks up inodes with ifind()
-             and in rare cases can find an inode that is being freed.
-             The ll_test_inode() code will free the lsm during ifind()
-             when it finds an existing inode and then the VFS later attaches
-             this free lsm to a new inode.
-
-Severity   : major
-Frequency  : rare
-Bugzilla   : 6422, 7030
-Description: MDS deadlock between mkdir and client eviction
-Details    : Creating a new file via mkdir or mknod (starting a transaction
-             and getting the ns lock) can deadlock with client eviction
-             (gets ns lock and trying to finish a synchronous transaction).
-
-Severity   : minor
-Frequency  : occasional
-Description: While starting a server, the fsfilt_ext3 module could not be
-             loaded.
-Details    : CFS's improved ext3 filesystem is named ldiskfs for 2.6
-             kernels.  Previously, lconf would still use the ext3 name
-             when trying to load modules.  Now, it will correctly use
-             ext3 on 2.4 and ldiskfs on 2.6.
-
-Severity   : enhancement
-Description: The default stripe count has been changed to 1
-Details    : The interpretation of the default stripe count (0, to lfs
-             or lmc) has been changed to mean striping across a single
-             OST, rather than all available.  For general usage we have
-             found a stripe count of 1 or 2 works best.
-
-Severity   : enhancement
-Description: Add support for compiling against Cray portals.
-Details    : Conditional compiling for some areas that are different
-             on Cray Portals.
-
-Severity   : major
-Frequency  : occasional
-Bugzilla   : 6409, 6834
-Description: Creating files with an explicit stripe count may lead to
-             a failed assertion on the MDS
-Details    : If some OSTs are full or unavailable, creating files may
-             trigger a failed assertion on the MDS.  Now, Lustre will
-             try to use other servers or return an error to the
-             client.
-
-Severity   : minor
-Frequency  : occasional
-Bugzilla   : 6469
-Description: Multiple concurrent overlapping read+write on multiple SMP nodes
-             caused lock timeout during readahead (since 1.4.2).
-Details    : Processes doing readahead might match a lock that hasn't been
-             granted yet if there are overlapping and conflicting lock
-             requests.  The readahead process waits on ungranted lock
-             (original lock is CBPENDING), while OST waits for that process
-             to cancel CBPENDING read lock and eventually evicts client.
-
-Severity   : enhancement
-Bugzilla   : 6931
-Description: Initial enabling of flock support for clients
-Details    : Implements fcntl advisory locking and file status functions.
-	     This feature is provided as an optional mount flag (default
-	     off), and is NOT CURRENTLY SUPPORTED.  Not all types of record
-	     locking are implemented yet, and those that are are not guaranteed
-	     to be completely correct in production environments.
-	     mount -t lustre -o [flock|noflock] ...
-
-Severity   : major
-Frequency  : occasional
-Bugzilla   : 6198
-Description: OSTs running 2.4 kernels but with extents enabled might trip an
-             assertion in the ext3 JBD (journaling) layer.
-Details    : The b_committed_data struct is protected by the big kernel lock
-             in 2.4 kernels, serializing journal_commit_transaction() and
-             ext3_get_block_handle->ext3_new_block->find_next_usable_block()
-             access to this struct.  In 2.6 kernels there is finer grained
-             locking to improve SMP performance of the JBD layer.
-
-Severity   : minor
-Bugzilla   : 6147
-Description: Changes the "SCSI I/O Stats" kernel patch to default to "enabled"
-
------------------------------------------------------------------------------
-
-2005-05-05  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.2
-       NOTE: Lustre 1.4.2 uses an incompatible network protocol than previous
-	     versions of Lustre.  Please update all servers and clients to
-	     version 1.4.2 or later at the same time.  You must also run
-	     "lconf --write-conf {config}.xml" on the MDS while it is stopped
-	     to update the configuration logs.
-       * bug fixes
-	- fix for HPUX NFS client breakage when NFS exporting Lustre (5781)
-	- mdc_enqueue does not need max_mds_easize request buffer on send (5707)
-	- swab llog records of type '0' so we get proper header size/idx (5861)
-	- send llog cancel req to DLM cancel portal instead of cb portal (5515)
-	- fix rename of one directory over another leaking an inode (5953)
-	- avoid SetPageDirty on 2.6 (5981)
-	- don't re-add just-being-destroyed locks to the waiting list (5653)
-	- when creating new directories, inherit the parent's custom
-	  striping settings if present parent (3048)
-	- flush buffers from cache before direct IO in 2.6 obdfilter (4982)
-	- don't hold i_size_sem in ll_nopage() and ll_ap_refresh_count (6077)
-	- don't hold client locks on temporary worklist from l_lru (5666)
-	- handle IO errors in 2.6 obdfilter bio completion routine (6046)
-	- automatically evict dead clients (5921)
-	- Update file size properly in create+truncate+fstat case (6196)
-	- Do not unhash mountpoint dentries, do not allow removal of
-	  mountpoints (5907)
-	- Avoid lock ordering deadlock issue with write/truncate (6203,5654)
-	- reserve enough journal credits in fsfilt_start_log for setattr (4554)
-	- ldlm_enqueue freed-export error path would always LBUG (6149,6184)
-	- don't reference lr_lvb_data until after we hold lr_lvb_sem (6170)
-	- don't overwrite last_rcvd if there is a *_client_add() error (6086)
-	- Correctly handle reads of files with no objects (6243)
-	- lctl recover will also mark a device active if deactivate used (5933)
-	* miscellania
-	- by default create 1 inode per 4kB space on MDS, per 16kB on OSTs
-	- allow --write-conf on an MDS with different nettype than client (5619)
-	- don't write config llogs to MDS for mounts not from that MDS (5617)
-	- lconf should create multiple TCP connections from a client (5201)
-	- init scripts are now turned off by default; run chkconfig --on
-	  lustre and chkconfig --on lustrefs to use them
-	- upcalls are no longer needed for clients to recover to failover
-	  servers (3262)
-	- add --abort-recovery option to lconf to abort recovery on device
-	  startup (6017)
-	- add support for an arbitrary number of OSTs (3026)
-	- Quota support protocol changes.
-	- forward compatibility changes to wire structs (6007)
-	- rmmod NALs that might be loaded because of /etc/modules.conf (6133)
-	- support for mountfsoptions and clientoptions to the Lustre LDAP (5873)
-	- improved "lustre status" script
-	- initialize blocksize for non-regular files (6062)
-	- added --disable-server and --disable-client configure options (5782)
-	- introduce a lookup cache for lconf to avoid repeated DB scans (6204)
-	- Vanilla 2.4.29 support
-	- increase maximum number of obd devices to 520 (6242)
-	- remove the tcp-zero-copy patch from the suse-2.4 series (5902)
-	- Quadrics Elan drivers are now included for the RHEL 3 2.4.21 and
-	  SLES 9 2.6.5 kernels
-	- limit stripes per file to 160 (the maximum EA size) (6093)
-
-2005-03-22  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.1
-       * bug fixes
-	- don't LASSERT in ll_release on NULL lld with NFS export (4655, 5760)
-	- hold NS lock when calling handle_ast_error->del_waiting_lock (5746)
-	- fix setattr mtime regression from lovcleanup merge (4829, 5669)
-	- workaround for 2.6 crash in ll_unhash_aliases (5687, 5210)
-	- small ext3 extents cleanups and fixes (5733)
-	- improved mballoc code, several small races and bugs fixed (5733, 5638)
-	- kernel version 43 - fix remove_suid bugs in both 2.4 and 2.6 (5695)
-	- avoid needless client->OST connect, fix handle mismatch (5317)
-	- fix DLM error path that led to out-of-sync client, long delays (5779)
-	- support common vfs-enforced mount options (nodev,nosuid,noexec) (5637)
-	- fix several locking issues related to i_size (5492,5624,5654,5672)
-	- don't move pending lock onto export if it is already evicted (5683)
-	- fix kernel oops when creating .foo in unlinked directory (5548)
-	- fix deadlock in obdfilter statistics vs. object create (5811)
-	- use time_{before,after} to avoid timer jiffies wrap (5882)
-	- shutdown --force/--failover stability (3607,3651,4797,5203,4834)
-	- Do not leak request if server was not able to process it (5154)
-	- If mds_open unable to find parent dir, make that negative lookup(5154)
-	- don't create new directories with extent-mapping (5909, 5936)
-       * miscellania
-	- fix lustre/lustrefs init scripts for SuSE (patch from Scali, 5702)
-	- don't hold the pinger_sem in ptlrpc_pinger_sending_on_import
-	- change obd_increase_kms to obd_adjust_kms (up or down) (5654)
-	- lconf, lmc search both /usr/lib and /usr/lib64 for Python libs (5800)
-	- support for RHEL4 kernel on i686 (5773)
-	- provide error messages when incompatible logs are encountered (5898)
-
-2005-02-18  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.0.10 (1.4.1 release candidate 1)
-       * bug fixes
-	- don't keep a lock reference when lock is not granted (4238)
-	- unsafe list practices (rarely) led to infinite eviction loop (4908)
-	- add per-fs limit of Lustre pages in page cache, avoid OOM (4699)
-	- drop import inflight refcount on signal_completed_replay error (5255)
-	- unlock page after async write error during send (3677)
-	- handle missing objects in filter_preprw_read properly (5265)
-	- no transno return for symlink open, don't save no-trasno open (3440)
-	- don't try to complete elan receive that already failed (4012)
-	- free RPC server reply state on error (5406)
-	- clean up thread from ptlrpc_start_thread() on error (5160)
-	- readahead could read extra page into cache that wasn't ejected (5388)
-	- prevent races in class_attach/setup/cleanup/detach (5260)
-	- don't dereference de->d_inode after l_dput of de (5458)
-	- use "int" for stripe value returned from lock_to_stripe (5544)
-	- mballoc allocation and error-checking fixes in 2.6 (5504)
-	- block device patches to fix I/O request sizes in 2.6 (5482)
-	- look up hostnames for IB nals (5602)
-	- 2.6 changed lock ordering of 2 semaphores, caused deadlock (5654)
-	- don't start multiple acceptors for the same port (5277)
-	- fix incorrect LASSERT in mds_getattr_name (5635)
-	- export a proc file for general "ping" checking (5628)
-	- fix "lfs check" to not block when the MDS is down (5628)
-       * miscellania
-	- service request history (4965)
-	- put {ll,lov,osc}_async_page structs in a single slab (4699)
-	- create an "evict_client" /proc entry on OSTs, like the MDS has
-	- fix mount usage message, return errors per mount(8) (5168)
-	- change grep [] to grep "[]" in tests so they work in more UMLs
-	- fix ppc64/x86_64 spec to use %{_libdir} instead of /usr/lib (5389)
-	- remove ancient LOV_MAGIC_V0 EA support (5047)
-	- add "disk I/Os in flight" and "I/O req time" stats in obdfilter
-	- align r/w RPCs to PTLRPC_MAX_BRW_SIZE boundary for performance (3451)
-	- allow readahead allocations to fail when low on memory (5383)
-	- mmap locking landed again, after considerable improvement (2828)
-	- add get_hostaddr() to lustreDB.py for LDAP support (5459)
-
-2004-11-23  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.4.0
-       * bug fixes
-	- send OST transaction number in read/write reply to free req (4966)
-	- don't ASSERT in ptl_send_rpc() if we run out of memory (5119)
-	- lock /proc/sys/portals/routes internal state, avoiding oops (4827)
-	- the watchdog thread now runs as interruptible (5246)
-	- flock/lockf fixes (but it's still disabled, pending 5135)
-	- don't use EXT3 constants in llite code (5094)
-	- memory shortage at startup could cause assertion (5176)
-       * miscellania
-	- reorganization of lov code
-	- single portals codebase
-	- Infiniband NAL
-	- add extents/mballoc support (5025)
-	- direct I/O reads in the obdfilter (4048)
-	- kernel patches from LNXI for 2.6 (bluesmoke, perfctr, mtd, kexec)
-
-tbd         Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.9
-       * bug fixes
-	- send OST transaction number in read/write reply to free req (4966)
-	- don't ASSERT in ptl_send_rpc() if we run out of memory (5119)
-	- lock /proc/sys/portals/routes internal state, avoiding oops (4827)
-	- the watchdog thread now runs as interruptible (5246)
-	- handle missing objects in filter_preprw_read properly (5265)
-	- unsafe list practices (rarely) led to infinite eviction loop (4908)
-	- drop import inflight refcount on signal_completed_replay error (5255)
-	- unlock page after async write error during send (3677)
-	- return original error code on reconstructed replies (3761)
-	- no transno return for symlink open, don't save no-trasno open (3440)
-       * miscellania
-	- add pid to ldlm debugging output (4922)
-	- bump the watchdog timeouts -- we can't handle 30sec yet
-	- extra debugging for orphan dentry/inode bug (5259)
-
-2004-11-16  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.8
-       * bug fixes
-	- fix TCP_NODELAY bug, which caused extreme perf regression (5134)
-	- allocate qswnal tx descriptors singly to avoid fragmentation (4504)
-	- don't LBUG on obdo_alloc() failure, use OBD_SLAB_ALLOC() (4800)
-	- fix NULL dereference in /proc/sys/portals/routes (4827)
-	- allow failed mdc_close() operations to be interrupted (4561)
-	- stop precreate on OST before MDS would time out on it (4778)
-	- don't send partial-page writes before EOF from client (4410)
-	- discard client grant for sub-page writes on large-page clients (4520)
-	- don't free dentries not owned by NFS code, check generation (4806)
-	- fix lsm leak if mds_create_objects() fails (4801)
-	- limit debug_daemon file size, always print CERROR messages (4789)
-	- use transno after validating reply (3892)
-	- process timed out requests if import state changes (3754)
-	- update mtime on OST during writes, return in glimpse (4829)
-	- add mkfsoptions to LDAP (4679)
-	- use ->max_readahead method instead of zapping global ra (5039)
-	- don't interrupt __l_wait_event() during strace
-       * miscellania
-	- add software watchdogs to catch hung threads quickly (4941)
-	- make lustrefs init script start after nfs is mounted
-	- fix CWARN/ERROR duplication (4930)
-	- return async write errors to application if possible (2248)
-	- add /proc/sys/portal/memused (bytes allocated by PORTALS_ALLOC)
-	- print NAL number in %x format (4645)
-	- update barely-supported suse-2.4.21-171 series (4842)
-	- support for sles 9 %post scripts
-	- support for building 2.6 kernel-source packages
-	- support for sles km_* packages
-
-2004-10-07  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.7
-       * bug fixes
-	- ignore -ENOENT errors in osc_destroy (3639)
-	- notify osc create thread that OSC is being cleaned up (4600)
-	- add nettype argument for llmount in #5d in conf-sanity.sh (3936)
-	- reconstruct ost_handle() like mds_handle() (4657)
-	- create a new thread to do import eviction to avoid deadlock (3969)
-	- let lconf resolve symlinked-to devices (4629)
-	- don't unlink "objects" from directory with default EA (4554)
-	- hold socknal file ref over connect in case target is down (4394)
-	- allow more than 32000 subdirectories in a single directory (3244)
-	- fix blocks count for O_DIRECT writes (3751)
-	- OST returns ENOSPC from object create when no space left (4539)
-	- don't send truncate RPC if file size isn't changing (4410)
-	- limit OSC precreate to 1/2 of value OST considers bogus (4778)
-	- bind to privileged port in socknal and tcpnal (3689)
-       * miscellania
-	- rate limit CERROR/CWARN console message to avoid overload (4519)
-	- GETFILEINFO dir ioctl returns LOV EA + MDS stat in 1 call (3327)
-	- basic mmap support (3918)
-	- kernel patch series update from b1_4 (4711)
-
-2004-09-16  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.6
-       * bug fixes
-	- avoid crash during MDS cleanup with OST shut down (2775)
-	- fix loi_list_lock/oig_lock inversion on interrupted IO (4136)
-	- don't use bad inodes on the MDS (3744)
-	- dynamic object preallocation to improve recovery speed (4236)
-	- don't hold spinlock over lock dumping or change debug flags (4401)
-	- don't zero obd_dev when it is force cleaned (3651)
-	- print grants to console if they go negative (4431)
-	- "lctl deactivate" will stop automatic recovery attempts (3406)
-	- look for existing locks in ldlm_handle_enqueue() (3764)
-	- don't resolve lock handle twice in recovery avoiding race (4401)
-	- revalidate should check working dir is a directory (4134)
-       * miscellania
-	- don't always mark "slow" obdfilter messages as errors (4418)
-
-2004-08-24  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.5
-       * bug fixes
-	- don't close LustreDB during write_conf until it is done (3860)
-	- fix typo in lconf for_each_profile (3821)
-	- allow dumping logs from multiple threads at one time (3820)
-	- don't allow multiple threads in OSC recovery (3812)
-	- fix debug_size parameters (3864)
-	- fix mds_postrecov to initialize import for llog ctxt (3121)
-	- replace config semaphore with spinlock (3306)
-	- be sure to send a reply for a CANCEL rpc with bad export (3863)
-	- don't allow enqueue to complete on a destroyed export (3822)
-	- down write_lock before checking llog header bitmap (3825)
-	- recover from lock replay timeout (3764)
-	- up llog sem before sending rpc (3652)
-	- reduce ns lock hold times when setting kms (3267)
-	- change a dlm LBUG to LASSERTF, to maybe learn something (4228)
-	- fix NULL deref and obd_dev leak on setup error (3312)
-	- replace some LBUG about llog ops with error handling (3841)
-	- don't match INVALID dentries from d_lookup and spin (3784)
-	- hold dcache_lock while marking dentries INVALID and hashing (4255)
-	- fix invalid assertion in ptlrpc_set_wait (3880)
-       * miscellania
-	- add libwrap support for the TCP acceptor (3996)
-	- add /proc/sys/portals/routes for non-root route listing (3994)
-	- allow setting MDS UUID in .xml (2580)
-	- print the stack of a process that LBUGs (4228)
-
-2004-07-14  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.4
-       * bug fixes
-	- don't cleanup request in ll_file_open() on failed MDS open (3430)
-	- make sure to unset replay flag from failed open requests (3440)
-	- if default stripe count is 0, use OST count for inode size (3636)
-	- update parent mtime/ctime on client for create/unlink (2611)
-	- drop dentry ref in ext3_add_link from open_connect_dentry (3266)
-	- free recovery state on server during a forced cleanup (3571)
-	- unregister_reply for resent reqs (3063)
-	- loop back devices mounting and status check on 2.6 (3563)
-	- fix resource-creation race that can provoke i_size == 0 (3513)
-	- don't try to use bad inodes returned from MDS/OST fs lookup (3688)
-	- more debugging for page-accounting assertion (3746)
-	- return -ENOENT instead of asserting if ost getattr+unlink race (3558)
-	- avoid deadlock after precreation failure (3758)
-	- fix race and lock order deadlock in orphan handling (3450, 3750)
-	- add validity checks when grabbing inodes from l_ast_data (3599)
-       * miscellania
-	- add /proc/.../recovery_status to obdfilter (3428)
-	- lightweight CDEBUG infrastructure, debug daemon (3668)
-	- change default OSC RPC parameters to be better on small clusters
-	- turn off OST read cache for files smaller than 32MB
-	- install man pages and include them in rpms (3100)
-	- add new init script for (un)mounting lustre filesystems (2593)
-	- run chkconfig in %post for init scripts (3701)
-	- drop scimac NAL (unmaintained)
-
-2004-06-17  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.3
-       * bug fixes
-	- clean kiobufs before and after use (3485)
-	- strip trailing '/'s before comparing paths with /proc/mounts (3486)
-	- remove assertions to work around "in-flight rpcs" recovery bug (3063)
-	- change init script to fail more clearly if not run as root (1528)
-	- allow clients to reconnect during replay (1742)
-	- fix ns_lock/i_sem lock ordering deadlock for kms update (3477)
-	- don't do DNS lookups on NIDs too small for IP addresses (3442)
-	- re-awaken ptlrpcd if new requests arrive during check_set  (3554)
-	- fix cond_resched  (3554)
-	- only evict unfinished clients after recovery (3515)
-	- allow bulk resend, prevent data loss (3570)
-	- dynamic ptlrpc request buffer allocation (2102)
-	- don't allow unlinking open directory if it isn't empty (2904)
-	- set MDS/OST threads to umask 0 to not clobber client modes (3359)
-	- remove extraneous obd dereference causing LASSERT failure (3334)
-	- don't use get_cycles() when creating temp. files on the mds (3156)
-	- hold i_sem when setting i_size in ll_extent_lock() (3564)
-	- handle EEXIST for set-stripe, set proper directory name (3336)
-       * miscellania
-	- servers can dump a log evicting a client - lustre.dump_on_timeout=1
-	- fix ksocknal_fmb_callback() error messages (2918)
-
-2004-05-27  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.2
-       * bug fixes
-	- don't copy lvb into (possibly NULL) reply on error (2983)
-	- don't deref dentry after dput, don't free lvb on error (2922)
-	- use the kms to determine writeback rpc length (2947)
-	- increment oti_logcookies when osc is inactive (2948)
-	- update client's i_blocks count via lvb messages (2543)
-	- handle intent open/close of special files properly (1557)
-	- mount MDS with errors=remount-ro, like obdfilter (2009)
-	- initialize lock handle to avoid ASSERT on error cleanup (3057)
-	- don't use cancelling-locks' kms values (2947)
-	- use highest lock extent for kms, not last one (2925)
-	- don't dereference ERR_PTR() dentry in error handling path (3107)
-	- fix thread race in portals_debug_dumplog() (3122)
-	- create lprocfs device entries at setup instead of at attach (1519)
-	- common AST error handler, don't evict client on completion race (3145)
-	- zero nameidata in detach_mnt in 2.6 (3118)
-	- verify d_inode after revalidate_special is valid in 2.6 (3116)
-	- use lustre_put_super() to handle zconf unmounts in 2.6 (3064)
-	- initialize RPC timeout timer earlier for 2.6 (3219)
-	- don't dereference NULL reply buffer if mdc_close was never sent (2410)
-	- print nal/nid for unknown nid (3258)
-	- additional checks for oscc recovery before doing precreate (3284)
-	- fix ll_extent_lock() error return code for 64-bit systems (3043)
-	- don't crash in mdc_close for bad permissions on open (3285)
-	- zero i_rdev for non-device files (3147)
-	- clear page->private before handing to FS, better assertion (3119)
-	- tune the read pipeline (3236)
-	- fix incorrect decref of invalidated dentry (2350)
-	- provide read-ahead stats and refine rpc in flight stats (3328)
-	- don't hold journal transaction open across create RPC (3313)
-	- update atime on MDS at close time (3265)
-	- close LDAP connection when recovering to avoid server load (3315)
-	- update iopen-2.6 patch with fixes from 2399,2517,2904 (3301)
-	- don't leak open file on MDS after open resend (3325)
-	- serialize filter_precreate and filter_destroy_precreated (3329)
-	- loop device shouldn't call sync_dev() for nul device (3092)
-	- clear page cache after eviction (2766)
-	- resynchronize MDS->OST in background (2824)
-	- refuse to mount the same filesystem twice on same mountpoint (3394)
-	- allow llmount to create routes for mounting behind routers (3320)
-	- push lock cancellation to blocking thread for glimpse ASTs (3409)
-	- don't call osc_set_data_with_check() for TEST_LOCK matches (3159)
-	- fix rare problem with rename on htree directories (3417)
-       * miscellania
-	- allow default OST striping configuration per directory (1414)
-	- fix compilation for qswnal for 2.6 kernels (3125)
-	- increase maximum number of MDS request buffers for large systems
-	- change liblustreapi to be useful for external progs like lfsck (3098)
-	- increase local configuration timeout for slow disks (3353)
-	- allow configuring ldlm AST timeout - lustre.ldlm_timeout=<seconds>
-
-2004-03-22  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.1
-       * bug fixes
-	- fixes for glimpse AST timeouts / incorrectly 0-sized files (2818)
-	- don't overwrite extent policy data in reply if lock was blocked (2901)
-	- drop filter export grants atomically with removal from device (2663)
-	- del obd_self_export from work_list in class_disconnect_exports (2908)
-	- don't LBUG if MDS recovery times out during orphan cleanup (2530)
-	- swab reply message in mdc_close, other PPC fixes (2464)
-	- fix destroying of named logs (2325)
-	- overwrite old logs when running lconf --write_conf (2264)
-	- bump LLOG_CHUNKSIZE to 8k to allow for larger clusters (2306)
-	- fix race in target_handle_connect (2898)
-	- mds_reint_create() should take same inode create lock (2926)
-	- correct journal credits calculated for CANCEL_UNLINK_LOG (2931)
-	- don't close files for self_export to avoid uninitialized obd (2936)
-	- allow MDS with the same name as client node (2939)
-	- hold dentry reference for closed log files for unlink (2325)
-	- reserve space for all logs during transactions (2059)
-	- don't evict page beyond end of stripe extent (2925)
-	- don't oops on a deleted current working directory (2399)
-	- handle hard links to targets without a parent properly (2517)
-	- don't dereference NULL lock when racing during eviction (2867)
-	- don't grow lock extents when lots of conflicting locks (2919)
-
-2004-03-04  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.2.0
-       * bug fixes
-	- account for cache space usage on clients to avoid data loss (974)
-	- lfsck support in lustre kernel code (2349)
-	- reduce journal credits needed for BRW writes (2370)
-	- orphan handling to avoid losing space on client/server crashes
-	- ptlrpcd can be blocked, stopping ALL progress (2477)
-	- use lock value blocks to assist in proper KMS, faster stat (1021)
-	- takes i_sem instead of DLM locks internally on obdfilter (2720)
-	- recovery for initial connections (2355)
-	- fixes for mds_cleanup_orphans (1934)
-	- abort_recovery crashes MDS in b_eq (mds_unlink_orphan) (2584)
-	- block all file creations until orphan recovery completes (1901)
-	- client remove rq_connection from request struct (2423)
-	- conf-sanity test_5, proper cleanup in umount log not availale (2640)
-	- recovery timer race (2670)
-	- mdc_close recovey bug (2532)
-	- ptlrpc cleanup bug (2710)
-	- mds timeout on local locks (2588)
-	- namespace lock held during RPCs (2431)
-	- handle interrupted sync write properly (2503)
-	- don't try to handle a message that hasn't been replied to (2699)
-	- client assert failure during cleanup after abort recovery (2701)
-	- leak mdc device after failed mount (2712)
-	- ptlrpc_check_set allows timedout requests to complete (2714)
-	- wait for inflight reqs when ptlrpcd finishes (2710)
-	- make sure unregistered services are removed from the srv_list
-	- reset bulk XID's when resending them (caught by 1138 test)
-	- unregister_bulk after timeout
-	- fix lconf error (2694)
-	- handle write after unfinished setstripe, stripe-only getstripe (2388)
-	- readahead locks pages, leaves pending causing memory pressure (2673)
-	- increase OST request buffers to 4096 on large machines (2729)
-	- fix up permission of existing directories in simple_mkdir (2661)
-	- init deleted item, add assertions ptlrpc_abort_inflight() (2725)
-	- don't assign transno to errored transactions (2742)
-	- don't delete objects on OST if given a bogus objid from MDS (2751)
-	- handle large client PAGE_SIZE readdir on small PAGE_SIZE MDS (2777)
-	- if rq_no_resend, then timeout request after recovery (2432)
-	- fix MDS llog_logid record size, 64-bit array alignment (2733)
-	- don't call usermode_helper from ptlrpcd, DEFAULT upcall (2773)
-	- put magic in mount.lustre data, check for bad/NULL mount data (2529)
-	- MDS recovery shouldn't delete objects that it has given out (2730)
-	- if enqueue arrives after completion, don't clobber LVB (2819)
-	- don't unlock pages twice when trigger_group_io returns error (2814)
-	- don't deref NULL rq_repmsg if ldlm_handle_enqueue failed (2822)
-	- don't write pages to disk if there was an error (1450)
-	- don't ping imports that have recovery disabled (2676)
-	- take buffered bytes into account when balancing socknal conn (2817)
-	- hold a DLM lock over readdir always, use truncate_inode_pages (2706)
-	- reconnect unlink llog connection after MDS reconnects to OST (2816)
-	- remove little-endian swabbing of llog records (1987)
-	- set/limit i_blksize to LL_MAX_BLKSIZE on client (2884)
-	- retry reposting request buffers if they fail (1191)
-	- grow extent at grant time to avoid granting a revoked lock (2809)
-	- lock revoke doesn't evict page if covered by a second lock (2765)
-	- disable VM readahead to avoid reading outside lock extents (2805)
-       * miscellania
-	- return LL_SUPER_MAGIC from statfs for the filesystem type (1972)
-	- updated kernel patches for hp-2.4.20 kernel (2681)
-
-2004-02-07  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.0.4
-       * kernel patches
-	- fix truncated write corruption (2366)
-	- fix for failed assertion in iopen_connect_dentry (1792,2517)
-       * bug fixes
-	- don't flag the ptlrpcd thread with PF_MEMALLOC (2636)
-	- ensure len(uuid) < 37 in lmc (1171)
-	- fix ia64 OOPS in llog_test (2255)
-	- zero end of page at obdfilter for partial page writes (2648)
-	- don't leave stale dentries around after renames (bug 2428)
-	- fix timeouts when evicting a client with a single lock held (2642)
-	- set deadline for the initial HELLO message to drain (2634)
-	- print out dotted-quad IP addresses in the socknal (2302)
-       * miscellania
-	- additional debugging for MDS client eviction problem (2443)
-	- fix mkfsoptions support for osts (2603, 2604)
-
-2004-01-27  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.0.3
-       * kernel patches
-	- add series for the vanilla 2.6.0 kernel
-	- add series for the vanilla 2.4.24 kernel
-	- add series for a cray x86/64 UL kernel drop
-	- fix xattr patches for the vanilla 2.4.19 series
-       * bug fixes
-	- generate true UUIDs in lmc (1171)
-	- have portals stack dumping break in UML (2466)
-	- avoid bad dchild deref; avoid inum lock w/o creation (2362)
-	- allocate with _NOFS in ldlm to avoid deadlock (1933)
-	- wake callback waiting threads on client eviction (2460)
-	- Add --ptldebug and --subsystem to lmc (1719)
-	- update assertion to allow safe interrupt allocation
-	- set rq_no_resend for cancel requests (2432)
-	- recalculate ptlrpcd timeout after resend (2494)
-	- call vfs_rmdir when removing pending directories (2368)
-	- fix renaming a file to itself (2429)
-	- lmc creates a default one-stripe lov (2454)
-	- expand procfs space to handle large clusters (2326)
-	- increase UML stack to avoid overflow
-	- update lconf's list of debug and subsystem masks
-	- fix lfs find --obd (2510)
-	- /proc tunable for disabling filter read caching (2591)
-	- stop rpm packages from altering slapd.conf (2301)
-	- disable nagle in the socknal under 0conf (2578)
-	- choose mds inode size based on stripe count (2572)
-	- fix kernel-source rpm problems (2516)
-       * miscellania
-	- add --disable-doc to avoid pdf generation (2421)
-	- update documentation, tests, type-os, comments
-	- avoid format warnings on ia64
-	- remove the TOE NAL
-	- tiny code cleanups by removing unused fields
-
-2004-01-07  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.0.2
-       * bug fixes
-	- fix obvious semaphore misuse in as-yet-unused setattr path (2348)
-	- remove the most blatant lies from BUILDING file (2371)
-	- change default debug level to reasonable production setting
-	- reduce client side cache size to reduce cache flush time
-	- reduce max RPCs in flight to avoid unnecessary file fragmentation
-	- make TCP zerocopy and pinger support enabled by default (2476)
-	- sync writes completed after process exits caused crashes (2319)
-	- maintain correct mount count on the MDS (2356)
-	- backout 1557, because 2316 wasn't really fixed
-	- better file I/O statistics gathering in /proc
-	- don't take unnecessary, deadlock-inducing bug in readpage (2383)
-	- another kernel patch to fix zero-copy TCP function export
-	- don't take duplicate lock when processing re-sent getattr (2420)
-	- lctl uses obd_self_export instead of creating new conn (2353)
-	- MDS/OST recovery case which requires object creation asserted (2425)
-	- move lfs from /usr/sbin to /usr/bin in packages
-	- fix race between mds_client_add and mds_client_free (2417)
-	- use kmalloc instead of slabs in portals (2430)
-	- don't create duplicate records when a failover MDS is present (2442)
-	- remove unnecessary mount age check (2332)
-	- don't remove directory inodes from locks prematurely (2451)
-	- don't break if MDS service name is the same as hostname (2103)
-	- fix races in client write RPC generation when cache full (2482)
-
-2003-12-13  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.0.1
-       * bug fixes
-	- remove now-unused request->rq_obd (278)
-	- if an allocation fails, print out how much memory we've used (1933)
-	- use PORTAL_SLAB_ALLOC for structures, to get GFP_MEMALLOC (1933)
-	- add the "configurable stack size" patch to most series files (1256)
-	- ability to write large log records, for 100+ OST configs (2306)
-	- fix NULL deref when filter_prep fails (2314)
-	- fix operator precedence error in filter_sync
-	- dynamic allocation of socknal TX descriptors (2315)
-	- fix a missed case in the GFP_MEMALLOC patch, can cause deadlock (2310)
-	- fix gcc 2.96 compilation problem in xattr kernel patch (2294)
-	- ensure that CWARN messages in Portals always get to the syslog
-	- __init/__exit are not for prototype decls (ldlm_init/exit)
-	- x86-64 compile warning fixes
-	- fix gateway LMC keyword conflict (2318)
-	- fix MDS lock inversions in getattr/reint paths (1844)
-	- fix a rare lock re-ordering bug, which caused deadlock (2322)
-	- fix i_sem/journal inversion in fsfilt_ext3_write_record (2306)
-	- DLM race condition prevented some lock evictions (2328)
-	- ENOMEM detection and retry on socknal sends (2230)
-	- use GFP_NOFS throughout Lustre, to combat ENOMEM (2230)
-	- move osc_rpcd into ptlrpc, for use in MDC and others (2329)
-	- protect MDS inode fsdata with stronger locking; fixes assertion (2313)
-	- better error messages when a client is rejected during recovery (1505)
-	- avoid cancelling locks which were never granted, after failure (2330)
-	- fix i_sem/journal inversion in mds_client_add (2333)
-	- fix truncate/getattr lock cycle deadlock (2334)
-	- use rpcd to send close; allows resend after timeout, avoid leak (1897)
-	- fix two rare exit paths which could leak an l_lock() ref (2321)
-	- fencepost error in MDS/OST orphan recovery (2226)
-	- make log record alignment 8 bytes (1988)
-	- lstripe now fails when requested offset > ost_count (2237)
-	- ensure that all kernel series have a complete list.h (1607)
-	- fix crashes in special-file operations (2316)
-	- lctl create/brw OID mismatch, caused by obsolete filter loop (2339)
-       * miscellania
-	- allow configurable automake binary, for testing new versions
-	- small update to the lfs documentation
-
-2003-12-03  Cluster File Systems, Inc. <info@clusterfs.com>
-       * version 1.0.0
-       * fix negative export reference count in fsfilt_sync (2312)
-
-2003-12-01  Cluster File Systems, Inc. <info@clusterfs.com>
-       * release candidate 0.9.1
-       * bug fixes
-	- orphans are moved into the PENDING directory for possible recovery
-	- replayed opens now open by fid for orphan/rename safety (1042)
-	- last close of an orphan inode generates a transno (683)
-	- chdir() and mount() now pin the directory entry (1020)
-	- avoid CERROR in normal ll_setattr_raw() error case (1500)
-	- discard very old requests without processing them (1502)
-	- remove some common, well-understood CERRORs (1505)
-	- require O_DIRECT I/O to be page-sized to workaround IA64 crash (1609)
-	- clear "grant" flags in OST replies until OST grant code lands (1644)
-	- fix read performance by not clobbering i_blksize on client (1598)
-	- fix __ldlm_handle2lock oops by not dereferencing lock after PUT (1625)
-	- make LRU size a /proc tunable, clears locks when reduced (707)
-	- fix some lprocfs rot that prevented ptlbd from loading (1732)
-	- server locks take references on exports now (1558)
-	- build fixes for 2.4.20-rh trees (1663)
-	- return an error from lov_create if all OSCs are inactive (1751)
-	- fix import levels when a reconnect happens without a timeout (1597)
-	- exit early from mds_open if we get a lookup error (1749)
-	- partial page read at EOF wouldn't wait for disk before sending (1642)
-	- avoid NULL deref in obdfilter when reading page past EOF (1592)
-	- avoid LASSERT in ll_intent_lock if server failed very early (1090)
-	- fix LBUG in ll_it_open_error with rc = -2 (1861)
-	- write/truncate lock inversion (1639)
-	- Don't auto-load obdclass, portals modules during cleanup (1495)
-	- fix timestamps from jumping to "now" (1763)
-	- extra journal assertions (1648)
-	- add an extra multiunlink test (1771)
-	- fix read_record/write_record API (1776)
-	- fix leak of offset_extent, possible incorrect i_size later (1772)
-	- fix lasserts in mis-matched transnos during open-unlink testing (1541)
-	- Debugging for the kqswnal_get_idle_tx problems (1820)
-	- Allow recovery to be attempted multiple times (1536)
-	- Write out MDS last_rcvd file after it is first created (1600)
-	- Fix tx_descriptor leak in failed transmit situations (1827)
-	- ext3 journaling fixes for assertion failure after IO error (1871)
-	- class_export_put() on freed export after completion AST error (1896)
-	- Fix revalidate looping in VFS (1322)
-	- Don't access a freed export during MDS_REINT timeout (1521)
-	- Add open-unlink recovery support on the MDS (1673,1764)
-	- Return an error if no MDS data was read from last_rcvd (1946)
-	- Fix for lookup "." or ".." crash on error (1932,1931,1935)
-	- Don't setup a disk device that doesn't match exported UUID (317)
-	- Reduce bulk RPC timeout to avoid cascading client/OST failures (1845)
-	- avoid committing NULL handle in force close
-	- local.sh is now a one-stripe LOV configuration
-	- POSIX utime.4 -EPERM on FIFO not owned by user (56)
-	- fix ext3 htree duplicate directory entry corruption (1516)
-	- POSIX creat.13, fstat.1, open.18, stat.3 new file atime/mtime (2020)
-	- update to new LOV EA format (2097)
-	- interoperability for different PAGE_SIZE/wordsize (686,1821,1343,2042)
-
-2003-06-15  Phil Schwan  <phil@clusterfs.com>
-       * version v0_7
-       * bug fixes
-	- imports and exports cleanup too early, need refcounts (349, 879, 1045)
-	- per-import/export recovery handling (958, 931, 959)
-	- multiple last-rcvd slots, for serving multiple FSes (949)
-	- connections are again shared between multiple imp/exports (963, 964)
-	- "umount -f" would hang if any requests needed to be sent (393, 978)
-	- avoid pinning large req buffer by copying for queued messages (989)
-	- add "uuid" to "lctl device" command to help upcalls (991)
-	- "open" RPCs with transnos would confuse recovery counters (1037)
-	- do proper endian conversion of all wire messages (288, 340, 891)
-	- remove OST bulk get LBUGs, fix ost_brw_write cleanup (1126)
-	- call waiting locks callback from LDLM recovery thread (1127, 1151)
-	- fix ptlrpc_connection leak in target_handle_connect (1174)
-	- fix import refcounting bug in OST and MDS cleanup (1134)
-	- if an invalid-at-open-time OSC returned before close(), LBUG (1150)
-	- fix very unlikely obd_types race condition (501)
-	- remove osc_open hack for echo_client (1187)
-	- we leaked exports/dlmimps for forcibly disconnected clients (1143)
-	- a failure in read_inode2 leads to deadlock (1139)
-	- cancel ack-locks as soon as transaction is committed (1072)
-	- fix major leaks and crashes in the bulk I/O path (937, 1057)
-	- make sure to commitrw after any preprw to avoid deadlock (1162)
-	- failing to execute a file in a lustre FS would lock inode (1203)
-	- small DEBUG_REQ fix to avoid dereferencing a NULL (1227)
-	- don't ASSERT while cleaning up an incompletely-setup obd (1248)
-	- obd_uuid2tgt would walk off the end of the list (1255)
-	- on IA64 the osc would give portals incorrect bulk size (1258)
-	- fix debug daemon ioctl interface; allows daemon on ia64 (1274)
-	- fix lock inversion caused by new llite matching code (1282)
-	- limit the number of dirty pages on a client to 10MB (1286)
-	- timed out locks were not being corrected cancelled (1289)
-	- fix O_DIRECT above 4GB on IA-32 (1292)
-       * major user-visible changes
-	- fail out/fail over policy now controlled by the upcall (993)
-       * protocol changes
-	- add OBD_PING to check server availability and failure (954)
-	- lustre messages are now sent in sending host order (288, 340, 891)
-	- add eadatalen to MDS getattr reply (340)
-	- OST read replies may contain second buffer, with per-page status (593)
-
-2003-03-11  Phil Schwan  <phil@clusterfs.com>
-       * version v0_6
-       * bug fixes
-	- LDLM_DEBUG macro fix, for gcc 3.2 (850)
-	- failed open()s could cause deadlock; fixed (867, 869)
-	- stop cancelling OST locks when files are closed (481)
-	- overlapping XID spaces caused network corruption (851, 853)
-	- fix unsafe fsfilt counter arithmetic; change to atomic_t
-	- setattr_raw added, to do single-RPC, server-side setattrs
-	- lmc/lconf syntax change for OST UUIDs
-	- fix crashy race condition between ptlrpc_free_req and osc_close
-	- don't use request in mdc_enqueue if we hit a timeout (889)
-	- don't set the inode i_size for regular files from the MDS (896)
-	- handle out of order completion AST (842)
-	- don't LBUG if a lock request times out after receiving AST (913)
-	- avoid d_rehash race in ll_find_alias by rehashing inside dcache_lock
-	- if a bad lock AST arrives, send an error instead of dropping entirely
-	- return 0 from revalidate2 if ll_intent_lock returns -EINTR (912)
-	- fix leak in bulk IO when only partially completed (899, 900, 926)
-	- fix O_DIRECT for ia64 (55)
-	- (almost) eliminate Lustre-kernel-thread effects on load average (722)
-	- C-z after timeout could hang a process forever; fixed (977)
-       * Features
-	- client-side I/O cache (678, 924, 929, 941, 970)
-       * protocol changes
-	- READPAGE and SETATTRs which don't take server-side locks get
-	  their own portal
-
-2003-02-11  Phil Schwan  <phil@clusterfs.com>
-	* version v0_5_20
-	* bug fixes
-	 - Fix ldlm_lock_match on the MDS to avoid matching remote locks (592)
-	 - Fix fsfilt_extN_readpage() to read a full page of directory
-	   entries, or fake the remainder if PAGE_SIZE != blocksize (500)
-	 - Avoid extra mdc_getattr() in ll_intent_lock when possible (534, 604)
-	 - Fix imbalanced LOV object allocation and out-of-bound access (469)
-	 - Most intent operations were removed, in favour of a new RPC mode
-	   that does a single RPC to the server and bypasses most of the VFS
-	 - All LDLM resource ID arrays were removed in favour of ldlm_res_id
-	 - Aggressively cancel local locks on DLM servers
-	 - mds_reint_unlink sends EA to the client if it's the last nlink.
-	   client uses that EA to unlink OST objects.
-	 - mds_reint_{rename,unlink,link} were rewritten to take ordered locks
-	 - recursive symlinks were fixed (439)
-	 - fixed NULL deref in DEBUG_REQ
-	 - filter_update_lastobjid no longer calls sync, which annoyed extN
-	 - fixed multi-client small-writes to a single file problem (445)
-	 - fixed mtime updates during file writes (607)
-	 - fixed vector writes on obdfilter causing problems when ENOSPC (670)
-	 - fixed bug in obd_brw_read/write() (under guise of testing 367)
-	 - fixed Linux OST size reporting problem (444, 656)
-	 - OST now updates object mtime with writes or setattr (607, 619)
-	 - client verifies file size before zeroing page past EOF (445)
-	 - OST now writes last allocated objid to disk with allocation (108)
-	 - LOV on echo now works (409)
-	* protocol changes
-	 - mds_reint_unlink sends a new buffer, with the EA included.  this
-	   buffer is only valid if body->valid & OBD_MD_FLEASIZE, which is only
-	   set if a regular file was being unlinked, and it was the last link
-	 - use PtlGet from the target for bulk writes (315)
-	 - OST now updates object mtime with writes or setattr (607, 619)
-	 - LDLM now has a grant-time callback to revalidate locked items, if
-	   necessary (604)
-	 - Many MDS operations were reorganized to combat race conditions
-	* other changes
-	 - Merge b_intel branch (updated lprocfs code) - now at /proc/fs/lustre
-	 - configure check to avoid gcc version 2.96 20000731-2.96-98) (606)
-
-2003-01-06  Andreas Dilger  <adilger@clusterfs.com>
-	* version v0_5_19
-	* bug fixes
-	 - Fully reactivate OST imports after reconnection (512, others)
-	 - Make sure client sees our -ENOTCONN from mds_handle (513 - partial)
-	 - More graceful error handling for truncating on dead OST (515)
-	 - Don't error out unless we're actually accessing dead stripes (474)
-	 - Fix garbage sizes when stripes are missing (410)
-	 - LRU counters were broken, causing constant lock purge (433, 432)
-	 - garbage on read from stripes with failed OSTs (441)
-	 - mark OSCs as active before reconnecting during recovery (438)
-	 - lov_enqueue and lov_cancel need to handle inactive OSTs (403)
-	 - lfind did not preserve OST order in output (443)
-	 - symlinks cause hung clients, incorrect data (439)
-	 - stop dereferencing request after dropping refcount (457)
-	 - don't LASSERT(spin_is_locked) on non-SMP (455)
-	 - fixes for many rename() bugs
-	 - fstat didn't correctly synchronize attributes (399)
-	 - server must handle lock cancellation during blocking AST prep (487)
-	 - bulk descriptors were free()d too soon (511)
-	 - fix paths in lconf, which would load incorrect modules (451, 507)
-	 - fix confusing lconf 'host not found' error message (386)
-	 - fix lock order deadlock on OST (O/R i_sem before journal ops, 478)
-	 - fix race condition in mdc_blocking_ast() for inode access (526)
-	 - fix lov_unpackmd() unpacking wrong number of stripes (537)
-	 - fix lov_set_osc_active() marking wrong OSC inactive (440)
-	 - fix bad lstripe lov_unpackmd() assertion (fix layering too) (527)
-	 - fix multiple writes of stripe MD to MDS (358, maybe 519)
-	 - fix lstripe in several ways (kernel side) (527)
-	 - fix request leak in ldlm_cli_enqueue (262)
-	 - incorrect OSC was marked inactive after OST failure
-	 - call mds_fs_cleanup before unmounting filesystem (524)
-	 - fix races between taking ns_lock and ldlm_lock_change_resource
-	 - fix races updating LOV export open file list
-	 - fix lov_enqueue error path, avoid decref-ing bad lock handle
-	 - fix recovery NULL deref in ldlm_cli_cancel_unused
-	 - fix some DLM races by using new hash table for lock handles (419)
-	 - permit the client to specify desired inodes, at replay
-	 - duplicate requests when we queue them for replay reintegration
-	 - fix last_rcvd offset calculation
-	 - sync after each recovered transaction, so we always make progress
-	 - never, not always, ERESTART requests without transnos
-	 - store the lov_desc in the MDS, so we don't depend on getlovinfo to
-	   set it
-	 - skip replay if the MDS says that the client is already connected
-	 - don't check for a recovery-enabled export to match lctl's UUID
-	 - don't INC_USE_COUNT for phantom exports
-	 - don't crash when cleaning up phantom exports (567)
-	 - don't double-finish or set replay data for errored mdc_open requests
-	 - abort requests when they time out, so we don't get old replies
-	 - send/receive replies for AST messages again
-	 - if the client says that it doesn't have the lock, cancel it on the
-	   server
-	 - if we timeout during I/O, don't try to cancel an in-use lock; instead
-	   mark it as destroyed, it will all work out when decref is called
-	 - fix module use counts (22, 581)
-	* protocol changes
-	 - ASTs now expect a reply (server cancels lock on error reply)
-
-2002-12-02  Andreas Dilger  <adilger@clusterfs.com>
-	* version v0_5_18
-	* bug fixes
-	  - fix many simultaneous client startup (392)
-	  - fix dentry->d_it clobbering
-	  - credentials weren't being shipped for readdir/getattr operations
-	  - remove invalid assertions triggered during some concurrent MD
-	    updates
-	  - proper Lustre versions added (336, 389)
-	  - fix memory leak for create error case (398)
-	  - fix LOV locking bug that would get cli/srv out of sync
-	  - fix echo client over LOV (409)
-	  - fix dbench 2, extN refcount problem (170, 258, 356, 418)
-	  - fix double-O_EXCL intent crash (424)
-	  - avoid sending multiple lock CANCELs (352)
-	* Features
-	  - MDS can do multi-client recovery (modulo bugs in new code)
-	* Documentation
-	  - many updates, edits, cleanups
-
-2002-11-18  Phil Schwan  <phil@clusterfs.com>
-	* version v0_5_17
-	* bug fixes
-	  - fix null d_it dereference (346)
-	  - fix full OST/dbench hang (333)
-	  - fix permission problem with file removal (286)
-	  - fix removal of OSCs from LOV when they fail
-	  - fix NULL deref during bulk timeout (214)
-	  - fix problems related to multiple filesystems on one MDS (241)
-	  - fixed serious subtle metadata locking bugs
-	  - free locks on clients when inodes are removed due to memory
-	    pressure (201)
-	  - fix inode pointer in lock data (285)
-	  - partial support for multiple MDS on a single host (241)
-	  - data locks weren't cancelled at clear_inode time (290, 311)
-	  - intent locks could lead to unbounded lock growth (205)
-	  - added a maximum lock count, an LRU list, and a flusher
-	  - fix multiple rename (365)
-	  - properly abstracted the echo client
-	  - OSC locked 1 byte too many; fixed
-	  - rewrote brw callback code:
-	  - fixed recovery bugs related to LOVs (306)
-	  - fixed too-many-pages-in-one-write crash (191)
-	  - fixed (again) crash in sync_io_timeout (214)
-	  - probably fixed callback-related race (385)
-	* protocol change
-	  - Add capability to MDS protocol
-	  - LDLM cancellations and callbacks on different portals
-
-2002-10-28  Andreas Dilger  <adilger@clusterfs.com>
-	* version v0_5_16
-	* bug fixes:
-	  - limit client IOV size to PTL_MD_MAX_IOV (611336, 191)
-	  - defer open object destruction to close time (601981, 138)
-	  - open/close OST file handle in obdo (OBD_MD_FLHANDLE) (601981, 138)
-	  - move LDLM_ENQUEUE/CONVERT back to MDS portal (625069)
-	  - abstract ll_lookup2, fix ll_revalidate2 to use abstraction (256)
-	  - don't call obd_setattr in ll_file_release for destroyed objects
-	* protocol change to lustre_msg: move |version| and add |flags|
-	* protocol change to osc_punch: "start" in "o_size", "end" in "o_blocks"
-	* lock replay: for LDLM_FL_REPLAY trust client to do right thing
-	* added replay of create, unlink, link and rename operations during
-	  MDS failover; recovery should be much more robust now
-	* remove failed OSCs from LOVs (only lov_create uses this so far)
-	* the lustre-HOWTO was brought (more) up to date (582544)
-
-2002-10-23  Phil Schwan  <phil@clusterfs.com>
-	* version v0_5_15
-	* bug fixes:
-	  - in-use dentries weren't being reused properly (617851)
-	  - prevent multiple LDLM setup (599178)
-	  - fix LOV size calculations for truncate (617853)
-	  - fix client handling of MDS intent errors (POSIX)
-	  - fix permission bug in lovstripe.c test (624321)
-	  - fix MDS thread deadlock - move LDLM handler to DLM portal (625069)
-	  - truncate past end of file could corrupt data
-	  - proper cleanup after timeouts, crashes, etc (592524, 550815)
-	  - a race in recovery could return ETIMEDOUT to apps (623947)
-	  - building outside the source directory was fixed
-	* the lustre-HOWTO was brought (more) up to date (582544)
-	* major progress was made on recovery functionality
-
-2002-10-10  Phil Schwan  <phil@clusterfs.com>
-	* version v0_5_14
-	* bug fixes:
-	  - recovery deadlock fix
-	  - rm -rf causes LBUG fix (617817)
-	  - file open by multiple tasks fix (618962)
-	  - directory permissions bugs (602707 and 620007)
-	  - journal_stop fixed with locking (611313)
-	  - O_APPEND failures resolved (618273, perhaps 614459)
-	  - lconf PATH fix (619770)
-	  - IA64 build fix (621450)
-	  - RPC buffer sizes scale with amount of memory
-
-2002-10-01  Phil Schwan  <phil@clusterfs.com>
-	* version v0_5_13
-	* bug fixes:
-	  - locks would be cancelled without throwing away data pages,
-	    resulting in inconsistent data (605627)
-	  - inode attributes were not always being refreshed (605627, 612449)
-	  - lconf now continues to cleanup after lctl reports an error
-	  - MDS now enforces user permissions (602707)
-	  - lprocfs cleanup fixed, but not yet enabled (614157)
-	  - fixed infinite server hang, should a client not respond to an AST
-	  - avoid going into recovery if user calls readlink() with a buffer
-	    that's too small (613941)
-	  - AST RPCs no longer require replies (614867) -- this may be changed
-	  - don't crash server if client sends an IOV that's too big (611336)
-	  - fixed lock conversion deadlock (611892)
-	  - fixed the following of symlinks (614622)
-	* recovery: the server can remove locks from a client that dies, other
-	  clients can make progress
-	* more extN patch fixes
-	* compile-time configurable ptlrpc buffer allocations
-	* documentation
-	  - collaborative read cache document
-	  - Lustre Lite Performance CDR document-in-progress
-
-2002-09-20  Andreas Dilger  <adilger@clusterfs.com>
-	* version v0_5_12
-	* bug fix
-	  - fix typo in patch-2.4.18
-
-2002-09-20  Andreas Dilger  <adilger@clusterfs.com>
-	* version v0_5_11
-	* bug fixes
-	  - clear ptlrpc request each time in handle_incoming_request()
-	  - unlink of files now destroys the object on the OST
-
-2002-09-19  Peter Braam  <braam@clusterfs.com>
-	* version 0_5_10
-	* add hard link support
-	* change obdfile creation method
-	* kernel patch changed
-
-2002-09-19  Peter Braam  <braam@clusterfs.com>
-	* version 0_5_9
-	* bug fix
-	  - stack overflow bug in extN fixed
-
-2002-09-18  Andreas Dilger  <adilger@clusterfs.com>
-	* version 0_5_8
-	* documentation updates
-	  - add man pages for config tools
-	  - update tests/README to describe testing with new config tools
-	  - finish metadata API descriptions
-	* bug fixes and cleanups
-	  - statfs workaround for 16TB limit
-	  - LOV stripe allocation improved, can stripe on subset of OSTs
-	  - LOV file size/IO offset was wrong for files > 4GB in size
-	  - object EA data was being dropped, caused files to be unreadable
-	  - memory overflow with non-LOV OST caused memory corruption
-	  - fixed regression tests to work with new config tools, obdfilter
-	  - fixed bug when directory size became larger than 1 block
-	  - fixed bug (for single client case) when PWD was deleted
-	  - invalidate local directory pages when doing intent-based ops
-	  - avoid LDLM oops when lock callback contained bad data
-
-2002-09-09  Andreas Dilger  <adilger@clusterfs.com>
-	* version 0_5_7
-	* documentation updates
-	* bug fixes and cleanups
-	  - configuration tools
-	  - LOV
-	  - imports/exports
-	  - 64-bit compile warnings
-	  - 64-bit internal statfs data
-	  - many more
-	* test_brw on persistent OST devices
-	* MDS recovery
-	* lprocfs (disabled)
-
-2002-09-04  Andreas Dilger  <adilger@clusterfs.com>
-	* version 0_5_6
-	* documentation updates
-	* bug fixes and cleanups
-	* configuration tools
-
-2002-08-30  Peter J. Braam  <braam@clusterfs.com>
-
-	* version v0_5_5
-	* many small fixes to 0_5_4
-	* io/network handling
-	* thinkos in MDS operations
-
-2002-08-24  Peter J. Braam  <braam@clusterfs.com>
-
-	* version v0_5_4
-	* crucial basic fixes to 0.5.3
-	* IOR, Iozone work over Elan
-	* EOF locks added
-
-2002-08-07  Phil Schwan  <phil@clusterfs.com>
-	* version 0_5_3, our first alpha
-	* we use the new Portals iovs
-	* documentation updates
-	* bug fixes and cleanups
-	* small changes in the DLM wire protocol
-
-2002-07-25  Peter J. Braam  <braam@clusterfs.com>
-	* version 0_5_1 with some initial stability,
-	* locking on MD and file I/O.
-	* documentation updates
-	* several bug fixes since 0.5.0
-	* small changes in wire protocol
-
-2002-07-18  Phil Schwan  <phil@clusterfs.com>
-	* version v0_4_5
-	* delivered as Lustre Light Alpha
-	* fixed a crash after handling invalid MDS requests
-	* fixed directory pages for architectures with non-4k pages sizes
-
-2002-07-11  Andreas Dilger  <adilger@clusterfs.com>
-	* release version v0_4_4
-	* Moves TCP acceptor to be on port 2432 (unused Coda port) instead
-	  of 1234.
-	* Fixes a number of interruption problems with OST operations.
-	* Update documentation for portals header changes
-	* Move all wire protocol structs/defines to lustre_idl.h
-	* Fixes symlink length bug.
-	* Add tcpdump to repository.
-
-2002-07-05  Andreas Dilger  <adilger@clusterfs.com>
-	* release version v0_4_3
-	* Fixes statfs for inodes on extN.
-	* Fixes bug in runtests which would delete /etc/hosts.
-	* Use 64-bit object IDs wherever possible (not into VFS though)
-	  Remove ost_get_info, which is unused by lustre, and out of date.
-
-2002-07-03  Peter Braam  <braam@clusterfs.com>
-	* release version v0_4_2   Fixes a lookup error (type not passed)
-	* move forward to head of Portals
-	* move forward to latest Lustre kernel
-
-2002-06-25  Peter Braam  <braam@clusterfs.com>
-	* release version v0_4_1.  Hopefully stable on single node use.
diff --git a/lustre/FDL b/lustre/FDL
deleted file mode 100644
index b42936beb35d5bbf217cb7eecd8eb8c504e8979a..0000000000000000000000000000000000000000
--- a/lustre/FDL
+++ /dev/null
@@ -1,355 +0,0 @@
-		GNU Free Documentation License
-		   Version 1.1, March 2000
-
- Copyright (C) 2000  Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-0. PREAMBLE
-
-The purpose of this License is to make a manual, textbook, or other
-written document "free" in the sense of freedom: to assure everyone
-the effective freedom to copy and redistribute it, with or without
-modifying it, either commercially or noncommercially.  Secondarily,
-this License preserves for the author and publisher a way to get
-credit for their work, while not being considered responsible for
-modifications made by others.
-
-This License is a kind of "copyleft", which means that derivative
-works of the document must themselves be free in the same sense.  It
-complements the GNU General Public License, which is a copyleft
-license designed for free software.
-
-We have designed this License in order to use it for manuals for free
-software, because free software needs free documentation: a free
-program should come with manuals providing the same freedoms that the
-software does.  But this License is not limited to software manuals;
-it can be used for any textual work, regardless of subject matter or
-whether it is published as a printed book.  We recommend this License
-principally for works whose purpose is instruction or reference.
-
-
-1. APPLICABILITY AND DEFINITIONS
-
-This License applies to any manual or other work that contains a
-notice placed by the copyright holder saying it can be distributed
-under the terms of this License.  The "Document", below, refers to any
-such manual or work.  Any member of the public is a licensee, and is
-addressed as "you".
-
-A "Modified Version" of the Document means any work containing the
-Document or a portion of it, either copied verbatim, or with
-modifications and/or translated into another language.
-
-A "Secondary Section" is a named appendix or a front-matter section of
-the Document that deals exclusively with the relationship of the
-publishers or authors of the Document to the Document's overall subject
-(or to related matters) and contains nothing that could fall directly
-within that overall subject.  (For example, if the Document is in part a
-textbook of mathematics, a Secondary Section may not explain any
-mathematics.)  The relationship could be a matter of historical
-connection with the subject or with related matters, or of legal,
-commercial, philosophical, ethical or political position regarding
-them.
-
-The "Invariant Sections" are certain Secondary Sections whose titles
-are designated, as being those of Invariant Sections, in the notice
-that says that the Document is released under this License.
-
-The "Cover Texts" are certain short passages of text that are listed,
-as Front-Cover Texts or Back-Cover Texts, in the notice that says that
-the Document is released under this License.
-
-A "Transparent" copy of the Document means a machine-readable copy,
-represented in a format whose specification is available to the
-general public, whose contents can be viewed and edited directly and
-straightforwardly with generic text editors or (for images composed of
-pixels) generic paint programs or (for drawings) some widely available
-drawing editor, and that is suitable for input to text formatters or
-for automatic translation to a variety of formats suitable for input
-to text formatters.  A copy made in an otherwise Transparent file
-format whose markup has been designed to thwart or discourage
-subsequent modification by readers is not Transparent.  A copy that is
-not "Transparent" is called "Opaque".
-
-Examples of suitable formats for Transparent copies include plain
-ASCII without markup, Texinfo input format, LaTeX input format, SGML
-or XML using a publicly available DTD, and standard-conforming simple
-HTML designed for human modification.  Opaque formats include
-PostScript, PDF, proprietary formats that can be read and edited only
-by proprietary word processors, SGML or XML for which the DTD and/or
-processing tools are not generally available, and the
-machine-generated HTML produced by some word processors for output
-purposes only.
-
-The "Title Page" means, for a printed book, the title page itself,
-plus such following pages as are needed to hold, legibly, the material
-this License requires to appear in the title page.  For works in
-formats which do not have any title page as such, "Title Page" means
-the text near the most prominent appearance of the work's title,
-preceding the beginning of the body of the text.
-
-
-2. VERBATIM COPYING
-
-You may copy and distribute the Document in any medium, either
-commercially or noncommercially, provided that this License, the
-copyright notices, and the license notice saying this License applies
-to the Document are reproduced in all copies, and that you add no other
-conditions whatsoever to those of this License.  You may not use
-technical measures to obstruct or control the reading or further
-copying of the copies you make or distribute.  However, you may accept
-compensation in exchange for copies.  If you distribute a large enough
-number of copies you must also follow the conditions in section 3.
-
-You may also lend copies, under the same conditions stated above, and
-you may publicly display copies.
-
-
-3. COPYING IN QUANTITY
-
-If you publish printed copies of the Document numbering more than 100,
-and the Document's license notice requires Cover Texts, you must enclose
-the copies in covers that carry, clearly and legibly, all these Cover
-Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
-the back cover.  Both covers must also clearly and legibly identify
-you as the publisher of these copies.  The front cover must present
-the full title with all words of the title equally prominent and
-visible.  You may add other material on the covers in addition.
-Copying with changes limited to the covers, as long as they preserve
-the title of the Document and satisfy these conditions, can be treated
-as verbatim copying in other respects.
-
-If the required texts for either cover are too voluminous to fit
-legibly, you should put the first ones listed (as many as fit
-reasonably) on the actual cover, and continue the rest onto adjacent
-pages.
-
-If you publish or distribute Opaque copies of the Document numbering
-more than 100, you must either include a machine-readable Transparent
-copy along with each Opaque copy, or state in or with each Opaque copy
-a publicly-accessible computer-network location containing a complete
-Transparent copy of the Document, free of added material, which the
-general network-using public has access to download anonymously at no
-charge using public-standard network protocols.  If you use the latter
-option, you must take reasonably prudent steps, when you begin
-distribution of Opaque copies in quantity, to ensure that this
-Transparent copy will remain thus accessible at the stated location
-until at least one year after the last time you distribute an Opaque
-copy (directly or through your agents or retailers) of that edition to
-the public.
-
-It is requested, but not required, that you contact the authors of the
-Document well before redistributing any large number of copies, to give
-them a chance to provide you with an updated version of the Document.
-
-
-4. MODIFICATIONS
-
-You may copy and distribute a Modified Version of the Document under
-the conditions of sections 2 and 3 above, provided that you release
-the Modified Version under precisely this License, with the Modified
-Version filling the role of the Document, thus licensing distribution
-and modification of the Modified Version to whoever possesses a copy
-of it.  In addition, you must do these things in the Modified Version:
-
-A. Use in the Title Page (and on the covers, if any) a title distinct
-   from that of the Document, and from those of previous versions
-   (which should, if there were any, be listed in the History section
-   of the Document).  You may use the same title as a previous version
-   if the original publisher of that version gives permission.
-B. List on the Title Page, as authors, one or more persons or entities
-   responsible for authorship of the modifications in the Modified
-   Version, together with at least five of the principal authors of the
-   Document (all of its principal authors, if it has less than five).
-C. State on the Title page the name of the publisher of the
-   Modified Version, as the publisher.
-D. Preserve all the copyright notices of the Document.
-E. Add an appropriate copyright notice for your modifications
-   adjacent to the other copyright notices.
-F. Include, immediately after the copyright notices, a license notice
-   giving the public permission to use the Modified Version under the
-   terms of this License, in the form shown in the Addendum below.
-G. Preserve in that license notice the full lists of Invariant Sections
-   and required Cover Texts given in the Document's license notice.
-H. Include an unaltered copy of this License.
-I. Preserve the section entitled "History", and its title, and add to
-   it an item stating at least the title, year, new authors, and
-   publisher of the Modified Version as given on the Title Page.  If
-   there is no section entitled "History" in the Document, create one
-   stating the title, year, authors, and publisher of the Document as
-   given on its Title Page, then add an item describing the Modified
-   Version as stated in the previous sentence.
-J. Preserve the network location, if any, given in the Document for
-   public access to a Transparent copy of the Document, and likewise
-   the network locations given in the Document for previous versions
-   it was based on.  These may be placed in the "History" section.
-   You may omit a network location for a work that was published at
-   least four years before the Document itself, or if the original
-   publisher of the version it refers to gives permission.
-K. In any section entitled "Acknowledgements" or "Dedications",
-   preserve the section's title, and preserve in the section all the
-   substance and tone of each of the contributor acknowledgements
-   and/or dedications given therein.
-L. Preserve all the Invariant Sections of the Document,
-   unaltered in their text and in their titles.  Section numbers
-   or the equivalent are not considered part of the section titles.
-M. Delete any section entitled "Endorsements".  Such a section
-   may not be included in the Modified Version.
-N. Do not retitle any existing section as "Endorsements"
-   or to conflict in title with any Invariant Section.
-
-If the Modified Version includes new front-matter sections or
-appendices that qualify as Secondary Sections and contain no material
-copied from the Document, you may at your option designate some or all
-of these sections as invariant.  To do this, add their titles to the
-list of Invariant Sections in the Modified Version's license notice.
-These titles must be distinct from any other section titles.
-
-You may add a section entitled "Endorsements", provided it contains
-nothing but endorsements of your Modified Version by various
-parties--for example, statements of peer review or that the text has
-been approved by an organization as the authoritative definition of a
-standard.
-
-You may add a passage of up to five words as a Front-Cover Text, and a
-passage of up to 25 words as a Back-Cover Text, to the end of the list
-of Cover Texts in the Modified Version.  Only one passage of
-Front-Cover Text and one of Back-Cover Text may be added by (or
-through arrangements made by) any one entity.  If the Document already
-includes a cover text for the same cover, previously added by you or
-by arrangement made by the same entity you are acting on behalf of,
-you may not add another; but you may replace the old one, on explicit
-permission from the previous publisher that added the old one.
-
-The author(s) and publisher(s) of the Document do not by this License
-give permission to use their names for publicity for or to assert or
-imply endorsement of any Modified Version.
-
-
-5. COMBINING DOCUMENTS
-
-You may combine the Document with other documents released under this
-License, under the terms defined in section 4 above for modified
-versions, provided that you include in the combination all of the
-Invariant Sections of all of the original documents, unmodified, and
-list them all as Invariant Sections of your combined work in its
-license notice.
-
-The combined work need only contain one copy of this License, and
-multiple identical Invariant Sections may be replaced with a single
-copy.  If there are multiple Invariant Sections with the same name but
-different contents, make the title of each such section unique by
-adding at the end of it, in parentheses, the name of the original
-author or publisher of that section if known, or else a unique number.
-Make the same adjustment to the section titles in the list of
-Invariant Sections in the license notice of the combined work.
-
-In the combination, you must combine any sections entitled "History"
-in the various original documents, forming one section entitled
-"History"; likewise combine any sections entitled "Acknowledgements",
-and any sections entitled "Dedications".  You must delete all sections
-entitled "Endorsements."
-
-
-6. COLLECTIONS OF DOCUMENTS
-
-You may make a collection consisting of the Document and other documents
-released under this License, and replace the individual copies of this
-License in the various documents with a single copy that is included in
-the collection, provided that you follow the rules of this License for
-verbatim copying of each of the documents in all other respects.
-
-You may extract a single document from such a collection, and distribute
-it individually under this License, provided you insert a copy of this
-License into the extracted document, and follow this License in all
-other respects regarding verbatim copying of that document.
-
-
-7. AGGREGATION WITH INDEPENDENT WORKS
-
-A compilation of the Document or its derivatives with other separate
-and independent documents or works, in or on a volume of a storage or
-distribution medium, does not as a whole count as a Modified Version
-of the Document, provided no compilation copyright is claimed for the
-compilation.  Such a compilation is called an "aggregate", and this
-License does not apply to the other self-contained works thus compiled
-with the Document, on account of their being thus compiled, if they
-are not themselves derivative works of the Document.
-
-If the Cover Text requirement of section 3 is applicable to these
-copies of the Document, then if the Document is less than one quarter
-of the entire aggregate, the Document's Cover Texts may be placed on
-covers that surround only the Document within the aggregate.
-Otherwise they must appear on covers around the whole aggregate.
-
-
-8. TRANSLATION
-
-Translation is considered a kind of modification, so you may
-distribute translations of the Document under the terms of section 4.
-Replacing Invariant Sections with translations requires special
-permission from their copyright holders, but you may include
-translations of some or all Invariant Sections in addition to the
-original versions of these Invariant Sections.  You may include a
-translation of this License provided that you also include the
-original English version of this License.  In case of a disagreement
-between the translation and the original English version of this
-License, the original English version will prevail.
-
-
-9. TERMINATION
-
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License.  Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License.  However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-
-10. FUTURE REVISIONS OF THIS LICENSE
-
-The Free Software Foundation may publish new, revised versions
-of the GNU Free Documentation License from time to time.  Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.  See
-http://www.gnu.org/copyleft/.
-
-Each version of the License is given a distinguishing version number.
-If the Document specifies that a particular numbered version of this
-License "or any later version" applies to it, you have the option of
-following the terms and conditions either of that specified version or
-of any later version that has been published (not as a draft) by the
-Free Software Foundation.  If the Document does not specify a version
-number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
-
-
-ADDENDUM: How to use this License for your documents
-
-To use this License in a document you have written, include a copy of
-the License in the document and put the following copyright and
-license notices just after the title page:
-
-      Copyright (c)  YEAR  YOUR NAME.
-      Permission is granted to copy, distribute and/or modify this document
-      under the terms of the GNU Free Documentation License, Version 1.1
-      or any later version published by the Free Software Foundation;
-      with the Invariant Sections being LIST THEIR TITLES, with the
-      Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
-      A copy of the license is included in the section entitled "GNU
-      Free Documentation License".
-
-If you have no Invariant Sections, write "with no Invariant Sections"
-instead of saying which ones are invariant.  If you have no
-Front-Cover Texts, write "no Front-Cover Texts" instead of
-"Front-Cover Texts being LIST"; likewise for Back-Cover Texts.
-
-If your document contains nontrivial examples of program code, we
-recommend releasing these examples in parallel under your choice of
-free software license, such as the GNU General Public License,
-to permit their use in free software.
diff --git a/lustre/LICENSE b/lustre/LICENSE
deleted file mode 100644
index edb73cdedca6a5bc71f825693d5a81b4c3c2a693..0000000000000000000000000000000000000000
--- a/lustre/LICENSE
+++ /dev/null
@@ -1,372 +0,0 @@
-Each file in this distribution contains a header stating the copyright
-owner(s), and the licensing terms for that file.  Some files are not
-eligible for copyright protection, and contain neither.
-
-There are many files which may be covered by a separate license that
-you signed or otherwise agreed to before downloading this software.
-If you did not agree to such an agreement, or if the file does not
-mention that license, then you can redistribute and/or modify it under
-the terms of version 2 of the GNU General Public License.  Each file
-is very clear about which license is applicable.
-
-In any case, Lustre 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 license
-text for more details.
-
-Reproduced below is the GNU General Public License version 2, and
-Linus's clarifying statement from the Linux kernel source code:
-
-----------------------------------------
-
-   NOTE! This copyright does *not* cover user programs that use kernel
- services by normal system calls - this is merely considered normal use
- of the kernel, and does *not* fall under the heading of "derived work".
- Also note that the GPL below is copyrighted by the Free Software
- Foundation, but the instance of code that it refers to (the Linux
- kernel) is copyrighted by me and others who actually wrote it.
-
-			Linus Torvalds
-
-----------------------------------------
-
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    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  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/lustre/Makefile.in b/lustre/Makefile.in
deleted file mode 100644
index c06794a37654c8e88967e4cc0e35f4cbb22546fc..0000000000000000000000000000000000000000
--- a/lustre/Makefile.in
+++ /dev/null
@@ -1,13 +0,0 @@
-subdir-m += lvfs
-subdir-m += obdclass
-subdir-m += lov
-subdir-m += ptlrpc
-subdir-m += osc
-subdir-m += obdecho
-subdir-m += mgc
-
-@SERVER_TRUE@subdir-m += mds obdfilter ost mgs
-@CLIENT_TRUE@subdir-m += mdc llite 
-@QUOTA_TRUE@subdir-m += quota
-
-@INCLUDE_RULES@
diff --git a/lustre/autoMakefile.am b/lustre/autoMakefile.am
deleted file mode 100644
index 53ae48a629a2fb974974ec4bacc339759e2be1a2..0000000000000000000000000000000000000000
--- a/lustre/autoMakefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-AUTOMAKE_OPTIONS = foreign
-
-# also update lustre/autoconf/lustre-core.m4 AC_CONFIG_FILES
-ALWAYS_SUBDIRS := include lvfs obdclass ldlm ptlrpc osc lov obdecho \
-	mgc doc utils tests scripts autoconf contrib
-
-SERVER_SUBDIRS := obdfilter ost mds mgs
-
-CLIENT_SUBDIRS := mdc llite
-
-QUOTA_SUBDIRS := quota
-
-LIBLUSTRE_SUBDIRS := liblustre
-
-SUBDIRS := $(ALWAYS_SUBDIRS)
-
-if SERVER
-SUBDIRS += $(SERVER_SUBDIRS)
-endif
-
-if CLIENT
-SUBDIRS += $(CLIENT_SUBDIRS)
-endif
-
-if QUOTA
-SUBDIRS += $(QUOTA_SUBDIRS)
-endif
-
-# this needs to be after the client subdirs
-if LIBLUSTRE
-if !CLIENT
-SUBDIRS += $(CLIENT_SUBDIRS)
-endif
-SUBDIRS += $(LIBLUSTRE_SUBDIRS)
-endif
-
-DIST_SUBDIRS := $(ALWAYS_SUBDIRS) $(SERVER_SUBDIRS) $(CLIENT_SUBDIRS)	\
-	$(LIBLUSTRE_SUBDIRS) $(QUOTA_SUBDIRS)
-
-EXTRA_DIST = BUGS FDL kernel_patches
-
-lvfs-sources:
-	$(MAKE) sources -C lvfs
-obdclass-sources:
-	$(MAKE) sources -C obdclass
-
-sources: $(LDISKFS) lvfs-sources obdclass-sources lustre_build_version
-
-all-recursive: lustre_build_version
-
-BUILD_VER_H=$(top_builddir)/lustre/include/lustre/lustre_build_version.h
-
-lustre_build_version:
-	perl $(top_builddir)/lustre/scripts/version_tag.pl $(top_srcdir) $(top_builddir) > tmpver
-	echo "#define LUSTRE_RELEASE @RELEASE@" >> tmpver
-	cmp -s $(BUILD_VER_H) tmpver > tmpdiff 2> /dev/null &&		\
-                $(RM) tmpver tmpdiff ||					\
-		mv -f tmpver $(BUILD_VER_H)
diff --git a/lustre/autoconf/.cvsignore b/lustre/autoconf/.cvsignore
deleted file mode 100644
index 282522db0342d8750454b3dc162493b5fc709cc8..0000000000000000000000000000000000000000
--- a/lustre/autoconf/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/lustre/autoconf/Makefile.am b/lustre/autoconf/Makefile.am
deleted file mode 100644
index 7a747da12985108cea77dcb83cbfa114990ffd3c..0000000000000000000000000000000000000000
--- a/lustre/autoconf/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-EXTRA_DIST := lustre-core.m4 lustre-version.ac
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
deleted file mode 100644
index ff695410ed2f860a8c68ddcfa8a3fe68bd9735e3..0000000000000000000000000000000000000000
--- a/lustre/autoconf/lustre-core.m4
+++ /dev/null
@@ -1,1693 +0,0 @@
-#* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
-#* vim:expandtab:shiftwidth=8:tabstop=8:
-#
-# LC_CONFIG_SRCDIR
-#
-# Wrapper for AC_CONFIG_SUBDIR
-#
-AC_DEFUN([LC_CONFIG_SRCDIR],
-[AC_CONFIG_SRCDIR([lustre/obdclass/obdo.c])
-])
-
-#
-# LC_PATH_DEFAULTS
-#
-# lustre specific paths
-#
-AC_DEFUN([LC_PATH_DEFAULTS],
-[# ptlrpc kernel build requires this
-LUSTRE="$PWD/lustre"
-AC_SUBST(LUSTRE)
-
-# mount.lustre
-rootsbindir='/sbin'
-AC_SUBST(rootsbindir)
-
-demodir='$(docdir)/demo'
-AC_SUBST(demodir)
-
-pkgexampledir='${pkgdatadir}/examples'
-AC_SUBST(pkgexampledir)
-])
-
-#
-# LC_TARGET_SUPPORTED
-#
-# is the target os supported?
-#
-AC_DEFUN([LC_TARGET_SUPPORTED],
-[case $target_os in
-	linux* | darwin*)
-$1
-		;;
-	*)
-$2
-		;;
-esac
-])
-
-#
-# LC_CONFIG_EXT3
-#
-# that ext3 is enabled in the kernel
-#
-AC_DEFUN([LC_CONFIG_EXT3],
-[LB_LINUX_CONFIG([EXT3_FS],[],[
-	LB_LINUX_CONFIG([EXT3_FS_MODULE],[],[$2])
-])
-LB_LINUX_CONFIG([EXT3_FS_XATTR],[$1],[$3])
-])
-
-#
-# LC_FSHOOKS
-#
-# If we have (and can build) fshooks.h
-#
-AC_DEFUN([LC_FSHOOKS],
-[LB_CHECK_FILE([$LINUX/include/linux/fshooks.h],[
-	AC_MSG_CHECKING([if fshooks.h can be compiled])
-	LB_LINUX_TRY_COMPILE([
-		#include <linux/fshooks.h>
-	],[],[
-		AC_MSG_RESULT([yes])
-	],[
-		AC_MSG_RESULT([no])
-		AC_MSG_WARN([You might have better luck with gcc 3.3.x.])
-		AC_MSG_WARN([You can set CC=gcc33 before running configure.])
-		AC_MSG_ERROR([Your compiler cannot build fshooks.h.])
-	])
-$1
-],[
-$2
-])
-])
-
-#
-# LC_STRUCT_KIOBUF
-#
-# rh 2.4.18 has iobuf->dovary, but other kernels do not
-#
-AC_DEFUN([LC_STRUCT_KIOBUF],
-[AC_MSG_CHECKING([if struct kiobuf has a dovary field])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/iobuf.h>
-],[
-	struct kiobuf iobuf;
-	iobuf.dovary = 1;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_KIOBUF_DOVARY, 1, [struct kiobuf has a dovary field])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_COND_RESCHED
-#
-# cond_resched() was introduced in 2.4.20
-#
-AC_DEFUN([LC_FUNC_COND_RESCHED],
-[AC_MSG_CHECKING([if kernel offers cond_resched])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/sched.h>
-],[
-	cond_resched();
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_COND_RESCHED, 1, [cond_resched found])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_ZAP_PAGE_RANGE
-#
-# if zap_page_range() takes a vma arg
-#
-AC_DEFUN([LC_FUNC_ZAP_PAGE_RANGE],
-[AC_MSG_CHECKING([if zap_page_range with vma parameter])
-ZAP_PAGE_RANGE_VMA="`grep -c 'zap_page_range.*struct vm_area_struct' $LINUX/include/linux/mm.h`"
-if test "$ZAP_PAGE_RANGE_VMA" != 0 ; then
-	AC_DEFINE(ZAP_PAGE_RANGE_VMA, 1, [zap_page_range with vma parameter])
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_RESULT([no])
-fi
-])
-
-#
-# LC_FUNC_PDE
-#
-# if proc_fs.h defines PDE()
-#
-AC_DEFUN([LC_FUNC_PDE],
-[AC_MSG_CHECKING([if kernel defines PDE])
-HAVE_PDE="`grep -c 'proc_dir_entry..PDE' $LINUX/include/linux/proc_fs.h`"
-if test "$HAVE_PDE" != 0 ; then
-	AC_DEFINE(HAVE_PDE, 1, [the kernel defines PDE])
-	AC_MSG_RESULT([yes])
-else
-	AC_MSG_RESULT([no])
-fi
-])
-
-#
-# LC_FUNC_FILEMAP_FDATASYNC
-#
-# if filemap_fdatasync() exists
-#
-AC_DEFUN([LC_FUNC_FILEMAP_FDATAWRITE],
-[AC_MSG_CHECKING([whether filemap_fdatawrite() is defined])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/fs.h>
-],[
-	int (*foo)(struct address_space *)= filemap_fdatawrite;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_FILEMAP_FDATAWRITE, 1, [filemap_fdatawrite() found])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_DIRECT_IO
-#
-# if direct_IO takes a struct file argument
-#
-AC_DEFUN([LC_FUNC_DIRECT_IO],
-[AC_MSG_CHECKING([if kernel passes struct file to direct_IO])
-HAVE_DIO_FILE="`grep -c 'direct_IO.*struct file' $LINUX/include/linux/fs.h`"
-if test "$HAVE_DIO_FILE" != 0 ; then
-	AC_DEFINE(HAVE_DIO_FILE, 1, [the kernel passes struct file to direct_IO])
-	AC_MSG_RESULT(yes)
-else
-	AC_MSG_RESULT(no)
-fi
-])
-
-#
-# LC_HEADER_MM_INLINE
-#
-# RHEL kernels define page_count in mm_inline.h
-#
-AC_DEFUN([LC_HEADER_MM_INLINE],
-[AC_MSG_CHECKING([if kernel has mm_inline.h header])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/mm_inline.h>
-],[
-	#ifndef page_count
-	#error mm_inline.h does not define page_count
-	#endif
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_MM_INLINE, 1, [mm_inline found])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_STRUCT_INODE
-#
-# if inode->i_alloc_sem exists
-#
-AC_DEFUN([LC_STRUCT_INODE],
-[AC_MSG_CHECKING([if struct inode has i_alloc_sem])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/fs.h>
-	#include <linux/version.h>
-],[
-	#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,24))
-	#error "down_read_trylock broken before 2.4.24"
-	#endif
-	struct inode i;
-	return (char *)&i.i_alloc_sem - (char *)&i;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_I_ALLOC_SEM, 1, [struct inode has i_alloc_sem])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_REGISTER_CACHE
-#
-# if register_cache() is defined by kernel
-#
-AC_DEFUN([LC_FUNC_REGISTER_CACHE],
-[AC_MSG_CHECKING([if kernel defines register_cache()])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/list.h>
-	#include <linux/cache_def.h>
-],[
-	struct cache_definition cache;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_REGISTER_CACHE, 1, [register_cache found])
-	AC_MSG_CHECKING([if kernel expects return from cache shrink function])
-	HAVE_CACHE_RETURN_INT="`grep -c 'int.*shrink' $LINUX/include/linux/cache_def.h`"
-	if test "$HAVE_CACHE_RETURN_INT" != 0 ; then
-		AC_DEFINE(HAVE_CACHE_RETURN_INT, 1, [kernel expects return from shrink_cache])
-		AC_MSG_RESULT(yes)
-	else
-		AC_MSG_RESULT(no)
-	fi
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
-#
-# check for our patched grab_cache_page_nowait_gfp() function
-#
-AC_DEFUN([LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP],
-[AC_MSG_CHECKING([if kernel defines grab_cache_page_nowait_gfp()])
-HAVE_GCPN_GFP="`grep -c 'grab_cache_page_nowait_gfp' $LINUX/include/linux/pagemap.h`"
-if test "$HAVE_GCPN_GFP" != 0 ; then
-	AC_DEFINE(HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP, 1,
-		[kernel has grab_cache_page_nowait_gfp()])
-	AC_MSG_RESULT(yes)
-else
-	AC_MSG_RESULT(no)
-fi
-])
-
-#
-# LC_FUNC_DEV_SET_RDONLY
-#
-# check for the old-style dev_set_rdonly which took an extra "devno" param
-# and can only set a single device to discard writes at one time
-#
-AC_DEFUN([LC_FUNC_DEV_SET_RDONLY],
-[AC_MSG_CHECKING([if kernel has new dev_set_rdonly])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        #ifndef HAVE_CLEAR_RDONLY_ON_PUT
-        #error needs to be patched by lustre kernel patches from Lustre version 1.4.3 or above.
-        #endif
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_DEV_SET_RDONLY, 1, [kernel has new dev_set_rdonly])
-],[
-        AC_MSG_RESULT([no, Linux kernel source needs to be patches by lustre 
-kernel patches from Lustre version 1.4.3 or above.])
-])
-])
-
-#
-# LC_CONFIG_BACKINGFS
-#
-# setup, check the backing filesystem
-#
-AC_DEFUN([LC_CONFIG_BACKINGFS],
-[
-BACKINGFS="ldiskfs"
-
-if test x$with_ldiskfs = xno ; then
-	BACKINGFS="ext3"
-
-	if test x$linux25$enable_server = xyesyes ; then
-		AC_MSG_ERROR([ldiskfs is required for 2.6-based servers.])
-	fi
-
-	# --- Check that ext3 and ext3 xattr are enabled in the kernel
-	LC_CONFIG_EXT3([],[
-		AC_MSG_ERROR([Lustre requires that ext3 is enabled in the kernel])
-	],[
-		AC_MSG_WARN([Lustre requires that extended attributes for ext3 are enabled in the kernel])
-		AC_MSG_WARN([This build may fail.])
-	])
-else
-	# ldiskfs is enabled
-	LB_DEFINE_LDISKFS_OPTIONS
-fi #ldiskfs
-
-AC_MSG_CHECKING([which backing filesystem to use])
-AC_MSG_RESULT([$BACKINGFS])
-AC_SUBST(BACKINGFS)
-])
-
-#
-# LC_CONFIG_PINGER
-#
-# the pinger is temporary, until we have the recovery node in place
-#
-AC_DEFUN([LC_CONFIG_PINGER],
-[AC_MSG_CHECKING([whether to enable pinger support])
-AC_ARG_ENABLE([pinger],
-	AC_HELP_STRING([--disable-pinger],
-			[disable recovery pinger support]),
-	[],[enable_pinger='yes'])
-AC_MSG_RESULT([$enable_pinger])
-if test x$enable_pinger != xno ; then
-  AC_DEFINE(ENABLE_PINGER, 1, Use the Pinger)
-fi
-])
-
-#
-# LC_CONFIG_CHECKSUM
-#
-# do checksum of bulk data between client and OST
-#
-AC_DEFUN([LC_CONFIG_CHECKSUM],
-[AC_MSG_CHECKING([whether to enable data checksum support])
-AC_ARG_ENABLE([checksum],
-       AC_HELP_STRING([--disable-checksum],
-                       [disable data checksum support]),
-       [],[enable_checksum='yes'])
-AC_MSG_RESULT([$enable_checksum])
-if test x$enable_checksum != xno ; then
-  AC_DEFINE(ENABLE_CHECKSUM, 1, do data checksums)
-fi
-])
-
-#
-# LC_CONFIG_HEALTH_CHECK_WRITE
-#
-# Turn on the actual write to the disk
-#
-AC_DEFUN([LC_CONFIG_HEALTH_CHECK_WRITE],
-[AC_MSG_CHECKING([whether to enable a write with the health check])
-AC_ARG_ENABLE([health-write],
-        AC_HELP_STRING([--enable-health-write],
-                        [enable disk writes when doing health check]),
-        [],[enable_health_write='no'])
-AC_MSG_RESULT([$enable_health_write])
-if test x$enable_health_write == xyes ; then
-  AC_DEFINE(USE_HEALTH_CHECK_WRITE, 1, Write when Checking Health)
-fi
-])
-
-#
-# LC_CONFIG_LIBLUSTRE_RECOVERY
-#
-AC_DEFUN([LC_CONFIG_LIBLUSTRE_RECOVERY],
-[AC_MSG_CHECKING([whether to enable liblustre recovery support])
-AC_ARG_ENABLE([liblustre-recovery],
-	AC_HELP_STRING([--disable-liblustre-recovery],
-			[disable liblustre recovery support]),
-	[],[enable_liblustre_recovery='yes'])
-AC_MSG_RESULT([$enable_liblustre_recovery])
-if test x$enable_liblustre_recovery != xno ; then
-  AC_DEFINE(ENABLE_LIBLUSTRE_RECOVERY, 1, Liblustre Can Recover)
-fi
-])
-
-#
-# LC_CONFIG_OBD_BUFFER_SIZE
-#
-# the maximum buffer size of lctl ioctls
-#
-AC_DEFUN([LC_CONFIG_OBD_BUFFER_SIZE],
-[AC_MSG_CHECKING([maximum OBD ioctl size])
-AC_ARG_WITH([obd-buffer-size],
-	AC_HELP_STRING([--with-obd-buffer-size=[size]],
-			[set lctl ioctl maximum bytes (default=8192)]),
-	[
-		OBD_BUFFER_SIZE=$with_obd_buffer_size
-	],[
-		OBD_BUFFER_SIZE=8192
-	])
-AC_MSG_RESULT([$OBD_BUFFER_SIZE bytes])
-AC_DEFINE_UNQUOTED(OBD_MAX_IOCTL_BUFFER, $OBD_BUFFER_SIZE, [IOCTL Buffer Size])
-])
-
-#
-# LC_STRUCT_STATFS
-#
-# AIX does not have statfs.f_namelen
-#
-AC_DEFUN([LC_STRUCT_STATFS],
-[AC_MSG_CHECKING([if struct statfs has a f_namelen field])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/vfs.h>
-],[
-	struct statfs sfs;
-	sfs.f_namelen = 1;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_STATFS_NAMELEN, 1, [struct statfs has a namelen field])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_READLINK_SSIZE_T
-#
-AC_DEFUN([LC_READLINK_SSIZE_T],
-[AC_MSG_CHECKING([if readlink returns ssize_t])
-AC_TRY_COMPILE([
-	#include <unistd.h>
-],[
-	ssize_t readlink(const char *, char *, size_t);
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_POSIX_1003_READLINK, 1, [readlink returns ssize_t])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-AC_DEFUN([LC_FUNC_PAGE_MAPPED],
-[AC_MSG_CHECKING([if kernel offers page_mapped])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/mm.h>
-],[
-	page_mapped(NULL);
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_PAGE_MAPPED, 1, [page_mapped found])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-AC_DEFUN([LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL],
-[AC_MSG_CHECKING([if struct file_operations has an unlocked_ioctl field])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations fops;
-        &fops.unlocked_ioctl;
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_UNLOCKED_IOCTL, 1, [struct file_operations has an unlock ed_ioctl field])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-AC_DEFUN([LC_FILEMAP_POPULATE],
-[AC_MSG_CHECKING([for exported filemap_populate])
-LB_LINUX_TRY_COMPILE([
-        #include <asm/page.h>
-        #include <linux/mm.h>
-],[
-	filemap_populate(NULL, 0, 0, __pgprot(0), 0, 0);
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_FILEMAP_POPULATE, 1, [Kernel exports filemap_populate])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-AC_DEFUN([LC_D_ADD_UNIQUE],
-[AC_MSG_CHECKING([for d_add_unique])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/dcache.h>
-],[
-       d_add_unique(NULL, NULL);
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_D_ADD_UNIQUE, 1, [Kernel has d_add_unique])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-AC_DEFUN([LC_BIT_SPINLOCK_H],
-[LB_CHECK_FILE([$LINUX/include/linux/bit_spinlock.h],[
-	AC_MSG_CHECKING([if bit_spinlock.h can be compiled])
-	LB_LINUX_TRY_COMPILE([
-		#include <asm/processor.h>
-		#include <linux/spinlock.h>
-		#include <linux/bit_spinlock.h>
-	],[],[
-		AC_MSG_RESULT([yes])
-		AC_DEFINE(HAVE_BIT_SPINLOCK_H, 1, [Kernel has bit_spinlock.h])
-	],[
-		AC_MSG_RESULT([no])
-	])
-],
-[])
-])
-
-#
-# LC_POSIX_ACL_XATTR
-#
-# If we have xattr_acl.h 
-#
-AC_DEFUN([LC_XATTR_ACL],
-[LB_CHECK_FILE([$LINUX/include/linux/xattr_acl.h],[
-	AC_MSG_CHECKING([if xattr_acl.h can be compiled])
-	LB_LINUX_TRY_COMPILE([
-		#include <linux/xattr_acl.h>
-	],[],[
-		AC_MSG_RESULT([yes])
-		AC_DEFINE(HAVE_XATTR_ACL, 1, [Kernel has xattr_acl])
-	],[
-		AC_MSG_RESULT([no])
-	])
-],
-[])
-])
-
-AC_DEFUN([LC_STRUCT_INTENT_FILE],
-[AC_MSG_CHECKING([if struct open_intent has a file field])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-        #include <linux/namei.h>
-],[
-        struct open_intent intent;
-        &intent.file;
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_FILE_IN_STRUCT_INTENT, 1, [struct open_intent has a file field])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-
-AC_DEFUN([LC_POSIX_ACL_XATTR_H],
-[LB_CHECK_FILE([$LINUX/include/linux/posix_acl_xattr.h],[
-        AC_MSG_CHECKING([if linux/posix_acl_xattr.h can be compiled])
-        LB_LINUX_TRY_COMPILE([
-                #include <linux/posix_acl_xattr.h>
-        ],[],[
-                AC_MSG_RESULT([yes])
-                AC_DEFINE(HAVE_LINUX_POSIX_ACL_XATTR_H, 1, [linux/posix_acl_xattr.h found])
-
-        ],[
-                AC_MSG_RESULT([no])
-        ])
-$1
-],[
-AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_EXPORT___IGET
-# starting from 2.6.19 linux kernel exports __iget()
-#
-AC_DEFUN([LC_EXPORT___IGET],
-[LB_CHECK_SYMBOL_EXPORT([__iget],
-[fs/inode.c],[
-        AC_DEFINE(HAVE_EXPORT___IGET, 1, [kernel exports __iget])
-],[
-])
-])
-
-
-AC_DEFUN([LC_LUSTRE_VERSION_H],
-[LB_CHECK_FILE([$LINUX/include/linux/lustre_version.h],[
-	rm -f "$LUSTRE/include/linux/lustre_version.h"
-],[
-	touch "$LUSTRE/include/linux/lustre_version.h"
-	if test x$enable_server = xyes ; then
-        	AC_MSG_WARN([Unpatched kernel detected.])
-        	AC_MSG_WARN([Lustre servers cannot be built with an unpatched kernel;])
-        	AC_MSG_WARN([disabling server build])
-        	enable_server='no'
-	fi
-])
-])
-
-AC_DEFUN([LC_FUNC_SET_FS_PWD],
-[LB_CHECK_SYMBOL_EXPORT([set_fs_pwd],
-[fs/namespace.c],[
-        AC_DEFINE(HAVE_SET_FS_PWD, 1, [set_fs_pwd is exported])
-],[
-])
-])
-
-
-#
-# LC_FUNC_MS_FLOCK_LOCK
-#
-# SLES9 kernel has MS_FLOCK_LOCK sb flag
-#
-AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
-[AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        int flags = MS_FLOCK_LOCK;
-],[
-        AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
-                [kernel has MS_FLOCK_LOCK flag])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_HAVE_CAN_SLEEP_ARG
-#
-# SLES9 kernel has third arg can_sleep
-# in fs/locks.c: flock_lock_file_wait()
-#
-AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
-[AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        int cansleep;
-        struct file *file;
-        struct file_lock *file_lock;
-        flock_lock_file_wait(file, file_lock, cansleep);
-],[
-        AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
-                [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_F_OP_FLOCK
-#
-# rhel4.2 kernel has f_op->flock field
-#
-AC_DEFUN([LC_FUNC_F_OP_FLOCK],
-[AC_MSG_CHECKING([if struct file_operations has flock field])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations ll_file_operations_flock;
-        ll_file_operations_flock.flock = NULL;
-],[
-        AC_DEFINE(HAVE_F_OP_FLOCK, 1,
-                [struct file_operations has flock field])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_MS_FLOCK_LOCK
-#
-# SLES9 kernel has MS_FLOCK_LOCK sb flag
-#
-AC_DEFUN([LC_FUNC_MS_FLOCK_LOCK],
-[AC_MSG_CHECKING([if kernel has MS_FLOCK_LOCK sb flag])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        int flags = MS_FLOCK_LOCK;
-],[
-        AC_DEFINE(HAVE_MS_FLOCK_LOCK, 1,
-                [kernel has MS_FLOCK_LOCK flag])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_HAVE_CAN_SLEEP_ARG
-#
-# SLES9 kernel has third arg can_sleep
-# in fs/locks.c: flock_lock_file_wait()
-#
-AC_DEFUN([LC_FUNC_HAVE_CAN_SLEEP_ARG],
-[AC_MSG_CHECKING([if kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        int cansleep;
-        struct file *file;
-        struct file_lock *file_lock;
-        flock_lock_file_wait(file, file_lock, cansleep);
-],[
-        AC_DEFINE(HAVE_CAN_SLEEP_ARG, 1,
-                [kernel has third arg can_sleep in fs/locks.c: flock_lock_file_wait()])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_TASK_PPTR
-#
-# task struct has p_pptr instead of parent
-#
-AC_DEFUN([LC_TASK_PPTR],
-[AC_MSG_CHECKING([task p_pptr found])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/sched.h>
-],[
-	struct task_struct *p;
-	
-	p = p->p_pptr;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(HAVE_TASK_PPTR, 1, [task p_pptr found])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_F_OP_FLOCK
-#
-# rhel4.2 kernel has f_op->flock field
-#
-AC_DEFUN([LC_FUNC_F_OP_FLOCK],
-[AC_MSG_CHECKING([if struct file_operations has flock field])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations ll_file_operations_flock;
-        ll_file_operations_flock.flock = NULL;
-],[
-        AC_DEFINE(HAVE_F_OP_FLOCK, 1,
-                [struct file_operations has flock field])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-# LC_INODE_I_MUTEX
-# after 2.6.15 inode have i_mutex intead of i_sem
-AC_DEFUN([LC_INODE_I_MUTEX],
-[AC_MSG_CHECKING([use inode have i_mutex ])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/mutex.h>
-	#include <linux/fs.h>
-	#undef i_mutex
-],[
-	struct inode i;
-
-	mutex_unlock(&i.i_mutex);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_INODE_I_MUTEX, 1,
-                [after 2.6.15 inode have i_mutex intead of i_sem])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# LC_SYMVERFILE
-# SLES 9 uses a different name for this file - unsure about vanilla kernels
-# around this version, but it matters for servers only.
-AC_DEFUN([LC_SYMVERFILE],
-         [AC_MSG_CHECKING([name of symverfile])
-          if grep -q Modules.symvers $LINUX/scripts/Makefile.modpost ; then
-              SYMVERFILE=Modules.symvers
-          else
-              SYMVERFILE=Module.symvers
-          fi
-	  AC_MSG_RESULT($SYMVERFILE)
-          AC_SUBST(SYMVERFILE)])
-
-# LC_DQUOTOFF_MUTEX
-# after 2.6.17 dquote use mutex instead if semaphore
-AC_DEFUN([LC_DQUOTOFF_MUTEX],
-[AC_MSG_CHECKING([use dqonoff_mutex])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/mutex.h>
-	#include <linux/fs.h>
-        #include <linux/quota.h>
-],[
-        struct quota_info dq;
-
-        mutex_unlock(&dq.dqonoff_mutex);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_DQUOTOFF_MUTEX, 1,
-                [after 2.6.17 dquote use mutex instead if semaphore])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-#
-# LC_STATFS_DENTRY_PARAM
-# starting from 2.6.18 linux kernel uses dentry instead of
-# super_block for first vfs_statfs argument
-#
-AC_DEFUN([LC_STATFS_DENTRY_PARAM],
-[AC_MSG_CHECKING([first vfs_statfs parameter is dentry])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-	int vfs_statfs(struct dentry *, struct kstatfs *);
-],[
-        AC_DEFINE(HAVE_STATFS_DENTRY_PARAM, 1,
-                [first parameter of vfs_statfs is dentry])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_VFS_KERN_MOUNT
-# starting from 2.6.18 kernel don't export do_kern_mount
-# and want to use vfs_kern_mount instead.
-#
-AC_DEFUN([LC_VFS_KERN_MOUNT],
-[AC_MSG_CHECKING([vfs_kern_mount exist in kernel])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/mount.h>
-],[
-        vfs_kern_mount(NULL, 0, NULL, NULL);
-],[
-        AC_DEFINE(HAVE_VFS_KERN_MOUNT, 1,
-                [vfs_kern_mount exist in kernel])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-# 
-# LC_INVALIDATEPAGE_RETURN_INT
-# more 2.6 api changes.  return type for the invalidatepage
-# address_space_operation is 'void' in new kernels but 'int' in old
-#
-AC_DEFUN([LC_INVALIDATEPAGE_RETURN_INT],
-[AC_MSG_CHECKING([invalidatepage has return int])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/buffer_head.h>
-],[
-	int rc = block_invalidatepage(NULL, 0);
-],[
-	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_INVALIDATEPAGE_RETURN_INT, 1,
-		[Define if return type of invalidatepage should be int])
-],[
-	AC_MSG_RESULT(NO)
-])
-])
-
-# LC_UMOUNTBEGIN_HAS_VFSMOUNT
-# more 2.6 API changes. 2.6.18 umount_begin has different parameters
-AC_DEFUN([LC_UMOUNTBEGIN_HAS_VFSMOUNT],
-[AC_MSG_CHECKING([if umount_begin needs vfsmount parameter instead of super_block])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
-	#include <linux/fs.h>
-
-	struct vfsmount;
-	static void cfg_umount_begin (struct vfsmount *v, int flags)
-	{
-    		;
-	}
-
-	static struct super_operations cfg_super_operations = {
-		.umount_begin	= cfg_umount_begin,
-	};
-],[
-	cfg_super_operations.umount_begin(NULL,0);
-],[
-	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_UMOUNTBEGIN_VFSMOUNT, 1,
-		[Define umount_begin need second argument])
-],[
-	AC_MSG_RESULT(NO)
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
-# 2.6.19 API changes
-# inode don't have i_blksize field
-AC_DEFUN([LC_INODE_BLKSIZE],
-[AC_MSG_CHECKING([inode has i_blksize field])
-LB_LINUX_TRY_COMPILE([
-#include <linux/fs.h>
-],[
-	struct inode i;
-	i.i_blksize = 0; 
-],[
-	AC_MSG_RESULT(yes)
-	AC_DEFINE(HAVE_INODE_BLKSIZE, 1,
-		[struct inode has i_blksize field])
-],[
-	AC_MSG_RESULT(NO)
-])
-])
-
-# LC_VFS_READDIR_U64_INO
-# 2.6.19 use u64 for inode number instead of inode_t
-AC_DEFUN([LC_VFS_READDIR_U64_INO],
-[AC_MSG_CHECKING([check vfs_readdir need 64bit inode number])
-tmp_flags="$EXTRA_KCFLAGS"
-EXTRA_KCFLAGS="-Werror"
-LB_LINUX_TRY_COMPILE([
-#include <linux/fs.h>
-	int fillonedir(void * __buf, const char * name, int namlen, loff_t offset,
-                      u64 ino, unsigned int d_type)
-	{
-		return 0;
-	}
-],[
-	filldir_t filter;
-
-	filter = fillonedir;
-	return 1;
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_VFS_READDIR_U64_INO, 1,
-                [if vfs_readdir need 64bit inode number])
-],[
-        AC_MSG_RESULT(NO)
-])
-EXTRA_KCFLAGS="$tmp_flags"
-])
-
-# LC_FILE_WRITEV
-# 2.6.19 replaced writev with aio_write
-AC_DEFUN([LC_FILE_WRITEV],
-[AC_MSG_CHECKING([writev in fops])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations *fops;
-        fops->writev = NULL;
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_FILE_WRITEV, 1,
-                [use fops->writev])
-],[
-	AC_MSG_RESULT(NO)
-])
-])
-
-# LC_GENERIC_FILE_READ
-# 2.6.19 replaced readv with aio_read
-AC_DEFUN([LC_FILE_READV],
-[AC_MSG_CHECKING([readv in fops])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations *fops;
-        fops->readv = NULL;
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_FILE_READV, 1,
-                [use fops->readv])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# LC_NR_PAGECACHE
-# 2.6.18 don't export nr_pagecahe
-AC_DEFUN([LC_NR_PAGECACHE],
-[AC_MSG_CHECKING([kernel export nr_pagecache])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/pagemap.h>
-],[
-        return atomic_read(&nr_pagecache);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_NR_PAGECACHE, 1,
-                [is kernel export nr_pagecache])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# LC_CANCEL_DIRTY_PAGE
-# 2.6.20 introduse cancel_dirty_page instead of 
-# clear_page_dirty.
-AC_DEFUN([LC_CANCEL_DIRTY_PAGE],
-[AC_MSG_CHECKING([kernel has cancel_dirty_page])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/page-flags.h>
-],[
-        cancel_dirty_page(NULL, 0);
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_CANCEL_DIRTY_PAGE, 1,
-                  [kernel has cancel_dirty_page instead of clear_page_dirty])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-#
-# LC_PAGE_CONSTANT
-#
-# In order to support raid5 zerocopy patch, we have to patch the kernel to make
-# it support constant page, which means the page won't be modified during the
-# IO.
-#
-AC_DEFUN([LC_PAGE_CONSTANT],
-[AC_MSG_CHECKING([if kernel have PageConstant defined])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/page-flags.h>
-],[
-        #ifndef PG_constant
-        #error "Have no raid5 zcopy patch"
-        #endif
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_PAGE_CONSTANT, 1, [kernel have PageConstant supported])
-],[
-        AC_MSG_RESULT(no);
-])
-])
-
-# RHEL5 in FS-cache patch rename PG_checked flag
-# into PG_fs_misc
-AC_DEFUN([LC_PG_FS_MISC],
-[AC_MSG_CHECKING([kernel has PG_fs_misc])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/page-flags.h>
-],[
-        #ifndef PG_fs_misc
-        #error PG_fs_misc not defined in kernel
-        #endif
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_PG_FS_MISC, 1,
-                  [is kernel have PG_fs_misc])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-# RHEL5 PageChecked and SetPageChecked defined
-AC_DEFUN([LC_PAGE_CHECKED],
-[AC_MSG_CHECKING([kernel has PageChecked and SetPageChecked])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/page-flags.h>
-],[
-        #ifndef PageChecked
-        #error PageChecked not defined in kernel
-        #endif
-        #ifndef SetPageChecked
-        #error SetPageChecked not defined in kernel
-        #endif
-],[
-        AC_MSG_RESULT(yes)
-        AC_DEFINE(HAVE_PAGE_CHECKED, 1,
-                  [does kernel have PageChecked and SetPageChecked])
-],[
-        AC_MSG_RESULT(NO)
-])
-])
-
-AC_DEFUN([LC_EXPORT_TRUNCATE_COMPLETE],
-[LB_CHECK_SYMBOL_EXPORT([truncate_complete_page],
-[mm/truncate.c],[
-AC_DEFINE(HAVE_TRUNCATE_COMPLETE_PAGE, 1,
-            [kernel export truncate_complete_page])
-],[
-])
-])
-
-AC_DEFUN([LC_EXPORT_D_REHASH_COND],
-[LB_CHECK_SYMBOL_EXPORT([d_rehash_cond],
-[fs/dcache.c],[
-AC_DEFINE(HAVE_D_REHASH_COND, 1,
-            [d_rehash_cond is exported by the kernel])
-],[
-])
-])
-
-AC_DEFUN([LC_EXPORT___D_REHASH],
-[LB_CHECK_SYMBOL_EXPORT([__d_rehash],
-[fs/dcache.c],[
-AC_DEFINE(HAVE___D_REHASH, 1,
-            [__d_rehash is exported by the kernel])
-],[
-])
-])
-
-AC_DEFUN([LC_EXPORT_D_MOVE_LOCKED],
-[LB_CHECK_SYMBOL_EXPORT([d_move_locked],
-[fs/dcache.c],[
-AC_DEFINE(HAVE_D_MOVE_LOCKED, 1,
-            [d_move_locked is exported by the kernel])
-],[
-])
-])
-
-AC_DEFUN([LC_EXPORT___D_MOVE],
-[LB_CHECK_SYMBOL_EXPORT([__d_move],
-[fs/dcache.c],[
-AC_DEFINE(HAVE___D_MOVE, 1,
-            [__d_move is exported by the kernel])
-],[
-])
-])
-
-# The actual symbol exported varies among architectures, so we need
-# to check many symbols (but only in the current architecture.)  No
-# matter what symbol is exported, the kernel #defines node_to_cpumask
-# to the appropriate function and that's what we use.
-AC_DEFUN([LC_EXPORT_NODE_TO_CPUMASK],
-         [LB_LINUX_ARCH
-          LB_CHECK_SYMBOL_EXPORT([node_to_cpumask],
-                                 [arch/$LINUX_ARCH/mm/numa.c],
-                                 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
-                                            [node_to_cpumask is exported by
-                                             the kernel])]) # x86_64
-          LB_CHECK_SYMBOL_EXPORT([node_to_cpu_mask],
-                                 [arch/$LINUX_ARCH/kernel/smpboot.c],
-                                 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
-                                            [node_to_cpumask is exported by
-                                             the kernel])]) # ia64
-          LB_CHECK_SYMBOL_EXPORT([node_2_cpu_mask],
-                                 [arch/$LINUX_ARCH/kernel/smpboot.c],
-                                 [AC_DEFINE(HAVE_NODE_TO_CPUMASK, 1,
-                                            [node_to_cpumask is exported by
-                                             the kernel])]) # i386
-          ])
-
-#
-# LC_VFS_INTENT_PATCHES
-#
-# check if the kernel has the VFS intent patches
-AC_DEFUN([LC_VFS_INTENT_PATCHES],
-[AC_MSG_CHECKING([if the kernel has the VFS intent patches])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/fs.h>
-        #include <linux/namei.h>
-],[
-        struct nameidata nd;
-        struct lookup_intent *it;
-
-        it = &nd.intent;
-        intent_init(it, IT_OPEN);
-        it->d.lustre.it_disposition = 0;
-        it->d.lustre.it_data = NULL;
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_VFS_INTENT_PATCHES, 1, [VFS intent patches are applied])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.22 lost second parameter for invalidate_bdev
-AC_DEFUN([LC_INVALIDATE_BDEV_2ARG],
-[AC_MSG_CHECKING([if invalidate_bdev has second argument])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/buffer_head.h>
-],[
-        invalidate_bdev(NULL,0);
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_INVALIDATE_BDEV_2ARG, 1,
-                [invalidate_bdev has second argument])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.23 have return type 'void' for unregister_blkdev
-AC_DEFUN([LC_UNREGISTER_BLKDEV_RETURN_INT],
-[AC_MSG_CHECKING([if unregister_blkdev return int])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        int i = unregister_blkdev(0,NULL);
-],[
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_UNREGISTER_BLKDEV_RETURN_INT, 1, 
-                [unregister_blkdev return int])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.23 change .sendfile to .splice_read
-AC_DEFUN([LC_KERNEL_SPLICE_READ],
-[AC_MSG_CHECKING([if kernel has .splice_read])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-],[
-        struct file_operations file;
-
-        file.splice_read = NULL;
-], [
-        AC_MSG_RESULT([yes])
-        AC_DEFINE(HAVE_KERNEL_SPLICE_READ, 1,
-                [kernel has .slice_read])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-# 2.6.23 extract nfs export related data into exportfs.h
-AC_DEFUN([LC_HAVE_EXPORTFS_H],
-[
-tmpfl="$CFLAGS"
-CFLAGS="$CFLAGS -I$LINUX_OBJ/include"
-AC_CHECK_HEADERS([linux/exportfs.h])
-CFLAGS="$tmpfl"
-])
-
-#
-# LC_PROG_LINUX
-#
-# Lustre linux kernel checks
-#
-AC_DEFUN([LC_PROG_LINUX],
-         [LC_LUSTRE_VERSION_H
-          if test x$enable_server = xyes ; then
-              LC_CONFIG_BACKINGFS
-          fi
-          LC_CONFIG_PINGER
-          LC_CONFIG_CHECKSUM
-          LC_CONFIG_LIBLUSTRE_RECOVERY
-          LC_CONFIG_QUOTA
-          LC_CONFIG_HEALTH_CHECK_WRITE
-          LC_CONFIG_LRU_RESIZE
-          LC_CONFIG_ADAPTIVE_TIMEOUTS
-
-          LC_TASK_PPTR
-          # RHEL4 patches
-          LC_EXPORT_TRUNCATE_COMPLETE
-          LC_EXPORT_D_REHASH_COND
-          LC_EXPORT___D_REHASH
-          LC_EXPORT_D_MOVE_LOCKED
-          LC_EXPORT___D_MOVE
-          LC_EXPORT_NODE_TO_CPUMASK
-
-          LC_STRUCT_KIOBUF
-          LC_FUNC_COND_RESCHED
-          LC_FUNC_ZAP_PAGE_RANGE
-          LC_FUNC_PDE
-          LC_FUNC_DIRECT_IO
-          LC_HEADER_MM_INLINE
-          LC_STRUCT_INODE
-          LC_FUNC_REGISTER_CACHE
-          LC_FUNC_GRAB_CACHE_PAGE_NOWAIT_GFP
-          LC_FUNC_DEV_SET_RDONLY
-          LC_FUNC_FILEMAP_FDATAWRITE
-          LC_STRUCT_STATFS
-          LC_FUNC_PAGE_MAPPED
-          LC_STRUCT_FILE_OPS_UNLOCKED_IOCTL
-          LC_FILEMAP_POPULATE
-          LC_D_ADD_UNIQUE
-          LC_BIT_SPINLOCK_H
-          LC_XATTR_ACL
-          LC_STRUCT_INTENT_FILE
-          LC_POSIX_ACL_XATTR_H
-          LC_EXPORT___IGET
-          LC_FUNC_SET_FS_PWD
-          LC_FUNC_MS_FLOCK_LOCK
-          LC_FUNC_HAVE_CAN_SLEEP_ARG
-          LC_FUNC_F_OP_FLOCK
-          LC_QUOTA_READ
-          LC_COOKIE_FOLLOW_LINK
-          LC_FUNC_RCU
-
-          # does the kernel have VFS intent patches?
-          LC_VFS_INTENT_PATCHES
-
-          # 2.6.15
-          LC_INODE_I_MUTEX
-
-          # SLES 10 (at least)
-          LC_SYMVERFILE
-
-          # 2.6.17
-          LC_DQUOTOFF_MUTEX
-
-          # 2.6.18
-          LC_NR_PAGECACHE
-          LC_STATFS_DENTRY_PARAM
-          LC_VFS_KERN_MOUNT
-          LC_INVALIDATEPAGE_RETURN_INT
-          LC_UMOUNTBEGIN_HAS_VFSMOUNT
-
-          #2.6.18 + RHEL5 (fc6)
-          LC_PG_FS_MISC
-          LC_PAGE_CHECKED
-
-          # 2.6.19
-          LC_INODE_BLKSIZE
-          LC_VFS_READDIR_U64_INO
-          LC_FILE_WRITEV
-          LC_FILE_READV
-
-          # 2.6.20
-          LC_CANCEL_DIRTY_PAGE
-
-          # raid5-zerocopy patch
-          LC_PAGE_CONSTANT
-	  
-	  # 2.6.22
-          LC_INVALIDATE_BDEV_2ARG
-          # 2.6.23
-          LC_UNREGISTER_BLKDEV_RETURN_INT
-          LC_KERNEL_SPLICE_READ
-          LC_HAVE_EXPORTFS_H
-])
-
-#
-# LC_CONFIG_CLIENT_SERVER
-#
-# Build client/server sides of Lustre
-#
-AC_DEFUN([LC_CONFIG_CLIENT_SERVER],
-[AC_MSG_CHECKING([whether to build Lustre server support])
-AC_ARG_ENABLE([server],
-	AC_HELP_STRING([--disable-server],
-			[disable Lustre server support]),
-	[],[enable_server='yes'])
-AC_MSG_RESULT([$enable_server])
-
-AC_MSG_CHECKING([whether to build Lustre client support])
-AC_ARG_ENABLE([client],
-	AC_HELP_STRING([--disable-client],
-			[disable Lustre client support]),
-	[],[enable_client='yes'])
-AC_MSG_RESULT([$enable_client])])
-
-#
-# LC_CONFIG_LIBLUSTRE
-#
-# whether to build liblustre
-#
-AC_DEFUN([LC_CONFIG_LIBLUSTRE],
-[AC_MSG_CHECKING([whether to build Lustre library])
-AC_ARG_ENABLE([liblustre],
-	AC_HELP_STRING([--disable-liblustre],
-			[disable building of Lustre library]),
-	[],[enable_liblustre=$with_sysio])
-AC_MSG_RESULT([$enable_liblustre])
-# only build sysio if liblustre is built
-with_sysio="$enable_liblustre"
-
-AC_MSG_CHECKING([whether to build liblustre tests])
-AC_ARG_ENABLE([liblustre-tests],
-	AC_HELP_STRING([--enable-liblustre-tests],
-			[enable liblustre tests, if --disable-tests is used]),
-	[],[enable_liblustre_tests=$enable_tests])
-if test x$enable_liblustre != xyes ; then
-   enable_liblustre_tests='no'
-fi
-AC_MSG_RESULT([$enable_liblustre_tests])
-
-AC_MSG_CHECKING([whether to enable liblustre acl])
-AC_ARG_ENABLE([liblustre-acl],
-	AC_HELP_STRING([--disable-liblustre-acl],
-			[disable ACL support for liblustre]),
-	[],[enable_liblustre_acl=yes])
-if test x$enable_liblustre != xyes ; then
-   enable_liblustre_acl='no'
-fi
-AC_MSG_RESULT([$enable_liblustre_acl])
-if test x$enable_liblustre_acl != xno ; then
-  AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS)
-fi
-
-AC_MSG_CHECKING([whether to build mpitests])
-AC_ARG_ENABLE([mpitests],
-	AC_HELP_STRING([--enable-mpitests],
-			[build liblustre mpi tests]),
-	[],[enable_mpitests=no])
-AC_MSG_RESULT([$enable_mpitests])
-
-AC_MSG_NOTICE([Enabling Lustre configure options for libsysio])
-ac_configure_args="$ac_configure_args --with-lustre-hack --with-sockets"
-
-LC_CONFIG_PINGER
-LC_CONFIG_LIBLUSTRE_RECOVERY
-])
-
-AC_DEFUN([LC_CONFIG_LRU_RESIZE],
-[AC_MSG_CHECKING([whether to enable lru self-adjusting])
-AC_ARG_ENABLE([lru_resize], 
-	AC_HELP_STRING([--enable-lru-resize],
-			[enable lru resize support]),
-	[],[enable_lru_resize='yes'])
-AC_MSG_RESULT([$enable_lru_resize])
-if test x$enable_lru_resize != xno; then
-   AC_DEFINE(HAVE_LRU_RESIZE_SUPPORT, 1, [Enable lru resize support])
-fi
-])
-
-AC_DEFUN([LC_CONFIG_ADAPTIVE_TIMEOUTS],
-[AC_MSG_CHECKING([whether to enable ptlrpc adaptive timeouts support])
-AC_ARG_ENABLE([adaptive_timeouts],
-	AC_HELP_STRING([--enable-adaptive-timeouts],
-			[enable ptlrpc adaptive timeouts support]),
-	[],[enable_adaptive_timeouts='no'])
-AC_MSG_RESULT([$enable_adaptive_timeouts])
-if test x$enable_adaptive_timeouts == xyes; then
-   AC_DEFINE(HAVE_AT_SUPPORT, 1, [Enable adaptive timeouts support])
-fi
-])
-
-#
-# LC_CONFIG_QUOTA
-#
-# whether to enable quota support
-#
-AC_DEFUN([LC_CONFIG_QUOTA],
-[AC_MSG_CHECKING([whether to enable quota support])
-AC_ARG_ENABLE([quota], 
-	AC_HELP_STRING([--enable-quota],
-			[enable quota support]),
-	[],[enable_quota='yes'])
-AC_MSG_RESULT([$enable_quota])
-if test x$linux25 != xyes; then
-   enable_quota='no'
-fi
-if test x$enable_quota != xno; then
-   AC_DEFINE(HAVE_QUOTA_SUPPORT, 1, [Enable quota support])
-fi
-])
-  
-AC_DEFUN([LC_QUOTA_READ],
-[AC_MSG_CHECKING([if kernel supports quota_read])
-LB_LINUX_TRY_COMPILE([
-	#include <linux/fs.h>
-],[
-	struct super_operations sp;
-        void *i = (void *)sp.quota_read;
-],[
-	AC_MSG_RESULT([yes])
-	AC_DEFINE(KERNEL_SUPPORTS_QUOTA_READ, 1, [quota_read found])
-],[
-	AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_COOKIE_FOLLOW_LINK
-#
-# kernel 2.6.13+ ->follow_link returns a cookie
-#
-
-AC_DEFUN([LC_COOKIE_FOLLOW_LINK],
-[AC_MSG_CHECKING([if inode_operations->follow_link returns a cookie])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/fs.h>
-        #include <linux/namei.h>
-],[
-        struct dentry dentry;
-        struct nameidata nd;
-
-        dentry.d_inode->i_op->put_link(&dentry, &nd, NULL);
-],[
-        AC_DEFINE(HAVE_COOKIE_FOLLOW_LINK, 1, [inode_operations->follow_link returns a cookie])
-        AC_MSG_RESULT([yes])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_FUNC_RCU
-#
-# kernels prior than 2.6.0(?) have no RCU supported; in kernel 2.6.5(SUSE), 
-# call_rcu takes three parameters.
-#
-AC_DEFUN([LC_FUNC_RCU],
-[AC_MSG_CHECKING([if kernel have RCU supported])
-LB_LINUX_TRY_COMPILE([
-        #include <linux/rcupdate.h>
-],[],[
-        AC_DEFINE(HAVE_RCU, 1, [have RCU defined])
-        AC_MSG_RESULT([yes])
-
-        AC_MSG_CHECKING([if call_rcu takes three parameters])
-        LB_LINUX_TRY_COMPILE([
-                #include <linux/rcupdate.h>
-        ],[
-                struct rcu_head rh;
-                call_rcu(&rh, (void (*)(struct rcu_head *))1, NULL);
-        ],[
-                AC_DEFINE(HAVE_CALL_RCU_PARAM, 1, [call_rcu takes three parameters])
-                AC_MSG_RESULT([yes])
-        ],[
-                AC_MSG_RESULT([no]) 
-        ])
-],[
-        AC_MSG_RESULT([no])
-])
-])
-
-#
-# LC_CONFIGURE
-#
-# other configure checks
-#
-AC_DEFUN([LC_CONFIGURE],
-[LC_CONFIG_OBD_BUFFER_SIZE
-
-# include/liblustre.h
-AC_CHECK_HEADERS([asm/page.h sys/user.h sys/vfs.h stdint.h blkid/blkid.h])
-
-# include/lustre/lustre_user.h
-# See note there re: __ASM_X86_64_PROCESSOR_H
-AC_CHECK_HEADERS([linux/fs.h linux/quota.h])
-
-# liblustre/llite_lib.h
-AC_CHECK_HEADERS([xtio.h file.h])
-
-# liblustre/dir.c
-AC_CHECK_HEADERS([linux/types.h sys/types.h linux/unistd.h unistd.h])
-
-# liblustre/lutil.c
-AC_CHECK_HEADERS([netinet/in.h arpa/inet.h catamount/data.h])
-AC_CHECK_FUNCS([inet_ntoa])
-
-# libsysio/src/readlink.c
-LC_READLINK_SSIZE_T
-
-# utils/llverfs.c
-AC_CHECK_HEADERS([ext2fs/ext2fs.h])
-
-# check for -lz support
-ZLIB=""
-AC_CHECK_LIB([z],
-             [adler32],
-             [AC_CHECK_HEADERS([zlib.h],
-                               [ZLIB="-lz"
-                                AC_DEFINE([HAVE_ADLER], 1,
-                                          [support alder32 checksum type])],
-                               [AC_MSG_WARN([No zlib-devel package found,
-                                             unable to use adler32 checksum])])],
-             [AC_MSG_WARN([No zlib package found, unable to use adler32 checksum])]
-)
-AC_SUBST(ZLIB)
-
-# Super safe df
-AC_ARG_ENABLE([mindf],
-      AC_HELP_STRING([--enable-mindf],
-                      [Make statfs report the minimum available space on any single OST instead of the sum of free space on all OSTs]),
-      [],[])
-if test "$enable_mindf" = "yes" ;  then
-      AC_DEFINE([MIN_DF], 1, [Report minimum OST free space])
-fi
-
-AC_ARG_ENABLE([fail_alloc],
-        AC_HELP_STRING([--disable-fail-alloc],
-                [disable randomly alloc failure]),
-        [],[enable_fail_alloc=yes])
-AC_MSG_CHECKING([whether to randomly failing memory alloc])
-AC_MSG_RESULT([$enable_fail_alloc])
-if test x$enable_fail_alloc != xno ; then
-        AC_DEFINE([RANDOM_FAIL_ALLOC], 1, [enable randomly alloc failure])
-fi
-
-])
-
-#
-# LC_CONDITIONALS
-#
-# AM_CONDITIONALS for lustre
-#
-AC_DEFUN([LC_CONDITIONALS],
-[AM_CONDITIONAL(LIBLUSTRE, test x$enable_liblustre = xyes)
-AM_CONDITIONAL(USE_QUILT, test x$QUILT != xno)
-AM_CONDITIONAL(LIBLUSTRE_TESTS, test x$enable_liblustre_tests = xyes)
-AM_CONDITIONAL(MPITESTS, test x$enable_mpitests = xyes, Build MPI Tests)
-AM_CONDITIONAL(CLIENT, test x$enable_client = xyes)
-AM_CONDITIONAL(SERVER, test x$enable_server = xyes)
-AM_CONDITIONAL(QUOTA, test x$enable_quota = xyes)
-AM_CONDITIONAL(BLKID, test x$ac_cv_header_blkid_blkid_h = xyes)
-AM_CONDITIONAL(EXT2FS_DEVEL, test x$ac_cv_header_ext2fs_ext2fs_h = xyes)
-AM_CONDITIONAL(LIBPTHREAD, test x$enable_libpthread = xyes)
-])
-
-#
-# LC_CONFIG_FILES
-#
-# files that should be generated with AC_OUTPUT
-#
-AC_DEFUN([LC_CONFIG_FILES],
-[AC_CONFIG_FILES([
-lustre/Makefile
-lustre/autoMakefile
-lustre/autoconf/Makefile
-lustre/contrib/Makefile
-lustre/doc/Makefile
-lustre/include/Makefile
-lustre/include/lustre_ver.h
-lustre/include/linux/Makefile
-lustre/include/lustre/Makefile
-lustre/kernel_patches/targets/2.6-suse.target
-lustre/kernel_patches/targets/2.6-vanilla.target
-lustre/kernel_patches/targets/2.6-rhel4.target
-lustre/kernel_patches/targets/2.6-rhel5.target
-lustre/kernel_patches/targets/2.6-fc5.target
-lustre/kernel_patches/targets/2.6-patchless.target
-lustre/kernel_patches/targets/2.6-sles10.target
-lustre/kernel_patches/targets/hp_pnnl-2.4.target
-lustre/kernel_patches/targets/rh-2.4.target
-lustre/kernel_patches/targets/rhel-2.4.target
-lustre/kernel_patches/targets/suse-2.4.21-2.target
-lustre/kernel_patches/targets/sles-2.4.target
-lustre/ldlm/Makefile
-lustre/liblustre/Makefile
-lustre/liblustre/tests/Makefile
-lustre/llite/Makefile
-lustre/llite/autoMakefile
-lustre/lov/Makefile
-lustre/lov/autoMakefile
-lustre/lvfs/Makefile
-lustre/lvfs/autoMakefile
-lustre/mdc/Makefile
-lustre/mdc/autoMakefile
-lustre/mds/Makefile
-lustre/mds/autoMakefile
-lustre/obdclass/Makefile
-lustre/obdclass/autoMakefile
-lustre/obdclass/linux/Makefile
-lustre/obdecho/Makefile
-lustre/obdecho/autoMakefile
-lustre/obdfilter/Makefile
-lustre/obdfilter/autoMakefile
-lustre/osc/Makefile
-lustre/osc/autoMakefile
-lustre/ost/Makefile
-lustre/ost/autoMakefile
-lustre/mgc/Makefile
-lustre/mgc/autoMakefile
-lustre/mgs/Makefile
-lustre/mgs/autoMakefile
-lustre/ptlrpc/Makefile
-lustre/ptlrpc/autoMakefile
-lustre/quota/Makefile
-lustre/quota/autoMakefile
-lustre/scripts/Makefile
-lustre/scripts/version_tag.pl
-lustre/tests/Makefile
-lustre/utils/Makefile
-])
-case $lb_target_os in
-        darwin)
-                AC_CONFIG_FILES([ lustre/obdclass/darwin/Makefile ])
-                ;;
-esac
-
-])
diff --git a/lustre/autoconf/lustre-version.ac b/lustre/autoconf/lustre-version.ac
deleted file mode 100644
index f2fcd810a8f67861f3ad1b9d8609c35447ff1f73..0000000000000000000000000000000000000000
--- a/lustre/autoconf/lustre-version.ac
+++ /dev/null
@@ -1,36 +0,0 @@
-m4_define([LUSTRE_MAJOR],[1])
-m4_define([LUSTRE_MINOR],[6])
-m4_define([LUSTRE_PATCH],[4])
-m4_define([LUSTRE_FIX],[56])
-# Note: we're starting prerelease versions at 50 this time.
-
-dnl # liblustre delta is 0.0.1.32 , next version with fixes is ok, but
-dnl # after following release candidate/beta would spill this warning already.
-m4_define([LUSTRE_VER_ALLOWED_OFFSET],["OBD_OCD_VERSION(0,0,1,32)"])
-m4_define([LUSTRE_LIB_VER_OFFSET_WARN],["OBD_OCD_VERSION(0,0,1,32)"])
-
-dnl # linux lustre delta is 0.2.0.0 , next major release version is ok
-m4_define([LUSTRE_CLI_VER_OFFSET_WARN],["OBD_OCD_VERSION(0,2,0,0)"])
-
-dnl # User editable part ends here. -----------------------------------------
-
-m4_pattern_allow(AC_LUSTRE)
-m4_define([LUSTRE_VERSION],m4_if(LUSTRE_FIX,[0],LUSTRE_MAJOR.LUSTRE_MINOR.LUSTRE_PATCH,LUSTRE_MAJOR.LUSTRE_MINOR.LUSTRE_PATCH.LUSTRE_FIX))
-
-[AC_LUSTRE_MAJOR]=LUSTRE_MAJOR
-[AC_LUSTRE_MINOR]=LUSTRE_MINOR
-[AC_LUSTRE_PATCH]=LUSTRE_PATCH
-[AC_LUSTRE_FIX]=LUSTRE_FIX
-[AC_LUSTRE_VERSION_STRING]=LUSTRE_VERSION
-[AC_LUSTRE_VER_ALLOWED_OFFSET]=LUSTRE_VER_ALLOWED_OFFSET
-[AC_LUSTRE_LIB_VER_OFFSET_WARN]=LUSTRE_LIB_VER_OFFSET_WARN
-[AC_LUSTRE_CLI_VER_OFFSET_WARN]=LUSTRE_CLI_VER_OFFSET_WARN
-
-AC_SUBST([AC_LUSTRE_MAJOR])
-AC_SUBST([AC_LUSTRE_MINOR])
-AC_SUBST([AC_LUSTRE_PATCH])
-AC_SUBST([AC_LUSTRE_FIX])
-AC_SUBST([AC_LUSTRE_VERSION_STRING])
-AC_SUBST([AC_LUSTRE_VER_ALLOWED_OFFSET])
-AC_SUBST([AC_LUSTRE_LIB_VER_OFFSET_WARN])
-AC_SUBST([AC_LUSTRE_CLI_VER_OFFSET_WARN])
diff --git a/lustre/conf/.cvsignore b/lustre/conf/.cvsignore
deleted file mode 100644
index 282522db0342d8750454b3dc162493b5fc709cc8..0000000000000000000000000000000000000000
--- a/lustre/conf/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/lustre/conf/Makefile.am b/lustre/conf/Makefile.am
deleted file mode 100644
index 978cf293c1f418940260c8a85094b9866709a55f..0000000000000000000000000000000000000000
--- a/lustre/conf/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-EXTRA_DIST = lustre.dtd lustre.schema slapd-lustre.conf lustre2ldif.xsl top.ldif
-ldapconfdir = $(sysconfdir)/openldap
-ldapschemadir = $(sysconfdir)/openldap/schema
-
-if UTILS
-ldapconf_SCRIPTS = slapd-lustre.conf
-ldapschema_SCRIPTS = lustre.schema
-pkgdata_DATA = top.ldif lustre2ldif.xsl
-endif
diff --git a/lustre/conf/lustre.dtd b/lustre/conf/lustre.dtd
deleted file mode 100644
index 360f4a03b45171e7e3cc1e2251f00522f1f176dc..0000000000000000000000000000000000000000
--- a/lustre/conf/lustre.dtd
+++ /dev/null
@@ -1,145 +0,0 @@
-<!-- Lustre Management DTD -->
-
-<!-- basic entities -->
-<!ENTITY % object.content "(#PCDATA)">
-<!ENTITY % object.attr "
-             name CDATA #REQUIRED
-             uuid CDATA #REQUIRED">
-
-<!ENTITY % objref.content "(#PCDATA)">
-<!ENTITY % objref.attr    "uuidref CDATA #REQUIRED">
-
-<!-- main elements -->
-<!ELEMENT lustre (node | profile | mountpoint | ldlm | ptlrpc |echoclient |
-                  mds | mdsdev| ost | osd | lov | lovconfig)*>
-<!ATTLIST lustre version CDATA #REQUIRED>
-
-<!ELEMENT node (network | routetbl | profile_ref | timeout | 
-                lustreUpcall | portalsUpcall | ptldebug | subsystem)*>
-<!ATTLIST node %object.attr;
-               router CDATA #IMPLIED>
-               
-<!ELEMENT network (nid | port | route_tbl | sendmem | recvmem)*>
-<!ATTLIST network %object.attr;
-                  nettype (tcp | elan | gm) 'tcp'>
-
-<!ELEMENT routetbl (route)*>
-<!ATTLIST routetbl %object.attr;>
-<!ELEMENT route %object.content;>
-<!ATTLIST route type (elan | tcp | gm) #REQUIRED
-                gw CDATA #REQUIRED
-                lo CDATA #REQUIRED
-                hi CDATA #IMPLIED >
-
-<!ELEMENT profile (ldlm_ref | ptlrpc_ref | network_ref | routetbl_ref |
-                   osd_ref | mdsdev_ref | lovconfig_ref|
-                   echoclient_ref | mountpoint_ref)*>
-<!ATTLIST profile %object.attr;>
-
-<!ELEMENT mountpoint path #REQUIRED
-                     clientoptions #REQUIRED >
-                     filesystem_ref #REQUIRED >
-<!ATTLIST mountpoint %object.attr;>
-
-<!ELEMENT echoclient (obd_ref)>
-<!ATTLIST echoclient %object.attr;>
-
-<!ELEMENT ldlm EMPTY>
-<!ATTLIST ldlm %object.attr;>
-
-<!ELEMENT ptlrpc EMPTY>
-<!ATTLIST ptlrpc %object.attr;>
-
-<!ELEMENT osd (fstype | devpath | devsize | autoformat | 
-               target_ref | node_ref | journalsize | mkfsoptions | mountfsoptions)*>
-<!ATTLIST osd %object.attr; 
-              osdtype (obdfilter | obdecho) 'obdfilter'>
-
-<!ELEMENT ost (active_ref | group)*>
-<!ATTLIST ost %object.attr;
-              failover ( 1 | 0 ) #IMPLIED>
-
-<!ELEMENT filesystem mds_ref #REQUIRED
-                     obd_ref #REQUIRED>
-<!ATTLIST filesystem %object.attr;>
-
-<!ELEMENT mds (active_ref | lovconfig_ref | group)*>
-<!ATTLIST mds %object.attr;
-              failover ( 1 | 0 ) #IMPLIED>
-
-<!ELEMENT mdsdev (fstype | devpath | devsize | autoformat | 
-                  target_ref | node_ref | journalsize | mkfsoptions | mountfsoptions)*>
-<!ATTLIST mdsdev %object.attr;>
-
-<!ELEMENT lov (mds_ref |(obd_ref)+)*>
-<!ATTLIST lov %object.attr;
-               stripesize    CDATA #REQUIRED
-               stripecount   CDATA #REQUIRED
-               stripeoffset  CDATA #IMPLIED
-               stripepattern CDATA #REQUIRED>
-
-<!ELEMENT lovconfig (lov_ref)>
-<!ATTLIST lovconfig %object.attr;>
-
-<!-- basic elements -->
-<!ELEMENT recoveryUpcall %object.content;>
-<!ELEMENT timeout       %object.content;>
-<!ELEMENT ptldebug      %object.content;>
-<!ELEMENT subsystem     %object.content;>
-<!ELEMENT journalsize   %object.content;>
-<!ELEMENT mkfsoptions   %object.content;>
-<!ELEMENT mountfsoptions %object.content;>
-<!ELEMENT clientoptions %object.content;>
-<!ELEMENT fstype        %object.content;>
-<!ELEMENT nid           %object.content;>
-<!ELEMENT port          %object.content;>
-<!ELEMENT sendmem       %object.content;>
-<!ELEMENT recvmem       %object.content;>
-<!ELEMENT autoformat    %object.content;>
-<!ELEMENT activetarget  %object.content;>
-<!ELEMENT devpath       %object.content;>
-<!ELEMENT devsize       %object.content;>
-<!ELEMENT path          %object.content;>
-<!ELEMENT fileset       %object.content;>
-
-<!-- object reference tag elements -->
-<!ELEMENT network_ref     %objref.content;>
-<!ATTLIST network_ref     %objref.attr;>
-<!ELEMENT routetbl_ref    %objref.content;>
-<!ATTLIST routetbl_ref    %objref.attr;>
-<!ELEMENT node_ref        %objref.content;>
-<!ATTLIST node_ref        %objref.attr;>
-<!ELEMENT profile_ref     %objref.content;>
-<!ATTLIST profile_ref     %objref.attr;>
-<!ELEMENT osd_ref         %objref.content;>
-<!ATTLIST osd_ref         %objref.attr;>
-<!ELEMENT mds_ref         %objref.content;>
-<!ATTLIST mds_ref         %objref.attr;>
-<!ELEMENT mdsdev_ref      %objref.content;>
-<!ATTLIST mdsdev_ref      %objref.attr;>
-<!ELEMENT obd_ref         %objref.content;>
-<!ATTLIST obd_ref         %objref.attr;>
-<!ELEMENT ost_ref         %objref.content;>
-<!ATTLIST ost_ref         %objref.attr;>
-<!ELEMENT active_ref      %objref.content;>
-<!ATTLIST active_ref      %objref.attr;>
-<!ELEMENT target_ref      %objref.content;>
-<!ATTLIST target_ref      %objref.attr;>
-<!ELEMENT lov_ref         %objref.content;>
-<!ATTLIST lov_ref         %objref.attr;>
-<!ELEMENT lovconfig_ref   %objref.content;>
-<!ATTLIST lovconfig_ref   %objref.attr;>
-<!ELEMENT mountpoint_ref  %objref.content;>
-<!ATTLIST mountpoint_ref  %objref.attr;>
-<!ELEMENT filesystem_ref  %objref.content;>
-<!ATTLIST filesystem_ref  %objref.attr;>
-<!ELEMENT echoclient_ref  %objref.content;>
-<!ATTLIST echoclient_ref  %objref.attr;>
-<!ELEMENT failover_ref    %objref.content;>
-<!ATTLIST failover_ref    %objref.attr;>
-<!ELEMENT ldlm_ref        %objref.content;>
-<!ATTLIST ldlm_ref        %objref.attr;>
-<!ELEMENT ptlrpc_ref      %objref.content;>
-<!ATTLIST ptlrpc_ref      %objref.attr;>
-
-
diff --git a/lustre/conf/lustre2ldif.xsl b/lustre/conf/lustre2ldif.xsl
deleted file mode 100644
index 58b06491369792862ecc17e8f21a2984d856a4af..0000000000000000000000000000000000000000
--- a/lustre/conf/lustre2ldif.xsl
+++ /dev/null
@@ -1,308 +0,0 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<stylesheet version="1.0" xmlns="http://www.w3.org/1999/XSL/Transform"> 
-<output omit-xml-declaration="yes" />
-<strip-space elements="*"/>
-<param name="config">fs=lustre</param>
-<variable name="basedn">config=<value-of select="$config"/>,fs=lustre</variable>
-
-<template match="lustre">
-dn: <value-of select="$basedn"/>
-uuid: CONFIG_UUID
-objectClass: LUSTRECONFIG
-config: <value-of select="$config"/>
-version: <value-of select="@version"/>
-<text>
-</text><apply-templates/>
-</template>
-
-<template match="node">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: NODE
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-networkRef: <value-of select="network/@uuid"/>
-<for-each select="profile_ref">
-profileRef: <value-of select="@uuidref"/>
-</for-each>
-<if test="timeout">
-timeout: <value-of select="timeout"/>
-</if>
-<if test="lustreUpcall">
-lustreUpcall: <value-of select="lustreUpcall"/>
-</if>
-<if test="portalsUpcall">
-portalsUpcall: <value-of select="portalsUpcall"/>
-</if>
-<if test="ptldebug">
-ptldebug: <value-of select="ptldebug"/>
-</if>
-<if test="subsystem">
-subsystem: <value-of select="subsystem"/>
-</if>
-<text>
-</text>
-<for-each select="network">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: NETWORK
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-nettype: <value-of select="@nettype"/>
-nid: <value-of select="nid"/>
-<if test="port">
-port: <value-of select="port"/>
-</if>
-<text>
-</text>
-</for-each>
-</template>
-
-<template match="profile">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: PROFILE
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/><apply-templates/>
-<text>
-</text>
-</template>
-
-<template match="network">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: NETWORK
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-nettype: <value-of select="@nettype"/>
-nid: <value-of select="nid"/>
-<if test="port">
-port: <value-of select="port"/>
-</if>
-<text>
-</text>
-</template>
-
-
-<template match="mds">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: MDS
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-activeRef: <value-of select="active_ref/@uuidref"/>
-<if test="lovconfig_ref">
-lovconfigRef: <value-of select="lovconfig_ref/@uuidref"/>
-</if>
-<if test="filesystem_ref">
-filesystemRef: <value-of select="filesystem_ref/@uuidref"/>
-</if>
-<if test="@failover">
-failover: <value-of select="@failover"/>
-</if>
-<if test="group">
-group: <value-of select="group"/>
-</if>
-<text>
-</text>
-</template>
-
-<template match="mdsdev">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: MDSDEV
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-<if test="fstype">
-fstype: <value-of select="fstype"/>
-</if>
-<if test="autoformat">
-autoformat: <value-of select="autoformat"/>
-</if>
-<if test="devpath">
-devpath: <value-of select="devpath"/>
-</if>
-<if test="devsize">
-devsize: <value-of select="devsize"/>
-</if>
-<if test="journalsize">
-journalsize: <value-of select="journalsize"/>
-</if>
-<if test="mkfsoptions">
-mkfsoptions: <value-of select="mkfsoptions"/>
-</if>
-<if test="mountfsoptions">
-mountfsoptions: <value-of select="mountfsoptions"/>
-</if>
-nodeRef: <value-of select="node_ref/@uuidref"/>
-targetRef: <value-of select="target_ref/@uuidref"/>
-<text>
-</text>
-</template>
-
-<template match="lov">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: LOV
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-mdsRef: <value-of select="mds_ref/@uuidref"/>
-stripepattern: <value-of select="@stripepattern"/>
-stripesize: <value-of select="@stripesize"/>
-stripecount: <value-of select="@stripecount"/><apply-templates/>
-<text>
-</text>
-</template>
-
-<template match="lovconfig">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: LOVCONFIG
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/><apply-templates/>
-<text>
-</text>
-</template>
-
-<template match="osd">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: OSD
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-nodeRef: <value-of select="node_ref/@uuidref"/>
-targetRef: <value-of select="target_ref/@uuidref"/>
-osdtype: <value-of select="@osdtype"/>
-<if test="fstype">
-fstype: <value-of select="fstype"/>
-</if>
-<if test="autoformat">
-autoformat: <value-of select="autoformat"/>
-</if>
-<if test="devpath">
-devpath: <value-of select="devpath"/>
-</if>
-<if test="devsize">
-devsize: <value-of select="devsize"/>
-</if>
-<if test="journalsize">
-journalsize: <value-of select="journalsize"/>
-</if>
-<if test="mkfsoptions">
-mkfsoptions: <value-of select="mkfsoptions"/>
-</if>
-<if test="mountfsoptions">
-mountfsoptions: <value-of select="mountfsoptions"/>
-</if>
-<text>
-</text>
-</template>
-
-<template match="ost">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: OST
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-activeRef: <value-of select="active_ref/@uuidref"/>
-<if test="@failover">
-failover: <value-of select="@failover"/>
-</if>
-<if test="group">
-group: <value-of select="group"/>
-</if>
-<text>
-</text>
-</template>
-
-<template match="filesystem">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: FILESYSTEM
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/><apply-templates/>
-<text>
-</text>
-</template>
-
-<template match="mountpoint">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: MOUNTPOINT
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/><apply-templates/>
-<if test="clientoptions">
-clientoptions: <value-of select="clientoptions"/>
-</if>
-<text>
-</text>
-</template>
-
-<template match="echoclient">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: ECHOCLIENT
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/><apply-templates/>
-<text>
-</text>
-</template>
-
-<template match="ldlm">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: LDLM
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-<text>
-</text>
-</template>
-
-<template match="ptlrpc">
-dn: uuid=<value-of select="@uuid"/>,<value-of select="$basedn"/>
-objectClass: PTLRPC
-lustreName: <value-of select="@name"/>
-uuid: <value-of select="@uuid"/>
-<text>
-</text>
-</template>
-
-<template match="ldlm_ref">
-ldlmRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="ptlrpc_ref">
-ptlrpcRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="obd_ref">
-obdRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="osd_ref">
-osdRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="ost_ref">
-ostRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="network_ref">
-networkRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="mds_ref">
-mdsRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="mdsdev_ref">
-mdsdevRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="mountpoint_ref">
-mountpointRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="filesystem_ref">
-filesystemRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="echoclient_ref">
-echoclientRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="lov_ref">
-lovRef: <value-of select="@uuidref"/>
-</template>
-
-<template match="path">
-path: <value-of select="."/>
-</template>
-
-</stylesheet>
diff --git a/lustre/conf/modules.conf b/lustre/conf/modules.conf
deleted file mode 100644
index a5bdefa692a272b570df04907177c523ded9bf11..0000000000000000000000000000000000000000
--- a/lustre/conf/modules.conf
+++ /dev/null
@@ -1,8 +0,0 @@
-# sample modules.conf for autoloading lustre modules on zeroconf clients
-
-add below kptlrouter portals
-#add below ksocknal kptlrouter
-#add below kqswnal kptlrouter
-add below ptlrpc ksocknal
-add below llite lov osc 
-alias lustre llite
diff --git a/lustre/conf/slapd-lustre.conf b/lustre/conf/slapd-lustre.conf
deleted file mode 100644
index b93b411244057d49759e6f133cd5cc22d24a9533..0000000000000000000000000000000000000000
--- a/lustre/conf/slapd-lustre.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-#######################################################################
-# lustre ldap config database
-#######################################################################
-
-database	ldbm
-suffix		"fs=lustre"
-rootdn		"cn=Manager,fs=lustre"
-include		/etc/openldap/schema/lustre.schema
-rootpw		secret
-directory	/var/lib/ldap/lustre
-index           objectClass,uuid	eq
diff --git a/lustre/conf/top.ldif b/lustre/conf/top.ldif
deleted file mode 100644
index d0cfdac4cfe5e62b6ecaf6cbad1bf124756d9bc0..0000000000000000000000000000000000000000
--- a/lustre/conf/top.ldif
+++ /dev/null
@@ -1,4 +0,0 @@
-dn: fs=lustre
-fs:lustre
-objectClass: lustre
-lustreDesc: Lustre Config
diff --git a/lustre/contrib/.cvsignore b/lustre/contrib/.cvsignore
deleted file mode 100644
index 282522db0342d8750454b3dc162493b5fc709cc8..0000000000000000000000000000000000000000
--- a/lustre/contrib/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/lustre/contrib/Makefile.am b/lustre/contrib/Makefile.am
deleted file mode 100644
index 5a8e66c843d02759b009622c8b021608624abac8..0000000000000000000000000000000000000000
--- a/lustre/contrib/Makefile.am
+++ /dev/null
@@ -1,5 +0,0 @@
-# Contributions Makefile
-
-EXTRA_DIST = mpich-*.patch
-pkgdata_DATA = $(EXTRA_DIST)
-
diff --git a/lustre/contrib/README b/lustre/contrib/README
deleted file mode 100644
index 0741258310ccfcf54813825936f700526ff2f7bb..0000000000000000000000000000000000000000
--- a/lustre/contrib/README
+++ /dev/null
@@ -1,6 +0,0 @@
-The files in this directory are user-contributed and are not supported by
-CFS in any way.
-
-. mpich2-1.0.3.patch & adio-lustre-mpich2-v03.patch : came from weikuan ORNL
-  (wyu@ornl.gov) and you can get detail information http://ft.ornl.gov/projects/io/
-   
diff --git a/lustre/contrib/adio-lustre-mpich2-v03.patch b/lustre/contrib/adio-lustre-mpich2-v03.patch
deleted file mode 100644
index 250c7afb003e0733d4a0c39c0b0c2242aae3f353..0000000000000000000000000000000000000000
--- a/lustre/contrib/adio-lustre-mpich2-v03.patch
+++ /dev/null
@@ -1,1221 +0,0 @@
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre.c romio-ornl/adio/ad_lustre/ad_lustre.c
---- romio-orig/adio/ad_lustre/ad_lustre.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre.c	2007-11-10 07:13:32.554840000 -0500
-@@ -0,0 +1,34 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 2001 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+struct ADIOI_Fns_struct ADIO_LUSTRE_operations = {
-+    ADIOI_LUSTRE_Open, /* Open */
-+    ADIOI_LUSTRE_ReadContig, /* ReadContig */
-+    ADIOI_LUSTRE_WriteContig, /* WriteContig */
-+    ADIOI_LUSTRE_ReadStridedColl, /* ReadStridedColl */
-+    ADIOI_LUSTRE_WriteStridedColl, /* WriteStridedColl */
-+    ADIOI_GEN_SeekIndividual, /* SeekIndividual */
-+    ADIOI_LUSTRE_Fcntl, /* Fcntl */
-+    ADIOI_LUSTRE_SetInfo, /* SetInfo */
-+    ADIOI_GEN_ReadStrided, /* ReadStrided */
-+    ADIOI_GEN_WriteStrided, /* WriteStrided */
-+    ADIOI_LUSTRE_Close, /* Close */
-+    ADIOI_GEN_IreadContig, /* IreadContig */
-+    ADIOI_GEN_IwriteContig, /* IwriteContig */
-+    ADIOI_GEN_IODone, /* ReadDone */
-+    ADIOI_GEN_IODone, /* WriteDone */
-+    ADIOI_GEN_IOComplete, /* ReadComplete */
-+    ADIOI_GEN_IOComplete, /* WriteComplete */
-+    ADIOI_GEN_IreadStrided, /* IreadStrided */
-+    ADIOI_GEN_IwriteStrided, /* IwriteStrided */
-+    ADIOI_GEN_Flush, /* Flush */
-+    ADIOI_GEN_Resize, /* Resize */
-+    ADIOI_GEN_Delete, /* Delete */
-+};
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_close.c romio-ornl/adio/ad_lustre/ad_lustre_close.c
---- romio-orig/adio/ad_lustre/ad_lustre_close.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_close.c	2007-11-10 07:13:32.557840000 -0500
-@@ -0,0 +1,40 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+#ifdef PROFILE
-+#include "mpe.h"
-+#endif
-+
-+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code)
-+{
-+    int err, derr=0;
-+    static char myname[] = "ADIOI_LUSTRE_CLOSE";
-+
-+#ifdef PROFILE
-+    MPE_Log_event(9, 0, "start close");
-+#endif
-+
-+    err = close(fd->fd_sys);
-+
-+#ifdef PROFILE
-+    MPE_Log_event(10, 0, "end close");
-+#endif
-+
-+    fd->fd_sys    = -1;
-+
-+    if (err == -1 || derr == -1) {
-+	*error_code = MPIO_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE,
-+					   myname, __LINE__, MPI_ERR_IO,
-+					   "**io",
-+					   "**io %s", strerror(errno));
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_fcntl.c romio-ornl/adio/ad_lustre/ad_lustre_fcntl.c
---- romio-orig/adio/ad_lustre/ad_lustre_fcntl.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_fcntl.c	2007-11-10 07:13:32.561833000 -0500
-@@ -0,0 +1,97 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+#include "adio_extern.h"
-+
-+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code)
-+{
-+    int i, ntimes;
-+    ADIO_Offset curr_fsize, alloc_size, size, len, done;
-+    ADIO_Status status;
-+    char *buf;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_FCNTL";
-+#endif
-+
-+    switch(flag) {
-+    case ADIO_FCNTL_GET_FSIZE:
-+	fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END);
-+	if (fd->fp_sys_posn != -1) 
-+	     lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
-+	if (fcntl_struct->fsize == -1) {
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, 
-+		    MPIR_ERR_RECOVERABLE, myname, __LINE__, 
-+		    MPI_ERR_IO, "**io", "**io %s", strerror(errno));
-+	}
-+	else *error_code = MPI_SUCCESS;
-+	break;
-+
-+    case ADIO_FCNTL_SET_DISKSPACE:
-+	/* will be called by one process only */
-+	/* On file systems with no preallocation function, I have to 
-+           explicitly write 
-+           to allocate space. Since there could be holes in the file, 
-+           I need to read up to the current file size, write it back, 
-+           and then write beyond that depending on how much 
-+           preallocation is needed.
-+           read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */
-+
-+	curr_fsize = lseek(fd->fd_sys, 0, SEEK_END);
-+	alloc_size = fcntl_struct->diskspace;
-+
-+	size = ADIOI_MIN(curr_fsize, alloc_size);
-+	
-+	ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
-+	buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ);
-+	done = 0;
-+
-+	for (i=0; i<ntimes; i++) {
-+	    len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ);
-+	    ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done,
-+			    &status, error_code);
-+	    if (*error_code != MPI_SUCCESS) {
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, 
-+			MPIR_ERR_RECOVERABLE, myname, __LINE__, 
-+			MPI_ERR_IO, "**io", "**io %s", strerror(errno));
-+                return;  
-+	    }
-+	    ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, 
-+                             done, &status, error_code);
-+	    if (*error_code != MPI_SUCCESS) return;
-+	    done += len;
-+	}
-+
-+	if (alloc_size > curr_fsize) {
-+	    memset(buf, 0, ADIOI_PREALLOC_BUFSZ); 
-+	    size = alloc_size - curr_fsize;
-+	    ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
-+	    for (i=0; i<ntimes; i++) {
-+		len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ);
-+		ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, 
-+				 done, &status, error_code);
-+		if (*error_code != MPI_SUCCESS) return;
-+		done += len;  
-+	    }
-+	}
-+	ADIOI_Free(buf);
-+	if (fd->fp_sys_posn != -1) 
-+	    lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+    case ADIO_FCNTL_SET_ATOMICITY:
-+	fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1;
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+    default:
-+	FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n");
-+	MPI_Abort(MPI_COMM_WORLD, 1);
-+    }
-+}
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre.h romio-ornl/adio/ad_lustre/ad_lustre.h
---- romio-orig/adio/ad_lustre/ad_lustre.h	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre.h	2007-11-10 07:13:32.565828000 -0500
-@@ -0,0 +1,34 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#ifndef AD_UNIX_INCLUDE
-+#define AD_UNIX_INCLUDE
-+
-+/* temp*/
-+#define HAVE_ASM_TYPES_H 1
-+
-+#include <unistd.h>
-+#include <linux/types.h>
-+#include <fcntl.h>
-+#include <sys/ioctl.h>
-+#include "lustre/lustre_user.h"
-+#include "adio.h"
-+/*#include "adioi.h"*/
-+
-+#ifdef HAVE_SIGNAL_H
-+#include <signal.h>
-+#endif
-+
-+#ifdef HAVE_AIO_H
-+#include <aio.h>
-+#ifdef HAVE_SYS_AIO_H
-+#include <sys/aio.h>
-+#endif
-+#endif /* End of HAVE_SYS_AIO_H */
-+
-+#endif /* End of AD_UNIX_INCLUDE */
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_hints.c romio-ornl/adio/ad_lustre/ad_lustre_hints.c
---- romio-orig/adio/ad_lustre/ad_lustre_hints.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_hints.c	2007-11-10 07:13:32.569824000 -0500
-@@ -0,0 +1,122 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
-+{
-+    char *value, *value_in_fd;
-+    int flag, tmp_val[3], str_factor=-1, str_unit=0, start_iodev=-1;
-+    struct lov_user_md lum = { 0 };
-+    int err, myrank, fd_sys, perm, amode, old_mask;
-+
-+    if ( (fd->info) == MPI_INFO_NULL) {
-+	/* This must be part of the open call. can set striping parameters 
-+           if necessary. */ 
-+	MPI_Info_create(&(fd->info));
-+	
-+	/* has user specified striping or server buffering parameters 
-+           and do they have the same value on all processes? */
-+	if (users_info != MPI_INFO_NULL) {
-+	    value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+
-+	    MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, 
-+			 value, &flag);
-+	    if (flag) {
-+		str_unit=atoi(value);
-+	    }
-+
-+	    MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, 
-+			 value, &flag);
-+	    if (flag) {
-+		str_factor=atoi(value);
-+	    } 
-+
-+	    MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, 
-+			 value, &flag);
-+	    if (flag) {
-+		start_iodev=atoi(value);
-+	    }
-+
-+	    ADIOI_Free(value);
-+	}
-+
-+	MPI_Comm_rank(fd->comm, &myrank);
-+	if (myrank == 0) {
-+	    tmp_val[0] = str_factor;
-+	    tmp_val[1] = str_unit;
-+	    tmp_val[2] = start_iodev;
-+	}
-+	MPI_Bcast(tmp_val, 3, MPI_INT, 0, fd->comm);
-+
-+	if (tmp_val[0] != str_factor 
-+		|| tmp_val[1] != str_unit 
-+		|| tmp_val[2] != start_iodev) {
-+	    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: All keys"
-+		    "-striping_factor:striping_unit:start_iodevice "
-+		    "need to be identical across all processes\n");
-+	    MPI_Abort(MPI_COMM_WORLD, 1);
-+       	} else if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) {
-+	     /* if user has specified striping info, process 0 tries to set it */
-+	    if (!myrank) {
-+		if (fd->perm == ADIO_PERM_NULL) {
-+		    old_mask = umask(022);
-+		    umask(old_mask);
-+		    perm = old_mask ^ 0666;
-+		}
-+		else perm = fd->perm;
-+
-+		amode = 0;
-+		if (fd->access_mode & ADIO_CREATE)
-+		    amode = amode | O_CREAT;
-+		if (fd->access_mode & ADIO_RDONLY)
-+		    amode = amode | O_RDONLY;
-+		if (fd->access_mode & ADIO_WRONLY)
-+		    amode = amode | O_WRONLY;
-+		if (fd->access_mode & ADIO_RDWR)
-+		    amode = amode | O_RDWR;
-+		if (fd->access_mode & ADIO_EXCL)
-+		    amode = amode | O_EXCL;
-+
-+		/* we need to create file so ensure this is set */
-+		amode = amode | O_LOV_DELAY_CREATE | O_CREAT;
-+
-+		fd_sys = open(fd->filename, amode, perm);
-+		if (fd_sys == -1) { 
-+		    if (errno != EEXIST) 
-+			fprintf(stderr, 
-+				"Failure to open file %s %d %d\n",strerror(errno), amode, perm);
-+		} else {
-+		    lum.lmm_magic = LOV_USER_MAGIC;
-+		    lum.lmm_pattern = 0;
-+		    lum.lmm_stripe_size = str_unit;
-+		    lum.lmm_stripe_count = str_factor;
-+		    lum.lmm_stripe_offset = start_iodev;
-+
-+		    err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum);
-+		    if (err == -1 && errno != EEXIST) { 
-+			fprintf(stderr, "Failure to set stripe info %s \n", strerror(errno));
-+		    }
-+		    close(fd_sys);
-+	       }
-+	    } /* End of striping parameters validation */
-+	}
-+	
-+	MPI_Barrier(fd->comm);
-+	/* set the values for collective I/O and data sieving parameters */
-+	ADIOI_GEN_SetInfo(fd, users_info, error_code);
-+    } else {
-+	/* The file has been opened previously and fd->fd_sys is a valid
-+           file descriptor. cannot set striping parameters now. */
-+	
-+	/* set the values for collective I/O and data sieving parameters */
-+	ADIOI_GEN_SetInfo(fd, users_info, error_code);
-+    }
-+ 
-+    *error_code = MPI_SUCCESS;
-+}
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_open.c romio-ornl/adio/ad_lustre/ad_lustre_open.c
---- romio-orig/adio/ad_lustre/ad_lustre_open.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_open.c	2007-11-10 08:22:01.202750000 -0500
-@@ -0,0 +1,120 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code)
-+{
-+    int perm, old_mask, amode;
-+    struct lov_user_md lum = { 0 };
-+    char *value;
-+
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_OPEN";
-+#endif
-+
-+    if (fd->perm == ADIO_PERM_NULL) {
-+	old_mask = umask(022);
-+	umask(old_mask);
-+	perm = old_mask ^ 0666;
-+    }
-+    else perm = fd->perm;
-+
-+    amode = 0;
-+    if (fd->access_mode & ADIO_CREATE)
-+	amode = amode | O_CREAT;
-+    if (fd->access_mode & ADIO_RDONLY)
-+	amode = amode | O_RDONLY;
-+    if (fd->access_mode & ADIO_WRONLY)
-+	amode = amode | O_WRONLY;
-+    if (fd->access_mode & ADIO_RDWR)
-+	amode = amode | O_RDWR;
-+    if (fd->access_mode & ADIO_EXCL)
-+	amode = amode | O_EXCL;
-+
-+    fd->fd_sys = open(fd->filename, amode, perm);
-+
-+    if (fd->fd_sys != -1) {
-+        int err;
-+
-+        value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+
-+        /* get file striping information and set it in info */
-+        lum.lmm_magic = LOV_USER_MAGIC;
-+        err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum);
-+
-+        if (!err) {
-+            sprintf(value, "%d", lum.lmm_stripe_size);
-+            MPI_Info_set(fd->info, "striping_unit", value);
-+
-+            sprintf(value, "%d", lum.lmm_stripe_count);
-+            MPI_Info_set(fd->info, "striping_factor", value);
-+
-+            sprintf(value, "%d", lum.lmm_stripe_offset);
-+            MPI_Info_set(fd->info, "start_iodevice", value);
-+        }
-+        ADIOI_Free(value);
-+
-+        if (fd->access_mode & ADIO_APPEND)
-+            fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
-+    }
-+
-+    if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND))
-+	fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
-+
-+    /* --BEGIN ERROR HANDLING-- */
-+    if (fd->fd_sys == -1) {
-+	if (errno == ENAMETOOLONG)
-+	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					       MPIR_ERR_RECOVERABLE, myname,
-+					       __LINE__, MPI_ERR_BAD_FILE,
-+					       "**filenamelong",
-+					       "**filenamelong %s %d",
-+					       fd->filename,
-+					       strlen(fd->filename));
-+	else if (errno == ENOENT)
-+	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					       MPIR_ERR_RECOVERABLE, myname,
-+					       __LINE__, MPI_ERR_NO_SUCH_FILE,
-+					       "**filenoexist",
-+					       "**filenoexist %s",
-+					       fd->filename);
-+	else if (errno == ENOTDIR || errno == ELOOP)
-+	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					       MPIR_ERR_RECOVERABLE,
-+					       myname, __LINE__,
-+					       MPI_ERR_BAD_FILE,
-+					       "**filenamedir",
-+					       "**filenamedir %s",
-+					       fd->filename);
-+	else if (errno == EACCES) {
-+	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					       MPIR_ERR_RECOVERABLE, myname,
-+					       __LINE__, MPI_ERR_ACCESS,
-+					       "**fileaccess",
-+					       "**fileaccess %s", 
-+					       fd->filename );
-+	}
-+	else if (errno == EROFS) {
-+	    /* Read only file or file system and write access requested */
-+	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					       MPIR_ERR_RECOVERABLE, myname,
-+					       __LINE__, MPI_ERR_READ_ONLY,
-+					       "**ioneedrd", 0 );
-+	}
-+	else {
-+	    *error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					       MPIR_ERR_RECOVERABLE, myname,
-+					       __LINE__, MPI_ERR_IO, "**io",
-+					       "**io %s", strerror(errno));
-+	}
-+    }
-+    /* --END ERROR HANDLING-- */
-+    else *error_code = MPI_SUCCESS;
-+
-+}
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c romio-ornl/adio/ad_lustre/ad_lustre_rdcoll.c
---- romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_rdcoll.c	2007-11-10 07:13:32.577816000 -0500
-@@ -0,0 +1,18 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type,
-+			      offset, status, error_code);
-+}
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_rwcontig.c romio-ornl/adio/ad_lustre/ad_lustre_rwcontig.c
---- romio-orig/adio/ad_lustre/ad_lustre_rwcontig.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_rwcontig.c	2007-11-10 07:13:32.581814000 -0500
-@@ -0,0 +1,85 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+static void ADIOI_LUSTRE_IOContig(ADIO_File fd, void *buf, int count, 
-+                   MPI_Datatype datatype, int file_ptr_type,
-+	           ADIO_Offset offset, ADIO_Status *status, 
-+		   int io_mode, int *error_code);
-+
-+static void ADIOI_LUSTRE_IOContig(ADIO_File fd, void *buf, int count, 
-+                   MPI_Datatype datatype, int file_ptr_type,
-+	           ADIO_Offset offset, ADIO_Status *status, 
-+		   int io_mode, int *error_code)
-+{
-+    int err=-1, datatype_size, len;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_IOCONTIG";
-+#endif
-+
-+    MPI_Type_size(datatype, &datatype_size);
-+    len = datatype_size * count;
-+
-+    if (file_ptr_type == ADIO_INDIVIDUAL) {
-+	offset = fd->fp_ind;
-+    }
-+
-+    if (fd->fp_sys_posn != offset) {
-+	err = lseek(fd->fd_sys, offset, SEEK_SET);
-+	if (err == -1) goto ioerr;
-+    }
-+    
-+    if (io_mode)
-+	err = write(fd->fd_sys, buf, len);
-+    else 
-+	err = read(fd->fd_sys, buf, len);
-+
-+    if (err == -1) goto ioerr;
-+    fd->fp_sys_posn = offset + err;
-+
-+    if (file_ptr_type == ADIO_INDIVIDUAL) {
-+	fd->fp_ind += err; 
-+    }
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (status) MPIR_Status_set_bytes(status, datatype, err);
-+#endif
-+    *error_code = MPI_SUCCESS;
-+
-+ioerr:
-+    /* --BEGIN ERROR HANDLING-- */
-+    if (err == -1) {
-+	*error_code = MPIO_Err_create_code(MPI_SUCCESS,
-+					   MPIR_ERR_RECOVERABLE,
-+					   myname, __LINE__,
-+					   MPI_ERR_IO, "**io",
-+					   "**io %s", strerror(errno));
-+	fd->fp_sys_posn = -1;
-+	return;
-+    }
-+    /* --END ERROR HANDLING-- */
-+}
-+
-+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, 
-+                   MPI_Datatype datatype, int file_ptr_type,
-+	           ADIO_Offset offset, ADIO_Status *status, int *error_code)
-+{
-+    ADIOI_LUSTRE_IOContig(fd, buf, count, 
-+                   datatype, file_ptr_type,
-+	           offset, status, 1, error_code);
-+}
-+
-+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, 
-+                   MPI_Datatype datatype, int file_ptr_type,
-+	           ADIO_Offset offset, ADIO_Status *status, int *error_code)
-+{
-+    ADIOI_LUSTRE_IOContig(fd, buf, count, 
-+                   datatype, file_ptr_type,
-+	           offset, status, 0, error_code);
-+}
-diff -ruNp romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c romio-ornl/adio/ad_lustre/ad_lustre_wrcoll.c
---- romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/ad_lustre_wrcoll.c	2007-11-10 07:13:32.585808000 -0500
-@@ -0,0 +1,18 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type,
-+			      offset, status, error_code);
-+}
-diff -ruNp romio-orig/adio/ad_lustre/Makefile.in romio-ornl/adio/ad_lustre/Makefile.in
---- romio-orig/adio/ad_lustre/Makefile.in	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/Makefile.in	2007-11-10 07:13:32.589807000 -0500
-@@ -0,0 +1,49 @@
-+CC          = @CC@
-+AR          = @AR@
-+RANLIB      = @RANLIB@
-+LIBNAME     = @LIBNAME@
-+srcdir      = @srcdir@
-+CC_SHL      = @CC_SHL@
-+SHLIBNAME   = @SHLIBNAME@
-+
-+INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -I../../include -I${srcdir}/../../../../include -I../../../../include
-+CFLAGS      = @CPPFLAGS@ @CFLAGS@ $(INCLUDE_DIR)
-+
-+top_builddir  = @master_topbuild_dir@
-+LIBTOOL       = @LIBTOOL@
-+C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR)
-+
-+@VPATH@
-+
-+AD_LUSTRE_OBJECTS = ad_lustre.o ad_lustre_open.o \
-+      ad_lustre_rwcontig.o \
-+      ad_lustre_wrcoll.o ad_lustre_rdcoll.o  \
-+      ad_lustre_fcntl.o ad_lustre_hints.o ad_lustre_close.o
-+
-+default: $(LIBNAME)
-+	@if [ "@ENABLE_SHLIB@" != "none" ] ; then \
-+	    $(MAKE) $(SHLIBNAME).la ;\
-+	fi
-+
-+.SUFFIXES: $(SUFFIXES) .p .lo
-+
-+.c.o:
-+	$(CC) $(CFLAGS) -c $<
-+.c.lo:
-+	$(C_COMPILE_SHL) -c $< -o _s$*.o
-+	@mv -f _s$*.o $*.lo
-+
-+$(LIBNAME): $(AD_LUSTRE_OBJECTS)
-+	$(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS)
-+	$(RANLIB) $(LIBNAME)
-+
-+AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo)
-+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS)
-+	$(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS)
-+
-+coverage:
-+	-@for file in  ${AD_LUSTRE_OBJECTS:.o=.c} ; do \
-+		gcov -b -f $$file ; done
-+
-+clean:
-+	@rm -f *.o *.lo
-diff -ruNp romio-orig/adio/ad_lustre/README romio-ornl/adio/ad_lustre/README
---- romio-orig/adio/ad_lustre/README	1969-12-31 19:00:00.000000000 -0500
-+++ romio-ornl/adio/ad_lustre/README	2007-11-10 08:41:15.992364000 -0500
-@@ -0,0 +1,29 @@
-+-----------------------------------------------------
-+V03: 
-+-----------------------------------------------------
-+  o Correct detection of fs_type when lustre: prefix is not given
-+  o Further fix on stripe alignment
-+  o Tested/Enabled striping hints over Cray XT (Catamount and CNL)
-+
-+-----------------------------------------------------
-+V02:
-+-----------------------------------------------------
-+The Lustre ADIO driver has been cleaned up quite a lot. Compared 
-+to the intital posting, here are the changes:
-+  o Removal of dead/redundant code
-+  o Removal of asynchronous IO piece as it appears outdated
-+  o Bug fixes for setting Lustre Hints
-+  o Bug fixes for data sieving 
-+  o Improved Setsize operation with one process calling ftruncate 
-+  o Improved collective IO with domain partitioning on 
-+    Lustre stripe boundary
-+
-+Contributing:
-+  o You may contribute via many different ways, such as 
-+    testing results, bug reports, and new feature patches.
-+  o We appreciate any courtesy reference of this work.
-+  o Disclaimer: you are welcome to try the code, but at your own risk. 
-+
-+Contact info:
-+    For more info, visit http://ft.ornl.gov/projects/io/
-+
-diff -ruNp romio-orig/adio/common/ad_aggregate.c romio-ornl/adio/common/ad_aggregate.c
---- romio-orig/adio/common/ad_aggregate.c	2007-11-10 07:12:18.105362000 -0500
-+++ romio-ornl/adio/common/ad_aggregate.c	2007-11-10 07:30:02.418363000 -0500
-@@ -2,6 +2,8 @@
- /* 
-  *   Copyright (C) 1997-2001 University of Chicago. 
-  *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-  */
- 
- #include "adio.h"
-@@ -9,6 +11,8 @@
- 
- #undef AGG_DEBUG
- 
-+#define ALIGNDOWN(sz, al) ((sz)/al*al)
-+
- /* This file contains four functions:
-  *
-  * ADIOI_Calc_aggregator()
-@@ -87,7 +91,12 @@ int ADIOI_Calc_aggregator(ADIO_File fd,
- #endif
-     
-     /* get an index into our array of aggregators */
--    rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1);
-+    if (fd->file_system == ADIO_LUSTRE)
-+	rank_index = (int) ((off - ALIGNDOWN(min_off, fd_size) + fd_size)/
-+		fd_size - 1);
-+    else
-+	rank_index = (int) ((off - min_off + fd_size)/ fd_size - 1);
-+
- 
-     /* we index into fd_end with rank_index, and fd_end was allocated to be no
-      * bigger than fd->hins->cb_nodes.   If we ever violate that, we're
-@@ -130,6 +139,7 @@ void ADIOI_Calc_file_domains(ADIO_Offset
- 	 * do that, but this routine would be the place for it */
- 
-     ADIO_Offset min_st_offset, max_end_offset, *fd_start, *fd_end, fd_size;
-+    int alignment = *fd_size_ptr;
-     int i;
- 
- #ifdef AGG_DEBUG
-@@ -154,6 +164,10 @@ void ADIOI_Calc_file_domains(ADIO_Offset
-    processes */ 
-     fd_size = ((max_end_offset - min_st_offset + 1) + nprocs_for_coll -
- 	       1)/nprocs_for_coll; 
-+    if (alignment) {
-+	fd_size = (fd_size + alignment -1 ) / alignment * alignment;
-+    }
-+
-     /* ceiling division as in HPF block distribution */
- 
-     *fd_start_ptr = (ADIO_Offset *)
-@@ -165,7 +179,10 @@ void ADIOI_Calc_file_domains(ADIO_Offset
-     fd_end = *fd_end_ptr;
- 
-     fd_start[0] = min_st_offset;
--    fd_end[0] = min_st_offset + fd_size - 1;
-+    if (alignment)
-+	fd_end[0] = ALIGNDOWN(min_st_offset, fd_size) + fd_size - 1;
-+    else
-+	fd_end[0] = min_st_offset + fd_size - 1;
- 
-     for (i=1; i<nprocs_for_coll; i++) {
- 	fd_start[i] = fd_end[i-1] + 1;
-diff -ruNp romio-orig/adio/common/ad_fstype.c romio-ornl/adio/common/ad_fstype.c
---- romio-orig/adio/common/ad_fstype.c	2007-11-10 07:12:18.128343000 -0500
-+++ romio-ornl/adio/common/ad_fstype.c	2007-11-10 08:21:48.329637000 -0500
-@@ -317,6 +317,15 @@ static void ADIO_FileSysType_fncall(char
-     }
- # endif
- 
-+/*#if defined(LINUX) && defined(ROMIO_LUSTRE)*/
-+#ifdef ROMIO_LUSTRE
-+#define LL_SUPER_MAGIC 0x0BD00BD0
-+    if (fsbuf.f_type == LL_SUPER_MAGIC) {
-+	*fstype = ADIO_LUSTRE;
-+	return;
-+    }
-+# endif
-+
- # ifdef PAN_KERNEL_FS_CLIENT_SUPER_MAGIC
-     if (fsbuf.f_type == PAN_KERNEL_FS_CLIENT_SUPER_MAGIC) {
- 	*fstype = ADIO_PANFS;
-@@ -467,6 +476,11 @@ static void ADIO_FileSysType_prefix(char
-     {
- 	*fstype = ADIO_GRIDFTP;
-     }
-+    else if (!strncmp(filename, "lustre:", 7) 
-+	     || !strncmp(filename, "LUSTRE:", 7))
-+    {
-+	*fstype = ADIO_LUSTRE;
-+    }
-     else {
- #ifdef ROMIO_NTFS
- 	*fstype = ADIO_NTFS;
-@@ -681,6 +695,14 @@ void ADIO_ResolveFileType(MPI_Comm comm,
- 	*ops = &ADIO_GRIDFTP_operations;
- #endif
-     }
-+    if (file_system == ADIO_LUSTRE) {
-+#ifndef ROMIO_LUSTRE 
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0);
-+	return;
-+#else
-+	*ops = &ADIO_LUSTRE_operations;
-+#endif
-+    }
-     *error_code = MPI_SUCCESS;
-     *fstype = file_system;
-     return;
-diff -ruNp romio-orig/adio/common/ad_read_coll.c romio-ornl/adio/common/ad_read_coll.c
---- romio-orig/adio/common/ad_read_coll.c	2007-11-10 07:12:18.174296000 -0500
-+++ romio-ornl/adio/common/ad_read_coll.c	2007-11-10 07:37:15.747604000 -0500
-@@ -3,6 +3,8 @@
-  *
-  *   Copyright (C) 1997 University of Chicago. 
-  *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-  */
- 
- #include "adio.h"
-@@ -67,7 +69,7 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
-     int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank;
-     int contig_access_count=0, interleave_count = 0, buftype_is_contig;
-     int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs;
--    ADIO_Offset start_offset, end_offset, orig_fp, fd_size, min_st_offset, off;
-+    ADIO_Offset start_offset, end_offset, orig_fp, fd_size=0, min_st_offset, off;
-     ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL,
- 	*fd_end = NULL, *end_offsets = NULL;
-     int *len_list = NULL, *buf_idx = NULL;
-@@ -126,6 +128,8 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
-     if (fd->hints->cb_read == ADIOI_HINT_DISABLE
- 	|| (!interleave_count && (fd->hints->cb_read == ADIOI_HINT_AUTO))) 
-     {
-+	int filerange_is_contig = 0; 
-+
- 	/* don't do aggregation */
- 	if (fd->hints->cb_read != ADIOI_HINT_DISABLE) {
- 	    ADIOI_Free(offset_list);
-@@ -136,8 +140,13 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
- 
- 	fd->fp_ind = orig_fp;
- 	ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
-+	if (!filetype_is_contig)
-+	    ADIOI_Filetype_range_iscontig(fd, offset, file_ptr_type, 
-+		    datatype, count, &filerange_is_contig);
-+
-+	if (buftype_is_contig && (filetype_is_contig ||
-+		    filerange_is_contig)) {
- 
--	if (buftype_is_contig && filetype_is_contig) {
- 	    if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
- 		off = fd->disp + (fd->etype_size) * offset;
- 		ADIO_ReadContig(fd, buf, count, datatype, ADIO_EXPLICIT_OFFSET,
-@@ -168,6 +177,19 @@ void ADIOI_GEN_ReadStridedColl(ADIO_File
-      * needs to be mapped to an actual rank in the communicator later.
-      *
-      */
-+    if (fd->file_system == ADIO_LUSTRE) {
-+	char *value;
-+	int sflag;
-+        value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+	MPI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, 
-+		value, &sflag);
-+	if (sflag)
-+	    fd_size = atoi(value);
-+	else
-+	    fd_size = ADIOI_LUSTRE_STRIPE_DFLT;
-+	ADIOI_Free(value);
-+    }
-+
-     ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs,
- 			    nprocs_for_coll, &min_st_offset,
- 			    &fd_start, &fd_end, &fd_size);
-diff -ruNp romio-orig/adio/common/ad_write_coll.c romio-ornl/adio/common/ad_write_coll.c
---- romio-orig/adio/common/ad_write_coll.c	2007-11-10 07:12:18.203267000 -0500
-+++ romio-ornl/adio/common/ad_write_coll.c	2007-11-10 07:38:00.351958000 -0500
-@@ -3,6 +3,8 @@
-  *
-  *   Copyright (C) 1997 University of Chicago. 
-  *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-  */
- 
- #include "adio.h"
-@@ -69,7 +71,7 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
-     int i, filetype_is_contig, nprocs, nprocs_for_coll, myrank;
-     int contig_access_count=0, interleave_count = 0, buftype_is_contig;
-     int *count_my_req_per_proc, count_my_req_procs, count_others_req_procs;
--    ADIO_Offset orig_fp, start_offset, end_offset, fd_size, min_st_offset, off;
-+    ADIO_Offset orig_fp, start_offset, end_offset, fd_size=0, min_st_offset, off;
-     ADIO_Offset *offset_list = NULL, *st_offsets = NULL, *fd_start = NULL,
- 	*fd_end = NULL, *end_offsets = NULL;
-     int *buf_idx = NULL, *len_list = NULL;
-@@ -123,6 +125,8 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
-     if (fd->hints->cb_write == ADIOI_HINT_DISABLE ||
- 	(!interleave_count && (fd->hints->cb_write == ADIOI_HINT_AUTO)))
-     {
-+	int filerange_is_contig = 0; 
-+
- 	/* use independent accesses */
- 	if (fd->hints->cb_write != ADIOI_HINT_DISABLE) {
- 	    ADIOI_Free(offset_list);
-@@ -133,8 +137,12 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
- 
- 	fd->fp_ind = orig_fp;
-         ADIOI_Datatype_iscontig(fd->filetype, &filetype_is_contig);
-+	if (!filetype_is_contig)
-+	    ADIOI_Filetype_range_iscontig(fd, offset, file_ptr_type, 
-+		    datatype, count, &filerange_is_contig);
- 
--        if (buftype_is_contig && filetype_is_contig) {
-+	if (buftype_is_contig && (filetype_is_contig ||
-+		    filerange_is_contig)) {
-             if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
-                 off = fd->disp + (fd->etype_size) * offset;
-                 ADIO_WriteContig(fd, buf, count, datatype,
-@@ -154,6 +162,19 @@ void ADIOI_GEN_WriteStridedColl(ADIO_Fil
-    done by (logically) dividing the file into file domains (FDs); each
-    process may directly access only its own file domain. */
- 
-+    if (fd->file_system == ADIO_LUSTRE) {
-+	char *value;
-+	int sflag;
-+        value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+	MPI_Info_get(fd->info, "striping_unit", MPI_MAX_INFO_VAL, 
-+		value, &sflag);
-+	if (sflag) 
-+	    fd_size = atoi(value);
-+	else
-+	    fd_size = ADIOI_LUSTRE_STRIPE_DFLT;
-+	ADIOI_Free(value);
-+    }
-+
-     ADIOI_Calc_file_domains(st_offsets, end_offsets, nprocs,
- 			    nprocs_for_coll, &min_st_offset,
- 			    &fd_start, &fd_end, &fd_size);   
-diff -ruNp romio-orig/adio/common/iscontig.c romio-ornl/adio/common/iscontig.c
---- romio-orig/adio/common/iscontig.c	2007-11-10 07:12:18.258209000 -0500
-+++ romio-ornl/adio/common/iscontig.c	2007-11-10 07:13:32.648745000 -0500
-@@ -2,9 +2,12 @@
- /* 
-  *   Copyright (C) 1997 University of Chicago. 
-  *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-  */
- 
- #include "adio.h"
-+#include "adio_extern.h"
- /* #ifdef MPISGI
- #include "mpisgi2.h"
- #endif */
-@@ -101,3 +104,85 @@ void ADIOI_Datatype_iscontig(MPI_Datatyp
-        in other cases as well.*/
- }
- #endif
-+
-+void ADIOI_Filetype_range_start(ADIO_File fd, ADIO_Offset offset, int file_ptr_type,
-+	int *start_index, int *start_ftype, int *start_offset, int *start_io_size)
-+{
-+    ADIOI_Flatlist_node *flat_file;
-+    ADIO_Offset disp, abs_off_in_filetype=0;
-+    MPI_Aint filetype_extent; 
-+
-+    int i, st_io_size=0, st_index=0;
-+    int sum, n_etypes_in_filetype, size_in_filetype;
-+    int n_filetypes, etype_in_filetype;
-+    int flag, filetype_size, etype_size;
-+
-+    flat_file = ADIOI_Flatlist;
-+    while (flat_file->type != fd->filetype) flat_file = flat_file->next;
-+    disp = fd->disp;
-+
-+    MPI_Type_size(fd->filetype, &filetype_size);
-+    MPI_Type_extent(fd->filetype, &filetype_extent);
-+    etype_size = fd->etype_size;
-+
-+    if (file_ptr_type == ADIO_INDIVIDUAL) {
-+	offset = fd->fp_ind; /* in bytes */
-+	n_filetypes = -1;
-+	flag = 0;
-+	while (!flag) {
-+	    n_filetypes++;
-+	    for (i=0; i<flat_file->count; i++) {
-+		if (disp + flat_file->indices[i] + 
-+		    (ADIO_Offset) n_filetypes*filetype_extent + flat_file->blocklens[i] 
-+			>= offset) {
-+		    st_index = i;
-+		    st_io_size = (int) (disp + flat_file->indices[i] + 
-+			    (ADIO_Offset) n_filetypes*filetype_extent
-+			     + flat_file->blocklens[i] - offset);
-+		    flag = 1;
-+		    break;
-+		}
-+	    }
-+	}
-+    } else {
-+	n_etypes_in_filetype = filetype_size/etype_size;
-+	n_filetypes = (int) (offset / n_etypes_in_filetype);
-+	etype_in_filetype = (int) (offset % n_etypes_in_filetype);
-+	size_in_filetype = etype_in_filetype * etype_size;
-+
-+	sum = 0;
-+	for (i=0; i<flat_file->count; i++) {
-+	    sum += flat_file->blocklens[i];
-+	    if (sum > size_in_filetype) {
-+		st_index = i;
-+		st_io_size = sum - size_in_filetype;
-+		abs_off_in_filetype = flat_file->indices[i] +
-+		    size_in_filetype - (sum - flat_file->blocklens[i]);
-+		break;
-+	    }
-+	}
-+
-+	/* abs. offset in bytes in the file */
-+	offset = disp + (ADIO_Offset) n_filetypes*filetype_extent + abs_off_in_filetype;
-+    }
-+
-+    *start_index   = st_index;
-+    *start_io_size = st_io_size;
-+    *start_offset  = offset;
-+    *start_ftype   = n_filetypes;
-+}
-+
-+void ADIOI_Filetype_range_iscontig(ADIO_File fd, ADIO_Offset offset, 
-+	int file_ptr_type, MPI_Datatype datatype, int count, int *flag)
-+{
-+    int srclen, datatype_size;
-+    int st_index, st_ftype, st_offset, st_io_size;
-+
-+    MPI_Type_size(datatype, &datatype_size);
-+    srclen = datatype_size * count;
-+
-+    ADIOI_Filetype_range_start(fd, offset, file_ptr_type,
-+	    &st_index, &st_ftype, &st_offset, &st_io_size);
-+    *flag = st_io_size >= srclen ? 1 : 0;
-+}
-+
-diff -ruNp romio-orig/adio/include/adio.h romio-ornl/adio/include/adio.h
---- romio-orig/adio/include/adio.h	2007-11-10 07:12:18.302169000 -0500
-+++ romio-ornl/adio/include/adio.h	2007-11-10 07:13:32.654738000 -0500
-@@ -289,6 +289,7 @@ typedef struct {
- #define ADIO_PVFS2               160   /* PVFS2: 2nd generation PVFS */
- #define ADIO_PANFS               161   /* Panasas FS */
- #define ADIO_GRIDFTP             162   /* Globus GridFTP */
-+#define ADIO_LUSTRE              163   /* Lustre */
- 
- #define ADIO_SEEK_SET            SEEK_SET
- #define ADIO_SEEK_CUR            SEEK_CUR
-diff -ruNp romio-orig/adio/include/adioi_fs_proto.h romio-ornl/adio/include/adioi_fs_proto.h
---- romio-orig/adio/include/adioi_fs_proto.h	2007-11-10 07:12:18.318156000 -0500
-+++ romio-ornl/adio/include/adioi_fs_proto.h	2007-11-10 07:13:32.658735000 -0500
-@@ -49,6 +49,32 @@ extern struct ADIOI_Fns_struct ADIO_SFS_
- /* prototypes are in adio/ad_sfs/ad_sfs.h */
- #endif
- 
-+#ifdef ROMIO_LUSTRE
-+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations;
-+
-+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, 
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                     ADIO_Offset offset, ADIO_Status *status, int
-+		     *error_code);
-+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, 
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Status *status, int
-+		      *error_code);   
-+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct,
-+	               int *error_code);
-+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
-+#endif
-+
- #ifdef ROMIO_NTFS
- extern struct ADIOI_Fns_struct ADIO_NTFS_operations;
- /* prototypes are in adio/ad_ntfs/ad_ntfs.h */
-diff -ruNp romio-orig/adio/include/adioi.h romio-ornl/adio/include/adioi.h
---- romio-orig/adio/include/adioi.h	2007-11-10 07:12:18.310161000 -0500
-+++ romio-ornl/adio/include/adioi.h	2007-11-10 07:36:19.895514000 -0500
-@@ -3,6 +3,8 @@
-  *
-  *   Copyright (C) 1997 University of Chicago. 
-  *   See COPYRIGHT notice in top-level directory.
-+ *
-+ *   Copyright (C) 2007 Oak Ridge National Laboratory
-  */
- 
- 
-@@ -184,6 +186,7 @@ struct ADIOI_Fns_struct {
- #define ADIOI_PREALLOC_BUFSZ      16777216    /* buffer size used to 
-                                                 preallocate disk space */
- 
-+#define ADIOI_LUSTRE_STRIPE_DFLT         (1<<20)
- 
- /* default values for some hints */
-     /* buffer size for collective I/O = 16 MB */
-@@ -295,6 +298,10 @@ void *ADIOI_Calloc_fn(size_t nelem, size
- void *ADIOI_Realloc_fn(void *ptr, size_t size, int lineno, char *fname);
- void ADIOI_Free_fn(void *ptr, int lineno, char *fname);
- void ADIOI_Datatype_iscontig(MPI_Datatype datatype, int *flag);
-+void ADIOI_Filetype_range_iscontig(ADIO_File fd, ADIO_Offset offset, 
-+	int file_ptr_type, MPI_Datatype datatype, int count, int *flag);
-+void ADIOI_Filetype_range_start(ADIO_File fd, ADIO_Offset offset, int file_ptr_type,
-+	int *start_index, int *start_ftype, int *start_offset, int *start_io_size);
- void ADIOI_Get_position(ADIO_File fd, ADIO_Offset *offset);
- void ADIOI_Get_eof_offset(ADIO_File fd, ADIO_Offset *eof_offset);
- void ADIOI_Get_byte_offset(ADIO_File fd, ADIO_Offset offset,
-diff -ruNp romio-orig/adio/include/mpio_error.h romio-ornl/adio/include/mpio_error.h
---- romio-orig/adio/include/mpio_error.h	2007-11-10 07:12:18.321147000 -0500
-+++ romio-ornl/adio/include/mpio_error.h	2007-11-10 07:13:32.669723000 -0500
-@@ -63,6 +63,7 @@
- #define MPIR_ERR_FILETYPE 33 
- #define MPIR_ERR_NO_NTFS 35
- #define MPIR_ERR_NO_TESTFS 36
-+#define MPIR_ERR_NO_LUSTRE 37
- 
- /* MPI_ERR_COMM */
- #ifndef MPIR_ERR_COMM_NULL
-diff -ruNp romio-orig/adio/include/romioconf.h.in romio-ornl/adio/include/romioconf.h.in
---- romio-orig/adio/include/romioconf.h.in	2007-11-10 07:12:18.331143000 -0500
-+++ romio-ornl/adio/include/romioconf.h.in	2007-11-10 07:13:32.675717000 -0500
-@@ -282,6 +282,9 @@
- /* Define for ROMIO with PVFS2 */
- #undef ROMIO_PVFS2
- 
-+/* Define for ROMIO with LUSTRE */
-+#undef ROMIO_LUSTRE
-+
- /* Define if int64_t must be defined for PVFS */
- #undef ROMIO_PVFS_NEEDS_INT64_DEFINITION
- 
-diff -ruNp romio-orig/configure romio-ornl/configure
---- romio-orig/configure	2007-11-10 07:12:19.455013000 -0500
-+++ romio-ornl/configure	2007-11-10 07:15:22.506785000 -0500
-@@ -1402,7 +1402,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai
- #
- have_aio=no
- #
--known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"
-+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre"
- known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
- #
- # Defaults
-@@ -7630,6 +7630,14 @@ _ACEOF
- 
- fi
- 
-+if test -n "$file_system_lustre"; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define ROMIO_LUSTRE 1
-+_ACEOF
-+
-+fi
-+
- #
- # Check for presence and characteristics of async. I/O calls if
- # not disabled.
-@@ -12139,7 +12147,7 @@ rm -f adio/include/romioconf.h ${use_top
- # are active will be called by the top level ROMIO make
-           ac_config_commands="$ac_config_commands default-1"
- 
--                                                                                                                                                                                                                                                                                                                                                    ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile common/dataloop/Makefile"
-+                                                                                                                                                                                                                                                                                                                                                    ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile adio/ad_lustre/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile common/dataloop/Makefile"
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
-@@ -12697,6 +12705,7 @@ do
-   "adio/ad_pvfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs/Makefile" ;;
-   "adio/ad_pvfs2/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs2/Makefile" ;;
-   "adio/ad_gridftp/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_gridftp/Makefile" ;;
-+  "adio/ad_lustre/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_lustre/Makefile" ;;
-   "mpi-io/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi-io/fortran/Makefile" ;;
-   "mpi2-other/info/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/info/fortran/Makefile" ;;
-   "mpi2-other/array/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/array/fortran/Makefile" ;;
-diff -ruNp romio-orig/configure.in romio-ornl/configure.in
---- romio-orig/configure.in	2007-11-10 07:12:18.367105000 -0500
-+++ romio-ornl/configure.in	2007-11-10 07:13:32.707687000 -0500
-@@ -93,7 +93,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai
- #
- have_aio=no
- #
--known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"
-+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre"
- known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
- #
- # Defaults
-@@ -1097,6 +1097,9 @@ fi
- if test -n "$file_system_testfs"; then
-     AC_DEFINE(ROMIO_TESTFS,1,[Define for ROMIO with TESTFS])
- fi
-+if test -n "$file_system_lustre"; then
-+    AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE])
-+fi
- 
- if test -n "$file_system_xfs"; then
-     AC_DEFINE(ROMIO_XFS,1,[Define for ROMIO with XFS])
-@@ -2101,6 +2104,7 @@ AC_OUTPUT(Makefile localdefs mpi-io/Make
- 		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \
- 		   adio/ad_pvfs2/Makefile \
- 		   adio/ad_gridftp/Makefile \
-+  		   adio/ad_lustre/Makefile \
-                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \
-                    mpi2-other/array/fortran/Makefile test/fmisc.f \
-                    test/fcoll_test.f test/pfcoll_test.f test/fperf.f \
-diff -ruNp romio-orig/Makefile.in romio-ornl/Makefile.in
---- romio-orig/Makefile.in	2007-11-10 07:12:18.357110000 -0500
-+++ romio-ornl/Makefile.in	2007-11-10 07:13:32.712681000 -0500
-@@ -15,7 +15,7 @@ DIRS        = mpi-io adio/common @GLUE_D
- MPIO_DIRS   = mpi-io
- EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@
- FILE_SYS_DIRS = @FILE_SYS_DIRS@
--ALL_DIRS    = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp test mpi-io/glue/default mpi-io/glue/mpich1 mpi-io/glue/mpich2
-+ALL_DIRS    = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp adio/ad_lustre test mpi-io/glue/default mpi-io/glue/mpich1 mpi-io/glue/mpich2
- SHELL       = /bin/sh
- 
- @VPATH@
diff --git a/lustre/contrib/mpich-1.2.6-lustre.patch b/lustre/contrib/mpich-1.2.6-lustre.patch
deleted file mode 100644
index d32fab9336857f631944c9d767da894b81d1366c..0000000000000000000000000000000000000000
--- a/lustre/contrib/mpich-1.2.6-lustre.patch
+++ /dev/null
@@ -1,1829 +0,0 @@
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.c	2005-12-06 11:54:37.883130927 -0500
-@@ -0,0 +1,37 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 2001 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+/* adioi.h has the ADIOI_Fns_struct define */
-+#include "adioi.h"
-+
-+struct ADIOI_Fns_struct ADIO_LUSTRE_operations = {
-+    ADIOI_LUSTRE_Open, /* Open */
-+    ADIOI_LUSTRE_ReadContig, /* ReadContig */
-+    ADIOI_LUSTRE_WriteContig, /* WriteContig */
-+    ADIOI_GEN_ReadStridedColl, /* ReadStridedColl */
-+    ADIOI_GEN_WriteStridedColl, /* WriteStridedColl */
-+    ADIOI_GEN_SeekIndividual, /* SeekIndividual */
-+    ADIOI_LUSTRE_Fcntl, /* Fcntl */
-+    ADIOI_LUSTRE_SetInfo, /* SetInfo */
-+    ADIOI_GEN_ReadStrided, /* ReadStrided */
-+    ADIOI_GEN_WriteStrided, /* WriteStrided */
-+    ADIOI_LUSTRE_Close, /* Close */
-+    ADIOI_LUSTRE_IreadContig, /* IreadContig */
-+    ADIOI_LUSTRE_IwriteContig, /* IwriteContig */
-+    ADIOI_LUSTRE_ReadDone, /* ReadDone */
-+    ADIOI_LUSTRE_WriteDone, /* WriteDone */
-+    ADIOI_LUSTRE_ReadComplete, /* ReadComplete */
-+    ADIOI_LUSTRE_WriteComplete, /* WriteComplete */
-+    ADIOI_LUSTRE_IreadStrided, /* IreadStrided */
-+    ADIOI_LUSTRE_IwriteStrided, /* IwriteStrided */
-+    ADIOI_GEN_Flush, /* Flush */
-+    ADIOI_LUSTRE_Resize, /* Resize */
-+    ADIOI_GEN_Delete, /* Delete */
-+};
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_close.c	2005-12-06 11:54:37.895129327 -0500
-@@ -0,0 +1,32 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_close.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code)
-+{
-+    int err;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_CLOSE";
-+#endif
-+
-+    err = close(fd->fd_sys);
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);	    
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_done.c	2005-12-06 11:54:37.898128927 -0500
-@@ -0,0 +1,188 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_done.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code)  
-+{
-+#ifndef NO_AIO
-+    int done=0;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_READDONE";
-+#endif
-+#ifdef AIO_SUN 
-+    aio_result_t *result=0, *tmp;
-+#else
-+    int err;
-+#endif
-+#ifdef AIO_HANDLE_IN_AIOCB
-+    struct aiocb *tmp1;
-+#endif
-+#endif
-+
-+    if (*request == ADIO_REQUEST_NULL) {
-+	*error_code = MPI_SUCCESS;
-+	return 1;
-+    }
-+
-+#ifdef NO_AIO
-+/* HP, FreeBSD, Linux */
-+#ifdef HAVE_STATUS_SET_BYTES
-+    MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+    (*request)->fd->async_count--;
-+    ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+    *request = ADIO_REQUEST_NULL;
-+    *error_code = MPI_SUCCESS;
-+    return 1;
-+#endif    
-+
-+#ifdef AIO_SUN
-+    if ((*request)->queued) {
-+	tmp = (aio_result_t *) (*request)->handle;
-+	if (tmp->aio_return == AIO_INPROGRESS) {
-+	    done = 0;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else if (tmp->aio_return != -1) {
-+	    result = (aio_result_t *) aiowait(0); /* dequeue any one request */
-+	    done = 1;
-+	    (*request)->nbytes = tmp->aio_return;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(tmp->aio_errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+	    *error_code = MPI_ERR_UNKNOWN;
-+#else
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+		         myname, "I/O Error", "%s", strerror(tmp->aio_errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);	    
-+#endif
-+	}
-+    } /* if ((*request)->queued) ... */
-+    else {
-+	/* ADIOI_Complete_Async completed this request, but request object
-+           was not freed. */
-+	done = 1;
-+	*error_code = MPI_SUCCESS;
-+    }
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (done && ((*request)->nbytes != -1))
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#endif
-+
-+#ifdef AIO_HANDLE_IN_AIOCB
-+/* IBM */
-+    if ((*request)->queued) {
-+	tmp1 = (struct aiocb *) (*request)->handle;
-+	errno = aio_error(tmp1->aio_handle);
-+	if (errno == EINPROG) {
-+	    done = 0;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else {
-+	    err = aio_return(tmp1->aio_handle);
-+	    (*request)->nbytes = err;
-+	    errno = aio_error(tmp1->aio_handle);
-+	
-+	    done = 1;
-+
-+	    if (err == -1) {
-+#ifdef MPICH2
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		    "**io %s", strerror(errno));
-+		return;
-+#elif defined(PRINT_ERR_MSG)
-+				*error_code = MPI_ERR_UNKNOWN;
-+#else
-+		*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+		ADIOI_Error((*request)->fd, *error_code, myname);	    
-+#endif
-+	    }
-+	    else *error_code = MPI_SUCCESS;
-+	}
-+    } /* if ((*request)->queued) */
-+    else {
-+	done = 1;
-+	*error_code = MPI_SUCCESS;
-+    }
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (done && ((*request)->nbytes != -1))
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#elif (!defined(NO_AIO) && !defined(AIO_SUN))
-+/* DEC, SGI IRIX 5 and 6 */
-+    if ((*request)->queued) {
-+	errno = aio_error((const struct aiocb *) (*request)->handle);
-+	if (errno == EINPROGRESS) {
-+	    done = 0;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else {
-+	    err = aio_return((struct aiocb *) (*request)->handle); 
-+	    (*request)->nbytes = err;
-+	    errno = aio_error((struct aiocb *) (*request)->handle);
-+
-+	    done = 1;
-+
-+	    if (err == -1) {
-+#ifdef MPICH2
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		    "**io %s", strerror(errno));
-+		return;
-+#elif defined(PRINT_ERR_MSG)
-+				*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+		*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+		ADIOI_Error((*request)->fd, *error_code, myname);	    
-+#endif
-+	    }
-+	    else *error_code = MPI_SUCCESS;
-+	}
-+    } /* if ((*request)->queued) */
-+    else {
-+	done = 1;
-+	*error_code = MPI_SUCCESS;
-+    }
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (done && ((*request)->nbytes != -1))
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#endif
-+
-+#ifndef NO_AIO
-+    if (done) {
-+	/* if request is still queued in the system, it is also there
-+           on ADIOI_Async_list. Delete it from there. */
-+	if ((*request)->queued) ADIOI_Del_req_from_list(request);
-+
-+	(*request)->fd->async_count--;
-+	if ((*request)->handle) ADIOI_Free((*request)->handle);
-+	ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+	*request = ADIO_REQUEST_NULL;
-+    }
-+    return done;
-+#endif
-+
-+}
-+
-+
-+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code)  
-+{
-+    return ADIOI_LUSTRE_ReadDone(request, status, error_code);
-+} 
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_fcntl.c	2005-12-06 11:54:37.901128527 -0500
-@@ -0,0 +1,126 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_fcntl.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+#include "adio_extern.h"
-+/* #ifdef MPISGI
-+#include "mpisgi2.h"
-+#endif */
-+
-+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code)
-+{
-+    int i, ntimes;
-+    ADIO_Offset curr_fsize, alloc_size, size, len, done;
-+    ADIO_Status status;
-+    char *buf;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_FCNTL";
-+#endif
-+
-+    switch(flag) {
-+    case ADIO_FCNTL_GET_FSIZE:
-+	fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END);
-+	if (fd->fp_sys_posn != -1) 
-+	     lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
-+	if (fcntl_struct->fsize == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	    ADIOI_Error(fd, *error_code, myname);	    
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+	break;
-+
-+    case ADIO_FCNTL_SET_DISKSPACE:
-+	/* will be called by one process only */
-+	/* On file systems with no preallocation function, I have to 
-+           explicitly write 
-+           to allocate space. Since there could be holes in the file, 
-+           I need to read up to the current file size, write it back, 
-+           and then write beyond that depending on how much 
-+           preallocation is needed.
-+           read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */
-+
-+	curr_fsize = lseek(fd->fd_sys, 0, SEEK_END);
-+	alloc_size = fcntl_struct->diskspace;
-+
-+	size = ADIOI_MIN(curr_fsize, alloc_size);
-+	
-+	ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
-+	buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ);
-+	done = 0;
-+
-+	for (i=0; i<ntimes; i++) {
-+	    len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ);
-+	    ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done,
-+			    &status, error_code);
-+	    if (*error_code != MPI_SUCCESS) {
-+		ADIOI_Free(buf);
-+#ifdef MPICH2
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+		FPRINTF(stderr, "ADIOI_LUSTRE_Fcntl: To preallocate disk space, ROMIO needs to read the file and write it back, but is unable to read the file. Please give the file read permission and open it with MPI_MODE_RDWR.\n");
-+		MPI_Abort(MPI_COMM_WORLD, 1);
-+#else /* MPICH-1 */
-+		*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_PREALLOC_PERM,
-+			      myname, (char *) 0, (char *) 0);
-+		ADIOI_Error(fd, *error_code, myname);
-+#endif
-+                return;  
-+	    }
-+	    ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, 
-+                             done, &status, error_code);
-+	    if (*error_code != MPI_SUCCESS) return;
-+	    done += len;
-+	}
-+
-+	if (alloc_size > curr_fsize) {
-+	    memset(buf, 0, ADIOI_PREALLOC_BUFSZ); 
-+	    size = alloc_size - curr_fsize;
-+	    ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
-+	    for (i=0; i<ntimes; i++) {
-+		len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ);
-+		ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, 
-+				 done, &status, error_code);
-+		if (*error_code != MPI_SUCCESS) return;
-+		done += len;  
-+	    }
-+	}
-+	ADIOI_Free(buf);
-+	if (fd->fp_sys_posn != -1) 
-+	    lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+    case ADIO_FCNTL_SET_IOMODE:
-+        /* for implementing PFS I/O modes. will not occur in MPI-IO
-+           implementation.*/
-+	if (fd->iomode != fcntl_struct->iomode) {
-+	    fd->iomode = fcntl_struct->iomode;
-+	    MPI_Barrier(MPI_COMM_WORLD);
-+	}
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+    case ADIO_FCNTL_SET_ATOMICITY:
-+	fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1;
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+    default:
-+	FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n");
-+	MPI_Abort(MPI_COMM_WORLD, 1);
-+    }
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_flush.c	2005-12-06 11:54:37.903128261 -0500
-@@ -0,0 +1,14 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_flush.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code)
-+{
-+    ADIOI_GEN_Flush(fd, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre.h	2005-12-06 11:54:37.891129861 -0500
-@@ -0,0 +1,36 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre.h,v 1.2 2005/07/07 14:38:17 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#ifndef AD_UNIX_INCLUDE
-+#define AD_UNIX_INCLUDE
-+
-+/* temp*/
-+#define HAVE_ASM_TYPES_H 1
-+
-+#include <unistd.h>
-+#include <linux/types.h>
-+#include <fcntl.h>
-+#include <sys/ioctl.h>
-+#include "lustre/lustre_user.h"
-+#include "adio.h"
-+
-+#ifndef NO_AIO
-+#ifdef AIO_SUN
-+#include <sys/asynch.h>
-+#else
-+#include <aio.h>
-+#ifdef NEEDS_ADIOCB_T
-+typedef struct adiocb adiocb_t;
-+#endif
-+#endif
-+#endif
-+
-+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
-+		  int wr, void *handle);
-+
-+#endif
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_hints.c	2005-12-06 11:54:37.904128127 -0500
-@@ -0,0 +1,130 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_hints.c,v 1.2 2005/07/07 14:38:17 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
-+{
-+    char *value, *value_in_fd;
-+    int flag, tmp_val, str_factor=-1, str_unit=0, start_iodev=-1;
-+    struct lov_user_md lum = { 0 };
-+    int err, myrank, fd_sys, perm, amode, old_mask;
-+
-+    if ( (fd->info) == MPI_INFO_NULL) {
-+	/* This must be part of the open call. can set striping parameters 
-+           if necessary. */ 
-+	MPI_Info_create(&(fd->info));
-+	
-+	/* has user specified striping or server buffering parameters 
-+           and do they have the same value on all processes? */
-+	if (users_info != MPI_INFO_NULL) {
-+	    value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+
-+	    MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL, 
-+			 value, &flag);
-+	    if (flag) {
-+		str_factor=atoi(value);
-+		tmp_val = str_factor;
-+		MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
-+		if (tmp_val != str_factor) {
-+		    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_factor\" must be the same on all processes\n");
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+
-+	    MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL, 
-+			 value, &flag);
-+	    if (flag) {
-+		str_unit=atoi(value);
-+		tmp_val = str_unit;
-+		MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
-+		if (tmp_val != str_unit) {
-+		    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_unit\" must be the same on all processes\n");
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+
-+	    MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL, 
-+			 value, &flag);
-+	    if (flag) {
-+		start_iodev=atoi(value);
-+		tmp_val = start_iodev;
-+		MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
-+		if (tmp_val != start_iodev) {
-+		    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"start_iodevice\" must be the same on all processes\n");
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+
-+         /* if user has specified striping info, process 0 tries to set it */
-+	    if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) {
-+		MPI_Comm_rank(fd->comm, &myrank);
-+		if (!myrank) {
-+		    if (fd->perm == ADIO_PERM_NULL) {
-+			old_mask = umask(022);
-+			umask(old_mask);
-+			perm = old_mask ^ 0666;
-+		    }
-+		    else perm = fd->perm;
-+
-+		    amode = 0;
-+		    if (fd->access_mode & ADIO_CREATE)
-+			amode = amode | O_CREAT;
-+		    if (fd->access_mode & ADIO_RDWR ||
-+			(fd->access_mode & ADIO_RDONLY &&
-+			 fd->access_mode & ADIO_WRONLY))
-+			amode = amode | O_RDWR;
-+		    else if (fd->access_mode & ADIO_WRONLY)
-+			amode = amode | O_WRONLY;
-+		    else if (fd->access_mode & ADIO_RDONLY)
-+			amode = amode | O_RDONLY;
-+		    if (fd->access_mode & ADIO_EXCL)
-+			amode = amode | O_EXCL;
-+
-+		    /* we need to create file so ensure this is set */
-+                    amode = amode | O_LOV_DELAY_CREATE | O_CREAT;
-+
-+                    fd_sys = open(fd->filename, amode, perm);
-+                    if (fd_sys == -1) { 
-+		        if (errno != EEXIST) 
-+			    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: Failure to open file %s %d %d\n",strerror(errno), amode, perm);
-+                    } else {
-+                        lum.lmm_magic = LOV_USER_MAGIC;
-+                        lum.lmm_pattern = 0;
-+                        lum.lmm_stripe_size = str_unit;
-+                        lum.lmm_stripe_count = str_factor;
-+                        lum.lmm_stripe_offset = start_iodev;
-+
-+                        err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum);
-+                        if (err == -1 && errno != EEXIST) { 
-+			    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: Failure to set stripe info %s \n",strerror(errno));
-+                        }
-+
-+                        close(fd_sys);
-+                   }
-+
-+		}
-+		MPI_Barrier(fd->comm);
-+	    }
-+
-+	    ADIOI_Free(value);
-+	}
-+	
-+	/* set the values for collective I/O and data sieving parameters */
-+	ADIOI_GEN_SetInfo(fd, users_info, error_code);
-+    }
-+    
-+    else {
-+	/* The file has been opened previously and fd->fd_sys is a valid
-+           file descriptor. cannot set striping parameters now. */
-+	
-+	/* set the values for collective I/O and data sieving parameters */
-+	ADIOI_GEN_SetInfo(fd, users_info, error_code);
-+
-+    }
-+    
-+    *error_code = MPI_SUCCESS;
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iread.c	2005-12-06 11:54:37.904128127 -0500
-@@ -0,0 +1,106 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_iread.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, 
-+                MPI_Datatype datatype, int file_ptr_type,
-+                ADIO_Offset offset, ADIO_Request *request, int *error_code)  
-+{
-+    int len, typesize;
-+#ifdef NO_AIO
-+    ADIO_Status status;
-+#else
-+    int err=-1;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_IREADCONTIG";
-+#endif
-+#endif
-+
-+    (*request) = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_READ;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+
-+    MPI_Type_size(datatype, &typesize);
-+    len = count * typesize;
-+
-+#ifdef NO_AIO
-+    /* HP, FreeBSD, Linux */
-+    /* no support for nonblocking I/O. Use blocking I/O. */
-+
-+    ADIOI_LUSTRE_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, 
-+			 &status, error_code);  
-+    (*request)->queued = 0;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Get_elements(&status, MPI_BYTE, &len);
-+	(*request)->nbytes = len;
-+    }
-+#endif
-+
-+#else
-+    if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind;
-+    err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 0, &((*request)->handle));
-+    if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len;
-+
-+    (*request)->queued = 1;
-+    ADIOI_Add_req_to_list(request);
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+	return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);	    
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+#endif  /* NO_AIO */
-+
-+    fd->fp_sys_posn = -1;   /* set it to null. */
-+    fd->async_count++;
-+}
-+
-+
-+
-+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count, 
-+		       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Request *request, int
-+                       *error_code)
-+{
-+    ADIO_Status status;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    int typesize;
-+#endif
-+
-+    *request = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_READ;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+    (*request)->queued = 0;
-+    (*request)->handle = 0;
-+
-+/* call the blocking version. It is faster because it does data sieving. */
-+    ADIOI_LUSTRE_ReadStrided(fd, buf, count, datatype, file_ptr_type, 
-+                            offset, &status, error_code);  
-+
-+    fd->async_count++;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Type_size(datatype, &typesize);
-+	(*request)->nbytes = count * typesize;
-+    }
-+#endif
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_iwrite.c	2005-12-06 11:54:37.906127861 -0500
-@@ -0,0 +1,268 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_iwrite.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, 
-+                MPI_Datatype datatype, int file_ptr_type,
-+                ADIO_Offset offset, ADIO_Request *request, int *error_code)  
-+{
-+    int len, typesize;
-+#ifdef NO_AIO
-+    ADIO_Status status;
-+#else
-+    int err=-1;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_IWRITECONTIG";
-+#endif
-+#endif
-+
-+    *request = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_WRITE;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+
-+    MPI_Type_size(datatype, &typesize);
-+    len = count * typesize;
-+
-+#ifdef NO_AIO
-+    /* HP, FreeBSD, Linux */
-+    /* no support for nonblocking I/O. Use blocking I/O. */
-+
-+    ADIOI_LUSTRE_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset, 
-+			  &status, error_code);  
-+    (*request)->queued = 0;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Get_elements(&status, MPI_BYTE, &len);
-+	(*request)->nbytes = len;
-+    }
-+#endif
-+
-+#else
-+    if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind;
-+    err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 1, &((*request)->handle));
-+    if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len;
-+
-+    (*request)->queued = 1;
-+    ADIOI_Add_req_to_list(request);
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+	return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);	    
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+#endif /* NO_AIO */
-+
-+    fd->fp_sys_posn = -1;   /* set it to null. */
-+    fd->async_count++;
-+}
-+
-+
-+
-+
-+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count, 
-+		       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Request *request, int
-+                       *error_code)
-+{
-+    ADIO_Status status;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    int typesize;
-+#endif
-+
-+    *request = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_WRITE;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+    (*request)->queued = 0;
-+    (*request)->handle = 0;
-+
-+/* call the blocking version. It is faster because it does data sieving. */
-+    ADIOI_LUSTRE_WriteStrided(fd, buf, count, datatype, file_ptr_type, 
-+                            offset, &status, error_code);  
-+
-+    fd->async_count++;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Type_size(datatype, &typesize);
-+	(*request)->nbytes = count * typesize;
-+    }
-+#endif
-+}
-+
-+
-+/* This function is for implementation convenience. It is not user-visible.
-+   It takes care of the differences in the interface for nonblocking I/O
-+   on various Unix machines! If wr==1 write, wr==0 read. */
-+
-+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
-+		  int wr, void *handle)
-+{
-+    int err=-1, fd_sys;
-+
-+#ifndef NO_AIO
-+    int error_code;
-+#ifdef AIO_SUN 
-+    aio_result_t *result;
-+#else
-+    struct aiocb *aiocbp;
-+#endif
-+#endif
-+
-+    fd_sys = fd->fd_sys;
-+
-+#ifdef AIO_SUN
-+    result = (aio_result_t *) ADIOI_Malloc(sizeof(aio_result_t));
-+    result->aio_return = AIO_INPROGRESS;
-+    if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); 
-+    else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result);
-+
-+    if (err == -1) {
-+	if (errno == EAGAIN) { 
-+       /* the man pages say EPROCLIM, but in reality errno is set to EAGAIN! */
-+
-+        /* exceeded the max. no. of outstanding requests.
-+           complete all previous async. requests and try again.*/
-+
-+	    ADIOI_Complete_async(&error_code);
-+	    if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); 
-+	    else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result);
-+
-+	    while (err == -1) {
-+		if (errno == EAGAIN) {
-+                    /* sleep and try again */
-+                    sleep(1);
-+		    if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result); 
-+		    else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result);
-+		}
-+                else {
-+                    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+                    MPI_Abort(MPI_COMM_WORLD, 1);
-+                }
-+	    }
-+	}
-+        else {
-+            FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+            MPI_Abort(MPI_COMM_WORLD, 1);
-+        }
-+    }
-+
-+    *((aio_result_t **) handle) = result;
-+#endif
-+
-+#ifdef NO_FD_IN_AIOCB
-+/* IBM */
-+    aiocbp = (struct aiocb *) ADIOI_Malloc(sizeof(struct aiocb));
-+    aiocbp->aio_whence = SEEK_SET;
-+    aiocbp->aio_offset = offset;
-+    aiocbp->aio_buf = buf;
-+    aiocbp->aio_nbytes = len;
-+    if (wr) err = aio_write(fd_sys, aiocbp);
-+    else err = aio_read(fd_sys, aiocbp);
-+
-+    if (err == -1) {
-+	if (errno == EAGAIN) {
-+        /* exceeded the max. no. of outstanding requests.
-+          complete all previous async. requests and try again. */
-+
-+	    ADIOI_Complete_async(&error_code);
-+	    if (wr) err = aio_write(fd_sys, aiocbp);
-+	    else err = aio_read(fd_sys, aiocbp);
-+
-+            while (err == -1) {
-+                if (errno == EAGAIN) {
-+                    /* sleep and try again */
-+                    sleep(1);
-+		    if (wr) err = aio_write(fd_sys, aiocbp);
-+		    else err = aio_read(fd_sys, aiocbp);
-+		}
-+                else {
-+                    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+                    MPI_Abort(MPI_COMM_WORLD, 1);
-+                }
-+            }
-+	}
-+        else {
-+            FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+            MPI_Abort(MPI_COMM_WORLD, 1);
-+        }
-+    }
-+
-+    *((struct aiocb **) handle) = aiocbp;
-+
-+#elif (!defined(NO_AIO) && !defined(AIO_SUN))
-+/* DEC, SGI IRIX 5 and 6 */
-+
-+    aiocbp = (struct aiocb *) ADIOI_Calloc(sizeof(struct aiocb), 1);
-+    aiocbp->aio_fildes = fd_sys;
-+    aiocbp->aio_offset = offset;
-+    aiocbp->aio_buf = buf;
-+    aiocbp->aio_nbytes = len;
-+
-+#ifdef AIO_PRIORITY_DEFAULT
-+/* DEC */
-+    aiocbp->aio_reqprio = AIO_PRIO_DFL;   /* not needed in DEC Unix 4.0 */
-+    aiocbp->aio_sigevent.sigev_signo = 0;
-+#else
-+    aiocbp->aio_reqprio = 0;
-+#endif
-+
-+#ifdef AIO_SIGNOTIFY_NONE
-+/* SGI IRIX 6 */
-+    aiocbp->aio_sigevent.sigev_notify = SIGEV_NONE;
-+#else
-+    aiocbp->aio_sigevent.sigev_signo = 0;
-+#endif
-+
-+    if (wr) err = aio_write(aiocbp);
-+    else err = aio_read(aiocbp);
-+
-+    if (err == -1) {
-+	if (errno == EAGAIN) {
-+        /* exceeded the max. no. of outstanding requests.
-+           complete all previous async. requests and try again. */
-+
-+	    ADIOI_Complete_async(&error_code);
-+	    if (wr) err = aio_write(aiocbp);
-+	    else err = aio_read(aiocbp);
-+
-+	    while (err == -1) {
-+		if (errno == EAGAIN) {
-+		    /* sleep and try again */
-+		    sleep(1);
-+		    if (wr) err = aio_write(aiocbp);
-+		    else err = aio_read(aiocbp);
-+		}
-+		else {
-+		    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+        }
-+	else {
-+	    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+	    MPI_Abort(MPI_COMM_WORLD, 1);
-+	}
-+    }
-+
-+    *((struct aiocb **) handle) = aiocbp;
-+#endif
-+
-+    return err;
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_open.c	2005-12-06 11:54:37.906127861 -0500
-@@ -0,0 +1,100 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_open.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code)
-+{
-+    int perm, old_mask, amode;
-+    struct lov_user_md lum = { 0 };
-+    char *value;
-+
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_OPEN";
-+#endif
-+
-+    if (fd->perm == ADIO_PERM_NULL) {
-+	old_mask = umask(022);
-+	umask(old_mask);
-+	perm = old_mask ^ 0666;
-+    }
-+    else perm = fd->perm;
-+
-+    amode = 0;
-+    if (fd->access_mode & ADIO_CREATE)
-+	amode = amode | O_CREAT;
-+    if (fd->access_mode & ADIO_RDONLY)
-+	amode = amode | O_RDONLY;
-+    if (fd->access_mode & ADIO_WRONLY)
-+	amode = amode | O_WRONLY;
-+    if (fd->access_mode & ADIO_RDWR)
-+	amode = amode | O_RDWR;
-+    if (fd->access_mode & ADIO_EXCL)
-+	amode = amode | O_EXCL;
-+
-+    fd->fd_sys = open(fd->filename, amode, perm);
-+
-+    if (fd->fd_sys != -1) {
-+        int err;
-+
-+        value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+
-+        /* get file striping information and set it in info */
-+        lum.lmm_magic = LOV_USER_MAGIC;
-+        err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum);
-+
-+        if (!err) {
-+            sprintf(value, "%d", lum.lmm_stripe_size);
-+            MPI_Info_set(fd->info, "striping_unit", value);
-+
-+            sprintf(value, "%d", lum.lmm_stripe_count);
-+            MPI_Info_set(fd->info, "striping_factor", value);
-+
-+            sprintf(value, "%d", lum.lmm_stripe_offset);
-+            MPI_Info_set(fd->info, "start_iodevice", value);
-+        }
-+        ADIOI_Free(value);
-+
-+        if (fd->access_mode & ADIO_APPEND)
-+            fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
-+    }
-+
-+
-+    if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND))
-+	fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
-+
-+    if (fd->fd_sys == -1) {
-+#ifdef MPICH2
-+	if (errno == ENAMETOOLONG)
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamelong", "**filenamelong %s %d", fd->filename, strlen(fd->filename) );
-+	else if (errno == ENOENT)
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_NO_SUCH_FILE, "**filenoexist", "**filenoexist %s", fd->filename );
-+	else if (errno == ENOTDIR || errno == ELOOP)
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamedir", "**filenamedir %s", fd->filename );
-+	else if (errno == EACCES) {
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_ACCESS, "**fileaccess", "**fileaccess %s", 
-+					       fd->filename );
-+	}
-+	else if (errno == EROFS) {
-+	    /* Read only file or file system and write access requested */
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_READ_ONLY, "**ioneedrd", 0 );
-+	}
-+	else {
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+	}
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(ADIO_FILE_NULL, *error_code, myname);	    
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_rdcoll.c	2005-12-06 11:54:37.907127727 -0500
-@@ -0,0 +1,18 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_rdcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type,
-+			      offset, status, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_read.c	2005-12-06 11:54:37.907127727 -0500
-@@ -0,0 +1,67 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_read.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, 
-+                     MPI_Datatype datatype, int file_ptr_type,
-+		     ADIO_Offset offset, ADIO_Status *status, int *error_code)
-+{
-+    int err=-1, datatype_size, len;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_READCONTIG";
-+#endif
-+
-+    MPI_Type_size(datatype, &datatype_size);
-+    len = datatype_size * count;
-+
-+    if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
-+	if (fd->fp_sys_posn != offset) 
-+	    lseek(fd->fd_sys, offset, SEEK_SET);
-+	err = read(fd->fd_sys, buf, len);
-+	fd->fp_sys_posn = offset + len;
-+	/* individual file pointer not updated */        
-+    }
-+    else {  /* read from curr. location of ind. file pointer */
-+	if (fd->fp_sys_posn != fd->fp_ind)
-+	    lseek(fd->fd_sys, fd->fp_ind, SEEK_SET);
-+	err = read(fd->fd_sys, buf, len);
-+	fd->fp_ind += err; 
-+	fd->fp_sys_posn = fd->fp_ind;
-+    }         
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (err != -1) MPIR_Status_set_bytes(status, datatype, err);
-+#endif
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);	    
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-+
-+
-+
-+
-+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type,
-+                        offset, status, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_resize.c	2005-12-06 11:54:37.909127460 -0500
-@@ -0,0 +1,32 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_resize.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code)
-+{
-+    int err;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_RESIZE";
-+#endif
-+    
-+    err = ftruncate(fd->fd_sys, size);
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);	    
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_seek.c	2005-12-06 11:54:37.911127194 -0500
-@@ -0,0 +1,15 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_seek.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, 
-+		      int whence, int *error_code)
-+{
-+    return ADIOI_GEN_SeekIndividual(fd, offset, whence, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wait.c	2005-12-06 11:54:37.914126794 -0500
-@@ -0,0 +1,188 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_wait.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int *error_code)  
-+{
-+#ifndef NO_AIO
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_READCOMPLETE";
-+#endif
-+#ifdef AIO_SUN 
-+    aio_result_t *result=0, *tmp;
-+#else
-+    int err;
-+#endif
-+#ifdef AIO_HANDLE_IN_AIOCB
-+    struct aiocb *tmp1;
-+#endif
-+#endif
-+
-+    if (*request == ADIO_REQUEST_NULL) {
-+	*error_code = MPI_SUCCESS;
-+	return;
-+    }
-+
-+#ifdef AIO_SUN
-+    if ((*request)->queued) {  /* dequeue it */
-+	tmp = (aio_result_t *) (*request)->handle;
-+	while (tmp->aio_return == AIO_INPROGRESS) usleep(1000); 
-+	/* sleep for 1 ms., until done. Is 1 ms. a good number? */
-+	/* when done, dequeue any one request */
-+	result = (aio_result_t *) aiowait(0);
-+
-+        (*request)->nbytes = tmp->aio_return;
-+
-+	if (tmp->aio_return == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(tmp->aio_errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			  myname, "I/O Error", "%s", strerror(tmp->aio_errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);	    
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+
-+/* aiowait only dequeues a request. The completion of a request can be
-+   checked by just checking the aio_return flag in the handle passed
-+   to the original aioread()/aiowrite(). Therefore, I need to ensure
-+   that aiowait() is called exactly once for each previous
-+   aioread()/aiowrite(). This is also taken care of in ADIOI_xxxDone */
-+    }
-+    else *error_code = MPI_SUCCESS;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if ((*request)->nbytes != -1)
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#endif
-+    
-+#ifdef AIO_HANDLE_IN_AIOCB
-+/* IBM */
-+    if ((*request)->queued) {
-+	do {
-+	    err = aio_suspend(1, (struct aiocb **) &((*request)->handle));
-+	} while ((err == -1) && (errno == EINTR));
-+
-+	tmp1 = (struct aiocb *) (*request)->handle;
-+	if (err != -1) {
-+	    err = aio_return(tmp1->aio_handle);
-+	    (*request)->nbytes = err;
-+	    errno = aio_error(tmp1->aio_handle);
-+	}
-+	else (*request)->nbytes = -1;
-+
-+/* on DEC, it is required to call aio_return to dequeue the request.
-+   IBM man pages don't indicate what function to use for dequeue.
-+   I'm assuming it is aio_return! POSIX says aio_return may be called 
-+   only once on a given handle. */
-+
-+	if (err == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+             myname, "I/O Error", "%s", strerror(errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);	    
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+    } /* if ((*request)->queued)  */
-+    else *error_code = MPI_SUCCESS;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if ((*request)->nbytes != -1)
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#elif (!defined(NO_AIO) && !defined(AIO_SUN))
-+/* DEC, SGI IRIX 5 and 6 */
-+    if ((*request)->queued) {
-+	do {
-+	    err = aio_suspend((const aiocb_t **) &((*request)->handle), 1, 0);
-+	} while ((err == -1) && (errno == EINTR));
-+
-+	if (err != -1) {
-+	    err = aio_return((struct aiocb *) (*request)->handle); 
-+	    (*request)->nbytes = err;
-+	    errno = aio_error((struct aiocb *) (*request)->handle);
-+	}
-+	else (*request)->nbytes = -1;
-+
-+	if (err == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+	 	            myname, "I/O Error", "%s", strerror(errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);	    
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+    } /* if ((*request)->queued) */
-+    else *error_code = MPI_SUCCESS;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if ((*request)->nbytes != -1)
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+#endif
-+
-+#ifndef NO_AIO
-+    if ((*request)->queued != -1) {
-+
-+	/* queued = -1 is an internal hack used when the request must
-+	   be completed, but the request object should not be
-+	   freed. This is used in ADIOI_Complete_async, because the user
-+	   will call MPI_Wait later, which would require status to
-+	   be filled. Ugly but works. queued = -1 should be used only
-+	   in ADIOI_Complete_async. 
-+           This should not affect the user in any way. */
-+
-+	/* if request is still queued in the system, it is also there
-+           on ADIOI_Async_list. Delete it from there. */
-+	if ((*request)->queued) ADIOI_Del_req_from_list(request);
-+
-+	(*request)->fd->async_count--;
-+	if ((*request)->handle) ADIOI_Free((*request)->handle);
-+	ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+	*request = ADIO_REQUEST_NULL;
-+    }
-+
-+#else
-+/* HP, FreeBSD, Linux */
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+    (*request)->fd->async_count--;
-+    ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+    *request = ADIO_REQUEST_NULL;
-+    *error_code = MPI_SUCCESS;
-+#endif    
-+}
-+
-+
-+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code)  
-+{
-+    ADIOI_LUSTRE_ReadComplete(request, status, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_wrcoll.c	2005-12-06 11:54:37.914126794 -0500
-@@ -0,0 +1,18 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_wrcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type,
-+			      offset, status, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c
---- mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/ad_lustre_write.c	2005-12-06 11:54:37.914126794 -0500
-@@ -0,0 +1,66 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/* 
-+ *   $Id: ad_lustre_write.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $    
-+ *
-+ *   Copyright (C) 1997 University of Chicago. 
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, 
-+                   MPI_Datatype datatype, int file_ptr_type,
-+	           ADIO_Offset offset, ADIO_Status *status, int *error_code)
-+{
-+    int err=-1, datatype_size, len;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_WRITECONTIG";
-+#endif
-+
-+    MPI_Type_size(datatype, &datatype_size);
-+    len = datatype_size * count;
-+
-+    if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
-+	if (fd->fp_sys_posn != offset)
-+	    lseek(fd->fd_sys, offset, SEEK_SET);
-+	err = write(fd->fd_sys, buf, len);
-+	fd->fp_sys_posn = offset + err;
-+	/* individual file pointer not updated */        
-+    }
-+    else { /* write from curr. location of ind. file pointer */
-+	if (fd->fp_sys_posn != fd->fp_ind)
-+	    lseek(fd->fd_sys, fd->fp_ind, SEEK_SET);
-+	err = write(fd->fd_sys, buf, len);
-+	fd->fp_ind += err;
-+	fd->fp_sys_posn = fd->fp_ind;
-+    }
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (err != -1 && status) MPIR_Status_set_bytes(status, datatype, err);
-+#endif
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-+
-+
-+
-+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type,
-+                        offset, status, error_code);
-+}
-diff -r -u --new-file mpich-1.2.6/romio/adio/ad_lustre/Makefile.in mpich-1.2.6/romio/adio/ad_lustre/Makefile.in
---- mpich-1.2.6/romio/adio/ad_lustre/Makefile.in	1969-12-31 19:00:00.000000000 -0500
-+++ mpich-1.2.6/romio/adio/ad_lustre/Makefile.in	2005-12-06 11:54:37.883130927 -0500
-@@ -0,0 +1,47 @@
-+CC          = @CC@
-+AR          = @AR@
-+LIBNAME     = @LIBNAME@
-+srcdir      = @srcdir@
-+CC_SHL      = @CC_SHL@
-+SHLIBNAME   = @SHLIBNAME@
-+
-+INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include
-+CFLAGS      = @CFLAGS@ $(INCLUDE_DIR)
-+
-+C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR)
-+
-+@VPATH@
-+
-+AD_LUSTRE_OBJECTS = ad_lustre_close.o ad_lustre_read.o \
-+      ad_lustre_open.o ad_lustre_write.o ad_lustre_done.o \
-+      ad_lustre_fcntl.o ad_lustre_iread.o ad_lustre_iwrite.o ad_lustre_wait.o \
-+      ad_lustre_resize.o ad_lustre_hints.o \
-+      ad_lustre.o
-+
-+
-+default: $(LIBNAME)
-+	@if [ "@ENABLE_SHLIB@" != "none" ] ; then \
-+	    $(MAKE) $(SHLIBNAME).la ;\
-+	fi
-+
-+.SUFFIXES: $(SUFFIXES) .p .lo
-+
-+.c.o:
-+	$(CC) $(CFLAGS) -c $<
-+.c.lo:
-+	$(C_COMPILE_SHL) -c $<
-+	@mv -f $*.o $*.lo
-+
-+$(LIBNAME): $(AD_LUSTRE_OBJECTS)
-+	$(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS)
-+
-+AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo)
-+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS)
-+	$(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS)
-+
-+coverage:
-+	-@for file in  ${AD_LUSTRE_OBJECTS:.o=.c} ; do \
-+		gcov -b -f $$file ; done
-+
-+clean:
-+	@rm -f *.o *.lo
---- mpich-1.2.6/romio/Makefile.in	2004-01-27 18:27:35.000000000 -0500
-+++ mpich-1.2.6/romio/Makefile.in	2005-12-06 11:54:38.000000000 -0500
-@@ -14,7 +14,7 @@ DIRS        = mpi-io adio/common
- MPIO_DIRS   = mpi-io
- EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@
- FILE_SYS_DIRS = @FILE_SYS_DIRS@
--ALL_DIRS    = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 test
-+ALL_DIRS    = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_lustre test
- SHELL       = /bin/sh
- 
- @VPATH@
---- mpich-1.2.6/romio/configure.in	2004-08-02 09:37:31.000000000 -0400
-+++ mpich-1.2.6/romio/configure.in	2005-12-06 11:54:38.000000000 -0500
-@@ -90,7 +90,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai
- #
- have_aio=no
- #
--known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs"
-+known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs lustre"
- known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
- #
- # Defaults
-@@ -1270,6 +1270,9 @@ fi
- if test -n "$file_system_testfs"; then
-     AC_DEFINE(ROMIO_TESTFS,1,[Define for TESTFS])
- fi
-+if test -n "$file_system_lustre"; then
-+    AC_DEFINE(ROMIO_LUSTRE,1,[Define for LUSTRE])
-+fi
- if test -n "$file_system_piofs"; then
-     AC_DEFINE(PIOFS,1,[Define for PIOFS])
-     USER_CFLAGS="$USER_CFLAGS -bI:/usr/include/piofs/piofs.exp"
-@@ -1634,7 +1637,7 @@ AC_OUTPUT(Makefile localdefs mpi-io/Make
- 		   adio/ad_nfs/Makefile adio/ad_ufs/Makefile \
- 		   adio/ad_xfs/Makefile adio/ad_hfs/Makefile \
- 		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \
--		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \
-+		   adio/ad_testfs/Makefile adio/ad_lustre/Makefile adio/ad_pvfs/Makefile \
- 		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \
-                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \
-                    mpi2-other/array/fortran/Makefile test/fmisc.f \
---- mpich-1.2.6/romio/configure	2004-08-04 12:08:28.000000000 -0400
-+++ mpich-1.2.6/romio/configure	2005-12-06 11:54:38.000000000 -0500
-@@ -623,7 +623,7 @@ MPIO_REQ_REAL_POBJECTS="_iotest.o _iowai
- #
- have_aio=no
- #
--known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs xfs hfs sfs"
-+known_filesystems="nfs ufs pfs piofs pvfs pvfs2 testfs lustre xfs hfs sfs"
- known_mpi_impls="mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
- #
- # Defaults
-@@ -4022,6 +4022,13 @@ if test -n "$file_system_testfs"; then
- EOF
- 
- fi
-+if test -n "$file_system_lustre"; then
-+    cat >> confdefs.h <<\EOF
-+#define LUSTRE 1
-+EOF
-+
-+fi
-+
- if test -n "$file_system_piofs"; then
-     cat >> confdefs.h <<\EOF
- #define PIOFS 1
-@@ -4746,7 +4753,7 @@ trap 'rm -fr `echo "Makefile localdefs m
- 		   adio/ad_xfs/Makefile adio/ad_hfs/Makefile \
- 		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \
- 		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \
--		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \
-+		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile adio/ad_lustre/Makefile\
-                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \
-                    mpi2-other/array/fortran/Makefile test/fmisc.f \
-                    test/fcoll_test.f test/pfcoll_test.f test/fperf.f  adio/include/romioconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-@@ -4912,7 +4919,7 @@ CONFIG_FILES=\${CONFIG_FILES-"Makefile l
- 		   adio/ad_nfs/Makefile adio/ad_ufs/Makefile \
- 		   adio/ad_xfs/Makefile adio/ad_hfs/Makefile \
- 		   adio/ad_sfs/Makefile adio/ad_pfs/Makefile \
--		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \
-+		   adio/ad_testfs/Makefile adio/ad_lustre/Makefile adio/ad_pvfs/Makefile \
- 		   adio/ad_pvfs2/Makefile adio/ad_piofs/Makefile \
-                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \
-                    mpi2-other/array/fortran/Makefile test/fmisc.f \
---- mpich-1.2.6/romio/adio/include/romioconf.h.in	2004-08-04 12:08:28.000000000 -0400
-+++ mpich-1.2.6/romio/adio/include/romioconf.h.in	2005-12-06 11:54:38.000000000 -0500
-@@ -192,6 +192,9 @@
- /* Define for TESTFS */
- #undef ROMIO_TESTFS
- 
-+/* Define for LUSTRE */
-+#undef LUSTRE
-+
- /* Define for PIOFS */
- #undef PIOFS
- 
---- mpich-1.2.6/romio/adio/include/mpio_error.h	2002-11-15 11:26:23.000000000 -0500
-+++ mpich-1.2.6/romio/adio/include/mpio_error.h	2005-12-06 11:54:38.000000000 -0500
-@@ -62,6 +62,7 @@
- #define MPIR_ERR_FILETYPE 33 
- #define MPIR_ERR_NO_NTFS 35
- #define MPIR_ERR_NO_TESTFS 36
-+#define MPIR_ERR_NO_LUSTRE 37
- 
- /* MPI_ERR_COMM */
- #ifndef MPIR_ERR_COMM_NULL
---- mpich-1.2.6/romio/adio/include/adioi_fs_proto.h	2003-06-24 18:48:23.000000000 -0400
-+++ mpich-1.2.6/romio/adio/include/adioi_fs_proto.h	2005-12-06 11:54:38.000000000 -0500
-@@ -261,6 +261,68 @@ ADIO_Offset ADIOI_UFS_SeekIndividual(ADI
- void ADIOI_UFS_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
- #endif
- 
-+#ifdef LUSTRE
-+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations;
-+
-+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count, 
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                     ADIO_Offset offset, ADIO_Status *status, int
-+		     *error_code);
-+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count, 
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Status *status, int
-+		      *error_code);   
-+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count, 
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Request *request, int
-+		      *error_code);   
-+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count, 
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Request *request, int
-+		      *error_code);   
-+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int
-+		       *error_code);
-+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int
-+		       *error_code); 
-+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status,
-+			int *error_code); 
-+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int
-+		*error_code); 
-+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Request *request, int
-+		       *error_code);
-+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Request *request, int
-+		       *error_code);
-+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);
-+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset, 
-+                       int whence, int *error_code);
-+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
-+#endif
-+
- #ifdef ROMIO_NTFS
- extern struct ADIOI_Fns_struct ADIO_NTFS_operations;
- 
---- mpich-1.2.6/romio/adio/include/adio.h	2004-06-07 13:59:57.000000000 -0400
-+++ mpich-1.2.6/romio/adio/include/adio.h	2005-12-06 11:54:38.000000000 -0500
-@@ -276,6 +276,7 @@ typedef struct {
- #define ADIO_NTFS                158   /* NTFS for Windows NT */
- #define ADIO_TESTFS              159   /* fake file system for testing */
- #define ADIO_PVFS2               160   /* PVFS2: 2nd generation PVFS */
-+#define ADIO_LUSTRE              161   /* Lustre */
- 
- #define ADIO_SEEK_SET            SEEK_SET
- #define ADIO_SEEK_CUR            SEEK_CUR
---- mpich-1.2.6/romio/adio/common/setfn.c	2003-06-24 18:48:18.000000000 -0400
-+++ mpich-1.2.6/romio/adio/common/setfn.c	2005-12-06 11:54:38.000000000 -0500
-@@ -114,6 +114,16 @@ void ADIOI_SetFunctions(ADIO_File fd)
- #endif
- 	break;
- 
-+    case ADIO_LUSTRE:
-+#ifdef LUSTRE 
-+        *(fd->fns) = ADIO_LUSTRE_operations;
-+#else   
-+        FPRINTF(stderr, "ADIOI_SetFunctions: ROMIO has not been configured to use the LUSTRE file system\n");
-+        MPI_Abort(MPI_COMM_WORLD, 1);
-+#endif 
-+        break;
-+
-+
-     default:
- 	FPRINTF(stderr, "ADIOI_SetFunctions: Unsupported file system type\n");
-         MPI_Abort(MPI_COMM_WORLD, 1);
---- mpich-1.2.6/romio/adio/common/ad_fstype.c	2003-09-04 16:24:44.000000000 -0400
-+++ mpich-1.2.6/romio/adio/common/ad_fstype.c	2005-12-06 11:54:38.000000000 -0500
-@@ -204,6 +204,11 @@ static void ADIO_FileSysType_fncall(char
- 	}
-     }
- #elif defined(LINUX)
-+#warning use correct include
-+# if defined (LUSTRE)
-+#define LL_SUPER_MAGIC 0x0BD00BD0
-+# endif
-+
-     do {
- 	err = statfs(filename, &fsbuf);
-     } while (err && (errno == ESTALE));
-@@ -218,6 +223,9 @@ static void ADIO_FileSysType_fncall(char
-     else {
- 	/* FPRINTF(stderr, "%d\n", fsbuf.f_type);*/
- 	if (fsbuf.f_type == NFS_SUPER_MAGIC) *fstype = ADIO_NFS;
-+# if defined (LUSTRE)
-+	else if (fsbuf.f_type == LL_SUPER_MAGIC) *fstype = ADIO_LUSTRE;
-+#endif
- # if defined(ROMIO_PVFS)
- 	else if (fsbuf.f_type == PVFS_SUPER_MAGIC) *fstype = ADIO_PVFS;
- # endif
-@@ -359,6 +367,11 @@ static void ADIO_FileSysType_prefix(char
-     {
- 	*fstype = ADIO_TESTFS;
-     }
-+    else if (!strncmp(filename, "lustre:", 7) 
-+	     || !strncmp(filename, "LUSTRE:", 7))
-+    {
-+	*fstype = ADIO_LUSTRE;
-+    }
-     else {
- #ifdef ROMIO_NTFS
- 	*fstype = ADIO_NTFS;
-@@ -644,6 +657,24 @@ void ADIO_ResolveFileType(MPI_Comm comm,
- 	*ops = &ADIO_TESTFS_operations;
- #endif
-     }
-+    if (file_system == ADIO_LUSTRE) {
-+#ifndef LUSTRE 
-+# ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0);
-+	return;
-+# elif defined(PRINT_ERR_MSG)
-+	FPRINTF(stderr, "ADIO_ResolveFileType: ROMIO has not been configured to use the LUSTRE file system\n");
-+	MPI_Abort(MPI_COMM_WORLD, 1);
-+# else /* MPICH-1 */
-+	myerrcode = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ERR_NO_LUSTRE,
-+				     myname, (char *) 0, (char *) 0);
-+	*error_code = ADIOI_Error(MPI_FILE_NULL, myerrcode, myname);
-+# endif
-+	return;
-+#else
-+	*ops = &ADIO_LUSTRE_operations;
-+#endif
-+    }
-     *error_code = MPI_SUCCESS;
-     *fstype = file_system;
-     return;
diff --git a/lustre/contrib/mpich2-1.0.3.patch b/lustre/contrib/mpich2-1.0.3.patch
deleted file mode 100644
index 78dda9bef6a1dbbb84c3cb99270d47798ea0e06e..0000000000000000000000000000000000000000
--- a/lustre/contrib/mpich2-1.0.3.patch
+++ /dev/null
@@ -1,1831 +0,0 @@
-Date: Fri, 08 Jun 2007 14:04:34 -0400
-From: Weikuan Yu <weikuan.yu@gmail.com>
-To: Weikuan Yu <weikuan.yu@gmail.com>
-Subject: Re: [Lustre-discuss] MPI-IO for Lustre
-Cc: lustre-discuss@clusterfs.com
-
-
-This is the MPICH2 patch I originally started as a base for some ROMIO
-optimizations over Lustre. It should work fine for MPICH2-1.0.3 on
-experimental systems. However, use it as your risk :)
-
-Given time, I will try to push out my optimizations after some cleanup. I
-would very happy to hear feedbacks on what features people would need most
-at the time.
-
---
-Weikuan
-
-
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre.c romio/adio/ad_lustre/ad_lustre.c
---- romio-orig/adio/ad_lustre/ad_lustre.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre.c	2006-09-06 18:40:56.000844619 -0400
-@@ -0,0 +1,37 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 2001 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+/* adioi.h has the ADIOI_Fns_struct define */
-+#include "adioi.h"
-+
-+struct ADIOI_Fns_struct ADIO_LUSTRE_operations = {
-+    ADIOI_LUSTRE_Open, /* Open */
-+    ADIOI_LUSTRE_ReadContig, /* ReadContig */
-+    ADIOI_LUSTRE_WriteContig, /* WriteContig */
-+    ADIOI_GEN_ReadStridedColl, /* ReadStridedColl */
-+    ADIOI_GEN_WriteStridedColl, /* WriteStridedColl */
-+    ADIOI_GEN_SeekIndividual, /* SeekIndividual */
-+    ADIOI_LUSTRE_Fcntl, /* Fcntl */
-+    ADIOI_LUSTRE_SetInfo, /* SetInfo */
-+    ADIOI_GEN_ReadStrided, /* ReadStrided */
-+    ADIOI_GEN_WriteStrided, /* WriteStrided */
-+    ADIOI_LUSTRE_Close, /* Close */
-+    ADIOI_LUSTRE_IreadContig, /* IreadContig */
-+    ADIOI_LUSTRE_IwriteContig, /* IwriteContig */
-+    ADIOI_LUSTRE_ReadDone, /* ReadDone */
-+    ADIOI_LUSTRE_WriteDone, /* WriteDone */
-+    ADIOI_LUSTRE_ReadComplete, /* ReadComplete */
-+    ADIOI_LUSTRE_WriteComplete, /* WriteComplete */
-+    ADIOI_LUSTRE_IreadStrided, /* IreadStrided */
-+    ADIOI_LUSTRE_IwriteStrided, /* IwriteStrided */
-+    ADIOI_GEN_Flush, /* Flush */
-+    ADIOI_LUSTRE_Resize, /* Resize */
-+    ADIOI_GEN_Delete, /* Delete */
-+};
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_close.c romio/adio/ad_lustre/ad_lustre_close.c
---- romio-orig/adio/ad_lustre/ad_lustre_close.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_close.c	2006-09-06 17:10:35.000683211 -0400
-@@ -0,0 +1,32 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_close.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code)
-+{
-+    int err;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_CLOSE";
-+#endif
-+
-+    err = close(fd->fd_sys);
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_done.c romio/adio/ad_lustre/ad_lustre_done.c
---- romio-orig/adio/ad_lustre/ad_lustre_done.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_done.c	2006-09-06 17:10:35.000692922 -0400
-@@ -0,0 +1,188 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_done.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int *error_code)
-+{
-+#ifndef NO_AIO
-+    int done=0;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_READDONE";
-+#endif
-+#ifdef AIO_SUN
-+    aio_result_t *result=0, *tmp;
-+#else
-+    int err;
-+#endif
-+#ifdef AIO_HANDLE_IN_AIOCB
-+    struct aiocb *tmp1;
-+#endif
-+#endif
-+
-+    if (*request == ADIO_REQUEST_NULL) {
-+	*error_code = MPI_SUCCESS;
-+	return 1;
-+    }
-+
-+#ifdef NO_AIO
-+/* HP, FreeBSD, Linux */
-+#ifdef HAVE_STATUS_SET_BYTES
-+    MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+    (*request)->fd->async_count--;
-+    ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+    *request = ADIO_REQUEST_NULL;
-+    *error_code = MPI_SUCCESS;
-+    return 1;
-+#endif
-+
-+#ifdef AIO_SUN
-+    if ((*request)->queued) {
-+	tmp = (aio_result_t *) (*request)->handle;
-+	if (tmp->aio_return == AIO_INPROGRESS) {
-+	    done = 0;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else if (tmp->aio_return != -1) {
-+	    result = (aio_result_t *) aiowait(0); /* dequeue any one request */
-+	    done = 1;
-+	    (*request)->nbytes = tmp->aio_return;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(tmp->aio_errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+	    *error_code = MPI_ERR_UNKNOWN;
-+#else
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+		         myname, "I/O Error", "%s", strerror(tmp->aio_errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);
-+#endif
-+	}
-+    } /* if ((*request)->queued) ... */
-+    else {
-+	/* ADIOI_Complete_Async completed this request, but request object
-+           was not freed. */
-+	done = 1;
-+	*error_code = MPI_SUCCESS;
-+    }
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (done && ((*request)->nbytes != -1))
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#endif
-+
-+#ifdef AIO_HANDLE_IN_AIOCB
-+/* IBM */
-+    if ((*request)->queued) {
-+	tmp1 = (struct aiocb *) (*request)->handle;
-+	errno = aio_error(tmp1->aio_handle);
-+	if (errno == EINPROG) {
-+	    done = 0;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else {
-+	    err = aio_return(tmp1->aio_handle);
-+	    (*request)->nbytes = err;
-+	    errno = aio_error(tmp1->aio_handle);
-+
-+	    done = 1;
-+
-+	    if (err == -1) {
-+#ifdef MPICH2
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		    "**io %s", strerror(errno));
-+		return;
-+#elif defined(PRINT_ERR_MSG)
-+				*error_code = MPI_ERR_UNKNOWN;
-+#else
-+		*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+		ADIOI_Error((*request)->fd, *error_code, myname);
-+#endif
-+	    }
-+	    else *error_code = MPI_SUCCESS;
-+	}
-+    } /* if ((*request)->queued) */
-+    else {
-+	done = 1;
-+	*error_code = MPI_SUCCESS;
-+    }
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (done && ((*request)->nbytes != -1))
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#elif (!defined(NO_AIO) && !defined(AIO_SUN))
-+/* DEC, SGI IRIX 5 and 6 */
-+    if ((*request)->queued) {
-+	errno = aio_error((const struct aiocb *) (*request)->handle);
-+	if (errno == EINPROGRESS) {
-+	    done = 0;
-+	    *error_code = MPI_SUCCESS;
-+	}
-+	else {
-+	    err = aio_return((struct aiocb *) (*request)->handle);
-+	    (*request)->nbytes = err;
-+	    errno = aio_error((struct aiocb *) (*request)->handle);
-+
-+	    done = 1;
-+
-+	    if (err == -1) {
-+#ifdef MPICH2
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		    "**io %s", strerror(errno));
-+		return;
-+#elif defined(PRINT_ERR_MSG)
-+				*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+		*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+		ADIOI_Error((*request)->fd, *error_code, myname);
-+#endif
-+	    }
-+	    else *error_code = MPI_SUCCESS;
-+	}
-+    } /* if ((*request)->queued) */
-+    else {
-+	done = 1;
-+	*error_code = MPI_SUCCESS;
-+    }
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (done && ((*request)->nbytes != -1))
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#endif
-+
-+#ifndef NO_AIO
-+    if (done) {
-+	/* if request is still queued in the system, it is also there
-+           on ADIOI_Async_list. Delete it from there. */
-+	if ((*request)->queued) ADIOI_Del_req_from_list(request);
-+
-+	(*request)->fd->async_count--;
-+	if ((*request)->handle) ADIOI_Free((*request)->handle);
-+	ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+	*request = ADIO_REQUEST_NULL;
-+    }
-+    return done;
-+#endif
-+
-+}
-+
-+
-+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int *error_code)
-+{
-+    return ADIOI_LUSTRE_ReadDone(request, status, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_fcntl.c romio/adio/ad_lustre/ad_lustre_fcntl.c
---- romio-orig/adio/ad_lustre/ad_lustre_fcntl.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_fcntl.c	2006-09-06 18:43:11.000365177 -0400
-@@ -0,0 +1,127 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_fcntl.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+#include "adio_extern.h"
-+/* #ifdef MPISGI
-+#include "mpisgi2.h"
-+#endif */
-+
-+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int *error_code)
-+{
-+    int i, ntimes;
-+    ADIO_Offset curr_fsize, alloc_size, size, len, done;
-+    ADIO_Status status;
-+    char *buf;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_FCNTL";
-+#endif
-+
-+    switch(flag) {
-+    case ADIO_FCNTL_GET_FSIZE:
-+	fcntl_struct->fsize = lseek(fd->fd_sys, 0, SEEK_END);
-+	if (fd->fp_sys_posn != -1)
-+	     lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
-+	if (fcntl_struct->fsize == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	    ADIOI_Error(fd, *error_code, myname);
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+	break;
-+
-+    case ADIO_FCNTL_SET_DISKSPACE:
-+	/* will be called by one process only */
-+	/* On file systems with no preallocation function, I have to
-+           explicitly write
-+           to allocate space. Since there could be holes in the file,
-+           I need to read up to the current file size, write it back,
-+           and then write beyond that depending on how much
-+           preallocation is needed.
-+           read/write in sizes of no more than ADIOI_PREALLOC_BUFSZ */
-+
-+	curr_fsize = lseek(fd->fd_sys, 0, SEEK_END);
-+	alloc_size = fcntl_struct->diskspace;
-+
-+	size = ADIOI_MIN(curr_fsize, alloc_size);
-+
-+	ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
-+	buf = (char *) ADIOI_Malloc(ADIOI_PREALLOC_BUFSZ);
-+	done = 0;
-+
-+	for (i=0; i<ntimes; i++) {
-+	    len = ADIOI_MIN(size-done, ADIOI_PREALLOC_BUFSZ);
-+	    ADIO_ReadContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET, done,
-+			    &status, error_code);
-+	    if (*error_code != MPI_SUCCESS) {
-+#ifdef MPICH2
-+		*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+		FPRINTF(stderr, "ADIOI_LUSTRE_Fcntl: To preallocate disk space, ROMIO needs to read the file and write it back, but is unable to read the file. Please give the file read permission and open it with MPI_MODE_RDWR.\n");
-+		MPI_Abort(MPI_COMM_WORLD, 1);
-+#else /* MPICH-1 */
-+		*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_PREALLOC_PERM,
-+			      myname, (char *) 0, (char *) 0);
-+		ADIOI_Error(fd, *error_code, myname);
-+#endif
-+                return;
-+	    }
-+	    ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
-+                             done, &status, error_code);
-+	    if (*error_code != MPI_SUCCESS) return;
-+	    done += len;
-+	}
-+
-+	if (alloc_size > curr_fsize) {
-+	    memset(buf, 0, ADIOI_PREALLOC_BUFSZ);
-+	    size = alloc_size - curr_fsize;
-+	    ntimes = (size + ADIOI_PREALLOC_BUFSZ - 1)/ADIOI_PREALLOC_BUFSZ;
-+	    for (i=0; i<ntimes; i++) {
-+		len = ADIOI_MIN(alloc_size-done, ADIOI_PREALLOC_BUFSZ);
-+		ADIO_WriteContig(fd, buf, len, MPI_BYTE, ADIO_EXPLICIT_OFFSET,
-+				 done, &status, error_code);
-+		if (*error_code != MPI_SUCCESS) return;
-+		done += len;
-+	    }
-+	}
-+	ADIOI_Free(buf);
-+	if (fd->fp_sys_posn != -1)
-+	    lseek(fd->fd_sys, fd->fp_sys_posn, SEEK_SET);
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+#if 0
-+    case ADIO_FCNTL_SET_IOMODE:
-+        /* for implementing PFS I/O modes. will not occur in MPI-IO
-+           implementation.*/
-+	if (fd->iomode != fcntl_struct->iomode) {
-+	    fd->iomode = fcntl_struct->iomode;
-+	    MPI_Barrier(MPI_COMM_WORLD);
-+	}
-+	*error_code = MPI_SUCCESS;
-+	break;
-+#endif
-+
-+    case ADIO_FCNTL_SET_ATOMICITY:
-+	fd->atomicity = (fcntl_struct->atomicity == 0) ? 0 : 1;
-+	*error_code = MPI_SUCCESS;
-+	break;
-+
-+    default:
-+	FPRINTF(stderr, "Unknown flag passed to ADIOI_LUSTRE_Fcntl\n");
-+	MPI_Abort(MPI_COMM_WORLD, 1);
-+    }
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_flush.c romio/adio/ad_lustre/ad_lustre_flush.c
---- romio-orig/adio/ad_lustre/ad_lustre_flush.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_flush.c	2006-09-06 17:10:35.000711888 -0400
-@@ -0,0 +1,14 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_flush.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code)
-+{
-+    ADIOI_GEN_Flush(fd, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre.h romio/adio/ad_lustre/ad_lustre.h
---- romio-orig/adio/ad_lustre/ad_lustre.h	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre.h	2006-09-06 17:10:35.000722616 -0400
-@@ -0,0 +1,36 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre.h,v 1.2 2005/07/07 14:38:17 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#ifndef AD_UNIX_INCLUDE
-+#define AD_UNIX_INCLUDE
-+
-+/* temp*/
-+#define HAVE_ASM_TYPES_H 1
-+
-+#include <unistd.h>
-+#include <linux/types.h>
-+#include <fcntl.h>
-+#include <sys/ioctl.h>
-+#include "lustre/lustre_user.h"
-+#include "adio.h"
-+
-+#ifndef NO_AIO
-+#ifdef AIO_SUN
-+#include <sys/asynch.h>
-+#else
-+#include <aio.h>
-+#ifdef NEEDS_ADIOCB_T
-+typedef struct adiocb adiocb_t;
-+#endif
-+#endif
-+#endif
-+
-+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
-+		  int wr, void *handle);
-+
-+#endif
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_hints.c romio/adio/ad_lustre/ad_lustre_hints.c
---- romio-orig/adio/ad_lustre/ad_lustre_hints.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_hints.c	2006-09-06 17:10:35.000741994 -0400
-@@ -0,0 +1,130 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_hints.c,v 1.2 2005/07/07 14:38:17 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code)
-+{
-+    char *value, *value_in_fd;
-+    int flag, tmp_val, str_factor=-1, str_unit=0, start_iodev=-1;
-+    struct lov_user_md lum = { 0 };
-+    int err, myrank, fd_sys, perm, amode, old_mask;
-+
-+    if ( (fd->info) == MPI_INFO_NULL) {
-+	/* This must be part of the open call. can set striping parameters
-+           if necessary. */
-+	MPI_Info_create(&(fd->info));
-+
-+	/* has user specified striping or server buffering parameters
-+           and do they have the same value on all processes? */
-+	if (users_info != MPI_INFO_NULL) {
-+	    value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+
-+	    MPI_Info_get(users_info, "striping_factor", MPI_MAX_INFO_VAL,
-+			 value, &flag);
-+	    if (flag) {
-+		str_factor=atoi(value);
-+		tmp_val = str_factor;
-+		MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
-+		if (tmp_val != str_factor) {
-+		    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_factor\" must be the same on all processes\n");
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+
-+	    MPI_Info_get(users_info, "striping_unit", MPI_MAX_INFO_VAL,
-+			 value, &flag);
-+	    if (flag) {
-+		str_unit=atoi(value);
-+		tmp_val = str_unit;
-+		MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
-+		if (tmp_val != str_unit) {
-+		    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"striping_unit\" must be the same on all processes\n");
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+
-+	    MPI_Info_get(users_info, "start_iodevice", MPI_MAX_INFO_VAL,
-+			 value, &flag);
-+	    if (flag) {
-+		start_iodev=atoi(value);
-+		tmp_val = start_iodev;
-+		MPI_Bcast(&tmp_val, 1, MPI_INT, 0, fd->comm);
-+		if (tmp_val != start_iodev) {
-+		    FPRINTF(stderr, "ADIOI_LUSTRE_SetInfo: the value for key \"start_iodevice\" must be the same on all processes\n");
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+
-+         /* if user has specified striping info, process 0 tries to set it */
-+	    if ((str_factor > 0) || (str_unit > 0) || (start_iodev >= 0)) {
-+		MPI_Comm_rank(fd->comm, &myrank);
-+		if (!myrank) {
-+		    if (fd->perm == ADIO_PERM_NULL) {
-+			old_mask = umask(022);
-+			umask(old_mask);
-+			perm = old_mask ^ 0666;
-+		    }
-+		    else perm = fd->perm;
-+
-+		    amode = 0;
-+		    if (fd->access_mode & ADIO_CREATE)
-+			amode = amode | O_CREAT;
-+		    if (fd->access_mode & ADIO_RDONLY)
-+			amode = amode | O_RDONLY;
-+		    if (fd->access_mode & ADIO_WRONLY)
-+			amode = amode | O_WRONLY;
-+		    if (fd->access_mode & ADIO_RDWR)
-+			amode = amode | O_RDWR;
-+		    if (fd->access_mode & ADIO_EXCL)
-+			amode = amode | O_EXCL;
-+
-+		    /* we need to create file so ensure this is set */
-+                    amode = amode | O_LOV_DELAY_CREATE | O_CREAT;
-+
-+                    fd_sys = open(fd->filename, amode, perm);
-+                    if (fd_sys == -1) {
-+		        if (errno != EEXIST)
-+			    printf("Failure to open file %s %d %d\n",strerror(errno), amode, perm);
-+                    } else {
-+                        lum.lmm_magic = LOV_USER_MAGIC;
-+                        lum.lmm_pattern = 0;
-+                        lum.lmm_stripe_size = str_unit;
-+                        lum.lmm_stripe_count = str_factor;
-+                        lum.lmm_stripe_offset = start_iodev;
-+
-+                        err = ioctl(fd_sys, LL_IOC_LOV_SETSTRIPE, &lum);
-+                        if (err == -1 && errno != EEXIST) {
-+			    printf("Failure to set stripe info %s \n",strerror(errno));
-+                        }
-+
-+                        close(fd_sys);
-+                   }
-+
-+		}
-+		MPI_Barrier(fd->comm);
-+	    }
-+
-+	    ADIOI_Free(value);
-+	}
-+
-+	/* set the values for collective I/O and data sieving parameters */
-+	ADIOI_GEN_SetInfo(fd, users_info, error_code);
-+    }
-+
-+    else {
-+	/* The file has been opened previously and fd->fd_sys is a valid
-+           file descriptor. cannot set striping parameters now. */
-+
-+	/* set the values for collective I/O and data sieving parameters */
-+	ADIOI_GEN_SetInfo(fd, users_info, error_code);
-+
-+    }
-+
-+    *error_code = MPI_SUCCESS;
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_iread.c romio/adio/ad_lustre/ad_lustre_iread.c
---- romio-orig/adio/ad_lustre/ad_lustre_iread.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_iread.c	2006-09-06 17:10:35.000751765 -0400
-@@ -0,0 +1,106 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_iread.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count,
-+                MPI_Datatype datatype, int file_ptr_type,
-+                ADIO_Offset offset, ADIO_Request *request, int *error_code)
-+{
-+    int len, typesize;
-+#ifdef NO_AIO
-+    ADIO_Status status;
-+#else
-+    int err=-1;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_IREADCONTIG";
-+#endif
-+#endif
-+
-+    (*request) = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_READ;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+
-+    MPI_Type_size(datatype, &typesize);
-+    len = count * typesize;
-+
-+#ifdef NO_AIO
-+    /* HP, FreeBSD, Linux */
-+    /* no support for nonblocking I/O. Use blocking I/O. */
-+
-+    ADIOI_LUSTRE_ReadContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset,
-+			 &status, error_code);
-+    (*request)->queued = 0;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Get_elements(&status, MPI_BYTE, &len);
-+	(*request)->nbytes = len;
-+    }
-+#endif
-+
-+#else
-+    if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind;
-+    err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 0, &((*request)->handle));
-+    if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len;
-+
-+    (*request)->queued = 1;
-+    ADIOI_Add_req_to_list(request);
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+	return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+#endif  /* NO_AIO */
-+
-+    fd->fp_sys_posn = -1;   /* set it to null. */
-+    fd->async_count++;
-+}
-+
-+
-+
-+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Request *request, int
-+                       *error_code)
-+{
-+    ADIO_Status status;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    int typesize;
-+#endif
-+
-+    *request = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_READ;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+    (*request)->queued = 0;
-+    (*request)->handle = 0;
-+
-+/* call the blocking version. It is faster because it does data sieving. */
-+    ADIOI_LUSTRE_ReadStrided(fd, buf, count, datatype, file_ptr_type,
-+                            offset, &status, error_code);
-+
-+    fd->async_count++;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Type_size(datatype, &typesize);
-+	(*request)->nbytes = count * typesize;
-+    }
-+#endif
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_iwrite.c romio/adio/ad_lustre/ad_lustre_iwrite.c
---- romio-orig/adio/ad_lustre/ad_lustre_iwrite.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_iwrite.c	2006-09-06 17:10:35.000761678 -0400
-@@ -0,0 +1,268 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_iwrite.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count,
-+                MPI_Datatype datatype, int file_ptr_type,
-+                ADIO_Offset offset, ADIO_Request *request, int *error_code)
-+{
-+    int len, typesize;
-+#ifdef NO_AIO
-+    ADIO_Status status;
-+#else
-+    int err=-1;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_IWRITECONTIG";
-+#endif
-+#endif
-+
-+    *request = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_WRITE;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+
-+    MPI_Type_size(datatype, &typesize);
-+    len = count * typesize;
-+
-+#ifdef NO_AIO
-+    /* HP, FreeBSD, Linux */
-+    /* no support for nonblocking I/O. Use blocking I/O. */
-+
-+    ADIOI_LUSTRE_WriteContig(fd, buf, len, MPI_BYTE, file_ptr_type, offset,
-+			  &status, error_code);
-+    (*request)->queued = 0;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Get_elements(&status, MPI_BYTE, &len);
-+	(*request)->nbytes = len;
-+    }
-+#endif
-+
-+#else
-+    if (file_ptr_type == ADIO_INDIVIDUAL) offset = fd->fp_ind;
-+    err = ADIOI_LUSTRE_aio(fd, buf, len, offset, 1, &((*request)->handle));
-+    if (file_ptr_type == ADIO_INDIVIDUAL) fd->fp_ind += len;
-+
-+    (*request)->queued = 1;
-+    ADIOI_Add_req_to_list(request);
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+	return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+#endif /* NO_AIO */
-+
-+    fd->fp_sys_posn = -1;   /* set it to null. */
-+    fd->async_count++;
-+}
-+
-+
-+
-+
-+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Request *request, int
-+                       *error_code)
-+{
-+    ADIO_Status status;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    int typesize;
-+#endif
-+
-+    *request = ADIOI_Malloc_request();
-+    (*request)->optype = ADIOI_WRITE;
-+    (*request)->fd = fd;
-+    (*request)->datatype = datatype;
-+    (*request)->queued = 0;
-+    (*request)->handle = 0;
-+
-+/* call the blocking version. It is faster because it does data sieving. */
-+    ADIOI_LUSTRE_WriteStrided(fd, buf, count, datatype, file_ptr_type,
-+                            offset, &status, error_code);
-+
-+    fd->async_count++;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (*error_code == MPI_SUCCESS) {
-+	MPI_Type_size(datatype, &typesize);
-+	(*request)->nbytes = count * typesize;
-+    }
-+#endif
-+}
-+
-+
-+/* This function is for implementation convenience. It is not user-visible.
-+   It takes care of the differences in the interface for nonblocking I/O
-+   on various Unix machines! If wr==1 write, wr==0 read. */
-+
-+int ADIOI_LUSTRE_aio(ADIO_File fd, void *buf, int len, ADIO_Offset offset,
-+		  int wr, void *handle)
-+{
-+    int err=-1, fd_sys;
-+
-+#ifndef NO_AIO
-+    int error_code;
-+#ifdef AIO_SUN
-+    aio_result_t *result;
-+#else
-+    struct aiocb *aiocbp;
-+#endif
-+#endif
-+
-+    fd_sys = fd->fd_sys;
-+
-+#ifdef AIO_SUN
-+    result = (aio_result_t *) ADIOI_Malloc(sizeof(aio_result_t));
-+    result->aio_return = AIO_INPROGRESS;
-+    if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result);
-+    else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result);
-+
-+    if (err == -1) {
-+	if (errno == EAGAIN) {
-+       /* the man pages say EPROCLIM, but in reality errno is set to EAGAIN! */
-+
-+        /* exceeded the max. no. of outstanding requests.
-+           complete all previous async. requests and try again.*/
-+
-+	    ADIOI_Complete_async(&error_code);
-+	    if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result);
-+	    else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result);
-+
-+	    while (err == -1) {
-+		if (errno == EAGAIN) {
-+                    /* sleep and try again */
-+                    sleep(1);
-+		    if (wr) err = aiowrite(fd_sys, buf, len, offset, SEEK_SET, result);
-+		    else err = aioread(fd_sys, buf, len, offset, SEEK_SET, result);
-+		}
-+                else {
-+                    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+                    MPI_Abort(MPI_COMM_WORLD, 1);
-+                }
-+	    }
-+	}
-+        else {
-+            FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+            MPI_Abort(MPI_COMM_WORLD, 1);
-+        }
-+    }
-+
-+    *((aio_result_t **) handle) = result;
-+#endif
-+
-+#ifdef NO_FD_IN_AIOCB
-+/* IBM */
-+    aiocbp = (struct aiocb *) ADIOI_Malloc(sizeof(struct aiocb));
-+    aiocbp->aio_whence = SEEK_SET;
-+    aiocbp->aio_offset = offset;
-+    aiocbp->aio_buf = buf;
-+    aiocbp->aio_nbytes = len;
-+    if (wr) err = aio_write(fd_sys, aiocbp);
-+    else err = aio_read(fd_sys, aiocbp);
-+
-+    if (err == -1) {
-+	if (errno == EAGAIN) {
-+        /* exceeded the max. no. of outstanding requests.
-+          complete all previous async. requests and try again. */
-+
-+	    ADIOI_Complete_async(&error_code);
-+	    if (wr) err = aio_write(fd_sys, aiocbp);
-+	    else err = aio_read(fd_sys, aiocbp);
-+
-+            while (err == -1) {
-+                if (errno == EAGAIN) {
-+                    /* sleep and try again */
-+                    sleep(1);
-+		    if (wr) err = aio_write(fd_sys, aiocbp);
-+		    else err = aio_read(fd_sys, aiocbp);
-+		}
-+                else {
-+                    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+                    MPI_Abort(MPI_COMM_WORLD, 1);
-+                }
-+            }
-+	}
-+        else {
-+            FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+            MPI_Abort(MPI_COMM_WORLD, 1);
-+        }
-+    }
-+
-+    *((struct aiocb **) handle) = aiocbp;
-+
-+#elif (!defined(NO_AIO) && !defined(AIO_SUN))
-+/* DEC, SGI IRIX 5 and 6 */
-+
-+    aiocbp = (struct aiocb *) ADIOI_Calloc(sizeof(struct aiocb), 1);
-+    aiocbp->aio_fildes = fd_sys;
-+    aiocbp->aio_offset = offset;
-+    aiocbp->aio_buf = buf;
-+    aiocbp->aio_nbytes = len;
-+
-+#ifdef AIO_PRIORITY_DEFAULT
-+/* DEC */
-+    aiocbp->aio_reqprio = AIO_PRIO_DFL;   /* not needed in DEC Unix 4.0 */
-+    aiocbp->aio_sigevent.sigev_signo = 0;
-+#else
-+    aiocbp->aio_reqprio = 0;
-+#endif
-+
-+#ifdef AIO_SIGNOTIFY_NONE
-+/* SGI IRIX 6 */
-+    aiocbp->aio_sigevent.sigev_notify = SIGEV_NONE;
-+#else
-+    aiocbp->aio_sigevent.sigev_signo = 0;
-+#endif
-+
-+    if (wr) err = aio_write(aiocbp);
-+    else err = aio_read(aiocbp);
-+
-+    if (err == -1) {
-+	if (errno == EAGAIN) {
-+        /* exceeded the max. no. of outstanding requests.
-+           complete all previous async. requests and try again. */
-+
-+	    ADIOI_Complete_async(&error_code);
-+	    if (wr) err = aio_write(aiocbp);
-+	    else err = aio_read(aiocbp);
-+
-+	    while (err == -1) {
-+		if (errno == EAGAIN) {
-+		    /* sleep and try again */
-+		    sleep(1);
-+		    if (wr) err = aio_write(aiocbp);
-+		    else err = aio_read(aiocbp);
-+		}
-+		else {
-+		    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+		    MPI_Abort(MPI_COMM_WORLD, 1);
-+		}
-+	    }
-+        }
-+	else {
-+	    FPRINTF(stderr, "Unknown errno %d in ADIOI_LUSTRE_aio\n", errno);
-+	    MPI_Abort(MPI_COMM_WORLD, 1);
-+	}
-+    }
-+
-+    *((struct aiocb **) handle) = aiocbp;
-+#endif
-+
-+    return err;
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_open.c romio/adio/ad_lustre/ad_lustre_open.c
---- romio-orig/adio/ad_lustre/ad_lustre_open.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_open.c	2006-09-06 17:10:35.000771351 -0400
-@@ -0,0 +1,100 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_open.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code)
-+{
-+    int perm, old_mask, amode;
-+    struct lov_user_md lum = { 0 };
-+    char *value;
-+
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_OPEN";
-+#endif
-+
-+    if (fd->perm == ADIO_PERM_NULL) {
-+	old_mask = umask(022);
-+	umask(old_mask);
-+	perm = old_mask ^ 0666;
-+    }
-+    else perm = fd->perm;
-+
-+    amode = 0;
-+    if (fd->access_mode & ADIO_CREATE)
-+	amode = amode | O_CREAT;
-+    if (fd->access_mode & ADIO_RDONLY)
-+	amode = amode | O_RDONLY;
-+    if (fd->access_mode & ADIO_WRONLY)
-+	amode = amode | O_WRONLY;
-+    if (fd->access_mode & ADIO_RDWR)
-+	amode = amode | O_RDWR;
-+    if (fd->access_mode & ADIO_EXCL)
-+	amode = amode | O_EXCL;
-+
-+    fd->fd_sys = open(fd->filename, amode, perm);
-+
-+    if (fd->fd_sys != -1) {
-+        int err;
-+
-+        value = (char *) ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
-+
-+        /* get file striping information and set it in info */
-+        lum.lmm_magic = LOV_USER_MAGIC;
-+        err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *) &lum);
-+
-+        if (!err) {
-+            sprintf(value, "%d", lum.lmm_stripe_size);
-+            MPI_Info_set(fd->info, "striping_unit", value);
-+
-+            sprintf(value, "%d", lum.lmm_stripe_count);
-+            MPI_Info_set(fd->info, "striping_factor", value);
-+
-+            sprintf(value, "%d", lum.lmm_stripe_offset);
-+            MPI_Info_set(fd->info, "start_iodevice", value);
-+        }
-+        ADIOI_Free(value);
-+
-+        if (fd->access_mode & ADIO_APPEND)
-+            fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
-+    }
-+
-+
-+    if ((fd->fd_sys != -1) && (fd->access_mode & ADIO_APPEND))
-+	fd->fp_ind = fd->fp_sys_posn = lseek(fd->fd_sys, 0, SEEK_END);
-+
-+    if (fd->fd_sys == -1) {
-+#ifdef MPICH2
-+	if (errno == ENAMETOOLONG)
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamelong", "**filenamelong %s %d", fd->filename, strlen(fd->filename));
-+	else if (errno == ENOENT)
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_NO_SUCH_FILE, "**filenoexist", "**filenoexist %s", fd->filename);
-+	else if (errno == ENOTDIR || errno == ELOOP)
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_BAD_FILE, "**filenamedir", "**filenamedir %s", fd->filename);
-+	else if (errno == EACCES) {
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_ACCESS, "**fileaccess", "**fileaccess %s",
-+					       fd->filename);
-+	}
-+	else if (errno == EROFS) {
-+	    /* Read only file or file system and write access requested */
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_READ_ONLY, "**ioneedrd", 0);
-+	}
-+	else {
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+	}
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(ADIO_FILE_NULL, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c romio/adio/ad_lustre/ad_lustre_rdcoll.c
---- romio-orig/adio/ad_lustre/ad_lustre_rdcoll.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_rdcoll.c	2006-09-06 17:10:35.000780880 -0400
-@@ -0,0 +1,18 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_rdcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_ReadStridedColl(fd, buf, count, datatype, file_ptr_type,
-+			      offset, status, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_read.c romio/adio/ad_lustre/ad_lustre_read.c
---- romio-orig/adio/ad_lustre/ad_lustre_read.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_read.c	2006-09-06 17:10:35.000790846 -0400
-@@ -0,0 +1,67 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_read.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count,
-+                     MPI_Datatype datatype, int file_ptr_type,
-+		     ADIO_Offset offset, ADIO_Status *status, int *error_code)
-+{
-+    int err=-1, datatype_size, len;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_READCONTIG";
-+#endif
-+
-+    MPI_Type_size(datatype, &datatype_size);
-+    len = datatype_size * count;
-+
-+    if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
-+	if (fd->fp_sys_posn != offset)
-+	    lseek(fd->fd_sys, offset, SEEK_SET);
-+	err = read(fd->fd_sys, buf, len);
-+	fd->fp_sys_posn = offset + len;
-+	/* individual file pointer not updated */
-+    }
-+    else {  /* read from curr. location of ind. file pointer */
-+	if (fd->fp_sys_posn != fd->fp_ind)
-+	    lseek(fd->fd_sys, fd->fp_ind, SEEK_SET);
-+	err = read(fd->fd_sys, buf, len);
-+	fd->fp_ind += err;
-+	fd->fp_sys_posn = fd->fp_ind;
-+    }
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (err != -1) MPIR_Status_set_bytes(status, datatype, err);
-+#endif
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-+
-+
-+
-+
-+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_ReadStrided(fd, buf, count, datatype, file_ptr_type,
-+                        offset, status, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_resize.c romio/adio/ad_lustre/ad_lustre_resize.c
---- romio-orig/adio/ad_lustre/ad_lustre_resize.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_resize.c	2006-09-06 17:10:35.000807397 -0400
-@@ -0,0 +1,32 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_resize.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code)
-+{
-+    int err;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_RESIZE";
-+#endif
-+
-+    err = ftruncate(fd->fd_sys, size);
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_seek.c romio/adio/ad_lustre/ad_lustre_seek.c
---- romio-orig/adio/ad_lustre/ad_lustre_seek.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_seek.c	2006-09-06 17:10:35.000816583 -0400
-@@ -0,0 +1,15 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_seek.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset,
-+		      int whence, int *error_code)
-+{
-+    return ADIOI_GEN_SeekIndividual(fd, offset, whence, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_wait.c romio/adio/ad_lustre/ad_lustre_wait.c
---- romio-orig/adio/ad_lustre/ad_lustre_wait.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_wait.c	2006-09-06 18:45:39.000190529 -0400
-@@ -0,0 +1,188 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_wait.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int *error_code)
-+{
-+#ifndef NO_AIO
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_READCOMPLETE";
-+#endif
-+#ifdef AIO_SUN
-+    aio_result_t *result=0, *tmp;
-+#else
-+    int err;
-+#endif
-+#ifdef AIO_HANDLE_IN_AIOCB
-+    struct aiocb *tmp1;
-+#endif
-+#endif
-+
-+    if (*request == ADIO_REQUEST_NULL) {
-+	*error_code = MPI_SUCCESS;
-+	return;
-+    }
-+
-+#ifdef AIO_SUN
-+    if ((*request)->queued) {  /* dequeue it */
-+	tmp = (aio_result_t *) (*request)->handle;
-+	while (tmp->aio_return == AIO_INPROGRESS) usleep(1000);
-+	/* sleep for 1 ms., until done. Is 1 ms. a good number? */
-+	/* when done, dequeue any one request */
-+	result = (aio_result_t *) aiowait(0);
-+
-+        (*request)->nbytes = tmp->aio_return;
-+
-+	if (tmp->aio_return == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(tmp->aio_errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			  myname, "I/O Error", "%s", strerror(tmp->aio_errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+
-+/* aiowait only dequeues a request. The completion of a request can be
-+   checked by just checking the aio_return flag in the handle passed
-+   to the original aioread()/aiowrite(). Therefore, I need to ensure
-+   that aiowait() is called exactly once for each previous
-+   aioread()/aiowrite(). This is also taken care of in ADIOI_xxxDone */
-+    }
-+    else *error_code = MPI_SUCCESS;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if ((*request)->nbytes != -1)
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#endif
-+
-+#ifdef AIO_HANDLE_IN_AIOCB
-+/* IBM */
-+    if ((*request)->queued) {
-+	do {
-+	    err = aio_suspend(1, (struct aiocb **) &((*request)->handle));
-+	} while ((err == -1) && (errno == EINTR));
-+
-+	tmp1 = (struct aiocb *) (*request)->handle;
-+	if (err != -1) {
-+	    err = aio_return(tmp1->aio_handle);
-+	    (*request)->nbytes = err;
-+	    errno = aio_error(tmp1->aio_handle);
-+	}
-+	else (*request)->nbytes = -1;
-+
-+/* on DEC, it is required to call aio_return to dequeue the request.
-+   IBM man pages don't indicate what function to use for dequeue.
-+   I'm assuming it is aio_return! POSIX says aio_return may be called
-+   only once on a given handle. */
-+
-+	if (err == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+             myname, "I/O Error", "%s", strerror(errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+    } /* if ((*request)->queued)  */
-+    else *error_code = MPI_SUCCESS;
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if ((*request)->nbytes != -1)
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+
-+#elif (!defined(NO_AIO) && !defined(AIO_SUN))
-+/* DEC, SGI IRIX 5 and 6 */
-+    if ((*request)->queued) {
-+	do {
-+	    err = aio_suspend((const struct aiocb_t **) &((*request)->handle), 1, 0);
-+	} while ((err == -1) && (errno == EINTR));
-+
-+	if (err != -1) {
-+	    err = aio_return((struct aiocb *) (*request)->handle);
-+	    (*request)->nbytes = err;
-+	    errno = aio_error((struct aiocb *) (*request)->handle);
-+	}
-+	else (*request)->nbytes = -1;
-+
-+	if (err == -1) {
-+#ifdef MPICH2
-+	    *error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+		"**io %s", strerror(errno));
-+	    return;
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else /* MPICH-1 */
-+	    *error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+	 	            myname, "I/O Error", "%s", strerror(errno));
-+	    ADIOI_Error((*request)->fd, *error_code, myname);
-+#endif
-+	}
-+	else *error_code = MPI_SUCCESS;
-+    } /* if ((*request)->queued) */
-+    else *error_code = MPI_SUCCESS;
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if ((*request)->nbytes != -1)
-+	MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+#endif
-+
-+#ifndef NO_AIO
-+    if ((*request)->queued != -1) {
-+
-+	/* queued = -1 is an internal hack used when the request must
-+	   be completed, but the request object should not be
-+	   freed. This is used in ADIOI_Complete_async, because the user
-+	   will call MPI_Wait later, which would require status to
-+	   be filled. Ugly but works. queued = -1 should be used only
-+	   in ADIOI_Complete_async.
-+           This should not affect the user in any way. */
-+
-+	/* if request is still queued in the system, it is also there
-+           on ADIOI_Async_list. Delete it from there. */
-+	if ((*request)->queued) ADIOI_Del_req_from_list(request);
-+
-+	(*request)->fd->async_count--;
-+	if ((*request)->handle) ADIOI_Free((*request)->handle);
-+	ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+	*request = ADIO_REQUEST_NULL;
-+    }
-+
-+#else
-+/* HP, FreeBSD, Linux */
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    MPIR_Status_set_bytes(status, (*request)->datatype, (*request)->nbytes);
-+#endif
-+    (*request)->fd->async_count--;
-+    ADIOI_Free_request((ADIOI_Req_node *) (*request));
-+    *request = ADIO_REQUEST_NULL;
-+    *error_code = MPI_SUCCESS;
-+#endif
-+}
-+
-+
-+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status, int *error_code)
-+{
-+    ADIOI_LUSTRE_ReadComplete(request, status, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c romio/adio/ad_lustre/ad_lustre_wrcoll.c
---- romio-orig/adio/ad_lustre/ad_lustre_wrcoll.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_wrcoll.c	2006-09-06 17:10:35.000835460 -0400
-@@ -0,0 +1,18 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_wrcoll.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_WriteStridedColl(fd, buf, count, datatype, file_ptr_type,
-+			      offset, status, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/ad_lustre_write.c romio/adio/ad_lustre/ad_lustre_write.c
---- romio-orig/adio/ad_lustre/ad_lustre_write.c	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/ad_lustre_write.c	2006-09-06 17:10:35.000844658 -0400
-@@ -0,0 +1,66 @@
-+/* -*- Mode: C; c-basic-offset:4 ; -*- */
-+/*
-+ *   $Id: ad_lustre_write.c,v 1.1.1.1 2004/11/04 11:03:38 liam Exp $
-+ *
-+ *   Copyright (C) 1997 University of Chicago.
-+ *   See COPYRIGHT notice in top-level directory.
-+ */
-+
-+#include "ad_lustre.h"
-+
-+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count,
-+                   MPI_Datatype datatype, int file_ptr_type,
-+	           ADIO_Offset offset, ADIO_Status *status, int *error_code)
-+{
-+    int err=-1, datatype_size, len;
-+#if defined(MPICH2) || !defined(PRINT_ERR_MSG)
-+    static char myname[] = "ADIOI_LUSTRE_WRITECONTIG";
-+#endif
-+
-+    MPI_Type_size(datatype, &datatype_size);
-+    len = datatype_size * count;
-+
-+    if (file_ptr_type == ADIO_EXPLICIT_OFFSET) {
-+	if (fd->fp_sys_posn != offset)
-+	    lseek(fd->fd_sys, offset, SEEK_SET);
-+	err = write(fd->fd_sys, buf, len);
-+	fd->fp_sys_posn = offset + err;
-+	/* individual file pointer not updated */
-+    }
-+    else { /* write from curr. location of ind. file pointer */
-+	if (fd->fp_sys_posn != fd->fp_ind)
-+	    lseek(fd->fd_sys, fd->fp_ind, SEEK_SET);
-+	err = write(fd->fd_sys, buf, len);
-+	fd->fp_ind += err;
-+	fd->fp_sys_posn = fd->fp_ind;
-+    }
-+
-+#ifdef HAVE_STATUS_SET_BYTES
-+    if (err != -1 && status) MPIR_Status_set_bytes(status, datatype, err);
-+#endif
-+
-+    if (err == -1) {
-+#ifdef MPICH2
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**io",
-+	    "**io %s", strerror(errno));
-+#elif defined(PRINT_ERR_MSG)
-+			*error_code = MPI_ERR_UNKNOWN;
-+#else
-+	*error_code = MPIR_Err_setmsg(MPI_ERR_IO, MPIR_ADIO_ERROR,
-+			      myname, "I/O Error", "%s", strerror(errno));
-+	ADIOI_Error(fd, *error_code, myname);
-+#endif
-+    }
-+    else *error_code = MPI_SUCCESS;
-+}
-+
-+
-+
-+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,
-+                       MPI_Datatype datatype, int file_ptr_type,
-+                       ADIO_Offset offset, ADIO_Status *status, int
-+                       *error_code)
-+{
-+    ADIOI_GEN_WriteStrided(fd, buf, count, datatype, file_ptr_type,
-+                        offset, status, error_code);
-+}
-diff -ruN romio-orig/adio/ad_lustre/Makefile.in romio/adio/ad_lustre/Makefile.in
---- romio-orig/adio/ad_lustre/Makefile.in	1969-12-31 19:00:00.000000000 -0500
-+++ romio/adio/ad_lustre/Makefile.in	2006-09-06 18:48:56.000800829 -0400
-@@ -0,0 +1,51 @@
-+CC          = @CC@
-+AR          = @AR@
-+RANLIB      = @RANLIB@
-+LIBNAME     = @LIBNAME@
-+srcdir      = @srcdir@
-+CC_SHL      = @CC_SHL@
-+SHLIBNAME   = @SHLIBNAME@
-+
-+INCLUDE_DIR = -I@MPI_INCLUDE_DIR@ -I${srcdir}/../include -I../include -I../../include -I${srcdir}/../../../../include -I../../../../include
-+CFLAGS      = @CPPFLAGS@ @CFLAGS@ $(INCLUDE_DIR)
-+
-+top_builddir  = @master_topbuild_dir@
-+LIBTOOL       = @LIBTOOL@
-+C_COMPILE_SHL = $(CC_SHL) @CFLAGS@ $(INCLUDE_DIR)
-+
-+@VPATH@
-+
-+AD_LUSTRE_OBJECTS = ad_lustre.o ad_lustre_close.o ad_lustre_read.o \
-+      ad_lustre_open.o ad_lustre_write.o ad_lustre_done.o \
-+      ad_lustre_fcntl.o ad_lustre_iread.o ad_lustre_iwrite.o ad_lustre_wait.o \
-+      ad_lustre_resize.o ad_lustre_hints.o
-+
-+default: $(LIBNAME)
-+	@if [ "@ENABLE_SHLIB@" != "none" ] ; then \
-+	    $(MAKE) $(SHLIBNAME).la ;\
-+	fi
-+
-+.SUFFIXES: $(SUFFIXES) .p .lo
-+
-+.c.o:
-+	$(CC) $(CFLAGS) -c $<
-+.c.lo:
-+	$(C_COMPILE_SHL) -c $< -o _s$*.o
-+	@mv -f _s$*.o $*.lo
-+#	$(C_COMPILE_SHL) -c $<
-+#	@mv -f $*.o $*.lo
-+
-+$(LIBNAME): $(AD_LUSTRE_OBJECTS)
-+	$(AR) $(LIBNAME) $(AD_LUSTRE_OBJECTS)
-+	$(RANLIB) $(LIBNAME)
-+
-+AD_LUSTRE_LOOBJECTS=$(AD_LUSTRE_OBJECTS:.o=.lo)
-+$(SHLIBNAME).la: $(AD_LUSTRE_LOOBJECTS)
-+	$(AR) $(SHLIBNAME).la $(AD_LUSTRE_LOOBJECTS)
-+
-+coverage:
-+	-@for file in  ${AD_LUSTRE_OBJECTS:.o=.c} ; do \
-+		gcov -b -f $$file ; done
-+
-+clean:
-+	@rm -f *.o *.lo
-diff -ruN romio-orig/adio/common/ad_fstype.c romio/adio/common/ad_fstype.c
---- romio-orig/adio/common/ad_fstype.c	2005-08-11 19:33:46.000000000 -0400
-+++ romio/adio/common/ad_fstype.c	2006-09-06 17:41:20.000830936 -0400
-@@ -265,6 +265,9 @@
-     /* if UFS support is enabled, default to that */
-     *fstype = ADIO_UFS;
-     return;
-+# elif defined(LINUX) && defined(ROMIO_LUSTRE)
-+# warning use correct include
-+# define LL_SUPER_MAGIC 0x0BD00BD0
- # endif
- 
-     /* --BEGIN ERROR HANDLING-- */
-@@ -308,6 +311,13 @@
-     }
- # endif
- 
-+# ifdef LL_SUPER_MAGIC
-+    if (fsbuf.f_type == LL_SUPER_MAGIC) {
-+	*fstype = ADIO_LUSTRE;
-+	return;
-+    }
-+# endif
-+
- # ifdef PAN_KERNEL_FS_CLIENT_SUPER_MAGIC
-     if (fsbuf.f_type == PAN_KERNEL_FS_CLIENT_SUPER_MAGIC) {
- 	*fstype = ADIO_PANFS;
-@@ -458,6 +468,11 @@
-     {
- 	*fstype = ADIO_GRIDFTP;
-     }
-+    else if (!strncmp(filename, "lustre:", 7)
-+	     || !strncmp(filename, "LUSTRE:", 7))
-+    {
-+	*fstype = ADIO_LUSTRE;
-+    }
-     else {
- #ifdef ROMIO_NTFS
- 	*fstype = ADIO_NTFS;
-@@ -657,6 +672,14 @@
- 	*ops = &ADIO_GRIDFTP_operations;
- #endif
-     }
-+    if (file_system == ADIO_LUSTRE) {
-+#ifndef ROMIO_LUSTRE
-+	*error_code = MPIR_Err_create_code(MPI_SUCCESS, MPIR_ERR_RECOVERABLE, myname, __LINE__, MPI_ERR_IO, "**iofstypeunsupported", 0);
-+	return;
-+#else
-+	*ops = &ADIO_LUSTRE_operations;
-+#endif
-+    }
-     *error_code = MPI_SUCCESS;
-     *fstype = file_system;
-     return;
-diff -ruN romio-orig/adio/include/adio.h romio/adio/include/adio.h
---- romio-orig/adio/include/adio.h	2006-06-09 17:45:04.000000000 -0400
-+++ romio/adio/include/adio.h	2006-09-06 17:44:16.000614058 -0400
-@@ -302,6 +302,7 @@
- #define ADIO_PVFS2               160   /* PVFS2: 2nd generation PVFS */
- #define ADIO_PANFS               161   /* Panasas FS */
- #define ADIO_GRIDFTP             162   /* Globus GridFTP */
-+#define ADIO_LUSTRE              163   /* Lustre */
- 
- #define ADIO_SEEK_SET            SEEK_SET
- #define ADIO_SEEK_CUR            SEEK_CUR
-diff -ruN romio-orig/adio/include/adioi_fs_proto.h romio/adio/include/adioi_fs_proto.h
---- romio-orig/adio/include/adioi_fs_proto.h	2005-06-08 17:16:39.000000000 -0400
-+++ romio/adio/include/adioi_fs_proto.h	2006-09-06 17:48:11.000523566 -0400
-@@ -49,6 +49,68 @@
- /* prototypes are in adio/ad_sfs/ad_sfs.h */
- #endif
- 
-+#ifdef ROMIO_LUSTRE
-+extern struct ADIOI_Fns_struct ADIO_LUSTRE_operations;
-+
-+void ADIOI_LUSTRE_Open(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_Close(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_ReadContig(ADIO_File fd, void *buf, int count,
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                     ADIO_Offset offset, ADIO_Status *status, int
-+		     *error_code);
-+void ADIOI_LUSTRE_WriteContig(ADIO_File fd, void *buf, int count,
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Status *status, int
-+		      *error_code);
-+void ADIOI_LUSTRE_IwriteContig(ADIO_File fd, void *buf, int count,
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Request *request, int
-+		      *error_code);
-+void ADIOI_LUSTRE_IreadContig(ADIO_File fd, void *buf, int count,
-+                      MPI_Datatype datatype, int file_ptr_type,
-+                      ADIO_Offset offset, ADIO_Request *request, int
-+		      *error_code);
-+int ADIOI_LUSTRE_ReadDone(ADIO_Request *request, ADIO_Status *status, int
-+		       *error_code);
-+int ADIOI_LUSTRE_WriteDone(ADIO_Request *request, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadComplete(ADIO_Request *request, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_WriteComplete(ADIO_Request *request, ADIO_Status *status,
-+			int *error_code);
-+void ADIOI_LUSTRE_Fcntl(ADIO_File fd, int flag, ADIO_Fcntl_t *fcntl_struct, int
-+		*error_code);
-+void ADIOI_LUSTRE_WriteStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_WriteStridedColl(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_ReadStridedColl(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Status *status, int
-+		       *error_code);
-+void ADIOI_LUSTRE_IreadStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Request *request, int
-+		       *error_code);
-+void ADIOI_LUSTRE_IwriteStrided(ADIO_File fd, void *buf, int count,
-+		       MPI_Datatype datatype, int file_ptr_type,
-+		       ADIO_Offset offset, ADIO_Request *request, int
-+		       *error_code);
-+void ADIOI_LUSTRE_Flush(ADIO_File fd, int *error_code);
-+void ADIOI_LUSTRE_Resize(ADIO_File fd, ADIO_Offset size, int *error_code);
-+ADIO_Offset ADIOI_LUSTRE_SeekIndividual(ADIO_File fd, ADIO_Offset offset,
-+                       int whence, int *error_code);
-+void ADIOI_LUSTRE_SetInfo(ADIO_File fd, MPI_Info users_info, int *error_code);
-+#endif
-+
- #ifdef ROMIO_NTFS
- extern struct ADIOI_Fns_struct ADIO_NTFS_operations;
- /* prototypes are in adio/ad_ntfs/ad_ntfs.h */
-diff -ruN romio-orig/adio/include/mpio_error.h romio/adio/include/mpio_error.h
---- romio-orig/adio/include/mpio_error.h	2005-05-23 19:27:50.000000000 -0400
-+++ romio/adio/include/mpio_error.h	2006-09-06 17:10:35.000984078 -0400
-@@ -63,6 +63,7 @@
- #define MPIR_ERR_FILETYPE 33 
- #define MPIR_ERR_NO_NTFS 35
- #define MPIR_ERR_NO_TESTFS 36
-+#define MPIR_ERR_NO_LUSTRE 37
- 
- /* MPI_ERR_COMM */
- #ifndef MPIR_ERR_COMM_NULL
-diff -ruN romio-orig/adio/include/romioconf.h.in romio/adio/include/romioconf.h.in
---- romio-orig/adio/include/romioconf.h.in	2006-08-11 09:48:44.000000000 -0400
-+++ romio/adio/include/romioconf.h.in	2006-09-06 17:43:08.000599274 -0400
-@@ -276,6 +276,9 @@
- /* Define for ROMIO with PVFS2 */
- #undef ROMIO_PVFS2
- 
-+/* Define for ROMIO with LUSTRE */
-+#undef ROMIO_LUSTRE
-+
- /* Define if int64_t must be defined for PVFS */
- #undef ROMIO_PVFS_NEEDS_INT64_DEFINITION
- 
-diff -ruN romio-orig/configure romio/configure
---- romio-orig/configure	2006-08-11 09:48:45.000000000 -0400
-+++ romio/configure	2006-09-06 17:20:57.000555513 -0400
-@@ -1400,7 +1400,7 @@
- #
- have_aio=no
- #
--known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"
-+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre"
- known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
- #
- # Defaults
-@@ -7490,6 +7490,14 @@
- 
- fi
- 
-+if test -n "$file_system_lustre"; then
-+
-+cat >>confdefs.h <<\_ACEOF
-+#define ROMIO_LUSTRE 1
-+_ACEOF
-+
-+fi
-+
- #
- # Check for presence and characteristics of async. I/O calls if
- # not disabled.
-@@ -11977,7 +11985,7 @@
- # are active will be called by the top level ROMIO make
-           ac_config_commands="$ac_config_commands default-1"
- 
--                                                                                                                                                                                                                                                                                                                                          ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile"
-+                                                                                                                                                                                                                                                                                                                                          ac_config_files="$ac_config_files Makefile localdefs mpi-io/Makefile mpi2-other/info/Makefile mpi2-other/array/Makefile adio/common/Makefile test/Makefile test/misc.c test/large_file.c test/runtests util/romioinstall include/mpio.h include/mpiof.h adio/ad_nfs/Makefile adio/ad_ufs/Makefile adio/ad_panfs/Makefile adio/ad_xfs/Makefile adio/ad_sfs/Makefile adio/ad_pfs/Makefile adio/ad_testfs/Makefile adio/ad_pvfs/Makefile adio/ad_pvfs2/Makefile adio/ad_gridftp/Makefile adio/ad_lustre/Makefile mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile mpi2-other/array/fortran/Makefile test/fmisc.f test/fcoll_test.f test/pfcoll_test.f test/fperf.f mpi-io/glue/mpich2/Makefile mpi-io/glue/mpich1/Makefile mpi-io/glue/default/Makefile"
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
- # tests run on this system so they can be shared between configure
-@@ -12535,6 +12543,7 @@
-   "adio/ad_pvfs/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs/Makefile" ;;
-   "adio/ad_pvfs2/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_pvfs2/Makefile" ;;
-   "adio/ad_gridftp/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_gridftp/Makefile" ;;
-+  "adio/ad_lustre/Makefile" ) CONFIG_FILES="$CONFIG_FILES adio/ad_lustre/Makefile" ;;
-   "mpi-io/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi-io/fortran/Makefile" ;;
-   "mpi2-other/info/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/info/fortran/Makefile" ;;
-   "mpi2-other/array/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mpi2-other/array/fortran/Makefile" ;;
-diff -ruN romio-orig/configure.in romio/configure.in
---- romio-orig/configure.in	2006-07-24 17:55:57.000000000 -0400
-+++ romio/configure.in	2006-09-06 17:16:13.000525117 -0400
-@@ -93,7 +93,7 @@
- #
- have_aio=no
- #
--known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp"
-+known_filesystems="nfs ufs pfs pvfs pvfs2 testfs xfs panfs gridftp lustre"
- known_mpi_impls="mpich2_mpi mpich_mpi sgi_mpi hp_mpi cray_mpi lam_mpi"
- #
- # Defaults
-@@ -1062,6 +1062,9 @@
- if test -n "$file_system_testfs"; then
-     AC_DEFINE(ROMIO_TESTFS,1,[Define for ROMIO with TESTFS])
- fi
-+if test -n "$file_system_lustre"; then
-+    AC_DEFINE(ROMIO_LUSTRE,1,[Define for ROMIO with LUSTRE])
-+fi
- 
- if test -n "$file_system_xfs"; then
-     AC_DEFINE(ROMIO_XFS,1,[Define for ROMIO with XFS])
-@@ -2024,6 +2027,7 @@
- 		   adio/ad_testfs/Makefile adio/ad_pvfs/Makefile \
- 		   adio/ad_pvfs2/Makefile \
- 		   adio/ad_gridftp/Makefile \
-+  		   adio/ad_lustre/Makefile \
-                    mpi-io/fortran/Makefile mpi2-other/info/fortran/Makefile \
-                    mpi2-other/array/fortran/Makefile test/fmisc.f \
-                    test/fcoll_test.f test/pfcoll_test.f test/fperf.f \
-diff -ruN romio-orig/Makefile.in romio/Makefile.in
---- romio-orig/Makefile.in	2005-05-24 18:53:11.000000000 -0400
-+++ romio/Makefile.in	2006-09-06 17:13:25.000393429 -0400
-@@ -14,7 +14,7 @@
- MPIO_DIRS   = mpi-io
- EXTRA_SRC_DIRS = @EXTRA_SRC_DIRS@
- FILE_SYS_DIRS = @FILE_SYS_DIRS@
--ALL_DIRS    = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp test
-+ALL_DIRS    = mpi-io mpi-io/fortran mpi2-other/info mpi2-other/info/fortran mpi2-other/array mpi2-other/array/fortran adio/common adio/ad_pfs adio/ad_piofs adio/ad_nfs adio/ad_ufs adio/ad_xfs adio/ad_hfs adio/ad_sfs adio/ad_testfs adio/ad_pvfs adio/ad_pvfs2 adio/ad_panfs adio/ad_gridftp adio/ad_lustre test
- SHELL       = /bin/sh
- 
- @VPATH@
diff --git a/lustre/cvstest b/lustre/cvstest
deleted file mode 100644
index 10e63100ffbaf3f16c40dfb8172971de6af2e56a..0000000000000000000000000000000000000000
--- a/lustre/cvstest
+++ /dev/null
@@ -1,9 +0,0 @@
-Adding more
-
-
-$test 5
-
-More testing
-ddtest
-Fri Jan  4 14:34:14 MST 2008
-Fri Jan  4 14:41:16 MST 2008
diff --git a/lustre/doc/.cvsignore b/lustre/doc/.cvsignore
deleted file mode 100644
index fdf16421c6bca2528d929a6e4e8049f8b6a21023..0000000000000000000000000000000000000000
--- a/lustre/doc/.cvsignore
+++ /dev/null
@@ -1,23 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-Makefile.in
-.deps
-tags
-TAGS
-OBD-HOWTO.html
-OBD-HOWTO.txt
-lustre-HOWTO.lyx
-lustre-HOWTO.txt
-lustre-pdf.bbl
-lustre-pdf.blg
-lustre-pdf.log
-lustre-pdf.out
-lustre-pdf.toc
-*.eps
-lustre.lyx
-*.tex
-*.pdf
-*.aux
diff --git a/lustre/doc/Makefile.am b/lustre/doc/Makefile.am
deleted file mode 100644
index 549e740cf419491798d772d4e79263e2876ece08..0000000000000000000000000000000000000000
--- a/lustre/doc/Makefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-# Copyright (C) 2001, 2002 Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-LYX2PDF = GS_OPTIONS=-dCompatibilityLevel=1.1 $(srcdir)/tex2pdf -overwrite
-TEX2PDF = GS_OPTIONS=-dCompatibilityLevel=1.1 $(srcdir)/tex2pdf -overwrite
-LYX2PS = lyx --export ps
-LYX2TEX = lyx --export latex
-LYX2TXT = lyx --export text
-LYX2HTML = lyx --export html
-LATEX = latex
-DVIPS = dvips
-PS2PDF = ps2pdf
-TEXEXPAND = texexpand
-SUFFIXES = .lin .lyx .pdf .ps .sgml .html .txt .tex .fig .eps .dvi
-
-MANFILES = lustre.7 lfs.1 mount.lustre.8 mkfs.lustre.8 tunefs.lustre.8 lctl.8 \
-	llverdev.8 llbackup.8
-if UTILS
-man_MANS = $(MANFILES)
-endif
-
-LYXFILES= $(filter-out $(patsubst %.lin,%.lyx,$(wildcard *.lin)),\
-	$(wildcard *.lin *.lyx))
-
-CLEANFILES = *.aux *.tex *.log *.pdf
-
-EXTRA_DIST = tex2pdf $(MANFILES) $(LYXFILES)
-
-all:
-
-# These variables are set by lbuild/check-build.
-RPMRELEASE ?= RELEASE
-KERNTYPE ?= chaos
-KERNRPM ?= kernel-2.4.18lustre13-RELEASE.i386.rpm
-
-.lyx.pdf:
-	@echo $(LYX2PDF) $< && $(LYX2PDF) $< || printf "\n*** Warning: not creating PDF docs; install lyx to rectify this\n"
-
-.lyx.ps:
-	@echo $(LYX2PS) $< && $(LYX2PS) $< || printf "\n*** Warning: not creating PostScript docs; install lyx to rectify this\n"
-
-.lyx.tex:
-	@echo $(LYX2TEX) $< && $(LYX2TEX) $< || printf "\n*** Warning: not creating LaTeX docs; install lyx to rectify this\n"
-
-.lyx.txt:
-	@echo $(LYX2TXT) $< && $(LYX2TXT) $< || printf "\n*** Warning: not creating text docs; install lyx to rectify this\n"
-
-.lyx.html:
-	@echo $(LYX2HTML) $< && $(LYX2HTML) $< || printf "\n*** Warning: not creating HTML docs; install lyx to rectify this\n"
-
-.tex.pdf:
-	$(TEX2PDF) $<
-
-.tex.dvi:
-	$(LATEX) $<
-	$(LATEX) $<
-
-.dvi.ps:
-	$(DVIPS) $< -o $@
-
-.ps.pdf:
-	$(PS2PDF) $< $@
diff --git a/lustre/doc/VERSIONING b/lustre/doc/VERSIONING
deleted file mode 100644
index a719103ea5170a9c573f4d3683ee8f4dc977c784..0000000000000000000000000000000000000000
--- a/lustre/doc/VERSIONING
+++ /dev/null
@@ -1,90 +0,0 @@
-Lustre versioning
-=================
-
-0.0.1  2/19/2002 <braam@clusterfs.com>
-0.0.2  3/14/2002 <braam@clusterfs.com> describe branches / stable tag
-0.0.3  6/10/2002 <braam@clusterfs.com> describe release mechanisms
-
-This document describes versioning of source and binaries for Lustre.
-
-Packages
-========
-
-RPM's that you build should get 3 figure versions, CVS versions will
-be 4 digits, and can correspond to test RPM's, and lead up to the
-package version.  So let's plan on releasing
-
-So you'd build 2 sets of test rpms this week:
-
-1.6.8.91
-1.6.8.92
-
-we decide it's fine then and we release:
-
-1.6.9
-
-If there are critical hotfixes that need to be released to customers
-(e.g. data corruption fixes) then point releases would be created:
-
-1.6.9.{1,2,3,...}
-
-We go on developing with
-
-1.6.9.{91,92,93,94,...}
-
-as test releases and then we release:
-
-1.6.10
-
-The 1.7 sequence would be an unstable sequence, like 2.5 for the kernel
-is.  So we expect lots of 1.7.X releases leading up to a stable 1.8 (or
-2.0) at the time of deployment.
-
-CVS
-===
-
-Versions will have 4 digits:
-                     major.minor.patch.test
-
-Such versions will be tagged in CVS as:
-                     v1_6_9_97
-and referred to as:
-                     1.6.9.97
-encoded as:
-                     0x01060961
-
-Usage:
-------
-
-New numbers are used as follows:
-
-1. major:
- - increased when major new functionality becomes available
-2. minor:
- - even: for each new release with new functionality
- - odd : when a new development cycle starts after a release
-3. patch:
- - when a development snapshot or release update becomes available
- - all these are announced on lustre-{announce,devel}@clusterfs.com
-4. test:
- - when developers feel it is time to exchange a named version
-
-What will run, what won't ?
----------------------------
-
-1. If the test level is non-zero, i.e. there are 4 digits in the
-   version, no guarantees of any kind are made.
-
-2. For three digit releases/tags the code should perform
-   according to the announcement.
-
-Branches
---------
-
-Any and all development must be done on branches, and can only merge to the
-HEAD if _at_least_ tests/acceptance-small.sh and IOR with 5 SMP nodes and
-2 clients/node with 1GB file/client pass without any errors or cleanup
-problems.  Additional tests may be added in the future, so the tests in the
-current CVS head must pass before a branch can be merged back to the trunk.
-
-See http://lustre.org/docs/branches.html for details on CVS branch usage.
diff --git a/lustre/doc/chbar.sh b/lustre/doc/chbar.sh
deleted file mode 100755
index 782524142eedc4a95d755ad3d522a8a35978c0d3..0000000000000000000000000000000000000000
--- a/lustre/doc/chbar.sh
+++ /dev/null
@@ -1,243 +0,0 @@
-#!/bin/sh
-#	Gadget to take two LaTeX files and produce a third which
-#	has changebars highlighting the difference between them.
-#
-# Version 1.2
-# Author:
-#	Don Ward, Careful Computing (don@careful.co.uk)
-# v1.0	April 1989
-# v1.1  Feb 93	Amended to use changebar.sty (v3.0) and dvips
-# v1.2  Aug 95  Added support for LaTeX209/LaTeX2e
-#		Added RCS support to retrive old files
-
-CMD=`basename $0`
-
-SED=sed
-RM="rm -f"
-DIFF=diff
-ED=ed
-AWK=awk
-GREP=grep
-MV=mv
-CAT=cat
-MKDIR=mkdir
-CO="co"
-
-TMPDIR=${TMP-/tmp}/$CMD.$$
-trap 'test $DEBUG = NO && rm -rf $TMPDIR' 0 1 2 3 6 7 13 15
-mkdir $TMPDIR || { echo "cannot create directory \`$TMPDIR'." >&2; exit 1; }
-TMPFILE=${TMPDIR}/$CMD.$$
-SED_CMD_FILE=$TMPFILE.sed
-
-usage()
-{
-$CAT << _END_
-Usage:
-  $CMD [-hgG] [-d dir] old new [output]
-	default output is stdout
-
-  $CMD [-hgG] [-d dir] old
-	new file on stdin, output on stdout
-
-  $CMD [-hgG] -d dir -r rev files
-	old file retrieved using RCS
-
-  Gadget to take two LaTeX files and produce a third which
-  has changebars highlighting the difference between them.
-  Changebars are inserted for differences after '\begin{document}'.
-
-  Feature: \`new' can not be named \`-'.
-
-  Options are:
-  -d dir : Write the output to file  \`dir/new', if \`new' is given or
-	   to file \`dir/old'.
-	   If \`dir' does not exist, it is created.
-	   If \`output' is given, it is discarded.
-
-  -r rev : If the LaTeX \`files' are kept under control of the
-	   Revision Control System RCS, the old files of
-	   the revision \`rev' can be retrived.
-	   \`rev' is specified using the RCS conventions.
-	   This option must be used together with the \`-d dir' option.
-	   \`files' must be a nonempty list of files.
-
-  -h	 : Print this info text.
-  -g	 : Print some debugging info.
-  -G	 : Even more debug info.
-
-  Version 1.2: August 3. 1995
-_END_
-exit 1
-}
-
-# parse options and arguments
-DEBUG="NO"
-DIR=
-REV=
-# process options
-while getopts d:r:gGh i $*
-do
-  case $i in
-	d ) DIR=$OPTARG;;
-	r ) REV=$OPTARG;;
-	g ) DEBUG="YES" ;;
-	G ) set -x; DEBUG="YES";;
-	h | \
-        * ) usage ;;
-  esac
-done
-
-shift `expr $OPTIND - 1`
-
-case $# in
-  1 ) OLD=$1; NEW="-"; OUT=""   ;;
-  2 ) OLD=$1; NEW=$2;  OUT=""   ;;
-  3 ) OLD=$1; NEW=$2;  OUT="$3" ;;
-  * ) usage ;;
-esac
-
-# check correct options
-if [ ! -z "$DIR" ]
-then
-  [ -d $DIR ] || $MKDIR $DIR
-fi
-
-if [ ! -z "$REV" ]
-then
-  [ -z "$DIR" ] && usage
-  FILES=$*
-else
-  FILES=$NEW
-fi
-
-# do the work
-for NEW in $FILES
-do
-  if [ ! -z "$DIR" ]
-  then
-    if [ $NEW = "-" ]
-    then
-      OUT=$DIR/$OLD
-    else
-      OUT=$DIR/$NEW
-    fi
-  fi
-  if [ ! -z "$REV" ]
-  then
-    OLD=${TMPFILE}.old
-    $CO -p"$REV" -q $NEW > $OLD
-  fi
-
-  [ $DEBUG = "YES" ] && echo "OLD=\`$OLD' NEW=\`$NEW' OUT=\`$OUT'"
-
-  # gather some info about the file
-  # Since we have for sure only the name of the OLD file, ...
-  $GREP "^\\\\begin{document}" $OLD > /dev/null
-  if [ $? -eq 0 ]
-  then
-    [ $DEBUG = "YES" ] && echo "contains a \\begin{document}"
-    HAS_BEGIN_DOC="YES"
-  else
-    [ $DEBUG = "YES" ] && echo "contains no \\begin{document}"
-    HAS_BEGIN_DOC="NO"
-  fi
-
-  # Method to do the work:
-  # 1	Use diff to get an ed script to go from file1 to file2.
-  # 2	Breath on it a bit (with sed) to insert changebar commands.
-  # 3	Apply modified ed script to produce (nearly) the output.
-  # 4	Use awk to insert the changebars option into the \documentstyle
-  #	and to handle changebar commands inside verbatim environments.
-  # 5     Remove changebars before \begin{document} with sed
-
-  #	SED commands to edit ED commands to edit old file
-  $CAT > $SED_CMD_FILE <<\_END_
-/^\.$/i\
-\\cbend{}%
-/^[0-9][0-9]*[ac]$/a\
-\\cbstart{}%
-/^[0-9][0-9]*,[0-9][0-9]*[ac]$/a\
-\\cbstart{}%
-/^[0-9][0-9]*d$/a\
-i\
-\\cbdelete{}%\
-.
-/^[0-9][0-9]*,[0-9][0-9]*d$/a\
-i\
-\\cbdelete{}%\
-.
-_END_
-
-  # note DIFF accepts `-' as stdin
-  $DIFF -b -e $OLD $NEW | \
-	( $SED -f $SED_CMD_FILE ; echo w ${TMPFILE}.1 ; echo q ) | \
-	$ED - $OLD
-
-  #	AWK commands to insert Changebars style and to protect
-  #	changebar commands in verbatim environments
-  #       and to tell what driver is in use; we assume the `dvips' driver
-
-  $AWK '
-  BEGIN {kind=""; # we saw now \documentXXX[]{}
-  }
-  /^\\documentstyle/{
-    kind = "209";
-    if (index($0, "changebar") == 0 ) {
-      opts = index($0, "[")
-      if (opts > 0)
-	printf "%schangebar,%s\n",substr($0,1,opts),substr($0,opts+1)
-      else
-	printf "\\documentstyle[changebar]%s\n", substr($0,15)
-      next
-    }
-  }
-  /^\\documentclass/{
-    kind = "2e";
-    printf "%s\n", $0
-    printf "\\usepackage[dvips]{changebar}\n"
-    next
-  }
-  /\\begin{document}/ {if (kind == "209" ) {print "\\driver{dvips}"}}
-  /\\begin{verbatim}/{++nesting}
-  /\\end{verbatim}/{--nesting}
-  /\\cbstart{}%|\\cbend{}%|\cbdelete{}%/ {
-    if ( nesting > 0) {
-  #	changebar command in a verbatim environment: Temporarily exit,
-  #	do the changebar command and reenter.
-  #
-  #	The obvious ( printf "\\end{verbatim}%s\\begin{verbatim} , $0 )
-  #	leaves too much vertical space around the changed line(s).
-  #	The following magic seeems to work
-  #
-	print  "\\end{verbatim}\\nointerlineskip"
-	print  "\\vskip -\\ht\\strutbox\\vskip -\\ht\\strutbox"
-	printf "\\vbox to 0pt{\\vskip \\ht\\strutbox%s\\vss}\n", $0
-	print  "\\begin{verbatim}"
-	next
-	}
-  }
-  { print $0 }
-  '  ${TMPFILE}.1 > ${TMPFILE}.2
-
-  # if a \begin{document} is contained in the file,
-  # remove the changebar commands before them
-
-  if [ $HAS_BEGIN_DOC = "YES" ]
-  then
-    SED_CMD="1,/\\\\begin{document}/s/\(\\\\cb[sed][tne][adl][^{}]*{}%\)$/%%\1/"
-    $SED "$SED_CMD" ${TMPFILE}.2 > ${TMPFILE}.3
-  else
-    $CAT ${TMPFILE}.2 > ${TMPFILE}.3
-  fi
-  if [ -z "$OUT" ]
-  then
-    $CAT ${TMPFILE}.3
- else
-    $MV ${TMPFILE}.3 $OUT
-  fi
-
-done
-
-[ $DEBUG =  "NO" ] && $RM ${TMPFILE}.*
-
-###############################################################
diff --git a/lustre/doc/lctl.8 b/lustre/doc/lctl.8
deleted file mode 100644
index 92438634ff4b766e3b400fa99cc59178800435be..0000000000000000000000000000000000000000
--- a/lustre/doc/lctl.8
+++ /dev/null
@@ -1,190 +0,0 @@
-.TH lctl 1 "2003 Oct 8" Lustre "configuration utilities"
-.SH NAME
-lctl \- Low level Lustre filesystem configuration utility
-.SH SYNOPSIS
-.br
-.B lctl
-.br
-.B lctl --device <devno> <command [args]>
-.br
-.SH DESCRIPTION
-.B lctl
-is used to directly control Lustre via an ioctl interface, allowing
-various configuration, maintenance, and debugging features to be accessed.
- 
-.B lctl
-can be invoked in interactive mode by issuing lctl command. After that, commands are issued as below. The most common commands in lctl are
-.B dl
-,
-.B device 
-,
-.B network 
-.I <up/down>
-,
-.B list_nids
-,
-.B ping
-.I nid
-,
-.B help
-,
-.B quit.
-
-To get a complete listing of available commands, type
-.B help
-at the lctl prompt.  To get basic help on the meaning and syntax of a
-command, type 
-.B help 
-.I command
-.  Command completion is activated with the TAB key, and command history is available via the up- and down-arrow keys. 
-
-For non-interactive use, one uses the second invocation, which runs command after connecting to the device. 
-
-.SS Network Configuration
-.TP
-.BI network " <up/down>|<tcp/elan/myrinet>"
-Start or stop LNET, or select a network type for other
-.I lctl
-LNET commands
-.TP
-.BI list_nids
-Print all Network Identifiers on the local node. LNET must be running.
-.TP
-.BI which_nid " <nidlist>"
-From a list of nids for a remote node, show which interface communication
-will take place on.
-.TP
-.BI ping " <nid> "
-Check LNET connectivity via an LNET ping. This will use the fabric
-appropriate to the specified NID.
-.TP
-.BI interface_list 
-Print the network interface information for a given 
-.B network
-type.
-.TP
-.BI peer_list 
-Print the known peers for a given 
-.B network
-type.
-.TP
-.BI conn_list 
-Print all the connected remote NIDs for a given
-.B network
-type.
-.TP
-.BI active_tx 
-This command should print active transmits, and it is only used for elan network type.
-.TP 
-.BI route_list 
-Print the complete routing table.
-.PP
-.SS Device Selection
-.TP 
-.BI device " <devname> " 
-This will select the specified OBD device.  All other commands depend on the device being set. 
-.TP 
-.BI device_list 
-Show all the local Lustre OBDs. AKA 
-.B dl
-.PP
-.SS Device Operations
-.TP 
-.BI conf_param " <device> <parameter>"
-Set a permanent configuration parameter for any device via the MGS.  This
-command must be run on the MGS node. 
-.TP 
-.BI activate 
-Reactivate an import after deactivating, below.
-.TP 
-.BI deactivate 
-Deactivate an import, in particular meaning do not assign new file stripes
-to an OSC.  This command should be used on the OSC in the MDT LOV
-corresponding to a failed OST device, to prevent further attempts at
-communication with the failed OST.
-.TP 
-.BI abort_recovery 
-Abort the recovery process on a restarting MDT or OST device
-.PP
-.SS Virtual Block Device Operation
-Lustre is able to emulate a virtual block device upon regular file. It is necessary to be used when you are trying to setup a swap space via file.
-.TP
-.BI blockdev_attach " <file name> <device node>"
-Attach the lustre regular file to a block device. If the device node is not existent, lctl will create it \- it is recommended to create it by lctl since the emulator uses a dynamical major number.
-.TP
-.BI blockdev_detach " <device node>"
-Detach the virtual block device.
-.TP
-.BI blockdev_info " <device node>"
-Acquire which lustre file was attached to the device node.
-.PP
-.SS Debug
-.TP 
-.BI debug_daemon 
-Start and stop the debug daemon, and control the output filename and size.
-.TP 
-.BI debug_kernel " [file] [raw]" 
-Dump the kernel debug buffer to stdout or file.
-.TP 
-.BI debug_file " <input> [output]"
-Convert kernel-dumped debug log from binary to plain text format.
-.TP 
-.BI clear 
-Clear the kernel debug buffer.
-.TP 
-.BI mark " <text>" 
-Insert marker text in the kernel debug buffer.
-.TP 
-.BI filter " <subsystem id/debug mask>" 
-Filter kernel debug messages by subsystem or mask.
-.TP 
-.BI show " <subsystem id/debug mask>" 
-Show specific type of messages.
-.TP 
-.BI debug_list " <subs/types>" 
-List all the subsystem and debug types.
-.TP
-.BI modules " <path>" 
-Provide gdb-friendly module information.
-
-.SH OPTIONS
-The following options can be used to invoke lctl. 
-.TP
-.B --device 
-The device to be used for the operation. This can be specified by name or
-number. See 
-.B device_list
-.TP
-.B --ignore_errors | ignore_errors 
-Ignore errors during script processing
-.TP
-.SH EXAMPLES
-# lctl
-.br
-lctl > dl
-  0 UP mgc MGC192.168.0.20@tcp bfbb24e3-7deb-2ffa-eab0-44dffe00f692 5
-  1 UP ost OSS OSS_uuid 3
-  2 UP obdfilter testfs-OST0000 testfs-OST0000_UUID 3
-.br
-lctl > dk /tmp/log
-Debug log: 87 lines, 87 kept, 0 dropped.
-.br
-lctl > quit
-.PP
-# lctl conf_param testfs-MDT0000 sys.timeout=40
-
-.SH BUGS
-Please report all bugs to ClusterFileSystems, support@clusterfs.com
-.SH AVAILABILITY
-.B lctl
-is part of the 
-.BR Lustre (7) 
-filesystem package and is available from CFS
-.br
-http://clusterfs.com
-.SH SEE ALSO
-.BR Lustre (7),
-.BR mkfs.lustre (8),
-.BR mount.lustre (8),
-.BR lctl (8),
-.BR lfs (1)
diff --git a/lustre/doc/lfs.1 b/lustre/doc/lfs.1
deleted file mode 100644
index 7f241096388ed069d0960b3df779cfcbac306202..0000000000000000000000000000000000000000
--- a/lustre/doc/lfs.1
+++ /dev/null
@@ -1,165 +0,0 @@
-.TH lfs 1 "2008 Mar 15" Lustre "user utilities"
-.SH NAME
-lfs \- Lustre utility to create a file with specific striping pattern, find the striping pattern of exiting files
-.SH SYNOPSIS
-.br
-.B lfs
-.br
-.B lfs check <mds|osts|servers>
-.br
-.B lfs df [-i] [-h] [path]
-.br
-.B lfs find [[!] --atime|-A [-+]N] [[!] --mtime|-M [-+]N]
-        \fB[[!] --ctime|-C [-+]N] [--maxdepth|-D N] [--name|-n pattern]
-        \fB[--print|-p] \fB[--print0|-P] [--obd|-O <uuid>]
-        \fB[[!] --size|-S [-+]N[kMGTPE]] [--type |-t {bcdflpsD}]
-        \fB<dirname|filename>\fR
-.br
-.B lfs getstripe [--obd|-O <uuid>] [--quiet|-q] [--verbose|-v] 
-              \fB[--recursive|-r] <dirname|filename>\fR
-.br
-.B lfs setstripe [--size|-s stripe-size] [--count|-c stripe-cnt]
-              \fB[--index|-i start-ost] <filename|dirname>\fR
-.br
-.B lfs setstripe -d <dirname>
-.br
-.B lfs quotachown [-i] <filesystem>
-.br
-.B lfs quotacheck [-ug] <filesystem>
-.br
-.B lfs quotaon [-ugf] <filesystem>
-.br
-.B lfs quotaoff [-ug] <filesystem>
-.br
-.B lfs quotainv [-ug] <filesystem>
-.br
-.B lfs setquota [-u|-g] <username|groupname> <block-softlimit>
-             \fB<block-hardlimit> <inode-softlimit> <inode-hardlimit>
-             \fB<filesystem>\fR
-.br
-.B lfs setquota -t [-u|-g] <block-grace> <inode-grace> <filesystem>
-.br
-.B lfs quota [-o obd_uuid] [-u|-g] <username|groupname> <filesystem>
-.br
-.B lfs quota -t [-u|-g] <filesystem>
-.br
-.B lfs help
-.SH DESCRIPTION
-.B lfs
-can be used to create a new file with a specific striping pattern, determine the default striping pattern, gather the extended attributes (object numbers and location) for a specific file. It can be invoked interactively without any arguments or in a non-interactive mode with one of the arguements supported. 
-.SH OPTIONS
-The various options supported by lctl are listed and explained below:
-.TP
-.B check 
-Display the status of MDS or OSTs (as specified in the command) or all the servers (MDS and OSTs)
-.TP
-.B df
-Report filesystem disk space usage or inodes usage of each MDT/OST.
-.TP
-.B find 
-To search the directory tree rooted at the given dir/file name for the files that match the given parameters: \fB--atime\fR (file was last accessed N*24 hours ago), \fB--ctime\fR (file's status was last changed N*24 hours ago), \fB--mtime\fR (file's data was last modified N*24 hours ago), \fB--obd\fR (file has an object on a specific OST), \fB--size\fR (file has size in bytes, or \fBk\fRilo-, \fBM\fRega-, \fBG\fRiga-, \fBT\fRera-, \fBP\fReta-, or \fBE\fRxabytes if a suffix is given), \fB--type\fR (file has the type: \fBb\fRlock, \fBc\fRharacter, \fBd\fRirectory, \fBp\fRipe, \fBf\fRile, sym\fBl\fRink, \fBs\fRocket, or \fBD\fRoor (Solaris)). The option \fB--maxdepth\fR allows find to decend at most N levels of directory tree. The options \fB--print\fR and \fB--print0\fR print full file name, followed by a newline or NUL character correspondingly.  Using \fB!\fR before an option negates its meaning (\fIfiles NOT matching the parameter\fR).  Using \fB+\fR before a numeric value means \fIfiles with the parameter OR MORE\fR, while \fB-\fR before a numeric value means \fIfiles with the parameter OR LESS\fR.
-.TP
-.B getstripe
-To list the striping info for a given filename or files in a directory, optionally recursively, for all files in a directory tree: \fB--quiet\fR (don't print object IDs), \fB--verbose\fR (print striping parameters), \fB--recursive\fR (recurse into subdirectories).
-.TP
-.B osts 
-List all the OSTs for the filesystem
-.TP
-.B setstripe 
-To create a new file with a specific striping pattern
-.TP
-.B quotachown
-To change files' owner and group on OSTs of the specified filesystem
-.TP
-.B quotacheck [-ugf] <filesystem>
-To scan the specified filesystem for disk usage, and create or update quota files. Options specify quota for users (-u) groups (-g) and force (-f)
-.TP
-.B quotaon [-ugf] <filesystem>
-To turn filesystem quotas on. Options specify quota for users (-u) groups (-g) and force (-f)
-.TP
-.B quotaoff [-ugf] <filesystem>
-To turn filesystem quotas off.  Options specify quota for users (-u) groups (-g) and force (-f)
-.TP
-.B quotainv [-ug] <filesystem>
-Clear quota files, all of their quota entries, for (-u) users or (-g) groups; after quotainv one must use quotacheck before using quotas. USE THIS COMMAND WITH EXTREME CARE, ITS RESULTS CANNOT BE UNDONE.
-.TP
-.B setquota  [-u|-g] <name> <block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> <filesystem>
-To set filesystem quotas for users or groups. Limits are specific as blocks and inodes, see EXAMPLES
-.TP
-.B setquota -t [-u|-g] <block-grace> <inode-grace> <filesystem>
-To set filesystem quota grace times for users or groups. Grace time is specified in "XXwXXdXXhXXmXXs" format or as an integer seconds value, see EXAMPLES
-.TP
-.B quota [-o obd_uuid] [-u|-g] <username|groupname> <filesystem>
-To display disk usage and limits, either for the full filesystem, or for objects on a specific obd. A user or group name must be specified.
-.TP
-.B quota -t [-u|-g] <filesystem>
-To display block and inode grace times for user (-u) or group (-g) quotas
-.TP
-.B help 
-Provides brief help on the various arguments
-.TP
-.B exit/quit 
-Quit the interactive lfs session
-.SH EXAMPLES
-.TP
-.B $ lfs setstripe -s 128k -c 2 /mnt/lustre/file1
-This creats a file striped on two OSTs with 128kB on each stripe.
-.TP
-.B $ lfs setstripe -d /mnt/lustre/dir
-This deletes a default stripe pattern on dir. New files will use the default striping pattern created therein.
-.TP
-.B $ lfs getstripe -v /mnt/lustre/file1
-Lists the detailed object allocation of a given file
-.TP
-.B $ lfs find /mnt/lustre
-Efficiently lists all files in a given directory and its subdirectories
-.TP
-.B $ lfs find /mnt/lustre -mtime +30 -type f -print
-Recursively list all regular files in given directory more than 30 days old
-.TP
-.B $ lfs find --obd OST2-UUID /mnt/lustre/
-Recursively list all files in a given directory that have objects on OST2-UUID.
-.tP
-.B $ lfs check servers 
-Check the status of all servers (MDT, OST)
-.TP
-.B $ lfs osts
-List all the OSTs
-.TP
-.B $ lfs df -h 
-Lists space usage per OST and MDT in human readable format.
-.TP
-.B $ lfs df -i 
-Lists inode usage per OST and MDT
-.TP
-.B $ lfs quotachown -i /mnt/lustre
-Change file owner and group
-.TP
-.B $ lfs quotacheck -ug /mnt/lustre
-Quotacheck for user and group - will turn on quotas after making the check.
-.TP
-.B $ lfs quotaon -ug /mnt/lustre
-Turn quotas of user and group on
-.TP
-.B $ lfs quotaoff -ug /mnt/lustre
-Turn quotas of user and group off
-.TP
-.B $ lfs setquota -u bob 0 1000000 0 10000 /mnt/lustre
-Set quotas of user `bob': 1GB block quota and 10,000 file quota
-.TP
-.B $ lfs setquota -t -u 1000 1w4d /mnt/lustre
-Set grace times for user quotas: 1000 seconds for block quotas, 1 week and 4 days for inode quotas
-.TP
-.B $ lfs quota -u bob /mnt/lustre
-List quotas of user `bob'
-.TP
-.B $ lfs quota -t -u /mnt/lustre
-Show grace times for user quotas on /mnt/lustre
-.SH BUGS
-The \fBlfs find\fR command isn't as comprehensive as \fBfind\fR(1).
-Report bugs using http://bugzilla.lustre.org.
-.SH AUTHOR
-The lfs command is part of the Lustre filesystem.  Contact info@clusterfs.com.
-.SH SEE ALSO
-.BR lctl (8),
-.BR lustre (7)
diff --git a/lustre/doc/llbackup.8 b/lustre/doc/llbackup.8
deleted file mode 100644
index 62441eb493769f56a0bdfa2b74db3096ef03c638..0000000000000000000000000000000000000000
--- a/lustre/doc/llbackup.8
+++ /dev/null
@@ -1,258 +0,0 @@
-.\" -*- nroff -*-
-.\" Copyright 2008 by Sun Microsystems.  All Rights Reserved.
-.\" This file may be copied under the terms of the GNU Public License, v2.
-.\"
-.TH llbackup 8 "2008 Mar 15" Lustre "System management commands"
-.SH NAME
-llbackup \- backup a list of files, maybe running on multiple nodes
-.SH SYNOPSIS
-.B llbackup -c
-.RB [ -hjvxz "] [" -C
-.IR directory ]
-.RB [ -e
-.IR rsh ]
-.RB [ -i
-.IR inputlist ]
-.RB [ -l
-.IR logdir ]
-.RB [ -n
-.IR nodes ]
-.RB [ -s
-.IR splitmb ]
-.RB [ -S
-.IR splitcount ]
-.RB [ -T
-.IR tar ]
-.BI -f outputfilebase
-.br
-
-.B llbackup
-.RB { -x | -t }
-.RB [ -chjvz "] [" -C
-.IR directory ]
-.RB [ -e
-.IR rsh ]
-.RB [ -l
-.IR logdir ]
-.RB [ -n
-.IR nodes ]
-.RB [ -T
-.IR tar ]
-.BI -f tarfilelist
-.SH DESCRIPTION
-.B llbackup
-takes a list of files to backup or restore, either from standard input, or
-from a list of files supplied as a parameter and produces one or more archive
-files containing the files.
-.B llbackup
-uses the
-.BR tar (1)
-or
-.BR htar (1)
-programs to produce archive files, and has many of the same options (though
-not identical in some cases).  The reason for using llbackup instead of those
-programs directly is that llbackup can run in parallel on multiple
-nodes to do high-speed backups on clustered or distributed filesystems and
-will split the work among multiple client nodes to increase performance.
-.br
-
-The archive files produced by
-.B llbackup
-are identical to normal tar files (having been created by the local tar
-command) and can be extracted or listed by
-.B tar
-directly.
-.br
-
-The clients will pause and print status messages if they think there is not
-enough free space in the output directory to avoid running out of space.
-Backup tarfiles should be moved to offline storage or otherwise purged to
-allow the backups to continue.  If the client is doing a restore it will
-similarly pause and print status messages if the tarfile it was asked to
-restore is not available on that node.
-.SH OPERATIONS
-The following options control what operation
-.B llbackup
-will perform:
-.TP
-.B -c
-create archive.  This is the default operation if no other is given.
-.TP
-.B -x
-extract tarfiles from the
-.I tarfilelist
-given to
-.B -f
-instead of backing them up.
-.TP
-.B -t
-list table of contents of the
-.I tarfilelist
-given by
-.BR -f .
-.SH OPTIONS
-.TP
-.BI -C directory
-change the backup command to run in
-.I directory
-instead of the current working directory so filenames given in the input
-file are backed up or restored relative to
-.IR directory .
-Note that this affects all pathname components used during backup and restore
-so the
-.I inputlist
-and
-.I outputbase
-should be specified by absolute pathname if they are not also in
-.IR directory .
-.TP
-.BI -e rsh
-specify the passwordless remote shell command (default
-.BR ssh (1)).
-.TP
-.BI -f outputbase
-specify base output filename for backup tar archives, to which a suffix will
-be appended to ensure that multiple clients doing backup into the same
-directory do not have conflicting filenames.  The
-.I outputbase
-file can be a tape or disk device, but must be the same device on each client
-running the backup, in which case only a single process can run on each client.
-Specifying
-.B -
-means write to standard output.
-.TP
-.BI -f tarfilelist
-specify a file containing a list of tarfiles, one per line, to restore or
-list the table of contents of.  Specifying
-.B -
-means read the list of tarfiles from standard input.  The
-.I tarfilelist
-can also be a tape or disk device, but since the individual tarfiles are
-sent to individual clients, the same files must be accessible on all clients.
-.TP
-.B -h
-print this help message and exit.  Use
-.B -x
-.B -h
-or
-.B -t
-.B -h
-to get the help options for restore or list operations.
-.TP
-.BI -i inputlist
-list of files to backup when creating an archive.  If no
-.B -i
-option is specified or if
-.I inputlist
-is - then the list of files to back up is read from standard input.  The input
-file list is a list of pathnames, one file per line, as generated by
-.BR find (8),
-.BR "lfs find" (8),
-or
-.BR e2scan (8)
-for example.  For restore this option is currently unused.
-.TP
-.B -j
-use
-.BR bzip2 (1)
-compression on input or output tar file(s).  This option is not
-currently supported by the underlying
-.BR htar (8)
-implementation.
-.TP
-.BI -l logdir
-directory for output logs.
-.TP
-.BI -n nodes
-comma-separated list of client nodes to run backups.  It is possible to
-specify the same client node multiple times in order to have multiple
-instances of the backup or restore running in parallel on that node.
-This is useful to maximize the bandwidth of the backup or restore process
-and avoid client nodes underutilizing their bandwidth while generating
-file lists or compressing files.
-.TP
-.BI -s splitmb
-target size for backup chunks in megabytes (default 8192MiB).  Increasing this
-size can improve performance and compression ratios, but may cause
-underutilization of clients if the files are not evenly distributed.
-This option has no meaning for restore or list operations.
-.TP
-.BI -S splitcount
-number of files sent to each client before sending files to the next client
-(default 200).  Increasing the
-.I splitcount
-keeps more related files together in individual tar files (meaning fewer
-archives need to be processed when restoring files for a particular
-subdirectory), but can lead to performance imbalance if files vary greatly
-in size and one client has to back up many of them due to proximity of
-filenames in the input list, while other clients back up smaller files.
-Decreasing the
-.I splitcount
-means a more uniform distribution of files and usage among clients, but
-means nearly every archive will have to be extracted to get only a subset
-of files needed.
-This option has no meaning for restore or list operations.
-.TP
-.BI -T tar
-specify the backup command (default tar).  Optionally the
-.BI htar (8)
-command can be used to back up directly to an HPSS archive, if available.
-.TP
-.B -v
-be verbose - list all files being processed.  By default, individual files
-being backed up or restored are only reported in the log files because they
-would all be intermixed coming from multiple clients in parallel and the
-overall progress would be hard to determine.
-.TP
-.B -V
-print version number and exit.
-.TP
-.B -z
-use gzip compression on input or output tar file(s).  This option is not
-currently supported by the underlying
-.BR htar (8)
-implementation.
-.SH EXAMPLES
-.TP
-.B lfs find /home -mtime -7 | llbackup -c -n c1,c2 -f /bkup/bk2008-03-15
-Create a backup of the
-.B /home
-filesystem finding files modified in the last 7 days, compress the output
-using
-.B gzip
-and run on client nodes
-.B c1
-nodes, putting the output tar files into the
-.B /bkup
-directory using filenames starting with
-.BR bk2008-03-15 .
-.TP
-.B find /bkup -name bk2007-11-28* | llbackup -x -n c1,c1,c2,c2 -C /tmp -f-
-Restore
-.B gzip
-compressed files from the
-.B bk2007-11-28
-backup from the
-.B /bkup
-directory, using two restore processes on each of the client nodes
-.B c1
-and
-.BR c2 ,
-reading the list of tar files to restore from standard input and restoring
-into the
-.B /tmp
-directory.
-.SH BUGS
-It is currently not possible to extract only a subset of files from the
-tarfiles.  If that is necessary, then tar should be run directly on the
-individual tar files after checking in the backup logs which tarfiles
-have the relevant files.
-.SH SEE ALSO
-.BR lustre (7),
-.BR tar (8),
-.BR htar (8),
-.BR ssh (1),
-.BR rsh (1),
-.BR find (1),
-.BR lfs "(1) " find ,
-.BR e2scan (8).
diff --git a/lustre/doc/llverdev.8 b/lustre/doc/llverdev.8
deleted file mode 100644
index fb41540a0b6837d6c13c144cd74ea8b45620dbe5..0000000000000000000000000000000000000000
--- a/lustre/doc/llverdev.8
+++ /dev/null
@@ -1,103 +0,0 @@
-.\" -*- nroff -*-
-.\" Copyright 2006 by Cluster FileSystems.  All Rights Reserved.
-.\" Copyright 2008 by Sun Microsystems.  All Rights Reserved.
-.\" This file may be copied under the terms of the GNU Public License, v2.
-.\"
-.TH llverdev 8 "2008 Mar 15" Lustre "configuration utilities"
-.SH NAME
-llverdev - verify a block device is functioning properly over its full size
-.SH SYNOPSIS
-.BI llverdev
-.RB [ -c
-.IR chunksize ]
-.RB [ -f "] [" -h ]
-.RB [ -o
-.IR offset ]
-.RB [ -l "] [" -p "] [" -r ]
-.RB [ -t
-.IR timestamp ]
-.RB [ -v "] [" -w ]
-.I device
-.SH DESCRIPTION
-Sometimes kernel drivers or hardware devices have bugs that prevent them from
-accessing the full device size correctly, or possibly have bad sectors on disk
-or other problems which prevent proper data storage.  There are often defects
-associated with major system boundaries such as 2^32 bytes, 2^31 sectors,
-2^31 blocks, 2^32 blocks, etc.
-.PP
-The
-.B llverdev
-tool will write and verify a unique test pattern across the entire device in
-order to ensure that not only is data accessible after it was written, but
-also that data written to one part of the disk is not overwriting data on
-another part of the disk.
-.PP
-It is expected that llverdev tool will be run on large size devices (TB), 
-so it is always better to run llverdev tool in verbose mode, so that one
-can easily restart device testing from the point at which it had stopped. 
-.PP
-Running a full verification can be time consuming for very large devices,
-so it is advisable to start with a partial verification to ensure the
-device is minimally sane before investing the time in a full verification.
-.SH OPTIONS
-.TP
-.BR -c | --chunksize
-IO chunk size in bytes (default=1048576).
-.TP
-.BR -f | --force
-force test to run without confirmation that the device will be overwritten
-and all data therein will be permanently destroyed.
-.TP
-.BR -h | --help
-display a brief help message.
-.TP
-.BI -o offset
-offset in kilobytes of start of test (default=0).
-.TP
-.BR -l | --long
-Run a full check, writing and then reading and verifying every block on the
-disk.
-.TP
-.BR -p | --partial
-Run a partial check, only doing periodic checks across the device (1GB steps).
-.TP
-.BR -r | --read
-Run test in read (verify) mode only, after having run the test in
-.B -w
-mode previously.
-.TP
-.BI -t timestamp
-Set test start time as printed at the start of a previously interrupted test
-to ensure that the validation data is the same across the whole filesystem
-(default=current time())
-.TP
-.BR -v | --verbose
-Run test in verbose mode, listing each read and write operation.
-.TP
-.BR -w | --write
-Run test in write (test-pattern) mode (default run both read and write)
-.SH EXAMPLES
-.TP
-Run a partial device verification on \fB/dev/sda\fR:
-.B llverdev -v -p /dev/sda
-.br
-llverdev: permanently overwrite all data on /dev/sda (yes/no)? y
-.br
-llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
-.br
-Timestamp: 1009839028
-.br
-Current write offset:        4096 kB
-.TP
-Continue an interrupted verification at offset \fB4096\fRkB from the start of the device, using the same timestamp as the previous run:
-.B llverdev -f -v -p --offset=4096 --timestamp=1009839028 /dev/sda
-.br
-llverdev: /dev/sda is 4398046511104 bytes (4096.0 GB) in size
-.br
-Timestamp: 1009839028
-.br
-write complete
-.br
-read complete
-.SH SEE ALSO
-.BR llverfs (8)
diff --git a/lustre/doc/llverfs.txt b/lustre/doc/llverfs.txt
deleted file mode 100644
index 0321d75399e7a2d0de009157b74973fddd697abc..0000000000000000000000000000000000000000
--- a/lustre/doc/llverfs.txt
+++ /dev/null
@@ -1,48 +0,0 @@
-FILESYSTEM VERIFICATION TOOL. ( ext3vt )
-==========================================
-
-Building tool: 
-	To build this tool you just need to invoke make at command prompt.
-	e.g.  $ make 
-	
-	this will compile the sources and build ext3vt in this directory.
-
-Usage: 
-Syntax:
-
-./ext3vt [OPTION]... <filesystem path> ... 
-
-[OPTION]
-        -t {seconds} for --timestamp,  set test time(default=current time())
-        -o {fileOffset}  for --fileOffset, full path of file from which tests should start
-        -r run test in read (verify) mode
-        -w run test in write (test-pattern) mode (default=r&w)
-        -v for verbose
-        -p for --partial, for partial check (1MB files)
-        -l for --long, full check (4GB file with 4k blocks)
-        -c for --chunksize, IO chunk size (default=1048576)
-        -h display this help and exit
-        --help display this help and exit
-
-Guide lines for using this tool:
-	It is expected that ext3vt tool will be run on large size 
-filesystem (TB), So it is always better to run ext3vt tool in verbose mode, 
-So that one can easily restart device testing from the point at which it 
-had stoped. 
-for example:
-	
-	[root@Matrix ext3vt]# ./ext3vtnew -v -f -w --timestamp=1145009417 /mnt/store/
-	Timestamp: 1145009417
-	write File name: /mnt/store/dir00004/file005
-	
-If due to some reason sombody breaks execution at this point then one can 
-easily restart device from the same point by picking the same file offset 
-displayed in by verbose as explained below.
-
-	[root@tucker ext3vt]# ./bdevt -v -f -w --fileOffset=/home/dir00004/file005 
-			     --timestamp=1145009417 /mnt/store/
-	Timestamp: 1145009417
-	write File name: /mnt/store/dir00008/file007
-	write complete
-	[root@tucker ext3vt]#
-One can use similar things for read only and read write modes also.
diff --git a/lustre/doc/lustre.7 b/lustre/doc/lustre.7
deleted file mode 100644
index 682246f9920b05210c4f84c2bfca72ac87f8c6e0..0000000000000000000000000000000000000000
--- a/lustre/doc/lustre.7
+++ /dev/null
@@ -1,73 +0,0 @@
-.\" -*- nroff -*-
-.\" Copyright 2006 by Cluster FileSystems.  All Rights Reserved.
-.\" This file may be copied under the terms of the GNU Public License.
-.\"
-.TH Lustre 7 "2006 Jun 15" Lustre "A high-performance cluster file system"
-.SH NAME
-Lustre
-.SH SYNOPSIS
-A high-performance file system designed for clusters.
-.SH DESCRIPTION
-.B Lustre®
-is a high-performance, massively-scalable, POSIX-compliant network file system
-designed for the world's largest high-performance compute clusters. Lustre
-is under active development from Sun Microsystems (http://www.lustre.org).
-
-Lustre filesystems are made up of multiple services typically distributed
-across multiple nodes.  Lustre clients can contact these server nodes over
-multiple high-speed network fabrics via LNET, the Lustre NETworking
-system.  Clients then present the filesystem at a mount point to userspace.
-
-A filesystem is comprised of a 
-.I MDT
-, MetaData Target, which stores directory and file meta-information such as
-file ownership, timestamps, access permissions, etc, and a
-series of 
-.I OSTs
-, Object Storage Targets, which hold the file data in one or more objects.
-There is typically not a 1:1 mapping of OST objects and what is presented
-as a file on a Lustre client.
-
-Lustre and LNET are implemented as a series of kernel modules, for both
-servers and clients.  LNET networks are defined in the modprobe.conf file on
-all nodes.  Lustre is started on the clients and servers using the
-.BR mount (8)
-command.
-
-.SH COMMANDS
-.TP
-.BR mkfs.lustre (8)
-Format a physical disk for use as a Lustre server's backend storage (aka
-target).
-.TP
-.BR tunefs.lustre (8)
-Modify configuration information on a Lustre target disk.
-.TP
-.BR mount.lustre (8)
-A helper program for
-.BR mount (8)
-that starts Lustre servers and clients mounts the client filesystem.
-.TP
-.BR lctl (8)
-A low-level interface to control various aspects of Lustre
-.TP
-.BR lfs (1)
-A user-level interface to control Lustre-specific information for
-individual files. 
-.B lustre_config.sh
-Format multiple Lustre targets simultaneously from definitions in a CSV
-file.
-.SH BUGS
-Please report all bugs to Sun Microsystems via http://bugzilla.lustre.org/
-.SH AVAILABILITY
-.B The
-.BR Lustre (7) 
-filesystem package is available from Sun Microsystems, Inc via
-.br
-http://downloads.lustre.org/
-.SH SEE ALSO
-.BR mkfs.lustre (8),
-.BR tunefs.lustre (8),
-.BR mount.lustre (8),
-.BR lctl (8),
-.BR lfs (1)
diff --git a/lustre/doc/mkfs.lustre.8 b/lustre/doc/mkfs.lustre.8
deleted file mode 100644
index 43b98761171fa8679f339085ef875263296bf7ac..0000000000000000000000000000000000000000
--- a/lustre/doc/mkfs.lustre.8
+++ /dev/null
@@ -1,133 +0,0 @@
-.\" -*- nroff -*-
-.\" Copyright 2006 by Cluster File Systems, Inc.  All Rights Reserved.
-.\" Copyright 2008 by Sun Microsystems.  All Rights Reserved.
-.\" This file may be copied under the terms of the GNU Public License, v2.
-.\"
-.TH mkfs.lustre 8 "2008 Mar 15" Lustre "configuration utilities"
-.SH NAME
-mkfs.lustre \- format a disk for a Lustre service
-.SH SYNOPSIS
-.br
-.BR mkfs.lustre { --ost | --mdt | --mgs }
-.I [options] 
-.I device
-.br
-.B <target_type>
-is one of
-.TP
-.BI \--ost
-object storage target
-.TP
-.BI \--mdt
-metadata storage target
-.TP
-.BI \--mgs
-configuration management service - one per site.  This service can be
-combined with one 
-.BI \--mdt
-service by specifying both types
-.SH DESCRIPTION
-.B mkfs.lustre
-is used to format a disk device for use as part of a Lustre
-filesystem. After formatting, a disk can be mounted to start the Lustre
-service defined by this command.
-
-.SH OPTIONS
-.TP
-.BI \--backfstype= fstype
-Force a particular format for the backing fs (ext3, ldiskfs)
-.TP
-.BI \--comment= comment
-Set user comment about this disk, ignored by Lustre.
-.TP
-.BI \--device-size= KB
-Set device size for loop devices
-.TP
-.BI \--dryrun
-Only print what would be done; does not affect the disk
-.TP
-.BI \--failnode= nid,...  
-Set the NID(s) of a failover partner. This option can be repeated as desired.
-.TP
-.BI \--fsname= filesystem_name  
-The Lustre filesystem this service will be part of.  The maximum
-filesystem_name length is 8 characters. Default is 'lustre'
-.TP
-.BI \--index= index
-Force a particular OST or MDT index 
-.TP
-.BI \--mkfsoptions= opts
-Format options for the backing fs. For example, ext3 options could be set here.
-.TP
-.BI \--mountfsoptions= opts
-Set permanent mount options, equivalent to setting in /etc/fstab
-.TP
-.BI \--mgsnode= nid,...  
-Set the NID(s) of the MGS node, required for all targets other than the MGS.
-.TP
-.BI \--param " key=value"
-Set permanent parameter 
-.I key 
-to value 
-.IR value .
-This option can be repeated as desired.  Typical options might include:
-.RS
-.I \--param sys.timeout=40
-.RS
-System obd timeout
-.RE
-.I \--param lov.stripesize=2M
-.RS
-Default stripe size
-.RE
-.I \--param lov.stripecount=2       
-.RS
-Default stripe count
-.RE
-.I \--param failover.mode=failout    
-.RS
-Return errors instead of waiting for recovery
-.RE
-.RE
-.TP
-.BI \--quiet
-Print less information.
-.TP
-.BI \--reformat 
-Reformat an existing Lustre disk
-.TP
-.BI \--stripe-count-hint= stripes
-Used for optizing MDT inode size
-.TP
-.BI \--verbose
-Print more information.
-
-.SH EXAMPLES
-.TP
-.B mkfs.lustre --fsname=testfs --mdt --mgs /dev/sda1
-Combined MGS and MDT for filesystem 'testfs' on node e.g. cfs21
-.TP
-.B mkfs.lustre --fsname=testfs --ost --mgsnode=cfs21@tcp0 /dev/sdb
-OST for filesystem 'testfs' on any node using the above MGS.
-.TP
-.B mkfs.lustre --mgs /dev/sda1
-Standalone MGS on e.g. node cfs22
-.TP
-.B mkfs.lustre --fsname=myfs1 --mdt --mgsnode=cfs22@tcp0 /dev/sda2
-MDT for filesystem 'myfs1' on any node, using the above MGS
-
-.SH BUGS
-Please report all bugs to Sun Microsystems via http://bugzilla.lustre.org/
-.SH AVAILABILITY
-.B mkfs.lustre
-is part of the 
-.BR Lustre (7) 
-filesystem package and is available from Sun Microsystems via
-.br
-http://downloads.lustre.org/
-.SH SEE ALSO
-.BR lustre (7),
-.BR mount.lustre (8),
-.BR tunefs.lustre (8),
-.BR lctl (8),
-.BR lfs (1)
diff --git a/lustre/doc/mount.lustre.8 b/lustre/doc/mount.lustre.8
deleted file mode 100644
index ae3c8423fb2a09e467eca25feb24dc805dd8ef0a..0000000000000000000000000000000000000000
--- a/lustre/doc/mount.lustre.8
+++ /dev/null
@@ -1,134 +0,0 @@
-.\" -*- nroff -*-
-.\" Copyright 2006 by Cluster FileSystems.  All Rights Reserved.
-.\" Copyright 2008 by Sun Microsystems.  All Rights Reserved.
-.\" This file may be copied under the terms of the GNU Public License v2.
-.\"
-.TH mount.lustre 8 "2008 Mar 15" Lustre "configuration utilities"
-.SH NAME
-mount.lustre \- start a Lustre client or target service 
-.SH SYNOPSIS
-.br
-.BI "mount \-t lustre [\-o " options "] " directory
-.SH DESCRIPTION
-.B mount.lustre
-is used to start a Lustre client or target service.  This program should not be
-called directly; rather it is a helper program invoked through 
-.BR mount (8)
-as above.  Lustre clients and targets are stopped by using the 
-.BR umount (8)
-command.
-.br
-
-There are two forms for the 
-.I device
-option, depending on whether a client or a target service is started:
-.TP
-.IR <mgsspec> :/ <fsname>
-mounts the Lustre filesystem named
-.I fsname
-on the client by contacting the Management Service at 
-.IR mgsspec 
-on the pathname given by
-.IR directory .
-The format for
-.I mgsspec
-is defined below.  A mounted client filesystem appears in
-.BR fstab (5)
-and is usable like any local filesystem and provides a full
-POSIX-compilant interface.
-.TP
-.I disk_device
-starts the target service defined by the 
-.I mkfs.lustre
-command on the physical disk
-.IR disk_device .  
-A mounted target service filesystem is only useful for
-.BR df (1)
-operations and appears in
-.BR fstab (5)
-to show the device is in use.
-.SH OPTIONS
-.TP
-.BI <mgsspec>:= <mgsnode>[:<mgsnode>]
-The mgs specification may be a colon-separated list of nodes:
-.TP
-.BI <mgsnode>:= <mgsnid>[,<mgsnid>]
-each node may be specified by a comma-separated list of NIDs.
-.PP
-In addition to the standard options listed in
-.BR mount (8),
-Lustre understands the following
-.B client-specific
-options:
-.TP
-.BI flock
-Enable full flock support, coherent across all client nodes.
-.TP
-.BI localflock
-Enable local flock support, using only client-local flock (faster, for applications that require flock but do not run on multiple nodes).
-.TP
-.BI noflock
-Disable flock support entirely.  Applications calling flock will get an error.
-.TP
-.BI user_xattr
-Enable get/set of extended attributes by regular users.  See the
-.BR attr (5)
-manual page.
-.TP
-.BI nouser_xattr
-Disable use of extended attributes by regular users.  Root and system processes can still use extended attributes.
-.TP
-.BI acl
-Enable POSIX Access Control List support.  See the
-.BR acl (5)
-manual page.
-.TP
-.BI noacl
-Disable Access Control List support.
-.PP
-In addition to the standard mount options and backing disk type
-(e.g. ext3) options listed in
-.BR mount (8),
-Lustre understands the following
-.B server-specific
-options:
-.TP
-.BI nosvc
-Only start the MGC (and MGS, if co-located) for a target service, and not the actual service.
-.TP
-.BI exclude= ostlist
-Start a client or MDT with a (colon-separated) list of known inactive OSTs.
-.TP
-.BI abort_recov
-Abort client recovery and start the target service immediately.
-.SH EXAMPLES
-.TP
-.B mount -t lustre cfs21@tcp0:/testfs /mnt/myfilesystem
-Start a client for the Lustre filesystem 'testfs' at the mount point
-/mnt/myfilesystem. The Management Service is running on a node reachable
-from this client via the nid cfs21@tcp0.
-.TP
-.B mount -t lustre /dev/sda1 /mnt/test/mdt
-Start the Lustre metadata target service from /dev/sda1 on mountpoint /mnt/test/mdt.
-.TP
-.B mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt
-Start the testfs-MDT0000 service (by using the disk label), but abort the
-recovery process.
-.SH BUGS
-Not very many mount options can be changed with
-.BR "-o remount" .
-Please report all bugs to Sun Microsystems using http://bugzilla.lustre.org/
-.SH AVAILABILITY
-.B mount.lustre
-is part of the 
-.BR Lustre (7) 
-filesystem package and is available from Sun Microsystems, Inc.
-.br
-http://downloads.lustre.org
-.SH SEE ALSO
-.BR Lustre (7),
-.BR mount (8),
-.BR mkfs.lustre (8),
-.BR tunefs.lustre (8),
-.BR lctl (8),
-.BR lfs (1)
diff --git a/lustre/doc/postbar b/lustre/doc/postbar
deleted file mode 100755
index 349d41c6b6b83c28ef923e3a9e64dfa72a3fb07f..0000000000000000000000000000000000000000
--- a/lustre/doc/postbar
+++ /dev/null
@@ -1,151 +0,0 @@
-#! /usr/bin/perl
-# postbar - Massage chbar.sh output into valid LaTeX
-# Copyright (C) 2002  Cluster File Systems, Inc.
-# Gord Eagle <gord@clusterfs.com>, 2002-08-10
-
-my $progname = $0;
-$progname =~ s|^.*/||;
-my $CHANGE_ENVIRONMENT = '\\\\(begin|end)\\{([^\\}]+)\\}';
-my (@envname, @envdepth, @envbuf);
-my $phony_preamble = 0;
-my $cbdepth = 0;
-my $cbfound = 0;
-
-# Tell whether an environment cannot have arbitrary changebars.
-sub fragile_environment
-{
-    my ($env) = @_;
-    return $env ne 'document';
-}
-
-
-# Tell whether we can hava arbitrary stuff.
-sub toplevel
-{
-    my ($env) = @_;
-    return $env eq 'document';
-}
-
-
-sub out
-{
-    my (@msg) = @_;
-    if ($#envbuf < 0 || toplevel($envname[0])) {
-	print @msg;
-    } else {
-	$envbuf[0] .= join('', @msg);
-    }
-}
-
-
-# Leave an environment.
-sub end_environment
-{
-    my ($env) = @_;
-
-    #out("%$progname end $env\n");
-    if ($envname[0] ne $env) {
-	die "Expecting \\end{$envname[0]} but got \\end{$env}\n";
-    }
-
-    if ($cbfound) {
-	# Did we find a changebar?
-	$cbfound = !toplevel($envname[1]);
-	if (!$cbfound) {
-	    # We found one, and the parent environment is the top level.
-	    if ($cbdepth == $envdepth[0]) {
-		# There was no change in depth, so mark the environment.
-		$envbuf[0] = "\\cbstart{}%$progname\n" . $envbuf[0];
-		out("\\cbend{}%$progname\n");
-	    } elsif ($envdepth[0] > $cbdepth) {
-		# There were more ends in the environment, so append them.
-		for (my $i = 0; $i < $envdepth[0] - $cbdepth; $i ++) {
-		    out("\\cbend{}%$progname\n");
-		}
-	    } else {
-		# There were more starts, so prepend them.
-		my $starts;
-		for (my $i = 0; $i < $cbdepth - $envdepth[0]; $i ++) {
-		    $starts .= "\\cbstart{}%$progname\n";
-		}
-		$envbuf[0] = $starts . $envbuf[0];
-	    }
-	}
-    }
-
-    # Drop the environment from the list.
-    shift(@envname);
-    shift(@envdepth);
-    out(shift(@envbuf));
-}
-
-
-while ($_ = <STDIN>) {
-    chomp;
-    my $env;
-    if (!/\\begin.*\\end/ && /$CHANGE_ENVIRONMENT/o) {
-	$env = $2;
-	if ($1 eq 'begin') {
-	    # Enter the new environment.
-	    unshift(@envname, $env);
-	    unshift(@envdepth, $cbdepth);
-	    unshift(@envbuf, '');
-	    #out("%$progname depth=$cbdepth, $#envname ($env)\n");
-	} elsif (!$phony_preamble) {
-	    out("$_\n");
-	    end_environment($env);
-	    next;
-	}
-    }	
-
-    if ($#envname >= 0 && /^\\documentclass/) {
-	$phony_preamble = 1;
-    }
-
-    if ($phony_preamble) {
-	# Comment out and ignore the redundant preambles.
-	out("%$progname $_\n");
-	$phony_preamble = 0 if ($env eq 'document');
-	next;
-    } elsif ($#envname >= 0) {
-	# Track the current changebar depth.
-	if (/^\\cbstart/) {
-	    $cbdepth ++;
-	    if (!toplevel($envname[0])) {
-		$cbfound = 1;
-		out("%$progname $_\n");
-		next;
-	    }
-	} elsif (/^\\cbend/) {
-	    if ($cbdepth == 0) {
-		die "$progname: Too many \\cbend{}s\n";
-	    }
-	    $cbdepth --;
-	    if (!toplevel($envname[0])) {
-		$cbfound = 1;
-		out("%$progname $_\n");
-		next;
-	    }
-	} elsif (/^\\cbdelete/ && fragile_environment($envname[0])) {
-	    # What to do with delete bars?
-	    out("%$progname $_\n");
-	    next;
-	}
-	out("$_\n");
-    } else {
-	out("$_\n");
-	# Add the options to the usepackage.
-	if (/^\\usepackage.*\{changebar\}$/) {
-	    # Prevent PostScript dictionary overflow errors.
-	    out("\\def\\cb\@maxpoint{15}\n");
-
-	    # Show the bars.
-	    out("\\outerbarstrue\n");
-	}
-    }
-
-    if (defined($env)) {
-    }
-}
-
-exit(0);
diff --git a/lustre/doc/tex2pdf b/lustre/doc/tex2pdf
deleted file mode 100755
index d9a7176b5b6b5d9a333c8c3bbdeec59f58c0f88b..0000000000000000000000000000000000000000
--- a/lustre/doc/tex2pdf
+++ /dev/null
@@ -1,3043 +0,0 @@
-#!/usr/bin/perl -w
-
-#      tex2pdf - script for translating latex docs to pdf
-#
-#      Copyright (C) 2000-2002 by Steffen Evers and others
-#
-#      This program is free software; you can redistribute it and/or modify
-#      it under the terms of the GNU General Public License version 2 as 
-#      published by the Free Software Foundation.
-#
-#      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., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-#      The GNU General Public License is also available online:
-#      http://www.gnu.org/licenses/gpl.html
-#
-# Thanks a lot to all the people that have already contributed to this project!
-#
-# The changelog including the credits has become too long. So, I have removed it
-# from the script, but it is still available online (see below). 
-#
-# Special thanks to the following people for their contribution
-# (see the changelog for details):
-# Matej Cepl, Herbert Voss, Nicolas Marsgui, Bruce Foster, Mark van Rossum,
-# Matt Bandy, Garrick Chien Welsh, Stacy J. Prowell, Pavel Sedivy,
-# Holger Daszler, Olaf Gabler, Ahmet Sekercioglui, Richard, Steffen Macke,
-# Rainer Dorsch & friends, Jean-Pierre Chretien, Fernando Perez,
-# Ha Duong Minh, Oscar Lopez
-#
-# Project Homepage: http://tex2pdf.berlios.de
-# Developer Homepage: http://developer.berlios.de/projects/tex2pdf
-# Mailing lists: http://developer.berlios.de/mail/?group_id=57
-# Changelog: http://tex2pdf.berlios.de/changelog.html
-#
-# Anyone is invited to help to improve tex2pdf. Therefore any kind of feedback
-# is welcome. Maybe you even would like to hack the code and send us your
-# changes. This would help a lot and is highly appreciated. Think about it :-)
-# Subscribing to the developer mailing list might be a first step (see above).
-#
-# Send feedback to: tex2pdf-devel@lists.berlios.de
-#
-
-######## Imports
-
-use File::Basename;
-use File::Copy;
-use Getopt::Long;
-use Sys::Hostname;
-use Cwd;
-use strict;
-
-####### global variables
-
-my $MYRELEASE="3.0.21";
-my $MYHOSTNAME=hostname;
-my $MYNAME=basename $0;
-my $MYUSER=$ENV{'USER'};
-my $USER_HOME=$ENV{'HOME'};
-if (not $MYUSER) { $MYUSER = 'nobody'; }
-if (not $USER_HOME) { $USER_HOME = '/tmp'; }
-
-my @TMPFILES=();
-my @TMP_TEX_FILES=(); 
-my $NUM_PARAM_MIN=0;
-my $NUM_PARAM_MAX=9;  
-my @REF_DOCS;
-my $MTP_PREAMBLE_FILENAME="preamble.cfg";
-my $MTP_TMP_BASESUFFIX="-mp";
-my @EPS_SUFFIXES=('eps','ps','ps.gz','eps.gz' );
-my $PDF_ORIG_SUFFIX='pdf.orig';
-my @BITMAP_SUFFIXES=( 'jpg', 'png', 'tif' );
-
-# (initial) log file of this script
-# this log file will be moved to the specified log_dir after configuration
-# and the variable will be updated to the new name
-my $MYLOGFILE="$USER_HOME/tex2pdf-$$.log";  
-my $LOGFILE_VERBOSITY=9;
-
-### text token for no value
-my $NIL="NOVALUE";
-my $UNDEF="undefined";
-
-### token for boolean 'false', 'no' 
-my $NO="no";
-my $FALSE=0;
-
-### token for boolean 'true', 'yes' 
-my $YES="yes";
-my $TRUE=1;
-
-### file to store private parameters
-# If you only want to change your private parameters change them there
-# default: $HOME/.tex2pdf3rc
-my $RC_FILENAME="$USER_HOME/.tex2pdf3rc";
-my $MYRCFILE_VERSION=7;
-my $RCVERSION_STRING="rcfile_version";
-
-## set global variable configured to prevent access to configuration
-#  parameters before configuration process is finished
-my $CONFIGURED=$FALSE;
-my $PRE_CONFIG_VERBOSITY=4;
-
-########################## NEW PERL CONFIGURATON
-
-my %CONFIGURATION = ();
-my %PARAMETER_LIST = ();
-my @PARAMETER_ORDER = ();
-my %PARAMETER_TYPES = ();
- 
-## Array index for the various information in each parameter specifcation
-## referenced by %PARAMETER_LIST
-my $TYPE=0;
-my $OPT_ALIAS=1;
-my $OPT_SPEC=2;
-my $DEF_VALUE=3;
-my $DESCRIPTION=4;
-my $QUESTION=5;
-my $EXPLANATION=6;
-
-&add_param_type('paper',
-   [ ['a4paper' , 'a4 paper' ],
-     [ 'letterpaper', 'letter paper' ],
-     [ 'legalpaper', 'legal paper' ],
-     [ 'executivepaper', 'executive paper' ],
-     [ $NIL, 'do not set value - leave it to hyperref' ]
-   ] );
-		  
-&add_param_type('color', 
-   [ [ 'yellow', 'LaTeX color yellow' ],
-     [ 'red', 'LaTeX color red' ],
-     [ 'green', 'LaTeX color green' ],
-     [ 'cyan', 'LaTeX color cyan' ],
-     [ 'blue', 'LaTeX color blue' ],
-     [ 'magenta', 'LaTeX color magenta' ],
-     [ 'black', 'LaTeX color black' ],
-     [ $NIL , 'do not set this value - leave it to hyperref' ]
-   ] );
-
-&add_param_type('destination',
-   [ [ 'source', 'directory of the LaTeX source document' ] ,
-     [ 'input', 'root directory of referenced material' ],
-     [ 'custom', 'custom directory as specified' ]
-   ] );
-
-### Option parameters: these parameters have no default value and can not
-# be configured interactively, but only as a command line option
-# an option parameter is not allowed to have a default value, question or
-# explanation
-# and all parameter of type action are treated as option parameters
-# $key, $type, $def_value, $opt_alias, $opt_spec, $description, $question, $explanation
-
-&add_param('help', 'action', undef, '|h', '',
-   'print a short help text and exit');
-
-&add_param('version', 'action', undef, '|v', '',
-   'print the version of this script and exit');
-
-&add_param('print_config', 'action', undef, '|o', '',
-   'print the current configuration and exit');
-
-&add_param('configure', 'action', undef, '|c', '',
-   'configure all parameters interactivly, store them and exit');
-
-&add_param('title', 'text', undef, '|t', '=s',
-   'set PDF info title for specified document');
-
-&add_param('author', 'text', undef, '|a', '=s',
-   'set PDF info author for specified document');
-
-&add_param('input_path', 'directory', undef, '', '=s',
-   'set path for referenced material in main document');
-
-### Full parameters
-# parameter type action is not allowed
-# $key, $type, $def_value, $opt_alias, $opt_spec, $description, $question, $explanation
-
-&add_param('logdir', 'directory',"$USER_HOME/tex2pdf-log/", '', '=s',
-   'set directory for saving log files',
-   'What log directory should be used?',
-   "The log directory is used to store information about the generation\n"
-   ."process for later review, e.g. for debugging.");
-
-&add_param('lyxrc_path', 'directory', "$USER_HOME/.lyx/", '', '=s',
-   'set the configuration directory of LyX',
-   'What is the directory for your LyX configuration data?',
-   "If I have to generate a LateX file from a LyX file I need to clear two "
-   ."temporary\nfiles in your LyX configuration directory. They will "
-   ."be backuped and normally\ndo not contain any valuable data anyway. If "
-   ."you do not use LyX, simply leave\nthe default.");
-
-&add_param('lyx_exec', 'text', "lyx", '', '=s',
-   'specify the LyX executable for converting lyx to latex',
-   'Which executable should I use for converting LyX docs to LaTeX?',
-   "I use LyX to generate a LateX file from a LyX file. As you might use\n"
-   ."several versions of LyX at the same time or do not have it in your path"
-   ."\nyou can give me the apropriate executable here (e.g. '/usr/bin/lyx')."
-   ."\nIn most cases the default 'lyx' should be fine.");
-
-&add_param('debug', 'bool', $NO, '', '!',
-'do not delete temporary files after execution and be as verbose as possible',
-   'Do you want to debug this script?',
-   "I will not remove any temporary files. This could cause problems on a "
-   ."second\nexecution as I might refuse to overwrite these files for security "
-   ."reasons.\nYou have to remove them manually in this case. Additionally, I "
-   ."will provide\nas much information during execution as possible.");
-
-&add_param('delete_pdf_images', 'bool', $NO, '', '!',
-   'delete generated PDF image files after execution',
-   'Should generated PDF image files be deleted after execution?',
-   "Pdflatex cannot handle EPS images. Therefore all such images need to be\n"
-   ."translated to PDF in advance. After a successful generation of the final "
-   ."PDF \ndocument or after encountering an error I could leave this PDF "
-   ."images for\n later executions or simply delete them.");
-
-&add_param('clean_on_abort', 'bool', $YES, '', '!',
-   'also delete temporary files after abort',
-   'Should temporary files be deleted when aborting?',
-   "When the generation of the PDF file fails for some reason you might still "
-   ."want\nto keep already generated temporary files for some reason, e.g. "
-   ."debugging.\nIf you do not want to keep them set this parameter to 'yes'.");
-
-&add_param('tmp_base_suffix', 'text', '-pdf', '', '=s',
-   'specify the extension of the basename for temporary TeX files',
-   'What string should be used as basename suffix for temporary files?',
-   "I have to find names for my temporary files. Therefore I construct a new "
-   ."name\nfrom the original filename and this string. Me and various called "
-   ."applications\nwill then create several files with this constructed "
-   ."basename and different\nextensions. When cleaning up I will simple "
-   ."delete all files with the\nconstructed basenames I have used.");
-
-&add_param('overwrite', 'bool', $NO, '', '!',
-   'ignore existence of files with same basename as temporary TeX files',
-   'Should I overwrite existing (temporary) files?',
-   "In spite of the precaution with the appended base suffix, there still "
-   ."might\nexist files with an identical basename. If you set this option I "
-   ."will consider\nsuch files as old temporary files and overwrite them "
-   ."during generation.\nHowever, I will not remove any files with this "
-   ."constructed basename on the\nclean up. You have to remove them manually.");
-
-&add_param('clean_logs', 'bool', $YES, '|l', '!',
-   'delete all log files in log directory before execution',
-   'Should the old log files be removed before execution?',
-   "I can remove old log files prior to execution. However, you might "
-   ."experience\nproblems if you run the script on several documents at the "
-   ."same time. If you\nwant to be on the safe side, answer '$NO'. Than you "
-   ."have to remove the logs\nmanually from time to time.");
-
-&add_param('check_commands', 'bool', $YES, '', '!',
-   'make sure that required shell commands does exist before start',
-   'Should I look for required executables?',
-   "As I use several different applications for PDF generation you might want "
-   ."to \nmake sure that they are available before the real work starts.");
-
-&add_param('destination', 'destination', 'source', '', '=s',
-   'specifiy final location of generated PDF document',
-   'Where should I store the resulting PDF document?',
-   "Depending on the application that starts this script (or you if you call "
-   ."it\ndirectly) you might want to have the resulting PDF document located "
-   ."at\ndifferent places.");
-
-&add_param('custom_path', 'directory', $USER_HOME.'/', '|d', '=s',
-   "specify custom path for 'destination' parameter",
-   'What custom directory should be used?',
-   "When ever you specifiy to store the generated PDF document (command line "
-   ."or\nconfiguration) in a custom directory I will put it here.");
-
-&add_param('colorlinks', 'three', $YES, '', '!',
-   'activate colored links in PDF doc (hyperref)',
-   'Should colors be used for links?',
-   "I can use different colors for links inside the PDF document.\nYou can "
-   ."use '$UNDEF' to tell me that you would like to leave this up to\n"
-   ."independent hyperref configuration.");
-
-&add_param('paper', 'paper', 'a4paper', '|p', '=s',
-   'specify papersize of the PDF doc (hyperref)',
-   'What papersize should be used?',
-   "I can set the papersize of the resulting PDF document");
-
-&add_param('citecolor', 'color', 'blue', '', '=s',
-   'specify color of citations in PDF doc (hyperref)',
-   'What color should be used for citation?', "");
-
-&add_param('urlcolor', 'color', 'blue', '', '=s',
-   'specify color of URLs in PDF doc (hyperref)',
-   'What color should be used for URLs?', "");
-
-&add_param('linkcolor', 'color', 'blue', '', '=s',
-   'specify color of internal links in PDF doc (hyperref)',
-   'What color should be used for normal internal links?', "");
-
-&add_param('pagecolor', 'color', 'blue', '', '=s',
-   'specify color of links to other pages in PDF doc (hyperref)',
-   'What color should be used for page links?', "");
-
-&add_param('link_toc_page', 'bool', $YES, '', '!',
-   'link table of contents to pages instead of sections (hyperref)',
-   'Should TOC be linked to pages?',
-   "The table of contents of the resulting PDF document is normally linked to "
-   ."the\ncorresponding section. However, you can also link it to the "
-   ."corresponding page\ninstead.");
-
-&add_param('default_title', 'text', $NIL, '', '=s',
-   'set default PDF info title',
-   'What is the default title?',
-   "A PDF document contains meta data about itself: the document info.\nOne "
-   ."of the info fields is the document title. You can set a default value\n"
-   ."which will be used in the case the script cannot determine a proper "
-   ."title from\nthe LaTeX document and you have not set one on the command "
-   ."line.\nYou can use '$NIL' to tell me that you would like to leave this "
-   ."up to\nindependent hyperref configuration.");
-
-&add_param('default_author', 'text', $NIL, '', '=s',
-   'set default PDF info author',
-   'What is the default author?',
-   "A PDF document contains meta data about itself: the document info.\nOne "
-   ."of the info fields is the document author. You can set a default value\n"
-   ."which will be used in the case the script cannot determine a proper "
-   ."author\nfrom the LaTeX document and you have not set one on the command "
-   ."line.\nYou can use '$NIL' to tell me that you would like to leave this "
-   ."up to\nindependent hyperref configuration.");
-
-&add_param('force_index', 'bool', $NO, '|i', '!',
-   'force explicit inclusion of (existing) index in PDF doc',
-   'Should the call of makeindex be forced?',
-   "Older versions of pdflatex have not included the index of a document\n"
-   ."automatically. If you are missing the index in your document you can "
-   ."force the\ncall of makeindex on the condition that an index file was "
-   ."generated.");
-
-&add_param('makeindex_opts', 'text', '', '', '=s',
-   'specify extra options for shell execution of makeindex',
-   'What additional options for makeindex should be used?',
-   "Sometimes, people would like to pass some extra options over to makeindex. "
-   ."This\nis the right place to do that. Everyone else can leave this empty.");
-
-&add_param('bibtex', 'three', $NIL, '|b', '!',
-   'set bibtex behavior',
-   'How should bibtex be used?',
-   "The bibtex usage can be specified.\nPossible values are: '$YES' (always "
-   ."run bibtex), '$NO' (never run bibtex)\nand '$UNDEF' (scan tex file for "
-   ."a bibtex entry and run it if required).");
-
-&add_param('gloss', 'three', $NIL, '', '!',
-   'set gloss behavior',
-   'How should gloss be used?',
-   "The gloss usage can be specified.\nPossible values are: '$YES' (always "
-   ."run bibtex on file.gls), '$NO' (never run bibtex on file.gls)\nand '$UNDEF' (scan tex file for "
-   ."a gloss entry and run it if required).");
-
-&add_param('thumbpdf', 'bool', $NO, '|n', '!',
-   'generate thumbnails for PDF document',
-   'Should PNG thumbnails be created?',
-   "I can use thumbpdf to include thumbnails of the document pages in the PDF "
-   ."file.\nThis requires Ghostscript 5.50 or higher.");
-
-&add_param('ppower', 'bool', $NO, '|w', '!',
-   'postprocess PDF document with ppower',
-   'Should ppower postprocess the PDF document?',
-   "I can use ppower to postprocess the PDF "
-   ."file.\nThis requires ppower 4.0 or higher.");
-
-&add_param('authorindex', 'bool', $NO, '', '!',
-   'generate author index for PDF document',
-   'Should authorindex process the PDF document?',
-   "I can use authorindex to process to include an author index in the PDF "
-   ."file.\nThis requires authorindex.");
-
-
-&add_param('mtp_preamble', 'bool', $NO, '|r', '!',
-   "add the file $MTP_PREAMBLE_FILENAME at the current dir to metapost files",
-   "Should the $MTP_PREAMBLE_FILENAME file be added to the metapost files?",
-   "I can add $MTP_PREAMBLE_FILENAME to metapost "
-   ."files.\nThis requires an existing $MTP_PREAMBLE_FILENAME file.");
-
-&add_param('maxrun', 'integer', 6, '', '=i',
-   'specify maximal number of pdflatex runs if problems are detected',
-   'What should be the maximum number of runs for pdflatex (1-6)?', "");
-
-&add_param('minrun', 'integer', 2, '', '=i',
-   'specify minimal number of pdflatex runs if no problems are detected',
-   'What should be the minimum number of runs for pdflatex (1-6)?', "");
-
-&add_param('verbosity', 'integer', 5, '', '=i',
-   'set the level of verbosity',
-   'Which level of verbosity do you want (0-9)',
-   "Different people want different amounts of information about what the "
-   ."script\nactually does. Therefore you can adjust the verbosity to your "
-   ."personal needs\nby setting this parameter to a value from 0 to 9. 0 "
-   ."means no output at all\nand 9 means maximal output.");
-
-&add_param('pdftex_opts', 'text', '', '', '=s',
-   'specify extra options for shell execution of pdflatex',
-   'What additional options for pdflatex should be used?',
-   "Sometimes, people would like to pass some extra options over to pdflatex. "
-   ."This\nis the right place to do that. Everyone else can leave this empty.");
-
-&add_param('hyperref_args', 'text', '', '', '=s',
-   'specify extra arguments for the hyperref package',
-   'What additional arguments should be passed to the hyperref package?',
-   "Sometimes, people would like to pass some extra options over to hyperref. "
-   ."This\nis the right place to do that. Everyone else can leave this empty.");
-
-# the following parameter types should be set now:
-#  'color'       => \@VALUES,
-#  'destination' => \@VALUES,
-#  'paper'       => \@VALUES,
-#  'action'      => undef,
-#  'three'       => undef,
-#  'bool'        => undef,
-#  'integer'     => undef,
-#  'text'        => undef,
-#  'directory'   => undef
-
-##### Functions ###########################################
-
-### handle a status report with a given priority level
-# write it to the log file if log file if configuration is done
-# write it to stdout if verbosity is set lower or equal
-#
-# The following priority levels exist:
-# 1: minimal fatal error messages
-# 2: additional information about fatal error
-# 3: non-fatal error message 
-# 4: warning
-# 5: major step of the process
-# 6: minor step of the process
-# 7: progress report of minor step
-# 8: long status report from called applications
-# 9: debug info
-#
-# parameter 1: priority level
-# parameter 2: list of output strings
-# return value: none
-
-sub report {
-   my $level;
-   my $verbosity;
-   my $log_verbosity;
-   my @output;
-
-   if (@_ < 2 ) {
-      @output = ( "Oppss! Report function got only 1 argument!" );
-      $level  = 9;
-   } else {
-      ($level, @output) = @_;
-   }
-
-   if($CONFIGURED) {
-      if( &param_value('debug') eq $NO ) {
-         $verbosity = &param_value('verbosity');
-         $log_verbosity = $LOGFILE_VERBOSITY;
-      } else {
-         $verbosity = 9;
-         $log_verbosity = 9;
-      } 
-   } else {
-      $verbosity = $PRE_CONFIG_VERBOSITY;
-      $log_verbosity = $LOGFILE_VERBOSITY;
-   }
-
-   if ( $level <= $log_verbosity ) {
-      open LOGFILE, ">> $MYLOGFILE";
-      print LOGFILE @output,"\n";
-      close LOGFILE;
-   }
-
-   if( $level <= $verbosity ) {
-      print @output,"\n";
-   }
-}
-
-### process system command and do the appropriate reports
-# parameter 1: the system command to process
-# parameter 2: flag - TRUE: abort on failure, FALSE: continue on failures
-# parameter 3: priority level for output of system command
-# parameter 4: specific failure message
-# return value: TRUE - success, FALSE - failure 
-
-sub system_command {
-   my $command = $_[0];
-   my $fatal_failure= $_[1];
-   my $output_priority = $_[2];
-   my $fail_message = $_[3];
-   my $system_out;
-
-   $system_out = `$command 2>&1`;
-
-   if ($?) {
-      if ($fatal_failure) {
-         &report(2, $system_out) if ($system_out);
-         &abort($fail_message.": $!");
-      } else {
-         &report($output_priority, $system_out) if ($system_out);
-         &report(3, $fail_message.": $!");
-      }
-      return $FALSE;
-   }
-
-   return $TRUE;
-}
-
-### Index of the first occurence of a string in an array
-# parameter 1: text
-# parameter 2: list
-# return value: index or -1 if not element of the array 
-
-sub array_index {
-   my ($text, @list) = @_;
-
-   if(!defined($text)) {
-      &report(9, "Oppss! Cannot compare nothing.");
-      return -1;
-   }
-
-   foreach (0..$#list) {
-      if ( $list[$_] eq $text ) { return $_; }
-   }
-   
-   return -1;
-}
-
-### extract the last N lines of a text file
-# abort on failures
-# parameter 1: file to read
-# parameter 2: N - number of lines to print (undef/0: all lines)
-# return value: last N lines 
-
-sub file_tail {
-   my $file_name = $_[0];
-   my $no_of_lines = defined($_[1]) ? $_[1] : 0;
-   my @cache=();
-
-   &check_file($file_name);
-   open(TAIL_SOURCE, "<$file_name")
-      or &abort("Could not read file $file_name: $!");
-
-   if($no_of_lines == 0) {
-      # use entire file
-      while(<TAIL_SOURCE>) {
-         if(!$_) { $_="\n"; }
-         push(@cache, $_);
-      }
-   } else {
-      # only last N lines
-   
-      # fill up cache
-      while(@cache < $no_of_lines and <TAIL_SOURCE>) {
-         if(!$_) { $_="\n"; }
-         push(@cache, $_);
-      }
-   
-      # always cache the last N lines up to the end of the file
-      while(<TAIL_SOURCE>) {
-         if(!$_) { $_="\n"; }
-         shift(@cache);
-         push(@cache, $_);
-      }
-   }
-   
-   close TAIL_SOURCE;
-
-   return @cache;
-}
-
-### return all lines of FILE which match match regexp EXPR 
-# parameter 1: FILE - file to read
-# parameter 2: EXPR - regular expression to match
-# parameter 3: true: exit on first occurence, otherwise get all (default: false)
-# return value: array of matching lines
-
-sub grep_file {
-   my $file_name = $_[0];
-   my $regexp = $_[1];
-   my $first_only = $_[2] ? $TRUE : $FALSE;
-   my @result=();
-
-   ### open file and abort if not possible
-   &check_file($file_name);
-   open(GREP_SOURCE, "<$file_name")
-      or &abort("Could not read file $file_name: $!");
-
-   while(<GREP_SOURCE>) {
-      if(m#$regexp#) {
-         push(@result, $_);
-         if($first_only) { last; }
-      }
-   }
-
-   close GREP_SOURCE;
-   return @result;
-}
-   
-### Removing all temporary files
-
-sub clean_up {
-   &report(6, "Removing temporary files ...");
-   foreach (@TMPFILES) {
-      unlink($_) if(-f $_); 
-   }
-
-   foreach (@TMP_TEX_FILES) {
-      # make sure that we have a good tex file name in order
-      # to avoid unintended removals
-      if( $_ ne "" and -f $_.'.tex' ) {
-         unlink glob($_.".???"); 
-      } else {
-         &report(3, "Bad file in temp tex files list: $_");
-      }
-   }
-}
-
-### Output of all temp files
-
-sub print_temp_files {
-   if (scalar @TMPFILES > 0) {
-      print "Stored the following explicit temporary files:\n";
-      foreach (@TMPFILES) {
-         if (-f $_) {
-            print "> ".$_."\n";
-         } else {
-	    print "> ".$_." (does not exist)\n";
-         }
-      }
-      print "\n";
-   }
-   
-   if (scalar @TMP_TEX_FILES > 0) {
-      print "Stored the following temporary TeX base names:\n";
-      foreach (@TMP_TEX_FILES) {
-         if( $_ ne "" and -f $_.'.tex' ) {
-            print "> ".$_.": "; 
-            foreach my $file (glob($_.".???")) {
-	       print basename($file)." ";
-	    }
-            print "\n"; 
-         } else {
-            print "> ".$_.": bad file for temp TeX file\n";
-         }
-      }
-      print "\n";
-   }
-}
-
-###  exit with an error message
-
-sub abort {
-   &report(1, @_);
-   if ( $CONFIGURED and &param_value('clean_on_abort') eq $YES 
-       and &param_value('debug') eq $NO) {
-      &clean_up;
-   } else {
-      &print_temp_files;
-   }
-   &report(2, "Aborting ...");
-   exit 1;
-}
-
-### Check for required command with 'which'; abort if not found
-# parameter $1: command to check
-# parameter $2: remark if specified command is not found
-
-sub checkCommand {
-   my $command = $_[0];
-   my $message = $_[1];
-   my $which_output;
-
-   $which_output = `which $command 2>&1`; 
-   chomp $which_output;
-   $_ = $which_output;
-   s|^(.*/)?([^/]+)$|$2|;
-
-   if ( $_ ne $command ) {
-      &report(2, "\n$which_output");
-      &report(1, "\nRequired command '$command' seems not to be in your path.");
-      if ( defined($message) ) {
-         &report(2, "$message");
-      }
-      &report(2, "Aborting ...");
-      exit 1;
-   }
-}
-
-###################### Generic configuration functions
-
-### interactively answer a question with yes or no
-# parameter 1: question
-# parameter 2: default value (not set means $NIL)
-# parameter 3: yes: allow undefined as third value
-#              no : only yes/no allowed (default)
-# return value: the given answer
-
-sub question_ynu {
-   my $user_input;
-   my $question = $_[0];
-   my $default = defined($_[1]) ? $_[1] : $NIL;
-   my $undef_allowed = $_[2];
-   my $response = undef;
-
-   if (defined($undef_allowed) and $undef_allowed eq $YES) {
-      $undef_allowed = $TRUE;
-   } else {
-      $undef_allowed = $FALSE;
-   }
-
-   if( $default =~ /^y(es)?/i ) {
-      $question .= ' [y]: ';
-      $default = $YES;
-   } elsif ( $default eq $NIL and $undef_allowed ) {
-      $question .= ' [u]: ';
-      $default = $NIL;
-   } else {
-      $question .= ' [n]: ';
-      $default = $NO;
-   }
-   while (! defined($response)) {
-      print $question;
-      $user_input = <STDIN>;
-      chomp($user_input);
-      
-      if( $user_input =~ /^y(es)?/i ) {
-         $response=$YES;
-      } elsif ( $user_input =~ /^no?/i ) {
-         $response=$NO;
-      } elsif ( $user_input =~ /^u(ndef(ined)?)?/i and $undef_allowed ) {
-         $response=$NIL;
-      } elsif ( $user_input eq "" ) {
-         $response=$default;
-      } else {
-         print "Please respond with y(es)";
-         print ", u(ndefined)" if($undef_allowed);
-         print " or n(o).\n";
-      }
-   }
-   return $response;
-}
-
-### interactively input a positive integer number
-# parameter 1: question
-# parameter 2: default value
-# parameter 3: min value
-# parameter 4: max value
-# return value: the input number
-
-sub input_number {
-   my $question = $_[0];
-   my $default = $_[1];
-   my $min_limit = $_[2];
-   my $max_limit = $_[3];
-   my $response= undef;
-
-   while (! defined($response)) {
-      print "$question [$default]: ";
-      my $user_input = <STDIN>;
-      chomp($user_input);
-      
-      if ($user_input eq "") {
-         $response=$default;
-      } else {
-         $_ = $user_input;
-         if (s/^([0-9]+)$/$1/ and $_ >= $min_limit and $_ <= $max_limit ) {
-            $response = $_;
-	 } else {
-            print "Invalid input. Please enter a positve integer from $min_limit to $max_limit.\n";
-         }
-      }
-   }
-   return $response;
-}
-
-### interactively choose between several given values
-# parameter 1: question
-# parameter 2: default value
-# parameter 3: reference to an array of possible values arrays
-# return value: the chosen value
-
-sub choose_value {
-   my ($question, $default, $enum_array_ref)=@_;
-   my $default_no=1;
-   my $chosen_no;
-   my @possible_values = @$enum_array_ref;
-   my @value_array;
-   my $value_key;
-   my $value_output;
-
-   print "$question\n";
-   foreach (0..$#possible_values) {
-      my $no     = $_ + 1;
-      @value_array  = @{$possible_values[$_]};
-      $value_key    = $value_array[0];
-      $value_output = $value_array[1];
-
-      print "$no) " . $value_output . "\n";
-      if ( $default eq $value_key ) { $default_no=$no; }
-   }
-
-   $chosen_no=&input_number("Please enter the corresponding number", $default_no, 1, $#possible_values);
-
-   @value_array  = @{$possible_values[$chosen_no - 1]};
-   $value_key    = $value_array[0];
-   return $value_key;
-}
-
-### interactively answer a question
-# parameter 1: question
-# parameter 2: current value
-# return value: the new value
-
-sub input_text {
-   my $question=$_[0];
-   my $default=$_[1];
-   my $response= undef;
-
-   print "Suggested value: $default\n";
-   if ( &question_ynu("Do you want to keep this value?", $YES) eq $YES ) {
-      $response= $default;
-   } else {
-      print "$question ";
-      my $user_input = <STDIN>;
-      chomp($user_input);
-      
-      $response = $user_input;
-   }
-   return $response;
-}
-
-##### Make sure that specified file exists and is readable; abort if missing
-# parameter 1: file to check
-# parameter 2: remark if check fails on specified file
-
-sub check_file {
-   my $file = $_[0];
-   my $message = defined($_[1]) ? $_[1] : "Required file cannot be accessed!";
-
-   if ( ! -f $file ) {
-      &report(2, "\nSorry. I cannot find '$file'.");
-      &abort($message);
-   } elsif ( ! -r $file ) {
-      &report(2, "\nSorry. File '$file' exists, but is not readable.");
-      &abort($message);
-   }
-}
-
-##### Make sure that specified directory exists and is writable
-# parameter 1: directory to check
-# parameter 2: remark if check fails on specified directory
-# parameter 3: if yes, creation is allowed
-# return value: $TRUE - ok; $FALSE - error
-
-sub check_dir {
-   my $directory = $_[0];
-   my $message = defined($_[1]) ? $_[1] : "Not a valid path!";
-   my $allow_creation = defined($_[2]) ? $_[2] : $NO;
-
-   if ( index($directory, "/") != 0 ) {
-      &report(3, "\nSorry. '$directory' is not an absolute path.");
-      &report(3, $message);
-      return $FALSE;
-   } elsif ( ! -d $directory ) {
-      # dir does not exist
-      if ( $allow_creation eq $YES ) {
-         # creation allowed
-         &report(4, "\nI cannot find '$directory'. Try to create it.");
-         if ( mkdir($directory, 0755) ) {
-            &report(7, "Creation of '$directory' was successful.");
-            return $TRUE;
-         } else {
-            &report(3, "Creation of '$directory' failed.");
-            &report(3, $message);
-            return $FALSE;
-	      }
-      } else {
-         # creation not allowed
-         &report(3, "\nSorry. Directory '$directory' does not exist.");
-         &report(3, $message);
-         return $FALSE;
-      }
-   } elsif ( ! -w $directory ) {
-      # dir not writable
-      &report(3, "\nSorry. Directory '$directory' exists, but is not writable.");
-      &report(3, $message);
-      return $FALSE;
-   }
-   return $TRUE;
-}
-
-### interactively input a directory for data storage (absolute path)
-# parameter 1: question
-# parameter 2: default dir
-# parameter 3: if 'yes' allow creation of directory
-# return value: the specified directory
-
-sub input_dir {
-   my $question = $_[0];
-   my $default_dir = $_[1];
-   my $allow_creation = defined($_[2]) ? $_[2] : $NO;
-   my $user_input;
-   my $response = undef;
-
-   if ( defined($default_dir) and index($default_dir, "/") == 0 
-        and ( (! -d $default_dir and $allow_creation eq $YES) 
-        or (-d $default_dir and -w $default_dir) ) ) {
-      $question .= " [$default_dir]: ";
-   } else {
-      $default_dir = undef;
-      $question .= ": ";
-   }
-
-   while (! defined($response)) {
-      print "$question";
-      $user_input = <STDIN>;
-      chomp($user_input);
-      
-      if( $user_input eq "" and defined($default_dir) ) {
-         # user has only pressed <ENTER> and thereby confirmed default value
-	 if( ! &check_dir($default_dir,"Default value was not valid. Please, give different directory.", $allow_creation ) ) {
-	    # default dir does not exist and cannot be created
-	    $default_dir = undef;
-	    $question = "$_[0]: ";
-	 } else {
-	    # valid default dir has already existed or has been created
-            $response = $default_dir;
-	 }
-      } else {
-         # user has given a directory
-         if( &check_dir($user_input,"This is not a valid directory!", $allow_creation) ) {
-	    $response = $user_input;
-         }
-      }
-   }
-   return $response;
-}
-
-#### add a new parameter type with corresponding additional data argument
-#### parameters types
-# parameter 1: type key
-# parameter 2: additonal data for the type
-#              e.g. for enum type: reference to list of arrays
-# return value: none
-
-sub add_param_type {
- 
-   my ($type, $scalar_argument) = @_;
- 
-   $PARAMETER_TYPES{$type} = $scalar_argument;
-}
-
-#### add a new parameter to the adminstrated parameters
-####
-# parameter 1: key
-# parameter 2: type
-# parameter 3: default value
-# parameter 4: alias for command line options
-# parameter 5: specification for command line options
-# parameter 6: short description for help
-# parameter 7: question
-# parameter 8: explanation
-# return value: none
-
-sub add_param {
- 
-   my ($key, $type, $def_value, $opt_alias, $opt_spec, $description, $question, $explanation) = @_;
- 
-   $CONFIGURATION{$key} = $def_value;
-
-   $PARAMETER_LIST{$key} = [ $type, $opt_alias, $opt_spec, $def_value, $description, $question, $explanation ];
-   
-   push(@PARAMETER_ORDER, $key);
-
-   if (! exists $PARAMETER_TYPES{$type}) {
-      $PARAMETER_TYPES{$type} = undef;
-   }
-}
-
-### get the value of an existing parameter
-# parameter 1: a parameter key
-# return value: reference to the array of possible value entries 
-#               (undef if not valid)
-
-sub type_enum_array {
-   my $key = $_[0];
-   my $values_ref;
-
-   if(! exists($PARAMETER_TYPES{$key})) {
-      &abort("unknown type: $key");
-   }
-
-   $values_ref = $PARAMETER_TYPES{$key};
-
-   if(ref $values_ref ne 'ARRAY') {
-      $values_ref = undef;
-   }
-
-   return $values_ref;
-}
-
-### get the value of an existing parameter
-# parameter 1: a parameter key
-# return value: parameter value
-
-sub param_value {
-   my $key = $_[0];
-   my $current_value;
-
-   exists($CONFIGURATION{$key})
-      or &abort("unknown parameter: $key");
-   $current_value = $CONFIGURATION{$key};
-
-   return $current_value;
-}
-
-### get the type of an existing parameter
-# parameter 1: a parameter key
-# return value: parameter value
-
-sub param_type {
-   my $key = $_[0];
-   my $def_ref;
-   my $type;
-
-   exists($PARAMETER_LIST{$key})
-      or &abort("unknown parameter: $key");
-   $def_ref = $PARAMETER_LIST{$key};
-   $type = @{$def_ref}[$TYPE];
-
-   exists($PARAMETER_TYPES{$type})
-      or &abort("parameter has unknown type: $key (type: $type)");
-
-   return $type;
-}
-
-### determine if the given parameter is a full one (instead of option only)
-# parameter 1: a parameter key
-# return value: $TRUE - full parameter; $FALSE otherwise
-
-sub full_param {
-   my $key = $_[0];
-   my @param_def;
-
-   exists($PARAMETER_LIST{$key})
-      or &abort("unknown parameter: $key");
-   @param_def = @{$PARAMETER_LIST{$key}};
-
-   if ($param_def[$TYPE] ne 'action' and defined ($param_def[$QUESTION])) {
-      return $TRUE;
-   } else {
-      return $FALSE;
-   }
-}
-
-### get the output needed for configuration of this parameter 
-# parameter 1: a parameter key
-# return value: array - (description, explanation, question) 
-
-sub param_config_output {
-   my $key = $_[0];
-   my @param_def;
-   my $description; 
-   my $explanation; 
-   my $question; 
-
-   exists($PARAMETER_LIST{$key})
-      or &abort("unknown parameter: $key");
-   @param_def = @{$PARAMETER_LIST{$key}};
-   $description = $param_def[$DESCRIPTION];
-   $explanation = $param_def[$EXPLANATION];
-   $question = $param_def[$QUESTION];
-   
-   return ($description, $explanation, $question);
-}
-
-### set the value of an existing parameter
-# parameter 1: a parameter key
-# parameter 2: the new value
-# return value: none
-
-sub set_param_value {
-   my $key = $_[0];
-   my $new_value = $_[1];
-
-   exists($CONFIGURATION{$key})
-      or &abort("unknown parameter: $key");
-   $CONFIGURATION{$key}=$new_value;
-}
-
-### get option specifier for getopts
-# parameter 1: option key
-# return value: string - option specifier
-
-sub option_specifier {
-   my $key = $_[0];
-   my $spec;
-   my $def_ref;
- 
-   exists($PARAMETER_LIST{$key})
-      or &abort("unknown parameter: $key");
-   $def_ref = $PARAMETER_LIST{$key};
-   $spec = $key . ${$def_ref}[$OPT_ALIAS] . ${$def_ref}[$OPT_SPEC];
- 
-   return $spec;
-}
-
-### handle an option
-# parameter 1: a parameter/option key
-# parameter 2: the option value
-# return value: none
-
-sub handle_option {
-   my $key = $_[0];
-   my $value = $_[1];
-   my $type;
-   
-   $type = &param_type($key);
-
-   if ($type eq 'action') {
-      &handle_action_opt($key, $value);
-   } elsif ( $type eq 'bool' or $type eq 'three') {
-      my $bool_value = $value ? $YES : $NO;
-      &set_param_value($key, $bool_value);
-   } elsif ( $type eq 'directory') {
-      if (! &check_dir($value)) {
-         &report(2, "$key requires an existing writable directory as an absolute path.");
-         &abort("Illegal value: $value");
-      }
-      &set_param_value($key, $value);
-   } elsif (defined(&type_enum_array($type))){
-      &set_enum_param($key, $value);
-   } else {
-      &set_param_value($key, $value);
-   }
-}
-
-### handle all action options 
-# parameter 1: a option key
-# parameter 2: the option value
-# return value: none
-
-sub handle_action_opt {
-   my $key = $_[0];
-   my $value = $_[1];
-
-   if ($key eq 'help') {
-      &print_help;
-      
-   } elsif ($key eq 'version') {
-      &print_version;
-      
-   } elsif ($key eq 'configure') {
-      if ( -f $RC_FILENAME ) {
-         &read_configuration($RC_FILENAME);
-      }
-      &configure;
-      &write_configuration($RC_FILENAME);
-      &print_configuration;
-      
-   } elsif ($key eq 'print_config') {
-      if ( -f $RC_FILENAME ) {
-         &read_configuration($RC_FILENAME);
-      }
-      &print_configuration;
-
-   } else {
-      &print_usage; 
-      exit 1;
-   }
-   exit 0;
-}
-
-### set a variable by a command line option to a possible values; abort on error
-# parameter 1: parameter key
-# parameter 2: value
-
-sub set_enum_value {
-   my ($key, $value) = @_;
-   my $type;
-   my $enum_array_ref;
-   my @allowed_values=();
-
-   $type = &param_type($key);
-   $enum_array_ref = &type_enum_array($type);
-   &abort("Internal error: No value array for parameter $key.")
-      if(!defined($enum_array_ref));
-
-   ### find out if the given value is allowed  
-   foreach my $value_array_ref (${$enum_array_ref}) {
-      if(${$value_array_ref}[0] eq $value) {
-         ### found it, so it is okay!
-         &set_param_value($key, $value);
-	 return;
-      }
-   }
-
-   ### value is not listed, so not allowed
-   ### make a list of all allowed values
-   foreach my $value_array_ref (${$enum_array_ref}) {
-      push(@allowed_values, ${$value_array_ref}[0]);
-   }
-
-   &report(2, "\n$key allows: " . @allowed_values . ".\n");
-   &abort("Illegal value: $value");
-}
-
-### configure an existing parameter interactively
-# parameter 1: a parameter key
-# return value: none
-
-sub config_param {
-   my $key = $_[0];
-   my $type; 
-   my $new_value;
-   my $current_value;
-   my $description;
-   my $explanation;
-   my $question;
-
-   ### get required information about this parameter
-   $type = &param_type($key); 
-   $current_value = &param_value($key);
-   ($description, $explanation, $question) = &param_config_output($key);
-
-   ### tell the user the facts
-   print "\n\n--------------------------------------------\n";
-   print "Parameter: ".$key."\n";
-   print $description."\n\n";
-   print $explanation."\n\n" if($explanation ne "");
-   
-   ### ask him what he wants
-   if ($type eq 'bool') {
-      $new_value=&question_ynu($question, $current_value, $NO);
-   } elsif ($type eq 'three') {
-      $new_value=&question_ynu($question, $current_value, $YES);
-   } elsif ($type eq 'directory') {
-      $new_value=&input_dir($question, $current_value, $YES);  
-   } elsif ($type eq 'text') {
-      $new_value=&input_text($question, $current_value);  
-   } elsif ($type eq 'integer') {
-      $new_value=&input_number($question, $current_value,
-      $NUM_PARAM_MIN, $NUM_PARAM_MAX);  
-   } else {
-      my $enum_array_ref; 
-
-      $enum_array_ref=&type_enum_array($type); 
-      if (! defined($enum_array_ref)) {
-         &abort("Do not know how to configure this parameter: $key (type: $type)");
-      }
-
-      $new_value=&choose_value($question,$current_value,$enum_array_ref);
-   } 
-
-   ### store his choice
-   &set_param_value($key, $new_value);
-}
-
-### save configuration in rc file
-# parameter 1: file name
-# return value: none
-
-sub write_configuration {
-   my $file_name = $_[0];
-   my $date;
-
-   open(RCFILE, ">$file_name") or
-      &abort("Could not open configuration file for writing ($file_name)");
-   select RCFILE;
-
-   $date = `date`;
-   chomp($date);
-   
-   print "# Configuration file for $MYNAME V$MYRELEASE\n";
-   print "# Generated $date by $MYUSER on $MYHOSTNAME\n";
-   print "$RCVERSION_STRING=$MYRCFILE_VERSION\n";
-   
-   foreach my $key (@PARAMETER_ORDER) {
-      my $value = $CONFIGURATION{$key};
-      if(&full_param($key)) {
-         print $key.'='.$value."\n";
-      }
-   }
-   
-   print "# EOF\n";
-   select STDOUT;
-   close RCFILE;
-}
-
-### print the configuration parameters
-
-sub print_configuration {
-   print "\nConfiguration for $MYNAME V$MYRELEASE\n";
-   
-   foreach my $key (@PARAMETER_ORDER) {
-      my $value = $CONFIGURATION{$key};
-      if(&full_param($key)) {
-         print $key.'='.$value."\n";
-      }
-   }
-   
-   print "\n";
-}
-
-### load parameters from rc file
-# parameter 1: file name
-# return value: version of read rc file or 0 if no version given
-
-sub read_configuration {
-   my $file_name = $_[0];
-   my $file_version= 0;
-
-   &check_file($file_name, "Could not access configuration file");
-   open(RCFILE, "<$file_name") or
-      &abort("Could not open configuration file for reading ($file_name)");
-
-   while (<RCFILE>) {
-      chomp;
-      if( /^([^#=]+)=(.*)$/ ) {
-         if( exists $CONFIGURATION{$1} ) {
-            $CONFIGURATION{$1} = $2;
-         } elsif ( $1 eq $RCVERSION_STRING ) {
-            $file_version = $2; 
-         } else {
-            print "Ignoring unknown parameter in RC file: $1=$2\n";
-         }
-      }
-   }
-   close RCFILE;
-
-   return $file_version;
-}
-
-### print script version
-
-sub print_version {
-   print "\n$MYNAME Version $MYRELEASE\n";
-}
-
-###################### Specific functions (for use with this script only)
-
-### print usage of command
-
-sub print_usage {
-   print "\nUsage: $MYNAME [OPTIONS] DOCUMENT.lyx\n";
-   print "       $MYNAME [OPTIONS] DOCUMENT[.tex]\n\n";
-   print "       $MYNAME -c | --configure     modify/set up configuration\n";
-   print "       $MYNAME -h | --help          give a short help\n";
-   print "       $MYNAME -o | --print_config  print current configuration\n";
-   print "       $MYNAME -v | --version       print my version\n\n";
-}
-
-### print command help
-
-sub print_help {
-   &print_version;
-   &print_usage;
-
-   foreach my $key (@PARAMETER_ORDER) {
-      my @param_def = @{$PARAMETER_LIST{$key}};
-      my $description = $param_def[$DESCRIPTION];
-      my $takes_value = $param_def[$OPT_SPEC] =~ /[=:]/ ? $TRUE : $FALSE;
-      my $negation = $param_def[$OPT_SPEC] eq '!' ? $TRUE : $FALSE;
-      my $alias = $param_def[$OPT_ALIAS];
-      
-      $alias =~ s/\|(([a-zA-Z])(\||$))/ | -$1/g;
-      $alias =~ s/\|(([a-zA-Z][a-zA-Z0-9_]+)(\||$))/ | --$1/g;
-
-      print "--";
-      print "[no]" if($negation);
-      print $key.$alias;
-      print " VALUE" if ($takes_value);
-      print ":\n   ".$description."\n\n";
-   }
-   print "\n";
-}
-
-### configure all tex2pdf parameters interactively
-# parameters: none
-# return value: none
-
-sub configure {
-
-   print "\n--------------------------------------------------------\n";
-   print "\n***** Configuration for $MYNAME *****\n\n";
-   print "The following answers are considered as defaults in later ";
-   print "executions\n";
-   print "of $MYNAME. You can change these values by using the option ";
-   print "--configure \nagain.";
-   print "Additionally, all command-line options override these settings.\n";
-   print "Many parameters can be set to '$NIL' or '$UNDEF'. This means that NO";
-   print "\nvalue at all (not even an empty value) is passed over to the ";
-   print "called\napplication (e.g. latex package hyperref).\n";
-
-   $NUM_PARAM_MIN=1;
-   $NUM_PARAM_MAX=9;  
-
-   foreach my $key (@PARAMETER_ORDER) {
-      if(&full_param($key)) {
-         &config_param($key);
-      }
-   }
-
-   print "\nConfiguration for $MYNAME finished.\n\n";
-}
-
-### check if the most important executables are installed on the system
-# parameters: none
-
-sub check_commands {
-   my $exec_epstopdf;
-   ### check for which command
-   &checkCommand("which","You can switch off all command checks to fix this.");
-
-   ### pdftex executables
-   # Homepage: http://tug.org/applications/pdftex
-   &checkCommand("pdflatex","See pdftex homepage for details: http://tug.org/applications/pdftex");
-   &checkCommand("epstopdf","See pdftex homepage for details: http://tug.org/applications/pdftex");
-   $exec_epstopdf = `which epstopdf`;
-   chomp $exec_epstopdf;
-   my $compat = "-dCompatibilityLevel=1\\.1";
-   if (defined($ENV{'GS_OPTIONS'}) && $ENV{'GS_OPTIONS'} =~ /$compat/o) {
-      &report(9, "Good: ghostscript option '-dCompatibilityLevel=1.1' detected "
-         ."in\n'\$GS_OPTIONS'.");
-   } elsif (&grep_file($exec_epstopdf, $compat, $TRUE) > 0) {
-      &report(9, "Good: ghostscript option '-dCompatibilityLevel=1.1' detected "
-         ."in\n'$exec_epstopdf'.");
-   } else {
-      &report(4, "\nWARNING: no ghostscript option '-dCompatibilityLevel=1.1' "
-         ."in\n'$exec_epstopdf'.\n"
-         ."You might run into trouble with the conversions of bitmaps.\n"
-         ."Adjusting epstopdf or setting the environment variable GS_OPTIONS "
-         ."to \n".'"$GS_OPTIONS -dCompatibilityLevel=1.1" before calling this '
-         ."script\nmight help in this case.\n");
-   }
-
-   if ( &param_value('thumbpdf') eq $YES ) {
-      &checkCommand("thumbpdf","You can switch off thumbpdf support to fix this.");
-   }
-
-   if ( &param_value('ppower') eq $YES ) {
-      &checkCommand("ppower","You can switch off ppower support to fix this.");
-   }
-
-   ### authorindex perl script
-   if ( &param_value('authorindex') eq $YES ) {
-      &checkCommand("authorindex","You can switch off authorindex support to fix this.");
-   }
-
-   ### bibtex executable
-   if ( &param_value('bibtex') ne $NO or &param_value('gloss') ne $NO) {
-   &checkCommand("bibtex","You can switch off BibTeX support to fix this.");
-   }
-}
-
-#### generate the tmp file name from the original tex filename
-#### and make sure that they are not the same
-# parameter 1: orignal filename (with or without a path or .tex)
-# parameter 2: path for the tmp file (default: doc path)
-# return value: tmp name
-
-sub reserve_tmp_texname {
-   my $original_name = $_[0];
-   my $tmp_path = $_[1];
-   my $tmp_base_suffix = &param_value('tmp_base_suffix');
-   my $overwrite = &param_value('overwrite');
-   my $original_path;
-   my $original_base;
-   my $suffix;
-   my $pathed_tmp_base;
-   my @existing_files;
-
-   # separate path, base and suffix
-   ($original_base,$original_path,$suffix) = fileparse($original_name, '\.tex');
-   
-   # set the path of the tmp file
-   if(!$tmp_path) {
-      $tmp_path=$original_path;
-   } else {
-      $tmp_path .= '/' if( $tmp_path ne "" and ! ($tmp_path =~ m#/$#) );
-   }
-   
-   # abort if no absolute path is given 
-   if( index($tmp_path, "/") != 0 ) {
-      &abort("Internal error: Illegal argument for reserve_tmp_texname:".
-         "Given file has no absolute path: $original_name");
-   } 
-
-   # make sure that tmp_base_suffix is set correctly
-   if($tmp_base_suffix eq "") {
-      &abort("Temporary filename base suffix is empty.");
-   }
-
-   $pathed_tmp_base = $tmp_path.$original_base.$tmp_base_suffix;
-
-   # make sure no file with this base exists in this directory
-   @existing_files = glob "$pathed_tmp_base.*";
-   if (@existing_files != 0) {
-      &report(3, "Problems detected while reserving temporay file name!\n",
-         "In this directory are already files with this basename.\n",
-         "A list of the conflicting, existing files:\n",
-         join("\n", @existing_files), "\n");
-      if ($overwrite eq $YES) {
-         &report(4, "As you have activated the parameter 'overwrite' I will "
-	         ."continue.\n",
-	         "However, in order to protect the existing files I will not\n",
-	         "delete any files with this basename at the final clean-up.");
-      } else {
-         &report(2, "You could activate the parameter 'overwrite' or remove ",
-         "the\n corresponding files in order to avoid these problems."); 
-         &abort("No temporary name found for $original_name.");
-      }
-   } else {
-      push(@TMP_TEX_FILES, $pathed_tmp_base); 
-   }
-
-   return $pathed_tmp_base.$suffix;
-}
-
-### generate LaTeX file from LyX document with LyX itself
-# parameter ($1): Lyx document
-# parameter ($2): Latex document
-
-sub generate_tex_file {
-   my $lyx_doc = $_[0];
-   my $tex_doc = $_[1];
-   my $lyx_dir;
-   my $lyx_output;
-   my $lyx_exec=&param_value('lyx_exec');
-   
-   $lyx_dir = &param_value('lyxrc_path');
-   $lyx_dir .= '/' if( ! ($lyx_dir =~ m#/$#) );
-   $lyx_dir .= '/' if( ! ($lyx_dir =~ m#/$#) );
-
-   ### Check if LyX file can be accessed
-   &check_file($lyx_doc,"Cannot read the specified LyX document!");
-
-   ### Check if LaTeX file exists and is newer than the LyX file
-   if ( -f $tex_doc and -M $tex_doc < -M $lyx_doc ) {
-      &report(4, "\nLaTeX file is newer than LyX document ($lyx_doc).\n",
-      "Using existing TeX file: $tex_doc\n",
-      "Remove it to force its new generation.");
-   } else {
-      ### export LaTeX file with LyX (needs a display!)
-      &checkCommand($lyx_exec, "Cannot generate LaTeX document without LyX!");
-      &report(6, "\nExporting LaTeX file");
-      
-      ### move some files out of the way that stop LyX from exporting
-      foreach my $file ($lyx_dir."lyxpipe.out",$lyx_dir."lyxpipe.in",$tex_doc) {
-         if ( -f $file ) { rename($file, $file.'~'); }
-      }
-
-      $lyx_output = `$lyx_exec --export latex $lyx_doc 2>&1`;
-
-      ### check if LaTeX file now really exists
-      if ( ! -f $tex_doc ) {
-         &report(2, "Lyx Output:\n$lyx_output");
-         &report(2, "\nSorry. I cannot find '$tex_doc'.");
-         &abort("The LaTeX document was not generated by LyX!");
-      } else {
-         &report(8, "Lyx Output:\n$lyx_output");
-      }
-   }
-}
-
-#### search TeX document for a certain text tag (e.g. author, title)
-# parameter 1: file to parse
-# parameter 2: full TeX tag name
-# return value: list of the contents strings of all matching tags
-
-sub extract_tag_contents {
-   my $source=$_[0];
-   my $tag_name=$_[1];
-   my $contents;
-   my @results=();
-   my $error_message="Could not read TeX document to extract $tag_name";
-
-   &check_file($source, $error_message.'.');
-   open(EXTRACT_SOURCE, "<$source") or
-      &abort($error_message." ($source).");
-
-
-   while(<EXTRACT_SOURCE>) {
-      ### ignore comments
-      s/(^|[^\\])%.*/$1/;
-      # ignore \thanks{}
-      s/\\thanks\{.*?\}//g;
-      # change \and to and
-      s/\\and/ and/g;
-
-      $contents .= $_;
-   }
-
-   close EXTRACT_SOURCE;
-
-   $_ = $contents;
-
-   # add contents of all occurences of this tag in a line to result list
-   while ( /\\($tag_name)(\[[^]]*?\])*?{+([^{}]*?)}/s ) {
-      my $text = $3;
-      $_ = $';
-      # remove newlines
-      $text =~ s/\n//g;
-      $text="" if (!defined($text));
-      push(@results, $text);
-   }
-
-   return @results;
-}
-
-#### search for filenames in given TeX Tag in entire document
-### skip all comments and duplicates while parsing
-# parameter 1: file to parse
-# parameter 2: full TeX tag name
-# parameter 3: reference to a list of possible filename suffixes (without '.')
-# parameter 4: regexp for suffix to ignore when specified in TeX file
-#              (undef if not used)
-# return value: list of identified files
-
-sub identify_files {
-   my $source=$_[0];
-   my $tag_name=$_[1];
-   my @suffixes=@{$_[2]};
-   my $ignore_suffix=$_[3];
-   my @matched_tags;
-   my @found_files=();
-   my $regexp_suffixes;
-
-   # create one large regexp from given suffixes and escape dots in them
-   $regexp_suffixes= '.('.join('|', @suffixes).')';
-   $regexp_suffixes =~ s/\./\\./g;
-
-   @matched_tags = &extract_tag_contents($source, $tag_name);
-
-   foreach my $tag_contents (@matched_tags) {
-      my $path;
-      my $base;
-      my $suffix;
-      my $kpse_result;
-      my $working_dir = cwd."/";
-
-      ($base,$path,$suffix) = fileparse($tag_contents, $regexp_suffixes);
-
-      # if a suffix is specified in the tag_contents handle it as requested
-      # 
-      # 1. $suffix: TRUE if $suffix is defined and not of zero length
-      #    means: a valid suffix has been found in the filename
-      # 2. defined($ignore_suffix): TRUE if $ignore_suffix is defined
-      #    means: a regexp for suffixes to be ignored has been specified as
-      #          parameter4
-      # 3. $suffix =~ /$ignore_suffix/: TRUE if $suffix matches the regexp
-      #    means: the suffix in the filename is wanted to be ignored
-      #
-      # The IF statement will be executed when:
-      #   a valid suffix has been found in the filename (1)
-      #   AND regexp for suffixes to be ignored has NOT been specified (not 2)
-      # OR
-      #   a valid suffix has been found in the filename (1)
-      #   AND regexp for suffixes to be ignored has been specified (2)
-      #   AND the suffix in the filename is NOT wanted to be ignored (not 3)
-      #
-      # The stuff that is executed if the entire IF statement is TRUE does the
-      # following: accept the found suffix and consider it as the only possible
-      # file name.
-      if($suffix and not (defined($ignore_suffix) and $suffix =~ /$ignore_suffix/)){
-         $kpse_result=`kpsewhich $tag_contents`;
-         # print warning and skip this tag if kpsewhich could not find it  
-         if (!$kpse_result) {
-            &report(4, "WARNING - Could not identify referenced file:\n",
-            " Ignoring '$tag_contents'.");
-            next;
-         }
-      } else {
-         # if there is a '.' in the basename assume that this is a reference
-         # to a file of another type and skip it
-         if( $base =~ /\./ ) {
-            &report(9, "Found an unknown extension. Ignoring '$tag_contents'.");
-            next;
-         }
-
-         # search for all possible files with allowed suffixes
-         foreach my $allowed_suffix (@suffixes) {
-            if (not $allowed_suffix =~ /[\]\)\(\|\[\\]/ ) {
-               # suffix is not a regexp, but a real extension
-               my $possible_file= $path.$base.'.'.$allowed_suffix;
-               $kpse_result=`kpsewhich $possible_file`;
-               if ($kpse_result) {
-                  last;
-               }
-            }
-         }
-      } 
-      
-      # if kpsewhich could not find any file with an allowed suffix
-      # assume that this reference is of a different type and skip it
-      # quietly   
-      if (!$kpse_result) {
-         &report(9, "No suitable file found. Ignoring '$tag_contents'.");
-         next;
-      }
-
-      # expand '.' in kpsewhich output to the current path
-      $kpse_result =~ s#^\./#$working_dir#;
-      
-      # remove trailing newline
-      chomp($kpse_result);
-
-      # add file to the found file list if it is not already on it
-      if( &array_index($kpse_result, @found_files) < 0 ) {
-         push(@found_files, $kpse_result);
-      }
-   }
-
-   return @found_files;
-}
-
-### Build a list of all files which are included from the root file.
-# This function recurses, and is maybe smart enough to detect cycles.
-# Be sure to set REF_DOCS to the empty string prior to calling this.
-# parameter 1: tex file to start with
-# no return value
-# result is appended to global variable @REF_DOCS
-
-sub get_file_list {
-   my $source = $_[0];
-   my @imports = ();
-
-   # This is the cycle avoidance logic.
-   if ( &array_index($source, @REF_DOCS) < 0 ) {
-      # Make sure the file can be accessed
-      &check_file($source, "Included TeX file seems not to be available. Path problem?");
-
-      # Save the argument in the list of files.
-      push(@REF_DOCS, $source);
-
-      # Get the list of files included by the argument.
-      @imports=&identify_files($source, 'include|input', ['tex']);
-
-      # Recurse.
-      foreach my $file (@imports) {
-         if( ! ($file =~ /\.tex$/) ) { $file .= '.tex'; }
-         &get_file_list($file);
-      }
-   }
-}
-
-### do the required modifications in the LaTeX preamble 
-# parameter 1: original preamble from the source file
-#              lines before \begin{document} tag (without this tag)
-# parameter 2: reference to hyperref parameter list
-# return value: adjusted preamble
-
-sub adjust_preamble {
-   my $preamble = $_[0];
-   my $hyperref_params_ref = $_[1];
-   my $extra_code;
-   my $result;
-   
-   $_ = $preamble;
-
-   # protect pdflatex execution mode
-   s/^(\\batchmode)$/% $1/m;
-
-   # insert a4paper in the documentclass when a4wide is used 
-   # fixes problem that hyperref defaults to letter otherwise
-   if ( /^[^%]*\\usepackage(\[widemargins\])?\{(a4|a4wide)\}/m ) {
-      # check if package parameters with [] brackets are present
-      if ( not s/^(\\documentclass\[.*?)\]/$1,a4paper]/m ) {
-         s/^\\documentclass/$&\[a4paper\]/m;
-      }
-   }
-
-   ### collect additional LaTeX code
-   
-   $extra_code = "\n" . '\usepackage{pslatex}' . "\n";
-
-   if ( &param_value('thumbpdf') eq $YES ) {
-      $extra_code .= '\usepackage{thumbpdf}' . "\n";
-   } else {
-      $extra_code .= "% no thumbpdf support\n";
-   }
- 
-#   if ( &param_value('ppower') eq $YES ) {
-#      $extra_code .= '\usepackage{mpmulti}' . "\n";
-#   } else {
-#      $extra_code .= "% no ppower support\n";
-#   }
-
-   if ( &param_value('authorindex') eq $YES ) {
-      $extra_code .= '\usepackage[pages]{authorindex}' . "\n";
-      $extra_code .= '\let\cite=\aicite' . "\n";
-   } else {
-      $extra_code .= "% no authorindex support\n";
-   }
-
-   $extra_code .= '\makeatletter' . "\n";
-   $extra_code .= '\usepackage[' . join(',', @$hyperref_params_ref)
-                  . ']{hyperref}' . "\n";
-   $extra_code .= '\makeatother' . "\n";
-   
-   ### insert the extra LaTeX code directly after documentclass
-   m/^(\\documentclass)(\[[^]]*\])?(\{.*\})/m;
-   return $` . $& . $extra_code . $';
-}
-
-### adjust all filenames in the LaTeX code to the tmp files
-# parameter 1: original LaTeX code from the source file
-# return value: adjusted code
-
-sub adjust_filenames {
-   my $code = $_[0];
-   my $tmp_suffix = &param_value('tmp_base_suffix');
-   my $result;
-   
-   $_ = $code;
-
-   # cut off the suffix of eps, ps, *.gz and pstex graphics
-   s/((\\includegraphics)(\[[^]]*?\])?(\{[^}]+?))\.(e?ps|pstex|e?ps\.gz)\n?\}/$1}/sg;
-
-   # replace the suffix 'pstex_t' with 'pdf_t'
-   s/(\\input\{[^}]+?\.)pstex_t\n?\}/$1pdf_t}/sg;
-
-   if ( &param_value('mtp_preamble') eq $NO ) {
-      # cut off the suffix of mmp graphics
-      s/(\\multiinclude(\[[^]]*?\])?\{[^}]+?)\.mmp\n?\}/$1}/sg;
-   } else {
-      # replace the suffix '.#' with '-mp.#'
-      s/(\\includegraphics(\[[^]]*?\])?\{[^}]+?)\.(\d+?)\n?\}/$1$MTP_TMP_BASESUFFIX\.$3}/sg;
-
-      # replace the suffix '.#' with '-mp.#'
-      s/(\\convertMPtoPDF(\[[^]]*?\])?\{[^}]+?)\.(\d+?)\n?\}/$1$MTP_TMP_BASESUFFIX\.$3}/sg;
-
-      # cut off optional suffix '.mmp' and append '-mp' in any case
-      s/(\\multiinclude(\[[^]]*?\])?\{[^}]+?)(\.mmp)?\n?\}/$1$MTP_TMP_BASESUFFIX}/sg;
-   }
-
-   # insert the tmp_suffix in tex filenames
-   # I assume that files with no extension are TeX files as well; correct?
-   s#(\\(input|include)\{([^}]*?/)?[^}/.]+?)((\.tex)?\n?\})#$1$tmp_suffix$4#sg;
-
-   return $_;
-}
-
-### Convert given tex file to the temp tex file we need for pdftex
-### major task is to change the reference in the tex files to the
-### corresponding tmp files
-# parameter 1: tex source file
-# parameter 2: tex tmp file
-# parameter 3: reference to hyperref parameter list or
-#              'undef' if preamble should not be changed
-
-sub convert_tex2tmp {
-   my $source = $_[0];
-   my $target = $_[1];
-   my $hyperref_params_ref = $_[2];
-   my $contents;
-   my $preamble;
-   my $body;
-   my $adjust_preamble = defined($hyperref_params_ref) ? $YES : $NO;
-   my $read_err_msg = "Could not read original TeX document to generate temporary document";
-   
-   ### open source and target file
-   &check_file($source, $read_err_msg . '.');
-   open(SOURCE_FILE, "<$source") or
-      &abort($read_err_msg . " ($source).");
-
-   ### read in the LaTeX source file
-   $contents = "";
-   while(<SOURCE_FILE>) {
-      $contents .= $_;
-   }
-
-   close SOURCE_FILE;
-
-   ### prepare the LaTeX code for PDF generation 
-   if ( $adjust_preamble eq $YES ) {
-      $contents =~ m/^ *\\begin\{document\} *$/m;
-      $preamble = $`;
-      $body = $&.$';
-      $preamble = &adjust_preamble($preamble, $hyperref_params_ref);
-      $preamble = &adjust_filenames($preamble);
-   } else {
-      $preamble = "";
-      $body = $contents;
-   }
-   
-   $body = &adjust_filenames($body);
-      
-   ### write the new LaTeX target file
-   open(TARGET_FILE, ">$target") or
-      &abort("Could not open file to write temporary TeX document ($target).");
-
-   print TARGET_FILE $preamble.$body;
-   
-   close TARGET_FILE;
-}
-
-### Convert the given EPS image to PDF
-# parameters $1: EPS image filename with absolute path
-# return value: none
-
-sub convert_eps2pdf {
-   my $image = $_[0];
-   my $image_path;
-   my $image_base;
-   my $image_name;
-   my $suffix;
-   my $image_target;
-   my $zipped = 0;
-   my $dummy;
-
-   ($image_base,$image_path,$suffix) = fileparse($image, '\.eps', '\.ps', '\.pstex', '\.gz');
-   if ($suffix eq "\.gz") {
-	$zipped = 1;
-	($image_base,$dummy,$suffix) = fileparse($image_base, '\.eps', '\.ps', '\.pstex');
-   }
-   $image_name = $image_base . $suffix;
-   $image_target = $image_path . $image_base . '.pdf';
-   
-   #### check if image file really exists
-   #&check_file($image, "Could not convert referenced image.");
-
-   ### return if image directory is not writeable
-   if (! -w $image_path) {
-      &report(4, "WARNING - Image directory not writable: $image_path\n",
-      " Skipping '$image_name', assume you have converted it manually.");
-      return;
-   }
-
-   if ( ! -f $image_target or -M $image_target > -M $image ) {
-      &report(7, "Converting image $image_name to $image_target ...\n");
-      if ($zipped > 0) {
-         &system_command("gunzip -c $image | epstopdf -f -outfile=$image_target",
-         $TRUE, 8, "epstopdf failed on $image_name");
-      } else {
-         &system_command("epstopdf -outfile=$image_target $image",
-         $TRUE, 8, "epstopdf failed on $image_name");
-      }
-      if (&param_value('delete_pdf_images') eq $YES) {
-         push(@TMPFILES, $image_target);
-      }
-   } else {
-      &report(7, "$image_base.pdf newer than $image_name, conversion skipped...");
-   }
-}
-
-### Convert the given PSTEX_T file to PDF_T
-# parameters 1: PSTEX_T filename with absolute path
-# return value: none
-
-sub convert_pstex2pdf {
-   my $pstex_file = $_[0];
-   my $pstex_path;
-   my $pstex_base;
-   my $pstex_name;
-   my $suffix;
-   my $pstex_target;
-   my @eps_images;
-
-   ($pstex_base,$pstex_path,$suffix) = fileparse($pstex_file, ('\.pstex_t'));
-   $pstex_name = $pstex_base . $suffix;
-   $pstex_target = $pstex_path . $pstex_base . '.pdf_t';
-   
-   #### check if image file really exists
-   #&check_file($pstex_file, "Could not convert referenced file.");
-
-   ### return if directory is not writeable
-   if (! -w $pstex_path) {
-      &report(4, "WARNING - Directory not writable: $pstex_path\n",
-      " Skipping '$pstex_name', assume you have converted it manually.");
-      return;
-   }
-
-   # descend into file
-   &report(7, "Converting file $pstex_name ...\n");
-
-   # find included EPS image(s)
-   @eps_images=&identify_files($pstex_file, 'includegraphics',
-      ['pstex', 'pstex\.gz']);
-
-   # create .pdf_t file
-   &convert_tex2tmp($pstex_file, $pstex_target, undef); 
-
-   # put tmp file in the tmp file list
-   push(@TMPFILES, $pstex_target);
-
-   # convert image(s) to pdf
-   foreach my $image (@eps_images) {
-      &convert_eps2pdf($image);
-   }
-}
-
-### Convert the given MP image to PDF
-# parameters $1: MP image filename with absolute path
-# return value: none
-
-sub convert_mp2pdf {
-   my $image = $_[0];
-   my $image_path;
-   my $image_base;
-   my $image_name;
-   my $suffix;
-   my $image_target;
-   my $image_src;
-   my @mps_fig=();
-   my $mp_fig;
-
-   ($image_base,$image_path,$suffix) = fileparse($image, '\.mp|\.mmp');
-   $image_name = $image_base . $suffix;
-   $image_src=$image_path . $image_base . $suffix;
-
-   @mps_fig= &grep_file($image_path.$image_name,'beginfig',$TRUE);
-   $_=$mps_fig[0];
-   /(\d)/;
-   $mp_fig=$1;
-   if (&param_value('mtp_preamble') eq $YES) {
-     $image_target = $image_path . $image_base . $MTP_TMP_BASESUFFIX . '.' . $mp_fig;
-     $image_name=$image_base.$MTP_TMP_BASESUFFIX.$suffix;
-   } else {
-     $image_target = $image_path . $image_base . '.' . $mp_fig;
-   }
-
-   #### check if image file really exists
-   #&check_file($image, "Could not convert referenced image.");
-
-   ### return if image directory is not writeable
-   if (! -w $image_path) {
-      &report(4, "$MYNAME: WARNING - Image directory not writable: $image_path\n",
-         " Skipping '$image_name', assume you have converted it manually.");
-      return;
-   }
-
-   if ( ! -f $image_target 
-      or  (-M $image_target > -M $image_src)
-      or  ( ( &param_value('mtp_preamble') eq $YES)
-      and (-M $image_target > -M $image_path.$MTP_PREAMBLE_FILENAME) ) ) {
-      &report(7, "Converting image $image_name ...\n");
-      my $working_dir = cwd."/";
-      chdir("$image_path") or &abort("cannot cd to $image_path($!)");
-      if ( &param_value('mtp_preamble') eq $YES ) {
-         &modify_mp_file($image_base,$suffix);
-      }
-      &system_command("mpost $image_name",
-         $TRUE, 8, "mpost failed on $image_name");
-      chdir("$working_dir") or &abort("cannot cd to $working_dir($!)");
-      if (&param_value('delete_pdf_images') eq $YES) {
-         push(@TMPFILES, $image_target);
-      }
-   } else {
-      if ( &param_value('mtp_preamble') eq $YES ) {
-        &report(7, "$image_base$MTP_TMP_BASESUFFIX.$mp_fig newer than $image_base$suffix, conversion skipped...");
-      } else {
-        &report(7, "$image_base.$mp_fig newer than $image_base$suffix, conversion skipped...");
-      }
-   }
-}
-
-### Convert the given MP image to PDF
-# parameters $1: MP image filename with absolute path
-# return value: none
-
-sub modify_mp_file {
-   my $base=$_[0];
-   my $suffix=$_[1];
-   my $preamble_file=$MTP_PREAMBLE_FILENAME;
-
-   my $mp_source=$base.$suffix;
-   my $mp_target=$base.$MTP_TMP_BASESUFFIX.$suffix;
-
-   ### open source and target file
-   open(SOURCE_FILE, "<$mp_source") or
-      &abort("Could not open $mp_source to add $preamble_file ($mp_source).");
-
-   open(TARGET_FILE, ">$mp_target") or
-      &abort("Could not open $mp_target to add $preamble_file ($mp_source).");
-
-   open(PREAMBLE_FILE, "<$preamble_file") or
-      &abort("Could not open $preamble_file to be added to metapost files ($mp_source).");
-
-   ### set target file as stdout
-   select TARGET_FILE;
-   print  'verbatimtex' . "\n";
-   print  '%&latex' . "\n"; # This forces metapost to use latex in the compilation
-   print  '\documentclass[english]{article}' . "\n"; # we have to decide if this sentence goes in preamble.cfg or here
-                                                     # english must be added
-                                                     # to preamble in order to
-                                                     # make work mpost, why ???
-   while(<PREAMBLE_FILE>) {
-      print $_
-   }
-   print  '\begin{document}' . "\n"; # we have to decide if this sentence goes in preamble.cfg or here
-   print  'etex' . "\n";
-   while(<SOURCE_FILE>) {
-      print $_
-   }
-   print  'verbatimtex' . "\n";
-   print  '\end{document}' . "\n";
-   print  'etex' . "\n";
-
-   ### set STDOUT as stdout again
-   select STDOUT;
-
-   ### close files
-   close SOURCE_FILE;
-   close TARGET_FILE;
-   close PREAMBLE_FILE;
-
-}
-
-
-### Convert included images to pdf
-# parameter 1: tex source file
-# no return value
-
-sub convert_images {
-   my $tex_source=$_[0];
-   my @pstex_file_list;
-   my @image_list;
-   my @mp_image_list;
-   my @mmp_image_list;
-   my @major_suffixes;
-   my $ignore_regexp;
-
-   &report(6, "\nConverting images referenced in $tex_source.");
-
-   ##### Get images of major type from the source file
-   @major_suffixes = (@BITMAP_SUFFIXES, $PDF_ORIG_SUFFIX, @EPS_SUFFIXES);
-   $ignore_regexp = '.('.join('|',@EPS_SUFFIXES).')';
-   $ignore_regexp =~ s/\./\\./g;
-
-   &report(6, "\nScanning for major image types (".join(', ',@major_suffixes)."):");
-   @image_list = &identify_files($tex_source,'includegraphics',
-      \@major_suffixes, $ignore_regexp );
-
-   if ( @image_list > 0 ) {
-      &report(7, join("\n", @image_list));
-   } else {
-      &report(7, "None.");
-   }
-
-   ##### Get PSTEX_T files from the source file
-   &report(6, "\nScanning for PSTEX_T files (.pstex_t):");
-   @pstex_file_list=&identify_files($tex_source, 'input', ['pstex_t']);
-   if ( @pstex_file_list > 0 ) {
-      &report(7, join("\n", @pstex_file_list));
-   } else {
-      &report(7, "None.");
-   }
-
-   ##### Get MP images from the source file
-   &report(6, "\nScanning for MP images (.mp):");
-   @mp_image_list=&identify_files($tex_source,
-      'convertMPtoPDF|includegraphics',['mp','(\d+)'],'\.(\d+)');
-   # FIXME
-   # fixed for now by ignoring strange extension in identify_files
-   #
-   # the above could cause problems as identify_files is expecting a list of
-   # real extensions and not of regexps
-   # maybe the only way to fix this is to adjust identify_files to ignore
-   # invalid extension when testing them with kpsewhich
-   # ALTERNATIVE: design identify_files to use preffered_suffixes instead
-   # of ignore_suffixes
- 
-   if ( @mp_image_list > 0 ) {
-      &report(7, join("\n", @mp_image_list));
-   } else {
-      &report(7, "None.");
-   }
-
-   ##### Get MMP images from the source file
-   &report(6, "\nScanning for MMP images (.mmp):");
-   @mmp_image_list=&identify_files($tex_source,'multiinclude',['mmp']);
-   if ( @mmp_image_list > 0 ) {
-      &report(7, join("\n", @mmp_image_list));
-   } else {
-      &report(7, "None.");
-   }
-
-   ### Convert EPS images to PDF, copy pdf.orig image files to pdf,
-   ### and simply ignore all other
-   if ( @image_list > 0) {
-      my $handled_suffixes;
-
-      &report(6, "\nProcessing images of major types:");
-   
-      # create one large regexp from suffixes and escape dots in them
-      $handled_suffixes = '.('.join('|',(@EPS_SUFFIXES, $PDF_ORIG_SUFFIX)).')';
-      $handled_suffixes =~ s/\./\\./g;
-
-      foreach my $image (@image_list) {
-         my $path;
-         my $base;
-         my $suffix;
-         ($base,$path,$suffix) = fileparse($image, $handled_suffixes);
-         if (not $suffix) {
-            &report(7, "No special handling required for image: $base$suffix");
-         } elsif ($suffix eq ('.'.$PDF_ORIG_SUFFIX) ) {
-            my $image_target = $path.$base.'.pdf';
-               
-            if ( ! -f $image_target or -M $image_target > -M $image ) {
-               &report(7, "Create temporary PDF file from original: $base$suffix");
-               copy($image, $image_target)
-                  or &abort("Could not create tmp file: $!");
-               if (&param_value('delete_pdf_images') eq $YES) {
-                  push(@TMPFILES, $image_target);
-               }
-            } else {
-               &report(7, "$base.pdf newer than $base$suffix, copy skipped ...");
-            }
-         } else {
-            &convert_eps2pdf($image);
-         }
-      }
-   }
-
-   ### Convert all PSTEX_T files to PDF_T
-   if ( @pstex_file_list > 0 ) { 
-      &report(6, "\nConverting pstex_t docs to pdf_t docs");
-      foreach my $image (@pstex_file_list) {
-         &convert_pstex2pdf($image);
-      }
-   }
-
-   ### Convert all MP images to PDF
-   if ( @mp_image_list > 0) {
-      &report(6, "\nConverting MP images to PDF");
-      foreach my $image (@mp_image_list) {
-         &convert_mp2pdf($image);
-      }
-   }
-
-   ### Convert all MMP images to PDF
-   if ( @mmp_image_list > 0) {
-      &report(6, "\nConverting MMP images to PDF");
-      foreach my $image (@mmp_image_list) {
-         &convert_mp2pdf($image);
-      }
-   }
-
-   &report(6, "\nFinished converting for ${tex_source}.");
-}
-
-### run pdflatex
-# parameter 1: LaTeX file without extension
-# parameter 2: log-file where the full out put is stored
-# return value: 0 - no errors (no rerun); 1 - errors (rerun required)
-
-sub run_pdflatex {
-   my $texfile=$_[0];
-   my $logfile=$_[1];
-   my @errors=();
-   my $exit_status=0;
-   my $extra_options=&param_value('pdftex_opts');
-
-   if( !defined($extra_options) or $extra_options eq $NIL ) {
-      $extra_options = "";
-   }
-   
-   &report(7, "Running pdflatex. This may take a while.\n");
-   system("pdflatex --interaction nonstopmode $extra_options $texfile > $logfile 2>&1");
-   $exit_status=$?;
-   &report(7, "Pdflatex finished. Errors:");
-
-   ### extract all errors and warnings from the log file
-   @errors = &grep_file($logfile, '(Emergency stop|Error|Warning).*:');
-
-   ### make sure thumbpdf package does not spoil rerun detection
-   ### as it will be processed very last
-   if(grep(/Package thumbpdf/, @errors) == @errors) { @errors=(); }
-   
-   if ( @errors != 0 or $exit_status != 0 ) {
-      if ( grep(/Emergency stop/, @errors) != 0 ) {
-         &report(2, &file_tail($logfile,10));
-         &report(2, "\nSee $logfile for details.");
-         &abort("Fatal error occured. I am lost.");
-      }
-      if( @errors != 0 ) {
-         &report(8, @errors);
-      } else {
-         &report(8, &file_tail($logfile,10));
-      }
-      &report(7, "\nSee $logfile for details.");
-      return $FALSE;
-   } else {
-      &report(7, "None detected (log file: $logfile).");
-      return $TRUE;
-   }
-}
-
-#### run bibtex if BIBTEX=$YES or a bibliography tag is found
-# included tex files are not parsed for a bibliography
-# parameter 1: filename of the aux file without .aux suffix
-# parameter 2: log-file where the full out put is stored
-
-sub handle_bibtex {
-   my $auxfile=$_[0];
-   my $logfile=$_[1];
-   my $run_bibtex=$FALSE;
-   my $bibtex_param=&param_value('bibtex');
-   
-   if ( $bibtex_param eq $YES ) {
-      $run_bibtex=$TRUE;
-      &report(7, "BibTeX parameter set to '$YES':");
-   } else {
-      &report(7, "Checking for BibTeX bibliography in main document: ");
-      if( &grep_file($auxfile.'.tex', '^[^%]*\\\\bibliography{') != 0) {
-         $run_bibtex=$TRUE;
-         &report(7, "Bibliography detected.");
-      } else {
-         if ( @REF_DOCS > 0 ) {
-            &report(7, "Checking for BibTeX bibliography in included documents:");
-            foreach my $file (@REF_DOCS) {
-               if( &grep_file($file, '^[^%]*\\\\bibliography{') != 0) {
-                   $run_bibtex=$TRUE;
-                   &report(7, "Bibliography detected.");
-               } else {
-                 &report(7, "No bibliography detected in $file.");
-               }
-            }
-         } else {
-           &report(7, "No bibliography detected.");
-        }
-      }
-   }
-
-   if ( $run_bibtex ) {
-      my @errors=();
-      my $exit_status=0;
-
-      &report(7, "Running bibtex. This may take a while.\n");
-      system "bibtex $auxfile > $logfile";
-      $exit_status=$?;
-      &report(7, "Bibtex finished. Errors:");
-
-      ### extract all errors and warnings from the log file
-      @errors=&grep_file($logfile, 'error message');
-
-      if ( @errors != 0 or $exit_status != 0 ) {
-         &report(4, &file_tail($logfile));
-         &report(4, "\nYou can switch off BibTeX support by setting the bibtex parameter accordingly.");
-      } else {
-         &report(7, "None detected (log file: $logfile).");
-      }
-   }
-}
-
-#### run bibtex on file.gls if BIBTEX=$YES or a bibliography tag is found
-# included tex files are not parsed for a bibliography
-# parameter 1: filename of the aux file without .aux suffix
-# parameter 2: log-file where the full out put is stored
-
-sub handle_gloss {
-   my $auxfile=$_[0];
-   my $logfile=$_[1];
-   my $run_gloss=$FALSE;
-   my $gloss_param=&param_value('gloss');
-   my $glsfile=$auxfile.'.gls';
-   
-   if ( $gloss_param eq $YES ) {
-      $run_gloss=$TRUE;
-      &report(7, "Gloss parameter set to '$YES':");
-   } else {
-      &report(7, "Checking for Gloss bibliography in main document: ");
-      if( &grep_file($auxfile.'.tex', '^[^%]*\\\\printgloss{') != 0) {
-         $run_gloss=$TRUE;
-         &report(7, "Gloss bibliography detected.");
-      } else {
-        if ( @REF_DOCS > 0 ) {
-           &report(7, "Checking for Gloss bibliography in included documents:");
-           foreach my $file (@REF_DOCS) {
-              if( &grep_file($file, '^[^%]*\\\\printgloss') != 0) {
-                  $run_gloss=$TRUE;
-                  &report(7, "Gloss bibliography detected.");
-              } else {
-                &report(7, "No gloss database detected in $file.");
-              }
-           }
-        } else {
-          &report(7, "No gloss database detected.");
-	}
-      }
-   }
-   if ( $run_gloss ) {
-      my @errors=();
-      my $exit_status=0;
-
-      &report(7, "Running bibtex on $glsfile. This may take a while.\n");
-      system "bibtex $glsfile > $logfile 2>&1";
-      $exit_status=$?;
-      &report(7, "Bibtex finished. Errors:");
-
-      ### extract all errors and warnings from the log file
-      @errors=&grep_file($logfile, 'error message');
-
-      if ( @errors != 0 or $exit_status != 0 ) {
-         &report(4, &file_tail($logfile));
-         &report(4, "\nYou can switch off Gloss support by setting the gloss parameter accordingly.");
-      } else {
-         &report(7, "None detected (log file: $logfile).");
-      }
-   }
-}
-
-#### run thumbpdf command to make thumbnails
-# more informations: /usr/share/texmf/doc/pdftex/thumbpdf/readme.txt
-# parameter 1: LaTeX file without extension
-# parameter 2: log-file where the full out put is stored
-
-sub run_thumbpdf {
-   my $texfile=$_[0];
-   my $logfile=$_[1];
-   my $exit_status=0;
-
-   &report(7, "\nCreating thumbnails with 'thumbpdf'\n");
-   &system_command("thumbpdf $texfile", $FALSE, 8,
-      "thumbpdf failed.\n"
-      ."I will continue, but maybe there will not be thumbs in the PDF doc.");
-
-   if ( -f 'thumbpdf.log' ) {
-      move('thumbpdf.log', $logfile);
-      &report(7, "\nSee $logfile for details.");
-   }
-
-   ### store possible tmp files
-   push(@TMPFILES, glob 'thumb???.png');
-   push(@TMPFILES, 'thumbpdf.pdf');
-   push(@TMPFILES, 'thumbdta.tex'); 
-   push(@TMPFILES, $texfile.'.tpt');
-}
-
-
-#### run ppower command to make presentations
-# more informations: 
-# parameter 1: LaTeX file without extension
-# parameter 2: log-file where the full out put is stored
-
-sub run_ppower {
-   my $texfile=$_[0];
-   my $logfile=$_[1];
-   my $exit_status=0;
-   my $infile;
-   my $outfile;
-   my $texfile_base;
-   my $texfile_path;
-   my $texfile_suffix;
-
-   ##### Getting document name, suffix and path
-   ($texfile_base,$texfile_path,$texfile_suffix) = fileparse($texfile,&param_value('tmp_base_suffix'));
-
-   $infile=$texfile_base.'.pdf';
-   $outfile=$texfile_base.'_p4.pdf';
-
-   &report(7, "\nPostprocessing PDF file with 'ppower'\n");
-   if(&system_command("ppower $infile $outfile", $FALSE, 8,
-      "ppower failed.\nI will continue, "
-      ."but maybe there will not be pause effects in the PDF doc.")) {
-      &report(7, "\nThe postprocessed pdf file is: $outfile\n");
-   }
-
-   if ( -f 'ppower.log' ) {
-      move('ppower.log', $logfile);
-      &report(7, "See $logfile for details.");
-   }
-}
-
-#### run authorindex command to obtain an author index
-# more informations: 
-# parameter 1: LaTeX file without extension
-# parameter 2: log-file where the full out put is stored
-
-sub run_authorindex {
-   my $texfile=$_[0];
-   my $logfile=$_[1];
-   my $exit_status=0;
-
-   &report(7, "\nProcessing file with 'authorindex'\n");
-   &system_command("authorindex $texfile", $FALSE, 8,
-      "authorindex failed.\nI will continue, "
-      ."but maybe there will not be an author index in the PDF doc.");
-
-   if ( -f 'authorindex.log' ) {
-      move('authorindex.log', $logfile);
-      &report(7, "\nSee $logfile for details.");
-   }
-
-}
-
-
-##### read and analyse configuration and options and adjust basic variables
-##### accordingly
-#### The following sources are considered (last value overrides previous)
-##   1. general configuration (global variables in the script)
-##   2. private configuration (in user's RC file)
-##   3. command line options
-# parameters: none 
-# return value: given document argument
-
-sub adjust_configuration {
-   my $valid_rcfile = $FALSE;
-   my %opt_specs =();
-   
-   ### Check number of arguments
-   if ( @ARGV == 0 ) {
-      &report(1, "\nI need at least one argument!");
-      &print_usage;
-      exit 1;
-   }
-   
-   ##### command line options and private configuration files handling
-   
-   ### set parameters from rc file
-   if ( -f $RC_FILENAME ) {
-      my $rcfile_version;
-      $rcfile_version = &read_configuration($RC_FILENAME);
-      if( $rcfile_version == $MYRCFILE_VERSION ) {
-         $valid_rcfile = $TRUE;
-      } elsif ( $rcfile_version == 0 ) {
-         &report(4, "Could not determine version of read RC file.");
-      } else {
-         &report(4, "Version of read RC file ($rcfile_version) and ",
-            "this script ($MYRCFILE_VERSION) differs.");
-      }
-   }
-   
-   ### scan parameters 
-   foreach (keys %PARAMETER_LIST) {
-      $opt_specs{&option_specifier($_)} = \&handle_option;
-   }
-   if(! GetOptions(%opt_specs)) {
-      &print_usage;
-      &abort("An error occured while processing command line options");
-   }
-
-   if( ! $valid_rcfile ) {
-      &report(3,"No valid configuration file found. Please run '$MYNAME "
-         ."--configure'.\nUsing default values for missing parameters in this "
-         ."session.");
-   }
-
-   ### As the configuration process is done now, it is time to set the
-   #   global configuration flag
-   $CONFIGURED = $TRUE;
-   
-   #### do some test in order to secure as good as possible that we will
-   #### succeed before to much work was done and maybe some data as damaged
-
-   ### make sure that tmp_base_suffix is not empty
-   if ( &param_value('tmp_base_suffix') eq "" ) {
-      &report(2, "\nCAUTION: Empty tmp_base_suffix would destroy the original files!");
-      &abort("Parameter tmp_base_suffix is not set.");
-   }
-   
-   ##### check for required commands
-   if (&param_value('check_commands') ne $NO ) {
-      &check_commands;
-   }
-
-   ### Check number of arguments
-   if ( @ARGV != 1 ) {
-      &report(1, "\nWrong number of arguments. I need exactly one file.");
-      &print_usage;
-      exit 1;
-   }
-   
-   return $ARGV[0];
-}
-
-#### prepare the logdir for the log files of the various called appplications
-
-sub prepare_logdir {
-   my $log_dir= &param_value('logdir');
-   my $my_new_log;
-
-   ##### Preparing the LOGDIR
-   if (! &check_dir($log_dir, "Could not create log directory", $YES)) {
-      &abort("Please, set a different path and restart");
-   }
-
-   # make sure there is a slash at the end of the path
-   $log_dir .= '/' if( ! ($log_dir =~ m#/$#) );
-   
-   if( <$log_dir/*.log> and &param_value('clean_logs') eq $YES ) { 
-      &report(6, "\nRemoving old log files ($log_dir).");
-      unlink (<$log_dir/pdflatex-*.log>, <$log_dir/bibtex-*.log>,
-         <$log_dir/gloss-*.log>, <$log_dir/thumbpdf-*.log>,
-         <$log_dir/ppower-*.log>, <$log_dir/authorindex-*.log>,
-         <$log_dir/tex2pdf-*.log>);
-   } else {
-      &report(6, "\nAll log files will be stored in ($log_dir).");
-   }
-
-   ### move my pre-configuration log file to specified log directory
-   $my_new_log = "$log_dir/tex2pdf-$$.log";
-   if ( move($MYLOGFILE, $my_new_log) ) {
-      $MYLOGFILE = $my_new_log;
-   } else {
-      &report(3, "Could not move '$MYLOGFILE' to logdir: $!");
-   }
-}
-
-##### analyse document argument
-#### process the one and only argument (besides the options) which specifies
-#### which LaTeX document the user wants to translate to PDF
-#### a lyx file will be translated to LaTeX first
-# parameter 1: argument
-
-sub process_doc_argument {
-   my $argument = $_[0];
-   my $doc_base;
-   my $doc_path;
-   my $arg_suffix;
-   
-   ##### Getting document name, suffix and path
-   ($doc_base,$doc_path,$arg_suffix) = fileparse($argument, ('\.tex', '\.lyx'));
-
-   if (! defined($arg_suffix) or $arg_suffix eq "") {
-      $arg_suffix = '.tex';
-   }
-   
-   ###### change working directory to document directory
-   if ( $doc_path ne "" ) {
-      chdir $doc_path;
-   }
-   
-   ###### make DOCPATH an absolute path
-   $doc_path = cwd.'/';
-   
-   ###### Cut off suffix and do lyx or tex specific stuff
-   if ( $arg_suffix eq '.lyx' ) {
-      # Lyx document argument: generate Latex document if required
-      &generate_tex_file($doc_base.'.lyx', $doc_base.'.tex');
-   } else {
-      # LaTeX document argument: check access to given LaTeX document
-      &check_file($doc_base.'.tex', "Cannot read the specified LaTeX document!");
-   }
-   
-   return $doc_path.$doc_base.'.tex';
-}
-
-#### handle the dir of the input path if the document has one and
-# parameter 1: main tex doc
-# return value: absolute input path
-
-sub process_inputpath {
-   my $texdoc = $_[0];
-   my $doc_base;
-   my $doc_path;
-   my $doc_suffix;
-   my $input_path;
-   my @matches;
-   
-   ### Maybe the user has given us a different inputpath
-   $input_path = &param_value('input_path');
-   if(defined($input_path) and $input_path ne "") {
-      &report(6, "Setting input path to specified directory: $input_path");
-      
-      &report(7, "Change working directory to input path.");
-      chdir $input_path;
-      
-      return $input_path;
-   }
-
-   ##### Getting document name, suffix and path
-   ($doc_base,$doc_path,$doc_suffix) = fileparse($texdoc, ('\.tex'));
-
-   ###### change working directory to input_path if set
-   # When the files' path (images, included documents, etc.) in your document is
-   # relative to another directory than the PASSED document's directory.
-   # This is useful when the calling application (e.g. LyX) generates a
-   # temporary
-   # TeX file and calls the tex2pdf with it instead of the original file.
-   
-   @matches=&extract_tag_contents($texdoc, 'def\\\\input@path');
-   $input_path=$matches[0];
-   
-   ## check if input_path is ok
-   if ($input_path) {
-      &report(7, "Found an input path in the latex document: $input_path");
-      if( &check_dir($input_path, 'The retrieved input@path seems not to be valid.', $NO)) {
-         &set_param_value('input_path', $input_path);
-         &report(7, "Change working directory to input path.");
-         chdir $input_path;
-      } else {
-         &abort ('I am lost.');
-      }
-   } else {
-      &report(4, "No input path in the latex document found.");
-      &report(7, "Resources are expected to be relative to document's location: $doc_path");
-         $input_path=$doc_path;
-   }
-   
-   return $input_path;
-}
-
-#### set the working dir to the input path if the document has one and
-#### and determine the path for the result
-# parameter 1: main tex doc
-# parameter 2: absolute input path
-# return value: absolute path were the resulting pdf doc should be stored
-
-sub get_target_name {
-   my $texdoc = $_[0];
-   my $input_path=$_[1];
-
-   my $doc_base;
-   my $doc_path;
-   my $doc_suffix;
-   my $destination;
-   my $pdf_path;
-   
-   ##### Getting document name, suffix and path
-   ($doc_base,$doc_path,$doc_suffix) = fileparse($texdoc, ('\.tex'));
- 
-   ##### set the directory where the final pdf will be stored
-   $destination=&param_value('destination');
-   $pdf_path=undef;
-   
-   if ($destination eq 'custom' ) {
-      $pdf_path=&param_value('custom_path');
-   } elsif ($destination eq 'input') {
-      $pdf_path=$input_path;
-   } else {
-      $pdf_path=$doc_path;
-   }
-
-   if( ! defined($pdf_path) or $pdf_path eq "" or ! &check_dir($pdf_path,
-      'The specified destination directory for the final PDF documents is not valid.', $NO)) {
-      &report(7, "Using document's instead of destination path: $doc_path");
-      $pdf_path=$doc_path;
-   }
-
-   # make sure there is a slash at the end of the path
-   $pdf_path .= '/' if( ! ($pdf_path =~ m#/$#) );
-   
-   return $pdf_path.$doc_base.'.pdf';
-}
-
-### generate hyperref parameters from given settings
-# parameter 1: main tex doc
-# return_value: result
-
-sub generate_hyperref_params {
-   my $texdoc = $_[0];
-   my $para;
-   my @params = ('pdftex');
-
-   ##### Set title and author from main LaTeX document or parameters
-   foreach my $info (('title', 'author')) {
-      my $value;
-
-      $value=&param_value("$info");
-      if (! defined($value) ) {
-         my @matches=&extract_tag_contents($texdoc, $info);
-         $value= $matches[0];
-         if (! defined($value) ) {
-            &report(4, "\nWARNING: Could not identify document's $info correctly.");
-            &report(7, "Maybe you have used a LaTeX tag inside the $info which confuses me.\n",
-               "Adjust the $info of the LaTeX file in order to avoid the problem or\n",
-               "you could set the $info parameter manually.");
-            $value= &param_value("default_$info");
-            &report(7, "Using default-$info: $value");
-         }
-      }
-      if (! defined($value) or $value eq $NIL ) {
-         &report(7, "$info field set to $NIL - no value will be passed.");
-      } else {
-         &report(7, "Document's $info: $value");
-         push(@params, "pdf$info={$value}");
-      }
-   }
-   
-   $para=&param_value('paper');
-   if ( $para ne $NIL ) { push(@params, $para); }
-
-   $para=&param_value('link_toc_page'); 
-   if ( $para eq $YES ) { push(@params, 'linktocpage'); }
-
-   $para=&param_value('colorlinks');
-   if ( $para ne $NIL ) {
-      $para= $para eq $YES ? 'true' : 'false';
-      push(@params, "colorlinks=$para");
-   }
-
-   if ( $para ne 'false' ) {
-      foreach (('linkcolor', 'pagecolor', 'urlcolor', 'citecolor')) {
-         $para=&param_value($_);
-         if ( $para ne $NIL ) { push(@params, "$_={$para}"); }
-      }
-   }
-
-   $para=&param_value('hyperref_args');
-   if(defined($para) and $para ne "" and $para ne $NIL) {
-      push(@params, $para);
-   }
-   
-   return @params;
-}
-
-#### Prepare the main document and all referenced ones for the generation
-#### of the PDF document (including referenced images)
-# parameter 1: top level tex document
-# parameter 2: parameter list of hyperref parameters
-
-sub prepare_documents {
-   my ($main_tex_doc, $input_path, @hyperref_params) = @_;
-   @REF_DOCS=();
-
-   ## get a name for the tmp tex file
-   my $main_tmp_doc = &reserve_tmp_texname($main_tex_doc, $input_path);
-
-   ## Get the list of imported files from the tex file
-   &get_file_list($main_tex_doc);
-   
-   ## remove main file from list (first element; needs special handling)
-   shift @REF_DOCS;
-   
-   ## tell user about the identified refereneced docs
-   if ( @REF_DOCS > 0 ) {
-      &report(7, "\nFound the following referenced TeX files:");
-      foreach my $file (@REF_DOCS) {
-         &report(7, ">>>>> $file");
-      }
-   } else {
-      &report(7, "\nFound no referenced TeX files.");
-   }
-   
-   ##### Generate adjusted temp tex files and convert all their images
-   ## main doc
-   &report(6, "\nGenerating main temporary LaTeX document: $main_tmp_doc");
-   &convert_tex2tmp($main_tex_doc, $main_tmp_doc, \@hyperref_params);
-   &convert_images($main_tex_doc);
-   
-   ## referenced docs
-   foreach my $file (@REF_DOCS) {
-      my $tmp_file = &reserve_tmp_texname($file);
-   
-      ### Insert pdf conversation tags in tex file and write it to tmp_file
-      &report(7, "\nGenerating temporary LaTeX document: $tmp_file");
-      &convert_tex2tmp($file, $tmp_file, undef);
-      &convert_images($file);
-   }
-
-   return $main_tmp_doc;
-}
-
-##### Generate the final PDF document
-# parameter 1: filename of the source LaTeX document (with extension)
-
-sub generate_pdf_doc {
-   my $source = $_[0];
-   my $runno=1;
-   my $rerun=$TRUE;
-   my $doc;
-   my $pdf_doc;
-   my $base;
-   my $path;
-   my $suffix;
-
-   my $max_run_no= &param_value('maxrun');
-   my $min_run_no= &param_value('minrun');
-   my $log_dir= &param_value('logdir');
-   $log_dir .= '/' if( ! ($log_dir =~ m#/$#) );
-   my $makeindex_options=&param_value('makeindex_opts');
-   
-   # setting the log files for the output of pdflatex, bibtex, gloss,
-   # thumbpdf, ppower and authorindex
-   my $pdflog_base = $log_dir."pdflatex-$$-";
-   my $bibtex_log = $log_dir."bibtex-$$.log";
-   my $gloss_log = $log_dir."gloss-$$.log";
-   my $thumbpdf_log = $log_dir."thumbpdf-$$.log";
-   my $ppower_log = $log_dir."ppower-$$.log";
-   my $authorindex_log = $log_dir."authorindex-$$.log";
-
-   ##### Getting document name, suffix and path
-   ($base,$path,$suffix) = fileparse($source, ('\.tex'));
-   $doc = $path.$base;
-   $pdf_doc = $base.'.pdf';
-
-   ### run pdflatex until no more errors are reported (max MAXRUNNO)
-   while ( $rerun and $runno <= $max_run_no )
-   {
-      &report(6, "\n************ Pdflatex run no. $runno *************");
-      if ( &run_pdflatex($doc, $pdflog_base.$runno.'.log') == $TRUE 
-         and ( $min_run_no <= $runno )) {
-         # no errors detected and min. no. of runs are done
-         $rerun=$FALSE;
-      } else {
-         # errors appeared or max run no. has not been reached
-         $rerun=$TRUE;
-      }
-   
-      ### Execute BibTeX after first run if set (and required)
-      if ( $runno == 1 and &param_value('bibtex') ne $NO ) {
-         &report(6, "\n****************** BibTeX handling ***********************");
-         &handle_bibtex($doc, $bibtex_log);
-      }
-
-      ### Execute BibTeX on file.gls after first run if set (and required)
-      if ( $runno == 1 and &param_value('gloss') ne $NO ) {
-         &report(6, "\n****************** Gloss handling ***********************");
-         &handle_gloss($doc, $gloss_log);
-      }
-
-      ### generated index file exists
-      if ( $runno == 1 and -f $doc.'.idx' and &param_value('force_index') ne $NO ) {
-         if( !defined($makeindex_options) or $makeindex_options eq $NIL ) {
-            $makeindex_options = "";
-         }
-         &report(6, "\n****************** Extra index generation ***************");
-         &report(7, "Document seems to have an index. Generating ...\n");
-         &system_command("makeindex $makeindex_options $doc.idx", $FALSE, 8,
-            "makeindex failed.\nI will continue, "
-            ."but maybe there will not be an index in the PDF doc.");
-      }
-
-      $runno += 1;
-   }
-
-   $rerun = $FALSE;
-
-   ### if the authorindex option is switched on then run authorindex
-   if ( &param_value('authorindex') eq $YES ) {
-      &report(6, "\n****************** authorindex generation *****************");
-      &run_authorindex($doc, $authorindex_log);
-   }
-   
-   ### generated index file exists
-   if ( -f $doc.'.idx' and &param_value('force_index') ne $NO ) {
-      if( !defined($makeindex_options) or $makeindex_options eq $NIL ) {
-         $makeindex_options = "";
-      }
-      &report(6, "\n****************** Extra index generation ***************");
-      &report(7, "Document seems to have an index. Generating ...\n");
-      &system_command("makeindex $makeindex_options $doc.idx", $FALSE, 8,
-         "makeindex failed.\nI will continue, "
-         ."but maybe there will not be an index in the PDF doc.");
-      $rerun=$TRUE;
-   }
-   
-   ### if the thumbpdf option is switched on then make thumbnails
-   if ( &param_value('thumbpdf') eq $YES ) {
-         &report(6, "\n****************** Thumbnail generation *****************");
-      &run_thumbpdf($doc, $thumbpdf_log);
-      $rerun=$TRUE;
-   }
-
-   ### One final pdflatex run if requested
-   if ( $rerun ) {
-      &report(6, "\n************ One final pdflatex run no. $runno *************");
-      &run_pdflatex($doc, $pdflog_base.$runno.'.log');
-   }
-
-   ### if the ppower option is switched on then run ppower
-   if ( &param_value('ppower') eq $YES ) {
-      &report(6, "\n****************** ppower postprocess *****************");
-      &run_ppower($doc, $ppower_log);
-   }
-
-   if ( ! -f $pdf_doc ) {
-      &abort("\nThe new PDF file could not be generated: ".$pdf_doc);
-   }
-
-   return $pdf_doc;
-}
-   
-################## Lift off !!!! (main part) ##################
-
-my $texdoc;
-my $doc_argument;
-my $input_path;
-my $target_name;
-my @hyperref_params;
-my $new_pdf_doc;
-my $tmp_tex_doc;
-
-&report(5, "\nScript starts ($MYRELEASE)");
-
-##### read and analyse configuration and options and adjust basic variables
-##### accordingly
-##### write RC file on config request
-#### use the finished configuration to get all further settings before we
-#### actually start doing something
-
-&report(5, "\nProcessing given parameters and arguments.");
-$doc_argument = &adjust_configuration;
-
-#### prepare the script to write some information to specified log files
-
-&report(5, "\nPreparing directory for log files.");
-&prepare_logdir;
-
-#### process the one and only argument (besides the options) which specifies
-#### which LaTeX document the user wants to translate to PDF
-#### a lyx file will be translated to LaTeX first
-
-&report(5, "\nAnalysing your document argument.");
-$texdoc = &process_doc_argument($doc_argument);
-
-#### we would like to get some more information from the actual
-#### main LaTeX document before we really start
-#### parse the document and try to get the info
-
-## translate hyperref settings to the actual package parameters 
-   
-&report(5, "\nSetting up parameters for hyperref.");
-@hyperref_params = &generate_hyperref_params($texdoc);
-
-## set the working dir to the input path if the document has one and
-
-&report(5, "\nProcessing input path for main tex document.");
-$input_path = &process_inputpath($texdoc);
-
-## determine the name for the result
-
-&report(5, "\nSetting the correct name for the result.");
-$target_name = &get_target_name($texdoc, $input_path);
-
-## as much as possible is prepared in advance at this point
-## so hopefully we will succeed in generating the PDF document
-
-##### real work starts NOW
-
-##### Generate adjusted temp tex files and convert all their images
-
-&report(5, "\nPreparing all documents and images.");
-$tmp_tex_doc = &prepare_documents($texdoc, $input_path, @hyperref_params);
-
-##### Generate the final PDF document
-
-&report(5, "\nProcessing the actual generation of the PDF document.");
-$new_pdf_doc = &generate_pdf_doc($tmp_tex_doc);
-
-##### Finalize
-move($new_pdf_doc, $target_name) or &abort("Could not move PDF file to final destination: $!");
-
-if ( &param_value('debug') eq $NO ) {
-   &clean_up;
-} else {
-   &print_temp_files;
-}
-
-&report(5, "\nThe new pdf file is: $target_name\n");
-
diff --git a/lustre/doc/tunefs.lustre.8 b/lustre/doc/tunefs.lustre.8
deleted file mode 100644
index e99e15ab8ccc21fe7fcad09429d082238d4cf9e9..0000000000000000000000000000000000000000
--- a/lustre/doc/tunefs.lustre.8
+++ /dev/null
@@ -1,102 +0,0 @@
-.\" -*- nroff -*-
-.\" Copyright 2006 by Cluster File Systems, Inc.  All Rights Reserved.
-.\" Copyright 2008 by Sun Microsystems, Inc.  All Rights Reserved.
-.\" This file may be copied under the terms of the GNU Public License, v2.
-.\"
-.TH tunefs.lustre 8 "2008 Mar 15" Lustre "configuration utilities"
-.SH NAME
-tunefs.lustre \- modify the Lustre configuration information on a disk
-.SH SYNOPSIS
-.br
-.B tunefs.lustre
-[options] 
-.I device
-.br
-.SH DESCRIPTION
-.B tunefs.lustre
-is used to modify the configuration information on a Lustre target
-disk. This includes upgrading old (pre-Lustre 1.6) disks.  This does not
-reformat the disk or erase the target information, but modifying the
-configuration information can result in an unusable filesystem.  You have
-been warned.
-.br
-Changes made here will affect a filesystem only when the target is next
-mounted.
-
-.SH OPTIONS
-.TP
-.BI \--comment= comment
-Set user comment about this disk, ignored by Lustre.
-.TP
-.BI \--dryrun
-Only print what would be done; does not affect the disk
-.TP
-.BI \--erase-params
-Remove all previous parameter info
-.TP
-.BI \--failnode= nid,...  
-Set the NID(s) of a failover partner. This option can be repeated as desired.
-.TP
-.BI \--fsname= filesystem_name  
-The Lustre filesystem this service will be part of.  Default is 'lustre'
-.TP
-.BI \--index= index
-Force a particular OST or MDT index 
-.TP
-.BI \--mountfsoptions= opts
-Set permanent mount options, equivalent to setting in /etc/fstab
-.TP
-.BI \--mgs
-Add a configuration management service to this target
-.TP
-.BI \--mgsnode= nid,...  
-Set the NID(s) of the MGS node, required for all targets other than the MGS.
-.TP
-.BI \--nomgs
-Remove a configuration management service to this target
-.TP
-.BI \--quiet
-Print less information.
-.TP
-.BI \--verbose
-Print more information.
-.TP
-.BI \--writeconf
-Erase all config logs for the filesystem that this MDT is part of, and
-regenerate them.  This is very dangerous.  All clients and servers should
-be stopped.
-All targets must then be restarted to regenerate the logs.  
-No clients should be started until all targets have restarted.
-In general this should be executed on the MDT only, not the OSTs.
-
-.SH EXAMPLES
-.TP
-.B tunefs.lustre --erase-param --mgsnode=<new_nid> --writeconf /dev/sda
-Change the MGS NID address. (This should be done on every target disk,
-since they should all be contacting the same MGS.)
-.TP
-.B tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda
-Add a failover NID location for this target
-.TP
-.B tunefs.lustre --mgs --mdt --fsname=testfs /dev/sda
-Upgrade an old 1.4.X Lustre MDT to 1.6. The new filesystem name is "testfs". 
-.TP
-.B tunefs.lustre --writeconf --mgs --mdt --fsname=testfs /dev/sda1
-Upgrade an old 1.4.X Lustre MDT to 1.6, and start with brand-new 1.6
-configuration logs. All old servers and clients must be stopped.
-
-.SH BUGS
-Please report all bugs to Sun Microsystems using http://bugzilla.lustre.org/
-.SH AVAILABILITY
-.B tunefs.lustre
-is part of the 
-.BR Lustre (7) 
-filesystem package and is available from Sun Microsystems, Inc via
-.br
-http://downloads.lustre.org
-.SH SEE ALSO
-.BR lustre (7),
-.BR mkfs.lustre (8),
-.BR mount.lustre (8),
-.BR lctl (8),
-.BR lfs (1)
diff --git a/lustre/include/.cvsignore b/lustre/include/.cvsignore
deleted file mode 100644
index e2f41760b84c9b1f5960a8cd455537845d18a45f..0000000000000000000000000000000000000000
--- a/lustre/include/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-config.h
-config.h.in
-stamp-h
-stamp-h1
-stamp-h.in
-Makefile
-Makefile.in
-.deps
-TAGS
-lustre_ver.h
diff --git a/lustre/include/Makefile.am b/lustre/include/Makefile.am
deleted file mode 100644
index c641829de69b2c3fb15db42154502f130293e77a..0000000000000000000000000000000000000000
--- a/lustre/include/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-SUBDIRS = linux lustre
-
-EXTRA_DIST = ioctl.h liblustre.h lprocfs_status.h lustre_cfg.h 	\
-	     lustre_commit_confd.h lustre_debug.h lustre_disk.h \
-	     lustre_dlm.h lustre_export.h lustre_fsfilt.h lustre_ha.h \
-	     lustre_handles.h lustre_import.h lustre_lib.h class_hash.h \
-	     lustre_lite.h lustre_log.h lustre_mds.h lustre_net.h \
-             lustre_param.h lustre_quota.h lustre_ucache.h lvfs.h \
-	     obd_cache.h obd_class.h obd_echo.h obd.h obd_lov.h \
-	     obd_ost.h obd_support.h lustre_cache.h lustre_ver.h \
-	     interval_tree.h
-
diff --git a/lustre/include/class_hash.h b/lustre/include/class_hash.h
deleted file mode 100644
index f27a04672200806f96b56badef3875f741bd6502..0000000000000000000000000000000000000000
--- a/lustre/include/class_hash.h
+++ /dev/null
@@ -1,146 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __CLASS_HASH_H
-#define __CLASS_HASH_H
-
-#include <lustre_lib.h>
-
-/* #define LUSTRE_HASH_DEBUG 1 */
-
-/* define the hash bucket*/
-struct lustre_hash_bucket { 
-        struct hlist_head lhb_head;
-        spinlock_t lhb_lock;
-#ifdef LUSTRE_HASH_DEBUG
-        /* the number of hash item per bucket, 
-         * it will help us to analyse the hash distribute 
-         */
-        int lhb_item_count; 
-#endif
-};
-
-struct lustre_hash_operations;
-
-struct lustre_class_hash_body {
-        char hashname[128];
-        spinlock_t lchb_lock; /* body lock */
-        struct lustre_hash_bucket *lchb_hash_tables;
-        __u32 lchb_hash_max_size; /* define the hash tables size */
-        /* define the hash operations */
-        struct lustre_hash_operations *lchb_hash_operations;
-};
-
-/* hash operations method define */
-struct lustre_hash_operations {
-        __u32 (*lustre_hashfn) (struct lustre_class_hash_body *hash_body, 
-                                void *key);
-        int   (*lustre_hash_key_compare) (void *key, 
-                                          struct hlist_node *compared_hnode);
-        /* add refcount */ 
-        void* (*lustre_hash_object_refcount_get) (struct hlist_node *hash_item);
-        /* dec refcount */
-        void  (*lustre_hash_object_refcount_put) (struct hlist_node *hash_item);
-};
-
-static inline struct hlist_node * 
-lustre_hash_getitem_in_bucket_nolock(struct lustre_class_hash_body *hash_body, 
-                                     int hashent, void *key)
-{
-        struct lustre_hash_bucket *bucket;
-        struct hlist_node  *hash_item_node;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        int find = 0;
-        ENTRY;
-
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        hlist_for_each(hash_item_node, &(bucket->lhb_head)) {
-                find = hop->lustre_hash_key_compare(key, hash_item_node);
-                if (find == 1)
-                        break;
-        }
-        RETURN(find == 1 ? hash_item_node : NULL);
-}
-
-static inline int 
-lustre_hash_delitem_nolock(struct lustre_class_hash_body *hash_body, 
-                           int hashent, struct hlist_node * hash_item)
-{
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-
-        hlist_del_init(hash_item);
-
-        hop->lustre_hash_object_refcount_put(hash_item);
-
-#ifdef LUSTRE_HASH_DEBUG
-        hash_body->lchb_hash_tables[hashent].lhb_item_count--;
-        CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", 
-                        hash_body->hashname, hashent, 
-                        hash_body->lchb_hash_tables[hashent].lhb_item_count);
-#endif
-
-        RETURN(0);
-}
-
-typedef void (*hash_item_iterate_cb) (void *obj, void *data);
-
-int lustre_hash_init(struct lustre_class_hash_body **hash_body,
-                     char *hashname, __u32 hashsize, 
-                     struct lustre_hash_operations *hash_operations);
-void lustre_hash_exit(struct lustre_class_hash_body **hash_body);
-int lustre_hash_additem_unique(struct lustre_class_hash_body *hash_body, 
-                               void *key, struct hlist_node *actual_hnode);
-void *lustre_hash_findadd_unique(struct lustre_class_hash_body *hash_body,
-                                 void *key, struct hlist_node *actual_hnode);
-int lustre_hash_additem(struct lustre_class_hash_body *hash_body, void *key, 
-                        struct hlist_node *actual_hnode);
-int lustre_hash_delitem_by_key(struct lustre_class_hash_body *hash_body, 
-                               void *key);
-int lustre_hash_delitem(struct lustre_class_hash_body *hash_body, void *key, 
-                        struct hlist_node *hash_item);
-void lustre_hash_bucket_iterate(struct lustre_class_hash_body *hash_body,
-                                void *key, hash_item_iterate_cb,
-                                void *data);
-void lustre_hash_iterate_all(struct lustre_class_hash_body *hash_body,
-                             hash_item_iterate_cb, void *data);
-
-void * lustre_hash_get_object_by_key(struct lustre_class_hash_body *hash_body,
-                                      void *key);
-
-__u32 djb2_hashfn(struct lustre_class_hash_body *hash_body, void* key,
-                  size_t size);
-
-/* ( uuid <-> export ) hash operations define */
-__u32 uuid_hashfn(struct lustre_class_hash_body *hash_body,  void * key);
-int uuid_hash_key_compare(void *key, struct hlist_node * compared_hnode);
-void * uuid_export_refcount_get(struct hlist_node * actual_hnode);
-void uuid_export_refcount_put(struct hlist_node * actual_hnode);
-
-/* ( nid <-> export ) hash operations define */
-__u32 nid_hashfn(struct lustre_class_hash_body *hash_body,  void * key);
-int nid_hash_key_compare(void *key, struct hlist_node * compared_hnode);
-void * nid_export_refcount_get(struct hlist_node * actual_hnode);
-void nid_export_refcount_put(struct hlist_node * actual_hnode);
-
-/* ( net_peer <-> connection ) hash operations define */
-__u32 conn_hashfn(struct lustre_class_hash_body *hash_body,  void * key);
-int conn_hash_key_compare(void *key, struct hlist_node * compared_hnode);
-void * conn_refcount_get(struct hlist_node * actual_hnode);
-void conn_refcount_put(struct hlist_node * actual_hnode);
-
-/* ( nid <-> nidstats ) hash operations define. uses nid_hashfn */
-int nidstats_hash_key_compare(void *key, struct hlist_node * compared_hnode);
-void* nidstats_refcount_get(struct hlist_node * actual_hnode);
-void nidstats_refcount_put(struct hlist_node * actual_hnode);
-extern struct lustre_hash_operations nid_stat_hash_operations;
-
-#ifdef __KERNEL__
-/* ( lqs <-> qctxt ) hash operations define b=10600 */
-__u32 lqs_hashfn(struct lustre_class_hash_body *hash_body,  void * key);
-int lqs_hash_key_compare(void *key, struct hlist_node * compared_hnode);
-void * lqs_refcount_get(struct hlist_node * actual_hnode);
-void lqs_refcount_put(struct hlist_node * actual_hnode);
-#endif
-
-#endif /* __CLASS_HASH_H */
diff --git a/lustre/include/darwin/lprocfs_status.h b/lustre/include/darwin/lprocfs_status.h
deleted file mode 100644
index dc17b9f9f2a49a5216e8eb86a58907e3b423db12..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lprocfs_status.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *   Top level header file for LProc SNMP
- *   Author: Hariharan Thantry thantry@users.sourceforge.net
- */
-#ifndef _DARWIN_LPROCFS_SNMP_H
-#define _DARWIN_LPROCFS_SNMP_H
-
-#ifndef _LPROCFS_SNMP_H
-#error Do not #include this file directly. #include <lprocfs_status.h> instead
-#endif
-
-#ifdef LPROCFS
-#undef LPROCFS
-#endif
-
-#include <libcfs/libcfs.h>
-#define kstatfs statfs
-
-/*
- * XXX nikita: temporary! Stubs for naked procfs calls made by Lustre
- * code. Should be replaced with our own procfs-like API.
- */
-
-static inline cfs_proc_dir_entry_t *proc_symlink(const char *name,
-                                                 cfs_proc_dir_entry_t *parent,
-                                                 const char *dest)
-{
-        return NULL;
-}
-
-static inline cfs_proc_dir_entry_t *create_proc_entry(const char *name,
-                                                      mode_t mode,
-                                                      cfs_proc_dir_entry_t *p)
-{
-        return NULL;
-}
-
-#endif /* XNU_LPROCFS_SNMP_H */
diff --git a/lustre/include/darwin/lustre_compat.h b/lustre/include/darwin/lustre_compat.h
deleted file mode 100644
index d11c8d6801df7e646661d5815da05a9e34454486..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_compat.h
+++ /dev/null
@@ -1,75 +0,0 @@
-#ifndef __DARWIN_LUSTRE_COMPAT_H__
-#define __DARWIN_LUSTRE_COMPAT_H__
-
-#include <libcfs/libcfs.h>
-
-#ifdef __KERNEL__
-
-#ifndef HLIST_HEAD
-#define hlist_entry                     list_entry
-#define hlist_head                      list_head
-#define hlist_node                      list_head
-#define hlist_del_init                  list_del_init
-#define hlist_add_head                  list_add
-#define hlist_for_each_safe             list_for_each_safe
-
-/* XXX */
-#define LOOKUP_COBD 			4096
-#define CURRENT_SECONDS			cfs_unix_seconds()
-
-#endif
-
-struct module;
-static inline int try_module_get(struct module *module)
-{
-	return 1;
-}
-
-static inline void module_put(struct module *module)
-{
-}
-
-#define THIS_MODULE                     NULL
-
-static inline void lustre_daemonize_helper(void)
-{
-	return;
-}
-
-static inline int32_t ext2_set_bit(int nr, void *a)
-{
-	int32_t	old = test_bit(nr, a);
-	set_bit(nr, a);
-	return old;
-}
-
-static inline int32_t ext2_clear_bit(int nr, void *a)
-{
-	int32_t old = test_bit(nr, a);
-	clear_bit(nr, a);
-	return old;
-}
-
-struct nameidata;
-
-#if !defined(__DARWIN8__)
-static inline int ll_path_lookup(const char *path, unsigned int flags, struct nameidata *nd)
-{
-	int ret = 0;
-	NDINIT(nd, LOOKUP, FOLLOW, UIO_SYSSPACE, (char *)path, current_proc());
-	if (ret = namei(nd)){
-		CERROR("ll_path_lookup fail!\n");
-	}
-	return ret;
-}
-#endif
-
-#define to_kdev_t(dev)                  (dev)
-#define kdev_t_to_nr(dev)               (dev)
-#define val_to_kdev(dev)                (dev)
-
-#define ext2_test_bit	test_bit
-
-#endif	/* __KERNEL__ */
-
-#endif
diff --git a/lustre/include/darwin/lustre_debug.h b/lustre/include/darwin/lustre_debug.h
deleted file mode 100644
index b2b72f61007f3ccacb96567b260e187ed17a4e86..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_debug.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _DARWIN_LUSTRE_DEBUG_H
-#define _DARWIN_LUSTRE_DEBUG_H
-
-#ifndef _LUSTRE_DEBUG_H
-#error Do not #include this file directly. #include <lprocfs_status.h> instead
-#endif
-
-#ifdef __KERNEL__
-#define LL_CDEBUG_PAGE(mask, page, fmt, arg...)   do {} while (0)
-#else
-#define LL_CDEBUG_PAGE(mask, page, fmt, arg...)   do {} while (0) 
-#endif
-
-#endif
diff --git a/lustre/include/darwin/lustre_dlm.h b/lustre/include/darwin/lustre_dlm.h
deleted file mode 100644
index 98587f37aa215d0a48f3f6742728088e947048aa..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_dlm.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * (visit-tags-table FILE)
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _DARWIN_LUSTRE_DLM_H__
-#define _DARWIN_LUSTRE_DLM_H__
-
-#ifndef _LUSTRE_DLM_H__
-#error Do not #include this file directly. #include <lprocfs_status.h> instead
-#endif
-
-#define IT_OPEN     0x0001
-#define IT_CREAT    0x0002
-#define IT_READDIR  0x0004
-#define IT_GETATTR  0x0008
-#define IT_LOOKUP   0x0010
-#define IT_UNLINK   0x0020
-#define IT_GETXATTR 0x0040
-#define IT_EXEC     0x0080
-#define IT_PIN      0x0100
-#define IT_CHDIR    0x0200
-
-
-#endif
diff --git a/lustre/include/darwin/lustre_fsfilt.h b/lustre/include/darwin/lustre_fsfilt.h
deleted file mode 100644
index e3d9a7e0b24c0e5a4ec02da7435513c22a91a7e6..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_fsfilt.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Filesystem interface helper.
- *
- */
-
-#ifndef _DARWIN_LUSTRE_FSFILT_H
-#define _DARWIN_LUSTRE_FSFILT_H
-
-#ifndef _LUSTRE_FSFILT_H
-#error Do not #include this file directly. #include <lustre_fsfilt.h> instead
-#endif
-
-#endif
diff --git a/lustre/include/darwin/lustre_handles.h b/lustre/include/darwin/lustre_handles.h
deleted file mode 100644
index 341a25bbf84ddace75fe9e20b01c138ca5e98594..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_handles.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __DARWIN_LUSTRE_HANDLES_H_
-#define __DARWIN_LUSTR_HANDLES_H_
-
-#ifndef __LUSTRE_HANDLES_H_
-#error Do not #include this file directly. #include <lustre_handles.h> instead
-#endif
-
-#include <libcfs/list.h>
-#include <libcfs/libcfs.h>
-
-#endif
-
diff --git a/lustre/include/darwin/lustre_lib.h b/lustre/include/darwin/lustre_lib.h
deleted file mode 100644
index 5adadaed32259843b9a305eb389aa662059db0f1..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_lib.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Basic Lustre library routines.
- *
- */
-
-#ifndef _DARWIN_LUSTRE_LIB_H
-#define _DARWIN_LUSTRE_LIB_H
-
-#ifndef _LUSTRE_LIB_H
-#error Do not #include this file directly. #include <lustre_lib.h> instead
-#endif
-
-#include <string.h>
-#include <libcfs/libcfs.h>
-#include <libcfs/kp30.h> 
-
-#ifndef LP_POISON
-#define LI_POISON ((int)0x5a5a5a5a)
-#define LL_POISON ((long)0x5a5a5a5a)
-#define LP_POISON ((void *)(long)0x5a5a5a5a)
-#endif
-
-#ifndef LPU64
-#define LPU64 "%llu"
-#define LPD64 "%lld"
-#define LPX64 "%llx"
-#endif
-
-struct obd_ioctl_data;
-#define OBD_IOC_DATA_TYPE               struct obd_ioctl_data
-
-#define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) |                \
-                           sigmask(SIGTERM) | sigmask(SIGQUIT) |               \
-                           sigmask(SIGALRM) | sigmask(SIGHUP))
-
-#ifdef __KERNEL__
-static inline sigset_t l_w_e_set_sigs(sigset_t sigs)
-{
-        sigset_t old = 0;
-
-        /* XXX Liang: how to change sigmask in Darwin8.x? 
-         * there is syscall like pthread_sigmask() but we cannot 
-         * use in kernel  */
-#if !defined(__DARWIN8__)
-        struct proc     *p = current_proc();
-        extern int block_procsigmask(struct proc *p,  int bit);
-        old = cfs_current()->uu_sigmask;
-        block_procsigmask(p, ~sigs);
-#endif
-
-        return old;
-}
-#endif
-
-#endif
-
-
diff --git a/lustre/include/darwin/lustre_lite.h b/lustre/include/darwin/lustre_lite.h
deleted file mode 100644
index 611c2a8520ca9be04252d8ba7b85b7ee08718c6d..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_lite.h
+++ /dev/null
@@ -1,84 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * lustre lite cluster file system
- *
- * This code is issued under the GNU General Public License.
- * See the file COPYING in this distribution
- *
- * Copyright (C) 2002 Cluster File Systems, Inc. <info@clusterfs.com>
- */
-
-#ifndef _DARWIN_LL_H
-#define _DARWIN_LL_H
-
-#ifndef _LL_H
-#error Do not #include this file directly. #include <lustre_lite.h> instead
-#endif
-
-#include <libcfs/libcfs.h>
-
-#ifdef __KERNEL__
-
-struct iattr {
-        unsigned int    ia_valid;
-        umode_t         ia_mode;
-        uid_t           ia_uid;
-        gid_t           ia_gid;
-        loff_t          ia_size;
-        time_t          ia_atime;
-        time_t          ia_mtime;
-        time_t          ia_ctime;
-        unsigned int    ia_attr_flags;
-};
-
-/*
- * intent data-structured. For Linux they are defined in
- * linux/include/linux/dcache.h
- */
-#define IT_OPEN     0x0001
-#define IT_CREAT    0x0002
-#define IT_READDIR  0x0004
-#define IT_GETATTR  0x0008
-#define IT_LOOKUP   0x0010
-#define IT_UNLINK   0x0020
-#define IT_GETXATTR 0x0040
-#define IT_EXEC     0x0080
-#define IT_PIN      0x0100
-
-#define IT_FL_LOCKED   0x0001
-#define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */
-
-#define INTENT_MAGIC 0x19620323 /* Happy birthday! */
-
-struct lustre_intent_data {
-        int     it_disposition;
-        int     it_status;
-        __u64   it_lock_handle;
-        void    *it_data;
-        int     it_lock_mode;
-};
-
-/*
- * Liang: We keep the old lookup_intent struct in XNU 
- * to avoid unnecessary allocate/free. 
- */
-#define LUSTRE_IT(it) ((struct lustre_intent_data *)(&(it)->d.lustre))
-
-struct lookup_intent {
-	int     it_magic;
-	void    (*it_op_release)(struct lookup_intent *);
-	int     it_op;
-	int     it_flags;
-	int     it_create_mode;
-	union {
-                struct lustre_intent_data lustre;
-		void *fs_data;
-	} d;
-};
-
-struct super_operations{
-};
-#endif
-
-#endif
diff --git a/lustre/include/darwin/lustre_log.h b/lustre/include/darwin/lustre_log.h
deleted file mode 100644
index d7774657026957fdc60c7a369ef4ef3a50fe1456..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_log.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef _DARWIN_LUSTRE_LOG_H
-#define _DARWIN_LUSTRE_LOG_H
-
-#ifndef _LUSTRE_LOG_H
-#error Do not #include this file directly. #include <lustre_log.h> instead
-#endif
-
-#undef LUSTRE_LOG_SERVER
-#include <darwin/lustre_compat.h>
-
-#endif
diff --git a/lustre/include/darwin/lustre_mds.h b/lustre/include/darwin/lustre_mds.h
deleted file mode 100644
index 7fd85496a4729ed0d3e7d0339405ef5ed09ba338..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_mds.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef _DARWIN_LUSTRE_MDS_H
-#define _DARWIN_LUSTRE_MDS_H
-
-#ifndef _LUSTRE_MDS_H
-#error Do not #include this file directly. #include <lustre_mds.h> instead
-#endif
-
-#include <lustre_lite.h>
-#include <libcfs/darwin/darwin-prim.h>
-
-#endif
diff --git a/lustre/include/darwin/lustre_net.h b/lustre/include/darwin/lustre_net.h
deleted file mode 100644
index f028545669ba31b0181188e457dcbb611bef116b..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_net.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _DARWIN_LUSTRE_NET_H
-#define _DARWIN_LUSTRE_NET_H
-
-#ifndef _LUSTRE_NET_H
-#error Do not #include this file directly. #include <lustre_net.h> instead
-#endif
-
-#include <libcfs/libcfs.h>
-
-#undef WITH_GROUP_INFO
-
-#endif
diff --git a/lustre/include/darwin/lustre_quota.h b/lustre/include/darwin/lustre_quota.h
deleted file mode 100644
index 5d0864f49ca95561145732ba8dfa69e2cb7516a1..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_quota.h
+++ /dev/null
@@ -1,16 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef _DARWIN_LUSTRE_QUOTA_H
-#define _DARWIN_LUSTRE_QUOTA_H
-
-#ifndef _LUSTRE_QUOTA_H
-#error Do not #include this file directly. #include <lustre_quota.h> instead
-#endif
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#endif
-
-
-#endif /* _LUSTRE_QUOTA_H */
diff --git a/lustre/include/darwin/lustre_types.h b/lustre/include/darwin/lustre_types.h
deleted file mode 100644
index 651cf2d31b1addec45d372917da7919cbad07763..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_types.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef _LUSTRE_DARWIN_TYPES_H
-#define _LUSTRE_DARWIN_TYPES_H
-
-#include <string.h>
-#include <libcfs/libcfs.h>
-
-#endif
diff --git a/lustre/include/darwin/lustre_user.h b/lustre/include/darwin/lustre_user.h
deleted file mode 100644
index a495e60dc45c2deb6045e57309e1ef9faf19e26c..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lustre_user.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * Lustre public user-space interface definitions.
- */
-
-#ifndef _DARWIN_LUSTRE_USER_H
-#define _DARWIN_LUSTRE_USER_H
-
-#include <lustre/types.h>
-
-#ifndef __KERNEL__
-/* for llmount */
-# define _GNU_SOURCE
-# include <getopt.h>
-# include <sys/utsname.h>
-# include <sys/stat.h>
-# include <errno.h>
-# include <sys/mount.h>
-# include <sys/fcntl.h>
-# include <sys/ioccom.h>
-# include <sys/wait.h>
-# include <string.h>
-#endif
-
-typedef struct stat     lstat_t;
-#define HAVE_LOV_USER_MDS_DATA
-
-#ifndef LPU64
-#if (BITS_PER_LONG == 32 || __WORDSIZE == 32)
-# define LPU64 "%llu"
-# define LPD64 "%lld"
-# define LPX64 "%#llx"
-# define LPSZ  "%u"
-# define LPSSZ "%d"
-#elif (BITS_PER_LONG == 64 || __WORDSIZE == 64)
-# define LPU64 "%lu"
-# define LPD64 "%ld"
-# define LPX64 "%#lx"
-# define LPSZ  "%lu"
-# define LPSSZ "%ld"
-#endif
-#endif /* !LPU64 */
-
-#endif /* _LUSTRE_USER_H */
diff --git a/lustre/include/darwin/lvfs.h b/lustre/include/darwin/lvfs.h
deleted file mode 100644
index d27185450def40336374aeb38a4559a01270d06b..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/lvfs.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __DARWIN_LVFS_H__
-#define __DARWIN_LVFS_H__
-
-#ifndef __LVFS_H__
-#error Do not #include this file directly. #include <lvfs.h> instead
-#endif
-
-#ifdef LLOG_LVFS
-#undef LLOG_LVFS
-#endif
-
-struct lvfs_ucred { 
-	__u32 luc_fsuid; 
-	__u32 luc_fsgid; 
-	__u32 luc_cap; 
-	__u32 luc_uid; 
-	__u32 luc_umask;
-};
-
-struct lvfs_run_ctxt {
-	int	pid;
-};
-
-#endif
diff --git a/lustre/include/darwin/obd.h b/lustre/include/darwin/obd.h
deleted file mode 100644
index 175758ec145934df5ac17a2e8a092490c582232b..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/obd.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *
- * This code is issued under the GNU General Public License.
- * See the file COPYING in this distribution
- */
-
-#ifndef __DARWIN_OBD_H
-#define __DARWIN_OBD_H
-
-#ifndef __OBD_H
-#error Do not #include this file directly. #include <obd.h> instead
-#endif
-
-#include <libcfs/libcfs.h>
-
-typedef struct semaphore client_obd_lock_t;
-
-static inline void client_obd_list_lock_init(client_obd_lock_t *lock)
-{
-        sema_init(lock, 1);
-}
-
-static inline void client_obd_list_lock_done(client_obd_lock_t *lock)
-{}
-
-static inline void client_obd_list_lock(client_obd_lock_t *lock)
-{
-        mutex_down(lock);
-}
-
-static inline void client_obd_list_unlock(client_obd_lock_t *lock)
-{
-        mutex_up(lock);
-}
-
-#endif /* __DARWIN_OBD_H */
diff --git a/lustre/include/darwin/obd_class.h b/lustre/include/darwin/obd_class.h
deleted file mode 100644
index 833da618909d4354c146735af0796aefb7e22290..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/obd_class.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef __DARWIN_CLASS_OBD_H
-#define __DARWIN_CLASS_OBD_H
-
-#ifndef __CLASS_OBD_H
-#error Do not #include this file directly. #include <obd_class.h> instead
-#endif
-
-#if !defined(__KERNEL__)
-#define to_kdev_t(dev)          (dev)
-#endif
-
-#endif /* __XNU_OBD_CLASS_H */
diff --git a/lustre/include/darwin/obd_support.h b/lustre/include/darwin/obd_support.h
deleted file mode 100644
index 8ff72009ec03dced014cd52ff5f11f70c6a7f782..0000000000000000000000000000000000000000
--- a/lustre/include/darwin/obd_support.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _DARWIN_OBD_SUPPORT
-#define _DARWIN_OBD_SUPPORT
-
-#ifndef _OBD_SUPPORT
-#error Do not #include this file directly. #include <obd_support.h> instead
-#endif
-
-#include <darwin/lustre_compat.h>
-
-#define CRCPOLY_LE 0xedb88320
-/**
- * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32
- * @crc - seed value for computation.  ~0 for Ethernet, sometimes 0 for
- *        other uses, or the previous crc32 value if computing incrementally.
- * @p   - pointer to buffer over which CRC is run
- * @len - length of buffer @p
- */
-static inline __u32 crc32_le(__u32 crc, unsigned char const *p, size_t len)
-{
-        int i;
-        while (len--) {
-                crc ^= *p++;
-                for (i = 0; i < 8; i++)
-                crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0);
-        }
-        return crc;
-}
-
-#define OBD_SLEEP_ON(wq)        sleep_on(wq)
-
-/* for obd_class.h */
-# ifndef ERR_PTR
-#  define ERR_PTR(a) ((void *)(a))
-# endif
-
-#endif
diff --git a/lustre/include/interval_tree.h b/lustre/include/interval_tree.h
deleted file mode 100644
index 41436c1fde1a736190ddf62ec3e7c171b20924e3..0000000000000000000000000000000000000000
--- a/lustre/include/interval_tree.h
+++ /dev/null
@@ -1,106 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * (visit-tags-table FILE)
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2007 Cluster File Systems, Inc.
- *   Author: Huang Wei <huangwei@clusterfs.com>
- *   Author: Jay Xiong <jinshan.xiong@sun.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef _INTERVAL_H__
-#define _INTERVAL_H__
-
-#include <libcfs/types.h>  /* __u8, __u64 etc. */
-#include <libcfs/kp30.h>   /* LASSERT. */
-
-struct interval_node {
-        struct interval_node   *in_left;
-        struct interval_node   *in_right;
-        struct interval_node   *in_parent;
-        __u8                    in_color;
-        __u8                    res1[7];  /* tags, 8-bytes aligned */
-        __u64                   in_max_high;
-        struct interval_node_extent {
-                __u64 start;
-                __u64 end;
-        } in_extent;
-};
-
-enum interval_iter {
-        INTERVAL_ITER_CONT = 1,
-        INTERVAL_ITER_STOP = 2
-};
-
-static inline __u64 interval_low(struct interval_node *node)
-{
-        return node->in_extent.start;
-}
-
-static inline __u64 interval_high(struct interval_node *node)
-{
-        return node->in_extent.end;
-}
-
-static inline void interval_set(struct interval_node *node,
-                                __u64 start, __u64 end)
-{
-        LASSERT(start <= end);
-        node->in_extent.start = start;
-        node->in_extent.end = end;
-        node->in_max_high = end;
-}
-
-/* Rules to write an interval callback.
- *  - the callback returns INTERVAL_ITER_STOP when it thinks the iteration
- *    should be stopped. It will then cause the iteration function to return
- *    immediately with return value INTERVAL_ITER_STOP.
- *  - callbacks for interval_iterate and interval_iterate_reverse: Every 
- *    nodes in the tree will be set to @node before the callback being called
- *  - callback for interval_search: Only overlapped node will be set to @node
- *    before the callback being called.
- */
-typedef enum interval_iter (*interval_callback_t)(struct interval_node *node,
-                                                  void *args);
-
-struct interval_node *interval_insert(struct interval_node *node,
-                                      struct interval_node **root);
-void interval_erase(struct interval_node *node, struct interval_node **root);
-
-/* Search the extents in the tree and call @func for each overlapped
- * extents. */
-enum interval_iter interval_search(struct interval_node *root,
-                                   struct interval_node_extent *ex,
-                                   interval_callback_t func, void *data);
-
-/* Iterate every node in the tree - by reverse order or regular order. */
-enum interval_iter interval_iterate(struct interval_node *root, 
-                                    interval_callback_t func, void *data);
-enum interval_iter interval_iterate_reverse(struct interval_node *root,
-                                    interval_callback_t func,void *data);
-
-void interval_expand(struct interval_node *root, 
-                     struct interval_node_extent *ext,
-                     struct interval_node_extent *limiter);
-int interval_is_overlapped(struct interval_node *root, 
-                           struct interval_node_extent *ex);
-struct interval_node *interval_find(struct interval_node *root,
-                                    struct interval_node_extent *ex);
-#endif
diff --git a/lustre/include/ioctl.h b/lustre/include/ioctl.h
deleted file mode 100644
index fc2207bb9aa685573925908ac7f9c93d341b25d8..0000000000000000000000000000000000000000
--- a/lustre/include/ioctl.h
+++ /dev/null
@@ -1,72 +0,0 @@
-#ifndef _IOWR
-
-/* On i386 and x86_64, _ASM_I386_IOCTL_H is defined by the kernel's ioctl.h,
- * and on newer kernels this header is shared as _ASM_GENERIC_IOCTL_H.
- *
- * We can avoid any problems with the kernel header being included again by
- * defining _ASM_I386_IOCTL_H here so that a later occurence of <asm/ioctl.h>
- * does not include the kernel's ioctl.h after this one. b=14746 */
-#define _ASMI386_IOCTL_H
-#define _ASM_GENERIC_IOCTL_H
-
-/* ioctl command encoding: 32 bits total, command in lower 16 bits,
- * size of the parameter structure in the lower 14 bits of the
- * upper 16 bits.
- * Encoding the size of the parameter structure in the ioctl request
- * The highest 2 bits are reserved for indicating the ``access mode''.
- * NOTE: This limits the max parameter size to 16kB -1 !
- */
-
-/*
- * The following is for compatibility across the various Linux
- * platforms.  The i386 ioctl numbering scheme doesn't really enforce
- * a type field.  De facto, however, the top 8 bits of the lower 16
- * bits are indeed used as a type field, so we might just as well make
- * this explicit here.  Please be sure to use the decoding macros
- * below from now on.
- */
-#define _IOC_NRBITS     8
-#define _IOC_TYPEBITS   8
-#define _IOC_SIZEBITS   14
-#define _IOC_DIRBITS    2
-
-#define _IOC_NRMASK     ((1 << _IOC_NRBITS)-1)
-#define _IOC_TYPEMASK   ((1 << _IOC_TYPEBITS)-1)
-#define _IOC_SIZEMASK   ((1 << _IOC_SIZEBITS)-1)
-#define _IOC_DIRMASK    ((1 << _IOC_DIRBITS)-1)
-
-#define _IOC_NRSHIFT    0
-#define _IOC_TYPESHIFT  (_IOC_NRSHIFT+_IOC_NRBITS)
-#define _IOC_SIZESHIFT  (_IOC_TYPESHIFT+_IOC_TYPEBITS)
-#define _IOC_DIRSHIFT   (_IOC_SIZESHIFT+_IOC_SIZEBITS)
-
-/*
- * Direction bits.
- */
-#define _IOC_NONE       0U
-#define _IOC_WRITE      1U
-#define _IOC_READ       2U
-
-#define _IOC(dir,type,nr,size) (((dir)  << _IOC_DIRSHIFT) | ((type) << _IOC_TYPESHIFT) | ((nr)   << _IOC_NRSHIFT) | ((size) << _IOC_SIZESHIFT))
-
-/* used to create numbers */
-#define _IO(type,nr)            _IOC(_IOC_NONE,(type),(nr),0)
-#define _IOR(type,nr,size)      _IOC(_IOC_READ,(type),(nr),sizeof(size))
-#define _IOW(type,nr,size)      _IOC(_IOC_WRITE,(type),(nr),sizeof(size))
-#define _IOWR(type,nr,size)     _IOC(_IOC_READ|_IOC_WRITE,(type),(nr),sizeof(size))
-
-/* used to decode ioctl numbers.. */
-#define _IOC_DIR(nr)            (((nr) >> _IOC_DIRSHIFT) & _IOC_DIRMASK)
-#define _IOC_TYPE(nr)           (((nr) >> _IOC_TYPESHIFT) & _IOC_TYPEMASK)
-#define _IOC_NR(nr)             (((nr) >> _IOC_NRSHIFT) & _IOC_NRMASK)
-#define _IOC_SIZE(nr)           (((nr) >> _IOC_SIZESHIFT) & _IOC_SIZEMASK)
-
-/* ...and for the drivers/sound files... */
-
-#define IOC_IN          (_IOC_WRITE << _IOC_DIRSHIFT)
-#define IOC_OUT         (_IOC_READ << _IOC_DIRSHIFT)
-#define IOC_INOUT       ((_IOC_WRITE|_IOC_READ) << _IOC_DIRSHIFT)
-#define IOCSIZE_MASK    (_IOC_SIZEMASK << _IOC_SIZESHIFT)
-#define IOCSIZE_SHIFT   (_IOC_SIZESHIFT)
-
-#endif /* _ASMI386_IOCTL_H */
diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h
deleted file mode 100644
index 79b35fd9c7ea28c95269e4f5dfd7710d8389b127..0000000000000000000000000000000000000000
--- a/lustre/include/liblustre.h
+++ /dev/null
@@ -1,906 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * User-space Lustre headers.
- *
- */
-#ifndef LIBLUSTRE_H__
-#define LIBLUSTRE_H__
-
-#ifdef __KERNEL__
-#error Kernel files should not #include <liblustre.h>
-#else
-/*
- * The userspace implementations of linux/spinlock.h vary; we just
- * include our own for all of them
- */
-#define __LINUX_SPINLOCK_H
-#endif
-
-#include <sys/mman.h>
-#ifdef HAVE_STDINT_H
-# include <stdint.h>
-#endif
-#ifdef HAVE_ASM_PAGE_H
-# include <asm/page.h>
-#endif
-#ifdef HAVE_SYS_USER_H
-# include <sys/user.h>
-#endif
-#ifdef HAVE_SYS_IOCTL_H
-# include <sys/ioctl.h>
-#endif
-#ifndef _IOWR
-# include "ioctl.h"
-#endif
-
-#include <stdio.h>
-#include <sys/ioctl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/stat.h>
-#ifdef HAVE_SYS_VFS_H
-# include <sys/vfs.h>
-#endif
-#include <unistd.h>
-#include <fcntl.h>
-
-#include <libcfs/list.h>
-#include <lnet/lnet.h>
-#include <libcfs/kp30.h>
-#include <libcfs/user-bitops.h>
-
-/* definitions for liblustre */
-
-#ifdef __CYGWIN__
-
-#define CFS_PAGE_SHIFT  12
-#define CFS_PAGE_SIZE   (1UL << CFS_PAGE_SHIFT)
-#define CFS_PAGE_MASK   (~((__u64)CFS_PAGE_SIZE-1))
-#define loff_t long long
-#define ERESTART 2001
-typedef unsigned short umode_t;
-
-#endif
-
-#ifndef CURRENT_SECONDS
-# define CURRENT_SECONDS time(0)
-#endif
-
-#ifndef ARRAY_SIZE
-#define ARRAY_SIZE(a) ((sizeof (a))/(sizeof ((a)[0])))
-#endif
-
-/* This is because lprocfs_status.h gets included here indirectly.  It would
- * be much better to just avoid lprocfs being included into liblustre entirely
- * but that requires more header surgery than I can handle right now.
- */
-#ifndef smp_processor_id
-#define smp_processor_id() 0
-#endif
-#ifndef num_online_cpus
-#define num_online_cpus() 1
-#endif
-#ifndef num_possible_cpus
-#define num_possible_cpus() 1
-#endif
-
-/* always adopt 2.5 definitions */
-#define KERNEL_VERSION(a,b,c) ((a)*100+(b)*10+c)
-#define LINUX_VERSION_CODE KERNEL_VERSION(2,5,0)
-
-#ifndef page_private
-#define page_private(page) ((page)->private)
-#define set_page_private(page, v) ((page)->private = (v))
-#endif
-
-
-static inline void inter_module_put(void *a)
-{
-        return;
-}
-
-void *inter_module_get(char *arg);
-
-/* cheats for now */
-
-struct work_struct {
-        void (*ws_task)(void *arg);
-        void *ws_arg;
-};
-
-static inline void prepare_work(struct work_struct *q, void (*t)(void *),
-                                void *arg)
-{
-        q->ws_task = t;
-        q->ws_arg = arg;
-        return;
-}
-
-static inline void schedule_work(struct work_struct *q)
-{
-        q->ws_task(q->ws_arg);
-}
-
-
-#define strnlen(a,b) strlen(a)
-static inline void *kmalloc(int size, int prot)
-{
-        return malloc(size);
-}
-#define vmalloc malloc
-#define vfree free
-#define kfree(a) free(a)
-#define GFP_KERNEL 1
-#define GFP_HIGHUSER 1
-#define GFP_ATOMIC 1
-#define GFP_NOFS 1
-#define IS_ERR(a) ((unsigned long)(a) > (unsigned long)-1000L)
-#define PTR_ERR(a) ((long)(a))
-#define ERR_PTR(a) ((void*)((long)(a)))
-
-typedef struct {
-        void *cwd;
-}mm_segment_t;
-
-typedef int (read_proc_t)(char *page, char **start, off_t off,
-                          int count, int *eof, void *data);
-
-struct file; /* forward ref */
-typedef int (write_proc_t)(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-
-#define NIPQUAD(addr) \
-        ((unsigned char *)&addr)[0], \
-        ((unsigned char *)&addr)[1], \
-        ((unsigned char *)&addr)[2], \
-        ((unsigned char *)&addr)[3]
-
-#if defined(__LITTLE_ENDIAN)
-#define HIPQUAD(addr) \
-        ((unsigned char *)&addr)[3], \
-        ((unsigned char *)&addr)[2], \
-        ((unsigned char *)&addr)[1], \
-        ((unsigned char *)&addr)[0]
-#elif defined(__BIG_ENDIAN)
-#define HIPQUAD NIPQUAD
-#else
-#error "Undefined byteorder??"
-#endif /* __LITTLE_ENDIAN */
-
-/* bits ops */
-
-/* a long can be more than 32 bits, so use BITS_PER_LONG
- * to allow the compiler to adjust the bit shifting accordingly
- */
-
-static __inline__ int ext2_set_bit(int nr, void *addr)
-{
-        return set_bit(nr, addr);
-}
-
-static __inline__ int ext2_clear_bit(int nr, void *addr)
-{
-        return clear_bit(nr, addr);
-}
-
-static __inline__ int ext2_test_bit(int nr, void *addr)
-{
-        return test_bit(nr, addr);
-}
-
-/* modules */
-
-struct module {
-        int count;
-};
-
-static inline void MODULE_AUTHOR(char *name)
-{
-        printf("%s\n", name);
-}
-#define MODULE_DESCRIPTION(name) MODULE_AUTHOR(name)
-#define MODULE_LICENSE(name) MODULE_AUTHOR(name)
-
-#define THIS_MODULE NULL
-#define __init
-#define __exit
-
-/* devices */
-
-static inline int misc_register(void *foo)
-{
-        return 0;
-}
-
-static inline int misc_deregister(void *foo)
-{
-        return 0;
-}
-
-static inline int request_module(char *name)
-{
-        return (-EINVAL);
-}
-
-#define __MOD_INC_USE_COUNT(m)  do {} while (0)
-#define __MOD_DEC_USE_COUNT(m)  do {} while (0)
-#define MOD_INC_USE_COUNT       do {} while (0)
-#define MOD_DEC_USE_COUNT       do {} while (0)
-static inline void __module_get(struct module *module)
-{
-}
-
-static inline int try_module_get(struct module *module)
-{
-        return 1;
-}
-
-static inline void module_put(struct module *module)
-{
-}
-
-/* module initialization */
-extern int init_obdclass(void);
-extern int ptlrpc_init(void);
-extern int ldlm_init(void);
-extern int osc_init(void);
-extern int lov_init(void);
-extern int mdc_init(void);
-extern int mgc_init(void);
-extern int echo_client_init(void);
-
-
-
-/* general stuff */
-
-#define EXPORT_SYMBOL(S)
-
-struct rcu_head { };
-
-typedef struct { } spinlock_t;
-typedef __u64 kdev_t;
-
-#define SPIN_LOCK_UNLOCKED (spinlock_t) { }
-#define LASSERT_SPIN_LOCKED(lock) do {} while(0)
-#define LASSERT_SEM_LOCKED(sem) do {} while(0)
-
-static inline void spin_lock(spinlock_t *l) {return;}
-static inline void spin_unlock(spinlock_t *l) {return;}
-static inline void spin_lock_init(spinlock_t *l) {return;}
-static inline void local_irq_save(unsigned long flag) {return;}
-static inline void local_irq_restore(unsigned long flag) {return;}
-static inline int spin_is_locked(spinlock_t *l) {return 1;}
-
-static inline void spin_lock_bh(spinlock_t *l) {}
-static inline void spin_unlock_bh(spinlock_t *l) {}
-static inline void spin_lock_irqsave(spinlock_t *a, unsigned long b) {}
-static inline void spin_unlock_irqrestore(spinlock_t *a, unsigned long b) {}
-
-#define min(x,y) ((x)<(y) ? (x) : (y))
-#define max(x,y) ((x)>(y) ? (x) : (y))
-
-#ifndef min_t
-#define min_t(type,x,y) \
-        ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#endif
-#ifndef max_t
-#define max_t(type,x,y) \
-        ({ type __x = (x); type __y = (y); __x > __y ? __x: __y; })
-#endif
-
-#define simple_strtol strtol
-
-/* registering symbols */
-#ifndef ERESTARTSYS
-#define ERESTARTSYS ERESTART
-#endif
-#define HZ 1
-
-/* random */
-
-void get_random_bytes(void *ptr, int size);
-
-/* memory */
-
-/* memory size: used for some client tunables */
-#define num_physpages (256 * 1024) /* 1GB */
-
-static inline int copy_from_user(void *a,void *b, int c)
-{
-        memcpy(a,b,c);
-        return 0;
-}
-
-static inline int copy_to_user(void *a,void *b, int c)
-{
-        memcpy(a,b,c);
-        return 0;
-}
-
-
-/* slabs */
-typedef struct {
-         int size;
-} kmem_cache_t;
-#define SLAB_HWCACHE_ALIGN 0
-static inline kmem_cache_t *
-kmem_cache_create(const char *name, size_t objsize, size_t cdum,
-                  unsigned long d,
-                  void (*e)(void *, kmem_cache_t *, unsigned long),
-                  void (*f)(void *, kmem_cache_t *, unsigned long))
-{
-        kmem_cache_t *c;
-        c = malloc(sizeof(*c));
-        if (!c)
-                return NULL;
-        c->size = objsize;
-        CDEBUG(D_MALLOC, "alloc slab cache %s at %p, objsize %d\n",
-               name, c, (int)objsize);
-        return c;
-};
-
-static inline int kmem_cache_destroy(kmem_cache_t *a)
-{
-        CDEBUG(D_MALLOC, "destroy slab cache %p, objsize %u\n", a, a->size);
-        free(a);
-        return 0;
-}
-
-/* struct page decl moved out from here into portals/include/libcfs/user-prim.h */
-
-/* 2.4 defines */
-#define PAGE_LIST_ENTRY list
-#define PAGE_LIST(page) ((page)->list)
-
-#define kmap(page) (page)->addr
-#define kunmap(a) do {} while (0)
-
-static inline cfs_page_t *alloc_pages(int mask, unsigned long order)
-{
-        cfs_page_t *pg = malloc(sizeof(*pg));
-
-        if (!pg)
-                return NULL;
-#if 0 //#ifdef MAP_ANONYMOUS
-        pg->addr = mmap(0, PAGE_SIZE << order, PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 0, 0);
-#else
-        pg->addr = malloc(CFS_PAGE_SIZE << order);
-#endif
-
-        if (!pg->addr) {
-                free(pg);
-                return NULL;
-        }
-        return pg;
-}
-#define cfs_alloc_pages(mask, order)  alloc_pages((mask), (order))
-
-#define alloc_page(mask)      alloc_pages((mask), 0)
-#define cfs_alloc_page(mask)  alloc_page(mask)
-
-static inline void __free_pages(cfs_page_t *pg, int what)
-{
-#if 0 //#ifdef MAP_ANONYMOUS
-        munmap(pg->addr, PAGE_SIZE);
-#else
-        free(pg->addr);
-#endif
-        free(pg);
-}
-#define __cfs_free_pages(pg, order)  __free_pages((pg), (order))
-
-#define __free_page(page) __free_pages((page), 0)
-#define free_page(page) __free_page(page)
-#define __cfs_free_page(page)  __cfs_free_pages((page), 0)
-
-static inline cfs_page_t* __grab_cache_page(unsigned long index)
-{
-        cfs_page_t *pg = alloc_pages(0, 0);
-
-        if (pg)
-                pg->index = index;
-        return pg;
-}
-
-#define grab_cache_page(index) __grab_cache_page(index)
-#define page_cache_release(page) __free_pages(page, 0)
-
-/* arithmetic */
-#define do_div(a,b)                     \
-        ({                              \
-                unsigned long remainder;\
-                remainder = (a) % (b);  \
-                (a) = (a) / (b);        \
-                (remainder);            \
-        })
-
-/* VFS stuff */
-#define ATTR_MODE       0x0001
-#define ATTR_UID        0x0002
-#define ATTR_GID        0x0004
-#define ATTR_SIZE       0x0008
-#define ATTR_ATIME      0x0010
-#define ATTR_MTIME      0x0020
-#define ATTR_CTIME      0x0040
-#define ATTR_ATIME_SET  0x0080
-#define ATTR_MTIME_SET  0x0100
-#define ATTR_FORCE      0x0200  /* Not a change, but a change it */
-#define ATTR_ATTR_FLAG  0x0400
-#define ATTR_RAW        0x0800  /* file system, not vfs will massage attrs */
-#define ATTR_FROM_OPEN  0x1000  /* called from open path, ie O_TRUNC */
-#define ATTR_CTIME_SET  0x2000
-#define ATTR_KILL_SUID  0
-#define ATTR_KILL_SGID  0
-
-struct iattr {
-        unsigned int    ia_valid;
-        umode_t         ia_mode;
-        uid_t           ia_uid;
-        gid_t           ia_gid;
-        loff_t          ia_size;
-        time_t          ia_atime;
-        time_t          ia_mtime;
-        time_t          ia_ctime;
-        unsigned int    ia_attr_flags;
-};
-#define ll_iattr_struct iattr
-
-#define IT_OPEN     0x0001
-#define IT_CREAT    0x0002
-#define IT_READDIR  0x0004
-#define IT_GETATTR  0x0008
-#define IT_LOOKUP   0x0010
-#define IT_UNLINK   0x0020
-#define IT_GETXATTR 0x0040
-#define IT_EXEC     0x0080
-#define IT_PIN      0x0100
-
-#define IT_FL_LOCKED   0x0001
-#define IT_FL_FOLLOWED 0x0002 /* set by vfs_follow_link */
-
-#define INTENT_MAGIC 0x19620323
-
-struct lustre_intent_data {
-        int       it_disposition;
-        int       it_status;
-        __u64     it_lock_handle;
-        void     *it_data;
-        int       it_lock_mode;
-        int it_int_flags;
-};
-struct lookup_intent {
-        int     it_magic;
-        void    (*it_op_release)(struct lookup_intent *);
-        int     it_op;
-        int     it_flags;
-        int     it_create_mode;
-        union {
-                struct lustre_intent_data lustre;
-        } d;
-};
-
-static inline void intent_init(struct lookup_intent *it, int op, int flags)
-{
-        memset(it, 0, sizeof(*it));
-        it->it_magic = INTENT_MAGIC;
-        it->it_op = op;
-        it->it_flags = flags;
-}
-
-
-struct dentry {
-        int d_count;
-};
-
-struct vfsmount {
-        void *pwd;
-};
-
-/* semaphores */
-struct rw_semaphore {
-        int count;
-};
-
-/* semaphores */
-struct semaphore {
-        int count;
-};
-
-/* use the macro's argument to avoid unused warnings */
-#define down(a) do { (void)a; } while (0)
-#define mutex_down(a)   down(a)
-#define up(a) do { (void)a; } while (0)
-#define mutex_up(a)     up(a)
-#define down_read(a) do { (void)a; } while (0)
-#define up_read(a) do { (void)a; } while (0)
-#define down_write(a) do { (void)a; } while (0)
-#define up_write(a) do { (void)a; } while (0)
-#define sema_init(a,b) do { (void)a; } while (0)
-#define init_rwsem(a) do { (void)a; } while (0)
-#define DECLARE_MUTEX(name)     \
-        struct semaphore name = { 1 }
-static inline void init_MUTEX (struct semaphore *sem)
-{
-        sema_init(sem, 1);
-}
-static inline void init_MUTEX_LOCKED (struct semaphore *sem)
-{
-        sema_init(sem, 0);
-}
-
-#define init_mutex(s)   init_MUTEX(s)
-
-typedef struct  {
-        struct list_head sleepers;
-} wait_queue_head_t;
-
-typedef struct  {
-        struct list_head sleeping;
-        void *process;
-} wait_queue_t;
-
-struct signal {
-        int signal;
-};
-
-struct task_struct {
-        int state;
-        struct signal pending;
-        char comm[32];
-        int pid;
-        int fsuid;
-        int fsgid;
-        int max_groups;
-        int ngroups;
-        gid_t *groups;
-        __u32 cap_effective;
-};
-
-typedef struct task_struct cfs_task_t;
-#define cfs_current()           current
-#define cfs_curproc_pid()       (current->pid)
-#define cfs_curproc_comm()      (current->comm)
-
-extern struct task_struct *current;
-int in_group_p(gid_t gid);
-static inline int capable(int cap)
-{
-        if (current->cap_effective & (1 << cap))
-                return 1;
-        else
-                return 0;
-}
-
-#define set_current_state(foo) do { current->state = foo; } while (0)
-
-#define init_waitqueue_entry(q,p) do { (q)->process = p; } while (0)
-#define add_wait_queue(q,p) do {  list_add(&(q)->sleepers, &(p)->sleeping); } while (0)
-#define del_wait_queue(p) do { list_del(&(p)->sleeping); } while (0)
-#define remove_wait_queue(q,p) do { list_del(&(p)->sleeping); } while (0)
-
-#define DECLARE_WAIT_QUEUE_HEAD(HEAD)                           \
-        wait_queue_head_t HEAD = {                              \
-                .sleepers = CFS_LIST_HEAD_INIT(HEAD.sleepers)       \
-        }
-#define init_waitqueue_head(l) CFS_INIT_LIST_HEAD(&(l)->sleepers)
-#define wake_up(l) do { int a = 0; a++; } while (0)
-#define TASK_INTERRUPTIBLE 0
-#define TASK_UNINTERRUPTIBLE 1
-#define TASK_RUNNING 2
-
-#define wait_event_interruptible(wq, condition)                         \
-({                                                                      \
-        struct l_wait_info lwi;                                         \
-        int timeout = 100000000;/* for ever */                          \
-        int ret;                                                        \
-                                                                        \
-        lwi = LWI_TIMEOUT(timeout, NULL, NULL);                         \
-        ret = l_wait_event(NULL, condition, &lwi);                      \
-                                                                        \
-        ret;                                                            \
-})
-
-#define in_interrupt() (0)
-
-#define schedule() do {} while (0)
-static inline int schedule_timeout(signed long t)
-{
-        return 0;
-}
-
-#define lock_kernel() do {} while (0)
-#define unlock_kernel() do {} while (0)
-#define daemonize(l) do {} while (0)
-#define sigfillset(l) do {} while (0)
-#define recalc_sigpending(l) do {} while (0)
-#define kernel_thread(l,m,n) LBUG()
-
-#define USERMODEHELPER(path, argv, envp) (0)
-#define SIGNAL_MASK_ASSERT()
-#define KERN_INFO
-
-#include <sys/time.h>
-#if HZ != 1
-#error "liblustre's jiffies currently expects HZ to be 1"
-#endif
-#define jiffies                                 \
-({                                              \
-        unsigned long _ret = 0;                 \
-        struct timeval tv;                      \
-        if (gettimeofday(&tv, NULL) == 0)       \
-                _ret = tv.tv_sec;               \
-        _ret;                                   \
-})
-#define get_jiffies_64()  (__u64)jiffies
-#define time_after(a, b) ((long)(b) - (long)(a) < 0)
-#define time_before(a, b) time_after(b,a)
-#define time_after_eq(a,b)      ((long)(a) - (long)(b) >= 0)
-
-struct timer_list {
-        struct list_head tl_list;
-        void (*function)(unsigned long unused);
-        unsigned long data;
-        long expires;
-};
-
-static inline int timer_pending(struct timer_list *l)
-{
-        if (time_after(l->expires, jiffies))
-                return 1;
-        else
-                return 0;
-}
-
-static inline int init_timer(struct timer_list *l)
-{
-        CFS_INIT_LIST_HEAD(&l->tl_list);
-        return 0;
-}
-
-static inline void mod_timer(struct timer_list *l, int thetime)
-{
-        l->expires = thetime;
-}
-
-static inline void del_timer(struct timer_list *l)
-{
-        free(l);
-}
-
-typedef struct { volatile int counter; } atomic_t;
-
-#define ATOMIC_INIT(i) { i }
-
-#define atomic_read(a) ((a)->counter)
-#define atomic_set(a,b) do {(a)->counter = b; } while (0)
-#define atomic_dec_and_test(a) ((--((a)->counter)) == 0)
-#define atomic_dec_and_lock(a,b) ((--((a)->counter)) == 0)
-#define atomic_inc(a)  (((a)->counter)++)
-#define atomic_dec(a)  do { (a)->counter--; } while (0)
-#define atomic_add(b,a)  do {(a)->counter += b;} while (0)
-#define atomic_add_return(n,a) ((a)->counter += n)
-#define atomic_inc_return(a) atomic_add_return(1,a)
-#define atomic_sub(b,a)  do {(a)->counter -= b;} while (0)
-#define atomic_sub_return(n,a) ((a)->counter -= n)
-#define atomic_dec_return(a)  atomic_sub_return(1,a)
-
-#ifndef likely
-#define likely(exp) (exp)
-#endif
-#ifndef unlikely
-#define unlikely(exp) (exp)
-#endif
-
-/* FIXME sys/capability will finally included linux/fs.h thus
- * cause numerous trouble on x86-64. as temporary solution for
- * build broken at cary, we copy definition we need from capability.h
- * FIXME
- */
-struct _cap_struct;
-typedef struct _cap_struct *cap_t;
-typedef int cap_value_t;
-typedef enum {
-    CAP_EFFECTIVE=0,
-    CAP_PERMITTED=1,
-    CAP_INHERITABLE=2
-} cap_flag_t;
-typedef enum {
-    CAP_CLEAR=0,
-    CAP_SET=1
-} cap_flag_value_t;
-
-#define CAP_DAC_OVERRIDE        1
-#define CAP_DAC_READ_SEARCH     2
-#define CAP_FOWNER              3
-#define CAP_FSETID              4
-#define CAP_SYS_ADMIN          21
-
-cap_t   cap_get_proc(void);
-int     cap_get_flag(cap_t, cap_value_t, cap_flag_t, cap_flag_value_t *);
-
-static inline void libcfs_run_lbug_upcall(char *file, const char *fn,
-                                           const int l){}
-
-/* completion */
-struct completion {
-        unsigned int done;
-        cfs_waitq_t wait;
-};
-
-#define COMPLETION_INITIALIZER(work) \
-        { 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }
-
-#define DECLARE_COMPLETION(work) \
-        struct completion work = COMPLETION_INITIALIZER(work)
-
-#define INIT_COMPLETION(x)      ((x).done = 0)
-
-static inline void init_completion(struct completion *x)
-{
-        x->done = 0;
-        init_waitqueue_head(&x->wait);
-}
-
-struct liblustre_wait_callback {
-        struct list_head    llwc_list;
-        const char         *llwc_name;
-        int               (*llwc_fn)(void *arg);
-        void               *llwc_arg;
-};
-
-void *liblustre_register_wait_callback(const char *name,
-                                       int (*fn)(void *arg), void *arg);
-void liblustre_deregister_wait_callback(void *notifier);
-int liblustre_wait_event(int timeout);
-
-void *liblustre_register_idle_callback(const char *name,
-                                       int (*fn)(void *arg), void *arg);
-void liblustre_deregister_idle_callback(void *notifier);
-void liblustre_wait_idle(void);
-
-/* flock related */
-struct nfs_lock_info {
-        __u32             state;
-        __u32             flags;
-        void            *host;
-};
-
-typedef struct file_lock {
-        struct file_lock *fl_next;      /* singly linked list for this inode  */
-        struct list_head fl_link;       /* doubly linked list of all locks */
-        struct list_head fl_block;      /* circular list of blocked processes */
-        void *fl_owner;
-        unsigned int fl_pid;
-        cfs_waitq_t fl_wait;
-        struct file *fl_file;
-        unsigned char fl_flags;
-        unsigned char fl_type;
-        loff_t fl_start;
-        loff_t fl_end;
-
-        void (*fl_notify)(struct file_lock *);  /* unblock callback */
-        void (*fl_insert)(struct file_lock *);  /* lock insertion callback */
-        void (*fl_remove)(struct file_lock *);  /* lock removal callback */
-
-        void *fl_fasync; /* for lease break notifications */
-        unsigned long fl_break_time;    /* for nonblocking lease breaks */
-
-        union {
-                struct nfs_lock_info    nfs_fl;
-        } fl_u;
-} cfs_flock_t;
-
-#define cfs_flock_type(fl)                  ((fl)->fl_type)
-#define cfs_flock_set_type(fl, type)        do { (fl)->fl_type = (type); } while(0)
-#define cfs_flock_pid(fl)                   ((fl)->fl_pid)
-#define cfs_flock_set_pid(fl, pid)          do { (fl)->fl_pid = (pid); } while(0)
-#define cfs_flock_start(fl)                 ((fl)->fl_start)
-#define cfs_flock_set_start(fl, start)      do { (fl)->fl_start = (start); } while(0)
-#define cfs_flock_end(fl)                   ((fl)->fl_end)
-#define cfs_flock_set_end(fl, end)          do { (fl)->fl_end = (end); } while(0)
-
-#ifndef OFFSET_MAX
-#define INT_LIMIT(x)    (~((x)1 << (sizeof(x)*8 - 1)))
-#define OFFSET_MAX      INT_LIMIT(loff_t)
-#endif
-
-/* XXX: defined in kernel */
-#define FL_POSIX        1
-#define FL_SLEEP        128
-
-/* quota */
-#define QUOTA_OK 0
-#define NO_QUOTA 1
-
-/* ACL */
-struct posix_acl_entry {
-        short                   e_tag;
-        unsigned short          e_perm;
-        unsigned int            e_id;
-};
-
-struct posix_acl {
-        atomic_t                a_refcount;
-        unsigned int            a_count;
-        struct posix_acl_entry  a_entries[0];
-};
-
-typedef struct {
-        __u16           e_tag;
-        __u16           e_perm;
-        __u32           e_id;
-} xattr_acl_entry;
-
-typedef struct {
-        __u32           a_version;
-        xattr_acl_entry a_entries[0];
-} xattr_acl_header;
-
-static inline size_t xattr_acl_size(int count)
-{
-        return sizeof(xattr_acl_header) + count * sizeof(xattr_acl_entry);
-}
-
-static inline
-struct posix_acl * posix_acl_from_xattr(const void *value, size_t size)
-{
-        return NULL;
-}
-
-static inline
-int posix_acl_valid(const struct posix_acl *acl)
-{
-        return 0;
-}
-
-static inline
-void posix_acl_release(struct posix_acl *acl)
-{
-}
-
-#ifdef LIBLUSTRE_POSIX_ACL
- #ifndef posix_acl_xattr_entry 
-  #define posix_acl_xattr_entry xattr_acl_entry
- #endif
- #ifndef posix_acl_xattr_header 
-  #define posix_acl_xattr_header xattr_acl_header
- #endif
- #ifndef posix_acl_xattr_size
-  #define posix_acl_xattr_size(entry) xattr_acl_size(entry)
- #endif
- #ifndef CONFIG_FS_POSIX_ACL
-  #define CONFIG_FS_POSIX_ACL 1
- #endif
-#endif
-
-#ifndef ENOTSUPP
-#define ENOTSUPP ENOTSUP
-#endif
-
-#include <obd_support.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_lib.h>
-#include <lustre_import.h>
-#include <lustre_export.h>
-#include <lustre_net.h>
-
-#endif
diff --git a/lustre/include/linux/.cvsignore b/lustre/include/linux/.cvsignore
deleted file mode 100644
index b731c89d98fc3cbe95b994f9a611c9d89e608410..0000000000000000000000000000000000000000
--- a/lustre/include/linux/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-Makefile.in
-.deps
-TAGS
-extN_fs.h
-extN_fs_i.h
-extN_fs_sb.h
-extN_jbd.h
-extN_xattr.h
-xattr.h
-lustre_build_version.h
diff --git a/lustre/include/linux/Makefile.am b/lustre/include/linux/Makefile.am
deleted file mode 100644
index 9604a6a1621ce532ea0f0d385cd6401665da3566..0000000000000000000000000000000000000000
--- a/lustre/include/linux/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-linuxdir = $(includedir)/linux
-
-if UTILS
-linux_HEADERS = lustre_types.h lustre_user.h
-endif
-
-EXTRA_DIST = lprocfs_status.h lustre_debug.h lustre_lib.h \
-  lustre_dlm.h lustre_handles.h lustre_net.h obd_class.h obd_support.h  \
-  lustre_log.h lustre_compat25.h lustre_fsfilt.h lustre_mds.h obd.h \
-  lvfs.h lvfs_linux.h lustre_lite.h  lustre_quota.h \
-  lustre_user.h lustre_types.h lustre_patchless_compat.h lustre_intent.h
-
diff --git a/lustre/include/linux/lprocfs_status.h b/lustre/include/linux/lprocfs_status.h
deleted file mode 100644
index 85574fa0d3e73098153c7e390d1d4aa61a52ad7d..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lprocfs_status.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *   Top level header file for LProc SNMP
- *   Author: Hariharan Thantry thantry@users.sourceforge.net
- */
-#ifndef _LINUX_LPROCFS_SNMP_H
-#define _LINUX_LPROCFS_SNMP_H
-
-#ifndef _LPROCFS_SNMP_H
-#error Do not #include this file directly. #include <lprocfs_status.h> instead
-#endif
-
-#ifdef __KERNEL__
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/autoconf.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/version.h>
-#include <linux/smp.h>
-#include <linux/rwsem.h>
-#include <libcfs/kp30.h>
-
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/statfs.h>
-# else 
-#  define kstatfs statfs
-# endif
-
-#else 
-#  define kstatfs statfs
-#endif
-
-#endif /* LPROCFS_SNMP_H */
diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h
deleted file mode 100644
index 1ff876555b64da2250c92eda834a0387d275ec55..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_compat25.h
+++ /dev/null
@@ -1,542 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LINUX_COMPAT25_H
-#define _LINUX_COMPAT25_H
-
-#ifdef __KERNEL__
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) && LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69)
-#error sorry, lustre requires at least 2.5.69
-#endif
-
-#include <libcfs/linux/portals_compat25.h>
-
-#include <linux/lustre_patchless_compat.h>
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
-struct ll_iattr_struct {
-        struct iattr    iattr;
-        unsigned int    ia_attr_flags;
-};
-#else
-#define ll_iattr_struct iattr
-#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14) */
-
-#ifndef HAVE_SET_FS_PWD
-static inline void ll_set_fs_pwd(struct fs_struct *fs, struct vfsmount *mnt,
-                struct dentry *dentry)
-{
-        struct dentry *old_pwd;
-        struct vfsmount *old_pwdmnt;
-
-        write_lock(&fs->lock);
-        old_pwd = fs->pwd;
-        old_pwdmnt = fs->pwdmnt;
-        fs->pwdmnt = mntget(mnt);
-        fs->pwd = dget(dentry);
-        write_unlock(&fs->lock);
-
-        if (old_pwd) {
-                dput(old_pwd);
-                mntput(old_pwdmnt);
-        }
-}
-#else
-#define ll_set_fs_pwd set_fs_pwd
-#endif /* HAVE_SET_FS_PWD */
-
-#ifdef HAVE_INODE_I_MUTEX
-#define UNLOCK_INODE_MUTEX(inode) do {mutex_unlock(&(inode)->i_mutex); } while(0)
-#define LOCK_INODE_MUTEX(inode) do {mutex_lock(&(inode)->i_mutex); } while(0)
-#define TRYLOCK_INODE_MUTEX(inode) mutex_trylock(&(inode)->i_mutex)
-#else
-#define UNLOCK_INODE_MUTEX(inode) do {up(&(inode)->i_sem); } while(0)
-#define LOCK_INODE_MUTEX(inode) do {down(&(inode)->i_sem); } while(0)
-#define TRYLOCK_INODE_MUTEX(inode) (!down_trylock(&(inode)->i_sem))
-#endif /* HAVE_INODE_I_MUTEX */
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
-#define d_child d_u.d_child
-#define d_rcu d_u.d_rcu
-#endif
-
-#ifdef HAVE_DQUOTOFF_MUTEX
-#define UNLOCK_DQONOFF_MUTEX(dqopt) do {mutex_unlock(&(dqopt)->dqonoff_mutex); } while(0)
-#define LOCK_DQONOFF_MUTEX(dqopt) do {mutex_lock(&(dqopt)->dqonoff_mutex); } while(0)
-#else
-#define UNLOCK_DQONOFF_MUTEX(dqopt) do {up(&(dqopt)->dqonoff_sem); } while(0)
-#define LOCK_DQONOFF_MUTEX(dqopt) do {down(&(dqopt)->dqonoff_sem); } while(0)
-#endif /* HAVE_DQUOTOFF_MUTEX */
-
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4)
-#define NGROUPS_SMALL           NGROUPS
-#define NGROUPS_PER_BLOCK       ((int)(EXEC_PAGESIZE / sizeof(gid_t)))
-
-struct group_info {
-        int        ngroups;
-        atomic_t   usage;
-        gid_t      small_block[NGROUPS_SMALL];
-        int        nblocks;
-        gid_t     *blocks[0];
-};
-#define current_ngroups current->ngroups
-#define current_groups current->groups
-
-struct group_info *groups_alloc(int gidsetsize);
-void groups_free(struct group_info *ginfo);
-#else /* >= 2.6.4 */
-
-#define current_ngroups current->group_info->ngroups
-#define current_groups current->group_info->small_block
-
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4) */
-
-#ifndef page_private
-#define page_private(page) ((page)->private)
-#define set_page_private(page, v) ((page)->private = (v))
-#endif
-
-#ifndef HAVE_GFP_T
-#define gfp_t int
-#endif
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-
-#define lock_dentry(___dentry)          spin_lock(&(___dentry)->d_lock)
-#define unlock_dentry(___dentry)        spin_unlock(&(___dentry)->d_lock)
-
-#define lock_24kernel()         do {} while (0)
-#define unlock_24kernel()       do {} while (0)
-#define ll_kernel_locked()      kernel_locked()
-
-/*
- * OBD need working random driver, thus all our
- * initialization routines must be called after device
- * driver initialization
- */
-#ifndef MODULE
-#undef module_init
-#define module_init(a)     late_initcall(a)
-#endif
-
-/* XXX our code should be using the 2.6 calls, not the other way around */
-#define TryLockPage(page)               TestSetPageLocked(page)
-#define Page_Uptodate(page)             PageUptodate(page)
-#define ll_redirty_page(page)           set_page_dirty(page)
-
-#define KDEVT_INIT(val)                 (val)
-
-#define LTIME_S(time)                   (time.tv_sec)
-#define ll_path_lookup                  path_lookup
-#define ll_permission(inode,mask,nd)    permission(inode,mask,nd)
-
-#define ll_pgcache_lock(mapping)          spin_lock(&mapping->page_lock)
-#define ll_pgcache_unlock(mapping)        spin_unlock(&mapping->page_lock)
-#define ll_call_writepage(inode, page)  \
-                                (inode)->i_mapping->a_ops->writepage(page, NULL)
-#define ll_invalidate_inode_pages(inode) \
-                                invalidate_inode_pages((inode)->i_mapping)
-#define ll_truncate_complete_page(page) \
-                                truncate_complete_page(page->mapping, page)
-
-#define ll_vfs_create(a,b,c,d)          vfs_create(a,b,c,d)
-#define ll_dev_t                        dev_t
-#define kdev_t                          dev_t
-#define to_kdev_t(dev)                  (dev)
-#define kdev_t_to_nr(dev)               (dev)
-#define val_to_kdev(dev)                (dev)
-#define ILOOKUP(sb, ino, test, data)    ilookup5(sb, ino, test, data);
-
-#include <linux/writeback.h>
-
-static inline int cleanup_group_info(void)
-{
-        struct group_info *ginfo;
-
-        ginfo = groups_alloc(0);
-        if (!ginfo)
-                return -ENOMEM;
-
-        set_current_groups(ginfo);
-        put_group_info(ginfo);
-
-        return 0;
-}
-
-#define __set_page_ll_data(page, llap) \
-        do {       \
-                page_cache_get(page); \
-                SetPagePrivate(page); \
-                set_page_private(page, (unsigned long)llap); \
-        } while (0)
-#define __clear_page_ll_data(page) \
-        do {       \
-                ClearPagePrivate(page); \
-                set_page_private(page, 0); \
-                page_cache_release(page); \
-        } while(0)
-
-#define kiobuf bio
-
-#include <linux/proc_fs.h>
-
-#if !defined(HAVE_D_REHASH_COND) && defined(HAVE___D_REHASH)
-#define d_rehash_cond(dentry, lock) __d_rehash(dentry, lock)
-extern void __d_rehash(struct dentry *dentry, int lock);
-#endif
-
-#if !defined(HAVE_D_MOVE_LOCKED) && defined(HAVE___D_MOVE)
-#define d_move_locked(dentry, target) __d_move(dentry, target)
-extern void __d_move(struct dentry *dentry, struct dentry *target);
-#endif
-
-#ifdef HAVE_CAN_SLEEP_ARG
-#define ll_flock_lock_file_wait(file, lock, can_sleep) \
-        flock_lock_file_wait(file, lock, can_sleep)
-#else
-#define ll_flock_lock_file_wait(file, lock, can_sleep) \
-        flock_lock_file_wait(file, lock)
-#endif
-
-#define CheckWriteback(page, cmd) \
-        (!(!PageWriteback(page) && cmd == OBD_BRW_WRITE))
-
-#else /* 2.4.. */
-
-#define ll_flock_lock_file_wait(file, lock, can_sleep) \
-        do {} while(0)
-
-#define lock_dentry(___dentry)
-#define unlock_dentry(___dentry)
-
-#define lock_24kernel()         lock_kernel()
-#define unlock_24kernel()       unlock_kernel()
-#define ll_kernel_locked()      (current->lock_depth >= 0)
-
-/* 2.4 kernels have HZ=100 on i386/x86_64, this should be reasonably safe */
-#define get_jiffies_64()        (__u64)jiffies
-
-#ifdef HAVE_MM_INLINE
-#include <linux/mm_inline.h>
-#endif
-
-#ifndef pgoff_t
-#define pgoff_t unsigned long
-#endif
-
-#define ll_vfs_create(a,b,c,d)              vfs_create(a,b,c)
-#define ll_permission(inode,mask,nd)        permission(inode,mask)
-#define ILOOKUP(sb, ino, test, data)        ilookup4(sb, ino, test, data);
-#define DCACHE_DISCONNECTED                 DCACHE_NFSD_DISCONNECTED
-#define ll_dev_t                            int
-#define old_encode_dev(dev)                 (dev)
-
-/* 2.5 uses hlists for some things, like the d_hash.  we'll treat them
- * as 2.5 and let macros drop back.. */
-#ifndef HLIST_HEAD /* until we get a kernel newer than l28 */
-#define hlist_entry                     list_entry
-#define hlist_head                      list_head
-#define hlist_node                      list_head
-#define HLIST_HEAD                      LIST_HEAD
-#define INIT_HLIST_HEAD                 INIT_LIST_HEAD
-#define hlist_del_init                  list_del_init
-#define hlist_add_head                  list_add
-#endif
-
-#ifndef INIT_HLIST_NODE
-#define INIT_HLIST_NODE(p)              ((p)->next = NULL, (p)->prev = NULL)
-#endif
-
-#ifndef hlist_for_each
-#define hlist_for_each                  list_for_each
-#endif
-
-#ifndef hlist_for_each_safe
-#define hlist_for_each_safe             list_for_each_safe
-#endif
-
-#define KDEVT_INIT(val)                 (val)
-#define ext3_xattr_set_handle           ext3_xattr_set
-#define try_module_get                  __MOD_INC_USE_COUNT
-#define module_put                      __MOD_DEC_USE_COUNT
-#define LTIME_S(time)                   (time)
-
-#if !defined(CONFIG_RH_2_4_20) && !defined(cpu_online)
-#define cpu_online(cpu)                 test_bit(cpu, &(cpu_online_map))
-#endif
-
-static inline int ll_path_lookup(const char *path, unsigned flags,
-                                 struct nameidata *nd)
-{
-        int error = 0;
-        if (path_init(path, flags, nd))
-                error = path_walk(path, nd);
-        return error;
-}
-#define ll_permission(inode,mask,nd)    permission(inode,mask)
-typedef long sector_t;
-
-#define ll_pgcache_lock(mapping)        spin_lock(&pagecache_lock)
-#define ll_pgcache_unlock(mapping)      spin_unlock(&pagecache_lock)
-#define ll_call_writepage(inode, page)  \
-                               (inode)->i_mapping->a_ops->writepage(page)
-#define ll_invalidate_inode_pages(inode) invalidate_inode_pages(inode)
-#define ll_truncate_complete_page(page) truncate_complete_page(page)
-
-static inline void clear_page_dirty(struct page *page)
-{
-        if (PageDirty(page))
-                ClearPageDirty(page);
-}
-
-static inline int clear_page_dirty_for_io(struct page *page)
-{
-        struct address_space *mapping = page->mapping;
-
-        if (page->mapping && PageDirty(page)) {
-                ClearPageDirty(page);
-                ll_pgcache_lock(mapping);
-                list_del(&page->list);
-                list_add(&page->list, &mapping->locked_pages);
-                ll_pgcache_unlock(mapping);
-                return 1;
-        }
-        return 0;
-}
-
-static inline void ll_redirty_page(struct page *page)
-{
-        SetPageDirty(page);
-        ClearPageLaunder(page);
-}
-
-static inline void __d_drop(struct dentry *dentry)
-{
-        list_del_init(&dentry->d_hash);
-}
-
-static inline int cleanup_group_info(void)
-{
-        /* Get rid of unneeded supplementary groups */
-        current->ngroups = 0;
-        memset(current->groups, 0, sizeof(current->groups));
-        return 0;
-}
-
-#ifndef HAVE_COND_RESCHED
-static inline void cond_resched(void)
-{
-        if (unlikely(need_resched())) {
-                set_current_state(TASK_RUNNING);
-                schedule();
-        }
-}
-#endif
-
-/* to find proc_dir_entry from inode. 2.6 has native one -bzzz */
-#ifndef HAVE_PDE
-#define PDE(ii)         ((ii)->u.generic_ip)
-#endif
-
-#define __set_page_ll_data(page, llap) set_page_private(page, (unsigned long)llap)
-#define __clear_page_ll_data(page) set_page_private(page, 0)
-#define PageWriteback(page) 0
-#define CheckWriteback(page, cmd) 1
-#define set_page_writeback(page) do {} while (0)
-#define end_page_writeback(page) do {} while (0)
-
-static inline int mapping_mapped(struct address_space *mapping)
-{
-        if (mapping->i_mmap_shared)
-                return 1;
-        if (mapping->i_mmap)
-                return 1;
-        return 0;
-}
-
-#ifdef ZAP_PAGE_RANGE_VMA
-#define ll_zap_page_range(vma, addr, len)  zap_page_range(vma, addr, len)
-#else
-#define ll_zap_page_range(vma, addr, len)  zap_page_range(vma->vm_mm, addr, len)
-#endif
-
-#ifndef HAVE_PAGE_MAPPED
-/* Poor man's page_mapped. substract from page count, counts from
-   buffers/pagecache and our own count (we are supposed to hold one reference).
-   What is left are user mappings and also others who work with this page now,
-   but there are supposedly none. */
-static inline int page_mapped(struct page *page)
-{
-        return page_count(page) - !!page->mapping - !!page->buffers - 1;
-}
-#endif /* !HAVE_PAGE_MAPPED */
-
-static inline void touch_atime(struct vfsmount *mnt, struct dentry *dentry)
-{
-        update_atime(dentry->d_inode);
-}
-
-static inline void file_accessed(struct file *file)
-{
-#ifdef O_NOATIME
-        if (file->f_flags & O_NOATIME)
-                return;
-#endif
-        touch_atime(file->f_vfsmnt, file->f_dentry);
-}
-
-#ifndef typecheck
-/*
- * Check at compile time that something is of a particular type.
- * Always evaluates to 1 so you may use it easily in comparisons.
- */
-#define typecheck(type,x) \
-({	type __dummy; \
-	typeof(x) __dummy2; \
-	(void)(&__dummy == &__dummy2); \
-	1; \
-})
-#endif
-
-#endif /* end of 2.4 compat macros */
-
-#ifdef HAVE_PAGE_LIST
-static inline int mapping_has_pages(struct address_space *mapping)
-{
-        int rc = 1;
-
-        ll_pgcache_lock(mapping);
-        if (list_empty(&mapping->dirty_pages) &&
-            list_empty(&mapping->clean_pages) &&
-            list_empty(&mapping->locked_pages)) {
-                rc = 0;
-        }
-        ll_pgcache_unlock(mapping);
-
-        return rc;
-}
-#else
-static inline int mapping_has_pages(struct address_space *mapping)
-{
-        return mapping->nrpages > 0;
-}
-#endif
-
-#ifdef HAVE_KIOBUF_KIO_BLOCKS
-#define KIOBUF_GET_BLOCKS(k) ((k)->kio_blocks)
-#else
-#define KIOBUF_GET_BLOCKS(k) ((k)->blocks)
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,7))
-#define ll_set_dflags(dentry, flags) do { dentry->d_vfs_flags |= flags; } while(0)
-#define ll_vfs_symlink(dir, dentry, path, mode) vfs_symlink(dir, dentry, path)
-#else
-#define ll_set_dflags(dentry, flags) do { \
-                spin_lock(&dentry->d_lock); \
-                dentry->d_flags |= flags; \
-                spin_unlock(&dentry->d_lock); \
-        } while(0)
-#define ll_vfs_symlink(dir, dentry, path, mode) vfs_symlink(dir, dentry, path, mode)
-#endif
-
-#ifndef container_of
-#define container_of(ptr, type, member) ({                      \
-                const typeof( ((type *)0)->member ) *__mptr = (ptr); \
-                (type *)( (char *)__mptr - offsetof(type,member) );})
-#endif
-
-#ifdef HAVE_I_ALLOC_SEM
-#define UP_WRITE_I_ALLOC_SEM(i)   do { up_write(&(i)->i_alloc_sem); } while (0)
-#define DOWN_WRITE_I_ALLOC_SEM(i) do { down_write(&(i)->i_alloc_sem); } while(0)
-#define LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) LASSERT(down_read_trylock(&(i)->i_alloc_sem) == 0)
-
-#define UP_READ_I_ALLOC_SEM(i)    do { up_read(&(i)->i_alloc_sem); } while (0)
-#define DOWN_READ_I_ALLOC_SEM(i)  do { down_read(&(i)->i_alloc_sem); } while (0)
-#define LASSERT_I_ALLOC_SEM_READ_LOCKED(i) LASSERT(down_write_trylock(&(i)->i_alloc_sem) == 0)
-#else
-#define UP_READ_I_ALLOC_SEM(i)              do { } while (0)
-#define DOWN_READ_I_ALLOC_SEM(i)            do { } while (0)
-#define LASSERT_I_ALLOC_SEM_READ_LOCKED(i)  do { } while (0)
-
-#define UP_WRITE_I_ALLOC_SEM(i)             do { } while (0)
-#define DOWN_WRITE_I_ALLOC_SEM(i)           do { } while (0)
-#define LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i) do { } while (0)
-#endif
-
-#ifndef HAVE_GRAB_CACHE_PAGE_NOWAIT_GFP
-#define grab_cache_page_nowait_gfp(x, y, z) grab_cache_page_nowait((x), (y))
-#endif
-
-#ifndef HAVE_FILEMAP_FDATAWRITE
-#define filemap_fdatawrite(mapping)      filemap_fdatasync(mapping)
-#endif
-
-#ifdef HAVE_VFS_KERN_MOUNT
-static inline 
-struct vfsmount *
-ll_kern_mount(const char *fstype, int flags, const char *name, void *data)
-{
-        struct file_system_type *type = get_fs_type(fstype);
-        struct vfsmount *mnt;
-        if (!type)
-                return ERR_PTR(-ENODEV);
-        mnt = vfs_kern_mount(type, flags, name, data);
-        module_put(type->owner);
-        return mnt;
-}
-#else
-#define ll_kern_mount(fstype, flags, name, data) do_kern_mount((fstype), (flags), (name), (data))
-#endif
-
-#ifdef HAVE_STATFS_DENTRY_PARAM
-#define ll_do_statfs(sb, sfs) (sb)->s_op->statfs((sb)->s_root, (sfs))
-#else
-#define ll_do_statfs(sb, sfs) (sb)->s_op->statfs((sb), (sfs))
-#endif
-
-/* task_struct */
-#ifndef HAVE_TASK_PPTR
-#define p_pptr parent
-#endif
-
-#ifdef HAVE_UNREGISTER_BLKDEV_RETURN_INT
-#define ll_unregister_blkdev(a,b)       unregister_blkdev((a),(b))
-#else
-static inline 
-int ll_unregister_blkdev(unsigned int dev, const char *name)
-{
-        unregister_blkdev(dev, name);
-        return 0;
-}
-#endif
-
-#ifdef HAVE_INVALIDATE_BDEV_2ARG
-#define ll_invalidate_bdev(a,b)         invalidate_bdev((a),(b))
-#else
-#define ll_invalidate_bdev(a,b)         invalidate_bdev((a))
-#endif
-
-#endif /* __KERNEL__ */
-#endif /* _COMPAT25_H */
diff --git a/lustre/include/linux/lustre_debug.h b/lustre/include/linux/lustre_debug.h
deleted file mode 100644
index db872a93bd2e85491ba66596f2199fce29aa40ec..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_debug.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LINUX_LUSTRE_DEBUG_H
-#define _LINUX_LUSTRE_DEBUG_H
-
-#ifndef _LUSTRE_DEBUG_H
-#error Do not #include this file directly. #include <lprocfs_status.h> instead
-#endif
-
-#ifdef __KERNEL__
-#define LL_CDEBUG_PAGE(mask, page, fmt, arg...)                               \
-        CDEBUG(mask, "page %p map %p index %lu flags %lx count %u priv %0lx: "\
-               fmt, page, page->mapping, page->index, (long)page->flags,      \
-               page_count(page), page_private(page), ## arg)
-#else
-#define LL_CDEBUG_PAGE(mask, page, fmt, arg...)                               \
-        CDEBUG(mask, "page %p index %lu priv %0lx: "\
-               fmt, page, page->index, page_private(page), ## arg)
-#endif
-
-#endif
diff --git a/lustre/include/linux/lustre_dlm.h b/lustre/include/linux/lustre_dlm.h
deleted file mode 100644
index a19f31a8351583f16463deba6b53e1976569ceec..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_dlm.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * (visit-tags-table FILE)
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _LINUX_LUSTRE_DLM_H__
-#define _LINUX_LUSTRE_DLM_H__
-
-#ifndef _LUSTRE_DLM_H__
-#error Do not #include this file directly. #include <lprocfs_status.h> instead
-#endif
-
-#ifdef __KERNEL__
-# include <linux/proc_fs.h>
-# ifdef HAVE_BIT_SPINLOCK_H
-#  include <asm/processor.h>
-#  include <linux/bit_spinlock.h>
-# endif
-#endif
-
-#endif
diff --git a/lustre/include/linux/lustre_fsfilt.h b/lustre/include/linux/lustre_fsfilt.h
deleted file mode 100644
index f1698e5ce80ff3068e4854238c843543ae12b04b..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_fsfilt.h
+++ /dev/null
@@ -1,477 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Filesystem interface helper.
- *
- */
-
-#ifndef _LINUX_LUSTRE_FSFILT_H
-#define _LINUX_LUSTRE_FSFILT_H
-
-#ifndef _LUSTRE_FSFILT_H
-#error Do not #include this file directly. #include <lustre_fsfilt.h> instead
-#endif
-
-#ifdef __KERNEL__
-
-#include <obd.h>
-#include <obd_class.h>
-
-typedef void (*fsfilt_cb_t)(struct obd_device *obd, __u64 last_rcvd,
-                            void *data, int error);
-
-struct fsfilt_objinfo {
-        struct dentry *fso_dentry;
-        int fso_bufcnt;
-};
-
-#define XATTR_LUSTRE_MDS_LOV_EA         "lov"
-
-struct lustre_dquot;
-struct fsfilt_operations {
-        struct list_head fs_list;
-        struct module *fs_owner;
-        char   *fs_type;
-        char   *(* fs_getlabel)(struct super_block *sb);
-        int     (* fs_setlabel)(struct super_block *sb, char *label);
-        char   *(* fs_uuid)(struct super_block *sb);
-        void   *(* fs_start)(struct inode *inode, int op, void *desc_private,
-                             int logs);
-        void   *(* fs_brw_start)(int objcount, struct fsfilt_objinfo *fso,
-                                 int niocount, struct niobuf_local *nb,
-                                 void *desc_private, int logs);
-        int     (* fs_extend)(struct inode *inode, unsigned nblocks, void *h);
-        int     (* fs_commit)(struct inode *inode, void *handle,int force_sync);
-        int     (* fs_commit_async)(struct inode *inode, void *handle,
-                                        void **wait_handle);
-        int     (* fs_commit_wait)(struct inode *inode, void *handle);
-        int     (* fs_setattr)(struct dentry *dentry, void *handle,
-                               struct iattr *iattr, int do_trunc);
-        int     (* fs_iocontrol)(struct inode *inode, struct file *file,
-                                 unsigned int cmd, unsigned long arg);
-        int     (* fs_set_md)(struct inode *inode, void *handle, void *md,
-                              int size, const char *name);
-        int     (* fs_get_md)(struct inode *inode, void *md, int size,
-                              const char *name);
-        /*
-         * this method is needed to make IO operation fsfilt nature depend.
-         *
-         * This operation maybe synchronous or asynchronous.
-         *
-         * Return convention: positive number of bytes written (synchronously)
-         * on success. Negative errno value on failure. Zero if asynchronous
-         * IO was submitted successfully.
-         *
-         */
-        int     (* fs_send_bio)(int rw, struct inode *inode,struct kiobuf *bio);
-        ssize_t (* fs_readpage)(struct file *file, char *buf, size_t count,
-                                loff_t *offset);
-        int     (* fs_add_journal_cb)(struct obd_device *obd, __u64 last_rcvd,
-                                      void *handle, fsfilt_cb_t cb_func,
-                                      void *cb_data);
-        int     (* fs_statfs)(struct super_block *sb, struct obd_statfs *osfs);
-        int     (* fs_sync)(struct super_block *sb);
-        int     (* fs_map_inode_pages)(struct inode *inode, struct page **page,
-                                       int pages, unsigned long *blocks,
-                                       int *created, int create,
-                                       struct semaphore *sem);
-        int     (* fs_write_record)(struct file *, void *, int size, loff_t *,
-                                    int force_sync);
-        int     (* fs_read_record)(struct file *, void *, int size, loff_t *);
-        int     (* fs_setup)(struct super_block *sb);
-        int     (* fs_get_op_len)(int, struct fsfilt_objinfo *, int);
-        int     (* fs_quotacheck)(struct super_block *sb,
-                                  struct obd_quotactl *oqctl);
-        __u64   (* fs_get_version) (struct inode *inode);
-        __u64   (* fs_set_version) (struct inode *inode, __u64 new_version);
-        int     (* fs_quotactl)(struct super_block *sb,
-                                struct obd_quotactl *oqctl);
-        int     (* fs_quotainfo)(struct lustre_quota_info *lqi, int type,
-                                 int cmd);
-        int     (* fs_qids)(struct file *file, struct inode *inode, int type,
-                            struct list_head *list);
-        int     (* fs_dquot)(struct lustre_dquot *dquot, int cmd);
-        lvfs_sbdev_type (* fs_journal_sbdev)(struct super_block *sb);
-};
-
-extern int fsfilt_register_ops(struct fsfilt_operations *fs_ops);
-extern void fsfilt_unregister_ops(struct fsfilt_operations *fs_ops);
-extern struct fsfilt_operations *fsfilt_get_ops(const char *type);
-extern void fsfilt_put_ops(struct fsfilt_operations *fs_ops);
-
-static inline char *fsfilt_get_label(struct obd_device *obd,
-                                     struct super_block *sb)
-{
-        if (obd->obd_fsops->fs_getlabel == NULL)
-                return NULL;
-        if (obd->obd_fsops->fs_getlabel(sb)[0] == '\0')
-                return NULL;
-
-        return obd->obd_fsops->fs_getlabel(sb);
-}
-
-static inline int fsfilt_set_label(struct obd_device *obd,
-                                   struct super_block *sb, char *label)
-{
-        if (obd->obd_fsops->fs_setlabel == NULL)
-                return -ENOSYS;
-        return (obd->obd_fsops->fs_setlabel(sb, label));
-}
-
-static inline __u8 *fsfilt_uuid(struct obd_device *obd, struct super_block *sb)
-{
-        if (obd->obd_fsops->fs_uuid == NULL)
-                return NULL;
-
-        return obd->obd_fsops->fs_uuid(sb);
-}
-
-static inline lvfs_sbdev_type fsfilt_journal_sbdev(struct obd_device *obd,
-                                                   struct super_block *sb)
-{
-        if (obd && obd->obd_fsops && obd->obd_fsops->fs_journal_sbdev)
-                return obd->obd_fsops->fs_journal_sbdev(sb);
-        return (lvfs_sbdev_type)0;
-}
-
-#define FSFILT_OP_UNLINK         1
-#define FSFILT_OP_RMDIR          2
-#define FSFILT_OP_RENAME         3
-#define FSFILT_OP_CREATE         4
-#define FSFILT_OP_MKDIR          5
-#define FSFILT_OP_SYMLINK        6
-#define FSFILT_OP_MKNOD          7
-#define FSFILT_OP_SETATTR        8
-#define FSFILT_OP_LINK           9
-#define FSFILT_OP_CANCEL_UNLINK 10
-#define FSFILT_OP_JOIN          11
-#define FSFILT_OP_NOOP          15
-
-#define __fsfilt_check_slow(obd, start, msg)                            \
-do {                                                                    \
-        if (time_before(jiffies, start + 15 * HZ))                      \
-                break;                                                  \
-        else if (time_before(jiffies, start + 30 * HZ))                 \
-                CDEBUG(D_VFSTRACE, "%s: slow %s %lus\n", obd->obd_name, \
-                       msg, (jiffies-start) / HZ);                      \
-        else if (time_before(jiffies, start + DISK_TIMEOUT * HZ))       \
-                CWARN("%s: slow %s %lus\n", obd->obd_name, msg,         \
-                      (jiffies - start) / HZ);                          \
-        else                                                            \
-                CERROR("%s: slow %s %lus\n", obd->obd_name, msg,        \
-                       (jiffies - start) / HZ);                         \
-} while (0)
-
-#define fsfilt_check_slow(obd, start, msg)    \
-do {                                          \
-        __fsfilt_check_slow(obd, start, msg); \
-        start = jiffies;                      \
-} while (0)
-
-static inline void *fsfilt_start_log(struct obd_device *obd,
-                                     struct inode *inode, int op,
-                                     struct obd_trans_info *oti, int logs)
-{
-        unsigned long now = jiffies;
-        void *parent_handle = oti ? oti->oti_handle : NULL;
-        void *handle;
-
-        if (obd->obd_fail)
-                return ERR_PTR(-EROFS);
-
-        handle = obd->obd_fsops->fs_start(inode, op, parent_handle, logs);
-        CDEBUG(D_INFO, "started handle %p (%p)\n", handle, parent_handle);
-
-        if (oti != NULL) {
-                if (parent_handle == NULL) {
-                        oti->oti_handle = handle;
-                } else if (handle != parent_handle) {
-                        CERROR("mismatch: parent %p, handle %p, oti %p\n",
-                               parent_handle, handle, oti);
-                        LBUG();
-                }
-        }
-        fsfilt_check_slow(obd, now, "journal start");
-        return handle;
-}
-
-static inline void *fsfilt_start(struct obd_device *obd, struct inode *inode,
-                                 int op, struct obd_trans_info *oti)
-{
-        return fsfilt_start_log(obd, inode, op, oti, 0);
-}
-
-static inline void *fsfilt_brw_start_log(struct obd_device *obd, int objcount,
-                                         struct fsfilt_objinfo *fso,
-                                         int niocount, struct niobuf_local *nb,
-                                         struct obd_trans_info *oti, int logs)
-{
-        unsigned long now = jiffies;
-        void *parent_handle = oti ? oti->oti_handle : NULL;
-        void *handle;
-
-        if (obd->obd_fail)
-                return ERR_PTR(-EROFS);
-
-        handle = obd->obd_fsops->fs_brw_start(objcount, fso, niocount, nb,
-                                              parent_handle, logs);
-        CDEBUG(D_INFO, "started handle %p (%p)\n", handle, parent_handle);
-
-        if (oti != NULL) {
-                if (parent_handle == NULL) {
-                        oti->oti_handle = handle;
-                } else if (handle != parent_handle) {
-                        CERROR("mismatch: parent %p, handle %p, oti %p\n",
-                               parent_handle, handle, oti);
-                        LBUG();
-                }
-        }
-        fsfilt_check_slow(obd, now, "journal start");
-
-        return handle;
-}
-
-static inline void *fsfilt_brw_start(struct obd_device *obd, int objcount,
-                                     struct fsfilt_objinfo *fso, int niocount,
-                                     struct niobuf_local *nb,
-                                     struct obd_trans_info *oti)
-{
-        return fsfilt_brw_start_log(obd, objcount, fso, niocount, nb, oti, 0);
-}
-
-static inline int fsfilt_extend(struct obd_device *obd, struct inode *inode,
-                                unsigned int nblocks, void *handle)
-{
-        unsigned long now = jiffies;
-        int rc = obd->obd_fsops->fs_extend(inode, nblocks, handle);
-        CDEBUG(D_INFO, "extending handle %p with %u blocks\n", handle, nblocks);
-
-        fsfilt_check_slow(obd, now, "journal extend");
-
-        return rc;
-}
-
-static inline int fsfilt_commit(struct obd_device *obd, struct inode *inode,
-                                void *handle, int force_sync)
-{
-        unsigned long now = jiffies;
-        int rc = obd->obd_fsops->fs_commit(inode, handle, force_sync);
-        CDEBUG(D_INFO, "committing handle %p\n", handle);
-
-        fsfilt_check_slow(obd, now, "journal start");
-
-        return rc;
-}
-
-static inline int fsfilt_commit_async(struct obd_device *obd,
-                                      struct inode *inode, void *handle,
-                                      void **wait_handle)
-{
-        unsigned long now = jiffies;
-        int rc = obd->obd_fsops->fs_commit_async(inode, handle, wait_handle);
-
-        CDEBUG(D_INFO, "committing handle %p (async)\n", *wait_handle);
-        fsfilt_check_slow(obd, now, "journal start");
-
-        return rc;
-}
-
-static inline int fsfilt_commit_wait(struct obd_device *obd,
-                                     struct inode *inode, void *handle)
-{
-        unsigned long now = jiffies;
-        int rc = obd->obd_fsops->fs_commit_wait(inode, handle);
-        CDEBUG(D_INFO, "waiting for completion %p\n", handle);
-        fsfilt_check_slow(obd, now, "journal start");
-        return rc;
-}
-
-static inline int fsfilt_setattr(struct obd_device *obd, struct dentry *dentry,
-                                 void *handle, struct iattr *iattr,int do_trunc)
-{
-        unsigned long now = jiffies;
-        int rc;
-        rc = obd->obd_fsops->fs_setattr(dentry, handle, iattr, do_trunc);
-        fsfilt_check_slow(obd, now, "setattr");
-        return rc;
-}
-
-static inline int fsfilt_iocontrol(struct obd_device *obd, struct inode *inode,
-                                   struct file *file, unsigned int cmd,
-                                   unsigned long arg)
-{
-        return obd->obd_fsops->fs_iocontrol(inode, file, cmd, arg);
-}
-
-static inline int fsfilt_set_md(struct obd_device *obd, struct inode *inode,
-                                void *handle, void *md, int size,
-                                const char *name)
-{
-        return obd->obd_fsops->fs_set_md(inode, handle, md, size, name);
-}
-
-static inline int fsfilt_get_md(struct obd_device *obd, struct inode *inode,
-                                void *md, int size, const char *name)
-{
-        return obd->obd_fsops->fs_get_md(inode, md, size, name);
-}
-
-static inline int fsfilt_send_bio(int rw, struct obd_device *obd,
-                                  struct inode *inode, void *bio)
-{
-        LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw);
-
-        if (rw == OBD_BRW_READ)
-                return obd->obd_fsops->fs_send_bio(READ, inode, bio);
-        return obd->obd_fsops->fs_send_bio(WRITE, inode, bio);
-}
-
-static inline ssize_t fsfilt_readpage(struct obd_device *obd,
-                                      struct file *file, char *buf,
-                                      size_t count, loff_t *offset)
-{
-        return obd->obd_fsops->fs_readpage(file, buf, count, offset);
-}
-
-static inline int fsfilt_add_journal_cb(struct obd_device *obd, __u64 last_rcvd,
-                                        void *handle, fsfilt_cb_t cb_func,
-                                        void *cb_data)
-{
-        return obd->obd_fsops->fs_add_journal_cb(obd, last_rcvd,
-                                                 handle, cb_func, cb_data);
-}
-
-/* very similar to obd_statfs(), but caller already holds obd_osfs_lock */
-static inline int fsfilt_statfs(struct obd_device *obd, struct super_block *sb,
-                                __u64 max_age)
-{
-        int rc = 0;
-
-        CDEBUG(D_SUPER, "osfs "LPU64", max_age "LPU64"\n",
-                obd->obd_osfs_age, max_age);
-        if (cfs_time_before_64(obd->obd_osfs_age, max_age)) {
-                rc = obd->obd_fsops->fs_statfs(sb, &obd->obd_osfs);
-                if (rc == 0) /* N.B. statfs can't really fail */
-                        obd->obd_osfs_age = cfs_time_current_64();
-        } else {
-                CDEBUG(D_SUPER, "using cached obd_statfs data\n");
-        }
-
-        return rc;
-}
-
-static inline int fsfilt_sync(struct obd_device *obd, struct super_block *sb)
-{
-        return obd->obd_fsops->fs_sync(sb);
-}
-
-static inline int fsfilt_quotacheck(struct obd_device *obd,
-                                    struct super_block *sb,
-                                    struct obd_quotactl *oqctl)
-{
-        if (obd->obd_fsops->fs_quotacheck)
-                return obd->obd_fsops->fs_quotacheck(sb, oqctl);
-        return -ENOTSUPP;
-}
-
-static inline int fsfilt_quotactl(struct obd_device *obd,
-                                  struct super_block *sb,
-                                  struct obd_quotactl *oqctl)
-{
-        if (obd->obd_fsops->fs_quotactl)
-                return obd->obd_fsops->fs_quotactl(sb, oqctl);
-        return -ENOTSUPP;
-}
-
-static inline int fsfilt_quotainfo(struct obd_device *obd,
-                                   struct lustre_quota_info *lqi,
-                                   int type, int cmd)
-{
-        if (obd->obd_fsops->fs_quotainfo)
-                return obd->obd_fsops->fs_quotainfo(lqi, type, cmd);
-        return -ENOTSUPP;
-}
-
-static inline int fsfilt_qids(struct obd_device *obd, struct file *file,
-                              struct inode *inode, int type,
-                              struct list_head *list)
-{
-        if (obd->obd_fsops->fs_qids)
-                return obd->obd_fsops->fs_qids(file, inode, type, list);
-        return -ENOTSUPP;
-}
-
-static inline int fsfilt_dquot(struct obd_device *obd,
-                               struct lustre_dquot *dquot, int cmd)
-{
-        if (obd->obd_fsops->fs_dquot)
-                return obd->obd_fsops->fs_dquot(dquot, cmd);
-        return -ENOTSUPP;
-}
-
-static inline int fsfilt_map_inode_pages(struct obd_device *obd,
-                                         struct inode *inode,
-                                         struct page **page, int pages,
-                                         unsigned long *blocks, int *created,
-                                         int create, struct semaphore *sem)
-{
-        return obd->obd_fsops->fs_map_inode_pages(inode, page, pages, blocks,
-                                                  created, create, sem);
-}
-
-static inline int fsfilt_read_record(struct obd_device *obd, struct file *file,
-                                     void *buf, loff_t size, loff_t *offs)
-{
-        return obd->obd_fsops->fs_read_record(file, buf, size, offs);
-}
-
-static inline int fsfilt_write_record(struct obd_device *obd, struct file *file,
-                                      void *buf, loff_t size, loff_t *offs,
-                                      int force_sync)
-{
-        return obd->obd_fsops->fs_write_record(file, buf, size,offs,force_sync);
-}
-
-static inline int fsfilt_setup(struct obd_device *obd, struct super_block *fs)
-{
-        if (obd->obd_fsops->fs_setup)
-                return obd->obd_fsops->fs_setup(fs);
-        return 0;
-}
-
-static inline __u64 fsfilt_set_version(struct obd_device *obd,
-                                      struct inode *inode, __u64 new_version)
-{
-        if (obd->obd_fsops->fs_set_version)
-                return obd->obd_fsops->fs_set_version(inode, new_version);
-        return -EOPNOTSUPP;
-}
-
-static inline __u64 fsfilt_get_version(struct obd_device *obd,
-                                       struct inode *inode)
-{
-        if (obd->obd_fsops->fs_set_version)
-                return obd->obd_fsops->fs_get_version(inode);
-        return -EOPNOTSUPP;
-}
-
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/lustre/include/linux/lustre_handles.h b/lustre/include/linux/lustre_handles.h
deleted file mode 100644
index 166beb3d378fbd6d3a47ddfe12e08bb7f0a2df5a..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_handles.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __LINUX_LUSTRE_HANDLES_H_
-#define __LINUX_LUSTRE_HANDLES_H_
-
-#ifndef __LUSTRE_HANDLES_H_
-#error Do not #include this file directly. #include <lustre_handles.h> instead
-#endif
-
-#ifdef __KERNEL__
-#include <asm/types.h>
-#include <asm/atomic.h>
-#include <linux/list.h>
-#include <linux/random.h>
-#include <linux/version.h>
-#include <linux/spinlock.h>
-#include <linux/types.h>
-
-# ifdef HAVE_RCU
-#  include <linux/rcupdate.h> /* for rcu_head{} */
-# else
-struct rcu_head { };
-# endif
-
-#endif /* ifdef __KERNEL__ */
-
-#endif
diff --git a/lustre/include/linux/lustre_intent.h b/lustre/include/linux/lustre_intent.h
deleted file mode 100644
index 380853aa1d948a31e481bf6777f3f46f471aee75..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_intent.h
+++ /dev/null
@@ -1,35 +0,0 @@
-#ifndef LUSTRE_INTENT_H
-#define LUSTRE_INTENT_H
-
-#include <linux/lustre_version.h>
-
-#ifndef HAVE_VFS_INTENT_PATCHES
-#define IT_OPEN     (1)
-#define IT_CREAT    (1<<1)
-#define IT_READDIR  (1<<2)
-#define IT_GETATTR  (1<<3)
-#define IT_LOOKUP   (1<<4)
-#define IT_UNLINK   (1<<5)
-#define IT_TRUNC    (1<<6)
-#define IT_GETXATTR (1<<7)
-
-struct lustre_intent_data {
-        int       it_disposition;
-        int       it_status;
-        __u64     it_lock_handle;
-        void     *it_data;
-        int       it_lock_mode;
-};
-
-struct lookup_intent {
-        int     it_op;
-        int     it_flags;
-	int     it_create_mode;
-        union {
-                struct lustre_intent_data lustre;
-        } d;
-};
-
-
-#endif
-#endif
diff --git a/lustre/include/linux/lustre_lib.h b/lustre/include/linux/lustre_lib.h
deleted file mode 100644
index a2fd8baf3d931eaf61c38a82d76c0bb078caf65b..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_lib.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Basic Lustre library routines.
- *
- */
-
-#ifndef _LINUX_LUSTRE_LIB_H
-#define _LINUX_LUSTRE_LIB_H
-
-#ifndef _LUSTRE_LIB_H
-#error Do not #include this file directly. #include <lustre_lib.h> instead
-#endif
-
-#ifndef __KERNEL__
-# include <string.h>
-# include <sys/types.h>
-#else
-# include <asm/semaphore.h>
-# include <linux/rwsem.h>
-# include <linux/sched.h>
-# include <linux/signal.h>
-# include <linux/types.h>
-#endif
-#include <linux/lustre_compat25.h>
-
-#ifndef LP_POISON
-#if BITS_PER_LONG > 32
-# define LI_POISON ((int)0x5a5a5a5a5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a5a5a5a5a)
-#else
-# define LI_POISON ((int)0x5a5a5a5a)
-# define LL_POISON ((long)0x5a5a5a5a)
-# define LP_POISON ((void *)(long)0x5a5a5a5a)
-#endif
-#endif
-
-#define OBD_IOC_DATA_TYPE               long
-
-#define LUSTRE_FATAL_SIGS (sigmask(SIGKILL) | sigmask(SIGINT) |                \
-                           sigmask(SIGTERM) | sigmask(SIGQUIT) |               \
-                           sigmask(SIGALRM))
-
-#ifdef __KERNEL__
-static inline sigset_t l_w_e_set_sigs(int sigs)
-{
-        sigset_t old;
-        unsigned long irqflags;
-
-        SIGNAL_MASK_LOCK(current, irqflags);
-        old = current->blocked;
-        siginitsetinv(&current->blocked, sigs);
-        RECALC_SIGPENDING;
-        SIGNAL_MASK_UNLOCK(current, irqflags);
-
-        return old;
-}
-#endif
-
-#ifdef __KERNEL__
-/* initialize ost_lvb according to inode */
-static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb)
-{
-        lvb->lvb_size = i_size_read(inode);
-        lvb->lvb_blocks = inode->i_blocks;
-        lvb->lvb_mtime = LTIME_S(inode->i_mtime);
-        lvb->lvb_atime = LTIME_S(inode->i_atime);
-        lvb->lvb_ctime = LTIME_S(inode->i_ctime);
-}
-#else
-/* defined in liblustre/llite_lib.h */
-#endif
-
-#endif /* _LUSTRE_LIB_H */
-
diff --git a/lustre/include/linux/lustre_lite.h b/lustre/include/linux/lustre_lite.h
deleted file mode 100644
index 7a63f2e8de4655151ab4ac6ca95840c275ee48f1..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_lite.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _LINUX_LL_H
-#define _LINUX_LL_H
-
-#ifndef _LL_H
-#error Do not #include this file directly. #include <lustre_lite.h> instead
-#endif
-
-#ifdef __KERNEL__
-
-#include <linux/version.h>
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <asm/statfs.h>
-#endif
-
-#include <linux/fs.h>
-#include <linux/dcache.h>
-#include <linux/proc_fs.h>
-
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lustre_mds.h>
-#include <lustre_ha.h>
-
-#include <linux/rbtree.h>
-#include <linux/lustre_compat25.h>
-#include <linux/pagemap.h>
-
-/* lprocfs.c */
-enum {
-         LPROC_LL_DIRTY_HITS = 0,
-         LPROC_LL_DIRTY_MISSES,
-         LPROC_LL_WB_WRITEPAGE,
-         LPROC_LL_WB_PRESSURE,
-         LPROC_LL_WB_OK,
-         LPROC_LL_WB_FAIL,
-         LPROC_LL_READ_BYTES,
-         LPROC_LL_WRITE_BYTES,
-         LPROC_LL_BRW_READ,
-         LPROC_LL_BRW_WRITE,
-         LPROC_LL_IOCTL,
-         LPROC_LL_OPEN,
-         LPROC_LL_RELEASE,
-         LPROC_LL_MAP,
-         LPROC_LL_LLSEEK,
-         LPROC_LL_FSYNC,
-         LPROC_LL_SETATTR,
-         LPROC_LL_TRUNC,
-         LPROC_LL_FLOCK,
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-         LPROC_LL_GETATTR,
-#else
-         LPROC_LL_REVALIDATE,
-#endif
-         LPROC_LL_STAFS,
-         LPROC_LL_ALLOC_INODE,
-         LPROC_LL_SETXATTR,
-         LPROC_LL_GETXATTR,
-         LPROC_LL_LISTXATTR,
-         LPROC_LL_REMOVEXATTR,
-         LPROC_LL_INODE_PERM,
-         LPROC_LL_DIRECT_READ,
-         LPROC_LL_DIRECT_WRITE,
-         LPROC_LL_LOCKLESS_READ,
-         LPROC_LL_LOCKLESS_WRITE,
-         LPROC_LL_FILE_OPCODES
-};
-
-#else
-#include <lustre/lustre_idl.h>
-#endif /* __KERNEL__ */
-
-#endif
diff --git a/lustre/include/linux/lustre_log.h b/lustre/include/linux/lustre_log.h
deleted file mode 100644
index 65e1c51a4a8b1f69c517d6af3c9129f624945091..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_log.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Generic infrastructure for managing a collection of logs.
- *
- * These logs are used for:
- *
- * - orphan recovery: OST adds record on create
- * - mtime/size consistency: the OST adds a record on first write
- * - open/unlinked objects: OST adds a record on destroy
- *
- * - mds unlink log: the MDS adds an entry upon delete
- *
- * - raid1 replication log between OST's
- * - MDS replication logs
- */
-
-#ifndef _LINUX_LUSTRE_LOG_H
-#define _LINUX_LUSTRE_LOG_H
-
-#ifndef _LUSTRE_LOG_H
-#error Do not #include this file directly. #include <lustre_log.h> instead
-#endif
-
-#define LUSTRE_LOG_SERVER
-
-#endif
diff --git a/lustre/include/linux/lustre_mds.h b/lustre/include/linux/lustre_mds.h
deleted file mode 100644
index 00e5d2c0f4941c884dc271fbf9f7e403ae86374a..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_mds.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * MDS data structures.
- * See also lustre_idl.h for wire formats of requests.
- */
-
-#ifndef _LINUX_LUSTRE_MDS_H
-#define _LINUX_LUSTRE_MDS_H
-
-#ifndef _LUSTRE_MDS_H
-#error Do not #include this file directly. #include <lustre_mds.h> instead
-#endif
-
-#ifdef __KERNEL__
-# include <linux/fs.h>
-# include <linux/dcache.h>
-# ifdef CONFIG_FS_POSIX_ACL
-#  ifdef HAVE_XATTR_ACL
-#   include <linux/xattr_acl.h>
-#  endif 
-#  ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
-#   include <linux/posix_acl_xattr.h>
-#  endif
-# endif
-# ifndef HAVE_VFS_INTENT_PATCHES
-#  include <linux/lustre_intent.h>
-# endif
-#endif
-
-struct ldlm_lock_desc;
-struct mds_obd;
-struct ptlrpc_connection;
-struct ptlrpc_client;
-struct obd_export;
-struct ptlrpc_request;
-struct obd_device;
-struct ll_file_data;
-
-/* mds/handler.c */
-#ifdef __KERNEL__
-struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
-                                     struct vfsmount **mnt, int lock_mode,
-                                     struct lustre_handle *lockh,
-                                     char *name, int namelen, __u64 lockpart);
-struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
-                              struct vfsmount **mnt);
-int mds_update_server_data(struct obd_device *, int force_sync);
-
-/* mds/mds_fs.c */
-int mds_fs_setup(struct obd_device *obddev, struct vfsmount *mnt);
-int mds_fs_cleanup(struct obd_device *obddev);
-#endif
-
-#endif
diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h
deleted file mode 100644
index 1d2f17e5c69f48a8a7dd76493ca24c0710578df9..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_net.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LINUX_LUSTRE_NET_H
-#define _LINUX_LUSTRE_NET_H
-
-#ifndef _LUSTRE_NET_H
-#error Do not #include this file directly. #include <lustre_net.h> instead
-#endif
-
-#ifdef __KERNEL__
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/tqueue.h>
-#else
-#include <linux/workqueue.h>
-#endif
-#endif
-
-/* XXX Liang: should be moved to other header instead of here */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4)
-#ifndef WITH_GROUP_INFO
-#define WITH_GROUP_INFO
-#endif
-#endif
-
-#endif
diff --git a/lustre/include/linux/lustre_patchless_compat.h b/lustre/include/linux/lustre_patchless_compat.h
deleted file mode 100644
index afb599eff7779a7b00df3cbfe32665b87e2b7907..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_patchless_compat.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef LUSTRE_PATCHLESS_COMPAT_H
-#define LUSTRE_PATCHLESS_COMPAT_H
-
-#include <linux/lustre_version.h>
-#include <linux/fs.h>
-
-#ifndef HAVE_TRUNCATE_COMPLETE_PAGE
-#include <linux/list.h>
-#include <linux/mm.h>
-#include <linux/hash.h>
-
-/* XXX copy & paste from 2.6.15 kernel */
-static inline void ll_remove_from_page_cache(struct page *page)
-{
-        struct address_space *mapping = page->mapping;
-
-        BUG_ON(!PageLocked(page));
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
-        write_lock_irq(&mapping->tree_lock);
-#else
-	spin_lock_irq(&mapping->tree_lock);
-#endif
-        radix_tree_delete(&mapping->page_tree, page->index);
-        page->mapping = NULL;
-        mapping->nrpages--;
-#ifdef HAVE_NR_PAGECACHE
-	atomic_add(-1, &nr_pagecache); // XXX pagecache_acct(-1);
-#else
-	__dec_zone_page_state(page, NR_FILE_PAGES);
-#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15))
-        write_unlock_irq(&mapping->tree_lock);
-#else
-	spin_unlock_irq(&mapping->tree_lock);
-#endif
-}
-
-static inline void
-truncate_complete_page(struct address_space *mapping, struct page *page)
-{
-        if (page->mapping != mapping)
-                return;
-
-        if (PagePrivate(page))
-                page->mapping->a_ops->invalidatepage(page, 0);
-
-#ifdef HAVE_CANCEL_DIRTY_PAGE
-        cancel_dirty_page(page, PAGE_SIZE);
-#else
-        clear_page_dirty(page);
-#endif
-        ClearPageUptodate(page);
-        ClearPageMappedToDisk(page);
-        ll_remove_from_page_cache(page);
-        page_cache_release(page);       /* pagecache ref */
-}
-#endif /* HAVE_TRUNCATE_COMPLETE_PAGE */
-
-#if !defined(HAVE_D_REHASH_COND) && !defined(HAVE___D_REHASH)
-/* megahack */
-static inline void d_rehash_cond(struct dentry * entry, int lock)
-{
-	if (!lock)
-		spin_unlock(&dcache_lock);
-
-	d_rehash(entry);
-
-	if (!lock)
-		spin_lock(&dcache_lock);
-}
-
-#define __d_rehash(dentry, lock) d_rehash_cond(dentry, lock)
-#endif /* !HAVE_D_REHASH_COND && !HAVE___D_REHASH*/
-
-#ifdef ATTR_OPEN
-# define ATTR_FROM_OPEN ATTR_OPEN
-#else
-# ifndef ATTR_FROM_OPEN
-#  define ATTR_FROM_OPEN 0
-# endif
-#endif /* ATTR_OPEN */
-
-#ifndef ATTR_RAW
-#define ATTR_RAW 0
-#endif
-
-#ifndef ATTR_CTIME_SET
-/*
- * set ATTR_CTIME_SET to a high value to avoid any risk of collision with other
- * ATTR_* attributes (see bug 13828)
- */
-#define ATTR_CTIME_SET (1 << 28)
-#endif
-
-#endif /* LUSTRE_PATCHLESS_COMPAT_H */
diff --git a/lustre/include/linux/lustre_quota.h b/lustre/include/linux/lustre_quota.h
deleted file mode 100644
index 248bd5d26da84abb5794e2faff4aafa439995b65..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_quota.h
+++ /dev/null
@@ -1,18 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef _LINUX_LUSTRE_QUOTA_H
-#define _LINUX_LUSTRE_QUOTA_H
-
-#ifndef _LUSTRE_QUOTA_H
-#error Do not #include this file directly. #include <lustre_quota.h> instead
-#endif
-
-#ifdef __KERNEL__
-#include <linux/version.h>
-#include <linux/fs.h>
-#include <linux/quota.h>
-#include <linux/quotaops.h>
-#endif
-
-#endif /* _LUSTRE_QUOTA_H */
diff --git a/lustre/include/linux/lustre_types.h b/lustre/include/linux/lustre_types.h
deleted file mode 100644
index 3aec53f66e7b426c7fea9590956735426cb49bf0..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_types.h
+++ /dev/null
@@ -1,48 +0,0 @@
-#ifndef _LUSTRE_LINUX_TYPES_H
-#define _LUSTRE_LINUX_TYPES_H
-
-#ifdef HAVE_ASM_TYPES_H
-#include <asm/types.h>
-#endif
-
-#ifdef __KERNEL__
-# include <linux/types.h>
-# include <linux/fs.h>    /* to check for FMODE_EXEC, dev_t, lest we redefine */
-#else
-#ifdef __CYGWIN__
-# include <sys/types.h>
-#elif defined(_AIX)
-# include <inttypes.h>
-#else
-# include <stdint.h>
-#endif
-#endif
-
-#if !defined(_LINUX_TYPES_H) && !defined(_BLKID_TYPES_H) && \
-        !defined(_EXT2_TYPES_H) && !defined(_I386_TYPES_H) && \
-        !defined(_ASM_IA64_TYPES_H) && !defined(_X86_64_TYPES_H) && \
-        !defined(_PPC_TYPES_H) && !defined(_PPC64_TYPES_H) && \
-        !defined(_ASM_POWERPC_TYPES_H) && !defined(__mips64__) && \
-	!defined(_CRAYNV_TYPES_H)
-        /* yuck, would be nicer with _ASM_TYPES_H */
-
-typedef unsigned short umode_t;
-/*
- * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the
- * header files exported to user space
- */
-
-typedef __signed__ char __s8;
-typedef unsigned char __u8;
-
-typedef __signed__ short __s16;
-typedef unsigned short __u16;
-
-typedef __signed__ int __s32;
-typedef unsigned int __u32;
-
-typedef __signed__ long long __s64;
-typedef unsigned long long __u64;
-#endif
-
-#endif
diff --git a/lustre/include/linux/lustre_user.h b/lustre/include/linux/lustre_user.h
deleted file mode 100644
index 1b7fb8aee210c04eb9b3f322aeac2e2560ad335c..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lustre_user.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * Lustre public user-space interface definitions.
- */
-
-#ifndef _LINUX_LUSTRE_USER_H
-#define _LINUX_LUSTRE_USER_H
-
-#ifdef HAVE_ASM_TYPES_H
-#include <asm/types.h>
-#else
-#include <lustre/types.h>
-#endif
-
-
-#ifndef __KERNEL__
-# define NEED_QUOTA_DEFS
-# ifdef HAVE_QUOTA_SUPPORT
-#  include <sys/quota.h>
-# endif
-#else
-# include <linux/version.h>
-# if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,21)
-#  define NEED_QUOTA_DEFS
-# endif
-# ifdef HAVE_QUOTA_SUPPORT
-#  include <linux/quota.h>
-# endif
-#endif
-
-/*
- * asm-x86_64/processor.h on some SLES 9 distros seems to use
- * kernel-only typedefs.  fortunately skipping it altogether is ok
- * (for now).
- */
-#define __ASM_X86_64_PROCESSOR_H
-
-#ifdef __KERNEL__
-#include <linux/string.h>
-#else
-#include <string.h>
-#include <sys/stat.h>
-#endif
-
-#if defined(__x86_64__) || defined(__ia64__) || defined(__ppc64__) || \
-    defined(__craynv) || defined (__mips64__)
-typedef struct stat     lstat_t;
-#define lstat_f         lstat
-#define HAVE_LOV_USER_MDS_DATA
-#elif defined(__USE_LARGEFILE64) || defined(__KERNEL__)
-typedef struct stat64   lstat_t;
-#define lstat_f         lstat64
-#define HAVE_LOV_USER_MDS_DATA
-#endif
-
-#endif /* _LUSTRE_USER_H */
diff --git a/lustre/include/linux/lvfs.h b/lustre/include/linux/lvfs.h
deleted file mode 100644
index 04829c5a33b4116d31f0dc95d68db857fcf38b5a..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lvfs.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * lustre VFS/process permission interface
- */
-
-#ifndef __LINUX_LVFS_H__
-#define __LINUX_LVFS_H__
-
-#ifndef __LVFS_H__
-#error Do not #include this file directly. #include <lvfs.h> instead
-#endif
-
-#if defined __KERNEL__
-#include <linux/lustre_compat25.h>
-#include <linux/lvfs_linux.h>
-#else
-struct group_info { /* unused */ };
-#endif
-
-#define LLOG_LVFS
-
-/* lvfs.c */
-int obd_alloc_fail(const void *ptr, const char *name, const char *type,
-                   size_t size, const char *file, int line);
-
-/* simple.c */
-
-struct lvfs_ucred {
-        struct upcall_cache_entry *luc_uce;
-        __u32 luc_fsuid;
-        __u32 luc_fsgid;
-        __u32 luc_cap;
-        __u32 luc_suppgid1;
-        __u32 luc_suppgid2;
-        __u32 luc_umask;
-};
-
-struct lvfs_callback_ops {
-        struct dentry *(*l_fid2dentry)(__u64 id_ino, __u32 gen, __u64 gr, void *data);
-};
-
-#define OBD_RUN_CTXT_MAGIC      0xC0FFEEAA
-#define OBD_CTXT_DEBUG          /* development-only debugging */
-struct lvfs_run_ctxt {
-        struct vfsmount         *pwdmnt;
-        struct dentry           *pwd;
-        mm_segment_t             fs;
-        struct lvfs_ucred        luc;
-        int                      ngroups;
-        struct lvfs_callback_ops cb_ops;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4)
-        struct group_info       *group_info;
-#else
-        struct group_info        group_info;
-#endif
-#ifdef OBD_CTXT_DEBUG
-        __u32                    magic;
-#endif
-};
-
-#ifdef OBD_CTXT_DEBUG
-#define OBD_SET_CTXT_MAGIC(ctxt) (ctxt)->magic = OBD_RUN_CTXT_MAGIC
-#else
-#define OBD_SET_CTXT_MAGIC(ctxt) do {} while(0)
-#endif
-
-#ifdef __KERNEL__
-
-struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode, int fix);
-struct dentry *simple_mknod(struct dentry *dir, char *name, int mode, int fix);
-int lustre_rename(struct dentry *dir, char *oldname, char *newname);
-int lustre_fread(struct file *file, void *buf, int len, loff_t *off);
-int lustre_fwrite(struct file *file, const void *buf, int len, loff_t *off);
-int lustre_fsync(struct file *file);
-long l_readdir(struct file * file, struct list_head *dentry_list);
-
-static inline void l_dput(struct dentry *de)
-{
-        if (!de || IS_ERR(de))
-                return;
-        //shrink_dcache_parent(de);
-        LASSERT(atomic_read(&de->d_count) > 0);
-        dput(de);
-}
-
-/* We need to hold the inode semaphore over the dcache lookup itself, or we
- * run the risk of entering the filesystem lookup path concurrently on SMP
- * systems, and instantiating two inodes for the same entry.  We still
- * protect against concurrent addition/removal races with the DLM locking.
- */
-static inline struct dentry *ll_lookup_one_len(const char *fid_name,
-                                               struct dentry *dparent,
-                                               int fid_namelen)
-{
-        struct dentry *dchild;
-
-        LOCK_INODE_MUTEX(dparent->d_inode);
-        dchild = lookup_one_len(fid_name, dparent, fid_namelen);
-        UNLOCK_INODE_MUTEX(dparent->d_inode);
-
-        if (IS_ERR(dchild) || dchild->d_inode == NULL)
-                return dchild;
-
-        if (is_bad_inode(dchild->d_inode)) {
-                CERROR("bad inode returned %lu/%u\n",
-                       dchild->d_inode->i_ino, dchild->d_inode->i_generation);
-                dput(dchild);
-                dchild = ERR_PTR(-ENOENT);
-        }
-        return dchild;
-}
-
-static inline void ll_sleep(int t)
-{
-        set_current_state(TASK_INTERRUPTIBLE);
-        schedule_timeout(t * HZ);
-        set_current_state(TASK_RUNNING);
-}
-#endif
-
-#endif
diff --git a/lustre/include/linux/lvfs_linux.h b/lustre/include/linux/lvfs_linux.h
deleted file mode 100644
index c7b0f7d679bcbfc5a0a4c141e67c63aad27137ba..0000000000000000000000000000000000000000
--- a/lustre/include/linux/lvfs_linux.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef __LVFS_LINUX_H__
-#define __LVFS_LINUX_H__
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/fs.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <linux/namei.h>
-#endif
-#include <linux/sched.h>
-
-#include <lvfs.h>
-
-#define l_file file
-#define l_dentry dentry
-#define l_inode inode
-
-#define l_filp_open filp_open
-
-struct lvfs_run_ctxt;
-struct l_file *l_dentry_open(struct lvfs_run_ctxt *, struct l_dentry *,
-                             int flags);
-
-struct l_linux_dirent {
-        struct list_head lld_list;
-        ino_t           lld_ino;
-        unsigned long   lld_off;
-        char            lld_name[LL_FID_NAMELEN];
-};
-struct l_readdir_callback {
-        struct l_linux_dirent *lrc_dirent;
-        struct list_head      *lrc_list;
-};
-
-#define LVFS_DENTRY_PARAM_MAGIC         20070216UL
-struct lvfs_dentry_params
-{
-        unsigned long    ldp_inum;
-        void            *ldp_ptr;
-        __u32            ldp_magic;
-};
-#define LVFS_DENTRY_PARAMS_INIT         { .ldp_magic = LVFS_DENTRY_PARAM_MAGIC }
-
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  define BDEVNAME_DECLARE_STORAGE(foo) char foo[BDEVNAME_SIZE]
-#  define ll_bdevname(SB, STORAGE) __bdevname(kdev_t_to_nr(SB->s_dev), STORAGE)
-#  define lvfs_sbdev(SB)       ((SB)->s_bdev)
-#  define lvfs_sbdev_type      struct block_device *
-   int fsync_bdev(struct block_device *);
-#  define lvfs_sbdev_sync      fsync_bdev
-# else
-#  define BDEVNAME_DECLARE_STORAGE(foo) char __unused_##foo
-#  define ll_bdevname(SB,STORAGE) ((void)__unused_##STORAGE,bdevname(lvfs_sbdev(SB)))
-#  define lvfs_sbdev(SB)       (kdev_t_to_nr((SB)->s_dev))
-#  define lvfs_sbdev_type      kdev_t
-#  define lvfs_sbdev_sync      fsync_dev
-# endif
-
-/* Instead of calling within lvfs (a layering violation) */
-#define lvfs_set_rdonly(obd, sb) \
-        __lvfs_set_rdonly(lvfs_sbdev(sb), fsfilt_journal_sbdev(obd, sb))
-
-void __lvfs_set_rdonly(lvfs_sbdev_type dev, lvfs_sbdev_type jdev);
-int lvfs_check_rdonly(lvfs_sbdev_type dev);
-
-#endif /*  __LVFS_LINUX_H__ */
diff --git a/lustre/include/linux/obd.h b/lustre/include/linux/obd.h
deleted file mode 100644
index 747bff2511f6edec0031bf65fd7216322bf5a1b8..0000000000000000000000000000000000000000
--- a/lustre/include/linux/obd.h
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __LINUX_OBD_H
-#define __LINUX_OBD_H
-
-#ifndef __OBD_H
-#error Do not #include this file directly. #include <obd.h> instead
-#endif
-
-#ifdef __KERNEL__
-# include <linux/fs.h>
-# include <linux/list.h>
-# include <linux/sched.h> /* for struct task_struct, for current.h */
-# include <asm/current.h> /* for smp_lock.h */
-# include <linux/smp_lock.h>
-# include <linux/proc_fs.h>
-# include <linux/mount.h>
-#endif
-
-typedef spinlock_t client_obd_lock_t;
-
-static inline void client_obd_list_lock_init(client_obd_lock_t *lock)
-{
-        spin_lock_init(lock);
-}
-
-static inline void client_obd_list_lock_done(client_obd_lock_t *lock)
-{}
-
-static inline void client_obd_list_lock(client_obd_lock_t *lock)
-{
-        spin_lock(lock);
-}
-
-static inline void client_obd_list_unlock(client_obd_lock_t *lock)
-{
-        spin_unlock(lock);
-}
-
-#if defined(__KERNEL__) && !defined(HAVE_ADLER)
-/* zlib_adler() is an inline function defined in zutil.h */
-#define HAVE_ADLER
-#endif
-#endif /* __LINUX_OBD_H */
diff --git a/lustre/include/linux/obd_class.h b/lustre/include/linux/obd_class.h
deleted file mode 100644
index 75a77cd333d271e23c2c68ecd229a526c456dfde..0000000000000000000000000000000000000000
--- a/lustre/include/linux/obd_class.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef __LINUX_CLASS_OBD_H
-#define __LINUX_CLASS_OBD_H
-
-#ifndef __CLASS_OBD_H
-#error Do not #include this file directly. #include <obd_class.h> instead
-#endif
-
-#ifndef __KERNEL__
-#include <sys/types.h>
-#include <libcfs/list.h>
-#else
-#include <asm/uaccess.h>
-#include <linux/types.h>
-#include <linux/fs.h>
-#include <linux/time.h>
-#include <linux/timer.h>
-#endif
-
-void obd_zombie_impexp_init(void);
-void obd_zombie_impexp_cull(void);
-extern void (*obd_zombie_impexp_notify)(void);
-
-/* obdo.c */
-#ifdef __KERNEL__
-void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned ia_valid);
-void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid);
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-#endif
-
-#if !defined(__KERNEL__) || (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#define to_kdev_t(dev) dev
-#define kdev_t_to_nr(dev) dev
-#endif
-
-#endif /* __LINUX_OBD_CLASS_H */
diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h
deleted file mode 100644
index a2201d382a61d6889860406f454d62a293fff9ba..0000000000000000000000000000000000000000
--- a/lustre/include/linux/obd_support.h
+++ /dev/null
@@ -1,182 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LINUX_OBD_SUPPORT
-#define _LINUX_OBD_SUPPORT
-
-#ifndef _OBD_SUPPORT
-#error Do not #include this file directly. #include <obd_support.h> instead
-#endif
-
-#ifdef __KERNEL__
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/autoconf.h>
-#include <linux/slab.h>
-#include <linux/highmem.h>
-#endif
-#include <libcfs/kp30.h>
-#include <linux/lustre_compat25.h>
-#include <lustre/lustre_idl.h>
-
-/* Prefer the kernel's version, if it exports it, because it might be
- * optimized for this CPU. */
-#if defined(__KERNEL__) && (defined(CONFIG_CRC32) || defined(CONFIG_CRC32_MODULE))
-# include <linux/crc32.h>
-#else
-/* crc32_le lifted from the Linux kernel, which had the following to say:
- *
- * This code is in the public domain; copyright abandoned.
- * Liability for non-performance of this code is limited to the amount
- * you paid for it.  Since it is distributed for free, your refund will
- * be very very small.  If it breaks, you get to keep both pieces.
- */
-#define CRCPOLY_LE 0xedb88320
-/**
- * crc32_le() - Calculate bitwise little-endian Ethernet AUTODIN II CRC32
- * @crc - seed value for computation.  ~0 for Ethernet, sometimes 0 for
- *        other uses, or the previous crc32 value if computing incrementally.
- * @p   - pointer to buffer over which CRC is run
- * @len - length of buffer @p
- */
-static inline __u32 crc32_le(__u32 crc, unsigned char const *p, size_t len)
-{
-        int i;
-        while (len--) {
-                crc ^= *p++;
-                for (i = 0; i < 8; i++)
-                        crc = (crc >> 1) ^ ((crc & 1) ? CRCPOLY_LE : 0);
-        }
-        return crc;
-}
-#endif
-
-#ifdef __KERNEL__
-# include <linux/zutil.h>
-# ifndef HAVE_ADLER
-#  define HAVE_ADLER
-# endif
-#else /* ! __KERNEL__ */
-# ifdef HAVE_ADLER
-#  include <zlib.h>
-
-static inline __u32 zlib_adler32(__u32 adler, unsigned char const *p,
-                                 size_t len)
-{
-        return adler32(adler, p, len);
-}
-# endif
-#endif /* __KERNEL__ */
-
-static inline __u32 init_checksum(cksum_type_t cksum_type)
-{
-        switch(cksum_type) {
-        case OBD_CKSUM_CRC32:
-                return ~0U;
-#ifdef HAVE_ADLER
-        case OBD_CKSUM_ADLER:
-                return 1U;
-#endif
-        default:
-                CERROR("Unknown checksum type (%x)!!!\n", cksum_type);
-                LBUG();
-        }
-        return 0;
-}
-
-static inline __u32 compute_checksum(__u32 cksum, unsigned char const *p,
-                                     size_t len, cksum_type_t cksum_type)
-{
-        switch(cksum_type) {
-        case OBD_CKSUM_CRC32:
-                return crc32_le(cksum, p, len);
-#ifdef HAVE_ADLER
-        case OBD_CKSUM_ADLER:
-                return zlib_adler32(cksum, p, len);
-#endif
-        default:
-                CERROR("Unknown checksum type (%x)!!!\n", cksum_type);
-                LBUG();
-        }
-        return 0;
-}
-
-static inline obd_flag cksum_type_pack(cksum_type_t cksum_type)
-{
-        switch(cksum_type) {
-        case OBD_CKSUM_CRC32:
-                return OBD_FL_CKSUM_CRC32;
-#ifdef HAVE_ADLER
-        case OBD_CKSUM_ADLER:
-                return OBD_FL_CKSUM_ADLER;
-#endif
-        default:
-                CWARN("unknown cksum type %x\n", cksum_type);
-        }
-        return OBD_FL_CKSUM_CRC32;
-}
-
-static inline cksum_type_t cksum_type_unpack(obd_flag o_flags)
-{
-        o_flags &= OBD_FL_CKSUM_ALL;
-        if ((o_flags - 1) & o_flags)
-                CWARN("several checksum types are set: %x\n", o_flags);
-        if (o_flags & OBD_FL_CKSUM_ADLER)
-#ifdef HAVE_ADLER
-                return OBD_CKSUM_ADLER;
-#else
-                CWARN("checksum type is set to adler32, but adler32 is not "
-                      "supported (%x)\n", o_flags);
-#endif
-        return OBD_CKSUM_CRC32;
-}
-
-#ifdef __KERNEL__
-# include <linux/types.h>
-# include <linux/blkdev.h>
-# include <lvfs.h>
-
-#define OBD_FAIL_WRITE(obd, id, sb)                                          \
-{                                                                            \
-        if (OBD_FAIL_CHECK(id)) {                                            \
-                BDEVNAME_DECLARE_STORAGE(tmp);                               \
-                CERROR("obd_fail_loc=%x, fail write operation on %s\n",      \
-                       id, ll_bdevname(sb, tmp));                            \
-                lvfs_set_rdonly(obd, sb);                                    \
-                /* We set FAIL_ONCE because we never "un-fail" a device */   \
-                obd_fail_loc |= OBD_FAILED | OBD_FAIL_ONCE;                  \
-        }                                                                    \
-}
-
-#define OBD_SLEEP_ON(wq, state)  wait_event_interruptible(wq, state)
-
-
-#else /* !__KERNEL__ */
-# define LTIME_S(time) (time)
-/* for obd_class.h */
-# ifndef ERR_PTR
-#  define ERR_PTR(a) ((void *)(a))
-# endif
-#endif  /* __KERNEL__ */
-
-#endif
diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h
deleted file mode 100644
index cceec77bf20d299e745f131c5ad9e2ef7c7b0c19..0000000000000000000000000000000000000000
--- a/lustre/include/lprocfs_status.h
+++ /dev/null
@@ -1,716 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *   Top level header file for LProc SNMP
- *   Author: Hariharan Thantry thantry@users.sourceforge.net
- */
-#ifndef _LPROCFS_SNMP_H
-#define _LPROCFS_SNMP_H
-
-#include <lustre/lustre_idl.h>
-#if defined(__linux__)
-#include <linux/lprocfs_status.h>
-#elif defined(__APPLE__)
-#include <darwin/lprocfs_status.h>
-#elif defined(__WINNT__)
-#include <winnt/lprocfs_status.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#undef LPROCFS
-#if (defined(__KERNEL__) && defined(CONFIG_PROC_FS))
-# define LPROCFS
-#endif
-
-struct lprocfs_vars {
-        const char   *name;
-        cfs_read_proc_t *read_fptr;
-        cfs_write_proc_t *write_fptr;
-        void *data;
-        struct file_operations *fops;
-};
-
-struct lprocfs_static_vars {
-        struct lprocfs_vars *module_vars;
-        struct lprocfs_vars *obd_vars;
-};
-
-/* if we find more consumers this could be generalized */
-#define OBD_HIST_MAX 32
-struct obd_histogram {
-        spinlock_t      oh_lock;
-        unsigned long   oh_buckets[OBD_HIST_MAX];
-};
-
-enum {
-        BRW_R_PAGES = 0,
-        BRW_W_PAGES,
-        BRW_R_RPC_HIST,
-        BRW_W_RPC_HIST,
-        BRW_R_IO_TIME,
-        BRW_W_IO_TIME,
-        BRW_R_DISCONT_PAGES,
-        BRW_W_DISCONT_PAGES,
-        BRW_R_DISCONT_BLOCKS,
-        BRW_W_DISCONT_BLOCKS,
-        BRW_R_DISK_IOSIZE,
-        BRW_W_DISK_IOSIZE,
-        BRW_R_DIO_FRAGS,
-        BRW_W_DIO_FRAGS,
-        BRW_LAST,
-};
-
-struct brw_stats {
-        struct obd_histogram hist[BRW_LAST];
-};
-
-
-/* An lprocfs counter can be configured using the enum bit masks below.
- *
- * LPROCFS_CNTR_EXTERNALLOCK indicates that an external lock already
- * protects this counter from concurrent updates. If not specified,
- * lprocfs an internal per-counter lock variable. External locks are
- * not used to protect counter increments, but are used to protect
- * counter readout and resets.
- *
- * LPROCFS_CNTR_AVGMINMAX indicates a multi-valued counter samples,
- * (i.e. counter can be incremented by more than "1"). When specified,
- * the counter maintains min, max and sum in addition to a simple
- * invocation count. This allows averages to be be computed.
- * If not specified, the counter is an increment-by-1 counter.
- * min, max, sum, etc. are not maintained.
- *
- * LPROCFS_CNTR_STDDEV indicates that the counter should track sum of
- * squares (for multi-valued counter samples only). This allows
- * external computation of standard deviation, but involves a 64-bit
- * multiply per counter increment.
- */
-
-enum {
-        LPROCFS_CNTR_EXTERNALLOCK = 0x0001,
-        LPROCFS_CNTR_AVGMINMAX    = 0x0002,
-        LPROCFS_CNTR_STDDEV       = 0x0004,
-
-        /* counter data type */
-        LPROCFS_TYPE_REGS         = 0x0100,
-        LPROCFS_TYPE_BYTES        = 0x0200,
-        LPROCFS_TYPE_PAGES        = 0x0400,
-        LPROCFS_TYPE_CYCLE        = 0x0800,
-};
-
-struct lprocfs_atomic {
-        atomic_t               la_entry;
-        atomic_t               la_exit;
-};
-
-#define LC_MIN_INIT ((~(__u64)0) >> 1)
-
-struct lprocfs_counter {
-        struct lprocfs_atomic  lc_cntl;  /* may need to move to per set */
-        unsigned int           lc_config;
-        __s64                  lc_count;
-        __s64                  lc_sum;
-        __s64                  lc_min;
-        __s64                  lc_max;
-        __s64                  lc_sumsquare;
-        const char            *lc_name;   /* must be static */
-        const char            *lc_units;  /* must be static */
-};
-
-struct lprocfs_percpu {
-        struct lprocfs_counter lp_cntr[0];
-};
-
-#define LPROCFS_GET_NUM_CPU 0x0001
-#define LPROCFS_GET_SMP_ID  0x0002
-
-enum lprocfs_stats_flags {
-        LPROCFS_STATS_FLAG_PERCPU   = 0x0000, /* per cpu counter */
-        LPROCFS_STATS_FLAG_NOPERCPU = 0x0001, /* stats have no percpu
-                                               * area and need locking */
-};
-
-enum lprocfs_fields_flags {
-        LPROCFS_FIELDS_FLAGS_CONFIG = 0x0001,
-        LPROCFS_FIELDS_FLAGS_SUM    = 0x0002,
-        LPROCFS_FIELDS_FLAGS_MIN    = 0x0003,
-        LPROCFS_FIELDS_FLAGS_MAX    = 0x0004,
-        LPROCFS_FIELDS_FLAGS_AVG    = 0x0005,
-        LPROCFS_FIELDS_FLAGS_SUMSQUARE = 0x0006,
-        LPROCFS_FIELDS_FLAGS_COUNT  = 0x0007,
-};
-
-struct lprocfs_stats {
-        unsigned int           ls_num;     /* # of counters */
-        unsigned int           ls_percpu_size;
-        int                    ls_flags; /* See LPROCFS_STATS_FLAG_* */
-        spinlock_t             ls_lock;  /* Lock used only when there are
-                                          * no percpu stats areas */
-        struct lprocfs_percpu *ls_percpu[0];
-};
-
-static inline int opcode_offset(__u32 opc) {
-        if (opc < OST_LAST_OPC) {
-                 /* OST opcode */
-                return (opc - OST_FIRST_OPC);
-        } else if (opc < MDS_LAST_OPC) {
-                /* MDS opcode */
-                return (opc - MDS_FIRST_OPC +
-                        (OST_LAST_OPC - OST_FIRST_OPC));
-        } else if (opc < LDLM_LAST_OPC) {
-                /* LDLM Opcode */
-                return (opc - LDLM_FIRST_OPC +
-                        (MDS_LAST_OPC - MDS_FIRST_OPC) +
-                        (OST_LAST_OPC - OST_FIRST_OPC));
-        } else if (opc < MGS_LAST_OPC) {
-                /* MGS Opcode */
-                return (opc - MGS_FIRST_OPC +
-                        (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
-                        (MDS_LAST_OPC - MDS_FIRST_OPC) +
-                        (OST_LAST_OPC - OST_FIRST_OPC));
-        } else if (opc < OBD_LAST_OPC) {
-                /* OBD Ping */
-                return (opc - OBD_FIRST_OPC +
-                        (MGS_LAST_OPC - MGS_FIRST_OPC) +
-                        (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
-                        (MDS_LAST_OPC - MDS_FIRST_OPC) +
-                        (OST_LAST_OPC - OST_FIRST_OPC));
-        } else if (opc < LLOG_LAST_OPC) {
-                /* LLOG Opcode */
-                return (opc - LLOG_FIRST_OPC +
-                        (OBD_LAST_OPC - OBD_FIRST_OPC) +
-                        (MGS_LAST_OPC - MGS_FIRST_OPC) +
-                        (LDLM_LAST_OPC - LDLM_FIRST_OPC) +
-                        (MDS_LAST_OPC - MDS_FIRST_OPC) +
-                        (OST_LAST_OPC - OST_FIRST_OPC));
-        } else {
-                /* Unknown Opcode */
-                return -1;
-        }
-}
-
-#define LUSTRE_MAX_OPCODES ((OST_LAST_OPC - OST_FIRST_OPC)     + \
-                            (MDS_LAST_OPC - MDS_FIRST_OPC)     + \
-                            (LDLM_LAST_OPC - LDLM_FIRST_OPC)   + \
-                            (MGS_LAST_OPC - MGS_FIRST_OPC)     + \
-                            (OBD_LAST_OPC - OBD_FIRST_OPC)     + \
-                            (LLOG_LAST_OPC - LLOG_FIRST_OPC))
-
-#define EXTRA_MAX_OPCODES ((PTLRPC_LAST_CNTR - PTLRPC_FIRST_CNTR)  + \
-                           (EXTRA_LAST_OPC - EXTRA_FIRST_OPC))
-
-enum {
-        PTLRPC_REQWAIT_CNTR = 0,
-        PTLRPC_REQQDEPTH_CNTR,
-        PTLRPC_REQACTIVE_CNTR,
-        PTLRPC_TIMEOUT,
-        PTLRPC_REQBUF_AVAIL_CNTR,
-        PTLRPC_LAST_CNTR
-};
-
-#define PTLRPC_FIRST_CNTR PTLRPC_REQWAIT_CNTR
-
-enum {
-        LDLM_GLIMPSE_ENQUEUE = 0,
-        LDLM_PLAIN_ENQUEUE,
-        LDLM_EXTENT_ENQUEUE,
-        LDLM_FLOCK_ENQUEUE,
-        LDLM_IBITS_ENQUEUE,
-        MDS_REINT_CREATE,
-        MDS_REINT_LINK,
-        MDS_REINT_OPEN,
-        MDS_REINT_SETATTR,
-        MDS_REINT_RENAME,
-        MDS_REINT_UNLINK,
-        EXTRA_LAST_OPC
-};
-
-#define EXTRA_FIRST_OPC LDLM_GLIMPSE_ENQUEUE
-/* class_obd.c */
-extern cfs_proc_dir_entry_t *proc_lustre_root;
-
-struct obd_device;
-struct file;
-struct obd_histogram;
-
-/* Days / hours / mins / seconds format */
-struct dhms {
-        int d,h,m,s;
-};
-static inline void s2dhms(struct dhms *ts, time_t secs)
-{
-        ts->d = secs / 86400;
-        secs = secs % 86400;
-        ts->h = secs / 3600;
-        secs = secs % 3600;
-        ts->m = secs / 60;
-        ts->s = secs % 60;
-}
-#define DHMS_FMT "%dd%dh%02dm%02ds"
-#define DHMS_VARS(x) (x)->d, (x)->h, (x)->m, (x)->s
-
-
-#ifdef LPROCFS
-
-static inline int lprocfs_stats_lock(struct lprocfs_stats *stats, int type)
-{
-        int rc = 0;
-
-        if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU) {
-                if (type & LPROCFS_GET_NUM_CPU)
-                        rc = 1;
-                if (type & LPROCFS_GET_SMP_ID)
-                        rc = 0;
-                spin_lock(&stats->ls_lock);
-        } else {
-                if (type & LPROCFS_GET_NUM_CPU)
-                        rc = num_possible_cpus();
-                if (type & LPROCFS_GET_SMP_ID)
-                        rc = smp_processor_id();
-        }
-        return rc;
-}
-
-static inline void lprocfs_stats_unlock(struct lprocfs_stats *stats)
-{
-        if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU)
-                spin_unlock(&stats->ls_lock);
-}
-
-/* Two optimized LPROCFS counter increment functions are provided:
- *     lprocfs_counter_incr(cntr, value) - optimized for by-one counters
- *     lprocfs_counter_add(cntr) - use for multi-valued counters
- * Counter data layout allows config flag, counter lock and the
- * count itself to reside within a single cache line.
- */
-
-extern void lprocfs_counter_add(struct lprocfs_stats *stats, int idx,
-                                long amount);
-extern void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx,
-                                long amount);
-
-#define lprocfs_counter_incr(stats, idx) \
-        lprocfs_counter_add(stats, idx, 1)
-#define lprocfs_counter_decr(stats, idx) \
-        lprocfs_counter_sub(stats, idx, 1)
-
-extern __s64 lprocfs_read_helper(struct lprocfs_counter *lc, 
-                                 enum lprocfs_fields_flags field);
-
-static inline __u64 lprocfs_stats_collector(struct lprocfs_stats *stats, 
-                                            int idx, 
-                                            enum lprocfs_fields_flags field)
-{
-        __u64 ret = 0;
-        int i;
-
-        LASSERT(stats != NULL);
-        for (i = 0; i < num_possible_cpus(); i++)
-                ret += lprocfs_read_helper(&(stats->ls_percpu[i]->lp_cntr[idx]),
-                                           field);
-        return ret;
-}
-
-extern struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num, 
-                                                 enum lprocfs_stats_flags flags);
-extern void lprocfs_clear_stats(struct lprocfs_stats *stats);
-extern void lprocfs_free_stats(struct lprocfs_stats **stats);
-extern void lprocfs_init_ops_stats(int num_private_stats, 
-                                   struct lprocfs_stats *stats);
-extern int lprocfs_alloc_obd_stats(struct obd_device *obddev,
-                                   unsigned int num_private_stats);
-extern void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
-                                 unsigned conf, const char *name,
-                                 const char *units);
-extern void lprocfs_free_obd_stats(struct obd_device *obddev);
-struct obd_export;
-extern int lprocfs_add_clear_entry(struct obd_device * obd,
-                                   cfs_proc_dir_entry_t *entry);
-extern int lprocfs_exp_setup(struct obd_export *exp,
-                             lnet_nid_t peer_nid, int *newnid);
-extern int lprocfs_exp_cleanup(struct obd_export *exp);
-extern int lprocfs_add_simple(struct proc_dir_entry *root,
-                              char *name, read_proc_t *read_proc,
-                              write_proc_t *write_proc, void *data);
-extern int lprocfs_register_stats(cfs_proc_dir_entry_t *root, const char *name,
-                                  struct lprocfs_stats *stats);
-
-/* lprocfs_status.c */
-extern int lprocfs_add_vars(cfs_proc_dir_entry_t *root,
-                            struct lprocfs_vars *var,
-                            void *data);
-
-extern cfs_proc_dir_entry_t *lprocfs_register(const char *name,
-                                               cfs_proc_dir_entry_t *parent,
-                                               struct lprocfs_vars *list,
-                                               void *data);
-
-extern void lprocfs_remove(cfs_proc_dir_entry_t **root);
-
-extern cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *root,
-                                           const char *name);
-
-extern int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list);
-extern int lprocfs_obd_cleanup(struct obd_device *obd);
-extern int lprocfs_add_simple(struct proc_dir_entry *root, char *name,
-                              read_proc_t *read_proc, write_proc_t *write_proc,
-                              void *data);
-struct nid_stat;
-extern void lprocfs_free_per_client_stats(struct obd_device *obd);
-extern int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer,
-                                         unsigned long count, void *data);
-extern int lprocfs_nid_stats_clear_read(char *page, char **start, off_t off,
-                                        int count, int *eof,  void *data);
-
-
-extern struct file_operations lprocfs_evict_client_fops;
-
-extern int lprocfs_seq_create(cfs_proc_dir_entry_t *parent, char *name, 
-                              mode_t mode, struct file_operations *seq_fops,
-                              void *data);
-extern int lprocfs_obd_seq_create(struct obd_device *dev, char *name,
-                                  mode_t mode, struct file_operations *seq_fops,
-                                  void *data);
-
-/* Generic callbacks */
-
-extern int lprocfs_rd_u64(char *page, char **start, off_t off,
-                          int count, int *eof, void *data);
-extern int lprocfs_rd_atomic(char *page, char **start, off_t off,
-                             int count, int *eof, void *data);
-extern int lprocfs_wr_atomic(struct file *file, const char *buffer,
-                             unsigned long count, void *data);
-extern int lprocfs_rd_uint(char *page, char **start, off_t off,
-                           int count, int *eof, void *data);
-extern int lprocfs_wr_uint(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-extern int lprocfs_rd_uuid(char *page, char **start, off_t off,
-                           int count, int *eof, void *data);
-extern int lprocfs_rd_name(char *page, char **start, off_t off,
-                           int count, int *eof, void *data);
-extern int lprocfs_rd_fstype(char *page, char **start, off_t off,
-                             int count, int *eof, void *data);
-extern int lprocfs_rd_server_uuid(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data);
-extern int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
-                                int count, int *eof, void *data);
-extern int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data);
-extern int lprocfs_rd_num_exports(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data);
-extern int lprocfs_rd_numrefs(char *page, char **start, off_t off,
-                              int count, int *eof, void *data);
-struct adaptive_timeout;
-extern int lprocfs_at_hist_helper(char *page, int count, int rc, 
-                                  struct adaptive_timeout *at);
-extern int lprocfs_rd_timeouts(char *page, char **start, off_t off,
-                               int count, int *eof, void *data);
-extern int lprocfs_wr_timeouts(struct file *file, const char *buffer,
-                               unsigned long count, void *data);
-extern int lprocfs_wr_evict_client(struct file *file, const char *buffer,
-                                   unsigned long count, void *data);
-extern int lprocfs_wr_ping(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-
-/* Statfs helpers */
-extern int lprocfs_rd_blksize(char *page, char **start, off_t off,
-                              int count, int *eof, void *data);
-extern int lprocfs_rd_kbytestotal(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data);
-extern int lprocfs_rd_kbytesfree(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data);
-extern int lprocfs_rd_kbytesavail(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data);
-extern int lprocfs_rd_filestotal(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data);
-extern int lprocfs_rd_filesfree(char *page, char **start, off_t off,
-                                int count, int *eof, void *data);
-extern int lprocfs_rd_filegroups(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data);
-
-extern int lprocfs_write_helper(const char *buffer, unsigned long count,
-                                int *val);
-extern int lprocfs_write_frac_helper(const char *buffer, unsigned long count,
-                                     int *val, int mult);
-extern int lprocfs_read_frac_helper(char *buffer, unsigned long count, 
-                                    long val, int mult);
-extern int lprocfs_write_u64_helper(const char *buffer, unsigned long count,
-                                    __u64 *val);
-extern int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
-                                         __u64 *val, int mult);
-void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value);
-void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value);
-void lprocfs_oh_clear(struct obd_histogram *oh);
-unsigned long lprocfs_oh_sum(struct obd_histogram *oh);
-
-/* lprocfs_status.c: counter read/write functions */
-extern int lprocfs_counter_read(char *page, char **start, off_t off,
-                                int count, int *eof, void *data);
-extern int lprocfs_counter_write(struct file *file, const char *buffer,
-                                 unsigned long count, void *data);
-
-/* lprocfs_status.c: recovery status */
-int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data);
-
-extern int lprocfs_seq_release(struct inode *, struct file *);
-
-/* in lprocfs_stat.c, to protect the private data for proc entries */
-extern struct rw_semaphore _lprocfs_lock;
-#define LPROCFS_ENTRY()           do {  \
-        down_read(&_lprocfs_lock);      \
-} while(0)
-#define LPROCFS_EXIT()            do {  \
-        up_read(&_lprocfs_lock);        \
-} while(0)
-#define LPROCFS_ENTRY_AND_CHECK(dp) do {        \
-        typecheck(struct proc_dir_entry *, dp); \
-        LPROCFS_ENTRY();                        \
-        if ((dp)->deleted) {                    \
-                LPROCFS_EXIT();                 \
-                return -ENODEV;                 \
-        }                                       \
-} while(0)
-
-/* You must use these macros when you want to refer to 
- * the import in a client obd_device for a lprocfs entry */
-#define LPROCFS_CLIMP_CHECK(obd) do {           \
-        typecheck(struct obd_device *, obd);    \
-        mutex_down(&(obd)->u.cli.cl_sem);       \
-        if ((obd)->u.cli.cl_import == NULL) {   \
-             mutex_up(&(obd)->u.cli.cl_sem);    \
-             return -ENODEV;                    \
-        }                                       \
-} while(0)
-#define LPROCFS_CLIMP_EXIT(obd)                 \
-        mutex_up(&(obd)->u.cli.cl_sem);
-
-
-/* write the name##_seq_show function, call LPROC_SEQ_FOPS_RO for read-only 
-  proc entries; otherwise, you will define name##_seq_write function also for 
-  a read-write proc entry, and then call LPROC_SEQ_SEQ instead. Finally,
-  call lprocfs_obd_seq_create(obd, filename, 0444, &name#_fops, data); */
-#define __LPROC_SEQ_FOPS(name, custom_seq_write)                           \
-static int name##_seq_open(struct inode *inode, struct file *file) {       \
-        struct proc_dir_entry *dp = PDE(inode);                            \
-        int rc;                                                            \
-        LPROCFS_ENTRY_AND_CHECK(dp);                                       \
-        rc = single_open(file, name##_seq_show, dp->data);                 \
-        if (rc) {                                                          \
-                LPROCFS_EXIT();                                            \
-                return rc;                                                 \
-        }                                                                  \
-        return 0;                                                          \
-}                                                                          \
-struct file_operations name##_fops = {                                     \
-        .owner   = THIS_MODULE,                                            \
-        .open    = name##_seq_open,                                        \
-        .read    = seq_read,                                               \
-        .write   = custom_seq_write,                                       \
-        .llseek  = seq_lseek,                                              \
-        .release = lprocfs_seq_release,                                    \
-}
-
-#define LPROC_SEQ_FOPS_RO(name)         __LPROC_SEQ_FOPS(name, NULL)
-#define LPROC_SEQ_FOPS(name)            __LPROC_SEQ_FOPS(name, name##_seq_write)
-
-/* lproc_ptlrpc.c */
-struct ptlrpc_request;
-extern void target_print_req(void *seq_file, struct ptlrpc_request *req);
-
-#ifdef CRAY_XT3
-/* lprocfs_status.c: read recovery max time bz13079 */
-int lprocfs_obd_rd_recovery_maxtime(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data);
-
-/* lprocfs_status.c: write recovery max time bz13079 */
-int lprocfs_obd_wr_recovery_maxtime(struct file *file, const char *buffer,
-                                    unsigned long count, void *data);
-#endif
-
-#else
-/* LPROCFS is not defined */
-static inline void lprocfs_counter_add(struct lprocfs_stats *stats,
-                                       int index, long amount) { return; }
-static inline void lprocfs_counter_incr(struct lprocfs_stats *stats,
-                                        int index) { return; }
-static inline void lprocfs_counter_sub(struct lprocfs_stats *stats,
-                                       int index, long amount) { return; }
-static inline void lprocfs_counter_init(struct lprocfs_stats *stats,
-                                        int index, unsigned conf,
-                                        const char *name, const char *units)
-{ return; }
-
-static inline __u64 lc_read_helper(struct lprocfs_counter *lc, 
-                                   enum lprocfs_fields_flags field) 
-{ return 0; }
-
-static inline struct lprocfs_stats* lprocfs_alloc_stats(unsigned int num,
-                                                        enum lprocfs_stats_flags flags)
-{ return NULL; }
-static inline void lprocfs_clear_stats(struct lprocfs_stats *stats)
-{ return; }
-static inline void lprocfs_free_stats(struct lprocfs_stats **stats)
-{ return; }
-static inline int lprocfs_register_stats(cfs_proc_dir_entry_t *root,
-                                            const char *name,
-                                            struct lprocfs_stats *stats)
-{ return 0; }
-static inline void lprocfs_init_ops_stats(int num_private_stats, 
-                                          struct lprocfs_stats *stats)
-{ return; }
-static inline int lprocfs_alloc_obd_stats(struct obd_device *obddev,
-                                          unsigned int num_private_stats)
-{ return 0; }
-static inline void lprocfs_free_obd_stats(struct obd_device *obddev)
-{ return; }
-
-struct obd_export;
-static inline int lprocfs_add_clear_entry(struct obd_export *exp)
-{ return 0; }
-static inline int lprocfs_exp_setup(struct obd_export *exp)
-{ return 0; }
-static inline int lprocfs_exp_cleanup(struct obd_export *exp)
-{ return 0; }
-static inline int lprocfs_add_simple(struct proc_dir_entry *root,
-                                     char *name,
-                                     read_proc_t *read_proc,
-                                     write_proc_t *write_proc,
-                                     void *data)
-{return 0; }
-struct nid_stat;
-static inline void lprocfs_free_per_client_stats(struct obd_device *obd)
-{}
-static inline
-int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{return count;}
-static inline
-int lprocfs_nid_stats_clear_read(char *page, char **start, off_t off,
-                                 int count, int *eof,  void *data)
-{return count;}
-
-
-static inline cfs_proc_dir_entry_t *
-lprocfs_register(const char *name, cfs_proc_dir_entry_t *parent,
-                 struct lprocfs_vars *list, void *data) { return NULL; }
-static inline int lprocfs_add_vars(cfs_proc_dir_entry_t *root,
-                                   struct lprocfs_vars *var,
-                                   void *data) { return 0; }
-static inline void lprocfs_remove(cfs_proc_dir_entry_t **root) {};
-static inline cfs_proc_dir_entry_t *lprocfs_srch(cfs_proc_dir_entry_t *head,
-                                    const char *name) {return 0;}
-static inline int lprocfs_obd_setup(struct obd_device *dev,
-                                    struct lprocfs_vars *list) { return 0; }
-static inline int lprocfs_obd_cleanup(struct obd_device *dev)  { return 0; }
-static inline int lprocfs_rd_u64(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data) { return 0; }
-static inline int lprocfs_rd_uuid(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data) { return 0; }
-static inline int lprocfs_rd_name(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data) { return 0; }
-static inline int lprocfs_rd_server_uuid(char *page, char **start, off_t off,
-                                         int count, int *eof, void *data)
-{ return 0; }
-static inline int lprocfs_rd_conn_uuid(char *page, char **start, off_t off,
-                                       int count, int *eof, void *data)
-{ return 0; }
-static inline int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
-                                           int count, int *eof, void *data)
-{ return 0; }
-static inline int lprocfs_rd_num_exports(char *page, char **start, off_t off,
-                                         int count, int *eof, void *data)
-{ return 0; }
-static inline int lprocfs_rd_numrefs(char *page, char **start, off_t off,
-                                     int count, int *eof, void *data)
-{ return 0; }
-struct adaptive_timeout;
-static inline int lprocfs_at_hist_helper(char *page, int count, int rc, 
-                                         struct adaptive_timeout *at)
-{ return 0; }
-static inline int lprocfs_rd_timeouts(char *page, char **start, off_t off,
-                                      int count, int *eof, void *data)
-{ return 0; }
-static inline int lprocfs_wr_timeouts(struct file *file, const char *buffer,
-                                      unsigned long count, void *data)
-{ return 0; }
-static inline int lprocfs_wr_evict_client(struct file *file, const char *buffer,
-                                          unsigned long count, void *data)
-{ return 0; }
-static inline int lprocfs_wr_ping(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{ return 0; }
-
-
-/* Statfs helpers */
-static inline
-int lprocfs_rd_blksize(char *page, char **start, off_t off,
-                       int count, int *eof, void *data) { return 0; }
-static inline
-int lprocfs_rd_kbytestotal(char *page, char **start, off_t off,
-                           int count, int *eof, void *data) { return 0; }
-static inline
-int lprocfs_rd_kbytesfree(char *page, char **start, off_t off,
-                          int count, int *eof, void *data) { return 0; }
-static inline
-int lprocfs_rd_kbytesavail(char *page, char **start, off_t off,
-                           int count, int *eof, void *data) { return 0; }
-static inline
-int lprocfs_rd_filestotal(char *page, char **start, off_t off,
-                          int count, int *eof, void *data) { return 0; }
-static inline
-int lprocfs_rd_filesfree(char *page, char **start, off_t off,
-                         int count, int *eof, void *data)  { return 0; }
-static inline
-int lprocfs_rd_filegroups(char *page, char **start, off_t off,
-                          int count, int *eof, void *data) { return 0; }
-static inline
-void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value) {}
-static inline
-void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value) {}
-static inline
-void lprocfs_oh_clear(struct obd_histogram *oh) {}
-static inline
-unsigned long lprocfs_oh_sum(struct obd_histogram *oh) { return 0; }
-static inline
-int lprocfs_counter_read(char *page, char **start, off_t off,
-                         int count, int *eof, void *data) { return 0; }
-static inline
-int lprocfs_counter_write(struct file *file, const char *buffer,
-                          unsigned long count, void *data) { return 0; }
-
-static inline
-__u64 lprocfs_stats_collector(struct lprocfs_stats *stats, int idx, 
-                               enum lprocfs_fields_flags field)
-{ return (__u64)0; }
-
-#define LPROCFS_ENTRY()
-#define LPROCFS_EXIT()
-#define LPROCFS_ENTRY_AND_CHECK(dp)
-#define LPROC_SEQ_FOPS_RO(name)
-#define LPROC_SEQ_FOPS(name)
-
-/* lproc_ptlrpc.c */
-#define target_print_req NULL
-
-#endif /* LPROCFS */
-
-#endif /* LPROCFS_SNMP_H */
diff --git a/lustre/include/lustre/.cvsignore b/lustre/include/lustre/.cvsignore
deleted file mode 100644
index 282522db0342d8750454b3dc162493b5fc709cc8..0000000000000000000000000000000000000000
--- a/lustre/include/lustre/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/lustre/include/lustre/Makefile.am b/lustre/include/lustre/Makefile.am
deleted file mode 100644
index 0acd90fc2a812265c55ea6bf4c117a15a08c9cbc..0000000000000000000000000000000000000000
--- a/lustre/include/lustre/Makefile.am
+++ /dev/null
@@ -1,10 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if UTILS
-pkginclude_HEADERS = lustre_idl.h lustre_user.h liblustreapi.h types.h
-endif
-
-EXTRA_DIST = lustre_idl.h lustre_user.h liblustreapi.h types.h
diff --git a/lustre/include/lustre/liblustreapi.h b/lustre/include/lustre/liblustreapi.h
deleted file mode 100644
index 4d6c802ae3d102b3fc46e6e118b8d668a0b98e52..0000000000000000000000000000000000000000
--- a/lustre/include/lustre/liblustreapi.h
+++ /dev/null
@@ -1,114 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- */
-#ifndef _LIBLUSTREAPI_H_
-#define _LIBLUSTREAPI_H_
-
-#include <lustre/lustre_user.h>
-
-/* Initially allocate for these many OSTs, realloc if needed */
-#define INIT_ALLOC_NUM_OSTS     1024
-
-/* Maximum number of osts that can be specified to lfs find */
-#define FIND_MAX_OSTS   1024
-
-typedef void (*llapi_cb_t)(char *obd_type_name, char *obd_name, char *obd_uuid, void *args);
-
-/* liblustreapi message severity level */
-enum llapi_message_level {
-        LLAPI_MSG_OFF    = 0,
-        LLAPI_MSG_FATAL  = 1,
-        LLAPI_MSG_ERROR  = 2,
-        LLAPI_MSG_WARN   = 3,
-        LLAPI_MSG_NORMAL = 4,
-        LLAPI_MSG_INFO   = 5,
-        LLAPI_MSG_DEBUG  = 6,
-        LLAPI_MSG_MAX
-};
-
-/* the bottom three bits reserved for llapi_message_level */
-#define LLAPI_MSG_MASK          0x00000007
-#define LLAPI_MSG_NO_ERRNO      0x00000010 
-
-/* liblustreapi.c */
-extern void llapi_msg_set_level(int level);
-extern void llapi_err(int level, char *fmt, ...);
-extern void llapi_printf(int level, char *fmt, ...);
-extern int llapi_file_create(const char *name, unsigned long stripe_size,
-                             int stripe_offset, int stripe_count,
-                             int stripe_pattern);
-extern int llapi_file_open(const char *name, int flags, int mode,
-                           unsigned long stripe_size, int stripe_offset,
-                           int stripe_count, int stripe_pattern);
-extern int llapi_file_get_stripe(const char *path, struct lov_user_md *lum);
-#define HAVE_LLAPI_FILE_LOOKUP
-extern int llapi_file_lookup(int dirfd, const char *name);
-
-struct find_param {
-        unsigned int maxdepth;
-        time_t  atime;
-        time_t  mtime;
-        time_t  ctime;
-        int     asign;
-        int     csign;
-        int     msign;
-        int     type;
-        unsigned long long size;
-        int     size_sign;
-        unsigned long long size_units;
-        int size_check;
-
-        unsigned long   zeroend:1,
-                        recursive:1,
-                        got_uuids:1,
-                        obds_printed:1,
-                        exclude_pattern:1,
-                        exclude_type:1,
-                        have_fileinfo:1;
-
-        int     verbose;
-        int     quiet;
-
-        /* regular expression */
-        char   *pattern;
-
-        char   *print_fmt;
-
-        struct  obd_uuid        *obduuid;
-        int                     num_obds;
-        int                     num_alloc_obds;
-        int                     obdindex;
-        int                     *obdindexes;
-
-        int     lumlen;
-        struct  lov_user_mds_data *lmd;
-
-        /* In-precess parameters. */
-        unsigned int depth;
-        dev_t   st_dev;
-};
-
-extern int llapi_getstripe(char *path, struct find_param *param);
-extern int llapi_find(char *path, struct find_param *param);
-
-extern int llapi_obd_statfs(char *path, __u32 type, __u32 index,
-                     struct obd_statfs *stat_buf,
-                     struct obd_uuid *uuid_buf);
-extern int llapi_ping(char *obd_type, char *obd_name);
-extern int llapi_target_check(int num_types, char **obd_types, char *dir);
-extern int llapi_catinfo(char *dir, char *keyword, char *node_name);
-extern int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count);
-extern int llapi_is_lustre_mnttype(const char *type);
-extern int parse_size(char *optarg, unsigned long long *size,
-                      unsigned long long *size_units);
-struct mntent;
-#define HAVE_LLAPI_IS_LUSTRE_MNT
-extern int llapi_is_lustre_mnt(struct mntent *mnt);
-extern int llapi_quotachown(char *path, int flag);
-extern int llapi_quotacheck(char *mnt, int check_type);
-extern int llapi_poll_quotacheck(char *mnt, struct if_quotacheck *qchk);
-extern int llapi_quotactl(char *mnt, struct if_quotactl *qctl);
-extern int llapi_target_iterate(int type_num, char **obd_type, void *args, llapi_cb_t cb);
-#endif
diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h
deleted file mode 100644
index 8caf3cd601d2bc5f9fb41ce81f12f48e776dc9b9..0000000000000000000000000000000000000000
--- a/lustre/include/lustre/lustre_idl.h
+++ /dev/null
@@ -1,1612 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * Lustre wire protocol definitions.
- *
- * ALL structs passing over the wire should be declared here.  Structs
- * that are used in interfaces with userspace should go in lustre_user.h.
- *
- * All structs being declared here should be built from simple fixed-size
- * types (__u8, __u16, __u32, __u64) or be built from other types or
- * structs also declared in this file.  Similarly, all flags and magic
- * values in those structs should also be declared here.  This ensures
- * that the Lustre wire protocol is not influenced by external dependencies.
- *
- * The only other acceptable items in this file are VERY SIMPLE accessor
- * functions to avoid callers grubbing inside the structures, and the
- * prototypes of the swabber functions for each struct.  Nothing that
- * depends on external functions or definitions should be in here.
- *
- * Structs must be properly aligned to put 64-bit values on an 8-byte
- * boundary.  Any structs being added here must also be added to
- * utils/wirecheck.c and "make newwiretest" run to regenerate the
- * utils/wiretest.c sources.  This allows us to verify that wire structs
- * have the proper alignment/size on all architectures.
- *
- * DO NOT CHANGE any of the structs, flags, values declared here and used
- * in released Lustre versions.  Some structs may have padding fields that
- * can be used.  Some structs might allow addition at the end (verify this
- * in the code to ensure that new/old clients that see this larger struct
- * do not fail, otherwise you need to implement protocol compatibility).
- *
- * We assume all nodes are either little-endian or big-endian, and we
- * always send messages in the sender's native format.  The receiver
- * detects the message format by checking the 'magic' field of the message
- * (see lustre_msg_swabbed() below).
- *
- * Each wire type has corresponding 'lustre_swab_xxxtypexxx()' routines,
- * implemented either here, inline (trivial implementations) or in
- * ptlrpc/pack_generic.c.  These 'swabbers' convert the type from "other"
- * endian, in-place in the message buffer.
- *
- * A swabber takes a single pointer argument.  The caller must already have
- * verified that the length of the message buffer >= sizeof (type).
- *
- * For variable length types, a second 'lustre_swab_v_xxxtypexxx()' routine
- * may be defined that swabs just the variable part, after the caller has
- * verified that the message buffer is large enough.
- */
-
-#ifndef _LUSTRE_IDL_H_
-#define _LUSTRE_IDL_H_
-
-#if defined(__linux__)
-#include <linux/lustre_types.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_types.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_types.h>
-#else
-#error Unsupported operating system.
-#endif
-
-/* Defn's shared with user-space. */
-#include <lustre/lustre_user.h>
-#include <lustre_ver.h>
-
-/*
- * this file contains all data structures used in Lustre interfaces:
- * - obdo and obd_request records
- * - mds_request records
- * - ldlm data
- * - ioctl's
- */
-
-/*
- *  GENERAL STUFF
- */
-/* FOO_REQUEST_PORTAL is for incoming requests on the FOO
- * FOO_REPLY_PORTAL   is for incoming replies on the FOO
- * FOO_BULK_PORTAL    is for incoming bulk on the FOO
- */
-
-#define CONNMGR_REQUEST_PORTAL          1
-#define CONNMGR_REPLY_PORTAL            2
-//#define OSC_REQUEST_PORTAL            3
-#define OSC_REPLY_PORTAL                4
-//#define OSC_BULK_PORTAL               5
-#define OST_IO_PORTAL                   6
-#define OST_CREATE_PORTAL               7
-#define OST_BULK_PORTAL                 8
-//#define MDC_REQUEST_PORTAL            9
-#define MDC_REPLY_PORTAL               10
-//#define MDC_BULK_PORTAL              11
-#define MDS_REQUEST_PORTAL             12
-//#define MDS_REPLY_PORTAL             13
-#define MDS_BULK_PORTAL                14
-#define LDLM_CB_REQUEST_PORTAL         15
-#define LDLM_CB_REPLY_PORTAL           16
-#define LDLM_CANCEL_REQUEST_PORTAL     17
-#define LDLM_CANCEL_REPLY_PORTAL       18
-//#define PTLBD_REQUEST_PORTAL           19
-//#define PTLBD_REPLY_PORTAL             20
-//#define PTLBD_BULK_PORTAL              21
-#define MDS_SETATTR_PORTAL             22
-#define MDS_READPAGE_PORTAL            23
-
-#define MGC_REPLY_PORTAL               25
-#define MGS_REQUEST_PORTAL             26
-#define MGS_REPLY_PORTAL               27
-#define OST_REQUEST_PORTAL             28
-
-#define SVC_KILLED               1
-#define SVC_EVENT                2
-#define SVC_SIGNAL               4
-#define SVC_RUNNING              8
-#define SVC_STOPPING            16
-#define SVC_STOPPED             32
-
-/* packet types */
-#define PTL_RPC_MSG_REQUEST 4711
-#define PTL_RPC_MSG_ERR     4712
-#define PTL_RPC_MSG_REPLY   4713
-
-/* DON'T use swabbed values of MAGIC as magic! */
-#define LUSTRE_MSG_MAGIC_V1 0x0BD00BD0
-#define LUSTRE_MSG_MAGIC_V2 0x0BD00BD3
-
-#define LUSTRE_MSG_MAGIC_V1_SWABBED 0xD00BD00B
-#define LUSTRE_MSG_MAGIC_V2_SWABBED 0xD30BD00B
-
-#define LUSTRE_MSG_MAGIC LUSTRE_MSG_MAGIC_V2
-
-#define PTLRPC_MSG_VERSION  0x00000003
-#define LUSTRE_VERSION_MASK 0xffff0000
-#define LUSTRE_OBD_VERSION  0x00010000
-#define LUSTRE_MDS_VERSION  0x00020000
-#define LUSTRE_OST_VERSION  0x00030000
-#define LUSTRE_DLM_VERSION  0x00040000
-#define LUSTRE_LOG_VERSION  0x00050000
-#define LUSTRE_MGS_VERSION  0x00060000
-
-struct lustre_handle {
-        __u64 cookie;
-};
-#define DEAD_HANDLE_MAGIC 0xdeadbeefcafebabeULL
-
-static inline int lustre_handle_is_used(struct lustre_handle *lh)
-{
-        return lh->cookie != 0ull;
-}
-
-static inline int lustre_handle_equal(struct lustre_handle *lh1,
-                                      struct lustre_handle *lh2)
-{
-        return lh1->cookie == lh2->cookie;
-}
-
-static inline void lustre_handle_copy(struct lustre_handle *tgt,
-                                      struct lustre_handle *src)
-{
-        tgt->cookie = src->cookie;
-}
-
-/* we depend on this structure to be 8-byte aligned */
-/* this type is only endian-adjusted in lustre_unpack_msg() */
-struct lustre_msg_v1 {
-        struct lustre_handle lm_handle;
-        __u32 lm_magic;
-        __u32 lm_type;
-        __u32 lm_version;
-        __u32 lm_opc;
-        __u64 lm_last_xid;
-        __u64 lm_last_committed;
-        __u64 lm_transno;
-        __u32 lm_status;
-        __u32 lm_flags;
-        __u32 lm_conn_cnt;
-        __u32 lm_bufcount;
-        __u32 lm_buflens[0];
-};
-
-/* flags for lm_flags */
-#define MSGHDR_AT_SUPPORT               0x1
-
-#define lustre_msg lustre_msg_v2
-/* we depend on this structure to be 8-byte aligned */
-/* this type is only endian-adjusted in lustre_unpack_msg() */
-struct lustre_msg_v2 {
-        __u32 lm_bufcount;
-        __u32 lm_secflvr;
-        __u32 lm_magic;
-        __u32 lm_repsize;
-        __u32 lm_cksum;
-        __u32 lm_flags;
-        __u32 lm_padding_2;
-        __u32 lm_padding_3;
-        __u32 lm_buflens[0];
-};
-
-/* without security, ptlrpc_body is put in the first buffer. */
-struct ptlrpc_body {
-        struct lustre_handle pb_handle;
-        __u32 pb_type;
-        __u32 pb_version;
-        __u32 pb_opc;
-        __u32 pb_status;
-        __u64 pb_last_xid;
-        __u64 pb_last_seen;
-        __u64 pb_last_committed;
-        __u64 pb_transno;
-        __u32 pb_flags;
-        __u32 pb_op_flags;
-        __u32 pb_conn_cnt;
-        __u32 pb_timeout;  /* for req, the deadline, for rep, the service est */
-        __u32 pb_service_time; /* for rep, actual service time */
-        __u32 pb_limit;
-        __u64 pb_slv;
-};
-
-extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb);
-
-/* message body offset for lustre_msg_v2 */
-/* ptlrpc body offset in all request/reply messages */
-#define MSG_PTLRPC_BODY_OFF             0
-
-/* normal request/reply message record offset */
-#define REQ_REC_OFF                     1
-#define REPLY_REC_OFF                   1
-
-/* ldlm request message body offset */
-#define DLM_LOCKREQ_OFF                 1 /* lockreq offset */
-#define DLM_REQ_REC_OFF                 2 /* normal dlm request record offset */
-
-/* ldlm intent lock message body offset */
-#define DLM_INTENT_IT_OFF               2 /* intent lock it offset */
-#define DLM_INTENT_REC_OFF              3 /* intent lock record offset */
-
-/* ldlm reply message body offset */
-#define DLM_LOCKREPLY_OFF               1 /* lockrep offset */
-#define DLM_REPLY_REC_OFF               2 /* reply record offset */
-
-/* Flags that are operation-specific go in the top 16 bits. */
-#define MSG_OP_FLAG_MASK   0xffff0000
-#define MSG_OP_FLAG_SHIFT  16
-
-/* Flags that apply to all requests are in the bottom 16 bits */
-#define MSG_GEN_FLAG_MASK      0x0000ffff
-#define MSG_LAST_REPLAY        1
-#define MSG_RESENT             2
-#define MSG_REPLAY             4
-/* #define MSG_AT_SUPPORT         8  avoid until 1.10+ */
-
-/*
- * Flags for all connect opcodes (MDS_CONNECT, OST_CONNECT)
- */
-
-#define MSG_CONNECT_RECOVERING  0x1
-#define MSG_CONNECT_RECONNECT   0x2
-#define MSG_CONNECT_REPLAYABLE  0x4
-//#define MSG_CONNECT_PEER        0x8
-#define MSG_CONNECT_LIBCLIENT   0x10
-#define MSG_CONNECT_INITIAL     0x20
-#define MSG_CONNECT_ASYNC       0x40
-#define MSG_CONNECT_NEXT_VER    0x80 /* use next version of lustre_msg */
-
-/* Connect flags */
-#define OBD_CONNECT_RDONLY            0x1ULL /*client allowed read-only access*/
-#define OBD_CONNECT_INDEX             0x2ULL /*connect to specific LOV idx */
-#define OBD_CONNECT_GRANT             0x8ULL /*OSC acquires grant at connect */
-#define OBD_CONNECT_SRVLOCK          0x10ULL /*server takes locks for client */
-#define OBD_CONNECT_VERSION          0x20ULL /*Lustre versions in ocd */
-#define OBD_CONNECT_REQPORTAL        0x40ULL /*Separate non-IO request portal */
-#define OBD_CONNECT_ACL              0x80ULL /*access control lists */
-#define OBD_CONNECT_XATTR           0x100ULL /*client use extended attributes */
-#define OBD_CONNECT_CROW            0x200ULL /*MDS+OST create objects on write*/
-#define OBD_CONNECT_TRUNCLOCK       0x400ULL /*locks on server for punch */
-#define OBD_CONNECT_TRANSNO         0x800ULL /*replay sends initial transno */
-#define OBD_CONNECT_IBITS          0x1000ULL /*support for inodebits locks */
-#define OBD_CONNECT_JOIN           0x2000ULL /*files can be concatenated */
-#define OBD_CONNECT_ATTRFID        0x4000ULL /*Server supports GetAttr By Fid */
-#define OBD_CONNECT_NODEVOH        0x8000ULL /*No open handle on special nodes*/
-#define OBD_CONNECT_LCL_CLIENT    0x10000ULL /*local 1.8 client */
-#define OBD_CONNECT_RMT_CLIENT    0x20000ULL /*Remote 1.8 client */
-#define OBD_CONNECT_BRW_SIZE      0x40000ULL /*Max bytes per rpc */
-#define OBD_CONNECT_QUOTA64       0x80000ULL /*64bit qunit_data.qd_count */
-#define OBD_CONNECT_MDS_CAPA     0x100000ULL /*MDS capability */
-#define OBD_CONNECT_OSS_CAPA     0x200000ULL /*OSS capability */
-#define OBD_CONNECT_CANCELSET    0x400000ULL /*Early batched cancels. */
-#define OBD_CONNECT_SOM        0x00800000ULL /*Size on MDS */
-#define OBD_CONNECT_AT         0x01000000ULL /*client uses adaptive timeouts */
-#define OBD_CONNECT_LRU_RESIZE 0x02000000ULL /*Lru resize feature. */
-#define OBD_CONNECT_MDS_MDS    0x04000000ULL /*MDS-MDS connection */
-#define OBD_CONNECT_REAL       0x08000000ULL /*real connection */
-#define OBD_CONNECT_CHANGE_QS  0x10000000ULL /*shrink/enlarge qunit size
-                                              *b=10600 */
-#define OBD_CONNECT_CKSUM      0x20000000ULL /*support several cksum algos */
-#define OBD_CONNECT_FID        0x40000000ULL /* FID is supported */
-/* also update obd_connect_names[] for lprocfs_rd_connect_flags()
- * and lustre/utils/wirecheck.c */
-
-#ifdef HAVE_LRU_RESIZE_SUPPORT
-#define LRU_RESIZE_CONNECT_FLAG OBD_CONNECT_LRU_RESIZE
-#else
-#define LRU_RESIZE_CONNECT_FLAG 0
-#endif
-
-#define MDS_CONNECT_SUPPORTED  (OBD_CONNECT_RDONLY | OBD_CONNECT_VERSION | \
-                                OBD_CONNECT_ACL | OBD_CONNECT_XATTR | \
-                                OBD_CONNECT_IBITS | OBD_CONNECT_JOIN | \
-                                OBD_CONNECT_NODEVOH | OBD_CONNECT_ATTRFID | \
-                                OBD_CONNECT_CANCELSET | OBD_CONNECT_AT | \
-                                LRU_RESIZE_CONNECT_FLAG)
-#define OST_CONNECT_SUPPORTED  (OBD_CONNECT_SRVLOCK | OBD_CONNECT_GRANT | \
-                                OBD_CONNECT_REQPORTAL | OBD_CONNECT_VERSION | \
-                                OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_INDEX | \
-                                OBD_CONNECT_BRW_SIZE | OBD_CONNECT_QUOTA64 | \
-                                OBD_CONNECT_CANCELSET | OBD_CONNECT_AT | \
-                                LRU_RESIZE_CONNECT_FLAG | OBD_CONNECT_CKSUM | \
-                                OBD_CONNECT_CHANGE_QS)
-#define ECHO_CONNECT_SUPPORTED (0)
-#define MGS_CONNECT_SUPPORTED  (OBD_CONNECT_VERSION | OBD_CONNECT_AT)
-
-#define MAX_QUOTA_COUNT32 (0xffffffffULL)
-
-#define OBD_OCD_VERSION(major,minor,patch,fix) (((major)<<24) + ((minor)<<16) +\
-                                                ((patch)<<8) + (fix))
-#define OBD_OCD_VERSION_MAJOR(version) ((int)((version)>>24)&255)
-#define OBD_OCD_VERSION_MINOR(version) ((int)((version)>>16)&255)
-#define OBD_OCD_VERSION_PATCH(version) ((int)((version)>>8)&255)
-#define OBD_OCD_VERSION_FIX(version)   ((int)(version)&255)
-
-/* This structure is used for both request and reply.
- *
- * If we eventually have separate connect data for different types, which we
- * almost certainly will, then perhaps we stick a union in here. */
-struct obd_connect_data {
-        __u64 ocd_connect_flags;        /* OBD_CONNECT_* per above */
-        __u32 ocd_version;              /* lustre release version number */
-        __u32 ocd_grant;                /* initial cache grant amount (bytes) */
-        __u32 ocd_index;                /* LOV index to connect to */
-        __u32 ocd_brw_size;             /* Maximum BRW size in bytes */
-        __u64 ocd_ibits_known;          /* inode bits this client understands */
-        __u32 ocd_nllu;                 /* non-local-lustre-user */
-        __u32 ocd_nllg;                 /* non-local-lustre-group */
-        __u64 ocd_transno;              /* Used in lustre 1.8 */
-        __u32 ocd_group;                /* Used in lustre 1.8 */
-        __u32 ocd_cksum_types;          /* supported checksum algorithms */
-        __u64 padding1;                 /* also fix lustre_swab_connect */
-        __u64 padding2;                 /* also fix lustre_swab_connect */
-};
-
-extern void lustre_swab_connect(struct obd_connect_data *ocd);
-
-/*
- * Supported checksum algorithms. Up to 32 checksum types are supported.
- * (32-bit mask stored in obd_connect_data::ocd_cksum_types)
- * Please update DECLARE_CKSUM_NAME/OBD_CKSUM_ALL in obd.h when adding a new
- * algorithm and also the OBD_FL_CKSUM* flags.
- */
-typedef enum {
-        OBD_CKSUM_CRC32 = 0x00000001,
-        OBD_CKSUM_ADLER = 0x00000002,
-} cksum_type_t;
-
-/*
- *   OST requests: OBDO & OBD request records
- */
-
-/* opcodes */
-typedef enum {
-        OST_REPLY      =  0,       /* reply ? */
-        OST_GETATTR    =  1,
-        OST_SETATTR    =  2,
-        OST_READ       =  3,
-        OST_WRITE      =  4,
-        OST_CREATE     =  5,
-        OST_DESTROY    =  6,
-        OST_GET_INFO   =  7,
-        OST_CONNECT    =  8,
-        OST_DISCONNECT =  9,
-        OST_PUNCH      = 10,
-        OST_OPEN       = 11,
-        OST_CLOSE      = 12,
-        OST_STATFS     = 13,
-/*      OST_SAN_READ   = 14,    deprecated */
-/*      OST_SAN_WRITE  = 15,    deprecated */
-        OST_SYNC       = 16,
-        OST_SET_INFO   = 17,
-        OST_QUOTACHECK = 18,
-        OST_QUOTACTL   = 19,
-        OST_QUOTA_ADJUST_QUNIT = 20,
-        OST_LAST_OPC
-} ost_cmd_t;
-#define OST_FIRST_OPC  OST_REPLY
-
-typedef __u64 obd_id;
-typedef __u64 obd_gr;
-typedef __u64 obd_time;
-typedef __u64 obd_size;
-typedef __u64 obd_off;
-typedef __u64 obd_blocks;
-typedef __u64 obd_valid;
-typedef __u32 obd_blksize;
-typedef __u32 obd_mode;
-typedef __u32 obd_uid;
-typedef __u32 obd_gid;
-typedef __u32 obd_flag;
-typedef __u32 obd_count;
-
-#define OBD_FL_INLINEDATA    (0x00000001)
-#define OBD_FL_OBDMDEXISTS   (0x00000002)
-#define OBD_FL_DELORPHAN     (0x00000004) /* if set in o_flags delete orphans */
-#define OBD_FL_NORPC         (0x00000008) /* set in o_flags do in OSC not OST */
-#define OBD_FL_IDONLY        (0x00000010) /* set in o_flags only adjust obj id*/
-#define OBD_FL_RECREATE_OBJS (0x00000020) /* recreate missing obj */
-#define OBD_FL_DEBUG_CHECK   (0x00000040) /* echo client/server debug check */
-#define OBD_FL_NO_USRQUOTA   (0x00000100) /* the object's owner is over quota */
-#define OBD_FL_NO_GRPQUOTA   (0x00000200) /* the object's group is over quota */
-#define OBD_FL_CREATE_CROW   (0x00000400) /* object should be create on write */
-
-/*
- * set this to delegate DLM locking during obd_punch() to the OSTs. Only OSTs
- * that declared OBD_CONNECT_TRUNCLOCK in their connect flags support this
- * functionality.
- */
-#define OBD_FL_TRUNCLOCK     (0x00000800)
-
-/*
- * Checksum types
- */
-#define OBD_FL_CKSUM_CRC32    (0x00001000)
-#define OBD_FL_CKSUM_ADLER    (0x00002000)
-#define OBD_FL_CKSUM_ALL      (OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER)
-
-/* this should be not smaller than sizeof(struct lustre_handle) + sizeof(struct
- * llog_cookie) + sizeof(ll_fid). Nevertheless struct ll_fid is not longer
- * stored in o_inline, we keep this just for case. */
-#define OBD_INLINESZ    80
-
-/* Note: 64-bit types are 64-bit aligned in structure */
-struct obdo {
-        obd_valid               o_valid;        /* hot fields in this obdo */
-        obd_id                  o_id;
-        obd_gr                  o_gr;
-        obd_id                  o_fid;
-        obd_size                o_size;         /* o_size-o_blocks == ost_lvb */
-        obd_time                o_mtime;
-        obd_time                o_atime;
-        obd_time                o_ctime;
-        obd_blocks              o_blocks;       /* brw: cli sent cached bytes */
-        obd_size                o_grant;
-
-        /* 32-bit fields start here: keep an even number of them via padding */
-        obd_blksize             o_blksize;      /* optimal IO blocksize */
-        obd_mode                o_mode;         /* brw: cli sent cache remain */
-        obd_uid                 o_uid;
-        obd_gid                 o_gid;
-        obd_flag                o_flags;
-        obd_count               o_nlink;        /* brw: checksum */
-        obd_count               o_generation;
-        obd_count               o_misc;         /* brw: o_dropped */
-        __u32                   o_easize;       /* epoch in ost writes */
-        __u32                   o_mds;
-        __u32                   o_stripe_idx;   /* holds stripe idx */
-        __u32                   o_padding_1;
-        char                    o_inline[OBD_INLINESZ];
-                                /* lustre_handle + llog_cookie */
-};
-
-#define o_dirty   o_blocks
-#define o_undirty o_mode
-#define o_dropped o_misc
-#define o_cksum   o_nlink
-
-extern void lustre_swab_obdo (struct obdo *o);
-
-
-#define LOV_MAGIC_V1      0x0BD10BD0
-#define LOV_MAGIC         LOV_MAGIC_V1
-#define LOV_MAGIC_JOIN    0x0BD20BD0
-
-#define LOV_PATTERN_RAID0 0x001   /* stripes are used round-robin */
-#define LOV_PATTERN_RAID1 0x002   /* stripes are mirrors of each other */
-#define LOV_PATTERN_FIRST 0x100   /* first stripe is not in round-robin */
-#define LOV_PATTERN_CMOBD 0x200
-
-#define LOV_OBJECT_GROUP_DEFAULT ~0ULL
-#define LOV_OBJECT_GROUP_CLEAR 0ULL
-
-#define lov_ost_data lov_ost_data_v1
-struct lov_ost_data_v1 {          /* per-stripe data structure (little-endian)*/
-        __u64 l_object_id;        /* OST object ID */
-        __u64 l_object_gr;        /* OST object group (creating MDS number) */
-        __u32 l_ost_gen;          /* generation of this l_ost_idx */
-        __u32 l_ost_idx;          /* OST index in LOV (lov_tgt_desc->tgts) */
-};
-
-#define lov_mds_md lov_mds_md_v1
-struct lov_mds_md_v1 {            /* LOV EA mds/wire data (little-endian) */
-        __u32 lmm_magic;          /* magic number = LOV_MAGIC_V1 */
-        __u32 lmm_pattern;        /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
-        __u64 lmm_object_id;      /* LOV object ID */
-        __u64 lmm_object_gr;      /* LOV object group */
-        __u32 lmm_stripe_size;    /* size of stripe in bytes */
-        __u32 lmm_stripe_count;   /* num stripes in use for this object */
-        struct lov_ost_data_v1 lmm_objects[0]; /* per-stripe data */
-};
-
-#define OBD_MD_FLID        (0x00000001ULL) /* object ID */
-#define OBD_MD_FLATIME     (0x00000002ULL) /* access time */
-#define OBD_MD_FLMTIME     (0x00000004ULL) /* data modification time */
-#define OBD_MD_FLCTIME     (0x00000008ULL) /* change time */
-#define OBD_MD_FLSIZE      (0x00000010ULL) /* size */
-#define OBD_MD_FLBLOCKS    (0x00000020ULL) /* allocated blocks count */
-#define OBD_MD_FLBLKSZ     (0x00000040ULL) /* block size */
-#define OBD_MD_FLMODE      (0x00000080ULL) /* access bits (mode & ~S_IFMT) */
-#define OBD_MD_FLTYPE      (0x00000100ULL) /* object type (mode & S_IFMT) */
-#define OBD_MD_FLUID       (0x00000200ULL) /* user ID */
-#define OBD_MD_FLGID       (0x00000400ULL) /* group ID */
-#define OBD_MD_FLFLAGS     (0x00000800ULL) /* flags word */
-#define OBD_MD_FLNLINK     (0x00002000ULL) /* link count */
-#define OBD_MD_FLGENER     (0x00004000ULL) /* generation number */
-#define OBD_MD_FLINLINE    (0x00008000ULL) /* inline data */
-#define OBD_MD_FLRDEV      (0x00010000ULL) /* device number */
-#define OBD_MD_FLEASIZE    (0x00020000ULL) /* extended attribute data */
-#define OBD_MD_LINKNAME    (0x00040000ULL) /* symbolic link target */
-#define OBD_MD_FLHANDLE    (0x00080000ULL) /* file handle */
-#define OBD_MD_FLCKSUM     (0x00100000ULL) /* bulk data checksum */
-#define OBD_MD_FLQOS       (0x00200000ULL) /* quality of service stats */
-#define OBD_MD_FLOSCOPQ    (0x00400000ULL) /* osc opaque data */
-#define OBD_MD_FLCOOKIE    (0x00800000ULL) /* log cancellation cookie */
-#define OBD_MD_FLGROUP     (0x01000000ULL) /* group */
-#define OBD_MD_FLFID       (0x02000000ULL) /* ->ost write inline fid */
-#define OBD_MD_FLEPOCH     (0x04000000ULL) /* ->ost write easize is epoch */
-#define OBD_MD_FLGRANT     (0x08000000ULL) /* ost preallocation space grant */
-#define OBD_MD_FLDIREA     (0x10000000ULL) /* dir's extended attribute data */
-#define OBD_MD_FLUSRQUOTA  (0x20000000ULL) /* over quota flags sent from ost */
-#define OBD_MD_FLGRPQUOTA  (0x40000000ULL) /* over quota flags sent from ost */
-#define OBD_MD_FLMODEASIZE (0x80000000ULL) /* EA size will be changed */
-
-#define OBD_MD_MDS         (0x0000000100000000ULL) /* where an inode lives on */
-#define OBD_MD_REINT       (0x0000000200000000ULL) /* reintegrate oa */
-
-#define OBD_MD_FLXATTR     (0x0000001000000000ULL) /* xattr */
-#define OBD_MD_FLXATTRLS   (0x0000002000000000ULL) /* xattr list */
-#define OBD_MD_FLXATTRRM   (0x0000004000000000ULL) /* xattr remove */
-#define OBD_MD_FLACL       (0x0000008000000000ULL) /* ACL */
-
-#define OBD_MD_FLGETATTR (OBD_MD_FLID    | OBD_MD_FLATIME | OBD_MD_FLMTIME | \
-                          OBD_MD_FLCTIME | OBD_MD_FLSIZE  | OBD_MD_FLBLKSZ | \
-                          OBD_MD_FLMODE  | OBD_MD_FLTYPE  | OBD_MD_FLUID   | \
-                          OBD_MD_FLGID   | OBD_MD_FLFLAGS | OBD_MD_FLNLINK | \
-                          OBD_MD_FLGENER | OBD_MD_FLRDEV  | OBD_MD_FLGROUP)
-
-static inline struct lustre_handle *obdo_handle(struct obdo *oa)
-{
-        return (struct lustre_handle *)oa->o_inline;
-}
-
-static inline struct llog_cookie *obdo_logcookie(struct obdo *oa)
-{
-        return (struct llog_cookie *)(oa->o_inline +
-                                      sizeof(struct lustre_handle));
-}
-/* don't forget obdo_fid which is way down at the bottom so it can
- * come after the definition of llog_cookie */
-
-struct obd_statfs {
-        __u64           os_type;
-        __u64           os_blocks;
-        __u64           os_bfree;
-        __u64           os_bavail;
-        __u64           os_files;
-        __u64           os_ffree;
-        __u8            os_fsid[40];
-        __u32           os_bsize;
-        __u32           os_namelen;
-        __u64           os_maxbytes;
-        __u32           os_state;       /* positive error code on server */
-        __u32           os_spare1;
-        __u32           os_spare2;
-        __u32           os_spare3;
-        __u32           os_spare4;
-        __u32           os_spare5;
-        __u32           os_spare6;
-        __u32           os_spare7;
-        __u32           os_spare8;
-        __u32           os_spare9;
-};
-
-extern void lustre_swab_obd_statfs (struct obd_statfs *os);
-#define OBD_STATFS_NODELAY      0x0001  /* requests should be send without delay
-                                         * and resends for avoid deadlocks */
-
-/* ost_body.data values for OST_BRW */
-
-#define OBD_BRW_READ            0x01
-#define OBD_BRW_WRITE           0x02
-#define OBD_BRW_RWMASK          (OBD_BRW_READ | OBD_BRW_WRITE)
-#define OBD_BRW_SYNC            0x08
-#define OBD_BRW_CHECK           0x10
-#define OBD_BRW_FROM_GRANT      0x20 /* the osc manages this under llite */
-#define OBD_BRW_GRANTED         0x40 /* the ost manages this */
-#define OBD_BRW_DROP            0x80 /* drop the page after IO */
-#define OBD_BRW_NOQUOTA        0x100
-#define OBD_BRW_SRVLOCK        0x200 /* Client holds no lock over this page */
-
-#define OBD_OBJECT_EOF 0xffffffffffffffffULL
-
-#define OST_MIN_PRECREATE 32
-#define OST_MAX_PRECREATE 20000
-
-struct obd_ioobj {
-        obd_id               ioo_id;
-        obd_gr               ioo_gr;
-        __u32                ioo_type;
-        __u32                ioo_bufcnt;
-};
-
-extern void lustre_swab_obd_ioobj (struct obd_ioobj *ioo);
-
-/* multiple of 8 bytes => can array */
-struct niobuf_remote {
-        __u64 offset;
-        __u32 len;
-        __u32 flags;
-};
-
-extern void lustre_swab_niobuf_remote (struct niobuf_remote *nbr);
-
-/* request structure for OST's */
-
-struct ost_body {
-        struct  obdo oa;
-};
-
-extern void lustre_swab_ost_body (struct ost_body *b);
-extern void lustre_swab_ost_last_id(obd_id *id);
-
-/* lock value block communicated between the filter and llite */
-
-/* OST_LVB_ERR_INIT is needed because the return code in rc is 
- * negative, i.e. because ((MASK + rc) & MASK) != MASK. */
-#define OST_LVB_ERR_INIT 0xffbadbad80000000ULL
-#define OST_LVB_ERR_MASK 0xffbadbad00000000ULL
-#define OST_LVB_IS_ERR(blocks)                                          \
-        ((blocks & OST_LVB_ERR_MASK) == OST_LVB_ERR_MASK)
-#define OST_LVB_SET_ERR(blocks, rc)                                     \
-        do { blocks = OST_LVB_ERR_INIT + rc; } while (0)
-#define OST_LVB_GET_ERR(blocks)    (int)(blocks - OST_LVB_ERR_INIT)
-
-struct ost_lvb {
-        __u64 lvb_size;
-        __u64 lvb_mtime;
-        __u64 lvb_atime;
-        __u64 lvb_ctime;
-        __u64 lvb_blocks;
-};
-
-extern void lustre_swab_ost_lvb(struct ost_lvb *);
-
-/*
- *   MDS REQ RECORDS
- */
-
-/* opcodes */
-typedef enum {
-        MDS_GETATTR      = 33,
-        MDS_GETATTR_NAME = 34,
-        MDS_CLOSE        = 35,
-        MDS_REINT        = 36,
-        MDS_READPAGE     = 37,
-        MDS_CONNECT      = 38,
-        MDS_DISCONNECT   = 39,
-        MDS_GETSTATUS    = 40,
-        MDS_STATFS       = 41,
-        MDS_PIN          = 42,
-        MDS_UNPIN        = 43,
-        MDS_SYNC         = 44,
-        MDS_DONE_WRITING = 45,
-        MDS_SET_INFO     = 46,
-        MDS_QUOTACHECK   = 47,
-        MDS_QUOTACTL     = 48,
-        MDS_GETXATTR     = 49,
-        MDS_SETXATTR     = 50,
-        MDS_LAST_OPC
-} mds_cmd_t;
-
-#define MDS_FIRST_OPC    MDS_GETATTR
-
-/*
- * Do not exceed 63
- */
-
-typedef enum {
-        REINT_SETATTR  = 1,
-        REINT_CREATE   = 2,
-        REINT_LINK     = 3,
-        REINT_UNLINK   = 4,
-        REINT_RENAME   = 5,
-        REINT_OPEN     = 6,
-//      REINT_CLOSE    = 7,
-//      REINT_WRITE    = 8,
-        REINT_MAX
-} mds_reint_t;
-
-/* the disposition of the intent outlines what was executed */
-#define DISP_IT_EXECD        0x00000001
-#define DISP_LOOKUP_EXECD    0x00000002
-#define DISP_LOOKUP_NEG      0x00000004
-#define DISP_LOOKUP_POS      0x00000008
-#define DISP_OPEN_CREATE     0x00000010
-#define DISP_OPEN_OPEN       0x00000020
-#define DISP_ENQ_COMPLETE    0x00400000
-#define DISP_ENQ_OPEN_REF    0x00800000
-#define DISP_ENQ_CREATE_REF  0x01000000
-#define DISP_OPEN_LOCK       0x02000000
-
-/* INODE LOCK PARTS */
-#define MDS_INODELOCK_LOOKUP 0x000001       /* dentry, mode, owner, group */
-#define MDS_INODELOCK_UPDATE 0x000002       /* size, links, timestamps */
-#define MDS_INODELOCK_OPEN   0x000004       /* For opened files */
-
-/* Do not forget to increase MDS_INODELOCK_MAXSHIFT when adding new bits */
-#define MDS_INODELOCK_MAXSHIFT 2
-/* This FULL lock is useful to take on unlink sort of operations */
-#define MDS_INODELOCK_FULL ((1<<(MDS_INODELOCK_MAXSHIFT+1))-1)
-
-struct ll_fid {
-        __u64 id;         /* holds object id */
-        __u32 generation; /* holds object generation */
-
-        __u32 f_type;     /* holds object type or stripe idx when passing it to
-                           * OST for saving into EA. */
-};
-
-extern void lustre_swab_ll_fid (struct ll_fid *fid);
-
-#define MDS_STATUS_CONN 1
-#define MDS_STATUS_LOV 2
-
-struct mds_status_req {
-        __u32  flags;
-        __u32  repbuf;
-};
-
-extern void lustre_swab_mds_status_req (struct mds_status_req *r);
-
-#define MDS_BFLAG_UNCOMMITTED_WRITES   0x1
-#define MDS_BFLAG_EXT_FLAGS     0x80000000 /* == EXT3_RESERVED_FL */
-
-/* these should be identical to their EXT3_*_FL counterparts, and are
- * redefined here only to avoid dragging in ext3_fs.h */
-#define MDS_SYNC_FL             0x00000008 /* Synchronous updates */
-#define MDS_IMMUTABLE_FL        0x00000010 /* Immutable file */
-#define MDS_APPEND_FL           0x00000020 /* writes to file may only append */
-#define MDS_NOATIME_FL          0x00000080 /* do not update atime */
-#define MDS_DIRSYNC_FL          0x00010000 /* dirsync behaviour (dir only) */
-
-#ifdef __KERNEL__
-/* If MDS_BFLAG_IOC_FLAGS is set it means we requested EXT3_*_FL inode flags
- * and we need to decode these into local S_* flags in the inode.  Otherwise
- * we pass flags straight through (see bug 9486). */
-static inline int ll_ext_to_inode_flags(int flags)
-{
-        return (flags & MDS_BFLAG_EXT_FLAGS) ?
-               (((flags & MDS_SYNC_FL)      ? S_SYNC      : 0) |
-                ((flags & MDS_NOATIME_FL)   ? S_NOATIME   : 0) |
-                ((flags & MDS_APPEND_FL)    ? S_APPEND    : 0) |
-#if defined(S_DIRSYNC)
-                ((flags & MDS_DIRSYNC_FL)   ? S_DIRSYNC   : 0) |
-#endif
-                ((flags & MDS_IMMUTABLE_FL) ? S_IMMUTABLE : 0)) :
-               (flags & ~MDS_BFLAG_EXT_FLAGS);
-}
-
-/* If keep is set, we do not do anything with iflags, if it is not set, we
- * assume that iflags are inode flags and we need to conver those to
- * EXT3_*_FL flags (see bug 9486 and 12848) */
-static inline int ll_inode_to_ext_flags(int iflags, int keep)
-{
-        return keep ? (iflags & ~MDS_BFLAG_EXT_FLAGS) :
-                (((iflags & S_SYNC)     ? MDS_SYNC_FL      : 0) |
-                ((iflags & S_NOATIME)   ? MDS_NOATIME_FL   : 0) |
-                ((iflags & S_APPEND)    ? MDS_APPEND_FL    : 0) |
-#if defined(S_DIRSYNC)
-                ((iflags & S_DIRSYNC)   ? MDS_DIRSYNC_FL   : 0) |
-#endif
-                ((iflags & S_IMMUTABLE) ? MDS_IMMUTABLE_FL : 0));
-}
-#endif
-
-struct mds_body {
-        struct ll_fid  fid1;
-        struct ll_fid  fid2;
-        struct lustre_handle handle;
-        __u64          valid;
-        __u64          size;   /* Offset, in the case of MDS_READPAGE */
-        __u64          mtime;
-        __u64          atime;
-        __u64          ctime;
-        __u64          blocks; /* XID, in the case of MDS_READPAGE */
-        __u64          io_epoch;
-        __u64          ino;
-        __u32          fsuid;
-        __u32          fsgid;
-        __u32          capability;
-        __u32          mode;
-        __u32          uid;
-        __u32          gid;
-        __u32          flags; /* from vfs for pin/unpin, MDS_BFLAG for close */
-        __u32          rdev;
-        __u32          nlink; /* #bytes to read in the case of MDS_READPAGE */
-        __u32          generation;
-        __u32          suppgid;
-        __u32          eadatasize;
-        __u32          aclsize;
-        __u32          max_mdsize;
-        __u32          max_cookiesize; /* also fix lustre_swab_mds_body */
-        __u32          padding_4; /* also fix lustre_swab_mds_body */
-};
-
-extern void lustre_swab_mds_body (struct mds_body *b);
-
-#define Q_QUOTACHECK    0x800100
-#define Q_INITQUOTA     0x800101        /* init slave limits */
-#define Q_GETOINFO      0x800102        /* get obd quota info */
-#define Q_GETOQUOTA     0x800103        /* get obd quotas */
-
-#define Q_TYPESET(oqc, type) \
-        ((oqc)->qc_type == type || (oqc)->qc_type == UGQUOTA)
-
-#define Q_GETOCMD(oqc) \
-        ((oqc)->qc_cmd == Q_GETOINFO || (oqc)->qc_cmd == Q_GETOQUOTA)
-
-struct obd_quotactl {
-        __u32                   qc_cmd;
-        __u32                   qc_type;
-        __u32                   qc_id;
-        __u32                   qc_stat;
-        struct obd_dqinfo       qc_dqinfo;
-        struct obd_dqblk        qc_dqblk;
-};
-
-extern void lustre_swab_obd_quotactl(struct obd_quotactl *q);
-
-struct quota_adjust_qunit {
-        __u32 qaq_flags;
-        __u32 qaq_id;
-        __u64 qaq_bunit_sz;
-        __u64 qaq_iunit_sz;
-        __u64 padding1;
-};
-extern void lustre_swab_quota_adjust_qunit(struct quota_adjust_qunit *q);
-
-/* flags in qunit_data and quota_adjust_qunit will use macroes below */
-#define LQUOTA_FLAGS_GRP       1UL   /* 0 is user, 1 is group */
-#define LQUOTA_FLAGS_BLK       2UL   /* 0 is inode, 1 is block */
-#define LQUOTA_FLAGS_ADJBLK    4UL   /* adjust the block qunit size */
-#define LQUOTA_FLAGS_ADJINO    8UL   /* adjust the inode qunit size */
-#define LQUOTA_FLAGS_CHG_QS   16UL   /* indicate whether it has capability of
-                                      * OBD_CONNECT_CHANGE_QS */
-
-/* the status of lqs_flags in struct lustre_qunit_size  */
-#define LQUOTA_QUNIT_FLAGS (LQUOTA_FLAGS_GRP | LQUOTA_FLAGS_BLK)
-
-#define QAQ_IS_GRP(qaq)    ((qaq)->qaq_flags & LQUOTA_FLAGS_GRP)
-#define QAQ_IS_ADJBLK(qaq) ((qaq)->qaq_flags & LQUOTA_FLAGS_ADJBLK)
-#define QAQ_IS_ADJINO(qaq) ((qaq)->qaq_flags & LQUOTA_FLAGS_ADJINO)
-
-#define QAQ_SET_GRP(qaq)    ((qaq)->qaq_flags |= LQUOTA_FLAGS_GRP)
-#define QAQ_SET_ADJBLK(qaq) ((qaq)->qaq_flags |= LQUOTA_FLAGS_ADJBLK)
-#define QAQ_SET_ADJINO(qaq) ((qaq)->qaq_flags |= LQUOTA_FLAGS_ADJINO)
-
-struct mds_rec_setattr {
-        __u32           sa_opcode;
-        __u32           sa_fsuid;
-        __u32           sa_fsgid;
-        __u32           sa_cap;
-        __u32           sa_suppgid;
-        __u32           sa_mode;
-        struct ll_fid   sa_fid;
-        __u64           sa_valid; /* MDS_ATTR_* attributes */
-        __u64           sa_size;
-        __u64           sa_mtime;
-        __u64           sa_atime;
-        __u64           sa_ctime;
-        __u32           sa_uid;
-        __u32           sa_gid;
-        __u32           sa_attr_flags;
-        __u32           sa_padding; /* also fix lustre_swab_mds_rec_setattr */
-};
-
-/*
- * Attribute flags used in mds_rec_setattr::sa_valid.
- * The kernel's #defines for ATTR_* should not be used over the network
- * since the client and MDS may run different kernels (see bug 13828)
- * Therefore, we should only use MDS_ATTR_* attributes for sa_valid.
- */
-#define MDS_ATTR_MODE          0x1ULL /* = 1 */
-#define MDS_ATTR_UID           0x2ULL /* = 2 */
-#define MDS_ATTR_GID           0x4ULL /* = 4 */
-#define MDS_ATTR_SIZE          0x8ULL /* = 8 */
-#define MDS_ATTR_ATIME        0x10ULL /* = 16 */
-#define MDS_ATTR_MTIME        0x20ULL /* = 32 */
-#define MDS_ATTR_CTIME        0x40ULL /* = 64 */
-#define MDS_ATTR_ATIME_SET    0x80ULL /* = 128 */
-#define MDS_ATTR_MTIME_SET   0x100ULL /* = 256 */
-#define MDS_ATTR_FORCE       0x200ULL /* = 512, Not a change, but a change it */
-#define MDS_ATTR_ATTR_FLAG   0x400ULL /* = 1024 */
-#define MDS_ATTR_KILL_SUID   0x800ULL /* = 2048 */
-#define MDS_ATTR_KILL_SGID  0x1000ULL /* = 4096 */
-#define MDS_ATTR_CTIME_SET  0x2000ULL /* = 8192 */
-#define MDS_ATTR_FROM_OPEN  0x4000ULL /* = 16384, called from open path, ie O_TRUNC */
-
-extern void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa);
-
-#ifndef FMODE_READ
-#define FMODE_READ               00000001
-#define FMODE_WRITE              00000002
-#endif
-#define MDS_FMODE_EXEC           00000004
-#define MDS_OPEN_CREAT           00000100
-#define MDS_OPEN_EXCL            00000200
-#define MDS_OPEN_TRUNC           00001000
-#define MDS_OPEN_APPEND          00002000
-#define MDS_OPEN_SYNC            00010000
-#define MDS_OPEN_DIRECTORY       00200000
-
-#define MDS_OPEN_DELAY_CREATE  0100000000 /* delay initial object create */
-#define MDS_OPEN_OWNEROVERRIDE 0200000000 /* NFSD rw-reopen ro file for owner */
-#define MDS_OPEN_JOIN_FILE     0400000000 /* open for join file*/
-#define MDS_OPEN_LOCK         04000000000 /* This open requires open lock */
-#define MDS_OPEN_HAS_EA      010000000000 /* specify object create pattern */
-#define MDS_OPEN_HAS_OBJS    020000000000 /* Just set the EA the obj exist */
-
-struct mds_rec_create {
-        __u32           cr_opcode;
-        __u32           cr_fsuid;
-        __u32           cr_fsgid;
-        __u32           cr_cap;
-        __u32           cr_flags; /* for use with open */
-        __u32           cr_mode;
-        struct ll_fid   cr_fid;
-        struct ll_fid   cr_replayfid;
-        __u64           cr_time;
-        __u64           cr_rdev;
-        __u32           cr_suppgid;
-        __u32           cr_padding_1; /* also fix lustre_swab_mds_rec_create */
-        __u32           cr_padding_2; /* also fix lustre_swab_mds_rec_create */
-        __u32           cr_padding_3; /* also fix lustre_swab_mds_rec_create */
-        __u32           cr_padding_4; /* also fix lustre_swab_mds_rec_create */
-        __u32           cr_padding_5; /* also fix lustre_swab_mds_rec_create */
-};
-
-extern void lustre_swab_mds_rec_create (struct mds_rec_create *cr);
-
-struct mds_rec_join {
-        struct ll_fid  jr_fid;
-        __u64          jr_headsize;
-};
-
-extern void lustre_swab_mds_rec_join (struct mds_rec_join *jr);
-
-struct mds_rec_link {
-        __u32           lk_opcode;
-        __u32           lk_fsuid;
-        __u32           lk_fsgid;
-        __u32           lk_cap;
-        __u32           lk_suppgid1;
-        __u32           lk_suppgid2;
-        struct ll_fid   lk_fid1;
-        struct ll_fid   lk_fid2;
-        __u64           lk_time;
-        __u32           lk_padding_1;  /* also fix lustre_swab_mds_rec_link */
-        __u32           lk_padding_2;  /* also fix lustre_swab_mds_rec_link */
-        __u32           lk_padding_3;  /* also fix lustre_swab_mds_rec_link */
-        __u32           lk_padding_4;  /* also fix lustre_swab_mds_rec_link */
-};
-
-extern void lustre_swab_mds_rec_link (struct mds_rec_link *lk);
-
-struct mds_rec_unlink {
-        __u32           ul_opcode;
-        __u32           ul_fsuid;
-        __u32           ul_fsgid;
-        __u32           ul_cap;
-        __u32           ul_suppgid;
-        __u32           ul_mode;
-        struct ll_fid   ul_fid1;
-        struct ll_fid   ul_fid2;
-        __u64           ul_time;
-        __u32           ul_padding_1; /* also fix lustre_swab_mds_rec_unlink */
-        __u32           ul_padding_2; /* also fix lustre_swab_mds_rec_unlink */
-        __u32           ul_padding_3; /* also fix lustre_swab_mds_rec_unlink */
-        __u32           ul_padding_4; /* also fix lustre_swab_mds_rec_unlink */
-};
-
-extern void lustre_swab_mds_rec_unlink (struct mds_rec_unlink *ul);
-
-struct mds_rec_rename {
-        __u32           rn_opcode;
-        __u32           rn_fsuid;
-        __u32           rn_fsgid;
-        __u32           rn_cap;
-        __u32           rn_suppgid1;
-        __u32           rn_suppgid2;
-        struct ll_fid   rn_fid1;
-        struct ll_fid   rn_fid2;
-        __u64           rn_time;
-        __u32           rn_padding_1; /* also fix lustre_swab_mds_rec_rename */
-        __u32           rn_padding_2; /* also fix lustre_swab_mds_rec_rename */
-        __u32           rn_padding_3; /* also fix lustre_swab_mds_rec_rename */
-        __u32           rn_padding_4; /* also fix lustre_swab_mds_rec_rename */
-};
-
-extern void lustre_swab_mds_rec_rename (struct mds_rec_rename *rn);
-
-/*
- *  LOV data structures
- */
-
-#define LOV_MIN_STRIPE_SIZE 65536   /* maximum PAGE_SIZE (ia64), power of 2 */
-#define LOV_MAX_STRIPE_COUNT  160   /* until bug 4424 is fixed */
-#define LOV_V1_INSANE_STRIPE_COUNT 65532 /* maximum stripe count bz13933 */
-
-#define LOV_MAX_UUID_BUFFER_SIZE  8192
-/* The size of the buffer the lov/mdc reserves for the
- * array of UUIDs returned by the MDS.  With the current
- * protocol, this will limit the max number of OSTs per LOV */
-
-#define LOV_DESC_MAGIC 0xB0CCDE5C
-
-/* LOV settings descriptor (should only contain static info) */
-struct lov_desc {
-        __u32 ld_tgt_count;                /* how many OBD's */
-        __u32 ld_active_tgt_count;         /* how many active */
-        __u32 ld_default_stripe_count;     /* how many objects are used */
-        __u32 ld_pattern;                  /* default PATTERN_RAID0 */
-        __u64 ld_default_stripe_size;      /* in bytes */
-        __u64 ld_default_stripe_offset;    /* in bytes */
-        __u32 ld_padding_0;                /* unused */
-        __u32 ld_qos_maxage;               /* in second */
-        __u32 ld_padding_1;                /* also fix lustre_swab_lov_desc */
-        __u32 ld_padding_2;                /* also fix lustre_swab_lov_desc */
-        struct obd_uuid ld_uuid;
-};
-
-#define ld_magic ld_active_tgt_count       /* for swabbing from llogs */
-
-extern void lustre_swab_lov_desc (struct lov_desc *ld);
-
-/*
- *   LDLM requests:
- */
-/* opcodes -- MUST be distinct from OST/MDS opcodes */
-typedef enum {
-        LDLM_ENQUEUE     = 101,
-        LDLM_CONVERT     = 102,
-        LDLM_CANCEL      = 103,
-        LDLM_BL_CALLBACK = 104,
-        LDLM_CP_CALLBACK = 105,
-        LDLM_GL_CALLBACK = 106,
-        LDLM_LAST_OPC
-} ldlm_cmd_t;
-#define LDLM_FIRST_OPC LDLM_ENQUEUE
-
-#define RES_NAME_SIZE 4
-struct ldlm_res_id {
-        __u64 name[RES_NAME_SIZE];
-};
-
-extern void lustre_swab_ldlm_res_id (struct ldlm_res_id *id);
-
-/* lock types */
-typedef enum {
-        LCK_MINMODE = 0,
-        LCK_EX = 1,
-        LCK_PW = 2,
-        LCK_PR = 4,
-        LCK_CW = 8,
-        LCK_CR = 16,
-        LCK_NL = 32,
-        LCK_GROUP = 64,
-        LCK_MAXMODE
-} ldlm_mode_t;
-
-#define LCK_MODE_NUM    7
-
-typedef enum {
-        LDLM_PLAIN     = 10,
-        LDLM_EXTENT    = 11,
-        LDLM_FLOCK     = 12,
-        LDLM_IBITS     = 13,
-        LDLM_MAX_TYPE
-} ldlm_type_t;
-
-#define LDLM_MIN_TYPE LDLM_PLAIN
-
-struct ldlm_extent {
-        __u64 start;
-        __u64 end;
-        __u64 gid;
-};
-
-static inline int ldlm_extent_overlap(struct ldlm_extent *ex1,
-                                      struct ldlm_extent *ex2)
-{
-        return (ex1->start <= ex2->end) && (ex2->start <= ex1->end);
-}
-
-struct ldlm_inodebits {
-        __u64 bits;
-};
-
-struct ldlm_flock {
-        __u64 start;
-        __u64 end;
-        __u64 blocking_export;  /* not actually used over the wire */
-        __u32 blocking_pid;     /* not actually used over the wire */
-        __u32 pid;
-};
-
-/* it's important that the fields of the ldlm_extent structure match
- * the first fields of the ldlm_flock structure because there is only
- * one ldlm_swab routine to process the ldlm_policy_data_t union. if
- * this ever changes we will need to swab the union differently based
- * on the resource type. */
-
-typedef union {
-        struct ldlm_extent l_extent;
-        struct ldlm_flock  l_flock;
-        struct ldlm_inodebits l_inodebits;
-} ldlm_policy_data_t;
-
-extern void lustre_swab_ldlm_policy_data (ldlm_policy_data_t *d);
-
-struct ldlm_intent {
-        __u64 opc;
-};
-
-extern void lustre_swab_ldlm_intent (struct ldlm_intent *i);
-
-struct ldlm_resource_desc {
-        ldlm_type_t lr_type;
-        __u32 lr_padding;       /* also fix lustre_swab_ldlm_resource_desc */
-        struct ldlm_res_id lr_name;
-};
-
-extern void lustre_swab_ldlm_resource_desc (struct ldlm_resource_desc *r);
-
-struct ldlm_lock_desc {
-        struct ldlm_resource_desc l_resource;
-        ldlm_mode_t l_req_mode;
-        ldlm_mode_t l_granted_mode;
-        ldlm_policy_data_t l_policy_data;
-};
-
-extern void lustre_swab_ldlm_lock_desc (struct ldlm_lock_desc *l);
-
-#define LDLM_LOCKREQ_HANDLES 2
-#define LDLM_ENQUEUE_CANCEL_OFF 1
-
-struct ldlm_request {
-        __u32 lock_flags;
-        __u32 lock_count;
-        struct ldlm_lock_desc lock_desc;
-        struct lustre_handle lock_handle[LDLM_LOCKREQ_HANDLES];
-};
-
-/* If LDLM_ENQUEUE, 1 slot is already occupied, 1 is available.
- * Otherwise, 2 are available. */
-#define ldlm_request_bufsize(count,type)                                \
-({                                                                      \
-        int _avail = LDLM_LOCKREQ_HANDLES;                              \
-        _avail -= (type == LDLM_ENQUEUE ? LDLM_ENQUEUE_CANCEL_OFF : 0); \
-        sizeof(struct ldlm_request) +                                   \
-        (count - _avail > 0 ? count - _avail : 0) *                     \
-        sizeof(struct lustre_handle);                                   \
-})
-
-extern void lustre_swab_ldlm_request (struct ldlm_request *rq);
-
-struct ldlm_reply {
-        __u32 lock_flags;
-        __u32 lock_padding;     /* also fix lustre_swab_ldlm_reply */
-        struct ldlm_lock_desc lock_desc;
-        struct lustre_handle lock_handle;
-        __u64  lock_policy_res1;
-        __u64  lock_policy_res2;
-};
-
-extern void lustre_swab_ldlm_reply (struct ldlm_reply *r);
-
-
-/*
- * Opcodes for mountconf (mgs and mgc)
- */
-typedef enum {
-        MGS_CONNECT = 250,
-        MGS_DISCONNECT,
-        MGS_EXCEPTION,         /* node died, etc. */
-        MGS_TARGET_REG,        /* whenever target starts up */
-        MGS_TARGET_DEL,
-        MGS_SET_INFO,
-        MGS_LAST_OPC
-} mgs_cmd_t;
-#define MGS_FIRST_OPC MGS_CONNECT
-
-#define MGS_PARAM_MAXLEN 1024
-#define KEY_SET_INFO "set_info"
-
-struct mgs_send_param {
-        char             mgs_param[MGS_PARAM_MAXLEN];
-};
-
-/* We pass this info to the MGS so it can write config logs */
-#define MTI_NAME_MAXLEN 64
-#define MTI_PARAM_MAXLEN 4096
-#define MTI_NIDS_MAX 32
-struct mgs_target_info {
-        __u32            mti_lustre_ver;
-        __u32            mti_stripe_index;
-        __u32            mti_config_ver;
-        __u32            mti_flags;
-        __u32            mti_nid_count;
-        __u32            padding;                    /* 64 bit align */
-        char             mti_fsname[MTI_NAME_MAXLEN];
-        char             mti_svname[MTI_NAME_MAXLEN];
-        char             mti_uuid[sizeof(struct obd_uuid)];
-        __u64            mti_nids[MTI_NIDS_MAX];     /* host nids (lnet_nid_t)*/
-        char             mti_params[MTI_PARAM_MAXLEN];
-};
-
-extern void lustre_swab_mgs_target_info(struct mgs_target_info *oinfo);
-
-/* Config marker flags (in config log) */
-#define CM_START       0x01
-#define CM_END         0x02
-#define CM_SKIP        0x04
-#define CM_UPGRADE146  0x08
-#define CM_EXCLUDE     0x10
-#define CM_START_SKIP (CM_START | CM_SKIP)
-
-struct cfg_marker {
-        __u32             cm_step;       /* aka config version */
-        __u32             cm_flags;
-        __u32             cm_vers;       /* lustre release version number */
-        __u32             padding;       /* 64 bit align */
-        time_t            cm_createtime; /*when this record was first created */
-        time_t            cm_canceltime; /*when this record is no longer valid*/
-        char              cm_tgtname[MTI_NAME_MAXLEN];
-        char              cm_comment[MTI_NAME_MAXLEN];
-};
-
-/*
- * Opcodes for multiple servers.
- */
-
-typedef enum {
-        OBD_PING = 400,
-        OBD_LOG_CANCEL,
-        OBD_QC_CALLBACK,
-        OBD_LAST_OPC
-} obd_cmd_t;
-#define OBD_FIRST_OPC OBD_PING
-
-/* catalog of log objects */
-
-/* Identifier for a single log object */
-struct llog_logid {
-        __u64                   lgl_oid;
-        __u64                   lgl_ogr;
-        __u32                   lgl_ogen;
-} __attribute__((packed));
-
-/* Records written to the CATALOGS list */
-#define CATLIST "CATALOGS"
-struct llog_catid {
-        struct llog_logid       lci_logid;
-        __u32                   lci_padding1;
-        __u32                   lci_padding2;
-        __u32                   lci_padding3;
-} __attribute__((packed));
-
-/*join file lov mds md*/
-struct lov_mds_md_join {
-        struct lov_mds_md lmmj_md;
-        /*join private info*/
-        struct llog_logid lmmj_array_id; /*array object id*/
-        __u32  lmmj_extent_count;        /*array extent count*/
-};
-
-/* Log data record types - there is no specific reason that these need to
- * be related to the RPC opcodes, but no reason not to (may be handy later?)
- */
-#define LLOG_OP_MAGIC 0x10600000
-#define LLOG_OP_MASK  0xfff00000
-
-typedef enum {
-        LLOG_PAD_MAGIC   = LLOG_OP_MAGIC | 0x00000,
-        OST_SZ_REC       = LLOG_OP_MAGIC | 0x00f00,
-        OST_RAID1_REC    = LLOG_OP_MAGIC | 0x01000,
-        MDS_UNLINK_REC   = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_UNLINK,
-        MDS_SETATTR_REC  = LLOG_OP_MAGIC | 0x10000 | (MDS_REINT << 8) | REINT_SETATTR,
-        OBD_CFG_REC      = LLOG_OP_MAGIC | 0x20000,
-        PTL_CFG_REC      = LLOG_OP_MAGIC | 0x30000, /* obsolete */
-        LLOG_GEN_REC     = LLOG_OP_MAGIC | 0x40000,
-        LLOG_JOIN_REC    = LLOG_OP_MAGIC | 0x50000,
-        LLOG_HDR_MAGIC   = LLOG_OP_MAGIC | 0x45539,
-        LLOG_LOGID_MAGIC = LLOG_OP_MAGIC | 0x4553b,
-} llog_op_type;
-
-/*
- * for now, continue to support old pad records which have 0 for their
- * type but still need to be swabbed for their length
- */
-#define LLOG_REC_HDR_NEEDS_SWABBING(r)                                  \
-        (((r)->lrh_type & __swab32(LLOG_OP_MASK)) ==                    \
-         __swab32(LLOG_OP_MAGIC) ||                                     \
-         (((r)->lrh_type == 0) && ((r)->lrh_len > LLOG_CHUNK_SIZE)))
-
-/* Log record header - stored in little endian order.
- * Each record must start with this struct, end with a llog_rec_tail,
- * and be a multiple of 256 bits in size.
- */
-struct llog_rec_hdr {
-        __u32                   lrh_len;
-        __u32                   lrh_index;
-        __u32                   lrh_type;
-        __u32                   padding;
-};
-
-struct llog_rec_tail {
-        __u32 lrt_len;
-        __u32 lrt_index;
-};
-
-struct llog_logid_rec {
-        struct llog_rec_hdr     lid_hdr;
-        struct llog_logid       lid_id;
-        __u32                   padding1;
-        __u32                   padding2;
-        __u32                   padding3;
-        __u32                   padding4;
-        __u32                   padding5;
-        struct llog_rec_tail    lid_tail;
-} __attribute__((packed));
-
-/* MDS extent description
- * It is for joined file extent info, each extent info for joined file
- * just like (start, end, lmm).
- */
-struct mds_extent_desc {
-        __u64                   med_start; /* extent start */
-        __u64                   med_len;   /* extent length */
-        struct lov_mds_md       med_lmm;   /* extent's lmm  */
-};
-/*Joined file array extent log record*/
-struct llog_array_rec {
-        struct llog_rec_hdr     lmr_hdr;
-        struct mds_extent_desc  lmr_med;
-        struct llog_rec_tail    lmr_tail;
-};
-
-struct llog_create_rec {
-        struct llog_rec_hdr     lcr_hdr;
-        struct ll_fid           lcr_fid;
-        obd_id                  lcr_oid;
-        obd_count               lcr_ogen;
-        __u32                   padding;
-        struct llog_rec_tail    lcr_tail;
-} __attribute__((packed));
-
-struct llog_orphan_rec {
-        struct llog_rec_hdr     lor_hdr;
-        obd_id                  lor_oid;
-        obd_count               lor_ogen;
-        __u32                   padding;
-        struct llog_rec_tail    lor_tail;
-} __attribute__((packed));
-
-struct llog_unlink_rec {
-        struct llog_rec_hdr     lur_hdr;
-        obd_id                  lur_oid;
-        obd_count               lur_ogen;
-        __u32                   padding;
-        struct llog_rec_tail    lur_tail;
-} __attribute__((packed));
-
-struct llog_setattr_rec {
-        struct llog_rec_hdr     lsr_hdr;
-        obd_id                  lsr_oid;
-        obd_count               lsr_ogen;
-        __u32                   lsr_uid;
-        __u32                   lsr_gid;
-        __u32                   padding;
-        struct llog_rec_tail    lsr_tail;
-} __attribute__((packed));
-
-struct llog_size_change_rec {
-        struct llog_rec_hdr     lsc_hdr;
-        struct ll_fid           lsc_fid;
-        __u32                   lsc_io_epoch;
-        __u32                   padding;
-        struct llog_rec_tail    lsc_tail;
-} __attribute__((packed));
-
-struct llog_gen {
-        __u64 mnt_cnt;
-        __u64 conn_cnt;
-} __attribute__((packed));
-
-struct llog_gen_rec {
-        struct llog_rec_hdr     lgr_hdr;
-        struct llog_gen         lgr_gen;
-        struct llog_rec_tail    lgr_tail;
-};
-/* On-disk header structure of each log object, stored in little endian order */
-#define LLOG_CHUNK_SIZE         8192
-#define LLOG_HEADER_SIZE        (96)
-#define LLOG_BITMAP_BYTES       (LLOG_CHUNK_SIZE - LLOG_HEADER_SIZE)
-
-#define LLOG_MIN_REC_SIZE       (24) /* round(llog_rec_hdr + llog_rec_tail) */
-
-/* flags for the logs */
-#define LLOG_F_ZAP_WHEN_EMPTY   0x1
-#define LLOG_F_IS_CAT           0x2
-#define LLOG_F_IS_PLAIN         0x4
-
-struct llog_log_hdr {
-        struct llog_rec_hdr     llh_hdr;
-        __u64                   llh_timestamp;
-        __u32                   llh_count;
-        __u32                   llh_bitmap_offset;
-        __u32                   llh_size;
-        __u32                   llh_flags;
-        __u32                   llh_cat_idx;
-        /* for a catalog the first plain slot is next to it */
-        struct obd_uuid         llh_tgtuuid;
-        __u32                   llh_reserved[LLOG_HEADER_SIZE/sizeof(__u32) - 23];
-        __u32                   llh_bitmap[LLOG_BITMAP_BYTES/sizeof(__u32)];
-        struct llog_rec_tail    llh_tail;
-} __attribute__((packed));
-
-#define LLOG_BITMAP_SIZE(llh)  ((llh->llh_hdr.lrh_len -         \
-                                 llh->llh_bitmap_offset -       \
-                                 sizeof(llh->llh_tail)) * 8)
-
-/* log cookies are used to reference a specific log file and a record therein */
-struct llog_cookie {
-        struct llog_logid       lgc_lgl;
-        __u32                   lgc_subsys;
-        __u32                   lgc_index;
-        __u32                   lgc_padding;
-} __attribute__((packed));
-
-/* llog protocol */
-typedef enum {
-        LLOG_ORIGIN_HANDLE_CREATE       = 501,
-        LLOG_ORIGIN_HANDLE_NEXT_BLOCK   = 502,
-        LLOG_ORIGIN_HANDLE_READ_HEADER  = 503,
-        LLOG_ORIGIN_HANDLE_WRITE_REC    = 504,
-        LLOG_ORIGIN_HANDLE_CLOSE        = 505,
-        LLOG_ORIGIN_CONNECT             = 506,
-        LLOG_CATINFO                    = 507,  /* for lfs catinfo */
-        LLOG_ORIGIN_HANDLE_PREV_BLOCK   = 508,
-        LLOG_ORIGIN_HANDLE_DESTROY      = 509,  /* for destroy llog object*/
-        LLOG_LAST_OPC
-} llog_cmd_t;
-#define LLOG_FIRST_OPC LLOG_ORIGIN_HANDLE_CREATE
-
-struct llogd_body {
-        struct llog_logid  lgd_logid;
-        __u32 lgd_ctxt_idx;
-        __u32 lgd_llh_flags;
-        __u32 lgd_index;
-        __u32 lgd_saved_index;
-        __u32 lgd_len;
-        __u64 lgd_cur_offset;
-} __attribute__((packed));
-
-struct llogd_conn_body {
-        struct llog_gen         lgdc_gen;
-        struct llog_logid       lgdc_logid;
-        __u32                   lgdc_ctxt_idx;
-} __attribute__((packed));
-
-struct lov_user_ost_data_join {   /* per-stripe data structure */
-        __u64 l_extent_start;     /* extent start*/
-        __u64 l_extent_end;       /* extent end*/
-        __u64 l_object_id;        /* OST object ID */
-        __u64 l_object_gr;        /* OST object group (creating MDS number) */
-        __u32 l_ost_gen;          /* generation of this OST index */
-        __u32 l_ost_idx;          /* OST index in LOV */
-} __attribute__((packed));
-
-struct lov_user_md_join {         /* LOV EA user data (host-endian) */
-        __u32 lmm_magic;          /* magic number = LOV_MAGIC_JOIN */
-        __u32 lmm_pattern;        /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
-        __u64 lmm_object_id;      /* LOV object ID */
-        __u64 lmm_object_gr;      /* LOV object group */
-        __u32 lmm_stripe_size;    /* size of stripe in bytes */
-        __u32 lmm_stripe_count;   /* num stripes in use for this object */
-        __u32 lmm_extent_count;   /* extent count of lmm*/
-        __u64 lmm_tree_id;        /* mds tree object id */
-        __u64 lmm_tree_gen;       /* mds tree object gen */
-        struct llog_logid lmm_array_id; /* mds extent desc llog object id */
-        struct lov_user_ost_data_join lmm_objects[0]; /* per-stripe data */
-} __attribute__((packed));
-
-extern void lustre_swab_lov_user_md(struct lov_user_md *lum);
-extern void lustre_swab_lov_user_md_objects(struct lov_user_md *lum);
-extern void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj);
-
-/* llog_swab.c */
-extern void lustre_swab_llogd_body (struct llogd_body *d);
-extern void lustre_swab_llog_hdr (struct llog_log_hdr *h);
-extern void lustre_swab_llogd_conn_body (struct llogd_conn_body *d);
-extern void lustre_swab_llog_rec(struct llog_rec_hdr  *rec,
-                                 struct llog_rec_tail *tail);
-
-struct lustre_cfg;
-extern void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg);
-
-/* this will be used when OBD_CONNECT_CHANGE_QS is set */
-struct qunit_data {
-        __u32 qd_id;    /* ID appiles to (uid, gid) */
-        __u32 qd_flags; /* LQUOTA_FLAGS_* affect the responding bits */
-        __u64 qd_count; /* acquire/release count (bytes for block quota) */
-        __u64 qd_qunit; /* when a master returns the reply to a slave, it will
-                         * contain the current corresponding qunit size */
-        __u64 padding;
-};
-
-#define QDATA_IS_GRP(qdata)    ((qdata)->qd_flags & LQUOTA_FLAGS_GRP)
-#define QDATA_IS_BLK(qdata)    ((qdata)->qd_flags & LQUOTA_FLAGS_BLK)
-#define QDATA_IS_ADJBLK(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_ADJBLK)
-#define QDATA_IS_ADJINO(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_ADJINO)
-#define QDATA_IS_CHANGE_QS(qdata) ((qdata)->qd_flags & LQUOTA_FLAGS_CHG_QS)
-
-#define QDATA_SET_GRP(qdata)    ((qdata)->qd_flags |= LQUOTA_FLAGS_GRP)
-#define QDATA_SET_BLK(qdata)    ((qdata)->qd_flags |= LQUOTA_FLAGS_BLK)
-#define QDATA_SET_ADJBLK(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_ADJBLK)
-#define QDATA_SET_ADJINO(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_ADJINO)
-#define QDATA_SET_CHANGE_QS(qdata) ((qdata)->qd_flags |= LQUOTA_FLAGS_CHG_QS)
-
-#define QDATA_CLR_GRP(qdata)        ((qdata)->qd_flags &= ~LQUOTA_FLAGS_GRP)
-#define QDATA_CLR_CHANGE_QS(qdata)  ((qdata)->qd_flags &= ~LQUOTA_FLAGS_CHG_QS)
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-/* this will be used when OBD_CONNECT_QUOTA64 is set */
-struct qunit_data_old2 {
-        __u32 qd_id; /* ID appiles to (uid, gid) */
-        __u32 qd_flags; /* Quota type (USRQUOTA, GRPQUOTA) occupy one bit;
-                         * Block quota or file quota occupy one bit */
-        __u64 qd_count; /* acquire/release count (bytes for block quota) */
-};
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-struct qunit_data_old {
-        __u32 qd_id;    /* ID appiles to (uid, gid) */
-        __u32 qd_type;  /* Quota type (USRQUOTA, GRPQUOTA) */
-        __u32 qd_count; /* acquire/release count (bytes for block quota) */
-        __u32 qd_isblk; /* Block quota or file quota */
-};
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-extern void lustre_swab_qdata(struct qunit_data *d);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-extern void lustre_swab_qdata_old(struct qunit_data_old *d);
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-extern void lustre_swab_qdata_old2(struct qunit_data_old2 *d);
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-extern int quota_get_qdata(void*req, struct qunit_data *qdata,
-                           int is_req, int is_exp);
-extern int quota_copy_qdata(void *request, struct qunit_data *qdata,
-                            int is_req, int is_exp);
-
-typedef enum {
-        QUOTA_DQACQ     = 601,
-        QUOTA_DQREL     = 602,
-} quota_cmd_t;
-
-#define JOIN_FILE_ALIGN 4096
-
-#define QUOTA_REQUEST   1
-#define QUOTA_REPLY     0
-#define QUOTA_EXPORT    1
-#define QUOTA_IMPORT    0
-
-/* quota check function */
-#define QUOTA_RET_OK           0 /* return successfully */
-#define QUOTA_RET_NOQUOTA      1 /* not support quota */
-#define QUOTA_RET_NOLIMIT      2 /* quota limit isn't set */
-#define QUOTA_RET_ACQUOTA      4 /* need to acquire extra quota */
-#define QUOTA_RET_INC_PENDING  8 /* pending value is increased */
-
-extern int quota_get_qunit_data_size(__u64 flag);
-#endif
diff --git a/lustre/include/lustre/lustre_user.h b/lustre/include/lustre/lustre_user.h
deleted file mode 100644
index 354127c0e5ffc756a1b27611f10dd878fe8df7a1..0000000000000000000000000000000000000000
--- a/lustre/include/lustre/lustre_user.h
+++ /dev/null
@@ -1,266 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * Lustre public user-space interface definitions.
- */
-
-#ifndef _LUSTRE_USER_H
-#define _LUSTRE_USER_H
-
-#if defined(__linux__)
-#include <linux/lustre_user.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_user.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_user.h>
-#else
-#error Unsupported operating system.
-#endif
-
-/* for statfs() */
-#define LL_SUPER_MAGIC 0x0BD00BD0
-
-#ifndef EXT3_IOC_GETFLAGS
-#define EXT3_IOC_GETFLAGS               _IOR('f', 1, long)
-#define EXT3_IOC_SETFLAGS               _IOW('f', 2, long)
-#define EXT3_IOC_GETVERSION             _IOR('f', 3, long)
-#define EXT3_IOC_SETVERSION             _IOW('f', 4, long)
-#define EXT3_IOC_GETVERSION_OLD         _IOR('v', 1, long)
-#define EXT3_IOC_SETVERSION_OLD         _IOW('v', 2, long)
-#endif
-
-struct obd_statfs;
-
-/* 
- * The ioctl naming rules:
- * LL_*     - works on the currently opened filehandle instead of parent dir
- * *_OBD_*  - gets data for both OSC or MDC (LOV, LMV indirectly)
- * *_MDC_*  - gets/sets data related to MDC
- * *_LOV_*  - gets/sets data related to OSC/LOV
- * *FILE*   - called on parent dir and passes in a filename
- * *STRIPE* - set/get lov_user_md
- * *INFO    - set/get lov_user_mds_data
- */
-#define LL_IOC_GETFLAGS                 _IOR ('f', 151, long)
-#define LL_IOC_SETFLAGS                 _IOW ('f', 152, long)
-#define LL_IOC_CLRFLAGS                 _IOW ('f', 153, long)
-#define LL_IOC_LOV_SETSTRIPE            _IOW ('f', 154, long)
-#define LL_IOC_LOV_GETSTRIPE            _IOW ('f', 155, long)
-#define LL_IOC_LOV_SETEA                _IOW ('f', 156, long)
-#define LL_IOC_RECREATE_OBJ             _IOW ('f', 157, long)
-#define LL_IOC_GROUP_LOCK               _IOW ('f', 158, long)
-#define LL_IOC_GROUP_UNLOCK             _IOW ('f', 159, long)
-#define LL_IOC_QUOTACHECK               _IOW ('f', 160, int)
-#define LL_IOC_POLL_QUOTACHECK          _IOR ('f', 161, struct if_quotacheck *)
-#define LL_IOC_QUOTACTL                 _IOWR('f', 162, struct if_quotactl *)
-#define LL_IOC_JOIN                     _IOW ('f', 163, long)
-#define IOC_OBD_STATFS                  _IOWR('f', 164, struct obd_statfs *)
-#define IOC_LOV_GETINFO                 _IOWR('f', 165, struct lov_user_mds_data *)
-
-#define LL_IOC_LLOOP_ATTACH             _IOWR('f', 166, OBD_IOC_DATA_TYPE)
-#define LL_IOC_LLOOP_DETACH             _IOWR('f', 167, OBD_IOC_DATA_TYPE)
-#define LL_IOC_LLOOP_INFO               _IOWR('f', 168, OBD_IOC_DATA_TYPE)
-#define LL_IOC_LLOOP_DETACH_BYDEV       _IOWR('f', 169, OBD_IOC_DATA_TYPE)
-
-#define LL_STATFS_MDC           1
-#define LL_STATFS_LOV           2
-
-#define IOC_MDC_TYPE            'i'
-#define IOC_MDC_LOOKUP          _IOWR(IOC_MDC_TYPE, 20, struct obd_device *)
-#define IOC_MDC_GETFILESTRIPE   _IOWR(IOC_MDC_TYPE, 21, struct lov_user_md *)
-#define IOC_MDC_GETFILEINFO     _IOWR(IOC_MDC_TYPE, 22, struct lov_user_mds_data *)
-#define LL_IOC_MDC_GETINFO      _IOWR(IOC_MDC_TYPE, 23, struct lov_user_mds_data *)
-
-/* Keep these for backward compartability. */
-#define LL_IOC_OBD_STATFS       IOC_OBD_STATFS
-#define IOC_MDC_GETSTRIPE       IOC_MDC_GETFILESTRIPE
-
-#define O_LOV_DELAY_CREATE 0100000000  /* hopefully this does not conflict */
-#define O_JOIN_FILE        0400000000  /* hopefully this does not conflict */
-
-#define LL_FILE_IGNORE_LOCK             0x00000001
-#define LL_FILE_GROUP_LOCKED            0x00000002
-#define LL_FILE_READAHEAD               0x00000004
-
-#define LOV_USER_MAGIC_V1 0x0BD10BD0
-#define LOV_USER_MAGIC    LOV_USER_MAGIC_V1
-
-#define LOV_USER_MAGIC_JOIN 0x0BD20BD0
-
-#define LOV_PATTERN_RAID0 0x001
-#define LOV_PATTERN_RAID1 0x002
-#define LOV_PATTERN_FIRST 0x100
-
-#define lov_user_ost_data lov_user_ost_data_v1
-struct lov_user_ost_data_v1 {     /* per-stripe data structure */
-        __u64 l_object_id;        /* OST object ID */
-        __u64 l_object_gr;        /* OST object group (creating MDS number) */
-        __u32 l_ost_gen;          /* generation of this OST index */
-        __u32 l_ost_idx;          /* OST index in LOV */
-} __attribute__((packed));
-
-#define lov_user_md lov_user_md_v1
-struct lov_user_md_v1 {           /* LOV EA user data (host-endian) */
-        __u32 lmm_magic;          /* magic number = LOV_USER_MAGIC_V1 */
-        __u32 lmm_pattern;        /* LOV_PATTERN_RAID0, LOV_PATTERN_RAID1 */
-        __u64 lmm_object_id;      /* LOV object ID */
-        __u64 lmm_object_gr;      /* LOV object group */
-        __u32 lmm_stripe_size;    /* size of stripe in bytes */
-        __u16 lmm_stripe_count;   /* num stripes in use for this object */
-        __u16 lmm_stripe_offset;  /* starting stripe offset in lmm_objects */
-        struct lov_user_ost_data_v1 lmm_objects[0]; /* per-stripe data */
-} __attribute__((packed));
-
-/* Compile with -D_LARGEFILE64_SOURCE or -D_GNU_SOURCE (or #define) to
- * use this.  It is unsafe to #define those values in this header as it
- * is possible the application has already #included <sys/stat.h>. */
-#ifdef HAVE_LOV_USER_MDS_DATA
-#define lov_user_mds_data lov_user_mds_data_v1
-struct lov_user_mds_data_v1 {
-        lstat_t lmd_st;                 /* MDS stat struct */
-        struct lov_user_md_v1 lmd_lmm;  /* LOV EA user data */
-} __attribute__((packed));
-#endif
-
-struct ll_recreate_obj {
-        __u64 lrc_id;
-        __u32 lrc_ost_idx;
-};
-
-struct obd_uuid {
-        char uuid[40];
-};
-
-static inline int obd_uuid_equals(struct obd_uuid *u1, struct obd_uuid *u2)
-{
-        return strcmp((char *)u1->uuid, (char *)u2->uuid) == 0;
-}
-
-static inline int obd_uuid_empty(struct obd_uuid *uuid)
-{
-        return uuid->uuid[0] == '\0';
-}
-
-static inline void obd_str2uuid(struct obd_uuid *uuid, char *tmp)
-{
-        strncpy((char *)uuid->uuid, tmp, sizeof(*uuid));
-        uuid->uuid[sizeof(*uuid) - 1] = '\0';
-}
-
-/* For printf's only, make sure uuid is terminated */
-static inline char *obd_uuid2str(struct obd_uuid *uuid) 
-{
-        if (uuid->uuid[sizeof(*uuid) - 1] != '\0') {
-                /* Obviously not safe, but for printfs, no real harm done...
-                   we're always null-terminated, even in a race. */
-                static char temp[sizeof(*uuid)];
-                memcpy(temp, uuid->uuid, sizeof(*uuid) - 1);
-                temp[sizeof(*uuid) - 1] = '\0';
-                return temp;
-        }
-        return (char *)(uuid->uuid);
-}
-
-/* these must be explicitly translated into linux Q_* in ll_dir_ioctl */
-#define LUSTRE_Q_QUOTAON    0x800002     /* turn quotas on */
-#define LUSTRE_Q_QUOTAOFF   0x800003     /* turn quotas off */
-#define LUSTRE_Q_GETINFO    0x800005     /* get information about quota files */
-#define LUSTRE_Q_SETINFO    0x800006     /* set information about quota files */
-#define LUSTRE_Q_GETQUOTA   0x800007     /* get user quota structure */
-#define LUSTRE_Q_SETQUOTA   0x800008     /* set user quota structure */
-/* lustre-specific control commands */
-#define LUSTRE_Q_INVALIDATE 0x80000b     /* invalidate quota data */
-
-#define UGQUOTA 2       /* set both USRQUOTA and GRPQUOTA */
-
-#define QFMT_LDISKFS 2  /* QFMT_VFS_V0(2), quota format for ldiskfs */
-
-struct if_quotacheck {
-        char                    obd_type[16];
-        struct obd_uuid         obd_uuid;
-};
-
-#define MDS_GRP_DOWNCALL_MAGIC 0x6d6dd620
-
-struct mds_grp_downcall_data {
-        __u32           mgd_magic;
-        __u32           mgd_err;
-        __u32           mgd_uid;
-        __u32           mgd_gid;
-        __u32           mgd_ngroups;
-        __u32           mgd_groups[0];
-};
-
-#ifdef NEED_QUOTA_DEFS
-#ifndef QUOTABLOCK_BITS
-#define QUOTABLOCK_BITS 10
-#endif
-
-#ifndef QUOTABLOCK_SIZE
-#define QUOTABLOCK_SIZE (1 << QUOTABLOCK_BITS)
-#endif
-
-#ifndef toqb
-#define toqb(x) (((x) + QUOTABLOCK_SIZE - 1) >> QUOTABLOCK_BITS)
-#endif
-
-#ifndef QIF_BLIMITS
-#define QIF_BLIMITS     1
-#define QIF_SPACE       2
-#define QIF_ILIMITS     4
-#define QIF_INODES      8
-#define QIF_BTIME       16
-#define QIF_ITIME       32
-#define QIF_LIMITS      (QIF_BLIMITS | QIF_ILIMITS)
-#define QIF_USAGE       (QIF_SPACE | QIF_INODES)
-#define QIF_TIMES       (QIF_BTIME | QIF_ITIME)
-#define QIF_ALL         (QIF_LIMITS | QIF_USAGE | QIF_TIMES)
-#endif
-
-#endif /* !__KERNEL__ */
-
-typedef enum lustre_quota_version {
-        LUSTRE_QUOTA_V1 = 0,
-        LUSTRE_QUOTA_V2 = 1
-} lustre_quota_version_t;
-
-/* XXX: same as if_dqinfo struct in kernel */
-struct obd_dqinfo {
-        __u64 dqi_bgrace;
-        __u64 dqi_igrace;
-        __u32 dqi_flags;
-        __u32 dqi_valid;
-};
-
-/* XXX: same as if_dqblk struct in kernel, plus one padding */
-struct obd_dqblk {
-        __u64 dqb_bhardlimit;
-        __u64 dqb_bsoftlimit;
-        __u64 dqb_curspace;
-        __u64 dqb_ihardlimit;
-        __u64 dqb_isoftlimit;
-        __u64 dqb_curinodes;
-        __u64 dqb_btime;
-        __u64 dqb_itime;
-        __u32 dqb_valid;
-        __u32 padding;
-};
-
-struct if_quotactl {
-        __u32                   qc_cmd;
-        __u32                   qc_type;
-        __u32                   qc_id;
-        __u32                   qc_stat;
-        struct obd_dqinfo       qc_dqinfo;
-        struct obd_dqblk        qc_dqblk;
-        char                    obd_type[16];
-        struct obd_uuid         obd_uuid;
-};
-
-#ifndef offsetof
-# define offsetof(typ,memb)     ((unsigned long)((char *)&(((typ *)0)->memb)))
-#endif
-
-#endif /* _LUSTRE_USER_H */
diff --git a/lustre/include/lustre/types.h b/lustre/include/lustre/types.h
deleted file mode 100644
index a5da5923e1c8ec4dfbcf97d381eb97be28570a62..0000000000000000000000000000000000000000
--- a/lustre/include/lustre/types.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef _LUSTRE_TYPES_H
-#define _LUSTRE_TYPES_H
-
-#if defined(__linux__)
-#include <linux/lustre_types.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_types.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_types.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#endif
diff --git a/lustre/include/lustre_cache.h b/lustre/include/lustre_cache.h
deleted file mode 100644
index 291d88293675b7ccefe54c20424aad5fbf8c4f29..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_cache.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef LUSTRE_CACHE_H
-#define LUSTRE_CACHE_H
-#include <obd.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-
-struct lustre_cache;
-struct osc_async_page;
-struct page_removal_cb_element {
-        struct list_head        prce_list;
-        obd_page_removal_cb_t   prce_callback;
-};
-
-typedef int (*cache_iterate_extents_cb_t)(struct lustre_cache *,
-                                          struct lustre_handle *,
-                                          struct osc_async_page *,
-                                          void *);
-typedef int (*cache_iterate_locks_cb_t)(struct lustre_cache *,
-                                        struct ldlm_res_id *,
-                                        struct lustre_handle *, void *);
-
-struct lustre_cache {
-        struct list_head         lc_locks_list;
-        spinlock_t               lc_locks_list_lock;
-        struct list_head         lc_page_removal_callback_list;
-        struct obd_device       *lc_obd;
-        obd_pin_extent_cb        lc_pin_extent_cb;
-};
-
-int cache_add_lock(struct lustre_cache *cache, struct lustre_handle *lockh);
-int cache_add_extent(struct lustre_cache *cache, struct ldlm_res_id *res,
-                     struct osc_async_page *extent,
-                     struct lustre_handle *lockh);
-void cache_remove_extent(struct lustre_cache *, struct osc_async_page *);
-int cache_add_extent_removal_cb(struct lustre_cache *cache,
-                                obd_page_removal_cb_t func_cb,
-                                obd_pin_extent_cb pin_cb);
-int cache_del_extent_removal_cb(struct lustre_cache *cache,
-                                obd_page_removal_cb_t func_cb);
-int cache_iterate_extents(struct lustre_cache *cache, struct lustre_handle *lockh,
-                          cache_iterate_extents_cb_t cb_func, void *data);
-int cache_remove_lock(struct lustre_cache *cache, struct lustre_handle *lockh);
-int cache_iterate_locks(struct lustre_cache *cache, struct ldlm_res_id *res,
-                        cache_iterate_locks_cb_t cb_fun, void *data);
-struct lustre_cache *cache_create(struct obd_device *obd);
-int cache_destroy(struct lustre_cache *cache);
-
-
-#endif /* LUSTRE_CACHE_H */
diff --git a/lustre/include/lustre_cfg.h b/lustre/include/lustre_cfg.h
deleted file mode 100644
index 3b770d3f6ed7419cfcd3c6bcb6021fa0816baa7a..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_cfg.h
+++ /dev/null
@@ -1,256 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LUSTRE_CFG_H
-#define _LUSTRE_CFG_H
-
-/*
- * 1cf6
- * lcfG
- */
-#define LUSTRE_CFG_VERSION 0x1cf60001
-#define LUSTRE_CFG_MAX_BUFCOUNT 8
-
-#define LCFG_HDR_SIZE(count) \
-    size_round(offsetof (struct lustre_cfg, lcfg_buflens[(count)]))
-
-/* If not LCFG_REQUIRED, we can ignore this cmd and go on. */
-#define LCFG_REQUIRED         0x0001000
-
-enum lcfg_command_type {
-        LCFG_ATTACH         = 0x00cf001,
-        LCFG_DETACH         = 0x00cf002,
-        LCFG_SETUP          = 0x00cf003,
-        LCFG_CLEANUP        = 0x00cf004,
-        LCFG_ADD_UUID       = 0x00cf005,
-        LCFG_DEL_UUID       = 0x00cf006,
-        LCFG_MOUNTOPT       = 0x00cf007,
-        LCFG_DEL_MOUNTOPT   = 0x00cf008,
-        LCFG_SET_TIMEOUT    = 0x00cf009,
-        LCFG_SET_UPCALL     = 0x00cf00a,
-        LCFG_ADD_CONN       = 0x00cf00b,
-        LCFG_DEL_CONN       = 0x00cf00c,
-        LCFG_LOV_ADD_OBD    = 0x00cf00d,
-        LCFG_LOV_DEL_OBD    = 0x00cf00e,
-        LCFG_PARAM          = 0x00cf00f,
-        LCFG_MARKER         = 0x00cf010,
-        LCFG_LOG_START      = 0x00ce011,
-        LCFG_LOG_END        = 0x00ce012,
-        LCFG_LOV_ADD_INA    = 0x00ce013,
-};
-
-struct lustre_cfg_bufs {
-        void    *lcfg_buf[LUSTRE_CFG_MAX_BUFCOUNT];
-        __u32    lcfg_buflen[LUSTRE_CFG_MAX_BUFCOUNT];
-        __u32    lcfg_bufcount;
-};
-
-/* Mountconf transitional hack, should go away after 1.6 */
-#define LCFG_FLG_MOUNTCONF 0x400
-
-struct lustre_cfg {
-        __u32 lcfg_version;
-        __u32 lcfg_command;
-
-        __u32 lcfg_num; 
-        __u32 lcfg_flags;
-        __u64 lcfg_nid;
-        __u32 lcfg_nal;                      /* not used any more */
-
-        __u32 lcfg_bufcount;
-        __u32 lcfg_buflens[0];
-};
-
-#define LUSTRE_CFG_BUFLEN(lcfg, idx)            \
-        ((lcfg)->lcfg_bufcount <= (idx)         \
-         ? 0                                    \
-         : (lcfg)->lcfg_buflens[(idx)])
-
-static inline void lustre_cfg_bufs_set(struct lustre_cfg_bufs *bufs,
-                                       __u32                   index,
-                                       void                   *buf,
-                                       __u32                   buflen)
-{
-        if (index >= LUSTRE_CFG_MAX_BUFCOUNT)
-                return;
-        if (bufs == NULL)
-                return;
-
-        if (bufs->lcfg_bufcount <= index)
-                bufs->lcfg_bufcount = index + 1;
-
-        bufs->lcfg_buf[index]    = buf;
-        bufs->lcfg_buflen[index] = buflen;
-}
-
-static inline void lustre_cfg_bufs_set_string(struct lustre_cfg_bufs *bufs,
-                                              __u32 index,
-                                              char *str)
-{
-        lustre_cfg_bufs_set(bufs, index, str, str ? strlen(str) + 1 : 0);
-}
-
-static inline void lustre_cfg_bufs_reset(struct lustre_cfg_bufs *bufs, char *name)
-{
-        memset((bufs), 0, sizeof(*bufs));
-        if (name)
-                lustre_cfg_bufs_set_string(bufs, 0, name);
-}
-
-static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, int index)
-{
-        int i;
-        int offset;
-        int bufcount;
-        LASSERT (lcfg != NULL);
-        LASSERT (index >= 0);
-
-        bufcount = lcfg->lcfg_bufcount;
-        if (index >= bufcount)
-                return NULL;
-
-        offset = LCFG_HDR_SIZE(lcfg->lcfg_bufcount);
-        for (i = 0; i < index; i++)
-                offset += size_round(lcfg->lcfg_buflens[i]);
-        return (char *)lcfg + offset;
-}
-
-static inline void lustre_cfg_bufs_init(struct lustre_cfg_bufs *bufs,
-                                        struct lustre_cfg *lcfg)
-{
-        int i;
-        bufs->lcfg_bufcount = lcfg->lcfg_bufcount;
-        for (i = 0; i < bufs->lcfg_bufcount; i++) {
-                bufs->lcfg_buflen[i] = lcfg->lcfg_buflens[i];
-                bufs->lcfg_buf[i] = lustre_cfg_buf(lcfg, i);
-        }
-}
-
-static inline char *lustre_cfg_string(struct lustre_cfg *lcfg, int index)
-{
-        char *s;
-
-        if (!lcfg->lcfg_buflens[index])
-                return NULL;
-
-        s = lustre_cfg_buf(lcfg, index);
-        if (!s)
-                return NULL;
-
-        /* make sure it's NULL terminated, even if this kills a char
-         * of data.  Try to use the padding first though.
-         */
-        if (s[lcfg->lcfg_buflens[index] - 1] != '\0') {
-                int last = min((int)lcfg->lcfg_buflens[index], 
-                               size_round(lcfg->lcfg_buflens[index]) - 1);
-                char lost = s[last];
-                s[last] = '\0';
-                if (lost != '\0') {
-                        CWARN("Truncated buf %d to '%s' (lost '%c'...)\n",
-                              index, s, lost);
-                }
-        }
-        return s;
-}
-
-static inline int lustre_cfg_len(__u32 bufcount, __u32 *buflens)
-{
-        int i;
-        int len;
-        ENTRY;
-
-        len = LCFG_HDR_SIZE(bufcount);
-        for (i = 0; i < bufcount; i++)
-                len += size_round(buflens[i]);
-
-        RETURN(size_round(len));
-}
-
-
-#include <obd_support.h>
-
-static inline struct lustre_cfg *lustre_cfg_new(int cmd,
-                                                struct lustre_cfg_bufs *bufs)
-{
-        struct lustre_cfg *lcfg;
-        char *ptr;
-        int i;
-
-        ENTRY;
-
-        OBD_ALLOC(lcfg, lustre_cfg_len(bufs->lcfg_bufcount,
-                                       bufs->lcfg_buflen));
-        if (!lcfg)
-                RETURN(lcfg);
-
-        lcfg->lcfg_version = LUSTRE_CFG_VERSION;
-        lcfg->lcfg_command = cmd;
-        lcfg->lcfg_bufcount = bufs->lcfg_bufcount;
-
-        ptr = (char *)lcfg + LCFG_HDR_SIZE(lcfg->lcfg_bufcount);
-        for (i = 0; i < lcfg->lcfg_bufcount; i++) {
-                lcfg->lcfg_buflens[i] = bufs->lcfg_buflen[i];
-                LOGL((char *)bufs->lcfg_buf[i], bufs->lcfg_buflen[i], ptr);
-        }
-        RETURN(lcfg);
-}
-
-static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
-{
-        int len;
-
-        len = lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens);
-
-        OBD_FREE(lcfg, len);
-        EXIT;
-        return;
-}
-
-static inline int lustre_cfg_sanity_check(void *buf, int len)
-{
-        struct lustre_cfg *lcfg = (struct lustre_cfg *)buf;
-        ENTRY;
-        if (!lcfg)
-                RETURN(-EINVAL);
-
-        /* check that the first bits of the struct are valid */
-        if (len < LCFG_HDR_SIZE(0))
-                RETURN(-EINVAL);
-
-        if (lcfg->lcfg_version != LUSTRE_CFG_VERSION)
-                RETURN(-EINVAL);
-        
-        if (lcfg->lcfg_bufcount >= LUSTRE_CFG_MAX_BUFCOUNT)
-                RETURN(-EINVAL);
-
-        /* check that the buflens are valid */
-        if (len < LCFG_HDR_SIZE(lcfg->lcfg_bufcount))
-                RETURN(-EINVAL);
-
-        /* make sure all the pointers point inside the data */
-        if (len < lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens))
-                RETURN(-EINVAL);
-
-        RETURN(0);
-}
-
-#endif // _LUSTRE_CFG_H
diff --git a/lustre/include/lustre_commit_confd.h b/lustre/include/lustre_commit_confd.h
deleted file mode 100644
index 87e8c911722dbff3e9d5f42e86d0621fc8dc89da..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_commit_confd.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * Structures relating to the log commit thread.
- */
-
-#ifndef _LUSTRE_COMMIT_CONFD_H
-#define _LUSTRE_COMMIT_CONFD_H
-
-#include <lustre_log.h>
-
-struct llog_canceld_ctxt {
-        struct list_head           llcd_list;  /* free or pending struct list */
-        struct llog_ctxt          *llcd_ctxt;
-        struct llog_commit_master *llcd_lcm;
-        int                        llcd_size;
-        int                        llcd_cookiebytes;
-        struct llog_cookie         llcd_cookies[0];
-};
-
-struct llog_commit_master {
-        struct list_head        lcm_thread_busy;  /* list of busy daemons */
-        struct list_head        lcm_thread_idle;  /* list of idle daemons */
-        spinlock_t              lcm_thread_lock;  /* protects thread_list */
-        atomic_t                lcm_thread_numidle;/* number of idle threads */
-        atomic_t                lcm_thread_total; /* total number of threads */
-        int                     lcm_thread_max;   /* <= num_osts normally */
-
-        int                     lcm_flags;
-        cfs_waitq_t             lcm_waitq;
-
-        struct list_head        lcm_llcd_pending; /* llog_canceld_ctxt to send */
-        struct list_head        lcm_llcd_resend;  /* try to resend this data */
-        struct list_head        lcm_llcd_free;    /* free llog_canceld_ctxt */
-        spinlock_t              lcm_llcd_lock;    /* protects llcd_free */
-        atomic_t                lcm_llcd_numfree; /* items on llcd_free */
-        int                     lcm_llcd_minfree; /* min free on llcd_free */
-        int                     lcm_llcd_maxfree; /* max free on llcd_free */
-};
-
-#define LLOG_LCM_FL_EXIT        0x01
-#define LLOG_LCM_FL_EXIT_FORCE  0x02
-
-/* the thread data that collects local commits and makes rpc's */
-struct llog_commit_daemon {
-        struct list_head           lcd_lcm_list;  /* list of daemon threads */
-        struct list_head           lcd_llcd_list; /* list of pending RPCs */
-        struct llog_commit_master *lcd_lcm;       /* pointer back to parent */
-        int                        lcd_index;     /* the index of the llog daemon */
-};
-
-/* ptlrpc/recov_thread.c */
-int llog_start_commit_thread(struct llog_commit_master *);
-
-int llog_init_commit_master(struct llog_commit_master *);
-int llog_cleanup_commit_master(struct llog_commit_master *lcm, int force);
-#endif /* _LUSTRE_COMMIT_CONFD_H */
diff --git a/lustre/include/lustre_debug.h b/lustre/include/lustre_debug.h
deleted file mode 100644
index c6bd7bab5d0c978c2e3cc24912baf1eea93892f5..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_debug.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LUSTRE_DEBUG_H
-#define _LUSTRE_DEBUG_H
-
-#include <lustre_net.h>
-
-#if defined(__linux__)
-#include <linux/lustre_debug.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_debug.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_debug.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#define ASSERT_MAX_SIZE_MB 60000ULL
-#define ASSERT_PAGE_INDEX(index, OP)                                    \
-do { if (index > ASSERT_MAX_SIZE_MB << (20 - CFS_PAGE_SHIFT)) {         \
-        CERROR("bad page index %lu > %Lu\n", index,                     \
-               ASSERT_MAX_SIZE_MB << (20 - CFS_PAGE_SHIFT));            \
-        libcfs_debug = ~0UL;                                            \
-        OP;                                                             \
-}} while(0)
-
-#define ASSERT_FILE_OFFSET(offset, OP)                                  \
-do { if (offset > ASSERT_MAX_SIZE_MB << 20) {                           \
-        CERROR("bad file offset %Lu > %Lu\n", offset,                   \
-               ASSERT_MAX_SIZE_MB << 20);                               \
-        libcfs_debug = ~0UL;                                            \
-        OP;                                                             \
-}} while(0)
-
-/* lib/debug.c */
-int dump_lniobuf(struct niobuf_local *lnb);
-int dump_rniobuf(struct niobuf_remote *rnb);
-int dump_ioo(struct obd_ioobj *nb);
-int dump_req(struct ptlrpc_request *req);
-int dump_obdo(struct obdo *oa);
-void dump_lsm(int level, struct lov_stripe_md *lsm);
-int block_debug_setup(void *addr, int len, __u64 off, __u64 id);
-int block_debug_check(char *who, void *addr, int len, __u64 off, __u64 id);
-#endif
diff --git a/lustre/include/lustre_disk.h b/lustre/include/lustre_disk.h
deleted file mode 100644
index 805cf40fba2c5aa4681612a184e9ae458407f16b..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_disk.h
+++ /dev/null
@@ -1,288 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * Lustre disk format definitions.
- */
-
-#ifndef _LUSTRE_DISK_H
-#define _LUSTRE_DISK_H
-
-#include <lnet/types.h>
-
-/****************** on-disk files *********************/
-
-#define MDT_LOGS_DIR      "LOGS"  /* COMPAT_146 */
-#define MOUNT_CONFIGS_DIR "CONFIGS"
-/* Persistent mount data are stored on the disk in this file. */
-#define MOUNT_DATA_FILE    MOUNT_CONFIGS_DIR"/mountdata"
-#define LAST_RCVD         "last_rcvd"
-#define LOV_OBJID         "lov_objid"
-#define HEALTH_CHECK      "health_check"
-
-
-/****************** persistent mount data *********************/
-
-#define LDD_F_SV_TYPE_MDT   0x0001
-#define LDD_F_SV_TYPE_OST   0x0002
-#define LDD_F_SV_TYPE_MGS   0x0004
-#define LDD_F_NEED_INDEX    0x0010 /* need an index assignment */
-#define LDD_F_VIRGIN        0x0020 /* never registered */
-#define LDD_F_UPDATE        0x0040 /* update all related config logs */
-#define LDD_F_REWRITE_LDD   0x0080 /* rewrite the LDD */
-#define LDD_F_WRITECONF     0x0100 /* regenerate all logs for this fs */
-#define LDD_F_UPGRADE14     0x0200 /* COMPAT_14 */
-#define LDD_F_PARAM         0x0400 /* process as lctl conf_param */
-
-enum ldd_mount_type {
-        LDD_MT_EXT3 = 0, 
-        LDD_MT_LDISKFS,
-        LDD_MT_SMFS,   
-        LDD_MT_REISERFS,
-        LDD_MT_LDISKFS2,
-        LDD_MT_LAST
-};
-       
-static inline char *mt_str(enum ldd_mount_type mt)
-{
-        static char *mount_type_string[] = {
-                "ext3",
-                "ldiskfs",
-                "smfs",
-                "reiserfs",
-                "ldiskfs2",
-        };
-        return mount_type_string[mt];
-}
-
-#define LDD_INCOMPAT_SUPP 0
-#define LDD_ROCOMPAT_SUPP 0
-
-#define LDD_MAGIC 0x1dd00001
-
-/* On-disk configuration file. In host-endian order. */
-struct lustre_disk_data {
-        __u32      ldd_magic;
-        __u32      ldd_feature_compat;  /* compatible feature flags */
-        __u32      ldd_feature_rocompat;/* read-only compatible feature flags */
-        __u32      ldd_feature_incompat;/* incompatible feature flags */
-        
-        __u32      ldd_config_ver;      /* config rewrite count - not used */
-        __u32      ldd_flags;           /* LDD_SV_TYPE */
-        __u32      ldd_svindex;         /* server index (0001), must match 
-                                           svname */
-        __u32      ldd_mount_type;      /* target fs type LDD_MT_* */
-        char       ldd_fsname[64];      /* filesystem this server is part of */
-        char       ldd_svname[64];      /* this server's name (lustre-mdt0001)*/
-        __u8       ldd_uuid[40];        /* server UUID (COMPAT_146) */
-   
-/*200*/ char       ldd_userdata[1024 - 200]; /* arbitrary user string */
-/*1024*/__u8       ldd_padding[4096 - 1024];
-/*4096*/char       ldd_mount_opts[4096]; /* target fs mount opts */
-/*8192*/char       ldd_params[4096];     /* key=value pairs */
-};
-
-#define IS_MDT(data)   ((data)->ldd_flags & LDD_F_SV_TYPE_MDT)
-#define IS_OST(data)   ((data)->ldd_flags & LDD_F_SV_TYPE_OST)
-#define IS_MGS(data)  ((data)->ldd_flags & LDD_F_SV_TYPE_MGS)
-#define MT_STR(data)   mt_str((data)->ldd_mount_type)
-
-/* Make the mdt/ost server obd name based on the filesystem name */
-static inline int server_make_name(__u32 flags, __u16 index, char *fs,
-                                   char *name)
-{
-        if (flags & (LDD_F_SV_TYPE_MDT | LDD_F_SV_TYPE_OST)) {
-                sprintf(name, "%.8s-%s%04x", fs,
-                        (flags & LDD_F_SV_TYPE_MDT) ? "MDT" : "OST",  
-                        index);
-        } else if (flags & LDD_F_SV_TYPE_MGS) {
-                sprintf(name, "MGS");
-        } else {
-                CERROR("unknown server type %#x\n", flags);
-                return 1;
-        }
-        return 0;
-}
-
-/* Get the index from the obd name */
-int server_name2index(char *svname, __u32 *idx, char **endptr);
-
-
-/****************** mount command *********************/
-
-/* The lmd is only used internally by Lustre; mount simply passes 
-   everything as string options */
-
-#define LMD_MAGIC    0xbdacbd03
-
-/* gleaned from the mount command - no persistent info here */
-struct lustre_mount_data {
-        __u32      lmd_magic;
-        __u32      lmd_flags;         /* lustre mount flags */
-        int        lmd_mgs_failnodes; /* mgs failover node count */
-        int        lmd_exclude_count;
-        char      *lmd_dev;           /* device name */
-        char      *lmd_profile;       /* client only */
-        char      *lmd_opts;          /* lustre mount options (as opposed to 
-                                         _device_ mount options) */
-        __u32     *lmd_exclude;       /* array of OSTs to ignore */
-};
-
-#define LMD_FLG_SERVER       0x0001  /* Mounting a server */
-#define LMD_FLG_CLIENT       0x0002  /* Mounting a client */
-#define LMD_FLG_ABORT_RECOV  0x0008  /* Abort recovery */
-#define LMD_FLG_NOSVC        0x0010  /* Only start MGS/MGC for servers, 
-                                        no other services */
-
-#define lmd_is_client(x) ((x)->lmd_flags & LMD_FLG_CLIENT) 
-
-
-/****************** last_rcvd file *********************/
-
-#define LR_SERVER_SIZE   512
-#define LR_CLIENT_START 8192
-#define LR_CLIENT_SIZE   128
-#if LR_CLIENT_START < LR_SERVER_SIZE
-#error "Can't have LR_CLIENT_START < LR_SERVER_SIZE"
-#endif
-/* This limit is arbitrary (32k clients on x86), but it is convenient to use
- * 2^n * CFS_PAGE_SIZE * 8 for the number of bits that fit an order-n allocation. */
-#define LR_MAX_CLIENTS (CFS_PAGE_SIZE * 8)
-
-                                                                                
-/* COMPAT_146 */
-#define OBD_COMPAT_OST          0x00000002 /* this is an OST (temporary) */
-#define OBD_COMPAT_MDT          0x00000004 /* this is an MDT (temporary) */
-/* end COMPAT_146 */
-
-#define OBD_ROCOMPAT_LOVOBJID   0x00000001 /* MDS handles LOV_OBJID file */
-#define OBD_ROCOMPAT_CROW       0x00000002 /* OST will CROW create objects */
-
-#define OBD_INCOMPAT_GROUPS     0x00000001 /* OST handles group subdirs */
-#define OBD_INCOMPAT_OST        0x00000002 /* this is an OST */
-#define OBD_INCOMPAT_MDT        0x00000004 /* this is an MDT */
-#define OBD_INCOMPAT_COMMON_LR  0x00000008 /* common last_rvcd format */
-
-
-/* Data stored per server at the head of the last_rcvd file.  In le32 order.
-   This should be common to filter_internal.h, lustre_mds.h */
-struct lr_server_data {
-        __u8  lsd_uuid[40];        /* server UUID */
-        __u64 lsd_last_transno;    /* last completed transaction ID */
-        __u64 lsd_compat14;        /* reserved - compat with old last_rcvd */
-        __u64 lsd_mount_count;     /* incarnation number */
-        __u32 lsd_feature_compat;  /* compatible feature flags */
-        __u32 lsd_feature_rocompat;/* read-only compatible feature flags */
-        __u32 lsd_feature_incompat;/* incompatible feature flags */
-        __u32 lsd_server_size;     /* size of server data area */
-        __u32 lsd_client_start;    /* start of per-client data area */
-        __u16 lsd_client_size;     /* size of per-client data area */
-        __u16 lsd_subdir_count;    /* number of subdirectories for objects */
-        __u64 lsd_catalog_oid;     /* recovery catalog object id */
-        __u32 lsd_catalog_ogen;    /* recovery catalog inode generation */
-        __u8  lsd_peeruuid[40];    /* UUID of MDS associated with this OST */
-        __u32 lsd_ost_index;       /* index number of OST in LOV */
-        __u32 lsd_mdt_index;       /* index number of MDT in LMV */
-        __u8  lsd_padding[LR_SERVER_SIZE - 148];
-};
-
-/* Data stored per client in the last_rcvd file.  In le32 order. */
-struct lsd_client_data {
-        __u8  lcd_uuid[40];      /* client UUID */
-        __u64 lcd_last_transno; /* last completed transaction ID */
-        __u64 lcd_last_xid;     /* xid for the last transaction */
-        __u32 lcd_last_result;  /* result from last RPC */
-        __u32 lcd_last_data;    /* per-op data (disposition for open &c.) */
-        /* for MDS_CLOSE requests */
-        __u64 lcd_last_close_transno; /* last completed transaction ID */
-        __u64 lcd_last_close_xid;     /* xid for the last transaction */
-        __u32 lcd_last_close_result;  /* result from last RPC */
-        __u32 lcd_last_close_data;    /* per-op data */
-        __u8  lcd_padding[LR_CLIENT_SIZE - 88];
-};
-
-
-#ifdef __KERNEL__
-/****************** superblock additional info *********************/
-struct ll_sb_info;
-
-struct lustre_sb_info {
-        int                       lsi_flags;
-        struct obd_device        *lsi_mgc;     /* mgc obd */
-        struct lustre_mount_data *lsi_lmd;     /* mount command info */
-        struct lustre_disk_data  *lsi_ldd;     /* mount info on-disk */
-        struct ll_sb_info        *lsi_llsbi;   /* add'l client sbi info */
-        struct vfsmount          *lsi_srv_mnt; /* the one server mount */
-        atomic_t                  lsi_mounts;  /* references to the srv_mnt */
-};
-
-#define LSI_SERVER                       0x00000001
-#define LSI_UMOUNT_FORCE                 0x00000010
-#define LSI_UMOUNT_FAILOVER              0x00000020
-
-#if  (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# define    s2lsi(sb)        ((struct lustre_sb_info *)((sb)->s_fs_info))
-# define    s2lsi_nocast(sb) ((sb)->s_fs_info)
-#else  /* 2.4 here */
-# define    s2lsi(sb)        ((struct lustre_sb_info *)((sb)->u.generic_sbp))
-# define    s2lsi_nocast(sb) ((sb)->u.generic_sbp)
-#endif
-
-#define     get_profile_name(sb)   (s2lsi(sb)->lsi_lmd->lmd_profile)
-
-#endif /* __KERNEL__ */
-
-/****************** mount lookup info *********************/
-
-struct lustre_mount_info {
-        char               *lmi_name;
-        struct super_block *lmi_sb;
-        struct vfsmount    *lmi_mnt;
-        struct list_head    lmi_list_chain;
-};
-
-/****************** prototypes *********************/
-
-#ifdef __KERNEL__
-#include <obd_class.h>
-
-/* obd_mount.c */
-void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb));
-void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb));
-
-
-int lustre_common_put_super(struct super_block *sb);
-int lustre_process_log(struct super_block *sb, char *logname, 
-                     struct config_llog_instance *cfg);
-int lustre_end_log(struct super_block *sb, char *logname, 
-                       struct config_llog_instance *cfg);
-struct lustre_mount_info *server_get_mount(char *name);
-int server_put_mount(char *name, struct vfsmount *mnt);
-int server_register_target(struct super_block *sb);
-struct mgs_target_info;
-int server_mti_print(char *title, struct mgs_target_info *mti);
-
-/* mgc_request.c */
-int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id);
-
-#endif
-
-#endif // _LUSTRE_DISK_H
diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h
deleted file mode 100644
index 55696b55a19ade645f24f2219a307239184f3053..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_dlm.h
+++ /dev/null
@@ -1,834 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * (visit-tags-table FILE)
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _LUSTRE_DLM_H__
-#define _LUSTRE_DLM_H__
-
-#if defined(__linux__)
-#include <linux/lustre_dlm.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_dlm.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_dlm.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#include <lustre_lib.h>
-#include <lustre_net.h>
-#include <lustre_import.h>
-#include <lustre_handles.h>
-#include <lustre_export.h> /* for obd_export, for LDLM_DEBUG */
-#include <interval_tree.h> /* for interval_node{}, ldlm_extent */
-
-struct obd_ops;
-struct obd_device;
-
-#define OBD_LDLM_DEVICENAME  "ldlm"
-
-#define LDLM_DEFAULT_LRU_SIZE (100 * num_online_cpus())
-#define LDLM_DEFAULT_MAX_ALIVE (cfs_time_seconds(36000))
-
-typedef enum {
-        ELDLM_OK = 0,
-
-        ELDLM_LOCK_CHANGED = 300,
-        ELDLM_LOCK_ABORTED = 301,
-        ELDLM_LOCK_REPLACED = 302,
-        ELDLM_NO_LOCK_DATA = 303,
-
-        ELDLM_NAMESPACE_EXISTS = 400,
-        ELDLM_BAD_NAMESPACE    = 401
-} ldlm_error_t;
-
-typedef enum {
-        LDLM_NAMESPACE_SERVER = 1 << 0,
-        LDLM_NAMESPACE_CLIENT = 1 << 1
-} ldlm_side_t;
-
-#define LDLM_FL_LOCK_CHANGED   0x000001 /* extent, mode, or resource changed */
-
-/* If the server returns one of these flags, then the lock was put on that list.
- * If the client sends one of these flags (during recovery ONLY!), it wants the
- * lock added to the specified list, no questions asked. -p */
-#define LDLM_FL_BLOCK_GRANTED  0x000002
-#define LDLM_FL_BLOCK_CONV     0x000004
-#define LDLM_FL_BLOCK_WAIT     0x000008
-
-#define LDLM_FL_CBPENDING      0x000010 /* this lock is being destroyed */
-#define LDLM_FL_AST_SENT       0x000020 /* blocking or cancel packet was sent */
-#define LDLM_FL_WAIT_NOREPROC  0x000040 /* not a real flag, not saved in lock */
-#define LDLM_FL_CANCEL         0x000080 /* cancellation callback already run */
-
-/* Lock is being replayed.  This could probably be implied by the fact that one
- * of BLOCK_{GRANTED,CONV,WAIT} is set, but that is pretty dangerous. */
-#define LDLM_FL_REPLAY         0x000100
-
-#define LDLM_FL_INTENT_ONLY    0x000200 /* don't grant lock, just do intent */
-#define LDLM_FL_LOCAL_ONLY     0x000400 /* see ldlm_cli_cancel_unused */
-
-/* don't run the cancel callback under ldlm_cli_cancel_unused */
-#define LDLM_FL_FAILED         0x000800
-
-#define LDLM_FL_HAS_INTENT     0x001000 /* lock request has intent */
-#define LDLM_FL_CANCELING      0x002000 /* lock cancel has already been sent */
-#define LDLM_FL_LOCAL          0x004000 /* local lock (ie, no srv/cli split) */
-#define LDLM_FL_WARN           0x008000 /* see ldlm_cli_cancel_unused */
-#define LDLM_FL_DISCARD_DATA   0x010000 /* discard (no writeback) on cancel */
-
-#define LDLM_FL_NO_TIMEOUT     0x020000 /* Blocked by group lock - wait
-                                         * indefinitely */
-
-/* file & record locking */
-#define LDLM_FL_BLOCK_NOWAIT   0x040000 // server told not to wait if blocked
-#define LDLM_FL_TEST_LOCK      0x080000 // return blocking lock
-
-/* XXX FIXME: This is being added to b_size as a low-risk fix to the fact that
- * the LVB filling happens _after_ the lock has been granted, so another thread
- * can match`t before the LVB has been updated.  As a dirty hack, we set
- * LDLM_FL_LVB_READY only after we've done the LVB poop.
- * this is only needed on lov/osc now, where lvb is actually used and callers
- * must set it in input flags.
- *
- * The proper fix is to do the granting inside of the completion AST, which can
- * be replaced with a LVB-aware wrapping function for OSC locks.  That change is
- * pretty high-risk, though, and would need a lot more testing. */
-
-#define LDLM_FL_LVB_READY      0x100000
-
-/* A lock contributes to the kms calculation until it has finished the part
- * of it's cancelation that performs write back on its dirty pages.  It
- * can remain on the granted list during this whole time.  Threads racing
- * to update the kms after performing their writeback need to know to
- * exclude each others locks from the calculation as they walk the granted
- * list. */
-#define LDLM_FL_KMS_IGNORE     0x200000
-
-/* Don't drop lock covering mmapped file in LRU */
-#define LDLM_FL_NO_LRU         0x400000
-
-/* Immediatelly cancel such locks when they block some other locks. Send
-   cancel notification to original lock holder, but expect no reply. */
-#define LDLM_FL_CANCEL_ON_BLOCK 0x800000
-
-/* Flags flags inherited from parent lock when doing intents. */
-#define LDLM_INHERIT_FLAGS     (LDLM_FL_CANCEL_ON_BLOCK)
-
-/* These are flags that are mapped into the flags and ASTs of blocking locks */
-#define LDLM_AST_DISCARD_DATA  0x80000000 /* Add FL_DISCARD to blocking ASTs */
-/* Flags sent in AST lock_flags to be mapped into the receiving lock. */
-#define LDLM_AST_FLAGS         (LDLM_FL_DISCARD_DATA)
-
-/* completion ast to be executed */
-#define LDLM_FL_CP_REQD        0x1000000
-
-/* cleanup_resource has already handled the lock */
-#define LDLM_FL_CLEANED        0x2000000
-
-/* optimization hint: LDLM can run blocking callback from current context
- * w/o involving separate thread. in order to decrease cs rate */
-#define LDLM_FL_ATOMIC_CB      0x4000000
-
-/* It may happen that a client initiate 2 operations, e.g. unlink and mkdir,
- * such that server send blocking ast for conflict locks to this client for
- * the 1st operation, whereas the 2nd operation has canceled this lock and
- * is waiting for rpc_lock which is taken by the 1st operation.
- * LDLM_FL_BL_AST is to be set by ldlm_callback_handler() to the lock not allow
- * ELC code to cancel it. 
- * LDLM_FL_BL_DONE is to be set by ldlm_cancel_callback() when lock cache is
- * droped to let ldlm_callback_handler() return EINVAL to the server. It is
- * used when ELC rpc is already prepared and is waiting for rpc_lock, too late
- * to send a separate CANCEL rpc. */
-#define LDLM_FL_BL_AST          0x10000000
-#define LDLM_FL_BL_DONE         0x20000000
-
-/* measure lock contention and return -EUSERS if locking contention is high */
-#define LDLM_FL_DENY_ON_CONTENTION 0x40000000
-
-/* The blocking callback is overloaded to perform two functions.  These flags
- * indicate which operation should be performed. */
-#define LDLM_CB_BLOCKING    1
-#define LDLM_CB_CANCELING   2
-
-/* position flag of skip list pointers */
-#define LDLM_SL_HEAD(skip_list)   ((skip_list)->next != NULL)
-#define LDLM_SL_TAIL(skip_list)   ((skip_list)->prev != NULL)
-#define LDLM_SL_EMPTY(skip_list)  ((skip_list)->next == NULL && \
-                                   (skip_list)->prev == NULL)
-
-/* compatibility matrix */
-#define LCK_COMPAT_EX  LCK_NL
-#define LCK_COMPAT_PW  (LCK_COMPAT_EX | LCK_CR)
-#define LCK_COMPAT_PR  (LCK_COMPAT_PW | LCK_PR)
-#define LCK_COMPAT_CW  (LCK_COMPAT_PW | LCK_CW)
-#define LCK_COMPAT_CR  (LCK_COMPAT_CW | LCK_PR | LCK_PW)
-#define LCK_COMPAT_NL  (LCK_COMPAT_CR | LCK_EX | LCK_GROUP)
-#define LCK_COMPAT_GROUP  (LCK_GROUP | LCK_NL)
-
-extern ldlm_mode_t lck_compat_array[];
-
-static inline void lockmode_verify(ldlm_mode_t mode)
-{
-       LASSERT(mode > LCK_MINMODE && mode < LCK_MAXMODE);
-}
-
-static inline int lockmode_compat(ldlm_mode_t exist, ldlm_mode_t new)
-{
-       return (lck_compat_array[exist] & new);
-}
-
-/*
- *
- * cluster name spaces
- *
- */
-
-#define DLM_OST_NAMESPACE 1
-#define DLM_MDS_NAMESPACE 2
-
-/* XXX
-   - do we just separate this by security domains and use a prefix for
-     multiple namespaces in the same domain?
-   -
-*/
-
-/*
- * Locking rules:
- *
- * lr_lock
- *
- * lr_lock
- *     waiting_locks_spinlock
- *
- * lr_lock
- *     led_lock
- *
- * lr_lock
- *     ns_unused_lock
- *
- * lr_lvb_sem
- *     lr_lock
- *
- */
-
-struct ldlm_pool;
-struct ldlm_lock;
-struct ldlm_resource;
-struct ldlm_namespace;
-
-struct ldlm_pool_ops {
-        int (*po_recalc)(struct ldlm_pool *pl);
-        int (*po_shrink)(struct ldlm_pool *pl, int nr, 
-                         unsigned int gfp_mask);
-        int (*po_setup)(struct ldlm_pool *pl, int limit);
-};
-
-/* One second for pools thread check interval. */
-#define LDLM_POOLS_THREAD_PERIOD (1)
-
-/* 5% margin for modest pools. See ldlm_pool.c for details. */
-#define LDLM_POOLS_MODEST_MARGIN (5)
-
-/* A change to SLV in % after which we want to wake up pools thread asap. */
-#define LDLM_POOLS_FAST_SLV_CHANGE (50)
-
-struct ldlm_pool {
-        /* Common pool fields */
-        cfs_proc_dir_entry_t  *pl_proc_dir;      /* Pool proc directory. */
-        char                   pl_name[100];     /* Pool name, should be long 
-                                                  * enough to contain complex
-                                                  * proc entry name. */
-        spinlock_t             pl_lock;          /* Lock for protecting slv/clv 
-                                                  * updates. */
-        atomic_t               pl_limit;         /* Number of allowed locks in
-                                                  * in pool, both, client and 
-                                                  * server side. */
-        atomic_t               pl_granted;       /* Number of granted locks. */
-        atomic_t               pl_grant_rate;    /* Grant rate per T. */
-        atomic_t               pl_cancel_rate;   /* Cancel rate per T. */
-        atomic_t               pl_grant_speed;   /* Grant speed (GR-CR) per T. */
-        __u64                  pl_server_lock_volume; /* Server lock volume. 
-                                                  * Protected by pl_lock */
-        atomic_t               pl_lock_volume_factor; /* Lock volume factor. */
-
-        time_t                 pl_recalc_time;   /* Time when last slv from 
-                                                  * server was obtained. */
-        struct ldlm_pool_ops  *pl_ops;           /* Recalc and shrink ops. */ 
-
-        int                    pl_grant_plan;    /* Planned number of granted 
-                                                  * locks for next T. */
-        int                    pl_grant_step;    /* Grant plan step for next 
-                                                  * T. */
-
-        struct lprocfs_stats  *pl_stats;         /* Pool statistics. */
-};
-
-typedef int (*ldlm_res_policy)(struct ldlm_namespace *, struct ldlm_lock **,
-                               void *req_cookie, ldlm_mode_t mode, int flags,
-                               void *data);
-
-struct ldlm_valblock_ops {
-        int (*lvbo_init)(struct ldlm_resource *res);
-        int (*lvbo_update)(struct ldlm_resource *res, struct lustre_msg *m,
-                           int buf_idx, int increase);
-};
-
-typedef enum {
-        LDLM_NAMESPACE_GREEDY = 1 << 0,
-        LDLM_NAMESPACE_MODEST = 1 << 1
-} ldlm_appetite_t;
-
-/* default values for the "max_nolock_size", "contention_time"
- * and "contended_locks" namespace tunables */
-#define NS_DEFAULT_MAX_NOLOCK_BYTES 0
-#define NS_DEFAULT_CONTENTION_SECONDS 2
-#define NS_DEFAULT_CONTENDED_LOCKS 32
-
-/* Default value for ->ns_shrink_thumb. If lock is not extent one its cost 
- * is one page. Here we have 256 pages which is 1M on i386. Thus by default
- * all extent locks which have more than 1M long extent will be kept in lru,
- * others (including ibits locks) will be canceled on memory pressure event. */
-#define LDLM_LOCK_SHRINK_THUMB 256
-
-struct ldlm_namespace {
-        char                  *ns_name;
-        ldlm_side_t            ns_client; /* is this a client-side lock tree? */
-        __u64                  ns_connect_flags; /* ns connect flags supported
-                                           * by server (may be changed via proc,
-                                           * lru resize may be disabled/enabled) */
-        __u64                  ns_orig_connect_flags; /* client side orig connect
-                                           * flags supported by server */
-        struct list_head      *ns_hash;   /* hash table for ns */
-        spinlock_t             ns_hash_lock;
-        __u32                  ns_refcount; /* count of resources in the hash */
-        struct list_head       ns_root_list; /* all root resources in ns */
-        struct list_head       ns_list_chain; /* position in global NS list */
-
-        struct list_head       ns_unused_list; /* all root resources in ns */
-        int                    ns_nr_unused;
-        spinlock_t             ns_unused_lock;
-
-        unsigned int           ns_max_unused;
-        unsigned int           ns_max_age;
-        
-        /* Lower limit to number of pages in lock to keep it in cache */
-        unsigned int           ns_shrink_thumb;
-        cfs_time_t             ns_next_dump;   /* next debug dump, jiffies */
-
-        atomic_t               ns_locks;
-        __u64                  ns_resources;
-        ldlm_res_policy        ns_policy;
-        struct ldlm_valblock_ops *ns_lvbo;
-        void                  *ns_lvbp;
-        cfs_waitq_t            ns_waitq;
-        struct ldlm_pool       ns_pool;
-        ldlm_appetite_t        ns_appetite;
-
-        /* if more than @ns_contented_locks found, the resource considered
-         * as contended */
-        unsigned               ns_contended_locks;
-        /* the resource remembers contended state during @ns_contention_time,
-         * in seconds */
-        unsigned               ns_contention_time;
-        /* limit size of nolock requests, in bytes */
-        unsigned               ns_max_nolock_size;
-
-        struct adaptive_timeout ns_at_estimate;/* estimated lock callback time*/
-};
-
-static inline int ns_is_client(struct ldlm_namespace *ns)
-{
-        LASSERT(ns != NULL);
-        LASSERT(!(ns->ns_client & ~(LDLM_NAMESPACE_CLIENT | 
-                                    LDLM_NAMESPACE_SERVER)));
-        LASSERT(ns->ns_client == LDLM_NAMESPACE_CLIENT ||
-                ns->ns_client == LDLM_NAMESPACE_SERVER);
-        return ns->ns_client == LDLM_NAMESPACE_CLIENT;
-}
-
-static inline int ns_is_server(struct ldlm_namespace *ns)
-{
-        LASSERT(ns != NULL);
-        LASSERT(!(ns->ns_client & ~(LDLM_NAMESPACE_CLIENT | 
-                                    LDLM_NAMESPACE_SERVER)));
-        LASSERT(ns->ns_client == LDLM_NAMESPACE_CLIENT ||
-                ns->ns_client == LDLM_NAMESPACE_SERVER);
-        return ns->ns_client == LDLM_NAMESPACE_SERVER;
-}
-
-static inline int ns_connect_lru_resize(struct ldlm_namespace *ns)
-{
-        LASSERT(ns != NULL);
-        return !!(ns->ns_connect_flags & OBD_CONNECT_LRU_RESIZE);
-}
-
-/*
- *
- * Resource hash table
- *
- */
-
-#define RES_HASH_BITS 10
-#define RES_HASH_SIZE (1UL << RES_HASH_BITS)
-#define RES_HASH_MASK (RES_HASH_SIZE - 1)
-
-struct ldlm_lock;
-
-typedef int (*ldlm_blocking_callback)(struct ldlm_lock *lock,
-                                      struct ldlm_lock_desc *new, void *data,
-                                      int flag);
-typedef int (*ldlm_completion_callback)(struct ldlm_lock *lock, int flags,
-                                        void *data);
-typedef int (*ldlm_glimpse_callback)(struct ldlm_lock *lock, void *data);
-
-/* Interval node data for each LDLM_EXTENT lock */
-struct ldlm_interval {
-        struct interval_node li_node;   /* node for tree mgmt */
-        struct list_head     li_group;  /* the locks which have the same 
-                                         * policy - group of the policy */
-};
-#define to_ldlm_interval(n) container_of(n, struct ldlm_interval, li_node)
-
-/* the interval tree must be accessed inside the resource lock. */
-struct ldlm_interval_tree {
-        /* tree size, this variable is used to count
-         * granted PW locks in ldlm_extent_policy()*/
-        int                   lit_size;
-        ldlm_mode_t           lit_mode; /* lock mode */
-        struct interval_node *lit_root; /* actually ldlm_interval */
-};
-
-struct ldlm_lock {
-        struct portals_handle l_handle; // must be first in the structure
-        atomic_t              l_refc;
-
-        /* internal spinlock protects l_resource.  we should hold this lock 
-         * first before grabbing res_lock.*/
-        spinlock_t            l_lock;
-
-        /* ldlm_lock_change_resource() can change this */
-        struct ldlm_resource *l_resource;
-
-        /* protected by ns_hash_lock. FIXME */
-        struct list_head      l_lru;
-
-        /* protected by lr_lock */
-        struct list_head      l_res_link; // position in one of three res lists
-
-        struct list_head      l_sl_mode;        // skip pointer for request mode
-        struct list_head      l_sl_policy;      // skip pointer for inodebits
-
-        struct ldlm_interval *l_tree_node;      /* tree node for ldlm_extent */
-
-        /* protected by led_lock */
-        struct list_head      l_export_chain; // per-export chain of locks
-
-        /* protected by lr_lock */
-        ldlm_mode_t           l_req_mode;
-        ldlm_mode_t           l_granted_mode;
-
-        ldlm_completion_callback l_completion_ast;
-        ldlm_blocking_callback   l_blocking_ast;
-        ldlm_glimpse_callback    l_glimpse_ast;
-
-        struct obd_export    *l_export;
-        struct obd_export    *l_conn_export;
-
-        struct lustre_handle  l_remote_handle;
-        ldlm_policy_data_t    l_policy_data;
-
-        /* protected by lr_lock */
-        __u32                 l_flags;
-        __u32                 l_readers;
-        __u32                 l_writers;
-        __u8                  l_destroyed;
-
-        /* If the lock is granted, a process sleeps on this waitq to learn when
-         * it's no longer in use.  If the lock is not granted, a process sleeps
-         * on this waitq to learn when it becomes granted. */
-        cfs_waitq_t           l_waitq;
-        struct timeval        l_enqueued_time;
-
-        cfs_time_t            l_last_used;      /* jiffies */
-        struct ldlm_extent    l_req_extent;
-
-        /* Client-side-only members */
-        __u32                 l_lvb_len;        /* temporary storage for */
-        void                 *l_lvb_data;       /* an LVB received during */
-        void                 *l_lvb_swabber;    /* an enqueue */
-        void                 *l_ast_data;
-        spinlock_t            l_extents_list_lock;
-        struct list_head      l_extents_list;
-
-        struct list_head      l_cache_locks_list;
-
-        /* Server-side-only members */
-
-        /* protected by elt_lock */
-        struct list_head      l_pending_chain;  /* callbacks pending */
-        cfs_time_t            l_callback_timeout; /* jiffies */
-
-        __u32                 l_pid;            /* pid which created this lock */
-
-        /* for ldlm_add_ast_work_item() */
-        struct list_head      l_bl_ast;
-        struct list_head      l_cp_ast;
-        struct ldlm_lock     *l_blocking_lock; 
-        int                   l_bl_ast_run;
-};
-
-struct ldlm_resource {
-        struct ldlm_namespace *lr_namespace;
-
-        /* protected by ns_hash_lock */
-        struct list_head       lr_hash;
-        struct ldlm_resource  *lr_parent;   /* 0 for a root resource */
-        struct list_head       lr_children; /* list head for child resources */
-        struct list_head       lr_childof;  /* part of ns_root_list if root res,
-                                             * part of lr_children if child */
-        spinlock_t             lr_lock;
-
-        /* protected by lr_lock */
-        struct list_head       lr_granted;
-        struct list_head       lr_converting;
-        struct list_head       lr_waiting;
-        ldlm_mode_t            lr_most_restr;
-        ldlm_type_t            lr_type; /* LDLM_{PLAIN,EXTENT,FLOCK} */
-        struct ldlm_res_id     lr_name;
-        atomic_t               lr_refcount;
-
-        struct ldlm_interval_tree lr_itree[LCK_MODE_NUM];  /* interval trees*/
-
-        /* Server-side-only lock value block elements */
-        struct semaphore       lr_lvb_sem;
-        __u32                  lr_lvb_len;
-        void                  *lr_lvb_data;
-
-        /* when the resource was considered as contended */
-        cfs_time_t             lr_contention_time;
-};
-
-struct ldlm_ast_work {
-        struct ldlm_lock *w_lock;
-        int               w_blocking;
-        struct ldlm_lock_desc w_desc;
-        struct list_head   w_list;
-        int w_flags;
-        void *w_data;
-        int w_datalen;
-};
-
-/* ldlm_enqueue parameters common */
-struct ldlm_enqueue_info {
-        __u32 ei_type;   /* Type of the lock being enqueued. */
-        __u32 ei_mode;   /* Mode of the lock being enqueued. */
-        void *ei_cb_bl;  /* Different callbacks for lock handling (blocking, */
-        void *ei_cb_cp;  /* completion, glimpse) */
-        void *ei_cb_gl;
-        void *ei_cbdata; /* Data to be passed into callbacks. */
-};
-
-extern struct obd_ops ldlm_obd_ops;
-
-extern char *ldlm_lockname[];
-extern char *ldlm_typename[];
-extern char *ldlm_it2str(int it);
-
-#define ldlm_lock_debug(cdls, level, lock, file, func, line, fmt, a...) do {  \
-        CHECK_STACK();                                                  \
-                                                                        \
-        if (((level) & D_CANTMASK) != 0 ||                              \
-            ((libcfs_debug & (level)) != 0 &&                           \
-             (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0)) {        \
-                static struct libcfs_debug_msg_data _ldlm_dbg_data =    \
-                DEBUG_MSG_DATA_INIT(cdls, DEBUG_SUBSYSTEM,              \
-                                    file, func, line);                  \
-                _ldlm_lock_debug(lock, level, &_ldlm_dbg_data, fmt,     \
-                                 ##a );                                 \
-        }                                                               \
-} while(0)
-
-void _ldlm_lock_debug(struct ldlm_lock *lock, __u32 mask,
-                      struct libcfs_debug_msg_data *data, const char *fmt,
-                      ...)
-        __attribute__ ((format (printf, 4, 5)));
-
-#define LDLM_ERROR(lock, fmt, a...) do {                                 \
-        static cfs_debug_limit_state_t _ldlm_cdls;                       \
-        ldlm_lock_debug(&_ldlm_cdls, D_ERROR, lock,                      \
-                        __FILE__, __FUNCTION__, __LINE__,                \
-                        "### " fmt , ##a);                               \
-} while (0)
-
-#define LDLM_DEBUG(lock, fmt, a...)   do {                              \
-        ldlm_lock_debug(NULL, D_DLMTRACE, lock,                         \
-                        __FILE__, __FUNCTION__, __LINE__,               \
-                         "### " fmt , ##a);                             \
-} while (0)
-
-#define LDLM_DEBUG_NOLOCK(format, a...)                                 \
-        CDEBUG(D_DLMTRACE, "### " format "\n" , ##a)
-
-typedef int (*ldlm_processing_policy)(struct ldlm_lock *lock, int *flags,
-                                      int first_enq, ldlm_error_t *err,
-                                      struct list_head *work_list);
-
-/*
- * Iterators.
- */
-
-#define LDLM_ITER_CONTINUE 1 /* keep iterating */
-#define LDLM_ITER_STOP     2 /* stop iterating */
-
-typedef int (*ldlm_iterator_t)(struct ldlm_lock *, void *);
-typedef int (*ldlm_res_iterator_t)(struct ldlm_resource *, void *);
-
-int ldlm_resource_foreach(struct ldlm_resource *res, ldlm_iterator_t iter,
-                          void *closure);
-int ldlm_namespace_foreach(struct ldlm_namespace *ns, ldlm_iterator_t iter,
-                           void *closure);
-int ldlm_namespace_foreach_res(struct ldlm_namespace *ns,
-                               ldlm_res_iterator_t iter, void *closure);
-
-int ldlm_replay_locks(struct obd_import *imp);
-void ldlm_resource_iterate(struct ldlm_namespace *, struct ldlm_res_id *,
-                           ldlm_iterator_t iter, void *data);
-
-/* ldlm_flock.c */
-int ldlm_flock_completion_ast(struct ldlm_lock *lock, int flags, void *data);
-
-/* ldlm_extent.c */
-__u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms);
-
-
-/* ldlm_lockd.c */
-int ldlm_server_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
-                             void *data, int flag);
-int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data);
-int ldlm_server_glimpse_ast(struct ldlm_lock *lock, void *data);
-int ldlm_handle_enqueue(struct ptlrpc_request *req, ldlm_completion_callback,
-                        ldlm_blocking_callback, ldlm_glimpse_callback);
-int ldlm_handle_convert(struct ptlrpc_request *req);
-int ldlm_handle_cancel(struct ptlrpc_request *req);
-int ldlm_request_cancel(struct ptlrpc_request *req,
-                        struct ldlm_request *dlm_req, int first);
-int ldlm_del_waiting_lock(struct ldlm_lock *lock);
-int ldlm_refresh_waiting_lock(struct ldlm_lock *lock);
-int ldlm_get_ref(void);
-void ldlm_put_ref(int force);
-
-/* ldlm_lock.c */
-ldlm_processing_policy ldlm_get_processing_policy(struct ldlm_resource *res);
-void ldlm_register_intent(struct ldlm_namespace *ns, ldlm_res_policy arg);
-void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh);
-struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *, int flags);
-void ldlm_cancel_callback(struct ldlm_lock *);
-int ldlm_lock_set_data(struct lustre_handle *, void *data);
-int ldlm_lock_remove_from_lru(struct ldlm_lock *);
-struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *,
-                                      struct lustre_handle *);
-
-static inline struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *h)
-{
-        return __ldlm_handle2lock(h, 0);
-}
-
-static inline int ldlm_res_lvbo_update(struct ldlm_resource *res,
-                                       struct lustre_msg *m, int buf_idx,
-                                       int increase)
-{
-        if (res->lr_namespace->ns_lvbo &&
-            res->lr_namespace->ns_lvbo->lvbo_update) {
-                return res->lr_namespace->ns_lvbo->lvbo_update(res, m, buf_idx,
-                                                               increase);
-        }
-        return 0;
-}
-
-#define LDLM_LOCK_PUT(lock)                     \
-do {                                            \
-        /*LDLM_DEBUG((lock), "put");*/          \
-        ldlm_lock_put(lock);                    \
-} while (0)
-
-#define LDLM_LOCK_GET(lock)                     \
-({                                              \
-        ldlm_lock_get(lock);                    \
-        /*LDLM_DEBUG((lock), "get");*/          \
-        lock;                                   \
-})
-
-#define ldlm_lock_list_put(head, member, count)                 \
-({                                                              \
-        struct ldlm_lock *_lock, *_next;                        \
-        int c = count;                                          \
-        list_for_each_entry_safe(_lock, _next, head, member) {  \
-                if (c-- == 0)                                   \
-                        break;                                  \
-                list_del_init(&_lock->member);                  \
-                LDLM_LOCK_PUT(_lock);                           \
-        }                                                       \
-        LASSERT(c <= 0);                                       \
-})
-
-struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock);
-void ldlm_lock_put(struct ldlm_lock *lock);
-void ldlm_lock_destroy(struct ldlm_lock *lock);
-void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc);
-void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode);
-void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode);
-void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode);
-void ldlm_lock_allow_match(struct ldlm_lock *lock);
-ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags,
-                            struct ldlm_res_id *, ldlm_type_t type,
-                            ldlm_policy_data_t *, ldlm_mode_t mode,
-                            struct lustre_handle *);
-struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
-                                        __u32 *flags);
-void ldlm_lock_cancel(struct ldlm_lock *lock);
-void ldlm_cancel_locks_for_export(struct obd_export *export);
-void ldlm_reprocess_all(struct ldlm_resource *res);
-void ldlm_reprocess_all_ns(struct ldlm_namespace *ns);
-void ldlm_lock_dump(int level, struct ldlm_lock *lock, int pos);
-void ldlm_lock_dump_handle(int level, struct lustre_handle *);
-void ldlm_unlink_lock_skiplist(struct ldlm_lock *req);
-
-/* resource.c */
-struct ldlm_namespace *ldlm_namespace_new(char *name, ldlm_side_t client, 
-                                          ldlm_appetite_t apt);
-int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int flags);
-int ldlm_namespace_free(struct ldlm_namespace *ns, int force);
-void ldlm_namespace_move(struct ldlm_namespace *ns, ldlm_side_t client);
-struct ldlm_namespace *ldlm_namespace_first(ldlm_side_t client);
-void ldlm_namespace_get(struct ldlm_namespace *ns);
-void ldlm_namespace_put(struct ldlm_namespace *ns, int wakeup);
-void ldlm_namespace_get_nolock(struct ldlm_namespace *ns);
-void ldlm_namespace_put_nolock(struct ldlm_namespace *ns, int wakeup);
-int ldlm_proc_setup(void);
-#ifdef LPROCFS
-void ldlm_proc_cleanup(void);
-#else
-static inline void ldlm_proc_cleanup(void) {}
-#endif
-
-/* resource.c - internal */
-struct ldlm_resource *ldlm_resource_get(struct ldlm_namespace *ns,
-                                        struct ldlm_resource *parent,
-                                        struct ldlm_res_id, ldlm_type_t type,
-                                        int create);
-struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res);
-int ldlm_resource_putref(struct ldlm_resource *res);
-void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head,
-                            struct ldlm_lock *lock);
-void ldlm_resource_unlink_lock(struct ldlm_lock *lock);
-void ldlm_res2desc(struct ldlm_resource *res, struct ldlm_resource_desc *desc);
-void ldlm_dump_all_namespaces(ldlm_side_t client, int level);
-void ldlm_namespace_dump(int level, struct ldlm_namespace *);
-void ldlm_resource_dump(int level, struct ldlm_resource *);
-int ldlm_lock_change_resource(struct ldlm_namespace *, struct ldlm_lock *,
-                              struct ldlm_res_id);
-
-/* ldlm_request.c */
-int ldlm_expired_completion_wait(void *data);
-int ldlm_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
-                      void *data, int flag);
-int ldlm_glimpse_ast(struct ldlm_lock *lock, void *reqp);
-int ldlm_completion_ast(struct ldlm_lock *lock, int flags, void *data);
-int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **req,
-                     struct ldlm_enqueue_info *einfo, struct ldlm_res_id res_id,
-                     ldlm_policy_data_t *policy, int *flags,
-                     void *lvb, __u32 lvb_len, void *lvb_swabber,
-                     struct lustre_handle *lockh, int async);
-struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp,
-                                             int bufcount, int *size,
-                                             struct list_head *head, int count);
-struct ptlrpc_request *ldlm_prep_elc_req(struct obd_export *exp, int version,
-                                         int opc, int bufcount, int *size,
-                                         int bufoff, int canceloff,
-                                         struct list_head *cancels, int count);
-int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
-                          ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode,
-                          int *flags, void *lvb, __u32 lvb_len,
-                          void *lvb_swabber, struct lustre_handle *lockh,
-                          int rc);
-int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
-                           struct ldlm_res_id *res_id,
-                           ldlm_type_t type, ldlm_policy_data_t *policy,
-                           ldlm_mode_t mode, int *flags,
-                           ldlm_blocking_callback blocking,
-                           ldlm_completion_callback completion,
-                           ldlm_glimpse_callback glimpse,
-                           void *data, __u32 lvb_len, void *lvb_swabber,
-                           struct lustre_handle *lockh);
-int ldlm_server_ast(struct lustre_handle *lockh, struct ldlm_lock_desc *new,
-                    void *data, __u32 data_len);
-int ldlm_cli_convert(struct lustre_handle *, int new_mode, __u32 *flags);
-int ldlm_cli_update_pool(struct ptlrpc_request *req);
-int ldlm_cli_cancel(struct lustre_handle *lockh);
-int ldlm_cli_cancel_unused(struct ldlm_namespace *, struct ldlm_res_id *,
-                           int flags, void *opaque);
-int ldlm_cli_cancel_req(struct obd_export *exp,
-                        struct list_head *head, int count);
-int ldlm_cli_join_lru(struct ldlm_namespace *, struct ldlm_res_id *, int join);
-int ldlm_cancel_resource_local(struct ldlm_resource *res,
-                               struct list_head *cancels,
-                               ldlm_policy_data_t *policy, ldlm_mode_t mode,
-                               int lock_flags, int cancel_flags, void *opaque);
-int ldlm_cli_cancel_list(struct list_head *head, int count,
-                         struct ptlrpc_request *req, int off);
-/* mds/handler.c */
-/* This has to be here because recursive inclusion sucks. */
-int intent_disposition(struct ldlm_reply *rep, int flag);
-void intent_set_disposition(struct ldlm_reply *rep, int flag);
-
-
-/* ioctls for trying requests */
-#define IOC_LDLM_TYPE                   'f'
-#define IOC_LDLM_MIN_NR                 40
-
-#define IOC_LDLM_TEST                   _IOWR('f', 40, long)
-#define IOC_LDLM_DUMP                   _IOWR('f', 41, long)
-#define IOC_LDLM_REGRESS_START          _IOWR('f', 42, long)
-#define IOC_LDLM_REGRESS_STOP           _IOWR('f', 43, long)
-#define IOC_LDLM_MAX_NR                 43
-
-static inline void lock_res(struct ldlm_resource *res)
-{
-        spin_lock(&res->lr_lock);
-}
-
-static inline void unlock_res(struct ldlm_resource *res)
-{
-        spin_unlock(&res->lr_lock);
-}
-
-static inline void check_res_locked(struct ldlm_resource *res)
-{
-        LASSERT_SPIN_LOCKED(&res->lr_lock);
-}
-
-struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock);
-void unlock_res_and_lock(struct ldlm_lock *lock);
-
-/* ldlm_pool.c */
-void ldlm_pools_recalc(ldlm_side_t client);
-int ldlm_pools_init(void);
-void ldlm_pools_fini(void);
-void ldlm_pools_wakeup(void);
-
-int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns, 
-                   int idx, ldlm_side_t client);
-int ldlm_pool_shrink(struct ldlm_pool *pl, int nr, 
-                     unsigned int gfp_mask);
-void ldlm_pool_fini(struct ldlm_pool *pl);
-int ldlm_pool_setup(struct ldlm_pool *pl, int limit);
-int ldlm_pool_recalc(struct ldlm_pool *pl);
-__u64 ldlm_pool_get_slv(struct ldlm_pool *pl);
-__u32 ldlm_pool_get_limit(struct ldlm_pool *pl);
-void ldlm_pool_set_slv(struct ldlm_pool *pl, __u64 slv);
-void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit);
-void ldlm_pool_add(struct ldlm_pool *pl, struct ldlm_lock *lock);
-void ldlm_pool_del(struct ldlm_pool *pl, struct ldlm_lock *lock);
-#endif
diff --git a/lustre/include/lustre_export.h b/lustre/include/lustre_export.h
deleted file mode 100644
index 7ece7a25bfe96d2045e19398eb1a46eda17b0081..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_export.h
+++ /dev/null
@@ -1,137 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __EXPORT_H
-#define __EXPORT_H
-
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-
-/* Data stored per client in the last_rcvd file.  In le32 order. */
-struct mds_client_data;
-
-struct mds_export_data {
-        struct list_head        med_open_head;
-        spinlock_t              med_open_lock; /* lock med_open_head, mfd_list*/
-        struct mds_client_data *med_mcd;
-        __u64                   med_ibits_known;
-        loff_t                  med_lr_off;
-        int                     med_lr_idx;
-};
-
-struct osc_creator {
-        spinlock_t              oscc_lock;
-        struct list_head        oscc_list;
-        struct obd_device       *oscc_obd;
-        obd_id                  oscc_last_id;//last available pre-created object
-        obd_id                  oscc_next_id;// what object id to give out next
-        int                     oscc_grow_count;
-        struct obdo             oscc_oa;
-        int                     oscc_flags;
-        cfs_waitq_t             oscc_waitq; /* creating procs wait on this */
-};
-
-struct ldlm_export_data {
-        struct list_head       led_held_locks; /* protected by led_lock below */
-        spinlock_t             led_lock;
-};
-
-struct ec_export_data { /* echo client */
-        struct list_head eced_locks;
-};
-
-/* In-memory access to client data from OST struct */
-struct filter_client_data;
-struct filter_export_data {
-        spinlock_t                 fed_lock;      /* protects fed_open_head */
-        struct filter_client_data *fed_fcd;
-        loff_t                     fed_lr_off;
-        int                        fed_lr_idx;
-        long                       fed_dirty;    /* in bytes */
-        long                       fed_grant;    /* in bytes */
-        struct list_head           fed_mod_list; /* files being modified */
-        int                        fed_mod_count;/* items in fed_writing list */
-        long                       fed_pending;  /* bytes just being written */
-        struct brw_stats           fed_brw_stats;
-};
-
-typedef struct nid_stat {
-        lnet_nid_t               nid;
-        struct hlist_node        nid_hash;
-        struct list_head         nid_list;
-        struct obd_device       *nid_obd;
-        struct proc_dir_entry   *nid_proc;
-        struct lprocfs_stats    *nid_stats;
-        struct brw_stats        *nid_brw_stats;
-        int                      nid_exp_ref_count;
-}nid_stat_t;
-
-struct obd_export {
-        struct portals_handle     exp_handle;
-        atomic_t                  exp_refcount;
-        atomic_t                  exp_rpc_count;
-        struct obd_uuid           exp_client_uuid;
-        struct list_head          exp_obd_chain;
-        struct hlist_node         exp_uuid_hash; /* uuid-export hash*/
-        struct hlist_node         exp_nid_hash; /* nid-export hash */
-        /* exp_obd_chain_timed fo ping evictor, protected by obd_dev_lock */
-        struct list_head          exp_obd_chain_timed;
-        struct obd_device        *exp_obd;
-        struct obd_import        *exp_imp_reverse; /* to make RPCs backwards */
-        struct nid_stat          *exp_nid_stats;
-        struct lprocfs_stats     *exp_ldlm_stats;
-        struct lprocfs_stats     *exp_ops_stats;
-        struct ptlrpc_connection *exp_connection;
-        __u32                     exp_conn_cnt;
-        struct ldlm_export_data   exp_ldlm_data;
-        struct list_head          exp_outstanding_replies;
-        time_t                    exp_last_request_time;
-        spinlock_t                exp_lock; /* protects flags int below */
-        /* ^ protects exp_outstanding_replies too */
-        __u64                     exp_connect_flags;
-        int                       exp_flags;
-        unsigned long             exp_failed:1,
-                                  exp_disconnected:1,
-                                  exp_connecting:1,
-                                  exp_replay_needed:1,
-                                  exp_need_sync:1, /* needs sync from connect */
-                                  exp_libclient:1; /* liblustre client? */
-        union {
-                struct mds_export_data    eu_mds_data;
-                struct filter_export_data eu_filter_data;
-                struct ec_export_data     eu_ec_data;
-        } u;
-};
-
-#define exp_mds_data    u.eu_mds_data
-#define exp_lov_data    u.eu_lov_data
-#define exp_filter_data u.eu_filter_data
-#define exp_ec_data     u.eu_ec_data
-
-static inline int exp_connect_cancelset(struct obd_export *exp)
-{
-        LASSERT(exp != NULL);
-        return !!(exp->exp_connect_flags & OBD_CONNECT_CANCELSET);
-}
-
-static inline int exp_connect_lru_resize(struct obd_export *exp)
-{
-        LASSERT(exp != NULL);
-        return !!(exp->exp_connect_flags & OBD_CONNECT_LRU_RESIZE);
-}
-
-static inline int imp_connect_lru_resize(struct obd_import *imp)
-{
-        struct obd_connect_data *ocd;
-
-        LASSERT(imp != NULL);
-        ocd = &imp->imp_connect_data;
-        return !!(ocd->ocd_connect_flags & OBD_CONNECT_LRU_RESIZE);
-}
-
-extern struct obd_export *class_conn2export(struct lustre_handle *conn);
-extern struct obd_device *class_conn2obd(struct lustre_handle *conn);
-
-#endif /* __EXPORT_H */
diff --git a/lustre/include/lustre_fsfilt.h b/lustre/include/lustre_fsfilt.h
deleted file mode 100644
index 41b943143f3d3695013fef15515c386700afa2a6..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_fsfilt.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2004 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Filesystem interface helper.
- *
- */
-
-#ifndef _LUSTRE_FSFILT_H
-#define _LUSTRE_FSFILT_H
-
-#if defined(__linux__)
-#include <linux/lustre_fsfilt.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_fsfilt.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_fsfilt.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#endif
diff --git a/lustre/include/lustre_ha.h b/lustre/include/lustre_ha.h
deleted file mode 100644
index 43071ba41fb943e41a3f0eb278ba89301c6dc1cc..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_ha.h
+++ /dev/null
@@ -1,25 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _LUSTRE_HA_H
-#define _LUSTRE_HA_H
-
-struct obd_import;
-struct obd_export;
-struct obd_device;
-struct ptlrpc_request;
-
-
-int ptlrpc_replay(struct obd_import *imp);
-int ptlrpc_resend(struct obd_import *imp);
-void ptlrpc_free_committed(struct obd_import *imp);
-void ptlrpc_wake_delayed(struct obd_import *imp);
-int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid);
-int ptlrpc_set_import_active(struct obd_import *imp, int active);
-void ptlrpc_activate_import(struct obd_import *imp);
-void ptlrpc_deactivate_import(struct obd_import *imp);
-void ptlrpc_invalidate_import(struct obd_import *imp);
-void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt);
-
-#endif
diff --git a/lustre/include/lustre_handles.h b/lustre/include/lustre_handles.h
deleted file mode 100644
index 918617391caae201679586f6518c5976cb4e7ad2..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_handles.h
+++ /dev/null
@@ -1,54 +0,0 @@
-#ifndef __LUSTRE_HANDLES_H_
-#define __LUSTRE_HANDLES_H_
-
-#if defined(__linux__)
-#include <linux/lustre_handles.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_handles.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_handles.h>
-#else
-#error Unsupported operating system.
-#endif
-
-typedef void (*portals_handle_addref_cb)(void *object);
-
-/* These handles are most easily used by having them appear at the very top of
- * whatever object that you want to make handles for.  ie:
- *
- * struct ldlm_lock {
- *         struct portals_handle handle;
- *         ...
- * };
- *
- * Now you're able to assign the results of cookie2handle directly to an
- * ldlm_lock.  If it's not at the top, you'll want to hack up a macro that
- * uses some offsetof() magic. */
-
-struct portals_handle {
-        struct list_head h_link;
-        __u64 h_cookie;
-        portals_handle_addref_cb h_addref;
-
-        /* newly added fields to handle the RCU issue. -jxiong */
-        spinlock_t h_lock;
-        void *h_ptr;
-        void (*h_free_cb)(void *, size_t);
-        struct rcu_head h_rcu;
-        unsigned int h_size;
-        __u8 h_in:1;
-        __u8 h_unused[3];
-};
-#define RCU2HANDLE(rcu)    container_of(rcu, struct portals_handle, h_rcu)
-
-/* handles.c */
-
-/* Add a handle to the hash table */
-void class_handle_hash(struct portals_handle *, portals_handle_addref_cb);
-void class_handle_unhash(struct portals_handle *);
-void *class_handle2object(__u64 cookie);
-void class_handle_free_cb(struct rcu_head *);
-int class_handle_init(void);
-void class_handle_cleanup(void);
-
-#endif
diff --git a/lustre/include/lustre_import.h b/lustre/include/lustre_import.h
deleted file mode 100644
index fb663237e745b82a9c15f7f1517256f368adfe7f..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_import.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __IMPORT_H
-#define __IMPORT_H
-
-#include <lustre_handles.h>
-#include <lustre/lustre_idl.h>
-
-
-/* Adaptive Timeout stuff */
-#define D_ADAPTTO D_OTHER
-#define AT_BINS 4                  /* "bin" means "N seconds of history" */
-#define AT_FLG_NOHIST 0x1          /* use last reported value only */
-
-struct adaptive_timeout {
-        time_t       at_binstart;         /* bin start time */
-        unsigned int at_hist[AT_BINS];    /* timeout history bins */
-        unsigned int at_flags;
-        unsigned int at_current;          /* current timeout value */
-        unsigned int at_worst_ever;       /* worst-ever timeout value */
-        time_t       at_worst_time;       /* worst-ever timeout timestamp */
-        spinlock_t   at_lock;
-};
-
-enum lustre_imp_state {
-        LUSTRE_IMP_CLOSED     = 1,
-        LUSTRE_IMP_NEW        = 2,
-        LUSTRE_IMP_DISCON     = 3,
-        LUSTRE_IMP_CONNECTING = 4,
-        LUSTRE_IMP_REPLAY     = 5,
-        LUSTRE_IMP_REPLAY_LOCKS = 6,
-        LUSTRE_IMP_REPLAY_WAIT  = 7,
-        LUSTRE_IMP_RECOVER    = 8,
-        LUSTRE_IMP_FULL       = 9,
-        LUSTRE_IMP_EVICTED    = 10,
-};
-
-static inline char * ptlrpc_import_state_name(enum lustre_imp_state state)
-{
-        static char* import_state_names[] = {
-                "<UNKNOWN>", "CLOSED",  "NEW", "DISCONN",
-                "CONNECTING", "REPLAY", "REPLAY_LOCKS", "REPLAY_WAIT",
-                "RECOVER", "FULL", "EVICTED",
-        };
-
-        LASSERT (state <= LUSTRE_IMP_EVICTED);
-        return import_state_names[state];
-}
-
-enum obd_import_event {
-        IMP_EVENT_DISCON     = 0x808001,
-        IMP_EVENT_INACTIVE   = 0x808002,
-        IMP_EVENT_INVALIDATE = 0x808003,
-        IMP_EVENT_ACTIVE     = 0x808004,
-        IMP_EVENT_OCD        = 0x808005,
-};
-
-struct obd_import_conn {
-        struct list_head          oic_item;
-        struct ptlrpc_connection *oic_conn;
-        struct obd_uuid           oic_uuid;
-        __u64                     oic_last_attempt; /* jiffies, 64-bit */
-};
-
-#define IMP_AT_MAX_PORTALS 4
-struct imp_at {
-        int                     iat_portal[IMP_AT_MAX_PORTALS];
-        struct adaptive_timeout iat_net_latency;
-        struct adaptive_timeout iat_service_estimate[IMP_AT_MAX_PORTALS];
-};
-
-struct obd_import {
-        struct portals_handle     imp_handle;
-        atomic_t                  imp_refcount;
-        struct lustre_handle      imp_dlm_handle; /* client's ldlm export */
-        struct ptlrpc_connection *imp_connection;
-        struct ptlrpc_client     *imp_client;
-        struct list_head          imp_pinger_chain;
-        struct list_head          imp_zombie_chain; /* queue for destruction */
-
-        /* Lists of requests that are retained for replay, waiting for a reply,
-         * or waiting for recovery to complete, respectively.
-         */
-        struct list_head          imp_replay_list;
-        struct list_head          imp_sending_list;
-        struct list_head          imp_delayed_list;
-
-        struct obd_device        *imp_obd;
-        cfs_waitq_t               imp_recovery_waitq;
-
-        atomic_t                  imp_inflight;
-        atomic_t                  imp_replay_inflight;
-        atomic_t                  imp_inval_count;
-        enum lustre_imp_state     imp_state;
-        int                       imp_generation;
-        __u32                     imp_conn_cnt;
-        int                       imp_last_generation_checked;
-        __u64                     imp_last_replay_transno;
-        __u64                     imp_peer_committed_transno;
-        __u64                     imp_last_transno_checked;
-        struct lustre_handle      imp_remote_handle;
-        cfs_time_t                imp_next_ping;   /* jiffies */
-        __u64                     imp_last_success_conn;   /* jiffies, 64-bit */
-
-        /* all available obd_import_conn linked here */
-        struct list_head          imp_conn_list;
-        struct obd_import_conn   *imp_conn_current;
-
-        /* Protects flags, level, generation, conn_cnt, *_list */
-        spinlock_t                imp_lock;
-
-        /* flags */
-        unsigned long             imp_invalid:1,          /* evicted */
-                                  imp_deactive:1,         /* administratively disabled */
-                                  imp_replayable:1,       /* try to recover the import */
-                                  imp_dlm_fake:1,         /* don't run recovery (timeout instead) */
-                                  imp_server_timeout:1,   /* use 1/2 timeout on MDS' OSCs */
-                                  imp_initial_recov:1,    /* retry the initial connection */  
-                                  imp_initial_recov_bk:1, /* turn off init_recov after trying all failover nids */
-                                  imp_force_verify:1,     /* force an immidiate ping */
-                                  imp_pingable:1,         /* pingable */
-                                  imp_resend_replay:1,    /* resend for replay */
-                                  imp_recon_bk:1,         /* turn off reconnect if all failovers fail */
-                                  imp_last_recon:1;       /* internally used by above */
-        __u32                     imp_connect_op;
-        struct obd_connect_data   imp_connect_data;
-        __u64                     imp_connect_flags_orig;
-
-        __u32                     imp_msg_magic;
-        __u32                     imp_msghdr_flags;       /* adjusted based on server capability */
-
-        struct ptlrpc_request_pool *imp_rq_pool;          /* emergency request pool */
-
-        struct imp_at             imp_at;                 /* adaptive timeout data */
-        time_t                    imp_last_reply_time;    /* for health check */
-};
-
-/* import.c */
-static inline void at_init(struct adaptive_timeout *at, int val, int flags) {
-        memset(at, 0, sizeof(*at));
-        at->at_current = val;
-        at->at_worst_ever = val;
-        at->at_worst_time = cfs_time_current_sec();
-        at->at_flags = flags;
-        spin_lock_init(&at->at_lock);
-}
-static inline int at_get(struct adaptive_timeout *at) {
-        return at->at_current;
-}
-int at_add(struct adaptive_timeout *at, unsigned int val);
-int import_at_get_index(struct obd_import *imp, int portal);
-extern unsigned int at_max;
-#define AT_OFF (at_max == 0)
-
-/* genops.c */
-struct obd_export;
-extern struct obd_import *class_exp2cliimp(struct obd_export *);
-extern struct obd_import *class_conn2cliimp(struct lustre_handle *);
-
-#endif /* __IMPORT_H */
diff --git a/lustre/include/lustre_lib.h b/lustre/include/lustre_lib.h
deleted file mode 100644
index 67c20a09c98212277ef13c87e1738d8a633fea1b..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_lib.h
+++ /dev/null
@@ -1,762 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Basic Lustre library routines.
- *
- */
-
-#ifndef _LUSTRE_LIB_H
-#define _LUSTRE_LIB_H
-
-#include <libcfs/kp30.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_ver.h>
-#include <lustre_cfg.h>
-#if defined(__linux__)
-#include <linux/lustre_lib.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_lib.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_lib.h>
-#else
-#error Unsupported operating system.
-#endif
-
-/* prng.c */
-unsigned int ll_rand(void);        /* returns a random 32-bit integer */
-void ll_srand(unsigned int, unsigned int);     /* seed the generator */
-void ll_get_random_bytes(void *buf, int size);
-
-/* target.c */
-struct ptlrpc_request;
-struct recovd_data;
-struct recovd_obd;
-struct obd_export;
-#include <lustre_ha.h>
-#include <lustre_net.h>
-#include <lvfs.h>
-
-void target_client_add_cb(struct obd_device *obd, __u64 transno, void *cb_data,
-                          int error);
-int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler);
-int target_handle_disconnect(struct ptlrpc_request *req);
-void target_destroy_export(struct obd_export *exp);
-int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp,
-                            struct obd_uuid *cluuid);
-int target_handle_ping(struct ptlrpc_request *req);
-int target_pack_pool_reply(struct ptlrpc_request *req);
-void target_committed_to_req(struct ptlrpc_request *req);
-
-#ifdef HAVE_QUOTA_SUPPORT
-/* quotacheck callback, dqacq/dqrel callback handler */
-int target_handle_qc_callback(struct ptlrpc_request *req);
-int target_handle_dqacq_callback(struct ptlrpc_request *req);
-#else
-#define target_handle_dqacq_callback(req) ldlm_callback_reply(req, -ENOTSUPP)
-#define target_handle_qc_callback(req) (0)
-#endif
-
-void target_cancel_recovery_timer(struct obd_device *obd);
-void target_abort_recovery(void *data);
-void target_cleanup_recovery(struct obd_device *obd);
-int target_queue_recovery_request(struct ptlrpc_request *req,
-                                  struct obd_device *obd);
-int target_queue_last_replay_reply(struct ptlrpc_request *req, int rc);
-void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id);
-
-/* client.c */
-
-int client_sanobd_setup(struct obd_device *obddev, obd_count len, void *buf);
-struct client_obd *client_conn2cli(struct lustre_handle *conn);
-
-struct mdc_open_data;
-struct obd_client_handle {
-        struct lustre_handle och_fh;
-        struct llog_cookie och_cookie;
-        struct mdc_open_data *och_mod;
-        __u32 och_magic;
-};
-#define OBD_CLIENT_HANDLE_MAGIC 0xd15ea5ed
-
-/* statfs_pack.c */
-void statfs_pack(struct obd_statfs *osfs, struct kstatfs *sfs);
-void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs);
-
-/* l_lock.c */
-struct lustre_lock {
-        int l_depth;
-        cfs_task_t *l_owner;
-        struct semaphore l_sem;
-        spinlock_t l_spin;
-};
-
-void l_lock_init(struct lustre_lock *);
-void l_lock(struct lustre_lock *);
-void l_unlock(struct lustre_lock *);
-int l_has_lock(struct lustre_lock *);
-
-
-/*
- *   OBD IOCTLS
- */
-#define OBD_IOCTL_VERSION 0x00010004
-
-struct obd_ioctl_data {
-        __u32 ioc_len;
-        __u32 ioc_version;
-
-        __u64 ioc_cookie;
-        __u32 ioc_conn1;
-        __u32 ioc_conn2;
-
-        struct obdo ioc_obdo1;
-        struct obdo ioc_obdo2;
-
-        obd_size         ioc_count;
-        obd_off          ioc_offset;
-        __u32            ioc_dev;
-        __u32            ioc_command;
-
-        __u64 ioc_nid;
-        __u32 ioc_nal;
-        __u32 ioc_type;
-
-        /* buffers the kernel will treat as user pointers */
-        __u32    ioc_plen1;
-        char    *ioc_pbuf1;
-        __u32    ioc_plen2;
-        char    *ioc_pbuf2;
-
-        /* inline buffers for various arguments */
-        __u32    ioc_inllen1;
-        char    *ioc_inlbuf1;
-        __u32    ioc_inllen2;
-        char    *ioc_inlbuf2;
-        __u32    ioc_inllen3;
-        char    *ioc_inlbuf3;
-        __u32    ioc_inllen4;
-        char    *ioc_inlbuf4;
-
-        char    ioc_bulk[0];
-};
-
-struct obd_ioctl_hdr {
-        __u32    ioc_len;
-        __u32    ioc_version;
-};
-
-static inline int obd_ioctl_packlen(struct obd_ioctl_data *data)
-{
-        int len = size_round(sizeof(struct obd_ioctl_data));
-        len += size_round(data->ioc_inllen1);
-        len += size_round(data->ioc_inllen2);
-        len += size_round(data->ioc_inllen3);
-        len += size_round(data->ioc_inllen4);
-        return len;
-}
-
-
-static inline int obd_ioctl_is_invalid(struct obd_ioctl_data *data)
-{
-        if (data->ioc_len > (1<<30)) {
-                CERROR("OBD ioctl: ioc_len larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inllen1 > (1<<30)) {
-                CERROR("OBD ioctl: ioc_inllen1 larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inllen2 > (1<<30)) {
-                CERROR("OBD ioctl: ioc_inllen2 larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inllen3 > (1<<30)) {
-                CERROR("OBD ioctl: ioc_inllen3 larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inllen4 > (1<<30)) {
-                CERROR("OBD ioctl: ioc_inllen4 larger than 1<<30\n");
-                return 1;
-        }
-        if (data->ioc_inlbuf1 && !data->ioc_inllen1) {
-                CERROR("OBD ioctl: inlbuf1 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_inlbuf2 && !data->ioc_inllen2) {
-                CERROR("OBD ioctl: inlbuf2 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_inlbuf3 && !data->ioc_inllen3) {
-                CERROR("OBD ioctl: inlbuf3 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_inlbuf4 && !data->ioc_inllen4) {
-                CERROR("OBD ioctl: inlbuf4 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_pbuf1 && !data->ioc_plen1) {
-                CERROR("OBD ioctl: pbuf1 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_pbuf2 && !data->ioc_plen2) {
-                CERROR("OBD ioctl: pbuf2 pointer but 0 length\n");
-                return 1;
-        }
-        if (data->ioc_plen1 && !data->ioc_pbuf1) {
-                CERROR("OBD ioctl: plen1 set but NULL pointer\n");
-                return 1;
-        }
-        if (data->ioc_plen2 && !data->ioc_pbuf2) {
-                CERROR("OBD ioctl: plen2 set but NULL pointer\n");
-                return 1;
-        }
-        if (obd_ioctl_packlen(data) > data->ioc_len) {
-                CERROR("OBD ioctl: packlen exceeds ioc_len (%d > %d)\n",
-                       obd_ioctl_packlen(data), data->ioc_len);
-                return 1;
-        }
-        return 0;
-}
-
-#ifndef __KERNEL__
-static inline int obd_ioctl_pack(struct obd_ioctl_data *data, char **pbuf,
-                                 int max)
-{
-        char *ptr;
-        struct obd_ioctl_data *overlay;
-        data->ioc_len = obd_ioctl_packlen(data);
-        data->ioc_version = OBD_IOCTL_VERSION;
-
-        if (*pbuf && data->ioc_len > max)
-                return -EINVAL;
-        if (*pbuf == NULL) {
-                *pbuf = malloc(data->ioc_len);
-        }
-        if (!*pbuf)
-                return -ENOMEM;
-        overlay = (struct obd_ioctl_data *)*pbuf;
-        memcpy(*pbuf, data, sizeof(*data));
-
-        ptr = overlay->ioc_bulk;
-        if (data->ioc_inlbuf1)
-                LOGL(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
-        if (data->ioc_inlbuf2)
-                LOGL(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
-        if (data->ioc_inlbuf3)
-                LOGL(data->ioc_inlbuf3, data->ioc_inllen3, ptr);
-        if (data->ioc_inlbuf4)
-                LOGL(data->ioc_inlbuf4, data->ioc_inllen4, ptr);
-        if (obd_ioctl_is_invalid(overlay))
-                return -EINVAL;
-
-        return 0;
-}
-
-static inline int obd_ioctl_unpack(struct obd_ioctl_data *data, char *pbuf,
-                                   int max)
-{
-        char *ptr;
-        struct obd_ioctl_data *overlay;
-
-        if (!pbuf)
-                return 1;
-        overlay = (struct obd_ioctl_data *)pbuf;
-
-        /* Preserve the caller's buffer pointers */
-        overlay->ioc_inlbuf1 = data->ioc_inlbuf1;
-        overlay->ioc_inlbuf2 = data->ioc_inlbuf2;
-        overlay->ioc_inlbuf3 = data->ioc_inlbuf3;
-        overlay->ioc_inlbuf4 = data->ioc_inlbuf4;
-
-        memcpy(data, pbuf, sizeof(*data));
-
-        ptr = overlay->ioc_bulk;
-        if (data->ioc_inlbuf1)
-                LOGU(data->ioc_inlbuf1, data->ioc_inllen1, ptr);
-        if (data->ioc_inlbuf2)
-                LOGU(data->ioc_inlbuf2, data->ioc_inllen2, ptr);
-        if (data->ioc_inlbuf3)
-                LOGU(data->ioc_inlbuf3, data->ioc_inllen3, ptr);
-        if (data->ioc_inlbuf4)
-                LOGU(data->ioc_inlbuf4, data->ioc_inllen4, ptr);
-
-        return 0;
-}
-#endif
-
-#include <obd_support.h>
-
-#ifdef __KERNEL__
-/* function defined in lustre/obdclass/<platform>/<platform>-module.c */
-int obd_ioctl_getdata(char **buf, int *len, void *arg);
-int obd_ioctl_popdata(void *arg, void *data, int len);
-#else
-/* buffer MUST be at least the size of obd_ioctl_hdr */
-static inline int obd_ioctl_getdata(char **buf, int *len, void *arg)
-{
-        struct obd_ioctl_hdr hdr;
-        struct obd_ioctl_data *data;
-        int err;
-        int offset = 0;
-        ENTRY;
-
-        err = copy_from_user(&hdr, (void *)arg, sizeof(hdr));
-        if (err) 
-                RETURN(err);
-
-        if (hdr.ioc_version != OBD_IOCTL_VERSION) {
-                CERROR("Version mismatch kernel vs application\n");
-                RETURN(-EINVAL);
-        }
-
-        if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) {
-                CERROR("User buffer len %d exceeds %d max buffer\n",
-                       hdr.ioc_len, OBD_MAX_IOCTL_BUFFER);
-                RETURN(-EINVAL);
-        }
-
-        if (hdr.ioc_len < sizeof(struct obd_ioctl_data)) {
-                CERROR("User buffer too small for ioctl (%d)\n", hdr.ioc_len);
-                RETURN(-EINVAL);
-        }
-
-        /* XXX allocate this more intelligently, using kmalloc when
-         * appropriate */
-        OBD_VMALLOC(*buf, hdr.ioc_len);
-        if (*buf == NULL) {
-                CERROR("Cannot allocate control buffer of len %d\n",
-                       hdr.ioc_len);
-                RETURN(-EINVAL);
-        }
-        *len = hdr.ioc_len;
-        data = (struct obd_ioctl_data *)*buf;
-
-        err = copy_from_user(*buf, (void *)arg, hdr.ioc_len);
-        if (err) {
-                OBD_VFREE(*buf, hdr.ioc_len);
-                RETURN(err);
-        }
-
-        if (obd_ioctl_is_invalid(data)) {
-                CERROR("ioctl not correctly formatted\n");
-                OBD_VFREE(*buf, hdr.ioc_len);
-                RETURN(-EINVAL);
-        }
-
-        if (data->ioc_inllen1) {
-                data->ioc_inlbuf1 = &data->ioc_bulk[0];
-                offset += size_round(data->ioc_inllen1);
-        }
-
-        if (data->ioc_inllen2) {
-                data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset;
-                offset += size_round(data->ioc_inllen2);
-        }
-
-        if (data->ioc_inllen3) {
-                data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset;
-                offset += size_round(data->ioc_inllen3);
-        }
-
-        if (data->ioc_inllen4) {
-                data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset;
-        }
-
-        RETURN(0);
-}
-
-static inline int obd_ioctl_popdata(void *arg, void *data, int len)
-{
-        int err = copy_to_user(arg, data, len);
-        if (err)
-                err = -EFAULT;
-        return err;
-}
-#endif
-
-static inline void obd_ioctl_freedata(char *buf, int len)
-{
-        ENTRY;
-
-        OBD_VFREE(buf, len);
-        EXIT;
-        return;
-}
-
-/*
- * BSD ioctl description:
- * #define IOC_V1       _IOR(g, n1, long)
- * #define IOC_V2       _IOW(g, n2, long)
- *
- * ioctl(f, IOC_V1, arg);
- * arg will be treated as a long value,
- *
- * ioctl(f, IOC_V2, arg)
- * arg will be treated as a pointer, bsd will call
- * copyin(buf, arg, sizeof(long))
- *
- * To make BSD ioctl handles argument correctly and simplely, 
- * we change _IOR to _IOWR so BSD will copyin obd_ioctl_data 
- * for us. Does this change affect Linux?  (XXX Liang)
- */
-#define OBD_IOC_CREATE                 _IOWR('f', 101, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_DESTROY                _IOW ('f', 104, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_PREALLOCATE            _IOWR('f', 105, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_SETATTR                _IOW ('f', 107, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_GETATTR                _IOWR ('f', 108, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_READ                   _IOWR('f', 109, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_WRITE                  _IOWR('f', 110, OBD_IOC_DATA_TYPE)
-
-
-#define OBD_IOC_STATFS                 _IOWR('f', 113, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_SYNC                   _IOW ('f', 114, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_READ2                  _IOWR('f', 115, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_FORMAT                 _IOWR('f', 116, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_PARTITION              _IOWR('f', 117, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_COPY                   _IOWR('f', 120, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_MIGR                   _IOWR('f', 121, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_PUNCH                  _IOWR('f', 122, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_MODULE_DEBUG           _IOWR('f', 124, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_BRW_READ               _IOWR('f', 125, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_BRW_WRITE              _IOWR('f', 126, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_NAME2DEV               _IOWR('f', 127, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_UUID2DEV               _IOWR('f', 130, OBD_IOC_DATA_TYPE)
-/* OBD_IOC_GETNAME_OLD is for compatibility with 1.4.x */
-#define OBD_IOC_GETNAME_OLD            _IOR ('f', 131, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_GETNAME                _IOWR('f', 131, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_LOV_GET_CONFIG         _IOWR('f', 132, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_CLIENT_RECOVER         _IOW ('f', 133, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_DEC_FS_USE_COUNT       _IO  ('f', 139      )
-#define OBD_IOC_NO_TRANSNO             _IOW ('f', 140, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_SET_READONLY           _IOW ('f', 141, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_ABORT_RECOVERY         _IOR ('f', 142, OBD_IOC_DATA_TYPE)
-
-#define OBD_GET_VERSION                _IOWR ('f', 144, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_CLOSE_UUID             _IOWR ('f', 147, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_GETDEVICE              _IOWR ('f', 149, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_LOV_SETSTRIPE          _IOW ('f', 154, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LOV_GETSTRIPE          _IOW ('f', 155, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LOV_SETEA              _IOW ('f', 156, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_QUOTACHECK             _IOW ('f', 160, int)
-#define OBD_IOC_POLL_QUOTACHECK        _IOR ('f', 161, struct if_quotacheck *)
-#define OBD_IOC_QUOTACTL               _IOWR('f', 162, struct if_quotactl *)
-
-#define OBD_IOC_MOUNTOPT               _IOWR('f', 170, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_RECORD                 _IOWR('f', 180, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_ENDRECORD              _IOWR('f', 181, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_PARSE                  _IOWR('f', 182, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_DORECORD               _IOWR('f', 183, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_PROCESS_CFG            _IOWR('f', 184, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_DUMP_LOG               _IOWR('f', 185, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_CLEAR_LOG              _IOWR('f', 186, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_PARAM                  _IOW ('f', 187, OBD_IOC_DATA_TYPE)
-
-#define OBD_IOC_CATLOGLIST             _IOWR('f', 190, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LLOG_INFO              _IOWR('f', 191, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LLOG_PRINT             _IOWR('f', 192, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LLOG_CANCEL            _IOWR('f', 193, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LLOG_REMOVE            _IOWR('f', 194, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LLOG_CHECK             _IOWR('f', 195, OBD_IOC_DATA_TYPE)
-#define OBD_IOC_LLOG_CATINFO           _IOWR('f', 196, OBD_IOC_DATA_TYPE)
-
-#define ECHO_IOC_GET_STRIPE            _IOWR('f', 200, OBD_IOC_DATA_TYPE)
-#define ECHO_IOC_SET_STRIPE            _IOWR('f', 201, OBD_IOC_DATA_TYPE)
-#define ECHO_IOC_ENQUEUE               _IOWR('f', 202, OBD_IOC_DATA_TYPE)
-#define ECHO_IOC_CANCEL                _IOWR('f', 203, OBD_IOC_DATA_TYPE)
-
-/* XXX _IOWR('f', 250, long) has been defined in
- * lnet/include/libcfs/kp30.h for debug, don't use it
- */
-
-/* Until such time as we get_info the per-stripe maximum from the OST,
- * we define this to be 2T - 4k, which is the ext3 maxbytes. */
-#define LUSTRE_STRIPE_MAXBYTES 0x1fffffff000ULL
-
-/* #define POISON_BULK 0 */
-
-/*
- * l_wait_event is a flexible sleeping function, permitting simple caller
- * configuration of interrupt and timeout sensitivity along with actions to
- * be performed in the event of either exception.
- *
- * The first form of usage looks like this:
- *
- * struct l_wait_info lwi = LWI_TIMEOUT_INTR(timeout, timeout_handler,
- *                                           intr_handler, callback_data);
- * rc = l_wait_event(waitq, condition, &lwi);
- *
- * l_wait_event() makes the current process wait on 'waitq' until 'condition'
- * is TRUE or a "killable" signal (SIGTERM, SIKGILL, SIGINT) is pending.  It
- * returns 0 to signify 'condition' is TRUE, but if a signal wakes it before
- * 'condition' becomes true, it optionally calls the specified 'intr_handler'
- * if not NULL, and returns -EINTR.
- *
- * If a non-zero timeout is specified, signals are ignored until the timeout
- * has expired.  At this time, if 'timeout_handler' is not NULL it is called.
- * If it returns FALSE l_wait_event() continues to wait as described above with
- * signals enabled.  Otherwise it returns -ETIMEDOUT.
- *
- * LWI_INTR(intr_handler, callback_data) is shorthand for
- * LWI_TIMEOUT_INTR(0, NULL, intr_handler, callback_data)
- *
- * The second form of usage looks like this:
- *
- * struct l_wait_info lwi = LWI_TIMEOUT(timeout, timeout_handler);
- * rc = l_wait_event(waitq, condition, &lwi);
- *
- * This form is the same as the first except that it COMPLETELY IGNORES
- * SIGNALS.  The caller must therefore beware that if 'timeout' is zero, or if
- * 'timeout_handler' is not NULL and returns FALSE, then the ONLY thing that
- * can unblock the current process is 'condition' becoming TRUE.
- *
- * Another form of usage is:
- * struct l_wait_info lwi = LWI_TIMEOUT_INTERVAL(timeout, interval,
- *                                               timeout_handler);
- * rc = l_wait_event(waitq, condition, &lwi);
- * This is the same as previous case, but condition is checked once every
- * 'interval' jiffies (if non-zero).
- *
- * Subtle synchronization point: this macro does *not* necessary takes
- * wait-queue spin-lock before returning, and, hence, following idiom is safe
- * ONLY when caller provides some external locking:
- *
- *             Thread1                            Thread2
- *
- *   l_wait_event(&obj->wq, ....);                                       (1)
- *
- *                                    wake_up(&obj->wq):                 (2)
- *                                         spin_lock(&q->lock);          (2.1)
- *                                         __wake_up_common(q, ...);     (2.2)
- *                                         spin_unlock(&q->lock, flags); (2.3)
- *
- *   OBD_FREE_PTR(obj);                                                  (3)
- *
- * As l_wait_event() may "short-cut" execution and return without taking
- * wait-queue spin-lock, some additional synchronization is necessary to
- * guarantee that step (3) can begin only after (2.3) finishes.
- *
- * XXX nikita: some ptlrpc daemon threads have races of that sort.
- *
- */
-
-#define LWI_ON_SIGNAL_NOOP ((void (*)(void *))(-1))
-
-struct l_wait_info {
-        cfs_duration_t lwi_timeout;
-        cfs_duration_t lwi_interval;
-        int  (*lwi_on_timeout)(void *);
-        void (*lwi_on_signal)(void *);
-        void  *lwi_cb_data;
-};
-
-/* NB: LWI_TIMEOUT ignores signals completely */
-#define LWI_TIMEOUT(time, cb, data)             \
-((struct l_wait_info) {                         \
-        .lwi_timeout    = time,                 \
-        .lwi_on_timeout = cb,                   \
-        .lwi_cb_data    = data,                 \
-        .lwi_interval   = 0                     \
-})
-
-#define LWI_TIMEOUT_INTERVAL(time, interval, cb, data)  \
-((struct l_wait_info) {                                 \
-        .lwi_timeout    = time,                         \
-        .lwi_on_timeout = cb,                           \
-        .lwi_cb_data    = data,                         \
-        .lwi_interval   = interval                      \
-})
-
-#define LWI_TIMEOUT_INTR(time, time_cb, sig_cb, data)   \
-((struct l_wait_info) {                                 \
-        .lwi_timeout    = time,                         \
-        .lwi_on_timeout = time_cb,                      \
-        .lwi_on_signal = sig_cb,                        \
-        .lwi_cb_data    = data,                         \
-        .lwi_interval    = 0                            \
-})
-
-#define LWI_INTR(cb, data)  LWI_TIMEOUT_INTR(0, NULL, cb, data)
-
-#ifdef __KERNEL__
-
-/*
- * wait for @condition to become true, but no longer than timeout, specified
- * by @info.
- */
-#define __l_wait_event(wq, condition, info, ret, excl)                         \
-do {                                                                           \
-        cfs_waitlink_t __wait;                                                 \
-        cfs_duration_t __timeout = info->lwi_timeout;                          \
-        cfs_sigset_t   __blocked;                                              \
-                                                                               \
-        ret = 0;                                                               \
-        if (condition)                                                         \
-                break;                                                         \
-                                                                               \
-        cfs_waitlink_init(&__wait);                                            \
-        if (excl)                                                              \
-                cfs_waitq_add_exclusive(&wq, &__wait);                         \
-        else                                                                   \
-                cfs_waitq_add(&wq, &__wait);                                   \
-                                                                               \
-        /* Block all signals (just the non-fatal ones if no timeout). */       \
-        if (info->lwi_on_signal != NULL && __timeout == 0)                     \
-                __blocked = l_w_e_set_sigs(LUSTRE_FATAL_SIGS);                 \
-        else                                                                   \
-                __blocked = l_w_e_set_sigs(0);                                 \
-                                                                               \
-        for (;;) {                                                             \
-                set_current_state(TASK_INTERRUPTIBLE);                         \
-                                                                               \
-                if (condition)                                                 \
-                        break;                                                 \
-                                                                               \
-                if (__timeout == 0) {                                          \
-                        cfs_waitq_wait(&__wait, CFS_TASK_INTERRUPTIBLE);       \
-                } else {                                                       \
-                        cfs_duration_t interval = info->lwi_interval?          \
-                                             min_t(cfs_duration_t,             \
-                                                 info->lwi_interval,__timeout):\
-                                             __timeout;                        \
-                        cfs_duration_t remaining = cfs_waitq_timedwait(&__wait,\
-                                                   CFS_TASK_INTERRUPTIBLE,     \
-                                                   interval);                  \
-                        __timeout = cfs_time_sub(__timeout,                    \
-                                            cfs_time_sub(interval, remaining));\
-                        if (__timeout == 0) {                                  \
-                                if (info->lwi_on_timeout == NULL ||            \
-                                    info->lwi_on_timeout(info->lwi_cb_data)) { \
-                                        ret = -ETIMEDOUT;                      \
-                                        break;                                 \
-                                }                                              \
-                                /* Take signals after the timeout expires. */  \
-                                if (info->lwi_on_signal != NULL)               \
-                                    (void)l_w_e_set_sigs(LUSTRE_FATAL_SIGS);   \
-                        }                                                      \
-                }                                                              \
-                                                                               \
-                if (condition)                                                 \
-                        break;                                                 \
-                if (cfs_signal_pending()) {                                    \
-                        if (info->lwi_on_signal != NULL && __timeout == 0) {   \
-                                if (info->lwi_on_signal != LWI_ON_SIGNAL_NOOP) \
-                                        info->lwi_on_signal(info->lwi_cb_data);\
-                                ret = -EINTR;                                  \
-                                break;                                         \
-                        }                                                      \
-                        /* We have to do this here because some signals */     \
-                        /* are not blockable - ie from strace(1).       */     \
-                        /* In these cases we want to schedule_timeout() */     \
-                        /* again, because we don't want that to return  */     \
-                        /* -EINTR when the RPC actually succeeded.      */     \
-                        /* the RECALC_SIGPENDING below will deliver the */     \
-                        /* signal properly.                             */     \
-                        cfs_clear_sigpending();                                \
-                }                                                              \
-        }                                                                      \
-                                                                               \
-        cfs_block_sigs(__blocked);                                             \
-                                                                               \
-        set_current_state(TASK_RUNNING);                                       \
-        cfs_waitq_del(&wq, &__wait);                                           \
-} while (0)
-
-#else /* !__KERNEL__ */
-#define __l_wait_event(wq, condition, info, ret, excl)                         \
-do {                                                                    \
-        long __timeout = info->lwi_timeout;                             \
-        long __now;                                                     \
-        long __then = 0;                                                \
-        int  __timed_out = 0;                                           \
-        int  __interval = obd_timeout;                                  \
-                                                                        \
-        ret = 0;                                                        \
-        if (condition)                                                  \
-                break;                                                  \
-                                                                        \
-        if (__timeout != 0)                                             \
-                __then = time(NULL);                                    \
-                                                                        \
-        if (__timeout && __timeout < __interval)                        \
-                __interval = __timeout;                                 \
-        if (info->lwi_interval && info->lwi_interval < __interval)      \
-                __interval = info->lwi_interval;                        \
-                                                                        \
-        while (!(condition)) {                                          \
-                liblustre_wait_event(__interval);                       \
-                if (condition)                                          \
-                        break;                                          \
-                                                                        \
-                if (!__timed_out && info->lwi_timeout != 0) {           \
-                        __now = time(NULL);                             \
-                        __timeout -= __now - __then;                    \
-                        __then = __now;                                 \
-                                                                        \
-                        if (__timeout > 0)                              \
-                                continue;                               \
-                                                                        \
-                        __timeout = 0;                                  \
-                        __timed_out = 1;                                \
-                        if (info->lwi_on_timeout == NULL ||             \
-                            info->lwi_on_timeout(info->lwi_cb_data)) {  \
-                                ret = -ETIMEDOUT;                       \
-                                break;                                  \
-                        }                                               \
-                }                                                       \
-        }                                                               \
-} while (0)
-
-#endif /* __KERNEL__ */
-
-#define l_wait_event(wq, condition, info)                       \
-({                                                              \
-        int                 __ret;                              \
-        struct l_wait_info *__info = (info);                    \
-                                                                \
-        __l_wait_event(wq, condition, __info, __ret, 0);        \
-        __ret;                                                  \
-})
-
-#define l_wait_event_exclusive(wq, condition, info)             \
-({                                                              \
-        int                 __ret;                              \
-        struct l_wait_info *__info = (info);                    \
-                                                                \
-        __l_wait_event(wq, condition, __info, __ret, 1);        \
-        __ret;                                                  \
-})
-
-#ifdef __KERNEL__
-#define LIBLUSTRE_CLIENT (0)
-#else
-#define LIBLUSTRE_CLIENT (1)
-#endif
-
-#endif /* _LUSTRE_LIB_H */
-
diff --git a/lustre/include/lustre_lite.h b/lustre/include/lustre_lite.h
deleted file mode 100644
index e4e8ee856f5321834d5c6930a4b07cc8233d22f0..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_lite.h
+++ /dev/null
@@ -1,140 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _LL_H
-#define _LL_H
-
-#if defined(__linux__)
-#include <linux/lustre_lite.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_lite.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_lite.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#include <obd_class.h>
-#include <obd_ost.h>
-#include <lustre_net.h>
-#include <lustre_mds.h>
-#include <lustre_ha.h>
-
-#ifdef __KERNEL__
-
-/* careful, this is easy to screw up */
-#define PAGE_CACHE_MAXBYTES ((__u64)(~0UL) << CFS_PAGE_SHIFT)
-
-#endif
-
-#define LLAP_FROM_COOKIE(c)                                                    \
-        (LASSERT(((struct ll_async_page *)(c))->llap_magic == LLAP_MAGIC),     \
-         (struct ll_async_page *)(c))
-
-// 4*1024*1024
-#define LL_MAX_BLKSIZE_BITS     (22)
-#define LL_MAX_BLKSIZE          (1UL<<LL_MAX_BLKSIZE_BITS)
-
-#include <lustre/lustre_user.h>
-
-
-struct lustre_rw_params {
-        int                lrp_lock_mode;
-        ldlm_policy_data_t lrp_policy;
-        obd_flag           lrp_brw_flags;
-        int                lrp_ast_flags;
-};
-
-/*
- * XXX nikita: this function lives in the header because it is used by both
- * llite kernel module and liblustre library, and there is no (?) better place
- * to put it in.
- */
-static inline void lustre_build_lock_params(int cmd, unsigned long open_flags,
-                                            __u64 connect_flags,
-                                            loff_t pos, ssize_t len,
-                                            struct lustre_rw_params *params)
-{
-        params->lrp_lock_mode = (cmd == OBD_BRW_READ) ? LCK_PR : LCK_PW;
-        params->lrp_brw_flags = 0;
-
-        params->lrp_policy.l_extent.start = pos;
-        params->lrp_policy.l_extent.end = pos + len - 1;
-        /*
-         * for now O_APPEND always takes local locks.
-         */
-        if (cmd == OBD_BRW_WRITE && (open_flags & O_APPEND)) {
-                params->lrp_policy.l_extent.start = 0;
-                params->lrp_policy.l_extent.end   = OBD_OBJECT_EOF;
-        } else if (LIBLUSTRE_CLIENT && (connect_flags & OBD_CONNECT_SRVLOCK)) {
-                /*
-                 * liblustre: OST-side locking for all non-O_APPEND
-                 * reads/writes.
-                 */
-                params->lrp_lock_mode = LCK_NL;
-                params->lrp_brw_flags = OBD_BRW_SRVLOCK;
-        } else {
-                /*
-                 * nothing special for the kernel. In the future llite may use
-                 * OST-side locks for small writes into highly contended
-                 * files.
-                 */
-        }
-        params->lrp_ast_flags = (open_flags & O_NONBLOCK) ?
-                LDLM_FL_BLOCK_NOWAIT : 0;
-}
-
-/*
- * This is embedded into liblustre and llite super-blocks to keep track of
- * connect flags (capabilities) supported by all imports given mount is
- * connected to.
- */
-struct lustre_client_ocd {
-        /*
-         * This is conjunction of connect_flags across all imports (LOVs) this
-         * mount is connected to. This field is updated by ll_ocd_update()
-         * under ->lco_lock.
-         */
-        __u64      lco_flags;
-        spinlock_t lco_lock;
-};
-
-/*
- * This function is used as an upcall-callback hooked by liblustre and llite
- * clients into obd_notify() listeners chain to handle notifications about
- * change of import connect_flags. See llu_fsswop_mount() and
- * lustre_common_fill_super().
- *
- * Again, it is dumped into this header for the lack of a better place.
- */
-static inline int ll_ocd_update(struct obd_device *host,
-                                struct obd_device *watched,
-                                enum obd_notify_event ev, void *owner)
-{
-        struct lustre_client_ocd *lco;
-        struct client_obd        *cli;
-        __u64 flags;
-        int   result;
-
-        ENTRY;
-        if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) {
-                cli = &watched->u.cli;
-                lco = owner;
-                flags = cli->cl_import->imp_connect_data.ocd_connect_flags;
-                CDEBUG(D_SUPER, "Changing connect_flags: "LPX64" -> "LPX64"\n",
-                       lco->lco_flags, flags);
-                spin_lock(&lco->lco_lock);
-                lco->lco_flags &= flags;
-                spin_unlock(&lco->lco_lock);
-                result = 0;
-        } else {
-                CERROR("unexpected notification from %s %s!\n",
-                       watched->obd_type->typ_name,
-                       watched->obd_name);
-                result = -EINVAL;
-        }
-        RETURN(result);
-}
-
-#endif
diff --git a/lustre/include/lustre_log.h b/lustre/include/lustre_log.h
deleted file mode 100644
index 565d08dc9626923fcabfa2d2b105a8f268cfc31e..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_log.h
+++ /dev/null
@@ -1,483 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <info@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * Generic infrastructure for managing a collection of logs.
- *
- * These logs are used for:
- *
- * - orphan recovery: OST adds record on create
- * - mtime/size consistency: the OST adds a record on first write
- * - open/unlinked objects: OST adds a record on destroy
- *
- * - mds unlink log: the MDS adds an entry upon delete
- *
- * - raid1 replication log between OST's
- * - MDS replication logs
- */
-
-#ifndef _LUSTRE_LOG_H
-#define _LUSTRE_LOG_H
-
-#if defined(__linux__)
-#include <linux/lustre_log.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_log.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_log.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#include <obd.h>
-#include <obd_ost.h>
-#include <lustre/lustre_idl.h>
-
-#define LOG_NAME_LIMIT(logname, name)                   \
-        snprintf(logname, sizeof(logname), "LOGS/%s", name)
-#define LLOG_EEMPTY 4711
-
-struct plain_handle_data {
-        struct list_head    phd_entry;
-        struct llog_handle *phd_cat_handle;
-        struct llog_cookie  phd_cookie; /* cookie of this log in its cat */
-        int                 phd_last_idx;
-};
-
-struct cat_handle_data {
-        struct list_head        chd_head;
-        struct llog_handle     *chd_current_log; /* currently open log */
-};
-
-/* In-memory descriptor for a log object or log catalog */
-struct llog_handle {
-        struct rw_semaphore     lgh_lock;
-        struct llog_logid       lgh_id;              /* id of this log */
-        struct llog_log_hdr    *lgh_hdr;
-        struct file            *lgh_file;
-        int                     lgh_last_idx;
-        int                     lgh_cur_idx;    /* used during llog_process */
-        __u64                   lgh_cur_offset; /* used during llog_process */
-        struct llog_ctxt       *lgh_ctxt;
-        union {
-                struct plain_handle_data phd;
-                struct cat_handle_data   chd;
-        } u;
-};
-
-/* llog.c  -  general API */
-typedef int (*llog_cb_t)(struct llog_handle *, struct llog_rec_hdr *, void *);
-typedef int (*llog_fill_rec_cb_t)(struct llog_rec_hdr *rec, void *data);
-extern struct llog_handle *llog_alloc_handle(void);
-int llog_init_handle(struct llog_handle *handle, int flags,
-                     struct obd_uuid *uuid);
-extern void llog_free_handle(struct llog_handle *handle);
-int llog_process(struct llog_handle *loghandle, llog_cb_t cb,
-                 void *data, void *catdata);
-int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb,
-                         void *data, void *catdata);
-extern int llog_cancel_rec(struct llog_handle *loghandle, int index);
-extern int llog_close(struct llog_handle *cathandle);
-extern int llog_get_size(struct llog_handle *loghandle);
-
-/* llog_cat.c   -  catalog api */
-struct llog_process_data {
-        void *lpd_data;
-        llog_cb_t lpd_cb;
-};
-
-struct llog_process_cat_data {
-        int     first_idx;
-        int     last_idx;
-        /* to process catalog across zero record */
-};
-
-int llog_cat_put(struct llog_handle *cathandle);
-int llog_cat_add_rec(struct llog_handle *cathandle, struct llog_rec_hdr *rec,
-                     struct llog_cookie *reccookie, void *buf);
-int llog_cat_cancel_records(struct llog_handle *cathandle, int count,
-                            struct llog_cookie *cookies);
-int llog_cat_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data);
-int llog_cat_reverse_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data);
-int llog_cat_set_first_idx(struct llog_handle *cathandle, int index);
-
-/* llog_obd.c */
-int llog_setup(struct obd_device *obd, int index, struct obd_device *disk_obd,
-               int count,  struct llog_logid *logid,struct llog_operations *op);
-int __llog_ctxt_put(struct llog_ctxt *ctxt);
-int llog_cleanup(struct llog_ctxt *);
-int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp);
-int llog_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec,
-             struct lov_stripe_md *lsm, struct llog_cookie *logcookies,
-             int numcookies);
-int llog_cancel(struct llog_ctxt *, struct lov_stripe_md *lsm,
-                int count, struct llog_cookie *cookies, int flags);
-
-int llog_obd_origin_setup(struct obd_device *obd, int index,
-                          struct obd_device *disk_obd, int count,
-                          struct llog_logid *logid);
-int llog_obd_origin_cleanup(struct llog_ctxt *ctxt);
-int llog_obd_origin_add(struct llog_ctxt *ctxt,
-                        struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                        struct llog_cookie *logcookies, int numcookies);
-
-int llog_cat_initialize(struct obd_device *obd, int count, 
-                        struct obd_uuid *uuid);
-int obd_llog_init(struct obd_device *obd, struct obd_device *disk_obd,
-                  int count, struct llog_catid *logid, struct obd_uuid *uuid);
-
-int obd_llog_finish(struct obd_device *obd, int count);
-
-/* llog_ioctl.c */
-int llog_ioctl(struct llog_ctxt *ctxt, int cmd, struct obd_ioctl_data *data);
-int llog_catalog_list(struct obd_device *obd, int count,
-                      struct obd_ioctl_data *data);
-
-/* llog_net.c */
-int llog_initiator_connect(struct llog_ctxt *ctxt);
-int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp);
-int llog_origin_connect(struct llog_ctxt *ctxt, int count,
-                        struct llog_logid *logid, struct llog_gen *gen,
-                        struct obd_uuid *uuid);
-int llog_handle_connect(struct ptlrpc_request *req);
-
-/* recov_thread.c */
-int llog_obd_repl_cancel(struct llog_ctxt *ctxt,
-                         struct lov_stripe_md *lsm, int count,
-                         struct llog_cookie *cookies, int flags);
-int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp);
-int llog_repl_connect(struct llog_ctxt *ctxt, int count,
-                      struct llog_logid *logid, struct llog_gen *gen,
-                      struct obd_uuid *uuid);
-
-struct llog_operations {
-        int (*lop_write_rec)(struct llog_handle *loghandle,
-                             struct llog_rec_hdr *rec,
-                             struct llog_cookie *logcookies, int numcookies,
-                             void *, int idx);
-        int (*lop_destroy)(struct llog_handle *handle);
-        int (*lop_next_block)(struct llog_handle *h, int *curr_idx,
-                              int next_idx, __u64 *offset, void *buf, int len);
-        int (*lop_prev_block)(struct llog_handle *h,
-                              int prev_idx, void *buf, int len);
-        int (*lop_create)(struct llog_ctxt *ctxt, struct llog_handle **,
-                          struct llog_logid *logid, char *name);
-        int (*lop_close)(struct llog_handle *handle);
-        int (*lop_read_header)(struct llog_handle *handle);
-
-        int (*lop_setup)(struct obd_device *obd, int ctxt_idx,
-                         struct obd_device *disk_obd, int count,
-                         struct llog_logid *logid);
-        int (*lop_sync)(struct llog_ctxt *ctxt, struct obd_export *exp);
-        int (*lop_cleanup)(struct llog_ctxt *ctxt);
-        int (*lop_add)(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec,
-                       struct lov_stripe_md *lsm,
-                       struct llog_cookie *logcookies, int numcookies);
-        int (*lop_cancel)(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm,
-                          int count, struct llog_cookie *cookies, int flags);
-        int (*lop_connect)(struct llog_ctxt *ctxt, int count,
-                           struct llog_logid *logid, struct llog_gen *gen,
-                           struct obd_uuid *uuid);
-        /* XXX add 2 more: commit callbacks and llog recovery functions */
-};
-
-/* llog_lvfs.c */
-extern struct llog_operations llog_lvfs_ops;
-int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
-                      char *name, int count, struct llog_catid *idarray);
-
-struct llog_ctxt {
-        int                      loc_idx; /* my index the obd array of ctxt's */
-        struct llog_gen          loc_gen;
-        struct obd_device       *loc_obd; /* points back to the containing obd*/
-        struct obd_export       *loc_exp; /* parent "disk" export (e.g. MDS) */
-        struct obd_import       *loc_imp; /* to use in RPC's: can be backward
-                                             pointing import */
-        struct llog_operations  *loc_logops;
-        struct llog_handle      *loc_handle;
-        struct llog_canceld_ctxt *loc_llcd;
-        struct semaphore         loc_sem; /* protects loc_llcd and loc_imp */
-        atomic_t                 loc_refcount;
-        struct llog_commit_master *loc_lcm;
-        void                    *llog_proc_cb;
-};
-
-#ifndef __KERNEL__
-
-#define cap_raise(c, flag) do {} while(0)
-
-#define CAP_SYS_RESOURCE 24
-
-#endif   /* !__KERNEL__ */
-
-static inline void llog_gen_init(struct llog_ctxt *ctxt)
-{
-        struct obd_device *obd = ctxt->loc_exp->exp_obd;
-
-        if (!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME))
-                ctxt->loc_gen.mnt_cnt = obd->u.mds.mds_mount_count;
-        else if (!strstr(obd->obd_type->typ_name, LUSTRE_OST_NAME))
-                ctxt->loc_gen.mnt_cnt = obd->u.filter.fo_mount_count;
-        else
-                ctxt->loc_gen.mnt_cnt = 0;
-}
-
-static inline int llog_gen_lt(struct llog_gen a, struct llog_gen b)
-{
-        if (a.mnt_cnt < b.mnt_cnt)
-                return 1;
-        if (a.mnt_cnt > b.mnt_cnt)
-                return 0;
-        return(a.conn_cnt < b.conn_cnt ? 1 : 0);
-}
-
-#define LLOG_GEN_INC(gen)  ((gen).conn_cnt ++)
-#define LLOG_PROC_BREAK 0x0001
-#define LLOG_DEL_RECORD 0x0002
-
-static inline int llog_obd2ops(struct llog_ctxt *ctxt,
-                               struct llog_operations **lop)
-{
-        if (ctxt == NULL)
-                return -ENOTCONN;
-
-        *lop = ctxt->loc_logops;
-        if (*lop == NULL)
-                return -EOPNOTSUPP;
-
-        return 0;
-}
-
-static inline int llog_handle2ops(struct llog_handle *loghandle,
-                                  struct llog_operations **lop)
-{
-        if (loghandle == NULL)
-                return -EINVAL;
-
-        return llog_obd2ops(loghandle->lgh_ctxt, lop);
-}
-
-static inline int llog_data_len(int len)
-{
-        return size_round(len);
-}
-
-#define llog_ctxt_get(ctxt)                                                 \
-({                                                                          \
-         struct llog_ctxt *ctxt_ = ctxt;                                    \
-         LASSERT(atomic_read(&ctxt_->loc_refcount) > 0);                    \
-         atomic_inc(&ctxt_->loc_refcount);                                  \
-         CDEBUG(D_INFO, "GETting ctxt %p : new refcount %d\n", ctxt_,       \
-                atomic_read(&ctxt_->loc_refcount));                         \
-         ctxt_;                                                             \
-})
- 
-#define llog_ctxt_put(ctxt)                                                 \
-do {                                                                        \
-         if ((ctxt) == NULL)                                                \
-                 break;                                                     \
-         CDEBUG(D_INFO, "PUTting ctxt %p : new refcount %d\n", (ctxt),      \
-                atomic_read(&(ctxt)->loc_refcount) - 1);                    \
-         LASSERT(atomic_read(&(ctxt)->loc_refcount) > 0);                   \
-         LASSERT(atomic_read(&(ctxt)->loc_refcount) < 0x5a5a5a);            \
-         __llog_ctxt_put(ctxt);                                             \
-} while (0)
-
-static inline struct llog_ctxt *llog_get_context(struct obd_device *obd,
-                                                   int index)
-{
-         struct llog_ctxt *ctxt;
- 
-         if (index < 0 || index >= LLOG_MAX_CTXTS)
-                 return NULL;
-        
-         spin_lock(&obd->obd_dev_lock);  
-         if (obd->obd_llog_ctxt[index] == NULL) {
-                 spin_unlock(&obd->obd_dev_lock);
-                 CDEBUG(D_INFO, "obd %p and ctxt index %d is NULL \n", obd, index);
-                 return NULL;
-         }
-         ctxt = llog_ctxt_get(obd->obd_llog_ctxt[index]);
-         spin_unlock(&obd->obd_dev_lock);
-         return ctxt;
-}
-
-static inline int llog_ctxt_null(struct obd_device *obd, int index)
-{
-        return (obd->obd_llog_ctxt[index] == NULL);
-}
-
-static inline int llog_write_rec(struct llog_handle *handle,
-                                 struct llog_rec_hdr *rec,
-                                 struct llog_cookie *logcookies,
-                                 int numcookies, void *buf, int idx)
-{
-        struct llog_operations *lop;
-        __u32 cap;
-        int rc, buflen;
-        ENTRY;
-
-        rc = llog_handle2ops(handle, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_write_rec == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        if (buf)
-                buflen = rec->lrh_len + sizeof(struct llog_rec_hdr)
-                                + sizeof(struct llog_rec_tail);
-        else
-                buflen = rec->lrh_len;
-        LASSERT(size_round(buflen) == buflen);
-
-        cap = current->cap_effective;             
-        cap_raise(current->cap_effective, CAP_SYS_RESOURCE); 
-        rc = lop->lop_write_rec(handle, rec, logcookies, numcookies, buf, idx);
-        current->cap_effective = cap; 
-        RETURN(rc);
-}
-
-static inline int llog_read_header(struct llog_handle *handle)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_handle2ops(handle, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_read_header == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        rc = lop->lop_read_header(handle);
-        RETURN(rc);
-}
-
-static inline int llog_destroy(struct llog_handle *handle)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_handle2ops(handle, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_destroy == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        rc = lop->lop_destroy(handle);
-        RETURN(rc);
-}
-
-#if 0
-static inline int llog_cancel(struct obd_export *exp,
-                              struct lov_stripe_md *lsm, int count,
-                              struct llog_cookie *cookies, int flags)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_handle2ops(loghandle, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_cancel == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        rc = lop->lop_cancel(exp, lsm, count, cookies, flags);
-        RETURN(rc);
-}
-#endif
-
-static inline int llog_next_block(struct llog_handle *loghandle, int *cur_idx,
-                                  int next_idx, __u64 *cur_offset, void *buf,
-                                  int len)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_handle2ops(loghandle, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_next_block == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        rc = lop->lop_next_block(loghandle, cur_idx, next_idx, cur_offset, buf,
-                                 len);
-        RETURN(rc);
-}
-
-static inline int llog_prev_block(struct llog_handle *loghandle,
-                                  int prev_idx, void *buf, int len)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_handle2ops(loghandle, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_prev_block == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        rc = lop->lop_prev_block(loghandle, prev_idx, buf, len);
-        RETURN(rc);
-}
-
-static inline int llog_create(struct llog_ctxt *ctxt, struct llog_handle **res,
-                              struct llog_logid *logid, char *name)
-{
-        struct llog_operations *lop;
-        __u32 cap;
-        int rc;
-        ENTRY;
-
-        rc = llog_obd2ops(ctxt, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_create == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        cap = current->cap_effective;             
-        cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
-        rc = lop->lop_create(ctxt, res, logid, name);
-        current->cap_effective = cap; 
-        RETURN(rc);
-}
-
-static inline int llog_connect(struct llog_ctxt *ctxt, int count,
-                               struct llog_logid *logid, struct llog_gen *gen,
-                               struct obd_uuid *uuid)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_obd2ops(ctxt, &lop);
-        if (rc)
-                RETURN(rc);
-        if (lop->lop_connect == NULL)
-                RETURN(-EOPNOTSUPP);
-
-        rc = lop->lop_connect(ctxt, count, logid, gen, uuid);
-        RETURN(rc);
-}
-
-#endif
diff --git a/lustre/include/lustre_mds.h b/lustre/include/lustre_mds.h
deleted file mode 100644
index 47d5073807ab7ba5ce0bcf7fc1e2079f381bedd7..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_mds.h
+++ /dev/null
@@ -1,255 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * MDS data structures.
- * See also lustre_idl.h for wire formats of requests.
- */
-
-#ifndef _LUSTRE_MDS_H
-#define _LUSTRE_MDS_H
-
-#include <lustre_handles.h>
-#include <libcfs/kp30.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_lib.h>
-#include <lustre_dlm.h>
-#include <lustre_log.h>
-#include <lustre_export.h>
-
-#if defined(__linux__)
-#include <linux/lustre_mds.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_mds.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_mds.h>
-#else
-#error Unsupported operating system.
-#endif
-
-struct ldlm_lock_desc;
-struct mds_obd;
-struct ptlrpc_connection;
-struct ptlrpc_client;
-struct obd_export;
-struct ptlrpc_request;
-struct obd_device;
-struct ll_file_data;
-
-struct lustre_md {
-        struct mds_body         *body;
-        struct lov_stripe_md    *lsm;
-#ifdef CONFIG_FS_POSIX_ACL
-        struct posix_acl        *posix_acl;
-#endif
-};
-
-struct mdc_op_data {
-        struct ll_fid    fid1;
-        struct ll_fid    fid2;
-        struct ll_fid    fid3;
-        struct ll_fid    fid4;
-        __u64            mod_time;
-        const char      *name;
-        int              namelen;
-        __u32            create_mode;
-        __u32            suppgids[2];
-        void            *data;
-};
-
-struct mds_update_record {
-        __u32 ur_opcode;
-        struct ll_fid *ur_fid1;
-        struct ll_fid *ur_fid2;
-        int ur_namelen;
-        char *ur_name;
-        int ur_tgtlen;
-        char *ur_tgt;
-        int ur_eadatalen;
-        void *ur_eadata;
-        int ur_cookielen;
-        struct llog_cookie *ur_logcookies;
-        struct iattr ur_iattr;
-        struct lvfs_ucred ur_uc;
-        __u64 ur_rdev;
-        __u64 ur_time;
-        __u32 ur_mode;
-        __u32 ur_flags;
-        struct lvfs_grp_hash_entry *ur_grp_entry;
-        struct ldlm_request *ur_dlm;
-};
-
-/* file data for open files on MDS */
-struct mds_file_data {
-        struct portals_handle mfd_handle; /* must be first */
-        atomic_t              mfd_refcount;
-        struct list_head      mfd_list; /* protected by med_open_lock */
-        __u64                 mfd_xid;
-        int                   mfd_mode;
-        struct dentry        *mfd_dentry;
-};
-
-/* ACL */
-#ifdef CONFIG_FS_POSIX_ACL
-# ifdef HAVE_XATTR_ACL
-#  define MDS_XATTR_NAME_ACL_ACCESS XATTR_NAME_ACL_ACCESS
-#  define mds_xattr_acl_size(entry) xattr_acl_size(entry)
-# else /* HAVE_XATTR_ACL */
-#  define MDS_XATTR_NAME_ACL_ACCESS POSIX_ACL_XATTR_ACCESS
-#  define mds_xattr_acl_size(entry) posix_acl_xattr_size(entry)
-# endif /* HAVE_XATTR_ACL */
-
-# define LUSTRE_POSIX_ACL_MAX_ENTRIES   (32)
-#  define LUSTRE_POSIX_ACL_MAX_SIZE      \
-                (mds_xattr_acl_size(LUSTRE_POSIX_ACL_MAX_ENTRIES))
-#else /* CONFIG_FS_POSIX_ACL */
-# define LUSTRE_POSIX_ACL_MAX_SIZE      0
-#endif /* CONFIG_FS_POSIX_ACL */
-
-/* mds/mds_reint.c */
-int mds_reint_rec(struct mds_update_record *r, int offset,
-                  struct ptlrpc_request *req, struct lustre_handle *);
-
-/* mds/mds_lov.c */
-
-/* mdc/mdc_locks.c */
-struct md_enqueue_info;
-
-int it_disposition(struct lookup_intent *it, int flag);
-void it_set_disposition(struct lookup_intent *it, int flag);
-void it_clear_disposition(struct lookup_intent *it, int flag);
-int it_open_error(int phase, struct lookup_intent *it);
-void mdc_set_lock_data(__u64 *lockh, void *data);
-int mdc_change_cbdata(struct obd_export *exp, struct ll_fid *fid,
-                      ldlm_iterator_t it, void *data);
-int mdc_revalidate_lock(struct obd_export *exp,
-                        struct lookup_intent *it,
-                        struct ll_fid *fid);
-int mdc_intent_lock(struct obd_export *exp,
-                    struct mdc_op_data *,
-                    void *lmm, int lmmsize,
-                    struct lookup_intent *, int,
-                    struct ptlrpc_request **reqp,
-                    ldlm_blocking_callback cb_blocking, int extra_lock_flags);
-int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
-                struct lookup_intent *it, struct mdc_op_data *data,
-                struct lustre_handle *lockh, void *lmm, int lmmlen,
-                int extra_lock_flags);
-int mdc_intent_getattr_async(struct obd_export *exp,
-                             struct md_enqueue_info *minfo,
-                             struct ldlm_enqueue_info *einfo);
-
-/* mdc/mdc_request.c */
-int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp);
-int mdc_req2lustre_md(struct ptlrpc_request *req, int offset,
-                      struct obd_export *exp, struct lustre_md *md);
-void mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md);
-int mdc_getstatus(struct obd_export *exp, struct ll_fid *rootfid);
-int mdc_getattr(struct obd_export *exp, struct ll_fid *fid,
-                obd_valid valid, unsigned int ea_size,
-                struct ptlrpc_request **request);
-int mdc_getattr_name(struct obd_export *exp, struct ll_fid *fid,
-                     const char *filename, int namelen, unsigned long valid,
-                     unsigned int ea_size, struct ptlrpc_request **request);
-int mdc_setattr(struct obd_export *exp, struct mdc_op_data *data,
-                struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len,
-                struct ptlrpc_request **request);
-int mdc_setxattr(struct obd_export *exp, struct ll_fid *fid,
-                 obd_valid valid, const char *xattr_name,
-                 const char *input, int input_size,
-                 int output_size, int flags,
-                 struct ptlrpc_request **request);
-int mdc_getxattr(struct obd_export *exp, struct ll_fid *fid,
-                 obd_valid valid, const char *xattr_name,
-                 const char *input, int input_size,
-                 int output_size, struct ptlrpc_request **request);
-int mdc_open(struct obd_export *exp, obd_id ino, int type, int flags,
-             struct lov_mds_md *lmm, int lmm_size, struct lustre_handle *fh,
-             struct ptlrpc_request **);
-struct obd_client_handle;
-void mdc_set_open_replay_data(struct obd_client_handle *och,
-                              struct ptlrpc_request *open_req);
-void mdc_clear_open_replay_data(struct obd_client_handle *och);
-int mdc_close(struct obd_export *, struct obdo *, struct obd_client_handle *,
-              struct ptlrpc_request **);
-int mdc_readpage(struct obd_export *exp, struct ll_fid *mdc_fid, __u64 offset,
-                 struct page *, struct ptlrpc_request **);
-int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
-               const void *data, int datalen, int mode, __u32 uid, __u32 gid,
-               __u32 cap_effective, __u64 rdev,struct ptlrpc_request **request);
-int mdc_unlink(struct obd_export *exp, struct mdc_op_data *data,
-               struct ptlrpc_request **request);
-int mdc_link(struct obd_export *exp, struct mdc_op_data *data,
-             struct ptlrpc_request **);
-int mdc_rename(struct obd_export *exp, struct mdc_op_data *data,
-               const char *old, int oldlen, const char *new, int newlen,
-               struct ptlrpc_request **request);
-int mdc_sync(struct obd_export *exp, struct ll_fid *fid,
-             struct ptlrpc_request **);
-int mdc_create_client(struct obd_uuid uuid, struct ptlrpc_client *cl);
-int mdc_resource_get_unused(struct obd_export *exp, struct ll_fid *fid,
-                            struct list_head *cancels, ldlm_mode_t mode,
-                            __u64 bits);
-
-/* Store the generation of a newly-created inode in |req| for replay. */
-void mdc_store_inode_generation(struct ptlrpc_request *req, int reqoff,
-                                int repoff);
-int mdc_llog_process(struct obd_export *, char *logname, llog_cb_t, void *data);
-int mdc_done_writing(struct obd_export *exp, struct obdo *);
-
-static inline void mdc_pack_fid(struct ll_fid *fid, obd_id ino, __u32 gen,
-                                int type)
-{
-        fid->id = ino;
-        fid->generation = gen;
-        fid->f_type = type;
-}
-
-static inline int it_to_lock_mode(struct lookup_intent *it)
-{
-        /* CREAT needs to be tested before open (both could be set) */
-        if (it->it_op & IT_CREAT)
-                return LCK_CW;
-        else if (it->it_op & (IT_READDIR | IT_GETATTR | IT_OPEN | IT_LOOKUP))
-                return LCK_CR;
-
-        LBUG();
-        return -EINVAL;
-}
-
-/* ioctls for trying requests */
-#define IOC_REQUEST_TYPE                   'f'
-#define IOC_REQUEST_MIN_NR                 30
-
-#define IOC_REQUEST_GETATTR             _IOWR('f', 30, long)
-#define IOC_REQUEST_READPAGE            _IOWR('f', 31, long)
-#define IOC_REQUEST_SETATTR             _IOWR('f', 32, long)
-#define IOC_REQUEST_CREATE              _IOWR('f', 33, long)
-#define IOC_REQUEST_OPEN                _IOWR('f', 34, long)
-#define IOC_REQUEST_CLOSE               _IOWR('f', 35, long)
-#define IOC_REQUEST_MAX_NR               35
-
-/* metadata stat-ahead */
-typedef int (* md_enqueue_cb_t)(struct obd_export *exp,
-                                struct ptlrpc_request *req,
-                                struct md_enqueue_info *minfo,
-                                int rc);
-
-struct md_enqueue_info {
-        struct obd_export      *mi_exp;
-        struct mdc_op_data      mi_data;
-        struct lookup_intent    mi_it;
-        struct lustre_handle    mi_lockh;
-        struct dentry          *mi_dentry;
-        md_enqueue_cb_t         mi_cb;
-        unsigned int            mi_generation;
-        void                   *mi_cbdata;
-};
-
-struct mdc_enqueue_args {
-        struct md_enqueue_info   *ma_mi;
-        struct ldlm_enqueue_info *ma_ei;
-};
-
-#endif
diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h
deleted file mode 100644
index 1bd2eabc5e4bae950f303d49456a723208dfc1d5..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_net.h
+++ /dev/null
@@ -1,938 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _LUSTRE_NET_H
-#define _LUSTRE_NET_H
-
-#if defined(__linux__)
-#include <linux/lustre_net.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_net.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_net.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#include <libcfs/kp30.h>
-// #include <obd.h>
-#include <lnet/lnet.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_ha.h>
-#include <lustre_import.h>
-#include <lprocfs_status.h>
-
-/* MD flags we _always_ use */
-#define PTLRPC_MD_OPTIONS  0
-
-/* Define maxima for bulk I/O
- * CAVEAT EMPTOR, with multinet (i.e. routers forwarding between networks)
- * these limits are system wide and not interface-local. */
-#define PTLRPC_MAX_BRW_BITS     LNET_MTU_BITS
-#define PTLRPC_MAX_BRW_SIZE     (1<<LNET_MTU_BITS)
-#define PTLRPC_MAX_BRW_PAGES    (PTLRPC_MAX_BRW_SIZE >> CFS_PAGE_SHIFT)
-
-/* When PAGE_SIZE is a constant, we can check our arithmetic here with cpp! */
-#ifdef __KERNEL__
-# if ((PTLRPC_MAX_BRW_PAGES & (PTLRPC_MAX_BRW_PAGES - 1)) != 0)
-#  error "PTLRPC_MAX_BRW_PAGES isn't a power of two"
-# endif
-# if (PTLRPC_MAX_BRW_SIZE != (PTLRPC_MAX_BRW_PAGES * CFS_PAGE_SIZE))
-#  error "PTLRPC_MAX_BRW_SIZE isn't PTLRPC_MAX_BRW_PAGES * CFS_PAGE_SIZE"
-# endif
-# if (PTLRPC_MAX_BRW_SIZE > LNET_MTU)
-#  error "PTLRPC_MAX_BRW_SIZE too big"
-# endif
-# if (PTLRPC_MAX_BRW_PAGES > LNET_MAX_IOV)
-#  error "PTLRPC_MAX_BRW_PAGES too big"
-# endif
-#endif /* __KERNEL__ */
-
-/* Size over which to OBD_VMALLOC() rather than OBD_ALLOC() service request
- * buffers */
-#define SVC_BUF_VMALLOC_THRESHOLD (2 * CFS_PAGE_SIZE)
-
-/* The following constants determine how memory is used to buffer incoming
- * service requests.
- *
- * ?_NBUFS              # buffers to allocate when growing the pool
- * ?_BUFSIZE            # bytes in a single request buffer
- * ?_MAXREQSIZE         # maximum request service will receive
- *
- * When fewer than ?_NBUFS/2 buffers are posted for receive, another chunk
- * of ?_NBUFS is added to the pool.
- *
- * Messages larger than ?_MAXREQSIZE are dropped.  Request buffers are
- * considered full when less than ?_MAXREQSIZE is left in them.
- */
-
-#define LDLM_THREADS_AUTO_MIN                                                 \
-        min((int)(num_online_cpus() * num_online_cpus() * 2), 8)
-#define LDLM_THREADS_AUTO_MAX (LDLM_THREADS_AUTO_MIN * 16)
-#define LDLM_BL_THREADS  LDLM_THREADS_AUTO_MIN
-#define LDLM_NBUFS      (64 * num_online_cpus())
-#define LDLM_BUFSIZE    (8 * 1024)
-#define LDLM_MAXREQSIZE (5 * 1024)
-#define LDLM_MAXREPSIZE (1024)
-
-/* Absolute limits */
-#define MDS_THREADS_MIN 2
-#define MDS_THREADS_MAX 512
-#define MDS_THREADS_MIN_READPAGE 2
-#define MDS_NBUFS       (64 * num_online_cpus())
-#define MDS_BUFSIZE     (8 * 1024)
-/* Assume file name length = FNAME_MAX = 256 (true for ext3).
- *        path name length = PATH_MAX = 4096
- *        LOV MD size max  = EA_MAX = 4000
- * symlink:  FNAME_MAX + PATH_MAX  <- largest
- * link:     FNAME_MAX + PATH_MAX  (mds_rec_link < mds_rec_create)
- * rename:   FNAME_MAX + FNAME_MAX
- * open:     FNAME_MAX + EA_MAX
- *
- * MDS_MAXREQSIZE ~= 4736 bytes =
- * lustre_msg + ldlm_request + mds_body + mds_rec_create + FNAME_MAX + PATH_MAX
- * MDS_MAXREPSIZE ~= 8300 bytes = lustre_msg + llog_header
- * or, for mds_close() and mds_reint_unlink() on a many-OST filesystem:
- *      = 9210 bytes = lustre_msg + mds_body + 160 * (easize + cookiesize)
- *
- * Realistic size is about 512 bytes (20 character name + 128 char symlink),
- * except in the open case where there are a large number of OSTs in a LOV.
- */
-#define MDS_MAXREQSIZE  (5 * 1024)
-#define MDS_MAXREPSIZE  max(9 * 1024, 280 + LOV_MAX_STRIPE_COUNT * 56)
-
-#define MGS_THREADS_AUTO_MIN 2
-#define MGS_THREADS_AUTO_MAX 32
-#define MGS_NBUFS       (64 * num_online_cpus())
-#define MGS_BUFSIZE     (8 * 1024)
-#define MGS_MAXREQSIZE  (8 * 1024)
-#define MGS_MAXREPSIZE  (9 * 1024)
-
-/* Absolute limits */
-#define OSS_THREADS_MIN 2
-#define OSS_THREADS_MAX 512
-#define OST_NBUFS       (64 * num_online_cpus())
-#define OST_BUFSIZE     (8 * 1024)
-/* OST_MAXREQSIZE ~= 4768 bytes =
- * lustre_msg + obdo + 16 * obd_ioobj + 256 * niobuf_remote
- *
- * - single object with 16 pages is 512 bytes
- * - OST_MAXREQSIZE must be at least 1 page of cookies plus some spillover
- */
-#define OST_MAXREQSIZE  (5 * 1024)
-#define OST_MAXREPSIZE  (9 * 1024)
-
-struct ptlrpc_connection {
-        struct list_head        c_link;
-        struct hlist_node       c_hash;
-        lnet_nid_t              c_self;
-        lnet_process_id_t       c_peer;
-        struct obd_uuid         c_remote_uuid;
-        atomic_t                c_refcount;
-};
-
-struct ptlrpc_client {
-        __u32                     cli_request_portal;
-        __u32                     cli_reply_portal;
-        char                     *cli_name;
-};
-
-/* state flags of requests */
-/* XXX only ones left are those used by the bulk descs as well! */
-#define PTL_RPC_FL_INTR      (1 << 0)  /* reply wait was interrupted by user */
-#define PTL_RPC_FL_TIMEOUT   (1 << 7)  /* request timed out waiting for reply */
-
-#define REQ_MAX_ACK_LOCKS 8
-
-union ptlrpc_async_args {
-        /* Scratchpad for passing args to completion interpreter. Users
-         * cast to the struct of their choosing, and LASSERT that this is
-         * big enough.  For _tons_ of context, OBD_ALLOC a struct and store
-         * a pointer to it here.  The pointer_arg ensures this struct is at
-         * least big enough for that. */
-        void      *pointer_arg[9];
-        __u64      space[4];
-};
-
-struct ptlrpc_request_set;
-typedef int (*set_interpreter_func)(struct ptlrpc_request_set *, void *, int);
-
-struct ptlrpc_request_set {
-        int               set_remaining; /* # uncompleted requests */
-        cfs_waitq_t       set_waitq;
-        cfs_waitq_t      *set_wakeup_ptr;
-        struct list_head  set_requests;
-        struct list_head  set_cblist; /* list of completion callbacks */
-        set_interpreter_func    set_interpret; /* completion callback */
-        void              *set_arg; /* completion context */
-        /* locked so that any old caller can communicate requests to
-         * the set holder who can then fold them into the lock-free set */
-        spinlock_t        set_new_req_lock;
-        struct list_head  set_new_requests;
-};
-
-struct ptlrpc_set_cbdata {
-        struct list_head        psc_item;
-        set_interpreter_func    psc_interpret;
-        void                   *psc_data;
-};
-
-struct ptlrpc_bulk_desc;
-
-/*
- * ptlrpc callback & work item stuff
- */
-struct ptlrpc_cb_id {
-        void   (*cbid_fn)(lnet_event_t *ev);     /* specific callback fn */
-        void    *cbid_arg;                      /* additional arg */
-};
-
-#define RS_MAX_LOCKS 4
-#define RS_DEBUG     1
-
-struct ptlrpc_reply_state {
-        struct ptlrpc_cb_id    rs_cb_id;
-        struct list_head       rs_list;
-        struct list_head       rs_exp_list;
-        struct list_head       rs_obd_list;
-#if RS_DEBUG
-        struct list_head       rs_debug_list;
-#endif
-        /* updates to following flag serialised by srv_request_lock */
-        unsigned long          rs_difficult:1;     /* ACK/commit stuff */
-        unsigned long          rs_scheduled:1;     /* being handled? */
-        unsigned long          rs_scheduled_ever:1;/* any schedule attempts? */
-        unsigned long          rs_handled:1;  /* been handled yet? */
-        unsigned long          rs_on_net:1;   /* reply_out_callback pending? */
-        unsigned long          rs_prealloc:1; /* rs from prealloc list */
-
-        int                    rs_size;
-        __u64                  rs_transno;
-        __u64                  rs_xid;
-        struct obd_export     *rs_export;
-        struct ptlrpc_service *rs_service;
-        lnet_handle_md_t       rs_md_h;
-        atomic_t               rs_refcount;
-
-        /* locks awaiting client reply ACK */
-        int                    rs_nlocks;
-        struct lustre_handle   rs_locks[RS_MAX_LOCKS];
-        ldlm_mode_t            rs_modes[RS_MAX_LOCKS];
-        /* last member: variable sized reply message */
-        struct lustre_msg     *rs_msg;
-};
-
-struct ptlrpc_thread;
-
-enum rq_phase {
-        RQ_PHASE_NEW         = 0xebc0de00,
-        RQ_PHASE_RPC         = 0xebc0de01,
-        RQ_PHASE_BULK        = 0xebc0de02,
-        RQ_PHASE_INTERPRET   = 0xebc0de03,
-        RQ_PHASE_COMPLETE    = 0xebc0de04,
-};
-
-struct ptlrpc_request_pool {
-        spinlock_t prp_lock;
-        struct list_head prp_req_list;    /* list of ptlrpc_request structs */
-        int prp_rq_size;
-        void (*prp_populate)(struct ptlrpc_request_pool *, int);
-};
-
-struct ptlrpc_request {
-        int rq_type; /* one of PTL_RPC_MSG_* */
-        struct list_head rq_list;
-        struct list_head rq_timed_list;         /* server-side early replies */
-        struct list_head rq_history_list;       /* server-side history */
-        __u64            rq_history_seq;        /* history sequence # */
-        int rq_status;
-        spinlock_t rq_lock;
-        /* client-side flags are serialized by rq_lock */
-        unsigned long rq_intr:1, rq_replied:1, rq_err:1,
-                rq_timedout:1, rq_resend:1, rq_restart:1,
-                /*
-                 * when ->rq_replay is set, request is kept by the client even
-                 * after server commits corresponding transaction. This is
-                 * used for operations that require sequence of multiple
-                 * requests to be replayed. The only example currently is file
-                 * open/close. When last request in such a sequence is
-                 * committed, ->rq_replay is cleared on all requests in the
-                 * sequence.
-                 */
-                rq_replay:1,
-                rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1,
-                rq_no_delay:1, rq_net_err:1, rq_early:1, rq_must_unlink:1,
-                /* server-side flags */
-                rq_packed_final:1,  /* packed final reply */
-                rq_sent_final:1;    /* stop sending early replies */
-        enum rq_phase rq_phase; /* one of RQ_PHASE_* */
-        atomic_t rq_refcount;   /* client-side refcount for SENT race,
-                                   server-side refcounf for multiple replies */
-
-        struct ptlrpc_thread *rq_svc_thread; /* initial thread servicing req */
-
-        int rq_request_portal;  /* XXX FIXME bug 249 */
-        int rq_reply_portal;    /* XXX FIXME bug 249 */
-
-        int rq_nob_received; /* client-side # reply bytes actually received  */
-
-        int rq_reqlen;
-        struct lustre_msg *rq_reqmsg;
-
-        int rq_replen;
-        struct lustre_msg *rq_repbuf; /* client only, buf may be bigger than msg */
-        struct lustre_msg *rq_repmsg;
-        __u64 rq_transno;
-        __u64 rq_xid;
-        struct list_head rq_replay_list;
-
-        __u32 rq_req_swab_mask;
-        __u32 rq_rep_swab_mask;
-
-        int rq_import_generation;
-        enum lustre_imp_state rq_send_state;
-
-        int rq_early_count;           /* how many early replies (for stats) */
-
-        /* client+server request */
-        lnet_handle_md_t     rq_req_md_h;
-        struct ptlrpc_cb_id  rq_req_cbid;
-
-        /* server-side... */
-        struct timeval       rq_arrival_time;       /* request arrival time */
-        struct ptlrpc_reply_state *rq_reply_state;  /* separated reply state */
-        struct ptlrpc_request_buffer_desc *rq_rqbd; /* incoming request buffer*/
-#ifdef CRAY_XT3
-        __u32                rq_uid;            /* peer uid, used in MDS only */
-#endif
-
-        /* client-only incoming reply */
-        lnet_handle_md_t     rq_reply_md_h;
-        cfs_waitq_t          rq_reply_waitq;
-        struct ptlrpc_cb_id  rq_reply_cbid;
-
-        lnet_nid_t           rq_self;
-        lnet_process_id_t    rq_peer;
-        struct obd_export   *rq_export;
-        struct obd_import   *rq_import;
-
-        void (*rq_replay_cb)(struct ptlrpc_request *);
-        void (*rq_commit_cb)(struct ptlrpc_request *);
-        void  *rq_cb_data;
-
-        struct ptlrpc_bulk_desc *rq_bulk;       /* client side bulk */
-        /* client outgoing req */
-        time_t rq_sent;                         /* when request sent, seconds, 
-                                                 * or time when request should
-                                                 * be sent */
-        volatile time_t rq_deadline;     /* when request must finish. volatile
-               so that servers' early reply updates to the deadline aren't 
-               kept in per-cpu cache */
-        int    rq_timeout;               /* service time estimate (secs) */
-
-        /* Multi-rpc bits */
-        struct list_head rq_set_chain;
-        struct ptlrpc_request_set *rq_set;
-        void *rq_interpret_reply;               /* Async completion handler */
-        union ptlrpc_async_args rq_async_args;  /* Async completion context */
-        struct ptlrpc_request_pool *rq_pool;    /* Pool if request from
-                                                   preallocated list */
-};
-
-static inline void lustre_set_req_swabbed(struct ptlrpc_request *req, int index)
-{
-        LASSERT(index < sizeof(req->rq_req_swab_mask) * 8);
-        LASSERT((req->rq_req_swab_mask & (1 << index)) == 0);
-        req->rq_req_swab_mask |= 1 << index;
-}
-
-static inline void lustre_set_rep_swabbed(struct ptlrpc_request *req, int index)
-{
-        LASSERT(index < sizeof(req->rq_rep_swab_mask) * 8);
-        LASSERT((req->rq_rep_swab_mask & (1 << index)) == 0);
-        req->rq_rep_swab_mask |= 1 << index;
-}
-
-static inline int lustre_req_swabbed(struct ptlrpc_request *req, int index)
-{ 
-        LASSERT(index < sizeof(req->rq_req_swab_mask) * 8);
-        return req->rq_req_swab_mask & (1 << index);
-}
-
-static inline int lustre_rep_swabbed(struct ptlrpc_request *req, int index)
-{
-        LASSERT(index < sizeof(req->rq_rep_swab_mask) * 8);
-        return req->rq_rep_swab_mask & (1 << index);
-}
-
-static inline const char *
-ptlrpc_rqphase2str(struct ptlrpc_request *req)
-{
-        switch (req->rq_phase) {
-        case RQ_PHASE_NEW:
-                return "New";
-        case RQ_PHASE_RPC:
-                return "Rpc";
-        case RQ_PHASE_BULK:
-                return "Bulk";
-        case RQ_PHASE_INTERPRET:
-                return "Interpret";
-        case RQ_PHASE_COMPLETE:
-                return "Complete";
-        default:
-                return "?Phase?";
-        }
-}
-
-/* Spare the preprocessor, spoil the bugs. */
-#define FLAG(field, str) (field ? str : "")
-
-#define DEBUG_REQ_FLAGS(req)                                                  \
-        ptlrpc_rqphase2str(req),                                              \
-        FLAG(req->rq_intr, "I"), FLAG(req->rq_replied, "R"),                  \
-        FLAG(req->rq_err, "E"),                                               \
-        FLAG(req->rq_timedout, "X") /* eXpired */, FLAG(req->rq_resend, "S"), \
-        FLAG(req->rq_restart, "T"), FLAG(req->rq_replay, "P"),                \
-        FLAG(req->rq_no_resend, "N"),                                         \
-        FLAG(req->rq_waiting, "W")
-
-#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s"
-
-void _debug_req(struct ptlrpc_request *req, __u32 mask,
-                struct libcfs_debug_msg_data *data, const char *fmt, ...)
-        __attribute__ ((format (printf, 4, 5)));
-
-#define debug_req(cdls, level, req, file, func, line, fmt, a...)              \
-do {                                                                          \
-        CHECK_STACK();                                                        \
-                                                                              \
-        if (((level) & D_CANTMASK) != 0 ||                                    \
-            ((libcfs_debug & (level)) != 0 &&                                 \
-             (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0)) {              \
-                static struct libcfs_debug_msg_data _req_dbg_data =           \
-                DEBUG_MSG_DATA_INIT(cdls, DEBUG_SUBSYSTEM, file, func, line); \
-                _debug_req((req), (level), &_req_dbg_data, fmt, ##a);         \
-        }                                                                     \
-} while(0)
-
-/* for most callers (level is a constant) this is resolved at compile time */
-#define DEBUG_REQ(level, req, fmt, args...)                                   \
-do {                                                                          \
-        if ((level) & (D_ERROR | D_WARNING)) {                                \
-            static cfs_debug_limit_state_t cdls;                              \
-            debug_req(&cdls, level, req, __FILE__, __func__, __LINE__,        \
-                      "@@@ "fmt" ", ## args);                                 \
-        } else                                                                \
-            debug_req(NULL, level, req, __FILE__, __func__, __LINE__,         \
-                      "@@@ "fmt" ", ## args);                                 \
-} while (0)
-
-struct ptlrpc_bulk_page {
-        struct list_head bp_link;
-        int bp_buflen;
-        int bp_pageoffset;                      /* offset within a page */
-        struct page *bp_page;
-};
-
-#define BULK_GET_SOURCE   0
-#define BULK_PUT_SINK     1
-#define BULK_GET_SINK     2
-#define BULK_PUT_SOURCE   3
-
-struct ptlrpc_bulk_desc {
-        unsigned long bd_success:1;              /* completed successfully */
-        unsigned long bd_network_rw:1;           /* accessible to the network */
-        unsigned long bd_type:2;                 /* {put,get}{source,sink} */
-        unsigned long bd_registered:1;           /* client side */
-        spinlock_t   bd_lock;                   /* serialise with callback */
-        int bd_import_generation;
-        struct obd_export *bd_export;
-        struct obd_import *bd_import;
-        __u32 bd_portal;
-        struct ptlrpc_request *bd_req;          /* associated request */
-        cfs_waitq_t            bd_waitq;        /* server side only WQ */
-        int                    bd_iov_count;    /* # entries in bd_iov */
-        int                    bd_max_iov;      /* allocated size of bd_iov */
-        int                    bd_nob;          /* # bytes covered */
-        int                    bd_nob_transferred; /* # bytes GOT/PUT */
-
-        __u64                  bd_last_xid;
-
-        struct ptlrpc_cb_id    bd_cbid;         /* network callback info */
-        lnet_handle_md_t       bd_md_h;         /* associated MD */
-        lnet_nid_t             bd_sender;       /* stash event::sender */
-
-#if defined(__KERNEL__)
-        lnet_kiov_t             bd_iov[0];
-#else
-        lnet_md_iovec_t         bd_iov[0];
-#endif
-};
-
-struct ptlrpc_thread {
-
-        struct list_head t_link; /* active threads for service, from svc->srv_threads */
-
-        void *t_data;            /* thread-private data (preallocated memory) */
-        __u32 t_flags;
-
-        unsigned int t_id; /* service thread index, from ptlrpc_start_threads */
-        cfs_waitq_t t_ctl_waitq;
-};
-
-struct ptlrpc_request_buffer_desc {
-        struct list_head       rqbd_list;
-        struct list_head       rqbd_reqs;
-        struct ptlrpc_service *rqbd_service;
-        lnet_handle_md_t       rqbd_md_h;
-        int                    rqbd_refcount;
-        char                  *rqbd_buffer;
-        struct ptlrpc_cb_id    rqbd_cbid;
-        struct ptlrpc_request  rqbd_req;
-};
-
-typedef int (*svc_handler_t)(struct ptlrpc_request *req);
-typedef void (*svcreq_printfn_t)(void *, struct ptlrpc_request *);
-
-struct ptlrpc_service {
-        struct list_head srv_list;              /* chain thru all services */
-        int              srv_max_req_size;      /* biggest request to receive */
-        int              srv_max_reply_size;    /* biggest reply to send */
-        int              srv_buf_size;          /* size of individual buffers */
-        int              srv_nbuf_per_group;    /* # buffers to allocate in 1 group */
-        int              srv_nbufs;             /* total # req buffer descs allocated */
-        int              srv_threads_min;       /* threads to start at SOW */
-        int              srv_threads_max;       /* thread upper limit */
-        int              srv_threads_started;   /* index of last started thread */
-        int              srv_threads_running;   /* # running threads */
-        int              srv_n_difficult_replies; /* # 'difficult' replies */
-        int              srv_n_active_reqs;     /* # reqs being served */
-        cfs_duration_t   srv_rqbd_timeout;      /* timeout before re-posting reqs, in tick */
-        int              srv_watchdog_factor;   /* soft watchdog timeout mutiplier */
-        unsigned         srv_cpu_affinity:1;    /* bind threads to CPUs */
-        unsigned         srv_at_check:1;        /* check early replies */
-
-        __u32            srv_req_portal;
-        __u32            srv_rep_portal;
-        
-        /* AT stuff */
-        struct adaptive_timeout srv_at_estimate;/* estimated rpc service time */
-        spinlock_t        srv_at_lock;
-        struct list_head  srv_at_list;          /* reqs waiting for replies */
-        cfs_timer_t       srv_at_timer;         /* early reply timer */
-
-        int               srv_n_queued_reqs;    /* # reqs in either of the queues below */
-        struct list_head  srv_req_in_queue;     /* incoming reqs */
-        struct list_head  srv_request_queue;    /* reqs waiting for service */
-
-        struct list_head  srv_request_history;  /* request history */
-        __u64             srv_request_seq;      /* next request sequence # */
-        __u64             srv_request_max_cull_seq; /* highest seq culled from history */
-        svcreq_printfn_t  srv_request_history_print_fn; /* service-specific print fn */
-
-        struct list_head  srv_idle_rqbds;       /* request buffers to be reposted */
-        struct list_head  srv_active_rqbds;     /* req buffers receiving */
-        struct list_head  srv_history_rqbds;    /* request buffer history */
-        int               srv_nrqbd_receiving;  /* # posted request buffers */
-        int               srv_n_history_rqbds;  /* # request buffers in history */
-        int               srv_max_history_rqbds;/* max # request buffers in history */
-
-        atomic_t          srv_outstanding_replies;
-        struct list_head  srv_active_replies;   /* all the active replies */
-        struct list_head  srv_reply_queue;      /* replies waiting for service */
-
-        cfs_waitq_t       srv_waitq; /* all threads sleep on this. This
-                                      * wait-queue is signalled when new
-                                      * incoming request arrives and when
-                                      * difficult reply has to be handled. */
-
-        struct list_head   srv_threads;         /* service thread list */
-        svc_handler_t      srv_handler;
-
-        char *srv_name;  /* only statically allocated strings here; we don't clean them */
-        char *srv_thread_name;  /* only statically allocated strings here; we don't clean them */
-
-        spinlock_t               srv_lock;
-
-        cfs_proc_dir_entry_t    *srv_procroot;
-        struct lprocfs_stats    *srv_stats;
-
-        /* List of free reply_states */
-        struct list_head         srv_free_rs_list;
-        /* waitq to run, when adding stuff to srv_free_rs_list */
-        cfs_waitq_t              srv_free_rs_waitq;
-        
-        /*
-         * if non-NULL called during thread creation (ptlrpc_start_thread())
-         * to initialize service specific per-thread state.
-         */
-        int (*srv_init)(struct ptlrpc_thread *thread);
-        /*
-         * if non-NULL called during thread shutdown (ptlrpc_main()) to
-         * destruct state created by ->srv_init().
-         */
-        void (*srv_done)(struct ptlrpc_thread *thread);
-
-        //struct ptlrpc_srv_ni srv_interfaces[0];
-};
-
-/* ptlrpc/events.c */
-extern lnet_handle_eq_t ptlrpc_eq_h;
-extern int ptlrpc_uuid_to_peer(struct obd_uuid *uuid,
-                               lnet_process_id_t *peer, lnet_nid_t *self);
-extern void request_out_callback (lnet_event_t *ev);
-extern void reply_in_callback(lnet_event_t *ev);
-extern void client_bulk_callback (lnet_event_t *ev);
-extern void request_in_callback(lnet_event_t *ev);
-extern void reply_out_callback(lnet_event_t *ev);
-extern void server_bulk_callback (lnet_event_t *ev);
-
-/* ptlrpc/connection.c */
-void ptlrpc_dump_connections(void);
-void ptlrpc_readdress_connection(struct ptlrpc_connection *, struct obd_uuid *);
-struct ptlrpc_connection *ptlrpc_get_connection(lnet_process_id_t peer,
-                                                lnet_nid_t self, struct obd_uuid *uuid);
-int ptlrpc_put_connection(struct ptlrpc_connection *c);
-struct ptlrpc_connection *ptlrpc_connection_addref(struct ptlrpc_connection *);
-int ptlrpc_init_connection(void);
-void ptlrpc_cleanup_connection(void);
-extern lnet_pid_t ptl_get_pid(void);
-
-/* ptlrpc/niobuf.c */
-int ptlrpc_start_bulk_transfer(struct ptlrpc_bulk_desc *desc);
-void ptlrpc_abort_bulk(struct ptlrpc_bulk_desc *desc);
-int ptlrpc_register_bulk(struct ptlrpc_request *req);
-void ptlrpc_unregister_bulk (struct ptlrpc_request *req);
-
-static inline int ptlrpc_bulk_active (struct ptlrpc_bulk_desc *desc)
-{
-        int           rc;
-
-        spin_lock(&desc->bd_lock);
-        rc = desc->bd_network_rw;
-        spin_unlock(&desc->bd_lock);
-        return (rc);
-}
-
-#define PTLRPC_REPLY_MAYBE_DIFFICULT 0x01
-#define PTLRPC_REPLY_EARLY           0x02
-int ptlrpc_send_reply(struct ptlrpc_request *req, int flags);
-int ptlrpc_reply(struct ptlrpc_request *req);
-int ptlrpc_error(struct ptlrpc_request *req);
-void ptlrpc_resend_req(struct ptlrpc_request *request);
-int ptlrpc_at_get_net_latency(struct ptlrpc_request *req);
-int ptl_send_rpc(struct ptlrpc_request *request, int noreply);
-int ptlrpc_register_rqbd (struct ptlrpc_request_buffer_desc *rqbd);
-
-/* ptlrpc/client.c */
-void ptlrpc_init_client(int req_portal, int rep_portal, char *name,
-                        struct ptlrpc_client *);
-void ptlrpc_cleanup_client(struct obd_import *imp);
-struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid);
-
-static inline int
-ptlrpc_client_recv_or_unlink (struct ptlrpc_request *req)
-{
-        int           rc;
-
-        spin_lock(&req->rq_lock);
-        rc = req->rq_receiving_reply || req->rq_must_unlink;
-        spin_unlock(&req->rq_lock);
-        return (rc);
-}
-
-static inline void
-ptlrpc_wake_client_req (struct ptlrpc_request *req)
-{
-        if (req->rq_set == NULL)
-                cfs_waitq_signal(&req->rq_reply_waitq);
-        else
-                cfs_waitq_signal(&req->rq_set->set_waitq);
-}
-
-int ptlrpc_queue_wait(struct ptlrpc_request *req);
-int ptlrpc_replay_req(struct ptlrpc_request *req);
-void ptlrpc_unregister_reply(struct ptlrpc_request *req);
-void ptlrpc_restart_req(struct ptlrpc_request *req);
-void ptlrpc_abort_inflight(struct obd_import *imp);
-
-struct ptlrpc_request_set *ptlrpc_prep_set(void);
-int ptlrpc_set_add_cb(struct ptlrpc_request_set *set,
-                      set_interpreter_func fn, void *data);
-int ptlrpc_set_next_timeout(struct ptlrpc_request_set *);
-int ptlrpc_check_set(struct ptlrpc_request_set *set);
-int ptlrpc_set_wait(struct ptlrpc_request_set *);
-int ptlrpc_expired_set(void *data);
-void ptlrpc_interrupted_set(void *data);
-void ptlrpc_mark_interrupted(struct ptlrpc_request *req);
-void ptlrpc_set_destroy(struct ptlrpc_request_set *);
-void ptlrpc_set_add_req(struct ptlrpc_request_set *, struct ptlrpc_request *);
-void ptlrpc_set_add_new_req(struct ptlrpc_request_set *,
-                            struct ptlrpc_request *);
-
-void ptlrpc_free_rq_pool(struct ptlrpc_request_pool *pool);
-void ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq);
-struct ptlrpc_request_pool *ptlrpc_init_rq_pool(int, int,
-                                                void (*populate_pool)(struct ptlrpc_request_pool *, int));
-void ptlrpc_at_set_req_timeout(struct ptlrpc_request *req);
-struct ptlrpc_request *ptlrpc_prep_req(struct obd_import *imp, __u32 version,
-                                       int opcode, int count, int *lengths,
-                                       char **bufs);
-struct ptlrpc_request *ptlrpc_prep_req_pool(struct obd_import *imp,
-                                             __u32 version, int opcode,
-                                            int count, int *lengths, char **bufs,
-                                            struct ptlrpc_request_pool *pool);
-void ptlrpc_free_req(struct ptlrpc_request *request);
-void ptlrpc_req_finished(struct ptlrpc_request *request);
-void ptlrpc_req_finished_with_imp_lock(struct ptlrpc_request *request);
-struct ptlrpc_request *ptlrpc_request_addref(struct ptlrpc_request *req);
-struct ptlrpc_bulk_desc *ptlrpc_prep_bulk_imp (struct ptlrpc_request *req,
-                                               int npages, int type, int portal);
-struct ptlrpc_bulk_desc *ptlrpc_prep_bulk_exp(struct ptlrpc_request *req,
-                                              int npages, int type, int portal);
-void ptlrpc_free_bulk(struct ptlrpc_bulk_desc *bulk);
-void ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc,
-                           cfs_page_t *page, int pageoffset, int len);
-void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
-                                      struct obd_import *imp);
-__u64 ptlrpc_next_xid(void);
-__u64 ptlrpc_sample_next_xid(void);
-__u64 ptlrpc_req_xid(struct ptlrpc_request *request);
-
-/* ptlrpc/service.c */
-void ptlrpc_save_lock (struct ptlrpc_request *req,
-                       struct lustre_handle *lock, int mode);
-void ptlrpc_commit_replies (struct obd_device *obd);
-void ptlrpc_schedule_difficult_reply (struct ptlrpc_reply_state *rs);
-struct ptlrpc_service *ptlrpc_init_svc(int nbufs, int bufsize, int max_req_size,
-                                       int max_reply_size,
-                                       int req_portal, int rep_portal,
-                                       int watchdog_factor,
-                                       svc_handler_t, char *name,
-                                       cfs_proc_dir_entry_t *proc_entry,
-                                       svcreq_printfn_t, 
-                                       int min_threads, int max_threads,
-                                       char *threadname);
-void ptlrpc_stop_all_threads(struct ptlrpc_service *svc);
-
-int ptlrpc_start_threads(struct obd_device *dev, struct ptlrpc_service *svc);
-int ptlrpc_start_thread(struct obd_device *dev, struct ptlrpc_service *svc);
-int ptlrpc_unregister_service(struct ptlrpc_service *service);
-int liblustre_check_services (void *arg);
-void ptlrpc_daemonize(char *name);
-int ptlrpc_service_health_check(struct ptlrpc_service *);
-
-
-struct ptlrpc_svc_data {
-        char *name;
-        struct ptlrpc_service *svc;
-        struct ptlrpc_thread *thread;
-        struct obd_device *dev;
-};
-
-/* ptlrpc/import.c */
-int ptlrpc_connect_import(struct obd_import *imp, char * new_uuid);
-int ptlrpc_init_import(struct obd_import *imp);
-int ptlrpc_disconnect_import(struct obd_import *imp, int noclose);
-int ptlrpc_import_recovery_state_machine(struct obd_import *imp);
-void ptlrpc_import_setasync(struct obd_import *imp, int count);
-int ptlrpc_reconnect_import(struct obd_import *imp);
-
-/* ptlrpc/pack_generic.c */
-int lustre_msg_swabbed(struct lustre_msg *msg);
-int lustre_msg_check_version(struct lustre_msg *msg, __u32 version);
-int lustre_pack_request(struct ptlrpc_request *, __u32 magic, int count,
-                        int *lens, char **bufs);
-int lustre_pack_reply(struct ptlrpc_request *, int count, int *lens,
-                      char **bufs);
-#define LPRFL_EARLY_REPLY 1
-int lustre_pack_reply_flags(struct ptlrpc_request *, int count, int *lens,
-                            char **bufs, int flags);
-void lustre_shrink_reply(struct ptlrpc_request *req, int segment,
-                         unsigned int newlen, int move_data);
-void lustre_free_reply_state(struct ptlrpc_reply_state *rs);
-int lustre_msg_size(__u32 magic, int count, int *lengths);
-int lustre_packed_msg_size(struct lustre_msg *msg);
-int lustre_msg_early_size(void);
-int lustre_unpack_msg(struct lustre_msg *m, int len);
-void *lustre_msg_buf(struct lustre_msg *m, int n, int minlen);
-int lustre_msg_buflen(struct lustre_msg *m, int n);
-void lustre_msg_set_buflen(struct lustre_msg *m, int n, int len);
-int lustre_msg_bufcount(struct lustre_msg *m);
-char *lustre_msg_string (struct lustre_msg *m, int n, int max_len);
-void *lustre_swab_buf(struct lustre_msg *, int n, int minlen, void *swabber);
-void *lustre_swab_reqbuf(struct ptlrpc_request *req, int n, int minlen,
-                         void *swabber);
-void *lustre_swab_repbuf(struct ptlrpc_request *req, int n, int minlen,
-                         void *swabber);
-__u32 lustre_msghdr_get_flags(struct lustre_msg *msg);
-void lustre_msghdr_set_flags(struct lustre_msg *msg, __u32 flags);
-__u32 lustre_msg_get_flags(struct lustre_msg *msg);
-void lustre_msg_add_flags(struct lustre_msg *msg, int flags);
-void lustre_msg_set_flags(struct lustre_msg *msg, int flags);
-void lustre_msg_clear_flags(struct lustre_msg *msg, int flags);
-__u32 lustre_msg_get_op_flags(struct lustre_msg *msg);
-void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags);
-void lustre_msg_set_op_flags(struct lustre_msg *msg, int flags);
-struct lustre_handle *lustre_msg_get_handle(struct lustre_msg *msg);
-__u32 lustre_msg_get_type(struct lustre_msg *msg);
-__u32 lustre_msg_get_version(struct lustre_msg *msg);
-void lustre_msg_add_version(struct lustre_msg *msg, int version);
-__u32 lustre_msg_get_opc(struct lustre_msg *msg);
-__u64 lustre_msg_get_last_xid(struct lustre_msg *msg);
-__u64 lustre_msg_get_last_committed(struct lustre_msg *msg);
-__u64 lustre_msg_get_transno(struct lustre_msg *msg);
-__u64 lustre_msg_get_slv(struct lustre_msg *msg);
-__u32 lustre_msg_get_limit(struct lustre_msg *msg);
-void lustre_msg_set_slv(struct lustre_msg *msg, __u64 slv);
-void lustre_msg_set_limit(struct lustre_msg *msg, __u64 limit);
-int   lustre_msg_get_status(struct lustre_msg *msg);
-__u32 lustre_msg_get_conn_cnt(struct lustre_msg *msg);
-int lustre_msg_is_v1(struct lustre_msg *msg);
-__u32 lustre_msg_get_magic(struct lustre_msg *msg);
-__u32 lustre_msg_get_timeout(struct lustre_msg *msg);
-__u32 lustre_msg_get_service_time(struct lustre_msg *msg);
-__u32 lustre_msg_get_cksum(struct lustre_msg *msg);
-__u32 lustre_msg_calc_cksum(struct lustre_msg *msg);
-void lustre_msg_set_handle(struct lustre_msg *msg,struct lustre_handle *handle);
-void lustre_msg_set_type(struct lustre_msg *msg, __u32 type);
-void lustre_msg_set_opc(struct lustre_msg *msg, __u32 opc);
-void lustre_msg_set_last_xid(struct lustre_msg *msg, __u64 last_xid);
-void lustre_msg_set_last_committed(struct lustre_msg *msg,__u64 last_committed);
-void lustre_msg_set_transno(struct lustre_msg *msg, __u64 transno);
-void lustre_msg_set_status(struct lustre_msg *msg, __u32 status);
-void lustre_msg_set_conn_cnt(struct lustre_msg *msg, __u32 conn_cnt);
-void lustre_msg_set_timeout(struct lustre_msg *msg, __u32 timeout);
-void lustre_msg_set_service_time(struct lustre_msg *msg, __u32 service_time);
-void lustre_msg_set_cksum(struct lustre_msg *msg, __u32 cksum);
-
-static inline void
-ptlrpc_rs_addref(struct ptlrpc_reply_state *rs)
-{
-        LASSERT(atomic_read(&rs->rs_refcount) > 0);
-        atomic_inc(&rs->rs_refcount);
-}
-
-static inline void
-ptlrpc_rs_decref(struct ptlrpc_reply_state *rs)
-{
-        LASSERT(atomic_read(&rs->rs_refcount) > 0);
-        if (atomic_dec_and_test(&rs->rs_refcount))
-                lustre_free_reply_state(rs);
-}
-
-/* Should only be called once per req */
-static inline void ptlrpc_req_drop_rs(struct ptlrpc_request *req)
-{
-        if (req->rq_reply_state == NULL) 
-                return; /* shouldn't occur */
-        ptlrpc_rs_decref(req->rq_reply_state);
-        req->rq_reply_state = NULL;
-        req->rq_repmsg = NULL;
-}
-
-static inline __u32 lustre_request_magic(struct ptlrpc_request *req)
-{
-        return lustre_msg_get_magic(req->rq_reqmsg);
-}
-
-static inline int ptlrpc_req_get_repsize(struct ptlrpc_request *req)
-{
-        switch (req->rq_reqmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                CERROR("function not supported for lustre_msg V1!\n");
-                return -ENOTSUPP;
-        case LUSTRE_MSG_MAGIC_V2:
-                return req->rq_reqmsg->lm_repsize;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n",
-                         req->rq_reqmsg->lm_magic);
-                return -EFAULT;
-        }
-}
-
-static inline void
-ptlrpc_req_set_repsize(struct ptlrpc_request *req, int count, int *lens)
-{
-        int size = lustre_msg_size(req->rq_reqmsg->lm_magic, count, lens);
-        
-        req->rq_replen = size + lustre_msg_early_size();
-        if (req->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V2)
-                req->rq_reqmsg->lm_repsize = size;
-}
-
-/* ldlm/ldlm_lib.c */
-int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf);
-int client_obd_cleanup(struct obd_device * obddev);
-int client_connect_import(struct lustre_handle *conn, struct obd_device *obd,
-                          struct obd_uuid *cluuid, struct obd_connect_data *,
-                          void *localdata);
-int client_disconnect_export(struct obd_export *exp);
-int client_import_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
-                           int priority);
-int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid);
-int import_set_conn_priority(struct obd_import *imp, struct obd_uuid *uuid);
-
-/* ptlrpc/pinger.c */
-int ptlrpc_pinger_add_import(struct obd_import *imp);
-int ptlrpc_pinger_del_import(struct obd_import *imp);
-#ifdef __KERNEL__
-void ping_evictor_start(void);
-void ping_evictor_stop(void);
-#else
-#define ping_evictor_start()    do {} while (0)
-#define ping_evictor_stop()     do {} while (0)
-#endif
-
-/* ptlrpc/ptlrpcd.c */
-void ptlrpcd_wake(struct ptlrpc_request *req);
-void ptlrpcd_add_req(struct ptlrpc_request *req);
-int ptlrpcd_addref(void);
-void ptlrpcd_decref(void);
-
-/* ptlrpc/lproc_ptlrpc.c */
-const char* ll_opcode2str(__u32 opcode);
-#ifdef LPROCFS
-void ptlrpc_lprocfs_register_obd(struct obd_device *obd);
-void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd);
-void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc, int bytes);
-#else
-static inline void ptlrpc_lprocfs_register_obd(struct obd_device *obd) {}
-static inline void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd) {}
-static inline void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc,
-                                      int bytes) {}
-#endif
-
-/* ptlrpc/llog_server.c */
-int llog_origin_handle_create(struct ptlrpc_request *req);
-int llog_origin_handle_destroy(struct ptlrpc_request *req);
-int llog_origin_handle_prev_block(struct ptlrpc_request *req);
-int llog_origin_handle_next_block(struct ptlrpc_request *req);
-int llog_origin_handle_read_header(struct ptlrpc_request *req);
-int llog_origin_handle_close(struct ptlrpc_request *req);
-int llog_origin_handle_cancel(struct ptlrpc_request *req);
-int llog_catinfo(struct ptlrpc_request *req);
-
-/* ptlrpc/llog_client.c */
-extern struct llog_operations llog_client_ops;
-
-#endif
diff --git a/lustre/include/lustre_param.h b/lustre/include/lustre_param.h
deleted file mode 100644
index 281cf6e52100e7aace29d463efd4614bceeb7aca..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_param.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- *
- * User-settable parameter keys
- */
-
-#ifndef _LUSTRE_PARAM_H
-#define _LUSTRE_PARAM_H
-
-/* obd_config.c */
-int class_find_param(char *buf, char *key, char **valp);
-int class_match_param(char *buf, char *key, char **valp);
-int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh);
-/* obd_mount.c */
-int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
-            char *s1, char *s2, char *s3, char *s4);
-
-
-
-/****************** User-settable parameter keys *********************/
-/* e.g. 
-        tunefs.lustre --param="failover.node=192.168.0.13@tcp0" /dev/sda
-        lctl conf_param testfs-OST0000 failover.node=3@elan,192.168.0.3@tcp0
-                    ... testfs-MDT0000.lov.stripesize=4M
-                    ... testfs-OST0000.ost.client_cache_seconds=15
-                    ... testfs.sys.timeout=<secs> 
-                    ... testfs.llite.max_read_ahead_mb=16
-*/
-
-/* System global or special params not handled in obd's proc */
-#define PARAM_SYS_TIMEOUT          "sys.timeout="      /* global */
-#define PARAM_MGSNODE              "mgsnode="          /* during mount */
-#define PARAM_FAILNODE             "failover.node="    /* llog generation */
-#define PARAM_FAILMODE             "failover.mode="    /* llog generation */
-#define PARAM_ACTIVE               "active="           /* llog generation */
-#define PARAM_MDT_UPCALL           "mdt.group_upcall=" /* mds group upcall */
-
-/* Prefixes for parameters handled by obd's proc methods (XXX_process_config) */
-#define PARAM_OST                  "ost."
-#define PARAM_OSC                  "osc."
-#define PARAM_MDT                  "mdt."
-#define PARAM_MDC                  "mdc."
-#define PARAM_LLITE                "llite."
-#define PARAM_LOV                  "lov."
-
-#endif /* _LUSTRE_PARAM_H */
diff --git a/lustre/include/lustre_quota.h b/lustre/include/lustre_quota.h
deleted file mode 100644
index eb8b227d99e5c7531914fbff67751d6c0fd74c4b..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_quota.h
+++ /dev/null
@@ -1,594 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef _LUSTRE_QUOTA_H
-#define _LUSTRE_QUOTA_H
-
-#if defined(__linux__)
-#include <linux/lustre_quota.h>
-#elif defined(__APPLE__)
-#include <darwin/lustre_quota.h>
-#elif defined(__WINNT__)
-#include <winnt/lustre_quota.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#include <lustre/lustre_idl.h>
-#include <lustre_net.h>
-#include <lvfs.h>
-#include <obd_support.h>
-
-struct obd_device;
-struct client_obd;
-
-#ifndef NR_DQHASH
-#define NR_DQHASH 45
-#endif
-
-#ifdef HAVE_QUOTA_SUPPORT
-
-#ifdef __KERNEL__
-
-/* structures to access admin quotafile */
-struct lustre_mem_dqinfo {
-        unsigned int dqi_bgrace;
-        unsigned int dqi_igrace;
-        unsigned long dqi_flags;
-        unsigned int dqi_blocks;
-        unsigned int dqi_free_blk;
-        unsigned int dqi_free_entry;
-};
-
-struct lustre_quota_info {
-        struct file *qi_files[MAXQUOTAS];
-        struct lustre_mem_dqinfo qi_info[MAXQUOTAS];
-        lustre_quota_version_t qi_version;
-};
-
-#define DQ_STATUS_AVAIL         0x0     /* Available dquot */
-#define DQ_STATUS_SET           0x01    /* Sombody is setting dquot */
-#define DQ_STATUS_RECOVERY      0x02    /* dquot is in recovery */
-
-struct lustre_mem_dqblk {
-        __u64 dqb_bhardlimit;	/* absolute limit on disk blks alloc */
-        __u64 dqb_bsoftlimit;	/* preferred limit on disk blks */
-        __u64 dqb_curspace;	/* current used space */
-        __u64 dqb_ihardlimit;	/* absolute limit on allocated inodes */
-        __u64 dqb_isoftlimit;	/* preferred inode limit */
-        __u64 dqb_curinodes;	/* current # allocated inodes */
-        time_t dqb_btime;	/* time limit for excessive disk use */
-        time_t dqb_itime;	/* time limit for excessive inode use */
-};
-
-struct lustre_dquot {
-        /* Hash list in memory, protect by dquot_hash_lock */
-        struct list_head dq_hash;
-        /* Protect the data in lustre_dquot */
-        struct semaphore dq_sem;
-        /* Use count */
-        int dq_refcnt;
-        /* Pointer of quota info it belongs to */
-        struct lustre_quota_info *dq_info;
-
-        loff_t dq_off;                  /* Offset of dquot on disk */
-        unsigned int dq_id;             /* ID this applies to (uid, gid) */
-        int dq_type;                    /* Type fo quota (USRQUOTA, GRPQUOUTA) */
-        unsigned short dq_status;       /* See DQ_STATUS_ */
-        unsigned long dq_flags;         /* See DQ_ in quota.h */
-        struct lustre_mem_dqblk dq_dqb; /* Diskquota usage */
-};
-
-struct dquot_id {
-        struct list_head        di_link;
-        __u32                   di_id;
-};
-
-#define QFILE_CHK               1
-#define QFILE_RD_INFO           2
-#define QFILE_WR_INFO           3
-#define QFILE_INIT_INFO         4
-#define QFILE_RD_DQUOT          5
-#define QFILE_WR_DQUOT          6
-#define QFILE_CONVERT           7
-
-/* admin quotafile operations */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-int lustre_check_quota_file(struct lustre_quota_info *lqi, int type);
-int lustre_read_quota_info(struct lustre_quota_info *lqi, int type);
-int lustre_write_quota_info(struct lustre_quota_info *lqi, int type);
-int lustre_read_dquot(struct lustre_dquot *dquot);
-int lustre_commit_dquot(struct lustre_dquot *dquot);
-int lustre_init_quota_info(struct lustre_quota_info *lqi, int type);
-int lustre_get_qids(struct file *file, struct inode *inode, int type,
-                    struct list_head *list);
-int lustre_quota_convert(struct lustre_quota_info *lqi, int type);
-#else
-
-#ifndef DQ_FAKE_B
-#define DQ_FAKE_B       6
-#endif
-
-static inline int lustre_check_quota_file(struct lustre_quota_info *lqi,
-                                          int type)
-{
-        return 0;
-}
-static inline int lustre_read_quota_info(struct lustre_quota_info *lqi,
-                                         int type)
-{
-        return 0;
-}
-static inline int lustre_write_quota_info(struct lustre_quota_info *lqi,
-                                          int type)
-{
-        return 0;
-}
-static inline int lustre_read_dquot(struct lustre_dquot *dquot)
-{
-        return 0;
-}
-static inline int lustre_commit_dquot(struct lustre_dquot *dquot)
-{
-        return 0;
-}
-static inline int lustre_init_quota_info(struct lustre_quota_info *lqi,
-                                         int type)
-{
-        return 0;
-}
-static inline int lustre_quota_convert(struct lustre_quota_info *lqi,
-                                       int type)
-{
-        return 0;
-}
-#endif  /* KERNEL_VERSION(2,5,0) */
-
-#define LL_DQUOT_OFF(sb)    DQUOT_OFF(sb)
-
-typedef int (*dqacq_handler_t) (struct obd_device * obd, struct qunit_data * qd,
-                                int opc);
-struct lustre_quota_ctxt {
-        struct super_block *lqc_sb;     /* superblock this applies to */
-        struct obd_import *lqc_import;  /* import used to send dqacq/dqrel RPC */
-        dqacq_handler_t lqc_handler;    /* dqacq/dqrel RPC handler, only for quota master */
-        unsigned long lqc_recovery:1,   /* Doing recovery */
-                      lqc_atype:2,      /* Turn on user/group quota at setup automatically, 
-                                         * 0: none, 1: user quota, 2: group quota, 3: both */
-                      lqc_status:1,     /* Quota status. 0:Off, 1:On */
-                      lqc_switch_qs:1;  /* the function of change qunit size
-                                         * 0:Off, 1:On */
-        unsigned long lqc_iunit_sz;     /* original unit size of file quota and
-                                         * upper limitation for adjust file
-                                         * qunit */
-        unsigned long lqc_itune_sz;     /* Trigger dqacq when available file
-                                         * quota less than this value, trigger
-                                         * dqrel when available file quota
-                                         * more than this value + 1 iunit */
-        unsigned long lqc_bunit_sz;     /* original unit size of block quota and
-                                         * upper limitation for adjust block
-                                         * qunit */
-        unsigned long lqc_btune_sz;     /* See comment of lqc_itune_sz */
-        struct lustre_class_hash_body *lqc_lqs_hash_body;
-                                        /* all lustre_qunit_size structure in
-                                         * it */
-        /* the values below are relative to how master change its qunit sizes */
-        unsigned long lqc_cqs_boundary_factor; /* this affects the boundary of
-                                                * shrinking and enlarging qunit
-                                                * size. default=4 */
-        unsigned long lqc_cqs_least_bunit;  /* the least value of block qunit */
-        unsigned long lqc_cqs_least_iunit;  /* the least value of inode qunit */
-        unsigned long lqc_cqs_qs_factor;    /* when enlarging, qunit size will
-                                             * mutilple it; when shrinking,
-                                             * qunit size will divide it */
-        int           lqc_switch_seconds;   /* avoid ping-pong effect of
-                                             * adjusting qunit size. How many
-                                             * seconds must be waited between
-                                             * enlarging and shinking qunit */
-        spinlock_t    lqc_lock;         /* guard lqc_imp_valid now */
-};
-
-#define LQC_HASH_BODY(qctxt) (qctxt->lqc_lqs_hash_body)
-
-struct lustre_qunit_size {
-        struct hlist_node lqs_hash; /* the hash entry */
-        unsigned int lqs_id;        /* id of user/group */
-        unsigned long lqs_flags;    /* is user/group; FULLBUF or LESSBUF */
-        unsigned long lqs_iunit_sz; /* Unit size of file quota currently */
-        unsigned long lqs_itune_sz; /* Trigger dqacq when available file quota
-                                     * less than this value, trigger dqrel
-                                     * when more than this value + 1 iunit */
-        unsigned long lqs_bunit_sz; /* Unit size of block quota currently */
-        unsigned long lqs_btune_sz; /* See comment of lqs itune sz */
-        unsigned long lqs_bwrite_pending; /* the blocks reached ost and don't
-                                           * finish */
-        unsigned long lqs_iwrite_pending; /* the inodes reached mds and don't
-                                           * finish */
-        long long lqs_ino_rec;  /* when inodes are allocated/released,
-                                 * this value will record it */
-        long long lqs_blk_rec;  /* when blocks are allocated/released,
-                                 * this value will record it */
-        atomic_t lqs_refcount;
-        cfs_time_t lqs_last_bshrink;   /* time of last block shrink */
-        cfs_time_t lqs_last_ishrink;   /* time of last inode shrink */
-        spinlock_t lqs_lock;
-};
-
-#define LQS_IS_GRP(lqs)    ((lqs)->lqs_flags & LQUOTA_FLAGS_GRP)
-#define LQS_IS_ADJBLK(lqs) ((lqs)->lqs_flags & LQUOTA_FLAGS_ADJBLK)
-#define LQS_IS_ADJINO(lqs) ((lqs)->lqs_flags & LQUOTA_FLAGS_ADJINO)
-
-#define LQS_SET_GRP(lqs)    ((lqs)->lqs_flags |= LQUOTA_FLAGS_GRP)
-#define LQS_SET_ADJBLK(lqs) ((lqs)->lqs_flags |= LQUOTA_FLAGS_ADJBLK)
-#define LQS_SET_ADJINO(lqs) ((lqs)->lqs_flags |= LQUOTA_FLAGS_ADJINO)
-
-static inline void lqs_getref(struct lustre_qunit_size *lqs)
-{
-        atomic_inc(&lqs->lqs_refcount);
-}
-
-static inline void lqs_putref(struct lustre_qunit_size *lqs)
-{
-        if (atomic_dec_and_test(&lqs->lqs_refcount)) {
-                spin_lock(&lqs->lqs_lock);
-                hlist_del_init(&lqs->lqs_hash);
-                spin_unlock(&lqs->lqs_lock);
-                OBD_FREE_PTR(lqs);
-        }
-}
-
-static inline void lqs_initref(struct lustre_qunit_size *lqs)
-{
-        atomic_set(&lqs->lqs_refcount, 0);
-}
-
-#else
-
-struct lustre_quota_info {
-};
-
-struct lustre_quota_ctxt {
-};
-
-#endif  /* !__KERNEL__ */
-
-#else
-
-#define LL_DQUOT_OFF(sb) do {} while(0)
-
-struct lustre_quota_info {
-};
-
-struct lustre_quota_ctxt {
-};
-
-#endif /* !HAVE_QUOTA_SUPPORT */
-
-/* If the (quota limit < qunit * slave count), the slave which can't
- * acquire qunit should set it's local limit as MIN_QLIMIT */
-#define MIN_QLIMIT      1
-
-struct quotacheck_thread_args {
-        struct obd_export   *qta_exp;   /* obd export */
-        struct obd_quotactl  qta_oqctl; /* obd_quotactl args */
-        struct super_block  *qta_sb;    /* obd super block */
-        atomic_t            *qta_sem;   /* obt_quotachecking */
-};
-
-typedef int (*quota_acquire)(struct obd_device *obd,
-                             unsigned int uid, unsigned int gid);
-
-typedef struct {
-        int (*quota_init) (void);
-        int (*quota_exit) (void);
-        int (*quota_setup) (struct obd_device *);
-        int (*quota_cleanup) (struct obd_device *);
-        /* For quota master, close admin quota files */
-        int (*quota_fs_cleanup) (struct obd_device *);
-        int (*quota_ctl) (struct obd_export *, struct obd_quotactl *);
-        int (*quota_check) (struct obd_export *, struct obd_quotactl *);
-        int (*quota_recovery) (struct obd_device *);
-
-        /* For quota master/slave, adjust quota limit after fs operation */
-        int (*quota_adjust) (struct obd_device *, unsigned int[],
-                             unsigned int[], int, int);
-
-        /* For quota slave, set import, trigger quota recovery */
-        int (*quota_setinfo) (struct obd_export *, struct obd_device *);
-
-        /* For quota slave, clear import when relative import is invalid */
-        int (*quota_clearinfo) (struct obd_export *, struct obd_device *);
-
-        /* For quota slave, set proper thread resoure capability */
-        int (*quota_enforce) (struct obd_device *, unsigned int);
-
-        /* For quota slave, check whether specified uid/gid is over quota */
-        int (*quota_getflag) (struct obd_device *, struct obdo *);
-
-        /* For quota slave, acquire/release quota from master if needed */
-        int (*quota_acquire) (struct obd_device *, unsigned int, unsigned int);
-
-        /* For quota slave, check whether specified uid/gid's remaining quota
-         * can finish a block_write or inode_create rpc. It updates the pending
-         * record of block and inode, acquires quota if necessary */
-        int (*quota_chkquota) (struct obd_device *, unsigned int, unsigned int,
-                               int, int *, quota_acquire);
-
-        /* For quota client, poll if the quota check done */
-        int (*quota_poll_check) (struct obd_export *, struct if_quotacheck *);
-
-        /* For quota client, check whether specified uid/gid is over quota */
-        int (*quota_chkdq) (struct client_obd *, unsigned int, unsigned int);
-
-        /* For quota client, the actions after the pending write is committed */
-        int (*quota_pending_commit) (struct obd_device *, unsigned int,
-                                     unsigned int, int);
-
-        /* For quota client, set over quota flag for specifed uid/gid */
-        int (*quota_setdq) (struct client_obd *, unsigned int, unsigned int,
-                            obd_flag, obd_flag);
-
-        /* For adjusting qunit size b=10600 */
-        int (*quota_adjust_qunit) (struct obd_export *exp, struct
-                                   quota_adjust_qunit *oqaq);
-
-} quota_interface_t;
-
-#define Q_COPY(out, in, member) (out)->member = (in)->member
-
-#define QUOTA_OP(interface, op) interface->quota_ ## op
-
-#define QUOTA_CHECK_OP(interface, op)                           \
-do {                                                            \
-        if (!interface)                                         \
-                RETURN(0);                                      \
-        if (!QUOTA_OP(interface, op)) {                         \
-                CERROR("no quota operation: " #op "\n");        \
-                RETURN(-EOPNOTSUPP);                            \
-        }                                                       \
-} while(0)
-
-static inline int lquota_init(quota_interface_t *interface)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, init);
-        rc = QUOTA_OP(interface, init)();
-        RETURN(rc);
-}
-
-static inline int lquota_exit(quota_interface_t *interface)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, exit);
-        rc = QUOTA_OP(interface, exit)();
-        RETURN(rc);
-}
-
-static inline int lquota_setup(quota_interface_t *interface,
-                               struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, setup);
-        rc = QUOTA_OP(interface, setup)(obd);
-        RETURN(rc);
-}
-
-static inline int lquota_cleanup(quota_interface_t *interface,
-                                 struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, cleanup);
-        rc = QUOTA_OP(interface, cleanup)(obd);
-        RETURN(rc);
-}
-
-static inline int lquota_fs_cleanup(quota_interface_t *interface,
-                                    struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, fs_cleanup);
-        rc = QUOTA_OP(interface, fs_cleanup)(obd);
-        RETURN(rc);
-}
-
-static inline int lquota_recovery(quota_interface_t *interface,
-                                  struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, recovery);
-        rc = QUOTA_OP(interface, recovery)(obd);
-        RETURN(rc);
-}
-
-static inline int lquota_adjust(quota_interface_t *interface,
-                                struct obd_device *obd,
-                                unsigned int qcids[],
-                                unsigned int qpids[],
-                                int rc, int opc)
-{
-        int ret;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, adjust);
-        ret = QUOTA_OP(interface, adjust)(obd, qcids, qpids, rc, opc);
-        RETURN(ret);
-}
-
-static inline int lquota_chkdq(quota_interface_t *interface,
-                               struct client_obd *cli,
-                               unsigned int uid, unsigned int gid)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, chkdq);
-        rc = QUOTA_OP(interface, chkdq)(cli, uid, gid);
-        RETURN(rc);
-}
-
-static inline int lquota_setdq(quota_interface_t *interface,
-                               struct client_obd *cli,
-                               unsigned int uid, unsigned int gid,
-                               obd_flag valid, obd_flag flags)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, setdq);
-        rc = QUOTA_OP(interface, setdq)(cli, uid, gid, valid, flags);
-        RETURN(rc);
-}
-
-static inline int lquota_poll_check(quota_interface_t *interface,
-                                    struct obd_export *exp,
-                                    struct if_quotacheck *qchk)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, poll_check);
-        rc = QUOTA_OP(interface, poll_check)(exp, qchk);
-        RETURN(rc);
-}
-
-static inline int lquota_setinfo(quota_interface_t *interface,
-                                 struct obd_export *exp,
-                                 struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, setinfo);
-        rc = QUOTA_OP(interface, setinfo)(exp, obd);
-        RETURN(rc);
-}
-
-static inline int lquota_clearinfo(quota_interface_t *interface,
-                                   struct obd_export *exp,
-                                   struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, clearinfo);
-        rc = QUOTA_OP(interface, clearinfo)(exp, obd);
-        RETURN(rc);
-}
-
-static inline int lquota_enforce(quota_interface_t *interface,
-                                 struct obd_device *obd,
-                                 unsigned int ignore)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, enforce);
-        rc = QUOTA_OP(interface, enforce)(obd, ignore);
-        RETURN(rc);
-}
-
-static inline int lquota_getflag(quota_interface_t *interface,
-                                 struct obd_device *obd, struct obdo *oa)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, getflag);
-        rc = QUOTA_OP(interface, getflag)(obd, oa);
-        RETURN(rc);
-}
-
-static inline int lquota_acquire(quota_interface_t *interface,
-                                 struct obd_device *obd,
-                                 unsigned int uid, unsigned int gid)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, acquire);
-        rc = QUOTA_OP(interface, acquire)(obd, uid, gid);
-        RETURN(rc);
-}
-
-static inline int lquota_chkquota(quota_interface_t *interface,
-                                  struct obd_device *obd,
-                                  unsigned int uid, unsigned int gid,
-                                  int count, int *flag)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, chkquota);
-        QUOTA_CHECK_OP(interface, acquire);
-        rc = QUOTA_OP(interface, chkquota)(obd, uid, gid, count, flag,
-                                           QUOTA_OP(interface, acquire));
-        RETURN(rc);
-}
-
-static inline int lquota_pending_commit(quota_interface_t *interface,
-                                        struct obd_device *obd,
-                                        unsigned int uid, unsigned int gid,
-                                        int npage)
-{
-        int rc;
-        ENTRY;
-
-        QUOTA_CHECK_OP(interface, pending_commit);
-        rc = QUOTA_OP(interface, pending_commit)(obd, uid, gid, npage);
-        RETURN(rc);
-}
-
-int lprocfs_quota_rd_bunit(char *page, char **start, off_t off, int count,
-                           int *eof, void *data);
-int lprocfs_quota_wr_bunit(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-int lprocfs_quota_rd_btune(char *page, char **start, off_t off, int count,
-                           int *eof, void *data);
-int lprocfs_quota_wr_btune(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-int lprocfs_quota_rd_iunit(char *page, char **start, off_t off, int count,
-                           int *eof, void *data);
-int lprocfs_quota_wr_iunit(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-int lprocfs_quota_rd_itune(char *page, char **start, off_t off, int count,
-                           int *eof, void *data);
-int lprocfs_quota_wr_itune(struct file *file, const char *buffer,
-                           unsigned long count, void *data);
-int lprocfs_quota_rd_type(char *page, char **start, off_t off, int count,
-                          int *eof, void *data);
-int lprocfs_quota_wr_type(struct file *file, const char *buffer,
-                          unsigned long count, void *data);
-int lprocfs_quota_rd_switch_seconds(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data);
-int lprocfs_quota_wr_switch_seconds(struct file *file, const char *buffer,
-                                    unsigned long count, void *data);
-
-#ifndef __KERNEL__
-extern quota_interface_t osc_quota_interface;
-extern quota_interface_t mdc_quota_interface;
-extern quota_interface_t lov_quota_interface;
-#endif
-
-#define LUSTRE_ADMIN_QUOTAFILES_V1 {\
-        "admin_quotafile.usr",	/* user admin quotafile */\
-        "admin_quotafile.grp"	/* group admin quotafile */\
-}
-
-#define LUSTRE_ADMIN_QUOTAFILES_V2 {\
-        "admin_quotafile_v2.usr",       /* user admin quotafile */\
-        "admin_quotafile_v2.grp"        /* group admin quotafile */\
-}
-
-#endif /* _LUSTRE_QUOTA_H */
diff --git a/lustre/include/lustre_ucache.h b/lustre/include/lustre_ucache.h
deleted file mode 100644
index 16b5c1a95e3dba0ca7204b8eace3dc79562871a6..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_ucache.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _UPCALL_CACHE_H
-#define _UPCALL_CACHE_H
-
-#define UC_CACHE_NEW            0x01
-#define UC_CACHE_ACQUIRING      0x02
-#define UC_CACHE_INVALID        0x04
-#define UC_CACHE_EXPIRED        0x08
-
-#define UC_CACHE_IS_NEW(i)          ((i)->ue_flags & UC_CACHE_NEW)
-#define UC_CACHE_IS_INVALID(i)      ((i)->ue_flags & UC_CACHE_INVALID)
-#define UC_CACHE_IS_ACQUIRING(i)    ((i)->ue_flags & UC_CACHE_ACQUIRING)
-#define UC_CACHE_IS_EXPIRED(i)      ((i)->ue_flags & UC_CACHE_EXPIRED)
-#define UC_CACHE_IS_VALID(i)        ((i)->ue_flags == 0)
-
-#define UC_CACHE_SET_NEW(i)         (i)->ue_flags |= UC_CACHE_NEW
-#define UC_CACHE_SET_INVALID(i)     (i)->ue_flags |= UC_CACHE_INVALID
-#define UC_CACHE_SET_ACQUIRING(i)   (i)->ue_flags |= UC_CACHE_ACQUIRING
-#define UC_CACHE_SET_EXPIRED(i)     (i)->ue_flags |= UC_CACHE_EXPIRED
-#define UC_CACHE_SET_VALID(i)       (i)->ue_flags = 0
-
-#define UC_CACHE_CLEAR_NEW(i)       (i)->ue_flags &= ~UC_CACHE_NEW
-#define UC_CACHE_CLEAR_ACQUIRING(i) (i)->ue_flags &= ~UC_CACHE_ACQUIRING
-#define UC_CACHE_CLEAR_INVALID(i)   (i)->ue_flags &= ~UC_CACHE_INVALID
-#define UC_CACHE_CLEAR_EXPIRED(i)   (i)->ue_flags &= ~UC_CACHE_EXPIRED
-
-struct upcall_cache_entry {
-        struct list_head        ue_hash;
-        __u64                   ue_key;
-        __u64                   ue_primary;
-        struct group_info      *ue_group_info;
-        atomic_t                ue_refcount;
-        int                     ue_flags;
-        cfs_waitq_t             ue_waitq;
-        cfs_time_t              ue_acquire_expire;
-        cfs_time_t              ue_expire;
-};
-
-#define UC_CACHE_HASH_SIZE        (128)
-#define UC_CACHE_HASH_INDEX(id)   ((id) & (UC_CACHE_HASH_SIZE - 1))
-#define UC_CACHE_UPCALL_MAXPATH   (1024UL)
-
-struct upcall_cache {
-        struct list_head        uc_hashtable[UC_CACHE_HASH_SIZE];
-        spinlock_t              uc_lock;
-
-        char                    uc_name[40];            /* for upcall */
-        char                    uc_upcall[UC_CACHE_UPCALL_MAXPATH];
-        cfs_time_t              uc_acquire_expire;      /* jiffies */
-        cfs_time_t              uc_entry_expire;        /* jiffies */
-};
-
-struct upcall_cache_entry *upcall_cache_get_entry(struct upcall_cache *hash,
-                                                  __u64 key, __u32 primary,
-                                                  __u32 ngroups, __u32 *groups);
-void upcall_cache_put_entry(struct upcall_cache *hash,
-                            struct upcall_cache_entry *entry);
-int upcall_cache_downcall(struct upcall_cache *hash, __u32 err, __u64 key,
-                          __u32 primary, __u32 ngroups, __u32 *groups);
-void upcall_cache_flush_idle(struct upcall_cache *cache);
-void upcall_cache_flush_all(struct upcall_cache *cache);
-struct upcall_cache *upcall_cache_init(const char *name);
-void upcall_cache_cleanup(struct upcall_cache *hash);
-
-#endif /* _UPCALL_CACHE_H */
diff --git a/lustre/include/lustre_ver.h.in b/lustre/include/lustre_ver.h.in
deleted file mode 100644
index 1c63510944527635cf9dd3a665a92309023b731c..0000000000000000000000000000000000000000
--- a/lustre/include/lustre_ver.h.in
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef _LUSTRE_VER_H_
-#define _LUSTRE_VER_H_
-/* This file automatically generated from lustre/include/lustre_ver.h.in,
- * based on parameters in lustre/autoconf/lustre-version.ac.
- * Changes made directly to this file will be lost. */
-
-#define LUSTRE_MAJOR @AC_LUSTRE_MAJOR@
-#define LUSTRE_MINOR @AC_LUSTRE_MINOR@
-#define LUSTRE_PATCH @AC_LUSTRE_PATCH@
-#define LUSTRE_FIX @AC_LUSTRE_FIX@
-#define LUSTRE_VERSION_STRING "@AC_LUSTRE_VERSION_STRING@"
-
-#define LUSTRE_VERSION_CODE OBD_OCD_VERSION(LUSTRE_MAJOR,LUSTRE_MINOR,LUSTRE_PATCH,LUSTRE_FIX)
-
-/* liblustre clients are only allowed to connect if their LUSTRE_FIX mismatches
- * by this amount (set in lustre/autoconf/lustre-version.ac). */
-#define LUSTRE_VERSION_ALLOWED_OFFSET @AC_LUSTRE_VER_ALLOWED_OFFSET@
-
-#ifdef __KERNEL__
-/* If lustre version of client and servers it connects to differs by more
- * than this amount, client would issue a warning.
- * (set in lustre/autoconf/lustre-version.ac) */
-#define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_CLI_VER_OFFSET_WARN@
-#else
-/* If liblustre version of client and servers it connects to differs by more
- * than this amount, client would issue a warning.
- * (set in lustre/autoconf/lustre-version.ac) */
-#define LUSTRE_VERSION_OFFSET_WARN @AC_LUSTRE_LIB_VER_OFFSET_WARN@
-#endif
-
-
-#endif
diff --git a/lustre/include/lvfs.h b/lustre/include/lvfs.h
deleted file mode 100644
index 42e854427f0fda7c8e0a0ef9f4612cf23abbb21a..0000000000000000000000000000000000000000
--- a/lustre/include/lvfs.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001 Cluster File Systems, Inc. <braam@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * lustre VFS/process permission interface
- */
-
-#ifndef __LVFS_H__
-#define __LVFS_H__
-
-#define LL_FID_NAMELEN (16 + 1 + 8 + 1)
-
-#include <libcfs/kp30.h>
-#if defined(__linux__)
-#include <linux/lvfs.h>
-#elif defined(__APPLE__)
-#include <darwin/lvfs.h>
-#elif defined(__WINNT__)
-#include <winnt/lvfs.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#include <lustre_ucache.h>
-
-
-#ifdef LIBLUSTRE
-#include <lvfs_user_fs.h>
-#endif
-
-/* lvfs_common.c */
-struct dentry *lvfs_fid2dentry(struct lvfs_run_ctxt *, __u64, __u32, __u64 ,void *data);
-
-void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
-               struct lvfs_ucred *cred);
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
-              struct lvfs_ucred *cred);
-
-
-static inline int ll_fid2str(char *str, __u64 id, __u32 generation)
-{
-        return sprintf(str, "%llx:%08x", (unsigned long long)id, generation);
-}
-
-#endif
diff --git a/lustre/include/obd.h b/lustre/include/obd.h
deleted file mode 100644
index 5b55e25db9f30bd86c8027acbdb83fcb31cb5d41..0000000000000000000000000000000000000000
--- a/lustre/include/obd.h
+++ /dev/null
@@ -1,1158 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __OBD_H
-#define __OBD_H
-
-#if defined(__linux__)
-#include <linux/obd.h>
-#elif defined(__APPLE__)
-#include <darwin/obd.h>
-#elif defined(__WINNT__)
-#include <winnt/obd.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#define IOC_OSC_TYPE         'h'
-#define IOC_OSC_MIN_NR       20
-#define IOC_OSC_SET_ACTIVE   _IOWR(IOC_OSC_TYPE, 21, struct obd_device *)
-#define IOC_OSC_MAX_NR       50
-
-#define IOC_MDC_TYPE         'i'
-#define IOC_MDC_MIN_NR       20
-/* Moved to lustre_user.h
-#define IOC_MDC_LOOKUP       _IOWR(IOC_MDC_TYPE, 20, struct obd_ioctl_data *)
-#define IOC_MDC_GETSTRIPE    _IOWR(IOC_MDC_TYPE, 21, struct lov_mds_md *) */
-#define IOC_MDC_MAX_NR       50
-
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_export.h>
-#include <lustre_quota.h>
-#include <class_hash.h>
-
-#include <libcfs/bitmap.h>
-
-
-#define MAX_OBD_DEVICES 8192
-
-/* this is really local to the OSC */
-struct loi_oap_pages {
-        struct list_head        lop_pending;
-        struct list_head        lop_urgent;
-        struct list_head        lop_pending_group;
-        int                     lop_num_pending;
-};
-
-struct osc_async_rc {
-        int     ar_rc;
-        int     ar_force_sync;
-        __u64   ar_min_xid;
-};
-
-struct lov_oinfo {                 /* per-stripe data structure */
-        __u64 loi_id;              /* object ID on the target OST */
-        __u64 loi_gr;              /* object group on the target OST */
-        int loi_ost_idx;           /* OST stripe index in lov_tgt_desc->tgts */
-        int loi_ost_gen;           /* generation of this loi_ost_idx */
-
-        /* used by the osc to keep track of what objects to build into rpcs */
-        struct loi_oap_pages loi_read_lop;
-        struct loi_oap_pages loi_write_lop;
-        /* _cli_ is poorly named, it should be _ready_ */
-        struct list_head loi_cli_item;
-        struct list_head loi_write_item;
-        struct list_head loi_read_item;
-
-        unsigned long loi_kms_valid:1;
-        __u64 loi_kms;             /* known minimum size */
-        struct ost_lvb loi_lvb;
-        struct osc_async_rc     loi_ar;
-};
-
-static inline void loi_init(struct lov_oinfo *loi)
-{
-        CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_pending);
-        CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_urgent);
-        CFS_INIT_LIST_HEAD(&loi->loi_read_lop.lop_pending_group);
-        CFS_INIT_LIST_HEAD(&loi->loi_write_lop.lop_pending);
-        CFS_INIT_LIST_HEAD(&loi->loi_write_lop.lop_urgent);
-        CFS_INIT_LIST_HEAD(&loi->loi_write_lop.lop_pending_group);
-        CFS_INIT_LIST_HEAD(&loi->loi_cli_item);
-        CFS_INIT_LIST_HEAD(&loi->loi_write_item);
-        CFS_INIT_LIST_HEAD(&loi->loi_read_item);
-}
-
-/*extent array item for describing the joined file extent info*/
-struct lov_extent {
-        __u64 le_start;            /* extent start */
-        __u64 le_len;              /* extent length */
-        int   le_loi_idx;          /* extent #1 loi's index in lsm loi array */
-        int   le_stripe_count;     /* extent stripe count*/
-};
-
-/*Lov array info for describing joined file array EA info*/
-struct lov_array_info {
-        struct llog_logid    lai_array_id;    /* MDS med llog object id */
-        unsigned             lai_ext_count; /* number of extent count */
-        struct lov_extent    *lai_ext_array; /* extent desc array */
-};
-
-struct lov_stripe_md {
-        spinlock_t       lsm_lock;
-        void            *lsm_lock_owner; /* debugging */
-
-        struct {
-                /* Public members. */
-                __u64 lw_object_id;        /* lov object id */
-                __u64 lw_object_gr;        /* lov object group */
-                __u64 lw_maxbytes;         /* maximum possible file size */
-
-                /* LOV-private members start here -- only for use in lov/. */
-                __u32 lw_magic;
-                __u32 lw_stripe_size;      /* size of the stripe */
-                __u32 lw_pattern;          /* striping pattern (RAID0, RAID1) */
-                unsigned lw_stripe_count;  /* number of objects being striped over */
-        } lsm_wire;
-
-        struct lov_array_info *lsm_array; /*Only for joined file array info*/
-        struct lov_oinfo *lsm_oinfo[0];
-};
-
-#define lsm_object_id    lsm_wire.lw_object_id
-#define lsm_object_gr    lsm_wire.lw_object_gr
-#define lsm_maxbytes     lsm_wire.lw_maxbytes
-#define lsm_magic        lsm_wire.lw_magic
-#define lsm_stripe_size  lsm_wire.lw_stripe_size
-#define lsm_pattern      lsm_wire.lw_pattern
-#define lsm_stripe_count lsm_wire.lw_stripe_count
-
-struct obd_info;
-
-typedef int (*obd_enqueue_update_f)(struct obd_info *oinfo, int rc);
-
-/* obd info for a particular level (lov, osc). */
-struct obd_info {
-        /* Lock policy. It keeps an extent which is specific for a particular
-         * OSC. (e.g. lov_prep_enqueue_set initialises extent of the policy,
-         * and osc_enqueue passes it into ldlm_lock_match & ldlm_cli_enqueue. */
-        ldlm_policy_data_t      oi_policy;
-        /* Flags used for set request specific flags:
-           - while lock handling, the flags obtained on the enqueue
-           request are set here.
-           - while stats, the flags used for control delay/resend.
-         */
-        int                     oi_flags;
-        /* Lock handle specific for every OSC lock. */
-        struct lustre_handle   *oi_lockh;
-        /* lsm data specific for every OSC. */
-        struct lov_stripe_md   *oi_md;
-        /* obdo data specific for every OSC, if needed at all. */
-        struct obdo            *oi_oa;
-        /* statfs data specific for every OSC, if needed at all. */
-        struct obd_statfs      *oi_osfs;
-        /* An update callback which is called to update some data on upper
-         * level. E.g. it is used for update lsm->lsm_oinfo at every recieved
-         * request in osc level for enqueue requests. It is also possible to
-         * update some caller data from LOV layer if needed. */
-        obd_enqueue_update_f     oi_cb_up;
-};
-
-/* compare all relevant fields. */
-static inline int lov_stripe_md_cmp(struct lov_stripe_md *m1,
-                                    struct lov_stripe_md *m2)
-{
-        /*
-         * ->lsm_wire contains padding, but it should be zeroed out during
-         * allocation.
-         */
-        return memcmp(&m1->lsm_wire, &m2->lsm_wire, sizeof m1->lsm_wire);
-}
-
-void lov_stripe_lock(struct lov_stripe_md *md);
-void lov_stripe_unlock(struct lov_stripe_md *md);
-
-struct obd_type {
-        struct list_head typ_chain;
-        struct obd_ops *typ_ops;
-        cfs_proc_dir_entry_t *typ_procroot;
-        char *typ_name;
-        int  typ_refcnt;
-        spinlock_t obd_type_lock;
-};
-
-struct brw_page {
-        obd_off  off;
-        cfs_page_t *pg;
-        int count;
-        obd_flag flag;
-};
-
-enum async_flags {
-        ASYNC_READY = 0x1, /* ap_make_ready will not be called before this
-                              page is added to an rpc */
-        ASYNC_URGENT = 0x2, /* page must be put into an RPC before return */
-        ASYNC_COUNT_STABLE = 0x4, /* ap_refresh_count will not be called
-                                     to give the caller a chance to update
-                                     or cancel the size of the io */
-        ASYNC_GROUP_SYNC = 0x8,  /* ap_completion will not be called, instead
-                                    the page is accounted for in the
-                                    obd_io_group given to
-                                    obd_queue_group_io */
-};
-
-struct obd_async_page_ops {
-        int  (*ap_make_ready)(void *data, int cmd);
-        int  (*ap_refresh_count)(void *data, int cmd);
-        void (*ap_fill_obdo)(void *data, int cmd, struct obdo *oa);
-        void (*ap_update_obdo)(void *data, int cmd, struct obdo *oa,
-                               obd_valid valid);
-        int  (*ap_completion)(void *data, int cmd, struct obdo *oa, int rc);
-};
-
-/* the `oig' is passed down from a caller of obd rw methods.  the callee
- * records enough state such that the caller can sleep on the oig and
- * be woken when all the callees have finished their work */
-struct obd_io_group {
-        spinlock_t      oig_lock;
-        atomic_t        oig_refcount;
-        int             oig_pending;
-        int             oig_rc;
-        struct list_head oig_occ_list;
-        cfs_waitq_t     oig_waitq;
-};
-
-/* the oig callback context lets the callee of obd rw methods register
- * for callbacks from the caller. */
-struct oig_callback_context {
-        struct list_head occ_oig_item;
-        /* called when the caller has received a signal while sleeping.
-         * callees of this method are encouraged to abort their state
-         * in the oig.  This may be called multiple times. */
-        void (*occ_interrupted)(struct oig_callback_context *occ);
-        unsigned long interrupted:1;
-};
-
-/* Individual type definitions */
-
-struct ost_server_data;
-
-/* hold common fields for "target" device */
-struct obd_device_target {
-        struct super_block       *obt_sb;
-        atomic_t                  obt_quotachecking;
-        struct lustre_quota_ctxt  obt_qctxt;
-};
-
-typedef void (*obd_pin_extent_cb)(void *data);
-typedef int (*obd_page_removal_cb_t)(void *data, int discard);
-typedef int (*obd_lock_cancel_cb)(struct ldlm_lock *,struct ldlm_lock_desc *,
-                                   void *, int);
-
-#define FILTER_GROUP_LLOG 1
-#define FILTER_GROUP_ECHO 2
-
-struct filter_ext {
-        __u64                fe_start;
-        __u64                fe_end;
-};
-
-struct filter_obd {
-        /* NB this field MUST be first */
-        struct obd_device_target fo_obt;
-        const char          *fo_fstype;
-        struct vfsmount     *fo_vfsmnt;
-        cfs_dentry_t        *fo_dentry_O;
-        cfs_dentry_t       **fo_dentry_O_groups;
-        cfs_dentry_t       **fo_dentry_O_sub;
-        spinlock_t           fo_objidlock;      /* protect fo_lastobjid */
-        spinlock_t           fo_translock;      /* protect fsd_last_transno */
-        struct file         *fo_rcvd_filp;
-        struct file         *fo_health_check_filp;
-        struct lr_server_data *fo_fsd;
-        unsigned long       *fo_last_rcvd_slots;
-        __u64                fo_mount_count;
-
-        int                  fo_destroy_in_progress;
-        struct semaphore     fo_create_lock;
-
-        struct list_head     fo_export_list;
-        int                  fo_subdir_count;
-
-        obd_size             fo_tot_dirty;      /* protected by obd_osfs_lock */
-        obd_size             fo_tot_granted;    /* all values in bytes */
-        obd_size             fo_tot_pending;
-
-        obd_size             fo_readcache_max_filesize;
-
-        struct obd_import   *fo_mdc_imp;
-        struct obd_uuid      fo_mdc_uuid;
-        struct lustre_handle fo_mdc_conn;
-        struct file        **fo_last_objid_files;
-        __u64               *fo_last_objids; /* last created objid for groups,
-                                              * protected by fo_objidlock */
-
-        struct semaphore     fo_alloc_lock;
-
-        atomic_t             fo_r_in_flight;
-        atomic_t             fo_w_in_flight;
-
-        /*
-         * per-filter pool of kiobuf's allocated by filter_common_setup() and
-         * torn down by filter_cleanup(). Contains OST_NUM_THREADS elements of
-         * which ->fo_iobuf_count were allocated.
-         *
-         * This pool contains kiobuf used by
-         * filter_{prep,commit}rw_{read,write}() and is shared by all OST
-         * threads.
-         *
-         * Locking: none, each OST thread uses only one element, determined by
-         * its "ordinal number", ->t_id.
-         */
-        struct filter_iobuf    **fo_iobuf_pool;
-        int                      fo_iobuf_count;
-
-        struct brw_stats         fo_filter_stats;
-        struct lustre_quota_ctxt fo_quota_ctxt;
-        spinlock_t               fo_quotacheck_lock;
-        atomic_t                 fo_quotachecking;
-
-        int                      fo_fmd_max_num; /* per exp filter_mod_data */
-        int                      fo_fmd_max_age; /* jiffies to fmd expiry */
-        void                     *fo_lcm;
-};
-
-#define OSC_MAX_RIF_DEFAULT       8
-#define OSC_MAX_RIF_MAX         256
-#define OSC_MAX_DIRTY_DEFAULT  (OSC_MAX_RIF_DEFAULT * 4)
-#define OSC_MAX_DIRTY_MB_MAX   2048     /* arbitrary, but < MAX_LONG bytes */
-#define OSC_DEFAULT_RESENDS      10
-
-#define MDC_MAX_RIF_DEFAULT       8
-#define MDC_MAX_RIF_MAX         512
-
-struct mdc_rpc_lock;
-struct obd_import;
-struct lustre_cache;
-struct client_obd {
-        struct semaphore         cl_sem;
-        struct obd_uuid          cl_target_uuid;
-        struct obd_import       *cl_import; /* ptlrpc connection state */
-        int                      cl_conn_count;
-        /* max_mds_easize is purely a performance thing so we don't have to
-         * call obd_size_diskmd() all the time. */
-        int                      cl_default_mds_easize;
-        int                      cl_max_mds_easize;
-        int                      cl_max_mds_cookiesize;
-
-        //struct llog_canceld_ctxt *cl_llcd; /* it's included by obd_llog_ctxt */
-        void                    *cl_llcd_offset;
-
-        /* the grant values are protected by loi_list_lock below */
-        long                     cl_dirty;         /* all _dirty_ in bytes */
-        long                     cl_dirty_max;     /* allowed w/o rpc */
-        long                     cl_avail_grant;   /* bytes of credit for ost */
-        long                     cl_lost_grant;    /* lost credits (trunc) */
-        struct list_head         cl_cache_waiters; /* waiting for cache/grant */
-
-        /* keep track of objects that have lois that contain pages which
-         * have been queued for async brw.  this lock also protects the
-         * lists of osc_client_pages that hang off of the loi */
-        /*
-         * ->cl_loi_list_lock protects consistency of
-         * ->cl_loi_{ready,read,write}_list. ->ap_make_ready() and
-         * ->ap_completion() call-backs are executed under this lock. As we
-         * cannot guarantee that these call-backs never block on all platforms
-         * (as a matter of fact they do block on Mac OS X), type of
-         * ->cl_loi_list_lock is platform dependent: it's a spin-lock on Linux
-         * and blocking mutex on Mac OS X. (Alternative is to make this lock
-         * blocking everywhere, but we don't want to slow down fast-path of
-         * our main platform.)
-         *
-         * Exact type of ->cl_loi_list_lock is defined in arch/obd.h together
-         * with client_obd_list_{un,}lock() and
-         * client_obd_list_lock_{init,done}() functions.
-         */
-        client_obd_lock_t        cl_loi_list_lock;
-        struct list_head         cl_loi_ready_list;
-        struct list_head         cl_loi_write_list;
-        struct list_head         cl_loi_read_list;
-        int                      cl_r_in_flight;
-        int                      cl_w_in_flight;
-        /* just a sum of the loi/lop pending numbers to be exported by /proc */
-        int                      cl_pending_w_pages;
-        int                      cl_pending_r_pages;
-        int                      cl_max_pages_per_rpc;
-        int                      cl_max_rpcs_in_flight;
-        struct obd_histogram     cl_read_rpc_hist;
-        struct obd_histogram     cl_write_rpc_hist;
-        struct obd_histogram     cl_read_page_hist;
-        struct obd_histogram     cl_write_page_hist;
-        struct obd_histogram     cl_read_offset_hist;
-        struct obd_histogram     cl_write_offset_hist;
-
-        /* number of in flight destroy rpcs is limited to max_rpcs_in_flight */
-        atomic_t                 cl_destroy_in_flight;
-        cfs_waitq_t              cl_destroy_waitq;
-
-        struct mdc_rpc_lock     *cl_rpc_lock;
-        struct mdc_rpc_lock     *cl_setattr_lock;
-        struct mdc_rpc_lock     *cl_close_lock;
-        struct osc_creator       cl_oscc;
-
-        /* mgc datastruct */
-        struct semaphore         cl_mgc_sem;
-        struct vfsmount         *cl_mgc_vfsmnt;
-        struct dentry           *cl_mgc_configs_dir;
-        atomic_t                 cl_mgc_refcount;
-        struct obd_export       *cl_mgc_mgsexp;
-
-        /* checksumming for data sent over the network */
-        unsigned int             cl_checksum:1; /* 0 = disabled, 1 = enabled */
-        /* supported checksum types that are worked out at connect time */
-        __u32                    cl_supp_cksum_types;
-        /* checksum algorithm to be used */
-        cksum_type_t             cl_cksum_type;
- 
-        /* also protected by the poorly named _loi_list_lock lock above */
-        struct osc_async_rc      cl_ar;
-
-        /* used by quotacheck */
-        int                      cl_qchk_stat; /* quotacheck stat of the peer */
-        atomic_t                 cl_resends; /* resend count */
-        /* Cache of triples */
-        struct lustre_cache     *cl_cache;
-        obd_lock_cancel_cb       cl_ext_lock_cancel_cb;
-};
-#define obd2cli_tgt(obd) ((char *)(obd)->u.cli.cl_target_uuid.uuid)
-
-#define CL_NOT_QUOTACHECKED 1   /* client->cl_qchk_stat init value */
-
-struct mgs_obd {
-        struct ptlrpc_service           *mgs_service;
-        struct vfsmount                 *mgs_vfsmnt;
-        struct super_block              *mgs_sb;
-        struct dentry                   *mgs_configs_dir;
-        struct dentry                   *mgs_fid_de;
-        struct list_head                 mgs_fs_db_list;
-        struct semaphore                 mgs_sem;
-        cfs_proc_dir_entry_t            *mgs_proc_live;
-};
-
-struct mds_obd {
-        /* NB this field MUST be first */
-        struct obd_device_target         mds_obt;
-        struct ptlrpc_service           *mds_service;
-        struct ptlrpc_service           *mds_setattr_service;
-        struct ptlrpc_service           *mds_readpage_service;
-        struct vfsmount                 *mds_vfsmnt;
-        cfs_dentry_t                    *mds_fid_de;
-        int                              mds_max_mdsize;
-        int                              mds_max_cookiesize;
-        struct file                     *mds_rcvd_filp;
-        spinlock_t                       mds_transno_lock;
-        __u64                            mds_last_transno;
-        __u64                            mds_mount_count;
-        __u64                            mds_io_epoch;
-        unsigned long                    mds_atime_diff;
-        struct semaphore                 mds_epoch_sem;
-        struct ll_fid                    mds_rootfid;
-        struct lr_server_data           *mds_server_data;
-        cfs_dentry_t                    *mds_pending_dir;
-        cfs_dentry_t                    *mds_logs_dir;
-        cfs_dentry_t                    *mds_objects_dir;
-        struct llog_handle              *mds_cfg_llh;
-//        struct llog_handle              *mds_catalog;
-        struct obd_device               *mds_osc_obd; /* XXX lov_obd */
-        struct obd_uuid                  mds_lov_uuid;
-        char                            *mds_profile;
-        struct obd_export               *mds_osc_exp; /* XXX lov_exp */
-        struct lov_desc                  mds_lov_desc;
-	
-        /* mark pages dirty for write. */
-        bitmap_t                         *mds_lov_page_dirty;
-        /* array for store pages with obd_id */
-        void                            **mds_lov_page_array;
-        /* file for store objid */
-        struct file                     *mds_lov_objid_filp;
-        __u32                            mds_lov_objid_count;
-        __u32                            mds_lov_objid_lastpage;
-        __u32                            mds_lov_objid_lastidx;
-
-        struct file                     *mds_health_check_filp;
-        unsigned long                   *mds_client_bitmap;
-        struct upcall_cache             *mds_group_hash;
-
-        struct lustre_quota_info         mds_quota_info;
-        struct semaphore                 mds_qonoff_sem;
-        struct semaphore                 mds_health_sem;
-        unsigned long                    mds_fl_user_xattr:1,
-                                         mds_fl_acl:1,
-                                         mds_fl_cfglog:1,
-                                         mds_fl_synced:1,
-                                         mds_evict_ost_nids:1;
-
-        uid_t                            mds_squash_uid;
-        gid_t                            mds_squash_gid;
-        lnet_nid_t                       mds_nosquash_nid;
-};
-
-/* lov objid */
-#define mds_max_ost_index  (0xFFFF)
-#define MDS_LOV_ALLOC_SIZE (CFS_PAGE_SIZE)
-
-#define OBJID_PER_PAGE() (MDS_LOV_ALLOC_SIZE / sizeof(obd_id))
-
-#define MDS_LOV_OBJID_PAGES_COUNT (mds_max_ost_index/OBJID_PER_PAGE())
-
-extern int mds_lov_init_objids(struct obd_device *obd);
-extern void mds_lov_destroy_objids(struct obd_device *obd);
-
-struct obd_id_info {
-        __u32   idx;
-        obd_id  *data;
-};
-
-/* */
-
-struct echo_obd {
-        struct obdo          eo_oa;
-        spinlock_t           eo_lock;
-        __u64                eo_lastino;
-        struct lustre_handle eo_nl_lock;
-        atomic_t             eo_prep;
-};
-
-struct ost_obd {
-        struct ptlrpc_service *ost_service;
-        struct ptlrpc_service *ost_create_service;
-        struct ptlrpc_service *ost_io_service;
-        struct semaphore       ost_health_sem;
-};
-
-struct echo_client_obd {
-        struct obd_export   *ec_exp;   /* the local connection to osc/lov */
-        spinlock_t           ec_lock;
-        struct list_head     ec_objects;
-        int                  ec_nstripes;
-        __u64                ec_unique;
-};
-
-struct lov_qos_oss {
-        struct obd_uuid     lqo_uuid;       /* ptlrpc's c_remote_uuid */
-        struct list_head    lqo_oss_list;   /* link to lov_qos */
-        __u32               lqo_ost_count;  /* number of osts on this oss */
-        __u64               lqo_bavail;     /* total bytes avail on OSS */
-        __u64               lqo_penalty;    /* current penalty */
-        __u64               lqo_penalty_per_obj; /* penalty decrease every obj*/
-};
-
-struct ltd_qos {
-        struct lov_qos_oss *ltq_oss;         /* oss info */
-        __u64               ltq_penalty;     /* current penalty */
-        __u64               ltq_penalty_per_obj; /* penalty decrease every obj*/
-        __u64               ltq_weight;      /* net weighting */
-        unsigned int        ltq_usable:1;    /* usable for striping */
-};
-
-struct lov_qos {
-        struct list_head    lq_oss_list;    /* list of OSSs that targets use */
-        struct rw_semaphore lq_rw_sem;
-        __u32               lq_active_oss_count;
-        __u32              *lq_rr_array;    /* round-robin optimized list */
-        unsigned int        lq_rr_size;     /* rr array size */
-        unsigned int        lq_prio_free;   /* priority for free space */
-        unsigned long       lq_dirty:1,     /* recalc qos data */
-                            lq_dirty_rr:1,  /* recalc round-robin list */
-                            lq_same_space:1,/* the ost's all have approx.
-                                               the same space avail */
-                            lq_reset:1;     /* zero current penalties */
-};
-
-struct lov_tgt_desc {
-        struct obd_uuid     ltd_uuid;
-        struct obd_export  *ltd_exp;
-        struct ltd_qos      ltd_qos;     /* qos info per target */
-        __u32               ltd_gen;
-        __u32               ltd_index;   /* index in lov_obd->tgts */
-        unsigned long       ltd_active:1,/* is this target up for requests */
-                            ltd_activate:1,/* should this target be activated */
-                            ltd_reap:1;  /* should this target be deleted */
-};
-
-struct lov_obd {
-        struct lov_desc         desc;
-        struct lov_tgt_desc   **lov_tgts;
-        struct semaphore        lov_lock;
-        struct obd_connect_data lov_ocd;
-        struct lov_qos          lov_qos;               /* qos info per lov */
-        atomic_t                lov_refcount;
-        __u32                   lov_tgt_count;         /* how many OBD's */
-        __u32                   lov_active_tgt_count;  /* how many active */
-        __u32                   lov_death_row;/* tgts scheduled to be deleted */
-        __u32                   lov_tgt_size;   /* size of tgts array */
-        __u32                   lov_start_idx;  /* start index of new inode */
-        __u32                   lov_offset_idx; /* aliasing for start_idx  */
-        int                     lov_start_count;/* reseed counter */
-        int                     lov_connects;
-        obd_page_removal_cb_t   lov_page_removal_cb;
-        obd_pin_extent_cb       lov_page_pin_cb;
-        obd_lock_cancel_cb      lov_lock_cancel_cb;
-};
-
-struct niobuf_local {
-        __u64 offset;
-        __u32 len;
-        __u32 flags;
-        cfs_page_t    *page;
-        cfs_dentry_t  *dentry;
-        int lnb_grant_used;
-        int rc;
-};
-
-/* obd device type names */
- /* FIXME all the references to LUSTRE_MDS_NAME should be swapped with LUSTRE_MDT_NAME */
-#define LUSTRE_MDS_NAME         "mds"
-#define LUSTRE_MDT_NAME         "mdt"
-#define LUSTRE_MDC_NAME         "mdc"
-#define LUSTRE_OSS_NAME         "ost" /*FIXME change name to oss*/
-#define LUSTRE_OST_NAME         "obdfilter" /* FIXME change name to ost*/
-#define LUSTRE_OSC_NAME         "osc"
-#define LUSTRE_LOV_NAME         "lov"
-#define LUSTRE_MGS_NAME         "mgs"
-#define LUSTRE_MGC_NAME         "mgc"
-
-#define LUSTRE_CACHEOBD_NAME    "cobd"
-#define LUSTRE_ECHO_NAME        "obdecho"
-#define LUSTRE_ECHO_CLIENT_NAME "echo_client"
-
-/* Constant obd names (post-rename) */
-#define LUSTRE_MDS_OBDNAME "MDS"
-#define LUSTRE_OSS_OBDNAME "OSS"
-#define LUSTRE_MGS_OBDNAME "MGS"
-#define LUSTRE_MGC_OBDNAME "MGC"
-
-/* Don't conflict with on-wire flags OBD_BRW_WRITE, etc */
-#define N_LOCAL_TEMP_PAGE 0x10000000
-
-struct obd_trans_info {
-        __u64                    oti_transno;
-        __u64                    oti_xid;
-        /* Only used on the server side for tracking acks. */
-        struct oti_req_ack_lock {
-                struct lustre_handle lock;
-                __u32                mode;
-        }                        oti_ack_locks[4];
-        void                    *oti_handle;
-        struct llog_cookie       oti_onecookie;
-        struct llog_cookie      *oti_logcookies;
-        int                      oti_numcookies;
-
-        /* initial thread handling transaction */
-        int                      oti_thread_id;
-        __u32                    oti_conn_cnt;
-};
-
-static inline void oti_init(struct obd_trans_info *oti,
-                            struct ptlrpc_request *req)
-{
-        if (oti == NULL)
-                return;
-        memset(oti, 0, sizeof(*oti));
-
-        if (req == NULL)
-                return;
-
-        oti->oti_xid = req->rq_xid;
-
-        if (req->rq_repmsg != NULL)
-                oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg);
-        oti->oti_thread_id = req->rq_svc_thread ? req->rq_svc_thread->t_id : -1;
-        if (req->rq_reqmsg != NULL)
-                oti->oti_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg);
-}
-
-static inline void oti_alloc_cookies(struct obd_trans_info *oti,int num_cookies)
-{
-        if (!oti)
-                return;
-
-        if (num_cookies == 1)
-                oti->oti_logcookies = &oti->oti_onecookie;
-        else
-                OBD_ALLOC(oti->oti_logcookies,
-                          num_cookies * sizeof(oti->oti_onecookie));
-
-        oti->oti_numcookies = num_cookies;
-}
-
-static inline void oti_free_cookies(struct obd_trans_info *oti)
-{
-        if (!oti || !oti->oti_logcookies)
-                return;
-
-        if (oti->oti_logcookies == &oti->oti_onecookie)
-                LASSERT(oti->oti_numcookies == 1);
-        else
-                OBD_FREE(oti->oti_logcookies,
-                         oti->oti_numcookies * sizeof(oti->oti_onecookie));
-        oti->oti_logcookies = NULL;
-        oti->oti_numcookies = 0;
-}
-
-/* llog contexts */
-enum llog_ctxt_id {
-        LLOG_CONFIG_ORIG_CTXT  =  0,
-        LLOG_CONFIG_REPL_CTXT  =  1,
-        LLOG_MDS_OST_ORIG_CTXT =  2,
-        LLOG_MDS_OST_REPL_CTXT =  3,
-        LLOG_SIZE_ORIG_CTXT    =  4,
-        LLOG_SIZE_REPL_CTXT    =  5,
-        LLOG_MD_ORIG_CTXT      =  6,
-        LLOG_MD_REPL_CTXT      =  7,
-        LLOG_RD1_ORIG_CTXT     =  8,
-        LLOG_RD1_REPL_CTXT     =  9,
-        LLOG_TEST_ORIG_CTXT    = 10,
-        LLOG_TEST_REPL_CTXT    = 11,
-        LLOG_LOVEA_ORIG_CTXT   = 12,
-        LLOG_LOVEA_REPL_CTXT   = 13,
-        LLOG_MAX_CTXTS
-};
-
-/*
- * Events signalled through obd_notify() upcall-chain.
- */
-enum obd_notify_event {
-        /* Device activated */
-        OBD_NOTIFY_ACTIVE,
-        /* Device deactivated */
-        OBD_NOTIFY_INACTIVE,
-        /* Connect data for import were changed */
-        OBD_NOTIFY_OCD,
-        /* Sync request */
-        OBD_NOTIFY_SYNC_NONBLOCK,
-        OBD_NOTIFY_SYNC,
-        /* Configuration event */
-        OBD_NOTIFY_CONFIG
-};
-
-#define CONFIG_LOG  0x1  /* finished processing config log */
-#define CONFIG_SYNC 0x2  /* mdt synced 1 ost */
-
-/*
- * Data structure used to pass obd_notify()-event to non-obd listeners (llite
- * and liblustre being main examples).
- */
-struct obd_notify_upcall {
-        int (*onu_upcall)(struct obd_device *host, struct obd_device *watched,
-                          enum obd_notify_event ev, void *owner);
-        /* Opaque datum supplied by upper layer listener */
-        void *onu_owner;
-};
-
-/* corresponds to one of the obd's */
-#define MAX_OBD_NAME 128
-#define OBD_DEVICE_MAGIC        0XAB5CD6EF
-struct obd_device {
-        struct obd_type        *obd_type;
-        __u32                   obd_magic;
-
-        /* common and UUID name of this device */
-        char                    obd_name[MAX_OBD_NAME];
-        struct obd_uuid         obd_uuid;
-
-        int                     obd_minor;
-        unsigned long obd_attached:1,      /* finished attach */
-                      obd_set_up:1,        /* finished setup */
-                      obd_recovering:1,    /* there are recoverable clients */
-                      obd_abort_recovery:1,/* somebody ioctl'ed us to abort */ 
-                      obd_replayable:1,    /* recovery is enabled; inform clients */
-                      obd_no_transno:1,    /* no committed-transno notification */
-                      obd_no_recov:1,      /* fail instead of retry messages */
-                      obd_stopping:1,      /* started cleanup */
-                      obd_starting:1,      /* started setup */
-                      obd_force:1,         /* cleanup with > 0 obd refcount */
-                      obd_fail:1,          /* cleanup with failover */
-                      obd_async_recov:1,   /* allow asyncronous orphan cleanup */
-                      obd_no_conn:1,       /* deny new connections */
-                      obd_inactive:1;      /* device active/inactive
-                                           * (for /proc/status only!!) */
-        /* uuid-export hash body */
-        struct lustre_class_hash_body *obd_uuid_hash_body;
-        /* nid-export hash body */
-        struct lustre_class_hash_body *obd_nid_hash_body;
-        /* nid stats body */
-        struct lustre_class_hash_body *obd_nid_stats_hash_body;
-        struct list_head        obd_nid_stats;
-        atomic_t                obd_refcount;
-        cfs_waitq_t             obd_refcount_waitq;
-        cfs_waitq_t             obd_llog_waitq;
-        struct list_head        obd_exports;
-        int                     obd_num_exports;
-        spinlock_t              nid_lock;
-        struct ldlm_namespace  *obd_namespace;
-        struct ptlrpc_client    obd_ldlm_client; /* XXX OST/MDS only */
-        /* a spinlock is OK for what we do now, may need a semaphore later */
-        spinlock_t              obd_dev_lock;
-        struct semaphore        obd_dev_sem;
-        __u64                   obd_last_committed;
-        struct fsfilt_operations *obd_fsops;
-        spinlock_t              obd_osfs_lock;
-        struct obd_statfs       obd_osfs;       /* locked by obd_osfs_lock */
-        __u64                   obd_osfs_age;   
-        struct lvfs_run_ctxt    obd_lvfs_ctxt;
-        struct llog_ctxt        *obd_llog_ctxt[LLOG_MAX_CTXTS];
-        struct obd_device       *obd_observer;
-        struct obd_notify_upcall obd_upcall;
-        struct obd_export       *obd_self_export;
-        /* list of exports in LRU order, for ping evictor, with obd_dev_lock */
-        struct list_head        obd_exports_timed;
-        time_t                  obd_eviction_timer; /* for ping evictor */
-
-        /* XXX encapsulate all this recovery data into one struct */
-        svc_handler_t                    obd_recovery_handler;
-        int                              obd_max_recoverable_clients;
-        int                              obd_connected_clients;
-        int                              obd_recoverable_clients;
-        spinlock_t                       obd_processing_task_lock; /* BH lock (timer) */
-        pid_t                            obd_processing_task;
-        __u64                            obd_next_recovery_transno;
-        int                              obd_replayed_requests;
-        int                              obd_requests_queued_for_recovery;
-        cfs_waitq_t                      obd_next_transno_waitq;
-        struct list_head                 obd_uncommitted_replies;
-        spinlock_t                       obd_uncommitted_replies_lock;
-        cfs_timer_t                      obd_recovery_timer;
-        struct list_head                 obd_recovery_queue;
-        struct list_head                 obd_delayed_reply_queue;
-        time_t                           obd_recovery_start; /* seconds */
-        time_t                           obd_recovery_end; /* seconds, for lprocfs_status */
-#ifdef CRAY_XT3
-        time_t                           obd_recovery_max_time; /* seconds, bz13079 */
-#endif
-        int                              obd_recovery_timeout;
-
-        union {
-                struct obd_device_target obt;
-                struct filter_obd filter;
-                struct mds_obd mds;
-                struct client_obd cli;
-                struct ost_obd ost;
-                struct echo_client_obd echo_client;
-                struct echo_obd echo;
-                struct lov_obd lov;
-                struct mgs_obd mgs;
-        } u;
-        /* Fields used by LProcFS */
-        cfs_proc_dir_entry_t  *obd_proc_entry;
-        cfs_proc_dir_entry_t  *obd_proc_exports_entry;
-        cfs_proc_dir_entry_t  *obd_svc_procroot;
-        struct lprocfs_stats  *obd_stats;
-        struct lprocfs_stats  *obd_svc_stats;
-        unsigned int           obd_cntr_base;
-        atomic_t               obd_evict_inprogress;
-        cfs_waitq_t            obd_evict_inprogress_waitq;
-};
-
-#define OBD_OPT_FORCE           0x0001
-#define OBD_OPT_FAILOVER        0x0002
-
-#define OBD_LLOG_FL_SENDNOW     0x0001
-
-enum obd_cleanup_stage {
-/* Special case hack for MDS LOVs */
-        OBD_CLEANUP_EARLY,
-/* Precleanup stage 1, we must make sure all exports (other than the
-   self-export) get destroyed. */
-        OBD_CLEANUP_EXPORTS,
-/* Precleanup stage 2,  do other type-specific cleanup requiring the
-   self-export. */
-        OBD_CLEANUP_SELF_EXP,
-/* FIXME we should eliminate the "precleanup" function and make them stages
-   of the "cleanup" function. */
-        OBD_CLEANUP_OBD,
-};
-
-/* get/set_info keys */
-#define KEY_MDS_CONN "mds_conn"
-#define KEY_NEXT_ID  "next_id"
-#define KEY_LOVDESC  "lovdesc"
-#define KEY_INIT_RECOV "initial_recov"
-#define KEY_INIT_RECOV_BACKUP "init_recov_bk"
-#define KEY_LOV_IDX             "lov_idx"
-#define KEY_LAST_ID             "last_id"
-
-struct obd_ops {
-        struct module *o_owner;
-        int (*o_iocontrol)(unsigned int cmd, struct obd_export *exp, int len,
-                           void *karg, void *uarg);
-        int (*o_get_info)(struct obd_export *, __u32 keylen, void *key,
-                          __u32 *vallen, void *val);
-        int (*o_set_info_async)(struct obd_export *, __u32 keylen, void *key,
-                                __u32 vallen, void *val,
-                                struct ptlrpc_request_set *set);
-        int (*o_attach)(struct obd_device *dev, obd_count len, void *data);
-        int (*o_detach)(struct obd_device *dev);
-        int (*o_setup) (struct obd_device *dev, obd_count len, void *data);
-        int (*o_precleanup)(struct obd_device *dev,
-                            enum obd_cleanup_stage cleanup_stage);
-        int (*o_cleanup)(struct obd_device *dev);
-        int (*o_process_config)(struct obd_device *dev, obd_count len,
-                                void *data);
-        int (*o_postrecov)(struct obd_device *dev);
-        int (*o_add_conn)(struct obd_import *imp, struct obd_uuid *uuid,
-                          int priority);
-        int (*o_del_conn)(struct obd_import *imp, struct obd_uuid *uuid);
-        /* connect to the target device with given connection
-         * data. @ocd->ocd_connect_flags is modified to reflect flags actually
-         * granted by the target, which are guaranteed to be a subset of flags
-         * asked for. If @ocd == NULL, use default parameters. */
-        int (*o_connect)(struct lustre_handle *conn, struct obd_device *src,
-                         struct obd_uuid *cluuid, struct obd_connect_data *ocd,
-                         void *localdata);
-        int (*o_reconnect)(struct obd_export *exp, struct obd_device *src,
-                           struct obd_uuid *cluuid,
-                           struct obd_connect_data *ocd);
-        int (*o_disconnect)(struct obd_export *exp);
-
-        int (*o_statfs)(struct obd_device *obd, struct obd_statfs *osfs,
-                        __u64 max_age, __u32 flags);
-        int (*o_statfs_async)(struct obd_device *obd, struct obd_info *oinfo,
-                              __u64 max_age, struct ptlrpc_request_set *set);
-        int (*o_packmd)(struct obd_export *exp, struct lov_mds_md **disk_tgt,
-                        struct lov_stripe_md *mem_src);
-        int (*o_unpackmd)(struct obd_export *exp,struct lov_stripe_md **mem_tgt,
-                          struct lov_mds_md *disk_src, int disk_len);
-        int (*o_checkmd)(struct obd_export *exp, struct obd_export *md_exp,
-                         struct lov_stripe_md *mem_tgt);
-        int (*o_preallocate)(struct lustre_handle *, obd_count *req,
-                             obd_id *ids);
-        int (*o_precreate)(struct obd_export *exp);
-        int (*o_create)(struct obd_export *exp,  struct obdo *oa,
-                        struct lov_stripe_md **ea, struct obd_trans_info *oti);
-        int (*o_destroy)(struct obd_export *exp, struct obdo *oa,
-                         struct lov_stripe_md *ea, struct obd_trans_info *oti,
-                         struct obd_export *md_exp);
-        int (*o_setattr)(struct obd_export *exp, struct obd_info *oinfo,
-                         struct obd_trans_info *oti);
-        int (*o_setattr_async)(struct obd_export *exp, struct obd_info *oinfo,
-                               struct obd_trans_info *oti,
-                               struct ptlrpc_request_set *rqset);
-        int (*o_getattr)(struct obd_export *exp, struct obd_info *oinfo);
-        int (*o_getattr_async)(struct obd_export *exp, struct obd_info *oinfo,
-                               struct ptlrpc_request_set *set);
-        int (*o_brw)(int rw, struct obd_export *exp, struct obd_info *oinfo,
-                     obd_count oa_bufs, struct brw_page *pgarr,
-                     struct obd_trans_info *oti);
-        int (*o_brw_async)(int rw, struct obd_export *exp,
-                           struct obd_info *oinfo, obd_count oa_bufs,
-                           struct brw_page *pgarr, struct obd_trans_info *oti,
-                           struct ptlrpc_request_set *);
-        int (*o_prep_async_page)(struct obd_export *exp,
-                                 struct lov_stripe_md *lsm,
-                                 struct lov_oinfo *loi,
-                                 cfs_page_t *page, obd_off offset, 
-                                 struct obd_async_page_ops *ops, void *data,
-                                 void **res, int nocache,
-                                 struct lustre_handle *lockh);
-        int (*o_queue_async_io)(struct obd_export *exp,
-                                struct lov_stripe_md *lsm,
-                                struct lov_oinfo *loi, void *cookie,
-                                int cmd, obd_off off, int count,
-                                obd_flag brw_flags, obd_flag async_flags);
-        int (*o_queue_group_io)(struct obd_export *exp,
-                                struct lov_stripe_md *lsm,
-                                struct lov_oinfo *loi,
-                                struct obd_io_group *oig,
-                                void *cookie, int cmd, obd_off off, int count,
-                                obd_flag brw_flags, obd_flag async_flags);
-        int (*o_trigger_group_io)(struct obd_export *exp,
-                                  struct lov_stripe_md *lsm,
-                                  struct lov_oinfo *loi,
-                                  struct obd_io_group *oig);
-        int (*o_set_async_flags)(struct obd_export *exp,
-                                struct lov_stripe_md *lsm,
-                                struct lov_oinfo *loi, void *cookie,
-                                obd_flag async_flags);
-        int (*o_teardown_async_page)(struct obd_export *exp,
-                                     struct lov_stripe_md *lsm,
-                                     struct lov_oinfo *loi, void *cookie);
-        int (*o_merge_lvb)(struct obd_export *exp, struct lov_stripe_md *lsm,
-                           struct ost_lvb *lvb, int kms_only);
-        int (*o_adjust_kms)(struct obd_export *exp, struct lov_stripe_md *lsm,
-                            obd_off size, int shrink);
-        int (*o_punch)(struct obd_export *exp, struct obd_info *oinfo,
-                       struct obd_trans_info *oti,
-                       struct ptlrpc_request_set *rqset);
-        int (*o_sync)(struct obd_export *exp, struct obdo *oa,
-                      struct lov_stripe_md *ea, obd_size start, obd_size end);
-        int (*o_migrate)(struct lustre_handle *conn, struct lov_stripe_md *dst,
-                         struct lov_stripe_md *src, obd_size start,
-                         obd_size end, struct obd_trans_info *oti);
-        int (*o_copy)(struct lustre_handle *dstconn, struct lov_stripe_md *dst,
-                      struct lustre_handle *srconn, struct lov_stripe_md *src,
-                      obd_size start, obd_size end, struct obd_trans_info *);
-        int (*o_iterate)(struct lustre_handle *conn,
-                         int (*)(obd_id, obd_gr, void *),
-                         obd_id *startid, obd_gr group, void *data);
-        int (*o_preprw)(int cmd, struct obd_export *exp, struct obdo *oa,
-                        int objcount, struct obd_ioobj *obj,
-                        int niocount, struct niobuf_remote *remote,
-                        struct niobuf_local *local, struct obd_trans_info *oti);
-        int (*o_commitrw)(int cmd, struct obd_export *exp, struct obdo *oa,
-                          int objcount, struct obd_ioobj *obj,
-                          int niocount, struct niobuf_local *local,
-                          struct obd_trans_info *oti, int rc);
-        int (*o_enqueue)(struct obd_export *, struct obd_info *oinfo,
-                         struct ldlm_enqueue_info *einfo,
-                         struct ptlrpc_request_set *rqset);
-        int (*o_match)(struct obd_export *, struct lov_stripe_md *, __u32 type,
-                       ldlm_policy_data_t *, __u32 mode, int *flags, void *data,
-                       struct lustre_handle *lockh);
-        int (*o_change_cbdata)(struct obd_export *, struct lov_stripe_md *,
-                               ldlm_iterator_t it, void *data);
-        int (*o_cancel)(struct obd_export *, struct lov_stripe_md *md,
-                        __u32 mode, struct lustre_handle *);
-        int (*o_cancel_unused)(struct obd_export *, struct lov_stripe_md *,
-                               int flags, void *opaque);
-        int (*o_join_lru)(struct obd_export *, struct lov_stripe_md *,
-                         int join);
-        int (*o_init_export)(struct obd_export *exp);
-        int (*o_destroy_export)(struct obd_export *exp);
-        int (*o_extent_calc)(struct obd_export *, struct lov_stripe_md *,
-                             int cmd, obd_off *);
-
-        /* llog related obd_methods */
-        int (*o_llog_init)(struct obd_device *obd, struct obd_device *disk_obd,
-                           int count, struct llog_catid *logid, 
-                           struct obd_uuid *uuid);
-        int (*o_llog_finish)(struct obd_device *obd, int count);
-
-        /* metadata-only methods */
-        int (*o_pin)(struct obd_export *, obd_id ino, __u32 gen, int type,
-                     struct obd_client_handle *, int flag);
-        int (*o_unpin)(struct obd_export *, struct obd_client_handle *, int);
-
-        int (*o_import_event)(struct obd_device *, struct obd_import *,
-                              enum obd_import_event);
-
-        int (*o_notify)(struct obd_device *obd, struct obd_device *watched,
-                        enum obd_notify_event ev, void *data);
-
-        int (*o_health_check)(struct obd_device *);
-
-        /* quota methods */
-        int (*o_quotacheck)(struct obd_export *, struct obd_quotactl *);
-        int (*o_quotactl)(struct obd_export *, struct obd_quotactl *);
-        int (*o_quota_adjust_qunit)(struct obd_export *exp,
-                                    struct quota_adjust_qunit *oqaq);
-
-
-        int (*o_ping)(struct obd_export *exp);
-
-        int (*o_register_page_removal_cb)(struct obd_export *exp,
-                                          obd_page_removal_cb_t cb,
-                                          obd_pin_extent_cb pin_cb);
-        int (*o_unregister_page_removal_cb)(struct obd_export *exp,
-                                            obd_page_removal_cb_t cb);
-        int (*o_register_lock_cancel_cb)(struct obd_export *exp,
-                                       obd_lock_cancel_cb cb);
-        int (*o_unregister_lock_cancel_cb)(struct obd_export *exp,
-                                         obd_lock_cancel_cb cb);
-        
-        /*
-         * NOTE: If adding ops, add another LPROCFS_OBD_OP_INIT() line
-         * to lprocfs_alloc_obd_stats() in obdclass/lprocfs_status.c.
-         * Also, add a wrapper function in include/linux/obd_class.h. */
-};
-
-struct lsm_operations {
-        void (*lsm_free)(struct lov_stripe_md *);
-        int (*lsm_destroy)(struct lov_stripe_md *, struct obdo *oa,
-                           struct obd_export *md_exp);
-        void (*lsm_stripe_by_index)(struct lov_stripe_md *, int *, obd_off *,
-                                     unsigned long *);
-        void (*lsm_stripe_by_offset)(struct lov_stripe_md *, int *, obd_off *,
-                                     unsigned long *);
-        obd_off (*lsm_stripe_offset_by_index)(struct lov_stripe_md *, int);
-        obd_off (*lsm_stripe_offset_by_offset)(struct lov_stripe_md *, obd_off);
-        int (*lsm_stripe_index_by_offset)(struct lov_stripe_md *, obd_off);
-        int (*lsm_revalidate) (struct lov_stripe_md *, struct obd_device *obd);
-        int (*lsm_lmm_verify) (struct lov_mds_md *lmm, int lmm_bytes,
-                               int *stripe_count);
-        int (*lsm_unpackmd) (struct lov_obd *lov, struct lov_stripe_md *lsm,
-                             struct lov_mds_md *lmm);
-};
-
-extern struct lsm_operations lsm_plain_ops;
-extern struct lsm_operations lsm_join_ops;
-static inline struct lsm_operations *lsm_op_find(int magic)
-{
-        switch(magic) {
-        case LOV_MAGIC:
-               return &lsm_plain_ops;
-        case LOV_MAGIC_JOIN:
-               return &lsm_join_ops;
-        default:
-               CERROR("Cannot recognize lsm_magic %d", magic);
-               return NULL;
-        }
-}
-
-int lvfs_check_io_health(struct obd_device *obd, struct file *file);
-
-/* Requests for obd_extent_calc() */
-#define OBD_CALC_STRIPE_START   1
-#define OBD_CALC_STRIPE_END     2
-
-static inline void obd_transno_commit_cb(struct obd_device *obd, __u64 transno,
-                                         int error)
-{
-        if (error) {
-                CERROR("%s: transno "LPD64" commit error: %d\n",
-                       obd->obd_name, transno, error);
-                return;
-        }
-        CDEBUG(D_HA, "%s: transno "LPD64" committed\n",
-               obd->obd_name, transno);
-        if (transno > obd->obd_last_committed) {
-                obd->obd_last_committed = transno;
-                ptlrpc_commit_replies (obd);
-        }
-}
-
-static inline void init_obd_quota_ops(quota_interface_t *interface,
-                                      struct obd_ops *obd_ops)
-{
-        if (!interface)
-                return;
-
-        LASSERT(obd_ops);
-        obd_ops->o_quotacheck = QUOTA_OP(interface, check);
-        obd_ops->o_quotactl = QUOTA_OP(interface, ctl);
-        obd_ops->o_quota_adjust_qunit = QUOTA_OP(interface, adjust_qunit);
-}
-
-/*
- * Checksums
- */
-
-#ifdef HAVE_ADLER
-/* Default preferred checksum algorithm to use (if supported by the server) */
-#define OSC_DEFAULT_CKSUM OBD_CKSUM_ADLER
-/* Adler-32 is supported */
-#define CHECKSUM_ADLER OBD_CKSUM_ADLER
-#else
-#define OSC_DEFAULT_CKSUM OBD_CKSUM_CRC32
-#define CHECKSUM_ADLER 0
-#endif
-
-#define OBD_CKSUM_ALL (OBD_CKSUM_CRC32 | CHECKSUM_ADLER)
-
-/* Checksum algorithm names. Must be defined in the same order as the
- * OBD_CKSUM_* flags. */
-#define DECLARE_CKSUM_NAME char *cksum_name[] = {"crc32", "adler"}
-
-#endif /* __OBD_H */
diff --git a/lustre/include/obd_cache.h b/lustre/include/obd_cache.h
deleted file mode 100644
index c5ec3261cab304d4feee1c2cd2f8537a2e3d05d9..0000000000000000000000000000000000000000
--- a/lustre/include/obd_cache.h
+++ /dev/null
@@ -1,11 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _OBD_CACHE_H__
-#define _OBD_CACHE_H__
-
-#ifdef __KERNEL__
-
-#endif
-#endif
diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h
deleted file mode 100644
index e2a99e71665a61ef8735d66fd4e0dad194c697e2..0000000000000000000000000000000000000000
--- a/lustre/include/obd_class.h
+++ /dev/null
@@ -1,1509 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef __CLASS_OBD_H
-#define __CLASS_OBD_H
-
-#include <obd_support.h>
-#include <lustre_import.h>
-#include <lustre_net.h>
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lprocfs_status.h>
-
-#if defined(__linux__)
-#include <linux/obd_class.h>
-#elif defined(__APPLE__)
-#include <darwin/obd_class.h>
-#elif defined(__WINNT__)
-#include <winnt/obd_class.h>
-#else
-#error Unsupported operating system.
-#endif
-
-/* OBD Device Declarations */
-extern struct obd_device *obd_devs[MAX_OBD_DEVICES];
-extern spinlock_t obd_dev_lock;
-
-/* OBD Operations Declarations */
-extern struct obd_device *class_conn2obd(struct lustre_handle *);
-extern struct obd_device *class_exp2obd(struct obd_export *);
-
-/* genops.c */
-struct obd_export *class_conn2export(struct lustre_handle *);
-int class_register_type(struct obd_ops *ops, struct lprocfs_vars *,
-                        const char *nm);
-int class_unregister_type(const char *nm);
-
-struct obd_device *class_newdev(const char *type_name, const char *name);
-void class_release_dev(struct obd_device *obd);
-
-int class_name2dev(const char *name);
-struct obd_device *class_name2obd(const char *name);
-int class_uuid2dev(struct obd_uuid *uuid);
-struct obd_device *class_uuid2obd(struct obd_uuid *uuid);
-void class_obd_list(void);
-struct obd_device * class_find_client_obd(struct obd_uuid *tgt_uuid,
-                                          const char * typ_name,
-                                          struct obd_uuid *grp_uuid);
-struct obd_device * class_find_client_notype(struct obd_uuid *tgt_uuid,
-                                             struct obd_uuid *grp_uuid);
-struct obd_device * class_devices_in_group(struct obd_uuid *grp_uuid,
-                                           int *next);
-struct obd_device * class_num2obd(int num);
-
-int oig_init(struct obd_io_group **oig);
-int oig_add_one(struct obd_io_group *oig, struct oig_callback_context *occ);
-void oig_complete_one(struct obd_io_group *oig,
-                      struct oig_callback_context *occ, int rc);
-void oig_release(struct obd_io_group *oig);
-int oig_wait(struct obd_io_group *oig);
-
-char *obd_export_nid2str(struct obd_export *exp);
-
-int obd_export_evict_by_nid(struct obd_device *obd, char *nid);
-int obd_export_evict_by_uuid(struct obd_device *obd, char *uuid);
-
-/* obd_config.c */
-int class_process_config(struct lustre_cfg *lcfg);
-int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, 
-                             struct lustre_cfg *lcfg, void *data);
-int class_attach(struct lustre_cfg *lcfg);
-int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg);
-int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg);
-int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg);
-struct obd_device *class_incref(struct obd_device *obd);
-void class_decref(struct obd_device *obd);
-
-/*obdecho*/
-#ifdef LPROCFS
-extern void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-#define CFG_F_START     0x01   /* Set when we start updating from a log */
-#define CFG_F_MARKER    0x02   /* We are within a maker */
-#define CFG_F_SKIP      0x04   /* We should ignore this cfg command */
-#define CFG_F_COMPAT146 0x08   /* Allow old-style logs */
-#define CFG_F_EXCLUDE   0x10   /* OST exclusion list */
-
-/* Passed as data param to class_config_parse_llog */
-struct config_llog_instance {
-        char *              cfg_instance;
-        struct super_block *cfg_sb;
-        struct obd_uuid     cfg_uuid;
-        int                 cfg_last_idx; /* for partial llog processing */
-        int                 cfg_flags; 
-};
-int class_config_parse_llog(struct llog_ctxt *ctxt, char *name,
-                            struct config_llog_instance *cfg);
-int class_config_dump_llog(struct llog_ctxt *ctxt, char *name,
-                           struct config_llog_instance *cfg);
-
-/* list of active configuration logs  */
-struct config_llog_data {
-        char               *cld_logname;
-        struct ldlm_res_id  cld_resid;
-        struct config_llog_instance cld_cfg;
-        struct list_head    cld_list_chain;
-        atomic_t            cld_refcount;
-        struct obd_export  *cld_mgcexp;
-        unsigned int        cld_stopping:1; /* we were told to stop watching */
-        unsigned int        cld_lostlock:1; /* lock not requeued */
-};
-
-struct lustre_profile {
-        struct list_head lp_list;
-        char * lp_profile;
-        char * lp_osc;
-        char * lp_mdc;
-};
-
-struct lustre_profile *class_get_profile(char * prof);
-void class_del_profile(char *prof);
-void class_del_profiles(void);
-
-#define class_export_rpc_get(exp)                                       \
-({                                                                      \
-        atomic_inc(&(exp)->exp_rpc_count);                              \
-        CDEBUG(D_INFO, "RPC GETting export %p : new rpc_count %d\n",    \
-               (exp), atomic_read(&(exp)->exp_rpc_count));              \
-        class_export_get(exp);                                          \
-})
-
-#define class_export_rpc_put(exp)                                       \
-({                                                                      \
-        atomic_dec(&(exp)->exp_rpc_count);                              \
-        CDEBUG(D_INFO, "RPC PUTting export %p : new rpc_count %d\n",    \
-               (exp), atomic_read(&(exp)->exp_rpc_count));              \
-        class_export_put(exp);                                          \
-})
-
-/* genops.c */
-#define class_export_get(exp)                                                  \
-({                                                                             \
-        struct obd_export *exp_ = exp;                                         \
-        atomic_inc(&exp_->exp_refcount);                                       \
-        CDEBUG(D_INFO, "GETting export %p : new refcount %d\n", exp_,          \
-               atomic_read(&exp_->exp_refcount));                              \
-        exp_;                                                                  \
-})
-
-#define class_export_put(exp)                                                  \
-do {                                                                           \
-        LASSERT((exp) != NULL);                                                \
-        CDEBUG(D_INFO, "PUTting export %p : new refcount %d\n", (exp),         \
-               atomic_read(&(exp)->exp_refcount) - 1);                         \
-        LASSERT(atomic_read(&(exp)->exp_refcount) > 0);                        \
-        LASSERT(atomic_read(&(exp)->exp_refcount) < 0x5a5a5a);                 \
-        __class_export_put(exp);                                               \
-} while (0)
-
-void __class_export_put(struct obd_export *);
-struct obd_export *class_new_export(struct obd_device *obddev,
-                                    struct obd_uuid *cluuid);
-void class_unlink_export(struct obd_export *exp);
-
-struct obd_import *class_import_get(struct obd_import *);
-void class_import_put(struct obd_import *);
-struct obd_import *class_new_import(struct obd_device *obd);
-void class_destroy_import(struct obd_import *exp);
-
-struct obd_type *class_search_type(const char *name);
-struct obd_type *class_get_type(const char *name);
-void class_put_type(struct obd_type *type);
-int class_connect(struct lustre_handle *conn, struct obd_device *obd,
-                  struct obd_uuid *cluuid);
-int class_disconnect(struct obd_export *exp);
-void class_fail_export(struct obd_export *exp);
-void class_disconnect_exports(struct obd_device *obddev);
-void class_disconnect_stale_exports(struct obd_device *obddev);
-int class_manual_cleanup(struct obd_device *obd);
-
-/* obdo.c */
-void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid);
-void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj);
-
-
-#define OBT(dev)        (dev)->obd_type
-#define OBP(dev, op)    (dev)->obd_type->typ_ops->o_ ## op
-#define CTXTP(ctxt, op) (ctxt)->loc_logops->lop_##op
-
-/* Ensure obd_setup: used for cleanup which must be called
-   while obd is stopping */
-#define OBD_CHECK_DEV(obd)                                      \
-do {                                                            \
-        if (!(obd)) {                                           \
-                CERROR("NULL device\n");                        \
-                RETURN(-ENODEV);                                \
-        }                                                       \
-} while (0)
-
-/* ensure obd_setup and !obd_stopping */
-#define OBD_CHECK_DEV_ACTIVE(obd)                               \
-do {                                                            \
-        OBD_CHECK_DEV(obd);                                     \
-        if (!(obd)->obd_set_up || (obd)->obd_stopping) {        \
-                CERROR("Device %d not setup\n",                 \
-                       (obd)->obd_minor);                       \
-                RETURN(-ENODEV);                                \
-        }                                                       \
-} while (0)
-
-
-#ifdef LPROCFS
-#define OBD_COUNTER_OFFSET(op)                                  \
-        ((offsetof(struct obd_ops, o_ ## op) -                  \
-          offsetof(struct obd_ops, o_iocontrol))                \
-         / sizeof(((struct obd_ops *)(0))->o_iocontrol))
-
-#define OBD_COUNTER_INCREMENT(obdx, op)                           \
-        if ((obdx)->obd_stats != NULL) {                          \
-                unsigned int coffset;                             \
-                coffset = (unsigned int)((obdx)->obd_cntr_base) + \
-                        OBD_COUNTER_OFFSET(op);                   \
-                LASSERT(coffset < (obdx)->obd_stats->ls_num);     \
-                lprocfs_counter_incr((obdx)->obd_stats, coffset); \
-        }
-
-#define EXP_COUNTER_INCREMENT(export, op)                                    \
-        if ((export)->exp_obd->obd_stats != NULL) {                          \
-                unsigned int coffset;                                        \
-                coffset = (unsigned int)((export)->exp_obd->obd_cntr_base) + \
-                        OBD_COUNTER_OFFSET(op);                              \
-                LASSERT(coffset < (export)->exp_obd->obd_stats->ls_num);     \
-                lprocfs_counter_incr((export)->exp_obd->obd_stats, coffset); \
-                if ((export)->exp_nid_stats != NULL &&                       \
-                    (export)->exp_nid_stats->nid_stats != NULL)              \
-                        lprocfs_counter_incr(                                \
-                                (export)->exp_nid_stats->nid_stats, coffset);\
-        }
-
-#else
-#define OBD_COUNTER_OFFSET(op)
-#define OBD_COUNTER_INCREMENT(obd, op)
-#define EXP_COUNTER_INCREMENT(exp, op);
-#endif
-
-#define OBD_CHECK_OP(obd, op, err)                              \
-do {                                                            \
-        if (!OBT(obd) || !OBP((obd), op)) {\
-                if (err)                                        \
-                        CERROR("obd_" #op ": dev %d no operation\n",    \
-                               obd->obd_minor);                         \
-                RETURN(err);                                    \
-        }                                                       \
-} while (0)
-
-#define EXP_CHECK_OP(exp, op)                                   \
-do {                                                            \
-        if ((exp) == NULL) {                                    \
-                CERROR("obd_" #op ": NULL export\n");           \
-                RETURN(-ENODEV);                                \
-        }                                                       \
-        if ((exp)->exp_obd == NULL || !OBT((exp)->exp_obd)) {   \
-                CERROR("obd_" #op ": cleaned up obd\n");        \
-                RETURN(-EOPNOTSUPP);                            \
-        }                                                       \
-        if (!OBT((exp)->exp_obd) || !OBP((exp)->exp_obd, op)) { \
-                CERROR("obd_" #op ": dev %d no operation\n",    \
-                       (exp)->exp_obd->obd_minor);              \
-                RETURN(-EOPNOTSUPP);                            \
-        }                                                       \
-} while (0)
-
-#define CTXT_CHECK_OP(ctxt, op, err)                                         \
-do {                                                            \
-        if (!OBT(ctxt->loc_obd) || !CTXTP((ctxt), op)) {                     \
-                if (err)                                        \
-                        CERROR("lop_" #op ": dev %d no operation\n",    \
-                               ctxt->loc_obd->obd_minor);                         \
-                RETURN(err);                                    \
-        }                                                       \
-} while (0)
-
-static inline int class_devno_max(void)
-{
-        return MAX_OBD_DEVICES;
-}
-
-static inline int obd_get_info(struct obd_export *exp, __u32 keylen,
-                               void *key, __u32 *vallen, void *val)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, get_info);
-        EXP_COUNTER_INCREMENT(exp, get_info);
-
-        rc = OBP(exp->exp_obd, get_info)(exp, keylen, key, vallen, val);
-        RETURN(rc);
-}
-
-static inline int obd_set_info_async(struct obd_export *exp, obd_count keylen,
-                                     void *key, obd_count vallen, void *val,
-                                     struct ptlrpc_request_set *set)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, set_info_async);
-        EXP_COUNTER_INCREMENT(exp, set_info_async);
-
-        rc = OBP(exp->exp_obd, set_info_async)(exp, keylen, key, vallen, val, 
-                                               set);
-        RETURN(rc);
-}
-
-static inline int obd_setup(struct obd_device *obd, int datalen, void *data)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(obd, setup, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, setup);
-
-        rc = OBP(obd, setup)(obd, datalen, data);
-        RETURN(rc);
-}
-
-static inline int obd_precleanup(struct obd_device *obd, 
-                                 enum obd_cleanup_stage cleanup_stage)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(obd, precleanup, 0);
-        OBD_COUNTER_INCREMENT(obd, precleanup);
-
-        rc = OBP(obd, precleanup)(obd, cleanup_stage);
-        RETURN(rc);
-}
-
-static inline int obd_cleanup(struct obd_device *obd)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_DEV(obd);
-        OBD_CHECK_OP(obd, cleanup, 0);
-        OBD_COUNTER_INCREMENT(obd, cleanup);
-
-        rc = OBP(obd, cleanup)(obd);
-        RETURN(rc);
-}
-
-static inline int
-obd_process_config(struct obd_device *obd, int datalen, void *data)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(obd, process_config, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, process_config);
-
-        rc = OBP(obd, process_config)(obd, datalen, data);
-        RETURN(rc);
-}
-
-/* Pack an in-memory MD struct for storage on disk.
- * Returns +ve size of packed MD (0 for free), or -ve error.
- *
- * If @disk_tgt == NULL, MD size is returned (max size if @mem_src == NULL).
- * If @*disk_tgt != NULL and @mem_src == NULL, @*disk_tgt will be freed.
- * If @*disk_tgt == NULL, it will be allocated
- */
-static inline int obd_packmd(struct obd_export *exp,
-                             struct lov_mds_md **disk_tgt,
-                             struct lov_stripe_md *mem_src)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, packmd);
-        EXP_COUNTER_INCREMENT(exp, packmd);
-
-        rc = OBP(exp->exp_obd, packmd)(exp, disk_tgt, mem_src);
-        RETURN(rc);
-}
-
-static inline int obd_size_diskmd(struct obd_export *exp,
-                                  struct lov_stripe_md *mem_src)
-{
-        return obd_packmd(exp, NULL, mem_src);
-}
-
-/* helper functions */
-static inline int obd_alloc_diskmd(struct obd_export *exp,
-                                   struct lov_mds_md **disk_tgt)
-{
-        LASSERT(disk_tgt);
-        LASSERT(*disk_tgt == NULL);
-        return obd_packmd(exp, disk_tgt, NULL);
-}
-
-static inline int obd_free_diskmd(struct obd_export *exp,
-                                  struct lov_mds_md **disk_tgt)
-{
-        LASSERT(disk_tgt);
-        LASSERT(*disk_tgt);
-        return obd_packmd(exp, disk_tgt, NULL);
-}
-
-/* Unpack an MD struct from disk to in-memory format.
- * Returns +ve size of unpacked MD (0 for free), or -ve error.
- *
- * If @mem_tgt == NULL, MD size is returned (max size if @disk_src == NULL).
- * If @*mem_tgt != NULL and @disk_src == NULL, @*mem_tgt will be freed.
- * If @*mem_tgt == NULL, it will be allocated
- */
-static inline int obd_unpackmd(struct obd_export *exp,
-                               struct lov_stripe_md **mem_tgt,
-                               struct lov_mds_md *disk_src,
-                               int disk_len)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, unpackmd);
-        EXP_COUNTER_INCREMENT(exp, unpackmd);
-
-        rc = OBP(exp->exp_obd, unpackmd)(exp, mem_tgt, disk_src, disk_len);
-        RETURN(rc);
-}
-
-/* helper functions */
-static inline int obd_alloc_memmd(struct obd_export *exp,
-                                  struct lov_stripe_md **mem_tgt)
-{
-        LASSERT(mem_tgt);
-        LASSERT(*mem_tgt == NULL);
-        return obd_unpackmd(exp, mem_tgt, NULL, 0);
-}
-
-static inline int obd_free_memmd(struct obd_export *exp,
-                                 struct lov_stripe_md **mem_tgt)
-{
-        LASSERT(mem_tgt);
-        LASSERT(*mem_tgt);
-        return obd_unpackmd(exp, mem_tgt, NULL, 0);
-}
-
-static inline int obd_checkmd(struct obd_export *exp,
-                              struct obd_export *md_exp,
-                              struct lov_stripe_md *mem_tgt)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, checkmd);
-        EXP_COUNTER_INCREMENT(exp, checkmd);
-
-        rc = OBP(exp->exp_obd, checkmd)(exp, md_exp, mem_tgt);
-        RETURN(rc);
-}
-
-static inline int obd_precreate(struct obd_export *exp)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, precreate);
-        OBD_COUNTER_INCREMENT(exp->exp_obd, precreate);
-
-        rc = OBP(exp->exp_obd, precreate)(exp);
-        RETURN(rc);
-}
-
-static inline int obd_create(struct obd_export *exp, struct obdo *obdo,
-                             struct lov_stripe_md **ea,
-                             struct obd_trans_info *oti)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, create);
-        EXP_COUNTER_INCREMENT(exp, create);
-
-        rc = OBP(exp->exp_obd, create)(exp, obdo, ea, oti);
-        RETURN(rc);
-}
-
-static inline int obd_destroy(struct obd_export *exp, struct obdo *obdo,
-                              struct lov_stripe_md *ea,
-                              struct obd_trans_info *oti,
-                              struct obd_export *md_exp)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, destroy);
-        EXP_COUNTER_INCREMENT(exp, destroy);
-
-        rc = OBP(exp->exp_obd, destroy)(exp, obdo, ea, oti, md_exp);
-        RETURN(rc);
-}
-
-static inline int obd_getattr(struct obd_export *exp, struct obd_info *oinfo)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, getattr);
-        EXP_COUNTER_INCREMENT(exp, getattr);
-
-        rc = OBP(exp->exp_obd, getattr)(exp, oinfo);
-        RETURN(rc);
-}
-
-static inline int obd_getattr_async(struct obd_export *exp,
-                                    struct obd_info *oinfo,
-                                    struct ptlrpc_request_set *set)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, getattr_async);
-        EXP_COUNTER_INCREMENT(exp, getattr_async);
-
-        rc = OBP(exp->exp_obd, getattr_async)(exp, oinfo, set);
-        RETURN(rc);
-}
-
-static inline int obd_setattr(struct obd_export *exp, struct obd_info *oinfo,
-                              struct obd_trans_info *oti)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, setattr);
-        EXP_COUNTER_INCREMENT(exp, setattr);
-
-        rc = OBP(exp->exp_obd, setattr)(exp, oinfo, oti);
-        RETURN(rc);
-}
-
-/* This performs all the requests set init/wait/destroy actions. */
-static inline int obd_setattr_rqset(struct obd_export *exp,
-                                    struct obd_info *oinfo,
-                                    struct obd_trans_info *oti)
-{
-        struct ptlrpc_request_set *set = NULL;
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, setattr_async);
-        EXP_COUNTER_INCREMENT(exp, setattr_async);
-
-        set =  ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        rc = OBP(exp->exp_obd, setattr_async)(exp, oinfo, oti, set);
-        if (rc == 0)
-                rc = ptlrpc_set_wait(set);
-        ptlrpc_set_destroy(set);
-        RETURN(rc);
-}
-
-/* This adds all the requests into @set if @set != NULL, otherwise
-   all requests are sent asynchronously without waiting for response. */
-static inline int obd_setattr_async(struct obd_export *exp,
-                                    struct obd_info *oinfo,
-                                    struct obd_trans_info *oti,
-                                    struct ptlrpc_request_set *set)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, setattr_async);
-        EXP_COUNTER_INCREMENT(exp, setattr_async);
-
-        rc = OBP(exp->exp_obd, setattr_async)(exp, oinfo, oti, set);
-        RETURN(rc);
-}
-
-static inline int obd_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
-                               int priority)
-{
-        struct obd_device *obd = imp->imp_obd;
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_DEV_ACTIVE(obd);
-        OBD_CHECK_OP(obd, add_conn, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, add_conn);
-
-        rc = OBP(obd, add_conn)(imp, uuid, priority);
-        RETURN(rc);
-}
-
-static inline int obd_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
-{
-        struct obd_device *obd = imp->imp_obd;
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_DEV_ACTIVE(obd);
-        OBD_CHECK_OP(obd, del_conn, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, del_conn);
-
-        rc = OBP(obd, del_conn)(imp, uuid);
-        RETURN(rc);
-}
-
-static inline int obd_connect(struct lustre_handle *conn,struct obd_device *obd,
-                              struct obd_uuid *cluuid,
-                              struct obd_connect_data *d,
-                              void *localdata)
-{
-        int rc;
-        __u64 ocf = d ? d->ocd_connect_flags : 0; /* for post-condition check */
-        ENTRY;
-
-        OBD_CHECK_DEV_ACTIVE(obd);
-        OBD_CHECK_OP(obd, connect, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, connect);
-
-        rc = OBP(obd, connect)(conn, obd, cluuid, d, localdata);
-        /* check that only subset is granted */
-        LASSERT(ergo(d != NULL,
-                     (d->ocd_connect_flags & ocf) == d->ocd_connect_flags));
-        RETURN(rc);
-}
-
-static inline int obd_reconnect(struct obd_export *exp,
-                                struct obd_device *obd,
-                                struct obd_uuid *cluuid,
-                                struct obd_connect_data *d)
-{
-        int rc;
-        __u64 ocf = d ? d->ocd_connect_flags : 0; /* for post-condition check */
-        ENTRY;
-
-        OBD_CHECK_DEV_ACTIVE(obd);
-        OBD_CHECK_OP(obd, reconnect, 0);
-        OBD_COUNTER_INCREMENT(obd, reconnect);
-
-        rc = OBP(obd, reconnect)(exp, obd, cluuid, d);
-        /* check that only subset is granted */
-        LASSERT(ergo(d != NULL,
-                     (d->ocd_connect_flags & ocf) == d->ocd_connect_flags));
-        RETURN(rc);
-}
-
-static inline int obd_disconnect(struct obd_export *exp)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, disconnect);
-        EXP_COUNTER_INCREMENT(exp, disconnect);
-
-        rc = OBP(exp->exp_obd, disconnect)(exp);
-        RETURN(rc);
-}
-
-static inline int obd_ping(struct obd_export *exp)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, ping, 0);
-        EXP_COUNTER_INCREMENT(exp, ping);
-
-        rc = OBP(exp->exp_obd, ping)(exp);
-        RETURN(rc);
-}
-
-static inline int obd_init_export(struct obd_export *exp)
-{
-        int rc = 0;
-
-        ENTRY;
-        if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) &&
-            OBP((exp)->exp_obd, init_export))
-                rc = OBP(exp->exp_obd, init_export)(exp);
-        RETURN(rc);
-}
-
-static inline int obd_destroy_export(struct obd_export *exp)
-{
-        ENTRY;
-        if ((exp)->exp_obd != NULL && OBT((exp)->exp_obd) &&
-            OBP((exp)->exp_obd, destroy_export))
-                OBP(exp->exp_obd, destroy_export)(exp);
-        RETURN(0);
-}
-
-static inline int obd_extent_calc(struct obd_export *exp,
-                                  struct lov_stripe_md *md,
-                                  int cmd, obd_off *offset)
-{
-        int rc;
-        ENTRY;
-        EXP_CHECK_OP(exp, extent_calc);
-        rc = OBP(exp->exp_obd, extent_calc)(exp, md, cmd, offset);
-        RETURN(rc);
-}
-
-static inline struct dentry *
-obd_lvfs_fid2dentry(struct obd_export *exp, __u64 id_ino, __u32 gen, __u64 gr)
-{
-        LASSERT(exp->exp_obd);
-
-        return lvfs_fid2dentry(&exp->exp_obd->obd_lvfs_ctxt, id_ino, gen, gr,
-                               exp->exp_obd);
-}
-
-#ifndef time_before
-#define time_before(t1, t2) ((long)t2 - (long)t1 > 0)
-#endif
-
-/* @max_age is the oldest time in jiffies that we accept using a cached data.
- * If the cache is older than @max_age we will get a new value from the
- * target.  Use a value of "cfs_time_current() + HZ" to guarantee freshness. */
-static inline int obd_statfs_async(struct obd_device *obd,
-                                   struct obd_info *oinfo,
-                                   __u64 max_age,
-                                   struct ptlrpc_request_set *rqset)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (obd == NULL)
-                RETURN(-EINVAL);
-
-        OBD_CHECK_OP(obd, statfs, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, statfs);
-
-        CDEBUG(D_SUPER, "%s: osfs %p age "LPU64", max_age "LPU64"\n",
-               obd->obd_name, &obd->obd_osfs, obd->obd_osfs_age, max_age);
-        if (cfs_time_before_64(obd->obd_osfs_age, max_age)) {
-                rc = OBP(obd, statfs_async)(obd, oinfo, max_age, rqset);
-        } else {
-                CDEBUG(D_SUPER,"%s: use %p cache blocks "LPU64"/"LPU64
-                       " objects "LPU64"/"LPU64"\n",
-                       obd->obd_name, &obd->obd_osfs,
-                       obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks,
-                       obd->obd_osfs.os_ffree, obd->obd_osfs.os_files);
-                spin_lock(&obd->obd_osfs_lock);
-                memcpy(oinfo->oi_osfs, &obd->obd_osfs, sizeof(*oinfo->oi_osfs));
-                spin_unlock(&obd->obd_osfs_lock);
-                if (oinfo->oi_cb_up)
-                        oinfo->oi_cb_up(oinfo, 0);
-        }
-        RETURN(rc);
-}
-
-static inline int obd_statfs_rqset(struct obd_device *obd,
-                                   struct obd_statfs *osfs, __u64 max_age,
-                                   __u32 flags)
-{
-        struct ptlrpc_request_set *set = NULL;
-        struct obd_info oinfo = { { { 0 } } };
-        int rc = 0;
-        ENTRY;
-
-        set = ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        oinfo.oi_osfs = osfs;
-        oinfo.oi_flags = flags;
-        rc = obd_statfs_async(obd, &oinfo, max_age, set);
-        if (rc == 0)
-                rc = ptlrpc_set_wait(set);
-        ptlrpc_set_destroy(set);
-        RETURN(rc);
-}
-
-/* @max_age is the oldest time in jiffies that we accept using a cached data.
- * If the cache is older than @max_age we will get a new value from the
- * target.  Use a value of "cfs_time_current() + HZ" to guarantee freshness. */
-static inline int obd_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                             __u64 max_age, __u32 flags)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (obd == NULL)
-                RETURN(-EINVAL);
-
-        OBD_CHECK_OP(obd, statfs, -EOPNOTSUPP);
-        OBD_COUNTER_INCREMENT(obd, statfs);
-
-        CDEBUG(D_SUPER, "osfs "LPU64", max_age "LPU64"\n",
-               obd->obd_osfs_age, max_age);
-        if (cfs_time_before_64(obd->obd_osfs_age, max_age)) {
-                rc = OBP(obd, statfs)(obd, osfs, max_age, flags);
-                if (rc == 0) {
-                        spin_lock(&obd->obd_osfs_lock);
-                        memcpy(&obd->obd_osfs, osfs, sizeof(obd->obd_osfs));
-                        obd->obd_osfs_age = cfs_time_current_64();
-                        spin_unlock(&obd->obd_osfs_lock);
-                }
-        } else {
-                CDEBUG(D_SUPER,"%s: use %p cache blocks "LPU64"/"LPU64
-                       " objects "LPU64"/"LPU64"\n",
-                       obd->obd_name, &obd->obd_osfs,
-                       obd->obd_osfs.os_bavail, obd->obd_osfs.os_blocks,
-                       obd->obd_osfs.os_ffree, obd->obd_osfs.os_files);
-                spin_lock(&obd->obd_osfs_lock);
-                memcpy(osfs, &obd->obd_osfs, sizeof(*osfs));
-                spin_unlock(&obd->obd_osfs_lock);
-        }
-        RETURN(rc);
-}
-
-static inline int obd_sync(struct obd_export *exp, struct obdo *oa,
-                           struct lov_stripe_md *ea, obd_size start,
-                           obd_size end)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, sync, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, sync);
-
-        rc = OBP(exp->exp_obd, sync)(exp, oa, ea, start, end);
-        RETURN(rc);
-}
-
-static inline int obd_punch_rqset(struct obd_export *exp,
-                                  struct obd_info *oinfo,
-                                  struct obd_trans_info *oti)
-{
-        struct ptlrpc_request_set *set = NULL;
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, punch);
-        EXP_COUNTER_INCREMENT(exp, punch);
-
-        set =  ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        rc = OBP(exp->exp_obd, punch)(exp, oinfo, oti, set);
-        if (rc == 0)
-                rc = ptlrpc_set_wait(set);
-        ptlrpc_set_destroy(set);
-        RETURN(rc);
-}
-
-static inline int obd_punch(struct obd_export *exp, struct obd_info *oinfo,
-                            struct obd_trans_info *oti,
-                            struct ptlrpc_request_set *rqset)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, punch);
-        EXP_COUNTER_INCREMENT(exp, punch);
-
-        rc = OBP(exp->exp_obd, punch)(exp, oinfo, oti, rqset);
-        RETURN(rc);
-}
-
-static inline int obd_brw(int cmd, struct obd_export *exp,
-                          struct obd_info *oinfo, obd_count oa_bufs,
-                          struct brw_page *pg, struct obd_trans_info *oti)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, brw);
-        EXP_COUNTER_INCREMENT(exp, brw);
-
-        if (!(cmd & (OBD_BRW_RWMASK | OBD_BRW_CHECK))) {
-                CERROR("obd_brw: cmd must be OBD_BRW_READ, OBD_BRW_WRITE, "
-                       "or OBD_BRW_CHECK\n");
-                LBUG();
-        }
-
-        rc = OBP(exp->exp_obd, brw)(cmd, exp, oinfo, oa_bufs, pg, oti);
-        RETURN(rc);
-}
-
-static inline int obd_brw_async(int cmd, struct obd_export *exp,
-                                struct obd_info *oinfo, obd_count oa_bufs,
-                                struct brw_page *pg, struct obd_trans_info *oti,
-                                struct ptlrpc_request_set *set)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, brw_async);
-        EXP_COUNTER_INCREMENT(exp, brw_async);
-
-        if (!(cmd & OBD_BRW_RWMASK)) {
-                CERROR("obd_brw: cmd must be OBD_BRW_READ or OBD_BRW_WRITE\n");
-                LBUG();
-        }
-
-        rc = OBP(exp->exp_obd, brw_async)(cmd, exp, oinfo, oa_bufs, pg,oti,set);
-        RETURN(rc);
-}
-
-static inline int obd_brw_rqset(int cmd, struct obd_export *exp,
-                                struct obdo *oa, struct lov_stripe_md *lsm,
-                                obd_count oa_bufs, struct brw_page *pg,
-                                struct obd_trans_info *oti)
-{
-        struct ptlrpc_request_set *set = NULL;
-        struct obd_info oinfo = { { { 0 } } };
-        int rc = 0;
-        ENTRY;
-
-        set =  ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        oinfo.oi_oa = oa;
-        oinfo.oi_md = lsm;
-        rc = obd_brw_async(cmd, exp, &oinfo, oa_bufs, pg, oti, set);
-        if (rc == 0) {
-                rc = ptlrpc_set_wait(set);
-                if (rc)
-                        CERROR("error from callback: rc = %d\n", rc);
-        } else {
-                CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR,
-                       "error from obd_brw_async: rc = %d\n", rc);
-        }
-        ptlrpc_set_destroy(set);
-        RETURN(rc);
-}
-
-static inline  int obd_prep_async_page(struct obd_export *exp,
-                                       struct lov_stripe_md *lsm,
-                                       struct lov_oinfo *loi,
-                                       cfs_page_t *page, obd_off offset,
-                                       struct obd_async_page_ops *ops,
-                                       void *data, void **res, int nocache,
-                                       struct lustre_handle *lockh)
-{
-        int ret;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, prep_async_page, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, prep_async_page);
-
-        ret = OBP(exp->exp_obd, prep_async_page)(exp, lsm, loi, page, offset,
-                                                 ops, data, res, nocache,
-                                                 lockh);
-        RETURN(ret);
-}
-
-static inline int obd_queue_async_io(struct obd_export *exp,
-                                     struct lov_stripe_md *lsm,
-                                     struct lov_oinfo *loi, void *cookie,
-                                     int cmd, obd_off off, int count,
-                                     obd_flag brw_flags, obd_flag async_flags)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, queue_async_io, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, queue_async_io);
-        LASSERT(cmd & OBD_BRW_RWMASK);
-
-        rc = OBP(exp->exp_obd, queue_async_io)(exp, lsm, loi, cookie, cmd, off,
-                                               count, brw_flags, async_flags);
-        RETURN(rc);
-}
-
-static inline int obd_set_async_flags(struct obd_export *exp,
-                                      struct lov_stripe_md *lsm,
-                                      struct lov_oinfo *loi, void *cookie,
-                                      obd_flag async_flags)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, set_async_flags, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, set_async_flags);
-
-        rc = OBP(exp->exp_obd, set_async_flags)(exp, lsm, loi, cookie,
-                                                async_flags);
-        RETURN(rc);
-}
-
-static inline int obd_queue_group_io(struct obd_export *exp,
-                                     struct lov_stripe_md *lsm,
-                                     struct lov_oinfo *loi,
-                                     struct obd_io_group *oig,
-                                     void *cookie, int cmd, obd_off off,
-                                     int count, obd_flag brw_flags,
-                                     obd_flag async_flags)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, queue_group_io, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, queue_group_io);
-        LASSERT(cmd & OBD_BRW_RWMASK);
-
-        rc = OBP(exp->exp_obd, queue_group_io)(exp, lsm, loi, oig, cookie,
-                                               cmd, off, count, brw_flags,
-                                               async_flags);
-        RETURN(rc);
-}
-
-static inline int obd_trigger_group_io(struct obd_export *exp,
-                                       struct lov_stripe_md *lsm,
-                                       struct lov_oinfo *loi,
-                                       struct obd_io_group *oig)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, trigger_group_io, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, trigger_group_io);
-
-        rc = OBP(exp->exp_obd, trigger_group_io)(exp, lsm, loi, oig);
-        RETURN(rc);
-}
-
-static inline int obd_teardown_async_page(struct obd_export *exp,
-                                          struct lov_stripe_md *lsm,
-                                          struct lov_oinfo *loi, void *cookie)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, teardown_async_page, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, teardown_async_page);
-
-        rc = OBP(exp->exp_obd, teardown_async_page)(exp, lsm, loi, cookie);
-        RETURN(rc);
-}
-
-static inline int obd_preprw(int cmd, struct obd_export *exp, struct obdo *oa,
-                             int objcount, struct obd_ioobj *obj,
-                             int niocount, struct niobuf_remote *remote,
-                             struct niobuf_local *local,
-                             struct obd_trans_info *oti)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, preprw, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, preprw);
-
-        rc = OBP(exp->exp_obd, preprw)(cmd, exp, oa, objcount, obj, niocount,
-                                       remote, local, oti);
-        RETURN(rc);
-}
-
-static inline int obd_commitrw(int cmd, struct obd_export *exp, struct obdo *oa,
-                               int objcount, struct obd_ioobj *obj,
-                               int niocount, struct niobuf_local *local,
-                               struct obd_trans_info *oti, int rc)
-{
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, commitrw, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, commitrw);
-
-        rc = OBP(exp->exp_obd, commitrw)(cmd, exp, oa, objcount, obj, niocount,
-                                         local, oti, rc);
-        RETURN(rc);
-}
-
-static inline int obd_merge_lvb(struct obd_export *exp,
-                                struct lov_stripe_md *lsm,
-                                struct ost_lvb *lvb, int kms_only)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, merge_lvb, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, merge_lvb);
-
-        rc = OBP(exp->exp_obd, merge_lvb)(exp, lsm, lvb, kms_only);
-        RETURN(rc);
-}
-
-static inline int obd_adjust_kms(struct obd_export *exp,
-                                 struct lov_stripe_md *lsm, obd_off size,
-                                 int shrink)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, adjust_kms, -EOPNOTSUPP);
-        EXP_COUNTER_INCREMENT(exp, adjust_kms);
-
-        rc = OBP(exp->exp_obd, adjust_kms)(exp, lsm, size, shrink);
-        RETURN(rc);
-}
-
-static inline int obd_iocontrol(unsigned int cmd, struct obd_export *exp,
-                                int len, void *karg, void *uarg)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, iocontrol);
-        EXP_COUNTER_INCREMENT(exp, iocontrol);
-
-        rc = OBP(exp->exp_obd, iocontrol)(cmd, exp, len, karg, uarg);
-        RETURN(rc);
-}
-
-static inline int obd_enqueue_rqset(struct obd_export *exp,
-                                    struct obd_info *oinfo,
-                                    struct ldlm_enqueue_info *einfo)
-{
-        struct ptlrpc_request_set *set = NULL;
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, enqueue);
-        EXP_COUNTER_INCREMENT(exp, enqueue);
-
-        set =  ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        rc = OBP(exp->exp_obd, enqueue)(exp, oinfo, einfo, set);
-        if (rc == 0)
-                rc = ptlrpc_set_wait(set);
-        ptlrpc_set_destroy(set);
-        RETURN(rc);
-}
-
-static inline int obd_enqueue(struct obd_export *exp,
-                              struct obd_info *oinfo,
-                              struct ldlm_enqueue_info *einfo,
-                              struct ptlrpc_request_set *set)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, enqueue);
-        EXP_COUNTER_INCREMENT(exp, enqueue);
-
-        rc = OBP(exp->exp_obd, enqueue)(exp, oinfo, einfo, set);
-        RETURN(rc);
-}
-
-static inline int obd_match(struct obd_export *exp, struct lov_stripe_md *ea,
-                            __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                            int *flags, void *data, struct lustre_handle *lockh)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, match);
-        EXP_COUNTER_INCREMENT(exp, match);
-
-        rc = OBP(exp->exp_obd, match)(exp, ea, type, policy, mode, flags, data,
-                                      lockh);
-        RETURN(rc);
-}
-
-static inline int obd_change_cbdata(struct obd_export *exp,
-                                    struct lov_stripe_md *lsm,
-                                    ldlm_iterator_t it, void *data)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, change_cbdata);
-        EXP_COUNTER_INCREMENT(exp, change_cbdata);
-
-        rc = OBP(exp->exp_obd, change_cbdata)(exp, lsm, it, data);
-        RETURN(rc);
-}
-
-static inline int obd_cancel(struct obd_export *exp,
-                             struct lov_stripe_md *ea, __u32 mode,
-                             struct lustre_handle *lockh)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, cancel);
-        EXP_COUNTER_INCREMENT(exp, cancel);
-
-        rc = OBP(exp->exp_obd, cancel)(exp, ea, mode, lockh);
-        RETURN(rc);
-}
-
-static inline int obd_cancel_unused(struct obd_export *exp,
-                                    struct lov_stripe_md *ea, int flags,
-                                    void *opaque)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, cancel_unused);
-        EXP_COUNTER_INCREMENT(exp, cancel_unused);
-
-        rc = OBP(exp->exp_obd, cancel_unused)(exp, ea, flags, opaque);
-        RETURN(rc);
-}
-
-static inline int obd_join_lru(struct obd_export *exp,
-                               struct lov_stripe_md *ea, int join)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, join_lru);
-        EXP_COUNTER_INCREMENT(exp, join_lru);
-
-        rc = OBP(exp->exp_obd, join_lru)(exp, ea, join);
-        RETURN(rc);
-}
-
-static inline int obd_pin(struct obd_export *exp, obd_id ino, __u32 gen,
-                          int type, struct obd_client_handle *handle, int flag)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, pin);
-        EXP_COUNTER_INCREMENT(exp, pin);
-
-        rc = OBP(exp->exp_obd, pin)(exp, ino, gen, type, handle, flag);
-        RETURN(rc);
-}
-
-static inline int obd_unpin(struct obd_export *exp,
-                            struct obd_client_handle *handle, int flag)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, unpin);
-        EXP_COUNTER_INCREMENT(exp, unpin);
-
-        rc = OBP(exp->exp_obd, unpin)(exp, handle, flag);
-        RETURN(rc);
-}
-
-
-static inline void obd_import_event(struct obd_device *obd,
-                                    struct obd_import *imp,
-                                    enum obd_import_event event)
-{
-        ENTRY;
-        if (!obd) {
-                CERROR("NULL device\n");
-                EXIT;
-                return;
-        }
-        if (obd->obd_set_up && OBP(obd, import_event)) {
-                OBD_COUNTER_INCREMENT(obd, import_event);
-                OBP(obd, import_event)(obd, imp, event);
-        }
-        EXIT;
-}
-
-static inline int obd_notify(struct obd_device *obd,
-                             struct obd_device *watched,
-                             enum obd_notify_event ev, void *data)
-{
-        ENTRY;
-        OBD_CHECK_DEV(obd);
-
-        /* the check for async_recov is a complete hack - I'm hereby
-           overloading the meaning to also mean "this was called from
-           mds_postsetup".  I know that my mds is able to handle notifies
-           by this point, and it needs to get them to execute mds_postrecov. */                                                                                
-        if (!obd->obd_set_up && !obd->obd_async_recov) {
-                CDEBUG(D_HA, "obd %s not set up\n", obd->obd_name);
-                RETURN(-EINVAL);
-        }
-
-        if (!OBP(obd, notify)) 
-                RETURN(-ENOSYS);
-
-        OBD_COUNTER_INCREMENT(obd, notify);
-        RETURN(OBP(obd, notify)(obd, watched, ev, data));
-}
-
-static inline int obd_notify_observer(struct obd_device *observer,
-                                      struct obd_device *observed,
-                                      enum obd_notify_event ev, void *data)
-{
-        int rc1;
-        int rc2;
-
-        struct obd_notify_upcall *onu;
-
-        if (observer->obd_observer)
-                rc1 = obd_notify(observer->obd_observer, observed, ev, data);
-        else
-                rc1 = 0;
-        /*
-         * Also, call non-obd listener, if any
-         */
-        onu = &observer->obd_upcall;
-        if (onu->onu_upcall != NULL)
-                rc2 = onu->onu_upcall(observer, observed, ev, onu->onu_owner);
-        else
-                rc2 = 0;
-
-        return rc1 ?: rc2;
- }
-
-static inline int obd_quotacheck(struct obd_export *exp,
-                                 struct obd_quotactl *oqctl)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, quotacheck);
-        EXP_COUNTER_INCREMENT(exp, quotacheck);
-
-        rc = OBP(exp->exp_obd, quotacheck)(exp, oqctl);
-        RETURN(rc);
-}
-
-static inline int obd_quotactl(struct obd_export *exp,
-                               struct obd_quotactl *oqctl)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, quotactl);
-        EXP_COUNTER_INCREMENT(exp, quotactl);
-
-        rc = OBP(exp->exp_obd, quotactl)(exp, oqctl);
-        RETURN(rc);
-}
-
-static inline int obd_quota_adjust_qunit(struct obd_export *exp,
-                                         struct quota_adjust_qunit *oqaq)
-{
-        int rc;
-        ENTRY;
-
-        EXP_CHECK_OP(exp, quota_adjust_qunit);
-        EXP_COUNTER_INCREMENT(exp, quota_adjust_qunit);
-
-        rc = OBP(exp->exp_obd, quota_adjust_qunit)(exp, oqaq);
-        RETURN(rc);
-}
-
-static inline int obd_health_check(struct obd_device *obd)
-{
-        /* returns: 0 on healthy
-         *         >0 on unhealthy + reason code/flag
-         *            however the only suppored reason == 1 right now
-         *            We'll need to define some better reasons
-         *            or flags in the future.
-         *         <0 on error
-         */
-        int rc;
-        ENTRY;
-
-        /* don't use EXP_CHECK_OP, because NULL method is normal here */
-        if (obd == NULL || !OBT(obd)) {
-                CERROR("cleaned up obd\n");
-                RETURN(-EOPNOTSUPP);
-        }
-        if (!obd->obd_set_up || obd->obd_stopping)
-                RETURN(0);
-        if (!OBP(obd, health_check))
-                RETURN(0);
-
-        rc = OBP(obd, health_check)(obd);
-        RETURN(rc);
-}
-
-static inline int obd_register_observer(struct obd_device *obd,
-                                        struct obd_device *observer)
-{
-        ENTRY;
-        OBD_CHECK_DEV(obd);
-        if (obd->obd_observer && observer)
-                RETURN(-EALREADY);
-        obd->obd_observer = observer;
-        RETURN(0);
-}
-
-static inline int obd_register_page_removal_cb(struct obd_export *exp,
-                                               obd_page_removal_cb_t cb,
-                                               obd_pin_extent_cb pin_cb)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, register_page_removal_cb, 0);
-        OBD_COUNTER_INCREMENT(exp->exp_obd, register_page_removal_cb);
-
-        rc = OBP(exp->exp_obd, register_page_removal_cb)(exp, cb, pin_cb);
-        RETURN(rc);
-}
-
-static inline int obd_unregister_page_removal_cb(struct obd_export *exp,
-                                                 obd_page_removal_cb_t cb)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, unregister_page_removal_cb, 0);
-        OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_page_removal_cb);
-
-        rc = OBP(exp->exp_obd, unregister_page_removal_cb)(exp, cb);
-        RETURN(rc);
-}
-
-static inline int obd_register_lock_cancel_cb(struct obd_export *exp,
-                                              obd_lock_cancel_cb cb)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, register_lock_cancel_cb, 0);
-        OBD_COUNTER_INCREMENT(exp->exp_obd, register_lock_cancel_cb);
-
-        rc = OBP(exp->exp_obd, register_lock_cancel_cb)(exp, cb);
-        RETURN(rc);
-}
-
-static inline int obd_unregister_lock_cancel_cb(struct obd_export *exp,
-                                                 obd_lock_cancel_cb cb)
-{
-        int rc;
-        ENTRY;
-
-        OBD_CHECK_OP(exp->exp_obd, unregister_lock_cancel_cb, 0);
-        OBD_COUNTER_INCREMENT(exp->exp_obd, unregister_lock_cancel_cb);
-
-        rc = OBP(exp->exp_obd, unregister_lock_cancel_cb)(exp, cb);
-        RETURN(rc);
-}
-
-/* OBD Metadata Support */
-
-extern int obd_init_caches(void);
-extern void obd_cleanup_caches(void);
-
-/* support routines */
-extern cfs_mem_cache_t *obdo_cachep;
-
-#define OBDO_ALLOC(ptr)                                                       \
-do {                                                                          \
-        OBD_SLAB_ALLOC_PTR((ptr), obdo_cachep);                               \
-} while(0)
-
-#define OBDO_FREE(ptr)                                                        \
-do {                                                                          \
-        OBD_SLAB_FREE_PTR((ptr), obdo_cachep);                                \
-} while(0)
-
-/* I'm as embarrassed about this as you are.
- *
- * <shaver> // XXX do not look into _superhack with remaining eye
- * <shaver> // XXX if this were any uglier, I'd get my own show on MTV */
-extern int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
-
-/* sysctl.c */
-extern void obd_sysctl_init (void);
-extern void obd_sysctl_clean (void);
-
-/* uuid.c  */
-typedef __u8 class_uuid_t[16];
-void class_uuid_unparse(class_uuid_t in, struct obd_uuid *out);
-
-/* lustre_peer.c    */
-int lustre_uuid_to_peer(char *uuid, lnet_nid_t *peer_nid, int index);
-int class_add_uuid(char *uuid, __u64 nid);
-int class_del_uuid (char *uuid);
-void class_init_uuidlist(void);
-void class_exit_uuidlist(void);
-
-/* prng.c */
-void ll_generate_random_uuid(class_uuid_t uuid_out);
-
-#endif /* __LINUX_OBD_CLASS_H */
diff --git a/lustre/include/obd_echo.h b/lustre/include/obd_echo.h
deleted file mode 100644
index 53b0e6b282c22b107dd04cec8a5bd6fbfa494145..0000000000000000000000000000000000000000
--- a/lustre/include/obd_echo.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _OBD_ECHO_H
-#define _OBD_ECHO_H
-
-/* The persistent object (i.e. actually stores stuff!) */
-#define ECHO_PERSISTENT_OBJID    1ULL
-#define ECHO_PERSISTENT_SIZE     ((__u64)(1<<20))
-
-/* block size to use for data verification */
-#define OBD_ECHO_BLOCK_SIZE	(4<<10)
-
-struct ec_object {
-        struct list_head       eco_obj_chain;
-        struct obd_device     *eco_device;
-        int                    eco_refcount;
-        int                    eco_deleted;
-        obd_id                 eco_id;
-        struct lov_stripe_md  *eco_lsm;
-};
-
-struct ec_lock {
-        struct list_head       ecl_exp_chain;
-        struct ec_object      *ecl_object;
-        __u64                  ecl_cookie;
-        struct lustre_handle   ecl_lock_handle;
-        ldlm_policy_data_t     ecl_policy;
-        __u32                  ecl_mode;
-};
-
-#endif
diff --git a/lustre/include/obd_lov.h b/lustre/include/obd_lov.h
deleted file mode 100644
index c0f302dac241ae3250cfce86aa9416a4cd5c86f2..0000000000000000000000000000000000000000
--- a/lustre/include/obd_lov.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _OBD_LOV_H__
-#define _OBD_LOV_H__
-
-static inline int lov_stripe_md_size(int stripes)
-{
-        return sizeof(struct lov_stripe_md) + stripes*sizeof(struct lov_oinfo*);
-}
-
-#define lov_mds_md_size(stripes) lov_mds_md_v1_size(stripes)
-static inline int lov_mds_md_v1_size(int stripes)
-{
-        return sizeof(struct lov_mds_md_v1) +
-                stripes * sizeof(struct lov_ost_data_v1);
-}
-
-#define IOC_LOV_TYPE                   'g'
-#define IOC_LOV_MIN_NR                 50
-#define IOC_LOV_SET_OSC_ACTIVE         _IOWR('g', 50, long)
-#define IOC_LOV_MAX_NR                 50
-
-#define QOS_DEFAULT_THRESHOLD           10 /* MB */
-#define QOS_DEFAULT_MAXAGE              5  /* Seconds */
-
-#endif
diff --git a/lustre/include/obd_ost.h b/lustre/include/obd_ost.h
deleted file mode 100644
index d2b399e0cec3c11341399eb7bda4dbe4cf7fc680..0000000000000000000000000000000000000000
--- a/lustre/include/obd_ost.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * Data structures for object storage targets and client: OST & OSC's
- * 
- * See also lustre_idl.h for wire formats of requests.
- */
-
-#ifndef _LUSTRE_OST_H
-#define _LUSTRE_OST_H
-
-#include <obd_class.h>
-
-struct osc_brw_async_args {
-        struct obdo     *aa_oa;
-        int              aa_requested_nob;
-        int              aa_nio_count;
-        obd_count        aa_page_count;
-        int              aa_resends;
-        struct brw_page **aa_ppga;
-        struct client_obd *aa_cli;
-        struct list_head aa_oaps;
-};
-
-struct osc_async_args {
-        struct obd_info   *aa_oi;
-};
-
-struct osc_enqueue_args {
-        struct obd_export       *oa_exp;
-        struct obd_info         *oa_oi;
-        struct ldlm_enqueue_info*oa_ei;
-};
-
-int osc_extent_blocking_cb(struct ldlm_lock *lock,
-                           struct ldlm_lock_desc *new, void *data,
-                           int flag);
-
-#endif
diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h
deleted file mode 100644
index e97b58d908a8c0d6390d0088fabf1409f211bbf1..0000000000000000000000000000000000000000
--- a/lustre/include/obd_support.h
+++ /dev/null
@@ -1,677 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef _OBD_SUPPORT
-#define _OBD_SUPPORT
-
-#include <libcfs/kp30.h>
-#include <lvfs.h>
-#include <lprocfs_status.h>
-#include <lustre/lustre_idl.h>
-
-/* global variables */
-extern struct lprocfs_stats *obd_memory;
-enum {
-        OBD_MEMORY_STAT = 0,
-        OBD_MEMORY_PAGES_STAT = 1,
-        OBD_STATS_NUM,
-};
-
-extern unsigned int obd_fail_loc;
-extern unsigned int obd_fail_val;
-extern unsigned int obd_debug_peer_on_timeout;
-extern unsigned int obd_dump_on_timeout;
-extern unsigned int obd_dump_on_eviction;
-/* obd_timeout should only be used for recovery, not for 
-   networking / disk / timings affected by load (use Adaptive Timeouts) */
-extern unsigned int obd_timeout;          /* seconds */
-extern unsigned int ldlm_timeout;         /* seconds */
-extern unsigned int obd_sync_filter;
-extern unsigned int obd_max_dirty_pages;
-extern atomic_t obd_dirty_pages;
-extern cfs_waitq_t obd_race_waitq;
-extern int obd_race_state;
-extern unsigned int obd_alloc_fail_rate;
-
-/* Timeout definitions */
-#define OBD_TIMEOUT_DEFAULT 100
-#define LDLM_TIMEOUT_DEFAULT 20
-#ifdef CRAY_XT3
- #define OBD_RECOVERY_MAX_TIME (obd_timeout * 18) /* b13079 */
-#endif
-/* Time to wait for all clients to reconnect during recovery */
-/* Should be very conservative; must catch the first reconnect after reboot */
-#define OBD_RECOVERY_FACTOR (3) /* times obd_timeout */
-/* Change recovery-small 26b time if you change this */
-#define PING_INTERVAL max(obd_timeout / 4, 1U)
-/* Client may skip 1 ping; we must wait at least 2.5. But for multiple
- * failover targets the client only pings one server at a time, and pings
- * can be lost on a loaded network. Since eviction has serious consequences,
- * and there's no urgent need to evict a client just because it's idle, we
- * should be very conservative here. */
-#define PING_EVICT_TIMEOUT (PING_INTERVAL * 6)
-#define DISK_TIMEOUT 50          /* Beyond this we warn about disk speed */
-#define CONNECTION_SWITCH_MIN 5U /* Connection switching rate limiter */
- /* Max connect interval for nonresponsive servers; ~50s to avoid building up
-    connect requests in the LND queues, but within obd_timeout so we don't
-    miss the recovery window */
-#define CONNECTION_SWITCH_MAX min(50U, max(CONNECTION_SWITCH_MIN,obd_timeout))
-#define CONNECTION_SWITCH_INC 5  /* Connection timeout backoff */
-#ifndef CRAY_XT3
-/* In general this should be low to have quick detection of a system 
-   running on a backup server. (If it's too low, import_select_connection
-   will increase the timeout anyhow.)  */
-#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN,obd_timeout/20)
-#else
-/* ...but for very large systems (e.g. CRAY) we need to keep the initial 
-   connect t.o. high (bz 10803), because they will nearly ALWAYS be doing the
-   connects for the first time (clients "reboot" after every process, so no
-   chance to generate adaptive timeout data. */
-#define INITIAL_CONNECT_TIMEOUT max(CONNECTION_SWITCH_MIN,obd_timeout/2)
-#endif
-#define LONG_UNLINK 300          /* Unlink should happen before now */
-
-
-#define OBD_FAIL_MDS                     0x100
-#define OBD_FAIL_MDS_HANDLE_UNPACK       0x101
-#define OBD_FAIL_MDS_GETATTR_NET         0x102
-#define OBD_FAIL_MDS_GETATTR_PACK        0x103
-#define OBD_FAIL_MDS_READPAGE_NET        0x104
-#define OBD_FAIL_MDS_READPAGE_PACK       0x105
-#define OBD_FAIL_MDS_SENDPAGE            0x106
-#define OBD_FAIL_MDS_REINT_NET           0x107
-#define OBD_FAIL_MDS_REINT_UNPACK        0x108
-#define OBD_FAIL_MDS_REINT_SETATTR       0x109
-#define OBD_FAIL_MDS_REINT_SETATTR_WRITE 0x10a
-#define OBD_FAIL_MDS_REINT_CREATE        0x10b
-#define OBD_FAIL_MDS_REINT_CREATE_WRITE  0x10c
-#define OBD_FAIL_MDS_REINT_UNLINK        0x10d
-#define OBD_FAIL_MDS_REINT_UNLINK_WRITE  0x10e
-#define OBD_FAIL_MDS_REINT_LINK          0x10f
-#define OBD_FAIL_MDS_REINT_LINK_WRITE    0x110
-#define OBD_FAIL_MDS_REINT_RENAME        0x111
-#define OBD_FAIL_MDS_REINT_RENAME_WRITE  0x112
-#define OBD_FAIL_MDS_OPEN_NET            0x113
-#define OBD_FAIL_MDS_OPEN_PACK           0x114
-#define OBD_FAIL_MDS_CLOSE_NET           0x115
-#define OBD_FAIL_MDS_CLOSE_PACK          0x116
-#define OBD_FAIL_MDS_CONNECT_NET         0x117
-#define OBD_FAIL_MDS_CONNECT_PACK        0x118
-#define OBD_FAIL_MDS_REINT_NET_REP       0x119
-#define OBD_FAIL_MDS_DISCONNECT_NET      0x11a
-#define OBD_FAIL_MDS_GETSTATUS_NET       0x11b
-#define OBD_FAIL_MDS_GETSTATUS_PACK      0x11c
-#define OBD_FAIL_MDS_STATFS_PACK         0x11d
-#define OBD_FAIL_MDS_STATFS_NET          0x11e
-#define OBD_FAIL_MDS_GETATTR_NAME_NET    0x11f
-#define OBD_FAIL_MDS_PIN_NET             0x120
-#define OBD_FAIL_MDS_UNPIN_NET           0x121
-#define OBD_FAIL_MDS_ALL_REPLY_NET       0x122
-#define OBD_FAIL_MDS_ALL_REQUEST_NET     0x123
-#define OBD_FAIL_MDS_SYNC_NET            0x124
-#define OBD_FAIL_MDS_SYNC_PACK           0x125
-#define OBD_FAIL_MDS_DONE_WRITING_NET    0x126
-#define OBD_FAIL_MDS_DONE_WRITING_PACK   0x127
-#define OBD_FAIL_MDS_ALLOC_OBDO          0x128
-#define OBD_FAIL_MDS_PAUSE_OPEN          0x129
-#define OBD_FAIL_MDS_STATFS_LCW_SLEEP    0x12a
-#define OBD_FAIL_MDS_OPEN_CREATE         0x12b
-#define OBD_FAIL_MDS_OST_SETATTR         0x12c
-#define OBD_FAIL_MDS_QUOTACHECK_NET      0x12d
-#define OBD_FAIL_MDS_QUOTACTL_NET        0x12e
-#define OBD_FAIL_MDS_CLIENT_ADD          0x12f
-#define OBD_FAIL_MDS_GETXATTR_NET        0x130
-#define OBD_FAIL_MDS_GETXATTR_PACK       0x131
-#define OBD_FAIL_MDS_SETXATTR_NET        0x132
-#define OBD_FAIL_MDS_SETXATTR            0x133
-#define OBD_FAIL_MDS_SETXATTR_WRITE      0x134
-#define OBD_FAIL_MDS_FS_SETUP            0x135
-#define OBD_FAIL_MDS_RESEND              0x136
-#define OBD_FAIL_MDS_LLOG_CREATE_FAILED  0x137
-#define OBD_FAIL_MDS_LOV_SYNC_RACE       0x138
-#define OBD_FAIL_MDS_OSC_PRECREATE       0x139
-#define OBD_FAIL_MDS_LLOG_SYNC_TIMEOUT   0x13a
-#define OBD_FAIL_MDS_CLOSE_NET_REP       0x13b
-#define OBD_FAIL_MDS_BLOCK_QUOTA_REQ     0x13c
-#define OBD_FAIL_MDS_DROP_QUOTA_REQ      0x13d
-
-#define OBD_FAIL_OST                     0x200
-#define OBD_FAIL_OST_CONNECT_NET         0x201
-#define OBD_FAIL_OST_DISCONNECT_NET      0x202
-#define OBD_FAIL_OST_GET_INFO_NET        0x203
-#define OBD_FAIL_OST_CREATE_NET          0x204
-#define OBD_FAIL_OST_DESTROY_NET         0x205
-#define OBD_FAIL_OST_GETATTR_NET         0x206
-#define OBD_FAIL_OST_SETATTR_NET         0x207
-#define OBD_FAIL_OST_OPEN_NET            0x208
-#define OBD_FAIL_OST_CLOSE_NET           0x209
-#define OBD_FAIL_OST_BRW_NET             0x20a
-#define OBD_FAIL_OST_PUNCH_NET           0x20b
-#define OBD_FAIL_OST_STATFS_NET          0x20c
-#define OBD_FAIL_OST_HANDLE_UNPACK       0x20d
-#define OBD_FAIL_OST_BRW_WRITE_BULK      0x20e
-#define OBD_FAIL_OST_BRW_READ_BULK       0x20f
-#define OBD_FAIL_OST_SYNC_NET            0x210
-#define OBD_FAIL_OST_ALL_REPLY_NET       0x211
-#define OBD_FAIL_OST_ALL_REQUEST_NET     0x212
-#define OBD_FAIL_OST_LDLM_REPLY_NET      0x213
-#define OBD_FAIL_OST_BRW_PAUSE_BULK      0x214
-#define OBD_FAIL_OST_ENOSPC              0x215
-#define OBD_FAIL_OST_EROFS               0x216
-#define OBD_FAIL_OST_ENOENT              0x217
-#define OBD_FAIL_OST_QUOTACHECK_NET      0x218
-#define OBD_FAIL_OST_QUOTACTL_NET        0x219
-#define OBD_FAIL_OST_CHECKSUM_RECEIVE    0x21a
-#define OBD_FAIL_OST_CHECKSUM_SEND       0x21b
-#define OBD_FAIL_OST_BRW_SIZE            0x21c
-#define OBD_FAIL_OST_DROP_REQ            0x21d
-#define OBD_FAIL_OST_SETATTR_CREDITS     0x21e
-#define OBD_FAIL_OST_HOLD_WRITE_RPC      0x21f
-#define OBD_FAIL_OST_BRW_WRITE_BULK2     0x220
-#define OBD_FAIL_OST_LLOG_RECOVERY_TIMEOUT 0x221
-#define OBD_FAIL_OST_CANCEL_COOKIE_TIMEOUT 0x222
-#define OBD_FAIL_OST_PAUSE_CREATE        0x223
-#define OBD_FAIL_OST_BRW_PAUSE_PACK      0x224
-#define OBD_FAIL_OST_CONNECT_NET2        0x225
-
-#define OBD_FAIL_LDLM                    0x300
-#define OBD_FAIL_LDLM_NAMESPACE_NEW      0x301
-#define OBD_FAIL_LDLM_ENQUEUE            0x302
-#define OBD_FAIL_LDLM_CONVERT            0x303
-#define OBD_FAIL_LDLM_CANCEL             0x304
-#define OBD_FAIL_LDLM_BL_CALLBACK        0x305
-#define OBD_FAIL_LDLM_CP_CALLBACK        0x306
-#define OBD_FAIL_LDLM_GL_CALLBACK        0x307
-#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308
-#define OBD_FAIL_LDLM_ENQUEUE_INTENT_ERR 0x309
-#define OBD_FAIL_LDLM_CREATE_RESOURCE    0x30a
-#define OBD_FAIL_LDLM_ENQUEUE_BLOCKED    0x30b
-#define OBD_FAIL_LDLM_REPLY              0x30c
-#define OBD_FAIL_LDLM_RECOV_CLIENTS      0x30d
-#define OBD_FAIL_LDLM_ENQUEUE_OLD_EXPORT 0x30e
-#define OBD_FAIL_LDLM_GLIMPSE            0x30f
-#define OBD_FAIL_LDLM_CANCEL_RACE        0x310
-#define OBD_FAIL_LDLM_CANCEL_EVICT_RACE  0x311
-#define OBD_FAIL_LDLM_PAUSE_CANCEL       0x312
-#define OBD_FAIL_LDLM_CLOSE_THREAD       0x313
-#define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE  0x314
-
-#define OBD_FAIL_OSC                     0x400
-#define OBD_FAIL_OSC_BRW_READ_BULK       0x401
-#define OBD_FAIL_OSC_BRW_WRITE_BULK      0x402
-#define OBD_FAIL_OSC_LOCK_BL_AST         0x403
-#define OBD_FAIL_OSC_LOCK_CP_AST         0x404
-#define OBD_FAIL_OSC_MATCH               0x405
-#define OBD_FAIL_OSC_BRW_PREP_REQ        0x406
-#define OBD_FAIL_OSC_SHUTDOWN            0x407
-#define OBD_FAIL_OSC_CHECKSUM_RECEIVE    0x408
-#define OBD_FAIL_OSC_CHECKSUM_SEND       0x409
-#define OBD_FAIL_OSC_BRW_PREP_REQ2       0x40a
-#define OBD_FAIL_OSC_CONNECT_CKSUM       0x40b
-#define OBD_FAIL_OSC_CKSUM_ADLER_ONLY    0x40c
-
-#define OBD_FAIL_PTLRPC                  0x500
-#define OBD_FAIL_PTLRPC_ACK              0x501
-#define OBD_FAIL_PTLRPC_RQBD             0x502
-#define OBD_FAIL_PTLRPC_BULK_GET_NET     0x503
-#define OBD_FAIL_PTLRPC_BULK_PUT_NET     0x504
-#define OBD_FAIL_PTLRPC_DROP_RPC         0x505
-#define OBD_FAIL_PTLRPC_DELAY_SEND       0x506
-#define OBD_FAIL_PTLRPC_DELAY_RECOV      0x507
-#define OBD_FAIL_PTLRPC_CLIENT_BULK_CB   0x508
-#define OBD_FAIL_PTLRPC_PAUSE_REQ        0x50a
-#define OBD_FAIL_PTLRPC_PAUSE_REP        0x50c
-
-#define OBD_FAIL_OBD_PING_NET            0x600
-#define OBD_FAIL_OBD_LOG_CANCEL_NET      0x601
-#define OBD_FAIL_OBD_LOGD_NET            0x602
-#define OBD_FAIL_OBD_QC_CALLBACK_NET     0x603
-#define OBD_FAIL_OBD_DQACQ               0x604
-
-#define OBD_FAIL_TGT_REPLY_NET           0x700
-#define OBD_FAIL_TGT_CONN_RACE           0x701
-#define OBD_FAIL_TGT_FORCE_RECONNECT     0x702
-#define OBD_FAIL_TGT_DELAY_CONNECT       0x703
-#define OBD_FAIL_TGT_DELAY_RECONNECT     0x704
-#define OBD_FAIL_TGT_DELAY_PRECREATE     0x705
-
-#define OBD_FAIL_MDC_REVALIDATE_PAUSE    0x800
-#define OBD_FAIL_MDC_ENQUEUE_PAUSE       0x801
-#define OBD_FAIL_MDC_OLD_EXT_FLAGS       0x802
-#define OBD_FAIL_MDC_GETATTR_ENQUEUE     0x803
-
-#define OBD_FAIL_MGS                     0x900
-#define OBD_FAIL_MGS_ALL_REQUEST_NET     0x901
-#define OBD_FAIL_MGS_ALL_REPLY_NET       0x902
-#define OBD_FAIL_MGC_PAUSE_PROCESS_LOG   0x903
-#define OBD_FAIL_MGS_PAUSE_REQ           0x904
-#define OBD_FAIL_MGS_PAUSE_TARGET_REG    0x905
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-#define OBD_FAIL_QUOTA_QD_COUNT_32BIT    0xA00
-#else
-#warning "remove quota code above for format obsolete in new release"
-#endif
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-#define OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS    0xA01
-#else
-#warning "remove quota code above for format obsolete in new release"
-#endif
-
-#define OBD_FAIL_QUOTA_RET_QDATA         0xA02
-
-#define OBD_FAIL_LPROC_REMOVE            0xB00
-
-#define OBD_FAIL_GENERAL_ALLOC           0xC00
-
-/* Failure injection control */
-#define OBD_FAIL_MASK_SYS    0x0000FF00
-#define OBD_FAIL_MASK_LOC   (0x000000FF | OBD_FAIL_MASK_SYS)
-#define OBD_FAIL_ONCE        0x80000000
-#define OBD_FAILED           0x40000000
-/* The following flags aren't made to be combined */
-#define OBD_FAIL_SKIP        0x20000000 /* skip N then fail */
-#define OBD_FAIL_SOME        0x10000000 /* fail N times */
-#define OBD_FAIL_RAND        0x08000000 /* fail 1/N of the time */
-#define OBD_FAIL_USR1        0x04000000 /* user flag */
-
-int obd_fail_check(__u32 id);
-#define OBD_FAIL_CHECK(id)                                                   \
-({                                                                           \
-        int _ret_ = 0;                                                       \
-        if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) {        \
-                CERROR("*** obd_fail_loc=%x ***\n", id);                     \
-        }                                                                    \
-        _ret_;                                                               \
-})
-
-#define OBD_FAIL_CHECK_QUIET(id)                                             \
-        (unlikely(obd_fail_loc) ? obd_fail_check(id) : 0)
-
-/* deprecated - just use OBD_FAIL_CHECK */
-#define OBD_FAIL_CHECK_ONCE OBD_FAIL_CHECK
-
-#define OBD_FAIL_RETURN(id, ret)                                             \
-do {                                                                         \
-        if (unlikely(obd_fail_loc && obd_fail_check(id))) {                  \
-                CERROR("*** obd_fail_return=%x rc=%d ***\n", id, ret);       \
-                RETURN(ret);                                                 \
-        }                                                                    \
-} while(0)
-
-#define OBD_FAIL_TIMEOUT(id, secs)                                           \
-({      int _ret_ = 0;                                                       \
-        if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) {        \
-                CERROR("obd_fail_timeout id %x sleeping for %d secs\n",      \
-                       (id), (secs));                                        \
-                set_current_state(TASK_UNINTERRUPTIBLE);                     \
-                cfs_schedule_timeout(CFS_TASK_UNINT,                         \
-                                    cfs_time_seconds(secs));                 \
-                set_current_state(TASK_RUNNING);                             \
-                CERROR("obd_fail_timeout id %x awake\n", (id));              \
-        }                                                                    \
-        _ret_;                                                               \
-})
-
-#define OBD_FAIL_TIMEOUT_MS(id, ms)                                          \
-({      int _ret_ = 0;                                                       \
-        if (unlikely(obd_fail_loc && (_ret_ = obd_fail_check(id)))) {        \
-                CERROR("obd_fail_timeout id %x sleeping for %d ms\n",        \
-                       (id), (ms));                                          \
-                set_current_state(TASK_UNINTERRUPTIBLE);                     \
-                cfs_schedule_timeout(CFS_TASK_UNINT,                         \
-                                     cfs_time_seconds(ms)/1000);             \
-                set_current_state(TASK_RUNNING);                             \
-                CERROR("obd_fail_timeout id %x awake\n", (id));              \
-        }                                                                    \
-        _ret_;                                                               \
-})
-
-#ifdef __KERNEL__
-/* The idea here is to synchronise two threads to force a race. The
- * first thread that calls this with a matching fail_loc is put to
- * sleep. The next thread that calls with the same fail_loc wakes up
- * the first and continues. */
-#define OBD_RACE(id)                                                         \
-do {                                                                         \
-        if (unlikely(obd_fail_loc && obd_fail_check(id))) {                  \
-                obd_race_state = 0;                                          \
-                CERROR("obd_race id %x sleeping\n", (id));                   \
-                OBD_SLEEP_ON(obd_race_waitq, obd_race_state != 0);           \
-                CERROR("obd_fail_race id %x awake\n", (id));                 \
-        } else if ((obd_fail_loc & OBD_FAIL_MASK_LOC) ==                     \
-                    ((id) & OBD_FAIL_MASK_LOC)) {                            \
-                CERROR("obd_fail_race id %x waking\n", (id));                \
-                obd_race_state = 1;                                          \
-                wake_up(&obd_race_waitq);                                    \
-        }                                                                    \
-} while(0)
-#else
-/* sigh.  an expedient fix until OBD_RACE is fixed up */
-#define OBD_RACE(foo) do {} while(0)
-#endif
-
-#define fixme() CDEBUG(D_OTHER, "FIXME\n");
-
-extern atomic_t libcfs_kmemory;
-
-#ifdef RANDOM_FAIL_ALLOC
-#define HAS_FAIL_ALLOC_FLAG OBD_FAIL_CHECK_QUIET(OBD_FAIL_GENERAL_ALLOC)
-#else
-#define HAS_FAIL_ALLOC_FLAG 0
-#endif
-
-#define OBD_ALLOC_FAIL_BITS 24
-#define OBD_ALLOC_FAIL_MASK ((1 << OBD_ALLOC_FAIL_BITS) - 1)
-#define OBD_ALLOC_FAIL_MULT (OBD_ALLOC_FAIL_MASK / 100)
-
-#ifdef LPROCFS 
-#define obd_memory_add(size)                                                  \
-        lprocfs_counter_add(obd_memory, OBD_MEMORY_STAT, (long)(size))
-#define obd_memory_sub(size)                                                  \
-        lprocfs_counter_sub(obd_memory, OBD_MEMORY_STAT, (long)(size))
-#define obd_memory_sum()                                                      \
-        lprocfs_stats_collector(obd_memory, OBD_MEMORY_STAT,                  \
-                                LPROCFS_FIELDS_FLAGS_SUM)
-#define obd_pages_add(order)                                                  \
-        lprocfs_counter_add(obd_memory, OBD_MEMORY_PAGES_STAT,                \
-                            (long)(1 << (order)))
-#define obd_pages_sub(order)                                                  \
-        lprocfs_counter_sub(obd_memory, OBD_MEMORY_PAGES_STAT,                \
-                            (long)(1 << (order)))
-#define obd_pages_sum()                                                       \
-        lprocfs_stats_collector(obd_memory, OBD_MEMORY_PAGES_STAT,            \
-                                LPROCFS_FIELDS_FLAGS_SUM)
-
-extern void obd_update_maxusage(void);
-extern __u64 obd_memory_max(void);
-extern __u64 obd_pages_max(void);
-
-#else
-
-extern __u64 obd_alloc;
-extern __u64 obd_pages;
-
-extern __u64 obd_max_alloc;
-extern __u64 obd_max_pages;
-
-static inline void obd_memory_add(long size)
-{
-        obd_alloc += size;
-        if (obd_alloc > obd_max_alloc)
-                obd_max_alloc = obd_alloc;
-}
-
-static inline void obd_memory_sub(long size)
-{
-        obd_alloc -= size;
-}
-
-static inline void obd_pages_add(int order) 
-{
-        obd_pages += 1<< order;
-        if (obd_pages > obd_max_pages)
-                obd_max_pages = obd_pages;
-}
-
-static inline void obd_pages_sub(int order)
-{
-        obd_pages -= 1<< order;
-}
-
-#define obd_memory_sum() (obd_alloc)
-#define obd_pages_sum()  (obd_pages)
-
-#define obd_memory_max() (obd_max_alloc)
-#define obd_pages_max() (obd_max_pages)
-
-#endif
-
-#if defined(LUSTRE_UTILS) /* this version is for utils only */
-#define OBD_ALLOC_GFP(ptr, size, gfp_mask)                                    \
-do {                                                                          \
-        (ptr) = cfs_alloc(size, (gfp_mask));                                  \
-        if (unlikely((ptr) == NULL)) {                                        \
-                CERROR("kmalloc of '" #ptr "' (%d bytes) failed\n",           \
-                       (int)(size));                                          \
-        } else {                                                              \
-                memset(ptr, 0, size);                                         \
-                CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %d at %p\n",          \
-                       (int)(size), ptr);                                     \
-        }                                                                     \
-} while (0)
-#else /* this version is for the kernel and liblustre */
-#define OBD_FREE_RTN0(ptr)                                                    \
-({                                                                            \
-        cfs_free(ptr);                                                        \
-        (ptr) = NULL;                                                         \
-        0;                                                                    \
-})
-#define OBD_ALLOC_GFP(ptr, size, gfp_mask)                                    \
-do {                                                                          \
-        (ptr) = cfs_alloc(size, (gfp_mask));                                  \
-        if (likely((ptr) != NULL &&                                           \
-                   (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 ||       \
-                    !obd_alloc_fail(ptr, #ptr, "km", size,                    \
-                                    __FILE__, __LINE__) ||                    \
-                    OBD_FREE_RTN0(ptr)))){                                    \
-                memset(ptr, 0, size);                                         \
-                obd_memory_add(size);                                         \
-                CDEBUG(D_MALLOC, "kmalloced '" #ptr "': %d at %p.\n",         \
-                       (int)(size), ptr);                                     \
-        }                                                                     \
-} while (0)
-#endif
-
-#ifndef OBD_ALLOC_MASK
-# define OBD_ALLOC_MASK CFS_ALLOC_IO
-#endif
-
-#define OBD_ALLOC(ptr, size) OBD_ALLOC_GFP(ptr, size, OBD_ALLOC_MASK)
-#define OBD_ALLOC_WAIT(ptr, size) OBD_ALLOC_GFP(ptr, size, CFS_ALLOC_STD)
-#define OBD_ALLOC_PTR(ptr) OBD_ALLOC(ptr, sizeof *(ptr))
-#define OBD_ALLOC_PTR_WAIT(ptr) OBD_ALLOC_WAIT(ptr, sizeof *(ptr))
-
-#ifdef __arch_um__
-# define OBD_VMALLOC(ptr, size) OBD_ALLOC(ptr, size)
-#else
-# define OBD_VMALLOC(ptr, size)                                               \
-do {                                                                          \
-        (ptr) = cfs_alloc_large(size);                                        \
-        if (unlikely((ptr) == NULL)) {                                        \
-                CERROR("vmalloc of '" #ptr "' (%d bytes) failed\n",           \
-                       (int)(size));                                          \
-                CERROR(LPU64" total bytes allocated by Lustre, %d by LNET\n", \
-                       obd_memory_sum(), atomic_read(&libcfs_kmemory));      \
-        } else {                                                              \
-                memset(ptr, 0, size);                                         \
-                obd_memory_add(size);                                         \
-                CDEBUG(D_MALLOC, "vmalloced '" #ptr "': %d at %p.\n",         \
-                       (int)(size), ptr);                                     \
-        }                                                                     \
-} while (0)
-#endif
-
-#ifdef CONFIG_DEBUG_SLAB
-#define POISON(ptr, c, s) do {} while (0)
-#else
-#define POISON(ptr, c, s) memset(ptr, c, s)
-#endif
-
-#ifdef POISON_BULK
-#define POISON_PAGE(page, val) do { memset(kmap(page), val, CFS_PAGE_SIZE);   \
-                                    kunmap(page); } while (0)
-#else
-#define POISON_PAGE(page, val) do { } while (0)
-#endif
-
-#ifdef __KERNEL__
-#define OBD_FREE(ptr, size)                                                   \
-do {                                                                          \
-        LASSERT(ptr);                                                         \
-        obd_memory_sub(size);                                                 \
-        CDEBUG(D_MALLOC, "kfreed '" #ptr "': %d at %p.\n",                    \
-               (int)(size), ptr);                                             \
-        POISON(ptr, 0x5a, size);                                              \
-        cfs_free(ptr);                                                        \
-        (ptr) = (void *)0xdeadbeef;                                           \
-} while (0)
-
-#ifdef HAVE_RCU
-# ifdef HAVE_CALL_RCU_PARAM
-#  define my_call_rcu(rcu, cb)            call_rcu(rcu, cb, rcu)
-# else
-#  define my_call_rcu(rcu, cb)            call_rcu(rcu, cb)
-# endif
-#else
-# define my_call_rcu(rcu, cb)             (cb)(rcu)
-#endif
-
-#define OBD_FREE_RCU_CB(ptr, size, handle, free_cb)                           \
-do {                                                                          \
-        struct portals_handle *__h = (handle);                                \
-        LASSERT(handle);                                                      \
-        __h->h_ptr = (ptr);                                                   \
-        __h->h_size = (size);                                                 \
-        __h->h_free_cb = (void (*)(void *, size_t))(free_cb);                 \
-        my_call_rcu(&__h->h_rcu, class_handle_free_cb);                       \
-        (ptr) = (void *)0xdeadbeef;                                           \
-} while(0)
-#define OBD_FREE_RCU(ptr, size, handle) OBD_FREE_RCU_CB(ptr, size, handle, NULL)
-#else
-#define OBD_FREE(ptr, size) ((void)(size), free((ptr)))
-#define OBD_FREE_RCU(ptr, size, handle) (OBD_FREE(ptr, size))
-#define OBD_FREE_RCU_CB(ptr, size, handle, cb)     ((*(cb))(ptr, size))
-#endif
-
-#ifdef __arch_um__
-# define OBD_VFREE(ptr, size) OBD_FREE(ptr, size)
-#else
-# define OBD_VFREE(ptr, size)                                                 \
-do {                                                                          \
-        LASSERT(ptr);                                                         \
-        obd_memory_sub(size);                                                 \
-        CDEBUG(D_MALLOC, "vfreed '" #ptr "': %d at %p.\n",                    \
-               (int)(size), ptr);                                             \
-        POISON(ptr, 0x5a, size);                                              \
-        cfs_free_large(ptr);                                                  \
-        (ptr) = (void *)0xdeadbeef;                                           \
-} while (0)
-#endif
-
-/* we memset() the slab object to 0 when allocation succeeds, so DO NOT
- * HAVE A CTOR THAT DOES ANYTHING.  its work will be cleared here.  we'd
- * love to assert on that, but slab.c keeps kmem_cache_s all to itself. */
-#define OBD_SLAB_FREE_RTN0(ptr, slab)                                         \
-({                                                                            \
-        cfs_mem_cache_free((slab), (ptr));                                    \
-        (ptr) = NULL;                                                         \
-        0;                                                                    \
-}) 
-#define OBD_SLAB_ALLOC(ptr, slab, type, size)                                 \
-do {                                                                          \
-        LASSERT(!in_interrupt());                                             \
-        (ptr) = cfs_mem_cache_alloc(slab, (type));                            \
-        if (likely((ptr) != NULL &&                                           \
-                   (!HAS_FAIL_ALLOC_FLAG || obd_alloc_fail_rate == 0 ||       \
-                    !obd_alloc_fail(ptr, #ptr, "slab-", size,                 \
-                                    __FILE__, __LINE__) ||                    \
-                    OBD_SLAB_FREE_RTN0(ptr, slab)))) {                        \
-                memset(ptr, 0, size);                                         \
-                obd_memory_add(size);                                         \
-                CDEBUG(D_MALLOC, "slab-alloced '"#ptr"': %d at %p.\n",        \
-                       (int)(size), ptr);                                     \
-        }                                                                     \
-} while (0)
-
-#define OBD_FREE_PTR(ptr) OBD_FREE(ptr, sizeof *(ptr))
-
-#define OBD_SLAB_FREE(ptr, slab, size)                                        \
-do {                                                                          \
-        LASSERT(ptr);                                                         \
-        CDEBUG(D_MALLOC, "slab-freed '" #ptr "': %d at %p.\n",                \
-               (int)(size), ptr);                                             \
-        obd_memory_sub(size);                                                 \
-        POISON(ptr, 0x5a, size);                                              \
-        cfs_mem_cache_free(slab, ptr);                                        \
-        (ptr) = (void *)0xdeadbeef;                                           \
-} while (0)
-
-#define OBD_SLAB_ALLOC_PTR(ptr, slab)                                         \
-        OBD_SLAB_ALLOC((ptr), (slab), CFS_ALLOC_STD, sizeof *(ptr))
-#define OBD_SLAB_FREE_PTR(ptr, slab)                                          \
-        OBD_SLAB_FREE((ptr), (slab), sizeof *(ptr))
-
-#define KEY_IS(str) (keylen >= strlen(str) && strcmp(key, str) == 0)
-
-/* Wrapper for contiguous page frame allocation */
-#define OBD_PAGES_ALLOC(ptr, order, gfp_mask)                                 \
-do {                                                                          \
-        (ptr) = cfs_alloc_pages(gfp_mask, order);                             \
-        if (unlikely((ptr) == NULL)) {                                        \
-                CERROR("alloc_pages of '" #ptr "' %d page(s) / "LPU64" bytes "\
-                       "failed\n", (int)(1 << (order)),                       \
-                       (__u64)((1 << (order)) << CFS_PAGE_SHIFT));            \
-                CERROR(LPU64" total bytes and "LPU64" total pages "           \
-                       "("LPU64" bytes) allocated by Lustre, "                \
-                       "%d total bytes by LNET\n",                            \
-                       obd_memory_sum(),                                      \
-                       obd_pages_sum() << CFS_PAGE_SHIFT,                     \
-                       obd_pages_sum(),                                       \
-                       atomic_read(&libcfs_kmemory));                         \
-        } else {                                                              \
-                obd_pages_add(order);                                         \
-                CDEBUG(D_MALLOC, "alloc_pages '" #ptr "': %d page(s) / "      \
-                       LPU64" bytes at %p.\n",                                \
-                       (int)(1 << (order)),                                   \
-                       (__u64)((1 << (order)) << CFS_PAGE_SHIFT), ptr);       \
-        }                                                                     \
-} while (0)
-
-#define OBD_PAGE_ALLOC(ptr, gfp_mask)                                         \
-        OBD_PAGES_ALLOC(ptr, 0, gfp_mask)
-
-#define OBD_PAGES_FREE(ptr, order)                                            \
-do {                                                                          \
-        LASSERT(ptr);                                                         \
-        obd_pages_sub(order);                                                 \
-        CDEBUG(D_MALLOC, "free_pages '" #ptr "': %d page(s) / "LPU64" bytes " \
-               "at %p.\n",                                                    \
-               (int)(1 << (order)), (__u64)((1 << (order)) << CFS_PAGE_SHIFT),\
-               ptr);                                                          \
-        __cfs_free_pages(ptr, order);                                         \
-        (ptr) = (void *)0xdeadbeef;                                           \
-} while (0)
-
-#define OBD_PAGE_FREE(ptr) OBD_PAGES_FREE(ptr, 0)
-
-#if defined(__linux__)
-#include <linux/obd_support.h>
-#elif defined(__APPLE__)
-#include <darwin/obd_support.h>
-#elif defined(__WINNT__)
-#include <winnt/obd_support.h>
-#else
-#error Unsupported operating system.
-#endif
-
-#endif
diff --git a/lustre/kernel-tests/.cvsignore b/lustre/kernel-tests/.cvsignore
deleted file mode 100644
index 124a2771730e9cb1646afec2826180ff53b49ccd..0000000000000000000000000000000000000000
--- a/lustre/kernel-tests/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.*.cmd
-.*.flags
-*.ko
-*.c
-.tmp_versions
diff --git a/lustre/kernel-tests/Makefile b/lustre/kernel-tests/Makefile
deleted file mode 100644
index 73609356f2be5759a47e2fdf690a54b779c40a06..0000000000000000000000000000000000000000
--- a/lustre/kernel-tests/Makefile
+++ /dev/null
@@ -1,24 +0,0 @@
-ifeq ($(PATCHLEVEL),)
-
-ifneq ($(LUSTRE_LINUX_CONFIG),)
-include $(LUSTRE_LINUX_CONFIG)
-endif
-include Makefile
-
-else
-
-ifneq ($(LUSTRE_KERNEL_TEST),)
-ifeq ($(PATCHLEVEL),4)
-all: $(LUSTRE_KERNEL_TEST)
-else
-extra-y = $(LUSTRE_KERNEL_TEST)
-endif
-endif
-
-obj-m := conftest.o
-
-ifeq ($(PATCHLEVEL),4)
-include $(TOPDIR)/Rules.make
-endif
-
-endif
diff --git a/lustre/kernel_patches/LICENSE b/lustre/kernel_patches/LICENSE
deleted file mode 100644
index dd7f676fdc4e63d6fccf0f1c1e65ebd919fe0ed4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/LICENSE
+++ /dev/null
@@ -1,359 +0,0 @@
-All files in this subtree are licensed under the terms and conditions
-of the GNU General Public License version 2.
-
-Reproduced below is the GPL v2, and Linus's clarifying statement from
-the Linux kernel source code:
-
-----------------------------------------
-
-   NOTE! This copyright does *not* cover user programs that use kernel
- services by normal system calls - this is merely considered normal use
- of the kernel, and does *not* fall under the heading of "derived work".
- Also note that the GPL below is copyrighted by the Free Software
- Foundation, but the instance of code that it refers to (the Linux
- kernel) is copyrighted by me and others who actually wrote it.
-
-			Linus Torvalds
-
-----------------------------------------
-
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) 19yy  <name of author>
-
-    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  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) 19yy name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.
diff --git a/lustre/kernel_patches/README b/lustre/kernel_patches/README
deleted file mode 100644
index 7899f24c4c906983a193f50281237132b0b778fc..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/README
+++ /dev/null
@@ -1,3 +0,0 @@
-The Linux kernel patches for Lustre.
-See https://mail.clusterfs.com/wikis/lustre/LustreHowto for information on
-how to patch your kernel.
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config
deleted file mode 100644
index 8b2043a383ae5179981fd02fc02727ec4ca8c96d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686-smp.config
+++ /dev/null
@@ -1,1598 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-prep
-# Wed May 31 10:45:28 2006
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_CPUSETS is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_MODULE_SIG is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-CONFIG_MPENTIUM4=y
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-# CONFIG_SMP_ALTERNATIVES is not set
-CONFIG_NR_CPUS=32
-# CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-# CONFIG_X86_MCE_P4THERMAL is not set
-# CONFIG_TOSHIBA is not set
-# CONFIG_I8K is not set
-# CONFIG_X86_REBOOTFIXUPS is not set
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_VMSPLIT_3G=y
-# CONFIG_VMSPLIT_3G_OPT is not set
-# CONFIG_VMSPLIT_2G is not set
-# CONFIG_VMSPLIT_1G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-CONFIG_IRQBALANCE=y
-# CONFIG_REGPARM is not set
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_DOUBLEFAULT=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-# CONFIG_APM is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-CONFIG_TUX=y
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-# CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_DISKDUMP is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-# CONFIG_BLK_DEV_CS5535 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
-# CONFIG_NET_VENDOR_3COM is not set
-CONFIG_LANCE=m
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_AC3200 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-# CONFIG_INPUT_WISTRON_BTNS is not set
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_SONYPI is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_CS5535_GPIO is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_I810 is not set
-# CONFIG_FB_INTEL is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_CYBLA is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_SQUASHFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V3_ACL is not set
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-# CONFIG_DEBUG_SLAB_LEAK is not set
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_BOOT_DELAY is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-# CONFIG_CRYPTO_AES is not set
-# CONFIG_CRYPTO_AES_586 is not set
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_SIGNATURE is not set
-# CONFIG_CRYPTO_MPILIB is not set
-
-#
-# Hardware crypto devices
-#
-# CONFIG_CRYPTO_DEV_PADLOCK is not set
-
-#
-# Library routines
-#
-# CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_X86_SYSENTER=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config
deleted file mode 100644
index 691606a4e66dfc14c94e14f7e59b09c9c6719cce..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-2.6-fc5-i686.config
+++ /dev/null
@@ -1,1591 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-prep
-# Wed May 31 14:11:18 2006
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_MODULE_SIG is not set
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-CONFIG_MPENTIUM4=y
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-# CONFIG_X86_UP_APIC is not set
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-# CONFIG_TOSHIBA is not set
-# CONFIG_I8K is not set
-# CONFIG_X86_REBOOTFIXUPS is not set
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_VMSPLIT_3G=y
-# CONFIG_VMSPLIT_3G_OPT is not set
-# CONFIG_VMSPLIT_2G is not set
-# CONFIG_VMSPLIT_1G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-# CONFIG_REGPARM is not set
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_DOUBLEFAULT=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-# CONFIG_APM is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCIEPORTBUS is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-CONFIG_TUX=y
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-# CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_DISKDUMP is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-# CONFIG_BLK_DEV_CS5535 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
-# CONFIG_NET_VENDOR_3COM is not set
-CONFIG_LANCE=m
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_AC3200 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-# CONFIG_INPUT_WISTRON_BTNS is not set
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-CONFIG_STALDRV=y
-# CONFIG_STALLION is not set
-# CONFIG_ISTALLION is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_SONYPI is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_CS5535_GPIO is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_ELEKTOR is not set
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_I810 is not set
-# CONFIG_FB_INTEL is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_CYBLA is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_SQUASHFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V3_ACL is not set
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-# CONFIG_DEBUG_SLAB_LEAK is not set
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_BOOT_DELAY is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-# CONFIG_CRYPTO_AES is not set
-# CONFIG_CRYPTO_AES_586 is not set
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_SIGNATURE is not set
-# CONFIG_CRYPTO_MPILIB is not set
-
-#
-# Hardware crypto devices
-#
-# CONFIG_CRYPTO_DEV_PADLOCK is not set
-
-#
-# Library routines
-#
-# CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_SYSENTER=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config
deleted file mode 100644
index 8b2043a383ae5179981fd02fc02727ec4ca8c96d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.15-fc5-i686.config
+++ /dev/null
@@ -1,1598 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.15-prep
-# Wed May 31 10:45:28 2006
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_CPUSETS is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_MODULE_SIG is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-CONFIG_MPENTIUM4=y
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-# CONFIG_SMP_ALTERNATIVES is not set
-CONFIG_NR_CPUS=32
-# CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-# CONFIG_X86_MCE_P4THERMAL is not set
-# CONFIG_TOSHIBA is not set
-# CONFIG_I8K is not set
-# CONFIG_X86_REBOOTFIXUPS is not set
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_VMSPLIT_3G=y
-# CONFIG_VMSPLIT_3G_OPT is not set
-# CONFIG_VMSPLIT_2G is not set
-# CONFIG_VMSPLIT_1G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-CONFIG_IRQBALANCE=y
-# CONFIG_REGPARM is not set
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_DOUBLEFAULT=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-# CONFIG_APM is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-CONFIG_TUX=y
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-# CONFIG_CONNECTOR is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_DISKDUMP is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-# CONFIG_BLK_DEV_CS5535 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_CASSINI is not set
-# CONFIG_NET_VENDOR_3COM is not set
-CONFIG_LANCE=m
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_AC3200 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SKGE is not set
-# CONFIG_SKY2 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_VIA_VELOCITY is not set
-# CONFIG_TIGON3 is not set
-# CONFIG_BNX2 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-# CONFIG_IXGB is not set
-# CONFIG_S2IO is not set
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_NET_FC is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-# CONFIG_INPUT_WISTRON_BTNS is not set
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_SONYPI is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_CS5535_GPIO is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_I810 is not set
-# CONFIG_FB_INTEL is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_CYBLA is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_SQUASHFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
-# CONFIG_NFS_V4 is not set
-# CONFIG_NFS_DIRECTIO is not set
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-# CONFIG_NFSD_V3_ACL is not set
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=y
-# CONFIG_RPCSEC_GSS_KRB5 is not set
-# CONFIG_RPCSEC_GSS_SPKM3 is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-# CONFIG_DEBUG_SLAB_LEAK is not set
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_BOOT_DELAY is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-# CONFIG_CRYPTO_AES is not set
-# CONFIG_CRYPTO_AES_586 is not set
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_SIGNATURE is not set
-# CONFIG_CRYPTO_MPILIB is not set
-
-#
-# Hardware crypto devices
-#
-# CONFIG_CRYPTO_DEV_PADLOCK is not set
-
-#
-# Library routines
-#
-# CONFIG_CRC_CCITT is not set
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_X86_SYSENTER=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config
deleted file mode 100644
index 86afdbbd2ee589627573b2c6fcf8ddf7033ce59f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686-smp.config
+++ /dev/null
@@ -1,1620 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.22
-# Thu Jan 25 23:54:30 2007
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_CPUSETS is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=32
-# CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-# CONFIG_X86_MCE_P4THERMAL is not set
-# CONFIG_TOSHIBA is not set
-# CONFIG_I8K is not set
-# CONFIG_X86_REBOOTFIXUPS is not set
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_VMSPLIT_3G=y
-# CONFIG_VMSPLIT_3G_OPT is not set
-# CONFIG_VMSPLIT_2G is not set
-# CONFIG_VMSPLIT_1G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-CONFIG_IRQBALANCE=y
-# CONFIG_REGPARM is not set
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_DOUBLEFAULT=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-# CONFIG_APM is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-# CONFIG_BLK_DEV_CS5535 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-# CONFIG_CASSINI is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-# CONFIG_LANCE is not set
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-CONFIG_HP100=m
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-# CONFIG_AC3200 is not set
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-# CONFIG_INPUT_WISTRON_BTNS is not set
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_SONYPI is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_CS5535_GPIO is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_I810 is not set
-# CONFIG_FB_INTEL is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_CYBLA is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-# CONFIG_CRYPTO_DEV_PADLOCK is not set
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config
deleted file mode 100644
index d71fd23d542f4ebc2e1331fdb9909ffab63eb2ac..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-i686.config
+++ /dev/null
@@ -1,1616 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.22
-# Thu Jan 25 23:53:17 2007
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-# CONFIG_X86_UP_APIC is not set
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-# CONFIG_TOSHIBA is not set
-# CONFIG_I8K is not set
-# CONFIG_X86_REBOOTFIXUPS is not set
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_VMSPLIT_3G=y
-# CONFIG_VMSPLIT_3G_OPT is not set
-# CONFIG_VMSPLIT_2G is not set
-# CONFIG_VMSPLIT_1G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-# CONFIG_REGPARM is not set
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_DOUBLEFAULT=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-# CONFIG_APM is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCIEPORTBUS is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-# CONFIG_BLK_DEV_CS5535 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-# CONFIG_CASSINI is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-# CONFIG_LANCE is not set
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI5010=m
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-CONFIG_HP100=m
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-# CONFIG_AC3200 is not set
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_INPORT is not set
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-# CONFIG_INPUT_WISTRON_BTNS is not set
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_RIO=m
-# CONFIG_RIO_OLDPCI is not set
-CONFIG_STALDRV=y
-CONFIG_STALLION=m
-CONFIG_ISTALLION=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_SONYPI is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_CS5535_GPIO is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_ELEKTOR is not set
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_I810 is not set
-# CONFIG_FB_INTEL is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_CYBLA is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-# CONFIG_CRYPTO_DEV_PADLOCK is not set
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config
deleted file mode 100644
index 7d8d068c67516a843ac166d7d4a0ed044076f70d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64-smp.config
+++ /dev/null
@@ -1,1422 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.22
-# Thu Jan 25 23:51:07 2007
-#
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_CPUSETS is not set
-CONFIG_INITRAMFS_SOURCE=""
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_SWIOTLB=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_EFI=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_IA64_UNCACHED_ALLOCATOR=y
-CONFIG_DMA_IS_DMA32=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_PGTABLE_3=y
-# CONFIG_PGTABLE_4 is not set
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_SGI_SN_XP=m
-CONFIG_FORCE_MAX_ZONEORDER=17
-CONFIG_SMP=y
-CONFIG_NR_CPUS=32
-# CONFIG_HOTPLUG_CPU is not set
-# CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT is not set
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_HOLES_IN_ZONE=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-# CONFIG_IA32_SUPPORT is not set
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_SGI_SN=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=m
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-# CONFIG_CASSINI is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-CONFIG_SGI_SNSC=y
-# CONFIG_SGI_TIOCX is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_SERIAL_SGI_IOC4=m
-CONFIG_SERIAL_SGI_IOC3=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_EFI_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_AGP_SGI_TIOCA=m
-# CONFIG_DRM is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_CFB_FILLRECT is not set
-# CONFIG_FB_CFB_COPYAREA is not set
-# CONFIG_FB_CFB_IMAGEBLIT is not set
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# SN Devices
-#
-CONFIG_SGI_IOC4=m
-CONFIG_SGI_IOC3=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config
deleted file mode 100644
index 1db1bdb71c9701dd923d52b5b28deb3d0c63a5f3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-ia64.config
+++ /dev/null
@@ -1,1419 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.22
-# Thu Jan 25 23:49:55 2007
-#
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_INITRAMFS_SOURCE=""
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_SWIOTLB=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_EFI=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_IA64_UNCACHED_ALLOCATOR=y
-CONFIG_DMA_IS_DMA32=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_PGTABLE_3=y
-# CONFIG_PGTABLE_4 is not set
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_SGI_SN_XP=m
-CONFIG_FORCE_MAX_ZONEORDER=17
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_HOLES_IN_ZONE=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-# CONFIG_IA32_SUPPORT is not set
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_SGI_SN=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=m
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-# CONFIG_CASSINI is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-CONFIG_STALLION=m
-CONFIG_ISTALLION=m
-CONFIG_SGI_SNSC=y
-# CONFIG_SGI_TIOCX is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_SERIAL_SGI_IOC4=m
-CONFIG_SERIAL_SGI_IOC3=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_EFI_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_AGP_SGI_TIOCA=m
-# CONFIG_DRM is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_CFB_FILLRECT is not set
-# CONFIG_FB_CFB_COPYAREA is not set
-# CONFIG_FB_CFB_IMAGEBLIT is not set
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# SN Devices
-#
-CONFIG_SGI_IOC4=m
-CONFIG_SGI_IOC3=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config
deleted file mode 100644
index a995f65ca7cb54496d088682833126261a1f477a..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64-smp.config
+++ /dev/null
@@ -1,1463 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.22
-# Thu Jan 25 23:56:18 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_CPUSETS is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-# CONFIG_SCHED_SMT is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-# CONFIG_NUMA is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_NR_CPUS=32
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GART_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_INTEL is not set
-# CONFIG_X86_MCE_AMD is not set
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-CONFIG_GENERIC_PENDING_IRQ=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_UNORDERED_IO is not set
-# CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-# CONFIG_CASSINI is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config
deleted file mode 100644
index a328d34c19d38ca74d02b0fe1872572b753bfde3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-patchless-x86_64.config
+++ /dev/null
@@ -1,1462 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.22
-# Thu Jan 25 23:55:28 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_DEFAULT_AS=y
-# CONFIG_DEFAULT_DEADLINE is not set
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="anticipatory"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT_NONE is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_PREEMPT is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GART_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_INTEL is not set
-# CONFIG_X86_MCE_AMD is not set
-# CONFIG_KEXEC is not set
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-# CONFIG_ACPI_IBM is not set
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-# CONFIG_ACPI_CONTAINER is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_UNORDERED_IO is not set
-# CONFIG_PCIEPORTBUS is not set
-# CONFIG_PCI_MSI is not set
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-# CONFIG_PCCARD is not set
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-# CONFIG_XFRM_USER is not set
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=y
-CONFIG_INET_TCP_DIAG=y
-# CONFIG_TCP_CONG_ADVANCED is not set
-CONFIG_TCP_CONG_BIC=y
-# CONFIG_IPV6 is not set
-# CONFIG_NETFILTER is not set
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_DCCP is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_DECNET is not set
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_IEEE80211 is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_SX8 is not set
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_CDROM_PKTCDVD is not set
-# CONFIG_ATA_OVER_ETH is not set
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_IT821X is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-# CONFIG_RAID_ATTRS is not set
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-# CONFIG_CHR_DEV_SCH is not set
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-# CONFIG_SCSI_ISCSI_ATTRS is not set
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_ISCSI_TCP is not set
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_3W_9XXX is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_MEGARAID_SAS is not set
-# CONFIG_SCSI_SATA is not set
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_SYM53C8XX_2 is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA_FC is not set
-# CONFIG_SCSI_LPFC is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-# CONFIG_FUSION_CTL is not set
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-# CONFIG_PHYLIB is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-# CONFIG_CASSINI is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-# CONFIG_TULIP_NAPI_HW_MITIGATION is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_CHELSIO_T1 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-
-#
-# Token Ring devices
-#
-# CONFIG_TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-# CONFIG_NETPOLL_TRAP is not set
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=y
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-CONFIG_MOUSE_VSXXXAA=m
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-# CONFIG_SERIO_RAW is not set
-# CONFIG_GAMEPORT is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-# CONFIG_SYNCLINK_GT is not set
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-CONFIG_STALDRV=y
-CONFIG_STALLION=m
-CONFIG_ISTALLION=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-# CONFIG_IBMASR is not set
-CONFIG_WAFER_WDT=m
-# CONFIG_I6300ESB_WDT is not set
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-# CONFIG_W83977F_WDT is not set
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-# CONFIG_DRM is not set
-# CONFIG_MWAVE is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-# CONFIG_I2C_ALGOPCA is not set
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_I801 is not set
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-# CONFIG_I2C_NFORCE2 is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-# CONFIG_I2C_PROSAVAGE is not set
-# CONFIG_I2C_SAVAGE4 is not set
-# CONFIG_SCx200_ACB is not set
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-# CONFIG_I2C_STUB is not set
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-# CONFIG_I2C_VOODOO3 is not set
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-# CONFIG_SENSORS_DS1337 is not set
-# CONFIG_SENSORS_DS1374 is not set
-# CONFIG_SENSORS_EEPROM is not set
-# CONFIG_SENSORS_PCF8574 is not set
-# CONFIG_SENSORS_PCA9539 is not set
-# CONFIG_SENSORS_PCF8591 is not set
-# CONFIG_SENSORS_RTC8564 is not set
-# CONFIG_SENSORS_MAX6875 is not set
-# CONFIG_RTC_X1205_I2C is not set
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-# CONFIG_HWMON_VID is not set
-# CONFIG_SENSORS_ADM1021 is not set
-# CONFIG_SENSORS_ADM1025 is not set
-# CONFIG_SENSORS_ADM1026 is not set
-# CONFIG_SENSORS_ADM1031 is not set
-# CONFIG_SENSORS_ADM9240 is not set
-# CONFIG_SENSORS_ASB100 is not set
-# CONFIG_SENSORS_ATXP1 is not set
-# CONFIG_SENSORS_DS1621 is not set
-# CONFIG_SENSORS_F71805F is not set
-# CONFIG_SENSORS_FSCHER is not set
-# CONFIG_SENSORS_FSCPOS is not set
-# CONFIG_SENSORS_GL518SM is not set
-# CONFIG_SENSORS_GL520SM is not set
-# CONFIG_SENSORS_IT87 is not set
-# CONFIG_SENSORS_LM63 is not set
-# CONFIG_SENSORS_LM75 is not set
-# CONFIG_SENSORS_LM77 is not set
-# CONFIG_SENSORS_LM78 is not set
-# CONFIG_SENSORS_LM80 is not set
-# CONFIG_SENSORS_LM83 is not set
-# CONFIG_SENSORS_LM85 is not set
-# CONFIG_SENSORS_LM87 is not set
-# CONFIG_SENSORS_LM90 is not set
-# CONFIG_SENSORS_LM92 is not set
-# CONFIG_SENSORS_MAX1619 is not set
-# CONFIG_SENSORS_PC87360 is not set
-# CONFIG_SENSORS_SIS5595 is not set
-# CONFIG_SENSORS_SMSC47M1 is not set
-# CONFIG_SENSORS_SMSC47B397 is not set
-# CONFIG_SENSORS_VIA686A is not set
-# CONFIG_SENSORS_VT8231 is not set
-# CONFIG_SENSORS_W83781D is not set
-# CONFIG_SENSORS_W83792D is not set
-# CONFIG_SENSORS_W83L785TS is not set
-# CONFIG_SENSORS_W83627HF is not set
-# CONFIG_SENSORS_W83627EHF is not set
-# CONFIG_SENSORS_HDAPS is not set
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_BT848 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-# CONFIG_VIDEO_EM28XX is not set
-# CONFIG_VIDEO_OVCAMCHIP is not set
-# CONFIG_VIDEO_AUDIO_DECODER is not set
-# CONFIG_VIDEO_DECODER is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_MODE_HELPERS is not set
-# CONFIG_FB_TILEBLITTING is not set
-# CONFIG_FB_CIRRUS is not set
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-# CONFIG_FB_NVIDIA is not set
-# CONFIG_FB_RIVA is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SAVAGE is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_BACKLIGHT_LCD_SUPPORT is not set
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-# CONFIG_USB_ISP116X_HCD is not set
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-# CONFIG_USB_SL811_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_ACM is not set
-# CONFIG_USB_PRINTER is not set
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-# CONFIG_USB_STORAGE is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-# CONFIG_USB_AIPTEK is not set
-# CONFIG_USB_WACOM is not set
-# CONFIG_USB_ACECAD is not set
-# CONFIG_USB_KBTAB is not set
-# CONFIG_USB_POWERMATE is not set
-# CONFIG_USB_MTOUCH is not set
-# CONFIG_USB_ITMTOUCH is not set
-# CONFIG_USB_EGALAX is not set
-# CONFIG_USB_YEALINK is not set
-# CONFIG_USB_XPAD is not set
-# CONFIG_USB_ATI_REMOTE is not set
-# CONFIG_USB_ATI_REMOTE2 is not set
-# CONFIG_USB_KEYSPAN_REMOTE is not set
-# CONFIG_USB_APPLETOUCH is not set
-
-#
-# USB Imaging devices
-#
-# CONFIG_USB_MDC800 is not set
-# CONFIG_USB_MICROTEK is not set
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-# CONFIG_USB_VICAM is not set
-# CONFIG_USB_DSBR is not set
-# CONFIG_USB_ET61X251 is not set
-# CONFIG_USB_IBMCAM is not set
-# CONFIG_USB_KONICAWC is not set
-# CONFIG_USB_OV511 is not set
-# CONFIG_USB_SE401 is not set
-# CONFIG_USB_SN9C102 is not set
-# CONFIG_USB_STV680 is not set
-# CONFIG_USB_PWC is not set
-
-#
-# USB Network Adapters
-#
-# CONFIG_USB_CATC is not set
-# CONFIG_USB_KAWETH is not set
-# CONFIG_USB_PEGASUS is not set
-# CONFIG_USB_RTL8150 is not set
-# CONFIG_USB_USBNET is not set
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-
-#
-# USB Serial Converter support
-#
-# CONFIG_USB_SERIAL is not set
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-# CONFIG_USB_LEGOTOWER is not set
-# CONFIG_USB_LCD is not set
-# CONFIG_USB_LED is not set
-# CONFIG_USB_CYTHERM is not set
-# CONFIG_USB_PHIDGETKIT is not set
-# CONFIG_USB_PHIDGETSERVO is not set
-# CONFIG_USB_IDMOUSE is not set
-# CONFIG_USB_SISUSBVGA is not set
-# CONFIG_USB_LD is not set
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-# CONFIG_MMC is not set
-
-#
-# InfiniBand support
-#
-# CONFIG_INFINIBAND is not set
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-# CONFIG_EDAC is not set
-
-#
-# Firmware Drivers
-#
-# CONFIG_EDD is not set
-# CONFIG_DELL_RBU is not set
-# CONFIG_DCDBAS is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-# CONFIG_QUOTA is not set
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-# CONFIG_RELAYFS_FS is not set
-# CONFIG_CONFIGFS_FS is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_CIFS_EXPERIMENTAL=y
-CONFIG_CIFS_UPCALL=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-# CONFIG_KARMA_PARTITION is not set
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ASCII is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Instrumentation Support
-#
-# CONFIG_PROFILING is not set
-# CONFIG_KPROBES is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-CONFIG_DEBUG_SLAB=y
-CONFIG_DEBUG_MUTEXES=y
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_FS is not set
-# CONFIG_DEBUG_VM is not set
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-# CONFIG_KEYS_DEBUG_PROC_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-# CONFIG_CRYPTO_WP512 is not set
-# CONFIG_CRYPTO_TGR192 is not set
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-# CONFIG_CRYPTO_TEA is not set
-CONFIG_CRYPTO_ARC4=m
-# CONFIG_CRYPTO_KHAZAD is not set
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-# CONFIG_CRC16 is not set
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config
deleted file mode 100644
index 013ad4368ceb9f21c9b3f7efadb5085960c92663..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686-bigsmp.config
+++ /dev/null
@@ -1,3496 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.46
-# Tue Jul  3 17:56:03 2007
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SUSE_KERNEL=y
-CONFIG_SLE_VERSION=10
-CONFIG_SLE_SP=1
-CONFIG_SLE_SP_SUBLEVEL=0
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_XACCT=y
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=m
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-
-#
-# Processor type and features
-#
-# CONFIG_X86_PC is not set
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-CONFIG_M586=y
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_F00F_BUG=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_ALIGNMENT_16=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-CONFIG_SMP_ALTERNATIVES=y
-CONFIG_NR_CPUS=128
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_PREEMPT_BKL is not set
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_X86_REBOOTFIXUPS=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
-# CONFIG_NUMA is not set
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-# CONFIG_IRQBALANCE is not set
-CONFIG_REGPARM=y
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_KEXEC=y
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_HOTPLUG_CPU=y
-CONFIG_DOUBLEFAULT=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_SLEEP_PROC_SLEEP=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_SONY=m
-CONFIG_ACPI_PCC=m
-# CONFIG_ACPI_CUSTOM_DSDT is not set
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=m
-CONFIG_ACPI_INITRD=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-CONFIG_APM_DO_ENABLE=y
-# CONFIG_APM_CPU_IDLE is not set
-CONFIG_APM_DISPLAY_BLANK=y
-# CONFIG_APM_RTC_IS_GMT is not set
-CONFIG_APM_ALLOW_INTS=y
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-# CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=m
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_GX_SUSPMOD=m
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=m
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_CPUFREQ_NFORCE2=m
-CONFIG_X86_LONGRUN=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=m
-CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-CONFIG_SCx200=m
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=m
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=m
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-CONFIG_I82092=m
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-CONFIG_PCCARD_NONSTATIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=m
-CONFIG_BINFMT_MISC=m
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=m
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-# CONFIG_IP_NF_CT_ACCT is not set
-CONFIG_IP_NF_CONNTRACK_MARK=y
-# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_IPV4OPTIONS=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_POLICY=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_IP_DCCP_UNLOAD_HACK is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-CONFIG_DECNET=m
-CONFIG_DECNET_ROUTER=y
-CONFIG_DECNET_ROUTE_FWMARK=y
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_EMATCH is not set
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-# CONFIG_NET_CLS_IND is not set
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_YAM=m
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-# CONFIG_STANDALONE is not set
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-# CONFIG_MTD_OTP is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=1
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-CONFIG_MTD_PNC2000=m
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-CONFIG_MTD_SBC_GXX=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICHXROM=m
-CONFIG_MTD_SCB2_FLASH=m
-CONFIG_MTD_NETtel=m
-CONFIG_MTD_DILNETPC=m
-CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
-CONFIG_MTD_L440GX=m
-CONFIG_MTD_PCI=m
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-# CONFIG_MTD_DATAFLASH is not set
-# CONFIG_MTD_M25P80 is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_PHRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCECC=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-CONFIG_MTD_ONENAND=m
-# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_ISAPNP=y
-CONFIG_PNPBIOS=y
-CONFIG_PNPBIOS_PROC_FS=y
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_XD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=64000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-CONFIG_CDROM_PKTCDVD_WCACHE=y
-CONFIG_CIPHER_TWOFISH=m
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=m
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=m
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=m
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=m
-CONFIG_BLK_DEV_OPTI621=m
-CONFIG_BLK_DEV_RZ1000=m
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=m
-CONFIG_BLK_DEV_ALI15X3=m
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=m
-CONFIG_BLK_DEV_ATIIXP=m
-CONFIG_BLK_DEV_CMD64X=m
-CONFIG_BLK_DEV_TRIFLEX=m
-CONFIG_BLK_DEV_CY82C693=m
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_CS5535=m
-CONFIG_BLK_DEV_HPT34X=m
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=m
-CONFIG_BLK_DEV_SC1200=m
-CONFIG_BLK_DEV_PIIX=m
-CONFIG_BLK_DEV_IT821X=m
-CONFIG_BLK_DEV_NS87415=m
-CONFIG_BLK_DEV_PDC202XX_OLD=m
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=m
-CONFIG_BLK_DEV_SVWKS=m
-CONFIG_BLK_DEV_SIIMAGE=m
-CONFIG_BLK_DEV_SIS5513=m
-CONFIG_BLK_DEV_SLC90E66=m
-CONFIG_BLK_DEV_TRM290=m
-CONFIG_BLK_DEV_VIA82CXXX=m
-# CONFIG_IDE_ARM is not set
-CONFIG_IDE_CHIPSETS=y
-
-#
-# Note: most of these also require special kernel boot parameters
-#
-CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=m
-CONFIG_BLK_DEV_DTC2278=m
-CONFIG_BLK_DEV_HT6560B=m
-CONFIG_BLK_DEV_QD65XX=m
-CONFIG_BLK_DEV_UMC8672=m
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-CONFIG_ISCSI_TARGET=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_7000FASST=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC94XX=m
-CONFIG_AIC94XX_DEBUG=y
-CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_SCSI_IN2000=m
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_DTC3280=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_GENERIC_NCR5380=m
-CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
-CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-CONFIG_SCSI_INIA100=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PSI240I=m
-CONFIG_SCSI_QLOGIC_FAS=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_T128=m
-CONFIG_SCSI_U14_34F=m
-CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
-CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
-CONFIG_SCSI_U14_34F_MAX_TAGS=8
-CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_NSP32=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_NINJA_SCSI=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_PCMCIA_SYM53C500=m
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_ATA_ACPI=y
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-CONFIG_PATA_ARTOP=m
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CS5535 is not set
-# CONFIG_PATA_CYPRESS is not set
-CONFIG_PATA_EFAR=m
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_ISAPNP is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_LEGACY is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-CONFIG_PATA_NETCELL=m
-# CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_QDI is not set
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-# CONFIG_PATA_PDC2027X is not set
-CONFIG_PATA_SIL680=m
-# CONFIG_PATA_SIS is not set
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-# CONFIG_PATA_WINBOND_VLB is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_MCDX=m
-CONFIG_OPTCD=m
-CONFIG_SJCD=m
-# CONFIG_ISP16_CDI is not set
-CONFIG_CDU535=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_HP_SW=m
-CONFIG_DM_MULTIPATH_RDAC=m
-CONFIG_DM_NL_EVT=y
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_MAX_FC_SGE=256
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-CONFIG_IEEE1394_EXPORT_FULL_API=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-# CONFIG_I2O_CONFIG_OLD_IOCTL is not set
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_NET_SB1000=m
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-# CONFIG_ARCNET_CAP is not set
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
-CONFIG_ARCNET_COM20020_ISA=m
-CONFIG_ARCNET_COM20020_PCI=m
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_LANCE=m
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_AT1700=m
-CONFIG_DEPCA=m
-CONFIG_HP100=m
-CONFIG_NET_ISA=y
-CONFIG_E2100=m
-CONFIG_EWRK3=m
-CONFIG_EEXPRESS=m
-CONFIG_EEXPRESS_PRO=m
-CONFIG_HPLAN_PLUS=m
-CONFIG_HPLAN=m
-CONFIG_LP486E=m
-CONFIG_ETH16I=m
-CONFIG_NE2000=m
-CONFIG_ZNET=m
-CONFIG_SEEQ8005=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-# CONFIG_AMD8111E_NAPI is not set
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_AC3200=m
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_CS89x0=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-CONFIG_NET_POCKET=y
-CONFIG_ATP=m
-CONFIG_DE600=m
-CONFIG_DE620=m
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-# CONFIG_R8169_NAPI is not set
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_ARCNET_COM20020_CS=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-CONFIG_HOSTESS_SV11=m
-# CONFIG_COSA is not set
-CONFIG_DSCC4=m
-CONFIG_DSCC4_PCISYNC=y
-CONFIG_DSCC4_PCI_RST=y
-CONFIG_LANMEDIA=m
-CONFIG_SEALEVEL_4021=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-CONFIG_PC300=m
-CONFIG_PC300_MLPPP=y
-CONFIG_N2=m
-CONFIG_C101=m
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-CONFIG_SDLA=m
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-# CONFIG_SBNI is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_DUMMY=m
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_NICSTAR=m
-CONFIG_ATM_NICSTAR_USE_SUNI=y
-CONFIG_ATM_NICSTAR_USE_IDT77105=y
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_IA=m
-# CONFIG_ATM_IA_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_USE_TASKLET=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDJOY=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=m
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_COMPUTONE=m
-CONFIG_ROCKETPORT=m
-CONFIG_CYCLADES=m
-CONFIG_CYZ_INTR=y
-CONFIG_DIGIEPCA=m
-CONFIG_ESPSERIAL=m
-CONFIG_MOXA_INTELLIO=m
-CONFIG_MOXA_SMARTIO=m
-CONFIG_ISI=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-CONFIG_SPECIALIX=m
-# CONFIG_SPECIALIX_RTSCTS is not set
-CONFIG_SX=m
-CONFIG_STALDRV=y
-CONFIG_NOZOMI=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=8
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_RSA=y
-CONFIG_SERIAL_8250_FOURPORT=m
-CONFIG_SERIAL_8250_ACCENT=m
-CONFIG_SERIAL_8250_BOCA=m
-CONFIG_SERIAL_8250_HUB6=m
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=64
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_IBMASR=m
-CONFIG_WAFER_WDT=m
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_SBC8360_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-CONFIG_SBC_EPX_C3_WATCHDOG=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-CONFIG_MIXCOMWD=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=m
-CONFIG_AGP_ALI=m
-CONFIG_AGP_ATI=m
-CONFIG_AGP_AMD=m
-CONFIG_AGP_AMD64=m
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_NVIDIA=m
-CONFIG_AGP_SIS=m
-CONFIG_AGP_SWORKS=m
-CONFIG_AGP_VIA=m
-CONFIG_AGP_EFFICEON=m
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-CONFIG_DRM_SIS=m
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_SCx200_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-CONFIG_HPET_MMAP=y
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_TIS=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_TCG_INFINEON=m
-CONFIG_TELCLOCK=m
-CONFIG_CRASHER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_I2C=m
-CONFIG_SCx200_I2C_SCL=12
-CONFIG_SCx200_I2C_SDA=13
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-CONFIG_I2C_PCA_ISA=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-CONFIG_SENSORS_MAX6875=m
-CONFIG_RTC_X1205_I2C=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-CONFIG_SPI=y
-CONFIG_SPI_DEBUG=y
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-CONFIG_SPI_BITBANG=m
-CONFIG_SPI_BUTTERFLY=m
-
-#
-# SPI Protocol Masters
-#
-
-#
-# Dallas's 1-wire bus
-#
-CONFIG_W1=m
-CONFIG_W1_MATROX=m
-CONFIG_W1_DS9490=m
-CONFIG_W1_DS9490_BRIDGE=m
-CONFIG_W1_THERM=m
-CONFIG_W1_SMEM=m
-CONFIG_W1_DS2433=m
-CONFIG_W1_DS2433_CRC=y
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BT848_DVB=y
-CONFIG_VIDEO_SAA6588=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_MEYE=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_SAA7134_ALSA=m
-# CONFIG_VIDEO_SAA7134_OSS is not set
-CONFIG_VIDEO_SAA7134_DVB=m
-CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-CONFIG_VIDEO_CX88_ALSA=m
-CONFIG_VIDEO_CX88_DVB=m
-CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_CX88_VP3054=m
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_VIDEO_AUDIO_DECODER=m
-CONFIG_VIDEO_DECODER=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-# CONFIG_RADIO_MIROPCM20_RDS is not set
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_SF16FMR2=m
-CONFIG_RADIO_TERRATEC=m
-CONFIG_RADIO_TRUST=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_UMT_010=m
-# CONFIG_DVB_USB_CXUSB is not set
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-# CONFIG_DVB_PLUTO2 is not set
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terresterial DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BUF_DVB=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_ARC=m
-# CONFIG_FB_ASILIANT is not set
-CONFIG_FB_IMSTT=y
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_HGA_ACCEL=y
-CONFIG_FB_S1D13XXX=m
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-CONFIG_FB_RIVA_I2C=y
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G=y
-# CONFIG_FB_MATROX_I2C is not set
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-# CONFIG_FB_ATY128 is not set
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GENERIC_LCD=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_3DFX_ACCEL=y
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_CYBLA=m
-CONFIG_FB_TRIDENT=m
-CONFIG_FB_TRIDENT_ACCEL=y
-CONFIG_FB_GEODE=y
-CONFIG_FB_GEODE_GX1=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_VERBOSE_PROCFS=y
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_OPL4_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-CONFIG_SND_AD1848_LIB=m
-CONFIG_SND_CS4231_LIB=m
-CONFIG_SND_AD1816A=m
-CONFIG_SND_AD1848=m
-CONFIG_SND_ALS100=m
-CONFIG_SND_AZT2320=m
-CONFIG_SND_CMI8330=m
-CONFIG_SND_CS4231=m
-CONFIG_SND_CS4232=m
-CONFIG_SND_CS4236=m
-CONFIG_SND_DT019X=m
-CONFIG_SND_ES968=m
-CONFIG_SND_ES1688=m
-CONFIG_SND_ES18XX=m
-CONFIG_SND_GUS_SYNTH=m
-CONFIG_SND_GUSCLASSIC=m
-CONFIG_SND_GUSEXTREME=m
-CONFIG_SND_GUSMAX=m
-CONFIG_SND_INTERWAVE=m
-CONFIG_SND_INTERWAVE_STB=m
-CONFIG_SND_OPL3SA2=m
-CONFIG_SND_OPTI92X_AD1848=m
-CONFIG_SND_OPTI92X_CS4231=m
-CONFIG_SND_OPTI93X=m
-CONFIG_SND_SB8=m
-CONFIG_SND_SB16=m
-CONFIG_SND_SBAWE=m
-CONFIG_SND_SB16_CSP=y
-CONFIG_SND_SGALAXY=m
-CONFIG_SND_SSCAPE=m
-CONFIG_SND_WAVEFRONT=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_OBSOLETE_OSS_DRIVER=y
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-# CONFIG_SOUND_AD1816 is not set
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-# CONFIG_SOUND_AWE32_SYNTH is not set
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_ITMTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_YEALINK=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_ET61X251=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_ZD1201=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ANYDATA=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_WBSD=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_MTHCA=m
-# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
-CONFIG_INFINIBAND_SRP=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-CONFIG_DMA_TESTCLIENT=m
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_SECURITY=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=m
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_XFS_RT=y
-# CONFIG_XFS_DEBUG is not set
-# CONFIG_XFS_TRACE is not set
-CONFIG_OCFS2_FS=m
-CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-CONFIG_FUSE_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-CONFIG_NTFS_RW=y
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS_PROC_FS=y
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-# CONFIG_JFFS2_CMODE_NONE is not set
-CONFIG_JFFS2_CMODE_PRIORITY=y
-# CONFIG_JFFS2_CMODE_SIZE is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_STATS2=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_EXPERIMENTAL is not set
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-CONFIG_9P_FS=m
-CONFIG_GENERIC_ACL=y
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-# CONFIG_DETECT_SOFTLOCKUP is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-CONFIG_RCU_TORTURE_TEST=m
-# CONFIG_LKCD_DUMP is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-# CONFIG_KDB is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-# CONFIG_SECURITY_NETWORK_XFRM is not set
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SECLVL=m
-# CONFIG_SECURITY_SELINUX is not set
-CONFIG_SECURITY_APPARMOR=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config
deleted file mode 100644
index 3d04f51795a189137711506ce936df4fa0ca5f0c..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-i686.config
+++ /dev/null
@@ -1,3496 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.46
-# Tue Jul  3 17:46:57 2007
-#
-CONFIG_X86_32=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SUSE_KERNEL=y
-CONFIG_SLE_VERSION=10
-CONFIG_SLE_SP=1
-CONFIG_SLE_SP_SUBLEVEL=0
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_XACCT=y
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=m
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-
-#
-# Processor type and features
-#
-# CONFIG_X86_PC is not set
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-CONFIG_M586=y
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_F00F_BUG=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_ALIGNMENT_16=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-CONFIG_SMP_ALTERNATIVES=y
-CONFIG_NR_CPUS=128
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_PREEMPT_BKL is not set
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_X86_REBOOTFIXUPS=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
-# CONFIG_NUMA is not set
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-# CONFIG_IRQBALANCE is not set
-CONFIG_REGPARM=y
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_KEXEC=y
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_HOTPLUG_CPU=y
-CONFIG_DOUBLEFAULT=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_SLEEP_PROC_SLEEP=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_SONY=m
-CONFIG_ACPI_PCC=m
-# CONFIG_ACPI_CUSTOM_DSDT is not set
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=m
-CONFIG_ACPI_INITRD=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-CONFIG_APM_DO_ENABLE=y
-# CONFIG_APM_CPU_IDLE is not set
-CONFIG_APM_DISPLAY_BLANK=y
-# CONFIG_APM_RTC_IS_GMT is not set
-CONFIG_APM_ALLOW_INTS=y
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-# CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=m
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_GX_SUSPMOD=m
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=m
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_CPUFREQ_NFORCE2=m
-CONFIG_X86_LONGRUN=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=m
-CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK=y
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-CONFIG_SCx200=m
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=m
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=m
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-CONFIG_I82092=m
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-CONFIG_PCCARD_NONSTATIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=m
-CONFIG_BINFMT_MISC=m
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=m
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-# CONFIG_IP_NF_CT_ACCT is not set
-CONFIG_IP_NF_CONNTRACK_MARK=y
-# CONFIG_IP_NF_CONNTRACK_EVENTS is not set
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_IPV4OPTIONS=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_POLICY=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_IP_DCCP_UNLOAD_HACK is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-CONFIG_DECNET=m
-CONFIG_DECNET_ROUTER=y
-CONFIG_DECNET_ROUTE_FWMARK=y
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_EMATCH is not set
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-# CONFIG_NET_CLS_IND is not set
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_YAM=m
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-# CONFIG_STANDALONE is not set
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-# CONFIG_MTD_OTP is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=1
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-CONFIG_MTD_PNC2000=m
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-CONFIG_MTD_SBC_GXX=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICHXROM=m
-CONFIG_MTD_SCB2_FLASH=m
-CONFIG_MTD_NETtel=m
-CONFIG_MTD_DILNETPC=m
-CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
-CONFIG_MTD_L440GX=m
-CONFIG_MTD_PCI=m
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-# CONFIG_MTD_DATAFLASH is not set
-# CONFIG_MTD_M25P80 is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_PHRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCECC=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-CONFIG_MTD_ONENAND=m
-# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_ISAPNP=y
-CONFIG_PNPBIOS=y
-CONFIG_PNPBIOS_PROC_FS=y
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_XD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=64000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-CONFIG_CDROM_PKTCDVD_WCACHE=y
-CONFIG_CIPHER_TWOFISH=m
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=m
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=m
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=m
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=m
-CONFIG_BLK_DEV_OPTI621=m
-CONFIG_BLK_DEV_RZ1000=m
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=m
-CONFIG_BLK_DEV_ALI15X3=m
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=m
-CONFIG_BLK_DEV_ATIIXP=m
-CONFIG_BLK_DEV_CMD64X=m
-CONFIG_BLK_DEV_TRIFLEX=m
-CONFIG_BLK_DEV_CY82C693=m
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_CS5535=m
-CONFIG_BLK_DEV_HPT34X=m
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=m
-CONFIG_BLK_DEV_SC1200=m
-CONFIG_BLK_DEV_PIIX=m
-CONFIG_BLK_DEV_IT821X=m
-CONFIG_BLK_DEV_NS87415=m
-CONFIG_BLK_DEV_PDC202XX_OLD=m
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=m
-CONFIG_BLK_DEV_SVWKS=m
-CONFIG_BLK_DEV_SIIMAGE=m
-CONFIG_BLK_DEV_SIS5513=m
-CONFIG_BLK_DEV_SLC90E66=m
-CONFIG_BLK_DEV_TRM290=m
-CONFIG_BLK_DEV_VIA82CXXX=m
-# CONFIG_IDE_ARM is not set
-CONFIG_IDE_CHIPSETS=y
-
-#
-# Note: most of these also require special kernel boot parameters
-#
-CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=m
-CONFIG_BLK_DEV_DTC2278=m
-CONFIG_BLK_DEV_HT6560B=m
-CONFIG_BLK_DEV_QD65XX=m
-CONFIG_BLK_DEV_UMC8672=m
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-CONFIG_ISCSI_TARGET=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_7000FASST=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC94XX=m
-CONFIG_AIC94XX_DEBUG=y
-CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_SCSI_IN2000=m
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_DTC3280=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_GENERIC_NCR5380=m
-CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
-CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-CONFIG_SCSI_INIA100=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PSI240I=m
-CONFIG_SCSI_QLOGIC_FAS=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_T128=m
-CONFIG_SCSI_U14_34F=m
-CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
-CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
-CONFIG_SCSI_U14_34F_MAX_TAGS=8
-CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_NSP32=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_NINJA_SCSI=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_PCMCIA_SYM53C500=m
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_ATA_ACPI=y
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-CONFIG_PATA_ARTOP=m
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CS5535 is not set
-# CONFIG_PATA_CYPRESS is not set
-CONFIG_PATA_EFAR=m
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_ISAPNP is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_LEGACY is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-CONFIG_PATA_NETCELL=m
-# CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_QDI is not set
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-# CONFIG_PATA_PDC2027X is not set
-CONFIG_PATA_SIL680=m
-# CONFIG_PATA_SIS is not set
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-# CONFIG_PATA_WINBOND_VLB is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_MCDX=m
-CONFIG_OPTCD=m
-CONFIG_SJCD=m
-# CONFIG_ISP16_CDI is not set
-CONFIG_CDU535=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_HP_SW=m
-CONFIG_DM_MULTIPATH_RDAC=m
-CONFIG_DM_NL_EVT=y
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_MAX_FC_SGE=256
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-CONFIG_IEEE1394_EXPORT_FULL_API=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-# CONFIG_I2O_CONFIG_OLD_IOCTL is not set
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_NET_SB1000=m
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-# CONFIG_ARCNET_CAP is not set
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
-CONFIG_ARCNET_COM20020_ISA=m
-CONFIG_ARCNET_COM20020_PCI=m
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_LANCE=m
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_AT1700=m
-CONFIG_DEPCA=m
-CONFIG_HP100=m
-CONFIG_NET_ISA=y
-CONFIG_E2100=m
-CONFIG_EWRK3=m
-CONFIG_EEXPRESS=m
-CONFIG_EEXPRESS_PRO=m
-CONFIG_HPLAN_PLUS=m
-CONFIG_HPLAN=m
-CONFIG_LP486E=m
-CONFIG_ETH16I=m
-CONFIG_NE2000=m
-CONFIG_ZNET=m
-CONFIG_SEEQ8005=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-# CONFIG_AMD8111E_NAPI is not set
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_AC3200=m
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_CS89x0=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-CONFIG_NET_POCKET=y
-CONFIG_ATP=m
-CONFIG_DE600=m
-CONFIG_DE620=m
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-# CONFIG_R8169_NAPI is not set
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_ARCNET_COM20020_CS=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-CONFIG_HOSTESS_SV11=m
-# CONFIG_COSA is not set
-CONFIG_DSCC4=m
-CONFIG_DSCC4_PCISYNC=y
-CONFIG_DSCC4_PCI_RST=y
-CONFIG_LANMEDIA=m
-CONFIG_SEALEVEL_4021=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-CONFIG_PC300=m
-CONFIG_PC300_MLPPP=y
-CONFIG_N2=m
-CONFIG_C101=m
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-CONFIG_SDLA=m
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-# CONFIG_SBNI is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_DUMMY=m
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_NICSTAR=m
-CONFIG_ATM_NICSTAR_USE_SUNI=y
-CONFIG_ATM_NICSTAR_USE_IDT77105=y
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_IA=m
-# CONFIG_ATM_IA_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_USE_TASKLET=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDJOY=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=m
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_COMPUTONE=m
-CONFIG_ROCKETPORT=m
-CONFIG_CYCLADES=m
-CONFIG_CYZ_INTR=y
-CONFIG_DIGIEPCA=m
-CONFIG_ESPSERIAL=m
-CONFIG_MOXA_INTELLIO=m
-CONFIG_MOXA_SMARTIO=m
-CONFIG_ISI=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-CONFIG_SPECIALIX=m
-# CONFIG_SPECIALIX_RTSCTS is not set
-CONFIG_SX=m
-CONFIG_STALDRV=y
-CONFIG_NOZOMI=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=8
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_RSA=y
-CONFIG_SERIAL_8250_FOURPORT=m
-CONFIG_SERIAL_8250_ACCENT=m
-CONFIG_SERIAL_8250_BOCA=m
-CONFIG_SERIAL_8250_HUB6=m
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=64
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_IBMASR=m
-CONFIG_WAFER_WDT=m
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_SBC8360_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-CONFIG_SBC_EPX_C3_WATCHDOG=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-CONFIG_MIXCOMWD=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=m
-CONFIG_AGP_ALI=m
-CONFIG_AGP_ATI=m
-CONFIG_AGP_AMD=m
-CONFIG_AGP_AMD64=m
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_NVIDIA=m
-CONFIG_AGP_SIS=m
-CONFIG_AGP_SWORKS=m
-CONFIG_AGP_VIA=m
-CONFIG_AGP_EFFICEON=m
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-CONFIG_DRM_SIS=m
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_SCx200_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-CONFIG_HPET_MMAP=y
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_TIS=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_TCG_INFINEON=m
-CONFIG_TELCLOCK=m
-CONFIG_CRASHER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_I2C=m
-CONFIG_SCx200_I2C_SCL=12
-CONFIG_SCx200_I2C_SDA=13
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-CONFIG_I2C_PCA_ISA=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-CONFIG_SENSORS_MAX6875=m
-CONFIG_RTC_X1205_I2C=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-CONFIG_SPI=y
-CONFIG_SPI_DEBUG=y
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-CONFIG_SPI_BITBANG=m
-CONFIG_SPI_BUTTERFLY=m
-
-#
-# SPI Protocol Masters
-#
-
-#
-# Dallas's 1-wire bus
-#
-CONFIG_W1=m
-CONFIG_W1_MATROX=m
-CONFIG_W1_DS9490=m
-CONFIG_W1_DS9490_BRIDGE=m
-CONFIG_W1_THERM=m
-CONFIG_W1_SMEM=m
-CONFIG_W1_DS2433=m
-CONFIG_W1_DS2433_CRC=y
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BT848_DVB=y
-CONFIG_VIDEO_SAA6588=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_MEYE=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_SAA7134_ALSA=m
-# CONFIG_VIDEO_SAA7134_OSS is not set
-CONFIG_VIDEO_SAA7134_DVB=m
-CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-CONFIG_VIDEO_CX88_ALSA=m
-CONFIG_VIDEO_CX88_DVB=m
-CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_CX88_VP3054=m
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_VIDEO_AUDIO_DECODER=m
-CONFIG_VIDEO_DECODER=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-# CONFIG_RADIO_MIROPCM20_RDS is not set
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_SF16FMR2=m
-CONFIG_RADIO_TERRATEC=m
-CONFIG_RADIO_TRUST=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_UMT_010=m
-# CONFIG_DVB_USB_CXUSB is not set
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-# CONFIG_DVB_PLUTO2 is not set
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terresterial DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BUF_DVB=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_ARC=m
-# CONFIG_FB_ASILIANT is not set
-CONFIG_FB_IMSTT=y
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_HGA_ACCEL=y
-CONFIG_FB_S1D13XXX=m
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-CONFIG_FB_RIVA_I2C=y
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G=y
-# CONFIG_FB_MATROX_I2C is not set
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-# CONFIG_FB_ATY128 is not set
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GENERIC_LCD=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_3DFX_ACCEL=y
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_CYBLA=m
-CONFIG_FB_TRIDENT=m
-CONFIG_FB_TRIDENT_ACCEL=y
-CONFIG_FB_GEODE=y
-CONFIG_FB_GEODE_GX1=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_VERBOSE_PROCFS=y
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_OPL4_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-CONFIG_SND_AD1848_LIB=m
-CONFIG_SND_CS4231_LIB=m
-CONFIG_SND_AD1816A=m
-CONFIG_SND_AD1848=m
-CONFIG_SND_ALS100=m
-CONFIG_SND_AZT2320=m
-CONFIG_SND_CMI8330=m
-CONFIG_SND_CS4231=m
-CONFIG_SND_CS4232=m
-CONFIG_SND_CS4236=m
-CONFIG_SND_DT019X=m
-CONFIG_SND_ES968=m
-CONFIG_SND_ES1688=m
-CONFIG_SND_ES18XX=m
-CONFIG_SND_GUS_SYNTH=m
-CONFIG_SND_GUSCLASSIC=m
-CONFIG_SND_GUSEXTREME=m
-CONFIG_SND_GUSMAX=m
-CONFIG_SND_INTERWAVE=m
-CONFIG_SND_INTERWAVE_STB=m
-CONFIG_SND_OPL3SA2=m
-CONFIG_SND_OPTI92X_AD1848=m
-CONFIG_SND_OPTI92X_CS4231=m
-CONFIG_SND_OPTI93X=m
-CONFIG_SND_SB8=m
-CONFIG_SND_SB16=m
-CONFIG_SND_SBAWE=m
-CONFIG_SND_SB16_CSP=y
-CONFIG_SND_SGALAXY=m
-CONFIG_SND_SSCAPE=m
-CONFIG_SND_WAVEFRONT=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_OBSOLETE_OSS_DRIVER=y
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-# CONFIG_SOUND_AD1816 is not set
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-# CONFIG_SOUND_AWE32_SYNTH is not set
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_ITMTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_YEALINK=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_ET61X251=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_ZD1201=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ANYDATA=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_WBSD=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_MTHCA=m
-# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
-CONFIG_INFINIBAND_SRP=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-CONFIG_DMA_TESTCLIENT=m
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_SECURITY=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=m
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_XFS_RT=y
-# CONFIG_XFS_DEBUG is not set
-# CONFIG_XFS_TRACE is not set
-CONFIG_OCFS2_FS=m
-CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-CONFIG_FUSE_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-CONFIG_NTFS_RW=y
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS_PROC_FS=y
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-# CONFIG_JFFS2_CMODE_NONE is not set
-CONFIG_JFFS2_CMODE_PRIORITY=y
-# CONFIG_JFFS2_CMODE_SIZE is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_STATS2=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_EXPERIMENTAL is not set
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-CONFIG_9P_FS=m
-CONFIG_GENERIC_ACL=y
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-# CONFIG_DETECT_SOFTLOCKUP is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-CONFIG_RCU_TORTURE_TEST=m
-# CONFIG_LKCD_DUMP is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-# CONFIG_KDB is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-# CONFIG_SECURITY_NETWORK_XFRM is not set
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SECLVL=m
-# CONFIG_SECURITY_SELINUX is not set
-CONFIG_SECURITY_APPARMOR=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config
deleted file mode 100644
index 73918274b73709d4681a5bad1757ad0397b0e270..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64-smp.config
+++ /dev/null
@@ -1,3058 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.46
-# Tue Jul  3 18:35:09 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SUSE_KERNEL=y
-CONFIG_SLE_VERSION=10
-CONFIG_SLE_SP=1
-CONFIG_SLE_SP_SUBLEVEL=0
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_XACCT=y
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=m
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-# CONFIG_X86_64_XEN is not set
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_PREEMPT_BKL is not set
-CONFIG_NUMA=y
-CONFIG_K8_NUMA=y
-CONFIG_X86_64_ACPI_NUMA=y
-CONFIG_NUMA_EMU=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-CONFIG_DISCONTIGMEM_MANUAL=y
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_DISCONTIGMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_NEED_MULTIPLE_NODES=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-CONFIG_NR_CPUS=128
-CONFIG_HOTPLUG_CPU=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GART_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-CONFIG_GENERIC_PENDING_IRQ=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_SLEEP_PROC_SLEEP=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_SONY=m
-CONFIG_ACPI_PCC=m
-# CONFIG_ACPI_CUSTOM_DSDT is not set
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=m
-CONFIG_ACPI_HOTPLUG_MEMORY=y
-CONFIG_ACPI_INITRD=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-# CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_UNORDERED_IO is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=m
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=m
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-CONFIG_I82092=m
-CONFIG_PCCARD_NONSTATIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=m
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-# CONFIG_IP_NF_CT_ACCT is not set
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_IPV4OPTIONS=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_POLICY=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# DECnet: Netfilter Configuration
-#
-# CONFIG_DECNET_NF_GRABULATOR is not set
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_IP_DCCP_UNLOAD_HACK is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-CONFIG_DECNET=m
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-CONFIG_IPX_INTERN=y
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-# CONFIG_NET_CLS_IND is not set
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_YAM=m
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-# CONFIG_STANDALONE is not set
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-# CONFIG_MTD_OTP is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=1
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-# CONFIG_MTD_PNC2000 is not set
-# CONFIG_MTD_SC520CDP is not set
-# CONFIG_MTD_NETSC520 is not set
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_SBC_GXX is not set
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICHXROM=m
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-CONFIG_MTD_PCI=m
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-# CONFIG_MTD_DATAFLASH is not set
-# CONFIG_MTD_M25P80 is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_PHRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCECC=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-CONFIG_MTD_ONENAND=m
-# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=128000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-CONFIG_CDROM_PKTCDVD_WCACHE=y
-CONFIG_CIPHER_TWOFISH=m
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=m
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=m
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=m
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=m
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=m
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=m
-CONFIG_BLK_DEV_ALI15X3=m
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=m
-CONFIG_BLK_DEV_ATIIXP=m
-CONFIG_BLK_DEV_CMD64X=m
-CONFIG_BLK_DEV_TRIFLEX=m
-CONFIG_BLK_DEV_CY82C693=m
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=m
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=m
-CONFIG_BLK_DEV_SC1200=m
-CONFIG_BLK_DEV_PIIX=m
-CONFIG_BLK_DEV_IT821X=m
-CONFIG_BLK_DEV_NS87415=m
-CONFIG_BLK_DEV_PDC202XX_OLD=m
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=m
-CONFIG_BLK_DEV_SVWKS=m
-CONFIG_BLK_DEV_SIIMAGE=m
-CONFIG_BLK_DEV_SIS5513=m
-CONFIG_BLK_DEV_SLC90E66=m
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=m
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-CONFIG_ISCSI_TARGET=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC94XX=m
-CONFIG_AIC94XX_DEBUG=y
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_PCMCIA_SYM53C500=m
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_ATA_ACPI=y
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-CONFIG_PATA_ARTOP=m
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-CONFIG_PATA_EFAR=m
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-CONFIG_PATA_NETCELL=m
-# CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-# CONFIG_PATA_PDC2027X is not set
-CONFIG_PATA_SIL680=m
-# CONFIG_PATA_SIS is not set
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_HP_SW=m
-CONFIG_DM_MULTIPATH_RDAC=m
-CONFIG_DM_NL_EVT=y
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_MAX_FC_SGE=256
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-CONFIG_IEEE1394_EXPORT_FULL_API=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_CAP=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-# CONFIG_ARCNET_COM20020 is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-# CONFIG_AMD8111E_NAPI is not set
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-# CONFIG_NET_POCKET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-# CONFIG_R8169_NAPI is not set
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDJOY=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=m
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_COMPUTONE=m
-CONFIG_ROCKETPORT=m
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-CONFIG_DIGIEPCA=m
-CONFIG_MOXA_INTELLIO=m
-CONFIG_MOXA_SMARTIO=m
-CONFIG_ISI=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-CONFIG_SPECIALIX=m
-# CONFIG_SPECIALIX_RTSCTS is not set
-CONFIG_SX=m
-CONFIG_STALDRV=y
-CONFIG_NOZOMI=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=64
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-# CONFIG_IPMI_PANIC_STRING is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_IBMASR=m
-CONFIG_WAFER_WDT=m
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_SBC8360_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-CONFIG_SBC_EPX_C3_WATCHDOG=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=m
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-# CONFIG_DRM_I830 is not set
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-CONFIG_DRM_SIS=m
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-CONFIG_HPET_MMAP=y
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_TIS=m
-CONFIG_TCG_ATMEL=m
-CONFIG_TELCLOCK=m
-CONFIG_CRASHER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-CONFIG_I2C_PCA_ISA=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-CONFIG_SENSORS_MAX6875=m
-CONFIG_RTC_X1205_I2C=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-CONFIG_SPI=y
-CONFIG_SPI_DEBUG=y
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-CONFIG_SPI_BITBANG=m
-CONFIG_SPI_BUTTERFLY=m
-
-#
-# SPI Protocol Masters
-#
-
-#
-# Dallas's 1-wire bus
-#
-CONFIG_W1=m
-CONFIG_W1_MATROX=m
-CONFIG_W1_DS9490=m
-CONFIG_W1_DS9490_BRIDGE=m
-CONFIG_W1_THERM=m
-CONFIG_W1_SMEM=m
-CONFIG_W1_DS2433=m
-CONFIG_W1_DS2433_CRC=y
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BT848_DVB=y
-CONFIG_VIDEO_SAA6588=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_SAA7134_ALSA=m
-# CONFIG_VIDEO_SAA7134_OSS is not set
-CONFIG_VIDEO_SAA7134_DVB=m
-CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-CONFIG_VIDEO_CX88_ALSA=m
-CONFIG_VIDEO_CX88_DVB=m
-CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_CX88_VP3054=m
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_VIDEO_AUDIO_DECODER=m
-CONFIG_VIDEO_DECODER=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_UMT_010=m
-CONFIG_DVB_USB_CXUSB=m
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-CONFIG_DVB_PLUTO2=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terresterial DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BUF_DVB=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_ARC=m
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_HGA_ACCEL=y
-CONFIG_FB_S1D13XXX=m
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-CONFIG_FB_RIVA_I2C=y
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GENERIC_LCD=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_3DFX_ACCEL=y
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-CONFIG_FB_TRIDENT_ACCEL=y
-CONFIG_FB_GEODE=y
-CONFIG_FB_GEODE_GX1=m
-CONFIG_FB_VIRTUAL=m
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_VERBOSE_PROCFS=y
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_OBSOLETE_OSS_DRIVER=y
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-# CONFIG_SOUND_SB is not set
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_ITMTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_YEALINK=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_ET61X251=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_ZD1201=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ANYDATA=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_WBSD=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_MTHCA=m
-# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
-CONFIG_INFINIBAND_SRP=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-CONFIG_DMA_TESTCLIENT=m
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_SECURITY=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=m
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_XFS_RT=y
-# CONFIG_XFS_DEBUG is not set
-# CONFIG_XFS_TRACE is not set
-CONFIG_OCFS2_FS=m
-CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-CONFIG_FUSE_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-CONFIG_NTFS_RW=y
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS_PROC_FS=y
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-# CONFIG_JFFS2_CMODE_NONE is not set
-CONFIG_JFFS2_CMODE_PRIORITY=y
-# CONFIG_JFFS2_CMODE_SIZE is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_STATS2=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_EXPERIMENTAL is not set
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-CONFIG_9P_FS=m
-CONFIG_GENERIC_ACL=y
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-# CONFIG_DETECT_SOFTLOCKUP is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-CONFIG_RCU_TORTURE_TEST=m
-# CONFIG_LKCD_DUMP is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_KDB is not set
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-# CONFIG_SECURITY_NETWORK_XFRM is not set
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SECLVL=m
-# CONFIG_SECURITY_SELINUX is not set
-CONFIG_SECURITY_APPARMOR=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config
deleted file mode 100644
index d5e00e788c3c653e2ac992f54523a5eb95e2fdf7..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.16-2.6-sles10-x86_64.config
+++ /dev/null
@@ -1,3046 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.16.46
-# Tue Jul  3 18:30:50 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_SUSE_KERNEL=y
-CONFIG_SLE_VERSION=10
-CONFIG_SLE_SP=1
-CONFIG_SLE_SP_SUBLEVEL=0
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_TASKSTATS=y
-CONFIG_TASK_XACCT=y
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_UID16=y
-CONFIG_VM86=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-# CONFIG_KALLSYMS_EXTRA_PASS is not set
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-CONFIG_SLAB=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-CONFIG_OBSOLETE_INTERMODULE=m
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-# CONFIG_DEFAULT_DEADLINE is not set
-CONFIG_DEFAULT_CFQ=y
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="cfq"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-# CONFIG_X86_64_XEN is not set
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-# CONFIG_SMP is not set
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GART_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_SECCOMP=y
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_SLEEP_PROC_SLEEP=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_SONY=m
-CONFIG_ACPI_PCC=m
-# CONFIG_ACPI_CUSTOM_DSDT is not set
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=m
-CONFIG_ACPI_HOTPLUG_MEMORY=y
-CONFIG_ACPI_INITRD=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-# CONFIG_CPU_FREQ_DEBUG is not set
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_UNORDERED_IO is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=m
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=m
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-CONFIG_I82092=m
-CONFIG_PCCARD_NONSTATIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=m
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-# CONFIG_IP_NF_CT_ACCT is not set
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_IPV4OPTIONS=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_POLICY=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# DECnet: Netfilter Configuration
-#
-# CONFIG_DECNET_NF_GRABULATOR is not set
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_IP_DCCP_UNLOAD_HACK is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-# CONFIG_TIPC is not set
-# CONFIG_ATM is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-CONFIG_DECNET=m
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-CONFIG_IPX_INTERN=y
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-# CONFIG_NET_CLS_IND is not set
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_MKISS=m
-CONFIG_6PACK=m
-CONFIG_BPQETHER=m
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_YAM=m
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-# CONFIG_STANDALONE is not set
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-# CONFIG_MTD_CMDLINE_PARTS is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-# CONFIG_MTD_OTP is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=1
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BANKWIDTH=2
-# CONFIG_MTD_PNC2000 is not set
-# CONFIG_MTD_SC520CDP is not set
-# CONFIG_MTD_NETSC520 is not set
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_SBC_GXX is not set
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICHXROM=m
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-CONFIG_MTD_PCI=m
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-# CONFIG_MTD_DATAFLASH is not set
-# CONFIG_MTD_M25P80 is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_PHRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCECC=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE=y
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-CONFIG_MTD_ONENAND=m
-# CONFIG_MTD_ONENAND_VERIFY_WRITE is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-# CONFIG_PNP is not set
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=128000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-CONFIG_CDROM_PKTCDVD_WCACHE=y
-CONFIG_CIPHER_TWOFISH=m
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=m
-CONFIG_BLK_DEV_IDE=m
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=m
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=m
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-# CONFIG_IDE_TASK_IOCTL is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=m
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=m
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=m
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=m
-CONFIG_BLK_DEV_ALI15X3=m
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=m
-CONFIG_BLK_DEV_ATIIXP=m
-CONFIG_BLK_DEV_CMD64X=m
-CONFIG_BLK_DEV_TRIFLEX=m
-CONFIG_BLK_DEV_CY82C693=m
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=m
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=m
-CONFIG_BLK_DEV_SC1200=m
-CONFIG_BLK_DEV_PIIX=m
-CONFIG_BLK_DEV_IT821X=m
-CONFIG_BLK_DEV_NS87415=m
-CONFIG_BLK_DEV_PDC202XX_OLD=m
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=m
-CONFIG_BLK_DEV_SVWKS=m
-CONFIG_BLK_DEV_SIIMAGE=m
-CONFIG_BLK_DEV_SIS5513=m
-CONFIG_BLK_DEV_SLC90E66=m
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=m
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-CONFIG_ISCSI_TARGET=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC94XX=m
-CONFIG_AIC94XX_DEBUG=y
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_PCMCIA_SYM53C500=m
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_ATA_ACPI=y
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-CONFIG_PATA_ARTOP=m
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-CONFIG_PATA_EFAR=m
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-CONFIG_PATA_NETCELL=m
-# CONFIG_PATA_NS87410 is not set
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-# CONFIG_PATA_PDC2027X is not set
-CONFIG_PATA_SIL680=m
-# CONFIG_PATA_SIS is not set
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_HP_SW=m
-CONFIG_DM_MULTIPATH_RDAC=m
-CONFIG_DM_NL_EVT=y
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_MAX_FC_SGE=256
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-CONFIG_IEEE1394_EXPORT_FULL_API=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_LCT_NOTIFY_ON_CHANGES=y
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_CAP=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-# CONFIG_ARCNET_COM20020 is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-# CONFIG_AMD8111E_NAPI is not set
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-# CONFIG_NET_POCKET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-# CONFIG_R8169_NAPI is not set
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDJOY=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_ADS7846=m
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_COMPUTONE=m
-CONFIG_ROCKETPORT=m
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-CONFIG_DIGIEPCA=m
-CONFIG_MOXA_INTELLIO=m
-CONFIG_MOXA_SMARTIO=m
-CONFIG_ISI=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-CONFIG_SPECIALIX=m
-# CONFIG_SPECIALIX_RTSCTS is not set
-CONFIG_SX=m
-CONFIG_STALDRV=y
-# CONFIG_STALLION is not set
-# CONFIG_ISTALLION is not set
-CONFIG_NOZOMI=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=64
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-# CONFIG_IPMI_PANIC_STRING is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_IBMASR=m
-CONFIG_WAFER_WDT=m
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_SBC8360_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-CONFIG_SBC_EPX_C3_WATCHDOG=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=m
-CONFIG_DRM=m
-CONFIG_DRM_TDFX=m
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-# CONFIG_DRM_I830 is not set
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-CONFIG_DRM_SIS=m
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-CONFIG_HPET_MMAP=y
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_TIS=m
-CONFIG_TCG_ATMEL=m
-CONFIG_TELCLOCK=m
-CONFIG_CRASHER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-CONFIG_I2C_PCA_ISA=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-CONFIG_SENSORS_MAX6875=m
-CONFIG_RTC_X1205_I2C=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-CONFIG_SPI=y
-CONFIG_SPI_DEBUG=y
-CONFIG_SPI_MASTER=y
-
-#
-# SPI Master Controller Drivers
-#
-CONFIG_SPI_BITBANG=m
-CONFIG_SPI_BUTTERFLY=m
-
-#
-# SPI Protocol Masters
-#
-
-#
-# Dallas's 1-wire bus
-#
-CONFIG_W1=m
-CONFIG_W1_MATROX=m
-CONFIG_W1_DS9490=m
-CONFIG_W1_DS9490_BRIDGE=m
-CONFIG_W1_THERM=m
-CONFIG_W1_SMEM=m
-CONFIG_W1_DS2433=m
-CONFIG_W1_DS2433_CRC=y
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia Capabilities Port drivers
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BT848_DVB=y
-CONFIG_VIDEO_SAA6588=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_SAA7134_ALSA=m
-# CONFIG_VIDEO_SAA7134_OSS is not set
-CONFIG_VIDEO_SAA7134_DVB=m
-CONFIG_VIDEO_SAA7134_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-CONFIG_VIDEO_CX88_ALSA=m
-CONFIG_VIDEO_CX88_DVB=m
-CONFIG_VIDEO_CX88_DVB_ALL_FRONTENDS=y
-CONFIG_VIDEO_CX88_VP3054=m
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_VIDEO_AUDIO_DECODER=m
-CONFIG_VIDEO_DECODER=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_UMT_010=m
-CONFIG_DVB_USB_CXUSB=m
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-CONFIG_DVB_PLUTO2=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terresterial DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BUF_DVB=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_ARC=m
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_HGA_ACCEL=y
-CONFIG_FB_S1D13XXX=m
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-CONFIG_FB_RIVA_I2C=y
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GENERIC_LCD=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_3DFX_ACCEL=y
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-CONFIG_FB_TRIDENT_ACCEL=y
-CONFIG_FB_GEODE=y
-CONFIG_FB_GEODE_GX1=m
-CONFIG_FB_VIRTUAL=m
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_VERBOSE_PROCFS=y
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_OBSOLETE_OSS_DRIVER=y
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-# CONFIG_SOUND_SB is not set
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_OBSOLETE_OSS_USB_DRIVER is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_ITMTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_YEALINK=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_ET61X251=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_ZD1201=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ANYDATA=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB DSL modem support
-#
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_WBSD=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_MTHCA=m
-# CONFIG_INFINIBAND_MTHCA_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_DEBUG is not set
-CONFIG_INFINIBAND_SRP=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-CONFIG_DMA_TESTCLIENT=m
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-# CONFIG_EXT2_FS_XIP is not set
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_SECURITY=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=m
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_XFS_RT=y
-# CONFIG_XFS_DEBUG is not set
-# CONFIG_XFS_TRACE is not set
-CONFIG_OCFS2_FS=m
-CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-CONFIG_FUSE_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-CONFIG_NTFS_RW=y
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS_PROC_FS=y
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-CONFIG_JFFS2_COMPRESSION_OPTIONS=y
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-# CONFIG_JFFS2_CMODE_NONE is not set
-CONFIG_JFFS2_CMODE_PRIORITY=y
-# CONFIG_JFFS2_CMODE_SIZE is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_STATS2=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_EXPERIMENTAL is not set
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-CONFIG_9P_FS=m
-CONFIG_GENERIC_ACL=y
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=18
-# CONFIG_DETECT_SOFTLOCKUP is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_INFO is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-CONFIG_RCU_TORTURE_TEST=m
-# CONFIG_LKCD_DUMP is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_KDB is not set
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-# CONFIG_SECURITY_NETWORK_XFRM is not set
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SECLVL=m
-# CONFIG_SECURITY_SELINUX is not set
-CONFIG_SECURITY_APPARMOR=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config
deleted file mode 100644
index 24286e7cd49c7b41f4024a5dd0d2b54932d6b68f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686-smp.config
+++ /dev/null
@@ -1,3094 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-prep
-# Sat Nov 24 08:00:02 2007
-#
-CONFIG_X86_32=y
-CONFIG_GENERIC_TIME=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Process debugging support
-#
-CONFIG_PTRACE=y
-CONFIG_UTRACE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_SMP=y
-# CONFIG_X86_PC is not set
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_TICK_DIVIDER=y
-CONFIG_NR_CPUS=32
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_VM86=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-# CONFIG_X86_REBOOTFIXUPS is not set
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_EFI_VARS=y
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_RESOURCES_64BIT=y
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-# CONFIG_IRQBALANCE is not set
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-# CONFIG_SECCOMP is not set
-# CONFIG_VGA_NOPROBE is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_RELOCATABLE=y
-CONFIG_PHYSICAL_ALIGN=0x400000
-CONFIG_HOTPLUG_CPU=y
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_IBM_BAY=y
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=1999
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_P4_CLOCKMOD=m
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-# CONFIG_ISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_K8_NB=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_ROUTE_FWMARK=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-CONFIG_TUX_EXTENDED_LOG=y
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETLABEL=y
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CS553X=m
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CS5535 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_ATA_INTEL_COMBINED=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWL4965=m
-# CONFIG_IWL3945 is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
-CONFIG_HW_RANDOM_VIA=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-# CONFIG_FB_IMAC is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_CYBLA=m
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# SoC audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_USB_HIDINPUT_POWERBOOK=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# Caches
-#
-CONFIG_FSCACHE=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-CONFIG_CACHEFILES=m
-CONFIG_CACHEFILES_DEBUG=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_SQUASHFS_VMALLOC is not set
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_FSCACHE=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_HIGHMEM=y
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_FORCED_INLINING is not set
-CONFIG_BOOT_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-CONFIG_DEBUG_RODATA=y
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-CONFIG_DOUBLEFAULT=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
deleted file mode 100644
index 16b233dd7a1d2dc83ef6649c75c25b3f239a9b3f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-i686.config
+++ /dev/null
@@ -1,3081 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-prep
-# Sat Nov 24 08:01:09 2007
-#
-CONFIG_X86_32=y
-CONFIG_GENERIC_TIME=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-
-#
-# Process debugging support
-#
-CONFIG_PTRACE=y
-CONFIG_UTRACE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-# CONFIG_SMP is not set
-CONFIG_X86_PC=y
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_TICK_DIVIDER=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_X86_UP_APIC is not set
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_VM86=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-# CONFIG_X86_REBOOTFIXUPS is not set
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-# CONFIG_SWIOTLB is not set
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_EFI_VARS=y
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4096
-CONFIG_RESOURCES_64BIT=y
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-# CONFIG_SECCOMP is not set
-# CONFIG_VGA_NOPROBE is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_RELOCATABLE=y
-CONFIG_PHYSICAL_ALIGN=0x400000
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_IBM_BAY=y
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=1999
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_P4_CLOCKMOD=m
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-# CONFIG_ISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_K8_NB=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_ROUTE_FWMARK=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-CONFIG_TUX_EXTENDED_LOG=y
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETLABEL=y
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CS553X=m
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CS5535 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_ATA_INTEL_COMBINED=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWL4965=m
-# CONFIG_IWL3945 is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
-CONFIG_HW_RANDOM_VIA=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-# CONFIG_FB_IMAC is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_CYBLA=m
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# SoC audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_USB_HIDINPUT_POWERBOOK=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# Caches
-#
-CONFIG_FSCACHE=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-CONFIG_CACHEFILES=m
-CONFIG_CACHEFILES_DEBUG=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_SQUASHFS_VMALLOC is not set
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_FSCACHE=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_HIGHMEM=y
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_FORCED_INLINING is not set
-CONFIG_BOOT_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-CONFIG_DEBUG_RODATA=y
-# CONFIG_4KSTACKS is not set
-CONFIG_DOUBLEFAULT=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config
deleted file mode 100644
index 057c8574b21a58e37937632215220c599a809629..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64-smp.config
+++ /dev/null
@@ -1,2733 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-prep
-# Sat Nov 24 07:57:21 2007
-#
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Process debugging support
-#
-CONFIG_PTRACE=y
-CONFIG_UTRACE=y
-
-#
-# Block layer
-#
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_SWIOTLB=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_DMI=y
-CONFIG_EFI=y
-CONFIG_GENERIC_IOMAP=y
-# CONFIG_XEN is not set
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_IA64_UNCACHED_ALLOCATOR=y
-CONFIG_DMA_IS_DMA32=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_IA64_XEN is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_PGTABLE_3=y
-# CONFIG_PGTABLE_4 is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_SGI_SN_XP=m
-CONFIG_FORCE_MAX_ZONEORDER=17
-CONFIG_SMP=y
-CONFIG_NR_CPUS=1024
-CONFIG_HOTPLUG_CPU=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_SCHED_SMT=y
-# CONFIG_PERMIT_BSP_REMOVE is not set
-# CONFIG_PREEMPT is not set
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_MEMORY_HOTPLUG=y
-CONFIG_MEMORY_HOTPLUG_SPARSE=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_NUMA=y
-CONFIG_NODES_SHIFT=10
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y
-# CONFIG_IA32_SUPPORT is not set
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_SGI_SN=y
-
-#
-# SN Devices
-#
-CONFIG_SGI_IOC4=y
-CONFIG_SGI_IOC3=m
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-# CONFIG_ACPI_DOCK is not set
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_IA64_ACPI_CPUFREQ=m
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SGI=m
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_ROUTE_FWMARK=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-CONFIG_TUX_EXTENDED_LOG=y
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETLABEL=y
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=y
-CONFIG_BLK_DEV_SIIMAGE=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_ATA_INTEL_COMBINED=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-# CONFIG_IPW2100 is not set
-# CONFIG_IPW2200 is not set
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-# CONFIG_BCM43XX is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWL4965=m
-# CONFIG_IWL3945 is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=16
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_SERIAL_SGI_IOC4=m
-CONFIG_SERIAL_SGI_IOC3=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_EFI_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_AGP_SGI_TIOCA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=y
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-CONFIG_I2C_STUB=m
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# SoC audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# Caches
-#
-CONFIG_FSCACHE=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-CONFIG_CACHEFILES=m
-CONFIG_CACHEFILES_DEBUG=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=m
-CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_SQUASHFS_VMALLOC is not set
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_FSCACHE=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_IRQ_PER_CPU=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_FORCED_INLINING is not set
-CONFIG_BOOT_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Hardware crypto devices
-#
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
deleted file mode 100644
index d4e7b3ce1da114e8c67faf39efee18c086bda53f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-ia64.config
+++ /dev/null
@@ -1,2729 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-prep
-# Sat Nov 24 07:58:17 2007
-#
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-
-#
-# Process debugging support
-#
-CONFIG_PTRACE=y
-CONFIG_UTRACE=y
-
-#
-# Block layer
-#
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_SWIOTLB=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_FIND_NEXT_BIT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_DMI=y
-CONFIG_EFI=y
-CONFIG_GENERIC_IOMAP=y
-# CONFIG_XEN is not set
-CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y
-CONFIG_IA64_UNCACHED_ALLOCATOR=y
-CONFIG_DMA_IS_DMA32=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_HP_ZX1_SWIOTLB is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_IA64_XEN is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_PGTABLE_3=y
-# CONFIG_PGTABLE_4 is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_SGI_SN_XP=m
-CONFIG_FORCE_MAX_ZONEORDER=17
-# CONFIG_SMP is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-# CONFIG_PREEMPT is not set
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_MEMORY_HOTPLUG=y
-CONFIG_MEMORY_HOTPLUG_SPARSE=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_NUMA=y
-CONFIG_NODES_SHIFT=10
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y
-# CONFIG_IA32_SUPPORT is not set
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_SGI_SN=y
-
-#
-# SN Devices
-#
-CONFIG_SGI_IOC4=y
-CONFIG_SGI_IOC3=m
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-# CONFIG_ACPI_DOCK is not set
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=m
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_IA64_ACPI_CPUFREQ=m
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SGI=m
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_ROUTE_FWMARK=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-CONFIG_TUX_EXTENDED_LOG=y
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETLABEL=y
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_IDE_MAX_HWIFS=4
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=y
-CONFIG_BLK_DEV_SIIMAGE=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_ATA_INTEL_COMBINED=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-# CONFIG_IPW2100 is not set
-# CONFIG_IPW2200 is not set
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-# CONFIG_BCM43XX is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWL4965=m
-# CONFIG_IWL3945 is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=16
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_SERIAL_SGI_IOC4=m
-CONFIG_SERIAL_SGI_IOC3=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_EFI_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_AGP_SGI_TIOCA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-# CONFIG_HPET is not set
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=y
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-# CONFIG_I2C_AMD756 is not set
-# CONFIG_I2C_AMD8111 is not set
-# CONFIG_I2C_I801 is not set
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-# CONFIG_I2C_SIS96X is not set
-CONFIG_I2C_STUB=m
-# CONFIG_I2C_VIA is not set
-# CONFIG_I2C_VIAPRO is not set
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# SoC audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# Caches
-#
-CONFIG_FSCACHE=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-CONFIG_CACHEFILES=m
-CONFIG_CACHEFILES_DEBUG=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=m
-CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_SQUASHFS_VMALLOC is not set
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_FSCACHE=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_IRQ_PER_CPU=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_FORCED_INLINING is not set
-CONFIG_BOOT_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Hardware crypto devices
-#
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
deleted file mode 100644
index 10310a3df430ef57ff422c61adeab73b385caf4d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64-smp.config
+++ /dev/null
@@ -1,2974 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-prep
-# Sat Nov 24 07:53:07 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Process debugging support
-#
-CONFIG_PTRACE=y
-CONFIG_UTRACE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-# CONFIG_X86_64_XEN is not set
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_NUMA=y
-CONFIG_K8_NUMA=y
-CONFIG_NODES_SHIFT=6
-CONFIG_X86_64_ACPI_NUMA=y
-# CONFIG_NUMA_EMU is not set
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_MEMORY_PROBE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_MEMORY_HOTPLUG=y
-
-#
-# Memory hotplug is not guaranteed to work with Software Suspend
-#
-CONFIG_MEMORY_HOTPLUG_SPARSE=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_RESOURCES_64BIT=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-CONFIG_NR_CPUS=255
-CONFIG_HOTPLUG_CPU=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_TRACK_DIRTY_PAGES=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_TICK_DIVIDER=y
-CONFIG_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-# CONFIG_SECCOMP is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_REORDER=y
-CONFIG_K8_NB=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-CONFIG_GENERIC_PENDING_IRQ=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_IBM_BAY=y
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=m
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_ROUTE_FWMARK=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-CONFIG_TUX_EXTENDED_LOG=y
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETLABEL=y
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_ATA_INTEL_COMBINED=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWL4965=m
-# CONFIG_IWL3945 is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-# CONFIG_HW_RANDOM_GEODE is not set
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# SoC audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# Caches
-#
-CONFIG_FSCACHE=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-CONFIG_CACHEFILES=m
-CONFIG_CACHEFILES_DEBUG=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_SQUASHFS_VMALLOC is not set
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_FSCACHE=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_FORCED_INLINING is not set
-CONFIG_BOOT_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_IOMMU_DEBUG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config
deleted file mode 100644
index 226d89036f370fdcfe04d344e87f3b40616689da..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-rhel5-x86_64.config
+++ /dev/null
@@ -1,2958 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18-prep
-# Sat Nov 24 07:56:00 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-
-#
-# Process debugging support
-#
-CONFIG_PTRACE=y
-CONFIG_UTRACE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-# CONFIG_X86_64_XEN is not set
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-# CONFIG_SMP is not set
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_MEMORY_PROBE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_MEMORY_HOTPLUG=y
-
-#
-# Memory hotplug is not guaranteed to work with Software Suspend
-#
-CONFIG_MEMORY_HOTPLUG_SPARSE=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_TRACK_DIRTY_PAGES=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_TICK_DIVIDER=y
-CONFIG_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-# CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT is not set
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-# CONFIG_SECCOMP is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_REORDER=y
-CONFIG_K8_NB=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_IBM_BAY=y
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_HOTPLUG_MEMORY=m
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_SUBTREES is not set
-CONFIG_IPV6_MULTIPLE_TABLES=y
-CONFIG_IPV6_ROUTE_FWMARK=y
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-CONFIG_TUX_EXTENDED_LOG=y
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETLABEL=y
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-CONFIG_MAC80211=m
-CONFIG_MAC80211_LEDS=y
-# CONFIG_MAC80211_DEBUGFS is not set
-CONFIG_MAC80211_DEBUG=y
-# CONFIG_MAC80211_VERBOSE_DEBUG is not set
-# CONFIG_MAC80211_LOWTX_FRAME_DUMP is not set
-# CONFIG_TKIP_DEBUG is not set
-# CONFIG_MAC80211_DEBUG_COUNTERS is not set
-# CONFIG_MAC80211_IBSS_DEBUG is not set
-# CONFIG_MAC80211_VERBOSE_PS_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-# CONFIG_PATA_ALI is not set
-# CONFIG_PATA_AMD is not set
-# CONFIG_PATA_ARTOP is not set
-# CONFIG_PATA_ATIIXP is not set
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-# CONFIG_PATA_HPT3X2N is not set
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_IT821X is not set
-# CONFIG_PATA_IT8213 is not set
-# CONFIG_PATA_JMICRON is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_RADISYS is not set
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-# CONFIG_PATA_SERVERWORKS is not set
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-# CONFIG_PATA_VIA is not set
-# CONFIG_PATA_WINBOND is not set
-CONFIG_ATA_INTEL_COMBINED=y
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_MULTIPATH_RDAC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-CONFIG_IWLWIFI=y
-CONFIG_IWLWIFI_DEBUG=y
-CONFIG_IWL4965=m
-# CONFIG_IWL3945 is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-# CONFIG_HW_RANDOM_GEODE is not set
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_MTS64 is not set
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-# CONFIG_SND_PORTMAN2X4 is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# SoC audio support
-#
-# CONFIG_SND_SOC is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# Caches
-#
-CONFIG_FSCACHE=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-CONFIG_CACHEFILES=m
-CONFIG_CACHEFILES_DEBUG=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_SQUASHFS=m
-# CONFIG_SQUASHFS_EMBEDDED is not set
-CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
-# CONFIG_SQUASHFS_VMALLOC is not set
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_FSCACHE=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-CONFIG_DLM_DEBUG=y
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-CONFIG_DEBUG_LIST=y
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_FORCED_INLINING is not set
-CONFIG_BOOT_DELAY=y
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_IOMMU_DEBUG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config
deleted file mode 100644
index bb8485425e44d61c6f3133e9c0257e26756d7853..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686-smp.config
+++ /dev/null
@@ -1,2936 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18.8
-# Wed Aug 29 15:44:54 2007
-#
-CONFIG_X86_32=y
-CONFIG_GENERIC_TIME=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_SMP=y
-# CONFIG_X86_PC is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_NR_CPUS=32
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_NONFATAL=y
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_VM86=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-# CONFIG_X86_REBOOTFIXUPS is not set
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_EFI_VARS=y
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-# CONFIG_IRQBALANCE is not set
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-# CONFIG_SECCOMP is not set
-CONFIG_HZ_100=y
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
-CONFIG_KEXEC=y
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-CONFIG_HOTPLUG_CPU=y
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_P4_CLOCKMOD=m
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-# CONFIG_ISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_K8_NB=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_WIRELESS_EXT=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CS553X=m
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=m
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_MV=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PDC_ADMA=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIL24=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_SATA_INTEL_COMBINED=y
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
-CONFIG_HW_RANDOM_VIA=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-# CONFIG_FB_IMAC is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_CYBLA=m
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_USB_HIDINPUT_POWERBOOK=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=850
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_UNWIND_INFO is not set
-# CONFIG_FORCED_INLINING is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-CONFIG_DEBUG_RODATA=y
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-CONFIG_DOUBLEFAULT=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config
deleted file mode 100644
index 96c2171cf19789fdbd4a36cd73bb8814d5cc5da5..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-i686.config
+++ /dev/null
@@ -1,2956 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18.8
-# Wed Aug 29 17:42:10 2007
-#
-CONFIG_X86_32=y
-CONFIG_GENERIC_TIME=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-# CONFIG_SMP is not set
-CONFIG_X86_PC=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_CMPXCHG64=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_X86_UP_APIC=y
-CONFIG_X86_UP_IOAPIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_NONFATAL=y
-# CONFIG_X86_MCE_P4THERMAL is not set
-CONFIG_VM86=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-# CONFIG_X86_REBOOTFIXUPS is not set
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_EFI_VARS=y
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-CONFIG_SPARSEMEM_STATIC=y
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-# CONFIG_SECCOMP is not set
-CONFIG_HZ_100=y
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
-CONFIG_KEXEC=y
-# CONFIG_CRASH_DUMP is not set
-CONFIG_PHYSICAL_START=0x100000
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_P4_CLOCKMOD=m
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-# CONFIG_ISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_K8_NB=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_WIRELESS_EXT=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CS553X=m
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=m
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_MV=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PDC_ADMA=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIL24=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_SATA_INTEL_COMBINED=y
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_PCMCIA_XIRTULIP=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DRV_LOOP=m
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_HYSDN=m
-# CONFIG_HYSDN_CAPI is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-CONFIG_RISCOM8=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
-CONFIG_HW_RANDOM_VIA=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_FTAPE=m
-CONFIG_ZFTAPE=m
-CONFIG_ZFT_DFLT_BLK_SZ=10240
-
-#
-# The compressor will be built as a module only!
-#
-CONFIG_ZFT_COMPRESSOR=m
-CONFIG_FT_NR_BUFFERS=3
-CONFIG_FT_PROC_FS=y
-CONFIG_FT_NORMAL_DEBUG=y
-# CONFIG_FT_FULL_DEBUG is not set
-# CONFIG_FT_NO_TRACE is not set
-# CONFIG_FT_NO_TRACE_AT_ALL is not set
-
-#
-# Hardware configuration
-#
-CONFIG_FT_STD_FDC=y
-# CONFIG_FT_MACH2 is not set
-# CONFIG_FT_PROBE_FC10 is not set
-# CONFIG_FT_ALT_FDC is not set
-CONFIG_FT_FDC_THR=8
-CONFIG_FT_FDC_MAX_RATE=2000
-CONFIG_FT_ALPHA_CLOCK=0
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-# CONFIG_FB_IMAC is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_CYBLA=m
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_USB_HIDINPUT_POWERBOOK=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=850
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_UNWIND_INFO is not set
-# CONFIG_FORCED_INLINING is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-CONFIG_DEBUG_RODATA=y
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-CONFIG_DOUBLEFAULT=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config
deleted file mode 100644
index d0613a926e32744298a9395dff2767f1c4d8ad20..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64-smp.config
+++ /dev/null
@@ -1,2818 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18.8
-# Wed Aug 29 17:59:08 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_CPUSETS=y
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_NUMA=y
-CONFIG_K8_NUMA=y
-CONFIG_NODES_SHIFT=6
-CONFIG_X86_64_ACPI_NUMA=y
-# CONFIG_NUMA_EMU is not set
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-
-#
-# Memory hotplug is currently incompatible with Software Suspend
-#
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_RESOURCES_64BIT=y
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-CONFIG_NR_CPUS=32
-CONFIG_HOTPLUG_CPU=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_IOMMU=y
-# CONFIG_CALGARY_IOMMU is not set
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x200000
-# CONFIG_SECCOMP is not set
-# CONFIG_HZ_100 is not set
-# CONFIG_HZ_250 is not set
-CONFIG_HZ_1000=y
-CONFIG_HZ=1000
-CONFIG_REORDER=y
-CONFIG_K8_NB=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-CONFIG_GENERIC_PENDING_IRQ=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_WIRELESS_EXT=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=4000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=m
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_MV=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PDC_ADMA=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIL24=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_SATA_INTEL_COMBINED=y
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-# CONFIG_HW_RANDOM_GEODE is not set
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=256
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_IPATH_CORE=m
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_UNWIND_INFO=y
-CONFIG_STACK_UNWIND=y
-# CONFIG_FORCED_INLINING is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_IOMMU_DEBUG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config
deleted file mode 100644
index a4d598b7652e1906ee31e6a1766b3ed7bbc28196..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.18-2.6-vanilla-x86_64.config
+++ /dev/null
@@ -1,2796 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.18.8
-# Wed Aug 29 18:06:13 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_RELAY=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-# CONFIG_EMBEDDED is not set
-CONFIG_SYSCTL=y
-CONFIG_KALLSYMS=y
-CONFIG_KALLSYMS_ALL=y
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_SHMEM=y
-CONFIG_SLAB=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-# CONFIG_SLOB is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-# CONFIG_SMP is not set
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-
-#
-# Memory hotplug is currently incompatible with Software Suspend
-#
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x200000
-# CONFIG_SECCOMP is not set
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-# CONFIG_REORDER is not set
-CONFIG_K8_NB=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-# CONFIG_ACPI_HOTKEY is not set
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_IBM=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-# CONFIG_PCI_MSI is not set
-# CONFIG_PCI_DEBUG is not set
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-# CONFIG_IA32_EMULATION is not set
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-# CONFIG_NETDEBUG is not set
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-
-#
-# TCP congestion control
-#
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_CONNTRACK_SECMARK=y
-CONFIG_IP_NF_CONNTRACK_EVENTS=y
-CONFIG_IP_NF_CONNTRACK_NETLINK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_NETBIOS_NS=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_PPTP=m
-CONFIG_IP_NF_H323=m
-CONFIG_IP_NF_SIP=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_NAT_PPTP=m
-CONFIG_IP_NF_NAT_H323=m
-CONFIG_IP_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-
-#
-# DCCP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-
-#
-# TIPC Configuration (EXPERIMENTAL)
-#
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-# CONFIG_NET_SCH_CLK_JIFFIES is not set
-CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y
-# CONFIG_NET_SCH_CLK_CPU is not set
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_WIRELESS_EXT=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-# CONFIG_MTD_OBSOLETE_CHIPS is not set
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_NANDSIM=m
-
-#
-# OneNAND Flash Device Drivers
-#
-# CONFIG_MTD_ONENAND is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_NOT_PC=y
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_IDE_TASK_IOCTL=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=4000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=m
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_MV=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PDC_ADMA=m
-CONFIG_SCSI_HPTIOP=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIL24=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_SATA_INTEL_COMBINED=y
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# PHY device support
-#
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_CHELSIO_T1=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-CONFIG_NET_WIRELESS_RTNETLINK=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_I8XX_TCO=m
-# CONFIG_SC1200_WDT is not set
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-# CONFIG_HW_RANDOM_GEODE is not set
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=256
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-
-#
-# Video Capture Adapters
-#
-
-#
-# Video Capture Adapters
-#
-# CONFIG_VIDEO_ADV_DEBUG is not set
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-
-#
-# Encoders and Decoders
-#
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_TLV320AIC23B=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-
-#
-# V4L USB devices
-#
-CONFIG_VIDEO_PVRUSB2=m
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-# CONFIG_FB_MACMODES is not set
-# CONFIG_FB_BACKLIGHT is not set
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_GEODE is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_LCD_DEVICE=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_AC97_BUS=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_ACECAD=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_TOUCHSCREEN=m
-CONFIG_USB_TOUCHSCREEN_EGALAX=y
-CONFIG_USB_TOUCHSCREEN_PANJIT=y
-CONFIG_USB_TOUCHSCREEN_3M=y
-CONFIG_USB_TOUCHSCREEN_ITM=y
-# CONFIG_USB_YEALINK is not set
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-CONFIG_USB_ATI_REMOTE2=m
-CONFIG_USB_KEYSPAN_REMOTE=m
-CONFIG_USB_APPLETOUCH=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# MMC/SD Card support
-#
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-CONFIG_MMC_BLOCK=m
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=m
-CONFIG_RTC_INTF_PROC=m
-CONFIG_RTC_INTF_DEV=m
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-
-#
-# RTC drivers
-#
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_DS1742=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-CONFIG_RTC_DRV_RS5C372=m
-# CONFIG_RTC_DRV_M48T86 is not set
-# CONFIG_RTC_DRV_TEST is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_KERNEL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_DETECT_SOFTLOCKUP=y
-CONFIG_SCHEDSTATS=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_RWSEMS is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_DEBUG_FS=y
-# CONFIG_DEBUG_VM is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_UNWIND_INFO=y
-CONFIG_STACK_UNWIND=y
-# CONFIG_FORCED_INLINING is not set
-# CONFIG_RCU_TORTURE_TEST is not set
-CONFIG_DEBUG_RODATA=y
-# CONFIG_IOMMU_DEBUG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SECLVL is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
-CONFIG_SECURITY_SELINUX_ENABLE_SECMARK_DEFAULT=y
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-# CONFIG_CRYPTO_AES_X86_64 is not set
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config
deleted file mode 100644
index 555489db8a22168422a67c7c24eb0e7f74d5a3a8..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686-bigsmp.config
+++ /dev/null
@@ -1,3324 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.5
-# Wed Feb 20 01:04:06 2008
-#
-CONFIG_X86_32=y
-CONFIG_GENERIC_TIME=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_ZONE_DMA=y
-CONFIG_QUICKLIST=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-# CONFIG_TASK_XACCT is not set
-# CONFIG_UTS_NS is not set
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_CPUSETS=y
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_BLOCK=y
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-# CONFIG_TICK_ONESHOT is not set
-# CONFIG_NO_HZ is not set
-# CONFIG_HIGH_RES_TIMERS is not set
-CONFIG_SMP=y
-# CONFIG_X86_PC is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-# CONFIG_PARAVIRT is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MCORE2 is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-# CONFIG_MVIAC7 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_XADD=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_X86_CMOV=y
-CONFIG_X86_MINIMUM_CPU_MODEL=4
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_NR_CPUS=32
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_NONFATAL=y
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_VM86=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_X86_REBOOTFIXUPS=y
-CONFIG_MICROCODE=m
-CONFIG_MICROCODE_OLD_INTERFACE=y
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_EFI_VARS=y
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_SELECT_MEMORY_MODEL=y
-CONFIG_FLATMEM_MANUAL=y
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-# CONFIG_SPARSEMEM_MANUAL is not set
-CONFIG_FLATMEM=y
-CONFIG_FLAT_NODE_MEM_MAP=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_NR_QUICK=1
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-# CONFIG_IRQBALANCE is not set
-CONFIG_BOOT_IOREMAP=y
-# CONFIG_SECCOMP is not set
-CONFIG_HZ_100=y
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x100000
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_ALIGN=0x100000
-CONFIG_HOTPLUG_CPU=y
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=m
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_P4_CLOCKMOD=m
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-CONFIG_X86_E_POWERSAVER=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCIEAER=y
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_HT_IRQ=y
-CONFIG_ISA_DMA_API=y
-# CONFIG_ISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_K8_NB=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
-CONFIG_NET_KEY=m
-# CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=y
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-CONFIG_TCP_CONG_YEAH=m
-CONFIG_TCP_CONG_ILLINOIS=m
-CONFIG_DEFAULT_BIC=y
-# CONFIG_DEFAULT_CUBIC is not set
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
-# CONFIG_DEFAULT_RENO is not set
-CONFIG_DEFAULT_TCP_CONG="bic"
-# CONFIG_TCP_MD5SIG is not set
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-# CONFIG_IPV6_MIP6 is not set
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_BEET=m
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_IPV6_SIT=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_MULTIPLE_TABLES is not set
-# CONFIG_NETLABEL is not set
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CT_ACCT=y
-CONFIG_NF_CONNTRACK_MARK=y
-# CONFIG_NF_CONNTRACK_SECMARK is not set
-# CONFIG_NF_CONNTRACK_EVENTS is not set
-CONFIG_NF_CT_PROTO_GRE=m
-CONFIG_NF_CT_PROTO_SCTP=m
-CONFIG_NF_CONNTRACK_AMANDA=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_H323=m
-CONFIG_NF_CONNTRACK_IRC=m
-CONFIG_NF_CONNTRACK_NETBIOS_NS=m
-CONFIG_NF_CONNTRACK_PPTP=m
-CONFIG_NF_CONNTRACK_SANE=m
-CONFIG_NF_CONNTRACK_SIP=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_DSCP=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_DSCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_NF_CONNTRACK_IPV4=m
-CONFIG_NF_CONNTRACK_PROC_COMPAT=y
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_NF_NAT=m
-CONFIG_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_NF_NAT_SNMP_BASIC=m
-CONFIG_NF_NAT_PROTO_GRE=m
-CONFIG_NF_NAT_FTP=m
-CONFIG_NF_NAT_IRC=m
-CONFIG_NF_NAT_TFTP=m
-CONFIG_NF_NAT_AMANDA=m
-CONFIG_NF_NAT_PPTP=m
-CONFIG_NF_NAT_H323=m
-CONFIG_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-# CONFIG_IP_DCCP_CCID2_DEBUG is not set
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-# CONFIG_IP_DCCP_CCID3_DEBUG is not set
-CONFIG_IP_DCCP_CCID3_RTO=100
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_NET_DCCPPROBE is not set
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_AF_RXRPC=m
-# CONFIG_AF_RXRPC_DEBUG is not set
-CONFIG_RXKAD=m
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-# CONFIG_MAC80211_LEDS is not set
-# CONFIG_MAC80211_DEBUGFS is not set
-# CONFIG_MAC80211_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_RFKILL=m
-CONFIG_RFKILL_INPUT=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLKDEVS=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-CONFIG_SSFDC=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_ESB2ROM=m
-CONFIG_MTD_CK804XROM=m
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CAFE=m
-CONFIG_MTD_NAND_CS553X=m
-CONFIG_MTD_NAND_NANDSIM=m
-CONFIG_MTD_NAND_PLATFORM=m
-# CONFIG_MTD_ONENAND is not set
-
-#
-# UBI - Unsorted block images
-#
-CONFIG_MTD_UBI=m
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MTD_UBI_BEB_RESERVE=1
-# CONFIG_MTD_UBI_GLUEBI is not set
-
-#
-# UBI debugging options
-#
-# CONFIG_MTD_UBI_DEBUG is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-CONFIG_PARPORT_NOT_PC=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-CONFIG_PHANTOM=m
-CONFIG_SGI_IOC4=m
-CONFIG_TIFM_CORE=m
-CONFIG_TIFM_7XX1=m
-CONFIG_ASUS_LAPTOP=m
-CONFIG_MSI_LAPTOP=m
-CONFIG_SONY_LAPTOP=m
-# CONFIG_SONYPI_COMPAT is not set
-CONFIG_THINKPAD_ACPI=m
-# CONFIG_THINKPAD_ACPI_DEBUG is not set
-CONFIG_THINKPAD_ACPI_BAY=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-CONFIG_IDE_TASK_IOCTL=y
-CONFIG_IDE_PROC_FS=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_IDEPCI_PCIBUS_ORDER=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_JMICRON=m
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8213=m
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_TC86C001=m
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_TGT=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-CONFIG_SCSI_SRP=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-CONFIG_PATA_ARTOP=m
-CONFIG_PATA_ATIIXP=m
-CONFIG_PATA_CMD640_PCI=m
-CONFIG_PATA_CMD64X=m
-CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
-CONFIG_PATA_CS5535=m
-CONFIG_PATA_CYPRESS=m
-CONFIG_PATA_EFAR=m
-CONFIG_ATA_GENERIC=m
-CONFIG_PATA_HPT366=m
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-CONFIG_PATA_HPT3X3=m
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-CONFIG_PATA_TRIFLEX=m
-CONFIG_PATA_MARVELL=m
-CONFIG_PATA_MPIIX=m
-CONFIG_PATA_OLDPIIX=m
-CONFIG_PATA_NETCELL=m
-CONFIG_PATA_NS87410=m
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-CONFIG_PATA_PCMCIA=m
-CONFIG_PATA_PDC_OLD=m
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-CONFIG_PATA_SC1200=m
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_SIL680=m
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_DELAY=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-CONFIG_MACINTOSH_DRIVERS=y
-CONFIG_MAC_EMUMOUSEBTN=y
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-# CONFIG_ARCNET is not set
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_BROADCOM_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_PCNET32_NAPI is not set
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_FORCEDETH_NAPI is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_SC92031=m
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-CONFIG_NETDEV_1000=y
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-CONFIG_ATL1=m
-CONFIG_NETDEV_10000=y
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T1_1G=y
-CONFIG_CHELSIO_T1_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN
-#
-CONFIG_WLAN_PRE80211=y
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-CONFIG_WLAN_80211=y
-# CONFIG_PCMCIA_RAYCS is not set
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_LIBERTAS=m
-CONFIG_LIBERTAS_USB=m
-# CONFIG_LIBERTAS_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET_MII=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_DM9601=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_MCS7830=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-# CONFIG_WAN is not set
-CONFIG_ATM_DRIVERS=y
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLHC=m
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-CONFIG_GIGASET_M101=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_CAPI_TRACE=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_POLLDEV=m
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_KEYBOARD_STOWAWAY=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_APPLETOUCH=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_JOYSTICK_XPAD=m
-# CONFIG_INPUT_TABLET is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_TOUCHSCREEN_PENMOUNT=m
-CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
-CONFIG_TOUCHSCREEN_TOUCHWIN=m
-CONFIG_TOUCHSCREEN_UCB1400=m
-CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
-CONFIG_TOUCHSCREEN_USB_EGALAX=y
-CONFIG_TOUCHSCREEN_USB_PANJIT=y
-CONFIG_TOUCHSCREEN_USB_3M=y
-CONFIG_TOUCHSCREEN_USB_ITM=y
-CONFIG_TOUCHSCREEN_USB_ETURBO=y
-CONFIG_TOUCHSCREEN_USB_GUNZE=y
-CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_ATLAS_BTNS=m
-CONFIG_INPUT_ATI_REMOTE=m
-CONFIG_INPUT_ATI_REMOTE2=m
-CONFIG_INPUT_KEYSPAN_REMOTE=m
-CONFIG_INPUT_POWERMATE=m
-CONFIG_INPUT_YEALINK=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-CONFIG_MOXA_SMARTIO_NEW=m
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_ITCO_WDT=m
-# CONFIG_ITCO_VENDOR_SUPPORT is not set
-# CONFIG_SC1200_WDT is not set
-CONFIG_PC87413_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_SMSC37B787_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83697HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
-CONFIG_HW_RANDOM_VIA=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-CONFIG_DEVPORT=y
-CONFIG_I2C=m
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_I2C_SIMTEC=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_TINY_USB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_AD7418=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1029=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_CORETEMP=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_MAX6650=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83793=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-CONFIG_SENSORS_APPLESMC=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Multifunction device drivers
-#
-CONFIG_MFD_SM501=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_CAPTURE_DRIVERS=y
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
-CONFIG_VIDEO_TVAUDIO=m
-CONFIG_VIDEO_TDA7432=m
-CONFIG_VIDEO_TDA9875=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_OV7670=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_TVP5150=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BT848_DVB is not set
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_IVTV=m
-CONFIG_VIDEO_CAFE_CCIC=m
-CONFIG_V4L_USB_DRIVERS=y
-CONFIG_VIDEO_PVRUSB2=m
-# CONFIG_VIDEO_PVRUSB2_29XXX is not set
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVISION=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-CONFIG_USB_ZR364XX=m
-CONFIG_RADIO_ADAPTERS=y
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-CONFIG_DVB_CORE=m
-# CONFIG_DVB_CORE_ATTACH is not set
-CONFIG_DVB_CAPTURE_DRIVERS=y
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_DIB0700=m
-CONFIG_DVB_USB_UMT_010=m
-CONFIG_DVB_USB_CXUSB=m
-CONFIG_DVB_USB_M920X=m
-CONFIG_DVB_USB_GL861=m
-CONFIG_DVB_USB_AU6610=m
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_GP8PSK=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_TTUSB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_USB_OPERA1=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-CONFIG_DVB_PLUTO2=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-# CONFIG_DVB_FE_CUSTOMISE is not set
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-CONFIG_DVB_TDA10086=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_ZL10353=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-CONFIG_DVB_DIB7000M=m
-CONFIG_DVB_DIB7000P=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_TDA10023=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-
-#
-# Tuners/PLL support
-#
-CONFIG_DVB_PLL=m
-CONFIG_DVB_TDA826X=m
-CONFIG_DVB_TDA827X=m
-CONFIG_DVB_TUNER_QT1010=m
-CONFIG_DVB_TUNER_MT2060=m
-
-#
-# Miscellaneous devices
-#
-CONFIG_DVB_LNBP21=m
-CONFIG_DVB_ISL6421=m
-CONFIG_DVB_TUA6100=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_DAB=y
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_PROGEAR=m
-CONFIG_BACKLIGHT_CARILLO_RANCH=m
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=m
-
-#
-# Display hardware drivers
-#
-CONFIG_VGASTATE=m
-CONFIG_FB=y
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB_DDC=m
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-CONFIG_FB_SYS_FILLRECT=m
-CONFIG_FB_SYS_COPYAREA=m
-CONFIG_FB_SYS_IMAGEBLIT=m
-CONFIG_FB_SYS_FOPS=m
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SVGALIB=m
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_BACKLIGHT=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-
-#
-# Frame buffer hardware drivers
-#
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-# CONFIG_FB_IMAC is not set
-CONFIG_FB_HECUBA=m
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-# CONFIG_FB_NVIDIA_DEBUG is not set
-CONFIG_FB_NVIDIA_BACKLIGHT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_RIVA_BACKLIGHT=y
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_LE80578=m
-CONFIG_FB_CARILLO_RANCH=m
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_INTEL_I2C=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_S3=m
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_VT8623=m
-CONFIG_FB_CYBLA=m
-# CONFIG_FB_TRIDENT is not set
-CONFIG_FB_ARK=m
-CONFIG_FB_PM3=m
-# CONFIG_FB_GEODE is not set
-CONFIG_FB_SM501=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_MTS64=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-CONFIG_SND_PORTMAN2X4=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-CONFIG_SND_USB_CAIAQ=m
-# CONFIG_SND_USB_CAIAQ_INPUT is not set
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# System on Chip audio support
-#
-CONFIG_SND_SOC=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# HID Devices
-#
-CONFIG_HID=y
-# CONFIG_HID_DEBUG is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT_POWERBOOK=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-# CONFIG_PANTHERLORD_FF is not set
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-CONFIG_USB_DEVICE_CLASS=y
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_U132_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRCABLE=m
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_MOS7720=m
-CONFIG_USB_SERIAL_MOS7840=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-# CONFIG_USB_SERIAL_DEBUG is not set
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_ADUTUX=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGET=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETMOTORCONTROL=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_FTDI_ELAN=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TRANCEVIBRATOR=m
-CONFIG_USB_IOWARRIOR=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-
-#
-# MMC/SD Card Drivers
-#
-CONFIG_MMC_BLOCK=m
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-CONFIG_MMC_TIFM_SD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_USER_MEM=y
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_MAX6900=m
-CONFIG_RTC_DRV_RS5C372=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-
-#
-# SPI RTC drivers
-#
-
-#
-# Platform RTC drivers
-#
-CONFIG_RTC_DRV_CMOS=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_DS1742=m
-# CONFIG_RTC_DRV_M48T86 is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# on-CPU RTC drivers
-#
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Auxiliary Display support
-#
-CONFIG_KS0108=m
-CONFIG_KS0108_PORT=0x378
-CONFIG_KS0108_DELAY=2
-CONFIG_CFAG12864B=m
-CONFIG_CFAG12864B_RATE=20
-
-#
-# Virtualization
-#
-CONFIG_KVM=m
-CONFIG_KVM_INTEL=m
-CONFIG_KVM_AMD=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4DEV_FS=m
-CONFIG_EXT4DEV_FS_XATTR=y
-CONFIG_EXT4DEV_FS_POSIX_ACL=y
-CONFIG_EXT4DEV_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_JBD2=m
-# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=850
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_ECRYPT_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-CONFIG_DEBUG_SPINLOCK=y
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_LKDTM is not set
-# CONFIG_FAULT_INJECTION is not set
-CONFIG_EARLY_PRINTK=y
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-CONFIG_DOUBLEFAULT=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SELINUX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_TWOFISH_586=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=m
-CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
-CONFIG_CRYPTO_DEV_GEODE=m
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_GENERIC_PENDING_IRQ=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config
deleted file mode 100644
index cc945369a66ef691e4d329569d42585a5cde4b13..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-i686.config
+++ /dev/null
@@ -1,3313 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.5
-# Wed Feb 20 01:06:07 2008
-#
-CONFIG_X86_32=y
-CONFIG_GENERIC_TIME=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_ZONE_DMA=y
-CONFIG_QUICKLIST=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_DMI=y
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-# CONFIG_TASK_XACCT is not set
-# CONFIG_UTS_NS is not set
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=14
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_BLOCK=y
-CONFIG_LBD=y
-CONFIG_BLK_DEV_IO_TRACE=y
-CONFIG_LSF=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-# CONFIG_TICK_ONESHOT is not set
-# CONFIG_NO_HZ is not set
-# CONFIG_HIGH_RES_TIMERS is not set
-# CONFIG_SMP is not set
-CONFIG_X86_PC=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_PARAVIRT is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MCORE2 is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MEFFICEON is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MGEODEGX1 is not set
-# CONFIG_MGEODE_LX is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-# CONFIG_MVIAC7 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_XADD=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_X86_TSC=y
-CONFIG_X86_CMOV=y
-CONFIG_X86_MINIMUM_CPU_MODEL=4
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_X86_UP_APIC is not set
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_NONFATAL=y
-CONFIG_VM86=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_X86_REBOOTFIXUPS=y
-CONFIG_MICROCODE=m
-CONFIG_MICROCODE_OLD_INTERFACE=y
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_EFI_VARS=y
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_HIGHMEM=y
-CONFIG_NEED_NODE_MEMMAP_SIZE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-CONFIG_SPARSEMEM_STATIC=y
-
-#
-# Memory hotplug is currently incompatible with Software Suspend
-#
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_NR_QUICK=1
-# CONFIG_HIGHPTE is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-CONFIG_BOOT_IOREMAP=y
-# CONFIG_SECCOMP is not set
-CONFIG_HZ_100=y
-# CONFIG_HZ_250 is not set
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=100
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-CONFIG_PHYSICAL_START=0x100000
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_ALIGN=0x100000
-# CONFIG_COMPAT_VDSO is not set
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=m
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_POWERNOW_K6 is not set
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=y
-CONFIG_X86_P4_CLOCKMOD=m
-# CONFIG_X86_CPUFREQ_NFORCE2 is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-CONFIG_X86_E_POWERSAVER=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCIEAER=y
-# CONFIG_ARCH_SUPPORTS_MSI is not set
-# CONFIG_PCI_DEBUG is not set
-CONFIG_ISA_DMA_API=y
-# CONFIG_ISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_K8_NB=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
-CONFIG_NET_KEY=m
-# CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=y
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-CONFIG_TCP_CONG_YEAH=m
-CONFIG_TCP_CONG_ILLINOIS=m
-CONFIG_DEFAULT_BIC=y
-# CONFIG_DEFAULT_CUBIC is not set
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
-# CONFIG_DEFAULT_RENO is not set
-CONFIG_DEFAULT_TCP_CONG="bic"
-# CONFIG_TCP_MD5SIG is not set
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-# CONFIG_IPV6_MIP6 is not set
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_BEET=m
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_IPV6_SIT=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_MULTIPLE_TABLES is not set
-# CONFIG_NETLABEL is not set
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CT_ACCT=y
-CONFIG_NF_CONNTRACK_MARK=y
-# CONFIG_NF_CONNTRACK_SECMARK is not set
-# CONFIG_NF_CONNTRACK_EVENTS is not set
-CONFIG_NF_CT_PROTO_GRE=m
-CONFIG_NF_CT_PROTO_SCTP=m
-CONFIG_NF_CONNTRACK_AMANDA=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_H323=m
-CONFIG_NF_CONNTRACK_IRC=m
-CONFIG_NF_CONNTRACK_NETBIOS_NS=m
-CONFIG_NF_CONNTRACK_PPTP=m
-CONFIG_NF_CONNTRACK_SANE=m
-CONFIG_NF_CONNTRACK_SIP=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_DSCP=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_DSCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_NF_CONNTRACK_IPV4=m
-CONFIG_NF_CONNTRACK_PROC_COMPAT=y
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_NF_NAT=m
-CONFIG_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_NF_NAT_SNMP_BASIC=m
-CONFIG_NF_NAT_PROTO_GRE=m
-CONFIG_NF_NAT_FTP=m
-CONFIG_NF_NAT_IRC=m
-CONFIG_NF_NAT_TFTP=m
-CONFIG_NF_NAT_AMANDA=m
-CONFIG_NF_NAT_PPTP=m
-CONFIG_NF_NAT_H323=m
-CONFIG_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-# CONFIG_IP_DCCP_CCID2_DEBUG is not set
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-# CONFIG_IP_DCCP_CCID3_DEBUG is not set
-CONFIG_IP_DCCP_CCID3_RTO=100
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_NET_DCCPPROBE is not set
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_AF_RXRPC=m
-# CONFIG_AF_RXRPC_DEBUG is not set
-CONFIG_RXKAD=m
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-# CONFIG_MAC80211_LEDS is not set
-# CONFIG_MAC80211_DEBUGFS is not set
-# CONFIG_MAC80211_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_RFKILL=m
-CONFIG_RFKILL_INPUT=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLKDEVS=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-CONFIG_SSFDC=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_ESB2ROM=m
-CONFIG_MTD_CK804XROM=m
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CAFE=m
-CONFIG_MTD_NAND_CS553X=m
-CONFIG_MTD_NAND_NANDSIM=m
-CONFIG_MTD_NAND_PLATFORM=m
-# CONFIG_MTD_ONENAND is not set
-
-#
-# UBI - Unsorted block images
-#
-CONFIG_MTD_UBI=m
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MTD_UBI_BEB_RESERVE=1
-# CONFIG_MTD_UBI_GLUEBI is not set
-
-#
-# UBI debugging options
-#
-# CONFIG_MTD_UBI_DEBUG is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-CONFIG_PARPORT_NOT_PC=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-CONFIG_PHANTOM=m
-CONFIG_SGI_IOC4=m
-CONFIG_TIFM_CORE=m
-CONFIG_TIFM_7XX1=m
-CONFIG_ASUS_LAPTOP=m
-CONFIG_MSI_LAPTOP=m
-CONFIG_SONY_LAPTOP=m
-# CONFIG_SONYPI_COMPAT is not set
-CONFIG_THINKPAD_ACPI=m
-# CONFIG_THINKPAD_ACPI_DEBUG is not set
-CONFIG_THINKPAD_ACPI_BAY=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-CONFIG_IDE_TASK_IOCTL=y
-CONFIG_IDE_PROC_FS=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_IDEPCI_PCIBUS_ORDER=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-# CONFIG_BLK_DEV_CY82C693 is not set
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_CS5535=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_JMICRON=m
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8213=m
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_TC86C001=m
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_TGT=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-CONFIG_SCSI_SRP=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-CONFIG_PATA_ARTOP=m
-CONFIG_PATA_ATIIXP=m
-CONFIG_PATA_CMD640_PCI=m
-CONFIG_PATA_CMD64X=m
-CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
-CONFIG_PATA_CS5535=m
-CONFIG_PATA_CYPRESS=m
-CONFIG_PATA_EFAR=m
-CONFIG_ATA_GENERIC=m
-CONFIG_PATA_HPT366=m
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-CONFIG_PATA_HPT3X3=m
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-CONFIG_PATA_TRIFLEX=m
-CONFIG_PATA_MARVELL=m
-CONFIG_PATA_MPIIX=m
-CONFIG_PATA_OLDPIIX=m
-CONFIG_PATA_NETCELL=m
-CONFIG_PATA_NS87410=m
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-CONFIG_PATA_PCMCIA=m
-CONFIG_PATA_PDC_OLD=m
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-CONFIG_PATA_SC1200=m
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_SIL680=m
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_DELAY=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-CONFIG_MACINTOSH_DRIVERS=y
-CONFIG_MAC_EMUMOUSEBTN=y
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-# CONFIG_ARCNET is not set
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_BROADCOM_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_PCNET32_NAPI is not set
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_FORCEDETH_NAPI is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_SC92031=m
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-CONFIG_NETDEV_1000=y
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-CONFIG_ATL1=m
-CONFIG_NETDEV_10000=y
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T1_1G=y
-CONFIG_CHELSIO_T1_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN
-#
-CONFIG_WLAN_PRE80211=y
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-CONFIG_WLAN_80211=y
-# CONFIG_PCMCIA_RAYCS is not set
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-CONFIG_IPW2200_RADIOTAP=y
-CONFIG_IPW2200_PROMISCUOUS=y
-CONFIG_IPW2200_QOS=y
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_LIBERTAS=m
-CONFIG_LIBERTAS_USB=m
-# CONFIG_LIBERTAS_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET_MII=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_DM9601=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_MCS7830=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-# CONFIG_WAN is not set
-CONFIG_ATM_DRIVERS=y
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLHC=m
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-CONFIG_GIGASET_M101=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_CAPI_TRACE=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_POLLDEV=m
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_KEYBOARD_STOWAWAY=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_APPLETOUCH=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_JOYSTICK_XPAD=m
-# CONFIG_INPUT_TABLET is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_TOUCHSCREEN_PENMOUNT=m
-CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
-CONFIG_TOUCHSCREEN_TOUCHWIN=m
-CONFIG_TOUCHSCREEN_UCB1400=m
-CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
-CONFIG_TOUCHSCREEN_USB_EGALAX=y
-CONFIG_TOUCHSCREEN_USB_PANJIT=y
-CONFIG_TOUCHSCREEN_USB_3M=y
-CONFIG_TOUCHSCREEN_USB_ITM=y
-CONFIG_TOUCHSCREEN_USB_ETURBO=y
-CONFIG_TOUCHSCREEN_USB_GUNZE=y
-CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_WISTRON_BTNS=m
-CONFIG_INPUT_ATLAS_BTNS=m
-CONFIG_INPUT_ATI_REMOTE=m
-CONFIG_INPUT_ATI_REMOTE2=m
-CONFIG_INPUT_KEYSPAN_REMOTE=m
-CONFIG_INPUT_POWERMATE=m
-CONFIG_INPUT_YEALINK=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-CONFIG_MOXA_SMARTIO_NEW=m
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_ITCO_WDT=m
-# CONFIG_ITCO_VENDOR_SUPPORT is not set
-# CONFIG_SC1200_WDT is not set
-CONFIG_PC87413_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_SMSC37B787_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83697HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-CONFIG_HW_RANDOM_GEODE=m
-CONFIG_HW_RANDOM_VIA=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_CS5535_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-CONFIG_DEVPORT=y
-CONFIG_I2C=m
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_I2C_SIMTEC=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_TINY_USB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_AD7418=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1029=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_CORETEMP=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_MAX6650=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83793=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-CONFIG_SENSORS_APPLESMC=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Multifunction device drivers
-#
-CONFIG_MFD_SM501=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_CAPTURE_DRIVERS=y
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
-CONFIG_VIDEO_TVAUDIO=m
-CONFIG_VIDEO_TDA7432=m
-CONFIG_VIDEO_TDA9875=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_OV7670=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_TVP5150=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BT848_DVB is not set
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_IVTV=m
-CONFIG_VIDEO_CAFE_CCIC=m
-CONFIG_V4L_USB_DRIVERS=y
-CONFIG_VIDEO_PVRUSB2=m
-# CONFIG_VIDEO_PVRUSB2_29XXX is not set
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVISION=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-CONFIG_USB_ZR364XX=m
-CONFIG_RADIO_ADAPTERS=y
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-CONFIG_DVB_CORE=m
-# CONFIG_DVB_CORE_ATTACH is not set
-CONFIG_DVB_CAPTURE_DRIVERS=y
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_DIB0700=m
-CONFIG_DVB_USB_UMT_010=m
-CONFIG_DVB_USB_CXUSB=m
-CONFIG_DVB_USB_M920X=m
-CONFIG_DVB_USB_GL861=m
-CONFIG_DVB_USB_AU6610=m
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_GP8PSK=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_TTUSB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_USB_OPERA1=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-CONFIG_DVB_PLUTO2=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-# CONFIG_DVB_FE_CUSTOMISE is not set
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-CONFIG_DVB_TDA10086=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_ZL10353=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-CONFIG_DVB_DIB7000M=m
-CONFIG_DVB_DIB7000P=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_TDA10023=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-
-#
-# Tuners/PLL support
-#
-CONFIG_DVB_PLL=m
-CONFIG_DVB_TDA826X=m
-CONFIG_DVB_TDA827X=m
-CONFIG_DVB_TUNER_QT1010=m
-CONFIG_DVB_TUNER_MT2060=m
-
-#
-# Miscellaneous devices
-#
-CONFIG_DVB_LNBP21=m
-CONFIG_DVB_ISL6421=m
-CONFIG_DVB_TUA6100=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_DAB=y
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_PROGEAR=m
-CONFIG_BACKLIGHT_CARILLO_RANCH=m
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=m
-
-#
-# Display hardware drivers
-#
-CONFIG_VGASTATE=m
-CONFIG_FB=y
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB_DDC=m
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-CONFIG_FB_SYS_FILLRECT=m
-CONFIG_FB_SYS_COPYAREA=m
-CONFIG_FB_SYS_IMAGEBLIT=m
-CONFIG_FB_SYS_FOPS=m
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SVGALIB=m
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_BACKLIGHT=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-
-#
-# Frame buffer hardware drivers
-#
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-# CONFIG_FB_IMAC is not set
-CONFIG_FB_HECUBA=m
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-# CONFIG_FB_NVIDIA_DEBUG is not set
-CONFIG_FB_NVIDIA_BACKLIGHT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_RIVA_BACKLIGHT=y
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_I810_I2C=y
-CONFIG_FB_LE80578=m
-CONFIG_FB_CARILLO_RANCH=m
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_INTEL_I2C=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_S3=m
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_VT8623=m
-CONFIG_FB_CYBLA=m
-# CONFIG_FB_TRIDENT is not set
-CONFIG_FB_ARK=m
-CONFIG_FB_PM3=m
-# CONFIG_FB_GEODE is not set
-CONFIG_FB_SM501=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=64
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_MTS64=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-CONFIG_SND_PORTMAN2X4=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS5535AUDIO=m
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-CONFIG_SND_USB_CAIAQ=m
-# CONFIG_SND_USB_CAIAQ_INPUT is not set
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# System on Chip audio support
-#
-CONFIG_SND_SOC=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# HID Devices
-#
-CONFIG_HID=y
-# CONFIG_HID_DEBUG is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT_POWERBOOK=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-# CONFIG_PANTHERLORD_FF is not set
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-CONFIG_USB_DEVICE_CLASS=y
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_U132_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRCABLE=m
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_MOS7720=m
-CONFIG_USB_SERIAL_MOS7840=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-# CONFIG_USB_SERIAL_DEBUG is not set
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_ADUTUX=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGET=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETMOTORCONTROL=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_FTDI_ELAN=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TRANCEVIBRATOR=m
-CONFIG_USB_IOWARRIOR=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-
-#
-# MMC/SD Card Drivers
-#
-CONFIG_MMC_BLOCK=m
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-CONFIG_MMC_TIFM_SD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_USER_MEM=y
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_MAX6900=m
-CONFIG_RTC_DRV_RS5C372=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-
-#
-# SPI RTC drivers
-#
-
-#
-# Platform RTC drivers
-#
-CONFIG_RTC_DRV_CMOS=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_DS1742=m
-# CONFIG_RTC_DRV_M48T86 is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# on-CPU RTC drivers
-#
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Auxiliary Display support
-#
-CONFIG_KS0108=m
-CONFIG_KS0108_PORT=0x378
-CONFIG_KS0108_DELAY=2
-CONFIG_CFAG12864B=m
-CONFIG_CFAG12864B_RATE=20
-
-#
-# Virtualization
-#
-CONFIG_KVM=m
-CONFIG_KVM_INTEL=m
-CONFIG_KVM_AMD=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4DEV_FS=m
-CONFIG_EXT4DEV_FS_XATTR=y
-CONFIG_EXT4DEV_FS_POSIX_ACL=y
-CONFIG_EXT4DEV_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_JBD2=m
-# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=850
-CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_ECRYPT_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-CONFIG_DEBUG_SPINLOCK=y
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_LKDTM is not set
-# CONFIG_FAULT_INJECTION is not set
-CONFIG_EARLY_PRINTK=y
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Page alloc debug is incompatible with Software Suspend on i386
-#
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_4KSTACKS is not set
-CONFIG_DOUBLEFAULT=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SELINUX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_TWOFISH_586=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-CONFIG_CRYPTO_DEV_PADLOCK=m
-CONFIG_CRYPTO_DEV_PADLOCK_AES=m
-CONFIG_CRYPTO_DEV_PADLOCK_SHA=m
-CONFIG_CRYPTO_DEV_GEODE=m
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_AUDIT_GENERIC=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_KTIME_SCALAR=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config
deleted file mode 100644
index 63f31dc3fae92527298b7fa46b80a45326cbae84..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64-smp.config
+++ /dev/null
@@ -1,3192 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.5
-# Tue Feb 19 23:02:41 2008
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_GENERIC_TIME=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_ZONE_DMA32=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_ZONE_DMA=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_GENERIC_BUG=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_LOCK_KERNEL=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-# CONFIG_TASK_XACCT is not set
-# CONFIG_UTS_NS is not set
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_CPUSETS=y
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Block layer
-#
-CONFIG_BLOCK=y
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-# CONFIG_MCORE2 is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_MICROCODE_OLD_INTERFACE=y
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_BKL=y
-CONFIG_NUMA=y
-CONFIG_K8_NUMA=y
-CONFIG_NODES_SHIFT=6
-CONFIG_X86_64_ACPI_NUMA=y
-# CONFIG_NUMA_EMU is not set
-CONFIG_ARCH_DISCONTIGMEM_ENABLE=y
-CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_NEED_MULTIPLE_NODES=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-
-#
-# Memory hotplug is currently incompatible with Software Suspend
-#
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_MIGRATION=y
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y
-CONFIG_NR_CPUS=32
-CONFIG_HOTPLUG_CPU=y
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_START=0x200000
-# CONFIG_SECCOMP is not set
-# CONFIG_CC_STACKPROTECTOR is not set
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_K8_NB=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-CONFIG_GENERIC_PENDING_IRQ=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-CONFIG_SUSPEND_SMP=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=m
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_HOTPLUG_CPU=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCIEAER=y
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_HT_IRQ=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
-CONFIG_NET_KEY=m
-# CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=y
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-CONFIG_TCP_CONG_YEAH=m
-CONFIG_TCP_CONG_ILLINOIS=m
-CONFIG_DEFAULT_BIC=y
-# CONFIG_DEFAULT_CUBIC is not set
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
-# CONFIG_DEFAULT_RENO is not set
-CONFIG_DEFAULT_TCP_CONG="bic"
-# CONFIG_TCP_MD5SIG is not set
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-# CONFIG_IPV6_MIP6 is not set
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_BEET=m
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_IPV6_SIT=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_MULTIPLE_TABLES is not set
-# CONFIG_NETLABEL is not set
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CT_ACCT=y
-CONFIG_NF_CONNTRACK_MARK=y
-# CONFIG_NF_CONNTRACK_SECMARK is not set
-# CONFIG_NF_CONNTRACK_EVENTS is not set
-CONFIG_NF_CT_PROTO_GRE=m
-CONFIG_NF_CT_PROTO_SCTP=m
-CONFIG_NF_CONNTRACK_AMANDA=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_H323=m
-CONFIG_NF_CONNTRACK_IRC=m
-CONFIG_NF_CONNTRACK_NETBIOS_NS=m
-CONFIG_NF_CONNTRACK_PPTP=m
-CONFIG_NF_CONNTRACK_SANE=m
-CONFIG_NF_CONNTRACK_SIP=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_DSCP=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_DSCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_NF_CONNTRACK_IPV4=m
-CONFIG_NF_CONNTRACK_PROC_COMPAT=y
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_NF_NAT=m
-CONFIG_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_NF_NAT_SNMP_BASIC=m
-CONFIG_NF_NAT_PROTO_GRE=m
-CONFIG_NF_NAT_FTP=m
-CONFIG_NF_NAT_IRC=m
-CONFIG_NF_NAT_TFTP=m
-CONFIG_NF_NAT_AMANDA=m
-CONFIG_NF_NAT_PPTP=m
-CONFIG_NF_NAT_H323=m
-CONFIG_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-# CONFIG_IP_DCCP_CCID2_DEBUG is not set
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-# CONFIG_IP_DCCP_CCID3_DEBUG is not set
-CONFIG_IP_DCCP_CCID3_RTO=100
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_NET_DCCPPROBE is not set
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_AF_RXRPC=m
-# CONFIG_AF_RXRPC_DEBUG is not set
-CONFIG_RXKAD=m
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-# CONFIG_MAC80211_LEDS is not set
-# CONFIG_MAC80211_DEBUGFS is not set
-# CONFIG_MAC80211_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_RFKILL=m
-CONFIG_RFKILL_INPUT=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLKDEVS=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-CONFIG_SSFDC=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_ESB2ROM=m
-CONFIG_MTD_CK804XROM=m
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CAFE=m
-CONFIG_MTD_NAND_NANDSIM=m
-CONFIG_MTD_NAND_PLATFORM=m
-# CONFIG_MTD_ONENAND is not set
-
-#
-# UBI - Unsorted block images
-#
-CONFIG_MTD_UBI=m
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MTD_UBI_BEB_RESERVE=1
-# CONFIG_MTD_UBI_GLUEBI is not set
-
-#
-# UBI debugging options
-#
-# CONFIG_MTD_UBI_DEBUG is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-CONFIG_PARPORT_NOT_PC=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-CONFIG_PHANTOM=m
-CONFIG_SGI_IOC4=m
-CONFIG_TIFM_CORE=m
-CONFIG_TIFM_7XX1=m
-CONFIG_ASUS_LAPTOP=m
-CONFIG_MSI_LAPTOP=m
-CONFIG_SONY_LAPTOP=m
-# CONFIG_SONYPI_COMPAT is not set
-CONFIG_THINKPAD_ACPI=m
-# CONFIG_THINKPAD_ACPI_DEBUG is not set
-CONFIG_THINKPAD_ACPI_BAY=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-CONFIG_IDE_TASK_IOCTL=y
-CONFIG_IDE_PROC_FS=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_IDEPCI_PCIBUS_ORDER=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_JMICRON=m
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8213=m
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_TC86C001=m
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_TGT=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=4000
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-CONFIG_SCSI_SRP=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-CONFIG_PATA_ARTOP=m
-CONFIG_PATA_ATIIXP=m
-CONFIG_PATA_CMD640_PCI=m
-CONFIG_PATA_CMD64X=m
-CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
-CONFIG_PATA_CYPRESS=m
-CONFIG_PATA_EFAR=m
-CONFIG_ATA_GENERIC=m
-CONFIG_PATA_HPT366=m
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-CONFIG_PATA_HPT3X3=m
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-CONFIG_PATA_TRIFLEX=m
-CONFIG_PATA_MARVELL=m
-CONFIG_PATA_MPIIX=m
-CONFIG_PATA_OLDPIIX=m
-CONFIG_PATA_NETCELL=m
-CONFIG_PATA_NS87410=m
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-CONFIG_PATA_PCMCIA=m
-CONFIG_PATA_PDC_OLD=m
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-CONFIG_PATA_SC1200=m
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_SIL680=m
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_DELAY=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-CONFIG_MACINTOSH_DRIVERS=y
-CONFIG_MAC_EMUMOUSEBTN=y
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-# CONFIG_ARCNET is not set
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_BROADCOM_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_PCNET32_NAPI is not set
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_FORCEDETH_NAPI is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_SC92031=m
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-CONFIG_NETDEV_1000=y
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-CONFIG_ATL1=m
-CONFIG_NETDEV_10000=y
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T1_1G=y
-CONFIG_CHELSIO_T1_NAPI=y
-# CONFIG_CHELSIO_T3 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN
-#
-CONFIG_WLAN_PRE80211=y
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-CONFIG_WLAN_80211=y
-CONFIG_PCMCIA_RAYCS=m
-CONFIG_IPW2100=m
-# CONFIG_IPW2100_MONITOR is not set
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-# CONFIG_IPW2200_MONITOR is not set
-# CONFIG_IPW2200_QOS is not set
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_LIBERTAS=m
-CONFIG_LIBERTAS_USB=m
-# CONFIG_LIBERTAS_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET_MII=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_DM9601=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_MCS7830=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-# CONFIG_WAN is not set
-CONFIG_ATM_DRIVERS=y
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLHC=m
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-CONFIG_GIGASET_M101=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_CAPI_TRACE=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_POLLDEV=m
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_KEYBOARD_STOWAWAY=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_APPLETOUCH=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_JOYSTICK_XPAD=m
-# CONFIG_INPUT_TABLET is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_TOUCHSCREEN_PENMOUNT=m
-CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
-CONFIG_TOUCHSCREEN_TOUCHWIN=m
-CONFIG_TOUCHSCREEN_UCB1400=m
-CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
-CONFIG_TOUCHSCREEN_USB_EGALAX=y
-CONFIG_TOUCHSCREEN_USB_PANJIT=y
-CONFIG_TOUCHSCREEN_USB_3M=y
-CONFIG_TOUCHSCREEN_USB_ITM=y
-CONFIG_TOUCHSCREEN_USB_ETURBO=y
-CONFIG_TOUCHSCREEN_USB_GUNZE=y
-CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_ATLAS_BTNS=m
-CONFIG_INPUT_ATI_REMOTE=m
-CONFIG_INPUT_ATI_REMOTE2=m
-CONFIG_INPUT_KEYSPAN_REMOTE=m
-CONFIG_INPUT_POWERMATE=m
-CONFIG_INPUT_YEALINK=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-CONFIG_MOXA_SMARTIO_NEW=m
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_ITCO_WDT=m
-# CONFIG_ITCO_VENDOR_SUPPORT is not set
-# CONFIG_SC1200_WDT is not set
-CONFIG_PC87413_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_SMSC37B787_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83697HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-# CONFIG_HW_RANDOM_GEODE is not set
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=256
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-CONFIG_DEVPORT=y
-CONFIG_I2C=m
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_I2C_SIMTEC=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_TINY_USB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_AD7418=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1029=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_CORETEMP=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_MAX6650=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83793=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-CONFIG_SENSORS_APPLESMC=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Multifunction device drivers
-#
-CONFIG_MFD_SM501=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_CAPTURE_DRIVERS=y
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
-CONFIG_VIDEO_TVAUDIO=m
-CONFIG_VIDEO_TDA7432=m
-CONFIG_VIDEO_TDA9875=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_OV7670=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_TVP5150=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BT848_DVB is not set
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-CONFIG_VIDEO_MEYE=m
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_IVTV=m
-CONFIG_VIDEO_CAFE_CCIC=m
-CONFIG_V4L_USB_DRIVERS=y
-CONFIG_VIDEO_PVRUSB2=m
-# CONFIG_VIDEO_PVRUSB2_29XXX is not set
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVISION=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-CONFIG_USB_ZR364XX=m
-CONFIG_RADIO_ADAPTERS=y
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-CONFIG_DVB_CORE=m
-# CONFIG_DVB_CORE_ATTACH is not set
-CONFIG_DVB_CAPTURE_DRIVERS=y
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_DIB0700=m
-CONFIG_DVB_USB_UMT_010=m
-CONFIG_DVB_USB_CXUSB=m
-CONFIG_DVB_USB_M920X=m
-CONFIG_DVB_USB_GL861=m
-CONFIG_DVB_USB_AU6610=m
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_GP8PSK=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_TTUSB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_USB_OPERA1=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-CONFIG_DVB_PLUTO2=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-# CONFIG_DVB_FE_CUSTOMISE is not set
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-CONFIG_DVB_TDA10086=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_ZL10353=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-CONFIG_DVB_DIB7000M=m
-CONFIG_DVB_DIB7000P=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_TDA10023=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-
-#
-# Tuners/PLL support
-#
-CONFIG_DVB_PLL=m
-CONFIG_DVB_TDA826X=m
-CONFIG_DVB_TDA827X=m
-CONFIG_DVB_TUNER_QT1010=m
-CONFIG_DVB_TUNER_MT2060=m
-
-#
-# Miscellaneous devices
-#
-CONFIG_DVB_LNBP21=m
-CONFIG_DVB_ISL6421=m
-CONFIG_DVB_TUA6100=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_DAB=y
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_PROGEAR=m
-CONFIG_BACKLIGHT_CARILLO_RANCH=m
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=m
-
-#
-# Display hardware drivers
-#
-CONFIG_VGASTATE=m
-CONFIG_FB=y
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB_DDC=m
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-CONFIG_FB_SYS_FILLRECT=m
-CONFIG_FB_SYS_COPYAREA=m
-CONFIG_FB_SYS_IMAGEBLIT=m
-CONFIG_FB_SYS_FOPS=m
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SVGALIB=m
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_BACKLIGHT=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-
-#
-# Frame buffer hardware drivers
-#
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-CONFIG_FB_HECUBA=m
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-# CONFIG_FB_NVIDIA_DEBUG is not set
-CONFIG_FB_NVIDIA_BACKLIGHT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_RIVA_BACKLIGHT=y
-CONFIG_FB_LE80578=m
-CONFIG_FB_CARILLO_RANCH=m
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_INTEL_I2C=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_S3=m
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_VT8623=m
-# CONFIG_FB_TRIDENT is not set
-CONFIG_FB_ARK=m
-CONFIG_FB_PM3=m
-# CONFIG_FB_GEODE is not set
-CONFIG_FB_SM501=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_MTS64=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-CONFIG_SND_PORTMAN2X4=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-CONFIG_SND_USB_CAIAQ=m
-# CONFIG_SND_USB_CAIAQ_INPUT is not set
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# System on Chip audio support
-#
-CONFIG_SND_SOC=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# HID Devices
-#
-CONFIG_HID=y
-# CONFIG_HID_DEBUG is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-# CONFIG_PANTHERLORD_FF is not set
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-CONFIG_USB_DEVICE_CLASS=y
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_U132_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRCABLE=m
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_MOS7720=m
-CONFIG_USB_SERIAL_MOS7840=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-# CONFIG_USB_SERIAL_DEBUG is not set
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_ADUTUX=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGET=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETMOTORCONTROL=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_FTDI_ELAN=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TRANCEVIBRATOR=m
-CONFIG_USB_IOWARRIOR=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-
-#
-# MMC/SD Card Drivers
-#
-CONFIG_MMC_BLOCK=m
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-CONFIG_MMC_TIFM_SD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_USER_MEM=y
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_MAX6900=m
-CONFIG_RTC_DRV_RS5C372=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-
-#
-# SPI RTC drivers
-#
-
-#
-# Platform RTC drivers
-#
-CONFIG_RTC_DRV_CMOS=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_DS1742=m
-# CONFIG_RTC_DRV_M48T86 is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# on-CPU RTC drivers
-#
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Auxiliary Display support
-#
-CONFIG_KS0108=m
-CONFIG_KS0108_PORT=0x378
-CONFIG_KS0108_DELAY=2
-CONFIG_CFAG12864B=m
-CONFIG_CFAG12864B_RATE=20
-
-#
-# Virtualization
-#
-CONFIG_KVM=m
-CONFIG_KVM_INTEL=m
-CONFIG_KVM_AMD=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4DEV_FS=m
-CONFIG_EXT4DEV_FS_XATTR=y
-CONFIG_EXT4DEV_FS_POSIX_ACL=y
-CONFIG_EXT4DEV_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_JBD2=m
-# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_ECRYPT_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-CONFIG_DEBUG_SPINLOCK=y
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_LKDTM is not set
-# CONFIG_FAULT_INJECTION is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_IOMMU_DEBUG is not set
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SELINUX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_TWOFISH_X86_64=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config
deleted file mode 100644
index 0fead82d420c75ea45499d9b1c913e80f94bc77e..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.22-2.6-sles10-x86_64.config
+++ /dev/null
@@ -1,3175 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.22.5
-# Wed Feb 20 01:00:44 2008
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_GENERIC_TIME=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_ZONE_DMA32=y
-CONFIG_LOCKDEP_SUPPORT=y
-CONFIG_STACKTRACE_SUPPORT=y
-CONFIG_SEMAPHORE_SLEEPERS=y
-CONFIG_MMU=y
-CONFIG_ZONE_DMA=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_GENERIC_HWEIGHT=y
-CONFIG_GENERIC_CALIBRATE_DELAY=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_ARCH_MAY_HAVE_PC_FDC=y
-CONFIG_ARCH_POPULATES_NODE_MAP=y
-CONFIG_DMI=y
-CONFIG_AUDIT_ARCH=y
-CONFIG_GENERIC_BUG=y
-# CONFIG_ARCH_HAS_ILOG2_U32 is not set
-# CONFIG_ARCH_HAS_ILOG2_U64 is not set
-CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_BROKEN_ON_SMP=y
-CONFIG_INIT_ENV_ARG_LIMIT=32
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-# CONFIG_LOCALVERSION_AUTO is not set
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-# CONFIG_IPC_NS is not set
-CONFIG_SYSVIPC_SYSCTL=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_TASKSTATS=y
-CONFIG_TASK_DELAY_ACCT=y
-# CONFIG_TASK_XACCT is not set
-# CONFIG_UTS_NS is not set
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_IKCONFIG is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_RELAY=y
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SYSCTL=y
-# CONFIG_EMBEDDED is not set
-CONFIG_UID16=y
-CONFIG_SYSCTL_SYSCALL=y
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_HOTPLUG=y
-CONFIG_PRINTK=y
-CONFIG_BUG=y
-CONFIG_ELF_CORE=y
-CONFIG_BASE_FULL=y
-CONFIG_FUTEX=y
-CONFIG_ANON_INODES=y
-CONFIG_EPOLL=y
-CONFIG_SIGNALFD=y
-CONFIG_TIMERFD=y
-CONFIG_EVENTFD=y
-CONFIG_SHMEM=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_SLAB=y
-# CONFIG_SLUB is not set
-# CONFIG_SLOB is not set
-CONFIG_RT_MUTEXES=y
-# CONFIG_TINY_SHMEM is not set
-CONFIG_BASE_SMALL=0
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SRCVERSION_ALL=y
-CONFIG_KMOD=y
-
-#
-# Block layer
-#
-CONFIG_BLOCK=y
-CONFIG_BLK_DEV_IO_TRACE=y
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_DEFAULT_AS is not set
-CONFIG_DEFAULT_DEADLINE=y
-# CONFIG_DEFAULT_CFQ is not set
-# CONFIG_DEFAULT_NOOP is not set
-CONFIG_DEFAULT_IOSCHED="deadline"
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VSMP is not set
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-# CONFIG_MCORE2 is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_INTERNODE_CACHE_BYTES=128
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_MICROCODE_OLD_INTERFACE=y
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-# CONFIG_SMP is not set
-CONFIG_PREEMPT_NONE=y
-# CONFIG_PREEMPT_VOLUNTARY is not set
-# CONFIG_PREEMPT is not set
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_FLATMEM_ENABLE=y
-CONFIG_SELECT_MEMORY_MODEL=y
-# CONFIG_FLATMEM_MANUAL is not set
-# CONFIG_DISCONTIGMEM_MANUAL is not set
-CONFIG_SPARSEMEM_MANUAL=y
-CONFIG_SPARSEMEM=y
-CONFIG_HAVE_MEMORY_PRESENT=y
-# CONFIG_SPARSEMEM_STATIC is not set
-CONFIG_SPARSEMEM_EXTREME=y
-
-#
-# Memory hotplug is currently incompatible with Software Suspend
-#
-CONFIG_SPLIT_PTLOCK_CPUS=4
-CONFIG_RESOURCES_64BIT=y
-CONFIG_ZONE_DMA_FLAG=1
-CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_IOMMU=y
-CONFIG_CALGARY_IOMMU=y
-CONFIG_CALGARY_IOMMU_ENABLED_BY_DEFAULT=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_INTEL=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_KEXEC=y
-CONFIG_CRASH_DUMP=y
-# CONFIG_RELOCATABLE is not set
-CONFIG_PHYSICAL_START=0x200000
-# CONFIG_SECCOMP is not set
-# CONFIG_CC_STACKPROTECTOR is not set
-# CONFIG_HZ_100 is not set
-CONFIG_HZ_250=y
-# CONFIG_HZ_300 is not set
-# CONFIG_HZ_1000 is not set
-CONFIG_HZ=250
-CONFIG_K8_NB=y
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_GENERIC_IRQ_PROBE=y
-CONFIG_ISA_DMA_API=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-CONFIG_PM_LEGACY=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_PM_SYSFS_DEPRECATED is not set
-CONFIG_SOFTWARE_SUSPEND=y
-CONFIG_PM_STD_PARTITION=""
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-# CONFIG_ACPI_SLEEP_PROC_SLEEP is not set
-CONFIG_ACPI_PROCFS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_VIDEO=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_DOCK=y
-CONFIG_ACPI_BAY=m
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=0
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_CONTAINER=y
-CONFIG_ACPI_SBS=m
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_TABLE=y
-CONFIG_CPU_FREQ_DEBUG=y
-CONFIG_CPU_FREQ_STAT=m
-CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=y
-CONFIG_X86_ACPI_CPUFREQ=m
-
-#
-# shared options
-#
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-# CONFIG_X86_SPEEDSTEP_LIB is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCIEPORTBUS=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_PCIEAER=y
-CONFIG_ARCH_SUPPORTS_MSI=y
-CONFIG_PCI_MSI=y
-# CONFIG_PCI_DEBUG is not set
-CONFIG_HT_IRQ=y
-
-#
-# PCCARD (PCMCIA/CardBus) support
-#
-CONFIG_PCCARD=y
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_PCMCIA=y
-CONFIG_PCMCIA_LOAD_CIS=y
-CONFIG_PCMCIA_IOCTL=y
-CONFIG_CARDBUS=y
-
-#
-# PC-card bridges
-#
-CONFIG_YENTA=y
-CONFIG_YENTA_O2=y
-CONFIG_YENTA_RICOH=y
-CONFIG_YENTA_TI=y
-CONFIG_YENTA_ENE_TUNE=y
-CONFIG_YENTA_TOSHIBA=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_PCCARD_NONSTATIC=y
-CONFIG_HOTPLUG_PCI=y
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Networking
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_UNIX=y
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-# CONFIG_XFRM_SUB_POLICY is not set
-# CONFIG_XFRM_MIGRATE is not set
-CONFIG_NET_KEY=m
-# CONFIG_NET_KEY_MIGRATE is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_ASK_IP_FIB_HASH=y
-# CONFIG_IP_FIB_TRIE is not set
-CONFIG_IP_FIB_HASH=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-# CONFIG_IP_ROUTE_MULTIPATH_CACHED is not set
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_XFRM_TUNNEL=m
-CONFIG_INET_TUNNEL=m
-CONFIG_INET_XFRM_MODE_TRANSPORT=m
-CONFIG_INET_XFRM_MODE_TUNNEL=m
-CONFIG_INET_XFRM_MODE_BEET=y
-CONFIG_INET_DIAG=m
-CONFIG_INET_TCP_DIAG=m
-CONFIG_TCP_CONG_ADVANCED=y
-CONFIG_TCP_CONG_BIC=y
-CONFIG_TCP_CONG_CUBIC=m
-CONFIG_TCP_CONG_WESTWOOD=m
-CONFIG_TCP_CONG_HTCP=m
-CONFIG_TCP_CONG_HSTCP=m
-CONFIG_TCP_CONG_HYBLA=m
-CONFIG_TCP_CONG_VEGAS=m
-CONFIG_TCP_CONG_SCALABLE=m
-CONFIG_TCP_CONG_LP=m
-CONFIG_TCP_CONG_VENO=m
-CONFIG_TCP_CONG_YEAH=m
-CONFIG_TCP_CONG_ILLINOIS=m
-CONFIG_DEFAULT_BIC=y
-# CONFIG_DEFAULT_CUBIC is not set
-# CONFIG_DEFAULT_HTCP is not set
-# CONFIG_DEFAULT_VEGAS is not set
-# CONFIG_DEFAULT_WESTWOOD is not set
-# CONFIG_DEFAULT_RENO is not set
-CONFIG_DEFAULT_TCP_CONG="bic"
-# CONFIG_TCP_MD5SIG is not set
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_ROUTER_PREF=y
-CONFIG_IPV6_ROUTE_INFO=y
-# CONFIG_IPV6_OPTIMISTIC_DAD is not set
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-# CONFIG_IPV6_MIP6 is not set
-CONFIG_INET6_XFRM_TUNNEL=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_TRANSPORT=m
-CONFIG_INET6_XFRM_MODE_TUNNEL=m
-CONFIG_INET6_XFRM_MODE_BEET=m
-CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=m
-CONFIG_IPV6_SIT=m
-CONFIG_IPV6_TUNNEL=m
-# CONFIG_IPV6_MULTIPLE_TABLES is not set
-# CONFIG_NETLABEL is not set
-CONFIG_NETWORK_SECMARK=y
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# Core Netfilter Configuration
-#
-CONFIG_NETFILTER_NETLINK=m
-CONFIG_NETFILTER_NETLINK_QUEUE=m
-CONFIG_NETFILTER_NETLINK_LOG=m
-CONFIG_NF_CONNTRACK_ENABLED=m
-CONFIG_NF_CONNTRACK=m
-CONFIG_NF_CT_ACCT=y
-CONFIG_NF_CONNTRACK_MARK=y
-# CONFIG_NF_CONNTRACK_SECMARK is not set
-# CONFIG_NF_CONNTRACK_EVENTS is not set
-CONFIG_NF_CT_PROTO_GRE=m
-CONFIG_NF_CT_PROTO_SCTP=m
-CONFIG_NF_CONNTRACK_AMANDA=m
-CONFIG_NF_CONNTRACK_FTP=m
-CONFIG_NF_CONNTRACK_H323=m
-CONFIG_NF_CONNTRACK_IRC=m
-CONFIG_NF_CONNTRACK_NETBIOS_NS=m
-CONFIG_NF_CONNTRACK_PPTP=m
-CONFIG_NF_CONNTRACK_SANE=m
-CONFIG_NF_CONNTRACK_SIP=m
-CONFIG_NF_CONNTRACK_TFTP=m
-CONFIG_NF_CT_NETLINK=m
-CONFIG_NETFILTER_XTABLES=m
-CONFIG_NETFILTER_XT_TARGET_CLASSIFY=m
-CONFIG_NETFILTER_XT_TARGET_CONNMARK=m
-CONFIG_NETFILTER_XT_TARGET_DSCP=m
-CONFIG_NETFILTER_XT_TARGET_MARK=m
-CONFIG_NETFILTER_XT_TARGET_NFQUEUE=m
-CONFIG_NETFILTER_XT_TARGET_NFLOG=m
-CONFIG_NETFILTER_XT_TARGET_NOTRACK=m
-CONFIG_NETFILTER_XT_TARGET_SECMARK=m
-CONFIG_NETFILTER_XT_TARGET_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_COMMENT=m
-CONFIG_NETFILTER_XT_MATCH_CONNBYTES=m
-CONFIG_NETFILTER_XT_MATCH_CONNMARK=m
-CONFIG_NETFILTER_XT_MATCH_CONNTRACK=m
-CONFIG_NETFILTER_XT_MATCH_DCCP=m
-CONFIG_NETFILTER_XT_MATCH_DSCP=m
-CONFIG_NETFILTER_XT_MATCH_ESP=m
-CONFIG_NETFILTER_XT_MATCH_HELPER=m
-CONFIG_NETFILTER_XT_MATCH_LENGTH=m
-CONFIG_NETFILTER_XT_MATCH_LIMIT=m
-CONFIG_NETFILTER_XT_MATCH_MAC=m
-CONFIG_NETFILTER_XT_MATCH_MARK=m
-CONFIG_NETFILTER_XT_MATCH_POLICY=m
-CONFIG_NETFILTER_XT_MATCH_MULTIPORT=m
-CONFIG_NETFILTER_XT_MATCH_PHYSDEV=m
-CONFIG_NETFILTER_XT_MATCH_PKTTYPE=m
-CONFIG_NETFILTER_XT_MATCH_QUOTA=m
-CONFIG_NETFILTER_XT_MATCH_REALM=m
-CONFIG_NETFILTER_XT_MATCH_SCTP=m
-CONFIG_NETFILTER_XT_MATCH_STATE=m
-CONFIG_NETFILTER_XT_MATCH_STATISTIC=m
-CONFIG_NETFILTER_XT_MATCH_STRING=m
-CONFIG_NETFILTER_XT_MATCH_TCPMSS=m
-CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=m
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_NF_CONNTRACK_IPV4=m
-CONFIG_NF_CONNTRACK_PROC_COMPAT=y
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_AH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_NF_NAT=m
-CONFIG_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_NF_NAT_SNMP_BASIC=m
-CONFIG_NF_NAT_PROTO_GRE=m
-CONFIG_NF_NAT_FTP=m
-CONFIG_NF_NAT_IRC=m
-CONFIG_NF_NAT_TFTP=m
-CONFIG_NF_NAT_AMANDA=m
-CONFIG_NF_NAT_PPTP=m
-CONFIG_NF_NAT_H323=m
-CONFIG_NF_NAT_SIP=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-
-#
-# IPv6: Netfilter Configuration (EXPERIMENTAL)
-#
-CONFIG_NF_CONNTRACK_IPV6=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AH=m
-CONFIG_IP6_NF_MATCH_MH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_HL=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_BRIDGE_EBT_ULOG=m
-CONFIG_IP_DCCP=m
-CONFIG_INET_DCCP_DIAG=m
-CONFIG_IP_DCCP_ACKVEC=y
-
-#
-# DCCP CCIDs Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_DCCP_CCID2=m
-# CONFIG_IP_DCCP_CCID2_DEBUG is not set
-CONFIG_IP_DCCP_CCID3=m
-CONFIG_IP_DCCP_TFRC_LIB=m
-# CONFIG_IP_DCCP_CCID3_DEBUG is not set
-CONFIG_IP_DCCP_CCID3_RTO=100
-
-#
-# DCCP Kernel Hacking
-#
-# CONFIG_IP_DCCP_DEBUG is not set
-# CONFIG_NET_DCCPPROBE is not set
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_TIPC=m
-# CONFIG_TIPC_ADVANCED is not set
-# CONFIG_TIPC_DEBUG is not set
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_FIFO=y
-
-#
-# Queueing/Scheduling
-#
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-
-#
-# Classification
-#
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_BASIC=m
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_CLS_U32_MARK=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_EMATCH=y
-CONFIG_NET_EMATCH_STACK=32
-CONFIG_NET_EMATCH_CMP=m
-CONFIG_NET_EMATCH_NBYTE=m
-CONFIG_NET_EMATCH_U32=m
-CONFIG_NET_EMATCH_META=m
-CONFIG_NET_EMATCH_TEXT=m
-CONFIG_NET_CLS_ACT=y
-CONFIG_NET_ACT_POLICE=m
-CONFIG_NET_ACT_GACT=m
-CONFIG_GACT_PROB=y
-CONFIG_NET_ACT_MIRRED=m
-CONFIG_NET_ACT_IPT=m
-CONFIG_NET_ACT_PEDIT=m
-CONFIG_NET_ACT_SIMP=m
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_ESTIMATOR=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NET_TCPPROBE is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBPA10X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_AF_RXRPC=m
-# CONFIG_AF_RXRPC_DEBUG is not set
-CONFIG_RXKAD=m
-CONFIG_FIB_RULES=y
-
-#
-# Wireless
-#
-CONFIG_CFG80211=m
-CONFIG_WIRELESS_EXT=y
-CONFIG_MAC80211=m
-# CONFIG_MAC80211_LEDS is not set
-# CONFIG_MAC80211_DEBUGFS is not set
-# CONFIG_MAC80211_DEBUG is not set
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IEEE80211_SOFTMAC=m
-CONFIG_IEEE80211_SOFTMAC_DEBUG=y
-CONFIG_RFKILL=m
-CONFIG_RFKILL_INPUT=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-# CONFIG_SYS_HYPERVISOR is not set
-
-#
-# Connector - unified userspace <-> kernelspace linker
-#
-CONFIG_CONNECTOR=y
-CONFIG_PROC_EVENTS=y
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=-1
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLKDEVS=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-CONFIG_RFD_FTL=m
-CONFIG_SSFDC=m
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_TS5500=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_ICHXROM is not set
-CONFIG_MTD_ESB2ROM=m
-CONFIG_MTD_CK804XROM=m
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-# CONFIG_MTD_PLATRAM is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLOCK2MTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_ECC_SMC=y
-# CONFIG_MTD_NAND_MUSEUM_IDS is not set
-CONFIG_MTD_NAND_IDS=m
-CONFIG_MTD_NAND_DISKONCHIP=m
-# CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADVANCED is not set
-CONFIG_MTD_NAND_DISKONCHIP_PROBE_ADDRESS=0
-# CONFIG_MTD_NAND_DISKONCHIP_BBTWRITE is not set
-CONFIG_MTD_NAND_CAFE=m
-CONFIG_MTD_NAND_NANDSIM=m
-CONFIG_MTD_NAND_PLATFORM=m
-# CONFIG_MTD_ONENAND is not set
-
-#
-# UBI - Unsorted block images
-#
-CONFIG_MTD_UBI=m
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MTD_UBI_BEB_RESERVE=1
-# CONFIG_MTD_UBI_GLUEBI is not set
-
-#
-# UBI debugging options
-#
-# CONFIG_MTD_UBI_DEBUG is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_GSC is not set
-# CONFIG_PARPORT_AX88796 is not set
-CONFIG_PARPORT_1284=y
-CONFIG_PARPORT_NOT_PC=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_PNPACPI=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-# CONFIG_BLK_DEV_COW_COMMON is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_RAM_BLOCKSIZE=4096
-CONFIG_CDROM_PKTCDVD=m
-CONFIG_CDROM_PKTCDVD_BUFFERS=8
-# CONFIG_CDROM_PKTCDVD_WCACHE is not set
-CONFIG_ATA_OVER_ETH=m
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-CONFIG_PHANTOM=m
-CONFIG_SGI_IOC4=m
-CONFIG_TIFM_CORE=m
-CONFIG_TIFM_7XX1=m
-CONFIG_ASUS_LAPTOP=m
-CONFIG_MSI_LAPTOP=m
-CONFIG_SONY_LAPTOP=m
-# CONFIG_SONYPI_COMPAT is not set
-CONFIG_THINKPAD_ACPI=m
-# CONFIG_THINKPAD_ACPI_DEBUG is not set
-CONFIG_THINKPAD_ACPI_BAY=y
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=m
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEACPI=y
-CONFIG_IDE_TASK_IOCTL=y
-CONFIG_IDE_PROC_FS=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_IDEPCI_PCIBUS_ORDER=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_RZ1000 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_JMICRON=m
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8213=m
-CONFIG_BLK_DEV_IT821X=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_TC86C001=m
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_RAID_ATTRS=m
-CONFIG_SCSI=m
-CONFIG_SCSI_TGT=m
-CONFIG_SCSI_NETLINK=y
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_WAIT_SCAN=m
-
-#
-# SCSI Transports
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-CONFIG_SCSI_SAS_ATTRS=m
-CONFIG_SCSI_SAS_LIBSAS=m
-# CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set
-
-#
-# SCSI low-level drivers
-#
-CONFIG_ISCSI_TCP=m
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=4000
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_AIC94XX=m
-# CONFIG_AIC94XX_DEBUG is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_HPTIOP=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_STEX=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-CONFIG_SCSI_SYM53C8XX_MMIO=y
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA_FC=m
-CONFIG_SCSI_QLA_ISCSI=m
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_DC395x=m
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-CONFIG_SCSI_SRP=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INIC162X=m
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-CONFIG_PATA_ARTOP=m
-CONFIG_PATA_ATIIXP=m
-CONFIG_PATA_CMD640_PCI=m
-CONFIG_PATA_CMD64X=m
-CONFIG_PATA_CS5520=m
-CONFIG_PATA_CS5530=m
-CONFIG_PATA_CYPRESS=m
-CONFIG_PATA_EFAR=m
-CONFIG_ATA_GENERIC=m
-CONFIG_PATA_HPT366=m
-CONFIG_PATA_HPT37X=m
-CONFIG_PATA_HPT3X2N=m
-CONFIG_PATA_HPT3X3=m
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-CONFIG_PATA_TRIFLEX=m
-CONFIG_PATA_MARVELL=m
-CONFIG_PATA_MPIIX=m
-CONFIG_PATA_OLDPIIX=m
-CONFIG_PATA_NETCELL=m
-CONFIG_PATA_NS87410=m
-CONFIG_PATA_OPTI=m
-CONFIG_PATA_OPTIDMA=m
-CONFIG_PATA_PCMCIA=m
-CONFIG_PATA_PDC_OLD=m
-CONFIG_PATA_RADISYS=m
-CONFIG_PATA_RZ1000=m
-CONFIG_PATA_SC1200=m
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_SIL680=m
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID456=m
-CONFIG_MD_RAID5_RESHAPE=y
-CONFIG_MD_MULTIPATH=m
-CONFIG_MD_FAULTY=m
-CONFIG_BLK_DEV_DM=m
-# CONFIG_DM_DEBUG is not set
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_DELAY=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_FIREWIRE=m
-CONFIG_FIREWIRE_OHCI=m
-CONFIG_FIREWIRE_SBP2=m
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-# CONFIG_I2O_LCT_NOTIFY_ON_CHANGES is not set
-CONFIG_I2O_EXT_ADAPTEC=y
-CONFIG_I2O_EXT_ADAPTEC_DMA64=y
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_CONFIG_OLD_IOCTL=y
-CONFIG_I2O_BUS=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-CONFIG_MACINTOSH_DRIVERS=y
-CONFIG_MAC_EMUMOUSEBTN=y
-
-#
-# Network device support
-#
-CONFIG_NETDEVICES=y
-CONFIG_IFB=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-# CONFIG_NET_SB1000 is not set
-# CONFIG_ARCNET is not set
-CONFIG_PHYLIB=m
-
-#
-# MII PHY device drivers
-#
-CONFIG_MARVELL_PHY=m
-CONFIG_DAVICOM_PHY=m
-CONFIG_QSEMI_PHY=m
-CONFIG_LXT_PHY=m
-CONFIG_CICADA_PHY=m
-CONFIG_VITESSE_PHY=m
-CONFIG_SMSC_PHY=m
-CONFIG_BROADCOM_PHY=m
-CONFIG_FIXED_PHY=m
-CONFIG_FIXED_MII_10_FDX=y
-CONFIG_FIXED_MII_100_FDX=y
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_CASSINI=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_ULI526X=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_PCNET32_NAPI is not set
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_FORCEDETH_NAPI is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_VIA_RHINE_NAPI=y
-CONFIG_SC92031=m
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-CONFIG_NETDEV_1000=y
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-# CONFIG_E1000_DISABLE_PACKET_SPLIT is not set
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_R8169_VLAN=y
-CONFIG_SIS190=m
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-# CONFIG_SK98LIN is not set
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-CONFIG_ATL1=m
-CONFIG_NETDEV_10000=y
-CONFIG_CHELSIO_T1=m
-CONFIG_CHELSIO_T1_1G=y
-CONFIG_CHELSIO_T1_NAPI=y
-# CONFIG_CHELSIO_T3 is not set
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_MLX4_CORE=m
-CONFIG_MLX4_DEBUG=y
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Wireless LAN
-#
-CONFIG_WLAN_PRE80211=y
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-CONFIG_WLAN_80211=y
-CONFIG_PCMCIA_RAYCS=m
-CONFIG_IPW2100=m
-# CONFIG_IPW2100_MONITOR is not set
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-# CONFIG_IPW2200_MONITOR is not set
-# CONFIG_IPW2200_QOS is not set
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_LIBERTAS=m
-CONFIG_LIBERTAS_USB=m
-# CONFIG_LIBERTAS_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_NORTEL_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-CONFIG_PCMCIA_HERMES=m
-CONFIG_PCMCIA_SPECTRUM=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-CONFIG_PRISM54=m
-CONFIG_USB_ZD1201=m
-CONFIG_HOSTAP=m
-CONFIG_HOSTAP_FIRMWARE=y
-CONFIG_HOSTAP_FIRMWARE_NVRAM=y
-CONFIG_HOSTAP_PLX=m
-CONFIG_HOSTAP_PCI=m
-CONFIG_HOSTAP_CS=m
-CONFIG_BCM43XX=m
-CONFIG_BCM43XX_DEBUG=y
-CONFIG_BCM43XX_DMA=y
-CONFIG_BCM43XX_PIO=y
-CONFIG_BCM43XX_DMA_AND_PIO_MODE=y
-# CONFIG_BCM43XX_DMA_MODE is not set
-# CONFIG_BCM43XX_PIO_MODE is not set
-CONFIG_ZD1211RW=m
-# CONFIG_ZD1211RW_DEBUG is not set
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET_MII=m
-CONFIG_USB_USBNET=m
-CONFIG_USB_NET_AX8817X=m
-CONFIG_USB_NET_CDCETHER=m
-CONFIG_USB_NET_DM9601=m
-CONFIG_USB_NET_GL620A=m
-CONFIG_USB_NET_NET1080=m
-CONFIG_USB_NET_PLUSB=m
-CONFIG_USB_NET_MCS7830=m
-CONFIG_USB_NET_RNDIS_HOST=m
-CONFIG_USB_NET_CDC_SUBSET=m
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_KC2190=y
-CONFIG_USB_NET_ZAURUS=m
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-# CONFIG_WAN is not set
-CONFIG_ATM_DRIVERS=y
-# CONFIG_ATM_DUMMY is not set
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLHC=m
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-CONFIG_ISDN_DIVERSION=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-# CONFIG_HISAX_HFCUSB is not set
-CONFIG_HISAX_HFC4S8S=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-# CONFIG_HYSDN is not set
-
-#
-# Siemens Gigaset
-#
-CONFIG_ISDN_DRV_GIGASET=m
-CONFIG_GIGASET_BASE=m
-CONFIG_GIGASET_M105=m
-CONFIG_GIGASET_M101=m
-# CONFIG_GIGASET_DEBUG is not set
-# CONFIG_GIGASET_UNDOCREQ is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_CAPI_TRACE=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_FF_MEMLESS=y
-CONFIG_INPUT_POLLDEV=m
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_KEYBOARD_STOWAWAY=m
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_APPLETOUCH=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_ANALOG is not set
-# CONFIG_JOYSTICK_A3D is not set
-# CONFIG_JOYSTICK_ADI is not set
-# CONFIG_JOYSTICK_COBRA is not set
-# CONFIG_JOYSTICK_GF2K is not set
-# CONFIG_JOYSTICK_GRIP is not set
-# CONFIG_JOYSTICK_GRIP_MP is not set
-# CONFIG_JOYSTICK_GUILLEMOT is not set
-# CONFIG_JOYSTICK_INTERACT is not set
-# CONFIG_JOYSTICK_SIDEWINDER is not set
-# CONFIG_JOYSTICK_TMDC is not set
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-CONFIG_JOYSTICK_TWIDJOY=m
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_JOYSTICK_JOYDUMP=m
-CONFIG_JOYSTICK_XPAD=m
-# CONFIG_INPUT_TABLET is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_TOUCHSCREEN_ELO=m
-CONFIG_TOUCHSCREEN_MTOUCH=m
-CONFIG_TOUCHSCREEN_MK712=m
-CONFIG_TOUCHSCREEN_PENMOUNT=m
-CONFIG_TOUCHSCREEN_TOUCHRIGHT=m
-CONFIG_TOUCHSCREEN_TOUCHWIN=m
-CONFIG_TOUCHSCREEN_UCB1400=m
-CONFIG_TOUCHSCREEN_USB_COMPOSITE=m
-CONFIG_TOUCHSCREEN_USB_EGALAX=y
-CONFIG_TOUCHSCREEN_USB_PANJIT=y
-CONFIG_TOUCHSCREEN_USB_3M=y
-CONFIG_TOUCHSCREEN_USB_ITM=y
-CONFIG_TOUCHSCREEN_USB_ETURBO=y
-CONFIG_TOUCHSCREEN_USB_GUNZE=y
-CONFIG_TOUCHSCREEN_USB_DMC_TSC10=y
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_ATLAS_BTNS=m
-CONFIG_INPUT_ATI_REMOTE=m
-CONFIG_INPUT_ATI_REMOTE2=m
-CONFIG_INPUT_KEYSPAN_REMOTE=m
-CONFIG_INPUT_POWERMATE=m
-CONFIG_INPUT_YEALINK=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Hardware I/O ports
-#
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-CONFIG_SERIO_LIBPS2=y
-CONFIG_SERIO_RAW=m
-CONFIG_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_FM801=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_VT_HW_CONSOLE_BINDING=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-CONFIG_CYCLADES=m
-# CONFIG_CYZ_INTR is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-CONFIG_MOXA_SMARTIO_NEW=m
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_SYNCLINK_GT=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-# CONFIG_STALDRV is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_NR_UARTS=32
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_ACQUIRE_WDT is not set
-# CONFIG_ADVANTECH_WDT is not set
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-# CONFIG_SC520_WDT is not set
-# CONFIG_EUROTECH_WDT is not set
-# CONFIG_IB700_WDT is not set
-CONFIG_IBMASR=m
-# CONFIG_WAFER_WDT is not set
-CONFIG_I6300ESB_WDT=m
-CONFIG_ITCO_WDT=m
-# CONFIG_ITCO_VENDOR_SUPPORT is not set
-# CONFIG_SC1200_WDT is not set
-CONFIG_PC87413_WDT=m
-# CONFIG_60XX_WDT is not set
-# CONFIG_SBC8360_WDT is not set
-# CONFIG_CPU5_WDT is not set
-CONFIG_SMSC37B787_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83697HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_W83977F_WDT=m
-CONFIG_MACHZ_WDT=m
-# CONFIG_SBC_EPX_C3_WATCHDOG is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_INTEL=m
-CONFIG_HW_RANDOM_AMD=m
-# CONFIG_HW_RANDOM_GEODE is not set
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_VIA=y
-CONFIG_DRM=m
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-CONFIG_DRM_VIA=m
-CONFIG_DRM_SAVAGE=m
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_CARDMAN_4000=m
-CONFIG_CARDMAN_4040=m
-# CONFIG_MWAVE is not set
-CONFIG_PC8736x_GPIO=m
-CONFIG_NSC_GPIO=m
-CONFIG_RAW_DRIVER=y
-CONFIG_MAX_RAW_DEVS=256
-CONFIG_HPET=y
-# CONFIG_HPET_RTC_IRQ is not set
-# CONFIG_HPET_MMAP is not set
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# TPM devices
-#
-# CONFIG_TCG_TPM is not set
-# CONFIG_TELCLOCK is not set
-CONFIG_DEVPORT=y
-CONFIG_I2C=m
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-# CONFIG_I2C_ALI1535 is not set
-# CONFIG_I2C_ALI1563 is not set
-# CONFIG_I2C_ALI15X3 is not set
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD756_S4882=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-# CONFIG_I2C_I810 is not set
-# CONFIG_I2C_PIIX4 is not set
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_OCORES is not set
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_I2C_SIMTEC=m
-# CONFIG_I2C_SIS5595 is not set
-# CONFIG_I2C_SIS630 is not set
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_STUB=m
-CONFIG_I2C_TINY_USB=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Miscellaneous I2C Chip support
-#
-CONFIG_SENSORS_DS1337=m
-CONFIG_SENSORS_DS1374=m
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCA9539=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_MAX6875=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# SPI support
-#
-# CONFIG_SPI is not set
-# CONFIG_SPI_MASTER is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ABITUGURU=m
-CONFIG_SENSORS_AD7418=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_ADM1029=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ADM9240=m
-CONFIG_SENSORS_K8TEMP=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_ATXP1=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_F71805F=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_FSCPOS=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_GL520SM=m
-CONFIG_SENSORS_CORETEMP=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM63=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_LM92=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_MAX6650=m
-CONFIG_SENSORS_PC87360=m
-CONFIG_SENSORS_PC87427=m
-CONFIG_SENSORS_SIS5595=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_SMSC47M192=m
-CONFIG_SENSORS_SMSC47B397=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_VT8231=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83791D=m
-CONFIG_SENSORS_W83792D=m
-CONFIG_SENSORS_W83793=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_W83627EHF=m
-CONFIG_SENSORS_HDAPS=m
-CONFIG_SENSORS_APPLESMC=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Multifunction device drivers
-#
-CONFIG_MFD_SM501=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-CONFIG_VIDEO_V4L1=y
-CONFIG_VIDEO_V4L1_COMPAT=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_CAPTURE_DRIVERS=y
-# CONFIG_VIDEO_ADV_DEBUG is not set
-CONFIG_VIDEO_HELPER_CHIPS_AUTO=y
-CONFIG_VIDEO_TVAUDIO=m
-CONFIG_VIDEO_TDA7432=m
-CONFIG_VIDEO_TDA9875=m
-CONFIG_VIDEO_MSP3400=m
-CONFIG_VIDEO_CS53L32A=m
-CONFIG_VIDEO_WM8775=m
-CONFIG_VIDEO_WM8739=m
-CONFIG_VIDEO_OV7670=m
-CONFIG_VIDEO_SAA711X=m
-CONFIG_VIDEO_TVP5150=m
-CONFIG_VIDEO_CX25840=m
-CONFIG_VIDEO_CX2341X=m
-CONFIG_VIDEO_SAA7127=m
-CONFIG_VIDEO_UPD64031A=m
-CONFIG_VIDEO_UPD64083=m
-# CONFIG_VIDEO_VIVI is not set
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BT848_DVB is not set
-CONFIG_VIDEO_SAA6588=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_CPIA2=m
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-CONFIG_VIDEO_MEYE=m
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_IVTV=m
-CONFIG_VIDEO_CAFE_CCIC=m
-CONFIG_V4L_USB_DRIVERS=y
-CONFIG_VIDEO_PVRUSB2=m
-# CONFIG_VIDEO_PVRUSB2_29XXX is not set
-CONFIG_VIDEO_PVRUSB2_24XXX=y
-CONFIG_VIDEO_PVRUSB2_SYSFS=y
-# CONFIG_VIDEO_PVRUSB2_DEBUGIFC is not set
-CONFIG_VIDEO_EM28XX=m
-CONFIG_VIDEO_USBVISION=m
-CONFIG_VIDEO_USBVIDEO=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_QUICKCAM_MESSENGER=m
-CONFIG_USB_ET61X251=m
-CONFIG_VIDEO_OVCAMCHIP=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_ZC0301=m
-CONFIG_USB_PWC=m
-# CONFIG_USB_PWC_DEBUG is not set
-CONFIG_USB_ZR364XX=m
-CONFIG_RADIO_ADAPTERS=y
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-CONFIG_USB_DSBR=m
-CONFIG_DVB_CORE=m
-# CONFIG_DVB_CORE_ATTACH is not set
-CONFIG_DVB_CAPTURE_DRIVERS=y
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_USB=m
-# CONFIG_DVB_USB_DEBUG is not set
-CONFIG_DVB_USB_A800=m
-CONFIG_DVB_USB_DIBUSB_MB=m
-# CONFIG_DVB_USB_DIBUSB_MB_FAULTY is not set
-CONFIG_DVB_USB_DIBUSB_MC=m
-CONFIG_DVB_USB_DIB0700=m
-CONFIG_DVB_USB_UMT_010=m
-CONFIG_DVB_USB_CXUSB=m
-CONFIG_DVB_USB_M920X=m
-CONFIG_DVB_USB_GL861=m
-CONFIG_DVB_USB_AU6610=m
-CONFIG_DVB_USB_DIGITV=m
-CONFIG_DVB_USB_VP7045=m
-CONFIG_DVB_USB_VP702X=m
-CONFIG_DVB_USB_GP8PSK=m
-CONFIG_DVB_USB_NOVA_T_USB2=m
-CONFIG_DVB_USB_TTUSB2=m
-CONFIG_DVB_USB_DTT200U=m
-CONFIG_DVB_USB_OPERA1=m
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-CONFIG_DVB_CINERGYT2=m
-# CONFIG_DVB_CINERGYT2_TUNING is not set
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_FLEXCOP=m
-CONFIG_DVB_B2C2_FLEXCOP_PCI=m
-CONFIG_DVB_B2C2_FLEXCOP_USB=m
-# CONFIG_DVB_B2C2_FLEXCOP_DEBUG is not set
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-
-#
-# Supported Pluto2 Adapters
-#
-CONFIG_DVB_PLUTO2=m
-
-#
-# Supported DVB Frontends
-#
-
-#
-# Customise DVB Frontends
-#
-# CONFIG_DVB_FE_CUSTOMISE is not set
-
-#
-# DVB-S (satellite) frontends
-#
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_CX24123=m
-CONFIG_DVB_TDA8083=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_S5H1420=m
-CONFIG_DVB_TDA10086=m
-
-#
-# DVB-T (terrestrial) frontends
-#
-CONFIG_DVB_SP8870=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_CX22700=m
-CONFIG_DVB_CX22702=m
-CONFIG_DVB_L64781=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_NXT6000=m
-CONFIG_DVB_MT352=m
-CONFIG_DVB_ZL10353=m
-CONFIG_DVB_DIB3000MB=m
-CONFIG_DVB_DIB3000MC=m
-CONFIG_DVB_DIB7000M=m
-CONFIG_DVB_DIB7000P=m
-
-#
-# DVB-C (cable) frontends
-#
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_TDA10021=m
-CONFIG_DVB_TDA10023=m
-CONFIG_DVB_STV0297=m
-
-#
-# ATSC (North American/Korean Terrestrial/Cable DTV) frontends
-#
-CONFIG_DVB_NXT200X=m
-CONFIG_DVB_OR51211=m
-CONFIG_DVB_OR51132=m
-CONFIG_DVB_BCM3510=m
-CONFIG_DVB_LGDT330X=m
-
-#
-# Tuners/PLL support
-#
-CONFIG_DVB_PLL=m
-CONFIG_DVB_TDA826X=m
-CONFIG_DVB_TDA827X=m
-CONFIG_DVB_TUNER_QT1010=m
-CONFIG_DVB_TUNER_MT2060=m
-
-#
-# Miscellaneous devices
-#
-CONFIG_DVB_LNBP21=m
-CONFIG_DVB_ISL6421=m
-CONFIG_DVB_TUA6100=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-CONFIG_VIDEO_TVEEPROM=m
-CONFIG_DAB=y
-CONFIG_USB_DABUSB=m
-
-#
-# Graphics support
-#
-CONFIG_BACKLIGHT_LCD_SUPPORT=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_LCD_CLASS_DEVICE=m
-CONFIG_BACKLIGHT_PROGEAR=m
-CONFIG_BACKLIGHT_CARILLO_RANCH=m
-
-#
-# Display device support
-#
-CONFIG_DISPLAY_SUPPORT=m
-
-#
-# Display hardware drivers
-#
-CONFIG_VGASTATE=m
-CONFIG_FB=y
-# CONFIG_FIRMWARE_EDID is not set
-CONFIG_FB_DDC=m
-CONFIG_FB_CFB_FILLRECT=m
-CONFIG_FB_CFB_COPYAREA=m
-CONFIG_FB_CFB_IMAGEBLIT=m
-CONFIG_FB_SYS_FILLRECT=m
-CONFIG_FB_SYS_COPYAREA=m
-CONFIG_FB_SYS_IMAGEBLIT=m
-CONFIG_FB_SYS_FOPS=m
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SVGALIB=m
-# CONFIG_FB_MACMODES is not set
-CONFIG_FB_BACKLIGHT=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_TILEBLITTING=y
-
-#
-# Frame buffer hardware drivers
-#
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ARC is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-# CONFIG_FB_VESA is not set
-CONFIG_FB_HECUBA=m
-# CONFIG_FB_HGA is not set
-# CONFIG_FB_S1D13XXX is not set
-CONFIG_FB_NVIDIA=m
-CONFIG_FB_NVIDIA_I2C=y
-# CONFIG_FB_NVIDIA_DEBUG is not set
-CONFIG_FB_NVIDIA_BACKLIGHT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_RIVA_BACKLIGHT=y
-CONFIG_FB_LE80578=m
-CONFIG_FB_CARILLO_RANCH=m
-CONFIG_FB_INTEL=m
-# CONFIG_FB_INTEL_DEBUG is not set
-CONFIG_FB_INTEL_I2C=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-CONFIG_FB_S3=m
-CONFIG_FB_SAVAGE=m
-CONFIG_FB_SAVAGE_I2C=y
-CONFIG_FB_SAVAGE_ACCEL=y
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-CONFIG_FB_VT8623=m
-# CONFIG_FB_TRIDENT is not set
-CONFIG_FB_ARK=m
-CONFIG_FB_PM3=m
-# CONFIG_FB_GEODE is not set
-CONFIG_FB_SM501=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_VGACON_SOFT_SCROLLBACK=y
-CONFIG_VGACON_SOFT_SCROLLBACK_SIZE=256
-CONFIG_VIDEO_SELECT=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_PCM_OSS_PLUGINS=y
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y
-CONFIG_SND_DYNAMIC_MINORS=y
-# CONFIG_SND_SUPPORT_OLD_API is not set
-CONFIG_SND_VERBOSE_PROCFS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_MTS64=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-CONFIG_SND_PORTMAN2X4=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AD1889=m
-CONFIG_SND_ALS300=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-# CONFIG_SND_BT87X_OVERCLOCK is not set
-CONFIG_SND_CA0106=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_CS4281=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_DARLA20=m
-CONFIG_SND_GINA20=m
-CONFIG_SND_LAYLA20=m
-CONFIG_SND_DARLA24=m
-CONFIG_SND_GINA24=m
-CONFIG_SND_LAYLA24=m
-CONFIG_SND_MONA=m
-CONFIG_SND_MIA=m
-CONFIG_SND_ECHO3G=m
-CONFIG_SND_INDIGO=m
-CONFIG_SND_INDIGOIO=m
-CONFIG_SND_INDIGODJ=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_EMU10K1X=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X_BOOL=y
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_HDA_INTEL=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_HDSPM=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_KORG1212_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_MAESTRO3_FIRMWARE_IN_KERNEL=y
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_PCXHR=m
-CONFIG_SND_RIPTIDE=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VIA82XX_MODEM=m
-CONFIG_SND_VX222=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_YMFPCI_FIRMWARE_IN_KERNEL=y
-# CONFIG_SND_AC97_POWER_SAVE is not set
-
-#
-# USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-CONFIG_SND_USB_CAIAQ=m
-# CONFIG_SND_USB_CAIAQ_INPUT is not set
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# System on Chip audio support
-#
-CONFIG_SND_SOC=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-CONFIG_AC97_BUS=m
-
-#
-# HID Devices
-#
-CONFIG_HID=y
-# CONFIG_HID_DEBUG is not set
-
-#
-# USB Input Devices
-#
-CONFIG_USB_HID=y
-# CONFIG_USB_HIDINPUT_POWERBOOK is not set
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-# CONFIG_PANTHERLORD_FF is not set
-CONFIG_THRUSTMASTER_FF=y
-# CONFIG_ZEROPLUS_FF is not set
-CONFIG_USB_HIDDEV=y
-
-#
-# USB support
-#
-CONFIG_USB_ARCH_HAS_HCD=y
-CONFIG_USB_ARCH_HAS_OHCI=y
-CONFIG_USB_ARCH_HAS_EHCI=y
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-CONFIG_USB_DEVICE_CLASS=y
-# CONFIG_USB_DYNAMIC_MINORS is not set
-# CONFIG_USB_SUSPEND is not set
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_EHCI_TT_NEWSCHED=y
-# CONFIG_USB_EHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_ISP116X_HCD=m
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set
-# CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set
-CONFIG_USB_OHCI_LITTLE_ENDIAN=y
-CONFIG_USB_UHCI_HCD=m
-CONFIG_USB_U132_HCD=m
-CONFIG_USB_SL811_HCD=m
-CONFIG_USB_SL811_CS=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-
-#
-# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
-#
-
-#
-# may also be needed; see USB_STORAGE Help for more information
-#
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_USBAT=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-CONFIG_USB_STORAGE_ALAUDA=y
-# CONFIG_USB_STORAGE_KARMA is not set
-# CONFIG_USB_LIBUSUAL is not set
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_MON=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_AIRCABLE=m
-CONFIG_USB_SERIAL_AIRPRIME=m
-CONFIG_USB_SERIAL_ARK3116=m
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_CP2101=m
-CONFIG_USB_SERIAL_CYPRESS_M8=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_FUNSOFT=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_GARMIN=m
-CONFIG_USB_SERIAL_IPW=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_MOS7720=m
-CONFIG_USB_SERIAL_MOS7840=m
-CONFIG_USB_SERIAL_NAVMAN=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_HP4X=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_SIERRAWIRELESS=m
-CONFIG_USB_SERIAL_TI=m
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OPTION=m
-CONFIG_USB_SERIAL_OMNINET=m
-# CONFIG_USB_SERIAL_DEBUG is not set
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_ADUTUX=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_BERRY_CHARGE=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYPRESS_CY7C63 is not set
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGET=m
-CONFIG_USB_PHIDGETKIT=m
-CONFIG_USB_PHIDGETMOTORCONTROL=m
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_IDMOUSE=m
-CONFIG_USB_FTDI_ELAN=m
-CONFIG_USB_APPLEDISPLAY=m
-CONFIG_USB_SISUSBVGA=m
-CONFIG_USB_SISUSBVGA_CON=y
-CONFIG_USB_LD=m
-CONFIG_USB_TRANCEVIBRATOR=m
-CONFIG_USB_IOWARRIOR=m
-CONFIG_USB_TEST=m
-
-#
-# USB DSL modem support
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-CONFIG_USB_CXACRU=m
-CONFIG_USB_UEAGLEATM=m
-CONFIG_USB_XUSBATM=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-CONFIG_MMC=m
-# CONFIG_MMC_DEBUG is not set
-# CONFIG_MMC_UNSAFE_RESUME is not set
-
-#
-# MMC/SD Card Drivers
-#
-CONFIG_MMC_BLOCK=m
-
-#
-# MMC/SD Host Controller Drivers
-#
-CONFIG_MMC_SDHCI=m
-CONFIG_MMC_WBSD=m
-CONFIG_MMC_TIFM_SD=m
-
-#
-# LED devices
-#
-CONFIG_NEW_LEDS=y
-CONFIG_LEDS_CLASS=y
-
-#
-# LED drivers
-#
-
-#
-# LED Triggers
-#
-CONFIG_LEDS_TRIGGERS=y
-CONFIG_LEDS_TRIGGER_TIMER=m
-CONFIG_LEDS_TRIGGER_IDE_DISK=y
-CONFIG_LEDS_TRIGGER_HEARTBEAT=m
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_USER_MEM=y
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_MLX4_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_IPOIB_CM is not set
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_ISER=m
-
-#
-# EDAC - error detection and reporting (RAS) (EXPERIMENTAL)
-#
-CONFIG_EDAC=y
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_POLL=y
-
-#
-# Real Time Clock
-#
-CONFIG_RTC_LIB=m
-CONFIG_RTC_CLASS=m
-
-#
-# RTC interfaces
-#
-CONFIG_RTC_INTF_SYSFS=y
-CONFIG_RTC_INTF_PROC=y
-CONFIG_RTC_INTF_DEV=y
-# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
-# CONFIG_RTC_DRV_TEST is not set
-
-#
-# I2C RTC drivers
-#
-CONFIG_RTC_DRV_DS1307=m
-CONFIG_RTC_DRV_DS1672=m
-CONFIG_RTC_DRV_MAX6900=m
-CONFIG_RTC_DRV_RS5C372=m
-CONFIG_RTC_DRV_ISL1208=m
-CONFIG_RTC_DRV_X1205=m
-CONFIG_RTC_DRV_PCF8563=m
-CONFIG_RTC_DRV_PCF8583=m
-
-#
-# SPI RTC drivers
-#
-
-#
-# Platform RTC drivers
-#
-CONFIG_RTC_DRV_CMOS=m
-CONFIG_RTC_DRV_DS1553=m
-CONFIG_RTC_DRV_DS1742=m
-# CONFIG_RTC_DRV_M48T86 is not set
-CONFIG_RTC_DRV_V3020=m
-
-#
-# on-CPU RTC drivers
-#
-
-#
-# DMA Engine support
-#
-CONFIG_DMA_ENGINE=y
-
-#
-# DMA Clients
-#
-CONFIG_NET_DMA=y
-
-#
-# DMA Devices
-#
-CONFIG_INTEL_IOATDMA=m
-
-#
-# Auxiliary Display support
-#
-CONFIG_KS0108=m
-CONFIG_KS0108_PORT=0x378
-CONFIG_KS0108_DELAY=2
-CONFIG_CFAG12864B=m
-CONFIG_CFAG12864B_RATE=20
-
-#
-# Virtualization
-#
-CONFIG_KVM=m
-CONFIG_KVM_INTEL=m
-CONFIG_KVM_AMD=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT2_FS_XIP=y
-CONFIG_FS_XIP=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_EXT4DEV_FS=m
-CONFIG_EXT4DEV_FS_XATTR=y
-CONFIG_EXT4DEV_FS_POSIX_ACL=y
-CONFIG_EXT4DEV_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_JBD2=m
-# CONFIG_JBD2_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-CONFIG_GFS2_FS=m
-CONFIG_GFS2_FS_LOCKING_NOLOCK=m
-CONFIG_GFS2_FS_LOCKING_DLM=m
-# CONFIG_OCFS2_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_INOTIFY=y
-CONFIG_INOTIFY_USER=y
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-# CONFIG_FUSE_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PROC_SYSCTL=y
-CONFIG_SYSFS=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_POSIX_ACL is not set
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_ECRYPT_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_WRITEBUFFER=y
-CONFIG_JFFS2_SUMMARY=y
-# CONFIG_JFFS2_FS_XATTR is not set
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V2_ACL=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-# CONFIG_SUNRPC_BIND34 is not set
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-# CONFIG_SMB_FS is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_WEAK_PW_HASH=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_EXPERIMENTAL is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-# CONFIG_9P_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_KARMA_PARTITION=y
-CONFIG_EFI_PARTITION=y
-# CONFIG_SYSV68_PARTITION is not set
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Distributed Lock Manager
-#
-CONFIG_DLM=m
-# CONFIG_DLM_DEBUG is not set
-
-#
-# Instrumentation Support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-CONFIG_KPROBES=y
-
-#
-# Kernel hacking
-#
-CONFIG_TRACE_IRQFLAGS_SUPPORT=y
-# CONFIG_PRINTK_TIME is not set
-CONFIG_ENABLE_MUST_CHECK=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_UNUSED_SYMBOLS is not set
-CONFIG_DEBUG_FS=y
-# CONFIG_HEADERS_CHECK is not set
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SHIRQ is not set
-CONFIG_DETECT_SOFTLOCKUP=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_TIMER_STATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_RT_MUTEXES is not set
-# CONFIG_RT_MUTEX_TESTER is not set
-CONFIG_DEBUG_SPINLOCK=y
-# CONFIG_DEBUG_MUTEXES is not set
-# CONFIG_DEBUG_LOCK_ALLOC is not set
-# CONFIG_PROVE_LOCKING is not set
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_VM is not set
-# CONFIG_DEBUG_LIST is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_FORCED_INLINING=y
-# CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_LKDTM is not set
-# CONFIG_FAULT_INJECTION is not set
-# CONFIG_DEBUG_RODATA is not set
-# CONFIG_IOMMU_DEBUG is not set
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_STACK_USAGE is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_NETWORK_XFRM=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-# CONFIG_SECURITY_SELINUX is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_ALGAPI=y
-CONFIG_CRYPTO_ABLKCIPHER=m
-CONFIG_CRYPTO_BLKCIPHER=m
-CONFIG_CRYPTO_HASH=y
-CONFIG_CRYPTO_MANAGER=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_XCBC=m
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_TGR192=m
-CONFIG_CRYPTO_GF128MUL=m
-CONFIG_CRYPTO_ECB=m
-CONFIG_CRYPTO_CBC=m
-CONFIG_CRYPTO_PCBC=m
-# CONFIG_CRYPTO_LRW is not set
-CONFIG_CRYPTO_CRYPTD=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_FCRYPT=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_TWOFISH_COMMON=m
-CONFIG_CRYPTO_TWOFISH_X86_64=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_X86_64=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_ANUBIS=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_CAMELLIA=m
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Hardware crypto devices
-#
-
-#
-# Library routines
-#
-CONFIG_BITREVERSE=y
-CONFIG_CRC_CCITT=m
-CONFIG_CRC16=m
-CONFIG_CRC_ITU_T=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_REED_SOLOMON=m
-CONFIG_REED_SOLOMON_DEC16=y
-CONFIG_TEXTSEARCH=y
-CONFIG_TEXTSEARCH_KMP=m
-CONFIG_TEXTSEARCH_BM=m
-CONFIG_TEXTSEARCH_FSM=m
-CONFIG_PLIST=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config
deleted file mode 100644
index 2e4f3053dddda3b9240c595f91d0ecd3c7205fd3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-bigsmp.config
+++ /dev/null
@@ -1,2950 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-# CONFIG_X86_PC is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-CONFIG_MPENTIUMII=y
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=128
-CONFIG_SCHED_SMT=y
-# CONFIG_PREEMPT is not set
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_TSC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
-# CONFIG_NUMA is not set
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-CONFIG_IRQBALANCE=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-
-#
-# Special options
-#
-CONFIG_PROC_MM=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-# CONFIG_SOFTWARE_SUSPEND is not set
-# CONFIG_PM_DISK is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_TOSHIBA=m
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_INITRD=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-CONFIG_APM_DO_ENABLE=y
-# CONFIG_APM_CPU_IDLE is not set
-CONFIG_APM_DISPLAY_BLANK=y
-# CONFIG_APM_RTC_IS_GMT is not set
-CONFIG_APM_ALLOW_INTS=y
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=m
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_GX_SUSPMOD=m
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_ICH=m
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_SPEEDSTEP_LIB=m
-CONFIG_X86_LONGRUN=m
-CONFIG_X86_LONGHAUL=m
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCI_USE_VECTOR is not set
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-CONFIG_SCx200=m
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_AMD=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=m
-CONFIG_BINFMT_MISC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=m
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_CMDLINE_PARTS=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-CONFIG_MTD_PNC2000=m
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_SBC_GXX=m
-CONFIG_MTD_ELAN_104NC=m
-CONFIG_MTD_OCTAGON=m
-CONFIG_MTD_VMAX=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICH2ROM=m
-CONFIG_MTD_SCB2_FLASH=m
-CONFIG_MTD_NETtel=m
-CONFIG_MTD_DILNETPC=m
-CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
-CONFIG_MTD_L440GX=m
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_ISAPNP=y
-CONFIG_PNPBIOS=y
-CONFIG_PNPBIOS_PROC_FS=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_XD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_CARMEL=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=64000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-CONFIG_BLK_DEV_OPTI621=y
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-CONFIG_BLK_DEV_TRM290=y
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_IDE_CHIPSETS=y
-
-#
-# Note: most of these also require special kernel boot parameters
-#
-CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=y
-CONFIG_BLK_DEV_DTC2278=y
-CONFIG_BLK_DEV_HT6560B=y
-# CONFIG_BLK_DEV_PDC4030 is not set
-CONFIG_BLK_DEV_QD65XX=y
-CONFIG_BLK_DEV_UMC8672=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_7000FASST=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_SCSI_IN2000=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_DTC3280=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_PIO=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_GENERIC_NCR5380=m
-CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
-CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INIA100=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PSI240I=m
-CONFIG_SCSI_QLOGIC_FAS=m
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_T128=m
-CONFIG_SCSI_U14_34F=m
-CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
-CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
-CONFIG_SCSI_U14_34F_MAX_TAGS=8
-CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_NSP32=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_AHA152X=m
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_NINJA_SCSI=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-# CONFIG_SATA_INIC162X is not set
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-# CONFIG_PATA_ARTOP is not set
-CONFIG_PATA_ATIIXP=m
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CS5535 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_ISAPNP is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_LEGACY is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_QDI is not set
-CONFIG_PATA_RADISYS=m
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-# CONFIG_PATA_WINBOND_VLB is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_MCD=m
-CONFIG_MCD_IRQ=11
-CONFIG_MCD_BASE=0x300
-CONFIG_OPTCD=m
-CONFIG_SJCD=m
-CONFIG_ISP16_CDI=m
-CONFIG_CDU535=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
-CONFIG_ARCNET_COM20020_ISA=m
-CONFIG_ARCNET_COM20020_PCI=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-CONFIG_NET_SB1000=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_LANCE=m
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_AT1700=m
-CONFIG_DEPCA=m
-CONFIG_HP100=m
-CONFIG_NET_ISA=y
-CONFIG_E2100=m
-CONFIG_EWRK3=m
-CONFIG_EEXPRESS=m
-CONFIG_EEXPRESS_PRO=m
-CONFIG_HPLAN_PLUS=m
-CONFIG_HPLAN=m
-CONFIG_LP486E=m
-CONFIG_ETH16I=m
-CONFIG_NE2000=m
-CONFIG_ZNET=m
-CONFIG_SEEQ8005=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_AC3200=m
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_CS89x0=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-CONFIG_NET_POCKET=y
-CONFIG_ATP=m
-CONFIG_DE600=m
-CONFIG_DE620=m
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_IGB=m
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_SIS190=m
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-# CONFIG_2BUFF_MODE is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_QLA3XXX=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-CONFIG_NET_FC=y
-CONFIG_RCPCI=m
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-CONFIG_HOSTESS_SV11=m
-# CONFIG_COSA is not set
-CONFIG_DSCC4=m
-CONFIG_DSCC4_PCISYNC=y
-CONFIG_DSCC4_PCI_RST=y
-CONFIG_LANMEDIA=m
-CONFIG_SEALEVEL_4021=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-# CONFIG_WANXL_BUILD_FIRMWARE is not set
-CONFIG_PC300=m
-CONFIG_PC300_MLPPP=y
-CONFIG_N2=m
-CONFIG_C101=m
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-CONFIG_SDLA=m
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-# CONFIG_SBNI is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_ARCNET_COM20020_CS=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_NICSTAR=m
-CONFIG_ATM_NICSTAR_USE_SUNI=y
-CONFIG_ATM_NICSTAR_USE_IDT77105=y
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_IA=m
-# CONFIG_ATM_IA_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_BPQETHER=m
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_ROCKETPORT=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-CONFIG_QIC02_TAPE=m
-CONFIG_QIC02_DYNCONF=y
-
-#
-# Setting runtime QIC-02 configuration is done with qic02conf
-#
-
-#
-# from the tpqic02-support package.  It is available at
-#
-
-#
-# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
-#
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_AMD7XX_TCO=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-CONFIG_MIXCOMWD=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=m
-CONFIG_AGP_ALI=m
-CONFIG_AGP_ATI=m
-CONFIG_AGP_AMD=m
-CONFIG_AGP_AMD64=m
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_INTEL_MCH=m
-CONFIG_AGP_NVIDIA=m
-CONFIG_AGP_SIS=m
-CONFIG_AGP_SWORKS=m
-CONFIG_AGP_VIA=m
-CONFIG_AGP_EFFICEON=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_SCx200_GPIO=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_VTUNE=m
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_I2C=m
-CONFIG_SCx200_I2C_SCL=12
-CONFIG_SCx200_I2C_SDA=13
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_VIA686A=m
-# CONFIG_SENSORS_VT1211 is not set
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-# CONFIG_RADIO_MIROPCM20_RDS is not set
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_SF16FMR2=m
-CONFIG_RADIO_TERRATEC=m
-CONFIG_RADIO_TRUST=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
-CONFIG_DVB_ALPS_TDLB7=m
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin"
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_IMSTT=y
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_RIVA=m
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-# CONFIG_FB_ATY128 is not set
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_OPL4_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-CONFIG_SND_AD1816A=m
-CONFIG_SND_AD1848=m
-CONFIG_SND_CS4231=m
-CONFIG_SND_CS4232=m
-CONFIG_SND_CS4236=m
-CONFIG_SND_ES968=m
-CONFIG_SND_ES1688=m
-CONFIG_SND_ES18XX=m
-CONFIG_SND_GUSCLASSIC=m
-CONFIG_SND_GUSEXTREME=m
-CONFIG_SND_GUSMAX=m
-CONFIG_SND_INTERWAVE=m
-CONFIG_SND_INTERWAVE_STB=m
-CONFIG_SND_OPTI92X_AD1848=m
-CONFIG_SND_OPTI92X_CS4231=m
-CONFIG_SND_OPTI93X=m
-CONFIG_SND_SB8=m
-CONFIG_SND_SB16=m
-CONFIG_SND_SBAWE=m
-CONFIG_SND_SB16_CSP=y
-CONFIG_SND_WAVEFRONT=m
-CONFIG_SND_ALS100=m
-CONFIG_SND_AZT2320=m
-CONFIG_SND_CMI8330=m
-CONFIG_SND_DT019X=m
-CONFIG_SND_OPL3SA2=m
-CONFIG_SND_SGALAXY=m
-CONFIG_SND_SSCAPE=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_VXP440 is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-# CONFIG_SOUND_AD1816 is not set
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-# CONFIG_SOUND_AWE32_SYNTH is not set
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_SPEEDTOUCH=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_KPROBES is not set
-# CONFIG_DEBUGREG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_KDB is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-# CONFIG_HOOK is not set
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# IBM Crypto Hardware support
-#
-CONFIG_IBM_CRYPTO=m
-CONFIG_ICA_LEEDSLITE=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="bigsmp"
-CONFIG_RELEASE="7.308"
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_PC=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config
deleted file mode 100644
index 9971cfae0f63dd06f971f30e699f4c9caf17122b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686-smp.config
+++ /dev/null
@@ -1,2888 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_GENERIC_ISA_DMA=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-# CONFIG_X86_PC is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-CONFIG_MPENTIUMII=y
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-# CONFIG_HPET_TIMER is not set
-# CONFIG_HPET_EMULATE_RTC is not set
-CONFIG_SMP=y
-CONFIG_NR_CPUS=128
-CONFIG_SCHED_SMT=y
-# CONFIG_PREEMPT is not set
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_TSC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
-# CONFIG_NUMA is not set
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-CONFIG_IRQBALANCE=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-
-#
-# Special options
-#
-CONFIG_PROC_MM=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-# CONFIG_SOFTWARE_SUSPEND is not set
-# CONFIG_PM_DISK is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_TOSHIBA=m
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_INITRD=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-CONFIG_APM_DO_ENABLE=y
-# CONFIG_APM_CPU_IDLE is not set
-CONFIG_APM_DISPLAY_BLANK=y
-# CONFIG_APM_RTC_IS_GMT is not set
-CONFIG_APM_ALLOW_INTS=y
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=m
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_GX_SUSPMOD=m
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-# CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI is not set
-CONFIG_X86_SPEEDSTEP_ICH=m
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_SPEEDSTEP_LIB=m
-CONFIG_X86_LONGRUN=m
-CONFIG_X86_LONGHAUL=m
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCI_USE_VECTOR is not set
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-CONFIG_SCx200=m
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_AMD=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=m
-CONFIG_BINFMT_MISC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_PARTITIONS is not set
-CONFIG_MTD_CONCAT=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_OCTAGON=m
-CONFIG_MTD_VMAX=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICH2ROM=m
-CONFIG_MTD_SCB2_FLASH=m
-CONFIG_MTD_L440GX=m
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_ISAPNP=y
-CONFIG_PNPBIOS=y
-CONFIG_PNPBIOS_PROC_FS=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_XD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_CARMEL=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=64000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-CONFIG_BLK_DEV_OPTI621=y
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-CONFIG_BLK_DEV_TRM290=y
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_IDE_CHIPSETS=y
-
-#
-# Note: most of these also require special kernel boot parameters
-#
-CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=y
-CONFIG_BLK_DEV_DTC2278=y
-CONFIG_BLK_DEV_HT6560B=y
-# CONFIG_BLK_DEV_PDC4030 is not set
-CONFIG_BLK_DEV_QD65XX=y
-CONFIG_BLK_DEV_UMC8672=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_7000FASST=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_SCSI_IN2000=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=y
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PATA_PDC2027X=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_DTC3280=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_PIO=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_GENERIC_NCR5380=m
-CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
-CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INIA100=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PSI240I=m
-CONFIG_SCSI_QLOGIC_FAS=m
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_T128=m
-CONFIG_SCSI_U14_34F=m
-CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
-CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
-CONFIG_SCSI_U14_34F_MAX_TAGS=8
-CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_NSP32=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_AHA152X=m
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_NINJA_SCSI=m
-CONFIG_PCMCIA_QLOGIC=m
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_MCD=m
-CONFIG_MCD_IRQ=11
-CONFIG_MCD_BASE=0x300
-CONFIG_OPTCD=m
-CONFIG_SJCD=m
-CONFIG_ISP16_CDI=m
-CONFIG_CDU535=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
-CONFIG_ARCNET_COM20020_ISA=m
-CONFIG_ARCNET_COM20020_PCI=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-CONFIG_NET_SB1000=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_LANCE=m
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_AT1700=m
-CONFIG_DEPCA=m
-CONFIG_HP100=m
-CONFIG_NET_ISA=y
-CONFIG_E2100=m
-CONFIG_EWRK3=m
-CONFIG_EEXPRESS=m
-CONFIG_EEXPRESS_PRO=m
-CONFIG_HPLAN_PLUS=m
-CONFIG_HPLAN=m
-CONFIG_LP486E=m
-CONFIG_ETH16I=m
-CONFIG_NE2000=m
-CONFIG_ZNET=m
-CONFIG_SEEQ8005=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_AC3200=m
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_CS89x0=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-CONFIG_NET_POCKET=y
-CONFIG_ATP=m
-CONFIG_DE600=m
-CONFIG_DE620=m
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_SIS190=m
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-# CONFIG_2BUFF_MODE is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-
-#
-# Quadrics QsNet
-#
-CONFIG_QSNET=m
-CONFIG_ELAN3=m
-CONFIG_ELAN4=m
-CONFIG_EP=m
-CONFIG_EIP=m
-CONFIG_RMS=m
-CONFIG_JTAG=m
-CONFIG_NET_FC=y
-CONFIG_RCPCI=m
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-CONFIG_HOSTESS_SV11=m
-# CONFIG_COSA is not set
-CONFIG_DSCC4=m
-CONFIG_DSCC4_PCISYNC=y
-CONFIG_DSCC4_PCI_RST=y
-CONFIG_LANMEDIA=m
-CONFIG_SEALEVEL_4021=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-# CONFIG_WANXL_BUILD_FIRMWARE is not set
-CONFIG_PC300=m
-CONFIG_PC300_MLPPP=y
-CONFIG_N2=m
-CONFIG_C101=m
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-CONFIG_SDLA=m
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-# CONFIG_SBNI is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_ARCNET_COM20020_CS=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_NICSTAR=m
-CONFIG_ATM_NICSTAR_USE_SUNI=y
-CONFIG_ATM_NICSTAR_USE_IDT77105=y
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_IA=m
-# CONFIG_ATM_IA_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_BPQETHER=m
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_ROCKETPORT=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-CONFIG_QIC02_TAPE=m
-CONFIG_QIC02_DYNCONF=y
-
-#
-# Setting runtime QIC-02 configuration is done with qic02conf
-#
-
-#
-# from the tpqic02-support package.  It is available at
-#
-
-#
-# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
-#
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_AMD7XX_TCO=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-CONFIG_MIXCOMWD=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=m
-CONFIG_AGP_ALI=m
-CONFIG_AGP_ATI=m
-CONFIG_AGP_AMD=m
-CONFIG_AGP_AMD64=m
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_INTEL_MCH=m
-CONFIG_AGP_NVIDIA=m
-CONFIG_AGP_SIS=m
-CONFIG_AGP_SWORKS=m
-CONFIG_AGP_VIA=m
-CONFIG_AGP_EFFICEON=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_SCx200_GPIO=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_VTUNE=m
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_I2C=m
-CONFIG_SCx200_I2C_SCL=12
-CONFIG_SCx200_I2C_SDA=13
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-# CONFIG_RADIO_MIROPCM20_RDS is not set
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_SF16FMR2=m
-CONFIG_RADIO_TERRATEC=m
-CONFIG_RADIO_TRUST=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
-CONFIG_DVB_ALPS_TDLB7=m
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin"
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_IMSTT=y
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_RIVA=m
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-# CONFIG_FB_ATY128 is not set
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_OPL4_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-CONFIG_SND_AD1816A=m
-CONFIG_SND_AD1848=m
-CONFIG_SND_CS4231=m
-CONFIG_SND_CS4232=m
-CONFIG_SND_CS4236=m
-CONFIG_SND_ES968=m
-CONFIG_SND_ES1688=m
-CONFIG_SND_ES18XX=m
-CONFIG_SND_GUSCLASSIC=m
-CONFIG_SND_GUSEXTREME=m
-CONFIG_SND_GUSMAX=m
-CONFIG_SND_INTERWAVE=m
-CONFIG_SND_INTERWAVE_STB=m
-CONFIG_SND_OPTI92X_AD1848=m
-CONFIG_SND_OPTI92X_CS4231=m
-CONFIG_SND_OPTI93X=m
-CONFIG_SND_SB8=m
-CONFIG_SND_SB16=m
-CONFIG_SND_SBAWE=m
-CONFIG_SND_SB16_CSP=y
-CONFIG_SND_WAVEFRONT=m
-CONFIG_SND_ALS100=m
-CONFIG_SND_AZT2320=m
-CONFIG_SND_CMI8330=m
-CONFIG_SND_DT019X=m
-CONFIG_SND_OPL3SA2=m
-CONFIG_SND_SGALAXY=m
-CONFIG_SND_SSCAPE=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_VXP440 is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-# CONFIG_SOUND_AD1816 is not set
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-# CONFIG_SOUND_AWE32_SYNTH is not set
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_SPEEDTOUCH=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_KPROBES is not set
-# CONFIG_DEBUGREG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_KDB is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-# CONFIG_HOOK is not set
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# IBM Crypto Hardware support
-#
-CONFIG_IBM_CRYPTO=m
-CONFIG_ICA_LEEDSLITE=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="bigsmp"
-CONFIG_RELEASE="7.191"
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_PC=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config
deleted file mode 100644
index 0f2ef09904286dfc0a23bc8e3f65c38b205aa999..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-i686.config
+++ /dev/null
@@ -1,2963 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-CONFIG_MPENTIUMII=y
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
-# CONFIG_X86_UP_APIC is not set
-CONFIG_X86_TSC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_EFI=y
-CONFIG_BOOT_IOREMAP=y
-CONFIG_REGPARM=y
-
-#
-# Special options
-#
-CONFIG_PROC_MM=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-# CONFIG_SOFTWARE_SUSPEND is not set
-# CONFIG_PM_DISK is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-CONFIG_ACPI_TOSHIBA=m
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_ACPI_INITRD=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-CONFIG_APM_DO_ENABLE=y
-# CONFIG_APM_CPU_IDLE is not set
-CONFIG_APM_DISPLAY_BLANK=y
-# CONFIG_APM_RTC_IS_GMT is not set
-CONFIG_APM_ALLOW_INTS=y
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=m
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_GX_SUSPMOD=m
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_SPEEDSTEP_ICH=m
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_SPEEDSTEP_LIB=m
-CONFIG_X86_LONGRUN=m
-CONFIG_X86_LONGHAUL=m
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-CONFIG_SCx200=m
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM=y
-CONFIG_HOTPLUG_PCI_AMD=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=m
-CONFIG_BINFMT_MISC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=m
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_CMDLINE_PARTS=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-CONFIG_MTD_PNC2000=m
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_SBC_GXX=m
-CONFIG_MTD_ELAN_104NC=m
-CONFIG_MTD_OCTAGON=m
-CONFIG_MTD_VMAX=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-CONFIG_MTD_ICH2ROM=m
-CONFIG_MTD_SCB2_FLASH=m
-CONFIG_MTD_NETtel=m
-CONFIG_MTD_DILNETPC=m
-CONFIG_MTD_DILNETPC_BOOTSIZE=0x80000
-CONFIG_MTD_L440GX=m
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-CONFIG_ISAPNP=y
-CONFIG_PNPBIOS=y
-CONFIG_PNPBIOS_PROC_FS=y
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-CONFIG_BLK_DEV_XD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_BPCK6=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_CARMEL=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=64000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-CONFIG_BLK_DEV_OPTI621=y
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-CONFIG_BLK_DEV_TRM290=y
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_IDE_CHIPSETS=y
-
-#
-# Note: most of these also require special kernel boot parameters
-#
-CONFIG_BLK_DEV_4DRIVES=y
-CONFIG_BLK_DEV_ALI14XX=y
-CONFIG_BLK_DEV_DTC2278=y
-CONFIG_BLK_DEV_HT6560B=y
-# CONFIG_BLK_DEV_PDC4030 is not set
-CONFIG_BLK_DEV_QD65XX=y
-CONFIG_BLK_DEV_UMC8672=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_7000FASST=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-CONFIG_SCSI_AHA1542=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_DPT_I2O=m
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_SCSI_IN2000=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_DTC3280=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_PIO=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_GENERIC_NCR5380=m
-CONFIG_SCSI_GENERIC_NCR5380_MMIO=m
-CONFIG_SCSI_GENERIC_NCR53C400=y
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INIA100=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_NCR53C406A=m
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-CONFIG_SCSI_PAS16=m
-CONFIG_SCSI_PSI240I=m
-CONFIG_SCSI_QLOGIC_FAS=m
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_SYM53C416=m
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_T128=m
-CONFIG_SCSI_U14_34F=m
-CONFIG_SCSI_U14_34F_TAGGED_QUEUE=y
-CONFIG_SCSI_U14_34F_LINKED_COMMANDS=y
-CONFIG_SCSI_U14_34F_MAX_TAGS=8
-CONFIG_SCSI_ULTRASTOR=m
-CONFIG_SCSI_NSP32=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_AHA152X=m
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_NINJA_SCSI=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-# CONFIG_SATA_INIC162X is not set
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-# CONFIG_PATA_ARTOP is not set
-CONFIG_PATA_ATIIXP=m
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CS5535 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-# CONFIG_PATA_ISAPNP is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_LEGACY is not set
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-# CONFIG_PATA_QDI is not set
-CONFIG_PATA_RADISYS=m
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-# CONFIG_PATA_WINBOND_VLB is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-CONFIG_CD_NO_IDESCSI=y
-CONFIG_AZTCD=m
-CONFIG_GSCD=m
-CONFIG_MCD=m
-CONFIG_MCD_IRQ=11
-CONFIG_MCD_BASE=0x300
-CONFIG_OPTCD=m
-# CONFIG_CM206 is not set
-CONFIG_SJCD=m
-CONFIG_ISP16_CDI=m
-# CONFIG_CDU31A is not set
-CONFIG_CDU535=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_LTPC=m
-CONFIG_COPS=m
-CONFIG_COPS_DAYNA=y
-CONFIG_COPS_TANGENT=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-CONFIG_ARCNET_COM20020=m
-CONFIG_ARCNET_COM20020_ISA=m
-CONFIG_ARCNET_COM20020_PCI=m
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-CONFIG_NET_SB1000=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_EL1=m
-CONFIG_EL2=m
-CONFIG_ELPLUS=m
-CONFIG_EL16=m
-CONFIG_EL3=m
-CONFIG_3C515=m
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-CONFIG_LANCE=m
-CONFIG_NET_VENDOR_SMC=y
-CONFIG_WD80x3=m
-CONFIG_ULTRA=m
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-# CONFIG_NI5010 is not set
-CONFIG_NI52=m
-CONFIG_NI65=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-CONFIG_AT1700=m
-CONFIG_DEPCA=m
-CONFIG_HP100=m
-CONFIG_NET_ISA=y
-CONFIG_E2100=m
-CONFIG_EWRK3=m
-CONFIG_EEXPRESS=m
-CONFIG_EEXPRESS_PRO=m
-CONFIG_HPLAN_PLUS=m
-CONFIG_HPLAN=m
-CONFIG_LP486E=m
-CONFIG_ETH16I=m
-CONFIG_NE2000=m
-CONFIG_ZNET=m
-CONFIG_SEEQ8005=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_AC3200=m
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_CS89x0=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-CONFIG_NET_POCKET=y
-CONFIG_ATP=m
-CONFIG_DE600=m
-CONFIG_DE620=m
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_IGB=m
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_SIS190=m
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-# CONFIG_2BUFF_MODE is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_QLA3XXX=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-CONFIG_NET_FC=y
-CONFIG_RCPCI=m
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-CONFIG_HOSTESS_SV11=m
-# CONFIG_COSA is not set
-CONFIG_DSCC4=m
-CONFIG_DSCC4_PCISYNC=y
-CONFIG_DSCC4_PCI_RST=y
-CONFIG_LANMEDIA=m
-CONFIG_SEALEVEL_4021=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-# CONFIG_WANXL_BUILD_FIRMWARE is not set
-CONFIG_PC300=m
-CONFIG_PC300_MLPPP=y
-CONFIG_N2=m
-CONFIG_C101=m
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-CONFIG_SDLA=m
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-# CONFIG_SBNI is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_ARCNET_COM20020_CS=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_NICSTAR=m
-CONFIG_ATM_NICSTAR_USE_SUNI=y
-CONFIG_ATM_NICSTAR_USE_IDT77105=y
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_IA=m
-# CONFIG_ATM_IA_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-# CONFIG_MKISS is not set
-# CONFIG_6PACK is not set
-CONFIG_BPQETHER=m
-# CONFIG_DMASCC is not set
-CONFIG_SCC=m
-CONFIG_SCC_DELAY=y
-CONFIG_SCC_TRXECHO=y
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_BAYCOM_EPP=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_NSC_FIR=m
-CONFIG_WINBOND_FIR=m
-CONFIG_TOSHIBA_FIR=m
-CONFIG_SMC_IRCC_FIR=m
-CONFIG_ALI_FIR=m
-CONFIG_VLSI_FIR=m
-CONFIG_VIA_FIR=m
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_TPAM=m
-# CONFIG_HYSDN is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_DIGI is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-CONFIG_STALDRV=y
-# CONFIG_STALLION is not set
-# CONFIG_ISTALLION is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_MANY_PORTS=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-CONFIG_QIC02_TAPE=m
-CONFIG_QIC02_DYNCONF=y
-
-#
-# Setting runtime QIC-02 configuration is done with qic02conf
-#
-
-#
-# from the tpqic02-support package.  It is available at
-#
-
-#
-# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
-#
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_AMD7XX_TCO=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-CONFIG_MIXCOMWD=m
-CONFIG_WDT=m
-CONFIG_WDT_501=y
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=m
-CONFIG_AGP_ALI=m
-CONFIG_AGP_ATI=m
-CONFIG_AGP_AMD=m
-CONFIG_AGP_AMD64=m
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_INTEL_MCH=m
-CONFIG_AGP_NVIDIA=m
-CONFIG_AGP_SIS=m
-CONFIG_AGP_SWORKS=m
-CONFIG_AGP_VIA=m
-CONFIG_AGP_EFFICEON=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_SCx200_GPIO=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_VTUNE=m
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-# CONFIG_LIRC_PARALLEL is not set
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_ELEKTOR is not set
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_I2C=m
-CONFIG_SCx200_I2C_SCL=12
-CONFIG_SCx200_I2C_SDA=13
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_VIA686A=m
-# CONFIG_SENSORS_VT1211 is not set
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_PMS=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_CADET=m
-CONFIG_RADIO_RTRACK=m
-CONFIG_RADIO_RTRACK2=m
-CONFIG_RADIO_AZTECH=m
-CONFIG_RADIO_GEMTEK=m
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-CONFIG_RADIO_MIROPCM20=m
-# CONFIG_RADIO_MIROPCM20_RDS is not set
-CONFIG_RADIO_SF16FMI=m
-CONFIG_RADIO_SF16FMR2=m
-CONFIG_RADIO_TERRATEC=m
-CONFIG_RADIO_TRUST=m
-CONFIG_RADIO_TYPHOON=m
-CONFIG_RADIO_TYPHOON_PROC_FS=y
-CONFIG_RADIO_ZOLTRIX=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
-CONFIG_DVB_ALPS_TDLB7=m
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin"
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_IMSTT=y
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_RIVA=m
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-# CONFIG_FB_ATY128 is not set
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_OPL4_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-CONFIG_SND_AD1816A=m
-CONFIG_SND_AD1848=m
-CONFIG_SND_CS4231=m
-CONFIG_SND_CS4232=m
-CONFIG_SND_CS4236=m
-CONFIG_SND_ES968=m
-CONFIG_SND_ES1688=m
-CONFIG_SND_ES18XX=m
-CONFIG_SND_GUSCLASSIC=m
-CONFIG_SND_GUSEXTREME=m
-CONFIG_SND_GUSMAX=m
-CONFIG_SND_INTERWAVE=m
-CONFIG_SND_INTERWAVE_STB=m
-CONFIG_SND_OPTI92X_AD1848=m
-CONFIG_SND_OPTI92X_CS4231=m
-CONFIG_SND_OPTI93X=m
-CONFIG_SND_SB8=m
-CONFIG_SND_SB16=m
-CONFIG_SND_SBAWE=m
-CONFIG_SND_SB16_CSP=y
-CONFIG_SND_WAVEFRONT=m
-CONFIG_SND_ALS100=m
-CONFIG_SND_AZT2320=m
-CONFIG_SND_CMI8330=m
-CONFIG_SND_DT019X=m
-CONFIG_SND_OPL3SA2=m
-CONFIG_SND_SGALAXY=m
-CONFIG_SND_SSCAPE=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_VXP440 is not set
-# CONFIG_SND_PDAUDIOCF is not set
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-# CONFIG_SOUND_AD1816 is not set
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-# CONFIG_SOUND_AWE32_SYNTH is not set
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_SPEEDTOUCH=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-CONFIG_EARLY_PRINTK=y
-# CONFIG_KPROBES is not set
-# CONFIG_DEBUGREG is not set
-CONFIG_DEBUG_STACKOVERFLOW=y
-# CONFIG_DEBUG_STACK_USAGE is not set
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_DEBUG_HIGHMEM is not set
-CONFIG_DEBUG_INFO=y
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_FRAME_POINTER is not set
-# CONFIG_KDB is not set
-# CONFIG_HOOK is not set
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# IBM Crypto Hardware support
-#
-CONFIG_IBM_CRYPTO=m
-CONFIG_ICA_LEEDSLITE=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="bigsmp"
-CONFIG_RELEASE="7.308"
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_PC=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config
deleted file mode 100644
index c205dc48e07075a90169aa1333d641fbaee9ebd4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64-smp.config
+++ /dev/null
@@ -1,2411 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_PAGG=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_CPUSETS=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_EFI=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_IA64_L1_CACHE_SHIFT=7
-# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_SGI_SN_XPC=m
-CONFIG_FORCE_MAX_ZONEORDER=18
-CONFIG_SMP=y
-CONFIG_NR_CPUS=128
-CONFIG_SCHED_SMT=y
-# CONFIG_PREEMPT is not set
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_IA32_SUPPORT=y
-CONFIG_COMPAT=y
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_EFI_VARS=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_ACPI=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_NUMA=y
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_INITRD=y
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_TCIC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_PARTITIONS is not set
-CONFIG_MTD_CONCAT=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_CARMEL is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=128000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=m
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=y
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PATA_PDC2027X=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-# CONFIG_SCSI_EATA is not set
-CONFIG_SCSI_EATA_PIO=m
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-# CONFIG_ARCNET_COM90xx is not set
-CONFIG_ARCNET_COM90xxIO=m
-# CONFIG_ARCNET_RIM_I is not set
-# CONFIG_ARCNET_COM20020 is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-# CONFIG_E100_NAPI is not set
-# CONFIG_FEALNX is not set
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-# CONFIG_SIS190 is not set
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-# CONFIG_2BUFF_MODE is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-# CONFIG_PRISM54 is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Quadrics QsNet
-#
-CONFIG_QSNET=m
-CONFIG_ELAN3=m
-CONFIG_ELAN4=m
-CONFIG_EP=m
-CONFIG_EIP=m
-CONFIG_RMS=m
-CONFIG_JTAG=m
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-# CONFIG_DSCC4 is not set
-CONFIG_LANMEDIA=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-# CONFIG_WANXL_BUILD_FIRMWARE is not set
-# CONFIG_PC300 is not set
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-CONFIG_XPNET=m
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_BPQETHER=m
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-# CONFIG_VLSI_FIR is not set
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-# CONFIG_BT_HCIUSB is not set
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-# CONFIG_ISDN_DIVAS_MAINT is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-# CONFIG_GAMEPORT_EMU10K1 is not set
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_ROCKETPORT=m
-# CONFIG_SYNCLINK is not set
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-CONFIG_SGI_L1_SERIAL=y
-CONFIG_SGI_L1_SERIAL_CONSOLE=y
-CONFIG_FETCHOP=m
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_HCDP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_ACPI=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-# CONFIG_QIC02_TAPE is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_GEN_RTC is not set
-CONFIG_EFI_RTC=y
-# CONFIG_DTLK is not set
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-
-#
-# Ftape, the floppy tape device driver
-#
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=m
-CONFIG_AGP_I460=m
-CONFIG_AGP_HP_ZX1=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=m
-CONFIG_VTUNE=m
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-# CONFIG_SENSORS_ASB100 is not set
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-# CONFIG_SENSORS_LM90 is not set
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_W83781D=m
-# CONFIG_SENSORS_W83L785TS is not set
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-# CONFIG_DVB_SP887X is not set
-# CONFIG_DVB_ALPS_TDLB7 is not set
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-# CONFIG_DVB_TDA1004X is not set
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_IMSTT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-# CONFIG_FB_SIS is not set
-CONFIG_FB_NEOMAGIC=m
-# CONFIG_FB_KYRO is not set
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_SOUND_OSS is not set
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-# CONFIG_USB_LED is not set
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_SPEEDTOUCH=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_KDB is not set
-# CONFIG_KPROBES is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-# CONFIG_DEBUG_INFO is not set
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="default"
-CONFIG_RELEASE="0"
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config
deleted file mode 100644
index c205dc48e07075a90169aa1333d641fbaee9ebd4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ia64.config
+++ /dev/null
@@ -1,2411 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_PAGG=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_CPUSETS=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_EFI=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_IA64_L1_CACHE_SHIFT=7
-# CONFIG_MCKINLEY_ASTEP_SPECIFIC is not set
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_SGI_SN_XPC=m
-CONFIG_FORCE_MAX_ZONEORDER=18
-CONFIG_SMP=y
-CONFIG_NR_CPUS=128
-CONFIG_SCHED_SMT=y
-# CONFIG_PREEMPT is not set
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_IA32_SUPPORT=y
-CONFIG_COMPAT=y
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_EFI_VARS=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_ACPI=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-CONFIG_ACPI_NUMA=y
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_INITRD=y
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_TCIC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-# CONFIG_MTD_PARTITIONS is not set
-CONFIG_MTD_CONCAT=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_CARMEL is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=128000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=m
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=m
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_SATA=y
-CONFIG_SCSI_SATA_AHCI=m
-CONFIG_SCSI_SATA_SVW=m
-CONFIG_SCSI_ATA_PIIX=m
-CONFIG_SCSI_SATA_NV=m
-CONFIG_SCSI_PATA_PDC2027X=m
-CONFIG_SCSI_SATA_PROMISE=m
-CONFIG_SCSI_SATA_QSTOR=m
-CONFIG_SCSI_SATA_SX4=m
-CONFIG_SCSI_SATA_SIL=m
-CONFIG_SCSI_SATA_SIS=m
-CONFIG_SCSI_SATA_ULI=m
-CONFIG_SCSI_SATA_VIA=m
-CONFIG_SCSI_SATA_VITESSE=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-# CONFIG_SCSI_EATA is not set
-CONFIG_SCSI_EATA_PIO=m
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-CONFIG_DECNET_NF_GRABULATOR=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=y
-CONFIG_ATM_CLIP=y
-CONFIG_ATM_CLIP_NO_ICMP=y
-CONFIG_ATM_LANE=m
-CONFIG_ATM_MPOA=m
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_ATM=y
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-# CONFIG_ARCNET_COM90xx is not set
-CONFIG_ARCNET_COM90xxIO=m
-# CONFIG_ARCNET_RIM_I is not set
-# CONFIG_ARCNET_COM20020 is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-# CONFIG_E100_NAPI is not set
-# CONFIG_FEALNX is not set
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-# CONFIG_SIS190 is not set
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-# CONFIG_2BUFF_MODE is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-# CONFIG_PRISM54 is not set
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-# CONFIG_TMS380TR is not set
-
-#
-# Quadrics QsNet
-#
-CONFIG_QSNET=m
-CONFIG_ELAN3=m
-CONFIG_ELAN4=m
-CONFIG_EP=m
-CONFIG_EIP=m
-CONFIG_RMS=m
-CONFIG_JTAG=m
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-CONFIG_WAN=y
-# CONFIG_DSCC4 is not set
-CONFIG_LANMEDIA=m
-CONFIG_SYNCLINK_SYNCPPP=m
-CONFIG_HDLC=m
-CONFIG_HDLC_RAW=y
-CONFIG_HDLC_RAW_ETH=y
-CONFIG_HDLC_CISCO=y
-CONFIG_HDLC_FR=y
-CONFIG_HDLC_PPP=y
-CONFIG_HDLC_X25=y
-CONFIG_PCI200SYN=m
-CONFIG_WANXL=m
-# CONFIG_WANXL_BUILD_FIRMWARE is not set
-# CONFIG_PC300 is not set
-CONFIG_FARSYNC=m
-CONFIG_DLCI=m
-CONFIG_DLCI_COUNT=24
-CONFIG_DLCI_MAX=8
-# CONFIG_WAN_ROUTER_DRIVERS is not set
-CONFIG_LAPBETHER=m
-CONFIG_X25_ASY=m
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-CONFIG_ATM_ZATM=m
-# CONFIG_ATM_ZATM_DEBUG is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-CONFIG_ATM_IDT77252_RCV_ALL=y
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-CONFIG_ATM_FORE200E_PCA=y
-CONFIG_ATM_FORE200E_PCA_DEFAULT_FW=y
-CONFIG_ATM_FORE200E_TX_RETRY=16
-CONFIG_ATM_FORE200E_DEBUG=0
-CONFIG_ATM_FORE200E=m
-CONFIG_ATM_HE=m
-CONFIG_ATM_HE_USE_SUNI=y
-CONFIG_XPNET=m
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_BPQETHER=m
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-# CONFIG_VLSI_FIR is not set
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-# CONFIG_BT_HCIUSB is not set
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-# CONFIG_ISDN_DIVAS_MAINT is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-# CONFIG_GAMEPORT_EMU10K1 is not set
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_ROCKETPORT=m
-# CONFIG_SYNCLINK is not set
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-CONFIG_SGI_L1_SERIAL=y
-CONFIG_SGI_L1_SERIAL_CONSOLE=y
-CONFIG_FETCHOP=m
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-CONFIG_SGI_MBCS=m
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_HCDP=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_ACPI=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-# CONFIG_SERIAL_8250_DETECT_IRQ is not set
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-# CONFIG_QIC02_TAPE is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-CONFIG_IPMI_PANIC_STRING=y
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-# CONFIG_GEN_RTC is not set
-CONFIG_EFI_RTC=y
-# CONFIG_DTLK is not set
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-
-#
-# Ftape, the floppy tape device driver
-#
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=m
-CONFIG_AGP_I460=m
-CONFIG_AGP_HP_ZX1=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=m
-CONFIG_VTUNE=m
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-# CONFIG_SENSORS_ASB100 is not set
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-# CONFIG_SENSORS_LM90 is not set
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_VT1211=m
-CONFIG_SENSORS_W83781D=m
-# CONFIG_SENSORS_W83L785TS is not set
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-# CONFIG_VIDEO_CPIA is not set
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-# CONFIG_DVB_SP887X is not set
-# CONFIG_DVB_ALPS_TDLB7 is not set
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-# CONFIG_DVB_TDA1004X is not set
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-CONFIG_DVB_AV7110_OSD=y
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_PM2=m
-CONFIG_FB_PM2_FIFO_DISCONNECT=y
-CONFIG_FB_CYBER2000=m
-CONFIG_FB_IMSTT=y
-CONFIG_FB_RIVA=m
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-# CONFIG_FB_SIS is not set
-CONFIG_FB_NEOMAGIC=m
-# CONFIG_FB_KYRO is not set
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-# CONFIG_SOUND_EMU10K1 is not set
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-# CONFIG_SOUND_VIA82CXXX is not set
-# CONFIG_SOUND_OSS is not set
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-# CONFIG_USB_EMI62 is not set
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-# CONFIG_USB_LED is not set
-CONFIG_USB_CYTHERM=m
-CONFIG_USB_SPEEDTOUCH=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_KDB is not set
-# CONFIG_KPROBES is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-# CONFIG_DEBUG_INFO is not set
-CONFIG_SYSVIPC_COMPAT=y
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="default"
-CONFIG_RELEASE="0"
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config
deleted file mode 100644
index 76b4290fae6247649f39e0d6cd0f9ca9a689a834..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc-pseries64.config
+++ /dev/null
@@ -1,1454 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_COMPAT=y
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCE_MAX_ZONEORDER=13
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=19
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Platform support
-#
-# CONFIG_PPC_ISERIES is not set
-CONFIG_PPC_PSERIES=y
-CONFIG_PPC=y
-CONFIG_PPC64=y
-CONFIG_PPC_OF=y
-CONFIG_ALTIVEC=y
-# CONFIG_PPC_PMAC is not set
-CONFIG_PPC_SPLPAR=y
-# CONFIG_BOOTX_TEXT is not set
-# CONFIG_POWER4_ONLY is not set
-# CONFIG_IOMMU_VMERGE is not set
-CONFIG_SMP=y
-CONFIG_IRQ_ALL_CPUS=y
-CONFIG_NR_CPUS=128
-# CONFIG_HMT is not set
-CONFIG_DISCONTIGMEM=y
-CONFIG_NUMA=y
-CONFIG_SCHED_SMT=y
-CONFIG_PPC_RTAS=y
-CONFIG_RTAS_FLASH=m
-CONFIG_SCANLOG=m
-CONFIG_LPARCFG=y
-CONFIG_PPC_VPURR=y
-
-#
-# General setup
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-CONFIG_HOTPLUG_CPU=y
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-CONFIG_HOTPLUG_PCI_RPA=y
-CONFIG_HOTPLUG_PCI_RPA_DLPAR=y
-CONFIG_PROC_DEVICETREE=y
-# CONFIG_CMDLINE_BOOL is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Bluesmoke - error detection and reporting (RAS)
-#
-# CONFIG_BLUESMOKE is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-# CONFIG_PARIDE is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_CARMEL is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=123456
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-CONFIG_IDE_TASK_IOCTL=y
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_SL82C105=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-CONFIG_BLK_DEV_IDEDMA_FORCED=y
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_ADMA=y
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-CONFIG_BLK_DEV_SIIMAGE=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_AIC79XX_NEW is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-CONFIG_SCSI_IBMVSCSI=m
-CONFIG_SCSI_IBMVSCSIS=m
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_PPA is not set
-# CONFIG_SCSI_IMM is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-CONFIG_SCSI_QLA2300=m
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA6322 is not set
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-CONFIG_SCSI_DEBUG=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-
-#
-# Texas Instruments PCILynx requires I2C
-#
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Macintosh device drivers
-#
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-# CONFIG_IP_ROUTE_FWMARK is not set
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-# CONFIG_IP_ROUTE_VERBOSE is not set
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-# CONFIG_IP_VS is not set
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-# CONFIG_DECNET is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-# CONFIG_BRIDGE_EBT_SNAT is not set
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-CONFIG_SCTP_HMAC_NONE=y
-# CONFIG_SCTP_HMAC_SHA1 is not set
-# CONFIG_SCTP_HMAC_MD5 is not set
-# CONFIG_ATM is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-CONFIG_IPX_INTERN=y
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-# CONFIG_ETHERTAP is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-# CONFIG_OAKNET is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-# CONFIG_8139TOO is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_VIA_RHINE is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-CONFIG_ACENIC_OMIT_TIGON_I=y
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000_NEW=m
-CONFIG_E1000_NEW_NAPI=y
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SK98LIN is not set
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BROADCOM_NEW=m
-# CONFIG_NET_BCM44 is not set
-CONFIG_TIGON3_NEW=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_IBMVETH=m
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-# CONFIG_IBMLS is not set
-# CONFIG_3C359 is not set
-# CONFIG_TMS380TR is not set
-CONFIG_NET_FC=y
-CONFIG_NET_LPFC=m
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-# CONFIG_SERIO_SERPORT is not set
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_PMACZILOG is not set
-CONFIG_SERIAL_ICOM=m
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_PRINTER is not set
-# CONFIG_PPDEV is not set
-# CONFIG_TIPAR is not set
-CONFIG_HVC_CONSOLE=y
-CONFIG_HVCS=m
-# CONFIG_QIC02_TAPE is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-
-#
-# PCI-based Watchdog Cards
-#
-# CONFIG_PCIPCWATCHDOG is not set
-# CONFIG_WDTPCI is not set
-
-#
-# USB-based Watchdog Cards
-#
-# CONFIG_USBPCWATCHDOG is not set
-# CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-
-#
-# Linux InfraRed Controller
-#
-# CONFIG_LIRC_SUPPORT is not set
-# CONFIG_LIRC_HOMEBREW is not set
-
-#
-# I2C support
-#
-# CONFIG_I2C is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-CONFIG_FB_OF=y
-# CONFIG_FB_CT65550 is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_S3TRIO is not set
-# CONFIG_FB_VGA16 is not set
-# CONFIG_FB_RIVA is not set
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_UHCI_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_BLUETOOTH_TTY is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-# CONFIG_HID_FF is not set
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-
-#
-# Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-# CONFIG_USB_TIGL is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-CONFIG_USB_LEGOTOWER=m
-# CONFIG_USB_LCD is not set
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-# CONFIG_INFINIBAND_SRP is not set
-# CONFIG_INFINIBAND_UDAPL_HELPER is not set
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=y
-# CONFIG_REISERFS_CHECK is not set
-CONFIG_REISERFS_PROC_INFO=y
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_MINIX_FS=m
-# CONFIG_ROMFS_FS is not set
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=y
-# CONFIG_AUTOFS4_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=y
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=y
-
-#
-# Kernel hacking
-#
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP=m
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-# CONFIG_CRASH_DUMP_SOFTBOOT is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUGGER=y
-CONFIG_XMON=y
-# CONFIG_XMON_DEFAULT is not set
-CONFIG_KDB=y
-CONFIG_KDB_MODULES=y
-CONFIG_KDB_OFF=y
-# CONFIG_PPCDBG is not set
-# CONFIG_DEBUG_INFO is not set
-CONFIG_IRQSTACKS=y
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_MLS=y
-
-#
-# IBM Crypto Hardware support
-#
-CONFIG_IBM_CRYPTO=m
-CONFIG_ICA_LEEDSLITE=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="pseries64"
-CONFIG_RELEASE="7.141"
-CONFIG_IEEE1394=m
-CONFIG_IEEE1394_PCILYNX=m
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config
deleted file mode 100644
index b5e692be4e9851c00d84cbe3729795a3c3817309..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-ppc.config
+++ /dev/null
@@ -1,1453 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_COMPAT=y
-CONFIG_FRAME_POINTER=y
-CONFIG_FORCE_MAX_ZONEORDER=13
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_STANDALONE=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=19
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Platform support
-#
-# CONFIG_PPC_ISERIES is not set
-CONFIG_PPC_PSERIES=y
-CONFIG_PPC=y
-CONFIG_PPC64=y
-CONFIG_PPC_OF=y
-CONFIG_ALTIVEC=y
-# CONFIG_PPC_PMAC is not set
-CONFIG_PPC_SPLPAR=y
-# CONFIG_BOOTX_TEXT is not set
-# CONFIG_POWER4_ONLY is not set
-# CONFIG_IOMMU_VMERGE is not set
-CONFIG_SMP=y
-CONFIG_IRQ_ALL_CPUS=y
-CONFIG_NR_CPUS=128
-# CONFIG_HMT is not set
-CONFIG_DISCONTIGMEM=y
-CONFIG_NUMA=y
-CONFIG_SCHED_SMT=y
-CONFIG_PPC_RTAS=y
-CONFIG_RTAS_FLASH=m
-CONFIG_SCANLOG=m
-CONFIG_LPARCFG=y
-CONFIG_PPC_VPURR=y
-
-#
-# General setup
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-CONFIG_HOTPLUG_CPU=y
-
-#
-# PCMCIA/CardBus support
-#
-# CONFIG_PCMCIA is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-# CONFIG_HOTPLUG_PCI_PCIE is not set
-# CONFIG_HOTPLUG_PCI_SHPC is not set
-CONFIG_HOTPLUG_PCI_RPA=y
-CONFIG_HOTPLUG_PCI_RPA_DLPAR=y
-CONFIG_PROC_DEVICETREE=y
-# CONFIG_CMDLINE_BOOL is not set
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Bluesmoke - error detection and reporting (RAS)
-#
-# CONFIG_BLUESMOKE is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=y
-# CONFIG_PARIDE is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-# CONFIG_BLK_DEV_CARMEL is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=123456
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-CONFIG_BLK_DEV_IDEDISK=y
-# CONFIG_IDEDISK_MULTI_MODE is not set
-# CONFIG_IDEDISK_STROKE is not set
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-CONFIG_IDE_TASK_IOCTL=y
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_SL82C105=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-CONFIG_BLK_DEV_IDEDMA_FORCED=y
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_ADMA=y
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_CS5530 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-# CONFIG_BLK_DEV_PIIX is not set
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-# CONFIG_PDC202XX_FORCE is not set
-# CONFIG_BLK_DEV_SVWKS is not set
-CONFIG_BLK_DEV_SIIMAGE=y
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_CHR_DEV_ST=m
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_AIC79XX_NEW is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_MEGARAID_NEWGEN is not set
-# CONFIG_MEGARAID_LEGACY is not set
-# CONFIG_SCSI_SATA is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_IPS is not set
-CONFIG_SCSI_IBMVSCSI=m
-CONFIG_SCSI_IBMVSCSIS=m
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_PPA is not set
-# CONFIG_SCSI_IMM is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=0
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_IPR=m
-CONFIG_SCSI_IPR_TRACE=y
-CONFIG_SCSI_IPR_DUMP=y
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-CONFIG_SCSI_QLA2XXX=m
-# CONFIG_SCSI_QLA21XX is not set
-# CONFIG_SCSI_QLA22XX is not set
-CONFIG_SCSI_QLA2300=m
-# CONFIG_SCSI_QLA2322 is not set
-# CONFIG_SCSI_QLA6312 is not set
-# CONFIG_SCSI_QLA6322 is not set
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-CONFIG_SCSI_DEBUG=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-
-#
-# Texas Instruments PCILynx requires I2C
-#
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Macintosh device drivers
-#
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=y
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-# CONFIG_IP_ROUTE_FWMARK is not set
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-# CONFIG_IP_ROUTE_VERBOSE is not set
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-# CONFIG_IP_VS is not set
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-# CONFIG_DECNET is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-# CONFIG_BRIDGE_EBT_SNAT is not set
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-CONFIG_SCTP_HMAC_NONE=y
-# CONFIG_SCTP_HMAC_SHA1 is not set
-# CONFIG_SCTP_HMAC_MD5 is not set
-# CONFIG_ATM is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-CONFIG_IPX_INTERN=y
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-# CONFIG_ETHERTAP is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-# CONFIG_OAKNET is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_B44 is not set
-# CONFIG_FORCEDETH is not set
-# CONFIG_DGRS is not set
-# CONFIG_EEPRO100 is not set
-CONFIG_E100=m
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-# CONFIG_8139TOO is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_VIA_RHINE is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-CONFIG_ACENIC_OMIT_TIGON_I=y
-# CONFIG_DL2K is not set
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000_NEW=m
-CONFIG_E1000_NEW_NAPI=y
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SIS190 is not set
-# CONFIG_SK98LIN is not set
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BROADCOM_NEW=m
-# CONFIG_NET_BCM44 is not set
-CONFIG_TIGON3_NEW=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_IBMVETH=m
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-# CONFIG_SLIP_MODE_SLIP6 is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-# CONFIG_IBMLS is not set
-# CONFIG_3C359 is not set
-# CONFIG_TMS380TR is not set
-CONFIG_NET_FC=y
-CONFIG_NET_LPFC=m
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-# CONFIG_SERIO_SERPORT is not set
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_ECC=m
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_PMACZILOG is not set
-CONFIG_SERIAL_ICOM=m
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-# CONFIG_PRINTER is not set
-# CONFIG_PPDEV is not set
-# CONFIG_TIPAR is not set
-CONFIG_HVC_CONSOLE=y
-CONFIG_HVCS=m
-# CONFIG_QIC02_TAPE is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-
-#
-# PCI-based Watchdog Cards
-#
-# CONFIG_PCIPCWATCHDOG is not set
-# CONFIG_WDTPCI is not set
-
-#
-# USB-based Watchdog Cards
-#
-# CONFIG_USBPCWATCHDOG is not set
-# CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_AGP is not set
-# CONFIG_DRM is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-
-#
-# Linux InfraRed Controller
-#
-# CONFIG_LIRC_SUPPORT is not set
-# CONFIG_LIRC_HOMEBREW is not set
-
-#
-# I2C support
-#
-# CONFIG_I2C is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-CONFIG_FB_OF=y
-# CONFIG_FB_CT65550 is not set
-# CONFIG_FB_IMSTT is not set
-# CONFIG_FB_S3TRIO is not set
-# CONFIG_FB_VGA16 is not set
-# CONFIG_FB_RIVA is not set
-CONFIG_FB_MATROX=y
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-# CONFIG_FB_KYRO is not set
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-# CONFIG_VGA_CONSOLE is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-# CONFIG_USB_UHCI_HCD is not set
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_BLUETOOTH_TTY is not set
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-# CONFIG_HID_FF is not set
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-# CONFIG_USB_DABUSB is not set
-
-#
-# Video4Linux support is needed for USB Multimedia device support
-#
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-# CONFIG_USB_USS720 is not set
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-# CONFIG_USB_TIGL is not set
-# CONFIG_USB_AUERSWALD is not set
-# CONFIG_USB_RIO500 is not set
-CONFIG_USB_LEGOTOWER=m
-# CONFIG_USB_LCD is not set
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-# CONFIG_INFINIBAND_SRP is not set
-# CONFIG_INFINIBAND_UDAPL_HELPER is not set
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=y
-# CONFIG_REISERFS_CHECK is not set
-CONFIG_REISERFS_PROC_INFO=y
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_MINIX_FS=m
-# CONFIG_ROMFS_FS is not set
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=y
-# CONFIG_AUTOFS4_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=y
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-CONFIG_AMIGA_PARTITION=y
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=y
-
-#
-# Kernel hacking
-#
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP=m
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-# CONFIG_CRASH_DUMP_SOFTBOOT is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUGGER=y
-CONFIG_XMON=y
-# CONFIG_XMON_DEFAULT is not set
-CONFIG_KDB=y
-CONFIG_KDB_MODULES=y
-CONFIG_KDB_OFF=y
-# CONFIG_PPCDBG is not set
-# CONFIG_DEBUG_INFO is not set
-CONFIG_IRQSTACKS=y
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_MLS=y
-
-#
-# IBM Crypto Hardware support
-#
-CONFIG_IBM_CRYPTO=m
-CONFIG_ICA_LEEDSLITE=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="pseries64"
-CONFIG_RELEASE="SLES9_SP1_BRANCH_91"
-CONFIG_IEEE1394=m
-CONFIG_IEEE1394_PCILYNX=m
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config
deleted file mode 100644
index fed9063d5e7c8168ddf34436a401d0325ec94cfb..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64-smp.config
+++ /dev/null
@@ -1,2551 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_HPET_TIMER=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-# CONFIG_PREEMPT is not set
-CONFIG_SCHED_SMT=y
-CONFIG_K8_NUMA=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_NUMA=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_NR_CPUS=128
-CONFIG_GART_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-# CONFIG_SOFTWARE_SUSPEND is not set
-# CONFIG_PM_DISK is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-# CONFIG_ACPI_TOSHIBA is not set
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_INITRD=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=m
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_TCIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_AMD=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=m
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_CMDLINE_PARTS=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-# CONFIG_MTD_PNC2000 is not set
-# CONFIG_MTD_SC520CDP is not set
-# CONFIG_MTD_NETSC520 is not set
-# CONFIG_MTD_SBC_GXX is not set
-# CONFIG_MTD_ELAN_104NC is not set
-# CONFIG_MTD_OCTAGON is not set
-# CONFIG_MTD_VMAX is not set
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-# CONFIG_MTD_ICH2ROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_CARMEL=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=128000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=y
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_PIO=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-# CONFIG_SATA_INIC162X is not set
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-# CONFIG_PATA_ARTOP is not set
-CONFIG_PATA_ATIIXP=m
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-CONFIG_PATA_RADISYS=m
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-# CONFIG_DECNET_NF_GRABULATOR is not set
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-# CONFIG_ATM is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-CONFIG_IPX_INTERN=y
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-# CONFIG_ARCNET_COM20020 is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_IGB=m
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_SIS190=m
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-# CONFIG_2BUFF_MODE is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_QLA3XXX=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-# CONFIG_IBMLS is not set
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-CONFIG_BPQETHER=m
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_VLSI_FIR=m
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-# CONFIG_ECC is not set
-CONFIG_SERIAL_NONSTANDARD=y
-CONFIG_ROCKETPORT=m
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-CONFIG_QIC02_TAPE=m
-CONFIG_QIC02_DYNCONF=y
-
-#
-# Setting runtime QIC-02 configuration is done with qic02conf
-#
-
-#
-# from the tpqic02-support package.  It is available at
-#
-
-#
-# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
-#
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-# CONFIG_IPMI_PANIC_STRING is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_AMD7XX_TCO=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-
-#
-# Ftape, the floppy tape device driver
-#
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_INTEL_MCH=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-# CONFIG_VTUNE is not set
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_VIA686A=m
-# CONFIG_SENSORS_VT1211 is not set
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
-CONFIG_DVB_ALPS_TDLB7=m
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin"
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-# CONFIG_DVB_AV7110_OSD is not set
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_PM2 is not set
-CONFIG_FB_CYBER2000=m
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_RIVA=m
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-CONFIG_FB_VIRTUAL=m
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_BIT32_EMUL=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-CONFIG_SOUND_AD1816=m
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-CONFIG_SOUND_AWE32_SYNTH=m
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SPINLOCK is not set
-CONFIG_INIT_DEBUG=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_FRAME_POINTER is not set
-CONFIG_KDB=m
-CONFIG_KDB_MODULES=m
-# CONFIG_KDB_OFF is not set
-CONFIG_KDB_CONTINUE_CATASTROPHIC=0
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="smp"
-CONFIG_RELEASE="7.308"
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config
deleted file mode 100644
index fb92fe63b6ae9363b8f6ccbdc1382a4913e31ac7..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.5-2.6-suse-x86_64.config
+++ /dev/null
@@ -1,2566 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_HOTPLUG=y
-CONFIG_EVLOG=y
-# CONFIG_EVLOG_FWPRINTK is not set
-CONFIG_IKCONFIG=y
-CONFIG_IKCONFIG_PROC=y
-# CONFIG_EMBEDDED is not set
-
-#
-# Class Based Kernel Resource Management
-#
-CONFIG_CKRM=y
-CONFIG_RCFS_FS=m
-CONFIG_CKRM_TYPE_TASKCLASS=y
-CONFIG_CKRM_RES_NUMTASKS=m
-CONFIG_CKRM_CPU_SCHEDULE=y
-# CONFIG_CKRM_CPU_SCHEDULE_AT_BOOT is not set
-CONFIG_CKRM_RES_BLKIO=y
-CONFIG_CKRM_TYPE_SOCKETCLASS=y
-CONFIG_CKRM_RBCE=m
-CONFIG_CKRM_CRBCE=m
-CONFIG_DELAY_ACCT=y
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_IOSCHED_PS=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-
-#
-# Processor type and features
-#
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
-CONFIG_GART_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-# CONFIG_SOFTWARE_SUSPEND is not set
-# CONFIG_PM_DISK is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=m
-CONFIG_ACPI_PROCESSOR=m
-CONFIG_ACPI_THERMAL=m
-# CONFIG_ACPI_ASUS is not set
-# CONFIG_ACPI_TOSHIBA is not set
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_ACPI_INITRD=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_PROC_INTF=m
-CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=m
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=m
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-CONFIG_X86_SPEEDSTEP_CENTRINO=m
-CONFIG_X86_SPEEDSTEP_CENTRINO_TABLE=y
-CONFIG_X86_SPEEDSTEP_CENTRINO_ACPI=y
-CONFIG_X86_ACPI_CPUFREQ=m
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCI_LEGACY_PROC is not set
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_I82092=m
-CONFIG_TCIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=m
-CONFIG_HOTPLUG_PCI_FAKE=m
-CONFIG_HOTPLUG_PCI_AMD=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-CONFIG_HOTPLUG_PCI_CPCI=y
-CONFIG_HOTPLUG_PCI_CPCI_ZT5550=m
-CONFIG_HOTPLUG_PCI_CPCI_GENERIC=m
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=m
-CONFIG_IA32_EMULATION=y
-CONFIG_IA32_AOUT=y
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_FW_LOADER=m
-# CONFIG_DEBUG_DRIVER is not set
-# CONFIG_DEBUG_DEVRES is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=m
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-CONFIG_MTD_CMDLINE_PARTS=m
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-# CONFIG_MTD_BLOCK_RO is not set
-# CONFIG_FTL is not set
-# CONFIG_NFTL is not set
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-CONFIG_MTD_CFI_ADV_OPTIONS=y
-CONFIG_MTD_CFI_NOSWAP=y
-# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
-# CONFIG_MTD_CFI_GEOMETRY is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_STAA=m
-# CONFIG_MTD_RAM is not set
-# CONFIG_MTD_ROM is not set
-CONFIG_MTD_ABSENT=m
-CONFIG_MTD_OBSOLETE_CHIPS=y
-CONFIG_MTD_AMDSTD=m
-CONFIG_MTD_SHARP=m
-CONFIG_MTD_JEDEC=m
-
-#
-# Mapping drivers for chip access
-#
-CONFIG_MTD_COMPLEX_MAPPINGS=y
-CONFIG_MTD_PHYSMAP=m
-CONFIG_MTD_PHYSMAP_START=0x8000000
-CONFIG_MTD_PHYSMAP_LEN=0x4000000
-CONFIG_MTD_PHYSMAP_BUSWIDTH=2
-# CONFIG_MTD_PNC2000 is not set
-# CONFIG_MTD_SC520CDP is not set
-# CONFIG_MTD_NETSC520 is not set
-# CONFIG_MTD_SBC_GXX is not set
-# CONFIG_MTD_ELAN_104NC is not set
-# CONFIG_MTD_OCTAGON is not set
-# CONFIG_MTD_VMAX is not set
-CONFIG_MTD_SCx200_DOCFLASH=m
-CONFIG_MTD_AMD76XROM=m
-# CONFIG_MTD_ICH2ROM is not set
-CONFIG_MTD_SCB2_FLASH=m
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-CONFIG_MTD_PCI=m
-
-#
-# Self-contained MTD device drivers
-#
-CONFIG_MTD_PMC551=m
-CONFIG_MTD_PMC551_BUGFIX=y
-# CONFIG_MTD_PMC551_DEBUG is not set
-CONFIG_MTD_SLRAM=m
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-CONFIG_MTD_BLKMTD=m
-
-#
-# Disk-On-Chip Device Drivers
-#
-CONFIG_MTD_DOC2000=m
-CONFIG_MTD_DOC2001=m
-CONFIG_MTD_DOC2001PLUS=m
-CONFIG_MTD_DOCPROBE=m
-CONFIG_MTD_DOCPROBE_ADVANCED=y
-CONFIG_MTD_DOCPROBE_ADDRESS=0x0000
-CONFIG_MTD_DOCPROBE_HIGH=y
-CONFIG_MTD_DOCPROBE_55AA=y
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-CONFIG_PARPORT_PC_FIFO=y
-CONFIG_PARPORT_PC_SUPERIO=y
-CONFIG_PARPORT_PC_PCMCIA=m
-CONFIG_PARPORT_OTHER=y
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-CONFIG_PARIDE=m
-CONFIG_PARIDE_PARPORT=m
-
-#
-# Parallel IDE high-level drivers
-#
-CONFIG_PARIDE_PD=m
-CONFIG_PARIDE_PCD=m
-CONFIG_PARIDE_PF=m
-CONFIG_PARIDE_PT=m
-CONFIG_PARIDE_PG=m
-
-#
-# Parallel IDE protocol modules
-#
-CONFIG_PARIDE_ATEN=m
-CONFIG_PARIDE_BPCK=m
-CONFIG_PARIDE_COMM=m
-CONFIG_PARIDE_DSTR=m
-CONFIG_PARIDE_FIT2=m
-CONFIG_PARIDE_FIT3=m
-CONFIG_PARIDE_EPAT=m
-CONFIG_PARIDE_EPATC8=y
-CONFIG_PARIDE_EPIA=m
-CONFIG_PARIDE_FRIQ=m
-CONFIG_PARIDE_FRPW=m
-CONFIG_PARIDE_KBIC=m
-CONFIG_PARIDE_KTTI=m
-CONFIG_PARIDE_ON20=m
-CONFIG_PARIDE_ON26=m
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-CONFIG_BLK_DEV_UMEM=m
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_CARMEL=m
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=128000
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CIPHER_TWOFISH=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_IDEDISK_STROKE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_IDECD=y
-CONFIG_BLK_DEV_IDETAPE=m
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_CMD640=y
-CONFIG_BLK_DEV_CMD640_ENHANCED=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_OFFBOARD=y
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-CONFIG_IDEDMA_ONLYDISK=y
-CONFIG_BLK_DEV_ADMA=y
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=m
-CONFIG_BLK_DEV_CS5530=m
-CONFIG_BLK_DEV_HPT34X=y
-CONFIG_HPT34X_AUTODMA=y
-CONFIG_BLK_DEV_HPT366=y
-CONFIG_BLK_DEV_SC1200=y
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_NS87415=y
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-CONFIG_PDC202XX_BURST=y
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-# CONFIG_BLK_DEV_SR_VENDOR is not set
-CONFIG_CHR_DEV_SG=m
-CONFIG_CHR_DEV_SCH=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=32
-CONFIG_AIC7XXX_RESET_DELAY_MS=5000
-# CONFIG_AIC7XXX_BUILD_FIRMWARE is not set
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-CONFIG_AIC7XXX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=32
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_BUILD_FIRMWARE is not set
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-CONFIG_AIC79XX_REG_PRETTY_PRINT=y
-CONFIG_SCSI_ADVANSYS=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_LEGACY=m
-CONFIG_MEGARAID_SAS=m
-CONFIG_SCSI_BUSLOGIC=m
-# CONFIG_SCSI_OMIT_FLASHPOINT is not set
-# CONFIG_SCSI_CPQFCTS is not set
-CONFIG_SCSI_DMX3191D=m
-CONFIG_SCSI_EATA=m
-CONFIG_SCSI_EATA_TAGGED_QUEUE=y
-CONFIG_SCSI_EATA_LINKED_COMMANDS=y
-CONFIG_SCSI_EATA_MAX_TAGS=16
-CONFIG_SCSI_EATA_PIO=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_QLOGIC_ISP=m
-CONFIG_SCSI_QLOGIC_FC=m
-CONFIG_SCSI_QLOGIC_FC_FIRMWARE=y
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA2XXX_FAILOVER=y
-CONFIG_SCSI_QLA4XXX=m
-CONFIG_SCSI_QLA4XXX_FAILOVER=y
-CONFIG_SCSI_DC395x=m
-CONFIG_SCSI_DC390T=m
-CONFIG_SCSI_DEBUG=m
-
-#
-# PCMCIA SCSI adapter support
-#
-CONFIG_PCMCIA_FDOMAIN=m
-CONFIG_PCMCIA_QLOGIC=m
-CONFIG_ATA=m
-# CONFIG_ATA_NONSTANDARD is not set
-CONFIG_ATA_ACPI=y
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-# CONFIG_SATA_INIC162X is not set
-CONFIG_PATA_ALI=m
-CONFIG_PATA_AMD=m
-# CONFIG_PATA_ARTOP is not set
-CONFIG_PATA_ATIIXP=m
-# CONFIG_PATA_CMD640_PCI is not set
-# CONFIG_PATA_CMD64X is not set
-# CONFIG_PATA_CS5520 is not set
-# CONFIG_PATA_CS5530 is not set
-# CONFIG_PATA_CYPRESS is not set
-# CONFIG_PATA_EFAR is not set
-# CONFIG_ATA_GENERIC is not set
-# CONFIG_PATA_HPT366 is not set
-# CONFIG_PATA_HPT37X is not set
-CONFIG_PATA_HPT3X2N=m
-# CONFIG_PATA_HPT3X3 is not set
-CONFIG_PATA_IT821X=m
-CONFIG_PATA_IT8213=m
-CONFIG_PATA_JMICRON=m
-# CONFIG_PATA_TRIFLEX is not set
-CONFIG_PATA_MARVELL=m
-# CONFIG_PATA_MPIIX is not set
-# CONFIG_PATA_OLDPIIX is not set
-# CONFIG_PATA_NETCELL is not set
-# CONFIG_PATA_NS87410 is not set
-# CONFIG_PATA_OPTI is not set
-# CONFIG_PATA_OPTIDMA is not set
-# CONFIG_PATA_PCMCIA is not set
-# CONFIG_PATA_PDC_OLD is not set
-CONFIG_PATA_RADISYS=m
-# CONFIG_PATA_RZ1000 is not set
-# CONFIG_PATA_SC1200 is not set
-CONFIG_PATA_SERVERWORKS=m
-CONFIG_PATA_PDC2027X=m
-# CONFIG_PATA_SIL680 is not set
-CONFIG_PATA_SIS=m
-CONFIG_PATA_VIA=m
-CONFIG_PATA_WINBOND=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-CONFIG_DM_FLAKEY=m
-CONFIG_BLK_DEV_DM_BBR=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=128
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-# CONFIG_IEEE1394_SBP2_PHYS_DMA is not set
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=m
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-# CONFIG_ACCEPT_QUEUES is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_SUBTREES=y
-CONFIG_IPV6_PRIVACY=y
-CONFIG_IPV6_NDISC_NEW=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_IPV6_TUNNEL=m
-
-#
-# MOBILE IPv6 (EXPERIMENTAL)
-#
-CONFIG_IPV6_MOBILITY=m
-CONFIG_IPV6_MOBILITY_MN=m
-CONFIG_IPV6_MOBILITY_HA=m
-# CONFIG_IPV6_MOBILITY_DEBUG is not set
-CONFIG_DECNET=m
-CONFIG_DECNET_SIOCGIFCONF=y
-# CONFIG_DECNET_ROUTER is not set
-CONFIG_BRIDGE=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_POLICY=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-# CONFIG_IP_NF_NAT_LOCAL is not set
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_TTL=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-CONFIG_IP_NF_COMPAT_IPCHAINS=m
-CONFIG_IP_NF_COMPAT_IPFWADM=m
-CONFIG_IP_NF_CONNTRACK_MARK=y
-CONFIG_IP_NF_TARGET_CONNMARK=m
-CONFIG_IP_NF_MATCH_CONNMARK=m
-CONFIG_IP_NF_TARGET_CLUSTERIP=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_HASHLIMIT=m
-# CONFIG_IP_NF_MATCH_IPV4OPTIONS is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-CONFIG_IP6_NF_FTP=m
-CONFIG_IP6_NF_QUEUE=m
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_CONNTRACK=m
-CONFIG_IP6_NF_MATCH_STATE=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_TARGET_REJECT=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-
-#
-# DECnet: Netfilter Configuration
-#
-# CONFIG_DECNET_NF_GRABULATOR is not set
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-# CONFIG_ATM is not set
-CONFIG_VLAN_8021Q=m
-CONFIG_LLC=y
-CONFIG_LLC2=m
-CONFIG_IPX=m
-CONFIG_IPX_INTERN=y
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-CONFIG_X25=m
-CONFIG_LAPB=m
-# CONFIG_NET_DIVERT is not set
-CONFIG_ECONET=m
-# CONFIG_ECONET_AUNUDP is not set
-# CONFIG_ECONET_NATIVE is not set
-CONFIG_WAN_ROUTER=m
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_DELAY=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-CONFIG_ARCNET=m
-CONFIG_ARCNET_1201=m
-CONFIG_ARCNET_1051=m
-CONFIG_ARCNET_RAW=m
-CONFIG_ARCNET_COM90xx=m
-CONFIG_ARCNET_COM90xxIO=m
-CONFIG_ARCNET_RIM_I=m
-# CONFIG_ARCNET_COM20020 is not set
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-CONFIG_EQUALIZER=m
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-# CONFIG_TULIP_MMIO is not set
-CONFIG_TULIP_NAPI=y
-CONFIG_TULIP_NAPI_HW_MITIGATION=y
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-CONFIG_HP100=m
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-CONFIG_DGRS=m
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-# CONFIG_8139TOO_PIO is not set
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_8139_RXBUF_IDX=2
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-CONFIG_SUNDANCE=m
-# CONFIG_SUNDANCE_MMIO is not set
-CONFIG_VIA_RHINE=m
-# CONFIG_VIA_RHINE_MMIO is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_IGB=m
-CONFIG_NS83820=m
-CONFIG_HAMACHI=m
-CONFIG_YELLOWFIN=m
-CONFIG_R8169=m
-CONFIG_SIS190=m
-CONFIG_SK98LIN=m
-CONFIG_TIGON3=m
-CONFIG_NET_BROADCOM=m
-CONFIG_NET_BCM44=m
-CONFIG_BNX2=m
-# CONFIG_2BUFF_MODE is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_QLA3XXX=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_MYRI10GE=m
-CONFIG_NETXEN_NIC=m
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-CONFIG_SKFP=m
-CONFIG_HIPPI=y
-CONFIG_ROADRUNNER=m
-CONFIG_ROADRUNNER_LARGE_RINGS=y
-CONFIG_PLIP=m
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-CONFIG_PPP_BSDCOMP=m
-CONFIG_PPP_MPPE=m
-CONFIG_PPPOE=m
-CONFIG_SLIP=m
-CONFIG_SLIP_COMPRESSED=y
-CONFIG_SLIP_SMART=y
-CONFIG_SLIP_MODE_SLIP6=y
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-CONFIG_STRIP=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-CONFIG_PCMCIA_RAYCS=m
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-# CONFIG_IBMLS is not set
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-CONFIG_NET_FC=y
-CONFIG_SHAPER=m
-CONFIG_NETCONSOLE=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Amateur Radio support
-#
-CONFIG_HAMRADIO=y
-
-#
-# Packet Radio protocols
-#
-CONFIG_AX25=m
-CONFIG_AX25_DAMA_SLAVE=y
-CONFIG_NETROM=m
-CONFIG_ROSE=m
-
-#
-# AX.25 network device drivers
-#
-# CONFIG_MKISS is not set
-# CONFIG_6PACK is not set
-CONFIG_BPQETHER=m
-CONFIG_BAYCOM_SER_FDX=m
-CONFIG_BAYCOM_SER_HDX=m
-CONFIG_BAYCOM_PAR=m
-CONFIG_YAM=m
-
-#
-# IrDA (infrared) support
-#
-CONFIG_IRDA=m
-
-#
-# IrDA protocols
-#
-CONFIG_IRLAN=m
-CONFIG_IRNET=m
-CONFIG_IRCOMM=m
-CONFIG_IRDA_ULTRA=y
-
-#
-# IrDA options
-#
-CONFIG_IRDA_CACHE_LAST_LSAP=y
-# CONFIG_IRDA_FAST_RR is not set
-# CONFIG_IRDA_DEBUG is not set
-
-#
-# Infrared-port device drivers
-#
-
-#
-# SIR device drivers
-#
-CONFIG_IRTTY_SIR=m
-
-#
-# Dongle support
-#
-CONFIG_DONGLE=y
-CONFIG_ESI_DONGLE=m
-CONFIG_ACTISYS_DONGLE=m
-CONFIG_TEKRAM_DONGLE=m
-CONFIG_LITELINK_DONGLE=m
-CONFIG_MA600_DONGLE=m
-CONFIG_GIRBIL_DONGLE=m
-CONFIG_MCP2120_DONGLE=m
-CONFIG_OLD_BELKIN_DONGLE=m
-CONFIG_ACT200L_DONGLE=m
-
-#
-# Old SIR device drivers
-#
-# CONFIG_IRPORT_SIR is not set
-
-#
-# Old Serial dongle support
-#
-
-#
-# FIR device drivers
-#
-CONFIG_USB_IRDA=m
-CONFIG_SIGMATEL_FIR=m
-CONFIG_VLSI_FIR=m
-
-#
-# Bluetooth support
-#
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_NETPOLL=y
-CONFIG_NETPOLL_RX=y
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-CONFIG_ISDN_PPP_BSDCOMP=m
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-CONFIG_ISDN_X25=y
-
-#
-# ISDN feature submodules
-#
-# CONFIG_ISDN_DRV_LOOP is not set
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-# CONFIG_HISAX_NO_SENDCOMPLETE is not set
-# CONFIG_HISAX_NO_LLC is not set
-# CONFIG_HISAX_NO_KEYPAD is not set
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-CONFIG_HISAX_DEBUG=y
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-# CONFIG_HYSDN is not set
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-CONFIG_PHONE=m
-CONFIG_PHONE_IXJ=m
-CONFIG_PHONE_IXJ_PCMCIA=m
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-CONFIG_INPUT_TSDEV=m
-CONFIG_INPUT_TSDEV_SCREEN_X=240
-CONFIG_INPUT_TSDEV_SCREEN_Y=320
-CONFIG_INPUT_EVDEV=m
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-CONFIG_GAMEPORT=m
-CONFIG_SOUND_GAMEPORT=m
-CONFIG_GAMEPORT_NS558=m
-CONFIG_GAMEPORT_L4=m
-CONFIG_GAMEPORT_EMU10K1=m
-CONFIG_GAMEPORT_VORTEX=m
-CONFIG_GAMEPORT_FM801=m
-CONFIG_GAMEPORT_CS461x=m
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=m
-CONFIG_SERIO_CT82C710=m
-CONFIG_SERIO_PARKBD=m
-CONFIG_SERIO_PCIPS2=m
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-CONFIG_KEYBOARD_SUNKBD=m
-# CONFIG_KEYBOARD_LKKBD is not set
-CONFIG_KEYBOARD_XTKBD=m
-CONFIG_KEYBOARD_NEWTON=m
-# CONFIG_KEYBOARD_POSFILTER is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_INPUT_JOYSTICK=y
-CONFIG_JOYSTICK_ANALOG=m
-CONFIG_JOYSTICK_A3D=m
-CONFIG_JOYSTICK_ADI=m
-CONFIG_JOYSTICK_COBRA=m
-CONFIG_JOYSTICK_GF2K=m
-CONFIG_JOYSTICK_GRIP=m
-CONFIG_JOYSTICK_GRIP_MP=m
-CONFIG_JOYSTICK_GUILLEMOT=m
-CONFIG_JOYSTICK_INTERACT=m
-CONFIG_JOYSTICK_SIDEWINDER=m
-CONFIG_JOYSTICK_TMDC=m
-CONFIG_JOYSTICK_IFORCE=m
-CONFIG_JOYSTICK_IFORCE_USB=y
-CONFIG_JOYSTICK_IFORCE_232=y
-CONFIG_JOYSTICK_WARRIOR=m
-CONFIG_JOYSTICK_MAGELLAN=m
-CONFIG_JOYSTICK_SPACEORB=m
-CONFIG_JOYSTICK_SPACEBALL=m
-CONFIG_JOYSTICK_STINGER=m
-CONFIG_JOYSTICK_TWIDDLER=m
-CONFIG_JOYSTICK_DB9=m
-CONFIG_JOYSTICK_GAMECON=m
-CONFIG_JOYSTICK_TURBOGRAFX=m
-# CONFIG_INPUT_JOYDUMP is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-# CONFIG_ECC is not set
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-CONFIG_ROCKETPORT=m
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_DIGI is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-CONFIG_STALDRV=y
-# CONFIG_STALLION is not set
-# CONFIG_ISTALLION is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=4
-# CONFIG_SERIAL_8250_EXTENDED is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_ICOM is not set
-CONFIG_SERIAL_JSM=m
-CONFIG_UNIX98_PTYS=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_PRINTER=m
-# CONFIG_LP_CONSOLE is not set
-CONFIG_PPDEV=m
-CONFIG_TIPAR=m
-CONFIG_QIC02_TAPE=m
-CONFIG_QIC02_DYNCONF=y
-
-#
-# Setting runtime QIC-02 configuration is done with qic02conf
-#
-
-#
-# from the tpqic02-support package.  It is available at
-#
-
-#
-# metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/
-#
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-CONFIG_IPMI_PANIC_EVENT=y
-# CONFIG_IPMI_PANIC_STRING is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_AMD7XX_TCO=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-CONFIG_SCx200_WDT=m
-CONFIG_60XX_WDT=m
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=y
-CONFIG_RTC=y
-CONFIG_DTLK=m
-CONFIG_R3964=m
-CONFIG_APPLICOM=m
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-
-#
-# TPM devices
-#
-CONFIG_TCG_TPM=m
-CONFIG_TCG_NSC=m
-CONFIG_TCG_ATMEL=m
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=m
-CONFIG_AGP_INTEL_MCH=m
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=m
-CONFIG_MAX_RAW_DEVS=4096
-CONFIG_HANGCHECK_TIMER=m
-# CONFIG_VTUNE is not set
-
-#
-# Linux InfraRed Controller
-#
-CONFIG_LIRC_SUPPORT=m
-CONFIG_LIRC_MAX_DEV=2
-CONFIG_LIRC_BT829=m
-CONFIG_LIRC_IT87=m
-CONFIG_LIRC_ATIUSB=m
-# CONFIG_LIRC_PARALLEL is not set
-CONFIG_LIRC_SERIAL=m
-# CONFIG_LIRC_HOMEBREW is not set
-CONFIG_LIRC_PORT_SERIAL=0x3f8
-CONFIG_LIRC_IRQ_SERIAL=4
-CONFIG_LIRC_SIR=m
-CONFIG_LIRC_PORT_SIR=0x3f8
-CONFIG_LIRC_IRQ_SIR=4
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-CONFIG_I2C_PARPORT=m
-CONFIG_I2C_PARPORT_LIGHT=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-CONFIG_SCx200_ACB=m
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_VIA686A=m
-# CONFIG_SENSORS_VT1211 is not set
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-CONFIG_SENSORS_PCF8574=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-CONFIG_VIDEO_BWQCAM=m
-CONFIG_VIDEO_CQCAM=m
-CONFIG_VIDEO_W9966=m
-CONFIG_VIDEO_CPIA=m
-CONFIG_VIDEO_CPIA_PP=m
-CONFIG_VIDEO_CPIA_USB=m
-CONFIG_VIDEO_SAA5246A=m
-CONFIG_VIDEO_SAA5249=m
-CONFIG_TUNER_3036=m
-CONFIG_VIDEO_STRADIS=m
-CONFIG_VIDEO_ZORAN=m
-CONFIG_VIDEO_ZORAN_BUZ=m
-CONFIG_VIDEO_ZORAN_DC10=m
-CONFIG_VIDEO_ZORAN_DC30=m
-CONFIG_VIDEO_ZORAN_LML33=m
-CONFIG_VIDEO_ZORAN_LML33R10=m
-CONFIG_VIDEO_SAA7134=m
-CONFIG_VIDEO_MXB=m
-CONFIG_VIDEO_DPC=m
-CONFIG_VIDEO_HEXIUM_ORION=m
-CONFIG_VIDEO_HEXIUM_GEMINI=m
-CONFIG_VIDEO_CX88=m
-
-#
-# Radio Adapters
-#
-CONFIG_RADIO_GEMTEK_PCI=m
-CONFIG_RADIO_MAXIRADIO=m
-CONFIG_RADIO_MAESTRO=m
-
-#
-# Digital Video Broadcasting Devices
-#
-CONFIG_DVB=y
-CONFIG_DVB_CORE=m
-
-#
-# Supported Frontend Modules
-#
-CONFIG_DVB_TWINHAN_DST=m
-CONFIG_DVB_STV0299=m
-CONFIG_DVB_SP887X=m
-CONFIG_DVB_SP887X_FIRMWARE_FILE="/etc/dvb/sc_main.mc"
-CONFIG_DVB_ALPS_TDLB7=m
-CONFIG_DVB_ALPS_TDMB7=m
-CONFIG_DVB_ATMEL_AT76C651=m
-CONFIG_DVB_CX24110=m
-CONFIG_DVB_GRUNDIG_29504_491=m
-CONFIG_DVB_GRUNDIG_29504_401=m
-CONFIG_DVB_MT312=m
-CONFIG_DVB_VES1820=m
-CONFIG_DVB_VES1X93=m
-CONFIG_DVB_TDA1004X=m
-CONFIG_DVB_TDA1004X_FIRMWARE_FILE="/usr/lib/hotplug/firmware/tda1004x.bin"
-CONFIG_DVB_NXT6000=m
-
-#
-# Supported SAA7146 based PCI Adapters
-#
-CONFIG_DVB_AV7110=m
-# CONFIG_DVB_AV7110_FIRMWARE is not set
-# CONFIG_DVB_AV7110_OSD is not set
-CONFIG_DVB_BUDGET=m
-CONFIG_DVB_BUDGET_CI=m
-CONFIG_DVB_BUDGET_AV=m
-CONFIG_DVB_BUDGET_PATCH=m
-
-#
-# Supported USB Adapters
-#
-CONFIG_DVB_TTUSB_BUDGET=m
-CONFIG_DVB_TTUSB_DEC=m
-
-#
-# Supported FlexCopII (B2C2) Adapters
-#
-CONFIG_DVB_B2C2_SKYSTAR=m
-
-#
-# Supported BT878 Adapters
-#
-CONFIG_DVB_BT8XX=m
-CONFIG_VIDEO_SAA7146=m
-CONFIG_VIDEO_SAA7146_VV=m
-CONFIG_VIDEO_VIDEOBUF=m
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-# CONFIG_FB_PM2 is not set
-CONFIG_FB_CYBER2000=m
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-CONFIG_FB_HGA=m
-CONFIG_FB_RIVA=m
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-CONFIG_FB_MATROX=m
-CONFIG_FB_MATROX_MILLENIUM=y
-CONFIG_FB_MATROX_MYSTIQUE=y
-CONFIG_FB_MATROX_G450=y
-CONFIG_FB_MATROX_G100=y
-CONFIG_FB_MATROX_I2C=m
-CONFIG_FB_MATROX_MAVEN=m
-CONFIG_FB_MATROX_MULTIHEAD=y
-# CONFIG_FB_RADEON_OLD is not set
-CONFIG_FB_RADEON=m
-CONFIG_FB_RADEON_I2C=y
-# CONFIG_FB_RADEON_DEBUG is not set
-CONFIG_FB_ATY128=m
-CONFIG_FB_ATY=m
-CONFIG_FB_ATY_CT=y
-CONFIG_FB_ATY_GX=y
-CONFIG_FB_ATY_XL_INIT=y
-CONFIG_FB_SIS=m
-CONFIG_FB_SIS_300=y
-CONFIG_FB_SIS_315=y
-CONFIG_FB_NEOMAGIC=m
-CONFIG_FB_KYRO=m
-CONFIG_FB_3DFX=m
-CONFIG_FB_VOODOO1=m
-CONFIG_FB_TRIDENT=m
-CONFIG_FB_VIRTUAL=m
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_PCI_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-# CONFIG_LOGO is not set
-
-#
-# Bootsplash configuration
-#
-CONFIG_BOOTSPLASH=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_BIT32_EMUL=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-CONFIG_SND_VERBOSE_PRINTK=y
-CONFIG_SND_DEBUG=y
-CONFIG_SND_DEBUG_MEMORY=y
-# CONFIG_SND_DEBUG_DETECT is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-CONFIG_SND_SERIAL_U16550=m
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-CONFIG_SND_HDA_INTEL=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-CONFIG_SOUND_PRIME=m
-CONFIG_SOUND_BT878=m
-CONFIG_SOUND_CMPCI=m
-CONFIG_SOUND_CMPCI_FM=y
-CONFIG_SOUND_CMPCI_FMIO=0x388
-CONFIG_SOUND_CMPCI_MIDI=y
-CONFIG_SOUND_CMPCI_MPUIO=0x330
-CONFIG_SOUND_CMPCI_JOYSTICK=y
-CONFIG_SOUND_CMPCI_CM8738=y
-# CONFIG_SOUND_CMPCI_SPDIFINVERSE is not set
-CONFIG_SOUND_CMPCI_SPDIFLOOP=y
-CONFIG_SOUND_CMPCI_SPEAKERS=2
-CONFIG_SOUND_EMU10K1=m
-CONFIG_MIDI_EMU10K1=y
-# CONFIG_SOUND_FUSION is not set
-CONFIG_SOUND_CS4281=m
-CONFIG_SOUND_ES1370=m
-CONFIG_SOUND_ES1371=m
-CONFIG_SOUND_ESSSOLO1=m
-CONFIG_SOUND_MAESTRO=m
-CONFIG_SOUND_MAESTRO3=m
-CONFIG_SOUND_ICH=m
-CONFIG_SOUND_SONICVIBES=m
-CONFIG_SOUND_TRIDENT=m
-# CONFIG_SOUND_MSNDCLAS is not set
-# CONFIG_SOUND_MSNDPIN is not set
-CONFIG_SOUND_VIA82CXXX=m
-CONFIG_MIDI_VIA82CXXX=y
-CONFIG_SOUND_OSS=m
-CONFIG_SOUND_TRACEINIT=y
-CONFIG_SOUND_DMAP=y
-CONFIG_SOUND_AD1816=m
-CONFIG_SOUND_AD1889=m
-CONFIG_SOUND_SGALAXY=m
-CONFIG_SOUND_ADLIB=m
-CONFIG_SOUND_ACI_MIXER=m
-CONFIG_SOUND_CS4232=m
-CONFIG_SOUND_SSCAPE=m
-CONFIG_SOUND_GUS=m
-# CONFIG_SOUND_GUS16 is not set
-CONFIG_SOUND_GUSMAX=y
-CONFIG_SOUND_VMIDI=m
-CONFIG_SOUND_TRIX=m
-CONFIG_SOUND_MSS=m
-CONFIG_SOUND_MPU401=m
-CONFIG_SOUND_NM256=m
-CONFIG_SOUND_MAD16=m
-CONFIG_MAD16_OLDCARD=y
-CONFIG_SOUND_PAS=m
-CONFIG_SOUND_PSS=m
-CONFIG_PSS_MIXER=y
-# CONFIG_PSS_HAVE_BOOT is not set
-CONFIG_SOUND_SB=m
-CONFIG_SOUND_AWE32_SYNTH=m
-CONFIG_SOUND_WAVEFRONT=m
-CONFIG_SOUND_MAUI=m
-CONFIG_SOUND_YM3812=m
-CONFIG_SOUND_OPL3SA1=m
-CONFIG_SOUND_OPL3SA2=m
-CONFIG_SOUND_YMFPCI=m
-CONFIG_SOUND_YMFPCI_LEGACY=y
-CONFIG_SOUND_UART6850=m
-CONFIG_SOUND_AEDSP16=m
-CONFIG_SC6600=y
-CONFIG_SC6600_JOY=y
-CONFIG_SC6600_CDROM=4
-CONFIG_SC6600_CDROMBASE=0x0
-# CONFIG_AEDSP16_MSS is not set
-# CONFIG_AEDSP16_SBPRO is not set
-CONFIG_AEDSP16_MPU401=y
-CONFIG_SOUND_TVMIXER=m
-CONFIG_SOUND_KAHLUA=m
-CONFIG_SOUND_ALI5455=m
-CONFIG_SOUND_FORTE=m
-CONFIG_SOUND_RME96XX=m
-CONFIG_SOUND_AD1980=m
-
-#
-# USB support
-#
-CONFIG_USB=m
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-CONFIG_USB_AUDIO=m
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=m
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-
-#
-# USB HID Boot Protocol drivers
-#
-# CONFIG_USB_KBD is not set
-# CONFIG_USB_MOUSE is not set
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-# CONFIG_USB_SERIAL_WHITEHEAT is not set
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-CONFIG_USB_EMI26=m
-CONFIG_USB_TIGL=m
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-CONFIG_USB_CYTHERM=m
-# CONFIG_USB_TEST is not set
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_IPOIB=m
-# CONFIG_INFINIBAND_SDP is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_UDAPL_HELPER=m
-CONFIG_INFINIBAND_MELLANOX_HCA=m
-CONFIG_AUDIT=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-CONFIG_JBD_DEBUG=y
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-# CONFIG_REISERFS_PROC_INFO is not set
-CONFIG_REISERFS_FS_XATTR=y
-CONFIG_REISERFS_FS_POSIX_ACL=y
-CONFIG_REISERFS_FS_SECURITY=y
-CONFIG_JFS_FS=m
-CONFIG_JFS_POSIX_ACL=y
-CONFIG_JFS_DMAPI=y
-# CONFIG_JFS_DEBUG is not set
-CONFIG_JFS_STATISTICS=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_XFS_FS=m
-CONFIG_XFS_EXPORT=y
-CONFIG_XFS_RT=y
-CONFIG_XFS_QUOTA=m
-CONFIG_XFS_DMAPI=y
-CONFIG_XFS_SECURITY=y
-CONFIG_XFS_POSIX_ACL=y
-CONFIG_OCFS2_FS=m
-CONFIG_MINIX_FS=y
-CONFIG_ROMFS_FS=m
-CONFIG_DMAPI=m
-# CONFIG_DMAPI_DEBUG is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=m
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=m
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_NTFS_FS=m
-# CONFIG_NTFS_DEBUG is not set
-# CONFIG_NTFS_RW is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_CONFIGFS_FS=m
-CONFIG_RELAYFS_FS=m
-# CONFIG_KLOG_CHANNEL is not set
-
-#
-# Miscellaneous filesystems
-#
-CONFIG_ADFS_FS=m
-# CONFIG_ADFS_FS_RW is not set
-CONFIG_AFFS_FS=m
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-CONFIG_BEFS_FS=m
-# CONFIG_BEFS_DEBUG is not set
-CONFIG_BFS_FS=m
-CONFIG_EFS_FS=m
-CONFIG_JFFS_FS=m
-CONFIG_JFFS_FS_VERBOSE=0
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-# CONFIG_JFFS2_FS_NAND is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-CONFIG_HPFS_FS=m
-CONFIG_QNX4FS_FS=m
-# CONFIG_QNX4FS_RW is not set
-CONFIG_SYSV_FS=m
-CONFIG_UFS_FS=m
-# CONFIG_UFS_FS_WRITE is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_ACL=y
-CONFIG_NFS_ACL_SUPPORT=y
-# CONFIG_NFSD_V4 is not set
-CONFIG_NFSD_TCP=y
-CONFIG_ROOT_NFS=y
-CONFIG_LOCKD=y
-CONFIG_STATD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_SMB_FS=m
-CONFIG_SMB_NLS_DEFAULT=y
-CONFIG_SMB_NLS_REMOTE="cp850"
-CONFIG_CIFS=m
-CONFIG_CIFS_STATS=y
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-CONFIG_NCP_FS=m
-CONFIG_NCPFS_PACKET_SIGNING=y
-CONFIG_NCPFS_IOCTL_LOCKING=y
-CONFIG_NCPFS_STRONG=y
-CONFIG_NCPFS_NFS_NS=y
-CONFIG_NCPFS_OS2_NS=y
-CONFIG_NCPFS_SMALLDOS=y
-CONFIG_NCPFS_NLS=y
-CONFIG_NCPFS_EXTRAS=y
-CONFIG_CODA_FS=m
-# CONFIG_CODA_FS_OLD_API is not set
-# CONFIG_INTERMEZZO_FS is not set
-CONFIG_AFS_FS=m
-CONFIG_RXRPC=m
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-CONFIG_ATARI_PARTITION=y
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-# CONFIG_MINIX_SUBPARTITION is not set
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-CONFIG_LDM_PARTITION=y
-# CONFIG_LDM_DEBUG is not set
-CONFIG_NEC98_PARTITION=y
-CONFIG_SGI_PARTITION=y
-CONFIG_ULTRIX_PARTITION=y
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=m
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-CONFIG_FSHOOKS=y
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_CRASH_DUMP=m
-CONFIG_KERNTYPES=y
-CONFIG_CRASH_DUMP_BLOCKDEV=m
-CONFIG_CRASH_DUMP_NETDEV=m
-# CONFIG_CRASH_DUMP_MEMDEV is not set
-CONFIG_CRASH_DUMP_COMPRESS_RLE=m
-CONFIG_CRASH_DUMP_COMPRESS_GZIP=m
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_CHECKING is not set
-CONFIG_INIT_DEBUG=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_FRAME_POINTER is not set
-CONFIG_KDB=m
-CONFIG_KDB_MODULES=m
-# CONFIG_KDB_OFF is not set
-CONFIG_KDB_CONTINUE_CATASTROPHIC=0
-# CONFIG_IOMMU_DEBUG is not set
-
-#
-# Security options
-#
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=m
-CONFIG_SECURITY_ROOTPLUG=m
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-CONFIG_SECURITY_SUBDOMAIN=m
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=m
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_TEST=m
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-CONFIG_QSORT=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT=y
-CONFIG_HAS_DMA=y
-
-#
-# Build options
-#
-CONFIG_SUSE_KERNEL=y
-CONFIG_CFGNAME="smp"
-CONFIG_RELEASE="7.308"
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config
deleted file mode 100644
index 3607fa2e124207b0d8a093e4722d6955ee959b9f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686-smp.config
+++ /dev/null
@@ -1,2487 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet
-# Sat Nov 24 21:29:36 2007
-#
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDITFILESYSTEM is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SHMEM=y
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-CONFIG_MEM_MIRROR=y
-# CONFIG_X86_PC is not set
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-CONFIG_X86_GENERICARCH=y
-# CONFIG_X86_ES7000 is not set
-CONFIG_X86_CYCLONE_TIMER=y
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-# CONFIG_X86_4G is not set
-# CONFIG_X86_SWITCH_PAGETABLES is not set
-# CONFIG_X86_4G_VM_LAYOUT is not set
-# CONFIG_X86_UACCESS_INDIRECT is not set
-# CONFIG_X86_HIGH_ENTRY is not set
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_SMP=y
-CONFIG_NR_CPUS=32
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_TSC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HIGHMEM64G=y
-CONFIG_HIGHMEM=y
-CONFIG_X86_PAE=y
-# CONFIG_NUMA is not set
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-# CONFIG_IRQBALANCE is not set
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_REGPARM=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_PROC_INTF is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=y
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-# CONFIG_HOTPLUG_CPU is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_IBM=m
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=3
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_SCB2_FLASH is not set
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-# CONFIG_MTD_BLKMTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CCISS_DUMP=y
-CONFIG_CCISS_DUMP_GLUE=m
-CONFIG_DISKDUMP=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEDUMP=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8212=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-# CONFIG_SCSI_7000FASST is not set
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-# CONFIG_SCSI_AHA1542 is not set
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-# CONFIG_SCSI_DPT_I2O is not set
-CONFIG_SCSI_ARCMSR=m
-# CONFIG_SCSI_IN2000 is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_ISCSI_SFNET=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-# CONFIG_SCSI_NCR53C406A is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-CONFIG_SCSI_PROMISE_STEX=m
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_QLA_IOCTLMOD=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA4XXX=m
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_JMICRON=m
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_OLD_MODULE_COMPAT=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-# CONFIG_EL1 is not set
-# CONFIG_EL2 is not set
-# CONFIG_ELPLUS is not set
-# CONFIG_EL16 is not set
-# CONFIG_EL3 is not set
-# CONFIG_3C515 is not set
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-# CONFIG_LANCE is not set
-CONFIG_NET_VENDOR_SMC=y
-# CONFIG_WD80x3 is not set
-# CONFIG_ULTRA is not set
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-# CONFIG_NI52 is not set
-# CONFIG_NI65 is not set
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-CONFIG_HP100=m
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-# CONFIG_AC3200 is not set
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-# CONFIG_IPW_QOS is not set
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETDUMP=m
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=64
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_SCx200_WDT is not set
-# CONFIG_60XX_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_INTEL_MCH=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=y
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=y
-# CONFIG_HPET is not set
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_OVCAMCHIP=m
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-# CONFIG_SND_AD1848 is not set
-# CONFIG_SND_CS4231 is not set
-# CONFIG_SND_CS4232 is not set
-# CONFIG_SND_CS4236 is not set
-# CONFIG_SND_ES1688 is not set
-# CONFIG_SND_ES18XX is not set
-# CONFIG_SND_GUSCLASSIC is not set
-# CONFIG_SND_GUSEXTREME is not set
-# CONFIG_SND_GUSMAX is not set
-# CONFIG_SND_INTERWAVE is not set
-# CONFIG_SND_INTERWAVE_STB is not set
-# CONFIG_SND_OPTI92X_AD1848 is not set
-# CONFIG_SND_OPTI92X_CS4231 is not set
-# CONFIG_SND_OPTI93X is not set
-# CONFIG_SND_SB8 is not set
-# CONFIG_SND_SB16 is not set
-# CONFIG_SND_SBAWE is not set
-# CONFIG_SND_WAVEFRONT is not set
-# CONFIG_SND_CMI8330 is not set
-# CONFIG_SND_OPL3SA2 is not set
-# CONFIG_SND_SGALAXY is not set
-# CONFIG_SND_SSCAPE is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_AZX=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_VXP440 is not set
-CONFIG_SND_PDAUDIOCF=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_TEST=m
-
-#
-# USB ATM/DSL drivers
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS)
-#
-CONFIG_EDAC=m
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_NAND=y
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-# CONFIG_NFSD_V2_ACL is not set
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-CONFIG_DEBUG_HIGHMEM=y
-# CONFIG_DEBUG_INFO is not set
-# CONFIG_FRAME_POINTER is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_KPROBES=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_4KSTACKS is not set
-# CONFIG_SCHEDSTATS is not set
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
-CONFIG_X86_SYSENTER=y
-CONFIG_PC=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config
deleted file mode 100644
index e0f96004e1a883ba66fd0b2bd4ef455a2eea8446..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-i686.config
+++ /dev/null
@@ -1,2490 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet
-# Sat Nov 24 21:30:07 2007
-#
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDITFILESYSTEM is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SHMEM=y
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_XEN is not set
-# CONFIG_X86_ELAN is not set
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-CONFIG_M686=y
-# CONFIG_MPENTIUMII is not set
-# CONFIG_MPENTIUMIII is not set
-# CONFIG_MPENTIUMM is not set
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-CONFIG_X86_GENERIC=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_X86_PPRO_FENCE=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-# CONFIG_X86_4G is not set
-# CONFIG_X86_SWITCH_PAGETABLES is not set
-# CONFIG_X86_4G_VM_LAYOUT is not set
-# CONFIG_X86_UACCESS_INDIRECT is not set
-# CONFIG_X86_HIGH_ENTRY is not set
-CONFIG_HPET_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-# CONFIG_SMP is not set
-# CONFIG_PREEMPT is not set
-CONFIG_PREEMPT_VOLUNTARY=y
-# CONFIG_X86_UP_APIC is not set
-CONFIG_X86_TSC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_TOSHIBA=m
-CONFIG_I8K=m
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=m
-CONFIG_X86_CPUID=m
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-# CONFIG_NOHIGHMEM is not set
-CONFIG_HIGHMEM4G=y
-# CONFIG_HIGHMEM64G is not set
-CONFIG_HIGHMEM=y
-CONFIG_HIGHPTE=y
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-# CONFIG_EFI is not set
-CONFIG_REGPARM=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Power management options (ACPI, APM)
-#
-CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-CONFIG_X86_PM_TIMER=y
-
-#
-# APM (Advanced Power Management) BIOS Support
-#
-CONFIG_APM=y
-# CONFIG_APM_IGNORE_USER_SUSPEND is not set
-# CONFIG_APM_DO_ENABLE is not set
-CONFIG_APM_CPU_IDLE=y
-# CONFIG_APM_DISPLAY_BLANK is not set
-CONFIG_APM_RTC_IS_GMT=y
-# CONFIG_APM_ALLOW_INTS is not set
-# CONFIG_APM_REAL_MODE_POWER_OFF is not set
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_PROC_INTF is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=y
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-CONFIG_X86_POWERNOW_K6=m
-CONFIG_X86_POWERNOW_K7=y
-CONFIG_X86_POWERNOW_K7_ACPI=y
-CONFIG_X86_POWERNOW_K8=m
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_GX_SUSPMOD is not set
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_SPEEDSTEP_ICH=y
-CONFIG_X86_SPEEDSTEP_SMI=m
-CONFIG_X86_P4_CLOCKMOD=m
-CONFIG_X86_SPEEDSTEP_LIB=y
-# CONFIG_X86_SPEEDSTEP_RELAXED_CAP_CHECK is not set
-CONFIG_X86_LONGRUN=y
-# CONFIG_X86_LONGHAUL is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GOMMCONFIG is not set
-# CONFIG_PCI_GODIRECT is not set
-# CONFIG_PCI_GOXEN_FE is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_I82365=m
-CONFIG_TCIC=m
-CONFIG_PCMCIA_PROBE=y
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-CONFIG_HOTPLUG_PCI_COMPAQ=m
-# CONFIG_HOTPLUG_PCI_COMPAQ_NVRAM is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats
-#
-CONFIG_BINFMT_ELF=y
-# CONFIG_BINFMT_AOUT is not set
-CONFIG_BINFMT_MISC=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=3
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_SCB2_FLASH is not set
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-# CONFIG_MTD_BLKMTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CCISS_DUMP=y
-CONFIG_CCISS_DUMP_GLUE=m
-CONFIG_DISKDUMP=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEDUMP=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPNP=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8212=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-# CONFIG_SCSI_7000FASST is not set
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AHA152X=m
-# CONFIG_SCSI_AHA1542 is not set
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-# CONFIG_SCSI_DPT_I2O is not set
-CONFIG_SCSI_ARCMSR=m
-# CONFIG_SCSI_IN2000 is not set
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-CONFIG_SCSI_LPFC=m
-CONFIG_SCSI_FUTURE_DOMAIN=m
-CONFIG_SCSI_GDTH=m
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_ISCSI_SFNET=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-# CONFIG_SCSI_NCR53C406A is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-# CONFIG_SCSI_PAS16 is not set
-CONFIG_SCSI_PROMISE_STEX=m
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_QLA_IOCTLMOD=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA4XXX=m
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-CONFIG_PCMCIA_FDOMAIN=m
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_JMICRON=m
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_OLD_MODULE_COMPAT=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-# CONFIG_NET_SB1000 is not set
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-# CONFIG_EL1 is not set
-# CONFIG_EL2 is not set
-# CONFIG_ELPLUS is not set
-# CONFIG_EL16 is not set
-# CONFIG_EL3 is not set
-# CONFIG_3C515 is not set
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-# CONFIG_LANCE is not set
-CONFIG_NET_VENDOR_SMC=y
-# CONFIG_WD80x3 is not set
-# CONFIG_ULTRA is not set
-CONFIG_SMC9194=m
-CONFIG_NET_VENDOR_RACAL=y
-# CONFIG_NI5010 is not set
-# CONFIG_NI52 is not set
-# CONFIG_NI65 is not set
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_PCMCIA_XIRTULIP is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-CONFIG_HP100=m
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-# CONFIG_AC3200 is not set
-CONFIG_APRICOT=m
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_TLAN=m
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-CONFIG_NET_POCKET=y
-# CONFIG_ATP is not set
-# CONFIG_DE600 is not set
-# CONFIG_DE620 is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMTR=m
-CONFIG_IBMOL=m
-CONFIG_IBMLS=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_SKISA=m
-CONFIG_PROTEON=m
-CONFIG_ABYSS=m
-CONFIG_SMCTR=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-# CONFIG_ARLAN is not set
-CONFIG_WAVELAN=m
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-# CONFIG_IPW_QOS is not set
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_AIRO=m
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-CONFIG_PCMCIA_IBMTR=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_NICSTAR=m
-# CONFIG_ATM_NICSTAR_USE_SUNI is not set
-# CONFIG_ATM_NICSTAR_USE_IDT77105 is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-# CONFIG_ATM_IA is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETDUMP=m
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-CONFIG_ISDN_DRV_LOOP=m
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_0=y
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_AVM_A1=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_IX1MICROR2=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_ASUSCOM=y
-CONFIG_HISAX_TELEINT=y
-CONFIG_HISAX_HFCS=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_SPORTSTER=y
-CONFIG_HISAX_MIC=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_ISURF=y
-CONFIG_HISAX_HSTSAPHIR=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_ICN=m
-CONFIG_ISDN_DRV_PCBIT=m
-CONFIG_ISDN_DRV_SC=m
-CONFIG_ISDN_DRV_ACT2000=m
-CONFIG_ISDN_DRV_TPAM=m
-CONFIG_HYSDN=m
-CONFIG_HYSDN_CAPI=y
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_T1ISA=m
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-CONFIG_CAPI_EICON=y
-CONFIG_ISDN_DIVAS=m
-CONFIG_ISDN_DIVAS_BRIPCI=y
-CONFIG_ISDN_DIVAS_PRIPCI=y
-CONFIG_ISDN_DIVAS_DIVACAPI=m
-CONFIG_ISDN_DIVAS_USERIDI=m
-CONFIG_ISDN_DIVAS_MAINT=m
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_INPORT=m
-CONFIG_MOUSE_ATIXL=y
-CONFIG_MOUSE_LOGIBM=m
-CONFIG_MOUSE_PC110PAD=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_COMPUTONE is not set
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_DIGIEPCA is not set
-# CONFIG_DIGI is not set
-# CONFIG_ESPSERIAL is not set
-# CONFIG_MOXA_INTELLIO is not set
-# CONFIG_MOXA_SMARTIO is not set
-# CONFIG_ISI is not set
-CONFIG_SYNCLINK=m
-CONFIG_SYNCLINKMP=m
-CONFIG_N_HDLC=m
-# CONFIG_RISCOM8 is not set
-# CONFIG_SPECIALIX is not set
-# CONFIG_SX is not set
-# CONFIG_RIO is not set
-CONFIG_STALDRV=y
-# CONFIG_STALLION is not set
-# CONFIG_ISTALLION is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=64
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_SCx200_WDT is not set
-# CONFIG_60XX_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# ISA-based Watchdog Cards
-#
-CONFIG_PCWATCHDOG=m
-# CONFIG_MIXCOMWD is not set
-CONFIG_WDT=m
-# CONFIG_WDT_501 is not set
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-CONFIG_NVRAM=m
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-CONFIG_SONYPI=m
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-CONFIG_AGP_ALI=y
-CONFIG_AGP_ATI=y
-CONFIG_AGP_AMD=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_INTEL_MCH=y
-CONFIG_AGP_NVIDIA=y
-CONFIG_AGP_SIS=y
-CONFIG_AGP_SWORKS=y
-CONFIG_AGP_VIA=y
-CONFIG_AGP_EFFICEON=y
-CONFIG_DRM=y
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-
-#
-# PCMCIA character devices
-#
-CONFIG_SYNCLINK_CS=m
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=y
-# CONFIG_HPET is not set
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-# CONFIG_I2C_ELEKTOR is not set
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PIIX4=m
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Misc devices
-#
-CONFIG_IBM_ASM=m
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_PMS is not set
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_MEYE is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_OVCAMCHIP=m
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_CADET is not set
-# CONFIG_RADIO_RTRACK is not set
-# CONFIG_RADIO_RTRACK2 is not set
-# CONFIG_RADIO_AZTECH is not set
-# CONFIG_RADIO_GEMTEK is not set
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-# CONFIG_RADIO_SF16FMI is not set
-# CONFIG_RADIO_SF16FMR2 is not set
-# CONFIG_RADIO_TERRATEC is not set
-# CONFIG_RADIO_TRUST is not set
-# CONFIG_RADIO_TYPHOON is not set
-# CONFIG_RADIO_ZOLTRIX is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-CONFIG_FB_I810=m
-CONFIG_FB_I810_GTF=y
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_MDA_CONSOLE=m
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_RTCTIMER=m
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# ISA devices
-#
-# CONFIG_SND_AD1848 is not set
-# CONFIG_SND_CS4231 is not set
-# CONFIG_SND_CS4232 is not set
-# CONFIG_SND_CS4236 is not set
-# CONFIG_SND_ES1688 is not set
-# CONFIG_SND_ES18XX is not set
-# CONFIG_SND_GUSCLASSIC is not set
-# CONFIG_SND_GUSEXTREME is not set
-# CONFIG_SND_GUSMAX is not set
-# CONFIG_SND_INTERWAVE is not set
-# CONFIG_SND_INTERWAVE_STB is not set
-# CONFIG_SND_OPTI92X_AD1848 is not set
-# CONFIG_SND_OPTI92X_CS4231 is not set
-# CONFIG_SND_OPTI93X is not set
-# CONFIG_SND_SB8 is not set
-# CONFIG_SND_SB16 is not set
-# CONFIG_SND_SBAWE is not set
-# CONFIG_SND_WAVEFRONT is not set
-# CONFIG_SND_CMI8330 is not set
-# CONFIG_SND_OPL3SA2 is not set
-# CONFIG_SND_SGALAXY is not set
-# CONFIG_SND_SSCAPE is not set
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_AZX=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-# CONFIG_SND_VXPOCKET is not set
-# CONFIG_SND_VXP440 is not set
-CONFIG_SND_PDAUDIOCF=m
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_WHITEHEAT=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_TEST=m
-
-#
-# USB ATM/DSL drivers
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS)
-#
-CONFIG_EDAC=m
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_NAND=y
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-# CONFIG_NFSD_V2_ACL is not set
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-CONFIG_DEBUG_HIGHMEM=y
-CONFIG_DEBUG_INFO=y
-# CONFIG_FRAME_POINTER is not set
-CONFIG_EARLY_PRINTK=y
-CONFIG_DEBUG_STACKOVERFLOW=y
-CONFIG_KPROBES=y
-CONFIG_DEBUG_STACK_USAGE=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_4KSTACKS is not set
-# CONFIG_SCHEDSTATS is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_AES_586=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_SYSENTER=y
-CONFIG_PC=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config
deleted file mode 100644
index 157dcc25723fb5bf71a75fbaf7f3b2776dde8a1b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64-smp.config
+++ /dev/null
@@ -1,2045 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet
-# Sat Nov 24 21:28:15 2007
-#
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDITFILESYSTEM is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SHMEM=y
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_EFI=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_LOCAL_APIC_INFO_MOD=m
-CONFIG_FORCE_MAX_ZONEORDER=18
-CONFIG_SMP=y
-CONFIG_NR_CPUS=64
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_SCHED_SMT=y
-# CONFIG_PREEMPT is not set
-CONFIG_HAVE_DEC_LOCK=y
-# CONFIG_IA32_SUPPORT is not set
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_DELL_RBU=m
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_ACPI=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_TCIC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-# CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CCISS_DUMP=y
-CONFIG_CCISS_DUMP_GLUE=m
-CONFIG_DISKDUMP=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEDUMP=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8212=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=m
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_ISCSI_SFNET=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_PROMISE_STEX=m
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_QLA_IOCTLMOD=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA4XXX=m
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_JMICRON=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_OLD_MODULE_COMPAT=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-# CONFIG_IEEE80211 is not set
-# CONFIG_IPW2100 is not set
-# CONFIG_IPW2200 is not set
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETDUMP=m
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_SYNCLINK is not set
-# CONFIG_SYNCLINKMP is not set
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-# CONFIG_SGI_MBCS is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_ACPI=y
-CONFIG_SERIAL_8250_NR_UARTS=64
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_EFI_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_DRM=y
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_RAW_DRIVER=y
-# CONFIG_HPET is not set
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_OVCAMCHIP=m
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_AZX=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_TEST=m
-
-#
-# USB ATM/DSL drivers
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-# CONFIG_NFSD_V2_ACL is not set
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_KPROBES=y
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config
deleted file mode 100644
index 2eb9678183395d78fced4d3d6e8cb94a2969a233..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-ia64.config
+++ /dev/null
@@ -1,2045 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet
-# Sat Nov 24 21:28:54 2007
-#
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDITFILESYSTEM is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SHMEM=y
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-CONFIG_IA64=y
-CONFIG_64BIT=y
-CONFIG_MMU=y
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_TIME_INTERPOLATION=y
-CONFIG_EFI=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_IA64_GENERIC=y
-# CONFIG_IA64_DIG is not set
-# CONFIG_IA64_HP_ZX1 is not set
-# CONFIG_IA64_SGI_SN2 is not set
-# CONFIG_IA64_HP_SIM is not set
-# CONFIG_ITANIUM is not set
-CONFIG_MCKINLEY=y
-# CONFIG_IA64_PAGE_SIZE_4KB is not set
-# CONFIG_IA64_PAGE_SIZE_8KB is not set
-CONFIG_IA64_PAGE_SIZE_16KB=y
-# CONFIG_IA64_PAGE_SIZE_64KB is not set
-CONFIG_IA64_L1_CACHE_SHIFT=7
-CONFIG_NUMA=y
-CONFIG_VIRTUAL_MEM_MAP=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_IA64_CYCLONE=y
-CONFIG_IOSAPIC=y
-CONFIG_IA64_LOCAL_APIC_INFO_MOD=m
-CONFIG_FORCE_MAX_ZONEORDER=18
-CONFIG_SMP=y
-CONFIG_NR_CPUS=64
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_SCHED_SMT=y
-# CONFIG_PREEMPT is not set
-CONFIG_HAVE_DEC_LOCK=y
-# CONFIG_IA32_SUPPORT is not set
-CONFIG_IA64_MCA_RECOVERY=m
-CONFIG_PERFMON=y
-CONFIG_IA64_PALINFO=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EFI_VARS=y
-CONFIG_EFI_PCDP=y
-CONFIG_DELL_RBU=m
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Power management and ACPI
-#
-CONFIG_PM=y
-CONFIG_ACPI=y
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-
-#
-# Bus options (PCI, PCMCIA)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_TCIC=m
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-# CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_CCISS_DUMP=y
-CONFIG_CCISS_DUMP_GLUE=m
-CONFIG_DISKDUMP=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEDUMP=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8212=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SGIIOC4=m
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_ISCSI_SFNET=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_PROMISE_STEX=m
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_QLA_IOCTLMOD=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA4XXX=m
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_JMICRON=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_OLD_MODULE_COMPAT=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-# CONFIG_IEEE80211 is not set
-# CONFIG_IPW2100 is not set
-# CONFIG_IPW2200 is not set
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETDUMP=m
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_SYNCLINK is not set
-# CONFIG_SYNCLINKMP is not set
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-CONFIG_SGI_SNSC=y
-CONFIG_SGI_TIOCX=y
-# CONFIG_SGI_MBCS is not set
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-CONFIG_SERIAL_8250_ACPI=y
-CONFIG_SERIAL_8250_NR_UARTS=64
-CONFIG_SERIAL_8250_EXTENDED=y
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-CONFIG_SERIAL_SGI_L1_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-# CONFIG_CRASH is not set
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_I8XX_TCO=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-# CONFIG_HW_RANDOM is not set
-CONFIG_EFI_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_I460=y
-CONFIG_AGP_HP_ZX1=y
-CONFIG_DRM=y
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-CONFIG_RAW_DRIVER=y
-# CONFIG_HPET is not set
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HANGCHECK_TIMER=m
-CONFIG_MMTIMER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=y
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Misc devices
-#
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_OVCAMCHIP=m
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_AZX=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_TEST=m
-
-#
-# USB ATM/DSL drivers
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS)
-#
-# CONFIG_EDAC is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-# CONFIG_NFSD_V2_ACL is not set
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
-
-#
-# HP Simulator drivers
-#
-# CONFIG_HP_SIMETH is not set
-# CONFIG_HP_SIMSERIAL is not set
-# CONFIG_HP_SIMSCSI is not set
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_KPROBES=y
-CONFIG_IA64_GRANULE_16MB=y
-# CONFIG_IA64_GRANULE_64MB is not set
-# CONFIG_IA64_PRINT_HAZARDS is not set
-# CONFIG_DISABLE_VHPT is not set
-# CONFIG_IA64_DEBUG_CMPXCHG is not set
-# CONFIG_IA64_DEBUG_IRQ is not set
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config
deleted file mode 100644
index dc48f8650c012df795358ed6495ecc5e14f63146..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64-smp.config
+++ /dev/null
@@ -1,2235 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet
-# Sat Nov 24 21:26:14 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_HPET_TIMER=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDITFILESYSTEM is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SHMEM=y
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-# CONFIG_MEM_MIRROR is not set
-# CONFIG_X86_64_XEN is not set
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-# CONFIG_PREEMPT is not set
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_K8_NUMA=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_NUMA=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_NR_CPUS=32
-CONFIG_GART_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_PROC_INTF is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=y
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_UNORDERED_IO is not set
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_PCI_MSI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_TCIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=3
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_SCB2_FLASH is not set
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-# CONFIG_MTD_BLKMTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-# CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CCISS_DUMP=y
-CONFIG_CCISS_DUMP_GLUE=m
-CONFIG_DISKDUMP=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEDUMP=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8212=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_ISCSI_SFNET=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_PROMISE_STEX=m
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_QLA_IOCTLMOD=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA4XXX=m
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_JMICRON=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_OLD_MODULE_COMPAT=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-# CONFIG_IPW_QOS is not set
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETDUMP=m
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_SYNCLINK is not set
-# CONFIG_SYNCLINKMP is not set
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=64
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_SCx200_WDT is not set
-# CONFIG_60XX_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_INTEL_MCH=y
-CONFIG_DRM=y
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=y
-# CONFIG_HPET is not set
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_OVCAMCHIP=m
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_BIT32_EMUL=m
-CONFIG_SND_RTCTIMER=m
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_AZX=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_TEST=m
-
-#
-# USB ATM/DSL drivers
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS)
-#
-CONFIG_EDAC=m
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_NAND=y
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-# CONFIG_NFSD_V2_ACL is not set
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_INIT_DEBUG=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_IOMMU_DEBUG is not set
-CONFIG_KPROBES=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
diff --git a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config b/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config
deleted file mode 100644
index 51d30e084585dd55be860cc398a5b7758169bcfd..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kernel-2.6.9-2.6-rhel4-x86_64.config
+++ /dev/null
@@ -1,2235 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.9-prep.qp3.5.34.4qsnet
-# Sat Nov 24 21:27:28 2007
-#
-CONFIG_X86_64=y
-CONFIG_64BIT=y
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-CONFIG_X86_CMPXCHG=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_HPET_TIMER=y
-CONFIG_X86_PM_TIMER=y
-CONFIG_HPET_EMULATE_RTC=y
-CONFIG_GENERIC_ISA_DMA=y
-CONFIG_GENERIC_IOMAP=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_AUDITSYSCALL=y
-# CONFIG_AUDITFILESYSTEM is not set
-CONFIG_LOG_BUF_SHIFT=17
-CONFIG_HOTPLUG=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-CONFIG_SHMEM=y
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_MODULE_SIG=y
-# CONFIG_MODULE_SIG_FORCE is not set
-CONFIG_KMOD=y
-CONFIG_STOP_MACHINE=y
-
-#
-# Processor type and features
-#
-# CONFIG_MK8 is not set
-# CONFIG_MPSC is not set
-CONFIG_GENERIC_CPU=y
-# CONFIG_MEM_MIRROR is not set
-# CONFIG_X86_64_XEN is not set
-CONFIG_X86_L1_CACHE_BYTES=128
-CONFIG_X86_L1_CACHE_SHIFT=7
-CONFIG_X86_TSC=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_MICROCODE=m
-CONFIG_X86_MSR=y
-CONFIG_X86_CPUID=y
-CONFIG_X86_HT=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_MTRR=y
-CONFIG_SMP=y
-# CONFIG_PREEMPT is not set
-CONFIG_SCHED_SMT=y
-CONFIG_SCHED_MC=y
-CONFIG_K8_NUMA=y
-CONFIG_DISCONTIGMEM=y
-CONFIG_NUMA=y
-CONFIG_HAVE_DEC_LOCK=y
-CONFIG_NR_CPUS=32
-CONFIG_GART_IOMMU=y
-CONFIG_SWIOTLB=y
-CONFIG_X86_MCE=y
-CONFIG_X86_MCE_AMD=y
-CONFIG_IOPROC=y
-CONFIG_PTRACK=y
-
-#
-# Power management options
-#
-CONFIG_PM=y
-# CONFIG_PM_DEBUG is not set
-# CONFIG_SOFTWARE_SUSPEND is not set
-
-#
-# ACPI (Advanced Configuration and Power Interface) Support
-#
-CONFIG_ACPI=y
-CONFIG_ACPI_BOOT=y
-CONFIG_ACPI_INTERPRETER=y
-CONFIG_ACPI_SLEEP=y
-CONFIG_ACPI_SLEEP_PROC_FS=y
-CONFIG_ACPI_AC=m
-CONFIG_ACPI_BATTERY=m
-CONFIG_ACPI_BUTTON=m
-CONFIG_ACPI_FAN=y
-CONFIG_ACPI_PROCESSOR=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_NUMA=y
-CONFIG_ACPI_ASUS=m
-CONFIG_ACPI_TOSHIBA=m
-CONFIG_ACPI_BLACKLIST_YEAR=2001
-# CONFIG_ACPI_DEBUG is not set
-CONFIG_ACPI_BUS=y
-CONFIG_ACPI_EC=y
-CONFIG_ACPI_POWER=y
-CONFIG_ACPI_PCI=y
-CONFIG_ACPI_SYSTEM=y
-
-#
-# CPU Frequency scaling
-#
-CONFIG_CPU_FREQ=y
-# CONFIG_CPU_FREQ_PROC_INTF is not set
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=m
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=m
-# CONFIG_CPU_FREQ_24_API is not set
-CONFIG_CPU_FREQ_TABLE=y
-
-#
-# CPUFreq processor drivers
-#
-CONFIG_X86_POWERNOW_K8=y
-CONFIG_X86_POWERNOW_K8_ACPI=y
-# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_PROC_INTF is not set
-
-#
-# Bus options (PCI etc.)
-#
-CONFIG_PCI=y
-CONFIG_PCI_DIRECT=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_UNORDERED_IO is not set
-# CONFIG_HOTPLUG_CPU is not set
-CONFIG_PCI_MSI=y
-CONFIG_PCI_LEGACY_PROC=y
-# CONFIG_PCI_NAMES is not set
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=m
-# CONFIG_PCMCIA_DEBUG is not set
-CONFIG_YENTA=m
-CONFIG_CARDBUS=y
-CONFIG_PD6729=m
-# CONFIG_I82092 is not set
-CONFIG_TCIC=m
-
-#
-# PCI Hotplug Support
-#
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_FAKE is not set
-CONFIG_HOTPLUG_PCI_ACPI=m
-CONFIG_HOTPLUG_PCI_ACPI_IBM=m
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=m
-# CONFIG_HOTPLUG_PCI_PCIE_POLL_EVENT_MODE is not set
-CONFIG_HOTPLUG_PCI_SHPC=m
-# CONFIG_HOTPLUG_PCI_SHPC_POLL_EVENT_MODE is not set
-
-#
-# Executable file formats / Emulations
-#
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_IA32_EMULATION=y
-# CONFIG_IA32_AOUT is not set
-CONFIG_COMPAT=y
-CONFIG_SYSVIPC_COMPAT=y
-CONFIG_UID16=y
-
-#
-# Device Drivers
-#
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-CONFIG_FW_LOADER=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-CONFIG_MTD=m
-# CONFIG_MTD_DEBUG is not set
-CONFIG_MTD_PARTITIONS=y
-CONFIG_MTD_CONCAT=m
-CONFIG_MTD_REDBOOT_PARTS=m
-# CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is not set
-# CONFIG_MTD_REDBOOT_PARTS_READONLY is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-
-#
-# User Modules And Translation Layers
-#
-CONFIG_MTD_CHAR=m
-CONFIG_MTD_BLOCK=m
-CONFIG_MTD_BLOCK_RO=m
-CONFIG_FTL=m
-CONFIG_NFTL=m
-CONFIG_NFTL_RW=y
-# CONFIG_INFTL is not set
-
-#
-# RAM/ROM/Flash chip drivers
-#
-CONFIG_MTD_CFI=m
-CONFIG_MTD_JEDECPROBE=m
-CONFIG_MTD_GEN_PROBE=m
-# CONFIG_MTD_CFI_ADV_OPTIONS is not set
-CONFIG_MTD_MAP_BANK_WIDTH_1=y
-CONFIG_MTD_MAP_BANK_WIDTH_2=y
-CONFIG_MTD_MAP_BANK_WIDTH_4=y
-# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
-# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
-CONFIG_MTD_CFI_I1=y
-CONFIG_MTD_CFI_I2=y
-# CONFIG_MTD_CFI_I4 is not set
-# CONFIG_MTD_CFI_I8 is not set
-CONFIG_MTD_CFI_INTELEXT=m
-CONFIG_MTD_CFI_AMDSTD=m
-CONFIG_MTD_CFI_AMDSTD_RETRY=3
-CONFIG_MTD_CFI_STAA=m
-CONFIG_MTD_CFI_UTIL=m
-CONFIG_MTD_RAM=m
-CONFIG_MTD_ROM=m
-CONFIG_MTD_ABSENT=m
-
-#
-# Mapping drivers for chip access
-#
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-# CONFIG_MTD_PHYSMAP is not set
-# CONFIG_MTD_PNC2000 is not set
-CONFIG_MTD_SC520CDP=m
-CONFIG_MTD_NETSC520=m
-CONFIG_MTD_SCx200_DOCFLASH=m
-# CONFIG_MTD_AMD76XROM is not set
-# CONFIG_MTD_SCB2_FLASH is not set
-# CONFIG_MTD_NETtel is not set
-# CONFIG_MTD_DILNETPC is not set
-# CONFIG_MTD_L440GX is not set
-
-#
-# Self-contained MTD device drivers
-#
-# CONFIG_MTD_PMC551 is not set
-# CONFIG_MTD_SLRAM is not set
-# CONFIG_MTD_PHRAM is not set
-CONFIG_MTD_MTDRAM=m
-CONFIG_MTDRAM_TOTAL_SIZE=4096
-CONFIG_MTDRAM_ERASE_SIZE=128
-# CONFIG_MTD_BLKMTD is not set
-
-#
-# Disk-On-Chip Device Drivers
-#
-# CONFIG_MTD_DOC2000 is not set
-# CONFIG_MTD_DOC2001 is not set
-# CONFIG_MTD_DOC2001PLUS is not set
-
-#
-# NAND Flash Device Drivers
-#
-CONFIG_MTD_NAND=m
-# CONFIG_MTD_NAND_VERIFY_WRITE is not set
-CONFIG_MTD_NAND_IDS=m
-# CONFIG_MTD_NAND_DISKONCHIP is not set
-
-#
-# Parallel port support
-#
-CONFIG_PARPORT=m
-CONFIG_PARPORT_PC=m
-CONFIG_PARPORT_PC_CML1=m
-CONFIG_PARPORT_SERIAL=m
-# CONFIG_PARPORT_PC_FIFO is not set
-# CONFIG_PARPORT_PC_SUPERIO is not set
-CONFIG_PARPORT_PC_PCMCIA=m
-# CONFIG_PARPORT_OTHER is not set
-CONFIG_PARPORT_1284=y
-
-#
-# Plug and Play support
-#
-
-#
-# Block devices
-#
-CONFIG_BLK_DEV_FD=m
-# CONFIG_PARIDE is not set
-CONFIG_BLK_CPQ_DA=m
-CONFIG_BLK_CPQ_CISS_DA=m
-CONFIG_CISS_SCSI_TAPE=y
-CONFIG_BLK_DEV_DAC960=m
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=m
-CONFIG_BLK_DEV_CRYPTOLOOP=m
-CONFIG_BLK_DEV_NBD=m
-CONFIG_BLK_DEV_SX8=m
-# CONFIG_BLK_DEV_UB is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-CONFIG_CCISS_DUMP=y
-CONFIG_CCISS_DUMP_GLUE=m
-CONFIG_DISKDUMP=m
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_IDE_SATA is not set
-# CONFIG_BLK_DEV_HD_IDE is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-CONFIG_BLK_DEV_IDECS=m
-CONFIG_BLK_DEV_DELKIN=m
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDETAPE is not set
-CONFIG_BLK_DEV_IDEFLOPPY=y
-CONFIG_BLK_DEV_IDESCSI=m
-CONFIG_BLK_DEV_IDEDUMP=m
-# CONFIG_IDE_TASK_IOCTL is not set
-# CONFIG_IDE_TASKFILE_IO is not set
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_IDE_GENERIC=y
-# CONFIG_BLK_DEV_CMD640 is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-# CONFIG_BLK_DEV_OFFBOARD is not set
-CONFIG_BLK_DEV_GENERIC=y
-# CONFIG_BLK_DEV_OPTI621 is not set
-CONFIG_BLK_DEV_RZ1000=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_AEC62XX=y
-CONFIG_BLK_DEV_ALI15X3=y
-# CONFIG_WDC_ALI15X3 is not set
-CONFIG_BLK_DEV_AMD74XX=y
-CONFIG_BLK_DEV_ATIIXP=y
-CONFIG_BLK_DEV_CMD64X=y
-CONFIG_BLK_DEV_TRIFLEX=y
-CONFIG_BLK_DEV_CY82C693=y
-CONFIG_BLK_DEV_CS5520=y
-CONFIG_BLK_DEV_CS5530=y
-CONFIG_BLK_DEV_HPT34X=y
-# CONFIG_HPT34X_AUTODMA is not set
-CONFIG_BLK_DEV_HPT366=y
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-CONFIG_BLK_DEV_IT8212=y
-# CONFIG_BLK_DEV_NS87415 is not set
-CONFIG_BLK_DEV_PDC202XX_OLD=y
-# CONFIG_PDC202XX_BURST is not set
-CONFIG_BLK_DEV_PDC202XX_NEW=y
-CONFIG_PDC202XX_FORCE=y
-CONFIG_BLK_DEV_SVWKS=y
-CONFIG_BLK_DEV_SIIMAGE=y
-CONFIG_BLK_DEV_SIS5513=y
-CONFIG_BLK_DEV_SLC90E66=y
-# CONFIG_BLK_DEV_TRM290 is not set
-CONFIG_BLK_DEV_VIA82CXXX=y
-# CONFIG_IDE_ARM is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_BLK_DEV_HD is not set
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=m
-CONFIG_SCSI_PROC_FS=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=m
-CONFIG_SCSI_DUMP=m
-CONFIG_SD_IOSTATS=y
-CONFIG_CHR_DEV_ST=m
-CONFIG_CHR_DEV_OSST=m
-CONFIG_BLK_DEV_SR=m
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=m
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-# CONFIG_SCSI_MULTI_LUN is not set
-CONFIG_SCSI_CONSTANTS=y
-CONFIG_SCSI_LOGGING=y
-
-#
-# SCSI Transport Attributes
-#
-CONFIG_SCSI_SPI_ATTRS=m
-CONFIG_SCSI_FC_ATTRS=m
-CONFIG_SCSI_ISCSI_ATTRS=m
-
-#
-# SCSI low-level drivers
-#
-CONFIG_BLK_DEV_3W_XXXX_RAID=m
-CONFIG_SCSI_3W_9XXX=m
-CONFIG_SCSI_ACARD=m
-CONFIG_SCSI_AACRAID=m
-CONFIG_SCSI_AIC7XXX=m
-CONFIG_AIC7XXX_CMDS_PER_DEVICE=4
-CONFIG_AIC7XXX_RESET_DELAY_MS=15000
-# CONFIG_AIC7XXX_DEBUG_ENABLE is not set
-CONFIG_AIC7XXX_DEBUG_MASK=0
-# CONFIG_AIC7XXX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ADP94XX=m
-CONFIG_SCSI_AIC7XXX_OLD=m
-CONFIG_SCSI_AIC79XX=m
-CONFIG_AIC79XX_CMDS_PER_DEVICE=4
-CONFIG_AIC79XX_RESET_DELAY_MS=15000
-# CONFIG_AIC79XX_ENABLE_RD_STRM is not set
-# CONFIG_AIC79XX_DEBUG_ENABLE is not set
-CONFIG_AIC79XX_DEBUG_MASK=0
-# CONFIG_AIC79XX_REG_PRETTY_PRINT is not set
-CONFIG_SCSI_ARCMSR=m
-CONFIG_MEGARAID_NEWGEN=y
-CONFIG_MEGARAID_MM=m
-CONFIG_MEGARAID_MAILBOX=m
-CONFIG_MEGARAID_SAS=m
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-CONFIG_SCSI_LPFC=m
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-CONFIG_SCSI_GDTH=m
-CONFIG_SCSI_IPS=m
-CONFIG_SCSI_INITIO=m
-# CONFIG_SCSI_INIA100 is not set
-CONFIG_SCSI_ISCSI_SFNET=m
-CONFIG_SCSI_PPA=m
-CONFIG_SCSI_IMM=m
-# CONFIG_SCSI_IZIP_EPP16 is not set
-# CONFIG_SCSI_IZIP_SLOW_CTR is not set
-CONFIG_SCSI_SYM53C8XX_2=m
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_IPR is not set
-CONFIG_SCSI_PROMISE_STEX=m
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-CONFIG_SCSI_QLOGIC_1280=m
-CONFIG_SCSI_QLA2XXX=m
-CONFIG_QLA_IOCTLMOD=m
-CONFIG_SCSI_QLA21XX=m
-CONFIG_SCSI_QLA22XX=m
-CONFIG_SCSI_QLA2300=m
-CONFIG_SCSI_QLA2322=m
-CONFIG_SCSI_QLA6312=m
-CONFIG_SCSI_QLA24XX=m
-CONFIG_SCSI_QLA4XXX=m
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_DEBUG is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-# CONFIG_PCMCIA_SYM53C500 is not set
-
-#
-# Serial ATA (prod) and Parallel ATA (experimental) drivers
-#
-CONFIG_ATA=m
-CONFIG_SATA_AHCI=m
-CONFIG_SATA_SVW=m
-CONFIG_ATA_PIIX=m
-CONFIG_SATA_MV=m
-CONFIG_SATA_NV=m
-CONFIG_PDC_ADMA=m
-CONFIG_SATA_QSTOR=m
-CONFIG_SATA_PROMISE=m
-CONFIG_SATA_SX4=m
-CONFIG_SATA_SIL=m
-CONFIG_SATA_SIL24=m
-CONFIG_SATA_SIS=m
-CONFIG_SATA_ULI=m
-CONFIG_SATA_VIA=m
-CONFIG_SATA_VITESSE=m
-CONFIG_SATA_INTEL_COMBINED=y
-CONFIG_PATA_PDC2027X=m
-CONFIG_PATA_JMICRON=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-CONFIG_DM_MULTIPATH=m
-CONFIG_DM_MULTIPATH_EMC=m
-
-#
-# Fusion MPT device support
-#
-CONFIG_FUSION=y
-CONFIG_FUSION_SPI=m
-CONFIG_FUSION_FC=m
-CONFIG_FUSION_SAS=m
-CONFIG_FUSION_MAX_SGE=40
-CONFIG_FUSION_CTL=m
-CONFIG_FUSION_LAN=m
-CONFIG_FUSION_OLD_MODULE_COMPAT=m
-
-#
-# IEEE 1394 (FireWire) support
-#
-CONFIG_IEEE1394=m
-
-#
-# Subsystem Options
-#
-# CONFIG_IEEE1394_VERBOSEDEBUG is not set
-# CONFIG_IEEE1394_OUI_DB is not set
-CONFIG_IEEE1394_EXTRA_CONFIG_ROMS=y
-CONFIG_IEEE1394_CONFIG_ROM_IP1394=y
-
-#
-# Device Drivers
-#
-CONFIG_IEEE1394_PCILYNX=m
-CONFIG_IEEE1394_OHCI1394=m
-
-#
-# Protocol Drivers
-#
-CONFIG_IEEE1394_VIDEO1394=m
-CONFIG_IEEE1394_SBP2=m
-CONFIG_IEEE1394_SBP2_PHYS_DMA=y
-CONFIG_IEEE1394_ETH1394=m
-CONFIG_IEEE1394_DV1394=m
-CONFIG_IEEE1394_RAWIO=m
-CONFIG_IEEE1394_CMP=m
-CONFIG_IEEE1394_AMDTP=m
-
-#
-# I2O device support
-#
-CONFIG_I2O=m
-CONFIG_I2O_CONFIG=m
-CONFIG_I2O_BLOCK=m
-CONFIG_I2O_SCSI=m
-CONFIG_I2O_PROC=m
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=y
-# CONFIG_LLC2 is not set
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETPOLL=y
-# CONFIG_NETPOLL_RX is not set
-CONFIG_NETPOLL_TRAP=y
-CONFIG_NET_POLL_CONTROLLER=y
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-CONFIG_BT=m
-CONFIG_BT_L2CAP=m
-CONFIG_BT_SCO=m
-CONFIG_BT_RFCOMM=m
-CONFIG_BT_RFCOMM_TTY=y
-CONFIG_BT_BNEP=m
-CONFIG_BT_BNEP_MC_FILTER=y
-CONFIG_BT_BNEP_PROTO_FILTER=y
-CONFIG_BT_CMTP=m
-CONFIG_BT_HIDP=m
-
-#
-# Bluetooth device drivers
-#
-CONFIG_BT_HCIUSB=m
-CONFIG_BT_HCIUSB_SCO=y
-CONFIG_BT_HCIUART=m
-CONFIG_BT_HCIUART_H4=y
-CONFIG_BT_HCIUART_BCSP=y
-CONFIG_BT_HCIUART_BCSP_TXCRC=y
-CONFIG_BT_HCIBCM203X=m
-CONFIG_BT_HCIBFUSB=m
-CONFIG_BT_HCIDTL1=m
-CONFIG_BT_HCIBT3C=m
-CONFIG_BT_HCIBLUECARD=m
-CONFIG_BT_HCIBTUART=m
-CONFIG_BT_HCIVHCI=m
-CONFIG_TUX=m
-
-#
-# TUX options
-#
-CONFIG_TUX_EXTCGI=y
-# CONFIG_TUX_EXTENDED_LOG is not set
-# CONFIG_TUX_DEBUG is not set
-CONFIG_NETDEVICES=y
-CONFIG_DUMMY=m
-CONFIG_BONDING=m
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-CONFIG_HAPPYMEAL=m
-CONFIG_SUNGEM=m
-CONFIG_NET_VENDOR_3COM=y
-CONFIG_VORTEX=m
-CONFIG_TYPHOON=m
-
-#
-# Tulip family network device support
-#
-CONFIG_NET_TULIP=y
-CONFIG_DE2104X=m
-CONFIG_TULIP=m
-# CONFIG_TULIP_MWI is not set
-CONFIG_TULIP_MMIO=y
-# CONFIG_TULIP_NAPI is not set
-CONFIG_DE4X5=m
-CONFIG_WINBOND_840=m
-CONFIG_DM9102=m
-CONFIG_PCMCIA_XIRCOM=m
-# CONFIG_HP100 is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=m
-CONFIG_AMD8111_ETH=m
-CONFIG_AMD8111E_NAPI=y
-CONFIG_ADAPTEC_STARFIRE=m
-CONFIG_ADAPTEC_STARFIRE_NAPI=y
-CONFIG_B44=m
-CONFIG_FORCEDETH=m
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=m
-# CONFIG_EEPRO100_PIO is not set
-CONFIG_E100=m
-CONFIG_E100_NAPI=y
-CONFIG_FEALNX=m
-CONFIG_NATSEMI=m
-CONFIG_NE2K_PCI=m
-CONFIG_8139CP=m
-CONFIG_8139TOO=m
-CONFIG_8139TOO_PIO=y
-# CONFIG_8139TOO_TUNE_TWISTER is not set
-CONFIG_8139TOO_8129=y
-# CONFIG_8139_OLD_RX_RESET is not set
-CONFIG_SIS900=m
-CONFIG_EPIC100=m
-# CONFIG_SUNDANCE is not set
-CONFIG_VIA_RHINE=m
-CONFIG_VIA_RHINE_MMIO=y
-
-#
-# Ethernet (1000 Mbit)
-#
-CONFIG_ACENIC=m
-# CONFIG_ACENIC_OMIT_TIGON_I is not set
-CONFIG_DL2K=m
-CONFIG_E1000=m
-CONFIG_E1000_NAPI=y
-CONFIG_E1000E=m
-CONFIG_IGB=m
-CONFIG_NS83820=m
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-CONFIG_R8169=m
-CONFIG_R8169_NAPI=y
-CONFIG_SKGE=m
-CONFIG_SKY2=m
-CONFIG_SK98LIN=m
-CONFIG_VIA_VELOCITY=m
-CONFIG_TIGON3=m
-CONFIG_BNX2=m
-CONFIG_QLA3XXX=m
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_IXGB=m
-CONFIG_IXGB_NAPI=y
-CONFIG_CHELSIO_T3=m
-CONFIG_S2IO=m
-CONFIG_S2IO_NAPI=y
-CONFIG_NETXEN_NIC=m
-
-#
-# Token Ring devices
-#
-CONFIG_TR=y
-CONFIG_IBMOL=m
-CONFIG_3C359=m
-CONFIG_TMS380TR=m
-CONFIG_TMSPCI=m
-CONFIG_ABYSS=m
-
-#
-# Wireless LAN (non-hamradio)
-#
-CONFIG_NET_RADIO=y
-
-#
-# Obsolete Wireless cards support (pre-802.11)
-#
-# CONFIG_STRIP is not set
-CONFIG_PCMCIA_WAVELAN=m
-CONFIG_PCMCIA_NETWAVE=m
-
-#
-# Wireless 802.11 Frequency Hopping cards support
-#
-# CONFIG_PCMCIA_RAYCS is not set
-
-#
-# Wireless 802.11b ISA/PCI cards support
-#
-CONFIG_IEEE80211=m
-# CONFIG_IEEE80211_DEBUG is not set
-CONFIG_IEEE80211_CRYPT_WEP=m
-CONFIG_IEEE80211_CRYPT_CCMP=m
-CONFIG_IEEE80211_CRYPT_TKIP=m
-CONFIG_IPW2100=m
-CONFIG_IPW2100_MONITOR=y
-# CONFIG_IPW2100_DEBUG is not set
-CONFIG_IPW2200=m
-CONFIG_IPW2200_MONITOR=y
-# CONFIG_IPW_QOS is not set
-# CONFIG_IPW2200_DEBUG is not set
-CONFIG_HERMES=m
-CONFIG_PLX_HERMES=m
-CONFIG_TMD_HERMES=m
-CONFIG_PCI_HERMES=m
-CONFIG_ATMEL=m
-CONFIG_PCI_ATMEL=m
-
-#
-# Wireless 802.11b Pcmcia/Cardbus cards support
-#
-CONFIG_PCMCIA_HERMES=m
-CONFIG_AIRO_CS=m
-CONFIG_PCMCIA_ATMEL=m
-CONFIG_PCMCIA_WL3501=m
-
-#
-# Prism GT/Duette 802.11(a/b/g) PCI/Cardbus support
-#
-CONFIG_PRISM54=m
-CONFIG_NET_WIRELESS=y
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-CONFIG_PCMCIA_3C589=m
-CONFIG_PCMCIA_3C574=m
-CONFIG_PCMCIA_FMVJ18X=m
-CONFIG_PCMCIA_PCNET=m
-CONFIG_PCMCIA_NMCLAN=m
-CONFIG_PCMCIA_SMC91C92=m
-CONFIG_PCMCIA_XIRC2PS=m
-CONFIG_PCMCIA_AXNET=m
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-CONFIG_ATM_TCP=m
-CONFIG_ATM_LANAI=m
-CONFIG_ATM_ENI=m
-# CONFIG_ATM_ENI_DEBUG is not set
-# CONFIG_ATM_ENI_TUNE_BURST is not set
-CONFIG_ATM_FIRESTREAM=m
-# CONFIG_ATM_ZATM is not set
-CONFIG_ATM_IDT77252=m
-# CONFIG_ATM_IDT77252_DEBUG is not set
-# CONFIG_ATM_IDT77252_RCV_ALL is not set
-CONFIG_ATM_IDT77252_USE_SUNI=y
-CONFIG_ATM_AMBASSADOR=m
-# CONFIG_ATM_AMBASSADOR_DEBUG is not set
-CONFIG_ATM_HORIZON=m
-# CONFIG_ATM_HORIZON_DEBUG is not set
-CONFIG_ATM_FORE200E_MAYBE=m
-# CONFIG_ATM_FORE200E_PCA is not set
-CONFIG_ATM_HE=m
-# CONFIG_ATM_HE_USE_SUNI is not set
-CONFIG_FDDI=y
-# CONFIG_DEFXX is not set
-# CONFIG_SKFP is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PLIP is not set
-CONFIG_PPP=m
-CONFIG_PPP_MULTILINK=y
-CONFIG_PPP_FILTER=y
-CONFIG_PPP_ASYNC=m
-CONFIG_PPP_SYNC_TTY=m
-CONFIG_PPP_DEFLATE=m
-# CONFIG_PPP_BSDCOMP is not set
-CONFIG_PPPOE=m
-CONFIG_PPPOATM=m
-# CONFIG_SLIP is not set
-CONFIG_NET_FC=y
-# CONFIG_SHAPER is not set
-CONFIG_NETCONSOLE=m
-CONFIG_NETDUMP=m
-
-#
-# ISDN subsystem
-#
-CONFIG_ISDN=m
-
-#
-# Old ISDN4Linux
-#
-CONFIG_ISDN_I4L=m
-CONFIG_ISDN_PPP=y
-CONFIG_ISDN_PPP_VJ=y
-CONFIG_ISDN_MPP=y
-CONFIG_IPPP_FILTER=y
-# CONFIG_ISDN_PPP_BSDCOMP is not set
-CONFIG_ISDN_AUDIO=y
-CONFIG_ISDN_TTY_FAX=y
-
-#
-# ISDN feature submodules
-#
-
-#
-# ISDN4Linux hardware drivers
-#
-
-#
-# Passive cards
-#
-CONFIG_ISDN_DRV_HISAX=m
-
-#
-# D-channel protocol features
-#
-CONFIG_HISAX_EURO=y
-CONFIG_DE_AOC=y
-CONFIG_HISAX_NO_SENDCOMPLETE=y
-CONFIG_HISAX_NO_LLC=y
-CONFIG_HISAX_NO_KEYPAD=y
-CONFIG_HISAX_1TR6=y
-CONFIG_HISAX_NI1=y
-CONFIG_HISAX_MAX_CARDS=8
-
-#
-# HiSax supported cards
-#
-CONFIG_HISAX_16_3=y
-CONFIG_HISAX_TELESPCI=y
-CONFIG_HISAX_S0BOX=y
-CONFIG_HISAX_FRITZPCI=y
-CONFIG_HISAX_AVM_A1_PCMCIA=y
-CONFIG_HISAX_ELSA=y
-CONFIG_HISAX_DIEHLDIVA=y
-CONFIG_HISAX_SEDLBAUER=y
-CONFIG_HISAX_NETJET=y
-CONFIG_HISAX_NETJET_U=y
-CONFIG_HISAX_NICCY=y
-CONFIG_HISAX_BKM_A4T=y
-CONFIG_HISAX_SCT_QUADRO=y
-CONFIG_HISAX_GAZEL=y
-CONFIG_HISAX_HFC_PCI=y
-CONFIG_HISAX_W6692=y
-CONFIG_HISAX_HFC_SX=y
-CONFIG_HISAX_ENTERNOW_PCI=y
-# CONFIG_HISAX_DEBUG is not set
-
-#
-# HiSax PCMCIA card service modules
-#
-CONFIG_HISAX_SEDLBAUER_CS=m
-CONFIG_HISAX_ELSA_CS=m
-CONFIG_HISAX_AVM_A1_CS=m
-CONFIG_HISAX_TELES_CS=m
-
-#
-# HiSax sub driver modules
-#
-CONFIG_HISAX_ST5481=m
-CONFIG_HISAX_HFCUSB=m
-CONFIG_HISAX_FRITZ_PCIPNP=m
-CONFIG_HISAX_HDLC=y
-
-#
-# Active cards
-#
-CONFIG_ISDN_DRV_TPAM=m
-
-#
-# CAPI subsystem
-#
-CONFIG_ISDN_CAPI=m
-CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON=y
-CONFIG_ISDN_CAPI_MIDDLEWARE=y
-CONFIG_ISDN_CAPI_CAPI20=m
-CONFIG_ISDN_CAPI_CAPIFS_BOOL=y
-CONFIG_ISDN_CAPI_CAPIFS=m
-CONFIG_ISDN_CAPI_CAPIDRV=m
-
-#
-# CAPI hardware drivers
-#
-
-#
-# Active AVM cards
-#
-CONFIG_CAPI_AVM=y
-CONFIG_ISDN_DRV_AVMB1_B1PCI=m
-CONFIG_ISDN_DRV_AVMB1_B1PCIV4=y
-CONFIG_ISDN_DRV_AVMB1_B1PCMCIA=m
-CONFIG_ISDN_DRV_AVMB1_AVM_CS=m
-CONFIG_ISDN_DRV_AVMB1_T1PCI=m
-CONFIG_ISDN_DRV_AVMB1_C4=m
-
-#
-# Active Eicon DIVA Server cards
-#
-# CONFIG_CAPI_EICON is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INPUT_JOYDEV=m
-# CONFIG_INPUT_TSDEV is not set
-CONFIG_INPUT_EVDEV=y
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-CONFIG_SERIO=y
-CONFIG_SERIO_I8042=y
-CONFIG_SERIO_SERPORT=y
-# CONFIG_SERIO_CT82C710 is not set
-# CONFIG_SERIO_PARKBD is not set
-# CONFIG_SERIO_PCIPS2 is not set
-# CONFIG_SERIO_RAW is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_KEYBOARD_ATKBD=y
-# CONFIG_KEYBOARD_SUNKBD is not set
-# CONFIG_KEYBOARD_LKKBD is not set
-# CONFIG_KEYBOARD_XTKBD is not set
-# CONFIG_KEYBOARD_NEWTON is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_SERIAL=m
-CONFIG_MOUSE_VSXXXAA=m
-CONFIG_INPUT_JOYSTICK=y
-# CONFIG_JOYSTICK_IFORCE is not set
-# CONFIG_JOYSTICK_WARRIOR is not set
-# CONFIG_JOYSTICK_MAGELLAN is not set
-# CONFIG_JOYSTICK_SPACEORB is not set
-# CONFIG_JOYSTICK_SPACEBALL is not set
-# CONFIG_JOYSTICK_STINGER is not set
-# CONFIG_JOYSTICK_TWIDDLER is not set
-# CONFIG_JOYSTICK_DB9 is not set
-# CONFIG_JOYSTICK_GAMECON is not set
-# CONFIG_JOYSTICK_TURBOGRAFX is not set
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_TOUCHSCREEN_GUNZE=m
-CONFIG_INPUT_MISC=y
-CONFIG_INPUT_PCSPKR=m
-CONFIG_INPUT_UINPUT=m
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-CONFIG_SERIAL_NONSTANDARD=y
-# CONFIG_ROCKETPORT is not set
-# CONFIG_CYCLADES is not set
-# CONFIG_SYNCLINK is not set
-# CONFIG_SYNCLINKMP is not set
-CONFIG_N_HDLC=m
-CONFIG_STALDRV=y
-
-#
-# Serial drivers
-#
-CONFIG_SERIAL_8250=y
-CONFIG_SERIAL_8250_CONSOLE=y
-CONFIG_SERIAL_8250_CS=m
-# CONFIG_SERIAL_8250_ACPI is not set
-CONFIG_SERIAL_8250_NR_UARTS=64
-CONFIG_SERIAL_8250_EXTENDED=y
-# CONFIG_SERIAL_8250_MANY_PORTS is not set
-CONFIG_SERIAL_8250_SHARE_IRQ=y
-CONFIG_SERIAL_8250_DETECT_IRQ=y
-CONFIG_SERIAL_8250_MULTIPORT=y
-CONFIG_SERIAL_8250_RSA=y
-
-#
-# Non-8250 serial port support
-#
-CONFIG_SERIAL_CORE=y
-CONFIG_SERIAL_CORE_CONSOLE=y
-# CONFIG_SERIAL_JSM is not set
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_CRASH=m
-CONFIG_PRINTER=m
-CONFIG_LP_CONSOLE=y
-CONFIG_PPDEV=m
-# CONFIG_TIPAR is not set
-
-#
-# IPMI
-#
-CONFIG_IPMI_HANDLER=m
-# CONFIG_IPMI_PANIC_EVENT is not set
-CONFIG_IPMI_DEVICE_INTERFACE=m
-CONFIG_IPMI_SI=m
-CONFIG_IPMI_WATCHDOG=m
-CONFIG_IPMI_POWEROFF=m
-
-#
-# Watchdog Cards
-#
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-
-#
-# Watchdog Device Drivers
-#
-CONFIG_SOFT_WATCHDOG=m
-CONFIG_ACQUIRE_WDT=m
-CONFIG_ADVANTECH_WDT=m
-CONFIG_ALIM1535_WDT=m
-CONFIG_ALIM7101_WDT=m
-CONFIG_SC520_WDT=m
-CONFIG_EUROTECH_WDT=m
-CONFIG_IB700_WDT=m
-CONFIG_WAFER_WDT=m
-CONFIG_I8XX_TCO=m
-CONFIG_SC1200_WDT=m
-# CONFIG_SCx200_WDT is not set
-# CONFIG_60XX_WDT is not set
-CONFIG_CPU5_WDT=m
-CONFIG_W83627HF_WDT=m
-CONFIG_W83877F_WDT=m
-CONFIG_MACHZ_WDT=m
-
-#
-# PCI-based Watchdog Cards
-#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
-
-#
-# USB-based Watchdog Cards
-#
-CONFIG_USBPCWATCHDOG=m
-CONFIG_HW_RANDOM=m
-# CONFIG_NVRAM is not set
-CONFIG_RTC=y
-CONFIG_DTLK=m
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-CONFIG_AGP=y
-CONFIG_AGP_AMD64=y
-CONFIG_AGP_INTEL=y
-CONFIG_AGP_INTEL_MCH=y
-CONFIG_DRM=y
-# CONFIG_DRM_TDFX is not set
-CONFIG_DRM_R128=m
-CONFIG_DRM_RADEON=m
-CONFIG_DRM_I810=m
-CONFIG_DRM_I830=m
-CONFIG_DRM_I915=m
-CONFIG_DRM_MGA=m
-# CONFIG_DRM_SIS is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-# CONFIG_MWAVE is not set
-CONFIG_RAW_DRIVER=y
-# CONFIG_HPET is not set
-CONFIG_MAX_RAW_DEVS=8192
-CONFIG_HANGCHECK_TIMER=m
-
-#
-# I2C support
-#
-CONFIG_I2C=m
-CONFIG_I2C_CHARDEV=m
-
-#
-# I2C Algorithms
-#
-CONFIG_I2C_ALGOBIT=m
-CONFIG_I2C_ALGOPCF=m
-CONFIG_I2C_ALGOPCA=m
-
-#
-# I2C Hardware Bus support
-#
-CONFIG_I2C_ALI1535=m
-CONFIG_I2C_ALI1563=m
-CONFIG_I2C_ALI15X3=m
-CONFIG_I2C_AMD756=m
-CONFIG_I2C_AMD8111=m
-CONFIG_I2C_I801=m
-CONFIG_I2C_I810=m
-CONFIG_I2C_ISA=m
-CONFIG_I2C_NFORCE2=m
-# CONFIG_I2C_PARPORT is not set
-# CONFIG_I2C_PARPORT_LIGHT is not set
-CONFIG_I2C_PROSAVAGE=m
-CONFIG_I2C_SAVAGE4=m
-# CONFIG_SCx200_ACB is not set
-CONFIG_I2C_SIS5595=m
-CONFIG_I2C_SIS630=m
-CONFIG_I2C_SIS96X=m
-CONFIG_I2C_VIA=m
-CONFIG_I2C_VIAPRO=m
-CONFIG_I2C_VOODOO3=m
-# CONFIG_I2C_PCA_ISA is not set
-
-#
-# Hardware Sensors Chip support
-#
-CONFIG_I2C_SENSOR=m
-CONFIG_SENSORS_ADM1021=m
-CONFIG_SENSORS_ADM1025=m
-CONFIG_SENSORS_ADM1031=m
-CONFIG_SENSORS_ASB100=m
-CONFIG_SENSORS_DS1621=m
-CONFIG_SENSORS_FSCHER=m
-CONFIG_SENSORS_GL518SM=m
-CONFIG_SENSORS_IT87=m
-CONFIG_SENSORS_LM75=m
-CONFIG_SENSORS_LM77=m
-CONFIG_SENSORS_LM78=m
-CONFIG_SENSORS_LM80=m
-CONFIG_SENSORS_LM83=m
-CONFIG_SENSORS_LM85=m
-CONFIG_SENSORS_LM90=m
-CONFIG_SENSORS_MAX1619=m
-CONFIG_SENSORS_SMSC47M1=m
-CONFIG_SENSORS_VIA686A=m
-CONFIG_SENSORS_W83781D=m
-CONFIG_SENSORS_W83L785TS=m
-CONFIG_SENSORS_W83627HF=m
-
-#
-# Other I2C Chip support
-#
-CONFIG_SENSORS_EEPROM=m
-CONFIG_SENSORS_PCF8574=m
-CONFIG_SENSORS_PCF8591=m
-CONFIG_SENSORS_RTC8564=m
-# CONFIG_I2C_DEBUG_CORE is not set
-# CONFIG_I2C_DEBUG_ALGO is not set
-# CONFIG_I2C_DEBUG_BUS is not set
-# CONFIG_I2C_DEBUG_CHIP is not set
-
-#
-# Hardware Monitoring support
-#
-CONFIG_HWMON=m
-CONFIG_HWMON_VID=m
-CONFIG_SENSORS_ADM1026=m
-CONFIG_SENSORS_LM87=m
-CONFIG_SENSORS_SMSC47B397=m
-# CONFIG_HWMON_DEBUG_CHIP is not set
-
-#
-# Dallas's 1-wire bus
-#
-# CONFIG_W1 is not set
-
-#
-# Misc devices
-#
-# CONFIG_IBM_ASM is not set
-
-#
-# Multimedia devices
-#
-CONFIG_VIDEO_DEV=m
-
-#
-# Video For Linux
-#
-
-#
-# Video Adapters
-#
-CONFIG_VIDEO_BT848=m
-# CONFIG_VIDEO_BWQCAM is not set
-# CONFIG_VIDEO_CQCAM is not set
-# CONFIG_VIDEO_W9966 is not set
-# CONFIG_VIDEO_CPIA is not set
-# CONFIG_VIDEO_SAA5246A is not set
-# CONFIG_VIDEO_SAA5249 is not set
-# CONFIG_TUNER_3036 is not set
-# CONFIG_VIDEO_STRADIS is not set
-# CONFIG_VIDEO_ZORAN is not set
-# CONFIG_VIDEO_SAA7134 is not set
-# CONFIG_VIDEO_MXB is not set
-# CONFIG_VIDEO_DPC is not set
-# CONFIG_VIDEO_HEXIUM_ORION is not set
-# CONFIG_VIDEO_HEXIUM_GEMINI is not set
-# CONFIG_VIDEO_CX88 is not set
-CONFIG_VIDEO_OVCAMCHIP=m
-
-#
-# Radio Adapters
-#
-# CONFIG_RADIO_GEMTEK_PCI is not set
-# CONFIG_RADIO_MAXIRADIO is not set
-# CONFIG_RADIO_MAESTRO is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-CONFIG_VIDEO_TUNER=m
-CONFIG_VIDEO_BUF=m
-CONFIG_VIDEO_BTCX=m
-CONFIG_VIDEO_IR=m
-
-#
-# Graphics support
-#
-CONFIG_FB=y
-CONFIG_FB_MODE_HELPERS=y
-CONFIG_FB_CIRRUS=m
-# CONFIG_FB_PM2 is not set
-# CONFIG_FB_CYBER2000 is not set
-# CONFIG_FB_ASILIANT is not set
-# CONFIG_FB_IMSTT is not set
-CONFIG_FB_VGA16=m
-CONFIG_FB_VESA=y
-CONFIG_VIDEO_SELECT=y
-# CONFIG_FB_HGA is not set
-CONFIG_FB_RIVA=m
-# CONFIG_FB_RIVA_I2C is not set
-# CONFIG_FB_RIVA_DEBUG is not set
-# CONFIG_FB_MATROX is not set
-# CONFIG_FB_RADEON_OLD is not set
-# CONFIG_FB_RADEON is not set
-# CONFIG_FB_ATY128 is not set
-# CONFIG_FB_ATY is not set
-# CONFIG_FB_SIS is not set
-# CONFIG_FB_NEOMAGIC is not set
-CONFIG_FB_KYRO=m
-# CONFIG_FB_3DFX is not set
-# CONFIG_FB_VOODOO1 is not set
-# CONFIG_FB_TRIDENT is not set
-# CONFIG_FB_VIRTUAL is not set
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-# CONFIG_FONTS is not set
-CONFIG_FONT_8x8=y
-CONFIG_FONT_8x16=y
-
-#
-# Logo configuration
-#
-CONFIG_LOGO=y
-# CONFIG_LOGO_LINUX_MONO is not set
-# CONFIG_LOGO_LINUX_VGA16 is not set
-CONFIG_LOGO_LINUX_CLUT224=y
-
-#
-# Sound
-#
-CONFIG_SOUND=m
-
-#
-# Advanced Linux Sound Architecture
-#
-CONFIG_SND=m
-CONFIG_SND_TIMER=m
-CONFIG_SND_PCM=m
-CONFIG_SND_HWDEP=m
-CONFIG_SND_RAWMIDI=m
-CONFIG_SND_SEQUENCER=m
-CONFIG_SND_SEQ_DUMMY=m
-CONFIG_SND_OSSEMUL=y
-CONFIG_SND_MIXER_OSS=m
-CONFIG_SND_PCM_OSS=m
-CONFIG_SND_SEQUENCER_OSS=y
-CONFIG_SND_BIT32_EMUL=m
-CONFIG_SND_RTCTIMER=m
-# CONFIG_SND_VERBOSE_PRINTK is not set
-# CONFIG_SND_DEBUG is not set
-
-#
-# Generic devices
-#
-CONFIG_SND_MPU401_UART=m
-CONFIG_SND_OPL3_LIB=m
-CONFIG_SND_VX_LIB=m
-CONFIG_SND_DUMMY=m
-CONFIG_SND_VIRMIDI=m
-CONFIG_SND_MTPAV=m
-# CONFIG_SND_SERIAL_U16550 is not set
-CONFIG_SND_MPU401=m
-
-#
-# PCI devices
-#
-CONFIG_SND_AC97_CODEC=m
-CONFIG_SND_ALI5451=m
-CONFIG_SND_ATIIXP=m
-CONFIG_SND_ATIIXP_MODEM=m
-CONFIG_SND_AU8810=m
-CONFIG_SND_AU8820=m
-CONFIG_SND_AU8830=m
-CONFIG_SND_AZT3328=m
-CONFIG_SND_AZX=m
-CONFIG_SND_BT87X=m
-CONFIG_SND_CS46XX=m
-CONFIG_SND_CS46XX_NEW_DSP=y
-CONFIG_SND_CS4281=m
-CONFIG_SND_EMU10K1=m
-CONFIG_SND_KORG1212=m
-CONFIG_SND_MIXART=m
-CONFIG_SND_NM256=m
-CONFIG_SND_RME32=m
-CONFIG_SND_RME96=m
-CONFIG_SND_RME9652=m
-CONFIG_SND_HDSP=m
-CONFIG_SND_TRIDENT=m
-CONFIG_SND_YMFPCI=m
-CONFIG_SND_ALS4000=m
-CONFIG_SND_CMIPCI=m
-CONFIG_SND_ENS1370=m
-CONFIG_SND_ENS1371=m
-CONFIG_SND_ES1938=m
-CONFIG_SND_ES1968=m
-CONFIG_SND_MAESTRO3=m
-CONFIG_SND_FM801=m
-CONFIG_SND_FM801_TEA575X=m
-CONFIG_SND_ICE1712=m
-CONFIG_SND_ICE1724=m
-CONFIG_SND_INTEL8X0=m
-CONFIG_SND_INTEL8X0M=m
-CONFIG_SND_SONICVIBES=m
-CONFIG_SND_VIA82XX=m
-CONFIG_SND_VX222=m
-
-#
-# ALSA USB devices
-#
-CONFIG_SND_USB_AUDIO=m
-CONFIG_SND_USB_USX2Y=m
-
-#
-# PCMCIA devices
-#
-
-#
-# Open Sound System
-#
-# CONFIG_SOUND_PRIME is not set
-
-#
-# USB support
-#
-CONFIG_USB=y
-# CONFIG_USB_DEBUG is not set
-
-#
-# Miscellaneous USB options
-#
-CONFIG_USB_DEVICEFS=y
-# CONFIG_USB_BANDWIDTH is not set
-# CONFIG_USB_DYNAMIC_MINORS is not set
-CONFIG_USB_SUSPEND=y
-# CONFIG_USB_OTG is not set
-
-#
-# USB Host Controller Drivers
-#
-CONFIG_USB_EHCI_HCD=m
-CONFIG_USB_EHCI_SPLIT_ISO=y
-CONFIG_USB_EHCI_ROOT_HUB_TT=y
-CONFIG_USB_OHCI_HCD=m
-CONFIG_USB_UHCI_HCD=m
-
-#
-# USB Device Class drivers
-#
-# CONFIG_USB_AUDIO is not set
-
-#
-# USB Bluetooth TTY can only be used with disabled Bluetooth subsystem
-#
-CONFIG_USB_MIDI=m
-CONFIG_USB_ACM=m
-CONFIG_USB_PRINTER=m
-CONFIG_USB_STORAGE=m
-# CONFIG_USB_STORAGE_DEBUG is not set
-CONFIG_USB_STORAGE_RW_DETECT=y
-CONFIG_USB_STORAGE_DATAFAB=y
-CONFIG_USB_STORAGE_FREECOM=y
-CONFIG_USB_STORAGE_ISD200=y
-CONFIG_USB_STORAGE_DPCM=y
-CONFIG_USB_STORAGE_HP8200e=y
-CONFIG_USB_STORAGE_SDDR09=y
-CONFIG_USB_STORAGE_SDDR55=y
-CONFIG_USB_STORAGE_JUMPSHOT=y
-
-#
-# USB Human Interface Devices (HID)
-#
-CONFIG_USB_HID=y
-CONFIG_USB_HIDINPUT=y
-CONFIG_HID_FF=y
-CONFIG_HID_PID=y
-CONFIG_LOGITECH_FF=y
-CONFIG_THRUSTMASTER_FF=y
-CONFIG_USB_HIDDEV=y
-CONFIG_USB_AIPTEK=m
-CONFIG_USB_WACOM=m
-CONFIG_USB_KBTAB=m
-CONFIG_USB_POWERMATE=m
-CONFIG_USB_MTOUCH=m
-CONFIG_USB_EGALAX=m
-CONFIG_USB_XPAD=m
-CONFIG_USB_ATI_REMOTE=m
-
-#
-# USB Imaging devices
-#
-CONFIG_USB_MDC800=m
-CONFIG_USB_MICROTEK=m
-CONFIG_USB_HPUSBSCSI=m
-
-#
-# USB Multimedia devices
-#
-CONFIG_USB_DABUSB=m
-CONFIG_USB_VICAM=m
-CONFIG_USB_DSBR=m
-CONFIG_USB_IBMCAM=m
-CONFIG_USB_KONICAWC=m
-CONFIG_USB_OV511=m
-CONFIG_USB_SE401=m
-CONFIG_USB_SN9C102=m
-CONFIG_USB_STV680=m
-CONFIG_USB_W9968CF=m
-CONFIG_USB_PWC=m
-
-#
-# USB Network adaptors
-#
-CONFIG_USB_CATC=m
-CONFIG_USB_KAWETH=m
-CONFIG_USB_PEGASUS=m
-CONFIG_USB_RTL8150=m
-CONFIG_USB_USBNET=m
-
-#
-# USB Host-to-Host Cables
-#
-CONFIG_USB_ALI_M5632=y
-CONFIG_USB_AN2720=y
-CONFIG_USB_BELKIN=y
-CONFIG_USB_GENESYS=y
-CONFIG_USB_NET1080=y
-CONFIG_USB_PL2301=y
-
-#
-# Intelligent USB Devices/Gadgets
-#
-CONFIG_USB_ARMLINUX=y
-CONFIG_USB_EPSON2888=y
-CONFIG_USB_ZAURUS=y
-CONFIG_USB_CDCETHER=y
-
-#
-# USB Network Adapters
-#
-CONFIG_USB_AX8817X=y
-
-#
-# USB port drivers
-#
-CONFIG_USB_USS720=m
-
-#
-# USB Serial Converter support
-#
-CONFIG_USB_SERIAL=m
-CONFIG_USB_SERIAL_GENERIC=y
-CONFIG_USB_SERIAL_BELKIN=m
-CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
-CONFIG_USB_SERIAL_EMPEG=m
-CONFIG_USB_SERIAL_FTDI_SIO=m
-CONFIG_USB_SERIAL_VISOR=m
-CONFIG_USB_SERIAL_IPAQ=m
-CONFIG_USB_SERIAL_IR=m
-CONFIG_USB_SERIAL_EDGEPORT=m
-CONFIG_USB_SERIAL_EDGEPORT_TI=m
-CONFIG_USB_SERIAL_KEYSPAN_PDA=m
-CONFIG_USB_SERIAL_KEYSPAN=m
-CONFIG_USB_SERIAL_KEYSPAN_MPR=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
-CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19=y
-CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
-CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
-CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
-CONFIG_USB_SERIAL_KLSI=m
-CONFIG_USB_SERIAL_KOBIL_SCT=m
-CONFIG_USB_SERIAL_MCT_U232=m
-CONFIG_USB_SERIAL_PL2303=m
-CONFIG_USB_SERIAL_SAFE=m
-CONFIG_USB_SERIAL_SAFE_PADDED=y
-CONFIG_USB_SERIAL_CYBERJACK=m
-CONFIG_USB_SERIAL_XIRCOM=m
-CONFIG_USB_SERIAL_OMNINET=m
-CONFIG_USB_EZUSB=y
-
-#
-# USB Miscellaneous drivers
-#
-CONFIG_USB_EMI62=m
-# CONFIG_USB_EMI26 is not set
-# CONFIG_USB_TIGL is not set
-CONFIG_USB_AUERSWALD=m
-CONFIG_USB_RIO500=m
-CONFIG_USB_LEGOTOWER=m
-CONFIG_USB_LCD=m
-CONFIG_USB_LED=m
-# CONFIG_USB_CYTHERM is not set
-CONFIG_USB_PHIDGETSERVO=m
-CONFIG_USB_TEST=m
-
-#
-# USB ATM/DSL drivers
-#
-CONFIG_USB_ATM=m
-CONFIG_USB_SPEEDTOUCH=m
-
-#
-# USB Gadget Support
-#
-# CONFIG_USB_GADGET is not set
-
-#
-# InfiniBand support
-#
-CONFIG_INFINIBAND=m
-CONFIG_INFINIBAND_USER_MAD=m
-CONFIG_INFINIBAND_USER_ACCESS=m
-CONFIG_INFINIBAND_ADDR_TRANS=y
-CONFIG_INFINIBAND_MTHCA=m
-CONFIG_INFINIBAND_MTHCA_DEBUG=y
-CONFIG_INFINIBAND_IPATH=m
-CONFIG_INFINIBAND_AMSO1100=m
-# CONFIG_INFINIBAND_AMSO1100_DEBUG is not set
-CONFIG_INFINIBAND_CXGB3=m
-# CONFIG_INFINIBAND_CXGB3_DEBUG is not set
-CONFIG_INFINIBAND_IPOIB=m
-CONFIG_INFINIBAND_IPOIB_CM=y
-CONFIG_INFINIBAND_IPOIB_DEBUG=y
-# CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set
-CONFIG_INFINIBAND_SRP=m
-CONFIG_INFINIBAND_SDP=m
-# CONFIG_INFINIBAND_SDP_DEBUG is not set
-CONFIG_INFINIBAND_VNIC=m
-# CONFIG_INFINIBAND_VNIC_DEBUG is not set
-CONFIG_INFINIBAND_VNIC_STATS=y
-CONFIG_INFINIBAND_MADEYE=m
-
-#
-# EDAC - error detection and reporting (RAS)
-#
-CONFIG_EDAC=m
-
-#
-# Reporting subsystems
-#
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_MM_EDAC=m
-CONFIG_EDAC_AMD76X=m
-CONFIG_EDAC_E7XXX=m
-CONFIG_EDAC_E752X=m
-CONFIG_EDAC_I82875P=m
-CONFIG_EDAC_I82860=m
-CONFIG_EDAC_K8=m
-CONFIG_EDAC_R82600=m
-CONFIG_EDAC_POLL=y
-
-#
-# Firmware Drivers
-#
-CONFIG_EDD=m
-CONFIG_DELL_RBU=m
-CONFIG_DCDBAS=m
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=m
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=m
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-# CONFIG_QFMT_V1 is not set
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=y
-CONFIG_JOLIET=y
-CONFIG_ZISOFS=y
-CONFIG_ZISOFS_FS=y
-CONFIG_UDF_FS=m
-CONFIG_UDF_NLS=y
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-CONFIG_FAT_DEFAULT_CODEPAGE=437
-CONFIG_FAT_DEFAULT_IOCHARSET="ascii"
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-CONFIG_TMPFS_XATTR=y
-CONFIG_TMPFS_SECURITY=y
-CONFIG_HUGETLBFS=y
-CONFIG_HUGETLB_PAGE=y
-CONFIG_RAMFS=y
-CONFIG_RELAYFS_FS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-CONFIG_HFS_FS=m
-CONFIG_HFSPLUS_FS=m
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_JFFS_FS is not set
-CONFIG_JFFS2_FS=m
-CONFIG_JFFS2_FS_DEBUG=0
-CONFIG_JFFS2_FS_NAND=y
-# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
-CONFIG_JFFS2_ZLIB=y
-CONFIG_JFFS2_RTIME=y
-# CONFIG_JFFS2_RUBIN is not set
-CONFIG_CRAMFS=m
-CONFIG_VXFS_FS=m
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V3_ACL=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=m
-# CONFIG_NFSD_V2_ACL is not set
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V3_ACL=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=m
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=m
-CONFIG_NFS_ACL_SUPPORT=m
-CONFIG_NFS_COMMON=y
-CONFIG_SUNRPC=m
-CONFIG_SUNRPC_GSS=m
-CONFIG_RPCSEC_GSS_KRB5=m
-CONFIG_RPCSEC_GSS_SPKM3=m
-CONFIG_SMB_FS=m
-# CONFIG_SMB_NLS_DEFAULT is not set
-CONFIG_CIFS=m
-# CONFIG_CIFS_STATS is not set
-CONFIG_CIFS_XATTR=y
-CONFIG_CIFS_POSIX=y
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf8"
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_737=m
-CONFIG_NLS_CODEPAGE_775=m
-CONFIG_NLS_CODEPAGE_850=m
-CONFIG_NLS_CODEPAGE_852=m
-CONFIG_NLS_CODEPAGE_855=m
-CONFIG_NLS_CODEPAGE_857=m
-CONFIG_NLS_CODEPAGE_860=m
-CONFIG_NLS_CODEPAGE_861=m
-CONFIG_NLS_CODEPAGE_862=m
-CONFIG_NLS_CODEPAGE_863=m
-CONFIG_NLS_CODEPAGE_864=m
-CONFIG_NLS_CODEPAGE_865=m
-CONFIG_NLS_CODEPAGE_866=m
-CONFIG_NLS_CODEPAGE_869=m
-CONFIG_NLS_CODEPAGE_936=m
-CONFIG_NLS_CODEPAGE_950=m
-CONFIG_NLS_CODEPAGE_932=m
-CONFIG_NLS_CODEPAGE_949=m
-CONFIG_NLS_CODEPAGE_874=m
-CONFIG_NLS_ISO8859_8=m
-CONFIG_NLS_CODEPAGE_1250=m
-CONFIG_NLS_CODEPAGE_1251=m
-CONFIG_NLS_ASCII=y
-CONFIG_NLS_ISO8859_1=m
-CONFIG_NLS_ISO8859_2=m
-CONFIG_NLS_ISO8859_3=m
-CONFIG_NLS_ISO8859_4=m
-CONFIG_NLS_ISO8859_5=m
-CONFIG_NLS_ISO8859_6=m
-CONFIG_NLS_ISO8859_7=m
-CONFIG_NLS_ISO8859_9=m
-CONFIG_NLS_ISO8859_13=m
-CONFIG_NLS_ISO8859_14=m
-CONFIG_NLS_ISO8859_15=m
-CONFIG_NLS_KOI8_R=m
-CONFIG_NLS_KOI8_U=m
-CONFIG_NLS_UTF8=m
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=m
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-# CONFIG_DEBUG_INFO is not set
-CONFIG_INIT_DEBUG=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_IOMMU_DEBUG is not set
-CONFIG_KPROBES=y
-
-#
-# Security options
-#
-CONFIG_KEYS=y
-CONFIG_KEYS_DEBUG_PROC_KEYS=y
-CONFIG_SECURITY=y
-CONFIG_SECURITY_NETWORK=y
-CONFIG_SECURITY_CAPABILITIES=y
-# CONFIG_SECURITY_ROOTPLUG is not set
-CONFIG_SECURITY_SELINUX=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM=y
-CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1
-CONFIG_SECURITY_SELINUX_DISABLE=y
-CONFIG_SECURITY_SELINUX_DEVELOP=y
-CONFIG_SECURITY_SELINUX_AVC_STATS=y
-# CONFIG_SECURITY_SELINUX_MLS is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=m
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=m
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-CONFIG_CRYPTO_AES=m
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-CONFIG_CRYPTO_SIGNATURE=y
-CONFIG_CRYPTO_SIGNATURE_DSA=y
-CONFIG_CRYPTO_MPILIB=y
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=m
-CONFIG_HAS_IOMEM=y
diff --git a/lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config b/lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config
deleted file mode 100644
index 000cdc2c9eb65b4d595072de41bd2f5f0796a749..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/kgdb_2.6.0_test1_vmware.config
+++ /dev/null
@@ -1,914 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_X86=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_GENERIC_ISA_DMA=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-# CONFIG_BSD_PROCESS_ACCT is not set
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=15
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-# CONFIG_MODVERSIONS is not set
-CONFIG_KMOD=y
-
-#
-# Processor type and features
-#
-CONFIG_X86_PC=y
-# CONFIG_X86_VOYAGER is not set
-# CONFIG_X86_NUMAQ is not set
-# CONFIG_X86_SUMMIT is not set
-# CONFIG_X86_BIGSMP is not set
-# CONFIG_X86_VISWS is not set
-# CONFIG_X86_GENERICARCH is not set
-# CONFIG_X86_ES7000 is not set
-# CONFIG_M386 is not set
-# CONFIG_M486 is not set
-# CONFIG_M586 is not set
-# CONFIG_M586TSC is not set
-# CONFIG_M586MMX is not set
-# CONFIG_M686 is not set
-# CONFIG_MPENTIUMII is not set
-CONFIG_MPENTIUMIII=y
-# CONFIG_MPENTIUM4 is not set
-# CONFIG_MK6 is not set
-# CONFIG_MK7 is not set
-# CONFIG_MK8 is not set
-# CONFIG_MELAN is not set
-# CONFIG_MCRUSOE is not set
-# CONFIG_MWINCHIPC6 is not set
-# CONFIG_MWINCHIP2 is not set
-# CONFIG_MWINCHIP3D is not set
-# CONFIG_MCYRIXIII is not set
-# CONFIG_MVIAC3_2 is not set
-# CONFIG_X86_GENERIC is not set
-CONFIG_X86_CMPXCHG=y
-CONFIG_X86_XADD=y
-CONFIG_X86_L1_CACHE_SHIFT=5
-CONFIG_RWSEM_XCHGADD_ALGORITHM=y
-CONFIG_X86_WP_WORKS_OK=y
-CONFIG_X86_INVLPG=y
-CONFIG_X86_BSWAP=y
-CONFIG_X86_POPAD_OK=y
-CONFIG_X86_GOOD_APIC=y
-CONFIG_X86_INTEL_USERCOPY=y
-CONFIG_X86_USE_PPRO_CHECKSUM=y
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_SMP=y
-CONFIG_NR_CPUS=16
-# CONFIG_PREEMPT is not set
-CONFIG_X86_LOCAL_APIC=y
-CONFIG_X86_IO_APIC=y
-CONFIG_X86_TSC=y
-CONFIG_X86_MCE=y
-# CONFIG_X86_MCE_NONFATAL is not set
-CONFIG_X86_MCE_P4THERMAL=y
-# CONFIG_TOSHIBA is not set
-# CONFIG_I8K is not set
-# CONFIG_MICROCODE is not set
-# CONFIG_X86_MSR is not set
-# CONFIG_X86_CPUID is not set
-CONFIG_EDD=y
-CONFIG_NOHIGHMEM=y
-# CONFIG_HIGHMEM4G is not set
-# CONFIG_HIGHMEM64G is not set
-# CONFIG_MATH_EMULATION is not set
-CONFIG_MTRR=y
-CONFIG_HAVE_DEC_LOCK=y
-
-#
-# Power management options (ACPI, APM)
-#
-# CONFIG_PM is not set
-
-#
-# ACPI Support
-#
-# CONFIG_ACPI is not set
-
-#
-# CPU Frequency scaling
-#
-# CONFIG_CPU_FREQ is not set
-
-#
-# Bus options (PCI, PCMCIA, EISA, MCA, ISA)
-#
-CONFIG_PCI=y
-# CONFIG_PCI_GOBIOS is not set
-# CONFIG_PCI_GODIRECT is not set
-CONFIG_PCI_GOANY=y
-CONFIG_PCI_BIOS=y
-CONFIG_PCI_DIRECT=y
-# CONFIG_PCI_LEGACY_PROC is not set
-CONFIG_PCI_NAMES=y
-CONFIG_ISA=y
-# CONFIG_EISA is not set
-# CONFIG_MCA is not set
-# CONFIG_SCx200 is not set
-CONFIG_HOTPLUG=y
-
-#
-# PCMCIA/CardBus support
-#
-CONFIG_PCMCIA=y
-# CONFIG_YENTA is not set
-# CONFIG_I82092 is not set
-# CONFIG_I82365 is not set
-# CONFIG_TCIC is not set
-CONFIG_PCMCIA_PROBE=y
-
-#
-# PCI Hotplug Support
-#
-# CONFIG_HOTPLUG_PCI is not set
-
-#
-# Executable file formats
-#
-CONFIG_KCORE_ELF=y
-# CONFIG_KCORE_AOUT is not set
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_AOUT=y
-CONFIG_BINFMT_MISC=y
-
-#
-# Generic Driver Options
-#
-# CONFIG_FW_LOADER is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Parallel port support
-#
-# CONFIG_PARPORT is not set
-
-#
-# Plug and Play support
-#
-CONFIG_PNP=y
-CONFIG_PNP_NAMES=y
-# CONFIG_PNP_DEBUG is not set
-
-#
-# Protocols
-#
-# CONFIG_ISAPNP is not set
-# CONFIG_PNPBIOS is not set
-
-#
-# Block devices
-#
-# CONFIG_BLK_DEV_FD is not set
-# CONFIG_BLK_DEV_XD is not set
-# CONFIG_BLK_CPQ_DA is not set
-# CONFIG_BLK_CPQ_CISS_DA is not set
-# CONFIG_BLK_DEV_DAC960 is not set
-# CONFIG_BLK_DEV_UMEM is not set
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_CRYPTOLOOP is not set
-# CONFIG_BLK_DEV_NBD is not set
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_LBD=y
-
-#
-# ATA/ATAPI/MFM/RLL support
-#
-CONFIG_IDE=y
-
-#
-# IDE, ATA and ATAPI Block devices
-#
-CONFIG_BLK_DEV_IDE=y
-
-#
-# Please see Documentation/ide.txt for help/info on IDE drives
-#
-# CONFIG_BLK_DEV_HD_IDE is not set
-# CONFIG_BLK_DEV_HD is not set
-CONFIG_BLK_DEV_IDEDISK=y
-CONFIG_IDEDISK_MULTI_MODE=y
-# CONFIG_IDEDISK_STROKE is not set
-# CONFIG_BLK_DEV_IDECS is not set
-CONFIG_BLK_DEV_IDECD=y
-# CONFIG_BLK_DEV_IDEFLOPPY is not set
-# CONFIG_BLK_DEV_IDESCSI is not set
-# CONFIG_IDE_TASK_IOCTL is not set
-CONFIG_IDE_TASKFILE_IO=y
-
-#
-# IDE chipset support/bugfixes
-#
-CONFIG_BLK_DEV_CMD640=y
-# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
-# CONFIG_BLK_DEV_IDEPNP is not set
-CONFIG_BLK_DEV_IDEPCI=y
-CONFIG_BLK_DEV_GENERIC=y
-CONFIG_IDEPCI_SHARE_IRQ=y
-CONFIG_BLK_DEV_IDEDMA_PCI=y
-# CONFIG_BLK_DEV_IDE_TCQ is not set
-# CONFIG_BLK_DEV_OFFBOARD is not set
-# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
-# CONFIG_IDEDMA_ONLYDISK is not set
-CONFIG_BLK_DEV_IDEDMA=y
-# CONFIG_IDEDMA_PCI_WIP is not set
-CONFIG_BLK_DEV_ADMA=y
-# CONFIG_BLK_DEV_AEC62XX is not set
-# CONFIG_BLK_DEV_ALI15X3 is not set
-# CONFIG_BLK_DEV_AMD74XX is not set
-# CONFIG_BLK_DEV_CMD64X is not set
-# CONFIG_BLK_DEV_TRIFLEX is not set
-# CONFIG_BLK_DEV_CY82C693 is not set
-# CONFIG_BLK_DEV_CS5520 is not set
-# CONFIG_BLK_DEV_HPT34X is not set
-# CONFIG_BLK_DEV_HPT366 is not set
-# CONFIG_BLK_DEV_SC1200 is not set
-CONFIG_BLK_DEV_PIIX=y
-# CONFIG_BLK_DEV_NS87415 is not set
-# CONFIG_BLK_DEV_OPTI621 is not set
-# CONFIG_BLK_DEV_PDC202XX_OLD is not set
-# CONFIG_BLK_DEV_PDC202XX_NEW is not set
-CONFIG_BLK_DEV_RZ1000=y
-# CONFIG_BLK_DEV_SVWKS is not set
-# CONFIG_BLK_DEV_SIIMAGE is not set
-# CONFIG_BLK_DEV_SIS5513 is not set
-# CONFIG_BLK_DEV_SLC90E66 is not set
-# CONFIG_BLK_DEV_TRM290 is not set
-# CONFIG_BLK_DEV_VIA82CXXX is not set
-# CONFIG_IDE_CHIPSETS is not set
-CONFIG_IDEDMA_AUTO=y
-# CONFIG_IDEDMA_IVB is not set
-CONFIG_BLK_DEV_IDE_MODES=y
-
-#
-# SCSI device support
-#
-CONFIG_SCSI=y
-
-#
-# SCSI support type (disk, tape, CD-ROM)
-#
-CONFIG_BLK_DEV_SD=y
-# CONFIG_CHR_DEV_ST is not set
-# CONFIG_CHR_DEV_OSST is not set
-CONFIG_BLK_DEV_SR=y
-CONFIG_BLK_DEV_SR_VENDOR=y
-CONFIG_CHR_DEV_SG=y
-
-#
-# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
-#
-CONFIG_SCSI_MULTI_LUN=y
-CONFIG_SCSI_REPORT_LUNS=y
-CONFIG_SCSI_CONSTANTS=y
-# CONFIG_SCSI_LOGGING is not set
-
-#
-# SCSI low-level drivers
-#
-# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
-# CONFIG_SCSI_7000FASST is not set
-# CONFIG_SCSI_ACARD is not set
-# CONFIG_SCSI_AHA152X is not set
-# CONFIG_SCSI_AHA1542 is not set
-# CONFIG_SCSI_AACRAID is not set
-# CONFIG_SCSI_AIC7XXX is not set
-# CONFIG_SCSI_AIC7XXX_OLD is not set
-# CONFIG_SCSI_AIC79XX is not set
-# CONFIG_SCSI_DPT_I2O is not set
-# CONFIG_SCSI_ADVANSYS is not set
-# CONFIG_SCSI_IN2000 is not set
-# CONFIG_SCSI_AM53C974 is not set
-# CONFIG_SCSI_MEGARAID is not set
-# CONFIG_SCSI_BUSLOGIC is not set
-# CONFIG_SCSI_CPQFCTS is not set
-# CONFIG_SCSI_DMX3191D is not set
-# CONFIG_SCSI_DTC3280 is not set
-# CONFIG_SCSI_EATA is not set
-# CONFIG_SCSI_EATA_PIO is not set
-# CONFIG_SCSI_FUTURE_DOMAIN is not set
-# CONFIG_SCSI_GDTH is not set
-# CONFIG_SCSI_GENERIC_NCR5380 is not set
-# CONFIG_SCSI_GENERIC_NCR5380_MMIO is not set
-# CONFIG_SCSI_IPS is not set
-# CONFIG_SCSI_INITIO is not set
-# CONFIG_SCSI_INIA100 is not set
-# CONFIG_SCSI_NCR53C406A is not set
-CONFIG_SCSI_SYM53C8XX_2=y
-CONFIG_SCSI_SYM53C8XX_DMA_ADDRESSING_MODE=1
-CONFIG_SCSI_SYM53C8XX_DEFAULT_TAGS=16
-CONFIG_SCSI_SYM53C8XX_MAX_TAGS=64
-# CONFIG_SCSI_SYM53C8XX_IOMAPPED is not set
-# CONFIG_SCSI_PAS16 is not set
-# CONFIG_SCSI_PCI2000 is not set
-# CONFIG_SCSI_PCI2220I is not set
-# CONFIG_SCSI_PSI240I is not set
-# CONFIG_SCSI_QLOGIC_FAS is not set
-# CONFIG_SCSI_QLOGIC_ISP is not set
-# CONFIG_SCSI_QLOGIC_FC is not set
-# CONFIG_SCSI_QLOGIC_1280 is not set
-# CONFIG_SCSI_QLA2XXX is not set
-# CONFIG_SCSI_SEAGATE is not set
-# CONFIG_SCSI_SYM53C416 is not set
-# CONFIG_SCSI_DC395x is not set
-# CONFIG_SCSI_DC390T is not set
-# CONFIG_SCSI_T128 is not set
-# CONFIG_SCSI_U14_34F is not set
-# CONFIG_SCSI_ULTRASTOR is not set
-# CONFIG_SCSI_NSP32 is not set
-# CONFIG_SCSI_DEBUG is not set
-# CONFIG_SCSI_FERAL_ISP is not set
-
-#
-# PCMCIA SCSI adapter support
-#
-# CONFIG_PCMCIA_AHA152X is not set
-# CONFIG_PCMCIA_FDOMAIN is not set
-# CONFIG_PCMCIA_NINJA_SCSI is not set
-# CONFIG_PCMCIA_QLOGIC is not set
-
-#
-# Old CD-ROM drivers (not SCSI, not IDE)
-#
-# CONFIG_CD_NO_IDESCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Fusion MPT device support
-#
-# CONFIG_FUSION is not set
-
-#
-# IEEE 1394 (FireWire) support (EXPERIMENTAL)
-#
-# CONFIG_IEEE1394 is not set
-
-#
-# I2O device support
-#
-# CONFIG_I2O is not set
-
-#
-# Networking support
-#
-CONFIG_NET=y
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
-# CONFIG_NETFILTER is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
-# CONFIG_ARPD is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_IPV6 is not set
-# CONFIG_XFRM_USER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IPV6_SCTP__=y
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_NETDEVICES=y
-
-#
-# ARCnet devices
-#
-# CONFIG_ARCNET is not set
-CONFIG_DUMMY=m
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
-# CONFIG_ETHERTAP is not set
-# CONFIG_NET_SB1000 is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-# CONFIG_MII is not set
-# CONFIG_HAPPYMEAL is not set
-# CONFIG_SUNGEM is not set
-# CONFIG_NET_VENDOR_3COM is not set
-# CONFIG_LANCE is not set
-# CONFIG_NET_VENDOR_SMC is not set
-# CONFIG_NET_VENDOR_RACAL is not set
-
-#
-# Tulip family network device support
-#
-# CONFIG_NET_TULIP is not set
-# CONFIG_AT1700 is not set
-# CONFIG_DEPCA is not set
-# CONFIG_HP100 is not set
-# CONFIG_NET_ISA is not set
-CONFIG_NET_PCI=y
-CONFIG_PCNET32=y
-# CONFIG_AMD8111_ETH is not set
-# CONFIG_ADAPTEC_STARFIRE is not set
-# CONFIG_AC3200 is not set
-# CONFIG_APRICOT is not set
-# CONFIG_B44 is not set
-# CONFIG_CS89x0 is not set
-# CONFIG_DGRS is not set
-CONFIG_EEPRO100=y
-# CONFIG_EEPRO100_PIO is not set
-# CONFIG_E100 is not set
-# CONFIG_FEALNX is not set
-# CONFIG_NATSEMI is not set
-# CONFIG_NE2K_PCI is not set
-# CONFIG_8139CP is not set
-# CONFIG_8139TOO is not set
-# CONFIG_SIS900 is not set
-# CONFIG_EPIC100 is not set
-# CONFIG_SUNDANCE is not set
-# CONFIG_TLAN is not set
-# CONFIG_VIA_RHINE is not set
-# CONFIG_NET_POCKET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-# CONFIG_ACENIC is not set
-# CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
-# CONFIG_NS83820 is not set
-# CONFIG_HAMACHI is not set
-# CONFIG_YELLOWFIN is not set
-# CONFIG_R8169 is not set
-# CONFIG_SK98LIN is not set
-# CONFIG_TIGON3 is not set
-
-#
-# Ethernet (10000 Mbit)
-#
-# CONFIG_IXGB is not set
-# CONFIG_FDDI is not set
-# CONFIG_HIPPI is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices (depends on LLC=y)
-#
-# CONFIG_NET_FC is not set
-# CONFIG_RCPCI is not set
-# CONFIG_SHAPER is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# PCMCIA network device support
-#
-CONFIG_NET_PCMCIA=y
-# CONFIG_PCMCIA_3C589 is not set
-# CONFIG_PCMCIA_3C574 is not set
-# CONFIG_PCMCIA_FMVJ18X is not set
-CONFIG_PCMCIA_PCNET=y
-# CONFIG_PCMCIA_NMCLAN is not set
-# CONFIG_PCMCIA_SMC91C92 is not set
-# CONFIG_PCMCIA_XIRC2PS is not set
-# CONFIG_PCMCIA_AXNET is not set
-
-#
-# Amateur Radio support
-#
-# CONFIG_HAMRADIO is not set
-
-#
-# IrDA (infrared) support
-#
-# CONFIG_IRDA is not set
-
-#
-# ISDN subsystem
-#
-# CONFIG_ISDN_BOOL is not set
-
-#
-# Telephony Support
-#
-# CONFIG_PHONE is not set
-
-#
-# Input device support
-#
-CONFIG_INPUT=y
-
-#
-# Userland interfaces
-#
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-# CONFIG_INPUT_JOYDEV is not set
-# CONFIG_INPUT_TSDEV is not set
-# CONFIG_INPUT_EVDEV is not set
-# CONFIG_INPUT_EVBUG is not set
-
-#
-# Input I/O drivers
-#
-# CONFIG_GAMEPORT is not set
-CONFIG_SOUND_GAMEPORT=y
-# CONFIG_SERIO is not set
-
-#
-# Input Device Drivers
-#
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_INPUT_MOUSE=y
-# CONFIG_MOUSE_INPORT is not set
-# CONFIG_MOUSE_LOGIBM is not set
-# CONFIG_MOUSE_PC110PAD is not set
-# CONFIG_INPUT_JOYSTICK is not set
-# CONFIG_INPUT_TOUCHSCREEN is not set
-# CONFIG_INPUT_MISC is not set
-
-#
-# Character devices
-#
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-CONFIG_HW_CONSOLE=y
-# CONFIG_SERIAL_NONSTANDARD is not set
-
-#
-# Serial drivers
-#
-# CONFIG_SERIAL_8250 is not set
-
-#
-# Non-8250 serial port support
-#
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
-
-#
-# I2C support
-#
-# CONFIG_I2C is not set
-
-#
-# I2C Hardware Sensors Mainboard support
-#
-
-#
-# I2C Hardware Sensors Chip support
-#
-# CONFIG_I2C_SENSOR is not set
-
-#
-# Mice
-#
-# CONFIG_BUSMOUSE is not set
-# CONFIG_QIC02_TAPE is not set
-
-#
-# IPMI
-#
-# CONFIG_IPMI_HANDLER is not set
-
-#
-# Watchdog Cards
-#
-# CONFIG_WATCHDOG is not set
-# CONFIG_HW_RANDOM is not set
-# CONFIG_NVRAM is not set
-# CONFIG_RTC is not set
-# CONFIG_GEN_RTC is not set
-# CONFIG_DTLK is not set
-# CONFIG_R3964 is not set
-# CONFIG_APPLICOM is not set
-# CONFIG_SONYPI is not set
-
-#
-# Ftape, the floppy tape device driver
-#
-# CONFIG_FTAPE is not set
-CONFIG_AGP=y
-# CONFIG_AGP_ALI is not set
-# CONFIG_AGP_AMD is not set
-# CONFIG_AGP_AMD_8151 is not set
-# CONFIG_AGP_INTEL is not set
-# CONFIG_AGP_NVIDIA is not set
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_SWORKS is not set
-# CONFIG_AGP_VIA is not set
-# CONFIG_DRM is not set
-
-#
-# PCMCIA character devices
-#
-# CONFIG_SYNCLINK_CS is not set
-# CONFIG_MWAVE is not set
-# CONFIG_RAW_DRIVER is not set
-# CONFIG_HANGCHECK_TIMER is not set
-
-#
-# Multimedia devices
-#
-# CONFIG_VIDEO_DEV is not set
-
-#
-# Digital Video Broadcasting Devices
-#
-# CONFIG_DVB is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-# CONFIG_EXT3_FS_POSIX_ACL is not set
-# CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-CONFIG_ISO9660_FS=m
-CONFIG_JOLIET=y
-# CONFIG_ZISOFS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=m
-CONFIG_MSDOS_FS=m
-CONFIG_VFAT_FS=m
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS=y
-# CONFIG_DEVPTS_FS_XATTR is not set
-CONFIG_TMPFS=y
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-# CONFIG_NFS_V3 is not set
-# CONFIG_NFS_V4 is not set
-CONFIG_NFS_DIRECTIO=y
-# CONFIG_NFSD is not set
-CONFIG_LOCKD=y
-# CONFIG_EXPORTFS is not set
-CONFIG_SUNRPC=y
-# CONFIG_SUNRPC_GSS is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-CONFIG_LUSTRE_FS=y
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-CONFIG_NLS=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS_DEFAULT="iso8859-1"
-CONFIG_NLS_CODEPAGE_437=y
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Graphics support
-#
-# CONFIG_FB is not set
-CONFIG_VIDEO_SELECT=y
-
-#
-# Console display driver support
-#
-CONFIG_VGA_CONSOLE=y
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_DUMMY_CONSOLE=y
-
-#
-# Sound
-#
-# CONFIG_SOUND is not set
-
-#
-# USB support
-#
-# CONFIG_USB is not set
-# CONFIG_USB_GADGET is not set
-
-#
-# Bluetooth support
-#
-# CONFIG_BT is not set
-
-#
-# Profiling support
-#
-CONFIG_PROFILING=y
-CONFIG_OPROFILE=y
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_DEBUG_STACKOVERFLOW is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_IOVIRT is not set
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_DEBUG_SPINLOCK=y
-# CONFIG_DEBUG_PAGEALLOC is not set
-# CONFIG_SPINLINE is not set
-# CONFIG_LOCKMETER is not set
-CONFIG_DEBUG_SPINLOCK_SLEEP=y
-CONFIG_KGDB=y
-# CONFIG_KGDB_9600BAUD is not set
-# CONFIG_KGDB_19200BAUD is not set
-# CONFIG_KGDB_38400BAUD is not set
-# CONFIG_KGDB_57600BAUD is not set
-CONFIG_KGDB_115200BAUD=y
-CONFIG_KGDB_PORT=0x3f8
-CONFIG_KGDB_IRQ=4
-CONFIG_DEBUG_INFO=y
-# CONFIG_KGDB_MORE is not set
-CONFIG_NO_KGDB_CPUS=16
-# CONFIG_KGDB_TS is not set
-# CONFIG_STACK_OVERFLOW_TEST is not set
-CONFIG_KGDB_CONSOLE=y
-CONFIG_KGDB_SYSRQ=y
-CONFIG_FRAME_POINTER=y
-CONFIG_X86_EXTRA_IRQS=y
-CONFIG_X86_FIND_SMP_CONFIG=y
-CONFIG_X86_MPPARSE=y
-
-#
-# Security options
-#
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-# CONFIG_CRYPTO is not set
-
-#
-# Library routines
-#
-# CONFIG_CRC32 is not set
-CONFIG_X86_SMP=y
-CONFIG_X86_HT=y
-CONFIG_X86_BIOS_REBOOT=y
-CONFIG_X86_TRAMPOLINE=y
diff --git a/lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config b/lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config
deleted file mode 100644
index 0ec6b4a9d2996d2b5a0d5f6f39e293943708b3de..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/uml-2.6.10-fc3.config
+++ /dev/null
@@ -1,662 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-ac12
-# Tue Jun 14 08:15:05 2005
-#
-CONFIG_GENERIC_HARDIRQS=y
-CONFIG_USERMODE=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-
-#
-# UML-specific options
-#
-CONFIG_MODE_TT=y
-CONFIG_MODE_SKAS=y
-CONFIG_NET=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_HOSTFS=y
-CONFIG_MCONSOLE=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_HOST_2G_2G is not set
-# CONFIG_SMP is not set
-CONFIG_NEST_LEVEL=0
-CONFIG_KERNEL_HALF_GIGS=1
-CONFIG_KERNEL_STACK_ORDER=4
-CONFIG_UML_REAL_TIME_CLOCK=y
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_LOCALVERSION=""
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-# CONFIG_BSD_PROCESS_ACCT_V3 is not set
-CONFIG_SYSCTL=y
-CONFIG_AUDIT=y
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_HOTPLUG is not set
-CONFIG_KOBJECT_UEVENT=y
-# CONFIG_IKCONFIG is not set
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
-CONFIG_KALLSYMS_EXTRA_PASS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-CONFIG_SHMEM=y
-CONFIG_CC_ALIGN_FUNCTIONS=0
-CONFIG_CC_ALIGN_LABELS=0
-CONFIG_CC_ALIGN_LOOPS=0
-CONFIG_CC_ALIGN_JUMPS=0
-# CONFIG_TINY_SHMEM is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-# CONFIG_MODULE_FORCE_UNLOAD is not set
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-# CONFIG_MODULE_SRCVERSION_ALL is not set
-# CONFIG_MODULE_SIG is not set
-CONFIG_KMOD=y
-
-#
-# Generic Driver Options
-#
-CONFIG_STANDALONE=y
-CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_DEBUG_DRIVER is not set
-
-#
-# Character Devices
-#
-CONFIG_STDIO_CONSOLE=y
-CONFIG_SSL=y
-CONFIG_FD_CHAN=y
-CONFIG_NULL_CHAN=y
-CONFIG_PORT_CHAN=y
-CONFIG_PTY_CHAN=y
-CONFIG_TTY_CHAN=y
-CONFIG_XTERM_CHAN=y
-# CONFIG_NOCONFIG_CHAN is not set
-CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
-CONFIG_CON_CHAN="xterm"
-CONFIG_SSL_CHAN="pty"
-CONFIG_UNIX98_PTYS=y
-# CONFIG_LEGACY_PTYS is not set
-CONFIG_WATCHDOG=y
-# CONFIG_WATCHDOG_NOWAYOUT is not set
-CONFIG_SOFT_WATCHDOG=m
-# CONFIG_UML_WATCHDOG is not set
-# CONFIG_UML_SOUND is not set
-# CONFIG_SOUND is not set
-# CONFIG_HOSTAUDIO is not set
-
-#
-# Block Devices
-#
-CONFIG_BLK_DEV_UBD=y
-# CONFIG_BLK_DEV_UBD_SYNC is not set
-CONFIG_BLK_DEV_COW_COMMON=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_NBD=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=16
-CONFIG_BLK_DEV_RAM_SIZE=16384
-CONFIG_BLK_DEV_INITRD=y
-CONFIG_INITRAMFS_SOURCE=""
-
-#
-# IO Schedulers
-#
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-CONFIG_NETDEVICES=y
-
-#
-# UML Network Devices
-#
-CONFIG_UML_NET=y
-CONFIG_UML_NET_ETHERTAP=y
-CONFIG_UML_NET_TUNTAP=y
-# CONFIG_UML_NET_SLIP is not set
-# CONFIG_UML_NET_DAEMON is not set
-# CONFIG_UML_NET_MCAST is not set
-# CONFIG_UML_NET_SLIRP is not set
-
-#
-# Networking support
-#
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=y
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-CONFIG_IP_ROUTE_FWMARK=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_VERBOSE=y
-# CONFIG_IP_PNP is not set
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-CONFIG_INET_TUNNEL=m
-CONFIG_IP_TCPDIAG=y
-# CONFIG_IP_TCPDIAG_IPV6 is not set
-
-#
-# IP: Virtual Server Configuration
-#
-CONFIG_IP_VS=m
-# CONFIG_IP_VS_DEBUG is not set
-CONFIG_IP_VS_TAB_BITS=12
-
-#
-# IPVS transport protocol load balancing support
-#
-CONFIG_IP_VS_PROTO_TCP=y
-CONFIG_IP_VS_PROTO_UDP=y
-CONFIG_IP_VS_PROTO_ESP=y
-CONFIG_IP_VS_PROTO_AH=y
-
-#
-# IPVS scheduler
-#
-CONFIG_IP_VS_RR=m
-CONFIG_IP_VS_WRR=m
-CONFIG_IP_VS_LC=m
-CONFIG_IP_VS_WLC=m
-CONFIG_IP_VS_LBLC=m
-CONFIG_IP_VS_LBLCR=m
-CONFIG_IP_VS_DH=m
-CONFIG_IP_VS_SH=m
-CONFIG_IP_VS_SED=m
-CONFIG_IP_VS_NQ=m
-
-#
-# IPVS application helper
-#
-CONFIG_IP_VS_FTP=m
-CONFIG_IPV6=m
-CONFIG_IPV6_PRIVACY=y
-CONFIG_INET6_AH=m
-CONFIG_INET6_ESP=m
-CONFIG_INET6_IPCOMP=m
-CONFIG_INET6_TUNNEL=m
-CONFIG_IPV6_TUNNEL=m
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-CONFIG_IP_NF_CONNTRACK=m
-CONFIG_IP_NF_CT_ACCT=y
-# CONFIG_IP_NF_CONNTRACK_MARK is not set
-CONFIG_IP_NF_CT_PROTO_SCTP=m
-CONFIG_IP_NF_FTP=m
-CONFIG_IP_NF_IRC=m
-CONFIG_IP_NF_TFTP=m
-CONFIG_IP_NF_AMANDA=m
-CONFIG_IP_NF_QUEUE=m
-CONFIG_IP_NF_IPTABLES=m
-CONFIG_IP_NF_MATCH_LIMIT=m
-CONFIG_IP_NF_MATCH_IPRANGE=m
-CONFIG_IP_NF_MATCH_MAC=m
-CONFIG_IP_NF_MATCH_PKTTYPE=m
-CONFIG_IP_NF_MATCH_MARK=m
-CONFIG_IP_NF_MATCH_MULTIPORT=m
-CONFIG_IP_NF_MATCH_TOS=m
-CONFIG_IP_NF_MATCH_RECENT=m
-CONFIG_IP_NF_MATCH_ECN=m
-CONFIG_IP_NF_MATCH_DSCP=m
-CONFIG_IP_NF_MATCH_AH_ESP=m
-CONFIG_IP_NF_MATCH_LENGTH=m
-CONFIG_IP_NF_MATCH_TTL=m
-CONFIG_IP_NF_MATCH_TCPMSS=m
-CONFIG_IP_NF_MATCH_HELPER=m
-CONFIG_IP_NF_MATCH_STATE=m
-CONFIG_IP_NF_MATCH_CONNTRACK=m
-CONFIG_IP_NF_MATCH_OWNER=m
-CONFIG_IP_NF_MATCH_PHYSDEV=m
-CONFIG_IP_NF_MATCH_ADDRTYPE=m
-CONFIG_IP_NF_MATCH_REALM=m
-CONFIG_IP_NF_MATCH_SCTP=m
-CONFIG_IP_NF_MATCH_COMMENT=m
-# CONFIG_IP_NF_MATCH_HASHLIMIT is not set
-CONFIG_IP_NF_FILTER=m
-CONFIG_IP_NF_TARGET_REJECT=m
-CONFIG_IP_NF_TARGET_LOG=m
-CONFIG_IP_NF_TARGET_ULOG=m
-CONFIG_IP_NF_TARGET_TCPMSS=m
-CONFIG_IP_NF_NAT=m
-CONFIG_IP_NF_NAT_NEEDED=y
-CONFIG_IP_NF_TARGET_MASQUERADE=m
-CONFIG_IP_NF_TARGET_REDIRECT=m
-CONFIG_IP_NF_TARGET_NETMAP=m
-CONFIG_IP_NF_TARGET_SAME=m
-CONFIG_IP_NF_NAT_LOCAL=y
-CONFIG_IP_NF_NAT_SNMP_BASIC=m
-CONFIG_IP_NF_NAT_IRC=m
-CONFIG_IP_NF_NAT_FTP=m
-CONFIG_IP_NF_NAT_TFTP=m
-CONFIG_IP_NF_NAT_AMANDA=m
-CONFIG_IP_NF_MANGLE=m
-CONFIG_IP_NF_TARGET_TOS=m
-CONFIG_IP_NF_TARGET_ECN=m
-CONFIG_IP_NF_TARGET_DSCP=m
-CONFIG_IP_NF_TARGET_MARK=m
-CONFIG_IP_NF_TARGET_CLASSIFY=m
-CONFIG_IP_NF_RAW=m
-CONFIG_IP_NF_TARGET_NOTRACK=m
-CONFIG_IP_NF_ARPTABLES=m
-CONFIG_IP_NF_ARPFILTER=m
-CONFIG_IP_NF_ARP_MANGLE=m
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# IPv6: Netfilter Configuration
-#
-# CONFIG_IP6_NF_QUEUE is not set
-CONFIG_IP6_NF_IPTABLES=m
-CONFIG_IP6_NF_MATCH_LIMIT=m
-CONFIG_IP6_NF_MATCH_MAC=m
-CONFIG_IP6_NF_MATCH_RT=m
-CONFIG_IP6_NF_MATCH_OPTS=m
-CONFIG_IP6_NF_MATCH_FRAG=m
-CONFIG_IP6_NF_MATCH_HL=m
-CONFIG_IP6_NF_MATCH_MULTIPORT=m
-CONFIG_IP6_NF_MATCH_OWNER=m
-CONFIG_IP6_NF_MATCH_MARK=m
-CONFIG_IP6_NF_MATCH_IPV6HEADER=m
-CONFIG_IP6_NF_MATCH_AHESP=m
-CONFIG_IP6_NF_MATCH_LENGTH=m
-CONFIG_IP6_NF_MATCH_EUI64=m
-CONFIG_IP6_NF_MATCH_PHYSDEV=m
-CONFIG_IP6_NF_FILTER=m
-CONFIG_IP6_NF_TARGET_LOG=m
-CONFIG_IP6_NF_MANGLE=m
-CONFIG_IP6_NF_TARGET_MARK=m
-CONFIG_IP6_NF_RAW=m
-
-#
-# Bridge: Netfilter Configuration
-#
-CONFIG_BRIDGE_NF_EBTABLES=m
-CONFIG_BRIDGE_EBT_BROUTE=m
-CONFIG_BRIDGE_EBT_T_FILTER=m
-CONFIG_BRIDGE_EBT_T_NAT=m
-CONFIG_BRIDGE_EBT_802_3=m
-CONFIG_BRIDGE_EBT_AMONG=m
-CONFIG_BRIDGE_EBT_ARP=m
-CONFIG_BRIDGE_EBT_IP=m
-CONFIG_BRIDGE_EBT_LIMIT=m
-CONFIG_BRIDGE_EBT_MARK=m
-CONFIG_BRIDGE_EBT_PKTTYPE=m
-CONFIG_BRIDGE_EBT_STP=m
-CONFIG_BRIDGE_EBT_VLAN=m
-CONFIG_BRIDGE_EBT_ARPREPLY=m
-CONFIG_BRIDGE_EBT_DNAT=m
-CONFIG_BRIDGE_EBT_MARK_T=m
-CONFIG_BRIDGE_EBT_REDIRECT=m
-CONFIG_BRIDGE_EBT_SNAT=m
-CONFIG_BRIDGE_EBT_LOG=m
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=y
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IP_SCTP=m
-# CONFIG_SCTP_DBG_MSG is not set
-# CONFIG_SCTP_DBG_OBJCNT is not set
-# CONFIG_SCTP_HMAC_NONE is not set
-# CONFIG_SCTP_HMAC_SHA1 is not set
-CONFIG_SCTP_HMAC_MD5=y
-CONFIG_ATM=m
-CONFIG_ATM_CLIP=m
-# CONFIG_ATM_CLIP_NO_ICMP is not set
-CONFIG_ATM_LANE=m
-# CONFIG_ATM_MPOA is not set
-CONFIG_ATM_BR2684=m
-# CONFIG_ATM_BR2684_IPFILTER is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=m
-# CONFIG_LLC2 is not set
-CONFIG_IPX=m
-# CONFIG_IPX_INTERN is not set
-CONFIG_ATALK=m
-CONFIG_DEV_APPLETALK=y
-CONFIG_IPDDP=m
-CONFIG_IPDDP_ENCAP=y
-CONFIG_IPDDP_DECAP=y
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-CONFIG_NET_DIVERT=y
-# CONFIG_ECONET is not set
-CONFIG_WAN_ROUTER=m
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CLK_JIFFIES=y
-# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
-# CONFIG_NET_SCH_CLK_CPU is not set
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-CONFIG_NET_SCH_HFSC=m
-CONFIG_NET_SCH_ATM=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-CONFIG_NET_SCH_NETEM=m
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_CLS_U32_PERF=y
-CONFIG_NET_CLS_IND=y
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-# CONFIG_NET_CLS_ACT is not set
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-# CONFIG_TUX is not set
-CONFIG_DUMMY=m
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=m
-CONFIG_ETHERTAP=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=m
-
-#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
-#
-
-#
-# Token Ring devices
-#
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# ATM drivers
-#
-# CONFIG_ATM_TCP is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=m
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_DNOTIFY=y
-# CONFIG_AUTOFS_FS is not set
-CONFIG_AUTOFS4_FS=m
-
-#
-# CD-ROM/DVD Filesystems
-#
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_MSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-# CONFIG_DEVFS_FS is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-# CONFIG_TMPFS_XATTR is not set
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=m
-CONFIG_NFS_V3=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-CONFIG_RPCSEC_GSS_SPKM3=y
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-CONFIG_PARTITION_ADVANCED=y
-# CONFIG_ACORN_PARTITION is not set
-CONFIG_OSF_PARTITION=y
-# CONFIG_AMIGA_PARTITION is not set
-# CONFIG_ATARI_PARTITION is not set
-CONFIG_MAC_PARTITION=y
-CONFIG_MSDOS_PARTITION=y
-CONFIG_BSD_DISKLABEL=y
-CONFIG_MINIX_SUBPARTITION=y
-CONFIG_SOLARIS_X86_PARTITION=y
-CONFIG_UNIXWARE_DISKLABEL=y
-# CONFIG_LDM_PARTITION is not set
-CONFIG_SGI_PARTITION=y
-# CONFIG_ULTRIX_PARTITION is not set
-CONFIG_SUN_PARTITION=y
-CONFIG_EFI_PARTITION=y
-
-#
-# Native Language Support
-#
-# CONFIG_NLS is not set
-
-#
-# Security options
-#
-# CONFIG_KEYS is not set
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_NULL=m
-CONFIG_CRYPTO_MD4=m
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=m
-CONFIG_CRYPTO_SHA512=m
-CONFIG_CRYPTO_WP512=m
-CONFIG_CRYPTO_DES=y
-CONFIG_CRYPTO_BLOWFISH=m
-CONFIG_CRYPTO_TWOFISH=m
-CONFIG_CRYPTO_SERPENT=m
-# CONFIG_CRYPTO_AES is not set
-CONFIG_CRYPTO_CAST5=m
-CONFIG_CRYPTO_CAST6=m
-CONFIG_CRYPTO_TEA=m
-CONFIG_CRYPTO_ARC4=m
-CONFIG_CRYPTO_KHAZAD=m
-# CONFIG_CRYPTO_ANUBIS is not set
-CONFIG_CRYPTO_DEFLATE=m
-CONFIG_CRYPTO_MICHAEL_MIC=m
-CONFIG_CRYPTO_CRC32C=m
-# CONFIG_CRYPTO_TEST is not set
-# CONFIG_CRYPTO_SIGNATURE is not set
-# CONFIG_CRYPTO_MPILIB is not set
-
-#
-# Library routines
-#
-CONFIG_CRC_CCITT=m
-CONFIG_CRC32=y
-CONFIG_LIBCRC32C=m
-CONFIG_ZLIB_INFLATE=m
-CONFIG_ZLIB_DEFLATE=m
-
-#
-# Multi-device support (RAID and LVM)
-#
-CONFIG_MD=y
-CONFIG_BLK_DEV_MD=y
-CONFIG_MD_LINEAR=m
-CONFIG_MD_RAID0=m
-CONFIG_MD_RAID1=m
-CONFIG_MD_RAID10=m
-CONFIG_MD_RAID5=m
-CONFIG_MD_RAID6=m
-CONFIG_MD_MULTIPATH=m
-# CONFIG_MD_FAULTY is not set
-CONFIG_BLK_DEV_DM=m
-CONFIG_DM_CRYPT=m
-CONFIG_DM_SNAPSHOT=m
-CONFIG_DM_MIRROR=m
-CONFIG_DM_ZERO=m
-# CONFIG_INPUT is not set
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-CONFIG_DEBUG_SPINLOCK=y
-# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_FRAME_POINTER=y
-CONFIG_PT_PROXY=y
-# CONFIG_GPROF is not set
-# CONFIG_GCOV is not set
diff --git a/lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config b/lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config
deleted file mode 100644
index 01a8b4dbcfadbdba29e01a3bdc3bd5ec0d024358..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/uml-vanilla-2.6.6.config
+++ /dev/null
@@ -1,491 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_USERMODE=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-
-#
-# UML-specific options
-#
-CONFIG_MODE_TT=y
-# CONFIG_MODE_SKAS is not set
-CONFIG_NET=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_HOSTFS=y
-# CONFIG_HPPFS is not set
-CONFIG_MCONSOLE=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_HOST_2G_2G is not set
-# CONFIG_UML_SMP is not set
-# CONFIG_SMP is not set
-CONFIG_NEST_LEVEL=0
-CONFIG_KERNEL_HALF_GIGS=1
-# CONFIG_HIGHMEM is not set
-CONFIG_PROC_MM=y
-CONFIG_KERNEL_STACK_ORDER=3
-# CONFIG_UML_REAL_TIME_CLOCK is not set
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-CONFIG_CLEAN_COMPILE=y
-# CONFIG_STANDALONE is not set
-CONFIG_BROKEN_ON_SMP=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_POSIX_MQUEUE=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-# CONFIG_AUDIT is not set
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_HOTPLUG is not set
-# CONFIG_IKCONFIG is not set
-CONFIG_EMBEDDED=y
-# CONFIG_KALLSYMS is not set
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_NOOP=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-CONFIG_IOSCHED_CFQ=y
-# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set
-
-#
-# Loadable module support
-#
-CONFIG_MODULES=y
-CONFIG_MODULE_UNLOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_OBSOLETE_MODPARM=y
-CONFIG_MODVERSIONS=y
-CONFIG_KMOD=y
-
-#
-# Generic Driver Options
-#
-
-#
-# Character Devices
-#
-CONFIG_STDIO_CONSOLE=y
-CONFIG_SSL=y
-CONFIG_FD_CHAN=y
-CONFIG_NULL_CHAN=y
-CONFIG_PORT_CHAN=y
-CONFIG_PTY_CHAN=y
-CONFIG_TTY_CHAN=y
-CONFIG_XTERM_CHAN=y
-CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
-CONFIG_CON_CHAN="xterm"
-CONFIG_SSL_CHAN="pty"
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
-# CONFIG_WATCHDOG is not set
-# CONFIG_UML_SOUND is not set
-# CONFIG_SOUND is not set
-# CONFIG_HOSTAUDIO is not set
-
-#
-# Block Devices
-#
-CONFIG_BLK_DEV_UBD=y
-CONFIG_BLK_DEV_UBD_SYNC=y
-CONFIG_BLK_DEV_COW_COMMON=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_NBD=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_SIZE=4096
-CONFIG_BLK_DEV_INITRD=y
-# CONFIG_MMAPPER is not set
-CONFIG_NETDEVICES=y
-
-#
-# UML Network Devices
-#
-CONFIG_UML_NET=y
-CONFIG_UML_NET_ETHERTAP=y
-CONFIG_UML_NET_TUNTAP=y
-CONFIG_UML_NET_SLIP=y
-CONFIG_UML_NET_DAEMON=y
-CONFIG_UML_NET_MCAST=y
-CONFIG_UML_NET_PCAP=y
-CONFIG_UML_NET_SLIRP=y
-
-#
-# Networking support
-#
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-CONFIG_NETLINK_DEV=m
-CONFIG_UNIX=y
-CONFIG_NET_KEY=m
-CONFIG_INET=y
-CONFIG_IP_MULTICAST=y
-CONFIG_IP_ADVANCED_ROUTER=y
-CONFIG_IP_MULTIPLE_TABLES=y
-# CONFIG_IP_ROUTE_FWMARK is not set
-CONFIG_IP_ROUTE_NAT=y
-CONFIG_IP_ROUTE_MULTIPATH=y
-CONFIG_IP_ROUTE_TOS=y
-CONFIG_IP_ROUTE_VERBOSE=y
-CONFIG_IP_PNP=y
-CONFIG_IP_PNP_DHCP=y
-CONFIG_IP_PNP_BOOTP=y
-CONFIG_IP_PNP_RARP=y
-CONFIG_NET_IPIP=m
-CONFIG_NET_IPGRE=m
-CONFIG_NET_IPGRE_BROADCAST=y
-CONFIG_IP_MROUTE=y
-CONFIG_IP_PIMSM_V1=y
-CONFIG_IP_PIMSM_V2=y
-# CONFIG_ARPD is not set
-CONFIG_SYN_COOKIES=y
-CONFIG_INET_AH=m
-CONFIG_INET_ESP=m
-CONFIG_INET_IPCOMP=m
-
-#
-# IP: Virtual Server Configuration
-#
-# CONFIG_IP_VS is not set
-# CONFIG_IPV6 is not set
-CONFIG_NETFILTER=y
-# CONFIG_NETFILTER_DEBUG is not set
-CONFIG_BRIDGE_NETFILTER=y
-
-#
-# IP: Netfilter Configuration
-#
-# CONFIG_IP_NF_CONNTRACK is not set
-# CONFIG_IP_NF_QUEUE is not set
-# CONFIG_IP_NF_IPTABLES is not set
-# CONFIG_IP_NF_ARPTABLES is not set
-# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
-# CONFIG_IP_NF_COMPAT_IPFWADM is not set
-
-#
-# Bridge: Netfilter Configuration
-#
-# CONFIG_BRIDGE_NF_EBTABLES is not set
-CONFIG_XFRM=y
-CONFIG_XFRM_USER=m
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-CONFIG_BRIDGE=m
-CONFIG_VLAN_8021Q=m
-# CONFIG_DECNET is not set
-CONFIG_LLC=m
-CONFIG_LLC2=m
-# CONFIG_IPX is not set
-# CONFIG_ATALK is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-CONFIG_NET_SCHED=y
-CONFIG_NET_SCH_CBQ=m
-CONFIG_NET_SCH_HTB=m
-# CONFIG_NET_SCH_HFSC is not set
-CONFIG_NET_SCH_CSZ=m
-CONFIG_NET_SCH_PRIO=m
-CONFIG_NET_SCH_RED=m
-CONFIG_NET_SCH_SFQ=m
-CONFIG_NET_SCH_TEQL=m
-CONFIG_NET_SCH_TBF=m
-CONFIG_NET_SCH_GRED=m
-CONFIG_NET_SCH_DSMARK=m
-# CONFIG_NET_SCH_DELAY is not set
-CONFIG_NET_SCH_INGRESS=m
-CONFIG_NET_QOS=y
-CONFIG_NET_ESTIMATOR=y
-CONFIG_NET_CLS=y
-CONFIG_NET_CLS_TCINDEX=m
-CONFIG_NET_CLS_ROUTE4=m
-CONFIG_NET_CLS_ROUTE=y
-CONFIG_NET_CLS_FW=m
-CONFIG_NET_CLS_U32=m
-CONFIG_NET_CLS_RSVP=m
-CONFIG_NET_CLS_RSVP6=m
-CONFIG_NET_CLS_POLICE=y
-
-#
-# Network testing
-#
-CONFIG_NET_PKTGEN=m
-# CONFIG_NETPOLL is not set
-# CONFIG_NET_POLL_CONTROLLER is not set
-# CONFIG_HAMRADIO is not set
-# CONFIG_IRDA is not set
-# CONFIG_BT is not set
-CONFIG_DUMMY=y
-CONFIG_BONDING=y
-CONFIG_EQUALIZER=y
-CONFIG_TUN=y
-CONFIG_ETHERTAP=m
-
-#
-# Ethernet (10 or 100Mbit)
-#
-CONFIG_NET_ETHERNET=y
-CONFIG_MII=y
-
-#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
-#
-
-#
-# Token Ring devices
-#
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-# CONFIG_PPP is not set
-# CONFIG_SLIP is not set
-# CONFIG_SHAPER is not set
-# CONFIG_NETCONSOLE is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-CONFIG_EXT2_FS_XATTR=y
-CONFIG_EXT2_FS_POSIX_ACL=y
-CONFIG_EXT2_FS_SECURITY=y
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-CONFIG_EXT3_FS_POSIX_ACL=y
-CONFIG_EXT3_FS_SECURITY=y
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-CONFIG_REISERFS_FS=m
-# CONFIG_REISERFS_CHECK is not set
-CONFIG_REISERFS_PROC_INFO=y
-# CONFIG_JFS_FS is not set
-CONFIG_FS_POSIX_ACL=y
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-CONFIG_ROMFS_FS=y
-CONFIG_QUOTA=y
-CONFIG_QFMT_V1=y
-CONFIG_QFMT_V2=y
-CONFIG_QUOTACTL=y
-CONFIG_AUTOFS_FS=y
-CONFIG_AUTOFS4_FS=y
-
-#
-# CD-ROM/DVD Filesystems
-#
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-CONFIG_FAT_FS=y
-CONFIG_MSDOS_FS=y
-CONFIG_VFAT_FS=y
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_PROC_KCORE=y
-CONFIG_SYSFS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS_XATTR=y
-CONFIG_DEVPTS_FS_SECURITY=y
-CONFIG_TMPFS=y
-# CONFIG_HUGETLB_PAGE is not set
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_HFSPLUS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-CONFIG_NFS_FS=y
-CONFIG_NFS_V3=y
-CONFIG_NFS_V4=y
-CONFIG_NFS_DIRECTIO=y
-CONFIG_NFSD=y
-CONFIG_NFSD_V3=y
-CONFIG_NFSD_V4=y
-CONFIG_NFSD_TCP=y
-# CONFIG_ROOT_NFS is not set
-CONFIG_LOCKD=y
-CONFIG_LOCKD_V4=y
-CONFIG_EXPORTFS=y
-CONFIG_SUNRPC=y
-CONFIG_SUNRPC_GSS=y
-CONFIG_RPCSEC_GSS_KRB5=y
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-
-#
-# Native Language Support
-#
-CONFIG_NLS=y
-CONFIG_NLS_DEFAULT="utf-8"
-# CONFIG_NLS_CODEPAGE_437 is not set
-# CONFIG_NLS_CODEPAGE_737 is not set
-# CONFIG_NLS_CODEPAGE_775 is not set
-# CONFIG_NLS_CODEPAGE_850 is not set
-# CONFIG_NLS_CODEPAGE_852 is not set
-# CONFIG_NLS_CODEPAGE_855 is not set
-# CONFIG_NLS_CODEPAGE_857 is not set
-# CONFIG_NLS_CODEPAGE_860 is not set
-# CONFIG_NLS_CODEPAGE_861 is not set
-# CONFIG_NLS_CODEPAGE_862 is not set
-# CONFIG_NLS_CODEPAGE_863 is not set
-# CONFIG_NLS_CODEPAGE_864 is not set
-# CONFIG_NLS_CODEPAGE_865 is not set
-# CONFIG_NLS_CODEPAGE_866 is not set
-# CONFIG_NLS_CODEPAGE_869 is not set
-# CONFIG_NLS_CODEPAGE_936 is not set
-# CONFIG_NLS_CODEPAGE_950 is not set
-# CONFIG_NLS_CODEPAGE_932 is not set
-# CONFIG_NLS_CODEPAGE_949 is not set
-# CONFIG_NLS_CODEPAGE_874 is not set
-# CONFIG_NLS_ISO8859_8 is not set
-# CONFIG_NLS_CODEPAGE_1250 is not set
-# CONFIG_NLS_CODEPAGE_1251 is not set
-# CONFIG_NLS_ISO8859_1 is not set
-# CONFIG_NLS_ISO8859_2 is not set
-# CONFIG_NLS_ISO8859_3 is not set
-# CONFIG_NLS_ISO8859_4 is not set
-# CONFIG_NLS_ISO8859_5 is not set
-# CONFIG_NLS_ISO8859_6 is not set
-# CONFIG_NLS_ISO8859_7 is not set
-# CONFIG_NLS_ISO8859_9 is not set
-# CONFIG_NLS_ISO8859_13 is not set
-# CONFIG_NLS_ISO8859_14 is not set
-# CONFIG_NLS_ISO8859_15 is not set
-# CONFIG_NLS_KOI8_R is not set
-# CONFIG_NLS_KOI8_U is not set
-# CONFIG_NLS_UTF8 is not set
-
-#
-# Security options
-#
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-CONFIG_CRYPTO=y
-CONFIG_CRYPTO_HMAC=y
-# CONFIG_CRYPTO_NULL is not set
-# CONFIG_CRYPTO_MD4 is not set
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_SHA1=y
-# CONFIG_CRYPTO_SHA256 is not set
-# CONFIG_CRYPTO_SHA512 is not set
-CONFIG_CRYPTO_DES=y
-# CONFIG_CRYPTO_BLOWFISH is not set
-# CONFIG_CRYPTO_TWOFISH is not set
-# CONFIG_CRYPTO_SERPENT is not set
-# CONFIG_CRYPTO_AES is not set
-# CONFIG_CRYPTO_CAST5 is not set
-# CONFIG_CRYPTO_CAST6 is not set
-# CONFIG_CRYPTO_ARC4 is not set
-CONFIG_CRYPTO_DEFLATE=y
-# CONFIG_CRYPTO_MICHAEL_MIC is not set
-# CONFIG_CRYPTO_CRC32C is not set
-# CONFIG_CRYPTO_TEST is not set
-
-#
-# Library routines
-#
-CONFIG_CRC32=y
-# CONFIG_LIBCRC32C is not set
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZLIB_DEFLATE=y
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Kernel hacking
-#
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_FRAME_POINTER=y
-CONFIG_PT_PROXY=y
-# CONFIG_GPROF is not set
-# CONFIG_GCOV is not set
diff --git a/lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config b/lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config
deleted file mode 100644
index f6c97b8d28dc8bf08a06b2510f44146948d5597b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/kernel_configs/uml_2.6.0_test3.config
+++ /dev/null
@@ -1,325 +0,0 @@
-#
-# Automatically generated make config: don't edit
-#
-CONFIG_USERMODE=y
-CONFIG_MMU=y
-CONFIG_UID16=y
-CONFIG_RWSEM_GENERIC_SPINLOCK=y
-
-#
-# UML-specific options
-#
-CONFIG_MODE_TT=y
-# CONFIG_MODE_SKAS is not set
-CONFIG_NET=y
-CONFIG_BINFMT_ELF=y
-CONFIG_BINFMT_MISC=y
-CONFIG_HOSTFS=y
-# CONFIG_HPPFS is not set
-CONFIG_MCONSOLE=y
-CONFIG_MAGIC_SYSRQ=y
-# CONFIG_HOST_2G_2G is not set
-# CONFIG_UML_SMP is not set
-# CONFIG_SMP is not set
-CONFIG_NEST_LEVEL=0
-CONFIG_KERNEL_HALF_GIGS=1
-# CONFIG_HIGHMEM is not set
-# CONFIG_PROC_MM is not set
-CONFIG_KERNEL_STACK_ORDER=3
-
-#
-# Code maturity level options
-#
-CONFIG_EXPERIMENTAL=y
-
-#
-# General setup
-#
-CONFIG_SWAP=y
-CONFIG_SYSVIPC=y
-CONFIG_BSD_PROCESS_ACCT=y
-CONFIG_SYSCTL=y
-CONFIG_LOG_BUF_SHIFT=14
-# CONFIG_EMBEDDED is not set
-CONFIG_KALLSYMS=y
-CONFIG_FUTEX=y
-CONFIG_EPOLL=y
-CONFIG_IOSCHED_AS=y
-CONFIG_IOSCHED_DEADLINE=y
-
-#
-# Loadable module support
-#
-# CONFIG_MODULES is not set
-
-#
-# Generic Driver Options
-#
-# CONFIG_FW_LOADER is not set
-
-#
-# Character Devices
-#
-CONFIG_STDIO_CONSOLE=y
-CONFIG_SSL=y
-CONFIG_FD_CHAN=y
-# CONFIG_NULL_CHAN is not set
-CONFIG_PORT_CHAN=y
-CONFIG_PTY_CHAN=y
-CONFIG_TTY_CHAN=y
-CONFIG_XTERM_CHAN=y
-CONFIG_CON_ZERO_CHAN="fd:0,fd:1"
-CONFIG_CON_CHAN="xterm"
-CONFIG_SSL_CHAN="pty"
-CONFIG_UNIX98_PTYS=y
-CONFIG_UNIX98_PTY_COUNT=256
-# CONFIG_WATCHDOG is not set
-# CONFIG_UML_SOUND is not set
-# CONFIG_SOUND is not set
-# CONFIG_HOSTAUDIO is not set
-
-#
-# Block Devices
-#
-CONFIG_BLK_DEV_UBD=y
-# CONFIG_BLK_DEV_UBD_SYNC is not set
-CONFIG_BLK_DEV_COW_COMMON=y
-CONFIG_BLK_DEV_LOOP=y
-# CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_RAM is not set
-# CONFIG_MMAPPER is not set
-CONFIG_NETDEVICES=y
-
-#
-# UML Network Devices
-#
-CONFIG_UML_NET=y
-CONFIG_UML_NET_ETHERTAP=y
-CONFIG_UML_NET_TUNTAP=y
-CONFIG_UML_NET_SLIP=y
-CONFIG_UML_NET_DAEMON=y
-CONFIG_UML_NET_MCAST=y
-# CONFIG_UML_NET_PCAP is not set
-# CONFIG_UML_NET_SLIRP is not set
-
-#
-# Networking support
-#
-
-#
-# Networking options
-#
-CONFIG_PACKET=y
-CONFIG_PACKET_MMAP=y
-# CONFIG_NETLINK_DEV is not set
-CONFIG_UNIX=y
-# CONFIG_NET_KEY is not set
-CONFIG_INET=y
-# CONFIG_IP_MULTICAST is not set
-# CONFIG_IP_ADVANCED_ROUTER is not set
-# CONFIG_IP_PNP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_ARPD is not set
-# CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
-# CONFIG_INET_AH is not set
-# CONFIG_INET_ESP is not set
-# CONFIG_INET_IPCOMP is not set
-# CONFIG_IPV6 is not set
-# CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
-# CONFIG_NETFILTER is not set
-# CONFIG_XFRM_USER is not set
-
-#
-# SCTP Configuration (EXPERIMENTAL)
-#
-CONFIG_IPV6_SCTP__=y
-# CONFIG_IP_SCTP is not set
-# CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
-# CONFIG_LLC is not set
-# CONFIG_X25 is not set
-# CONFIG_LAPB is not set
-# CONFIG_NET_DIVERT is not set
-# CONFIG_ECONET is not set
-# CONFIG_WAN_ROUTER is not set
-# CONFIG_NET_FASTROUTE is not set
-# CONFIG_NET_HW_FLOWCONTROL is not set
-
-#
-# QoS and/or fair queueing
-#
-# CONFIG_NET_SCHED is not set
-
-#
-# Network testing
-#
-# CONFIG_NET_PKTGEN is not set
-CONFIG_DUMMY=y
-# CONFIG_BONDING is not set
-# CONFIG_EQUALIZER is not set
-CONFIG_TUN=y
-# CONFIG_ETHERTAP is not set
-
-#
-# Ethernet (10 or 100Mbit)
-#
-# CONFIG_NET_ETHERNET is not set
-
-#
-# Ethernet (1000 Mbit)
-#
-
-#
-# Ethernet (10000 Mbit)
-#
-CONFIG_PPP=y
-# CONFIG_PPP_MULTILINK is not set
-# CONFIG_PPP_FILTER is not set
-# CONFIG_PPP_ASYNC is not set
-# CONFIG_PPP_SYNC_TTY is not set
-# CONFIG_PPP_DEFLATE is not set
-# CONFIG_PPP_BSDCOMP is not set
-# CONFIG_PPPOE is not set
-CONFIG_SLIP=y
-# CONFIG_SLIP_COMPRESSED is not set
-# CONFIG_SLIP_SMART is not set
-# CONFIG_SLIP_MODE_SLIP6 is not set
-
-#
-# Wireless LAN (non-hamradio)
-#
-# CONFIG_NET_RADIO is not set
-
-#
-# Token Ring devices (depends on LLC=y)
-#
-# CONFIG_SHAPER is not set
-
-#
-# Wan interfaces
-#
-# CONFIG_WAN is not set
-
-#
-# File systems
-#
-CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
-CONFIG_EXT3_FS=y
-CONFIG_EXT3_FS_XATTR=y
-# CONFIG_EXT3_FS_POSIX_ACL is not set
-# CONFIG_EXT3_FS_SECURITY is not set
-CONFIG_JBD=y
-# CONFIG_JBD_DEBUG is not set
-CONFIG_FS_MBCACHE=y
-# CONFIG_REISERFS_FS is not set
-# CONFIG_JFS_FS is not set
-# CONFIG_XFS_FS is not set
-# CONFIG_MINIX_FS is not set
-# CONFIG_ROMFS_FS is not set
-# CONFIG_QUOTA is not set
-# CONFIG_AUTOFS_FS is not set
-# CONFIG_AUTOFS4_FS is not set
-
-#
-# CD-ROM/DVD Filesystems
-#
-# CONFIG_ISO9660_FS is not set
-# CONFIG_UDF_FS is not set
-
-#
-# DOS/FAT/NT Filesystems
-#
-# CONFIG_FAT_FS is not set
-# CONFIG_NTFS_FS is not set
-
-#
-# Pseudo filesystems
-#
-CONFIG_PROC_FS=y
-CONFIG_DEVFS_FS=y
-CONFIG_DEVFS_MOUNT=y
-# CONFIG_DEVFS_DEBUG is not set
-CONFIG_DEVPTS_FS=y
-# CONFIG_DEVPTS_FS_XATTR is not set
-CONFIG_TMPFS=y
-CONFIG_RAMFS=y
-
-#
-# Miscellaneous filesystems
-#
-# CONFIG_ADFS_FS is not set
-# CONFIG_AFFS_FS is not set
-# CONFIG_HFS_FS is not set
-# CONFIG_BEFS_FS is not set
-# CONFIG_BFS_FS is not set
-# CONFIG_EFS_FS is not set
-# CONFIG_CRAMFS is not set
-# CONFIG_VXFS_FS is not set
-# CONFIG_HPFS_FS is not set
-# CONFIG_QNX4FS_FS is not set
-# CONFIG_SYSV_FS is not set
-# CONFIG_UFS_FS is not set
-
-#
-# Network File Systems
-#
-# CONFIG_NFS_FS is not set
-# CONFIG_NFSD is not set
-# CONFIG_EXPORTFS is not set
-# CONFIG_SMB_FS is not set
-# CONFIG_CIFS is not set
-# CONFIG_NCP_FS is not set
-# CONFIG_CODA_FS is not set
-# CONFIG_INTERMEZZO_FS is not set
-# CONFIG_AFS_FS is not set
-
-#
-# Partition Types
-#
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_MSDOS_PARTITION=y
-
-#
-# Security options
-#
-# CONFIG_SECURITY is not set
-
-#
-# Cryptographic options
-#
-# CONFIG_CRYPTO is not set
-
-#
-# Library routines
-#
-# CONFIG_CRC32 is not set
-
-#
-# SCSI support
-#
-# CONFIG_SCSI is not set
-
-#
-# Multi-device support (RAID and LVM)
-#
-# CONFIG_MD is not set
-
-#
-# Memory Technology Devices (MTD)
-#
-# CONFIG_MTD is not set
-
-#
-# Kernel hacking
-#
-CONFIG_DEBUG_SLAB=y
-# CONFIG_DEBUG_SPINLOCK is not set
-CONFIG_DEBUG_INFO=y
-CONFIG_FRAME_POINTER=y
-CONFIG_PT_PROXY=y
-# CONFIG_GPROF is not set
-# CONFIG_GCOV is not set
diff --git a/lustre/kernel_patches/patches/2.6.5-quotafix.patch b/lustre/kernel_patches/patches/2.6.5-quotafix.patch
deleted file mode 100644
index 46369fe5c7cec9f3f487a9808d7dc3d05a07220b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/2.6.5-quotafix.patch
+++ /dev/null
@@ -1,2151 +0,0 @@
-Index: linux-2.6.5-7.283/include/linux/ext3_jbd.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/ext3_jbd.h
-+++ linux-2.6.5-7.283/include/linux/ext3_jbd.h
-@@ -72,6 +72,19 @@ extern int ext3_writepage_trans_blocks(s
- 
- #define EXT3_INDEX_EXTRA_TRANS_BLOCKS	8
- 
-+#ifdef CONFIG_QUOTA
-+/* Amount of blocks needed for quota update - we know that the structure was
-+ * allocated so we need to update only inode+data */
-+#define EXT3_QUOTA_TRANS_BLOCKS 2
-+/* Amount of blocks needed for quota insert/delete - we do some block writes
-+ * but inode, sb and group updates are done only once */
-+#define EXT3_QUOTA_INIT_BLOCKS (DQUOT_MAX_WRITES*\
-+				(EXT3_SINGLEDATA_TRANS_BLOCKS-3)+3)
-+#else
-+#define EXT3_QUOTA_TRANS_BLOCKS 0
-+#define EXT3_QUOTA_INIT_BLOCKS 0
-+#endif
-+
- int
- ext3_mark_iloc_dirty(handle_t *handle, 
- 		     struct inode *inode,
-@@ -97,6 +110,8 @@ int ext3_mark_inode_dirty(handle_t *hand
- void ext3_journal_abort_handle(const char *caller, const char *err_fn,
- 		struct buffer_head *bh, handle_t *handle, int err);
- 
-+int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
-+
- static inline int
- __ext3_journal_get_undo_access(const char *where, handle_t *handle,
- 				struct buffer_head *bh, int *credits)
-Index: linux-2.6.5-7.283/include/linux/fs.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/fs.h
-+++ linux-2.6.5-7.283/include/linux/fs.h
-@@ -967,6 +967,9 @@ struct super_operations {
- 	void (*umount_begin) (struct super_block *);
- 
- 	int (*show_options)(struct seq_file *, struct vfsmount *);
-+
-+	ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
-+ 	ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
- };
- 
- /* Inode state bits.  Protected by inode_lock. */
-Index: linux-2.6.5-7.283/include/linux/quota.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/quota.h
-+++ linux-2.6.5-7.283/include/linux/quota.h
-@@ -138,6 +138,10 @@ struct if_dqinfo {
- #include <linux/dqblk_v1.h>
- #include <linux/dqblk_v2.h>
- 
-+/* Maximal numbers of writes for quota operation (insert/delete/update)
-+ * (over all formats) - info block, 4 pointer blocks, data block */
-+#define DQUOT_MAX_WRITES        6
-+
- /*
-  * Data for one user/group kept in memory
-  */
-@@ -168,22 +172,21 @@ struct mem_dqinfo {
- 	} u;
- };
- 
-+struct super_block;
-+
- #define DQF_MASK 0xffff		/* Mask for format specific flags */
- #define DQF_INFO_DIRTY_B 16
- #define DQF_ANY_DQUOT_DIRTY_B 17
- #define DQF_INFO_DIRTY (1 << DQF_INFO_DIRTY_B)	/* Is info dirty? */
- #define DQF_ANY_DQUOT_DIRTY (1 << DQF_ANY_DQUOT_DIRTY_B) /* Is any dquot dirty? */
- 
--extern inline void mark_info_dirty(struct mem_dqinfo *info)
--{
--	set_bit(DQF_INFO_DIRTY_B, &info->dqi_flags);
--}
--
-+extern void mark_info_dirty(struct super_block *sb, int type);
- #define info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags)
- #define info_any_dquot_dirty(info) test_bit(DQF_ANY_DQUOT_DIRTY_B, &(info)->dqi_flags)
- #define info_any_dirty(info) (info_dirty(info) || info_any_dquot_dirty(info))
- 
- #define sb_dqopt(sb) (&(sb)->s_dquot)
-+#define sb_dqinfo(sb, type) (sb_dqopt(sb)->info+(type))
- 
- struct dqstats {
- 	int lookups;
-@@ -204,6 +207,9 @@ extern struct dqstats dqstats;
- #define DQ_BLKS_B	1
- #define DQ_INODES_B	2
- #define DQ_FAKE_B	3
-+#define DQ_READ_B	4	/* dquot was read into memory */
-+#define DQ_ACTIVE_B     5       /* dquot is active (dquot_release not called) */
-+#define DQ_WAITFREE_B   6       /* dquot being waited (by invalidate_dquots) */
- 
- #define DQ_MOD        (1 << DQ_MOD_B)	/* dquot modified since read */
- #define DQ_BLKS       (1 << DQ_BLKS_B)	/* uid/gid has been warned about blk limit */
-@@ -239,18 +245,22 @@ struct quota_format_ops {
- 	int (*free_file_info)(struct super_block *sb, int type);	/* Called on quotaoff() */
- 	int (*read_dqblk)(struct dquot *dquot);		/* Read structure for one user */
- 	int (*commit_dqblk)(struct dquot *dquot);	/* Write (or delete) structure for one user */
-+	int (*release_dqblk)(struct dquot *dquot);      /* Called when last reference to dquot is being dropped */
- };
- 
- /* Operations working with dquots */
- struct dquot_operations {
--	void (*initialize) (struct inode *, int);
--	void (*drop) (struct inode *);
-+	int (*initialize) (struct inode *, int);
-+	int (*drop) (struct inode *);
- 	int (*alloc_space) (struct inode *, qsize_t, int);
- 	int (*alloc_inode) (const struct inode *, unsigned long);
--	void (*free_space) (struct inode *, qsize_t);
--	void (*free_inode) (const struct inode *, unsigned long);
-+	int (*free_space) (struct inode *, qsize_t);
-+	int (*free_inode) (const struct inode *, unsigned long);
- 	int (*transfer) (struct inode *, struct iattr *);
- 	int (*write_dquot) (struct dquot *);
-+	int (*acquire_dquot) (struct dquot *);          /* Quota is going to be created on disk */
-+	int (*release_dquot) (struct dquot *);          /* Quota is going to be deleted from disk */
-+	int (*write_info) (struct super_block *, int);  /* Write of quota "superblock" */
- };
- 
- /* Operations handling requests from userspace */
-@@ -283,7 +293,8 @@ struct quota_info {
- 	struct semaphore dqio_sem;		/* lock device while I/O in progress */
- 	struct semaphore dqonoff_sem;		/* Serialize quotaon & quotaoff */
- 	struct rw_semaphore dqptr_sem;		/* serialize ops using quota_info struct, pointers from inode to dquots */
--	struct file *files[MAXQUOTAS];		/* fp's to quotafiles */
-+	struct inode *files[MAXQUOTAS];		/* inodes of quotafiles */
-+	struct vfsmount *mnt[MAXQUOTAS];        /* mountpoint entries of filesystems with quota files */
- 	struct mem_dqinfo info[MAXQUOTAS];	/* Information for each quota type */
- 	struct quota_format_ops *ops[MAXQUOTAS];	/* Operations for each type */
- };
-Index: linux-2.6.5-7.283/include/linux/quotaops.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/quotaops.h
-+++ linux-2.6.5-7.283/include/linux/quotaops.h
-@@ -22,17 +22,22 @@
-  */
- extern void sync_dquots(struct super_block *sb, int type);
- 
--extern void dquot_initialize(struct inode *inode, int type);
--extern void dquot_drop(struct inode *inode);
-+extern int dquot_initialize(struct inode *inode, int type);
-+extern int dquot_drop(struct inode *inode);
- 
- extern int  dquot_alloc_space(struct inode *inode, qsize_t number, int prealloc);
- extern int  dquot_alloc_inode(const struct inode *inode, unsigned long number);
- 
--extern void dquot_free_space(struct inode *inode, qsize_t number);
--extern void dquot_free_inode(const struct inode *inode, unsigned long number);
-+extern int dquot_free_space(struct inode *inode, qsize_t number);
-+extern int dquot_free_inode(const struct inode *inode, unsigned long number);
- 
- extern int  dquot_transfer(struct inode *inode, struct iattr *iattr);
- 
-+extern int dquot_commit(struct dquot *dquot);
-+extern int dquot_commit_info(struct super_block *sb, int type);
-+extern int dquot_acquire(struct dquot *dquot);
-+extern int dquot_release(struct dquot *dquot);
-+
- /*
-  * Operations supported for diskquotas.
-  */
-@@ -143,7 +148,7 @@ static __inline__ int DQUOT_OFF(struct s
- {
- 	int ret = -ENOSYS;
- 
--	if (sb->s_qcop && sb->s_qcop->quota_off)
-+	if (sb_any_quota_enabled(sb) && sb->s_qcop && sb->s_qcop->quota_off)
- 		ret = sb->s_qcop->quota_off(sb, -1);
- 	return ret;
- }
-Index: linux-2.6.5-7.283/include/linux/security.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/linux/security.h
-+++ linux-2.6.5-7.283/include/linux/security.h
-@@ -1020,7 +1020,7 @@ struct security_operations {
- 	int (*sysctl) (ctl_table * table, int op);
- 	int (*capable) (struct task_struct * tsk, int cap);
- 	int (*quotactl) (int cmds, int type, int id, struct super_block * sb);
--	int (*quota_on) (struct file * f);
-+	int (*quota_on) (struct dentry * dentry);
- 	int (*syslog) (int type);
- 	int (*vm_enough_memory) (long pages);
- 
-@@ -1292,9 +1292,9 @@ static inline int security_quotactl (int
- 			 0);
- }
- 
--static inline int security_quota_on (struct file * file)
-+static inline int security_quota_on (struct dentry * dentry)
- {
--	return COND_SECURITY(quota_on (file), 
-+	return COND_SECURITY(quota_on (dentry), 
- 			 0);
- }
- 
-Index: linux-2.6.5-7.283/security/dummy.c
-===================================================================
---- linux-2.6.5-7.283.orig/security/dummy.c
-+++ linux-2.6.5-7.283/security/dummy.c
-@@ -90,7 +90,7 @@ static int dummy_quotactl (int cmds, int
- 	return 0;
- }
- 
--static int dummy_quota_on (struct file *f)
-+static int dummy_quota_on (struct dentry *dentry)
- {
- 	return 0;
- }
-Index: linux-2.6.5-7.283/security/selinux/hooks.c
-===================================================================
---- linux-2.6.5-7.283.orig/security/selinux/hooks.c
-+++ linux-2.6.5-7.283/security/selinux/hooks.c
-@@ -1454,9 +1454,9 @@ static int selinux_quotactl(int cmds, in
- 	return rc;
- }
- 
--static int selinux_quota_on(struct file *f)
-+static int selinux_quota_on(struct dentry *dentry)
- {
--	return file_has_perm(current, f, FILE__QUOTAON);
-+	return dentry_has_perm(current, NULL, dentry, FILE__QUOTAON);
- }
- 
- static int selinux_syslog(int type)
-Index: linux-2.6.5-7.283/fs/dquot.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/dquot.c
-+++ linux-2.6.5-7.283/fs/dquot.c
-@@ -52,6 +52,9 @@
-  *		New SMP locking.
-  *		Jan Kara, <jack@suse.cz>, 10/2002
-  *
-+ *		Fix lock inversion problems
-+ *		Jan Kara, <jack@suse.cz>, 2003,2004
-+ *
-  * (C) Copyright 1994 - 1997 Marco van Wieringen 
-  */
- 
-@@ -75,7 +78,8 @@
- #include <linux/proc_fs.h>
- #include <linux/security.h>
- #include <linux/kmod.h>
--#include <linux/pagemap.h>
-+#include <linux/namei.h>
-+#include <linux/buffer_head.h>
- 
- #include <asm/uaccess.h>
- 
-@@ -109,7 +113,7 @@
-  * dqget(). Write operations on dquots don't hold dq_lock as they copy data
-  * under dq_data_lock spinlock to internal buffers before writing.
-  *
-- * Lock ordering (including journal_lock) is following:
-+ * Lock ordering (including journal_lock) is the following:
-  *  dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > dqio_sem
-  */
- spinlock_t dq_list_lock = SPIN_LOCK_UNLOCKED;
-@@ -175,8 +179,7 @@ static void put_quota_format(struct quot
-  * on all three lists, depending on its current state.
-  *
-  * All dquots are placed to the end of inuse_list when first created, and this
-- * list is used for the sync and invalidate operations, which must look
-- * at every dquot.
-+ * list is used for invalidate operation, which must look at every dquot.
-  *
-  * Unused dquots (dq_count == 0) are added to the free_dquots list when freed,
-  * and this list is searched whenever we need an available dquot.  Dquots are
-@@ -264,30 +267,105 @@ static void wait_on_dquot(struct dquot *
- 	up(&dquot->dq_lock);
- }
- 
--static int read_dqblk(struct dquot *dquot)
-+void mark_info_dirty(struct super_block *sb, int type)
- {
--	int ret;
-+	set_bit(DQF_INFO_DIRTY_B, &sb_dqopt(sb)->info[type].dqi_flags);
-+}
-+EXPORT_SYMBOL(mark_info_dirty);
-+
-+/*
-+ *	Read dquot from disk and alloc space for it
-+ */
-+
-+int dquot_acquire(struct dquot *dquot)
-+{
-+	int ret = 0, ret2 = 0;
- 	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
- 
- 	down(&dquot->dq_lock);
- 	down(&dqopt->dqio_sem);
--	ret = dqopt->ops[dquot->dq_type]->read_dqblk(dquot);
-+	if (!test_bit(DQ_READ_B, &dquot->dq_flags))
-+		ret = dqopt->ops[dquot->dq_type]->read_dqblk(dquot);
-+	if (ret < 0)
-+		goto out_iolock;
-+	set_bit(DQ_READ_B, &dquot->dq_flags);
-+	/* Instantiate dquot if needed */
-+	if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && !dquot->dq_off) {
-+		ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
-+		/* Write the info if needed */
-+		if (info_dirty(&dqopt->info[dquot->dq_type]))
-+			ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type);
-+		if (ret < 0)
-+			goto out_iolock;
-+		if (ret2 < 0) {
-+			ret = ret2;
-+			goto out_iolock;
-+		}
-+	}
-+	set_bit(DQ_ACTIVE_B, &dquot->dq_flags);
-+out_iolock:
- 	up(&dqopt->dqio_sem);
- 	up(&dquot->dq_lock);
- 	return ret;
- }
- 
--static int commit_dqblk(struct dquot *dquot)
-+/*
-+ *	Write dquot to disk
-+ */
-+int dquot_commit(struct dquot *dquot)
- {
--	int ret;
-+	int ret = 0, ret2 = 0;
- 	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
- 
- 	down(&dqopt->dqio_sem);
--	ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
-+	spin_lock(&dq_list_lock);
-+	if (!test_and_clear_bit(DQ_MOD_B, &dquot->dq_flags)) {
-+		spin_unlock(&dq_list_lock);
-+		goto out_sem;
-+	}
-+	spin_unlock(&dq_list_lock);
-+	/* Inactive dquot can be only if there was error during read/init
-+	 * => we have better not writing it */
-+	if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
-+		ret = dqopt->ops[dquot->dq_type]->commit_dqblk(dquot);
-+		if (info_dirty(&dqopt->info[dquot->dq_type]))
-+			ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type);
-+		if (ret >= 0)
-+			ret = ret2;
-+	}
-+out_sem:
- 	up(&dqopt->dqio_sem);
- 	return ret;
- }
- 
-+/*
-+ *	Release dquot
-+ */
-+int dquot_release(struct dquot *dquot)
-+{
-+	int ret = 0, ret2 = 0;
-+	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
-+
-+	down(&dquot->dq_lock);
-+	/* Check whether we are not racing with some other dqget() */
-+	if (atomic_read(&dquot->dq_count) > 1)
-+		goto out_dqlock;
-+	down(&dqopt->dqio_sem);
-+	if (dqopt->ops[dquot->dq_type]->release_dqblk) {
-+		ret = dqopt->ops[dquot->dq_type]->release_dqblk(dquot);
-+		/* Write the info */
-+		if (info_dirty(&dqopt->info[dquot->dq_type]))
-+			ret2 = dqopt->ops[dquot->dq_type]->write_file_info(dquot->dq_sb, dquot->dq_type);
-+		if (ret >= 0)
-+			ret = ret2;
-+	}
-+	clear_bit(DQ_ACTIVE_B, &dquot->dq_flags);
-+	up(&dqopt->dqio_sem);
-+out_dqlock:
-+	up(&dquot->dq_lock);
-+	return ret;
-+}
-+
- /* Invalidate all dquots on the list. Note that this function is called after
-  * quota is disabled so no new quota might be created. Because we hold
-  * dqonoff_sem and pointers were already removed from inodes we actually know
-@@ -343,6 +421,11 @@ restart:
- 			continue;
- 		if (!dquot_dirty(dquot))
- 			continue;
-+		/* Dirty and inactive can be only bad dquot... */
-+		if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
-+			test_and_clear_bit(DQ_MOD_B, &dquot->dq_flags);
-+			continue;
-+		}			
- 		atomic_inc(&dquot->dq_count);
- 		dqstats.lookups++;
- 		spin_unlock(&dq_list_lock);
-@@ -353,11 +436,9 @@ restart:
- 	spin_unlock(&dq_list_lock);
- 
- 	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
--		if ((cnt == type || type == -1) && sb_has_quota_enabled(sb, cnt) && info_dirty(&dqopt->info[cnt])) {
--			down(&dqopt->dqio_sem);
--			dqopt->ops[cnt]->write_file_info(sb, cnt);
--			up(&dqopt->dqio_sem);
--		}
-+		if ((cnt == type || type == -1) && sb_has_quota_enabled(sb, cnt) 
-+				&& info_dirty(&dqopt->info[cnt]))
-+			sb->dq_op->write_info(sb, cnt);
- 	spin_lock(&dq_list_lock);
- 	dqstats.syncs++;
- 	spin_unlock(&dq_list_lock);
-@@ -432,11 +513,19 @@ we_slept:
- 		spin_unlock(&dq_list_lock);
- 		return;
- 	}
--	if (dquot_dirty(dquot)) {
-+	if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && dquot_dirty(dquot)) {
- 		spin_unlock(&dq_list_lock);
- 		dquot->dq_sb->dq_op->write_dquot(dquot);
- 		goto we_slept;
- 	}
-+	/* Clear flag in case dquot was inactive (something bad happened) */
-+	test_and_clear_bit(DQ_MOD_B, &dquot->dq_flags);
-+	if (test_bit(DQ_ACTIVE_B, &dquot->dq_flags)) {
-+		spin_unlock(&dq_list_lock);
-+		dquot->dq_sb->dq_op->release_dquot(dquot);
-+		goto we_slept;
-+	}
-+			
- 	atomic_dec(&dquot->dq_count);
- #ifdef __DQUOT_PARANOIA
- 	/* sanity check */
-@@ -495,7 +584,6 @@ we_slept:
- 		insert_dquot_hash(dquot);
- 		dqstats.lookups++;
- 		spin_unlock(&dq_list_lock);
--		read_dqblk(dquot);
- 	} else {
- 		if (!atomic_read(&dquot->dq_count))
- 			remove_free_dquot(dquot);
-@@ -503,10 +591,15 @@ we_slept:
- 		dqstats.cache_hits++;
- 		dqstats.lookups++;
- 		spin_unlock(&dq_list_lock);
--		wait_on_dquot(dquot);
- 		if (empty)
- 			kmem_cache_free(dquot_cachep, empty);
- 	}
-+	wait_on_dquot(dquot);
-+	/* Read the dquot and instantiate it (everything done only if needed) */
-+	if (!test_bit(DQ_ACTIVE_B, &dquot->dq_flags) && sb->dq_op->acquire_dquot(dquot) < 0) {
-+		dqput(dquot);
-+		return NODQUOT;
-+	}
- 
- #ifdef __DQUOT_PARANOIA
- 	if (!dquot->dq_sb)	/* Has somebody invalidated entry under us? */
-@@ -819,19 +912,19 @@ static int check_bdq(struct dquot *dquot
-  *
-  * Note: this is a blocking operation.
-  */
--void dquot_initialize(struct inode *inode, int type)
-+int dquot_initialize(struct inode *inode, int type)
- {
- 	unsigned int id = 0;
- 	int cnt;
- 
- 	/* Solve deadlock when we recurse when holding dqptr_sem... */
- 	if (IS_NOQUOTA(inode))
--		return;
-+		return 0;
- 	down_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
- 	/* Having dqptr_sem we know NOQUOTA flags can't be altered... */
- 	if (IS_NOQUOTA(inode)) {
- 		up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
--		return;
-+		return 0;
- 	}
- 	/* Build list of quotas to initialize... */
- 	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-@@ -852,13 +945,14 @@ void dquot_initialize(struct inode *inod
- 		}
- 	}
- 	up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
-+	return 0;
- }
- 
- /*
-  * 	Release all quotas referenced by inode
-  *	Needs dqonoff_sem to guard dqput()
-  */
--void dquot_drop(struct inode *inode)
-+int dquot_drop(struct inode *inode)
- {
- 	int cnt;
- 
-@@ -871,6 +965,7 @@ void dquot_drop(struct inode *inode)
- 		}
- 	}
- 	up_write(&sb_dqopt(inode->i_sb)->dqptr_sem);
-+	return 0;
- }
- 
- /*
-@@ -958,14 +1053,14 @@ warn_put_all:
- /*
-  * This is a non-blocking operation.
-  */
--void dquot_free_space(struct inode *inode, qsize_t number)
-+int dquot_free_space(struct inode *inode, qsize_t number)
- {
- 	unsigned int cnt;
- 
- 	/* Solve deadlock when we recurse when holding dqptr_sem... */
- 	if (IS_NOQUOTA(inode)) {
- 		inode_add_bytes(inode, number);
--		return;
-+		return QUOTA_OK;
- 	}
- 	down_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
- 	spin_lock(&dq_data_lock);
-@@ -981,23 +1076,24 @@ sub_bytes:
- 	inode_sub_bytes(inode, number);
- 	spin_unlock(&dq_data_lock);
- 	up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
-+	return QUOTA_OK;
- }
- 
- /*
-  * This is a non-blocking operation.
-  */
--void dquot_free_inode(const struct inode *inode, unsigned long number)
-+int dquot_free_inode(const struct inode *inode, unsigned long number)
- {
- 	unsigned int cnt;
- 
- 	/* Solve deadlock when we recurse when holding dqptr_sem... */
- 	if (IS_NOQUOTA(inode))
--		return;
-+		return QUOTA_OK;
- 	down_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
- 	/* Now recheck reliably when holding dqptr_sem */
- 	if (IS_NOQUOTA(inode)) {
- 		up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
--		return;
-+		return QUOTA_OK;
- 	}
- 	spin_lock(&dq_data_lock);
- 	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-@@ -1007,6 +1103,7 @@ void dquot_free_inode(const struct inode
- 	}
- 	spin_unlock(&dq_data_lock);
- 	up_read(&sb_dqopt(inode->i_sb)->dqptr_sem);
-+	return QUOTA_OK;
- }
- 
- /*
-@@ -1104,6 +1201,20 @@ warn_put_all:
- }
- 
- /*
-+ * Write info of quota file to disk
-+ */
-+int dquot_commit_info(struct super_block *sb, int type)
-+{
-+	int ret;
-+	struct quota_info *dqopt = sb_dqopt(sb);
-+
-+	down(&dqopt->dqio_sem);
-+	ret = dqopt->ops[type]->write_file_info(sb, type);
-+	up(&dqopt->dqio_sem);
-+	return ret;
-+}
-+
-+/*
-  * Definitions of diskquota operations.
-  */
- struct dquot_operations dquot_operations = {
-@@ -1114,7 +1225,10 @@ struct dquot_operations dquot_operations
- 	.free_space	= dquot_free_space,
- 	.free_inode	= dquot_free_inode,
- 	.transfer	= dquot_transfer,
--	.write_dquot	= commit_dqblk
-+	.write_dquot	= dquot_commit,
-+	.acquire_dquot  = dquot_acquire,
-+	.release_dquot	= dquot_release,
-+	.write_info     = dquot_commit_info				
- };
- 
- /* Function used by filesystems for initializing the dquot_operations structure */
-@@ -1154,13 +1268,14 @@ int vfs_quota_off(struct super_block *sb
- {
- 	int cnt;
- 	struct quota_info *dqopt = sb_dqopt(sb);
--
--	if (!sb)
--		goto out;
-+	struct inode *toputinode[MAXQUOTAS];
-+	struct vfsmount *toputmnt[MAXQUOTAS];
- 
- 	/* We need to serialize quota_off() for device */
- 	down(&dqopt->dqonoff_sem);
- 	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-+		toputinode[cnt] = NULL;
-+		toputmnt[cnt] = NULL;
- 		if (type != -1 && cnt != type)
- 			continue;
- 		if (!sb_has_quota_enabled(sb, cnt))
-@@ -1172,94 +1287,115 @@ int vfs_quota_off(struct super_block *sb
- 		invalidate_dquots(sb, cnt);
- 		/*
- 		 * Now all dquots should be invalidated, all writes done so we should be only
--		 * users of the info. No locks needed.
-+		 * users of the info.
- 		 */
--		if (info_dirty(&dqopt->info[cnt])) {
--			down(&dqopt->dqio_sem);
--			dqopt->ops[cnt]->write_file_info(sb, cnt);
--			up(&dqopt->dqio_sem);
--		}
-+		if (info_dirty(&dqopt->info[cnt]))
-+			sb->dq_op->write_info(sb, cnt);
- 		if (dqopt->ops[cnt]->free_file_info)
- 			dqopt->ops[cnt]->free_file_info(sb, cnt);
- 		put_quota_format(dqopt->info[cnt].dqi_format);
- 
--		fput(dqopt->files[cnt]);
--		dqopt->files[cnt] = (struct file *)NULL;
-+		toputinode[cnt] = dqopt->files[cnt];
-+		toputmnt[cnt] = dqopt->mnt[cnt];
-+		dqopt->files[cnt] = NULL;
-+		dqopt->mnt[cnt] = NULL;
- 		dqopt->info[cnt].dqi_flags = 0;
- 		dqopt->info[cnt].dqi_igrace = 0;
- 		dqopt->info[cnt].dqi_bgrace = 0;
- 		dqopt->ops[cnt] = NULL;
- 	}
- 	up(&dqopt->dqonoff_sem);
--out:
-+	/* Sync the superblock so that buffers with quota data are written to
-+	 * disk (and so userspace sees correct data afterwards).
-+	 * The reference to vfsmnt we are still holding protects us from
-+	 * umount (we don't have it only when quotas are turned on/off for
-+	 * journal replay but in that case we are guarded by the fs anyway). */
-+	if (sb->s_op->sync_fs)
-+		sb->s_op->sync_fs(sb, 1);
-+	sync_blockdev(sb->s_bdev);
-+	/* Now the quota files are just ordinary files and we can set the
-+	 * inode flags back. Moreover we discard the pagecache so that
-+	 * userspace sees the writes we did bypassing the pagecache. We
-+	 * must also discard the blockdev buffers so that we see the
-+	 * changes done by userspace on the next quotaon() */
-+	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
-+		if (toputinode[cnt]) {
-+			down(&dqopt->dqonoff_sem);
-+			/* If quota was reenabled in the meantime, we have
-+			 * nothing to do */
-+			if (!sb_has_quota_enabled(sb, cnt)) {
-+				down(&toputinode[cnt]->i_sem);
-+				toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
-+				  S_NOATIME | S_NOQUOTA);
-+				truncate_inode_pages(&toputinode[cnt]->i_data, 0);
-+				up(&toputinode[cnt]->i_sem);
-+				mark_inode_dirty(toputinode[cnt]);
-+				iput(toputinode[cnt]);
-+			}
-+			up(&dqopt->dqonoff_sem);
-+			/* We don't hold the reference when we turned on quotas
-+			 * just for the journal replay... */
-+			if (toputmnt[cnt])
-+				mntput(toputmnt[cnt]);
-+		}
-+	invalidate_bdev(sb->s_bdev, 0);
- 	return 0;
- }
- 
--int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
-+/*
-+ *	Turn quotas on on a device
-+ */
-+
-+/* Helper function when we already have the inode */
-+static int vfs_quota_on_inode(struct inode *inode, int type, int format_id)
- {
--	struct file *f;
--	struct inode *inode;
--	struct quota_info *dqopt = sb_dqopt(sb);
- 	struct quota_format_type *fmt = find_quota_format(format_id);
--	int error, cnt;
--	struct dquot *to_drop[MAXQUOTAS];
--	unsigned int oldflags;
-+	struct super_block *sb = inode->i_sb;
-+	struct quota_info *dqopt = sb_dqopt(sb);
-+	int error;
-+	int oldflags = -1;
- 
- 	if (!fmt)
- 		return -ESRCH;
--	f = filp_open(path, O_RDWR, 0600);
--	if (IS_ERR(f)) {
--		error = PTR_ERR(f);
-+	if (!S_ISREG(inode->i_mode)) {
-+		error = -EACCES;
-+		goto out_fmt;
-+	}
-+	if (IS_RDONLY(inode)) {
-+		error = -EROFS;
-+		goto out_fmt;
-+	}
-+	if (!sb->s_op->quota_write || !sb->s_op->quota_read) {
-+		error = -EINVAL;
- 		goto out_fmt;
- 	}
--	error = -EIO;
--	if (!f->f_op || !f->f_op->read || !f->f_op->write)
--		goto out_f;
--	error = security_quota_on(f);
--	if (error)
--		goto out_f;
--	inode = f->f_dentry->d_inode;
--	error = -EACCES;
--	if (!S_ISREG(inode->i_mode))
--		goto out_f;
- 
-+	/* As we bypass the pagecache we must now flush the inode so that
-+	 * we see all the changes from userspace... */
-+	write_inode_now(inode, 1);
-+	/* And now flush the block cache so that kernel sees the changes */
-+	invalidate_bdev(sb->s_bdev, 0);
-+	down(&inode->i_sem);
- 	down(&dqopt->dqonoff_sem);
- 	if (sb_has_quota_enabled(sb, type)) {
- 		error = -EBUSY;
- 		goto out_lock;
- 	}
--	oldflags = inode->i_flags;
--	dqopt->files[type] = f;
--	error = -EINVAL;
--	if (!fmt->qf_ops->check_quota_file(sb, type))
--		goto out_file_init;
- 	/* We don't want quota and atime on quota files (deadlocks possible)
--	 * We also need to set GFP mask differently because we cannot recurse
--	 * into filesystem when allocating page for quota inode */
-+	 * Also nobody should write to the file - we use special IO operations
-+	 * which ignore the immutable bit. */
- 	down_write(&dqopt->dqptr_sem);
--	inode->i_flags |= S_NOQUOTA | S_NOATIME;
--
--	/*
--	 * We write to quota files deep within filesystem code.  We don't want
--	 * the VFS to reenter filesystem code when it tries to allocate a
--	 * pagecache page for the quota file write.  So clear __GFP_FS in
--	 * the quota file's allocation flags.
--	 */
--	mapping_set_gfp_mask(inode->i_mapping,
--		mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
--
--	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
--		to_drop[cnt] = inode->i_dquot[cnt];
--		inode->i_dquot[cnt] = NODQUOT;
--	}
--	inode->i_flags &= ~S_QUOTA;
-+	oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA);
-+	inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
- 	up_write(&dqopt->dqptr_sem);
--	/* We must put dquots outside of dqptr_sem because we may need to
--	 * start transaction for write */
--	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
--		if (to_drop[cnt])
--			dqput(to_drop[cnt]);
--	}
-+
-+	error = -EIO;
-+	dqopt->files[type] = igrab(inode);
-+	if (!dqopt->files[type])
-+		goto out_lock;
-+	error = -EINVAL;
-+	if (!fmt->qf_ops->check_quota_file(sb, type))
-+		goto out_file_init;
- 
- 	dqopt->ops[type] = fmt->qf_ops;
- 	dqopt->info[type].dqi_format = fmt;
-@@ -1269,6 +1405,7 @@ int vfs_quota_on(struct super_block *sb,
- 		goto out_file_init;
- 	}
- 	up(&dqopt->dqio_sem);
-+	up(&inode->i_sem);
- 	set_enable_flags(dqopt, type);
- 
- 	add_dquot_ref(sb, type);
-@@ -1277,18 +1414,51 @@ int vfs_quota_on(struct super_block *sb,
- 	return 0;
- 
- out_file_init:
--	inode->i_flags = oldflags;
- 	dqopt->files[type] = NULL;
-+	iput(inode);
- out_lock:
- 	up(&dqopt->dqonoff_sem);
--out_f:
--	filp_close(f, NULL);
-+	if (oldflags != -1) {
-+		down_write(&dqopt->dqptr_sem);
-+		/* Set the flags back (in the case of accidental quotaon()
-+		 * on a wrong file we don't want to mess up the flags) */
-+		inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE);
-+		inode->i_flags |= oldflags;
-+		up_write(&dqopt->dqptr_sem);
-+	}
-+	up(&inode->i_sem);
- out_fmt:
- 	put_quota_format(fmt);
- 
- 	return error; 
- }
- 
-+/* Actual function called from quotactl() */
-+int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
-+{
-+	struct nameidata nd;
-+	int error;
-+
-+	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
-+	if (error < 0)
-+		return error;
-+	error = security_quota_on(nd.dentry);
-+	if (error)
-+		goto out_path;
-+	/* Quota file not on the same filesystem? */
-+	if (nd.mnt->mnt_sb != sb)
-+		error = -EXDEV;
-+	else {
-+		error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id);
-+		if (!error)
-+			sb_dqopt(sb)->mnt[type] = mntget(nd.mnt);
-+	}
-+
-+out_path:
-+	path_release(&nd);
-+	return error;
-+}
-+
- /* Generic routine for getting common part of quota structure */
- static void do_get_dqblk(struct dquot *dquot, struct if_dqblk *di)
- {
-@@ -1430,8 +1600,10 @@ int vfs_set_dqinfo(struct super_block *s
- 		mi->dqi_igrace = ii->dqi_igrace;
- 	if (ii->dqi_valid & IIF_FLAGS)
- 		mi->dqi_flags = (mi->dqi_flags & ~DQF_MASK) | (ii->dqi_flags & DQF_MASK);
--	mark_info_dirty(mi);
- 	spin_unlock(&dq_data_lock);
-+	mark_info_dirty(sb, type);
-+	/* Force write to disk */
-+	sb->dq_op->write_info(sb, type);
- 	up(&sb_dqopt(sb)->dqonoff_sem);
- 	return 0;
- }
-@@ -1564,3 +1736,15 @@ EXPORT_SYMBOL(dqstats);
- EXPORT_SYMBOL(dq_list_lock);
- EXPORT_SYMBOL(dq_data_lock);
- EXPORT_SYMBOL(init_dquot_operations);
-+EXPORT_SYMBOL(dquot_commit);
-+EXPORT_SYMBOL(dquot_commit_info);
-+EXPORT_SYMBOL(dquot_acquire);
-+EXPORT_SYMBOL(dquot_release);
-+EXPORT_SYMBOL(dquot_initialize);
-+EXPORT_SYMBOL(dquot_drop);
-+EXPORT_SYMBOL(dquot_alloc_space);
-+EXPORT_SYMBOL(dquot_alloc_inode);
-+EXPORT_SYMBOL(dquot_free_space);
-+EXPORT_SYMBOL(dquot_free_inode);
-+EXPORT_SYMBOL(dquot_transfer);
-+
-Index: linux-2.6.5-7.283/fs/quota_v2.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/quota_v2.c
-+++ linux-2.6.5-7.283/fs/quota_v2.c
-@@ -13,7 +13,6 @@
- #include <linux/slab.h>
- 
- #include <asm/byteorder.h>
--#include <asm/uaccess.h>
- 
- MODULE_AUTHOR("Jan Kara");
- MODULE_DESCRIPTION("Quota format v2 support");
-@@ -30,19 +29,15 @@ typedef char *dqbuf_t;
- static int v2_check_quota_file(struct super_block *sb, int type)
- {
- 	struct v2_disk_dqheader dqhead;
--	struct file *f = sb_dqopt(sb)->files[type];
--	mm_segment_t fs;
- 	ssize_t size;
--	loff_t offset = 0;
- 	static const uint quota_magics[] = V2_INITQMAGICS;
- 	static const uint quota_versions[] = V2_INITQVERSIONS;
-  
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset);
--	set_fs(fs);
--	if (size != sizeof(struct v2_disk_dqheader))
-+	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
-+	if (size != sizeof(struct v2_disk_dqheader)) {
-+		printk("failed read\n");
- 		return 0;
-+	}
- 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
- 	    le32_to_cpu(dqhead.dqh_version) != quota_versions[type])
- 		return 0;
-@@ -52,20 +47,15 @@ static int v2_check_quota_file(struct su
- /* Read information header from quota file */
- static int v2_read_file_info(struct super_block *sb, int type)
- {
--	mm_segment_t fs;
- 	struct v2_disk_dqinfo dinfo;
- 	struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
--	struct file *f = sb_dqopt(sb)->files[type];
- 	ssize_t size;
--	loff_t offset = V2_DQINFOOFF;
- 
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->read(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset);
--	set_fs(fs);
-+	size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
-+			sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
- 	if (size != sizeof(struct v2_disk_dqinfo)) {
- 		printk(KERN_WARNING "Can't read info structure on device %s.\n",
--			f->f_vfsmnt->mnt_sb->s_id);
-+			sb->s_id);
- 		return -1;
- 	}
- 	info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
-@@ -80,12 +70,9 @@ static int v2_read_file_info(struct supe
- /* Write information header to quota file */
- static int v2_write_file_info(struct super_block *sb, int type)
- {
--	mm_segment_t fs;
- 	struct v2_disk_dqinfo dinfo;
- 	struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
--	struct file *f = sb_dqopt(sb)->files[type];
- 	ssize_t size;
--	loff_t offset = V2_DQINFOOFF;
- 
- 	info->dqi_flags &= ~DQF_INFO_DIRTY;
- 	dinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace);
-@@ -94,13 +81,13 @@ static int v2_write_file_info(struct sup
- 	dinfo.dqi_blocks = cpu_to_le32(info->u.v2_i.dqi_blocks);
- 	dinfo.dqi_free_blk = cpu_to_le32(info->u.v2_i.dqi_free_blk);
- 	dinfo.dqi_free_entry = cpu_to_le32(info->u.v2_i.dqi_free_entry);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->write(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset);
--	set_fs(fs);
-+	
-+	size = sb->s_op->quota_write(sb, type, (char *)&dinfo,
-+			sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
-+
- 	if (size != sizeof(struct v2_disk_dqinfo)) {
- 		printk(KERN_WARNING "Can't write info structure on device %s.\n",
--			f->f_vfsmnt->mnt_sb->s_id);
-+			sb->s_id);
- 		return -1;
- 	}
- 	return 0;
-@@ -144,38 +131,24 @@ static inline void freedqbuf(dqbuf_t buf
- 	kfree(buf);
- }
- 
--static ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf)
-+static inline ssize_t read_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
- {
--	mm_segment_t fs;
--	ssize_t ret;
--	loff_t offset = blk<<V2_DQBLKSIZE_BITS;
--
- 	memset(buf, 0, V2_DQBLKSIZE);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	ret = filp->f_op->read(filp, (char *)buf, V2_DQBLKSIZE, &offset);
--	set_fs(fs);
--	return ret;
-+	return sb->s_op->quota_read(sb, type, (char *)buf,
-+			V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
- }
- 
--static ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf)
-+static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
- {
--	mm_segment_t fs;
--	ssize_t ret;
--	loff_t offset = blk<<V2_DQBLKSIZE_BITS;
--
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	ret = filp->f_op->write(filp, (char *)buf, V2_DQBLKSIZE, &offset);
--	set_fs(fs);
--	return ret;
--
-+	return sb->s_op->quota_write(sb, type, (char *)buf,
-+			V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
- }
- 
- /* Remove empty block from list and return it */
--static int get_free_dqblk(struct file *filp, struct mem_dqinfo *info)
-+static int get_free_dqblk(struct super_block *sb, int type)
- {
- 	dqbuf_t buf = getdqbuf();
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	int ret, blk;
- 
-@@ -183,17 +156,18 @@ static int get_free_dqblk(struct file *f
- 		return -ENOMEM;
- 	if (info->u.v2_i.dqi_free_blk) {
- 		blk = info->u.v2_i.dqi_free_blk;
--		if ((ret = read_blk(filp, blk, buf)) < 0)
-+		if ((ret = read_blk(sb, type, blk, buf)) < 0)
- 			goto out_buf;
- 		info->u.v2_i.dqi_free_blk = le32_to_cpu(dh->dqdh_next_free);
- 	}
- 	else {
- 		memset(buf, 0, V2_DQBLKSIZE);
--		if ((ret = write_blk(filp, info->u.v2_i.dqi_blocks, buf)) < 0)	/* Assure block allocation... */
-+		/* Assure block allocation... */
-+		if ((ret = write_blk(sb, type, info->u.v2_i.dqi_blocks, buf)) < 0)
- 			goto out_buf;
- 		blk = info->u.v2_i.dqi_blocks++;
- 	}
--	mark_info_dirty(info);
-+	mark_info_dirty(sb, type);
- 	ret = blk;
- out_buf:
- 	freedqbuf(buf);
-@@ -201,8 +175,9 @@ out_buf:
- }
- 
- /* Insert empty block to the list */
--static int put_free_dqblk(struct file *filp, struct mem_dqinfo *info, dqbuf_t buf, uint blk)
-+static int put_free_dqblk(struct super_block *sb, int type, dqbuf_t buf, uint blk)
- {
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	int err;
- 
-@@ -210,16 +185,18 @@ static int put_free_dqblk(struct file *f
- 	dh->dqdh_prev_free = cpu_to_le32(0);
- 	dh->dqdh_entries = cpu_to_le16(0);
- 	info->u.v2_i.dqi_free_blk = blk;
--	mark_info_dirty(info);
--	if ((err = write_blk(filp, blk, buf)) < 0)	/* Some strange block. We had better leave it... */
-+	mark_info_dirty(sb, type);
-+	/* Some strange block. We had better leave it... */
-+	if ((err = write_blk(sb, type, blk, buf)) < 0)
- 		return err;
- 	return 0;
- }
- 
- /* Remove given block from the list of blocks with free entries */
--static int remove_free_dqentry(struct file *filp, struct mem_dqinfo *info, dqbuf_t buf, uint blk)
-+static int remove_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk)
- {
- 	dqbuf_t tmpbuf = getdqbuf();
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = le32_to_cpu(dh->dqdh_prev_free);
- 	int err;
-@@ -227,26 +204,27 @@ static int remove_free_dqentry(struct fi
- 	if (!tmpbuf)
- 		return -ENOMEM;
- 	if (nextblk) {
--		if ((err = read_blk(filp, nextblk, tmpbuf)) < 0)
-+		if ((err = read_blk(sb, type, nextblk, tmpbuf)) < 0)
- 			goto out_buf;
- 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = dh->dqdh_prev_free;
--		if ((err = write_blk(filp, nextblk, tmpbuf)) < 0)
-+		if ((err = write_blk(sb, type, nextblk, tmpbuf)) < 0)
- 			goto out_buf;
- 	}
- 	if (prevblk) {
--		if ((err = read_blk(filp, prevblk, tmpbuf)) < 0)
-+		if ((err = read_blk(sb, type, prevblk, tmpbuf)) < 0)
- 			goto out_buf;
- 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_next_free = dh->dqdh_next_free;
--		if ((err = write_blk(filp, prevblk, tmpbuf)) < 0)
-+		if ((err = write_blk(sb, type, prevblk, tmpbuf)) < 0)
- 			goto out_buf;
- 	}
- 	else {
- 		info->u.v2_i.dqi_free_entry = nextblk;
--		mark_info_dirty(info);
-+		mark_info_dirty(sb, type);
- 	}
- 	freedqbuf(tmpbuf);
- 	dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0);
--	if (write_blk(filp, blk, buf) < 0)	/* No matter whether write succeeds block is out of list */
-+	/* No matter whether write succeeds block is out of list */
-+	if (write_blk(sb, type, blk, buf) < 0)
- 		printk(KERN_ERR "VFS: Can't write block (%u) with free entries.\n", blk);
- 	return 0;
- out_buf:
-@@ -255,9 +233,10 @@ out_buf:
- }
- 
- /* Insert given block to the beginning of list with free entries */
--static int insert_free_dqentry(struct file *filp, struct mem_dqinfo *info, dqbuf_t buf, uint blk)
-+static int insert_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk)
- {
- 	dqbuf_t tmpbuf = getdqbuf();
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	int err;
- 
-@@ -265,18 +244,18 @@ static int insert_free_dqentry(struct fi
- 		return -ENOMEM;
- 	dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry);
- 	dh->dqdh_prev_free = cpu_to_le32(0);
--	if ((err = write_blk(filp, blk, buf)) < 0)
-+	if ((err = write_blk(sb, type, blk, buf)) < 0)
- 		goto out_buf;
- 	if (info->u.v2_i.dqi_free_entry) {
--		if ((err = read_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
-+		if ((err = read_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
- 			goto out_buf;
- 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = cpu_to_le32(blk);
--		if ((err = write_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
-+		if ((err = write_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
- 			goto out_buf;
- 	}
- 	freedqbuf(tmpbuf);
- 	info->u.v2_i.dqi_free_entry = blk;
--	mark_info_dirty(info);
-+	mark_info_dirty(sb, type);
- 	return 0;
- out_buf:
- 	freedqbuf(tmpbuf);
-@@ -286,8 +265,8 @@ out_buf:
- /* Find space for dquot */
- static uint find_free_dqentry(struct dquot *dquot, int *err)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
--	struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info+dquot->dq_type;
-+	struct super_block *sb = dquot->dq_sb;
-+	struct mem_dqinfo *info = sb_dqopt(sb)->info+dquot->dq_type;
- 	uint blk, i;
- 	struct v2_disk_dqdbheader *dh;
- 	struct v2_disk_dqblk *ddquot;
-@@ -303,22 +282,23 @@ static uint find_free_dqentry(struct dqu
- 	ddquot = GETENTRIES(buf);
- 	if (info->u.v2_i.dqi_free_entry) {
- 		blk = info->u.v2_i.dqi_free_entry;
--		if ((*err = read_blk(filp, blk, buf)) < 0)
-+		if ((*err = read_blk(sb, dquot->dq_type, blk, buf)) < 0)
- 			goto out_buf;
- 	}
- 	else {
--		blk = get_free_dqblk(filp, info);
-+		blk = get_free_dqblk(sb, dquot->dq_type);
- 		if ((int)blk < 0) {
- 			*err = blk;
- 			freedqbuf(buf);
- 			return 0;
- 		}
- 		memset(buf, 0, V2_DQBLKSIZE);
--		info->u.v2_i.dqi_free_entry = blk;	/* This is enough as block is already zeroed and entry list is empty... */
--		mark_info_dirty(info);
-+		/* This is enough as block is already zeroed and entry list is empty... */
-+		info->u.v2_i.dqi_free_entry = blk;
-+		mark_info_dirty(sb, dquot->dq_type);
- 	}
- 	if (le16_to_cpu(dh->dqdh_entries)+1 >= V2_DQSTRINBLK)	/* Block will be full? */
--		if ((*err = remove_free_dqentry(filp, info, buf, blk)) < 0) {
-+		if ((*err = remove_free_dqentry(sb, dquot->dq_type, buf, blk)) < 0) {
- 			printk(KERN_ERR "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n", blk);
- 			goto out_buf;
- 		}
-@@ -333,7 +313,7 @@ static uint find_free_dqentry(struct dqu
- 		goto out_buf;
- 	}
- #endif
--	if ((*err = write_blk(filp, blk, buf)) < 0) {
-+	if ((*err = write_blk(sb, dquot->dq_type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: find_free_dqentry(): Can't write quota data block %u.\n", blk);
- 		goto out_buf;
- 	}
-@@ -348,8 +328,7 @@ out_buf:
- /* Insert reference to structure into the trie */
- static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
--	struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info + dquot->dq_type;
-+	struct super_block *sb = dquot->dq_sb;
- 	dqbuf_t buf;
- 	int ret = 0, newson = 0, newact = 0;
- 	u32 *ref;
-@@ -358,7 +337,7 @@ static int do_insert_tree(struct dquot *
- 	if (!(buf = getdqbuf()))
- 		return -ENOMEM;
- 	if (!*treeblk) {
--		ret = get_free_dqblk(filp, info);
-+		ret = get_free_dqblk(sb, dquot->dq_type);
- 		if (ret < 0)
- 			goto out_buf;
- 		*treeblk = ret;
-@@ -366,7 +345,7 @@ static int do_insert_tree(struct dquot *
- 		newact = 1;
- 	}
- 	else {
--		if ((ret = read_blk(filp, *treeblk, buf)) < 0) {
-+		if ((ret = read_blk(sb, dquot->dq_type, *treeblk, buf)) < 0) {
- 			printk(KERN_ERR "VFS: Can't read tree quota block %u.\n", *treeblk);
- 			goto out_buf;
- 		}
-@@ -389,10 +368,10 @@ static int do_insert_tree(struct dquot *
- 		ret = do_insert_tree(dquot, &newblk, depth+1);
- 	if (newson && ret >= 0) {
- 		ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk);
--		ret = write_blk(filp, *treeblk, buf);
-+		ret = write_blk(sb, dquot->dq_type, *treeblk, buf);
- 	}
- 	else if (newact && ret < 0)
--		put_free_dqblk(filp, info, buf, *treeblk);
-+		put_free_dqblk(sb, dquot->dq_type, buf, *treeblk);
- out_buf:
- 	freedqbuf(buf);
- 	return ret;
-@@ -411,19 +390,14 @@ static inline int dq_insert_tree(struct 
- static int v2_write_dquot(struct dquot *dquot)
- {
- 	int type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
--	loff_t offset;
- 	ssize_t ret;
- 	struct v2_disk_dqblk ddquot, empty;
- 
- 	if (!dquot->dq_off)
- 		if ((ret = dq_insert_tree(dquot)) < 0) {
--			printk(KERN_ERR "VFS: Error %Zd occurred while creating quota.\n", ret);
-+			printk(KERN_ERR "VFS: Error %d occurred while creating quota.\n", ret);
- 			return ret;
- 		}
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--	offset = dquot->dq_off;
- 	mem2diskdqb(&ddquot, &dquot->dq_dqb, dquot->dq_id);
- 	/* Argh... We may need to write structure full of zeroes but that would be
- 	 * treated as an empty place by the rest of the code. Format change would
-@@ -431,10 +405,10 @@ static int v2_write_dquot(struct dquot *
- 	memset(&empty, 0, sizeof(struct v2_disk_dqblk));
- 	if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
- 		ddquot.dqb_itime = cpu_to_le64(1);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	ret = filp->f_op->write(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset);
--	set_fs(fs);
-+	
-+	ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type,
-+			(char *)&ddquot, sizeof(struct v2_disk_dqblk), dquot->dq_off);
-+
- 	if (ret != sizeof(struct v2_disk_dqblk)) {
- 		printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", dquot->dq_sb->s_id);
- 		if (ret >= 0)
-@@ -450,8 +424,8 @@ static int v2_write_dquot(struct dquot *
- /* Free dquot entry in data block */
- static int free_dqentry(struct dquot *dquot, uint blk)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
--	struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info + dquot->dq_type;
-+	struct super_block *sb = dquot->dq_sb;
-+	int type = dquot->dq_type;
- 	struct v2_disk_dqdbheader *dh;
- 	dqbuf_t buf = getdqbuf();
- 	int ret = 0;
-@@ -459,34 +433,39 @@ static int free_dqentry(struct dquot *dq
- 	if (!buf)
- 		return -ENOMEM;
- 	if (dquot->dq_off >> V2_DQBLKSIZE_BITS != blk) {
--		printk(KERN_ERR "VFS: Quota structure has offset to other block (%u) than it should (%u).\n", blk, (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS));
-+		printk(KERN_ERR "VFS: Quota structure has offset to other "
-+				"block (%u) than it should (%u).\n", blk,
-+				(uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS));
- 		goto out_buf;
- 	}
--	if ((ret = read_blk(filp, blk, buf)) < 0) {
-+	if ((ret = read_blk(sb, type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota data block %u\n", blk);
- 		goto out_buf;
- 	}
- 	dh = (struct v2_disk_dqdbheader *)buf;
- 	dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)-1);
- 	if (!le16_to_cpu(dh->dqdh_entries)) {	/* Block got free? */
--		if ((ret = remove_free_dqentry(filp, info, buf, blk)) < 0 ||
--		    (ret = put_free_dqblk(filp, info, buf, blk)) < 0) {
--			printk(KERN_ERR "VFS: Can't move quota data block (%u) to free list.\n", blk);
-+		if ((ret = remove_free_dqentry(sb, type, buf, blk)) < 0 ||
-+				(ret = put_free_dqblk(sb, type, buf, blk)) < 0) {
-+			printk(KERN_ERR "VFS: Can't move quota data block (%u) "
-+					"to free list.\n", blk);
- 			goto out_buf;
- 		}
- 	}
- 	else {
--		memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, sizeof(struct v2_disk_dqblk));
-+		memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, 
-+				sizeof(struct v2_disk_dqblk));
- 		if (le16_to_cpu(dh->dqdh_entries) == V2_DQSTRINBLK-1) {
- 			/* Insert will write block itself */
--			if ((ret = insert_free_dqentry(filp, info, buf, blk)) < 0) {
-+			if ((ret = insert_free_dqentry(sb, type, buf, blk)) < 0) {
- 				printk(KERN_ERR "VFS: Can't insert quota data block (%u) to free entry list.\n", blk);
- 				goto out_buf;
- 			}
- 		}
- 		else
--			if ((ret = write_blk(filp, blk, buf)) < 0) {
--				printk(KERN_ERR "VFS: Can't write quota data block %u\n", blk);
-+			if ((ret = write_blk(sb, type, blk, buf)) < 0) {
-+				printk(KERN_ERR "VFS: Can't write quota data "
-+						"block %u\n", blk);
- 				goto out_buf;
- 			}
- 	}
-@@ -499,8 +478,8 @@ out_buf:
- /* Remove reference to dquot from tree */
- static int remove_tree(struct dquot *dquot, uint *blk, int depth)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
--	struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info + dquot->dq_type;
-+	struct super_block *sb = dquot->dq_sb;
-+	int type = dquot->dq_type;
- 	dqbuf_t buf = getdqbuf();
- 	int ret = 0;
- 	uint newblk;
-@@ -508,7 +487,7 @@ static int remove_tree(struct dquot *dqu
- 	
- 	if (!buf)
- 		return -ENOMEM;
--	if ((ret = read_blk(filp, *blk, buf)) < 0) {
-+	if ((ret = read_blk(sb, type, *blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota data block %u\n", *blk);
- 		goto out_buf;
- 	}
-@@ -524,12 +503,13 @@ static int remove_tree(struct dquot *dqu
- 		ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0);
- 		for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++);	/* Block got empty? */
- 		if (i == V2_DQBLKSIZE) {
--			put_free_dqblk(filp, info, buf, *blk);
-+			put_free_dqblk(sb, type, buf, *blk);
- 			*blk = 0;
- 		}
- 		else
--			if ((ret = write_blk(filp, *blk, buf)) < 0)
--				printk(KERN_ERR "VFS: Can't write quota tree block %u.\n", *blk);
-+			if ((ret = write_blk(sb, type, *blk, buf)) < 0)
-+				printk(KERN_ERR "VFS: Can't write quota tree "
-+						"block %u.\n", *blk);
- 	}
- out_buf:
- 	freedqbuf(buf);
-@@ -549,7 +529,6 @@ static int v2_delete_dquot(struct dquot 
- /* Find entry in block */
- static loff_t find_block_dqentry(struct dquot *dquot, uint blk)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
- 	dqbuf_t buf = getdqbuf();
- 	loff_t ret = 0;
- 	int i;
-@@ -557,27 +536,31 @@ static loff_t find_block_dqentry(struct 
- 
- 	if (!buf)
- 		return -ENOMEM;
--	if ((ret = read_blk(filp, blk, buf)) < 0) {
-+	if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
- 		goto out_buf;
- 	}
- 	if (dquot->dq_id)
--		for (i = 0; i < V2_DQSTRINBLK && le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++);
-+		for (i = 0; i < V2_DQSTRINBLK &&
-+				le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++);
- 	else {	/* ID 0 as a bit more complicated searching... */
- 		struct v2_disk_dqblk fakedquot;
- 
- 		memset(&fakedquot, 0, sizeof(struct v2_disk_dqblk));
- 		for (i = 0; i < V2_DQSTRINBLK; i++)
--			if (!le32_to_cpu(ddquot[i].dqb_id) && memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)))
-+			if (!le32_to_cpu(ddquot[i].dqb_id) &&
-+					memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)))
- 				break;
- 	}
- 	if (i == V2_DQSTRINBLK) {
--		printk(KERN_ERR "VFS: Quota for id %u referenced but not present.\n", dquot->dq_id);
-+		printk(KERN_ERR "VFS: Quota for id %u referenced "
-+				"but not present.\n", dquot->dq_id);
- 		ret = -EIO;
- 		goto out_buf;
- 	}
- 	else
--		ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk);
-+		ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct
-+				v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk);
- out_buf:
- 	freedqbuf(buf);
- 	return ret;
-@@ -586,14 +569,13 @@ out_buf:
- /* Find entry for given id in the tree */
- static loff_t find_tree_dqentry(struct dquot *dquot, uint blk, int depth)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
- 	dqbuf_t buf = getdqbuf();
- 	loff_t ret = 0;
- 	u32 *ref = (u32 *)buf;
- 
- 	if (!buf)
- 		return -ENOMEM;
--	if ((ret = read_blk(filp, blk, buf)) < 0) {
-+	if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
- 		goto out_buf;
- 	}
-@@ -619,16 +601,13 @@ static inline loff_t find_dqentry(struct
- static int v2_read_dquot(struct dquot *dquot)
- {
- 	int type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
- 	loff_t offset;
- 	struct v2_disk_dqblk ddquot, empty;
- 	int ret = 0;
- 
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--
- #ifdef __QUOTA_V2_PARANOIA
--	if (!filp || !dquot->dq_sb) {	/* Invalidated quota? */
-+	/* Invalidated quota? */
-+	if (!dquot->dq_sb || !dquot->dq_sb->s_op->quota_read) {
- 		printk(KERN_ERR "VFS: Quota invalidated while reading!\n");
- 		return -EIO;
- 	}
-@@ -636,7 +615,8 @@ static int v2_read_dquot(struct dquot *d
- 	offset = find_dqentry(dquot);
- 	if (offset <= 0) {	/* Entry not present? */
- 		if (offset < 0)
--			printk(KERN_ERR "VFS: Can't read quota structure for id %u.\n", dquot->dq_id);
-+			printk(KERN_ERR "VFS: Can't read quota "
-+			  "structure for id %u.\n", dquot->dq_id);
- 		dquot->dq_off = 0;
- 		dquot->dq_flags |= DQ_FAKE;
- 		memset(&dquot->dq_dqb, 0, sizeof(struct mem_dqblk));
-@@ -644,12 +624,13 @@ static int v2_read_dquot(struct dquot *d
- 	}
- 	else {
- 		dquot->dq_off = offset;
--		fs = get_fs();
--		set_fs(KERNEL_DS);
--		if ((ret = filp->f_op->read(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset)) != sizeof(struct v2_disk_dqblk)) {
-+		if ((ret = dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type,
-+		    (char *)&ddquot, sizeof(struct v2_disk_dqblk), offset))
-+		    != sizeof(struct v2_disk_dqblk)) {
- 			if (ret >= 0)
- 				ret = -EIO;
--			printk(KERN_ERR "VFS: Error while reading quota structure for id %u.\n", dquot->dq_id);
-+			printk(KERN_ERR "VFS: Error while reading quota "
-+			  "structure for id %u.\n", dquot->dq_id);
- 			memset(&ddquot, 0, sizeof(struct v2_disk_dqblk));
- 		}
- 		else {
-@@ -660,7 +641,6 @@ static int v2_read_dquot(struct dquot *d
- 			if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
- 				ddquot.dqb_itime = 0;
- 		}
--		set_fs(fs);
- 		disk2memdqb(&dquot->dq_dqb, &ddquot);
- 	}
- 	dqstats.reads++;
-@@ -668,15 +648,13 @@ static int v2_read_dquot(struct dquot *d
- 	return ret;
- }
- 
--/* Commit changes of dquot to disk - it might also mean deleting it when quota became fake one and user has no blocks... */
--static int v2_commit_dquot(struct dquot *dquot)
-+/* Check whether dquot should not be deleted. We know we are
-+ *  * the only one operating on dquot (thanks to dq_lock) */
-+static int v2_release_dquot(struct dquot *dquot)
- {
--	/* We clear the flag everytime so we don't loop when there was an IO error... */
--	dquot->dq_flags &= ~DQ_MOD;
--	if (dquot->dq_flags & DQ_FAKE && !(dquot->dq_dqb.dqb_curinodes | dquot->dq_dqb.dqb_curspace))
-+	if (test_bit(DQ_FAKE_B, &dquot->dq_flags) && !(dquot->dq_dqb.dqb_curinodes | dquot->dq_dqb.dqb_curspace))
- 		return v2_delete_dquot(dquot);
--	else
--		return v2_write_dquot(dquot);
-+	return 0;
- }
- 
- static struct quota_format_ops v2_format_ops = {
-@@ -685,7 +663,8 @@ static struct quota_format_ops v2_format
- 	.write_file_info	= v2_write_file_info,
- 	.free_file_info		= NULL,
- 	.read_dqblk		= v2_read_dquot,
--	.commit_dqblk		= v2_commit_dquot,
-+	.commit_dqblk		= v2_write_dquot,
-+	.release_dqblk          = v2_release_dquot,
- };
- 
- static struct quota_format_type v2_quota_format = {
-Index: linux-2.6.5-7.283/fs/quota.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/quota.c
-+++ linux-2.6.5-7.283/fs/quota.c
-@@ -14,6 +14,9 @@
- #include <linux/smp_lock.h>
- #include <linux/security.h>
- #include <linux/audit.h>
-+#include <linux/syscalls.h>
-+#include <linux/buffer_head.h>
-+
- 
- /* Check validity of quotactl */
- static int check_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t id)
-@@ -134,16 +137,54 @@ restart:
- 	return NULL;
- }
- 
-+void quota_sync_sb(struct super_block *sb, int type)
-+{
-+	int cnt;
-+	struct inode *discard[MAXQUOTAS];
-+
-+	sb->s_qcop->quota_sync(sb, type);
-+	/* This is not very clever (and fast) but currently I don't know about
-+	 * any other simple way of getting quota data to disk and we must get
-+	 * them there for userspace to be visible... */
-+	if (sb->s_op->sync_fs)
-+		sb->s_op->sync_fs(sb, 1);
-+	sync_blockdev(sb->s_bdev);
-+
-+	/* Now when everything is written we can discard the pagecache so
-+	 * that userspace sees the changes. We need i_sem and so we could
-+	 * not do it inside dqonoff_sem. Moreover we need to be carefull
-+	 * about races with quotaoff() (that is the reason why we have own
-+	 * reference to inode). */
-+	down(&sb_dqopt(sb)->dqonoff_sem);
-+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-+		discard[cnt] = NULL;
-+		if (type != -1 && cnt != type)
-+			continue;
-+		if (!sb_has_quota_enabled(sb, cnt))
-+			continue;
-+		discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]);
-+	}
-+	up(&sb_dqopt(sb)->dqonoff_sem);
-+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-+		if (discard[cnt]) {
-+			down(&discard[cnt]->i_sem);
-+			truncate_inode_pages(&discard[cnt]->i_data, 0);
-+			up(&discard[cnt]->i_sem);
-+			iput(discard[cnt]);
-+		}
-+	}
-+}
-+
- void sync_dquots(struct super_block *sb, int type)
- {
- 	if (sb) {
- 		if (sb->s_qcop->quota_sync)
--			sb->s_qcop->quota_sync(sb, type);
-+			quota_sync_sb(sb, type);
- 	}
- 	else {
--		while ((sb = get_super_to_sync(type))) {
-+		while ((sb = get_super_to_sync(type)) != NULL) {
- 			if (sb->s_qcop->quota_sync)
--				sb->s_qcop->quota_sync(sb, type);
-+				quota_sync_sb(sb, type);
- 			drop_super(sb);
- 		}
- 	}
-Index: linux-2.6.5-7.283/fs/ext3/inode.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/ext3/inode.c
-+++ linux-2.6.5-7.283/fs/ext3/inode.c
-@@ -1015,7 +1015,7 @@ out:
- 	return ret;
- }
- 
--static int
-+int
- ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh)
- {
- 	int err = journal_dirty_data(handle, bh);
-Index: linux-2.6.5-7.283/fs/ext3/super.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/ext3/super.c
-+++ linux-2.6.5-7.283/fs/ext3/super.c
-@@ -33,6 +33,7 @@
- #include <linux/vfs.h>
- #include <linux/random.h>
- #include <asm/uaccess.h>
-+#include <linux/quotaops.h>
- #include "xattr.h"
- #include "acl.h"
- 
-@@ -505,7 +506,33 @@ static void ext3_clear_inode(struct inod
- 	ext3_discard_reservation(inode);
- }
- 
--static struct dquot_operations ext3_qops;
-+#ifdef CONFIG_QUOTA
-+
-+static int ext3_dquot_initialize(struct inode *inode, int type);
-+static int ext3_dquot_drop(struct inode *inode);
-+static int ext3_write_dquot(struct dquot *dquot);
-+static int ext3_acquire_dquot(struct dquot *dquot);
-+static int ext3_release_dquot(struct dquot *dquot);
-+static int ext3_write_info(struct super_block *sb, int type);
-+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
-+			       size_t len, loff_t off);
-+static ssize_t ext3_quota_write(struct super_block *sb, int type,
-+				const char *data, size_t len, loff_t off);
-+
-+static struct dquot_operations ext3_quota_operations = {
-+	.initialize	= ext3_dquot_initialize,
-+	.drop		= ext3_dquot_drop,
-+	.alloc_space	= dquot_alloc_space,
-+	.alloc_inode	= dquot_alloc_inode,
-+	.free_space	= dquot_free_space,
-+	.free_inode	= dquot_free_inode,
-+	.transfer	= dquot_transfer,
-+	.write_dquot	= ext3_write_dquot,
-+	.acquire_dquot	= ext3_acquire_dquot,
-+	.release_dquot	= ext3_release_dquot,
-+	.write_info	= ext3_write_info
-+};
-+#endif
- 
- static struct super_operations ext3_sops = {
- 	.alloc_inode	= ext3_alloc_inode,
-@@ -522,6 +549,10 @@ static struct super_operations ext3_sops
- 	.statfs		= ext3_statfs,
- 	.remount_fs	= ext3_remount,
- 	.clear_inode	= ext3_clear_inode,
-+#ifdef CONFIG_QUOTA
-+	.quota_read	= ext3_quota_read,
-+	.quota_write	= ext3_quota_write,
-+#endif
- };
- 
- static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp)
-@@ -1377,7 +1408,9 @@ static int ext3_fill_super (struct super
- 	 */
- 	sb->s_op = &ext3_sops;
- 	sb->s_export_op = &ext3_export_ops;
--	sb->dq_op = &ext3_qops;
-+#ifdef CONFIG_QUOTA
-+	sb->dq_op = &ext3_quota_operations;
-+#endif
- 	INIT_LIST_HEAD(&sbi->s_orphan); /* unlinked but open files */
- 
- 	sb->s_root = 0;
-@@ -2040,70 +2073,200 @@ int ext3_statfs (struct super_block * sb
- 
- #ifdef CONFIG_QUOTA
- 
--/* Blocks: (2 data blocks) * (3 indirect + 1 descriptor + 1 bitmap) + superblock */
--#define EXT3_OLD_QFMT_BLOCKS 11
--/* Blocks: quota info + (4 pointer blocks + 1 entry block) * (3 indirect + 1 descriptor + 1 bitmap) + superblock */
--#define EXT3_V0_QFMT_BLOCKS 27
--
--static int (*old_write_dquot)(struct dquot *dquot);
--static void (*old_drop_dquot)(struct inode *inode);
--
--static int fmt_to_blocks(int fmt)
--{
--	switch (fmt) {
--		case QFMT_VFS_OLD:
--			return  EXT3_OLD_QFMT_BLOCKS;
--		case QFMT_VFS_V0:
--			return EXT3_V0_QFMT_BLOCKS;
--	}
--	return EXT3_MAX_TRANS_DATA;
-+static inline struct inode *dquot_to_inode(struct dquot *dquot)
-+{
-+	return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
-+}
-+
-+static int ext3_dquot_initialize(struct inode *inode, int type)
-+{
-+	handle_t *handle;
-+	int ret, err;
-+
-+	/* We may create quota structure so we need to reserve enough blocks */
-+	handle = ext3_journal_start(inode, 2*EXT3_QUOTA_INIT_BLOCKS);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	ret = dquot_initialize(inode, type);
-+	err = ext3_journal_stop(handle);
-+	if (!ret)
-+		ret = err;
-+	return ret;
-+}
-+
-+static int ext3_dquot_drop(struct inode *inode)
-+{
-+	handle_t *handle;
-+	int ret, err;
-+
-+	/* We may delete quota structure so we need to reserve enough blocks */
-+	handle = ext3_journal_start(inode, 2*EXT3_QUOTA_INIT_BLOCKS);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	ret = dquot_drop(inode);
-+	err = ext3_journal_stop(handle);
-+	if (!ret)
-+		ret = err;
-+	return ret;
- }
- 
- static int ext3_write_dquot(struct dquot *dquot)
- {
--	int nblocks;
--	int ret;
--	int err;
-+	int ret, err;
- 	handle_t *handle;
--	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
--	struct inode *qinode;
-+	struct inode *inode;
- 
--	nblocks = fmt_to_blocks(dqopt->info[dquot->dq_type].dqi_format->qf_fmt_id);
--	qinode = dqopt->files[dquot->dq_type]->f_dentry->d_inode;
--	handle = ext3_journal_start(qinode, nblocks);
--	if (IS_ERR(handle)) {
--		ret = PTR_ERR(handle);
--		goto out;
--	}
--	ret = old_write_dquot(dquot);
-+	inode = dquot_to_inode(dquot);
-+	handle = ext3_journal_start(inode,
-+					EXT3_QUOTA_TRANS_BLOCKS);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	ret = dquot_commit(dquot);
- 	err = ext3_journal_stop(handle);
--	if (ret == 0)
-+	if (!ret)
- 		ret = err;
--out:
- 	return ret;
- }
- 
--static void ext3_drop_dquot(struct inode *inode)
-+static int ext3_acquire_dquot(struct dquot *dquot)
- {
--	int nblocks, type;
--	struct quota_info *dqopt = sb_dqopt(inode->i_sb);
-+	int ret, err;
- 	handle_t *handle;
- 
--	for (type = 0; type < MAXQUOTAS; type++) {
--		if (sb_has_quota_enabled(inode->i_sb, type))
--			break;
--	}
--	if (type < MAXQUOTAS)
--		nblocks = fmt_to_blocks(dqopt->info[type].dqi_format->qf_fmt_id);
--	else
--		nblocks = 0;	/* No quota => no drop */ 
--	handle = ext3_journal_start(inode, 2*nblocks);
-+	handle = ext3_journal_start(dquot_to_inode(dquot),
-+					EXT3_QUOTA_INIT_BLOCKS);
- 	if (IS_ERR(handle))
--		return;
--	old_drop_dquot(inode);
--	ext3_journal_stop(handle);
--	return;
-+		return PTR_ERR(handle);
-+	ret = dquot_acquire(dquot);
-+	err = ext3_journal_stop(handle);
-+	if (!ret)
-+		ret = err;
-+	return ret;
- }
-+
-+static int ext3_release_dquot(struct dquot *dquot)
-+{
-+	int ret, err;
-+	handle_t *handle;
-+
-+	handle = ext3_journal_start(dquot_to_inode(dquot),
-+					EXT3_QUOTA_INIT_BLOCKS);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	ret = dquot_release(dquot);
-+	err = ext3_journal_stop(handle);
-+	if (!ret)
-+		ret = err;
-+	return ret;
-+}
-+
-+static int ext3_write_info(struct super_block *sb, int type)
-+{
-+	int ret, err;
-+	handle_t *handle;
-+
-+	/* Data block + inode block */
-+	handle = ext3_journal_start(sb->s_root->d_inode, 2);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+	ret = dquot_commit_info(sb, type);
-+	err = ext3_journal_stop(handle);
-+	if (!ret)
-+		ret = err;
-+	return ret;
-+}
-+
-+/* Read data from quotafile - avoid pagecache and such because we cannot afford
-+ * acquiring the locks... As quota files are never truncated and quota code
-+ * itself serializes the operations (and noone else should touch the files)
-+ * we don't have to be afraid of races */
-+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
-+			       size_t len, loff_t off)
-+{
-+	struct inode *inode = sb_dqopt(sb)->files[type];
-+	sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb);
-+	int err = 0;
-+	int offset = off & (sb->s_blocksize - 1);
-+	int tocopy;
-+	size_t toread;
-+	struct buffer_head *bh;
-+	loff_t i_size = i_size_read(inode);
-+
-+	if (off > i_size)
-+		return 0;
-+	if (off+len > i_size)
-+		len = i_size-off;
-+	toread = len;
-+	while (toread > 0) {
-+		tocopy = sb->s_blocksize - offset < toread ?
-+				sb->s_blocksize - offset : toread;
-+		bh = ext3_bread(NULL, inode, blk, 0, &err);
-+		if (err)
-+			return err;
-+		if (!bh)	/* A hole? */
-+			memset(data, 0, tocopy);
-+		else
-+			memcpy(data, bh->b_data+offset, tocopy);
-+		brelse(bh);
-+		offset = 0;
-+		toread -= tocopy;
-+		data += tocopy;
-+		blk++;
-+	}
-+	return len;
-+}
-+
-+/* Write to quotafile (we know the transaction is already started and has
-+ * enough credits) */
-+static ssize_t ext3_quota_write(struct super_block *sb, int type,
-+				const char *data, size_t len, loff_t off)
-+{
-+	struct inode *inode = sb_dqopt(sb)->files[type];
-+	sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb);
-+	int err = 0;
-+	int offset = off & (sb->s_blocksize - 1);
-+	int tocopy;
-+	size_t towrite = len;
-+	struct buffer_head *bh;
-+	handle_t *handle = journal_current_handle();
-+
-+	down(&inode->i_sem);
-+	while (towrite > 0) {
-+		tocopy = sb->s_blocksize - offset < towrite ?
-+				sb->s_blocksize - offset : towrite;
-+		bh = ext3_bread(handle, inode, blk, 1, &err);
-+		if (!bh)
-+			goto out;
-+		
-+		lock_buffer(bh);
-+		memcpy(bh->b_data+offset, data, tocopy);
-+		flush_dcache_page(bh->b_page);
-+		unlock_buffer(bh);
-+		/* Always do at least ordered writes for quotas */
-+		err = ext3_journal_dirty_data(handle, bh);
-+		mark_buffer_dirty(bh);
-+		brelse(bh);
-+		if (err)
-+			goto out;
-+		offset = 0;
-+		towrite -= tocopy;
-+		data += tocopy;
-+		blk++;
-+	}
-+out:
-+	if (len == towrite)
-+		return err;
-+	if (inode->i_size < off+len-towrite) {
-+		i_size_write(inode, off+len-towrite);
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+	}
-+	inode->i_version++;
-+	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-+	ext3_mark_inode_dirty(handle, inode);
-+	up(&inode->i_sem);
-+	return len - towrite;
-+}
-+
- #endif
- 
- static struct super_block *ext3_get_sb(struct file_system_type *fs_type,
-@@ -2128,13 +2291,7 @@ static int __init init_ext3_fs(void)
- 	err = init_inodecache();
- 	if (err)
- 		goto out1;
--#ifdef CONFIG_QUOTA
--	init_dquot_operations(&ext3_qops);
--	old_write_dquot = ext3_qops.write_dquot;
--	old_drop_dquot = ext3_qops.drop;
--	ext3_qops.write_dquot = ext3_write_dquot;
--	ext3_qops.drop = ext3_drop_dquot;
--#endif
-+
-         err = register_filesystem_lifo(&ext3_fs_type);
- 	if (err)
- 		goto out;
-Index: linux-2.6.5-7.283/fs/quota_v1.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/quota_v1.c
-+++ linux-2.6.5-7.283/fs/quota_v1.c
-@@ -7,7 +7,6 @@
- #include <linux/init.h>
- #include <linux/module.h>
- 
--#include <asm/uaccess.h>
- #include <asm/byteorder.h>
- 
- MODULE_AUTHOR("Jan Kara");
-@@ -41,23 +40,14 @@ static void v1_mem2disk_dqblk(struct v1_
- static int v1_read_dqblk(struct dquot *dquot)
- {
- 	int type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
--	loff_t offset;
- 	struct v1_disk_dqblk dqblk;
- 
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--	if (filp == (struct file *)NULL)
-+	if (!sb_dqopt(dquot->dq_sb)->files[type])
- 		return -EINVAL;
- 
--	/* Now we are sure filp is valid */
--	offset = v1_dqoff(dquot->dq_id);
- 	/* Set structure to 0s in case read fails/is after end of file */
- 	memset(&dqblk, 0, sizeof(struct v1_disk_dqblk));
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
--	set_fs(fs);
-+	dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
- 
- 	v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk);
- 	if (dquot->dq_dqb.dqb_bhardlimit == 0 && dquot->dq_dqb.dqb_bsoftlimit == 0 &&
-@@ -71,17 +61,9 @@ static int v1_read_dqblk(struct dquot *d
- static int v1_commit_dqblk(struct dquot *dquot)
- {
- 	short type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
--	loff_t offset;
- 	ssize_t ret;
- 	struct v1_disk_dqblk dqblk;
- 
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--	offset = v1_dqoff(dquot->dq_id);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--
- 	/*
- 	 * Note: clear the DQ_MOD flag unconditionally,
- 	 * so we don't loop forever on failure.
-@@ -93,9 +75,10 @@ static int v1_commit_dqblk(struct dquot 
- 		dqblk.dqb_itime = sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace;
- 	}
- 	ret = 0;
--	if (filp)
--		ret = filp->f_op->write(filp, (char *)&dqblk,
--					sizeof(struct v1_disk_dqblk), &offset);
-+	if (sb_dqopt(dquot->dq_sb)->files[type])
-+		ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, (char *)&dqblk,
-+				sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
-+
- 	if (ret != sizeof(struct v1_disk_dqblk)) {
- 		printk(KERN_WARNING "VFS: dquota write failed on dev %s\n",
- 			dquot->dq_sb->s_id);
-@@ -106,7 +89,6 @@ static int v1_commit_dqblk(struct dquot 
- 	ret = 0;
- 
- out:
--	set_fs(fs);
- 	dqstats.writes++;
- 
- 	return ret;
-@@ -126,14 +108,11 @@ struct v2_disk_dqheader {
- 
- static int v1_check_quota_file(struct super_block *sb, int type)
- {
--	struct file *f = sb_dqopt(sb)->files[type];
--	struct inode *inode = f->f_dentry->d_inode;
-+	struct inode *inode = sb_dqopt(sb)->files[type];
- 	ulong blocks;
- 	size_t off; 
- 	struct v2_disk_dqheader dqhead;
--	mm_segment_t fs;
- 	ssize_t size;
--	loff_t offset = 0;
- 	loff_t isize;
- 	static const uint quota_magics[] = V2_INITQMAGICS;
- 
-@@ -145,10 +124,7 @@ static int v1_check_quota_file(struct su
- 	if ((blocks % sizeof(struct v1_disk_dqblk) * BLOCK_SIZE + off) % sizeof(struct v1_disk_dqblk))
- 		return 0;
- 	/* Doublecheck whether we didn't get file with new format - with old quotactl() this could happen */
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset);
--	set_fs(fs);
-+	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
- 	if (size != sizeof(struct v2_disk_dqheader))
- 		return 1;	/* Probably not new format */
- 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type])
-@@ -160,16 +136,10 @@ static int v1_check_quota_file(struct su
- static int v1_read_file_info(struct super_block *sb, int type)
- {
- 	struct quota_info *dqopt = sb_dqopt(sb);
--	mm_segment_t fs;
--	loff_t offset;
--	struct file *filp = dqopt->files[type];
- 	struct v1_disk_dqblk dqblk;
- 	int ret;
- 
--	offset = v1_dqoff(0);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) {
-+	if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) {
- 		if (ret >= 0)
- 			ret = -EIO;
- 		goto out;
-@@ -178,38 +148,31 @@ static int v1_read_file_info(struct supe
- 	dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME;
- 	dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME;
- out:
--	set_fs(fs);
- 	return ret;
- }
- 
- static int v1_write_file_info(struct super_block *sb, int type)
- {
- 	struct quota_info *dqopt = sb_dqopt(sb);
--	mm_segment_t fs;
--	struct file *filp = dqopt->files[type];
- 	struct v1_disk_dqblk dqblk;
--	loff_t offset;
- 	int ret;
- 
- 	dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
--	offset = v1_dqoff(0);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) {
-+	if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk,
-+	    sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) {
- 		if (ret >= 0)
- 			ret = -EIO;
- 		goto out;
- 	}
- 	dqblk.dqb_itime = dqopt->info[type].dqi_igrace;
- 	dqblk.dqb_btime = dqopt->info[type].dqi_bgrace;
--	offset = v1_dqoff(0);
--	ret = filp->f_op->write(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
-+	ret = sb->s_op->quota_write(sb, type, (char *)&dqblk,
-+	      sizeof(struct v1_disk_dqblk), v1_dqoff(0));
- 	if (ret == sizeof(struct v1_disk_dqblk))
- 		ret = 0;
- 	else if (ret > 0)
- 		ret = -EIO;
- out:
--	set_fs(fs);
- 	return ret;
- }
- 
-Index: linux-2.6.5-7.283/fs/reiserfs/super.c
-===================================================================
---- linux-2.6.5-7.283.orig/fs/reiserfs/super.c
-+++ linux-2.6.5-7.283/fs/reiserfs/super.c
-@@ -1677,7 +1677,7 @@ inversion between quota and journal lock
- #define REISERFS_V0_QFMT_BLOCKS (4*(JOURNAL_PER_BALANCE_CNT+2)+2+1)
- 
- static int (*old_write_dquot)(struct dquot *dquot);
--static void (*old_drop_dquot)(struct inode *inode);
-+static int (*old_drop_dquot)(struct inode *inode);
- 
- static int fmt_to_blocks(int fmt)
- {
-@@ -1697,10 +1697,8 @@ static int reiserfs_write_dquot(struct d
- 	int err;
- 	struct reiserfs_transaction_handle handle;
- 	struct quota_info *dqopt = sb_dqopt(dquot->dq_sb);
--	struct inode *qinode;
- 
- 	nblocks = fmt_to_blocks(dqopt->info[dquot->dq_type].dqi_format->qf_fmt_id);
--	qinode = dqopt->files[dquot->dq_type]->f_dentry->d_inode;
- 	reiserfs_write_lock(dquot->dq_sb);
- 	ret = journal_begin(&handle, dquot->dq_sb, nblocks);
- 	if (ret)
-@@ -1713,11 +1711,12 @@ static int reiserfs_write_dquot(struct d
- 	return ret;
- }
- 
--static void reiserfs_drop_dquot(struct inode *inode)
-+static int reiserfs_drop_dquot(struct inode *inode)
- {
- 	int nblocks, type;
- 	struct quota_info *dqopt = sb_dqopt(inode->i_sb);
- 	struct reiserfs_transaction_handle handle;
-+	int err, ret;
- 
- 	for (type = 0; type < MAXQUOTAS; type++) {
- 		if (sb_has_quota_enabled(inode->i_sb, type))
-@@ -1728,12 +1727,15 @@ static void reiserfs_drop_dquot(struct i
- 	else
- 		nblocks = 0;	/* No quota => no drop */ 
- 	reiserfs_write_lock(inode->i_sb);
--	if (journal_begin(&handle, inode->i_sb, 2*nblocks))
--		return;
--	old_drop_dquot(inode);
--	journal_end(&handle, inode->i_sb, 2*nblocks);
-+	err = journal_begin(&handle, inode->i_sb, 2*nblocks);
-+	if (err);
-+		return err;
-+	ret = old_drop_dquot(inode);
-+	err = journal_end(&handle, inode->i_sb, 2*nblocks);
-+	if (!ret)
-+		ret = err;
- 	reiserfs_write_unlock(inode->i_sb);
--	return;
-+	return ret;
- }
- #endif
- 
diff --git a/lustre/kernel_patches/patches/8kstack-2.6.12.patch b/lustre/kernel_patches/patches/8kstack-2.6.12.patch
deleted file mode 100644
index f3a216040e8774c3fd65df1492ecf768db7e7d04..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/8kstack-2.6.12.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: linux-2.6.9-5.0.3.EL/include/asm-i386/thread_info.h
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/asm-i386/thread_info.h	2005-02-25 10:25:33.000000000 +0200
-+++ linux-2.6.9-5.0.3.EL/include/asm-i386/thread_info.h	2005-02-25 20:19:11.676139032 +0200
-@@ -54,7 +54,7 @@
- 
- #define PREEMPT_ACTIVE		0x10000000
- #ifdef CONFIG_4KSTACKS
--#define THREAD_SIZE            (4096)
-+#define THREAD_SIZE            (8192)
- #else
- #define THREAD_SIZE		(8192)
- #endif
diff --git a/lustre/kernel_patches/patches/atomic_add_return-sles9.patch b/lustre/kernel_patches/patches/atomic_add_return-sles9.patch
deleted file mode 100644
index 3c2555bcecf92a77e9fa790e4e04d39057649ce3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/atomic_add_return-sles9.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-Index: linux-2.6.5-7.283/include/asm-i386/atomic.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/asm-i386/atomic.h
-+++ linux-2.6.5-7.283/include/asm-i386/atomic.h
-@@ -2,6 +2,7 @@
- #define __ARCH_I386_ATOMIC__
- 
- #include <linux/config.h>
-+#include <linux/bitops.h>
- 
- /*
-  * Atomic operations that C can't guarantee us.  Useful for
-@@ -176,6 +177,47 @@ static __inline__ int atomic_add_negativ
- 	return c;
- }
- 
-+/**
-+ * atomic_add_return - add and return
-+ * @v: pointer of type atomic_t
-+ * @i: integer value to add
-+ *
-+ * Atomically adds @i to @v and returns @i + @v
-+ */
-+static __inline__ int atomic_add_return(int i, atomic_t *v)
-+{
-+	int __i;
-+#ifdef CONFIG_M386
-+	unsigned long flags;
-+	if(unlikely(boot_cpu_data.x86==3))
-+		goto no_xadd;
-+#endif
-+	/* Modern 486+ processor */
-+	__i = i;
-+	__asm__ __volatile__(
-+		LOCK_PREFIX "xaddl %0, %1"
-+		:"+r" (i), "+m" (v->counter)
-+		: : "memory");
-+	return i + __i;
-+
-+#ifdef CONFIG_M386
-+no_xadd: /* Legacy 386 processor */
-+	local_irq_save(flags);
-+	__i = atomic_read(v);
-+	atomic_set(v, i + __i);
-+	local_irq_restore(flags);
-+	return i + __i;
-+#endif
-+}
-+
-+static __inline__ int atomic_sub_return(int i, atomic_t *v)
-+{
-+	return atomic_add_return(-i,v);
-+}
-+
-+#define atomic_inc_return(v)  (atomic_add_return(1,v))
-+#define atomic_dec_return(v)  (atomic_sub_return(1,v))
-+
- /* These are x86-specific, used by some header files */
- #define atomic_clear_mask(mask, addr) \
- __asm__ __volatile__(LOCK "andl %0,%1" \
-Index: linux-2.6.5-7.283/include/asm-x86_64/atomic.h
-===================================================================
---- linux-2.6.5-7.283.orig/include/asm-x86_64/atomic.h
-+++ linux-2.6.5-7.283/include/asm-x86_64/atomic.h
-@@ -2,6 +2,7 @@
- #define __ARCH_X86_64_ATOMIC__
- 
- #include <linux/config.h>
-+#include <linux/bitops.h>
- 
- /* atomic_t should be 32 bit signed type */
- 
-@@ -178,6 +179,31 @@ static __inline__ int atomic_add_negativ
- 	return c;
- }
- 
-+/**
-+ * atomic_add_return - add and return
-+ * @i: integer value to add
-+ * @v: pointer of type atomic_t
-+ *
-+ * Atomically adds @i to @v and returns @i + @v
-+ */
-+static __inline__ int atomic_add_return(int i, atomic_t *v)
-+{
-+	int __i = i;
-+	__asm__ __volatile__(
-+		LOCK_PREFIX "xaddl %0, %1"
-+		:"+r" (i), "+m" (v->counter)
-+		: : "memory");
-+	return i + __i;
-+}
-+
-+static __inline__ int atomic_sub_return(int i, atomic_t *v)
-+{
-+	return atomic_add_return(-i,v);
-+}
-+
-+#define atomic_inc_return(v)  (atomic_add_return(1,v))
-+#define atomic_dec_return(v)  (atomic_sub_return(1,v))
-+
- /* These are x86-specific, used by some header files */
- #define atomic_clear_mask(mask, addr) \
- __asm__ __volatile__(LOCK "andl %0,%1" \
diff --git a/lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch b/lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch
deleted file mode 100644
index e54959769fc45132932169f93af3849efb4a842f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/bitops_ext2_find_next_le_bit-2.6.patch
+++ /dev/null
@@ -1,153 +0,0 @@
-Index: linux-2.6.9/include/asm-i386/bitops.h
-===================================================================
---- linux-2.6.9.orig/include/asm-i386/bitops.h	2004-10-19 05:54:37.000000000 +0800
-+++ linux-2.6.9/include/asm-i386/bitops.h	2006-09-01 14:04:19.000000000 +0800
-@@ -448,6 +448,8 @@
- 	find_first_zero_bit((unsigned long*)addr, size)
- #define ext2_find_next_zero_bit(addr, size, off) \
- 	find_next_zero_bit((unsigned long*)addr, size, off)
-+#define ext2_find_next_le_bit(addr, size, off) \
-+	find_next_bit((unsigned long*)(addr), (size), (off))
- 
- /* Bitmap functions for the minix filesystem.  */
- #define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,(void*)addr)
-Index: linux-2.6.9/include/asm-x86_64/bitops.h
-===================================================================
---- linux-2.6.9.orig/include/asm-x86_64/bitops.h	2004-10-19 05:53:51.000000000 +0800
-+++ linux-2.6.9/include/asm-x86_64/bitops.h	2006-09-01 14:04:19.000000000 +0800
-@@ -399,6 +399,8 @@
- 	find_first_zero_bit((unsigned long*)addr, size)
- #define ext2_find_next_zero_bit(addr, size, off) \
- 	find_next_zero_bit((unsigned long*)addr, size, off)
-+#define ext2_find_next_le_bit(addr, size, off) \
-+	find_next_bit((unsigned long*)(addr), (size), (off))
- 
- /* Bitmap functions for the minix filesystem.  */
- #define minix_test_and_set_bit(nr,addr) __test_and_set_bit(nr,(void*)addr)
-Index: linux-2.6.9/include/asm-ia64/bitops.h
-===================================================================
---- linux-2.6.9.orig/include/asm-ia64/bitops.h	2004-10-19 05:55:07.000000000 +0800
-+++ linux-2.6.9/include/asm-ia64/bitops.h	2006-09-01 14:04:19.000000000 +0800
-@@ -387,6 +387,8 @@
- #define ext2_test_bit			test_bit
- #define ext2_find_first_zero_bit	find_first_zero_bit
- #define ext2_find_next_zero_bit		find_next_zero_bit
-+#define ext2_find_next_le_bit(addr, size, off) \
-+	__find_next_bit((addr), (size), (off))
- 
- /* Bitmap functions for the minix filesystem.  */
- #define minix_test_and_set_bit(nr,addr)		test_and_set_bit(nr,addr)
-Index: linux-2.6.9/include/asm-ppc/bitops.h
-===================================================================
---- linux-2.6.9.orig/include/asm-ppc/bitops.h	2004-10-19 05:54:08.000000000 +0800
-+++ linux-2.6.9/include/asm-ppc/bitops.h	2006-09-01 14:04:35.000000000 +0800
-@@ -449,6 +449,47 @@
- 	return result + ffz(tmp);
- }
- 
-+#define ext2_find_next_le_bit(addr, size, off) \
-+        generic_find_next_le_bit((addr), (size), (off))
-+
-+static __inline__ unsigned long generic_find_next_le_bit(const void *addr,
-+		unsigned long size, unsigned long offset)
-+{
-+	unsigned int *p = ((unsigned int*) addr) + (offset >> 5);
-+	unsigned int result = offset & ~31UL;
-+	unsigned int tmp;
-+
-+	if (offset >= size)
-+		return size;
-+	size -= result;
-+	offset &= 31UL;
-+	if (offset) {
-+		tmp = cpu_to_le32p(p++);
-+		tmp &= ~0UL << offset;
-+		if (size < 32)
-+			goto found_first;
-+		if (tmp)
-+			goto found_middle;
-+		size -= 32;
-+		result += 32;
-+	}
-+	while (size >= 32) {
-+		if ((tmp = cpu_to_le32p(p++)))
-+			goto found_middle;
-+		result += 32;
-+		size -= 32;
-+	}
-+	if (!size)
-+		return result;
-+	tmp = cpu_to_le32p(p);
-+found_first:
-+	tmp &= ~0U >> (32 - size);
-+	if (tmp == 0UL)         /* Are any bits set? */
-+		return result + size;   /* Nope. */
-+found_middle:
-+	return result + __ffs(tmp);
-+}
-+
- /* Bitmap functions for the minix filesystem.  */
- #define minix_test_and_set_bit(nr,addr) ext2_set_bit(nr,addr)
- #define minix_set_bit(nr,addr) ((void)ext2_set_bit(nr,addr))
-Index: linux-2.6.9/include/asm-ppc64/bitops.h
-===================================================================
---- linux-2.6.9.orig/include/asm-ppc64/bitops.h	2004-10-19 05:55:43.000000000 +0800
-+++ linux-2.6.9/include/asm-ppc64/bitops.h	2006-09-01 14:05:00.000000000 +0800
-@@ -349,6 +349,9 @@
- 	find_first_zero_le_bit((unsigned long*)addr, size)
- #define ext2_find_next_zero_bit(addr, size, off) \
- 	find_next_zero_le_bit((unsigned long*)addr, size, off)
-+#define ext2_find_next_le_bit(addr, size, off) \
-+        generic_find_next_le_bit((unsigned long*)(addr), (size), (off))
-+extern unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned long size, unsigned long offset);
- 
- #define minix_test_and_set_bit(nr,addr)		test_and_set_bit(nr,addr)
- #define minix_set_bit(nr,addr)			set_bit(nr,addr)
-Index: linux-2.6.9/arch/ppc64/kernel/bitops.c
-===================================================================
---- linux-2.6.9.orig/arch/ppc64/kernel/bitops.c	2004-10-19 05:54:37.000000000 +0800
-+++ linux-2.6.9/arch/ppc64/kernel/bitops.c	2006-09-01 14:05:25.000000000 +0800
-@@ -145,3 +145,43 @@
- }
- 
- EXPORT_SYMBOL(find_next_zero_le_bit);
-+
-+unsigned long generic_find_next_le_bit(const unsigned long *addr, unsigned long size,
-+		unsigned long offset)
-+{
-+	const unsigned long *p = addr + offset / BITS_PER_LONG;
-+	unsigned long result = offset & ~(BITS_PER_LONG - 1);
-+	unsigned long tmp;
-+
-+	if (offset >= size)
-+		return size;
-+	size -= result;
-+	offset %= BITS_PER_LONG;
-+	if (offset) {
-+		tmp = __swab64p(p++);
-+		tmp &= (~0UL << offset);
-+		if (size < BITS_PER_LONG)
-+			goto found_first;
-+		if (tmp)
-+			goto found_middle;
-+		size -= BITS_PER_LONG;
-+		result += BITS_PER_LONG;
-+	}
-+	while (size & ~(BITS_PER_LONG - 1)) {
-+		if ((tmp = __swab64p(p++)))
-+			goto found_middle;
-+		result += BITS_PER_LONG;
-+		size -= BITS_PER_LONG;
-+	}
-+	if (!size)
-+		return result;
-+	tmp = __swab64p(p);
-+found_first:
-+	tmp &= ~0UL >> (BITS_PER_LONG - size);
-+	if (tmp == 0UL)
-+		return result + size;
-+found_middle:
-+	return result + __ffs(tmp);
-+}
-+
-+EXPORT_SYMBOL(generic_find_next_le_bit);
diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch
deleted file mode 100644
index a2d7da22a7d9feaff27fb39a57f8b1fc6ef639e6..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/blkdev_tunables-2.6-sles10.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: linux-2616-46014/include/scsi/scsi_host.h
-===================================================================
---- linux-2616-46014.orig/include/scsi/scsi_host.h
-+++ linux-2616-46014/include/scsi/scsi_host.h
-@@ -28,7 +28,7 @@ struct scsi_transport_template;
-  *	 used in one scatter-gather request.
-  */
- #define SG_NONE 0
--#define SG_ALL 0xff
-+#define SG_ALL 256
- 
- 
- #define DISABLE_CLUSTERING 0
diff --git a/lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch b/lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch
deleted file mode 100644
index f6fa12bf88f2850b413f3df720ec62319460a414..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/blkdev_tunables-2.6-suse.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/scsi/scsi_host.h
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik.orig/include/scsi/scsi_host.h	2005-01-07 04:23:12.344880136 -0800
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/scsi/scsi_host.h	2005-01-07 04:23:33.338688592 -0800
-@@ -24,7 +24,7 @@
-  *	 used in one scatter-gather request.
-  */
- #define SG_NONE 0
--#define SG_ALL 0xff
-+#define SG_ALL 256
- 
- 
- #define DISABLE_CLUSTERING 0
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/linux/blkdev.h
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik.orig/include/linux/blkdev.h	2004-11-11 07:28:28.000000000 -0800
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004111114454891_lustre.1.4.0-phik/include/linux/blkdev.h	2005-01-07 04:24:33.819494112 -0800
-@@ -647,8 +647,8 @@
- extern void blk_rq_prep_restart(struct request *);
- extern int blkdev_issue_flush(struct block_device *, sector_t *);
- 
--#define MAX_PHYS_SEGMENTS 128
--#define MAX_HW_SEGMENTS 128
-+#define MAX_PHYS_SEGMENTS 256
-+#define MAX_HW_SEGMENTS 256
- #define MAX_SECTORS 255
- 
- #define MAX_SEGMENT_SIZE	65536
diff --git a/lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch b/lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch
deleted file mode 100644
index 84b88fddc4fd8a932a9303980e9e4e444830ad0e..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/dcache-qstr-api-fix-2.6-suse.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: linux-2.6.5-7.276/include/linux/dcache.h
-===================================================================
---- linux-2.6.5-7.276.orig/include/linux/dcache.h
-+++ linux-2.6.5-7.276/include/linux/dcache.h
-@@ -38,7 +38,6 @@ struct qstr {
- 	const unsigned char * name;
- 	unsigned int len;
- 	unsigned int hash;
--	char name_str[0];
- };
- 
- #include <linux/namei.h>
-@@ -104,7 +103,6 @@ struct dentry {
-  	struct rcu_head d_rcu;
- 	struct dcookie_struct * d_cookie; /* cookie, if any */
- 	unsigned long d_move_count;	/* to indicated moved dentry while lockless lookup */
--	struct qstr * d_qstr;		/* quick str ptr used in lockless lookup and concurrent d_move */
- 	struct dentry * d_parent;	/* parent directory */
- 	struct qstr d_name;
- 	struct hlist_node d_hash;	/* lookup hash list */	
-Index: linux-2.6.5-7.276/fs/dcache.c
-===================================================================
---- linux-2.6.5-7.276.orig/fs/dcache.c
-+++ linux-2.6.5-7.276/fs/dcache.c
-@@ -775,7 +775,6 @@ struct dentry * d_alloc(struct dentry * 
- 	dentry->d_parent = NULL;
- 	dentry->d_move_count = 0;
- 	dentry->d_sb = NULL;
--	dentry->d_qstr = &dentry->d_name;
- 	dentry->d_name.name = str;
- 	dentry->d_name.len = name->len;
- 	dentry->d_name.hash = name->hash;
diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch
deleted file mode 100644
index 5cab63eff3f3d8bcc3dd2e650084446b1a6c2440..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/dev_read_only-2.6-fc5.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-diff -rup linux-2.6.16.i686.orig/block/ll_rw_blk.c linux-2.6.16.i686/block/ll_rw_blk.c
---- linux-2.6.16.i686.orig/block/ll_rw_blk.c	2007-05-29 15:24:36.000000000 +0300
-+++ linux-2.6.16.i686/block/ll_rw_blk.c	2007-05-29 15:33:50.000000000 +0300
-@@ -2940,6 +2940,8 @@ static void handle_bad_sector(struct bio
- 	set_bit(BIO_EOF, &bio->bi_flags);
- }
- 
-+int dev_check_rdonly(struct block_device *bdev);
-+
- /**
-  * generic_make_request: hand a buffer to its device driver for I/O
-  * @bio:  The bio describing the location in memory and on the device.
-@@ -3020,6 +3022,12 @@ end_io:
- 
- 		if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
- 			goto end_io;
-+		/* this is cfs's dev_rdonly check */
-+		if (bio->bi_rw == WRITE &&
-+				dev_check_rdonly(bio->bi_bdev)) {
-+			bio_endio(bio, bio->bi_size, 0);
-+			break;
-+		}
- 
- 		/*
- 		 * If this device has partitions, remap block n
-@@ -3593,6 +3601,91 @@ void swap_io_context(struct io_context *
- 	*ioc2 = temp;
- }
- EXPORT_SYMBOL(swap_io_context);
-+ /*
-+ * Debug code for turning block devices "read-only" (will discard writes
-+ * silently).  This is for filesystem crash/recovery testing.
-+ */
-+struct deventry {
-+	dev_t dev;
-+	struct deventry *next;
-+};
-+
-+static struct deventry *devlist = NULL;
-+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; 
-+
-+int dev_check_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur;
-+	if (!bdev) return 0;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			return 1;
-+	}
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+	return 0;
-+}
-+
-+void dev_set_rdonly(struct block_device *bdev)
-+{
-+	struct deventry *newdev, *cur;
-+
-+	if (!bdev) 
-+		return;
-+	newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL);
-+	if (!newdev) 
-+		return;
-+	
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			kfree(newdev);
-+			return;
-+		}
-+		cur = cur->next;
-+	}
-+	newdev->dev = bdev->bd_dev;
-+	newdev->next = devlist;
-+	devlist = newdev;
-+	spin_unlock(&devlock);
-+	printk(KERN_WARNING "Turning device %s (%#x) read-only\n",
-+	       bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev);
-+}
-+
-+void dev_clear_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur, *last = NULL;
-+	if (!bdev) return;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			if (last) 
-+				last->next = cur->next;
-+			else
-+				devlist = cur->next;
-+			spin_unlock(&devlock);
-+			kfree(cur);
-+			printk(KERN_WARNING "Removing read-only on %s (%#x)\n",
-+			       bdev->bd_disk ? bdev->bd_disk->disk_name :
-+					       "unknown block", bdev->bd_dev);
-+			return;
-+		}
-+		last = cur;
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+}
-+
-+EXPORT_SYMBOL(dev_set_rdonly);
-+EXPORT_SYMBOL(dev_clear_rdonly);
-+EXPORT_SYMBOL(dev_check_rdonly);
- 
- /*
-  * sysfs parts below
-diff -rup linux-2.6.16.i686.orig/fs/block_dev.c linux-2.6.16.i686/fs/block_dev.c
---- linux-2.6.16.i686.orig/fs/block_dev.c	2006-03-20 07:53:29.000000000 +0200
-+++ linux-2.6.16.i686/fs/block_dev.c	2007-05-29 15:35:00.000000000 +0300
-@@ -60,6 +60,7 @@ static void kill_bdev(struct block_devic
- {
- 	invalidate_bdev(bdev, 1);
- 	truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-+	dev_clear_rdonly(bdev);
- }	
- 
- int set_blocksize(struct block_device *bdev, int size)
-diff -rup linux-2.6.16.i686.orig/include/linux/fs.h linux-2.6.16.i686/include/linux/fs.h
---- linux-2.6.16.i686.orig/include/linux/fs.h	2007-05-29 15:24:38.000000000 +0300
-+++ linux-2.6.16.i686/include/linux/fs.h	2007-05-29 15:33:50.000000000 +0300
-@@ -1541,6 +1541,10 @@ extern void file_kill(struct file *f);
- struct bio;
- extern void submit_bio(int, struct bio *);
- extern int bdev_read_only(struct block_device *);
-+#define HAVE_CLEAR_RDONLY_ON_PUT
-+void dev_set_rdonly(struct block_device *bdev);
-+int dev_check_rdonly(struct block_device *bdev);
-+void dev_clear_rdonly(struct block_device *bdev);
- extern int set_blocksize(struct block_device *, int);
- extern int sb_set_blocksize(struct super_block *, int);
- extern int sb_min_blocksize(struct super_block *, int);
diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch
deleted file mode 100644
index c6b38aba38e531de72501e568e2933086e0b08fc..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/dev_read_only-2.6-lnxi.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-diff -ur linux-2.6.5-lnxi.orig/drivers/block/ll_rw_blk.c linux-2.6.5-lnxi/drivers/block/ll_rw_blk.c
---- linux-2.6.5-lnxi.orig/drivers/block/ll_rw_blk.c	2004-11-11 07:28:51.000000000 -0800
-+++ linux-2.6.5-lnxi/drivers/block/ll_rw_blk.c	2005-04-11 09:42:22.750936924 -0700
-@@ -2458,7 +2458,7 @@ static inline void blk_partition_remap(s
- 	}
- }
- 
--int dev_check_rdonly(dev_t dev);
-+int dev_check_rdonly(struct block_device *bdev);
- 
- /**
-  * generic_make_request: hand a buffer to its device driver for I/O
-@@ -2550,7 +2550,7 @@ end_io:
- 
- 		/* this is cfs's dev_rdonly check */
- 		if (bio->bi_rw == WRITE &&
--				dev_check_rdonly(bio->bi_bdev->bd_dev)) {
-+				dev_check_rdonly(bio->bi_bdev)) {
- 			bio_endio(bio, bio->bi_size, 0);
- 			break;
- 		}
-@@ -3086,53 +3086,86 @@ void swap_io_context(struct io_context *
- 	*ioc2 = temp;
- }
- 
--#define MAX_RDONLY_DEVS		16
--
--static dev_t rdonly_devs[MAX_RDONLY_DEVS] = {0, };
--
- /*
-  * Debug code for turning block devices "read-only" (will discard writes
-  * silently).  This is for filesystem crash/recovery testing.
-  */
--void dev_set_rdonly(struct block_device *bdev, int no_write)
-+struct deventry {
-+	dev_t dev;
-+	struct deventry *next;
-+};
-+
-+static struct deventry *devlist = NULL;
-+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; 
-+
-+int dev_check_rdonly(struct block_device *bdev) 
- {
--	if (no_write >= MAX_RDONLY_DEVS) {
--		printk(KERN_ALERT "%s:%d illegal arg %d (max %d)\n",
--				__FILE__, __LINE__, no_write, MAX_RDONLY_DEVS);
--		return;
-+	struct deventry *cur;
-+	if (!bdev) return 0;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			return 1;
- 	}
--
--	if (bdev) {
--		printk(KERN_WARNING "Turning device %s read-only at %d\n",
--				bdev->bd_disk ? bdev->bd_disk->disk_name : "?",
--				no_write);
--		rdonly_devs[no_write] = bdev->bd_dev;
-+		cur = cur->next;
- 	}
-+	spin_unlock(&devlock);
-+	return 0;
- }
- 
--void dev_clear_rdonly(int no_write)
-+void dev_set_rdonly(struct block_device *bdev)
- {
--	if (no_write >= MAX_RDONLY_DEVS) {
--		printk(KERN_ALERT "%s:%d illegal arg %d (max %d)\n",
--				__FILE__, __LINE__, no_write, MAX_RDONLY_DEVS);
--		return;
--	}
-+	struct deventry *newdev, *cur;
- 
--	if (rdonly_devs[no_write] == 0)
-+	if (!bdev) 
-+		return;
-+	newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL);
-+	if (!newdev) 
- 		return;
- 	
--	printk(KERN_WARNING "Clearing read-only at %d\n", no_write);
--	rdonly_devs[no_write] = 0;
--}
--
--int dev_check_rdonly(dev_t dev)
--{
--	int i;
--
--	for (i = 0; i < MAX_RDONLY_DEVS; i++)
--		if (rdonly_devs[i] == dev)
--			return 1;
--	return 0;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			kfree(newdev);
-+			return;
-+		}
-+		cur = cur->next;
-+	}
-+	newdev->dev = bdev->bd_dev;
-+	newdev->next = devlist;
-+	devlist = newdev;
-+	spin_unlock(&devlock);
-+	printk(KERN_WARNING "Turning device %s (%#x) read-only\n",
-+	       bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev);
-+}
-+
-+void dev_clear_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur, *last = NULL;
-+	if (!bdev) return;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			if (last) 
-+				last->next = cur->next;
-+			else
-+				devlist = cur->next;
-+			spin_unlock(&devlock);
-+			kfree(cur);
-+			printk(KERN_WARNING "Removing read-only on %s (%#x)\n",
-+			       bdev->bd_disk ? bdev->bd_disk->disk_name :
-+					       "unknown block", bdev->bd_dev);
-+			return;
-+		}
-+		last = cur;
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
- }
- 
- EXPORT_SYMBOL(dev_set_rdonly);
-diff -ur linux-2.6.5-lnxi.orig/fs/block_dev.c linux-2.6.5-lnxi/fs/block_dev.c
---- linux-2.6.5-lnxi.orig/fs/block_dev.c	2004-11-11 07:28:30.000000000 -0800
-+++ linux-2.6.5-lnxi/fs/block_dev.c	2005-04-11 09:49:01.891407856 -0700
-@@ -739,6 +739,7 @@ int blkdev_put(struct block_device *bdev
- 	}
- 	unlock_kernel();
- 	up(&bdev->bd_sem);
-+	dev_clear_rdonly(bdev);
- 	bdput(bdev);
- 	return ret;
- }
-diff -ur linux-2.6.5-lnxi.orig/include/linux/fs.h linux-2.6.5-lnxi/include/linux/fs.h
---- linux-2.6.5-lnxi.orig/include/linux/fs.h	2004-11-11 07:28:45.000000000 -0800
-+++ linux-2.6.5-lnxi/include/linux/fs.h	2005-04-11 09:43:27.423116140 -0700
-@@ -1385,6 +1385,10 @@ extern void file_kill(struct file *f);
- struct bio;
- extern int submit_bio(int, struct bio *);
- extern int bdev_read_only(struct block_device *);
-+#define HAVE_CLEAR_RDONLY_ON_PUT
-+void dev_set_rdonly(struct block_device *bdev);
-+int dev_check_rdonly(struct block_device *bdev);
-+void dev_clear_rdonly(struct block_device *bdev);
- extern int set_blocksize(struct block_device *, int);
- extern int sb_set_blocksize(struct super_block *, int);
- extern int sb_min_blocksize(struct super_block *, int);
diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch b/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch
deleted file mode 100644
index e486944af29f73c3addde200132feb35e5bfd357..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/dev_read_only-2.6-suse.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-Index: linux-2.6.9/drivers/block/ll_rw_blk.c
-===================================================================
---- linux-2.6.9.orig/drivers/block/ll_rw_blk.c
-+++ linux-2.6.9/drivers/block/ll_rw_blk.c
-@@ -2326,6 +2326,8 @@ static inline int attempt_front_merge(re
- 	return 0;
- }
- 
-+int dev_check_rdonly(struct block_device *bdev);
-+
- /**
-  * blk_attempt_remerge  - attempt to remerge active head with next request
-  * @q:    The &request_queue_t belonging to the device
-@@ -2631,6 +2633,13 @@ end_io:
- 		if (test_bit(QUEUE_FLAG_DEAD, &q->queue_flags))
- 			goto end_io;
- 
-+		/* this is cfs's dev_rdonly check */
-+		if (bio->bi_rw == WRITE &&
-+				dev_check_rdonly(bio->bi_bdev)) {
-+			bio_endio(bio, bio->bi_size, 0);
-+			break;
-+		}
-+
- 		/*
- 		 * If this device has partitions, remap block n
- 		 * of partition p to block n+start(p) of the disk.
-@@ -3180,6 +3189,92 @@ void swap_io_context(struct io_context *
- 
- 
- /*
-+ * Debug code for turning block devices "read-only" (will discard writes
-+ * silently).  This is for filesystem crash/recovery testing.
-+ */
-+struct deventry {
-+	dev_t dev;
-+	struct deventry *next;
-+};
-+
-+static struct deventry *devlist = NULL;
-+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; 
-+
-+int dev_check_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur;
-+	if (!bdev) return 0;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			return 1;
-+	}
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+	return 0;
-+}
-+
-+void dev_set_rdonly(struct block_device *bdev)
-+{
-+	struct deventry *newdev, *cur;
-+
-+	if (!bdev) 
-+		return;
-+	newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL);
-+	if (!newdev) 
-+		return;
-+	
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			kfree(newdev);
-+			return;
-+		}
-+		cur = cur->next;
-+	}
-+	newdev->dev = bdev->bd_dev;
-+	newdev->next = devlist;
-+	devlist = newdev;
-+	spin_unlock(&devlock);
-+	printk(KERN_WARNING "Turning device %s (%#x) read-only\n",
-+	       bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev);
-+}
-+
-+void dev_clear_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur, *last = NULL;
-+	if (!bdev) return;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			if (last) 
-+				last->next = cur->next;
-+			else
-+				devlist = cur->next;
-+			spin_unlock(&devlock);
-+			kfree(cur);
-+			printk(KERN_WARNING "Removing read-only on %s (%#x)\n",
-+			       bdev->bd_disk ? bdev->bd_disk->disk_name :
-+					       "unknown block", bdev->bd_dev);
-+			return;
-+		}
-+		last = cur;
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+}
-+
-+EXPORT_SYMBOL(dev_set_rdonly);
-+EXPORT_SYMBOL(dev_clear_rdonly);
-+EXPORT_SYMBOL(dev_check_rdonly);
-+
-+/*
-  * sysfs parts below
-  */
- struct queue_sysfs_entry {
-Index: linux-2.6.9/fs/block_dev.c
-===================================================================
---- linux-2.6.9.orig/fs/block_dev.c
-+++ linux-2.6.9/fs/block_dev.c
-@@ -60,6 +60,7 @@ static void kill_bdev(struct block_devic
- {
- 	invalidate_bdev(bdev, 1);
- 	truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-+	dev_clear_rdonly(bdev);
- }	
- 
- int set_blocksize(struct block_device *bdev, int size)
-Index: linux-2.6.9/include/linux/fs.h
-===================================================================
---- linux-2.6.9.orig/include/linux/fs.h
-+++ linux-2.6.9/include/linux/fs.h
-@@ -1492,6 +1492,10 @@ extern void file_kill(struct file *f);
- struct bio;
- extern void submit_bio(int, struct bio *);
- extern int bdev_read_only(struct block_device *);
-+#define HAVE_CLEAR_RDONLY_ON_PUT
-+void dev_set_rdonly(struct block_device *bdev);
-+int dev_check_rdonly(struct block_device *bdev);
-+void dev_clear_rdonly(struct block_device *bdev);
- extern int set_blocksize(struct block_device *, int);
- extern int sb_set_blocksize(struct super_block *, int);
- extern int sb_min_blocksize(struct super_block *, int);
diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch
deleted file mode 100644
index ff6cf917b74802dcbd151155838593f2421d3cc1..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/dev_read_only-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-diff -urp linux-2.6.18.1.orig/block/ll_rw_blk.c linux-2.6.18.1/block/ll_rw_blk.c
---- linux-2.6.18.1.orig/block/ll_rw_blk.c	2006-10-14 06:34:03.000000000 +0300
-+++ linux-2.6.18.1/block/ll_rw_blk.c	2007-05-29 14:50:46.000000000 +0300
-@@ -2993,6 +2993,8 @@ static void handle_bad_sector(struct bio
- 	set_bit(BIO_EOF, &bio->bi_flags);
- }
- 
-+int dev_check_rdonly(struct block_device *bdev);
-+
- /**
-  * generic_make_request: hand a buffer to its device driver for I/O
-  * @bio:  The bio describing the location in memory and on the device.
-@@ -3076,6 +3078,12 @@ end_io:
- 
- 		if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
- 			goto end_io;
-+		/* this is cfs's dev_rdonly check */
-+		if (bio->bi_rw == WRITE &&
-+				dev_check_rdonly(bio->bi_bdev)) {
-+			bio_endio(bio, bio->bi_size, 0);
-+			break;
-+		}
- 
- 		/*
- 		 * If this device has partitions, remap block n
-@@ -3675,6 +3683,91 @@ void swap_io_context(struct io_context *
- 	*ioc2 = temp;
- }
- EXPORT_SYMBOL(swap_io_context);
-+ /*
-+ * Debug code for turning block devices "read-only" (will discard writes
-+ * silently).  This is for filesystem crash/recovery testing.
-+ */
-+struct deventry {
-+	dev_t dev;
-+	struct deventry *next;
-+};
-+
-+static struct deventry *devlist = NULL;
-+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; 
-+
-+int dev_check_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur;
-+	if (!bdev) return 0;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			return 1;
-+	}
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+	return 0;
-+}
-+
-+void dev_set_rdonly(struct block_device *bdev)
-+{
-+	struct deventry *newdev, *cur;
-+
-+	if (!bdev) 
-+		return;
-+	newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL);
-+	if (!newdev) 
-+		return;
-+	
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			kfree(newdev);
-+			return;
-+		}
-+		cur = cur->next;
-+	}
-+	newdev->dev = bdev->bd_dev;
-+	newdev->next = devlist;
-+	devlist = newdev;
-+	spin_unlock(&devlock);
-+	printk(KERN_WARNING "Turning device %s (%#x) read-only\n",
-+	       bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev);
-+}
-+
-+void dev_clear_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur, *last = NULL;
-+	if (!bdev) return;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			if (last) 
-+				last->next = cur->next;
-+			else
-+				devlist = cur->next;
-+			spin_unlock(&devlock);
-+			kfree(cur);
-+			printk(KERN_WARNING "Removing read-only on %s (%#x)\n",
-+			       bdev->bd_disk ? bdev->bd_disk->disk_name :
-+					       "unknown block", bdev->bd_dev);
-+			return;
-+		}
-+		last = cur;
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+}
-+
-+EXPORT_SYMBOL(dev_set_rdonly);
-+EXPORT_SYMBOL(dev_clear_rdonly);
-+EXPORT_SYMBOL(dev_check_rdonly);
- 
- /*
-  * sysfs parts below
-diff -urp linux-2.6.18.1.orig/fs/block_dev.c linux-2.6.18.1/fs/block_dev.c
---- linux-2.6.18.1.orig/fs/block_dev.c	2006-10-14 06:34:03.000000000 +0300
-+++ linux-2.6.18.1/fs/block_dev.c	2007-05-29 14:53:38.000000000 +0300
-@@ -58,6 +58,7 @@ static void kill_bdev(struct block_devic
- {
- 	invalidate_bdev(bdev, 1);
- 	truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-+	dev_clear_rdonly(bdev);
- }	
- 
- int set_blocksize(struct block_device *bdev, int size)
-diff -urp linux-2.6.18.1.orig/include/linux/fs.h linux-2.6.18.1/include/linux/fs.h
---- linux-2.6.18.1.orig/include/linux/fs.h	2006-10-14 06:34:03.000000000 +0300
-+++ linux-2.6.18.1/include/linux/fs.h	2007-05-29 14:50:46.000000000 +0300
-@@ -1632,6 +1632,10 @@ extern void file_kill(struct file *f);
- struct bio;
- extern void submit_bio(int, struct bio *);
- extern int bdev_read_only(struct block_device *);
-+#define HAVE_CLEAR_RDONLY_ON_PUT
-+void dev_set_rdonly(struct block_device *bdev);
-+int dev_check_rdonly(struct block_device *bdev);
-+void dev_clear_rdonly(struct block_device *bdev);
- extern int set_blocksize(struct block_device *, int);
- extern int sb_set_blocksize(struct super_block *, int);
- extern int sb_min_blocksize(struct super_block *, int);
diff --git a/lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch
deleted file mode 100644
index 8d144d63ae1066a85c4b14803481493282cc8cc7..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/dev_read_only-2.6.22-vanilla.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-Index: linux-2.6.22.5/block/ll_rw_blk.c
-===================================================================
---- linux-2.6.22.5.orig/block/ll_rw_blk.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/block/ll_rw_blk.c	2008-02-21 01:07:16.000000000 -0700
-@@ -3101,6 +3101,8 @@
- 
- #endif /* CONFIG_FAIL_MAKE_REQUEST */
- 
-+int dev_check_rdonly(struct block_device *bdev);
-+
- /**
-  * generic_make_request: hand a buffer to its device driver for I/O
-  * @bio:  The bio describing the location in memory and on the device.
-@@ -3185,6 +3187,12 @@
- 
- 		if (unlikely(test_bit(QUEUE_FLAG_DEAD, &q->queue_flags)))
- 			goto end_io;
-+		/* this is cfs's dev_rdonly check */
-+		if (bio->bi_rw == WRITE &&
-+				dev_check_rdonly(bio->bi_bdev)) {
-+			bio_endio(bio, bio->bi_size, 0);
-+			break;
-+		}
- 
- 		if (should_fail_request(bio))
- 			goto end_io;
-@@ -3850,6 +3858,91 @@
- 	*ioc2 = temp;
- }
- EXPORT_SYMBOL(swap_io_context);
-+ /*
-+ * Debug code for turning block devices "read-only" (will discard writes
-+ * silently).  This is for filesystem crash/recovery testing.
-+ */
-+struct deventry {
-+	dev_t dev;
-+	struct deventry *next;
-+};
-+
-+static struct deventry *devlist = NULL;
-+static spinlock_t devlock = SPIN_LOCK_UNLOCKED; 
-+
-+int dev_check_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur;
-+	if (!bdev) return 0;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			return 1;
-+	}
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+	return 0;
-+}
-+
-+void dev_set_rdonly(struct block_device *bdev)
-+{
-+	struct deventry *newdev, *cur;
-+
-+	if (!bdev) 
-+		return;
-+	newdev = kmalloc(sizeof(struct deventry), GFP_KERNEL);
-+	if (!newdev) 
-+		return;
-+	
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			spin_unlock(&devlock);
-+			kfree(newdev);
-+			return;
-+		}
-+		cur = cur->next;
-+	}
-+	newdev->dev = bdev->bd_dev;
-+	newdev->next = devlist;
-+	devlist = newdev;
-+	spin_unlock(&devlock);
-+	printk(KERN_WARNING "Turning device %s (%#x) read-only\n",
-+	       bdev->bd_disk ? bdev->bd_disk->disk_name : "", bdev->bd_dev);
-+}
-+
-+void dev_clear_rdonly(struct block_device *bdev) 
-+{
-+	struct deventry *cur, *last = NULL;
-+	if (!bdev) return;
-+	spin_lock(&devlock);
-+	cur = devlist;
-+	while(cur) {
-+		if (bdev->bd_dev == cur->dev) {
-+			if (last) 
-+				last->next = cur->next;
-+			else
-+				devlist = cur->next;
-+			spin_unlock(&devlock);
-+			kfree(cur);
-+			printk(KERN_WARNING "Removing read-only on %s (%#x)\n",
-+			       bdev->bd_disk ? bdev->bd_disk->disk_name :
-+					       "unknown block", bdev->bd_dev);
-+			return;
-+		}
-+		last = cur;
-+		cur = cur->next;
-+	}
-+	spin_unlock(&devlock);
-+}
-+
-+EXPORT_SYMBOL(dev_set_rdonly);
-+EXPORT_SYMBOL(dev_clear_rdonly);
-+EXPORT_SYMBOL(dev_check_rdonly);
- 
- /*
-  * sysfs parts below
-Index: linux-2.6.22.5/fs/block_dev.c
-===================================================================
---- linux-2.6.22.5.orig/fs/block_dev.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/fs/block_dev.c	2008-02-21 01:07:16.000000000 -0700
-@@ -63,6 +63,7 @@
- 		return;
- 	invalidate_bh_lrus();
- 	truncate_inode_pages(bdev->bd_inode->i_mapping, 0);
-+	dev_clear_rdonly(bdev);
- }	
- 
- int set_blocksize(struct block_device *bdev, int size)
-Index: linux-2.6.22.5/include/linux/fs.h
-===================================================================
---- linux-2.6.22.5.orig/include/linux/fs.h	2008-02-21 00:58:18.000000000 -0700
-+++ linux-2.6.22.5/include/linux/fs.h	2008-02-21 01:07:16.000000000 -0700
-@@ -1744,6 +1744,10 @@
- extern void submit_bio(int, struct bio *);
- extern int bdev_read_only(struct block_device *);
- #endif
-+#define HAVE_CLEAR_RDONLY_ON_PUT
-+extern void dev_set_rdonly(struct block_device *bdev);
-+extern int dev_check_rdonly(struct block_device *bdev);
-+extern void dev_clear_rdonly(struct block_device *bdev);
- extern int set_blocksize(struct block_device *, int);
- extern int sb_set_blocksize(struct super_block *, int);
- extern int sb_min_blocksize(struct super_block *, int);
diff --git a/lustre/kernel_patches/patches/export-2.6-fc5.patch b/lustre/kernel_patches/patches/export-2.6-fc5.patch
deleted file mode 100644
index fdfb2f79c1cd66dfcd24d2356270a768ee7fb0d4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-2.6-fc5.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.16.i686/fs/jbd/journal.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/jbd/journal.c	2006-05-30 22:10:16.000000000 +0800
-+++ linux-2.6.16.i686/fs/jbd/journal.c	2006-05-30 22:17:26.000000000 +0800
-@@ -71,6 +71,7 @@
- EXPORT_SYMBOL(journal_errno);
- EXPORT_SYMBOL(journal_ack_err);
- EXPORT_SYMBOL(journal_clear_err);
-+EXPORT_SYMBOL(log_start_commit);
- EXPORT_SYMBOL(log_wait_commit);
- EXPORT_SYMBOL(journal_start_commit);
- EXPORT_SYMBOL(journal_force_commit_nested);
diff --git a/lustre/kernel_patches/patches/export-2.6-suse.patch b/lustre/kernel_patches/patches/export-2.6-suse.patch
deleted file mode 100644
index 3ab174054bf762edcb01b4e82da9e72b3236ee5e..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-2.6-suse.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: linux-2.6.3/fs/open.c
-===================================================================
---- linux-2.6.3.orig/fs/open.c	2004-02-23 14:36:25.000000000 -0800
-+++ linux-2.6.3/fs/open.c	2004-02-23 20:09:34.000000000 -0800
-@@ -881,6 +881,7 @@
- 	return ERR_PTR(error);
- }
- 
-+EXPORT_SYMBOL(filp_open);
- 
- struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
- {
-Index: linux-2.6.3/fs/jbd/journal.c
-===================================================================
---- linux-2.6.3.orig/fs/jbd/journal.c	2004-01-08 22:59:10.000000000 -0800
-+++ linux-2.6.3/fs/jbd/journal.c	2004-02-23 20:09:34.000000000 -0800
-@@ -71,6 +71,7 @@
- EXPORT_SYMBOL(journal_errno);
- EXPORT_SYMBOL(journal_ack_err);
- EXPORT_SYMBOL(journal_clear_err);
-+EXPORT_SYMBOL(log_start_commit);
- EXPORT_SYMBOL(log_wait_commit);
- EXPORT_SYMBOL(journal_start_commit);
- EXPORT_SYMBOL(journal_wipe);
diff --git a/lustre/kernel_patches/patches/export-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export-2.6.18-vanilla.patch
deleted file mode 100644
index a6813e621dcf22ac8adb839e016051760a348210..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: linux-2.6/fs/open.c
-===================================================================
---- linux-2.6.orig/fs/open.c	2006-07-15 16:10:37.000000000 +0800
-+++ linux-2.6/fs/open.c	2006-07-15 16:22:04.000000000 +0800
-@@ -808,7 +808,6 @@ asmlinkage long sys_lchown(const char __
- 	return error;
- }
- 
--
- asmlinkage long sys_fchown(unsigned int fd, uid_t user, gid_t group)
- {
- 	struct file * file;
-Index: linux-2.6/fs/jbd/journal.c
-===================================================================
---- linux-2.6.orig/fs/jbd/journal.c	2006-07-15 16:13:50.000000000 +0800
-+++ linux-2.6/fs/jbd/journal.c	2006-07-15 16:22:04.000000000 +0800
-@@ -74,6 +74,7 @@ EXPORT_SYMBOL(journal_abort);
- EXPORT_SYMBOL(journal_errno);
- EXPORT_SYMBOL(journal_ack_err);
- EXPORT_SYMBOL(journal_clear_err);
-+EXPORT_SYMBOL(log_start_commit);
- EXPORT_SYMBOL(log_wait_commit);
- EXPORT_SYMBOL(journal_start_commit);
- EXPORT_SYMBOL(journal_force_commit_nested);
diff --git a/lustre/kernel_patches/patches/export-do_kern_mount.patch b/lustre/kernel_patches/patches/export-do_kern_mount.patch
deleted file mode 100644
index 4abb3861afbee3c71a347b94aea34f0142f51fc4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-do_kern_mount.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-Index: linux-2.6/fs/super.c
-===================================================================
---- linux-2.6.orig/fs/super.c	2006-07-20 10:51:39.000000000 +0800
-+++ linux-2.6/fs/super.c	2006-07-20 10:51:59.000000000 +0800
-@@ -877,6 +877,8 @@ do_kern_mount(const char *fstype, int fl
- 	return mnt;
- }
- 
-+EXPORT_SYMBOL_GPL(do_kern_mount);
-+
- struct vfsmount *kern_mount(struct file_system_type *type)
- {
- 	return vfs_kern_mount(type, 0, type->name, NULL);
diff --git a/lustre/kernel_patches/patches/export-log-2.6-rhel4.patch b/lustre/kernel_patches/patches/export-log-2.6-rhel4.patch
deleted file mode 100644
index 5bfc1544c30e8724954b1dab873cf0a11d27af7b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-log-2.6-rhel4.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.3/fs/jbd/journal.c
-===================================================================
---- linux-2.6.3.orig/fs/jbd/journal.c	2004-01-08 22:59:10.000000000 -0800
-+++ linux-2.6.3/fs/jbd/journal.c	2004-02-23 20:09:34.000000000 -0800
-@@ -71,6 +71,7 @@
- EXPORT_SYMBOL(journal_errno);
- EXPORT_SYMBOL(journal_ack_err);
- EXPORT_SYMBOL(journal_clear_err);
-+EXPORT_SYMBOL(log_start_commit);
- EXPORT_SYMBOL(log_wait_commit);
- EXPORT_SYMBOL(journal_start_commit);
- EXPORT_SYMBOL(journal_wipe);
diff --git a/lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch b/lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch
deleted file mode 100644
index 855c359fef7c5f2b72339a13039a328764c15a9a..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-show_task-2.6-fc5.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.16.i686/kernel/sched.c
-===================================================================
---- linux-2.6.16.i686.orig/kernel/sched.c	2006-05-30 15:47:15.000000000 +0800
-+++ linux-2.6.16.i686/kernel/sched.c	2006-05-30 21:21:07.000000000 +0800
-@@ -4240,7 +4240,7 @@
- 	return list_entry(p->sibling.next,struct task_struct,sibling);
- }
- 
--static void show_task(task_t *p)
-+void show_task(task_t *p)
- {
- 	task_t *relative;
- 	unsigned state;
-@@ -4290,9 +4290,10 @@
- 	else
- 		printk(" (NOTLB)\n");
- 
--	if (state != TASK_RUNNING)
-+	if (state != TASK_RUNNING || p == current)
- 		show_stack(p, NULL);
- }
-+EXPORT_SYMBOL(show_task);
- 
- void show_state(void)
- {
diff --git a/lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch b/lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch
deleted file mode 100644
index 828d3ab16d50ceae33ea34ab2f61b88a1813ce11..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-show_task-2.6-vanilla.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.5-SLES9_SP1_BRANCH_2004102113353091/kernel/sched.c
-===================================================================
---- linux-2.6.5-SLES9_SP1_BRANCH_2004102113353091.orig/kernel/sched.c	2004-10-22 15:25:05.000000000 -0400
-+++ linux-2.6.5-SLES9_SP1_BRANCH_2004102113353091/kernel/sched.c	2004-10-22 15:39:18.000000000 -0400
-@@ -3147,7 +3147,7 @@
- 	return list_entry(p->sibling.next,struct task_struct,sibling);
- }
- 
--static void show_task(task_t * p)
-+void show_task(task_t * p)
- {
- 	task_t *relative;
- 	unsigned state;
-@@ -3200,9 +3200,10 @@
- 	else
- 		printk(" (NOTLB)\n");
- 
--	if (state != TASK_RUNNING)
-+	if (state != TASK_RUNNING || p == current)
- 		show_stack(p, NULL);
- }
-+EXPORT_SYMBOL(show_task);
- 
- void show_state(void)
- {
diff --git a/lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch
deleted file mode 100644
index 834c886c3022a4c855472b9956b7635c185b189c..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-show_task-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6/kernel/sched.c
-===================================================================
---- linux-2.6.orig/kernel/sched.c	2006-07-15 11:51:46.000000000 +0800
-+++ linux-2.6/kernel/sched.c	2006-07-15 16:24:35.000000000 +0800
-@@ -4652,7 +4652,7 @@ static inline struct task_struct *younge
- 
- static const char stat_nam[] = "RSDTtZX";
- 
--static void show_task(struct task_struct *p)
-+void show_task(struct task_struct *p)
- {
- 	struct task_struct *relative;
- 	unsigned long free = 0;
-@@ -4698,9 +4698,10 @@ static void show_task(struct task_struct
- 	else
- 		printk(" (NOTLB)\n");
- 
--	if (state != TASK_RUNNING)
-+	if (state != TASK_RUNNING || p == current)
- 		show_stack(p, NULL);
- }
-+EXPORT_SYMBOL(show_task);
- 
- void show_state(void)
- {
diff --git a/lustre/kernel_patches/patches/export-truncate-2.6-suse.patch b/lustre/kernel_patches/patches/export-truncate-2.6-suse.patch
deleted file mode 100644
index 3063be429b092df87cfab2840af4875bb44e521d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-truncate-2.6-suse.patch
+++ /dev/null
@@ -1,37 +0,0 @@
- include/linux/mm.h |    2 ++
- mm/truncate.c      |    4 ++--
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
---- linux-2.5.63/include/linux/mm.h~export-truncate-2.5.63	Mon May  5 18:08:15 2003
-+++ linux-2.5.63-root/include/linux/mm.h	Mon May  5 18:08:58 2003
-@@ -540,6 +540,8 @@ can_vma_merge(struct vm_area_struct *vma
- 	else
- 		return 0;
- }
-+/* truncate.c */
-+extern void truncate_complete_page(struct address_space *mapping,struct page *);
- 
- /* filemap.c */
- extern unsigned long page_unuse(struct page *);
---- linux-2.5.63/mm/truncate.c~export-truncate-2.5.63	Mon May  5 18:09:50 2003
-+++ linux-2.5.63-root/mm/truncate.c	Mon May  5 18:11:29 2003
-@@ -41,7 +41,7 @@ static inline void truncate_partial_page
-  * its lock, b) when a concurrent invalidate_inode_pages got there first and
-  * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space.
-  */
--static void
-+void
- truncate_complete_page(struct address_space *mapping, struct page *page)
- {
- 	if (page->mapping != mapping)
-@@ -56,7 +56,7 @@ truncate_complete_page(struct address_sp
- 	remove_from_page_cache(page);
- 	page_cache_release(page);	/* pagecache ref */
- }
--
-+EXPORT_SYMBOL_GPL(truncate_complete_page);
- /*
-  * This is for invalidate_inode_pages().  That function can be called at
-  * any time, and is not supposed to throw away dirty pages.  But pages can
-
-_
diff --git a/lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch
deleted file mode 100644
index f956ef468175892d611c3efaae1371a99a3b663f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export-truncate-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,39 +0,0 @@
- include/linux/mm.h |    2 ++
- mm/truncate.c      |    4 ++--
- 2 files changed, 4 insertions(+), 2 deletions(-)
-
-Index: linux-2.6/include/linux/mm.h
-===================================================================
---- linux-2.6.orig/include/linux/mm.h	2006-07-06 23:41:48.000000000 +0800
-+++ linux-2.6/include/linux/mm.h	2006-07-15 12:55:07.000000000 +0800
-@@ -529,6 +529,8 @@ static __always_inline void *lowmem_page
- {
- 	return __va(page_to_pfn(page) << PAGE_SHIFT);
- }
-+/* truncate.c */
-+extern void truncate_complete_page(struct address_space *mapping,struct page *);
- 
- #if defined(CONFIG_HIGHMEM) && !defined(WANT_PAGE_VIRTUAL)
- #define HASHED_PAGE_VIRTUAL
-Index: linux-2.6/mm/truncate.c
-===================================================================
---- linux-2.6.orig/mm/truncate.c	2006-06-24 14:22:39.000000000 +0800
-+++ linux-2.6/mm/truncate.c	2006-07-15 12:55:07.000000000 +0800
-@@ -33,7 +33,7 @@ static inline void truncate_partial_page
-  * its lock, b) when a concurrent invalidate_inode_pages got there first and
-  * c) when tmpfs swizzles a page between a tmpfs inode and swapper_space.
-  */
--static void
-+void
- truncate_complete_page(struct address_space *mapping, struct page *page)
- {
- 	if (page->mapping != mapping)
-@@ -48,7 +48,7 @@ truncate_complete_page(struct address_sp
- 	remove_from_page_cache(page);
- 	page_cache_release(page);	/* pagecache ref */
- }
--
-+EXPORT_SYMBOL_GPL(truncate_complete_page);
- /*
-  * This is for invalidate_inode_pages().  That function can be called at
-  * any time, and is not supposed to throw away dirty pages.  But pages can
diff --git a/lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch b/lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch
deleted file mode 100644
index 095c1def407f5ed12025016686a51c84af105aa2..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbol_numa-2.6-fc5.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.16.i686/arch/i386/kernel/smpboot.c
-===================================================================
---- linux-2.6.16.i686.orig/arch/i386/kernel/smpboot.c	2006-05-30 15:47:03.000000000 +0800
-+++ linux-2.6.16.i686/arch/i386/kernel/smpboot.c	2006-05-30 21:22:02.000000000 +0800
-@@ -579,6 +579,7 @@
- /* which logical CPUs are on which nodes */
- cpumask_t node_2_cpu_mask[MAX_NUMNODES] __read_mostly =
- 				{ [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE };
-+EXPORT_SYMBOL(node_2_cpu_mask);
- /* which node each logical CPU is on */
- int cpu_2_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 };
- EXPORT_SYMBOL(cpu_2_node);
diff --git a/lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch b/lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch
deleted file mode 100644
index a15b2872aabeb55831f22547ee63bccdd4f94246..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbol_numa-2.6.18.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: linux-2.6.18.8/arch/i386/kernel/smpboot.c
-===================================================================
---- linux-2.6.18.8.orig/arch/i386/kernel/smpboot.c	2007-06-05 13:20:25.000000000 +0200
-+++ linux-2.6.18.8/arch/i386/kernel/smpboot.c	2007-06-05 13:20:33.000000000 +0200
-@@ -607,6 +607,7 @@ extern struct {
- /* which logical CPUs are on which nodes */
- cpumask_t node_2_cpu_mask[MAX_NUMNODES] __read_mostly =
- 				{ [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE };
-+EXPORT_SYMBOL(node_2_cpu_mask);
- /* which node each logical CPU is on */
- int cpu_2_node[NR_CPUS] __read_mostly = { [0 ... NR_CPUS-1] = 0 };
- EXPORT_SYMBOL(cpu_2_node);
-Index: linux-2.6.18.8/arch/ia64/kernel/numa.c
-===================================================================
---- linux-2.6.18.8.orig/arch/ia64/kernel/numa.c	2007-06-05 13:21:04.000000000 +0200
-+++ linux-2.6.18.8/arch/ia64/kernel/numa.c	2007-06-05 13:21:28.000000000 +0200
-@@ -28,6 +28,7 @@ u16 cpu_to_node_map[NR_CPUS] __cacheline
- EXPORT_SYMBOL(cpu_to_node_map);
- 
- cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
-+EXPORT_SYMBOL(node_to_cpu_mask);
- 
- void __cpuinit map_cpu_to_node(int cpu, int nid)
- {
diff --git a/lustre/kernel_patches/patches/export_symbol_numa.patch b/lustre/kernel_patches/patches/export_symbol_numa.patch
deleted file mode 100644
index 17ab1e24e3520ae66bae496ffc40bc508b3e00ce..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbol_numa.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: linux-2.6.9-5.0.3.EL/arch/ia64/kernel/smpboot.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/arch/ia64/kernel/smpboot.c	2004-10-18 15:53:43.000000000 -0600
-+++ linux-2.6.9-5.0.3.EL/arch/ia64/kernel/smpboot.c	2005-09-28 16:02:16.000000000 -0600
-@@ -485,6 +485,7 @@
- EXPORT_SYMBOL(cpu_to_node_map);
- /* which logical CPUs are on which nodes */
- cpumask_t node_to_cpu_mask[MAX_NUMNODES] __cacheline_aligned;
-+EXPORT_SYMBOL(node_to_cpu_mask);
- 
- /*
-  * Build cpu to node mapping and initialize the per node cpu masks.
-Index: linux-2.6.9-5.0.3.EL/arch/i386/kernel/smpboot.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/arch/i386/kernel/smpboot.c	2004-10-18 15:54:08.000000000 -0600
-+++ linux-2.6.9-5.0.3.EL/arch/i386/kernel/smpboot.c	2005-09-28 16:28:12.000000000 -0600
-@@ -474,6 +474,7 @@
- /* which logical CPUs are on which nodes */
- cpumask_t node_2_cpu_mask[MAX_NUMNODES] =
- 				{ [0 ... MAX_NUMNODES-1] = CPU_MASK_NONE };
-+EXPORT_SYMBOL(node_2_cpu_mask);
- /* which node each logical CPU is on */
- int cpu_2_node[NR_CPUS] = { [0 ... NR_CPUS-1] = 0 };
- EXPORT_SYMBOL(cpu_2_node);
diff --git a/lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch b/lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch
deleted file mode 100644
index 0561e65db4d4933cbbc72f035ba17c8422d35053..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbols-2.6-rhel4.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-Index: linux-2.6.9-5.0.3.EL/fs/filesystems.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/filesystems.c	2005-02-26 13:24:35.467813664 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/filesystems.c	2005-02-26 13:53:13.794588288 +0200
-@@ -27,7 +27,9 @@
-  */
- 
- static struct file_system_type *file_systems;
--static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
-+rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
-+
-+EXPORT_SYMBOL(file_systems_lock);
- 
- /* WARNING: This can be used only if we _already_ own a reference */
- void get_filesystem(struct file_system_type *fs)
-Index: linux-2.6.9-5.0.3.EL/include/linux/fs.h
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/fs.h	2005-02-26 13:47:37.330738568 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/fs.h	2005-02-26 13:53:13.796587984 +0200
-@@ -1529,6 +1529,7 @@
- 
- extern struct file_operations generic_ro_fops;
- 
-+extern rwlock_t file_systems_lock;
- #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
- 
- extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
-Index: linux-2.6.9-5.0.3.EL/include/linux/ext2_fs_sb.h
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/ext2_fs_sb.h	2005-02-26 13:24:35.470813208 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/ext2_fs_sb.h	2005-02-26 13:53:13.797587832 +0200
-@@ -16,9 +16,11 @@
- #ifndef _LINUX_EXT2_FS_SB
- #define _LINUX_EXT2_FS_SB
- 
-+#ifndef EXT_INCLUDE
-+#define EXT_INCLUDE
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
--
-+#endif
- /*
-  * second extended-fs super-block data in memory
-  */
-Index: linux-2.6.9-5.0.3.EL/fs/namespace.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/namespace.c	2005-02-26 13:47:31.282658016 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/namespace.c	2005-02-26 13:53:13.803586920 +0200
-@@ -1241,6 +1241,7 @@
- 		mntput(old_pwdmnt);
- 	}
- }
-+EXPORT_SYMBOL(set_fs_pwd);
- 
- static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
- {
-Index: linux-2.6.9-5.0.3.EL/kernel/exit.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/kernel/exit.c	2005-02-26 13:47:31.300655280 +0200
-+++ linux-2.6.9-5.0.3.EL/kernel/exit.c	2005-02-26 13:53:13.805586616 +0200
-@@ -244,6 +244,8 @@
- 	write_unlock_irq(&tasklist_lock);
- }
- 
-+EXPORT_SYMBOL(reparent_to_init);
-+
- void __set_special_pids(pid_t session, pid_t pgrp)
- {
- 	struct task_struct *curr = current;
-Index: linux-2.6.9-5.0.3.EL/fs/dcache.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/dcache.c	2005-02-26 13:49:04.365507272 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/dcache.c	2005-02-26 13:53:13.807586312 +0200
-@@ -1526,6 +1526,7 @@
- 
- 	return result;
- }
-+EXPORT_SYMBOL(is_subdir);
- 
- void d_genocide(struct dentry *root)
- {
diff --git a/lustre/kernel_patches/patches/export_symbols-2.6-suse.patch b/lustre/kernel_patches/patches/export_symbols-2.6-suse.patch
deleted file mode 100644
index 8360ce43945c1c8919190ced3fd3332e1c986055..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbols-2.6-suse.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-Index: linux-2.6.4-51.0/fs/filesystems.c
-===================================================================
---- linux-2.6.4-51.0.orig/fs/filesystems.c	2004-04-05 12:41:59.000000000 -0400
-+++ linux-2.6.4-51.0/fs/filesystems.c	2004-04-15 14:59:56.000000000 -0400
-@@ -27,7 +27,9 @@
-  */
- 
- static struct file_system_type *file_systems;
--static rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
-+rwlock_t file_systems_lock = RW_LOCK_UNLOCKED;
-+
-+EXPORT_SYMBOL(file_systems_lock);
- 
- /* WARNING: This can be used only if we _already_ own a reference */
- void get_filesystem(struct file_system_type *fs)
-Index: linux-2.6.4-51.0/include/linux/fs.h
-===================================================================
---- linux-2.6.4-51.0.orig/include/linux/fs.h	2004-04-15 14:59:50.000000000 -0400
-+++ linux-2.6.4-51.0/include/linux/fs.h	2004-04-15 14:59:56.000000000 -0400
-@@ -1432,6 +1432,7 @@
- 
- extern struct file_operations generic_ro_fops;
- 
-+extern rwlock_t file_systems_lock;
- #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
- 
- extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
-Index: linux-2.6.4-51.0/include/linux/ext2_fs_sb.h
-===================================================================
---- linux-2.6.4-51.0.orig/include/linux/ext2_fs_sb.h	2004-04-05 12:42:07.000000000 -0400
-+++ linux-2.6.4-51.0/include/linux/ext2_fs_sb.h	2004-04-15 14:59:56.000000000 -0400
-@@ -16,9 +16,11 @@
- #ifndef _LINUX_EXT2_FS_SB
- #define _LINUX_EXT2_FS_SB
- 
-+#ifndef EXT_INCLUDE
-+#define EXT_INCLUDE
- #include <linux/blockgroup_lock.h>
- #include <linux/percpu_counter.h>
--
-+#endif
- /*
-  * second extended-fs super-block data in memory
-  */
-Index: linux-2.6.5-12.1/kernel/exit.c
-===================================================================
---- linux-2.6.5-12.1.orig/kernel/exit.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/kernel/exit.c	2004-06-03 18:31:28.000000000 -0400
-@@ -260,6 +260,8 @@
- 	write_unlock_irq(&tasklist_lock);
- }
- 
-+EXPORT_SYMBOL(reparent_to_init);
-+
- void __set_special_pids(pid_t session, pid_t pgrp)
- {
- 	struct task_struct *curr = current;
diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.12.patch b/lustre/kernel_patches/patches/export_symbols-2.6.12.patch
deleted file mode 100644
index e21fcf42c502358dbdd76411d78669361e08c28e..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbols-2.6.12.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Index: linux-2.6.12-rc6/fs/filesystems.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/filesystems.c	2005-06-06 17:22:29.000000000 +0200
-+++ linux-2.6.12-rc6/fs/filesystems.c	2005-06-14 15:53:58.298522852 +0200
-@@ -28,7 +28,9 @@
-  */
- 
- static struct file_system_type *file_systems;
--static DEFINE_RWLOCK(file_systems_lock);
-+DEFINE_RWLOCK(file_systems_lock);
-+
-+EXPORT_SYMBOL(file_systems_lock);
- 
- /* WARNING: This can be used only if we _already_ own a reference */
- void get_filesystem(struct file_system_type *fs)
-Index: linux-2.6.12-rc6/include/linux/fs.h
-===================================================================
---- linux-2.6.12-rc6.orig/include/linux/fs.h	2005-06-14 15:53:18.356140529 +0200
-+++ linux-2.6.12-rc6/include/linux/fs.h	2005-06-14 15:53:58.309265039 +0200
-@@ -1563,6 +1563,7 @@
- 
- extern struct file_operations generic_ro_fops;
- 
-+extern rwlock_t file_systems_lock;
- #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
- 
- extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
-Index: linux-2.6.12-rc6/fs/namespace.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/namespace.c	2005-06-14 15:53:17.868835847 +0200
-+++ linux-2.6.12-rc6/fs/namespace.c	2005-06-14 15:53:58.361022851 +0200
-@@ -1240,6 +1240,7 @@
- 		mntput(old_pwdmnt);
- 	}
- }
-+EXPORT_SYMBOL(set_fs_pwd);
- 
- static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
- {
-Index: linux-2.6.12.5/kernel/exit.c
-===================================================================
---- linux-2.6.12.5.orig/kernel/exit.c	2005-08-17 17:51:28.000000000 +0200
-+++ linux-2.6.12.5/kernel/exit.c	2005-08-17 17:51:44.000000000 +0200
-@@ -250,6 +250,8 @@
- 	switch_uid(INIT_USER);
- }
- 
-+EXPORT_SYMBOL(reparent_to_init);
-+
- void __set_special_pids(pid_t session, pid_t pgrp)
- {
- 	struct task_struct *curr = current;
-Index: linux-2.6.12-rc6/fs/dcache.c
-===================================================================
---- linux-2.6.12-rc6.orig/fs/dcache.c	2005-06-14 15:53:19.812195198 +0200
-+++ linux-2.6.12-rc6/fs/dcache.c	2005-06-14 15:53:58.385436913 +0200
-@@ -1581,6 +1581,7 @@
- 
- 	return result;
- }
-+EXPORT_SYMBOL(is_subdir);
- 
- void d_genocide(struct dentry *root)
- {
diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch
deleted file mode 100644
index 18a9815bb18da23605941b374d3c5f37555e7039..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbols-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-Index: linux-2.6/fs/filesystems.c
-===================================================================
---- linux-2.6.orig/fs/filesystems.c	2006-07-15 16:08:35.000000000 +0800
-+++ linux-2.6/fs/filesystems.c	2006-07-15 16:14:19.000000000 +0800
-@@ -29,7 +29,9 @@
-  */
- 
- static struct file_system_type *file_systems;
--static DEFINE_RWLOCK(file_systems_lock);
-+DEFINE_RWLOCK(file_systems_lock);
-+
-+EXPORT_SYMBOL(file_systems_lock);
- 
- /* WARNING: This can be used only if we _already_ own a reference */
- void get_filesystem(struct file_system_type *fs)
-Index: linux-2.6/include/linux/fs.h
-===================================================================
---- linux-2.6.orig/include/linux/fs.h	2006-07-15 16:10:37.000000000 +0800
-+++ linux-2.6/include/linux/fs.h	2006-07-15 16:14:19.000000000 +0800
-@@ -1768,6 +1768,7 @@ static inline ssize_t blockdev_direct_IO
- 
- extern const struct file_operations generic_ro_fops;
- 
-+extern rwlock_t file_systems_lock;
- #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
- 
- extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
-Index: linux-2.6/fs/namespace.c
-===================================================================
---- linux-2.6.orig/fs/namespace.c	2006-07-15 16:10:33.000000000 +0800
-+++ linux-2.6/fs/namespace.c	2006-07-15 16:14:19.000000000 +0800
-@@ -1641,6 +1641,7 @@ void set_fs_pwd(struct fs_struct *fs, st
- 		mntput(old_pwdmnt);
- 	}
- }
-+EXPORT_SYMBOL(set_fs_pwd);
- 
- static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
- {
-Index: linux-2.6/kernel/exit.c
-===================================================================
---- linux-2.6.orig/kernel/exit.c	2006-07-15 16:08:34.000000000 +0800
-+++ linux-2.6/kernel/exit.c	2006-07-15 16:14:19.000000000 +0800
-@@ -305,6 +305,8 @@ static void reparent_to_init(void)
- 	switch_uid(INIT_USER);
- }
- 
-+EXPORT_SYMBOL(reparent_to_init);
-+
- void __set_special_pids(pid_t session, pid_t pgrp)
- {
- 	struct task_struct *curr = current->group_leader;
-Index: linux-2.6/fs/dcache.c
-===================================================================
---- linux-2.6.orig/fs/dcache.c	2006-07-15 16:14:00.000000000 +0800
-+++ linux-2.6/fs/dcache.c	2006-07-15 16:14:19.000000000 +0800
-@@ -1628,6 +1628,7 @@ int is_subdir(struct dentry * new_dentry
- 
- 	return result;
- }
-+EXPORT_SYMBOL(is_subdir);
- 
- void d_genocide(struct dentry *root)
- {
diff --git a/lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch
deleted file mode 100644
index 9dbf6c517a8a2f520e591c0aad463e8d6f205502..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/export_symbols-2.6.22-vanilla.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-Index: linux-2.6.22.5/fs/filesystems.c
-===================================================================
---- linux-2.6.22.5.orig/fs/filesystems.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/fs/filesystems.c	2008-02-21 00:58:18.000000000 -0700
-@@ -28,7 +28,9 @@
-  */
- 
- static struct file_system_type *file_systems;
--static DEFINE_RWLOCK(file_systems_lock);
-+DEFINE_RWLOCK(file_systems_lock);
-+
-+EXPORT_SYMBOL(file_systems_lock);
- 
- /* WARNING: This can be used only if we _already_ own a reference */
- void get_filesystem(struct file_system_type *fs)
-Index: linux-2.6.22.5/fs/namespace.c
-===================================================================
---- linux-2.6.22.5.orig/fs/namespace.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/fs/namespace.c	2008-02-21 00:58:18.000000000 -0700
-@@ -1617,6 +1617,7 @@
- 		mntput(old_pwdmnt);
- 	}
- }
-+EXPORT_SYMBOL(set_fs_pwd);
- 
- static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd)
- {
-Index: linux-2.6.22.5/fs/dcache.c
-===================================================================
---- linux-2.6.22.5.orig/fs/dcache.c	2008-02-21 00:57:02.000000000 -0700
-+++ linux-2.6.22.5/fs/dcache.c	2008-02-21 00:58:18.000000000 -0700
-@@ -2027,6 +2027,7 @@
- 
- 	return result;
- }
-+EXPORT_SYMBOL(is_subdir);
- 
- void d_genocide(struct dentry *root)
- {
-Index: linux-2.6.22.5/include/linux/fs.h
-===================================================================
---- linux-2.6.22.5.orig/include/linux/fs.h	2008-02-21 00:56:39.000000000 -0700
-+++ linux-2.6.22.5/include/linux/fs.h	2008-02-21 00:58:18.000000000 -0700
-@@ -1861,6 +1861,7 @@
- 
- extern const struct file_operations generic_ro_fops;
- 
-+extern rwlock_t file_systems_lock;
- #define special_file(m) (S_ISCHR(m)||S_ISBLK(m)||S_ISFIFO(m)||S_ISSOCK(m))
- 
- extern int vfs_readlink(struct dentry *, char __user *, int, const char *);
diff --git a/lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch b/lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch
deleted file mode 100644
index b9abca9dc10b85bf0bdf61f9617981f9b7d60db9..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/ext3-patch-fuzz-fixup-fc3.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-Index: uml/include/linux/ext3_fs.h
-===================================================================
---- uml.orig/include/linux/ext3_fs.h	2004-12-24 16:34:58.000000000 -0500
-+++ uml/include/linux/ext3_fs.h	2005-04-15 00:10:56.220649968 -0400
-@@ -353,8 +353,8 @@
- #define EXT3_MOUNT_NO_UID32		0x02000  /* Disable 32-bit UIDs */
- #define EXT3_MOUNT_XATTR_USER		0x04000	/* Extended user attributes */
- #define EXT3_MOUNT_POSIX_ACL		0x08000	/* POSIX Access Control Lists */
--#define EXT3_MOUNT_RESERVATION		0x10000	/* Preallocation */
--#define EXT3_MOUNT_BARRIER		0x20000 /* Use block barriers */
-+#define EXT3_MOUNT_BARRIER		0x10000 /* Use block barriers */
-+#define EXT3_MOUNT_RESERVATION		0x20000	/* Preallocation */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
diff --git a/lustre/kernel_patches/patches/ext3-super-ntohl.patch b/lustre/kernel_patches/patches/ext3-super-ntohl.patch
deleted file mode 100644
index 3214908080c58549155a70cbf897bd726fb926fa..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/ext3-super-ntohl.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff -rupN linux-2.6.6.old/fs/ext3/super.c linux-2.6.6.new/fs/ext3/super.c
---- linux-2.6.6.old/fs/ext3/super.c	Mon May 10 05:33:19 2004
-+++ linux-2.6.6.new/fs/ext3/super.c	Thu Jun 24 12:28:24 2004
-@@ -1719,10 +1719,10 @@ static journal_t *ext3_get_dev_journal(s
- 		printk(KERN_ERR "EXT3-fs: I/O error on journal device\n");
- 		goto out_journal;
- 	}
--	if (ntohl(journal->j_superblock->s_nr_users) != 1) {
-+	if (be32_to_cpu(journal->j_superblock->s_nr_users) != 1) {
- 		printk(KERN_ERR "EXT3-fs: External journal has more than one "
- 					"user (unsupported) - %d\n",
--			ntohl(journal->j_superblock->s_nr_users));
-+			be32_to_cpu(journal->j_superblock->s_nr_users));
- 		goto out_journal;
- 	}
- 	EXT3_SB(sb)->journal_bdev = bdev;
diff --git a/lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch b/lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch
deleted file mode 100644
index 228670705a35b5fd6e835a7a86ea5d95661c74c9..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/fc3_to_rhel4_updates.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.10/include/linux/namei.h
-===================================================================
---- linux-2.6.10.orig/include/linux/namei.h	2005-04-06 09:38:35.000000000 -0600
-+++ linux-2.6.10/include/linux/namei.h	2006-01-03 15:32:11.000000000 -0700
-@@ -46,6 +46,7 @@
- #define LOOKUP_PARENT		16
- #define LOOKUP_NOALT		32
- #define LOOKUP_ATOMIC		64
-+#define LOOKUP_REVAL		128
- 
- /*
-  * Intent data
diff --git a/lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch b/lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch
deleted file mode 100644
index 8ba560c940d68724d03ec7babd4800c1709f643d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/fmode-exec-2.6-sles10.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-Index: LINUX-SRC-TREE/include/linux/fs.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/fs.h
-+++ LINUX-SRC-TREE/include/linux/fs.h
-@@ -61,6 +61,7 @@ extern int dir_notify_enable;
- 
- #define FMODE_READ 1
- #define FMODE_WRITE 2
-+#define FMODE_EXEC 16
- 
- /* Internal kernel extensions */
- #define FMODE_LSEEK	4
-Index: LINUX-SRC-TREE/fs/exec.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/exec.c
-+++ LINUX-SRC-TREE/fs/exec.c
-@@ -129,7 +129,8 @@ asmlinkage long sys_uselib(const char __
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
-+	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd,
-+					FMODE_READ | FMODE_EXEC);
- 	if (error)
- 		goto out;
- 
-@@ -481,7 +483,8 @@ struct file *open_exec(const char *name)
- 	int err;
- 	struct file *file;
- 
--	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ);
-+	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd,
-+			       FMODE_READ | FMODE_EXEC);
- 	file = ERR_PTR(err);
- 
- 	if (!err) {
diff --git a/lustre/kernel_patches/patches/fsprivate-2.6.patch b/lustre/kernel_patches/patches/fsprivate-2.6.patch
deleted file mode 100644
index a5c3d487021540ec7da0bfae9271af7d98f45799..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/fsprivate-2.6.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- linux-2.6.5-7.141/include/linux/fs.h.orig	2005-02-01 23:56:07.000000000 +0200
-+++ linux-2.6.5-7.141/include/linux/fs.h	2005-05-18 23:23:15.486142728 +0300
-@@ -574,6 +574,7 @@
- #endif /* #ifdef CONFIG_EPOLL */
- 	struct address_space	*f_mapping;
-  	struct lookup_intent    *f_it;
-+	void			*fs_private;
- };
- extern spinlock_t files_lock;
- #define file_list_lock() spin_lock(&files_lock);
diff --git a/lustre/kernel_patches/patches/header-guards-2.6-suse.patch b/lustre/kernel_patches/patches/header-guards-2.6-suse.patch
deleted file mode 100644
index c0940cdaa90e48823618fd9f3298e748e4881748..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/header-guards-2.6-suse.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-Index: linux-2.6.4-30.1/include/linux/percpu_counter.h
-===================================================================
---- linux-2.6.4-30.1.orig/include/linux/percpu_counter.h	2004-03-26 03:33:43.000000000 -0500
-+++ linux-2.6.4-30.1/include/linux/percpu_counter.h	2004-04-02 02:09:30.000000000 -0500
-@@ -3,6 +3,8 @@
-  *
-  * WARNING: these things are HUGE.  4 kbytes per counter on 32-way P4.
-  */
-+#ifndef _LINUX_PERCPU_COUNTER_H
-+#define _LINUX_PERCPU_COUNTER_H
- 
- #include <linux/config.h>
- #include <linux/spinlock.h>
-@@ -101,3 +103,5 @@
- {
- 	percpu_counter_mod(fbc, -1);
- }
-+
-+#endif /* _LINUX_PERCPU_COUNTER_H */
-Index: linux-2.6.4-30.1/include/linux/blockgroup_lock.h
-===================================================================
---- linux-2.6.4-30.1.orig/include/linux/blockgroup_lock.h	2004-03-26 03:33:43.000000000 -0500
-+++ linux-2.6.4-30.1/include/linux/blockgroup_lock.h	2004-04-02 02:14:20.000000000 -0500
-@@ -3,6 +3,8 @@
-  *
-  * Simple hashed spinlocking.
-  */
-+#ifndef _LINUX_BLOCKGROUP_LOCK_H
-+#define _LINUX_BLOCKGROUP_LOCK_H
- 
- #include <linux/config.h>
- #include <linux/spinlock.h>
-@@ -55,4 +57,4 @@
- #define sb_bgl_lock(sb, block_group) \
- 	(&(sb)->s_blockgroup_lock.locks[(block_group) & (NR_BG_LOCKS-1)].lock)
- 
--
-+#endif
diff --git a/lustre/kernel_patches/patches/hostfs_readdir_large.patch b/lustre/kernel_patches/patches/hostfs_readdir_large.patch
deleted file mode 100644
index 6ca6afdd5d07dce96cb65502aa8031483dfe8b68..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/hostfs_readdir_large.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-Index: linux-2.6.10/fs/hostfs/hostfs_user.c
-===================================================================
---- linux-2.6.10.orig/fs/hostfs/hostfs_user.c	2004-12-25 05:35:15.000000000 +0800
-+++ linux-2.6.10/fs/hostfs/hostfs_user.c	2005-03-31 19:26:03.810175656 +0800
-@@ -121,13 +121,26 @@
- {
- 	DIR *dir = stream;
- 	struct dirent *ent;
-+        off_t off = 0;
-+        off_t after_seek = 0;
-+        off_t after_readdir = 0;
-+        off_t after_readdir2 = 0;
- 
- 	seekdir(dir, *pos);
-+        after_seek = telldir(dir);
- 	ent = readdir(dir);
-+	after_readdir = telldir(dir);
-+	if ( after_seek != after_readdir ) {
-+		off = after_readdir;
-+	} else {
-+		readdir(dir);
-+		after_readdir2 = telldir(dir);
-+		off = after_readdir2;
-+	}
- 	if(ent == NULL) return(NULL);
- 	*len_out = strlen(ent->d_name);
- 	*ino_out = ent->d_ino;
--	*pos = telldir(dir);
-+	*pos = off;
- 	return(ent->d_name);
- }
- 
diff --git a/lustre/kernel_patches/patches/i_filter_data.patch b/lustre/kernel_patches/patches/i_filter_data.patch
deleted file mode 100644
index 8a21a9e6c5692443bdd0f11d78839484ed712127..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/i_filter_data.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.18.8/include/linux/fs.h
-===================================================================
---- linux-2.6.18.8.orig/include/linux/fs.h	2007-06-05 12:55:19.000000000 +0200
-+++ linux-2.6.18.8/include/linux/fs.h	2007-06-05 12:55:44.000000000 +0200
-@@ -533,6 +533,7 @@ struct inode {
- 	struct block_device	*i_bdev;
- 	struct cdev		*i_cdev;
- 	int			i_cindex;
-+	void                    *i_filterdata;
- 
- 	__u32			i_generation;
- 
diff --git a/lustre/kernel_patches/patches/iallocsem_consistency.patch b/lustre/kernel_patches/patches/iallocsem_consistency.patch
deleted file mode 100644
index 916ba88f45ca39f56f0a76d9df50c54fffd59887..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/iallocsem_consistency.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Index: linux-2.6.9/fs/attr.c
-===================================================================
---- linux-2.6.9/fs.orig/attr.c	2006-03-10 17:20:39.000000000 +0200
-+++ linux-2.6.9/fs/attr.c	2006-04-09 01:21:44.000000000 +0300
-@@ -177,6 +177,9 @@
- 	if (!attr->ia_valid)
- 		return 0;
- 
-+        if (ia_valid & ATTR_SIZE)
-+                down_write(&dentry->d_inode->i_alloc_sem);
-+
- 	if (inode->i_op && inode->i_op->setattr) {
- 		audit_notify_watch(inode, MAY_WRITE);
- 		error = security_inode_setattr(dentry, attr);
-@@ -194,6 +197,10 @@
- 				error = inode_setattr(inode, attr);
- 		}
- 	}
-+
-+        if (ia_valid & ATTR_SIZE)
-+                up_write(&dentry->d_inode->i_alloc_sem);
-+
- 	if (!error) {
- 		unsigned long dn_mask = setattr_mask(ia_valid);
- 		if (dn_mask)
-Index: linux-2.6.9/fs/open.c
-===================================================================
---- linux-2.6.9/fs.orig/open.c	2006-04-09 01:18:08.000000000 +0300
-+++ linux-2.6.9/fs/open.c	2006-04-09 01:22:29.000000000 +0300
-@@ -205,16 +205,16 @@
- 	newattrs.ia_size = length;
- 	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
- 	down(&dentry->d_inode->i_sem);
--	down_write(&dentry->d_inode->i_alloc_sem);
- 	if (called_from_open)
- 		newattrs.ia_valid |= ATTR_FROM_OPEN;
- 	if (op->setattr_raw) {
- 		newattrs.ia_valid |= ATTR_RAW;
- 		newattrs.ia_ctime = CURRENT_TIME;
-+		down_write(&dentry->d_inode->i_alloc_sem);
- 		err = op->setattr_raw(dentry->d_inode, &newattrs);
-+		up_write(&dentry->d_inode->i_alloc_sem);
- 	} else
- 		err = notify_change(dentry, &newattrs);
--	up_write(&dentry->d_inode->i_alloc_sem);
- 	up(&dentry->d_inode->i_sem);
- 	return err;
- }
diff --git a/lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch b/lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch
deleted file mode 100644
index 250822123e0de82f822c43d45c3413c2cd141326..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/inode-nr_unused-2.6.9-rhel4.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-Index: RH_2_6_9_55/fs/fs-writeback.c
-===================================================================
---- RH_2_6_9_55.orig/fs/fs-writeback.c
-+++ RH_2_6_9_55/fs/fs-writeback.c
-@@ -230,7 +230,6 @@
- 			 * The inode is clean, unused
- 			 */
- 			list_move(&inode->i_list, &inode_unused);
--			inodes_stat.nr_unused++;
- 		}
- 	}
- 	wake_up_inode(inode);
-@@ -244,6 +243,11 @@
- __writeback_single_inode(struct inode *inode,
- 			struct writeback_control *wbc)
- {
-+	if (!atomic_read(&inode->i_count))
-+		WARN_ON(!(inode->i_state & I_WILL_FREE));
-+	else
-+		WARN_ON(inode->i_state & I_WILL_FREE);
-+
- 	if ((wbc->sync_mode != WB_SYNC_ALL) && (inode->i_state & I_LOCK)) {
- 		list_move(&inode->i_list, &inode->i_sb->s_dirty);
- 		return 0;
-@@ -253,10 +257,8 @@
- 	 * It's a data-integrity sync.  We must wait.
- 	 */
- 	while (inode->i_state & I_LOCK) {
--		__iget(inode);
- 		spin_unlock(&inode_lock);
- 		__wait_on_inode(inode);
--		iput(inode);
- 		spin_lock(&inode_lock);
- 	}
- 	return __sync_single_inode(inode, wbc);
-Index: RH_2_6_9_55/fs/inode.c
-===================================================================
---- RH_2_6_9_55.orig/fs/inode.c
-+++ RH_2_6_9_55/fs/inode.c
-@@ -1056,6 +1056,7 @@
- 	if (inode->i_data.nrpages)
- 		truncate_inode_pages(&inode->i_data, 0);
- 	clear_inode(inode);
-+	wake_up_inode(inode);	
- 	destroy_inode(inode);
- }
- 
diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch b/lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch
deleted file mode 100644
index 5fc42b58ca21ef222d3ef97d84f6758a26130bc3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/iopen-misc-2.6-fc3.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-Index: linux-2.6.11/Documentation/filesystems/ext2.txt
-===================================================================
---- linux-2.6.11.orig/Documentation/filesystems/ext2.txt	2005-03-02 02:37:50.000000000 -0500
-+++ linux-2.6.11/Documentation/filesystems/ext2.txt	2005-04-13 22:49:42.116372414 -0400
-@@ -58,6 +58,22 @@
- 
- nobh				Do not attach buffer_heads to file pagecache.
- 
-+iopen				Makes an invisible pseudo-directory called 
-+				__iopen__ available in the root directory
-+				of the filesystem.  Allows open-by-inode-
-+				number.  i.e., inode 3145 can be accessed
-+				via /mntpt/__iopen__/3145
-+
-+iopen_nopriv			This option makes the iopen directory be
-+				world-readable.  This may be safer since it
-+				allows daemons to run as an unprivileged user,
-+				however it significantly changes the security
-+				model of a Unix filesystem, since previously
-+				all files under a mode 700 directory were not
-+				generally avilable even if the
-+				permissions on the file itself is
-+				world-readable.
-+
- grpquota,noquota,quota,usrquota	Quota options are silently ignored by ext2.
- 
- 
-Index: linux-2.6.11/fs/dcache.c
-===================================================================
---- linux-2.6.11.orig/fs/dcache.c	2005-04-13 22:44:50.482498026 -0400
-+++ linux-2.6.11/fs/dcache.c	2005-04-13 22:50:43.846174872 -0400
-@@ -1289,14 +1289,13 @@
-  * dcache entries should not be moved in this way.
-  */
- 
--void d_move(struct dentry * dentry, struct dentry * target)
-+void d_move_locked(struct dentry * dentry, struct dentry * target)
- {
- 	struct hlist_head *list;
- 
- 	if (!dentry->d_inode)
- 		printk(KERN_WARNING "VFS: moving negative dcache entry\n");
- 
--	spin_lock(&dcache_lock);
- 	write_seqlock(&rename_lock);
- 	/*
- 	 * XXXX: do we really need to take target->d_lock?
-@@ -1356,6 +1355,14 @@
- 	spin_unlock(&target->d_lock);
- 	spin_unlock(&dentry->d_lock);
- 	write_sequnlock(&rename_lock);
-+}
-+
-+EXPORT_SYMBOL(d_move_locked);
-+
-+void d_move(struct dentry *dentry, struct dentry *target)
-+{
-+	spin_lock(&dcache_lock);
-+	d_move_locked(dentry, target);
- 	spin_unlock(&dcache_lock);
- }
- 
-Index: linux-2.6.11/include/linux/dcache.h
-===================================================================
---- linux-2.6.11.orig/include/linux/dcache.h	2005-04-13 22:44:53.777168980 -0400
-+++ linux-2.6.11/include/linux/dcache.h	2005-04-13 22:49:42.119372070 -0400
-@@ -239,6 +239,7 @@
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
-@@ -274,6 +275,7 @@
- 
- /* used for rename() and baskets */
- extern void d_move(struct dentry *, struct dentry *);
-+extern void d_move_locked(struct dentry *, struct dentry *);
- 
- /* appendix may either be NULL or be used for transname suffixes */
- extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch b/lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch
deleted file mode 100644
index d9ef03b2e0182b58be8c3767921f153fb35cbf26..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/iopen-misc-2.6-suse.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Index: linux-2.6.4-51.0/Documentation/filesystems/ext2.txt
-===================================================================
---- linux-2.6.4-51.0.orig/Documentation/filesystems/ext2.txt	2004-05-06 22:21:26.000000000 -0400
-+++ linux-2.6.4-51.0/Documentation/filesystems/ext2.txt	2004-05-06 22:24:42.000000000 -0400
-@@ -35,6 +35,22 @@
- 
- sb=n				Use alternate superblock at this location.
- 
-+iopen				Makes an invisible pseudo-directory called 
-+				__iopen__ available in the root directory
-+				of the filesystem.  Allows open-by-inode-
-+				number.  i.e., inode 3145 can be accessed
-+				via /mntpt/__iopen__/3145
-+
-+iopen_nopriv			This option makes the iopen directory be
-+				world-readable.  This may be safer since it
-+				allows daemons to run as an unprivileged user,
-+				however it significantly changes the security
-+				model of a Unix filesystem, since previously
-+				all files under a mode 700 directory were not
-+				generally avilable even if the
-+				permissions on the file itself is
-+				world-readable.
-+
- grpquota,noquota,quota,usrquota	Quota options are silently ignored by ext2.
- 
- 
-Index: linux-2.6.4-51.0/fs/dcache.c
-===================================================================
---- linux-2.6.4-51.0.orig/fs/dcache.c	2004-05-06 22:24:42.000000000 -0400
-+++ linux-2.6.4-51.0/fs/dcache.c	2004-05-06 22:58:37.000000000 -0400
-@@ -1195,7 +1195,7 @@
-  * dcache entries should not be moved in this way.
-  */
- 
--static void d_move_locked(struct dentry * dentry, struct dentry * target)
-+void d_move_locked(struct dentry * dentry, struct dentry * target)
- {
-	struct hlist_head *list;
-
-@@ -1253,6 +1252,8 @@
- 	write_sequnlock(&rename_lock);
- }
- 
-+EXPORT_SYMBOL(d_move_locked);
-+
- /**
-  * d_move - move a dentry
-  * @dentry: entry to move
-Index: linux-2.6.4-51.0/include/linux/dcache.h
-===================================================================
---- linux-2.6.4-51.0.orig/include/linux/dcache.h	2004-05-06 22:24:42.000000000 -0400
-+++ linux-2.6.4-51.0/include/linux/dcache.h	2004-05-06 23:03:43.000000000 -0400
-@@ -234,6 +234,7 @@
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
-@@ -252,6 +253,7 @@
- 
- /* used for rename() and baskets */
- extern void d_move(struct dentry *, struct dentry *);
-+extern void d_move_locked(struct dentry *, struct dentry *);
- 
- /* appendix may either be NULL or be used for transname suffixes */
- extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch b/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch
deleted file mode 100644
index 4819ed58b1b1e2e3c319d7a7678004f0a6bed0b5..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/iopen-misc-2.6.12.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-Index: linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt
-===================================================================
---- linux-2.6.16.46-0.14.orig/Documentation/filesystems/ext2.txt
-+++ linux-2.6.16.46-0.14/Documentation/filesystems/ext2.txt
-@@ -58,6 +58,22 @@ nobh				Do not attach buffer_heads to fi
- 
- xip				Use execute in place (no caching) if possible
- 
-+iopen				Makes an invisible pseudo-directory called 
-+				__iopen__ available in the root directory
-+				of the filesystem.  Allows open-by-inode-
-+				number.  i.e., inode 3145 can be accessed
-+				via /mntpt/__iopen__/3145
-+
-+iopen_nopriv			This option makes the iopen directory be
-+				world-readable.  This may be safer since it
-+				allows daemons to run as an unprivileged user,
-+				however it significantly changes the security
-+				model of a Unix filesystem, since previously
-+				all files under a mode 700 directory were not
-+				generally avilable even if the
-+				permissions on the file itself is
-+				world-readable.
-+
- grpquota,noquota,quota,usrquota	Quota options are silently ignored by ext2.
- 
- 
-Index: linux-2.6.16.46-0.14/fs/dcache.c
-===================================================================
---- linux-2.6.16.46-0.14.orig/fs/dcache.c
-+++ linux-2.6.16.46-0.14/fs/dcache.c
-@@ -1309,17 +1309,26 @@ static void __d_rehash(struct dentry * e
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
- 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
- 
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
- 	__d_rehash(entry, list);
- 	spin_unlock(&entry->d_lock);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
- }
- 
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
-+ }
-+
- #define do_switch(x,y) do { \
- 	__typeof__ (x) __tmp = x; \
- 	x = y; y = __tmp; } while (0)
-@@ -1392,14 +1401,13 @@ static void switch_names(struct dentry *
-  * dcache entries should not be moved in this way.
-  */
- 
--void d_move(struct dentry * dentry, struct dentry * target)
-+void d_move_locked(struct dentry * dentry, struct dentry * target)
- {
- 	struct hlist_head *list;
- 
- 	if (!dentry->d_inode)
- 		printk(KERN_WARNING "VFS: moving negative dcache entry\n");
- 
--	spin_lock(&dcache_lock);
- 	write_seqlock(&rename_lock);
- 	/*
- 	 * XXXX: do we really need to take target->d_lock?
-@@ -1450,6 +1458,14 @@ already_unhashed:
- 	fsnotify_d_move(dentry);
- 	spin_unlock(&dentry->d_lock);
- 	write_sequnlock(&rename_lock);
-+}
-+
-+EXPORT_SYMBOL(d_move_locked);
-+
-+void d_move(struct dentry *dentry, struct dentry *target)
-+{
-+	spin_lock(&dcache_lock);
-+	d_move_locked(dentry, target);
- 	spin_unlock(&dcache_lock);
- }
- 
-Index: linux-2.6.16.46-0.14/include/linux/dcache.h
-===================================================================
---- linux-2.6.16.46-0.14.orig/include/linux/dcache.h
-+++ linux-2.6.16.46-0.14/include/linux/dcache.h
-@@ -236,6 +236,7 @@ extern int have_submounts(struct dentry 
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
-@@ -271,6 +272,7 @@ static inline struct dentry *d_add_uniqu
- 
- /* used for rename() and baskets */
- extern void d_move(struct dentry *, struct dentry *);
-+extern void d_move_locked(struct dentry *, struct dentry *);
- 
- /* appendix may either be NULL or be used for transname suffixes */
- extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch
deleted file mode 100644
index e614f492f3053559bd23eed19ed94c9003d01237..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/iopen-misc-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-Index: linux-2.6/Documentation/filesystems/ext2.txt
-===================================================================
---- linux-2.6.orig/Documentation/filesystems/ext2.txt	2006-04-03 22:46:38.000000000 +0800
-+++ linux-2.6/Documentation/filesystems/ext2.txt	2006-07-15 12:54:06.000000000 +0800
-@@ -58,6 +58,22 @@ nobh				Do not attach buffer_heads to fi
- 
- xip				Use execute in place (no caching) if possible
- 
-+iopen				Makes an invisible pseudo-directory called 
-+				__iopen__ available in the root directory
-+				of the filesystem.  Allows open-by-inode-
-+				number.  i.e., inode 3145 can be accessed
-+				via /mntpt/__iopen__/3145
-+
-+iopen_nopriv			This option makes the iopen directory be
-+				world-readable.  This may be safer since it
-+				allows daemons to run as an unprivileged user,
-+				however it significantly changes the security
-+				model of a Unix filesystem, since previously
-+				all files under a mode 700 directory were not
-+				generally avilable even if the
-+				permissions on the file itself is
-+				world-readable.
-+
- grpquota,noquota,quota,usrquota	Quota options are silently ignored by ext2.
- 
- 
-Index: linux-2.6/fs/dcache.c
-===================================================================
---- linux-2.6.orig/fs/dcache.c	2006-07-15 12:48:18.000000000 +0800
-+++ linux-2.6/fs/dcache.c	2006-07-15 12:54:06.000000000 +0800
-@@ -1341,14 +1341,13 @@ static void switch_names(struct dentry *
-  * dcache entries should not be moved in this way.
-  */
- 
--void d_move(struct dentry * dentry, struct dentry * target)
-+void d_move_locked(struct dentry * dentry, struct dentry * target)
- {
- 	struct hlist_head *list;
- 
- 	if (!dentry->d_inode)
- 		printk(KERN_WARNING "VFS: moving negative dcache entry\n");
- 
--	spin_lock(&dcache_lock);
- 	write_seqlock(&rename_lock);
- 	/*
- 	 * XXXX: do we really need to take target->d_lock?
-@@ -1399,6 +1398,14 @@ already_unhashed:
- 	fsnotify_d_move(dentry);
- 	spin_unlock(&dentry->d_lock);
- 	write_sequnlock(&rename_lock);
-+}
-+
-+EXPORT_SYMBOL(d_move_locked);
-+
-+void d_move(struct dentry *dentry, struct dentry *target)
-+{
-+	spin_lock(&dcache_lock);
-+	d_move_locked(dentry, target);
- 	spin_unlock(&dcache_lock);
- }
- 
-Index: linux-2.6/include/linux/dcache.h
-===================================================================
---- linux-2.6.orig/include/linux/dcache.h	2006-07-15 12:48:41.000000000 +0800
-+++ linux-2.6/include/linux/dcache.h	2006-07-15 12:54:06.000000000 +0800
-@@ -292,6 +293,7 @@ static inline struct dentry *d_add_uniqu
- 
- /* used for rename() and baskets */
- extern void d_move(struct dentry *, struct dentry *);
-+extern void d_move_locked(struct dentry *, struct dentry *);
- 
- /* appendix may either be NULL or be used for transname suffixes */
- extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch
deleted file mode 100644
index aaf177b12030368c0cf58e5782b689ecd9215c6f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/iopen-misc-2.6.22-vanilla.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Index: linux-2.6.22.5/Documentation/filesystems/ext2.txt
-===================================================================
---- linux-2.6.22.5.orig/Documentation/filesystems/ext2.txt	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/Documentation/filesystems/ext2.txt	2008-02-21 00:57:02.000000000 -0700
-@@ -58,6 +58,22 @@
- 
- xip				Use execute in place (no caching) if possible
- 
-+iopen				Makes an invisible pseudo-directory called 
-+				__iopen__ available in the root directory
-+				of the filesystem.  Allows open-by-inode-
-+				number.  i.e., inode 3145 can be accessed
-+				via /mntpt/__iopen__/3145
-+
-+iopen_nopriv			This option makes the iopen directory be
-+				world-readable.  This may be safer since it
-+				allows daemons to run as an unprivileged user,
-+				however it significantly changes the security
-+				model of a Unix filesystem, since previously
-+				all files under a mode 700 directory were not
-+				generally avilable even if the
-+				permissions on the file itself is
-+				world-readable.
-+
- grpquota,noquota,quota,usrquota	Quota options are silently ignored by ext2.
- 
- 
-Index: linux-2.6.22.5/fs/dcache.c
-===================================================================
---- linux-2.6.22.5.orig/fs/dcache.c	2008-02-21 00:56:29.000000000 -0700
-+++ linux-2.6.22.5/fs/dcache.c	2008-02-21 00:57:02.000000000 -0700
-@@ -1537,7 +1537,7 @@
-  * Update the dcache to reflect the move of a file name. Negative
-  * dcache entries should not be moved in this way.
-  */
--static void d_move_locked(struct dentry * dentry, struct dentry * target)
-+void d_move_locked(struct dentry * dentry, struct dentry * target)
- {
- 	struct hlist_head *list;
- 
-@@ -1595,6 +1595,7 @@
- 	spin_unlock(&dentry->d_lock);
- 	write_sequnlock(&rename_lock);
- }
-+EXPORT_SYMBOL(d_move_locked);
- 
- /**
-  * d_move - move a dentry
-Index: linux-2.6.22.5/include/linux/dcache.h
-===================================================================
---- linux-2.6.22.5.orig/include/linux/dcache.h	2008-02-21 00:56:29.000000000 -0700
-+++ linux-2.6.22.5/include/linux/dcache.h	2008-02-21 00:57:02.000000000 -0700
-@@ -251,6 +251,7 @@
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
-@@ -286,6 +287,7 @@
- 
- /* used for rename() and baskets */
- extern void d_move(struct dentry *, struct dentry *);
-+extern void d_move_locked(struct dentry *, struct dentry *);
- 
- /* appendix may either be NULL or be used for transname suffixes */
- extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch b/lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch
deleted file mode 100644
index beab322556170b99779e32cb2b8d178812c918e4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-16tb-overflow-fixes.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-Date: Tue, 26 Sep 2006 11:00:28 -0500
-From: Eric Sandeen <esandeen@redhat.com>
-Subject: Re: [PATCH RHEL5] 16T overflows in jbd code
-
-Signed-off-by: Eric Sandeen <esandeen@redhat.com>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-
-Index: linux-2.6.17-1.2654.el5/fs/jbd/journal.c
-===================================================================
---- linux-2.6.17-1.2654.el5.orig/fs/jbd/journal.c
-+++ linux-2.6.17-1.2654.el5/fs/jbd/journal.c
-@@ -271,7 +271,7 @@ static void journal_kill_thread(journal_
- int journal_write_metadata_buffer(transaction_t *transaction,
- 				  struct journal_head  *jh_in,
- 				  struct journal_head **jh_out,
--				  int blocknr)
-+				  unsigned long blocknr)
- {
- 	int need_copy_out = 0;
- 	int done_copy_out = 0;
-@@ -696,7 +696,7 @@ fail:
-  *  @bdev: Block device on which to create the journal
-  *  @fs_dev: Device which hold journalled filesystem for this journal.
-  *  @start: Block nr Start of journal.
-- *  @len:  Lenght of the journal in blocks.
-+ *  @len:  Length of the journal in blocks.
-  *  @blocksize: blocksize of journalling device
-  *  @returns: a newly created journal_t *
-  *  
-Index: linux-2.6.17-1.2654.el5/include/linux/jbd.h
-===================================================================
---- linux-2.6.17-1.2654.el5.orig/include/linux/jbd.h
-+++ linux-2.6.17-1.2654.el5/include/linux/jbd.h
-@@ -866,7 +866,7 @@ extern int 
- journal_write_metadata_buffer(transaction_t	  *transaction,
- 			      struct journal_head  *jh_in,
- 			      struct journal_head **jh_out,
--			      int		   blocknr);
-+			      unsigned long	   blocknr);
- 
- /* Transaction locking */
- extern void		__wait_on_journal (journal_t *);
-
diff --git a/lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch b/lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch
deleted file mode 100644
index 64085b9d85eb1092cc7e1850c6a74c4197a45e91..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-2.6.10-jcberr.patch
+++ /dev/null
@@ -1,222 +0,0 @@
---- 1.46/include/linux/jbd.h	2004-10-19 03:40:17 -06:00
-+++ 1.47/include/linux/jbd.h	2004-11-07 19:13:24 -07:00
-@@ -352,6 +352,27 @@
- 	bit_spin_unlock(BH_JournalHead, &bh->b_state);
- }
- 
-+#define HAVE_JOURNAL_CALLBACK_STATUS
-+/**
-+ *   struct journal_callback - Base structure for callback information.
-+ *   @jcb_list: list information for other callbacks attached to the same handle.
-+ *   @jcb_func: Function to call with this callback structure. 
-+ *
-+ *   This struct is a 'seed' structure for a using with your own callback
-+ *   structs. If you are using callbacks you must allocate one of these
-+ *   or another struct of your own definition which has this struct 
-+ *   as it's first element and pass it to journal_callback_set().
-+ *
-+ *   This is used internally by jbd to maintain callback information.
-+ *
-+ *   See journal_callback_set for more information.
-+ **/
-+struct journal_callback {
-+	struct list_head jcb_list;		/* t_jcb_lock */
-+	void (*jcb_func)(struct journal_callback *jcb, int error);
-+	/* user data goes here */
-+};
-+
- struct jbd_revoke_table_s;
- 
- /**
-@@ -360,6 +381,7 @@
-  * @h_transaction: Which compound transaction is this update a part of?
-  * @h_buffer_credits: Number of remaining buffers we are allowed to dirty.
-  * @h_ref: Reference count on this handle
-+ * @h_jcb: List of application registered callbacks for this handle.
-  * @h_err: Field for caller's use to track errors through large fs operations
-  * @h_sync: flag for sync-on-close
-  * @h_jdata: flag to force data journaling
-@@ -385,6 +407,13 @@
- 	/* operations */
- 	int			h_err;
- 
-+	/*
-+	 * List of application registered callbacks for this handle. The
-+	 * function(s) will be called after the transaction that this handle is
-+	 * part of has been committed to disk. [t_jcb_lock]
-+	 */
-+	struct list_head	h_jcb;
-+
- 	/* Flags [no locking] */
- 	unsigned int	h_sync:		1;	/* sync-on-close */
- 	unsigned int	h_jdata:	1;	/* force data journaling */
-@@ -426,6 +455,8 @@
-  *    j_state_lock
-  *    ->j_list_lock			(journal_unmap_buffer)
-  *
-+ *    t_handle_lock
-+ *    ->t_jcb_lock
-  */
- 
- struct transaction_s 
-@@ -549,6 +580,15 @@
- 	 */
- 	int t_handle_count;
- 
-+	/*
-+	 * Protects the callback list
-+	 */
-+	spinlock_t		t_jcb_lock;
-+	/*
-+	 * List of registered callback functions for this transaction.
-+	 * Called when the transaction is committed. [t_jcb_lock]
-+	 */
-+	struct list_head	t_jcb;
- };
- 
- /**
-@@ -881,6 +921,10 @@
- extern int	 journal_try_to_free_buffers(journal_t *, struct page *, int);
- extern int	 journal_stop(handle_t *);
- extern int	 journal_flush (journal_t *);
-+extern void	 journal_callback_set(handle_t *handle,
-+				      void (*fn)(struct journal_callback *,int),
-+				      struct journal_callback *jcb);
-+
- extern void	 journal_lock_updates (journal_t *);
- extern void	 journal_unlock_updates (journal_t *);
- 
---- 1.23/fs/jbd/checkpoint.c	2003-07-10 23:23:54 -06:00
-+++ 1.24/fs/jbd/checkpoint.c	2004-11-07 19:13:24 -07:00
-@@ -616,6 +616,7 @@
- 	J_ASSERT(transaction->t_log_list == NULL);
- 	J_ASSERT(transaction->t_checkpoint_list == NULL);
- 	J_ASSERT(transaction->t_updates == 0);
-+	J_ASSERT(list_empty(&transaction->t_jcb));
- 	J_ASSERT(journal->j_committing_transaction != transaction);
- 	J_ASSERT(journal->j_running_transaction != transaction);
- 
-
---- 1.53/fs/jbd/commit.c	2004-10-19 03:40:17 -06:00
-+++ 1.54/fs/jbd/commit.c	2004-11-07 19:13:24 -07:00
-@@ -686,6 +686,30 @@
- 	if (err)
- 		__journal_abort_hard(journal);
- 
-+	/*
-+	 * Call any callbacks that had been registered for handles in this
-+	 * transaction.  It is up to the callback to free any allocated
-+	 * memory.
-+	 *
-+	 * The spinlocking (t_jcb_lock) here is surely unnecessary...
-+	 */
-+	spin_lock(&commit_transaction->t_jcb_lock);
-+	if (!list_empty(&commit_transaction->t_jcb)) {
-+		struct list_head *p, *n;
-+		int error = is_journal_aborted(journal);
-+
-+		list_for_each_safe(p, n, &commit_transaction->t_jcb) {
-+			struct journal_callback *jcb;
-+
-+			jcb = list_entry(p, struct journal_callback, jcb_list);
-+			list_del(p);
-+			spin_unlock(&commit_transaction->t_jcb_lock);
-+			jcb->jcb_func(jcb, error);
-+			spin_lock(&commit_transaction->t_jcb_lock);
-+		}
-+	}
-+	spin_unlock(&commit_transaction->t_jcb_lock);
-+
- 	jbd_debug(3, "JBD: commit phase 7\n");
- 
- 	J_ASSERT(commit_transaction->t_sync_datalist == NULL);
-
---- 1.77/fs/jbd/journal.c	2004-09-21 20:58:08 -06:00
-+++ 1.78/fs/jbd/journal.c	2004-11-07 19:13:24 -07:00
-@@ -55,6 +55,7 @@
- #endif
- EXPORT_SYMBOL(journal_flush);
- EXPORT_SYMBOL(journal_revoke);
-+EXPORT_SYMBOL(journal_callback_set);
- 
- EXPORT_SYMBOL(journal_init_dev);
- EXPORT_SYMBOL(journal_init_inode);
-@@ -78,6 +79,7 @@
- EXPORT_SYMBOL(journal_blocks_per_page);
- EXPORT_SYMBOL(journal_invalidatepage);
- EXPORT_SYMBOL(journal_try_to_free_buffers);
-+EXPORT_SYMBOL(journal_bmap);
- EXPORT_SYMBOL(journal_force_commit);
- 
- static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *);
-
---- 1.89/fs/jbd/transaction.c	2004-10-19 03:40:17 -06:00
-+++ 1.90/fs/jbd/transaction.c	2004-11-07 19:13:24 -07:00
-@@ -50,7 +50,9 @@
- 	transaction->t_state = T_RUNNING;
- 	transaction->t_tid = journal->j_transaction_sequence++;
- 	transaction->t_expires = jiffies + journal->j_commit_interval;
-+	INIT_LIST_HEAD(&transaction->t_jcb);
- 	spin_lock_init(&transaction->t_handle_lock);
-+	spin_lock_init(&transaction->t_jcb_lock);
- 
- 	/* Set up the commit timer for the new transaction. */
- 	journal->j_commit_timer->expires = transaction->t_expires;
-@@ -241,6 +243,7 @@
- 	memset(handle, 0, sizeof(*handle));
- 	handle->h_buffer_credits = nblocks;
- 	handle->h_ref = 1;
-+	INIT_LIST_HEAD(&handle->h_jcb);
- 
- 	return handle;
- }
-@@ -1274,6 +1277,36 @@
- }
- 
- /**
-+ * void journal_callback_set() -  Register a callback function for this handle.
-+ * @handle: handle to attach the callback to.
-+ * @func: function to callback.
-+ * @jcb:  structure with additional information required by func() , and
-+ *        some space for jbd internal information.
-+ * 
-+ * The function will be
-+ * called when the transaction that this handle is part of has been
-+ * committed to disk with the original callback data struct and the
-+ * error status of the journal as parameters.  There is no guarantee of
-+ * ordering between handles within a single transaction, nor between
-+ * callbacks registered on the same handle.
-+ *
-+ * The caller is responsible for allocating the journal_callback struct.
-+ * This is to allow the caller to add as much extra data to the callback
-+ * as needed, but reduce the overhead of multiple allocations.  The caller
-+ * allocated struct must start with a struct journal_callback at offset 0,
-+ * and has the caller-specific data afterwards.
-+ */
-+void journal_callback_set(handle_t *handle,
-+			void (*func)(struct journal_callback *jcb, int error),
-+			struct journal_callback *jcb)
-+{
-+	spin_lock(&handle->h_transaction->t_jcb_lock);
-+	list_add_tail(&jcb->jcb_list, &handle->h_jcb);
-+	spin_unlock(&handle->h_transaction->t_jcb_lock);
-+	jcb->jcb_func = func;
-+}
-+
-+/**
-  * int journal_stop() - complete a transaction
-  * @handle: tranaction to complete.
-  * 
-@@ -1338,6 +1371,11 @@
- 		if (journal->j_barrier_count)
- 			wake_up(&journal->j_wait_transaction_locked);
- 	}
-+
-+	/* Move callbacks from the handle to the transaction. */
-+	spin_lock(&transaction->t_jcb_lock);
-+	list_splice(&handle->h_jcb, &transaction->t_jcb);
-+	spin_unlock(&transaction->t_jcb_lock);
- 
- 	/*
- 	 * If the handle is marked SYNC, we need to set another commit
-
diff --git a/lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch b/lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch
deleted file mode 100644
index 0127ef0001c74044a84de7a25811b920e8ed65b3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-check-for-unmapped-buffer.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-Date: Mon, 23 Oct 2006 15:40:48 -0500
-From: Eric Sandeen <sandeen@redhat.com>
-Subject: [PATCH RHEL5] handle races w/ truncate in journal_dirty_data()
-
-This is for BZ 209647 <https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=209647>: ext3/jbd panic
-
-This patch is now in -mm.
-
-When running several fsx's and other filesystem stress tests, we found
-cases where an unmapped buffer was still being sent to submit_bh by the
-ext3 dirty data journaling code.
-
-I saw this happen in two ways, both related to another thread doing a
-truncate which would unmap the buffer in question.
-
-Either we would get into journal_dirty_data with a bh which was already
-unmapped (although journal_dirty_data_fn had checked for this earlier, the
-state was not locked at that point), or it would get unmapped in the middle
-of journal_dirty_data when we dropped locks to call sync_dirty_buffer.
-
-By re-checking for mapped state after we've acquired the bh state lock, we
-should avoid these races.  If we find a buffer which is no longer mapped,
-we essentially ignore it, because journal_unmap_buffer has already decided
-that this buffer can go away.
-
-I've also added tracepoints in these two cases, and made a couple other
-tracepoint changes that I found useful in debugging this.
-
-Signed-off-by: Eric Sandeen <esandeen@redhat.com>
-Cc: <linux-ext4@vger.kernel.org>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
----
-
- fs/jbd/transaction.c |   15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-Index: linux-2.6.18-1.2732.el5/fs/jbd/transaction.c
-===================================================================
---- linux-2.6.18-1.2732.el5.orig/fs/jbd/transaction.c
-+++ linux-2.6.18-1.2732.el5/fs/jbd/transaction.c
-@@ -967,6 +967,13 @@ int journal_dirty_data(handle_t *handle,
- 	 */
- 	jbd_lock_bh_state(bh);
- 	spin_lock(&journal->j_list_lock);
-+
-+	/* Now that we have bh_state locked, are we really still mapped? */
-+	if (!buffer_mapped(bh)) {
-+		JBUFFER_TRACE(jh, "unmapped buffer, bailing out");
-+		goto no_journal;
-+	}
-+
- 	if (jh->b_transaction) {
- 		JBUFFER_TRACE(jh, "has transaction");
- 		if (jh->b_transaction != handle->h_transaction) {
-@@ -1028,6 +1035,11 @@ int journal_dirty_data(handle_t *handle,
- 				sync_dirty_buffer(bh);
- 				jbd_lock_bh_state(bh);
- 				spin_lock(&journal->j_list_lock);
-+				/* Since we dropped the lock... */
-+				if (!buffer_mapped(bh)) {
-+					JBUFFER_TRACE(jh, "buffer got unmapped");
-+					goto no_journal;
-+				}
- 				/* The buffer may become locked again at any
- 				   time if it is redirtied */
- 			}
-@@ -1823,6 +1835,7 @@ static int journal_unmap_buffer(journal_
- 			}
- 		}
- 	} else if (transaction == journal->j_committing_transaction) {
-+		JBUFFER_TRACE(jh, "on committing transaction");
- 		if (jh->b_jlist == BJ_Locked) {
- 			/*
- 			 * The buffer is on the committing transaction's locked
-@@ -1837,7 +1850,6 @@ static int journal_unmap_buffer(journal_
- 		 * can remove it's next_transaction pointer from the
- 		 * running transaction if that is set, but nothing
- 		 * else. */
--		JBUFFER_TRACE(jh, "on committing transaction");
- 		set_buffer_freed(bh);
- 		if (jh->b_next_transaction) {
- 			J_ASSERT(jh->b_next_transaction ==
-@@ -1857,6 +1869,7 @@ static int journal_unmap_buffer(journal_
- 		 * i_size already for this truncate so recovery will not
- 		 * expose the disk blocks we are discarding here.) */
- 		J_ASSERT_JH(jh, transaction == journal->j_running_transaction);
-+		JBUFFER_TRACE(jh, "on running transaction");
- 		may_free = __dispose_buffer(jh, transaction);
- 	}
- 
-
diff --git a/lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch
deleted file mode 100644
index 867d41c194f45e77b1fc2ca75c47e14d9990bd9a..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-jcberr-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,228 +0,0 @@
-Index: linux-2.6/include/linux/jbd.h
-===================================================================
---- linux-2.6.orig/include/linux/jbd.h	2006-07-15 16:08:35.000000000 +0800
-+++ linux-2.6/include/linux/jbd.h	2006-07-15 16:13:01.000000000 +0800
-@@ -356,6 +356,27 @@ static inline void jbd_unlock_bh_journal
- 	bit_spin_unlock(BH_JournalHead, &bh->b_state);
- }
- 
-+#define HAVE_JOURNAL_CALLBACK_STATUS
-+/**
-+ *   struct journal_callback - Base structure for callback information.
-+ *   @jcb_list: list information for other callbacks attached to the same handle.
-+ *   @jcb_func: Function to call with this callback structure. 
-+ *
-+ *   This struct is a 'seed' structure for a using with your own callback
-+ *   structs. If you are using callbacks you must allocate one of these
-+ *   or another struct of your own definition which has this struct 
-+ *   as it's first element and pass it to journal_callback_set().
-+ *
-+ *   This is used internally by jbd to maintain callback information.
-+ *
-+ *   See journal_callback_set for more information.
-+ **/
-+struct journal_callback {
-+	struct list_head jcb_list;		/* t_jcb_lock */
-+	void (*jcb_func)(struct journal_callback *jcb, int error);
-+	/* user data goes here */
-+};
-+
- struct jbd_revoke_table_s;
- 
- /**
-@@ -364,6 +385,7 @@ struct jbd_revoke_table_s;
-  * @h_transaction: Which compound transaction is this update a part of?
-  * @h_buffer_credits: Number of remaining buffers we are allowed to dirty.
-  * @h_ref: Reference count on this handle
-+ * @h_jcb: List of application registered callbacks for this handle.
-  * @h_err: Field for caller's use to track errors through large fs operations
-  * @h_sync: flag for sync-on-close
-  * @h_jdata: flag to force data journaling
-@@ -389,6 +411,13 @@ struct handle_s 
- 	/* operations */
- 	int			h_err;
- 
-+	/*
-+	 * List of application registered callbacks for this handle. The
-+	 * function(s) will be called after the transaction that this handle is
-+	 * part of has been committed to disk. [t_jcb_lock]
-+	 */
-+	struct list_head	h_jcb;
-+
- 	/* Flags [no locking] */
- 	unsigned int	h_sync:		1;	/* sync-on-close */
- 	unsigned int	h_jdata:	1;	/* force data journaling */
-@@ -430,6 +459,8 @@ struct handle_s 
-  *    j_state_lock
-  *    ->j_list_lock			(journal_unmap_buffer)
-  *
-+ *    t_handle_lock
-+ *    ->t_jcb_lock
-  */
- 
- struct transaction_s 
-@@ -559,6 +590,15 @@ struct transaction_s 
- 	 */
- 	int t_handle_count;
- 
-+	/*
-+	 * Protects the callback list
-+	 */
-+	spinlock_t		t_jcb_lock;
-+	/*
-+	 * List of registered callback functions for this transaction.
-+	 * Called when the transaction is committed. [t_jcb_lock]
-+	 */
-+	struct list_head	t_jcb;
- };
- 
- /**
-@@ -906,6 +946,10 @@ extern void	 journal_invalidatepage(jour
- extern int	 journal_try_to_free_buffers(journal_t *, struct page *, gfp_t);
- extern int	 journal_stop(handle_t *);
- extern int	 journal_flush (journal_t *);
-+extern void	 journal_callback_set(handle_t *handle,
-+				      void (*fn)(struct journal_callback *,int),
-+				      struct journal_callback *jcb);
-+
- extern void	 journal_lock_updates (journal_t *);
- extern void	 journal_unlock_updates (journal_t *);
- 
-Index: linux-2.6/fs/jbd/checkpoint.c
-===================================================================
---- linux-2.6.orig/fs/jbd/checkpoint.c	2006-07-15 16:08:36.000000000 +0800
-+++ linux-2.6/fs/jbd/checkpoint.c	2006-07-15 16:13:01.000000000 +0800
-@@ -688,6 +688,7 @@ void __journal_drop_transaction(journal_
- 	J_ASSERT(transaction->t_checkpoint_list == NULL);
- 	J_ASSERT(transaction->t_checkpoint_io_list == NULL);
- 	J_ASSERT(transaction->t_updates == 0);
-+	J_ASSERT(list_empty(&transaction->t_jcb));
- 	J_ASSERT(journal->j_committing_transaction != transaction);
- 	J_ASSERT(journal->j_running_transaction != transaction);
- 
-Index: linux-2.6/fs/jbd/commit.c
-===================================================================
---- linux-2.6.orig/fs/jbd/commit.c	2006-07-15 16:08:36.000000000 +0800
-+++ linux-2.6/fs/jbd/commit.c	2006-07-15 16:13:01.000000000 +0800
-@@ -708,6 +708,30 @@ wait_for_iobuf:
-            transaction can be removed from any checkpoint list it was on
-            before. */
- 
-+	/*
-+	 * Call any callbacks that had been registered for handles in this
-+	 * transaction.  It is up to the callback to free any allocated
-+	 * memory.
-+	 *
-+	 * The spinlocking (t_jcb_lock) here is surely unnecessary...
-+	 */
-+	spin_lock(&commit_transaction->t_jcb_lock);
-+	if (!list_empty(&commit_transaction->t_jcb)) {
-+		struct list_head *p, *n;
-+		int error = is_journal_aborted(journal);
-+
-+		list_for_each_safe(p, n, &commit_transaction->t_jcb) {
-+			struct journal_callback *jcb;
-+
-+			jcb = list_entry(p, struct journal_callback, jcb_list);
-+			list_del(p);
-+			spin_unlock(&commit_transaction->t_jcb_lock);
-+			jcb->jcb_func(jcb, error);
-+			spin_lock(&commit_transaction->t_jcb_lock);
-+		}
-+	}
-+	spin_unlock(&commit_transaction->t_jcb_lock);
-+
- 	jbd_debug(3, "JBD: commit phase 7\n");
- 
- 	J_ASSERT(commit_transaction->t_sync_datalist == NULL);
-Index: linux-2.6/fs/jbd/journal.c
-===================================================================
---- linux-2.6.orig/fs/jbd/journal.c	2006-07-15 16:08:36.000000000 +0800
-+++ linux-2.6/fs/jbd/journal.c	2006-07-15 16:13:01.000000000 +0800
-@@ -58,6 +58,7 @@ EXPORT_SYMBOL(journal_sync_buffer);
- #endif
- EXPORT_SYMBOL(journal_flush);
- EXPORT_SYMBOL(journal_revoke);
-+EXPORT_SYMBOL(journal_callback_set);
- 
- EXPORT_SYMBOL(journal_init_dev);
- EXPORT_SYMBOL(journal_init_inode);
-@@ -80,6 +81,7 @@ EXPORT_SYMBOL(journal_wipe);
- EXPORT_SYMBOL(journal_blocks_per_page);
- EXPORT_SYMBOL(journal_invalidatepage);
- EXPORT_SYMBOL(journal_try_to_free_buffers);
-+EXPORT_SYMBOL(journal_bmap);
- EXPORT_SYMBOL(journal_force_commit);
- 
- static int journal_convert_superblock_v1(journal_t *, journal_superblock_t *);
-Index: linux-2.6/fs/jbd/transaction.c
-===================================================================
---- linux-2.6.orig/fs/jbd/transaction.c	2006-07-15 16:08:35.000000000 +0800
-+++ linux-2.6/fs/jbd/transaction.c	2006-07-15 16:13:01.000000000 +0800
-@@ -50,7 +50,9 @@ get_transaction(journal_t *journal, tran
- 	transaction->t_state = T_RUNNING;
- 	transaction->t_tid = journal->j_transaction_sequence++;
- 	transaction->t_expires = jiffies + journal->j_commit_interval;
-+	INIT_LIST_HEAD(&transaction->t_jcb);
- 	spin_lock_init(&transaction->t_handle_lock);
-+	spin_lock_init(&transaction->t_jcb_lock);
- 
- 	/* Set up the commit timer for the new transaction. */
- 	journal->j_commit_timer.expires = transaction->t_expires;
-@@ -241,6 +243,7 @@ static handle_t *new_handle(int nblocks)
- 	memset(handle, 0, sizeof(*handle));
- 	handle->h_buffer_credits = nblocks;
- 	handle->h_ref = 1;
-+	INIT_LIST_HEAD(&handle->h_jcb);
- 
- 	return handle;
- }
-@@ -1291,6 +1294,36 @@ drop:
- }
- 
- /**
-+ * void journal_callback_set() -  Register a callback function for this handle.
-+ * @handle: handle to attach the callback to.
-+ * @func: function to callback.
-+ * @jcb:  structure with additional information required by func() , and
-+ *        some space for jbd internal information.
-+ * 
-+ * The function will be
-+ * called when the transaction that this handle is part of has been
-+ * committed to disk with the original callback data struct and the
-+ * error status of the journal as parameters.  There is no guarantee of
-+ * ordering between handles within a single transaction, nor between
-+ * callbacks registered on the same handle.
-+ *
-+ * The caller is responsible for allocating the journal_callback struct.
-+ * This is to allow the caller to add as much extra data to the callback
-+ * as needed, but reduce the overhead of multiple allocations.  The caller
-+ * allocated struct must start with a struct journal_callback at offset 0,
-+ * and has the caller-specific data afterwards.
-+ */
-+void journal_callback_set(handle_t *handle,
-+			void (*func)(struct journal_callback *jcb, int error),
-+			struct journal_callback *jcb)
-+{
-+	spin_lock(&handle->h_transaction->t_jcb_lock);
-+	list_add_tail(&jcb->jcb_list, &handle->h_jcb);
-+	spin_unlock(&handle->h_transaction->t_jcb_lock);
-+	jcb->jcb_func = func;
-+}
-+
-+/**
-  * int journal_stop() - complete a transaction
-  * @handle: tranaction to complete.
-  * 
-@@ -1363,6 +1396,11 @@ int journal_stop(handle_t *handle)
- 			wake_up(&journal->j_wait_transaction_locked);
- 	}
- 
-+	/* Move callbacks from the handle to the transaction. */
-+	spin_lock(&transaction->t_jcb_lock);
-+	list_splice(&handle->h_jcb, &transaction->t_jcb);
-+	spin_unlock(&transaction->t_jcb_lock);
-+
- 	/*
- 	 * If the handle is marked SYNC, we need to set another commit
- 	 * going!  We also want to force a commit if the current
diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch
deleted file mode 100644
index 4f4f0693bcb12fe00f3d14ae41a77095f0950886..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6-sles10.patch
+++ /dev/null
@@ -1,628 +0,0 @@
-Index: linux-2.6.16.53-0.16/fs/jbd/commit.c
-===================================================================
---- linux-2.6.16.53-0.16.orig/fs/jbd/commit.c
-+++ linux-2.6.16.53-0.16/fs/jbd/commit.c
-@@ -22,6 +22,7 @@
- #include <linux/pagemap.h>
- #include <linux/smp_lock.h>
- #include <linux/jiffies.h>
-+#include <linux/crc32.h>
- 
- /*
-  * Default IO end handler for temporary BJ_IO buffer_heads.
-@@ -94,19 +95,23 @@ static int inverted_lock(journal_t *jour
- 	return 1;
- }
- 
--/* Done it all: now write the commit record.  We should have
-+/*
-+ * Done it all: now submit the commit record.  We should have
-  * cleaned up our previous buffers by now, so if we are in abort
-  * mode we can now just skip the rest of the journal write
-  * entirely.
-  *
-  * Returns 1 if the journal needs to be aborted or 0 on success
-  */
--static int journal_write_commit_record(journal_t *journal,
--					transaction_t *commit_transaction)
-+static int journal_submit_commit_record(journal_t *journal,
-+					transaction_t *commit_transaction,
-+					struct buffer_head **cbh,
-+					__u32 crc32_sum)
- {
- 	struct journal_head *descriptor;
-+	struct commit_header *tmp;
- 	struct buffer_head *bh;
--	int i, ret;
-+	int ret;
- 	int barrier_done = 0;
- 
- 	if (is_journal_aborted(journal))
-@@ -118,21 +123,35 @@ static int journal_write_commit_record(j
- 
- 	bh = jh2bh(descriptor);
- 
--	/* AKPM: buglet - add `i' to tmp! */
--	for (i = 0; i < bh->b_size; i += 512) {
--		journal_header_t *tmp = (journal_header_t*)bh->b_data;
--		tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
--		tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
--		tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
-+	tmp = (struct commit_header *)bh->b_data;
-+	tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
-+	tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
-+	tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
-+ 		 		
-+	if (JFS_HAS_COMPAT_FEATURE(journal,
-+				JFS_FEATURE_COMPAT_CHECKSUM)) {
-+		tmp->h_chksum_type 	= JFS_CRC32_CHKSUM;
-+		tmp->h_chksum_size 	= JFS_CRC32_CHKSUM_SIZE;
-+		tmp->h_chksum[0] 	= cpu_to_be32(crc32_sum);
- 	}
- 
--	JBUFFER_TRACE(descriptor, "write commit block");
-+	JBUFFER_TRACE(descriptor, "submit commit block");
-+	lock_buffer(bh);
-+	get_bh(bh);
-+
- 	set_buffer_dirty(bh);
--	if (journal->j_flags & JFS_BARRIER) {
-+	set_buffer_uptodate(bh);
-+	bh->b_end_io = journal_end_buffer_io_sync;
-+
-+	if (journal->j_flags & JFS_BARRIER &&
-+		!JFS_HAS_INCOMPAT_FEATURE(journal,
-+					 JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
-+
- 		set_buffer_ordered(bh);
- 		barrier_done = 1;
- 	}
--	ret = sync_dirty_buffer(bh);
-+	ret = submit_bh(WRITE, bh);
-+
- 	/* is it possible for another commit to fail at roughly
- 	 * the same time as this one?  If so, we don't want to
- 	 * trust the barrier flag in the super, but instead want
-@@ -153,12 +172,84 @@ static int journal_write_commit_record(j
- 		clear_buffer_ordered(bh);
- 		set_buffer_uptodate(bh);
- 		set_buffer_dirty(bh);
--		ret = sync_dirty_buffer(bh);
-+		ret = submit_bh(WRITE, bh);
- 	}
--	put_bh(bh);		/* One for getblk() */
--	journal_put_journal_head(descriptor);
-+	*cbh = bh;
-+	return ret;
-+}
- 
--	return (ret == -EIO);
-+/*
-+ * This function along with journal_submit_commit_record
-+ * allows to write the commit record asynchronously.
-+ */
-+static int journal_wait_on_commit_record(struct buffer_head *bh)
-+{
-+	int ret = 0;
-+
-+	clear_buffer_dirty(bh);
-+	wait_on_buffer(bh);
-+	
-+	if (unlikely(!buffer_uptodate(bh)))
-+		ret = -EIO;
-+	put_bh(bh);            /* One for getblk() */
-+	journal_put_journal_head(bh2jh(bh));
-+	
-+	return ret;
-+}
-+
-+/*
-+ * Wait for all submitted IO to complete.
-+ */
-+static int journal_wait_on_locked_list(journal_t *journal,
-+				       transaction_t *commit_transaction)
-+{
-+	int ret = 0;
-+	struct journal_head *jh;
-+
-+	while (commit_transaction->t_locked_list) {
-+		struct buffer_head *bh;
-+
-+		jh = commit_transaction->t_locked_list->b_tprev;
-+		bh = jh2bh(jh);
-+		get_bh(bh);
-+		if (buffer_locked(bh)) {
-+			spin_unlock(&journal->j_list_lock);
-+			wait_on_buffer(bh);
-+			if (unlikely(!buffer_uptodate(bh)))
-+				ret = -EIO;
-+			spin_lock(&journal->j_list_lock);
-+		}
-+		if (!inverted_lock(journal, bh)) {
-+			put_bh(bh);
-+			spin_lock(&journal->j_list_lock);
-+			continue;
-+		}
-+		if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) {
-+			__journal_unfile_buffer(jh);
-+			jbd_unlock_bh_state(bh);
-+			journal_remove_journal_head(bh);
-+			put_bh(bh);
-+		} else {
-+			jbd_unlock_bh_state(bh);
-+		}
-+		put_bh(bh);
-+		cond_resched_lock(&journal->j_list_lock);
-+	}
-+	return ret;
-+}
-+
-+static inline __u32 jbd_checksum_data(__u32 crc32_sum, struct buffer_head *bh)
-+{
-+	struct page *page = bh->b_page;
-+	char *addr;
-+	__u32 checksum;
-+
-+	addr = kmap_atomic(page, KM_USER0);
-+	checksum = crc32_be(crc32_sum,
-+			    (void *)(addr + offset_in_page(bh->b_data)),
-+			    bh->b_size);
-+	kunmap_atomic(addr, KM_USER0);
-+	return checksum;
- }
- 
- /*
-@@ -184,6 +275,8 @@ void journal_commit_transaction(journal_
- 	int first_tag = 0;
- 	int tag_flag;
- 	int i;
-+	struct buffer_head *cbh = NULL; /* For transactional checksums */
-+	__u32 crc32_sum = ~0;
- 
- 	/*
- 	 * First job: lock down the current transaction and wait for
-@@ -395,37 +488,14 @@ write_out_data:
- 	}
- 
- 	/*
--	 * Wait for all previously submitted IO to complete.
-+	 * Wait for all previously submitted IO to complete if commit
-+	 * record is to be written synchronously.
- 	 */
--	while (commit_transaction->t_locked_list) {
--		struct buffer_head *bh;
-+	if (!JFS_HAS_INCOMPAT_FEATURE(journal,
-+		JFS_FEATURE_INCOMPAT_ASYNC_COMMIT))
-+		err = journal_wait_on_locked_list(journal,
-+						  commit_transaction);
- 
--		jh = commit_transaction->t_locked_list->b_tprev;
--		bh = jh2bh(jh);
--		get_bh(bh);
--		if (buffer_locked(bh)) {
--			spin_unlock(&journal->j_list_lock);
--			wait_on_buffer(bh);
--			if (unlikely(!buffer_uptodate(bh)))
--				err = -EIO;
--			spin_lock(&journal->j_list_lock);
--		}
--		if (!inverted_lock(journal, bh)) {
--			put_bh(bh);
--			spin_lock(&journal->j_list_lock);
--			continue;
--		}
--		if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) {
--			__journal_unfile_buffer(jh);
--			jbd_unlock_bh_state(bh);
--			journal_remove_journal_head(bh);
--			put_bh(bh);
--		} else {
--			jbd_unlock_bh_state(bh);
--		}
--		put_bh(bh);
--		cond_resched_lock(&journal->j_list_lock);
--	}
- 	spin_unlock(&journal->j_list_lock);
- 
- 	if (err)
-@@ -598,6 +668,16 @@ write_out_data:
- start_journal_io:
- 			for (i = 0; i < bufs; i++) {
- 				struct buffer_head *bh = wbuf[i];
-+				/*
-+				 * Compute checksum.
-+				 */
-+				if (JFS_HAS_COMPAT_FEATURE(journal,
-+					JFS_FEATURE_COMPAT_CHECKSUM)) {
-+					crc32_sum =
-+						jbd_checksum_data(crc32_sum,
-+								   bh);
-+				}
-+
- 				lock_buffer(bh);
- 				clear_buffer_dirty(bh);
- 				set_buffer_uptodate(bh);
-@@ -614,6 +694,23 @@ start_journal_io:
- 		}
- 	}
- 
-+	/* Done it all: now write the commit record asynchronously. */
-+
-+	if (JFS_HAS_INCOMPAT_FEATURE(journal,
-+		JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
-+		err = journal_submit_commit_record(journal, commit_transaction,
-+						 &cbh, crc32_sum);
-+		if (err)
-+			__journal_abort_hard(journal);
-+
-+		spin_lock(&journal->j_list_lock);
-+		err = journal_wait_on_locked_list(journal,
-+						commit_transaction);
-+		spin_unlock(&journal->j_list_lock);
-+		if (err)
-+			__journal_abort_hard(journal);
-+	}
-+
- 	/* Lo and behold: we have just managed to send a transaction to
-            the log.  Before we can commit it, wait for the IO so far to
-            complete.  Control buffers being written are on the
-@@ -712,9 +809,15 @@ wait_for_iobuf:
- 	}
- 
- 	jbd_debug(3, "JBD: commit phase 6\n");
--
--	if (journal_write_commit_record(journal, commit_transaction))
--		err = -EIO;
-+		
-+	if (!JFS_HAS_INCOMPAT_FEATURE(journal,
-+		JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
-+		err = journal_submit_commit_record(journal, commit_transaction,
-+						&cbh, crc32_sum);
-+		if (err)
-+			__journal_abort_hard(journal);
-+	}
-+	err = journal_wait_on_commit_record(cbh);
- 
- 	if (err)
- 		__journal_abort_hard(journal);
-Index: linux-2.6.16.53-0.16/include/linux/jbd.h
-===================================================================
---- linux-2.6.16.53-0.16.orig/include/linux/jbd.h
-+++ linux-2.6.16.53-0.16/include/linux/jbd.h
-@@ -142,6 +142,29 @@ typedef struct journal_header_s
- 	__be32		h_sequence;
- } journal_header_t;
- 
-+/*
-+ * Checksum types.
-+ */
-+#define JFS_CRC32_CHKSUM   1
-+#define JFS_MD5_CHKSUM     2
-+#define JFS_SHA1_CHKSUM    3
-+
-+#define JFS_CRC32_CHKSUM_SIZE 4
-+
-+#define JFS_CHECKSUM_BYTES (32 / sizeof(u32))
-+/*
-+ * Commit block header for storing transactional checksums:
-+ */
-+struct commit_header
-+{
-+	__be32		h_magic;
-+	__be32          h_blocktype;
-+	__be32          h_sequence;
-+	unsigned char   h_chksum_type;
-+	unsigned char   h_chksum_size;
-+	unsigned char 	h_padding[2];
-+	__be32 		h_chksum[JFS_CHECKSUM_BYTES];
-+};
- 
- /* 
-  * The block tag: used to describe a single buffer in the journal 
-@@ -228,12 +251,16 @@ typedef struct journal_superblock_s
- 	((j)->j_format_version >= 2 &&					\
- 	 ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
- 
--#define JFS_FEATURE_INCOMPAT_REVOKE	0x00000001
-+#define JFS_FEATURE_COMPAT_CHECKSUM  	0x00000001
-+
-+#define JFS_FEATURE_INCOMPAT_REVOKE		0x00000001
-+#define JFS_FEATURE_INCOMPAT_ASYNC_COMMIT    	0x00000004
- 
- /* Features known to this kernel version: */
--#define JFS_KNOWN_COMPAT_FEATURES	0
-+#define JFS_KNOWN_COMPAT_FEATURES	JFS_FEATURE_COMPAT_CHECKSUM
- #define JFS_KNOWN_ROCOMPAT_FEATURES	0
--#define JFS_KNOWN_INCOMPAT_FEATURES	JFS_FEATURE_INCOMPAT_REVOKE
-+#define JFS_KNOWN_INCOMPAT_FEATURES	(JFS_FEATURE_INCOMPAT_REVOKE | \
-+					JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)
- 
- #ifdef __KERNEL__
- 
-@@ -1041,6 +1068,8 @@ extern int	   journal_check_available_fe
- 		   (journal_t *, unsigned long, unsigned long, unsigned long);
- extern int	   journal_set_features 
- 		   (journal_t *, unsigned long, unsigned long, unsigned long);
-+extern int	   journal_clear_features
-+		   (journal_t *, unsigned long, unsigned long, unsigned long);
- extern int	   journal_create     (journal_t *);
- extern int	   journal_load       (journal_t *journal);
- extern void	   journal_destroy    (journal_t *);
-Index: linux-2.6.16.53-0.16/fs/jbd/recovery.c
-===================================================================
---- linux-2.6.16.53-0.16.orig/fs/jbd/recovery.c
-+++ linux-2.6.16.53-0.16/fs/jbd/recovery.c
-@@ -21,6 +21,7 @@
- #include <linux/jbd.h>
- #include <linux/errno.h>
- #include <linux/slab.h>
-+#include <linux/crc32.h>
- #endif
- 
- /*
-@@ -307,6 +308,37 @@ int journal_skip_recovery(journal_t *jou
- 	return err;
- }
- 
-+/*
-+ * calc_chksums calculates the checksums for the blocks described in the
-+ * descriptor block.
-+ */
-+static int calc_chksums(journal_t *journal, struct buffer_head *bh,
-+		       unsigned long *next_log_block, __u32 *crc32_sum)
-+{
-+	int i, num_blks, err;
-+	unsigned long io_block;
-+	struct buffer_head *obh;
-+
-+	num_blks = count_tags(bh, journal->j_blocksize);
-+	/* Calculate checksum of the descriptor block. */
-+	*crc32_sum = crc32_be(*crc32_sum, (void *)bh->b_data, bh->b_size);
-+
-+	for (i = 0; i < num_blks; i++) {
-+		io_block = (*next_log_block)++;
-+		wrap(journal, *next_log_block);
-+		err = jread(&obh, journal, io_block);
-+		if (err) {
-+			printk(KERN_ERR "JBD: IO error %d recovering block "
-+				"%lu in log\n", err, io_block);
-+			return 1;
-+		} else {
-+			*crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
-+				     obh->b_size);
-+		}
-+	}
-+	return 0;
-+}
-+
- static int do_one_pass(journal_t *journal,
- 			struct recovery_info *info, enum passtype pass)
- {
-@@ -318,6 +350,7 @@ static int do_one_pass(journal_t *journa
- 	struct buffer_head *	bh;
- 	unsigned int		sequence;
- 	int			blocktype;
-+	__u32			crc32_sum = ~0; /* Transactional Checksums */
- 
- 	/* Precompute the maximum metadata descriptors in a descriptor block */
- 	int			MAX_BLOCKS_PER_DESC;
-@@ -409,9 +442,24 @@ static int do_one_pass(journal_t *journa
- 		switch(blocktype) {
- 		case JFS_DESCRIPTOR_BLOCK:
- 			/* If it is a valid descriptor block, replay it
--			 * in pass REPLAY; otherwise, just skip over the
--			 * blocks it describes. */
-+			 * in pass REPLAY; if journal_checksums enabled, then
-+			 * calculate checksums in PASS_SCAN, otherwise,
-+			 * just skip over the blocks it describes. */
- 			if (pass != PASS_REPLAY) {
-+				if (pass == PASS_SCAN &&
-+				    JFS_HAS_COMPAT_FEATURE(journal,
-+					    JFS_FEATURE_COMPAT_CHECKSUM) &&
-+				    !info->end_transaction) {
-+					if (calc_chksums(journal, bh,
-+							&next_log_block,
-+							&crc32_sum)) {
-+						put_bh(bh);
-+						break;
-+					}
-+					put_bh(bh);
-+					continue;
-+				}
-+
- 				next_log_block +=
- 					count_tags(bh, journal->j_blocksize);
- 				wrap(journal, next_log_block);
-@@ -506,9 +554,97 @@ static int do_one_pass(journal_t *journa
- 			continue;
- 
- 		case JFS_COMMIT_BLOCK:
--			/* Found an expected commit block: not much to
--			 * do other than move on to the next sequence
-+			/*     How to differentiate between interrupted commit
-+			 *               and journal corruption ?
-+			 *
-+			 * {nth transaction}
-+			 *        Checksum Verification Failed
-+			 *			 |
-+			 *		 ____________________
-+			 *		|		     |
-+			 * 	async_commit             sync_commit
-+			 *     		|                    |
-+			 *		| GO TO NEXT    "Journal Corruption"
-+			 *		| TRANSACTION
-+			 *		|
-+			 * {(n+1)th transanction}
-+			 *		|
-+			 * 	 _______|______________
-+			 * 	|	 	      |
-+			 * Commit block found	Commit block not found
-+			 *      |		      |
-+			 * "Journal Corruption"       |
-+			 *		 _____________|__________
-+			 *     		|	           	|
-+			 *	nth trans corrupt	OR   nth trans
-+			 *	and (n+1)th interrupted     interrupted	
-+			 *	before commit block
-+			 *      could reach the disk.
-+			 *	(Cannot find the difference in above
-+			 *	 mentioned conditions. Hence assume
-+			 *	 "Interrupted Commit".)
-+			 */
-+
-+			/* Found an expected commit block: if checksums
-+			 * are present verify them in PASS_SCAN; else not
-+			 * much to do other than move on to the next sequence
- 			 * number. */
-+			if (pass == PASS_SCAN &&
-+			    JFS_HAS_COMPAT_FEATURE(journal,
-+				    JFS_FEATURE_COMPAT_CHECKSUM)) {
-+				int chksum_err, chksum_seen;
-+				struct commit_header *cbh =
-+					(struct commit_header *)bh->b_data;
-+				unsigned found_chksum =
-+						be32_to_cpu(cbh->h_chksum[0]);
-+
-+				chksum_err = chksum_seen = 0;
-+
-+				if (info->end_transaction) {
-+					printk(KERN_ERR "JBD: Transaction %u "
-+						"found to be corrupt.\n",
-+						next_commit_ID - 1);
-+					brelse(bh);
-+					break;
-+				}
-+
-+				if (crc32_sum == found_chksum &&
-+				    cbh->h_chksum_type == JFS_CRC32_CHKSUM &&
-+				    cbh->h_chksum_size ==
-+						JFS_CRC32_CHKSUM_SIZE) {
-+				       chksum_seen = 1;
-+				} else if (!(cbh->h_chksum_type == 0 &&
-+					     cbh->h_chksum_size == 0 &&
-+					     found_chksum == 0 &&
-+					     !chksum_seen)) {
-+				/*
-+				 * If fs is mounted using an old kernel and then
-+				 * kernel with journal_chksum is used then we
-+				 * get a situation where the journal flag has
-+				 * checksum flag set but checksums are not
-+				 * present i.e chksum = 0, in the individual
-+				 * commit blocks.
-+				 * Hence to avoid checksum failures, in this
-+				 * situation, this extra check is added.
-+				 */
-+						chksum_err = 1;
-+				}
-+
-+				if (chksum_err) {
-+					info->end_transaction = next_commit_ID;
-+
-+					if (!JFS_HAS_INCOMPAT_FEATURE(journal,
-+					    JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){
-+						printk(KERN_ERR
-+						       "JBD: Transaction %u "
-+						       "found to be corrupt.\n",
-+						       next_commit_ID);
-+						brelse(bh);
-+						break;
-+					}
-+				}
-+				crc32_sum = ~0;
-+			}
- 			brelse(bh);
- 			next_commit_ID++;
- 			continue;
-@@ -543,9 +679,10 @@ static int do_one_pass(journal_t *journa
- 	 * transaction marks the end of the valid log.
- 	 */
- 
--	if (pass == PASS_SCAN)
--		info->end_transaction = next_commit_ID;
--	else {
-+	if (pass == PASS_SCAN) {
-+		if (!info->end_transaction)
-+			info->end_transaction = next_commit_ID;
-+	} else {
- 		/* It's really bad news if different passes end up at
- 		 * different places (but possible due to IO errors). */
- 		if (info->end_transaction != next_commit_ID) {
-Index: linux-2.6.16.53-0.16/fs/jbd/journal.c
-===================================================================
---- linux-2.6.16.53-0.16.orig/fs/jbd/journal.c
-+++ linux-2.6.16.53-0.16/fs/jbd/journal.c
-@@ -64,6 +64,7 @@ EXPORT_SYMBOL(journal_update_format);
- EXPORT_SYMBOL(journal_check_used_features);
- EXPORT_SYMBOL(journal_check_available_features);
- EXPORT_SYMBOL(journal_set_features);
-+EXPORT_SYMBOL(journal_clear_features);
- EXPORT_SYMBOL(journal_create);
- EXPORT_SYMBOL(journal_load);
- EXPORT_SYMBOL(journal_destroy);
-@@ -1565,6 +1566,33 @@ int journal_set_features (journal_t *jou
- 	return 1;
- }
- 
-+/**
-+ * int journal_clear_features () - Clear a given journal feature in the superblock
-+ * @journal: Journal to act on.
-+ * @compat: bitmask of compatible features
-+ * @ro: bitmask of features that force read-only mount
-+ * @incompat: bitmask of incompatible features
-+ *
-+ * Clear a given journal feature as present on the
-+ * superblock.  Returns true if the requested features could be reset.
-+ *
-+ */
-+int journal_clear_features (journal_t *journal, unsigned long compat,
-+			  unsigned long ro, unsigned long incompat)
-+{
-+	journal_superblock_t *sb;
-+
-+	jbd_debug(1, "Clear features 0x%lx/0x%lx/0x%lx\n",
-+		  compat, ro, incompat);
-+
-+	sb = journal->j_superblock;
-+
-+	sb->s_feature_compat    &= ~cpu_to_be32(compat);
-+	sb->s_feature_ro_compat &= ~cpu_to_be32(ro);
-+	sb->s_feature_incompat  &= ~cpu_to_be32(incompat);
-+
-+	return 1;
-+}
- 
- /**
-  * int journal_update_format () - Update on-disk journal structure.
-Index: linux-2.6.16.53-0.16/fs/Kconfig
-===================================================================
---- linux-2.6.16.53-0.16.orig/fs/Kconfig
-+++ linux-2.6.16.53-0.16/fs/Kconfig
-@@ -140,6 +140,7 @@ config EXT3_FS_SECURITY
- 
- config JBD
- 	tristate
-+	select CRC32
- 	help
- 	  This is a generic journaling layer for block devices.  It is
- 	  currently used by the ext3 and OCFS2 file systems, but it could
-Index: linux-2.6.16.53-0.16/Documentation/filesystems/ext3.txt
-===================================================================
---- linux-2.6.16.53-0.16.orig/Documentation/filesystems/ext3.txt
-+++ linux-2.6.16.53-0.16/Documentation/filesystems/ext3.txt
-@@ -14,6 +14,16 @@ Options
- When mounting an ext3 filesystem, the following option are accepted:
- (*) == default
- 
-+journal_checksum	Enable checksumming of the journal transactions.
-+			This will allow the recovery code in e2fsck and the
-+			kernel to detect corruption in the kernel.  It is a
-+			compatible change and will be ignored by older kernels.
-+
-+journal_async_commit	Commit block can be written to disk without waiting
-+			for descriptor blocks. If enabled older kernels cannot
-+			mount the device. This will enable 'journal_checksum'
-+			internally.
-+
- journal=update		Update the ext3 file system's journal to the current
- 			format.
- 
diff --git a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch
deleted file mode 100644
index 90ede90000214d95d63efc3497910e6c8555bdd0..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-journal-chksum-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,636 +0,0 @@
-Index: linux-2.6.18.8/fs/jbd/commit.c
-===================================================================
---- linux-2.6.18.8.orig/fs/jbd/commit.c
-+++ linux-2.6.18.8/fs/jbd/commit.c
-@@ -22,6 +22,7 @@
- #include <linux/mm.h>
- #include <linux/pagemap.h>
- #include <linux/smp_lock.h>
-+#include <linux/crc32.h>
- 
- 
- /*
-@@ -95,19 +96,23 @@ static int inverted_lock(journal_t *jour
- 	return 1;
- }
- 
--/* Done it all: now write the commit record.  We should have
-+/*
-+ * Done it all: now submit the commit record.  We should have
-  * cleaned up our previous buffers by now, so if we are in abort
-  * mode we can now just skip the rest of the journal write
-  * entirely.
-  *
-  * Returns 1 if the journal needs to be aborted or 0 on success
-  */
--static int journal_write_commit_record(journal_t *journal,
--					transaction_t *commit_transaction)
-+static int journal_submit_commit_record(journal_t *journal,
-+					transaction_t *commit_transaction,
-+					struct buffer_head **cbh,
-+					__u32 crc32_sum)
- {
- 	struct journal_head *descriptor;
-+	struct commit_header *tmp;
- 	struct buffer_head *bh;
--	int i, ret;
-+	int ret;
- 	int barrier_done = 0;
- 
- 	if (is_journal_aborted(journal))
-@@ -119,21 +124,35 @@ static int journal_write_commit_record(j
- 
- 	bh = jh2bh(descriptor);
- 
--	/* AKPM: buglet - add `i' to tmp! */
--	for (i = 0; i < bh->b_size; i += 512) {
--		journal_header_t *tmp = (journal_header_t*)bh->b_data;
--		tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
--		tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
--		tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
-+	tmp = (struct commit_header *)bh->b_data;
-+	tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER);
-+	tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK);
-+	tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid);
-+ 		 		
-+	if (JFS_HAS_COMPAT_FEATURE(journal,
-+				JFS_FEATURE_COMPAT_CHECKSUM)) {
-+		tmp->h_chksum_type 	= JFS_CRC32_CHKSUM;
-+		tmp->h_chksum_size 	= JFS_CRC32_CHKSUM_SIZE;
-+		tmp->h_chksum[0] 	= cpu_to_be32(crc32_sum);
- 	}
- 
--	JBUFFER_TRACE(descriptor, "write commit block");
-+	JBUFFER_TRACE(descriptor, "submit commit block");
-+	lock_buffer(bh);
-+	get_bh(bh);
-+
- 	set_buffer_dirty(bh);
--	if (journal->j_flags & JFS_BARRIER) {
-+	set_buffer_uptodate(bh);
-+	bh->b_end_io = journal_end_buffer_io_sync;
-+
-+	if (journal->j_flags & JFS_BARRIER &&
-+		!JFS_HAS_INCOMPAT_FEATURE(journal,
-+					 JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
-+
- 		set_buffer_ordered(bh);
- 		barrier_done = 1;
- 	}
--	ret = sync_dirty_buffer(bh);
-+	ret = submit_bh(WRITE, bh);
-+
- 	/* is it possible for another commit to fail at roughly
- 	 * the same time as this one?  If so, we don't want to
- 	 * trust the barrier flag in the super, but instead want
-@@ -154,12 +173,70 @@ static int journal_write_commit_record(j
- 		clear_buffer_ordered(bh);
- 		set_buffer_uptodate(bh);
- 		set_buffer_dirty(bh);
--		ret = sync_dirty_buffer(bh);
-+		ret = submit_bh(WRITE, bh);
- 	}
--	put_bh(bh);		/* One for getblk() */
--	journal_put_journal_head(descriptor);
-+	*cbh = bh;
-+	return ret;
-+}
-+
-+/*
-+ * This function along with journal_submit_commit_record
-+ * allows to write the commit record asynchronously.
-+ */
-+static int journal_wait_on_commit_record(struct buffer_head *bh)
-+{
-+	int ret = 0;
-+
-+	clear_buffer_dirty(bh);
-+	wait_on_buffer(bh);
-+	
-+	if (unlikely(!buffer_uptodate(bh)))
-+		ret = -EIO;
-+	put_bh(bh);            /* One for getblk() */
-+	journal_put_journal_head(bh2jh(bh));
-+	
-+	return ret;
-+}
-+
-+/*
-+ * Wait for all submitted IO to complete.
-+ */
-+static int journal_wait_on_locked_list(journal_t *journal,
-+				       transaction_t *commit_transaction)
-+{
-+	int ret = 0;
-+	struct journal_head *jh;
- 
--	return (ret == -EIO);
-+	while (commit_transaction->t_locked_list) {
-+		struct buffer_head *bh;
-+
-+		jh = commit_transaction->t_locked_list->b_tprev;
-+		bh = jh2bh(jh);
-+		get_bh(bh);
-+		if (buffer_locked(bh)) {
-+			spin_unlock(&journal->j_list_lock);
-+			wait_on_buffer(bh);
-+			if (unlikely(!buffer_uptodate(bh)))
-+				ret = -EIO;
-+			spin_lock(&journal->j_list_lock);
-+		}
-+		if (!inverted_lock(journal, bh)) {
-+			put_bh(bh);
-+			spin_lock(&journal->j_list_lock);
-+			continue;
-+		}
-+		if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) {
-+			__journal_unfile_buffer(jh);
-+			jbd_unlock_bh_state(bh);
-+			journal_remove_journal_head(bh);
-+			put_bh(bh);
-+		} else {
-+			jbd_unlock_bh_state(bh);
-+		}
-+		put_bh(bh);
-+		cond_resched_lock(&journal->j_list_lock);
-+	}
-+	return ret;
- }
- 
- void journal_do_submit_data(struct buffer_head **wbuf, int bufs)
-@@ -273,6 +350,20 @@ write_out_data:
- 	journal_do_submit_data(wbuf, bufs);
- }
- 
-+static inline __u32 jbd_checksum_data(__u32 crc32_sum, struct buffer_head *bh)
-+{
-+	struct page *page = bh->b_page;
-+	char *addr;
-+	__u32 checksum;
-+
-+	addr = kmap_atomic(page, KM_USER0);
-+	checksum = crc32_be(crc32_sum,
-+			    (void *)(addr + offset_in_page(bh->b_data)),
-+			    bh->b_size);
-+	kunmap_atomic(addr, KM_USER0);
-+	return checksum;
-+}
-+
- /*
-  * journal_commit_transaction
-  *
-@@ -296,6 +387,8 @@ void journal_commit_transaction(journal_
- 	int first_tag = 0;
- 	int tag_flag;
- 	int i;
-+	struct buffer_head *cbh = NULL; /* For transactional checksums */
-+	__u32 crc32_sum = ~0;
- 
- 	/*
- 	 * First job: lock down the current transaction and wait for
-@@ -439,38 +532,14 @@ void journal_commit_transaction(journal_
- 	journal_submit_data_buffers(journal, commit_transaction);
- 
- 	/*
--	 * Wait for all previously submitted IO to complete.
-+	 * Wait for all previously submitted IO to complete if commit
-+	 * record is to be written synchronously.
- 	 */
- 	spin_lock(&journal->j_list_lock);
--	while (commit_transaction->t_locked_list) {
--		struct buffer_head *bh;
--
--		jh = commit_transaction->t_locked_list->b_tprev;
--		bh = jh2bh(jh);
--		get_bh(bh);
--		if (buffer_locked(bh)) {
--			spin_unlock(&journal->j_list_lock);
--			wait_on_buffer(bh);
--			if (unlikely(!buffer_uptodate(bh)))
--				err = -EIO;
--			spin_lock(&journal->j_list_lock);
--		}
--		if (!inverted_lock(journal, bh)) {
--			put_bh(bh);
--			spin_lock(&journal->j_list_lock);
--			continue;
--		}
--		if (buffer_jbd(bh) && jh->b_jlist == BJ_Locked) {
--			__journal_unfile_buffer(jh);
--			jbd_unlock_bh_state(bh);
--			journal_remove_journal_head(bh);
--			put_bh(bh);
--		} else {
--			jbd_unlock_bh_state(bh);
--		}
--		put_bh(bh);
--		cond_resched_lock(&journal->j_list_lock);
--	}
-+	if (!JFS_HAS_INCOMPAT_FEATURE(journal,
-+		JFS_FEATURE_INCOMPAT_ASYNC_COMMIT))
-+		err = journal_wait_on_locked_list(journal,
-+						  commit_transaction);
- 	spin_unlock(&journal->j_list_lock);
- 
- 	if (err)
-@@ -643,6 +712,16 @@ void journal_commit_transaction(journal_
- start_journal_io:
- 			for (i = 0; i < bufs; i++) {
- 				struct buffer_head *bh = wbuf[i];
-+				/*
-+				 * Compute checksum.
-+				 */
-+				if (JFS_HAS_COMPAT_FEATURE(journal,
-+					JFS_FEATURE_COMPAT_CHECKSUM)) {
-+					crc32_sum =
-+						jbd_checksum_data(crc32_sum,
-+								   bh);
-+				}
-+
- 				lock_buffer(bh);
- 				clear_buffer_dirty(bh);
- 				set_buffer_uptodate(bh);
-@@ -659,6 +738,23 @@ start_journal_io:
- 		}
- 	}
- 
-+	/* Done it all: now write the commit record asynchronously. */
-+
-+	if (JFS_HAS_INCOMPAT_FEATURE(journal,
-+		JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
-+		err = journal_submit_commit_record(journal, commit_transaction,
-+						 &cbh, crc32_sum);
-+		if (err)
-+			__journal_abort_hard(journal);
-+
-+		spin_lock(&journal->j_list_lock);
-+		err = journal_wait_on_locked_list(journal,
-+						commit_transaction);
-+		spin_unlock(&journal->j_list_lock);
-+		if (err)
-+			__journal_abort_hard(journal);
-+	}
-+
- 	/* Lo and behold: we have just managed to send a transaction to
-            the log.  Before we can commit it, wait for the IO so far to
-            complete.  Control buffers being written are on the
-@@ -757,9 +853,15 @@ wait_for_iobuf:
- 	}
- 
- 	jbd_debug(3, "JBD: commit phase 6\n");
--
--	if (journal_write_commit_record(journal, commit_transaction))
--		err = -EIO;
-+		
-+	if (!JFS_HAS_INCOMPAT_FEATURE(journal,
-+		JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)) {
-+		err = journal_submit_commit_record(journal, commit_transaction,
-+						&cbh, crc32_sum);
-+		if (err)
-+			__journal_abort_hard(journal);
-+	}
-+	err = journal_wait_on_commit_record(cbh);
- 
- 	if (err)
- 		__journal_abort_hard(journal);
-Index: linux-2.6.18.8/include/linux/jbd.h
-===================================================================
---- linux-2.6.18.8.orig/include/linux/jbd.h
-+++ linux-2.6.18.8/include/linux/jbd.h
-@@ -148,6 +148,29 @@ typedef struct journal_header_s
- 	__be32		h_sequence;
- } journal_header_t;
- 
-+/*
-+ * Checksum types.
-+ */
-+#define JFS_CRC32_CHKSUM   1
-+#define JFS_MD5_CHKSUM     2
-+#define JFS_SHA1_CHKSUM    3
-+
-+#define JFS_CRC32_CHKSUM_SIZE 4
-+
-+#define JFS_CHECKSUM_BYTES (32 / sizeof(u32))
-+/*
-+ * Commit block header for storing transactional checksums:
-+ */
-+struct commit_header
-+{
-+	__be32		h_magic;
-+	__be32          h_blocktype;
-+	__be32          h_sequence;
-+	unsigned char   h_chksum_type;
-+	unsigned char   h_chksum_size;
-+	unsigned char 	h_padding[2];
-+	__be32 		h_chksum[JFS_CHECKSUM_BYTES];
-+};
- 
- /* 
-  * The block tag: used to describe a single buffer in the journal 
-@@ -234,12 +257,16 @@ typedef struct journal_superblock_s
- 	((j)->j_format_version >= 2 &&					\
- 	 ((j)->j_superblock->s_feature_incompat & cpu_to_be32((mask))))
- 
--#define JFS_FEATURE_INCOMPAT_REVOKE	0x00000001
-+#define JFS_FEATURE_COMPAT_CHECKSUM  	0x00000001
-+
-+#define JFS_FEATURE_INCOMPAT_REVOKE		0x00000001
-+#define JFS_FEATURE_INCOMPAT_ASYNC_COMMIT    	0x00000004
- 
- /* Features known to this kernel version: */
--#define JFS_KNOWN_COMPAT_FEATURES	0
-+#define JFS_KNOWN_COMPAT_FEATURES	JFS_FEATURE_COMPAT_CHECKSUM
- #define JFS_KNOWN_ROCOMPAT_FEATURES	0
--#define JFS_KNOWN_INCOMPAT_FEATURES	JFS_FEATURE_INCOMPAT_REVOKE
-+#define JFS_KNOWN_INCOMPAT_FEATURES	(JFS_FEATURE_INCOMPAT_REVOKE | \
-+					JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)
- 
- #ifdef __KERNEL__
- 
-@@ -1053,6 +1080,8 @@ extern int	   journal_check_available_fe
- 		   (journal_t *, unsigned long, unsigned long, unsigned long);
- extern int	   journal_set_features 
- 		   (journal_t *, unsigned long, unsigned long, unsigned long);
-+extern int	   journal_clear_features
-+		   (journal_t *, unsigned long, unsigned long, unsigned long);
- extern int	   journal_create     (journal_t *);
- extern int	   journal_load       (journal_t *journal);
- extern void	   journal_destroy    (journal_t *);
-Index: linux-2.6.18.8/fs/jbd/recovery.c
-===================================================================
---- linux-2.6.18.8.orig/fs/jbd/recovery.c
-+++ linux-2.6.18.8/fs/jbd/recovery.c
-@@ -21,6 +21,7 @@
- #include <linux/jbd.h>
- #include <linux/errno.h>
- #include <linux/slab.h>
-+#include <linux/crc32.h>
- #endif
- 
- /*
-@@ -307,6 +308,37 @@ int journal_skip_recovery(journal_t *jou
- 	return err;
- }
- 
-+/*
-+ * calc_chksums calculates the checksums for the blocks described in the
-+ * descriptor block.
-+ */
-+static int calc_chksums(journal_t *journal, struct buffer_head *bh,
-+		       unsigned long *next_log_block, __u32 *crc32_sum)
-+{
-+	int i, num_blks, err;
-+	unsigned long io_block;
-+	struct buffer_head *obh;
-+
-+	num_blks = count_tags(bh, journal->j_blocksize);
-+	/* Calculate checksum of the descriptor block. */
-+	*crc32_sum = crc32_be(*crc32_sum, (void *)bh->b_data, bh->b_size);
-+
-+	for (i = 0; i < num_blks; i++) {
-+		io_block = (*next_log_block)++;
-+		wrap(journal, *next_log_block);
-+		err = jread(&obh, journal, io_block);
-+		if (err) {
-+			printk(KERN_ERR "JBD: IO error %d recovering block "
-+				"%lu in log\n", err, io_block);
-+			return 1;
-+		} else {
-+			*crc32_sum = crc32_be(*crc32_sum, (void *)obh->b_data,
-+				     obh->b_size);
-+		}
-+	}
-+	return 0;
-+}
-+
- static int do_one_pass(journal_t *journal,
- 			struct recovery_info *info, enum passtype pass)
- {
-@@ -318,6 +350,7 @@ static int do_one_pass(journal_t *journa
- 	struct buffer_head *	bh;
- 	unsigned int		sequence;
- 	int			blocktype;
-+	__u32			crc32_sum = ~0; /* Transactional Checksums */
- 
- 	/* Precompute the maximum metadata descriptors in a descriptor block */
- 	int			MAX_BLOCKS_PER_DESC;
-@@ -409,9 +442,24 @@ static int do_one_pass(journal_t *journa
- 		switch(blocktype) {
- 		case JFS_DESCRIPTOR_BLOCK:
- 			/* If it is a valid descriptor block, replay it
--			 * in pass REPLAY; otherwise, just skip over the
--			 * blocks it describes. */
-+			 * in pass REPLAY; if journal_checksums enabled, then
-+			 * calculate checksums in PASS_SCAN, otherwise,
-+			 * just skip over the blocks it describes. */
- 			if (pass != PASS_REPLAY) {
-+				if (pass == PASS_SCAN &&
-+				    JFS_HAS_COMPAT_FEATURE(journal,
-+					    JFS_FEATURE_COMPAT_CHECKSUM) &&
-+				    !info->end_transaction) {
-+					if (calc_chksums(journal, bh,
-+							&next_log_block,
-+							&crc32_sum)) {
-+						put_bh(bh);
-+						break;
-+					}
-+					put_bh(bh);
-+					continue;
-+				}
-+
- 				next_log_block +=
- 					count_tags(bh, journal->j_blocksize);
- 				wrap(journal, next_log_block);
-@@ -506,9 +554,97 @@ static int do_one_pass(journal_t *journa
- 			continue;
- 
- 		case JFS_COMMIT_BLOCK:
--			/* Found an expected commit block: not much to
--			 * do other than move on to the next sequence
-+			/*     How to differentiate between interrupted commit
-+			 *               and journal corruption ?
-+			 *
-+			 * {nth transaction}
-+			 *        Checksum Verification Failed
-+			 *			 |
-+			 *		 ____________________
-+			 *		|		     |
-+			 * 	async_commit             sync_commit
-+			 *     		|                    |
-+			 *		| GO TO NEXT    "Journal Corruption"
-+			 *		| TRANSACTION
-+			 *		|
-+			 * {(n+1)th transanction}
-+			 *		|
-+			 * 	 _______|______________
-+			 * 	|	 	      |
-+			 * Commit block found	Commit block not found
-+			 *      |		      |
-+			 * "Journal Corruption"       |
-+			 *		 _____________|__________
-+			 *     		|	           	|
-+			 *	nth trans corrupt	OR   nth trans
-+			 *	and (n+1)th interrupted     interrupted	
-+			 *	before commit block
-+			 *      could reach the disk.
-+			 *	(Cannot find the difference in above
-+			 *	 mentioned conditions. Hence assume
-+			 *	 "Interrupted Commit".)
-+			 */
-+
-+			/* Found an expected commit block: if checksums
-+			 * are present verify them in PASS_SCAN; else not
-+			 * much to do other than move on to the next sequence
- 			 * number. */
-+			if (pass == PASS_SCAN &&
-+			    JFS_HAS_COMPAT_FEATURE(journal,
-+				    JFS_FEATURE_COMPAT_CHECKSUM)) {
-+				int chksum_err, chksum_seen;
-+				struct commit_header *cbh =
-+					(struct commit_header *)bh->b_data;
-+				unsigned found_chksum =
-+						be32_to_cpu(cbh->h_chksum[0]);
-+
-+				chksum_err = chksum_seen = 0;
-+
-+				if (info->end_transaction) {
-+					printk(KERN_ERR "JBD: Transaction %u "
-+						"found to be corrupt.\n",
-+						next_commit_ID - 1);
-+					brelse(bh);
-+					break;
-+				}
-+
-+				if (crc32_sum == found_chksum &&
-+				    cbh->h_chksum_type == JFS_CRC32_CHKSUM &&
-+				    cbh->h_chksum_size ==
-+						JFS_CRC32_CHKSUM_SIZE) {
-+				       chksum_seen = 1;
-+				} else if (!(cbh->h_chksum_type == 0 &&
-+					     cbh->h_chksum_size == 0 &&
-+					     found_chksum == 0 &&
-+					     !chksum_seen)) {
-+				/*
-+				 * If fs is mounted using an old kernel and then
-+				 * kernel with journal_chksum is used then we
-+				 * get a situation where the journal flag has
-+				 * checksum flag set but checksums are not
-+				 * present i.e chksum = 0, in the individual
-+				 * commit blocks.
-+				 * Hence to avoid checksum failures, in this
-+				 * situation, this extra check is added.
-+				 */
-+						chksum_err = 1;
-+				}
-+
-+				if (chksum_err) {
-+					info->end_transaction = next_commit_ID;
-+
-+					if (!JFS_HAS_INCOMPAT_FEATURE(journal,
-+					    JFS_FEATURE_INCOMPAT_ASYNC_COMMIT)){
-+						printk(KERN_ERR
-+						       "JBD: Transaction %u "
-+						       "found to be corrupt.\n",
-+						       next_commit_ID);
-+						brelse(bh);
-+						break;
-+					}
-+				}
-+				crc32_sum = ~0;
-+			}
- 			brelse(bh);
- 			next_commit_ID++;
- 			continue;
-@@ -544,9 +680,10 @@ static int do_one_pass(journal_t *journa
- 	 * transaction marks the end of the valid log.
- 	 */
- 
--	if (pass == PASS_SCAN)
--		info->end_transaction = next_commit_ID;
--	else {
-+	if (pass == PASS_SCAN) {
-+		if (!info->end_transaction)
-+			info->end_transaction = next_commit_ID;
-+	} else {
- 		/* It's really bad news if different passes end up at
- 		 * different places (but possible due to IO errors). */
- 		if (info->end_transaction != next_commit_ID) {
-Index: linux-2.6.18.8/fs/jbd/journal.c
-===================================================================
---- linux-2.6.18.8.orig/fs/jbd/journal.c
-+++ linux-2.6.18.8/fs/jbd/journal.c
-@@ -67,6 +67,7 @@ EXPORT_SYMBOL(journal_update_format);
- EXPORT_SYMBOL(journal_check_used_features);
- EXPORT_SYMBOL(journal_check_available_features);
- EXPORT_SYMBOL(journal_set_features);
-+EXPORT_SYMBOL(journal_clear_features);
- EXPORT_SYMBOL(journal_create);
- EXPORT_SYMBOL(journal_load);
- EXPORT_SYMBOL(journal_destroy);
-@@ -1573,6 +1574,33 @@ int journal_set_features (journal_t *jou
- 	return 1;
- }
- 
-+/**
-+ * int journal_clear_features () - Clear a given journal feature in the superblock
-+ * @journal: Journal to act on.
-+ * @compat: bitmask of compatible features
-+ * @ro: bitmask of features that force read-only mount
-+ * @incompat: bitmask of incompatible features
-+ *
-+ * Clear a given journal feature as present on the
-+ * superblock.  Returns true if the requested features could be reset.
-+ *
-+ */
-+int journal_clear_features (journal_t *journal, unsigned long compat,
-+			  unsigned long ro, unsigned long incompat)
-+{
-+	journal_superblock_t *sb;
-+
-+	jbd_debug(1, "Clear features 0x%lx/0x%lx/0x%lx\n",
-+		  compat, ro, incompat);
-+
-+	sb = journal->j_superblock;
-+
-+	sb->s_feature_compat    &= ~cpu_to_be32(compat);
-+	sb->s_feature_ro_compat &= ~cpu_to_be32(ro);
-+	sb->s_feature_incompat  &= ~cpu_to_be32(incompat);
-+
-+	return 1;
-+}
- 
- /**
-  * int journal_update_format () - Update on-disk journal structure.
-Index: linux-2.6.18.8/fs/Kconfig
-===================================================================
---- linux-2.6.18.8.orig/fs/Kconfig
-+++ linux-2.6.18.8/fs/Kconfig
-@@ -140,6 +140,7 @@ config EXT3_FS_SECURITY
- 
- config JBD
- 	tristate
-+	select CRC32
- 	help
- 	  This is a generic journaling layer for block devices.  It is
- 	  currently used by the ext3 and OCFS2 file systems, but it could
-Index: linux-2.6.18.8/Documentation/filesystems/ext3.txt
-===================================================================
---- linux-2.6.18.8.orig/Documentation/filesystems/ext3.txt
-+++ linux-2.6.18.8/Documentation/filesystems/ext3.txt
-@@ -14,6 +14,16 @@ Options
- When mounting an ext3 filesystem, the following option are accepted:
- (*) == default
- 
-+journal_checksum	Enable checksumming of the journal transactions.
-+			This will allow the recovery code in e2fsck and the
-+			kernel to detect corruption in the kernel.  It is a
-+			compatible change and will be ignored by older kernels.
-+
-+journal_async_commit	Commit block can be written to disk without waiting
-+			for descriptor blocks. If enabled older kernels cannot
-+			mount the device. This will enable 'journal_checksum'
-+			internally.
-+
- journal=update		Update the ext3 file system's journal to the current
- 			format.
- 
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
deleted file mode 100644
index e7c178dae8265c07b3178ba9b6b990a6c646fd2d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-stats-2.6-rhel5.patch
+++ /dev/null
@@ -1,744 +0,0 @@
-Index: linux-2.6.18-8.1.8/include/linux/jbd.h
-===================================================================
---- linux-2.6.18-8.1.8.orig/include/linux/jbd.h	2007-08-28 22:22:10.000000000 +0200
-+++ linux-2.6.18-8.1.8/include/linux/jbd.h	2007-08-28 22:22:29.000000000 +0200
-@@ -455,6 +455,16 @@ struct handle_s 
- };
- 
- 
-+/*
-+ * Some stats for checkpoint phase
-+ */
-+struct transaction_chp_stats_s {
-+	unsigned long		cs_chp_time;
-+	unsigned long		cs_forced_to_close;
-+	unsigned long		cs_written;
-+	unsigned long		cs_dropped;
-+};
-+
- /* The transaction_t type is the guts of the journaling mechanism.  It
-  * tracks a compound transaction through its various states:
-  *
-@@ -592,6 +602,21 @@ struct transaction_s 
- 	spinlock_t		t_handle_lock;
- 
- 	/*
-+	 * Longest time some handle had to wait for running transaction
-+	 */
-+	unsigned long		t_max_wait;
-+
-+	/*
-+	 * When transaction started
-+	 */
-+	unsigned long		t_start;
-+
-+	/*
-+	 * Checkpointing stats [j_checkpoint_sem]
-+	 */
-+	struct transaction_chp_stats_s t_chp_stats;
-+
-+	/*
- 	 * Number of outstanding updates running on this transaction
- 	 * [t_handle_lock]
- 	 */
-@@ -631,6 +656,57 @@ struct transaction_s 
- 	struct list_head	t_jcb;
- };
- 
-+struct transaction_run_stats_s {
-+	unsigned long		rs_wait;
-+	unsigned long		rs_running;
-+	unsigned long		rs_locked;
-+	unsigned long		rs_flushing;
-+	unsigned long		rs_logging;
-+
-+	unsigned long		rs_handle_count;
-+	unsigned long		rs_blocks;
-+	unsigned long		rs_blocks_logged;
-+};
-+
-+struct transaction_stats_s
-+{
-+	int 			ts_type;
-+	unsigned long		ts_tid;
-+	union {
-+		struct transaction_run_stats_s run;
-+		struct transaction_chp_stats_s chp;
-+	} u;
-+};
-+
-+#define JBD_STATS_RUN		1
-+#define JBD_STATS_CHECKPOINT	2
-+
-+#define ts_wait			u.run.rs_wait
-+#define ts_running		u.run.rs_running
-+#define ts_locked		u.run.rs_locked
-+#define ts_flushing		u.run.rs_flushing
-+#define ts_logging		u.run.rs_logging
-+#define ts_handle_count		u.run.rs_handle_count
-+#define ts_blocks		u.run.rs_blocks
-+#define ts_blocks_logged	u.run.rs_blocks_logged
-+
-+#define ts_chp_time		u.chp.cs_chp_time
-+#define ts_forced_to_close	u.chp.cs_forced_to_close
-+#define ts_written		u.chp.cs_written
-+#define ts_dropped		u.chp.cs_dropped
-+
-+#define CURRENT_MSECS		(jiffies_to_msecs(jiffies))
-+
-+static inline unsigned int
-+jbd_time_diff(unsigned int start, unsigned int end)
-+{
-+	if (unlikely(start > end))
-+		end = end + (~0UL - start);
-+	else
-+		end -= start;
-+	return end;
-+}
-+
- /**
-  * struct journal_s - The journal_s type is the concrete type associated with
-  *     journal_t.
-@@ -884,6 +960,16 @@ struct journal_s
- 	pid_t			j_last_sync_writer;
- 
- 	/*
-+	 *
-+	 */
-+	struct transaction_stats_s *j_history;
-+	int			j_history_max;
-+	int			j_history_cur;
-+	spinlock_t		j_history_lock;
-+	struct proc_dir_entry	*j_proc_entry;
-+	struct transaction_stats_s j_stats;
-+
-+	/*
- 	 * An opaque pointer to fs-private information.  ext3 puts its
- 	 * superblock pointer here
- 	 */
-Index: linux-2.6.18-8.1.8/fs/jbd/transaction.c
-===================================================================
---- linux-2.6.18-8.1.8.orig/fs/jbd/transaction.c	2007-08-28 22:22:10.000000000 +0200
-+++ linux-2.6.18-8.1.8/fs/jbd/transaction.c	2007-08-28 22:22:29.000000000 +0200
-@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran
- 
- 	J_ASSERT(journal->j_running_transaction == NULL);
- 	journal->j_running_transaction = transaction;
-+	transaction->t_max_wait = 0;
-+	transaction->t_start = CURRENT_MSECS;
- 
- 	return transaction;
- }
-@@ -86,6 +88,7 @@ static int start_this_handle(journal_t *
- 	int nblocks = handle->h_buffer_credits;
- 	transaction_t *new_transaction = NULL;
- 	int ret = 0;
-+	unsigned long ts = CURRENT_MSECS;
- 
- 	if (nblocks > journal->j_max_transaction_buffers) {
- 		printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n",
-@@ -219,6 +222,12 @@ repeat_locked:
- 	/* OK, account for the buffers that this operation expects to
- 	 * use and add the handle to the running transaction. */
- 
-+	if (time_after(transaction->t_start, ts)) {
-+		ts = jbd_time_diff(ts, transaction->t_start);
-+		if (ts > transaction->t_max_wait)
-+			transaction->t_max_wait= ts;
-+	}
-+
- 	handle->h_transaction = transaction;
- 	transaction->t_outstanding_credits += nblocks;
- 	transaction->t_updates++;
-Index: linux-2.6.18-8.1.8/fs/jbd/journal.c
-===================================================================
---- linux-2.6.18-8.1.8.orig/fs/jbd/journal.c	2007-08-28 22:22:10.000000000 +0200
-+++ linux-2.6.18-8.1.8/fs/jbd/journal.c	2007-08-28 22:22:29.000000000 +0200
-@@ -36,6 +36,7 @@
- #include <linux/kthread.h>
- #include <linux/poison.h>
- #include <linux/proc_fs.h>
-+#include <linux/seq_file.h>
- 
- #include <asm/uaccess.h>
- #include <asm/page.h>
-@@ -639,6 +640,300 @@ struct journal_head *journal_get_descrip
- 	return journal_add_journal_head(bh);
- }
- 
-+struct jbd_stats_proc_session {
-+	journal_t *journal;
-+	struct transaction_stats_s *stats;
-+	int start;
-+	int max;
-+};
-+
-+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s,
-+					struct transaction_stats_s *ts,
-+					int first)
-+{
-+	if (ts == s->stats + s->max)
-+		ts = s->stats;
-+	if (!first && ts == s->stats + s->start)
-+		return NULL;
-+	while (ts->ts_type == 0) {
-+		ts++;
-+		if (ts == s->stats + s->max)
-+			ts = s->stats;
-+		if (ts == s->stats + s->start)
-+			return NULL;
-+	}
-+	return ts;
-+
-+}
-+
-+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	ts = jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	if (!ts)
-+		return NULL;
-+	while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL);
-+	return ts;
-+}
-+
-+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	else
-+		return jbd_history_skip_empty(s, ++ts, 0);
-+}
-+
-+static int jbd_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct transaction_stats_s *ts = v;
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s "
-+				"%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid",
-+				"wait", "run", "lock", "flush", "log", "hndls",
-+				"block", "inlog", "ctime", "write", "drop",
-+				"close");
-+		return 0;
-+	}
-+	if (ts->ts_type == JBD_STATS_RUN)
-+		seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu "
-+				"%-6lu %-5lu %-5lu\n", "R", ts->ts_tid,
-+				ts->ts_wait, ts->ts_running, ts->ts_locked,
-+				ts->ts_flushing, ts->ts_logging,
-+				ts->ts_handle_count, ts->ts_blocks,
-+				ts->ts_blocks_logged);
-+	else if (ts->ts_type == JBD_STATS_CHECKPOINT)
-+		seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n",
-+				"C", ts->ts_tid, " ", ts->ts_chp_time,
-+				ts->ts_written, ts->ts_dropped,
-+				ts->ts_forced_to_close);
-+	else
-+		J_ASSERT(0);
-+	return 0;
-+}
-+
-+static void jbd_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_history_ops = {
-+	.start  = jbd_seq_history_start,
-+	.next   = jbd_seq_history_next,
-+	.stop   = jbd_seq_history_stop,
-+	.show   = jbd_seq_history_show,
-+};
-+
-+static int jbd_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, journal->j_history, size);
-+	s->max = journal->j_history_max;
-+	s->start = journal->j_history_cur % s->max;
-+	spin_unlock(&journal->j_history_lock);
-+
-+	rc = seq_open(file, &jbd_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int jbd_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_history_open,
-+	.read           = seq_read,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_history_release,
-+};
-+
-+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos)
-+{
-+	return *pos ? NULL : SEQ_START_TOKEN;
-+}
-+
-+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	return NULL;
-+}
-+
-+static int jbd_seq_info_show(struct seq_file *seq, void *v)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	if (v != SEQ_START_TOKEN)
-+		return 0;
-+	seq_printf(seq, "%lu transaction, each upto %u blocks\n",
-+			s->stats->ts_tid,
-+			s->journal->j_max_transaction_buffers);
-+	if (s->stats->ts_tid == 0)
-+		return 0;
-+	seq_printf(seq, "average: \n  %lums waiting for transaction\n",
-+			s->stats->ts_wait / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums running transaction\n",
-+			s->stats->ts_running / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums transaction was being locked\n",
-+			s->stats->ts_locked / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums flushing data (in ordered mode)\n",
-+			s->stats->ts_flushing / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums logging transaction\n",
-+			s->stats->ts_logging / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu handles per transaction\n",
-+			s->stats->ts_handle_count / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu blocks per transaction\n",
-+			s->stats->ts_blocks / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu logged blocks per transaction\n",
-+			s->stats->ts_blocks_logged / s->stats->ts_tid);
-+	return 0;
-+}
-+
-+static void jbd_seq_info_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_info_ops = {
-+	.start  = jbd_seq_info_start,
-+	.next   = jbd_seq_info_next,
-+	.stop   = jbd_seq_info_stop,
-+	.show   = jbd_seq_info_show,
-+};
-+
-+static int jbd_seq_info_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s);
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, &journal->j_stats, size);
-+	s->journal = journal;
-+	spin_unlock(&journal->j_history_lock);
-+
-+	rc = seq_open(file, &jbd_seq_info_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int jbd_seq_info_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_info_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_info_open,
-+	.read           = seq_read,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_info_release,
-+};
-+
-+static struct proc_dir_entry *proc_jbd_stats = NULL;
-+
-+static void jbd_stats_proc_init(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats);
-+	if (journal->j_proc_entry) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("history", S_IRUGO,
-+				journal->j_proc_entry);
-+		if (p) {
-+			p->proc_fops = &jbd_seq_history_fops;
-+			p->data = journal;
-+			p = create_proc_entry("info", S_IRUGO,
-+						journal->j_proc_entry);
-+			if (p) {
-+				p->proc_fops = &jbd_seq_info_fops;
-+				p->data = journal;
-+			}
-+		}
-+	}
-+}
-+
-+static void jbd_stats_proc_exit(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	remove_proc_entry("info", journal->j_proc_entry);
-+	remove_proc_entry("history", journal->j_proc_entry);
-+	remove_proc_entry(name, proc_jbd_stats);
-+}
-+
-+static void journal_init_stats(journal_t *journal)
-+{
-+	int size;
-+
-+	if (proc_jbd_stats == NULL)
-+		return;
-+
-+	journal->j_history_max = 100;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	journal->j_history = kmalloc(size, GFP_KERNEL);
-+	if (journal->j_history == NULL) {
-+		journal->j_history_max = 0;
-+		return;
-+	}
-+	memset(journal->j_history, 0, size);
-+	spin_lock_init(&journal->j_history_lock);
-+}
-+
- /*
-  * Management for journal control blocks: functions to create and
-  * destroy journal_t structures, and to initialise and read existing
-@@ -681,6 +976,9 @@ static journal_t * journal_init_common (
- 		kfree(journal);
- 		goto fail;
- 	}
-+
-+	journal_init_stats(journal);
-+
- 	return journal;
- fail:
- 	return NULL;
-@@ -724,6 +1022,7 @@ journal_t * journal_init_dev(struct bloc
- 	journal->j_blk_offset = start;
- 	journal->j_maxlen = len;
- 	journal->j_blocksize = blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
- 	J_ASSERT(bh != NULL);
-@@ -773,6 +1072,7 @@ journal_t * journal_init_inode (struct i
- 
- 	journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits;
- 	journal->j_blocksize = inode->i_sb->s_blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	/* journal descriptor can store up to n blocks -bzzz */
- 	n = journal->j_blocksize / sizeof(journal_block_tag_t);
-@@ -1161,6 +1461,8 @@ void journal_destroy(journal_t *journal)
- 		brelse(journal->j_sb_buffer);
- 	}
- 
-+	if (journal->j_proc_entry)
-+		jbd_stats_proc_exit(journal);
- 	if (journal->j_inode)
- 		iput(journal->j_inode);
- 	if (journal->j_revoke)
-@@ -2027,6 +2329,28 @@ static void __exit remove_jbd_proc_entry
- 
- #endif
- 
-+#if defined(CONFIG_PROC_FS)
-+
-+#define JBD_STATS_PROC_NAME "fs/jbd"
-+
-+static void __init create_jbd_stats_proc_entry(void)
-+{
-+	proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+static void __exit remove_jbd_stats_proc_entry(void)
-+{
-+	if (proc_jbd_stats)
-+		remove_proc_entry(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+#else
-+
-+#define create_jbd_stats_proc_entry() do {} while (0)
-+#define remove_jbd_stats_proc_entry() do {} while (0)
-+
-+#endif
-+
- kmem_cache_t *jbd_handle_cache;
- 
- static int __init journal_init_handle_cache(void)
-@@ -2090,6 +2414,7 @@ static int __init journal_init(void)
- 	if (ret != 0)
- 		journal_destroy_caches();
- 	create_jbd_proc_entry();
-+	create_jbd_stats_proc_entry();
- 	return ret;
- }
- 
-@@ -2101,6 +2426,7 @@ static void __exit journal_exit(void)
- 		printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n);
- #endif
- 	remove_jbd_proc_entry();
-+	remove_jbd_stats_proc_entry();
- 	journal_destroy_caches();
- }
- 
-Index: linux-2.6.18-8.1.8/fs/jbd/checkpoint.c
-===================================================================
---- linux-2.6.18-8.1.8.orig/fs/jbd/checkpoint.c	2007-08-28 22:22:10.000000000 +0200
-+++ linux-2.6.18-8.1.8/fs/jbd/checkpoint.c	2007-08-28 22:23:23.000000000 +0200
-@@ -231,7 +231,7 @@ __flush_batch(journal_t *journal, struct
-  * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it
-  */
- static int __process_buffer(journal_t *journal, struct journal_head *jh,
--			struct buffer_head **bhs, int *batch_count)
-+			struct buffer_head **bhs, int *batch_count, transaction_t *transaction)
- {
- 	struct buffer_head *bh = jh2bh(jh);
- 	int ret = 0;
-@@ -249,6 +249,7 @@ static int __process_buffer(journal_t *j
- 		transaction_t *t = jh->b_transaction;
- 		tid_t tid = t->t_tid;
- 
-+		transaction->t_chp_stats.cs_forced_to_close++;
- 		spin_unlock(&journal->j_list_lock);
- 		jbd_unlock_bh_state(bh);
- 		log_start_commit(journal, tid);
-@@ -278,6 +279,7 @@ static int __process_buffer(journal_t *j
- 		bhs[*batch_count] = bh;
- 		__buffer_relink_io(jh);
- 		jbd_unlock_bh_state(bh);
-+		transaction->t_chp_stats.cs_written++;
- 		(*batch_count)++;
- 		if (*batch_count == NR_BATCH) {
- 			spin_unlock(&journal->j_list_lock);
-@@ -321,6 +323,8 @@ int log_do_checkpoint(journal_t *journal
- 	if (!journal->j_checkpoint_transactions)
- 		goto out;
- 	transaction = journal->j_checkpoint_transactions;
-+	if (transaction->t_chp_stats.cs_chp_time == 0)
-+		transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS;
- 	this_tid = transaction->t_tid;
- restart:
- 	/*
-@@ -345,7 +349,8 @@ restart:
- 				retry = 1;
- 				break;
- 			}
--			retry = __process_buffer(journal, jh, bhs,&batch_count);
-+			retry = __process_buffer(journal, jh, bhs,&batch_count,
-+						 transaction);
- 			if (!retry && lock_need_resched(&journal->j_list_lock)){
- 				spin_unlock(&journal->j_list_lock);
- 				retry = 1;
-@@ -667,6 +672,8 @@ void __journal_insert_checkpoint(struct 
- 
- void __journal_drop_transaction(journal_t *journal, transaction_t *transaction)
- {
-+	struct transaction_stats_s stats;
-+
- 	assert_spin_locked(&journal->j_list_lock);
- 	if (transaction->t_cpnext) {
- 		transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
-@@ -693,5 +700,25 @@ void __journal_drop_transaction(journal_
- 	J_ASSERT(journal->j_running_transaction != transaction);
- 
- 	jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	if (transaction->t_chp_stats.cs_written != 0 ||
-+			transaction->t_chp_stats.cs_chp_time != 0) {
-+		stats.ts_type = JBD_STATS_CHECKPOINT;
-+		stats.ts_tid = transaction->t_tid;
-+		stats.u.chp = transaction->t_chp_stats;
-+		if (stats.ts_chp_time)
-+			stats.ts_chp_time =
-+				jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS);
-+		spin_lock(&journal->j_history_lock);
-+		memcpy(journal->j_history + journal->j_history_cur, &stats,
-+				sizeof(stats));
-+		if (++journal->j_history_cur == journal->j_history_max)
-+			journal->j_history_cur = 0;
-+		spin_unlock(&journal->j_history_lock);
-+	}
-+
- 	kfree(transaction);
- }
-Index: linux-2.6.18-8.1.8/fs/jbd/commit.c
-===================================================================
---- linux-2.6.18-8.1.8.orig/fs/jbd/commit.c	2007-08-28 22:22:10.000000000 +0200
-+++ linux-2.6.18-8.1.8/fs/jbd/commit.c	2007-08-28 22:22:29.000000000 +0200
-@@ -13,6 +13,7 @@
-  * part of the ext2fs journaling system.
-  */
- 
-+#include <linux/jiffies.h>
- #include <linux/time.h>
- #include <linux/fs.h>
- #include <linux/jbd.h>
-@@ -23,6 +24,7 @@
- #include <linux/smp_lock.h>
- #include <linux/crc32.h>
- 
-+
- /*
-  * Default IO end handler for temporary BJ_IO buffer_heads.
-  */
-@@ -355,6 +357,7 @@ write_out_data:
-  */
- void journal_commit_transaction(journal_t *journal)
- {
-+	struct transaction_stats_s stats;
- 	transaction_t *commit_transaction;
- 	struct journal_head *jh, *new_jh, *descriptor;
- 	struct buffer_head **wbuf = journal->j_wbuf;
-@@ -403,6 +406,11 @@ void journal_commit_transaction(journal_
- 	spin_lock(&journal->j_state_lock);
- 	commit_transaction->t_state = T_LOCKED;
- 
-+	stats.ts_wait = commit_transaction->t_max_wait;
-+	stats.ts_locked = CURRENT_MSECS;
-+	stats.ts_running = jbd_time_diff(commit_transaction->t_start,
-+						stats.ts_locked);
-+
- 	spin_lock(&commit_transaction->t_handle_lock);
- 	while (commit_transaction->t_updates) {
- 		DEFINE_WAIT(wait);
-@@ -473,6 +481,9 @@ void journal_commit_transaction(journal_
- 	 */
- 	journal_switch_revoke_table(journal);
- 
-+	stats.ts_flushing = CURRENT_MSECS;
-+	stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing);
-+
- 	commit_transaction->t_state = T_FLUSH;
- 	journal->j_committing_transaction = commit_transaction;
- 	journal->j_running_transaction = NULL;
-@@ -540,6 +551,11 @@ void journal_commit_transaction(journal_
- 	 */
- 	commit_transaction->t_state = T_COMMIT;
- 
-+	stats.ts_logging = CURRENT_MSECS;
-+	stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging);
-+	stats.ts_blocks = commit_transaction->t_outstanding_credits;
-+	stats.ts_blocks_logged = 0;
-+
- 	descriptor = NULL;
- 	bufs = 0;
- 	while (commit_transaction->t_buffers) {
-@@ -698,6 +714,7 @@ start_journal_io:
- 				submit_bh(WRITE, bh);
- 			}
- 			cond_resched();
-+			stats.ts_blocks_logged += bufs;
- 
- 			/* Force a new descriptor to be generated next
-                            time round the loop. */
-@@ -915,6 +932,7 @@ restart_loop:
- 		cp_transaction = jh->b_cp_transaction;
- 		if (cp_transaction) {
- 			JBUFFER_TRACE(jh, "remove from old cp transaction");
-+			cp_transaction->t_chp_stats.cs_dropped++;
- 			__journal_remove_checkpoint(jh);
- 		}
- 
-@@ -989,6 +1007,36 @@ restart_loop:
- 
- 	J_ASSERT(commit_transaction->t_state == T_COMMIT);
- 
-+	commit_transaction->t_start = CURRENT_MSECS;
-+	stats.ts_logging = jbd_time_diff(stats.ts_logging,
-+					 commit_transaction->t_start);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	stats.ts_type = JBD_STATS_RUN;
-+	stats.ts_tid = commit_transaction->t_tid;
-+	stats.ts_handle_count = commit_transaction->t_handle_count;
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(journal->j_history + journal->j_history_cur, &stats,
-+			sizeof(stats));
-+	if (++journal->j_history_cur == journal->j_history_max)
-+		journal->j_history_cur = 0;
-+
-+	/*
-+	 * Calculate overall stats
-+	 */
-+	journal->j_stats.ts_tid++;
-+	journal->j_stats.ts_wait += stats.ts_wait;
-+	journal->j_stats.ts_running += stats.ts_running;
-+	journal->j_stats.ts_locked += stats.ts_locked;
-+	journal->j_stats.ts_flushing += stats.ts_flushing;
-+	journal->j_stats.ts_logging += stats.ts_logging;
-+	journal->j_stats.ts_handle_count += stats.ts_handle_count;
-+	journal->j_stats.ts_blocks += stats.ts_blocks;
-+	journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged;
-+	spin_unlock(&journal->j_history_lock);
-+
- 	commit_transaction->t_state = T_FINISHED;
- 	J_ASSERT(commit_transaction == journal->j_committing_transaction);
- 	journal->j_commit_sequence = commit_transaction->t_tid;
-
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch b/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
deleted file mode 100644
index acd81f8c28568b5127441bfca05da23213e03995..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-stats-2.6-sles10.patch
+++ /dev/null
@@ -1,735 +0,0 @@
-Index: linux-2.6.16.46-0.14/include/linux/jbd.h
-===================================================================
---- linux-2.6.16.46-0.14.orig/include/linux/jbd.h
-+++ linux-2.6.16.46-0.14/include/linux/jbd.h
-@@ -422,6 +422,16 @@ struct handle_s 
- };
- 
- 
-+/*
-+ * Some stats for checkpoint phase
-+ */
-+struct transaction_chp_stats_s {
-+	unsigned long		cs_chp_time;
-+	unsigned long		cs_forced_to_close;
-+	unsigned long		cs_written;
-+	unsigned long		cs_dropped;
-+};
-+
- /* The transaction_t type is the guts of the journaling mechanism.  It
-  * tracks a compound transaction through its various states:
-  *
-@@ -553,6 +563,21 @@ struct transaction_s 
- 	spinlock_t		t_handle_lock;
- 
- 	/*
-+	 * Longest time some handle had to wait for running transaction
-+	 */
-+	unsigned long		t_max_wait;
-+
-+	/*
-+	 * When transaction started
-+	 */
-+	unsigned long		t_start;
-+
-+	/*
-+	 * Checkpointing stats [j_checkpoint_sem]
-+	 */
-+	struct transaction_chp_stats_s t_chp_stats;
-+
-+	/*
- 	 * Number of outstanding updates running on this transaction
- 	 * [t_handle_lock]
- 	 */
-@@ -592,6 +617,57 @@ struct transaction_s 
- 	struct list_head	t_jcb;
- };
- 
-+struct transaction_run_stats_s {
-+	unsigned long		rs_wait;
-+	unsigned long		rs_running;
-+	unsigned long		rs_locked;
-+	unsigned long		rs_flushing;
-+	unsigned long		rs_logging;
-+
-+	unsigned long		rs_handle_count;
-+	unsigned long		rs_blocks;
-+	unsigned long		rs_blocks_logged;
-+};
-+
-+struct transaction_stats_s
-+{
-+	int 			ts_type;
-+	unsigned long		ts_tid;
-+	union {
-+		struct transaction_run_stats_s run;
-+		struct transaction_chp_stats_s chp;
-+	} u;
-+};
-+
-+#define JBD_STATS_RUN		1
-+#define JBD_STATS_CHECKPOINT	2
-+
-+#define ts_wait			u.run.rs_wait
-+#define ts_running		u.run.rs_running
-+#define ts_locked		u.run.rs_locked
-+#define ts_flushing		u.run.rs_flushing
-+#define ts_logging		u.run.rs_logging
-+#define ts_handle_count		u.run.rs_handle_count
-+#define ts_blocks		u.run.rs_blocks
-+#define ts_blocks_logged	u.run.rs_blocks_logged
-+
-+#define ts_chp_time		u.chp.cs_chp_time
-+#define ts_forced_to_close	u.chp.cs_forced_to_close
-+#define ts_written		u.chp.cs_written
-+#define ts_dropped		u.chp.cs_dropped
-+
-+#define CURRENT_MSECS		(jiffies_to_msecs(jiffies))
-+
-+static inline unsigned int
-+jbd_time_diff(unsigned int start, unsigned int end)
-+{
-+	if (unlikely(start > end))
-+		end = end + (~0UL - start);
-+	else
-+		end -= start;
-+	return end;
-+}
-+
- /**
-  * struct journal_s - The journal_s type is the concrete type associated with
-  *     journal_t.
-@@ -845,6 +921,16 @@ struct journal_s
- 	pid_t			j_last_sync_writer;
- 
- 	/*
-+	 *
-+	 */
-+	struct transaction_stats_s *j_history;
-+	int			j_history_max;
-+	int			j_history_cur;
-+	spinlock_t		j_history_lock;
-+	struct proc_dir_entry	*j_proc_entry;
-+	struct transaction_stats_s j_stats;
-+
-+	/*
- 	 * An opaque pointer to fs-private information.  ext3 puts its
- 	 * superblock pointer here
- 	 */
-Index: linux-2.6.16.46-0.14/fs/jbd/transaction.c
-===================================================================
---- linux-2.6.16.46-0.14.orig/fs/jbd/transaction.c
-+++ linux-2.6.16.46-0.14/fs/jbd/transaction.c
-@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran
- 
- 	J_ASSERT(journal->j_running_transaction == NULL);
- 	journal->j_running_transaction = transaction;
-+	transaction->t_max_wait = 0;
-+	transaction->t_start = CURRENT_MSECS;
- 
- 	return transaction;
- }
-@@ -86,6 +88,7 @@ static int start_this_handle(journal_t *
- 	int nblocks = handle->h_buffer_credits;
- 	transaction_t *new_transaction = NULL;
- 	int ret = 0;
-+	unsigned long ts = CURRENT_MSECS;
- 
- 	if (nblocks > journal->j_max_transaction_buffers) {
- 		printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n",
-@@ -219,6 +222,12 @@ repeat_locked:
- 	/* OK, account for the buffers that this operation expects to
- 	 * use and add the handle to the running transaction. */
- 
-+	if (time_after(transaction->t_start, ts)) {
-+		ts = jbd_time_diff(ts, transaction->t_start);
-+		if (ts > transaction->t_max_wait)
-+			transaction->t_max_wait= ts;
-+	}
-+
- 	handle->h_transaction = transaction;
- 	transaction->t_outstanding_credits += nblocks;
- 	transaction->t_updates++;
-Index: linux-2.6.16.46-0.14/fs/jbd/journal.c
-===================================================================
---- linux-2.6.16.46-0.14.orig/fs/jbd/journal.c
-+++ linux-2.6.16.46-0.14/fs/jbd/journal.c
-@@ -36,6 +36,7 @@
- #include <asm/uaccess.h>
- #include <asm/page.h>
- #include <linux/proc_fs.h>
-+#include <linux/seq_file.h>
- 
- EXPORT_SYMBOL(journal_start);
- EXPORT_SYMBOL(journal_restart);
-@@ -637,6 +638,300 @@ struct journal_head *journal_get_descrip
- 	return journal_add_journal_head(bh);
- }
- 
-+struct jbd_stats_proc_session {
-+	journal_t *journal;
-+	struct transaction_stats_s *stats;
-+	int start;
-+	int max;
-+};
-+
-+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s,
-+					struct transaction_stats_s *ts,
-+					int first)
-+{
-+	if (ts == s->stats + s->max)
-+		ts = s->stats;
-+	if (!first && ts == s->stats + s->start)
-+		return NULL;
-+	while (ts->ts_type == 0) {
-+		ts++;
-+		if (ts == s->stats + s->max)
-+			ts = s->stats;
-+		if (ts == s->stats + s->start)
-+			return NULL;
-+	}
-+	return ts;
-+
-+}
-+
-+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	ts = jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	if (!ts)
-+		return NULL;
-+	while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL);
-+	return ts;
-+}
-+
-+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	else
-+		return jbd_history_skip_empty(s, ++ts, 0);
-+}
-+
-+static int jbd_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct transaction_stats_s *ts = v;
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s "
-+				"%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid",
-+				"wait", "run", "lock", "flush", "log", "hndls",
-+				"block", "inlog", "ctime", "write", "drop",
-+				"close");
-+		return 0;
-+	}
-+	if (ts->ts_type == JBD_STATS_RUN)
-+		seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu "
-+				"%-6lu %-5lu %-5lu\n", "R", ts->ts_tid,
-+				ts->ts_wait, ts->ts_running, ts->ts_locked,
-+				ts->ts_flushing, ts->ts_logging,
-+				ts->ts_handle_count, ts->ts_blocks,
-+				ts->ts_blocks_logged);
-+	else if (ts->ts_type == JBD_STATS_CHECKPOINT)
-+		seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n",
-+				"C", ts->ts_tid, " ", ts->ts_chp_time,
-+				ts->ts_written, ts->ts_dropped,
-+				ts->ts_forced_to_close);
-+	else
-+		J_ASSERT(0);
-+	return 0;
-+}
-+
-+static void jbd_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_history_ops = {
-+	.start  = jbd_seq_history_start,
-+	.next   = jbd_seq_history_next,
-+	.stop   = jbd_seq_history_stop,
-+	.show   = jbd_seq_history_show,
-+};
-+
-+static int jbd_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, journal->j_history, size);
-+	s->max = journal->j_history_max;
-+	s->start = journal->j_history_cur % s->max;
-+	spin_unlock(&journal->j_history_lock);
-+
-+	rc = seq_open(file, &jbd_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int jbd_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_history_open,
-+	.read           = seq_read,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_history_release,
-+};
-+
-+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos)
-+{
-+	return *pos ? NULL : SEQ_START_TOKEN;
-+}
-+
-+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	return NULL;
-+}
-+
-+static int jbd_seq_info_show(struct seq_file *seq, void *v)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	if (v != SEQ_START_TOKEN)
-+		return 0;
-+	seq_printf(seq, "%lu transaction, each upto %u blocks\n",
-+			s->stats->ts_tid,
-+			s->journal->j_max_transaction_buffers);
-+	if (s->stats->ts_tid == 0)
-+		return 0;
-+	seq_printf(seq, "average: \n  %lums waiting for transaction\n",
-+			s->stats->ts_wait / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums running transaction\n",
-+			s->stats->ts_running / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums transaction was being locked\n",
-+			s->stats->ts_locked / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums flushing data (in ordered mode)\n",
-+			s->stats->ts_flushing / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums logging transaction\n",
-+			s->stats->ts_logging / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu handles per transaction\n",
-+			s->stats->ts_handle_count / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu blocks per transaction\n",
-+			s->stats->ts_blocks / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu logged blocks per transaction\n",
-+			s->stats->ts_blocks_logged / s->stats->ts_tid);
-+	return 0;
-+}
-+
-+static void jbd_seq_info_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_info_ops = {
-+	.start  = jbd_seq_info_start,
-+	.next   = jbd_seq_info_next,
-+	.stop   = jbd_seq_info_stop,
-+	.show   = jbd_seq_info_show,
-+};
-+
-+static int jbd_seq_info_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s);
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, &journal->j_stats, size);
-+	s->journal = journal;
-+	spin_unlock(&journal->j_history_lock);
-+
-+	rc = seq_open(file, &jbd_seq_info_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int jbd_seq_info_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_info_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_info_open,
-+	.read           = seq_read,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_info_release,
-+};
-+
-+static struct proc_dir_entry *proc_jbd_stats = NULL;
-+
-+static void jbd_stats_proc_init(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats);
-+	if (journal->j_proc_entry) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("history", S_IRUGO,
-+				journal->j_proc_entry);
-+		if (p) {
-+			p->proc_fops = &jbd_seq_history_fops;
-+			p->data = journal;
-+			p = create_proc_entry("info", S_IRUGO,
-+						journal->j_proc_entry);
-+			if (p) {
-+				p->proc_fops = &jbd_seq_info_fops;
-+				p->data = journal;
-+			}
-+		}
-+	}
-+}
-+
-+static void jbd_stats_proc_exit(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	remove_proc_entry("info", journal->j_proc_entry);
-+	remove_proc_entry("history", journal->j_proc_entry);
-+	remove_proc_entry(name, proc_jbd_stats);
-+}
-+
-+static void journal_init_stats(journal_t *journal)
-+{
-+	int size;
-+
-+	if (proc_jbd_stats == NULL)
-+		return;
-+
-+	journal->j_history_max = 100;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	journal->j_history = kmalloc(size, GFP_KERNEL);
-+	if (journal->j_history == NULL) {
-+		journal->j_history_max = 0;
-+		return;
-+	}
-+	memset(journal->j_history, 0, size);
-+	spin_lock_init(&journal->j_history_lock);
-+}
-+
- /*
-  * Management for journal control blocks: functions to create and
-  * destroy journal_t structures, and to initialise and read existing
-@@ -679,6 +974,9 @@ static journal_t * journal_init_common (
- 		kfree(journal);
- 		goto fail;
- 	}
-+
-+	journal_init_stats(journal);
-+
- 	return journal;
- fail:
- 	return NULL;
-@@ -722,6 +1020,7 @@ journal_t * journal_init_dev(struct bloc
- 	journal->j_blk_offset = start;
- 	journal->j_maxlen = len;
- 	journal->j_blocksize = blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
- 	J_ASSERT(bh != NULL);
-@@ -771,6 +1070,7 @@ journal_t * journal_init_inode (struct i
- 
- 	journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits;
- 	journal->j_blocksize = inode->i_sb->s_blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	/* journal descriptor can store up to n blocks -bzzz */
- 	n = journal->j_blocksize / sizeof(journal_block_tag_t);
-@@ -1152,6 +1452,8 @@ void journal_destroy(journal_t *journal)
- 		brelse(journal->j_sb_buffer);
- 	}
- 
-+	if (journal->j_proc_entry)
-+		jbd_stats_proc_exit(journal);
- 	if (journal->j_inode)
- 		iput(journal->j_inode);
- 	if (journal->j_revoke)
-@@ -1920,6 +2222,28 @@ static void __exit remove_jbd_proc_entry
- 
- #endif
- 
-+#if defined(CONFIG_PROC_FS)
-+
-+#define JBD_STATS_PROC_NAME "fs/jbd"
-+
-+static void __init create_jbd_stats_proc_entry(void)
-+{
-+	proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+static void __exit remove_jbd_stats_proc_entry(void)
-+{
-+	if (proc_jbd_stats)
-+		remove_proc_entry(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+#else
-+
-+#define create_jbd_stats_proc_entry() do {} while (0)
-+#define remove_jbd_stats_proc_entry() do {} while (0)
-+
-+#endif
-+
- kmem_cache_t *jbd_handle_cache;
- 
- static int __init journal_init_handle_cache(void)
-@@ -1982,6 +2306,7 @@ static int __init journal_init(void)
- 	if (ret != 0)
- 		journal_destroy_caches();
- 	create_jbd_proc_entry();
-+	create_jbd_stats_proc_entry();
- 	return ret;
- }
- 
-@@ -1993,6 +2318,7 @@ static void __exit journal_exit(void)
- 		printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n);
- #endif
- 	remove_jbd_proc_entry();
-+	remove_jbd_stats_proc_entry();
- 	journal_destroy_caches();
- }
- 
-Index: linux-2.6.16.46-0.14/fs/jbd/checkpoint.c
-===================================================================
---- linux-2.6.16.46-0.14.orig/fs/jbd/checkpoint.c
-+++ linux-2.6.16.46-0.14/fs/jbd/checkpoint.c
-@@ -166,6 +166,7 @@ static int __cleanup_transaction(journal
- 			transaction_t *t = jh->b_transaction;
- 			tid_t tid = t->t_tid;
- 
-+			transaction->t_chp_stats.cs_forced_to_close++;
- 			spin_unlock(&journal->j_list_lock);
- 			jbd_unlock_bh_state(bh);
- 			log_start_commit(journal, tid);
-@@ -226,7 +227,7 @@ __flush_batch(journal_t *journal, struct
-  */
- static int __flush_buffer(journal_t *journal, struct journal_head *jh,
- 			struct buffer_head **bhs, int *batch_count,
--			int *drop_count)
-+			int *drop_count, transaction_t *transaction)
- {
- 	struct buffer_head *bh = jh2bh(jh);
- 	int ret = 0;
-@@ -247,6 +248,7 @@ static int __flush_buffer(journal_t *jou
- 		set_buffer_jwrite(bh);
- 		bhs[*batch_count] = bh;
- 		jbd_unlock_bh_state(bh);
-+		transaction->t_chp_stats.cs_written++;
- 		(*batch_count)++;
- 		if (*batch_count == NR_BATCH) {
- 			__flush_batch(journal, bhs, batch_count);
-@@ -315,6 +317,8 @@ int log_do_checkpoint(journal_t *journal
- 		tid_t this_tid;
- 
- 		transaction = journal->j_checkpoint_transactions;
-+		if (transaction->t_chp_stats.cs_chp_time == 0)
-+			transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS;
- 		this_tid = transaction->t_tid;
- 		jh = transaction->t_checkpoint_list;
- 		last_jh = jh->b_cpprev;
-@@ -331,7 +335,8 @@ int log_do_checkpoint(journal_t *journal
- 				retry = 1;
- 				break;
- 			}
--			retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count);
-+			retry = __flush_buffer(journal, jh, bhs, &batch_count,
-+						&drop_count, transaction);
- 			if (cond_resched_lock(&journal->j_list_lock)) {
- 				retry = 1;
- 				break;
-@@ -609,6 +614,8 @@ void __journal_insert_checkpoint(struct 
- 
- void __journal_drop_transaction(journal_t *journal, transaction_t *transaction)
- {
-+	struct transaction_stats_s stats;
-+
- 	assert_spin_locked(&journal->j_list_lock);
- 	if (transaction->t_cpnext) {
- 		transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
-@@ -634,5 +641,25 @@ void __journal_drop_transaction(journal_
- 	J_ASSERT(journal->j_running_transaction != transaction);
- 
- 	jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	if (transaction->t_chp_stats.cs_written != 0 ||
-+			transaction->t_chp_stats.cs_chp_time != 0) {
-+		stats.ts_type = JBD_STATS_CHECKPOINT;
-+		stats.ts_tid = transaction->t_tid;
-+		stats.u.chp = transaction->t_chp_stats;
-+		if (stats.ts_chp_time)
-+			stats.ts_chp_time =
-+				jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS);
-+		spin_lock(&journal->j_history_lock);
-+		memcpy(journal->j_history + journal->j_history_cur, &stats,
-+				sizeof(stats));
-+		if (++journal->j_history_cur == journal->j_history_max)
-+			journal->j_history_cur = 0;
-+		spin_unlock(&journal->j_history_lock);
-+	}
-+
- 	kfree(transaction);
- }
-Index: linux-2.6.16.46-0.14/fs/jbd/commit.c
-===================================================================
---- linux-2.6.16.46-0.14.orig/fs/jbd/commit.c
-+++ linux-2.6.16.46-0.14/fs/jbd/commit.c
-@@ -21,6 +21,7 @@
- #include <linux/mm.h>
- #include <linux/pagemap.h>
- #include <linux/smp_lock.h>
-+#include <linux/jiffies.h>
- 
- /*
-  * Default IO end handler for temporary BJ_IO buffer_heads.
-@@ -168,6 +169,7 @@ static int journal_write_commit_record(j
-  */
- void journal_commit_transaction(journal_t *journal)
- {
-+	struct transaction_stats_s stats;
- 	transaction_t *commit_transaction;
- 	struct journal_head *jh, *new_jh, *descriptor;
- 	struct buffer_head **wbuf = journal->j_wbuf;
-@@ -214,6 +216,11 @@ void journal_commit_transaction(journal_
- 	spin_lock(&journal->j_state_lock);
- 	commit_transaction->t_state = T_LOCKED;
- 
-+	stats.ts_wait = commit_transaction->t_max_wait;
-+	stats.ts_locked = CURRENT_MSECS;
-+	stats.ts_running = jbd_time_diff(commit_transaction->t_start,
-+						stats.ts_locked);
-+
- 	spin_lock(&commit_transaction->t_handle_lock);
- 	while (commit_transaction->t_updates) {
- 		DEFINE_WAIT(wait);
-@@ -284,6 +291,9 @@ void journal_commit_transaction(journal_
- 	 */
- 	journal_switch_revoke_table(journal);
- 
-+	stats.ts_flushing = CURRENT_MSECS;
-+	stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing);
-+
- 	commit_transaction->t_state = T_FLUSH;
- 	journal->j_committing_transaction = commit_transaction;
- 	journal->j_running_transaction = NULL;
-@@ -442,6 +452,11 @@ write_out_data:
- 	 */
- 	commit_transaction->t_state = T_COMMIT;
- 
-+	stats.ts_logging = CURRENT_MSECS;
-+	stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging);
-+	stats.ts_blocks = commit_transaction->t_outstanding_credits;
-+	stats.ts_blocks_logged = 0;
-+
- 	descriptor = NULL;
- 	bufs = 0;
- 	while (commit_transaction->t_buffers) {
-@@ -590,6 +605,7 @@ start_journal_io:
- 				submit_bh(WRITE, bh);
- 			}
- 			cond_resched();
-+			stats.ts_blocks_logged += bufs;
- 
- 			/* Force a new descriptor to be generated next
-                            time round the loop. */
-@@ -784,6 +800,7 @@ restart_loop:
- 		cp_transaction = jh->b_cp_transaction;
- 		if (cp_transaction) {
- 			JBUFFER_TRACE(jh, "remove from old cp transaction");
-+			cp_transaction->t_chp_stats.cs_dropped++;
- 			__journal_remove_checkpoint(jh);
- 		}
- 
-@@ -858,6 +875,36 @@ restart_loop:
- 
- 	J_ASSERT(commit_transaction->t_state == T_COMMIT);
- 
-+	commit_transaction->t_start = CURRENT_MSECS;
-+	stats.ts_logging = jbd_time_diff(stats.ts_logging,
-+					 commit_transaction->t_start);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	stats.ts_type = JBD_STATS_RUN;
-+	stats.ts_tid = commit_transaction->t_tid;
-+	stats.ts_handle_count = commit_transaction->t_handle_count;
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(journal->j_history + journal->j_history_cur, &stats,
-+			sizeof(stats));
-+	if (++journal->j_history_cur == journal->j_history_max)
-+		journal->j_history_cur = 0;
-+
-+	/*
-+	 * Calculate overall stats
-+	 */
-+	journal->j_stats.ts_tid++;
-+	journal->j_stats.ts_wait += stats.ts_wait;
-+	journal->j_stats.ts_running += stats.ts_running;
-+	journal->j_stats.ts_locked += stats.ts_locked;
-+	journal->j_stats.ts_flushing += stats.ts_flushing;
-+	journal->j_stats.ts_logging += stats.ts_logging;
-+	journal->j_stats.ts_handle_count += stats.ts_handle_count;
-+	journal->j_stats.ts_blocks += stats.ts_blocks;
-+	journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged;
-+	spin_unlock(&journal->j_history_lock);
-+
- 	commit_transaction->t_state = T_FINISHED;
- 	J_ASSERT(commit_transaction == journal->j_committing_transaction);
- 	journal->j_commit_sequence = commit_transaction->t_tid;
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
deleted file mode 100644
index 4873794e12f47665acd2458d72b2c7f51f4401b3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.5.patch
+++ /dev/null
@@ -1,772 +0,0 @@
-Index: linux-2.6.5-7.201/include/linux/jbd.h
-===================================================================
---- linux-2.6.5-7.201.orig/include/linux/jbd.h	2005-10-11 00:12:48.000000000 +0400
-+++ linux-2.6.5-7.201/include/linux/jbd.h	2006-07-28 02:40:14.000000000 +0400
-@@ -411,6 +411,16 @@ struct handle_s 
- };
- 
- 
-+/*
-+ * Some stats for checkpoint phase
-+ */
-+struct transaction_chp_stats_s {
-+	unsigned long		cs_chp_time;
-+	unsigned long		cs_forced_to_close;
-+	unsigned long		cs_written;
-+	unsigned long		cs_dropped;
-+};
-+
- /* The transaction_t type is the guts of the journaling mechanism.  It
-  * tracks a compound transaction through its various states:
-  *
-@@ -542,6 +552,21 @@ struct transaction_s 
- 	spinlock_t		t_handle_lock;
- 
- 	/*
-+	 * Longest time some handle had to wait for running transaction
-+	 */
-+	unsigned long		t_max_wait;
-+
-+	/*
-+	 * When transaction started
-+	 */
-+	unsigned long		t_start;
-+
-+	/*
-+	 * Checkpointing stats [j_checkpoint_sem]
-+	 */
-+	struct transaction_chp_stats_s t_chp_stats;
-+
-+	/*
- 	 * Number of outstanding updates running on this transaction
- 	 * [t_handle_lock]
- 	 */
-@@ -581,6 +606,57 @@ struct transaction_s 
- 	struct list_head	t_jcb;
- };
- 
-+struct transaction_run_stats_s {
-+	unsigned long		rs_wait;
-+	unsigned long		rs_running;
-+	unsigned long		rs_locked;
-+	unsigned long		rs_flushing;
-+	unsigned long		rs_logging;
-+
-+	unsigned long		rs_handle_count;
-+	unsigned long		rs_blocks;
-+	unsigned long		rs_blocks_logged;
-+};
-+
-+struct transaction_stats_s
-+{
-+	int 			ts_type;
-+	unsigned long		ts_tid;
-+	union {
-+		struct transaction_run_stats_s run;
-+		struct transaction_chp_stats_s chp;
-+	} u;
-+};
-+
-+#define JBD_STATS_RUN		1
-+#define JBD_STATS_CHECKPOINT	2
-+
-+#define ts_wait			u.run.rs_wait
-+#define ts_running		u.run.rs_running
-+#define ts_locked		u.run.rs_locked
-+#define ts_flushing		u.run.rs_flushing
-+#define ts_logging		u.run.rs_logging
-+#define ts_handle_count		u.run.rs_handle_count
-+#define ts_blocks		u.run.rs_blocks
-+#define ts_blocks_logged	u.run.rs_blocks_logged
-+
-+#define ts_chp_time		u.chp.cs_chp_time
-+#define ts_forced_to_close	u.chp.cs_forced_to_close
-+#define ts_written		u.chp.cs_written
-+#define ts_dropped		u.chp.cs_dropped
-+
-+#define CURRENT_MSECS		(jiffies_to_msecs(jiffies))
-+
-+static inline unsigned int
-+jbd_time_diff(unsigned int start, unsigned int end)
-+{
-+	if (unlikely(start > end))
-+		end = end + (~0UL - start);
-+	else
-+		end -= start;
-+	return end;
-+}
-+
- /**
-  * struct journal_s - The journal_s type is the concrete type associated with
-  *     journal_t.
-@@ -817,6 +893,16 @@ struct journal_s
- 	struct jbd_revoke_table_s *j_revoke_table[2];
- 
- 	/*
-+	 *
-+	 */
-+	struct transaction_stats_s *j_history;
-+	int			j_history_max;
-+	int			j_history_cur;
-+	spinlock_t		j_history_lock;
-+	struct proc_dir_entry	*j_proc_entry;
-+	struct transaction_stats_s j_stats;
-+	
-+	/*
- 	 * An opaque pointer to fs-private information.  ext3 puts its
- 	 * superblock pointer here
- 	 */
-Index: linux-2.6.5-7.201/fs/jbd/commit.c
-===================================================================
---- linux-2.6.5-7.201.orig/fs/jbd/commit.c	2005-10-11 00:12:45.000000000 +0400
-+++ linux-2.6.5-7.201/fs/jbd/commit.c	2006-07-28 02:40:14.000000000 +0400
-@@ -21,6 +21,7 @@
- #include <linux/mm.h>
- #include <linux/pagemap.h>
- #include <linux/smp_lock.h>
-+#include <linux/jiffies.h>
- 
- /*
-  * Default IO end handler for temporary BJ_IO buffer_heads.
-@@ -101,6 +102,7 @@ static int inverted_lock(journal_t *jour
-  */
- void journal_commit_transaction(journal_t *journal)
- {
-+	struct transaction_stats_s stats;
- 	transaction_t *commit_transaction;
- 	struct journal_head *jh, *new_jh, *descriptor;
- 	struct buffer_head *wbuf[64];
-@@ -147,6 +149,11 @@ void journal_commit_transaction(journal_
- 	spin_lock(&journal->j_state_lock);
- 	commit_transaction->t_state = T_LOCKED;
- 
-+	stats.ts_wait = commit_transaction->t_max_wait;
-+	stats.ts_locked = CURRENT_MSECS;
-+	stats.ts_running = jbd_time_diff(commit_transaction->t_start,
-+						stats.ts_locked);
-+	
- 	spin_lock(&commit_transaction->t_handle_lock);
- 	while (commit_transaction->t_updates) {
- 		DEFINE_WAIT(wait);
-@@ -219,6 +226,9 @@ void journal_commit_transaction(journal_
- 	 */
- 	journal_switch_revoke_table(journal);
- 
-+	stats.ts_flushing = CURRENT_MSECS;
-+	stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing);
-+
- 	commit_transaction->t_state = T_FLUSH;
- 	journal->j_committing_transaction = commit_transaction;
- 	journal->j_running_transaction = NULL;
-@@ -366,6 +376,11 @@ write_out_data:
- 	 */
- 	commit_transaction->t_state = T_COMMIT;
- 
-+	stats.ts_logging = CURRENT_MSECS;
-+	stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging);
-+	stats.ts_blocks = commit_transaction->t_outstanding_credits;
-+	stats.ts_blocks_logged = 0;
-+
- 	descriptor = 0;
- 	bufs = 0;
- 	while (commit_transaction->t_buffers) {
-@@ -514,6 +529,7 @@ start_journal_io:
- 				submit_bh(WRITE, bh);
- 			}
- 			cond_resched();
-+			stats.ts_blocks_logged += bufs;
- 
- 			/* Force a new descriptor to be generated next
-                            time round the loop. */
-@@ -759,6 +775,7 @@ skip_commit: /* The journal should be un
- 		cp_transaction = jh->b_cp_transaction;
- 		if (cp_transaction) {
- 			JBUFFER_TRACE(jh, "remove from old cp transaction");
-+			cp_transaction->t_chp_stats.cs_dropped++;
- 			__journal_remove_checkpoint(jh);
- 		}
- 
-@@ -805,6 +822,36 @@ skip_commit: /* The journal should be un
- 
- 	J_ASSERT(commit_transaction->t_state == T_COMMIT);
- 
-+	commit_transaction->t_start = CURRENT_MSECS;
-+	stats.ts_logging = jbd_time_diff(stats.ts_logging,
-+						commit_transaction->t_start);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	stats.ts_type = JBD_STATS_RUN;
-+	stats.ts_tid = commit_transaction->t_tid;
-+	stats.ts_handle_count = commit_transaction->t_handle_count;
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(journal->j_history + journal->j_history_cur, &stats,
-+			sizeof(stats));
-+	if (++journal->j_history_cur == journal->j_history_max)
-+		journal->j_history_cur = 0;
-+
-+	/*
-+	 * Calculate overall stats
-+	 */
-+	journal->j_stats.ts_tid++;
-+	journal->j_stats.ts_wait += stats.ts_wait;
-+	journal->j_stats.ts_running += stats.ts_running;
-+	journal->j_stats.ts_locked += stats.ts_locked;
-+	journal->j_stats.ts_flushing += stats.ts_flushing;
-+	journal->j_stats.ts_logging += stats.ts_logging;
-+	journal->j_stats.ts_handle_count += stats.ts_handle_count;
-+	journal->j_stats.ts_blocks += stats.ts_blocks;
-+	journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged;
-+	spin_unlock(&journal->j_history_lock);
-+
- 	/*
- 	 * This is a bit sleazy.  We borrow j_list_lock to protect
- 	 * journal->j_committing_transaction in __journal_remove_checkpoint.
-Index: linux-2.6.5-7.201/fs/jbd/checkpoint.c
-===================================================================
---- linux-2.6.5-7.201.orig/fs/jbd/checkpoint.c	2005-10-11 00:12:45.000000000 +0400
-+++ linux-2.6.5-7.201/fs/jbd/checkpoint.c	2006-07-28 02:40:14.000000000 +0400
-@@ -166,6 +166,7 @@ static int __cleanup_transaction(journal
- 			transaction_t *t = jh->b_transaction;
- 			tid_t tid = t->t_tid;
- 
-+			transaction->t_chp_stats.cs_forced_to_close++;
- 			spin_unlock(&journal->j_list_lock);
- 			jbd_unlock_bh_state(bh);
- 			log_start_commit(journal, tid);
-@@ -227,7 +228,7 @@ __flush_batch(journal_t *journal, struct
-  */
- static int __flush_buffer(journal_t *journal, struct journal_head *jh,
- 			struct buffer_head **bhs, int *batch_count,
--			int *drop_count)
-+			int *drop_count, transaction_t *transaction)
- {
- 	struct buffer_head *bh = jh2bh(jh);
- 	int ret = 0;
-@@ -248,6 +249,7 @@ static int __flush_buffer(journal_t *jou
- 		set_buffer_jwrite(bh);
- 		bhs[*batch_count] = bh;
- 		jbd_unlock_bh_state(bh);
-+		transaction->t_chp_stats.cs_written++;
- 		(*batch_count)++;
- 		if (*batch_count == NR_BATCH) {
- 			__flush_batch(journal, bhs, batch_count);
-@@ -316,6 +318,8 @@ int log_do_checkpoint(journal_t *journal
- 		tid_t this_tid;
- 
- 		transaction = journal->j_checkpoint_transactions;
-+		if (transaction->t_chp_stats.cs_chp_time == 0)
-+			transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS;
- 		this_tid = transaction->t_tid;
- 		jh = transaction->t_checkpoint_list;
- 		last_jh = jh->b_cpprev;
-@@ -332,7 +336,8 @@ int log_do_checkpoint(journal_t *journal
- 				retry = 1;
- 				break;
- 			}
--			retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count);
-+			retry = __flush_buffer(journal, jh, bhs, &batch_count,
-+						&drop_count, transaction);
- 		} while (jh != last_jh && !retry);
- 
- 		if (batch_count) {
-@@ -598,6 +603,8 @@ void __journal_insert_checkpoint(struct 
- 
- void __journal_drop_transaction(journal_t *journal, transaction_t *transaction)
- {
-+	struct transaction_stats_s stats;
-+
- 	assert_spin_locked(&journal->j_list_lock);
- 	if (transaction->t_cpnext) {
- 		transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
-@@ -623,5 +630,25 @@ void __journal_drop_transaction(journal_
- 	J_ASSERT(journal->j_running_transaction != transaction);
- 
- 	jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	if (transaction->t_chp_stats.cs_written != 0 ||
-+			transaction->t_chp_stats.cs_chp_time != 0) {
-+		stats.ts_type = JBD_STATS_CHECKPOINT;
-+		stats.ts_tid = transaction->t_tid;
-+		stats.u.chp = transaction->t_chp_stats;
-+		if (stats.ts_chp_time)
-+			stats.ts_chp_time = 
-+				jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS);
-+		spin_lock(&journal->j_history_lock);
-+		memcpy(journal->j_history + journal->j_history_cur, &stats,
-+				sizeof(stats));
-+		if (++journal->j_history_cur == journal->j_history_max)
-+			journal->j_history_cur = 0;
-+		spin_unlock(&journal->j_history_lock);
-+	}
-+
- 	kfree(transaction);
- }
-Index: linux-2.6.5-7.201/fs/jbd/transaction.c
-===================================================================
---- linux-2.6.5-7.201.orig/fs/jbd/transaction.c	2005-10-11 00:12:45.000000000 +0400
-+++ linux-2.6.5-7.201/fs/jbd/transaction.c	2006-07-28 02:40:14.000000000 +0400
-@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran
- 
- 	J_ASSERT(journal->j_running_transaction == NULL);
- 	journal->j_running_transaction = transaction;
-+	transaction->t_max_wait = 0;
-+	transaction->t_start = CURRENT_MSECS;
- 
- 	return transaction;
- }
-@@ -86,6 +88,7 @@ static int start_this_handle(journal_t *
- 	int nblocks = handle->h_buffer_credits;
- 	transaction_t *new_transaction = NULL;
- 	int ret = 0;
-+	unsigned long ts = CURRENT_MSECS;
- 
- 	if (nblocks > journal->j_max_transaction_buffers) {
- 		printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n",
-@@ -219,6 +222,12 @@ repeat_locked:
- 	/* OK, account for the buffers that this operation expects to
- 	 * use and add the handle to the running transaction. */
- 
-+	if (time_after(transaction->t_start, ts)) {
-+		ts = jbd_time_diff(ts, transaction->t_start);
-+		if (ts > transaction->t_max_wait)
-+			transaction->t_max_wait= ts;
-+	}
-+
- 	handle->h_transaction = transaction;
- 	transaction->t_outstanding_credits += nblocks;
- 	transaction->t_updates++;
-Index: linux-2.6.5-7.201/fs/jbd/journal.c
-===================================================================
---- linux-2.6.5-7.201.orig/fs/jbd/journal.c	2005-10-11 00:12:45.000000000 +0400
-+++ linux-2.6.5-7.201/fs/jbd/journal.c	2006-08-02 01:20:09.000000000 +0400
-@@ -35,6 +35,7 @@
- #include <linux/pagemap.h>
- #include <asm/uaccess.h>
- #include <linux/proc_fs.h>
-+#include <linux/seq_file.h>
- 
- EXPORT_SYMBOL(journal_start);
- EXPORT_SYMBOL(journal_restart);
-@@ -615,6 +616,337 @@ struct journal_head *journal_get_descrip
- 	return journal_add_journal_head(bh);
- }
- 
-+struct jbd_stats_proc_session {
-+	journal_t *journal;
-+	struct transaction_stats_s *stats;
-+	int start;
-+	int max;
-+};
-+
-+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s,
-+					struct transaction_stats_s *ts,
-+					int first)
-+{
-+	if (ts == s->stats + s->max)
-+		ts = s->stats;
-+	if (!first && ts == s->stats + s->start)
-+		return NULL;
-+	while (ts->ts_type == 0) {
-+		ts++;
-+		if (ts == s->stats + s->max)
-+			ts = s->stats;
-+		if (ts == s->stats + s->start)
-+			return NULL;
-+	}
-+	return ts;
-+
-+}
-+
-+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	ts = jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	if (!ts)
-+		return NULL;
-+	while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL);
-+	return ts;
-+}
-+
-+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	else
-+		return jbd_history_skip_empty(s, ++ts, 0);
-+}
-+
-+static int jbd_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct transaction_stats_s *ts = v;
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s "
-+				"%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid",
-+				"wait", "run", "lock", "flush", "log", "hndls",
-+				"block", "inlog", "ctime", "write", "drop",
-+				"close");
-+		return 0;
-+	}
-+	if (ts->ts_type == JBD_STATS_RUN)
-+		seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu "
-+				"%-6lu %-5lu %-5lu\n", "R", ts->ts_tid,
-+				ts->ts_wait, ts->ts_running, ts->ts_locked,
-+				ts->ts_flushing, ts->ts_logging,
-+				ts->ts_handle_count, ts->ts_blocks,
-+				ts->ts_blocks_logged);
-+	else if (ts->ts_type == JBD_STATS_CHECKPOINT)
-+		seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n",
-+				"C", ts->ts_tid, " ", ts->ts_chp_time,
-+				ts->ts_written, ts->ts_dropped,
-+				ts->ts_forced_to_close);
-+	else
-+		J_ASSERT(0);
-+	return 0;
-+}
-+
-+static void jbd_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_history_ops = {
-+	.start  = jbd_seq_history_start,
-+	.next   = jbd_seq_history_next,
-+	.stop   = jbd_seq_history_stop,
-+	.show   = jbd_seq_history_show,
-+};
-+
-+static int jbd_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, journal->j_history, size);
-+	s->max = journal->j_history_max;
-+	s->start = journal->j_history_cur % s->max;
-+	spin_unlock(&journal->j_history_lock);
-+	
-+	rc = seq_open(file, &jbd_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static ssize_t jbd_seq_history_write(struct file *file, const char __user *buf,
-+					size_t len, loff_t * ppos)
-+{
-+	journal_t *journal = PDE(file->f_dentry->d_inode)->data;
-+	int size;
-+
-+	if (!capable(CAP_SYS_ADMIN))
-+		return -EPERM;
-+
-+	spin_lock(&journal->j_history_lock);
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	journal->j_history_cur = 0;
-+	memset(journal->j_history, 0, size);
-+	spin_unlock(&journal->j_history_lock);
-+
-+	return len;
-+}
-+
-+static int jbd_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_history_open,
-+	.read           = seq_read,
-+	.write          = jbd_seq_history_write,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_history_release,
-+};
-+
-+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos)
-+{
-+	return *pos ? NULL : SEQ_START_TOKEN;
-+}
-+
-+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	return NULL;
-+}
-+
-+static int jbd_seq_info_show(struct seq_file *seq, void *v)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	if (v != SEQ_START_TOKEN)
-+		return 0;
-+	seq_printf(seq, "%lu transaction, each upto %u blocks\n",
-+			s->stats->ts_tid,
-+			s->journal->j_max_transaction_buffers);
-+	if (s->stats->ts_tid == 0)
-+		return 0;
-+	seq_printf(seq, "average: \n  %lums waiting for transaction\n",
-+			s->stats->ts_wait / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums running transaction\n",
-+			s->stats->ts_running / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums transaction was being locked\n",
-+			s->stats->ts_locked / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums flushing data (in ordered mode)\n",
-+			s->stats->ts_flushing / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums logging transaction\n",
-+			s->stats->ts_logging / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu handles per transaction\n",
-+			s->stats->ts_handle_count / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu blocks per transaction\n",
-+			s->stats->ts_blocks / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu logged blocks per transaction\n",
-+			s->stats->ts_blocks_logged / s->stats->ts_tid);
-+	return 0;
-+}
-+
-+static void jbd_seq_info_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_info_ops = {
-+	.start  = jbd_seq_info_start,
-+	.next   = jbd_seq_info_next,
-+	.stop   = jbd_seq_info_stop,
-+	.show   = jbd_seq_info_show,
-+};
-+
-+static int jbd_seq_info_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s);
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, &journal->j_stats, size);
-+	s->journal = journal;
-+	spin_unlock(&journal->j_history_lock);
-+	
-+	rc = seq_open(file, &jbd_seq_info_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static ssize_t jbd_seq_info_write(struct file *file, const char __user *buf,
-+					size_t len, loff_t * ppos)
-+{
-+	journal_t *journal = PDE(file->f_dentry->d_inode)->data;
-+	int size;
-+
-+	if (!capable(CAP_SYS_ADMIN))
-+		return -EPERM;
-+
-+	size = sizeof(struct transaction_stats_s);
-+	spin_lock(&journal->j_history_lock);
-+	memset(&journal->j_stats, 0, size);
-+	spin_unlock(&journal->j_history_lock);
-+
-+	return len;
-+}
-+
-+static int jbd_seq_info_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_info_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_info_open,
-+	.read           = seq_read,
-+	.write          = jbd_seq_info_write,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_info_release,
-+};
-+
-+static struct proc_dir_entry *proc_jbd_stats = NULL;
-+
-+static void jbd_stats_proc_init(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats);
-+	if (journal->j_proc_entry) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("history", S_IRUGO,
-+				journal->j_proc_entry);
-+		if (p) {
-+			p->proc_fops = &jbd_seq_history_fops;
-+			p->data = journal;
-+			p = create_proc_entry("info", S_IRUGO,
-+						journal->j_proc_entry);
-+			if (p) {
-+				p->proc_fops = &jbd_seq_info_fops;
-+				p->data = journal;
-+			}
-+		}
-+	}
-+}
-+
-+static void jbd_stats_proc_exit(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	remove_proc_entry("info", journal->j_proc_entry);
-+	remove_proc_entry("history", journal->j_proc_entry);
-+	remove_proc_entry(name, proc_jbd_stats);
-+}
-+
-+static void journal_init_stats(journal_t *journal)
-+{
-+	int size;
-+
-+	if (proc_jbd_stats == NULL)
-+		return;
-+
-+	journal->j_history_max = 1500;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	journal->j_history = kmalloc(size, GFP_KERNEL);
-+	if (journal->j_history == NULL) {
-+		journal->j_history_max = 0;
-+		return;
-+	}
-+	memset(journal->j_history, 0, size);
-+	spin_lock_init(&journal->j_history_lock);
-+}
-+
- /*
-  * Management for journal control blocks: functions to create and
-  * destroy journal_t structures, and to initialise and read existing
-@@ -657,6 +989,9 @@ static journal_t * journal_init_common (
- 		kfree(journal);
- 		goto fail;
- 	}
-+	
-+	journal_init_stats(journal);
-+
- 	return journal;
- fail:
- 	return NULL;
-@@ -699,6 +1034,7 @@ journal_t * journal_init_dev(struct bloc
- 	journal->j_blk_offset = start;
- 	journal->j_maxlen = len;
- 	journal->j_blocksize = blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
- 	J_ASSERT(bh != NULL);
-@@ -736,6 +1072,7 @@ journal_t * journal_init_inode (struct i
- 
- 	journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits;
- 	journal->j_blocksize = inode->i_sb->s_blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	err = journal_bmap(journal, 0, &blocknr);
- 	/* If that failed, give up */
-@@ -1106,6 +1443,8 @@ void journal_destroy(journal_t *journal)
- 		brelse(journal->j_sb_buffer);
- 	}
- 
-+	if (journal->j_proc_entry)
-+		jbd_stats_proc_exit(journal);
- 	if (journal->j_inode)
- 		iput(journal->j_inode);
- 	if (journal->j_revoke)
-@@ -1861,6 +2200,28 @@ static void __exit remove_jbd_proc_entry
- 
- #endif
- 
-+#if defined(CONFIG_PROC_FS)
-+
-+#define JBD_STATS_PROC_NAME "fs/jbd"
-+
-+static void __init create_jbd_stats_proc_entry(void)
-+{
-+	proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+static void __exit remove_jbd_stats_proc_entry(void)
-+{
-+	if (proc_jbd_stats)
-+		remove_proc_entry(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+#else
-+
-+#define create_jbd_stats_proc_entry() do {} while (0)
-+#define remove_jbd_stats_proc_entry() do {} while (0)
-+
-+#endif
-+
- kmem_cache_t *jbd_handle_cache;
- 
- static int __init journal_init_handle_cache(void)
-@@ -1915,6 +2276,7 @@ static int __init journal_init(void)
- 	if (ret != 0)
- 		journal_destroy_caches();
- 	create_jbd_proc_entry();
-+	create_jbd_stats_proc_entry();
- 	return ret;
- }
- 
-@@ -1926,6 +2288,7 @@ static void __exit journal_exit(void)
- 		printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n);
- #endif
- 	remove_jbd_proc_entry();
-+	remove_jbd_stats_proc_entry();
- 	journal_destroy_caches();
- }
- 
diff --git a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch b/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
deleted file mode 100644
index 3e38108366cedc519e05ee2c1aa88db8fd1247c7..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/jbd-stats-2.6.9.patch
+++ /dev/null
@@ -1,737 +0,0 @@
-Index: linux-2.6.9/include/linux/jbd.h
-===================================================================
---- linux-2.6.9.orig/include/linux/jbd.h
-+++ linux-2.6.9/include/linux/jbd.h
-@@ -422,6 +422,16 @@ struct handle_s 
- };
- 
- 
-+/*
-+ * Some stats for checkpoint phase
-+ */
-+struct transaction_chp_stats_s {
-+	unsigned long		cs_chp_time;
-+	unsigned long		cs_forced_to_close;
-+	unsigned long		cs_written;
-+	unsigned long		cs_dropped;
-+};
-+
- /* The transaction_t type is the guts of the journaling mechanism.  It
-  * tracks a compound transaction through its various states:
-  *
-@@ -553,6 +563,21 @@ struct transaction_s 
-	spinlock_t		t_handle_lock;
-
-	/*
-+	 * Longest time some handle had to wait for running transaction
-+	 */
-+	unsigned long		t_max_wait;
-+
-+	/*
-+	 * When transaction started
-+	 */
-+	unsigned long		t_start;
-+
-+	/*
-+	 * Checkpointing stats [j_checkpoint_sem]
-+	 */
-+	struct transaction_chp_stats_s t_chp_stats;
-+
-+	/*
- 	 * Number of outstanding updates running on this transaction
- 	 * [t_handle_lock]
- 	 */
-@@ -592,6 +617,57 @@ struct transaction_s 
- #endif
- };
-
-+struct transaction_run_stats_s {
-+	unsigned long		rs_wait;
-+	unsigned long		rs_running;
-+	unsigned long		rs_locked;
-+	unsigned long		rs_flushing;
-+	unsigned long		rs_logging;
-+
-+	unsigned long		rs_handle_count;
-+	unsigned long		rs_blocks;
-+	unsigned long		rs_blocks_logged;
-+};
-+
-+struct transaction_stats_s
-+{
-+	int 			ts_type;
-+	unsigned long		ts_tid;
-+	union {
-+		struct transaction_run_stats_s run;
-+		struct transaction_chp_stats_s chp;
-+	} u;
-+};
-+
-+#define JBD_STATS_RUN		1
-+#define JBD_STATS_CHECKPOINT	2
-+
-+#define ts_wait			u.run.rs_wait
-+#define ts_running		u.run.rs_running
-+#define ts_locked		u.run.rs_locked
-+#define ts_flushing		u.run.rs_flushing
-+#define ts_logging		u.run.rs_logging
-+#define ts_handle_count		u.run.rs_handle_count
-+#define ts_blocks		u.run.rs_blocks
-+#define ts_blocks_logged	u.run.rs_blocks_logged
-+
-+#define ts_chp_time		u.chp.cs_chp_time
-+#define ts_forced_to_close	u.chp.cs_forced_to_close
-+#define ts_written		u.chp.cs_written
-+#define ts_dropped		u.chp.cs_dropped
-+
-+#define CURRENT_MSECS		(jiffies_to_msecs(jiffies))
-+
-+static inline unsigned int
-+jbd_time_diff(unsigned int start, unsigned int end)
-+{
-+	if (unlikely(start > end))
-+		end = end + (~0UL - start);
-+	else
-+		end -= start;
-+	return end;
-+}
-+
- /**
-  * struct journal_s - The journal_s type is the concrete type associated with
-  *     journal_t.
-@@ -828,6 +904,16 @@ struct journal_s
- 	struct jbd_revoke_table_s *j_revoke_table[2];
- 
- 	/*
-+	 *
-+	 */
-+	struct transaction_stats_s *j_history;
-+	int			j_history_max;
-+	int			j_history_cur;
-+	spinlock_t		j_history_lock;
-+	struct proc_dir_entry	*j_proc_entry;
-+	struct transaction_stats_s j_stats;
-+	
-+	/*
- 	 * An opaque pointer to fs-private information.  ext3 puts its
- 	 * superblock pointer here
- 	 */
-Index: linux-2.6.9/fs/jbd/commit.c
-===================================================================
---- linux-2.6.9.orig/fs/jbd/commit.c
-+++ linux-2.6.9/fs/jbd/commit.c
-@@ -21,6 +21,7 @@
- #include <linux/mm.h>
- #include <linux/pagemap.h>
- #include <linux/smp_lock.h>
-+#include <linux/jiffies.h>
-
- /*
-  * Default IO end handler for temporary BJ_IO buffer_heads.
-@@ -101,6 +102,7 @@ static int inverted_lock(journal_t *jour
-  */
- void journal_commit_transaction(journal_t *journal)
- {
-+	struct transaction_stats_s stats;
-	transaction_t *commit_transaction;
-	struct journal_head *jh, *new_jh, *descriptor;
-	struct buffer_head *wbuf[64];
-@@ -147,6 +149,11 @@ void journal_commit_transaction(journal_
-	spin_lock(&journal->j_state_lock);
-	commit_transaction->t_state = T_LOCKED;
-
-+	stats.ts_wait = commit_transaction->t_max_wait;
-+	stats.ts_locked = CURRENT_MSECS;
-+	stats.ts_running = jbd_time_diff(commit_transaction->t_start,
-+						stats.ts_locked);
-+	
-	spin_lock(&commit_transaction->t_handle_lock);
-	while (commit_transaction->t_updates) {
-		DEFINE_WAIT(wait);
-@@ -219,6 +226,9 @@ void journal_commit_transaction(journal_
-	 */
-	journal_switch_revoke_table(journal);
-
-+	stats.ts_flushing = CURRENT_MSECS;
-+	stats.ts_locked = jbd_time_diff(stats.ts_locked, stats.ts_flushing);
-+
-	commit_transaction->t_state = T_FLUSH;
-	journal->j_committing_transaction = commit_transaction;
-	journal->j_running_transaction = NULL;
-@@ -365,6 +375,11 @@ write_out_data:
-	 */
-	commit_transaction->t_state = T_COMMIT;
-
-+	stats.ts_logging = CURRENT_MSECS;
-+	stats.ts_flushing = jbd_time_diff(stats.ts_flushing, stats.ts_logging);
-+	stats.ts_blocks = commit_transaction->t_outstanding_credits;
-+	stats.ts_blocks_logged = 0;
-+
-	descriptor = NULL;
-	bufs = 0;
-	while (commit_transaction->t_buffers) {
-@@ -513,6 +528,7 @@ start_journal_io:
-				submit_bh(WRITE, bh);
-			}
-			cond_resched();
-+			stats.ts_blocks_logged += bufs;
-
-			/* Force a new descriptor to be generated next
-                            time round the loop. */
-@@ -767,6 +783,7 @@ restart_loop:
-		cp_transaction = jh->b_cp_transaction;
-		if (cp_transaction) {
-			JBUFFER_TRACE(jh, "remove from old cp transaction");
-+			cp_transaction->t_chp_stats.cs_dropped++;
-			__journal_remove_checkpoint(jh);
-		}
-
-@@ -816,6 +833,37 @@ restart_loop:
-		}
-		cond_resched_lock(&journal->j_list_lock);
-	}
-+
-+	commit_transaction->t_start = CURRENT_MSECS;
-+	stats.ts_logging = jbd_time_diff(stats.ts_logging,
-+					commit_transaction->t_start);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	stats.ts_type = JBD_STATS_RUN;
-+	stats.ts_tid = commit_transaction->t_tid;
-+	stats.ts_handle_count = commit_transaction->t_handle_count;
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(journal->j_history + journal->j_history_cur, &stats,
-+		sizeof(stats));
-+	if (++journal->j_history_cur == journal->j_history_max)
-+		journal->j_history_cur = 0;
-+
-+	/*
-+	 * Calculate overall stats
-+	 */
-+	journal->j_stats.ts_tid++;
-+	journal->j_stats.ts_wait += stats.ts_wait;
-+	journal->j_stats.ts_running += stats.ts_running;
-+	journal->j_stats.ts_locked += stats.ts_locked;
-+	journal->j_stats.ts_flushing += stats.ts_flushing;
-+	journal->j_stats.ts_logging += stats.ts_logging;
-+	journal->j_stats.ts_handle_count += stats.ts_handle_count;
-+	journal->j_stats.ts_blocks += stats.ts_blocks;
-+	journal->j_stats.ts_blocks_logged += stats.ts_blocks_logged;
-+	spin_unlock(&journal->j_history_lock);
-+
-	spin_unlock(&journal->j_list_lock);
-	/*
-	 * This is a bit sleazy.  We borrow j_list_lock to protect
-Index: linux-2.6.9/fs/jbd/checkpoint.c
-===================================================================
---- linux-2.6.9.orig/fs/jbd/checkpoint.c
-+++ linux-2.6.9/fs/jbd/checkpoint.c
-@@ -126,7 +127,8 @@
-  * Called under jbd_lock_bh_state(jh2bh(jh)), and drops it
-  */
- static int __process_buffer(journal_t *journal, struct journal_head *jh,
--			struct buffer_head **bhs, int *batch_count)
-+			struct buffer_head **bhs, int *batch_count,
-+			transaction_t *transaction)
- {
-	struct buffer_head *bh = jh2bh(jh);
-	int ret = 0;
-@@ -166,6 +166,7 @@
-		transaction_t *t = jh->b_transaction;
-		tid_t tid = t->t_tid;
-
-+		transaction->t_chp_stats.cs_forced_to_close++;
-		spin_unlock(&journal->j_list_lock);
-		jbd_unlock_bh_state(bh);
-		log_start_commit(journal, tid);
-@@ -247,6 +248,7 @@
-		bhs[*batch_count] = bh;
-		__buffer_relink_io(jh);
-		jbd_unlock_bh_state(bh);
-+		transaction->t_chp_stats.cs_written++;
-		(*batch_count)++;
-		if (*batch_count == NR_BATCH) {
-			spin_unlock(&journal->j_list_lock);
-@@ -315,6 +317,8 @@ int log_do_checkpoint(journal_t *journal
-	if (!journal->j_checkpoint_transactions)
-		goto out;
-	transaction = journal->j_checkpoint_transactions;
-+	if (transaction->t_chp_stats.cs_chp_time == 0)
-+		transaction->t_chp_stats.cs_chp_time = CURRENT_MSECS;
-	this_tid = transaction->t_tid;
- restart:
-	/*
-@@ -331,7 +335,8 @@ int log_do_checkpoint(journal_t *journal
-				retry = 1;
-				break;
-			}
--			retry = __process_buffer(journal, jh, bhs,&batch_count);
-+			retry = __process_buffer(journal, jh, bhs,&batch_count,
-+					transaction);
-		}
-
-		if (batch_count) {
-@@ -597,6 +602,8 @@ void __journal_insert_checkpoint(struct 
-
- void __journal_drop_transaction(journal_t *journal, transaction_t *transaction)
- {
-+	struct transaction_stats_s stats;
-+
-	assert_spin_locked(&journal->j_list_lock);
-	if (transaction->t_cpnext) {
-		transaction->t_cpnext->t_cpprev = transaction->t_cpprev;
-@@ -622,5 +629,25 @@ void __journal_drop_transaction(journal_
-	J_ASSERT(journal->j_running_transaction != transaction);
-
-	jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
-+
-+	/*
-+	 * File the transaction for history
-+	 */
-+	if (transaction->t_chp_stats.cs_written != 0 ||
-+			transaction->t_chp_stats.cs_chp_time != 0) {
-+		stats.ts_type = JBD_STATS_CHECKPOINT;
-+		stats.ts_tid = transaction->t_tid;
-+		stats.u.chp = transaction->t_chp_stats;
-+		if (stats.ts_chp_time)
-+			stats.ts_chp_time = 
-+				jbd_time_diff(stats.ts_chp_time, CURRENT_MSECS);
-+		spin_lock(&journal->j_history_lock);
-+		memcpy(journal->j_history + journal->j_history_cur, &stats,
-+				sizeof(stats));
-+		if (++journal->j_history_cur == journal->j_history_max)
-+			journal->j_history_cur = 0;
-+		spin_unlock(&journal->j_history_lock);
-+	}
-+
-	kfree(transaction);
- }
-Index: linux-2.6.9/fs/jbd/transaction.c
-===================================================================
---- linux-2.6.9.orig/fs/jbd/transaction.c
-+++ linux-2.6.9/fs/jbd/transaction.c
-@@ -60,6 +60,8 @@ get_transaction(journal_t *journal, tran
- 
- 	J_ASSERT(journal->j_running_transaction == NULL);
- 	journal->j_running_transaction = transaction;
-+	transaction->t_max_wait = 0;
-+	transaction->t_start = CURRENT_MSECS;
- 
- 	return transaction;
- }
-@@ -86,6 +88,7 @@ static int start_this_handle(journal_t *
- 	int nblocks = handle->h_buffer_credits;
- 	transaction_t *new_transaction = NULL;
- 	int ret = 0;
-+	unsigned long ts = CURRENT_MSECS;
- 
- 	if (nblocks > journal->j_max_transaction_buffers) {
- 		printk(KERN_ERR "JBD: %s wants too many credits (%d > %d)\n",
-@@ -219,6 +222,12 @@ repeat_locked:
- 	/* OK, account for the buffers that this operation expects to
- 	 * use and add the handle to the running transaction. */
- 
-+	if (time_after(transaction->t_start, ts)) {
-+		ts = jbd_time_diff(ts, transaction->t_start);
-+		if (ts > transaction->t_max_wait)
-+			transaction->t_max_wait= ts;
-+	}
-+
- 	handle->h_transaction = transaction;
- 	transaction->t_outstanding_credits += nblocks;
- 	transaction->t_updates++;
-Index: linux-2.6.9/fs/jbd/journal.c
-===================================================================
---- linux-2.6.9.orig/fs/jbd/journal.c
-+++ linux-2.6.9/fs/jbd/journal.c
-@@ -36,6 +36,7 @@
- #include <asm/uaccess.h>
- #include <asm/page.h>
- #include <linux/proc_fs.h>
-+#include <linux/seq_file.h>
- 
- EXPORT_SYMBOL(journal_start);
- EXPORT_SYMBOL(journal_restart);
-@@ -649,6 +650,300 @@ struct journal_head *journal_get_descrip
- 	return journal_add_journal_head(bh);
- }
- 
-+struct jbd_stats_proc_session {
-+	journal_t *journal;
-+	struct transaction_stats_s *stats;
-+	int start;
-+	int max;
-+};
-+
-+static void *jbd_history_skip_empty(struct jbd_stats_proc_session *s,
-+					struct transaction_stats_s *ts,
-+					int first)
-+{
-+	if (ts == s->stats + s->max)
-+		ts = s->stats;
-+	if (!first && ts == s->stats + s->start)
-+		return NULL;
-+	while (ts->ts_type == 0) {
-+		ts++;
-+		if (ts == s->stats + s->max)
-+			ts = s->stats;
-+		if (ts == s->stats + s->start)
-+			return NULL;
-+	}
-+	return ts;
-+
-+}
-+
-+static void *jbd_seq_history_start(struct seq_file *seq, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts;
-+	int l = *pos;
-+
-+	if (l == 0)
-+		return SEQ_START_TOKEN;
-+	ts = jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	if (!ts)
-+		return NULL;
-+	while (--l && (ts = jbd_history_skip_empty(s, ++ts, 0)) != NULL);
-+	return ts;
-+}
-+
-+static void *jbd_seq_history_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	struct transaction_stats_s *ts = v;
-+
-+	++*pos;
-+	if (v == SEQ_START_TOKEN)
-+		return jbd_history_skip_empty(s, s->stats + s->start, 1);
-+	else
-+		return jbd_history_skip_empty(s, ++ts, 0);
-+}
-+
-+static int jbd_seq_history_show(struct seq_file *seq, void *v)
-+{
-+	struct transaction_stats_s *ts = v;
-+	if (v == SEQ_START_TOKEN) {
-+		seq_printf(seq, "%-4s %-5s %-5s %-5s %-5s %-5s %-5s %-6s %-5s "
-+				"%-5s %-5s %-5s %-5s %-5s\n", "R/C", "tid",
-+				"wait", "run", "lock", "flush", "log", "hndls",
-+				"block", "inlog", "ctime", "write", "drop",
-+				"close");
-+		return 0;
-+	}
-+	if (ts->ts_type == JBD_STATS_RUN)
-+		seq_printf(seq, "%-4s %-5lu %-5lu %-5lu %-5lu %-5lu %-5lu "
-+				"%-6lu %-5lu %-5lu\n", "R", ts->ts_tid,
-+				ts->ts_wait, ts->ts_running, ts->ts_locked,
-+				ts->ts_flushing, ts->ts_logging,
-+				ts->ts_handle_count, ts->ts_blocks,
-+				ts->ts_blocks_logged);
-+	else if (ts->ts_type == JBD_STATS_CHECKPOINT)
-+		seq_printf(seq, "%-4s %-5lu %48s %-5lu %-5lu %-5lu %-5lu\n",
-+				"C", ts->ts_tid, " ", ts->ts_chp_time,
-+				ts->ts_written, ts->ts_dropped,
-+				ts->ts_forced_to_close);
-+	else
-+		J_ASSERT(0);
-+	return 0;
-+}
-+
-+static void jbd_seq_history_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_history_ops = {
-+	.start  = jbd_seq_history_start,
-+	.next   = jbd_seq_history_next,
-+	.stop   = jbd_seq_history_stop,
-+	.show   = jbd_seq_history_show,
-+};
-+
-+static int jbd_seq_history_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, journal->j_history, size);
-+	s->max = journal->j_history_max;
-+	s->start = journal->j_history_cur % s->max;
-+	spin_unlock(&journal->j_history_lock);
-+	
-+	rc = seq_open(file, &jbd_seq_history_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int jbd_seq_history_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_history_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_history_open,
-+	.read           = seq_read,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_history_release,
-+};
-+
-+static void *jbd_seq_info_start(struct seq_file *seq, loff_t *pos)
-+{
-+	return *pos ? NULL : SEQ_START_TOKEN;
-+}
-+
-+static void *jbd_seq_info_next(struct seq_file *seq, void *v, loff_t *pos)
-+{
-+	return NULL;
-+}
-+
-+static int jbd_seq_info_show(struct seq_file *seq, void *v)
-+{
-+	struct jbd_stats_proc_session *s = seq->private;
-+	if (v != SEQ_START_TOKEN)
-+		return 0;
-+	seq_printf(seq, "%lu transaction, each upto %u blocks\n",
-+			s->stats->ts_tid,
-+			s->journal->j_max_transaction_buffers);
-+	if (s->stats->ts_tid == 0)
-+		return 0;
-+	seq_printf(seq, "average: \n  %lums waiting for transaction\n",
-+			s->stats->ts_wait / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums running transaction\n",
-+			s->stats->ts_running / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums transaction was being locked\n",
-+			s->stats->ts_locked / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums flushing data (in ordered mode)\n",
-+			s->stats->ts_flushing / s->stats->ts_tid);
-+	seq_printf(seq, "  %lums logging transaction\n",
-+			s->stats->ts_logging / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu handles per transaction\n",
-+			s->stats->ts_handle_count / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu blocks per transaction\n",
-+			s->stats->ts_blocks / s->stats->ts_tid);
-+	seq_printf(seq, "  %lu logged blocks per transaction\n",
-+			s->stats->ts_blocks_logged / s->stats->ts_tid);
-+	return 0;
-+}
-+
-+static void jbd_seq_info_stop(struct seq_file *seq, void *v)
-+{
-+}
-+
-+static struct seq_operations jbd_seq_info_ops = {
-+	.start  = jbd_seq_info_start,
-+	.next   = jbd_seq_info_next,
-+	.stop   = jbd_seq_info_stop,
-+	.show   = jbd_seq_info_show,
-+};
-+
-+static int jbd_seq_info_open(struct inode *inode, struct file *file)
-+{
-+	journal_t *journal = PDE(inode)->data;
-+	struct jbd_stats_proc_session *s;
-+	int rc, size;
-+
-+	s = kmalloc(sizeof(*s), GFP_KERNEL);
-+	if (s == NULL)
-+		return -EIO;
-+	size = sizeof(struct transaction_stats_s);
-+	s->stats = kmalloc(size, GFP_KERNEL);
-+	if (s->stats == NULL) {
-+		kfree(s);
-+		return -EIO;
-+	}
-+	spin_lock(&journal->j_history_lock);
-+	memcpy(s->stats, &journal->j_stats, size);
-+	s->journal = journal;
-+	spin_unlock(&journal->j_history_lock);
-+	
-+	rc = seq_open(file, &jbd_seq_info_ops);
-+	if (rc == 0) {
-+		struct seq_file *m = (struct seq_file *)file->private_data;
-+		m->private = s;
-+	} else {
-+		kfree(s->stats);
-+		kfree(s);
-+	}
-+	return rc;
-+
-+}
-+
-+static int jbd_seq_info_release(struct inode *inode, struct file *file)
-+{
-+	struct seq_file *seq = (struct seq_file *)file->private_data;
-+	struct jbd_stats_proc_session *s = seq->private;
-+	kfree(s->stats);
-+	kfree(s);
-+	return seq_release(inode, file);
-+}
-+
-+static struct file_operations jbd_seq_info_fops = {
-+	.owner		= THIS_MODULE,
-+	.open           = jbd_seq_info_open,
-+	.read           = seq_read,
-+	.llseek         = seq_lseek,
-+	.release        = jbd_seq_info_release,
-+};
-+
-+static struct proc_dir_entry *proc_jbd_stats = NULL;
-+
-+static void jbd_stats_proc_init(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	journal->j_proc_entry = proc_mkdir(name, proc_jbd_stats);
-+	if (journal->j_proc_entry) {
-+		struct proc_dir_entry *p;
-+		p = create_proc_entry("history", S_IRUGO,
-+				journal->j_proc_entry);
-+		if (p) {
-+			p->proc_fops = &jbd_seq_history_fops;
-+			p->data = journal;
-+			p = create_proc_entry("info", S_IRUGO,
-+						journal->j_proc_entry);
-+			if (p) {
-+				p->proc_fops = &jbd_seq_info_fops;
-+				p->data = journal;
-+			}
-+		}
-+	}
-+}
-+
-+static void jbd_stats_proc_exit(journal_t *journal)
-+{
-+	char name[64];
-+
-+	snprintf(name, sizeof(name) - 1, "%s", bdevname(journal->j_dev, name));
-+	remove_proc_entry("info", journal->j_proc_entry);
-+	remove_proc_entry("history", journal->j_proc_entry);
-+	remove_proc_entry(name, proc_jbd_stats);
-+}
-+
-+static void journal_init_stats(journal_t *journal)
-+{
-+	int size;
-+
-+	if (proc_jbd_stats == NULL)
-+		return;
-+
-+	journal->j_history_max = 100;
-+	size = sizeof(struct transaction_stats_s) * journal->j_history_max;
-+	journal->j_history = kmalloc(size, GFP_KERNEL);
-+	if (journal->j_history == NULL) {
-+		journal->j_history_max = 0;
-+		return;
-+	}
-+	memset(journal->j_history, 0, size);
-+	spin_lock_init(&journal->j_history_lock);
-+}
-+
- /*
-  * Management for journal control blocks: functions to create and
-  * destroy journal_t structures, and to initialise and read existing
-@@ -691,6 +986,9 @@ static journal_t * journal_init_common (
- 		kfree(journal);
- 		goto fail;
- 	}
-+	
-+	journal_init_stats(journal);
-+
- 	return journal;
- fail:
- 	return NULL;
-@@ -733,6 +1031,7 @@ journal_t * journal_init_dev(struct bloc
- 	journal->j_blk_offset = start;
- 	journal->j_maxlen = len;
- 	journal->j_blocksize = blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	bh = __getblk(journal->j_dev, start, journal->j_blocksize);
- 	J_ASSERT(bh != NULL);
-@@ -770,6 +1069,7 @@ journal_t * journal_init_inode (struct i
- 
- 	journal->j_maxlen = inode->i_size >> inode->i_sb->s_blocksize_bits;
- 	journal->j_blocksize = inode->i_sb->s_blocksize;
-+	jbd_stats_proc_init(journal);
- 
- 	err = journal_bmap(journal, 0, &blocknr);
- 	/* If that failed, give up */
-@@ -1140,6 +1440,8 @@ void journal_destroy(journal_t *journal)
- 		brelse(journal->j_sb_buffer);
- 	}
- 
-+	if (journal->j_proc_entry)
-+		jbd_stats_proc_exit(journal);
- 	if (journal->j_inode)
- 		iput(journal->j_inode);
- 	if (journal->j_revoke)
-@@ -1896,6 +2198,28 @@ static void __exit remove_jbd_proc_entry
- 
- #endif
- 
-+#if defined(CONFIG_PROC_FS)
-+
-+#define JBD_STATS_PROC_NAME "fs/jbd"
-+
-+static void __init create_jbd_stats_proc_entry(void)
-+{
-+	proc_jbd_stats = proc_mkdir(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+static void __exit remove_jbd_stats_proc_entry(void)
-+{
-+	if (proc_jbd_stats)
-+		remove_proc_entry(JBD_STATS_PROC_NAME, NULL);
-+}
-+
-+#else
-+
-+#define create_jbd_stats_proc_entry() do {} while (0)
-+#define remove_jbd_stats_proc_entry() do {} while (0)
-+
-+#endif
-+
- kmem_cache_t *jbd_handle_cache;
- 
- static int __init journal_init_handle_cache(void)
-@@ -1950,6 +2274,7 @@ static int __init journal_init(void)
- 	if (ret != 0)
- 		journal_destroy_caches();
- 	create_jbd_proc_entry();
-+	create_jbd_stats_proc_entry();
- 	return ret;
- }
- 
-@@ -1961,6 +2286,7 @@ static void __exit journal_exit(void)
- 		printk(KERN_EMERG "JBD: leaked %d journal_heads!\n", n);
- #endif
- 	remove_jbd_proc_entry();
-+	remove_jbd_stats_proc_entry();
- 	journal_destroy_caches();
- }
- 
diff --git a/lustre/kernel_patches/patches/link_notlast-susefix.patch b/lustre/kernel_patches/patches/link_notlast-susefix.patch
deleted file mode 100644
index e3efbb465bc7b3ec59b57b633409401acf0ed2a0..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/link_notlast-susefix.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- linux-2.6.5-7.141/fs/namei.c.orig	2005-04-01 18:03:37.788262784 +0300
-+++ linux-2.6.5-7.141/fs/namei.c	2005-04-01 18:05:43.058218856 +0300
-@@ -719,10 +719,12 @@
- 			goto out_dput;
- 
- 		if (inode->i_op->follow_link) {
-+			int save_flags = nd->flags;
- 			mntget(next.mnt);
- 			nd->flags |= LOOKUP_LINK_NOTLAST;
- 			err = do_follow_link(next.dentry, nd);
--			nd->flags &= ~LOOKUP_LINK_NOTLAST;
-+			if (!(save_flags & LOOKUP_LINK_NOTLAST))
-+				nd->flags &= ~LOOKUP_LINK_NOTLAST;
- 			dput(next.dentry);
- 			mntput(next.mnt);
- 			if (err)
diff --git a/lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch b/lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch
deleted file mode 100644
index 5c2e7dc82215dac841be93b1aa9822e5f805b29d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/linux-2.6-binutils-2.16.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- linux/arch/i386/kernel/process.c.seg	2005-03-27 13:07:14.000000000 -0800
-+++ linux/arch/i386/kernel/process.c	2005-03-28 10:28:47.000000000 -0800
-@@ -597,8 +597,8 @@ struct task_struct fastcall * __switch_t
- 	 * Save away %fs and %gs. No need to save %es and %ds, as
- 	 * those are always kernel segments while inside the kernel.
- 	 */
--	asm volatile("movl %%fs,%0":"=m" (*(int *)&prev->fs));
--	asm volatile("movl %%gs,%0":"=m" (*(int *)&prev->gs));
-+	asm volatile("mov %%fs,%0":"=m" (prev->fs));
-+	asm volatile("mov %%gs,%0":"=m" (prev->gs));
- 
- 	/*
- 	 * Restore %fs and %gs if needed.
---- linux/arch/i386/kernel/vm86.c.seg	2005-03-27 13:07:14.000000000 -0800
-+++ linux/arch/i386/kernel/vm86.c	2005-03-28 10:28:47.000000000 -0800
-@@ -294,8 +294,8 @@ static void do_sys_vm86(struct kernel_vm
-  */
- 	info->regs32->eax = 0;
- 	tsk->thread.saved_esp0 = tsk->thread.esp0;
--	asm volatile("movl %%fs,%0":"=m" (tsk->thread.saved_fs));
--	asm volatile("movl %%gs,%0":"=m" (tsk->thread.saved_gs));
-+	asm volatile("mov %%fs,%0":"=m" (tsk->thread.saved_fs));
-+	asm volatile("mov %%gs,%0":"=m" (tsk->thread.saved_gs));
- 
- 	tss = &per_cpu(init_tss, get_cpu());
- 	tsk->thread.esp0 = (unsigned long) &info->VM86_TSS_ESP0;
---- linux/arch/x86_64/kernel/process.c.seg	2005-03-27 13:07:49.000000000 -0800
-+++ linux/arch/x86_64/kernel/process.c	2005-03-28 11:11:04.206766410 -0800
-@@ -391,10 +391,10 @@ int copy_thread(int nr, unsigned long cl
- 	p->thread.fs = me->thread.fs;
- 	p->thread.gs = me->thread.gs;
- 
--	asm("movl %%gs,%0" : "=m" (p->thread.gsindex));
--	asm("movl %%fs,%0" : "=m" (p->thread.fsindex));
--	asm("movl %%es,%0" : "=m" (p->thread.es));
--	asm("movl %%ds,%0" : "=m" (p->thread.ds));
-+	asm("mov %%gs,%0" : "=m" (p->thread.gsindex));
-+	asm("mov %%fs,%0" : "=m" (p->thread.fsindex));
-+	asm("mov %%es,%0" : "=m" (p->thread.es));
-+	asm("mov %%ds,%0" : "=m" (p->thread.ds));
- 
- 	if (unlikely(me->thread.io_bitmap_ptr != NULL)) { 
- 		p->thread.io_bitmap_ptr = kmalloc(IO_BITMAP_BYTES, GFP_KERNEL);
-@@ -457,11 +457,11 @@ struct task_struct *__switch_to(struct t
- 	 * Switch DS and ES.
- 	 * This won't pick up thread selector changes, but I guess that is ok.
- 	 */
--	asm volatile("movl %%es,%0" : "=m" (prev->es)); 
-+	asm volatile("mov %%es,%0" : "=m" (prev->es)); 
- 	if (unlikely(next->es | prev->es))
- 		loadsegment(es, next->es); 
- 	
--	asm volatile ("movl %%ds,%0" : "=m" (prev->ds)); 
-+	asm volatile ("mov %%ds,%0" : "=m" (prev->ds)); 
- 	if (unlikely(next->ds | prev->ds))
- 		loadsegment(ds, next->ds);
- 
-@@ -472,7 +472,7 @@ struct task_struct *__switch_to(struct t
- 	 */
- 	{ 
- 		unsigned fsindex;
--		asm volatile("movl %%fs,%0" : "=g" (fsindex)); 
-+		asm volatile("movl %%fs,%0" : "=r" (fsindex)); 
- 		/* segment register != 0 always requires a reload. 
- 		   also reload when it has changed. 
- 		   when prev process used 64bit base always reload
-@@ -493,7 +493,7 @@ struct task_struct *__switch_to(struct t
- 	}
- 	{ 
- 		unsigned gsindex;
--		asm volatile("movl %%gs,%0" : "=g" (gsindex)); 
-+		asm volatile("movl %%gs,%0" : "=r" (gsindex)); 
- 		if (unlikely(gsindex | next->gsindex | prev->gs)) {
- 			load_gs_index(next->gsindex);
- 			if (gsindex)
---- linux/include/asm-i386/system.h.seg	2005-03-27 13:09:12.000000000 -0800
-+++ linux/include/asm-i386/system.h	2005-03-28 10:28:47.000000000 -0800
-@@ -81,7 +81,7 @@ static inline unsigned long _get_base(ch
- #define loadsegment(seg,value)			\
- 	asm volatile("\n"			\
- 		"1:\t"				\
--		"movl %0,%%" #seg "\n"		\
-+		"mov %0,%%" #seg "\n"		\
- 		"2:\n"				\
- 		".section .fixup,\"ax\"\n"	\
- 		"3:\t"				\
-@@ -93,13 +93,13 @@ static inline unsigned long _get_base(ch
- 		".align 4\n\t"			\
- 		".long 1b,3b\n"			\
- 		".previous"			\
--		: :"m" (*(unsigned int *)&(value)))
-+		: :"m" (value))
- 
- /*
-  * Save a segment register away
-  */
- #define savesegment(seg, value) \
--	asm volatile("movl %%" #seg ",%0":"=m" (*(int *)&(value)))
-+	asm volatile("mov %%" #seg ",%0":"=m" (value))
- 
- /*
-  * Clear and set 'TS' bit respectively
diff --git a/lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch b/lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch
deleted file mode 100644
index 3b467956e900857419fd1e60764d3eab2b43f2e4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/linux-2.6.9-ext3-sub-second-timestamp.patch
+++ /dev/null
@@ -1,631 +0,0 @@
-Index: linux-2.6.10/drivers/char/qtronix.c
-===================================================================
---- linux-2.6.10.orig/drivers/char/qtronix.c	2004-12-24 14:35:50.000000000 -0700
-+++ linux-2.6.10/drivers/char/qtronix.c	2006-01-03 16:16:52.000000000 -0700
-@@ -537,7 +537,7 @@
- 		i--;
- 	}
- 	if (count-i) {
--		file->f_dentry->d_inode->i_atime = CURRENT_TIME;
-+		file->f_dentry->d_inode->i_atime = current_fs_time(inode->i_sb);
- 		return count-i;
- 	}
- 	if (signal_pending(current))
-Index: linux-2.6.10/drivers/char/random.c
-===================================================================
---- linux-2.6.10.orig/drivers/char/random.c	2005-04-06 09:38:33.000000000 -0600
-+++ linux-2.6.10/drivers/char/random.c	2006-01-03 16:16:52.000000000 -0700
-@@ -1743,8 +1743,9 @@
- 	if (p == buffer) {
- 		return (ssize_t)ret;
- 	} else {
--		file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
--		mark_inode_dirty(file->f_dentry->d_inode);
-+		struct inode *inode = file->f_dentry->d_inode;
-+	        inode->i_mtime = current_fs_time(inode->i_sb);
-+		mark_inode_dirty(inode);
- 		return (ssize_t)(p - buffer);
- 	}
- }
-Index: linux-2.6.10/drivers/char/sonypi.c
-===================================================================
---- linux-2.6.10.orig/drivers/char/sonypi.c	2004-12-24 14:35:23.000000000 -0700
-+++ linux-2.6.10/drivers/char/sonypi.c	2006-01-03 16:18:31.000000000 -0700
-@@ -537,7 +537,8 @@
- 	}
- 
- 	if (ret > 0)
--		file->f_dentry->d_inode->i_atime = CURRENT_TIME;
-+		struct inode *inode = file->f_dentry->d_inode;
-+		inode->i_atime = current_fs_time(inode->i_sb);
- 
- 	return ret;
- }
-Index: linux-2.6.10/drivers/char/tty_io.c
-===================================================================
---- linux-2.6.10.orig/drivers/char/tty_io.c	2005-04-06 09:38:33.000000000 -0600
-+++ linux-2.6.10/drivers/char/tty_io.c	2006-01-03 16:16:52.000000000 -0700
-@@ -1018,7 +1018,7 @@
- 	tty_ldisc_deref(ld);
- 	unlock_kernel();
- 	if (i > 0)
--		inode->i_atime = CURRENT_TIME;
-+		inode->i_atime = current_fs_time(inode->i_sb);
- 	return i;
- }
- 
-@@ -1095,7 +1095,8 @@
- 		cond_resched();
- 	}
- 	if (written) {
--		file->f_dentry->d_inode->i_mtime = CURRENT_TIME;
-+		struct inode *inode = file->f_dentry->d_inode;
-+		inode->i_mtime = current_fs_time(inode->i_sb);
- 		ret = written;
- 	}
- 	up(&tty->atomic_write);
-Index: linux-2.6.10/fs/attr.c
-===================================================================
---- linux-2.6.10.orig/fs/attr.c	2004-12-24 14:34:00.000000000 -0700
-+++ linux-2.6.10/fs/attr.c	2006-01-03 16:16:52.000000000 -0700
-@@ -14,6 +14,7 @@
- #include <linux/fcntl.h>
- #include <linux/quotaops.h>
- #include <linux/security.h>
-+#include <linux/time.h>
- 
- /* Taken over from the old code... */
- 
-@@ -87,11 +88,14 @@
- 	if (ia_valid & ATTR_GID)
- 		inode->i_gid = attr->ia_gid;
- 	if (ia_valid & ATTR_ATIME)
--		inode->i_atime = attr->ia_atime;
-+		inode->i_atime = timespec_trunc(attr->ia_atime,
-+						get_sb_time_gran(inode->i_sb));
- 	if (ia_valid & ATTR_MTIME)
--		inode->i_mtime = attr->ia_mtime;
-+		inode->i_mtime = timespec_trunc(attr->ia_mtime,
-+						get_sb_time_gran(inode->i_sb));
- 	if (ia_valid & ATTR_CTIME)
--		inode->i_ctime = attr->ia_ctime;
-+		inode->i_ctime = timespec_trunc(attr->ia_ctime,
-+						get_sb_time_gran(inode->i_sb));
- 	if (ia_valid & ATTR_MODE) {
- 		umode_t mode = attr->ia_mode;
- 
-@@ -131,14 +135,17 @@
- int notify_change(struct dentry * dentry, struct iattr * attr)
- {
- 	struct inode *inode = dentry->d_inode;
--	mode_t mode = inode->i_mode;
-+	mode_t mode;
- 	int error;
--	struct timespec now = CURRENT_TIME;
-+	struct timespec now;
- 	unsigned int ia_valid = attr->ia_valid;
- 
- 	if (!inode)
- 		BUG();
- 
-+	mode = inode->i_mode;
-+	now = current_fs_time(inode->i_sb);
-+
- 	attr->ia_ctime = now;
- 	if (!(ia_valid & ATTR_ATIME_SET))
- 		attr->ia_atime = now;
-Index: linux-2.6.10/fs/bad_inode.c
-===================================================================
---- linux-2.6.10.orig/fs/bad_inode.c	2004-12-24 14:35:50.000000000 -0700
-+++ linux-2.6.10/fs/bad_inode.c	2006-01-03 16:16:52.000000000 -0700
-@@ -105,7 +105,8 @@
- 	remove_inode_hash(inode);
- 
- 	inode->i_mode = S_IFREG;
--	inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_atime = inode->i_mtime = inode->i_ctime = 
-+		current_fs_time(inode->i_sb);
- 	inode->i_op = &bad_inode_ops;	
- 	inode->i_fop = &bad_file_ops;	
- }
-Index: linux-2.6.10/fs/binfmt_misc.c
-===================================================================
---- linux-2.6.10.orig/fs/binfmt_misc.c	2004-12-24 14:34:31.000000000 -0700
-+++ linux-2.6.10/fs/binfmt_misc.c	2006-01-03 16:16:52.000000000 -0700
-@@ -509,7 +509,8 @@
- 		inode->i_gid = 0;
- 		inode->i_blksize = PAGE_CACHE_SIZE;
- 		inode->i_blocks = 0;
--		inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-+		inode->i_atime = inode->i_mtime = inode->i_ctime =
-+			current_fs_time(inode->i_sb);
- 	}
- 	return inode;
- }
-Index: linux-2.6.10/fs/ext2/dir.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/dir.c	2004-12-24 14:34:58.000000000 -0700
-+++ linux-2.6.10/fs/ext2/dir.c	2006-01-03 16:16:52.000000000 -0700
-@@ -426,7 +426,7 @@
- 	ext2_set_de_type (de, inode);
- 	err = ext2_commit_chunk(page, from, to);
- 	ext2_put_page(page);
--	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
-+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
- 	EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
- 	mark_inode_dirty(dir);
- }
-@@ -516,7 +516,7 @@
- 	de->inode = cpu_to_le32(inode->i_ino);
- 	ext2_set_de_type (de, inode);
- 	err = ext2_commit_chunk(page, from, to);
--	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
-+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
- 	EXT2_I(dir)->i_flags &= ~EXT2_BTREE_FL;
- 	mark_inode_dirty(dir);
- 	/* OFFSET_CACHE */
-@@ -564,7 +564,7 @@
- 		pde->rec_len = cpu_to_le16(to-from);
- 	dir->inode = 0;
- 	err = ext2_commit_chunk(page, from, to);
--	inode->i_ctime = inode->i_mtime = CURRENT_TIME;
-+	inode->i_ctime = inode->i_mtime = CURRENT_TIME_SEC;
- 	EXT2_I(inode)->i_flags &= ~EXT2_BTREE_FL;
- 	mark_inode_dirty(inode);
- out:
-Index: linux-2.6.10/fs/ext2/ialloc.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/ialloc.c	2004-12-24 14:34:47.000000000 -0700
-+++ linux-2.6.10/fs/ext2/ialloc.c	2006-01-03 16:16:52.000000000 -0700
-@@ -577,7 +577,7 @@
- 	inode->i_ino = ino;
- 	inode->i_blksize = PAGE_SIZE;	/* This is the optimal IO size (for stat), not the fs block size */
- 	inode->i_blocks = 0;
--	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
- 	memset(ei->i_data, 0, sizeof(ei->i_data));
- 	ei->i_flags = EXT2_I(dir)->i_flags & ~EXT2_BTREE_FL;
- 	if (S_ISLNK(mode))
-Index: linux-2.6.10/fs/ext2/inode.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/inode.c	2004-12-24 14:33:51.000000000 -0700
-+++ linux-2.6.10/fs/ext2/inode.c	2006-01-03 16:16:52.000000000 -0700
-@@ -493,7 +493,7 @@
- 
- 	/* We are done with atomic stuff, now do the rest of housekeeping */
- 
--	inode->i_ctime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME_SEC;
- 
- 	/* had we spliced it onto indirect block? */
- 	if (where->bh)
-@@ -953,7 +953,7 @@
- 		case EXT2_TIND_BLOCK:
- 			;
- 	}
--	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
- 	if (inode_needs_sync(inode)) {
- 		sync_mapping_buffers(inode->i_mapping);
- 		ext2_sync_inode (inode);
-Index: linux-2.6.10/fs/ext2/ioctl.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/ioctl.c	2004-12-24 14:35:49.000000000 -0700
-+++ linux-2.6.10/fs/ext2/ioctl.c	2006-01-03 16:16:52.000000000 -0700
-@@ -59,7 +59,7 @@
- 		ei->i_flags = flags;
- 
- 		ext2_set_inode_flags(inode);
--		inode->i_ctime = CURRENT_TIME;
-+		inode->i_ctime = CURRENT_TIME_SEC;
- 		mark_inode_dirty(inode);
- 		return 0;
- 	}
-@@ -72,7 +72,7 @@
- 			return -EROFS;
- 		if (get_user(inode->i_generation, (int __user *) arg))
- 			return -EFAULT;	
--		inode->i_ctime = CURRENT_TIME;
-+		inode->i_ctime = CURRENT_TIME_SEC;
- 		mark_inode_dirty(inode);
- 		return 0;
- 	default:
-Index: linux-2.6.10/fs/ext2/namei.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/namei.c	2004-12-24 14:35:25.000000000 -0700
-+++ linux-2.6.10/fs/ext2/namei.c	2006-01-03 16:16:52.000000000 -0700
-@@ -211,7 +211,7 @@
- 	if (inode->i_nlink >= EXT2_LINK_MAX)
- 		return -EMLINK;
- 
--	inode->i_ctime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME_SEC;
- 	ext2_inc_count(inode);
- 	atomic_inc(&inode->i_count);
- 
-@@ -337,7 +337,7 @@
- 			goto out_dir;
- 		ext2_inc_count(old_inode);
- 		ext2_set_link(new_dir, new_de, new_page, old_inode);
--		new_inode->i_ctime = CURRENT_TIME;
-+		new_inode->i_ctime = CURRENT_TIME_SEC;
- 		if (dir_de)
- 			new_inode->i_nlink--;
- 		ext2_dec_count(new_inode);
-@@ -362,7 +362,7 @@
-  	 * rename.
- 	 * ext2_dec_count() will mark the inode dirty.
- 	 */
--	old_inode->i_ctime = CURRENT_TIME;
-+	old_inode->i_ctime = CURRENT_TIME_SEC;
- 
- 	ext2_delete_entry (old_de, old_page);
- 	ext2_dec_count(old_inode);
-Index: linux-2.6.10/fs/ext2/super.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/super.c	2004-12-24 14:35:01.000000000 -0700
-+++ linux-2.6.10/fs/ext2/super.c	2006-01-03 16:19:06.000000000 -0700
-@@ -595,7 +595,7 @@
- 	es = (struct ext2_super_block *) (((char *)bh->b_data) + offset);
- 	sbi->s_es = es;
- 	sb->s_magic = le16_to_cpu(es->s_magic);
--	sb->s_flags |= MS_ONE_SECOND;
-+	set_sb_time_gran(sb, 1000000000U);
- 
- 	if (sb->s_magic != EXT2_SUPER_MAGIC)
- 		goto cantfind_ext2;
-Index: linux-2.6.10/fs/ext2/xattr.c
-===================================================================
---- linux-2.6.10.orig/fs/ext2/xattr.c	2005-04-06 09:38:35.000000000 -0600
-+++ linux-2.6.10/fs/ext2/xattr.c	2006-01-03 16:16:52.000000000 -0700
-@@ -702,7 +702,7 @@
- 
- 	/* Update the inode. */
- 	EXT2_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
--	inode->i_ctime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME_SEC;
- 	if (IS_SYNC(inode)) {
- 		error = ext2_sync_inode (inode);
- 		if (error)
-Index: linux-2.6.10/fs/ext3/ialloc.c
-===================================================================
---- linux-2.6.10.orig/fs/ext3/ialloc.c	2004-12-24 14:34:45.000000000 -0700
-+++ linux-2.6.10/fs/ext3/ialloc.c	2006-01-03 16:16:52.000000000 -0700
-@@ -558,7 +558,7 @@
- 	/* This is the optimal IO size (for stat), not the fs block size */
- 	inode->i_blksize = PAGE_SIZE;
- 	inode->i_blocks = 0;
--	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME_SEC;
- 
- 	memset(ei->i_data, 0, sizeof(ei->i_data));
- 	ei->i_next_alloc_block = 0;
-Index: linux-2.6.10/fs/ext3/inode.c
-===================================================================
---- linux-2.6.10.orig/fs/ext3/inode.c	2005-04-06 09:38:35.000000000 -0600
-+++ linux-2.6.10/fs/ext3/inode.c	2006-01-03 16:16:52.000000000 -0700
-@@ -626,7 +626,7 @@
- 
- 	/* We are done with atomic stuff, now do the rest of housekeeping */
- 
--	inode->i_ctime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* had we spliced it onto indirect block? */
-@@ -2199,7 +2199,7 @@
- 			;
- 	}
- 	up(&ei->truncate_sem);
--	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-+	inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
- 
- 	/* In a multi-transaction truncate, we only make the final
-Index: linux-2.6.10/fs/ext3/ioctl.c
-===================================================================
---- linux-2.6.10.orig/fs/ext3/ioctl.c	2004-12-24 14:34:31.000000000 -0700
-+++ linux-2.6.10/fs/ext3/ioctl.c	2006-01-03 16:16:52.000000000 -0700
-@@ -87,7 +87,7 @@
- 		ei->i_flags = flags;
- 
- 		ext3_set_inode_flags(inode);
--		inode->i_ctime = CURRENT_TIME;
-+		inode->i_ctime = CURRENT_TIME_SEC;
- 
- 		err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- flags_err:
-@@ -121,7 +121,7 @@
- 			return PTR_ERR(handle);
- 		err = ext3_reserve_inode_write(handle, inode, &iloc);
- 		if (err == 0) {
--			inode->i_ctime = CURRENT_TIME;
-+			inode->i_ctime = CURRENT_TIME_SEC;
- 			inode->i_generation = generation;
- 			err = ext3_mark_iloc_dirty(handle, inode, &iloc);
- 		}
-Index: linux-2.6.10/fs/ext3/namei.c
-===================================================================
---- linux-2.6.10.orig/fs/ext3/namei.c	2004-12-24 14:34:58.000000000 -0700
-+++ linux-2.6.10/fs/ext3/namei.c	2006-01-03 16:16:52.000000000 -0700
-@@ -1251,7 +1251,7 @@
- 	 * happen is that the times are slightly out of date
- 	 * and/or different from the directory change time.
- 	 */
--	dir->i_mtime = dir->i_ctime = CURRENT_TIME;
-+	dir->i_mtime = dir->i_ctime = CURRENT_TIME_SEC;
- 	ext3_update_dx_flag(dir);
- 	dir->i_version++;
- 	ext3_mark_inode_dirty(handle, dir);
-@@ -2029,7 +2029,7 @@
- 	 * recovery. */
- 	inode->i_size = 0;
- 	ext3_orphan_add(handle, inode);
--	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
-+	inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
- 	dir->i_nlink--;
- 	ext3_update_dx_flag(dir);
-@@ -2079,7 +2079,7 @@
- 	retval = ext3_delete_entry(handle, dir, de, bh);
- 	if (retval)
- 		goto end_unlink;
--	dir->i_ctime = dir->i_mtime = CURRENT_TIME;
-+	dir->i_ctime = dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_update_dx_flag(dir);
- 	ext3_mark_inode_dirty(handle, dir);
- 	inode->i_nlink--;
-@@ -2169,7 +2169,7 @@
- 	if (IS_DIRSYNC(dir))
- 		handle->h_sync = 1;
- 
--	inode->i_ctime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME_SEC;
- 	ext3_inc_count(handle, inode);
- 	atomic_inc(&inode->i_count);
- 
-@@ -2270,7 +2270,7 @@
- 	 * Like most other Unix systems, set the ctime for inodes on a
- 	 * rename.
- 	 */
--	old_inode->i_ctime = CURRENT_TIME;
-+	old_inode->i_ctime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, old_inode);
- 
- 	/*
-@@ -2303,9 +2303,9 @@
- 
- 	if (new_inode) {
- 		new_inode->i_nlink--;
--		new_inode->i_ctime = CURRENT_TIME;
-+		new_inode->i_ctime = CURRENT_TIME_SEC;
- 	}
--	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME;
-+	old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME_SEC;
- 	ext3_update_dx_flag(old_dir);
- 	if (dir_bh) {
- 		BUFFER_TRACE(dir_bh, "get_write_access");
-Index: linux-2.6.10/fs/ext3/super.c
-===================================================================
---- linux-2.6.10.orig/fs/ext3/super.c	2005-04-06 09:38:35.000000000 -0600
-+++ linux-2.6.10/fs/ext3/super.c	2006-01-03 16:16:52.000000000 -0700
-@@ -1318,7 +1318,7 @@
- 	if (!parse_options ((char *) data, sb, &journal_inum, NULL, 0))
- 		goto failed_mount;
- 
--	sb->s_flags |= MS_ONE_SECOND;
-+	set_sb_time_gran(sb, 1000000000U);
- 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
- 		((sbi->s_mount_opt & EXT3_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
- 
-Index: linux-2.6.10/fs/ext3/xattr.c
-===================================================================
---- linux-2.6.10.orig/fs/ext3/xattr.c	2005-04-06 09:38:35.000000000 -0600
-+++ linux-2.6.10/fs/ext3/xattr.c	2006-01-03 16:16:52.000000000 -0700
-@@ -723,7 +723,7 @@
- 
- 	/* Update the inode. */
- 	EXT3_I(inode)->i_file_acl = new_bh ? new_bh->b_blocknr : 0;
--	inode->i_ctime = CURRENT_TIME;
-+	inode->i_ctime = CURRENT_TIME_SEC;
- 	ext3_mark_inode_dirty(handle, inode);
- 	if (IS_SYNC(inode))
- 		handle->h_sync = 1;
-Index: linux-2.6.10/fs/inode.c
-===================================================================
---- linux-2.6.10.orig/fs/inode.c	2006-01-03 15:33:21.000000000 -0700
-+++ linux-2.6.10/fs/inode.c	2006-01-03 16:16:52.000000000 -0700
-@@ -1131,19 +1131,6 @@
- 
- EXPORT_SYMBOL(bmap);
- 
--/*
-- * Return true if the filesystem which backs this inode considers the two
-- * passed timespecs to be sufficiently different to warrant flushing the
-- * altered time out to disk.
-- */
--static int inode_times_differ(struct inode *inode,
--			struct timespec *old, struct timespec *new)
--{
--	if (IS_ONE_SECOND(inode))
--		return old->tv_sec != new->tv_sec;
--	return !timespec_equal(old, new);
--}
--
- /**
-  *	update_atime	-	update the access time
-  *	@inode: inode accessed
-@@ -1163,8 +1150,8 @@
- 	if (IS_RDONLY(inode))
- 		return;
- 
--	now = current_kernel_time();
--	if (inode_times_differ(inode, &inode->i_atime, &now)) {
-+	now = current_fs_time(inode->i_sb);
-+	if (!timespec_equal(&inode->i_atime, &now)) {
- 		inode->i_atime = now;
- 		mark_inode_dirty_sync(inode);
- 	} else {
-@@ -1194,14 +1181,13 @@
- 	if (IS_RDONLY(inode))
- 		return;
- 
--	now = current_kernel_time();
--
--	if (inode_times_differ(inode, &inode->i_mtime, &now))
-+	now = current_fs_time(inode->i_sb);
-+	if (!timespec_equal(&inode->i_mtime, &now))
- 		sync_it = 1;
- 	inode->i_mtime = now;
- 
- 	if (ctime_too) {
--		if (inode_times_differ(inode, &inode->i_ctime, &now))
-+		if (!timespec_equal(&inode->i_ctime, &now))
- 			sync_it = 1;
- 		inode->i_ctime = now;
- 	}
-Index: linux-2.6.10/fs/locks.c
-===================================================================
---- linux-2.6.10.orig/fs/locks.c	2004-12-24 14:35:28.000000000 -0700
-+++ linux-2.6.10/fs/locks.c	2006-01-03 16:16:52.000000000 -0700
-@@ -1228,7 +1228,7 @@
- {
- 	struct file_lock *flock = inode->i_flock;
- 	if (flock && IS_LEASE(flock) && (flock->fl_type & F_WRLCK))
--		*time = CURRENT_TIME;
-+		*time = current_fs_time(inode->i_sb);
- 	else
- 		*time = inode->i_mtime;
- }
-Index: linux-2.6.10/include/linux/fs.h
-===================================================================
---- linux-2.6.10.orig/include/linux/fs.h	2006-01-03 16:04:26.000000000 -0700
-+++ linux-2.6.10/include/linux/fs.h	2006-01-03 16:16:52.000000000 -0700
-@@ -124,7 +124,8 @@
- #define MS_REC		16384
- #define MS_VERBOSE	32768
- #define MS_POSIXACL	(1<<16)	/* VFS does not apply the umask */
--#define MS_ONE_SECOND	(1<<17)	/* fs has 1 sec a/m/ctime resolution */
-+#define MS_ONE_SECOND	(1<<17)	/* fs has 1 sec time resolution (obsolete) */
-+#define MS_TIME_GRAN	(1<<18)	/* fs has s_time_gran field */
- #define MS_ACTIVE	(1<<30)
- #define MS_NOUSER	(1<<31)
- 
-@@ -803,8 +804,33 @@
- 	 * even looking at it. You had been warned.
- 	 */
- 	struct semaphore s_vfs_rename_sem;	/* Kludge */
-+
-+	/* Granuality of c/m/atime in ns.
-+	   Cannot be worse than a second */
-+#ifndef __GENKSYMS__
-+	u32		   s_time_gran;
-+#endif
- };
- 
-+extern struct timespec current_fs_time(struct super_block *sb);
-+
-+static inline u32 get_sb_time_gran(struct super_block *sb) 
-+{
-+	if (sb->s_flags & MS_TIME_GRAN) 
-+		return sb->s_time_gran;
-+	if (sb->s_flags & MS_ONE_SECOND)
-+		return 1000000000U;
-+	return 1;
-+}
-+
-+static inline void set_sb_time_gran(struct super_block *sb, u32 time_gran)
-+{
-+	sb->s_time_gran = time_gran;
-+	sb->s_flags |= MS_TIME_GRAN;
-+	if (time_gran == 1000000000U)
-+		sb->s_flags |= MS_ONE_SECOND;
-+}
-+
- /*
-  * Snapshotting support.
-  */
-Index: linux-2.6.10/include/linux/time.h
-===================================================================
---- linux-2.6.10.orig/include/linux/time.h	2004-12-24 14:35:00.000000000 -0700
-+++ linux-2.6.10/include/linux/time.h	2006-01-03 16:16:52.000000000 -0700
-@@ -90,6 +90,7 @@
- struct timespec current_kernel_time(void);
- 
- #define CURRENT_TIME (current_kernel_time())
-+#define CURRENT_TIME_SEC ((struct timespec) { xtime.tv_sec, 0 })
- 
- extern void do_gettimeofday(struct timeval *tv);
- extern int do_settimeofday(struct timespec *tv);
-@@ -103,6 +104,8 @@
- extern int do_getitimer(int which, struct itimerval *value);
- extern void getnstimeofday (struct timespec *tv);
- 
-+extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
-+
- static inline void
- set_normalized_timespec (struct timespec *ts, time_t sec, long nsec)
- {
-Index: linux-2.6.10/kernel/time.c
-===================================================================
---- linux-2.6.10.orig/kernel/time.c	2004-12-24 14:34:26.000000000 -0700
-+++ linux-2.6.10/kernel/time.c	2006-01-03 16:16:52.000000000 -0700
-@@ -36,6 +36,7 @@
- 
- #include <asm/uaccess.h>
- #include <asm/unistd.h>
-+#include <linux/fs.h>
- 
- /* 
-  * The timezone where the local system is located.  Used as a default by some
-@@ -433,6 +434,50 @@
- 
- EXPORT_SYMBOL(current_kernel_time);
- 
-+/**
-+ * current_fs_time - Return FS time
-+ * @sb: Superblock.
-+ *
-+ * Return the current time truncated to the time granuality supported by
-+ * the fs.
-+ */
-+struct timespec current_fs_time(struct super_block *sb)
-+{
-+	struct timespec now = current_kernel_time();
-+	return timespec_trunc(now, get_sb_time_gran(sb));
-+}
-+EXPORT_SYMBOL(current_fs_time);
-+
-+/**
-+ * timespec_trunc - Truncate timespec to a granuality
-+ * @t: Timespec
-+ * @gran: Granuality in ns.
-+ *
-+ * Truncate a timespec to a granuality. gran must be smaller than a second.
-+ * Always rounds down.
-+ *
-+ * This function should be only used for timestamps returned by
-+ * current_kernel_time() or CURRENT_TIME, not with do_gettimeofday() because
-+ * it doesn't handle the better resolution of the later.
-+ */
-+struct timespec timespec_trunc(struct timespec t, unsigned gran)
-+{
-+	/*
-+	 * Division is pretty slow so avoid it for common cases.
-+	 * Currently current_kernel_time() never returns better than
-+	 * jiffies resolution. Exploit that.
-+	 */
-+	if (gran <= jiffies_to_usecs(1) * 1000) {
-+		/* nothing */
-+	} else if (gran == 1000000000) {
-+		t.tv_nsec = 0;
-+	} else {
-+		t.tv_nsec -= t.tv_nsec % gran;
-+	}
-+	return t;
-+}
-+EXPORT_SYMBOL(timespec_trunc);
-+
- #ifdef CONFIG_TIME_INTERPOLATION
- void getnstimeofday (struct timespec *tv)
- {
diff --git a/lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch
deleted file mode 100644
index 287ed9051406c9c4a12d1c0a926686fa0f676859..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/lookup_bdev_init_intent-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.7/fs/block_dev.c
-===================================================================
---- linux-2.6.7.orig/fs/block_dev.c	2004-06-16 13:20:26.000000000 +0800
-+++ linux-2.6.7/fs/block_dev.c	2004-08-30 17:36:57.000000000 +0800
-@@ -832,6 +832,7 @@
- 	if (!path || !*path)
- 		return ERR_PTR(-EINVAL);
- 
-+	intent_init(&nd.intent.open, IT_LOOKUP);
- 	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
- 	if (error)
- 		return ERR_PTR(error);
diff --git a/lustre/kernel_patches/patches/lookup_bdev_init_intent.patch b/lustre/kernel_patches/patches/lookup_bdev_init_intent.patch
deleted file mode 100644
index 5555427f91f42c9f281fb77f1ec5da0527461dbd..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/lookup_bdev_init_intent.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: linux-2.6.7/fs/block_dev.c
-===================================================================
---- linux-2.6.7.orig/fs/block_dev.c	2004-06-16 13:20:26.000000000 +0800
-+++ linux-2.6.7/fs/block_dev.c	2004-08-30 17:36:57.000000000 +0800
-@@ -832,6 +832,7 @@
- 	if (!path || !*path)
- 		return ERR_PTR(-EINVAL);
- 
-+	intent_init(&nd.intent, IT_LOOKUP);
- 	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
- 	if (error)
- 		return ERR_PTR(error);
diff --git a/lustre/kernel_patches/patches/lustre-version-revert_suse.patch b/lustre/kernel_patches/patches/lustre-version-revert_suse.patch
deleted file mode 100644
index 7925a8bcbf56563449fe87c1ae7be002d39a001b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/lustre-version-revert_suse.patch
+++ /dev/null
@@ -1,4 +0,0 @@
---- linux/include/linux/lustre_version.h	2005-06-28 12:24:04.000000000 -0400
-+++ /dev/null	2004-06-24 13:56:02.000000000 -0400
-@@ -1 +0,0 @@
--#define LUSTRE_KERNEL_VERSION 39
diff --git a/lustre/kernel_patches/patches/lustre_version.patch b/lustre/kernel_patches/patches/lustre_version.patch
deleted file mode 100644
index d01f9721ac7992cc0161b2d4e9379e8c1c956aca..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/lustre_version.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-Version 47: allow the ext3_map_inode_page() created param to be NULL
-Version 46: Separate ->fs_private in struct file
-Version 45: more robust and general dev_read_only for failover (b=4834)  
-Version 44: fix link_path_walk_it() oops creating .foo in deleted "." (b=5548)
-Version 43: fix remove_suid to not crash 2.6, and do anything on 2.4 (b=5695)
-Version 42: export show_task()
-Version 41: revalidate should check working dir is a directory (b=4134)
-Version 40: >32000 subdirectories support for ext3 (b=3244)
-Version 39: add EXPORT_SYMBOL(smp_num_siblings) to vanilla-2.4.24 (b=3966)
-            eebperf (unfragmented 1MB write/read support)
-            48-bit physical block support for extents
-Version 38: drop dentry ref in ext3_add_link from open_connect_dentry (b=3266)
-Version 37: fix htree rename-within-same-dir (b=3417), endianness (b=2447)
-Version 36: don't dput dentry after error (b=2350), zero page->private (3119)
-Version 35: pass intent to real_lookup after revalidate failure (b=3285)
-Version 34: ext3 iopen assertion (b=2517), operations on deleted "." (b=2399)
-
- include/linux/lustre_version.h |    1 +
- 1 files changed, 1 insertion(+)
-
---- /dev/null	Fri Aug 30 17:31:37 2002
-+++ linux-2.4.18-18.8.0-l12-braam/include/linux/lustre_version.h	Thu Feb 13 07:58:33 2003
-@@ -0,0 +1 @@
-+#define LUSTRE_KERNEL_VERSION 47
-
-_
diff --git a/lustre/kernel_patches/patches/md-rebuild-policy.patch b/lustre/kernel_patches/patches/md-rebuild-policy.patch
deleted file mode 100644
index e6c9f9cdb9fb06668d2947e763a17aa9ed509698..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/md-rebuild-policy.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-diff -pur linux-2.6.18-53.orig/drivers/md/md.c linux-2.6.18-53/drivers/md/md.c
---- linux-2.6.18-53.orig/drivers/md/md.c	2008-02-13 17:34:25.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/md.c	2008-02-13 17:39:28.000000000 +0800
-@@ -90,6 +90,8 @@ static void md_print_devices(void);
- 
- static int sysctl_speed_limit_min = 1000;
- static int sysctl_speed_limit_max = 200000;
-+static int sysctl_rebuild_window_size = 256;
-+static int sysctl_disk_idle_size = 4096;
- static inline int speed_min(mddev_t *mddev)
- {
- 	return mddev->sync_speed_min ?
-@@ -121,6 +123,22 @@ static ctl_table raid_table[] = {
- 		.mode		= S_IRUGO|S_IWUSR,
- 		.proc_handler	= &proc_dointvec,
- 	},
-+	{
-+		.ctl_name	= DEV_RAID_REBUILD_WINDOW,
-+		.procname	= "rebuild_window_size",
-+		.data		= &sysctl_rebuild_window_size,
-+		.maxlen		= sizeof(int),
-+		.mode		= S_IRUGO|S_IWUSR,
-+		.proc_handler	= &proc_dointvec,
-+	},
-+	{
-+		.ctl_name	= DEV_RAID_DISK_IDLE_SIZE,
-+		.procname	= "disk_idle_size",
-+		.data		= &sysctl_disk_idle_size,
-+		.maxlen		= sizeof(int),
-+		.mode		= S_IRUGO|S_IWUSR,
-+		.proc_handler	= &proc_dointvec,
-+	},
- 	{ .ctl_name = 0 }
- };
- 
-@@ -4980,14 +4998,15 @@ static int is_mddev_idle(mddev_t *mddev)
- 	mdk_rdev_t * rdev;
- 	struct list_head *tmp;
- 	int idle;
--	unsigned long curr_events;
-+	unsigned long rw, sync;
- 
- 	idle = 1;
- 	ITERATE_RDEV(mddev,rdev,tmp) {
- 		struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
--		curr_events = disk_stat_read(disk, sectors[0]) + 
--				disk_stat_read(disk, sectors[1]) - 
--				atomic_read(&disk->sync_io);
-+
-+		rw = disk_stat_read(disk, sectors[READ])+disk_stat_read(disk, sectors[WRITE]);
-+		sync = atomic_read(&disk->sync_io);
-+
- 		/* The difference between curr_events and last_events
- 		 * will be affected by any new non-sync IO (making
- 		 * curr_events bigger) and any difference in the amount of
-@@ -5001,9 +5020,9 @@ static int is_mddev_idle(mddev_t *mddev)
- 		 *
- 		 * Note: the following is an unsigned comparison.
- 		 */
--		if ((curr_events - rdev->last_events + 4096) > 8192) {
--			rdev->last_events = curr_events;
-+		if (rw - rdev->last_events > sync + sysctl_disk_idle_size) {
- 			idle = 0;
-+			rdev->last_events = rw - sync;
- 		}
- 	}
- 	return idle;
-@@ -5069,8 +5088,7 @@ static DECLARE_WAIT_QUEUE_HEAD(resync_wa
- void md_do_sync(mddev_t *mddev)
- {
- 	mddev_t *mddev2;
--	unsigned int currspeed = 0,
--		 window;
-+	unsigned int currspeed = 0;
- 	sector_t max_sectors,j, io_sectors;
- 	unsigned long mark[SYNC_MARKS];
- 	sector_t mark_cnt[SYNC_MARKS];
-@@ -5190,9 +5208,8 @@ void md_do_sync(mddev_t *mddev)
- 	/*
- 	 * Tune reconstruction:
- 	 */
--	window = 32*(PAGE_SIZE/512);
- 	printk(KERN_INFO "md: using %dk window, over a total of %llu blocks.\n",
--		window/2,(unsigned long long) max_sectors/2);
-+		sysctl_rebuild_window_size/2,(unsigned long long) max_sectors/2);
- 
- 	atomic_set(&mddev->recovery_active, 0);
- 	init_waitqueue_head(&mddev->recovery_wait);
-@@ -5230,7 +5247,7 @@ void md_do_sync(mddev_t *mddev)
- 			 */
- 			md_new_event(mddev);
- 
--		if (last_check + window > io_sectors || j == max_sectors)
-+		if (last_check + sysctl_rebuild_window_size > io_sectors || j == max_sectors)
- 			continue;
- 
- 		last_check = io_sectors;
-@@ -5251,7 +5268,6 @@ void md_do_sync(mddev_t *mddev)
- 			last_mark = next;
- 		}
- 
--
- 		if (kthread_should_stop()) {
- 			/*
- 			 * got a signal, exit.
-@@ -5275,10 +5291,16 @@ void md_do_sync(mddev_t *mddev)
- 
- 		currspeed = ((unsigned long)(io_sectors-mddev->resync_mark_cnt))/2
- 			/((jiffies-mddev->resync_mark)/HZ +1) +1;
--
- 		if (currspeed > speed_min(mddev)) {
- 			if ((currspeed > speed_max(mddev)) ||
- 					!is_mddev_idle(mddev)) {
-+				static unsigned long next_report;
-+				if (time_after(jiffies, next_report)) {
-+					printk(KERN_INFO "md: rebuild %s throttled due to IO\n",
-+						mdname(mddev));
-+					/* once per 10 minutes */
-+					next_report = jiffies + 600 * HZ;
-+				}
- 				msleep(500);
- 				goto repeat;
- 			}
-diff -pur linux-2.6.18-53.orig/include/linux/sysctl.h linux-2.6.18-53/include/linux/sysctl.h
---- linux-2.6.18-53.orig/include/linux/sysctl.h	2008-02-13 17:35:25.000000000 +0800
-+++ linux-2.6.18-53/include/linux/sysctl.h	2008-02-13 17:36:22.000000000 +0800
-@@ -903,7 +903,9 @@ enum {
- /* /proc/sys/dev/raid */
- enum {
- 	DEV_RAID_SPEED_LIMIT_MIN=1,
--	DEV_RAID_SPEED_LIMIT_MAX=2
-+	DEV_RAID_SPEED_LIMIT_MAX=2,
-+	DEV_RAID_REBUILD_WINDOW=3,
-+	DEV_RAID_DISK_IDLE_SIZE=4
- };
- 
- /* /proc/sys/dev/parport/default */
diff --git a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse b/lustre/kernel_patches/patches/md_path_lookup-2.6-suse
deleted file mode 100644
index 4e2b66d8727467b4aa41a3ec964b2bf4d8068b17..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.4-51.0/drivers/md/dm-path-selector.c
-===================================================================
---- linux-2.6.4-51.0.orig/drivers/md/dm-path-selector.c	2004-04-18 20:10:21.000000000 -0400
-+++ linux-2.6.4-51.0/drivers/md/dm-path-selector.c	2004-04-18 20:10:59.000000000 -0400
-@@ -129,7 +129,7 @@
- 	struct path *path;
- };
- 
--static struct path_info *path_lookup(struct list_head *head, struct path *p)
-+static struct path_info *md_path_lookup(struct list_head *head, struct path *p)
- {
- 	struct path_info *pi;
- 
-@@ -235,9 +235,9 @@
- 	 * mind the expense of these searches.
- 	 */
- 	spin_lock_irqsave(&s->lock, flags);
--	pi = path_lookup(&s->valid_paths, p);
-+	pi = md_path_lookup(&s->valid_paths, p);
- 	if (!pi)
--		pi = path_lookup(&s->invalid_paths, p);
-+		pi = md_path_lookup(&s->invalid_paths, p);
- 
- 	if (!pi)
- 		DMWARN("asked to change the state of an unknown path");
diff --git a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch b/lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch
deleted file mode 100644
index 4e2b66d8727467b4aa41a3ec964b2bf4d8068b17..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/md_path_lookup-2.6-suse.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Index: linux-2.6.4-51.0/drivers/md/dm-path-selector.c
-===================================================================
---- linux-2.6.4-51.0.orig/drivers/md/dm-path-selector.c	2004-04-18 20:10:21.000000000 -0400
-+++ linux-2.6.4-51.0/drivers/md/dm-path-selector.c	2004-04-18 20:10:59.000000000 -0400
-@@ -129,7 +129,7 @@
- 	struct path *path;
- };
- 
--static struct path_info *path_lookup(struct list_head *head, struct path *p)
-+static struct path_info *md_path_lookup(struct list_head *head, struct path *p)
- {
- 	struct path_info *pi;
- 
-@@ -235,9 +235,9 @@
- 	 * mind the expense of these searches.
- 	 */
- 	spin_lock_irqsave(&s->lock, flags);
--	pi = path_lookup(&s->valid_paths, p);
-+	pi = md_path_lookup(&s->valid_paths, p);
- 	if (!pi)
--		pi = path_lookup(&s->invalid_paths, p);
-+		pi = md_path_lookup(&s->invalid_paths, p);
- 
- 	if (!pi)
- 		DMWARN("asked to change the state of an unknown path");
diff --git a/lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch b/lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch
deleted file mode 100644
index 35bf139dea7e15cb82730ddc3b9dd48a2f446e95..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/modpost_external_module_updates_rhel4.patch
+++ /dev/null
@@ -1,351 +0,0 @@
-This patch updates the RHEL 4 module build system to properly support
-dependencies between external modules, similarly to the way they are
-supported in newer kernels.
-
-Index: linux-2.6.9-55.EL/scripts/Makefile.modpost
-===================================================================
---- linux-2.6.9-55.EL.orig/scripts/Makefile.modpost
-+++ linux-2.6.9-55.EL/scripts/Makefile.modpost
-@@ -38,7 +38,8 @@ _modpost: __modpost
- include .config
- include scripts/Makefile.lib
- 
--symverfile := $(objtree)/Module.symvers
-+kernelsymfile := $(objtree)/Module.symvers
-+modulesymfile := $(KBUILD_EXTMOD)/Module.symvers
- 
- # Step 1), find all modules listed in $(MODVERDIR)/
- __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod)))
-@@ -52,7 +53,9 @@ _modpost: $(modules)
- quiet_cmd_modpost = MODPOST
-       cmd_modpost = scripts/mod/modpost            \
-         $(if $(CONFIG_MODVERSIONS),-m)             \
--	$(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
-+ 	$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
-+ 	$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
-+ 	$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
- 	$(filter-out FORCE,$^)
- 
- .PHONY: __modpost
-Index: linux-2.6.9-55.EL/scripts/mod/modpost.c
-===================================================================
---- linux-2.6.9-55.EL.orig/scripts/mod/modpost.c
-+++ linux-2.6.9-55.EL/scripts/mod/modpost.c
-@@ -1,7 +1,8 @@
- /* Postprocess module symbol versions
-  *
-  * Copyright 2003       Kai Germaschewski
-- *           2002-2003  Rusty Russell, IBM Corporation
-+ *           2002-2004  Rusty Russell, IBM Corporation
-+ * Copyright 2006       Sam Ravnborg
-  *
-  * Based in part on module-init-tools/depmod.c,file2alias
-  *
-@@ -18,6 +19,8 @@
- int modversions = 0;
- /* Warn about undefined symbols? (do so if we have vmlinux) */
- int have_vmlinux = 0;
-+/* If we are modposting external module set to 1 */
-+static int external_module = 0;
- 
- void
- fatal(const char *fmt, ...)
-@@ -45,6 +48,19 @@ warn(const char *fmt, ...)
- 	va_end(arglist);
- }
- 
-+int
-+is_vmlinux(const char *modname)
-+{
-+	const char *myname;
-+
-+	if ((myname = strrchr(modname, '/')))
-+		myname++;
-+	else
-+		myname = modname;
-+
-+	return strcmp(myname, "vmlinux") == 0;
-+}
-+
- void *do_nofail(void *ptr, const char *file, int line, const char *expr)
- {
- 	if (!ptr) {
-@@ -102,6 +118,10 @@ struct symbol {
- 	struct module *module;
- 	unsigned int crc;
- 	int crc_valid;
-+	unsigned int vmlinux:1;    /* 1 if symbol is defined in vmlinux */
-+	unsigned int kernel:1;     /* 1 if symbol is from kernel
-+				    *  (only for external modules) **/
-+	unsigned int preloaded:1;  /* 1 if symbol from Module.symvers */
- 	char name[0];
- };
- 
-@@ -136,8 +156,8 @@ alloc_symbol(const char *name, struct sy
- 
- /* For the hash of exported symbols */
- 
--void
--new_symbol(const char *name, struct module *module, unsigned int *crc)
-+static struct symbol *
-+new_symbol(const char *name, struct module *module)
- {
- 	unsigned int hash;
- 	struct symbol *new;
-@@ -145,10 +165,7 @@ new_symbol(const char *name, struct modu
- 	hash = tdb_hash(name) % SYMBOL_HASH_SIZE;
- 	new = symbolhash[hash] = alloc_symbol(name, symbolhash[hash]);
- 	new->module = module;
--	if (crc) {
--		new->crc = *crc;
--		new->crc_valid = 1;
--	}
-+	return new;
- }
- 
- struct symbol *
-@@ -169,19 +186,29 @@ find_symbol(const char *name)
- 
- /* Add an exported symbol - it may have already been added without a
-  * CRC, in this case just update the CRC */
--void
--add_exported_symbol(const char *name, struct module *module, unsigned int *crc)
-+static struct symbol *
-+sym_add_exported(const char *name, struct module *mod)
- {
- 	struct symbol *s = find_symbol(name);
- 
- 	if (!s) {
--		new_symbol(name, module, crc);
--		return;
--	}
--	if (crc) {
--		s->crc = *crc;
--		s->crc_valid = 1;
-+		s = new_symbol(name, mod);
- 	}
-+	s->preloaded = 0;
-+	s->vmlinux   = is_vmlinux(mod->name);
-+	s->kernel    = 0;
-+	return s;
-+}
-+
-+static void
-+sym_update_crc(const char *name, struct module *mod, unsigned int crc)
-+{
-+	struct symbol *s = find_symbol(name);
-+
-+	if (!s)
-+		s = new_symbol(name, mod);
-+	s->crc = crc;
-+	s->crc_valid = 1;
- }
- 
- void *
-@@ -341,13 +368,13 @@ handle_modversions(struct module *mod, s
- 		/* CRC'd symbol */
- 		if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
- 			crc = (unsigned int) sym->st_value;
--			add_exported_symbol(symname + strlen(CRC_PFX),
--					    mod, &crc);
-+			sym_update_crc(symname + strlen(CRC_PFX), mod, crc);
- 		}
- 		break;
- 	case SHN_UNDEF:
- 		/* undefined symbol */
--		if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL)
-+		if (ELF_ST_BIND(sym->st_info) != STB_GLOBAL &&
-+		    ELF_ST_BIND(sym->st_info) != STB_WEAK)
- 			break;
- 		/* ignore global offset table */
- 		if (strcmp(symname, "_GLOBAL_OFFSET_TABLE_") == 0)
-@@ -373,8 +400,7 @@ handle_modversions(struct module *mod, s
- 	default:
- 		/* All exported symbols */
- 		if (memcmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) {
--			add_exported_symbol(symname + strlen(KSYMTAB_PFX),
--					    mod, NULL);
-+			sym_add_exported(symname + strlen(KSYMTAB_PFX), mod);
- 		}
- 		if (strcmp(symname, MODULE_SYMBOL_PREFIX "init_module") == 0)
- 			mod->has_init = 1;
-@@ -384,19 +410,6 @@ handle_modversions(struct module *mod, s
- 	}
- }
- 
--int
--is_vmlinux(const char *modname)
--{
--	const char *myname;
--
--	if ((myname = strrchr(modname, '/')))
--		myname++;
--	else
--		myname = modname;
--
--	return strcmp(myname, "vmlinux") == 0;
--}
--
- void
- read_symbols(char *modname)
- {
-@@ -412,9 +425,7 @@ read_symbols(char *modname)
- 	/* When there's no vmlinux, don't print warnings about
- 	 * unresolved symbols (since there'll be too many ;) */
- 	if (is_vmlinux(modname)) {
--		unsigned int fake_crc = 0;
- 		have_vmlinux = 1;
--		add_exported_symbol("struct_module", mod, &fake_crc);
- 		mod->skip = 1;
- 	}
- 
-@@ -426,6 +437,7 @@ read_symbols(char *modname)
- 	}
- 	maybe_frob_version(modname, info.modinfo, info.modinfo_len,
- 			   (void *)info.modinfo - (void *)info.hdr);
-+
- 	parse_elf_finish(&info);
- 
- 	/* Our trick to get versioning for struct_module - it's
-@@ -451,12 +463,7 @@ buf_printf(struct buffer *buf, const cha
- 	
- 	va_start(ap, fmt);
- 	len = vsnprintf(tmp, SZ, fmt, ap);
--	if (buf->size - buf->pos < len + 1) {
--		buf->size += 128;
--		buf->p = realloc(buf->p, buf->size);
--	}
--	strncpy(buf->p + buf->pos, tmp, len + 1);
--	buf->pos += len;
-+	buf_write(buf, tmp, len);
- 	va_end(ap);
- }
- 
-@@ -464,7 +471,7 @@ void
- buf_write(struct buffer *buf, const char *s, int len)
- {
- 	if (buf->size - buf->pos < len) {
--		buf->size += len;
-+		buf->size += len + SZ;
- 		buf->p = realloc(buf->p, buf->size);
- 	}
- 	strncpy(buf->p + buf->pos, s, len);
-@@ -506,8 +513,8 @@ add_versions(struct buffer *b, struct mo
- 		exp = find_symbol(s->name);
- 		if (!exp || exp->module == mod) {
- 			if (have_vmlinux)
--				fprintf(stderr, "*** Warning: \"%s\" [%s.ko] "
--				"undefined!\n",	s->name, mod->name);
-+				warn("\"%s\" [%s.ko] undefined!\n",
-+				     s->name, mod->name);
- 			continue;
- 		}
- 		s->module = exp->module;
-@@ -615,8 +622,11 @@ write_if_changed(struct buffer *b, const
- 	fclose(file);
- }
- 
-+/* parse Module.symvers file. line format:
-+ * 0x12345678<tab>symbol<tab>module[[<tab>export]<tab>something]
-+ **/
- void
--read_dump(const char *fname)
-+read_dump(const char *fname, unsigned int kernel)
- {
- 	unsigned long size, pos = 0;
- 	void *file = grab_file(fname, &size);
-@@ -630,6 +640,7 @@ read_dump(const char *fname)
- 		char *symname, *modname, *d;
- 		unsigned int crc;
- 		struct module *mod;
-+                struct symbol *s;
- 
- 		if (!(symname = strchr(line, '\t')))
- 			goto fail;
-@@ -650,13 +661,30 @@ read_dump(const char *fname)
- 			mod = new_module(NOFAIL(strdup(modname)));
- 			mod->skip = 1;
- 		}
--		add_exported_symbol(symname, mod, &crc);
-+                s = sym_add_exported(symname, mod);
-+		s->kernel    = kernel;
-+		s->preloaded = 1;
-+		sym_update_crc(symname, mod, crc);
- 	}
- 	return;
- fail:
- 	fatal("parse error in symbol dump file\n");
- }
- 
-+/* For normal builds always dump all symbols.
-+ * For external modules only dump symbols
-+ * that are not read from kernel Module.symvers.
-+ **/
-+static int
-+dump_sym(struct symbol *sym)
-+{
-+	if (!external_module)
-+		return 1;
-+	if (sym->vmlinux || sym->kernel)
-+		return 0;
-+	return 1;
-+}
-+
- void
- write_dump(const char *fname)
- {
-@@ -667,15 +695,10 @@ write_dump(const char *fname)
- 	for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
- 		symbol = symbolhash[n];
- 		while (symbol) {
--			symbol = symbol->next;
--		}
--	}
--
--	for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
--		symbol = symbolhash[n];
--		while (symbol) {
--			buf_printf(&buf, "0x%08x\t%s\t%s\n", symbol->crc,
--				symbol->name, symbol->module->name);
-+			if (dump_sym(symbol))
-+				buf_printf(&buf, "0x%08x\t%s\t%s\n",
-+					symbol->crc, symbol->name,
-+					symbol->module->name);
- 			symbol = symbol->next;
- 		}
- 	}
-@@ -688,13 +711,18 @@ main(int argc, char **argv)
- 	struct module *mod;
- 	struct buffer buf = { };
- 	char fname[SZ];
--	char *dump_read = NULL, *dump_write = NULL;
-+	char *kernel_read = NULL, *module_read = NULL;
-+	char *dump_write = NULL;
- 	int opt;
- 
--	while ((opt = getopt(argc, argv, "i:mo:")) != -1) {
-+	while ((opt = getopt(argc, argv, "i:I:mo:")) != -1) {
- 		switch(opt) {
- 			case 'i':
--				dump_read = optarg;
-+				kernel_read = optarg;
-+				break;
-+			case 'I':
-+				module_read = optarg;
-+				external_module = 1;
- 				break;
- 			case 'm':
- 				modversions = 1;
-@@ -707,8 +735,10 @@ main(int argc, char **argv)
- 		}
- 	}
- 
--	if (dump_read)
--		read_dump(dump_read);
-+	if (kernel_read)
-+		read_dump(kernel_read, 1);
-+	if (module_read)
-+		read_dump(module_read, 0);
- 
- 	while (optind < argc) {
- 		read_symbols(argv[optind++]);
diff --git a/lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch b/lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch
deleted file mode 100644
index 39b85d47dd4098fd74cab158c6128f7180d2a8d4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/modpost_external_module_updates_sles9.patch
+++ /dev/null
@@ -1,342 +0,0 @@
-This patch updates the SLES 9 module build system to properly support
-dependencies between external modules, similarly to the way they are
-supported in newer kernels.
-
-Index: linux-2.6.5-7.286/scripts/Makefile.modpost
-===================================================================
---- linux-2.6.5-7.286.orig/scripts/Makefile.modpost
-+++ linux-2.6.5-7.286/scripts/Makefile.modpost
-@@ -38,7 +38,8 @@ _modpost: __modpost
- include .config
- include scripts/Makefile.lib
- 
--symverfile := $(objtree)/Module.symvers
-+kernelsymfile := $(objtree)/Module.symvers
-+modulesymfile := $(KBUILD_EXTMOD)/Module.symvers
- 
- # Step 1), find all modules listed in $(MODVERDIR)/
- __modules := $(shell head -q -n1 /dev/null $(wildcard $(MODVERDIR)/*.mod))
-@@ -51,7 +52,9 @@ _modpost: $(modules)
- #  Includes step 3,4
- quiet_cmd_modpost = MODPOST
-       cmd_modpost = scripts/modpost \
--	$(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
-+ 	$(if $(KBUILD_EXTMOD),-i,-o) $(kernelsymfile) \
-+ 	$(if $(KBUILD_EXTMOD),-I $(modulesymfile)) \
-+ 	$(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
- 	-s $(firstword $(wildcard $(dir $(MODVERDIR))/Module.supported \
- 				  $(objtree)/Module.supported /dev/null)) \
- 	$(filter-out FORCE,$^)
-Index: linux-2.6.5-7.286/scripts/modpost.c
-===================================================================
---- linux-2.6.5-7.286.orig/scripts/modpost.c
-+++ linux-2.6.5-7.286/scripts/modpost.c
-@@ -1,7 +1,8 @@
- /* Postprocess module symbol versions
-  *
-  * Copyright 2003       Kai Germaschewski
-- *           2002-2003  Rusty Russell, IBM Corporation
-+ *           2002-2004  Rusty Russell, IBM Corporation
-+ * Copyright 2006       Sam Ravnborg
-  *
-  * Based in part on module-init-tools/depmod.c,file2alias
-  *
-@@ -18,6 +19,8 @@
- int modversions = 0;
- /* Warn about undefined symbols? (do so if we have vmlinux) */
- int have_vmlinux = 0;
-+/* If we are modposting external module set to 1 */
-+static int external_module = 0;
- 
- void
- fatal(const char *fmt, ...)
-@@ -45,6 +48,19 @@ warn(const char *fmt, ...)
- 	va_end(arglist);
- }
- 
-+int
-+is_vmlinux(const char *modname)
-+{
-+	const char *myname;
-+
-+	if ((myname = strrchr(modname, '/')))
-+		myname++;
-+	else
-+		myname = modname;
-+
-+	return strcmp(myname, "vmlinux") == 0;
-+}
-+
- void *do_nofail(void *ptr, const char *expr)
- {
- 	if (!ptr) {
-@@ -101,6 +117,9 @@ struct symbol {
- 	struct module *module;
- 	unsigned int crc;
- 	int crc_valid;
-+	unsigned int vmlinux:1;    /* 1 if symbol is defined in vmlinux */
-+	unsigned int kernel:1;     /* 1 if symbol is from kernel
-+				    *  (only for external modules) **/
- 	char name[0];
- };
- 
-@@ -135,8 +154,8 @@ alloc_symbol(const char *name, struct sy
- 
- /* For the hash of exported symbols */
- 
--void
--new_symbol(const char *name, struct module *module, unsigned int *crc)
-+static struct symbol *
-+new_symbol(const char *name, struct module *module)
- {
- 	unsigned int hash;
- 	struct symbol *new;
-@@ -144,10 +163,7 @@ new_symbol(const char *name, struct modu
- 	hash = tdb_hash(name) % SYMBOL_HASH_SIZE;
- 	new = symbolhash[hash] = alloc_symbol(name, symbolhash[hash]);
- 	new->module = module;
--	if (crc) {
--		new->crc = *crc;
--		new->crc_valid = 1;
--	}
-+	return new;
- }
- 
- struct symbol *
-@@ -168,19 +184,28 @@ find_symbol(const char *name)
- 
- /* Add an exported symbol - it may have already been added without a
-  * CRC, in this case just update the CRC */
--void
--add_exported_symbol(const char *name, struct module *module, unsigned int *crc)
-+static struct symbol *
-+sym_add_exported(const char *name, struct module *mod)
- {
- 	struct symbol *s = find_symbol(name);
- 
- 	if (!s) {
--		new_symbol(name, module, crc);
--		return;
--	}
--	if (crc) {
--		s->crc = *crc;
--		s->crc_valid = 1;
-+		s = new_symbol(name, mod);
- 	}
-+	s->vmlinux   = is_vmlinux(mod->name);
-+	s->kernel    = 0;
-+	return s;
-+}
-+
-+static void
-+sym_update_crc(const char *name, struct module *mod, unsigned int crc)
-+{
-+	struct symbol *s = find_symbol(name);
-+
-+	if (!s)
-+		s = new_symbol(name, mod);
-+	s->crc = crc;
-+	s->crc_valid = 1;
- }
- 
- void *
-@@ -339,8 +364,7 @@ handle_modversions(struct module *mod, s
- 		/* CRC'd symbol */
- 		if (memcmp(symname, CRC_PFX, strlen(CRC_PFX)) == 0) {
- 			crc = (unsigned int) sym->st_value;
--			add_exported_symbol(symname + strlen(CRC_PFX),
--					    mod, &crc);
-+			sym_update_crc(symname + strlen(CRC_PFX), mod, crc);
- 			modversions = 1;
- 		}
- 		break;
-@@ -372,26 +396,12 @@ handle_modversions(struct module *mod, s
- 	default:
- 		/* All exported symbols */
- 		if (memcmp(symname, KSYMTAB_PFX, strlen(KSYMTAB_PFX)) == 0) {
--			add_exported_symbol(symname + strlen(KSYMTAB_PFX),
--					    mod, NULL);
-+			sym_add_exported(symname + strlen(KSYMTAB_PFX), mod);
- 		}
- 		break;
- 	}
- }
- 
--int
--is_vmlinux(const char *modname)
--{
--	const char *myname;
--
--	if ((myname = strrchr(modname, '/')))
--		myname++;
--	else
--		myname = modname;
--
--	return strcmp(myname, "vmlinux") == 0;
--}
--
- static struct {
- 	void *file;
- 	unsigned long size;
-@@ -451,12 +461,7 @@ read_symbols(char *modname)
- 	/* When there's no vmlinux, don't print warnings about
- 	 * unresolved symbols (since there'll be too many ;) */
- 	if (is_vmlinux(modname)) {
--		unsigned int fake_crc = 0;
- 		have_vmlinux = 1;
--		/* May not have this if !CONFIG_MODULE_UNLOAD: fake it.
--		   If it appears, we'll get the real CRC. */
--		add_exported_symbol("cleanup_module", mod, &fake_crc);
--		add_exported_symbol("struct_module", mod, &fake_crc);
- 		mod->skip = 1;
- 	}
- 
-@@ -499,12 +504,7 @@ buf_printf(struct buffer *buf, const cha
- 	
- 	va_start(ap, fmt);
- 	len = vsnprintf(tmp, SZ, fmt, ap);
--	if (buf->size - buf->pos < len + 1) {
--		buf->size += 128;
--		buf->p = realloc(buf->p, buf->size);
--	}
--	strncpy(buf->p + buf->pos, tmp, len + 1);
--	buf->pos += len;
-+	buf_write(buf, tmp, len);
- 	va_end(ap);
- }
- 
-@@ -512,7 +512,7 @@ void
- buf_write(struct buffer *buf, const char *s, int len)
- {
- 	if (buf->size - buf->pos < len) {
--		buf->size += len;
-+		buf->size += len + SZ;
- 		buf->p = realloc(buf->p, buf->size);
- 	}
- 	strncpy(buf->p + buf->pos, s, len);
-@@ -522,7 +522,7 @@ buf_write(struct buffer *buf, const char
- /* Header for the generated file */
- 
- void
--add_header(struct buffer *b)
-+add_header(struct buffer *b, struct module *mod)
- {
- 	buf_printf(b, "#include <linux/module.h>\n");
- 	buf_printf(b, "#include <linux/vermagic.h>\n");
-@@ -676,8 +676,11 @@ read_supported(const char *fname)
- 		; /* ignore error */
- }
- 
-+/* parse Module.symvers file. line format:
-+ * 0x12345678<tab>symbol<tab>module[<tab>something]
-+ **/
- void
--read_dump(const char *fname)
-+read_dump(const char *fname, unsigned int kernel)
- {
- 	unsigned long size, pos = 0;
- 	void *file = grab_file(fname, &size);
-@@ -691,6 +694,7 @@ read_dump(const char *fname)
- 		char *symname, *modname, *d;
- 		unsigned int crc;
- 		struct module *mod;
-+                struct symbol *s;
- 
- 		if (!(symname = strchr(line, '\t')))
- 			goto fail;
-@@ -712,13 +716,29 @@ read_dump(const char *fname)
- 			mod = new_module(NOFAIL(strdup(modname)));
- 			mod->skip = 1;
- 		}
--		add_exported_symbol(symname, mod, &crc);
-+                s = sym_add_exported(symname, mod);
-+		s->kernel    = kernel;
-+		sym_update_crc(symname, mod, crc);
- 	}
- 	return;
- fail:
- 	fatal("parse error in symbol dump file\n");
- }
- 
-+/* For normal builds always dump all symbols.
-+ * For external modules only dump symbols
-+ * that are not read from kernel Module.symvers.
-+ **/
-+static int
-+dump_sym(struct symbol *sym)
-+{
-+	if (!external_module)
-+		return 1;
-+	if (sym->vmlinux || sym->kernel)
-+		return 0;
-+	return 1;
-+}
-+
- void
- write_dump(const char *fname)
- {
-@@ -729,15 +749,10 @@ write_dump(const char *fname)
- 	for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
- 		symbol = symbolhash[n];
- 		while (symbol) {
--			symbol = symbol->next;
--		}
--	}
--
--	for (n = 0; n < SYMBOL_HASH_SIZE ; n++) {
--		symbol = symbolhash[n];
--		while (symbol) {
--			buf_printf(&buf, "0x%08x\t%s\t%s\n", symbol->crc,
--				symbol->name, symbol->module->name);
-+			if (dump_sym(symbol))
-+				buf_printf(&buf, "0x%08x\t%s\t%s\n",
-+					symbol->crc, symbol->name,
-+					symbol->module->name);
- 			symbol = symbol->next;
- 		}
- 	}
-@@ -750,14 +765,19 @@ main(int argc, char **argv)
- 	struct module *mod;
- 	struct buffer buf = { };
- 	char fname[SZ];
--	char *dump_read = NULL, *dump_write = NULL;
-+	char *kernel_read = NULL, *module_read = NULL;
-+	char *dump_write = NULL;
- 	char *supp = NULL;
- 	int opt;
- 
--	while ((opt = getopt(argc, argv, "i:o:s:")) != -1) {
-+	while ((opt = getopt(argc, argv, "i:I:o:s:")) != -1) {
- 		switch(opt) {
- 			case 'i':
--				dump_read = optarg;
-+				kernel_read = optarg;
-+				break;
-+			case 'I':
-+				module_read = optarg;
-+				external_module = 1;
- 				break;
- 			case 'o':
- 				dump_write = optarg;
-@@ -773,8 +793,10 @@ main(int argc, char **argv)
- 	if (supp)
- 		read_supported(supp);
- 
--	if (dump_read)
--		read_dump(dump_read);
-+	if (kernel_read)
-+		read_dump(kernel_read, 1);
-+	if (module_read)
-+		read_dump(module_read, 0);
- 
- 	while (optind < argc) {
- 		read_symbols(argv[optind++]);
-@@ -786,7 +808,7 @@ main(int argc, char **argv)
- 
- 		buf.pos = 0;
- 
--		add_header(&buf);
-+		add_header(&buf, mod);
- 		add_supported_flag(&buf, mod);
- 		add_versions(&buf, mod);
- 		add_depends(&buf, mod, modules);
diff --git a/lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch b/lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch
deleted file mode 100644
index 7bb3440921a9a3aca5c919f88a128fbcd920c848..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/mpt-fusion-downgrade-to-3_02_73-rhel4.patch
+++ /dev/null
@@ -1,27949 +0,0 @@
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.c linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.c	1970-01-01 01:00:00.000000000 +0100
-@@ -1,5894 +0,0 @@
--#define MPT_CSMI_DESCRIPTION "LSI Logic Corporation: Fusion MPT Driver "MPT_LINUX_VERSION_COMMON
--#define csmisas_is_this_sas_cntr(ioc) (ioc->bus_type == SAS) ? 1 : 0
--
--static int csmisas_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus,
--    u8 VolumeId, pMpiRaidActionReply_t reply);
--static u8  map_sas_status_to_csmi(u8 mpi_sas_status);
--
--/**
-- * reverse_byte_order64
-- *
-- * @data64
-- *
-- **/
--static u64
--reverse_byte_order64(u64 data64)
--{
--	int i;
--	u64 rc;
--	u8  *inWord = (u8*)&data64, *outWord = (u8*)&rc;
--
--	for (i = 0 ; i < 8 ; i++)
--		outWord[i] = inWord[7-i];
--
--	return rc;
--}
--
--/**
-- * csmisas_is_sata
-- *
-- * @phys_disk
-- *
-- **/
--static int
--csmisas_is_sata(RaidPhysDiskPage0_t *phys_disk)
--{
--	if ((phys_disk->ExtDiskIdentifier[0] == 'A') &&
--	    (phys_disk->ExtDiskIdentifier[1] == 'T') &&
--	    (phys_disk->ExtDiskIdentifier[2] == 'A'))
--		return 1;
--	else
--		return 0;
--}
--
--/**
-- * csmisas_is_end_device
-- *
-- * @attached
-- *
-- **/
--static inline int
--csmisas_is_end_device(struct mptsas_devinfo * attached)
--{
--	if ((attached->sas_address) &&
--	    (attached->device_info &
--	    MPI_SAS_DEVICE_INFO_END_DEVICE) &&
--	    ((attached->device_info &
--	    MPI_SAS_DEVICE_INFO_SSP_TARGET) |
--	    (attached->device_info &
--	    MPI_SAS_DEVICE_INFO_STP_TARGET) |
--	    (attached->device_info &
--	    MPI_SAS_DEVICE_INFO_SATA_DEVICE)))
--		return 1;
--	else
--		return 0;
--}
--
--/**
-- * csmisas_is_phys_disk
-- *
-- * returns (1) success (0) fail - not a phys disk
-- **/
--int
--csmisas_is_phys_disk(MPT_ADAPTER *ioc, int channel, int id)
--{
--	struct inactive_raid_component_info *component_info;
--	int i;
--	int rc = 0;
--
--	if (!ioc->raid_data.pIocPg3)
--		goto out;
--	for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) {
--		if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) &&
--		    (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) {
--			rc = 1;
--			goto out;
--		}
--	}
--
--	/*
--	 * Check inactive list for matching phys disks
--	 */
--	if (list_empty(&ioc->raid_data.inactive_list))
--		goto out;
--
--	down(&ioc->raid_data.inactive_list_mutex);
--	list_for_each_entry(component_info, &ioc->raid_data.inactive_list,
--	    list) {
--		if ((component_info->d.PhysDiskID == id) &&
--		    (component_info->d.PhysDiskBus == channel))
--			rc = 1;
--	}
--	up(&ioc->raid_data.inactive_list_mutex);
--
-- out:
--	return rc;
--}
--
--/**
-- * csmisas_raid_id_to_num
-- *
-- * Obtains the phys disk num for given H:C:T nexus
-- *
-- * input (channel/id)
-- * output (phys disk number - used by SCSI_IO_PASSTHRU to access hidden component)
-- *
-- * returns - signed return means failure
-- **/
--s8
--csmisas_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	struct inactive_raid_component_info *component_info;
--	int i;
--	s8 rc = -ENXIO;
--
--	if (!ioc->raid_data.pIocPg3)
--		goto out;
--	for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) {
--		if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) &&
--		    (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) {
--			rc = ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskNum;
--			goto out;
--		}
--	}
--
--	/*
--	 * Check inactive list for matching phys disks
--	 */
--	if (list_empty(&ioc->raid_data.inactive_list))
--		goto out;
--
--	down(&ioc->raid_data.inactive_list_mutex);
--	list_for_each_entry(component_info, &ioc->raid_data.inactive_list,
--	    list) {
--		if ((component_info->d.PhysDiskID == id) &&
--		    (component_info->d.PhysDiskBus == channel))
--			rc = component_info->d.PhysDiskNum;
--	}
--	up(&ioc->raid_data.inactive_list_mutex);
--
-- out:
--	return rc;
--}
--
--/**
-- * csmisas_get_device_component_by_os
-- *
-- * Obtain device component object by operating system mapping
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- **/
--static struct sas_device_info *
--csmisas_get_device_component_by_os(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	struct sas_device_info *sas_info, *p;
--
--	sas_info = NULL;
--
--	down(&ioc->sas_device_info_mutex);
--	list_for_each_entry(p, &ioc->sas_device_info_list, list) {
--		if (p->os.channel == channel && p->os.id == id) {
--			sas_info = p;
--			goto out;
--		}
--	}
--
-- out:
--	up(&ioc->sas_device_info_mutex);
--	return sas_info;
--}
--
--/**
-- * csmisas_get_device_component
-- *
-- * Obtain device component object by firmware system mapping
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- **/
--static struct sas_device_info *
--csmisas_get_device_component_by_fw(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	struct sas_device_info *sas_info, *p;
--
--	sas_info = NULL;
--
--	down(&ioc->sas_device_info_mutex);
--	list_for_each_entry(p, &ioc->sas_device_info_list, list) {
--		if (p->fw.channel == channel && p->fw.id == id) {
--			sas_info = p;
--			goto out;
--		}
--	}
--
-- out:
--	up(&ioc->sas_device_info_mutex);
--	return sas_info;
--}
--
--
--/**
-- * csmisas_get_device_component_by_sas_addr
-- *
-- * Obtain device component object by sas address
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- **/
--static struct sas_device_info *
--csmisas_get_device_component_by_sas_addr(MPT_ADAPTER *ioc, u64 sas_address)
--{
--	struct sas_device_info *sas_info, *p;
--
--	sas_info = NULL;
--
--	down(&ioc->sas_device_info_mutex);
--	list_for_each_entry(p, &ioc->sas_device_info_list, list) {
--		dcsmisasprintk((KERN_ERR
--		    ":%s()"
--		    " looking for SASAddress=%llX entry SASAddress=%llX\n",
--		    __FUNCTION__, sas_address, p->sas_address));
--		if (p->sas_address == sas_address) {
--			sas_info = p;
--			dcsmisasprintk((KERN_ERR
--				":%s()"
--				" found SASAddress=%llX\n",
--				__FUNCTION__, sas_address));
--			goto out;
--		}
--	}
--
-- out:
--	up(&ioc->sas_device_info_mutex);
--	return sas_info;
--}
--
--/**
-- * csmisas_send_command_wait
-- *
-- * Send mf to firmware
-- *
-- * @ioc
-- * @mf
-- * @timeout - timeout
-- *
-- *	Return: 0 for success
-- *	non-zero, failure
-- **/
--static int
--csmisas_send_command_wait(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, int timeout)
--{
--	int rc;
--	int mf_timeout;
--
--	mf_timeout = max_t(int, MPT_IOCTL_DEFAULT_TIMEOUT, timeout);
--	INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--	ioc->ioctl->wait_done = 0;
--	rc = 0;
--
--#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
--	ioc->ioctl->timer.expires = jiffies + (MPT_JIFFY * mf_timeout);
--	ioc->ioctl->status |= MPT_IOCTL_STATUS_TIMER_ACTIVE;
--	ADD_TIMER(&ioc->ioctl->timer);
--#endif
--
--	mpt_put_msg_frame(mptctl_id, ioc, mf);
--
--#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
--	WAIT_EVENT(mptctl_wait, ioc->ioctl->wait_done);
--#else
--	if ((wait_event_timeout(mptctl_wait,
--	    ioc->ioctl->wait_done == 1, HZ * mf_timeout) <=0) &&
--	    ioc->ioctl->wait_done != 1 ) {
--		mpt_free_msg_frame(ioc, mf);
--		mptctl_timeout_expired(ioc->ioctl);
--		rc = -1;
--	}
--#endif
--
--	if (rc != 0)
--		dfailprintk((KERN_ERR "%s@%d::%s() - "
--		    "%s IOCTL timeout (%d)\n",
--		    __FILE__, __LINE__, __FUNCTION__,
--		    ioc->name, mf_timeout));
--
--	return rc;
--}
--
--/**
-- * csmisas_send_handshake_wait
-- *
-- * Handshake a mf to firmware
-- *
-- * @ioc
-- * @mf
-- * @mf_size
-- * @timeout - timeout
-- *
-- *	Return: 0 for success
-- *	non-zero, failure
-- **/
--static int
--csmisas_send_handshake_wait(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, int timeout)
--{
--	int rc;
--	int mf_timeout;
--
--	mf_timeout = max_t(int, MPT_IOCTL_DEFAULT_TIMEOUT, timeout);
--	INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--	ioc->ioctl->wait_done = 0;
--	rc = 0;
--
--#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
--	ioc->ioctl->timer.expires = jiffies + (MPT_JIFFY * mf_timeout);
--	ioc->ioctl->status |= MPT_IOCTL_STATUS_TIMER_ACTIVE;
--	ADD_TIMER(&ioc->ioctl->timer);
--#endif
--
--	rc = mpt_send_handshake_request(mptctl_id, ioc,
--	    sizeof(SCSITaskMgmt_t), (u32*)mf,timeout, CAN_SLEEP);
--	if (rc != 0)
--		return rc;
--
--#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
--	WAIT_EVENT(mptctl_wait, ioc->ioctl->wait_done);
--#else
--	if ((wait_event_timeout(mptctl_wait,
--	    ioc->ioctl->wait_done == 1, HZ * mf_timeout) <=0) &&
--	    ioc->ioctl->wait_done != 1 ) {
--		mpt_free_msg_frame(ioc, mf);
--		mptctl_timeout_expired(ioc->ioctl);
--		rc = -1;
--	}
--#endif
--
--	if (rc != 0)
--		dfailprintk((KERN_ERR "%s@%d::%s() - "
--		    "%s IOCTL timeout (%d)\n", __FILE__, __LINE__,
--		    __FUNCTION__, ioc->name, mf_timeout));
--
--	return rc;
--}
--
--/**
-- *	csmisas_get_manufacture_pg0 - Manufacturing Page 0.
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *	@mfgPage0: read only info set at manufacturing time
-- *
-- *	Return: 0 for success
-- *	-ENOMEM if no memory available
-- *		-EPERM if not allowed due to ISR context
-- *		-EAGAIN if no msg frames currently available
-- *		-EFAULT for non-successful reply or no reply (timeout)
-- **/
--static int
--csmisas_get_manufacture_pg0(MPT_ADAPTER *ioc, ManufacturingPage0_t *mfgPage0)
--{
--
--	ConfigPageHeader_t	 hdr;
--	CONFIGPARMS		 cfg;
--	ManufacturingPage0_t	 *buffer = NULL;
--	dma_addr_t		 dma_handle;
--	int			 data_sz;
--	int			 rc;
--
--	/*
--	 * Get Manufacturing Page 0 header
--	 */
--	data_sz = 0;
--	hdr.PageVersion = MPI_MANUFACTURING0_PAGEVERSION;
--	hdr.PageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.pageAddr = 0;
--	cfg.timeout = 0;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_manufacture_pg0_out;
--
--	if (hdr.PageLength == 0) {
--		rc = -EFAULT;
--		goto get_manufacture_pg0_out;
--	}
--
--	data_sz = hdr.PageLength * 4;
--	buffer = (ManufacturingPage0_t *) pci_alloc_consistent(ioc->pcidev,
--		data_sz, &dma_handle);
--	if (!buffer) {
--		rc = -ENOMEM;
--		goto get_manufacture_pg0_out;
--	}
--
--	memset((u8 *)buffer, 0, data_sz);
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_manufacture_pg0_out;
--
--	strncpy(mfgPage0->ChipName, buffer->ChipName, 16);
--	strncpy(mfgPage0->ChipRevision, buffer->ChipRevision, 8);
--	strncpy(mfgPage0->BoardName, buffer->BoardName, 16);
--	strncpy(mfgPage0->BoardAssembly, buffer->BoardAssembly, 16);
--	strncpy(mfgPage0->BoardTracerNumber, buffer->BoardTracerNumber, 16);
--
--	dcsmisasprintk(("ChipName=%s\n",buffer->ChipName));
--	dcsmisasprintk(("ChipRevision=%s\n",buffer->ChipRevision));
--	dcsmisasprintk(("BoardName=%s\n",buffer->BoardName));
--	dcsmisasprintk(("BoardAssembly=%s\n",buffer->BoardAssembly));
--	dcsmisasprintk(("BoardTracerNumber=%s\n",buffer->BoardTracerNumber));
--
-- get_manufacture_pg0_out:
--
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, data_sz,
--		    (u8 *) buffer, dma_handle);
--
--
--	return rc;
--}
--
--/**
-- *	csmisas_get_number_hotspares - returns num hot spares in this ioc
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *
-- *	Return: number of hotspares
-- *
-- **/
--static int
--csmisas_get_number_hotspares(MPT_ADAPTER *ioc)
--{
--	ConfigPageHeader_t	 hdr;
--	CONFIGPARMS		 cfg;
--	IOCPage5_t		 *buffer = NULL;
--	dma_addr_t		 dma_handle;
--	int			 data_sz;
--	int			 rc;
--
--	memset(&hdr, 0, sizeof(ConfigPageHeader_t));
--	memset(&cfg, 0, sizeof(CONFIGPARMS));
--
--	rc = 0;
--	data_sz = 0;
--	hdr.PageNumber = 5;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_IOC;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if (mpt_config(ioc, &cfg) != 0)
--		goto get_ioc_pg5;
--
--	if (hdr.PageLength == 0)
--		goto get_ioc_pg5;
--
--	data_sz = hdr.PageLength * 4;
--	buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev,
--		data_sz, &dma_handle);
--	if (!buffer)
--		goto get_ioc_pg5;
--
--	memset((u8 *)buffer, 0, data_sz);
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if (mpt_config(ioc, &cfg) != 0)
--		goto get_ioc_pg5;
--
--	rc = buffer->NumHotSpares;
--
-- get_ioc_pg5:
--
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, data_sz,
--		    (u8 *) buffer, dma_handle);
--
--	return rc;
--}
--
--
--/**
-- *	csmisas_get_ioc_pg5 - ioc Page 5 hot spares
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *	@pIocPage5: ioc page 5
-- *	@data_size: expected data size(units=bytes)
-- *
-- *	Return: 0 for success
-- *	-ENOMEM if no memory available
-- *		-EPERM if not allowed due to ISR context
-- *		-EAGAIN if no msg frames currently available
-- *		-EFAULT for non-successful reply or no reply (timeout)
-- **/
--static int
--csmisas_get_ioc_pg5(MPT_ADAPTER *ioc, IOCPage5_t *iocPage5, int data_size)
--{
--	ConfigPageHeader_t	 hdr;
--	CONFIGPARMS		 cfg;
--	IOCPage5_t		 *buffer = NULL;
--	dma_addr_t		 dma_handle;
--	int			 data_sz;
--	int			 rc;
--
--	memset(&hdr, 0, sizeof(ConfigPageHeader_t));
--	memset(&cfg, 0, sizeof(CONFIGPARMS));
--
--	rc = 0;
--	data_sz = 0;
--	hdr.PageNumber = 5;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_IOC;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_ioc_pg5;
--
--	if (hdr.PageLength == 0) {
--		rc = -EFAULT;
--		goto get_ioc_pg5;
--	}
--
--	data_sz = hdr.PageLength * 4;
--	buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev,
--		data_sz, &dma_handle);
--	if (!buffer) {
--		rc = -ENOMEM;
--		goto get_ioc_pg5;
--	}
--
--	memset((u8 *)buffer, 0, data_sz);
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_ioc_pg5;
--
--	memcpy(iocPage5, buffer, data_size);
--
-- get_ioc_pg5:
--
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, data_sz,
--		    (u8 *) buffer, dma_handle);
--
--	return rc;
--}
--
--/**
-- *	csmisas_sas_device_pg0 - sas device page 0
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *	@mptsas_devinfo: structure found in mptsas.h
-- *	@form, @form_specific - defines the Page Address field in the config page
-- *		(pls refer to chapter 5.1 in the mpi spec)
-- *
-- *	Return: 0 for success
-- *	-ENOMEM if no memory available
-- *		-EPERM if not allowed due to ISR context
-- *		-EAGAIN if no msg frames currently available
-- *		-EFAULT for non-successful reply or no reply (timeout)
-- **/
--static int
--csmisas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info,
--		u32 form, u32 form_specific)
--{
--	ConfigExtendedPageHeader_t hdr;
--	CONFIGPARMS cfg;
--	SasDevicePage0_t *buffer;
--	dma_addr_t dma_handle;
--	u64 sas_address;
--	int rc;
--
--	rc = 0;
--	hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.pageAddr = form + form_specific;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = 10;
--
--	memset(device_info, 0, sizeof(struct mptsas_devinfo));
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto out;
--
--	if (!hdr.ExtPageLength) {
--		rc = -ENXIO;
--		goto out;
--	}
--
--	buffer = pci_alloc_consistent(ioc->pcidev,
--	    hdr.ExtPageLength * 4, &dma_handle);
--	if (!buffer) {
--		rc = -ENOMEM;
--		goto out;
--	}
--
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto out_free_consistent;
--
--	device_info->handle = le16_to_cpu(buffer->DevHandle);
--	device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle);
--	device_info->handle_enclosure =
--	    le16_to_cpu(buffer->EnclosureHandle);
--	device_info->slot = le16_to_cpu(buffer->Slot);
--	device_info->phy_id = buffer->PhyNum;
--	device_info->port_id = buffer->PhysicalPort;
--	device_info->id = buffer->TargetID;
--	device_info->channel = buffer->Bus;
--	memcpy(&sas_address, &buffer->SASAddress, sizeof(u64));
--	device_info->sas_address = le64_to_cpu(sas_address);
--	device_info->device_info =
--	    le32_to_cpu(buffer->DeviceInfo);
--
-- out_free_consistent:
--	pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
--			    buffer, dma_handle);
-- out:
--	return rc;
--}
--
--/**
-- * Routine for the CSMI Sas Get Driver Info command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_driver_info(unsigned long arg)
--{
--
--	CSMI_SAS_DRIVER_INFO_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_DRIVER_INFO_BUFFER	karg;
--	MPT_ADAPTER	*ioc = NULL;
--	int		iocnum;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--	      "Unable to read in csmi_sas_get_driver_info_buffer struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Fill in the data and return the structure to the calling
--	 * program
--	 */
--	memcpy( karg.Information.szName, MPT_MISCDEV_BASENAME,
--	    sizeof(MPT_MISCDEV_BASENAME));
--	memcpy( karg.Information.szDescription, MPT_CSMI_DESCRIPTION,
--	    sizeof(MPT_CSMI_DESCRIPTION));
--
--	karg.Information.usMajorRevision = MPT_LINUX_MAJOR_VERSION;
--	karg.Information.usMinorRevision = MPT_LINUX_MINOR_VERSION;
--	karg.Information.usBuildRevision = MPT_LINUX_BUILD_VERSION;
--	karg.Information.usReleaseRevision = MPT_LINUX_RELEASE_VERSION;
--
--	karg.Information.usCSMIMajorRevision = CSMI_MAJOR_REVISION;
--	karg.Information.usCSMIMinorRevision = CSMI_MINOR_REVISION;
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--		sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--		   "Unable to write out csmi_sas_get_driver_info_buffer @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI_SAS_GET_CNTLR_CONFIG command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_cntlr_config(unsigned long arg)
--{
--
--	CSMI_SAS_CNTLR_CONFIG_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_CNTLR_CONFIG_BUFFER	karg;
--	MPT_ADAPTER	*ioc = NULL;
--	int		iocnum;
--	int		ii,msize,psize;
--	unsigned int 	reg;
--	u32      	l;
--	ManufacturingPage0_t mfgPage0;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_CONFIG_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--	     "Unable to read in csmi_sas_get_cntlr_config_buffer struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--	      "%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Clear the struct before filling in data. */
--	memset( &karg.Configuration, 0, sizeof(CSMI_SAS_CNTLR_CONFIG));
--
--	/* Fill in the data and return the structure to the calling
--	 * program
--	 */
--
--	/* Get Base IO and Mem Mapped Addresses. */
--msize = psize = 0;
--for(ii=0; ii < DEVICE_COUNT_RESOURCE; ii++) {
--		reg = PCI_BASE_ADDRESS_0 + (ii << 2);
--		pci_read_config_dword(ioc->pcidev, reg, &l);
--
--		if ((l & PCI_BASE_ADDRESS_SPACE) ==
--                       PCI_BASE_ADDRESS_SPACE_MEMORY) {
--		    if(msize)
--                         continue;
--	            msize=1;
--		karg.Configuration.BaseMemoryAddress.uLowPart =
--			    l & PCI_BASE_ADDRESS_MEM_MASK;
--
--		if ((l & (PCI_BASE_ADDRESS_SPACE |
--                   PCI_BASE_ADDRESS_MEM_TYPE_MASK))
--                   == (PCI_BASE_ADDRESS_SPACE_MEMORY |
--                   PCI_BASE_ADDRESS_MEM_TYPE_64)) {
--                     pci_read_config_dword(ioc->pcidev, reg+4, &l);
--                     karg.Configuration.BaseMemoryAddress.uHighPart = l;
--                  }
--               }
--
--
--                  else {
--		        if(psize)
--                       continue;
--                       psize=1;
--			karg.Configuration.uBaseIoAddress =
--			    l & PCI_BASE_ADDRESS_IO_MASK;
--		}
--
--	}
--
--	karg.Configuration.uBoardID = (ioc->pcidev->subsystem_device << 16) |
--	    (ioc->pcidev->subsystem_vendor);
--
--	karg.Configuration.usSlotNumber =
--	    (ioc->pci_slot_number = 0xff) ?
--	    SLOT_NUMBER_UNKNOWN : ioc->pci_slot_number;
--	karg.Configuration.bControllerClass = CSMI_SAS_CNTLR_CLASS_HBA;
--	karg.Configuration.bIoBusType = CSMI_SAS_BUS_TYPE_PCI;
--	karg.Configuration.BusAddress.PciAddress.bBusNumber =
--	    ioc->pcidev->bus->number;
--	karg.Configuration.BusAddress.PciAddress.bDeviceNumber =
--	    PCI_SLOT(ioc->pcidev->devfn);
--	karg.Configuration.BusAddress.PciAddress.bFunctionNumber =
--	    PCI_FUNC(ioc->pcidev->devfn);
--	karg.Configuration.BusAddress.PciAddress.bReserved = 0;
--	if (!csmisas_get_manufacture_pg0(ioc, &mfgPage0))
--		memcpy( &karg.Configuration.szSerialNumber,
--		    mfgPage0.BoardTracerNumber, 16 );
--	karg.Configuration.usMajorRevision = ioc->facts.FWVersion.Struct.Major;
--	karg.Configuration.usMinorRevision = ioc->facts.FWVersion.Struct.Minor;
--	karg.Configuration.usBuildRevision = ioc->facts.FWVersion.Struct.Unit;
--	karg.Configuration.usReleaseRevision = ioc->facts.FWVersion.Struct.Dev;
--	karg.Configuration.usBIOSMajorRevision =
--	    (ioc->biosVersion & 0xFF000000) >> 24;
--	karg.Configuration.usBIOSMinorRevision =
--	    (ioc->biosVersion & 0x00FF0000) >> 16;
--	karg.Configuration.usBIOSBuildRevision =
--	    (ioc->biosVersion & 0x0000FF00) >> 8;
--	karg.Configuration.usBIOSReleaseRevision =
--	    (ioc->biosVersion & 0x000000FF);
--	karg.Configuration.uControllerFlags = CSMI_SAS_CNTLR_SAS_HBA |
--	    CSMI_SAS_CNTLR_FWD_SUPPORT | CSMI_SAS_CNTLR_FWD_ONLINE |
--	    CSMI_SAS_CNTLR_FWD_SRESET ;
--
--	/*
--	 * Enabling CSMI_SAS_CNTLR_SAS_RAID bit when IR fw detected
--	 */
--	if (ioc->ir_firmware)
--		karg.Configuration.uControllerFlags |= CSMI_SAS_CNTLR_SAS_RAID;
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* All Rrom entries will be zero. Skip them. */
--	/* bReserved will also be zeros. */
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--		sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--		"Unable to write out csmi_sas_get_driver_info_buffer @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI Sas Get Controller Status command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_cntlr_status(unsigned long arg)
--{
--
--	CSMI_SAS_CNTLR_STATUS_BUFFER  __user *uarg = (void __user *) arg;
--	MPT_ADAPTER		*ioc = NULL;
--	CSMI_SAS_CNTLR_STATUS_BUFFER	karg;
--	int			iocnum;
--	int			rc;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--	     "Unable to read in csmi_sas_get_cntlr_status_buffer struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Fill in the data and return the structure to the calling
--	 * program
--	 */
--
--	rc = mpt_GetIocState(ioc, 1);
--	switch (rc) {
--	case MPI_IOC_STATE_OPERATIONAL:
--		karg.Status.uStatus =  CSMI_SAS_CNTLR_STATUS_GOOD;
--		karg.Status.uOfflineReason = 0;
--		break;
--
--	case MPI_IOC_STATE_FAULT:
--		karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_FAILED;
--		karg.Status.uOfflineReason = 0;
--		break;
--
--	case MPI_IOC_STATE_RESET:
--	case MPI_IOC_STATE_READY:
--	default:
--		karg.Status.uStatus =  CSMI_SAS_CNTLR_STATUS_OFFLINE;
--		karg.Status.uOfflineReason =
--		    CSMI_SAS_OFFLINE_REASON_INITIALIZING;
--		break;
--	}
--
--	memset(&karg.Status.bReserved, 0, 28);
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--		sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--		    "Unable to write out csmi_sas_get_cntlr_status @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI Sas Get Phy Info command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_phy_info(unsigned long arg)
--{
--	CSMI_SAS_PHY_INFO_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_PHY_INFO_BUFFER  karg;
--	MPT_ADAPTER		*ioc = NULL;
--	ConfigExtendedPageHeader_t  hdr;
--	CONFIGPARMS		cfg;
--	SasIOUnitPage0_t	*sasIoUnitPg0;
--	dma_addr_t		sasIoUnitPg0_dma;
--	int			sasIoUnitPg0_data_sz;
--	SasPhyPage0_t		*sasPhyPg0;
--	dma_addr_t		sasPhyPg0_dma;
--	int			sasPhyPg0_data_sz;
--	u16			protocol;
--	int			iocnum;
--	int			rc;
--	int			ii;
--	u64			sas_address;
--	struct mptsas_devinfo	device_info;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--	sasIoUnitPg0=NULL;
--	sasPhyPg0=NULL;
--	sasIoUnitPg0_data_sz=0;
--	sasPhyPg0_data_sz=0;
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_PHY_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--		"Unable to read in csmisas_get_phy_info_buffer struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Fill in the data and return the structure to the calling
--	 * program
--	 */
--	memset(&karg.Information, 0, sizeof(CSMI_SAS_PHY_INFO));
--
--	/* Issue a config request to get the number of phys
--	 */
--	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((
--		    ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: HEADER\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto sas_get_phy_info_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": hdr.ExtPageLength == 0\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto sas_get_phy_info_exit;
--	}
--
--	sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4;
--	rc = -ENOMEM;
--
--	sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev,
--	    sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma);
--
--	if (!sasIoUnitPg0) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto sas_get_phy_info_exit;
--	}
--
--	memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz);
--	cfg.physAddr = sasIoUnitPg0_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((
--		    ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: PAGE\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto sas_get_phy_info_exit;
--	}
--
--	/* Number of Phys. */
--	karg.Information.bNumberOfPhys = sasIoUnitPg0->NumPhys;
--
--	/* Fill in information for each phy. */
--	for (ii = 0; ii < karg.Information.bNumberOfPhys; ii++) {
--
--/* EDM : dump IO Unit Page 0 data*/
--		dcsmisasprintk(("---- IO UNIT PAGE 0 ------------\n"));
--		dcsmisasprintk(("Handle=0x%X\n",
--		    le16_to_cpu(sasIoUnitPg0->PhyData[ii].AttachedDeviceHandle)));
--		dcsmisasprintk(("Controller Handle=0x%X\n",
--		    le16_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerDevHandle)));
--		dcsmisasprintk(("Port=0x%X\n",
--		    sasIoUnitPg0->PhyData[ii].Port));
--		dcsmisasprintk(("Port Flags=0x%X\n",
--		    sasIoUnitPg0->PhyData[ii].PortFlags));
--		dcsmisasprintk(("PHY Flags=0x%X\n",
--		    sasIoUnitPg0->PhyData[ii].PhyFlags));
--		dcsmisasprintk(("Negotiated Link Rate=0x%X\n",
--		    sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate));
--		dcsmisasprintk(("Controller PHY Device Info=0x%X\n",
--		    le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo)));
--		dcsmisasprintk(("DiscoveryStatus=0x%X\n",
--		    le32_to_cpu(sasIoUnitPg0->PhyData[ii].DiscoveryStatus)));
--		dcsmisasprintk(("\n"));
--/* EDM : debug data */
--
--		/* PHY stuff. */
--		karg.Information.Phy[ii].bPortIdentifier =
--		    sasIoUnitPg0->PhyData[ii].Port;
--
--		/* Get the negotiated link rate for the phy. */
--		switch (sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate) {
--
--		case MPI_SAS_IOUNIT0_RATE_PHY_DISABLED:
--			karg.Information.Phy[ii].bNegotiatedLinkRate =
--			    CSMI_SAS_PHY_DISABLED;
--			break;
--
--		case MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION:
--			karg.Information.Phy[ii].bNegotiatedLinkRate =
--			    CSMI_SAS_LINK_RATE_FAILED;
--			break;
--
--		case MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE:
--			break;
--
--		case MPI_SAS_IOUNIT0_RATE_1_5:
--			karg.Information.Phy[ii].bNegotiatedLinkRate =
--			    CSMI_SAS_LINK_RATE_1_5_GBPS;
--			break;
--
--		case MPI_SAS_IOUNIT0_RATE_3_0:
--			karg.Information.Phy[ii].bNegotiatedLinkRate =
--			    CSMI_SAS_LINK_RATE_3_0_GBPS;
--			break;
--
--		case MPI_SAS_IOUNIT0_RATE_UNKNOWN:
--		default:
--			karg.Information.Phy[ii].bNegotiatedLinkRate =
--			    CSMI_SAS_LINK_RATE_UNKNOWN;
--			break;
--		}
--
--		if (sasIoUnitPg0->PhyData[ii].PortFlags &
--		    MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS) {
--			karg.Information.Phy[ii].bAutoDiscover =
--			    CSMI_SAS_DISCOVER_IN_PROGRESS;
--		} else {
--			karg.Information.Phy[ii].bAutoDiscover =
--			    CSMI_SAS_DISCOVER_COMPLETE;
--		}
--
--		/* Issue a config request to get
--		 * phy information.
--		 */
--		hdr.PageVersion = MPI_SASPHY0_PAGEVERSION;
--		hdr.ExtPageLength = 0;
--		hdr.PageNumber = 0;
--		hdr.Reserved1 = 0;
--		hdr.Reserved2 = 0;
--		hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--		hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
--
--		cfg.cfghdr.ehdr = &hdr;
--		cfg.physAddr = -1;
--		cfg.pageAddr = ii;
--		cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--		cfg.dir = 0;	/* read */
--		cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--		if ((rc = mpt_config(ioc, &cfg)) != 0) {
--			dcsmisasprintk((
--			    ": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n"));
--			dcsmisasprintk((": rc=%x\n",rc));
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto sas_get_phy_info_exit;
--		}
--
--		if (hdr.ExtPageLength == 0) {
--			dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto sas_get_phy_info_exit;
--		}
--
--		sasPhyPg0_data_sz = hdr.ExtPageLength * 4;
--		rc = -ENOMEM;
--
--		sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(
--		    ioc->pcidev, sasPhyPg0_data_sz, &sasPhyPg0_dma);
--
--		if (! sasPhyPg0) {
--			dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto sas_get_phy_info_exit;
--		}
--
--		memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz);
--		cfg.physAddr = sasPhyPg0_dma;
--		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--		if ((rc = mpt_config(ioc, &cfg)) != 0) {
--			dcsmisasprintk((
--			    ": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n"));
--			dcsmisasprintk((": rc=%x\n",rc));
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
--			    (u8 *) sasPhyPg0, sasPhyPg0_dma);
--			goto sas_get_phy_info_exit;
--		}
--
--/* EDM : dump PHY Page 0 data*/
--		memcpy(&sas_address, &sasPhyPg0->SASAddress, sizeof(u64));
--		dcsmisasprintk(("---- SAS PHY PAGE 0 ------------\n"));
--		dcsmisasprintk(("Handle=0x%X\n",
--		    le16_to_cpu(sasPhyPg0->AttachedDevHandle)));
--		dcsmisasprintk(("SAS Address=0x%llX\n",
--		    (unsigned long long)sas_address));
--		dcsmisasprintk(("Attached PHY Identifier=0x%X\n",
--		    sasPhyPg0->AttachedPhyIdentifier));
--		dcsmisasprintk(("Attached Device Info=0x%X\n",
--		    le32_to_cpu(sasPhyPg0->AttachedDeviceInfo)));
--		dcsmisasprintk(("Programmed Link Rate=0x%X\n",
--		    sasPhyPg0->ProgrammedLinkRate));
--		dcsmisasprintk(("Hardware Link Rate=0x%X\n",
--		    sasPhyPg0->HwLinkRate));
--		dcsmisasprintk(("Change Count=0x%X\n",
--		    sasPhyPg0->ChangeCount));
--		dcsmisasprintk(("PHY Info=0x%X\n",
--		    le32_to_cpu(sasPhyPg0->PhyInfo)));
--		dcsmisasprintk(("\n"));
--/* EDM : debug data */
--
--		/* save the data */
--
--		/* Set Max hardware link rate.
--		 * This value is hard coded
--		 * because the HW link rate
--		 * is currently being
--		 * overwritten in FW.
--		 */
--
--		/* Set Max hardware link rate. */
--		switch (sasPhyPg0->HwLinkRate &
--		    MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) {
--
--		case MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5:
--			karg.Information.Phy[ii].bMaximumLinkRate =
--			    CSMI_SAS_LINK_RATE_1_5_GBPS;
--			break;
--
--		case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0:
--			karg.Information.Phy[ii].bMaximumLinkRate =
--			    CSMI_SAS_LINK_RATE_3_0_GBPS;
--			break;
--		default:
--			break;
--		}
--
--		/* Set Max programmed link rate. */
--		switch (sasPhyPg0->ProgrammedLinkRate &
--		    MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) {
--
--		case MPI_SAS_PHY0_PRATE_MAX_RATE_1_5:
--			karg.Information.Phy[ii].bMaximumLinkRate |=
--			    (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4);
--			break;
--
--		case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0:
--			karg.Information.Phy[ii].bMaximumLinkRate |=
--			    (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4);
--			break;
--		default:
--			break;
--		}
--
--		/* Set Min hardware link rate. */
--		switch (sasPhyPg0->HwLinkRate &
--		    MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK) {
--
--		case MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5:
--			karg.Information.Phy[ii].bMinimumLinkRate =
--			    CSMI_SAS_LINK_RATE_1_5_GBPS;
--			break;
--
--		case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0:
--			karg.Information.Phy[ii].bMinimumLinkRate =
--			    CSMI_SAS_LINK_RATE_3_0_GBPS;
--			break;
--		default:
--			break;
--		}
--
--		/* Set Min programmed link rate. */
--		switch (sasPhyPg0->ProgrammedLinkRate &
--		    MPI_SAS_PHY0_PRATE_MIN_RATE_MASK) {
--
--		case MPI_SAS_PHY0_PRATE_MIN_RATE_1_5:
--			karg.Information.Phy[ii].bMinimumLinkRate |=
--			    (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4);
--			break;
--
--		case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0:
--			karg.Information.Phy[ii].bMinimumLinkRate |=
--			    (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4);
--			break;
--		default:
--			break;
--		}
--
--		karg.Information.Phy[ii].bPhyChangeCount = sasPhyPg0->ChangeCount;
--		if( sasPhyPg0->PhyInfo & MPI_SAS_PHY0_PHYINFO_VIRTUAL_PHY )
--			karg.Information.Phy[ii].bPhyFeatures = CSMI_SAS_PHY_VIRTUAL_SMP;
--
--		/* Fill in Attached Device
--		 * Initiator Port Protocol.
--		 * Bits 6:3
--		 * More than one bit can be set.
--		 */
--		protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x78;
--		karg.Information.Phy[ii].Attached.bInitiatorPortProtocol = 0;
--		if (protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR)
--		      karg.Information.Phy[ii].Attached.bInitiatorPortProtocol =
--			    CSMI_SAS_PROTOCOL_SSP;
--		if (protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR)
--		     karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_STP;
--		if (protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR)
--		     karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SMP;
--		if (protocol & MPI_SAS_DEVICE_INFO_SATA_HOST)
--		     karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SATA;
--
--		/* Fill in Phy Target Port
--		 * Protocol. Bits 10:7
--		 * More than one bit can be set.
--		 */
--		protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x780;
--		karg.Information.Phy[ii].Attached.bTargetPortProtocol = 0;
--		if (protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET)
--			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SSP;
--		if (protocol & MPI_SAS_DEVICE_INFO_STP_TARGET)
--			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_STP;
--		if (protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET)
--			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SMP;
--		if (protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE)
--			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SATA;
--
--
--		/* Fill in Attached device type */
--		switch (le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) &
--		    MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) {
--
--		case MPI_SAS_DEVICE_INFO_NO_DEVICE:
--			karg.Information.Phy[ii].Attached.bDeviceType =
--			    CSMI_SAS_NO_DEVICE_ATTACHED;
--			break;
--
--		case MPI_SAS_DEVICE_INFO_END_DEVICE:
--			karg.Information.Phy[ii].Attached.bDeviceType =
--			    CSMI_SAS_END_DEVICE;
--			break;
--
--		case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER:
--			karg.Information.Phy[ii].Attached.bDeviceType =
--			    CSMI_SAS_EDGE_EXPANDER_DEVICE;
--			break;
--
--		case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER:
--			karg.Information.Phy[ii].Attached.bDeviceType =
--			    CSMI_SAS_FANOUT_EXPANDER_DEVICE;
--			break;
--		}
--
--		/* Identify Info. */
--		switch (le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) &
--		    MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) {
--
--		case MPI_SAS_DEVICE_INFO_NO_DEVICE:
--			karg.Information.Phy[ii].Identify.bDeviceType =
--			    CSMI_SAS_NO_DEVICE_ATTACHED;
--			break;
--
--		case MPI_SAS_DEVICE_INFO_END_DEVICE:
--			karg.Information.Phy[ii].Identify.bDeviceType =
--			    CSMI_SAS_END_DEVICE;
--			break;
--
--		case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER:
--			karg.Information.Phy[ii].Identify.bDeviceType =
--			    CSMI_SAS_EDGE_EXPANDER_DEVICE;
--			break;
--
--		case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER:
--			karg.Information.Phy[ii].Identify.bDeviceType =
--			    CSMI_SAS_FANOUT_EXPANDER_DEVICE;
--			break;
--		}
--
--		/* Fill in Phy Initiator Port Protocol. Bits 6:3
--		 * More than one bit can be set, fall through cases.
--		 */
--		protocol = le32_to_cpu(
--		    sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) & 0x78;
--		karg.Information.Phy[ii].Identify.bInitiatorPortProtocol = 0;
--		if( protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR )
--		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SSP;
--		if( protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR )
--		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_STP;
--		if( protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR )
--		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SMP;
--		if( protocol & MPI_SAS_DEVICE_INFO_SATA_HOST )
--		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SATA;
--
--		/* Fill in Phy Target Port Protocol. Bits 10:7
--		 * More than one bit can be set, fall through cases.
--		 */
--		protocol = le32_to_cpu(
--		    sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) & 0x780;
--		karg.Information.Phy[ii].Identify.bTargetPortProtocol = 0;
--		if( protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET )
--			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SSP;
--		if( protocol & MPI_SAS_DEVICE_INFO_STP_TARGET )
--			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_STP;
--		if( protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET )
--			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SMP;
--		if( protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE )
--			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
--			    CSMI_SAS_PROTOCOL_SATA;
--
--		/* Setup SAS Address for the attached device */
--		if (sasPhyPg0->AttachedDevHandle) {
--			sas_address = reverse_byte_order64(sas_address);
--			memcpy(karg.Information.Phy[ii].Attached.bSASAddress,
--			    &sas_address, sizeof(u64));
--			karg.Information.Phy[ii].Attached.bPhyIdentifier =
--			    sasPhyPg0->AttachedPhyIdentifier;
--		}
--
--		/* Setup SAS Address for the parent device */
--		csmisas_sas_device_pg0(ioc, &device_info,
--		    (MPI_SAS_DEVICE_PGAD_FORM_HANDLE <<
--		    MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
--		    sasIoUnitPg0->PhyData[ii].ControllerDevHandle);
--		sas_address = reverse_byte_order64(device_info.sas_address);
--		memcpy(karg.Information.Phy[ii].Identify.bSASAddress,
--		    &sas_address, sizeof(u64));
--		karg.Information.Phy[ii].Identify.bPhyIdentifier = ii;
--
--		pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
--		    (u8 *) sasPhyPg0, sasPhyPg0_dma);
--	}
--
--sas_get_phy_info_exit:
--
--	if (sasIoUnitPg0)
--		pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz,
--		    (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--	    sizeof(CSMI_SAS_PHY_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s - "
--		    "Unable to write out csmisas_get_phy_info_buffer @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Set PHY Info command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_set_phy_info(unsigned long arg)
--{
--	CSMI_SAS_SET_PHY_INFO_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_SET_PHY_INFO_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_set_phy_info struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--/* TODO - implement IOCTL here */
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_BAD_CNTL_CODE;
--	dcsmisasprintk((": not implemented\n"));
--
--// cim_set_phy_info_exit:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_set_phy_info @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--
--}
--
--/**
-- * Prototype Routine for the CSMI Sas Get SCSI Address command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_scsi_address(unsigned long arg)
--{
--	CSMI_SAS_GET_SCSI_ADDRESS_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_GET_SCSI_ADDRESS_BUFFER	 karg;
--	MPT_ADAPTER		*ioc = NULL;
--	int			iocnum;
--	u64			sas_address;
--	struct sas_device_info	*sas_info;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg,
--	    sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_get_scsi_address struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--	      "%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* reverse byte order the sas address */
--	memcpy(&sas_address, karg.bSASAddress, sizeof(u64));
--	sas_address = reverse_byte_order64(sas_address);
--
--	/* Search the list for the matching SAS address. */
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SCSI_ADDRESS;
--	karg.bPathId = 0;
--	karg.bTargetId = 0;
--	karg.bLun = 0;
--
--	sas_info = csmisas_get_device_component_by_sas_addr(ioc, sas_address);
--	if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume)
--		goto csmisas_get_scsi_address_exit;
--
--	karg.bPathId = sas_info->os.channel;
--	karg.bTargetId = sas_info->os.id;
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
-- csmisas_get_scsi_address_exit:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--	    sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to write out csmi_sas_get_scsi_address @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI Sas Get SCSI Address command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_sata_signature(unsigned long arg)
--{
--	CSMI_SAS_SATA_SIGNATURE_BUFFER  __user *uarg = (void __user *) arg;
--	CSMI_SAS_SATA_SIGNATURE_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--	int				rc, jj;
--	ConfigExtendedPageHeader_t	hdr;
--	CONFIGPARMS			cfg;
--	SasPhyPage0_t			*sasPhyPg0;
--	dma_addr_t			sasPhyPg0_dma;
--	int				sasPhyPg0_data_sz;
--	SasDevicePage1_t		*sasDevicePg1;
--	dma_addr_t			sasDevicePg1_dma;
--	int				sasDevicePg1_data_sz;
--	u8				phyId;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--	sasPhyPg0=NULL;
--	sasPhyPg0_data_sz=0;
--	sasDevicePg1=NULL;
--	sasDevicePg1_data_sz=0;
--
--	if (copy_from_user(&karg, uarg,
--	     sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_sata_signature struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--	    "%s::%s() @%d - ioc%d not found!\n",
--		     __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	phyId = karg.Signature.bPhyIdentifier;
--	if (phyId >= ioc->num_ports) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST;
--		dcsmisasprintk((": phyId >= ioc->num_ports\n"));
--		goto cim_sata_signature_exit;
--	}
--
--	/* Default to success.*/
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Issue a config request to get the devHandle of the attached device
--	 */
--
--	/* Issue a config request to get phy information. */
--	hdr.PageVersion = MPI_SASPHY0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.pageAddr = phyId;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": hdr.ExtPageLength == 0\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--
--	sasPhyPg0_data_sz = hdr.ExtPageLength * 4;
--	rc = -ENOMEM;
--
--	sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(ioc->pcidev,
--	    sasPhyPg0_data_sz, &sasPhyPg0_dma);
--
--	if (! sasPhyPg0) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--	memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz);
--	cfg.physAddr = sasPhyPg0_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--	/* Make sure a SATA device is attached. */
--	if ((le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) &
--	    MPI_SAS_DEVICE_INFO_SATA_DEVICE) == 0) {
--		dcsmisasprintk((": NOT A SATA DEVICE\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SATA_DEVICE;
--		goto cim_sata_signature_exit;
--	}
--
--	/* Get device page 1 for FIS  signature. */
--	hdr.PageVersion = MPI_SASDEVICE1_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 1 /* page number 1 */;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--
--	cfg.pageAddr = ((MPI_SAS_DEVICE_PGAD_FORM_HANDLE <<
--	    MPI_SAS_DEVICE_PGAD_FORM_SHIFT) |
--	    le16_to_cpu(sasPhyPg0->AttachedDevHandle));
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		dcsmisasprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: HEADER\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		dcsmisasprintk((": hdr.ExtPageLength == 0\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--	sasDevicePg1_data_sz = hdr.ExtPageLength * 4;
--	rc = -ENOMEM;
--
--	sasDevicePg1 = (SasDevicePage1_t *) pci_alloc_consistent
--	    (ioc->pcidev, sasDevicePg1_data_sz, &sasDevicePg1_dma);
--
--	if (! sasDevicePg1) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--	memset((u8 *)sasDevicePg1, 0, sasDevicePg1_data_sz);
--	cfg.physAddr = sasDevicePg1_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		dcsmisasprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: PAGE\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sata_signature_exit;
--	}
--
--/* EDM : dump Device Page 1 data*/
--	dcsmisasprintk(("---- SAS DEVICE PAGE 1 ---------\n"));
--	dcsmisasprintk(("Handle=0x%x\n",sasDevicePg1->DevHandle));
--	dcsmisasprintk(("SAS Address="));
--	for(jj=0;jj<8;jj++)
--		dcsmisasprintk(("%02x ",
--		((u8 *)&sasDevicePg1->SASAddress)[jj]));
--	dcsmisasprintk(("\n"));
--	dcsmisasprintk(("Target ID=0x%x\n",sasDevicePg1->TargetID));
--	dcsmisasprintk(("Bus=0x%x\n",sasDevicePg1->Bus));
--	dcsmisasprintk(("Initial Reg Device FIS="));
--	for(jj=0;jj<20;jj++)
--		dcsmisasprintk(("%02x ",
--		((u8 *)&sasDevicePg1->InitialRegDeviceFIS)[jj]));
--	dcsmisasprintk(("\n\n"));
--/* EDM : debug data */
--
--	memcpy(karg.Signature.bSignatureFIS,
--		sasDevicePg1->InitialRegDeviceFIS,20);
--
-- cim_sata_signature_exit:
--
--	if (sasPhyPg0)
--		pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
--		    (u8 *) sasPhyPg0, sasPhyPg0_dma);
--
--	if (sasDevicePg1)
--		pci_free_consistent(ioc->pcidev, sasDevicePg1_data_sz,
--		    (u8 *) sasDevicePg1, sasDevicePg1_dma);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--	    sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to write out csmi_sas_sata_signature @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI Sas Get SCSI Address command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_device_address(unsigned long arg)
--{
--	CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER	 karg;
--	MPT_ADAPTER		*ioc = NULL;
--	int			iocnum;
--	struct sas_device_info	*sas_info;
--	u64			sas_address;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg,
--	    sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--	   "Unable to read in csmi_sas_get_device_address_buffer struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--	    "%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_DEVICE_ADDRESS;
--	memset(karg.bSASAddress, 0, sizeof(u64));
--	memset(karg.bSASLun, 0, sizeof(karg.bSASLun));
--
--	/* Search the list for the matching SAS address. */
--	sas_info = csmisas_get_device_component_by_os(ioc, karg.bPathId,
--	    karg.bTargetId);
--	if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume)
--		goto csmisas_get_device_address_exit;
--
--	sas_address = reverse_byte_order64(sas_info->sas_address);
--	memcpy(karg.bSASAddress, &sas_address, sizeof(u64));
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
-- csmisas_get_device_address_exit:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--	    sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		"Unable to write out csmi_sas_get_device_address_buffer @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI Sas Get Link Errors command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_link_errors(unsigned long arg)
--{
--	CSMI_SAS_LINK_ERRORS_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_LINK_ERRORS_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t			*mpi_hdr;
--	int				iocnum;
--	int				rc;
--	ConfigExtendedPageHeader_t	hdr;
--	CONFIGPARMS			cfg;
--	SasPhyPage1_t			*sasPhyPage1;
--	dma_addr_t			sasPhyPage1_dma;
--	int				sasPhyPage1_data_sz;
--	SasIoUnitControlRequest_t	*sasIoUnitCntrReq;
--	SasIoUnitControlReply_t		*sasIoUnitCntrReply;
--	u8				phyId;
--	u16				ioc_status;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--	sasPhyPage1=NULL;
--	sasPhyPage1_data_sz=0;
--
--	if (copy_from_user(&karg, uarg,
--	     sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmisas_get_link_errors struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--	    "%s::%s() @%d - ioc%d not found!\n",
--		     __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	phyId = karg.Information.bPhyIdentifier;
--	if (phyId >= ioc->num_ports) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST;
--		dcsmisasprintk((": phyId >= ioc->num_ports\n"));
--		goto cim_get_link_errors_exit;
--	}
--
--	/* Default to success.*/
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Issue a config request to get the devHandle of the attached device
--	 */
--
--	/* Issue a config request to get phy information. */
--	hdr.PageVersion = MPI_SASPHY1_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 1 /* page number 1*/;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.pageAddr = phyId;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: HEADER\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_link_errors_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": hdr.ExtPageLength == 0\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_link_errors_exit;
--	}
--
--
--	sasPhyPage1_data_sz = hdr.ExtPageLength * 4;
--	rc = -ENOMEM;
--
--	sasPhyPage1 = (SasPhyPage1_t *) pci_alloc_consistent(ioc->pcidev,
--	    sasPhyPage1_data_sz, &sasPhyPage1_dma);
--
--	if (! sasPhyPage1) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_link_errors_exit;
--	}
--
--	memset((u8 *)sasPhyPage1, 0, sasPhyPage1_data_sz);
--	cfg.physAddr = sasPhyPage1_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		/* Don't check if this failed.  Already in a
--		 * failure case.
--		 */
--		dcsmisasprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: PAGE\n"));
--		dcsmisasprintk((": rc=%x\n",rc));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_link_errors_exit;
--	}
--
--/* EDM : dump PHY Page 1 data*/
--	dcsmisasprintk(("---- SAS PHY PAGE 1 ------------\n"));
--	dcsmisasprintk(("Invalid Dword Count=0x%x\n",
--	    sasPhyPage1->InvalidDwordCount));
--	dcsmisasprintk(("Running Disparity Error Count=0x%x\n",
--	    sasPhyPage1->RunningDisparityErrorCount));
--	dcsmisasprintk(("Loss Dword Synch Count=0x%x\n",
--	    sasPhyPage1->LossDwordSynchCount));
--	dcsmisasprintk(("PHY Reset Problem Count=0x%x\n",
--	    sasPhyPage1->PhyResetProblemCount));
--	dcsmisasprintk(("\n\n"));
--/* EDM : debug data */
--
--	karg.Information.uInvalidDwordCount =
--		le32_to_cpu(sasPhyPage1->InvalidDwordCount);
--	karg.Information.uRunningDisparityErrorCount =
--		le32_to_cpu(sasPhyPage1->RunningDisparityErrorCount);
--	karg.Information.uLossOfDwordSyncCount =
--		le32_to_cpu(sasPhyPage1->LossDwordSynchCount);
--	karg.Information.uPhyResetProblemCount =
--		le32_to_cpu(sasPhyPage1->PhyResetProblemCount);
--
--	if (karg.Information.bResetCounts ==
--	    CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS ) {
--		goto cim_get_link_errors_exit;
--	}
--
--	/* Clear Error log
--	 *
--	 * Issue IOUNIT Control Reqeust Message
--	 */
--
--	/* Get a MF for this command.
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_link_errors_exit;
--        }
--
--	mpi_hdr = (MPIHeader_t *) mf;
--	sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf;
--	memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t));
--	sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL;
--	sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext;
--	sasIoUnitCntrReq->PhyNum = phyId;
--	sasIoUnitCntrReq->Operation = MPI_SAS_OP_PHY_CLEAR_ERROR_LOG;
--
--	if (csmisas_send_command_wait(ioc, mf, karg.IoctlHeader.Timeout) != 0) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_link_errors_exit;
--	}
--
--	/* process the completed Reply Message Frame */
--	if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) {
--
--		sasIoUnitCntrReply =
--		    (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame;
--		ioc_status = le16_to_cpu(sasIoUnitCntrReply->IOCStatus)
--		    & MPI_IOCSTATUS_MASK;
--
--		if (ioc_status != MPI_IOCSTATUS_SUCCESS) {
--			dcsmisasprintk((": SAS IO Unit Control: "));
--			dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n",
--			    sasIoUnitCntrReply->IOCStatus,
--			    sasIoUnitCntrReply->IOCLogInfo));
--		}
--	}
--
-- cim_get_link_errors_exit:
--
--	if (sasPhyPage1)
--		pci_free_consistent(ioc->pcidev, sasPhyPage1_data_sz,
--		    (u8 *) sasPhyPage1, sasPhyPage1_dma);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--	    sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to write out csmisas_get_link_errors @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--
--}
--
--/**
-- * Prototype Routine for the CSMI SAS SMP Passthru command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_smp_passthru(unsigned long arg)
--{
--	CSMI_SAS_SMP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg;
--	MPT_ADAPTER			*ioc;
--	CSMI_SAS_SMP_PASSTHRU_BUFFER	 karg;
--	pSmpPassthroughRequest_t	smpReq;
--	pSmpPassthroughReply_t		smpReply;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t			*mpi_hdr;
--	char				*psge;
--	int				iocnum, flagsLength;
--	void *				request_data;
--	dma_addr_t			request_data_dma;
--	u32				request_data_sz;
--	void *				response_data;
--	dma_addr_t			response_data_dma;
--	u32				response_data_sz;
--	u16				ioc_status;
--	u64				sas_address;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_smp_passthru struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	request_data = NULL;
--	response_data = NULL;
--	response_data_sz = sizeof(CSMI_SAS_SMP_RESPONSE);
--	request_data_sz  = karg.Parameters.uRequestLength;
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Make sure the adapter is not being reset. */
--	if (!ioc->ioctl) {
--		printk(KERN_ERR "%s@%d::%s - "
--		    "No memory available during driver init.\n",
--		    __FILE__, __LINE__,__FUNCTION__);
--		return -ENOMEM;
--	} else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
--		printk(KERN_ERR "%s@%d::%s - "
--		    "Busy with IOC Reset \n",
--		    __FILE__, __LINE__,__FUNCTION__);
--		return -EBUSY;
--	}
--
--	/* Default to success.*/
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Do some error checking on the request. */
--	if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT;
--		goto cim_smp_passthru_exit;
--	}
--
--	if ((request_data_sz > 0xFFFF) || (!request_data_sz)) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_smp_passthru_exit;
--	}
--
--	/* Get a free request frame and save the message context.
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_smp_passthru_exit;
--        }
--
--	mpi_hdr = (MPIHeader_t *) mf;
--	smpReq = (pSmpPassthroughRequest_t ) mf;
--
--	memset(smpReq,0,ioc->req_sz);
--
--	memcpy(&sas_address, karg.Parameters.bDestinationSASAddress,
--	    sizeof(u64));
--	sas_address = cpu_to_le64(reverse_byte_order64(sas_address));
--	memcpy(&smpReq->SASAddress, &sas_address, sizeof(u64));
--
--	/* Fill in smp request. */
--	smpReq->PhysicalPort = karg.Parameters.bPortIdentifier;
--	smpReq->Function = MPI_FUNCTION_SMP_PASSTHROUGH;
--	smpReq->RequestDataLength = cpu_to_le16(request_data_sz);
--	smpReq->ConnectionRate = karg.Parameters.bConnectionRate;
--	smpReq->MsgContext = mpi_hdr->MsgContext;
--	smpReq->Reserved2 = 0;
--	smpReq->Reserved3 = 0;
--
--	/*
--	 * Prepare the necessary pointers to run
--	 * through the SGL generation
--	 */
--
--	psge = (char *)&smpReq->SGL;
--
--	/* setup the *Request* payload SGE */
--	flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT |
--		MPI_SGE_FLAGS_SYSTEM_ADDRESS |
--		MPI_SGE_FLAGS_32_BIT_ADDRESSING |
--		MPI_SGE_FLAGS_HOST_TO_IOC |
--		MPI_SGE_FLAGS_END_OF_BUFFER;
--
--	if (sizeof(dma_addr_t) == sizeof(u64)) {
--		flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING;
--	}
--	flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT;
--	flagsLength |= request_data_sz;
--
--	request_data = pci_alloc_consistent(
--	    ioc->pcidev, request_data_sz, &request_data_dma);
--
--	if (!request_data) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		mpt_free_msg_frame(ioc, mf);
--		goto cim_smp_passthru_exit;
--	}
--
--	mpt_add_sge(psge, flagsLength, request_data_dma);
--	psge += (sizeof(u32) + sizeof(dma_addr_t));
--
--	memcpy(request_data,&karg.Parameters.Request,request_data_sz);
--
--	/* setup the *Response* payload SGE */
--	response_data = pci_alloc_consistent(
--	    ioc->pcidev, response_data_sz, &response_data_dma);
--
--	if (!response_data) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		mpt_free_msg_frame(ioc, mf);
--		goto cim_smp_passthru_exit;
--	}
--
--	flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT |
--		MPI_SGE_FLAGS_SYSTEM_ADDRESS |
--		MPI_SGE_FLAGS_32_BIT_ADDRESSING |
--		MPI_SGE_FLAGS_IOC_TO_HOST |
--		MPI_SGE_FLAGS_END_OF_BUFFER;
--
--	if (sizeof(dma_addr_t) == sizeof(u64)) {
--		flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING;
--	}
--
--	flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT;
--	flagsLength |= response_data_sz;
--
--	mpt_add_sge(psge, flagsLength, response_data_dma);
--
--	if (csmisas_send_command_wait(ioc, mf, karg.IoctlHeader.Timeout) != 0) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_smp_passthru_exit;
--	}
--
--	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) {
--		dcsmisasprintk((": SMP Passthru: oh no, there is no reply!!"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_smp_passthru_exit;
--	}
--
--	/* process the completed Reply Message Frame */
--	smpReply = (pSmpPassthroughReply_t )ioc->ioctl->ReplyFrame;
--	ioc_status = le16_to_cpu(smpReply->IOCStatus) & MPI_IOCSTATUS_MASK;
--
--	if ((ioc_status != MPI_IOCSTATUS_SUCCESS) &&
--	    (ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		dcsmisasprintk((": SMP Passthru: "));
--		dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n",
--		    le16_to_cpu(smpReply->IOCStatus),
--		    le32_to_cpu(smpReply->IOCLogInfo),
--		    smpReply->SASStatus));
--		goto cim_smp_passthru_exit;
--	}
--
--	karg.Parameters.bConnectionStatus =
--	    map_sas_status_to_csmi(smpReply->SASStatus);
--
--
--	if (le16_to_cpu(smpReply->ResponseDataLength)) {
--		karg.Parameters.uResponseBytes = le16_to_cpu(smpReply->ResponseDataLength);
--		memcpy(&karg.Parameters.Response,
--		    response_data, le16_to_cpu(smpReply->ResponseDataLength));
--	}
--
-- cim_smp_passthru_exit:
--
--	if (request_data)
--		pci_free_consistent(ioc->pcidev, request_data_sz,
--		    (u8 *)request_data, request_data_dma);
--
--	if (response_data)
--		pci_free_consistent(ioc->pcidev, response_data_sz,
--		    (u8 *)response_data, response_data_dma);
--
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_smp_passthru @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk((": %s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS SSP Passthru command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int csmisas_ssp_passthru(unsigned long arg)
--{
--	CSMI_SAS_SSP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_SSP_PASSTHRU_BUFFER	 karg_hdr, * karg;
--	MPT_ADAPTER			*ioc = NULL;
--	pSCSIIORequest_t		pScsiRequest;
--	pSCSIIOReply_t			pScsiReply;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t 			*mpi_hdr;
--	int				iocnum,ii;
--	u64				sas_address;
--	u16				req_idx;
--	char				*psge;
--	int				flagsLength;
--	void *				request_data;
--	dma_addr_t			request_data_dma;
--	u32				request_data_sz;
--	int				malloc_data_sz;
--	int				memory_pages;
--	u16				ioc_status;
--	u8 				volume_id;
--	u8				volume_bus;
--	u8				is_hidden_raid_component;
--	u8				channel;
--	u8				id;
--	struct sas_device_info		*sas_info;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg_hdr, uarg, sizeof(CSMI_SAS_SSP_PASSTHRU_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_ssp_passthru struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	request_data = NULL;
--	request_data_sz = karg_hdr.Parameters.uDataLength;
--	channel = 0;
--	id = 0;
--	volume_id = 0;
--	volume_bus = 0;
--	is_hidden_raid_component = 0;
--
--	malloc_data_sz = (request_data_sz +
--	    offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer));
--	memory_pages = get_order(malloc_data_sz);
--	karg = (CSMI_SAS_SSP_PASSTHRU_BUFFER *)__get_free_pages(
--		GFP_KERNEL, memory_pages);
--	if (!karg){
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to malloc SAS_SSP_PASSTHRU_BUFFER "
--			"malloc_data_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			malloc_data_sz, memory_pages);
--		return -ENOMEM;
--	}
--
--	dcsmisasprintk((KERN_ERR "%s@%d::%s() - "
--			"malloc'ed SAS_SSP_PASSTHRU_BUFFER "
--			"malloc_data_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			malloc_data_sz, memory_pages));
--
--	memset(karg, 0, sizeof(*karg));
--
--	if (copy_from_user(karg, uarg, request_data_sz +
--	    offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_ssp_passthru struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)karg, memory_pages);
--		return -EFAULT;
--	}
--
--	/*
--	 * some checks of the incoming frame
--	 */
--	if ( offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer) +
--	    request_data_sz - sizeof(IOCTL_HEADER) >
--	    karg->IoctlHeader.Length ) {
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s()"
--		    " @%d - expected datalen incorrect!\n",
--		    __FILE__, __FUNCTION__, __LINE__));
--		goto cim_ssp_passthru_exit;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg->IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		goto cim_ssp_passthru_exit;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s()"
--		    " @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		goto cim_ssp_passthru_exit;
--	}
--
--	/* Default to success.
--	 */
--	karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Neither a phy nor a port has been selected.
--	 */
--	if ((karg->Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) &&
--		(karg->Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) {
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s()"
--		    " @%d - incorrect bPhyIdentifier and bPortIdentifier!\n",
--		    __FILE__, __FUNCTION__, __LINE__));
--		goto cim_ssp_passthru_exit;
--	}
--
--	/* A phy has been selected. Verify that it's valid.
--	 */
--	if (karg->Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) {
--
--		/* Is the phy in range? */
--		if (karg->Parameters.bPhyIdentifier >= ioc->num_ports) {
--			dcsmisasprintk((": phyId >= ioc->num_ports (%d %d)\n",
--			    karg->Parameters.bPhyIdentifier,
--			    ioc->num_ports));
--			karg->IoctlHeader.ReturnCode =
--			    CSMI_SAS_PHY_DOES_NOT_EXIST;
--			goto cim_ssp_passthru_exit;
--		}
--	}
--
--	if(karg->Parameters.bAdditionalCDBLength) {
--	/* TODO - SCSI IO (32) Request Message support
--	 */
--		dcsmisasprintk((": greater than 16-byte cdb is not supported!\n"));
--		karg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		goto cim_ssp_passthru_exit;
--	}
--
--	/* we will use SAS address to resolve the scsi adddressing
--	 */
--	memcpy(&sas_address, karg->Parameters.bDestinationSASAddress,
--	    sizeof(u64));
--	sas_address = reverse_byte_order64(sas_address);
--
--	/* Search the list for the matching SAS address.
--	 */
--	sas_info = csmisas_get_device_component_by_sas_addr(ioc, sas_address);
--	if (!sas_info || sas_info->is_cached) {
--		/*
--		 *Invalid SAS address
--		 */
--		karg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s()"
--		    " @%d - couldn't find associated SASAddress=%llX!\n",
--		    __FILE__, __FUNCTION__, __LINE__, sas_address));
--		goto cim_ssp_passthru_exit;
--	}
--
--	id = sas_info->fw.id;
--	channel = sas_info->fw.channel;
--
--	if (csmisas_is_phys_disk(ioc, channel, id)) {
--		id = csmisas_raid_id_to_num(ioc, channel, id);
--		channel = 0;
--		is_hidden_raid_component = 1;
--	}
--
--	/* Get a free request frame and save the message context.
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_ssp_passthru_exit;
--        }
--
--	mpi_hdr = (MPIHeader_t *) mf;
--	pScsiRequest = (pSCSIIORequest_t) mf;
--	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--
--	memset(pScsiRequest,0,sizeof(SCSIIORequest_t));
--
--	/* Fill in SCSI IO (16) request.
--	 */
--
--	pScsiRequest->Function = (is_hidden_raid_component == 1) ?
--	    MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH : MPI_FUNCTION_SCSI_IO_REQUEST;
--	pScsiRequest->TargetID = id;
--	pScsiRequest->Bus = channel;
--	memcpy(pScsiRequest->LUN, &karg->Parameters.bLun, 8);
--	pScsiRequest->CDBLength = karg->Parameters.bCDBLength;
--	pScsiRequest->DataLength = cpu_to_le32(request_data_sz);
--	pScsiRequest->MsgContext = mpi_hdr->MsgContext;
--	memcpy(pScsiRequest->CDB, karg->Parameters.bCDB,
--	    pScsiRequest->CDBLength);
--
--	#if defined(MPT_DEBUG_CSMISAS)
--	{
--	int k;
--		printk("\tchannel=%d id=%d ", sas_info->fw.channel,
--		    sas_info->fw.id);
--		if (is_hidden_raid_component)
--			printk("num_id=%d ", id);
--		printk("\n");
--		printk("\tcdb_len = %d data_len=%d\n",
--		    pScsiRequest->CDBLength, request_data_sz);
--		printk("\t");
--		for (k = 0; k < pScsiRequest->CDBLength; ++k)
--			printk(" %02x", pScsiRequest->CDB[k]);
--		printk("\n");
--	}
--	#endif
--
--	/* direction
--	 */
--	if (karg->Parameters.uFlags & CSMI_SAS_SSP_READ) {
--		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ);
--	} else if (karg->Parameters.uFlags & CSMI_SAS_SSP_WRITE) {
--		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_WRITE);
--	} else if ((karg->Parameters.uFlags & CSMI_SAS_SSP_UNSPECIFIED) &&
--	    (!karg->Parameters.uDataLength)) {
--		/* no data transfer
--		 */
--		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_NODATATRANSFER);
--	} else {
--		/* no direction specified
--		 */
--		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ);
--		pScsiRequest->MsgFlags =
--		    MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR;
--	}
--
--	pScsiRequest->MsgFlags |= mpt_msg_flags();
--	/* task attributes
--	 */
--	if((karg->Parameters.uFlags && 0xFF) == 0) {
--		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ);
--	} else if (karg->Parameters.uFlags &
--	    CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE) {
--		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_HEADOFQ);
--	} else if (karg->Parameters.uFlags &
--	    CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED) {
--		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ORDEREDQ);
--	} else if (karg->Parameters.uFlags &
--	    CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA) {
--		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ACAQ);
--	} else {
--		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_UNTAGGED);
--	}
--
--	/* setup sense
--	 */
--	pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
--	pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma +
--	    (req_idx * MPT_SENSE_BUFFER_ALLOC));
--
--	/* setup databuffer sg, assuming we fit everything one contiguous buffer
--	 */
--	psge = (char *)&pScsiRequest->SGL;
--
--	if (karg->Parameters.uFlags & CSMI_SAS_SSP_WRITE) {
--		flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE;
--	} else if (karg->Parameters.uFlags & CSMI_SAS_SSP_READ) {
--		flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
--	}else {
--		flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT |
--				MPI_SGE_FLAGS_DIRECTION |
--				mpt_addr_size() )
--				<< MPI_SGE_FLAGS_SHIFT;
--	}
--	flagsLength |= request_data_sz;
--
--	if ( request_data_sz > 0) {
--		request_data = pci_alloc_consistent(
--		    ioc->pcidev, request_data_sz, &request_data_dma);
--
--		if (request_data == NULL) {
--			dcsmisasprintk((": pci_alloc_consistent: FAILED "
--			    "request_data_sz=%d\n", request_data_sz));
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			mpt_free_msg_frame(ioc, mf);
--			goto cim_ssp_passthru_exit;
--		}
--
--		mpt_add_sge(psge, flagsLength, request_data_dma);
--		if (karg->Parameters.uFlags & CSMI_SAS_SSP_WRITE)
--			memcpy(request_data, karg->bDataBuffer, request_data_sz);
--	} else {
--		mpt_add_sge(psge, flagsLength, (dma_addr_t) -1);
--	}
--
--	if (csmisas_send_command_wait(ioc, mf, karg->IoctlHeader.Timeout) != 0) {
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_ssp_passthru_exit;
--	}
--
--	memset(&karg->Status,0,sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS));
--	karg->Status.bConnectionStatus = CSMI_SAS_OPEN_ACCEPT;
--	karg->Status.bDataPresent = CSMI_SAS_SSP_NO_DATA_PRESENT;
--	karg->Status.bStatus = GOOD;
--	karg->Status.bResponseLength[0] = 0;
--	karg->Status.bResponseLength[1] = 0;
--	karg->Status.uDataBytes = request_data_sz;
--
--	/* process the completed Reply Message Frame */
--	if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) {
--
--		pScsiReply = (pSCSIIOReply_t ) ioc->ioctl->ReplyFrame;
--		karg->Status.bStatus = pScsiReply->SCSIStatus;
--		karg->Status.uDataBytes = min(le32_to_cpu(pScsiReply->TransferCount),
--		    request_data_sz);
--		ioc_status = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK;
--
--		if (pScsiReply->SCSIState ==
--		    MPI_SCSI_STATE_AUTOSENSE_VALID) {
--			karg->Status.bConnectionStatus =
--			    CSMI_SAS_SSP_SENSE_DATA_PRESENT;
--			karg->Status.bResponseLength[0] =
--				(u8)le32_to_cpu(pScsiReply->SenseCount) & 0xFF;
--			memcpy(karg->Status.bResponse,
--			    ioc->ioctl->sense, le32_to_cpu(pScsiReply->SenseCount));
--		} else if(pScsiReply->SCSIState ==
--		    MPI_SCSI_STATE_RESPONSE_INFO_VALID) {
--			karg->Status.bDataPresent =
--			    CSMI_SAS_SSP_RESPONSE_DATA_PRESENT;
--			karg->Status.bResponseLength[0] =
--				sizeof(pScsiReply->ResponseInfo);
--			for (ii=0;ii<sizeof(pScsiReply->ResponseInfo);ii++) {
--				karg->Status.bResponse[ii] =
--				((u8*)&pScsiReply->ResponseInfo)[
--				    (sizeof(pScsiReply->ResponseInfo)-1)-ii];
--			}
--		} else if ((ioc_status != MPI_IOCSTATUS_SUCCESS) &&
--		    (ioc_status !=  MPI_IOCSTATUS_SCSI_RECOVERED_ERROR) &&
--		    (ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) {
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			dcsmisasprintk((": SCSI IO : "));
--			dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n",
--			    pScsiReply->IOCStatus,
--			    pScsiReply->IOCLogInfo));
--		}
--	}
--
--	if ((karg->Status.uDataBytes) && (request_data) &&
--	    (karg->Parameters.uFlags & CSMI_SAS_SSP_READ)) {
--		if (copy_to_user((char *)uarg->bDataBuffer,
--		    request_data, karg->Status.uDataBytes)) {
--			printk(KERN_ERR "%s@%d::%s - "
--			    "Unable to write data to user %p\n",
--			    __FILE__, __LINE__,__FUNCTION__,
--			    (void*)karg->bDataBuffer);
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		}
--	}
--
-- cim_ssp_passthru_exit:
--
--
--	if (request_data)
--		pci_free_consistent(ioc->pcidev, request_data_sz,
--		    (u8 *)request_data, request_data_dma);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, karg,
--	    offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER, bDataBuffer))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_ssp_passthru @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)karg, memory_pages);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	free_pages((unsigned long)karg, memory_pages);
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS STP Passthru command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_stp_passthru(unsigned long arg)
--{
--	CSMI_SAS_STP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_STP_PASSTHRU_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	pSataPassthroughRequest_t  	pSataRequest;
--	pSataPassthroughReply_t		pSataReply;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t 			*mpi_hdr;
--	int				iocnum;
--	u32				data_sz;
--	u64				sas_address;
--	u16				req_idx;
--	char				*psge;
--	int				flagsLength;
--	void *				request_data;
--	dma_addr_t			request_data_dma;
--	u32				request_data_sz;
--	u8				channel;
--	u8				id;
--	u8 				volume_id;
--	u8				volume_bus;
--	struct sas_device_info		*sas_info;
--	u16				ioc_status;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	request_data=NULL;
--	request_data_sz = karg.Parameters.uDataLength;
--	volume_id = 0;
--	volume_bus = 0;
--	channel = 0;
--	id = 0;
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Default to success.
--	 */
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* Neither a phy nor a port has been selected.
--	 */
--	if ((karg.Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) &&
--		(karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - incorrect bPhyIdentifier and bPortIdentifier!\n",
--		    __FILE__,__FUNCTION__, __LINE__));
--		goto cim_stp_passthru_exit;
--	}
--
--	/* A phy has been selected. Verify that it's valid.
--	 */
--	if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) {
--
--		/* Is the phy in range? */
--		if (karg.Parameters.bPhyIdentifier >= ioc->num_ports) {
--			karg.IoctlHeader.ReturnCode =
--			    CSMI_SAS_PHY_DOES_NOT_EXIST;
--			goto cim_stp_passthru_exit;
--		}
--	}
--
--	/* some checks of the incoming frame
--	 */
--	if (request_data_sz > 0xFFFF) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - uDataLength > 0xFFFF!\n",
--		    __FILE__, __FUNCTION__, __LINE__));
--		goto cim_stp_passthru_exit;
--	}
--
--	data_sz = sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER) -
--	    sizeof(IOCTL_HEADER) - sizeof(u8*) +
--	    request_data_sz;
--
--	if ( data_sz > karg.IoctlHeader.Length ) {
--		karg.IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - expected datalen incorrect!\n",
--		    __FILE__, __FUNCTION__,__LINE__));
--		goto cim_stp_passthru_exit;
--	}
--
--
--	/* we will use SAS address to resolve the scsi adddressing
--	 */
--	memcpy(&sas_address, karg.Parameters.bDestinationSASAddress,
--	    sizeof(u64));
--	sas_address = reverse_byte_order64(sas_address);
--
--	/* Search the list for the matching SAS address.
--	 */
--	sas_info = csmisas_get_device_component_by_sas_addr(ioc, sas_address);
--	if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume) {
--		/*
--		 *Invalid SAS address
--		 */
--		karg.IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s()"
--		    " @%d - couldn't find associated SASAddress=%llX!\n",
--		    __FILE__, __FUNCTION__, __LINE__, sas_address));
--		goto cim_stp_passthru_exit;
--	}
--
--	id = sas_info->fw.id;
--	channel = sas_info->fw.channel;
--
--	/* check that this is an STP or SATA target device
--	 */
--	if ( !(sas_info->device_info & MPI_SAS_DEVICE_INFO_STP_TARGET ) &&
--	     !(sas_info->device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE )) {
--		karg.IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		goto cim_stp_passthru_exit;
--	}
--
--	/* Get a free request frame and save the message context.
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_stp_passthru_exit;
--        }
--
--	mpi_hdr = (MPIHeader_t *) mf;
--	pSataRequest = (pSataPassthroughRequest_t) mf;
--	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--
--	memset(pSataRequest,0,sizeof(pSataPassthroughRequest_t));
--
--	pSataRequest->TargetID = id;
--	pSataRequest->Bus = channel;
--	pSataRequest->Function = MPI_FUNCTION_SATA_PASSTHROUGH;
--	pSataRequest->PassthroughFlags = cpu_to_le16(karg.Parameters.uFlags);
--	pSataRequest->ConnectionRate = karg.Parameters.bConnectionRate;
--	pSataRequest->MsgContext = mpi_hdr->MsgContext;
--	pSataRequest->DataLength = cpu_to_le32(request_data_sz);
--	pSataRequest->MsgFlags = 0;
--	memcpy( pSataRequest->CommandFIS,karg.Parameters.bCommandFIS, 20);
--
--	psge = (char *)&pSataRequest->SGL;
--	if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) {
--		flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE;
--	} else if (karg.Parameters.uFlags & CSMI_SAS_STP_READ) {
--		flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
--	}else {
--		flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT |
--				MPI_SGE_FLAGS_DIRECTION |
--				mpt_addr_size() )
--				<< MPI_SGE_FLAGS_SHIFT;
--	}
--
--	flagsLength |= request_data_sz;
--	if (request_data_sz > 0) {
--		request_data = pci_alloc_consistent(
--		    ioc->pcidev, request_data_sz, &request_data_dma);
--
--		if (request_data == NULL) {
--			dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			mpt_free_msg_frame(ioc, mf);
--			goto cim_stp_passthru_exit;
--		}
--
--		mpt_add_sge(psge, flagsLength, request_data_dma);
--		if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) {
--			if (copy_from_user(request_data,
--			    karg.bDataBuffer,
--			    request_data_sz)) {
--				printk(KERN_ERR
--				    "%s::%s() @%d - Unable to read user data "
--				    "struct @ %p\n",
--				    __FILE__, __FUNCTION__, __LINE__,
--				    (void*)karg.bDataBuffer);
--				karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--				mpt_free_msg_frame(ioc, mf);
--				goto cim_stp_passthru_exit;
--			}
--		}
--	} else {
--		mpt_add_sge(psge, flagsLength, (dma_addr_t) -1);
--	}
--
--	if (csmisas_send_command_wait(ioc, mf, karg.IoctlHeader.Timeout) != 0) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_stp_passthru_exit;
--	}
--
--	memset(&karg.Status,0,sizeof(CSMI_SAS_STP_PASSTHRU_STATUS));
--
--	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) {
--		dcsmisasprintk((": STP Passthru: oh no, there is no reply!!"));
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_stp_passthru_exit;
--	}
--
--	/* process the completed Reply Message Frame */
--	pSataReply = (pSataPassthroughReply_t ) ioc->ioctl->ReplyFrame;
--	ioc_status = le16_to_cpu(pSataReply->IOCStatus) & MPI_IOCSTATUS_MASK;
--
--	if (ioc_status != MPI_IOCSTATUS_SUCCESS &&
--	    ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		dcsmisasprintk((": STP Passthru: "));
--		dcsmisasprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n",
--		    le16_to_cpu(pSataReply->IOCStatus),
--		    le32_to_cpu(pSataReply->IOCLogInfo),
--		    pSataReply->SASStatus));
--	}
--
--	karg.Status.bConnectionStatus =
--	    map_sas_status_to_csmi(pSataReply->SASStatus);
--
--	memcpy(karg.Status.bStatusFIS,pSataReply->StatusFIS, 20);
--
--	/*
--	 * for now, just zero out uSCR array,
--	 * then copy the one dword returned
--	 * in the reply frame into uSCR[0]
--	 */
--	memset( karg.Status.uSCR, 0, 64);
--	karg.Status.uSCR[0] = le32_to_cpu(pSataReply->StatusControlRegisters);
--
--	if((le32_to_cpu(pSataReply->TransferCount)) && (request_data) &&
--	    (karg.Parameters.uFlags & CSMI_SAS_STP_READ)) {
--		karg.Status.uDataBytes =
--		    min(le32_to_cpu(pSataReply->TransferCount),request_data_sz);
--		if (copy_to_user((char *)uarg->bDataBuffer,
--		    request_data, karg.Status.uDataBytes)) {
--			printk(KERN_ERR "%s::%s() @%d - "
--			    "Unable to write data to user %p\n",
--			    __FILE__, __FUNCTION__, __LINE__,
--			    (void*)karg.bDataBuffer);
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		}
--	}
--
-- cim_stp_passthru_exit:
--
--	if (request_data)
--		pci_free_consistent(ioc->pcidev, request_data_sz,
--		    (u8 *)request_data, request_data_dma);
--
--	/* Copy th data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--	    offsetof(CSMI_SAS_STP_PASSTHRU_BUFFER,bDataBuffer))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_ssp_passthru @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk((": %s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Firmware Download command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_firmware_download(unsigned long arg)
--{
--	CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--	pMpiFwHeader_t			pFwHeader=NULL;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg,
--		sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_firmware_download struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	/* Default to success.*/
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--	karg.Information.usStatus = CSMI_SAS_FWD_SUCCESS;
--	karg.Information.usSeverity = CSMI_SAS_FWD_INFORMATION;
--
--	/* some checks of the incoming frame */
--	if ((karg.Information.uBufferLength +
--	    sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD)) >
--	    karg.IoctlHeader.Length) {
--		karg.IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		karg.Information.usStatus = CSMI_SAS_FWD_FAILED;
--		goto cim_firmware_download_exit;
--	}
--
--	if ( karg.Information.uDownloadFlags &
--	    (CSMI_SAS_FWD_SOFT_RESET | CSMI_SAS_FWD_VALIDATE)) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		karg.Information.usStatus = CSMI_SAS_FWD_REJECT;
--		karg.Information.usSeverity = CSMI_SAS_FWD_ERROR;
--		goto cim_firmware_download_exit;
--	}
--
--	/* now we need to alloc memory so we can pull in the
--	 * fw image attached to end of incoming packet.
--	 */
--	pFwHeader = kmalloc(karg.Information.uBufferLength, GFP_KERNEL);
--	if (!pFwHeader){
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		karg.Information.usStatus = CSMI_SAS_FWD_REJECT;
--		karg.Information.usSeverity = CSMI_SAS_FWD_ERROR;
--		goto cim_firmware_download_exit;
--	}
--	memset(pFwHeader, 0, sizeof(*pFwHeader));
--
--	if (copy_from_user(pFwHeader, uarg->bDataBuffer,
--		karg.Information.uBufferLength)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in pFwHeader @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if ( !((pFwHeader->Signature0 == MPI_FW_HEADER_SIGNATURE_0) &&
--	    (pFwHeader->Signature1 == MPI_FW_HEADER_SIGNATURE_1) &&
--	    (pFwHeader->Signature2 == MPI_FW_HEADER_SIGNATURE_2))) {
--		// the signature check failed
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		karg.Information.usStatus = CSMI_SAS_FWD_REJECT;
--		karg.Information.usSeverity = CSMI_SAS_FWD_ERROR;
--		goto cim_firmware_download_exit;
--	}
--
--	if ( mptctl_do_fw_download(karg.IoctlHeader.IOControllerNumber,
--	    uarg->bDataBuffer, karg.Information.uBufferLength)
--	    != 0) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		karg.Information.usStatus = CSMI_SAS_FWD_FAILED;
--		karg.Information.usSeverity = CSMI_SAS_FWD_FATAL;
--		goto cim_firmware_download_exit;
--	}
--
--	if((karg.Information.uDownloadFlags & CSMI_SAS_FWD_SOFT_RESET) ||
--	    (karg.Information.uDownloadFlags & CSMI_SAS_FWD_HARD_RESET)) {
--		if (mpt_HardResetHandler(ioc, CAN_SLEEP) != 0) {
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			karg.Information.usStatus = CSMI_SAS_FWD_FAILED;
--			karg.Information.usSeverity = CSMI_SAS_FWD_FATAL;
--		}
--	}
--
-- cim_firmware_download_exit:
--
--	if(pFwHeader)
--		kfree(pFwHeader);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_firmware_download @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Get RAID Info command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_raid_info(unsigned long arg)
--{
--	CSMI_SAS_RAID_INFO_BUFFER __user *uarg =  (void __user *) arg;
--	CSMI_SAS_RAID_INFO_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--	u32				raidFlags;
--	u8				maxRaidTypes;
--	u8				maxDrivesPerSet;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_get_raid_info struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--	if (!ioc->raid_data.pIocPg2)
--		goto csmisas_get_raid_info_out;
--	karg.Information.uNumRaidSets =
--	    ioc->raid_data.pIocPg2->NumActiveVolumes;
--	karg.Information.uMaxRaidSets = ioc->raid_data.pIocPg2->MaxVolumes;
--	if( ioc->raid_data.pIocPg6 ) {
--		// get absolute maximum for all RAID sets
--		maxDrivesPerSet = ioc->raid_data.pIocPg6->MaxDrivesIS;
--		maxDrivesPerSet = max(ioc->raid_data.pIocPg6->MaxDrivesIM,
--		    maxDrivesPerSet);
--		maxDrivesPerSet = max(ioc->raid_data.pIocPg6->MaxDrivesIME,
--		    maxDrivesPerSet);
--		karg.Information.uMaxDrivesPerSet = maxDrivesPerSet;
--	}
--	else
--		karg.Information.uMaxDrivesPerSet = 8;
--	// For bMaxRaidSets, count bits set in bits 0-6 of CapabilitiesFlags
--	raidFlags = ioc->raid_data.pIocPg2->CapabilitiesFlags & 0x0000007F;
--	for( maxRaidTypes=0; raidFlags; maxRaidTypes++ )
--		raidFlags &= raidFlags - 1;
--	karg.Information.bMaxRaidTypes = maxRaidTypes;
--	// ulMinRaidSetBlocks hard coded to 1MB until available from config page
--	karg.Information.ulMinRaidSetBlocks.uLowPart = 2048;
--	karg.Information.ulMinRaidSetBlocks.uHighPart = 0;
--	karg.Information.ulMaxRaidSetBlocks.uLowPart = 0xffffffff;
--	if( ioc->raid_data.pIocPg2->CapabilitiesFlags &
--	    MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING )
--		karg.Information.ulMaxRaidSetBlocks.uHighPart = 0xffffffff;
--	else
--		karg.Information.ulMaxRaidSetBlocks.uHighPart = 0;
--	karg.Information.uMaxPhysicalDrives =
--	    ioc->raid_data.pIocPg2->MaxPhysDisks;
--	karg.Information.uMaxExtents = 1;
--	karg.Information.uMaxModules = 0;
--	karg.Information.uMaxTransformationMemory = 0;
--	karg.Information.uChangeCount = ioc->csmi_change_count;
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--csmisas_get_raid_info_out:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_RAID_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_get_raid_info @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- *	csmisas_do_raid - Format and Issue a RAID volume request message.
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *	@action: What do be done.
-- *	@PhysDiskNum: Logical target id.
-- *	@VolumeBus: Target locations bus.
-- *	@VolumeId: Volume id
-- *
-- *	Returns: < 0 on a fatal error
-- *		0 on success
-- *
-- *	Remark: Wait to return until reply processed by the ISR.
-- **/
--static int
--csmisas_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus, u8 VolumeId, pMpiRaidActionReply_t reply)
--{
--	MpiRaidActionRequest_t	*pReq;
--	MpiRaidActionReply_t	*pReply;
--	MPT_FRAME_HDR		*mf;
--
--	/* Get and Populate a free Frame
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		return -EAGAIN;
--	}
--	pReq = (MpiRaidActionRequest_t *)mf;
--	pReq->Action = action;
--	pReq->Reserved1 = 0;
--	pReq->ChainOffset = 0;
--	pReq->Function = MPI_FUNCTION_RAID_ACTION;
--	pReq->VolumeID = VolumeId;
--	pReq->VolumeBus = VolumeBus;
--	pReq->PhysDiskNum = PhysDiskNum;
--	pReq->MsgFlags = 0;
--	pReq->Reserved2 = 0;
--	pReq->ActionDataWord = 0; /* Reserved for this action */
--	//pReq->ActionDataSGE = 0;
--
--	mpt_add_sge((char *)&pReq->ActionDataSGE,
--		MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
--
--	if (csmisas_send_command_wait(ioc, mf, MPT_IOCTL_DEFAULT_TIMEOUT) != 0)
--		return -ENODATA;
--
--	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) &&
--	    (reply != NULL)){
--		pReply = (MpiRaidActionReply_t *)&(ioc->ioctl->ReplyFrame);
--		memcpy(reply, pReply,
--			min(ioc->reply_sz,
--			4*pReply->MsgLength));
--	}
--
--	return 0;
--}
--
--/**
-- * csmisas_raid_inq
-- * @ioc = per host instance
-- * @opcode = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH or
-- *  	     MPI_FUNCTION_SCSI_IO_REQUEST
-- * @id = target id
-- * @bus = target bus
-- * @inq_vpd = inquiry data, returned
-- * @inq_vpd_sz = maximum size of inquiry data
-- *
-- * Return = 0(sucess), non-zero(failure)
-- **/
--static int
--csmisas_raid_inq(MPT_ADAPTER *ioc, u8 opcode, u8 bus, u8 id, u8 inq_vpd_page,
--    u8 * inq_vpd, u32 inq_vpd_sz)
--{
--	MPT_FRAME_HDR		*mf = NULL;
--	MPIHeader_t 		*mpi_hdr;
--	pSCSIIORequest_t	pScsiRequest;
--	u16		       	req_idx;
--	char		    	*psge;
--	u8 		        inq_vpd_cdb[6];
--	u8 		        *request_data=NULL;
--	dma_addr_t	    	request_data_dma;
--	u32		        request_data_sz;
--	int		    	rc = 0;
--
--	request_data_sz = inq_vpd_sz;
--
--	/* fill-in cdb */
--	memset(inq_vpd_cdb, 0, sizeof(inq_vpd_cdb));
--	inq_vpd_cdb[0] = 0x12;
--	if (inq_vpd_page) {
--		inq_vpd_cdb[1] = 0x01; /* evpd bit */
--		inq_vpd_cdb[2] = inq_vpd_page;
--	}
--	inq_vpd_cdb[3] = (u8)(request_data_sz >> 8);
--	inq_vpd_cdb[4] = (u8)request_data_sz;
--
--	/* Get a free request frame and save the message context.
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		goto csmisas_raid_inq_exit;
--	}
--
--	mpi_hdr = (MPIHeader_t *) mf;
--	pScsiRequest = (pSCSIIORequest_t) mf;
--	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--
--	memset(pScsiRequest,0,sizeof(SCSIIORequest_t));
--	pScsiRequest->Function = opcode;
--	pScsiRequest->TargetID = id;
--	pScsiRequest->Bus = bus;
--	pScsiRequest->CDBLength = 6;
--	pScsiRequest->DataLength = cpu_to_le32(request_data_sz);
--	pScsiRequest->MsgContext = mpi_hdr->MsgContext;
--	memcpy(pScsiRequest->CDB,inq_vpd_cdb,pScsiRequest->CDBLength);
--	pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ);
--	pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ);
--	pScsiRequest->MsgFlags = mpt_msg_flags();
--
--	/* setup sense
--	 */
--	pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
--	pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma +
--	    (req_idx * MPT_SENSE_BUFFER_ALLOC));
--
--	request_data = pci_alloc_consistent(
--	    ioc->pcidev, request_data_sz, &request_data_dma);
--
--	if (request_data == NULL) {
--		mpt_free_msg_frame(ioc, mf);
--		rc=-1;
--		goto csmisas_raid_inq_exit;
--	}
--
--	memset(request_data,0,request_data_sz);
--	psge = (char *)&pScsiRequest->SGL;
--	mpt_add_sge(psge, (MPT_SGE_FLAGS_SSIMPLE_READ | 0xFC) ,
--	    request_data_dma);
--
--	if (csmisas_send_command_wait(ioc, mf, MPT_IOCTL_DEFAULT_TIMEOUT) != 0) {
--		rc=-1;
--		goto csmisas_raid_inq_exit;
--	}
--
--	/* copy the request_data */
--	memcpy(inq_vpd, request_data, request_data_sz);
--
-- csmisas_raid_inq_exit:
--
--	if (request_data)
--		pci_free_consistent(ioc->pcidev, request_data_sz,
--		    request_data, request_data_dma);
--
--	return rc;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Get RAID Config command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_raid_config(unsigned long arg)
--{
--	CSMI_SAS_RAID_CONFIG_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_RAID_CONFIG_BUFFER	 karg,*pKarg=NULL;
--	CONFIGPARMS		 	cfg;
--	ConfigPageHeader_t	 	header;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--	u8				volumeID, VolumeBus;
--	u8				physDiskNum, physDiskNumMax;
--	int			 	volumepage0sz = 0;
--	int				physdiskpage0sz = 0, ioc_page5_sz = 0;
--	dma_addr_t			volume0_dma, physdisk0_dma;
--	dma_addr_t			ioc_page5_dma = 0;
--	pRaidVolumePage0_t		pVolume0 = NULL;
--	pRaidPhysDiskPage0_t		pPhysDisk0 = NULL;
--	pMpiRaidActionReply_t 		pRaidActionReply = NULL;
--	u32				device_info = 0;
--	pIOCPage5_t			pIocPage5 = NULL;
--	int 				i, idx, csmi_sas_raid_config_buffer_sz;
--	int				memory_pages;
--	int				copy_buffer_sz = 0;
--	u64				totalMaxLBA, tmpTotalMaxLBA;
--	u64				sas_address;
--	struct sas_device_info		*sas_info;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmisas_get_raid_config struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	csmi_sas_raid_config_buffer_sz = karg.IoctlHeader.Length;
--	memory_pages = get_order(csmi_sas_raid_config_buffer_sz);
--	pKarg = (CSMI_SAS_RAID_CONFIG_BUFFER *)__get_free_pages(
--		GFP_KERNEL, memory_pages);
--	if (!pKarg){
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to malloc RAID_CONFIG_BUFFER "
--			"csmi_sas_raid_config_buffer_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			csmi_sas_raid_config_buffer_sz, memory_pages);
--		return -ENOMEM;
--	}
--	memset(pKarg, 0, sizeof(*pKarg));
--
--	if (copy_from_user(pKarg, uarg, csmi_sas_raid_config_buffer_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmisas_get_raid_config struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (pKarg->Configuration.uChangeCount != 0 &&
--		pKarg->Configuration.uChangeCount != ioc->csmi_change_count ) {
--		pKarg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Configuration.uFailureCode =
--		    CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID;
--		goto cim_get_raid_config_exit;
--	}
--
--	if (!ioc->raid_data.pIocPg2) {
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	/*
--	 * Check to see if the input uRaidSetIndex is
--	 * greater than the number of RAID sets
--	 */
--	if (pKarg->Configuration.uRaidSetIndex >=
--	    ioc->raid_data.pIocPg2->NumActiveVolumes) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_RAID_SET_OUT_OF_RANGE;
--		goto cim_get_raid_config_exit;
--	}
--
--	/*
--	 * get RAID Volume Page 0
--	 */
--	volumeID = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeID;
--	VolumeBus = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeBus;
--
--	header.PageVersion = 0;
--	header.PageLength = 0;
--	header.PageNumber = 0;
--	header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
--	cfg.cfghdr.hdr = &header;
--	cfg.physAddr = -1;
--	cfg.pageAddr = (VolumeBus << 8) + volumeID;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--	if (mpt_config(ioc, &cfg) != 0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	if (header.PageLength == 0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	volumepage0sz = header.PageLength * 4;
--	pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz,
--	    &volume0_dma);
--	if (!pVolume0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--	cfg.physAddr = volume0_dma;
--	if (mpt_config(ioc, &cfg) != 0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	totalMaxLBA = (u64)le32_to_cpu(pVolume0->MaxLBA) |
--	    ((u64)le32_to_cpu(pVolume0->MaxLBAHigh)) << 32;
--	tmpTotalMaxLBA = totalMaxLBA + 1;
--	do_div(tmpTotalMaxLBA, 2048);
--	pKarg->Configuration.uCapacity = tmpTotalMaxLBA;
--	pKarg->Configuration.uStripeSize =
--		le32_to_cpu(pVolume0->StripeSize)/2;
--
--	switch(pVolume0->VolumeType) {
--	case MPI_RAID_VOL_TYPE_IS:
--		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_0;
--		break;
--	case MPI_RAID_VOL_TYPE_IME:
--		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_10;
--		break;
--	case MPI_RAID_VOL_TYPE_IM:
--		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_1;
--		break;
--	default:
--		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_OTHER;
--		break;
--	}
--
--	switch (pVolume0->VolumeStatus.State) {
--	case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
--		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OK;
--		break;
--	case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
--		/* Volume is degraded, check if Resyncing or Inactive */
--		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_DEGRADED;
--		break;
--	case MPI_RAIDVOL0_STATUS_STATE_FAILED:
--		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_FAILED;
--		break;
--	}
--
--	/* check flags */
--	if (pVolume0->VolumeStatus.Flags &
--	    MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE)
--		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OFFLINE;
--	else if (pVolume0->VolumeStatus.Flags &
--	    MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS)
--		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_REBUILDING;
--
--	pKarg->Configuration.bInformation = 0;  /* default */
--	if(pVolume0->VolumeStatus.Flags &
--	    MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS ) {
--
--		uint64_t 	* ptrUint64;
--		uint64_t	totalBlocks64, blocksRemaining64;
--		uint32_t	totalBlocks32, blocksRemaining32;
--
--		/* get percentage complete */
--		pRaidActionReply = kmalloc( sizeof(MPI_RAID_VOL_INDICATOR) +
--		    offsetof(MSG_RAID_ACTION_REPLY,ActionData),
--		    GFP_KERNEL);
--
--		if (!pRaidActionReply){
--			printk(KERN_ERR "%s@%d::%s() - "
--			    "Unable to malloc @ %p\n",
--			    __FILE__, __LINE__, __FUNCTION__,pKarg);
--			goto cim_get_raid_config_exit;
--		}
--		memset(pRaidActionReply, 0, sizeof(*pRaidActionReply));
--
--		csmisas_do_raid(ioc,
--		    MPI_RAID_ACTION_INDICATOR_STRUCT,
--		    0, VolumeBus, volumeID, pRaidActionReply);
--
--		ptrUint64       = (uint64_t *)&pRaidActionReply->ActionData;
--		totalBlocks64     = *ptrUint64;
--		ptrUint64++;
--		blocksRemaining64 = *ptrUint64;
--		while(totalBlocks64 > 0xFFFFFFFFUL){
--			totalBlocks64 = totalBlocks64 >> 1;
--			blocksRemaining64 = blocksRemaining64 >> 1;
--		}
--		totalBlocks32 = (uint32_t)totalBlocks64;
--		blocksRemaining32 = (uint32_t)blocksRemaining64;
--
--		if(totalBlocks32)
--			pKarg->Configuration.bInformation =
--			    (totalBlocks32 - blocksRemaining32) /
--			    (totalBlocks32 / 100);
--
--		kfree(pRaidActionReply);
--	}
--
--	/* fill-in more information depending on data type */
--	if (pKarg->Configuration.bDataType ==
--	    CSMI_SAS_RAID_DATA_ADDITIONAL_DATA) {
--		pKarg->Configuration.Data->bLabel[0] = '\0';
--		pKarg->Configuration.Data->bRaidSetLun[1] = 0;
--		pKarg->Configuration.Data->bWriteProtection =
--			CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN;
--		pKarg->Configuration.Data->bCacheSetting =
--			CSMI_SAS_RAID_SET_CACHE_UNKNOWN;
--		pKarg->Configuration.Data->bCacheRatio = 0;
--		pKarg->Configuration.Data->usBlockSize = 512;
--		pKarg->Configuration.Data->ulRaidSetExtentOffset.uLowPart = 0;
--		pKarg->Configuration.Data->ulRaidSetExtentOffset.uHighPart = 0;
--		pKarg->Configuration.Data->ulRaidSetBlocks.uLowPart =
--		    le32_to_cpu(pVolume0->MaxLBA);
--		pKarg->Configuration.Data->ulRaidSetBlocks.uHighPart =
--		    le32_to_cpu(pVolume0->MaxLBAHigh);
--		if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS ||
--		    pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME ) {
--			pKarg->Configuration.Data->uStripeSizeInBlocks =
--			    le32_to_cpu(pVolume0->StripeSize);
--		} else {
--			pKarg->Configuration.Data->uStripeSizeInBlocks = 0;
--		}
--		pKarg->Configuration.Data->uSectorsPerTrack = 128;
--		for (i=0; i<16; i++) {
--			// unsupported
--			pKarg->Configuration.Data->bApplicationScratchPad[i] =
--			    0xFF;
--		}
--		pKarg->Configuration.Data->uNumberOfHeads = 16;
--
--		tmpTotalMaxLBA = totalMaxLBA;
--		do_div(tmpTotalMaxLBA,
--		    (pKarg->Configuration.Data->uNumberOfHeads *
--		     pKarg->Configuration.Data->uSectorsPerTrack));
--		pKarg->Configuration.Data->uNumberOfTracks = tmpTotalMaxLBA;
--		pKarg->Configuration.bDriveCount = 1;
--	} else if ( pKarg->Configuration.bDataType ==
--	    CSMI_SAS_RAID_DATA_DEVICE_ID ) {
--		/* Send inquiry to get VPD Page 0x83 */
--		u32 vpd_page_sz;
--		vpd_page_sz = csmi_sas_raid_config_buffer_sz -
--		    offsetof(CSMI_SAS_RAID_CONFIG,DeviceId);
--		if (csmisas_raid_inq(ioc, MPI_FUNCTION_SCSI_IO_REQUEST,
--			VolumeBus, volumeID, 0x83,
--			(u8*)&pKarg->Configuration.DeviceId->bDeviceIdentificationVPDPage,
--			vpd_page_sz) != 0) {
--			pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_get_raid_config_exit;
--		}
--		pKarg->Configuration.bDriveCount = 1;
--	}
--
--	if (pKarg->Configuration.bDataType != CSMI_SAS_RAID_DATA_DRIVES) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--		goto cim_get_raid_config_exit;
--	}
--
--	/* suppress drive information */
--	if (pKarg->Configuration.bDriveCount ==
--		CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--		goto cim_get_raid_config_exit;
--	}
--
--	/* get hotspare info, used later in this function */
--	if (pVolume0->VolumeSettings.HotSparePool) {
--		/* Read and save IOC Page 5
--		 */
--		header.PageVersion = 0;
--		header.PageLength = 0;
--		header.PageNumber = 5;
--		header.PageType = MPI_CONFIG_PAGETYPE_IOC;
--		cfg.cfghdr.hdr = &header;
--		cfg.physAddr = -1;
--		cfg.pageAddr = 0;
--		cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--		cfg.dir = 0;
--		cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--		if ((mpt_config(ioc, &cfg) == 0) && (header.PageLength)) {
--			ioc_page5_sz = header.PageLength * 4;
--			pIocPage5 = pci_alloc_consistent(ioc->pcidev,
--			    ioc_page5_sz,
--			    &ioc_page5_dma);
--			memset(pIocPage5,0,ioc_page5_sz);
--			if (ioc_page5_dma) {
--				cfg.physAddr = ioc_page5_dma;
--				cfg.action =
--				    MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--				mpt_config(ioc, &cfg);
--			}
--		}
--	}
--
--	/*
--	 * get RAID Physical Disk Page 0
--	 */
--	header.PageVersion = 0;
--	header.PageLength = 0;
--	header.PageNumber = 0;
--	header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
--	cfg.cfghdr.hdr = &header;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--	if (mpt_config(ioc, &cfg) != 0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	if (header.PageLength == 0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--
--	physdiskpage0sz = header.PageLength * 4;
--	pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz,
--	    &physdisk0_dma);
--	if (!pPhysDisk0) {
--		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_get_raid_config_exit;
--	}
--	cfg.physAddr = physdisk0_dma;
--
--	physDiskNumMax = (csmi_sas_raid_config_buffer_sz -
--	    offsetof(CSMI_SAS_RAID_CONFIG,Drives))
--	    / sizeof(CSMI_SAS_RAID_DRIVES);
--
--	pKarg->Configuration.bDriveCount=0;
--
--	tmpTotalMaxLBA = totalMaxLBA;
--	if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS) {
--		do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks);
--		dcsmisasprintk(("IS Volume tmpTotalMaxLBA=%llX\n",
--		(unsigned long long)tmpTotalMaxLBA));
--	}
--	else if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME) {
--		do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks * 2);
--		dcsmisasprintk(("IME Volume tmpTotalMaxLBA=%llX\n",
--		(unsigned long long)tmpTotalMaxLBA));
--	} else {
--		dcsmisasprintk(("IM Volume tmpTotalMaxLBA=%llX\n",
--		(unsigned long long)tmpTotalMaxLBA));
--	}
--
--	for (i=0; i< min(pVolume0->NumPhysDisks, physDiskNumMax); i++) {
--
--		physDiskNum = pVolume0->PhysDisk[i].PhysDiskNum;
--		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--		cfg.pageAddr = physDiskNum;
--		if (mpt_config(ioc, &cfg) != 0){
--			pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_get_raid_config_exit;
--		}
--
--		/* Search the list for the matching SAS address. */
--		sas_info = csmisas_get_device_component_by_fw(ioc, pPhysDisk0->PhysDiskBus,
--		    pPhysDisk0->PhysDiskID);
--
--		if (!sas_info)
--			continue;
--
--		sas_address = reverse_byte_order64(sas_info->sas_address);
--		memcpy(pKarg->Configuration.Drives[i].bSASAddress,
--		   &sas_address,sizeof(u64));
--		if (!device_info)
--			device_info = sas_info->device_info;
--
--		memcpy(pKarg->Configuration.Drives[i].bModel,
--		    pPhysDisk0->InquiryData.VendorID,
--		    offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel));
--		memcpy(pKarg->Configuration.Drives[i].bFirmware,
--			pPhysDisk0->InquiryData.ProductRevLevel,
--			sizeof(pPhysDisk0->InquiryData.ProductRevLevel));
--		if (csmisas_is_sata(pPhysDisk0)) {
--			memcpy(&pKarg->Configuration.Drives[i].bSerialNumber,
--				&pPhysDisk0->ExtDiskIdentifier[4],
--				4);
--			memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4],
--				&pPhysDisk0->DiskIdentifier,
--				sizeof(pPhysDisk0->DiskIdentifier));
--		} else {
--			memcpy(pKarg->Configuration.Drives[i].bSerialNumber,
--				pPhysDisk0->DiskIdentifier,
--				sizeof(pPhysDisk0->DiskIdentifier));
--		}
--
--		pKarg->Configuration.Drives[i].bDriveUsage =
--		    (pPhysDisk0->PhysDiskStatus.Flags &
--		    MPI_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME) ?
--		    CSMI_SAS_DRIVE_CONFIG_NOT_USED :
--		    CSMI_SAS_DRIVE_CONFIG_MEMBER;
--
--		pKarg->Configuration.Drives[i].bDriveStatus =
--		    CSMI_SAS_DRIVE_STATUS_OK;
--		if (pPhysDisk0->PhysDiskStatus.State ==
--		    MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED) {
--			pKarg->Configuration.Drives[i].bDriveStatus =
--			    CSMI_SAS_DRIVE_STATUS_OFFLINE;
--		} else if(pPhysDisk0->PhysDiskStatus.State) {
--			pKarg->Configuration.Drives[i].bDriveStatus =
--			    CSMI_SAS_DRIVE_STATUS_FAILED;
--			if(pKarg->Configuration.bStatus ==
--			    CSMI_SAS_RAID_SET_STATUS_DEGRADED)
--				pKarg->Configuration.bInformation = i;
--		} else if((pVolume0->VolumeStatus.Flags &
--		    MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) &&
--		    (pPhysDisk0->PhysDiskStatus.Flags &
--		    MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC))
--			pKarg->Configuration.Drives[i].bDriveStatus =
--			    CSMI_SAS_DRIVE_STATUS_REBUILDING;
--		else if(pPhysDisk0->ErrorData.SmartCount ||
--		    (pPhysDisk0->PhysDiskStatus.Flags &
--		    MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC))
--			pKarg->Configuration.Drives[i].bDriveStatus =
--			CSMI_SAS_DRIVE_STATUS_DEGRADED;
--
--		memset(pKarg->Configuration.Drives[i].bSASLun,
--		    0, sizeof(pKarg->Configuration.Drives[i].bSASLun));
--		if (csmisas_is_sata(pPhysDisk0)) {
--			pKarg->Configuration.Drives[i].bDriveType =
--			CSMI_SAS_DRIVE_TYPE_SATA;
--		} else { /* drive in a volume can only be SAS/SATA */
--			pKarg->Configuration.Drives[i].bDriveType =
--				CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS;
--		}
--
--		pKarg->Configuration.Drives[i].usBlockSize = 512;
--			pKarg->Configuration.Drives[i].uDriveIndex =
--			    pPhysDisk0->PhysDiskNum;
--		pKarg->Configuration.Drives[i].ulTotalUserBlocks.uLowPart =
--		    (u32)tmpTotalMaxLBA;
--		pKarg->Configuration.Drives[i].ulTotalUserBlocks.uHighPart =
--		    (u32)(tmpTotalMaxLBA >> 32);
--	        pKarg->Configuration.bDriveCount++;
--	}
--
--	/* adding hot spare info at the end */
--	if ((pVolume0->VolumeSettings.HotSparePool) && (pIocPage5) &&
--	    (pVolume0->VolumeType != MPI_RAID_VOL_TYPE_IS)) {
--		for (idx = 0, i = pVolume0->NumPhysDisks ;
--		    idx < pIocPage5->NumHotSpares ; idx++) {
--			if (i >= physDiskNumMax)
--				break;
--			if ((pVolume0->VolumeSettings.HotSparePool &
--			    pIocPage5->HotSpare[idx].HotSparePool) == 0)
--				continue;
--			if(pIocPage5->HotSpare[idx].Flags !=
--			    MPI_IOC_PAGE_5_HOT_SPARE_ACTIVE)
--			    continue;
--			physDiskNum = pIocPage5->HotSpare[idx].PhysDiskNum;
--			cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--			cfg.pageAddr = physDiskNum;
--			if (mpt_config(ioc, &cfg) != 0)
--				continue;
--
--			/* Search the list for the matching SAS address. */
--			sas_info = csmisas_get_device_component_by_fw(ioc,
--			    pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID);
--
--			if (!sas_info)
--				continue;
--
--			sas_address = reverse_byte_order64(sas_info->sas_address);
--			memcpy(pKarg->Configuration.Drives[i].bSASAddress,
--			   &sas_address,sizeof(u64));
--
--			/* don't mix SSP hot spare
--			 * in SATA volume
--			 */
--			if (!csmisas_is_sata(pPhysDisk0) &&
--			    (device_info &
--			    MPI_SAS_DEVICE_INFO_SATA_DEVICE))
--				continue;
--
--			/* don't mix SATA hot spare
--			 * in SSP volume
--			 */
--			if (csmisas_is_sata(pPhysDisk0) &&
--			    (device_info &
--			    MPI_SAS_DEVICE_INFO_SSP_TARGET))
--				continue;
--
--			/* capacity check for IM volumes*/
--			if ((pVolume0->VolumeType ==
--			    MPI_RAID_VOL_TYPE_IM) &&
--			    (totalMaxLBA +
--			    (64*2*1024) /* metadata = 64MB*/ >
--			    le32_to_cpu(pPhysDisk0->MaxLBA)))
--				continue;
--
--			tmpTotalMaxLBA = totalMaxLBA;
--			do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks);
--			/* capacity check for IME volumes*/
--			if ((pVolume0->VolumeType ==
--				MPI_RAID_VOL_TYPE_IME) &&
--			    ((tmpTotalMaxLBA * 2) +
--			     (64*2*1024 ) /*metadata = 64MB*/ >
--			    le32_to_cpu(pPhysDisk0->MaxLBA)))
--				break;
--
--			/* capacity check for IME volumes*/
--			if ((pVolume0->VolumeType ==
--			    MPI_RAID_VOL_TYPE_IME) &&
--			    (((totalMaxLBA +
--			    pVolume0->NumPhysDisks) * 2) +
--			    (64*2*1024 ) /*metadata = 64MB*/ >
--			    le32_to_cpu(pPhysDisk0->MaxLBA)))
--				continue;
--
--			memcpy(pKarg->Configuration.Drives[i].bModel,
--			    pPhysDisk0->InquiryData.VendorID,
--			    offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel));
--			memcpy(pKarg->Configuration.Drives[i].bFirmware,
--				pPhysDisk0->InquiryData.ProductRevLevel,
--				sizeof(pPhysDisk0->InquiryData.ProductRevLevel));
--			if (csmisas_is_sata(pPhysDisk0)) {
--				memcpy(&pKarg->Configuration.Drives[i].bSerialNumber,
--					&pPhysDisk0->ExtDiskIdentifier[4],
--					4);
--				memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4],
--					&pPhysDisk0->DiskIdentifier,
--					sizeof(pPhysDisk0->DiskIdentifier));
--			} else {
--				memcpy(pKarg->Configuration.Drives[i].bSerialNumber,
--					pPhysDisk0->DiskIdentifier,
--					sizeof(pPhysDisk0->DiskIdentifier));
--			}
--			pKarg->Configuration.Drives[i].bDriveStatus =
--			    CSMI_SAS_DRIVE_STATUS_OK;
--			if(pPhysDisk0->PhysDiskStatus.State)
--				pKarg->Configuration.Drives[i].bDriveStatus =
--				    CSMI_SAS_DRIVE_STATUS_FAILED;
--			else if(pPhysDisk0->ErrorData.SmartCount)
--				pKarg->Configuration.Drives[i].bDriveStatus =
--				    CSMI_SAS_DRIVE_STATUS_DEGRADED;
--			pKarg->Configuration.Drives[i].bDriveUsage =
--			    CSMI_SAS_DRIVE_CONFIG_SPARE;
--			pKarg->Configuration.Drives[i].usBlockSize = 512;
--			pKarg->Configuration.Drives[i].uDriveIndex =
--			    pPhysDisk0->PhysDiskNum;
--			if (csmisas_is_sata(pPhysDisk0)) {
--				pKarg->Configuration.Drives[i].bDriveType =
--				CSMI_SAS_DRIVE_TYPE_SATA;
--			} else { /* drive in a volume can only be SAS/SATA */
--				pKarg->Configuration.Drives[i].bDriveType =
--					CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS;
--			}
--
--			i++;
--			pKarg->Configuration.bDriveCount++;
--		}
--	}
--
--	// Only return data on the first 240 drives
--	if( pKarg->Configuration.bDriveCount > 0xF0 )
--		pKarg->Configuration.bDriveCount =
--		    CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG;
--
--	pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
-- cim_get_raid_config_exit:
--
--	if (pVolume0 != NULL)
--		pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0,
--		    volume0_dma);
--
--	if(pPhysDisk0 != NULL)
--		pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0,
--		    physdisk0_dma);
--
--	if(pIocPage5 != NULL)
--		pci_free_consistent(ioc->pcidev, ioc_page5_sz, pIocPage5,
--		    ioc_page5_dma);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--
--	/* find the buffer size to copy depending on how much is filled-in */
--	switch (pKarg->Configuration.bDataType) {
--	case CSMI_SAS_RAID_DATA_ADDITIONAL_DATA:
--		copy_buffer_sz = sizeof(IOCTL_HEADER) +
--		    offsetof(CSMI_SAS_RAID_CONFIG,Data) +
--		    sizeof(CSMI_SAS_RAID_SET_ADDITIONAL_DATA);
--		break;
--	case CSMI_SAS_RAID_DATA_DRIVES:
--		if (pKarg->Configuration.bDriveCount ==
--		    CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED)
--			copy_buffer_sz = sizeof(IOCTL_HEADER) +
--			    offsetof(CSMI_SAS_RAID_CONFIG,Drives);
--	        else
--			copy_buffer_sz = sizeof(IOCTL_HEADER) +
--			    offsetof(CSMI_SAS_RAID_CONFIG,Drives) +
--			    (pKarg->Configuration.bDriveCount *
--			    sizeof(CSMI_SAS_RAID_DRIVES));
--		break;
--	case CSMI_SAS_RAID_DATA_DEVICE_ID:
--		copy_buffer_sz = csmi_sas_raid_config_buffer_sz;
--		break;
--	}
--
--	if (copy_to_user((char *)arg, pKarg, copy_buffer_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		       "Unable to write out csmi_sas_get_raid_config @ %p\n",
--			   __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	free_pages((unsigned long)pKarg, memory_pages);
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Get RAID Features command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_raid_features(unsigned long arg)
--{
--	CSMI_SAS_RAID_FEATURES_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_RAID_FEATURES_BUFFER karg, *pKarg=NULL;
--	int csmi_sas_raid_features_buffer_sz, iocnum;
--	int				memory_pages;
--	MPT_ADAPTER		*ioc = NULL;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_get_raid_features struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	csmi_sas_raid_features_buffer_sz = karg.IoctlHeader.Length;
--	memory_pages = get_order(csmi_sas_raid_features_buffer_sz);
--	pKarg = (CSMI_SAS_RAID_FEATURES_BUFFER *)__get_free_pages(
--		GFP_KERNEL, memory_pages);
--	if (!pKarg){
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to malloc RAID_FEATURES_BUFFER "
--			"csmi_sas_raid_features_buffer_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			csmi_sas_raid_features_buffer_sz, memory_pages);
--		return -ENOMEM;
--	}
--	memset(pKarg, 0, sizeof(*pKarg));
--
--	if (copy_from_user(pKarg, uarg, csmi_sas_raid_features_buffer_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_get_raid_features struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (pKarg->Information.uChangeCount != 0 &&
--	    pKarg->Information.uChangeCount != ioc->csmi_change_count ) {
--		pKarg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Information.uFailureCode =
--		    CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID;
--		goto cim_get_raid_features_exit;
--	}
--
--	pKarg->Information.uFeatures = CSMI_SAS_RAID_FEATURE_REBUILD |
--	    CSMI_SAS_RAID_FEATURE_SURFACE_SCAN |
--	    CSMI_SAS_RAID_FEATURE_SPARES_SHARED;
--	pKarg->Information.bDefaultTransformPriority =
--	    CSMI_SAS_PRIORITY_UNKNOWN;
--	pKarg->Information.bTransformPriority = CSMI_SAS_PRIORITY_UNKNOWN;
--	pKarg->Information.bDefaultRebuildPriority = CSMI_SAS_PRIORITY_UNKNOWN;
--	pKarg->Information.bRebuildPriority =
--	    pKarg->Information.bDefaultRebuildPriority;
--	pKarg->Information.bDefaultSurfaceScanPriority =
--	    CSMI_SAS_PRIORITY_UNKNOWN;
--	pKarg->Information.bSurfaceScanPriority = CSMI_SAS_PRIORITY_UNKNOWN;
--	pKarg->Information.uRaidSetTransformationRules = 0;
--
--	 /* IS */
--	pKarg->Information.RaidType[0].bRaidType = CSMI_SAS_RAID_TYPE_0;
--	pKarg->Information.RaidType[0].uSupportedStripeSizeMap = 0x80;
--
--	/* IM */
--	pKarg->Information.RaidType[1].bRaidType = CSMI_SAS_RAID_TYPE_1;
--	pKarg->Information.RaidType[1].uSupportedStripeSizeMap = 0;
--
--	/* IME */
--	pKarg->Information.RaidType[2].bRaidType = CSMI_SAS_RAID_TYPE_1E;
--	pKarg->Information.RaidType[2].uSupportedStripeSizeMap = 0x80;
--
--	pKarg->Information.RaidType[3].bRaidType = CSMI_SAS_RAID_TYPE_END;
--	pKarg->Information.bCacheRatiosSupported[0] =
--	    CSMI_SAS_RAID_CACHE_RATIO_END;
--
-- cim_get_raid_features_exit:
--
--	/*
--	 * Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, pKarg,
--	    sizeof(CSMI_SAS_RAID_FEATURES_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		"Unable to write out csmi_sas_get_raid_features @ %p\n",
--		__FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	free_pages((unsigned long)pKarg, memory_pages);
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Set RAID Control command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_set_raid_control(unsigned long arg)
--{
--	CSMI_SAS_RAID_CONTROL_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_RAID_CONTROL_BUFFER karg, *pKarg=NULL;
--	int csmi_sas_raid_control_buffer_sz, iocnum;
--	int				memory_pages;
--	MPT_ADAPTER	*ioc = NULL;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_set_raid_control struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	csmi_sas_raid_control_buffer_sz = karg.IoctlHeader.Length;
--	memory_pages = get_order(csmi_sas_raid_control_buffer_sz);
--	pKarg = (CSMI_SAS_RAID_CONTROL_BUFFER *)__get_free_pages(
--		GFP_KERNEL, memory_pages);
--	if (!pKarg){
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to malloc RAID_CONTROL_BUFFER "
--			"csmi_sas_raid_control_buffer_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			csmi_sas_raid_control_buffer_sz, memory_pages);
--		return -ENOMEM;
--	}
--	memset(pKarg, 0, sizeof(*pKarg));
--
--	if (copy_from_user(pKarg, uarg, csmi_sas_raid_control_buffer_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_set_raid_control struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (pKarg->Information.uChangeCount != 0 &&
--		pKarg->Information.uChangeCount != ioc->csmi_change_count ) {
--		pKarg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Information.uFailureCode =
--		    CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID;
--		goto cim_set_raid_control_exit;
--	}
--
--	if (pKarg->Information.bTransformPriority !=
--	    CSMI_SAS_PRIORITY_UNCHANGED) {
--		pKarg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Information.uFailureCode =
--		    CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID;
--		goto cim_set_raid_control_exit;
--	}
--
--	if (pKarg->Information.bRebuildPriority !=
--	    CSMI_SAS_PRIORITY_AUTO &&
--		pKarg->Information.bRebuildPriority !=
--		CSMI_SAS_PRIORITY_UNCHANGED) {
--		pKarg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Information.uFailureCode =
--		    CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID;
--		goto cim_set_raid_control_exit;
--	}
--
--	if (pKarg->Information.bCacheRatioFlag ==
--	    CSMI_SAS_RAID_CACHE_RATIO_DISABLE) {
--		pKarg->IoctlHeader.ReturnCode =
--		    CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Information.uFailureCode =
--		    CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID;
--		goto cim_set_raid_control_exit;
--	}
--
--	if( !strcmp(pKarg->Information.bClearConfiguration,
--		CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE) ) {
--		pKarg->IoctlHeader.ReturnCode =
--			CSMI_SAS_STATUS_INVALID_PARAMETER;
--		pKarg->Information.uFailureCode =
--			CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID;
--		goto cim_set_raid_control_exit;
--	}
--
--	pKarg->Information.bFailureDescription[0] = '\0';
--
-- cim_set_raid_control_exit:
--
--	/*
--	 * Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, pKarg,
--		sizeof(CSMI_SAS_RAID_CONTROL_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		"Unable to write out csmi_sas_set_raid_control @ %p\n",
--		__FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)pKarg, memory_pages);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	free_pages((unsigned long)pKarg, memory_pages);
--	return 0;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Get Raid Element.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_raid_element(unsigned long arg)
--{
--	CSMI_SAS_RAID_ELEMENT_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_RAID_ELEMENT_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_ELEMENT_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmisas_get_raid_element struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--/* TODO - implement IOCTL here */
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_BAD_CNTL_CODE;
--	dcsmisasprintk((": not implemented\n"));
--
--// csmisas_get_raid_element_exit:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_RAID_ELEMENT_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmisas_get_raid_element @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Set Raid Operation
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_set_raid_operation(unsigned long arg)
--{
--	CSMI_SAS_RAID_SET_OPERATION_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_RAID_SET_OPERATION_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_SET_OPERATION_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_set_raid_operation struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--/* TODO - implement IOCTL here */
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_BAD_CNTL_CODE;
--	dcsmisasprintk((": not implemented\n"));
--
--// cim_set_raid_operation:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_RAID_SET_OPERATION_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_set_raid_operation @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--
--}
--
--
--/**
-- * Prototype Routine for the CSMI SAS Task Managment Config command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_task_managment(unsigned long arg)
--{
--	CSMI_SAS_SSP_TASK_IU_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_SSP_TASK_IU_BUFFER	 karg;
--	pSCSITaskMgmt_t			pScsiTm;
--	pSCSITaskMgmtReply_t		pScsiTmReply;
--	MPT_ADAPTER			*ioc = NULL;
--	MPT_SCSI_HOST			*hd;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t			*mpi_hdr;
--	int				iocnum;
--	u8				taskType;
--	u8				channel;
--	u8				id;
--	u8				queueTag;
--	u32				msgContext = 0;
--	int				i;
--	u8 				found_qtag;
--	struct sas_device_info		*sas_info;
--	u16				ioc_status;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_task_managment struct @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--
--	sas_info = csmisas_get_device_component_by_os(ioc,
--	    karg.Parameters.bPathId, karg.Parameters.bTargetId);
--	if (!sas_info || sas_info->is_cached || sas_info->is_logical_volume)
--		goto cim_get_task_managment_exit;
--
--	channel = sas_info->fw.channel;
--	id = sas_info->fw.id;
--	queueTag = (u8)karg.Parameters.uQueueTag & 0xFF;
--	hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
--
--	/* try to catch an error
--	 */
--	if ((karg.Parameters.uFlags & CSMI_SAS_TASK_IU) &&
--	    (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE))
--		goto cim_get_task_managment_exit;
--
--	if (karg.Parameters.uFlags & CSMI_SAS_TASK_IU) {
--		switch (karg.Parameters.bTaskManagementFunction) {
--
--		case CSMI_SAS_SSP_ABORT_TASK:
--			taskType = MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK;
--			break;
--		case CSMI_SAS_SSP_ABORT_TASK_SET:
--			taskType = MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET;
--			break;
--		case CSMI_SAS_SSP_CLEAR_TASK_SET:
--			taskType = MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET;
--			break;
--		case CSMI_SAS_SSP_LOGICAL_UNIT_RESET:
--			taskType = MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET;
--			break;
--		case CSMI_SAS_SSP_CLEAR_ACA:
--		case CSMI_SAS_SSP_QUERY_TASK:
--		default:
--			goto cim_get_task_managment_exit;
--		}
--	} else if (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE)
--		taskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
--	else
--		goto cim_get_task_managment_exit;
--
--	switch (karg.Parameters.uInformation) {
--		case CSMI_SAS_SSP_TEST:
--			dcsmisasprintk(("TM request for test purposes\n"));
--			break;
--		case CSMI_SAS_SSP_EXCEEDED:
--			dcsmisasprintk(("TM request due to timeout\n"));
--			break;
--		case CSMI_SAS_SSP_DEMAND:
--			dcsmisasprintk(("TM request demanded by app\n"));
--			break;
--		case CSMI_SAS_SSP_TRIGGER:
--			dcsmisasprintk(("TM request sent to trigger event\n"));
--			break;
--	}
--
--	switch (taskType) {
--
--	case MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK:
--	/*
--	 * look up qtag in the ScsiLookup[] table
--	 */
--		for (i = 0, found_qtag = 0; i < hd->ioc->req_depth; i++) {
--#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
--			if ((hd->ScsiLookup[i]) &&
--			    (hd->ScsiLookup[i]->tag == queueTag)) {
--#else
--			if ((ioc->ScsiLookup[i]) &&
--			    (ioc->ScsiLookup[i]->tag == queueTag)) {
--#endif
--				mf = MPT_INDEX_2_MFPTR(hd->ioc, i);
--				msgContext =
--				    mf->u.frame.hwhdr.msgctxu.MsgContext;
--				found_qtag=1;
--				break;
--			}
--		}
--
--		if(!found_qtag)
--			goto cim_get_task_managment_exit;
--
--	case MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET:
--	case MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET:
--	case MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET:
--	/* for now, this should work
--	 */
--	case MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET:
--
--		/* Single threading ....
--		 */
--#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
--		if (mptctl_set_tm_flags(hd) != 0) {
--			karg.IoctlHeader.ReturnCode =
--			    CSMI_SAS_STATUS_FAILED;
--			goto cim_get_task_managment_exit;
--		}
--#endif
--
--		/* Send request
--		 */
--		if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--			dcsmisasprintk((": no msg frames!\n"));
--#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
--			mptctl_free_tm_flags(ioc);
--#endif
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_get_task_managment_exit;
--		}
--
--		mpi_hdr = (MPIHeader_t *) mf;
--		pScsiTm = (pSCSITaskMgmt_t ) mf;
--
--		memset(pScsiTm,0,sizeof(SCSITaskMgmt_t));
--		pScsiTm->TaskType = taskType;
--		pScsiTm->Bus = channel;
--		pScsiTm->TargetID = id;
--#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15))
--		int_to_scsilun(karg.Parameters.bLun,
--		    (struct scsi_lun *)pScsiTm->LUN);
--#else
--		pScsiTm->LUN[1] = karg.Parameters.bLun;
--#endif
--		pScsiTm->MsgContext = mpi_hdr->MsgContext;
--		pScsiTm->TaskMsgContext = msgContext;
--		pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
--
--		if (csmisas_send_handshake_wait(ioc, mf,
--		    karg.IoctlHeader.Timeout) != 0)  {
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_get_task_managment_exit;
--		}
--
--		if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) {
--
--			pScsiTmReply =
--			    (pSCSITaskMgmtReply_t ) ioc->ioctl->ReplyFrame;
--
--			ioc_status = le16_to_cpu(pScsiTmReply->IOCStatus)
--			    & MPI_IOCSTATUS_MASK;
--
--			memset(&karg.Status,0,
--			    sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS));
--
--			if(ioc_status == MPI_IOCSTATUS_SUCCESS) {
--				karg.IoctlHeader.ReturnCode =
--				    CSMI_SAS_STATUS_SUCCESS;
--				karg.Status.bSSPStatus =
--				    CSMI_SAS_SSP_STATUS_COMPLETED;
--			}else if(ioc_status == MPI_IOCSTATUS_INSUFFICIENT_RESOURCES) {
--				karg.IoctlHeader.ReturnCode =
--				    CSMI_SAS_STATUS_SUCCESS;
--				karg.Status.bSSPStatus =
--				    CSMI_SAS_SSP_STATUS_RETRY;
--			}else {
--				karg.IoctlHeader.ReturnCode =
--				    CSMI_SAS_STATUS_FAILED;
--				karg.Status.bSSPStatus =
--				    CSMI_SAS_SSP_STATUS_FATAL_ERROR;
--			}
--		} else
--			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--
--		break;
--
--	default:
--		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--		break;
--	}
--
--
-- cim_get_task_managment_exit:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--				sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to write out csmi_sas_task_managment @ %p\n",
--				__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- *	map_sas_status_to_csmi - Conversion  for Connection Status
-- *	@mpi_sas_status: Sas status returned by the firmware
-- *
-- *	Returns converted connection status
-- *
-- **/
--static u8
--map_sas_status_to_csmi(u8 mpi_sas_status)
--{
--	u8  csmi_connect_status;
--
--	switch (mpi_sas_status) {
--
--	case MPI_SASSTATUS_SUCCESS:
--		csmi_connect_status = CSMI_SAS_OPEN_ACCEPT;
--		break;
--
--	case MPI_SASSTATUS_UTC_BAD_DEST:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_BAD_DESTINATION;
--		break;
--
--	case MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED;
--		break;
--
--	case MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED:
--		csmi_connect_status =
--		    CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED;
--		break;
--
--	case MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY;
--		break;
--
--	case MPI_SASSTATUS_UTC_WRONG_DESTINATION:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION;
--		break;
--
--	case MPI_SASSTATUS_SDSF_NAK_RECEIVED:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RETRY;
--		break;
--
--	case MPI_SASSTATUS_SDSF_CONNECTION_FAILED:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED;
--		break;
--
--	case MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT:
--		csmi_connect_status =  CSMI_SAS_OPEN_REJECT_NO_DESTINATION;
--		break;
--
--	case MPI_SASSTATUS_UNKNOWN_ERROR:
--	case MPI_SASSTATUS_INVALID_FRAME:
--	case MPI_SASSTATUS_UTC_BREAK_RECEIVED:
--	case MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST:
--	case MPI_SASSTATUS_SHORT_INFORMATION_UNIT:
--	case MPI_SASSTATUS_LONG_INFORMATION_UNIT:
--	case MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA:
--	case MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR:
--	case MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED:
--	case MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH:
--	case MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA:
--	case MPI_SASSTATUS_DATA_OFFSET_ERROR:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP;
--		break;
--
--	default:
--		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP;
--		break;
--	}
--
--	return csmi_connect_status;
--}
--
--/**
-- *                      csmisas_phy_reset
-- *	Issues a phy link reset or phy hard reset
-- *
-- *	@ioc - Pointer to MPT_ADAPTER structure
-- *	@PhyNum - phy number
-- *	@opcode - {MPI_SAS_OP_PHY_LINK_RESET,MPI_SAS_OP_PHY_HARD_RESET}
-- *
-- *	Returns: 0 for success, non-zero error
-- **/
--static int
--csmisas_phy_reset(MPT_ADAPTER *ioc, u8 PhyNum, u8 opcode)
--{
--	SasIoUnitControlRequest_t	*sasIoUnitCntrReq;
--	SasIoUnitControlReply_t		*sasIoUnitCntrReply;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t			*mpi_hdr;
--	u16 				ioc_status;
--
--	if ((opcode != MPI_SAS_OP_PHY_LINK_RESET) &&
--	    (opcode != MPI_SAS_OP_PHY_HARD_RESET))
--	    return -1;
--
--	/* Get a MF for this command.
--	 */
--	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--		dcsmisasprintk((": no msg frames!\n"));
--		return -1;
--        }
--
--	mpi_hdr = (MPIHeader_t *) mf;
--	sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf;
--	memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t));
--	sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL;
--	sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext;
--	sasIoUnitCntrReq->Operation = opcode;
--	sasIoUnitCntrReq->PhyNum = PhyNum;
--
--	if (csmisas_send_command_wait(ioc, mf, MPT_IOCTL_DEFAULT_TIMEOUT) != 0)
--		return -1;
--
--	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0)
--		return -1;
--
--	/* process the completed Reply Message Frame */
--	sasIoUnitCntrReply = (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame;
--	ioc_status = le16_to_cpu(sasIoUnitCntrReply->IOCStatus)
--	    & MPI_IOCSTATUS_MASK;
--	if (ioc_status != MPI_IOCSTATUS_SUCCESS) {
--		printk("%s: IOCStatus=0x%X IOCLogInfo=0x%X\n",
--		    __FUNCTION__,
--		    sasIoUnitCntrReply->IOCStatus,
--		    sasIoUnitCntrReply->IOCLogInfo);
--		return -1;
--	}
--	return 0;
--}
--
--/** Prototype Routine for the CSMI SAS Phy Control command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_phy_control(unsigned long arg)
--{
--	CSMI_SAS_PHY_CONTROL_BUFFER __user *uarg = (void __user *) arg;
--	IOCTL_HEADER			ioctl_header;
--	PCSMI_SAS_PHY_CONTROL_BUFFER	karg;
--	SasIOUnitPage0_t		*sasIoUnitPg0=NULL;
--	dma_addr_t			sasIoUnitPg0_dma;
--	int				sasIoUnitPg0_data_sz=0;
--	SasIOUnitPage1_t		*sasIoUnitPg1=NULL;
--	dma_addr_t			sasIoUnitPg1_dma;
--	int				sasIoUnitPg1_data_sz=0;
--	ConfigExtendedPageHeader_t  	hdr;
--	CONFIGPARMS			cfg;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum;
--	int 				csmi_sas_phy_control_buffer_sz;
--	int				memory_pages;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in IOCTL_HEADER"
--		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	csmi_sas_phy_control_buffer_sz = ioctl_header.Length;
--	memory_pages = get_order(csmi_sas_phy_control_buffer_sz);
--	karg = (PCSMI_SAS_PHY_CONTROL_BUFFER)__get_free_pages(
--		GFP_KERNEL, memory_pages);
--	if (!karg){
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to malloc SAS_PHY_CONTROL_BUFFER "
--			"csmi_sas_phy_control_buffer_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			csmi_sas_phy_control_buffer_sz, memory_pages);
--		return -ENOMEM;
--	}
--	memset(karg, 0, sizeof(*karg));
--
--	if (copy_from_user(karg, uarg, csmi_sas_phy_control_buffer_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_phy_control_buffer "
--		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)karg, memory_pages);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(ioctl_header.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)karg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)karg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (karg->bPhyIdentifier >= ioc->num_ports) {
--		karg->IoctlHeader.ReturnCode =
--		   CSMI_SAS_STATUS_INVALID_PARAMETER;
--		goto cim_sas_phy_control_exit;
--	}
--
--	/*
--	 *  Retreive SAS IOUNIT PAGE 0
--	 */
--
--	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if (mpt_config(ioc, &cfg) != 0) {
--		dcsmisasprintk((
--		    ": FAILED: READ MPI_SASIOUNITPAGE0: HEADER\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		dcsmisasprintk((": hdr.ExtPageLength == 0\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4;
--	sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev,
--	    sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma);
--
--	if (!sasIoUnitPg0) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz);
--	cfg.physAddr = sasIoUnitPg0_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if (mpt_config(ioc, &cfg) != 0) {
--		dcsmisasprintk((
--		    ": FAILED: READ MPI_SASIOUNITPAGE0: CURRENT\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	/*
--	 *  Retreive SAS IOUNIT PAGE 1
--	 */
--
--	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 1;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if (mpt_config(ioc, &cfg) != 0) {
--		dcsmisasprintk((
--		    ": FAILED: READ MPI_SASIOUNITPAGE1: HEADER\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		dcsmisasprintk((": hdr.ExtPageLength == 0\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	sasIoUnitPg1_data_sz = hdr.ExtPageLength * 4;
--	sasIoUnitPg1 = (SasIOUnitPage1_t *) pci_alloc_consistent(ioc->pcidev,
--	    sasIoUnitPg1_data_sz, &sasIoUnitPg1_dma);
--
--	if (!sasIoUnitPg1) {
--		dcsmisasprintk((": pci_alloc_consistent: FAILED\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	memset((u8 *)sasIoUnitPg1, 0, sasIoUnitPg1_data_sz);
--	cfg.physAddr = sasIoUnitPg1_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if (mpt_config(ioc, &cfg) != 0) {
--		dcsmisasprintk((
--		    ": FAILED:  READ MPI_SASIOUNITPAGE1: CURRENT\n"));
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--		goto cim_sas_phy_control_exit;
--	}
--
--	switch (karg->uFunction) {
--
--	case CSMI_SAS_PC_LINK_RESET:
--	case CSMI_SAS_PC_HARD_RESET:
--	{
--		u8 opcode = (karg->uFunction==CSMI_SAS_PC_LINK_RESET) ?
--		    MPI_SAS_OP_PHY_LINK_RESET : MPI_SAS_OP_PHY_HARD_RESET;
--
--		if((karg->uLinkFlags & CSMI_SAS_PHY_ACTIVATE_CONTROL) &&
--		    (karg->usLengthOfControl >= sizeof(CSMI_SAS_PHY_CONTROL)) &&
--		    (karg->bNumberOfControls > 0)){
--			if(karg->Control[0].bRate ==
--			   CSMI_SAS_LINK_RATE_1_5_GBPS) {
--				sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate =
--				MPI_SAS_IOUNIT1_MAX_RATE_1_5 |
--				MPI_SAS_IOUNIT1_MIN_RATE_1_5;
--			}
--			else if(karg->Control[0].bRate ==
--			   CSMI_SAS_LINK_RATE_3_0_GBPS) {
--				sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate =
--				MPI_SAS_IOUNIT1_MAX_RATE_3_0 |
--				MPI_SAS_IOUNIT1_MIN_RATE_3_0;
--			}
--			sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags &=
--			    ~MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE;
--			cfg.dir = 1;
--			cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM;
--			if (mpt_config(ioc, &cfg) != 0) {
--				dcsmisasprintk((
--			    ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n"));
--				karg->IoctlHeader.ReturnCode =
--				   CSMI_SAS_STATUS_FAILED;
--				goto cim_sas_phy_control_exit;
--			}
--			cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
--			if (mpt_config(ioc, &cfg) != 0) {
--				dcsmisasprintk((
--			 ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n"));
--				karg->IoctlHeader.ReturnCode =
--				   CSMI_SAS_STATUS_FAILED;
--				goto cim_sas_phy_control_exit;
--			}
--		}
--		if (csmisas_phy_reset(ioc,
--		    karg->bPhyIdentifier, opcode) != 0) {
--			dcsmisasprintk((
--			    ": FAILED: csmisas_phy_reset\n"));
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_sas_phy_control_exit;
--		}
--		break;
--
--	}
--	case CSMI_SAS_PC_PHY_DISABLE:
--		if(karg->usLengthOfControl || karg->bNumberOfControls) {
--			karg->IoctlHeader.ReturnCode =
--			    CSMI_SAS_STATUS_INVALID_PARAMETER;
--			break;
--		}
--		sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags |=
--		    MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE;
--		cfg.dir = 1;
--		cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM;
--		if (mpt_config(ioc, &cfg) != 0) {
--			dcsmisasprintk((
--			    ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n"));
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_sas_phy_control_exit;
--		}
--		cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
--		if (mpt_config(ioc, &cfg) != 0) {
--			dcsmisasprintk((
--			    ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n"));
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_sas_phy_control_exit;
--		}
--		if (csmisas_phy_reset(ioc,
--		    karg->bPhyIdentifier, MPI_SAS_OP_PHY_HARD_RESET) != 0) {
--			dcsmisasprintk((
--			    ": FAILED: csmisas_phy_reset\n"));
--			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--			goto cim_sas_phy_control_exit;
--		}
--		break;
--
--	case CSMI_SAS_PC_GET_PHY_SETTINGS:
--		if(karg->usLengthOfControl || karg->bNumberOfControls) {
--			karg->IoctlHeader.ReturnCode =
--			    CSMI_SAS_STATUS_INVALID_PARAMETER;
--			break;
--		}
--		if(csmi_sas_phy_control_buffer_sz <
--		    offsetof(CSMI_SAS_PHY_CONTROL_BUFFER,Control) +
--		    (4* sizeof(CSMI_SAS_PHY_CONTROL))) {
--			karg->IoctlHeader.ReturnCode =
--			    CSMI_SAS_STATUS_INVALID_PARAMETER;
--			break;
--		}
--		karg->usLengthOfControl = sizeof(CSMI_SAS_PHY_CONTROL);
--		karg->bNumberOfControls = 4;
--		karg->Control[0].bType = CSMI_SAS_SAS;
--		karg->Control[0].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS;
--		karg->Control[1].bType = CSMI_SAS_SAS;
--		karg->Control[1].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS;
--		karg->Control[2].bType = CSMI_SAS_SATA;
--		karg->Control[2].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS;
--		karg->Control[3].bType = CSMI_SAS_SATA;
--		karg->Control[3].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS;
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--		break;
--	default:
--		break;
--	}
--
-- cim_sas_phy_control_exit:
--
--	if (sasIoUnitPg0)
--		pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz,
--		    (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma);
--
--	if (sasIoUnitPg1)
--		pci_free_consistent(ioc->pcidev, sasIoUnitPg1_data_sz,
--		    (u8 *) sasIoUnitPg1, sasIoUnitPg1_dma);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg,karg,csmi_sas_phy_control_buffer_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to write out csmi_sas_phy_control_buffer @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)karg, memory_pages);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	free_pages((unsigned long)karg, memory_pages);
--	return 0;
--}
--
--/**
-- *	csmisas_get_manuf_pg_7 - Fetch Manufacturing config Page7.
-- * @ioc: Pointer to MPT_ADAPTER structure
-- * @mfgpage7_buffer: pointer to ManufacturingPage7_t that returns config
-- *                    page data
-- * @mfg_size - max size of buffer
-- *
-- *	Return: 0 for success
-- *	-ENOMEM if no memory available
-- *		-EPERM if not allowed due to ISR context
-- *		-EAGAIN if no msg frames currently available
-- *		-EFAULT for non-successful reply or no reply (timeout)
-- **/
--static int
--csmisas_get_manuf_pg_7(MPT_ADAPTER *ioc, ManufacturingPage7_t *mfgpage7_buffer, int mfg_size)
--{
--	ConfigPageHeader_t hdr;
--	CONFIGPARMS	cfg;
--	ManufacturingPage7_t *mfgPage7 = NULL;
--	dma_addr_t	mfgPage7_dma;
--	int		data_sz = 0;
--	int		rc;
--
--	/* Get Manufacturing Page 7 header */
--	hdr.PageVersion = MPI_MANUFACTURING0_PAGEVERSION;
--	hdr.PageLength = 0;
--	hdr.PageNumber = 7;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_MANUFACTURING;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.pageAddr = 0;
--	cfg.timeout = 0;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto csmisas_get_manuf_pg_7_exit;
--
--	if (hdr.PageLength == 0) {
--		rc = -EFAULT;
--		goto csmisas_get_manuf_pg_7_exit;
--	}
--
--	data_sz = hdr.PageLength * 4;
--	mfgPage7 = pci_alloc_consistent(ioc->pcidev, data_sz, &mfgPage7_dma);
--	if (!mfgPage7) {
--		rc = -ENOMEM;
--		goto csmisas_get_manuf_pg_7_exit;
--	}
--
--	memset((u8 *)mfgPage7, 0, data_sz);
--	cfg.physAddr = mfgPage7_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto csmisas_get_manuf_pg_7_exit;
--
--	/* copy buffer back to user */
--	memcpy(mfgpage7_buffer, mfgPage7, min(data_sz, mfg_size));
--
-- csmisas_get_manuf_pg_7_exit:
--
--	if (mfgPage7)
--		pci_free_consistent(ioc->pcidev, data_sz, (u8 *)mfgPage7,
--		    mfgPage7_dma);
--
--	return rc;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Get Connector info command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- **/
--static int
--csmisas_get_connector_info(unsigned long arg)
--{
--	CSMI_SAS_CONNECTOR_INFO_BUFFER __user *uarg = (void __user *) arg;
--	CSMI_SAS_CONNECTOR_INFO_BUFFER	 karg;
--	MPT_ADAPTER			*ioc = NULL;
--	ManufacturingPage7_t    	*mfgPg7 = NULL;
--	int				mfgPg7_sz;
--	int				iocnum;
--	int				i;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&karg, uarg,
--		sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		   "Unable to read in csmi_sas_connector_info_buffer"
--		   " struct @ %p\n",
--		   __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		return -ENODEV;
--	}
--
--	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--
--	/* `32` is the sizeof MPI_MANPAGE7_CONNECTOR_INFO */
--	for (i = 0; i < 32; i++) {
--		karg.Reference[i].uPinout = CSMI_SAS_CON_UNKNOWN;
--		strcpy(karg.Reference[i].bConnector,"");
--		karg.Reference[i].bLocation = CSMI_SAS_CON_UNKNOWN;
--	}
--
--	mfgPg7_sz = offsetof(CONFIG_PAGE_MANUFACTURING_7,ConnectorInfo) +
--	    (ioc->num_ports * sizeof(MPI_MANPAGE7_CONNECTOR_INFO));
--	mfgPg7 = kmalloc(mfgPg7_sz, GFP_KERNEL);
--	if (!mfgPg7){
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to malloc @ %p\n",
--		    __FILE__, __LINE__, __FUNCTION__, mfgPg7);
--		return -EFAULT;
--	}
--	memset(mfgPg7, 0, mfgPg7_sz);
--
--	if (!csmisas_get_manuf_pg_7(ioc, mfgPg7, mfgPg7_sz)) {
--		for (i = 0; i < ioc->num_ports; i++) {
--			karg.Reference[i].uPinout =
--			    le32_to_cpu(mfgPg7->ConnectorInfo[i].Pinout);
--			/*endian conversion , this is u8 * 16 ?? */
--			strncpy(karg.Reference[i].bConnector,
--			    mfgPg7->ConnectorInfo[i].Connector, 16);
--			karg.Reference[i].bLocation =
--			    mfgPg7->ConnectorInfo[i].Location;
--		}
--	}
--
--	kfree(mfgPg7);
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg,
--		sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		"Unable to write out csmi_sas_connector_info_buffer @"
--	       "%p\n",
--		__FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return 0;
--}
--
--/**
-- *                 csmisas_fill_location_data
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- **/
--static int
--csmisas_fill_location_data(MPT_ADAPTER *ioc, u8 bus, u8 id, u8 opcode,
--	CSMI_SAS_LOCATION_IDENTIFIER * location_ident)
--{
--
--	ConfigExtendedPageHeader_t 	hdr;
--	CONFIGPARMS			cfg;
--	int				rc;
--	SasDevicePage0_t		*sasDevicePg0=NULL;
--	SasEnclosurePage0_t		*sasEnclosurePg0=NULL;
--	dma_addr_t			sasDevicePg0_dma,sasEnclosurePg0_dma;
--	int				sasDevicePg0_data_sz=0;
--	int				sasEnclosurePg0_data_sz=0;
--	u64				sas_address;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--	memset (location_ident, 0, sizeof(*location_ident));
--
--	/* SAS Device Page 0 */
--	hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		rc=-1;
--		goto fill_location_data_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		rc=-1;
--		goto fill_location_data_exit;
--	}
--
--	sasDevicePg0_data_sz = hdr.ExtPageLength * 4;
--	sasDevicePg0 = (SasDevicePage0_t *) pci_alloc_consistent(
--	    ioc->pcidev, sasDevicePg0_data_sz, &sasDevicePg0_dma);
--	if (!sasDevicePg0) {
--		rc=-1;
--		goto fill_location_data_exit;
--	}
--
--	memset((u8 *)sasDevicePg0, 0, sasDevicePg0_data_sz);
--	cfg.physAddr = sasDevicePg0_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--	cfg.pageAddr = (bus << 8) + id
--	    + (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
--			MPI_SAS_DEVICE_PGAD_FORM_SHIFT);
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		rc=-1;
--		goto fill_location_data_exit;
--	}
--
--	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_ADDRESS_VALID;
--	memcpy(&sas_address, &sasDevicePg0->SASAddress, sizeof(u64));
--	sas_address = reverse_byte_order64(sas_address);
--	memcpy(location_ident->bSASAddress, &sas_address, sizeof(u64));
--
--	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_LUN_VALID;
--	memset(location_ident->bSASLun, 0, sizeof(location_ident->bSASLun));
--
--	/* SAS Enclosure Page 0 */
--	hdr.PageVersion = MPI_SASENCLOSURE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_ENCLOSURE;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		rc=0;
--		goto fill_location_data_exit;
--	}
--
--	if (hdr.ExtPageLength == 0) {
--		rc=0;
--		goto fill_location_data_exit;
--	}
--
--	sasEnclosurePg0_data_sz = hdr.ExtPageLength * 4;
--	sasEnclosurePg0 = (SasEnclosurePage0_t *) pci_alloc_consistent(
--	    ioc->pcidev, sasEnclosurePg0_data_sz, &sasEnclosurePg0_dma);
--	if (!sasEnclosurePg0) {
--		rc=0;
--		goto fill_location_data_exit;
--	}
--	cfg.physAddr = sasEnclosurePg0_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--	cfg.pageAddr = sasDevicePg0->EnclosureHandle
--	    + (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE << MPI_SAS_ENCLOS_PGAD_FORM_SHIFT);
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0) {
--		rc=0;
--		goto fill_location_data_exit;
--	}
--
--	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID;
--	memcpy(&sas_address, &sasEnclosurePg0->EnclosureLogicalID, sizeof(u64));
--	sas_address = reverse_byte_order64(sas_address);
--	if (sas_address)
--		memcpy(location_ident->bEnclosureIdentifier, &sas_address, sizeof(u64));
--	else
--		strcpy(location_ident->bEnclosureIdentifier,"Internal");
--
--// bBayPrefix - not supported
--
--// TODO - We need to look at sasEnclosurePg0-.Flags , to determine
--//	whether SEP BUS/TargetID is valid.  Ifs its a SES device, then
--//	issue internal inquiry to (bus/id) to gather the Enclosure name.
--//	If the device is SMP, then issue SMP_MANUFACTURING to get enclosure name
--//	If its direct attached, there is no enclosure name
--	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID;
--	strcpy(location_ident->bEnclosureName,"Not Supported");
--
--	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_LOCATION_STATE_VALID;
--	location_ident->bLocationState = CSMI_SAS_LOCATE_UNKNOWN;
--
--	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID;
--	location_ident->bBayIdentifier = le16_to_cpu(sasDevicePg0->Slot);
--
--
--// TODO - illuminating LEDs,
--// karg->bIdentify = CSMI_SAS_LOCATE_FORCE_OFF, CSMI_SAS_LOCATE_FORCE_ON
--// We can enable/disable LEDs by SCSI Enclosure Processor MPI request message
--// printk("Flags=0x%x\n",sasEnclosurePg0->Flags);
--
--/* check sasEnclosurePg0->Flags -
-- * to validate whether we need to send the SEPRequest
-- * bit:5 should be set
-- * bit:3-0 any bit should be set.  If zero, then SEPRequest will fail
--*/
--
--/* MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR
-- * Look in mpi_init.h
-- * SEPRequest_t = structure
-- *
-- * SEPRequest_t->Action should be set to MPI_SEP_REQ_ACTION_WRITE_STATUS
-- *
-- * SEPRequest_t->Flags should be set to
-- * MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS, to pass along enclosure/slot ids
-- *
-- * SEPRequest_t->SlotStatus |= MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST - this
-- * will illuminate the LEDs
-- */
--
--fill_location_data_exit:
--
--	if (sasDevicePg0 != NULL)
--		pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz,
--		    sasDevicePg0, sasDevicePg0_dma);
--
--	if (sasEnclosurePg0 != NULL)
--		pci_free_consistent(ioc->pcidev, sasEnclosurePg0_data_sz,
--		    sasEnclosurePg0, sasEnclosurePg0_dma);
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	return rc;
--}
--
--static int
--csmisas_fill_location_data_raid(MPT_ADAPTER *ioc, PCSMI_SAS_GET_LOCATION_BUFFER karg, u8 VolumeBus,
--	u8 volumeID)
--{
--	pRaidVolumePage0_t		pVolume0 = NULL;
--	pRaidPhysDiskPage0_t		pPhysDisk0 = NULL;
--	CONFIGPARMS			cfg;
--	ConfigPageHeader_t		header;
--	u8				physDiskNumMax;
--	int				volumepage0sz = 0, physdiskpage0sz = 0;
--	dma_addr_t			volume0_dma, physdisk0_dma;
--	int 				csmi_sas_get_location_sz;
--	int				rc = 0, i, idx;
--	int 				num_hotpares;
--	u64				totalMaxLBA, tmpTotalMaxLBA;
--	IOCPage5_t 			*iocPage5 = NULL;
--	u32				device_info = 0;
--	struct sas_device_info		*sas_info;
--
--	int 				sz;
--
--	csmi_sas_get_location_sz = karg->IoctlHeader.Length;
--	physDiskNumMax = (csmi_sas_get_location_sz -
--	    offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location))
--	    / sizeof(CSMI_SAS_LOCATION_IDENTIFIER);
--	karg->bNumberOfLocationIdentifiers=0;
--
--	/*
--	 * get RAID Volume Page 0
--	 */
--
--	header.PageVersion = 0;
--	header.PageLength = 0;
--	header.PageNumber = 0;
--	header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
--	cfg.cfghdr.hdr = &header;
--	cfg.physAddr = -1;
--	cfg.pageAddr = (VolumeBus << 8) + volumeID;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--	if (mpt_config(ioc, &cfg) != 0) {
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--
--	if (header.PageLength == 0) {
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--
--	volumepage0sz = header.PageLength * 4;
--	pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz,
--	    &volume0_dma);
--	if (!pVolume0) {
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--	cfg.physAddr = volume0_dma;
--	if (mpt_config(ioc, &cfg) != 0){
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--
--	totalMaxLBA = (u64)le32_to_cpu(pVolume0->MaxLBA) |
--	    ((u64)le32_to_cpu(pVolume0->MaxLBAHigh)) << 32;
--
--	/*
--	 * get RAID Physical Disk Page 0
--	 */
--	header.PageVersion = 0;
--	header.PageLength = 0;
--	header.PageNumber = 0;
--	header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
--	cfg.cfghdr.hdr = &header;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
--	if (mpt_config(ioc, &cfg) != 0) {
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--
--	if (header.PageLength == 0) {
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--
--	physdiskpage0sz = header.PageLength * 4;
--	pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz,
--	    &physdisk0_dma);
--	if (!pPhysDisk0) {
--		rc = -1;
--		goto sas_fill_location_data_raid_exit;
--	}
--	cfg.physAddr = physdisk0_dma;
--
--	for (i=0; i < min(pVolume0->NumPhysDisks, physDiskNumMax); i++) {
--
--		/* obtain a refresh of pPhysDisk0 */
--		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--		cfg.pageAddr = pVolume0->PhysDisk[i].PhysDiskNum;
--		if (mpt_config(ioc, &cfg) != 0){
--			rc = -1;
--			goto sas_fill_location_data_raid_exit;
--		}
--
--		if((csmisas_fill_location_data(ioc, pPhysDisk0->PhysDiskBus,
--		    pPhysDisk0->PhysDiskID, karg->bIdentify,
--		    &karg->Location[karg->bNumberOfLocationIdentifiers])) == 0)
--			karg->bNumberOfLocationIdentifiers++;
--
--		if (device_info)
--			continue;
--		sas_info = csmisas_get_device_component_by_fw(ioc,
--		    pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID);
--		if (!sas_info || sas_info->is_cached)
--			continue;
--		device_info = sas_info->device_info;
--	}
--
--	if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS)
--		goto sas_fill_location_data_raid_exit;
--
--	/*
--	 * hot spare support
--	 *
--	 */
--
--	num_hotpares = csmisas_get_number_hotspares(ioc);
--
--	if (num_hotpares) {
--
--		sz = offsetof(IOCPage5_t, HotSpare) +
--		    num_hotpares * sizeof(IOC_5_HOT_SPARE);
--		iocPage5 = kmalloc(sz, GFP_KERNEL);
--
--		if (!iocPage5)
--			goto sas_fill_location_data_raid_exit;
--		memset(iocPage5, 0, sizeof(*iocPage5));
--
--		if (csmisas_get_ioc_pg5(ioc, iocPage5, sz) != 0)
--			goto sas_fill_location_data_raid_exit;
--
--		for(i = 0, idx = pVolume0->NumPhysDisks ; i < num_hotpares;
--		    i++, idx++) {
--
--			if (idx >= physDiskNumMax)
--				break;
--
--			/* obtain a refresh of pPhysDisk0 */
--			cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--			cfg.pageAddr = iocPage5->HotSpare[i].PhysDiskNum;
--			if (mpt_config(ioc, &cfg) != 0)
--				goto sas_fill_location_data_raid_exit;
--
--			/* Search the list for the matching SAS address. */
--			sas_info = csmisas_get_device_component_by_fw(ioc,
--			    pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID);
--
--			if (!sas_info || sas_info->is_cached)
--				continue;
--
--			/* don't mix SSP hot spare
--			 * in SATA volume
--			 */
--			if (!csmisas_is_sata(pPhysDisk0) &&
--			    (device_info &
--			    MPI_SAS_DEVICE_INFO_SATA_DEVICE))
--				continue;
--
--			/* don't mix SATA hot spare
--			 * in SSP volume
--			 */
--			if (csmisas_is_sata(pPhysDisk0) &&
--			    (device_info &
--			    MPI_SAS_DEVICE_INFO_SSP_TARGET))
--				continue;
--
--			/* capacity check for IM volumes*/
--			if ((pVolume0->VolumeType ==
--			    MPI_RAID_VOL_TYPE_IM) &&
--			    (totalMaxLBA +
--			    (64*2*1024) /* metadata = 64MB*/ >
--			    le32_to_cpu(pPhysDisk0->MaxLBA)))
--				continue;
--
--			tmpTotalMaxLBA = totalMaxLBA;
--			do_div(tmpTotalMaxLBA, pVolume0->NumPhysDisks);
--			/* capacity check for IME volumes*/
--			if ((pVolume0->VolumeType ==
--				MPI_RAID_VOL_TYPE_IME) &&
--			    ((tmpTotalMaxLBA * 2) +
--			     (64*2*1024 ) /*metadata = 64MB*/ >
--			    le32_to_cpu(pPhysDisk0->MaxLBA)))
--				continue;
--
--			if((csmisas_fill_location_data(ioc,
--			    pPhysDisk0->PhysDiskBus, pPhysDisk0->PhysDiskID,
--			    karg->bIdentify,
--			    &karg->Location[karg->bNumberOfLocationIdentifiers])) == 0)
--				karg->bNumberOfLocationIdentifiers++;
--		}
--	}
--
--
-- sas_fill_location_data_raid_exit:
--
--	kfree(iocPage5);
--
--	if (pVolume0)
--		pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0,
--		    volume0_dma);
--
--	if(pPhysDisk0)
--		pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0,
--		    physdisk0_dma);
--
--	return rc;
--}
--
--/**
-- * Prototype Routine for the CSMI SAS Get location command.
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- *		-ENODEV if no such device/adapter
-- */
--static int
--csmisas_get_location(unsigned long arg)
--{
--	CSMI_SAS_GET_LOCATION_BUFFER __user *uarg = (void __user *) arg;
--	PCSMI_SAS_GET_LOCATION_BUFFER	karg;
--	IOCTL_HEADER			ioctl_header;
--	MPT_ADAPTER			*ioc = NULL;
--	int				iocnum,i;
--	int				csmi_sas_get_location_sz;
--	int				memory_pages;
--	struct sas_device_info		*sas_info;
--
--	dcsmisasprintk(("%s enter.\n",__FUNCTION__));
--
--	if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in IOCTL_HEADER"
--		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
--		return -EFAULT;
--	}
--
--	csmi_sas_get_location_sz = ioctl_header.Length;
--	memory_pages = get_order(csmi_sas_get_location_sz);
--	karg = (PCSMI_SAS_GET_LOCATION_BUFFER)__get_free_pages(
--		GFP_KERNEL, memory_pages);
--	if (!karg){
--		printk(KERN_ERR "%s@%d::%s() - "
--			"Unable to malloc GET_LOCATION_BUFFER "
--			"csmi_sas_get_location_sz=%d memory_pages=%d\n",
--			__FILE__, __LINE__, __FUNCTION__,
--			csmi_sas_get_location_sz, memory_pages);
--		return -ENOMEM;
--	}
--	memset(karg, 0, sizeof(*karg));
--
--	if (copy_from_user(karg, uarg, csmi_sas_get_location_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to read in csmi_sas_phy_control_buffer "
--		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)karg, memory_pages);
--		return -EFAULT;
--	}
--
--	if (((iocnum = mpt_verify_adapter(karg->IoctlHeader.IOControllerNumber,
--	    &ioc)) < 0) || (ioc == NULL)) {
--		dcsmisasprintk((KERN_ERR
--		"%s::%s() @%d - ioc%d not found!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)karg, memory_pages);
--		return -ENODEV;
--	}
--
--	if (!csmisas_is_this_sas_cntr(ioc)) {
--		dcsmisasprintk((KERN_ERR
--		    "%s::%s() @%d - ioc%d not SAS controller!\n",
--		    __FILE__, __FUNCTION__, __LINE__, iocnum));
--		free_pages((unsigned long)karg, memory_pages);
--		return -ENODEV;
--	}
--
--	karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
--	if(karg->bLengthOfLocationIdentifier !=
--	    sizeof(CSMI_SAS_LOCATION_IDENTIFIER))
--		goto cim_sas_get_location_exit;
--
--	sas_info = csmisas_get_device_component_by_os(ioc, karg->bPathId,
--	    karg->bTargetId);
--	if (!sas_info)
--		goto cim_sas_get_location_exit;
--
--	/* RAID SUPPORT */
--	if (ioc->raid_data.pIocPg2 && sas_info->is_logical_volume) {
--		for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++){
--			if (sas_info->fw.id ==
--			    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID &&
--			    sas_info->fw.channel ==
--			    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus) {
--				if(csmisas_fill_location_data_raid(ioc, karg,
--				    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus,
--				    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID) == 0)
--					karg->IoctlHeader.ReturnCode =
--					    CSMI_SAS_STATUS_SUCCESS;
--				else
--					karg->IoctlHeader.ReturnCode =
--					    CSMI_SAS_STATUS_FAILED;
--				goto cim_sas_get_location_exit;
--			}
--		}
--	}
--
--	/* NON-RAID SUPPORT */
--	if (sas_info->is_cached || sas_info->is_logical_volume)
--		goto cim_sas_get_location_exit;
--
--	/* make sure there's enough room to populate the Location[] struct */
--	if ((csmi_sas_get_location_sz -
--	    offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location)) <
--	    sizeof(CSMI_SAS_LOCATION_IDENTIFIER))
--		goto cim_sas_get_location_exit;
--
--	karg->bNumberOfLocationIdentifiers=1;
--	karg->Location[0].bLocationFlags=0;
--	if((csmisas_fill_location_data(ioc, sas_info->fw.channel,
--	    sas_info->fw.id, karg->bIdentify, &karg->Location[0])) == 0)
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
--	else
--		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
--
-- cim_sas_get_location_exit:
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, karg, csmi_sas_get_location_sz)) {
--		printk(KERN_ERR "%s@%d::%s() - "
--		    "Unable to write out csmi_sas_get_location_buffer "
--		    "@ %p\n",__FILE__, __LINE__, __FUNCTION__, uarg);
--		free_pages((unsigned long)karg, memory_pages);
--		return -EFAULT;
--	}
--
--	dcsmisasprintk(("%s exit.\n",__FUNCTION__));
--	free_pages((unsigned long)karg, memory_pages);
--	return 0;
--}
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.h linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/csmi/csmisas.h	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmi/csmisas.h	1970-01-01 01:00:00.000000000 +0100
-@@ -1,1854 +0,0 @@
--/**************************************************************************
--
--Module Name:
--
--   CSMISAS.H
--
--
--Abstract:
--
--   This file contains constants and data structure definitions used by drivers
--   that support the Common Storage Management Interface specification for
--   SAS or SATA in either the Windows or Linux.
--
--   This should be considered as a reference implementation only.  Changes may
--   be necessary to accommodate a specific build environment or target OS.
--
--Revision History:
--
--   001  SEF   8/12/03  Initial release.
--   002  SEF   8/20/03  Cleanup to match documentation.
--   003  SEF   9/12/03  Additional cleanup, created combined header
--   004  SEF   9/23/03  Changed base types to match linux defaults
--                       Added RAID signature
--                       Added bControllerFlags to CSMI_SAS_CNTLR_CONFIG
--                       Changed CSMI_SAS_BEGIN_PACK to 8 for common structures
--                       Fixed other typos identified in first compilation test
--   005  SEF  10/03/03  Additions to match first version of CSMI document
--   006  SEF  10/14/03  Fixed typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER
--                       Added defines for bConnectionRate
--   007  SEF  10/15/03  Added Firmware Download Control Code and support
--                       Added CSMI revision support
--   008  SEF  10/30/03  No functional change, just updated version to track
--                       spec changes
--   009  SEF  12/09/03  No functional change, just updated version to track
--                       spec changes
--   010  SEF   3/11/04  Fixed typedef struct CSMI_SAS_RAID_DRIVES to include the
--                       bFirmware member that is defined in the spec, but
--                       was missing in this file,
--                       added CC_CSMI_SAS_TASK_MANAGEMENT
--   011  SEF   4/02/04  No functional change, added comment line before
--                       CC_CSMI_SAS_TASK_MANAGEMENT
--   012  SEF   4/16/04  Added IOControllerNumber to linux header,
--                       Modified linux control codes to have upper word of
--                       0xCC77.... to indicate CSMI version 77
--                       Added bSignalClass to CC_CSMI_SET_PHY_INFO
--                       Added CC_CSMI_SAS_PHY_CONTROL support
--   013  SEF   5/14/04  Added CC_CSMI_SAS_GET_CONNECTOR_INFO support
--   014  SEF   5/24/04  No functional change, just updated version to track spec
--                       changes
--   015  SEF   6/16/04  changed bPinout to uPinout to reflect proper size,
--                       changed width of bLocation defines to reflect size
--   016  SEF   6/17/04  changed bLengthOfControls in CSMI_SAS_PHY_CONTROL
--                       to be proper size
--   017  SEF   9/17/04  added CSMI_SAS_SATA_PORT_SELECTOR,
--                       CSMI_SAS_LINK_VIRTUAL, CSMI_SAS_CON_NOT_PRESENT, and
--                       CSMI_SAS_CON_NOT_CONNECTED
--   018  SEF   9/20/04  added CSMI_SAS_PHY_USER_PATTERN,
--                       changed definition of CSMI_SAS_PHY_FIXED_PATTERN to not
--                       conflict with activate definition
--   019  SEF  12/06/04  added CSMI_SAS_GET_LOCATION
--                       added bSSPStatus to CSMI_SAS_SSP_PASSTHRU_STATUS
--                       structure
--   020  SEF   5/25/05  added CSMI_SAS_PHY_VIRTUAL_SMP, and changes to
--                       CSMI_SAS_GET_LOCATION
--   021  SEF  11/03/05  added new RAID creation functionality
--   022  SEF   2/01/06  corrected typo bNegotitiatedLInkRate
--                       Added two more RAID_TYPES, 7 and 8
--   023  SEF   4/04/06  added CSMI_RAID_TYPE_1E
--                       changed structures that contained surface scan
--                       to priority approach rather than time, causes
--                       0.89 to incompatible with 0.87, so a version
--                       check is necessary when interpreting the
--                       raid structures
--                       Added netware section
--   024 DRG    5/22/06  Added uFailureCode to CSMI_SAS_RAID_CONFIG and
--                       CSMI_SAS_RAID_FEATURES
--                       Changed __u64 fields to high and low __u32 fields in
--                       order to avoid backward compatibility issues with
--                       packing and alignment.
--                       Fixed alignment problem in CSMI_SAS_RAID_DRIVES.
--                       Added CSMI_SAS_CNTLR_SMART_ARRAY to uControllerFlags
--                       Reassigned the value of CSMI_SAS_CNTLR_RAID_CFG_SUPPORT
--                       to avoid a conflict.
--
--**************************************************************************/
--
--#ifndef _CSMI_SAS_H_
--#define _CSMI_SAS_H_
--
--// CSMI Specification Revision, the intent is that all versions of the
--// specification will be backward compatible after the 1.00 release.
--// Major revision number, corresponds to xxxx. of CSMI specification
--// Minor revision number, corresponds to .xxxx of CSMI specification
--#define CSMI_MAJOR_REVISION   0
--#define CSMI_MINOR_REVISION   90
--
--/*************************************************************************/
--/* PATCHES FOR TYPOS                                                     */
--/*************************************************************************/
--
--#define bNegotitiatedLInkRate bNegotiatedLinkRate
--
--/*************************************************************************/
--/* TARGET OS LINUX SPECIFIC CODE                                         */
--/*************************************************************************/
--
--// EDM #ifdef _linux
--#ifdef __KERNEL__
--
--// Linux base types
--
--#include <linux/types.h>
--
--#define __i8    char
--
--// pack definition
--
--// EDM #define CSMI_SAS_BEGIN_PACK(x)    pack(x)
--// EDM #define CSMI_SAS_END_PACK         pack()
--
--// IOCTL Control Codes
--// (IoctlHeader.ControlCode)
--
--// Control Codes prior to 0.77
--
--// Control Codes requiring CSMI_ALL_SIGNATURE
--
--// #define CC_CSMI_SAS_GET_DRIVER_INFO    0x12345678
--// #define CC_CSMI_SAS_GET_CNTLR_CONFIG   0x23456781
--// #define CC_CSMI_SAS_GET_CNTLR_STATUS   0x34567812
--// #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  0x92345678
--
--// Control Codes requiring CSMI_RAID_SIGNATURE
--
--// #define CC_CSMI_SAS_GET_RAID_INFO      0x45678123
--// #define CC_CSMI_SAS_GET_RAID_CONFIG    0x56781234
--
--// Control Codes requiring CSMI_SAS_SIGNATURE
--
--// #define CC_CSMI_SAS_GET_PHY_INFO       0x67812345
--// #define CC_CSMI_SAS_SET_PHY_INFO       0x78123456
--// #define CC_CSMI_SAS_GET_LINK_ERRORS    0x81234567
--// #define CC_CSMI_SAS_SMP_PASSTHRU       0xA1234567
--// #define CC_CSMI_SAS_SSP_PASSTHRU       0xB1234567
--// #define CC_CSMI_SAS_STP_PASSTHRU       0xC1234567
--// #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xD1234567
--// #define CC_CSMI_SAS_GET_SCSI_ADDRESS   0xE1234567
--// #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xF1234567
--// #define CC_CSMI_SAS_TASK_MANAGEMENT    0xA2345678
--
--// Control Codes for 0.77 and later
--
--// Control Codes requiring CSMI_ALL_SIGNATURE
--
--#define CC_CSMI_SAS_GET_DRIVER_INFO    0xCC770001
--#define CC_CSMI_SAS_GET_CNTLR_CONFIG   0xCC770002
--#define CC_CSMI_SAS_GET_CNTLR_STATUS   0xCC770003
--#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  0xCC770004
--
--// Control Codes requiring CSMI_RAID_SIGNATURE
--
--#define CC_CSMI_SAS_GET_RAID_INFO      0xCC77000A
--#define CC_CSMI_SAS_GET_RAID_CONFIG    0xCC77000B
--#define CC_CSMI_SAS_GET_RAID_FEATURES  0xCC77000C
--#define CC_CSMI_SAS_SET_RAID_CONTROL   0xCC77000D
--#define CC_CSMI_SAS_GET_RAID_ELEMENT   0xCC77000E
--#define CC_CSMI_SAS_SET_RAID_OPERATION 0xCC77000F
--
--// Control Codes requiring CSMI_SAS_SIGNATURE
--
--#define CC_CSMI_SAS_GET_PHY_INFO       0xCC770014
--#define CC_CSMI_SAS_SET_PHY_INFO       0xCC770015
--#define CC_CSMI_SAS_GET_LINK_ERRORS    0xCC770016
--#define CC_CSMI_SAS_SMP_PASSTHRU       0xCC770017
--#define CC_CSMI_SAS_SSP_PASSTHRU       0xCC770018
--#define CC_CSMI_SAS_STP_PASSTHRU       0xCC770019
--#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xCC770020
--#define CC_CSMI_SAS_GET_SCSI_ADDRESS   0xCC770021
--#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xCC770022
--#define CC_CSMI_SAS_TASK_MANAGEMENT    0xCC770023
--#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0xCC770024
--#define CC_CSMI_SAS_GET_LOCATION       0xCC770025
--
--
--// Control Codes requiring CSMI_PHY_SIGNATURE
--
--#define CC_CSMI_SAS_PHY_CONTROL        0xCC77003C
--
--// EDM #pragma CSMI_SAS_BEGIN_PACK(8)
--#pragma pack(8)
--
--// IOCTL_HEADER
--typedef struct _IOCTL_HEADER {
--    __u32 IOControllerNumber;
--    __u32 Length;
--    __u32 ReturnCode;
--    __u32 Timeout;
--    __u16 Direction;
--} IOCTL_HEADER,
--  *PIOCTL_HEADER;
--
--// EDM #pragma CSMI_SAS_END_PACK
--#pragma pack()
--
--#endif
--
--/*************************************************************************/
--/* TARGET OS WINDOWS SPECIFIC CODE                                       */
--/*************************************************************************/
--
--#ifdef _WIN32
--
--// windows IOCTL definitions
--
--#ifndef _NTDDSCSIH_
--#include <ntddscsi.h>
--#endif
--
--// pack definition
--
--#if defined _MSC_VER
--   #define CSMI_SAS_BEGIN_PACK(x)    pack(push,x)
--   #define CSMI_SAS_END_PACK         pack(pop)
--#elif defined __BORLANDC__
--   #define CSMI_SAS_BEGIN_PACK(x)    option -a##x
--   #define CSMI_SAS_END_PACK         option -a.
--#else
--   #error "CSMISAS.H - Must externally define a pack compiler designator."
--#endif
--
--// base types
--
--#define __u8    unsigned char
--#define __u16   unsigned short
--#define __u32   unsigned long
--#define __u64   unsigned __int64
--
--#define __i8    char
--
--// IOCTL Control Codes
--// (IoctlHeader.ControlCode)
--
--// Control Codes requiring CSMI_ALL_SIGNATURE
--
--#define CC_CSMI_SAS_GET_DRIVER_INFO    1
--#define CC_CSMI_SAS_GET_CNTLR_CONFIG   2
--#define CC_CSMI_SAS_GET_CNTLR_STATUS   3
--#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  4
--
--// Control Codes requiring CSMI_RAID_SIGNATURE
--
--#define CC_CSMI_SAS_GET_RAID_INFO      10
--#define CC_CSMI_SAS_GET_RAID_CONFIG    11
--#define CC_CSMI_SAS_GET_RAID_FEATURES  12
--#define CC_CSMI_SAS_SET_RAID_CONTROL   13
--#define CC_CSMI_SAS_GET_RAID_ELEMENT   14
--#define CC_CSMI_SAS_SET_RAID_OPERATION 15
--
--// Control Codes requiring CSMI_SAS_SIGNATURE
--
--#define CC_CSMI_SAS_GET_PHY_INFO       20
--#define CC_CSMI_SAS_SET_PHY_INFO       21
--#define CC_CSMI_SAS_GET_LINK_ERRORS    22
--#define CC_CSMI_SAS_SMP_PASSTHRU       23
--#define CC_CSMI_SAS_SSP_PASSTHRU       24
--#define CC_CSMI_SAS_STP_PASSTHRU       25
--#define CC_CSMI_SAS_GET_SATA_SIGNATURE 26
--#define CC_CSMI_SAS_GET_SCSI_ADDRESS   27
--#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 28
--#define CC_CSMI_SAS_TASK_MANAGEMENT    29
--#define CC_CSMI_SAS_GET_CONNECTOR_INFO 30
--#define CC_CSMI_SAS_GET_LOCATION       31
--
--// Control Codes requiring CSMI_PHY_SIGNATURE
--
--#define CC_CSMI_SAS_PHY_CONTROL        60
--
--#define IOCTL_HEADER SRB_IO_CONTROL
--#define PIOCTL_HEADER PSRB_IO_CONTROL
--
--#endif
--
--/*************************************************************************/
--/* TARGET OS NETWARE SPECIFIC CODE                                       */
--/*************************************************************************/
--
--#ifdef _NETWARE
--
--// NetWare IOCTL definitions
--
--#define CSMI_SAS_BEGIN_PACK(x)    pack(x)
--#define CSMI_SAS_END_PACK         pack()
--
--#ifndef LONG
--typedef unsigned long LONG;
--#endif
--
--#ifndef WORD
--typedef unsigned short WORD;
--#endif
--
--#ifndef BYTE
--typedef unsigned char BYTE;
--#endif
--
--/* Need to have these definitions for Netware */
--#define __u8    unsigned char
--#define __u16   unsigned short
--#define __u32   unsigned long
--#define __u64   unsigned __int64
--
--#define __i8    char
--
--
--// EDM #pragma CSMI_SAS_BEGIN_PACK(8)
--#pragma pack(8)
--
--// IOCTL_HEADER
--typedef struct _IOCTL_HEADER {
--    __u32 Length;
--    __u32 ReturnCode;
--} IOCTL_HEADER,
--  *PIOCTL_HEADER;
--
--// EDM #pragma CSMI_SAS_END_PACK
--#pragma pack()
--
--// IOCTL Control Codes
--// (IoctlHeader.ControlCode)
--
--// Control Codes requiring CSMI_ALL_SIGNATURE
--
--#define CC_CSMI_SAS_GET_DRIVER_INFO    0x01FF0001
--#define CC_CSMI_SAS_GET_CNTLR_CONFIG   0x01FF0002
--#define CC_CSMI_SAS_GET_CNTLR_STATUS   0x01FF0003
--#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  0x01FF0004
--
--// Control Codes requiring CSMI_RAID_SIGNATURE
--
--#define CC_CSMI_SAS_GET_RAID_INFO      0x01FF000A
--#define CC_CSMI_SAS_GET_RAID_CONFIG    0x01FF000B
--#define CC_CSMI_SAS_GET_RAID_FEATURES  0x01FF000C
--#define CC_CSMI_SAS_SET_RAID_CONTROL   0x01FF000D
--#define CC_CSMI_SAS_GET_RAID_ELEMENT   0x01FF000E
--#define CC_CSMI_SAS_SET_RAID_OPERATION 0x01FF000F
--
--// Control Codes requiring CSMI_SAS_SIGNATURE
--
--#define CC_CSMI_SAS_GET_PHY_INFO       0x01FF0014
--#define CC_CSMI_SAS_SET_PHY_INFO       0x01FF0015
--#define CC_CSMI_SAS_GET_LINK_ERRORS    0x01FF0016
--#define CC_CSMI_SAS_SMP_PASSTHRU       0x01FF0017
--#define CC_CSMI_SAS_SSP_PASSTHRU       0x01FF0018
--#define CC_CSMI_SAS_STP_PASSTHRU       0x01FF0019
--#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0x01FF001A
--#define CC_CSMI_SAS_GET_SCSI_ADDRESS   0x01FF001B
--#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0x01FF001C
--#define CC_CSMI_SAS_TASK_MANAGEMENT    0x01FF001D
--#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0x01FF001E
--#define CC_CSMI_SAS_GET_LOCATION       0x01FF001F
--
--// Control Codes requiring CSMI_PHY_SIGNATURE
--
--#define CC_CSMI_SAS_PHY_CONTROL        60
--
--#endif
--
--/*************************************************************************/
--/* TARGET OS NOT DEFINED ERROR                                           */
--/*************************************************************************/
--
--// EDM
--//#if (!_WIN32 && !_linux && !_NETWARE)
--//   #error "Unknown target OS."
--//#endif
--
--/*************************************************************************/
--/* OS INDEPENDENT CODE                                                   */
--/*************************************************************************/
--
--/* * * * * * * * * * Class Independent IOCTL Constants * * * * * * * * * */
--
--// Return codes for all IOCTL's regardless of class
--// (IoctlHeader.ReturnCode)
--
--#define CSMI_SAS_STATUS_SUCCESS              0
--#define CSMI_SAS_STATUS_FAILED               1
--#define CSMI_SAS_STATUS_BAD_CNTL_CODE        2
--#define CSMI_SAS_STATUS_INVALID_PARAMETER    3
--#define CSMI_SAS_STATUS_WRITE_ATTEMPTED      4
--
--// Signature value
--// (IoctlHeader.Signature)
--
--#define CSMI_ALL_SIGNATURE    "CSMIALL"
--
--// Timeout value default of 60 seconds
--// (IoctlHeader.Timeout)
--
--#define CSMI_ALL_TIMEOUT      60
--
--//  Direction values for data flow on this IOCTL
--// (IoctlHeader.Direction, Linux only)
--#define CSMI_SAS_DATA_READ    0
--#define CSMI_SAS_DATA_WRITE   1
--
--// I/O Bus Types
--// ISA and EISA bus types are not supported
--// (bIoBusType)
--
--#define CSMI_SAS_BUS_TYPE_PCI       3
--#define CSMI_SAS_BUS_TYPE_PCMCIA    4
--
--// Controller Status
--// (uStatus)
--
--#define CSMI_SAS_CNTLR_STATUS_GOOD     1
--#define CSMI_SAS_CNTLR_STATUS_FAILED   2
--#define CSMI_SAS_CNTLR_STATUS_OFFLINE  3
--#define CSMI_SAS_CNTLR_STATUS_POWEROFF 4
--
--// Offline Status Reason
--// (uOfflineReason)
--
--#define CSMI_SAS_OFFLINE_REASON_NO_REASON             0
--#define CSMI_SAS_OFFLINE_REASON_INITIALIZING          1
--#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_DEGRADED 2
--#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_FAILURE  3
--
--// Controller Class
--// (bControllerClass)
--
--#define CSMI_SAS_CNTLR_CLASS_HBA    5
--
--// Controller Flag bits
--// (uControllerFlags)
--
--#define CSMI_SAS_CNTLR_SAS_HBA          0x00000001
--#define CSMI_SAS_CNTLR_SAS_RAID         0x00000002
--#define CSMI_SAS_CNTLR_SATA_HBA         0x00000004
--#define CSMI_SAS_CNTLR_SATA_RAID        0x00000008
--#define CSMI_SAS_CNTLR_SMART_ARRAY      0x00000010
--
--// for firmware download
--#define CSMI_SAS_CNTLR_FWD_SUPPORT      0x00010000
--#define CSMI_SAS_CNTLR_FWD_ONLINE       0x00020000
--#define CSMI_SAS_CNTLR_FWD_SRESET       0x00040000
--#define CSMI_SAS_CNTLR_FWD_HRESET       0x00080000
--#define CSMI_SAS_CNTLR_FWD_RROM         0x00100000
--
--// for RAID configuration supported
--#define CSMI_SAS_CNTLR_RAID_CFG_SUPPORT 0x01000000
--
--// Download Flag bits
--// (uDownloadFlags)
--#define CSMI_SAS_FWD_VALIDATE       0x00000001
--#define CSMI_SAS_FWD_SOFT_RESET     0x00000002
--#define CSMI_SAS_FWD_HARD_RESET     0x00000004
--
--// Firmware Download Status
--// (usStatus)
--#define CSMI_SAS_FWD_SUCCESS        0
--#define CSMI_SAS_FWD_FAILED         1
--#define CSMI_SAS_FWD_USING_RROM     2
--#define CSMI_SAS_FWD_REJECT         3
--#define CSMI_SAS_FWD_DOWNREV        4
--
--// Firmware Download Severity
--// (usSeverity>
--#define CSMI_SAS_FWD_INFORMATION    0
--#define CSMI_SAS_FWD_WARNING        1
--#define CSMI_SAS_FWD_ERROR          2
--#define CSMI_SAS_FWD_FATAL          3
--
--/* * * * * * * * * * SAS RAID Class IOCTL Constants  * * * * * * * * */
--
--// Return codes for the RAID IOCTL's regardless of class
--// (IoctlHeader.ReturnCode)
--
--#define CSMI_SAS_RAID_SET_OUT_OF_RANGE       1000
--#define CSMI_SAS_RAID_SET_BUFFER_TOO_SMALL   1001
--#define CSMI_SAS_RAID_SET_DATA_CHANGED       1002
--
--// Signature value
--// (IoctlHeader.Signature)
--
--#define CSMI_RAID_SIGNATURE    "CSMIARY"
--
--// Timeout value default of 60 seconds
--// (IoctlHeader.Timeout)
--
--#define CSMI_RAID_TIMEOUT      60
--
--// RAID Types
--// (bRaidType)
--#define CSMI_SAS_RAID_TYPE_NONE     0
--#define CSMI_SAS_RAID_TYPE_0        1
--#define CSMI_SAS_RAID_TYPE_1        2
--#define CSMI_SAS_RAID_TYPE_10       3
--#define CSMI_SAS_RAID_TYPE_5        4
--#define CSMI_SAS_RAID_TYPE_15       5
--#define CSMI_SAS_RAID_TYPE_6        6
--#define CSMI_SAS_RAID_TYPE_50       7
--#define CSMI_SAS_RAID_TYPE_VOLUME   8
--#define CSMI_SAS_RAID_TYPE_1E       9
--#define CSMI_SAS_RAID_TYPE_OTHER    255
--// the last value 255 was already defined for other
--// so end is defined as 254
--#define CSMI_SAS_RAID_TYPE_END      254
--
--// RAID Status
--// (bStatus)
--#define CSMI_SAS_RAID_SET_STATUS_OK             0
--#define CSMI_SAS_RAID_SET_STATUS_DEGRADED       1
--#define CSMI_SAS_RAID_SET_STATUS_REBUILDING     2
--#define CSMI_SAS_RAID_SET_STATUS_FAILED         3
--#define CSMI_SAS_RAID_SET_STATUS_OFFLINE        4
--#define CSMI_SAS_RAID_SET_STATUS_TRANSFORMING   5
--#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_REBUILD         6
--#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_TRANSFORMATION  7
--
--// RAID Drive Count
--// (bDriveCount, 0xF1 to 0xFF are reserved)
--#define CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG   0xF1
--#define CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED 0xF2
--
--// RAID Data Type
--// (bDataType)
--#define CSMI_SAS_RAID_DATA_DRIVES           0
--#define CSMI_SAS_RAID_DATA_DEVICE_ID        1
--#define CSMI_SAS_RAID_DATA_ADDITIONAL_DATA  2
--
--// RAID Drive Status
--// (bDriveStatus)
--#define CSMI_SAS_DRIVE_STATUS_OK          0
--#define CSMI_SAS_DRIVE_STATUS_REBUILDING  1
--#define CSMI_SAS_DRIVE_STATUS_FAILED      2
--#define CSMI_SAS_DRIVE_STATUS_DEGRADED    3
--#define CSMI_SAS_DRIVE_STATUS_OFFLINE     4
--#define CSMI_SAS_DRIVE_STATUS_QUEUED_FOR_REBUILD 5
--
--// RAID Drive Usage
--// (bDriveUsage)
--#define CSMI_SAS_DRIVE_CONFIG_NOT_USED      0
--#define CSMI_SAS_DRIVE_CONFIG_MEMBER        1
--#define CSMI_SAS_DRIVE_CONFIG_SPARE         2
--#define CSMI_SAS_DRIVE_CONFIG_SPARE_ACTIVE  3
--
--// RAID Drive Type
--// (bDriveType)
--#define CSMI_SAS_DRIVE_TYPE_UNKNOWN         0
--#define CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS 1
--#define CSMI_SAS_DRIVE_TYPE_DUAL_PORT_SAS   2
--#define CSMI_SAS_DRIVE_TYPE_SATA            3
--#define CSMI_SAS_DRIVE_TYPE_SATA_PS         4
--#define CSMI_SAS_DRIVE_TYPE_OTHER           255
--
--// RAID Write Protect
--// (bWriteProtect)
--#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN     0
--#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNCHANGED   0
--#define CSMI_SAS_RAID_SET_WRITE_PROTECT_ENABLED     1
--#define CSMI_SAS_RAID_SET_WRITE_PROTECT_DISABLED    2
--
--// RAID Cache Setting
--// (bCacheSetting)
--#define CSMI_SAS_RAID_SET_CACHE_UNKNOWN             0
--#define CSMI_SAS_RAID_SET_CACHE_UNCHANGED           0
--#define CSMI_SAS_RAID_SET_CACHE_ENABLED             1
--#define CSMI_SAS_RAID_SET_CACHE_DISABLED            2
--#define CSMI_SAS_RAID_SET_CACHE_CORRUPT             3
--
--// RAID Features
--// (uFeatures)
--#define CSMI_SAS_RAID_FEATURE_TRANSFORMATION    0x00000001
--#define CSMI_SAS_RAID_FEATURE_REBUILD           0x00000002
--#define CSMI_SAS_RAID_FEATURE_SPLIT_MIRROR      0x00000004
--#define CSMI_SAS_RAID_FEATURE_MERGE_MIRROR      0x00000008
--#define CSMI_SAS_RAID_FEATURE_LUN_RENUMBER      0x00000010
--#define CSMI_SAS_RAID_FEATURE_SURFACE_SCAN      0x00000020
--#define CSMI_SAS_RAID_FEATURE_SPARES_SHARED     0x00000040
--
--// RAID Priority
--// (bDefaultTransformPriority, etc.)
--#define CSMI_SAS_PRIORITY_UNKNOWN   0
--#define CSMI_SAS_PRIORITY_UNCHANGED 0
--#define CSMI_SAS_PRIORITY_AUTO      1
--#define CSMI_SAS_PRIORITY_OFF       2
--#define CSMI_SAS_PRIORITY_LOW       3
--#define CSMI_SAS_PRIORITY_MEDIUM    4
--#define CSMI_SAS_PRIORITY_HIGH      5
--
--// RAID Transformation Rules
--// (uRaidSetTransformationRules)
--#define CSMI_SAS_RAID_RULE_AVAILABLE_MEMORY     0x00000001
--#define CSMI_SAS_RAID_RULE_OVERLAPPED_EXTENTS   0x00000002
--
--// RAID Cache Ratios Supported
--// (bCacheRatiosSupported)
--// from 0 to 100 defines the write to read ratio, 0 is 100% write
--#define CSMI_SAS_RAID_CACHE_RATIO_RANGE     101
--#define CSMI_SAS_RAID_CACHE_RATIO_FIXED     102
--#define CSMI_SAS_RAID_CACHE_RATIO_AUTO      103
--#define CSMI_SAS_RAID_CACHE_RATIO_END       255
--
--// RAID Cache Ratio Flag
--// (bCacheRatioFlag)
--#define CSMI_SAS_RAID_CACHE_RATIO_DISABLE   0
--#define CSMI_SAS_RAID_CACHE_RATIO_ENABLE    1
--
--// RAID Clear Configuration Signature
--// (bClearConfiguration)
--#define CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE "RAIDCLR"
--
--// RAID Failure Codes
--// (uFailureCode)
--#define CSMI_SAS_FAIL_CODE_OK                           0
--#define CSMI_SAS_FAIL_CODE_PARAMETER_INVALID            1000
--#define CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID   1001
--#define CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID     1002
--#define CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID          1003
--#define CSMI_SAS_FAIL_CODE_SURFACE_SCAN_INVALID         1004
--#define CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID  1005
--#define CSMI_SAS_FAIL_CODE_ELEMENT_INDEX_INVALID        1006
--#define CSMI_SAS_FAIL_CODE_SUBELEMENT_INDEX_INVALID     1007
--#define CSMI_SAS_FAIL_CODE_EXTENT_INVALID               1008
--#define CSMI_SAS_FAIL_CODE_BLOCK_COUNT_INVALID          1009
--#define CSMI_SAS_FAIL_CODE_DRIVE_INDEX_INVALID          1010
--#define CSMI_SAS_FAIL_CODE_EXISTING_LUN_INVALID         1011
--#define CSMI_SAS_FAIL_CODE_RAID_TYPE_INVALID            1012
--#define CSMI_SAS_FAIL_CODE_STRIPE_SIZE_INVALID          1013
--#define CSMI_SAS_FAIL_CODE_TRANSFORMATION_INVALID       1014
--#define CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID         1015
--#define CSMI_SAS_FAIL_CODE_ENUMERATION_TYPE_INVALID     1016
--
--#define CSMI_SAS_FAIL_CODE_EXCEEDED_RAID_SET_COUNT      2000
--#define CSMI_SAS_FAIL_CODE_DUPLICATE_LUN                2001
--
--#define CSMI_SAS_FAIL_CODE_WAIT_FOR_OPERATION           3000
--
--// RAID Enumeration Types
--// (uEnumerationType)
--#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE                0
--#define CSMI_SAS_RAID_ELEMENT_TYPE_MODULE               1
--#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE_RAID_SET       2
--#define CSMI_SAS_RAID_ELEMENT_TYPE_EXTENT_DRIVE         3
--
--// RAID Extent Types
--// (bExtentType)
--#define CSMI_SAS_RAID_EXTENT_RESERVED       0
--#define CSMI_SAS_RAID_EXTENT_METADATA       1
--#define CSMI_SAS_RAID_EXTENT_ALLOCATED      2
--#define CSMI_SAS_RAID_EXTENT_UNALLOCATED    3
--
--// RAID Operation Types
--// (uOperationType)
--#define CSMI_SAS_RAID_SET_CREATE            0
--#define CSMI_SAS_RAID_SET_LABEL             1
--#define CSMI_SAS_RAID_SET_TRANSFORM         2
--#define CSMI_SAS_RAID_SET_DELETE            3
--#define CSMI_SAS_RAID_SET_WRITE_PROTECT     4
--#define CSMI_SAS_RAID_SET_CACHE             5
--#define CSMI_SAS_RAID_SET_ONLINE_STATE      6
--#define CSMI_SAS_RAID_SET_SPARE             7
--
--// RAID Transform Types
--// (bTransformType)
--#define CSMI_SAS_RAID_SET_TRANSFORM_SPLIT_MIRROR    0
--#define CSMI_SAS_RAID_SET_TRANSFORM_MERGE_RAID_0    1
--#define CSMI_SAS_RAID_SET_TRANSFORM_LUN_RENUMBER    2
--#define CSMI_SAS_RAID_SET_TRANSFORM_RAID_SET        3
--
--// RAID Online State
--// (bOnlineState)
--#define CSMI_SAS_RAID_SET_STATE_UNKNOWN     0
--#define CSMI_SAS_RAID_SET_STATE_ONLINE      1
--#define CSMI_SAS_RAID_SET_STATE_OFFLINE     2
--
--/* * * * * * * * * * SAS HBA Class IOCTL Constants * * * * * * * * * */
--
--// Return codes for SAS IOCTL's
--// (IoctlHeader.ReturnCode)
--
--#define CSMI_SAS_PHY_INFO_CHANGED            CSMI_SAS_STATUS_SUCCESS
--#define CSMI_SAS_PHY_INFO_NOT_CHANGEABLE     2000
--#define CSMI_SAS_LINK_RATE_OUT_OF_RANGE      2001
--
--#define CSMI_SAS_PHY_DOES_NOT_EXIST          2002
--#define CSMI_SAS_PHY_DOES_NOT_MATCH_PORT     2003
--#define CSMI_SAS_PHY_CANNOT_BE_SELECTED      2004
--#define CSMI_SAS_SELECT_PHY_OR_PORT          2005
--#define CSMI_SAS_PORT_DOES_NOT_EXIST         2006
--#define CSMI_SAS_PORT_CANNOT_BE_SELECTED     2007
--#define CSMI_SAS_CONNECTION_FAILED           2008
--
--#define CSMI_SAS_NO_SATA_DEVICE              2009
--#define CSMI_SAS_NO_SATA_SIGNATURE           2010
--#define CSMI_SAS_SCSI_EMULATION              2011
--#define CSMI_SAS_NOT_AN_END_DEVICE           2012
--#define CSMI_SAS_NO_SCSI_ADDRESS             2013
--#define CSMI_SAS_NO_DEVICE_ADDRESS           2014
--
--// Signature value
--// (IoctlHeader.Signature)
--
--#define CSMI_SAS_SIGNATURE    "CSMISAS"
--
--// Timeout value default of 60 seconds
--// (IoctlHeader.Timeout)
--
--#define CSMI_SAS_TIMEOUT      60
--
--// Device types
--// (bDeviceType)
--
--#define CSMI_SAS_PHY_UNUSED               0x00
--#define CSMI_SAS_NO_DEVICE_ATTACHED       0x00
--#define CSMI_SAS_END_DEVICE               0x10
--#define CSMI_SAS_EDGE_EXPANDER_DEVICE     0x20
--#define CSMI_SAS_FANOUT_EXPANDER_DEVICE   0x30
--
--// Protocol options
--// (bInitiatorPortProtocol, bTargetPortProtocol)
--
--#define CSMI_SAS_PROTOCOL_SATA   0x01
--#define CSMI_SAS_PROTOCOL_SMP    0x02
--#define CSMI_SAS_PROTOCOL_STP    0x04
--#define CSMI_SAS_PROTOCOL_SSP    0x08
--
--// Negotiated and hardware link rates
--// (bNegotiatedLinkRate, bMinimumLinkRate, bMaximumLinkRate)
--
--#define CSMI_SAS_LINK_RATE_UNKNOWN  0x00
--#define CSMI_SAS_PHY_DISABLED       0x01
--#define CSMI_SAS_LINK_RATE_FAILED   0x02
--#define CSMI_SAS_SATA_SPINUP_HOLD   0x03
--#define CSMI_SAS_SATA_PORT_SELECTOR 0x04
--#define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08
--#define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09
--#define CSMI_SAS_LINK_VIRTUAL       0x10
--
--// Discover state
--// (bAutoDiscover)
--
--#define CSMI_SAS_DISCOVER_NOT_SUPPORTED   0x00
--#define CSMI_SAS_DISCOVER_NOT_STARTED     0x01
--#define CSMI_SAS_DISCOVER_IN_PROGRESS     0x02
--#define CSMI_SAS_DISCOVER_COMPLETE        0x03
--#define CSMI_SAS_DISCOVER_ERROR           0x04
--
--// Phy features
--
--#define CSMI_SAS_PHY_VIRTUAL_SMP          0x01
--
--// Programmed link rates
--// (bMinimumLinkRate, bMaximumLinkRate)
--// (bProgrammedMinimumLinkRate, bProgrammedMaximumLinkRate)
--
--#define CSMI_SAS_PROGRAMMED_LINK_RATE_UNCHANGED 0x00
--#define CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS  0x08
--#define CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS  0x09
--
--// Link rate
--// (bNegotiatedLinkRate in CSMI_SAS_SET_PHY_INFO)
--
--#define CSMI_SAS_LINK_RATE_NEGOTIATE      0x00
--#define CSMI_SAS_LINK_RATE_PHY_DISABLED   0x01
--
--// Signal class
--// (bSignalClass in CSMI_SAS_SET_PHY_INFO)
--
--#define CSMI_SAS_SIGNAL_CLASS_UNKNOWN     0x00
--#define CSMI_SAS_SIGNAL_CLASS_DIRECT      0x01
--#define CSMI_SAS_SIGNAL_CLASS_SERVER      0x02
--#define CSMI_SAS_SIGNAL_CLASS_ENCLOSURE   0x03
--
--// Link error reset
--// (bResetCounts)
--
--#define CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS   0x00
--#define CSMI_SAS_LINK_ERROR_RESET_COUNTS        0x01
--
--// Phy identifier
--// (bPhyIdentifier)
--
--#define CSMI_SAS_USE_PORT_IDENTIFIER   0xFF
--
--// Port identifier
--// (bPortIdentifier)
--
--#define CSMI_SAS_IGNORE_PORT           0xFF
--
--// Programmed link rates
--// (bConnectionRate)
--
--#define CSMI_SAS_LINK_RATE_NEGOTIATED  0x00
--#define CSMI_SAS_LINK_RATE_1_5_GBPS    0x08
--#define CSMI_SAS_LINK_RATE_3_0_GBPS    0x09
--
--// Connection status
--// (bConnectionStatus)
--
--#define CSMI_SAS_OPEN_ACCEPT                          0
--#define CSMI_SAS_OPEN_REJECT_BAD_DESTINATION          1
--#define CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED       2
--#define CSMI_SAS_OPEN_REJECT_NO_DESTINATION           3
--#define CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED          4
--#define CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED   5
--#define CSMI_SAS_OPEN_REJECT_RESERVE_ABANDON          6
--#define CSMI_SAS_OPEN_REJECT_RESERVE_CONTINUE         7
--#define CSMI_SAS_OPEN_REJECT_RESERVE_INITIALIZE       8
--#define CSMI_SAS_OPEN_REJECT_RESERVE_STOP             9
--#define CSMI_SAS_OPEN_REJECT_RETRY                    10
--#define CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY       11
--#define CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION        12
--
--// SSP Status
--// (bSSPStatus)
--
--#define CSMI_SAS_SSP_STATUS_UNKNOWN     0x00
--#define CSMI_SAS_SSP_STATUS_WAITING     0x01
--#define CSMI_SAS_SSP_STATUS_COMPLETED   0x02
--#define CSMI_SAS_SSP_STATUS_FATAL_ERROR 0x03
--#define CSMI_SAS_SSP_STATUS_RETRY       0x04
--#define CSMI_SAS_SSP_STATUS_NO_TAG      0x05
--
--// SSP Flags
--// (uFlags)
--
--#define CSMI_SAS_SSP_READ           0x00000001
--#define CSMI_SAS_SSP_WRITE          0x00000002
--#define CSMI_SAS_SSP_UNSPECIFIED    0x00000004
--
--#define CSMI_SAS_SSP_TASK_ATTRIBUTE_SIMPLE         0x00000000
--#define CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE  0x00000010
--#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED        0x00000020
--#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA            0x00000040
--
--// SSP Data present
--// (bDataPresent)
--
--#define CSMI_SAS_SSP_NO_DATA_PRESENT         0x00
--#define CSMI_SAS_SSP_RESPONSE_DATA_PRESENT   0x01
--#define CSMI_SAS_SSP_SENSE_DATA_PRESENT      0x02
--
--// STP Flags
--// (uFlags)
--
--#define CSMI_SAS_STP_READ           0x00000001
--#define CSMI_SAS_STP_WRITE          0x00000002
--#define CSMI_SAS_STP_UNSPECIFIED    0x00000004
--#define CSMI_SAS_STP_PIO            0x00000010
--#define CSMI_SAS_STP_DMA            0x00000020
--#define CSMI_SAS_STP_PACKET         0x00000040
--#define CSMI_SAS_STP_DMA_QUEUED     0x00000080
--#define CSMI_SAS_STP_EXECUTE_DIAG   0x00000100
--#define CSMI_SAS_STP_RESET_DEVICE   0x00000200
--
--// Task Management Flags
--// (uFlags)
--
--#define CSMI_SAS_TASK_IU               0x00000001
--#define CSMI_SAS_HARD_RESET_SEQUENCE   0x00000002
--#define CSMI_SAS_SUPPRESS_RESULT       0x00000004
--
--// Task Management Functions
--// (bTaskManagement)
--
--#define CSMI_SAS_SSP_ABORT_TASK           0x01
--#define CSMI_SAS_SSP_ABORT_TASK_SET       0x02
--#define CSMI_SAS_SSP_CLEAR_TASK_SET       0x04
--#define CSMI_SAS_SSP_LOGICAL_UNIT_RESET   0x08
--#define CSMI_SAS_SSP_CLEAR_ACA            0x40
--#define CSMI_SAS_SSP_QUERY_TASK           0x80
--
--// Task Management Information
--// (uInformation)
--
--#define CSMI_SAS_SSP_TEST           1
--#define CSMI_SAS_SSP_EXCEEDED       2
--#define CSMI_SAS_SSP_DEMAND         3
--#define CSMI_SAS_SSP_TRIGGER        4
--
--// Connector Pinout Information
--// (uPinout)
--
--#define CSMI_SAS_CON_UNKNOWN              0x00000001
--#define CSMI_SAS_CON_SFF_8482             0x00000002
--#define CSMI_SAS_CON_SFF_8470_LANE_1      0x00000100
--#define CSMI_SAS_CON_SFF_8470_LANE_2      0x00000200
--#define CSMI_SAS_CON_SFF_8470_LANE_3      0x00000400
--#define CSMI_SAS_CON_SFF_8470_LANE_4      0x00000800
--#define CSMI_SAS_CON_SFF_8484_LANE_1      0x00010000
--#define CSMI_SAS_CON_SFF_8484_LANE_2      0x00020000
--#define CSMI_SAS_CON_SFF_8484_LANE_3      0x00040000
--#define CSMI_SAS_CON_SFF_8484_LANE_4      0x00080000
--
--// Connector Location Information
--// (bLocation)
--
--// same as uPinout above...
--// #define CSMI_SAS_CON_UNKNOWN              0x01
--#define CSMI_SAS_CON_INTERNAL             0x02
--#define CSMI_SAS_CON_EXTERNAL             0x04
--#define CSMI_SAS_CON_SWITCHABLE           0x08
--#define CSMI_SAS_CON_AUTO                 0x10
--#define CSMI_SAS_CON_NOT_PRESENT          0x20
--#define CSMI_SAS_CON_NOT_CONNECTED        0x80
--
--// Device location identification
--// (bIdentify)
--
--#define CSMI_SAS_LOCATE_UNKNOWN           0x00
--#define CSMI_SAS_LOCATE_FORCE_OFF         0x01
--#define CSMI_SAS_LOCATE_FORCE_ON          0x02
--
--// Location Valid flags
--// (uLocationFlags)
--
--#define CSMI_SAS_LOCATE_SAS_ADDRESS_VALID           0x00000001
--#define CSMI_SAS_LOCATE_SAS_LUN_VALID               0x00000002
--#define CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID  0x00000004
--#define CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID        0x00000008
--#define CSMI_SAS_LOCATE_BAY_PREFIX_VALID            0x00000010
--#define CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID        0x00000020
--#define CSMI_SAS_LOCATE_LOCATION_STATE_VALID        0x00000040
--
--/* * * * * * * * SAS Phy Control Class IOCTL Constants * * * * * * * * */
--
--// Return codes for SAS Phy Control IOCTL's
--// (IoctlHeader.ReturnCode)
--
--// Signature value
--// (IoctlHeader.Signature)
--
--#define CSMI_PHY_SIGNATURE    "CSMIPHY"
--
--// Phy Control Functions
--// (bFunction)
--
--// values 0x00 to 0xFF are consistent in definition with the SMP PHY CONTROL
--// function defined in the SAS spec
--#define CSMI_SAS_PC_NOP                   0x00000000
--#define CSMI_SAS_PC_LINK_RESET            0x00000001
--#define CSMI_SAS_PC_HARD_RESET            0x00000002
--#define CSMI_SAS_PC_PHY_DISABLE           0x00000003
--// 0x04 to 0xFF reserved...
--#define CSMI_SAS_PC_GET_PHY_SETTINGS      0x00000100
--
--// Link Flags
--#define CSMI_SAS_PHY_ACTIVATE_CONTROL     0x00000001
--#define CSMI_SAS_PHY_UPDATE_SPINUP_RATE   0x00000002
--#define CSMI_SAS_PHY_AUTO_COMWAKE         0x00000004
--
--// Device Types for Phy Settings
--// (bType)
--#define CSMI_SAS_UNDEFINED 0x00
--#define CSMI_SAS_SATA      0x01
--#define CSMI_SAS_SAS       0x02
--
--// Transmitter Flags
--// (uTransmitterFlags)
--#define CSMI_SAS_PHY_PREEMPHASIS_DISABLED    0x00000001
--
--// Receiver Flags
--// (uReceiverFlags)
--#define CSMI_SAS_PHY_EQUALIZATION_DISABLED   0x00000001
--
--// Pattern Flags
--// (uPatternFlags)
--// #define CSMI_SAS_PHY_ACTIVATE_CONTROL     0x00000001
--#define CSMI_SAS_PHY_DISABLE_SCRAMBLING      0x00000002
--#define CSMI_SAS_PHY_DISABLE_ALIGN           0x00000004
--#define CSMI_SAS_PHY_DISABLE_SSC             0x00000008
--
--#define CSMI_SAS_PHY_FIXED_PATTERN           0x00000010
--#define CSMI_SAS_PHY_USER_PATTERN            0x00000020
--
--// Fixed Patterns
--// (bFixedPattern)
--#define CSMI_SAS_PHY_CJPAT                   0x00000001
--#define CSMI_SAS_PHY_ALIGN                   0x00000002
--
--// Type Flags
--// (bTypeFlags)
--#define CSMI_SAS_PHY_POSITIVE_DISPARITY      0x01
--#define CSMI_SAS_PHY_NEGATIVE_DISPARITY      0x02
--#define CSMI_SAS_PHY_CONTROL_CHARACTER       0x04
--
--// Miscellaneous
--#define SLOT_NUMBER_UNKNOWN   0xFFFF
--
--/*************************************************************************/
--/* DATA STRUCTURES                                                       */
--/*************************************************************************/
--
--/* * * * * * * * * * Class Independent Structures * * * * * * * * * */
--
--// EDM #pragma CSMI_SAS_BEGIN_PACK(8)
--#pragma pack(8)
--
--// CC_CSMI_SAS_DRIVER_INFO
--
--typedef struct _CSMI_SAS_DRIVER_INFO {
--   __u8  szName[81];
--   __u8  szDescription[81];
--   __u16 usMajorRevision;
--   __u16 usMinorRevision;
--   __u16 usBuildRevision;
--   __u16 usReleaseRevision;
--   __u16 usCSMIMajorRevision;
--   __u16 usCSMIMinorRevision;
--} CSMI_SAS_DRIVER_INFO,
--  *PCSMI_SAS_DRIVER_INFO;
--
--typedef struct _CSMI_SAS_DRIVER_INFO_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_DRIVER_INFO Information;
--} CSMI_SAS_DRIVER_INFO_BUFFER,
--  *PCSMI_SAS_DRIVER_INFO_BUFFER;
--
--// CC_CSMI_SAS_CNTLR_CONFIGURATION
--
--typedef struct _CSMI_SAS_PCI_BUS_ADDRESS {
--   __u8  bBusNumber;
--   __u8  bDeviceNumber;
--   __u8  bFunctionNumber;
--   __u8  bReserved;
--} CSMI_SAS_PCI_BUS_ADDRESS,
--  *PCSMI_SAS_PCI_BUS_ADDRESS;
--
--typedef union _CSMI_SAS_IO_BUS_ADDRESS {
--   CSMI_SAS_PCI_BUS_ADDRESS PciAddress;
--   __u8  bReserved[32];
--} CSMI_SAS_IO_BUS_ADDRESS,
--  *PCSMI_SAS_IO_BUS_ADDRESS;
--
--typedef struct _CSMI_SAS_CNTLR_CONFIG {
--   __u32 uBaseIoAddress;
--   struct {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } BaseMemoryAddress;
--   __u32 uBoardID;
--   __u16 usSlotNumber;
--   __u8  bControllerClass;
--   __u8  bIoBusType;
--   CSMI_SAS_IO_BUS_ADDRESS BusAddress;
--   __u8  szSerialNumber[81];
--   __u16 usMajorRevision;
--   __u16 usMinorRevision;
--   __u16 usBuildRevision;
--   __u16 usReleaseRevision;
--   __u16 usBIOSMajorRevision;
--   __u16 usBIOSMinorRevision;
--   __u16 usBIOSBuildRevision;
--   __u16 usBIOSReleaseRevision;
--   __u32 uControllerFlags;
--   __u16 usRromMajorRevision;
--   __u16 usRromMinorRevision;
--   __u16 usRromBuildRevision;
--   __u16 usRromReleaseRevision;
--   __u16 usRromBIOSMajorRevision;
--   __u16 usRromBIOSMinorRevision;
--   __u16 usRromBIOSBuildRevision;
--   __u16 usRromBIOSReleaseRevision;
--   __u8  bReserved[7];
--} CSMI_SAS_CNTLR_CONFIG,
--  *PCSMI_SAS_CNTLR_CONFIG;
--
--typedef struct _CSMI_SAS_CNTLR_CONFIG_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_CNTLR_CONFIG Configuration;
--} CSMI_SAS_CNTLR_CONFIG_BUFFER,
--  *PCSMI_SAS_CNTLR_CONFIG_BUFFER;
--
--// CC_CSMI_SAS_CNTLR_STATUS
--
--typedef struct _CSMI_SAS_CNTLR_STATUS {
--   __u32 uStatus;
--   __u32 uOfflineReason;
--   __u8  bReserved[28];
--} CSMI_SAS_CNTLR_STATUS,
--  *PCSMI_SAS_CNTLR_STATUS;
--
--typedef struct _CSMI_SAS_CNTLR_STATUS_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_CNTLR_STATUS Status;
--} CSMI_SAS_CNTLR_STATUS_BUFFER,
--  *PCSMI_SAS_CNTLR_STATUS_BUFFER;
--
--// CC_CSMI_SAS_FIRMWARE_DOWNLOAD
--
--typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD {
--   __u32 uBufferLength;
--   __u32 uDownloadFlags;
--   __u8  bReserved[32];
--   __u16 usStatus;
--   __u16 usSeverity;
--} CSMI_SAS_FIRMWARE_DOWNLOAD,
--  *PCSMI_SAS_FIRMWARE_DOWNLOAD;
--
--typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_FIRMWARE_DOWNLOAD Information;
--   __u8  bDataBuffer[1];
--} CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER,
--  *PCSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER;
--
--// CC_CSMI_SAS_RAID_INFO
--
--typedef struct _CSMI_SAS_RAID_INFO {
--   __u32 uNumRaidSets;
--   __u32 uMaxDrivesPerSet;
--   __u32 uMaxRaidSets;
--   __u8  bMaxRaidTypes;
--   __u8  bReservedByteFields[7];
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulMinRaidSetBlocks;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulMaxRaidSetBlocks;
--   __u32 uMaxPhysicalDrives;
--   __u32 uMaxExtents;
--   __u32 uMaxModules;
--   __u32 uMaxTransformationMemory;
--   __u32 uChangeCount;
--   __u8  bReserved[44];
--} CSMI_SAS_RAID_INFO,
--  *PCSMI_SAS_RAID_INFO;
--
--typedef struct _CSMI_SAS_RAID_INFO_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_RAID_INFO Information;
--} CSMI_SAS_RAID_INFO_BUFFER,
--  *PCSMI_SAS_RAID_INFO_BUFFER;
--
--// CC_CSMI_SAS_GET_RAID_CONFIG
--
--typedef struct _CSMI_SAS_RAID_DRIVES {
--   __u8  bModel[40];
--   __u8  bFirmware[8];
--   __u8  bSerialNumber[40];
--   __u8  bSASAddress[8];
--   __u8  bSASLun[8];
--   __u8  bDriveStatus;
--   __u8  bDriveUsage;
--   __u16 usBlockSize;
--   __u8  bDriveType;
--   __u8  bReserved[15];
--   __u32 uDriveIndex;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulTotalUserBlocks;
--} CSMI_SAS_RAID_DRIVES,
--  *PCSMI_SAS_RAID_DRIVES;
--
--typedef struct _CSMI_SAS_RAID_DEVICE_ID {
--   __u8  bDeviceIdentificationVPDPage[1];
--} CSMI_SAS_RAID_DEVICE_ID,
--  *PCSMI_SAS_RAID_DEVICE_ID;
--
--typedef struct _CSMI_SAS_RAID_SET_ADDITIONAL_DATA {
--   __u8  bLabel[16];
--   __u8  bRaidSetLun[8];
--   __u8  bWriteProtection;
--   __u8  bCacheSetting;
--   __u8  bCacheRatio;
--   __u16 usBlockSize;
--   __u8  bReservedBytes[11];
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulRaidSetExtentOffset;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulRaidSetBlocks;
--   __u32 uStripeSizeInBlocks;
--   __u32 uSectorsPerTrack;
--   __u8  bApplicationScratchPad[16];
--   __u32 uNumberOfHeads;
--   __u32 uNumberOfTracks;
--   __u8  bReserved[24];
--} CSMI_SAS_RAID_SET_ADDITIONAL_DATA,
--  *PCSMI_SAS_RAID_SET_ADDITIONAL_DATA;
--
--typedef struct _CSMI_SAS_RAID_CONFIG {
--   __u32 uRaidSetIndex;
--   __u32 uCapacity;
--   __u32 uStripeSize;
--   __u8  bRaidType;
--   __u8  bStatus;
--   __u8  bInformation;
--   __u8  bDriveCount;
--   __u8  bDataType;
--   __u8  bReserved[11];
--   __u32 uFailureCode;
--   __u32 uChangeCount;
--   union {
--      CSMI_SAS_RAID_DRIVES Drives[1];
--      CSMI_SAS_RAID_DEVICE_ID DeviceId[1];
--      CSMI_SAS_RAID_SET_ADDITIONAL_DATA Data[1];
--   };
--} CSMI_SAS_RAID_CONFIG,
--   *PCSMI_SAS_RAID_CONFIG;
--
--typedef struct _CSMI_SAS_RAID_CONFIG_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_RAID_CONFIG Configuration;
--} CSMI_SAS_RAID_CONFIG_BUFFER,
--  *PCSMI_SAS_RAID_CONFIG_BUFFER;
--
--// CC_CSMI_SAS_GET_RAID_FEATURES
--
--typedef struct _CSMI_SAS_RAID_TYPE_DESCRIPTION {
--  __u8  bRaidType;
--  __u8  bReservedBytes[7];
--  __u32 uSupportedStripeSizeMap;
--  __u8  bReserved[24];
--} CSMI_SAS_RAID_TYPE_DESCRIPTION,
--  *PCSMI_SAS_RAID_TYPE_DESCRIPTION;
--
--typedef struct _CSMI_SAS_RAID_FEATURES {
--   __u32 uFeatures;
--   __u8  bReservedFeatures[32];
--   __u8  bDefaultTransformPriority;
--   __u8  bTransformPriority;
--   __u8  bDefaultRebuildPriority;
--   __u8  bRebuildPriority;
--   __u8  bDefaultSurfaceScanPriority;
--   __u8  bSurfaceScanPriority;
--   __u16 usReserved;
--   __u32 uRaidSetTransformationRules;
--   __u32 uReserved[11];
--   CSMI_SAS_RAID_TYPE_DESCRIPTION RaidType[24];
--   __u8  bCacheRatiosSupported[104];
--   __u32 uChangeCount;
--   __u32 uFailureCode;
--   __u8  bReserved[120];
--} CSMI_SAS_RAID_FEATURES,
--  *PCSMI_SAS_RAID_FEATURES;
--
--typedef struct _CSMI_SAS_RAID_FEATURES_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_RAID_FEATURES Information;
--} CSMI_SAS_RAID_FEATURES_BUFFER,
--  *PCSMI_SAS_RAID_FEATURES_BUFFER;
--
--// CC_CSMI_SAS_SET_RAID_CONTROL
--
--typedef struct _CSMI_SAS_RAID_CONTROL {
--   __u8  bTransformPriority;
--   __u8  bRebuildPriority;
--   __u8  bCacheRatioFlag;
--   __u8  bCacheRatio;
--   __u8  bSurfaceScanPriority;
--   __u8  bReservedBytes[15];
--   __u8  bClearConfiguration[8];
--   __u32 uChangeCount;
--   __u8  bReserved[88];
--   __u32 uFailureCode;
--   __u8  bFailureDescription[80];
--} CSMI_SAS_RAID_CONTROL,
--  *PCSMI_SAS_RAID_CONTROL;
--
--typedef struct _CSMI_SAS_RAID_CONTROL_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_RAID_CONTROL Information;
--} CSMI_SAS_RAID_CONTROL_BUFFER,
--  *PCSMI_SAS_RAID_CONTROL_BUFFER;
--
--// CC_CSMI_SAS_GET_RAID_ELEMENT
--
--typedef struct _CSMI_SAS_DRIVE_EXTENT_INFO {
--   __u32 uDriveIndex;
--   __u8  bExtentType;
--   __u8  bReservedBytes[7];
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulExtentOffset;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulExtentBlocks;
--   __u32 uRaidSetIndex;
--   __u8  bReserved[96];
--} CSMI_SAS_DRIVE_EXTENT_INFO,
--  *PCSMI_SAS_DRIVE_EXTENT_INFO;
--
--typedef struct _CSMI_SAS_RAID_MODULE_INFO {
--   __u8  bReserved[128];
--} CSMI_SAS_RAID_MODULE_INFO,
--  *PCSMI_SAS_RAID_MODULE_INFO;
--
--typedef struct _CSMI_SAS_DRIVE_LOCATION {
--   __u8  bConnector[16];
--   __u8  bBoxName[16];
--   __u32 uBay;
--   __u8  bReservedBytes[4];
--   __u8  bAttachedSASAddress[8];
--   __u8  bAttachedPhyIdentifier;
--   __u8  bReserved[79];
--} CSMI_SAS_DRIVE_LOCATION,
--  *PCSMI_SAS_DRIVE_LOCATION;
--
--typedef struct _CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA {
--   __u8  bNegotiatedLinkRate[2];
--   __u8  bReserved[126];
--} CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA,
--  *PCSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA;
--
--typedef struct _CSMI_SAS_DRIVE_INFO {
--   CSMI_SAS_RAID_DRIVES Device;
--   CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA Data;
--   CSMI_SAS_DRIVE_LOCATION Location;
--   __u8  bReserved[16];
--} CSMI_SAS_DRIVE_INFO,
--  *PCSMI_SAS_DRIVE_INFO;
--
--typedef struct _CSMI_SAS_RAID_ELEMENT {
--   __u32 uEnumerationType;
--   __u32 uElementIndex;
--   __u32 uNumElements;
--   __u32 uChangeCount;
--   __u32 uSubElementIndex;
--   __u8  bReserved[32];
--   __u32 uFailureCode;
--   __u8  bFailureDescription[80];
--   union {
--       CSMI_SAS_DRIVE_INFO Drive;
--       CSMI_SAS_RAID_MODULE_INFO Module;
--       CSMI_SAS_DRIVE_EXTENT_INFO Extent;
--   } Element;
--} CSMI_SAS_RAID_ELEMENT,
--  *PCSMI_SAS_RAID_ELEMENT;
--
--typedef struct _CSMI_SAS_RAID_ELEMENT_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_RAID_ELEMENT Information;
--} CSMI_SAS_RAID_ELEMENT_BUFFER,
--  *PCSMI_SAS_RAID_ELEMENT_BUFFER;
--
--// CC_CSMI_SAS_SET_RAID_OPERATION
--
--typedef struct _CSMI_SAS_RAID_SET_LIST {
--   __u32 uRaidSetIndex;
--   __u8  bExistingLun[8];
--   __u8  bNewLun[8];
--   __u8  bReserved[12];
--} CSMI_SAS_RAID_SET_LIST,
--  *PCSMI_SAS_RAID_SET_LIST;
--
--typedef struct _CSMI_SAS_RAID_SET_DRIVE_LIST {
--   __u32 uDriveIndex;
--   __u8  bDriveUsage;
--   __u8  bReserved[27];
--} CSMI_SAS_RAID_SET_DRIVE_LIST,
--  *PCSMI_SAS_RAID_SET_DRIVE_LIST;
--
--typedef struct _CSMI_SAS_RAID_SET_SPARE_INFO {
--   __u32 uRaidSetIndex;
--   __u32 uDriveCount;
--   __u8  bApplicationScratchPad[16];
--   __u8  bReserved[104];
--} CSMI_SAS_RAID_SET_SPARE_INFO,
--  *PCSMI_SAS_RAID_SET_SPARE_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_ONLINE_STATE_INFO {
--   __u32 uRaidSetIndex;
--   __u8  bOnlineState;
--   __u8  bReserved[123];
--} CSMI_SAS_RAID_SET_ONLINE_STATE_INFO,
--  *PCSMI_SAS_RAID_SET_ONLINE_STATE_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_CACHE_INFO {
--   __u32 uRaidSetIndex;
--   __u8  bCacheSetting;
--   __u8  bCacheRatioFlag;
--   __u8  bCacheRatio;
--   __u8  bReserved[121];
--} CSMI_SAS_RAID_SET_CACHE_INFO,
--  *PCSMI_SAS_RAID_SET_CACHE_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO {
--   __u32 uRaidSetIndex;
--   __u8  bWriteProtectSetting;
--   __u8  bReserved[123];
--} CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO,
--  *PCSMI_SAS_RAID_SET_WRITE_PROTECT_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_DELETE_INFO {
--   __u32 uRaidSetIndex;
--   __u8  bReserved[124];
--} CSMI_SAS_RAID_SET_DELETE_INFO,
--  *PCSMI_SAS_RAID_SET_DELETE_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_MODIFY_INFO {
--   __u8  bRaidType;
--   __u8  bReservedBytes[7];
--   __u32 uStripeSize;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulRaidSetBlocks;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulRaidSetExtentOffset;
--   __u32 uDriveCount;
--   __u8  bReserved[96];
--} CSMI_SAS_RAID_SET_MODIFY_INFO,
--  *PCSMI_SAS_RAID_SET_MODIFY_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_TRANSFORM_INFO {
--   __u8  bTransformType;
--   __u8  bReservedBytes[3];
--   __u32 uRaidSetIndex;
--   __u8  bRaidType;
--   __u8  bReservedBytes2[11];
--   __u32 uAdditionalRaidSetIndex;
--   __u32 uRaidSetCount;
--   __u8  bApplicationScratchPad[16];
--   CSMI_SAS_RAID_SET_MODIFY_INFO Modify;
--   __u8  bReserved[80];
--} CSMI_SAS_RAID_SET_TRANSFORM_INFO,
--  *PCSMI_SAS_RAID_SET_TRANSFORM_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_LABEL_INFO {
--   __u32 uRaidSetIndex;
--   __u8  bLabel[16];
--   __u8  bReserved[108];
--} CSMI_SAS_RAID_SET_LABEL_INFO,
--  *PCSMI_SAS_RAID_SET_LABEL_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_CREATE_INFO {
--   __u8  bRaidType;
--   __u8  bReservedBytes[7];
--   __u32 uStripeSize;
--   __u32 uTrackSectorCount;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulRaidSetBlocks;
--   struct
--   {
--      __u32 uLowPart;
--      __u32 uHighPart;
--   } ulRaidSetExtentOffset;
--   __u32 uDriveCount;
--   __u8  bLabel[16];
--   __u32 uRaidSetIndex;
--   __u8  bApplicationScratchPad[16];
--   __u32 uNumberOfHeads;
--   __u32 uNumberOfTracks;
--   __u8  bReserved[48];
--} CSMI_SAS_RAID_SET_CREATE_INFO,
--  *PCSMI_SAS_RAID_SET_CREATE_INFO;
--
--typedef struct _CSMI_SAS_RAID_SET_OPERATION {
--   __u32 uOperationType;
--   __u32 uChangeCount;
--   __u32 uFailureCode;
--   __u8  bFailureDescription[80];
--   __u8  bReserved[28];
--   union {
--       CSMI_SAS_RAID_SET_CREATE_INFO Create;
--       CSMI_SAS_RAID_SET_LABEL_INFO Label;
--       CSMI_SAS_RAID_SET_TRANSFORM_INFO Transform;
--       CSMI_SAS_RAID_SET_DELETE_INFO Delete;
--       CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO Protect;
--       CSMI_SAS_RAID_SET_CACHE_INFO Cache;
--       CSMI_SAS_RAID_SET_ONLINE_STATE_INFO State;
--       CSMI_SAS_RAID_SET_SPARE_INFO Spare;
--   } Operation;
--   union {
--       CSMI_SAS_RAID_SET_DRIVE_LIST DriveList[1];
--       CSMI_SAS_RAID_SET_LIST RaidSetList[1];
--   } Parameters;
--} CSMI_SAS_RAID_SET_OPERATION,
--  *PCSMI_SAS_RAID_SET_OPERATION;
--
--typedef struct _CSMI_SAS_RAID_SET_OPERATION_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_RAID_SET_OPERATION Information;
--} CSMI_SAS_RAID_SET_OPERATION_BUFFER,
--  *PCSMI_SAS_RAID_SET_OPERATION_BUFFER;
--
--/* * * * * * * * * * SAS HBA Class Structures * * * * * * * * * */
--
--// CC_CSMI_SAS_GET_PHY_INFO
--
--typedef struct _CSMI_SAS_IDENTIFY {
--   __u8  bDeviceType;
--   __u8  bRestricted;
--   __u8  bInitiatorPortProtocol;
--   __u8  bTargetPortProtocol;
--   __u8  bRestricted2[8];
--   __u8  bSASAddress[8];
--   __u8  bPhyIdentifier;
--   __u8  bSignalClass;
--   __u8  bReserved[6];
--} CSMI_SAS_IDENTIFY,
--  *PCSMI_SAS_IDENTIFY;
--
--typedef struct _CSMI_SAS_PHY_ENTITY {
--   CSMI_SAS_IDENTIFY Identify;
--   __u8  bPortIdentifier;
--   __u8  bNegotiatedLinkRate;
--   __u8  bMinimumLinkRate;
--   __u8  bMaximumLinkRate;
--   __u8  bPhyChangeCount;
--   __u8  bAutoDiscover;
--   __u8  bPhyFeatures;
--   __u8  bReserved;
--   CSMI_SAS_IDENTIFY Attached;
--} CSMI_SAS_PHY_ENTITY,
--  *PCSMI_SAS_PHY_ENTITY;
--
--typedef struct _CSMI_SAS_PHY_INFO {
--   __u8  bNumberOfPhys;
--   __u8  bReserved[3];
--   CSMI_SAS_PHY_ENTITY Phy[32];
--} CSMI_SAS_PHY_INFO,
--  *PCSMI_SAS_PHY_INFO;
--
--typedef struct _CSMI_SAS_PHY_INFO_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_PHY_INFO Information;
--} CSMI_SAS_PHY_INFO_BUFFER,
--  *PCSMI_SAS_PHY_INFO_BUFFER;
--
--// CC_CSMI_SAS_SET_PHY_INFO
--
--typedef struct _CSMI_SAS_SET_PHY_INFO {
--   __u8  bPhyIdentifier;
--   __u8  bNegotiatedLinkRate;
--   __u8  bProgrammedMinimumLinkRate;
--   __u8  bProgrammedMaximumLinkRate;
--   __u8  bSignalClass;
--   __u8  bReserved[3];
--} CSMI_SAS_SET_PHY_INFO,
--  *PCSMI_SAS_SET_PHY_INFO;
--
--typedef struct _CSMI_SAS_SET_PHY_INFO_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_SET_PHY_INFO Information;
--} CSMI_SAS_SET_PHY_INFO_BUFFER,
--  *PCSMI_SAS_SET_PHY_INFO_BUFFER;
--
--// CC_CSMI_SAS_GET_LINK_ERRORS
--
--typedef struct _CSMI_SAS_LINK_ERRORS {
--   __u8  bPhyIdentifier;
--   __u8  bResetCounts;
--   __u8  bReserved[2];
--   __u32 uInvalidDwordCount;
--   __u32 uRunningDisparityErrorCount;
--   __u32 uLossOfDwordSyncCount;
--   __u32 uPhyResetProblemCount;
--} CSMI_SAS_LINK_ERRORS,
--  *PCSMI_SAS_LINK_ERRORS;
--
--typedef struct _CSMI_SAS_LINK_ERRORS_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_LINK_ERRORS Information;
--} CSMI_SAS_LINK_ERRORS_BUFFER,
--  *PCSMI_SAS_LINK_ERRORS_BUFFER;
--
--// CC_CSMI_SAS_SMP_PASSTHRU
--
--typedef struct _CSMI_SAS_SMP_REQUEST {
--   __u8  bFrameType;
--   __u8  bFunction;
--   __u8  bReserved[2];
--   __u8  bAdditionalRequestBytes[1016];
--} CSMI_SAS_SMP_REQUEST,
--  *PCSMI_SAS_SMP_REQUEST;
--
--typedef struct _CSMI_SAS_SMP_RESPONSE {
--   __u8  bFrameType;
--   __u8  bFunction;
--   __u8  bFunctionResult;
--   __u8  bReserved;
--   __u8  bAdditionalResponseBytes[1016];
--} CSMI_SAS_SMP_RESPONSE,
--  *PCSMI_SAS_SMP_RESPONSE;
--
--typedef struct _CSMI_SAS_SMP_PASSTHRU {
--   __u8  bPhyIdentifier;
--   __u8  bPortIdentifier;
--   __u8  bConnectionRate;
--   __u8  bReserved;
--   __u8  bDestinationSASAddress[8];
--   __u32 uRequestLength;
--   CSMI_SAS_SMP_REQUEST Request;
--   __u8  bConnectionStatus;
--   __u8  bReserved2[3];
--   __u32 uResponseBytes;
--   CSMI_SAS_SMP_RESPONSE Response;
--} CSMI_SAS_SMP_PASSTHRU,
--  *PCSMI_SAS_SMP_PASSTHRU;
--
--typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_SMP_PASSTHRU Parameters;
--} CSMI_SAS_SMP_PASSTHRU_BUFFER,
--  *PCSMI_SAS_SMP_PASSTHRU_BUFFER;
--
--// CC_CSMI_SAS_SSP_PASSTHRU
--
--typedef struct _CSMI_SAS_SSP_PASSTHRU {
--   __u8  bPhyIdentifier;
--   __u8  bPortIdentifier;
--   __u8  bConnectionRate;
--   __u8  bReserved;
--   __u8  bDestinationSASAddress[8];
--   __u8  bLun[8];
--   __u8  bCDBLength;
--   __u8  bAdditionalCDBLength;
--   __u8  bReserved2[2];
--   __u8  bCDB[16];
--   __u32 uFlags;
--   __u8  bAdditionalCDB[24];
--   __u32 uDataLength;
--} CSMI_SAS_SSP_PASSTHRU,
--  *PCSMI_SAS_SSP_PASSTHRU;
--
--typedef struct _CSMI_SAS_SSP_PASSTHRU_STATUS {
--   __u8  bConnectionStatus;
--   __u8  bSSPStatus;
--   __u8  bReserved[2];
--   __u8  bDataPresent;
--   __u8  bStatus;
--   __u8  bResponseLength[2];
--   __u8  bResponse[256];
--   __u32 uDataBytes;
--} CSMI_SAS_SSP_PASSTHRU_STATUS,
--  *PCSMI_SAS_SSP_PASSTHRU_STATUS;
--
--typedef struct _CSMI_SAS_SSP_PASSTHRU_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_SSP_PASSTHRU Parameters;
--   CSMI_SAS_SSP_PASSTHRU_STATUS Status;
--   __u8  bDataBuffer[1];
--} CSMI_SAS_SSP_PASSTHRU_BUFFER,
--  *PCSMI_SAS_SSP_PASSTHRU_BUFFER;
--
--// CC_CSMI_SAS_STP_PASSTHRU
--
--typedef struct _CSMI_SAS_STP_PASSTHRU {
--   __u8  bPhyIdentifier;
--   __u8  bPortIdentifier;
--   __u8  bConnectionRate;
--   __u8  bReserved;
--   __u8  bDestinationSASAddress[8];
--   __u8  bReserved2[4];
--   __u8  bCommandFIS[20];
--   __u32 uFlags;
--   __u32 uDataLength;
--} CSMI_SAS_STP_PASSTHRU,
--  *PCSMI_SAS_STP_PASSTHRU;
--
--typedef struct _CSMI_SAS_STP_PASSTHRU_STATUS {
--   __u8  bConnectionStatus;
--   __u8  bReserved[3];
--   __u8  bStatusFIS[20];
--   __u32 uSCR[16];
--   __u32 uDataBytes;
--} CSMI_SAS_STP_PASSTHRU_STATUS,
--  *PCSMI_SAS_STP_PASSTHRU_STATUS;
--
--typedef struct _CSMI_SAS_STP_PASSTHRU_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_STP_PASSTHRU Parameters;
--   CSMI_SAS_STP_PASSTHRU_STATUS Status;
--   __u8  bDataBuffer[1];
--} CSMI_SAS_STP_PASSTHRU_BUFFER,
--  *PCSMI_SAS_STP_PASSTHRU_BUFFER;
--
--// CC_CSMI_SAS_GET_SATA_SIGNATURE
--
--typedef struct _CSMI_SAS_SATA_SIGNATURE {
--   __u8  bPhyIdentifier;
--   __u8  bReserved[3];
--   __u8  bSignatureFIS[20];
--} CSMI_SAS_SATA_SIGNATURE,
--  *PCSMI_SAS_SATA_SIGNATURE;
--
--typedef struct _CSMI_SAS_SATA_SIGNATURE_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_SATA_SIGNATURE Signature;
--} CSMI_SAS_SATA_SIGNATURE_BUFFER,
--  *PCSMI_SAS_SATA_SIGNATURE_BUFFER;
--
--// CC_CSMI_SAS_GET_SCSI_ADDRESS
--
--typedef struct _CSMI_SAS_GET_SCSI_ADDRESS_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   __u8  bSASAddress[8];
--   __u8  bSASLun[8];
--   __u8  bHostIndex;
--   __u8  bPathId;
--   __u8  bTargetId;
--   __u8  bLun;
--} CSMI_SAS_GET_SCSI_ADDRESS_BUFFER,
--   *PCSMI_SAS_GET_SCSI_ADDRESS_BUFFER;
--
--// CC_CSMI_SAS_GET_DEVICE_ADDRESS
--
--typedef struct _CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   __u8  bHostIndex;
--   __u8  bPathId;
--   __u8  bTargetId;
--   __u8  bLun;
--   __u8  bSASAddress[8];
--   __u8  bSASLun[8];
--} CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER,
--  *PCSMI_SAS_GET_DEVICE_ADDRESS_BUFFER;
--
--// CC_CSMI_SAS_TASK_MANAGEMENT
--
--typedef struct _CSMI_SAS_SSP_TASK_IU {
--   __u8  bHostIndex;
--   __u8  bPathId;
--   __u8  bTargetId;
--   __u8  bLun;
--   __u32 uFlags;
--   __u32 uQueueTag;
--   __u32 uReserved;
--   __u8  bTaskManagementFunction;
--   __u8  bReserved[7];
--   __u32 uInformation;
--} CSMI_SAS_SSP_TASK_IU,
--  *PCSMI_SAS_SSP_TASK_IU;
--
--typedef struct _CSMI_SAS_SSP_TASK_IU_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_SSP_TASK_IU Parameters;
--   CSMI_SAS_SSP_PASSTHRU_STATUS Status;
--} CSMI_SAS_SSP_TASK_IU_BUFFER,
--  *PCSMI_SAS_SSP_TASK_IU_BUFFER;
--
--// CC_CSMI_SAS_GET_CONNECTOR_INFO
--
--typedef struct _CSMI_SAS_GET_CONNECTOR_INFO {
--   __u32 uPinout;
--   __u8  bConnector[16];
--   __u8  bLocation;
--   __u8  bReserved[15];
--} CSMI_SAS_CONNECTOR_INFO,
--  *PCSMI_SAS_CONNECTOR_INFO;
--
--typedef struct _CSMI_SAS_CONNECTOR_INFO_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   CSMI_SAS_CONNECTOR_INFO Reference[32];
--} CSMI_SAS_CONNECTOR_INFO_BUFFER,
--  *PCSMI_SAS_CONNECTOR_INFO_BUFFER;
--
--// CC_CSMI_SAS_GET_LOCATION
--
--typedef struct _CSMI_SAS_LOCATION_IDENTIFIER {
--   __u32 bLocationFlags;
--   __u8  bSASAddress[8];
--   __u8  bSASLun[8];
--   __u8  bEnclosureIdentifier[8];
--   __u8  bEnclosureName[32];
--   __u8  bBayPrefix[32];
--   __u8  bBayIdentifier;
--   __u8  bLocationState;
--   __u8  bReserved[2];
--} CSMI_SAS_LOCATION_IDENTIFIER,
--  *PCSMI_SAS_LOCATION_IDENTIFIER;
--
--typedef struct _CSMI_SAS_GET_LOCATION_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   __u8  bHostIndex;
--   __u8  bPathId;
--   __u8  bTargetId;
--   __u8  bLun;
--   __u8  bIdentify;
--   __u8  bNumberOfLocationIdentifiers;
--   __u8  bLengthOfLocationIdentifier;
--   CSMI_SAS_LOCATION_IDENTIFIER Location[1];
--} CSMI_SAS_GET_LOCATION_BUFFER,
--  *PCSMI_SAS_GET_LOCATION_BUFFER;
--
--// CC_CSMI_SAS_PHY_CONTROL
--
--typedef struct _CSMI_SAS_CHARACTER {
--   __u8  bTypeFlags;
--   __u8  bValue;
--} CSMI_SAS_CHARACTER,
--  *PCSMI_SAS_CHARACTER;
--
--typedef struct _CSMI_SAS_PHY_CONTROL {
--   __u8  bType;
--   __u8  bRate;
--   __u8  bReserved[6];
--   __u32 uVendorUnique[8];
--   __u32 uTransmitterFlags;
--   __i8  bTransmitAmplitude;
--   __i8  bTransmitterPreemphasis;
--   __i8  bTransmitterSlewRate;
--   __i8  bTransmitterReserved[13];
--   __u8  bTransmitterVendorUnique[64];
--   __u32 uReceiverFlags;
--   __i8  bReceiverThreshold;
--   __i8  bReceiverEqualizationGain;
--   __i8  bReceiverReserved[14];
--   __u8  bReceiverVendorUnique[64];
--   __u32 uPatternFlags;
--   __u8  bFixedPattern;
--   __u8  bUserPatternLength;
--   __u8  bPatternReserved[6];
--   CSMI_SAS_CHARACTER UserPatternBuffer[16];
--} CSMI_SAS_PHY_CONTROL,
--  *PCSMI_SAS_PHY_CONTROL;
--
--typedef struct _CSMI_SAS_PHY_CONTROL_BUFFER {
--   IOCTL_HEADER IoctlHeader;
--   __u32 uFunction;
--   __u8  bPhyIdentifier;
--   __u16 usLengthOfControl;
--   __u8  bNumberOfControls;
--   __u8  bReserved[4];
--   __u32 uLinkFlags;
--   __u8  bSpinupRate;
--   __u8  bLinkReserved[7];
--   __u32 uVendorUnique[8];
--   CSMI_SAS_PHY_CONTROL Control[1];
--} CSMI_SAS_PHY_CONTROL_BUFFER,
--  *PCSMI_SAS_PHY_CONTROL_BUFFER;
--
--//EDM #pragma CSMI_SAS_END_PACK
--#pragma pack()
--
--#endif // _CSMI_SAS_H_
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.c linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.c	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.c	2007-11-02 09:10:23.000000000 +0100
-@@ -0,0 +1,5095 @@
-+#define mptctl_is_this_sas_cntr(ioc) (ioc->bus_type == SAS) ? 1 : 0
-+
-+#ifndef TRUE
-+#define TRUE     (1)
-+#endif
-+#ifndef FALSE
-+#define FALSE    (0)
-+#endif
-+
-+#ifdef QUIESE_IO
-+static int mptctl_raid_get_volume_id(MPT_ADAPTER *ioc, u8 PhysDiskNum, u8 *VolumeID,
-+    u8 *VolumeBus);
-+#endif
-+static int mptctl_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus,
-+    u8 VolumeId, pMpiRaidActionReply_t reply);
-+static u8  map_sas_status_to_csmi(u8 mpi_sas_status);
-+
-+static u64 reverse_byte_order64(u64 * data64)
-+{
-+	int i;
-+	u64 rc;
-+	u8  * inWord = (u8 *)data64, * outWord = (u8 *)&rc;
-+
-+	for (i=0;i<8;i++) outWord[i] = inWord[7-i];
-+
-+	return rc;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Routine for the CSMI Sas Get Driver Info command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_driver_info(unsigned long arg)
-+{
-+
-+	CSMI_SAS_DRIVER_INFO_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_DRIVER_INFO_BUFFER	karg;
-+	MPT_ADAPTER	*ioc = NULL;
-+	int		iocnum;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+	      "Unable to read in csmi_sas_get_driver_info_buffer struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Fill in the data and return the structure to the calling
-+	 * program
-+	 */
-+	memcpy( karg.Information.szName, MPT_MISCDEV_BASENAME,
-+	    sizeof(MPT_MISCDEV_BASENAME));
-+	memcpy( karg.Information.szDescription, MPT_CSMI_DESCRIPTION,
-+	    sizeof(MPT_CSMI_DESCRIPTION));
-+
-+	karg.Information.usMajorRevision = MPT_LINUX_MAJOR_VERSION;
-+	karg.Information.usMinorRevision = MPT_LINUX_MINOR_VERSION;
-+	karg.Information.usBuildRevision = MPT_LINUX_BUILD_VERSION;
-+	karg.Information.usReleaseRevision = MPT_LINUX_RELEASE_VERSION;
-+
-+	karg.Information.usCSMIMajorRevision = CSMI_MAJOR_REVISION;
-+	karg.Information.usCSMIMinorRevision = CSMI_MINOR_REVISION;
-+
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+		sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		   "Unable to write out csmi_sas_get_driver_info_buffer @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI_SAS_GET_CNTLR_CONFIG command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_cntlr_config(unsigned long arg)
-+{
-+
-+	CSMI_SAS_CNTLR_CONFIG_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_CNTLR_CONFIG_BUFFER	karg;
-+	MPT_ADAPTER	*ioc = NULL;
-+	int		iocnum;
-+	int		ii;
-+	unsigned int 	reg;
-+	u32      	l;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_CONFIG_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+	     "Unable to read in csmi_sas_get_cntlr_config_buffer struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+	      "%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Clear the struct before filling in data. */
-+	memset( &karg.Configuration, 0, sizeof(CSMI_SAS_CNTLR_CONFIG));
-+
-+	/* Fill in the data and return the structure to the calling
-+	 * program
-+	 */
-+
-+	/* Get Base IO and Mem Mapped Addresses. */
-+	for(ii=0; ii < DEVICE_COUNT_RESOURCE; ii++) {
-+		reg = PCI_BASE_ADDRESS_0 + (ii << 2);
-+		pci_read_config_dword(ioc->pcidev, reg, &l);
-+
-+		if ((l & PCI_BASE_ADDRESS_SPACE) ==
-+		    PCI_BASE_ADDRESS_SPACE_MEMORY) {
-+			karg.Configuration.BaseMemoryAddress.uLowPart =
-+			    l & PCI_BASE_ADDRESS_MEM_MASK;
-+		}
-+		else {
-+			karg.Configuration.uBaseIoAddress =
-+			    l & PCI_BASE_ADDRESS_IO_MASK;
-+		}
-+
-+		if ((l & (PCI_BASE_ADDRESS_SPACE |
-+		    PCI_BASE_ADDRESS_MEM_TYPE_MASK))
-+		    == (PCI_BASE_ADDRESS_SPACE_MEMORY |
-+		    PCI_BASE_ADDRESS_MEM_TYPE_64)) {
-+			pci_read_config_dword(ioc->pcidev, reg+4, &l);
-+			karg.Configuration.BaseMemoryAddress.uHighPart = l;
-+		}
-+		if ((l & PCI_BASE_ADDRESS_SPACE) ==
-+		    PCI_BASE_ADDRESS_SPACE_MEMORY) {
-+			break;
-+		}
-+	}
-+
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0)
-+	karg.Configuration.uBoardID = (ioc->pcidev->subsystem_device << 16) |
-+	    (ioc->pcidev->subsystem_vendor);
-+#endif
-+
-+	karg.Configuration.usSlotNumber =
-+	    (ioc->pci_slot_number = 0xff) ?
-+	    SLOT_NUMBER_UNKNOWN : ioc->pci_slot_number;
-+	karg.Configuration.bControllerClass = CSMI_SAS_CNTLR_CLASS_HBA;
-+	karg.Configuration.bIoBusType = CSMI_SAS_BUS_TYPE_PCI;
-+	karg.Configuration.BusAddress.PciAddress.bBusNumber =
-+	    ioc->pcidev->bus->number;
-+	karg.Configuration.BusAddress.PciAddress.bDeviceNumber =
-+	    PCI_SLOT(ioc->pcidev->devfn);
-+	karg.Configuration.BusAddress.PciAddress.bFunctionNumber =
-+	    PCI_FUNC(ioc->pcidev->devfn);
-+	karg.Configuration.BusAddress.PciAddress.bReserved = 0;
-+	memcpy( &karg.Configuration.szSerialNumber,ioc->BoardTracerNumber, 16 );
-+	karg.Configuration.usMajorRevision = ioc->facts.FWVersion.Struct.Major;
-+	karg.Configuration.usMinorRevision = ioc->facts.FWVersion.Struct.Minor;
-+	karg.Configuration.usBuildRevision = ioc->facts.FWVersion.Struct.Unit;
-+	karg.Configuration.usReleaseRevision = ioc->facts.FWVersion.Struct.Dev;
-+	karg.Configuration.usBIOSMajorRevision =
-+	    (ioc->biosVersion & 0xFF000000) >> 24;
-+	karg.Configuration.usBIOSMinorRevision =
-+	    (ioc->biosVersion & 0x00FF0000) >> 16;
-+	karg.Configuration.usBIOSBuildRevision =
-+	    (ioc->biosVersion & 0x0000FF00) >> 8;
-+	karg.Configuration.usBIOSReleaseRevision =
-+	    (ioc->biosVersion & 0x000000FF);
-+	karg.Configuration.uControllerFlags =
-+	    CSMI_SAS_CNTLR_SAS_HBA | CSMI_SAS_CNTLR_SAS_RAID | 
-+	    CSMI_SAS_CNTLR_FWD_SUPPORT | CSMI_SAS_CNTLR_FWD_ONLINE | 
-+	    CSMI_SAS_CNTLR_FWD_SRESET ;
-+
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* All Rrom entries will be zero. Skip them. */
-+	/* bReserved will also be zeros. */
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+		sizeof(CSMI_SAS_DRIVER_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		"Unable to write out csmi_sas_get_driver_info_buffer @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI Sas Get Controller Status command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_cntlr_status(unsigned long arg)
-+{
-+
-+	CSMI_SAS_CNTLR_STATUS_BUFFER  __user *uarg = (void __user *) arg;
-+	MPT_ADAPTER		*ioc = NULL;
-+	CSMI_SAS_CNTLR_STATUS_BUFFER	karg;
-+	int			iocnum;
-+	int			rc;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+	     "Unable to read in csmi_sas_get_cntlr_status_buffer struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Fill in the data and return the structure to the calling
-+	 * program
-+	 */
-+
-+	rc = mpt_GetIocState(ioc, 1);
-+	switch (rc) {
-+	case MPI_IOC_STATE_OPERATIONAL:
-+		karg.Status.uStatus =  CSMI_SAS_CNTLR_STATUS_GOOD;
-+		karg.Status.uOfflineReason = 0;
-+		break;
-+
-+	case MPI_IOC_STATE_FAULT:
-+		karg.Status.uStatus = CSMI_SAS_CNTLR_STATUS_FAILED;
-+		karg.Status.uOfflineReason = 0;
-+		break;
-+
-+	case MPI_IOC_STATE_RESET:
-+	case MPI_IOC_STATE_READY:
-+	default:
-+		karg.Status.uStatus =  CSMI_SAS_CNTLR_STATUS_OFFLINE;
-+		karg.Status.uOfflineReason =
-+		    CSMI_SAS_OFFLINE_REASON_INITIALIZING;
-+		break;
-+	}
-+
-+	memset(&karg.Status.bReserved, 0, 28);
-+
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+		sizeof(CSMI_SAS_CNTLR_STATUS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		    "Unable to write out csmi_sas_get_cntlr_status @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI Sas Get Phy Info command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_phy_info(unsigned long arg)
-+{
-+	CSMI_SAS_PHY_INFO_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_PHY_INFO_BUFFER  karg;
-+	MPT_ADAPTER		*ioc = NULL;
-+	ConfigExtendedPageHeader_t  hdr;
-+	CONFIGPARMS		cfg;
-+	SasIOUnitPage0_t	*sasIoUnitPg0;
-+	dma_addr_t		sasIoUnitPg0_dma;
-+	int			sasIoUnitPg0_data_sz;
-+	SasPhyPage0_t		*sasPhyPg0;
-+	dma_addr_t		sasPhyPg0_dma;
-+	int			sasPhyPg0_data_sz;
-+	u16			protocol;
-+	int			iocnum;
-+	int			rc;
-+	int			ii;
-+	u64			SASAddress64;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+	sasIoUnitPg0=NULL;
-+	sasPhyPg0=NULL;
-+	sasIoUnitPg0_data_sz=0;
-+	sasPhyPg0_data_sz=0;
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_PHY_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		"Unable to read in csmi_sas_get_phy_info_buffer struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Fill in the data and return the structure to the calling
-+	 * program
-+	 */
-+	memset( &karg.Information, 0, sizeof(CSMI_SAS_PHY_INFO));
-+
-+	/* Issue a config request to get the number of phys
-+	 */
-+	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((
-+		    ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: HEADER\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto sas_get_phy_info_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": hdr.ExtPageLength == 0\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto sas_get_phy_info_exit;
-+	}
-+
-+	sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4;
-+	rc = -ENOMEM;
-+
-+	sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev,
-+	    sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma);
-+
-+	if (!sasIoUnitPg0) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto sas_get_phy_info_exit;
-+	}
-+
-+	memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz);
-+	cfg.physAddr = sasIoUnitPg0_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((
-+		    ": FAILED: MPI_SASIOUNITPAGE0_PAGEVERSION: PAGE\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto sas_get_phy_info_exit;
-+	}
-+
-+
-+	/* Number of Phys. */
-+	karg.Information.bNumberOfPhys = sasIoUnitPg0->NumPhys;
-+
-+	/* Fill in information for each phy. */
-+	for (ii = 0; ii < karg.Information.bNumberOfPhys; ii++) {
-+
-+/* EDM : dump IO Unit Page 0 data*/
-+		dsasprintk(("---- IO UNIT PAGE 0 ------------\n"));
-+		dsasprintk(("Handle=0x%X\n",
-+		    le16_to_cpu(sasIoUnitPg0->PhyData[ii].AttachedDeviceHandle)));
-+		dsasprintk(("Controller Handle=0x%X\n",
-+		    le16_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerDevHandle)));
-+		dsasprintk(("Port=0x%X\n",
-+		    sasIoUnitPg0->PhyData[ii].Port));
-+		dsasprintk(("Port Flags=0x%X\n",
-+		    sasIoUnitPg0->PhyData[ii].PortFlags));
-+		dsasprintk(("PHY Flags=0x%X\n",
-+		    sasIoUnitPg0->PhyData[ii].PhyFlags));
-+		dsasprintk(("Negotiated Link Rate=0x%X\n",
-+		    sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate));
-+		dsasprintk(("Controller PHY Device Info=0x%X\n",
-+		    le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo)));
-+		dsasprintk(("DiscoveryStatus=0x%X\n",
-+		    le32_to_cpu(sasIoUnitPg0->PhyData[ii].DiscoveryStatus)));
-+		dsasprintk(("\n"));
-+/* EDM : debug data */
-+
-+		/* PHY stuff. */
-+		karg.Information.Phy[ii].bPortIdentifier =
-+		    sasIoUnitPg0->PhyData[ii].Port;
-+
-+		/* Get the negotiated link rate for the phy. */
-+		switch (sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate) {
-+
-+		case MPI_SAS_IOUNIT0_RATE_PHY_DISABLED:
-+			karg.Information.Phy[ii].bNegotiatedLinkRate =
-+			    CSMI_SAS_PHY_DISABLED;
-+			break;
-+
-+		case MPI_SAS_IOUNIT0_RATE_FAILED_SPEED_NEGOTIATION:
-+			karg.Information.Phy[ii].bNegotiatedLinkRate =
-+			    CSMI_SAS_LINK_RATE_FAILED;
-+			break;
-+
-+		case MPI_SAS_IOUNIT0_RATE_SATA_OOB_COMPLETE:
-+			break;
-+
-+		case MPI_SAS_IOUNIT0_RATE_1_5:
-+			karg.Information.Phy[ii].bNegotiatedLinkRate =
-+			    CSMI_SAS_LINK_RATE_1_5_GBPS;
-+			break;
-+
-+		case MPI_SAS_IOUNIT0_RATE_3_0:
-+			karg.Information.Phy[ii].bNegotiatedLinkRate =
-+			    CSMI_SAS_LINK_RATE_3_0_GBPS;
-+			break;
-+
-+		case MPI_SAS_IOUNIT0_RATE_UNKNOWN:
-+		default:
-+			karg.Information.Phy[ii].bNegotiatedLinkRate =
-+			    CSMI_SAS_LINK_RATE_UNKNOWN;
-+			break;
-+		}
-+
-+		if (sasIoUnitPg0->PhyData[ii].PortFlags &
-+		    MPI_SAS_IOUNIT0_PORT_FLAGS_DISCOVERY_IN_PROGRESS) {
-+			karg.Information.Phy[ii].bAutoDiscover =
-+			    CSMI_SAS_DISCOVER_IN_PROGRESS;
-+		} else {
-+			karg.Information.Phy[ii].bAutoDiscover =
-+			    CSMI_SAS_DISCOVER_COMPLETE;
-+		}
-+
-+		/* Issue a config request to get
-+		 * phy information.
-+		 */
-+		hdr.PageVersion = MPI_SASPHY0_PAGEVERSION;
-+		hdr.ExtPageLength = 0;
-+		hdr.PageNumber = 0;
-+		hdr.Reserved1 = 0;
-+		hdr.Reserved2 = 0;
-+		hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+		hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
-+
-+		cfg.cfghdr.ehdr = &hdr;
-+		cfg.physAddr = -1;
-+		cfg.pageAddr = ii;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+		cfg.dir = 0;	/* read */
-+		cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+		if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+			dctlprintk((
-+			    ": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n"));
-+			dctlprintk((": rc=%x\n",rc));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto sas_get_phy_info_exit;
-+		}
-+
-+		if (hdr.ExtPageLength == 0) {
-+			dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto sas_get_phy_info_exit;
-+		}
-+
-+		sasPhyPg0_data_sz = hdr.ExtPageLength * 4;
-+		rc = -ENOMEM;
-+
-+		sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(
-+		    ioc->pcidev, sasPhyPg0_data_sz, &sasPhyPg0_dma);
-+
-+		if (! sasPhyPg0) {
-+			dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto sas_get_phy_info_exit;
-+		}
-+
-+		memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz);
-+		cfg.physAddr = sasPhyPg0_dma;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+		if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+			dctlprintk((
-+			    ": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n"));
-+			dctlprintk((": rc=%x\n",rc));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
-+			    (u8 *) sasPhyPg0, sasPhyPg0_dma);
-+			goto sas_get_phy_info_exit;
-+		}
-+
-+		le64_to_cpus((u64 *)&sasPhyPg0->SASAddress);
-+		memcpy(&SASAddress64, &sasPhyPg0->SASAddress, sizeof(u64));
-+
-+/* EDM : dump PHY Page 0 data*/
-+		dsasprintk(("---- SAS PHY PAGE 0 ------------\n"));
-+		dsasprintk(("Handle=0x%X\n",
-+		    le16_to_cpu(sasPhyPg0->AttachedDevHandle)));
-+		dsasprintk(("SAS Address=0x%llX\n",SASAddress64));
-+		dsasprintk(("Attached PHY Identifier=0x%X\n",
-+		    sasPhyPg0->AttachedPhyIdentifier));
-+		dsasprintk(("Attached Device Info=0x%X\n",
-+		    le32_to_cpu(sasPhyPg0->AttachedDeviceInfo)));
-+		dsasprintk(("Programmed Link Rate=0x%X\n",
-+		    sasPhyPg0->ProgrammedLinkRate));
-+		dsasprintk(("Hardware Link Rate=0x%X\n",
-+		    ioc->sasPhyInfo[ii].hwLinkRate));
-+		dsasprintk(("Change Count=0x%X\n",
-+		    sasPhyPg0->ChangeCount));
-+		dsasprintk(("PHY Info=0x%X\n",
-+		    le32_to_cpu(sasPhyPg0->PhyInfo)));
-+		dsasprintk(("\n"));
-+/* EDM : debug data */
-+
-+		/* save the data */
-+
-+		/* Set Max hardware link rate.
-+		 * This value is hard coded
-+		 * because the HW link rate
-+		 * is currently being
-+		 * overwritten in FW.
-+		 */
-+
-+		/* Set Max hardware link rate. */
-+		switch (sasPhyPg0->HwLinkRate &
-+		    MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) {
-+
-+		case MPI_SAS_PHY0_HWRATE_MAX_RATE_1_5:
-+			karg.Information.Phy[ii].bMaximumLinkRate =
-+			    CSMI_SAS_LINK_RATE_1_5_GBPS;
-+			break;
-+
-+		case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0:
-+			karg.Information.Phy[ii].bMaximumLinkRate =
-+			    CSMI_SAS_LINK_RATE_3_0_GBPS;
-+			break;
-+		default:
-+			break;
-+		}
-+
-+		/* Set Max programmed link rate. */
-+		switch (sasPhyPg0->ProgrammedLinkRate &
-+		    MPI_SAS_PHY0_PRATE_MAX_RATE_MASK) {
-+
-+		case MPI_SAS_PHY0_PRATE_MAX_RATE_1_5:
-+			karg.Information.Phy[ii].bMaximumLinkRate |=
-+			    (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4);
-+			break;
-+
-+		case MPI_SAS_PHY0_PRATE_MAX_RATE_3_0:
-+			karg.Information.Phy[ii].bMaximumLinkRate |=
-+			    (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4);
-+			break;
-+		default:
-+			break;
-+		}
-+
-+		/* Set Min hardware link rate. */
-+		switch (sasPhyPg0->HwLinkRate &
-+		    MPI_SAS_PHY0_HWRATE_MIN_RATE_MASK) {
-+
-+		case MPI_SAS_PHY0_HWRATE_MIN_RATE_1_5:
-+			karg.Information.Phy[ii].bMinimumLinkRate =
-+			    CSMI_SAS_LINK_RATE_1_5_GBPS;
-+			break;
-+
-+		case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0:
-+			karg.Information.Phy[ii].bMinimumLinkRate =
-+			    CSMI_SAS_LINK_RATE_3_0_GBPS;
-+			break;
-+		default:
-+			break;
-+		}
-+
-+		/* Set Min programmed link rate. */
-+		switch (sasPhyPg0->ProgrammedLinkRate &
-+		    MPI_SAS_PHY0_PRATE_MIN_RATE_MASK) {
-+
-+		case MPI_SAS_PHY0_PRATE_MIN_RATE_1_5:
-+			karg.Information.Phy[ii].bMinimumLinkRate |=
-+			    (CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS << 4);
-+			break;
-+
-+		case MPI_SAS_PHY0_PRATE_MIN_RATE_3_0:
-+			karg.Information.Phy[ii].bMinimumLinkRate |=
-+			    (CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS << 4);
-+			break;
-+		default:
-+			break;
-+		}
-+
-+		/* Fill in Attached Device
-+		 * Initiator Port Protocol.
-+		 * Bits 6:3
-+		 * More than one bit can be set.
-+		 */
-+		protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x78;
-+		karg.Information.Phy[ii].Attached.bInitiatorPortProtocol = 0;
-+		if (protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR)
-+		      karg.Information.Phy[ii].Attached.bInitiatorPortProtocol =
-+			    CSMI_SAS_PROTOCOL_SSP;
-+		if (protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR)
-+		     karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_STP;
-+		if (protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR)
-+		     karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SMP;
-+		if (protocol & MPI_SAS_DEVICE_INFO_SATA_HOST)
-+		     karg.Information.Phy[ii].Attached.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SATA;
-+
-+
-+		/* Fill in Phy Target Port
-+		 * Protocol. Bits 10:7
-+		 * More than one bit can be set.
-+		 */
-+		protocol = le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) & 0x780;
-+		karg.Information.Phy[ii].Attached.bTargetPortProtocol = 0;
-+		if (protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET)
-+			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SSP;
-+		if (protocol & MPI_SAS_DEVICE_INFO_STP_TARGET)
-+			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_STP;
-+		if (protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET)
-+			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SMP;
-+		if (protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE)
-+			karg.Information.Phy[ii].Attached.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SATA;
-+
-+
-+		/* Fill in Attached device type */
-+		switch (le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) &
-+		    MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) {
-+
-+		case MPI_SAS_DEVICE_INFO_NO_DEVICE:
-+			karg.Information.Phy[ii].Attached.bDeviceType =
-+			    CSMI_SAS_NO_DEVICE_ATTACHED;
-+			break;
-+
-+		case MPI_SAS_DEVICE_INFO_END_DEVICE:
-+			karg.Information.Phy[ii].Attached.bDeviceType =
-+			    CSMI_SAS_END_DEVICE;
-+			break;
-+
-+		case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER:
-+			karg.Information.Phy[ii].Attached.bDeviceType =
-+			    CSMI_SAS_EDGE_EXPANDER_DEVICE;
-+			break;
-+
-+		case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER:
-+			karg.Information.Phy[ii].Attached.bDeviceType =
-+			    CSMI_SAS_FANOUT_EXPANDER_DEVICE;
-+			break;
-+		}
-+
-+		/* Identify Info. */
-+		switch (le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo) &
-+		    MPI_SAS_DEVICE_INFO_MASK_DEVICE_TYPE) {
-+
-+		case MPI_SAS_DEVICE_INFO_NO_DEVICE:
-+			karg.Information.Phy[ii].Identify.bDeviceType =
-+			    CSMI_SAS_NO_DEVICE_ATTACHED;
-+			break;
-+
-+		case MPI_SAS_DEVICE_INFO_END_DEVICE:
-+			karg.Information.Phy[ii].Identify.bDeviceType =
-+			    CSMI_SAS_END_DEVICE;
-+			break;
-+
-+		case MPI_SAS_DEVICE_INFO_EDGE_EXPANDER:
-+			karg.Information.Phy[ii].Identify.bDeviceType =
-+			    CSMI_SAS_EDGE_EXPANDER_DEVICE;
-+			break;
-+
-+		case MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER:
-+			karg.Information.Phy[ii].Identify.bDeviceType =
-+			    CSMI_SAS_FANOUT_EXPANDER_DEVICE;
-+			break;
-+		}
-+
-+		/* Fill in Phy Initiator Port Protocol. Bits 6:3
-+		 * More than one bit can be set, fall through cases.
-+		 */
-+		protocol = le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo)
-+		    & 0x78;
-+		karg.Information.Phy[ii].Identify.bInitiatorPortProtocol = 0;
-+		if( protocol & MPI_SAS_DEVICE_INFO_SSP_INITIATOR )
-+		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SSP;
-+		if( protocol & MPI_SAS_DEVICE_INFO_STP_INITIATOR )
-+		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_STP;
-+		if( protocol & MPI_SAS_DEVICE_INFO_SMP_INITIATOR )
-+		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SMP;
-+		if( protocol & MPI_SAS_DEVICE_INFO_SATA_HOST )
-+		     karg.Information.Phy[ii].Identify.bInitiatorPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SATA;
-+
-+		/* Fill in Phy Target Port Protocol. Bits 10:7
-+		 * More than one bit can be set, fall through cases.
-+		 */
-+		protocol = le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo)
-+		    & 0x780;
-+		karg.Information.Phy[ii].Identify.bTargetPortProtocol = 0;
-+		if( protocol & MPI_SAS_DEVICE_INFO_SSP_TARGET )
-+			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SSP;
-+		if( protocol & MPI_SAS_DEVICE_INFO_STP_TARGET )
-+			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_STP;
-+		if( protocol & MPI_SAS_DEVICE_INFO_SMP_TARGET )
-+			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SMP;
-+		if( protocol & MPI_SAS_DEVICE_INFO_SATA_DEVICE )
-+			karg.Information.Phy[ii].Identify.bTargetPortProtocol |=
-+			    CSMI_SAS_PROTOCOL_SATA;
-+
-+
-+		/* Setup Identify SAS Address and Phy Identifier
-+		 *
-+		 * Get phy Sas address from device list.
-+		 * Search the list for the matching
-+		 * devHandle.
-+		 */
-+
-+		/* Setup SAS Address for the Phy */
-+		SASAddress64 = reverse_byte_order64((u64 *)&ioc->sasPhyInfo[ii].SASAddress);
-+		memcpy(karg.Information.Phy[ii].Identify.bSASAddress,&SASAddress64,
-+		    sizeof(u64));
-+
-+		karg.Information.Phy[ii].Identify.bPhyIdentifier = ii;
-+
-+		/* Setup SAS Address for the attached device */
-+		SASAddress64 = reverse_byte_order64((u64 *)&sasPhyPg0->SASAddress);
-+		memcpy(karg.Information.Phy[ii].Attached.bSASAddress,&SASAddress64,
-+		    sizeof(u64));
-+
-+		karg.Information.Phy[ii].Attached.bPhyIdentifier =
-+		    sasPhyPg0->AttachedPhyIdentifier;
-+
-+		pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
-+		    (u8 *) sasPhyPg0, sasPhyPg0_dma);
-+	}
-+
-+sas_get_phy_info_exit:
-+
-+	if (sasIoUnitPg0)
-+		pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz,
-+		    (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma);
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    sizeof(CSMI_SAS_PHY_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		    "Unable to write out csmi_sas_get_phy_info_buffer @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Set PHY Info command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_set_phy_info(unsigned long arg)
-+{
-+	CSMI_SAS_SET_PHY_INFO_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_SET_PHY_INFO_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_set_phy_info struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+/* TODO - implement IOCTL here */
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+	dctlprintk((": not implemented\n"));
-+
-+// cim_set_phy_info_exit:
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+				sizeof(CSMI_SAS_SET_PHY_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_set_phy_info @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI Sas Get SCSI Address command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_scsi_address(unsigned long arg)
-+{
-+	CSMI_SAS_GET_SCSI_ADDRESS_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_GET_SCSI_ADDRESS_BUFFER	 karg;
-+	MPT_ADAPTER		*ioc = NULL;
-+	int			iocnum;
-+	sas_device_info_t	*sasDevice;
-+	u64			SASAddress64;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg,
-+	    sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_scsi_address struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+	      "%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Fill in the data and return the structure to the calling
-+	 * program
-+	 */
-+
-+	/* Copy the SAS address in reverse byte order. */
-+	SASAddress64 = reverse_byte_order64((u64 *)&karg.bSASAddress);
-+
-+	/* Search the list for the matching SAS address. */
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SCSI_ADDRESS;
-+	list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+
-+		/* Found the matching device. */
-+		if ((memcmp(&sasDevice->SASAddress,
-+		    &SASAddress64, sizeof(u64)) != 0))
-+			continue;
-+
-+		karg.bPathId = sasDevice->Bus;
-+		karg.bTargetId = sasDevice->TargetId;
-+		karg.bLun = karg.bSASLun[0];
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+		if (((sasDevice->DeviceInfo & 0x00000003) ==
-+			MPI_SAS_DEVICE_INFO_FANOUT_EXPANDER) ||
-+			((sasDevice->DeviceInfo & 0x00000003) ==
-+			 MPI_SAS_DEVICE_INFO_EDGE_EXPANDER))
-+			karg.IoctlHeader.ReturnCode =
-+			    CSMI_SAS_NOT_AN_END_DEVICE;
-+		break;
-+	}
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    sizeof(CSMI_SAS_GET_SCSI_ADDRESS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to write out csmi_sas_get_scsi_address @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI Sas Get SCSI Address command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_sata_signature(unsigned long arg)
-+{
-+	CSMI_SAS_SATA_SIGNATURE_BUFFER  __user *uarg = (void __user *) arg;
-+	CSMI_SAS_SATA_SIGNATURE_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum;
-+	int				rc, jj;
-+	ConfigExtendedPageHeader_t	hdr;
-+	CONFIGPARMS			cfg;
-+	SasPhyPage0_t			*sasPhyPg0;
-+	dma_addr_t			sasPhyPg0_dma;
-+	int				sasPhyPg0_data_sz;
-+	SasDevicePage1_t		*sasDevicePg1;
-+	dma_addr_t			sasDevicePg1_dma;
-+	int				sasDevicePg1_data_sz;
-+	u8				phyId;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+	sasPhyPg0=NULL;
-+	sasPhyPg0_data_sz=0;
-+	sasDevicePg1=NULL;
-+	sasDevicePg1_data_sz=0;
-+
-+	if (copy_from_user(&karg, uarg,
-+	     sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_sata_signature struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+	    "%s::%s() @%d - ioc%d not found!\n",
-+		     __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	phyId = karg.Signature.bPhyIdentifier;
-+	if (phyId >= ioc->numPhys) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST;
-+		dctlprintk((": phyId >= ioc->numPhys\n"));
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	/* Default to success.*/
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Issue a config request to get the devHandle of the attached device
-+	 */
-+
-+	/* Issue a config request to get phy information. */
-+	hdr.PageVersion = MPI_SASPHY0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = phyId;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: HEADER\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": hdr.ExtPageLength == 0\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+
-+	sasPhyPg0_data_sz = hdr.ExtPageLength * 4;
-+	rc = -ENOMEM;
-+
-+	sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(ioc->pcidev,
-+	    sasPhyPg0_data_sz, &sasPhyPg0_dma);
-+
-+	if (! sasPhyPg0) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz);
-+	cfg.physAddr = sasPhyPg0_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": FAILED: MPI_SASPHY0_PAGEVERSION: PAGE\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	/* Make sure a SATA device is attached. */
-+	if ((le32_to_cpu(sasPhyPg0->AttachedDeviceInfo) &
-+	    MPI_SAS_DEVICE_INFO_SATA_DEVICE) == 0) {
-+		dctlprintk((": NOT A SATA DEVICE\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_SATA_DEVICE;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	/* Get device page 1 for FIS  signature. */
-+	hdr.PageVersion = MPI_SASDEVICE1_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 1 /* page number 1 */;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+
-+	cfg.pageAddr = ((MPI_SAS_DEVICE_PGAD_FORM_HANDLE <<
-+	    MPI_SAS_DEVICE_PGAD_FORM_SHIFT) |
-+	    le16_to_cpu(sasPhyPg0->AttachedDevHandle));
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		dctlprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: HEADER\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		dctlprintk((": hdr.ExtPageLength == 0\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	sasDevicePg1_data_sz = hdr.ExtPageLength * 4;
-+	rc = -ENOMEM;
-+
-+	sasDevicePg1 = (SasDevicePage1_t *) pci_alloc_consistent
-+	    (ioc->pcidev, sasDevicePg1_data_sz, &sasDevicePg1_dma);
-+
-+	if (! sasDevicePg1) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+	memset((u8 *)sasDevicePg1, 0, sasDevicePg1_data_sz);
-+	cfg.physAddr = sasDevicePg1_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		dctlprintk((": FAILED: MPI_SASDEVICE1_PAGEVERSION: PAGE\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sata_signature_exit;
-+	}
-+
-+/* EDM : dump Device Page 1 data*/
-+	dsasprintk(("---- SAS DEVICE PAGE 1 ---------\n"));
-+	dsasprintk(("Handle=0x%x\n",sasDevicePg1->DevHandle));
-+	dsasprintk(("SAS Address="));
-+	for(jj=0;jj<8;jj++)
-+		dsasprintk(("%02x ",
-+		((u8 *)&sasDevicePg1->SASAddress)[jj]));
-+	dsasprintk(("\n"));
-+	dsasprintk(("Target ID=0x%x\n",sasDevicePg1->TargetID));
-+	dsasprintk(("Bus=0x%x\n",sasDevicePg1->Bus));
-+	dsasprintk(("Initial Reg Device FIS="));
-+	for(jj=0;jj<20;jj++)
-+		dsasprintk(("%02x ",
-+		((u8 *)&sasDevicePg1->InitialRegDeviceFIS)[jj]));
-+	dsasprintk(("\n\n"));
-+/* EDM : debug data */
-+
-+	memcpy(karg.Signature.bSignatureFIS,
-+		sasDevicePg1->InitialRegDeviceFIS,20);
-+
-+cim_sata_signature_exit:
-+
-+	if (sasPhyPg0)
-+		pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
-+		    (u8 *) sasPhyPg0, sasPhyPg0_dma);
-+
-+	if (sasDevicePg1)
-+		pci_free_consistent(ioc->pcidev, sasDevicePg1_data_sz,
-+		    (u8 *) sasDevicePg1, sasDevicePg1_dma);
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    sizeof(CSMI_SAS_SATA_SIGNATURE_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to write out csmi_sas_sata_signature @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI Sas Get SCSI Address command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_device_address(unsigned long arg)
-+{
-+	CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER	 karg;
-+	MPT_ADAPTER		*ioc = NULL;
-+	int			iocnum;
-+	sas_device_info_t	*sasDevice;
-+	u64			SASAddress64;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg,
-+	    sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+	   "Unable to read in csmi_sas_get_device_address_buffer struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+	    "%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Fill in the data and return the structure to the calling
-+	 * program
-+	 */
-+
-+	/* Search the list for the matching SAS address. */
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_NO_DEVICE_ADDRESS;
-+	list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+
-+		/* Find the matching device. */
-+		if ((karg.bPathId == sasDevice->Bus) &&
-+			(karg.bTargetId == sasDevice->TargetId)) {
-+
-+			SASAddress64 = reverse_byte_order64(&sasDevice->SASAddress);
-+			memcpy(&karg.bSASAddress,&SASAddress64,sizeof(u64));
-+			karg.bSASLun[0] = karg.bLun;
-+			memset(karg.bSASLun, 0, sizeof(karg.bSASLun));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+			break;
-+		} else
-+			/* Keep looking. */
-+			continue;
-+	}
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    sizeof(CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		"Unable to write out csmi_sas_get_device_address_buffer @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI Sas Get Link Errors command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_link_errors(unsigned long arg)
-+{
-+	CSMI_SAS_LINK_ERRORS_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_LINK_ERRORS_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t			*mpi_hdr;
-+	int				iocnum;
-+	int				rc,ii;
-+	ConfigExtendedPageHeader_t	hdr;
-+	CONFIGPARMS			cfg;
-+	SasPhyPage1_t			*sasPhyPage1;
-+	dma_addr_t			sasPhyPage1_dma;
-+	int				sasPhyPage1_data_sz;
-+	SasIoUnitControlRequest_t	*sasIoUnitCntrReq;
-+	SasIoUnitControlReply_t		*sasIoUnitCntrReply;
-+	u8				phyId;
-+	int				wait_timeout;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+	sasPhyPage1=NULL;
-+	sasPhyPage1_data_sz=0;
-+
-+	if (copy_from_user(&karg, uarg,
-+	     sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in mptctl_csmi_sas_get_link_errors struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+	    "%s::%s() @%d - ioc%d not found!\n",
-+		     __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	phyId = karg.Information.bPhyIdentifier;
-+	if (phyId >= ioc->numPhys) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_PHY_DOES_NOT_EXIST;
-+		dctlprintk((": phyId >= ioc->numPhys\n"));
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+	/* Default to success.*/
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Issue a config request to get the devHandle of the attached device
-+	 */
-+
-+	/* Issue a config request to get phy information. */
-+	hdr.PageVersion = MPI_SASPHY1_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 1 /* page number 1*/;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = phyId;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: HEADER\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": hdr.ExtPageLength == 0\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+
-+	sasPhyPage1_data_sz = hdr.ExtPageLength * 4;
-+	rc = -ENOMEM;
-+
-+	sasPhyPage1 = (SasPhyPage1_t *) pci_alloc_consistent(ioc->pcidev,
-+	    sasPhyPage1_data_sz, &sasPhyPage1_dma);
-+
-+	if (! sasPhyPage1) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+	memset((u8 *)sasPhyPage1, 0, sasPhyPage1_data_sz);
-+	cfg.physAddr = sasPhyPage1_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		/* Don't check if this failed.  Already in a
-+		 * failure case.
-+		 */
-+		dctlprintk((": FAILED: MPI_SASPHY1_PAGEVERSION: PAGE\n"));
-+		dctlprintk((": rc=%x\n",rc));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+/* EDM : dump PHY Page 1 data*/
-+	dsasprintk(("---- SAS PHY PAGE 1 ------------\n"));
-+	dsasprintk(("Invalid Dword Count=0x%x\n",
-+	    sasPhyPage1->InvalidDwordCount));
-+	dsasprintk(("Running Disparity Error Count=0x%x\n",
-+	    sasPhyPage1->RunningDisparityErrorCount));
-+	dsasprintk(("Loss Dword Synch Count=0x%x\n",
-+	    sasPhyPage1->LossDwordSynchCount));
-+	dsasprintk(("PHY Reset Problem Count=0x%x\n",
-+	    sasPhyPage1->PhyResetProblemCount));
-+	dsasprintk(("\n\n"));
-+/* EDM : debug data */
-+
-+	karg.Information.uInvalidDwordCount =
-+		le32_to_cpu(sasPhyPage1->InvalidDwordCount);
-+	karg.Information.uRunningDisparityErrorCount =
-+		le32_to_cpu(sasPhyPage1->RunningDisparityErrorCount);
-+	karg.Information.uLossOfDwordSyncCount =
-+		le32_to_cpu(sasPhyPage1->LossDwordSynchCount);
-+	karg.Information.uPhyResetProblemCount =
-+		le32_to_cpu(sasPhyPage1->PhyResetProblemCount);
-+
-+	if (karg.Information.bResetCounts ==
-+	    CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS ) {
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+	/* Clear Error log
-+	 *
-+	 * Issue IOUNIT Control Reqeust Message
-+	 */
-+
-+	/* Get a MF for this command.
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_link_errors_exit;
-+        }
-+
-+	mpi_hdr = (MPIHeader_t *) mf;
-+	sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf;
-+	memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t));
-+	sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL;
-+	sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext;
-+	sasIoUnitCntrReq->PhyNum = phyId;
-+	sasIoUnitCntrReq->Operation = MPI_SAS_OP_PHY_CLEAR_ERROR_LOG;
-+
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout);
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*wait_timeout);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now we need to reset the board */
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		goto cim_get_link_errors_exit;
-+	}
-+
-+	/* process the completed Reply Message Frame */
-+	if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) {
-+
-+		sasIoUnitCntrReply =
-+		    (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame;
-+
-+		if ( le16_to_cpu(sasIoUnitCntrReply->IOCStatus) != MPI_IOCSTATUS_SUCCESS) {
-+			dctlprintk((": SAS IO Unit Control: "));
-+			dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n",
-+			    sasIoUnitCntrReply->IOCStatus,
-+			    sasIoUnitCntrReply->IOCLogInfo));
-+		}
-+	}
-+
-+cim_get_link_errors_exit:
-+
-+	ioc->ioctl->status &= ~(MPT_IOCTL_STATUS_TM_FAILED |
-+	    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+	    MPT_IOCTL_STATUS_RF_VALID);
-+
-+	if (sasPhyPage1)
-+		pci_free_consistent(ioc->pcidev, sasPhyPage1_data_sz,
-+		    (u8 *) sasPhyPage1, sasPhyPage1_dma);
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    sizeof(CSMI_SAS_LINK_ERRORS_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to write out mptctl_csmi_sas_get_link_errors @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS SMP Passthru command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_smp_passthru(unsigned long arg)
-+{
-+	CSMI_SAS_SMP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg;
-+	MPT_ADAPTER			*ioc;
-+	CSMI_SAS_SMP_PASSTHRU_BUFFER	 karg;
-+	pSmpPassthroughRequest_t	smpReq;
-+	pSmpPassthroughReply_t		smpReply;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t			*mpi_hdr;
-+	char				*psge;
-+	int				iocnum, flagsLength,ii;
-+	u8				index;
-+	void *				request_data;
-+	dma_addr_t			request_data_dma;
-+	u32				request_data_sz;
-+	void *				response_data;
-+	dma_addr_t			response_data_dma;
-+	u32				response_data_sz;
-+	u16				ioc_stat;
-+	int				wait_timeout;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_smp_passthru struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	request_data = NULL;
-+	response_data = NULL;
-+	response_data_sz = sizeof(CSMI_SAS_SMP_RESPONSE);
-+	request_data_sz  = karg.Parameters.uRequestLength;
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Make sure the adapter is not being reset. */
-+	if (!ioc->ioctl) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		    "No memory available during driver init.\n",
-+		    __FILE__, __LINE__,__FUNCTION__);
-+		return -ENOMEM;
-+	} else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
-+		printk(KERN_ERR "%s@%d::%s - "
-+		    "Busy with IOC Reset \n",
-+		    __FILE__, __LINE__,__FUNCTION__);
-+		return -EBUSY;
-+	}
-+
-+	/* Default to success.*/
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Do some error checking on the request. */
-+	if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT;
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	if ((request_data_sz > 0xFFFF) || (!request_data_sz)) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	/* Get a free request frame and save the message context.
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_smp_passthru_exit;
-+        }
-+
-+	mpi_hdr = (MPIHeader_t *) mf;
-+	smpReq = (pSmpPassthroughRequest_t ) mf;
-+
-+	memset(smpReq,0,ioc->req_sz);
-+
-+	/* Fill in smp request. */
-+	smpReq->PhysicalPort = karg.Parameters.bPortIdentifier;
-+	smpReq->Function = MPI_FUNCTION_SMP_PASSTHROUGH;
-+	smpReq->RequestDataLength = cpu_to_le16(request_data_sz);
-+	smpReq->ConnectionRate = karg.Parameters.bConnectionRate;
-+	smpReq->MsgContext = mpi_hdr->MsgContext;
-+	for ( index = 0; index < 8; index++ ) {
-+		((u8*)&smpReq->SASAddress)[7 - index] =
-+		    karg.Parameters.bDestinationSASAddress[index];
-+	}
-+	smpReq->Reserved2 = 0;
-+	smpReq->Reserved3 = 0;
-+
-+	/*
-+	 * Prepare the necessary pointers to run
-+	 * through the SGL generation
-+	 */
-+
-+	psge = (char *)&smpReq->SGL;
-+
-+	/* setup the *Request* payload SGE */
-+	flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT |
-+		MPI_SGE_FLAGS_SYSTEM_ADDRESS |
-+		MPI_SGE_FLAGS_32_BIT_ADDRESSING |
-+		MPI_SGE_FLAGS_HOST_TO_IOC |
-+		MPI_SGE_FLAGS_END_OF_BUFFER;
-+
-+	if (sizeof(dma_addr_t) == sizeof(u64)) {
-+		flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING;
-+	}
-+	flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT;
-+	flagsLength |= request_data_sz;
-+
-+	request_data = pci_alloc_consistent(
-+	    ioc->pcidev, request_data_sz, &request_data_dma);
-+
-+	if (!request_data) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		mpt_free_msg_frame(ioc, mf);
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	mpt_add_sge(psge, flagsLength, request_data_dma);
-+	psge += (sizeof(u32) + sizeof(dma_addr_t));
-+
-+	memcpy(request_data,&karg.Parameters.Request,request_data_sz);
-+
-+	/* setup the *Response* payload SGE */
-+	response_data = pci_alloc_consistent(
-+	    ioc->pcidev, response_data_sz, &response_data_dma);
-+
-+	if (!response_data) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		mpt_free_msg_frame(ioc, mf);
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	flagsLength = MPI_SGE_FLAGS_SIMPLE_ELEMENT |
-+		MPI_SGE_FLAGS_SYSTEM_ADDRESS |
-+		MPI_SGE_FLAGS_32_BIT_ADDRESSING |
-+		MPI_SGE_FLAGS_IOC_TO_HOST |
-+		MPI_SGE_FLAGS_END_OF_BUFFER;
-+
-+	if (sizeof(dma_addr_t) == sizeof(u64)) {
-+		flagsLength |= MPI_SGE_FLAGS_64_BIT_ADDRESSING;
-+	}
-+
-+	flagsLength = flagsLength << MPI_SGE_FLAGS_SHIFT;
-+	flagsLength |= response_data_sz;
-+
-+	mpt_add_sge(psge, flagsLength, response_data_dma);
-+
-+	/* The request is complete. Set the timer parameters
-+	 * and issue the request.
-+	 */
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout);
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*wait_timeout);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now we need to reset the board */
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) {
-+		dctlprintk((": SMP Passthru: oh no, there is no reply!!"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	/* process the completed Reply Message Frame */
-+	smpReply = (pSmpPassthroughReply_t )ioc->ioctl->ReplyFrame;
-+	ioc_stat = le16_to_cpu(smpReply->IOCStatus) & MPI_IOCSTATUS_MASK;
-+
-+	if ((ioc_stat != MPI_IOCSTATUS_SUCCESS) &&
-+	    (ioc_stat != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		dctlprintk((": SMP Passthru: "));
-+		dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n",
-+		    smpReply->IOCStatus,
-+		    smpReply->IOCLogInfo,
-+		    smpReply->SASStatus));
-+		goto cim_smp_passthru_exit;
-+	}
-+
-+	karg.Parameters.bConnectionStatus =
-+	    map_sas_status_to_csmi(smpReply->SASStatus);
-+
-+
-+	if (le16_to_cpu(smpReply->ResponseDataLength)) {
-+		karg.Parameters.uResponseBytes = le16_to_cpu(smpReply->ResponseDataLength);
-+		memcpy(&karg.Parameters.Response,
-+		    response_data, le16_to_cpu(smpReply->ResponseDataLength));
-+	}
-+
-+cim_smp_passthru_exit:
-+
-+	ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED |
-+	    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+	    MPT_IOCTL_STATUS_RF_VALID);
-+
-+	if (request_data)
-+		pci_free_consistent(ioc->pcidev, request_data_sz,
-+		    (u8 *)request_data, request_data_dma);
-+
-+	if (response_data)
-+		pci_free_consistent(ioc->pcidev, response_data_sz,
-+		    (u8 *)response_data, response_data_dma);
-+
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+				sizeof(CSMI_SAS_SMP_PASSTHRU_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_smp_passthru @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS SSP Passthru command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int mptctl_csmi_sas_ssp_passthru(unsigned long arg)
-+{
-+	CSMI_SAS_SSP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_SSP_PASSTHRU_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	pSCSIIORequest_t		pScsiRequest;
-+	pSCSIIOReply_t			pScsiReply;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t 			*mpi_hdr;
-+	int				iocnum,ii;
-+	u32				data_sz;
-+	u64				SASAddress64;
-+	sas_device_info_t		*sasDevice;
-+	u16				req_idx;
-+	char				*psge;
-+	int				flagsLength;
-+	void *				request_data;
-+	dma_addr_t			request_data_dma;
-+	u32				request_data_sz;
-+	u8				found;
-+	u16				ioc_stat;
-+	u8 				volume_id;
-+	u8				volume_bus;
-+	u8				quiese_io_flag=0;
-+	u8				bus;
-+	u8				target;
-+	int				wait_timeout;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SSP_PASSTHRU_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_ssp_passthru struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	request_data=NULL;
-+	request_data_sz = karg.Parameters.uDataLength;
-+	bus=0;
-+	target=0;
-+	volume_id=0;
-+	volume_bus=0;
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s()"
-+		    " @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Default to success.
-+	 */
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Neither a phy nor a port has been selected.
-+	 */
-+	if ((karg.Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) &&
-+		(karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s()"
-+		    " @%d - incorrect bPhyIdentifier and bPortIdentifier!\n",
-+		    __FILE__, __FUNCTION__, __LINE__));
-+		goto cim_ssp_passthru_exit;
-+	}
-+
-+	/* A phy has been selected. Verify that it's valid.
-+	 */
-+	if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) {
-+
-+		/* Is the phy in range? */
-+		if (karg.Parameters.bPhyIdentifier >= ioc->numPhys) {
-+			karg.IoctlHeader.ReturnCode =
-+			    CSMI_SAS_PHY_DOES_NOT_EXIST;
-+			goto cim_ssp_passthru_exit;
-+		}
-+	}
-+
-+	/* some checks of the incoming frame
-+	 */
-+	if (request_data_sz > 0xFFFF) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s()"
-+		    " @%d - uDataLength > 0xFFFF!\n",
-+		    __FILE__, __FUNCTION__, __LINE__));
-+		goto cim_ssp_passthru_exit;
-+	}
-+
-+	data_sz = sizeof(CSMI_SAS_SSP_PASSTHRU_BUFFER) -
-+	    sizeof(IOCTL_HEADER) - sizeof(u8*) +
-+	    request_data_sz;
-+
-+	if ( data_sz > karg.IoctlHeader.Length ) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s()"
-+		    " @%d - expected datalen incorrect!\n",
-+		    __FILE__, __FUNCTION__, __LINE__));
-+		goto cim_ssp_passthru_exit;
-+	}
-+
-+	/* we will use SAS address to resolve the scsi adddressing
-+	 */
-+	memcpy(&SASAddress64,karg.Parameters.bDestinationSASAddress,
-+	    sizeof(u64));
-+	SASAddress64 = reverse_byte_order64(&SASAddress64);
-+
-+	/* Search the list for the matching SAS address.
-+	 */
-+	found = FALSE;
-+	list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+
-+		/* Find the matching device.
-+		 */
-+		if (sasDevice->SASAddress != SASAddress64)
-+			continue;
-+
-+		found = TRUE;
-+		bus = sasDevice->Bus;
-+		target = sasDevice->TargetId;
-+		break;
-+	}
-+
-+	/* Invalid SAS address
-+	 */
-+	if (found == FALSE) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s()"
-+		    " @%d - couldn't find associated SASAddress!\n",
-+		    __FILE__, __FUNCTION__, __LINE__));
-+		goto cim_ssp_passthru_exit;
-+	}
-+
-+	if(karg.Parameters.bAdditionalCDBLength) {
-+	/* TODO - SCSI IO (32) Request Message support
-+	 */
-+		dctlprintk((": greater than 16-byte cdb is not supported!\n"));
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		goto cim_ssp_passthru_exit;
-+	}
-+
-+	/* see if this is for raid phy disk */
-+	if (ioc->raid_data.isRaid && ioc->raid_data.pIocPg3) {
-+		for (ii = 0; (ii<ioc->raid_data.pIocPg3->NumPhysDisks &&
-+		    quiese_io_flag==0); ii++) {
-+			if (target == ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskID) {
-+				target = ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskNum;
-+				quiese_io_flag=1;
-+			}
-+		}
-+	}
-+#ifdef QUIESE_IO
-+	/* if RAID Volume, then quiesce io to phys disk*/
-+	if (quiese_io_flag==1) {
-+		if (mptctl_raid_get_volume_id(ioc, target,
-+		    &volume_id, &volume_bus) != 0) {
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_ssp_passthru_exit;
-+		}
-+		mptctl_do_raid(ioc,
-+		    MPI_RAID_ACTION_QUIESCE_PHYS_IO,
-+		    target, volume_bus, volume_id, NULL);
-+	}
-+#endif
-+	/* Get a free request frame and save the message context.
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_ssp_passthru_exit;
-+        }
-+
-+	mpi_hdr = (MPIHeader_t *) mf;
-+	pScsiRequest = (pSCSIIORequest_t) mf;
-+	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
-+
-+	memset(pScsiRequest,0,sizeof(SCSIIORequest_t));
-+
-+	/* Fill in SCSI IO (16) request.
-+	 */
-+
-+	pScsiRequest->Function = (quiese_io_flag==1) ?
-+	    MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH : MPI_FUNCTION_SCSI_IO_REQUEST;
-+	pScsiRequest->TargetID = target;
-+	pScsiRequest->Bus = bus;
-+	memcpy(pScsiRequest->LUN,karg.Parameters.bLun,8);
-+	pScsiRequest->CDBLength = karg.Parameters.bCDBLength;
-+	pScsiRequest->DataLength = cpu_to_le16(request_data_sz);
-+	pScsiRequest->MsgContext = mpi_hdr->MsgContext;
-+	memcpy(pScsiRequest->CDB,karg.Parameters.bCDB,
-+	    pScsiRequest->CDBLength);
-+
-+	/* direction
-+	 */
-+	if (karg.Parameters.uFlags & CSMI_SAS_SSP_READ) {
-+		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ);
-+	} else if (karg.Parameters.uFlags & CSMI_SAS_SSP_WRITE) {
-+		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_WRITE);
-+	} else if ((karg.Parameters.uFlags & CSMI_SAS_SSP_UNSPECIFIED) &&
-+	    (!karg.Parameters.uDataLength)) {
-+		/* no data transfer
-+		 */
-+		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_NODATATRANSFER);
-+	} else {
-+		/* no direction specified
-+		 */
-+		pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ);
-+		pScsiRequest->MsgFlags =
-+		    MPI_SCSIIO_MSGFLGS_CMD_DETERMINES_DATA_DIR;
-+	}
-+
-+	/* task attributes
-+	 */
-+	if((karg.Parameters.uFlags && 0xFF) == 0) {
-+		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ);
-+	} else if (karg.Parameters.uFlags &
-+	    CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE) {
-+		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_HEADOFQ);
-+	} else if (karg.Parameters.uFlags &
-+	    CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED) {
-+		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ORDEREDQ);
-+	} else if (karg.Parameters.uFlags &
-+	    CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA) {
-+		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_ACAQ);
-+	} else {
-+		pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_UNTAGGED);
-+	}
-+
-+	/* setup sense
-+	 */
-+	pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
-+	pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma +
-+	    (req_idx * MPT_SENSE_BUFFER_ALLOC));
-+
-+	/* setup databuffer sg, assuming we fit everything one contiguous buffer
-+	 */
-+	psge = (char *)&pScsiRequest->SGL;
-+
-+	if (karg.Parameters.uFlags & CSMI_SAS_SSP_WRITE) {
-+		flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE;
-+	} else if (karg.Parameters.uFlags & CSMI_SAS_SSP_READ) {
-+		flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
-+	}else {
-+		flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT |
-+				MPI_SGE_FLAGS_DIRECTION |
-+				mpt_addr_size() )
-+				<< MPI_SGE_FLAGS_SHIFT;
-+	}
-+	flagsLength |= request_data_sz;
-+
-+	if ( request_data_sz > 0) {
-+		request_data = pci_alloc_consistent(
-+		    ioc->pcidev, request_data_sz, &request_data_dma);
-+
-+		if (request_data == NULL) {
-+			dctlprintk((": pci_alloc_consistent: FAILED request_data_sz=%d\n", request_data_sz));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			mpt_free_msg_frame(ioc, mf);
-+			goto cim_ssp_passthru_exit;
-+		}
-+
-+		mpt_add_sge(psge, flagsLength, request_data_dma);
-+
-+		if (karg.Parameters.uFlags & CSMI_SAS_SSP_WRITE) {
-+
-+			if (copy_from_user(request_data,
-+			    karg.bDataBuffer,
-+			    request_data_sz)) {
-+				printk(KERN_ERR
-+				"%s@%d::%s - Unable "
-+				    "to read user data "
-+				    "struct @ %p\n",
-+				    __FILE__, __LINE__,__FUNCTION__,
-+				    (void*)karg.bDataBuffer);
-+				karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+				mpt_free_msg_frame(ioc, mf);
-+				goto cim_ssp_passthru_exit;
-+			}
-+		}
-+	} else {
-+		mpt_add_sge(psge, flagsLength, (dma_addr_t) -1);
-+	}
-+
-+	/* The request is complete. Set the timer parameters
-+	 * and issue the request.
-+	 */
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout);
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*wait_timeout);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now we need to reset the board */
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		goto cim_ssp_passthru_exit;
-+	}
-+
-+	memset(&karg.Status,0,sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS));
-+	karg.Status.bConnectionStatus = CSMI_SAS_OPEN_ACCEPT;
-+	karg.Status.bDataPresent = CSMI_SAS_SSP_NO_DATA_PRESENT;
-+	karg.Status.bStatus = GOOD;
-+	karg.Status.bResponseLength[0] = 0;
-+	karg.Status.bResponseLength[1] = 0;
-+	karg.Status.uDataBytes = request_data_sz;
-+
-+	/* process the completed Reply Message Frame */
-+	if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) {
-+
-+		pScsiReply = (pSCSIIOReply_t ) ioc->ioctl->ReplyFrame;
-+		karg.Status.bStatus = pScsiReply->SCSIStatus;
-+		karg.Status.uDataBytes = min(le32_to_cpu(pScsiReply->TransferCount),
-+		    request_data_sz);
-+		ioc_stat = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK;
-+
-+		if (pScsiReply->SCSIState ==
-+		    MPI_SCSI_STATE_AUTOSENSE_VALID) {
-+			karg.Status.bConnectionStatus =
-+			    CSMI_SAS_SSP_SENSE_DATA_PRESENT;
-+			karg.Status.bResponseLength[0] =
-+				(u8)le32_to_cpu(pScsiReply->SenseCount) & 0xFF;
-+			memcpy(karg.Status.bResponse,
-+			    ioc->ioctl->sense, le32_to_cpu(pScsiReply->SenseCount));
-+		} else if(pScsiReply->SCSIState ==
-+		    MPI_SCSI_STATE_RESPONSE_INFO_VALID) {
-+			karg.Status.bDataPresent =
-+			    CSMI_SAS_SSP_RESPONSE_DATA_PRESENT;
-+			karg.Status.bResponseLength[0] =
-+				sizeof(pScsiReply->ResponseInfo);
-+			for (ii=0;ii<sizeof(pScsiReply->ResponseInfo);ii++) {
-+				karg.Status.bResponse[ii] =
-+				((u8*)&pScsiReply->ResponseInfo)[
-+				    (sizeof(pScsiReply->ResponseInfo)-1)-ii];
-+			}
-+		} else if ((ioc_stat != MPI_IOCSTATUS_SUCCESS) &&
-+		    (ioc_stat !=  MPI_IOCSTATUS_SCSI_RECOVERED_ERROR) &&
-+		    (ioc_stat != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) {
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			dctlprintk((": SCSI IO : "));
-+			dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X\n",
-+			    pScsiReply->IOCStatus,
-+			    pScsiReply->IOCLogInfo));
-+		}
-+	}
-+
-+	if ((karg.Status.uDataBytes) && (request_data) &&
-+	    (karg.Parameters.uFlags & CSMI_SAS_SSP_READ)) {
-+		if (copy_to_user((char *)uarg->bDataBuffer,
-+		    request_data, karg.Status.uDataBytes)) {
-+			printk(KERN_ERR "%s@%d::%s - "
-+			    "Unable to write data to user %p\n",
-+			    __FILE__, __LINE__,__FUNCTION__,
-+			    (void*)karg.bDataBuffer);
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		}
-+	}
-+
-+cim_ssp_passthru_exit:
-+
-+	ioc->ioctl->status &= ~(  MPT_IOCTL_STATUS_TM_FAILED |
-+	    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+	    MPT_IOCTL_STATUS_RF_VALID);
-+
-+	if (request_data)
-+		pci_free_consistent(ioc->pcidev, request_data_sz,
-+		    (u8 *)request_data, request_data_dma);
-+
-+#ifdef QUIESE_IO
-+	if (quiese_io_flag) {
-+		mptctl_do_raid(ioc,
-+		    MPI_RAID_ACTION_ENABLE_PHYS_IO,
-+		    target, volume_bus, volume_id, NULL);
-+	}
-+#endif
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    offsetof(CSMI_SAS_SSP_PASSTHRU_BUFFER,bDataBuffer))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_ssp_passthru @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS STP Passthru command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_stp_passthru(unsigned long arg)
-+{
-+	CSMI_SAS_STP_PASSTHRU_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_STP_PASSTHRU_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	pSataPassthroughRequest_t  	pSataRequest;
-+	pSataPassthroughReply_t		pSataReply;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t 			*mpi_hdr;
-+	int				iocnum,ii;
-+	u32				data_sz;
-+	u64				SASAddress64;
-+	sas_device_info_t		*sasDevice=NULL;
-+	u16				req_idx;
-+	char				*psge;
-+	int				flagsLength;
-+	void *				request_data;
-+	dma_addr_t			request_data_dma;
-+	u32				request_data_sz;
-+	u8				found;
-+	u8				bus;
-+	u8				target;
-+	u8 				volume_id;
-+	u8				volume_bus;
-+#ifdef QUIESE_IO
-+	u8				quiese_io_flag=0;
-+	u8				phys_disk_num=0;
-+#endif
-+	int				wait_timeout;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	request_data=NULL;
-+	request_data_sz = karg.Parameters.uDataLength;
-+	volume_id=0;
-+	volume_bus=0;
-+	bus=0;
-+	target=0;
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Default to success.
-+	 */
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	/* Neither a phy nor a port has been selected.
-+	 */
-+	if ((karg.Parameters.bPhyIdentifier == CSMI_SAS_USE_PORT_IDENTIFIER) &&
-+		(karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT)) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_SELECT_PHY_OR_PORT;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - incorrect bPhyIdentifier and bPortIdentifier!\n",
-+		    __FILE__,__FUNCTION__, __LINE__));
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+	/* A phy has been selected. Verify that it's valid.
-+	 */
-+	if (karg.Parameters.bPortIdentifier == CSMI_SAS_IGNORE_PORT) {
-+
-+		/* Is the phy in range? */
-+		if (karg.Parameters.bPhyIdentifier >= ioc->numPhys) {
-+			karg.IoctlHeader.ReturnCode =
-+			    CSMI_SAS_PHY_DOES_NOT_EXIST;
-+			goto cim_stp_passthru_exit;
-+		}
-+	}
-+
-+	/* some checks of the incoming frame
-+	 */
-+	if (request_data_sz > 0xFFFF) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - uDataLength > 0xFFFF!\n",
-+		    __FILE__, __FUNCTION__, __LINE__));
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+	data_sz = sizeof(CSMI_SAS_STP_PASSTHRU_BUFFER) -
-+	    sizeof(IOCTL_HEADER) - sizeof(u8*) +
-+	    request_data_sz;
-+
-+	if ( data_sz > karg.IoctlHeader.Length ) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - expected datalen incorrect!\n",
-+		    __FILE__, __FUNCTION__,__LINE__));
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+	/* we will use SAS address to resolve the scsi adddressing
-+	 */
-+	memcpy(&SASAddress64,karg.Parameters.bDestinationSASAddress,
-+	    sizeof(u64));
-+	SASAddress64 = reverse_byte_order64(&SASAddress64);
-+
-+	/* Search the list for the matching SAS address.
-+	 */
-+	found = FALSE;
-+	list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+
-+		/* Find the matching device.
-+		 */
-+		if (sasDevice->SASAddress != SASAddress64)
-+			continue;
-+
-+		found = TRUE;
-+		bus = sasDevice->Bus;
-+		target = sasDevice->TargetId;;
-+		break;
-+	}
-+
-+	/* Invalid SAS address
-+	 */
-+	if (found == FALSE) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - couldn't find associated SASAddress!\n",
-+		    __FILE__, __FUNCTION__, __LINE__));
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+	/* check that this is an STP or SATA target device
-+	 */
-+	if ( !(sasDevice->DeviceInfo & MPI_SAS_DEVICE_INFO_STP_TARGET ) &&
-+	     !(sasDevice->DeviceInfo & MPI_SAS_DEVICE_INFO_SATA_DEVICE )) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+#ifdef QUIESE_IO
-+	/* see if this is for raid phy disk */
-+	if (ioc->raid_data.isRaid && ioc->raid_data.pIocPg3) {
-+		for (ii = 0; (ii<ioc->raid_data.pIocPg3->NumPhysDisks &&
-+		    quiese_io_flag==0); ii++)
-+			if (target == ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskID) {
-+				phys_disk_num = ioc->raid_data.pIocPg3->PhysDisk[ii].PhysDiskNum;
-+				quiese_io_flag=1;
-+			}
-+	}
-+	/* if RAID Volume, then quiesce io to phys disk*/
-+	if (quiese_io_flag==1) {
-+		if (mptctl_raid_get_volume_id(ioc, phys_disk_num,
-+		    &volume_id, &volume_bus) != 0) {
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_stp_passthru_exit;
-+		}
-+		mptctl_do_raid(ioc,
-+		    MPI_RAID_ACTION_QUIESCE_PHYS_IO,
-+		    phys_disk_num, volume_bus, volume_id, NULL);
-+	}
-+#endif
-+	/* Get a free request frame and save the message context.
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_stp_passthru_exit;
-+        }
-+
-+	mpi_hdr = (MPIHeader_t *) mf;
-+	pSataRequest = (pSataPassthroughRequest_t) mf;
-+	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
-+
-+	memset(pSataRequest,0,sizeof(pSataPassthroughRequest_t));
-+
-+	pSataRequest->TargetID = target;
-+	pSataRequest->Bus = bus;
-+	pSataRequest->Function = MPI_FUNCTION_SATA_PASSTHROUGH;
-+	pSataRequest->PassthroughFlags = cpu_to_le16(karg.Parameters.uFlags);
-+	pSataRequest->ConnectionRate = karg.Parameters.bConnectionRate;
-+	pSataRequest->MsgContext = mpi_hdr->MsgContext;
-+	pSataRequest->DataLength = cpu_to_le32(request_data_sz);
-+	pSataRequest->MsgFlags = 0;
-+	memcpy( pSataRequest->CommandFIS,karg.Parameters.bCommandFIS, 20);
-+
-+	psge = (char *)&pSataRequest->SGL;
-+	if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) {
-+		flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE;
-+	} else if (karg.Parameters.uFlags & CSMI_SAS_STP_READ) {
-+		flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
-+	}else {
-+		flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT |
-+				MPI_SGE_FLAGS_DIRECTION |
-+				mpt_addr_size() )
-+				<< MPI_SGE_FLAGS_SHIFT;
-+	}
-+
-+	flagsLength |= request_data_sz;
-+	if (request_data_sz > 0) {
-+		request_data = pci_alloc_consistent(
-+		    ioc->pcidev, request_data_sz, &request_data_dma);
-+
-+		if (request_data == NULL) {
-+			dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			mpt_free_msg_frame(ioc, mf);
-+			goto cim_stp_passthru_exit;
-+		}
-+
-+		mpt_add_sge(psge, flagsLength, request_data_dma);
-+		if (karg.Parameters.uFlags & CSMI_SAS_STP_WRITE) {
-+			if (copy_from_user(request_data,
-+			    karg.bDataBuffer,
-+			    request_data_sz)) {
-+				printk(KERN_ERR
-+				    "%s::%s() @%d - Unable to read user data "
-+				    "struct @ %p\n",
-+				    __FILE__, __FUNCTION__, __LINE__,
-+				    (void*)karg.bDataBuffer);
-+				karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+				mpt_free_msg_frame(ioc, mf);
-+				goto cim_stp_passthru_exit;
-+			}
-+		}
-+	} else {
-+		mpt_add_sge(psge, flagsLength, (dma_addr_t) -1);
-+	}
-+
-+	/* The request is complete. Set the timer parameters
-+	 * and issue the request.
-+	 */
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout);
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*wait_timeout);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now we need to reset the board */
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+	memset(&karg.Status,0,sizeof(CSMI_SAS_STP_PASSTHRU_STATUS));
-+
-+	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0) {
-+		dctlprintk((": STP Passthru: oh no, there is no reply!!"));
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_stp_passthru_exit;
-+	}
-+
-+	/* process the completed Reply Message Frame */
-+	pSataReply = (pSataPassthroughReply_t ) ioc->ioctl->ReplyFrame;
-+
-+	if ((le16_to_cpu(pSataReply->IOCStatus) != MPI_IOCSTATUS_SUCCESS) &&
-+	    (le16_to_cpu(pSataReply->IOCStatus) != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN )) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		dctlprintk((": STP Passthru: "));
-+		dctlprintk(("IOCStatus=0x%X IOCLogInfo=0x%X SASStatus=0x%X\n",
-+		    le16_to_cpu(pSataReply->IOCStatus),
-+		    le32_to_cpu(pSataReply->IOCLogInfo),
-+		    pSataReply->SASStatus));
-+	}
-+
-+	karg.Status.bConnectionStatus =
-+	    map_sas_status_to_csmi(pSataReply->SASStatus);
-+
-+	memcpy(karg.Status.bStatusFIS,pSataReply->StatusFIS, 20);
-+
-+	/*
-+	 * for now, just zero out uSCR array,
-+	 * then copy the one dword returned
-+	 * in the reply frame into uSCR[0]
-+	 */
-+	memset( karg.Status.uSCR, 0, 64);
-+	karg.Status.uSCR[0] = le32_to_cpu(pSataReply->StatusControlRegisters);
-+
-+	if((le32_to_cpu(pSataReply->TransferCount)) && (request_data) &&
-+	    (karg.Parameters.uFlags & CSMI_SAS_STP_READ)) {
-+		karg.Status.uDataBytes =
-+		    min(le32_to_cpu(pSataReply->TransferCount),request_data_sz);
-+		if (copy_to_user((char *)uarg->bDataBuffer,
-+		    request_data, karg.Status.uDataBytes)) {
-+			printk(KERN_ERR "%s::%s() @%d - "
-+			    "Unable to write data to user %p\n",
-+			    __FILE__, __FUNCTION__, __LINE__,
-+			    (void*)karg.bDataBuffer);
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		}
-+	}
-+
-+cim_stp_passthru_exit:
-+
-+	ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED |
-+	    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+	    MPT_IOCTL_STATUS_RF_VALID );
-+
-+	if (request_data)
-+		pci_free_consistent(ioc->pcidev, request_data_sz,
-+		    (u8 *)request_data, request_data_dma);
-+
-+#ifdef QUIESE_IO
-+	if (quiese_io_flag)
-+		mptctl_do_raid(ioc,
-+		    MPI_RAID_ACTION_ENABLE_PHYS_IO,
-+		    phys_disk_num, volume_bus, volume_id, NULL);
-+#endif
-+
-+	/* Copy th data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+	    offsetof(CSMI_SAS_STP_PASSTHRU_BUFFER,bDataBuffer))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_ssp_passthru @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Firmware Download command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_firmware_download(unsigned long arg)
-+{
-+	CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum;
-+	pMpiFwHeader_t			pFwHeader=NULL;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg,
-+		sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_firmware_download struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* Default to success.*/
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+	karg.Information.usStatus = CSMI_SAS_FWD_SUCCESS;
-+	karg.Information.usSeverity = CSMI_SAS_FWD_INFORMATION;
-+
-+	/* some checks of the incoming frame */
-+	if ((karg.Information.uBufferLength +
-+	    sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD)) >
-+	    karg.IoctlHeader.Length) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		karg.Information.usStatus = CSMI_SAS_FWD_FAILED;
-+		goto cim_firmware_download_exit;
-+	}
-+
-+	if ( karg.Information.uDownloadFlags &
-+	    (CSMI_SAS_FWD_SOFT_RESET | CSMI_SAS_FWD_VALIDATE)) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		karg.Information.usStatus = CSMI_SAS_FWD_REJECT;
-+		karg.Information.usSeverity = CSMI_SAS_FWD_ERROR;
-+		goto cim_firmware_download_exit;
-+	}
-+
-+	/* now we need to alloc memory so we can pull in the
-+	 * fw image attached to end of incomming packet.
-+	 */
-+	pFwHeader = kmalloc(karg.Information.uBufferLength, GFP_KERNEL);
-+	if(pFwHeader==NULL){
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		karg.Information.usStatus = CSMI_SAS_FWD_REJECT;
-+		karg.Information.usSeverity = CSMI_SAS_FWD_ERROR;
-+		goto cim_firmware_download_exit;
-+	}
-+
-+	if (copy_from_user(pFwHeader, uarg->bDataBuffer,
-+		karg.Information.uBufferLength)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in pFwHeader @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if ( !((pFwHeader->Signature0 == MPI_FW_HEADER_SIGNATURE_0) &&
-+	    (pFwHeader->Signature1 == MPI_FW_HEADER_SIGNATURE_1) &&
-+	    (pFwHeader->Signature2 == MPI_FW_HEADER_SIGNATURE_2))) {
-+		// the signature check failed
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		karg.Information.usStatus = CSMI_SAS_FWD_REJECT;
-+		karg.Information.usSeverity = CSMI_SAS_FWD_ERROR;
-+		goto cim_firmware_download_exit;
-+	}
-+
-+	if ( mptctl_do_fw_download(karg.IoctlHeader.IOControllerNumber,
-+	    uarg->bDataBuffer, karg.Information.uBufferLength)
-+	    != 0) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		karg.Information.usStatus = CSMI_SAS_FWD_FAILED;
-+		karg.Information.usSeverity = CSMI_SAS_FWD_FATAL;
-+		goto cim_firmware_download_exit;
-+	}
-+
-+	if((karg.Information.uDownloadFlags & CSMI_SAS_FWD_SOFT_RESET) ||
-+	    (karg.Information.uDownloadFlags & CSMI_SAS_FWD_HARD_RESET)) {
-+		if (mpt_HardResetHandler(ioc, CAN_SLEEP) != 0) {
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			karg.Information.usStatus = CSMI_SAS_FWD_FAILED;
-+			karg.Information.usSeverity = CSMI_SAS_FWD_FATAL;
-+		}
-+	}
-+
-+cim_firmware_download_exit:
-+
-+	if(pFwHeader)
-+		kfree(pFwHeader);
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+				sizeof(CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_firmware_download @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Get RAID Info command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_raid_info(unsigned long arg)
-+{
-+	CSMI_SAS_RAID_INFO_BUFFER __user *uarg =  (void __user *) arg;
-+	CSMI_SAS_RAID_INFO_BUFFER	 karg;
-+	MPT_ADAPTER		*ioc = NULL;
-+	int				iocnum;
-+    u32             raidFlags;
-+	u8				maxRaidTypes;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_RAID_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_info struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+	if( !mpt_findImVolumes(ioc)) {
-+		if ( ioc->raid_data.pIocPg2 ) {
-+			karg.Information.uNumRaidSets = ioc->raid_data.pIocPg2->NumActiveVolumes;
-+            // uMaxDrivesPerSet hard coded until value is available through RAID config page
-+			karg.Information.uMaxDrivesPerSet = 8;
-+            karg.Information.uMaxRaidSets = ioc->raid_data.pIocPg2->MaxVolumes;
-+            // For bMaxRaidSets, count bits set in bits 0-6 of CapabilitiesFlags
-+            raidFlags = ioc->raid_data.pIocPg2->CapabilitiesFlags & 0x0000007F;
-+            for( maxRaidTypes=0; raidFlags; maxRaidTypes++ )
-+            {
-+                raidFlags &= raidFlags - 1;
-+            }
-+            karg.Information.bMaxRaidTypes = maxRaidTypes;
-+            // ulMinRaidSetBlocks hard coded to 1MB until available from config page
-+            karg.Information.ulMinRaidSetBlocks = 2048;
-+            karg.Information.ulMaxRaidSetBlocks = 
-+                (ioc->raid_data.pIocPg2->CapabilitiesFlags & 
-+                 MPI_IOCPAGE2_CAP_FLAGS_RAID_64_BIT_ADDRESSING)
-+                ? 0xffffffffffffffffULL : 0x00000000ffffffffULL;
-+            karg.Information.uMaxPhysicalDrives = ioc->raid_data.pIocPg2->MaxPhysDisks;
-+            karg.Information.uMaxExtents = 1;
-+            karg.Information.uMaxModules = 0;
-+            karg.Information.uMaxTransformationMemory = 0;
-+            karg.Information.uChangeCount = ioc->csmi_change_count;
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+		}
-+	}
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+				sizeof(CSMI_SAS_RAID_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_get_raid_info @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*	mptscsih_do_raid - Format and Issue a RAID volume request message.
-+ *	@ioc: Pointer to MPT_ADAPTER structure
-+ *	@action: What do be done.
-+ *	@PhysDiskNum: Logical target id.
-+ *	@VolumeBus: Target locations bus.
-+ *	@VolumeId: Volume id
-+ *
-+ *	Returns: < 0 on a fatal error
-+ *		0 on success
-+ *
-+ *	Remark: Wait to return until reply processed by the ISR.
-+ */
-+static int
-+mptctl_do_raid(MPT_ADAPTER *ioc, u8 action, u8 PhysDiskNum, u8 VolumeBus, u8 VolumeId, pMpiRaidActionReply_t reply)
-+{
-+	MpiRaidActionRequest_t	*pReq;
-+	MpiRaidActionReply_t	*pReply;
-+	MPT_FRAME_HDR		*mf;
-+	int ii;
-+
-+	/* Get and Populate a free Frame
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		return -EAGAIN;
-+	}
-+	pReq = (MpiRaidActionRequest_t *)mf;
-+	pReq->Action = action;
-+	pReq->Reserved1 = 0;
-+	pReq->ChainOffset = 0;
-+	pReq->Function = MPI_FUNCTION_RAID_ACTION;
-+	pReq->VolumeID = VolumeId;
-+	pReq->VolumeBus = VolumeBus;
-+	pReq->PhysDiskNum = PhysDiskNum;
-+	pReq->MsgFlags = 0;
-+	pReq->Reserved2 = 0;
-+	pReq->ActionDataWord = 0; /* Reserved for this action */
-+	//pReq->ActionDataSGE = 0;
-+
-+	mpt_add_sge((char *)&pReq->ActionDataSGE,
-+		MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
-+
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now we need to reset the board */
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		return -ENODATA;
-+	}
-+
-+	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) &&
-+	    (reply != NULL)){
-+		pReply = (MpiRaidActionReply_t *)&(ioc->ioctl->ReplyFrame);
-+		memcpy(reply, pReply,
-+			min(ioc->reply_sz,
-+			4*pReply->MsgLength));
-+	}
-+
-+	return 0;
-+}
-+
-+#ifdef QUIESE_IO
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*	mptctl_raid_get_volume_id - figures out which Volume a PhysDisk belongs to.
-+ *	@ioc: Pointer to MPT_ADAPTER structure
-+ *	@PhysDiskNum: an unique number assigned by IOC to identify a specific IR phy disk
-+ *
-+ *	Returns: < 0 on a fatal error
-+ *		0 on success
-+ *
-+ * 	Following parameters are valid when successful return
-+ *	@VolumeID - target device identification number of the volume
-+ *	@VolumeBus - the SCSI bus number of the volume
-+ *
-+ */
-+static int
-+mptctl_raid_get_volume_id(MPT_ADAPTER *ioc, u8 PhysDiskNum, u8 *VolumeID, u8 *VolumeBus)
-+{
-+	CONFIGPARMS		cfg;
-+	ConfigPageHeader_t	header;
-+	dma_addr_t		volume0_dma;
-+	int			i,j;
-+	int			rc=0;
-+	int			volumepage0sz = 0;
-+	pRaidVolumePage0_t	pVolume0 = NULL;
-+
-+	/*
-+	 * get RAID Volume Page 0
-+	 */
-+	header.PageVersion = 0;
-+	header.PageLength = 0;
-+	header.PageNumber = 0;
-+	header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
-+	cfg.cfghdr.hdr = &header;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		rc = -1;
-+		goto mptctl_raid_get_volume_id_exit;
-+	}
-+
-+	if (header.PageLength == 0) {
-+		rc = -1;
-+		goto mptctl_raid_get_volume_id_exit;
-+	}
-+
-+	volumepage0sz = header.PageLength * 4;
-+	pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz,
-+	    &volume0_dma);
-+	if (!pVolume0) {
-+		rc = -1;
-+		goto mptctl_raid_get_volume_id_exit;
-+	}
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+	cfg.physAddr = volume0_dma;
-+
-+	for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++){
-+		*VolumeID = ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID;
-+		*VolumeBus = ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus;
-+		cfg.pageAddr = (*VolumeBus << 8) + *VolumeID;
-+		if (mpt_config(ioc, &cfg) != 0){
-+			rc = -1;
-+			goto mptctl_raid_get_volume_id_exit;
-+		}
-+		for (j=0; j<pVolume0->NumPhysDisks; j++){
-+			if (PhysDiskNum == pVolume0->PhysDisk[i].PhysDiskNum)
-+				goto mptctl_raid_get_volume_id_exit;
-+		}
-+	}
-+
-+mptctl_raid_get_volume_id_exit:
-+
-+	if (pVolume0 != NULL)
-+		pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0,
-+		    volume0_dma);
-+
-+	return rc;
-+}
-+#endif
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* mptctl_raid_inq
-+ * @ioc = per host instance
-+ * @opcode = MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH or MPI_FUNCTION_SCSI_IO_REQUEST
-+ * @target = target id
-+ * @inq_vpd = inquiry data, returned
-+ * @inq_vpd_sz = maximum size of inquiry data
-+ *
-+ * Return = 0(sucess), non-zero(failure)
-+ */
-+static int
-+mptctl_raid_inq(MPT_ADAPTER *ioc, u8 opcode, u8 target, u8 inq_vpd_page, u8 * inq_vpd, u32 inq_vpd_sz)
-+{
-+	MPT_FRAME_HDR		*mf = NULL;
-+	MPIHeader_t 		*mpi_hdr;
-+	pSCSIIORequest_t	pScsiRequest;
-+	u16			        req_idx;
-+	char			    *psge;
-+	u8 			        inq_vpd_cdb[6];
-+	u8 			        *request_data=NULL;
-+	dma_addr_t		    request_data_dma;
-+	u32			        request_data_sz;
-+	int		    	    rc=0,ii;
-+
-+	request_data_sz = 0xFFFF; /* max data size */
-+
-+    /* fill-in cdb */
-+    inq_vpd_cdb[0] = 0x12;
-+    if (inq_vpd_page) {
-+        inq_vpd_cdb[1] = 0x01; /* evpd bit */
-+        inq_vpd_cdb[2] = inq_vpd_page;
-+    }
-+    inq_vpd_cdb[3] = (u8)(request_data_sz >> 8);
-+    inq_vpd_cdb[4] = (u8)request_data_sz;
-+
-+	/* Get a free request frame and save the message context.
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		goto mptctl_raid_inq_exit;
-+    }
-+
-+	mpi_hdr = (MPIHeader_t *) mf;
-+	pScsiRequest = (pSCSIIORequest_t) mf;
-+	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
-+
-+	memset(pScsiRequest,0,sizeof(SCSIIORequest_t));
-+	pScsiRequest->Function = opcode;
-+	pScsiRequest->TargetID = target;
-+	pScsiRequest->Bus = 0;
-+	pScsiRequest->CDBLength = 6;
-+	pScsiRequest->DataLength = cpu_to_le16(request_data_sz);
-+	pScsiRequest->MsgContext = mpi_hdr->MsgContext;
-+	memcpy(pScsiRequest->CDB,inq_vpd_cdb,pScsiRequest->CDBLength);
-+	pScsiRequest->Control = cpu_to_le32(MPI_SCSIIO_CONTROL_READ);
-+	pScsiRequest->Control |= cpu_to_le32(MPI_SCSIIO_CONTROL_SIMPLEQ);
-+
-+	/* setup sense
-+	 */
-+	pScsiRequest->SenseBufferLength = MPT_SENSE_BUFFER_SIZE;
-+	pScsiRequest->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma +
-+	    (req_idx * MPT_SENSE_BUFFER_ALLOC));
-+
-+	request_data = pci_alloc_consistent(
-+	    ioc->pcidev, request_data_sz, &request_data_dma);
-+
-+	if (request_data == NULL) {
-+		mpt_free_msg_frame(ioc, mf);
-+		rc=-1;
-+		goto mptctl_raid_inq_exit;
-+	}
-+
-+	memset(request_data,0,request_data_sz);
-+	psge = (char *)&pScsiRequest->SGL;
-+	mpt_add_sge(psge, (MPT_SGE_FLAGS_SSIMPLE_READ | 0xFC) , request_data_dma);
-+
-+	/* The request is complete. Set the timer parameters
-+	 * and issue the request.
-+	 */
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now we need to reset the board */
-+		rc=-1;
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		goto mptctl_raid_inq_exit;
-+	}
-+
-+    /* copy the request_data */
-+    memcpy(inq_vpd,request_data,min(request_data_sz,inq_vpd_sz));
-+
-+mptctl_raid_inq_exit:
-+
-+	if (request_data)
-+		pci_free_consistent(ioc->pcidev, request_data_sz,
-+		    request_data, request_data_dma);
-+
-+    return rc;
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Get RAID Config command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_raid_config(unsigned long arg)
-+{
-+	CSMI_SAS_RAID_CONFIG_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_RAID_CONFIG_BUFFER	 karg,*pKarg=NULL;
-+	CONFIGPARMS		 	cfg;
-+	ConfigPageHeader_t	 	header;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum;
-+	u8				volumeID, VolumeBus, physDiskNum, physDiskNumMax, found;
-+	int			 	volumepage0sz = 0, physdiskpage0sz = 0, ioc_page5_sz = 0;
-+	dma_addr_t			volume0_dma, physdisk0_dma, ioc_page5_dma;
-+	pRaidVolumePage0_t		pVolume0 = NULL;
-+	pRaidPhysDiskPage0_t		pPhysDisk0 = NULL;
-+	pMpiRaidActionReply_t 		pRaidActionReply = NULL;
-+	pIOCPage5_t			pIocPage5 = NULL;
-+	int 				i, idx, csmi_sas_raid_config_buffer_sz;
-+    int                 copy_buffer_sz=0;
-+	sas_device_info_t		*sasDevice;
-+	u32				device_info=0;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_config struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	csmi_sas_raid_config_buffer_sz = karg.IoctlHeader.Length;
-+	pKarg = kmalloc(csmi_sas_raid_config_buffer_sz, GFP_KERNEL);
-+	if(!pKarg){
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to malloc @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__,pKarg);
-+		return -EFAULT;
-+	}
-+
-+	if (copy_from_user(pKarg, uarg, csmi_sas_raid_config_buffer_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_config struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(pKarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(pKarg);
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(pKarg);
-+		return -ENODEV;
-+	}
-+
-+	if (!ioc->raid_data.isRaid) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+    if (pKarg->Configuration.uChangeCount != 0 &&
-+        pKarg->Configuration.uChangeCount != ioc->csmi_change_count ) {
-+        pKarg->IoctlHeader.ReturnCode = 
-+	    	CSMI_SAS_STATUS_INVALID_PARAMETER;
-+        //pKarg->Configuration.uFailureCode = 
-+	    //	CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID;
-+        goto cim_get_raid_config_exit;
-+    }
-+
-+	/* check to see if the input uRaidSetIndex is greater than the number of RAID sets */
-+	if(pKarg->Configuration.uRaidSetIndex >=
-+	    ioc->raid_data.pIocPg2->NumActiveVolumes) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_RAID_SET_OUT_OF_RANGE;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	/*
-+	 * get RAID Volume Page 0
-+	 */
-+	volumeID = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeID;
-+	VolumeBus = ioc->raid_data.pIocPg2->RaidVolume[pKarg->Configuration.uRaidSetIndex].VolumeBus;
-+
-+	header.PageVersion = 0;
-+	header.PageLength = 0;
-+	header.PageNumber = 0;
-+	header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
-+	cfg.cfghdr.hdr = &header;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = (VolumeBus << 8) + volumeID;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	if (header.PageLength == 0) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	volumepage0sz = header.PageLength * 4;
-+	pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz,
-+	    &volume0_dma);
-+	if (!pVolume0) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+	cfg.physAddr = volume0_dma;
-+	if (mpt_config(ioc, &cfg) != 0){
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	pKarg->Configuration.uCapacity =
-+		(le32_to_cpu(pVolume0->MaxLBA)+1)/2048;
-+	pKarg->Configuration.uStripeSize =
-+		le32_to_cpu(pVolume0->StripeSize)/2;
-+
-+	switch(pVolume0->VolumeType) {
-+	case MPI_RAID_VOL_TYPE_IS:
-+		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_0;
-+		break;
-+	case MPI_RAID_VOL_TYPE_IME:
-+		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_10;
-+		break;
-+	case MPI_RAID_VOL_TYPE_IM:
-+		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_1;
-+		break;
-+	default:
-+		pKarg->Configuration.bRaidType = CSMI_SAS_RAID_TYPE_OTHER;
-+		break;
-+	}
-+
-+    switch (pVolume0->VolumeStatus.State) {
-+	case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
-+		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OK;
-+		break;
-+    case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
-+        /* Volume is degraded, check if Resyncing or Inactive */
-+        if (pVolume0->VolumeStatus.State & 
-+            MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) {
-+            pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_REBUILDING;
-+        }
-+        else if (pVolume0->VolumeStatus.State & 
-+                 MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE) {
-+            pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_OFFLINE;
-+        }
-+        else {
-+            pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_DEGRADED;
-+        }
-+		break;
-+	case MPI_RAIDVOL0_STATUS_STATE_FAILED:
-+		pKarg->Configuration.bStatus = CSMI_SAS_RAID_SET_STATUS_FAILED;
-+		break;
-+	}
-+
-+    pKarg->Configuration.bInformation = 0;  /* default */
-+	if(pVolume0->VolumeStatus.Flags &
-+	    MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS ) {
-+
-+		uint64_t 	* ptrUint64;
-+		uint64_t	totalBlocks64, blocksRemaining64;
-+		uint32_t	totalBlocks32, blocksRemaining32;
-+
-+		/* get percentage complete */
-+		pRaidActionReply = kmalloc( sizeof(MPI_RAID_VOL_INDICATOR) +
-+		    offsetof(MSG_RAID_ACTION_REPLY,ActionData),
-+		    GFP_KERNEL);
-+
-+		if(pRaidActionReply == NULL){
-+			printk(KERN_ERR "%s@%d::%s() - "
-+			    "Unable to malloc @ %p\n",
-+			    __FILE__, __LINE__, __FUNCTION__,pKarg);
-+			goto cim_get_raid_config_exit;
-+		}
-+
-+		mptctl_do_raid(ioc,
-+		    MPI_RAID_ACTION_INDICATOR_STRUCT,
-+		    0, VolumeBus, volumeID, pRaidActionReply);
-+
-+		ptrUint64       = (uint64_t *)&pRaidActionReply->ActionData;
-+		totalBlocks64     = *ptrUint64;
-+		ptrUint64++;
-+		blocksRemaining64 = *ptrUint64;
-+		while(totalBlocks64 > 0xFFFFFFFFUL){
-+			totalBlocks64 = totalBlocks64 >> 1;
-+			blocksRemaining64 = blocksRemaining64 >> 1;
-+		}
-+		totalBlocks32 = (uint32_t)totalBlocks64;
-+		blocksRemaining32 = (uint32_t)blocksRemaining64;
-+
-+		if(totalBlocks32)
-+			pKarg->Configuration.bInformation =
-+			    (totalBlocks32 - blocksRemaining32) /
-+			    (totalBlocks32 / 100);
-+
-+		kfree(pRaidActionReply);
-+	}
-+
-+    /* fill-in more information depending on data type */
-+    if (pKarg->Configuration.bDataType == CSMI_SAS_RAID_DATA_ADDITIONAL_DATA) {
-+        pKarg->Configuration.Data->bLabel[0] = '\0';
-+        pKarg->Configuration.Data->bRaidSetLun[1] = 0;
-+        pKarg->Configuration.Data->bWriteProtection = 
-+            CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN;
-+        pKarg->Configuration.Data->bCacheSetting = 
-+            CSMI_SAS_RAID_SET_CACHE_UNKNOWN;
-+        pKarg->Configuration.Data->bCacheRatio = 0;
-+        pKarg->Configuration.Data->usBlockSize = 512;
-+        pKarg->Configuration.Data->ulRaidSetExtentOffset = 0;
-+        pKarg->Configuration.Data->ulRaidSetBlocks = le32_to_cpu(pVolume0->MaxLBA);
-+        if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS ||
-+            pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME ) {
-+            pKarg->Configuration.Data->uStripeSizeInBlocks = 
-+                le32_to_cpu(pVolume0->StripeSize);
-+        }
-+        else {
-+            pKarg->Configuration.Data->uStripeSizeInBlocks = 0;
-+        }
-+        pKarg->Configuration.Data->uSectorsPerTrack = 128;
-+        for (i=0; i<16; i++) {
-+            // unsupported
-+            pKarg->Configuration.Data->bApplicationScratchPad[i] = 0xFF;
-+        }
-+    }
-+    else if( pKarg->Configuration.bDataType == CSMI_SAS_RAID_DATA_DEVICE_ID ) {
-+        /* Send inquiry to get VPD Page 0x83 */
-+        u8 * vpd_page=NULL;
-+        u32 vpd_page_sz;
-+        vpd_page_sz = pKarg->IoctlHeader.Length - sizeof(CSMI_SAS_RAID_CONFIG);
-+		vpd_page = kmalloc(vpd_page_sz, GFP_KERNEL);
-+        if (mptctl_raid_inq(ioc, MPI_FUNCTION_SCSI_IO_REQUEST, volumeID, 0x83, vpd_page, vpd_page_sz) != 0) {
-+            pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			kfree(vpd_page);
-+            goto cim_get_raid_config_exit;
-+        }
-+        memset(&pKarg->Configuration.DeviceId->bDeviceIdentificationVPDPage,
-+               0,vpd_page_sz);
-+        memcpy(&pKarg->Configuration.DeviceId->bDeviceIdentificationVPDPage, 
-+               vpd_page,vpd_page_sz);
-+		kfree(vpd_page);
-+    }
-+
-+    if (pKarg->Configuration.bDataType != CSMI_SAS_RAID_DATA_DRIVES) {
-+        pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+        goto cim_get_raid_config_exit;
-+    }
-+
-+    /* suppress drive information */
-+    if (pKarg->Configuration.bDriveCount == 
-+        CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) {
-+            pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+            goto cim_get_raid_config_exit;
-+    }
-+
-+	/* get hotspare info, used later in this function */
-+	if (pVolume0->VolumeSettings.HotSparePool) {
-+		/* Read and save IOC Page 5
-+		 */
-+		header.PageVersion = 0;
-+		header.PageLength = 0;
-+		header.PageNumber = 5;
-+		header.PageType = MPI_CONFIG_PAGETYPE_IOC;
-+		cfg.cfghdr.hdr = &header;
-+		cfg.physAddr = -1;
-+		cfg.pageAddr = 0;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+		cfg.dir = 0;
-+		cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+		if ((mpt_config(ioc, &cfg)==0) && (header.PageLength)) {
-+			ioc_page5_sz = header.PageLength * 4;
-+			pIocPage5 = pci_alloc_consistent(ioc->pcidev,
-+			    ioc_page5_sz,
-+			    &ioc_page5_dma);
-+			memset(pIocPage5,0,ioc_page5_sz);
-+			if (ioc_page5_dma) {
-+				cfg.physAddr = ioc_page5_dma;
-+				cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+				mpt_config(ioc, &cfg);
-+			}
-+		}
-+	}
-+
-+	/*
-+	 * get RAID Physical Disk Page 0
-+	 */
-+	header.PageVersion = 0;
-+	header.PageLength = 0;
-+	header.PageNumber = 0;
-+	header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
-+	cfg.cfghdr.hdr = &header;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	if (header.PageLength == 0) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+
-+	physdiskpage0sz = header.PageLength * 4;
-+	pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz,
-+	    &physdisk0_dma);
-+	if (!pPhysDisk0) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_config_exit;
-+	}
-+	cfg.physAddr = physdisk0_dma;
-+
-+	physDiskNumMax = (csmi_sas_raid_config_buffer_sz -
-+	    offsetof(CSMI_SAS_RAID_CONFIG,Drives))
-+	    / sizeof(CSMI_SAS_RAID_DRIVES);
-+
-+	pKarg->Configuration.bDriveCount=0;
-+
-+	for (i=0; i< min(pVolume0->NumPhysDisks, physDiskNumMax); i++) {
-+
-+		physDiskNum = pVolume0->PhysDisk[i].PhysDiskNum;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+		cfg.pageAddr = physDiskNum;
-+		if (mpt_config(ioc, &cfg) != 0){
-+			pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_get_raid_config_exit;
-+		}
-+		memset(&pKarg->Configuration.Drives[i],0,
-+		    sizeof(CSMI_SAS_RAID_DRIVES));
-+		memcpy(pKarg->Configuration.Drives[i].bModel,
-+		    pPhysDisk0->InquiryData.VendorID,
-+		    offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel));
-+		memcpy(pKarg->Configuration.Drives[i].bFirmware,
-+			pPhysDisk0->InquiryData.ProductRevLevel,
-+			sizeof(pPhysDisk0->InquiryData.ProductRevLevel));
-+		if ((pPhysDisk0->ExtDiskIdentifier[0] == 'A') &&
-+		    (pPhysDisk0->ExtDiskIdentifier[1] == 'T') &&
-+		    (pPhysDisk0->ExtDiskIdentifier[2] == 'A')) {
-+			memcpy(&pKarg->Configuration.Drives[i].bSerialNumber,
-+				&pPhysDisk0->ExtDiskIdentifier[4],
-+				4);
-+			memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4],
-+				&pPhysDisk0->DiskIdentifier,
-+				sizeof(pPhysDisk0->DiskIdentifier));
-+		} else {
-+			memcpy(pKarg->Configuration.Drives[i].bSerialNumber,
-+				pPhysDisk0->DiskIdentifier,
-+				sizeof(pPhysDisk0->DiskIdentifier));
-+		}
-+
-+		pKarg->Configuration.Drives[i].bDriveUsage =
-+		    (pPhysDisk0->PhysDiskStatus.Flags &
-+		    MPI_PHYSDISK0_STATUS_FLAG_INACTIVE_VOLUME) ?
-+		    CSMI_SAS_DRIVE_CONFIG_NOT_USED :
-+		    CSMI_SAS_DRIVE_CONFIG_MEMBER;
-+
-+		pKarg->Configuration.Drives[i].bDriveStatus =
-+		    CSMI_SAS_DRIVE_STATUS_OK;
-+        if (pPhysDisk0->PhysDiskStatus.State == 
-+            MPI_PHYSDISK0_STATUS_OFFLINE_REQUESTED) {
-+            pKarg->Configuration.Drives[i].bDriveStatus = 
-+                CSMI_SAS_DRIVE_STATUS_OFFLINE;
-+        }
-+        else if(pPhysDisk0->PhysDiskStatus.State) {
-+			pKarg->Configuration.Drives[i].bDriveStatus =
-+			    CSMI_SAS_DRIVE_STATUS_FAILED;
-+			if(pKarg->Configuration.bStatus ==
-+			    CSMI_SAS_RAID_SET_STATUS_DEGRADED)
-+				pKarg->Configuration.bInformation = i;
-+		}
-+		else if((pVolume0->VolumeStatus.Flags &
-+		    MPI_RAIDVOL0_STATUS_FLAG_RESYNC_IN_PROGRESS) &&
-+		    (pPhysDisk0->PhysDiskStatus.Flags &
-+		    MPI_PHYSDISK0_STATUS_FLAG_OUT_OF_SYNC))
-+			pKarg->Configuration.Drives[i].bDriveStatus =
-+			    CSMI_SAS_DRIVE_STATUS_REBUILDING;
-+		else if(pPhysDisk0->ErrorData.SmartCount)
-+			pKarg->Configuration.Drives[i].bDriveStatus =
-+			CSMI_SAS_DRIVE_STATUS_DEGRADED;
-+
-+		/* Search the list for the matching SAS address. */
-+		found = FALSE;
-+		list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+
-+			/* Found the matching device. */
-+			if ((pPhysDisk0->PhysDiskIOC == sasDevice->Bus) &&
-+				(pPhysDisk0->PhysDiskID ==
-+				 sasDevice->TargetId)) {
-+				u64 SASAddress64;
-+				found = TRUE;
-+
-+				SASAddress64 =
-+				    reverse_byte_order64(&sasDevice->SASAddress);
-+				memcpy(pKarg->Configuration.Drives[i].bSASAddress,
-+				   &SASAddress64,sizeof(u64));
-+				memset(pKarg->Configuration.Drives[i].bSASLun,
-+				    0, sizeof(pKarg->Configuration.Drives[i].bSASLun));
-+				device_info = sasDevice->DeviceInfo;
-+                if (device_info & MPI_SAS_DEVICE_INFO_SATA_DEVICE) {
-+                    pKarg->Configuration.Drives[i].bDriveType = 
-+                        CSMI_SAS_DRIVE_TYPE_SATA;
-+                }
-+                else { /* drive in a volume can only be SAS/SATA */
-+                    pKarg->Configuration.Drives[i].bDriveType = 
-+                        CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS;
-+                }
-+				break;
-+			} else
-+				continue; /* Keep looking. */
-+		}
-+        pKarg->Configuration.Drives[i].usBlockSize = 512;
-+		pKarg->Configuration.Drives[i].uDriveIndex = pPhysDisk0->PhysDiskNum;
-+        if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IM) {
-+            pKarg->Configuration.Drives[i].ulTotalUserBlocks = 
-+                le32_to_cpu(pVolume0->MaxLBA) + 1;
-+        }
-+        else if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IS) {
-+            pKarg->Configuration.Drives[i].ulTotalUserBlocks = 
-+                (le32_to_cpu(pVolume0->MaxLBA) + 1) / (pVolume0->NumPhysDisks);
-+        }
-+        else if (pVolume0->VolumeType == MPI_RAID_VOL_TYPE_IME) {
-+            pKarg->Configuration.Drives[i].ulTotalUserBlocks = 
-+                ((le32_to_cpu(pVolume0->MaxLBA) + 1) / (pVolume0->NumPhysDisks)) * 2;
-+        }
-+        pKarg->Configuration.bDriveCount++;
-+	}
-+
-+	/* adding hot spare info at the end */
-+	if ((pVolume0->VolumeSettings.HotSparePool) && (pIocPage5 != NULL)) {
-+		for (idx = 0, i = pVolume0->NumPhysDisks ;
-+		    idx < pIocPage5->NumHotSpares ; idx++) {
-+			if (i >= physDiskNumMax)
-+				break;
-+			if ((pVolume0->VolumeSettings.HotSparePool &
-+			    pIocPage5->HotSpare[idx].HotSparePool) == 0)
-+				continue;
-+			if(pIocPage5->HotSpare[idx].Flags !=
-+			    MPI_IOC_PAGE_5_HOT_SPARE_ACTIVE)
-+			    continue;
-+			physDiskNum = pIocPage5->HotSpare[idx].PhysDiskNum;
-+			cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+			cfg.pageAddr = physDiskNum;
-+			if (mpt_config(ioc, &cfg) != 0)
-+				continue;
-+			/* Search the list for the matching SAS address. */
-+			found = FALSE;
-+			list_for_each_entry(sasDevice, &ioc->sasDeviceList,
-+			    list) {
-+				/* Found the matching device. */
-+				if ((pPhysDisk0->PhysDiskIOC ==
-+					sasDevice->Bus) &&
-+					(pPhysDisk0->PhysDiskID ==
-+					 sasDevice->TargetId)) {
-+					u64 SASAddress64;
-+
-+					/* sanity checks */
-+
-+					/* don't mix SSP hot spare
-+					 * in SATA volume
-+					 */
-+					if ((sasDevice->DeviceInfo &
-+					    MPI_SAS_DEVICE_INFO_SSP_TARGET) &&
-+					    (device_info &
-+					    MPI_SAS_DEVICE_INFO_SATA_DEVICE))
-+						break;
-+
-+					/* don't mix SATA hot spare
-+					 * in SSP volume
-+					 */
-+					if ((sasDevice->DeviceInfo &
-+					    MPI_SAS_DEVICE_INFO_SATA_DEVICE) &&
-+					    (device_info &
-+					    MPI_SAS_DEVICE_INFO_SSP_TARGET))
-+						break;
-+
-+					/* capacity check for IM volumes*/
-+					if ((pVolume0->VolumeType ==
-+						MPI_RAID_VOL_TYPE_IM) &&
-+					    (le32_to_cpu(pVolume0->MaxLBA) +
-+					     (64*2*1024) /* metadata = 64MB*/ >
-+					    le32_to_cpu(pPhysDisk0->MaxLBA)))
-+						break;
-+
-+					/* capacity check for IME volumes*/
-+					if ((pVolume0->VolumeType ==
-+						MPI_RAID_VOL_TYPE_IME) &&
-+					    (((le32_to_cpu(pVolume0->MaxLBA)/
-+					      pVolume0->NumPhysDisks) * 2) +
-+					     (64*2*1024 ) /*metadata = 64MB*/ >
-+					    le32_to_cpu(pPhysDisk0->MaxLBA)))
-+						break;
-+
-+					found = TRUE;
-+
-+					SASAddress64 =
-+					    reverse_byte_order64(&sasDevice->SASAddress);
-+					memcpy(pKarg->Configuration.Drives[i].bSASAddress,
-+					   &SASAddress64,sizeof(u64));
-+					memset(pKarg->Configuration.Drives[i].bSASLun, 0,
-+					     sizeof(pKarg->Configuration.Drives[i].bSASLun));
-+					break;
-+				} else
-+					continue; /* Keep looking. */
-+			}
-+			if (found==FALSE)
-+				continue;
-+			memset(&pKarg->Configuration.Drives[i],0,
-+			    sizeof(CSMI_SAS_RAID_DRIVES));
-+			memcpy(pKarg->Configuration.Drives[i].bModel,
-+			    pPhysDisk0->InquiryData.VendorID,
-+			    offsetof(RAID_PHYS_DISK0_INQUIRY_DATA,ProductRevLevel));
-+			memcpy(pKarg->Configuration.Drives[i].bFirmware,
-+				pPhysDisk0->InquiryData.ProductRevLevel,
-+				sizeof(pPhysDisk0->InquiryData.ProductRevLevel));
-+			if ((pPhysDisk0->ExtDiskIdentifier[0] == 'A') &&
-+			    (pPhysDisk0->ExtDiskIdentifier[1] == 'T') &&
-+			    (pPhysDisk0->ExtDiskIdentifier[2] == 'A')) {
-+				memcpy(&pKarg->Configuration.Drives[i].bSerialNumber,
-+					&pPhysDisk0->ExtDiskIdentifier[4],
-+					4);
-+				memcpy(&pKarg->Configuration.Drives[i].bSerialNumber[4],
-+					&pPhysDisk0->DiskIdentifier,
-+					sizeof(pPhysDisk0->DiskIdentifier));
-+			} else {
-+				memcpy(pKarg->Configuration.Drives[i].bSerialNumber,
-+					pPhysDisk0->DiskIdentifier,
-+					sizeof(pPhysDisk0->DiskIdentifier));
-+			}
-+			pKarg->Configuration.Drives[i].bDriveStatus =
-+			    CSMI_SAS_DRIVE_STATUS_OK;
-+			if(pPhysDisk0->PhysDiskStatus.State)
-+				pKarg->Configuration.Drives[i].bDriveStatus =
-+				    CSMI_SAS_DRIVE_STATUS_FAILED;
-+			else if(pPhysDisk0->ErrorData.SmartCount)
-+				pKarg->Configuration.Drives[i].bDriveStatus =
-+				    CSMI_SAS_DRIVE_STATUS_DEGRADED;
-+			pKarg->Configuration.Drives[i].bDriveUsage =
-+			    CSMI_SAS_DRIVE_CONFIG_SPARE;
-+			i++;
-+			pKarg->Configuration.bDriveCount++;
-+		}
-+	}
-+
-+    // Only return data on the first 240 drives
-+    if( pKarg->Configuration.bDriveCount > 0xF0 ) {
-+        pKarg->Configuration.bDriveCount = 
-+            CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG;
-+    }
-+
-+	pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+cim_get_raid_config_exit:
-+
-+	if (pVolume0 != NULL)
-+		pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0,
-+		    volume0_dma);
-+
-+	if(pPhysDisk0 != NULL)
-+		pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0,
-+		    physdisk0_dma);
-+
-+	if(pIocPage5 != NULL)
-+		pci_free_consistent(ioc->pcidev, ioc_page5_sz, pIocPage5,
-+		    ioc_page5_dma);
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+
-+    /* find the buffer size to copy depending on how much is filled-in */
-+    switch (pKarg->Configuration.bDataType) {
-+    case CSMI_SAS_RAID_DATA_ADDITIONAL_DATA:
-+        copy_buffer_sz = sizeof(IOCTL_HEADER) +
-+            offsetof(CSMI_SAS_RAID_CONFIG,Data) +
-+            sizeof(CSMI_SAS_RAID_SET_ADDITIONAL_DATA);
-+        break;
-+    case CSMI_SAS_RAID_DATA_DRIVES:
-+        if (pKarg->Configuration.bDriveCount == 
-+            CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED) {
-+            copy_buffer_sz = sizeof(IOCTL_HEADER) +
-+                offsetof(CSMI_SAS_RAID_CONFIG,Drives);
-+        }
-+        else {
-+            copy_buffer_sz = sizeof(IOCTL_HEADER) +
-+                offsetof(CSMI_SAS_RAID_CONFIG,Drives) +
-+                (pKarg->Configuration.bDriveCount * sizeof(CSMI_SAS_RAID_DRIVES));
-+        }
-+        break;
-+    case CSMI_SAS_RAID_DATA_DEVICE_ID:
-+        copy_buffer_sz = sizeof(IOCTL_HEADER) +
-+            offsetof(CSMI_SAS_RAID_CONFIG,DeviceId) +
-+            sizeof(CSMI_SAS_RAID_DEVICE_ID);
-+        break;
-+    }
-+
-+    if (copy_to_user((char *)arg, pKarg, copy_buffer_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		       "Unable to write out csmi_sas_get_raid_config @ %p\n",
-+		   	   __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(pKarg);
-+		return -EFAULT;
-+    }
-+
-+    kfree(pKarg);
-+
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Get RAID Features command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_raid_features(unsigned long arg)
-+{
-+	CSMI_SAS_RAID_FEATURES_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_RAID_FEATURES_BUFFER karg, *pKarg=NULL;
-+	int i, csmi_sas_raid_features_buffer_sz, iocnum;
-+    MPT_ADAPTER			*ioc = NULL;
-+
-+    u8 raidTypes[4] = { CSMI_SAS_RAID_TYPE_0, CSMI_SAS_RAID_TYPE_10,
-+                        CSMI_SAS_RAID_TYPE_1, CSMI_SAS_RAID_TYPE_1E };
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_features struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	csmi_sas_raid_features_buffer_sz = karg.IoctlHeader.Length;
-+	pKarg = kmalloc(csmi_sas_raid_features_buffer_sz, GFP_KERNEL);
-+	if(!pKarg){
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to malloc @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__,pKarg);
-+		return -EFAULT;
-+	}
-+
-+	if (copy_from_user(pKarg, uarg, csmi_sas_raid_features_buffer_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_features struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(pKarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(pKarg);
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(pKarg);
-+		return -ENODEV;
-+	}
-+
-+    if (pKarg->Information.uChangeCount != 0 &&
-+        pKarg->Information.uChangeCount != ioc->csmi_change_count ) {
-+        pKarg->IoctlHeader.ReturnCode = 
-+			CSMI_SAS_STATUS_INVALID_PARAMETER;
-+        //pKarg->Information.uFailureCode = 
-+		//	CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID;
-+        goto cim_get_raid_features_exit;
-+    }
-+
-+    pKarg->Information.uFeatures = CSMI_SAS_RAID_FEATURE_REBUILD;
-+    pKarg->Information.bDefaultTransformPriority = CSMI_SAS_PRIORITY_UNKNOWN;
-+    pKarg->Information.bTransformPriority = CSMI_SAS_PRIORITY_UNKNOWN;
-+    pKarg->Information.bDefaultRebuildPriority = CSMI_SAS_PRIORITY_UNKNOWN;
-+    pKarg->Information.bRebuildPriority = pKarg->Information.bDefaultRebuildPriority;
-+    pKarg->Information.bDefaultSurfaceScanPriority = CSMI_SAS_PRIORITY_UNKNOWN;
-+    pKarg->Information.bSurfaceScanPriority = CSMI_SAS_PRIORITY_UNKNOWN;
-+    pKarg->Information.uRaidSetTransformationRules = 0;
-+    for (i=0; i<4; i++) {
-+        pKarg->Information.RaidType[i].bRaidType = raidTypes[i];
-+        // Only support 64K stripe size
-+        pKarg->Information.RaidType[i].uSupportedStripeSizeMap = 0x80;
-+    }
-+    pKarg->Information.RaidType[i].bRaidType = CSMI_SAS_RAID_TYPE_END;
-+    pKarg->Information.bCacheRatiosSupported[0] = CSMI_SAS_RAID_CACHE_RATIO_END;
-+
-+cim_get_raid_features_exit:
-+
-+    /*
-+     * Copy the data from kernel memory to user memory
-+     */
-+    if (copy_to_user((char *)arg, pKarg,
-+        sizeof(CSMI_SAS_RAID_FEATURES_BUFFER))) {
-+        printk(KERN_ERR "%s@%d::%s() - "
-+               "Unable to write out csmi_sas_get_raid_features @ %p\n",
-+               __FILE__, __LINE__, __FUNCTION__, uarg);
-+        kfree(pKarg);
-+        return -EFAULT;
-+    }
-+
-+    kfree(pKarg);
-+
-+    return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Get RAID Control command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_raid_control(unsigned long arg)
-+{
-+	CSMI_SAS_RAID_CONTROL_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_RAID_CONTROL_BUFFER karg, *pKarg=NULL;
-+	int csmi_sas_raid_control_buffer_sz, iocnum;
-+    MPT_ADAPTER			*ioc = NULL;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(IOCTL_HEADER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_control struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	csmi_sas_raid_control_buffer_sz = karg.IoctlHeader.Length;
-+	pKarg = kmalloc(csmi_sas_raid_control_buffer_sz, GFP_KERNEL);
-+	if(!pKarg){
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to malloc @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__,pKarg);
-+		return -EFAULT;
-+	}
-+
-+	if (copy_from_user(pKarg, uarg, csmi_sas_raid_control_buffer_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_get_raid_features struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(pKarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(pKarg->IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(pKarg);
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(pKarg);
-+		return -ENODEV;
-+	}
-+
-+	if (!ioc->raid_data.isRaid) {
-+		pKarg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_get_raid_control_exit;
-+	}
-+
-+    if (pKarg->Information.uChangeCount != 0 &&
-+        pKarg->Information.uChangeCount != ioc->csmi_change_count ) {
-+        pKarg->IoctlHeader.ReturnCode = 
-+			CSMI_SAS_STATUS_INVALID_PARAMETER;
-+        pKarg->Information.uFailureCode = 
-+			CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID;
-+        goto cim_get_raid_control_exit;
-+    }
-+
-+    if (pKarg->Information.bTransformPriority != CSMI_SAS_PRIORITY_UNCHANGED) {
-+        pKarg->IoctlHeader.ReturnCode = 
-+			CSMI_SAS_STATUS_INVALID_PARAMETER;
-+        //pKarg->Information.uFailureCode = 
-+		//	CSMI_SAS_FAIL_CODE_EXPANSION_PRIORITY_INVALID;
-+    }
-+    if (pKarg->Information.bRebuildPriority != CSMI_SAS_PRIORITY_AUTO &&
-+        pKarg->Information.bRebuildPriority != CSMI_SAS_PRIORITY_UNCHANGED) {
-+        pKarg->IoctlHeader.ReturnCode = 
-+			CSMI_SAS_STATUS_INVALID_PARAMETER;
-+        pKarg->Information.uFailureCode = 
-+			CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID;
-+    }
-+    if (pKarg->Information.bCacheRatioFlag == CSMI_SAS_RAID_CACHE_RATIO_ENABLE) {
-+        pKarg->IoctlHeader.ReturnCode = 
-+			CSMI_SAS_STATUS_INVALID_PARAMETER;
-+        pKarg->Information.uFailureCode = 
-+			CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID;
-+    }
-+    pKarg->Information.bFailureDescription[0] = '\0';
-+
-+cim_get_raid_control_exit:
-+
-+    /*
-+     * Copy the data from kernel memory to user memory
-+     */
-+    if (copy_to_user((char *)arg, pKarg,
-+        sizeof(CSMI_SAS_RAID_CONTROL_BUFFER))) {
-+        printk(KERN_ERR "%s@%d::%s() - "
-+               "Unable to write out csmi_sas_get_raid_control @ %p\n",
-+               __FILE__, __LINE__, __FUNCTION__, uarg);
-+        kfree(pKarg);
-+        return -EFAULT;
-+    }
-+
-+    kfree(pKarg);
-+
-+    return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Task Managment Config command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_task_managment(unsigned long arg)
-+{
-+	CSMI_SAS_SSP_TASK_IU_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_SSP_TASK_IU_BUFFER	 karg;
-+	pSCSITaskMgmt_t			pScsiTm;
-+	pSCSITaskMgmtReply_t		pScsiTmReply;
-+	MPT_ADAPTER			*ioc = NULL;
-+	MPT_SCSI_HOST			*hd;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t			*mpi_hdr;
-+	int				iocnum;
-+	u8				taskType;
-+	u8				path;
-+	u8				target;
-+	u8				lun;
-+	u8				queueTag;
-+	u32				msgContext = 0;
-+	int				retval;
-+	int				i, ii;
-+	u8 				found_qtag;
-+	int				wait_timeout;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_task_managment struct @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	/* try to catch an error
-+	 */
-+	if ((karg.Parameters.uFlags & CSMI_SAS_TASK_IU) &&
-+	    (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE)) {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		goto cim_get_task_managment_exit;
-+	}
-+
-+	if (karg.Parameters.uFlags & CSMI_SAS_TASK_IU) {
-+		switch (karg.Parameters.bTaskManagementFunction) {
-+
-+		case CSMI_SAS_SSP_ABORT_TASK:
-+			taskType = MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK;
-+			break;
-+		case CSMI_SAS_SSP_ABORT_TASK_SET:
-+			taskType = MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET;
-+			break;
-+		case CSMI_SAS_SSP_CLEAR_TASK_SET:
-+			taskType = MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET;
-+			break;
-+		case CSMI_SAS_SSP_LOGICAL_UNIT_RESET:
-+			taskType = MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET;
-+			break;
-+		case CSMI_SAS_SSP_CLEAR_ACA:
-+		case CSMI_SAS_SSP_QUERY_TASK:
-+		default:
-+			karg.IoctlHeader.ReturnCode =
-+			    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+			goto cim_get_task_managment_exit;
-+		}
-+	}else if (karg.Parameters.uFlags & CSMI_SAS_HARD_RESET_SEQUENCE) {
-+		/* set the code up to do a hard reset
-+		 */
-+		taskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
-+	}else {
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		goto cim_get_task_managment_exit;
-+	}
-+
-+	path = karg.Parameters.bPathId;
-+	target = karg.Parameters.bTargetId;
-+	lun = karg.Parameters.bLun;
-+	queueTag = (u8)karg.Parameters.uQueueTag & 0xFF;
-+
-+	if ((ioc->sh == NULL) || (ioc->sh->hostdata == NULL)) {
-+		karg.IoctlHeader.ReturnCode =
-+		    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		goto cim_get_task_managment_exit;
-+	}
-+	else
-+		hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
-+
-+	switch ( karg.Parameters.uInformation ) {
-+		case CSMI_SAS_SSP_TEST:
-+			dsasprintk(("TM request for test purposes\n"));
-+			break;
-+		case CSMI_SAS_SSP_EXCEEDED:
-+			dsasprintk(("TM request due to timeout\n"));
-+			break;
-+		case CSMI_SAS_SSP_DEMAND:
-+			dsasprintk(("TM request demanded by app\n"));
-+			break;
-+		case CSMI_SAS_SSP_TRIGGER:
-+			dsasprintk(("TM request sent to trigger event\n"));
-+			break;
-+	}
-+
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+
-+	switch (taskType) {
-+
-+	case MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK:
-+	/*
-+	 * look up qtag in the ScsiLookup[] table
-+	 */
-+		for (i=0,found_qtag=0;i<hd->ioc->req_depth;i++) {
-+			if ((hd->ScsiLookup[i]) &&
-+			    (hd->ScsiLookup[i]->tag == queueTag)) {
-+				mf = MPT_INDEX_2_MFPTR(hd->ioc, i);
-+				msgContext =
-+				    mf->u.frame.hwhdr.msgctxu.MsgContext;
-+				found_qtag=1;
-+				break;
-+			}
-+		}
-+
-+		if(!found_qtag) {
-+			karg.IoctlHeader.ReturnCode =
-+			    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+			goto cim_get_task_managment_exit;
-+		}
-+
-+	case MPI_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET:
-+	case MPI_SCSITASKMGMT_TASKTYPE_ABRT_TASK_SET:
-+	case MPI_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET:
-+	/* for now, this should work
-+	 */
-+	case MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET:
-+
-+		/* Single threading ....
-+		 */
-+		if (mptctl_set_tm_flags(hd) != 0) {
-+			karg.IoctlHeader.ReturnCode =
-+			    CSMI_SAS_STATUS_FAILED;
-+			goto cim_get_task_managment_exit;
-+		}
-+
-+		/* Send request
-+		 */
-+		if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+			dctlprintk((": no msg frames!\n"));
-+			mptctl_free_tm_flags(ioc);
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_get_task_managment_exit;
-+		}
-+
-+		mpi_hdr = (MPIHeader_t *) mf;
-+		pScsiTm = (pSCSITaskMgmt_t ) mf;
-+
-+		memset(pScsiTm,0,sizeof(SCSITaskMgmt_t));
-+		pScsiTm->TaskType = taskType;
-+		pScsiTm->Bus = path;
-+		pScsiTm->TargetID = target;
-+		pScsiTm->LUN[1] = lun;
-+		pScsiTm->MsgContext = mpi_hdr->MsgContext;
-+		pScsiTm->TaskMsgContext = msgContext;
-+		pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
-+
-+		ioc->ioctl->wait_done = 0;
-+
-+		DBG_DUMP_TM_REQUEST_FRAME((u32 *)mf);
-+
-+		if ((retval = mpt_send_handshake_request(mptctl_id, ioc->ioctl->ioc,
-+		     sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP)) != 0) {
-+			dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!"
-+				" (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd,
-+				hd->ioc, mf));
-+			goto cim_get_task_managment_exit;
-+		}
-+
-+		/* Now wait for the command to complete */
-+		wait_timeout=max_t(int,MPT_IOCTL_DEFAULT_TIMEOUT,karg.IoctlHeader.Timeout);
-+		ii = wait_event_timeout(mptctl_wait,
-+		     ioc->ioctl->wait_done == 1,
-+		     HZ*wait_timeout);
-+
-+		if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+		/* Now we need to reset the board */
-+			mptctl_free_tm_flags(ioc);
-+			mpt_free_msg_frame(hd->ioc, mf);
-+			mptctl_timeout_expired(ioc->ioctl);
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_get_task_managment_exit;
-+		}
-+
-+		if (ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) {
-+			pScsiTmReply =
-+			    (pSCSITaskMgmtReply_t ) ioc->ioctl->ReplyFrame;
-+
-+			memset(&karg.Status,0,
-+			    sizeof(CSMI_SAS_SSP_PASSTHRU_STATUS));
-+
-+			if(le16_to_cpu(pScsiTmReply->IOCStatus) == MPI_IOCSTATUS_SUCCESS) {
-+				karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+				karg.Status.bSSPStatus = CSMI_SAS_SSP_STATUS_COMPLETED;
-+			}else if(le16_to_cpu(pScsiTmReply->IOCStatus) ==
-+			    MPI_IOCSTATUS_INSUFFICIENT_RESOURCES) {
-+				karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+				karg.Status.bSSPStatus = CSMI_SAS_SSP_STATUS_RETRY;
-+			}else {
-+				karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+				karg.Status.bSSPStatus = CSMI_SAS_SSP_STATUS_FATAL_ERROR;
-+			}
-+		}else{
-+			karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		}
-+
-+		break;
-+
-+	default:
-+		karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		break;
-+	}
-+
-+
-+cim_get_task_managment_exit:
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+				sizeof(CSMI_SAS_SSP_TASK_IU_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+			"Unable to write out csmi_sas_task_managment @ %p\n",
-+				__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+}
-+
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*
-+ *	map_sas_status_to_csmi - Conversion  for Connection Status
-+ *	@mpi_sas_status: Sas status returned by the firmware
-+ *
-+ *	Returns converted connection status
-+ *
-+ */
-+static u8
-+map_sas_status_to_csmi(u8 mpi_sas_status)
-+{
-+	u8  csmi_connect_status;
-+
-+	switch (mpi_sas_status) {
-+
-+	case MPI_SASSTATUS_SUCCESS:
-+		csmi_connect_status = CSMI_SAS_OPEN_ACCEPT;
-+		break;
-+
-+	case MPI_SASSTATUS_UTC_BAD_DEST:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_BAD_DESTINATION;
-+		break;
-+
-+	case MPI_SASSTATUS_UTC_CONNECT_RATE_NOT_SUPPORTED:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED;
-+		break;
-+
-+	case MPI_SASSTATUS_UTC_PROTOCOL_NOT_SUPPORTED:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED;
-+		break;
-+
-+	case MPI_SASSTATUS_UTC_STP_RESOURCES_BUSY:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY;
-+		break;
-+
-+	case MPI_SASSTATUS_UTC_WRONG_DESTINATION:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION;
-+		break;
-+
-+	case MPI_SASSTATUS_SDSF_NAK_RECEIVED:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RETRY;
-+		break;
-+
-+	case MPI_SASSTATUS_SDSF_CONNECTION_FAILED:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED;
-+		break;
-+
-+	case MPI_SASSTATUS_INITIATOR_RESPONSE_TIMEOUT:
-+		csmi_connect_status =  CSMI_SAS_OPEN_REJECT_NO_DESTINATION;
-+		break;
-+
-+	case MPI_SASSTATUS_UNKNOWN_ERROR:
-+	case MPI_SASSTATUS_INVALID_FRAME:
-+	case MPI_SASSTATUS_UTC_BREAK_RECEIVED:
-+	case MPI_SASSTATUS_UTC_PORT_LAYER_REQUEST:
-+	case MPI_SASSTATUS_SHORT_INFORMATION_UNIT:
-+	case MPI_SASSTATUS_LONG_INFORMATION_UNIT:
-+	case MPI_SASSTATUS_XFER_RDY_INCORRECT_WRITE_DATA:
-+	case MPI_SASSTATUS_XFER_RDY_REQUEST_OFFSET_ERROR:
-+	case MPI_SASSTATUS_XFER_RDY_NOT_EXPECTED:
-+	case MPI_SASSTATUS_DATA_INCORRECT_DATA_LENGTH:
-+	case MPI_SASSTATUS_DATA_TOO_MUCH_READ_DATA:
-+	case MPI_SASSTATUS_DATA_OFFSET_ERROR:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP;
-+		break;
-+
-+	default:
-+		csmi_connect_status = CSMI_SAS_OPEN_REJECT_RESERVE_STOP;
-+		break;
-+	}
-+
-+	return csmi_connect_status;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*                      mptctl_csmi_sas_phy_reset
-+ *	Issues a phy link reset or phy hard reset
-+ *
-+ *	@ioc - Pointer to MPT_ADAPTER structure
-+ *	@PhyNum - phy number
-+ *	@opcode - {MPI_SAS_OP_PHY_LINK_RESET,MPI_SAS_OP_PHY_HARD_RESET}
-+ *
-+ *	Returns: 0 for success, non-zero error
-+ */
-+static int
-+mptctl_csmi_sas_phy_reset(MPT_ADAPTER *ioc, u8 PhyNum, u8 opcode)
-+{
-+	SasIoUnitControlRequest_t	*sasIoUnitCntrReq;
-+	SasIoUnitControlReply_t		*sasIoUnitCntrReply;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t			*mpi_hdr;
-+	int 				ii;
-+
-+	if ((opcode != MPI_SAS_OP_PHY_LINK_RESET) &&
-+	    (opcode != MPI_SAS_OP_PHY_HARD_RESET))
-+	    return -1;
-+
-+	/* Get a MF for this command.
-+	 */
-+	if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
-+		dctlprintk((": no msg frames!\n"));
-+		return -1;
-+        }
-+
-+	mpi_hdr = (MPIHeader_t *) mf;
-+	sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf;
-+	memset(sasIoUnitCntrReq,0,sizeof(SasIoUnitControlRequest_t));
-+	sasIoUnitCntrReq->Function = MPI_FUNCTION_SAS_IO_UNIT_CONTROL;
-+	sasIoUnitCntrReq->MsgContext = mpi_hdr->MsgContext;
-+	sasIoUnitCntrReq->Operation = opcode;
-+	sasIoUnitCntrReq->PhyNum = PhyNum;
-+
-+	ioc->ioctl->wait_done = 0;
-+	mpt_put_msg_frame(mptctl_id, ioc, mf);
-+
-+	/* Now wait for the command to complete */
-+	ii = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*MPT_IOCTL_DEFAULT_TIMEOUT /* 10 sec */);
-+
-+	if(ii <=0 && (ioc->ioctl->wait_done != 1 )) {
-+		/* Now we need to reset the board */
-+		mpt_free_msg_frame(ioc, mf);
-+		mptctl_timeout_expired(ioc->ioctl);
-+		return -1;
-+	}
-+
-+	if ((ioc->ioctl->status & MPT_IOCTL_STATUS_RF_VALID) == 0)
-+		return -1;
-+
-+	/* process the completed Reply Message Frame */
-+	sasIoUnitCntrReply = (SasIoUnitControlReply_t *)ioc->ioctl->ReplyFrame;
-+	if (sasIoUnitCntrReply->IOCStatus != MPI_IOCSTATUS_SUCCESS) {
-+		printk("%s: IOCStatus=0x%X IOCLogInfo=0x%X\n",
-+		    __FUNCTION__,
-+		    sasIoUnitCntrReply->IOCStatus,
-+		    sasIoUnitCntrReply->IOCLogInfo);
-+		return -1;
-+	}
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Phy Control command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_phy_control(unsigned long arg)
-+{
-+	CSMI_SAS_PHY_CONTROL_BUFFER __user *uarg = (void __user *) arg;
-+	IOCTL_HEADER			ioctl_header;
-+	PCSMI_SAS_PHY_CONTROL_BUFFER	karg;
-+	SasIOUnitPage0_t		*sasIoUnitPg0=NULL;
-+	dma_addr_t			sasIoUnitPg0_dma;
-+	int				sasIoUnitPg0_data_sz=0;
-+	SasIOUnitPage1_t		*sasIoUnitPg1=NULL;
-+	dma_addr_t			sasIoUnitPg1_dma;
-+	int				sasIoUnitPg1_data_sz=0;
-+	ConfigExtendedPageHeader_t  	hdr;
-+	CONFIGPARMS			cfg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum;
-+	int 				csmi_sas_phy_control_buffer_sz;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in IOCTL_HEADER"
-+		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	csmi_sas_phy_control_buffer_sz = ioctl_header.Length;
-+	karg = kmalloc(csmi_sas_phy_control_buffer_sz,GFP_KERNEL);
-+	if(karg==NULL){
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to malloc @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__,karg);
-+		return -EFAULT;
-+	}
-+
-+	if (copy_from_user(karg, uarg, csmi_sas_phy_control_buffer_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_phy_control_buffer "
-+		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(karg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(ioctl_header.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(karg);
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(karg);
-+		return -ENODEV;
-+	}
-+
-+	if (karg->bPhyIdentifier >= ioc->numPhys) {
-+		karg->IoctlHeader.ReturnCode =
-+		   CSMI_SAS_STATUS_INVALID_PARAMETER;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	/*
-+	 *  Retreive SAS IOUNIT PAGE 0
-+	 */
-+
-+	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		dctlprintk((
-+		    ": FAILED: READ MPI_SASIOUNITPAGE0: HEADER\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		dctlprintk((": hdr.ExtPageLength == 0\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4;
-+	sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev,
-+	    sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma);
-+
-+	if (!sasIoUnitPg0) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz);
-+	cfg.physAddr = sasIoUnitPg0_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		dctlprintk((
-+		    ": FAILED: READ MPI_SASIOUNITPAGE0: CURRENT\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	/*
-+	 *  Retreive SAS IOUNIT PAGE 1
-+	 */
-+
-+	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 1;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		dctlprintk((
-+		    ": FAILED: READ MPI_SASIOUNITPAGE1: HEADER\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		dctlprintk((": hdr.ExtPageLength == 0\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	sasIoUnitPg1_data_sz = hdr.ExtPageLength * 4;
-+	sasIoUnitPg1 = (SasIOUnitPage1_t *) pci_alloc_consistent(ioc->pcidev,
-+	    sasIoUnitPg1_data_sz, &sasIoUnitPg1_dma);
-+
-+	if (!sasIoUnitPg1) {
-+		dctlprintk((": pci_alloc_consistent: FAILED\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	memset((u8 *)sasIoUnitPg1, 0, sasIoUnitPg1_data_sz);
-+	cfg.physAddr = sasIoUnitPg1_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		dctlprintk((
-+		    ": FAILED:  READ MPI_SASIOUNITPAGE1: CURRENT\n"));
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+		goto cim_sas_phy_control_exit;
-+	}
-+
-+	switch (karg->uFunction) {
-+
-+	case CSMI_SAS_PC_LINK_RESET:
-+	case CSMI_SAS_PC_HARD_RESET:
-+	{
-+		u8 opcode = (karg->uFunction==CSMI_SAS_PC_LINK_RESET) ?
-+		    MPI_SAS_OP_PHY_LINK_RESET : MPI_SAS_OP_PHY_HARD_RESET;
-+
-+		if((karg->uLinkFlags & CSMI_SAS_PHY_ACTIVATE_CONTROL) &&
-+		    (karg->usLengthOfControl >= sizeof(CSMI_SAS_PHY_CONTROL)) &&
-+		    (karg->bNumberOfControls > 0)){
-+			if(karg->Control[0].bRate ==
-+			   CSMI_SAS_LINK_RATE_1_5_GBPS) {
-+				sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate =
-+				MPI_SAS_IOUNIT1_MAX_RATE_1_5 |
-+				MPI_SAS_IOUNIT1_MIN_RATE_1_5;
-+			}
-+			else if(karg->Control[0].bRate ==
-+			   CSMI_SAS_LINK_RATE_3_0_GBPS) {
-+				sasIoUnitPg1->PhyData[karg->bPhyIdentifier].MaxMinLinkRate =
-+				MPI_SAS_IOUNIT1_MAX_RATE_3_0 |
-+				MPI_SAS_IOUNIT1_MIN_RATE_3_0;
-+			}
-+			sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags &=
-+			    ~MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE;
-+			cfg.dir = 1;
-+			cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM;
-+			if (mpt_config(ioc, &cfg) != 0) {
-+				dctlprintk((
-+			    ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n"));
-+				karg->IoctlHeader.ReturnCode =
-+				   CSMI_SAS_STATUS_FAILED;
-+				goto cim_sas_phy_control_exit;
-+			}
-+			cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
-+			if (mpt_config(ioc, &cfg) != 0) {
-+				dctlprintk((
-+			 ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n"));
-+				karg->IoctlHeader.ReturnCode =
-+				   CSMI_SAS_STATUS_FAILED;
-+				goto cim_sas_phy_control_exit;
-+			}
-+		}
-+		if (mptctl_csmi_sas_phy_reset(ioc,
-+		    karg->bPhyIdentifier, opcode) != 0) {
-+			dctlprintk((
-+			    ": FAILED: mptctl_csmi_sas_phy_reset\n"));
-+			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_sas_phy_control_exit;
-+		}
-+		break;
-+
-+	}
-+	case CSMI_SAS_PC_PHY_DISABLE:
-+		if(karg->usLengthOfControl || karg->bNumberOfControls) {
-+			karg->IoctlHeader.ReturnCode =
-+			    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+			break;
-+		}
-+		sasIoUnitPg1->PhyData[karg->bPhyIdentifier].PhyFlags |=
-+		    MPI_SAS_IOUNIT1_PHY_FLAGS_PHY_DISABLE;
-+		cfg.dir = 1;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM;
-+		if (mpt_config(ioc, &cfg) != 0) {
-+			dctlprintk((
-+			    ": FAILED: WRITE MPI_SASIOUNITPAGE1 NVRAM\n"));
-+			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_sas_phy_control_exit;
-+		}
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
-+		if (mpt_config(ioc, &cfg) != 0) {
-+			dctlprintk((
-+			    ": FAILED: WRITE MPI_SASIOUNITPAGE1 CURRENT\n"));
-+			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_sas_phy_control_exit;
-+		}
-+		if (mptctl_csmi_sas_phy_reset(ioc,
-+		    karg->bPhyIdentifier, MPI_SAS_OP_PHY_HARD_RESET) != 0) {
-+			dctlprintk((
-+			    ": FAILED: mptctl_csmi_sas_phy_reset\n"));
-+			karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+			goto cim_sas_phy_control_exit;
-+		}
-+		break;
-+
-+	case CSMI_SAS_PC_GET_PHY_SETTINGS:
-+		if(karg->usLengthOfControl || karg->bNumberOfControls) {
-+			karg->IoctlHeader.ReturnCode =
-+			    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+			break;
-+		}
-+		if(csmi_sas_phy_control_buffer_sz <
-+		    offsetof(CSMI_SAS_PHY_CONTROL_BUFFER,Control) +
-+		    (4* sizeof(CSMI_SAS_PHY_CONTROL))) {
-+			karg->IoctlHeader.ReturnCode =
-+			    CSMI_SAS_STATUS_INVALID_PARAMETER;
-+			break;
-+		}
-+		karg->usLengthOfControl = sizeof(CSMI_SAS_PHY_CONTROL);
-+		karg->bNumberOfControls = 4;
-+		karg->Control[0].bType = CSMI_SAS_SAS;
-+		karg->Control[0].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS;
-+		karg->Control[1].bType = CSMI_SAS_SAS;
-+		karg->Control[1].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS;
-+		karg->Control[2].bType = CSMI_SAS_SATA;
-+		karg->Control[2].bRate = CSMI_SAS_LINK_RATE_1_5_GBPS;
-+		karg->Control[3].bType = CSMI_SAS_SATA;
-+		karg->Control[3].bRate = CSMI_SAS_LINK_RATE_3_0_GBPS;
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+		break;
-+	default:
-+		break;
-+	}
-+
-+cim_sas_phy_control_exit:
-+
-+	if (sasIoUnitPg0)
-+		pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz,
-+		    (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma);
-+
-+	if (sasIoUnitPg1)
-+		pci_free_consistent(ioc->pcidev, sasIoUnitPg1_data_sz,
-+		    (u8 *) sasIoUnitPg1, sasIoUnitPg1_dma);
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg,karg,csmi_sas_phy_control_buffer_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to write out csmi_sas_phy_control_buffer @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(karg);
-+		return -EFAULT;
-+	}
-+
-+	kfree(karg);
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Get Connector info command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_connector_info(unsigned long arg)
-+{
-+	CSMI_SAS_CONNECTOR_INFO_BUFFER __user *uarg = (void __user *) arg;
-+	CSMI_SAS_CONNECTOR_INFO_BUFFER	 karg;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum;
-+	int				i;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&karg, uarg, sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		   "Unable to read in csmi_sas_connector_info_buffer"
-+		   " struct @ %p\n",
-+		   __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg.IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		return -ENODEV;
-+	}
-+
-+	karg.IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+// TODO - to be implemented - This requires MPI changes to a Manufacturing page
-+	for (i=0;i< ioc->numPhys;i++) {
-+		karg.Reference[i].uPinout = CSMI_SAS_CON_UNKNOWN;
-+		strcpy(karg.Reference[i].bConnector,"");
-+		karg.Reference[i].bLocation = CSMI_SAS_CON_UNKNOWN;
-+	}
-+
-+// cim_sas_get_connector_info_exit:
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, &karg,
-+		sizeof(CSMI_SAS_CONNECTOR_INFO_BUFFER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		"Unable to write out csmi_sas_connector_info_buffer @"
-+	       "%p\n",
-+		__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	return 0;
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*                 mptctl_csmi_sas_fill_location_data
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ */
-+static int
-+mptctl_csmi_sas_fill_location_data(MPT_ADAPTER *ioc, u8 target, u8 bus, u8 opcode, CSMI_SAS_LOCATION_IDENTIFIER * location_ident)
-+{
-+
-+	ConfigExtendedPageHeader_t 	hdr;
-+	CONFIGPARMS			cfg;
-+	int				rc;
-+	SasDevicePage0_t		*sasDevicePg0=NULL;
-+	SasEnclosurePage0_t		*sasEnclosurePg0=NULL;
-+	dma_addr_t			sasDevicePg0_dma,sasEnclosurePg0_dma;
-+	int				sasDevicePg0_data_sz=0;
-+	int				sasEnclosurePg0_data_sz=0;
-+	u64				SASAddress64;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	/* SAS Device Page 0 */
-+	hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		rc=-1;
-+		goto fill_location_data_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		rc=-1;
-+		goto fill_location_data_exit;
-+	}
-+
-+	sasDevicePg0_data_sz = hdr.ExtPageLength * 4;
-+	sasDevicePg0 = (SasDevicePage0_t *) pci_alloc_consistent(
-+	    ioc->pcidev, sasDevicePg0_data_sz, &sasDevicePg0_dma);
-+	if (!sasDevicePg0) {
-+		rc=-1;
-+		goto fill_location_data_exit;
-+	}
-+
-+	memset((u8 *)sasDevicePg0, 0, sasDevicePg0_data_sz);
-+	cfg.physAddr = sasDevicePg0_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+	cfg.pageAddr = (bus << 8) + target
-+	    + (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
-+	       	MPI_SAS_DEVICE_PGAD_FORM_SHIFT);
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		rc=-1;
-+		goto fill_location_data_exit;
-+	}
-+
-+	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_ADDRESS_VALID;
-+	SASAddress64 = reverse_byte_order64((u64 *)&sasDevicePg0->SASAddress);
-+	memcpy(&location_ident->bSASAddress,&SASAddress64,sizeof(u64));
-+
-+	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_SAS_LUN_VALID;
-+	memset(location_ident->bSASLun, 0, sizeof(location_ident->bSASLun));
-+
-+	/* SAS Enclosure Page 0 */
-+	hdr.PageVersion = MPI_SASENCLOSURE0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_ENCLOSURE;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		rc=0;
-+		goto fill_location_data_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		rc=0;
-+		goto fill_location_data_exit;
-+	}
-+
-+	sasEnclosurePg0_data_sz = hdr.ExtPageLength * 4;
-+	sasEnclosurePg0 = (SasEnclosurePage0_t *) pci_alloc_consistent(
-+	    ioc->pcidev, sasEnclosurePg0_data_sz, &sasEnclosurePg0_dma);
-+	if (!sasEnclosurePg0) {
-+		rc=0;
-+		goto fill_location_data_exit;
-+	}
-+	cfg.physAddr = sasEnclosurePg0_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+	cfg.pageAddr = le16_to_cpu(sasDevicePg0->EnclosureHandle)
-+	    + (MPI_SAS_ENCLOS_PGAD_FORM_HANDLE <<
-+	    MPI_SAS_ENCLOS_PGAD_FORM_SHIFT);
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		rc=0;
-+		goto fill_location_data_exit;
-+	}
-+
-+	location_ident->bLocationFlags |=
-+	    CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID;
-+	SASAddress64 = reverse_byte_order64(
-+	    (u64 *)&sasEnclosurePg0->EnclosureLogicalID);
-+	if (SASAddress64)
-+		memcpy(&location_ident->bEnclosureIdentifier,
-+		    &SASAddress64,sizeof(u64));
-+	else
-+		strcpy(location_ident->bEnclosureIdentifier,"Internal");
-+
-+// bBayPrefix - not supported
-+
-+// TODO - We need to look at sasEnclosurePg0-.Flags , to determine
-+//	whether SEP BUS/TargetID is valid.  Ifs its a SES device, then
-+//	issue internal inquiry to (bus/target) to gather the Enclosure name.
-+//	If the device is SMP, then issue SMP_MANUFACTURING to get enclosure name
-+//	If its direct attached, there is no enclosure name
-+	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID;
-+	strcpy(location_ident->bEnclosureName,"Not Supported");
-+
-+	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_LOCATION_STATE_VALID;
-+	location_ident->bLocationState = CSMI_SAS_LOCATE_UNKNOWN;
-+
-+	location_ident->bLocationFlags |= CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID;
-+	location_ident->bBayIdentifier = le16_to_cpu(sasDevicePg0->Slot);
-+
-+
-+// TODO - illuminating LEDs,
-+// karg->bIdentify = CSMI_SAS_LOCATE_FORCE_OFF, CSMI_SAS_LOCATE_FORCE_ON
-+// We can enable/disable LEDs by SCSI Enclosure Processor MPI request message
-+// printk("Flags=0x%x\n",sasEnclosurePg0->Flags);
-+
-+/* check sasEnclosurePg0->Flags -
-+ * to validate whether we need to send the SEPRequest
-+ * bit:5 should be set
-+ * bit:3-0 any bit should be set.  If zero, then SEPRequest will fail
-+*/
-+
-+/* MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR
-+ * Look in mpi_init.h
-+ * SEPRequest_t = structure
-+ *
-+ * SEPRequest_t->Action should be set to MPI_SEP_REQ_ACTION_WRITE_STATUS
-+ *
-+ * SEPRequest_t->Flags should be set to
-+ * MPI_SEP_REQ_FLAGS_ENCLOSURE_SLOT_ADDRESS, to pass along enclosure/slot ids
-+ *
-+ * SEPRequest_t->SlotStatus |= MPI_SEP_REQ_SLOTSTATUS_IDENTIFY_REQUEST - this
-+ * will illuminate the LEDs
-+ */
-+
-+fill_location_data_exit:
-+
-+	if (sasDevicePg0 != NULL)
-+		pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz,
-+		    sasDevicePg0, sasDevicePg0_dma);
-+
-+	if (sasEnclosurePg0 != NULL)
-+		pci_free_consistent(ioc->pcidev, sasEnclosurePg0_data_sz,
-+		    sasEnclosurePg0, sasEnclosurePg0_dma);
-+	return rc;
-+}
-+
-+
-+static int
-+mptctl_csmi_sas_fill_location_data_raid(MPT_ADAPTER *ioc, PCSMI_SAS_GET_LOCATION_BUFFER karg, u8 volumeID, u8 VolumeBus)
-+{
-+	pRaidVolumePage0_t		pVolume0 = NULL;
-+	pRaidPhysDiskPage0_t		pPhysDisk0 = NULL;
-+	CONFIGPARMS			cfg;
-+	ConfigPageHeader_t		header;
-+	u8				physDiskNumMax,physDiskNum;
-+	int				volumepage0sz = 0, physdiskpage0sz = 0;
-+	dma_addr_t			volume0_dma, physdisk0_dma;
-+	int 				csmi_sas_get_location_sz;
-+	int				rc = 0,i;
-+
-+	csmi_sas_get_location_sz = karg->IoctlHeader.Length;
-+	physDiskNumMax = (csmi_sas_get_location_sz -
-+	    offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location))
-+	    / sizeof(CSMI_SAS_LOCATION_IDENTIFIER);
-+	karg->bNumberOfLocationIdentifiers=0;
-+
-+	/*
-+	 * get RAID Volume Page 0
-+	 */
-+
-+	header.PageVersion = 0;
-+	header.PageLength = 0;
-+	header.PageNumber = 0;
-+	header.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
-+	cfg.cfghdr.hdr = &header;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = (VolumeBus << 8) + volumeID;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+
-+	if (header.PageLength == 0) {
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+
-+	volumepage0sz = header.PageLength * 4;
-+	pVolume0 = pci_alloc_consistent(ioc->pcidev, volumepage0sz,
-+	    &volume0_dma);
-+	if (!pVolume0) {
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+	cfg.physAddr = volume0_dma;
-+	if (mpt_config(ioc, &cfg) != 0){
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+
-+
-+	/*
-+	 * get RAID Physical Disk Page 0
-+	 */
-+	header.PageVersion = 0;
-+	header.PageLength = 0;
-+	header.PageNumber = 0;
-+	header.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
-+	cfg.cfghdr.hdr = &header;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;
-+	cfg.timeout = MPT_IOCTL_DEFAULT_TIMEOUT;
-+	if (mpt_config(ioc, &cfg) != 0) {
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+
-+	if (header.PageLength == 0) {
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+
-+	physdiskpage0sz = header.PageLength * 4;
-+	pPhysDisk0 = pci_alloc_consistent(ioc->pcidev, physdiskpage0sz,
-+	    &physdisk0_dma);
-+	if (!pPhysDisk0) {
-+		rc = -1;
-+		goto sas_fill_location_data_raid_exit;
-+	}
-+	cfg.physAddr = physdisk0_dma;
-+
-+	for (i=0; i< min(pVolume0->NumPhysDisks, physDiskNumMax); i++) {
-+
-+		physDiskNum = pVolume0->PhysDisk[i].PhysDiskNum;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+		cfg.pageAddr = physDiskNum;
-+		if (mpt_config(ioc, &cfg) != 0){
-+			rc = -1;
-+			goto sas_fill_location_data_raid_exit;
-+		}
-+
-+		if((mptctl_csmi_sas_fill_location_data(ioc,
-+		   pPhysDisk0->PhysDiskID,
-+		   karg->bPathId, karg->bIdentify,
-+		   &karg->Location[karg->bNumberOfLocationIdentifiers])) == 0)
-+			karg->bNumberOfLocationIdentifiers++;
-+	}
-+
-+
-+sas_fill_location_data_raid_exit:
-+
-+	if (pVolume0 != NULL)
-+		pci_free_consistent(ioc->pcidev, volumepage0sz, pVolume0,
-+		    volume0_dma);
-+
-+	if(pPhysDisk0 != NULL)
-+		pci_free_consistent(ioc->pcidev, physdiskpage0sz, pPhysDisk0,
-+		    physdisk0_dma);
-+
-+	return rc;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* Prototype Routine for the CSMI SAS Get location command.
-+ *
-+ * Outputs:	None.
-+ * Return:	0 if successful
-+ *		-EFAULT if data unavailable
-+ *		-ENODEV if no such device/adapter
-+ */
-+static int
-+mptctl_csmi_sas_get_location(unsigned long arg)
-+{
-+	CSMI_SAS_GET_LOCATION_BUFFER __user *uarg = (void __user *) arg;
-+	PCSMI_SAS_GET_LOCATION_BUFFER	karg;
-+	IOCTL_HEADER			ioctl_header;
-+	MPT_ADAPTER			*ioc = NULL;
-+	int				iocnum,i;
-+	int				csmi_sas_get_location_sz;
-+
-+	dctlprintk((": %s called.\n",__FUNCTION__));
-+
-+	if (copy_from_user(&ioctl_header, uarg, sizeof(IOCTL_HEADER))) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in IOCTL_HEADER"
-+		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	csmi_sas_get_location_sz = ioctl_header.Length;
-+	karg = kmalloc(csmi_sas_get_location_sz,GFP_KERNEL);
-+	if(karg==NULL){
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to malloc @ %p\n",
-+		    __FILE__, __LINE__, __FUNCTION__,karg);
-+		return -EFAULT;
-+	}
-+
-+	if (copy_from_user(karg, uarg, csmi_sas_get_location_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to read in csmi_sas_phy_control_buffer "
-+		    "struct @ %p\n", __FILE__, __LINE__, __FUNCTION__, uarg);
-+		kfree(karg);
-+		return -EFAULT;
-+	}
-+
-+	if (((iocnum = mpt_verify_adapter(karg->IoctlHeader.IOControllerNumber,
-+	    &ioc)) < 0) || (ioc == NULL)) {
-+		dctlprintk((KERN_ERR
-+		"%s::%s() @%d - ioc%d not found!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(karg);
-+		return -ENODEV;
-+	}
-+
-+	if (!mptctl_is_this_sas_cntr(ioc)) {
-+		dctlprintk((KERN_ERR
-+		    "%s::%s() @%d - ioc%d not SAS controller!\n",
-+		    __FILE__, __FUNCTION__, __LINE__, iocnum));
-+		kfree(karg);
-+		return -ENODEV;
-+	}
-+
-+	karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_INVALID_PARAMETER;
-+	if(karg->bLengthOfLocationIdentifier != sizeof(CSMI_SAS_LOCATION_IDENTIFIER))
-+		goto cim_sas_get_location_exit;
-+
-+
-+	/* RAID SUPPORT */
-+	if (ioc->raid_data.isRaid && ioc->raid_data.pIocPg2) {
-+		for (i=0; i<ioc->raid_data.pIocPg2->NumActiveVolumes; i++){
-+			if (karg->bTargetId ==
-+			    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID) {
-+				if(mptctl_csmi_sas_fill_location_data_raid(ioc, karg,
-+				    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeID,
-+				    ioc->raid_data.pIocPg2->RaidVolume[i].VolumeBus) == 0)
-+					karg->IoctlHeader.ReturnCode =
-+					    CSMI_SAS_STATUS_SUCCESS;
-+				else
-+					karg->IoctlHeader.ReturnCode =
-+					    CSMI_SAS_STATUS_FAILED;
-+				goto cim_sas_get_location_exit;
-+			}
-+		}
-+	}
-+
-+	/* NON-RAID SUPPORT */
-+
-+	/* make sure there's enough room to populate the Location[] struct */
-+	if ((csmi_sas_get_location_sz -
-+	    offsetof(CSMI_SAS_GET_LOCATION_BUFFER,Location)) <
-+	    sizeof(CSMI_SAS_LOCATION_IDENTIFIER))
-+		goto cim_sas_get_location_exit;
-+
-+	karg->bNumberOfLocationIdentifiers=1; 
-+	karg->Location[0].bLocationFlags=0;
-+	if((mptctl_csmi_sas_fill_location_data(ioc, karg->bTargetId,
-+		   karg->bPathId, karg->bIdentify, &karg->Location[0])) == 0)
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_SUCCESS;
-+	else
-+		karg->IoctlHeader.ReturnCode = CSMI_SAS_STATUS_FAILED;
-+
-+cim_sas_get_location_exit:
-+
-+	/* Copy the data from kernel memory to user memory
-+	 */
-+	if (copy_to_user((char *)arg, karg, csmi_sas_get_location_sz)) {
-+		printk(KERN_ERR "%s@%d::%s() - "
-+		    "Unable to write out csmi_sas_get_location_buffer "
-+		    "@ %p\n",__FILE__, __LINE__, __FUNCTION__, uarg);
-+		return -EFAULT;
-+	}
-+
-+	kfree(karg);
-+	return 0;
-+}
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.h linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/csmisas.h	1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/csmisas.h	2007-11-02 09:10:23.000000000 +0100
-@@ -0,0 +1,1796 @@
-+/**************************************************************************
-+
-+Module Name:
-+
-+   CSMISAS.H
-+
-+
-+Abstract:
-+
-+   This file contains constants and data structure definitions used by drivers
-+   that support the Common Storage Management Interface specification for
-+   SAS or SATA in either the Windows or Linux.
-+
-+   This should be considered as a reference implementation only.  Changes may 
-+   be necessary to accommodate a specific build environment or target OS.
-+
-+Revision History:
-+
-+   001  SEF   8/12/03  Initial release.
-+   002  SEF   8/20/03  Cleanup to match documentation.
-+   003  SEF   9/12/03  Additional cleanup, created combined header
-+   004  SEF   9/23/03  Changed base types to match linux defaults
-+                       Added RAID signature
-+                       Added bControllerFlags to CSMI_SAS_CNTLR_CONFIG
-+                       Changed CSMI_SAS_BEGIN_PACK to 8 for common structures
-+                       Fixed other typos identified in first compilation test
-+   005  SEF  10/03/03  Additions to match first version of CSMI document
-+   006  SEF  10/14/03  Fixed typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER
-+                       Added defines for bConnectionRate
-+   007  SEF  10/15/03  Added Firmware Download Control Code and support
-+                       Added CSMI revision support
-+   008  SEF  10/30/03  No functional change, just updated version to track
-+                       spec changes
-+   009  SEF  12/09/03  No functional change, just updated version to track
-+                       spec changes
-+   010  SEF   3/11/04  Fixed typedef struct CSMI_SAS_RAID_DRIVES to include the
-+                       bFirmware member that is defined in the spec, but
-+                       was missing in this file,
-+                       added CC_CSMI_SAS_TASK_MANAGEMENT
-+   011  SEF   4/02/04  No functional change, added comment line before
-+                       CC_CSMI_SAS_TASK_MANAGEMENT
-+   012  SEF   4/16/04  Added IOControllerNumber to linux header,
-+                       Modified linux control codes to have upper word of
-+                       0xCC77.... to indicate CSMI version 77
-+                       Added bSignalClass to CC_CSMI_SET_PHY_INFO
-+                       Added CC_CSMI_SAS_PHY_CONTROL support
-+   013  SEF   5/14/04  Added CC_CSMI_SAS_GET_CONNECTOR_INFO support
-+   014  SEF   5/24/04  No functional change, just updated version to track spec
-+                       changes
-+   015  SEF   6/16/04  changed bPinout to uPinout to reflect proper size,
-+                       changed width of bLocation defines to reflect size
-+   016  SEF   6/17/04  changed bLengthOfControls in CSMI_SAS_PHY_CONTROL
-+                       to be proper size
-+   017  SEF   9/17/04  added CSMI_SAS_SATA_PORT_SELECTOR,
-+                       CSMI_SAS_LINK_VIRTUAL, CSMI_SAS_CON_NOT_PRESENT, and
-+                       CSMI_SAS_CON_NOT_CONNECTED
-+   018  SEF   9/20/04  added CSMI_SAS_PHY_USER_PATTERN, 
-+                       changed definition of CSMI_SAS_PHY_FIXED_PATTERN to not
-+                       conflict with activate definition
-+   019  SEF  12/06/04  added CSMI_SAS_GET_LOCATION
-+                       added bSSPStatus to CSMI_SAS_SSP_PASSTHRU_STATUS 
-+                       structure
-+   020  SEF   5/25/05  added CSMI_SAS_PHY_VIRTUAL_SMP, and changes to 
-+                       CSMI_SAS_GET_LOCATION
-+   021  SEF  11/03/05  added new RAID creation functionality 
-+   022  SEF   2/01/06  corrected typo bNegotitiatedLInkRate
-+                       Added two more RAID_TYPES, 7 and 8
-+   023  SEF   4/04/06  added CSMI_RAID_TYPE_1E
-+                       changed structures that contained surface scan
-+                       to priority approach rather than time, causes
-+                       0.89 to incompatible with 0.87, so a version 
-+                       check is necessary when interpreting the 
-+                       raid structures
-+                       Added netware section
-+
-+**************************************************************************/
-+
-+#ifndef _CSMI_SAS_H_
-+#define _CSMI_SAS_H_
-+
-+// CSMI Specification Revision, the intent is that all versions of the
-+// specification will be backward compatible after the 1.00 release.
-+// Major revision number, corresponds to xxxx. of CSMI specification
-+// Minor revision number, corresponds to .xxxx of CSMI specification
-+#define CSMI_MAJOR_REVISION   0
-+#define CSMI_MINOR_REVISION   89
-+
-+/*************************************************************************/
-+/* PATCHES FOR TYPOS                                                     */
-+/*************************************************************************/
-+
-+#define bNegotitiatedLInkRate bNegotiatedLinkRate
-+
-+/*************************************************************************/
-+/* TARGET OS LINUX SPECIFIC CODE                                         */
-+/*************************************************************************/
-+
-+// EDM #ifdef _linux
-+#ifdef __KERNEL__
-+
-+// Linux base types
-+
-+#include <linux/types.h>
-+
-+#define __i8    char
-+
-+// pack definition
-+
-+// EDM #define CSMI_SAS_BEGIN_PACK(x)    pack(x)
-+// EDM #define CSMI_SAS_END_PACK         pack()
-+
-+// IOCTL Control Codes
-+// (IoctlHeader.ControlCode)
-+
-+// Control Codes prior to 0.77
-+
-+// Control Codes requiring CSMI_ALL_SIGNATURE
-+
-+// #define CC_CSMI_SAS_GET_DRIVER_INFO    0x12345678
-+// #define CC_CSMI_SAS_GET_CNTLR_CONFIG   0x23456781
-+// #define CC_CSMI_SAS_GET_CNTLR_STATUS   0x34567812
-+// #define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  0x92345678
-+
-+// Control Codes requiring CSMI_RAID_SIGNATURE
-+
-+// #define CC_CSMI_SAS_GET_RAID_INFO      0x45678123
-+// #define CC_CSMI_SAS_GET_RAID_CONFIG    0x56781234
-+
-+// Control Codes requiring CSMI_SAS_SIGNATURE
-+
-+// #define CC_CSMI_SAS_GET_PHY_INFO       0x67812345
-+// #define CC_CSMI_SAS_SET_PHY_INFO       0x78123456
-+// #define CC_CSMI_SAS_GET_LINK_ERRORS    0x81234567
-+// #define CC_CSMI_SAS_SMP_PASSTHRU       0xA1234567
-+// #define CC_CSMI_SAS_SSP_PASSTHRU       0xB1234567
-+// #define CC_CSMI_SAS_STP_PASSTHRU       0xC1234567
-+// #define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xD1234567
-+// #define CC_CSMI_SAS_GET_SCSI_ADDRESS   0xE1234567
-+// #define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xF1234567
-+// #define CC_CSMI_SAS_TASK_MANAGEMENT    0xA2345678
-+
-+// Control Codes for 0.77 and later
-+
-+// Control Codes requiring CSMI_ALL_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_DRIVER_INFO    0xCC770001
-+#define CC_CSMI_SAS_GET_CNTLR_CONFIG   0xCC770002
-+#define CC_CSMI_SAS_GET_CNTLR_STATUS   0xCC770003
-+#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  0xCC770004
-+
-+// Control Codes requiring CSMI_RAID_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_RAID_INFO      0xCC77000A
-+#define CC_CSMI_SAS_GET_RAID_CONFIG    0xCC77000B
-+#define CC_CSMI_SAS_GET_RAID_FEATURES  0xCC77000C
-+#define CC_CSMI_SAS_SET_RAID_CONTROL   0xCC77000D
-+#define CC_CSMI_SAS_GET_RAID_ELEMENT   0xCC77000E
-+#define CC_CSMI_SAS_SET_RAID_OPERATION 0xCC77000F
-+
-+// Control Codes requiring CSMI_SAS_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_PHY_INFO       0xCC770014
-+#define CC_CSMI_SAS_SET_PHY_INFO       0xCC770015
-+#define CC_CSMI_SAS_GET_LINK_ERRORS    0xCC770016
-+#define CC_CSMI_SAS_SMP_PASSTHRU       0xCC770017
-+#define CC_CSMI_SAS_SSP_PASSTHRU       0xCC770018
-+#define CC_CSMI_SAS_STP_PASSTHRU       0xCC770019
-+#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0xCC770020
-+#define CC_CSMI_SAS_GET_SCSI_ADDRESS   0xCC770021
-+#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0xCC770022
-+#define CC_CSMI_SAS_TASK_MANAGEMENT    0xCC770023
-+#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0xCC770024
-+#define CC_CSMI_SAS_GET_LOCATION       0xCC770025
-+
-+
-+// Control Codes requiring CSMI_PHY_SIGNATURE
-+
-+#define CC_CSMI_SAS_PHY_CONTROL        0xCC77003C
-+
-+// EDM #pragma CSMI_SAS_BEGIN_PACK(8)
-+#pragma pack(8)
-+
-+// IOCTL_HEADER
-+typedef struct _IOCTL_HEADER {
-+   __u32 IOControllerNumber;
-+    __u32 Length;
-+    __u32 ReturnCode;
-+    __u32 Timeout;
-+    __u16 Direction;
-+} IOCTL_HEADER, 
-+  *PIOCTL_HEADER;
-+
-+// EDM #pragma CSMI_SAS_END_PACK
-+#pragma pack()
-+
-+#endif
-+
-+/*************************************************************************/
-+/* TARGET OS WINDOWS SPECIFIC CODE                                       */
-+/*************************************************************************/
-+
-+#ifdef _WIN32
-+
-+// windows IOCTL definitions
-+
-+#ifndef _NTDDSCSIH_
-+#include <ntddscsi.h>
-+#endif
-+
-+// pack definition
-+
-+#if defined _MSC_VER
-+   #define CSMI_SAS_BEGIN_PACK(x)    pack(push,x)
-+   #define CSMI_SAS_END_PACK         pack(pop)
-+#elif defined __BORLANDC__
-+   #define CSMI_SAS_BEGIN_PACK(x)    option -a##x
-+   #define CSMI_SAS_END_PACK         option -a.
-+#else
-+   #error "CSMISAS.H - Must externally define a pack compiler designator."
-+#endif
-+
-+// base types
-+
-+#define __u8    unsigned char
-+#define __u16   unsigned short
-+#define __u32   unsigned long
-+#define __u64   unsigned __int64
-+
-+#define __i8    char
-+
-+// IOCTL Control Codes
-+// (IoctlHeader.ControlCode)
-+
-+// Control Codes requiring CSMI_ALL_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_DRIVER_INFO    1
-+#define CC_CSMI_SAS_GET_CNTLR_CONFIG   2
-+#define CC_CSMI_SAS_GET_CNTLR_STATUS   3
-+#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  4
-+
-+// Control Codes requiring CSMI_RAID_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_RAID_INFO      10
-+#define CC_CSMI_SAS_GET_RAID_CONFIG    11
-+#define CC_CSMI_SAS_GET_RAID_FEATURES  12
-+#define CC_CSMI_SAS_SET_RAID_CONTROL   13
-+#define CC_CSMI_SAS_GET_RAID_ELEMENT   14
-+#define CC_CSMI_SAS_SET_RAID_OPERATION 15
-+
-+// Control Codes requiring CSMI_SAS_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_PHY_INFO       20
-+#define CC_CSMI_SAS_SET_PHY_INFO       21
-+#define CC_CSMI_SAS_GET_LINK_ERRORS    22
-+#define CC_CSMI_SAS_SMP_PASSTHRU       23
-+#define CC_CSMI_SAS_SSP_PASSTHRU       24
-+#define CC_CSMI_SAS_STP_PASSTHRU       25
-+#define CC_CSMI_SAS_GET_SATA_SIGNATURE 26
-+#define CC_CSMI_SAS_GET_SCSI_ADDRESS   27
-+#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 28
-+#define CC_CSMI_SAS_TASK_MANAGEMENT    29
-+#define CC_CSMI_SAS_GET_CONNECTOR_INFO 30
-+#define CC_CSMI_SAS_GET_LOCATION       31
-+
-+// Control Codes requiring CSMI_PHY_SIGNATURE
-+
-+#define CC_CSMI_SAS_PHY_CONTROL        60
-+
-+#define IOCTL_HEADER SRB_IO_CONTROL
-+#define PIOCTL_HEADER PSRB_IO_CONTROL
-+
-+#endif
-+
-+/*************************************************************************/
-+/* TARGET OS NETWARE SPECIFIC CODE                                       */
-+/*************************************************************************/
-+
-+#ifdef _NETWARE
-+
-+// NetWare IOCTL definitions
-+
-+#define CSMI_SAS_BEGIN_PACK(x)    pack(x)
-+#define CSMI_SAS_END_PACK         pack()
-+
-+#ifndef LONG
-+typedef unsigned long LONG;
-+#endif
-+
-+#ifndef WORD
-+typedef unsigned short WORD;
-+#endif
-+
-+#ifndef BYTE
-+typedef unsigned char BYTE;
-+#endif
-+
-+/* Need to have these definitions for Netware */
-+#define __u8    unsigned char
-+#define __u16   unsigned short
-+#define __u32   unsigned long
-+#define __u64   unsigned __int64
-+
-+#define __i8    char
-+
-+
-+#pragma CSMI_SAS_BEGIN_PACK(8)
-+
-+// IOCTL_HEADER
-+typedef struct _IOCTL_HEADER {
-+    __u32 Length;
-+    __u32 ReturnCode;
-+} IOCTL_HEADER, 
-+  *PIOCTL_HEADER;
-+
-+#pragma CSMI_SAS_END_PACK
-+
-+// IOCTL Control Codes
-+// (IoctlHeader.ControlCode)
-+
-+// Control Codes requiring CSMI_ALL_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_DRIVER_INFO    0x01FF0001
-+#define CC_CSMI_SAS_GET_CNTLR_CONFIG   0x01FF0002
-+#define CC_CSMI_SAS_GET_CNTLR_STATUS   0x01FF0003
-+#define CC_CSMI_SAS_FIRMWARE_DOWNLOAD  0x01FF0004
-+
-+// Control Codes requiring CSMI_RAID_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_RAID_INFO      0x01FF000A
-+#define CC_CSMI_SAS_GET_RAID_CONFIG    0x01FF000B
-+#define CC_CSMI_SAS_GET_RAID_FEATURES  0x01FF000C
-+#define CC_CSMI_SAS_SET_RAID_CONTROL   0x01FF000D
-+#define CC_CSMI_SAS_GET_RAID_ELEMENT   0x01FF000E
-+#define CC_CSMI_SAS_SET_RAID_OPERATION 0x01FF000F
-+
-+// Control Codes requiring CSMI_SAS_SIGNATURE
-+
-+#define CC_CSMI_SAS_GET_PHY_INFO       0x01FF0014
-+#define CC_CSMI_SAS_SET_PHY_INFO       0x01FF0015
-+#define CC_CSMI_SAS_GET_LINK_ERRORS    0x01FF0016
-+#define CC_CSMI_SAS_SMP_PASSTHRU       0x01FF0017
-+#define CC_CSMI_SAS_SSP_PASSTHRU       0x01FF0018
-+#define CC_CSMI_SAS_STP_PASSTHRU       0x01FF0019
-+#define CC_CSMI_SAS_GET_SATA_SIGNATURE 0x01FF001A
-+#define CC_CSMI_SAS_GET_SCSI_ADDRESS   0x01FF001B
-+#define CC_CSMI_SAS_GET_DEVICE_ADDRESS 0x01FF001C
-+#define CC_CSMI_SAS_TASK_MANAGEMENT    0x01FF001D
-+#define CC_CSMI_SAS_GET_CONNECTOR_INFO 0x01FF001E
-+#define CC_CSMI_SAS_GET_LOCATION       0x01FF001F
-+
-+// Control Codes requiring CSMI_PHY_SIGNATURE
-+
-+#define CC_CSMI_SAS_PHY_CONTROL        60
-+
-+#endif
-+
-+/*************************************************************************/
-+/* TARGET OS NOT DEFINED ERROR                                           */
-+/*************************************************************************/
-+
-+// EDM #if (!_WIN32 && !_linux && !_NETWARE)
-+//#if (!_WIN32 && !__KERNEL__ && !_NETWARE)
-+//   #error "Unknown target OS."
-+//#endif
-+
-+/*************************************************************************/
-+/* OS INDEPENDENT CODE                                                   */
-+/*************************************************************************/
-+
-+/* * * * * * * * * * Class Independent IOCTL Constants * * * * * * * * * */
-+
-+// Return codes for all IOCTL's regardless of class
-+// (IoctlHeader.ReturnCode)
-+
-+#define CSMI_SAS_STATUS_SUCCESS              0
-+#define CSMI_SAS_STATUS_FAILED               1
-+#define CSMI_SAS_STATUS_BAD_CNTL_CODE        2
-+#define CSMI_SAS_STATUS_INVALID_PARAMETER    3
-+#define CSMI_SAS_STATUS_WRITE_ATTEMPTED      4
-+
-+// Signature value
-+// (IoctlHeader.Signature)
-+
-+#define CSMI_ALL_SIGNATURE    "CSMIALL"
-+
-+// Timeout value default of 60 seconds
-+// (IoctlHeader.Timeout)
-+
-+#define CSMI_ALL_TIMEOUT      60
-+
-+//  Direction values for data flow on this IOCTL
-+// (IoctlHeader.Direction, Linux only)
-+#define CSMI_SAS_DATA_READ    0
-+#define CSMI_SAS_DATA_WRITE   1
-+
-+// I/O Bus Types
-+// ISA and EISA bus types are not supported
-+// (bIoBusType)
-+
-+#define CSMI_SAS_BUS_TYPE_PCI       3
-+#define CSMI_SAS_BUS_TYPE_PCMCIA    4
-+
-+// Controller Status
-+// (uStatus)
-+
-+#define CSMI_SAS_CNTLR_STATUS_GOOD     1
-+#define CSMI_SAS_CNTLR_STATUS_FAILED   2
-+#define CSMI_SAS_CNTLR_STATUS_OFFLINE  3
-+#define CSMI_SAS_CNTLR_STATUS_POWEROFF 4
-+
-+// Offline Status Reason
-+// (uOfflineReason)
-+
-+#define CSMI_SAS_OFFLINE_REASON_NO_REASON             0
-+#define CSMI_SAS_OFFLINE_REASON_INITIALIZING          1
-+#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_DEGRADED 2
-+#define CSMI_SAS_OFFLINE_REASON_BACKSIDE_BUS_FAILURE  3
-+
-+// Controller Class
-+// (bControllerClass)
-+
-+#define CSMI_SAS_CNTLR_CLASS_HBA    5
-+
-+// Controller Flag bits
-+// (uControllerFlags)
-+
-+#define CSMI_SAS_CNTLR_SAS_HBA   0x00000001
-+#define CSMI_SAS_CNTLR_SAS_RAID  0x00000002
-+#define CSMI_SAS_CNTLR_SATA_HBA  0x00000004
-+#define CSMI_SAS_CNTLR_SATA_RAID 0x00000008
-+
-+// for firmware download
-+#define CSMI_SAS_CNTLR_FWD_SUPPORT  0x00010000
-+#define CSMI_SAS_CNTLR_FWD_ONLINE   0x00020000
-+#define CSMI_SAS_CNTLR_FWD_SRESET   0x00040000
-+#define CSMI_SAS_CNTLR_FWD_HRESET   0x00080000
-+#define CSMI_SAS_CNTLR_FWD_RROM     0x00100000
-+
-+// for RAID configuration supported
-+#define CSMI_SAS_CNTLR_RAID_CFG_SUPPORT  0x010000
-+
-+// Download Flag bits
-+// (uDownloadFlags)
-+#define CSMI_SAS_FWD_VALIDATE       0x00000001
-+#define CSMI_SAS_FWD_SOFT_RESET     0x00000002
-+#define CSMI_SAS_FWD_HARD_RESET     0x00000004
-+
-+// Firmware Download Status
-+// (usStatus)
-+#define CSMI_SAS_FWD_SUCCESS        0
-+#define CSMI_SAS_FWD_FAILED         1
-+#define CSMI_SAS_FWD_USING_RROM     2
-+#define CSMI_SAS_FWD_REJECT         3
-+#define CSMI_SAS_FWD_DOWNREV        4
-+
-+// Firmware Download Severity
-+// (usSeverity>
-+#define CSMI_SAS_FWD_INFORMATION    0
-+#define CSMI_SAS_FWD_WARNING        1
-+#define CSMI_SAS_FWD_ERROR          2
-+#define CSMI_SAS_FWD_FATAL          3
-+
-+/* * * * * * * * * * SAS RAID Class IOCTL Constants  * * * * * * * * */
-+
-+// Return codes for the RAID IOCTL's regardless of class
-+// (IoctlHeader.ReturnCode)
-+
-+#define CSMI_SAS_RAID_SET_OUT_OF_RANGE       1000
-+#define CSMI_SAS_RAID_SET_BUFFER_TOO_SMALL   1001
-+#define CSMI_SAS_RAID_SET_DATA_CHANGED       1002
-+
-+// Signature value
-+// (IoctlHeader.Signature)
-+
-+#define CSMI_RAID_SIGNATURE    "CSMIARY"
-+
-+// Timeout value default of 60 seconds
-+// (IoctlHeader.Timeout)
-+
-+#define CSMI_RAID_TIMEOUT      60
-+
-+// RAID Types
-+// (bRaidType)
-+#define CSMI_SAS_RAID_TYPE_NONE     0
-+#define CSMI_SAS_RAID_TYPE_0        1
-+#define CSMI_SAS_RAID_TYPE_1        2
-+#define CSMI_SAS_RAID_TYPE_10       3
-+#define CSMI_SAS_RAID_TYPE_5        4
-+#define CSMI_SAS_RAID_TYPE_15       5
-+#define CSMI_SAS_RAID_TYPE_6        6
-+#define CSMI_SAS_RAID_TYPE_50       7
-+#define CSMI_SAS_RAID_TYPE_VOLUME   8
-+#define CSMI_SAS_RAID_TYPE_1E       9
-+#define CSMI_SAS_RAID_TYPE_OTHER    255
-+// the last value 255 was already defined for other
-+// so end is defined as 254
-+#define CSMI_SAS_RAID_TYPE_END      254
-+
-+// RAID Status
-+// (bStatus)
-+#define CSMI_SAS_RAID_SET_STATUS_OK             0
-+#define CSMI_SAS_RAID_SET_STATUS_DEGRADED       1
-+#define CSMI_SAS_RAID_SET_STATUS_REBUILDING     2
-+#define CSMI_SAS_RAID_SET_STATUS_FAILED         3
-+#define CSMI_SAS_RAID_SET_STATUS_OFFLINE        4
-+#define CSMI_SAS_RAID_SET_STATUS_TRANSFORMING   5
-+#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_REBUILD         6
-+#define CSMI_SAS_RAID_SET_STATUS_QUEUED_FOR_TRANSFORMATION  7
-+
-+// RAID Drive Count
-+// (bDriveCount, 0xF1 to 0xFF are reserved)
-+#define CSMI_SAS_RAID_DRIVE_COUNT_TOO_BIG   0xF1
-+#define CSMI_SAS_RAID_DRIVE_COUNT_SUPRESSED 0xF2
-+
-+// RAID Data Type
-+// (bDataType)
-+#define CSMI_SAS_RAID_DATA_DRIVES           0
-+#define CSMI_SAS_RAID_DATA_DEVICE_ID        1
-+#define CSMI_SAS_RAID_DATA_ADDITIONAL_DATA  2
-+
-+// RAID Drive Status
-+// (bDriveStatus)
-+#define CSMI_SAS_DRIVE_STATUS_OK          0
-+#define CSMI_SAS_DRIVE_STATUS_REBUILDING  1
-+#define CSMI_SAS_DRIVE_STATUS_FAILED      2
-+#define CSMI_SAS_DRIVE_STATUS_DEGRADED    3
-+#define CSMI_SAS_DRIVE_STATUS_OFFLINE     4
-+#define CSMI_SAS_DRIVE_STATUS_QUEUED_FOR_REBUILD 5
-+
-+// RAID Drive Usage
-+// (bDriveUsage)
-+#define CSMI_SAS_DRIVE_CONFIG_NOT_USED      0
-+#define CSMI_SAS_DRIVE_CONFIG_MEMBER        1
-+#define CSMI_SAS_DRIVE_CONFIG_SPARE         2
-+#define CSMI_SAS_DRIVE_CONFIG_SPARE_ACTIVE  3
-+
-+// RAID Drive Type
-+// (bDriveType)
-+#define CSMI_SAS_DRIVE_TYPE_UNKNOWN         0
-+#define CSMI_SAS_DRIVE_TYPE_SINGLE_PORT_SAS 1
-+#define CSMI_SAS_DRIVE_TYPE_DUAL_PORT_SAS   2
-+#define CSMI_SAS_DRIVE_TYPE_SATA            3
-+#define CSMI_SAS_DRIVE_TYPE_SATA_PS         4
-+#define CSMI_SAS_DRIVE_TYPE_OTHER           255
-+
-+// RAID Write Protect
-+// (bWriteProtect)
-+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNKNOWN     0
-+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_UNCHANGED   0
-+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_ENABLED     1
-+#define CSMI_SAS_RAID_SET_WRITE_PROTECT_DISABLED    2
-+
-+// RAID Cache Setting
-+// (bCacheSetting)
-+#define CSMI_SAS_RAID_SET_CACHE_UNKNOWN             0
-+#define CSMI_SAS_RAID_SET_CACHE_UNCHANGED           0
-+#define CSMI_SAS_RAID_SET_CACHE_ENABLED             1
-+#define CSMI_SAS_RAID_SET_CACHE_DISABLED            2
-+#define CSMI_SAS_RAID_SET_CACHE_CORRUPT             3
-+
-+// RAID Features
-+// (uFeatures)
-+#define CSMI_SAS_RAID_FEATURE_TRANSFORMATION    0x00000001
-+#define CSMI_SAS_RAID_FEATURE_REBUILD           0x00000002
-+#define CSMI_SAS_RAID_FEATURE_SPLIT_MIRROR      0x00000004
-+#define CSMI_SAS_RAID_FEATURE_MERGE_MIRROR      0x00000008
-+#define CSMI_SAS_RAID_FEATURE_LUN_RENUMBER      0x00000010
-+#define CSMI_SAS_RAID_FEATURE_SURFACE_SCAN      0x00000020
-+#define CSMI_SAS_RAID_FEATURE_SPARES_SHARED     0x00000040
-+
-+// RAID Priority
-+// (bDefaultTransformPriority, etc.)
-+#define CSMI_SAS_PRIORITY_UNKNOWN   0
-+#define CSMI_SAS_PRIORITY_UNCHANGED 0
-+#define CSMI_SAS_PRIORITY_AUTO      1
-+#define CSMI_SAS_PRIORITY_OFF       2
-+#define CSMI_SAS_PRIORITY_LOW       3
-+#define CSMI_SAS_PRIORITY_MEDIUM    4
-+#define CSMI_SAS_PRIORITY_HIGH      5
-+
-+// RAID Transformation Rules
-+// (uRaidSetTransformationRules)
-+#define CSMI_SAS_RAID_RULE_AVAILABLE_MEMORY     0x00000001
-+#define CSMI_SAS_RAID_RULE_OVERLAPPED_EXTENTS   0x00000002
-+
-+// RAID Cache Ratios Supported
-+// (bCacheRatiosSupported)
-+// from 0 to 100 defines the write to read ratio, 0 is 100% write
-+#define CSMI_SAS_RAID_CACHE_RATIO_RANGE     101
-+#define CSMI_SAS_RAID_CACHE_RATIO_FIXED     102
-+#define CSMI_SAS_RAID_CACHE_RATIO_AUTO      103
-+#define CSMI_SAS_RAID_CACHE_RATIO_END       255
-+
-+// RAID Cache Ratio Flag
-+// (bCacheRatioFlag)
-+#define CSMI_SAS_RAID_CACHE_RATIO_DISABLE   0
-+#define CSMI_SAS_RAID_CACHE_RATIO_ENABLE    1
-+
-+// RAID Clear Configuration Signature
-+// (bClearConfiguration)
-+#define CSMI_SAS_RAID_CLEAR_CONFIGURATION_SIGNATURE "RAIDCLR"
-+
-+// RAID Failure Codes
-+// (uFailCode)
-+#define CSMI_SAS_FAIL_CODE_OK                           0
-+#define CSMI_SAS_FAIL_CODE_PARAMETER_INVALID            1000
-+#define CSMI_SAS_FAIL_CODE_TRANSFORM_PRIORITY_INVALID   1001
-+#define CSMI_SAS_FAIL_CODE_REBUILD_PRIORITY_INVALID     1002
-+#define CSMI_SAS_FAIL_CODE_CACHE_RATIO_INVALID          1003
-+#define CSMI_SAS_FAIL_CODE_SURFACE_SCAN_INVALID         1004
-+#define CSMI_SAS_FAIL_CODE_CLEAR_CONFIGURATION_INVALID  1005
-+#define CSMI_SAS_FAIL_CODE_ELEMENT_INDEX_INVALID        1006
-+#define CSMI_SAS_FAIL_CODE_SUBELEMENT_INDEX_INVALID     1007
-+#define CSMI_SAS_FAIL_CODE_EXTENT_INVALID               1008
-+#define CSMI_SAS_FAIL_CODE_BLOCK_COUNT_INVALID          1009
-+#define CSMI_SAS_FAIL_CODE_DRIVE_INDEX_INVALID          1010
-+#define CSMI_SAS_FAIL_CODE_EXISTING_LUN_INVALID         1011
-+#define CSMI_SAS_FAIL_CODE_RAID_TYPE_INVALID            1012
-+#define CSMI_SAS_FAIL_CODE_STRIPE_SIZE_INVALID          1013
-+#define CSMI_SAS_FAIL_CODE_TRANSFORMATION_INVALID       1014
-+#define CSMI_SAS_FAIL_CODE_CHANGE_COUNT_INVALID         1015
-+#define CSMI_SAS_FAIL_CODE_ENUMERATION_TYPE_INVALID     1016
-+
-+#define CSMI_SAS_FAIL_CODE_EXCEEDED_RAID_SET_COUNT      2000
-+#define CSMI_SAS_FAIL_CODE_DUPLICATE_LUN                2001
-+
-+#define CSMI_SAS_FAIL_CODE_WAIT_FOR_OPERATION           3000
-+
-+// RAID Enumeration Types
-+// (uEnumerationType)
-+#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE                0
-+#define CSMI_SAS_RAID_ELEMENT_TYPE_MODULE               1
-+#define CSMI_SAS_RAID_ELEMENT_TYPE_DRIVE_RAID_SET       2
-+#define CSMI_SAS_RAID_ELEMENT_TYPE_EXTENT_DRIVE         3
-+
-+// RAID Extent Types
-+// (bExtentType)
-+#define CSMI_SAS_RAID_EXTENT_RESERVED       0
-+#define CSMI_SAS_RAID_EXTENT_METADATA       1
-+#define CSMI_SAS_RAID_EXTENT_ALLOCATED      2
-+#define CSMI_SAS_RAID_EXTENT_UNALLOCATED    3
-+
-+// RAID Operation Types
-+// (uOperationType)
-+#define CSMI_SAS_RAID_SET_CREATE            0
-+#define CSMI_SAS_RAID_SET_LABEL             1
-+#define CSMI_SAS_RAID_SET_TRANSFORM         2
-+#define CSMI_SAS_RAID_SET_DELETE            3
-+#define CSMI_SAS_RAID_SET_WRITE_PROTECT     4
-+#define CSMI_SAS_RAID_SET_CACHE             5
-+#define CSMI_SAS_RAID_SET_ONLINE_STATE      6
-+#define CSMI_SAS_RAID_SET_SPARE             7
-+
-+// RAID Transform Types
-+// (bTransformType)
-+#define CSMI_SAS_RAID_SET_TRANSFORM_SPLIT_MIRROR    0
-+#define CSMI_SAS_RAID_SET_TRANSFORM_MERGE_RAID_0    1
-+#define CSMI_SAS_RAID_SET_TRANSFORM_LUN_RENUMBER    2
-+#define CSMI_SAS_RAID_SET_TRANSFORM_RAID_SET        3
-+
-+// RAID Online State
-+// (bOnlineState)
-+#define CSMI_SAS_RAID_SET_STATE_UNKNOWN     0
-+#define CSMI_SAS_RAID_SET_STATE_ONLINE      1
-+#define CSMI_SAS_RAID_SET_STATE_OFFLINE     2
-+
-+/* * * * * * * * * * SAS HBA Class IOCTL Constants * * * * * * * * * */
-+
-+// Return codes for SAS IOCTL's
-+// (IoctlHeader.ReturnCode)
-+
-+#define CSMI_SAS_PHY_INFO_CHANGED            CSMI_SAS_STATUS_SUCCESS
-+#define CSMI_SAS_PHY_INFO_NOT_CHANGEABLE     2000
-+#define CSMI_SAS_LINK_RATE_OUT_OF_RANGE      2001
-+
-+#define CSMI_SAS_PHY_DOES_NOT_EXIST          2002
-+#define CSMI_SAS_PHY_DOES_NOT_MATCH_PORT     2003
-+#define CSMI_SAS_PHY_CANNOT_BE_SELECTED      2004
-+#define CSMI_SAS_SELECT_PHY_OR_PORT          2005
-+#define CSMI_SAS_PORT_DOES_NOT_EXIST         2006
-+#define CSMI_SAS_PORT_CANNOT_BE_SELECTED     2007
-+#define CSMI_SAS_CONNECTION_FAILED           2008
-+
-+#define CSMI_SAS_NO_SATA_DEVICE              2009
-+#define CSMI_SAS_NO_SATA_SIGNATURE           2010
-+#define CSMI_SAS_SCSI_EMULATION              2011
-+#define CSMI_SAS_NOT_AN_END_DEVICE           2012
-+#define CSMI_SAS_NO_SCSI_ADDRESS             2013
-+#define CSMI_SAS_NO_DEVICE_ADDRESS           2014
-+
-+// Signature value
-+// (IoctlHeader.Signature)
-+
-+#define CSMI_SAS_SIGNATURE    "CSMISAS"
-+
-+// Timeout value default of 60 seconds
-+// (IoctlHeader.Timeout)
-+
-+#define CSMI_SAS_TIMEOUT      60
-+
-+// Device types
-+// (bDeviceType)
-+
-+#define CSMI_SAS_PHY_UNUSED               0x00
-+#define CSMI_SAS_NO_DEVICE_ATTACHED       0x00
-+#define CSMI_SAS_END_DEVICE               0x10
-+#define CSMI_SAS_EDGE_EXPANDER_DEVICE     0x20
-+#define CSMI_SAS_FANOUT_EXPANDER_DEVICE   0x30
-+
-+// Protocol options
-+// (bInitiatorPortProtocol, bTargetPortProtocol)
-+
-+#define CSMI_SAS_PROTOCOL_SATA   0x01
-+#define CSMI_SAS_PROTOCOL_SMP    0x02
-+#define CSMI_SAS_PROTOCOL_STP    0x04
-+#define CSMI_SAS_PROTOCOL_SSP    0x08
-+
-+// Negotiated and hardware link rates
-+// (bNegotiatedLinkRate, bMinimumLinkRate, bMaximumLinkRate)
-+
-+#define CSMI_SAS_LINK_RATE_UNKNOWN  0x00
-+#define CSMI_SAS_PHY_DISABLED       0x01
-+#define CSMI_SAS_LINK_RATE_FAILED   0x02
-+#define CSMI_SAS_SATA_SPINUP_HOLD   0x03
-+#define CSMI_SAS_SATA_PORT_SELECTOR 0x04
-+#define CSMI_SAS_LINK_RATE_1_5_GBPS 0x08
-+#define CSMI_SAS_LINK_RATE_3_0_GBPS 0x09
-+#define CSMI_SAS_LINK_VIRTUAL       0x10
-+
-+// Discover state
-+// (bAutoDiscover)
-+
-+#define CSMI_SAS_DISCOVER_NOT_SUPPORTED   0x00
-+#define CSMI_SAS_DISCOVER_NOT_STARTED     0x01
-+#define CSMI_SAS_DISCOVER_IN_PROGRESS     0x02
-+#define CSMI_SAS_DISCOVER_COMPLETE        0x03
-+#define CSMI_SAS_DISCOVER_ERROR           0x04
-+
-+// Phy features
-+
-+#define CSMI_SAS_PHY_VIRTUAL_SMP          0x01
-+
-+// Programmed link rates
-+// (bMinimumLinkRate, bMaximumLinkRate)
-+// (bProgrammedMinimumLinkRate, bProgrammedMaximumLinkRate)
-+
-+#define CSMI_SAS_PROGRAMMED_LINK_RATE_UNCHANGED 0x00
-+#define CSMI_SAS_PROGRAMMED_LINK_RATE_1_5_GBPS  0x08
-+#define CSMI_SAS_PROGRAMMED_LINK_RATE_3_0_GBPS  0x09
-+
-+// Link rate
-+// (bNegotiatedLinkRate in CSMI_SAS_SET_PHY_INFO)
-+
-+#define CSMI_SAS_LINK_RATE_NEGOTIATE      0x00
-+#define CSMI_SAS_LINK_RATE_PHY_DISABLED   0x01
-+
-+// Signal class
-+// (bSignalClass in CSMI_SAS_SET_PHY_INFO)
-+
-+#define CSMI_SAS_SIGNAL_CLASS_UNKNOWN     0x00
-+#define CSMI_SAS_SIGNAL_CLASS_DIRECT      0x01
-+#define CSMI_SAS_SIGNAL_CLASS_SERVER      0x02
-+#define CSMI_SAS_SIGNAL_CLASS_ENCLOSURE   0x03
-+
-+// Link error reset
-+// (bResetCounts)
-+
-+#define CSMI_SAS_LINK_ERROR_DONT_RESET_COUNTS   0x00
-+#define CSMI_SAS_LINK_ERROR_RESET_COUNTS        0x01
-+
-+// Phy identifier
-+// (bPhyIdentifier)
-+
-+#define CSMI_SAS_USE_PORT_IDENTIFIER   0xFF
-+
-+// Port identifier
-+// (bPortIdentifier)
-+
-+#define CSMI_SAS_IGNORE_PORT           0xFF
-+
-+// Programmed link rates
-+// (bConnectionRate)
-+
-+#define CSMI_SAS_LINK_RATE_NEGOTIATED  0x00
-+#define CSMI_SAS_LINK_RATE_1_5_GBPS    0x08
-+#define CSMI_SAS_LINK_RATE_3_0_GBPS    0x09
-+
-+// Connection status
-+// (bConnectionStatus)
-+
-+#define CSMI_SAS_OPEN_ACCEPT                          0
-+#define CSMI_SAS_OPEN_REJECT_BAD_DESTINATION          1
-+#define CSMI_SAS_OPEN_REJECT_RATE_NOT_SUPPORTED       2
-+#define CSMI_SAS_OPEN_REJECT_NO_DESTINATION           3
-+#define CSMI_SAS_OPEN_REJECT_PATHWAY_BLOCKED          4
-+#define CSMI_SAS_OPEN_REJECT_PROTOCOL_NOT_SUPPORTED   5
-+#define CSMI_SAS_OPEN_REJECT_RESERVE_ABANDON          6
-+#define CSMI_SAS_OPEN_REJECT_RESERVE_CONTINUE         7
-+#define CSMI_SAS_OPEN_REJECT_RESERVE_INITIALIZE       8
-+#define CSMI_SAS_OPEN_REJECT_RESERVE_STOP             9
-+#define CSMI_SAS_OPEN_REJECT_RETRY                    10
-+#define CSMI_SAS_OPEN_REJECT_STP_RESOURCES_BUSY       11
-+#define CSMI_SAS_OPEN_REJECT_WRONG_DESTINATION        12
-+
-+// SSP Status
-+// (bSSPStatus)
-+
-+#define CSMI_SAS_SSP_STATUS_UNKNOWN     0x00
-+#define CSMI_SAS_SSP_STATUS_WAITING     0x01
-+#define CSMI_SAS_SSP_STATUS_COMPLETED   0x02
-+#define CSMI_SAS_SSP_STATUS_FATAL_ERROR 0x03
-+#define CSMI_SAS_SSP_STATUS_RETRY       0x04
-+#define CSMI_SAS_SSP_STATUS_NO_TAG      0x05
-+
-+// SSP Flags
-+// (uFlags)
-+
-+#define CSMI_SAS_SSP_READ           0x00000001
-+#define CSMI_SAS_SSP_WRITE          0x00000002
-+#define CSMI_SAS_SSP_UNSPECIFIED    0x00000004
-+
-+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_SIMPLE         0x00000000
-+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_HEAD_OF_QUEUE  0x00000010
-+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ORDERED        0x00000020
-+#define CSMI_SAS_SSP_TASK_ATTRIBUTE_ACA            0x00000040
-+
-+// SSP Data present
-+// (bDataPresent)
-+
-+#define CSMI_SAS_SSP_NO_DATA_PRESENT         0x00
-+#define CSMI_SAS_SSP_RESPONSE_DATA_PRESENT   0x01
-+#define CSMI_SAS_SSP_SENSE_DATA_PRESENT      0x02
-+
-+// STP Flags
-+// (uFlags)
-+
-+#define CSMI_SAS_STP_READ           0x00000001
-+#define CSMI_SAS_STP_WRITE          0x00000002
-+#define CSMI_SAS_STP_UNSPECIFIED    0x00000004
-+#define CSMI_SAS_STP_PIO            0x00000010
-+#define CSMI_SAS_STP_DMA            0x00000020
-+#define CSMI_SAS_STP_PACKET         0x00000040
-+#define CSMI_SAS_STP_DMA_QUEUED     0x00000080
-+#define CSMI_SAS_STP_EXECUTE_DIAG   0x00000100
-+#define CSMI_SAS_STP_RESET_DEVICE   0x00000200
-+
-+// Task Management Flags
-+// (uFlags)
-+
-+#define CSMI_SAS_TASK_IU               0x00000001
-+#define CSMI_SAS_HARD_RESET_SEQUENCE   0x00000002
-+#define CSMI_SAS_SUPPRESS_RESULT       0x00000004
-+
-+// Task Management Functions
-+// (bTaskManagement)
-+
-+#define CSMI_SAS_SSP_ABORT_TASK           0x01
-+#define CSMI_SAS_SSP_ABORT_TASK_SET       0x02
-+#define CSMI_SAS_SSP_CLEAR_TASK_SET       0x04
-+#define CSMI_SAS_SSP_LOGICAL_UNIT_RESET   0x08
-+#define CSMI_SAS_SSP_CLEAR_ACA            0x40
-+#define CSMI_SAS_SSP_QUERY_TASK           0x80
-+
-+// Task Management Information
-+// (uInformation)
-+
-+#define CSMI_SAS_SSP_TEST           1
-+#define CSMI_SAS_SSP_EXCEEDED       2
-+#define CSMI_SAS_SSP_DEMAND         3
-+#define CSMI_SAS_SSP_TRIGGER        4
-+
-+// Connector Pinout Information
-+// (uPinout)
-+
-+#define CSMI_SAS_CON_UNKNOWN              0x00000001
-+#define CSMI_SAS_CON_SFF_8482             0x00000002
-+#define CSMI_SAS_CON_SFF_8470_LANE_1      0x00000100
-+#define CSMI_SAS_CON_SFF_8470_LANE_2      0x00000200
-+#define CSMI_SAS_CON_SFF_8470_LANE_3      0x00000400
-+#define CSMI_SAS_CON_SFF_8470_LANE_4      0x00000800
-+#define CSMI_SAS_CON_SFF_8484_LANE_1      0x00010000
-+#define CSMI_SAS_CON_SFF_8484_LANE_2      0x00020000
-+#define CSMI_SAS_CON_SFF_8484_LANE_3      0x00040000
-+#define CSMI_SAS_CON_SFF_8484_LANE_4      0x00080000
-+
-+// Connector Location Information
-+// (bLocation)
-+
-+// same as uPinout above...
-+// #define CSMI_SAS_CON_UNKNOWN              0x01
-+#define CSMI_SAS_CON_INTERNAL             0x02
-+#define CSMI_SAS_CON_EXTERNAL             0x04
-+#define CSMI_SAS_CON_SWITCHABLE           0x08
-+#define CSMI_SAS_CON_AUTO                 0x10
-+#define CSMI_SAS_CON_NOT_PRESENT          0x20
-+#define CSMI_SAS_CON_NOT_CONNECTED        0x80
-+
-+// Device location identification
-+// (bIdentify)
-+
-+#define CSMI_SAS_LOCATE_UNKNOWN           0x00
-+#define CSMI_SAS_LOCATE_FORCE_OFF         0x01
-+#define CSMI_SAS_LOCATE_FORCE_ON          0x02
-+
-+// Location Valid flags
-+// (uLocationFlags)
-+
-+#define CSMI_SAS_LOCATE_SAS_ADDRESS_VALID           0x00000001
-+#define CSMI_SAS_LOCATE_SAS_LUN_VALID               0x00000002
-+#define CSMI_SAS_LOCATE_ENCLOSURE_IDENTIFIER_VALID  0x00000004
-+#define CSMI_SAS_LOCATE_ENCLOSURE_NAME_VALID        0x00000008
-+#define CSMI_SAS_LOCATE_BAY_PREFIX_VALID            0x00000010
-+#define CSMI_SAS_LOCATE_BAY_IDENTIFIER_VALID        0x00000020
-+#define CSMI_SAS_LOCATE_LOCATION_STATE_VALID        0x00000040
-+
-+/* * * * * * * * SAS Phy Control Class IOCTL Constants * * * * * * * * */
-+
-+// Return codes for SAS Phy Control IOCTL's
-+// (IoctlHeader.ReturnCode)
-+
-+// Signature value
-+// (IoctlHeader.Signature)
-+
-+#define CSMI_PHY_SIGNATURE    "CSMIPHY"
-+
-+// Phy Control Functions
-+// (bFunction)
-+
-+// values 0x00 to 0xFF are consistent in definition with the SMP PHY CONTROL 
-+// function defined in the SAS spec
-+#define CSMI_SAS_PC_NOP                   0x00000000
-+#define CSMI_SAS_PC_LINK_RESET            0x00000001
-+#define CSMI_SAS_PC_HARD_RESET            0x00000002
-+#define CSMI_SAS_PC_PHY_DISABLE           0x00000003
-+// 0x04 to 0xFF reserved...
-+#define CSMI_SAS_PC_GET_PHY_SETTINGS      0x00000100
-+
-+// Link Flags
-+#define CSMI_SAS_PHY_ACTIVATE_CONTROL     0x00000001
-+#define CSMI_SAS_PHY_UPDATE_SPINUP_RATE   0x00000002
-+#define CSMI_SAS_PHY_AUTO_COMWAKE         0x00000004
-+
-+// Device Types for Phy Settings
-+// (bType)
-+#define CSMI_SAS_UNDEFINED 0x00
-+#define CSMI_SAS_SATA      0x01
-+#define CSMI_SAS_SAS       0x02
-+
-+// Transmitter Flags
-+// (uTransmitterFlags)
-+#define CSMI_SAS_PHY_PREEMPHASIS_DISABLED    0x00000001
-+
-+// Receiver Flags
-+// (uReceiverFlags)
-+#define CSMI_SAS_PHY_EQUALIZATION_DISABLED   0x00000001
-+
-+// Pattern Flags
-+// (uPatternFlags)
-+// #define CSMI_SAS_PHY_ACTIVATE_CONTROL     0x00000001
-+#define CSMI_SAS_PHY_DISABLE_SCRAMBLING      0x00000002
-+#define CSMI_SAS_PHY_DISABLE_ALIGN           0x00000004
-+#define CSMI_SAS_PHY_DISABLE_SSC             0x00000008
-+
-+#define CSMI_SAS_PHY_FIXED_PATTERN           0x00000010
-+#define CSMI_SAS_PHY_USER_PATTERN            0x00000020
-+
-+// Fixed Patterns
-+// (bFixedPattern)
-+#define CSMI_SAS_PHY_CJPAT                   0x00000001
-+#define CSMI_SAS_PHY_ALIGN                   0x00000002
-+
-+// Type Flags
-+// (bTypeFlags)
-+#define CSMI_SAS_PHY_POSITIVE_DISPARITY      0x01
-+#define CSMI_SAS_PHY_NEGATIVE_DISPARITY      0x02
-+#define CSMI_SAS_PHY_CONTROL_CHARACTER       0x04
-+
-+// Miscellaneous
-+#define SLOT_NUMBER_UNKNOWN   0xFFFF
-+
-+/*************************************************************************/
-+/* DATA STRUCTURES                                                       */
-+/*************************************************************************/
-+
-+/* * * * * * * * * * Class Independent Structures * * * * * * * * * */
-+
-+// EDM #pragma CSMI_SAS_BEGIN_PACK(8)
-+#pragma pack(8)
-+
-+// CC_CSMI_SAS_DRIVER_INFO
-+
-+typedef struct _CSMI_SAS_DRIVER_INFO {
-+   __u8  szName[81];
-+   __u8  szDescription[81];
-+   __u16 usMajorRevision;
-+   __u16 usMinorRevision;
-+   __u16 usBuildRevision;
-+   __u16 usReleaseRevision;
-+   __u16 usCSMIMajorRevision;
-+   __u16 usCSMIMinorRevision;
-+} CSMI_SAS_DRIVER_INFO,
-+  *PCSMI_SAS_DRIVER_INFO;
-+
-+typedef struct _CSMI_SAS_DRIVER_INFO_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_DRIVER_INFO Information;
-+} CSMI_SAS_DRIVER_INFO_BUFFER,
-+  *PCSMI_SAS_DRIVER_INFO_BUFFER;
-+
-+// CC_CSMI_SAS_CNTLR_CONFIGURATION
-+
-+typedef struct _CSMI_SAS_PCI_BUS_ADDRESS {
-+   __u8  bBusNumber;
-+   __u8  bDeviceNumber;
-+   __u8  bFunctionNumber;
-+   __u8  bReserved;
-+} CSMI_SAS_PCI_BUS_ADDRESS,
-+  *PCSMI_SAS_PCI_BUS_ADDRESS;
-+
-+typedef union _CSMI_SAS_IO_BUS_ADDRESS {
-+   CSMI_SAS_PCI_BUS_ADDRESS PciAddress;
-+   __u8  bReserved[32];
-+} CSMI_SAS_IO_BUS_ADDRESS,
-+  *PCSMI_SAS_IO_BUS_ADDRESS;
-+
-+typedef struct _CSMI_SAS_CNTLR_CONFIG {
-+   __u32 uBaseIoAddress;
-+   struct {
-+      __u32 uLowPart;
-+      __u32 uHighPart;
-+   } BaseMemoryAddress;
-+   __u32 uBoardID;
-+   __u16 usSlotNumber;
-+   __u8  bControllerClass;
-+   __u8  bIoBusType;
-+   CSMI_SAS_IO_BUS_ADDRESS BusAddress;
-+   __u8  szSerialNumber[81];
-+   __u16 usMajorRevision;
-+   __u16 usMinorRevision;
-+   __u16 usBuildRevision;
-+   __u16 usReleaseRevision;
-+   __u16 usBIOSMajorRevision;
-+   __u16 usBIOSMinorRevision;
-+   __u16 usBIOSBuildRevision;
-+   __u16 usBIOSReleaseRevision;
-+   __u32 uControllerFlags;
-+   __u16 usRromMajorRevision;
-+   __u16 usRromMinorRevision;
-+   __u16 usRromBuildRevision;
-+   __u16 usRromReleaseRevision;
-+   __u16 usRromBIOSMajorRevision;
-+   __u16 usRromBIOSMinorRevision;
-+   __u16 usRromBIOSBuildRevision;
-+   __u16 usRromBIOSReleaseRevision;
-+   __u8  bReserved[7];
-+} CSMI_SAS_CNTLR_CONFIG,
-+  *PCSMI_SAS_CNTLR_CONFIG;
-+
-+typedef struct _CSMI_SAS_CNTLR_CONFIG_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_CNTLR_CONFIG Configuration;
-+} CSMI_SAS_CNTLR_CONFIG_BUFFER,
-+  *PCSMI_SAS_CNTLR_CONFIG_BUFFER;
-+
-+// CC_CSMI_SAS_CNTLR_STATUS
-+
-+typedef struct _CSMI_SAS_CNTLR_STATUS {
-+   __u32 uStatus;
-+   __u32 uOfflineReason;
-+   __u8  bReserved[28];
-+} CSMI_SAS_CNTLR_STATUS,
-+  *PCSMI_SAS_CNTLR_STATUS;
-+
-+typedef struct _CSMI_SAS_CNTLR_STATUS_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_CNTLR_STATUS Status;
-+} CSMI_SAS_CNTLR_STATUS_BUFFER,
-+  *PCSMI_SAS_CNTLR_STATUS_BUFFER;
-+
-+// CC_CSMI_SAS_FIRMWARE_DOWNLOAD
-+
-+typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD {
-+   __u32 uBufferLength;
-+   __u32 uDownloadFlags;
-+   __u8  bReserved[32];
-+   __u16 usStatus;
-+   __u16 usSeverity;
-+} CSMI_SAS_FIRMWARE_DOWNLOAD,
-+  *PCSMI_SAS_FIRMWARE_DOWNLOAD;
-+
-+typedef struct _CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_FIRMWARE_DOWNLOAD Information;
-+   __u8  bDataBuffer[1];
-+} CSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER,
-+  *PCSMI_SAS_FIRMWARE_DOWNLOAD_BUFFER;
-+
-+// CC_CSMI_SAS_RAID_INFO
-+
-+typedef struct _CSMI_SAS_RAID_INFO {
-+   __u32 uNumRaidSets;
-+   __u32 uMaxDrivesPerSet;
-+   __u32 uMaxRaidSets;
-+   __u8  bMaxRaidTypes;
-+   __u8  bReservedByteFields[7];
-+   __u64 ulMinRaidSetBlocks;
-+   __u64 ulMaxRaidSetBlocks;
-+   __u32 uMaxPhysicalDrives;
-+   __u32 uMaxExtents;
-+   __u32 uMaxModules;
-+   __u32 uMaxTransformationMemory;
-+   __u32 uChangeCount;
-+   __u8  bReserved[44];
-+} CSMI_SAS_RAID_INFO,
-+  *PCSMI_SAS_RAID_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_INFO_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_RAID_INFO Information;
-+} CSMI_SAS_RAID_INFO_BUFFER,
-+  *PCSMI_SAS_RAID_INFO_BUFFER;
-+
-+// CC_CSMI_SAS_GET_RAID_CONFIG
-+
-+typedef struct _CSMI_SAS_RAID_DRIVES {
-+   __u8  bModel[40];
-+   __u8  bFirmware[8];
-+   __u8  bSerialNumber[40];
-+   __u8  bSASAddress[8];
-+   __u8  bSASLun[8];
-+   __u8  bDriveStatus;
-+   __u8  bDriveUsage;
-+   __u8  bDriveType;
-+   __u16 usBlockSize;
-+   __u8  bReserved[15];
-+   __u32 uDriveIndex;
-+   __u64 ulTotalUserBlocks;
-+} CSMI_SAS_RAID_DRIVES,
-+  *PCSMI_SAS_RAID_DRIVES;
-+
-+typedef struct _CSMI_SAS_RAID_DEVICE_ID {
-+   __u8  bDeviceIdentificationVPDPage[1];
-+} CSMI_SAS_RAID_DEVICE_ID,
-+  *PCSMI_SAS_RAID_DEVICE_ID;
-+
-+typedef struct _CSMI_SAS_RAID_SET_ADDITIONAL_DATA {
-+   __u8  bLabel[16];
-+   __u8  bRaidSetLun[8];
-+   __u8  bWriteProtection;
-+   __u8  bCacheSetting;
-+   __u8  bCacheRatio;
-+   __u16 usBlockSize;
-+   __u8  bReservedBytes[11];
-+   __u64 ulRaidSetExtentOffset;
-+   __u64 ulRaidSetBlocks;
-+   __u32 uStripeSizeInBlocks;
-+   __u32 uSectorsPerTrack;
-+   __u8  bApplicationScratchPad[16];
-+   __u32 uNumberOfHeads;
-+   __u32 uNumberOfTracks;
-+   __u8  bReserved[24];
-+} CSMI_SAS_RAID_SET_ADDITIONAL_DATA,
-+  *PCSMI_SAS_RAID_SET_ADDITIONAL_DATA;
-+
-+typedef struct _CSMI_SAS_RAID_CONFIG {
-+   __u32 uRaidSetIndex;
-+   __u32 uCapacity;
-+   __u32 uStripeSize;
-+   __u8  bRaidType;
-+   __u8  bStatus;
-+   __u8  bInformation;
-+   __u8  bDriveCount;
-+   __u8  bDataType;
-+   __u8  bReserved[15];
-+   __u32 uChangeCount;
-+   union {
-+      CSMI_SAS_RAID_DRIVES Drives[1];
-+      CSMI_SAS_RAID_DEVICE_ID DeviceId[1];
-+      CSMI_SAS_RAID_SET_ADDITIONAL_DATA Data[1];
-+   };
-+} CSMI_SAS_RAID_CONFIG,
-+   *PCSMI_SAS_RAID_CONFIG;
-+
-+typedef struct _CSMI_SAS_RAID_CONFIG_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_RAID_CONFIG Configuration;
-+} CSMI_SAS_RAID_CONFIG_BUFFER,
-+  *PCSMI_SAS_RAID_CONFIG_BUFFER;
-+
-+// CC_CSMI_SAS_GET_RAID_FEATURES
-+
-+typedef struct _CSMI_SAS_RAID_TYPE_DESCRIPTION {
-+  __u8  bRaidType;
-+  __u8  bReservedBytes[7];
-+  __u32 uSupportedStripeSizeMap;
-+  __u8  bReserved[24];
-+} CSMI_SAS_RAID_TYPE_DESCRIPTION, 
-+  *PCSMI_SAS_RAID_TYPE_DESCRIPTION;
-+
-+typedef struct _CSMI_SAS_RAID_FEATURES {
-+   __u32 uFeatures;
-+   __u8  bReservedFeatures[32];
-+   __u8  bDefaultTransformPriority;
-+   __u8  bTransformPriority;
-+   __u8  bDefaultRebuildPriority;
-+   __u8  bRebuildPriority;
-+   __u8  bDefaultSurfaceScanPriority;
-+   __u8  bSurfaceScanPriority;
-+   __u16 usReserved;
-+   __u32 uRaidSetTransformationRules;
-+   __u32 uReserved[11];
-+   CSMI_SAS_RAID_TYPE_DESCRIPTION RaidType[24];
-+   __u8  bCacheRatiosSupported[104];
-+   __u32 uChangeCount;
-+   __u8  bReserved[124];
-+} CSMI_SAS_RAID_FEATURES,
-+  *PCSMI_SAS_RAID_FEATURES;
-+
-+typedef struct _CSMI_SAS_RAID_FEATURES_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_RAID_FEATURES Information;
-+} CSMI_SAS_RAID_FEATURES_BUFFER,
-+  *PCSMI_SAS_RAID_FEATURES_BUFFER;
-+
-+// CC_CSMI_SAS_SET_RAID_CONTROL
-+
-+typedef struct _CSMI_SAS_RAID_CONTROL {
-+   __u8  bTransformPriority;
-+   __u8  bRebuildPriority;
-+   __u8  bCacheRatioFlag;
-+   __u8  bCacheRatio;
-+   __u8  bSurfaceScanPriority;
-+   __u8  bReservedBytes[15];
-+   __u8  bClearConfiguration[8];
-+   __u32 uChangeCount;
-+   __u8  bReserved[88];
-+   __u32 uFailureCode;
-+   __u8  bFailureDescription[80];
-+} CSMI_SAS_RAID_CONTROL,
-+  *PCSMI_SAS_RAID_CONTROL;
-+
-+typedef struct _CSMI_SAS_RAID_CONTROL_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_RAID_CONTROL Information;
-+} CSMI_SAS_RAID_CONTROL_BUFFER,
-+  *PCSMI_SAS_RAID_CONTROL_BUFFER;
-+
-+// CC_CSMI_SAS_GET_RAID_ELEMENT
-+
-+typedef struct _CSMI_SAS_DRIVE_EXTENT_INFO {
-+   __u32 uDriveIndex;
-+   __u8  bExtentType;
-+   __u8  bReservedBytes[7];
-+   __u64 ulExtentOffset;
-+   __u64 ulExtentBlocks;
-+   __u32 uRaidSetIndex;
-+   __u8  bReserved[96];
-+} CSMI_SAS_DRIVE_EXTENT_INFO, 
-+  *PCSMI_SAS_DRIVE_EXTENT_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_MODULE_INFO {
-+   __u8  bReserved[128];
-+} CSMI_SAS_RAID_MODULE_INFO, 
-+  *PCSMI_SAS_RAID_MODULE_INFO;
-+
-+typedef struct _CSMI_SAS_DRIVE_LOCATION {
-+   __u8  bConnector[16];
-+   __u8  bBoxName[16];
-+   __u32 uBay;
-+   __u8  bReservedBytes[4];
-+   __u8  bAttachedSASAddress[8];
-+   __u8  bAttachedPhyIdentifier;
-+   __u8  bReserved[79];
-+} CSMI_SAS_DRIVE_LOCATION, 
-+  *PCSMI_SAS_DRIVE_LOCATION;
-+
-+typedef struct _CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA {
-+   __u8  bNegotiatedLinkRate[2];
-+   __u8  bReserved[126];
-+} CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA, 
-+  *PCSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA;
-+
-+typedef struct _CSMI_SAS_DRIVE_INFO {
-+   CSMI_SAS_RAID_DRIVES Device;
-+   CSMI_SAS_RAID_DRIVES_ADDITIONAL_DATA Data;
-+   CSMI_SAS_DRIVE_LOCATION Location; 
-+   __u8  bReserved[16];
-+} CSMI_SAS_DRIVE_INFO, 
-+  *PCSMI_SAS_DRIVE_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_ELEMENT { 
-+   __u32 uEnumerationType;
-+   __u32 uElementIndex;
-+   __u32 uNumElements;
-+   __u32 uChangeCount;
-+   __u32 uSubElementIndex;
-+   __u8  bReserved[32];
-+   __u32 uFailureCode;
-+   __u8  bFailureDescription[80];
-+   union {
-+       CSMI_SAS_DRIVE_INFO Drive;
-+       CSMI_SAS_RAID_MODULE_INFO Module;
-+       CSMI_SAS_DRIVE_EXTENT_INFO Extent;
-+   } Element;
-+} CSMI_SAS_RAID_ELEMENT,
-+  *PCSMI_SAS_RAID_ELEMENT;
-+
-+typedef struct _CSMI_SAS_RAID_ELEMENT_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_RAID_ELEMENT Information;
-+} CSMI_SAS_RAID_ELEMENT_BUFFER,
-+  *PCSMI_SAS_RAID_ELEMENT_BUFFER;
-+
-+// CC_CSMI_SAS_SET_RAID_OPERATION
-+
-+typedef struct _CSMI_SAS_RAID_SET_LIST {
-+   __u32 uRaidSetIndex;
-+   __u8  bExistingLun[8]; 
-+   __u8  bNewLun[8]; 
-+   __u8  bReserved[12];
-+} CSMI_SAS_RAID_SET_LIST, 
-+  *PCSMI_SAS_RAID_SET_LIST;
-+
-+typedef struct _CSMI_SAS_RAID_SET_DRIVE_LIST {
-+   __u32 uDriveIndex;
-+   __u8  bDriveUsage;
-+   __u8  bReserved[27];
-+} CSMI_SAS_RAID_SET_DRIVE_LIST, 
-+  *PCSMI_SAS_RAID_SET_DRIVE_LIST;
-+
-+typedef struct _CSMI_SAS_RAID_SET_SPARE_INFO {
-+   __u32 uRaidSetIndex;
-+   __u32 uDriveCount;
-+   __u8  bApplicationScratchPad[16];
-+   __u8  bReserved[104];  
-+} CSMI_SAS_RAID_SET_SPARE_INFO, 
-+  *PCSMI_SAS_RAID_SET_SPARE_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_ONLINE_STATE_INFO {
-+   __u32 uRaidSetIndex;
-+   __u8  bOnlineState;
-+   __u8  bReserved[123];  
-+} CSMI_SAS_RAID_SET_ONLINE_STATE_INFO, 
-+  *PCSMI_SAS_RAID_SET_ONLINE_STATE_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_CACHE_INFO {
-+   __u32 uRaidSetIndex;
-+   __u8  bCacheSetting;
-+   __u8  bCacheRatioFlag;
-+   __u8  bCacheRatio;
-+   __u8  bReserved[121];  
-+} CSMI_SAS_RAID_SET_CACHE_INFO, 
-+  *PCSMI_SAS_RAID_SET_CACHE_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO {
-+   __u32 uRaidSetIndex;
-+   __u8  bWriteProtectSetting;
-+   __u8  bReserved[123];  
-+} CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO, 
-+  *PCSMI_SAS_RAID_SET_WRITE_PROTECT_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_DELETE_INFO {
-+   __u32 uRaidSetIndex;
-+   __u8  bReserved[124];  
-+} CSMI_SAS_RAID_SET_DELETE_INFO, 
-+  *PCSMI_SAS_RAID_SET_DELETE_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_MODIFY_INFO {
-+   __u8  bRaidType;
-+   __u8  bReservedBytes[7];
-+   __u32 uStripeSize;
-+   __u64 ulRaidSetBlocks;
-+   __u64 ulRaidSetExtentOffset;
-+   __u32 uDriveCount;
-+   __u8  bReserved[96];
-+} CSMI_SAS_RAID_SET_MODIFY_INFO, 
-+  *PCSMI_SAS_RAID_SET_MODIFY_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_TRANSFORM_INFO {
-+   __u8  bTransformType;
-+   __u8  bReservedBytes[3];
-+   __u32 uRaidSetIndex;
-+   __u8  bRaidType;
-+   __u8  bReservedBytes2[11];
-+   __u32 uAdditionalRaidSetIndex;
-+   __u32 uRaidSetCount;
-+   __u8  bApplicationScratchPad[16];
-+   CSMI_SAS_RAID_SET_MODIFY_INFO Modify;
-+   __u8  bReserved[80];
-+} CSMI_SAS_RAID_SET_TRANSFORM_INFO, 
-+  *PCSMI_SAS_RAID_SET_TRANSFORM_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_LABEL_INFO {
-+   __u32 uRaidSetIndex;
-+   __u8  bLabel[16];
-+   __u8  bReserved[108];  
-+} CSMI_SAS_RAID_SET_LABEL_INFO, 
-+  *PCSMI_SAS_RAID_SET_LABEL_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_CREATE_INFO {
-+   __u8  bRaidType;
-+   __u8  bReservedBytes[7];
-+   __u32 uStripeSize;
-+   __u32 uTrackSectorCount;
-+   __u64 ulRaidSetBlocks; 
-+   __u64 ulRaidSetExtentOffset;
-+   __u32 uDriveCount;
-+   __u8  bLabel[16];
-+   __u32 uRaidSetIndex;
-+   __u8  bApplicationScratchPad[16];
-+   __u32 uNumberOfHeads;
-+   __u32 uNumberOfTracks;
-+   __u8  bReserved[48];  
-+} CSMI_SAS_RAID_SET_CREATE_INFO, 
-+  *PCSMI_SAS_RAID_SET_CREATE_INFO;
-+
-+typedef struct _CSMI_SAS_RAID_SET_OPERATION { 
-+   __u32 uOperationType;
-+   __u32 uChangeCount;
-+   __u32 uFailureCode;
-+   __u8  bFailureDescription[80];
-+   __u8  bReserved[28];
-+   union {
-+       CSMI_SAS_RAID_SET_CREATE_INFO Create;
-+       CSMI_SAS_RAID_SET_LABEL_INFO Label;
-+       CSMI_SAS_RAID_SET_TRANSFORM_INFO Transform;
-+       CSMI_SAS_RAID_SET_DELETE_INFO Delete;
-+       CSMI_SAS_RAID_SET_WRITE_PROTECT_INFO Protect;
-+       CSMI_SAS_RAID_SET_CACHE_INFO Cache;
-+       CSMI_SAS_RAID_SET_ONLINE_STATE_INFO State;
-+       CSMI_SAS_RAID_SET_SPARE_INFO Spare;
-+   } Operation;
-+   union {
-+       CSMI_SAS_RAID_SET_DRIVE_LIST DriveList[1];
-+       CSMI_SAS_RAID_SET_LIST RaidSetList[1];
-+   } Parameters;
-+} CSMI_SAS_RAID_SET_OPERATION,
-+  *PCSMI_SAS_RAID_SET_OPERATION;
-+
-+typedef struct _CSMI_SAS_RAID_SET_OPERATION_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_RAID_SET_OPERATION Information;
-+} CSMI_SAS_RAID_SET_OPERATION_BUFFER,
-+  *PCSMI_SAS_RAID_SET_OPERATION_BUFFER;
-+
-+/* * * * * * * * * * SAS HBA Class Structures * * * * * * * * * */
-+
-+// CC_CSMI_SAS_GET_PHY_INFO
-+
-+typedef struct _CSMI_SAS_IDENTIFY {
-+   __u8  bDeviceType;
-+   __u8  bRestricted;
-+   __u8  bInitiatorPortProtocol;
-+   __u8  bTargetPortProtocol;
-+   __u8  bRestricted2[8];
-+   __u8  bSASAddress[8];
-+   __u8  bPhyIdentifier;
-+   __u8  bSignalClass;
-+   __u8  bReserved[6];
-+} CSMI_SAS_IDENTIFY,
-+  *PCSMI_SAS_IDENTIFY;
-+
-+typedef struct _CSMI_SAS_PHY_ENTITY {
-+   CSMI_SAS_IDENTIFY Identify;
-+   __u8  bPortIdentifier;
-+   __u8  bNegotiatedLinkRate;
-+   __u8  bMinimumLinkRate;
-+   __u8  bMaximumLinkRate;
-+   __u8  bPhyChangeCount;
-+   __u8  bAutoDiscover;
-+   __u8  bPhyFeatures;
-+   __u8  bReserved;
-+   CSMI_SAS_IDENTIFY Attached;
-+} CSMI_SAS_PHY_ENTITY,
-+  *PCSMI_SAS_PHY_ENTITY;
-+
-+typedef struct _CSMI_SAS_PHY_INFO {
-+   __u8  bNumberOfPhys;
-+   __u8  bReserved[3];
-+   CSMI_SAS_PHY_ENTITY Phy[32];
-+} CSMI_SAS_PHY_INFO,
-+  *PCSMI_SAS_PHY_INFO;
-+
-+typedef struct _CSMI_SAS_PHY_INFO_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_PHY_INFO Information;
-+} CSMI_SAS_PHY_INFO_BUFFER,
-+  *PCSMI_SAS_PHY_INFO_BUFFER;
-+
-+// CC_CSMI_SAS_SET_PHY_INFO
-+
-+typedef struct _CSMI_SAS_SET_PHY_INFO {
-+   __u8  bPhyIdentifier;
-+   __u8  bNegotiatedLinkRate;
-+   __u8  bProgrammedMinimumLinkRate;
-+   __u8  bProgrammedMaximumLinkRate;
-+   __u8  bSignalClass;
-+   __u8  bReserved[3];
-+} CSMI_SAS_SET_PHY_INFO,
-+  *PCSMI_SAS_SET_PHY_INFO;
-+
-+typedef struct _CSMI_SAS_SET_PHY_INFO_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_SET_PHY_INFO Information;
-+} CSMI_SAS_SET_PHY_INFO_BUFFER,
-+  *PCSMI_SAS_SET_PHY_INFO_BUFFER;
-+
-+// CC_CSMI_SAS_GET_LINK_ERRORS
-+
-+typedef struct _CSMI_SAS_LINK_ERRORS {
-+   __u8  bPhyIdentifier;
-+   __u8  bResetCounts;
-+   __u8  bReserved[2];
-+   __u32 uInvalidDwordCount;
-+   __u32 uRunningDisparityErrorCount;
-+   __u32 uLossOfDwordSyncCount;
-+   __u32 uPhyResetProblemCount;
-+} CSMI_SAS_LINK_ERRORS,
-+  *PCSMI_SAS_LINK_ERRORS;
-+
-+typedef struct _CSMI_SAS_LINK_ERRORS_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_LINK_ERRORS Information;
-+} CSMI_SAS_LINK_ERRORS_BUFFER,
-+  *PCSMI_SAS_LINK_ERRORS_BUFFER;
-+
-+// CC_CSMI_SAS_SMP_PASSTHRU
-+
-+typedef struct _CSMI_SAS_SMP_REQUEST {
-+   __u8  bFrameType;
-+   __u8  bFunction;
-+   __u8  bReserved[2];
-+   __u8  bAdditionalRequestBytes[1016];
-+} CSMI_SAS_SMP_REQUEST,
-+  *PCSMI_SAS_SMP_REQUEST;
-+
-+typedef struct _CSMI_SAS_SMP_RESPONSE {
-+   __u8  bFrameType;
-+   __u8  bFunction;
-+   __u8  bFunctionResult;
-+   __u8  bReserved;
-+   __u8  bAdditionalResponseBytes[1016];
-+} CSMI_SAS_SMP_RESPONSE,
-+  *PCSMI_SAS_SMP_RESPONSE;
-+
-+typedef struct _CSMI_SAS_SMP_PASSTHRU {
-+   __u8  bPhyIdentifier;
-+   __u8  bPortIdentifier;
-+   __u8  bConnectionRate;
-+   __u8  bReserved;
-+   __u8  bDestinationSASAddress[8];
-+   __u32 uRequestLength;
-+   CSMI_SAS_SMP_REQUEST Request;
-+   __u8  bConnectionStatus;
-+   __u8  bReserved2[3];
-+   __u32 uResponseBytes;
-+   CSMI_SAS_SMP_RESPONSE Response;
-+} CSMI_SAS_SMP_PASSTHRU,
-+  *PCSMI_SAS_SMP_PASSTHRU;
-+
-+typedef struct _CSMI_SAS_SMP_PASSTHRU_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_SMP_PASSTHRU Parameters;
-+} CSMI_SAS_SMP_PASSTHRU_BUFFER,
-+  *PCSMI_SAS_SMP_PASSTHRU_BUFFER;
-+
-+// CC_CSMI_SAS_SSP_PASSTHRU
-+
-+typedef struct _CSMI_SAS_SSP_PASSTHRU {
-+   __u8  bPhyIdentifier;
-+   __u8  bPortIdentifier;
-+   __u8  bConnectionRate;
-+   __u8  bReserved;
-+   __u8  bDestinationSASAddress[8];
-+   __u8  bLun[8];
-+   __u8  bCDBLength;
-+   __u8  bAdditionalCDBLength;
-+   __u8  bReserved2[2];
-+   __u8  bCDB[16];
-+   __u32 uFlags;
-+   __u8  bAdditionalCDB[24];
-+   __u32 uDataLength;
-+} CSMI_SAS_SSP_PASSTHRU,
-+  *PCSMI_SAS_SSP_PASSTHRU;
-+
-+typedef struct _CSMI_SAS_SSP_PASSTHRU_STATUS {
-+   __u8  bConnectionStatus;
-+   __u8  bSSPStatus;
-+   __u8  bReserved[2];
-+   __u8  bDataPresent;
-+   __u8  bStatus;
-+   __u8  bResponseLength[2];
-+   __u8  bResponse[256];
-+   __u32 uDataBytes;
-+} CSMI_SAS_SSP_PASSTHRU_STATUS,
-+  *PCSMI_SAS_SSP_PASSTHRU_STATUS;
-+
-+typedef struct _CSMI_SAS_SSP_PASSTHRU_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_SSP_PASSTHRU Parameters;
-+   CSMI_SAS_SSP_PASSTHRU_STATUS Status;
-+   __u8  bDataBuffer[1];
-+} CSMI_SAS_SSP_PASSTHRU_BUFFER,
-+  *PCSMI_SAS_SSP_PASSTHRU_BUFFER;
-+
-+// CC_CSMI_SAS_STP_PASSTHRU
-+
-+typedef struct _CSMI_SAS_STP_PASSTHRU {
-+   __u8  bPhyIdentifier;
-+   __u8  bPortIdentifier;
-+   __u8  bConnectionRate;
-+   __u8  bReserved;
-+   __u8  bDestinationSASAddress[8];
-+   __u8  bReserved2[4];
-+   __u8  bCommandFIS[20];
-+   __u32 uFlags;
-+   __u32 uDataLength;
-+} CSMI_SAS_STP_PASSTHRU,
-+  *PCSMI_SAS_STP_PASSTHRU;
-+
-+typedef struct _CSMI_SAS_STP_PASSTHRU_STATUS {
-+   __u8  bConnectionStatus;
-+   __u8  bReserved[3];
-+   __u8  bStatusFIS[20];
-+   __u32 uSCR[16];
-+   __u32 uDataBytes;
-+} CSMI_SAS_STP_PASSTHRU_STATUS,
-+  *PCSMI_SAS_STP_PASSTHRU_STATUS;
-+
-+typedef struct _CSMI_SAS_STP_PASSTHRU_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_STP_PASSTHRU Parameters;
-+   CSMI_SAS_STP_PASSTHRU_STATUS Status;
-+   __u8  bDataBuffer[1];
-+} CSMI_SAS_STP_PASSTHRU_BUFFER,
-+  *PCSMI_SAS_STP_PASSTHRU_BUFFER;
-+
-+// CC_CSMI_SAS_GET_SATA_SIGNATURE
-+
-+typedef struct _CSMI_SAS_SATA_SIGNATURE {
-+   __u8  bPhyIdentifier;
-+   __u8  bReserved[3];
-+   __u8  bSignatureFIS[20];
-+} CSMI_SAS_SATA_SIGNATURE,
-+  *PCSMI_SAS_SATA_SIGNATURE;
-+
-+typedef struct _CSMI_SAS_SATA_SIGNATURE_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_SATA_SIGNATURE Signature;
-+} CSMI_SAS_SATA_SIGNATURE_BUFFER,
-+  *PCSMI_SAS_SATA_SIGNATURE_BUFFER;
-+
-+// CC_CSMI_SAS_GET_SCSI_ADDRESS
-+
-+typedef struct _CSMI_SAS_GET_SCSI_ADDRESS_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   __u8  bSASAddress[8];
-+   __u8  bSASLun[8];
-+   __u8  bHostIndex;
-+   __u8  bPathId;
-+   __u8  bTargetId;
-+   __u8  bLun;
-+} CSMI_SAS_GET_SCSI_ADDRESS_BUFFER,
-+   *PCSMI_SAS_GET_SCSI_ADDRESS_BUFFER;
-+
-+// CC_CSMI_SAS_GET_DEVICE_ADDRESS
-+
-+typedef struct _CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   __u8  bHostIndex;
-+   __u8  bPathId;
-+   __u8  bTargetId;
-+   __u8  bLun;
-+   __u8  bSASAddress[8];
-+   __u8  bSASLun[8];
-+} CSMI_SAS_GET_DEVICE_ADDRESS_BUFFER,
-+  *PCSMI_SAS_GET_DEVICE_ADDRESS_BUFFER;
-+
-+// CC_CSMI_SAS_TASK_MANAGEMENT
-+
-+typedef struct _CSMI_SAS_SSP_TASK_IU {
-+   __u8  bHostIndex;
-+   __u8  bPathId;
-+   __u8  bTargetId;
-+   __u8  bLun;
-+   __u32 uFlags;
-+   __u32 uQueueTag;
-+   __u32 uReserved;
-+   __u8  bTaskManagementFunction;
-+   __u8  bReserved[7];
-+   __u32 uInformation;
-+} CSMI_SAS_SSP_TASK_IU,
-+  *PCSMI_SAS_SSP_TASK_IU;
-+
-+typedef struct _CSMI_SAS_SSP_TASK_IU_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_SSP_TASK_IU Parameters;
-+   CSMI_SAS_SSP_PASSTHRU_STATUS Status;
-+} CSMI_SAS_SSP_TASK_IU_BUFFER,
-+  *PCSMI_SAS_SSP_TASK_IU_BUFFER;
-+
-+// CC_CSMI_SAS_GET_CONNECTOR_INFO
-+
-+typedef struct _CSMI_SAS_GET_CONNECTOR_INFO {
-+   __u32 uPinout;
-+   __u8  bConnector[16];
-+   __u8  bLocation;
-+   __u8  bReserved[15];
-+} CSMI_SAS_CONNECTOR_INFO,
-+  *PCSMI_SAS_CONNECTOR_INFO;
-+
-+typedef struct _CSMI_SAS_CONNECTOR_INFO_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   CSMI_SAS_CONNECTOR_INFO Reference[32];
-+} CSMI_SAS_CONNECTOR_INFO_BUFFER,
-+  *PCSMI_SAS_CONNECTOR_INFO_BUFFER;
-+
-+// CC_CSMI_SAS_GET_LOCATION
-+
-+typedef struct _CSMI_SAS_LOCATION_IDENTIFIER {
-+   __u32 bLocationFlags;
-+   __u8  bSASAddress[8];
-+   __u8  bSASLun[8];
-+   __u8  bEnclosureIdentifier[8];
-+   __u8  bEnclosureName[32];
-+   __u8  bBayPrefix[32];
-+   __u8  bBayIdentifier;
-+   __u8  bLocationState;
-+   __u8  bReserved[2];
-+} CSMI_SAS_LOCATION_IDENTIFIER,
-+  *PCSMI_SAS_LOCATION_IDENTIFIER;
-+
-+typedef struct _CSMI_SAS_GET_LOCATION_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   __u8  bHostIndex;
-+   __u8  bPathId;
-+   __u8  bTargetId;
-+   __u8  bLun;
-+   __u8  bIdentify;
-+   __u8  bNumberOfLocationIdentifiers;
-+   __u8  bLengthOfLocationIdentifier;
-+   CSMI_SAS_LOCATION_IDENTIFIER Location[1];
-+} CSMI_SAS_GET_LOCATION_BUFFER,
-+  *PCSMI_SAS_GET_LOCATION_BUFFER;
-+
-+// CC_CSMI_SAS_PHY_CONTROL
-+
-+typedef struct _CSMI_SAS_CHARACTER {
-+   __u8  bTypeFlags;
-+   __u8  bValue;
-+} CSMI_SAS_CHARACTER,
-+  *PCSMI_SAS_CHARACTER;
-+
-+typedef struct _CSMI_SAS_PHY_CONTROL {
-+   __u8  bType;
-+   __u8  bRate;
-+   __u8  bReserved[6];
-+   __u32 uVendorUnique[8];
-+   __u32 uTransmitterFlags;
-+   __i8  bTransmitAmplitude;
-+   __i8  bTransmitterPreemphasis;
-+   __i8  bTransmitterSlewRate;
-+   __i8  bTransmitterReserved[13];
-+   __u8  bTransmitterVendorUnique[64];
-+   __u32 uReceiverFlags;
-+   __i8  bReceiverThreshold;
-+   __i8  bReceiverEqualizationGain;
-+   __i8  bReceiverReserved[14];
-+   __u8  bReceiverVendorUnique[64];
-+   __u32 uPatternFlags;
-+   __u8  bFixedPattern;
-+   __u8  bUserPatternLength;
-+   __u8  bPatternReserved[6];
-+   CSMI_SAS_CHARACTER UserPatternBuffer[16];
-+} CSMI_SAS_PHY_CONTROL,
-+  *PCSMI_SAS_PHY_CONTROL;
-+
-+typedef struct _CSMI_SAS_PHY_CONTROL_BUFFER {
-+   IOCTL_HEADER IoctlHeader;
-+   __u32 uFunction;
-+   __u8  bPhyIdentifier;
-+   __u16 usLengthOfControl;
-+   __u8  bNumberOfControls;
-+   __u8  bReserved[4];
-+   __u32 uLinkFlags;
-+   __u8  bSpinupRate;
-+   __u8  bLinkReserved[7];
-+   __u32 uVendorUnique[8];
-+   CSMI_SAS_PHY_CONTROL Control[1];
-+} CSMI_SAS_PHY_CONTROL_BUFFER,
-+  *PCSMI_SAS_PHY_CONTROL_BUFFER;
-+
-+// EDN #pragma CSMI_SAS_END_PACK
-+#pragma pack()
-+
-+#endif // _CSMI_SAS_H_
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/Makefile linux-2.6.9-55.0.12/drivers/message/fusion/Makefile
---- linux-2.6.9-67.0.1/drivers/message/fusion/Makefile	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/Makefile	2007-11-02 09:10:23.000000000 +0100
-@@ -8,8 +8,6 @@
- #EXTRA_CFLAGS += -DMPT_DEBUG_EXIT
- #EXTRA_CFLAGS += -DMPT_DEBUG_FAIL
- #EXTRA_CFLAGS  += -DMPT_DEBUG_SAS
--EXTRA_CFLAGS += -DCPQ_CIM
--EXTRA_CFLAGS += -DMPT_SUPPORT_FWDLB_IOCTL
- 
- #
- # driver/module specifics...
-@@ -31,6 +29,7 @@ EXTRA_CFLAGS += -DMPT_SUPPORT_FWDLB_IOCT
- #
- #  For mptctl:
- #CFLAGS_mptctl.o += -DMPT_DEBUG_IOCTL
-+CFLAGS_mptctl.o  += -DCPQ_CIM
- #
- #  For mptsas:
- #CFLAGS_mptsas.o += -DMPT_DEBUG_HOTPLUG
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.c linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.c	2007-11-02 09:10:23.000000000 +0100
-@@ -5,8 +5,8 @@
-  *      For use with LSI Logic PCI chip/adapter(s)
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  *  $Id: mptbase.c,v 1.130 2003/05/07 14:08:30 Exp $
-  */
-@@ -93,8 +93,6 @@ MODULE_VERSION(MPT_LINUX_VERSION_COMMON)
- char *mptbase = NULL;
- 
- /* Command line args */
--
--
- int mpt_can_queue = 128;
- module_param(mpt_can_queue, int, 0);
- MODULE_PARM_DESC(mpt_can_queue, " Max IO depth per controller (default=128)");
-@@ -115,11 +113,6 @@ static int mpt_msi_enable = 0;
- module_param(mpt_msi_enable, int, 0);
- MODULE_PARM_DESC(mpt_msi_enable, " MSI Support Enable (default=0)");
- 
--int mpt_enable_deadioc_detect = 0;
--module_param(mpt_enable_deadioc_detect, int, 0);
--MODULE_PARM_DESC(mpt_enable_deadioc_detect, "Detection of Dead IOC Enable (default=0)");
--
--//@@@@
- #ifdef MFCNT
- static int mfcounter = 0;
- #define PRINT_MF_COUNT 20000
-@@ -163,13 +156,10 @@ static DECLARE_WAIT_QUEUE_HEAD(mpt_waitq
-  */
- static irqreturn_t mpt_interrupt(int irq, void *bus_id, struct pt_regs *r);
- static int	mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRAME_HDR *req, MPT_FRAME_HDR *reply);
--int	mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes,
-+static int	mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes,
- 			u32 *req, int replyBytes, u16 *u16reply, int maxwait,
- 			int sleepFlag);
--int    	        mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag);
--int             mpt_writeSDP1(MPT_ADAPTER *hd, int portnum, int id, int flags);
--void    mpt_setSDP1parameters (u8 width, u8 factor, u8 offset, u8 flags, int *requestedPtr, int *configurationPtr);
--
-+static int	mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag);
- static void	mpt_detect_bound_ports(MPT_ADAPTER *ioc, struct pci_dev *pdev);
- static void	mpt_adapter_disable(MPT_ADAPTER *ioc);
- static void	mpt_adapter_dispose(MPT_ADAPTER *ioc);
-@@ -187,7 +177,7 @@ static int	mpt_do_upload(MPT_ADAPTER *io
- int		mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag);
- static int	mpt_diag_reset(MPT_ADAPTER *ioc, int ignore, int sleepFlag);
- static int	KickStart(MPT_ADAPTER *ioc, int ignore, int sleepFlag);
--int             mpt_SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag);
-+static int	SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag);
- static int	PrimeIocFifos(MPT_ADAPTER *ioc);
- static int	WaitForDoorbellAck(MPT_ADAPTER *ioc, int howlong, int sleepFlag);
- static int	WaitForDoorbellInt(MPT_ADAPTER *ioc, int howlong, int sleepFlag);
-@@ -197,6 +187,9 @@ static int	GetFcPortPage0(MPT_ADAPTER *i
- static int	GetIoUnitPage2(MPT_ADAPTER *ioc);
- static int	GetManufPage5(MPT_ADAPTER *ioc, int numPorts);
- static int	GetManufPage0(MPT_ADAPTER *ioc);
-+int		mpt_sas_get_info(MPT_ADAPTER *ioc);
-+static void	mptbase_sas_process_event_data(MPT_ADAPTER *ioc,
-+		    MpiEventDataSasDeviceStatusChange_t * pSasEventData);
- int		mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode);
- static void	mptbase_raid_process_event_data(MPT_ADAPTER *ioc,
- 		    MpiEventDataRaid_t * pRaidEventData);
-@@ -204,7 +197,6 @@ static int	mpt_GetScsiPortSettings(MPT_A
- static int	mpt_readScsiDevicePageHeaders(MPT_ADAPTER *ioc, int portnum);
- static void 	mpt_read_ioc_pg_1(MPT_ADAPTER *ioc);
- static void 	mpt_read_ioc_pg_4(MPT_ADAPTER *ioc);
--static void 	mpt_read_ioc_pg_6(MPT_ADAPTER *ioc);
- static void	mpt_timer_expired(unsigned long data);
- static int	SendEventNotification(MPT_ADAPTER *ioc, u8 EvSwitch);
- static int	SendEventAck(MPT_ADAPTER *ioc, EventNotificationReply_t *evnp);
-@@ -227,7 +219,6 @@ static void	mpt_sp_ioc_info(MPT_ADAPTER 
- static void	mpt_fc_log_info(MPT_ADAPTER *ioc, u32 log_info);
- static void	mpt_spi_log_info(MPT_ADAPTER *ioc, u32 log_info);
- static void	mpt_sas_log_info(MPT_ADAPTER *ioc, u32 log_info);
--static void	mpt_inactive_raid_list_free(MPT_ADAPTER *ioc);
- 
- /* module entry point */
- static int  __init    fusion_init  (void);
-@@ -273,10 +264,10 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa
- {
- 	MPT_FRAME_HDR *mf = NULL;
- 	MPT_FRAME_HDR *mr = NULL;
--	int req_idx;
-+	int req_idx = 0;
- 	int cb_idx;
- 
--	dmfprintk((MYIOC_s_INFO_FMT "Got TURBO reply pa=%08x\n",
-+	dmfprintk((MYIOC_s_INFO_FMT "Got TURBO reply req_idx=%08x\n",
- 				ioc->name, pa));
- 
- 	switch (pa >> MPI_CONTEXT_REPLY_TYPE_SHIFT) {
-@@ -312,9 +303,7 @@ mpt_turbo_reply(MPT_ADAPTER *ioc, u32 pa
- 		break;
- 	default:
- 		cb_idx = 0;
--		printk(MYIOC_s_WARN_FMT "%s: Invalid REPLY_TYPE in pa=%08x!\n",
--			__FUNCTION__, ioc->name, pa);
--//		BUG();
-+		BUG();
- 	}
- 
- 	/*  Check for (valid) IO callback!  */
-@@ -342,12 +331,6 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
- 
- 	u32 reply_dma_low;
- 	u16 ioc_stat;
--#ifdef MPT_DEBUG_REPLY
--	u8  function;
--	MPT_FRAME_HDR *chain;
--	int chain_idx, chain_number, next;
--#endif
--
- 
- 	/* non-TURBO reply!  Hmmm, something may be up...
- 	 *  Newest turbo reply mechanism; get address
-@@ -367,44 +350,21 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
- 	cb_idx = mr->u.frame.hwhdr.msgctxu.fld.cb_idx;
- 	mf = MPT_INDEX_2_MFPTR(ioc, req_idx);
- 
--	ioc_stat = le16_to_cpu(mr->u.reply.IOCStatus);
--#ifdef MPT_DEBUG_REPLY
--         if ((ioc_stat != MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE) && /* 0x0043 */
--	      (ioc_stat != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN)) {    /* 0x0045 */
--		function = mr->u.hdr.Function;
--		dreplyprintk((MYIOC_s_WARN_FMT "non-TURBO reply context=%04x%04x Function=%x IOCStatus=%04x\n",
--			ioc->name, cb_idx, req_idx, function, ioc_stat));
--		DBG_DUMP_REPLY_FRAME(mr)
--
--		printk("Request:\n");
--                DBG_DUMP_REPLYS_REQUEST_FRAME(ioc, mf)
--		chain_number = 1;
--		chain_idx = ioc->ReqToChain[req_idx];
--		while (chain_idx != MPT_HOST_NO_CHAIN) {
--			next = ioc->ChainToChain[chain_idx];
--			chain = (MPT_FRAME_HDR *) (ioc->ChainBuffer
--				+ (chain_idx * ioc->req_sz));
--			printk("Chain %d:\n", chain_number++);
--                        DBG_DUMP_REPLYS_REQUEST_FRAME(ioc, chain)
--			chain_idx = next;
--		}
--	}
--#endif
-+	dmfprintk((MYIOC_s_INFO_FMT "Got non-TURBO reply=%p req_idx=%x cb_idx=%x Function=%x\n",
-+			ioc->name, mr, req_idx, cb_idx, mr->u.hdr.Function));
-+	DBG_DUMP_REPLY_FRAME(mr)
- 
- 	 /*  Check/log IOC log info
- 	 */
-+	ioc_stat = le16_to_cpu(mr->u.reply.IOCStatus);
- 	if (ioc_stat & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
- 		u32	 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo);
- 		if (ioc->bus_type == FC)
- 			mpt_fc_log_info(ioc, log_info);
- 		else if (ioc->bus_type == SPI)
- 			mpt_spi_log_info(ioc, log_info);
--		else if (ioc->bus_type == SAS) {
--			printk(MYIOC_s_INFO_FMT
--				"IOCStatus=%04x LogInfo=%08x ",
--				ioc->name, ioc_stat, log_info);
-+		else if (ioc->bus_type == SAS)
- 			mpt_sas_log_info(ioc, log_info);
--		}
- 	}
- 	if (ioc_stat & MPI_IOCSTATUS_MASK) {
- 		if (ioc->bus_type == SPI &&
-@@ -432,31 +392,6 @@ mpt_reply(MPT_ADAPTER *ioc, u32 pa)
- 	if (freeme)
- 		mpt_free_msg_frame(ioc, mf);
- 	mb();
--if (ioc->CheckFcLinkSpeed &&
--	    ioc->FcLinkSpeedCheckNeeded &&
--	    ioc->FcLinkSpeedReqActive == NULL &&
--	    (mf = mpt_get_msg_frame(mpt_base_index, ioc))) {
--		pConfig_t	pConfigMsg;
--		dma_addr_t	physAddr;
--
--		ioc->FcLinkSpeedCheckNeeded = 0;
--		ioc->FcLinkSpeedReqActive = mf;
--		pConfigMsg = (pConfig_t)mf;
--		/* there's enough room, so FCPortPage0 will be put in the mf */
--		physAddr = ioc->req_frames_dma + sizeof(pConfig_t) +
--			(u8 *)mf - (u8 *)ioc->req_frames;
--		memset(pConfigMsg, 0, ioc->req_sz);
--		pConfigMsg->Action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--		pConfigMsg->Function = MPI_FUNCTION_CONFIG;
--		pConfigMsg->Header.PageType = MPI_CONFIG_PAGETYPE_FC_PORT;
--		pConfigMsg->Header.PageNumber = 0;
--		pConfigMsg->Header.PageLength = sizeof(FCPortPage0_t) / 4;
--		pConfigMsg->Header.PageVersion = MPI_FCPORTPAGE0_PAGEVERSION;
--		mpt_add_sge((char *)&pConfigMsg->PageBufferSGE,
--			MPT_SGE_FLAGS_SSIMPLE_READ + sizeof(FCPortPage0_t),
--			physAddr);
--		mpt_put_msg_frame(mpt_base_index, ioc, mf);
--        }
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -543,17 +478,15 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRA
- 		}
- 
- 		/*
--		 *	 EventNotificationReply is an exception
-+		 *	Hmmm...  It seems that EventNotificationReply is an exception
- 		 *	to the rule of one reply per request.
- 		 */
- 		if (pEvReply->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY) {
- 			freereq = 0;
- 		} else {
--                    devtprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns mf=%p evnp=%p\n", ioc->name, pEvReply, mf, ioc->evnp));
--              if ( (MPT_FRAME_HDR *)ioc->evnp == mf ) {
--                         ioc->evnp = NULL;
--                   }
-- }
-+			devtprintk((MYIOC_s_WARN_FMT "EVENT_NOTIFICATION reply %p returns Request frame\n",
-+				ioc->name, pEvReply));
-+		}
- 
- #ifdef CONFIG_PROC_FS
- //		LogEvent(ioc, pEvReply);
-@@ -562,7 +495,7 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRA
- 	} else if (func == MPI_FUNCTION_EVENT_ACK) {
- 		dprintk((MYIOC_s_INFO_FMT "mpt_base_reply, EventAck reply received\n",
- 				ioc->name));
--	} else if (func == MPI_FUNCTION_CONFIG ) {
-+	} else if (func == MPI_FUNCTION_CONFIG) {
- 		CONFIGPARMS *pCfg;
- 		unsigned long flags;
- 
-@@ -617,29 +550,7 @@ mpt_base_reply(MPT_ADAPTER *ioc, MPT_FRA
- 			 */
- 			pCfg->wait_done = 1;
- 			wake_up(&mpt_waitq);
--		}else if (mf == ioc->FcLinkSpeedReqActive) {
--     pFCPortPage0_t  pFCPortPage0 = (pFCPortPage0_t)((u8 *)mf + sizeof(pConfig_t));
--                u8 OldSpeed = ioc->FcLinkSpeed;
--		u8 NewSpeed = pFCPortPage0->CurrentSpeed;
--		u8 State = pFCPortPage0->PortState;
--                ioc->FcLinkSpeedReqActive = NULL;
--			if (State != MPI_FCPORTPAGE0_PORTSTATE_OFFLINE &&
--			    NewSpeed != MPI_FCPORTPAGE0_CURRENT_SPEED_UKNOWN) {
--				char	*old;
--				char	*new;
-- old = OldSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT ? "1 Gbps" :OldSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT ? "2 Gbps" :OldSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_4GBIT ? "4 Gbps" :
-- "Unknown";
--new = NewSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT ? "1 Gbps" :NewSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT ? "2 Gbps" :
--NewSpeed == MPI_FCPORTPAGE0_CURRENT_SPEED_4GBIT ? "4 Gbps" : "Unknown";
--
--if (OldSpeed == 0) { printk(MYIOC_s_NOTE_FMT "FC Link Established, Speed = %s\n", ioc->name, new);
--	} else if (OldSpeed != NewSpeed)
--{
--printk(MYIOC_s_WARN_FMT "FC Link Speed Change, Old Speed = %s, New Speed = %s\n",ioc->name, old, new);
--}
--ioc->FcLinkSpeed = NewSpeed;
--}
--}
-+		}
- 	} else if (func == MPI_FUNCTION_SAS_IO_UNIT_CONTROL) {
- 		/* we should be always getting a reply frame */
- 		memcpy(ioc->persist_reply_frame, reply,
-@@ -868,10 +779,6 @@ MPT_FRAME_HDR*
- mpt_get_msg_frame(int handle, MPT_ADAPTER *ioc)
- {
- 	MPT_FRAME_HDR *mf;
--        #ifdef MPT_DEBUG_FAIL
--          u8      *mem;
--        #endif
--
- 	unsigned long flags;
- 	u16	 req_idx;	/* Request index */
- 
-@@ -884,10 +791,7 @@ mpt_get_msg_frame(int handle, MPT_ADAPTE
- 
- 	/* If interrupts are not attached, do not return a request frame */
- 	if (!ioc->active)
--       {
--            printk(KERN_WARNING "IOC Not Active! mpt_get_msg_frame!!\n");
- 		return NULL;
--       }
- 
- 	spin_lock_irqsave(&ioc->FreeQlock, flags);
- 	if (!list_empty(&ioc->FreeQ)) {
-@@ -907,36 +811,10 @@ mpt_get_msg_frame(int handle, MPT_ADAPTE
- #ifdef MFCNT
- 		ioc->mfcnt++;
- #endif
--	} else {
--#ifdef MPT_DEBUG_FAIL
--dfailprintk((MYIOC_s_WARN_FMT "%s, No Free Message Frame!!\n",
--     ioc->name,__FUNCTION__));
--		mem = (u8 *) ioc->req_frames;
--		for (req_idx = 0; req_idx < 10; req_idx++) {
--	{
--		u32 	*m = (u32 *)(mem);
--		int	 ii, n;
--
--		printk(KERN_WARNING MYNAM ": %s: msg frame %d @ %p:\n" KERN_INFO " ",
--				ioc->name, req_idx, m);
--		n = ioc->req_sz/4;
--		for (ii=0; ii<n; ii++) {
--			if (ii && ((ii%8)==0))
--				printk("\n");
--			printk("%08x ", le32_to_cpu(m[ii]));
--		}
--		printk("\n");
--          }
--               mem += ioc->req_sz;
--               }
--#endif
--
--
--
--mf = NULL;
--}
--spin_unlock_irqrestore(&ioc->FreeQlock, flags);
--
-+	}
-+	else
-+		mf = NULL;
-+	spin_unlock_irqrestore(&ioc->FreeQlock, flags);
- 
- #ifdef MFCNT
- 	if (mf == NULL)
-@@ -984,13 +862,13 @@ mpt_put_msg_frame(int handle, MPT_ADAPTE
- 
- 		printk(KERN_INFO MYNAM ": %s: About to Put msg frame @ %p:\n" KERN_INFO " ",
- 				ioc->name, m);
--		n = ioc->req_sz/4 ;
-+		n = ioc->req_sz/4 - 1;
- 		while (m[n] == 0)
- 			n--;
- 		for (ii=0; ii<=n; ii++) {
- 			if (ii && ((ii%8)==0))
- 				printk("\n" KERN_INFO " ");
--			printk("%08x ", le32_to_cpu(m[ii]));
-+			printk(" %08x", le32_to_cpu(m[ii]));
- 		}
- 		printk("\n");
- 	}
-@@ -1074,14 +952,16 @@ mpt_add_sge(char *pAddr, u32 flagslength
-  *	Returns 0 for success, non-zero for failure.
-  */
- int
--mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, ulong timeout, int sleepFlag)
-+mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag)
- {
--	int	r = 0;
-+	int		 r = 0;
- 	u8	*req_as_bytes;
--	int	ii;
-+	int	 ii;
- 
--	dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request reqBytes=%d\n",
--		ioc->name, reqBytes));
-+	/* State is known to be good upon entering
-+	 * this function so issue the bus reset
-+	 * request.
-+	 */
- 
- 	/*
- 	 * Emulate what mpt_put_msg_frame() does /wrt to sanity
-@@ -1089,16 +969,12 @@ mpt_send_handshake_request(int handle, M
- 	 * is in proper (pre-alloc'd) request buffer range...
- 	 */
- 	ii = MFPTR_2_MPT_INDEX(ioc,(MPT_FRAME_HDR*)req);
--	if (ii >= 0 && ii < ioc->req_depth) {
-+	if (reqBytes >= 12 && ii >= 0 && ii < ioc->req_depth) {
- 		MPT_FRAME_HDR *mf = (MPT_FRAME_HDR*)req;
- 		mf->u.frame.hwhdr.msgctxu.fld.req_idx = cpu_to_le16(ii);
- 		mf->u.frame.hwhdr.msgctxu.fld.cb_idx = handle;
- 	}
- 
--               ioc->tmPtr = (MPT_FRAME_HDR *)req;
--               ioc->TMtimer.expires = jiffies + HZ*timeout;  /* seconds */
--               add_timer(&ioc->TMtimer);
--
- 	/* Make sure there are no doorbells */
- 	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
- 
-@@ -1108,25 +984,20 @@ mpt_send_handshake_request(int handle, M
- 
- 	/* Wait for IOC doorbell int */
- 	if ((ii = WaitForDoorbellInt(ioc, 5, sleepFlag)) < 0) {
--		r= ii;
--                goto mpt_send_handshake_failed;
-+		return ii;
- 	}
- 
- 	/* Read doorbell and check for active bit */
--	if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE)){
--		r= -5;
--                goto mpt_send_handshake_failed;
--           }
--
-+	if (!(CHIPREG_READ32(&ioc->chip->Doorbell) & MPI_DOORBELL_ACTIVE))
-+		return -5;
- 
- 	dhsprintk((KERN_INFO MYNAM ": %s: mpt_send_handshake_request start, WaitCnt=%d\n",
- 		ioc->name, ii));
- 
- 	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
- 
--        if ((WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
--            r=-2;
--             goto mpt_send_handshake_failed;
-+	if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
-+		return -2;
- 	}
- 
- 	/* Send request via doorbell handshake */
-@@ -1138,33 +1009,21 @@ mpt_send_handshake_request(int handle, M
- 			(req_as_bytes[(ii*4) + 1] <<  8) |
- 			(req_as_bytes[(ii*4) + 2] << 16) |
- 			(req_as_bytes[(ii*4) + 3] << 24));
--dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request word=%08x ii=%d\n",ioc->name, word, ii));
--
- 		CHIPREG_WRITE32(&ioc->chip->Doorbell, word);
--		if ( WaitForDoorbellAck(ioc, 5, sleepFlag) < 0) {
-+		if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
- 			r = -3;
--			goto mpt_send_handshake_failed;
-+			break;
- 		}
- 	}
- 
--	dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request reqBytes=%d sent, WaitForDoorbellInt\n",
--		ioc->name, reqBytes));
--
--	if ( WaitForDoorbellInt(ioc, 10, sleepFlag)< 0)
-+	if (r >= 0 && WaitForDoorbellInt(ioc, 10, sleepFlag) >= 0)
-+		r = 0;
-+	else
- 		r = -4;
- 
- 	/* Make sure there are no doorbells */
- 	CHIPREG_WRITE32(&ioc->chip->IntStatus, 0);
- 
--mpt_send_handshake_failed:
--	if (r < 0) {
--		del_timer(&ioc->TMtimer);
--		ioc->tmPtr = NULL;
--	}
--	dtmprintk((KERN_WARNING MYNAM ": %s: mpt_send_handshake_request r=%d\n",
--		ioc->name, r));
--
--
- 	return r;
- }
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -1186,6 +1045,7 @@ mpt_send_handshake_failed:
- static int
- mpt_host_page_access_control(MPT_ADAPTER *ioc, u8 access_control_value, int sleepFlag)
- {
-+	int	 r = 0;
- 
- 	/* return if in use */
- 	if (CHIPREG_READ32(&ioc->chip->Doorbell)
-@@ -1200,7 +1060,7 @@ mpt_host_page_access_control(MPT_ADAPTER
- 		 (access_control_value<<12)));
- 
- 	/* Wait for IOC to clear Doorbell Status bit */
--	if (( WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
-+	if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0) {
- 		return -2;
- 	}else
- 		return 0;
-@@ -1344,10 +1204,20 @@ mpt_bringup_adapter(MPT_ADAPTER *ioc, in
- {
- 	int r;
- 
-+	if(ioc->alt_ioc) {
-+		if((r=mpt_alt_ioc_wait(ioc->alt_ioc)!=0))
-+			return r;
-+	}
- 
- 	r = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_BRINGUP,
- 	    CAN_SLEEP);
- 
-+	if(ioc->alt_ioc) {
-+		spin_lock(&ioc->alt_ioc->initializing_hba_lock);
-+		ioc->alt_ioc->initializing_hba_lock_flag=0;
-+		spin_unlock(&ioc->alt_ioc->initializing_hba_lock);
-+	}
-+
- return r;
- }
- 
-@@ -1383,8 +1253,6 @@ mpt_attach(struct pci_dev *pdev, const s
- 	u8		 revision;
- 	u8		 pcixcmd;
- 	static int	 mpt_ids = 0;
--        unsigned long flags;
--
- #ifdef CONFIG_PROC_FS
- 	struct proc_dir_entry *dent, *ent;
- #endif
-@@ -1420,7 +1288,6 @@ mpt_attach(struct pci_dev *pdev, const s
- 	ioc->reply_sz = MPT_REPLY_FRAME_SIZE;
- 
- 	ioc->pcidev = pdev;
--        ioc->IOCResetInProgress = 0;
- 	ioc->diagPending = 0;
- 	spin_lock_init(&ioc->diagLock);
- 	spin_lock_init(&ioc->initializing_hba_lock);
-@@ -1596,17 +1463,10 @@ mpt_attach(struct pci_dev *pdev, const s
- 	if(ioc->errata_flag_1064) {
- 		pci_disable_io_access(pdev);
- 	}
--           if(ioc->bus_type == FC) {
--               ioc->CheckFcLinkSpeed = 1;
--               ioc->FcLinkSpeed = 0;
--        }
--
- 
- 	sprintf(ioc->name, "ioc%d", ioc->id);
- 
- 	spin_lock_init(&ioc->FreeQlock);
--        spin_lock_init(&ioc->PendingMFlock);
--
- 
- 	/* Disable all! */
- 	CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF);
-@@ -1659,43 +1519,22 @@ mpt_attach(struct pci_dev *pdev, const s
- 	 */
- 	mpt_detect_bound_ports(ioc, pdev);
- 
--if(mpt_enable_deadioc_detect){
--/* The following list initializations is moved from PrimeIocFifos
--                because the lists will not get initialize for non-operational
--                IOCs and which cause a crash when the lists are accessed later
--                */
--/* Initialize the free chain Q.*/
--
--        INIT_LIST_HEAD(&ioc->FreeChainQ);
--        spin_lock_irqsave(&ioc->FreeQlock, flags);
--        INIT_LIST_HEAD(&ioc->FreeQ);
--        spin_unlock_irqrestore(&ioc->FreeQlock, flags);
--        init_MUTEX(&ioc->raid_data.inactive_list_mutex);
--        INIT_LIST_HEAD(&ioc->raid_data.inactive_list);
--
--	/* Even If there is any error in IOC bringup, the IOC is allowed to
--		be attached with MPT drivers, This change is done to support
--		Firmware download boot functionality for FW dead IOC */
--       mpt_bringup_adapter(ioc, CAN_SLEEP);
--     }
--
--else {
--        if ((r = mpt_bringup_adapter(ioc, CAN_SLEEP)) != 0){
--            printk(KERN_WARNING MYNAM
--               ": WARNING - %s did not initialize properly! (%d)\n",
--               ioc->name, r);
--               list_del(&ioc->list);
--               free_irq(ioc->pci_irq, ioc);
--               if (mpt_msi_enable == 1) {
--                      pci_disable_msi(pdev);
--               }
--               iounmap(mem);
--               kfree(ioc);
--	       pci_set_drvdata(pdev, NULL);
--               return r;
-+	if ((r = mpt_bringup_adapter(ioc, CAN_SLEEP)) != 0){
-+		printk(KERN_WARNING MYNAM
-+		  ": WARNING - %s did not initialize properly! (%d)\n",
-+		  ioc->name, r);
-+
-+		list_del(&ioc->list);
-+		free_irq(ioc->pci_irq, ioc);
-+		if (mpt_msi_enable == 1) {
-+			pci_disable_msi(pdev);
-+		}
-+		iounmap(mem);
-+		kfree(ioc);
-+		pci_set_drvdata(pdev, NULL);
-+		return r;
- 	}
- 
--}
- 	/* call per device driver probe entry point */
- 	for(ii=0; ii<MPT_MAX_PROTOCOL_DRIVERS; ii++) {
- 		if(MptDeviceDriverHandlers[ii] &&
-@@ -1812,7 +1651,7 @@ mpt_suspend(struct pci_dev *pdev, pm_mes
- #endif
- 
- 	/* put ioc into READY_STATE */
--	if(mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) {
-+	if(SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) {
- 		printk(MYIOC_s_ERR_FMT
- 		"pci-suspend:  IOC msg unit reset failed!\n", ioc->name);
- 	}
-@@ -1864,8 +1703,7 @@ mpt_resume(struct pci_dev *pdev)
- 	if(!CHIPREG_READ32(&ioc->chip->Doorbell)) {
- 		/* enable domain validation flags */
- 		for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) {
--			ioc->spi_data.dvStatus[ii] |= (MPT_SCSICFG_NEED_DV |
--                                                             MPT_SCSICFG_DV_NOT_DONE);
-+			ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_NEED_DV;
- 		}
- 	}
- 
-@@ -1905,19 +1743,23 @@ mpt_resume(struct pci_dev *pdev)
-  *
-  *	Returns:
-  *		 0 for success
-- *		-1 if failed to get board READY
-+ *		-1 if failed to get boardMODULE_VERSION(MPT_LINUX_VERSION_COMMON);
-+ READY
-  *		-2 if READY but IOCFacts Failed
-  *		-3 if READY but PrimeIOCFifos Failed
-  *		-4 if READY but IOCInit Failed
-  */
--int mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
--{       unsigned long flags;
-+static int
-+mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)
-+{
- 	int	 hard_reset_done = 0;
-+	int	 alt_ioc_ready = 0;
- 	int	 hard;
- 	int	 rc = 0;
- 	int	 ii;
-+	int	 handlers;
- 	int	 ret = 0;
--
-+	int	 reset_alt_ioc_active = 0;
- 
- 	printk(KERN_INFO MYNAM ": Initiating %s %s\n",
- 			ioc->name, reason==MPT_HOSTEVENT_IOC_BRINGUP ? "bringup" : "recovery");
-@@ -1926,15 +1768,13 @@ int mpt_do_ioc_recovery(MPT_ADAPTER *ioc
- 	CHIPREG_WRITE32(&ioc->chip->IntMask, 0xFFFFFFFF);
- 	ioc->active = 0;
- 
--/* If an event notification has not returned
-- * its request frame,
-- * free resources associated with this request.
-- */
--        if (ioc->evnp) {
--            drsprintk((MYIOC_s_WARN_FMT "do_ioc_recovery: freeing evnp=%p\n",
--                 ioc->name, ioc->evnp));
--            mpt_free_msg_frame(ioc, (MPT_FRAME_HDR *)ioc->evnp);
--            ioc->evnp = NULL;
-+	if (ioc->alt_ioc) {
-+		if (ioc->alt_ioc->active)
-+			reset_alt_ioc_active = 1;
-+
-+		/* Disable alt-IOC's reply interrupts (and FreeQ) for a bit ... */
-+		CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, 0xFFFFFFFF);
-+		ioc->alt_ioc->active = 0;
- 	}
- 
- 	hard = 1;
-@@ -1945,39 +1785,68 @@ int mpt_do_ioc_recovery(MPT_ADAPTER *ioc
- 		if (hard_reset_done == -4) {
- 			printk(KERN_WARNING MYNAM ": %s Owned by PEER..skipping!\n",
- 					ioc->name);
-+
-+			if (reset_alt_ioc_active && ioc->alt_ioc) {
-+				/* (re)Enable alt-IOC! (reply interrupt, FreeQ) */
-+				dprintk((KERN_INFO MYNAM ": alt-%s reply irq re-enabled\n",
-+						ioc->alt_ioc->name));
-+				CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM);
-+				ioc->alt_ioc->active = 1;
-+			}
-+
- 		} else {
- 			printk(KERN_WARNING MYNAM ": %s NOT READY WARNING!\n",
- 					ioc->name);
- 		}
--
--               spin_lock_irqsave(&ioc->diagLock, flags);
--               ioc->IOCResetInProgress = 0;
--               spin_unlock_irqrestore(&ioc->diagLock, flags);
- 		return -1;
- 	}
- 
-+	/* hard_reset_done = 0 if a soft reset was performed
-+	 * and 1 if a hard reset was performed.
-+	 */
-+	if (hard_reset_done && reset_alt_ioc_active && ioc->alt_ioc) {
-+		if ((rc = MakeIocReady(ioc->alt_ioc, 0, sleepFlag)) == 0)
-+			alt_ioc_ready = 1;
-+		else
-+			printk(KERN_WARNING MYNAM
-+					": alt-%s: Not ready WARNING!\n",
-+					ioc->alt_ioc->name);
-+	}
-+
-+	for (ii=0; ii<5; ii++) {
-+		/* Get IOC facts! Allow 5 retries */
-+		if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0)
-+			break;
-+	}
- 
--if (reason == MPT_HOSTEVENT_IOC_BRINGUP ||
--                        mpt_enable_deadioc_detect){
--             for (ii=0; ii<5; ii++) {
--                /* Get IOC facts! Allow 5 retries */
--                   if ((rc = GetIocFacts(ioc, sleepFlag, reason)) == 0)
--                               break;
--}
- 
-+	if (ii == 5) {
-+		dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed rc=%x\n", ioc->name, rc));
-+		ret = -2;
-+	} else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) {
-+		MptDisplayIocCapabilities(ioc);
-+	}
- 
--if(ii==5) {
--dinitprintk((MYIOC_s_INFO_FMT "Retry IocFacts failed rc=%x\n", ioc->name , rc));
--             ret = -2;
--        } else {
--       if (reason == MPT_HOSTEVENT_IOC_BRINGUP)
--         MptDisplayIocCapabilities(ioc);
-+	if (alt_ioc_ready) {
-+		if ((rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason)) != 0) {
-+			dinitprintk((MYIOC_s_INFO_FMT "Initial Alt IocFacts failed rc=%x\n", ioc->name, rc));
-+			/* Retry - alt IOC was initialized once
-+			 */
-+			rc = GetIocFacts(ioc->alt_ioc, sleepFlag, reason);
-+		}
-+		if (rc) {
-+			dinitprintk((MYIOC_s_INFO_FMT "Retry Alt IocFacts failed rc=%x\n", ioc->name, rc));
-+			alt_ioc_ready = 0;
-+			reset_alt_ioc_active = 0;
-+		} else if (reason == MPT_HOSTEVENT_IOC_BRINGUP) {
-+			MptDisplayIocCapabilities(ioc->alt_ioc);
- 		}
- 	}
- 
- 	/* Prime reply & request queues!
- 	 * (mucho alloc's) Must be done prior to
- 	 * init as upper addresses are needed for init.
-+	 * If fails, continue with alt-ioc processing
- 	 */
- 	if ((ret == 0) && ((rc = PrimeIocFifos(ioc)) != 0))
- 		ret = -3;
-@@ -1987,6 +1856,23 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc
- 	 */
- 	if ((ret == 0) && ((rc = SendIocInit(ioc, sleepFlag)) != 0))
- 		ret = -4;
-+// NEW!
-+	if (alt_ioc_ready && ((rc = PrimeIocFifos(ioc->alt_ioc)) != 0)) {
-+		printk(KERN_WARNING MYNAM ": alt-%s: (%d) FIFO mgmt alloc WARNING!\n",
-+				ioc->alt_ioc->name, rc);
-+		alt_ioc_ready = 0;
-+		reset_alt_ioc_active = 0;
-+	}
-+
-+	if (alt_ioc_ready) {
-+		if ((rc = SendIocInit(ioc->alt_ioc, sleepFlag)) != 0) {
-+			alt_ioc_ready = 0;
-+			reset_alt_ioc_active = 0;
-+			printk(KERN_WARNING MYNAM
-+				": alt-%s: (%d) init failure WARNING!\n",
-+					ioc->alt_ioc->name, rc);
-+		}
-+	}
- 
- 	if (reason == MPT_HOSTEVENT_IOC_BRINGUP){
- 		if (ioc->upload_fw) {
-@@ -2024,6 +1910,13 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc
- 		ioc->active = 1;
- 	}
- 
-+	if (reset_alt_ioc_active && ioc->alt_ioc) {
-+		/* (re)Enable alt-IOC! (reply interrupt) */
-+		dinitprintk((KERN_INFO MYNAM ": alt-%s reply irq re-enabled\n",
-+				ioc->alt_ioc->name));
-+		CHIPREG_WRITE32(&ioc->alt_ioc->chip->IntMask, MPI_HIM_DIM);
-+		ioc->alt_ioc->active = 1;
-+	}
- 
- 	/*  Enable MPT base driver management of EventNotification
- 	 *  and EventAck handling.
-@@ -2031,6 +1924,9 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc
- 	if ((ret == 0) && (!ioc->facts.EventState))
- 		(void) SendEventNotification(ioc, 1);	/* 1=Enable EventNotification */
- 
-+	if (ioc->alt_ioc && alt_ioc_ready && !ioc->alt_ioc->facts.EventState)
-+		(void) SendEventNotification(ioc->alt_ioc, 1);	/* 1=Enable EventNotification */
-+
- 	/*	Add additional "reason" check before call to GetLanConfigPages
- 	 *	(combined with GetIoUnitPage2 call).  This prevents a somewhat
- 	 *	recursive scenario; GetLanConfigPages times out, timer expired
-@@ -2038,30 +1934,32 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc
- 	 *	and we try GetLanConfigPages again...
- 	 */
- 	if ((ret == 0) && (reason == MPT_HOSTEVENT_IOC_BRINGUP)) {
--
--		/*
--		 * Initalize link list for inactive raid volumes.
--		 */
--		init_MUTEX(&ioc->raid_data.inactive_list_mutex);
--		INIT_LIST_HEAD(&ioc->raid_data.inactive_list);
--
- 		if (ioc->bus_type == SAS) {
-+
- 			/*
- 			 * Pre-fetch SAS Address for each port
- 			 */
- 			GetManufPage5(ioc, ioc->facts.NumberOfPorts);
- 
-+			/*
-+			 * Pre-fetch Serial number for the board.
-+			 */
-+			GetManufPage0(ioc);
-+
-+			/*
-+			 * Pre-fetch Hw Link Rates. (These may get
-+			 * overwritten so need to save them.)
-+			 * Save other SAS data needed for Ioctls.
-+			 */
-+			mpt_sas_get_info(ioc);
-+
- 			/* clear persistency table */
- 			if(ioc->facts.IOCExceptions &
- 			    MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL) {
- 				ret = mptbase_sas_persist_operation(ioc,
- 				    MPI_SAS_OP_CLEAR_NOT_PRESENT);
--				if(ret != 0){
--                                 spin_lock_irqsave(&ioc->diagLock, flags);
--                                       ioc->IOCResetInProgress = 0;
--                                       spin_unlock_irqrestore(&ioc->diagLock, flags);
-+				if(ret != 0)
- 					return -1;
--                                        }
- 			}
- 
- 			/* Find IM volumes
-@@ -2118,11 +2016,6 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc
- 		}
- 
- 		GetIoUnitPage2(ioc);
--
--		/*
--		 * Pre-fetch Serial number for the board.
--		 */
--		GetManufPage0(ioc);
- 	}
- 
- 	/*
-@@ -2131,35 +2024,26 @@ dinitprintk((MYIOC_s_INFO_FMT "Retry Ioc
- 	 * NOTE: If we're doing _IOC_BRINGUP, there can be no
- 	 * MptResetHandlers[] registered yet.
- 	 */
--	         if (ret == 0) {
--                       rc = 0;
--
--               for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) {
--                         if (MptResetHandlers[ii]) {
--       drsprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\ n",ioc->name, ii));
--
-+	if (hard_reset_done) {
-+		rc = handlers = 0;
-+		for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) {
-+			if ((ret == 0) && MptResetHandlers[ii]) {
-+				dprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n",
-+						ioc->name, ii));
- 				rc += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET);
-+				handlers++;
-+			}
- 
-+			if (alt_ioc_ready && MptResetHandlers[ii]) {
-+				drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s post_reset handler #%d\n",
-+						ioc->name, ioc->alt_ioc->name, ii));
-+				rc += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_POST_RESET);
-+				handlers++;
- 			}
- 		}
-+		/* FIXME?  Examine results here? */
- 	}
- 
--if (ioc->bus_type == FC) {
--		ioc->FcLinkSpeedCheckNeeded = 1;
--	}
--
--	if (ioc->bus_type == SPI) {
--		drsprintk((MYIOC_s_WARN_FMT "%s: calling writeSDP1: ALL_IDS USE_NVRAM\n",
--			ioc->name, __FUNCTION__));
--		dnegoprintk((MYIOC_s_WARN_FMT "%s: calling writeSDP1: ALL_IDS USE_NVRAM\n",
--			ioc->name, __FUNCTION__));
--		mpt_writeSDP1(ioc, 0, 0, (MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM));
--	}
--
--	spin_lock_irqsave(&ioc->diagLock, flags);
--	ioc->IOCResetInProgress = 0;
--	spin_unlock_irqrestore(&ioc->diagLock, flags);
--
- 	return ret;
- }
- 
-@@ -2224,11 +2108,9 @@ mpt_detect_bound_ports(MPT_ADAPTER *ioc,
- static void
- mpt_adapter_disable(MPT_ADAPTER *ioc)
- {
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice		*pTarget;
-+	sas_device_info_t *sasDevice, * pNext;
- 	int sz;
- 	int ret, ii;
--	int bus, id;
- 	void *			request_data;
- 	dma_addr_t		request_data_dma;
- 	u32			request_data_sz;
-@@ -2253,7 +2135,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 		if ( request_data ) {
- 			request_data_sz = ioc->DiagBuffer_sz[ii];
- 			request_data_dma = ioc->DiagBuffer_dma[ii];
--			dexitprintk((KERN_INFO MYNAM ": %s: free DiagBuffer[%d] @ %p, sz=%d bytes\n",
-+			dexitprintk((KERN_INFO MYNAM ": %s free DiagBuffer[%d] @ %p, sz=%d bytes\n",
- 		 		ioc->name, ii, request_data, request_data_sz));
- 			pci_free_consistent(ioc->pcidev, request_data_sz,
- 				request_data,
-@@ -2264,7 +2146,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 	}
- 	if (ioc->alloc != NULL) {
- 		sz = ioc->alloc_sz;
--		dexitprintk((KERN_INFO MYNAM ": %s: free alloc @ %p, sz=%d bytes\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free alloc @ %p, sz=%d bytes\n",
- 		 	ioc->name, ioc->alloc, ioc->alloc_sz));
- 		pci_free_consistent(ioc->pcidev, sz,
- 				ioc->alloc, ioc->alloc_dma);
-@@ -2276,7 +2158,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 
- 	if (ioc->sense_buf_pool != NULL) {
- 		sz = (ioc->req_depth * MPT_SENSE_BUFFER_ALLOC);
--		dexitprintk((KERN_INFO MYNAM ": %s: free sense_buf_pool @ %p, sz=%d bytes\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free sense_buf_pool @ %p, sz=%d bytes\n",
- 		 	ioc->name, ioc->sense_buf_pool, sz));
- 		pci_free_consistent(ioc->pcidev, sz,
- 				ioc->sense_buf_pool, ioc->sense_buf_pool_dma);
-@@ -2286,7 +2168,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 
- 	if (ioc->events != NULL){
- 		sz = MPTCTL_EVENT_LOG_SIZE * sizeof(MPT_IOCTL_EVENTS);
--		dexitprintk((KERN_INFO MYNAM ": %s: free events @ %p, sz=%d bytes\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free events @ %p, sz=%d bytes\n",
- 		 	ioc->name, ioc->events, sz));
- 		kfree(ioc->events);
- 		ioc->events = NULL;
-@@ -2295,7 +2177,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 
- 	if (ioc->cached_fw != NULL) {
- 		sz = ioc->facts.FWImageSize;
--		dexitprintk((KERN_INFO MYNAM ": %s: free cached_fw @ %p, sz=%d bytes\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free cached_fw @ %p, sz=%d bytes\n",
- 		 	ioc->name, ioc->cached_fw, sz));
- 		pci_free_consistent(ioc->pcidev, sz,
- 			ioc->cached_fw, ioc->cached_fw_dma);
-@@ -2304,29 +2186,22 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 	}
- 
- 	if (ioc->spi_data.nvram != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free spi_data.nvram @ %p\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free spi_data.nvram @ %p\n",
- 		 	ioc->name, ioc->spi_data.nvram));
- 		kfree(ioc->spi_data.nvram);
- 		ioc->spi_data.nvram = NULL;
- 	}
- 
- 	if (ioc->raid_data.pIocPg3 != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free spi_data.pIocPg3 @ %p\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free spi_data.pIocPg3 @ %p\n",
- 		 	ioc->name, ioc->raid_data.pIocPg3));
- 		kfree(ioc->raid_data.pIocPg3);
- 		ioc->raid_data.pIocPg3 = NULL;
- 	}
- 
--	if (ioc->raid_data.pIocPg6 != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free raid_data.pIocPg6 @ %p\n",
--			ioc->name, ioc->raid_data.pIocPg6));
--		kfree(ioc->raid_data.pIocPg6);
--		ioc->raid_data.pIocPg6 = NULL;
--	}
--
- 	if (ioc->spi_data.pIocPg4 != NULL) {
- 		sz = ioc->spi_data.IocPg4Sz;
--		dexitprintk((KERN_INFO MYNAM ": %s: free spi_data.pIocPg4 @ %p size=%d\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free spi_data.pIocPg4 @ %p size=%d\n",
- 		 	ioc->name, ioc->spi_data.pIocPg4, sz));
- 		pci_free_consistent(ioc->pcidev, sz,
- 			ioc->spi_data.pIocPg4,
-@@ -2336,41 +2211,38 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 	}
- 
- 	if (ioc->ReqToChain != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free ReqToChain @ %p\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free ReqToChain @ %p\n",
- 		 	ioc->name, ioc->ReqToChain));
- 		kfree(ioc->ReqToChain);
- 		ioc->ReqToChain = NULL;
- 	}
- 
- 	if (ioc->RequestNB != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free RequestNB @ %p\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free RequestNB @ %p\n",
- 		 	ioc->name, ioc->RequestNB));
- 		kfree(ioc->RequestNB);
- 		ioc->RequestNB = NULL;
- 	}
- 
- 	if (ioc->ChainToChain != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free ChainToChain @ %p\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s free ChainToChain @ %p\n",
- 		 	ioc->name, ioc->ChainToChain));
- 		kfree(ioc->ChainToChain);
- 		ioc->ChainToChain = NULL;
- 	}
- 
--	mpt_inactive_raid_list_free(ioc);
-+	list_for_each_entry_safe(sasDevice, pNext, &ioc->sasDeviceList, list) {
-+		list_del(&sasDevice->list);
-+		dexitprintk((KERN_INFO MYNAM ": %s free sasDevice @ %p\n",
-+		 	ioc->name, sasDevice));
-+		kfree(sasDevice);
-+	}
- 
--	for (bus = 0; bus < ioc->NumberOfBuses; bus++) {
--		if ((pMptTarget = ioc->Target_List[bus])) {
--			for (id = 0; id < ioc->DevicesPerBus; id++) {
--				if ((pTarget = pMptTarget->Target[id])) {
--					dexitprintk((KERN_INFO MYNAM ": %s: free bus=%d id=%d pTarget=%p\n",
--						ioc->name, bus, id, pTarget));
--					kfree (pTarget);
--				}
--			}
--			dexitprintk((KERN_INFO MYNAM ": %s: free bus=%d pMptTarget=%p\n",
--				ioc->name, bus, pMptTarget));
--			kfree (pMptTarget);
--		}
-+	if (ioc->sasPhyInfo != NULL) {
-+		dexitprintk((KERN_INFO MYNAM ": %s free sasPhyInfo @ %p\n",
-+		 	ioc->name, ioc->sasPhyInfo));
-+		kfree(ioc->sasPhyInfo);
-+		ioc->sasPhyInfo = NULL;
- 	}
- 
- /* emoore@lsil.com : Host Page Buffer Suport, start */
-@@ -2381,7 +2253,7 @@ mpt_adapter_disable(MPT_ADAPTER *ioc)
- 			   ": %s: host page buffers free failed (%d)!\n",
- 			    __FUNCTION__, ret);
- 		}
--		dexitprintk((KERN_INFO MYNAM ": %s: HostPageBuffer free  @ %p, sz=%d bytes\n",
-+		dexitprintk((KERN_INFO MYNAM ": %s HostPageBuffer free  @ %p, sz=%d bytes\n",
- 		 	ioc->name, ioc->HostPageBuffer, ioc->HostPageBuffer_sz));
- 		pci_free_consistent(ioc->pcidev, ioc->HostPageBuffer_sz,
- 				ioc->HostPageBuffer,
-@@ -2441,7 +2313,7 @@ mpt_adapter_dispose(MPT_ADAPTER *ioc)
- 	dexitprintk((KERN_INFO MYNAM ": %s: free'd %d of %d bytes\n",
- 		ioc->name, sz_first-sz_last+(int)sizeof(MPT_ADAPTER), sz_first));
- 	dexitprintk((KERN_INFO MYNAM ": %s: sz_first=%d sz_last=%d sizeof(MPT_ADAPTER)=%d\n",
--		ioc->name, sz_first, sz_last, (int)sizeof(MPT_ADAPTER)));
-+		ioc->name, sz_first, sz_last, sizeof(MPT_ADAPTER)));
- 
- 	if (ioc->alt_ioc)
- 		ioc->alt_ioc->alt_ioc = NULL;
-@@ -2521,17 +2393,12 @@ MakeIocReady(MPT_ADAPTER *ioc, int force
- 
- 	/* Get current [raw] IOC state  */
- 	ioc_state = mpt_GetIocState(ioc, 0);
--	drsprintk((KERN_INFO MYNAM ": %s : MakeIocReady [raw] state=%08x\n", ioc->name, ioc_state));
-+	dhsprintk((KERN_INFO MYNAM "::MakeIocReady, %s [raw] state=%08x\n", ioc->name, ioc_state));
- 
- 	for ( ii = 0; ii < MPI_DIAG_BUF_TYPE_COUNT; ii++) {
- 		ioc->DiagBuffer[ii] = NULL;
- 		ioc->DiagBuffer_Status[ii] = 0;
- 	}
--if (ioc->bus_type == FC) {
--      ioc->FcLinkSpeedCheckNeeded = 0;
--      ioc->FcLinkSpeedReqActive = NULL;
--}
--
- 
- 	/*
- 	 *	Check to see if IOC got left/stuck in doorbell handshake
-@@ -2544,12 +2411,9 @@ if (ioc->bus_type == FC) {
- 	}
- 
- 	/* Is it already READY? */
--	if (!statefault && (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY)  {
--drsprintk((KERN_INFO MYNAM ": %s : MakeIocReady ioc_state=%08x = READY\n", ioc->name, ioc_state));
--             /* Dont return for SAS IOCs */
--             if (ioc->bus_type != SAS)
--               return 0;
--              }
-+	if (!statefault && (ioc_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_READY) 
-+		return 0;
-+
- 	/*
- 	 *	Check to see if IOC is in FAULT state.
- 	 */
-@@ -2581,7 +2445,7 @@ drsprintk((KERN_INFO MYNAM ": %s : MakeI
- 			return -4;
- 		else {
- 			if ((statefault == 0 ) && (force == 0)) {
--if ((r = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0)
-+				if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) == 0)
- 					return 0;
- 			}
- 			statefault = 3;
-@@ -2604,7 +2468,7 @@ if ((r = mpt_SendIocReset(ioc, MPI_FUNCT
- 			 *  BIOS or previous driver load left IOC in OP state.
- 			 *  Reset messaging FIFOs.
- 			 */
--if ((r = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) {
-+			if ((r = SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag)) != 0) {
- 				printk(MYIOC_s_ERR_FMT "IOC msg unit reset failed!\n", ioc->name);
- 				return -2;
- 			}
-@@ -2613,7 +2477,7 @@ if ((r = mpt_SendIocReset(ioc, MPI_FUNCT
- 			 *  Something is wrong.  Try to get IOC back
- 			 *  to a known state.
- 			 */
--if ((r = mpt_SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) {
-+			if ((r = SendIocReset(ioc, MPI_FUNCTION_IO_UNIT_RESET, sleepFlag)) != 0) {
- 				printk(MYIOC_s_ERR_FMT "IO unit reset failed!\n", ioc->name);
- 				return -3;
- 			}
-@@ -2629,7 +2493,7 @@ if ((r = mpt_SendIocReset(ioc, MPI_FUNCT
- 		if (sleepFlag == CAN_SLEEP)
- 			msleep_interruptible(1);
- 		else
--			MPT_MDELAY(1);  /* 1 msec delay */
-+			MPT_MDELAY(1);	/* 1 msec delay */
- 
- 	}
- 
-@@ -2766,9 +2630,6 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
- 			facts->FWVersion.Word = le32_to_cpu(facts->FWVersion.Word);
- 
- 		facts->ProductID = le16_to_cpu(facts->ProductID);
--		if ((ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK)
--		    > MPI_FW_HEADER_PID_PROD_TARGET_SCSI)
--			ioc->ir_firmware = 1;
- 		facts->CurrentHostMfaHighAddr =
- 				le32_to_cpu(facts->CurrentHostMfaHighAddr);
- 		facts->GlobalCredits = le16_to_cpu(facts->GlobalCredits);
-@@ -2814,9 +2675,7 @@ GetIocFacts(MPT_ADAPTER *ioc, int sleepF
- 		dinitprintk((MYIOC_s_INFO_FMT "NB_for_64_byte_frame=%x NBShiftFactor=%x BlockSize=%x\n",
- 					ioc->name, vv, shiftFactor, r));
- 
--/* Allow dead IOCs to get detected after FWDLB*/
-- if (reason == MPT_HOSTEVENT_IOC_BRINGUP ||mpt_enable_deadioc_detect) {
--
-+		if (reason == MPT_HOSTEVENT_IOC_BRINGUP) {
- 			/*
- 			 * Set values for this IOC's request & reply frame sizes,
- 			 * and request & reply queue depths...
-@@ -2870,7 +2729,6 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
- 	int			 ii;
- 	int			 req_sz;
- 	int			 reply_sz;
--	int			 max_id;
- 
- 	/* IOC *must* NOT be in RESET state! */
- 	if (ioc->last_state == MPI_IOC_STATE_RESET) {
-@@ -2913,31 +2771,6 @@ GetPortFacts(MPT_ADAPTER *ioc, int portn
- 	pfacts->IOCLogInfo = le32_to_cpu(pfacts->IOCLogInfo);
- 	pfacts->MaxDevices = le16_to_cpu(pfacts->MaxDevices);
- 	pfacts->PortSCSIID = le16_to_cpu(pfacts->PortSCSIID);
--
--	switch (ioc->bus_type) {
--	case SAS:
--		max_id = pfacts->PortSCSIID;
--		break;
--	case FC:
--		max_id = pfacts->MaxDevices;
--		break;
--	case SPI:
--	default:
--		max_id = MPT_MAX_SCSI_DEVICES;
--		break;
--	}
--
--	ioc->DevicesPerBus = (max_id > 255) ? 256 : max_id;
--	ioc->NumberOfBuses = (ioc->DevicesPerBus < 256) ? 1 : max_id/256;
--	if ( ioc->NumberOfBuses > MPT_MAX_BUSES ) {
--		dinitprintk((MYIOC_s_WARN_FMT "NumberOfBuses=%d > MPT_MAX_BUSES=%d\n",
--		   ioc->name, ioc->NumberOfBuses, MPT_MAX_BUSES));
--		ioc->NumberOfBuses = MPT_MAX_BUSES;
--	}
--
--	dinitprintk((MYIOC_s_WARN_FMT "Buses=%d MaxDevices=%d DevicesPerBus=%d\n",
--		   ioc->name, ioc->NumberOfBuses, max_id, ioc->DevicesPerBus));
--
- 	pfacts->ProtocolFlags = le16_to_cpu(pfacts->ProtocolFlags);
- 	pfacts->MaxPostedCmdBuffers = le16_to_cpu(pfacts->MaxPostedCmdBuffers);
- 	pfacts->MaxPersistentIDs = le16_to_cpu(pfacts->MaxPersistentIDs);
-@@ -2983,11 +2816,15 @@ SendIocInit(MPT_ADAPTER *ioc, int sleepF
- 	dinitprintk((MYIOC_s_INFO_FMT "upload_fw %d facts.Flags=%x\n",
- 		   ioc->name, ioc->upload_fw, ioc->facts.Flags));
- 
--	ioc_init.MaxDevices = ioc->DevicesPerBus;
--	ioc_init.MaxBuses = ioc->NumberOfBuses;
--
--	dinitprintk((MYIOC_s_INFO_FMT "ioc_init.MaxDevices=%d MaxBuses=%d\n",
--		   ioc->name, ioc_init.MaxDevices, ioc_init.MaxBuses));
-+	if(ioc->bus_type == SAS)
-+		ioc_init.MaxDevices = ioc->facts.MaxDevices;
-+	else if(ioc->bus_type == FC)
-+		ioc_init.MaxDevices = MPT_MAX_FC_DEVICES;
-+	else
-+		ioc_init.MaxDevices = MPT_MAX_SCSI_DEVICES;
-+	ioc_init.MaxBuses = MPT_MAX_BUS;
-+	dinitprintk((MYIOC_s_INFO_FMT "ioc_init.MaxDevice=%d\n",
-+		   ioc->name, ioc_init.MaxDevices));
- 	dinitprintk((MYIOC_s_INFO_FMT "facts.MsgVersion=%x\n",
- 		   ioc->name, ioc->facts.MsgVersion));
- /* emoore@lsil.com : Host Page Buffer Suport, start */
-@@ -3110,7 +2947,9 @@ SendPortEnable(MPT_ADAPTER *ioc, int por
- 
- 	/* RAID FW may take a long time to enable
- 	 */
--	if (ioc->ir_firmware || ioc->bus_type == SAS) {
-+	if (((ioc->facts.ProductID & MPI_FW_HEADER_PID_PROD_MASK)
-+	    > MPI_FW_HEADER_PID_PROD_TARGET_SCSI) ||
-+	    (ioc->bus_type == SAS)) {
- 		rc = mpt_handshake_req_reply_wait(ioc, req_sz,
- 		(u32*)&port_enable, reply_sz, (u16*)&reply_buf,
- 		300 /*seconds*/, sleepFlag);
-@@ -3151,7 +2990,7 @@ mpt_free_fw_memory(MPT_ADAPTER *ioc)
- 	int sz;
- 
- 	sz = ioc->facts.FWImageSize;
--	dinitprintk((KERN_INFO MYNAM ": free_fw_memory: FW Image  @ %p[%p], sz=%d[%x] bytes\n",
-+	dinitprintk((KERN_INFO MYNAM "free_fw_memory: FW Image  @ %p[%p], sz=%d[%x] bytes\n",
- 		 ioc->cached_fw, (void *)(ulong)ioc->cached_fw_dma, sz, sz));
- 	pci_free_consistent(ioc->pcidev, sz,
- 			ioc->cached_fw, ioc->cached_fw_dma);
-@@ -3285,43 +3124,14 @@ mpt_downloadboot(MPT_ADAPTER *ioc, MpiFw
- 	u32			 diag0val;
- 	int			 count;
- 	u32			*ptrFw;
--	u32			 diagRwData,doorbell;
-+	u32			 diagRwData;
- 	u32			 nextImage;
- 	u32			 load_addr;
-+	u32 			 ioc_state=0;
- 
--ddlprintk((MYIOC_s_WARN_FMT "downloadboot: pFwHeader=%p\n",ioc->name, pFwHeader));
--	nextImage = pFwHeader->NextImageHeaderOffset;
--	if (ioc->bus_type == SAS) {
--		while (nextImage) {
--			if ( (pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage)) ) {
--				ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SAS nextImage=%x pExtImage=%p ImageType=%x\n",
--					ioc->name, nextImage, pExtImage,
--					pExtImage->ImageType));
--			} else {
--				ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SAS nextImage=%x pExtImage=%p is NULL!\n",
--					ioc->name, nextImage, pExtImage));
--				return -EFAULT;
--			}
--
--			if ( pExtImage->ImageType == MPI_EXT_IMAGE_TYPE_BOOTLOADER ) {
--				fwSize = (pExtImage->ImageSize + 3)/4;
--				ptrFw = (u32 *) pExtImage;
--				load_addr = pExtImage->LoadStartAddress;
--				goto imageFound;
--			}
--			nextImage = pExtImage->NextImageHeaderOffset;
--		}
--		ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SAS BOOTLOADER not found\n",
--			ioc->name));
--		/* Allow this image to be downloaded */
--	}
--	fwSize = (pFwHeader->ImageSize + 3)/4;
--	ptrFw = (u32 *) pFwHeader;
--	load_addr = pFwHeader->LoadStartAddress;
-+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot: fw size 0x%x (%d), FW Ptr %p\n",
-+				ioc->name, pFwHeader->ImageSize, pFwHeader->ImageSize, pFwHeader));
- 
--imageFound:
--	ddlprintk((MYIOC_s_WARN_FMT "downloadboot: fw size 0x%x (%d), FW Ptr %p load_addr=%x\n",
--		ioc->name, fwSize, fwSize, ptrFw, load_addr));
- 
- 	CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
- 	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_1ST_KEY_VALUE);
-@@ -3345,7 +3155,7 @@ imageFound:
- 	for (count = 0; count < 30; count ++) {
- 		diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
- 		if (!(diag0val & MPI_DIAG_RESET_ADAPTER)) {
--                      ddlprintk((MYIOC_s_WARN_FMT "RESET_ADAPTER cleared, count=%d\n",
-+			ddlprintk((MYIOC_s_INFO_FMT "RESET_ADAPTER cleared, count=%d\n",
- 				ioc->name, count));
- 			break;
- 		}
-@@ -3357,7 +3167,7 @@ imageFound:
- 	}
- 
- 	if ( count == 30 ) {
--		ddlprintk((MYIOC_s_WARN_FMT "downloadboot failed! Unable to get MPI_DIAG_DRWE mode, diag0val=%x\n",
-+		ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed! Unable to get MPI_DIAG_DRWE mode, diag0val=%x\n",
- 		ioc->name, diag0val));
- 		return -3;
- 	}
-@@ -3370,9 +3180,10 @@ imageFound:
- 	CHIPREG_WRITE32(&ioc->chip->WriteSequence, MPI_WRSEQ_5TH_KEY_VALUE);
- 
- 	/* Set the DiagRwEn and Disable ARM bits */
-+	CHIPREG_WRITE32(&ioc->chip->Diagnostic, (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM));
- 
--        diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
--CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val | (MPI_DIAG_RW_ENABLE | MPI_DIAG_DISABLE_ARM));
-+	fwSize = (pFwHeader->ImageSize + 3)/4;
-+	ptrFw = (u32 *) pFwHeader;
- 
- 	/* Write the LoadStartAddress to the DiagRw Address Register
- 	 * using Programmed IO
-@@ -3380,28 +3191,26 @@ CHIPREG_WRITE32(&ioc->chip->Diagnostic, 
- 	if(ioc->errata_flag_1064) {
- 		pci_enable_io_access(ioc->pcidev);
- 	}
--CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, load_addr);
-+	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->LoadStartAddress);
-+	ddlprintk((MYIOC_s_INFO_FMT "LoadStart addr written 0x%x \n",
-+		ioc->name, pFwHeader->LoadStartAddress));
- 
--ddlprintk((MYIOC_s_WARN_FMT "LoadStart addr written 0x%x \n",ioc->name, load_addr));
--ddlprintk((MYIOC_s_WARN_FMT "Write FW Image: 0x%x (%d) bytes @ %p\n",
--                                ioc->name, fwSize*4, fwSize*4, ptrFw));
-+	ddlprintk((MYIOC_s_INFO_FMT "Write FW Image: 0x%x (%d) bytes @ %p\n",
-+				ioc->name, fwSize*4, fwSize*4, ptrFw));
- 	while (fwSize--) {
- 		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, *ptrFw++);
- 	}
- 
--	if (ioc->bus_type == SAS) {
--		pFwHeader->IopResetVectorValue = load_addr + 0x18;
--	} else {
--
--		while (nextImage) {
--			pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage);
-+	nextImage = pFwHeader->NextImageHeaderOffset;
-+	while (nextImage) {
-+		pExtImage = (MpiExtImageHeader_t *) ((char *)pFwHeader + nextImage);
- 
- 		load_addr = pExtImage->LoadStartAddress;
- 
- 		fwSize = (pExtImage->ImageSize + 3) >> 2;
- 		ptrFw = (u32 *)pExtImage;
- 
--		ddlprintk((MYIOC_s_WARN_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n",
-+		ddlprintk((MYIOC_s_INFO_FMT "Write Ext Image: 0x%x (%d) bytes @ %p load_addr=%x\n",
- 						ioc->name, fwSize*4, fwSize*4, ptrFw, load_addr));
- 		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, load_addr);
- 
-@@ -3411,18 +3220,20 @@ ddlprintk((MYIOC_s_WARN_FMT "Write FW Im
- 		nextImage = pExtImage->NextImageHeaderOffset;
- 	}
- 
-- }
- 	/* Write the IopResetVectorRegAddr */
--	ddlprintk((MYIOC_s_WARN_FMT "Write IopResetVector Addr=%x! \n", ioc->name, 	pFwHeader->IopResetRegAddr));
-+	ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Addr=%x! \n", ioc->name, 	pFwHeader->IopResetRegAddr));
- 	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, pFwHeader->IopResetRegAddr);
- 
- 	/* Write the IopResetVectorValue */
--	ddlprintk((MYIOC_s_WARN_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue));
-+	ddlprintk((MYIOC_s_INFO_FMT "Write IopResetVector Value=%x! \n", ioc->name, pFwHeader->IopResetVectorValue));
- 	CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, pFwHeader->IopResetVectorValue);
- 
-+	/* Clear the internal flash bad bit - autoincrementing register,
-+	 * so must do two writes.
-+	 */
- 	if (ioc->bus_type == SPI) {
- 		/*
--		 * 1030 H/W errata, workaround to access
-+		 * 1030 and 1035 H/W errata, workaround to access
- 		 * the ClearFlashBadSignatureBit
- 		 */
- 		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000);
-@@ -3431,6 +3242,16 @@ ddlprintk((MYIOC_s_WARN_FMT "Write FW Im
- 		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwAddress, 0x3F000000);
- 		CHIPREG_PIO_WRITE32(&ioc->pio_chip->DiagRwData, diagRwData);
- 
-+	} else /* if((ioc->bus_type == SAS) || (ioc->bus_type == FC)) */ {
-+		diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-+		CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val |
-+		    MPI_DIAG_CLEAR_FLASH_BAD_SIG);
-+
-+		/* wait 1 msec */
-+		if (sleepFlag == CAN_SLEEP)
-+			msleep_interruptible(1);
-+		else
-+			MPT_MDELAY(1);
- 	}
- 
- 	if(ioc->errata_flag_1064) {
-@@ -3438,77 +3259,48 @@ ddlprintk((MYIOC_s_WARN_FMT "Write FW Im
- 	}
- 
- 	diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
--	ddlprintk((MYIOC_s_WARN_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT, DISABLE_ARM, RW_ENABLE\n",
-+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot diag0val=%x, turning off PREVENT_IOC_BOOT, DISABLE_ARM, RW_ENABLE\n",
- 		ioc->name, diag0val));
--
--diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM);
--ddlprintk((MYIOC_s_WARN_FMT "downloadboot: now diag0val=%x\n",
-+	diag0val &= ~(MPI_DIAG_PREVENT_IOC_BOOT | MPI_DIAG_DISABLE_ARM | MPI_DIAG_RW_ENABLE);
-+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot now diag0val=%x\n",
- 		ioc->name, diag0val));
- 	CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
- 
--if (ioc->bus_type == SAS ) {
--/* wait 1 sec */
--if (sleepFlag == CAN_SLEEP)
--{
--msleep_interruptible(1000);
--
--}
--else
--MPT_MDELAY(1000);
--
--
--
-+	/* Write 0xFF to reset the sequencer */
-+	CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
- 
--diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
--ddlprintk((MYIOC_s_WARN_FMT "downloadboot: diag0val=%x, turning off RW_ENABLE\n"
--            ioc->name, diag0val));
--diag0val &= ~(MPI_DIAG_RW_ENABLE);
--ddlprintk((MYIOC_s_WARN_FMT "downloadboot: now diag0val=%x\n",
--                   ioc->name, diag0val));
--CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
--diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
--if (diag0val & MPI_DIAG_FLASH_BAD_SIG) {
--diag0val |= MPI_DIAG_CLEAR_FLASH_BAD_SIG;
--CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
--diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
-+	if (ioc->bus_type == SAS) {
-+		ioc_state = mpt_GetIocState(ioc, 0);
-+		if ( (GetIocFacts(ioc, sleepFlag,
-+				MPT_HOSTEVENT_IOC_BRINGUP)) != 0 ) {
-+			ddlprintk((MYIOC_s_INFO_FMT "GetIocFacts failed: IocState=%x\n",
-+					ioc->name, ioc_state));
-+			return -EFAULT;
- 		}
--diag0val &= ~(MPI_DIAG_DISABLE_ARM);
--CHIPREG_WRITE32(&ioc->chip->Diagnostic, diag0val);
--diag0val = CHIPREG_READ32(&ioc->chip->Diagnostic);
--CHIPREG_WRITE32(&ioc->chip->DiagRwAddress, 0x3f000004);
- 	}
--/* Write 0xFF to reset the sequencer */
--CHIPREG_WRITE32(&ioc->chip->WriteSequence, 0xFF);
--
--        for (count = 0; count < 30; count ++) {
--           doorbell = CHIPREG_READ32(&ioc->chip->Doorbell);
--           doorbell &= MPI_IOC_STATE_MASK;
--
--                   if (doorbell == MPI_IOC_STATE_READY) {
- 
-+	for (count=0; count<HZ*20; count++) {
-+		if ((ioc_state = mpt_GetIocState(ioc, 0)) & MPI_IOC_STATE_READY) {
-+			ddlprintk((MYIOC_s_INFO_FMT "downloadboot successful! (count=%d) IocState=%x\n",
-+					ioc->name, count, ioc_state));
- 			if (ioc->bus_type == SAS) {
- 				return 0;
- 			}
--
--
--	if ((SendIocInit(ioc, sleepFlag)) != 0) {
--				ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SendIocInit failed\n",
-+			if ((SendIocInit(ioc, sleepFlag)) != 0) {
-+				ddlprintk((MYIOC_s_INFO_FMT "downloadboot: SendIocInit failed\n",
- 					ioc->name));
- 				return -EFAULT;
- 			}
--			ddlprintk((MYIOC_s_WARN_FMT "downloadboot: SendIocInit successful\n",
-+			ddlprintk((MYIOC_s_INFO_FMT "downloadboot: SendIocInit successful\n",
- 					ioc->name));
- 			return 0;
- 		}
--       ddlprintk((MYIOC_s_WARN_FMT "downloadboot: looking for READY STATE:doorbell=%x count=%d\n",ioc->name, doorbell, count));
--                     /* wait 1 sec */
--
- 		if (sleepFlag == CAN_SLEEP)
--			msleep_interruptible(1000);
-+			msleep_interruptible(10);
- 		else
--			MPT_MDELAY(1000);
-+			MPT_MDELAY(10);
- 	}
--	ddlprintk((MYIOC_s_WARN_FMT "downloadboot failed! IocState=%x\n",
-+	ddlprintk((MYIOC_s_INFO_FMT "downloadboot failed! IocState=%x\n",
- 		ioc->name, ioc_state));
- 	return -EFAULT;
- }
-@@ -3552,7 +3344,8 @@ KickStart(MPT_ADAPTER *ioc, int force, i
- 		/* Always issue a Msg Unit Reset first. This will clear some
- 		 * SCSI bus hang conditions.
- 		 */
--            mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
-+		SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, sleepFlag);
-+
- 		if (sleepFlag == CAN_SLEEP)
- 			msleep_interruptible(1000);
- 		else
-@@ -3624,26 +3417,6 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
- 			msleep_interruptible(1);
- 		else
- 			MPT_MDELAY(1);
--/*
--		 * Call each currently registered protocol IOC reset handler
--		 * with post-reset indication.
--		 * NOTE: If we're doing _IOC_BRINGUP, there can be no
--		 * MptResetHandlers[] registered yet.
-- */
--                  {
--                      int	 ii;
--                      int        r=0;
--
--                  for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) {
--                              if (MptResetHandlers[ii]) {
--  drsprintk((MYIOC_s_INFO_FMT "Calling IOC post_reset handler #%d\n",ioc->name, ii));
--  r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_POST_RESET);
--
--   }
--}
--/* FIXME?  Examine results here? */
--
--}
- 
- 		for (count = 0; count < 60; count ++) {
- 			doorbell = CHIPREG_READ32(&ioc->chip->Doorbell);
-@@ -3746,11 +3519,11 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
- 
- 			for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) {
- 				if (MptResetHandlers[ii]) {
--					drsprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n",
-+					dprintk((MYIOC_s_INFO_FMT "Calling IOC pre_reset handler #%d\n",
- 							ioc->name, ii));
- 					r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_PRE_RESET);
- 					if (ioc->alt_ioc) {
--						drsprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n",
-+						dprintk((MYIOC_s_INFO_FMT "Calling alt-%s pre_reset handler #%d\n",
- 								ioc->name, ioc->alt_ioc->name, ii));
- 						r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_PRE_RESET);
- 					}
-@@ -3901,31 +3674,18 @@ mpt_diag_reset(MPT_ADAPTER *ioc, int ign
-  *
-  *	Returns 0 for success, non-zero for failure.
-  */
--int
--mpt_SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag)
-+static int
-+SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag)
- {
--        unsigned long flags;
- 	int r;
--	u32 state, Doorbell;
-+	u32 state;
- 	int cntdn, count;
- 
--Doorbell = (reset_type<<MPI_DOORBELL_FUNCTION_SHIFT);
--
--drsprintk((MYIOC_s_WARN_FMT ": %s: reset_type=%02x Doorbell=%08x!\n",
--ioc->name, __FUNCTION__, reset_type, Doorbell));
--CHIPREG_WRITE32(&ioc->chip->Doorbell, Doorbell);
--
--if ((r = WaitForDoorbellAck(ioc, 15, sleepFlag)) < 0){
--                drsprintk((MYIOC_s_WARN_FMT ": %s: WaitForDoorbellAck failed r=%d after IOC Rese
--t type=%02x!\n",
--                        ioc->name, __FUNCTION__, r, reset_type));
-- return r;
--}
--
--spin_lock_irqsave(&ioc->diagLock, flags);
--ioc->IOCResetInProgress = 1;
--spin_unlock_irqrestore(&ioc->diagLock, flags);
--
-+	drsprintk((KERN_INFO MYNAM ": %s: Sending IOC reset(0x%02x)!\n",
-+			ioc->name, reset_type));
-+	CHIPREG_WRITE32(&ioc->chip->Doorbell, reset_type<<MPI_DOORBELL_FUNCTION_SHIFT);
-+	if ((r = WaitForDoorbellAck(ioc, 5, sleepFlag)) < 0)
-+		return r;
- 
- 	/* FW ACK'd request, wait for READY state
- 	 */
-@@ -3950,13 +3710,13 @@ spin_unlock_irqrestore(&ioc->diagLock, f
- 			MPT_MDELAY(1);	/* 1 msec delay */
- 	}
- 
-+	/* TODO!
-+	 *  Cleanup all event stuff for this IOC; re-issue EventNotification
-+	 *  request if needed.
-+	 */
- 	if (ioc->facts.Function)
- 		ioc->facts.EventState = 0;
--spin_lock_irqsave(&ioc->diagLock, flags);
--ioc->IOCResetInProgress = 0;
--spin_unlock_irqrestore(&ioc->diagLock, flags);
--drsprintk((MYIOC_s_WARN_FMT ": %s: IOC reset completed successfully state=%08x count=%d\ n",
--ioc->name, __FUNCTION__, state, count));
-+
- 	return 0;
- }
- 
-@@ -4044,9 +3804,8 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 	unsigned long flags;
- 	dma_addr_t alloc_dma;
- 	u8 *mem;
--	int i, reply_sz, req_sz, sz, total_size, num_chain, total_num_chain;
--        int scale, scale1, num_sge, numSGE, maxSGEs, SGE_size;
--	int max_sg_tablesize;
-+	int i, reply_sz, sz, total_size, num_chain, total_num_chain;
-+	int scale, scale1, num_sge, numSGE, maxSGEs, SGE_size;
- 
- 	/*  Prime reply FIFO...  */
- 
-@@ -4073,13 +3832,12 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 			" numSGE=%d MaxChainDepth=%d maxSGEs=%d mpt_sg_tablesize=%d\n",
- 			ioc->name, ioc->req_sz, SGE_size, scale, num_sge, numSGE, 
- 			ioc->facts.MaxChainDepth, maxSGEs, mpt_sg_tablesize));
--		max_sg_tablesize = mpt_sg_tablesize;
--		if (max_sg_tablesize > maxSGEs) {
--			max_sg_tablesize = maxSGEs;
--			dinitprintk((KERN_INFO MYNAM ": %s max_sg_tablesize=%d now\n",
--				ioc->name, max_sg_tablesize));
--		} else if (max_sg_tablesize < maxSGEs) {
--			numSGE = max_sg_tablesize - num_sge;
-+		if (mpt_sg_tablesize > maxSGEs) {
-+			mpt_sg_tablesize = maxSGEs;
-+			dinitprintk((KERN_INFO MYNAM ": %s mpt_sg_tablesize=%d now\n",
-+				ioc->name, mpt_sg_tablesize));
-+		} else if (mpt_sg_tablesize < maxSGEs) {
-+			numSGE = mpt_sg_tablesize - num_sge;
- 			dinitprintk((KERN_INFO MYNAM ": %s numSGE=%d now\n",
- 				ioc->name, numSGE));
- 		}
-@@ -4099,12 +3857,11 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 
- 		numSGE = scale1 * (total_num_chain-1);
- 		maxSGEs = num_sge + numSGE;
--		if (max_sg_tablesize > maxSGEs) {
--			max_sg_tablesize = maxSGEs;
--			dinitprintk((KERN_INFO MYNAM ": %s max_sg_tablesize=%d now, maxSGEs=%d numSGE=%d\n",
--				ioc->name, max_sg_tablesize, maxSGEs, numSGE));
-+		if (mpt_sg_tablesize > maxSGEs) {
-+			mpt_sg_tablesize = maxSGEs;
-+			dinitprintk((KERN_INFO MYNAM ": %s mpt_sg_tablesize=%d now, maxSGEs=%d numSGE=%d\n",
-+				ioc->name, mpt_sg_tablesize, maxSGEs, numSGE));
- 		}
--		ioc->sg_tablesize = max_sg_tablesize;
- 
- 		dinitprintk((KERN_INFO MYNAM ": %s req_depth=%d max num_chain=%d mpt_chain_alloc_percent=%d total_num_chain=%d\n",
- 			ioc->name, ioc->req_depth, num_chain, mpt_chain_alloc_percent, total_num_chain));
-@@ -4116,17 +3873,14 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 		dinitprintk((KERN_INFO MYNAM ": %s Total ReplyBuffer sz=%d[%x] bytes\n",
- 			 	ioc->name, reply_sz, reply_sz));
- 
--                req_sz = ioc->req_sz;
--                sz = (req_sz * ioc->req_depth);
--
--	dinitprintk((KERN_INFO MYNAM ": %s RequestBuffer sz=%d bytes, RequestDepth=%d\n",
--				ioc->name, req_sz, ioc->req_depth));
--
-+		sz = (ioc->req_sz * ioc->req_depth);
-+		dinitprintk((KERN_INFO MYNAM ": %s RequestBuffer sz=%d bytes, RequestDepth=%d\n",
-+			 	ioc->name, ioc->req_sz, ioc->req_depth));
- 		dinitprintk((KERN_INFO MYNAM ": %s Total RequestBuffer sz=%d[%x] bytes\n",
- 			 	ioc->name, sz, sz));
- 		total_size += sz;
- 
--		sz = total_num_chain *req_sz; /* chain buffer pool size */
-+		sz = total_num_chain * ioc->req_sz; /* chain buffer pool size */
- 		dinitprintk((KERN_INFO MYNAM ": %s Total ChainBuffer sz=%d[%x] bytes total_num_chain=%d\n",
- 			 	ioc->name, sz, sz, total_num_chain));
- 
-@@ -4182,14 +3936,14 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- #endif
- 
- 		for (i = 0; i < ioc->req_depth; i++) {
--			alloc_dma += req_sz;
--			mem += req_sz;
-+			alloc_dma += ioc->req_sz;
-+			mem += ioc->req_sz;
- 		}
- 
- 		ioc->ChainBuffer = mem;
- 		ioc->ChainBufferDMA = alloc_dma;
- 
--		dinitprintk((KERN_INFO MYNAM ": %s ChainBuffers @ %p(%p)\n",
-+		dinitprintk((KERN_INFO MYNAM " :%s ChainBuffers @ %p(%p)\n",
- 			ioc->name, ioc->ChainBuffer, (void *)(ulong)ioc->ChainBufferDMA));
- 
- 		/* Initialize the free chain Q.
-@@ -4197,6 +3951,10 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 
- 		INIT_LIST_HEAD(&ioc->FreeChainQ);
- 
-+		/* initialize the SAS device list */
-+
-+		INIT_LIST_HEAD(&ioc->sasDeviceList);
-+
- 		/* Post the chain buffers to the FreeChainQ.
- 	 	*/
- 		mem = (u8 *)ioc->ChainBuffer;
-@@ -4205,7 +3963,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 			list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeChainQ);
- //			dinitprintk((MYIOC_s_INFO_FMT "Adding %p to FreeChainQ at %d\n",
-  //				ioc->name, mf, i));
--			mem += req_sz;
-+			mem += ioc->req_sz;
- 		}
- 
- 		/* Initialize Request frames linked list
-@@ -4220,7 +3978,7 @@ PrimeIocFifos(MPT_ADAPTER *ioc)
- 
- 			/*  Queue REQUESTs *internally*!  */
- 			list_add_tail(&mf->u.frame.linkage.list, &ioc->FreeQ);
--			mem += req_sz;
-+			mem += ioc->req_sz;
- 		}
- 		spin_unlock_irqrestore(&ioc->FreeQlock, flags);
- 
-@@ -4293,7 +4051,8 @@ out_fail:
-  *
-  *	Returns 0 for success, non-zero for failure.
-  */
--int mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req,
-+static int
-+mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req,
- 		int replyBytes, u16 *u16reply, int maxwait, int sleepFlag)
- {
- 	MPIDefaultReply_t *mptReply;
-@@ -4412,7 +4171,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int
- 			intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
- 			if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS))
- 				break;
--			msleep_interruptible(10);
-+			msleep_interruptible(1);
- 			count++;
- 		}
- 	} else {
-@@ -4420,7 +4179,7 @@ WaitForDoorbellAck(MPT_ADAPTER *ioc, int
- 			intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
- 			if (! (intstat & MPI_HIS_IOP_DOORBELL_STATUS))
- 				break;
--                          udelay(1000);
-+			MPT_MDELAY(1);
- 			count++;
- 		}
- 	}
-@@ -4461,7 +4220,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int
- 			intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
- 			if (intstat & MPI_HIS_DOORBELL_INTERRUPT)
- 				break;
--			msleep_interruptible(10);
-+			msleep_interruptible(1);
- 			count++;
- 		}
- 	} else {
-@@ -4469,7 +4228,7 @@ WaitForDoorbellInt(MPT_ADAPTER *ioc, int
- 			intstat = CHIPREG_READ32(&ioc->chip->IntStatus);
- 			if (intstat & MPI_HIS_DOORBELL_INTERRUPT)
- 				break;
--                          udelay(1000);
-+			MPT_MDELAY(1);
- 			count++;
- 		}
- 	}
-@@ -4944,40 +4703,481 @@ GetManufPage0_exit:
- 	return rc;
- }
- 
-+
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-- *	mptbase_sas_persist_operation - Perform operation on SAS Persitent Table
-+ *	mpt_sas_get_info - Fetch Hw Max and Min Link Rates.  These values
-+ *               get overwritten, so must be saved at init time.
-  *	@ioc: Pointer to MPT_ADAPTER structure
-- *	@sas_address: 64bit SAS Address for operation.
-- *	@target_id: specified target for operation
-- *	@bus: specified bus for operation
-- *	@persist_opcode: see below
-- *
-- *	MPI_SAS_OP_CLEAR_NOT_PRESENT - Free all persist TargetID mappings for
-- *		devices not currently present.
-- *	MPI_SAS_OP_CLEAR_ALL_PERSISTENT - Clear al persist TargetID mappings
-- *
-- *	NOTE: Don't use not this function during interrupt time.
-+ *	@numPorts: number of ports for this IOC
-  *
-- *	Returns: 0 for success, non-zero error
-+ *	Return: 0 for success
-+ *	-ENOMEM if no memory available
-+ *		-EPERM if not allowed due to ISR context
-+ *		-EAGAIN if no msg frames currently available
-+ *		-EFAULT for non-successful reply or no reply (timeout)
-  */
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- int
--mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
-+mpt_sas_get_info(MPT_ADAPTER *ioc)
- {
--	SasIoUnitControlRequest_t	*sasIoUnitCntrReq;
--	SasIoUnitControlReply_t		*sasIoUnitCntrReply;
--	MPT_FRAME_HDR			*mf = NULL;
--	MPIHeader_t			*mpi_hdr;
-+	ConfigExtendedPageHeader_t hdr;
-+	CONFIGPARMS		cfg;
-+	SasIOUnitPage0_t	*sasIoUnitPg0=NULL;
-+	dma_addr_t		sasIoUnitPg0_dma;
-+	SasPhyPage0_t		*sasPhyPg0=NULL;
-+	dma_addr_t		sasPhyPg0_dma;
-+	SasDevicePage0_t	*sasDevicePg0=NULL;
-+	dma_addr_t		sasDevicePg0_dma;
-+	sas_device_info_t	*sasDevice;
-+	u32			devHandle;
-+	int			sasIoUnitPg0_data_sz=0;
-+	int			sasPhyPg0_data_sz=0;
-+	int			sasDevicePg0_data_sz=0;
-+	int			sz;
-+	int		        rc;
-+	int			ii;
-+	int			phyCounter;
-+	u8			*mem;
-+	u64			SASAddress64;
-+	char 			*ds = NULL;
- 
-+	/* Issue a config request to get the number of phys
-+	 */
-+	ioc->sasPhyInfo=NULL;
- 
--	/* insure garbage is not sent to fw */
--	switch(persist_opcode) {
-+	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
- 
--	case MPI_SAS_OP_CLEAR_NOT_PRESENT:
--	case MPI_SAS_OP_CLEAR_ALL_PERSISTENT:
--		break;
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.physAddr = -1;
-+	cfg.pageAddr = 0;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = 10;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		goto mpt_sas_get_info_exit;
-+	}
-+
-+	if (hdr.ExtPageLength == 0) {
-+		rc = -EFAULT;
-+		goto mpt_sas_get_info_exit;
-+	}
-+
-+	sasIoUnitPg0_data_sz = hdr.ExtPageLength * 4;
-+	sasIoUnitPg0 = (SasIOUnitPage0_t *) pci_alloc_consistent(ioc->pcidev,
-+	    sasIoUnitPg0_data_sz, &sasIoUnitPg0_dma);
-+	if (!sasIoUnitPg0) {
-+		rc = -ENOMEM;
-+		goto mpt_sas_get_info_exit;
-+	}
-+
-+	memset((u8 *)sasIoUnitPg0, 0, sasIoUnitPg0_data_sz);
-+	cfg.physAddr = sasIoUnitPg0_dma;
-+	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+	if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+		goto mpt_sas_get_info_exit;
-+	}
-+
-+	/* save the data */
-+	ioc->numPhys = sasIoUnitPg0->NumPhys;
-+
-+	dsasprintk((MYIOC_s_INFO_FMT "Number of PHYS=%d\n",
-+	    ioc->name, sasIoUnitPg0->NumPhys));
-+
-+	sz = ioc->numPhys * sizeof (sas_phy_info_t);
-+
-+	if ((mem = kmalloc(sz, GFP_ATOMIC)) == NULL) {
-+		rc = -ENOMEM;
-+		goto mpt_sas_get_info_exit;
-+	}
-+
-+	memset(mem, 0, sz);
-+	ioc->alloc_total += sz;
-+	ioc->sasPhyInfo = (sas_phy_info_t *) mem;
-+
-+	/* Issue a config request to get phy information. */
-+	hdr.PageVersion = MPI_SASPHY0_PAGEVERSION;
-+	hdr.ExtPageLength = 0;
-+	hdr.PageNumber = 0;
-+	hdr.Reserved1 = 0;
-+	hdr.Reserved2 = 0;
-+	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_PHY;
-+
-+	cfg.cfghdr.ehdr = &hdr;
-+	cfg.dir = 0;	/* read */
-+	cfg.timeout = 10;
-+
-+	/* Fill in information for each phy. */
-+	for (ii = 0; ii < ioc->numPhys; ii++) {
-+
-+		/* Get Phy Pg 0 for each Phy. */
-+		cfg.pageAddr = ii;
-+		cfg.physAddr = -1;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+
-+		if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		if (hdr.ExtPageLength == 0) {
-+			rc = -EFAULT;
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		sasPhyPg0_data_sz = hdr.ExtPageLength * 4;
-+		sasPhyPg0 = (SasPhyPage0_t *) pci_alloc_consistent(
-+		    ioc->pcidev, sasPhyPg0_data_sz, &sasPhyPg0_dma);
-+		if (!sasPhyPg0) {
-+			rc = -ENOMEM;
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		memset((u8 *)sasPhyPg0, 0, sasPhyPg0_data_sz);
-+		cfg.physAddr = sasPhyPg0_dma;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+
-+		/* Save HwLinkRate.
-+		 * It may be modified accidently via FW
-+		 */
-+		if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		ioc->sasPhyInfo[ii].hwLinkRate = sasPhyPg0->HwLinkRate;
-+		ioc->sasPhyInfo[ii].phyId = ii;
-+		ioc->sasPhyInfo[ii].port = sasIoUnitPg0->PhyData[ii].Port;
-+		ioc->sasPhyInfo[ii].ControllerDevHandle =
-+		    le16_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerDevHandle);
-+		ioc->sasPhyInfo[ii].PortFlags =
-+		    sasIoUnitPg0->PhyData[ii].PortFlags;
-+		ioc->sasPhyInfo[ii].PhyFlags =
-+		    sasIoUnitPg0->PhyData[ii].PhyFlags;
-+		ioc->sasPhyInfo[ii].NegotiatedLinkRate =
-+		    sasIoUnitPg0->PhyData[ii].NegotiatedLinkRate;
-+		ioc->sasPhyInfo[ii].ControllerPhyDeviceInfo =
-+		    le32_to_cpu(sasIoUnitPg0->PhyData[ii].ControllerPhyDeviceInfo);
-+
-+		memcpy(&SASAddress64,&sasPhyPg0->SASAddress,sizeof(sasPhyPg0->SASAddress));
-+		le64_to_cpus(&SASAddress64);
-+		if (SASAddress64) {
-+			dsasprintk(("---- SAS PHY PAGE 0 ------------\n"));
-+			dsasprintk(("Handle=0x%X\n",
-+			    le16_to_cpu(sasPhyPg0->AttachedDevHandle)));
-+			dsasprintk(("SAS Address=0x%llX\n",SASAddress64));
-+			dsasprintk(("Attached PHY Identifier=0x%X\n",
-+			    sasPhyPg0->AttachedPhyIdentifier));
-+			dsasprintk(("Attached Device Info=0x%X\n",
-+			    le32_to_cpu(sasPhyPg0->AttachedDeviceInfo)));
-+			dsasprintk(("Programmed Link Rate=0x%X\n",
-+			    sasPhyPg0->ProgrammedLinkRate));
-+			dsasprintk(("Hardware Link Rate=0x%X\n",
-+			    ioc->sasPhyInfo[ii].hwLinkRate));
-+			dsasprintk(("Change Count=0x%X\n",
-+			    sasPhyPg0->ChangeCount));
-+			dsasprintk(("PHY Info=0x%X\n",
-+			    le32_to_cpu(sasPhyPg0->PhyInfo)));
-+			dsasprintk(("\n"));
-+		}
-+
-+		pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
-+		    (u8 *) sasPhyPg0, sasPhyPg0_dma);
-+
-+		sasPhyPg0=NULL;
-+	}
-+
-+
-+	/* Get all Device info and store in linked list. */
-+	devHandle = 0xFFFF;
-+	phyCounter=0;
-+	while(1) {
-+		/* Get SAS device page 0 */
-+
-+		hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
-+		hdr.ExtPageLength = 0;
-+		hdr.PageNumber = 0;
-+		hdr.Reserved1 = 0;
-+		hdr.Reserved2 = 0;
-+		hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
-+		hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
-+
-+		cfg.cfghdr.ehdr = &hdr;
-+		cfg.physAddr = -1;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
-+		cfg.dir = 0;	/* read */
-+		cfg.timeout = 10;
-+
-+		if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		if (hdr.ExtPageLength == 0) {
-+			rc = -EFAULT;
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		sasDevicePg0_data_sz = hdr.ExtPageLength * 4;
-+		sasDevicePg0 = (SasDevicePage0_t *) pci_alloc_consistent(
-+		    ioc->pcidev, sasDevicePg0_data_sz, &sasDevicePg0_dma);
-+		if (!sasDevicePg0) {
-+			rc = -ENOMEM;
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		memset((u8 *)sasDevicePg0, 0, sasDevicePg0_data_sz);
-+		cfg.physAddr = sasDevicePg0_dma;
-+		cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
-+		cfg.pageAddr = devHandle;
-+
-+		if ((rc = mpt_config(ioc, &cfg)) != 0) {
-+
-+		/*
-+		 * break from the while loop when this fails
-+		 * which means we have discovered all devices
-+		 */
-+			rc=0;
-+			goto mpt_sas_get_info_exit;
-+		}
-+
-+		dsasprintk(("---- SAS DEVICE PAGE 0 ---------\n"));
-+		dsasprintk(("Handle=0x%X\n",le16_to_cpu(sasDevicePg0->DevHandle)));
-+		dsasprintk(("Enclosure Handle=0x%X\n",le16_to_cpu(sasDevicePg0->EnclosureHandle)));
-+		dsasprintk(("Slot=0x%X\n",le16_to_cpu(sasDevicePg0->Slot)));
-+		memcpy(&SASAddress64,&sasDevicePg0->SASAddress,sizeof(sasDevicePg0->SASAddress));
-+		le64_to_cpus(&SASAddress64);
-+		dsasprintk(("SAS Address=0x%llX\n",SASAddress64));
-+		dsasprintk(("Target ID=0x%X\n",sasDevicePg0->TargetID));
-+		dsasprintk(("Bus=0x%X\n",sasDevicePg0->Bus));
-+		dsasprintk(("PhyNum=0x%X\n",sasDevicePg0->PhyNum));
-+		dsasprintk(("AccessStatus=0x%X\n",le16_to_cpu(sasDevicePg0->AccessStatus)));
-+		dsasprintk(("Device Info=0x%X\n",le32_to_cpu(sasDevicePg0->DeviceInfo)));
-+		dsasprintk(("Flags=0x%X\n",le16_to_cpu(sasDevicePg0->Flags)));
-+		dsasprintk(("Physical Port=0x%X\n",sasDevicePg0->PhysicalPort));
-+		dsasprintk(("\n"));
-+
-+		if(phyCounter < ioc->numPhys) {
-+			ioc->sasPhyInfo[phyCounter].SASAddress = SASAddress64;
-+			ioc->sasPhyInfo[phyCounter].devHandle =
-+				le16_to_cpu(sasDevicePg0->DevHandle);
-+			phyCounter++;
-+		}else {
-+			if (le32_to_cpu(sasDevicePg0->DeviceInfo) &
-+			    (MPI_SAS_DEVICE_INFO_SSP_TARGET |
-+			     MPI_SAS_DEVICE_INFO_STP_TARGET |
-+			     MPI_SAS_DEVICE_INFO_SATA_DEVICE )) {
-+
-+				if ((sasDevice = kmalloc(sizeof (sas_device_info_t),
-+				    GFP_ATOMIC)) == NULL) {
-+					rc = -ENOMEM;
-+					goto mpt_sas_get_info_exit;
-+				}
-+
-+				memset(sasDevice, 0, sizeof (sas_device_info_t));
-+				ioc->alloc_total += sizeof (sas_device_info_t);
-+				list_add_tail(&sasDevice->list, &ioc->sasDeviceList);
-+				sasDevice->SASAddress = SASAddress64;
-+				sasDevice->TargetId = sasDevicePg0->TargetID;
-+				sasDevice->Bus = sasDevicePg0->Bus;
-+				sasDevice->DeviceInfo =
-+				  le32_to_cpu(sasDevicePg0->DeviceInfo);
-+				sasDevice->DevHandle =
-+				   le16_to_cpu(sasDevicePg0->DevHandle);
-+				sasDevice->Flags =
-+				    le16_to_cpu(sasDevicePg0->Flags);
-+				sasDevice->PhyNum = sasDevicePg0->PhyNum;
-+				sasDevice->PhysicalPort =
-+				    sasDevicePg0->PhysicalPort;
-+				if(sasDevice->DeviceInfo &
-+				    MPI_SAS_DEVICE_INFO_SSP_TARGET)
-+					ds = "sas";
-+				if(sasDevice->DeviceInfo &
-+				    MPI_SAS_DEVICE_INFO_STP_TARGET)
-+					ds = "stp";
-+				if(sasDevice->DeviceInfo &
-+				    MPI_SAS_DEVICE_INFO_SATA_DEVICE)
-+					ds = "sata";
-+				dsasprintk(( 
-+					"Inserting %s device, channel %d, id %d, phy %d\n\n",
-+					ds,sasDevice->Bus,
-+					sasDevice->TargetId,
-+					sasDevicePg0->PhyNum));
-+			}
-+		}
-+
-+		devHandle = (MPI_SAS_DEVICE_PGAD_FORM_GET_NEXT_HANDLE
-+			<< MPI_SAS_DEVICE_PGAD_FORM_SHIFT) |
-+			le16_to_cpu(sasDevicePg0->DevHandle);
-+
-+		pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz,
-+			    (u8 *) sasDevicePg0, sasDevicePg0_dma);
-+
-+		sasDevicePg0=NULL;
-+
-+	};
-+
-+mpt_sas_get_info_exit:
-+
-+
-+	if (sasPhyPg0)
-+		pci_free_consistent(ioc->pcidev, sasPhyPg0_data_sz,
-+		    (u8 *) sasPhyPg0, sasPhyPg0_dma);
-+
-+	if (sasIoUnitPg0)
-+		pci_free_consistent(ioc->pcidev, sasIoUnitPg0_data_sz,
-+		    (u8 *) sasIoUnitPg0, sasIoUnitPg0_dma);
-+
-+	if (sasDevicePg0)
-+		pci_free_consistent(ioc->pcidev, sasDevicePg0_data_sz,
-+			    (u8 *) sasDevicePg0, sasDevicePg0_dma);
-+
-+	return rc;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+
-+static void
-+mptbase_sas_process_event_data(MPT_ADAPTER *ioc,
-+    MpiEventDataSasDeviceStatusChange_t * pSasEventData)
-+{
-+	sas_device_info_t	*sasDevice;
-+	int 			ii;
-+	char			*ds=NULL;
-+
-+	switch(pSasEventData->ReasonCode) {
-+	case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
-+
-+		// sanity check so we are not adding a target that is already in the list.
-+		list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+			if (pSasEventData->TargetID ==
-+			    sasDevice->TargetId)
-+				return;
-+				break; 
-+		}
-+
-+		if ((le32_to_cpu(pSasEventData->DeviceInfo) &
-+		    (MPI_SAS_DEVICE_INFO_SSP_TARGET |
-+		     MPI_SAS_DEVICE_INFO_STP_TARGET |
-+		     MPI_SAS_DEVICE_INFO_SATA_DEVICE )) == 0) {
-+			break;
-+		}
-+
-+		if ((sasDevice = kmalloc(sizeof (sas_device_info_t),
-+		    GFP_ATOMIC)) == NULL) {
-+			break;
-+		}
-+
-+		memset(sasDevice, 0, sizeof (sas_device_info_t));
-+		list_add_tail(&sasDevice->list, &ioc->sasDeviceList);
-+		ioc->alloc_total += sizeof (sas_device_info_t);
-+
-+		memcpy(&sasDevice->SASAddress,&pSasEventData->SASAddress,sizeof(u64));
-+		le64_to_cpus(&sasDevice->SASAddress);
-+		sasDevice->TargetId = pSasEventData->TargetID;
-+		sasDevice->Bus = pSasEventData->Bus;
-+		sasDevice->DeviceInfo =
-+		    le32_to_cpu(pSasEventData->DeviceInfo);
-+		sasDevice->DevHandle =
-+		    le16_to_cpu(pSasEventData->DevHandle);
-+		sasDevice->PhyNum = pSasEventData->PhyNum;
-+		pSasEventData->ParentDevHandle =
-+		    le16_to_cpu(pSasEventData->ParentDevHandle);
-+
-+		for(ii=0;ii<ioc->numPhys;ii++) {
-+			if(pSasEventData->ParentDevHandle ==
-+			    ioc->sasPhyInfo[ii].ControllerDevHandle) {
-+				sasDevice->PhysicalPort =
-+				    ioc->sasPhyInfo[ii].port;
-+			}
-+		}
-+
-+		if(sasDevice->DeviceInfo &
-+		    MPI_SAS_DEVICE_INFO_SSP_TARGET)
-+			ds = "sas";
-+		if(sasDevice->DeviceInfo &
-+		    MPI_SAS_DEVICE_INFO_STP_TARGET)
-+			ds = "stp";
-+		if(sasDevice->DeviceInfo &
-+		    MPI_SAS_DEVICE_INFO_SATA_DEVICE)
-+			ds = "sata";
-+		dsasprintk(( 
-+			"Inserting %s device, channel %d, id %d, phy %d\n\n",
-+			ds,sasDevice->Bus,
-+			sasDevice->TargetId,
-+			sasDevice->PhyNum));
-+		dsasprintk(("SAS Address=0x%llX\n",sasDevice->SASAddress));
-+		dsasprintk(("Device Info=0x%X\n",sasDevice->DeviceInfo));
-+		dsasprintk(("Physical Port=0x%X\n",sasDevice->PhysicalPort));
-+		dsasprintk(("\n"));
-+
-+		break;
-+
-+	case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
-+
-+		list_for_each_entry(sasDevice, &ioc->sasDeviceList, list) {
-+
-+			if (le16_to_cpu(pSasEventData->DevHandle) ==
-+			    sasDevice->DevHandle) {
-+
-+				dsasprintk(("Removing device from link list!!!\n\n"));
-+				list_del(&sasDevice->list);
-+				kfree(sasDevice);
-+				ioc->alloc_total -= sizeof (sas_device_info_t);
-+				break;
-+			}
-+		}
-+		break;
-+
-+	case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
-+	case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
-+	case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED:
-+	default:
-+		break;
-+	}
-+
-+
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*
-+ *	mptbase_sas_persist_operation - Perform operation on SAS Persitent Table
-+ *	@ioc: Pointer to MPT_ADAPTER structure
-+ *	@sas_address: 64bit SAS Address for operation.
-+ *	@target_id: specified target for operation
-+ *	@bus: specified bus for operation
-+ *	@persist_opcode: see below
-+ *
-+ *	MPI_SAS_OP_CLEAR_NOT_PRESENT - Free all persist TargetID mappings for
-+ *		devices not currently present.
-+ *	MPI_SAS_OP_CLEAR_ALL_PERSISTENT - Clear al persist TargetID mappings
-+ *
-+ *	NOTE: Don't use not this function during interrupt time.
-+ *
-+ *	Returns: 0 for success, non-zero error
-+ */
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+int
-+mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode)
-+{
-+	SasIoUnitControlRequest_t	*sasIoUnitCntrReq;
-+	SasIoUnitControlReply_t		*sasIoUnitCntrReply;
-+	MPT_FRAME_HDR			*mf = NULL;
-+	MPIHeader_t			*mpi_hdr;
-+
-+
-+	/* insure garbage is not sent to fw */
-+	switch(persist_opcode) {
-+
-+	case MPI_SAS_OP_CLEAR_NOT_PRESENT:
-+	case MPI_SAS_OP_CLEAR_ALL_PERSISTENT:
-+		break;
- 
- 	default:
- 		return -1;
-@@ -4992,7 +5192,7 @@ mptbase_sas_persist_operation(MPT_ADAPTE
- 		dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
- 		    ioc->name,__FUNCTION__));
- 		return -1;
--        }
-+	}
- 
- 	mpi_hdr = (MPIHeader_t *) mf;
- 	sasIoUnitCntrReq = (SasIoUnitControlRequest_t *)mf;
-@@ -5303,7 +5503,7 @@ mpt_GetScsiPortSettings(MPT_ADAPTER *ioc
- 
- 				if ( (pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_QAS) == 0 ) {
- 					ioc->spi_data.noQas |= MPT_TARGET_NO_NEGO_QAS;
--					ddvprintk((KERN_INFO MYNAM ": %s noQas due to Capabilities=%x\n",
-+					ddvprintk((KERN_INFO MYNAM " :%s noQas due to Capabilities=%x\n",
- 						ioc->name, pPP0->Capabilities));
- 				}
- 				ioc->spi_data.maxBusWidth = pPP0->Capabilities & MPI_SCSIPORTPAGE0_CAP_WIDE ? 1 : 0;
-@@ -5452,188 +5652,6 @@ mpt_readScsiDevicePageHeaders(MPT_ADAPTE
- 	return 0;
- }
- 
--/**
-- *	mpt_raid_phys_disk_pg0 - returns phys disk page zero
-- *	@ioc: Pointer to a Adapter Structure
-- *	@phys_disk_num: io unit unique phys disk num generated by the ioc
-- *	@phys_disk: requested payload data returned
-- *
-- *	Return:
-- *	0 on success
-- *	-EFAULT if read of config page header fails or data pointer not NULL
-- *	-ENOMEM if pci_alloc failed
-- **/
--int
--mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk)
--{
--	CONFIGPARMS		 	cfg;
--	ConfigPageHeader_t	 	hdr;
--	dma_addr_t			dma_handle;
--	pRaidPhysDiskPage0_t		buffer = NULL;
--	int				rc;
--
--	memset(&cfg, 0 , sizeof(CONFIGPARMS));
--	memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
--
--	hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_PHYSDISK;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--
--	if (mpt_config(ioc, &cfg) != 0) {
--		rc = -EFAULT;
--		goto out;
--	}
--
--	if (!hdr.PageLength) {
--		rc = -EFAULT;
--		goto out;
--	}
--
--	buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
--	    &dma_handle);
--
--	if (!buffer) {
--		rc = -ENOMEM;
--		goto out;
--	}
--
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--	cfg.pageAddr = phys_disk_num;
--
--	if (mpt_config(ioc, &cfg) != 0) {
--		rc = -EFAULT;
--		goto out;
--	}
--
--	rc = 0;
--	memcpy(phys_disk, buffer, sizeof(*buffer));
--	phys_disk->MaxLBA = le32_to_cpu(buffer->MaxLBA);
--
-- out:
--
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
--		    dma_handle);
--
--	return rc;
--}
--
--/**
-- * mpt_inactive_raid_list_free
-- *
-- * This clears this link list.
-- *
-- * @ioc - pointer to per adapter structure
-- *
-- **/
--static void
--mpt_inactive_raid_list_free(MPT_ADAPTER *ioc)
--{
--	struct inactive_raid_component_info *component_info, *pNext;
--
--	if (list_empty(&ioc->raid_data.inactive_list))
--		return;
--
--	down(&ioc->raid_data.inactive_list_mutex);
--	list_for_each_entry_safe(component_info, pNext,
--	    &ioc->raid_data.inactive_list, list) {
--		list_del(&component_info->list);
--		kfree(component_info);
--	}
--	up(&ioc->raid_data.inactive_list_mutex);
--}
--
--/**
-- * mpt_inactive_raid_volumes
-- *
-- * This sets up link list of phy_disk_nums for devices belonging in an inactive volume
-- *
-- * @ioc - pointer to per adapter structure
-- * @channel - volume channel
-- * @id - volume target id
-- *
-- *
-- **/
--static void
--mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	CONFIGPARMS			cfg;
--	ConfigPageHeader_t		hdr;
--	dma_addr_t			dma_handle;
--	pRaidVolumePage0_t		buffer = NULL;
--	int				i;
--	RaidPhysDiskPage0_t 		phys_disk;
--	struct inactive_raid_component_info *component_info;
--	int				handle_inactive_volumes;
--
--	memset(&cfg, 0 , sizeof(CONFIGPARMS));
--	memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
--	hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
--	cfg.pageAddr = (channel << 8) + id;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--
--	if (mpt_config(ioc, &cfg) != 0)
--		goto out;
--
--	if (!hdr.PageLength)
--		goto out;
--
--	buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
--	    &dma_handle);
--
--	if (!buffer)
--		goto out;
--
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if (mpt_config(ioc, &cfg) != 0)
--		goto out;
--
--	if (!buffer->NumPhysDisks)
--		goto out;
--
--	handle_inactive_volumes =
--	   (buffer->VolumeStatus.Flags & MPI_RAIDVOL0_STATUS_FLAG_VOLUME_INACTIVE ||
--	   (buffer->VolumeStatus.Flags & MPI_RAIDVOL0_STATUS_FLAG_ENABLED) == 0 ||
--	    buffer->VolumeStatus.State == MPI_RAIDVOL0_STATUS_STATE_FAILED ||
--	    buffer->VolumeStatus.State == MPI_RAIDVOL0_STATUS_STATE_MISSING) ? 1 : 0;
--
--	if (!handle_inactive_volumes)
--		goto out;
--
--	down(&ioc->raid_data.inactive_list_mutex);
--	for (i = 0; i < buffer->NumPhysDisks; i++) {
--		if(mpt_raid_phys_disk_pg0(ioc,
--		    buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
--			continue;
--
--		if ((component_info = kmalloc(sizeof (*component_info),
--		 GFP_KERNEL)) == NULL)
--			continue;
--
--		component_info->volumeID = id;
--		component_info->volumeBus = channel;
--		component_info->d.PhysDiskNum = phys_disk.PhysDiskNum;
--		component_info->d.PhysDiskBus = phys_disk.PhysDiskBus;
--		component_info->d.PhysDiskID = phys_disk.PhysDiskID;
--		component_info->d.PhysDiskIOC = phys_disk.PhysDiskIOC;
--
--		list_add_tail(&component_info->list,
--		    &ioc->raid_data.inactive_list);
--	}
--	up(&ioc->raid_data.inactive_list_mutex);
--
-- out:
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
--		    dma_handle);
--}
--
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
-  *	mpt_findImVolumes - Identify IDs of hidden disks and RAID Volumes
-@@ -5657,16 +5675,8 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
- 	int			 jj;
- 	int			 rc = 0;
- 	int			 iocpage2sz;
--
--	if (!ioc->ir_firmware)
--		return 0;
--
--	/* Free the old page
--	 */
--	kfree(ioc->raid_data.pIocPg2);
--	ioc->raid_data.pIocPg2 = NULL;
--	mpt_inactive_raid_list_free(ioc);
--	ioc->raid_data.isRaid = 0;
-+	u8			 nVols, nPhys;
-+	u8			 vid, vbus, vioc;
- 
- 	/* Read IOCP2 header then the page.
- 	 */
-@@ -5696,35 +5706,53 @@ mpt_findImVolumes(MPT_ADAPTER *ioc)
- 	if (mpt_config(ioc, &cfg) != 0)
- 		goto done_and_free;
- 
--	mem = kmalloc(iocpage2sz, GFP_ATOMIC);
--	if (!mem)
--		goto done_and_free;
--
-+	if ( (mem = (u8 *)ioc->raid_data.pIocPg2) == NULL ) {
-+		mem = kmalloc(iocpage2sz, GFP_ATOMIC);
-+		if (mem) {
-+			ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;
-+		} else {
-+			goto done_and_free;
-+		}
-+	}
- 	memcpy(mem, (u8 *)pIoc2, iocpage2sz);
--	ioc->raid_data.pIocPg2 = (IOCPage2_t *) mem;
- 
- 	/* Identify RAID Volume Id's */
--	if (pIoc2->NumActiveVolumes) {
--
--		pIocRv = pIoc2->RaidVolume;
--		/*
--		 * WARNING - ioc->raid_data.isRaid
--		 * doesn't consider channels
-+	nVols = pIoc2->NumActiveVolumes;
-+	if ( nVols == 0) {
-+		/* No RAID Volume.
- 		 */
--		for (jj = 0; jj < pIoc2->NumActiveVolumes; jj++, pIocRv++) {
--			if (pIocRv->VolumeBus)
--				continue;
--			ioc->raid_data.isRaid |= (1 << pIocRv->VolumeID);
--			mpt_inactive_raid_volumes(ioc,
--			    pIoc2->RaidVolume[jj].VolumeBus,
--			    pIoc2->RaidVolume[jj].VolumeID);
-+		goto done_and_free;
-+	} else {
-+		/* At least 1 RAID Volume
-+		 */
-+		pIocRv = pIoc2->RaidVolume;
-+		ioc->raid_data.isRaid = 0;
-+		for (jj = 0; jj < nVols; jj++, pIocRv++) {
-+			vid = pIocRv->VolumeID;
-+			vbus = pIocRv->VolumeBus;
-+			vioc = pIocRv->VolumeIOC;
-+
-+			/* find the match
-+			 */
-+			if (vbus == 0) {
-+				ioc->raid_data.isRaid |= (1 << vid);
-+			} else {
-+				/* Error! Always bus 0
-+				 */
-+			}
- 		}
--	             mpt_read_ioc_pg_3(ioc);
--                     mpt_read_ioc_pg_6(ioc);
--        }
-+	}
- 
-+	/* Identify Hidden Physical Disk Id's */
-+	nPhys = pIoc2->NumActivePhysDisks;
-+	if (nPhys == 0) {
-+		/* No physical disks.
-+		 */
-+	} else {
-+		mpt_read_ioc_pg_3(ioc);
-+	}
- 
-- done_and_free:
-+done_and_free:
- 	pci_free_consistent(ioc->pcidev, iocpage2sz, pIoc2, ioc2_dma);
- 
- 	return rc;
-@@ -5845,65 +5873,6 @@ mpt_read_ioc_pg_4(MPT_ADAPTER *ioc)
- }
- 
- static void
--mpt_read_ioc_pg_6(MPT_ADAPTER *ioc)
--{
--	IOCPage6_t		*pIoc6;
--	u8			*mem;
--	CONFIGPARMS		 cfg;
--	ConfigPageHeader_t	 header;
--	dma_addr_t		 ioc6_dma;
--	int			 iocpage6sz = 0;
--
--	/* Free the old page
--	 */
--	if (ioc->raid_data.pIocPg6) {
--		kfree(ioc->raid_data.pIocPg6);
--		ioc->raid_data.pIocPg6 = NULL;
--	}
--
--	/* There is at least one physical disk.
--	 * Read and save IOC Page 3
--	 */
--	header.PageVersion = 0;
--	header.PageLength = 0;
--	header.PageNumber = 6;
--	header.PageType = MPI_CONFIG_PAGETYPE_IOC;
--	cfg.cfghdr.hdr = &header;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;
--	cfg.timeout = 0;
--	if (mpt_config(ioc, &cfg) != 0)
--		return;
--
--	if (header.PageLength == 0)
--		return;
--
--	/* Read Header good, alloc memory
--	 */
--	iocpage6sz = header.PageLength * 4;
--	pIoc6 = pci_alloc_consistent(ioc->pcidev, iocpage6sz, &ioc6_dma);
--	if (!pIoc6)
--		return;
--
--	/* Read the Page and save the data
--	 * into malloc'd memory.
--	 */
--	cfg.physAddr = ioc6_dma;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--	if (mpt_config(ioc, &cfg) == 0) {
--		mem = kmalloc(iocpage6sz, GFP_ATOMIC);
--		if (mem) {
--			memcpy(mem, (u8 *)pIoc6, iocpage6sz);
--			ioc->raid_data.pIocPg6 = (IOCPage6_t *) mem;
--		}
--	}
--
--	pci_free_consistent(ioc->pcidev, iocpage6sz, pIoc6, ioc6_dma);
--}
--
--static void
- mpt_read_ioc_pg_1(MPT_ADAPTER *ioc)
- {
- 	IOCPage1_t		*pIoc1;
-@@ -6007,12 +5976,13 @@ SendEventNotification(MPT_ADAPTER *ioc, 
- 		    ioc->name,__FUNCTION__));
- 		return 0;
- 	}
--	ioc->evnp = evnp;
--        memset(evnp, 0, sizeof(*evnp));
-+	memset(evnp, 0, sizeof(*evnp));
- 
- 	devtprintk((MYIOC_s_INFO_FMT "Sending EventNotification (%d) request %p\n", ioc->name, EvSwitch, evnp));
- 
- 	evnp->Function = MPI_FUNCTION_EVENT_NOTIFICATION;
-+	evnp->ChainOffset = 0;
-+	evnp->MsgFlags = 0;
- 	evnp->Switch = EvSwitch;
- 
- 	mpt_put_msg_frame(mpt_base_index, ioc, (MPT_FRAME_HDR *)evnp);
-@@ -6037,10 +6007,13 @@ SendEventAck(MPT_ADAPTER *ioc, EventNoti
- 		return -1;
- 	}
- 
--	devtprintk((MYIOC_s_INFO__FMT "Sending EventAck\n", ioc->name));
--        memset(pAck, 0, sizeof(*pAck));
-+	devtprintk((MYIOC_s_WARN_FMT "Sending EventAck\n", ioc->name));
- 
- 	pAck->Function     = MPI_FUNCTION_EVENT_ACK;
-+	pAck->ChainOffset  = 0;
-+	pAck->Reserved[0]  = pAck->Reserved[1] = 0;
-+	pAck->MsgFlags     = 0;
-+	pAck->Reserved1[0] = pAck->Reserved1[1] = pAck->Reserved1[2] = 0;
- 	pAck->Event        = evnp->Event;
- 	pAck->EventContext = evnp->EventContext;
- 	DBG_DUMP_EVENT_REQUEST_FRAME(pAck);
-@@ -6080,7 +6053,7 @@ mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS
- 	 */
- 	in_isr = in_interrupt();
- 	if (in_isr) {
--		dfailprintk((MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n",
-+		dcprintk((MYIOC_s_WARN_FMT "Config request not allowed in ISR context!\n",
- 				ioc->name));
- 		return -EPERM;
- 	}
-@@ -6607,12 +6580,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i
- 	 * mpt_do_ioc_recovery at any instant in time.
- 	 */
- 	spin_lock_irqsave(&ioc->diagLock, flags);
--	   if (ioc->IOCResetInProgress){
-+	if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)){
- 		spin_unlock_irqrestore(&ioc->diagLock, flags);
--	dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler: IOCResetInProgress!\n",
--              ioc->name));
--
--                return 0;
-+		return 0;
-+	} else {
-+		ioc->diagPending = 1;
- 	}
- 	spin_unlock_irqrestore(&ioc->diagLock, flags);
- 
-@@ -6633,6 +6605,11 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i
- 				dtmprintk((MYIOC_s_INFO_FMT "Calling IOC reset_setup handler #%d\n",
- 						ioc->name, ii));
- 				r += (*(MptResetHandlers[ii]))(ioc, MPT_IOC_SETUP_RESET);
-+				if (ioc->alt_ioc) {
-+					dtmprintk((MYIOC_s_INFO_FMT "Calling alt-%s setup reset handler #%d\n",
-+							ioc->name, ioc->alt_ioc->name, ii));
-+					r += (*(MptResetHandlers[ii]))(ioc->alt_ioc, MPT_IOC_SETUP_RESET);
-+				}
- 			}
- 		}
- 	}
-@@ -6642,307 +6619,23 @@ mpt_HardResetHandler(MPT_ADAPTER *ioc, i
- 			rc, ioc->name);
- 	}
- 	ioc->reload_fw = 0;
-+	if (ioc->alt_ioc)
-+		ioc->alt_ioc->reload_fw = 0;
- 
--	if (ioc->alt_ioc) {
--  dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler alt_ioc: checking IOCResetInProgress=%d\n",
--			ioc->alt_ioc->name, ioc->alt_ioc->IOCResetInProgress));
--	spin_lock_irqsave(&ioc->alt_ioc->diagLock, flags);
--
--if (ioc->alt_ioc->IOCResetInProgress) {
-- dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler: alt_ioc IOCResetInProgress!\n", ioc->alt_ioc->name));
--
--spin_unlock_irqrestore(&ioc->alt_ioc->diagLock, flags);
--return 0;
--}
--spin_unlock_irqrestore(&ioc->alt_ioc->diagLock, flags);
--if ((rc = mpt_do_ioc_recovery(ioc->alt_ioc, MPT_HOSTEVENT_IOC_RECOVER,
--sleepFlag)) != 0) {
--printk(KERN_WARNING MYNAM ": WARNING - alt_%s mpt_do_ioc_recovery failed rc=%x\n", ioc->name,   rc );
--     }
--ioc->alt_ioc->reload_fw = 0;
--}
--
-+	spin_lock_irqsave(&ioc->diagLock, flags);
-+	ioc->diagPending = 0;
-+	if (ioc->alt_ioc)
-+		ioc->alt_ioc->diagPending = 0;
-+	spin_unlock_irqrestore(&ioc->diagLock, flags);
- 
- 	dtmprintk((MYIOC_s_INFO_FMT "HardResetHandler rc = %d!\n", ioc->name, rc));
- 
- 	return rc;
- }
- 
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/*	mpt_writeSDP1  - write SCSI Device Page 1
-- *	@ioc: Pointer to a SCSI Host Adapter Structure
-- *	@portnum: IOC port number
-- *	@id: writeSDP1 for single ID
-- *	@flags: MPT_SCSICFG_ALL_IDS, MPT_SCSICFG_USE_NVRAM, MPT_SCSICFG_BLK_NEGO
-- *
-- *	Return: -EFAULT if read of config page header fails
-- *		or 0 if success.
-- *
-- *	Remark: If a target has been found, the settings from the
-- *		target structure are used, else the device is set
-- *		to async/narrow.
-- *
-- *	Remark: Called during init and after a FW reload.
-- *	Remark: We do not wait for a return, write pages sequentially.
-- */
--int
--mpt_writeSDP1(MPT_ADAPTER *ioc, int portnum, int id, int flags)
--{
--	Config_t		*pReq;
--	SCSIDevicePage1_t	*pData;
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice		*pTarget;
--	MPT_FRAME_HDR		*mf;
--	dma_addr_t		 dataDma;
--	u16			 req_idx;
--	u32			 frameOffset;
--	u32			 requested, configuration, flagsLength;
--	int			 ii, nvram;
--	int			 loop_id, loop_end;
--	u8			 width;
--	u8			 factor;
--	u8			 offset;
--	u8			 bus = 0;
--	u8			 negoFlags;
--	u8			 maxwidth, maxoffset, maxfactor;
--
--	if ((pMptTarget = ioc->Target_List[0]) == NULL)
--		return 0;
--
--	if (ioc->spi_data.sdp1length == 0)
--		return 0;
--
--	if (flags & MPT_SCSICFG_ALL_IDS) {
--		loop_id = 0;
--		loop_end = ioc->DevicesPerBus;
--	} else {
--		loop_id = id;
--		loop_end = id+1;
--	}
--
--	for (; loop_id < loop_end; loop_id++) {
--
--		if (loop_id == ioc->pfacts[portnum].PortSCSIID)
--			continue;
--
--
--		pTarget = pMptTarget->Target[loop_id];
--
--		/* Use NVRAM to get adapter and target maximums
--		 * Data over-riden by target structure information, if present
--		 */
--		maxwidth = ioc->spi_data.maxBusWidth;
--		maxoffset = ioc->spi_data.maxSyncOffset;
--		maxfactor = ioc->spi_data.minSyncFactor;
--		if (ioc->spi_data.nvram && (ioc->spi_data.nvram[loop_id] != MPT_HOST_NVRAM_INVALID)) {
--			nvram = ioc->spi_data.nvram[loop_id];
--
--			if (maxwidth)
--				maxwidth = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1;
--
--			if (maxoffset > 0) {
--				maxfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8;
--				if (maxfactor == 0) {
--					/* Key for async */
--					maxfactor = MPT_ASYNC;
--					maxoffset = 0;
--				} else if (maxfactor < ioc->spi_data.minSyncFactor) {
--					maxfactor = ioc->spi_data.minSyncFactor;
--				}
--			} else
--				maxfactor = MPT_ASYNC;
--		}
--
--		/* Set the negotiation flags.
--		 */
--		negoFlags = ioc->spi_data.noQas;
--		if (!maxwidth)
--			negoFlags |= MPT_TARGET_NO_NEGO_WIDE;
--
--		if (!maxoffset)
--			negoFlags |= MPT_TARGET_NO_NEGO_SYNC;
--
--		if (flags & MPT_SCSICFG_USE_NVRAM) {
--			width = maxwidth;
--			factor = maxfactor;
--			offset = maxoffset;
--			dnegoprintk(("%s: writeSDP1: USE_NVRAM id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				ioc->name, loop_id, width, factor, offset, negoFlags));
--		} else {
--			width = 0;
--			factor = MPT_ASYNC;
--			offset = 0;
--			//negoFlags = 0;
--			//negoFlags = MPT_TARGET_NO_NEGO_SYNC;
--			dnegoprintk(("%s: writeSDP1: !USE_NVRAM: Going Async/Narrow id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				ioc->name, loop_id, width, factor, offset, negoFlags));
--		}
--
--		/* If id is not a raid volume, get the updated
--		 * transmission settings from the target structure.
--		 */
--		if ( pTarget && !pTarget->raidVolume) {
--			width = pTarget->maxWidth;
--			factor = pTarget->minSyncFactor;
--			offset = pTarget->maxOffset;
--			negoFlags |= pTarget->negoFlags;
--			dnegoprintk(("%s: writeSDP1: NOT RAID id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				ioc->name, loop_id, width, factor, offset, negoFlags));
--		}
--
--#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
--		/* Force to async and narrow if DV has not been executed
--		 * for this ID
--		 */
--		if ((ioc->spi_data.dvStatus[loop_id] & MPT_SCSICFG_DV_NOT_DONE) != 0) {
--			width = 0;
--			factor = MPT_ASYNC;
--			offset = 0;
--			dnegoprintk(("%s: writeSDP1: DV_NOT_DONE: Going Async/Narrow id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				ioc->name, loop_id, width, factor, offset, negoFlags));
--		}
--#endif
--
--		if (flags & MPT_SCSICFG_BLK_NEGO) {
--			negoFlags |= MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC;
--			dnegoprintk(("%s: writeSDP1: BLK_NEGO id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				ioc->name, loop_id, width, factor, offset, negoFlags));
--		}
--
--		mpt_setSDP1parameters(width, factor, offset, negoFlags,
--				&requested, &configuration);
--
--		/* Get a MF for this command.
--		 */
--		if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
--			dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
--			    ioc->name,__FUNCTION__));
--			return -EAGAIN;
--		}
--
--		/* Set the request and the data pointers.
--		 * Request takes: 36 bytes (32 bit SGE)
--		 * SCSI Device Page 1 requires 16 bytes
--		 * 40 + 16 <= size of SCSI IO Request = 56 bytes
--		 * and MF size >= 64 bytes.
--		 * Place data at end of MF.
--		 */
--		pReq = (Config_t *)mf;
--
--		req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--		frameOffset = ioc->req_sz - sizeof(SCSIDevicePage1_t);
--
--		pData = (SCSIDevicePage1_t *)((u8 *) mf + frameOffset);
--		dataDma = ioc->req_frames_dma + (req_idx * ioc->req_sz) + frameOffset;
--
--		/* Complete the request frame (same for all requests).
--		 */
--		pReq->Action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
--		pReq->Reserved = 0;
--		pReq->ChainOffset = 0;
--		pReq->Function = MPI_FUNCTION_CONFIG;
--		pReq->ExtPageLength = 0;
--		pReq->ExtPageType = 0;
--		pReq->MsgFlags = 0;
--		for (ii=0; ii < 8; ii++) {
--			pReq->Reserved2[ii] = 0;
--		}
--		pReq->Header.PageVersion = ioc->spi_data.sdp1version;
--		pReq->Header.PageLength = ioc->spi_data.sdp1length;
--		pReq->Header.PageNumber = 1;
--		pReq->Header.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE;
--		pReq->PageAddress = cpu_to_le32(loop_id | (bus << 8 ));
--
--		/* Add a SGE to the config request.
--		 */
--		flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | ioc->spi_data.sdp1length * 4;
--
--		mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
--
--		/* Set up the common data portion
--		 */
--		pData->Header.PageVersion = pReq->Header.PageVersion;
--		pData->Header.PageLength = pReq->Header.PageLength;
--		pData->Header.PageNumber = pReq->Header.PageNumber;
--		pData->Header.PageType = pReq->Header.PageType;
--		pData->RequestedParameters = cpu_to_le32(requested);
--		pData->Reserved = 0;
--		pData->Configuration = cpu_to_le32(configuration);
--
--		if ( pTarget ) {
--			if ( requested & MPI_SCSIDEVPAGE1_RP_IU ) {
--				pTarget->last_lun = MPT_LAST_LUN;
--			} else {
--				pTarget->last_lun = MPT_NON_IU_LAST_LUN;
--			}
--			dsprintk((MYIOC_s_INFO_FMT
--				"writeSDP1: last_lun=%d on id=%d\n",
--				ioc->name, pTarget->last_lun, loop_id));
--		}
--
--		dnegoprintk((MYIOC_s_INFO_FMT
--			"write SDP1: id=%d pgaddr=0x%x requested=%08x configuration=%08x\n",
--				ioc->name, loop_id, (loop_id | (bus<<8)),
--				requested, configuration));
--
--		mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
--	}
--	return 0;
--}
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/*	mpt_setSDP1parameters  - set SDP1 Requested and Configuration
-- *	fields based on width, factor, offset and flags parameters.
-- *	@width: bus width
-- *	@factor: sync factor
-- *	@offset: sync offset
-- *	@flags: flags to block WDTR or SDTR negotiation
-- *	@requestedPtr: pointer to SDP1 Requested value (updated)
-- *	@configurationPtr: pointer to SDP1 Configuration value (updated)
-- *
-- *	Return: None.
-- *
-- *	Remark: Called by writeSDP1 and _dv_params
-- */
--void
--mpt_setSDP1parameters (u8 width, u8 factor, u8 offset, u8 flags, int *requestedPtr, int *configurationPtr)
--{
--	u8 nowide = flags & MPT_TARGET_NO_NEGO_WIDE;
--	u8 nosync = flags & MPT_TARGET_NO_NEGO_SYNC;
--
--	*configurationPtr = 0;
--	*requestedPtr = width ? MPI_SCSIDEVPAGE1_RP_WIDE : 0;
--	*requestedPtr |= (offset << 16) | (factor << 8);
--
--	if (width && offset && !nowide && !nosync) {
--		if (factor < MPT_ULTRA160) {
--			*requestedPtr |= (MPI_SCSIDEVPAGE1_RP_IU + MPI_SCSIDEVPAGE1_RP_DT);
--			if ((flags & MPT_TARGET_NO_NEGO_QAS) == 0)
--				*requestedPtr |= MPI_SCSIDEVPAGE1_RP_QAS;
--			if (flags & MPT_TAPE_NEGO_IDP)
--				*requestedPtr |= 0x08000000;
--		} else if (factor < MPT_ULTRA2) {
--			*requestedPtr |= MPI_SCSIDEVPAGE1_RP_DT;
--		}
--	}
--
--	if (nowide)
--		*configurationPtr |= MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED;
--
--	if (nosync)
--		*configurationPtr |= MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED;
--
--	return;
--}
--
- # define EVENT_DESCR_STR_SZ		100
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--
--
--
--
--
- static void
- EventDescriptionStr(u8 event, u32 evData0, char *evStr)
- {
-@@ -6969,6 +6662,9 @@ EventDescriptionStr(u8 event, u32 evData
- 		break;
- 	case MPI_EVENT_RESCAN:
- 		ds = "Bus Rescan Event";
-+		/* Ok, do we need to do anything here? As far as
-+		   I can tell, this is when a new device gets added
-+		   to the loop. */
- 		break;
- 	case MPI_EVENT_LINK_STATUS_CHANGE:
- 		if (evData0 == MPI_EVENT_LINK_STATUS_FAILURE)
-@@ -6980,9 +6676,9 @@ EventDescriptionStr(u8 event, u32 evData
- 		if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LIP)
- 			ds = "Loop State(LIP) Change";
- 		else if (evData0 == MPI_EVENT_LOOP_STATE_CHANGE_LPE)
--			ds = "Loop State(LPE) Change";		/* ??? */
-+			ds = "Loop State(LPE) Change";			/* ??? */
- 		else
--			ds = "Loop State(LPB) Change";		/* ??? */
-+			ds = "Loop State(LPB) Change";			/* ??? */
- 		break;
- 	case MPI_EVENT_LOGOUT:
- 		ds = "Logout";
-@@ -6995,6 +6691,9 @@ EventDescriptionStr(u8 event, u32 evData
- 		break;
- 	case MPI_EVENT_INTEGRATED_RAID:
- 	{
-+#if defined(CPQ_CIM)
-+        ioc->csmi_change_count++;
-+#endif
- 		u8 ReasonCode = (u8)(evData0 >> 16);
- 		switch (ReasonCode) {
- 		case MPI_EVENT_RAID_RC_VOLUME_CREATED :
-@@ -7044,65 +6743,36 @@ EventDescriptionStr(u8 event, u32 evData
- 		break;
- 	case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
- 	{
--		u8 id = (u8)(evData0);
--		u8 channel = (u8)(evData0 >> 8);
-+        u8 id = (u8)(evData0);
- 		u8 ReasonCode = (u8)(evData0 >> 16);
- 		switch (ReasonCode) {
- 		case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
- 			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Added: "
--			    "id=%d channel=%d", id, channel);
-+			    "SAS Device Status Change: Added: id=%d", id);
- 			break;
- 		case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
- 			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Deleted: "
--			    "id=%d channel=%d", id, channel);
-+			    "SAS Device Status Change: Deleted: id=%d", id);
- 			break;
- 		case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
- 			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: SMART Data: "
--			    "id=%d channel=%d", id, channel);
-+			    "SAS Device Status Change: SMART Data: id=%d",
-+			    id);
- 			break;
- 		case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
- 			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: No Persistancy: "
--			    "id=%d channel=%d", id, channel);
--			break;
--		case MPI_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED:
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Unsupported Device "
--			    "Discovered : id=%d channel=%d", id, channel);
--			break;
--		case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Internal Device "
--			    "Reset : id=%d channel=%d", id, channel);
--			break;
--		case MPI_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL:
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Internal Task "
--			    "Abort : id=%d channel=%d", id, channel);
--			break;
--		case MPI_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL:
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Internal Abort "
--			    "Task Set : id=%d channel=%d", id, channel);
--			break;
--		case MPI_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL:
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Internal Clear "
--			    "Task Set : id=%d channel=%d", id, channel);
--			break;
--		case MPI_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL:
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Internal Query "
--			    "Task : id=%d channel=%d", id, channel);
-+			    "SAS Device Status Change: No Persistancy "
-+			    "Added: id=%d", id);
- 			break;
-+        case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
-+            snprintf(evStr, EVENT_DESCR_STR_SZ,
-+                "SAS Device Status Change: Internal Device Reset: "
-+                "id=%d", id);
-+            break;
- 		default:
- 			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS Device Status Change: Unknown: "
--			    "id=%d channel=%d", id, channel);
--			break;
-+			    "SAS Device Status Change: Unknown: id=%d", id);
-+			break;		
- 		}
- 		break;
- 	}
-@@ -7205,86 +6875,15 @@ EventDescriptionStr(u8 event, u32 evData
- 	}
- 	case MPI_EVENT_SAS_DISCOVERY:
- 	{
--		if (evData0)
--			ds = "SAS Discovery: Start";
--		else
--			ds = "SAS Discovery: Stop";
-+		char buf[40];
-+		sprintf(buf,"SAS Discovery: Condition=0x%x:",evData0);
-+		ds = buf;
- 		break;
- 	}
- 	case MPI_EVENT_LOG_ENTRY_ADDED:
- 		ds = "SAS Log Entry Added";
- 		break;
- 
--	case MPI_EVENT_SAS_BROADCAST_PRIMITIVE:
--	{
--		u8 phy_num = (u8)(evData0);
--		u8 port_num = (u8)(evData0 >> 8);
--		u8 port_width = (u8)(evData0 >> 16);
--		u8 primative = (u8)(evData0 >> 24);
--		snprintf(evStr, EVENT_DESCR_STR_SZ,
--		    "SAS Broadcase Primative: phy=%d port=%d "
--		    "width=%d primative=0x%02x",
--		    phy_num, port_num, port_width, primative);
--		break;
--	}
--
--	case MPI_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE:
--	{
--		u8 reason = (u8)(evData0);
--		u8 port_num = (u8)(evData0 >> 8);
--		u16 handle = le16_to_cpu(evData0 >> 16);
--
--		snprintf(evStr, EVENT_DESCR_STR_SZ,
--		    "SAS Initiator Device Status Change: reason=0x%02x "
--		    "port=%d handle=0x%04x",
--		    reason, port_num, handle);
--		break;
--	}
--
--	case MPI_EVENT_SAS_INIT_TABLE_OVERFLOW:
--	{
--		u8 max_init = (u8)(evData0);
--		u8 current_init = (u8)(evData0 >> 8);
--
--		snprintf(evStr, EVENT_DESCR_STR_SZ,
--		    "SAS Initiator Device Table Overflow: max initiators=%02d "
--		    "current initators=%02d",
--		    max_init, current_init);
--		break;
--	}
--	case MPI_EVENT_SAS_SMP_ERROR:
--	{
--		u8 status = (u8)(evData0);
--		u8 port_num = (u8)(evData0 >> 8);
--		u8 result = (u8)(evData0 >> 16);
--
--		if (status == MPI_EVENT_SAS_SMP_FUNCTION_RESULT_VALID)
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS SMP Error: port=%d result=0x%02x",
--			    port_num, result);
--		else if (status == MPI_EVENT_SAS_SMP_CRC_ERROR)
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS SMP Error: port=%d : CRC Error",
--			    port_num);
--		else if (status == MPI_EVENT_SAS_SMP_TIMEOUT)
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS SMP Error: port=%d : Timeout",
--			    port_num);
--		else if (status == MPI_EVENT_SAS_SMP_NO_DESTINATION)
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS SMP Error: port=%d : No Destination",
--			    port_num);
--		else if (status == MPI_EVENT_SAS_SMP_BAD_DESTINATION)
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS SMP Error: port=%d : Bad Destination",
--			    port_num);
--		else
--			snprintf(evStr, EVENT_DESCR_STR_SZ,
--			    "SAS SMP Error: port=%d : status=0x%02x",
--			    port_num, status);
--		break;
--	}
--
- 	/*
- 	 *  MPT base "custom" events may be added here...
- 	 */
-@@ -7329,20 +6928,24 @@ ProcessEventNotification(MPT_ADAPTER *io
- 	}
- 
- 	EventDescriptionStr(event, evData0, evStr);
--	devtprintk((MYIOC_s_WARN_FMT "MPT event:(%02Xh) : %s\n",
--	    ioc->name, event, evStr));
-+	devtprintk((MYIOC_s_WARN_FMT "MPT Event=%02Xh (%s) detected!\n",
-+			ioc->name, event, evStr));
-+
- #if defined(MPT_DEBUG) || defined(MPT_DEBUG_EVENTS)
--       printk(KERN_WARN MYNAM ": Event data:\n" KERN_INFO);
--       for (ii = 0; ii < evDataLen; ii++)
--               printk(" %08x", le32_to_cpu(pEventReply->Data[ii]));
--       printk("\n");
-+	printk(KERN_INFO MYNAM ": Event data:\n" KERN_INFO);
-+	for (ii = 0; ii < evDataLen; ii++)
-+		printk(" %08x", le32_to_cpu(pEventReply->Data[ii]));
-+	printk("\n");
- #endif
- 
--
--       /*
-+	/*
- 	 *  Do general / base driver event processing
- 	 */
- 	switch(event) {
-+	case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE: /* 0F */
-+		mptbase_sas_process_event_data(ioc,
-+		    (MpiEventDataSasDeviceStatusChange_t *)pEventReply->Data);
-+		break;
- 	case MPI_EVENT_EVENT_CHANGE:		/* 0A */
- 		if (evDataLen) {
- 			u8 evState = evData0 & 0xFF;
-@@ -7359,11 +6962,6 @@ ProcessEventNotification(MPT_ADAPTER *io
- 		mptbase_raid_process_event_data(ioc,
- 		    (MpiEventDataRaid_t *)pEventReply->Data);
- 		break;
--case MPI_EVENT_RESCAN:
--case MPI_EVENT_LINK_STATUS_CHANGE:
--ioc->FcLinkSpeedCheckNeeded = 1;
--break;
--
- 	default:
- 		break;
- 	}
-@@ -7396,10 +6994,9 @@ break;
- 	 */
- 	for (ii=MPT_MAX_PROTOCOL_DRIVERS-1; ii; ii--) {
- 		if (MptEvHandlers[ii]) {
--		devtprintk((MYIOC_s_WARN_FMT "Routing Event to event handler #%d\n",
--                                 ioc->name, ii));
--
--                       r += (*(MptEvHandlers[ii]))(ioc, pEventReply);
-+			devtprintk((MYIOC_s_INFO_FMT "Routing Event to event handler #%d\n",
-+					ioc->name, ii));
-+			r += (*(MptEvHandlers[ii]))(ioc, pEventReply);
- 			handlers++;
- 		}
- 	}
-@@ -7412,7 +7009,7 @@ break;
- 		devtprintk((MYIOC_s_WARN_FMT
- 			"EventAck required\n",ioc->name));
- 		if ((ii = SendEventAck(ioc, pEventReply)) != 0) {
--			devtprintk((MYIOC_s_INFO_FMT "SendEventAck returned %d\n",
-+			devtprintk((MYIOC_s_WARN_FMT "SendEventAck returned %d\n",
- 					ioc->name, ii));
- 		}
- 	}
-@@ -7599,14 +7196,20 @@ union loginfo_type {
- 	}
- 
- 	if (code_desc != NULL)
--		printk("Originator={%s}, Code={%s},"
-+		printk(MYIOC_s_INFO_FMT
-+			"LogInfo(0x%08x): Originator={%s}, Code={%s},"
- 			" SubCode(0x%04x)\n",
-+			ioc->name,
-+			log_info,
- 			originator_str[sas_loginfo.dw.originator],
- 			code_desc,
- 			sas_loginfo.dw.subcode);
- 	else
--		printk("Originator={%s}, Code=(0x%02x),"
-+		printk(MYIOC_s_INFO_FMT
-+			"LogInfo(0x%08x): Originator={%s}, Code=(0x%02x),"
- 			" SubCode(0x%04x)\n",
-+			ioc->name,
-+			log_info,
- 			originator_str[sas_loginfo.dw.originator],
- 			sas_loginfo.dw.code,
- 			sas_loginfo.dw.subcode);
-@@ -7625,12 +7228,7 @@ static void
- mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 ioc_status, MPT_FRAME_HDR *mf)
- {
- 	u32 status = ioc_status & MPI_IOCSTATUS_MASK;
--	char *desc = NULL;
--
--	SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) mf;
--	U8 cdb = pScsiReq->CDB[0];
--	U8 id = pScsiReq->TargetID;
--	U8 lun = pScsiReq->LUN[1];
-+	char *desc = "";
- 
- 	switch (status) {
- 	case MPI_IOCSTATUS_INVALID_FUNCTION: /* 0x0001 */
-@@ -7639,8 +7237,6 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 io
- 
- 	case MPI_IOCSTATUS_BUSY: /* 0x0002 */
- 		desc = "Busy";
--                ddvprintk (("%s IOCSTATUS_BUSY", ioc->name));
--                DBG_DUMP_RESET_REQUEST_FRAME(ioc, mf)
- 		break;
- 
- 	case MPI_IOCSTATUS_INVALID_SGL: /* 0x0003 */
-@@ -7692,11 +7288,11 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 io
- 
- 	case MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE: /* 0x0043 */
- 	  {
--#ifdef MPT_DEBUG_REPLY
-+		SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) mf;
-+		U8 cdb = pScsiReq->CDB[0];
- 		if (cdb != 0x12) { /* Inquiry is issued for device scanning */
- 			desc = "SCSI Device Not There";
- 		}
--#endif
- 		break;
- 	  }
- 
-@@ -7742,16 +7338,8 @@ mpt_sp_ioc_info(MPT_ADAPTER *ioc, u32 io
- 		desc = "Others";
- 		break;
- 	}
--	if (desc != NULL) {
--		U8 function = pScsiReq->Function;
--		if (function == MPI_FUNCTION_SCSI_IO_REQUEST ||
--		    function == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH) {
--			printk(MYIOC_s_WARN_FMT "IOCStatus(0x%04x): %s on CDB=%x id=%d lun=%d\n", ioc->name, status, desc, cdb, id, lun);
--		} else {
--			printk(MYIOC_s_WARN_FMT "IOCStatus(0x%04x): %s on Function=%02x\n", ioc->name, status, desc, function);
--		}
--		 DBG_DUMP_REPLYS_REQUEST_FRAME(ioc, mf)
--	}
-+	if (desc != "")
-+		printk(MYIOC_s_INFO_FMT "IOCStatus(0x%04x): %s\n", ioc->name, status, desc);
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -7770,6 +7358,7 @@ mpt_poll_interrupt(MPT_ADAPTER *ioc)
- 	if (intstat & MPI_HIS_REPLY_MESSAGE_INTERRUPT)
- 		mpt_interrupt(0, ioc, NULL);
- }
-+
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- EXPORT_SYMBOL(mpt_attach);
- EXPORT_SYMBOL(mpt_detach);
-@@ -7779,6 +7368,7 @@ EXPORT_SYMBOL(mpt_suspend);
- #endif
- EXPORT_SYMBOL(ioc_list);
- EXPORT_SYMBOL(mpt_can_queue);
-+EXPORT_SYMBOL(mpt_sg_tablesize);
- EXPORT_SYMBOL(mpt_proc_root_dir);
- EXPORT_SYMBOL(mpt_register);
- EXPORT_SYMBOL(mpt_deregister);
-@@ -7800,21 +7390,16 @@ EXPORT_SYMBOL(mpt_print_ioc_summary);
- EXPORT_SYMBOL(mpt_lan_index);
- EXPORT_SYMBOL(mpt_stm_index);
- EXPORT_SYMBOL(mpt_HardResetHandler);
--EXPORT_SYMBOL(mpt_SendIocReset);
--EXPORT_SYMBOL(mpt_do_ioc_recovery);
--EXPORT_SYMBOL(mpt_writeSDP1);
--EXPORT_SYMBOL(mpt_setSDP1parameters);
- EXPORT_SYMBOL(mpt_config);
- EXPORT_SYMBOL(mpt_findImVolumes);
- EXPORT_SYMBOL(mpt_read_ioc_pg_3);
- EXPORT_SYMBOL(mpt_alloc_fw_memory);
- EXPORT_SYMBOL(mpt_free_fw_memory);
- EXPORT_SYMBOL(mptbase_sas_persist_operation);
-+EXPORT_SYMBOL(mpt_sas_get_info);
- EXPORT_SYMBOL_GPL(mpt_poll_interrupt);
- EXPORT_SYMBOL(mpt_alt_ioc_wait);
--EXPORT_SYMBOL(mpt_raid_phys_disk_pg0);
--EXPORT_SYMBOL(mpt_enable_deadioc_detect);
--EXPORT_SYMBOL(mpt_handshake_req_reply_wait);
-+
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.h linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptbase.h	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptbase.h	2007-11-02 09:10:23.000000000 +0100
-@@ -5,8 +5,8 @@
-  *          LSIFC9xx/LSI409xx Fibre Channel
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (    mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  *  $Id: mptbase.h,v 1.149 2003/05/07 14:08:31 Exp $
-  */
-@@ -78,14 +78,14 @@
- #endif
- 
- #ifndef COPYRIGHT
--#define COPYRIGHT	"Copyright (c) 1999-2007 " MODULEAUTHOR
-+#define COPYRIGHT	"Copyright (c) 1999-2006 " MODULEAUTHOR
- #endif
- 
--#define MPT_LINUX_VERSION_COMMON	"3.02.99.00rh"
--#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.02.99.00rh"
-+#define MPT_LINUX_VERSION_COMMON	"3.02.73rh"
-+#define MPT_LINUX_PACKAGE_NAME		"@(#)mptlinux-3.02.73rh"
- #define MPT_LINUX_MAJOR_VERSION		3
- #define MPT_LINUX_MINOR_VERSION		02
--#define MPT_LINUX_BUILD_VERSION		99
-+#define MPT_LINUX_BUILD_VERSION		73
- #define MPT_LINUX_RELEASE_VERSION	00
- #define WHAT_MAGIC_STRING		"@" "(" "#" ")"
- 
-@@ -96,8 +96,10 @@
- /*
-  *  Fusion MPT(linux) driver configurable stuff...
-  */
-+#define MPT_MAX_ADAPTERS		18
- #define MPT_MAX_PROTOCOL_DRIVERS	16
--#define MPT_MAX_BUSES			8
-+#define MPT_MAX_BUS			1	/* Do not change */
-+#define MPT_MAX_FC_DEVICES		255
- #define MPT_MAX_SCSI_DEVICES		16
- #define MPT_LAST_LUN			255
- #define MPT_NON_IU_LAST_LUN		63
-@@ -137,9 +139,6 @@
- #define	 CAN_SLEEP			1
- #define  NO_SLEEP			0
- 
--#define MPT_HZ                         1000
--#define MPT_JIFFY                      100
--
- #define MPT_COALESCING_TIMEOUT		0x10
- 
- /*
-@@ -170,9 +169,7 @@
- /*
-  * Default MAX_SGE value.  Can be changed by using mptbase sg_count parameter.
-  */
--#ifndef CONFIG_FUSION_MAX_SGE
--#define CONFIG_FUSION_MAX_SGE  128
--#endif
-+#define MPT_SCSI_SG_DEPTH	128
- 
- #ifdef __KERNEL__	/* { */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -218,6 +215,8 @@ typedef union _MPT_FRAME_TRACKER {
- 	struct {
- 		struct list_head        list;
- 		u32			 arg1;
-+		u32			 pad;
-+		void			*argp1;
- 	} linkage;
- 	/*
- 	 * NOTE: When request frames are free, on the linkage structure
-@@ -277,12 +276,6 @@ typedef struct _MPT_FRAME_HDR {
- 	} u;
- } MPT_FRAME_HDR;
- 
--typedef struct _MPT_LINKAGE {
--		struct list_head        list;
--		MPT_FRAME_HDR		*mf;
--} MPT_LINKAGE;
--
--
- #define MPT_REQ_MSGFLAGS_DROPME		0x80
- 
- typedef struct _MPT_SGL_HDR {
-@@ -336,31 +329,15 @@ typedef struct _SYSIF_REGS
- #define MPT_TARGET_NO_NEGO_QAS		0x04
- #define MPT_TAPE_NEGO_IDP     		0x08
- 
--#if defined(CPQ_CIM)
--struct sas_mapping{
--	u8			id;
--	u8			channel;
--};
--
--struct sas_device_info {
--	struct list_head 	list;
--	struct sas_mapping	os;	/* operating system mapping*/
--	struct sas_mapping	fw;	/* firmware mapping */
--	u64			sas_address;
--	u32			device_info; /* specific bits for devices */
--	u8			is_logical_volume; /* is this logical volume */
--	u8			is_cached;	/* cached data for a removed device */
--};
--#endif
--
- /*
-  *	VirtDevice - FC LUN device or SCSI target device
-  */
- typedef struct _VirtDevice {
--        struct _MPT_ADAPTER	*ioc;
-+	struct scsi_device	*device;
- 	u16			 tflags;
--	u8			 id;
--	u8			 bus;
-+	u8			 ioc_id;
-+	u8			 target_id;
-+	u8			 bus_id;
- 	u8			 minSyncFactor;	/* 0xFF is async */
- 	u8			 maxOffset;	/* 0 if async */
- 	u8			 maxWidth;	/* 0 if narrow, 1 if wide */
-@@ -385,13 +362,9 @@ typedef struct _VirtDevice {
- 	u8			 pad2[4];
- 	U64			 WWPN;
- 	U64			 WWNN;
--       struct work_struct        dvTask;
--       u8			 configured_lun;
-+	u8			 configured_lun;
- } VirtDevice;
- 
--typedef struct _MPT_DEVICE {
--	VirtDevice	*Target[0];
--} MPT_DEVICE;
- /*
-  *  Fibre Channel (SCSI) target device and associated defines...
-  */
-@@ -440,6 +413,7 @@ do { \
- #define MPT_IOCTL_STATUS_SENSE_VALID	0x08	/* Sense data is valid */
- #define MPT_IOCTL_STATUS_COMMAND_GOOD	0x10	/* Command Status GOOD */
- #define MPT_IOCTL_STATUS_TMTIMER_ACTIVE	0x20	/* The TM timer is running */
-+#define MPT_IOCTL_STATUS_TM_FAILED	0x40	/* User TM request failed */
- 
- #define MPTCTL_RESET_OK			0x01	/* Issue Bus Reset */
- 
-@@ -448,10 +422,10 @@ typedef struct _MPT_IOCTL {
- 	u8			 ReplyFrame[MPT_DEFAULT_FRAME_SIZE];	/* reply frame data */
- 	u8			 sense[MPT_SENSE_BUFFER_ALLOC];
- 	int			 wait_done;	/* wake-up value for this ioc */
-+	u8			 rsvd;
- 	u8			 status;	/* current command status */
- 	u8			 reset;		/* 1 if bus reset allowed */
--	u8			 bus;		/* bus */
--	u8			 id;		/* id for reset */
-+	u8			 target;	/* target for reset */
- 	struct semaphore	 sem_ioc;
- } MPT_IOCTL;
- 
-@@ -462,7 +436,7 @@ typedef struct _MPT_IOCTL {
- typedef struct _mpt_ioctl_events {
- 	u32	event;		/* Specified by define above */
- 	u32	eventContext;	/* Index or counter */
--	u32	data[2];	/* First 8 bytes of Event Data */
-+	int	data[2];	/* First 8 bytes of Event Data */
- } MPT_IOCTL_EVENTS;
- 
- /*
-@@ -477,14 +451,14 @@ typedef struct _mpt_ioctl_events {
- 						/* dvStatus defines: */
- #define MPT_SCSICFG_NEGOTIATE		0x01	/* Negotiate on next IO */
- #define MPT_SCSICFG_NEED_DV		0x02	/* Schedule DV */
--#define MPT_SCSICFG_DV_IN_PROGRESS	0x04	/* DV on this physical id*/
-+#define MPT_SCSICFG_DV_PENDING		0x04	/* DV on this physical id pending */
- #define MPT_SCSICFG_DV_NOT_DONE		0x08	/* DV has not been performed */
--#define MPT_SCSICFG_PHYSDISK_DV_ONLY	0x10	/* DV only on this PhysDisk*/
--#define MPT_SCSICFG_BLK_NEGO		0x20	/* WriteSDP1 with WDTR and SDTR disabled*/
--#define MPT_SCSICFG_RELOAD_IOC_PG3	0x40	/* IOC Pg 3 data is obsolete */
-+#define MPT_SCSICFG_BLK_NEGO		0x10	/* WriteSDP1 with WDTR and SDTR disabled */
-+#define MPT_SCSICFG_RELOAD_IOC_PG3	0x20	/* IOC Pg 3 data is obsolete */
- 						/* Args passed to writeSDP1: */
- #define MPT_SCSICFG_USE_NVRAM		0x01	/* WriteSDP1 using NVRAM */
- #define MPT_SCSICFG_ALL_IDS		0x02	/* WriteSDP1 to all IDS */
-+/* #define MPT_SCSICFG_BLK_NEGO		0x10	   WriteSDP1 with WDTR and SDTR disabled */
- 
- typedef	struct _SpiCfgData {
- 	u32		 PortFlags;
-@@ -520,36 +494,48 @@ typedef	struct _SasCfgData {
- 						 * automatic clearing.
- 						 */
- 	u8		mpt_sas_hot_plug_enable;  /* disables hot swap device remove support */
--    ManufacturingPage7_t    *pManufPg7; /* Connector Info on SAS controllers */
- }SasCfgData;
- 
--/*
-- * Inactive volume link list of raid component data
-- * @inactive_list
-- */
--struct inactive_raid_component_info {
--	struct 	 list_head list;
--	u8		 volumeID;		/* volume target id */
--	u8		 volumeBus;		/* volume channel */
--	IOC_3_PHYS_DISK	 d;			/* phys disk info */
--};
--
- typedef	struct _RaidCfgData {
- 	IOCPage2_t	*pIocPg2;		/* table of Raid Volumes */
- 	IOCPage3_t	*pIocPg3;		/* table of physical disks */
--	IOCPage6_t	*pIocPg6;       /* table of IR static data */
--	int		 isRaid;		    /* bit field, 1 if RAID */
--	struct semaphore	inactive_list_mutex;
--	struct list_head	inactive_list; /* link list for physical
--						disk that belong in
--						inactive volumes */
-+	int		 isRaid;		/* bit field, 1 if RAID */
- } RaidCfgData;
- 
- /*
-- *  Adapter Structure - pci_dev specific.
-+ * sas device info link list
-  */
-+typedef struct _sas_device_info {
-+	struct list_head list;
-+	u64	SASAddress;
-+	u8	TargetId;
-+	u8	Bus;
-+	u8	PhysicalPort;
-+	u8	PhyNum;
-+	u32	DeviceInfo;
-+	u16	DevHandle;
-+	u16	Flags;
-+} sas_device_info_t;
-+
-+/*
-+ * hba phy info array
-+ */
-+typedef struct _sas_phy_info {
-+	u64     SASAddress;
-+	u8	port;
-+	u8	PortFlags;
-+	u8	PhyFlags;
-+	u8	NegotiatedLinkRate;
-+	u16	ControllerDevHandle;
-+	u16	devHandle;
-+	u32	ControllerPhyDeviceInfo;
-+	u8	phyId;
-+	u8	hwLinkRate;
-+	u8	reserved;
-+} sas_phy_info_t;
-+
- /*
-- *  Adapter Structure - pci_dev specific.
-+ *  Adapter Structure - pci_dev specific. Maximum: MPT_MAX_ADAPTERS
-  */
- typedef struct _MPT_ADAPTER
- {
-@@ -561,18 +547,13 @@ typedef struct _MPT_ADAPTER
- 	SYSIF_REGS __iomem	*pio_chip;	/* Programmed IO (downloadboot) */
- 	u8			 bus_type;	/* Parallel SCSI i/f */
- 	u8			 pci_slot_number; /* ioc page 1 - pci slot number */
--	u8			 ir_firmware; /* =1 if IR firmware detected */
- 	u16			 deviceID;
- 	u32			 mem_phys;	/* == f4020000 (mmap) */
- 	u32			 pio_mem_phys;	/* Programmed IO (downloadboot) */
- 	int			 mem_size;	/* mmap memory size */
--	int			 sg_tablesize;  /* max SGE's per IO */
--	int			 NumberOfBuses;
--	int			 DevicesPerBus;
- 	int			 alloc_total;
- 	u32			 last_state;
- 	int			 active;
--	struct _MPT_DEVICE 	*Target_List[MPT_MAX_BUSES];
- 	u8			*alloc;		/* frames alloc ptr */
- 	dma_addr_t		 alloc_dma;
- 	u32			 alloc_sz;
-@@ -600,12 +581,7 @@ typedef struct _MPT_ADAPTER
- 	int			 req_depth;	/* Number of request frames */
- 	int			 req_sz;	/* Request frame size (bytes) */
- 	spinlock_t		 FreeQlock;
--	spinlock_t		 PendingMFlock;
- 	struct list_head	 FreeQ;
--	MPT_FRAME_HDR		*PendingMF;
--	struct scsi_cmnd	*PendingSCpnt;
--	struct timer_list	  TMtimer;	/* Timer for TM commands ONLY */
--	MPT_FRAME_HDR		 *tmPtr;	/* Ptr to TM request*/
- 		/* Pool of SCSI sense buffers for commands coming from
- 		 * the SCSI mid-layer.  We have one 256 byte sense buffer
- 		 * for each REQ entry.
-@@ -638,12 +614,10 @@ typedef struct _MPT_ADAPTER
- 	struct _MPT_ADAPTER	*alt_ioc;	/* ptr to 929 bound adapter port */
- 	spinlock_t		 diagLock;	/* diagnostic reset lock */
- 	int			 diagPending;
--	int                      IOCResetInProgress;
- 	u32			 biosVersion;	/* BIOS version from IO Unit Page 2 */
- 	int			 eventTypes;	/* Event logging parameters */
- 	int			 eventContext;	/* Next event context */
- 	struct _mpt_ioctl_events *events;	/* pointer to event log */
--	EventNotification_t	*evnp;		/* event message frame pointer */
- 	u8			*cached_fw;	/* Pointer to FW */
- 	dma_addr_t	 	cached_fw_dma;
- 	struct list_head	 configQ;	/* linked list of config. requests */
-@@ -662,12 +636,10 @@ typedef struct _MPT_ADAPTER
- /* emoore@lsil.com - sas support - start */
- 	U64			 sas_port_WWID[4];
- 	u8			 BoardTracerNumber[16];
-+	u8			 numPhys;
- 	u16			 vendorID;
--#if defined(CPQ_CIM)
--	struct list_head	 sas_device_info_list;
--	struct semaphore	 sas_device_info_mutex;
--	u32			 num_ports;
--#endif
-+	sas_phy_info_t		 *sasPhyInfo;
-+	struct list_head	 sasDeviceList;
- 	struct semaphore	 hot_plug_semaphore;
- 	struct work_struct	 mptscsih_persistTask;
- 	struct timer_list	 persist_timer;	/* persist table timer */
-@@ -680,7 +652,7 @@ typedef struct _MPT_ADAPTER
- 	u32           		 PciState[64];     /* save PCI state to this area */
- #endif
- #if defined(CPQ_CIM)
--	u32         csmi_change_count;    /* count to track all IR events for CSMI */
-+    u32         csmi_change_count;    /* count to track all IR events for CSMI */
- #endif
- 	/*  
- 	 * Description: errata_flag_1064
-@@ -694,11 +666,7 @@ typedef struct _MPT_ADAPTER
- 	u8			 upload_fw;	/* If set, do a fw upload */
- 	u8			 reload_fw;	/* Force a FW Reload on next reset */
- 	u8			 NBShiftFactor;  /* NB Shift Factor based on Block Size (Facts)  */
--	u8			 pad1;
--	u8			 CheckFcLinkSpeed;
--	u8			 FcLinkSpeedCheckNeeded;
--	u8			 FcLinkSpeed;
--	MPT_FRAME_HDR		*FcLinkSpeedReqActive;
-+	u8			 pad1[4];
- 	int			 DoneCtx;
- 	int			 TaskCtx;
- 	int			 InternalCtx;
-@@ -811,25 +779,6 @@ typedef struct _mpt_sge {
- #define DBG_DUMP_EVENT_REQUEST_FRAME(mfp)
- #endif
- 
--#ifdef MPT_DEBUG_PEND
--#define dpendprintk(x)  printk x
--#define DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mfp) \
--	{	int  i, n = ioc->req_sz/4;						\
--		u32 *m = (u32 *)(mfp);					\
--		for (i=0; i<n; i++) {					\
--			if (i && ((i%8)==0))				\
--				printk("\n");				\
--			printk("%08x ", le32_to_cpu(m[i]));		\
--		}							\
--		printk("\n");						\
--	}
--#else
--#define dpendprintk(x)
--#define DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mfp)
--#endif
--
--
--
- #ifdef MPT_DEBUG_HOTPLUG
- #define dhotpprintk(x)  printk x
- #else
-@@ -838,51 +787,16 @@ typedef struct _mpt_sge {
- 
- #ifdef MPT_DEBUG_RESET
- #define drsprintk(x)  printk x
--#define DBG_DUMP_RESET_REQUEST_FRAME(ioc, mfp) \
--       {       int  i, n = ioc->req_sz/4;                                              \
--               u32 *m = (u32 *)(mfp);                                  \
--               for (i=0; i<n; i++) {                                   \
--                       if (i && ((i%8)==0))                            \
--                               printk("\n");                           \
--                       printk("%08x ", le32_to_cpu(m[i]));             \
--               }                                                       \
--               printk("\n");                                           \
--       }
- #else
- #define drsprintk(x)
--#define DBG_DUMP_RESET_REQUEST_FRAME(ioc, mfp)
- #endif
- 
- //#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME)
- #if defined(MPT_DEBUG_MSG_FRAME)
- #define dmfprintk(x)  printk x
--#define DBG_DUMP_REQUEST_FRAME(ioc,mfp) \
--	{	int  i, n = ioc->req_sz/4;
--		u32 *m = (u32 *)(mfp);					\
--		for (i=0; i<n; i++) {					\
--			if (i && ((i%8)==0))				\
--				printk("\n");				\
--			printk("%08x ", le32_to_cpu(m[i]));		\
--		}							\
--		printk("\n");						\
--	}
--#else
--#define dmfprintk(x)
--#define DBG_DUMP_REQUEST_FRAME(ioc,mfp)
--#endif
--
--#if defined(MPT_DEBUG_IOS)
--#define dioprintk(x)  printk x
--#else
--#define dioprintk(x)
--#endif
--
--
--#if defined(MPT_DEBUG_CSMI)
--#define DBG_DUMP_CSMI_FRAME(mfp) \
-+#define DBG_DUMP_REQUEST_FRAME(mfp) \
- 	{	int  i, n = 24;						\
- 		u32 *m = (u32 *)(mfp);					\
--		printk("CSMI MessageFrame:\n");			\
- 		for (i=0; i<n; i++) {					\
- 			if (i && ((i%8)==0))				\
- 				printk("\n");				\
-@@ -891,7 +805,8 @@ typedef struct _mpt_sge {
- 		printk("\n");						\
- 	}
- #else
--#define DBG_DUMP_CSMI_FRAME(mfp)
-+#define dmfprintk(x)
-+#define DBG_DUMP_REQUEST_FRAME(mfp)
- #endif
- 
- #ifdef MPT_DEBUG_SG
-@@ -918,22 +833,28 @@ typedef struct _mpt_sge {
- #define dnegoprintk(x)
- #endif
- 
-+#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY)
-+#define ddvtprintk(x)  printk x
-+#else
-+#define ddvtprintk(x)
-+#endif
-+
- #ifdef MPT_DEBUG_IOCTL
- #define dctlprintk(x) printk x
- #else
- #define dctlprintk(x)
- #endif
- 
--#ifdef MPT_DEBUG_SAS
--#define dsasprintk(x) printk x
-+#ifdef MPT_DEBUG_REPLY
-+#define dreplyprintk(x) printk x
- #else
--#define dsasprintk(x)
-+#define dreplyprintk(x)
- #endif
- 
--#ifdef MPT_DEBUG_CSMISAS
--#define dcsmisasprintk(x) printk x
-+#ifdef MPT_DEBUG_SAS
-+#define dsasprintk(x) printk x
- #else
--#define dcsmisasprintk(x)
-+#define dsasprintk(x)
- #endif
- 
- #ifdef MPT_DEBUG_TM
-@@ -988,8 +909,7 @@ typedef struct _mpt_sge {
- #define MPT_INDEX_2_RFPTR(ioc,idx) \
- 	(MPT_FRAME_HDR*)( (u8*)(ioc)->reply_frames + (ioc)->req_sz * (idx) )
- 
--#if defined(MPT_DEBUG_REPLY) || defined(MPT_DEBUG_MSG_FRAME) || defined(MPT_DEBUG_HANDSHAKE)
--#define dreplyprintk(x) printk x
-+#if defined(MPT_DEBUG) || defined(MPT_DEBUG_MSG_FRAME) || defined(MPT_DEBUG_HANDSHAKE)
- #define DBG_DUMP_REPLY_FRAME(mfp) \
- 	{	u32 *m = (u32 *)(mfp);					\
- 		int  i, n = (le32_to_cpu(m[0]) & 0x00FF0000) >> 16;	\
-@@ -1006,36 +926,9 @@ typedef struct _mpt_sge {
- 			printk(" %08x", le32_to_cpu(m[i]));		\
- 		printk("\n");						\
- 	}
--#define DBG_DUMP_REPLYS_REQUEST_FRAME(ioc,mfp) \
--	{	int  i, n = ioc->req_sz/4;;						\
--		u32 *m = (u32 *)(mfp);					\
--		for (i=0; i<n; i++) {					\
--			if (i && ((i%8)==0))				\
--				printk("\n");				\
--			printk("%08x ", le32_to_cpu(m[i]));		\
--		}							\
--		printk("\n");						\
--	}
--#define DBG_DUMP_SENSE_DATA(mfp) \
--	{	int  i, n = 8;						\
--		u32 *m = (u32 *)(mfp);					\
--		printk(KERN_INFO "SENSE DATA: ");					\
--		for (i=0; i<n; i++)					\
--			printk(" %08x", le32_to_cpu(m[i]));		\
--		printk("\n");						\
--	}
- #else
--#define dreplyprintk(x)
- #define DBG_DUMP_REPLY_FRAME(mfp)
- #define DBG_DUMP_REQUEST_FRAME_HDR(mfp)
--#define DBG_DUMP_REPLYS_REQUEST_FRAME(ioc,mfp)
--#define DBG_DUMP_SENSE_DATA(mfp)
--#endif
--
--#if defined (MPT_DEBUG_ERROR) || defined(MPT_DEBUG_REPLY)
--#define derrprintk(x) printk x
--#else
--#define derrprintk(x)
- #endif
- 
- 
-@@ -1095,34 +988,32 @@ typedef struct _MPT_SCSI_HOST {
- 	u32			  pad0;
- 	struct scsi_cmnd	**ScsiLookup;
- 	struct scsi_device 	 *device;
-+	VirtDevice		**Targets;
- 	MPT_LOCAL_REPLY		 *pLocal;		/* used for internal commands */
--	struct timer_list	  InternalCmdTimer;
-+	struct timer_list	  timer;
- 		/* Pool of memory for holding SCpnts before doing
- 		 * OS callbacks. freeQ is the free pool.
- 		 */
- 	u8			  tmPending;
- 	u8			  resetPending;
-+	u8			  negoNvram;		/* DV disabled, nego NVRAM */
-+	u8			  pad1;
- 	u8                        tmState;
--	u8			  rsvd[4];
-+	u8			  rsvd[2];
- 	MPT_FRAME_HDR		 *cmdPtr;		/* Ptr to nonOS request */
- 	struct scsi_cmnd	 *abortSCpnt;
- 	MPT_LOCAL_REPLY		  localReply;		/* internal cmd reply struct */
- 	unsigned long		  hard_resets;		/* driver forced bus resets count */
- 	unsigned long		  soft_resets;		/* fw/external bus resets count */
- 	unsigned long		  timeouts;		/* cmd timeouts */
--	ushort			  sel_timeout[MPT_MAX_SCSI_DEVICES];
-+	ushort			  sel_timeout[MPT_MAX_FC_DEVICES];
- 	char 			  *info_kbuf;
- 	wait_queue_head_t	  scandv_waitq;
- 	int			  scandv_wait_done;
--	wait_queue_head_t	  TM_waitq;
--	int			  TM_wait_done;
- 	long			  last_queue_full;
--	u8			  mpt_pq_filter;
--	u16			  tm_iocstatus;
--	struct list_head	  target_reset_list;
-+	u8		 	  mpt_pq_filter;
- } MPT_SCSI_HOST;
- 
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-  *	More Dynamic Multi-Pathing stuff...
-@@ -1176,29 +1067,20 @@ extern void	 mpt_free_msg_frame(MPT_ADAP
- extern void	 mpt_put_msg_frame(int handle, MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf);
- extern void	 mpt_add_sge(char *pAddr, u32 flagslength, dma_addr_t dma_addr);
- 
--extern int	 mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes,
--u32 *req, ulong timeout, int sleepFlag);
--
-+extern int	 mpt_send_handshake_request(int handle, MPT_ADAPTER *ioc, int reqBytes, u32 *req, int sleepFlag);
- extern int	 mpt_verify_adapter(int iocid, MPT_ADAPTER **iocpp);
- extern u32	 mpt_GetIocState(MPT_ADAPTER *ioc, int cooked);
- extern void	 mpt_print_ioc_summary(MPT_ADAPTER *ioc, char *buf, int *size, int len, int showlan);
- extern int	 mpt_HardResetHandler(MPT_ADAPTER *ioc, int sleepFlag);
--
--extern int       mpt_SendIocReset(MPT_ADAPTER *ioc, u8 reset_type, int sleepFlag);
--extern void      mptscsih_TM_timeout(unsigned long data);
--
- extern int	 mpt_config(MPT_ADAPTER *ioc, CONFIGPARMS *cfg);
--extern int       mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag);
--extern int       mpt_writeSDP1(MPT_ADAPTER *ioc, int portnum, int id, int flags);
--extern void  mpt_setSDP1parameters (u8 width, u8 factor, u8 offset, u8 flags, int *requestedPtr, int *configurationPtr);
- extern void	 mpt_alloc_fw_memory(MPT_ADAPTER *ioc, int size);
- extern void	 mpt_free_fw_memory(MPT_ADAPTER *ioc);
- extern int	 mpt_findImVolumes(MPT_ADAPTER *ioc);
- extern int	 mpt_read_ioc_pg_3(MPT_ADAPTER *ioc);
- extern int	 mptbase_sas_persist_operation(MPT_ADAPTER *ioc, u8 persist_opcode);
-+extern int	 mpt_sas_get_info(MPT_ADAPTER *ioc);
-+extern void	 mpt_poll_interrupt(MPT_ADAPTER *ioc);
- extern int	 mpt_alt_ioc_wait(MPT_ADAPTER *ioc);
--extern void      mpt_poll_interrupt(MPT_ADAPTER *ioc);
--extern int 	 mpt_raid_phys_disk_pg0(MPT_ADAPTER *ioc, u8 phys_disk_num, pRaidPhysDiskPage0_t phys_disk);
- 
- /*
-  *  Public data decl's...
-@@ -1237,7 +1119,7 @@ extern int		mpt_sg_tablesize;
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- #endif		/* } __KERNEL__ */
- 
--#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__) || defined(__powerpc__)
-+#if defined(__alpha__) || defined(__sparc_v9__) || defined(__ia64__) || defined(__x86_64__)
- #define CAST_U32_TO_PTR(x)	((void *)(u64)x)
- #define CAST_PTR_TO_U32(x)	((u32)(u64)x)
- #else
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.c linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.c	2007-11-02 09:10:23.000000000 +0100
-@@ -4,8 +4,8 @@
-  *      For use with LSI Logic PCI chip/adapters
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -57,6 +57,9 @@
- #include <linux/miscdevice.h>
- #include <linux/smp_lock.h>
- #include <linux/compat.h>
-+#if defined(CPQ_CIM)
-+#include "csmisas.h"
-+#endif // CPQ_CIM
- 
- #include <asm/io.h>
- #include <asm/uaccess.h>
-@@ -67,16 +70,11 @@
- #include <scsi/scsi_host.h>
- #include <scsi/scsi_tcq.h>
- 
--#define COPYRIGHT	"Copyright (c) 1999-2007 LSI Logic Corporation"
-+#define COPYRIGHT	"Copyright (c) 1999-2005 LSI Logic Corporation"
- #define MODULEAUTHOR	"LSI Logic Corporation"
- #include "mptbase.h"
- #include "mptctl.h"
- 
--#if defined(CPQ_CIM)
--#include "mptsas.h"
--#include "csmi/csmisas.h"
--#endif // CPQ_CIM
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- #define my_NAME		"Fusion MPT misc device (ioctl) driver"
- #define my_VERSION	MPT_LINUX_VERSION_COMMON
-@@ -85,12 +83,10 @@
- MODULE_AUTHOR(MODULEAUTHOR);
- MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
--MODULE_VERSION(my_VERSION);
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- 
- extern	int mpt_downloadboot(MPT_ADAPTER *ioc, MpiFwHeader_t *pFwHeader, int sleepFlag);
--extern int	mpt_handshake_req_reply_wait(MPT_ADAPTER *ioc, int reqBytes, u32 *req, int replyBytes, u16 *u16reply, int maxwait, int sleepFlag);
- 
- static int mptctl_id = -1;
- 
-@@ -119,10 +115,6 @@ static int mptctl_eventenable(unsigned l
- static int mptctl_eventreport(unsigned long arg);
- static int mptctl_replace_fw(unsigned long arg);
- 
--#ifdef MPT_SUPPORT_FWDLB_IOCTL
--static int mptctl_hba_pciinfo(unsigned long arg);
--#endif
--
- static int mptctl_do_reset(unsigned long arg);
- static int mptctl_hp_hostinfo(unsigned long arg, unsigned int cmd);
- static int mptctl_hp_targetinfo(unsigned long arg);
-@@ -133,29 +125,27 @@ static int mptctl_unregister_diag_buffer
- static int mptctl_query_diag_buffer(unsigned long arg);
- static int mptctl_read_diag_buffer(unsigned long arg);
- #if defined(CPQ_CIM)
--static int csmisas_get_driver_info(unsigned long arg);
--static int csmisas_get_cntlr_status(unsigned long arg);
--static int csmisas_get_cntlr_config(unsigned long arg);
--static int csmisas_get_phy_info(unsigned long arg);
--static int csmisas_get_scsi_address(unsigned long arg);
--static int csmisas_get_link_errors(unsigned long arg);
--static int csmisas_smp_passthru(unsigned long arg);
--static int csmisas_firmware_download(unsigned long arg);
--static int csmisas_get_raid_info(unsigned long arg);
--static int csmisas_get_raid_config(unsigned long arg);
--static int csmisas_get_raid_features(unsigned long arg);
--static int csmisas_set_raid_control(unsigned long arg);
--static int csmisas_get_raid_element(unsigned long arg);
--static int csmisas_set_raid_operation(unsigned long arg);
--static int csmisas_set_phy_info(unsigned long arg);
--static int csmisas_ssp_passthru(unsigned long arg);
--static int csmisas_stp_passthru(unsigned long arg);
--static int csmisas_get_sata_signature(unsigned long arg);
--static int csmisas_get_device_address(unsigned long arg);
--static int csmisas_task_managment(unsigned long arg);
--static int csmisas_phy_control(unsigned long arg);
--static int csmisas_get_connector_info(unsigned long arg);
--static int csmisas_get_location(unsigned long arg);
-+static int mptctl_csmi_sas_get_driver_info(unsigned long arg);
-+static int mptctl_csmi_sas_get_cntlr_status(unsigned long arg);
-+static int mptctl_csmi_sas_get_cntlr_config(unsigned long arg);
-+static int mptctl_csmi_sas_get_phy_info(unsigned long arg);
-+static int mptctl_csmi_sas_get_scsi_address(unsigned long arg);
-+static int mptctl_csmi_sas_get_link_errors(unsigned long arg);
-+static int mptctl_csmi_sas_smp_passthru(unsigned long arg);
-+static int mptctl_csmi_sas_firmware_download(unsigned long arg);
-+static int mptctl_csmi_sas_get_raid_info(unsigned long arg);
-+static int mptctl_csmi_sas_get_raid_config(unsigned long arg);
-+static int mptctl_csmi_sas_get_raid_features(unsigned long arg);
-+static int mptctl_csmi_sas_get_raid_control(unsigned long arg);
-+static int mptctl_csmi_sas_set_phy_info(unsigned long arg);
-+static int mptctl_csmi_sas_ssp_passthru(unsigned long arg);
-+static int mptctl_csmi_sas_stp_passthru(unsigned long arg);
-+static int mptctl_csmi_sas_get_sata_signature(unsigned long arg);
-+static int mptctl_csmi_sas_get_device_address(unsigned long arg);
-+static int mptctl_csmi_sas_task_managment(unsigned long arg);
-+static int mptctl_csmi_sas_phy_control(unsigned long arg);
-+static int mptctl_csmi_sas_get_connector_info(unsigned long arg);
-+static int mptctl_csmi_sas_get_location(unsigned long arg);
- #endif // CPQ_CIM
- 
- static int  mptctl_probe(struct pci_dev *, const struct pci_device_id *);
-@@ -230,7 +220,7 @@ static inline int
- mptctl_syscall_down(MPT_ADAPTER *ioc, int nonblock)
- {
- 	int rc = 0;
--	dctlprintk((KERN_INFO MYNAM ": mptctl_syscall_down(%p,%d) called\n", ioc, nonblock));
-+	dctlprintk((KERN_INFO MYNAM "::mptctl_syscall_down(%p,%d) called\n", ioc, nonblock));
- 
- 	if (nonblock) {
- 		if (down_trylock(&ioc->ioctl->sem_ioc))
-@@ -239,7 +229,7 @@ mptctl_syscall_down(MPT_ADAPTER *ioc, in
- 		if (down_interruptible(&ioc->ioctl->sem_ioc))
- 			rc = -ERESTARTSYS;
- 	}
--	dctlprintk((KERN_INFO MYNAM ": mptctl_syscall_down return %d\n", rc));
-+	dctlprintk((KERN_INFO MYNAM "::mptctl_syscall_down return %d\n", rc));
- 	return rc;
- }
- 
-@@ -304,17 +294,9 @@ mptctl_reply(MPT_ADAPTER *ioc, MPT_FRAME
- 
- 		if ((cmd == MPI_FUNCTION_SCSI_IO_REQUEST) ||
- 			(cmd == MPI_FUNCTION_RAID_SCSI_IO_PASSTHROUGH)) {
--
--			dcsmisasprintk(("\tiocstatus = 0x%x, "
--				"scsi_status = 0x%x, scsi_state = 0x%x\n",
--				reply->u.sreply.IOCStatus,
--				reply->u.sreply.SCSIStatus,
--				reply->u.sreply.SCSIState));
--
- 			ioc->ioctl->reset &= ~MPTCTL_RESET_OK;
- 
- 			if ((iocStatus == MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) ||
--                                (iocStatus == MPI_IOCSTATUS_SCSI_RESIDUAL_MISMATCH) ||
- 				(iocStatus == MPI_IOCSTATUS_SCSI_RECOVERED_ERROR)) {
- 				ioc->ioctl->status |= MPT_IOCTL_STATUS_COMMAND_GOOD;
- 			}
-@@ -438,8 +420,8 @@ mptctl_bus_reset(MPT_IOCTL *ioctl)
- 			ioctl->ioc->name, mf));
- 
- 	pScsiTm = (SCSITaskMgmt_t *) mf;
--	pScsiTm->TargetID = ioctl->id;
--	pScsiTm->Bus = ioctl->bus;
-+	pScsiTm->TargetID = ioctl->target;
-+	pScsiTm->Bus = hd->port;	/* 0 */
- 	pScsiTm->ChainOffset = 0;
- 	pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
- 	pScsiTm->Reserved = 0;
-@@ -460,7 +442,7 @@ mptctl_bus_reset(MPT_IOCTL *ioctl)
- 
- 	ioctl->wait_done=0;
- 	if ((retval = mpt_send_handshake_request(mptctl_id, ioctl->ioc,
--	    sizeof(SCSITaskMgmt_t), (u32*)pScsiTm,10, CAN_SLEEP)) != 0) {
-+	     sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, CAN_SLEEP)) != 0) {
- 		dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!"
- 			" (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd,
- 			hd->ioc, mf));
-@@ -652,7 +634,7 @@ __mptctl_ioctl(struct file *file, unsign
- 	dctlprintk(("mptctl_ioctl() called with cmd=%x\n", cmd));
- 
- 	if (copy_from_user(&khdr, uhdr, sizeof(khdr))) {
--		printk(KERN_ERR "%s: mptctl_ioctl() @%d - "
-+		printk(KERN_ERR "%s::mptctl_ioctl() @%d - "
- 				"Unable to copy mpt_ioctl_header data @ %p\n",
- 				__FILE__, __LINE__, uhdr);
- 		return -EFAULT;
-@@ -693,38 +675,28 @@ __mptctl_ioctl(struct file *file, unsign
- 		return mptctl_query_diag_buffer(arg);
- 	} else if (cmd == MPTDIAGUNREGISTER) {
- 		return mptctl_unregister_diag_buffer(arg);
--
--	}
--#ifdef MPT_SUPPORT_FWDLB_IOCTL
--	 else if (cmd == MPTHBAPCIINFO) {
--		return mptctl_hba_pciinfo(arg);
- 	}
--#endif
- 
- #if defined(CPQ_CIM)
- 	else if (cmd == CC_CSMI_SAS_GET_DRIVER_INFO) {
--		return csmisas_get_driver_info(arg);
-+		return mptctl_csmi_sas_get_driver_info(arg);
- 	} else if (cmd == CC_CSMI_SAS_GET_CNTLR_CONFIG) {
--		return csmisas_get_cntlr_config(arg);
-+		return mptctl_csmi_sas_get_cntlr_config(arg);
- 	} else if (cmd == CC_CSMI_SAS_GET_CNTLR_STATUS) {
--		return csmisas_get_cntlr_status(arg);
-+		return mptctl_csmi_sas_get_cntlr_status(arg);
- 	} else if (cmd == CC_CSMI_SAS_GET_SCSI_ADDRESS) {
--		return csmisas_get_scsi_address(arg);
-+		return mptctl_csmi_sas_get_scsi_address(arg);
- 	} else if (cmd == CC_CSMI_SAS_GET_DEVICE_ADDRESS){
--		return csmisas_get_device_address(arg);
-+		return mptctl_csmi_sas_get_device_address(arg);
- 	}
- #endif // CPQ_CIM
- 
--	dctlprintk(("mptctl_ioctl() called with cmd=%x, interrupt required\n", cmd));
- 	/* All of these commands require an interrupt or
- 	 * are unknown/illegal.
- 	 */
--	if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0) {
--		dctlprintk(("mptctl_ioctl() called with cmd=%x ret=%d, syscall_down failed\n", cmd, ret));
-+	if ((ret = mptctl_syscall_down(iocp, nonblock)) != 0)
- 		return ret;
--	}
- 
--	dctlprintk(("mptctl_ioctl() called with cmd=%x, syscall_down completed\n", cmd));
- 	if (cmd == MPTFWDOWNLOAD)
- 		ret = mptctl_fw_download(arg);
- 	else if (cmd == MPTFWDOWNLOADBOOT)
-@@ -745,41 +717,37 @@ __mptctl_ioctl(struct file *file, unsign
- 		ret = mptctl_read_diag_buffer(arg);
- #if defined(CPQ_CIM)
- 	else if (cmd == CC_CSMI_SAS_GET_PHY_INFO)
--		ret = csmisas_get_phy_info(arg);
-+		ret = mptctl_csmi_sas_get_phy_info(arg);
- 	else if (cmd == CC_CSMI_SAS_GET_SATA_SIGNATURE)
--		ret = csmisas_get_sata_signature(arg);
-+		ret = mptctl_csmi_sas_get_sata_signature(arg);
- 	else if (cmd == CC_CSMI_SAS_GET_LINK_ERRORS)
--		ret = csmisas_get_link_errors(arg);
-+		ret = mptctl_csmi_sas_get_link_errors(arg);
- 	else if (cmd == CC_CSMI_SAS_SMP_PASSTHRU)
--		ret = csmisas_smp_passthru(arg);
-+		ret = mptctl_csmi_sas_smp_passthru(arg);
- 	else if (cmd == CC_CSMI_SAS_SSP_PASSTHRU)
--		ret = csmisas_ssp_passthru(arg);
-+		ret = mptctl_csmi_sas_ssp_passthru(arg);
- 	else if (cmd == CC_CSMI_SAS_FIRMWARE_DOWNLOAD)
--		ret = csmisas_firmware_download(arg);
-+		ret = mptctl_csmi_sas_firmware_download(arg);
- 	else if (cmd == CC_CSMI_SAS_GET_RAID_INFO)
--		ret = csmisas_get_raid_info(arg);
-+		ret = mptctl_csmi_sas_get_raid_info(arg);
- 	else if (cmd == CC_CSMI_SAS_GET_RAID_CONFIG)
--		ret = csmisas_get_raid_config(arg);
--	else if (cmd == CC_CSMI_SAS_GET_RAID_FEATURES)
--		ret = csmisas_get_raid_features(arg);
--	else if (cmd == CC_CSMI_SAS_SET_RAID_CONTROL)
--		ret = csmisas_set_raid_control(arg);
--	else if (cmd == CC_CSMI_SAS_GET_RAID_ELEMENT)
--		ret = csmisas_get_raid_element(arg);
--	else if (cmd == CC_CSMI_SAS_SET_RAID_OPERATION)
--		ret = csmisas_set_raid_operation(arg);
-+		ret = mptctl_csmi_sas_get_raid_config(arg);
-+    else if (cmd == CC_CSMI_SAS_GET_RAID_FEATURES)
-+		ret = mptctl_csmi_sas_get_raid_features(arg);
-+    else if (cmd == CC_CSMI_SAS_SET_RAID_CONTROL)
-+		ret = mptctl_csmi_sas_get_raid_control(arg);
- 	else if (cmd == CC_CSMI_SAS_SET_PHY_INFO)
--		ret = csmisas_set_phy_info(arg);
-+		ret = mptctl_csmi_sas_set_phy_info(arg);
- 	else if (cmd == CC_CSMI_SAS_STP_PASSTHRU)
--		ret = csmisas_stp_passthru(arg);
-+		ret = mptctl_csmi_sas_stp_passthru(arg);
- 	else if (cmd == CC_CSMI_SAS_TASK_MANAGEMENT)
--		ret = csmisas_task_managment(arg);
-+		ret = mptctl_csmi_sas_task_managment(arg);
- 	else if (cmd == CC_CSMI_SAS_PHY_CONTROL)
--		ret = csmisas_phy_control(arg);
-+		ret = mptctl_csmi_sas_phy_control(arg);
- 	else if (cmd == CC_CSMI_SAS_GET_CONNECTOR_INFO)
--		ret = csmisas_get_connector_info(arg);
-+		ret = mptctl_csmi_sas_get_connector_info(arg);
- 	else if (cmd == CC_CSMI_SAS_GET_LOCATION)
--		ret = csmisas_get_location(arg);
-+		ret = mptctl_csmi_sas_get_location(arg);
- #endif // CPQ_CIM
- 	else {
- 		dctlprintk(("mptctl_ioctl() cmd=%x not found\n", cmd));
-@@ -788,7 +756,6 @@ __mptctl_ioctl(struct file *file, unsign
- 
- 	up(&iocp->ioctl->sem_ioc);
- 
--	dctlprintk(("mptctl_ioctl() called with cmd=%x ret=%d, up completed\n", cmd, ret));
- 	return ret;
- }
- 
-@@ -813,7 +780,7 @@ static int mptctl_do_reset(unsigned long
- 	dctlprintk(("mptctl_do_reset called.\n"));
- 
- 	if (copy_from_user(&krinfo, urinfo, sizeof(struct mpt_ioctl_diag_reset))) {
--		printk(KERN_ERR "%s@%d: mptctl_do_reset - "
-+		printk(KERN_ERR "%s@%d::mptctl_do_reset - "
- 				"Unable to copy mpt_ioctl_diag_reset struct @ %p\n",
- 				__FILE__, __LINE__, urinfo);
- 		return -EFAULT;
-@@ -858,7 +825,7 @@ mptctl_fw_download(unsigned long arg)
- 
- 	dctlprintk(("mptctl_fwdl called. mptctl_id = %xh\n", mptctl_id)); //tc
- 	if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
--		printk(KERN_ERR "%s@%d: _ioctl_fwdl - "
-+		printk(KERN_ERR "%s@%d::_ioctl_fwdl - "
- 				"Unable to copy mpt_fw_xfer struct @ %p\n",
- 				__FILE__, __LINE__, ufwdl);
- 		return -EFAULT;
-@@ -1014,7 +981,7 @@ mptctl_do_fw_download(int ioc, char __us
- 			mpt_add_sge(sgOut, sgIn->FlagsLength, sgIn->Address);
- 			n++;
- 			if (copy_from_user(bl->kptr, ufwbuf+fw_bytes_copied, bl->len)) {
--				printk(KERN_ERR "%s@%d: _ioctl_fwdl - "
-+				printk(KERN_ERR "%s@%d::_ioctl_fwdl - "
- 						"Unable to copy f/w buffer hunk#%d @ %p\n",
- 						__FILE__, __LINE__, n, ufwbuf);
- 				goto fwdl_out;
-@@ -1040,9 +1007,6 @@ mptctl_do_fw_download(int ioc, char __us
- 	 * Finally, perform firmware download.
- 	 */
- 	ReplyMsg = NULL;
--	iocp->ioctl->wait_done = 0;
--	INITIALIZE_IOCTL_STATUS(iocp->ioctl->status)
--
- 	mpt_put_msg_frame(mptctl_id, iocp, mf);
- 
- 	/* Now wait for the command to complete */
-@@ -1075,7 +1039,7 @@ mptctl_do_fw_download(int ioc, char __us
- 		printk(KERN_WARNING MYNAM ": (try again later?)\n");
- 		return -EBUSY;
- 	} else {
--		printk(KERN_WARNING MYNAM ": ioctl_fwdl() ERROR!  %s returned [bad] status = %04xh\n",
-+		printk(KERN_WARNING MYNAM "::ioctl_fwdl() ERROR!  %s returned [bad] status = %04xh\n",
- 				    iocp->name, iocstat);
- 		printk(KERN_WARNING MYNAM ": (bad VooDoo)\n");
- 		return -ENOMSG;
-@@ -1111,7 +1075,7 @@ mptctl_fw_downloadboot(unsigned long arg
- 
- 	dctlprintk(("mptctl_fwdlboot called. mptctl_id = %xh\n", mptctl_id)); //tc
- 	if (copy_from_user(&kfwdl, ufwdl, sizeof(struct mpt_fw_xfer))) {
--		printk(KERN_ERR "%s@%d: _ioctl_fwdl - "
-+		printk(KERN_ERR "%s@%d::_ioctl_fwdl - "
- 				"Unable to copy mpt_fw_xfer struct @ %p\n",
- 				__FILE__, __LINE__, ufwdl);
- 		return -EFAULT;
-@@ -1149,20 +1113,11 @@ mptctl_do_fw_downloadboot(int ioc_num, c
- 		return -ENODEV; /* (-6) No such device or address */
- 	}
- 
--	pbuf = (char *)__get_free_pages(GFP_KERNEL, get_order(fwlen));
--       if (pbuf==NULL) {
--               printk(KERN_ERR "%s@%d: _ioctl_fwdlboot - "
--                               "Unable to allocate memory\n",
--                               __FILE__, __LINE__);
--               return -ENOMEM;
--       }
--
--
--if (copy_from_user(pbuf, ufwbuf, fwlen)) {
--		printk(KERN_ERR "%s@%d: _ioctl_fwdlboot - "
-+	pbuf = kmalloc(fwlen, GFP_KERNEL);
-+	if (copy_from_user(pbuf, ufwbuf, fwlen)) {
-+		printk(KERN_ERR "%s@%d::_ioctl_fwdlboot - "
- 				"Unable to copy mpt_fw @ %p\n",
- 				__FILE__, __LINE__, (void*)ufwbuf);
--free_pages((unsigned long)pbuf, get_order(fwlen));
- 		return -EFAULT;
- 	}
- 
-@@ -1171,10 +1126,7 @@ free_pages((unsigned long)pbuf, get_orde
- 
- 	rc = mpt_downloadboot(ioc, (MpiFwHeader_t *)pbuf, CAN_SLEEP);
- 	ddlprintk((MYIOC_s_INFO_FMT "mptctl_do_fw_downloadboot rc=%x\n",
--
- 				ioc->name, rc));
--#if 0
--
- 	if ( (rc == 0) && (ioc->bus_type == SAS) ) {
- /*		if ((rc = mptctl_syscall_down(ioc, nonblock)) != 0)
- 			return rc; */
-@@ -1194,12 +1146,10 @@ free_pages((unsigned long)pbuf, get_orde
- 			ioc->name));
- 		} */
- 	}
--#endif
--free_pages((unsigned long)pbuf, get_order(fwlen));
-+	kfree(pbuf);
- 	return rc;
- }
- 
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-  * SGE Allocation routine
-@@ -1278,9 +1228,9 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
- 		if (buflist[buflist_ent].kptr == NULL) {
- 			alloc_sz = alloc_sz / 2;
- 			if (alloc_sz == 0) {
--				printk(KERN_WARNING MYNAM ": -SG: No can do - "
-+				printk(KERN_WARNING MYNAM "-SG: No can do - "
- 						    "not enough memory!   :-(\n");
--				printk(KERN_WARNING MYNAM ": -SG: (freeing %d frags)\n",
-+				printk(KERN_WARNING MYNAM "-SG: (freeing %d frags)\n",
- 						    numfrags);
- 				goto free_and_fail;
- 			}
-@@ -1304,17 +1254,17 @@ kbuf_alloc_2_sgl(int bytes, u32 sgdir, i
- 
- 		/* Need to chain? */
- 		if (fragcnt == sg_spill) {
--			printk(KERN_WARNING MYNAM ": -SG: No can do - " "Chain required!   :-(\n");
--			printk(KERN_WARNING MYNAM ": (freeing %d frags)\n", numfrags);
-+			printk(KERN_WARNING MYNAM "-SG: No can do - " "Chain required!   :-(\n");
-+			printk(KERN_WARNING MYNAM "(freeing %d frags)\n", numfrags);
- 			goto free_and_fail;
- 		}
- 
- 		/* overflow check... */
- 		if (numfrags*8 > MAX_SGL_BYTES){
- 			/* GRRRRR... */
--			printk(KERN_WARNING MYNAM ": -SG: No can do - "
-+			printk(KERN_WARNING MYNAM "-SG: No can do - "
- 					    "too many SG frags!   :-(\n");
--			printk(KERN_WARNING MYNAM ": -SG: (freeing %d frags)\n",
-+			printk(KERN_WARNING MYNAM "-SG: (freeing %d frags)\n",
- 					    numfrags);
- 			goto free_and_fail;
- 		}
-@@ -1435,16 +1385,18 @@ mptctl_getiocinfo (unsigned long arg, un
- 	struct mpt_ioctl_iocinfo __user *uarg = (void __user *) arg;
- 	struct mpt_ioctl_iocinfo *karg;
- 	MPT_ADAPTER		*ioc;
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice		*pTarget;
- 	struct pci_dev		*pdev;
-+	struct Scsi_Host	*sh;
-+	MPT_SCSI_HOST		*hd;
- 	int			iocnum;
- 	int			numDevices = 0;
--	int			id, bus;
-+	unsigned int		max_id;
-+	int			ii;
- 	unsigned int		port;
- 	int			cim_rev;
- 	u8			revision;
- 
-+	dctlprintk(("mptctl_getiocinfo called.\n"));
- 	/* Add of PCI INFO results in unaligned access for
- 	 * IA64 and Sparc. Reset long to int. Return no PCI
- 	 * data for obsolete format.
-@@ -1457,20 +1409,18 @@ mptctl_getiocinfo (unsigned long arg, un
- 		cim_rev = 2;
- 	else if (data_size == (sizeof(struct mpt_ioctl_iocinfo_rev0)+12))
- 		cim_rev = 0;	/* obsolete */
--	else {
--		dctlprintk(("mptctl_getiocinfo called.i Invalid data_size=%d\n", data_size));
-+	else
- 		return -EFAULT;
--	}
- 
- 	karg = kmalloc(data_size, GFP_KERNEL);
- 	if (karg == NULL) {
--		printk(KERN_ERR "%s: mpt_ioctl_iocinfo() @%d - no memory available!\n",
-+		printk(KERN_ERR "%s::mpt_ioctl_iocinfo() @%d - no memory available!\n",
- 				__FILE__, __LINE__);
- 		return -ENOMEM;
- 	}
- 
- 	if (copy_from_user(karg, uarg, data_size)) {
--		printk(KERN_ERR "%s@%d: mptctl_getiocinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_getiocinfo - "
- 			"Unable to read in mpt_ioctl_iocinfo struct @ %p\n",
- 				__FILE__, __LINE__, (void*)uarg);
- 		kfree(karg);
-@@ -1484,11 +1434,10 @@ mptctl_getiocinfo (unsigned long arg, un
- 		kfree(karg);
- 		return -ENODEV;
- 	}
--	dctlprintk(("ioc%d: mptctl_getiocinfo called.\n", iocnum));
- 
- 	/* Verify the data transfer size is correct. */
- 	if (karg->hdr.maxDataSize != data_size) {
--		printk(KERN_ERR "%s@%d: mptctl_getiocinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_getiocinfo - "
- 			"Structure size mismatch. Command not completed.\n",
- 				__FILE__, __LINE__);
- 		kfree(karg);
-@@ -1535,11 +1484,18 @@ mptctl_getiocinfo (unsigned long arg, un
- 
- 	/* Get number of devices
-          */
--	for (bus = 0; bus < ioc->NumberOfBuses; bus++) {
--		if ((pMptTarget = ioc->Target_List[bus])) {
--			for (id = 0; id < ioc->DevicesPerBus; id++) {
--				pTarget = pMptTarget->Target[id];
--				if (pTarget)
-+	if ((sh = ioc->sh) != NULL) {
-+		 /* sh->max_id = maximum target ID + 1
-+		 */
-+		max_id = sh->max_id - 1;
-+		hd = (MPT_SCSI_HOST *) sh->hostdata;
-+
-+		/* Check all of the target structures and
-+		 * keep a counter.
-+		 */
-+		if (hd && hd->Targets) {
-+			for (ii = 0; ii <= max_id; ii++) {
-+				if (hd->Targets[ii])
- 					numDevices++;
- 			}
- 		}
-@@ -1563,7 +1519,7 @@ mptctl_getiocinfo (unsigned long arg, un
- 	/* Copy the data from kernel memory to user memory
- 	 */
- 	if (copy_to_user((char __user *)arg, karg, data_size)) {
--		printk(KERN_ERR "%s@%d: mptctl_getiocinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_getiocinfo - "
- 			"Unable to write out mpt_ioctl_iocinfo struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		kfree(karg);
-@@ -1590,22 +1546,25 @@ mptctl_gettargetinfo (unsigned long arg)
- 	struct mpt_ioctl_targetinfo __user *uarg = (void __user *) arg;
- 	struct mpt_ioctl_targetinfo karg;
- 	MPT_ADAPTER		*ioc;
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice		*pTarget;
-+	struct Scsi_Host	*sh;
-+	MPT_SCSI_HOST		*hd;
-+	VirtDevice		*vdev;
- 	char			*pmem;
- 	int			*pdata;
- 	IOCPage2_t		*pIoc2;
- 	IOCPage3_t		*pIoc3;
- 	int			iocnum;
- 	int			numDevices = 0;
-+	unsigned int		max_id;
- 	int			id, jj, indexed_lun, lun_index;
- 	u32			lun;
- 	int			maxWordsLeft;
- 	int			numBytes;
--	u8			port, devType, bus;
-+	u8			port, devType, bus_id;
- 
-+	dctlprintk(("mptctl_gettargetinfo called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_targetinfo))) {
--		printk(KERN_ERR "%s@%d: mptctl_gettargetinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - "
- 			"Unable to read in mpt_ioctl_targetinfo struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -1618,7 +1577,6 @@ mptctl_gettargetinfo (unsigned long arg)
- 		return -ENODEV;
- 	}
- 
--	dctlprintk(("ioc%ds: mptctl_gettargetinfo called.\n", iocnum));
- 	/* Get the port number and set the maximum number of bytes
- 	 * in the returned structure.
- 	 * Ignore the port setting.
-@@ -1628,7 +1586,7 @@ mptctl_gettargetinfo (unsigned long arg)
- 	port = karg.hdr.port;
- 
- 	if (maxWordsLeft <= 0) {
--		printk(KERN_ERR "%s: mptctl_gettargetinfo() @%d - no memory available!\n",
-+		printk(KERN_ERR "%s::mptctl_gettargetinfo() @%d - no memory available!\n",
- 				__FILE__, __LINE__);
- 		return -ENOMEM;
- 	}
-@@ -1649,7 +1607,7 @@ mptctl_gettargetinfo (unsigned long arg)
- 	 */
- 	pmem = kmalloc(numBytes, GFP_KERNEL);
- 	if (pmem == NULL) {
--		printk(KERN_ERR "%s: mptctl_gettargetinfo() @%d - no memory available!\n",
-+		printk(KERN_ERR "%s::mptctl_gettargetinfo() @%d - no memory available!\n",
- 				__FILE__, __LINE__);
- 		return -ENOMEM;
- 	}
-@@ -1658,68 +1616,71 @@ mptctl_gettargetinfo (unsigned long arg)
- 
- 	/* Get number of devices
-          */
--	/* Check all of the target structures.
--	 * Save the Id and increment the counter,
--	 * if ptr non-null.
--	 */
--	mpt_findImVolumes(ioc);
--	pIoc2 = ioc->raid_data.pIocPg2;
--	for (bus = 0; bus < ioc->NumberOfBuses; bus++) {
--		for ( id = 0; id < ioc->DevicesPerBus; ) {
--			if ( pIoc2 && pIoc2->NumActiveVolumes ) {
--				if ( id == pIoc2->RaidVolume[0].VolumeID ) {
--					if (maxWordsLeft <= 0) {
--						printk(KERN_ERR "mptctl_gettargetinfo - "
--		"buffer is full but volume is available on ioc %d\n, numDevices=%d", iocnum, numDevices);
--						goto data_space_full;
--					}
--					if ( ( pIoc2->RaidVolume[0].Flags & MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE ) == 0 )
--						devType = 0x80;
--					else
--						devType = 0xC0;
--					if ( bus == pIoc2->RaidVolume[0].VolumeBus) {
--						numDevices++;
--						*pdata = ( (devType << 24) | (bus<< 8) | id );
-+	if ((sh = ioc->sh) != NULL) {
-+
-+		max_id = sh->max_id - 1;
-+		hd = (MPT_SCSI_HOST *) sh->hostdata;
-+
-+		/* Check all of the target structures.
-+		 * Save the Id and increment the counter,
-+		 * if ptr non-null.
-+		 * sh->max_id = maximum target ID + 1
-+		 */
-+		if (hd && hd->Targets) {
-+			mpt_findImVolumes(ioc);
-+			pIoc2 = ioc->raid_data.pIocPg2;
-+			for ( id = 0; id <= max_id; ) {
-+				if ( pIoc2 && pIoc2->NumActiveVolumes ) {
-+					if ( id == pIoc2->RaidVolume[0].VolumeID ) {
-+						if (maxWordsLeft <= 0) {
-+							printk(KERN_ERR "mptctl_gettargetinfo - "
-+			"buffer is full but volume is available on ioc %d\n, numDevices=%d", iocnum, numDevices);
-+							goto data_space_full;
-+						}
-+						if ( ( pIoc2->RaidVolume[0].Flags & MPI_IOCPAGE2_FLAG_VOLUME_INACTIVE ) == 0 )
-+                        				devType = 0x80;
-+                    				else
-+                        				devType = 0xC0;
-+						bus_id = pIoc2->RaidVolume[0].VolumeBus;
-+	            				numDevices++;
-+                    				*pdata = ( (devType << 24) | (bus_id << 8) | id );
- 						dctlprintk((KERN_ERR "mptctl_gettargetinfo - "
- 		"volume ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata));
--						pdata++;
-+                    				pdata++;
- 						--maxWordsLeft;
- 						goto next_id;
--					}
--				} else {
--					pIoc3 = ioc->raid_data.pIocPg3;
--					for ( jj = 0; jj < pIoc3->NumPhysDisks; jj++ ) {
--						if ((pIoc3->PhysDisk[jj].PhysDiskID == id) && (pIoc3->PhysDisk[jj].PhysDiskBus == bus))
--							goto next_id;
-+					} else {
-+						pIoc3 = ioc->raid_data.pIocPg3;
-+            					for ( jj = 0; jj < pIoc3->NumPhysDisks; jj++ ) {
-+                    					if ( pIoc3->PhysDisk[jj].PhysDiskID == id )
-+								goto next_id;
-+						}
- 					}
- 				}
--			}
--			if ((pMptTarget = ioc->Target_List[bus])) {
--				pTarget = pMptTarget->Target[id];
--				if (pTarget) {
-+				if ( (vdev = hd->Targets[id]) ) {
- 					for (jj = 0; jj <= MPT_LAST_LUN; jj++) {
- 						lun_index = (jj >> 5);
- 						indexed_lun = (jj % 32);
- 						lun = (1 << indexed_lun);
--						if (pTarget->luns[lun_index] & lun) {
-+						if (vdev->luns[lun_index] & lun) {
- 							if (maxWordsLeft <= 0) {
- 								printk(KERN_ERR "mptctl_gettargetinfo - "
--				"buffer is full but more targets are available on ioc %d numDevices=%d\n", iocnum, numDevices);
-+			"buffer is full but more targets are available on ioc %d numDevices=%d\n", iocnum, numDevices);
- 								goto data_space_full;
- 							}
--							bus = pTarget->bus;
-+							bus_id = vdev->bus_id;
- 							numDevices++;
--							*pdata = ( (jj << 16) | (bus << 8) | id );
-+                            				*pdata = ( (jj << 16) | (bus_id << 8) | id );
- 							dctlprintk((KERN_ERR "mptctl_gettargetinfo - "
--			"target ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata));
-+		"target ioc=%d target=%x numDevices=%d pdata=%p\n", iocnum, *pdata, numDevices, pdata));
- 							pdata++;
- 							--maxWordsLeft;
- 						}
- 					}
- 				}
--			}
- next_id:
--			id++;
-+				id++;
-+			}
- 		}
- 	}
- data_space_full:
-@@ -1729,7 +1690,7 @@ data_space_full:
- 	 */
- 	if (copy_to_user((char __user *)arg, &karg,
- 				sizeof(struct mpt_ioctl_targetinfo))) {
--		printk(KERN_ERR "%s@%d: mptctl_gettargetinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - "
- 			"Unable to write out mpt_ioctl_targetinfo struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		kfree(pmem);
-@@ -1739,7 +1700,7 @@ data_space_full:
- 	/* Copy the remaining data from kernel memory to user memory
- 	 */
- 	if (copy_to_user(uarg->targetInfo, pmem, numBytes)) {
--		printk(KERN_ERR "%s@%d: mptctl_gettargetinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_gettargetinfo - "
- 			"Unable to write out mpt_ioctl_targetinfo struct @ %p\n",
- 				__FILE__, __LINE__, pdata);
- 		kfree(pmem);
-@@ -1751,70 +1712,6 @@ data_space_full:
- 	return 0;
- }
- 
--#ifdef MPT_SUPPORT_FWDLB_IOCTL
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/*
-- *	mptctl_hba_pciinfo - Obtain all mpt HBAs pci (Config Space) information.
-- *	@arg: User space argument
-- *
-- * Outputs:	None.
-- * Return:	0 if successful
-- *		-EFAULT if data unavailable
-- */
--static int
--mptctl_hba_pciinfo (unsigned long arg)
--{
--	struct mpt_ioctl_hbapciinfo *uarg = (struct mpt_ioctl_hbapciinfo *) arg;
--	struct mpt_ioctl_hbapciinfo karg;
--
--	MPT_ADAPTER	*ioc;
--	int		ioc_num=0, data_size;
--	u8			revision;
--
--	data_size = sizeof(mpt_ioctl_header)+4;
--	/* Clear the struct before filling in data. */
--	memset( &karg, 0, (uarg->hdr.maxDataSize + data_size) );
--
--	dctlprintk((KERN_INFO MYNAM ": Checking for MPT adapters...maxDataSize=%d data_size=%d\n", uarg->hdr.maxDataSize, data_size));
--
--	list_for_each_entry(ioc,&ioc_list,list) {
--		data_size += sizeof (struct mpt_ioctl_mptpciinfo);
--		if ( data_size >= uarg->hdr.maxDataSize ) {
--			dctlprintk((KERN_INFO MYNAM ": data_size=%d >= maxDataSize=%d\n", data_size, uarg->hdr.maxDataSize));
--			break;
--		}
--		karg.hbapciinfo[ioc_num].iocNumber = ioc_num;
--		karg.hbapciinfo[ioc_num].deviceID = ioc->deviceID;
--		karg.hbapciinfo[ioc_num].vendorID = ioc->vendorID;
--
--		pci_read_config_byte(ioc->pcidev, PCI_CLASS_REVISION, &revision);
--
--		karg.hbapciinfo[ioc_num].subSystemVendorID = ioc->pcidev->subsystem_vendor;
--		karg.hbapciinfo[ioc_num].subSystemID = ioc->pcidev->subsystem_device;
--
--		karg.hbapciinfo[ioc_num].revisionID = revision;
--		mpt_GetIocState(ioc, 1);
--		karg.hbapciinfo[ioc_num++].iocState = (ioc->last_state >> MPI_IOC_STATE_SHIFT);
--	}
--
--	karg.totalIOC = ioc_num;
--
--	dctlprintk((KERN_INFO MYNAM ": %d MPT adapters found, arg=%p karg=%p size=%d\n",
--		 karg.totalIOC, (char *)arg, &karg, (int)sizeof(struct mpt_ioctl_hbapciinfo)));
--
--	/* Copy the data from kernel memory to user memory
--	 */
--	if (copy_to_user((char *)arg, &karg, sizeof(struct mpt_ioctl_hbapciinfo))) {
--		printk(KERN_ERR "%s@%d::mptctl_eventquery - "
--			"Unable to write out mpt_ioctl_eventquery struct @ %p\n",
--				__FILE__, __LINE__, (void*)uarg);
--		return -EFAULT;
--	}
--	return 0;
--}
--#endif
--
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /* MPT IOCTL Test function.
-  *
-@@ -1833,7 +1730,7 @@ mptctl_readtest (unsigned long arg)
- 
- 	dctlprintk(("mptctl_readtest called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_test))) {
--		printk(KERN_ERR "%s@%d: mptctl_readtest - "
-+		printk(KERN_ERR "%s@%d::mptctl_readtest - "
- 			"Unable to read in mpt_ioctl_test struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -1863,7 +1760,7 @@ mptctl_readtest (unsigned long arg)
- 	/* Copy the data from kernel memory to user memory
- 	 */
- 	if (copy_to_user((char __user *)arg, &karg, sizeof(struct mpt_ioctl_test))) {
--		printk(KERN_ERR "%s@%d: mptctl_readtest - "
-+		printk(KERN_ERR "%s@%d::mptctl_readtest - "
- 			"Unable to write out mpt_ioctl_test struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -1893,7 +1790,7 @@ mptctl_eventquery (unsigned long arg)
- 
- 	dctlprintk(("mptctl_eventquery called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventquery))) {
--		printk(KERN_ERR "%s@%d: mptctl_eventquery - "
-+		printk(KERN_ERR "%s@%d::mptctl_eventquery - "
- 			"Unable to read in mpt_ioctl_eventquery struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -1912,7 +1809,7 @@ mptctl_eventquery (unsigned long arg)
- 	/* Copy the data from kernel memory to user memory
- 	 */
- 	if (copy_to_user((char __user *)arg, &karg, sizeof(struct mpt_ioctl_eventquery))) {
--		printk(KERN_ERR "%s@%d: mptctl_eventquery - "
-+		printk(KERN_ERR "%s@%d::mptctl_eventquery - "
- 			"Unable to write out mpt_ioctl_eventquery struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -1931,7 +1828,7 @@ mptctl_eventenable (unsigned long arg)
- 
- 	dctlprintk(("mptctl_eventenable called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventenable))) {
--		printk(KERN_ERR "%s@%d: mptctl_eventenable - "
-+		printk(KERN_ERR "%s@%d::mptctl_eventenable - "
- 			"Unable to read in mpt_ioctl_eventenable struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -1978,7 +1875,7 @@ mptctl_eventreport (unsigned long arg)
- 
- 	dctlprintk(("mptctl_eventreport called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_eventreport))) {
--		printk(KERN_ERR "%s@%d: mptctl_eventreport - "
-+		printk(KERN_ERR "%s@%d::mptctl_eventreport - "
- 			"Unable to read in mpt_ioctl_eventreport struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -2010,7 +1907,7 @@ mptctl_eventreport (unsigned long arg)
- 	 */
- 	numBytes = max * sizeof(MPT_IOCTL_EVENTS);
- 	if (copy_to_user(uarg->eventData, ioc->events, numBytes)) {
--		printk(KERN_ERR "%s@%d: mptctl_eventreport - "
-+		printk(KERN_ERR "%s@%d::mptctl_eventreport - "
- 			"Unable to write out mpt_ioctl_eventreport struct @ %p\n",
- 				__FILE__, __LINE__, ioc->events);
- 		return -EFAULT;
-@@ -2031,7 +1928,7 @@ mptctl_replace_fw (unsigned long arg)
- 
- 	dctlprintk(("mptctl_replace_fw called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_replace_fw))) {
--		printk(KERN_ERR "%s@%d: mptctl_replace_fw - "
-+		printk(KERN_ERR "%s@%d::mptctl_replace_fw - "
- 			"Unable to read in mpt_ioctl_replace_fw struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -2067,7 +1964,7 @@ mptctl_replace_fw (unsigned long arg)
- 	/* Copy the data from user memory to kernel space
- 	 */
- 	if (copy_from_user(ioc->cached_fw, uarg->newImage, newFwSize)) {
--		printk(KERN_ERR "%s@%d: mptctl_replace_fw - "
-+		printk(KERN_ERR "%s@%d::mptctl_replace_fw - "
- 			"Unable to read in mpt_ioctl_replace_fw image @ %p\n",
- 			__FILE__, __LINE__, uarg);
- 		mpt_free_fw_memory(ioc);
-@@ -2104,7 +2001,7 @@ mptctl_mpt_command (unsigned long arg)
- 	dctlprintk(("mptctl_command called.\n"));
- 
- 	if (copy_from_user(&karg, uarg, sizeof(struct mpt_ioctl_command))) {
--		printk(KERN_ERR "%s@%d: mptctl_mpt_command - "
-+		printk(KERN_ERR "%s@%d::mptctl_mpt_command - "
- 			"Unable to read in mpt_ioctl_command struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -2149,11 +2046,10 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 	int		iocnum, flagsLength;
- 	int		sz, rc = 0;
- 	int		msgContext;
--	u16		req_idx=0;
-+	u16		req_idx;
- 	ulong 		timeout;
--        MPT_FRAME_HDR   *SAS_handshake_mf=NULL;
--        char            *SAS_handshake_reply=NULL;
--        u16             msgSize=0;
-+
-+	dctlprintk(("mptctl_do_mpt_command called.\n"));
- 	bufIn.kptr = bufOut.kptr = NULL;
- 
- 	if (((iocnum = mpt_verify_adapter(karg.hdr.iocnum, &ioc)) < 0) ||
-@@ -2162,14 +2058,13 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 				iocnum));
- 		return -ENODEV;
- 	}
--	dctlprintk(("ioc%d: mptctl_do_mpt_command called.\n", iocnum));
- 	if (!ioc->ioctl) {
--		printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+		printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 			"No memory available during driver init.\n",
- 				__FILE__, __LINE__);
- 		return -ENOMEM;
- 	} else if (ioc->ioctl->status & MPT_IOCTL_STATUS_DID_IOCRESET) {
--		printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+		printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 			"Busy with IOC Reset \n", __FILE__, __LINE__);
- 		return -EBUSY;
- 	}
-@@ -2183,7 +2078,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 		sz += sizeof(dma_addr_t) + sizeof(u32);
- 
- 	if (sz > ioc->req_sz) {
--		printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+		printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 			"Request frame too large (%d) maximum (%d)\n",
- 				__FILE__, __LINE__, sz, ioc->req_sz);
- 		return -EFAULT;
-@@ -2191,44 +2086,18 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 
- 	/* Get a free request frame and save the message context.
- 	 */
--	if (((MPIHeader_t *)(mfPtr))->MsgContext == 0x02012020) {
--		msgSize = karg.hdr.port >> 16;
--		if ( (mf = (MPT_FRAME_HDR *)kmalloc(msgSize, GFP_KERNEL)) == NULL) {
--			dfailprintk(("%s: mptctl_do_mpt_command, Unable to kmalloc msgSize=%d for SAS_handshake!!\n",
--			ioc->name, msgSize));
--			return -ENOMEM;
--		}
--		SAS_handshake_mf = mf;
--		if (karg.maxReplyBytes) {
--			if ( (SAS_handshake_reply = (char *)kmalloc(karg.maxReplyBytes, GFP_KERNEL)) == NULL) {
--				kfree(SAS_handshake_mf);
--				dfailprintk(("%s: mptctl_do_mpt_command, Unable to kmalloc maxReplyBytes=%d for SAS_handshake!!\n",
--					ioc->name, karg.maxReplyBytes));
--				return -ENOMEM;
--			}
--		}
--		hdr = (MPIHeader_t *) mf;
--		msgContext = le32_to_cpu(0x02012020);
--		karg.hdr.port &= 0x0000ffff;
--	} else {
--		if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL) {
--			dfailprintk((MYIOC_s_WARN_FMT "%s: no msg frames!!\n",
--			    ioc->name,__FUNCTION__));
--			return -EAGAIN;
--		} else {
--			hdr = (MPIHeader_t *) mf;
--			msgContext = le32_to_cpu(hdr->MsgContext);
--			req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--		}
--	}
-+        if ((mf = mpt_get_msg_frame(mptctl_id, ioc)) == NULL)
-+                return -EAGAIN;
- 
-+	hdr = (MPIHeader_t *) mf;
-+	msgContext = le32_to_cpu(hdr->MsgContext);
-+	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
- 
--//@@@@@
- 	/* Copy the request frame
- 	 * Reset the saved message context.
- 	 */
- 	if (copy_from_user(mf, mfPtr, karg.dataSgeOffset * 4)) {
--		printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+		printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 			"Unable to read MF from mpt_ioctl_command struct @ %p\n",
- 			__FILE__, __LINE__, mfPtr);
- 		rc = -EFAULT;
-@@ -2259,34 +2128,17 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 	case MPI_FUNCTION_SCSI_IO_REQUEST:
- 		if (ioc->sh) {
- 			SCSIIORequest_t *pScsiReq = (SCSIIORequest_t *) mf;
--			struct _MPT_DEVICE	*pMptTarget;
- 			VirtDevice	*pTarget = NULL;
- 			MPT_SCSI_HOST	*hd = NULL;
- 			int qtag = MPI_SCSIIO_CONTROL_UNTAGGED;
- 			int scsidir = 0;
--			int id = (int) pScsiReq->TargetID;
--			int bus = (int) pScsiReq->Bus;
-+			int target = (int) pScsiReq->TargetID;
- 			int dataSize;
- 
--			if ((id < 0) || (id > ioc->DevicesPerBus)) {
--				printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
--					"Target ID=%d out of bounds.  DevicesPerBus=%d\n",
--					__FILE__, __LINE__, id, ioc->DevicesPerBus);
--				rc = -ENODEV;
--				goto done_free_mem;
--			}
--
--			if ((bus < 0) || (bus >= ioc->NumberOfBuses)) {
--				printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
--					"Target Bus=%d out of bounds.  NumberOfBuses=%d\n",
--					__FILE__, __LINE__, bus, ioc->NumberOfBuses);
--				rc = -ENODEV;
--				goto done_free_mem;
--			}
--			if ((pMptTarget = ioc->Target_List[bus]) == NULL) {
--				printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
--					"Target_List=NULL for %s bus=%d\n",
--					__FILE__, __LINE__, ioc->name, bus);
-+			if ((target < 0) || (target >= ioc->sh->max_id)) {
-+				printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
-+					"Target ID out of bounds. \n",
-+					__FILE__, __LINE__);
- 				rc = -ENODEV;
- 				goto done_free_mem;
- 			}
-@@ -2310,7 +2162,8 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 				   + (req_idx * MPT_SENSE_BUFFER_ALLOC));
- 
- 			if ((hd = (MPT_SCSI_HOST *) ioc->sh->hostdata)) {
--				pTarget = pMptTarget->Target[id];
-+				if (hd->Targets)
-+					pTarget = hd->Targets[target];
- 			}
- 
- 			if (pTarget &&(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES))
-@@ -2331,10 +2184,10 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 			pScsiReq->DataLength = cpu_to_le32(dataSize);
- 
- 			ioc->ioctl->reset = MPTCTL_RESET_OK;
--			ioc->ioctl->id = id;
-+			ioc->ioctl->target = target;
- 
- 		} else {
--			printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+			printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 				"SCSI driver is not loaded. \n",
- 					__FILE__, __LINE__);
- 			rc = -EFAULT;
-@@ -2353,7 +2206,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 
- 	case MPI_FUNCTION_SATA_PASSTHROUGH:
- 		if (!ioc->sh) {
--			printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+			printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 				"SCSI driver is not loaded. \n",
- 					__FILE__, __LINE__);
- 			rc = -EFAULT;
-@@ -2409,10 +2262,9 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 			pScsiReq->DataLength = cpu_to_le32(dataSize);
- 
- 			ioc->ioctl->reset = MPTCTL_RESET_OK;
--			ioc->ioctl->id = pScsiReq->TargetID;
--			ioc->ioctl->bus = pScsiReq->Bus;
-+			ioc->ioctl->target = pScsiReq->TargetID;
- 		} else {
--			printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+			printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 				"SCSI driver is not loaded. \n",
- 					__FILE__, __LINE__);
- 			rc = -EFAULT;
-@@ -2424,7 +2276,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 		{
- 			MPT_SCSI_HOST *hd = NULL;
- 			if ((ioc->sh == NULL) || ((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL)) {
--				printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+				printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 					"SCSI driver not loaded or SCSI host not found. \n",
- 					__FILE__, __LINE__);
- 				rc = -EFAULT;
-@@ -2457,7 +2309,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 				(pInit->ReplyFrameSize != cpu_to_le16(ioc->reply_sz)) ||
- 				(pInit->HostMfaHighAddr != high_addr) ||
- 				(pInit->SenseBufferHighAddr != sense_high)) {
--				printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+				printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 					"IOC_INIT issued with 1 or more incorrect parameters. Rejected.\n",
- 					__FILE__, __LINE__);
- 				rc = -EFAULT;
-@@ -2490,7 +2342,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 		 	MPI_FUNCTION_LAN_RESET
- 		*/
- 
--		printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+		printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 			"Illegal request (function 0x%x) \n",
- 			__FILE__, __LINE__, hdr->Function);
- 		rc = -EFAULT;
-@@ -2550,7 +2402,7 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 						karg.dataOutBufPtr,
- 						bufOut.len)) {
- 					printk(KERN_ERR
--						"%s@%d: mptctl_do_mpt_command - Unable "
-+						"%s@%d::mptctl_do_mpt_command - Unable "
- 						"to read user data "
- 						"struct @ %p\n",
- 						__FILE__, __LINE__,karg.dataOutBufPtr);
-@@ -2561,7 +2413,16 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 		}
- 
- 		if (karg.dataInSize > 0) {
--			flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
-+			if ((karg.dataOutSize > 0) &&
-+			    (hdr->Function == MPI_FUNCTION_SMP_PASSTHROUGH)){
-+				flagsLength = ( MPI_SGE_FLAGS_SIMPLE_ELEMENT |
-+						MPI_SGE_FLAGS_END_OF_BUFFER |
-+						MPI_SGE_FLAGS_DIRECTION |
-+						mpt_addr_size() )
-+						<< MPI_SGE_FLAGS_SHIFT;
-+			} else {
-+				flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ;
-+			}
- 			flagsLength |= karg.dataInSize;
- 
- 			bufIn.len = karg.dataInSize;
-@@ -2585,14 +2446,13 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 	}
- 
- 	ioc->ioctl->wait_done = 0;
--	INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--
- 	if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT) {
- 
- 		DBG_DUMP_TM_REQUEST_FRAME((u32 *)mf);
- 
- 		if (mpt_send_handshake_request(mptctl_id, ioc,
--		    sizeof(SCSITaskMgmt_t), (u32*)mf,10, CAN_SLEEP) != 0) {
-+			sizeof(SCSITaskMgmt_t), (u32*)mf,
-+			CAN_SLEEP) != 0) {
- 			dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!"
- 				" (ioc %p, mf %p) \n", ioc->name,
- 				ioc, mf));
-@@ -2600,73 +2460,27 @@ mptctl_do_mpt_command (struct mpt_ioctl_
- 			rc = -ENODATA;
- 			goto done_free_mem;
- 		}
--timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT;
--timeout = wait_event_timeout(mptctl_wait,ioc->ioctl->wait_done == 1,HZ*timeout);
- 
-- if(timeout <=0 && (ioc->ioctl->wait_done != 1 )) {
--               /* Now we need to reset the board */
--                       mptctl_free_tm_flags(ioc);
--                       mptctl_timeout_expired(ioc->ioctl);
--                       rc = -ENODATA;
--                       goto done_free_mem;
--               }
--} else {
--               if ( SAS_handshake_mf ) {
--                       dctlprintk(("SAS_handshake_message Function=%x\n",
--                               hdr->Function));
--
--                       timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT;
--                       rc = mpt_handshake_req_reply_wait(ioc,
--                               msgSize,
--                               (u32*)SAS_handshake_mf,
--                              karg.maxReplyBytes,
--                              (u16*)SAS_handshake_reply, timeout /*seconds*/,
--                               CAN_SLEEP);
--                       kfree(SAS_handshake_mf);
--                       SAS_handshake_mf = NULL;
--              if (rc == 0) {
--              dctlprintk(("SAS_handshake_message Function=%x completed successfully\n",
--                               hdr->Function));
--                               sz = karg.maxReplyBytes;
--                               if (sz > 0) {
--                    if (copy_to_user((char *)karg.replyFrameBufPtr,SAS_handshake_reply, sz)){
--printk(KERN_ERR "%s@%d::mptctl_do_mpt_command -" "Unable to write out reply frame %p\n",__FILE__, __LINE__, (void*)karg.replyFrameBufPtr);
--                               rc =  -ENODATA;
--                              }
--                       }else {
--
--                                rc =  -ENODATA;
--                               dctlprintk(("SAS_handshake_message failed sz=%d\n", sz));
--                                }
--                               kfree(SAS_handshake_reply);
--                               SAS_handshake_reply = NULL;
--                               goto done_free_mem;
--                             }
--                            else
--                            {
--                               rc = -ENODATA;
--                               kfree(SAS_handshake_reply);
--                               SAS_handshake_reply = NULL;
--                               goto done_free_mem;
--                            }
--                         }else {
--                               mpt_put_msg_frame(mptctl_id, ioc, mf);
--                       /* Now wait for the command to complete */
--                       timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT;
--                       timeout = wait_event_timeout(mptctl_wait,
--                        ioc->ioctl->wait_done == 1,
--                            HZ*timeout);
-+	} else
-+		mpt_put_msg_frame(mptctl_id, ioc, mf);
- 
--                if(timeout <=0 && (ioc->ioctl->wait_done != 1 )) {
-+	/* Now wait for the command to complete */
-+	timeout = (karg.timeout > 0) ? karg.timeout : MPT_IOCTL_DEFAULT_TIMEOUT;
-+	timeout = wait_event_timeout(mptctl_wait,
-+	     ioc->ioctl->wait_done == 1,
-+	     HZ*timeout);
- 
-+	if(timeout <=0 && (ioc->ioctl->wait_done != 1 )) {
- 	/* Now we need to reset the board */
- 
-+		if (hdr->Function == MPI_FUNCTION_SCSI_TASK_MGMT)
-+			mptctl_free_tm_flags(ioc);
-+
- 		mptctl_timeout_expired(ioc->ioctl);
- 		rc = -ENODATA;
- 		goto done_free_mem;
--	       }
--       }
--}
-+	}
-+
- 
- 	mf = NULL;
- 
-@@ -2684,7 +2498,7 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co
- 			if (copy_to_user(karg.replyFrameBufPtr,
- 				 &ioc->ioctl->ReplyFrame, sz)){
- 
--				 printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+				 printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 				 "Unable to write out reply frame %p\n",
- 				 __FILE__, __LINE__, karg.replyFrameBufPtr);
- 				 rc =  -ENODATA;
-@@ -2699,7 +2513,7 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co
- 		sz = min(karg.maxSenseBytes, MPT_SENSE_BUFFER_SIZE);
- 		if (sz > 0) {
- 			if (copy_to_user(karg.senseDataPtr, ioc->ioctl->sense, sz)) {
--				printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+				printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 				"Unable to write sense data to user %p\n",
- 				__FILE__, __LINE__,
- 				karg.senseDataPtr);
-@@ -2716,7 +2530,7 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co
- 				(karg.dataInSize > 0) && (bufIn.kptr)) {
- 		if (copy_to_user(karg.dataInBufPtr,
- 			 bufIn.kptr, karg.dataInSize)) {
--			printk(KERN_ERR "%s@%d: mptctl_do_mpt_command - "
-+			printk(KERN_ERR "%s@%d::mptctl_do_mpt_command - "
- 				"Unable to write data to user %p\n",
- 				__FILE__, __LINE__,
- 				karg.dataInBufPtr);
-@@ -2726,6 +2540,10 @@ printk(KERN_ERR "%s@%d::mptctl_do_mpt_co
- 
- done_free_mem:
- 
-+	ioc->ioctl->status &= ~(MPT_IOCTL_STATUS_COMMAND_GOOD |
-+		MPT_IOCTL_STATUS_SENSE_VALID |
-+		MPT_IOCTL_STATUS_RF_VALID );
-+
- 	/* Free the allocated memory.
- 	 */
- 	 if (bufOut.kptr != NULL) {
-@@ -2738,14 +2556,6 @@ done_free_mem:
- 			bufIn.len, (void *) bufIn.kptr, dma_addr_in);
- 	}
- 
--if (SAS_handshake_mf) {
--		kfree(SAS_handshake_mf);
--		mf=NULL;
--	}
--if (SAS_handshake_reply)
--		kfree(SAS_handshake_reply);
--
--
- 	/* mf is null if command issued successfully
- 	 * otherwise, failure occured after mf acquired.
- 	 */
-@@ -2792,7 +2602,7 @@ mptctl_hp_hostinfo(unsigned long arg, un
- 		return -EFAULT;
- 
- 	if (copy_from_user(&karg, uarg, sizeof(hp_host_info_t))) {
--		printk(KERN_ERR "%s@%d: mptctl_hp_host_info - "
-+		printk(KERN_ERR "%s@%d::mptctl_hp_host_info - "
- 			"Unable to read in hp_host_info struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -2914,8 +2724,6 @@ mptctl_hp_hostinfo(unsigned long arg, un
- 	    (MPT_SGE_FLAGS_SSIMPLE_READ|4), buf_dma);
- 
- 	ioc->ioctl->wait_done = 0;
--	INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--
- 	mpt_put_msg_frame(mptctl_id, ioc, mf);
- 
- 	rc = wait_event_timeout(mptctl_wait,
-@@ -2947,7 +2755,7 @@ mptctl_hp_hostinfo(unsigned long arg, un
- 	/* Copy the data from kernel memory to user memory
- 	 */
- 	if (copy_to_user((char __user *)arg, &karg, sizeof(hp_host_info_t))) {
--		printk(KERN_ERR "%s@%d: mptctl_hpgethostinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_hpgethostinfo - "
- 			"Unable to write out hp_host_info @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -2986,7 +2794,7 @@ mptctl_hp_targetinfo(unsigned long arg)
- 
- 	dctlprintk(("mptctl_hp_targetinfo called.\n"));
- 	if (copy_from_user(&karg, uarg, sizeof(hp_target_info_t))) {
--		printk(KERN_ERR "%s@%d: mptctl_hp_targetinfo - "
-+		printk(KERN_ERR "%s@%d::mptctl_hp_targetinfo - "
- 			"Unable to read in hp_host_targetinfo struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -3097,7 +2905,7 @@ mptctl_hp_targetinfo(unsigned long arg)
- 	/* Copy the data from kernel memory to user memory
- 	 */
- 	if (copy_to_user((char __user *)arg, &karg, sizeof(hp_target_info_t))) {
--		printk(KERN_ERR "%s@%d: mptctl_hp_target_info - "
-+		printk(KERN_ERR "%s@%d::mptctl_hp_target_info - "
- 			"Unable to write out mpt_ioctl_targetinfo struct @ %p\n",
- 				__FILE__, __LINE__, uarg);
- 		return -EFAULT;
-@@ -3231,8 +3039,6 @@ allocDiagBuffer:
- 	DiagBufferPostRequest->BufferAddress.Low = cpu_to_le32(tmp);
- 
- 	ioc->ioctl->wait_done = 0;
--	INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--
- 	mpt_put_msg_frame(mptctl_id, ioc, mf);
- 
- 	/* Now wait for the command to complete */
-@@ -3275,6 +3081,10 @@ allocDiagBuffer:
- 
- mptctl_register_diag_buffer_out:
- 
-+	ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED |
-+	    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+	    MPT_IOCTL_STATUS_RF_VALID );
-+
- 	if ( rc ) {
- 		pci_free_consistent(ioc->pcidev, request_data_sz,
- 			request_data,
-@@ -3371,8 +3181,6 @@ mptctl_release_diag_buffer (unsigned lon
- 	DiagRelease->MsgFlags = 0;
- 
- 	ioc->ioctl->wait_done = 0;
--	INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--
- 	mpt_put_msg_frame(mptctl_id, ioc, mf);
- 
- 	/* Now wait for the command to complete */
-@@ -3410,6 +3218,10 @@ mptctl_release_diag_buffer (unsigned lon
- 
- mptctl_release_diag_buffer_out:
- 
-+	ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED |
-+	    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+	    MPT_IOCTL_STATUS_RF_VALID);
-+
- 	return rc;
- }
- 
-@@ -3706,8 +3518,6 @@ mptctl_read_diag_buffer (unsigned long a
- 		DiagBufferPostRequest->BufferAddress.Low = cpu_to_le32(tmp);
- 
- 		ioc->ioctl->wait_done = 0;
--		INITIALIZE_IOCTL_STATUS(ioc->ioctl->status)
--
- 		mpt_put_msg_frame(mptctl_id, ioc, mf);
- 
- 		/* Now wait for the command to complete */
-@@ -3746,8 +3556,14 @@ mptctl_read_diag_buffer (unsigned long a
- 				ioc->ioctl->status));
- 			rc = -EFAULT;
- 		}
--	}
-+
- mptctl_read_diag_buffer_out:
-+
-+		ioc->ioctl->status &= ~( MPT_IOCTL_STATUS_TM_FAILED |
-+		    MPT_IOCTL_STATUS_COMMAND_GOOD | MPT_IOCTL_STATUS_SENSE_VALID |
-+		    MPT_IOCTL_STATUS_RF_VALID);
-+
-+	}
- 	return rc;
- }
- 
-@@ -3796,7 +3612,7 @@ compat_mptctl_ioctl(unsigned int fd, uns
- 	int ret;
- 
- 	lock_kernel();
--	dctlprintk((KERN_INFO MYNAM ": compat_mptctl_ioctl() called\n"));
-+	dctlprintk((KERN_INFO MYNAM "::compat_mptctl_ioctl() called\n"));
- 	ret = mptctl_ioctl(filp->f_dentry->d_inode, filp, cmd, arg);
- 	unlock_kernel();
- 	return ret;
-@@ -3820,7 +3636,7 @@ compat_mptfwxfer_ioctl(struct file *filp
- 	int nonblock = (filp->f_flags & O_NONBLOCK);
- 	int ret;
- 
--	dctlprintk((KERN_INFO MYNAM ": compat_mptfwxfer_ioctl() called\n"));
-+	dctlprintk((KERN_INFO MYNAM "::compat_mptfwxfer_ioctl() called\n"));
- 
- 	if (copy_from_user(&kfw32, (char __user *)arg, sizeof(kfw32)))
- 		return -EFAULT;
-@@ -3829,7 +3645,7 @@ compat_mptfwxfer_ioctl(struct file *filp
- 	iocnumX = kfw32.iocnum & 0xFF;
- 	if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
- 	    (iocp == NULL)) {
--		dctlprintk((KERN_ERR MYNAM ": compat_mptfwxfer_ioctl @%d - ioc%d not found!\n",
-+		dctlprintk((KERN_ERR MYNAM "::compat_mptfwxfer_ioctl @%d - ioc%d not found!\n",
- 				__LINE__, iocnumX));
- 		return -ENODEV;
- 	}
-@@ -3866,7 +3682,7 @@ compat_mpt_command(struct file *filp, un
- 	int nonblock = (filp->f_flags & O_NONBLOCK);
- 	int ret;
- 
--	dctlprintk((KERN_INFO MYNAM ": compat_mpt_command() called\n"));
-+	dctlprintk((KERN_INFO MYNAM "::compat_mpt_command() called\n"));
- 
- 	if (copy_from_user(&karg32, (char __user *)arg, sizeof(karg32)))
- 		return -EFAULT;
-@@ -3875,7 +3691,7 @@ compat_mpt_command(struct file *filp, un
- 	iocnumX = karg32.hdr.iocnum & 0xFF;
- 	if (((iocnum = mpt_verify_adapter(iocnumX, &iocp)) < 0) ||
- 	    (iocp == NULL)) {
--		dctlprintk((KERN_ERR MYNAM ": compat_mpt_command @%d - ioc%d not found!\n",
-+		dctlprintk((KERN_ERR MYNAM "::compat_mpt_command @%d - ioc%d not found!\n",
- 				__LINE__, iocnumX));
- 		return -ENODEV;
- 	}
-@@ -4087,14 +3903,6 @@ static int __init mptctl_init(void)
- 	if (++where && err) goto out_fail;
- 	err = register_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_CONFIG, compat_mptctl_ioctl);
- 	if (++where && err) goto out_fail;
--	err = register_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_FEATURES, compat_mptctl_ioctl);
--	if (++where && err) goto out_fail;
--	err = register_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_CONTROL, compat_mptctl_ioctl);
--	if (++where && err) goto out_fail;
--	err = register_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_ELEMENT, compat_mptctl_ioctl);
--	if (++where && err) goto out_fail;
--	err = register_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_OPERATION, compat_mptctl_ioctl);
--	if (++where && err) goto out_fail;
- 	err = register_ioctl32_conversion(CC_CSMI_SAS_SET_PHY_INFO, compat_mptctl_ioctl);
- 	if (++where && err) goto out_fail;
- 	err = register_ioctl32_conversion(CC_CSMI_SAS_STP_PASSTHRU, compat_mptctl_ioctl);
-@@ -4185,10 +3993,6 @@ out_fail:
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_FIRMWARE_DOWNLOAD);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_INFO);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_CONFIG);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_FEATURES);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_CONTROL);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_ELEMENT);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_OPERATION);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_SET_PHY_INFO);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_STP_PASSTHRU);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_TASK_MANAGEMENT);
-@@ -4260,10 +4064,6 @@ static void mptctl_exit(void)
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_FIRMWARE_DOWNLOAD);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_INFO);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_CONFIG);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_FEATURES);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_CONTROL);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_GET_RAID_ELEMENT);
--	unregister_ioctl32_conversion(CC_CSMI_SAS_SET_RAID_OPERATION);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_SET_PHY_INFO);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_STP_PASSTHRU);
- 	unregister_ioctl32_conversion(CC_CSMI_SAS_TASK_MANAGEMENT);
-@@ -4277,7 +4077,7 @@ static void mptctl_exit(void)
- }
- 
- #if defined(CPQ_CIM)
--#include "csmi/csmisas.c"
-+#include "csmisas.c"
- #endif // CPQ_CIM
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.h linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptctl.h	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptctl.h	2007-11-02 09:10:23.000000000 +0100
-@@ -5,8 +5,8 @@
-  *          LSIFC9xx/LSI409xx Fibre Channel
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  *  $Id: mptctl.h,v 1.14 2003/03/18 22:49:51 Exp $
-  */
-@@ -59,6 +59,7 @@
-  */
- #define MPT_MISCDEV_BASENAME            "mptctl"
- #define MPT_MISCDEV_PATHNAME            "/dev/" MPT_MISCDEV_BASENAME
-+#define MPT_CSMI_DESCRIPTION	        "LSI Logic Corporation: Fusion MPT Driver "MPT_LINUX_VERSION_COMMON
- 
- #define MPT_PRODUCT_LENGTH              12
- 
-@@ -94,16 +95,6 @@
- #define MPTDIAGQUERY		_IOWR(MPT_MAGIC_NUMBER,29,mpt_diag_query_t)
- #define MPTDIAGREADBUFFER	_IOWR(MPT_MAGIC_NUMBER,30,mpt_diag_read_buffer_t)
- 
--#ifdef MPT_SUPPORT_FWDLB_IOCTL
--#define MPTHBAPCIINFO		_IOWR(MPT_MAGIC_NUMBER,31,struct mpt_ioctl_hbapciinfo)
--#endif
--
--
--#define INITIALIZE_IOCTL_STATUS(status) \
--	status &= ~( MPT_IOCTL_STATUS_COMMAND_GOOD \
--	| MPT_IOCTL_STATUS_SENSE_VALID \
--	| MPT_IOCTL_STATUS_RF_VALID);
--
- /*
-  * SPARC PLATFORM REMARKS:
-  * IOCTL data structures that contain pointers
-@@ -314,28 +305,6 @@ typedef struct mpt_ioctl_replace_fw {
- 	u8		 newImage[1];
- } mpt_ioctl_replace_fw_t;
- 
--#ifdef MPT_SUPPORT_FWDLB_IOCTL
--struct mpt_ioctl_mptpciinfo {
--    U8  iocNumber;
--    U8  iocState;
--    U8  revisionID;
--    U8  reserved1;
--    U16 vendorID;
--    U16 deviceID;
--    U16 subSystemVendorID;
--    U16 subSystemID;
--};
--
--
--struct mpt_ioctl_hbapciinfo {
--	mpt_ioctl_header     hdr;
--    U8                   totalIOC;
--    U8                   reserved[3];
--    struct mpt_ioctl_mptpciinfo hbapciinfo[18];
--};
--#endif
--
--
- /* General MPT Pass through data strucutre
-  *
-  * iocnum
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptfc.c linux-2.6.9-55.0.12/drivers/message/fusion/mptfc.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptfc.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptfc.c	2007-11-02 09:10:23.000000000 +0100
-@@ -3,8 +3,8 @@
-  *      For use with LSI Logic PCI chip/adapter(s)
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -74,7 +74,6 @@
- MODULE_AUTHOR(MODULEAUTHOR);
- MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
--MODULE_VERSION(my_VERSION);
- 
- /* Command line args */
- static int mpt_pq_filter = 0;
-@@ -131,7 +130,7 @@ static struct scsi_host_template mptfc_d
- 	.bios_param			= mptscsih_bios_param,
- 	.can_queue			= MPT_FC_CAN_QUEUE,
- 	.this_id			= -1,
--	.sg_tablesize			= CONFIG_FUSION_MAX_SGE,
-+	.sg_tablesize			= MPT_SCSI_SG_DEPTH,
- 	.max_sectors			= 8192,
- 	.cmd_per_lun			= 7,
- 	.use_clustering			= ENABLE_CLUSTERING,
-@@ -161,8 +160,6 @@ static struct pci_device_id mptfc_pci_ta
- 		PCI_ANY_ID, PCI_ANY_ID },
- 	{ PCI_VENDOR_ID_LSI_LOGIC, MPI_MANUFACTPAGE_DEVICEID_FC949E,
- 		PCI_ANY_ID, PCI_ANY_ID },
--        { 0x1657, MPI_MANUFACTPAGE_DEVICEID_FC949E,
--                PCI_ANY_ID, PCI_ANY_ID },
- 	{0}	/* Terminating entry */
- };
- MODULE_DEVICE_TABLE(pci, mptfc_pci_table);
-@@ -184,6 +181,8 @@ mptfc_probe(struct pci_dev *pdev, const 
- 	MPT_ADAPTER 		*ioc;
- 	unsigned long		 flags;
- 	int			 sz, ii;
-+	int			 numSGE = 0;
-+	int			 scale;
- 	int			 ioc_cap;
- 	u8			*mem;
- 	int			error=0;
-@@ -262,16 +261,46 @@ mptfc_probe(struct pci_dev *pdev, const 
- 		ioc->name, mpt_can_queue, ioc->req_depth,
- 		sh->can_queue));
- 
--	sh->max_id = ioc->DevicesPerBus;
-+	sh->max_id = MPT_MAX_FC_DEVICES<256 ? MPT_MAX_FC_DEVICES : 255;
- 
- 	sh->max_lun = MPT_LAST_LUN + 1;
--	sh->max_channel = ioc->NumberOfBuses - 1;
-+	sh->max_channel = 0;
- 	sh->this_id = ioc->pfacts[0].PortSCSIID;
- 
-+
- 	/* Required entry.
- 	 */
- 	sh->unique_id = ioc->id;
--	sh->sg_tablesize = ioc->sg_tablesize;
-+
-+	/* Verify that we won't exceed the maximum
-+	 * number of chain buffers
-+	 * We can optimize:  ZZ = req_sz/sizeof(SGE)
-+	 * For 32bit SGE's:
-+	 *  numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ
-+	 *               + (req_sz - 64)/sizeof(SGE)
-+	 * A slightly different algorithm is required for
-+	 * 64bit SGEs.
-+	 */
-+	scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
-+	if (sizeof(dma_addr_t) == sizeof(u64)) {
-+		numSGE = (scale - 1) *
-+		  (ioc->facts.MaxChainDepth-1) + scale +
-+		  (ioc->req_sz - 60) / (sizeof(dma_addr_t) +
-+		  sizeof(u32));
-+	} else {
-+		numSGE = 1 + (scale - 1) *
-+		  (ioc->facts.MaxChainDepth-1) + scale +
-+		  (ioc->req_sz - 64) / (sizeof(dma_addr_t) +
-+		  sizeof(u32));
-+	}
-+
-+	if (numSGE < sh->sg_tablesize) {
-+		/* Reset this value */
-+		dprintk((MYIOC_s_INFO_FMT
-+		  "Resetting sg_tablesize to %d from %d\n",
-+		  ioc->name, numSGE, sh->sg_tablesize));
-+		sh->sg_tablesize = numSGE;
-+	}
- 
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	/* Set the pci device pointer in Scsi_Host structure.
-@@ -300,24 +329,23 @@ mptfc_probe(struct pci_dev *pdev, const 
- 	dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n",
- 		 ioc->name, hd->ScsiLookup, sz));
- 
--	for (ii=0; ii < ioc->NumberOfBuses; ii++) {
--		/* Allocate memory for the device structures.
--		 * A non-Null pointer at an offset
--		 * indicates a device exists.
--		 */
--		sz = ioc->DevicesPerBus * sizeof(void *);
--		mem = kmalloc(sz, GFP_ATOMIC);
--		if (mem == NULL) {
--			error = -ENOMEM;
--			goto out_mptfc_probe;
--		}
-+	/* Allocate memory for the device structures.
-+	 * A non-Null pointer at an offset
-+	 * indicates a device exists.
-+	 * max_id = 1 + maximum id (hosts.h)
-+	 */
-+	sz = sh->max_id * sizeof(void *);
-+	mem = kmalloc(sz, GFP_ATOMIC);
-+	if (mem == NULL) {
-+		error = -ENOMEM;
-+		goto out_mptfc_probe;
-+	}
- 
--		memset(mem, 0, sz);
--		ioc->Target_List[ii] = (struct _MPT_DEVICE *) mem;
-+	memset(mem, 0, sz);
-+	hd->Targets = (VirtDevice **) mem;
- 
--		dinitprintk((KERN_INFO
--		  " For Bus=%d, Target_List=%p sz=%d\n", ii, mem, sz));
--	}
-+	dprintk((KERN_INFO
-+	  "  Targets @ %p, sz=%d\n", hd->Targets, sz));
- 
- 	/* Clear the TM flags
- 	 */
-@@ -333,17 +361,13 @@ mptfc_probe(struct pci_dev *pdev, const 
- 	 */
- 	hd->cmdPtr = NULL;
- 
--	/* Initialize this IOC's timers
-+	/* Initialize this SCSI Hosts' timers
- 	 * To use, set the timer expires field
--	 * and add_timer. Used for internally
--         * generated commands.
-+	 * and add_timer
- 	 */
--        init_timer(&hd->InternalCmdTimer);
--	hd->InternalCmdTimer.data = (unsigned long) hd;
--	hd->InternalCmdTimer.function = mptscsih_InternalCmdTimer_expired;
--        init_timer(&ioc->TMtimer);
--	ioc->TMtimer.data = (unsigned long) ioc;
--	ioc->TMtimer.function = mptscsih_TM_timeout;
-+	init_timer(&hd->timer);
-+	hd->timer.data = (unsigned long) hd;
-+	hd->timer.function = mptscsih_timer_expired;
- 
- 	hd->mpt_pq_filter = mpt_pq_filter;
- 
-@@ -356,9 +380,6 @@ mptfc_probe(struct pci_dev *pdev, const 
- 	hd->scandv_wait_done = 0;
- 	hd->last_queue_full = 0;
- 
--        init_waitqueue_head(&hd->TM_waitq);
--        hd->TM_wait_done = 0;
--
- 	error = scsi_add_host (sh, &ioc->pcidev->dev);
- 	if(error) {
- 		dprintk((KERN_ERR MYNAM
-@@ -394,60 +415,6 @@ static struct pci_driver mptfc_driver = 
- };
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--int
--mptfc_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply)
--{
--	MPT_SCSI_HOST *hd;
--	u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
--
--	devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to FC host driver!\n",
--			ioc->name, event));
--
--	if (ioc->sh == NULL ||
--		((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL))
--		return 1;
--
--	switch (event) {
--	case MPI_EVENT_UNIT_ATTENTION:			/* 03 */
--		/* FIXME! */
--		break;
--	case MPI_EVENT_IOC_BUS_RESET:			/* 04 */
--	case MPI_EVENT_EXT_BUS_RESET:			/* 05 */
--		if (hd && (ioc->bus_type == SPI) && (hd->soft_resets < -1))
--			hd->soft_resets++;
--		break;
--	case MPI_EVENT_LOGOUT:				/* 09 */
--		/* FIXME! */
--		break;
--
--		/*
--		 *  CHECKME! Don't think we need to do
--		 *  anything for these, but...
--		 */
--	case MPI_EVENT_RESCAN:				/* 06 */
--	case MPI_EVENT_LINK_STATUS_CHANGE:		/* 07 */
--	case MPI_EVENT_LOOP_STATE_CHANGE:		/* 08 */
--		/*
--		 *  CHECKME!  Falling thru...
--		 */
--		break;
--
--	case MPI_EVENT_NONE:				/* 00 */
--	case MPI_EVENT_LOG_DATA:			/* 01 */
--	case MPI_EVENT_STATE_CHANGE:			/* 02 */
--	case MPI_EVENT_EVENT_CHANGE:			/* 0A */
--	case MPI_EVENT_INTEGRATED_RAID:			/* 0B */
--	default:
--		devtprintk((KERN_INFO "%s:  Ignoring event (=%02Xh)\n",
--			__FUNCTION__, event));
--		break;
--	}
--
--	return 1;		/* currently means nothing really */
--}
--
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
-  *	mptfc_init - Register MPT adapter(s) as SCSI host(s) with
-  *	linux scsi mid-layer.
-@@ -464,9 +431,9 @@ mptfc_init(void)
- 	mptfcTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTFC_DRIVER);
- 	mptfcInternalCtx = mpt_register(mptscsih_scandv_complete, MPTFC_DRIVER);
- 
--        if (mpt_event_register(mptfcDoneCtx, mptfc_event_process) == 0) {
-+	if (mpt_event_register(mptfcDoneCtx, mptscsih_event_process) == 0) {
- 		devtprintk((KERN_INFO MYNAM
--                  ": mptfc_event_process Registered for IOC event notifications\n"));
-+		  ": Registered for IOC event notifications\n"));
- 	}
- 
- 	if (mpt_reset_register(mptfcDoneCtx, mptscsih_ioc_reset) == 0) {
-@@ -488,7 +455,6 @@ mptfc_exit(void)
- {
- 	pci_unregister_driver(&mptfc_driver);
- 
--
- 	mpt_reset_deregister(mptfcDoneCtx);
- 	dprintk((KERN_INFO MYNAM
- 	  ": Deregistered for IOC reset notifications\n"));
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.c linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.c	2007-11-02 09:10:23.000000000 +0100
-@@ -4,7 +4,7 @@
-  *      For use with LSI Logic Fibre Channel PCI chip/adapters
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 2000-2007 LSI Logic Corporation
-+ *  Copyright (c) 2000-2005 LSI Logic Corporation
-  *
-  *  $Id: mptlan.c,v 1.55 2003/05/07 14:08:32 Exp $
-  */
-@@ -57,11 +57,9 @@
- #include <linux/module.h>
- #include <linux/fs.h>
- 
--#define my_VERSION	MPT_LINUX_VERSION_COMMON
- #define MYNAM		"mptlan"
- 
- MODULE_LICENSE("GPL");
--MODULE_VERSION(my_VERSION);
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-@@ -185,16 +183,16 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
- 	struct net_device *dev = ioc->netdev;
- 	int FreeReqFrame = 0;
- 
--	dlioprintk((KERN_INFO MYNAM ": %s/%s: Got reply.\n",
-+	dioprintk((KERN_INFO MYNAM ": %s/%s: Got reply.\n",
- 		  IOC_AND_NETDEV_NAMES_s_s(dev)));
- 
--//	dlioprintk((KERN_INFO MYNAM "@lan_reply: mf = %p, reply = %p\n",
-+//	dioprintk((KERN_INFO MYNAM "@lan_reply: mf = %p, reply = %p\n",
- //			mf, reply));
- 
- 	if (mf == NULL) {
- 		u32 tmsg = CAST_PTR_TO_U32(reply);
- 
--		dlioprintk((KERN_INFO MYNAM ": %s/%s: @lan_reply, tmsg %08x\n",
-+		dioprintk((KERN_INFO MYNAM ": %s/%s: @lan_reply, tmsg %08x\n",
- 				IOC_AND_NETDEV_NAMES_s_s(dev),
- 				tmsg));
- 
-@@ -204,14 +202,14 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
- 		//  mptbase.c::mpt_interrupt() routine and callcack here
- #if 0
- 		case LAN_REPLY_FORM_MESSAGE_CONTEXT:
--//			dlioprintk((KERN_INFO MYNAM "/lan_reply: "
-+//			dioprintk((KERN_INFO MYNAM "/lan_reply: "
- //				  "MessageContext turbo reply received\n"));
- 			FreeReqFrame = 1;
- 			break;
- #endif
- 
- 		case LAN_REPLY_FORM_SEND_SINGLE:
--//			dlioprintk((MYNAM "/lan_reply: "
-+//			dioprintk((MYNAM "/lan_reply: "
- //				  "calling mpt_lan_send_reply (turbo)\n"));
- 
- 			//	FreeReqFrame = mpt_lan_send_turbo(dev, tmsg);
-@@ -230,7 +228,7 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
- 			break;
- 
- 		case LAN_REPLY_FORM_RECEIVE_SINGLE:
--//			dlioprintk((KERN_INFO MYNAM "@lan_reply: "
-+//			dioprintk((KERN_INFO MYNAM "@lan_reply: "
- //				  "rcv-Turbo = %08x\n", tmsg));
- 			mpt_lan_receive_post_turbo(dev, tmsg);
- 			break;
-@@ -248,10 +246,10 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
- 	}
- 
- //	msg = (u32 *) reply;
--//	dlioprintk((KERN_INFO MYNAM "@lan_reply: msg = %08x %08x %08x %08x\n",
-+//	dioprintk((KERN_INFO MYNAM "@lan_reply: msg = %08x %08x %08x %08x\n",
- //		  le32_to_cpu(msg[0]), le32_to_cpu(msg[1]),
- //		  le32_to_cpu(msg[2]), le32_to_cpu(msg[3])));
--//	dlioprintk((KERN_INFO MYNAM "@lan_reply: Function = %02xh\n",
-+//	dioprintk((KERN_INFO MYNAM "@lan_reply: Function = %02xh\n",
- //		  reply->u.hdr.Function));
- 
- 	switch (reply->u.hdr.Function) {
-@@ -275,7 +273,7 @@ lan_reply (MPT_ADAPTER *ioc, MPT_FRAME_H
- 			if (!(pRecvRep->MsgFlags & MPI_MSGFLAGS_CONTINUATION_REPLY))
- 				FreeReqFrame = 1;
- 		} else
--			dlioprintk((KERN_INFO MYNAM "@lan_reply: zero context "
-+			dioprintk((KERN_INFO MYNAM "@lan_reply: zero context "
- 				  "ReceivePostReply received.\n"));
- 		break;
- 	}
-@@ -617,7 +615,7 @@ mpt_lan_send_turbo(struct net_device *de
- 	priv->stats.tx_packets++;
- 	priv->stats.tx_bytes += sent->len;
- 
--	dlioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
-+	dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
- 			IOC_AND_NETDEV_NAMES_s_s(dev),
- 			__FUNCTION__, sent));
- 
-@@ -649,7 +647,7 @@ mpt_lan_send_reply(struct net_device *de
- 
- 	count = pSendRep->NumberOfContexts;
- 
--	dlioprintk((KERN_INFO MYNAM ": send_reply: IOCStatus: %04x\n",
-+	dioprintk((KERN_INFO MYNAM ": send_reply: IOCStatus: %04x\n",
- 		 le16_to_cpu(pSendRep->IOCStatus)));
- 
- 	/* Add check for Loginfo Flag in IOCStatus */
-@@ -683,7 +681,7 @@ mpt_lan_send_reply(struct net_device *de
- 		sent = priv->SendCtl[ctx].skb;
- 		priv->stats.tx_bytes += sent->len;
- 
--		dlioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
-+		dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, skb %p sent.\n",
- 				IOC_AND_NETDEV_NAMES_s_s(dev),
- 				__FUNCTION__, sent));
- 
-@@ -722,7 +720,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
- 	int ctx;
- 	u16 cur_naa = 0x1000;
- 
--	dlioprintk((KERN_INFO MYNAM ": %s called, skb_addr = %p\n",
-+	dioprintk((KERN_INFO MYNAM ": %s called, skb_addr = %p\n",
- 			__FUNCTION__, skb));
- 
- 	spin_lock_irqsave(&priv->txfidx_lock, flags);
-@@ -748,7 +746,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
- 	ctx = priv->mpt_txfidx[priv->mpt_txfidx_tail--];
- 	spin_unlock_irqrestore(&priv->txfidx_lock, flags);
- 
--//	dlioprintk((KERN_INFO MYNAM ": %s/%s: Creating new msg frame (send).\n",
-+//	dioprintk((KERN_INFO MYNAM ": %s/%s: Creating new msg frame (send).\n",
- //			IOC_AND_NETDEV_NAMES_s_s(dev)));
- 
- 	pSendReq = (LANSendRequest_t *) mf;
-@@ -783,7 +781,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
- 	pTrans->Flags         = 0;
- 	pTrans->TransactionContext[0] = cpu_to_le32(ctx);
- 
--//	dlioprintk((KERN_INFO MYNAM ": %s/%s: BC = %08x, skb = %p, buff = %p\n",
-+//	dioprintk((KERN_INFO MYNAM ": %s/%s: BC = %08x, skb = %p, buff = %p\n",
- //			IOC_AND_NETDEV_NAMES_s_s(dev),
- //			ctx, skb, skb->data));
- 
-@@ -843,7 +841,7 @@ mpt_lan_sdu_send (struct sk_buff *skb, s
- 	mpt_put_msg_frame (LanCtx, mpt_dev, mf);
- 	dev->trans_start = jiffies;
- 
--	dlioprintk((KERN_INFO MYNAM ": %s/%s: Sending packet. FlagsLength = %08x.\n",
-+	dioprintk((KERN_INFO MYNAM ": %s/%s: Sending packet. FlagsLength = %08x.\n",
- 			IOC_AND_NETDEV_NAMES_s_s(dev),
- 			le32_to_cpu(pSimple->FlagsLength)));
- 
-@@ -864,10 +862,10 @@ mpt_lan_wake_post_buckets_task(struct ne
- 			schedule_work(&priv->post_buckets_task);
- 		} else {
- 			schedule_delayed_work(&priv->post_buckets_task, 1);
--			dlioprintk((KERN_INFO MYNAM ": post_buckets queued on "
-+			dioprintk((KERN_INFO MYNAM ": post_buckets queued on "
- 				   "timer.\n"));
- 		}
--	        dlioprintk((KERN_INFO MYNAM ": %s/%s: Queued post_buckets task.\n",
-+	        dioprintk((KERN_INFO MYNAM ": %s/%s: Queued post_buckets task.\n",
- 			   IOC_AND_NETDEV_NAMES_s_s(dev) ));
- 	}
- }
-@@ -880,7 +878,7 @@ mpt_lan_receive_skb(struct net_device *d
- 
- 	skb->protocol = mpt_lan_type_trans(skb, dev);
- 
--	dlioprintk((KERN_INFO MYNAM ": %s/%s: Incoming packet (%d bytes) "
-+	dioprintk((KERN_INFO MYNAM ": %s/%s: Incoming packet (%d bytes) "
- 		 "delivered to upper level.\n",
- 			IOC_AND_NETDEV_NAMES_s_s(dev), skb->len));
- 
-@@ -890,13 +888,13 @@ mpt_lan_receive_skb(struct net_device *d
- 	skb->dev = dev;
- 	netif_rx(skb);
- 
--	dlioprintk((MYNAM "/receive_skb: %d buckets remaining\n",
-+	dioprintk((MYNAM "/receive_skb: %d buckets remaining\n",
- 		 atomic_read(&priv->buckets_out)));
- 
- 	if (atomic_read(&priv->buckets_out) < priv->bucketthresh)
- 		mpt_lan_wake_post_buckets_task(dev, 1);
- 
--	dlioprintk((KERN_INFO MYNAM "/receive_post_reply: %d buckets "
-+	dioprintk((KERN_INFO MYNAM "/receive_post_reply: %d buckets "
- 		  "remaining, %d received back since sod\n",
- 		  atomic_read(&priv->buckets_out), priv->total_received));
- 
-@@ -1027,8 +1025,8 @@ mpt_lan_receive_post_reply(struct net_de
- 	int count;
- 	int i, l;
- 
--	dlioprintk((KERN_INFO MYNAM ": mpt_lan_receive_post_reply called\n"));
--	dlioprintk((KERN_INFO MYNAM ": receive_post_reply: IOCStatus: %04x\n",
-+	dioprintk((KERN_INFO MYNAM ": mpt_lan_receive_post_reply called\n"));
-+	dioprintk((KERN_INFO MYNAM ": receive_post_reply: IOCStatus: %04x\n",
- 		 le16_to_cpu(pRecvRep->IOCStatus)));
- 
- 	if ((le16_to_cpu(pRecvRep->IOCStatus) & MPI_IOCSTATUS_MASK) ==
-@@ -1057,14 +1055,14 @@ mpt_lan_receive_post_reply(struct net_de
- //				offset);
- //	}
- 
--	dlioprintk((KERN_INFO MYNAM ": %s/%s: @rpr, offset = %d, len = %d\n",
-+	dioprintk((KERN_INFO MYNAM ": %s/%s: @rpr, offset = %d, len = %d\n",
- 			IOC_AND_NETDEV_NAMES_s_s(dev),
- 			offset, len));
- 
- 	if (count > 1) {
- 		int szrem = len;
- 
--//		dlioprintk((KERN_INFO MYNAM ": %s/%s: Multiple buckets returned "
-+//		dioprintk((KERN_INFO MYNAM ": %s/%s: Multiple buckets returned "
- //			"for single packet, concatenating...\n",
- //				IOC_AND_NETDEV_NAMES_s_s(dev)));
- 
-@@ -1086,7 +1084,7 @@ mpt_lan_receive_post_reply(struct net_de
- 			if (szrem < l)
- 				l = szrem;
- 
--//			dlioprintk((KERN_INFO MYNAM ": %s/%s: Buckets = %d, len = %u\n",
-+//			dioprintk((KERN_INFO MYNAM ": %s/%s: Buckets = %d, len = %u\n",
- //					IOC_AND_NETDEV_NAMES_s_s(dev),
- //					i, l));
- 
-@@ -1214,7 +1212,7 @@ mpt_lan_post_receive_buckets(void *dev_i
- 	curr = atomic_read(&priv->buckets_out);
- 	buckets = (priv->max_buckets_out - curr);
- 
--	dlioprintk((KERN_INFO MYNAM ": %s/%s: @%s, Start_buckets = %u, buckets_out = %u\n",
-+	dioprintk((KERN_INFO MYNAM ": %s/%s: @%s, Start_buckets = %u, buckets_out = %u\n",
- 			IOC_AND_NETDEV_NAMES_s_s(dev),
- 			__FUNCTION__, buckets, curr));
- 
-@@ -1226,7 +1224,7 @@ mpt_lan_post_receive_buckets(void *dev_i
- 		if (mf == NULL) {
- 			printk (KERN_ERR "%s: Unable to alloc request frame\n",
- 				__FUNCTION__);
--			dlioprintk((KERN_ERR "%s: %u buckets remaining\n",
-+			dioprintk((KERN_ERR "%s: %u buckets remaining\n",
- 				 __FUNCTION__, buckets));
- 			goto out;
- 		}
-@@ -1337,9 +1335,9 @@ mpt_lan_post_receive_buckets(void *dev_i
- 	}
- 
- out:
--	dlioprintk((KERN_INFO MYNAM "/%s: End_buckets = %u, priv->buckets_out = %u\n",
-+	dioprintk((KERN_INFO MYNAM "/%s: End_buckets = %u, priv->buckets_out = %u\n",
- 		  __FUNCTION__, buckets, atomic_read(&priv->buckets_out)));
--	dlioprintk((KERN_INFO MYNAM "/%s: Posted %u buckets and received %u back\n",
-+	dioprintk((KERN_INFO MYNAM "/%s: Posted %u buckets and received %u back\n",
- 	__FUNCTION__, priv->total_posted, priv->total_received));
- 
- 	clear_bit(0, &priv->post_buckets_active);
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.h linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptlan.h	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptlan.h	2007-11-02 09:10:23.000000000 +0100
-@@ -65,9 +65,9 @@ MODULE_DESCRIPTION(LANAME);
- 
- /*****************************************************************************/
- #ifdef MPT_LAN_IO_DEBUG
--#define dlioprintk(x)  printk x
-+#define dioprintk(x)  printk x
- #else
--#define dlioprintk(x)
-+#define dioprintk(x)
- #endif
- 
- #ifdef MPT_LAN_DEBUG
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.c linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.c	2007-11-02 09:10:23.000000000 +0100
-@@ -3,8 +3,8 @@
-  *      For use with LSI Logic PCI chip/adapter(s)
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -64,7 +64,6 @@
- 
- #include "mptbase.h"
- #include "mptscsih.h"
--#include "mptsas.h"
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- #define my_NAME		"Fusion MPT SAS Host driver"
-@@ -74,10 +73,8 @@
- MODULE_AUTHOR(MODULEAUTHOR);
- MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
--MODULE_VERSION(my_VERSION);
- 
- /* Command line args */
--
- static int mpt_pq_filter = 0;
- module_param(mpt_pq_filter, int, 0);
- MODULE_PARM_DESC(mpt_pq_filter, " Enable peripheral qualifier filter: enable=1  (default=0)");
-@@ -90,627 +87,40 @@ static int mpt_sas_hot_plug_enable = 1;
- module_param(mpt_sas_hot_plug_enable, int, 0);
- MODULE_PARM_DESC(mpt_sas_hot_plug_enable, " Enable SAS Hot Plug Support: enable=1 (default=1)");
- 
--static int mpt_cmd_retry_count = 144;
--module_param(mpt_cmd_retry_count, int, 0);
--MODULE_PARM_DESC(mpt_cmd_retry_count, " Device discovery TUR command retry count: default=144");
--
--extern int mpt_enable_deadioc_detect;
--
--extern int	mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 bus, u8 id, u8 lun, int ctx2abort, ulong timeout);
-+extern int	mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout);
- static int	mptsasDoneCtx = -1;
- static int	mptsasTaskCtx = -1;
- static int	mptsasInternalCtx = -1; /* Used only for internal commands */
- 
--static void mptsas_hotplug_work(void *arg);
--
--#if defined(CPQ_CIM)
--/**
-- * mptsas_sas_io_unit_pg0
-- *
-- * obtaining SAS_IO_UNIT page 0
-- *
-- * @ioc
-- * @port_info
-- *
-- **/
--static int
--mptsas_sas_io_unit_pg0(MPT_ADAPTER *ioc, struct mptsas_portinfo *port_info)
--{
--	ConfigExtendedPageHeader_t hdr;
--	CONFIGPARMS cfg;
--	SasIOUnitPage0_t *buffer;
--	dma_addr_t dma_handle;
--	int error, i;
--
--	hdr.PageVersion = MPI_SASIOUNITPAGE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_IO_UNIT;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.pageAddr = 0;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = 10;
--
--	error = mpt_config(ioc, &cfg);
--	if (error)
--		goto out;
--	if (!hdr.ExtPageLength) {
--		error = -ENXIO;
--		goto out;
--	}
--
--	buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
--					    &dma_handle);
--	if (!buffer) {
--		error = -ENOMEM;
--		goto out;
--	}
--
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	error = mpt_config(ioc, &cfg);
--	if (error)
--		goto out_free_consistent;
--
--	port_info->num_phys = buffer->NumPhys;
--	port_info->phy_info = kmalloc(port_info->num_phys *
--		sizeof(*port_info->phy_info),GFP_KERNEL);
--	if (!port_info->phy_info) {
--		error = -ENOMEM;
--		goto out_free_consistent;
--	}
--
--	if (port_info->num_phys)
--		port_info->handle =
--		    le16_to_cpu(buffer->PhyData[0].ControllerDevHandle);
--	for (i = 0; i < port_info->num_phys; i++) {
--		port_info->phy_info[i].phy_id = i;
--		port_info->phy_info[i].port_id =
--		    buffer->PhyData[i].Port;
--		port_info->phy_info[i].negotiated_link_rate =
--		    buffer->PhyData[i].NegotiatedLinkRate;
--		port_info->phy_info[i].portinfo = port_info;
--		port_info->phy_info[i].port_flags =
--		    buffer->PhyData[i].PortFlags;
--	}
--
-- out_free_consistent:
--	pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
--			    buffer, dma_handle);
-- out:
--	return error;
--}
--
--/**
-- * mptsas_sas_device_pg0
-- *
-- * obtaining SAS_DEVICE page 0
-- *
-- * @ioc
-- * device_info
-- *
-- **/
--static int
--mptsas_sas_device_pg0(MPT_ADAPTER *ioc, struct mptsas_devinfo *device_info,
--		u32 form, u32 form_specific)
--{
--	ConfigExtendedPageHeader_t hdr;
--	CONFIGPARMS cfg;
--	SasDevicePage0_t *buffer;
--	dma_addr_t dma_handle;
--	u64 sas_address;
--	int error=0;
--
--	hdr.PageVersion = MPI_SASDEVICE0_PAGEVERSION;
--	hdr.ExtPageLength = 0;
--	hdr.PageNumber = 0;
--	hdr.Reserved1 = 0;
--	hdr.Reserved2 = 0;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_EXTENDED;
--	hdr.ExtPageType = MPI_CONFIG_EXTPAGETYPE_SAS_DEVICE;
--
--	cfg.cfghdr.ehdr = &hdr;
--	cfg.pageAddr = form + form_specific;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.dir = 0;	/* read */
--	cfg.timeout = 10;
--
--	memset(device_info, 0, sizeof(struct mptsas_devinfo));
--	error = mpt_config(ioc, &cfg);
--	if (error)
--		goto out;
--	if (!hdr.ExtPageLength) {
--		error = -ENXIO;
--		goto out;
--	}
--
--	buffer = pci_alloc_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
--				      &dma_handle);
--	if (!buffer) {
--		error = -ENOMEM;
--		goto out;
--	}
--
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	error = mpt_config(ioc, &cfg);
--	if (error)
--		goto out_free_consistent;
--
--	device_info->handle = le16_to_cpu(buffer->DevHandle);
--	device_info->handle_parent = le16_to_cpu(buffer->ParentDevHandle);
--	device_info->handle_enclosure =
--	    le16_to_cpu(buffer->EnclosureHandle);
--	device_info->slot = le16_to_cpu(buffer->Slot);
--	device_info->phy_id = buffer->PhyNum;
--	device_info->port_id = buffer->PhysicalPort;
--	device_info->id = buffer->TargetID;
--	device_info->channel = buffer->Bus;
--	memcpy(&sas_address, &buffer->SASAddress, sizeof(u64));
--	device_info->sas_address = le64_to_cpu(sas_address);
--	device_info->device_info =
--	    le32_to_cpu(buffer->DeviceInfo);
--
-- out_free_consistent:
--	pci_free_consistent(ioc->pcidev, hdr.ExtPageLength * 4,
--			    buffer, dma_handle);
-- out:
--	return error;
--}
--
--/**
-- *	mptsas_get_number_hotspares - returns num hot spares in this ioc
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *
-- *	Return: number of hotspares
-- *
-- **/
--static int
--mptsas_get_number_hotspares(MPT_ADAPTER *ioc)
--{
--	ConfigPageHeader_t	 hdr;
--	CONFIGPARMS		 cfg;
--	IOCPage5_t		 *buffer = NULL;
--	dma_addr_t		 dma_handle;
--	int			 data_sz=0;
--	int			 rc;
--
--	memset(&hdr, 0, sizeof(ConfigPageHeader_t));
--	memset(&cfg, 0, sizeof(CONFIGPARMS));
--
--	rc = 0;
--	hdr.PageNumber = 5;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_IOC;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.timeout = 10;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_ioc_pg5;
--
--	if (hdr.PageLength == 0)
--		goto get_ioc_pg5;
--
--	data_sz = hdr.PageLength * 4;
--	buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev,
--		data_sz, &dma_handle);
--	if (!buffer)
--		goto get_ioc_pg5;
--
--	memset((u8 *)buffer, 0, data_sz);
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_ioc_pg5;
--
--	rc = buffer->NumHotSpares;
--
-- get_ioc_pg5:
--
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, data_sz,
--		    (u8 *) buffer, dma_handle);
--
--	return rc;
--}
--
--/**
-- *	mptsas_get_ioc_pg5 - ioc Page 5 hot spares
-- *	@ioc: Pointer to MPT_ADAPTER structure
-- *	@pIocPage5: ioc page 5
-- *
-- *	Return: 0 for success
-- *	-ENOMEM if no memory available
-- *		-EPERM if not allowed due to ISR context
-- *		-EAGAIN if no msg frames currently available
-- *		-EFAULT for non-successful reply or no reply (timeout)
-- **/
--static int
--mptsas_get_ioc_pg5(MPT_ADAPTER *ioc, IOCPage5_t *iocPage5)
--{
--	ConfigPageHeader_t	 hdr;
--	CONFIGPARMS		 cfg;
--	IOCPage5_t		 *buffer = NULL;
--	dma_addr_t		 dma_handle;
--	int			 data_sz=0;
--	int			 rc;
--
--	memset(&hdr, 0, sizeof(ConfigPageHeader_t));
--	memset(&cfg, 0, sizeof(CONFIGPARMS));
--
--	rc = 0;
--	hdr.PageNumber = 5;
--	hdr.PageType = MPI_CONFIG_PAGETYPE_IOC;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.physAddr = -1;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--	cfg.timeout = 10;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_ioc_pg5;
--
--	if (hdr.PageLength == 0) {
--		rc = -EFAULT;
--		goto get_ioc_pg5;
--	}
--
--	data_sz = hdr.PageLength * 4;
--	buffer = (IOCPage5_t *) pci_alloc_consistent(ioc->pcidev,
--		data_sz, &dma_handle);
--	if (!buffer) {
--		rc = -ENOMEM;
--		goto get_ioc_pg5;
--	}
--
--	memset((u8 *)buffer, 0, data_sz);
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if ((rc = mpt_config(ioc, &cfg)) != 0)
--		goto get_ioc_pg5;
--
--	memcpy(iocPage5, buffer, sizeof(*iocPage5));
--
-- get_ioc_pg5:
--
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, data_sz,
--		    (u8 *) buffer, dma_handle);
--
--	return rc;
--}
--
--/**
-- * mptsas_add_device_component
-- *
-- * @ioc
-- * @channel - fw mapped id's
-- * @id
-- * @sas_address
-- * @device_info
-- *
-- **/
--static void
--mptsas_add_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id,
--	u64 sas_address, u32 device_info)
--{
--	struct sas_device_info	*sas_info, *next;
--
--	down(&ioc->sas_device_info_mutex);
--
--	/*
--	 * Delete all matching sas_address's out of tree
--	 */
--	list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, list) {
--		if (sas_info->sas_address != sas_address)
--			continue;
--		list_del(&sas_info->list);
--		kfree(sas_info);
--	}
--
--	/*
--	 * If there is a matching channel/id, then swap out with new target info
--	 */
--	list_for_each_entry(sas_info, &ioc->sas_device_info_list, list) {
--		if (sas_info->fw.channel == channel && sas_info->fw.id == id)
--			goto initialize_data;
--	}
--
--	if (!(sas_info = kmalloc(sizeof(*sas_info), GFP_KERNEL)))
--		goto out;
--	memset(sas_info, 0, sizeof(*sas_info));
--
--	/*
--	 * mapping - is for compatibility with drivers supporting sas transport layer
--	 */
--	sas_info->fw.id = id;
--	sas_info->fw.channel = channel;
--	sas_info->os.id = id;
--	sas_info->os.channel = channel;
--	list_add_tail(&sas_info->list, &ioc->sas_device_info_list);
--
-- initialize_data:
--
--	sas_info->sas_address = sas_address;
--	sas_info->device_info = device_info;
--	sas_info->is_cached = 0;
--	sas_info->is_logical_volume = 0;
--	devtprintk((KERN_INFO "%s: adding channel=%d id=%d "
--	    "sas_address=0x%llX\n", __FUNCTION__, channel, id, sas_address));
--
-- out:
--	up(&ioc->sas_device_info_mutex);
--	return;
--}
--
--/**
-- * mptsas_add_device_component_single
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- **/
--static void
--mptsas_add_device_component_single(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	struct mptsas_devinfo sas_device;
--	int rc;
--
--	rc = mptsas_sas_device_pg0(ioc, &sas_device,
--	    (MPI_SAS_DEVICE_PGAD_FORM_BUS_TARGET_ID <<
--	     MPI_SAS_DEVICE_PGAD_FORM_SHIFT),
--	    (channel << 8) + id);
--	if (rc)
--		return;
--
--	mptsas_add_device_component(ioc, sas_device.channel,
--	    sas_device.id, sas_device.sas_address, sas_device.device_info);
--}
--
--/**
-- * mptsas_add_device_component_hotspare
-- *
-- * Handle adding hotspares into the list
-- *
-- * @ioc
-- *
-- **/
--static void
--mptsas_add_device_component_hotspare(MPT_ADAPTER *ioc)
--{
--	int		num_hotspares;
--	IOCPage5_t 	*iocPage5;
--	RaidPhysDiskPage0_t	phys_disk;
--	int 		i;
--
--	iocPage5 = NULL;
--	num_hotspares = mptsas_get_number_hotspares(ioc);
--	if (!num_hotspares)
--		goto out;
--
--	iocPage5 = kmalloc(offsetof(IOCPage5_t,HotSpare) +
--	    num_hotspares * sizeof(IOC_5_HOT_SPARE), GFP_KERNEL);
--	if (!iocPage5)
--		goto out;
--	memset(iocPage5, 0, sizeof(*iocPage5));
--	if (mptsas_get_ioc_pg5(ioc, iocPage5) != 0)
--		goto out;
--	for(i = 0; i < num_hotspares; i++) {
--		mpt_raid_phys_disk_pg0(ioc,
--		    iocPage5->HotSpare[i].PhysDiskNum, &phys_disk );
--		mptsas_add_device_component_single(ioc,
--		    phys_disk.PhysDiskBus, phys_disk.PhysDiskID);
--	}
-- out:
--	kfree(iocPage5);
--
--}
--
--/**
-- * mptsas_add_device_component_ir
-- *
-- * Handle Integrated RAID, adding each individual device to list
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- **/
--static void
--mptsas_add_device_component_ir(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	CONFIGPARMS			cfg;
--	ConfigPageHeader_t		hdr;
--	dma_addr_t			dma_handle;
--	pRaidVolumePage0_t		buffer = NULL;
--	int				i;
--	RaidPhysDiskPage0_t 		phys_disk;
--	struct sas_device_info		*sas_info;
--
--	memset(&cfg, 0 , sizeof(CONFIGPARMS));
--	memset(&hdr, 0 , sizeof(ConfigPageHeader_t));
--	hdr.PageType = MPI_CONFIG_PAGETYPE_RAID_VOLUME;
--	cfg.pageAddr = (channel << 8) + id;
--	cfg.cfghdr.hdr = &hdr;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
--
--	if (mpt_config(ioc, &cfg) != 0)
--		goto out;
--
--	if (!hdr.PageLength)
--		goto out;
--
--	buffer = pci_alloc_consistent(ioc->pcidev, hdr.PageLength * 4,
--	    &dma_handle);
--
--	if (!buffer)
--		goto out;
--
--	cfg.physAddr = dma_handle;
--	cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
--
--	if (mpt_config(ioc, &cfg) != 0)
--		goto out;
--
--	if (!buffer->NumPhysDisks)
--		goto out;
--
--	/*
--	 * Adding entry for hidden components
--	 */
--	for (i = 0; i < buffer->NumPhysDisks; i++) {
--
--		if(mpt_raid_phys_disk_pg0(ioc,
--		    buffer->PhysDisk[i].PhysDiskNum, &phys_disk) != 0)
--			continue;
- 
--		mptsas_add_device_component_single(ioc, phys_disk.PhysDiskBus,
--		    phys_disk.PhysDiskID);
--	}
--
--	/*
--	 * Adding entry for logical volume in list
--	 */
--	list_for_each_entry(sas_info, &ioc->sas_device_info_list, list) {
--		if (sas_info->fw.channel == channel && sas_info->fw.id ==  id)
--			goto initialize_data;
--	}
--
--	if (!(sas_info = kmalloc(sizeof(*sas_info), GFP_KERNEL)))
--		goto out;
--	memset(sas_info, 0, sizeof(*sas_info));
--
--	sas_info->fw.id = id;
--	sas_info->fw.channel = channel; /* channel zero */
--	down(&ioc->sas_device_info_mutex);
--	list_add_tail(&sas_info->list, &ioc->sas_device_info_list);
--	up(&ioc->sas_device_info_mutex);
--
-- initialize_data:
--
--	sas_info->os.id = id;
--	sas_info->os.channel = channel;
--	sas_info->sas_address = 0;
--	sas_info->device_info = 0;
--	sas_info->is_logical_volume = 1;
--	sas_info->is_cached = 0;
--
--	devtprintk((KERN_INFO "%s: adding volume at channel=%d id=%d\n",
--	    __FUNCTION__, channel, id));
--
--	mptsas_add_device_component_hotspare(ioc);
-- out:
--	if (buffer)
--		pci_free_consistent(ioc->pcidev, hdr.PageLength * 4, buffer,
--		    dma_handle);
--}
--
--
--/**
-- * mptsas_del_device_component
-- *
-- * Once a device has been removed, we mark the
-- * entry in the list as being cached
-- *
-- * @ioc
-- * @channel - os mapped id's
-- * @id
-- *
-- **/
--static void
--mptsas_del_device_component(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	struct sas_device_info	*sas_info, *next;
--
--	/*
--	 * Set is_cached flag
--	 */
--	list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, list) {
--		if (sas_info->os.channel == channel && sas_info->os.id == id) {
--			sas_info->is_cached = 1;
--			devtprintk((KERN_INFO
--			    "%s: deleting channel=%d id=%d "
--			    "sas_address=0x%llX\n", __FUNCTION__, channel, id,
--			    sas_info->sas_address));
--		}
--	}
--}
--
--/**
-- * mptsas_del_device_components
-- *
-- * Cleaning the list
-- *
-- * @ioc
-- *
-- **/
--static void
--mptsas_del_device_components(MPT_ADAPTER *ioc)
--{
--	struct sas_device_info	*sas_info, *next;
--
--	down(&ioc->sas_device_info_mutex);
--	list_for_each_entry_safe(sas_info, next, &ioc->sas_device_info_list, list) {
--		list_del(&sas_info->list);
--		kfree(sas_info);
--	}
--	up(&ioc->sas_device_info_mutex);
--}
--#endif
--
--/**
-- * mptsas_find_vdevice
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- **/
--static VirtDevice *
--mptsas_find_vdevice(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	struct _MPT_DEVICE *pMptTarget;
--
--	if (id >= ioc->DevicesPerBus || channel >= ioc->NumberOfBuses)
--		return NULL;
-+enum mptsas_hotplug_action {
-+	MPTSAS_ADD_DEVICE,
-+	MPTSAS_DEL_DEVICE,
-+};
- 
--	pMptTarget = ioc->Target_List[channel];
--	return pMptTarget->Target[id];
--}
-+struct mptsas_hotplug_event {
-+	struct work_struct	work;
-+	MPT_ADAPTER		*ioc;
-+	enum mptsas_hotplug_action event_type;
-+	u64			sas_address;
-+	u32			channel;
-+	u32			id;
-+	u32			device_info;
-+	u16			handle;
-+	u16			parent_handle;
-+	u8			phy_id;
-+	u8			isRaid;
-+};
- 
--/**
-- * mptsas_qcmd
-- *
-- * receiving a scsi_cmnd from upper layers
-- *
-- * @SCpnt
-- * @done
-- *
-- **/
- static int
- mptsas_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
- {
- 	MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata;
--	MPT_ADAPTER *ioc = hd->ioc;
--	static VirtDevice *pTarget;
--	int id = SCpnt->device->id;
--	int channel = SCpnt->device->channel;
--
--	/* If Device has been removed, inhibit any more IO */
--	pTarget = mptsas_find_vdevice(ioc, channel, id);
--	if (pTarget && (pTarget->tflags & MPT_TARGET_FLAGS_DELETED)) {
-+	int	 id = SCpnt->device->id;
-+
-+	/* Device has been removed, so inhibit any more IO */
-+	if (hd->Targets[id] &&
-+	    hd->Targets[id]->tflags & MPT_TARGET_FLAGS_DELETED) {
- 		SCpnt->result = DID_NO_CONNECT << 16;
- 		done(SCpnt);
- 		return 0;
-@@ -719,32 +129,6 @@ mptsas_qcmd(struct scsi_cmnd *SCpnt, voi
- 	return mptscsih_qcmd(SCpnt,done);
- }
- 
--/**
-- * mptsas_slave_configure
-- *
-- *
-- * @sdev
-- *
-- **/
--static int
--mptsas_slave_configure(struct scsi_device *sdev)
--{
--#if defined(CPQ_CIM)
--	MPT_SCSI_HOST	*hd = (MPT_SCSI_HOST *)sdev->host->hostdata;
--	MPT_ADAPTER *ioc = hd->ioc;
--	int		channel;
--	int		id;
--
--	channel = sdev->channel;
--	id = sdev->id;
--
--	if ((ioc->raid_data.isRaid & (1 << id)) == 0)
--		mptsas_add_device_component_single(ioc, channel, id);
--#endif
--	return mptscsih_slave_configure(sdev);
--}
--
--
- /* Show the ioc state for this card */
- static ssize_t
- mptsas_show_iocstate(struct class_device *class_dev, char *buf)
-@@ -778,300 +162,49 @@ static struct scsi_host_template mptsas_
- 	.info				= mptscsih_info,
- 	.queuecommand			= mptsas_qcmd,
- 	.slave_alloc			= mptscsih_slave_alloc,
--	.slave_configure		= mptsas_slave_configure,
--	.slave_destroy			= mptscsih_slave_destroy,
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11))
--	.change_queue_depth 		= mptscsih_change_queue_depth,
--#endif
--	.eh_abort_handler		= mptscsih_abort,
--	.eh_device_reset_handler	= mptscsih_dev_reset,
--	.eh_bus_reset_handler		= mptscsih_bus_reset,
--	.eh_host_reset_handler		= mptscsih_host_reset,
--	.bios_param			= mptscsih_bios_param,
--	.can_queue			= MPT_FC_CAN_QUEUE,
--	.this_id			= -1,
--	.sg_tablesize			= CONFIG_FUSION_MAX_SGE,
--	.max_sectors			= 8192,
--	.cmd_per_lun			= 7,
--	.use_clustering			= ENABLE_CLUSTERING,
--	.shost_attrs			= mptsas_host_attrs,
--	.dump_sanity_check		= mptscsih_sanity_check,
--	.dump_poll			= mptscsih_poll,
--};
--
--/**
-- * mptsas_remove
-- *
-- *
-- * @pdev
-- *
-- **/
--static void __devexit mptsas_remove(struct pci_dev *pdev)
--{
--#if defined(CPQ_CIM)
--	MPT_ADAPTER *ioc = pci_get_drvdata(pdev);
--  if(ioc->sh != NULL)
--	mptsas_del_device_components(ioc);
--#endif
--
--	flush_scheduled_work();
--	mptscsih_remove(pdev);
--}
--
--/**
-- * mptsas_target_reset
-- *
-- * Issues TARGET_RESET to end device using handshaking method
-- *
-- * @ioc
-- * @channel
-- * @id
-- *
-- * Returns (1) success
-- *         (0) failure
-- *
-- **/
--static int
--mptsas_target_reset(MPT_ADAPTER *ioc, u8 channel, u8 id)
--{
--	MPT_FRAME_HDR	*mf;
--	SCSITaskMgmt_t	*pScsiTm;
--
--	if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
--		dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames @%d!!\n",
--		    ioc->name,__FUNCTION__, __LINE__));
--		return 0;
--	}
--
--	/* Format the Request
--	 */
--	pScsiTm = (SCSITaskMgmt_t *) mf;
--	memset (pScsiTm, 0, sizeof(SCSITaskMgmt_t));
--	pScsiTm->TargetID = id;
--	pScsiTm->Bus = channel;
--	pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
--	pScsiTm->TaskType = MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET;
--	pScsiTm->MsgFlags = MPI_SCSITASKMGMT_MSGFLAGS_LIPRESET_RESET_OPTION;
--
--// EDM	printk("tm target reset : issue : channel=%d id=%d\n", channel, id);
--	DBG_DUMP_TM_REQUEST_FRAME(mf);
--
--	if (mpt_send_handshake_request(ioc->TaskCtx, ioc,
--	    sizeof(SCSITaskMgmt_t), (u32 *)mf, 10,NO_SLEEP)) {
--		mpt_free_msg_frame(ioc, mf);
--		dfailprintk((MYIOC_s_WARN_FMT "%s, tm handshake failed @%d!!\n",
--		    ioc->name,__FUNCTION__, __LINE__));
--		return 0;
--	}
--
--	return 1;
--}
--
--/**
-- * mptsas_target_reset_queue
-- *
-- * Receive request for TARGET_RESET after recieving an firmware
-- * event NOT_RESPONDING_EVENT, then put command in link list
-- * and queue if task_queue already in use.
-- *
-- * @ioc
-- * @sas_event_data
-- *
-- **/
--static void
--mptsas_target_reset_queue(MPT_ADAPTER *ioc,
--    EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
--{
--	MPT_SCSI_HOST	*hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
--	VirtDevice *vdevice = NULL;
--	struct mptscsih_target_reset	*target_reset_list;
--	u8		id, channel;
--
--	id = sas_event_data->TargetID;
--	channel = sas_event_data->Bus;
--
--	if (!(vdevice = mptsas_find_vdevice(ioc, channel, id)))
--		return;
--
--	vdevice->tflags |= MPT_TARGET_FLAGS_DELETED;
--
--	target_reset_list = kmalloc(sizeof(*target_reset_list),
--	    GFP_ATOMIC);
--	if (!target_reset_list) {
--		dfailprintk((MYIOC_s_WARN_FMT
--			"%s, failed to allocate mem @%d..!!\n",
--		    ioc->name,__FUNCTION__, __LINE__));
--		return;
--	}
--
--	memset(target_reset_list, 0, sizeof(*target_reset_list));
--// EDM	printk("tm target reset : queue : channel=%d id=%d\n", channel, id);
--
--	memcpy(&target_reset_list->sas_event_data, sas_event_data,
--		sizeof(*sas_event_data));
--	list_add_tail(&target_reset_list->list, &hd->target_reset_list);
--
--	if (hd->resetPending)
--		return;
--
--	if (mptsas_target_reset(ioc, channel, id)) {
--		target_reset_list->target_reset_issued = 1;
--		hd->resetPending = 1;
--	}
--}
--
--/**
-- * mptsas_dev_reset_complete
-- *
-- * Completion for TARGET_RESET after NOT_RESPONDING_EVENT,
-- * enable work queue to finish off removing device from upper layers.
-- * then send next TARGET_RESET in the queue.
-- *
-- * @ioc
-- *
-- **/
--static void
--mptsas_dev_reset_complete(MPT_ADAPTER *ioc)
--{
--	MPT_SCSI_HOST	*hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
--        struct list_head *head = &hd->target_reset_list;
--	struct mptscsih_target_reset	*target_reset_list;
--	struct mptsas_hotplug_event *ev;
--	EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data;
--	u8		id, channel;
--	u64		sas_address;
--
--	if (list_empty(head))
--		return;
--
--	target_reset_list = list_entry(head->next,
--	    struct mptscsih_target_reset, list);
--
--	sas_event_data = &target_reset_list->sas_event_data;
--	id = sas_event_data->TargetID;
--	channel = sas_event_data->Bus;
--	hd->resetPending = 0;
--
--	/*
--	 * retry target reset
--	 */
--	if (!target_reset_list->target_reset_issued) {
--		if (mptsas_target_reset(ioc, channel, id)) {
--			target_reset_list->target_reset_issued = 1;
--			hd->resetPending = 1;
--		}
--		return;
--	}
--
--// EDM	printk("tm target reset : complete : channel=%d id=%d\n", channel, id);
--
--	/*
--	 * enable work queue to remove device from upper layers
--	 */
--	list_del(&target_reset_list->list);
--
--	ev = kmalloc(sizeof(*ev), GFP_ATOMIC);
--	if (!ev) {
--		dfailprintk((MYIOC_s_WARN_FMT
--		    "%s, failed to allocate mem @%d..!!\n",
--		    ioc->name,__FUNCTION__, __LINE__));
--		return;
--	}
--
--	memset(ev, 0, sizeof(*ev));
--	INIT_WORK(&ev->work, mptsas_hotplug_work, ev);
--	ev->ioc = ioc;
--	ev->handle = le16_to_cpu(sas_event_data->DevHandle);
--	ev->parent_handle = le16_to_cpu(sas_event_data->ParentDevHandle);
--	ev->channel = channel;
--	ev->id = id;
--	ev->phy_id = sas_event_data->PhyNum;
--	memcpy(&sas_address, &sas_event_data->SASAddress, sizeof(u64));
--	ev->sas_address = le64_to_cpu(sas_address);
--	ev->device_info = le32_to_cpu(sas_event_data->DeviceInfo);
--	ev->event_type = MPTSAS_DEL_DEVICE;
--	schedule_work(&ev->work);
--	kfree(target_reset_list);
--
--	/*
--	 * issue target reset to next device in the queue
--	 */
--
--	head = &hd->target_reset_list;
--	if (list_empty(head))
--		return;
--
--	target_reset_list = list_entry(head->next, struct mptscsih_target_reset,
--	    list);
--
--	sas_event_data = &target_reset_list->sas_event_data;
--	id = sas_event_data->TargetID;
--	channel = sas_event_data->Bus;
--
--	if (mptsas_target_reset(ioc, channel, id)) {
--		target_reset_list->target_reset_issued = 1;
--		hd->resetPending = 1;
--	}
--}
-+	.slave_configure		= mptscsih_slave_configure,
-+	.slave_destroy			= mptscsih_slave_destroy,
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11))
-+	.change_queue_depth 		= mptscsih_change_queue_depth,
-+#endif
-+	.eh_abort_handler		= mptscsih_abort,
-+	.eh_device_reset_handler	= mptscsih_dev_reset,
-+	.eh_bus_reset_handler		= mptscsih_bus_reset,
-+	.eh_host_reset_handler		= mptscsih_host_reset,
-+	.bios_param			= mptscsih_bios_param,
-+	.can_queue			= MPT_FC_CAN_QUEUE,
-+	.this_id			= -1,
-+	.sg_tablesize			= MPT_SCSI_SG_DEPTH,
-+	.max_sectors			= 8192,
-+	.cmd_per_lun			= 7,
-+	.use_clustering			= ENABLE_CLUSTERING,
-+	.shost_attrs			= mptsas_host_attrs,
-+	.dump_sanity_check		= mptscsih_sanity_check,
-+	.dump_poll			= mptscsih_poll,
-+};
- 
--/**
-- * mptsas_taskmgmt_complete
-- *
-- * @ioc
-- * @mf
-- * @mr
-- *
-- **/
--static int
--mptsas_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-+static void __devexit mptsas_remove(struct pci_dev *pdev)
- {
--	mptsas_dev_reset_complete(ioc);
--	return mptscsih_taskmgmt_complete(ioc, mf, mr);
-+	flush_scheduled_work();
-+	mptscsih_remove(pdev);
- }
- 
--/**
-- * mptscsih_ioc_reset
-- *
-- * @ioc
-- * @reset_phase
-- *
-- **/
--static int
--mptsas_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
-+static void
-+mptsas_target_reset(MPT_ADAPTER *ioc, VirtDevice * vdevice)
- {
--        MPT_SCSI_HOST   *hd =NULL;
--	struct mptscsih_target_reset	*target_reset_list, *n;
--	int rc;
--
--        if ((ioc->sh != NULL) && (ioc->sh->hostdata != NULL))
--              hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
--
--	rc = mptscsih_ioc_reset(ioc, reset_phase);
-+	MPT_SCSI_HOST		*hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
- 
--	if (reset_phase != MPT_IOC_POST_RESET)
--		goto out;
--
--	if (ioc->bus_type != SAS)
--		goto out;
--       if(hd == NULL)
--               goto out;
--
--
--	if (list_empty(&hd->target_reset_list))
--		goto out;
--
--	/* flush the target_reset_list */
--	list_for_each_entry_safe(target_reset_list, n,
--	    &hd->target_reset_list, list) {
--		list_del(&target_reset_list->list);
--		kfree(target_reset_list);
-+	if (mptscsih_TMHandler(hd,
-+	     MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
-+	     vdevice->bus_id, vdevice->target_id, 0, 0, 5) < 0) {
-+		hd->tmPending = 0;
-+		hd->tmState = TM_STATE_NONE;
-+		printk(MYIOC_s_WARN_FMT
-+	       "Error processing TaskMgmt id=%d TARGET_RESET\n",
-+			ioc->name, vdevice->target_id);
- 	}
--
-- out:
--	return rc;
- }
- 
--
- /****************************************************************************
-  * Supported hardware
-  */
-@@ -1092,13 +225,6 @@ static struct pci_device_id mptsas_pci_t
- MODULE_DEVICE_TABLE(pci, mptsas_pci_table);
- 
- 
--/**
-- * mptscsih_sas_persist_clear_table
-- *
-- *
-- * @ioc
-- *
-- **/
- static void
- mptscsih_sas_persist_clear_table(void * arg)
- {
-@@ -1107,52 +233,76 @@ mptscsih_sas_persist_clear_table(void * 
- 	mptbase_sas_persist_operation(ioc, MPI_SAS_OP_CLEAR_NOT_PRESENT);
- }
- 
--/**
-- * mptsas_hotplug_print
-- *
-- *
-- * @ioc
-- * @hot_plug_info
-- * @msg_string
-- *
-- **/
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* mptbase_sas_update_device_list -
-+ * This is called from the work queue.
-+ * Purpose is to called when a logical volume has been created, deleted,
-+ * or status change.
-+ * Since in SAS the phydisk can be moved to different location, we will need
-+ * to refresh the device list by recreating it.
-+ */
-+static void
-+mptscsih_sas_update_device_list(MPT_ADAPTER *ioc )
-+{
-+	sas_device_info_t *sasDevice, *pNext;
-+
-+	/*
-+	 * Kill everything in the device list, then rediscover
-+	 */
-+	list_for_each_entry_safe(sasDevice, pNext, &ioc->sasDeviceList, list) {
-+		list_del(&sasDevice->list);
-+		kfree(sasDevice);
-+		ioc->alloc_total -= sizeof (sas_device_info_t);
-+	}
-+
-+	if (ioc->sasPhyInfo != NULL) {
-+		kfree(ioc->sasPhyInfo);
-+		ioc->sasPhyInfo = NULL;
-+		ioc->alloc_total -=
-+		    ioc->numPhys * sizeof (sas_phy_info_t);
-+	}
-+	ioc->numPhys = 0;
-+
-+	/*
-+	 *  Rescsan list
-+	 */
-+	mpt_sas_get_info(ioc);
-+}
-+
- static void
- mptsas_hotplug_print(MPT_ADAPTER *ioc, struct mptsas_hotplug_event *hot_plug_info,  u32 lun, u8 * msg_string)
- {
--	char *ds;
-+	char *ds = NULL;
- 	u32 	id = hot_plug_info->id;
--	u32 	channel = hot_plug_info->channel;
- 
--	if ( id >= ioc->DevicesPerBus ) {
--		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n",
--		    ioc->name, __FUNCTION__, id, ioc->DevicesPerBus);
-+	if ( id > ioc->pfacts->MaxDevices ) {
-+		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n",
-+		    ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices);
- 		return;
- 	}
- 
--	if ( channel >= ioc->NumberOfBuses ) {
--		printk(MYIOC_s_WARN_FMT
--		    "%s: Invalid channel=%d, NumberOfBuses=%d\n",
--		    ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses);
--		return;
-+	if (hot_plug_info->isRaid) {
-+		printk(MYIOC_s_INFO_FMT
-+		    "%s device, channel %d, id %d, lun %d\n",
-+			ioc->name, msg_string,
-+			hot_plug_info->channel,
-+			id, lun);
-+	} else {
-+		if (hot_plug_info->device_info &
-+		    MPI_SAS_DEVICE_INFO_SSP_TARGET)
-+			ds = "sas";
-+		if (hot_plug_info->device_info &
-+		    MPI_SAS_DEVICE_INFO_STP_TARGET)
-+			ds = "stp";
-+		if (hot_plug_info->device_info &
-+		    MPI_SAS_DEVICE_INFO_SATA_DEVICE)
-+			ds = "sata";
-+		printk(MYIOC_s_INFO_FMT
-+		    "%s %s device, channel %d, id %d, lun %d,"
-+		    "  phy %d\n", ioc->name, msg_string, ds,
-+		    hot_plug_info->channel, id, lun,
-+		    hot_plug_info->phy_id);
- 	}
--
--	if (hot_plug_info->device_info &
--	    MPI_SAS_DEVICE_INFO_SSP_TARGET)
--		ds = "sas ";
--	else if (hot_plug_info->device_info &
--	    MPI_SAS_DEVICE_INFO_STP_TARGET)
--		ds = "stp ";
--	else if (hot_plug_info->device_info &
--	    MPI_SAS_DEVICE_INFO_SATA_DEVICE)
--		ds = "sata ";
--	else
--		ds = "";
--
--	printk(MYIOC_s_INFO_FMT
--	    "%s %sdevice, channel %d, id %d, lun %d,"
--	    "  phy %d\n", ioc->name, msg_string, ds,
--	    channel, id, lun,
--	    hot_plug_info->phy_id);
- }
- 
- /*
-@@ -1167,32 +317,20 @@ mptsas_remove_target(MPT_ADAPTER *ioc, s
- 	struct Scsi_Host *shost = ioc->sh;
- 	unsigned long flags;
- 	struct scsi_device *sdev;
--	static VirtDevice *pTarget;
- 	u32 channel, id;
-+	MPT_SCSI_HOST	*hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
- 
- 	id = hot_plug_info->id;
--	channel = hot_plug_info->channel;
--
--	if ( id >= ioc->DevicesPerBus ) {
--		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n",
--		    ioc->name, __FUNCTION__, id, ioc->DevicesPerBus);
--		return;
--	}
- 
--	if ( channel >= ioc->NumberOfBuses ) {
--		printk(MYIOC_s_WARN_FMT
--		    "%s: Invalid channel=%d, NumberOfBuses=%d\n",
--		    ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses);
-+	if ( id > ioc->pfacts->MaxDevices ) {
-+		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n",
-+		    ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices);
- 		return;
- 	}
- 
--	pTarget = mptsas_find_vdevice(ioc, channel, id);
--	if (!pTarget)
--		return;
--
--	pTarget->tflags &= ~MPT_TARGET_FLAGS_TLR_DONE;
--
-+	mptsas_target_reset(ioc, hd->Targets[id]);
- 
-+	channel = hot_plug_info->channel;
- 	spin_lock_irqsave(shost->host_lock, flags);
-  restart:
- 	list_for_each_entry(sdev, &shost->__devices, siblings) {
-@@ -1208,46 +346,26 @@ mptsas_remove_target(MPT_ADAPTER *ioc, s
- 	spin_unlock_irqrestore(shost->host_lock, flags);
- }
- 
--/**
-- * mptsas_add_device
-- *
-- *
-- * @ioc
-- * @hot_plug_info
-- *
-- **/
- static void
- mptsas_add_device(MPT_ADAPTER *ioc, struct mptsas_hotplug_event *hot_plug_info,
-     u32 lun)
- {
- 	u32 	channel, id;
-+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14))
- 	struct scsi_device *sdev;
-+#else
-+        int 	error;
-+#endif
- 
- 	id = hot_plug_info->id;
- 
--	if ( id >= ioc->DevicesPerBus ) {
--		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n",
--		    ioc->name, __FUNCTION__, id, ioc->DevicesPerBus);
-+	if ( id > ioc->pfacts->MaxDevices ) {
-+		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n",
-+		    ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices);
- 		return;
- 	}
- 
- 	channel = hot_plug_info->channel;
--	if ( channel >= ioc->NumberOfBuses ) {
--		printk(MYIOC_s_WARN_FMT
--		    "%s: Invalid channel=%d, NumberOfBuses=%d\n",
--		    ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses);
--		return;
--	}
--
--	/*
--	 * avoid adding a device that is already present
--	 */
--	sdev = scsi_device_lookup(ioc->sh, channel, id, lun);
--	if (sdev) {
--		scsi_device_put(sdev);
--		return;
--	}
--
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14))
- 	sdev = scsi_add_device(ioc->sh, channel, id, lun);
- 	if (!IS_ERR(sdev))
-@@ -1261,13 +379,6 @@ mptsas_add_device(MPT_ADAPTER *ioc, stru
- #endif
- }
- 
--/**
-- * scsilun_to_int
-- *
-- *
-- * @scsilun
-- *
-- **/
- static int scsilun_to_int(struct scsi_lun *scsilun)
- {
- 	int i;
-@@ -1298,170 +409,56 @@ mptsas_scan_target(MPT_ADAPTER *ioc, str
- 	u32 		length, channel, id, lun, num_luns;
- 	u8 		*data;
- 	u32		retries;
--	int 		rc;
-+	int 		completion_code;
- 
- 	id = hot_plug_info->id;
--	channel = hot_plug_info->channel;
- 
--	if ( id > ioc->DevicesPerBus ) {
--		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, DevicesPerBus=%d\n",
--		    ioc->name, __FUNCTION__, id, ioc->DevicesPerBus);
--		return;
--	}
--
--	if ( channel >= ioc->NumberOfBuses ) {
--		printk(MYIOC_s_WARN_FMT
--		    "%s: Invalid channel=%d, NumberOfBuses=%d\n",
--		    ioc->name, __FUNCTION__, channel, ioc->NumberOfBuses);
--		return;
--	}
--
--	/*
--	 * Integrated RAID doesn't support REPORT_LUNS, it will timeout
--	 */
--	if (ioc->raid_data.isRaid & (1 << id)) {
--		mptsas_add_device(ioc, hot_plug_info, 0);
-+	if ( id > ioc->pfacts->MaxDevices ) {
-+		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n",
-+		    ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices);
- 		return;
- 	}
- 
--	/* initialize REPORT_LUN params */
-+	channel = hot_plug_info->channel;
- 	lun = 0;
--	lun_data_len = 0;
--	lun_data = NULL;
--	lunp = NULL;
- 
- 	/*
--	 * Test Unit Ready
-+	 * Integrated RAID doesn't support luns greater than 0
- 	 */
--	iocmd.cmd = TEST_UNIT_READY;
--	iocmd.bus = channel;
--	iocmd.id = id;
--	iocmd.lun = lun;
--	iocmd.flags = 0;
--	iocmd.data_dma = -1;
--	iocmd.data = NULL;
--	iocmd.size = 0;
--	dinitprintk((MYIOC_s_INFO_FMT "Sending TURs to channel=%d id=%d \n",
--		ioc->name, channel, id));
--	for (retries = 0; retries < mpt_cmd_retry_count; retries++) {
--		if (mptscsih_do_cmd(hd, &iocmd) < 0) {
--			dinitprintk((MYIOC_s_INFO_FMT
--			    "TUR: mptscsih_do_cmd failed\n",
--			    ioc->name));
--			goto tur_done;
--		}
--
--		if (hd->pLocal == NULL) {
--			dinitprintk((MYIOC_s_INFO_FMT "TUR: no pLocal\n",
--			    ioc->name));
--			goto tur_done;
--		}
--
--		rc = hd->pLocal->completion;
--		if (rc == MPT_SCANDV_GOOD) {
--			dinitprintk((MYIOC_s_INFO_FMT "TUR: succeeded\n",
--			    ioc->name));
--			goto tur_done;
--		} else if (rc == MPT_SCANDV_BUSY) {
--			dinitprintk((MYIOC_s_INFO_FMT "TUR: BUSY\n",
--				ioc->name));
--		         msleep(1000);  /* sleep 1 second */
--			continue;
--		} else if (rc == MPT_SCANDV_SENSE) {
--			u8 skey = hd->pLocal->sense[2] & 0x0F;
--			u8 asc = hd->pLocal->sense[12];
--			u8 ascq = hd->pLocal->sense[13];
--			dinitprintk((MYIOC_s_INFO_FMT
--			    "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n",
--			    ioc->name, skey, asc, ascq));
--
--			if (skey == UNIT_ATTENTION) {
--				dinitprintk((MYIOC_s_INFO_FMT
--				    "TUR: UNIT ATTENTION\n",
--				    ioc->name));
--				continue;
--			} else if ((skey == NOT_READY) &&
--			    (asc == 0x04)&&(ascq == 0x01)) {
--				dinitprintk((MYIOC_s_INFO_FMT
--				    "TUR: Becoming Ready\n",
--				    ioc->name));
--                                    msleep(1000);  /* sleep 1 second */
--				continue;
--			}
--		}
-+	if (hot_plug_info->isRaid) {
-+		mptsas_add_device(ioc, hot_plug_info, lun);
-+		return;
- 	}
- 
-- tur_done:
--
- 	lun_data_len = (MPT_LAST_LUN + 1) * sizeof(struct scsi_lun);
- 	lun_data = pci_alloc_consistent(ioc->pcidev, lun_data_len,
- 	    &lun_data_dma);
- 	if (!lun_data)
--		goto report_luns_done;
-+		goto out;
- 
--	/*
--	 * Report Luns
--	 */
- 	iocmd.cmd = REPORT_LUNS;
- 	iocmd.data_dma = lun_data_dma;
- 	iocmd.data = (u8 *)lun_data;
- 	iocmd.size = lun_data_len;
-+	iocmd.bus = channel;
-+	iocmd.id = id;
-+	iocmd.lun = lun;
- 	iocmd.flags = 0;
- 
- 	/*
--	 * While loop for 10 sec retrying REPORT_LUNS, this is done
-+	 * While loop for 3 sec retrying REPORT_LUNS, this is done
- 	 * because some devices return MPI_SCSI_STATUS_BUSY for several
- 	 * seconds.
- 	 */
--	dinitprintk((MYIOC_s_INFO_FMT
--	   "Sending REPORT_LUNS to channel=%d id=%d \n",
--	    ioc->name, channel, id));
-+//	for (retries = 0; retries < 3; retries++) {  /* EDM - TRY 10 */
- 	for (retries = 0; retries < 10; retries++) {
- 		memset(lun_data, 0, lun_data_len);
--		if (mptscsih_do_cmd(hd, &iocmd) < 0) {
--			dinitprintk((MYIOC_s_INFO_FMT
--			    "RL: mptscsih_do_cmd failed\n", ioc->name));
--			goto report_luns_done;
--		}
--
--		if (hd->pLocal == NULL) {
--			dinitprintk((MYIOC_s_INFO_FMT "RL: no pLocal\n",
--			    ioc->name));
--			goto report_luns_done;
--		}
--
--		rc = hd->pLocal->completion;
--		if (rc == MPT_SCANDV_GOOD) {
--			dinitprintk((MYIOC_s_INFO_FMT "RL: succeeded\n",
--			    ioc->name));
--			goto report_luns_done;
--		} else if (rc == MPT_SCANDV_BUSY) {
--			dinitprintk((MYIOC_s_INFO_FMT "RL: BUSY\n", ioc->name));
--		        msleep(1000);
--			continue;
--		} else if (rc == MPT_SCANDV_SENSE) {
--			u8 skey = hd->pLocal->sense[2] & 0x0F;
--			u8 asc = hd->pLocal->sense[12];
--			u8 ascq = hd->pLocal->sense[13];
--			dinitprintk((MYIOC_s_INFO_FMT
--			    "SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name,
--			    skey, asc, ascq));
--
--			if (skey == UNIT_ATTENTION) {
--				dinitprintk((MYIOC_s_INFO_FMT
--				   "RL: UNIT ATTENTION\n", ioc->name));
--				continue;
--			} else if ((skey == NOT_READY) &&
--			    (asc == 0x04)&&(ascq == 0x01)) {
--				dinitprintk((MYIOC_s_INFO_FMT
--				    "RL: Becoming Ready\n", ioc->name));
--				     msleep(1000);
--                                     continue;
--			}
--		}
-+		completion_code = mptscsih_do_cmd(hd, &iocmd);
-+		if (!completion_code)
-+			break;
-+		msleep(1000);
- 	}
- 
-- report_luns_done:
- 	/*
- 	 * Attaching lun=0
- 	 */
-@@ -1470,8 +467,6 @@ mptsas_scan_target(MPT_ADAPTER *ioc, str
- 	/*
- 	 * Get the length from the first four bytes of lun_data.
- 	 */
--	if (!lun_data)
--		goto out;
- 	data = (u8 *)lun_data;
- 	length = ((data[0] << 24) | (data[1] << 16) |
- 	    (data[2] << 8) | (data[3] << 0));
-@@ -1501,91 +496,93 @@ mptsas_scan_target(MPT_ADAPTER *ioc, str
- 		    lun_data_dma);
- }
- 
--/**
-- * mptsas_hotplug_work
-- *
-- *
-- * @hot_plug_info
-- *
-- **/
- static void
- mptsas_hotplug_work(void *arg)
- {
- 	struct mptsas_hotplug_event *hot_plug_info = arg;
- 	MPT_ADAPTER 		*ioc = hot_plug_info->ioc;
--	u32 			id, channel;
-+	MPT_SCSI_HOST		*hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
-+	VirtDevice		*pTarget;
-+	u32 			id = hot_plug_info->id;
- 
--	id = hot_plug_info->id;
--	channel = hot_plug_info->channel;
- 
- 	dhotpprintk((MYIOC_s_WARN_FMT "Entering %s for channel=%d id=%d\n",
--		ioc->name,__FUNCTION__, channel, id));
-+		ioc->name,__FUNCTION__, 
-+		hot_plug_info->channel, id));
-+
-+
-+	if ( id > ioc->pfacts->MaxDevices ) {
-+		printk(MYIOC_s_WARN_FMT "%s: Invalid id=%d, MaxDevices=%d\n",
-+		    ioc->name, __FUNCTION__, id, ioc->pfacts->MaxDevices);
-+		return;
-+	}
- 
- 	down(&ioc->hot_plug_semaphore);
- 
--	/* If there has been a change to raid, then we need to
--	 * refresh the config raid data
--	 */
--	if (hot_plug_info->refresh_raid_config_pages)
--		mpt_findImVolumes(ioc);
-+	pTarget = hd->Targets[id];
-+	dhotpprintk((MYIOC_s_WARN_FMT "hot_plug_info=%p ioc=%p hd=%p pTarget=%p\n",
-+		    ioc->name, hot_plug_info, ioc, hd, pTarget));
- 
- 	switch  (hot_plug_info->event_type) {
- 	case MPTSAS_DEL_DEVICE:
--#if defined(CPQ_CIM)
--		mptsas_del_device_component(ioc, channel, id);
--		if (hot_plug_info->refresh_raid_config_pages)
--			mptsas_add_device_component_hotspare(ioc);
--#endif
- 		dhotpprintk((MYIOC_s_WARN_FMT
- 		    "MPTSAS_DEL_DEVICE: channel=%d id=%d\n",
--		    ioc->name, channel, id));
-+			ioc->name,
-+			hot_plug_info->channel,
-+			id));
-+		if (pTarget == NULL) {
-+			dhotpprintk((MYIOC_s_WARN_FMT
-+			    "hot_plug id=%d not found in Targets array",
-+				ioc->name,
-+				id));
-+			goto out;
-+		}
-+		pTarget->tflags &= ~MPT_TARGET_FLAGS_TLR_DONE;
-+		pTarget->tflags |= MPT_TARGET_FLAGS_DELETED;
- 		mptsas_remove_target(ioc, hot_plug_info);
- 		break;
- 
- 	case MPTSAS_ADD_DEVICE:
--#if defined(CPQ_CIM)
--		if (ioc->raid_data.isRaid & (1 << id))
--			mptsas_add_device_component_ir(ioc, channel, id);
--#endif
- 		dhotpprintk((MYIOC_s_WARN_FMT
- 		    "MPTSAS_ADD_DEVICE: channel=%d id=%d\n",
--		    ioc->name, channel, id));
-+			ioc->name,
-+			hot_plug_info->channel,
-+			id));
-+		if (pTarget) {
-+			dhotpprintk((MYIOC_s_WARN_FMT
-+			    "hot_plug id=%d already in Targets array",
-+				ioc->name,
-+				id));
-+			goto out;
-+		}
- 		mptsas_scan_target(ioc, hot_plug_info);
- 		break;
--#if defined(CPQ_CIM)
--	case MPTSAS_ADD_INACTIVE_VOLUME:
--		dhotpprintk((MYIOC_s_WARN_FMT
--		    "MPTSAS_ADD_INACTIVE_VOLUME: channel=%d id=%d\n",
--		    ioc->name, channel, id));
--		mptsas_add_device_component_ir(ioc, channel, id);
--		break;
--	case MPTSAS_PHYSDISK_ADD:
--		mptsas_add_device_component_single(ioc, channel, id);
--		break;
--#endif
- 	default:
- 		dhotpprintk((MYIOC_s_WARN_FMT
--		    "Unknown hot_plug event_type=%x: channel=%d id=%d "
--		    " skipping\n", ioc->name, hot_plug_info->event_type,
--		    channel, id));
--		goto out;
-+		    "Unknown hot_plug event_type=%x: channel=%d id=%d\n",
-+			ioc->name,
-+			hot_plug_info->event_type,
-+			hot_plug_info->channel,
-+			id));
-+		break;
-+	}
-+
-+	/* If there has been a change to raid, then we need to
-+	 * refresh the config raid data, and sas device link list
-+	 */
-+	if (hot_plug_info->isRaid) {
-+		mpt_findImVolumes(ioc);
-+		mptscsih_sas_update_device_list(ioc);
- 	}
- 
-  out:
- 	dhotpprintk((MYIOC_s_WARN_FMT "%s: kfree hot_plug_info=%p\n",
--	    ioc->name,__FUNCTION__, hot_plug_info));
-+		    ioc->name,__FUNCTION__, hot_plug_info));
- 	kfree(hot_plug_info);
- 	up(&ioc->hot_plug_semaphore);
- }
- 
--/**
-- * mptsas_send_sas_event
-- *
-- *
-- * @ioc
-- * @sas_event_data
-- *
-- **/
-+
- static void
- mptsas_send_sas_event(MPT_ADAPTER *ioc,
- 		EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *sas_event_data)
-@@ -1610,11 +607,8 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc,
- 	}
- 
- 	switch (sas_event_data->ReasonCode) {
--	case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
--		mptsas_target_reset_queue(ioc, sas_event_data);
--		break;
--
- 	case MPI_EVENT_SAS_DEV_STAT_RC_ADDED:
-+	case MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING:
- 		ev = kmalloc(sizeof(*ev), GFP_ATOMIC);
- 		if (!ev) {
- 			printk(KERN_WARNING "mptsas: lost hotplug event\n");
-@@ -1642,7 +636,6 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc,
- 			ev->event_type = MPTSAS_DEL_DEVICE;
- 		schedule_work(&ev->work);
- 		break;
--
- 	case MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED:
- 	/*
- 	 * Persistent table is full.
-@@ -1652,7 +645,6 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc,
- 		    (void *)ioc);
- 		schedule_work(&ioc->mptscsih_persistTask);
- 		break;
--
- 	case MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA:
- 	/* TODO */
- 	case MPI_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET:
-@@ -1662,21 +654,12 @@ mptsas_send_sas_event(MPT_ADAPTER *ioc,
- 	}
- }
- 
--/**
-- * mptsas_send_raid_event
-- *
-- *
-- * @ioc
-- * @raid_event_data
-- *
-- **/
- static void
- mptsas_send_raid_event(MPT_ADAPTER *ioc,
- 		EVENT_DATA_RAID *raid_event_data)
- {
- 	struct mptsas_hotplug_event *ev;
--	int status = le32_to_cpu(raid_event_data->SettingsStatus);
--	int state = (status >> 8) & 0xff;
-+	RAID_VOL0_STATUS * volumeStatus;
- 
- 	if (ioc->bus_type != SAS)
- 		return;
-@@ -1688,13 +671,11 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc,
- 	}
- 
- 	memset(ev,0,sizeof(struct mptsas_hotplug_event));
-+	INIT_WORK(&ev->work, mptsas_hotplug_work, ev);
- 	ev->ioc = ioc;
- 	ev->id = raid_event_data->VolumeID;
--	ev->channel = raid_event_data->VolumeBus;
--	ev->refresh_raid_config_pages = 1;
-+	ev->isRaid=1;
- 
--	devtprintk((KERN_INFO MYNAM ": VolumeID=%d Reason=%x received\n",
--	    ev->id, raid_event_data->ReasonCode));
- 	switch (raid_event_data->ReasonCode) {
- 	case MPI_EVENT_RAID_RC_PHYSDISK_DELETED:
- 		ev->event_type = MPTSAS_ADD_DEVICE;
-@@ -1702,24 +683,6 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc,
- 	case MPI_EVENT_RAID_RC_PHYSDISK_CREATED:
- 		ev->event_type = MPTSAS_DEL_DEVICE;
- 		break;
--	case MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED:
--		switch (state) {
--		case MPI_PD_STATE_ONLINE:
--		case MPI_PD_STATE_NOT_COMPATIBLE:
--			ev->event_type = MPTSAS_PHYSDISK_ADD;
--			break;
--		case MPI_PD_STATE_MISSING:
--		case MPI_PD_STATE_OFFLINE_AT_HOST_REQUEST:
--		case MPI_PD_STATE_FAILED_AT_HOST_REQUEST:
--		case MPI_PD_STATE_OFFLINE_FOR_ANOTHER_REASON:
--			ev->event_type = MPTSAS_DEL_DEVICE;
--			break;
--		default:
--			devtprintk((KERN_INFO MYNAM
--			    ": ignoring this event! %d\n", __LINE__));
--			return;
--		}
--		break;
- 	case MPI_EVENT_RAID_RC_VOLUME_DELETED:
- 		ev->event_type = MPTSAS_DEL_DEVICE;
- 		break;
-@@ -1727,68 +690,18 @@ mptsas_send_raid_event(MPT_ADAPTER *ioc,
- 		ev->event_type = MPTSAS_ADD_DEVICE;
- 		break;
- 	case MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED:
--		switch (state) {
--		case MPI_RAIDVOL0_STATUS_STATE_FAILED:
--		case MPI_RAIDVOL0_STATUS_STATE_MISSING:
--			ev->event_type = MPTSAS_DEL_DEVICE;
--			break;
--		case MPI_RAIDVOL0_STATUS_STATE_OPTIMAL:
--		case MPI_RAIDVOL0_STATUS_STATE_DEGRADED:
--			ev->event_type = MPTSAS_ADD_DEVICE;
--			break;
--		default:
--			devtprintk((KERN_INFO MYNAM
--			    ": ignoring this event! %d\n", __LINE__));
--			return;
--		}
-+		volumeStatus = (RAID_VOL0_STATUS *) &
-+		    raid_event_data->SettingsStatus;
-+		ev->event_type = (volumeStatus->State ==
-+		    MPI_RAIDVOL0_STATUS_STATE_FAILED) ?
-+		    MPTSAS_DEL_DEVICE : MPTSAS_ADD_DEVICE;
- 		break;
- 	default:
--		devtprintk((KERN_INFO MYNAM
--		    ": ignoring this event! %d\n", __LINE__));
--		return;
-+		break;
- 	}
--	INIT_WORK(&ev->work, mptsas_hotplug_work, ev);
- 	schedule_work(&ev->work);
- }
- 
--#if defined(CPQ_CIM)
--/*
-- * mptsas_send_ir2_event
-- *
-- * This handle exposing hidden disk when an inactive raid volume is added
-- */
--static void
--mptsas_send_ir2_event(MPT_ADAPTER *ioc, PTR_MPI_EVENT_DATA_IR2 ir2_data)
--{
--	struct mptsas_hotplug_event *ev;
--
--	if (ir2_data->ReasonCode !=
--	    MPI_EVENT_IR2_RC_FOREIGN_CFG_DETECTED)
--		return;
--
--	ev = kmalloc(sizeof(*ev), GFP_ATOMIC);
--	if (!ev)
--		return;
--	memset(ev, 0, sizeof(*ev));
--	ev->ioc = ioc;
--	ev->id = ir2_data->TargetID;
--	ev->channel = ir2_data->Bus;
--	ev->refresh_raid_config_pages = 1;
--	ev->event_type = MPTSAS_ADD_INACTIVE_VOLUME;
--
--	INIT_WORK(&ev->work, mptsas_hotplug_work, ev);
--	schedule_work(&ev->work);
--};
--#endif
--
--/**
-- * mptsas_event_process
-- *
-- *
-- * @ioc
-- * @reply
-- *
-- **/
- static int
- mptsas_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *reply)
- {
-@@ -1803,16 +716,10 @@ mptsas_event_process(MPT_ADAPTER *ioc, E
- 
- 	switch (event) {
- 	case MPI_EVENT_SAS_DEVICE_STATUS_CHANGE:
--#if defined(CPQ_CIM)
--		ioc->csmi_change_count++;
--#endif
- 		mptsas_send_sas_event(ioc,
- 			(EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *)reply->Data);
- 		break;
- 	case MPI_EVENT_INTEGRATED_RAID:
--#if defined(CPQ_CIM)
--		ioc->csmi_change_count++;
--#endif
- 		mptsas_send_raid_event(ioc,
- 			(EVENT_DATA_RAID *)reply->Data);
- 		break;
-@@ -1822,13 +729,6 @@ mptsas_event_process(MPT_ADAPTER *ioc, E
- 		    (void *)ioc);
- 		schedule_work(&ioc->mptscsih_persistTask);
- 		break;
--#if defined(CPQ_CIM)
--	case MPI_EVENT_IR2:
--		ioc->csmi_change_count++;
--		mptsas_send_ir2_event(ioc,
--		    (PTR_MPI_EVENT_DATA_IR2)reply->Data);
--		break;
--#endif
- 	default:
- 		rc = mptscsih_event_process(ioc, reply);
- 		break;
-@@ -1855,13 +755,12 @@ mptsas_probe(struct pci_dev *pdev, const
- 	MPT_ADAPTER 		*ioc;
- 	unsigned long		 flags;
- 	int			 sz, ii;
-+	int			 numSGE = 0;
-+	int			 scale;
- 	int			 ioc_cap;
- 	u8			*mem;
- 	int			error=0;
- 	int			r;
--#if defined(CPQ_CIM)
--	struct mptsas_portinfo	*port_info;
--#endif
- 
- 	if ((r = mpt_attach(pdev,id)) != 0)
- 		return r;
-@@ -1874,27 +773,19 @@ mptsas_probe(struct pci_dev *pdev, const
- 	/*  Added sanity check on readiness of the MPT adapter.
- 	 */
- 	if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) {
--                 if(mpt_enable_deadioc_detect)
--	             return 0;
--                 else {
--                  printk(MYIOC_s_WARN_FMT
--                         "Skipping because it's not operational!\n", ioc->name);
--                      error = -ENODEV;
--               goto out_mptsas_probe;
--                 }
-+		printk(MYIOC_s_WARN_FMT
-+		  "Skipping because it's not operational!\n",
-+		  ioc->name);
-+		error = -ENODEV;
-+		goto out_mptsas_probe;
- 	}
- 
- 	if (!ioc->active) {
--	      if(mpt_enable_deadioc_detect)
--                      return 0;
--               else {
--
--              printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n",
-+		printk(MYIOC_s_WARN_FMT "Skipping because it's disabled!\n",
- 		  ioc->name);
- 		error = -ENODEV;
- 		goto out_mptsas_probe;
- 	}
--     }
- 
- 	/*  Sanity check - ensure at least 1 port is INITIATOR capable
- 	 */
-@@ -1906,8 +797,9 @@ mptsas_probe(struct pci_dev *pdev, const
- 	}
- 
- 	if (!ioc_cap) {
--		printk(MYIOC_s_WARN_FMT "Skipping ioc=%p because SCSI "
--		    "Initiator mode is NOT enabled!\n", ioc->name, ioc);
-+		printk(MYIOC_s_WARN_FMT
-+			"Skipping ioc=%p because SCSI Initiator mode is NOT enabled!\n",
-+			ioc->name, ioc);
- 		return 0;
- 	}
- 
-@@ -1915,8 +807,8 @@ mptsas_probe(struct pci_dev *pdev, const
- 
- 	if (!sh) {
- 		printk(MYIOC_s_WARN_FMT
--		    "Unable to register controller with SCSI subsystem\n",
--		    ioc->name);
-+			"Unable to register controller with SCSI subsystem\n",
-+			ioc->name);
- 		error = -1;
- 		goto out_mptsas_probe;
-         }
-@@ -1939,19 +831,49 @@ mptsas_probe(struct pci_dev *pdev, const
- 	else
- 		sh->can_queue = ioc->req_depth;
- 	dinitprintk((MYIOC_s_INFO_FMT
--	    "mpt_can_queue=%d req_depth=%d can_queue=%d\n",
--	    ioc->name, mpt_can_queue, ioc->req_depth, sh->can_queue));
-+		"mpt_can_queue=%d req_depth=%d can_queue=%d\n",
-+		ioc->name, mpt_can_queue, ioc->req_depth,
-+		sh->can_queue));
- 
--	sh->max_id = ioc->DevicesPerBus;
-+	sh->max_id = ioc->pfacts->MaxDevices + 1;
- 
- 	sh->max_lun = MPT_LAST_LUN + 1;
--	sh->max_channel = ioc->NumberOfBuses - 1;
-+	sh->max_channel = 0;
- 	sh->this_id = ioc->pfacts[0].PortSCSIID;
- 
- 	/* Required entry.
- 	 */
- 	sh->unique_id = ioc->id;
--	sh->sg_tablesize = ioc->sg_tablesize;
-+
-+	/* Verify that we won't exceed the maximum
-+	 * number of chain buffers
-+	 * We can optimize:  ZZ = req_sz/sizeof(SGE)
-+	 * For 32bit SGE's:
-+	 *  numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ
-+	 *               + (req_sz - 64)/sizeof(SGE)
-+	 * A slightly different algorithm is required for
-+	 * 64bit SGEs.
-+	 */
-+	scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
-+	if (sizeof(dma_addr_t) == sizeof(u64)) {
-+		numSGE = (scale - 1) *
-+		  (ioc->facts.MaxChainDepth-1) + scale +
-+		  (ioc->req_sz - 60) / (sizeof(dma_addr_t) +
-+		  sizeof(u32));
-+	} else {
-+		numSGE = 1 + (scale - 1) *
-+		  (ioc->facts.MaxChainDepth-1) + scale +
-+		  (ioc->req_sz - 64) / (sizeof(dma_addr_t) +
-+		  sizeof(u32));
-+	}
-+
-+	if (numSGE < sh->sg_tablesize) {
-+		/* Reset this value */
-+		dprintk((MYIOC_s_INFO_FMT
-+		  "Resetting sg_tablesize to %d from %d\n",
-+		  ioc->name, numSGE, sh->sg_tablesize));
-+		sh->sg_tablesize = numSGE;
-+	}
- 
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	/* Set the pci device pointer in Scsi_Host structure.
-@@ -1968,7 +890,7 @@ mptsas_probe(struct pci_dev *pdev, const
- 	 * (with size equal to req_depth*PtrSz!)
- 	 */
- 	sz = ioc->req_depth * sizeof(void *);
--	mem = kmalloc(sz, GFP_KERNEL);
-+	mem = kmalloc(sz, GFP_ATOMIC);
- 	if (mem == NULL) {
- 		error = -ENOMEM;
- 		goto out_mptsas_probe;
-@@ -1978,26 +900,25 @@ mptsas_probe(struct pci_dev *pdev, const
- 	hd->ScsiLookup = (struct scsi_cmnd **) mem;
- 
- 	dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n",
--	    ioc->name, hd->ScsiLookup, sz));
-+		 ioc->name, hd->ScsiLookup, sz));
- 
--	for (ii=0; ii < ioc->NumberOfBuses; ii++) {
--		/* Allocate memory for the device structures.
--		 * A non-Null pointer at an offset
--		 * indicates a device exists.
--		 */
--		sz = ioc->DevicesPerBus * sizeof(void *);
--		mem = kmalloc(sz, GFP_KERNEL);
--		if (mem == NULL) {
--			error = -ENOMEM;
--			goto out_mptsas_probe;
--		}
-+	/* Allocate memory for the device structures.
-+	 * A non-Null pointer at an offset
-+	 * indicates a device exists.
-+	 * max_id = 1 + maximum id (hosts.h)
-+	 */
-+	sz = sh->max_id * sizeof(void *);
-+	mem = kmalloc(sz, GFP_ATOMIC);
-+	if (mem == NULL) {
-+		error = -ENOMEM;
-+		goto out_mptsas_probe;
-+	}
- 
--		memset(mem, 0, sz);
--		ioc->Target_List[ii] = (struct _MPT_DEVICE *) mem;
-+	memset(mem, 0, sz);
-+	hd->Targets = (VirtDevice **) mem;
- 
--		dinitprintk((KERN_INFO " For Bus=%d, Target_List=%p sz=%d\n",
--		    ii, mem, sz));
--	}
-+	dprintk((KERN_INFO
-+	  "  Targets @ %p, sz=%d\n", hd->Targets, sz));
- 
- 	/* Clear the TM flags
- 	 */
-@@ -2013,18 +934,13 @@ mptsas_probe(struct pci_dev *pdev, const
- 	 */
- 	hd->cmdPtr = NULL;
- 
--	/* Initialize this IOC's  timers
-+	/* Initialize this SCSI Hosts' timers
- 	 * To use, set the timer expires field
--	 * and add_timer. Used for internally
--         * generated commands.
-+	 * and add_timer
- 	 */
--       init_timer(&hd->InternalCmdTimer);
--       hd->InternalCmdTimer.data = (unsigned long) hd;
--       hd->InternalCmdTimer.function = mptscsih_InternalCmdTimer_expired;
--
--       init_timer(&ioc->TMtimer);
--       ioc->TMtimer.data = (unsigned long) ioc;
--       ioc->TMtimer.function = mptscsih_TM_timeout;
-+	init_timer(&hd->timer);
-+	hd->timer.data = (unsigned long) hd;
-+	hd->timer.function = mptscsih_timer_expired;
- 
- 	init_MUTEX(&ioc->hot_plug_semaphore);
- 
-@@ -2038,50 +954,24 @@ mptsas_probe(struct pci_dev *pdev, const
- 		    ioc, MPI_SAS_OP_CLEAR_ALL_PERSISTENT);
- 	}
- 
--	ddvprintk((MYIOC_s_INFO_FMT "mpt_pq_filter %x mpt_pq_filter %x\n",
--	    ioc->name, mpt_pq_filter, mpt_pq_filter));
-+	ddvprintk((MYIOC_s_INFO_FMT
-+		"mpt_pq_filter %x mpt_pq_filter %x\n",
-+		ioc->name,
-+		mpt_pq_filter,
-+		mpt_pq_filter));
- 
- 	init_waitqueue_head(&hd->scandv_waitq);
- 	hd->scandv_wait_done = 0;
- 	hd->last_queue_full = 0;
- 
--        init_waitqueue_head(&hd->TM_waitq);
--        hd->TM_wait_done = 0;
--
--	INIT_LIST_HEAD(&hd->target_reset_list);
--
--#if defined(CPQ_CIM)
--	INIT_LIST_HEAD(&ioc->sas_device_info_list);
--	init_MUTEX(&ioc->sas_device_info_mutex);
--	port_info = kmalloc(sizeof(*port_info), GFP_KERNEL);
--	if (port_info && !mptsas_sas_io_unit_pg0(ioc, port_info))
--		ioc->num_ports = port_info->num_phys;
--	kfree(port_info);
--#endif
--
- 	error = scsi_add_host (sh, &ioc->pcidev->dev);
- 	if(error) {
--		dprintk((KERN_ERR MYNAM "scsi_add_host failed\n"));
-+		dprintk((KERN_ERR MYNAM
-+		  "scsi_add_host failed\n"));
- 		goto out_mptsas_probe;
- 	}
- 
- 	scsi_scan_host(sh);
--
--#if defined(CPQ_CIM)
--	/*
--	 * Handling Inactive Volumes
--	 */
--	if (!ioc->ir_firmware ||
--	    !ioc->raid_data.pIocPg2 ||
--	    !ioc->raid_data.pIocPg2->NumActiveVolumes)
--	return 0;
--
--	for (ii = 0; ii < ioc->raid_data.pIocPg2->NumActiveVolumes; ii++)
--		mptsas_add_device_component_ir(ioc,
--		    ioc->raid_data.pIocPg2->RaidVolume[ii].VolumeBus,
--		    ioc->raid_data.pIocPg2->RaidVolume[ii].VolumeID);
--#endif
--
- 	return 0;
- 
- out_mptsas_probe:
-@@ -2122,17 +1012,17 @@ mptsas_init(void)
- 	show_mptmod_ver(my_NAME, my_VERSION);
- 
- 	mptsasDoneCtx = mpt_register(mptscsih_io_done, MPTSAS_DRIVER);
--	mptsasTaskCtx = mpt_register(mptsas_taskmgmt_complete, MPTSAS_DRIVER);
-+	mptsasTaskCtx = mpt_register(mptscsih_taskmgmt_complete, MPTSAS_DRIVER);
- 	mptsasInternalCtx = mpt_register(mptscsih_scandv_complete, MPTSAS_DRIVER);
- 
- 	if (mpt_event_register(mptsasDoneCtx, mptsas_event_process) == 0) {
- 		devtprintk((KERN_INFO MYNAM
--		    ": Registered for sas IOC event notifications\n"));
-+		  ": Registered for sas IOC event notifications\n"));
- 	}
- 
--	if (mpt_reset_register(mptsasDoneCtx, mptsas_ioc_reset) == 0) {
-+	if (mpt_reset_register(mptsasDoneCtx, mptscsih_ioc_reset) == 0) {
- 		dprintk((KERN_INFO MYNAM
--		    ": Registered for IOC reset notifications\n"));
-+		  ": Registered for IOC reset notifications\n"));
- 	}
- 
- 	return pci_register_driver(&mptsas_driver);
-@@ -2151,11 +1041,11 @@ mptsas_exit(void)
- 
- 	mpt_reset_deregister(mptsasDoneCtx);
- 	dprintk((KERN_INFO MYNAM
--	    ": Deregistered for IOC reset notifications\n"));
-+	  ": Deregistered for IOC reset notifications\n"));
- 
- 	mpt_event_deregister(mptsasDoneCtx);
- 	dprintk((KERN_INFO MYNAM
--	    ": Deregistered for IOC event notifications\n"));
-+	  ": Deregistered for IOC event notifications\n"));
- 
- 	mpt_deregister(mptsasInternalCtx);
- 	mpt_deregister(mptsasTaskCtx);
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.h linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptsas.h	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptsas.h	1970-01-01 01:00:00.000000000 +0100
-@@ -1,166 +0,0 @@
--/*
-- *  linux/drivers/message/fusion/mptsas.h
-- *      High performance SCSI + LAN / Fibre Channel device drivers.
-- *      For use with PCI chip/adapter(s):
-- *          LSIFC9xx/LSI409xx Fibre Channel
-- *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-- *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-- *
-- */
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/*
--    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; version 2 of the License.
--
--    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.
--
--    NO WARRANTY
--    THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR
--    CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT
--    LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
--    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is
--    solely responsible for determining the appropriateness of using and
--    distributing the Program and assumes all risks associated with its
--    exercise of rights under this Agreement, including but not limited to
--    the risks and costs of program errors, damage to or loss of data,
--    programs or equipment, and unavailability or interruption of operations.
--
--    DISCLAIMER OF LIABILITY
--    NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY
--    DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
--    DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
--    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
--    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
--    USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED
--    HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES
--
--    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  02111-1307  USA
--*/
--
--#ifndef MPTSAS_H_INCLUDED
--#define MPTSAS_H_INCLUDED
--/*{-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--
--struct mptscsih_target_reset {
--	struct list_head 	list;
--	EVENT_DATA_SAS_DEVICE_STATUS_CHANGE sas_event_data;
--	u8	target_reset_issued;
--};
--
--enum mptsas_hotplug_action {
--	MPTSAS_ADD_DEVICE,
--	MPTSAS_DEL_DEVICE,
--	MPTSAS_ADD_INACTIVE_VOLUME,
--	MPTSAS_PHYSDISK_ADD,
--};
--
--struct mptsas_hotplug_event {
--	struct work_struct	work;
--	MPT_ADAPTER		*ioc;
--	enum mptsas_hotplug_action event_type;
--	u64			sas_address;
--	u32			channel;
--	u32			id;
--	u32			device_info;
--	u16			handle;
--	u16			parent_handle;
--	u8			phy_id;
--	u8			refresh_raid_config_pages;
--};
--
--/*
-- * SAS topology structures
-- *
-- * The MPT Fusion firmware interface spreads information about the
-- * SAS topology over many manufacture pages, thus we need some data
-- * structure to collect it and process it for the SAS transport class.
-- */
--
--struct mptsas_devinfo {
--	u16	handle;		/* unique id to address this device */
--	u16	handle_parent;	/* unique id to address parent device */
--	u16	handle_enclosure; /* enclosure identifier of the enclosure */
--	u16	slot;		/* physical slot in enclosure */
--	u8	phy_id;		/* phy number of parent device */
--	u8	port_id;	/* sas physical port this device
--				   is assoc'd with */
--	u8	id;		/* logical target id of this device */
--	u32	phys_disk_num;	/* phys disk id, for csmi-ioctls */
--	u8	channel;	/* logical bus number of this device */
--	u64	sas_address;    /* WWN of this device,
--				   SATA is assigned by HBA,expander */
--	u32	device_info;	/* bitfield detailed info about this device */
--#if !defined(MPT_WIDE_PORT_API)
--	u8	wide_port_enable;	/* when set, this is part of wide port*/
--#endif
--};
--
--/*
-- * Specific details on ports, wide/narrow
-- */
--struct mptsas_portinfo_details{
--#if !defined(MPT_WIDE_PORT_API)
--	u8	port_id; 	/* port number provided to transport */
--	u8	rphy_id; 	/* phy index used for reporting end device*/
--	u32	device_info;	/* bitfield detailed info about this device */
--#endif
--	u16	num_phys;	/* number of phys beloing to this port */
--	u64	phy_bitmask; 	/* this needs extending to support 128 phys */
--	struct sas_rphy *rphy; /* rphy for end devices */
--#if defined(MPT_WIDE_PORT_API)
--	struct sas_port *port;	/* transport layer port object */
--#endif
--	struct scsi_target *starget;
--	struct mptsas_portinfo *port_info;
--};
--
--struct mptsas_phyinfo {
--	u8	phy_id; 		/* phy index */
--	u8	port_id; 		/* port number this phy is part of */
--	u8	negotiated_link_rate;	/* nego'd link rate for this phy */
--	u8	hw_link_rate; 		/* hardware max/min phys link rate */
--	u8	programmed_link_rate;	/* programmed max/min phy link rate */
--#if defined(MPT_WIDE_PORT_API)
--	u8	sas_port_add_phy;	/* flag to request sas_port_add_phy*/
--#endif
--#if defined(CPQ_CIM)
--	u8	change_count;		/* change count of the phy */
--	u8	port_flags;		/* info wrt host sas ports */
--#endif
--	u32	phy_info;		/* various info wrt the phy */
--	struct mptsas_devinfo identify;	/* point to phy device info */
--	struct mptsas_devinfo attached;	/* point to attached device info */
--	struct sas_phy *phy;
--	struct mptsas_portinfo *portinfo;
--	struct mptsas_portinfo_details * port_details;
--};
--
--struct mptsas_portinfo {
--	struct list_head list;
--	u16		handle;		/* unique id to address this */
--	u16		num_phys;	/* number of phys */
--	struct mptsas_phyinfo *phy_info;
--};
--
--struct mptsas_enclosure {
--	u64	enclosure_logical_id;	/* The WWN for the enclosure */
--	u16	enclosure_handle;	/* unique id to address this */
--	u16	flags;			/* details enclosure management */
--	u16	num_slot;		/* num slots */
--	u16	start_slot;		/* first slot */
--	u8	start_id;		/* starting logical target id */
--	u8	start_channel;		/* starting logical channel id */
--	u8	sep_id;			/* SEP device logical target id */
--	u8	sep_channel;		/* SEP channel logical channel id */
--};
--
--/*}-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--#endif
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptscsi.c linux-2.6.9-55.0.12/drivers/message/fusion/mptscsi.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptscsi.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptscsi.c	2007-11-02 09:10:23.000000000 +0100
-@@ -3,8 +3,8 @@
-  *      For use with LSI Logic PCI chip/adapter(s)
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  *  $Id: mptscsih.c,v 1.1.2.4 2003/05/07 14:08:34 Exp $
-  */
-@@ -74,7 +74,6 @@
- MODULE_AUTHOR(MODULEAUTHOR);
- MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
--MODULE_VERSION(my_VERSION);
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- 
-@@ -83,6 +82,13 @@ typedef struct _BIG_SENSE_BUF {
- } BIG_SENSE_BUF;
- 
- #define OEM_TLR_COMMAND			0xC2
-+#define MPT_SCANDV_GOOD			(0x00000000) /* must be 0 */
-+#define MPT_SCANDV_DID_RESET		(0x00000001)
-+#define MPT_SCANDV_SENSE		(0x00000002)
-+#define MPT_SCANDV_SOME_ERROR		(0x00000004)
-+#define MPT_SCANDV_SELECTION_TIMEOUT	(0x00000008)
-+#define MPT_SCANDV_ISSUE_SENSE		(0x00000010)
-+#define MPT_SCANDV_FALLBACK		(0x00000020)
- 
- #define MPT_SCANDV_MAX_RETRIES		(10)
- 
-@@ -116,37 +122,44 @@ typedef struct _dv_parameters {
- int		mptscsih_io_done(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
- static void	mptscsih_report_queue_full(struct scsi_cmnd *sc, SCSIIOReply_t *pScsiReply, SCSIIORequest_t *pScsiReq);
- int		mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
-+
- static int	mptscsih_AddSGE(MPT_ADAPTER *ioc, struct scsi_cmnd *SCpnt,
- 				 SCSIIORequest_t *pReq, int req_idx);
- static void	mptscsih_freeChainBuffers(MPT_ADAPTER *ioc, int req_idx);
- static void	mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply);
- static int	mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd);
--static int	SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc);
--int		mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u8 lun, int ctx2abort, ulong timeout);
--static int	mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 id, u8 lun, int ctx2abort, ulong timeout);
-+static int	mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout );
-+static u32	SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc);
-+
-+int		mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout);
-+static int	mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout);
- 
- int		mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
- int		mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
--static void	mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus, int id, u8 lun, char *data, int dlen);
--static void	mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *pTarget, char byte56);
--static void	mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int id);
--static int	mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int id, int bus);
-+
-+static void	mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus_id, int target_id, u8 lun, char *data, int dlen);
-+static void	mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56);
-+static void	mptscsih_set_dvflags(MPT_SCSI_HOST *hd, SCSIIORequest_t *pReq);
-+static void	mptscsih_setDevicePage1Flags (u8 width, u8 factor, u8 offset, int *requestedPtr, int *configurationPtr, u8 flags);
-+static void	mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int target_id);
-+static int	mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target, int flags);
-+static int	mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus);
- int		mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
--void           mptscsih_InternalCmdTimer_expired(unsigned long data);
-+void		mptscsih_timer_expired(unsigned long data);
- static int	mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum);
- 
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
- static int	mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io);
- static void	mptscsih_domainValidation(void *hd);
--static int	mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int channel, int id);
-+static int	mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id);
- static void	mptscsih_qas_check(MPT_SCSI_HOST *hd, int id);
--static int	mptscsih_doDv(MPT_SCSI_HOST *hd, int channel, int id);
--static void    mptscsih_post_PendingMF_command(MPT_ADAPTER *ioc);
-+static int	mptscsih_doDv(MPT_SCSI_HOST *hd, int channel, int target);
- static void	mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage);
--static MPT_FRAME_HDR * mptscsih_search_PendingMF(MPT_ADAPTER *ioc, struct scsi_cmnd * sc);
- static void	mptscsih_fillbuf(char *buffer, int size, int index, int width);
-+static void	mptscsih_set_dvflags_raid(MPT_SCSI_HOST *hd, int id);
- #endif
--static void	mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevice *pTarget);
-+static void
-+mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevice *pTarget);
- 
- void		mptscsih_remove(struct pci_dev *);
- // This was changed in the 2.6.13 kernel
-@@ -169,6 +182,8 @@ int mptscsih_resume(struct pci_dev *pdev
-  */
- static spinlock_t dvtaskQ_lock = SPIN_LOCK_UNLOCKED;
- static int dvtaskQ_active = 0;
-+static int dvtaskQ_release = 0;
-+static struct work_struct	dvTaskQ_task;
- #endif
- 
- 
-@@ -560,7 +575,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 	}
- 
- 	sc = hd->ScsiLookup[req_idx];
--	hd->ScsiLookup[req_idx] = NULL;
- 	if (sc == NULL) {
- 		MPIHeader_t *hdr = (MPIHeader_t *)mf;
- 
-@@ -575,10 +589,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 		mptscsih_freeChainBuffers(ioc, req_idx);
- 		return 1;
- 	}
--	if ((unsigned char *)mf != sc->host_scribble) {
--		mptscsih_freeChainBuffers(ioc, req_idx);
--		return 1;
--	}
- 
- 	sc->result = DID_OK << 16;		/* Set default reply as OK */
- 	pScsiReq = (SCSIIORequest_t *) mf;
-@@ -601,12 +611,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 		u32	 xfer_cnt;
- 		u16	 ioc_status;
- 		u8	 scsi_state, scsi_status;
--#ifdef MPT_DEBUG_ERROR
--               u8       ii, skey, asc, ascq;
--#endif
--	        struct _MPT_DEVICE	*pMptTarget;
--		VirtDevice	*pTarget;
--		int	 bus, id;
-+		VirtDevice		*pTarget;
-+		int	 target;
- 
- 		ioc_status = le16_to_cpu(pScsiReply->IOCStatus) & MPI_IOCSTATUS_MASK;
- 		scsi_state = pScsiReply->SCSIState;
-@@ -627,35 +633,18 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 			ioc_status = MPI_IOCSTATUS_SUCCESS;
- 		}
- 
--#ifdef MPT_DEBUG_ERR
--		if (ioc_status != MPI_IOCSTATUS_SCSI_DEVICE_NOT_THERE) {	/* 0x0043 */
--			derrprintk((KERN_NOTICE "Reply ha=%d id=%d lun=%d:\n"
--				"IOCStatus=%04x SCSIState=%02x SCSIStatus=%02x\n"
--				"resid=%d bufflen=%d xfer_cnt=%d\n",
--				ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1],
--				ioc_status, scsi_state, scsi_status, sc->resid,
--				sc->request_bufflen, xfer_cnt));
--		}
--#endif
-+		dreplyprintk((KERN_NOTICE "Reply ha=%d id=%d lun=%d:\n"
-+			"IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh\n"
-+			"resid=%d bufflen=%d xfer_cnt=%d\n",
-+			ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1],
-+			ioc_status, scsi_state, scsi_status, sc->resid,
-+			sc->request_bufflen, xfer_cnt));
- 
--		if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID){
-+		if (scsi_state & MPI_SCSI_STATE_AUTOSENSE_VALID)
- 			mptscsih_copy_sense_data(sc, hd, mf, pScsiReply);
- 
--#ifdef MPT_DEBUG_ERROR
--                       skey = sc->sense_buffer[2];
--                       asc  = sc->sense_buffer[12];
--                       ascq = sc->sense_buffer[13];
--                       derrprintk((MYIOC_s_WARN_FMT
--                               "id=%d SenseKey:ASC:ASCQ = (%x:%02x:%02x) CDB:\n",
--                               ioc->name, pScsiReq->TargetID,
--                               skey, asc, ascq));
--
--                       for (ii=0; ii<pScsiReq->CDBLength; ii++) {
--                               printk("%02x ", pScsiReq->CDB[ii]);
--                       }
--                       printk("\n");
--#endif
--  } else if (scsi_state & MPI_SCSI_STATE_RESPONSE_INFO_VALID && pScsiReply->ResponseInfo) {
-+		if (scsi_state & MPI_SCSI_STATE_RESPONSE_INFO_VALID &&
-+		    pScsiReply->ResponseInfo) {
- 			printk(KERN_NOTICE "ha=%d id=%d lun=%d: "
- 			"FCP_ResponseInfo=%08xh\n",
- 			ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1],
-@@ -670,13 +659,6 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 			 * killing interrupt handler:-(
- 			 */
- 			sc->result = SAM_STAT_BUSY;
--#ifdef MPT_DEBUG_FAIL
--                       derrprintk((MYIOC_s_ERR_FMT
--                               "id=%d MPI_IOCSTATUS_BUSY\n",
--                               ioc->name, pScsiReq->TargetID));
--//                     panic ("IOCSTATUS_BUSY!!!!!\n");
--#endif
--
- 			break;
- 
- 		case MPI_IOCSTATUS_SCSI_INVALID_BUS:		/* 0x0041 */
-@@ -688,15 +670,11 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 			/* Spoof to SCSI Selection Timeout! */
- 			sc->result = DID_NO_CONNECT << 16;
- 
--			bus = pScsiReq->Bus;
--			id = pScsiReq->TargetID;
--			if ( ioc->bus_type == SPI ) {
--				if (hd->sel_timeout[id] < 0xFFFF)
--					hd->sel_timeout[pScsiReq->TargetID]++;
--			}
-+			target = pScsiReq->TargetID;
-+			if (hd->sel_timeout[target] < 0xFFFF)
-+				hd->sel_timeout[pScsiReq->TargetID]++;
- 
--			pMptTarget = ioc->Target_List[bus];
--			pTarget = (VirtDevice *)pMptTarget->Target[id];
-+			pTarget = hd->Targets[target];
- 
- 			if ( pTarget ) {
- 				if (pTarget->tflags & MPT_TARGET_FLAGS_LED_ON) {
-@@ -710,8 +688,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 					} else {
- 						SEPMsg = (SEPRequest_t *)mf;
- 						SEPMsg->Function = MPI_FUNCTION_SCSI_ENCLOSURE_PROCESSOR;
--						SEPMsg->Bus = pTarget->bus;
--						SEPMsg->TargetID = pTarget->id;
-+						SEPMsg->Bus = pTarget->bus_id;
-+						SEPMsg->TargetID = pTarget->target_id;
- 						SEPMsg->Action = MPI_SEP_REQ_ACTION_WRITE_STATUS;
- 						SEPMsg->SlotStatus = MPI_SEP_REQ_SLOTSTATUS_UNCONFIGURED;
- 						pTarget->tflags &= ~MPT_TARGET_FLAGS_LED_ON;
-@@ -726,24 +704,24 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 		case MPI_IOCSTATUS_SCSI_IOC_TERMINATED:		/* 0x004B */
- 			if ( ioc->bus_type == SAS ) {
- 				u16	 status = le16_to_cpu(pScsiReply->IOCStatus);
--				u32	 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo);
--// 				sc->result = DID_RESET << 16;
--				sc->result = DID_SOFT_ERROR << 16;
- 				if (status & MPI_IOCSTATUS_FLAG_LOG_INFO_AVAILABLE) {
--					if ((log_info & 0xFFFF0000) ==
--						SAS_LOGINFO_NEXUS_LOSS) {
-+					u32	 log_info = le32_to_cpu(mr->u.reply.IOCLogInfo);
-+					log_info &= 0xFFFF0000;  /* mask subcodes */
-+					dreplyprintk((KERN_NOTICE "IOC_TERMINATED: ha=%d id=%d lun=%d:\n"
-+			"IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh "
-+			"loginfo=%08x\n"
-+			ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1],
-+			status, scsi_state, scsi_status, log_info));
-+					if (log_info == SAS_LOGINFO_NEXUS_LOSS) {
- 						sc->result = (DID_BUS_BUSY << 16);
-+						break;
- 					}
-+				} else {
-+					dreplyprintk((KERN_NOTICE "IOC_TERMINATED: ha=%d id=%d lun=%d:\n"
-+			"IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh\n",
-+			ioc->id, pScsiReq->TargetID, pScsiReq->LUN[1],
-+			status, scsi_state, scsi_status));
- 				}
--				derrprintk((KERN_NOTICE "IOC_TERMINATED: "
--					"ha=%d id=%d lun=%d "
--					"IOCStatus=%04x SCSIState=%02x\n"
--					"SCSIStatus=%02x LogInfo=%08x "
--					"sc->result=%08x sc=%p\n",
--					ioc->id, pScsiReq->TargetID,
--					pScsiReq->LUN[1], status, scsi_state,
--					scsi_status, log_info, sc->result, sc));
--				break;
- 			}  /* allow non-SAS & non-NEXUS_LOSS to drop into below code */
- 
- 		case MPI_IOCSTATUS_SCSI_TASK_TERMINATED:	/* 0x0048 */
-@@ -775,7 +753,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 			} else {
- 				sc->result = DID_SOFT_ERROR << 16;
- 			}
--//			derrprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target));
-+//			dreplyprintk((KERN_NOTICE "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->target));
- 			printk("RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id);
- 			break;
- #else
-@@ -784,7 +762,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 				sc->result=DID_SOFT_ERROR << 16;
- 			else /* Sufficient data transfer occurred */
- 				sc->result = (DID_OK << 16) | scsi_status;
--			derrprintk((KERN_NOTICE
-+			dreplyprintk((KERN_NOTICE 
- 			    "RESIDUAL_MISMATCH: result=%x on id=%d\n", sc->result, sc->device->id));
- 			break;
- #endif
-@@ -804,9 +782,7 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 						sc->result = SAM_STAT_BUSY;
- 					else
- 						sc->result = DID_SOFT_ERROR << 16;
-- derrprintk((KERN_NOTICE " xfer_cnt=%d < sc->underflow=%d result=%08x\n",xfer_cnt, sc->underflow, sc->result));
--
--                                 }
-+				}
- 				if (scsi_state & (MPI_SCSI_STATE_AUTOSENSE_FAILED | MPI_SCSI_STATE_NO_SCSI_STATUS)) {
- 					/* What to do?
- 				 	*/
-@@ -818,6 +794,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 				}
- 			}
- 
-+			dreplyprintk((KERN_NOTICE "  sc->underflow={report ERR if < %02xh bytes xfer'd}\n",
-+					sc->underflow));
-+			dreplyprintk((KERN_NOTICE "  ActBytesXferd=%02xh\n", xfer_cnt));
- 			/* Report Queue Full
- 			 */
- 			if (scsi_status == MPI_SCSI_STATUS_TASK_SET_FULL)
-@@ -896,18 +875,9 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 			break;
- 
- 		}	/* switch(ioc_status) */
--               if (ioc_status != MPI_IOCSTATUS_SCSI_DATA_UNDERRUN) {
--                       derrprintk((KERN_NOTICE "ha=%d id=%d lun=%d "
--                               "IOCStatus=%04x SCSIState=%02x\n"
--                               "SCSIStatus=%02x "
--                               "sc->result=%08x sc=%p\n",
--                               ioc->id, pScsiReq->TargetID,
--                               pScsiReq->LUN[1], ioc_status,
--                               scsi_state, scsi_status, sc->result,
--                               sc));
--               }
- 
--              } /* end of address reply case */
-+		dreplyprintk((KERN_NOTICE "  sc->result is %08xh\n", sc->result));
-+	} /* end of address reply case */
- 
- 	/* Unmap the DMA buffers, if any. */
- 	if (sc->use_sg) {
-@@ -918,7 +888,8 @@ mptscsih_io_done(MPT_ADAPTER *ioc, MPT_F
- 				sc->request_bufflen, sc->sc_data_direction);
- 	}
- 
--	sc->host_scribble = NULL;
-+	hd->ScsiLookup[req_idx] = NULL;
-+
- 	sc->scsi_done(sc);		/* Issue the command callback */
- 
- 	/* Free Chain buffers */
-@@ -945,9 +916,7 @@ mptscsih_flush_running_cmds(MPT_SCSI_HOS
- 	int		 ii;
- 	int		 max = ioc->req_depth;
- 
--
--drsprintk((MYIOC_s_WARN_FMT ": %s entered\n",ioc->name, __FUNCTION__));
--
-+	dprintk((KERN_INFO MYNAM ": flush_ScsiLookup called\n"));
- 	for (ii= 0; ii < max; ii++) {
- 		if ((SCpnt = hd->ScsiLookup[ii]) != NULL) {
- 
-@@ -959,24 +928,8 @@ drsprintk((MYIOC_s_WARN_FMT ": %s entere
- 			hd->ScsiLookup[ii] = NULL;
- 
- 			mf = MPT_INDEX_2_MFPTR(ioc, ii);
--
--/*                     drsprintk((MYIOC_s_WARN_FMT "flush mf=%p sc=%p\n",
--                               ioc->name, mf, SCpnt));
--                       DBG_DUMP_RESET_REQUEST_FRAME(ioc, mf) */
--
--
--			/* Free Chain buffers */
--			mptscsih_freeChainBuffers(ioc, ii);
--
--			/* Free Message frames */
--			mpt_free_msg_frame(ioc, mf);
--
--			if ((unsigned char *)mf != SCpnt->host_scribble) {
--                     drsprintk(( "%s Skipping scsi_done mf=%p host_scribble=%p\n",
--                         __FUNCTION__, mf, SCpnt->host_scribble));
--
--				continue;
--			}
-+			dmfprintk(( "flush: ScsiDone (mf=%p,sc=%p)\n",
-+					mf, SCpnt));
- 
- 			/* Set status, free OS resources (SG DMA buffers)
- 			 * Do OS callback
-@@ -993,14 +946,20 @@ drsprintk((MYIOC_s_WARN_FMT ": %s entere
- 					SCpnt->request_bufflen,
- 					SCpnt->sc_data_direction);
- 			}
--                        SCpnt->result = (DID_BUS_BUSY << 16);
-+			SCpnt->result = DID_RESET << 16;
- 			SCpnt->host_scribble = NULL;
-+
-+			/* Free Chain buffers */
-+			mptscsih_freeChainBuffers(ioc, ii);
-+
-+			/* Free Message frames */
-+			mpt_free_msg_frame(ioc, mf);
-+
- 			SCpnt->scsi_done(SCpnt);	/* Issue the command callback */
- 		}
- 	}
- 
--drsprintk((MYIOC_s_WARN_FMT ": %s exiting\n", ioc->name, __FUNCTION__));
--
-+	return;
- }
- 
- /*
-@@ -1010,7 +969,7 @@ drsprintk((MYIOC_s_WARN_FMT ": %s exitin
-  *		Do NOT access the referenced scsi_cmnd structure or
-  *		members. Will cause either a paging or NULL ptr error.
-  *	@hd: Pointer to a SCSI HOST structure
-- *	@id: target id
-+ *	@target: target id
-  *	@lun: lun
-  *
-  *	Returns: None.
-@@ -1018,47 +977,43 @@ drsprintk((MYIOC_s_WARN_FMT ": %s exitin
-  *	Called from slave_destroy.
-  */
- static void
--mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, uint id, uint lun)
-+mptscsih_search_running_cmds(MPT_SCSI_HOST *hd, uint target, uint lun)
- {
--	MPT_ADAPTER		*ioc = hd->ioc;
- 	SCSIIORequest_t	*mf = NULL;
- 	int		 ii;
--	int		 max = ioc->req_depth;
-+	int		 max = hd->ioc->req_depth;
- 	struct scsi_cmnd *sc;
- 
--	dsprintk((KERN_INFO MYNAM ": search_running id %d lun %d max %d\n",
--			id, lun, max));
-+	dsprintk((KERN_INFO MYNAM ": search_running target %d lun %d max %d\n",
-+			target, lun, max));
- 
- 	for (ii=0; ii < max; ii++) {
- 		if ((sc = hd->ScsiLookup[ii]) != NULL) {
- 
--			mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(ioc, ii);
-+			mf = (SCSIIORequest_t *)MPT_INDEX_2_MFPTR(hd->ioc, ii);
- 
- 			dsprintk(( "search_running: found (sc=%p, mf = %p)\n",
- 					hd->ScsiLookup[ii], mf));
- 			if (mf == NULL)
- 				continue;
--			dsprintk(( "search_running: found (sc=%p, mf = %p) id %d, lun %d \n",
-+			dsprintk(( "search_running: found (sc=%p, mf = %p) target %d, lun %d \n",
- 					hd->ScsiLookup[ii], mf, mf->TargetID, mf->LUN[1]));
- 
--			if ((mf->TargetID != ((u8)id)) || (mf->LUN[1] != ((u8) lun)))
-+			if ((mf->TargetID != ((u8)target)) || (mf->LUN[1] != ((u8) lun)))
- 				continue;
- 
- 			/* Cleanup
- 			 */
- 			hd->ScsiLookup[ii] = NULL;
--			mptscsih_freeChainBuffers(ioc, ii);
--			mpt_free_msg_frame(ioc, (MPT_FRAME_HDR *)mf);
--			if ((unsigned char *)mf != sc->host_scribble) {
--				continue;
--			}
-+			mptscsih_freeChainBuffers(hd->ioc, ii);
-+			mpt_free_msg_frame(hd->ioc, (MPT_FRAME_HDR *)mf);
- 			if (sc->use_sg) {
--				pci_unmap_sg(ioc->pcidev,
-+				pci_unmap_sg(hd->ioc->pcidev,
- 				(struct scatterlist *) sc->request_buffer,
- 					sc->use_sg,
- 					sc->sc_data_direction);
- 			} else if (sc->request_bufflen) {
--				pci_unmap_single(ioc->pcidev,
-+				pci_unmap_single(hd->ioc->pcidev,
- 					sc->SCp.dma_handle,
- 					sc->request_bufflen,
- 					sc->sc_data_direction);
-@@ -1068,8 +1023,8 @@ mptscsih_search_running_cmds(MPT_SCSI_HO
- 			sc->scsi_done(sc);
- 		}
- 	}
--	dsprintk((KERN_INFO MYNAM ": search_running id %d lun %d completed\n",
--			id, lun));
-+	dsprintk((KERN_INFO MYNAM ": search_running target %d lun %d completed\n",
-+			target, lun));
- 	return;
- }
- 
-@@ -1169,66 +1124,9 @@ mptscsih_sendIOCInit(MPT_SCSI_HOST *hd)
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/*	mptscsih_TM_timeout - Call back for timeout on a
-- *	task management request.
-- *	@data: Pointer to MPT_ADAPTER recast as an unsigned long
-- *
-- */
--void mptscsih_TM_timeout(unsigned long data)
--{
--	MPT_ADAPTER	*ioc=(MPT_ADAPTER *)data;
--	MPT_SCSI_HOST	*hd =(MPT_SCSI_HOST *)ioc->sh->hostdata;
--	int		 retval;
--	u32              ioc_state;
--
--	dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_TM_timeout: "
--		   "TM request timed out!\n", ioc->name));
--
--	/* Delete the timer that triggered this callback.
--	 * Remark: DEL_TIMER checks to make sure timer is active
--	 * before deleting.
--	 */
--	del_timer(&ioc->TMtimer);
--
--	mpt_free_msg_frame(ioc, ioc->tmPtr);
--
--	ioc->tmPtr = NULL;
--
--	dtmprintk((MYIOC_s_WARN_FMT "%s: Calling mpt_SendIocReset MUR!\n",
--		ioc->name, __FUNCTION__));
--	if ((retval = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, NO_SLEEP)) != 0) {
--		ioc_state = mpt_GetIocState(ioc, 0);
--		dfailprintk((MYIOC_s_WARN_FMT "%s: IOC MUR failed! ioc_state=%08x\n",
--			ioc->name, __FUNCTION__, ioc_state));
--//		panic ("IOC MUR Failed");
--		ioc->IOCResetInProgress = 0;
--
--		if ((retval = mpt_HardResetHandler(ioc, NO_SLEEP)) < 0){
--			printk(KERN_WARNING "%s: %s: HardResetHandler FAILED!!\n",
--				ioc->name, __FUNCTION__);
--		} else {
--			dtmprintk((MYIOC_s_WARN_FMT "%s: HardResetHandler succeeded!!\n",
--				ioc->name, __FUNCTION__));
--		}
--	} else {
--		dtmprintk((MYIOC_s_WARN_FMT "IOC MUR succeeded\n", ioc->name));
--		mptscsih_flush_running_cmds(hd);
--		dtmprintk((MYIOC_s_WARN_FMT "Calling do_ioc_recovery! \n", ioc->name));
--		if ((retval = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, NO_SLEEP)) != 0) {
--			dfailprintk((MYIOC_s_ERR_FMT "%s: (%d) ioc_recovery failed\n", ioc->name, __FUNCTION__, retval));
--		} else {
--			dtmprintk((MYIOC_s_WARN_FMT "%s:Successful do_ioc_recovery! \n", ioc->name, __FUNCTION__));
--		}
--	}
--	hd->TM_wait_done = 1;
--	wake_up(&hd->TM_waitq);
--}
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*	mptscsih_writeFCPortPage3  - write FC Port Page 3
-  *	@hd: Pointer to a SCSI Host Structure
-- *	@bus: write FC Port Page 3 for this bus
-- *	@id: write FC Port Page 3 for this target ID
-+ *	@target_id: write FC Port Page 3 for this target ID
-  *
-  *	Return: -EAGAIN if unable to obtain a Message Frame
-  *		or 0 if success.
-@@ -1236,7 +1134,7 @@ void mptscsih_TM_timeout(unsigned long d
-  *	Remark: We do not wait for a return, write pages sequentially.
-  */
- static int
--mptscsih_writeFCPortPage3(MPT_SCSI_HOST *hd, int bus, int id)
-+mptscsih_writeFCPortPage3(MPT_SCSI_HOST *hd, int target_id)
- {
- 	MPT_ADAPTER		*ioc = hd->ioc;
- 	Config_t		*pReq;
-@@ -1247,7 +1145,6 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST 
- 	u32			 frameOffset;
- 	u32			 flagsLength;
- 	int			 ii;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
- 
- 	/* Get a MF for this command.
-@@ -1287,10 +1184,9 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST 
-        	pReq->Header.PageType = MPI_CONFIG_PAGETYPE_FC_PORT |
- 				MPI_CONFIG_PAGEATTR_PERSISTENT;
- 	pReq->PageAddress = cpu_to_le32(MPI_FC_PORT_PGAD_FORM_INDEX |
--					id);
-+					target_id);
- 
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
-+	pTarget = hd->Targets[target_id];
- 
- 	FCPort3->Header.PageVersion = MPI_FCPORTPAGE3_PAGEVERSION;
- 	FCPort3->Header.PageLength = sizeof(FCPortPage3_t) / 4;
-@@ -1299,8 +1195,8 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST 
- 				   MPI_CONFIG_PAGEATTR_PERSISTENT;
-        	FCPort3->Entry[0].PhysicalIdentifier.WWN.WWPN = pTarget->WWPN;
-        	FCPort3->Entry[0].PhysicalIdentifier.WWN.WWNN = pTarget->WWNN;
--	FCPort3->Entry[0].TargetID = id;
--	FCPort3->Entry[0].Bus = bus;
-+       	FCPort3->Entry[0].TargetID = pTarget->target_id;
-+       	FCPort3->Entry[0].Bus = pTarget->bus_id;
- 	FCPort3->Entry[0].Flags = cpu_to_le16(MPI_PERSISTENT_FLAGS_ENTRY_VALID);
- 
- 	/* Add a SGE to the config request.
-@@ -1308,7 +1204,7 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST 
- 	flagsLength = MPT_SGE_FLAGS_SSIMPLE_READ | sizeof(FCPortPage3_t);
- 	mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
- 
--	drsprintk((MYIOC_s_INFO_FMT "writeFCPortPage3: bus=%d id=%d\n", ioc->name, , bus, id));
-+	drsprintk((MYIOC_s_INFO_FMT "writeFCPortPage3: target=%d\n", ioc->name, target_id));
- 
- 	mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
- 
-@@ -1320,7 +1216,7 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST 
-  *	mptscsih_readFCDevicePage0 - returns FC Device Page 0 data
-  *	@ioc: Pointer to MPT_ADAPTER structure
-  *	@bus: bus id
-- *	@id: target id
-+ *	@targetId: target id
-  *	@fcDevicePage: FC Device Page 0 data
-  *
-  *	Returns count of number bytes copied into @fcDevicePage
-@@ -1328,7 +1224,7 @@ mptscsih_writeFCPortPage3(MPT_SCSI_HOST 
-  */
- 
- int
--mptscsih_readFCDevicePage0(MPT_ADAPTER *ioc, u8 bus, u8 id, pFCDevicePage0_t fcDevicePage)
-+mptscsih_readFCDevicePage0(MPT_ADAPTER *ioc, u8 bus, u8 targetId, pFCDevicePage0_t fcDevicePage)
- {
- 	ConfigPageHeader_t	 hdr;
- 	CONFIGPARMS		 cfg;
-@@ -1348,7 +1244,7 @@ mptscsih_readFCDevicePage0(MPT_ADAPTER *
- 	cfg.action = MPI_CONFIG_ACTION_PAGE_HEADER;
- 	cfg.dir = 0;
- 
--	cfg.pageAddr = (bus << 8) + id + MPI_FC_DEVICE_PGAD_FORM_BUS_TID;
-+	cfg.pageAddr = (bus << 8) + targetId + MPI_FC_DEVICE_PGAD_FORM_BUS_TID;
- 	cfg.timeout = 0;
- 
- 	if ((rc = mpt_config(ioc, &cfg)) != 0)
-@@ -1436,16 +1332,15 @@ mptscsih_remove(struct pci_dev *pdev)
- 		spin_unlock_irqrestore(&dvtaskQ_lock, flags);
- 	}
- 	if (!count)
--   printk(KERN_ERR MYNAM ": %s: ERROR - DV thread still active!\n",
--            ioc->name);
--#ifdef MPT_DEBUG_DV
-+		printk(KERN_ERR MYNAM ": ERROR - DV thread still active!\n");
-+#if defined(MPT_DEBUG_DV) || defined(MPT_DEBUG_DV_TINY)
- 	else
--		printk(KERN_ERR MYNAM ": DV thread orig %d, count %d\n", ioc->name,10 * HZ, count);
-+		printk(KERN_ERR MYNAM ": DV thread orig %d, count %d\n", 10 * HZ, count);
- #endif
- #endif
- 
--	dexitprintk((KERN_INFO MYNAM ": %s ioc=%p hd=%p MaxDevices=%d\n",
--		ioc->name, ioc, hd, ioc->facts.MaxDevices));
-+	dexitprintk((KERN_INFO MYNAM ": %s ioc=%p hd=%p Targets=%p MaxDevices=%d\n", 
-+		ioc->name, ioc, hd, hd->Targets, ioc->facts.MaxDevices));
- // This was changed in the 2.6.13 kernel
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	mptscsih_shutdown(&pdev->dev);
-@@ -1453,19 +1348,19 @@ mptscsih_remove(struct pci_dev *pdev)
- 	mptscsih_shutdown(pdev);
- #endif
- 
--	dexitprintk((KERN_INFO MYNAM ": %s: calling scsi_remove_host ioc=%p host=%p\n",
-+	dexitprintk((KERN_INFO MYNAM ": %s: calling scsi_remove_host ioc=%p host=%p\n", 
- 		ioc->name, ioc, host));
- 
- 	scsi_remove_host(host);
- 	dexitprintk((KERN_INFO MYNAM ": %s: scsi_remove_host completed\n", ioc->name));
- 
- 	if (hd->ScsiLookup != NULL) {
--		sz1 = ioc->req_depth * sizeof(void *);
-+		sz1 = hd->ioc->req_depth * sizeof(void *);
- 		kfree(hd->ScsiLookup);
- 		hd->ScsiLookup = NULL;
- 		dprintk((MYIOC_s_INFO_FMT
- 			"Free'd ScsiLookup (%d) memory\n",
--			ioc->name, sz1));
-+			hd->ioc->name, sz1));
- 	}
- 
- 	if (hd->info_kbuf != NULL)
-@@ -1473,7 +1368,7 @@ mptscsih_remove(struct pci_dev *pdev)
- 
- 	/* NULL the Scsi_Host pointer
- 	 */
--	ioc->sh = NULL;
-+	hd->ioc->sh = NULL;
- 
- 	scsi_host_put(host);
- 
-@@ -1498,36 +1393,25 @@ mptscsih_shutdown(struct pci_dev *pdev)
- {
-        MPT_ADAPTER             *ioc = pci_get_drvdata(pdev);
- #endif
--	struct Scsi_Host 	*host;
-+	struct Scsi_Host 	*host = ioc->sh;
- 	MPT_SCSI_HOST		*hd;
- 
--	host = ioc->sh;
--
- 	if(!host)
- 		return;
- 
- 	hd = (MPT_SCSI_HOST *)host->hostdata;
- 
--	dexitprintk((KERN_INFO MYNAM ": %s: ioc=%p hd=%p\n",
--		__FUNCTION__, ioc, hd));
--
- 	/* Flush the cache of this adapter
- 	 */
--	if(hd != NULL) {
--		dexitprintk((KERN_INFO MYNAM ": Calling mptscsih_synchronize_cache for %s\n",
--			ioc->name));
-+	if(hd != NULL)
- 		mptscsih_synchronize_cache(hd, 0);
--		dexitprintk((KERN_INFO MYNAM ": mptscsih_synchronize_cache for %s completed\n",
--			ioc->name));
--	}
--	dexitprintk((KERN_INFO MYNAM ": %s done: ioc=%p hd=%p\n",
--		__FUNCTION__, ioc, hd));
-+
- }
- 
- #ifdef CONFIG_PM
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-- *	mptscsih_suspend - Fusion MPT scsi driver suspend routine.
-+ *	mptscsih_suspend - Fusion MPT scsie driver suspend routine.
-  *
-  *
-  */
-@@ -1566,7 +1450,7 @@ mptscsih_resume(struct pci_dev *pdev)
- 		return 0;
- 
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
--/*	{
-+	{
- 	unsigned long lflags;
- 	spin_lock_irqsave(&dvtaskQ_lock, lflags);
- 	if (!dvtaskQ_active) {
-@@ -1578,7 +1462,7 @@ mptscsih_resume(struct pci_dev *pdev)
- 	} else {
- 		spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
- 	}
--	} */
-+	}
- #endif
- 	return 0;
- }
-@@ -1732,13 +1616,10 @@ int
- mptscsih_qcmd(struct scsi_cmnd *SCpnt, void (*done)(struct scsi_cmnd *))
- {
- 	MPT_SCSI_HOST		*hd;
--	MPT_ADAPTER		*ioc;
- 	MPT_FRAME_HDR		*mf;
- 	SCSIIORequest_t		*pScsiReq;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
--        unsigned long 	         flags;
--        int	 bus, id;
-+	int	 target;
- 	int	 lun;
- 	u32	 datalen;
- 	u32	 scsictl;
-@@ -1746,34 +1627,18 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
- 	int	 my_idx;
- 	int	 ii;
- 
--	/* EDM Debug */
--//	mptscsih_scsi_print_command(SCpnt);
--
- 	hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata;
--	ioc = hd->ioc;
--	bus = SCpnt->device->channel;
--	id = SCpnt->device->id;
-+	target = SCpnt->device->id;
- 	lun = SCpnt->device->lun;
- 	SCpnt->scsi_done = done;
- 
--       spin_lock_irqsave(&ioc->diagLock, flags);
--       if (ioc->IOCResetInProgress) {
--               dfailprintk((MYIOC_s_WARN_FMT "qcmd, SCpnt=%p IOCResetInProgress!!\n",
--                            ioc->name, SCpnt));
--               spin_unlock_irqrestore(&ioc->diagLock, flags);
--               goto fail;
--       }
--       spin_unlock_irqrestore(&ioc->diagLock, flags);
--
--
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
-+	pTarget = hd->Targets[target];
- 
- 	if ( pTarget ) {
- 		if ( lun > pTarget->last_lun ) {
- 			dsprintk((MYIOC_s_INFO_FMT
- 				"qcmd: lun=%d > last_lun=%d on id=%d\n",
--				ioc->name, lun, pTarget->last_lun, id));
-+				hd->ioc->name, lun, pTarget->last_lun, target));
- 			SCpnt->result = DID_BAD_TARGET << 16;
- 			SCpnt->scsi_done(SCpnt);
- 			return 0;
-@@ -1782,31 +1647,32 @@ mptscsih_qcmd(struct scsi_cmnd *SCpnt, v
- 		 * allocated, use the Inquiry data to determine if device 
- 		 * supports tagged.
- 	 	*/
--		if ( pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)
-+		if ( (pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)
-+		    && (SCpnt->device->tagged_supported)) {
- 			scsictl = MPI_SCSIIO_CONTROL_SIMPLEQ;
--		 else
-+		} else {
- 			scsictl = MPI_SCSIIO_CONTROL_UNTAGGED;
-+		}
- 
--	} else {
-+	} else
- 		scsictl = MPI_SCSIIO_CONTROL_UNTAGGED;
--dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=%02x id=%d lun=%d Null pTarget, sending Untagged\n",
--                       ioc->name, SCpnt->cmnd[0], id, lun));
--               if (ioc->bus_type == SPI) {
--                       dnegoprintk(("writeSDP1: id=%d Async/Narrow\n",
--                               id));
--                       mpt_writeSDP1(ioc, 0, id, 0);
--               }
-+	dmfprintk((MYIOC_s_INFO_FMT "qcmd: SCpnt=%p, done()=%p\n",
-+			(hd && hd->ioc) ? hd->ioc->name : "ioc?", SCpnt, done));
- 
-- }
-+	if (hd->resetPending) {
-+		dfailprintk((MYIOC_s_INFO_FMT "QueueCmd, SCpnt=%p resetPending!!\n",
-+				hd->ioc->name, SCpnt));
-+		return SCSI_MLQUEUE_HOST_BUSY;
-+	}
- 
- 	/*
- 	 *  Put together a MPT SCSI request...
- 	 */
--	if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
-+	if ((mf = mpt_get_msg_frame(hd->ioc->DoneCtx, hd->ioc)) == NULL) {
- 		dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
--		    ioc->name,__FUNCTION__));
--	            goto fail;
--               }
-+		    hd->ioc->name,__FUNCTION__));
-+		return SCSI_MLQUEUE_HOST_BUSY;
-+	}
- 
- 	pScsiReq = (SCSIIORequest_t *) mf;
- 
-@@ -1831,8 +1697,8 @@ dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=%
- 
- 	/* Use the above information to set up the message frame
- 	 */
--	pScsiReq->TargetID = (u8) id;
--	pScsiReq->Bus = (u8) bus;
-+	pScsiReq->TargetID = (u8) target;
-+	pScsiReq->Bus = (u8) SCpnt->device->channel;
- 	pScsiReq->ChainOffset = 0;
- 	pScsiReq->Function = MPI_FUNCTION_SCSI_IO_REQUEST;
- 	pScsiReq->CDBLength = SCpnt->cmd_len;
-@@ -1863,7 +1729,7 @@ dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=%
- 	pScsiReq->DataLength = cpu_to_le32(datalen);
- 
- 	/* SenseBuffer low address */
--	pScsiReq->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma
-+	pScsiReq->SenseBufferLowAddr = cpu_to_le32(hd->ioc->sense_buf_low_dma
- 					   + (my_idx * MPT_SENSE_BUFFER_ALLOC));
- 
- 	/* Now add the SG list
-@@ -1875,39 +1741,67 @@ dioprintk((MYIOC_s_WARN_FMT "qcmd: CDB=%
- 			(dma_addr_t) -1);
- 	} else {
- 		/* Add a 32 or 64 bit SGE */
--		if (mptscsih_AddSGE(ioc, SCpnt, pScsiReq, my_idx) != SUCCESS){
--                    mptscsih_freeChainBuffers(ioc, my_idx);
--                    mpt_free_msg_frame(ioc, mf);
-+		if (mptscsih_AddSGE(hd->ioc, SCpnt, pScsiReq, my_idx) != SUCCESS)
- 			goto fail;
--                   }
- 	}
- 
--       SCpnt->host_scribble = (unsigned char *)mf;
--
--       if (ioc->bus_type == SPI &&
--               ioc->spi_data.dvStatus[id] & MPT_SCSICFG_DV_IN_PROGRESS) {
--               spin_lock_irqsave(&ioc->PendingMFlock, flags);
--               ioc->PendingMF = mf;
--               ioc->PendingSCpnt = SCpnt;
--               spin_unlock_irqrestore(&ioc->PendingMFlock, flags);
--               dpendprintk((KERN_INFO " qcmd: %s: DV In Progress id=%d mf=%p sc=%p into PendingMF\n",
--                       ioc->name, id, mf, SCpnt));
--               DBG_DUMP_REQUEST_FRAME(ioc, mf)
--//             mod_timer(&SCpnt->eh_timeout, jiffies + 40 * HZ);
--               return 0;
--}
- 	hd->ScsiLookup[my_idx] = SCpnt;
-+	SCpnt->host_scribble = NULL;
- 
--	mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
-+#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
-+	if (hd->ioc->bus_type == SPI) {
-+		int dvStatus = hd->ioc->spi_data.dvStatus[target];
-+		int issueCmd = 1;
-+
-+		if (dvStatus || hd->ioc->spi_data.forceDv) {
-+
-+			if ((dvStatus & MPT_SCSICFG_NEED_DV) ||
-+				(hd->ioc->spi_data.forceDv & MPT_SCSICFG_NEED_DV)) {
-+				unsigned long lflags;
-+				/* Schedule DV if necessary */
-+				spin_lock_irqsave(&dvtaskQ_lock, lflags);
-+				if (!dvtaskQ_active) {
-+					dvtaskQ_active = 1;
-+					spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
-+					INIT_WORK(&dvTaskQ_task, mptscsih_domainValidation, (void *) hd);
-+
-+					schedule_work(&dvTaskQ_task);
-+				} else {
-+					spin_unlock_irqrestore(&dvtaskQ_lock, lflags);
-+				}
-+				hd->ioc->spi_data.forceDv &= ~MPT_SCSICFG_NEED_DV;
-+			}
-+
-+			/* Trying to do DV to this target, extend timeout.
-+			 * Wait to issue until flag is clear
-+			 */
-+			if (dvStatus & MPT_SCSICFG_DV_PENDING) {
-+				mod_timer(&SCpnt->eh_timeout, jiffies + 40 * HZ);
-+				issueCmd = 0;
-+			}
-+
-+			/* Set the DV flags.
-+			 */
-+			if (dvStatus & MPT_SCSICFG_DV_NOT_DONE)
-+				mptscsih_set_dvflags(hd, pScsiReq);
-+
-+			if (!issueCmd)
-+				goto fail;
-+		}
-+	}
-+#endif
-+
-+	mpt_put_msg_frame(hd->ioc->DoneCtx, hd->ioc, mf);
- 	dmfprintk((MYIOC_s_INFO_FMT "Issued SCSI cmd (%p) mf=%p idx=%d\n",
--			ioc->name, SCpnt, mf, my_idx));
--	DBG_DUMP_REQUEST_FRAME(ioc,mf)
-+			hd->ioc->name, SCpnt, mf, my_idx));
-+	DBG_DUMP_REQUEST_FRAME(mf)
- 	return 0;
- 
-  fail:
--       SCpnt->result = DID_BUS_BUSY << 16;
--       SCpnt->scsi_done(SCpnt);
--       return 0;
-+	hd->ScsiLookup[my_idx] = NULL;
-+	mptscsih_freeChainBuffers(hd->ioc, my_idx);
-+	mpt_free_msg_frame(hd->ioc, mf);
-+	return SCSI_MLQUEUE_HOST_BUSY;
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -1972,8 +1866,7 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *i
-  *
-  *	@ioc: Pointer to MPT_ADAPTER structure
-  *	@type: Task Management type
-- *	@bus: Logical Bus for reset (if appropriate)
-- *	@id: Logical Target ID for reset (if appropriate)
-+ *	@target: Logical Target ID for reset (if appropriate)
-  *	@lun: Logical Unit for reset (if appropriate)
-  *	@ctx2abort: Context for the task to be aborted (if appropriate)
-  *
-@@ -1982,10 +1875,10 @@ mptscsih_freeChainBuffers(MPT_ADAPTER *i
-  *	Remark: With old EH code, at most 1 SCSI TaskMgmt function per IOC
-  *	will be active.
-  *
-- *	Returns 0 for SUCCESS.
-+ *	Returns 0 for SUCCESS or -1 if FAILED.
-  */
- int
--mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 bus, u8 id, u8 lun, int ctx2abort, ulong timeout)
-+mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout)
- {
- 	MPT_ADAPTER	*ioc;
- 	int		 rc = -1;
-@@ -2000,15 +1893,16 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8
- 		return 0;
- 
- 	ioc = hd->ioc;
--
-+	if (ioc == NULL) {
-+		printk(KERN_ERR MYNAM " TMHandler" " NULL ioc!\n");
-+		return FAILED;
-+	}
- 	dtmprintk((MYIOC_s_INFO_FMT "TMHandler Entered!\n", ioc->name));
- 
- 	// SJR - CHECKME - Can we avoid this here?
- 	// (mpt_HardResetHandler has this check...)
- 	spin_lock_irqsave(&ioc->diagLock, flags);
-- if (ioc->IOCResetInProgress) {
--     dtmprintk((KERN_INFO MYNAM ": %s: TMHandler failing: "
--                "IOCResetInProgress\n", ioc->name));
-+	if ((ioc->diagPending) || (ioc->alt_ioc && ioc->alt_ioc->diagPending)) {
- 		spin_unlock_irqrestore(&ioc->diagLock, flags);
- 		return FAILED;
- 	}
-@@ -2023,54 +1917,52 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8
- 		if (type == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
- 			dtmprintk((KERN_INFO MYNAM ": %s: TMHandler abort: "
- 			   "Timed out waiting for last TM (%d) to complete! \n",
--			   ioc->name, hd->tmPending));
-+			   hd->ioc->name, hd->tmPending));
- 			return FAILED;
- 		} else if (type == MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET) {
- 			dtmprintk((KERN_INFO MYNAM ": %s: TMHandler target reset: "
- 			   "Timed out waiting for last TM (%d) to complete! \n",
--			   ioc->name, hd->tmPending));
-+			   hd->ioc->name, hd->tmPending));
- 			return FAILED;
- 		} else if (type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
- 			dtmprintk((KERN_INFO MYNAM ": %s: TMHandler bus reset: "
- 			   "Timed out waiting for last TM (%d) to complete! \n",
--			   ioc->name, hd->tmPending));
-+			   hd->ioc->name, hd->tmPending));
- 			if (hd->tmPending & (1 << MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS))
- 				return FAILED;
- 
- 			doTask = 0;
- 		}
- 	} else {
--		spin_lock_irqsave(&ioc->FreeQlock, flags);
-+		spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
- 		hd->tmPending |=  (1 << type);
--		spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+		spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
- 	}
- 
- 	/* Is operational?
- 	 */
--	ioc_raw_state = mpt_GetIocState(ioc, 0);
-+	ioc_raw_state = mpt_GetIocState(hd->ioc, 0);
- 
- #ifdef MPT_DEBUG_RESET
- 	if ((ioc_raw_state & MPI_IOC_STATE_MASK) != MPI_IOC_STATE_OPERATIONAL) {
- 		printk(MYIOC_s_WARN_FMT
- 			"TM Handler: IOC Not operational(0x%x)!\n",
--                ioc->name, ioc_raw_state);
--               return FAILED;
--//             panic ( "TMHandler: IOC Not operational!");
-+			hd->ioc->name, ioc_raw_state);
- 	}
- #endif
- 
- 	if (doTask && ((ioc_raw_state & MPI_IOC_STATE_MASK) == MPI_IOC_STATE_OPERATIONAL)
- 				&& !(ioc_raw_state & MPI_DOORBELL_ACTIVE)) {
- 
--		/* Issue the Task Mgmt request.
-+		/* Isse the Task Mgmt request.
- 		 */
- 		if (hd->hard_resets < -1)
- 			hd->hard_resets++;
--		rc = mptscsih_IssueTaskMgmt(hd, type, bus, id, lun, ctx2abort, timeout);
-+		rc = mptscsih_IssueTaskMgmt(hd, type, channel, target, lun, ctx2abort, timeout);
- 		if (rc) {
--			printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n", ioc->name);
-+			printk(MYIOC_s_INFO_FMT "Issue of TaskMgmt failed!\n", hd->ioc->name);
- 		} else {
--			dtmprintk((MYIOC_s_INFO_FMT "Issue of TaskMgmt Successful!\n", ioc->name));
-+			dtmprintk((MYIOC_s_INFO_FMT "Issue of TaskMgmt Successful!\n", hd->ioc->name));
- 		}
- 	}
- 
-@@ -2079,21 +1971,11 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8
- 	if ((type == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) && (rc ||
- 		ioc->reload_fw || (ioc->alt_ioc && ioc->alt_ioc->reload_fw))) {
- 		dtmprintk((MYIOC_s_INFO_FMT "Calling HardReset! \n",
--			 ioc->name));
--		rc = mpt_HardResetHandler(ioc, CAN_SLEEP);
-+			 hd->ioc->name));
-+		rc = mpt_HardResetHandler(hd->ioc, CAN_SLEEP);
- 	}
- 
--    /*
--     * Check IOCStatus from TM reply message
--     */
--	if (hd->tm_iocstatus == MPI_IOCSTATUS_SUCCESS ||
--	   hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_TASK_TERMINATED ||
--	   hd->tm_iocstatus == MPI_IOCSTATUS_SCSI_IOC_TERMINATED)
--		rc = 0;
--	else
--		rc = FAILED;
--
--	dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", ioc->name, rc));
-+	dtmprintk((MYIOC_s_INFO_FMT "TMHandler rc = %d!\n", hd->ioc->name, rc));
- 
- 	return rc;
- }
-@@ -2104,7 +1986,7 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8
-  *	mptscsih_IssueTaskMgmt - Generic send Task Management function.
-  *	@hd: Pointer to MPT_SCSI_HOST structure
-  *	@type: Task Management type
-- *	@id: Logical Target ID for reset (if appropriate)
-+ *	@target: Logical Target ID for reset (if appropriate)
-  *	@lun: Logical Unit for reset (if appropriate)
-  *	@ctx2abort: Context for the task to be aborted (if appropriate)
-  *
-@@ -2117,31 +1999,28 @@ mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8
-  *	else other non-zero value returned.
-  */
- static int
--mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 bus, u8 id, u8 lun, int ctx2abort, ulong timeout)
-+mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout)
- {
--	MPT_ADAPTER		*ioc = hd->ioc;
- 	MPT_FRAME_HDR	*mf;
- 	SCSITaskMgmt_t	*pScsiTm;
- 	int		 ii;
- 	int		 retval;
--	u32              ioc_state;
--	unsigned long	 flags;
- 
- 	/* Return Fail to calling function if no message frames available.
- 	 */
--	if ((mf = mpt_get_msg_frame(ioc->TaskCtx, ioc)) == NULL) {
-+	if ((mf = mpt_get_msg_frame(hd->ioc->TaskCtx, hd->ioc)) == NULL) {
- 		dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
--		    ioc->name,__FUNCTION__));
-+		    hd->ioc->name,__FUNCTION__));
- 		return FAILED;
- 	}
--	dtmprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt request @ %p\n",
--			ioc->name, mf));
-+	dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt request @ %p\n",
-+			hd->ioc->name, mf));
- 
- 	/* Format the Request
- 	 */
- 	pScsiTm = (SCSITaskMgmt_t *) mf;
--	pScsiTm->TargetID = id;
--	pScsiTm->Bus = bus;
-+	pScsiTm->TargetID = target;
-+	pScsiTm->Bus = channel;
- 	pScsiTm->ChainOffset = 0;
- 	pScsiTm->Function = MPI_FUNCTION_SCSI_TASK_MGMT;
- 
-@@ -2161,52 +2040,31 @@ mptscsih_IssueTaskMgmt(MPT_SCSI_HOST *hd
- 
- 	pScsiTm->TaskMsgContext = ctx2abort;
- 
--	dtmprintk((MYIOC_s_WARN_FMT "IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n",
--			ioc->name, ctx2abort, type));
-+	dtmprintk((MYIOC_s_INFO_FMT "IssueTaskMgmt: ctx2abort (0x%08x) type=%d\n",
-+			hd->ioc->name, ctx2abort, type));
- 
- 	DBG_DUMP_TM_REQUEST_FRAME((u32 *)pScsiTm);
- 
--	hd->TM_wait_done = 0;
--	if ((retval = mpt_send_handshake_request(ioc->TaskCtx, ioc,
--		sizeof(SCSITaskMgmt_t), (u32*)pScsiTm, timeout, CAN_SLEEP)) != 0) {
--		dfailprintk((MYIOC_s_WARN_FMT "%s: send_handshake FAILED!\n",
--			ioc->name, __FUNCTION__));
--		mpt_free_msg_frame(ioc, mf);
--
--		dtmprintk((MYIOC_s_WARN_FMT "Calling mpt_SendIocReset MUR!\n",
--			ioc->name));
--		if ((retval = mpt_SendIocReset(ioc, MPI_FUNCTION_IOC_MESSAGE_UNIT_RESET, CAN_SLEEP)) != 0) {
--			ioc_state = mpt_GetIocState(ioc, 0);
--			dfailprintk((MYIOC_s_WARN_FMT "IOC MUR failed! ioc_state=%08x\n", ioc->name, ioc_state));
--//			panic ("IOC MUR Failed");
--			ioc->IOCResetInProgress = 0;
-+	if ((retval = mpt_send_handshake_request(hd->ioc->TaskCtx, hd->ioc,
-+		sizeof(SCSITaskMgmt_t), (u32*)pScsiTm,
-+		CAN_SLEEP)) != 0) {
-+		dfailprintk((MYIOC_s_ERR_FMT "_send_handshake FAILED!"
-+			" (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd,
-+			hd->ioc, mf));
-+		mpt_free_msg_frame(hd->ioc, mf);
-+		return retval;
-+	}
- 
--			if ((retval = mpt_HardResetHandler(ioc, CAN_SLEEP)) < 0){
--				printk((KERN_WARNING " HardResetHandler FAILED!!\n"));			}
--			else {
--				dtmprintk((MYIOC_s_WARN_FMT " HardResetHandler succeeded!!\n", ioc->name));
--			}
--		} else {
--			dtmprintk((MYIOC_s_WARN_FMT "IOC MUR succeeded\n", ioc->name));
--			mptscsih_flush_running_cmds(hd);
--			dtmprintk((MYIOC_s_WARN_FMT "Calling do_ioc_recovery! \n", ioc->name));
--			if ((retval = mpt_do_ioc_recovery(ioc, MPT_HOSTEVENT_IOC_RECOVER, CAN_SLEEP)) != 0) {
--				dfailprintk((MYIOC_s_ERR_FMT "- (%d) ioc_recovery failed\n", ioc->name, retval));
--			} else {
--				dtmprintk((MYIOC_s_WARN_FMT "Successful do_ioc_recovery! \n", ioc->name));
--			}
--		}
--	} else {
--		dtmprintk((MYIOC_s_WARN_FMT "%s: send_handshake SUCCESS!\n",
--			ioc->name, __FUNCTION__));
--		if (hd->TM_wait_done == 0) {
--			wait_event(hd->TM_waitq, hd->TM_wait_done);
--		}
-+	if(mptscsih_tm_wait_for_completion(hd, timeout) == FAILED) {
-+		dfailprintk((MYIOC_s_ERR_FMT "_wait_for_completion FAILED!"
-+			" (hd %p, ioc %p, mf %p) \n", hd->ioc->name, hd,
-+			hd->ioc, mf));
-+		mpt_free_msg_frame(hd->ioc, mf);
-+		dtmprintk((MYIOC_s_INFO_FMT "Calling HardReset! \n",
-+			 hd->ioc->name));
-+		retval = mpt_HardResetHandler(hd->ioc, CAN_SLEEP);
- 	}
--	spin_lock_irqsave(&ioc->FreeQlock, flags);
--	hd->tmPending = 0;
--	hd->tmState = TM_STATE_NONE;
--	spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+
- 	return retval;
- }
- 
-@@ -2229,8 +2087,6 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
- 	int		 scpnt_idx;
- 	int		 retval;
- 	int		 tm_timeout;
--        unsigned long    flags;
--	unsigned long	 sn = SCpnt->serial_number;
- 
- /* From the 2.6.13 kernels, they have removed calling
-  *	eh_threads with the host_lock in locked state
-@@ -2251,57 +2107,30 @@ mptscsih_abort(struct scsi_cmnd * SCpnt)
- 	}
- 
- 	ioc = hd->ioc;
--       spin_lock_irqsave(&ioc->diagLock, flags);
--       if (ioc->IOCResetInProgress) {
--               dtmprintk((KERN_INFO ": %s: abort: "
--                          "IOCResetInProgress (sc=%p)\n",
--                          ioc->name, SCpnt));
--               spin_unlock_irqrestore(&ioc->diagLock, flags);
--
--
-+	if (hd->resetPending) {
- 		return FAILED;
- 	}
- 
--spin_unlock_irqrestore(&ioc->diagLock, flags);
--
- 	if (hd->timeouts < -1)
--
- 		hd->timeouts++;
- 
--       printk(KERN_WARNING MYNAM ": %s: attempting task abort! (sc=%p)\n",
--              ioc->name, SCpnt);
--             scsi_print_command(SCpnt);
--
--//     printk(KERN_WARNING MYNAM ": %s: Delaying 30 seconds\n", ioc->name);
--//     mdelay (30000);
--       /* If this command is pended, then timeout/hang occurred
--        * during DV. Post command and flush pending Q
--        * and then following up with the reset request.
--        */
--       if ( (mf = mptscsih_search_PendingMF(ioc, SCpnt)) != NULL) {
--               /* Cmd was in PendingMF.
--                */
--               dpendprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: "
--                          "Command was in PendingMF! (sc=%p)\n",
--                          ioc->name, SCpnt));
--               return SUCCESS;
--       }
--
--
--
- 	/* Find this command
- 	 */
- 	if ((scpnt_idx = SCPNT_TO_LOOKUP_IDX(SCpnt)) < 0) {
- 		/* Cmd not found in ScsiLookup.
- 		 * Do OS callback.
- 		 */
--//		SCpnt->result = DID_RESET << 16;
-+		SCpnt->result = DID_RESET << 16;
- 		dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: "
- 			   "Command not in the active list! (sc=%p)\n",
--			   ioc->name, SCpnt));
-+			   hd->ioc->name, SCpnt));
- 		return SUCCESS;
- 	}
- 
-+	printk(KERN_WARNING MYNAM ": %s: attempting task abort! (sc=%p)\n",
-+	       hd->ioc->name, SCpnt);
-+	scsi_print_command(SCpnt);
-+
- 	/* Most important!  Set TaskMsgContext to SCpnt's MsgContext!
- 	 * (the IO to be ABORT'd)
- 	 *
-@@ -2309,7 +2138,7 @@ spin_unlock_irqrestore(&ioc->diagLock, f
- 	 *	 swap it here either.  It is an opaque cookie to
- 	 *	 the controller, so it does not matter. -DaveM
- 	 */
--	mf = MPT_INDEX_2_MFPTR(ioc, scpnt_idx);
-+	mf = MPT_INDEX_2_MFPTR(hd->ioc, scpnt_idx);
- 	ctx2abort = mf->u.frame.hwhdr.msgctxu.MsgContext;
- 
- 	hd->abortSCpnt = SCpnt;
-@@ -2318,7 +2147,7 @@ spin_unlock_irqrestore(&ioc->diagLock, f
- 	spin_unlock_irq(host_lock);
- #endif
- 	/* set timeout in seconds */
--	switch (ioc->bus_type) {
-+	switch (hd->ioc->bus_type) {
- 	case FC:
- 		tm_timeout=40;
- 		break;
-@@ -2327,7 +2156,7 @@ spin_unlock_irqrestore(&ioc->diagLock, f
- 		break;
- 	case SPI:
- 	default:
--		tm_timeout=10;
-+		tm_timeout=2;
- 		break;
- 	}
- 	retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK,
-@@ -2337,30 +2166,17 @@ spin_unlock_irqrestore(&ioc->diagLock, f
- 	spin_lock_irq(host_lock);
- #endif
- 
--if (ioc->bus_type == FC) {
--	if (SCPNT_TO_LOOKUP_IDX(SCpnt) == scpnt_idx &&
--	    SCpnt->serial_number == sn) {
--		dtmprintk((KERN_INFO MYNAM ": %s: mptscsih_abort: "
--			   "scpnt_idx=%08x sn=%lx (sc=%p)\n",
--			   ioc->name, scpnt_idx, sn, SCpnt));
--		retval = FAILED;
--	}
--}
--
- 	printk (KERN_WARNING MYNAM ": %s: task abort: %s (sc=%p)\n",
--		ioc->name,
-+		hd->ioc->name,
- 		((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
--       hd->ScsiLookup[scpnt_idx] = NULL;
--//panic ("Task Abort completed");
--       spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
--       hd->tmPending = 0;
--       hd->tmState = TM_STATE_NONE;
--       spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
--
- 
- 	if (retval == 0)
- 		return SUCCESS;
- 
-+	if(retval != FAILED ) {
-+		hd->tmPending = 0;
-+		hd->tmState = TM_STATE_NONE;
-+	}
- 	return FAILED;
- }
- 
-@@ -2377,10 +2193,8 @@ int
- mptscsih_dev_reset(struct scsi_cmnd * SCpnt)
- {
- 	MPT_SCSI_HOST	*hd;
--	MPT_ADAPTER	*ioc;
--	int		id,retval;
-+	int		 retval;
- 	int		 tm_timeout;
--        unsigned long    flags;
- 
- /* From the 2.6.13 kernels, they have removed calling
-  *	eh_threads with the host_lock in locked state
-@@ -2398,27 +2212,17 @@ mptscsih_dev_reset(struct scsi_cmnd * SC
- 		return FAILED;
- 	}
- 
--       ioc = hd->ioc;
--       id = SCpnt->device->id;
--       spin_lock_irqsave(&ioc->diagLock, flags);
--       if (ioc->IOCResetInProgress) {
--               dtmprintk((KERN_INFO ": %s: target reset: "
--                          "IOCResetInProgress (sc=%p)\n",
--                          ioc->name, SCpnt));
--               spin_unlock_irqrestore(&ioc->diagLock, flags);
--
--            return FAILED;
--}
--spin_unlock_irqrestore(&ioc->diagLock, flags);
-+	if (hd->resetPending)
-+		return FAILED;
- 
- 	printk(KERN_WARNING MYNAM ": %s: attempting target reset! (sc=%p)\n",
--	       ioc->name, SCpnt);
-+	       hd->ioc->name, SCpnt);
- 	scsi_print_command(SCpnt);
- 
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	spin_unlock_irq(host_lock);
- #endif
--	switch (ioc->bus_type) {
-+	switch (hd->ioc->bus_type) {
- 	case FC:
- 		tm_timeout=40;
- 		break;
-@@ -2427,29 +2231,25 @@ spin_unlock_irqrestore(&ioc->diagLock, f
- 		break;
- 	case SPI:
- 	default:
--		tm_timeout=10;
-+		tm_timeout=5;
- 		break;
- 	}
- 	retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_TARGET_RESET,
--	SCpnt->device->channel, id, 0, 0, tm_timeout);
-+		SCpnt->device->channel, SCpnt->device->id,
-+		0, 0, tm_timeout);
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	spin_lock_irq(host_lock);
- #endif
- 	printk (KERN_WARNING MYNAM ": %s: target reset: %s (sc=%p)\n",
--		ioc->name,
-+		hd->ioc->name,
- 		((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
--       spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
--       hd->tmPending = 0;
--       hd->tmState = TM_STATE_NONE;
--       spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
--
--       if (retval == 0) {
--               if (ioc->bus_type == SPI) {
--                       dnegoprintk(("writeSDP1: id=%d USE_NVRAM\n",
--                               id));
--                       mpt_writeSDP1(ioc, 0, id, MPT_SCSICFG_USE_NVRAM);
--               }
--              return SUCCESS;
-+
-+	if (retval == 0)
-+		return SUCCESS;
-+
-+	if(retval != FAILED ) {
-+		hd->tmPending = 0;
-+		hd->tmState = TM_STATE_NONE;
- 	}
- 	return FAILED;
- }
-@@ -2467,10 +2267,8 @@ int
- mptscsih_bus_reset(struct scsi_cmnd * SCpnt)
- {
- 	MPT_SCSI_HOST	*hd;
--	MPT_ADAPTER	*ioc;
- 	int		 retval;
- 	int		 tm_timeout;
--        unsigned long    flags;
- 
- /* From the 2.6.13 kernels, they have removed calling
-  *	eh_threads with the host_lock in locked state
-@@ -2488,9 +2286,8 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
- 		return FAILED;
- 	}
- 
--	ioc = hd->ioc;
- 	printk(KERN_WARNING MYNAM ": %s: attempting bus reset! (sc=%p)\n",
--	       ioc->name, SCpnt);
-+	       hd->ioc->name, SCpnt);
- 	scsi_print_command(SCpnt);
- 
- 	if (hd->timeouts < -1)
-@@ -2500,7 +2297,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	spin_unlock_irq(host_lock);
- #endif
--	switch (ioc->bus_type) {
-+	switch (hd->ioc->bus_type) {
- 	case FC:
- 		tm_timeout=40;
- 		break;
-@@ -2509,7 +2306,7 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
- 		break;
- 	case SPI:
- 	default:
--		tm_timeout=10;
-+		tm_timeout=5;
- 		break;
- 	}
- 	retval = mptscsih_TMHandler(hd, MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS,
-@@ -2519,20 +2316,17 @@ mptscsih_bus_reset(struct scsi_cmnd * SC
- #endif
- 
- 	printk (KERN_WARNING MYNAM ": %s: bus reset: %s (sc=%p)\n",
--		ioc->name,
-+		hd->ioc->name,
- 		((retval == 0) ? "SUCCESS" : "FAILED" ), SCpnt);
- 
--       spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
--       hd->tmPending = 0;
--       hd->tmState = TM_STATE_NONE;
--       spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
--
--
--
- 	if (retval == 0)
- 		return SUCCESS;
- 
--        return FAILED;
-+	if(retval != FAILED ) {
-+		hd->tmPending = 0;
-+		hd->tmState = TM_STATE_NONE;
-+	}
-+	return FAILED;
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -2549,10 +2343,8 @@ int
- mptscsih_host_reset(struct scsi_cmnd *SCpnt)
- {
- 	MPT_SCSI_HOST *  hd;
--	MPT_ADAPTER	*ioc;
- 	int              status = SUCCESS;
--        unsigned long    flags;
--
-+	int		 can_sleep;
- /* From the 2.6.13 kernels, they have removed calling
-  *	eh_threads with the host_lock in locked state
-  */
-@@ -2560,6 +2352,8 @@ mptscsih_host_reset(struct scsi_cmnd *SC
- 	spinlock_t	*host_lock = SCpnt->device->host->host_lock;
- #endif
- 
-+	can_sleep = crashdump_mode() ? NO_SLEEP : CAN_SLEEP;
-+
- 	/*  If we can't locate the host to reset, then we failed. */
- 	if ((hd = (MPT_SCSI_HOST *) SCpnt->device->host->hostdata) == NULL){
- 		dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: "
-@@ -2568,9 +2362,8 @@ mptscsih_host_reset(struct scsi_cmnd *SC
- 		return FAILED;
- 	}
- 
--	ioc = hd->ioc;
- 	printk(KERN_WARNING MYNAM ": %s: Attempting host reset! (sc=%p)\n",
--	       ioc->name, SCpnt);
-+	       hd->ioc->name, SCpnt);
- 
- 	/*  If our attempts to reset the host failed, then return a failed
- 	 *  status.  The host will be taken off line by the SCSI mid-layer.
-@@ -2578,78 +2371,26 @@ mptscsih_host_reset(struct scsi_cmnd *SC
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	MPT_HOST_UNLOCK(host_lock);
- #endif
--	if (mpt_HardResetHandler(ioc,
--	    crashdump_mode() ? NO_SLEEP : CAN_SLEEP) < 0) {
--dfailprintk((MYIOC_s_ERR_FMT "host reset: HardResetHandler failed\n", ioc->name));
--
-+	if (mpt_HardResetHandler(hd->ioc, can_sleep) < 0){
- 		status = FAILED;
- 	} else {
--
--dtmprintk((MYIOC_s_ERR_FMT "host reset: HardResetHandler succeeded\n", ioc->name));
--        status = SUCCESS;
--
-+		/*  Make sure TM pending is cleared and TM state is set to
-+		 *  NONE.
-+		 */
-+		hd->tmPending = 0;
-+		hd->tmState = TM_STATE_NONE;
- 	}
--
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	MPT_HOST_LOCK(host_lock);
- #endif
--       spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
--       hd->tmPending = 0;
--       hd->tmState = TM_STATE_NONE;
--       spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
--
--	return status;
--}
--
--/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/* Search the pendingMF for a command with specific index.
-- * If found, delete and return mf pointer
-- * If not found, return NULL
-- */
--static MPT_FRAME_HDR *
--mptscsih_search_PendingMF(MPT_ADAPTER *ioc, struct scsi_cmnd * sc)
--{
--	MPT_SCSI_HOST	*hd=(MPT_SCSI_HOST *) ioc->sh->hostdata;
--	MPT_FRAME_HDR	*mf;
--	unsigned long	 flags;
--	u16		 req_idx;
- 
--	dpendprintk((MYIOC_s_WARN_FMT "%s entered\n",
--		ioc->name, __FUNCTION__));
--
--	spin_lock_irqsave(&ioc->PendingMFlock, flags);
--	if ((mf=ioc->PendingMF) == NULL) {
--		spin_unlock_irqrestore(&ioc->PendingMFlock, flags);
--		return NULL;
--	}
-+	dtmprintk( ( KERN_INFO MYNAM ": mptscsih_host_reset: "
-+		     "Status = %s\n",
-+		     (status == SUCCESS) ? "SUCCESS" : "FAILED" ) );
- 
--	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--	if (sc == hd->ScsiLookup[req_idx]) {
--		ioc->PendingMF = NULL;
--		spin_unlock_irqrestore(&ioc->PendingMFlock, flags);
--
--		dpendprintk((MYIOC_s_WARN_FMT "%s: found mf=%p\n",
--			ioc->name, __FUNCTION__, mf));
--		DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mf)
--		/* Free Chain buffers */
--		mptscsih_freeChainBuffers(ioc, req_idx);
--		/* Free Message frames */
--		mpt_free_msg_frame(ioc, mf);
--		hd->ScsiLookup[req_idx] = NULL;
--		sc->result = (DID_RESET << 16);
--		sc->host_scribble = NULL;
--		sc->scsi_done(sc);	/* Issue the command callback */
--		dpendprintk(( "%s Executed scsi_done mf=%p sc=%p\n",
--			__FUNCTION__, mf, sc));
--		return mf;
--	}
--	spin_unlock_irqrestore(&ioc->PendingMFlock, flags);
--	dpendprintk((MYIOC_s_WARN_FMT "%s exiting mf=%p not in ScsiLookup\n",
--		ioc->name, __FUNCTION__, mf));
--	return NULL;
-+	return status;
- }
- 
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
-  *	mptscsih_tm_pending_wait - wait for pending task management request to
-@@ -2661,21 +2402,20 @@ mptscsih_search_PendingMF(MPT_ADAPTER *i
- static int
- mptscsih_tm_pending_wait(MPT_SCSI_HOST * hd)
- {
--	MPT_ADAPTER	*ioc = hd->ioc;
- 	unsigned long  flags;
- 	int            loop_count = 4 * 10;  /* Wait 10 seconds */
- 	int            status = FAILED;
- 
- 	do {
--		spin_lock_irqsave(&ioc->FreeQlock, flags);
-+		spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
- 		if (hd->tmState == TM_STATE_NONE) {
- 			hd->tmState = TM_STATE_IN_PROGRESS;
- 			hd->tmPending = 1;
--			spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+			spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
- 			status = SUCCESS;
- 			break;
- 		}
--		spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+		spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
- 		msleep(250);
- 	} while (--loop_count);
- 
-@@ -2683,6 +2423,34 @@ mptscsih_tm_pending_wait(MPT_SCSI_HOST *
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/**
-+ *	mptscsih_tm_wait_for_completion - wait for completion of TM task
-+ *	@hd: Pointer to MPT host structure.
-+ *
-+ *	Returns {SUCCESS,FAILED}.
-+ */
-+static int
-+mptscsih_tm_wait_for_completion(MPT_SCSI_HOST * hd, ulong timeout )
-+{
-+	unsigned long  flags;
-+	int            loop_count = 4 * timeout;
-+	int            status = FAILED;
-+
-+	do {
-+		spin_lock_irqsave(&hd->ioc->FreeQlock, flags);
-+		if(hd->tmPending == 0) {
-+			status = SUCCESS;
-+ 			spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
-+			break;
-+		}
-+		spin_unlock_irqrestore(&hd->ioc->FreeQlock, flags);
-+		msleep_interruptible(250);
-+	} while (--loop_count);
-+
-+	return status;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- static void
- mptscsih_taskmgmt_response_code(MPT_ADAPTER *ioc, u8 response_code)
- {
-@@ -2720,17 +2488,17 @@ mptscsih_taskmgmt_response_code(MPT_ADAP
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
-- *      mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver
-- *      @ioc: Pointer to MPT_ADAPTER structure
-- *      @mf: Pointer to SCSI task mgmt request frame
-- *      @mr: Pointer to SCSI task mgmt reply frame
-- *
-- *      This routine is called from mptbase.c::mpt_interrupt() at the completion
-- *      of any SCSI task management request.
-- *      This routine is registered with the MPT (base) driver at driver
-- *      load/init time via the mpt_register() API call.
-+ *	mptscsih_taskmgmt_complete - Registered with Fusion MPT base driver
-+ *	@ioc: Pointer to MPT_ADAPTER structure
-+ *	@mf: Pointer to SCSI task mgmt request frame
-+ *	@mr: Pointer to SCSI task mgmt reply frame
-  *
-- *      Returns 1 indicating alloc'd request frame ptr should be freed.
-+ *	This routine is called from mptbase.c::mpt_interrupt() at the completion
-+ *	of any SCSI task management request.
-+ *	This routine is registered with the MPT (base) driver at driver
-+ *	load/init time via the mpt_register() API call.
-+ *
-+ *	Returns 1 indicating alloc'd request frame ptr should be freed.
-  */
- int
- mptscsih_taskmgmt_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *mr)
-@@ -2739,26 +2507,27 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *
- 	SCSITaskMgmt_t		*pScsiTmReq;
- 	MPT_SCSI_HOST		*hd;
- 	unsigned long		 flags;
--	u16			 iocstatus = MPI_IOCSTATUS_SUCCESS;
-+	u16			 iocstatus;
- 	u8			 tmType;
--	u32			 termination_count;
- 
- 	dtmprintk((MYIOC_s_WARN_FMT "TaskMgmt completed (mf=%p,mr=%p)\n",
- 			ioc->name, mf, mr));
-+	if (ioc->sh) {
- 		/* Depending on the thread, a timer is activated for
- 		 * the TM request.  Delete this timer on completion of TM.
- 		 * Decrement count of outstanding TM requests.
- 		 */
--	hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
--	if (ioc->tmPtr) {
--		del_timer(&ioc->TMtimer);
--		mpt_free_msg_frame(ioc, ioc->tmPtr);
--		ioc->tmPtr = NULL;
-+		hd = (MPT_SCSI_HOST *)ioc->sh->hostdata;
-+	} else {
-+		dtmprintk((MYIOC_s_WARN_FMT "TaskMgmt Complete: NULL Scsi Host Ptr\n",
-+			ioc->name));
-+		return 1;
- 	}
- 
- 	if (mr == NULL) {
--		dtmprintk((MYIOC_s_WARN_FMT "ERROR! TaskMgmt Turbo Reply: Request %p\n",
-+		dtmprintk((MYIOC_s_WARN_FMT "ERROR! TaskMgmt Reply: NULL Request %p\n",
- 			ioc->name, mf));
-+		return 1;
- 	} else {
- 		pScsiTmReply = (SCSITaskMgmtReply_t*)mr;
- 		pScsiTmReq = (SCSITaskMgmt_t*)mf;
-@@ -2771,40 +2540,31 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *
- 			mptscsih_taskmgmt_response_code(ioc,
- 			    pScsiTmReply->ResponseCode);
- 
--		termination_count = le32_to_cpu(pScsiTmReply->TerminationCount);
--
--		iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK;
--		dtmprintk((MYIOC_s_WARN_FMT "  SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x TerminationCount=%d\n",
--			ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo), termination_count));
-+		dtmprintk((MYIOC_s_WARN_FMT "  TaskType = %d, TerminationCount=%d\n",
-+				ioc->name, tmType, le32_to_cpu(pScsiTmReply->TerminationCount)));
- 		DBG_DUMP_TM_REPLY_FRAME((u32 *)pScsiTmReply);
- 
-+		iocstatus = le16_to_cpu(pScsiTmReply->IOCStatus) & MPI_IOCSTATUS_MASK;
-+		dtmprintk((MYIOC_s_WARN_FMT "  SCSI TaskMgmt (%d) IOCStatus=%04x IOCLogInfo=%08x\n",
-+			ioc->name, tmType, iocstatus, le32_to_cpu(pScsiTmReply->IOCLogInfo)));
- 		/* Error?  (anything non-zero?) */
- 		if (iocstatus) {
- 
- 			/* clear flags and continue.
- 			 */
--			if (tmType == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK) {
--				if (termination_count == 1) {
--					iocstatus = MPI_IOCSTATUS_SCSI_TASK_TERMINATED;
--					dtmprintk((MYIOC_s_WARN_FMT "  SCSI Abort Task IOCStatus is now %04x\n",
--						ioc->name, iocstatus));
--				}
-+			if (tmType == MPI_SCSITASKMGMT_TASKTYPE_ABORT_TASK)
- 				hd->abortSCpnt = NULL;
--			}
- 
- 			/* If an internal command is present
- 			 * or the TM failed - reload the FW.
- 			 * FC FW may respond FAILED to an ABORT
- 			 */
--			else if (tmType == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
-+			if (tmType == MPI_SCSITASKMGMT_TASKTYPE_RESET_BUS) {
- 				if ((hd->cmdPtr) ||
- 				    (iocstatus == MPI_IOCSTATUS_SCSI_TASK_MGMT_FAILED)) {
- 					if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0) {
- 						printk((KERN_WARNING
- 							" Firmware Reload FAILED!!\n"));
--						dfailprintk((MYIOC_s_ERR_FMT "taskmgmt_complete: HardReset failed\n", ioc->name));
--					} else {
--						dtmprintk((MYIOC_s_ERR_FMT "taskmgmt_complete: HardReset succeeded\n", ioc->name));
- 					}
- 				}
- 			}
-@@ -2818,16 +2578,12 @@ mptscsih_taskmgmt_complete(MPT_ADAPTER *
- 
- 	spin_lock_irqsave(&ioc->FreeQlock, flags);
- 	hd->tmPending = 0;
--	hd->tm_iocstatus = iocstatus;
--	hd->tmState = TM_STATE_NONE;
- 	spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+	hd->tmState = TM_STATE_NONE;
- 
--	hd->TM_wait_done = 1;
--	wake_up(&hd->TM_waitq);
- 	return 1;
- }
- 
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-  *	This is anyones guess quite frankly.
-@@ -2884,48 +2640,38 @@ mptscsih_slave_alloc(struct scsi_device 
- {
- 	struct Scsi_Host	*host = device->host;
- 	MPT_SCSI_HOST		*hd = (MPT_SCSI_HOST *)host->hostdata;
--	MPT_ADAPTER		*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
--	SpiCfgData             *pSpi;
--        uint			bus=device->channel, id=device->id, lun=device->lun;
-+	uint			target = device->id, lun = device->lun;
- 	int			indexed_lun, lun_index;
- 
-+	if (hd == NULL)
-+		return -ENODEV;
- 
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
--	dinitprintk((MYIOC_s_INFO_FMT "mptscsih_slave_alloc: bus=%d id=%d lun=%d hd=%p pMptTarget=%p pTarget=%p\n",
--		ioc->name, bus, id, lun, hd, pMptTarget, pTarget));
--
--	if (pTarget) {
--		dinitprintk((MYIOC_s_ERR_FMT "slave_alloc: pTarget=%p already allocated!\n",
--			ioc->name, pTarget));
-+	if ((pTarget = hd->Targets[target]))
- 		goto out;
--	}
- 
- 	pTarget = kmalloc(sizeof(VirtDevice), GFP_KERNEL);
- 	if (!pTarget) {
- 		printk(MYIOC_s_ERR_FMT "slave_alloc kmalloc(%zd) FAILED!\n",
--			ioc->name, sizeof(VirtDevice));
-+				hd->ioc->name, sizeof(VirtDevice));
- 		return -ENOMEM;
- 	}
- 
-+	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_alloc target=%d lun=%d pTarget=%p\n",
-+			hd->ioc->name, target, lun, pTarget));
- 	memset(pTarget, 0, sizeof(VirtDevice));
--if (ioc->bus_type != SPI)
--        pTarget->tflags = MPT_TARGET_FLAGS_Q_YES;
--        pTarget->ioc = ioc;
--        pTarget->id = id;
--	pTarget->bus = bus;
-+	pTarget->tflags = MPT_TARGET_FLAGS_Q_YES;
-+	pTarget->ioc_id = hd->ioc->id;
-+	pTarget->target_id = device->id;
-+	pTarget->bus_id = device->channel;
- 	pTarget->last_lun = MPT_LAST_LUN;
--	pMptTarget->Target[id] = pTarget;
--	if (ioc->bus_type == SPI) {
--	         pSpi = &ioc->spi_data;
--                 pSpi->dvStatus[id] |= (MPT_SCSICFG_NEED_DV |
--                                         MPT_SCSICFG_DV_NOT_DONE);
--
--		if (ioc->raid_data.isRaid & (1 << device->id)) {
-+	pTarget->raidVolume = 0;
-+	pTarget->device = device;
-+	hd->Targets[target] = pTarget;
-+	if (hd->ioc->bus_type == SPI) {
-+		if (hd->ioc->raid_data.isRaid & (1 << device->id)) {
- 			pTarget->raidVolume = 1;
--			ddvprintk((KERN_INFO
-+			ddvtprintk((KERN_INFO
- 			    "RAID Volume @ id %d\n", device->id));
- 		}
- 	}
-@@ -2937,8 +2683,8 @@ out:
- 	indexed_lun = (lun % 32);
- 	pTarget->luns[lun_index] |= (1 << indexed_lun);
- 
--	dinitprintk((MYIOC_s_WARN_FMT "mptscsih_slave_alloc: bus=%d id=%d lun=%d pTarget=%p num_luns=%d\n",
--			ioc->name, bus, id, lun, pTarget, pTarget->num_luns));
-+	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_alloc target=%d lun=%d pTarget=%p num_luns=%d\n",
-+			hd->ioc->name, target, lun, pTarget, pTarget->num_luns));
- 	return 0;
- }
- 
-@@ -2951,24 +2697,20 @@ mptscsih_slave_destroy(struct scsi_devic
- {
- 	struct Scsi_Host	*host = device->host;
- 	MPT_SCSI_HOST		*hd = (MPT_SCSI_HOST *)host->hostdata;
--	MPT_ADAPTER		*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
--	uint			bus=device->channel, id=device->id, lun=device->lun;
-+	uint			target = device->id, lun = device->lun;
- 	int			indexed_lun, lun_index;
- 
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
--	if (pTarget == NULL) {
--		printk(MYIOC_s_WARN_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p is NULL\n",
--			ioc->name, bus, id, lun, pTarget);
-+	if ((pTarget = hd->Targets[target]) == NULL) {
-+		printk(MYIOC_s_WARN_FMT " mptscsih_slave_destroy target=%d lun=%d pTarget=%p is NULL\n",
-+			hd->ioc->name, target, lun, pTarget);
- 		return;
- 	}
--	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d type=%x pTarget=%p\n",
--			ioc->name, bus, id, lun, pTarget->inq_data[0], pTarget));
-+	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d type=%x pTarget=%p\n",
-+			hd->ioc->name, target, lun, pTarget->inq_data[0], pTarget));
- 
--	if((ioc->bus_type == SPI) &&
--		mptscsih_is_phys_disk(ioc, bus, id)) {
-+	if((hd->ioc->bus_type == SPI) &&
-+		mptscsih_is_phys_disk(hd->ioc, target)) {
- 	; /* this target reset shouldn't be issued to hidden
- 	   * phys disk in a raid volume.  The result would
- 	   * kill domain validation on that disk; e.g. disk
-@@ -2984,41 +2726,38 @@ mptscsih_slave_destroy(struct scsi_devic
- 	     */
- 	}
- 
--	mptscsih_search_running_cmds(hd, id, lun);
-+	mptscsih_search_running_cmds(hd, target, lun);
- 
- 	lun_index = (lun >> 5);  /* 32 luns per lun_index */
- 	indexed_lun = (lun % 32);
- 	pTarget->luns[lun_index] &= ~(1 << indexed_lun);
- 
- 	if (--pTarget->num_luns) {
--		dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p num_luns=%d luns[0]=%x returning\n",
--			ioc->name, bus, id, lun, pTarget, pTarget->num_luns, pTarget->luns[0]));
-+		dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d pTarget=%p num_luns=%d luns[0]=%x returning\n",
-+			hd->ioc->name, target, lun, pTarget, pTarget->num_luns, pTarget->luns[0]));
- 		return;
- 	}
- 
--	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d freeing pTarget=%p\n",
--			ioc->name, bus, id, lun, pTarget));
--
--	if (ioc->bus_type == SPI) {
--		if (mptscsih_is_phys_disk(ioc, bus, id)) {
--			ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3;
--    dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy PhysDisk bus=%d id=% d lun=%d pTarget=%p retained\n",ioc->name, bus, id, lun, pTarget));
--
--
-+	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d freeing pTarget=%p\n",
-+			hd->ioc->name, target, lun, pTarget));
-+	kfree(pTarget);
-+	hd->Targets[target] = NULL;
-+
-+	if (hd->ioc->bus_type == SPI) {
-+		if (mptscsih_is_phys_disk(hd->ioc, target)) {
-+			hd->ioc->spi_data.forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3;
- 		} else {
--			ioc->spi_data.dvStatus[id] =
--                (MPT_SCSICFG_NEGOTIATE | MPT_SCSICFG_DV_NOT_DONE);
--                kfree(pTarget);
--                pMptTarget->Target[id] = NULL;
--                dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p completed\n",ioc->name, bus, id, lun, pTarget));
-+			hd->ioc->spi_data.dvStatus[target] =
-+				MPT_SCSICFG_NEGOTIATE;
- 
-+			if (!hd->negoNvram) {
-+				hd->ioc->spi_data.dvStatus[target] |=
-+					MPT_SCSICFG_DV_NOT_DONE;
-+			}
- 		}
--}else {
--kfree(pTarget);
--pMptTarget->Target[id] = NULL;
--dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy bus=%d id=%d lun=%d pTarget=%p completed\n",
--ioc->name, bus, id, lun, pTarget));
--      }
-+	}
-+	dsprintk((MYIOC_s_INFO_FMT " mptscsih_slave_destroy target=%d lun=%d pTarget=%p completed\n",
-+			hd->ioc->name, target, lun, pTarget));
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -3033,34 +2772,29 @@ int
- mptscsih_change_queue_depth(struct scsi_device *sdev, int qdepth)
- {
- 	MPT_SCSI_HOST	*hd = (MPT_SCSI_HOST *)sdev->host->hostdata;
--	MPT_ADAPTER	*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice *pTarget;
- 	int	max_depth;
- 	int	tagged;
- 
--	pMptTarget = ioc->Target_List[sdev->channel];
--	pTarget = pMptTarget->Target[sdev->id];
--	if (pTarget == NULL)
-+	if (!(pTarget = hd->Targets[sdev->id]))
- 		return 0;
- 
--
--       if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) {
--               if (!(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES))
--                       max_depth = 1;
--               else if (ioc->bus_type == SPI) {
--                       if (((pTarget->inq_data[0] & 0x1f) == 0x00) &&
--                                (pTarget->minSyncFactor <= MPT_ULTRA160 ))
-+	if (hd->ioc->bus_type == SPI) {
-+		if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY) {
-+			if (!(pTarget->tflags & MPT_TARGET_FLAGS_Q_YES))
-+				max_depth = 1;
-+			else if (((pTarget->inq_data[0] & 0x1f) == 0x00) &&
-+			         (pTarget->minSyncFactor <= MPT_ULTRA160 ))
- 				max_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
- 			else
--			max_depth = MPT_SCSI_CMD_PER_DEV_LOW;
-+				max_depth = MPT_SCSI_CMD_PER_DEV_LOW;
-+		} else {
-+			/* error case - No Inq. Data */
-+			max_depth = 1;
-+		}
-+	} else
-+		max_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
- 
--               } else
--                       max_depth = MPT_SCSI_CMD_PER_DEV_HIGH;
--       } else {
--               /* error case - No Inq. Data */
--               max_depth = 1;
--       }
- 	if (qdepth > max_depth)
- 		qdepth = max_depth;
- 	if (qdepth == 1)
-@@ -3082,29 +2816,25 @@ int
- mptscsih_slave_configure(struct scsi_device *device)
- {
- 	struct Scsi_Host	*sh = device->host;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
- 	MPT_SCSI_HOST		*hd = (MPT_SCSI_HOST *)sh->hostdata;
--	MPT_ADAPTER		*ioc = hd->ioc;
- 	int			rc;
- 
--       dinitprintk((MYIOC_s_INFO_FMT
--               "%s: device @ %p, id=%d, LUN=%d, channel=%d\n",
--               ioc->name, __FUNCTION__, device, device->id, device->lun,
--               device->channel));
--       dinitprintk((MYIOC_s_INFO_FMT
--                "sdtr %d wdtr %d ppr %d inq length=%d\n",
--		ioc->name, device->sdtr, device->wdtr,
-+	dsprintk((MYIOC_s_INFO_FMT
-+		"device @ %p, id=%d, LUN=%d, channel=%d\n",
-+		hd->ioc->name, device, device->id, device->lun, device->channel));
-+	dsprintk((MYIOC_s_INFO_FMT
-+		"sdtr %d wdtr %d ppr %d inq length=%d\n",
-+		hd->ioc->name, device->sdtr, device->wdtr,
- 		device->ppr, device->inquiry_len));
- 
--	if (device->id >= ioc->DevicesPerBus) {
-+	if (device->id > sh->max_id) {
- 		/* error case, should never happen */
- 		scsi_adjust_queue_depth(device, 0, 1);
- 		goto slave_configure_exit;
- 	}
- 
--	pMptTarget = ioc->Target_List[device->channel];
--	pTarget = pMptTarget->Target[device->id];
-+	pTarget = hd->Targets[device->id];
- 
- 	if (pTarget == NULL) {
- 		/* Driver doesn't know about this device.
-@@ -3122,19 +2852,19 @@ mptscsih_slave_configure(struct scsi_dev
- 		pTarget->configured_lun=1;
- 
- 	/* LUN persistancy support */
--	if (ioc->bus_type == FC) {
-+	if (hd->ioc->bus_type == FC) {
- 		FCDevicePage0_t fcDevicePage;
- 
--		rc = mptscsih_readFCDevicePage0(ioc,
--		    pTarget->bus, pTarget->id, &fcDevicePage);
-+		rc = mptscsih_readFCDevicePage0(hd->ioc,
-+		    pTarget->bus_id, pTarget->target_id, &fcDevicePage);
- 
- 		if (rc > offsetof(FCDevicePage0_t,PortIdentifier)) {
- 			pTarget->WWPN = fcDevicePage.WWPN;
- 			pTarget->WWNN = fcDevicePage.WWNN;
- 
- 			dsprintk((MYIOC_s_INFO_FMT
--			"  bus=%d id=%d is WWPN = %08x%08x, WWNN = %08x%08x\n",
--				ioc->name, pTarget->bus, pTarget->id,
-+			"  target %d is WWPN = %08x%08x, WWNN = %08x%08x\n",
-+				hd->ioc->name, pTarget->target_id,
- 				le32_to_cpu(fcDevicePage.WWPN.High),
- 				le32_to_cpu(fcDevicePage.WWPN.Low),
- 				le32_to_cpu(fcDevicePage.WWNN.High),
-@@ -3147,19 +2877,19 @@ mptscsih_slave_configure(struct scsi_dev
- 		device->inquiry, device->inquiry_len );
- 	mptscsih_change_queue_depth(device, MPT_SCSI_CMD_PER_DEV_HIGH);
- 
--	dinitprintk((MYIOC_s_INFO_FMT
-+	dsprintk((MYIOC_s_INFO_FMT
- 		"Queue depth=%d, tflags=%x\n",
--		ioc->name, device->queue_depth, pTarget->tflags));
-+		hd->ioc->name, device->queue_depth, pTarget->tflags));
- 
--	dinitprintk((MYIOC_s_INFO_FMT
-+	dsprintk((MYIOC_s_INFO_FMT
- 		"negoFlags=%x, maxOffset=%x, SyncFactor=%x\n",
--		ioc->name, pTarget->negoFlags, pTarget->maxOffset, pTarget->minSyncFactor));
-+		hd->ioc->name, pTarget->negoFlags, pTarget->maxOffset, pTarget->minSyncFactor));
- 
- slave_configure_exit:
- 
--	dinitprintk((MYIOC_s_INFO_FMT
-+	dsprintk((MYIOC_s_INFO_FMT
- 		"tagged %d, simple %d, ordered %d\n",
--		ioc->name,device->tagged_supported, device->simple_tags,
-+		hd->ioc->name,device->tagged_supported, device->simple_tags,
- 		device->ordered_tags));
- 
- 	return 0;
-@@ -3220,20 +2950,16 @@ mptscsih_poll(struct scsi_device *sdev)
- static void
- mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR *mf, SCSIIOReply_t *pScsiReply)
- {
--	MPT_ADAPTER	*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice	*pTarget;
- 	SCSIIORequest_t	*pReq;
- 	u32		 sense_count = le32_to_cpu(pScsiReply->SenseCount);
--	int		 bus, id;
-+	int		 target;
- 
- 	/* Get target structure
- 	 */
- 	pReq = (SCSIIORequest_t *) mf;
--	bus = (int) pReq->Bus;
--	id = (int) pReq->TargetID;
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
-+	target = (int) pReq->TargetID;
-+	pTarget = hd->Targets[target];
- 
- 	if (sense_count) {
- 		u8 *sense_data;
-@@ -3241,15 +2967,15 @@ mptscsih_copy_sense_data(struct scsi_cmn
- 
- 		/* Copy the sense received into the scsi command block. */
- 		req_index = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--		sense_data = ((u8 *)ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC));
-+		sense_data = ((u8 *)hd->ioc->sense_buf_pool + (req_index * MPT_SENSE_BUFFER_ALLOC));
- 		memcpy(sc->sense_buffer, sense_data, SNS_LEN(sc));
--		DBG_DUMP_SENSE_DATA(sense_data);
- 
- 		/* Log SMART data (asc = 0x5D, non-IM case only) if required.
- 		 */
--		if ((ioc->events) && (ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) {
-+		if ((hd->ioc->events) && (hd->ioc->eventTypes & (1 << MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE))) {
- 			if ((sense_data[12] == 0x5D) && (pTarget->raidVolume == 0)) {
- 				int idx;
-+				MPT_ADAPTER *ioc = hd->ioc;
- 
- 				idx = ioc->eventContext % MPTCTL_EVENT_LOG_SIZE;
- 				ioc->events[idx].event = MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE;
-@@ -3287,21 +3013,19 @@ mptscsih_copy_sense_data(struct scsi_cmn
- 		}
- 	} else {
- 		dprintk((MYIOC_s_INFO_FMT "Hmmm... SenseData len=0! (?)\n",
--				ioc->name));
-+				hd->ioc->name));
- 	}
- }
- 
--static int
-+static u32
- SCPNT_TO_LOOKUP_IDX(struct scsi_cmnd *sc)
- {
- 	MPT_SCSI_HOST *hd;
--	MPT_ADAPTER	*ioc;
- 	int i;
- 
- 	hd = (MPT_SCSI_HOST *) sc->device->host->hostdata;
- 
--	ioc = hd->ioc;
--	for (i = 0; i < ioc->req_depth; i++) {
-+	for (i = 0; i < hd->ioc->req_depth; i++) {
- 		if (hd->ScsiLookup[i] == sc) {
- 			return i;
- 		}
-@@ -3315,10 +3039,8 @@ int
- mptscsih_ioc_reset(MPT_ADAPTER *ioc, int reset_phase)
- {
- 	MPT_SCSI_HOST	*hd;
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice	*pTarget;
- 	unsigned long	 flags;
--	int 		bus, id, ii;
-+	int 		ii;
- 	int		n;
- 
- 	dtmprintk((KERN_INFO MYNAM
-@@ -3338,8 +3060,11 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int
- 	if (reset_phase == MPT_IOC_SETUP_RESET) {
- 		dtmprintk((MYIOC_s_WARN_FMT "Setup-Diag Reset\n", ioc->name));
- 
--                mptscsih_flush_running_cmds(hd);
--                dtmprintk((MYIOC_s_WARN_FMT "Setup-Diag Complete\n", ioc->name));
-+		/* Clean Up:
-+		 * 1. Set Hard Reset Pending Flag
-+		 * All new commands go to doneQ
-+		 */
-+		hd->resetPending = 1;
- 
- 	} else if (reset_phase == MPT_IOC_PRE_RESET) {
- 		dtmprintk((MYIOC_s_WARN_FMT "Pre-Diag Reset\n", ioc->name));
-@@ -3358,41 +3083,28 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int
- 		 * free these resources.
- 		 */
- 		if (hd->cmdPtr) {
--			del_timer(&hd->InternalCmdTimer);
-+			del_timer(&hd->timer);
- 			mpt_free_msg_frame(ioc, hd->cmdPtr);
--                        hd->cmdPtr = NULL;
- 		}
--               /* 2d. If a task management has not completed,
--                * free resources associated with this request.
--                */
--               if (ioc->tmPtr) {
--                       del_timer(&ioc->TMtimer);
--                       mpt_free_msg_frame(ioc, ioc->tmPtr);
--                       ioc->tmPtr = NULL;
--               }
- 
--               dtmprintk((MYIOC_s_WARN_FMT "Pre-Reset complete.\n", ioc->name));
-+		dtmprintk((MYIOC_s_WARN_FMT "Pre-Reset complete.\n", ioc->name));
- 
- 	} else {
- 		dtmprintk((MYIOC_s_WARN_FMT "Post-Diag Reset\n", ioc->name));
- 
- 		if (ioc->bus_type == FC) {
- 			n = 0;
--			for (bus = 0; bus < ioc->NumberOfBuses; bus++) {
--				pMptTarget = ioc->Target_List[bus];
--				for (id=0; id < ioc->DevicesPerBus; id++) {
--					pTarget = pMptTarget->Target[id];
--					if (pTarget) {
--						dsprintk((MYIOC_s_INFO_FMT
--							"bus=%d id=%d is known to be WWPN %08x%08x, WWNN %08x%08x\n",
--							ioc->name, bus, id,
--							le32_to_cpu(pTarget->WWPN.High),
--							le32_to_cpu(pTarget->WWPN.Low),
--							le32_to_cpu(pTarget->WWNN.High),
--							le32_to_cpu(pTarget->WWNN.Low)));
--						mptscsih_writeFCPortPage3(hd, bus, id);
--						n++;
--					}
-+			for (ii=0; ii < ioc->sh->max_id; ii++) {
-+				if (hd->Targets && hd->Targets[ii]) {
-+					dsprintk((MYIOC_s_INFO_FMT
-+						"target %d is known to be WWPN %08x%08x, WWNN %08x%08x\n",
-+						ioc->name, ii,
-+						le32_to_cpu(hd->Targets[ii]->WWPN.High),
-+						le32_to_cpu(hd->Targets[ii]->WWPN.Low),
-+						le32_to_cpu(hd->Targets[ii]->WWNN.High),
-+						le32_to_cpu(hd->Targets[ii]->WWNN.Low)));
-+					mptscsih_writeFCPortPage3(hd, ii);
-+					n++;
- 				}
- 			}
- 
-@@ -3408,7 +3120,7 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int
- 
- 		/* ScsiLookup initialization
- 		 */
--		for (ii=0; ii < ioc->req_depth; ii++)
-+		for (ii=0; ii < hd->ioc->req_depth; ii++)
- 			hd->ScsiLookup[ii] = NULL;
- 
- 		/* 2. Chain Buffer initialization
-@@ -3417,19 +3129,17 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int
- 		/* 4. Renegotiate to all devices, if SPI
- 		 */
- 		if (ioc->bus_type == SPI) {
--                       dnegoprintk((MYIOC_s_WARN_FMT "%s: writeSDP1: ALL_IDS USE_NVRAM\n",
--                               ioc->name, __FUNCTION__));
--                       mpt_writeSDP1(ioc, 0, 0, (MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM));
--
-+			dnegoprintk(("writeSDP1: ALL_IDS USE_NVRAM\n"));
-+			mptscsih_writeSDP1(hd, 0, 0, MPT_SCSICFG_ALL_IDS | MPT_SCSICFG_USE_NVRAM);
- 		}
- 
- 		/* 5. Enable new commands to be posted
- 		 */
- 		spin_lock_irqsave(&ioc->FreeQlock, flags);
- 		hd->tmPending = 0;
-+		spin_unlock_irqrestore(&ioc->FreeQlock, flags);
-+		hd->resetPending = 0;
- 		hd->tmState = TM_STATE_NONE;
--                spin_unlock_irqrestore(&ioc->FreeQlock, flags);
--
- 
- 		/* 6. If there was an internal command,
- 		 * wake this process up.
-@@ -3448,9 +3158,8 @@ mptscsih_ioc_reset(MPT_ADAPTER *ioc, int
- 		/* 7. Set flag to force DV and re-read IOC Page 3
- 		 */
- 		if (ioc->bus_type == SPI) {
--ioc->spi_data.forceDv = MPT_SCSICFG_RELOAD_IOC_PG3;
--ddvprintk(("Set reload IOC Pg3 Flag\n"));
--
-+			ioc->spi_data.forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3;
-+			ddvtprintk(("Set reload IOC Pg3 Flag\n"));
- 		}
- 
- 		dtmprintk((MYIOC_s_WARN_FMT "Post-Reset complete.\n", ioc->name));
-@@ -3468,13 +3177,9 @@ mptscsih_event_process(MPT_ADAPTER *ioc,
- {
- 	MPT_SCSI_HOST *hd;
- 	u8 event = le32_to_cpu(pEvReply->Event) & 0xFF;
--       struct _MPT_DEVICE      *pMptTarget;
--       VirtDevice              *pTarget;
--       int      physDiskNum, bus, id;
--
--       devtprintk((MYIOC_s_WARN_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n",
--                       ioc->name, event));
- 
-+	devtprintk((MYIOC_s_INFO_FMT "MPT event (=%02Xh) routed to SCSI host driver!\n",
-+			ioc->name, event));
- 
- 	if (ioc->sh == NULL ||
- 		((hd = (MPT_SCSI_HOST *)ioc->sh->hostdata) == NULL))
-@@ -3508,53 +3213,16 @@ mptscsih_event_process(MPT_ADAPTER *ioc,
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
- 	case MPI_EVENT_INTEGRATED_RAID:			/* 0B */
- 	{
-+		pMpiEventDataRaid_t pRaidEventData =
-+		    (pMpiEventDataRaid_t) pEvReply->Data;
- 
--#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
--                pMpiEventDataRaid_t pRaidEventData =
--                (pMpiEventDataRaid_t) &pEvReply->Data;
--
--/* Domain Validation Needed */
-+		/* Domain Validation Needed */
- 		if (ioc->bus_type == SPI &&
- 			pRaidEventData->ReasonCode ==
- 			MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED) {
--                         SpiCfgData      *pSpi;
--                       physDiskNum = pRaidEventData->PhysDiskNum;
--                       if (ioc->raid_data.pIocPg3) {
--                               id = ioc->raid_data.pIocPg3->PhysDisk[physDiskNum].PhysDiskID;
--                               bus = ioc->raid_data.pIocPg3->PhysDisk[physDiskNum].PhysDiskBus;
--                               pMptTarget = ioc->Target_List[bus];
--                               pTarget = (VirtDevice *)pMptTarget->Target[id];
--                               ddvprintk((KERN_WARNING "%s: Raid Event: DV Requested for PhysDiskNum=%d bus=%d id=%d pTarget=%p\n",
--                                       ioc->name, physDiskNum, bus, id, pTarget));
--                       } else {
--                               ddvprintk((KERN_WARNING "%s: Raid Event: DV Requested for PhysDiskNum=%d but raid_data.pIocPg3 is NULL\n",
--                                       ioc->name, physDiskNum));
--                               break;
--                       }
--                       pSpi = &ioc->spi_data;
--                       pSpi->dvStatus[id] |= (MPT_SCSICFG_PHYSDISK_DV_ONLY |
--                                             MPT_SCSICFG_NEED_DV |
--                                             MPT_SCSICFG_DV_NOT_DONE);
--
--                       if (pTarget == NULL) {
-- ddvprintk((KERN_WARNING " Raid Event: DV Requested for PhysDiskNum=%d bus=%d id=%d but pTarget is NULL\n",
--                                       physDiskNum, bus, id));
--                               mptscsih_initTarget(hd, bus, id, 0,
--                                       NULL, 0 );
--                               pTarget = (VirtDevice *)pMptTarget->Target[id];
-- ddvprintk((KERN_WARNING "%s: Raid Event: DV Requested for PhysDiskNum=%d bus=%d id=%d pTarget%p now\n",
--                                       ioc->name, physDiskNum, bus, id, pTarget));
--                       }
--                       pSpi->forceDv |= MPT_SCSICFG_RELOAD_IOC_PG3;
-- ddvprintk((KERN_WARNING "%s: Raid Event: Scheduling DV for PhysDiskNum=%d bus=%d id=%d pTarget=%p\n",
--                               ioc->name, physDiskNum, bus, id, pTarget));
-- INIT_WORK(&pTarget->dvTask, mptscsih_domainValidation, (void *) pTarget);
--                       schedule_work(&pTarget->dvTask);
-- ddvprintk((KERN_WARNING "%s: Raid Event: DV Scheduled for PhysDiskNum=%d bus=%d id=%d pTarget=%p\n",
--                               ioc->name, physDiskNum, bus, id, pTarget));
--#endif
- 
--	}
-+			mptscsih_set_dvflags_raid(hd, pRaidEventData->PhysDiskNum);
-+		}
- 		break;
- 	}
- #endif
-@@ -3575,8 +3243,8 @@ mptscsih_event_process(MPT_ADAPTER *ioc,
- /*
-  *	mptscsih_initTarget - Target, LUN alloc/free functionality.
-  *	@hd: Pointer to MPT_SCSI_HOST structure
-- *	@bus: Bus number (?)
-- *	@id: SCSI target id
-+ *	@bus_id: Bus number (?)
-+ *	@target_id: SCSI target id
-  *	@lun: SCSI LUN id
-  *	@data: Pointer to data
-  *	@dlen: Number of INQUIRY bytes
-@@ -3589,17 +3257,16 @@ mptscsih_event_process(MPT_ADAPTER *ioc,
-  *
-  */
- static void
--mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus, int id, u8 lun, char *data, int dlen)
-+mptscsih_initTarget(MPT_SCSI_HOST *hd, int bus_id, int target_id, u8 lun, char *data, int dlen)
- {
- 	int		indexed_lun, lun_index;
- 	MPT_ADAPTER	*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice	*pTarget;
- 	SpiCfgData	*pSpi;
- 	char		data_56;
- 
--	dinitprintk((MYIOC_s_WARN_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n",
--			ioc->name, bus, id, lun, hd));
-+	dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d hd=%p\n",
-+			ioc->name, bus_id, target_id, lun, hd));
- 
- 	/*
- 	 * If the peripheral qualifier filter is enabled then if the target reports a 0x1
-@@ -3610,71 +3277,29 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, i
- 	 * around a bug in th emid-layer in some distributions in which the mid-layer will
- 	 * continue to try to communicate to the LUN and evntually create a dummy LUN.
- 	*/
--	if (hd->mpt_pq_filter && dlen && (data[0] & 0x20))
-+	if (hd->mpt_pq_filter && dlen && (data[0] & 0xE0))
- 		data[0] |= 0x40;
- 
- 	/* Is LUN supported? If so, upper 2 bits will be 0
- 	* in first byte of inquiry data.
- 	*/
-+	if (data[0] & 0xe0)
-+		return;
- 
--        if (dlen && (data[0] & 0xe0))
--	return;
--
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
--       if (pTarget == NULL) {
--               dinitprintk((MYIOC_s_INFO_FMT "initTarget bus=%d id=%d lun=%d pTarget is NULL\n"
--,
--                       ioc->name, bus, id, lun));
--               pTarget = kmalloc(sizeof(VirtDevice), GFP_KERNEL);
--               if (!pTarget) {
--                       printk(MYIOC_s_ERR_FMT "initTarget kmalloc(%zd) FAILED!\n",
--                               ioc->name, sizeof(VirtDevice));
--                       return;
--               }
--
--               memset(pTarget, 0, sizeof(VirtDevice));
--               if (ioc->bus_type != SPI)
--                       pTarget->tflags = MPT_TARGET_FLAGS_Q_YES;
--               pTarget->ioc = ioc;
--               pTarget->id = id;
--               pTarget->bus = bus;
--               pTarget->last_lun = MPT_LAST_LUN;
--               pTarget->raidVolume = 0;
--               pMptTarget->Target[id] = pTarget;
--               if (ioc->bus_type == SPI) {
--                       if (ioc->raid_data.isRaid & (1 << id)) {
--                               pTarget->raidVolume = 1;
--                               ddvprintk((KERN_INFO
--                                   "RAID Volume @ id %d\n", id));
--                       }
--               }
--
-+	if ((pTarget = hd->Targets[target_id]) == NULL) {
- 		return;
--}
--	dinitprintk((MYIOC_s_WARN_FMT "initTarget bus=%d id=%d lun=%d pTarget=%p\n",
--			ioc->name, bus, id, lun, pTarget));
--       pSpi = &ioc->spi_data;
--       pTarget->ioc = ioc;
--       pTarget->tflags &= ~MPT_TARGET_FLAGS_DELETED;
-+	}
- 
- 	lun_index = (lun >> 5);  /* 32 luns per lun_index */
- 	indexed_lun = (lun % 32);
- 	pTarget->luns[lun_index] |= (1 << indexed_lun);
- 
--	if (!(pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) {
--		if ( dlen > 8 ) {
--			memcpy (pTarget->inq_data, data, 8);
--		} else {
--			memcpy (pTarget->inq_data, data, dlen);
--		}
--	}
- 	if (ioc->bus_type == SPI) {
- 		if ((data[0] == TYPE_PROCESSOR) && (ioc->spi_data.Saf_Te)) {
- 			/* Treat all Processors as SAF-TE if
- 			 * command line option is set */
- 			pTarget->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED;
--			mptscsih_writeIOCPage4(hd, id, bus);
-+			mptscsih_writeIOCPage4(hd, target_id, bus_id);
- 		}else if ((data[0] == TYPE_PROCESSOR) &&
- 			!(pTarget->tflags & MPT_TARGET_FLAGS_SAF_TE_ISSUED )) {
- 			if ( dlen > 49 ) {
-@@ -3686,17 +3311,29 @@ mptscsih_initTarget(MPT_SCSI_HOST *hd, i
- 				     data[48] == 'T' &&
- 				     data[49] == 'E' ) {
- 					pTarget->tflags |= MPT_TARGET_FLAGS_SAF_TE_ISSUED;
--					mptscsih_writeIOCPage4(hd, id, bus);
-+					mptscsih_writeIOCPage4(hd, target_id, bus_id);
- 				}
- 			}
- 		}
--data_56 = 0x00;  /* Default to no Ultra 160 or 320 capabilities if Inq data length is < 57 */
--
--
- 		if (!(pTarget->tflags & MPT_TARGET_FLAGS_VALID_INQUIRY)) {
-+			if ( dlen > 8 ) {
-+				memcpy (pTarget->inq_data, data, 8);
-+			} else {
-+				memcpy (pTarget->inq_data, data, dlen);
-+			}
-+
-+			/* If have not done DV, set the DV flag.
-+			 */
-+			pSpi = &ioc->spi_data;
-+			if ((data[0] == TYPE_TAPE) || (data[0] == TYPE_PROCESSOR)) {
-+				if (pSpi->dvStatus[target_id] & MPT_SCSICFG_DV_NOT_DONE)
-+					pSpi->dvStatus[target_id] |= MPT_SCSICFG_NEED_DV;
-+			}
- 
- 			pTarget->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY;
- 
-+
-+			data_56 = 0x00;  /* Default to no Ultra 160 or 320 capabilities if Inq data length is < 57 */
- 			if (dlen > 56) {
- 				if ( (!(pTarget->tflags & MPT_TARGET_FLAGS_VALID_56))) {
- 				/* Update the target capabilities
-@@ -3705,6 +3342,7 @@ data_56 = 0x00;  /* Default to no Ultra 
- 					pTarget->tflags |= MPT_TARGET_FLAGS_VALID_56;
- 				}
- 			}
-+			mptscsih_setTargetNegoParms(hd, pTarget, data_56);
- 		} else {
- 			/* Initial Inquiry may not request enough data bytes to
- 			 * obtain byte 57.  DV will; if target doesn't return
-@@ -3715,40 +3353,25 @@ data_56 = 0x00;  /* Default to no Ultra 
- 				 */
- 					data_56 = data[56];
- 					pTarget->tflags |= MPT_TARGET_FLAGS_VALID_56;
-+					mptscsih_setTargetNegoParms(hd, pTarget, data_56);
- 				}
- 			}
- 		}
--
--mptscsih_setTargetNegoParms(hd, pTarget, data_56);
--if (pSpi->dvStatus[id] & MPT_SCSICFG_NEED_DV) {
--       ddvprintk((MYIOC_s_WARN_FMT "%s: DV Scheduled for non-PhysDisk id %d\n",
--                 ioc->name, __FUNCTION__, id));
--INIT_WORK(&pTarget->dvTask, mptscsih_domainValidation, (void *) pTarget);
--schedule_work(&pTarget->dvTask);
--       }
--       } else {
--         pTarget->tflags |= MPT_TARGET_FLAGS_VALID_INQUIRY;
--         if (ioc->bus_type == SAS) {
--            if ( (pTarget->inq_data[7] & 0x02) == 0) {
--                 pTarget->tflags &= ~MPT_TARGET_FLAGS_Q_YES;
--                     }
--            if ((data[0] == TYPE_TAPE)) {
--                      if (ioc->facts.IOCCapabilities &
--                               MPI_IOCFACTS_CAPABILITY_TLR ) {
--                      if ((pTarget->tflags & MPT_TARGET_FLAGS_TLR_DONE) == 0){
--                                               if ( data[8]  == 'H' &&
--                                                    data[9]  == 'P' &&
--                                                    data[10] == ' ' &&
--                                                    data[11] == ' ' &&
--                                                    data[12] == ' ' &&
--                                                    data[13] == ' ' &&
--                                                    data[14] == ' ' &&
--                                                    data[15] == ' ' ) {
--                                                       mpt_IssueTLR(hd, pTarget);
--                                                  pTarget->tflags |= MPT_TARGET_FLAGS_TLR_DONE;
--
--                                                }
--
-+	} else if (ioc->bus_type == SAS) {
-+		if ((data[0] == TYPE_TAPE)) {
-+			if (ioc->facts.IOCCapabilities & 
-+				MPI_IOCFACTS_CAPABILITY_TLR ) {
-+				if ((pTarget->tflags & MPT_TARGET_FLAGS_TLR_DONE) == 0) {
-+					if ( data[8]  == 'H' &&
-+					     data[9]  == 'P' &&
-+					     data[10] == ' ' &&
-+					     data[11] == ' ' &&
-+					     data[12] == ' ' &&
-+					     data[13] == ' ' &&
-+					     data[14] == ' ' &&
-+					     data[15] == ' ' ) {
-+						mpt_IssueTLR(hd, pTarget);
-+						pTarget->tflags |= MPT_TARGET_FLAGS_TLR_DONE;
- 					}
- 				}
- 			}
-@@ -3760,12 +3383,11 @@ schedule_work(&pTarget->dvTask);
- static void
- mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevice *pTarget)
- {
--	MPT_ADAPTER		*ioc = hd->ioc;
- 	INTERNAL_CMD		 iocmd;
- 	int			 lun, indexed_lun, lun_index;
- 
--	iocmd.id = pTarget->id;
--	iocmd.bus = pTarget->bus;
-+	iocmd.id = pTarget->target_id;
-+	iocmd.bus = pTarget->bus_id;
- 	for (lun=0; lun <= MPT_LAST_LUN; lun++) {
- 		/* If LUN present, issue the command
- 		 */
-@@ -3777,7 +3399,7 @@ mpt_IssueTLR(MPT_SCSI_HOST *hd, VirtDevi
- 		}
- 	}
- 	printk(MYIOC_s_INFO_FMT "mpt_IssueTLR: Unable find a lun on id=%d\n",
--		ioc->name, iocmd.id);
-+		hd->ioc->name, iocmd.id);
- 	return;
- issueTLR:
- 	iocmd.flags = 0;
-@@ -3790,7 +3412,7 @@ issueTLR:
- 	if (mptscsih_do_cmd(hd, &iocmd) < 0) {
- 		if (mptscsih_do_cmd(hd, &iocmd) < 0) {
- 			printk(MYIOC_s_INFO_FMT "Unable to set TLR on id=%d\n",
--				ioc->name, iocmd.id);
-+				hd->ioc->name, iocmd.id);
- 		}
- 	}
- }
-@@ -3802,14 +3424,12 @@ issueTLR:
-  *
-  */
- static void
--mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *pTarget, char byte56)
-+mptscsih_setTargetNegoParms(MPT_SCSI_HOST *hd, VirtDevice *target, char byte56)
- {
--	MPT_ADAPTER	*ioc = hd->ioc;
--	SpiCfgData *pspi_data = &ioc->spi_data;
--	int  id = (int) pTarget->id;
-+	SpiCfgData *pspi_data = &hd->ioc->spi_data;
-+	int  id = (int) target->target_id;
- 	int  nvram;
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice	*loop_pTarget;
-+	VirtDevice	*pTarget;
- 	int ii;
- 	u8 width = MPT_NARROW;
- 	u8 factor = MPT_ASYNC;
-@@ -3817,36 +3437,31 @@ mptscsih_setTargetNegoParms(MPT_SCSI_HOS
- 	u8 version, nfactor;
- 	u8 noQas = 1;
- 
--	pTarget->negoFlags = pspi_data->noQas;
--ddvprintk((KERN_INFO "Command-line QAS setting sets noQas=%02x on id=%d!\n",
--               pspi_data->noQas, id));
-+	target->negoFlags = pspi_data->noQas;
- 
--/* noQas == 0 => device supports QAS. Need byte 56 of Inq to determine
-+	ddvtprintk((KERN_INFO "Command-line QAS setting sets noQas=%02x on id=%d!\n", 
-+		pspi_data->noQas, id));
-+	/* noQas == 0 => device supports QAS. Need byte 56 of Inq to determine
- 	 * support. If available, default QAS to off and allow enabling.
- 	 * If not available, default QAS to on, turn off for non-disks.
- 	 */
- 
- 	/* Set flags based on Inquiry data
- 	 */
--	version = pTarget->inq_data[2] & 0x07;
-+	version = target->inq_data[2] & 0x07;
- 	if (version < 2) {
- 		width = 0;
- 		factor = MPT_ULTRA2;
- 		offset = pspi_data->maxSyncOffset;
--		pTarget->tflags &= ~MPT_TARGET_FLAGS_Q_YES;
-+		target->tflags &= ~MPT_TARGET_FLAGS_Q_YES;
- 	} else {
--		if (pTarget->inq_data[7] & 0x20) {
-+		if (target->inq_data[7] & 0x20) {
- 			width = 1;
- 		}
- 
--               if (pTarget->inq_data[7] & 0x02)
--                       pTarget->tflags |= MPT_TARGET_FLAGS_Q_YES;
--               else
--                       pTarget->tflags &= ~MPT_TARGET_FLAGS_Q_YES;
--
--		if (pTarget->inq_data[7] & 0x10) {
-+		if (target->inq_data[7] & 0x10) {
- 			factor = pspi_data->minSyncFactor;
--			if (pTarget->tflags & MPT_TARGET_FLAGS_VALID_56) {
-+			if (target->tflags & MPT_TARGET_FLAGS_VALID_56) {
- 				/* bits 2 & 3 show Clocking support */
- 				if ((byte56 & 0x0C) == 0)
- 					factor = MPT_ULTRA2;
-@@ -3857,17 +3472,17 @@ ddvprintk((KERN_INFO "Command-line QAS s
- 						factor = MPT_ULTRA320;
- 						if (byte56 & 0x02)
- 						{
--                                                   ddvprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id));
-+							ddvtprintk((KERN_INFO "Enabling QAS due to byte56=%02x on id=%d!\n", byte56, id));
- 							noQas = 0;
- 						}
--						if (pTarget->inq_data[0] == TYPE_TAPE) {
-+						if (target->inq_data[0] == TYPE_TAPE) {
- 							if (byte56 & 0x01)
--								pTarget->negoFlags |= MPT_TAPE_NEGO_IDP;
-+								target->negoFlags |= MPT_TAPE_NEGO_IDP;
- 						}
- 					}
- 				}
- 			} else {
--				ddvprintk((KERN_INFO "Ultra 80 on id=%d due to ~TARGET_FLAGS_VALID_56!\n", id));
-+				ddvtprintk((KERN_INFO "Ultra 80 on id=%d due to ~TARGET_FLAGS_VALID_56!\n", id));
- 				factor = MPT_ULTRA2;
- 			}
- 
-@@ -3879,7 +3494,7 @@ ddvprintk((KERN_INFO "Command-line QAS s
- 			 * bit 1 QAS support, non-raid only
- 			 * bit 0 IU support
- 			 */
--			if (pTarget->raidVolume == 1) {
-+			if (target->raidVolume == 1) {
- 				noQas = 0;
- 			}
- 		} else {
-@@ -3888,6 +3503,9 @@ ddvprintk((KERN_INFO "Command-line QAS s
- 		}
- 	}
- 
-+	if ( (target->inq_data[7] & 0x02) == 0) {
-+		target->tflags &= ~MPT_TARGET_FLAGS_Q_YES;
-+	}
- 
- 	/* Update tflags based on NVRAM settings. (SCSI only)
- 	 */
-@@ -3926,43 +3544,41 @@ ddvprintk((KERN_INFO "Command-line QAS s
- 
- 	/* Save the data to the target structure.
- 	 */
--	pTarget->minSyncFactor = factor;
--	pTarget->maxOffset = offset;
--	pTarget->maxWidth = width;
-+	target->minSyncFactor = factor;
-+	target->maxOffset = offset;
-+	target->maxWidth = width;
- 
--	pTarget->tflags |= MPT_TARGET_FLAGS_VALID_NEGO;
-+	target->tflags |= MPT_TARGET_FLAGS_VALID_NEGO;
- 
- 	/* Disable unused features.
- 	 */
- 	if (!width)
--		pTarget->negoFlags |= MPT_TARGET_NO_NEGO_WIDE;
-+		target->negoFlags |= MPT_TARGET_NO_NEGO_WIDE;
- 
- 	if (!offset)
--		pTarget->negoFlags |= MPT_TARGET_NO_NEGO_SYNC;
-+		target->negoFlags |= MPT_TARGET_NO_NEGO_SYNC;
- 
- 	if ( factor > MPT_ULTRA320 )
- 		noQas = 0;
- 
- 	/* GEM, processor WORKAROUND
- 	 */
--	if ((pTarget->inq_data[0] == TYPE_PROCESSOR) || (pTarget->inq_data[0] > 0x08)) {
--		pTarget->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC);
-+	if ((target->inq_data[0] == TYPE_PROCESSOR) || (target->inq_data[0] > 0x08)) {
-+		target->negoFlags |= (MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC);
- 		pspi_data->dvStatus[id] |= MPT_SCSICFG_BLK_NEGO;
- 	} else {
- 		if (noQas && (pspi_data->noQas == 0)) {
- 			pspi_data->noQas |= MPT_TARGET_NO_NEGO_QAS;
--			pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS;
-+			target->negoFlags |= MPT_TARGET_NO_NEGO_QAS;
- 
- 			/* Disable QAS in a mixed configuration case
- 	 		*/
--ddvprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id));
- 
--                pMptTarget = ioc->Target_List[0];
-+			ddvtprintk((KERN_INFO "Disabling QAS due to noQas=%02x on id=%d!\n", noQas, id));
- 			for (ii = 0; ii < id; ii++) {
--				loop_pTarget = pMptTarget->Target[id];
--				if ((loop_pTarget)) {
--					loop_pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS;
--                                        mpt_writeSDP1(ioc, 0, ii, loop_pTarget->negoFlags);
-+				if ( (pTarget = hd->Targets[ii]) ) {
-+					pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS;
-+					mptscsih_writeSDP1(hd, 0, ii, pTarget->negoFlags);
- 				}
- 			}
- 		}
-@@ -3970,33 +3586,115 @@ ddvprintk((KERN_INFO "Disabling QAS due 
- 
- 	/* Write SDP1 on this I/O to this target */
- 	if (pspi_data->dvStatus[id] & MPT_SCSICFG_NEGOTIATE) {
--		dnegoprintk((KERN_INFO "MPT_SCSICFG_NEGOTIATE on id=%d!\n", id));
--                /* First IO to this device; NEED_DV will cause async/narrow */
--                mpt_writeSDP1(ioc, 0, id, 0);
-+		ddvtprintk((KERN_INFO "MPT_SCSICFG_NEGOTIATE on id=%d!\n", id));
-+		mptscsih_writeSDP1(hd, 0, id, hd->negoNvram);
- 		pspi_data->dvStatus[id] &= ~MPT_SCSICFG_NEGOTIATE;
- 	} else if (pspi_data->dvStatus[id] & MPT_SCSICFG_BLK_NEGO) {
--		dnegoprintk((KERN_INFO "MPT_SCSICFG_BLK_NEGO on id=%d!\n", id));
--		mpt_writeSDP1(ioc, 0, id, MPT_SCSICFG_BLK_NEGO);
-+		ddvtprintk((KERN_INFO "MPT_SCSICFG_BLK_NEGO on id=%d!\n", id));
-+		mptscsih_writeSDP1(hd, 0, id, MPT_SCSICFG_BLK_NEGO);
- 		pspi_data->dvStatus[id] &= ~MPT_SCSICFG_BLK_NEGO;
- 	}
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/* If DV disabled (negoNvram set to USE_NVARM) or if not LUN 0, return.
-+ * Else set the NEED_DV flag after Read Capacity Issued (disks)
-+ * or Mode Sense (cdroms).
-+ *
-+ * Tapes, initTarget will set this flag on completion of Inquiry command.
-+ * Called only if DV_NOT_DONE flag is set
-+ */
-+static void
-+mptscsih_set_dvflags(MPT_SCSI_HOST *hd, SCSIIORequest_t *pReq)
-+{
-+	MPT_ADAPTER	*ioc = hd->ioc;
-+	u8 cmd;
-+	SpiCfgData	*pSpi;
-+
-+	ddvtprintk((MYIOC_s_NOTE_FMT
-+		" set_dvflags: id=%d lun=%d negoNvram=%x cmd=%x\n",
-+		hd->ioc->name, pReq->TargetID, pReq->LUN[1], hd->negoNvram, pReq->CDB[0]));
-+
-+	if ((pReq->LUN[1] != 0) || (hd->negoNvram != 0))
-+		return;
-+
-+	cmd = pReq->CDB[0];
-+
-+	if ((cmd == READ_CAPACITY) || (cmd == MODE_SENSE)) {
-+		pSpi = &ioc->spi_data;
-+		if ((ioc->raid_data.isRaid & (1 << pReq->TargetID)) && ioc->raid_data.pIocPg3) {
-+			/* Set NEED_DV for all hidden disks
-+			 */
-+			Ioc3PhysDisk_t *pPDisk =  ioc->raid_data.pIocPg3->PhysDisk;
-+			int		numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks;
-+
-+			while (numPDisk) {
-+				pSpi->dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV;
-+				ddvtprintk(("NEED_DV set for phys disk id %d\n", pPDisk->PhysDiskID));
-+				pPDisk++;
-+				numPDisk--;
-+			}
-+		}
-+		pSpi->dvStatus[pReq->TargetID] |= MPT_SCSICFG_NEED_DV;
-+		ddvtprintk(("NEED_DV set for visible disk id %d\n", pReq->TargetID));
-+	}
-+}
-+
-+/* mptscsih_raid_set_dv_flags()
-+ *
-+ * New or replaced disk. Set DV flag and schedule DV.
-+ */
-+static void
-+mptscsih_set_dvflags_raid(MPT_SCSI_HOST *hd, int id)
-+{
-+	MPT_ADAPTER	*ioc = hd->ioc;
-+	SpiCfgData	*pSpi = &ioc->spi_data;
-+	Ioc3PhysDisk_t	*pPDisk;
-+	int		 numPDisk;
-+
-+	if (hd->negoNvram != 0)
-+		return;
-+
-+	ddvtprintk(("DV requested for phys disk id %d\n", id));
-+	if (ioc->raid_data.pIocPg3) {
-+		pPDisk =  ioc->raid_data.pIocPg3->PhysDisk;
-+		numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks;
-+		while (numPDisk) {
-+			if (id == pPDisk->PhysDiskNum) {
-+				pSpi->dvStatus[pPDisk->PhysDiskID] =
-+				    (MPT_SCSICFG_NEED_DV | MPT_SCSICFG_DV_NOT_DONE);
-+				pSpi->forceDv = MPT_SCSICFG_NEED_DV;
-+				ddvtprintk(("NEED_DV set for phys disk id %d\n",
-+				    pPDisk->PhysDiskID));
-+				break;
-+			}
-+			pPDisk++;
-+			numPDisk--;
-+		}
-+
-+		if (numPDisk == 0) {
-+			/* The physical disk that needs DV was not found
-+			 * in the stored IOC Page 3. The driver must reload
-+			 * this page. DV routine will set the NEED_DV flag for
-+			 * all phys disks that have DV_NOT_DONE set.
-+			 */
-+			pSpi->forceDv = MPT_SCSICFG_NEED_DV | MPT_SCSICFG_RELOAD_IOC_PG3;
-+			ddvtprintk(("phys disk %d not found. Setting reload IOC Pg3 Flag\n",id));
-+		}
-+	}
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*
-  * If no Target, bus reset on 1st I/O. Set the flag to
-  * prevent any future negotiations to this device.
-  */
- static void
--mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int id)
-+mptscsih_no_negotiate(MPT_SCSI_HOST *hd, int target_id)
- {
--	MPT_ADAPTER	*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
--	VirtDevice	*pTarget;
- 
--	pMptTarget = ioc->Target_List[0];
--	pTarget = pMptTarget->Target[id];
--	if (pTarget == NULL)
--		ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_BLK_NEGO;
-+	if (hd->Targets[target_id] == NULL)
-+		hd->ioc->spi_data.dvStatus[target_id] |= MPT_SCSICFG_BLK_NEGO;
- 
- 	return;
- }
-@@ -4006,9 +3704,266 @@ mptscsih_no_negotiate(MPT_SCSI_HOST *hd,
-  *  SCSI Config Page functionality ...
-  */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*	mptscsih_setDevicePage1Flags  - add Requested and Configuration fields flags
-+ *	based on width, factor and offset parameters.
-+ *	@width: bus width
-+ *	@factor: sync factor
-+ *	@offset: sync offset
-+ *	@requestedPtr: pointer to requested values (updated)
-+ *	@configurationPtr: pointer to configuration values (updated)
-+ *	@flags: flags to block WDTR or SDTR negotiation
-+ *
-+ *	Return: None.
-+ *
-+ *	Remark: Called by writeSDP1 and _dv_params
-+ */
-+static void
-+mptscsih_setDevicePage1Flags (u8 width, u8 factor, u8 offset, int *requestedPtr, int *configurationPtr, u8 flags)
-+{
-+	u8 nowide = flags & MPT_TARGET_NO_NEGO_WIDE;
-+	u8 nosync = flags & MPT_TARGET_NO_NEGO_SYNC;
-+
-+	*configurationPtr = 0;
-+	*requestedPtr = width ? MPI_SCSIDEVPAGE1_RP_WIDE : 0;
-+	*requestedPtr |= (offset << 16) | (factor << 8);
-+
-+	if (width && offset && !nowide && !nosync) {
-+		if (factor < MPT_ULTRA160) {
-+			*requestedPtr |= (MPI_SCSIDEVPAGE1_RP_IU + MPI_SCSIDEVPAGE1_RP_DT);
-+			if ((flags & MPT_TARGET_NO_NEGO_QAS) == 0)
-+				*requestedPtr |= MPI_SCSIDEVPAGE1_RP_QAS;
-+			if (flags & MPT_TAPE_NEGO_IDP)
-+				*requestedPtr |= 0x08000000;
-+		} else if (factor < MPT_ULTRA2) {
-+			*requestedPtr |= MPI_SCSIDEVPAGE1_RP_DT;
-+		}
-+	}
-+
-+	if (nowide)
-+		*configurationPtr |= MPI_SCSIDEVPAGE1_CONF_WDTR_DISALLOWED;
-+
-+	if (nosync)
-+		*configurationPtr |= MPI_SCSIDEVPAGE1_CONF_SDTR_DISALLOWED;
-+
-+	return;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-+/*	mptscsih_writeSDP1  - write SCSI Device Page 1
-+ *	@hd: Pointer to a SCSI Host Strucutre
-+ *	@portnum: IOC port number
-+ *	@target_id: writeSDP1 for single ID
-+ *	@flags: MPT_SCSICFG_ALL_IDS, MPT_SCSICFG_USE_NVRAM, MPT_SCSICFG_BLK_NEGO
-+ *
-+ *	Return: -EFAULT if read of config page header fails
-+ *		or 0 if success.
-+ *
-+ *	Remark: If a target has been found, the settings from the
-+ *		target structure are used, else the device is set
-+ *		to async/narrow.
-+ *
-+ *	Remark: Called during init and after a FW reload.
-+ *	Remark: We do not wait for a return, write pages sequentially.
-+ */
-+static int
-+mptscsih_writeSDP1(MPT_SCSI_HOST *hd, int portnum, int target_id, int flags)
-+{
-+	MPT_ADAPTER		*ioc = hd->ioc;
-+	Config_t		*pReq;
-+	SCSIDevicePage1_t	*pData;
-+	VirtDevice		*pTarget;
-+	MPT_FRAME_HDR		*mf;
-+	dma_addr_t		 dataDma;
-+	u16			 req_idx;
-+	u32			 frameOffset;
-+	u32			 requested, configuration, flagsLength;
-+	int			 ii, nvram;
-+	int			 id = 0, maxid = 0;
-+	u8			 width;
-+	u8			 factor;
-+	u8			 offset;
-+	u8			 bus = 0;
-+	u8			 negoFlags;
-+	u8			 maxwidth, maxoffset, maxfactor;
-+
-+	if (ioc->spi_data.sdp1length == 0)
-+		return 0;
-+
-+	if (flags & MPT_SCSICFG_ALL_IDS) {
-+		id = 0;
-+		maxid = ioc->sh->max_id - 1;
-+	} else if (ioc->sh) {
-+		id = target_id;
-+		maxid = min_t(int, id, ioc->sh->max_id - 1);
-+	}
-+
-+	for (; id <= maxid; id++) {
-+
-+		if (id == ioc->pfacts[portnum].PortSCSIID)
-+			continue;
-+
-+		/* Use NVRAM to get adapter and target maximums
-+		 * Data over-riden by target structure information, if present
-+		 */
-+		maxwidth = ioc->spi_data.maxBusWidth;
-+		maxoffset = ioc->spi_data.maxSyncOffset;
-+		maxfactor = ioc->spi_data.minSyncFactor;
-+		if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) {
-+			nvram = ioc->spi_data.nvram[id];
-+
-+			if (maxwidth)
-+				maxwidth = nvram & MPT_NVRAM_WIDE_DISABLE ? 0 : 1;
-+
-+			if (maxoffset > 0) {
-+				maxfactor = (nvram & MPT_NVRAM_SYNC_MASK) >> 8;
-+				if (maxfactor == 0) {
-+					/* Key for async */
-+					maxfactor = MPT_ASYNC;
-+					maxoffset = 0;
-+				} else if (maxfactor < ioc->spi_data.minSyncFactor) {
-+					maxfactor = ioc->spi_data.minSyncFactor;
-+				}
-+			} else
-+				maxfactor = MPT_ASYNC;
-+		}
-+
-+		/* Set the negotiation flags.
-+		 */
-+		negoFlags = ioc->spi_data.noQas;
-+		if (!maxwidth)
-+			negoFlags |= MPT_TARGET_NO_NEGO_WIDE;
-+
-+		if (!maxoffset)
-+			negoFlags |= MPT_TARGET_NO_NEGO_SYNC;
-+
-+		if (flags & MPT_SCSICFG_USE_NVRAM) {
-+			width = maxwidth;
-+			factor = maxfactor;
-+			offset = maxoffset;
-+		} else {
-+			width = 0;
-+			factor = MPT_ASYNC;
-+			offset = 0;
-+			//negoFlags = 0;
-+			//negoFlags = MPT_TARGET_NO_NEGO_SYNC;
-+		}
-+
-+		/* If id is not a raid volume, get the updated
-+		 * transmission settings from the target structure.
-+		 */
-+		if ( (pTarget = hd->Targets[id]) && !pTarget->raidVolume) {
-+			width = pTarget->maxWidth;
-+			factor = pTarget->minSyncFactor;
-+			offset = pTarget->maxOffset;
-+			negoFlags |= pTarget->negoFlags;
-+		}
-+
-+#ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
-+		/* Force to async and narrow if DV has not been executed
-+		 * for this ID
-+		 */
-+		if ((hd->ioc->spi_data.dvStatus[id] & MPT_SCSICFG_DV_NOT_DONE) != 0) {
-+			width = 0;
-+			factor = MPT_ASYNC;
-+			offset = 0;
-+		}
-+#endif
-+
-+		if (flags & MPT_SCSICFG_BLK_NEGO)
-+			negoFlags |= MPT_TARGET_NO_NEGO_WIDE | MPT_TARGET_NO_NEGO_SYNC;
-+
-+		mptscsih_setDevicePage1Flags(width, factor, offset,
-+					&requested, &configuration, negoFlags);
-+		dnegoprintk(("writeSDP1: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n",
-+			target_id, width, factor, offset, negoFlags, requested, configuration));
-+
-+		/* Get a MF for this command.
-+		 */
-+		if ((mf = mpt_get_msg_frame(ioc->DoneCtx, ioc)) == NULL) {
-+			dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
-+			    ioc->name,__FUNCTION__));
-+			return -EAGAIN;
-+		}
-+
-+		ddvprintk((MYIOC_s_INFO_FMT "WriteSDP1 (mf=%p, id=%d, req=0x%x, cfg=0x%x)\n",
-+			hd->ioc->name, mf, id, requested, configuration));
-+
-+
-+		/* Set the request and the data pointers.
-+		 * Request takes: 36 bytes (32 bit SGE)
-+		 * SCSI Device Page 1 requires 16 bytes
-+		 * 40 + 16 <= size of SCSI IO Request = 56 bytes
-+		 * and MF size >= 64 bytes.
-+		 * Place data at end of MF.
-+		 */
-+		pReq = (Config_t *)mf;
-+
-+		req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
-+		frameOffset = ioc->req_sz - sizeof(SCSIDevicePage1_t);
-+
-+		pData = (SCSIDevicePage1_t *)((u8 *) mf + frameOffset);
-+		dataDma = ioc->req_frames_dma + (req_idx * ioc->req_sz) + frameOffset;
-+
-+		/* Complete the request frame (same for all requests).
-+		 */
-+		pReq->Action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
-+		pReq->Reserved = 0;
-+		pReq->ChainOffset = 0;
-+		pReq->Function = MPI_FUNCTION_CONFIG;
-+		pReq->ExtPageLength = 0;
-+		pReq->ExtPageType = 0;
-+		pReq->MsgFlags = 0;
-+		for (ii=0; ii < 8; ii++) {
-+			pReq->Reserved2[ii] = 0;
-+		}
-+		pReq->Header.PageVersion = ioc->spi_data.sdp1version;
-+		pReq->Header.PageLength = ioc->spi_data.sdp1length;
-+		pReq->Header.PageNumber = 1;
-+		pReq->Header.PageType = MPI_CONFIG_PAGETYPE_SCSI_DEVICE;
-+		pReq->PageAddress = cpu_to_le32(id | (bus << 8 ));
-+
-+		/* Add a SGE to the config request.
-+		 */
-+		flagsLength = MPT_SGE_FLAGS_SSIMPLE_WRITE | ioc->spi_data.sdp1length * 4;
-+
-+		mpt_add_sge((char *)&pReq->PageBufferSGE, flagsLength, dataDma);
-+
-+		/* Set up the common data portion
-+		 */
-+		pData->Header.PageVersion = pReq->Header.PageVersion;
-+		pData->Header.PageLength = pReq->Header.PageLength;
-+		pData->Header.PageNumber = pReq->Header.PageNumber;
-+		pData->Header.PageType = pReq->Header.PageType;
-+		pData->RequestedParameters = cpu_to_le32(requested);
-+		pData->Reserved = 0;
-+		pData->Configuration = cpu_to_le32(configuration);
-+
-+		if ( pTarget ) {
-+			if ( requested & MPI_SCSIDEVPAGE1_RP_IU ) {
-+				pTarget->last_lun = MPT_LAST_LUN;
-+			} else {
-+				pTarget->last_lun = MPT_NON_IU_LAST_LUN;
-+			}
-+			dsprintk((MYIOC_s_INFO_FMT
-+				"writeSDP1: last_lun=%d on id=%d\n",
-+				ioc->name, pTarget->last_lun, id));
-+		}
-+
-+		dprintk((MYIOC_s_INFO_FMT
-+			"write SDP1: id %d pgaddr 0x%x req 0x%x config 0x%x\n",
-+				ioc->name, id, (id | (bus<<8)),
-+				requested, configuration));
-+
-+		mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
-+	}
-+
-+	return 0;
-+}
-+
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*	mptscsih_writeIOCPage4  - write IOC Page 4
-  *	@hd: Pointer to a SCSI Host Structure
-- *	@id: write IOC Page4 for this ID & Bus
-+ *	@target_id: write IOC Page4 for this ID & Bus
-  *
-  *	Return: -EAGAIN if unable to obtain a Message Frame
-  *		or 0 if success.
-@@ -4016,7 +3971,7 @@ mptscsih_no_negotiate(MPT_SCSI_HOST *hd,
-  *	Remark: We do not wait for a return, write pages sequentially.
-  */
- static int
--mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int id, int bus)
-+mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd, int target_id, int bus)
- {
- 	MPT_ADAPTER		*ioc = hd->ioc;
- 	Config_t		*pReq;
-@@ -4060,10 +4015,10 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd
-        	IOCPage4Ptr = ioc->spi_data.pIocPg4;
-        	dataDma = ioc->spi_data.IocPg4_dma;
-        	ii = IOCPage4Ptr->ActiveSEP++;
--	IOCPage4Ptr->SEP[ii].SEPTargetID = id;
-+       	IOCPage4Ptr->SEP[ii].SEPTargetID = target_id;
-        	IOCPage4Ptr->SEP[ii].SEPBus = bus;
-        	pReq->Header = IOCPage4Ptr->Header;
--	pReq->PageAddress = cpu_to_le32(id | (bus << 8 ));
-+	pReq->PageAddress = cpu_to_le32(target_id | (bus << 8 ));
- 
- 	/* Add a SGE to the config request.
- 	 */
-@@ -4074,7 +4029,7 @@ mptscsih_writeIOCPage4(MPT_SCSI_HOST *hd
- 
- 	dinitprintk((MYIOC_s_INFO_FMT
- 		"writeIOCPage4: MaxSEP=%d ActiveSEP=%d id=%d bus=%d\n",
--			ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, id, bus));
-+			ioc->name, IOCPage4Ptr->MaxSEP, IOCPage4Ptr->ActiveSEP, target_id, bus));
- 
- 	mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
- 
-@@ -4116,9 +4071,6 @@ mptscsih_scandv_complete(MPT_ADAPTER *io
- 
- 	hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
- 
--        del_timer(&hd->InternalCmdTimer);
--
--
- 	if ((mf == NULL) ||
- 	    (mf >= MPT_INDEX_2_MFPTR(ioc, ioc->req_depth))) {
- 		printk(MYIOC_s_ERR_FMT
-@@ -4127,18 +4079,19 @@ mptscsih_scandv_complete(MPT_ADAPTER *io
- 		goto wakeup;
- 	}
- 
-+	del_timer(&hd->timer);
- 	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
- 	hd->ScsiLookup[req_idx] = NULL;
- 	pReq = (SCSIIORequest_t *) mf;
- 
- 	if (mf != hd->cmdPtr) {
--		printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p,!= cmdPtr=%p, idx=%d)\n",
--				ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx);
-+		printk(MYIOC_s_WARN_FMT "ScanDvComplete (mf=%p, cmdPtr=%p, idx=%d)\n",
-+				hd->ioc->name, (void *)mf, (void *) hd->cmdPtr, req_idx);
- 	}
- 	hd->cmdPtr = NULL;
- 
--	ddvprintk((MYIOC_s_WARN_FMT "ScanDvComplete mf=%p,mr=%p,idx=%d\n",
--			ioc->name, mf, mr, req_idx));
-+	ddvprintk((MYIOC_s_INFO_FMT "ScanDvComplete (mf=%p,mr=%p,idx=%d)\n",
-+			hd->ioc->name, mf, mr, req_idx));
- 
- 	hd->pLocal = &hd->localReply;
- 	hd->pLocal->scsiStatus = 0;
-@@ -4156,9 +4109,10 @@ mptscsih_scandv_complete(MPT_ADAPTER *io
- 
- 		status = le16_to_cpu(pReply->IOCStatus) & MPI_IOCSTATUS_MASK;
- 		scsi_status = pReply->SCSIStatus;
-- ddvprintk((MYIOC_s_WARN_FMT "%s: IOCStatus=%04xh SCSIState=%02xh SCSIStatus=%02xh IOCLogInfo=%08xh\n",
--                     ioc->name, __FUNCTION__, status, pReply->SCSIState, scsi_status,
--                     le32_to_cpu(pReply->IOCLogInfo)));
-+
-+		ddvtprintk((KERN_NOTICE "  IOCStatus=%04xh, SCSIState=%02xh, SCSIStatus=%02xh, IOCLogInfo=%08xh\n",
-+			     status, pReply->SCSIState, scsi_status,
-+			     le32_to_cpu(pReply->IOCLogInfo)));
- 
- 		switch(status) {
- 
-@@ -4203,14 +4157,13 @@ mptscsih_scandv_complete(MPT_ADAPTER *io
- 				 */
- 				completionCode = MPT_SCANDV_SENSE;
- 				hd->pLocal->scsiStatus = scsi_status;
--				sense_data = ((u8 *)ioc->sense_buf_pool +
-+				sense_data = ((u8 *)hd->ioc->sense_buf_pool +
- 					(req_idx * MPT_SENSE_BUFFER_ALLOC));
- 
- 				sz = min_t(int, pReq->SenseBufferLength,
- 							SCSI_STD_SENSE_BYTES);
- 				memcpy(hd->pLocal->sense, sense_data, sz);
- 
--				DBG_DUMP_SENSE_DATA(sense_data);
- 				ddvprintk((KERN_NOTICE "  Check Condition, sense ptr %p\n",
- 						sense_data));
- 			} else if (pReply->SCSIState & MPI_SCSI_STATE_AUTOSENSE_FAILED) {
-@@ -4224,7 +4177,7 @@ mptscsih_scandv_complete(MPT_ADAPTER *io
- 			else if (pReply->SCSIState & MPI_SCSI_STATE_TERMINATED)
- 				completionCode = MPT_SCANDV_DID_RESET;
- 			else if (scsi_status == MPI_SCSI_STATUS_BUSY)
--				completionCode = MPT_SCANDV_BUSY;
-+				completionCode = MPT_SCANDV_SOME_ERROR;
- 			else {
- 				completionCode = MPT_SCANDV_GOOD;
- 				hd->pLocal->scsiStatus = scsi_status;
-@@ -4243,9 +4196,9 @@ mptscsih_scandv_complete(MPT_ADAPTER *io
- 			break;
- 
- 		}	/* switch(status) */
--               ddvprintk((MYIOC_s_WARN_FMT ": completionCode=%08xh\n",
--                       ioc->name, completionCode));
- 
-+		ddvtprintk((KERN_NOTICE "  completionCode set to %08xh\n",
-+				completionCode));
- 	} /* end of address reply case */
- 
- 	hd->pLocal->completion = completionCode;
-@@ -4266,53 +4219,48 @@ wakeup:
- }
- 
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
--/*	mptscsih_InternalCmdTimer_expired - Call back for DV timer process.
-+/*	mptscsih_timer_expired - Call back for timer process.
-  *	Used only for dv functionality.
-  *	@data: Pointer to MPT_SCSI_HOST recast as an unsigned long
-  *
-  */
--void mptscsih_InternalCmdTimer_expired(unsigned long data)
-+void
-+mptscsih_timer_expired(unsigned long data)
- {
- 	MPT_SCSI_HOST *hd = (MPT_SCSI_HOST *) data;
--	MPT_ADAPTER	*ioc=hd->ioc;
--	MPIHeader_t *cmd = (MPIHeader_t *)hd->cmdPtr;
- 
--	ddvprintk((MYIOC_s_WARN_FMT "InternalCmdTimer_expired! cmdPtr=%p\n",
--		ioc->name, cmd));
-+	ddvprintk((MYIOC_s_WARN_FMT "Timer Expired! Cmd %p\n", hd->ioc->name, hd->cmdPtr));
- 
--	hd->cmdPtr = NULL;
--	if (cmd->Function == MPI_FUNCTION_SCSI_IO_REQUEST) {
--#ifdef MPT_DEBUG_DV
--		SCSIIORequest_t	*pScsiReq = (SCSIIORequest_t *) cmd;
--		int	 id = pScsiReq->TargetID;
--
--		/* Desire to issue a task management request here.
--		 * TM requests MUST be single threaded.
--		 * If old eh code and no TM current, issue request.
--		 * If new eh code, do nothing. Wait for OS cmd timeout
--		 *	for bus reset.
--		 */
--		ddvprintk((MYIOC_s_WARN_FMT "DV Cmd Timeout: id=%d CDB=%02x\n",
--			ioc->name, id, pScsiReq->CDB[0]));
--#endif
-+	if (hd->cmdPtr) {
-+		MPIHeader_t *cmd = (MPIHeader_t *)hd->cmdPtr;
- 
--		/*
--		 * Wake up the original calling thread
--		 */
--		hd->pLocal = &hd->localReply;
--		hd->pLocal->completion = MPT_SCANDV_FALLBACK;
--		hd->scandv_wait_done = 1;
--		wake_up(&hd->scandv_waitq);
--	} else {
--		/* Perform a FW reload */
--		if (mpt_HardResetHandler(ioc, NO_SLEEP) < 0) {
--			printk(MYIOC_s_WARN_FMT "InternalCmdTimer_expired: HardReset FAILED!\n", ioc->name);
--			dfailprintk((MYIOC_s_ERR_FMT "InternalCmdTimer_expired: HardReset failed\n", ioc->name));
-+		if (cmd->Function == MPI_FUNCTION_SCSI_IO_REQUEST) {
-+			/* Desire to issue a task management request here.
-+			 * TM requests MUST be single threaded.
-+			 * If old eh code and no TM current, issue request.
-+			 * If new eh code, do nothing. Wait for OS cmd timeout
-+			 *	for bus reset.
-+			 */
-+			ddvtprintk((MYIOC_s_NOTE_FMT "DV Cmd Timeout: NoOp\n", hd->ioc->name));
- 		} else {
--			ddvprintk((MYIOC_s_ERR_FMT "InternalCmdTimer_expired: HardReset succeeded\n", ioc->name));
-+			/* Perform a FW reload */
-+			if (mpt_HardResetHandler(hd->ioc, NO_SLEEP) < 0) {
-+				printk(MYIOC_s_WARN_FMT "Firmware Reload FAILED!\n", hd->ioc->name);
-+			}
- 		}
-+	} else {
-+		/* This should NEVER happen */
-+		printk(MYIOC_s_WARN_FMT "Null cmdPtr!!!!\n", hd->ioc->name);
- 	}
--	ddvprintk((MYIOC_s_WARN_FMT "InternalCmdTimer_expired Complete!\n", ioc->name));
-+
-+	/* No more processing.
-+	 * TM call will generate an interrupt for SCSI TM Management.
-+	 * The FW will reply to all outstanding commands, callback will finish cleanup.
-+	 * Hard reset clean-up will free all resources.
-+	 */
-+	ddvprintk((MYIOC_s_WARN_FMT "Timer Expired Complete!\n", hd->ioc->name));
-+
-+	return;
- }
- 
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
-@@ -4331,23 +4279,22 @@ void mptscsih_InternalCmdTimer_expired(u
- static int
- mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 action, INTERNAL_CMD *io)
- {
--	MPT_ADAPTER		*ioc = hd->ioc;
- 	MpiRaidActionRequest_t	*pReq;
- 	MPT_FRAME_HDR		*mf;
- 	int			in_isr;
- 
- 	in_isr = in_interrupt();
- 	if (in_isr) {
--		dfailprintk((MYIOC_s_WARN_FMT "Internal raid request not allowed in ISR context!\n",
--				ioc->name));
-+		dprintk((MYIOC_s_WARN_FMT "Internal raid request not allowed in ISR context!\n",
-+       				hd->ioc->name));
- 		return -EPERM;
- 	}
- 
- 	/* Get and Populate a free Frame
- 	 */
--	if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
-+	if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) {
- 		dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
--		    ioc->name,__FUNCTION__));
-+		    hd->ioc->name,__FUNCTION__));
- 		return -EAGAIN;
- 	}
- 	pReq = (MpiRaidActionRequest_t *)mf;
-@@ -4367,11 +4314,10 @@ mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 a
- 		MPT_SGE_FLAGS_SSIMPLE_READ | 0, (dma_addr_t) -1);
- 
- 	ddvprintk((MYIOC_s_INFO_FMT "RAID Volume action %x id %d\n",
--			ioc->name, action, io->id));
-+			hd->ioc->name, action, io->id));
- 
- 	hd->pLocal = NULL;
--	hd->InternalCmdTimer.data = (unsigned long) hd;
--        hd->InternalCmdTimer.expires = jiffies + HZ*10; /* 10 second timeout */
-+	hd->timer.expires = jiffies + HZ*10; /* 10 second timeout */
- 	hd->scandv_wait_done = 0;
- 
- 	/* Save cmd pointer, for resource free if timeout or
-@@ -4379,8 +4325,8 @@ mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 a
- 	 */
- 	hd->cmdPtr = mf;
- 
--	add_timer(&hd->InternalCmdTimer);
--        mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
-+	add_timer(&hd->timer);
-+	mpt_put_msg_frame(hd->ioc->InternalCtx, hd->ioc, mf);
- 	wait_event(hd->scandv_waitq, hd->scandv_wait_done);
- 
- 	if ((hd->pLocal == NULL) || (hd->pLocal->completion != MPT_SCANDV_GOOD))
-@@ -4413,7 +4359,6 @@ mptscsih_do_raid(MPT_SCSI_HOST *hd, u8 a
- int
- mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *io)
- {
--	MPT_ADAPTER	*ioc = hd->ioc;
- 	MPT_FRAME_HDR	*mf;
- 	SCSIIORequest_t	*pScsiReq;
- 	SCSIIORequest_t	 ReqCopy;
-@@ -4426,8 +4371,8 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
- 
- 	in_isr = in_interrupt();
- 	if (in_isr) {
--		dfailprintk((MYIOC_s_WARN_FMT "Internal SCSI IO request not allowed in ISR context!\n",
--				ioc->name));
-+		dprintk((MYIOC_s_WARN_FMT "Internal SCSI IO request not allowed in ISR context!\n",
-+       				hd->ioc->name));
- 		return -EPERM;
- 	}
- 
-@@ -4542,16 +4487,14 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
- 
- 	default:
- 		/* Error Case */
--		dfailprintk((MYIOC_s_WARN_FMT "%s,Unknown cmd=%02x!!\n",
--		    ioc->name,__FUNCTION__, cmd));
- 		return -EFAULT;
- 	}
- 
- 	/* Get and Populate a free Frame
- 	 */
--	if ((mf = mpt_get_msg_frame(ioc->InternalCtx, ioc)) == NULL) {
-+	if ((mf = mpt_get_msg_frame(hd->ioc->InternalCtx, hd->ioc)) == NULL) {
- 		dfailprintk((MYIOC_s_WARN_FMT "%s, no msg frames!!\n",
--		    ioc->name,__FUNCTION__));
-+		    hd->ioc->name,__FUNCTION__));
- 		return -EBUSY;
- 	}
- 
-@@ -4593,18 +4536,18 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
- 	if (cmd == REQUEST_SENSE) {
- 		pScsiReq->Control = cpu_to_le32(dir | MPI_SCSIIO_CONTROL_UNTAGGED);
- 		ddvprintk((MYIOC_s_INFO_FMT "Untagged! 0x%2x\n",
--			ioc->name, cmd));
-+			hd->ioc->name, cmd));
- 	}
- 
- 	for (ii=0; ii < 16; ii++)
- 		pScsiReq->CDB[ii] = CDB[ii];
- 
- 	pScsiReq->DataLength = cpu_to_le32(io->size);
--	pScsiReq->SenseBufferLowAddr = cpu_to_le32(ioc->sense_buf_low_dma
-+	pScsiReq->SenseBufferLowAddr = cpu_to_le32(hd->ioc->sense_buf_low_dma
- 					   + (my_idx * MPT_SENSE_BUFFER_ALLOC));
- 
--       ddvprintk((MYIOC_s_INFO_FMT "Sending Command 0x%x for (%d:%d:%d) mf=%p\n",
--                       ioc->name, cmd, io->bus, io->id, io->lun, pScsiReq));
-+	ddvprintk((MYIOC_s_INFO_FMT "Sending Command 0x%x for (%d:%d:%d)\n",
-+			hd->ioc->name, cmd, io->bus, io->id, io->lun));
- 
- 	if (dir == MPI_SCSIIO_CONTROL_READ) {
- 		mpt_add_sge((char *) &pScsiReq->SGL,
-@@ -4630,8 +4573,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
- 	 *	set scandv_wait_done and call wake_up
- 	 */
- 	hd->pLocal = NULL;
--        hd->InternalCmdTimer.data = (unsigned long) hd;
--        hd->InternalCmdTimer.expires = jiffies + HZ*cmdTimeout;
-+	hd->timer.expires = jiffies + HZ*cmdTimeout;
- 	hd->scandv_wait_done = 0;
- 
- 	/* Save cmd pointer, for resource free if timeout or
-@@ -4639,8 +4581,8 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
- 	 */
- 	hd->cmdPtr = mf;
- 
--        add_timer(&hd->InternalCmdTimer);
--	mpt_put_msg_frame(ioc->InternalCtx, ioc, mf);
-+	add_timer(&hd->timer);
-+	mpt_put_msg_frame(hd->ioc->InternalCtx, hd->ioc, mf);
- 	wait_event(hd->scandv_waitq, hd->scandv_wait_done);
- 
- 	if (hd->pLocal) {
-@@ -4657,7 +4599,7 @@ mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTER
- 		rc = -EFAULT;
- 		/* This should never happen. */
- 		ddvprintk((MYIOC_s_INFO_FMT "_do_cmd: Null pLocal!!!\n",
--				ioc->name));
-+				hd->ioc->name));
- 	}
- 
- 	return rc;
-@@ -4678,7 +4620,6 @@ static int
- mptscsih_synchronize_cache(MPT_SCSI_HOST *hd, int portnum)
- {
- 	MPT_ADAPTER		*ioc= hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
- 	SCSIDevicePage1_t	*pcfg1Data = NULL;
- 	INTERNAL_CMD		 iocmd;
-@@ -4690,6 +4631,7 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 	int			 lun;
- 	int			 indexed_lun, lun_index;
- 	int			 hostId = ioc->pfacts[portnum].PortSCSIID;
-+	int			 max_id;
- 	int			 requested, configuration, data;
- 	int			 doConfig = 0;
- 	u8			 flags, factor;
-@@ -4697,6 +4639,8 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 	dexitprintk((KERN_INFO MYNAM ": %s called\n",
- 		__FUNCTION__));
- 
-+	max_id = ioc->sh->max_id - 1;
-+
- 	/* Following parameters will not change
- 	 * in this routine.
- 	 */
-@@ -4733,11 +4677,10 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 
- 	/* loop through all devices on this port
- 	 */
--	while (bus < ioc->NumberOfBuses) {
-+	while (bus < MPT_MAX_BUS) {
- 		iocmd.bus = bus;
- 		iocmd.id = id;
--		pMptTarget = ioc->Target_List[bus];
--		pTarget = pMptTarget->Target[id];
-+		pTarget = hd->Targets[(int)id];
- 
- 		if (doConfig) {
- 
-@@ -4745,9 +4688,9 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 			if (pTarget && !pTarget->raidVolume) {
- 				flags = pTarget->negoFlags;
- 			} else {
--				flags = ioc->spi_data.noQas;
--				if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) {
--					data = ioc->spi_data.nvram[id];
-+				flags = hd->ioc->spi_data.noQas;
-+				if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) {
-+					data = hd->ioc->spi_data.nvram[id];
- 
- 					if (data & MPT_NVRAM_WIDE_DISABLE)
- 						flags |= MPT_TARGET_NO_NEGO_WIDE;
-@@ -4759,16 +4702,16 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 			}
- 
- 			/* Force to async, narrow */
--                       mpt_setSDP1parameters(0, MPT_ASYNC, 0, flags,
--                               &requested, &configuration);
--                       dnegoprintk(("%s: syncronize cache: id=%d width=0 factor=MPT_ASYNC "
--                                "offset=0 negoFlags=%x requested=%x configuration=%x\n",
--                                ioc->name, id, flags, requested, configuration));
-+			mptscsih_setDevicePage1Flags(0, MPT_ASYNC, 0, &requested,
-+					&configuration, flags);
-+			dnegoprintk(("syncronize cache: id=%d width=0 factor=MPT_ASYNC "
-+				"offset=0 negoFlags=%x request=%x config=%x\n",
-+				id, flags, requested, configuration));
- 			pcfg1Data->RequestedParameters = cpu_to_le32(requested);
- 			pcfg1Data->Reserved = 0;
- 			pcfg1Data->Configuration = cpu_to_le32(configuration);
- 			cfg.pageAddr = (bus<<8) | id;
--			mpt_config(ioc, &cfg);
-+			mpt_config(hd->ioc, &cfg);
- 		}
- 
- 		/* If target Ptr NULL or if this target is NOT a disk, skip.
-@@ -4780,9 +4723,6 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 				lun_index = (lun >> 5);  /* 32 luns per lun_index */
- 				indexed_lun = (lun % 32);
- 				if (pTarget->luns[lun_index] & (1<<indexed_lun)) {
--					dexitprintk((KERN_INFO MYNAM ": %s: synchronize_cache for bus=%d id=%d lun=%d\n",
--						ioc->name, bus, id, lun));
--
- 					iocmd.lun = lun;
- 					(void) mptscsih_do_cmd(hd, &iocmd);
- 				}
-@@ -4795,27 +4735,21 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- 		if (id == hostId)
- 			id++;
- 
--		if (id >= ioc->DevicesPerBus) {
-+		if (id > max_id) {
- 			id = 0;
- 			bus++;
- 		}
- 	}
- 
--	dexitprintk((KERN_INFO MYNAM ": %s: synchronize_cache commands done\n",
--		ioc->name));
--
- 	if (pcfg1Data) {
--		dexitprintk((KERN_INFO MYNAM ": %s: free pcfg1Data=%p\n",
--			ioc->name, pcfg1Data));
- 		pci_free_consistent(ioc->pcidev, header1.PageLength * 4, pcfg1Data, cfg1_dma_addr);
- 	}
- 
--	dexitprintk((KERN_INFO MYNAM ": %s: synchronize_cache done\n",
--		ioc->name));
- 	return 0;
- }
- 
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
-+/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /**
-  *	mptscsih_domainValidation - Top level handler for domain validation.
-  *	@hd: Pointer to MPT_SCSI_HOST structure.
-@@ -4829,209 +4763,163 @@ mptscsih_synchronize_cache(MPT_SCSI_HOST
- static void
- mptscsih_domainValidation(void *arg)
- {
--	VirtDevice	*pTarget=(VirtDevice *)arg;
--	MPT_SCSI_HOST	*hd;
--	MPT_ADAPTER	*ioc;
--	unsigned long	 flags;
--	int 		 id, dvStatus;
--	int		 ii;
-+	MPT_SCSI_HOST		*hd;
-+	MPT_ADAPTER		*ioc;
-+	unsigned long		 flags;
-+	int 			 id, maxid, dvStatus, did;
-+	int			 ii, isPhysDisk;
- 
- 	spin_lock_irqsave(&dvtaskQ_lock, flags);
- 	dvtaskQ_active = 1;
-+	if (dvtaskQ_release) {
-+		dvtaskQ_active = 0;
-+		spin_unlock_irqrestore(&dvtaskQ_lock, flags);
-+		return;
-+	}
- 	spin_unlock_irqrestore(&dvtaskQ_lock, flags);
- 
--	if (pTarget == NULL) {
--		ddvprintk((KERN_WARNING "domainValidation called with NULL pTarget\n"));
--		goto mptscsih_domainValidation_exit;
--	}
--	id = pTarget->id;
--	ioc = pTarget->ioc;
--	if (ioc == NULL) {
--		ddvprintk((KERN_WARNING "domainValidation called with NULL pTarget->ioc id=%d\n", id));
--		goto mptscsih_domainValidation_exit;
--	}
--//	set_current_state(TASK_INTERRUPTIBLE);
--//	schedule_timeout(MPT_HZ/4);
-+	if (crashdump_mode())
-+		return;
- 
--	hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
-+	/* For this ioc, loop through all devices and do dv to each device.
-+	 * When complete with this ioc, search through the ioc list, and
-+	 * for each scsi ioc found, do dv for all devices. Exit when no
-+	 * device needs dv.
-+	 */
-+	did = 1;
-+	while (did) {
-+		did = 0;
-+		list_for_each_entry(ioc, &ioc_list, list) {
-+			spin_lock_irqsave(&dvtaskQ_lock, flags);
-+			if (dvtaskQ_release) {
-+				dvtaskQ_active = 0;
-+				spin_unlock_irqrestore(&dvtaskQ_lock, flags);
-+				return;
-+			}
-+			spin_unlock_irqrestore(&dvtaskQ_lock, flags);
- 
--	ddvprintk((KERN_WARNING "domainValidation pTarget=%p ioc=%p hd=%p id=%d\n",
--		pTarget, ioc, hd, id));
--	if (hd == NULL) {
--		ddvprintk((KERN_WARNING "domainValidation called with NULL hd id=%d\n", id));
--		goto mptscsih_domainValidation_exit;
--	}
-+			msleep(250);
- 
--	if ((ioc->spi_data.forceDv & MPT_SCSICFG_RELOAD_IOC_PG3) != 0) {
--		mpt_read_ioc_pg_3(ioc);
--		if (ioc->spi_data.dvStatus[id] & MPT_SCSICFG_PHYSDISK_DV_ONLY) {
--			ddvprintk((KERN_WARNING "PHYSDISK_DV_ONLY id=%d\n", id));
--			ioc->spi_data.dvStatus[id] &=
--				~MPT_SCSICFG_PHYSDISK_DV_ONLY;
--			if (mptscsih_doDv(hd, 0, id) == 1) {
--				/* Untagged device was busy, try again
--				 */
--				ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV;
--			} else {
--				/* DV is complete. Clear flags.
--				 */
--				ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE;
--			}
--			goto mptscsih_domainValidation_exit;
--		}
-+			/* DV only to SPI adapters */
-+			if (ioc->bus_type != SPI)
-+				continue;
- 
--		if (ioc->raid_data.pIocPg3) {
--			Ioc3PhysDisk_t *pPDisk = ioc->raid_data.pIocPg3->PhysDisk;
--			int	numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks;
-+			/* Make sure everything looks ok */
-+			if (ioc->sh == NULL)
-+				continue;
- 
--			while (numPDisk) {
--				if (ioc->spi_data.dvStatus[pPDisk->PhysDiskID] & MPT_SCSICFG_DV_NOT_DONE)
--					ioc->spi_data.dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV;
-+			hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
-+			if (hd == NULL)
-+				continue;
- 
--				pPDisk++;
--				numPDisk--;
-+			if ((ioc->spi_data.forceDv & MPT_SCSICFG_RELOAD_IOC_PG3) != 0) {
-+				mpt_read_ioc_pg_3(ioc);
-+				if (ioc->raid_data.pIocPg3) {
-+					Ioc3PhysDisk_t *pPDisk = ioc->raid_data.pIocPg3->PhysDisk;
-+					int		numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks;
-+
-+					while (numPDisk) {
-+						if (ioc->spi_data.dvStatus[pPDisk->PhysDiskID] & MPT_SCSICFG_DV_NOT_DONE)
-+							ioc->spi_data.dvStatus[pPDisk->PhysDiskID] |= MPT_SCSICFG_NEED_DV;
-+
-+						pPDisk++;
-+						numPDisk--;
-+					}
-+				}
-+				ioc->spi_data.forceDv &= ~MPT_SCSICFG_RELOAD_IOC_PG3;
- 			}
--		}
--		ioc->spi_data.forceDv &= ~MPT_SCSICFG_RELOAD_IOC_PG3;
--	}
- 
--	dvStatus = ioc->spi_data.dvStatus[id];
-+			maxid = min_t(int, ioc->sh->max_id, MPT_MAX_SCSI_DEVICES);
- 
--	if (dvStatus & MPT_SCSICFG_NEED_DV) {
--		ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_IN_PROGRESS;
--		ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_NEED_DV;
-+			for (id = 0; id < maxid; id++) {
-+				spin_lock_irqsave(&dvtaskQ_lock, flags);
-+				if (dvtaskQ_release) {
-+					dvtaskQ_active = 0;
-+					spin_unlock_irqrestore(&dvtaskQ_lock, flags);
-+					return;
-+				}
-+				spin_unlock_irqrestore(&dvtaskQ_lock, flags);
-+				dvStatus = hd->ioc->spi_data.dvStatus[id];
- 
--//		set_current_state(TASK_INTERRUPTIBLE);
--//		schedule_timeout(MPT_HZ/4);
-+				if (dvStatus & MPT_SCSICFG_NEED_DV) {
-+					did++;
-+					hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_PENDING;
-+					hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_NEED_DV;
-+
-+					msleep(250);
-+
-+					/* If hidden phys disk, block IO's to all
-+					 *	raid volumes
-+					 * else, process normally
-+					 */
-+					isPhysDisk = mptscsih_is_phys_disk(hd->ioc, id);
-+					if (isPhysDisk) {
-+						for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) {
-+							if (hd->ioc->raid_data.isRaid & (1 << ii)) {
-+								hd->ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_DV_PENDING;
-+							}
-+						}
-+					}
- 
--		/* If hidden phys disk, block IO's to all
--		 *	raid volumes
--		 * else, process normally
--		 */
--		if (ioc->raid_data.isRaid & (1 << id)) {
--			Ioc3PhysDisk_t *pPDisk =  ioc->raid_data.pIocPg3->PhysDisk;
--			int numPDisk = ioc->raid_data.pIocPg3->NumPhysDisks;
--			while (numPDisk) {
--				ii = pPDisk->PhysDiskID;
--				if ( ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) {
--					ddvprintk((KERN_WARNING "doDv for PhysDiskNum=%d PhysDiskID=%d numPDisk=%d\n",
--						pPDisk->PhysDiskNum, ii, numPDisk));
--					if (mptscsih_doDv(hd, 0, ii) == 1) {
-+					if(mpt_alt_ioc_wait(hd->ioc)!=0) {
-+						ddvprintk((MYIOC_s_WARN_FMT "alt_ioc busy!\n",
-+						    hd->ioc->name));
-+						continue;
-+					}
-+
-+					if (mptscsih_doDv(hd, 0, id) == 1) {
- 						/* Untagged device was busy, try again
- 						 */
--						ioc->spi_data.dvStatus[ii] |= MPT_SCSICFG_NEED_DV;
-+						hd->ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV;
-+						hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_PENDING;
- 					} else {
--						ddvprintk((KERN_WARNING "doDv successful for PhysDiskNum=%d PhysDiskID=%d\n",
--							pPDisk->PhysDiskNum, ii));
- 						/* DV is complete. Clear flags.
- 						 */
--						ioc->spi_data.dvStatus[ii] &= ~MPT_SCSICFG_DV_NOT_DONE;
-+						hd->ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_PENDING);
-+					}
-+
-+					spin_lock(&hd->ioc->initializing_hba_lock);
-+					hd->ioc->initializing_hba_lock_flag=0;
-+					spin_unlock(&hd->ioc->initializing_hba_lock);
-+
-+					if (isPhysDisk) {
-+						for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) {
-+							if (hd->ioc->raid_data.isRaid & (1 << ii)) {
-+								hd->ioc->spi_data.dvStatus[ii] &= ~MPT_SCSICFG_DV_PENDING;
-+							}
-+						}
- 					}
-+
-+					if (hd->ioc->spi_data.noQas)
-+						mptscsih_qas_check(hd, id);
- 				}
--				pPDisk++;
--				numPDisk--;
--			}
--		} else {
--			ddvprintk((KERN_WARNING "doDv for id=%d\n",
--				id));
--			if (mptscsih_doDv(hd, 0, id) == 1) {
--				/* Untagged device was busy, try again
--				 */
--				ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_NEED_DV;
--			} else {
--				ddvprintk((KERN_WARNING "doDv successful for id=%d\n",
--					id));
--				/* DV is complete. Clear flags.
--				 */
--				ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE;
- 			}
- 		}
--
--		if (ioc->spi_data.noQas)
--			mptscsih_qas_check(hd, id);
--	} else {
--		ddvprintk((KERN_INFO "~NEED_DV dvStatus=%x for id %d\n",
--			dvStatus, id));
--//		panic( "~NEED_DV");
- 	}
--mptscsih_domainValidation_exit:
-+
- 	spin_lock_irqsave(&dvtaskQ_lock, flags);
- 	dvtaskQ_active = 0;
- 	spin_unlock_irqrestore(&dvtaskQ_lock, flags);
--}
--
- 
--/* Post command on the PendingMF to the FW.
-- */
--void
--mptscsih_post_PendingMF_command(MPT_ADAPTER *ioc)
--{
--	MPT_SCSI_HOST	*hd;
--	MPT_FRAME_HDR	*mf;
--	struct scsi_cmnd *SCpnt;
--	unsigned long	 flags;
--	u16		 req_idx;
--
--	spin_lock_irqsave(&ioc->PendingMFlock, flags);
--	if ((mf=ioc->PendingMF) == NULL) {
--		spin_unlock_irqrestore(&ioc->PendingMFlock, flags);
--		dpendprintk((MYIOC_s_INFO_FMT "%s: PendingMF is empty\n",
--			ioc->name, __FUNCTION__));
--		return;
--	}
--
--	mf = ioc->PendingMF;
--	SCpnt = ioc->PendingSCpnt;
--	ioc->PendingMF = NULL;
--	spin_unlock_irqrestore(&ioc->PendingMFlock, flags);
--
--	dpendprintk((MYIOC_s_INFO_FMT "mptscsih_post_PendingMF_command: mf=%p\n",
--		ioc->name, mf));
--	DBG_DUMP_PENDING_REQUEST_FRAME(ioc, mf)
--
--	hd = (MPT_SCSI_HOST *) ioc->sh->hostdata;
--	req_idx = le16_to_cpu(mf->u.frame.hwhdr.msgctxu.fld.req_idx);
--	hd->ScsiLookup[req_idx] = SCpnt;
--	mpt_put_msg_frame(ioc->DoneCtx, ioc, mf);
-+	return;
- }
- 
--
- /* Search IOC page 3 to determine if this is hidden physical disk
-  */
- static int
--mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int channel, int id)
-+mptscsih_is_phys_disk(MPT_ADAPTER *ioc, int id)
- {
--	struct inactive_raid_component_info *component_info;
- 	int i;
--	int rc = 0;
--
--	if (!ioc->raid_data.pIocPg3)
--		goto out;
--	for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) {
--		if ((id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID) &&
--		    (channel == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskBus)) {
--			rc = 1;
--			goto out;
--		}
--	}
- 
--	/*
--	 * Check inactive list for matching phys disks
--	 */
--	if (list_empty(&ioc->raid_data.inactive_list))
--		goto out;
-+	if (!ioc->raid_data.isRaid || !ioc->raid_data.pIocPg3)
-+		return 0;
- 
--	down(&ioc->raid_data.inactive_list_mutex);
--	list_for_each_entry(component_info,
--	    &ioc->raid_data.inactive_list, list) {
--		if ((component_info->d.PhysDiskID == id) &&
--		    (component_info->d.PhysDiskBus == channel))
--			rc = 1;
-+	for (i = 0; i < ioc->raid_data.pIocPg3->NumPhysDisks; i++) {
-+		if (id == ioc->raid_data.pIocPg3->PhysDisk[i].PhysDiskID)
-+			return 1;
- 	}
--	up(&ioc->raid_data.inactive_list_mutex);
- 
-- out:
--	return rc;
-+	return 0;
- }
- 
- /* Write SDP1 if no QAS has been enabled
-@@ -5039,37 +4927,32 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc, 
- static void
- mptscsih_qas_check(MPT_SCSI_HOST *hd, int id)
- {
--	MPT_ADAPTER	*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice *pTarget;
- 	int ii;
- 
--	pMptTarget = ioc->Target_List[0];
- 	for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++) {
- 		if (ii == id)
- 			continue;
- 
--		if ((ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) != 0)
-+		if ((hd->ioc->spi_data.dvStatus[ii] & MPT_SCSICFG_DV_NOT_DONE) != 0)
- 			continue;
- 
--		pTarget = pMptTarget->Target[ii];
--
--		if (pTarget) {
--			if (!pTarget->raidVolume) {
--				if ((pTarget->negoFlags & ioc->spi_data.noQas) == 0) {
--					pTarget->negoFlags |= ioc->spi_data.noQas;
--					dnegoprintk(("mptscsih_qas_check: writeSDP1: id=%d negoFlags=%d\n", ii, pTarget->negoFlags));
--		      mpt_writeSDP1(ioc, 0, ii, MPT_SCSICFG_USE_NVRAM);
--						}
--			} else {
--				if (mptscsih_is_phys_disk(ioc, 0, ii) == 1) {
--					dnegoprintk(("mptscsih_qas_check: is_phys_disk writeSDP1: id=%d SCSICFG_USE_NVRAM\n", ii));
--				      mpt_writeSDP1(ioc, 0, ii, MPT_SCSICFG_USE_NVRAM);
-+		pTarget = hd->Targets[ii];
- 
--				}
-+		if (pTarget && (!pTarget->raidVolume)) {
-+			if ((pTarget->negoFlags & hd->ioc->spi_data.noQas) == 0) {
-+				pTarget->negoFlags |= hd->ioc->spi_data.noQas;
-+				dnegoprintk(("writeSDP1: id=%d negoFlags=%d\n", id, pTarget->negoFlags));
-+				mptscsih_writeSDP1(hd, 0, ii, 0);
-+			}
-+		} else {
-+			if (mptscsih_is_phys_disk(hd->ioc, ii) == 1) {
-+				dnegoprintk(("writeSDP1: id=%d SCSICFG_USE_NVRAM\n", id));
-+				mptscsih_writeSDP1(hd, 0, ii, MPT_SCSICFG_USE_NVRAM);
- 			}
- 		}
- 	}
-+	return;
- }
- 
- 
-@@ -5094,16 +4977,15 @@ mptscsih_qas_check(MPT_SCSI_HOST *hd, in
-  *	Return: None.
-  */
- static int
--mptscsih_doDv(MPT_SCSI_HOST *hd, int bus, int id)
-+mptscsih_doDv(MPT_SCSI_HOST *hd, int bus_number, int id)
- {
- 	MPT_ADAPTER		*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
- 	SCSIDevicePage1_t	*pcfg1Data;
- 	SCSIDevicePage0_t	*pcfg0Data;
- 	u8			*pbuf1;
- 	u8			*pbuf2;
--	u8			*pDvBuf=NULL;
-+	u8			*pDvBuf;
- 	dma_addr_t		 dvbuf_dma = -1;
- 	dma_addr_t		 buf1_dma = -1;
- 	dma_addr_t		 buf2_dma = -1;
-@@ -5127,7 +5009,7 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus
- 	char			 firstPass = 1;
- 	char			 doFallback = 0;
- 	char			 readPage0;
--	char			 lun;
-+	char			 bus, lun;
- 	char			 inq0 = 0;
- 
- 	if (ioc->spi_data.sdp1length == 0)
-@@ -5141,10 +5023,12 @@ mptscsih_doDv(MPT_SCSI_HOST *hd, int bus
- 	 */
- 	if (id == ioc->pfacts[0].PortSCSIID)
- 		return 0;
--ioc->spi_data.dvStatus[id] |= MPT_SCSICFG_DV_IN_PROGRESS;
- 
- 	lun = 0;
--	ddvprintk((MYIOC_s_INFO_FMT "DV Started: bus=%d id=%d dv @ %p\n",ioc->name, bus, id, &dv));
-+	bus = (u8) bus_number;
-+	ddvtprintk((MYIOC_s_NOTE_FMT
-+			"DV Started: bus=%d id=%d dv @ %p\n",
-+			ioc->name, bus, id, &dv));
- 
- 	/* Prep DV structure
- 	 */
-@@ -5167,8 +5051,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 	iocmd.physDiskNum = -1;
- 	iocmd.rsvd = iocmd.rsvd2 = 0;
- 
--	pMptTarget = ioc->Target_List[bus];
--	pTarget = pMptTarget->Target[id];
-+	pTarget = hd->Targets[id];
- 
- 	/* Use tagged commands if possible.
- 	 */
-@@ -5176,12 +5059,12 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 		if (pTarget->tflags & MPT_TARGET_FLAGS_Q_YES)
- 			iocmd.flags |= MPT_ICFLAG_TAGGED_CMD;
- 		else {
--			if (ioc->facts.FWVersion.Word < 0x01000600)
--				  goto doDv_done;
-+			if (hd->ioc->facts.FWVersion.Word < 0x01000600)
-+				return 0;
- 
--			if ((ioc->facts.FWVersion.Word >= 0x01010000) &&
--				(ioc->facts.FWVersion.Word < 0x01010B00))
--			         goto doDv_done;
-+			if ((hd->ioc->facts.FWVersion.Word >= 0x01010000) &&
-+				(hd->ioc->facts.FWVersion.Word < 0x01010B00))
-+				return 0;
- 		}
- 	}
- 
-@@ -5211,7 +5094,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 
- 	pDvBuf = pci_alloc_consistent(ioc->pcidev, dv_alloc, &dvbuf_dma);
- 	if (pDvBuf == NULL)
--                goto doDv_done;
-+		return 0;
- 
- 	sz = 0;
- 	pbuf1 = (u8 *)pDvBuf;
-@@ -5237,7 +5120,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 	/* Skip this ID? Set cfg.cfghdr.hdr to force config page write
- 	 */
- 	{
--		SpiCfgData *pspi_data = &ioc->spi_data;
-+		SpiCfgData *pspi_data = &hd->ioc->spi_data;
- 		if (pspi_data->nvram && (pspi_data->nvram[id] != MPT_HOST_NVRAM_INVALID)) {
- 			/* Set the factor from nvram */
- 			nfactor = (pspi_data->nvram[id] & MPT_NVRAM_SYNC_MASK) >> 8;
-@@ -5247,7 +5130,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 			if (!(pspi_data->nvram[id] & MPT_NVRAM_ID_SCAN_ENABLE) ||
- 				(pspi_data->PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_OFF_DV) ) {
- 
--				ddvprintk((MYIOC_s_INFO_FMT "DV Skipped: bus, id, lun (%d, %d, %d)\n",
-+				ddvprintk((MYIOC_s_NOTE_FMT "DV Skipped: bus, id, lun (%d, %d, %d)\n",
- 					ioc->name, bus, id, lun));
- 
- 				dv.cmd = MPT_SET_MAX;
-@@ -5260,7 +5143,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 				cfg.physAddr = cfg1_dma_addr;
- 				cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
- 				cfg.dir = 1;
--				mpt_config(ioc, &cfg);
-+				mpt_config(hd->ioc, &cfg);
- 				goto target_done;
- 			}
- 		}
-@@ -5295,7 +5178,7 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 	/* RAID Volume ID's may double for a physical device. If RAID but
- 	 * not a physical ID as well, skip DV.
- 	 */
--	if ((ioc->raid_data.isRaid & (1 << id)) && !(iocmd.flags & MPT_ICFLAG_PHYS_DISK))
-+	if ((hd->ioc->raid_data.isRaid & (1 << id)) && !(iocmd.flags & MPT_ICFLAG_PHYS_DISK))
- 		goto target_done;
- 
- 
-@@ -5312,10 +5195,8 @@ ioc->spi_data.dvStatus[id] |= MPT_SCSICF
- 	readPage0 = 0;
- 	sz = SCSI_MAX_INQUIRY_BYTES;
- 	rc = MPT_SCANDV_GOOD;
--
--start_DV:
- 	while (1) {
--		ddvprintk((MYIOC_s_INFO_FMT "DV: Start Basic test on id=%d\n", ioc->name, id));
-+		ddvprintk((MYIOC_s_NOTE_FMT "DV: Start Basic test on id=%d\n", ioc->name, id));
- 		retcode = 0;
- 		dv.cmd = MPT_SET_MIN;
- 		mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data);
-@@ -5324,7 +5205,7 @@ start_DV:
- 		cfg.physAddr = cfg1_dma_addr;
- 		cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
- 		cfg.dir = 1;
--		if (mpt_config(ioc, &cfg) != 0)
-+		if (mpt_config(hd->ioc, &cfg) != 0)
- 			goto target_done;
- 
- 		/* Wide - narrow - wide workaround case
-@@ -5333,9 +5214,9 @@ start_DV:
- 			/* Send an untagged command to reset disk Qs corrupted
- 			 * when a parity error occurs on a Request Sense.
- 			 */
--			if ((ioc->facts.FWVersion.Word >= 0x01000600) ||
--				((ioc->facts.FWVersion.Word >= 0x01010000) &&
--				(ioc->facts.FWVersion.Word < 0x01010B00)) ) {
-+			if ((hd->ioc->facts.FWVersion.Word >= 0x01000600) ||
-+				((hd->ioc->facts.FWVersion.Word >= 0x01010000) &&
-+				(hd->ioc->facts.FWVersion.Word < 0x01010B00)) ) {
- 
- 				iocmd.cmd = REQUEST_SENSE;
- 				iocmd.data_dma = buf1_dma;
-@@ -5400,6 +5281,12 @@ start_DV:
- 		 * if PROCESSOR, quit DV.
- 		 */
- 		if (inq0 == TYPE_PROCESSOR) {
-+			mptscsih_initTarget(hd,
-+				bus,
-+				id,
-+				lun,
-+				pbuf1,
-+				sz);
- 			goto target_done;
- 		}
- 
-@@ -5426,8 +5313,8 @@ start_DV:
- 
- 				if ((pbuf1[56] & 0x02) == 0) {
- 					pTarget->negoFlags |= MPT_TARGET_NO_NEGO_QAS;
--					ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS;
--					ddvprintk((MYIOC_s_INFO_FMT
-+					hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS;
-+					ddvprintk((MYIOC_s_NOTE_FMT 
- 					    "DV: Start Basic noQas on id=%d due to pbuf1[56]=%x\n", 
- 					    ioc->name, id, pbuf1[56]));
- 				}
-@@ -5440,7 +5327,7 @@ start_DV:
- 			dv.cmd = MPT_SET_MAX;
- 
- 		mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data);
--		if (mpt_config(ioc, &cfg) != 0)
-+		if (mpt_config(hd->ioc, &cfg) != 0)
- 			goto target_done;
- 
- 		if ((!dv.now.width) && (!dv.now.offset))
-@@ -5473,7 +5360,7 @@ start_DV:
- 					cfg.action = MPI_CONFIG_ACTION_PAGE_READ_CURRENT;
- 					cfg.dir = 0;
- 
--					if (mpt_config(ioc, &cfg) != 0)
-+					if (mpt_config(hd->ioc, &cfg) != 0)
- 						goto target_done;
- 
- 					sdp0_info = le32_to_cpu(pcfg0Data->Information) & 0x0E;
-@@ -5504,7 +5391,15 @@ start_DV:
- 						if (!firstPass)
- 							doFallback = 1;
- 					} else {
--
-+						ddvprintk((MYIOC_s_NOTE_FMT
-+						    "DV:Inquiry compared id=%d, calling initTarget\n", ioc->name, id));
-+						hd->ioc->spi_data.dvStatus[id] &= ~MPT_SCSICFG_DV_NOT_DONE;
-+						mptscsih_initTarget(hd,
-+							bus,
-+							id,
-+							lun,
-+							pbuf1,
-+							sz);
- 						break;	/* test complete */
- 					}
- 				}
-@@ -5522,7 +5417,7 @@ start_DV:
- 			firstPass = 0;
- 		}
- 	}
--	ddvprintk((MYIOC_s_INFO_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id));
-+	ddvprintk((MYIOC_s_NOTE_FMT "DV: Basic test on id=%d completed OK.\n", ioc->name, id));
- 
- 	if (ioc->spi_data.mpt_dv == 0)
- 		goto target_done;
-@@ -5534,10 +5429,10 @@ start_DV:
- 	if (inq0 != 0)
- 		goto target_done;
- 
--	ddvprintk((MYIOC_s_INFO_FMT "DV: bus, id, lun (%d, %d, %d) PortFlags=%x\n",
-+	ddvprintk((MYIOC_s_NOTE_FMT "DV: bus, id, lun (%d, %d, %d) PortFlags=%x\n",
- 			ioc->name, bus, id, lun, ioc->spi_data.PortFlags));
- 	if ( ioc->spi_data.PortFlags == MPI_SCSIPORTPAGE2_PORT_FLAGS_BASIC_DV_ONLY ) {
--		ddvprintk((MYIOC_s_INFO_FMT "DV Basic Only: bus, id, lun (%d, %d, %d) PortFlags=%x\n",
-+		ddvprintk((MYIOC_s_NOTE_FMT "DV Basic Only: bus, id, lun (%d, %d, %d) PortFlags=%x\n",
- 			ioc->name, bus, id, lun, ioc->spi_data.PortFlags));
- 		goto target_done;
- 	}
-@@ -5574,7 +5469,7 @@ start_DV:
- 			u8 skey = hd->pLocal->sense[2] & 0x0F;
- 			u8 asc = hd->pLocal->sense[12];
- 			u8 ascq = hd->pLocal->sense[13];
--			ddvprintk((MYIOC_s_WARN_FMT
-+			ddvprintk((MYIOC_s_INFO_FMT
- 				"SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n",
- 				ioc->name, skey, asc, ascq));
- 
-@@ -5646,7 +5541,7 @@ start_DV:
- 					u8 skey = hd->pLocal->sense[2] & 0x0F;
- 					u8 asc = hd->pLocal->sense[12];
- 					u8 ascq = hd->pLocal->sense[13];
--					ddvprintk((MYIOC_s_WARN_FMT
-+					ddvprintk((MYIOC_s_INFO_FMT
- 						"SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n",
- 						ioc->name, skey, asc, ascq));
- 					if (skey == ILLEGAL_REQUEST) {
-@@ -5665,11 +5560,6 @@ start_DV:
- 							ioc->name));
- 						goto target_done;
- 					}
--                               } else if (rc == MPT_SCANDV_FALLBACK) {
--                                       doFallback = 1; /* set fallback flag */
--                                       notDone++;
--                                       goto start_DV;
--
- 				} else {
- 					/* All other errors are fatal
- 					 */
-@@ -5812,7 +5702,7 @@ skip_Reserve:
- 					dv.cmd = MPT_FALLBACK;
- 					mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data);
- 
--					if (mpt_config(ioc, &cfg) != 0)
-+					if (mpt_config(hd->ioc, &cfg) != 0)
- 						goto target_done;
- 
- 					if ((!dv.now.width) && (!dv.now.offset))
-@@ -5826,7 +5716,7 @@ skip_Reserve:
- 				/* Restart data test if UA, else quit.
- 				 */
- 				u8 skey = hd->pLocal->sense[2] & 0x0F;
--				ddvprintk((MYIOC_s_WARN_FMT
-+				ddvprintk((MYIOC_s_INFO_FMT
- 					"SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey,
- 					hd->pLocal->sense[12], hd->pLocal->sense[13]));
- 				if (skey == UNIT_ATTENTION) {
-@@ -5891,7 +5781,7 @@ skip_Reserve:
- 						dv.cmd = MPT_FALLBACK;
- 						mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data);
- 
--						if (mpt_config(ioc, &cfg) != 0)
-+						if (mpt_config(hd->ioc, &cfg) != 0)
- 							goto target_done;
- 
- 						if ((!dv.now.width) && (!dv.now.offset))
-@@ -5909,7 +5799,7 @@ skip_Reserve:
- 				dv.cmd = MPT_FALLBACK;
- 				mptscsih_dv_parms(hd, &dv, (void *)pcfg1Data);
- 
--				if (mpt_config(ioc, &cfg) != 0)
-+				if (mpt_config(hd->ioc, &cfg) != 0)
- 					 goto target_done;
- 
- 				if ((!dv.now.width) && (!dv.now.offset))
-@@ -5922,7 +5812,7 @@ skip_Reserve:
- 				/* Restart data test if UA, else quit.
- 				 */
- 				u8 skey = hd->pLocal->sense[2] & 0x0F;
--				ddvprintk((MYIOC_s_WARN_FMT
-+				ddvprintk((MYIOC_s_INFO_FMT
- 					"SenseKey:ASC:ASCQ = (%x:%02x:%02x)\n", ioc->name, skey,
- 					hd->pLocal->sense[12], hd->pLocal->sense[13]));
- 				if (skey == UNIT_ATTENTION) {
-@@ -5964,8 +5854,8 @@ target_done:
- 		/* If disk, not U320, disable QAS
- 		 */
- 		if ((inq0 == 0) && (dv.now.factor > MPT_ULTRA320)) {
--			ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS;
--			ddvprintk((MYIOC_s_INFO_FMT
-+			hd->ioc->spi_data.noQas = MPT_TARGET_NO_NEGO_QAS;
-+			ddvprintk((MYIOC_s_NOTE_FMT
- 			    "noQas set due to id=%d has factor=%x\n", ioc->name, id, dv.now.factor));
- 		}
- 
-@@ -5980,7 +5870,7 @@ target_done:
- 		cfg.physAddr = cfg1_dma_addr;
- 		cfg.action = MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT;
- 		cfg.dir = 1;
--		mpt_config(ioc, &cfg);
-+		mpt_config(hd->ioc, &cfg);
- 		 */
- 	}
- 
-@@ -5991,18 +5881,13 @@ target_done:
- 			ddvprintk((MYIOC_s_ERR_FMT "RAID Enable FAILED!\n", ioc->name));
- 	}
- 
--doDv_done:
- 	/* Done with the DV scan of the current target
- 	 */
- 	if (pDvBuf)
- 		pci_free_consistent(ioc->pcidev, dv_alloc, pDvBuf, dvbuf_dma);
- 
--	ddvprintk((MYIOC_s_WARN_FMT "DV Done id=%d\n",ioc->name, id));
--       ioc->spi_data.dvStatus[id] &= ~(MPT_SCSICFG_DV_NOT_DONE | MPT_SCSICFG_DV_IN_PROGRESS);
--       /* Post an IO that was pended while
--        * DV was running.
--        */
--       mptscsih_post_PendingMF_command(ioc);
-+	ddvtprintk((MYIOC_s_INFO_FMT "DV Done id=%d\n",
-+			ioc->name, id));
- 
- 	return retcode;
- }
-@@ -6017,8 +5902,6 @@ doDv_done:
- static void
- mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVPARAMETERS *dv,void *pPage)
- {
--	MPT_ADAPTER		*ioc = hd->ioc;
--	struct _MPT_DEVICE	*pMptTarget;
- 	VirtDevice		*pTarget;
- 	SCSIDevicePage0_t	*pPage0;
- 	SCSIDevicePage1_t	*pPage1;
-@@ -6032,48 +5915,49 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 
- 	switch (cmd) {
- 	case MPT_GET_NVRAM_VALS:
--		ddvprintk((MYIOC_s_INFO_FMT "Getting NVRAM: ",
--			ioc->name));
-+		ddvprintk((MYIOC_s_NOTE_FMT "Getting NVRAM: ",
-+							 hd->ioc->name));
- 		/* Get the NVRAM values and save in tmax
- 		 * If not an LVD bus, the adapter minSyncFactor has been
- 		 * already throttled back.
- 		 */
--		negoFlags = ioc->spi_data.noQas;
--		pMptTarget = ioc->Target_List[0];
--		pTarget = pMptTarget->Target[id];
--		if (ioc->spi_data.nvram && (ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) {
--			data = ioc->spi_data.nvram[id];
--			width = data & MPT_NVRAM_WIDE_DISABLE ? 0 : 1;
--			if ((offset = ioc->spi_data.maxSyncOffset) == 0)
--				factor = MPT_ASYNC;
--			else {
--				factor = (data & MPT_NVRAM_SYNC_MASK) >> MPT_NVRAM_SYNC_SHIFT;
--				if ((factor == 0) || (factor == MPT_ASYNC)){
-+		negoFlags = hd->ioc->spi_data.noQas;
-+		if ((pTarget = hd->Targets[(int)id]) && !pTarget->raidVolume) {
-+			width = pTarget->maxWidth;
-+			offset = pTarget->maxOffset;
-+			factor = pTarget->minSyncFactor;
-+			negoFlags |= pTarget->negoFlags;
-+		} else {
-+			if (hd->ioc->spi_data.nvram && (hd->ioc->spi_data.nvram[id] != MPT_HOST_NVRAM_INVALID)) {
-+				data = hd->ioc->spi_data.nvram[id];
-+				width = data & MPT_NVRAM_WIDE_DISABLE ? 0 : 1;
-+				if ((offset = hd->ioc->spi_data.maxSyncOffset) == 0)
- 					factor = MPT_ASYNC;
--					offset = 0;
-+				else {
-+					factor = (data & MPT_NVRAM_SYNC_MASK) >> MPT_NVRAM_SYNC_SHIFT;
-+					if ((factor == 0) || (factor == MPT_ASYNC)){
-+						factor = MPT_ASYNC;
-+						offset = 0;
-+					}
- 				}
--			ddvprintk(("NVRAM id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				id, width, factor, offset, negoFlags));
-+			} else {
-+				width = MPT_NARROW;
-+				offset = 0;
-+				factor = MPT_ASYNC;
- 			}
--		} else {
--			width = MPT_NARROW;
--			offset = 0;
--			factor = MPT_ASYNC;
--			ddvprintk(("NVRAM_INVALID id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--				id, width, factor, offset, negoFlags));
--		}
- 
--		/* Set the negotiation flags */
--		if (!width)
--			negoFlags |= MPT_TARGET_NO_NEGO_WIDE;
-+			/* Set the negotiation flags */
-+			if (!width)
-+				negoFlags |= MPT_TARGET_NO_NEGO_WIDE;
- 
--		if (!offset)
--			negoFlags |= MPT_TARGET_NO_NEGO_SYNC;
-+			if (!offset)
-+				negoFlags |= MPT_TARGET_NO_NEGO_SYNC;
-+		}
- 
- 		/* limit by adapter capabilities */
--		width = min(width, ioc->spi_data.maxBusWidth);
--		offset = min(offset, ioc->spi_data.maxSyncOffset);
--		factor = max(factor, ioc->spi_data.minSyncFactor);
-+		width = min(width, hd->ioc->spi_data.maxBusWidth);
-+		offset = min(offset, hd->ioc->spi_data.maxSyncOffset);
-+		factor = max(factor, hd->ioc->spi_data.minSyncFactor);
- 
- 		/* Check Consistency */
- 		if (offset && (factor < MPT_ULTRA2) && !width)
-@@ -6083,13 +5967,13 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 		dv->max.offset = offset;
- 		dv->max.factor = factor;
- 		dv->max.flags = negoFlags;
--		ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
-+		ddvprintk((" id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
- 				id, width, factor, offset, negoFlags));
- 		break;
- 
- 	case MPT_UPDATE_MAX:
--		ddvprintk((MYIOC_s_INFO_FMT
--			"Updating with SDP0 Data: ", ioc->name));
-+		ddvprintk((MYIOC_s_NOTE_FMT
-+			"Updating with SDP0 Data: ", hd->ioc->name));
- 		/* Update tmax values with those from Device Page 0.*/
- 		pPage0 = (SCSIDevicePage0_t *) pPage;
- 		if (pPage0) {
-@@ -6103,10 +5987,12 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 		dv->now.offset = dv->max.offset;
- 		dv->now.factor = dv->max.factor;
- 		ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x\n",
--			id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags));
-+				id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags));
- 		break;
- 
- 	case MPT_SET_MAX:
-+		ddvprintk((MYIOC_s_NOTE_FMT "Setting Max: ",
-+								hd->ioc->name));
- 		/* Set current to the max values. Update the config page.*/
- 		dv->now.width = dv->max.width;
- 		dv->now.offset = dv->max.offset;
-@@ -6115,18 +6001,22 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 
- 		pPage1 = (SCSIDevicePage1_t *)pPage;
- 		if (pPage1) {
--			mpt_setSDP1parameters (dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags,
--				&val, &configuration);
-+			mptscsih_setDevicePage1Flags (dv->now.width, dv->now.factor,
-+				dv->now.offset, &val, &configuration, dv->now.flags);
-+			dnegoprintk(("Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n",
-+				id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration));
- 			pPage1->RequestedParameters = cpu_to_le32(val);
- 			pPage1->Reserved = 0;
- 			pPage1->Configuration = cpu_to_le32(configuration);
- 		}
- 
--		dnegoprintk(("%s: Setting Max: id=%d width=%d factor=%x offset=%x negoFlags=%x requested=%08x configuration=%08x\n",
--				ioc->name, id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration));
-+		ddvprintk(("id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x configuration=%x\n",
-+				id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags, val, configuration));
- 		break;
- 
- 	case MPT_SET_MIN:
-+		ddvprintk((MYIOC_s_NOTE_FMT "Setting Min: ",
-+								hd->ioc->name));
- 		/* Set page to asynchronous and narrow
- 		 * Do not update now, breaks fallback routine. */
- 		width = MPT_NARROW;
-@@ -6136,20 +6026,22 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 
- 		pPage1 = (SCSIDevicePage1_t *)pPage;
- 		if (pPage1) {
--			mpt_setSDP1parameters (width, factor, offset, negoFlags,
--				&val, &configuration);
-+			mptscsih_setDevicePage1Flags (width, factor,
-+				offset, &val, &configuration, negoFlags);
-+			dnegoprintk(("Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x request=%x config=%x\n",
-+				id, width, factor, offset, negoFlags, val, configuration));
- 			pPage1->RequestedParameters = cpu_to_le32(val);
- 			pPage1->Reserved = 0;
- 			pPage1->Configuration = cpu_to_le32(configuration);
- 		}
--		dnegoprintk(("%s: Setting Min: id=%d width=%d factor=%x offset=%x negoFlags=%x requested=%08x configuration=%08x\n",
--				ioc->name, id, width, factor, offset, negoFlags, val, configuration));
-+		ddvprintk(("id=%d width=%d factor=%x offset=%x request=%x config=%x negoFlags=%x\n",
-+				id, width, factor, offset, val, configuration, negoFlags));
- 		break;
- 
- 	case MPT_FALLBACK:
--		ddvprintk((MYIOC_s_INFO_FMT
-+		ddvprintk((MYIOC_s_NOTE_FMT
- 			"Fallback: Start: offset %d, factor %x, width %d \n",
--				ioc->name, dv->now.offset,
-+				hd->ioc->name, dv->now.offset,
- 				dv->now.factor, dv->now.width));
- 		width = dv->now.width;
- 		offset = dv->now.offset;
-@@ -6212,32 +6104,31 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 
- 		pPage1 = (SCSIDevicePage1_t *)pPage;
- 		if (pPage1) {
--			mpt_setSDP1parameters (width, factor, offset, dv->now.flags,
--				&val, &configuration);
-+			mptscsih_setDevicePage1Flags (width, factor, offset, &val,
-+						&configuration, dv->now.flags);
-+			dnegoprintk(("Finish: id=%d width=%d offset=%d factor=%x negoFlags=%x request=%x config=%x\n",
-+			     id, width, offset, factor, dv->now.flags, val, configuration));
- 
- 			pPage1->RequestedParameters = cpu_to_le32(val);
- 			pPage1->Reserved = 0;
- 			pPage1->Configuration = cpu_to_le32(configuration);
- 		}
- 
--		ddvprintk(("%s: Finish: id=%d width=%d offset=%d factor=%x negoFlags=%x requested=%08x configuration=%08x\n",
--			     ioc->name, id, width, offset, factor, dv->now.flags, val, configuration));
-+		ddvprintk(("Finish: id=%d offset=%d factor=%x width=%d request=%x config=%x\n",
-+			     id, dv->now.offset, dv->now.factor, dv->now.width, val, configuration));
- 		break;
- 
- 	case MPT_SAVE:
--		ddvprintk((MYIOC_s_INFO_FMT
--			"Saving to pTarget: "
--			"id=%d width=%x factor=%x offset=%d negoFlags=%x\n",
--				ioc->name, id, dv->now.width, dv->now.factor,
--				dv->now.offset, dv->now.flags));
-+		ddvprintk((MYIOC_s_NOTE_FMT
-+			"Saving to Target structure: ", hd->ioc->name));
-+		ddvprintk(("id=%d width=%x factor=%x offset=%d negoFlags=%x\n",
-+			     id, dv->now.width, dv->now.factor, dv->now.offset, dv->now.flags));
- 
- 		/* Save these values to target structures
- 		 * or overwrite nvram (phys disks only).
- 		 */
- 
--		pMptTarget = ioc->Target_List[0];
--		pTarget = pMptTarget->Target[id];
--		if (pTarget && !pTarget->raidVolume ) {
-+		if ((pTarget = hd->Targets[(int)id]) && !pTarget->raidVolume ) {
- 			pTarget->maxWidth = dv->now.width;
- 			pTarget->maxOffset = dv->now.offset;
- 			pTarget->minSyncFactor = dv->now.factor;
-@@ -6246,8 +6137,8 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 			/* Preserv all flags, use
- 			 * read-modify-write algorithm
- 			 */
--			if (ioc->spi_data.nvram) {
--				data = ioc->spi_data.nvram[id];
-+			if (hd->ioc->spi_data.nvram) {
-+				data = hd->ioc->spi_data.nvram[id];
- 
- 				if (dv->now.width)
- 					data &= ~MPT_NVRAM_WIDE_DISABLE;
-@@ -6260,14 +6151,13 @@ mptscsih_dv_parms(MPT_SCSI_HOST *hd, DVP
- 				data &= ~MPT_NVRAM_SYNC_MASK;
- 				data |= (dv->now.factor << MPT_NVRAM_SYNC_SHIFT) & MPT_NVRAM_SYNC_MASK;
- 
--				ioc->spi_data.nvram[id] = data;
-+				hd->ioc->spi_data.nvram[id] = data;
- 			}
- 		}
- 		break;
- 	}
- }
- 
--
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
- /*	mptscsih_fillbuf - fill a buffer with a special data pattern
-  *		cleanup. For bus scan only.
-@@ -6422,11 +6312,10 @@ EXPORT_SYMBOL(mptscsih_taskmgmt_complete
- EXPORT_SYMBOL(mptscsih_scandv_complete);
- EXPORT_SYMBOL(mptscsih_event_process);
- EXPORT_SYMBOL(mptscsih_ioc_reset);
--EXPORT_SYMBOL(mptscsih_InternalCmdTimer_expired);
-+EXPORT_SYMBOL(mptscsih_timer_expired);
- EXPORT_SYMBOL(mptscsih_readFCDevicePage0);
- EXPORT_SYMBOL(mptscsih_change_queue_depth);
- EXPORT_SYMBOL(mptscsih_TMHandler);
--EXPORT_SYMBOL(mptscsih_TM_timeout);
- EXPORT_SYMBOL(mptscsih_sanity_check);
- EXPORT_SYMBOL(mptscsih_poll);
- EXPORT_SYMBOL(mptscsih_do_cmd);
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptscsih.h linux-2.6.9-55.0.12/drivers/message/fusion/mptscsih.h
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptscsih.h	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptscsih.h	2007-11-02 09:10:23.000000000 +0100
-@@ -5,8 +5,8 @@
-  *          LSIFC9xx/LSI409xx Fibre Channel
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  *  $Id: mptscsih.h,v 1.1.2.2 2003/05/07 14:08:35 Exp $
-  */
-@@ -54,17 +54,7 @@
-  *	SCSI Public stuff...
-  */
- 
--#define MPT_SCANDV_GOOD			(0x00000000) /* must be 0 */
--#define MPT_SCANDV_DID_RESET		(0x00000001)
--#define MPT_SCANDV_SENSE		(0x00000002)
--#define MPT_SCANDV_SOME_ERROR		(0x00000004)
--#define MPT_SCANDV_SELECTION_TIMEOUT	(0x00000008)
--#define MPT_SCANDV_ISSUE_SENSE		(0x00000010)
--#define MPT_SCANDV_FALLBACK		(0x00000020)
--#define MPT_SCANDV_BUSY			(0x00000040)
--
--//#define MPT_SCSI_CMD_PER_DEV_HIGH	64
--#define MPT_SCSI_CMD_PER_DEV_HIGH      48
-+#define MPT_SCSI_CMD_PER_DEV_HIGH	64
- #define MPT_SCSI_CMD_PER_DEV_LOW	32
- 
- #define MPT_SCSI_CMD_PER_LUN		7
-@@ -133,7 +123,7 @@ extern int mptscsih_taskmgmt_complete(MP
- extern int mptscsih_scandv_complete(MPT_ADAPTER *ioc, MPT_FRAME_HDR *mf, MPT_FRAME_HDR *r);
- extern int mptscsih_event_process(MPT_ADAPTER *ioc, EventNotificationReply_t *pEvReply);
- extern int mptscsih_ioc_reset(MPT_ADAPTER *ioc, int post_reset);
--extern void mptscsih_InternalCmdTimer_expired(unsigned long data);
-+extern void mptscsih_timer_expired(unsigned long data);
- extern int mptscsih_readFCDevicePage0(MPT_ADAPTER *ioc, u8 bus, u8 targetId, pFCDevicePage0_t fcDevicePage);
- extern void mptscsih_hot_plug_worker_thread(void * arg);
- extern int mptscsih_TMHandler(MPT_SCSI_HOST *hd, u8 type, u8 channel, u8 target, u8 lun, int ctx2abort, ulong timeout);
-@@ -141,4 +131,4 @@ extern int mptscsih_change_queue_depth(s
- extern int mptscsih_do_cmd(MPT_SCSI_HOST *hd, INTERNAL_CMD *iocmd);
- extern int mptscsih_sanity_check(struct scsi_device *sdev);
- extern void mptscsih_poll(struct scsi_device *sdev);
--extern void scsi_print_command(struct scsi_cmnd *cmd);
-+extern void scsi_print_command(struct scsi_cmnd *cmd);
-\ Pas de fin de ligne à la fin du fichier.
-diff -Nrup linux-2.6.9-67.0.1/drivers/message/fusion/mptspi.c linux-2.6.9-55.0.12/drivers/message/fusion/mptspi.c
---- linux-2.6.9-67.0.1/drivers/message/fusion/mptspi.c	2007-12-21 11:40:54.000000000 +0100
-+++ linux-2.6.9-55.0.12/drivers/message/fusion/mptspi.c	2007-11-02 09:10:23.000000000 +0100
-@@ -3,8 +3,8 @@
-  *      For use with LSI Logic PCI chip/adapter(s)
-  *      running LSI Logic Fusion MPT (Message Passing Technology) firmware.
-  *
-- *  Copyright (c) 1999-2007 LSI Logic Corporation
-- *  (mailto:mpt_linux_developer@lsi.com)
-+ *  Copyright (c) 1999-2005 LSI Logic Corporation
-+ *  (mailto:mpt_linux_developer@lsil.com)
-  *
-  */
- /*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/
-@@ -73,7 +73,6 @@
- MODULE_AUTHOR(MODULEAUTHOR);
- MODULE_DESCRIPTION(my_NAME);
- MODULE_LICENSE("GPL");
--MODULE_VERSION(my_VERSION);
- 
- /* Command line args */
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
-@@ -146,13 +145,12 @@ static struct scsi_host_template mptspi_
- 	.change_queue_depth 		= mptscsih_change_queue_depth,
- #endif
- 	.eh_abort_handler		= mptscsih_abort,
--        .eh_device_reset_handler        = mptscsih_dev_reset,
- 	.eh_bus_reset_handler		= mptscsih_bus_reset,
- 	.eh_host_reset_handler		= mptscsih_host_reset,
- 	.bios_param			= mptscsih_bios_param,
- 	.can_queue			= MPT_SCSI_CAN_QUEUE,
- 	.this_id			= -1,
--	.sg_tablesize			= CONFIG_FUSION_MAX_SGE,
-+	.sg_tablesize			= MPT_SCSI_SG_DEPTH,
- 	.max_sectors			= 8192,
- 	.cmd_per_lun			= 7,
- 	.use_clustering			= ENABLE_CLUSTERING,
-@@ -191,6 +189,8 @@ mptspi_probe(struct pci_dev *pdev, const
- 	MPT_ADAPTER 		*ioc;
- 	unsigned long		 flags;
- 	int			 sz, ii;
-+	int			 numSGE = 0;
-+	int			 scale;
- 	int			 ioc_cap;
- 	u8			*mem;
- 	int			error=0;
-@@ -269,7 +269,7 @@ mptspi_probe(struct pci_dev *pdev, const
- 		ioc->name, mpt_can_queue, ioc->req_depth,
- 		sh->can_queue));
- 
--	sh->max_id = ioc->DevicesPerBus;
-+	sh->max_id = MPT_MAX_SCSI_DEVICES;
- 
- 	sh->max_lun = MPT_LAST_LUN + 1;
- 	sh->max_channel = 0;
-@@ -278,7 +278,36 @@ mptspi_probe(struct pci_dev *pdev, const
- 	/* Required entry.
- 	 */
- 	sh->unique_id = ioc->id;
--	sh->sg_tablesize = ioc->sg_tablesize;
-+
-+	/* Verify that we won't exceed the maximum
-+	 * number of chain buffers
-+	 * We can optimize:  ZZ = req_sz/sizeof(SGE)
-+	 * For 32bit SGE's:
-+	 *  numSGE = 1 + (ZZ-1)*(maxChain -1) + ZZ
-+	 *               + (req_sz - 64)/sizeof(SGE)
-+	 * A slightly different algorithm is required for
-+	 * 64bit SGEs.
-+	 */
-+	scale = ioc->req_sz/(sizeof(dma_addr_t) + sizeof(u32));
-+	if (sizeof(dma_addr_t) == sizeof(u64)) {
-+		numSGE = (scale - 1) *
-+		  (ioc->facts.MaxChainDepth-1) + scale +
-+		  (ioc->req_sz - 60) / (sizeof(dma_addr_t) +
-+		  sizeof(u32));
-+	} else {
-+		numSGE = 1 + (scale - 1) *
-+		  (ioc->facts.MaxChainDepth-1) + scale +
-+		  (ioc->req_sz - 64) / (sizeof(dma_addr_t) +
-+		  sizeof(u32));
-+	}
-+
-+	if (numSGE < sh->sg_tablesize) {
-+		/* Reset this value */
-+		dprintk((MYIOC_s_INFO_FMT
-+		  "Resetting sg_tablesize to %d from %d\n",
-+		  ioc->name, numSGE, sh->sg_tablesize));
-+		sh->sg_tablesize = numSGE;
-+	}
- 
- #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13))
- 	/* Set the pci device pointer in Scsi_Host structure.
-@@ -307,29 +336,29 @@ mptspi_probe(struct pci_dev *pdev, const
- 	dprintk((MYIOC_s_INFO_FMT "ScsiLookup @ %p, sz=%d\n",
- 		 ioc->name, hd->ScsiLookup, sz));
- 
--	for (ii=0; ii < ioc->NumberOfBuses; ii++) {
--		/* Allocate memory for the device structures.
--		 * A non-Null pointer at an offset
--		 * indicates a device exists.
--		 */
--		sz = ioc->DevicesPerBus * sizeof(void *);
--		mem = kmalloc(sz, GFP_ATOMIC);
--		if (mem == NULL) {
--			error = -ENOMEM;
--			goto out_mptspi_probe;
--		}
-+	/* Allocate memory for the device structures.
-+	 * A non-Null pointer at an offset
-+	 * indicates a device exists.
-+	 * max_id = 1 + maximum id (hosts.h)
-+	 */
-+	sz = sh->max_id * sizeof(void *);
-+	mem = kmalloc(sz, GFP_ATOMIC);
-+	if (mem == NULL) {
-+		error = -ENOMEM;
-+		goto out_mptspi_probe;
-+	}
- 
--		memset(mem, 0, sz);
--		ioc->Target_List[ii] = (struct _MPT_DEVICE *) mem;
-+	memset(mem, 0, sz);
-+	hd->Targets = (VirtDevice **) mem;
- 
--		dinitprintk((KERN_INFO
--		  " For Bus=%d, Target_List=%p sz=%d\n", ii, mem, sz));
--	}
-+	dprintk((KERN_INFO
-+	  "  Targets @ %p, sz=%d\n", hd->Targets, sz));
- 
- 	/* Clear the TM flags
- 	 */
- 	hd->tmPending = 0;
- 	hd->tmState = TM_STATE_NONE;
-+	hd->resetPending = 0;
- 	hd->abortSCpnt = NULL;
- 
- 	/* Clear the pointer used to store
-@@ -339,21 +368,16 @@ mptspi_probe(struct pci_dev *pdev, const
- 	 */
- 	hd->cmdPtr = NULL;
- 
--	/* Initialize this IOC's  timers
-+	/* Initialize this SCSI Hosts' timers
- 	 * To use, set the timer expires field
--	 * and add_timer.Used for internally
--         * generated commands.
-+	 * and add_timer
- 	 */
--       init_timer(&hd->InternalCmdTimer);
--       hd->InternalCmdTimer.data = (unsigned long) hd;
--       hd->InternalCmdTimer.function = mptscsih_InternalCmdTimer_expired;
--
--       init_timer(&ioc->TMtimer);
--       ioc->TMtimer.data = (unsigned long) ioc;
--       ioc->TMtimer.function = mptscsih_TM_timeout;
-+	init_timer(&hd->timer);
-+	hd->timer.data = (unsigned long) hd;
-+	hd->timer.function = mptscsih_timer_expired;
- 
--       ioc->spi_data.Saf_Te = mpt_saf_te;
--       hd->mpt_pq_filter = mpt_pq_filter;
-+	ioc->spi_data.Saf_Te = mpt_saf_te;
-+	hd->mpt_pq_filter = mpt_pq_filter;
- 
- #ifdef MPTSCSIH_ENABLE_DOMAIN_VALIDATION
- 	if (ioc->spi_data.maxBusWidth > mpt_width)
-@@ -364,6 +388,7 @@ mptspi_probe(struct pci_dev *pdev, const
- 		ioc->spi_data.maxSyncOffset = 0;
- 	}
- 	ioc->spi_data.mpt_dv = mpt_dv;
-+	hd->negoNvram = 0;
- 
- 	ddvprintk((MYIOC_s_INFO_FMT
- 		"dv %x width %x factor %x saf_te %x mpt_pq_filter %x\n",
-@@ -374,7 +399,7 @@ mptspi_probe(struct pci_dev *pdev, const
- 		mpt_saf_te,
- 		mpt_pq_filter));
- #else
--
-+	hd->negoNvram = MPT_SCSICFG_USE_NVRAM;
- 	ddvprintk((MYIOC_s_INFO_FMT
- 		"saf_te %x mpt_pq_filter %x\n",
- 		ioc->name,
-@@ -387,18 +412,18 @@ mptspi_probe(struct pci_dev *pdev, const
- 		ioc->spi_data.noQas |= MPT_TARGET_NO_NEGO_QAS;
- 	else
- 		ioc->spi_data.noQas = 0;
--/* enable domain validation flags */
- 
- 	for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++)
--ioc->spi_data.dvStatus[ii] =
-+		ioc->spi_data.dvStatus[ii] =
-+		  MPT_SCSICFG_NEGOTIATE;
- 
--(MPT_SCSICFG_NEGOTIATE | MPT_SCSICFG_DV_NOT_DONE);
-+	for (ii=0; ii < MPT_MAX_SCSI_DEVICES; ii++)
-+		ioc->spi_data.dvStatus[ii] |=
-+		  MPT_SCSICFG_DV_NOT_DONE;
- 
- 	init_waitqueue_head(&hd->scandv_waitq);
- 	hd->scandv_wait_done = 0;
- 	hd->last_queue_full = 0;
--        init_waitqueue_head(&hd->TM_waitq);
--        hd->TM_wait_done = 0;
- 
- 	error = scsi_add_host (sh, &ioc->pcidev->dev);
- 	if(error) {
-@@ -414,10 +439,6 @@ ioc->spi_data.dvStatus[ii] =
- 		    0, 0, 0, 0, 5 /* 5 second timeout */);
- 	}
- 
--       dnegoprintk((MYIOC_s_WARN_FMT "%s: writeSDP1: ALL_IDS\n",
--               ioc->name, __FUNCTION__));
--       mpt_writeSDP1(ioc, 0, 0, MPT_SCSICFG_ALL_IDS);
--
- 	scsi_scan_host(sh);
- 	return 0;
- 
-@@ -464,7 +485,7 @@ mptspi_init(void)
- 
- 	if (mpt_event_register(mptspiDoneCtx, mptscsih_event_process) == 0) {
- 		devtprintk((KERN_INFO MYNAM
--        ": Registered for IOC event notifications mptspiDoneCtx=%08x\n", mptspiDoneCtx));
-+		  ": Registered for IOC event notifications\n"));
- 	}
- 
- 	if (mpt_reset_register(mptspiDoneCtx, mptscsih_ioc_reset) == 0) {
diff --git a/lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch b/lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch
deleted file mode 100644
index ec28f18dbe94653d8bc6c1022d6bf64ae5129da2..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/netpoll_xmit_lock-2.6-suse.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- linux-2.6.orig/net/core/netpoll.c	2007-12-18 21:58:41.000000000 +0800
-+++ linux-2.6/net/core/netpoll.c	2007-12-18 21:59:01.000000000 +0800
-@@ -160,6 +160,11 @@ repeat:
- 		return;
- 	}
- 
-+        if(np->dev->xmit_lock_owner == smp_processor_id()) {
-+		__kfree_skb(skb);
-+		return;
-+	}
-+
- 	spin_lock(&np->dev->xmit_lock);
- 	np->dev->xmit_lock_owner = smp_processor_id();
- 
diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch
deleted file mode 100644
index c75d7e8d0f89356c7cd6b08134a147dd10bb98b3..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc3.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-Index: linux-2.6.10/fs/cifs/dir.c
-===================================================================
---- linux-2.6.10.orig/fs/cifs/dir.c
-+++ linux-2.6.10/fs/cifs/dir.c
-@@ -199,23 +199,23 @@ cifs_create(struct inode *inode, struct 
- 	}
- 
- 	if(nd) {
--		if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
-+		if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
- 			desiredAccess = GENERIC_READ;
--		else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
-+		else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
- 			desiredAccess = GENERIC_WRITE;
- 			write_only = TRUE;
--		} else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
-+		} else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
- 			/* GENERIC_ALL is too much permission to request */
- 			/* can cause unnecessary access denied on create */
- 			/* desiredAccess = GENERIC_ALL; */
- 			desiredAccess = GENERIC_READ | GENERIC_WRITE;
- 		}
- 
--		if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
-+		if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- 			disposition = FILE_CREATE;
--		else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
-+		else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
- 			disposition = FILE_OVERWRITE_IF;
--		else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
-+		else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
- 			disposition = FILE_OPEN_IF;
- 		else {
- 			cFYI(1,("Create flag not set in create function"));
-Index: linux-2.6.10/fs/nfs/nfs4proc.c
-===================================================================
---- linux-2.6.10.orig/fs/nfs/nfs4proc.c
-+++ linux-2.6.10/fs/nfs/nfs4proc.c
-@@ -775,17 +775,17 @@ nfs4_atomic_open(struct inode *dir, stru
- 	struct nfs4_state *state;
- 
- 	if (nd->flags & LOOKUP_CREATE) {
--		attr.ia_mode = nd->intent.open.create_mode;
-+		attr.ia_mode = nd->intent.it_create_mode;
- 		attr.ia_valid = ATTR_MODE;
- 		if (!IS_POSIXACL(dir))
- 			attr.ia_mode &= ~current->fs->umask;
- 	} else {
- 		attr.ia_valid = 0;
--		BUG_ON(nd->intent.open.flags & O_CREAT);
-+		BUG_ON(nd->intent.it_flags & O_CREAT);
- 	}
- 
- 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
--	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
-+	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
- 	put_rpccred(cred);
- 	if (IS_ERR(state))
- 		return (struct inode *)state;
-Index: linux-2.6.10/fs/nfs/dir.c
-===================================================================
---- linux-2.6.10.orig/fs/nfs/dir.c
-+++ linux-2.6.10/fs/nfs/dir.c
-@@ -718,7 +718,7 @@ int nfs_is_exclusive_create(struct inode
- 		return 0;
- 	if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
- 		return 0;
--	return (nd->intent.open.flags & O_EXCL) != 0;
-+	return (nd->intent.it_flags & O_EXCL) != 0;
- }
- 
- static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
-@@ -791,7 +791,7 @@ static int is_atomic_open(struct inode *
- 	if (nd->flags & LOOKUP_DIRECTORY)
- 		return 0;
- 	/* Are we trying to write to a read only partition? */
--	if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
-+	if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
- 		return 0;
- 	return 1;
- }
-@@ -812,7 +812,7 @@ static struct dentry *nfs_atomic_lookup(
- 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
- 
- 	/* Let vfs_create() deal with O_EXCL */
--	if (nd->intent.open.flags & O_EXCL)
-+	if (nd->intent.it_flags & O_EXCL)
- 		goto no_entry;
- 
- 	/* Open the file on the server */
-@@ -820,7 +820,7 @@ static struct dentry *nfs_atomic_lookup(
- 	/* Revalidate parent directory attribute cache */
- 	nfs_revalidate_inode(NFS_SERVER(dir), dir);
- 
--	if (nd->intent.open.flags & O_CREAT) {
-+	if (nd->intent.it_flags & O_CREAT) {
- 		nfs_begin_data_update(dir);
- 		inode = nfs4_atomic_open(dir, dentry, nd);
- 		nfs_end_data_update(dir);
-@@ -836,7 +836,7 @@ static struct dentry *nfs_atomic_lookup(
- 				break;
- 			/* This turned out not to be a regular file */
- 			case -ELOOP:
--				if (!(nd->intent.open.flags & O_NOFOLLOW))
-+				if (!(nd->intent.it_flags & O_NOFOLLOW))
- 					goto no_open;
- 			/* case -EISDIR: */
- 			/* case -EINVAL: */
-@@ -875,7 +875,7 @@ static int nfs_open_revalidate(struct de
- 	/* NFS only supports OPEN on regular files */
- 	if (!S_ISREG(inode->i_mode))
- 		goto no_open;
--	openflags = nd->intent.open.flags;
-+	openflags = nd->intent.it_flags;
- 	/* We cannot do exclusive creation on a positive dentry */
- 	if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
- 		goto no_open;
-@@ -1043,7 +1043,8 @@ static int nfs_create(struct inode *dir,
- 	attr.ia_valid = ATTR_MODE;
- 
- 	if (nd && (nd->flags & LOOKUP_CREATE))
--		open_flags = nd->intent.open.flags;
-+		open_flags = nd->intent.it_flags;
-+
- 
- 	/*
- 	 * The 0 argument passed into the create function should one day
diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch
deleted file mode 100644
index f445efef07e4f0b7edd64c0b05e10ff66fb4bbc6..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-fc5.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-Index: linux-2.6.16.i686/fs/cifs/dir.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/cifs/dir.c	2006-05-30 15:47:03.000000000 +0800
-+++ linux-2.6.16.i686/fs/cifs/dir.c	2006-05-30 21:11:39.000000000 +0800
-@@ -147,7 +147,7 @@
- 	}
- 
- 	if(nd && (nd->flags & LOOKUP_OPEN)) {
--		int oflags = nd->intent.open.flags;
-+		int oflags = nd->intent.flags;
- 
- 		desiredAccess = 0;
- 		if (oflags & FMODE_READ)
-Index: linux-2.6.16.i686/fs/nfs/dir.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/nfs/dir.c	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/nfs/dir.c	2006-05-30 21:10:01.000000000 +0800
-@@ -831,7 +831,7 @@
- 		return 0;
- 	if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0)
- 		return 0;
--	return (nd->intent.open.flags & O_EXCL) != 0;
-+	return (nd->intent.it_flags & O_EXCL) != 0;
- }
- 
- static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
-@@ -902,7 +902,7 @@
- 	if (nd->flags & LOOKUP_DIRECTORY)
- 		return 0;
- 	/* Are we trying to write to a read only partition? */
--	if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
-+	if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
- 		return 0;
- 	return 1;
- }
-@@ -923,7 +923,7 @@
- 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
- 
- 	/* Let vfs_create() deal with O_EXCL */
--	if (nd->intent.open.flags & O_EXCL) {
-+ 	if (nd->intent.it_flags & O_EXCL) {
- 		d_add(dentry, NULL);
- 		goto out;
- 	}
-@@ -938,7 +938,7 @@
- 		goto out;
- 	}
- 
--	if (nd->intent.open.flags & O_CREAT) {
-+	if (nd->intent.it_flags & O_CREAT) {
- 		nfs_begin_data_update(dir);
- 		res = nfs4_atomic_open(dir, dentry, nd);
- 		nfs_end_data_update(dir);
-@@ -957,7 +957,7 @@
- 			case -ENOTDIR:
- 				goto no_open;
- 			case -ELOOP:
--				if (!(nd->intent.open.flags & O_NOFOLLOW))
-+				if (!(nd->intent.it_flags & O_NOFOLLOW))
- 					goto no_open;
- 			/* case -EINVAL: */
- 			default:
-@@ -993,7 +993,7 @@
- 	/* NFS only supports OPEN on regular files */
- 	if (!S_ISREG(inode->i_mode))
- 		goto no_open;
--	openflags = nd->intent.open.flags;
-+	openflags = nd->intent.it_flags;
- 	/* We cannot do exclusive creation on a positive dentry */
- 	if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
- 		goto no_open;
-@@ -1126,7 +1126,7 @@
- 	attr.ia_valid = ATTR_MODE;
- 
- 	if (nd && (nd->flags & LOOKUP_CREATE))
--		open_flags = nd->intent.open.flags;
-+		open_flags = nd->intent.it_flags;
- 
- 	lock_kernel();
- 	nfs_begin_data_update(dir);
-Index: linux-2.6.16.i686/fs/nfs/nfs4proc.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/nfs/nfs4proc.c	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/nfs/nfs4proc.c	2006-05-30 21:11:00.000000000 +0800
-@@ -1220,7 +1220,7 @@
- 		ctx = (struct nfs_open_context *)filp->private_data;
- 		ctx->state = state;
- 	} else
--		nfs4_close_state(state, nd->intent.open.flags);
-+		nfs4_close_state(state, nd->intent.flags);
- }
- 
- struct dentry *
-@@ -1232,19 +1232,19 @@
- 	struct dentry *res;
- 
- 	if (nd->flags & LOOKUP_CREATE) {
--		attr.ia_mode = nd->intent.open.create_mode;
-+		attr.ia_mode = nd->intent.create_mode;
- 		attr.ia_valid = ATTR_MODE;
- 		if (!IS_POSIXACL(dir))
- 			attr.ia_mode &= ~current->fs->umask;
- 	} else {
- 		attr.ia_valid = 0;
--		BUG_ON(nd->intent.open.flags & O_CREAT);
-+		BUG_ON(nd->intent.flags & O_CREAT);
- 	}
- 
- 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
- 	if (IS_ERR(cred))
- 		return (struct dentry *)cred;
--	state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred);
-+	state = nfs4_do_open(dir, dentry, nd->intent.flags, &attr, cred);
- 	put_rpccred(cred);
- 	if (IS_ERR(state)) {
- 		if (PTR_ERR(state) == -ENOENT)
diff --git a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch b/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch
deleted file mode 100644
index 0adb06c08a8c27cfc3cdaa1d3a53bfe51b11cb62..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/nfs-cifs-intent-2.6-suse.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-Index: linux-2.6.5-7.108/fs/nfs/dir.c
-===================================================================
---- linux-2.6.5-7.108.orig/fs/nfs/dir.c	2004-09-15 19:26:43.012732408 +0300
-+++ linux-2.6.5-7.108/fs/nfs/dir.c	2004-09-15 20:03:32.882781096 +0300
-@@ -709,7 +709,7 @@
- 		return 0;
- 	if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
- 		return 0;
--	return (nd->intent.open.flags & O_EXCL) != 0;
-+	return (nd->intent.it_flags & O_EXCL) != 0;
- }
- 
- static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
-@@ -782,7 +782,7 @@
- 	if (nd->flags & LOOKUP_DIRECTORY)
- 		return 0;
- 	/* Are we trying to write to a read only partition? */
--	if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
-+	if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
- 		return 0;
- 	return 1;
- }
-@@ -803,7 +803,7 @@
- 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
- 
- 	/* Let vfs_create() deal with O_EXCL */
--	if (nd->intent.open.flags & O_EXCL)
-+	if (nd->intent.it_flags & O_EXCL)
- 		goto no_entry;
- 
- 	/* Open the file on the server */
-@@ -811,7 +811,7 @@
- 	/* Revalidate parent directory attribute cache */
- 	nfs_revalidate_inode(NFS_SERVER(dir), dir);
- 
--	if (nd->intent.open.flags & O_CREAT) {
-+	if (nd->intent.it_flags & O_CREAT) {
- 		nfs_begin_data_update(dir);
- 		inode = nfs4_atomic_open(dir, dentry, nd);
- 		nfs_end_data_update(dir);
-@@ -827,7 +827,7 @@
- 				break;
- 			/* This turned out not to be a regular file */
- 			case -ELOOP:
--				if (!(nd->intent.open.flags & O_NOFOLLOW))
-+				if (!(nd->intent.it_flags & O_NOFOLLOW))
- 					goto no_open;
- 			/* case -EISDIR: */
- 			/* case -EINVAL: */
-@@ -861,7 +861,7 @@
- 	dir = parent->d_inode;
- 	if (!is_atomic_open(dir, nd))
- 		goto no_open;
--	openflags = nd->intent.open.flags;
-+	openflags = nd->intent.it_flags;
- 	if (openflags & O_CREAT) {
- 		/* If this is a negative dentry, just drop it */
- 		if (!inode)
-@@ -1026,7 +1026,7 @@
- 	attr.ia_valid = ATTR_MODE;
- 
- 	if (nd && (nd->flags & LOOKUP_CREATE))
--		open_flags = nd->intent.open.flags;
-+		open_flags = nd->intent.it_flags;
- 
- 	/*
- 	 * The 0 argument passed into the create function should one day
-Index: linux-2.6.5-7.108/fs/nfs/nfs4proc.c
-===================================================================
---- linux-2.6.5-7.108.orig/fs/nfs/nfs4proc.c	2004-04-04 06:37:39.000000000 +0300
-+++ linux-2.6.5-7.108/fs/nfs/nfs4proc.c	2004-09-15 20:03:32.885780640 +0300
-@@ -792,17 +792,17 @@
- 	struct nfs4_state *state;
- 
- 	if (nd->flags & LOOKUP_CREATE) {
--		attr.ia_mode = nd->intent.open.create_mode;
-+		attr.ia_mode = nd->intent.it_create_mode;
- 		attr.ia_valid = ATTR_MODE;
- 		if (!IS_POSIXACL(dir))
- 			attr.ia_mode &= ~current->fs->umask;
- 	} else {
- 		attr.ia_valid = 0;
--		BUG_ON(nd->intent.open.flags & O_CREAT);
-+		BUG_ON(nd->intent.it_flags & O_CREAT);
- 	}
- 
- 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
--	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
-+	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
- 	put_rpccred(cred);
- 	if (IS_ERR(state))
- 		return (struct inode *)state;
-Index: linux-2.6.5-7.108/fs/cifs/dir.c
-===================================================================
---- linux-2.6.5-7.108.orig/fs/cifs/dir.c	2004-09-04 13:28:22.000000000 +0300
-+++ linux-2.6.5-7.108/fs/cifs/dir.c	2004-09-15 20:03:40.065689128 +0300
-@@ -173,23 +173,23 @@
- 	}
- 
- 	if(nd) {
--		if ((nd->intent.open.flags & O_ACCMODE) == O_RDONLY)
-+		if ((nd->intent.it_flags & O_ACCMODE) == O_RDONLY)
- 			desiredAccess = GENERIC_READ;
--		else if ((nd->intent.open.flags & O_ACCMODE) == O_WRONLY) {
-+		else if ((nd->intent.it_flags & O_ACCMODE) == O_WRONLY) {
- 			desiredAccess = GENERIC_WRITE;
- 			write_only = TRUE;
--		} else if ((nd->intent.open.flags & O_ACCMODE) == O_RDWR) {
-+		} else if ((nd->intent.it_flags & O_ACCMODE) == O_RDWR) {
- 			/* GENERIC_ALL is too much permission to request */
- 			/* can cause unnecessary access denied on create */
- 			/* desiredAccess = GENERIC_ALL; */
- 			desiredAccess = GENERIC_READ | GENERIC_WRITE;
- 		}
- 
--		if((nd->intent.open.flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
-+		if((nd->intent.it_flags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
- 			disposition = FILE_CREATE;
--		else if((nd->intent.open.flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
-+		else if((nd->intent.it_flags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
- 			disposition = FILE_OVERWRITE_IF;
--		else if((nd->intent.open.flags & O_CREAT) == O_CREAT)
-+		else if((nd->intent.it_flags & O_CREAT) == O_CREAT)
- 			disposition = FILE_OPEN_IF;
- 		else {
- 			cFYI(1,("Create flag not set in create function"));
-@@ -359,7 +359,7 @@
- 	      parent_dir_inode, direntry->d_name.name, direntry));
- 
- 	if(nd) {  /* BB removeme */
--		cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.open.flags));
-+		cFYI(1,("In lookup nd flags 0x%x open intent flags 0x%x",nd->flags,nd->intent.it_flags));
- 	} /* BB removeme BB */
- 	/* BB Add check of incoming data - e.g. frame not longer than maximum SMB - let server check the namelen BB */
- 
diff --git a/lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch b/lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch
deleted file mode 100644
index 6d584b4b7ac872f118a18e064f56fcd6f33c03a0..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/qsnet-rhel4-2.6.patch
+++ /dev/null
@@ -1,1741 +0,0 @@
-Index: linux-269-5502/fs/open.c
-===================================================================
---- linux-269-5502.orig/fs/open.c
-+++ linux-269-5502/fs/open.c
-@@ -1029,6 +1029,8 @@ out_error:
- 	goto out;
- }
- 
-+EXPORT_SYMBOL(sys_open);
-+
- #ifndef __alpha__
- 
- /*
-Index: linux-269-5502/fs/read_write.c
-===================================================================
---- linux-269-5502.orig/fs/read_write.c
-+++ linux-269-5502/fs/read_write.c
-@@ -145,6 +145,7 @@ asmlinkage off_t sys_lseek(unsigned int 
- bad:
- 	return retval;
- }
-+EXPORT_SYMBOL(sys_lseek);
- 
- #ifdef __ARCH_WANT_SYS_LLSEEK
- asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
-Index: linux-269-5502/fs/select.c
-===================================================================
---- linux-269-5502.orig/fs/select.c
-+++ linux-269-5502/fs/select.c
-@@ -539,3 +539,4 @@ out_fds:
- 	poll_freewait(&table);
- 	return err;
- }
-+EXPORT_SYMBOL_GPL(sys_poll);
-Index: linux-269-5502/fs/exec.c
-===================================================================
---- linux-269-5502.orig/fs/exec.c
-+++ linux-269-5502/fs/exec.c
-@@ -56,6 +56,8 @@
- #include <linux/kmod.h>
- #endif
- 
-+#include <linux/ptrack.h>
-+
- int core_uses_pid;
- char core_pattern[65] = "core";
- int suid_dumpable = 0;
-@@ -1214,6 +1216,9 @@ int do_execve(char * filename,
- 	if (retval < 0)
- 		goto out;
- 
-+	/* notify any ptrack callbacks of the process exec */
-+	ptrack_call_callbacks(PTRACK_PHASE_EXEC, NULL);
-+
- 	retval = search_binary_handler(bprm,regs);
- 	if (retval >= 0) {
- 		free_arg_pages(bprm);
-Index: linux-269-5502/arch/i386/Kconfig
-===================================================================
---- linux-269-5502.orig/arch/i386/Kconfig
-+++ linux-269-5502/arch/i386/Kconfig
-@@ -960,6 +960,9 @@ config REGPARM
- 	generate incorrect output with certain kernel constructs when
- 	-mregparm=3 is used.
- 
-+source "mm/Kconfig"
-+source "kernel/Kconfig"
-+	
- endmenu
- 
- 
-Index: linux-269-5502/arch/i386/defconfig
-===================================================================
---- linux-269-5502.orig/arch/i386/defconfig
-+++ linux-269-5502/arch/i386/defconfig
-@@ -119,6 +119,8 @@ CONFIG_MTRR=y
- CONFIG_IRQBALANCE=y
- CONFIG_HAVE_DEC_LOCK=y
- # CONFIG_REGPARM is not set
-+CONFIG_IOPROC=y
-+CONFIG_PTRACK=y
- 
- #
- # Power management options (ACPI, APM)
-Index: linux-269-5502/arch/ia64/Kconfig
-===================================================================
---- linux-269-5502.orig/arch/ia64/Kconfig
-+++ linux-269-5502/arch/ia64/Kconfig
-@@ -316,6 +316,9 @@ config IA64_PALINFO
- 	  To use this option, you have to ensure that the "/proc file system
- 	  support" (CONFIG_PROC_FS) is enabled, too.
- 
-+source "mm/Kconfig"
-+source "kernel/Kconfig"
-+
- source "drivers/firmware/Kconfig"
- 
- source "fs/Kconfig.binfmt"
-Index: linux-269-5502/arch/ia64/defconfig
-===================================================================
---- linux-269-5502.orig/arch/ia64/defconfig
-+++ linux-269-5502/arch/ia64/defconfig
-@@ -83,6 +83,8 @@ CONFIG_IA32_SUPPORT=y
- CONFIG_COMPAT=y
- CONFIG_PERFMON=y
- CONFIG_IA64_PALINFO=y
-+CONFIG_IOPROC=y
-+CONFIG_PTRACK=y
- 
- #
- # Firmware Drivers
-Index: linux-269-5502/arch/x86_64/Kconfig
-===================================================================
---- linux-269-5502.orig/arch/x86_64/Kconfig
-+++ linux-269-5502/arch/x86_64/Kconfig
-@@ -401,6 +401,9 @@ config X86_MCE_AMD
-  	   Additional support for AMD specific MCE features such as
-  	   the DRAM Error Threshold.
- 
-+source "mm/Kconfig"
-+source "kernel/Kconfig"
-+
- endmenu
- 
- 
-Index: linux-269-5502/arch/x86_64/defconfig
-===================================================================
---- linux-269-5502.orig/arch/x86_64/defconfig
-+++ linux-269-5502/arch/x86_64/defconfig
-@@ -87,6 +87,8 @@ CONFIG_NR_CPUS=8
- CONFIG_GART_IOMMU=y
- CONFIG_SWIOTLB=y
- CONFIG_X86_MCE=y
-+CONFIG_IOPROC=y
-+CONFIG_PTRACK=y
- 
- #
- # Power management options
-Index: linux-269-5502/kernel/ptrack.c
-===================================================================
---- /dev/null
-+++ linux-269-5502/kernel/ptrack.c
-@@ -0,0 +1,145 @@
-+/*
-+ *    Copyright (C) 2000  Regents of the University of California
-+ *
-+ *    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  02111-1307  USA
-+ *
-+ * Derived from exit_actn.c by
-+ *    Copyright (C) 2003 Quadrics Ltd.
-+ */
-+
-+
-+#include <linux/module.h>
-+#include <linux/spinlock.h>
-+#include <linux/sched.h>
-+#include <linux/ptrack.h>
-+#include <linux/slab.h>
-+#include <linux/list.h>
-+
-+#include <asm/errno.h>
-+
-+int
-+ptrack_register (ptrack_callback_t callback, void *arg)
-+{
-+       struct ptrack_desc *desc = kmalloc (sizeof (struct ptrack_desc), GFP_KERNEL);
-+       
-+       if (desc == NULL)
-+               return -ENOMEM;
-+
-+	desc->callback = callback;
-+	desc->arg      = arg;
-+       
-+       list_add_tail (&desc->link, &current->ptrack_list);
-+       
-+       return 0;
-+}
-+
-+void
-+ptrack_deregister (ptrack_callback_t callback, void *arg)
-+{      
-+       struct list_head *el, *nel;
-+       
-+       list_for_each_safe (el, nel, &current->ptrack_list) {
-+               struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
-+               
-+               if (desc->callback == callback && desc->arg == arg) {
-+                       list_del (&desc->link);
-+                       kfree (desc);
-+               }
-+       }
-+}
-+
-+int
-+ptrack_registered (ptrack_callback_t callback, void *arg)
-+{
-+       struct list_head *el;
-+       
-+       list_for_each (el, &current->ptrack_list) {
-+               struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
-+               
-+               if (desc->callback == callback && desc->arg == arg)
-+                       return 1;
-+       }
-+       return 0;
-+}      
-+        
-+int
-+ptrack_call_callbacks (int phase, struct task_struct *child)
-+{
-+       struct list_head *el, *nel;
-+       struct ptrack_desc *new;
-+	int res;
-+
-+       if (phase == PTRACK_PHASE_CLONE)
-+               INIT_LIST_HEAD (&child->ptrack_list);
-+
-+       list_for_each_safe (el, nel, &current->ptrack_list) {
-+               struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
-+               
-+	       res = desc->callback (desc->arg, phase, child);
-+               
-+               switch (phase)
-+               {
-+               case PTRACK_PHASE_EXIT:
-+                       list_del (&desc->link);
-+                       kfree (desc);
-+                       break;
-+                       
-+               case PTRACK_PHASE_CLONE:
-+		       switch (res)
-+		       {
-+		       case PTRACK_FINISHED:
-+			       break;
-+
-+		       case PTRACK_INNHERIT:
-+			       if ((new = kmalloc (sizeof (struct ptrack_desc), GFP_ATOMIC)) == NULL)
-+			       {
-+				       /* allocation failed - notify that this process is not going
-+					* to be started by signalling clone failure.
-+					*/
-+				       desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child);
-+				       
-+				       goto failed;
-+			       }
-+
-+			       	new->callback = desc->callback;
-+				new->arg      = desc->arg;
-+                               
-+                               list_add_tail (&new->link, &child->ptrack_list);
-+			       break;
-+
-+		       case PTRACK_DENIED:
-+			       goto failed;
-+                       }
-+		       break;
-+               }
-+       }
-+
-+       return 0;
-+
-+ failed:
-+       while (! list_empty (&child->ptrack_list))
-+       {
-+	       struct ptrack_desc *desc = list_entry (child->ptrack_list.next, struct ptrack_desc, link);
-+	       
-+	       desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child);
-+
-+	       list_del (&desc->link);
-+	       kfree (desc);
-+       }
-+       return 1;
-+}
-+EXPORT_SYMBOL(ptrack_register);
-+EXPORT_SYMBOL(ptrack_deregister);
-+EXPORT_SYMBOL(ptrack_registered);
-Index: linux-269-5502/kernel/signal.c
-===================================================================
---- linux-269-5502.orig/kernel/signal.c
-+++ linux-269-5502/kernel/signal.c
-@@ -2329,6 +2329,7 @@ sys_kill(int pid, int sig)
- 
- 	return kill_something_info(sig, &info, pid);
- }
-+EXPORT_SYMBOL_GPL(sys_kill);
- 
- /**
-  *  sys_tgkill - send signal to one specific thread
-Index: linux-269-5502/kernel/Kconfig
-===================================================================
---- /dev/null
-+++ linux-269-5502/kernel/Kconfig
-@@ -0,0 +1,14 @@
-+#
-+# Kernel subsystem specific config
-+# 
-+
-+# Support for Process Tracking callbacks
-+#
-+config PTRACK
-+	bool "Enable PTRACK process tracking hooks"
-+	default y
-+	help
-+	This option enables hooks to be called when processes are
-+	created and destoryed in order for a resource management 
-+	system to know which processes are a member of a "job" and 
-+	to be able to clean up when the job is terminated.
-Index: linux-269-5502/kernel/Makefile
-===================================================================
---- linux-269-5502.orig/kernel/Makefile
-+++ linux-269-5502/kernel/Makefile
-@@ -26,6 +26,7 @@ obj-$(CONFIG_AUDIT) += audit.o
- obj-$(CONFIG_AUDITSYSCALL) += auditsc.o
- obj-$(CONFIG_AUDITFILESYSTEM) += auditfs.o
- obj-$(CONFIG_KPROBES) += kprobes.o
-+obj-$(CONFIG_PTRACK) += ptrack.o
- 
- ifneq ($(CONFIG_IA64),y)
- # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
-Index: linux-269-5502/kernel/exit.c
-===================================================================
---- linux-269-5502.orig/kernel/exit.c
-+++ linux-269-5502/kernel/exit.c
-@@ -32,6 +32,8 @@
- #include <asm/pgtable.h>
- #include <asm/mmu_context.h>
- 
-+#include <linux/ptrack.h>
-+
- extern void sem_exit (void);
- extern struct task_struct *child_reaper;
- 
-@@ -825,6 +827,9 @@ asmlinkage NORET_TYPE void do_exit(long 
- 		current->tux_exit();
- 	}
- 
-+	/* Notify any ptrack callbacks of the process exit */
-+	ptrack_call_callbacks(PTRACK_PHASE_EXIT, NULL);
-+
- 	if (unlikely(tsk->audit_context))
- 		audit_free(tsk);
- 	__exit_mm(tsk);
-Index: linux-269-5502/kernel/fork.c
-===================================================================
---- linux-269-5502.orig/kernel/fork.c
-+++ linux-269-5502/kernel/fork.c
-@@ -14,6 +14,7 @@
- #include <linux/config.h>
- #include <linux/slab.h>
- #include <linux/init.h>
-+#include <linux/ptrack.h>
- #include <linux/unistd.h>
- #include <linux/smp_lock.h>
- #include <linux/module.h>
-@@ -443,6 +444,9 @@ static struct mm_struct * mm_init(struct
- 	mm->page_table_lock = SPIN_LOCK_UNLOCKED;
- 	mm->ioctx_list_lock = RW_LOCK_UNLOCKED;
- 	mm->ioctx_list = NULL;
-+#ifdef CONFIG_IOPROC
-+	mm->ioproc_ops = NULL;
-+#endif
- 	mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm);
- 	mm->free_area_cache = TASK_UNMAPPED_BASE;
- 
-@@ -1312,6 +1316,11 @@ long do_fork(unsigned long clone_flags,
- 			set_tsk_thread_flag(p, TIF_SIGPENDING);
- 		}
- 
-+		if (ptrack_call_callbacks(PTRACK_PHASE_CLONE, p)) {
-+			sigaddset(&p->pending.signal, SIGKILL);
-+			set_tsk_thread_flag(p, TIF_SIGPENDING);
-+		}
-+
- 		if (!(clone_flags & CLONE_STOPPED))
- 			wake_up_new_task(p, clone_flags);
- 		else
-Index: linux-269-5502/Makefile
-===================================================================
---- linux-269-5502.orig/Makefile
-+++ linux-269-5502/Makefile
-@@ -1,7 +1,7 @@
- VERSION = 2
- PATCHLEVEL = 6
- SUBLEVEL = 9
--EXTRAVERSION = -prep
-+EXTRAVERSION = -prep.qp3.5.34.4qsnet
- RHEL_VERSION = 4
- RHEL_UPDATE = 5
- NAME=AC 1
-Index: linux-269-5502/Documentation/vm/ioproc.txt
-===================================================================
---- /dev/null
-+++ linux-269-5502/Documentation/vm/ioproc.txt
-@@ -0,0 +1,467 @@
-+Linux IOPROC patch overview
-+===========================
-+
-+The network interface for an HPC network differs significantly from
-+network interfaces for traditional IP networks. HPC networks tend to
-+be used directly from user processes and perform large RDMA transfers
-+between theses processes address space. They also have a requirement
-+for low latency communication, and typically achieve this by OS bypass
-+techniques.  This then requires a different model to traditional
-+interconnects, in that a process may need to expose a large amount of
-+it's address space to the network RDMA.
-+
-+Locking down of memory has been a common mechanism for performing
-+this, together with a pin-down cache implemented in user
-+libraries. The disadvantage of this method is that large portions of
-+the physical memory can be locked down for a single process, even if
-+it's working set changes over the different phases of it's
-+execution. This leads to inefficient memory utilisation - akin to the
-+disadvantage of swapping compared to paging.
-+
-+This model also has problems where memory is being dynamically
-+allocated and freed, since the pin down cache is unaware that memory
-+may have been released by a call to munmap() and so it will still be
-+locking down the now unused pages.
-+
-+Some modern HPC network interfaces implement their own MMU and are
-+able to handle a translation fault during a network access. The
-+Quadrics (http://www.quadrics.com) devices (Elan3 and Elan4) have done
-+this for some time and we expect others to follow the same route in
-+the relatively near future. These NICs are able to operate in an
-+environment where paging occurs and do not require memory to be locked
-+down. The advantage of this is that the user process can expose large
-+portions of it's address space without having to worry about physical
-+memory constraints.
-+
-+However should the operating system decide to swap a page to disk,
-+then the NIC must be made aware that it should no longer read/write
-+from this memory, but should generate a translation fault instead.
-+
-+The ioproc patch has been developed to provide a mechanism whereby the
-+device driver for a NIC can be aware of when a user process's address
-+translations change, either by paging or by explicitly mapping or
-+unmapping memory.
-+
-+The patch involves inserting callbacks where translations are being
-+invalidated to notify the NIC that the memory behind those
-+translations is no longer visible to the application (and so should
-+not be visible to the NIC). This callback is then responsible for
-+ensuring that the NIC will not access the physical memory that was
-+being mapped.
-+
-+An ioproc invalidate callback in the kswapd code could be utilised to
-+prevent memory from being paged out if the NIC is unable to support
-+network page faulting.
-+
-+For NICs which support network page faulting, there is no requirement
-+for a user level pin down cache, since they are able to page-in their
-+translations on the first communication using a buffer. However this
-+is likely to be inefficient, resulting in slow first use of the
-+buffer. If the communication buffers were continually allocated and
-+freed using mmap based malloc() calls then this would lead to all
-+communications being slower than desirable.
-+
-+To optimise these warm-up cases the ioproc patch adds calls to
-+ioproc_update wherever the kernel is creating translations for a user
-+process. These then allows the device driver to preload translations
-+so that they are already present for the first network communication
-+from a buffer.
-+
-+Linux 2.6 IOPROC implementation details
-+=======================================
-+
-+The Linux IOPROC patch adds hooks to the Linux VM code whenever page
-+table entries are being created and/or invalidated. IOPROC device
-+drivers can register their interest in being informed of such changes
-+by registering an ioproc_ops structure which is defined as follows;
-+
-+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+
-+typedef struct ioproc_ops {
-+	struct ioproc_ops *next;
-+	void *arg;
-+
-+	void (*release)(void *arg, struct mm_struct *mm);
-+	void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+	void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+	void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+
-+	void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot);
-+
-+	void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+	void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+	void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+
-+} ioproc_ops_t;
-+
-+ioproc_register_ops
-+===================
-+This function should be called by the IOPROC device driver to register
-+it's interest in PTE changes for the process associated with the passed
-+in mm_struct.
-+
-+The ioproc registration is not inherited across fork() and should be
-+called once for each process that IOPROC is interested in.
-+
-+This function must be called whilst holding the mm->page_table_lock.
-+
-+ioproc_unregister_ops
-+=====================
-+This function should be called by the IOPROC device driver when it no
-+longer requires informing of PTE changes in the process associated
-+with the supplied mm_struct.
-+
-+This function is not normally needed to be called as the ioproc_ops
-+struct is unlinked from the associated mm_struct during the
-+ioproc_release() call.
-+
-+This function must be called whilst holding the mm->page_table_lock.
-+
-+ioproc_ops struct
-+=================
-+A linked list ioproc_ops structures is hung off the user process
-+mm_struct (linux/sched.h). At each hook point in the patched kernel,
-+the ioproc patch will call the associated ioproc_ops callback function
-+pointer in turn for each registered structure.
-+
-+The intention of the callbacks is to allow the IOPROC device driver to
-+inspect the new or modified PTE entry via the Linux kernel
-+(e.g. find_pte_map()). These callbacks should not modify the Linux
-+kernel VM state or PTE entries.
-+
-+The ioproc_ops callback function pointers are:
-+
-+ioproc_release
-+==============
-+The release hook is called when a program exits and all it's vma areas
-+are torn down and unmapped, i.e. during exit_mmap(). Before each
-+release hook is called the ioproc_ops structure is unlinked from the
-+mm_struct.
-+
-+No locks are required as the process has the only reference to the mm
-+at this point.
-+
-+ioproc_sync_[range|page]
-+========================
-+The sync hooks are called when a memory map is synchronised with its
-+disk image i.e. when the msync() syscall is invoked. Any future read
-+or write by the IOPROC device to the associated pages should cause the
-+page to be marked as referenced or modified.
-+
-+Called holding the mm->page_table_lock.
-+
-+ioproc_invalidate_[range|page]
-+==============================
-+The invalidate hooks are called whenever a valid PTE is unloaded
-+e.g. when a page is unmapped by the user or paged out by the
-+kernel. After this call the IOPROC must not access the physical memory
-+again unless a new translation is loaded.
-+
-+Called holding the mm->page_table_lock.
-+
-+ioproc_update_[range|page]
-+==========================
-+The update hooks are called whenever a valid PTE is loaded
-+e.g. mmaping memory, moving the brk up, when breaking COW or faulting
-+in an anonymous page of memory. These give the IOPROC device the
-+opportunity to load translations speculatively, which can improve
-+performance by avoiding device translation faults.
-+
-+Called holding the mm->page_table_lock.
-+
-+ioproc_change_protection
-+========================
-+This hook is called when the protection on a region of memory is
-+changed i.e. when the mprotect() syscall is invoked.
-+
-+The IOPROC must not be able to write to a read-only page, so if the
-+permissions are downgraded then it must honour them. If they are
-+upgraded it can treat this in the same way as the
-+ioproc_update_[range|page]() calls.
-+
-+Called holding the mm->page_table_lock.
-+
-+
-+Linux 2.6 IOPROC patch details
-+==============================
-+
-+Here are the specific details of each ioproc hook added to the Linux
-+2.6 VM system and the reasons for doing so:
-+
-+++++ FILE
-+	mm/fremap.c
-+
-+==== FUNCTION
-+	zap_pte
-+
-+CALLED FROM
-+	install_page
-+	install_file_pte
-+
-+PTE MODIFICATION
-+	ptep_clear_flush
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+
-+==== FUNCTION
-+	install_page
-+
-+CALLED FROM
-+	filemap_populate, shmem_populate
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+==== FUNCTION
-+	install_file_pte
-+
-+CALLED FROM
-+	filemap_populate, shmem_populate
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+++++ FILE
-+	mm/memory.c
-+
-+==== FUNCTION
-+	zap_page_range
-+
-+CALLED FROM
-+	read_zero_pagealigned, madvise_dontneed, unmap_mapping_range,
-+	unmap_mapping_range_list, do_mmap_pgoff
-+
-+PTE MODIFICATION
-+	set_pte (unmap_vmas)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+
-+
-+==== FUNCTION
-+	zeromap_page_range
-+
-+CALLED FROM
-+	read_zero_pagealigned, mmap_zero
-+
-+PTE MODIFICATION
-+	set_pte (zeromap_pte_range)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+	ioproc_update_range
-+
-+
-+==== FUNCTION
-+	remap_page_range
-+
-+CALLED FROM
-+	many device drivers
-+
-+PTE MODIFICATION
-+	set_pte (remap_pte_range)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+	ioproc_update_range
-+
-+
-+==== FUNCTION
-+	break_cow
-+
-+CALLED FROM
-+	do_wp_page
-+
-+PTE MODIFICATION
-+	ptep_establish
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_wp_page
-+
-+CALLED FROM
-+       do_swap_page, handle_pte_fault
-+
-+PTE MODIFICATION
-+	ptep_set_access_flags
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_swap_page
-+
-+CALLED FROM
-+	handle_pte_fault
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_anonymous_page
-+
-+CALLED FROM
-+	do_no_page
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_no_page
-+
-+CALLED FROM
-+	do_file_page, handle_pte_fault
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+++++ FILE
-+	mm/mmap.c
-+
-+==== FUNCTION
-+	unmap_region
-+
-+CALLED FROM
-+	do_munmap
-+
-+PTE MODIFICATION
-+	set_pte (unmap_vmas)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+
-+
-+==== FUNCTION
-+	exit_mmap
-+
-+CALLED FROM
-+	mmput
-+
-+PTE MODIFICATION
-+	set_pte (unmap_vmas)
-+
-+ADDED HOOKS
-+	ioproc_release
-+
-+
-+++++ FILE
-+	mm/mprotect.c
-+
-+==== FUNCTION
-+	change_protection
-+
-+CALLED FROM
-+	mprotect_fixup
-+
-+PTE MODIFICATION
-+	set_pte (change_pte_range)
-+
-+ADDED HOOKS
-+	ioproc_change_protection
-+
-+
-+++++ FILE
-+	mm/mremap.c
-+
-+==== FUNCTION
-+	move_page_tables
-+
-+CALLED FROM
-+	move_vma
-+
-+PTE MODIFICATION
-+	ptep_clear_flush (move_one_page)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+	ioproc_invalidate_range
-+
-+
-+++++ FILE
-+	mm/rmap.c
-+
-+==== FUNCTION
-+	try_to_unmap_one
-+
-+CALLED FROM
-+	try_to_unmap_anon, try_to_unmap_file
-+
-+PTE MODIFICATION
-+	ptep_clear_flush
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+
-+
-+==== FUNCTION
-+	try_to_unmap_cluster
-+
-+CALLED FROM
-+	try_to_unmap_file
-+
-+PTE MODIFICATION
-+	ptep_clear_flush
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+
-+
-+
-+++++ FILE 
-+	mm/msync.c
-+
-+==== FUNCTION
-+	filemap_sync
-+
-+CALLED FROM
-+	msync_interval
-+
-+PTE MODIFICATION
-+	ptep_clear_flush_dirty (filemap_sync_pte)
-+
-+ADDED HOOKS
-+	ioproc_sync_range
-+
-+
-+++++ FILE
-+	mm/hugetlb.c
-+
-+==== FUNCTION
-+	zap_hugepage_range
-+
-+CALLED FROM
-+	hugetlb_vmtruncate_list
-+
-+PTE MODIFICATION
-+	ptep_get_and_clear (unmap_hugepage_range)
-+
-+ADDED HOOK
-+	ioproc_invalidate_range
-+
-+-- Last update Daniel J Blueman - 24 Mar 2006
-Index: linux-269-5502/mm/ioproc.c
-===================================================================
---- /dev/null
-+++ linux-269-5502/mm/ioproc.c
-@@ -0,0 +1,52 @@
-+/*
-+ *    Copyright (C) 2006 Quadrics Ltd
-+ *
-+ *    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  02111-1307  USA
-+ */
-+
-+/*
-+ * Registration for IO processor page table updates.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+
-+#include <linux/mm.h>
-+#include <linux/ioproc.h>
-+
-+int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip)
-+{
-+	ip->next = mm->ioproc_ops;
-+	mm->ioproc_ops = ip;
-+
-+	return 0;
-+}
-+
-+EXPORT_SYMBOL_GPL(ioproc_register_ops);
-+
-+int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip)
-+{
-+	struct ioproc_ops **tmp;
-+
-+	for (tmp = &mm->ioproc_ops; *tmp && *tmp != ip; tmp = &(*tmp)->next) ;
-+	if (*tmp) {
-+		*tmp = ip->next;
-+		return 0;
-+	}
-+
-+	return -EINVAL;
-+}
-+
-+EXPORT_SYMBOL_GPL(ioproc_unregister_ops);
-Index: linux-269-5502/mm/hugetlb.c
-===================================================================
---- linux-269-5502.orig/mm/hugetlb.c
-+++ linux-269-5502/mm/hugetlb.c
-@@ -10,6 +10,7 @@
- #include <linux/hugetlb.h>
- #include <linux/sysctl.h>
- #include <linux/highmem.h>
-+#include <linux/ioproc.h>
- 
- const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
- static unsigned long nr_huge_pages, free_huge_pages;
-@@ -260,6 +261,7 @@ void zap_hugepage_range(struct vm_area_s
- 	struct mm_struct *mm = vma->vm_mm;
- 
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, start, start + length);
- 	unmap_hugepage_range(vma, start, start + length);
- 	spin_unlock(&mm->page_table_lock);
- }
-Index: linux-269-5502/mm/Kconfig
-===================================================================
---- /dev/null
-+++ linux-269-5502/mm/Kconfig
-@@ -0,0 +1,15 @@
-+#
-+# VM subsystem specific config
-+# 
-+
-+# Support for IO processors which have advanced RDMA capabilities
-+#
-+config IOPROC
-+	bool "Enable IOPROC VM hooks"
-+	depends on MMU
-+	default y
-+	help
-+	This option enables hooks in the VM subsystem so that IO devices which
-+	incorporate advanced RDMA capabilities can be kept in sync with CPU 
-+	page table changes.
-+	See Documentation/vm/ioproc.txt for more details.
-Index: linux-269-5502/mm/Makefile
-===================================================================
---- linux-269-5502.orig/mm/Makefile
-+++ linux-269-5502/mm/Makefile
-@@ -16,6 +16,7 @@ obj-$(CONFIG_SWAP)	+= page_io.o swap_sta
- obj-$(CONFIG_X86_4G)	+= usercopy.o
- obj-$(CONFIG_HUGETLBFS)	+= hugetlb.o
- obj-$(CONFIG_NUMA) 	+= mempolicy.o
-+obj-$(CONFIG_IOPROC)    += ioproc.o
- obj-$(CONFIG_SHMEM) += shmem.o
- obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o
- 
-Index: linux-269-5502/mm/mprotect.c
-===================================================================
---- linux-269-5502.orig/mm/mprotect.c
-+++ linux-269-5502/mm/mprotect.c
-@@ -10,6 +10,7 @@
- 
- #include <linux/mm.h>
- #include <linux/hugetlb.h>
-+#include <linux/ioproc.h>
- #include <linux/slab.h>
- #include <linux/shm.h>
- #include <linux/mman.h>
-@@ -100,6 +101,7 @@ change_protection(struct vm_area_struct 
- 	if (start >= end)
- 		BUG();
- 	spin_lock(&current->mm->page_table_lock);
-+	ioproc_change_protection(vma, start, end, newprot);
- 	do {
- 		change_pmd_range(dir, start, end - start, newprot);
- 		start = (start + PGDIR_SIZE) & PGDIR_MASK;
-Index: linux-269-5502/mm/msync.c
-===================================================================
---- linux-269-5502.orig/mm/msync.c
-+++ linux-269-5502/mm/msync.c
-@@ -12,6 +12,7 @@
- #include <linux/mm.h>
- #include <linux/mman.h>
- #include <linux/hugetlb.h>
-+#include <linux/ioproc.h>
- 
- #include <asm/pgtable.h>
- #include <asm/tlbflush.h>
-@@ -115,6 +116,7 @@ static int filemap_sync(struct vm_area_s
- 
- 	if (address >= end)
- 		BUG();
-+	ioproc_sync_range(vma, address, end);
- 	do {
- 		error |= filemap_sync_pmd_range(dir, address, end, vma, flags);
- 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-Index: linux-269-5502/mm/mremap.c
-===================================================================
---- linux-269-5502.orig/mm/mremap.c
-+++ linux-269-5502/mm/mremap.c
-@@ -9,6 +9,7 @@
- 
- #include <linux/mm.h>
- #include <linux/hugetlb.h>
-+#include <linux/ioproc.h>
- #include <linux/slab.h>
- #include <linux/shm.h>
- #include <linux/mman.h>
-@@ -148,6 +149,8 @@ static unsigned long move_page_tables(st
- {
- 	unsigned long offset;
- 
-+	ioproc_invalidate_range(vma, old_addr, old_addr + len);
-+	ioproc_invalidate_range(vma, new_addr, new_addr + len);
- 	flush_cache_range(vma, old_addr, old_addr + len);
- 
- 	/*
-Index: linux-269-5502/mm/fremap.c
-===================================================================
---- linux-269-5502.orig/mm/fremap.c
-+++ linux-269-5502/mm/fremap.c
-@@ -12,6 +12,7 @@
- #include <linux/mman.h>
- #include <linux/pagemap.h>
- #include <linux/swapops.h>
-+#include <linux/ioproc.h>
- #include <linux/rmap.h>
- #include <linux/module.h>
- 
-@@ -29,6 +30,7 @@ static inline void zap_pte(struct mm_str
- 	if (pte_present(pte)) {
- 		unsigned long pfn = pte_pfn(pte);
- 
-+		ioproc_invalidate_page(vma, addr);
- 		flush_cache_page(vma, addr);
- 		pte = ptep_clear_flush(vma, addr, ptep);
- 		if (pfn_valid(pfn)) {
-@@ -93,6 +95,7 @@ int install_page(struct mm_struct *mm, s
- 	pte_val = *pte;
- 	pte_unmap(pte);
- 	update_mmu_cache(vma, addr, pte_val);
-+	ioproc_update_page(vma, addr);
- 
- 	err = 0;
- err_unlock:
-@@ -132,6 +135,7 @@ int install_file_pte(struct mm_struct *m
- 	pte_val = *pte;
- 	pte_unmap(pte);
- 	update_mmu_cache(vma, addr, pte_val);
-+	ioproc_update_page(vma, addr);
- 	spin_unlock(&mm->page_table_lock);
- 	return 0;
- 
-Index: linux-269-5502/mm/rmap.c
-===================================================================
---- linux-269-5502.orig/mm/rmap.c
-+++ linux-269-5502/mm/rmap.c
-@@ -51,6 +51,7 @@
- #include <linux/slab.h>
- #include <linux/init.h>
- #include <linux/rmap.h>
-+#include <linux/ioproc.h>
- #include <linux/rcupdate.h>
- 
- #include <asm/tlbflush.h>
-@@ -566,6 +567,7 @@ static int try_to_unmap_one(struct page 
- 	}
- 
- 	/* Nuke the page table entry. */
-+	ioproc_invalidate_page(vma, address);
- 	flush_cache_page(vma, address);
- 	pteval = ptep_clear_flush(vma, address, pte);
- 
-@@ -673,6 +675,7 @@ static void try_to_unmap_cluster(unsigne
- 			continue;
- 
- 		/* Nuke the page table entry. */
-+		ioproc_invalidate_page(vma, address);
- 		flush_cache_page(vma, address);
- 		pteval = ptep_clear_flush(vma, address, pte);
- 
-Index: linux-269-5502/mm/memory.c
-===================================================================
---- linux-269-5502.orig/mm/memory.c
-+++ linux-269-5502/mm/memory.c
-@@ -43,6 +43,7 @@
- #include <linux/swap.h>
- #include <linux/highmem.h>
- #include <linux/pagemap.h>
-+#include <linux/ioproc.h>
- #include <linux/rmap.h>
- #include <linux/module.h>
- #include <linux/init.h>
-@@ -630,6 +631,7 @@ void zap_page_range(struct vm_area_struc
- 
- 	lru_add_drain();
- 	spin_lock(&mm->page_table_lock);
-+ 	ioproc_invalidate_range(vma, address, end);
- 	tlb = tlb_gather_mmu(mm, 0);
- 	unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details);
- 	tlb_finish_mmu(tlb, address, end);
-@@ -998,6 +1000,7 @@ int zeromap_page_range(struct vm_area_st
- 		BUG();
- 
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, beg, end);
- 	do {
- 		pmd_t *pmd = pmd_alloc(mm, dir, address);
- 		error = -ENOMEM;
-@@ -1012,6 +1015,7 @@ int zeromap_page_range(struct vm_area_st
- 	/*
- 	 * Why flush? zeromap_pte_range has a BUG_ON for !pte_none()
- 	 */
-+	ioproc_update_range(vma, beg, end);
- 	flush_tlb_range(vma, beg, end);
- 	spin_unlock(&mm->page_table_lock);
- 	return error;
-@@ -1092,6 +1096,7 @@ int remap_page_range(struct vm_area_stru
- 	vma->vm_flags |= VM_IO | VM_RESERVED;
- 
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, beg, end);
- 	do {
- 		pmd_t *pmd = pmd_alloc(mm, dir, from);
- 		error = -ENOMEM;
-@@ -1106,6 +1111,7 @@ int remap_page_range(struct vm_area_stru
- 	/*
- 	 * Why flush? remap_pte_range has a BUG_ON for !pte_none()
- 	 */
-+	ioproc_update_range(vma, beg, end);
- 	flush_tlb_range(vma, beg, end);
- 	spin_unlock(&mm->page_table_lock);
- 	return error;
-@@ -1194,6 +1200,7 @@ static int do_wp_page(struct mm_struct *
- 			update_mmu_cache(vma, address, entry);
- 			lazy_mmu_prot_update(entry);
- 			pte_unmap(page_table);
-+			ioproc_update_page(vma, address);
- 			spin_unlock(&mm->page_table_lock);
- 			return VM_FAULT_MINOR;
- 		}
-@@ -1226,6 +1233,7 @@ static int do_wp_page(struct mm_struct *
- 			++mm->rss;
- 		else
- 			page_remove_rmap(old_page);
-+		ioproc_invalidate_page(vma, address);
- 		break_cow(vma, new_page, address, page_table);
- 		lru_cache_add_active(new_page);
- 		page_add_anon_rmap(new_page, vma, address);
-@@ -1234,6 +1242,7 @@ static int do_wp_page(struct mm_struct *
- 		new_page = old_page;
- 	}
- 	pte_unmap(page_table);
-+	ioproc_update_page(vma, address);
- 	page_cache_release(new_page);
- 	page_cache_release(old_page);
- 	spin_unlock(&mm->page_table_lock);
-@@ -1630,6 +1639,7 @@ static int do_swap_page(struct mm_struct
- 	update_mmu_cache(vma, address, pte);
- 	lazy_mmu_prot_update(pte);
- 	pte_unmap(page_table);
-+	ioproc_update_page(vma, address);
- 	spin_unlock(&mm->page_table_lock);
- out:
- 	return ret;
-@@ -1695,6 +1705,7 @@ do_anonymous_page(struct mm_struct *mm, 
- 	/* No need to invalidate - it was non-present before */
- 	update_mmu_cache(vma, addr, entry);
- 	lazy_mmu_prot_update(entry);
-+	ioproc_update_page(vma, addr);
- 	spin_unlock(&mm->page_table_lock);
- out:
- 	return VM_FAULT_MINOR;
-@@ -1813,6 +1824,7 @@ retry:
- 
- 	/* no need to invalidate: a not-present page shouldn't be cached */
- 	update_mmu_cache(vma, address, entry);
-+	ioproc_update_page(vma, address);
- 	spin_unlock(&mm->page_table_lock);
- out:
- 	return ret;
-@@ -1998,6 +2010,7 @@ int make_pages_present(unsigned long add
- 		return ret;
- 	return ret == len ? 0 : -1;
- }
-+EXPORT_SYMBOL(make_pages_present);
- 
- /* 
-  * Map a vmalloc()-space virtual address to the physical page.
-Index: linux-269-5502/mm/mmap.c
-===================================================================
---- linux-269-5502.orig/mm/mmap.c
-+++ linux-269-5502/mm/mmap.c
-@@ -15,6 +15,7 @@
- #include <linux/init.h>
- #include <linux/file.h>
- #include <linux/fs.h>
-+#include <linux/ioproc.h>
- #include <linux/personality.h>
- #include <linux/security.h>
- #include <linux/hugetlb.h>
-@@ -1703,6 +1704,7 @@ static void unmap_region(struct mm_struc
- 	unsigned long nr_accounted = 0;
- 
- 	lru_add_drain();
-+	ioproc_invalidate_range(vma, start, end);
- 	tlb = tlb_gather_mmu(mm, 0);
- 	unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL);
- 	vm_unacct_memory(nr_accounted);
-@@ -1995,6 +1997,7 @@ void exit_mmap(struct mm_struct *mm)
- 
- 	spin_lock(&mm->page_table_lock);
- 
-+	ioproc_release(mm);
- 	tlb = tlb_gather_mmu(mm, 1);
- 	flush_cache_mm(mm);
- 	/* Use ~0UL here to ensure all VMAs in the mm are unmapped */
-Index: linux-269-5502/ipc/shm.c
-===================================================================
---- linux-269-5502.orig/ipc/shm.c
-+++ linux-269-5502/ipc/shm.c
-@@ -26,6 +26,7 @@
- #include <linux/proc_fs.h>
- #include <linux/shmem_fs.h>
- #include <linux/security.h>
-+#include <linux/module.h>
- #include <linux/audit.h>
- #include <asm/uaccess.h>
- 
-@@ -856,6 +857,44 @@ asmlinkage long sys_shmdt(char __user *s
- 	return retval;
- }
- 
-+/*
-+ * Mark all segments created by this process for destruction
-+ */
-+int shm_cleanup (void)
-+{
-+	int i;
-+
-+	down(&shm_ids.sem);
-+
-+	for (i = 0; i <= shm_ids.max_id; i++) {
-+		struct shmid_kernel *shp;
-+
-+		shp = shm_lock(i);
-+		if (shp != NULL) {
-+			/* mark this segment for destruction if we created it */
-+			if (current->pid == shp->shm_cprid)
-+			{
-+				/* copy of IPC_RMID code */
-+				if (shp->shm_nattch) {
-+					shp->shm_flags |= SHM_DEST;
-+					/* do not find it any more */
-+					shp->shm_perm.key = IPC_PRIVATE;
-+				} else {
-+					shm_destroy(shp);
-+					continue;
-+				}
-+			}
-+
-+			shm_unlock(shp);
-+		}
-+	}
-+
-+	up(&shm_ids.sem);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(shm_cleanup);
-+
- #ifdef CONFIG_PROC_FS
- static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
- {
-Index: linux-269-5502/include/linux/init_task.h
-===================================================================
---- linux-269-5502.orig/include/linux/init_task.h
-+++ linux-269-5502/include/linux/init_task.h
-@@ -2,6 +2,7 @@
- #define _LINUX__INIT_TASK_H
- 
- #include <linux/file.h>
-+#include <linux/ptrack.h>
- 
- #define INIT_FILES \
- { 							\
-@@ -112,6 +113,7 @@ extern struct group_info init_groups;
- 	.proc_lock	= SPIN_LOCK_UNLOCKED,				\
- 	.switch_lock	= SPIN_LOCK_UNLOCKED,				\
- 	.journal_info	= NULL,						\
-+	INIT_TASK_PTRACK(tsk)						\
- }
- 
- 
-Index: linux-269-5502/include/linux/ioproc.h
-===================================================================
---- /dev/null
-+++ linux-269-5502/include/linux/ioproc.h
-@@ -0,0 +1,270 @@
-+/*
-+ *    Copyright (C) 2006 Quadrics Ltd
-+ *
-+ *    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  02111-1307  USA
-+ */
-+
-+/*
-+ * Callbacks for IO processor page table updates.
-+ */
-+
-+#ifndef __LINUX_IOPROC_H__
-+#define __LINUX_IOPROC_H__
-+
-+#include <linux/sched.h>
-+#include <linux/mm.h>
-+
-+typedef struct ioproc_ops {
-+	struct ioproc_ops *next;
-+	void *arg;
-+
-+	void (*release) (void *arg, struct mm_struct * mm);
-+	void (*sync_range) (void *arg, struct vm_area_struct * vma,
-+			    unsigned long start, unsigned long end);
-+	void (*invalidate_range) (void *arg, struct vm_area_struct * vma,
-+				  unsigned long start, unsigned long end);
-+	void (*update_range) (void *arg, struct vm_area_struct * vma,
-+			      unsigned long start, unsigned long end);
-+
-+	void (*change_protection) (void *arg, struct vm_area_struct * vma,
-+				   unsigned long start, unsigned long end,
-+				   pgprot_t newprot);
-+
-+	void (*sync_page) (void *arg, struct vm_area_struct * vma,
-+			   unsigned long address);
-+	void (*invalidate_page) (void *arg, struct vm_area_struct * vma,
-+				 unsigned long address);
-+	void (*update_page) (void *arg, struct vm_area_struct * vma,
-+			     unsigned long address);
-+
-+} ioproc_ops_t;
-+
-+/* IOPROC Registration
-+ * 
-+ * Called by the IOPROC device driver to register its interest in page table
-+ * changes for the process associated with the supplied mm_struct
-+ *
-+ * The caller should first allocate and fill out an ioproc_ops structure with 
-+ * the function pointers initialised to the device driver specific code for
-+ * each callback. If the device driver doesn't have code for a particular 
-+ * callback then it should set the function pointer to be NULL.
-+ * The ioproc_ops arg parameter will be passed unchanged as the first argument
-+ * to each callback function invocation.
-+ *
-+ * The ioproc registration is not inherited across fork() and should be called
-+ * once for each process that the IOPROC device driver is interested in.
-+ *
-+ * Must be called holding the mm->page_table_lock
-+ */
-+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+
-+/* IOPROC De-registration
-+ * 
-+ * Called by the IOPROC device driver when it is no longer interested in page 
-+ * table changes for the process associated with the supplied mm_struct
-+ *
-+ * Normally this is not needed to be called as the ioproc_release() code will
-+ * automatically unlink the ioproc_ops struct from the mm_struct as the
-+ * process exits
-+ *
-+ * Must be called holding the mm->page_table_lock
-+ */
-+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+
-+#ifdef CONFIG_IOPROC
-+
-+/* IOPROC Release
-+ *
-+ * Called during exit_mmap() as all vmas are torn down and unmapped.
-+ *
-+ * Also unlinks the ioproc_ops structure from the mm list as it goes.
-+ *
-+ * No need for locks as the mm can no longer be accessed at this point
-+ *
-+ */
-+static inline void ioproc_release(struct mm_struct *mm)
-+{
-+	struct ioproc_ops *cp;
-+
-+	while ((cp = mm->ioproc_ops) != NULL) {
-+		mm->ioproc_ops = cp->next;
-+
-+		if (cp->release)
-+			cp->release(cp->arg, mm);
-+	}
-+}
-+
-+/* IOPROC SYNC RANGE
-+ *
-+ * Called when a memory map is synchronised with its disk image i.e. when the 
-+ * msync() syscall is invoked. Any future read or write to the associated 
-+ * pages by the IOPROC should cause the page to be marked as referenced or 
-+ * modified.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_sync_range(struct vm_area_struct *vma, unsigned long start,
-+		  unsigned long end)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->sync_range)
-+			cp->sync_range(cp->arg, vma, start, end);
-+}
-+
-+/* IOPROC INVALIDATE RANGE
-+ *
-+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the
-+ * user or paged out by the kernel. 
-+ *
-+ * After this call the IOPROC must not access the physical memory again unless
-+ * a new translation is loaded.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_invalidate_range(struct vm_area_struct *vma, unsigned long start,
-+			unsigned long end)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->invalidate_range)
-+			cp->invalidate_range(cp->arg, vma, start, end);
-+}
-+
-+/* IOPROC UPDATE RANGE
-+ *
-+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk 
-+ * up, when breaking COW or faulting in an anonymous page of memory.
-+ *
-+ * These give the IOPROC device driver the opportunity to load translations 
-+ * speculatively, which can improve performance by avoiding device translation
-+ * faults.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_update_range(struct vm_area_struct *vma, unsigned long start,
-+		    unsigned long end)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->update_range)
-+			cp->update_range(cp->arg, vma, start, end);
-+}
-+
-+/* IOPROC CHANGE PROTECTION
-+ *
-+ * Called when the protection on a region of memory is changed i.e. when the 
-+ * mprotect() syscall is invoked.
-+ *
-+ * The IOPROC must not be able to write to a read-only page, so if the 
-+ * permissions are downgraded then it must honour them. If they are upgraded 
-+ * it can treat this in the same way as the ioproc_update_[range|sync]() calls
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_change_protection(struct vm_area_struct *vma, unsigned long start,
-+			 unsigned long end, pgprot_t newprot)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->change_protection)
-+			cp->change_protection(cp->arg, vma, start, end,
-+					      newprot);
-+}
-+
-+/* IOPROC SYNC PAGE
-+ *
-+ * Called when a memory map is synchronised with its disk image i.e. when the 
-+ * msync() syscall is invoked. Any future read or write to the associated page
-+ * by the IOPROC should cause the page to be marked as referenced or modified.
-+ *
-+ * Not currently called as msync() calls ioproc_sync_range() instead
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_sync_page(struct vm_area_struct *vma, unsigned long addr)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->sync_page)
-+			cp->sync_page(cp->arg, vma, addr);
-+}
-+
-+/* IOPROC INVALIDATE PAGE
-+ *
-+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the
-+ * user or paged out by the kernel. 
-+ *
-+ * After this call the IOPROC must not access the physical memory again unless
-+ * a new translation is loaded.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_invalidate_page(struct vm_area_struct *vma, unsigned long addr)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->invalidate_page)
-+			cp->invalidate_page(cp->arg, vma, addr);
-+}
-+
-+/* IOPROC UPDATE PAGE
-+ *
-+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk 
-+ * up, when breaking COW or faulting in an anoymous page of memory.
-+ *
-+ * These give the IOPROC device the opportunity to load translations 
-+ * speculatively, which can improve performance by avoiding device translation
-+ * faults.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void
-+ioproc_update_page(struct vm_area_struct *vma, unsigned long addr)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->update_page)
-+			cp->update_page(cp->arg, vma, addr);
-+}
-+
-+#else
-+
-+/* ! CONFIG_IOPROC so make all hooks empty */
-+
-+#define ioproc_release(mm)				do { } while (0)
-+#define ioproc_sync_range(vma, start, end)		do { } while (0)
-+#define ioproc_invalidate_range(vma, start, end)	do { } while (0)
-+#define ioproc_update_range(vma, start, end)		do { } while (0)
-+#define ioproc_change_protection(vma, start, end, prot)	do { } while (0)
-+#define ioproc_sync_page(vma, addr)			do { } while (0)
-+#define ioproc_invalidate_page(vma, addr)		do { } while (0)
-+#define ioproc_update_page(vma, addr)			do { } while (0)
-+
-+#endif				/* CONFIG_IOPROC */
-+#endif				/* __LINUX_IOPROC_H__ */
-Index: linux-269-5502/include/linux/sched.h
-===================================================================
---- linux-269-5502.orig/include/linux/sched.h
-+++ linux-269-5502/include/linux/sched.h
-@@ -185,6 +185,9 @@ extern signed long schedule_timeout_unin
- asmlinkage void schedule(void);
- 
- struct namespace;
-+#ifdef CONFIG_IOPROC
-+struct ioproc_ops;
-+#endif
- 
- /* Maximum number of active map areas.. This is a random (large) number */
- #define DEFAULT_MAX_MAP_COUNT	65536
-@@ -260,6 +263,11 @@ struct mm_struct {
- 	struct kioctx		*ioctx_list;
- 
- 	struct kioctx		default_kioctx;
-+ 
-+#ifdef CONFIG_IOPROC
-+ 	/* hooks for io devices with advanced RDMA capabilities */
-+	struct ioproc_ops       *ioproc_ops;
-+#endif
- };
- 
- extern int mmlist_nr;
-@@ -635,6 +643,10 @@ struct task_struct {
-   	struct mempolicy *mempolicy;
-   	short il_next;		/* could be shared with used_math */
- #endif
-+#ifdef CONFIG_PTRACK
-+/* process tracking callback */
-+	struct list_head ptrack_list;
-+#endif
- };
- 
- static inline pid_t process_group(struct task_struct *tsk)
-Index: linux-269-5502/include/linux/ptrack.h
-===================================================================
---- /dev/null
-+++ linux-269-5502/include/linux/ptrack.h
-@@ -0,0 +1,65 @@
-+/*
-+ *    Copyright (C) 2000  Regents of the University of California
-+ *
-+ *    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  02111-1307  USA
-+ *
-+ * Derived from exit_actn.c by
-+ *    Copyright (C) 2003 Quadrics Ltd.
-+ *
-+ */
-+#ifndef __LINUX_PTRACK_H
-+#define __LINUX_PTRACK_H
-+
-+/* 
-+ * Process tracking - this allows a module to keep track of processes
-+ * in order that it can manage all tasks derived from a single process.
-+ */
-+
-+#define PTRACK_PHASE_CLONE	1
-+#define PTRACK_PHASE_CLONE_FAIL	2
-+#define PTRACK_PHASE_EXEC	3
-+#define PTRACK_PHASE_EXIT      	4
-+
-+#define PTRACK_FINISHED		0
-+#define PTRACK_INNHERIT		1
-+#define PTRACK_DENIED		2
-+
-+#ifdef CONFIG_PTRACK
-+
-+typedef int (*ptrack_callback_t)(void *arg, int phase, struct task_struct *child);
-+
-+struct ptrack_desc {
-+       struct list_head        link;
-+       ptrack_callback_t       callback;
-+       void                   *arg;
-+};
-+
-+extern int     ptrack_register (ptrack_callback_t callback, void *arg);
-+extern void    ptrack_deregister (ptrack_callback_t callback, void *arg);
-+extern int     ptrack_registered (ptrack_callback_t callback, void *arg);
-+
-+extern int     ptrack_call_callbacks (int phase, struct task_struct *child);
-+
-+#define INIT_TASK_PTRACK(tsk) \
-+	.ptrack_list = LIST_HEAD_INIT(tsk.ptrack_list)
-+
-+#else
-+#define ptrack_call_callbacks (phase, child) (0)
-+
-+#define INIT_TASK_PTRACK(tsk)
-+
-+#endif
-+
-+#endif /* __LINUX_PTRACK_H */
-Index: linux-269-5502/include/asm-ia64/param.h
-===================================================================
---- linux-269-5502.orig/include/asm-ia64/param.h
-+++ linux-269-5502/include/asm-ia64/param.h
-@@ -27,7 +27,7 @@
-    */
- #  define HZ	  32
- # else
--#  define HZ	1024
-+#  define HZ	100
- # endif
- # define USER_HZ	HZ
- # define CLOCKS_PER_SEC	HZ	/* frequency at which times() counts */
-Index: linux-269-5502/include/asm-i386/param.h
-===================================================================
---- linux-269-5502.orig/include/asm-i386/param.h
-+++ linux-269-5502/include/asm-i386/param.h
-@@ -2,7 +2,7 @@
- #define _ASMi386_PARAM_H
- 
- #ifdef __KERNEL__
--# define HZ		1000		/* Internal kernel timer frequency */
-+# define HZ		100		/* Internal kernel timer frequency */
- # define USER_HZ	100		/* .. some user interfaces are in "ticks" */
- # define CLOCKS_PER_SEC		(USER_HZ)	/* like times() */
- #endif
-Index: linux-269-5502/include/asm-x86_64/param.h
-===================================================================
---- linux-269-5502.orig/include/asm-x86_64/param.h
-+++ linux-269-5502/include/asm-x86_64/param.h
-@@ -2,7 +2,7 @@
- #define _ASMx86_64_PARAM_H
- 
- #ifdef __KERNEL__
--# define HZ            1000            /* Internal kernel timer frequency */
-+# define HZ            100            /* Internal kernel timer frequency */
- # define USER_HZ       100          /* .. some user interfaces are in "ticks */
- #define CLOCKS_PER_SEC        (USER_HZ)       /* like times() */
- #endif
diff --git a/lustre/kernel_patches/patches/qsnet-suse-2.6.patch b/lustre/kernel_patches/patches/qsnet-suse-2.6.patch
deleted file mode 100644
index b312ab0332811613b7f1b5bddffdb8398aef9faa..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/qsnet-suse-2.6.patch
+++ /dev/null
@@ -1,1690 +0,0 @@
-Index: LINUX-SRC-TREE/arch/i386/defconfig
-===================================================================
---- LINUX-SRC-TREE.orig/arch/i386/defconfig
-+++ LINUX-SRC-TREE/arch/i386/defconfig
-@@ -2932,3 +2932,5 @@ CONFIG_CFGNAME="default"
- CONFIG_RELEASE="7.283"
- CONFIG_X86_BIOS_REBOOT=y
- CONFIG_PC=y
-+CONFIG_IOPROC=y
-+CONFIG_PTRACK=y
-Index: LINUX-SRC-TREE/arch/i386/Kconfig
-===================================================================
---- LINUX-SRC-TREE.orig/arch/i386/Kconfig
-+++ LINUX-SRC-TREE/arch/i386/Kconfig
-@@ -1022,6 +1022,9 @@ config APM_REAL_MODE_POWER_OFF
- 	  a work-around for a number of buggy BIOSes. Switch this option on if
- 	  your computer crashes instead of powering off properly.
- 
-+source "mm/Kconfig"
-+source "kernel/Kconfig"
-+	
- endmenu
- 
- source "arch/i386/kernel/cpu/cpufreq/Kconfig"
-Index: LINUX-SRC-TREE/arch/i386/mm/hugetlbpage.c
-===================================================================
---- LINUX-SRC-TREE.orig/arch/i386/mm/hugetlbpage.c
-+++ LINUX-SRC-TREE/arch/i386/mm/hugetlbpage.c
-@@ -16,6 +16,7 @@
- #include <linux/err.h>
- #include <linux/sysctl.h>
- #include <linux/mempolicy.h>
-+#include <linux/ioproc.h>
- #include <asm/mman.h>
- #include <asm/pgalloc.h>
- #include <asm/tlb.h>
-@@ -393,6 +394,7 @@ zap_hugepage_range(struct vm_area_struct
- {
- 	struct mm_struct *mm = vma->vm_mm;
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, start, start + length);
- 	unmap_hugepage_range(vma, start, start + length);
- 	spin_unlock(&mm->page_table_lock);
- }
-Index: LINUX-SRC-TREE/arch/ia64/defconfig
-===================================================================
---- LINUX-SRC-TREE.orig/arch/ia64/defconfig
-+++ LINUX-SRC-TREE/arch/ia64/defconfig
-@@ -104,6 +104,8 @@ CONFIG_IA64_PALINFO=y
- CONFIG_EFI_VARS=y
- CONFIG_BINFMT_ELF=y
- CONFIG_BINFMT_MISC=m
-+CONFIG_IOPROC=y
-+CONFIG_PTRACK=y
- 
- #
- # Power management and ACPI
-Index: LINUX-SRC-TREE/arch/ia64/Kconfig
-===================================================================
---- LINUX-SRC-TREE.orig/arch/ia64/Kconfig
-+++ LINUX-SRC-TREE/arch/ia64/Kconfig
-@@ -334,6 +334,8 @@ config EFI_VARS
- 	  To use this option, you have to check that the "/proc file system
- 	  support" (CONFIG_PROC_FS) is enabled, too.
- 
-+source "mm/Kconfig"
-+source "kernel/Kconfig"
- source "fs/Kconfig.binfmt"
- 
- endmenu
-Index: LINUX-SRC-TREE/arch/ia64/mm/hugetlbpage.c
-===================================================================
---- LINUX-SRC-TREE.orig/arch/ia64/mm/hugetlbpage.c
-+++ LINUX-SRC-TREE/arch/ia64/mm/hugetlbpage.c
-@@ -19,6 +19,7 @@
- #include <linux/slab.h>
- #include <linux/sysctl.h>
- #include <linux/mempolicy.h>
-+#include <linux/ioproc.h>
- #include <asm/mman.h>
- #include <asm/pgalloc.h>
- #include <asm/tlb.h>
-@@ -378,6 +379,7 @@ void zap_hugepage_range(struct vm_area_s
- {
- 	struct mm_struct *mm = vma->vm_mm;
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, start, start + length);
- 	unmap_hugepage_range(vma, start, start + length);
- 	spin_unlock(&mm->page_table_lock);
- }
-Index: LINUX-SRC-TREE/arch/x86_64/defconfig
-===================================================================
---- LINUX-SRC-TREE.orig/arch/x86_64/defconfig
-+++ LINUX-SRC-TREE/arch/x86_64/defconfig
-@@ -98,6 +98,8 @@ CONFIG_MTRR=y
- CONFIG_GART_IOMMU=y
- CONFIG_SWIOTLB=y
- CONFIG_X86_MCE=y
-+CONFIG_IOPROC=y
-+CONFIG_PTRACK=y
- 
- #
- # Power management options
-Index: LINUX-SRC-TREE/arch/x86_64/Kconfig
-===================================================================
---- LINUX-SRC-TREE.orig/arch/x86_64/Kconfig
-+++ LINUX-SRC-TREE/arch/x86_64/Kconfig
-@@ -343,6 +343,9 @@ source "drivers/acpi/Kconfig"
- 
- source "arch/x86_64/kernel/cpufreq/Kconfig"
- 
-+source "mm/Kconfig"
-+source "kernel/Kconfig"
-+
- endmenu
- 
- menu "Bus options (PCI etc.)"
-Index: LINUX-SRC-TREE/Documentation/vm/ioproc.txt
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/Documentation/vm/ioproc.txt
-@@ -0,0 +1,468 @@
-+Linux IOPROC patch overview
-+===========================
-+
-+The network interface for an HPC network differs significantly from
-+network interfaces for traditional IP networks. HPC networks tend to
-+be used directly from user processes and perform large RDMA transfers
-+between theses processes address space. They also have a requirement
-+for low latency communication, and typically achieve this by OS bypass
-+techniques.  This then requires a different model to traditional
-+interconnects, in that a process may need to expose a large amount of
-+it's address space to the network RDMA.
-+
-+Locking down of memory has been a common mechanism for performing
-+this, together with a pin-down cache implemented in user
-+libraries. The disadvantage of this method is that large portions of
-+the physical memory can be locked down for a single process, even if
-+it's working set changes over the different phases of it's
-+execution. This leads to inefficient memory utilisation - akin to the
-+disadvantage of swapping compared to paging.
-+
-+This model also has problems where memory is being dynamically
-+allocated and freed, since the pin down cache is unaware that memory
-+may have been released by a call to munmap() and so it will still be
-+locking down the now unused pages.
-+
-+Some modern HPC network interfaces implement their own MMU and are
-+able to handle a translation fault during a network access. The
-+Quadrics (http://www.quadrics.com) devices (Elan3 and Elan4) have done
-+this for some time and we expect others to follow the same route in
-+the relatively near future. These NICs are able to operate in an
-+environment where paging occurs and do not require memory to be locked
-+down. The advantage of this is that the user process can expose large
-+portions of it's address space without having to worry about physical
-+memory constraints.
-+
-+However should the operating system decide to swap a page to disk,
-+then the NIC must be made aware that it should no longer read/write
-+from this memory, but should generate a translation fault instead.
-+
-+The ioproc patch has been developed to provide a mechanism whereby the
-+device driver for a NIC can be aware of when a user process's address
-+translations change, either by paging or by explicitly mapping or
-+unmapping memory.
-+
-+The patch involves inserting callbacks where translations are being
-+invalidated to notify the NIC that the memory behind those
-+translations is no longer visible to the application (and so should
-+not be visible to the NIC). This callback is then responsible for
-+ensuring that the NIC will not access the physical memory that was
-+being mapped.
-+
-+An ioproc invalidate callback in the kswapd code could be utilised to
-+prevent memory from being paged out if the NIC is unable to support
-+network page faulting.
-+
-+For NICs which support network page faulting, there is no requirement
-+for a user level pin down cache, since they are able to page-in their
-+translations on the first communication using a buffer. However this
-+is likely to be inefficient, resulting in slow first use of the
-+buffer. If the communication buffers were continually allocated and
-+freed using mmap based malloc() calls then this would lead to all
-+communications being slower than desirable.
-+
-+To optimise these warm-up cases the ioproc patch adds calls to
-+ioproc_update wherever the kernel is creating translations for a user
-+process. These then allows the device driver to preload translations
-+so that they are already present for the first network communication
-+from a buffer.
-+
-+Linux 2.6 IOPROC implementation details
-+=======================================
-+
-+The Linux IOPROC patch adds hooks to the Linux VM code whenever page
-+table entries are being created and/or invalidated. IOPROC device
-+drivers can register their interest in being informed of such changes
-+by registering an ioproc_ops structure which is defined as follows;
-+
-+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+
-+typedef struct ioproc_ops {
-+	struct ioproc_ops *next;
-+	void *arg;
-+
-+	void (*release)(void *arg, struct mm_struct *mm);
-+	void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+	void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+	void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+
-+	void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot);
-+
-+	void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+	void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+	void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+
-+} ioproc_ops_t;
-+
-+ioproc_register_ops
-+===================
-+This function should be called by the IOPROC device driver to register
-+its interest in PTE changes for the process associated with the passed
-+in mm_struct.
-+
-+The ioproc registration is not inherited across fork() and should be
-+called once for each process that IOPROC is interested in.
-+
-+This function must be called whilst holding the mm->page_table_lock.
-+
-+ioproc_unregister_ops
-+=====================
-+This function should be called by the IOPROC device driver when it no
-+longer requires informing of PTE changes in the process associated
-+with the supplied mm_struct.
-+
-+This function is not normally needed to be called as the ioproc_ops
-+struct is unlinked from the associated mm_struct during the
-+ioproc_release() call.
-+
-+This function must be called whilst holding the mm->page_table_lock.
-+
-+ioproc_ops struct
-+=================
-+A linked list ioproc_ops structures is hung off the user process
-+mm_struct (linux/sched.h). At each hook point in the patched kernel
-+the ioproc patch will call the associated ioproc_ops callback function
-+pointer in turn for each registered structure.
-+
-+The intention of the callbacks is to allow the IOPROC device driver to
-+inspect the new or modified PTE entry via the Linux kernel
-+(e.g. find_pte_map()). These callbacks should not modify the Linux
-+kernel VM state or PTE entries.
-+
-+The ioproc_ops callback function pointers are defined as follows;
-+
-+ioproc_release
-+==============
-+The release hook is called when a program exits and all its vma areas
-+are torn down and unmapped. i.e. during exit_mmap(). Before each
-+release hook is called the ioproc_ops structure is unlinked from the
-+mm_struct.
-+
-+No locks are required as the process has the only reference to the mm
-+at this point.
-+
-+ioproc_sync_[range|page]
-+========================
-+The sync hooks are called when a memory map is synchronised with its
-+disk image i.e. when the msync() syscall is invoked. Any future read
-+or write by the IOPROC device to the associated pages should cause the
-+page to be marked as referenced or modified.
-+
-+Called holding the mm->page_table_lock
-+
-+ioproc_invalidate_[range|page]
-+==============================
-+The invalidate hooks are called whenever a valid PTE is unloaded
-+e.g. when a page is unmapped by the user or paged out by the
-+kernel. After this call the IOPROC must not access the physical memory
-+again unless a new translation is loaded.
-+
-+Called holding the mm->page_table_lock
-+
-+ioproc_update_[range|page]
-+==========================
-+The update hooks are called whenever a valid PTE is loaded
-+e.g. mmaping memory, moving the brk up, when breaking COW or faulting
-+in an anonymous page of memory. These give the IOPROC device the
-+opportunity to load translations speculatively, which can improve
-+performance by avoiding device translation faults.
-+
-+Called holding the mm->page_table_lock
-+
-+ioproc_change_protection
-+========================
-+This hook is called when the protection on a region of memory is
-+changed i.e. when the mprotect() syscall is invoked.
-+
-+The IOPROC must not be able to write to a read-only page, so if the
-+permissions are downgraded then it must honour them. If they are
-+upgraded it can treat this in the same way as the
-+ioproc_update_[range|page]() calls
-+
-+Called holding the mm->page_table_lock
-+
-+
-+Linux 2.6 IOPROC patch details
-+==============================
-+
-+Here are the specific details of each ioproc hook added to the Linux
-+2.6 VM system and the reasons for doing so;
-+
-+++++ FILE
-+	mm/fremap.c
-+
-+==== FUNCTION
-+	zap_pte
-+
-+CALLED FROM
-+	install_page
-+	install_file_pte
-+
-+PTE MODIFICATION
-+	ptep_clear_flush
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+
-+==== FUNCTION
-+	install_page
-+
-+CALLED FROM
-+	filemap_populate, shmem_populate
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+==== FUNCTION
-+	install_file_pte
-+
-+CALLED FROM
-+	filemap_populate, shmem_populate
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+++++ FILE
-+	mm/memory.c
-+
-+==== FUNCTION
-+	zap_page_range
-+
-+CALLED FROM
-+	read_zero_pagealigned, madvise_dontneed, unmap_mapping_range,
-+	unmap_mapping_range_list, do_mmap_pgoff
-+
-+PTE MODIFICATION
-+	set_pte (unmap_vmas)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+
-+
-+==== FUNCTION
-+	zeromap_page_range
-+
-+CALLED FROM
-+	read_zero_pagealigned, mmap_zero
-+
-+PTE MODIFICATION
-+	set_pte (zeromap_pte_range)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+	ioproc_update_range
-+
-+
-+==== FUNCTION
-+	remap_page_range
-+
-+CALLED FROM
-+	many device drivers
-+
-+PTE MODIFICATION
-+	set_pte (remap_pte_range)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+	ioproc_update_range
-+
-+
-+==== FUNCTION
-+	break_cow
-+
-+CALLED FROM
-+	do_wp_page
-+
-+PTE MODIFICATION
-+	ptep_establish
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_wp_page
-+
-+CALLED FROM
-+       do_swap_page, handle_pte_fault
-+
-+PTE MODIFICATION
-+	ptep_set_access_flags
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_swap_page
-+
-+CALLED FROM
-+	handle_pte_fault
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_anonymous_page
-+
-+CALLED FROM
-+	do_no_page
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+==== FUNCTION
-+	do_no_page
-+
-+CALLED FROM
-+	do_file_page, handle_pte_fault
-+
-+PTE MODIFICATION
-+	set_pte
-+
-+ADDED HOOKS
-+	ioproc_update_page
-+
-+
-+++++ FILE
-+	mm/mmap.c
-+
-+==== FUNCTION
-+	unmap_region
-+
-+CALLED FROM
-+	do_munmap
-+
-+PTE MODIFICATION
-+	set_pte (unmap_vmas)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+
-+
-+==== FUNCTION
-+	exit_mmap
-+
-+CALLED FROM
-+	mmput
-+
-+PTE MODIFICATION
-+	set_pte (unmap_vmas)
-+
-+ADDED HOOKS
-+	ioproc_release
-+
-+
-+++++ FILE
-+	mm/mprotect.c
-+
-+==== FUNCTION
-+	change_protection
-+
-+CALLED FROM
-+	mprotect_fixup
-+
-+PTE MODIFICATION
-+	set_pte (change_pte_range)
-+
-+ADDED HOOKS
-+	ioproc_change_protection
-+
-+
-+++++ FILE
-+	mm/mremap.c
-+
-+==== FUNCTION
-+	move_page_tables
-+
-+CALLED FROM
-+	move_vma
-+
-+PTE MODIFICATION
-+	ptep_clear_flush (move_one_page)
-+
-+ADDED HOOKS
-+	ioproc_invalidate_range
-+	ioproc_invalidate_range
-+
-+
-+++++ FILE
-+	mm/rmap.c
-+
-+==== FUNCTION
-+	try_to_unmap_one
-+
-+CALLED FROM
-+	try_to_unmap_anon, try_to_unmap_file
-+
-+PTE MODIFICATION
-+	ptep_clear_flush
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+
-+
-+==== FUNCTION
-+	try_to_unmap_cluster
-+
-+CALLED FROM
-+	try_to_unmap_file
-+
-+PTE MODIFICATION
-+	ptep_clear_flush
-+
-+ADDED HOOKS
-+	ioproc_invalidate_page
-+
-+
-+
-+++++ FILE 
-+	mm/msync.c
-+
-+==== FUNCTION
-+	filemap_sync
-+
-+CALLED FROM
-+	msync_interval
-+
-+PTE MODIFICATION
-+	ptep_clear_flush_dirty (filemap_sync_pte)
-+
-+ADDED HOOKS
-+	ioproc_sync_range
-+
-+
-+++++ FILE
-+	mm/hugetlb.c
-+
-+==== FUNCTION
-+	zap_hugepage_range
-+
-+CALLED FROM
-+	hugetlb_vmtruncate_list
-+
-+PTE MODIFICATION
-+	ptep_get_and_clear (unmap_hugepage_range)
-+
-+ADDED HOOK
-+	ioproc_invalidate_range
-+
-+
-+-- Last update DavidAddison - 17 Aug 2004
-Index: LINUX-SRC-TREE/fs/exec.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/exec.c
-+++ LINUX-SRC-TREE/fs/exec.c
-@@ -65,6 +65,8 @@ EXPORT_SYMBOL(coredump_notifier_list);
- #include <linux/kmod.h>
- #endif
- 
-+#include <linux/ptrack.h>
-+
- int core_uses_pid;
- char core_pattern[65] = "core";
- int suid_dumpable = 0;
-@@ -1213,6 +1215,9 @@ int do_execve(char * filename,
- 	if (retval < 0)
- 		goto out;
- 
-+	/* notify any ptrack callbacks of the process exec */
-+	ptrack_call_callbacks(PTRACK_PHASE_EXEC, NULL);
-+
- 	retval = search_binary_handler(&bprm,regs);
- 	if (retval >= 0) {
- 		TRIG_EVENT(exec_hook, file->f_dentry->d_name.len,
-Index: LINUX-SRC-TREE/fs/read_write.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/read_write.c
-+++ LINUX-SRC-TREE/fs/read_write.c
-@@ -339,6 +339,7 @@ asmlinkage ssize_t sys_write(unsigned in
- 
- 	return ret;
- }
-+EXPORT_SYMBOL_GPL(sys_write);
- 
- asmlinkage ssize_t sys_pread64(unsigned int fd, char __user *buf,
- 			     size_t count, loff_t pos)
-Index: LINUX-SRC-TREE/fs/select.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/select.c
-+++ LINUX-SRC-TREE/fs/select.c
-@@ -649,3 +649,4 @@ ssize_t generic_aio_poll(struct kiocb *i
- 	}
- 	return -EIOCBRETRY;
- }
-+EXPORT_SYMBOL_GPL(sys_poll);
-Index: LINUX-SRC-TREE/include/linux/init_task.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/init_task.h
-+++ LINUX-SRC-TREE/include/linux/init_task.h
-@@ -3,6 +3,7 @@
- 
- #include <linux/file.h>
- #include <linux/pagg.h>
-+#include <linux/ptrack.h>
- 
- #define INIT_FILES \
- { 							\
-@@ -116,6 +117,7 @@ extern struct group_info init_groups;
- 	.map_base	= __TASK_UNMAPPED_BASE,				\
- 	.io_wait	= NULL,						\
- 	INIT_TASK_PAGG(tsk)						\
-+	INIT_TASK_PTRACK(tsk)						\
- }
- 
- 
-Index: LINUX-SRC-TREE/include/linux/ioproc.h
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/include/linux/ioproc.h
-@@ -0,0 +1,271 @@
-+/* -*- linux-c -*-
-+ *
-+ *    Copyright (C) 2002-2004 Quadrics Ltd.
-+ *
-+ *    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  02111-1307  USA
-+ *
-+ *
-+ */
-+
-+/*
-+ * Callbacks for IO processor page table updates.
-+ */
-+
-+#ifndef __LINUX_IOPROC_H__
-+#define __LINUX_IOPROC_H__
-+
-+#include <linux/sched.h>
-+#include <linux/mm.h>
-+
-+typedef struct ioproc_ops {
-+	struct ioproc_ops *next;
-+	void *arg;
-+
-+	void (*release)(void *arg, struct mm_struct *mm);
-+	void (*sync_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+	void (*invalidate_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+	void (*update_range)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end);
-+
-+	void (*change_protection)(void *arg, struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot);
-+
-+	void (*sync_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+	void (*invalidate_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+	void (*update_page)(void *arg, struct vm_area_struct *vma, unsigned long address);
-+
-+} ioproc_ops_t;
-+
-+/* IOPROC Registration
-+ * 
-+ * Called by the IOPROC device driver to register its interest in page table
-+ * changes for the process associated with the supplied mm_struct
-+ *
-+ * The caller should first allocate and fill out an ioproc_ops structure with 
-+ * the function pointers initialised to the device driver specific code for
-+ * each callback. If the device driver doesn't have code for a particular 
-+ * callback then it should set the function pointer to be NULL.
-+ * The ioproc_ops arg parameter will be passed unchanged as the first argument
-+ * to each callback function invocation.
-+ *
-+ * The ioproc registration is not inherited across fork() and should be called
-+ * once for each process that the IOPROC device driver is interested in.
-+ *
-+ * Must be called holding the mm->page_table_lock
-+ */
-+extern int ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+
-+
-+/* IOPROC De-registration
-+ * 
-+ * Called by the IOPROC device driver when it is no longer interested in page 
-+ * table changes for the process associated with the supplied mm_struct
-+ *
-+ * Normally this is not needed to be called as the ioproc_release() code will
-+ * automatically unlink the ioproc_ops struct from the mm_struct as the
-+ * process exits
-+ *
-+ * Must be called holding the mm->page_table_lock
-+ */
-+extern int ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip);
-+
-+#ifdef CONFIG_IOPROC
-+
-+/* IOPROC Release
-+ *
-+ * Called during exit_mmap() as all vmas are torn down and unmapped.
-+ *
-+ * Also unlinks the ioproc_ops structure from the mm list as it goes.
-+ *
-+ * No need for locks as the mm can no longer be accessed at this point
-+ *
-+ */
-+static inline void 
-+ioproc_release(struct mm_struct *mm)
-+{
-+	struct ioproc_ops *cp;
-+
-+	while ((cp = mm->ioproc_ops) != NULL) {
-+		mm->ioproc_ops = cp->next;
-+        
-+		if (cp->release)
-+			cp->release(cp->arg, mm);
-+	}
-+}
-+
-+/* IOPROC SYNC RANGE
-+ *
-+ * Called when a memory map is synchronised with its disk image i.e. when the 
-+ * msync() syscall is invoked. Any future read or write to the associated 
-+ * pages by the IOPROC should cause the page to be marked as referenced or 
-+ * modified.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_sync_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->sync_range)
-+			cp->sync_range(cp->arg, vma, start, end);
-+}
-+
-+/* IOPROC INVALIDATE RANGE
-+ *
-+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the
-+ * user or paged out by the kernel. 
-+ *
-+ * After this call the IOPROC must not access the physical memory again unless
-+ * a new translation is loaded.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_invalidate_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
-+{
-+	struct ioproc_ops *cp;
-+	
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->invalidate_range)
-+			cp->invalidate_range(cp->arg, vma, start, end);
-+}
-+
-+/* IOPROC UPDATE RANGE
-+ *
-+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk 
-+ * up, when breaking COW or faulting in an anonymous page of memory.
-+ *
-+ * These give the IOPROC device driver the opportunity to load translations 
-+ * speculatively, which can improve performance by avoiding device translation
-+ * faults.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_update_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->update_range)
-+			cp->update_range(cp->arg, vma, start, end);
-+}
-+
-+
-+/* IOPROC CHANGE PROTECTION
-+ *
-+ * Called when the protection on a region of memory is changed i.e. when the 
-+ * mprotect() syscall is invoked.
-+ *
-+ * The IOPROC must not be able to write to a read-only page, so if the 
-+ * permissions are downgraded then it must honour them. If they are upgraded 
-+ * it can treat this in the same way as the ioproc_update_[range|sync]() calls
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_change_protection(struct vm_area_struct *vma, unsigned long start, unsigned long end, pgprot_t newprot)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->change_protection)
-+			cp->change_protection(cp->arg, vma, start, end, newprot);
-+}
-+
-+/* IOPROC SYNC PAGE
-+ *
-+ * Called when a memory map is synchronised with its disk image i.e. when the 
-+ * msync() syscall is invoked. Any future read or write to the associated page
-+ * by the IOPROC should cause the page to be marked as referenced or modified.
-+ *
-+ * Not currently called as msync() calls ioproc_sync_range() instead
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_sync_page(struct vm_area_struct *vma, unsigned long addr)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->sync_page)
-+			cp->sync_page(cp->arg, vma, addr);
-+}
-+
-+/* IOPROC INVALIDATE PAGE
-+ *
-+ * Called whenever a valid PTE is unloaded e.g. when a page is unmapped by the
-+ * user or paged out by the kernel. 
-+ *
-+ * After this call the IOPROC must not access the physical memory again unless
-+ * a new translation is loaded.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_invalidate_page(struct vm_area_struct *vma, unsigned long addr)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->invalidate_page)
-+			cp->invalidate_page(cp->arg, vma, addr);
-+}
-+
-+/* IOPROC UPDATE PAGE
-+ *
-+ * Called whenever a valid PTE is loaded e.g. mmaping memory, moving the brk 
-+ * up, when breaking COW or faulting in an anoymous page of memory.
-+ *
-+ * These give the IOPROC device the opportunity to load translations 
-+ * speculatively, which can improve performance by avoiding device translation
-+ * faults.
-+ *
-+ * Called holding the mm->page_table_lock
-+ */
-+static inline void 
-+ioproc_update_page(struct vm_area_struct *vma, unsigned long addr)
-+{
-+	struct ioproc_ops *cp;
-+
-+	for (cp = vma->vm_mm->ioproc_ops; cp; cp = cp->next)
-+		if (cp->update_page)
-+			cp->update_page(cp->arg, vma, addr);
-+}
-+
-+#else
-+
-+/* ! CONFIG_IOPROC so make all hooks empty */
-+
-+#define ioproc_release(mm)			do { } while (0)
-+
-+#define ioproc_sync_range(vma,start,end)		do { } while (0)
-+
-+#define ioproc_invalidate_range(vma, start,end)	do { } while (0)
-+
-+#define ioproc_update_range(vma, start, end)	do { } while (0)
-+
-+#define ioproc_change_protection(vma, start, end, prot)	do { } while (0)
-+
-+#define ioproc_sync_page(vma, addr)		do { } while (0)
-+
-+#define ioproc_invalidate_page(vma, addr)	do { } while (0)
-+
-+#define ioproc_update_page(vma, addr)		do { } while (0)
-+
-+#endif /* CONFIG_IOPROC */
-+
-+#endif /* __LINUX_IOPROC_H__ */
-Index: LINUX-SRC-TREE/include/linux/ptrack.h
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/include/linux/ptrack.h
-@@ -0,0 +1,65 @@
-+/*
-+ *    Copyright (C) 2000  Regents of the University of California
-+ *
-+ *    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  02111-1307  USA
-+ *
-+ * Derived from exit_actn.c by
-+ *    Copyright (C) 2003 Quadrics Ltd.
-+ *
-+ */
-+#ifndef __LINUX_PTRACK_H
-+#define __LINUX_PTRACK_H
-+
-+/* 
-+ * Process tracking - this allows a module to keep track of processes
-+ * in order that it can manage all tasks derived from a single process.
-+ */
-+
-+#define PTRACK_PHASE_CLONE	1
-+#define PTRACK_PHASE_CLONE_FAIL	2
-+#define PTRACK_PHASE_EXEC	3
-+#define PTRACK_PHASE_EXIT      	4
-+
-+#define PTRACK_FINISHED		0
-+#define PTRACK_INNHERIT		1
-+#define PTRACK_DENIED		2
-+
-+#ifdef CONFIG_PTRACK
-+
-+typedef int (*ptrack_callback_t)(void *arg, int phase, struct task_struct *child);
-+
-+struct ptrack_desc {
-+       struct list_head        link;
-+       ptrack_callback_t       callback;
-+       void                   *arg;
-+};
-+
-+extern int     ptrack_register (ptrack_callback_t callback, void *arg);
-+extern void    ptrack_deregister (ptrack_callback_t callback, void *arg);
-+extern int     ptrack_registered (ptrack_callback_t callback, void *arg);
-+
-+extern int     ptrack_call_callbacks (int phase, struct task_struct *child);
-+
-+#define INIT_TASK_PTRACK(tsk) \
-+	.ptrack_list = LIST_HEAD_INIT(tsk.ptrack_list)
-+
-+#else
-+#define ptrack_call_callbacks (phase, child) (0)
-+
-+#define INIT_TASK_PTRACK(tsk)
-+
-+#endif
-+
-+#endif /* __LINUX_PTRACK_H */
-Index: LINUX-SRC-TREE/include/linux/sched.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/sched.h
-+++ LINUX-SRC-TREE/include/linux/sched.h
-@@ -188,6 +188,9 @@ asmlinkage void schedule(void);
- extern int max_timeslice, min_timeslice;
- 
- struct namespace;
-+#ifdef CONFIG_IOPROC
-+struct ioproc_ops;
-+#endif
- 
- /* Maximum number of active map areas.. This is a random (large) number */
- #define DEFAULT_MAX_MAP_COUNT	65536
-@@ -241,6 +244,11 @@ struct mm_struct {
- 	struct kioctx		default_kioctx;
- 
- 	unsigned long hiwater_rss, hiwater_vm;
-+
-+#ifdef CONFIG_IOPROC
-+	/* hooks for io devices with advanced RDMA capabilities */
-+	struct ioproc_ops	*ioproc_ops;
-+#endif
- };
- 
- extern int mmlist_nr;
-@@ -603,6 +611,10 @@ struct task_struct {
- 	struct rw_semaphore pagg_sem;
- #endif
- 
-+#ifdef CONFIG_PTRACK
-+/* process tracking callback */
-+	struct list_head ptrack_list;
-+#endif
- };
- 
- static inline pid_t process_group(struct task_struct *tsk)
-Index: LINUX-SRC-TREE/ipc/shm.c
-===================================================================
---- LINUX-SRC-TREE.orig/ipc/shm.c
-+++ LINUX-SRC-TREE/ipc/shm.c
-@@ -27,6 +27,7 @@
- #include <linux/shmem_fs.h>
- #include <linux/security.h>
- #include <linux/audit.h>
-+#include <linux/module.h>
- #include <linux/trigevent_hooks.h>
- #include <asm/uaccess.h>
- 
-@@ -879,6 +880,44 @@ asmlinkage long sys_shmdt(char __user *s
- 	return audit_result(retval);
- }
- 
-+/*
-+ * Mark all segments created by this process for destruction
-+ */
-+int shm_cleanup (void)
-+{
-+	int i;
-+
-+	down(&shm_ids.sem);
-+
-+	for (i = 0; i <= shm_ids.max_id; i++) {
-+		struct shmid_kernel *shp;
-+
-+		shp = shm_lock(i);
-+		if (shp != NULL) {
-+			/* mark this segment for destruction if we created it */
-+			if (current->pid == shp->shm_cprid)
-+			{
-+				/* copy of IPC_RMID code */
-+				if (shp->shm_nattch) {
-+					shp->shm_flags |= SHM_DEST;
-+					/* do not find it any more */
-+					shp->shm_perm.key = IPC_PRIVATE;
-+				} else {
-+					shm_destroy(shp);
-+					continue;
-+				}
-+			}
-+
-+			shm_unlock(shp);
-+		}
-+	}
-+
-+	up(&shm_ids.sem);
-+
-+	return 0;
-+}
-+EXPORT_SYMBOL_GPL(shm_cleanup);
-+
- #ifdef CONFIG_PROC_FS
- static int sysvipc_shm_read_proc(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
- {
-Index: LINUX-SRC-TREE/kernel/exit.c
-===================================================================
---- LINUX-SRC-TREE.orig/kernel/exit.c
-+++ LINUX-SRC-TREE/kernel/exit.c
-@@ -40,6 +40,8 @@
- /* tng related changes */
- int (*tng_exitfunc)(int) = NULL;
- 
-+#include <linux/ptrack.h>
-+
- extern void sem_exit (void);
- extern struct task_struct *child_reaper;
- void (*do_eop_acct) (int, struct task_struct *);
-@@ -848,6 +850,8 @@ asmlinkage NORET_TYPE void do_exit(long 
- 		audit_exit(tsk, code);
- 	audit_free(tsk->audit);
- #endif
-+ 	/* Notify any ptrack callbacks of the process exit */
-+ 	ptrack_call_callbacks (PTRACK_PHASE_EXIT, NULL);
- 	__exit_mm(tsk);
- 
- 	if (unlikely(tng_exitfunc))
-Index: LINUX-SRC-TREE/kernel/fork.c
-===================================================================
---- LINUX-SRC-TREE.orig/kernel/fork.c
-+++ LINUX-SRC-TREE/kernel/fork.c
-@@ -14,6 +14,7 @@
- #include <linux/config.h>
- #include <linux/slab.h>
- #include <linux/init.h>
-+#include <linux/ptrack.h>
- #include <linux/unistd.h>
- #include <linux/smp_lock.h>
- #include <linux/module.h>
-@@ -432,6 +433,9 @@ static struct mm_struct * mm_init(struct
- 	mm->page_table_lock = SPIN_LOCK_UNLOCKED;
- 	mm->ioctx_list_lock = RW_LOCK_UNLOCKED;
- 	mm->ioctx_list = NULL;
-+#ifdef CONFIG_IOPROC
-+	mm->ioproc_ops = NULL;
-+#endif
- 	mm->default_kioctx = (struct kioctx)INIT_KIOCTX(mm->default_kioctx, *mm);
- 	mm->free_area_cache = TASK_UNMAPPED_BASE;
- 
-@@ -1276,6 +1280,11 @@ long do_fork(unsigned long clone_flags,
-          	      audit_fork(current, p);
- #endif
- 
-+		if (ptrack_call_callbacks(PTRACK_PHASE_CLONE, p)) {
-+			sigaddset(&p->pending.signal, SIGKILL);
-+			set_tsk_thread_flag(p, TIF_SIGPENDING);
-+		}
-+
- 		/* Trace the event  */
- 		TRIG_EVENT(fork_hook, clone_flags, p, pid);
- 		if (!(clone_flags & CLONE_STOPPED)) {
-Index: LINUX-SRC-TREE/kernel/Kconfig
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/kernel/Kconfig
-@@ -0,0 +1,14 @@
-+#
-+# Kernel subsystem specific config
-+# 
-+
-+# Support for Process Tracking callbacks
-+#
-+config PTRACK
-+	bool "Enable PTRACK process tracking hooks"
-+	default y
-+	help
-+	This option enables hooks to be called when processes are
-+	created and destoryed in order for a resource management 
-+	system to know which processes are a member of a "job" and 
-+	to be able to clean up when the job is terminated.
-Index: LINUX-SRC-TREE/kernel/Makefile
-===================================================================
---- LINUX-SRC-TREE.orig/kernel/Makefile
-+++ LINUX-SRC-TREE/kernel/Makefile
-@@ -29,6 +29,7 @@ obj-$(CONFIG_LTT) += ltt/
- obj-$(CONFIG_KPROBES) += kprobes.o
- obj-$(CONFIG_CPUSETS) += cpuset.o
- obj-$(CONFIG_CKRM_CPU_SCHEDULE) += ckrm_classqueue.o ckrm_sched.o
-+obj-$(CONFIG_PTRACK) += ptrack.o
- 
- ifneq ($(CONFIG_IA64),y)
- # According to Alan Modra <alan@linuxcare.com.au>, the -fno-omit-frame-pointer is
-Index: LINUX-SRC-TREE/kernel/ptrack.c
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/kernel/ptrack.c
-@@ -0,0 +1,145 @@
-+/*
-+ *    Copyright (C) 2000  Regents of the University of California
-+ *
-+ *    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  02111-1307  USA
-+ *
-+ * Derived from exit_actn.c by
-+ *    Copyright (C) 2003 Quadrics Ltd.
-+ */
-+
-+
-+#include <linux/module.h>
-+#include <linux/spinlock.h>
-+#include <linux/sched.h>
-+#include <linux/ptrack.h>
-+#include <linux/slab.h>
-+#include <linux/list.h>
-+
-+#include <asm/errno.h>
-+
-+int
-+ptrack_register (ptrack_callback_t callback, void *arg)
-+{
-+       struct ptrack_desc *desc = kmalloc (sizeof (struct ptrack_desc), GFP_KERNEL);
-+       
-+       if (desc == NULL)
-+               return -ENOMEM;
-+
-+	desc->callback = callback;
-+	desc->arg      = arg;
-+       
-+       list_add_tail (&desc->link, &current->ptrack_list);
-+       
-+       return 0;
-+}
-+
-+void
-+ptrack_deregister (ptrack_callback_t callback, void *arg)
-+{      
-+       struct list_head *el, *nel;
-+       
-+       list_for_each_safe (el, nel, &current->ptrack_list) {
-+               struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
-+               
-+               if (desc->callback == callback && desc->arg == arg) {
-+                       list_del (&desc->link);
-+                       kfree (desc);
-+               }
-+       }
-+}
-+
-+int
-+ptrack_registered (ptrack_callback_t callback, void *arg)
-+{
-+       struct list_head *el;
-+       
-+       list_for_each (el, &current->ptrack_list) {
-+               struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
-+               
-+               if (desc->callback == callback && desc->arg == arg)
-+                       return 1;
-+       }
-+       return 0;
-+}      
-+        
-+int
-+ptrack_call_callbacks (int phase, struct task_struct *child)
-+{
-+       struct list_head *el, *nel;
-+       struct ptrack_desc *new;
-+	int res;
-+
-+       if (phase == PTRACK_PHASE_CLONE)
-+               INIT_LIST_HEAD (&child->ptrack_list);
-+
-+       list_for_each_safe (el, nel, &current->ptrack_list) {
-+               struct ptrack_desc *desc = list_entry (el, struct ptrack_desc, link);
-+               
-+	       res = desc->callback (desc->arg, phase, child);
-+               
-+               switch (phase)
-+               {
-+               case PTRACK_PHASE_EXIT:
-+                       list_del (&desc->link);
-+                       kfree (desc);
-+                       break;
-+                       
-+               case PTRACK_PHASE_CLONE:
-+		       switch (res)
-+		       {
-+		       case PTRACK_FINISHED:
-+			       break;
-+
-+		       case PTRACK_INNHERIT:
-+			       if ((new = kmalloc (sizeof (struct ptrack_desc), GFP_ATOMIC)) == NULL)
-+			       {
-+				       /* allocation failed - notify that this process is not going
-+					* to be started by signalling clone failure.
-+					*/
-+				       desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child);
-+				       
-+				       goto failed;
-+			       }
-+
-+			       	new->callback = desc->callback;
-+				new->arg      = desc->arg;
-+                               
-+                               list_add_tail (&new->link, &child->ptrack_list);
-+			       break;
-+
-+		       case PTRACK_DENIED:
-+			       goto failed;
-+                       }
-+		       break;
-+               }
-+       }
-+
-+       return 0;
-+
-+ failed:
-+       while (! list_empty (&child->ptrack_list))
-+       {
-+	       struct ptrack_desc *desc = list_entry (child->ptrack_list.next, struct ptrack_desc, link);
-+	       
-+	       desc->callback (desc->arg, PTRACK_PHASE_CLONE_FAIL, child);
-+
-+	       list_del (&desc->link);
-+	       kfree (desc);
-+       }
-+       return 1;
-+}
-+EXPORT_SYMBOL(ptrack_register);
-+EXPORT_SYMBOL(ptrack_deregister);
-+EXPORT_SYMBOL(ptrack_registered);
-Index: LINUX-SRC-TREE/kernel/signal.c
-===================================================================
---- LINUX-SRC-TREE.orig/kernel/signal.c
-+++ LINUX-SRC-TREE/kernel/signal.c
-@@ -2315,6 +2315,7 @@ sys_tkill(int pid, int sig)
- 	read_unlock(&tasklist_lock);
- 	return audit_lresult(error);
- }
-+EXPORT_SYMBOL_GPL(sys_kill);
- 
- asmlinkage long
- sys_rt_sigqueueinfo(int pid, int sig, siginfo_t __user *uinfo)
-Index: LINUX-SRC-TREE/mm/fremap.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/fremap.c
-+++ LINUX-SRC-TREE/mm/fremap.c
-@@ -14,6 +14,7 @@
- #include <linux/swapops.h>
- #include <linux/objrmap.h>
- #include <linux/module.h>
-+#include <linux/ioproc.h>
- 
- #include <asm/mmu_context.h>
- #include <asm/cacheflush.h>
-@@ -29,6 +30,7 @@ static inline void zap_pte(struct mm_str
- 	if (pte_present(pte)) {
- 		unsigned long pfn = pte_pfn(pte);
- 
-+		ioproc_invalidate_page(vma, addr);
- 		flush_cache_page(vma, addr);
- 		pte = ptep_clear_flush(vma, addr, ptep);
- 		if (pfn_valid(pfn)) {
-@@ -80,6 +82,7 @@ int install_page(struct mm_struct *mm, s
- 	pte_val = *pte;
- 	pte_unmap(pte);
- 	update_mmu_cache(vma, addr, pte_val);
-+	ioproc_update_page(vma, addr);
- 
- 	err = 0;
- err_unlock:
-@@ -118,6 +121,7 @@ int install_file_pte(struct mm_struct *m
- 	pte_val = *pte;
- 	pte_unmap(pte);
- 	update_mmu_cache(vma, addr, pte_val);
-+	ioproc_update_page(vma, addr);
- 	spin_unlock(&mm->page_table_lock);
- 	return 0;
- 
-Index: LINUX-SRC-TREE/mm/ioproc.c
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/mm/ioproc.c
-@@ -0,0 +1,58 @@
-+/* -*- linux-c -*-
-+ *
-+ *    Copyright (C) 2002-2004 Quadrics Ltd.
-+ *
-+ *    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  02111-1307  USA
-+ *
-+ *
-+ */
-+
-+/*
-+ * Registration for IO processor page table updates.
-+ */
-+
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+
-+#include <linux/mm.h>
-+#include <linux/ioproc.h>
-+
-+int
-+ioproc_register_ops(struct mm_struct *mm, struct ioproc_ops *ip)
-+{
-+	ip->next = mm->ioproc_ops;
-+	mm->ioproc_ops = ip;
-+
-+	return 0;
-+}
-+
-+EXPORT_SYMBOL_GPL(ioproc_register_ops);
-+
-+int
-+ioproc_unregister_ops(struct mm_struct *mm, struct ioproc_ops *ip)
-+{
-+	struct ioproc_ops **tmp;
-+
-+	for (tmp = &mm->ioproc_ops; *tmp && *tmp != ip; tmp= &(*tmp)->next)
-+		;
-+	if (*tmp) {
-+		*tmp = ip->next;
-+		return 0;
-+	}
-+
-+	return -EINVAL;
-+}
-+
-+EXPORT_SYMBOL_GPL(ioproc_unregister_ops);
-Index: LINUX-SRC-TREE/mm/Kconfig
-===================================================================
---- /dev/null
-+++ LINUX-SRC-TREE/mm/Kconfig
-@@ -0,0 +1,15 @@
-+#
-+# VM subsystem specific config
-+# 
-+
-+# Support for IO processors which have advanced RDMA capabilities
-+#
-+config IOPROC
-+	bool "Enable IOPROC VM hooks"
-+	depends on MMU
-+	default y
-+	help
-+	This option enables hooks in the VM subsystem so that IO devices which
-+	incorporate advanced RDMA capabilities can be kept in sync with CPU 
-+	page table changes.
-+	See Documentation/vm/ioproc.txt for more details.
-Index: LINUX-SRC-TREE/mm/Makefile
-===================================================================
---- LINUX-SRC-TREE.orig/mm/Makefile
-+++ LINUX-SRC-TREE/mm/Makefile
-@@ -15,4 +15,5 @@ obj-y			:= bootmem.o filemap.o mempool.o
- obj-$(CONFIG_SWAP)	+= page_io.o swap_state.o swapfile.o
- obj-$(CONFIG_PROC_MM)	+= proc_mm.o
- obj-$(CONFIG_NUMA) 	+= policy.o
-+obj-$(CONFIG_IOPROC)    += ioproc.o
- 
-Index: LINUX-SRC-TREE/mm/memory.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/memory.c
-+++ LINUX-SRC-TREE/mm/memory.c
-@@ -43,6 +43,7 @@
- #include <linux/swap.h>
- #include <linux/highmem.h>
- #include <linux/pagemap.h>
-+#include <linux/ioproc.h>
- #include <linux/objrmap.h>
- #include <linux/module.h>
- #include <linux/acct.h>
-@@ -627,6 +628,7 @@ void zap_page_range(struct vm_area_struc
- 
- 	lru_add_drain();
- 	spin_lock(&mm->page_table_lock);
-+ 	ioproc_invalidate_range(vma, address, end);
- 	tlb = tlb_gather_mmu(mm, 0);
- 	unmap_vmas(&tlb, mm, vma, address, end, &nr_accounted, details);
- 	tlb_finish_mmu(tlb, address, end);
-@@ -927,6 +929,7 @@ int zeromap_page_range(struct vm_area_st
- 		BUG();
- 
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, beg, end);
- 	do {
- 		pmd_t *pmd = pmd_alloc(mm, dir, address);
- 		error = -ENOMEM;
-@@ -941,6 +944,7 @@ int zeromap_page_range(struct vm_area_st
- 	/*
- 	 * Why flush? zeromap_pte_range has a BUG_ON for !pte_none()
- 	 */
-+	ioproc_update_range(vma, beg, end);
- 	flush_tlb_range(vma, beg, end);
- 	spin_unlock(&mm->page_table_lock);
- 	return error;
-@@ -1011,6 +1015,7 @@ int remap_page_range(struct vm_area_stru
- 		BUG();
- 
- 	spin_lock(&mm->page_table_lock);
-+	ioproc_invalidate_range(vma, beg, end);
- 	do {
- 		pmd_t *pmd = pmd_alloc(mm, dir, from);
- 		error = -ENOMEM;
-@@ -1025,6 +1030,7 @@ int remap_page_range(struct vm_area_stru
- 	/*
- 	 * Why flush? remap_pte_range has a BUG_ON for !pte_none()
- 	 */
-+	ioproc_update_range(vma, beg, end);
- 	flush_tlb_range(vma, beg, end);
- 	spin_unlock(&mm->page_table_lock);
- 	return error;
-@@ -1098,6 +1104,7 @@ static int do_wp_page(struct mm_struct *
- 			update_mmu_cache(vma, address, entry);
- 			lazy_mmu_prot_update(entry);
- 			pte_unmap(page_table);
-+			ioproc_update_page(vma, address);
- 			spin_unlock(&mm->page_table_lock);
- 			return VM_FAULT_MINOR;
- 		}
-@@ -1133,6 +1140,7 @@ static int do_wp_page(struct mm_struct *
- 		}
- 
- 		page_remove_rmap(old_page);
-+		ioproc_invalidate_page(vma, address);
- 		break_cow(vma, new_page, address, page_table);
- 		page_add_rmap(new_page, vma, address, 1);
- 		lru_cache_add_active(new_page);
-@@ -1141,6 +1149,7 @@ static int do_wp_page(struct mm_struct *
- 		new_page = old_page;
- 	}
- 	pte_unmap(page_table);
-+	ioproc_update_page(vma, address);
- 	page_cache_release(new_page);
- 	page_cache_release(old_page);
- 	spin_unlock(&mm->page_table_lock);
-@@ -1376,6 +1385,7 @@ static int do_swap_page(struct mm_struct
- 	int ret;
- 
- 	pte_unmap(page_table);
-+	ioproc_update_page(vma, address);
- 	spin_unlock(&mm->page_table_lock);
- 
- 	BUG_ON(!vma->anon_vma);
-@@ -1508,6 +1518,7 @@ do_anonymous_page(struct mm_struct *mm, 
- 
- 	/* No need to invalidate - it was non-present before */
- 	update_mmu_cache(vma, addr, entry);
-+	ioproc_update_page(vma, addr);
- 	spin_unlock(&mm->page_table_lock);
- 	ret = VM_FAULT_MINOR;
- 
-@@ -1658,6 +1669,7 @@ retry:
- 
- 	/* no need to invalidate: a not-present page shouldn't be cached */
- 	update_mmu_cache(vma, address, entry);
-+	ioproc_update_page(vma, address);
- 	spin_unlock(&mm->page_table_lock);
-  out:
-	return ret;
-@@ -1771,6 +1783,7 @@ static inline int handle_pte_fault(struc
- 	spin_unlock(&mm->page_table_lock);
- 	return VM_FAULT_MINOR;
- }
-+EXPORT_SYMBOL_GPL(make_pages_present);
- 
- 
- /* Can be overwritten by the architecture */
-Index: LINUX-SRC-TREE/mm/mmap.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/mmap.c
-+++ LINUX-SRC-TREE/mm/mmap.c
-@@ -25,6 +25,7 @@
- #include <linux/init.h>
- #include <linux/file.h>
- #include <linux/fs.h>
-+#include <linux/ioproc.h>
- #include <linux/personality.h>
- #include <linux/security.h>
- #include <linux/hugetlb.h>
-@@ -1389,6 +1390,7 @@ static void unmap_region(struct mm_struc
- 	unsigned long nr_accounted = 0;
- 
- 	lru_add_drain();
-+	ioproc_invalidate_range(vma, start, end);
- 	tlb = tlb_gather_mmu(mm, 0);
- 	unmap_vmas(&tlb, mm, vma, start, end, &nr_accounted, NULL);
- 	vm_unacct_memory(nr_accounted);
-@@ -1713,6 +1715,7 @@ void exit_mmap(struct mm_struct *mm)
- 
- 	spin_lock(&mm->page_table_lock);
- 
-+	ioproc_release(mm);
- 	tlb = tlb_gather_mmu(mm, 1);
- 	flush_cache_mm(mm);
- 	/* Use ~0UL here to ensure all VMAs in the mm are unmapped */
-Index: LINUX-SRC-TREE/mm/mprotect.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/mprotect.c
-+++ LINUX-SRC-TREE/mm/mprotect.c
-@@ -10,6 +10,7 @@
- 
- #include <linux/mm.h>
- #include <linux/hugetlb.h>
-+#include <linux/ioproc.h>
- #include <linux/slab.h>
- #include <linux/shm.h>
- #include <linux/mman.h>
-@@ -101,6 +102,7 @@ change_protection(struct vm_area_struct 
- 	if (start >= end)
- 		BUG();
- 	spin_lock(&current->mm->page_table_lock);
-+	ioproc_change_protection(vma, start, end, newprot);
- 	do {
- 		change_pmd_range(dir, start, end - start, newprot);
- 		start = (start + PGDIR_SIZE) & PGDIR_MASK;
-Index: LINUX-SRC-TREE/mm/mremap.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/mremap.c
-+++ LINUX-SRC-TREE/mm/mremap.c
-@@ -9,6 +9,7 @@
- 
- #include <linux/mm.h>
- #include <linux/hugetlb.h>
-+#include <linux/ioproc.h>
- #include <linux/slab.h>
- #include <linux/shm.h>
- #include <linux/mman.h>
-@@ -144,6 +145,8 @@ static int move_page_tables(struct vm_ar
- {
- 	unsigned long offset = len;
- 
-+	ioproc_invalidate_range(vma, old_addr, old_addr + len);
-+	ioproc_invalidate_range(vma, new_addr, new_addr + len);
- 	flush_cache_range(vma, old_addr, old_addr + len);
- 
- 	/*
-Index: LINUX-SRC-TREE/mm/msync.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/msync.c
-+++ LINUX-SRC-TREE/mm/msync.c
-@@ -12,6 +12,7 @@
- #include <linux/mm.h>
- #include <linux/mman.h>
- #include <linux/hugetlb.h>
-+#include <linux/ioproc.h>
- 
- #include <asm/pgtable.h>
- #include <asm/pgalloc.h>
-@@ -116,6 +117,7 @@ static int filemap_sync(struct vm_area_s
- 
- 	if (address >= end)
- 		BUG();
-+	ioproc_sync_range(vma, address, end);
- 	do {
- 		error |= filemap_sync_pmd_range(dir, address, end, vma, flags);
- 		address = (address + PGDIR_SIZE) & PGDIR_MASK;
-Index: LINUX-SRC-TREE/mm/objrmap.c
-===================================================================
---- LINUX-SRC-TREE.orig/mm/objrmap.c
-+++ LINUX-SRC-TREE/mm/objrmap.c
-@@ -29,6 +29,7 @@
- #include <linux/swapops.h>
- #include <linux/objrmap.h>
- #include <linux/init.h>
-+#include <linux/ioproc.h>
- #include <asm/tlbflush.h>
- 
- kmem_cache_t * anon_vma_cachep;
-@@ -393,6 +394,8 @@ unmap_pte_page(struct page * page, struc
- {
- 	pte_t pteval;
- 
-+	ioproc_invalidate_page(vma, address);
-+
- 	flush_cache_page(vma, address);
- 	pteval = ptep_clear_flush(vma, address, pte);
- 
diff --git a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch b/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch
deleted file mode 100644
index 576765c68baa276b63a3cf664d161f2523d71148..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-core.patch
+++ /dev/null
@@ -1,1261 +0,0 @@
-From: Jan Kara <jack@suse.cz>
-
-The four patches in this series fix deadlocks with quotas of pagelock (the
-problem was lock inversion on PageLock and transaction start - quota code
-needed to first start a transaction and then write the data which subsequently
-needed acquisition of PageLock while the standard ordering - PageLock first
-and transaction start later - was used e.g.  by pdflush).  They implement a
-new way of quota access to disk: Every filesystem that would like to implement
-quotas now has to provide quota_read() and quota_write() functions.  These
-functions must obey quota lock ordering (in particular they should not take
-PageLock inside a transaction).
-
-The first patch implements the changes in the quota core, the other three
-patches implement needed functions in ext2, ext3 and reiserfs.  The patch for
-reiserfs also fixes several other lock inversion problems (similar as ext3
-had) and implements the journaled quota functionality (which comes almost for
-free after the locking fixes...).
-
-The quota core patch makes quota support in other filesystems (except XFS
-which implements everything on its own ;)) unfunctional (quotaon() will refuse
-to turn on quotas on them).  When the patches get reasonable wide testing and
-it will seem that no major changes will be needed I can make fixes also for
-the other filesystems (JFS, UDF, UFS).
-
-This patch:
-
-The patch implements the new way of quota io in the quota core.  Every
-filesystem wanting to support quotas has to provide functions quota_read()
-and quota_write() obeying quota locking rules.  As the writes and reads
-bypass the pagecache there is some ugly stuff ensuring that userspace can
-see all the data after quotaoff() (or Q_SYNC quotactl).  In future I plan
-to make quota files inaccessible from userspace (with the exception of
-quotacheck(8) which will take care about the cache flushing and such stuff
-itself) so that this synchronization stuff can be removed...
-
-The rewrite of the quota core. Quota uses the filesystem read() and write()
-functions no more to avoid possible deadlocks on PageLock. From now on every
-filesystem supporting quotas must provide functions quota_read() and
-quota_write() which obey the quota locking rules (e.g. they cannot acquire the
-PageLock).
-
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
----
-
- 25-akpm/fs/dquot.c               |  162 +++++++++++++--------------
- 25-akpm/fs/quota.c               |   45 +++++++
- 25-akpm/fs/quota_v1.c            |   62 ++--------
- 25-akpm/fs/quota_v2.c            |  227 +++++++++++++++++----------------------
- 25-akpm/include/linux/fs.h       |    3 
- 25-akpm/include/linux/quota.h    |    2 
- 25-akpm/include/linux/security.h |    8 -
- 25-akpm/security/dummy.c         |    2 
- 25-akpm/security/selinux/hooks.c |    4 
- 9 files changed, 247 insertions(+), 268 deletions(-)
-
-diff -rup RH_2_6_9_55.orig/fs/dquot.c RH_2_6_9_55/fs/dquot.c
---- RH_2_6_9_55.orig/fs/dquot.c
-+++ RH_2_6_9_55/fs/dquot.c
-@@ -49,7 +49,7 @@
-  *		New SMP locking.
-  *		Jan Kara, <jack@suse.cz>, 10/2002
-  *
-- *		Added journalled quota support
-+ *		Added journalled quota support, fix lock inversion problems
-  *		Jan Kara, <jack@suse.cz>, 2003,2004
-  *
-  * (C) Copyright 1994 - 1997 Marco van Wieringen 
-@@ -75,7 +75,8 @@
- #include <linux/proc_fs.h>
- #include <linux/security.h>
- #include <linux/kmod.h>
--#include <linux/pagemap.h>
-+#include <linux/namei.h>
-+#include <linux/buffer_head.h>
- 
- #include <asm/uaccess.h>
- 
-@@ -114,7 +115,7 @@
-  * operations on dquots don't hold dq_lock as they copy data under dq_data_lock
-  * spinlock to internal buffers before writing.
-  *
-- * Lock ordering (including related VFS locks) is following:
-+ * Lock ordering (including related VFS locks) is the following:
-  *   i_sem > dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > 
-  *   dqio_sem
-  * i_sem on quota files is special (it's below dqio_sem)
-@@ -183,8 +184,7 @@ static void put_quota_format(struct quot
-  * on all three lists, depending on its current state.
-  *
-  * All dquots are placed to the end of inuse_list when first created, and this
-- * list is used for the sync and invalidate operations, which must look
-- * at every dquot.
-+ * list is used for invalidate operation, which must look at every dquot.
-  *
-  * Unused dquots (dq_count == 0) are added to the free_dquots list when freed,
-  * and this list is searched whenever we need an available dquot.  Dquots are
-@@ -1341,10 +1341,12 @@ int vfs_quota_off(struct super_block *sb
- {
- 	int cnt;
- 	struct quota_info *dqopt = sb_dqopt(sb);
-+	struct inode *toput[MAXQUOTAS];
- 
- 	/* We need to serialize quota_off() for device */
- 	down(&dqopt->dqonoff_sem);
- 	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-+		toput[cnt] = NULL;
- 		if (type != -1 && cnt != type)
- 			continue;
- 		if (!sb_has_quota_enabled(sb, cnt))
-@@ -1364,7 +1366,7 @@ int vfs_quota_off(struct super_block *sb
- 			dqopt->ops[cnt]->free_file_info(sb, cnt);
- 		put_quota_format(dqopt->info[cnt].dqi_format);
- 
--		fput(dqopt->files[cnt]);
-+		toput[cnt] = dqopt->files[cnt];
- 		dqopt->files[cnt] = NULL;
- 		dqopt->info[cnt].dqi_flags = 0;
- 		dqopt->info[cnt].dqi_igrace = 0;
-@@ -1372,6 +1374,26 @@ int vfs_quota_off(struct super_block *sb
- 		dqopt->ops[cnt] = NULL;
- 	}
- 	up(&dqopt->dqonoff_sem);
-+	/* Sync the superblock so that buffers with quota data are written to
-+         * disk (and so userspace sees correct data afterwards) */
-+	if (sb->s_op->sync_fs)
-+		sb->s_op->sync_fs(sb, 1);
-+	sync_blockdev(sb->s_bdev);
-+	/* Now the quota files are just ordinary files and we can set the
-+	 * inode flags back. Moreover we discard the pagecache so that
-+	 * userspace sees the writes we did bypassing the pagecache. We
-+	 * must also discard the blockdev buffers so that we see the
-+	 * changes done by userspace on the next quotaon() */
-+	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
-+		if (toput[cnt]) {
-+			down(&toput[cnt]->i_sem);
-+			toput[cnt]->i_flags &= ~(S_IMMUTABLE | S_NOATIME | S_NOQUOTA);
-+			truncate_inode_pages(&toput[cnt]->i_data, 0);
-+			up(&toput[cnt]->i_sem);
-+			mark_inode_dirty(toput[cnt]);
-+			iput(toput[cnt]);
-+		}
-+	invalidate_bdev(sb->s_bdev, 0);
- 	return 0;
- }
- 
-@@ -1379,68 +1401,56 @@ int vfs_quota_off(struct super_block *sb
-  *	Turn quotas on on a device
-  */
- 
--/* Helper function when we already have file open */
--static int vfs_quota_on_file(struct file *f, int type, int format_id)
-+/* Helper function when we already have the inode */
-+static int vfs_quota_on_inode(struct inode *inode, int type, int format_id)
- {
- 	struct quota_format_type *fmt = find_quota_format(format_id);
--	struct inode *inode;
--	struct super_block *sb = f->f_dentry->d_sb;
-+	struct super_block *sb = inode->i_sb;
- 	struct quota_info *dqopt = sb_dqopt(sb);
--	struct dquot *to_drop[MAXQUOTAS];
--	int error, cnt;
--	unsigned int oldflags = -1;
-+	int error;
-+	int oldflags = -1;
- 
- 	if (!fmt)
- 		return -ESRCH;
--	error = -EIO;
--	if (!f->f_op || !f->f_op->read || !f->f_op->write)
-+	if (!S_ISREG(inode->i_mode)) {
-+		error = -EACCES;
- 		goto out_fmt;
--	inode = f->f_dentry->d_inode;
--	error = -EACCES;
--	if (!S_ISREG(inode->i_mode))
-+	}
-+	if (IS_RDONLY(inode)) {
-+		error = -EROFS;
-+		goto out_fmt;
-+	}
-+	if (!sb->s_op->quota_write || !sb->s_op->quota_read) {
-+		error = -EINVAL;
- 		goto out_fmt;
-+	}
- 
-+	/* As we bypass the pagecache we must now flush the inode so that
-+	 * we see all the changes from userspace... */
-+	write_inode_now(inode, 1);
-+	/* And now flush the block cache so that kernel sees the changes */
-+	invalidate_bdev(sb->s_bdev, 0);
- 	down(&inode->i_sem);
- 	down(&dqopt->dqonoff_sem);
- 	if (sb_has_quota_enabled(sb, type)) {
--		up(&inode->i_sem);
- 		error = -EBUSY;
- 		goto out_lock;
- 	}
- 	/* We don't want quota and atime on quota files (deadlocks possible)
--	 * We also need to set GFP mask differently because we cannot recurse
--	 * into filesystem when allocating page for quota inode */
-+	 * Also nobody should write to the file - we use special IO operations
-+	 * which ignore the immutable bit. */
- 	down_write(&dqopt->dqptr_sem);
--	oldflags = inode->i_flags & (S_NOATIME | S_NOQUOTA);
--	inode->i_flags |= S_NOQUOTA | S_NOATIME;
-+	oldflags = inode->i_flags & (S_NOATIME | S_IMMUTABLE | S_NOQUOTA);
-+	inode->i_flags |= S_NOQUOTA | S_NOATIME | S_IMMUTABLE;
- 	up_write(&dqopt->dqptr_sem);
--	up(&inode->i_sem);
- 
--	dqopt->files[type] = f;
-+	error = -EIO;
-+	dqopt->files[type] = igrab(inode);
-+	if (!dqopt->files[type])
-+		goto out_lock;
- 	error = -EINVAL;
- 	if (!fmt->qf_ops->check_quota_file(sb, type))
- 		goto out_file_init;
--	/*
--	 * We write to quota files deep within filesystem code.  We don't want
--	 * the VFS to reenter filesystem code when it tries to allocate a
--	 * pagecache page for the quota file write.  So clear __GFP_FS in
--	 * the quota file's allocation flags.
--	 */
--	mapping_set_gfp_mask(inode->i_mapping,
--		mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS);
--
--	down_write(&dqopt->dqptr_sem);
--	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
--		to_drop[cnt] = inode->i_dquot[cnt];
--		inode->i_dquot[cnt] = NODQUOT;
--	}
--	up_write(&dqopt->dqptr_sem);
--	/* We must put dquots outside of dqptr_sem because we may need to
--	 * start transaction for dquot_release() */
--	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
--		if (to_drop[cnt])
--			dqput(to_drop[cnt]);
--	}
- 
- 	dqopt->ops[type] = fmt->qf_ops;
- 	dqopt->info[type].dqi_format = fmt;
-@@ -1451,6 +1461,7 @@ static int vfs_quota_on_file(struct file
- 		goto out_file_init;
- 	}
- 	up(&dqopt->dqio_sem);
-+	up(&inode->i_sem);
- 	set_enable_flags(dqopt, type);
- 
- 	add_dquot_ref(sb, type);
-@@ -1460,19 +1471,18 @@ static int vfs_quota_on_file(struct file
- 
- out_file_init:
- 	dqopt->files[type] = NULL;
-+	iput(inode);
- out_lock:
- 	up(&dqopt->dqonoff_sem);
- 	if (oldflags != -1) {
--		down(&inode->i_sem);
- 		down_write(&dqopt->dqptr_sem);
--		/* Reset the NOATIME flag back. I know it could change in the
--		 * mean time but playing with NOATIME flags on a quota file is
--		 * never a good idea */
--		inode->i_flags &= ~(S_NOATIME | S_NOQUOTA);
-+		/* Set the flags back (in the case of accidental quotaon()
-+		 * on a wrong file we don't want to mess up the flags) */
-+		inode->i_flags &= ~(S_NOATIME | S_NOQUOTA | S_IMMUTABLE);
- 		inode->i_flags |= oldflags;
- 		up_write(&dqopt->dqptr_sem);
--		up(&inode->i_sem);
- 	}
-+	up(&inode->i_sem);
- out_fmt:
- 	put_quota_format(fmt);
- 
-@@ -1482,47 +1492,37 @@ out_fmt:
- /* Actual function called from quotactl() */
- int vfs_quota_on(struct super_block *sb, int type, int format_id, char *path)
- {
--	struct file *f;
-+	struct nameidata nd;
- 	int error;
- 
--	f = filp_open(path, O_RDWR, 0600);
--	if (IS_ERR(f))
--		return PTR_ERR(f);
--	error = security_quota_on(f);
-+	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
-+	if (error < 0)
-+		return error;
-+	error = security_quota_on(nd.dentry);
- 	if (error)
--		goto out_f;
--	error = vfs_quota_on_file(f, type, format_id);
--	if (!error)
--		return 0;
--out_f:
--	filp_close(f, NULL);
-+		goto out_path;
-+	/* Quota file not on the same filesystem? */
-+	if (nd.mnt->mnt_sb != sb)
-+		error = -EXDEV;
-+	else
-+		error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id);
-+out_path:
-+	path_release(&nd);
- 	return error;
- }
- 
- /*
-- * Function used by filesystems when filp_open() would fail (filesystem is
-- * being mounted now). We will use a private file structure. Caller is
-- * responsible that it's IO functions won't need vfsmnt structure or
-- * some dentry tricks...
-+ * This function is used when filesystem needs to initialize quotas
-+ * during mount time.
-  */
- int vfs_quota_on_mount(int type, int format_id, struct dentry *dentry)
- {
--	struct file *f;
- 	int error;
- 
--	dget(dentry);	/* Get a reference for struct file */
--	f = dentry_open(dentry, NULL, O_RDWR);
--	if (IS_ERR(f)) {
--		error = PTR_ERR(f);
--		goto out_dentry;
--	}
--	error = vfs_quota_on_file(f, type, format_id);
--	if (!error)
--		return 0;
--	fput(f);
--out_dentry:
--	dput(dentry);
--	return error;
-+	error = security_quota_on(dentry);
-+	if (error)
-+		return error;
-+	return vfs_quota_on_inode(dentry->d_inode, type, format_id);
- }
- 
- /* Generic routine for getting common part of quota structure */
-diff -rup RH_2_6_9_55.orig/fs/quota.c RH_2_6_9_55/fs/quota.c
---- RH_2_6_9_55.orig/fs/quota.c
-+++ RH_2_6_9_55/fs/quota.c
-@@ -13,6 +13,8 @@
- #include <linux/kernel.h>
- #include <linux/smp_lock.h>
- #include <linux/security.h>
-+#include <linux/syscalls.h>
-+#include <linux/buffer_head.h>
-
- /* Check validity of quotactl */
- static int check_quotactl_valid(struct super_block *sb, int type, int cmd, qid_t id)
-@@ -134,16 +136,54 @@ restart:
- 	return NULL;
- }
- 
-+void quota_sync_sb(struct super_block *sb, int type)
-+{
-+	int cnt;
-+	struct inode *discard[MAXQUOTAS];
-+
-+	sb->s_qcop->quota_sync(sb, type);
-+	/* This is not very clever (and fast) but currently I don't know about
-+	 * any other simple way of getting quota data to disk and we must get
-+	 * them there for userspace to be visible... */
-+	if (sb->s_op->sync_fs)
-+		sb->s_op->sync_fs(sb, 1);
-+	sync_blockdev(sb->s_bdev);
-+
-+	/* Now when everything is written we can discard the pagecache so
-+	 * that userspace sees the changes. We need i_sem and so we could
-+	 * not do it inside dqonoff_sem. Moreover we need to be carefull
-+	 * about races with quotaoff() (that is the reason why we have own
-+	 * reference to inode). */
-+	down(&sb_dqopt(sb)->dqonoff_sem);
-+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-+		discard[cnt] = NULL;
-+		if (type != -1 && cnt != type)
-+			continue;
-+		if (!sb_has_quota_enabled(sb, cnt))
-+			continue;
-+		discard[cnt] = igrab(sb_dqopt(sb)->files[cnt]);
-+	}
-+	up(&sb_dqopt(sb)->dqonoff_sem);
-+	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-+		if (discard[cnt]) {
-+			down(&discard[cnt]->i_sem);
-+			truncate_inode_pages(&discard[cnt]->i_data, 0);
-+			up(&discard[cnt]->i_sem);
-+			iput(discard[cnt]);
-+		}
-+	}
-+}
-+
- void sync_dquots(struct super_block *sb, int type)
- {
- 	if (sb) {
- 		if (sb->s_qcop->quota_sync)
--			sb->s_qcop->quota_sync(sb, type);
-+			quota_sync_sb(sb, type);
- 	}
- 	else {
--		while ((sb = get_super_to_sync(type)) != 0) {
-+		while ((sb = get_super_to_sync(type)) != NULL) {
- 			if (sb->s_qcop->quota_sync)
--				sb->s_qcop->quota_sync(sb, type);
-+				quota_sync_sb(sb, type);
- 			drop_super(sb);
- 		}
- 	}
-diff -rup RH_2_6_9_55.orig/fs/quota_v1.c RH_2_6_9_55/fs/quota_v1.c
---- RH_2_6_9_55.orig/fs/quota_v1.c
-+++ RH_2_6_9_55/fs/quota_v1.c
-@@ -7,7 +7,6 @@
- #include <linux/init.h>
- #include <linux/module.h>
- 
--#include <asm/uaccess.h>
- #include <asm/byteorder.h>
- 
- MODULE_AUTHOR("Jan Kara");
-@@ -41,23 +40,14 @@ static void v1_mem2disk_dqblk(struct v1_
- static int v1_read_dqblk(struct dquot *dquot)
- {
- 	int type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
--	loff_t offset;
- 	struct v1_disk_dqblk dqblk;
- 
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--	if (filp == (struct file *)NULL)
-+	if (!sb_dqopt(dquot->dq_sb)->files[type])
- 		return -EINVAL;
- 
--	/* Now we are sure filp is valid */
--	offset = v1_dqoff(dquot->dq_id);
- 	/* Set structure to 0s in case read fails/is after end of file */
- 	memset(&dqblk, 0, sizeof(struct v1_disk_dqblk));
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
--	set_fs(fs);
-+	dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
- 
- 	v1_disk2mem_dqblk(&dquot->dq_dqb, &dqblk);
- 	if (dquot->dq_dqb.dqb_bhardlimit == 0 && dquot->dq_dqb.dqb_bsoftlimit == 0 &&
-@@ -71,26 +61,18 @@ static int v1_read_dqblk(struct dquot *d
- static int v1_commit_dqblk(struct dquot *dquot)
- {
- 	short type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
--	loff_t offset;
- 	ssize_t ret;
- 	struct v1_disk_dqblk dqblk;
- 
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--	offset = v1_dqoff(dquot->dq_id);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--
- 	v1_mem2disk_dqblk(&dqblk, &dquot->dq_dqb);
- 	if (dquot->dq_id == 0) {
- 		dqblk.dqb_btime = sb_dqopt(dquot->dq_sb)->info[type].dqi_bgrace;
- 		dqblk.dqb_itime = sb_dqopt(dquot->dq_sb)->info[type].dqi_igrace;
- 	}
- 	ret = 0;
--	if (filp)
--		ret = filp->f_op->write(filp, (char *)&dqblk,
--					sizeof(struct v1_disk_dqblk), &offset);
-+	if (sb_dqopt(dquot->dq_sb)->files[type])
-+		ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type, (char *)&dqblk,
-+					sizeof(struct v1_disk_dqblk), v1_dqoff(dquot->dq_id));
- 	if (ret != sizeof(struct v1_disk_dqblk)) {
- 		printk(KERN_WARNING "VFS: dquota write failed on dev %s\n",
- 			dquot->dq_sb->s_id);
-@@ -101,7 +83,6 @@ static int v1_commit_dqblk(struct dquot 
- 	ret = 0;
- 
- out:
--	set_fs(fs);
- 	dqstats.writes++;
- 
- 	return ret;
-@@ -121,14 +102,11 @@ struct v2_disk_dqheader {
- 
- static int v1_check_quota_file(struct super_block *sb, int type)
- {
--	struct file *f = sb_dqopt(sb)->files[type];
--	struct inode *inode = f->f_dentry->d_inode;
-+	struct inode *inode = sb_dqopt(sb)->files[type];
- 	ulong blocks;
- 	size_t off; 
- 	struct v2_disk_dqheader dqhead;
--	mm_segment_t fs;
- 	ssize_t size;
--	loff_t offset = 0;
- 	loff_t isize;
- 	static const uint quota_magics[] = V2_INITQMAGICS;
- 
-@@ -140,10 +118,7 @@ static int v1_check_quota_file(struct su
- 	if ((blocks % sizeof(struct v1_disk_dqblk) * BLOCK_SIZE + off) % sizeof(struct v1_disk_dqblk))
- 		return 0;
- 	/* Doublecheck whether we didn't get file with new format - with old quotactl() this could happen */
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset);
--	set_fs(fs);
-+	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
- 	if (size != sizeof(struct v2_disk_dqheader))
- 		return 1;	/* Probably not new format */
- 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type])
-@@ -155,16 +130,10 @@ static int v1_check_quota_file(struct su
- static int v1_read_file_info(struct super_block *sb, int type)
- {
- 	struct quota_info *dqopt = sb_dqopt(sb);
--	mm_segment_t fs;
--	loff_t offset;
--	struct file *filp = dqopt->files[type];
- 	struct v1_disk_dqblk dqblk;
- 	int ret;
- 
--	offset = v1_dqoff(0);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) {
-+	if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk, sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) {
- 		if (ret >= 0)
- 			ret = -EIO;
- 		goto out;
-@@ -173,38 +142,31 @@ static int v1_read_file_info(struct supe
- 	dqopt->info[type].dqi_igrace = dqblk.dqb_itime ? dqblk.dqb_itime : MAX_IQ_TIME;
- 	dqopt->info[type].dqi_bgrace = dqblk.dqb_btime ? dqblk.dqb_btime : MAX_DQ_TIME;
- out:
--	set_fs(fs);
- 	return ret;
- }
- 
- static int v1_write_file_info(struct super_block *sb, int type)
- {
- 	struct quota_info *dqopt = sb_dqopt(sb);
--	mm_segment_t fs;
--	struct file *filp = dqopt->files[type];
- 	struct v1_disk_dqblk dqblk;
--	loff_t offset;
- 	int ret;
- 
- 	dqopt->info[type].dqi_flags &= ~DQF_INFO_DIRTY;
--	offset = v1_dqoff(0);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	if ((ret = filp->f_op->read(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset)) != sizeof(struct v1_disk_dqblk)) {
-+	if ((ret = sb->s_op->quota_read(sb, type, (char *)&dqblk,
-+	    sizeof(struct v1_disk_dqblk), v1_dqoff(0))) != sizeof(struct v1_disk_dqblk)) {
- 		if (ret >= 0)
- 			ret = -EIO;
- 		goto out;
- 	}
- 	dqblk.dqb_itime = dqopt->info[type].dqi_igrace;
- 	dqblk.dqb_btime = dqopt->info[type].dqi_bgrace;
--	offset = v1_dqoff(0);
--	ret = filp->f_op->write(filp, (char *)&dqblk, sizeof(struct v1_disk_dqblk), &offset);
-+	ret = sb->s_op->quota_write(sb, type, (char *)&dqblk,
-+	      sizeof(struct v1_disk_dqblk), v1_dqoff(0));
- 	if (ret == sizeof(struct v1_disk_dqblk))
- 		ret = 0;
- 	else if (ret > 0)
- 		ret = -EIO;
- out:
--	set_fs(fs);
- 	return ret;
- }
- 
-diff -rup RH_2_6_9_55.orig/fs/quota_v2.c RH_2_6_9_55/fs/quota_v2.c
---- RH_2_6_9_55.orig/fs/quota_v2.c
-+++ RH_2_6_9_55/fs/quota_v2.c
-@@ -13,7 +13,6 @@
- #include <linux/slab.h>
- 
- #include <asm/byteorder.h>
--#include <asm/uaccess.h>
- 
- MODULE_AUTHOR("Jan Kara");
- MODULE_DESCRIPTION("Quota format v2 support");
-@@ -30,19 +29,15 @@ typedef char *dqbuf_t;
- static int v2_check_quota_file(struct super_block *sb, int type)
- {
- 	struct v2_disk_dqheader dqhead;
--	struct file *f = sb_dqopt(sb)->files[type];
--	mm_segment_t fs;
- 	ssize_t size;
--	loff_t offset = 0;
- 	static const uint quota_magics[] = V2_INITQMAGICS;
- 	static const uint quota_versions[] = V2_INITQVERSIONS;
-  
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->read(f, (char *)&dqhead, sizeof(struct v2_disk_dqheader), &offset);
--	set_fs(fs);
--	if (size != sizeof(struct v2_disk_dqheader))
-+	size = sb->s_op->quota_read(sb, type, (char *)&dqhead, sizeof(struct v2_disk_dqheader), 0);
-+	if (size != sizeof(struct v2_disk_dqheader)) {
-+		printk("failed read\n");
- 		return 0;
-+	}
- 	if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
- 	    le32_to_cpu(dqhead.dqh_version) != quota_versions[type])
- 		return 0;
-@@ -52,20 +47,15 @@ static int v2_check_quota_file(struct su
- /* Read information header from quota file */
- static int v2_read_file_info(struct super_block *sb, int type)
- {
--	mm_segment_t fs;
- 	struct v2_disk_dqinfo dinfo;
- 	struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
--	struct file *f = sb_dqopt(sb)->files[type];
- 	ssize_t size;
--	loff_t offset = V2_DQINFOOFF;
- 
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->read(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset);
--	set_fs(fs);
-+	size = sb->s_op->quota_read(sb, type, (char *)&dinfo,
-+	       sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
- 	if (size != sizeof(struct v2_disk_dqinfo)) {
- 		printk(KERN_WARNING "Can't read info structure on device %s.\n",
--			f->f_dentry->d_sb->s_id);
-+			sb->s_id);
- 		return -1;
- 	}
- 	info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
-@@ -80,12 +70,9 @@ static int v2_read_file_info(struct supe
- /* Write information header to quota file */
- static int v2_write_file_info(struct super_block *sb, int type)
- {
--	mm_segment_t fs;
- 	struct v2_disk_dqinfo dinfo;
- 	struct mem_dqinfo *info = sb_dqopt(sb)->info+type;
--	struct file *f = sb_dqopt(sb)->files[type];
- 	ssize_t size;
--	loff_t offset = V2_DQINFOOFF;
- 
- 	spin_lock(&dq_data_lock);
- 	info->dqi_flags &= ~DQF_INFO_DIRTY;
-@@ -96,13 +83,11 @@ static int v2_write_file_info(struct sup
- 	dinfo.dqi_blocks = cpu_to_le32(info->u.v2_i.dqi_blocks);
- 	dinfo.dqi_free_blk = cpu_to_le32(info->u.v2_i.dqi_free_blk);
- 	dinfo.dqi_free_entry = cpu_to_le32(info->u.v2_i.dqi_free_entry);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	size = f->f_op->write(f, (char *)&dinfo, sizeof(struct v2_disk_dqinfo), &offset);
--	set_fs(fs);
-+	size = sb->s_op->quota_write(sb, type, (char *)&dinfo,
-+	       sizeof(struct v2_disk_dqinfo), V2_DQINFOOFF);
- 	if (size != sizeof(struct v2_disk_dqinfo)) {
- 		printk(KERN_WARNING "Can't write info structure on device %s.\n",
--			f->f_dentry->d_sb->s_id);
-+			sb->s_id);
- 		return -1;
- 	}
- 	return 0;
-@@ -146,39 +131,24 @@ static inline void freedqbuf(dqbuf_t buf
- 	kfree(buf);
- }
- 
--static ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf)
-+static inline ssize_t read_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
- {
--	mm_segment_t fs;
--	ssize_t ret;
--	loff_t offset = blk<<V2_DQBLKSIZE_BITS;
--
- 	memset(buf, 0, V2_DQBLKSIZE);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	ret = filp->f_op->read(filp, (char *)buf, V2_DQBLKSIZE, &offset);
--	set_fs(fs);
--	return ret;
-+	return sb->s_op->quota_read(sb, type, (char *)buf,
-+	       V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
- }
- 
--static ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf)
-+static inline ssize_t write_blk(struct super_block *sb, int type, uint blk, dqbuf_t buf)
- {
--	mm_segment_t fs;
--	ssize_t ret;
--	loff_t offset = blk<<V2_DQBLKSIZE_BITS;
--
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	ret = filp->f_op->write(filp, (char *)buf, V2_DQBLKSIZE, &offset);
--	set_fs(fs);
--	return ret;
--
-+	return sb->s_op->quota_write(sb, type, (char *)buf,
-+	       V2_DQBLKSIZE, blk << V2_DQBLKSIZE_BITS);
- }
- 
- /* Remove empty block from list and return it */
--static int get_free_dqblk(struct file *filp, int type)
-+static int get_free_dqblk(struct super_block *sb, int type)
- {
- 	dqbuf_t buf = getdqbuf();
--	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	int ret, blk;
- 
-@@ -186,17 +156,18 @@ static int get_free_dqblk(struct file *f
- 		return -ENOMEM;
- 	if (info->u.v2_i.dqi_free_blk) {
- 		blk = info->u.v2_i.dqi_free_blk;
--		if ((ret = read_blk(filp, blk, buf)) < 0)
-+		if ((ret = read_blk(sb, type, blk, buf)) < 0)
- 			goto out_buf;
- 		info->u.v2_i.dqi_free_blk = le32_to_cpu(dh->dqdh_next_free);
- 	}
- 	else {
- 		memset(buf, 0, V2_DQBLKSIZE);
--		if ((ret = write_blk(filp, info->u.v2_i.dqi_blocks, buf)) < 0)	/* Assure block allocation... */
-+		/* Assure block allocation... */
-+		if ((ret = write_blk(sb, type, info->u.v2_i.dqi_blocks, buf)) < 0)
- 			goto out_buf;
- 		blk = info->u.v2_i.dqi_blocks++;
- 	}
--	mark_info_dirty(filp->f_dentry->d_sb, type);
-+	mark_info_dirty(sb, type);
- 	ret = blk;
- out_buf:
- 	freedqbuf(buf);
-@@ -204,9 +175,9 @@ out_buf:
- }
- 
- /* Insert empty block to the list */
--static int put_free_dqblk(struct file *filp, int type, dqbuf_t buf, uint blk)
-+static int put_free_dqblk(struct super_block *sb, int type, dqbuf_t buf, uint blk)
- {
--	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	int err;
- 
-@@ -214,17 +185,18 @@ static int put_free_dqblk(struct file *f
- 	dh->dqdh_prev_free = cpu_to_le32(0);
- 	dh->dqdh_entries = cpu_to_le16(0);
- 	info->u.v2_i.dqi_free_blk = blk;
--	mark_info_dirty(filp->f_dentry->d_sb, type);
--	if ((err = write_blk(filp, blk, buf)) < 0)	/* Some strange block. We had better leave it... */
-+	mark_info_dirty(sb, type);
-+	/* Some strange block. We had better leave it... */
-+	if ((err = write_blk(sb, type, blk, buf)) < 0)
- 		return err;
- 	return 0;
- }
- 
- /* Remove given block from the list of blocks with free entries */
--static int remove_free_dqentry(struct file *filp, int type, dqbuf_t buf, uint blk)
-+static int remove_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk)
- {
- 	dqbuf_t tmpbuf = getdqbuf();
--	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk = le32_to_cpu(dh->dqdh_prev_free);
- 	int err;
-@@ -232,26 +204,27 @@ static int remove_free_dqentry(struct fi
- 	if (!tmpbuf)
- 		return -ENOMEM;
- 	if (nextblk) {
--		if ((err = read_blk(filp, nextblk, tmpbuf)) < 0)
-+		if ((err = read_blk(sb, type, nextblk, tmpbuf)) < 0)
- 			goto out_buf;
- 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = dh->dqdh_prev_free;
--		if ((err = write_blk(filp, nextblk, tmpbuf)) < 0)
-+		if ((err = write_blk(sb, type, nextblk, tmpbuf)) < 0)
- 			goto out_buf;
- 	}
- 	if (prevblk) {
--		if ((err = read_blk(filp, prevblk, tmpbuf)) < 0)
-+		if ((err = read_blk(sb, type, prevblk, tmpbuf)) < 0)
- 			goto out_buf;
- 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_next_free = dh->dqdh_next_free;
--		if ((err = write_blk(filp, prevblk, tmpbuf)) < 0)
-+		if ((err = write_blk(sb, type, prevblk, tmpbuf)) < 0)
- 			goto out_buf;
- 	}
- 	else {
- 		info->u.v2_i.dqi_free_entry = nextblk;
--		mark_info_dirty(filp->f_dentry->d_sb, type);
-+		mark_info_dirty(sb, type);
- 	}
- 	freedqbuf(tmpbuf);
- 	dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0);
--	if (write_blk(filp, blk, buf) < 0)	/* No matter whether write succeeds block is out of list */
-+	/* No matter whether write succeeds block is out of list */
-+	if (write_blk(sb, type, blk, buf) < 0)
- 		printk(KERN_ERR "VFS: Can't write block (%u) with free entries.\n", blk);
- 	return 0;
- out_buf:
-@@ -260,10 +233,10 @@ out_buf:
- }
- 
- /* Insert given block to the beginning of list with free entries */
--static int insert_free_dqentry(struct file *filp, int type, dqbuf_t buf, uint blk)
-+static int insert_free_dqentry(struct super_block *sb, int type, dqbuf_t buf, uint blk)
- {
- 	dqbuf_t tmpbuf = getdqbuf();
--	struct mem_dqinfo *info = sb_dqinfo(filp->f_dentry->d_sb, type);
-+	struct mem_dqinfo *info = sb_dqinfo(sb, type);
- 	struct v2_disk_dqdbheader *dh = (struct v2_disk_dqdbheader *)buf;
- 	int err;
- 
-@@ -271,18 +244,18 @@ static int insert_free_dqentry(struct fi
- 		return -ENOMEM;
- 	dh->dqdh_next_free = cpu_to_le32(info->u.v2_i.dqi_free_entry);
- 	dh->dqdh_prev_free = cpu_to_le32(0);
--	if ((err = write_blk(filp, blk, buf)) < 0)
-+	if ((err = write_blk(sb, type, blk, buf)) < 0)
- 		goto out_buf;
- 	if (info->u.v2_i.dqi_free_entry) {
--		if ((err = read_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
-+		if ((err = read_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
- 			goto out_buf;
- 		((struct v2_disk_dqdbheader *)tmpbuf)->dqdh_prev_free = cpu_to_le32(blk);
--		if ((err = write_blk(filp, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
-+		if ((err = write_blk(sb, type, info->u.v2_i.dqi_free_entry, tmpbuf)) < 0)
- 			goto out_buf;
- 	}
- 	freedqbuf(tmpbuf);
- 	info->u.v2_i.dqi_free_entry = blk;
--	mark_info_dirty(filp->f_dentry->d_sb, type);
-+	mark_info_dirty(sb, type);
- 	return 0;
- out_buf:
- 	freedqbuf(tmpbuf);
-@@ -292,8 +265,8 @@ out_buf:
- /* Find space for dquot */
- static uint find_free_dqentry(struct dquot *dquot, int *err)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
--	struct mem_dqinfo *info = sb_dqopt(dquot->dq_sb)->info+dquot->dq_type;
-+	struct super_block *sb = dquot->dq_sb;
-+	struct mem_dqinfo *info = sb_dqopt(sb)->info+dquot->dq_type;
- 	uint blk, i;
- 	struct v2_disk_dqdbheader *dh;
- 	struct v2_disk_dqblk *ddquot;
-@@ -309,22 +282,23 @@ static uint find_free_dqentry(struct dqu
- 	ddquot = GETENTRIES(buf);
- 	if (info->u.v2_i.dqi_free_entry) {
- 		blk = info->u.v2_i.dqi_free_entry;
--		if ((*err = read_blk(filp, blk, buf)) < 0)
-+		if ((*err = read_blk(sb, dquot->dq_type, blk, buf)) < 0)
- 			goto out_buf;
- 	}
- 	else {
--		blk = get_free_dqblk(filp, dquot->dq_type);
-+		blk = get_free_dqblk(sb, dquot->dq_type);
- 		if ((int)blk < 0) {
- 			*err = blk;
- 			freedqbuf(buf);
- 			return 0;
- 		}
- 		memset(buf, 0, V2_DQBLKSIZE);
--		info->u.v2_i.dqi_free_entry = blk;	/* This is enough as block is already zeroed and entry list is empty... */
--		mark_info_dirty(dquot->dq_sb, dquot->dq_type);
-+		/* This is enough as block is already zeroed and entry list is empty... */
-+		info->u.v2_i.dqi_free_entry = blk;
-+		mark_info_dirty(sb, dquot->dq_type);
- 	}
- 	if (le16_to_cpu(dh->dqdh_entries)+1 >= V2_DQSTRINBLK)	/* Block will be full? */
--		if ((*err = remove_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0) {
-+		if ((*err = remove_free_dqentry(sb, dquot->dq_type, buf, blk)) < 0) {
- 			printk(KERN_ERR "VFS: find_free_dqentry(): Can't remove block (%u) from entry free list.\n", blk);
- 			goto out_buf;
- 		}
-@@ -339,7 +313,7 @@ static uint find_free_dqentry(struct dqu
- 		goto out_buf;
- 	}
- #endif
--	if ((*err = write_blk(filp, blk, buf)) < 0) {
-+	if ((*err = write_blk(sb, dquot->dq_type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: find_free_dqentry(): Can't write quota data block %u.\n", blk);
- 		goto out_buf;
- 	}
-@@ -354,7 +328,7 @@ out_buf:
- /* Insert reference to structure into the trie */
- static int do_insert_tree(struct dquot *dquot, uint *treeblk, int depth)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
-+	struct super_block *sb = dquot->dq_sb;
- 	dqbuf_t buf;
- 	int ret = 0, newson = 0, newact = 0;
- 	__le32 *ref;
-@@ -363,7 +337,7 @@ static int do_insert_tree(struct dquot *
- 	if (!(buf = getdqbuf()))
- 		return -ENOMEM;
- 	if (!*treeblk) {
--		ret = get_free_dqblk(filp, dquot->dq_type);
-+		ret = get_free_dqblk(sb, dquot->dq_type);
- 		if (ret < 0)
- 			goto out_buf;
- 		*treeblk = ret;
-@@ -371,7 +345,7 @@ static int do_insert_tree(struct dquot *
- 		newact = 1;
- 	}
- 	else {
--		if ((ret = read_blk(filp, *treeblk, buf)) < 0) {
-+		if ((ret = read_blk(sb, dquot->dq_type, *treeblk, buf)) < 0) {
- 			printk(KERN_ERR "VFS: Can't read tree quota block %u.\n", *treeblk);
- 			goto out_buf;
- 		}
-@@ -394,10 +368,10 @@ static int do_insert_tree(struct dquot *
- 		ret = do_insert_tree(dquot, &newblk, depth+1);
- 	if (newson && ret >= 0) {
- 		ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk);
--		ret = write_blk(filp, *treeblk, buf);
-+		ret = write_blk(sb, dquot->dq_type, *treeblk, buf);
- 	}
- 	else if (newact && ret < 0)
--		put_free_dqblk(filp, dquot->dq_type, buf, *treeblk);
-+		put_free_dqblk(sb, dquot->dq_type, buf, *treeblk);
- out_buf:
- 	freedqbuf(buf);
- 	return ret;
-@@ -416,20 +390,15 @@ static inline int dq_insert_tree(struct 
- static int v2_write_dquot(struct dquot *dquot)
- {
- 	int type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
--	loff_t offset;
- 	ssize_t ret;
- 	struct v2_disk_dqblk ddquot, empty;
- 
- 	/* dq_off is guarded by dqio_sem */
- 	if (!dquot->dq_off)
- 		if ((ret = dq_insert_tree(dquot)) < 0) {
--			printk(KERN_ERR "VFS: Error %Zd occurred while creating quota.\n", ret);
-+			printk(KERN_ERR "VFS: Error %d occurred while creating quota.\n", ret);
- 			return ret;
- 		}
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--	offset = dquot->dq_off;
- 	spin_lock(&dq_data_lock);
- 	mem2diskdqb(&ddquot, &dquot->dq_dqb, dquot->dq_id);
- 	/* Argh... We may need to write structure full of zeroes but that would be
-@@ -439,10 +408,8 @@ static int v2_write_dquot(struct dquot *
- 	if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
- 		ddquot.dqb_itime = cpu_to_le64(1);
- 	spin_unlock(&dq_data_lock);
--	fs = get_fs();
--	set_fs(KERNEL_DS);
--	ret = filp->f_op->write(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset);
--	set_fs(fs);
-+	ret = dquot->dq_sb->s_op->quota_write(dquot->dq_sb, type,
-+	      (char *)&ddquot, sizeof(struct v2_disk_dqblk), dquot->dq_off);
- 	if (ret != sizeof(struct v2_disk_dqblk)) {
- 		printk(KERN_WARNING "VFS: dquota write failed on dev %s\n", dquot->dq_sb->s_id);
- 		if (ret >= 0)
-@@ -458,7 +425,8 @@ static int v2_write_dquot(struct dquot *
- /* Free dquot entry in data block */
- static int free_dqentry(struct dquot *dquot, uint blk)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
-+	struct super_block *sb = dquot->dq_sb;
-+	int type = dquot->dq_type;
- 	struct v2_disk_dqdbheader *dh;
- 	dqbuf_t buf = getdqbuf();
- 	int ret = 0;
-@@ -466,34 +434,39 @@ static int free_dqentry(struct dquot *dq
- 	if (!buf)
- 		return -ENOMEM;
- 	if (dquot->dq_off >> V2_DQBLKSIZE_BITS != blk) {
--		printk(KERN_ERR "VFS: Quota structure has offset to other block (%u) than it should (%u).\n", blk, (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS));
-+		printk(KERN_ERR "VFS: Quota structure has offset to other "
-+		  "block (%u) than it should (%u).\n", blk,
-+		  (uint)(dquot->dq_off >> V2_DQBLKSIZE_BITS));
- 		goto out_buf;
- 	}
--	if ((ret = read_blk(filp, blk, buf)) < 0) {
-+	if ((ret = read_blk(sb, type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota data block %u\n", blk);
- 		goto out_buf;
- 	}
- 	dh = (struct v2_disk_dqdbheader *)buf;
- 	dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries)-1);
- 	if (!le16_to_cpu(dh->dqdh_entries)) {	/* Block got free? */
--		if ((ret = remove_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0 ||
--		    (ret = put_free_dqblk(filp, dquot->dq_type, buf, blk)) < 0) {
--			printk(KERN_ERR "VFS: Can't move quota data block (%u) to free list.\n", blk);
-+		if ((ret = remove_free_dqentry(sb, type, buf, blk)) < 0 ||
-+		    (ret = put_free_dqblk(sb, type, buf, blk)) < 0) {
-+			printk(KERN_ERR "VFS: Can't move quota data block (%u) "
-+			  "to free list.\n", blk);
- 			goto out_buf;
- 		}
- 	}
- 	else {
--		memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0, sizeof(struct v2_disk_dqblk));
-+		memset(buf+(dquot->dq_off & ((1 << V2_DQBLKSIZE_BITS)-1)), 0,
-+		  sizeof(struct v2_disk_dqblk));
- 		if (le16_to_cpu(dh->dqdh_entries) == V2_DQSTRINBLK-1) {
- 			/* Insert will write block itself */
--			if ((ret = insert_free_dqentry(filp, dquot->dq_type, buf, blk)) < 0) {
-+			if ((ret = insert_free_dqentry(sb, type, buf, blk)) < 0) {
- 				printk(KERN_ERR "VFS: Can't insert quota data block (%u) to free entry list.\n", blk);
- 				goto out_buf;
- 			}
- 		}
- 		else
--			if ((ret = write_blk(filp, blk, buf)) < 0) {
--				printk(KERN_ERR "VFS: Can't write quota data block %u\n", blk);
-+			if ((ret = write_blk(sb, type, blk, buf)) < 0) {
-+				printk(KERN_ERR "VFS: Can't write quota data "
-+				  "block %u\n", blk);
- 				goto out_buf;
- 			}
- 	}
-@@ -506,7 +479,8 @@ out_buf:
- /* Remove reference to dquot from tree */
- static int remove_tree(struct dquot *dquot, uint *blk, int depth)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
-+	struct super_block *sb = dquot->dq_sb;
-+	int type = dquot->dq_type;
- 	dqbuf_t buf = getdqbuf();
- 	int ret = 0;
- 	uint newblk;
-@@ -514,7 +488,7 @@ static int remove_tree(struct dquot *dqu
- 	
- 	if (!buf)
- 		return -ENOMEM;
--	if ((ret = read_blk(filp, *blk, buf)) < 0) {
-+	if ((ret = read_blk(sb, type, *blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota data block %u\n", *blk);
- 		goto out_buf;
- 	}
-@@ -530,12 +504,13 @@ static int remove_tree(struct dquot *dqu
- 		ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0);
- 		for (i = 0; i < V2_DQBLKSIZE && !buf[i]; i++);	/* Block got empty? */
- 		if (i == V2_DQBLKSIZE) {
--			put_free_dqblk(filp, dquot->dq_type, buf, *blk);
-+			put_free_dqblk(sb, type, buf, *blk);
- 			*blk = 0;
- 		}
- 		else
--			if ((ret = write_blk(filp, *blk, buf)) < 0)
--				printk(KERN_ERR "VFS: Can't write quota tree block %u.\n", *blk);
-+			if ((ret = write_blk(sb, type, *blk, buf)) < 0)
-+				printk(KERN_ERR "VFS: Can't write quota tree "
-+				  "block %u.\n", *blk);
- 	}
- out_buf:
- 	freedqbuf(buf);
-@@ -555,7 +530,6 @@ static int v2_delete_dquot(struct dquot 
- /* Find entry in block */
- static loff_t find_block_dqentry(struct dquot *dquot, uint blk)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
- 	dqbuf_t buf = getdqbuf();
- 	loff_t ret = 0;
- 	int i;
-@@ -563,27 +537,31 @@ static loff_t find_block_dqentry(struct 
- 
- 	if (!buf)
- 		return -ENOMEM;
--	if ((ret = read_blk(filp, blk, buf)) < 0) {
-+	if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
- 		goto out_buf;
- 	}
- 	if (dquot->dq_id)
--		for (i = 0; i < V2_DQSTRINBLK && le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++);
-+		for (i = 0; i < V2_DQSTRINBLK &&
-+		     le32_to_cpu(ddquot[i].dqb_id) != dquot->dq_id; i++);
- 	else {	/* ID 0 as a bit more complicated searching... */
- 		struct v2_disk_dqblk fakedquot;
- 
- 		memset(&fakedquot, 0, sizeof(struct v2_disk_dqblk));
- 		for (i = 0; i < V2_DQSTRINBLK; i++)
--			if (!le32_to_cpu(ddquot[i].dqb_id) && memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)))
-+			if (!le32_to_cpu(ddquot[i].dqb_id) &&
-+			    memcmp(&fakedquot, ddquot+i, sizeof(struct v2_disk_dqblk)))
- 				break;
- 	}
- 	if (i == V2_DQSTRINBLK) {
--		printk(KERN_ERR "VFS: Quota for id %u referenced but not present.\n", dquot->dq_id);
-+		printk(KERN_ERR "VFS: Quota for id %u referenced "
-+		  "but not present.\n", dquot->dq_id);
- 		ret = -EIO;
- 		goto out_buf;
- 	}
- 	else
--		ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk);
-+		ret = (blk << V2_DQBLKSIZE_BITS) + sizeof(struct
-+		  v2_disk_dqdbheader) + i * sizeof(struct v2_disk_dqblk);
- out_buf:
- 	freedqbuf(buf);
- 	return ret;
-@@ -592,14 +570,13 @@ out_buf:
- /* Find entry for given id in the tree */
- static loff_t find_tree_dqentry(struct dquot *dquot, uint blk, int depth)
- {
--	struct file *filp = sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
- 	dqbuf_t buf = getdqbuf();
- 	loff_t ret = 0;
- 	__le32 *ref = (__le32 *)buf;
- 
- 	if (!buf)
- 		return -ENOMEM;
--	if ((ret = read_blk(filp, blk, buf)) < 0) {
-+	if ((ret = read_blk(dquot->dq_sb, dquot->dq_type, blk, buf)) < 0) {
- 		printk(KERN_ERR "VFS: Can't read quota tree block %u.\n", blk);
- 		goto out_buf;
- 	}
-@@ -625,16 +602,13 @@ static inline loff_t find_dqentry(struct
- static int v2_read_dquot(struct dquot *dquot)
- {
- 	int type = dquot->dq_type;
--	struct file *filp;
--	mm_segment_t fs;
- 	loff_t offset;
- 	struct v2_disk_dqblk ddquot, empty;
- 	int ret = 0;
- 
--	filp = sb_dqopt(dquot->dq_sb)->files[type];
--
- #ifdef __QUOTA_V2_PARANOIA
--	if (!filp || !dquot->dq_sb) {	/* Invalidated quota? */
-+	/* Invalidated quota? */
-+	if (!dquot->dq_sb || !sb_dqopt(dquot->dq_sb)->files[type]) {
- 		printk(KERN_ERR "VFS: Quota invalidated while reading!\n");
- 		return -EIO;
- 	}
-@@ -642,7 +616,8 @@ static int v2_read_dquot(struct dquot *d
- 	offset = find_dqentry(dquot);
- 	if (offset <= 0) {	/* Entry not present? */
- 		if (offset < 0)
--			printk(KERN_ERR "VFS: Can't read quota structure for id %u.\n", dquot->dq_id);
-+			printk(KERN_ERR "VFS: Can't read quota "
-+			  "structure for id %u.\n", dquot->dq_id);
- 		dquot->dq_off = 0;
- 		set_bit(DQ_FAKE_B, &dquot->dq_flags);
- 		memset(&dquot->dq_dqb, 0, sizeof(struct mem_dqblk));
-@@ -650,12 +625,13 @@ static int v2_read_dquot(struct dquot *d
- 	}
- 	else {
- 		dquot->dq_off = offset;
--		fs = get_fs();
--		set_fs(KERNEL_DS);
--		if ((ret = filp->f_op->read(filp, (char *)&ddquot, sizeof(struct v2_disk_dqblk), &offset)) != sizeof(struct v2_disk_dqblk)) {
-+		if ((ret = dquot->dq_sb->s_op->quota_read(dquot->dq_sb, type,
-+		    (char *)&ddquot, sizeof(struct v2_disk_dqblk), offset))
-+		    != sizeof(struct v2_disk_dqblk)) {
- 			if (ret >= 0)
- 				ret = -EIO;
--			printk(KERN_ERR "VFS: Error while reading quota structure for id %u.\n", dquot->dq_id);
-+			printk(KERN_ERR "VFS: Error while reading quota "
-+			  "structure for id %u.\n", dquot->dq_id);
- 			memset(&ddquot, 0, sizeof(struct v2_disk_dqblk));
- 		}
- 		else {
-@@ -666,7 +642,6 @@ static int v2_read_dquot(struct dquot *d
- 			if (!memcmp(&empty, &ddquot, sizeof(struct v2_disk_dqblk)))
- 				ddquot.dqb_itime = 0;
- 		}
--		set_fs(fs);
- 		disk2memdqb(&dquot->dq_dqb, &ddquot);
- 		if (!dquot->dq_dqb.dqb_bhardlimit &&
- 			!dquot->dq_dqb.dqb_bsoftlimit &&
-diff -rup RH_2_6_9_55.orig/include/linux/fs.h RH_2_6_9_55/include/linux/fs.h
---- RH_2_6_9_55.orig/include/linux/fs.h
-+++ RH_2_6_9_55/include/linux/fs.h
-@@ -1042,6 +1042,9 @@ struct super_operations {
-	void (*umount_lustre) (struct super_block *);
-
-	int (*show_options)(struct seq_file *, struct vfsmount *);
-+
-+	ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
-+ 	ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);
- };
-
- /* Inode state bits.  Protected by inode_lock. */
-diff -rup RH_2_6_9_55.orig/include/linux/quota.h RH_2_6_9_55/include/linux/quota.h
---- RH_2_6_9_55.orig/include/linux/quota.h
-+++ RH_2_6_9_55/include/linux/quota.h
-@@ -285,7 +285,7 @@ struct quota_info {
- 	struct semaphore dqio_sem;		/* lock device while I/O in progress */
- 	struct semaphore dqonoff_sem;		/* Serialize quotaon & quotaoff */
- 	struct rw_semaphore dqptr_sem;		/* serialize ops using quota_info struct, pointers from inode to dquots */
--	struct file *files[MAXQUOTAS];		/* fp's to quotafiles */
-+	struct inode *files[MAXQUOTAS];		/* inodes of quotafiles */
- 	struct mem_dqinfo info[MAXQUOTAS];	/* Information for each quota type */
- 	struct quota_format_ops *ops[MAXQUOTAS];	/* Operations for each type */
- };
-diff -rup RH_2_6_9_55.orig/include/linux/security.h RH_2_6_9_55/include/linux/security.h
---- RH_2_6_9_55.orig/include/linux/security.h
-+++ RH_2_6_9_55/include/linux/security.h
-@@ -1033,7 +1033,7 @@ struct security_operations {
-	int (*sysctl) (ctl_table * table, int op);
-	int (*capable) (struct task_struct * tsk, int cap);
-	int (*quotactl) (int cmds, int type, int id, struct super_block * sb);
--	int (*quota_on) (struct file * f);
-+	int (*quota_on) (struct dentry * dentry);
-	int (*syslog) (int type);
-	int (*vm_enough_memory) (long pages);
-
-@@ -1281,9 +1281,9 @@ static inline int security_quotactl (int
- 	return security_ops->quotactl (cmds, type, id, sb);
- }
- 
--static inline int security_quota_on (struct file * file)
-+static inline int security_quota_on (struct dentry * dentry)
- {
--	return security_ops->quota_on (file);
-+	return security_ops->quota_on (dentry);
- }
- 
- static inline int security_syslog(int type)
-@@ -1953,7 +1953,7 @@ static inline int security_quotactl (int
- 	return 0;
- }
- 
--static inline int security_quota_on (struct file * file)
-+static inline int security_quota_on (struct dentry * dentry)
- {
- 	return 0;
- }
-diff -rup RH_2_6_9_55.orig/security/dummy.c RH_2_6_9_55/security/dummy.c
---- RH_2_6_9_55.orig/security/dummy.c
-+++ RH_2_6_9_55/security/dummy.c
-@@ -92,7 +92,7 @@ static int dummy_quotactl (int cmds, int
- 	return 0;
- }
- 
--static int dummy_quota_on (struct file *f)
-+static int dummy_quota_on (struct dentry *dentry)
- {
- 	return 0;
- }
-diff -rup RH_2_6_9_55.orig/security/selinux/hooks.c RH_2_6_9_55/security/selinux/hooks.c
---- RH_2_6_9_55.orig/security/selinux/hooks.c
-+++ RH_2_6_9_55/security/selinux/hooks.c
-@@ -1485,9 +1485,9 @@ static int selinux_quotactl(int cmds, in
- 	return rc;
- }
- 
--static int selinux_quota_on(struct file *f)
-+static int selinux_quota_on(struct dentry *dentry)
- {
--	return file_has_perm(current, f, FILE__QUOTAON);
-+	return dentry_has_perm(current, NULL, dentry, FILE__QUOTAON);
- }
- 
- static int selinux_syslog(int type)
diff --git a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch b/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch
deleted file mode 100644
index bcfa38ab6361d0aafe0d75a91cb699dea2fae949..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/quota-deadlock-on-pagelock-ext3.patch
+++ /dev/null
@@ -1,273 +0,0 @@
-Index: linux-2.6.9/fs/ext3/inode.c
-===================================================================
---- linux-2.6.9.orig/fs/ext3/inode.c	2006-08-25 16:39:10.000000000 +0800
-+++ linux-2.6.9/fs/ext3/inode.c	2006-09-14 11:44:29.000000000 +0800
-@@ -1028,7 +1028,7 @@
- 	return ret;
- }
- 
--static int
-+int
- ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh)
- {
- 	int err = journal_dirty_data(handle, bh);
-Index: linux-2.6.9/fs/ext3/super.c
-===================================================================
---- linux-2.6.9.orig/fs/ext3/super.c	2006-08-25 16:39:48.000000000 +0800
-+++ linux-2.6.9/fs/ext3/super.c	2006-09-14 11:51:48.000000000 +0800
-@@ -529,7 +529,10 @@
- static int ext3_write_info(struct super_block *sb, int type);
- static int ext3_quota_on(struct super_block *sb, int type, int format_id, char *path);
- static int ext3_quota_on_mount(struct super_block *sb, int type);
--static int ext3_quota_off_mount(struct super_block *sb, int type);
-+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
-+			       size_t len, loff_t off);
-+static ssize_t ext3_quota_write(struct super_block *sb, int type,
-+				const char *data, size_t len, loff_t off);
- 
- static struct dquot_operations ext3_quota_operations = {
- 	.initialize	= ext3_dquot_initialize,
-@@ -572,6 +575,10 @@
- 	.statfs		= ext3_statfs,
- 	.remount_fs	= ext3_remount,
- 	.clear_inode	= ext3_clear_inode,
-+#ifdef CONFIG_QUOTA
-+	.quota_read	= ext3_quota_read,
-+	.quota_write	= ext3_quota_write,
-+#endif
- };
- 
- static struct dentry *ext3_get_dentry(struct super_block *sb, void *vobjp)
-@@ -713,6 +720,7 @@
- 	int option;
- #ifdef CONFIG_QUOTA
- 	int qtype;
-+	char *qname;
- #endif
- 
- 	if (!options)
-@@ -891,19 +899,22 @@
- 					"quota options when quota turned on.\n");
- 				return 0;
- 			}
--			if (sbi->s_qf_names[qtype]) {
-+			qname = match_strdup(&args[0]);
-+			if (!qname) {
- 				printk(KERN_ERR
--					"EXT3-fs: %s quota file already "
--					"specified.\n", QTYPE2NAME(qtype));
-+					"EXT3-fs: not enough memory for "
-+					"storing quotafile name.\n");
- 				return 0;
- 			}
--			sbi->s_qf_names[qtype] = match_strdup(&args[0]);
--			if (!sbi->s_qf_names[qtype]) {
-+			if (sbi->s_qf_names[qtype] &&
-+			    strcmp(sbi->s_qf_names[qtype], qname)) {
- 				printk(KERN_ERR
--					"EXT3-fs: not enough memory for "
--					"storing quotafile name.\n");
-+					"EXT3-fs: %s quota file already "
-+					"specified.\n", QTYPE2NAME(qtype));
-+				kfree(qname);
- 				return 0;
- 			}
-+			sbi->s_qf_names[qtype] = qname;
- 			if (strchr(sbi->s_qf_names[qtype], '/')) {
- 				printk(KERN_ERR
- 					"EXT3-fs: quotafile must be on "
-@@ -1223,7 +1234,7 @@
- 	/* Turn quotas off */
- 	for (i = 0; i < MAXQUOTAS; i++) {
- 		if (sb_dqopt(sb)->files[i])
--			ext3_quota_off_mount(sb, i);
-+			vfs_quota_off(sb, i);
- 	}
- #endif
- 	sb->s_flags = s_flags; /* Restore MS_RDONLY status */
-@@ -2240,7 +2251,7 @@
- 
- static inline struct inode *dquot_to_inode(struct dquot *dquot)
- {
--	return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type]->f_dentry->d_inode;
-+	return sb_dqopt(dquot->dq_sb)->files[dquot->dq_type];
- }
- 
- static int ext3_dquot_initialize(struct inode *inode, int type)
-@@ -2279,8 +2290,10 @@
- {
- 	int ret, err;
- 	handle_t *handle;
-+	struct inode *inode;
- 
--	handle = ext3_journal_start(dquot_to_inode(dquot),
-+	inode = dquot_to_inode(dquot);
-+	handle = ext3_journal_start(inode,
- 					EXT3_QUOTA_TRANS_BLOCKS);
- 	if (IS_ERR(handle))
- 		return PTR_ERR(handle);
-@@ -2367,22 +2380,9 @@
- 	if (IS_ERR(dentry))
- 		return PTR_ERR(dentry);
- 	err = vfs_quota_on_mount(type, EXT3_SB(sb)->s_jquota_fmt, dentry);
--	if (err)
--		dput(dentry);
--	/* We keep the dentry reference if everything went ok - we drop it
--	 * on quota_off time */
--	return err;
--}
--
--/* Turn quotas off during mount time */
--static int ext3_quota_off_mount(struct super_block *sb, int type)
--{
--	int err;
--	struct dentry *dentry;
--
--	dentry = sb_dqopt(sb)->files[type]->f_dentry;
--	err = vfs_quota_off_mount(sb, type);
--	/* We invalidate dentry - it has at least wrong hash... */
-+	/* Now invalidate and put the dentry - quota got its own reference
-+	 * to inode and dentry has at least wrong hash so we had better
-+	 * throw it away */
- 	d_invalidate(dentry);
- 	dput(dentry);
- 	return err;
-@@ -2405,20 +2405,121 @@
- 	if (err)
- 		return err;
- 	/* Quotafile not on the same filesystem? */
--	if (nd.mnt->mnt_sb != sb)
-+	if (nd.mnt->mnt_sb != sb) {
-+		path_release(&nd);
- 		return -EXDEV;
-+	}
- 	/* Quotafile not of fs root? */
- 	if (nd.dentry->d_parent->d_inode != sb->s_root->d_inode)
- 		printk(KERN_WARNING
- 			"EXT3-fs: Quota file not on filesystem root. "
- 			"Journalled quota will not work.\n");
--	if (!ext3_should_journal_data(nd.dentry->d_inode))
--		printk(KERN_WARNING "EXT3-fs: Quota file does not have "
--			"data-journalling. Journalled quota will not work.\n");
- 	path_release(&nd);
- 	return vfs_quota_on(sb, type, format_id, path);
- }
- 
-+/* Read data from quotafile - avoid pagecache and such because we cannot afford
-+ * acquiring the locks... As quota files are never truncated and quota code
-+ * itself serializes the operations (and noone else should touch the files)
-+ * we don't have to be afraid of races */
-+static ssize_t ext3_quota_read(struct super_block *sb, int type, char *data,
-+			       size_t len, loff_t off)
-+{
-+	struct inode *inode = sb_dqopt(sb)->files[type];
-+	sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb);
-+	int err = 0;
-+	int offset = off & (sb->s_blocksize - 1);
-+	int tocopy;
-+	size_t toread;
-+	struct buffer_head *bh;
-+	loff_t i_size = i_size_read(inode);
-+
-+	if (off > i_size)
-+		return 0;
-+	if (off+len > i_size)
-+		len = i_size-off;
-+	toread = len;
-+	while (toread > 0) {
-+		tocopy = sb->s_blocksize - offset < toread ?
-+				sb->s_blocksize - offset : toread;
-+		bh = ext3_bread(NULL, inode, blk, 0, &err);
-+		if (err)
-+			return err;
-+		if (!bh)	/* A hole? */
-+			memset(data, 0, tocopy);
-+		else
-+			memcpy(data, bh->b_data+offset, tocopy);
-+		brelse(bh);
-+		offset = 0;
-+		toread -= tocopy;
-+		data += tocopy;
-+		blk++;
-+	}
-+	return len;
-+}
-+
-+/* Write to quotafile (we know the transaction is already started and has
-+ * enough credits) */
-+static ssize_t ext3_quota_write(struct super_block *sb, int type,
-+				const char *data, size_t len, loff_t off)
-+{
-+	struct inode *inode = sb_dqopt(sb)->files[type];
-+	sector_t blk = off >> EXT3_BLOCK_SIZE_BITS(sb);
-+	int err = 0;
-+	int offset = off & (sb->s_blocksize - 1);
-+	int tocopy;
-+	int journal_quota = EXT3_SB(sb)->s_qf_names[type] != NULL;
-+	size_t towrite = len;
-+	struct buffer_head *bh;
-+	handle_t *handle = journal_current_handle();
-+
-+	down(&inode->i_sem);
-+	while (towrite > 0) {
-+		tocopy = sb->s_blocksize - offset < towrite ?
-+				sb->s_blocksize - offset : towrite;
-+		bh = ext3_bread(handle, inode, blk, 1, &err);
-+		if (!bh)
-+			goto out;
-+		if (journal_quota) {
-+			err = ext3_journal_get_write_access(handle, bh);
-+			if (err) {
-+				brelse(bh);
-+				goto out;
-+			}
-+		}
-+		lock_buffer(bh);
-+		memcpy(bh->b_data+offset, data, tocopy);
-+		flush_dcache_page(bh->b_page);
-+		unlock_buffer(bh);
-+		if (journal_quota)
-+			err = ext3_journal_dirty_metadata(handle, bh);
-+		else {
-+			/* Always do at least ordered writes for quotas */
-+			err = ext3_journal_dirty_data(handle, bh);
-+			mark_buffer_dirty(bh);
-+		}
-+		brelse(bh);
-+		if (err)
-+			goto out;
-+		offset = 0;
-+		towrite -= tocopy;
-+		data += tocopy;
-+		blk++;
-+	}
-+out:
-+	if (len == towrite)
-+		return err;
-+	if (inode->i_size < off+len-towrite) {
-+		i_size_write(inode, off+len-towrite);
-+		EXT3_I(inode)->i_disksize = inode->i_size;
-+	}
-+	inode->i_version++;
-+	inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-+	ext3_mark_inode_dirty(handle, inode);
-+	up(&inode->i_sem);
-+	return len - towrite;
-+}
-+
- #endif
- 
- static struct super_block *ext3_get_sb(struct file_system_type *fs_type,
-Index: linux-2.6.9/include/linux/ext3_jbd.h
-===================================================================
---- linux-2.6.9.orig/include/linux/ext3_jbd.h	2006-08-25 16:39:09.000000000 +0800
-+++ linux-2.6.9/include/linux/ext3_jbd.h	2006-09-14 11:44:29.000000000 +0800
-@@ -193,6 +193,8 @@
- #define ext3_journal_forget(handle, bh) \
- 	__ext3_journal_forget(__FUNCTION__, (handle), (bh))
- 
-+int ext3_journal_dirty_data(handle_t *handle, struct buffer_head *bh);
-+
- handle_t *ext3_journal_start_sb(struct super_block *sb, int nblocks);
- int __ext3_journal_stop(const char *where, handle_t *handle);
- 
diff --git a/lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch b/lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch
deleted file mode 100644
index b8c6b0d4b008f1404d193cba7cf2de695ecb06f5..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/quota-fix-oops-in-invalidate_dquots.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From: Jan Kara <jack@suse.cz>
-Date: Thu, 23 Mar 2006 11:00:17 +0000 (-0800)
-Subject: [PATCH] Fix oops in invalidate_dquots()
-X-Git-Tag: v2.6.17-rc1~1059
-X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=6362e4d4eda61efb04ac1cdae32e48ac6d90b701
-
-[PATCH] Fix oops in invalidate_dquots()
-
-When quota is being turned off we assumed that all the references to dquots
-were already dropped.  That need not be true as inodes being deleted are
-not on superblock's inodes list and hence we need not reach it when
-removing quota references from inodes.  So invalidate_dquots() has to wait
-for all the users of dquots (as quota is already marked as turned off, no
-new references can be acquired and so this is bound to happen rather
-early).  When we do this, we can also remove the iprune_sem locking as it
-was protecting us against exactly the same problem when freeing inodes
-icache memory.
-
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
-Signed-off-by: Linus Torvalds <torvalds@osdl.org>
----
-
-diff --git a/fs/dquot.c b/fs/dquot.c
-index 1966c89..9376a43 100644
---- a/fs/dquot.c
-+++ b/fs/dquot.c
-@@ -118,8 +118,7 @@
-  * spinlock to internal buffers before writing.
-  *
-  * Lock ordering (including related VFS locks) is the following:
-- *   i_mutex > dqonoff_sem > iprune_sem > journal_lock > dqptr_sem >
-- *   > dquot->dq_lock > dqio_sem
-+ *  i_mutex > dqonoff_sem > journal_lock > dqptr_sem > dquot->dq_lock > dqio_sem
-  * i_mutex on quota files is special (it's below dqio_sem)
-  */
- 
-@@ -407,23 +406,49 @@ out_dqlock:
- 
- /* Invalidate all dquots on the list. Note that this function is called after
-  * quota is disabled and pointers from inodes removed so there cannot be new
-- * quota users. Also because we hold dqonoff_sem there can be no quota users
-- * for this sb+type at all. */
-+ * quota users. There can still be some users of quotas due to inodes being
-+ * just deleted or pruned by prune_icache() (those are not attached to any
-+ * list). We have to wait for such users.
-+ */
- static void invalidate_dquots(struct super_block *sb, int type)
- {
- 	struct dquot *dquot, *tmp;
- 
-+restart:
- 	spin_lock(&dq_list_lock);
- 	list_for_each_entry_safe(dquot, tmp, &inuse_list, dq_inuse) {
- 		if (dquot->dq_sb != sb)
- 			continue;
- 		if (dquot->dq_type != type)
- 			continue;
--#ifdef __DQUOT_PARANOIA
--		if (atomic_read(&dquot->dq_count))
--			BUG();
--#endif
--		/* Quota now has no users and it has been written on last dqput() */
-+		/* Wait for dquot users */
-+		if (atomic_read(&dquot->dq_count)) {
-+			DEFINE_WAIT(wait);
-+
-+			atomic_inc(&dquot->dq_count);
-+			prepare_to_wait(&dquot->dq_wait_unused, &wait,
-+					TASK_UNINTERRUPTIBLE);
-+			spin_unlock(&dq_list_lock);
-+			/* Once dqput() wakes us up, we know it's time to free
-+			 * the dquot.
-+			 * IMPORTANT: we rely on the fact that there is always
-+			 * at most one process waiting for dquot to free.
-+			 * Otherwise dq_count would be > 1 and we would never
-+			 * wake up.
-+			 */
-+			if (atomic_read(&dquot->dq_count) > 1)
-+				schedule();
-+			finish_wait(&dquot->dq_wait_unused, &wait);
-+			dqput(dquot);
-+			/* At this moment dquot() need not exist (it could be
-+			 * reclaimed by prune_dqcache(). Hence we must
-+			 * restart. */
-+			goto restart;
-+		}
-+		/*
-+		 * Quota now has no users and it has been written on last
-+		 * dqput()
-+		 */
- 		remove_dquot_hash(dquot);
- 		remove_free_dquot(dquot);
- 		remove_inuse(dquot);
-@@ -540,6 +565,10 @@ we_slept:
- 	if (atomic_read(&dquot->dq_count) > 1) {
- 		/* We have more than one user... nothing to do */
- 		atomic_dec(&dquot->dq_count);
-+		/* Releasing dquot during quotaoff phase? */
-+		if (!sb_has_quota_enabled(dquot->dq_sb, dquot->dq_type) &&
-+		    atomic_read(&dquot->dq_count) == 1)
-+			wake_up(&dquot->dq_wait_unused);
- 		spin_unlock(&dq_list_lock);
- 		return;
- 	}
-@@ -581,6 +610,7 @@ static struct dquot *get_empty_dquot(struct super_block *sb, int type)
- 	INIT_LIST_HEAD(&dquot->dq_inuse);
- 	INIT_HLIST_NODE(&dquot->dq_hash);
- 	INIT_LIST_HEAD(&dquot->dq_dirty);
-+	init_waitqueue_head(&dquot->dq_wait_unused);
- 	dquot->dq_sb = sb;
- 	dquot->dq_type = type;
- 	atomic_set(&dquot->dq_count, 1);
-@@ -732,13 +762,9 @@ static void drop_dquot_ref(struct super_block *sb, int type)
- {
- 	LIST_HEAD(tofree_head);
- 
--	/* We need to be guarded against prune_icache to reach all the
--	 * inodes - otherwise some can be on the local list of prune_icache */
--	down(&iprune_sem);
- 	down_write(&sb_dqopt(sb)->dqptr_sem);
- 	remove_dquot_ref(sb, type, &tofree_head);
- 	up_write(&sb_dqopt(sb)->dqptr_sem);
--	up(&iprune_sem);
- 	put_dquot_list(&tofree_head);
- }
- 
diff --git a/lustre/kernel_patches/patches/quota-umount-race-fix.patch b/lustre/kernel_patches/patches/quota-umount-race-fix.patch
deleted file mode 100644
index 42428c3bcdde99b12dc2c80abcac2fe6791400b4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/quota-umount-race-fix.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-
-From: Jan Kara <jack@suse.cz>
-
-Fix possible races between umount and quota on/off.
-
-Finally I decided to take a reference to vfsmount during vfs_quota_on() and
-to drop it after the final cleanup in the vfs_quota_off().  This way we
-should be all the time guarded against umount.  This way was protected also
-the old code which used filp_open() for opening quota files.  I was also
-thinking about other ways of protection but there would be always a window
-(provided I don't want to play much with namespace locks) where
-vfs_quota_on() could be called while umount() is in progress resulting in
-the "Busy inodes after unmount" messages...
-
-Get a reference to vfsmount during quotaon() so that we are guarded against
-umount (as was the old code using filp_open()).
-
-Signed-off-by: Jan Kara <jack@suse.cz>
-Signed-off-by: Andrew Morton <akpm@osdl.org>
----
-
- 25-akpm/fs/dquot.c               |   45 ++++++++++++++++++++++++++++-----------
- 25-akpm/include/linux/quota.h    |    1 
- 25-akpm/include/linux/quotaops.h |    2 -
- 3 files changed, 35 insertions(+), 13 deletions(-)
-
-diff -puN fs/dquot.c~quota-umount-race-fix fs/dquot.c
---- 25/fs/dquot.c~quota-umount-race-fix	Tue Nov 23 17:11:34 2004
-+++ 25-akpm/fs/dquot.c	Tue Nov 23 17:11:34 2004
-@@ -1314,12 +1314,14 @@ int vfs_quota_off(struct super_block *sb
- {
- 	int cnt;
- 	struct quota_info *dqopt = sb_dqopt(sb);
--	struct inode *toput[MAXQUOTAS];
-+	struct inode *toputinode[MAXQUOTAS];
-+	struct vfsmount *toputmnt[MAXQUOTAS];
- 
- 	/* We need to serialize quota_off() for device */
- 	down(&dqopt->dqonoff_sem);
- 	for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
--		toput[cnt] = NULL;
-+		toputinode[cnt] = NULL;
-+		toputmnt[cnt] = NULL;
- 		if (type != -1 && cnt != type)
- 			continue;
- 		if (!sb_has_quota_enabled(sb, cnt))
-@@ -1339,8 +1341,10 @@ int vfs_quota_off(struct super_block *sb
- 			dqopt->ops[cnt]->free_file_info(sb, cnt);
- 		put_quota_format(dqopt->info[cnt].dqi_format);
- 
--		toput[cnt] = dqopt->files[cnt];
-+		toputinode[cnt] = dqopt->files[cnt];
-+		toputmnt[cnt] = dqopt->mnt[cnt];
- 		dqopt->files[cnt] = NULL;
-+		dqopt->mnt[cnt] = NULL;
- 		dqopt->info[cnt].dqi_flags = 0;
- 		dqopt->info[cnt].dqi_igrace = 0;
- 		dqopt->info[cnt].dqi_bgrace = 0;
-@@ -1348,7 +1352,10 @@ int vfs_quota_off(struct super_block *sb
- 	}
- 	up(&dqopt->dqonoff_sem);
- 	/* Sync the superblock so that buffers with quota data are written to
--         * disk (and so userspace sees correct data afterwards) */
-+	 * disk (and so userspace sees correct data afterwards).
-+	 * The reference to vfsmnt we are still holding protects us from
-+	 * umount (we don't have it only when quotas are turned on/off for
-+	 * journal replay but in that case we are guarded by the fs anyway). */
- 	if (sb->s_op->sync_fs)
- 		sb->s_op->sync_fs(sb, 1);
- 	sync_blockdev(sb->s_bdev);
-@@ -1358,13 +1365,24 @@ int vfs_quota_off(struct super_block *sb
-	 * must also discard the blockdev buffers so that we see the
-	 * changes done by userspace on the next quotaon() */
-	for (cnt = 0; cnt < MAXQUOTAS; cnt++)
--		if (toput[cnt]) {
--			down(&toput[cnt]->i_sem);
--			toput[cnt]->i_flags &= ~(S_IMMUTABLE | S_NOATIME | S_NOQUOTA);
--			truncate_inode_pages(&toput[cnt]->i_data, 0);
--			up(&toput[cnt]->i_sem);
--			mark_inode_dirty(toput[cnt]);
--			iput(toput[cnt]);
-+		if (toputinode[cnt]) {
-+			down(&dqopt->dqonoff_sem);
-+			/* If quota was reenabled in the meantime, we have
-+			 * nothing to do */
-+			if (!sb_has_quota_enabled(sb, cnt)) {
-+				down(&toputinode[cnt]->i_sem);
-+				toputinode[cnt]->i_flags &= ~(S_IMMUTABLE |
-+				  S_NOATIME | S_NOQUOTA);
-+				truncate_inode_pages(&toputinode[cnt]->i_data, 0);
-+				up(&toputinode[cnt]->i_sem);
-+				mark_inode_dirty(toputinode[cnt]);
-+				iput(toputinode[cnt]);
-+			}
-+			up(&dqopt->dqonoff_sem);
-+			/* We don't hold the reference when we turned on quotas
-+			 * just for the journal replay... */
-+			if (toputmnt[cnt])
-+				mntput(toputmnt[cnt]);
-		}
-	invalidate_bdev(sb->s_bdev, 0);
-	return 0;
-@@ -1478,8 +1496,11 @@ int vfs_quota_on(struct super_block *sb,
- 	/* Quota file not on the same filesystem? */
- 	if (nd.mnt->mnt_sb != sb)
- 		error = -EXDEV;
--	else
-+	else {
- 		error = vfs_quota_on_inode(nd.dentry->d_inode, type, format_id);
-+		if (!error)
-+			sb_dqopt(sb)->mnt[type] = mntget(nd.mnt);
-+	}
- out_path:
- 	path_release(&nd);
- 	return error;
-diff -puN include/linux/quota.h~quota-umount-race-fix include/linux/quota.h
---- 25/include/linux/quota.h~quota-umount-race-fix	Tue Nov 23 17:11:34 2004
-+++ 25-akpm/include/linux/quota.h	Tue Nov 23 17:11:34 2004
-@@ -286,6 +286,7 @@ struct quota_info {
- 	struct semaphore dqonoff_sem;		/* Serialize quotaon & quotaoff */
- 	struct rw_semaphore dqptr_sem;		/* serialize ops using quota_info struct, pointers from inode to dquots */
- 	struct inode *files[MAXQUOTAS];		/* inodes of quotafiles */
-+	struct vfsmount *mnt[MAXQUOTAS];	/* mountpoint entries of filesystems with quota files */
- 	struct mem_dqinfo info[MAXQUOTAS];	/* Information for each quota type */
- 	struct quota_format_ops *ops[MAXQUOTAS];	/* Operations for each type */
- };
-diff -puN include/linux/quotaops.h~quota-umount-race-fix include/linux/quotaops.h
---- 25/include/linux/quotaops.h~quota-umount-race-fix	Tue Nov 23 17:11:34 2004
-+++ 25-akpm/include/linux/quotaops.h	Tue Nov 23 17:11:34 2004
-@@ -177,7 +177,7 @@ static __inline__ int DQUOT_OFF(struct s
- {
- 	int ret = -ENOSYS;
- 
--	if (sb->s_qcop && sb->s_qcop->quota_off)
-+	if (sb_any_quota_enabled(sb) && sb->s_qcop && sb->s_qcop->quota_off)
- 		ret = sb->s_qcop->quota_off(sb, -1);
- 	return ret;
- }
-_
diff --git a/lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch b/lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch
deleted file mode 100644
index be8f6c24f6ab762b994950e67804ef373bd74cf0..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-configurable-cachesize-rhel5.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
---- linux-2.6.18-53.orig/drivers/md/raid5.c	2007-12-06 17:23:39.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/raid5.c	2007-12-06 17:24:14.000000000 +0800
-@@ -57,7 +57,7 @@
-  * Stripe cache
-  */
- 
--#define NR_STRIPES		256
-+static int raid5_nr_stripes = 256 * 8;
- #define STRIPE_SIZE		PAGE_SIZE
- #define STRIPE_SHIFT		(PAGE_SHIFT - 9)
- #define STRIPE_SECTORS		(STRIPE_SIZE>>9)
-@@ -3230,7 +3230,7 @@ static int run(mddev_t *mddev)
- 	else
- 		conf->max_degraded = 1;
- 	conf->algorithm = mddev->layout;
--	conf->max_nr_stripes = NR_STRIPES;
-+	conf->max_nr_stripes = raid5_nr_stripes;
- 	conf->expand_progress = mddev->reshape_position;
- 
- 	/* device size must be a multiple of chunk size */
-@@ -3821,6 +3821,7 @@ static void raid5_exit(void)
- 
- module_init(raid5_init);
- module_exit(raid5_exit);
-+module_param(raid5_nr_stripes, int, 0644);
- MODULE_LICENSE("GPL");
- MODULE_ALIAS("md-personality-4"); /* RAID5 */
- MODULE_ALIAS("md-raid5");
-Only in linux-2.6.18-53/drivers/md: raid5.c.orig
-Only in linux-2.6.18-53.orig/include/linux/raid: .raid5.h.swp
diff --git a/lustre/kernel_patches/patches/raid5-configurable-cachesize.patch b/lustre/kernel_patches/patches/raid5-configurable-cachesize.patch
deleted file mode 100644
index 70458722e411a81bd8d56ddb94b555c68e2cf332..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-configurable-cachesize.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-Adds a module parameter to control raid5's internal cache size.
-
-Index: linux-2.6.9/drivers/md/raid5.c
-===================================================================
---- linux-2.6.9.orig/drivers/md/raid5.c	2006-05-21 17:57:25.000000000 +0400
-+++ linux-2.6.9/drivers/md/raid5.c	2006-05-22 00:01:30.000000000 +0400
-@@ -28,7 +28,8 @@
-  * Stripe cache
-  */
- 
--#define NR_STRIPES		256
-+static int raid5_nr_stripes = 256 * 8;
-+
- #define STRIPE_SIZE		PAGE_SIZE
- #define STRIPE_SHIFT		(PAGE_SHIFT - 9)
- #define STRIPE_SECTORS		(STRIPE_SIZE>>9)
-@@ -92,7 +93,7 @@ static inline void __release_stripe(raid
- 			list_add_tail(&sh->lru, &conf->inactive_list);
- 			atomic_dec(&conf->active_stripes);
- 			if (!conf->inactive_blocked ||
--			    atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4))
-+			    atomic_read(&conf->active_stripes) < (conf->max_nr_stripes*3/4))
- 				wake_up(&conf->wait_for_stripe);
- 		}
- 	}
-@@ -255,7 +256,7 @@ static struct stripe_head *get_active_st
- 				conf->inactive_blocked = 1;
- 				wait_event_lock_irq(conf->wait_for_stripe,
- 						    !list_empty(&conf->inactive_list) &&
--						    (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4)
-+						    (atomic_read(&conf->active_stripes) < (conf->max_nr_stripes *3/4)
- 						     || !conf->inactive_blocked),
- 						    conf->device_lock,
- 						    unplug_slaves(conf->mddev);
-@@ -1637,7 +1638,7 @@ static int run (mddev_t *mddev)
- 	conf->chunk_size = mddev->chunk_size;
- 	conf->level = mddev->level;
- 	conf->algorithm = mddev->layout;
--	conf->max_nr_stripes = NR_STRIPES;
-+	conf->max_nr_stripes = raid5_nr_stripes;
- 
- 	/* device size must be a multiple of chunk size */
- 	mddev->size &= ~(mddev->chunk_size/1024 -1);
-@@ -1957,5 +1958,6 @@ static void raid5_exit (void)
- 
- module_init(raid5_init);
- module_exit(raid5_exit);
-+module_param(raid5_nr_stripes, int, 0644);
- MODULE_LICENSE("GPL");
- MODULE_ALIAS("md-personality-4"); /* RAID5 */
diff --git a/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch b/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch
deleted file mode 100644
index a41561151174168750436698be857c9d550332f4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-large-io-rhel5.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
---- linux-2.6.18-53.orig/drivers/md/raid5.c	2007-12-06 17:26:27.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/raid5.c	2007-12-06 17:26:55.000000000 +0800
-@@ -3340,6 +3340,11 @@ static int run(mddev_t *mddev)
- 	mddev->array_size =  mddev->size * (conf->previous_raid_disks -
- 					    conf->max_degraded);
- 
-+	/* in order to support large I/Os */
-+	blk_queue_max_sectors(mddev->queue, conf->chunk_size * conf->previous_raid_disks >> 9);
-+	mddev->queue->max_phys_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;
-+	mddev->queue->max_hw_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;;
-+
- 	return 0;
- abort:
- 	if (conf) {
diff --git a/lustre/kernel_patches/patches/raid5-large-io.patch b/lustre/kernel_patches/patches/raid5-large-io.patch
deleted file mode 100644
index 591e6c428976a5cd47b847b97512cd4f7466c127..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-large-io.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-This patch changes max request size to <chunk size> * <disks>
-in order to allow Lustre to submit large I/Os and avoid
-unnecessary reads.
-
-Index: linux-2.6.9/drivers/md/raid5.c
-===================================================================
---- linux-2.6.9.orig/drivers/md/raid5.c	2006-05-22 00:01:30.000000000 +0400
-+++ linux-2.6.9/drivers/md/raid5.c	2006-05-22 00:09:56.000000000 +0400
-@@ -1609,6 +1609,11 @@ static int run (mddev_t *mddev)
- 	mddev->queue->unplug_fn = raid5_unplug_device;
- 	mddev->queue->issue_flush_fn = raid5_issue_flush;
- 
-+	/* in order to support large I/Os */
-+	blk_queue_max_sectors(mddev->queue, mddev->chunk_size * mddev->raid_disks >> 9);
-+	mddev->queue->max_phys_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT;
-+	mddev->queue->max_hw_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT;;
-+
- 	PRINTK("raid5: run(%s) called.\n", mdname(mddev));
- 
- 	ITERATE_RDEV(mddev,rdev,tmp) {
diff --git a/lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch b/lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch
deleted file mode 100644
index 735af2cf979064dbb0b682d6390c7f4816a25794..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-merge-ios-rhel5.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
---- linux-2.6.18-53.orig/drivers/md/raid5.c	2007-12-28 18:55:24.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/raid5.c	2007-12-28 19:08:15.000000000 +0800
-@@ -1277,7 +1277,26 @@ static void compute_block_2(struct strip
- 	}
- }
- 
-+/*
-+ * The whole idea is to collect all bio's and then issue them
-+ * disk by disk to assist merging a bit -bzzz
-+ */
-+static void raid5_flush_bios(raid5_conf_t *conf, struct bio *bios[], int raid_disks)
-+{
-+	struct bio *bio, *nbio;
-+	int i;
- 
-+	for (i = 0; i < raid_disks; i++) {
-+		bio = bios[i];
-+		while (bio) {
-+			nbio = bio->bi_next;
-+			bio->bi_next = NULL;
-+			generic_make_request(bio);
-+			bio = nbio;
-+		}
-+		bios[i] = NULL;
-+	}
-+}
- 
- /*
-  * Each stripe/dev can have one or more bion attached.
-@@ -1392,7 +1411,7 @@ static int stripe_to_pdidx(sector_t stri
-  *
-  */
-  
--static void handle_stripe5(struct stripe_head *sh)
-+static void handle_stripe5(struct stripe_head *sh, struct bio *bios[])
- {
- 	raid5_conf_t *conf = sh->raid_conf;
- 	int disks = sh->disks;
-@@ -1939,7 +1958,11 @@ static void handle_stripe5(struct stripe
- 			    test_bit(R5_ReWrite, &sh->dev[i].flags))
- 				atomic_add(STRIPE_SECTORS, &rdev->corrected_errors);
- 			atomic_inc(&conf->out_reqs_in_queue);
--			generic_make_request(bi);
-+			if (bios) {
-+				bi->bi_next = bios[i];
-+				bios[i] = bi;
-+			} else
-+				generic_make_request(bi);
- 		} else {
- 			if (rw == 1)
- 				set_bit(STRIPE_DEGRADED, &sh->state);
-@@ -1951,7 +1974,7 @@ static void handle_stripe5(struct stripe
- 	}
- }
- 
--static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page)
-+static void handle_stripe6(struct stripe_head *sh, struct page *tmp_page, struct bio *bios[])
- {
- 	raid6_conf_t *conf = sh->raid_conf;
- 	int disks = conf->raid_disks;
-@@ -2499,7 +2522,11 @@ static void handle_stripe6(struct stripe
- 			if (rw == WRITE &&
- 			    test_bit(R5_ReWrite, &sh->dev[i].flags))
- 				atomic_add(STRIPE_SECTORS, &rdev->corrected_errors);
--			generic_make_request(bi);
-+			if (bios) {
-+				bi->bi_next = bios[i];
-+				bios[i] = bi;
-+			} else
-+				generic_make_request(bi);
- 			atomic_inc(&conf->out_reqs_in_queue);
- 		} else {
- 			if (rw == 1)
-@@ -2512,12 +2539,12 @@ static void handle_stripe6(struct stripe
- 	}
- }
- 
--static void handle_stripe(struct stripe_head *sh, struct page *tmp_page)
-+static void handle_stripe(struct stripe_head *sh, struct page *tmp_page, struct bio *bios[])
- {
- 	if (sh->raid_conf->level == 6)
--		handle_stripe6(sh, tmp_page);
-+		handle_stripe6(sh, tmp_page, bios);
- 	else
--		handle_stripe5(sh);
-+		handle_stripe5(sh, bios);
- }
- 
- 
-@@ -2670,6 +2697,7 @@ static int make_request(request_queue_t 
- 	int stripes_per_chunk, sectors_per_block;
- 	int sectors_per_stripe;
- 	int i, j;
-+	struct bio *bios[MD_SB_DISKS];
- 
- 	DEFINE_WAIT(w);
- 	int disks, data_disks;
-@@ -2698,6 +2726,7 @@ static int make_request(request_queue_t 
- 	sectors = bi->bi_size >> 9;
- 	stripes_per_chunk = conf->chunk_size / STRIPE_SIZE;
- 
-+	memset(&bios, 0, sizeof(bios));
- redo_bio:
- 	/* stripe by stripe handle needs a stable raid layout, so if this
- 	 * reuqest covers the expanding region, wait it over. 
-@@ -2756,8 +2785,10 @@ retry:
- 					 * the raid layout has been changed, we have to redo the 
- 					 * whole bio because we don't which sectors in it has been
- 					 * done, and which is not done. -jay */
--					if (raid5_redo_bio(conf, bi, disks, logical_sector))
-+					if (raid5_redo_bio(conf, bi, disks, logical_sector)) {
-+						raid5_flush_bios(conf, bios, disks);
- 						goto redo_bio;
-+					}
- 
- 					if (test_bit(STRIPE_EXPANDING, &sh->state)) {
- 						/* Stripe is busy expanding or
-@@ -2766,6 +2797,7 @@ retry:
- 						 */
- 						release_stripe(sh);
- 						sh = NULL;
-+						raid5_flush_bios(conf, bios, disks);
- 						raid5_unplug_device(mddev->queue);
- 						schedule();
- 						goto retry;
-@@ -2784,17 +2816,19 @@ retry:
- 			 */
- 			if (r_sector >= mddev->suspend_lo &&
- 			    r_sector < mddev->suspend_hi) {
--				handle_stripe(sh, NULL);
-+				handle_stripe(sh, NULL, NULL);
- 				release_stripe(sh);
- 				sh = NULL;
-+				raid5_flush_bios(conf, bios, disks);
- 				schedule();
- 				goto retry;
- 			}
- 
- 			if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
--				handle_stripe(sh, NULL);
-+				handle_stripe(sh, NULL, NULL);
- 				release_stripe(sh);
- 				sh = NULL;
-+				raid5_flush_bios(conf, bios, disks);
- 				raid5_unplug_device(mddev->queue);
- 				schedule();
- 				goto retry;
-@@ -2810,7 +2844,7 @@ retry:
- 			r_sector += sectors_per_chunk;
- 		}
- 		if (sh) {
--			handle_stripe(sh, NULL);
-+			handle_stripe(sh, NULL, NULL);
- 			release_stripe(sh);
- 			sh = NULL;
- 		}
-@@ -2820,6 +2854,9 @@ retry:
- 	if (sectors > 0)
- 		goto repeat;
- 
-+	/* flush all of the bios */
-+	raid5_flush_bios(conf, bios, disks);
-+
- 	spin_lock_irq(&conf->device_lock);
- 	remaining = --bi->bi_phys_segments;
- 	spin_unlock_irq(&conf->device_lock);
-@@ -3035,7 +3072,7 @@ static inline sector_t sync_request(mdde
- 	clear_bit(STRIPE_INSYNC, &sh->state);
- 	spin_unlock(&sh->lock);
- 
--	handle_stripe(sh, NULL);
-+	handle_stripe(sh, NULL, NULL);
- 	release_stripe(sh);
- 
- 	return STRIPE_SECTORS;
-@@ -3091,7 +3128,7 @@ static void raid5d (mddev_t *mddev)
- 		
- 		handled++;
- 		atomic_inc(&conf->handled_in_raid5d);
--		handle_stripe(sh, conf->spare_page);
-+		handle_stripe(sh, conf->spare_page, NULL);
- 		release_stripe(sh);
- 
- 		spin_lock_irq(&conf->device_lock);
diff --git a/lustre/kernel_patches/patches/raid5-merge-ios.patch b/lustre/kernel_patches/patches/raid5-merge-ios.patch
deleted file mode 100644
index 3f5cbbca4fff69b1b4761bf72dae77a98a468da0..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-merge-ios.patch
+++ /dev/null
@@ -1,129 +0,0 @@
-Merge IO requests to try and get larger requests on underlying drives.
-
-Index: linux-2.6.9/drivers/md/raid5.c
-===================================================================
---- linux-2.6.9.orig/drivers/md/raid5.c	2006-05-22 00:10:04.000000000 +0400
-+++ linux-2.6.9/drivers/md/raid5.c	2006-05-22 00:10:06.000000000 +0400
-@@ -934,6 +934,26 @@ static void add_stripe_bio (struct strip
- 	}
- }
- 
-+/*
-+ * The whole idea is to collect all bio's and then issue them
-+ * disk by disk to assist merging a bit -bzzz
-+ */
-+static void raid5_flush_bios(raid5_conf_t *conf, struct bio *bios[], int raid_disks)
-+{
-+	struct bio *bio, *nbio;
-+	int i;
-+
-+	for (i = 0; i < raid_disks; i++) {
-+		bio = bios[i];
-+		while (bio) {
-+			nbio = bio->bi_next;
-+			bio->bi_next = NULL;
-+			generic_make_request(bio);
-+			bio = nbio;
-+		}
-+		bios[i] = NULL;
-+	}
-+}
- 
- /*
-  * handle_stripe - do things to a stripe.
-@@ -953,7 +973,7 @@ static void add_stripe_bio (struct strip
-  *
-  */
-  
--static void handle_stripe(struct stripe_head *sh)
-+static void handle_stripe(struct stripe_head *sh, struct bio *bios[])
- {
- 	raid5_conf_t *conf = sh->raid_conf;
- 	int disks = conf->raid_disks;
-@@ -1376,7 +1396,11 @@ static void handle_stripe(struct stripe_
- 			bi->bi_size = STRIPE_SIZE;
- 			bi->bi_next = NULL;
- 			atomic_inc(&conf->out_reqs_in_queue);
--			generic_make_request(bi);
-+			if (bios) {
-+				bi->bi_next = bios[i];
-+				bios[i] = bi;
-+			} else
-+				generic_make_request(bi);
- 		} else {
- 			PRINTK("skip op %ld on disc %d for sector %llu\n",
- 				bi->bi_rw, i, (unsigned long long)sh->sector);
-@@ -1501,6 +1525,7 @@ static int make_request (request_queue_t
- 	int sectors_per_chunk = conf->chunk_size >> 9;
- 	int stripes_per_chunk, sectors_per_block;
- 	int sectors_per_stripe;
-+	struct bio *bios[MD_SB_DISKS];
- 	int i, j;
- 
- 	atomic_inc(&conf->in_reqs_in_queue);
-@@ -1530,6 +1555,7 @@ static int make_request (request_queue_t
- 	sector_div(block, sectors_per_block);
- 	sectors = bi->bi_size >> 9;
- 
-+	memset(&bios, 0, sizeof(bios));
- repeat:
- 	stripe = block * sectors_per_block / data_disks;
- 	b_sector = stripe * data_disks;
-@@ -1549,9 +1575,17 @@ repeat:
- 			new_sector = raid5_compute_sector(r_sector, raid_disks,
- 							data_disks, &dd_idx, 
- 							&pd_idx, conf);
--			if (sh == NULL)
--				sh = get_active_stripe(conf, new_sector, pd_idx,
--							(bi->bi_rw&RWA_MASK));
-+			if (sh == NULL) {
-+				/* first, try to get stripe w/o blocking
-+				 * if we can't, then it's time to submit
-+				 * all collected bio's in order to free
-+				 * some space in the cache -bzzz */
-+				sh = get_active_stripe(conf, new_sector, pd_idx, 1);
-+				if (!sh && !(bi->bi_rw&RWA_MASK)) {
-+					raid5_flush_bios(conf, bios, raid_disks);
-+					sh = get_active_stripe(conf, new_sector, pd_idx, 0);
-+				}
-+			}
- 			if (sh) {
- 				add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
- 			} else {
-@@ -1571,7 +1605,7 @@ repeat:
- 		}
- 		if (sh) {
- 			raid5_plug_device(conf);
--			handle_stripe(sh);
-+			handle_stripe(sh, bios);
- 			release_stripe(sh);
- 			sh = NULL;
- 		}
-@@ -1581,6 +1615,9 @@ repeat:
- 	if (sectors > 0)
- 		goto repeat;
- 
-+	/* now flush all bio's */
-+	raid5_flush_bios(conf, bios, raid_disks);
-+
- 	spin_lock_irq(&conf->device_lock);
- 	if (--bi->bi_phys_segments == 0) {
- 		int bytes = bi->bi_size;
-@@ -1636,7 +1673,7 @@ static int sync_request (mddev_t *mddev,
- 	clear_bit(STRIPE_INSYNC, &sh->state);
- 	spin_unlock(&sh->lock);
- 
--	handle_stripe(sh);
-+	handle_stripe(sh, NULL);
- 	release_stripe(sh);
- 
- 	return STRIPE_SECTORS;
-@@ -1685,7 +1722,7 @@ static void raid5d (mddev_t *mddev)
- 		
- 		handled++;
- 		atomic_inc(&conf->handled_in_raid5d);
--		handle_stripe(sh);
-+		handle_stripe(sh, NULL);
- 		release_stripe(sh);
- 
- 		spin_lock_irq(&conf->device_lock);
diff --git a/lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch b/lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch
deleted file mode 100644
index d3c989c7f58f230003c41f2c299d86871c3853fd..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-serialize-ovelapping-reqs.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-RAID5 wasn't designed to support overlapping requests because
-in Linux all I/Os are serialized by page/buffer lock.  As Lustre
-doesn't use pagecache on server, we need to serialize I/Os in RAID5.
-
-Index: linux-2.6.9/include/linux/raid/raid5.h
-===================================================================
---- linux-2.6.9.orig/include/linux/raid/raid5.h	2006-05-22 00:11:21.000000000 +0400
-+++ linux-2.6.9/include/linux/raid/raid5.h	2006-05-22 00:11:21.000000000 +0400
-@@ -134,6 +134,7 @@ struct stripe_head {
- 	unsigned long		state;			/* state flags */
- 	atomic_t		count;			/* nr of active thread/requests */
- 	spinlock_t		lock;
-+	wait_queue_head_t	wait;			/* waitchan for overlapped bio's */
- 	struct r5dev {
- 		struct bio	req;
- 		struct bio_vec	vec;
-Index: linux-2.6.9/drivers/md/raid5.c
-===================================================================
---- linux-2.6.9.orig/drivers/md/raid5.c	2006-05-22 00:11:21.000000000 +0400
-+++ linux-2.6.9/drivers/md/raid5.c	2006-05-22 00:19:27.000000000 +0400
-@@ -308,6 +308,7 @@ static int grow_stripes(raid5_conf_t *co
- 		memset(sh, 0, sizeof(*sh) + (devs-1)*sizeof(struct r5dev));
- 		sh->raid_conf = conf;
- 		sh->lock = SPIN_LOCK_UNLOCKED;
-+		init_waitqueue_head(&sh->wait);
- 
- 		if (grow_buffers(sh, conf->raid_disks)) {
- 			shrink_buffers(sh, conf->raid_disks);
-@@ -878,6 +879,9 @@ static void compute_parity(struct stripe
- 		set_bit(R5_LOCKED,   &sh->dev[pd_idx].flags);
- 	} else
- 		clear_bit(R5_UPTODATE, &sh->dev[pd_idx].flags);
-+
-+	/* probably someone waits for our completion? */
-+	wake_up(&sh->wait);
- }
- 
- /*
-@@ -885,7 +889,7 @@ static void compute_parity(struct stripe
-  * toread/towrite point to the first in a chain. 
-  * The bi_next chain must be in order.
-  */
--static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
-+static int add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
- {
- 	struct bio **bip;
- 	raid5_conf_t *conf = sh->raid_conf;
-@@ -894,13 +898,21 @@ static void add_stripe_bio (struct strip
- 		(unsigned long long)bi->bi_sector,
- 		(unsigned long long)sh->sector);
- 
--
- 	spin_lock(&sh->lock);
- 	spin_lock_irq(&conf->device_lock);
- 	if (forwrite)
- 		bip = &sh->dev[dd_idx].towrite;
- 	else
- 		bip = &sh->dev[dd_idx].toread;
-+
-+#if 1
-+	if (*bip) {
-+		/* overlapping bio, let's wait till first one is completed */
-+		spin_unlock_irq(&conf->device_lock);
-+		spin_unlock(&sh->lock);
-+		return 1;
-+	}
-+#else
- 	while (*bip && (*bip)->bi_sector < bi->bi_sector) {
- 		BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector);
- 		bip = & (*bip)->bi_next;
-@@ -910,6 +922,7 @@ static void add_stripe_bio (struct strip
- 		BUG();
- 	if (*bip)
- 		bi->bi_next = *bip;
-+#endif
- 	*bip = bi;
- 	bi->bi_phys_segments ++;
- 	spin_unlock_irq(&conf->device_lock);
-@@ -932,6 +945,7 @@ static void add_stripe_bio (struct strip
- 		if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS)
- 			set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags);
- 	}
-+	return 0;
- }
- 
- /*
-@@ -1014,6 +1028,7 @@ static void handle_stripe(struct stripe_
- 			rbi = dev->toread;
- 			dev->toread = NULL;
- 			spin_unlock_irq(&conf->device_lock);
-+			wake_up(&sh->wait);
- 			while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 				copy_data(0, rbi, dev->page, dev->sector);
- 				rbi2 = r5_next_bio(rbi, dev->sector);
-@@ -1059,6 +1074,7 @@ static void handle_stripe(struct stripe_
- 			bi = sh->dev[i].towrite;
- 			sh->dev[i].towrite = NULL;
- 			if (bi) to_write--;
-+			wake_up(&sh->wait);
- 
- 			while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 				struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
-@@ -1511,6 +1527,16 @@ static inline void raid5_plug_device(rai
- 	spin_unlock_irq(&conf->device_lock);
- }
- 
-+static inline void raid5_wait_stripe(struct stripe_head *sh, int dd_idx, int forwrite)
-+{
-+	struct bio **bip;
-+	if (forwrite)
-+		bip = &sh->dev[dd_idx].towrite;
-+	else
-+		bip = &sh->dev[dd_idx].toread;
-+	wait_event(sh->wait, *bip == NULL);
-+}
-+
- static int make_request (request_queue_t *q, struct bio * bi)
- {
- 	mddev_t *mddev = q->queuedata;
-@@ -1580,6 +1606,7 @@ repeat:
- 				 * if we can't, then it's time to submit
- 				 * all collected bio's in order to free
- 				 * some space in the cache -bzzz */
-+try_stripe:
- 				sh = get_active_stripe(conf, new_sector, pd_idx, 1);
- 				if (!sh && !(bi->bi_rw&RWA_MASK)) {
- 					raid5_flush_bios(conf, bios, raid_disks);
-@@ -1587,7 +1614,11 @@ repeat:
- 				}
- 			}
- 			if (sh) {
--				add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
-+				if (add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
-+					release_stripe(sh);
-+					raid5_wait_stripe(sh, dd_idx, bi->bi_rw&RW_MASK);
-+					goto try_stripe;
-+				}
- 			} else {
- 				/* cannot get stripe for read-ahead, just give-up */
- 				clear_bit(BIO_UPTODATE, &bi->bi_flags);
diff --git a/lustre/kernel_patches/patches/raid5-stats-rhel5.patch b/lustre/kernel_patches/patches/raid5-stats-rhel5.patch
deleted file mode 100644
index d1e43d6966f3069acfef8ed44b2277ba6577fef5..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-stats-rhel5.patch
+++ /dev/null
@@ -1,256 +0,0 @@
-diff -pru linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
---- linux-2.6.18-53.orig/drivers/md/raid5.c	2007-12-06 17:15:22.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/raid5.c	2007-12-06 17:17:30.000000000 +0800
-@@ -115,10 +115,12 @@ static void __release_stripe(raid5_conf_
- 			if (test_bit(STRIPE_DELAYED, &sh->state)) {
- 				list_add_tail(&sh->lru, &conf->delayed_list);
- 				blk_plug_device(conf->mddev->queue);
-+				atomic_inc(&conf->delayed);
- 			} else if (test_bit(STRIPE_BIT_DELAY, &sh->state) &&
- 				   sh->bm_seq - conf->seq_write > 0) {
- 				list_add_tail(&sh->lru, &conf->bitmap_list);
- 				blk_plug_device(conf->mddev->queue);
-+				atomic_inc(&conf->bit_delayed);
- 			} else {
- 				clear_bit(STRIPE_BIT_DELAY, &sh->state);
- 				list_add_tail(&sh->lru, &conf->handle_list);
-@@ -289,6 +291,7 @@ static struct stripe_head *get_active_st
- 			if (noblock && sh == NULL)
- 				break;
- 			if (!sh) {
-+				atomic_inc(&conf->out_of_stripes);
- 				conf->inactive_blocked = 1;
- 				wait_event_lock_irq(conf->wait_for_stripe,
- 						    !list_empty(&conf->inactive_list) &&
-@@ -311,6 +314,10 @@ static struct stripe_head *get_active_st
- 				    !test_bit(STRIPE_EXPANDING, &sh->state))
- 					BUG();
- 				list_del_init(&sh->lru);
-+				if (test_bit(STRIPE_DELAYED, &sh->state))
-+					atomic_dec(&conf->delayed);
-+				if (test_bit(STRIPE_BIT_DELAY, &sh->state))
-+					atomic_dec(&conf->bit_delayed);
- 			}
- 		}
- 	} while (sh == NULL);
-@@ -529,6 +536,8 @@ static int raid5_end_read_request(struct
- 	if (bi->bi_size)
- 		return 1;
- 
-+	atomic_dec(&conf->out_reqs_in_queue);
-+
- 	for (i=0 ; i<disks; i++)
- 		if (bi == &sh->dev[i].req)
- 			break;
-@@ -642,6 +651,8 @@ static int raid5_end_write_request (stru
- 	if (bi->bi_size)
- 		return 1;
- 
-+	atomic_dec(&conf->out_reqs_in_queue);
-+
- 	for (i=0 ; i<disks; i++)
- 		if (bi == &sh->dev[i].req)
- 			break;
-@@ -1402,6 +1413,8 @@ static void handle_stripe5(struct stripe
- 	clear_bit(STRIPE_HANDLE, &sh->state);
- 	clear_bit(STRIPE_DELAYED, &sh->state);
- 
-+	atomic_inc(&conf->handle_called);
-+
- 	syncing = test_bit(STRIPE_SYNCING, &sh->state);
- 	expanding = test_bit(STRIPE_EXPAND_SOURCE, &sh->state);
- 	expanded = test_bit(STRIPE_EXPAND_READY, &sh->state);
-@@ -1684,6 +1697,7 @@ static void handle_stripe5(struct stripe
- 						set_bit(R5_LOCKED, &dev->flags);
- 						set_bit(R5_Wantread, &dev->flags);
- 						locked++;
-+						atomic_inc(&conf->reads_for_rmw);
- 					} else {
- 						set_bit(STRIPE_DELAYED, &sh->state);
- 						set_bit(STRIPE_HANDLE, &sh->state);
-@@ -1703,6 +1717,7 @@ static void handle_stripe5(struct stripe
- 						set_bit(R5_LOCKED, &dev->flags);
- 						set_bit(R5_Wantread, &dev->flags);
- 						locked++;
-+						atomic_inc(&conf->reads_for_rcw);
- 					} else {
- 						set_bit(STRIPE_DELAYED, &sh->state);
- 						set_bit(STRIPE_HANDLE, &sh->state);
-@@ -1870,6 +1885,7 @@ static void handle_stripe5(struct stripe
- 		bi->bi_next = NULL;
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 	}
- 	for (i=disks; i-- ;) {
- 		int rw;
-@@ -1885,10 +1901,13 @@ static void handle_stripe5(struct stripe
- 		bi = &sh->dev[i].req;
-  
- 		bi->bi_rw = rw;
--		if (rw)
-+		if (rw) {
-+			atomic_inc(&conf->writes_out);
- 			bi->bi_end_io = raid5_end_write_request;
--		else
-+		} else {
-+			atomic_inc(&conf->reads_out);
- 			bi->bi_end_io = raid5_end_read_request;
-+		}
-  
- 		rcu_read_lock();
- 		rdev = rcu_dereference(conf->disks[i].rdev);
-@@ -1919,6 +1938,7 @@ static void handle_stripe5(struct stripe
- 			if (rw == WRITE &&
- 			    test_bit(R5_ReWrite, &sh->dev[i].flags))
- 				atomic_add(STRIPE_SECTORS, &rdev->corrected_errors);
-+			atomic_inc(&conf->out_reqs_in_queue);
- 			generic_make_request(bi);
- 		} else {
- 			if (rw == 1)
-@@ -1955,6 +1975,8 @@ static void handle_stripe6(struct stripe
- 	clear_bit(STRIPE_HANDLE, &sh->state);
- 	clear_bit(STRIPE_DELAYED, &sh->state);
- 
-+	atomic_inc(&conf->handle_called);
-+
- 	syncing = test_bit(STRIPE_SYNCING, &sh->state);
- 	/* Now to look around and see what can be done */
- 
-@@ -2255,6 +2277,7 @@ static void handle_stripe6(struct stripe
- 						set_bit(R5_LOCKED, &dev->flags);
- 						set_bit(R5_Wantread, &dev->flags);
- 						locked++;
-+						atomic_inc(&conf->reads_for_rcw);
- 					} else {
- 						PRINTK("Request delayed stripe %llu block %d for Reconstruct\n",
- 						       (unsigned long long)sh->sector, i);
-@@ -2423,6 +2446,7 @@ static void handle_stripe6(struct stripe
- 		bi->bi_next = NULL;
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 	}
- 	for (i=disks; i-- ;) {
- 		int rw;
-@@ -2438,10 +2462,13 @@ static void handle_stripe6(struct stripe
- 		bi = &sh->dev[i].req;
- 
- 		bi->bi_rw = rw;
--		if (rw)
-+		if (rw) {
-+			atomic_inc(&conf->writes_out);
- 			bi->bi_end_io = raid5_end_write_request;
--		else
-+		} else {
-+			atomic_inc(&conf->reads_out);
- 			bi->bi_end_io = raid5_end_read_request;
-+		}
- 
- 		rcu_read_lock();
- 		rdev = rcu_dereference(conf->disks[i].rdev);
-@@ -2473,6 +2500,7 @@ static void handle_stripe6(struct stripe
- 			    test_bit(R5_ReWrite, &sh->dev[i].flags))
- 				atomic_add(STRIPE_SECTORS, &rdev->corrected_errors);
- 			generic_make_request(bi);
-+			atomic_inc(&conf->out_reqs_in_queue);
- 		} else {
- 			if (rw == 1)
- 				set_bit(STRIPE_DEGRADED, &sh->state);
-@@ -2506,6 +2534,7 @@ static void raid5_activate_delayed(raid5
- 			if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
- 				atomic_inc(&conf->preread_active_stripes);
- 			list_add_tail(&sh->lru, &conf->handle_list);
-+			atomic_dec(&conf->delayed);
- 		}
- 	}
- }
-@@ -2608,6 +2637,8 @@ static int make_request(request_queue_t 
- 	const int rw = bio_data_dir(bi);
- 	int remaining;
- 
-+	atomic_inc(&conf->in_reqs_in_queue);
-+
- 	if (unlikely(bio_barrier(bi))) {
- 		bio_endio(bi, bi->bi_size, -EOPNOTSUPP);
- 		return 0;
-@@ -2617,6 +2648,11 @@ static int make_request(request_queue_t 
- 
- 	disk_stat_inc(mddev->gendisk, ios[rw]);
- 	disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bi));
-+	if (rw == WRITE)
-+		atomic_inc(&conf->writes_in);
-+	else
-+		atomic_inc(&conf->reads_in);
-+
- 
- 	logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
- 	last_sector = bi->bi_sector + (bi->bi_size>>9);
-@@ -2724,6 +2760,7 @@ static int make_request(request_queue_t 
- 
- 		if ( rw == WRITE )
- 			md_write_end(mddev);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
- 	}
-@@ -2985,6 +3022,7 @@ static void raid5d (mddev_t *mddev)
- 		spin_unlock_irq(&conf->device_lock);
- 		
- 		handled++;
-+		atomic_inc(&conf->handled_in_raid5d);
- 		handle_stripe(sh, conf->spare_page);
- 		release_stripe(sh);
- 
-@@ -3381,6 +3419,21 @@ static void status (struct seq_file *seq
- 			       conf->disks[i].rdev &&
- 			       test_bit(In_sync, &conf->disks[i].rdev->flags) ? "U" : "_");
- 	seq_printf (seq, "]");
-+	seq_printf (seq, "\n\t\tin: %u reads, %u writes; out: %u reads, %u writes",
-+			atomic_read(&conf->reads_in), atomic_read(&conf->writes_in),
-+			atomic_read(&conf->reads_out), atomic_read(&conf->writes_out));
-+	seq_printf (seq, "\n\t\t%u in raid5d, %u out of stripes, %u handle called",
-+			atomic_read(&conf->handled_in_raid5d),
-+			atomic_read(&conf->out_of_stripes),
-+			atomic_read(&conf->handle_called));
-+	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw",
-+			atomic_read(&conf->reads_for_rmw),
-+			atomic_read(&conf->reads_for_rcw));
-+	seq_printf (seq, "\n\t\t%u delayed, %u bit delayed, %u active, queues: %u in, %u out\n",
-+			atomic_read(&conf->delayed), atomic_read(&conf->bit_delayed),
-+			atomic_read(&conf->active_stripes),
-+			atomic_read(&conf->in_reqs_in_queue),
-+			atomic_read(&conf->out_reqs_in_queue));
- #if RAID5_DEBUG
- 	seq_printf (seq, "\n");
- 	printall(seq, conf);
-diff -pru linux-2.6.18-53.orig/include/linux/raid/raid5.h linux-2.6.18-53/include/linux/raid/raid5.h
---- linux-2.6.18-53.orig/include/linux/raid/raid5.h	2007-12-06 17:15:22.000000000 +0800
-+++ linux-2.6.18-53/include/linux/raid/raid5.h	2007-12-06 17:15:32.000000000 +0800
-@@ -259,6 +259,25 @@ struct raid5_private_data {
- 	int			pool_size; /* number of disks in stripeheads in pool */
- 	spinlock_t		device_lock;
- 	struct disk_info	*disks;
-+
-+	/*
-+	 * Stats
-+	 */
-+	atomic_t		reads_in;
-+	atomic_t		writes_in;
-+	atomic_t		reads_out;
-+	atomic_t		writes_out;
-+	atomic_t		handled_in_raid5d;
-+	atomic_t		out_of_stripes;
-+	atomic_t		reads_for_rmw;
-+	atomic_t		reads_for_rcw;
-+	atomic_t		writes_zcopy;
-+	atomic_t		writes_copied;
-+	atomic_t		handle_called;
-+	atomic_t		delayed;
-+	atomic_t		bit_delayed;
-+	atomic_t		in_reqs_in_queue;
-+	atomic_t		out_reqs_in_queue;
- };
- 
- typedef struct raid5_private_data raid5_conf_t;
-Only in linux-2.6.18-53.orig/include/linux/raid: .raid5.h.swp
diff --git a/lustre/kernel_patches/patches/raid5-stats.patch b/lustre/kernel_patches/patches/raid5-stats.patch
deleted file mode 100644
index 1308009cb1775f1af203efc15e62ddc8241fd5f6..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-stats.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-Add RAID statistics counters to /proc/mdstat
-
-Index: linux-2.6.9/include/linux/raid/raid5.h
-===================================================================
---- linux-2.6.9.orig/include/linux/raid/raid5.h	2004-10-19 01:54:55.000000000 +0400
-+++ linux-2.6.9/include/linux/raid/raid5.h	2006-05-17 14:10:53.000000000 +0400
-@@ -222,6 +222,22 @@ struct raid5_private_data {
- 	int			inactive_blocked;	/* release of inactive stripes blocked,
- 							 * waiting for 25% to be free
- 							 */        
-+	/*
-+	 * Stats
-+	 */
-+	atomic_t		reads_in;
-+	atomic_t		writes_in;
-+	atomic_t		reads_out;
-+	atomic_t		writes_out;
-+	atomic_t		handled_in_raid5d;
-+	atomic_t		out_of_stripes;
-+	atomic_t		reads_for_rmw;
-+	atomic_t		reads_for_rcw;
-+	atomic_t		handle_called;
-+	atomic_t		delayed;
-+	atomic_t		in_reqs_in_queue;
-+	atomic_t		out_reqs_in_queue;
-+
- 	spinlock_t		device_lock;
- 	struct disk_info	disks[0];
- };
-Index: linux-2.6.9/drivers/md/raid5.c
-===================================================================
---- linux-2.6.9.orig/drivers/md/raid5.c	2006-03-10 18:20:48.000000000 +0300
-+++ linux-2.6.9/drivers/md/raid5.c	2006-05-17 14:10:53.000000000 +0400
-@@ -77,9 +77,10 @@ static inline void __release_stripe(raid
- 		if (atomic_read(&conf->active_stripes)==0)
- 			BUG();
- 		if (test_bit(STRIPE_HANDLE, &sh->state)) {
--			if (test_bit(STRIPE_DELAYED, &sh->state))
-+			if (test_bit(STRIPE_DELAYED, &sh->state)) {
- 				list_add_tail(&sh->lru, &conf->delayed_list);
--			else
-+				atomic_inc(&conf->delayed);
-+			} else
- 				list_add_tail(&sh->lru, &conf->handle_list);
- 			md_wakeup_thread(conf->mddev->thread);
- 		} else {
-@@ -250,6 +251,7 @@ static struct stripe_head *get_active_st
- 			if (noblock && sh == NULL)
- 				break;
- 			if (!sh) {
-+				atomic_inc(&conf->out_of_stripes);
- 				conf->inactive_blocked = 1;
- 				wait_event_lock_irq(conf->wait_for_stripe,
- 						    !list_empty(&conf->inactive_list) &&
-@@ -271,6 +273,8 @@ static struct stripe_head *get_active_st
- 				if (list_empty(&sh->lru))
- 					BUG();
- 				list_del_init(&sh->lru);
-+				if (test_bit(STRIPE_DELAYED, &sh->state))
-+					atomic_dec(&conf->delayed);
- 			}
- 		}
- 	} while (sh == NULL);
-@@ -349,6 +353,8 @@ static int raid5_end_read_request (struc
- 	if (bi->bi_size)
- 		return 1;
- 
-+	atomic_dec(&conf->out_reqs_in_queue);
-+
- 	for (i=0 ; i<disks; i++)
- 		if (bi == &sh->dev[i].req)
- 			break;
-@@ -422,6 +428,8 @@ static int raid5_end_write_request (stru
- 	if (bi->bi_size)
- 		return 1;
- 
-+	atomic_dec(&conf->out_reqs_in_queue);
-+
- 	for (i=0 ; i<disks; i++)
- 		if (bi == &sh->dev[i].req)
- 			break;
-@@ -882,6 +890,7 @@ static void handle_stripe(struct stripe_
- 	spin_lock(&sh->lock);
- 	clear_bit(STRIPE_HANDLE, &sh->state);
- 	clear_bit(STRIPE_DELAYED, &sh->state);
-+	atomic_inc(&conf->handle_called);
- 
- 	syncing = test_bit(STRIPE_SYNCING, &sh->state);
- 	/* Now to look around and see what can be done */
-@@ -1127,6 +1136,7 @@ static void handle_stripe(struct stripe_
- 						set_bit(R5_LOCKED, &dev->flags);
- 						set_bit(R5_Wantread, &dev->flags);
- 						locked++;
-+						atomic_inc(&conf->reads_for_rmw);
- 					} else {
- 						set_bit(STRIPE_DELAYED, &sh->state);
- 						set_bit(STRIPE_HANDLE, &sh->state);
-@@ -1146,6 +1156,7 @@ static void handle_stripe(struct stripe_
- 						set_bit(R5_LOCKED, &dev->flags);
- 						set_bit(R5_Wantread, &dev->flags);
- 						locked++;
-+						atomic_inc(&conf->reads_for_rcw);
- 					} else {
- 						set_bit(STRIPE_DELAYED, &sh->state);
- 						set_bit(STRIPE_HANDLE, &sh->state);
-@@ -1228,6 +1239,7 @@ static void handle_stripe(struct stripe_
- 		bi->bi_next = NULL;
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 	}
- 	for (i=disks; i-- ;) {
- 		int rw;
-@@ -1243,10 +1255,13 @@ static void handle_stripe(struct stripe_
- 		bi = &sh->dev[i].req;
-  
- 		bi->bi_rw = rw;
--		if (rw)
-+		if (rw) {
-+			atomic_inc(&conf->writes_out);
- 			bi->bi_end_io = raid5_end_write_request;
--		else
-+		} else {
-+			atomic_inc(&conf->reads_out);
- 			bi->bi_end_io = raid5_end_read_request;
-+		}
-  
- 		spin_lock_irq(&conf->device_lock);
- 		rdev = conf->disks[i].rdev;
-@@ -1274,6 +1289,7 @@ static void handle_stripe(struct stripe_
- 			bi->bi_io_vec[0].bv_offset = 0;
- 			bi->bi_size = STRIPE_SIZE;
- 			bi->bi_next = NULL;
-+			atomic_inc(&conf->out_reqs_in_queue);
- 			generic_make_request(bi);
- 		} else {
- 			PRINTK("skip op %ld on disc %d for sector %llu\n",
-@@ -1296,6 +1312,7 @@ static inline void raid5_activate_delaye
- 			if (!test_and_set_bit(STRIPE_PREREAD_ACTIVE, &sh->state))
- 				atomic_inc(&conf->preread_active_stripes);
- 			list_add_tail(&sh->lru, &conf->handle_list);
-+			atomic_dec(&conf->delayed);
- 		}
- 	}
- }
-@@ -1395,12 +1412,16 @@ static int make_request (request_queue_t
- 	sector_t logical_sector, last_sector;
- 	struct stripe_head *sh;
- 
-+	atomic_inc(&conf->in_reqs_in_queue);
-+
- 	if (bio_data_dir(bi)==WRITE) {
- 		disk_stat_inc(mddev->gendisk, writes);
- 		disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi));
-+		atomic_inc(&conf->writes_in);
- 	} else {
- 		disk_stat_inc(mddev->gendisk, reads);
- 		disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bi));
-+		atomic_inc(&conf->reads_in);
- 	}
- 
- 	logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
-@@ -1439,6 +1460,7 @@ static int make_request (request_queue_t
- 
- 		if ( bio_data_dir(bi) == WRITE )
- 			md_write_end(mddev);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
- 	}
-@@ -1535,6 +1557,7 @@ static void raid5d (mddev_t *mddev)
- 		spin_unlock_irq(&conf->device_lock);
- 		
- 		handled++;
-+		atomic_inc(&conf->handled_in_raid5d);
- 		handle_stripe(sh);
- 		release_stripe(sh);
- 
-@@ -1767,6 +1790,21 @@ static void status (struct seq_file *seq
- 			       conf->disks[i].rdev &&
- 			       conf->disks[i].rdev->in_sync ? "U" : "_");
- 	seq_printf (seq, "]");
-+	seq_printf (seq, "\n\t\tin: %u reads, %u writes; out: %u reads, %u writes",
-+			atomic_read(&conf->reads_in), atomic_read(&conf->writes_in),
-+			atomic_read(&conf->reads_out), atomic_read(&conf->writes_out));
-+	seq_printf (seq, "\n\t\t%u in raid5d, %u out of stripes, %u handle called",
-+			atomic_read(&conf->handled_in_raid5d),
-+			atomic_read(&conf->out_of_stripes),
-+			atomic_read(&conf->handle_called));
-+	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw",
-+			atomic_read(&conf->reads_for_rmw),
-+			atomic_read(&conf->reads_for_rcw));
-+	seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n",
-+			atomic_read(&conf->delayed),
-+			atomic_read(&conf->active_stripes),
-+			atomic_read(&conf->in_reqs_in_queue),
-+			atomic_read(&conf->out_reqs_in_queue));
- #if RAID5_DEBUG
- #define D(x) \
- 	seq_printf (seq, "<"#x":%d>", atomic_read(&conf->x))
diff --git a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch b/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch
deleted file mode 100644
index 4b72d953ff1743c55827bfa091b818f5871eca7b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling-rhel5.patch
+++ /dev/null
@@ -1,284 +0,0 @@
-diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
---- linux-2.6.18-53.orig/drivers/md/raid5.c	2007-12-28 14:55:08.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/raid5.c	2007-12-28 18:52:08.000000000 +0800
-@@ -2626,6 +2626,35 @@ static int raid5_issue_flush(request_que
- 	return ret;
- }
- 
-+static inline int raid5_expanding_overlap(raid5_conf_t *conf, struct bio *bi)
-+{
-+	sector_t first_sector, last_sector;
-+
-+	if (likely(conf->expand_progress == MaxSector))
-+		return 0;
-+
-+	first_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
-+	last_sector = bi->bi_sector + (bi->bi_size>>9);
-+
-+	return (first_sector < conf->expand_progress &&
-+		last_sector >= conf->expand_lo);
-+}
-+
-+static inline int raid5_redo_bio(raid5_conf_t *conf, struct bio *bi, int disks, sector_t sector)
-+{
-+	int redo = 0;
-+
-+	if (likely(conf->expand_progress == MaxSector))
-+		return 0;
-+
-+	spin_lock_irq(&conf->device_lock);
-+	redo = (raid5_expanding_overlap(conf, bi) ||
-+		(unlikely(sector < conf->expand_progress) &&
-+		disks == conf->previous_raid_disks));
-+	spin_unlock_irq(&conf->device_lock);
-+	return redo;
-+}
-+
- static int make_request(request_queue_t *q, struct bio * bi)
- {
- 	mddev_t *mddev = q->queuedata;
-@@ -2636,6 +2665,14 @@ static int make_request(request_queue_t 
- 	struct stripe_head *sh;
- 	const int rw = bio_data_dir(bi);
- 	int remaining;
-+	sector_t stripe, sectors, block, r_sector, b_sector;
-+	int sectors_per_chunk = conf->chunk_size >> 9;
-+	int stripes_per_chunk, sectors_per_block;
-+	int sectors_per_stripe;
-+	int i, j;
-+
-+	DEFINE_WAIT(w);
-+	int disks, data_disks;
- 
- 	atomic_inc(&conf->in_reqs_in_queue);
- 
-@@ -2653,105 +2690,136 @@ static int make_request(request_queue_t 
- 	else
- 		atomic_inc(&conf->reads_in);
- 
--
- 	logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
- 	last_sector = bi->bi_sector + (bi->bi_size>>9);
- 	bi->bi_next = NULL;
- 	bi->bi_phys_segments = 1;	/* over-loaded to count active stripes */
- 
--	for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
--		DEFINE_WAIT(w);
--		int disks, data_disks;
--
--	retry:
--		prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE);
--		if (likely(conf->expand_progress == MaxSector))
--			disks = conf->raid_disks;
--		else {
--			/* spinlock is needed as expand_progress may be
--			 * 64bit on a 32bit platform, and so it might be
--			 * possible to see a half-updated value
--			 * Ofcourse expand_progress could change after
--			 * the lock is dropped, so once we get a reference
--			 * to the stripe that we think it is, we will have
--			 * to check again.
--			 */
--			spin_lock_irq(&conf->device_lock);
--			disks = conf->raid_disks;
--			if (logical_sector >= conf->expand_progress)
--				disks = conf->previous_raid_disks;
--			else {
--				if (logical_sector >= conf->expand_lo) {
--					spin_unlock_irq(&conf->device_lock);
--					schedule();
--					goto retry;
--				}
--			}
--			spin_unlock_irq(&conf->device_lock);
--		}
--		data_disks = disks - conf->max_degraded;
-+	sectors = bi->bi_size >> 9;
-+	stripes_per_chunk = conf->chunk_size / STRIPE_SIZE;
- 
-- 		new_sector = raid5_compute_sector(logical_sector, disks, data_disks,
--						  &dd_idx, &pd_idx, conf);
--		PRINTK("raid5: make_request, sector %llu logical %llu\n",
--			(unsigned long long)new_sector, 
--			(unsigned long long)logical_sector);
-+redo_bio:
-+	/* stripe by stripe handle needs a stable raid layout, so if this
-+	 * reuqest covers the expanding region, wait it over. 
-+	 * Furthermore, we may get here with partial request handled, so
-+	 * wait for the bi_phys_segment to be 1 also. -jay */
-+	spin_lock_irq(&conf->device_lock);
-+	wait_event_lock_irq(conf->wait_for_overlap,
-+			(bi->bi_phys_segments == 1) &&
-+			!raid5_expanding_overlap(conf, bi),
-+			conf->device_lock,
-+			(unplug_slaves(conf->mddev), atomic_inc(&conf->expanding_overlap)));
-+
-+	disks = conf->raid_disks;
-+	if (unlikely(logical_sector >= conf->expand_progress))
-+		disks = conf->previous_raid_disks;
-+	data_disks = disks - conf->max_degraded;
-+	spin_unlock_irq(&conf->device_lock);
- 
--		sh = get_active_stripe(conf, new_sector, disks, pd_idx, (bi->bi_rw&RWA_MASK));
--		if (sh) {
--			if (unlikely(conf->expand_progress != MaxSector)) {
--				/* expansion might have moved on while waiting for a
--				 * stripe, so we must do the range check again.
--				 * Expansion could still move past after this
--				 * test, but as we are holding a reference to
--				 * 'sh', we know that if that happens,
--				 *  STRIPE_EXPANDING will get set and the expansion
--				 * won't proceed until we finish with the stripe.
--				 */
--				int must_retry = 0;
--				spin_lock_irq(&conf->device_lock);
--				if (logical_sector <  conf->expand_progress &&
--				    disks == conf->previous_raid_disks)
--					/* mismatch, need to try again */
--					must_retry = 1;
--				spin_unlock_irq(&conf->device_lock);
--				if (must_retry) {
--					release_stripe(sh);
--					goto retry;
-+	/* compute the block # */
-+	sectors_per_stripe = STRIPE_SECTORS * data_disks;
-+	sectors_per_block = stripes_per_chunk * sectors_per_stripe;
-+
-+	block = logical_sector & ~((sector_t)sectors_per_block - 1);
-+	sector_div(block, sectors_per_block);
-+
-+repeat:
-+	stripe = block * (sectors_per_block / data_disks);
-+	b_sector = stripe * data_disks;
-+	/* iterate through all stripes in this block,
-+	 * where block is a set of internal stripes
-+	 * which covers chunk */
-+
-+	for (i = 0; i < stripes_per_chunk && sectors > 0; i++) {
-+		r_sector = b_sector + (i * STRIPE_SECTORS);
-+		sh = NULL;
-+		/* iterrate through all pages in the stripe */
-+		for (j = 0; j < data_disks && sectors > 0; j++) {
-+			DEFINE_WAIT(w);
-+
-+			if (r_sector + STRIPE_SECTORS <= bi->bi_sector ||
-+			    r_sector >= last_sector) {
-+				r_sector += sectors_per_chunk;
-+				continue;
-+			}
-+
-+retry:
-+			prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE);
-+			new_sector = raid5_compute_sector(r_sector, disks,
-+							data_disks, &dd_idx,
-+							&pd_idx, conf);
-+			if (sh == NULL) {
-+				sh = get_active_stripe(conf, new_sector, disks, pd_idx,
-+							(bi->bi_rw&RWA_MASK));
-+				if (sh) {
-+					/* we're handling the bio stripe by stripe, so when we found
-+					 * the raid layout has been changed, we have to redo the 
-+					 * whole bio because we don't which sectors in it has been
-+					 * done, and which is not done. -jay */
-+					if (raid5_redo_bio(conf, bi, disks, logical_sector))
-+						goto redo_bio;
-+
-+					if (test_bit(STRIPE_EXPANDING, &sh->state)) {
-+						/* Stripe is busy expanding or
-+						 * add failed due to overlap.  Flush everything
-+						 * and wait a while
-+						 */
-+						release_stripe(sh);
-+						sh = NULL;
-+						raid5_unplug_device(mddev->queue);
-+						schedule();
-+						goto retry;
-+					}
-+				} else {
-+					/* cannot get stripe for read-ahead, just give-up */
-+					finish_wait(&conf->wait_for_overlap, &w);
-+					clear_bit(BIO_UPTODATE, &bi->bi_flags);
-+					sectors = 0;
-+					break;
- 				}
- 			}
-+
- 			/* FIXME what if we get a false positive because these
- 			 * are being updated.
- 			 */
--			if (logical_sector >= mddev->suspend_lo &&
--			    logical_sector < mddev->suspend_hi) {
-+			if (r_sector >= mddev->suspend_lo &&
-+			    r_sector < mddev->suspend_hi) {
-+				handle_stripe(sh, NULL);
- 				release_stripe(sh);
-+				sh = NULL;
- 				schedule();
- 				goto retry;
- 			}
- 
--			if (test_bit(STRIPE_EXPANDING, &sh->state) ||
--			    !add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
--				/* Stripe is busy expanding or
--				 * add failed due to overlap.  Flush everything
--				 * and wait a while
--				 */
--				raid5_unplug_device(mddev->queue);
-+			if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
-+				handle_stripe(sh, NULL);
- 				release_stripe(sh);
-+				sh = NULL;
-+				raid5_unplug_device(mddev->queue);
- 				schedule();
- 				goto retry;
- 			}
- 			finish_wait(&conf->wait_for_overlap, &w);
-+
-+			BUG_ON (new_sector != stripe);
-+			sectors -= STRIPE_SECTORS;
-+			if (bi->bi_sector > r_sector)
-+				sectors += bi->bi_sector - r_sector;
-+			if (r_sector + STRIPE_SECTORS > last_sector)
-+				sectors += r_sector + STRIPE_SECTORS - last_sector;
-+			r_sector += sectors_per_chunk;
-+		}
-+		if (sh) {
- 			handle_stripe(sh, NULL);
- 			release_stripe(sh);
--		} else {
--			/* cannot get stripe for read-ahead, just give-up */
--			clear_bit(BIO_UPTODATE, &bi->bi_flags);
--			finish_wait(&conf->wait_for_overlap, &w);
--			break;
-+			sh = NULL;
- 		}
--			
-+		stripe += STRIPE_SECTORS;
- 	}
-+	block++;
-+	if (sectors > 0)
-+		goto repeat;
-+
- 	spin_lock_irq(&conf->device_lock);
- 	remaining = --bi->bi_phys_segments;
- 	spin_unlock_irq(&conf->device_lock);
-@@ -3439,6 +3507,8 @@ static void status (struct seq_file *seq
- 			atomic_read(&conf->active_stripes),
- 			atomic_read(&conf->in_reqs_in_queue),
- 			atomic_read(&conf->out_reqs_in_queue));
-+	seq_printf (seq, "\t\t%u expanding overlap\n",
-+			atomic_read(&conf->expanding_overlap));
- #if RAID5_DEBUG
- 	seq_printf (seq, "\n");
- 	printall(seq, conf);
-diff -pur linux-2.6.18-53.orig/include/linux/raid/raid5.h linux-2.6.18-53/include/linux/raid/raid5.h
---- linux-2.6.18-53.orig/include/linux/raid/raid5.h	2007-12-28 14:55:08.000000000 +0800
-+++ linux-2.6.18-53/include/linux/raid/raid5.h	2007-12-28 18:09:37.000000000 +0800
-@@ -278,6 +278,7 @@ struct raid5_private_data {
- 	atomic_t		bit_delayed;
- 	atomic_t		in_reqs_in_queue;
- 	atomic_t		out_reqs_in_queue;
-+	atomic_t		expanding_overlap;
- };
- 
- typedef struct raid5_private_data raid5_conf_t;
diff --git a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch b/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch
deleted file mode 100644
index d86a42ab4e69966693a795e4647de7fe8913fac8..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-stripe-by-stripe-handling.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-Helps to avoid unnesessary reads if request covers full stripe.
-
-Note that reads needed to update parity hurt performance badly
-
-Index: linux-2.6.9/drivers/md/raid5.c
-===================================================================
---- linux-2.6.9.orig/drivers/md/raid5.c	2006-05-22 00:09:56.000000000 +0400
-+++ linux-2.6.9/drivers/md/raid5.c	2006-05-22 00:10:01.000000000 +0400
-@@ -1412,6 +1412,11 @@ static int make_request (request_queue_t
- 	sector_t new_sector;
- 	sector_t logical_sector, last_sector;
- 	struct stripe_head *sh;
-+	sector_t stripe, sectors, block, r_sector, b_sector;
-+	int sectors_per_chunk = conf->chunk_size >> 9;
-+	int stripes_per_chunk, sectors_per_block;
-+	int sectors_per_stripe;
-+	int i, j;
- 
- 	atomic_inc(&conf->in_reqs_in_queue);
- 
-@@ -1431,30 +1436,66 @@ static int make_request (request_queue_t
- 	bi->bi_phys_segments = 1;	/* over-loaded to count active stripes */
- 	if ( bio_data_dir(bi) == WRITE )
- 		md_write_start(mddev);
--	for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
--		
--		new_sector = raid5_compute_sector(logical_sector,
--						  raid_disks, data_disks, &dd_idx, &pd_idx, conf);
--
--		PRINTK("raid5: make_request, sector %Lu logical %Lu\n",
--			(unsigned long long)new_sector, 
--			(unsigned long long)logical_sector);
- 
--		sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
-+	stripes_per_chunk = conf->chunk_size / STRIPE_SIZE;
-+	sectors_per_stripe = STRIPE_SECTORS * data_disks;
-+	sectors_per_block = stripes_per_chunk * sectors_per_stripe;
-+
-+	block = logical_sector & ~((sector_t)sectors_per_block - 1);
-+	sector_div(block, sectors_per_block);
-+	sectors = bi->bi_size >> 9;
-+
-+repeat:
-+	stripe = block * (sectors_per_block / data_disks);
-+	b_sector = stripe * data_disks;
-+	/* iterate through all stripes in this block,
-+	 * where block is a set of internal stripes
-+	 * which covers chunk */
-+	for (i = 0; i < stripes_per_chunk && sectors > 0; i++) {
-+		r_sector = b_sector + (i * STRIPE_SECTORS);
-+		sh = NULL;
-+		/* iterrate through all pages in the stripe */
-+		for (j = 0; j < data_disks && sectors > 0; j++) {
-+			if (r_sector + STRIPE_SECTORS <= bi->bi_sector ||
-+					r_sector >= last_sector) {
-+				r_sector += sectors_per_chunk;
-+				continue;
-+			}
-+			new_sector = raid5_compute_sector(r_sector, raid_disks,
-+							data_disks, &dd_idx, 
-+							&pd_idx, conf);
-+			if (sh == NULL)
-+				sh = get_active_stripe(conf, new_sector, pd_idx,
-+							(bi->bi_rw&RWA_MASK));
-+			if (sh) {
-+				add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
-+			} else {
-+				/* cannot get stripe for read-ahead, just give-up */
-+				clear_bit(BIO_UPTODATE, &bi->bi_flags);
-+				sectors = 0;
-+				break;
-+			}
-+
-+			BUG_ON (new_sector != stripe);
-+			sectors -= STRIPE_SECTORS;
-+			if (bi->bi_sector > r_sector)
-+				sectors += bi->bi_sector - r_sector;
-+			if (r_sector + STRIPE_SECTORS > last_sector)
-+				sectors += r_sector + STRIPE_SECTORS - last_sector;
-+			r_sector += sectors_per_chunk;
-+		}
- 		if (sh) {
--
--			add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
--
- 			raid5_plug_device(conf);
- 			handle_stripe(sh);
- 			release_stripe(sh);
--		} else {
--			/* cannot get stripe for read-ahead, just give-up */
--			clear_bit(BIO_UPTODATE, &bi->bi_flags);
--			break;
-+			sh = NULL;
- 		}
--			
-+		stripe += STRIPE_SECTORS;
- 	}
-+	block++; 
-+	if (sectors > 0)
-+		goto repeat;
-+
- 	spin_lock_irq(&conf->device_lock);
- 	if (--bi->bi_phys_segments == 0) {
- 		int bytes = bi->bi_size;
diff --git a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch b/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch
deleted file mode 100644
index fa929777da7d56b47bd071332cfe6e19f8089b03..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-zerocopy-rhel5.patch
+++ /dev/null
@@ -1,446 +0,0 @@
-diff -pur linux-2.6.18-53.orig/drivers/md/raid5.c linux-2.6.18-53/drivers/md/raid5.c
---- linux-2.6.18-53.orig/drivers/md/raid5.c	2007-12-28 19:09:20.000000000 +0800
-+++ linux-2.6.18-53/drivers/md/raid5.c	2007-12-28 19:09:32.000000000 +0800
-@@ -633,6 +633,7 @@ static int raid5_end_read_request(struct
- 		clear_buffer_uptodate(bh);
- 	}
- #endif
-+	BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags));
- 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 	set_bit(STRIPE_HANDLE, &sh->state);
- 	release_stripe(sh);
-@@ -671,6 +672,10 @@ static int raid5_end_write_request (stru
- 
- 	rdev_dec_pending(conf->disks[i].rdev, conf->mddev);
- 	
-+	if (test_bit(R5_Direct, &sh->dev[i].flags)) {
-+		BUG_ON(sh->dev[i].req.bi_io_vec[0].bv_page == sh->dev[i].page);
-+		sh->dev[i].req.bi_io_vec[0].bv_page = sh->dev[i].page;
-+	}
- 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 	set_bit(STRIPE_HANDLE, &sh->state);
- 	__release_stripe(conf, sh);
-@@ -911,7 +916,27 @@ static sector_t compute_blocknr(struct s
- 	return r_sector;
- }
- 
-+static struct page *zero_copy_data(struct bio *bio, sector_t sector)
-+{
-+	sector_t bi_sector = bio->bi_sector;
-+	struct page *page = NULL;
-+	struct bio_vec *bvl;
-+	int i;
- 
-+	bio_for_each_segment(bvl, bio, i) {
-+		if (sector == bi_sector)
-+			page = bio_iovec_idx(bio, i)->bv_page;
-+		bi_sector += bio_iovec_idx(bio, i)->bv_len >> 9;
-+		if (bi_sector >= sector + STRIPE_SECTORS) {
-+			/* check if the stripe is covered by one page */
-+			if (page == bio_iovec_idx(bio, i)->bv_page &&
-+			    PageConstant(page))
-+				return page;
-+			return NULL;
-+		}
-+	}
-+	return NULL;
-+}
- 
- /*
-  * Copy data between a page in the stripe cache, and one or more bion
-@@ -1003,8 +1028,9 @@ static void compute_parity5(struct strip
- {
- 	raid5_conf_t *conf = sh->raid_conf;
- 	int i, pd_idx = sh->pd_idx, disks = sh->disks, count;
--	void *ptr[MAX_XOR_BLOCKS];
-+	void *ptr[MAX_XOR_BLOCKS], *h_ptr[2];
- 	struct bio *chosen;
-+	struct page *page;
- 
- 	PRINTK("compute_parity5, stripe %llu, method %d\n",
- 		(unsigned long long)sh->sector, method);
-@@ -1054,34 +1080,90 @@ static void compute_parity5(struct strip
- 		count = 1;
- 	}
- 	
--	for (i = disks; i--;)
--		if (sh->dev[i].written) {
--			sector_t sector = sh->dev[i].sector;
--			struct bio *wbi = sh->dev[i].written;
--			while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
--				copy_data(1, wbi, sh->dev[i].page, sector);
--				wbi = r5_next_bio(wbi, sector);
-+	for (i = disks; i--;) {
-+		struct r5dev *dev = &sh->dev[i];
-+		struct bio *wbi = dev->written;
-+		sector_t sector;
-+
-+		if (!wbi)
-+			continue;
-+
-+		sector = dev->sector;
-+		set_bit(R5_LOCKED, &sh->dev[i].flags);
-+		BUG_ON(test_bit(R5_Direct, &dev->flags));
-+
-+		/* check if it's covered by a single page
-+		   and whole stripe is written at once.
-+		 * in this case we can avoid memcpy() */
-+		if (!wbi->bi_next && test_bit(R5_OVERWRITE, &dev->flags) &&
-+		    test_bit(R5_Insync, &dev->flags)) {
-+			page = zero_copy_data(wbi, sector);
-+			if (page) {
-+				atomic_inc(&conf->writes_zcopy);
-+				dev->req.bi_io_vec[0].bv_page = page;
-+				set_bit(R5_Direct, &dev->flags);
-+				clear_bit(R5_UPTODATE, &sh->dev[i].flags);
-+				clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+				continue;
- 			}
-+		}
- 
--			set_bit(R5_LOCKED, &sh->dev[i].flags);
--			set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		/* do copy write */
-+		atomic_inc(&conf->writes_copied);
-+		clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+		set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
-+			copy_data(1, wbi, sh->dev[i].page, sector);
-+			wbi = r5_next_bio(wbi, sector);
- 		}
-+	}
- 
-+	h_ptr[0] = ptr[0];
- 	switch(method) {
- 	case RECONSTRUCT_WRITE:
- 	case CHECK_PARITY:
--		for (i=disks; i--;)
--			if (i != pd_idx) {
--				ptr[count++] = page_address(sh->dev[i].page);
--				check_xor();
-+		for (i=disks; i--;) {
-+			if (i == pd_idx)
-+				continue;
-+			if (test_bit(R5_Direct, &sh->dev[i].flags))
-+				page = sh->dev[i].req.bi_io_vec[0].bv_page;
-+			else
-+				page = sh->dev[i].page;
-+
-+			/* have to compute the parity immediately for
-+			 * a highmem page. it would happen for zerocopy. -jay
-+			 */
-+			if (PageHighMem(page)) {
-+				h_ptr[1] = kmap_atomic(page, KM_USER0);
-+				xor_block(2, STRIPE_SIZE, h_ptr);
-+				kunmap_atomic(page, KM_USER0);
-+			} else {
-+				ptr[count++] = page_address(page);
- 			}
-+			check_xor();
-+		}
- 		break;
- 	case READ_MODIFY_WRITE:
--		for (i = disks; i--;)
--			if (sh->dev[i].written) {
--				ptr[count++] = page_address(sh->dev[i].page);
--				check_xor();
-+		for (i = disks; i--;) {
-+			if (!sh->dev[i].written)
-+				continue;
-+			if (test_bit(R5_Direct, &sh->dev[i].flags))
-+				page = sh->dev[i].req.bi_io_vec[0].bv_page;
-+			else
-+				page = sh->dev[i].page;
-+
-+			/* have to compute the parity immediately for
-+			 * a highmem page. it would happen for zerocopy. -jay
-+			 */
-+			if (PageHighMem(page)) {
-+				h_ptr[1] = kmap_atomic(page, KM_USER0);
-+				xor_block(2, STRIPE_SIZE, h_ptr);
-+				kunmap_atomic(page, KM_USER0);
-+			} else {
-+				ptr[count++] = page_address(page);
- 			}
-+			check_xor();
-+		}
- 	}
- 	if (count != 1)
- 		xor_block(count, STRIPE_SIZE, ptr);
-@@ -1098,6 +1180,7 @@ static void compute_parity6(struct strip
- 	raid6_conf_t *conf = sh->raid_conf;
- 	int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = conf->raid_disks, count;
- 	struct bio *chosen;
-+	struct page *page;
- 	/**** FIX THIS: This could be very bad if disks is close to 256 ****/
- 	void *ptrs[disks];
- 
-@@ -1127,18 +1210,47 @@ static void compute_parity6(struct strip
- 		BUG();		/* Not implemented yet */
- 	}
- 
--	for (i = disks; i--;)
--		if (sh->dev[i].written) {
--			sector_t sector = sh->dev[i].sector;
--			struct bio *wbi = sh->dev[i].written;
--			while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
--				copy_data(1, wbi, sh->dev[i].page, sector);
--				wbi = r5_next_bio(wbi, sector);
-+	for (i = disks; i--;) {
-+		struct r5dev *dev = &sh->dev[i];
-+		struct bio *wbi = dev->written;
-+		sector_t sector;
-+
-+		if (!wbi)
-+			continue;
-+
-+		sector = sh->dev[i].sector;
-+		set_bit(R5_LOCKED, &sh->dev[i].flags);
-+		BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags));
-+
-+		/* check if it's covered by a single page
-+		 * and whole stripe is written at once.
-+		 * in this case we can avoid memcpy() */
-+		if (!wbi->bi_next && test_bit(R5_Insync, &sh->dev[i].flags) &&
-+		    test_bit(R5_OVERWRITE, &sh->dev[i].flags)) {
-+			page = zero_copy_data(wbi, sector);
-+			/* we don't do zerocopy on a HighMem page. Raid6 tend
-+			 * to prepare all of the pages' content to be accessed
-+			 * before computing PQ parity. If we need to support HighMem
-+			 * page also, we have to modify the gen_syndrome()
-+			 * algorithm. -jay */
-+			if (page && !PageHighMem(page)) {
-+				atomic_inc(&conf->writes_zcopy);
-+				sh->dev[i].req.bi_io_vec[0].bv_page = page;
-+				set_bit(R5_Direct, &sh->dev[i].flags);
-+				clear_bit(R5_UPTODATE, &sh->dev[i].flags);
-+				clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+				continue;
- 			}
-+		}
- 
--			set_bit(R5_LOCKED, &sh->dev[i].flags);
--			set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		atomic_inc(&conf->writes_copied);
-+		clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+		set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
-+			copy_data(1, wbi, sh->dev[i].page, sector);
-+			wbi = r5_next_bio(wbi, sector);
- 		}
-+	}
- 
- //	switch(method) {
- //	case RECONSTRUCT_WRITE:
-@@ -1149,8 +1261,12 @@ static void compute_parity6(struct strip
- 		count = 0;
- 		i = d0_idx;
- 		do {
--			ptrs[count++] = page_address(sh->dev[i].page);
--			if (count <= disks-2 && !test_bit(R5_UPTODATE, &sh->dev[i].flags))
-+			if (test_bit(R5_Direct, &sh->dev[i].flags))
-+				ptrs[count++] = page_address(sh->dev[i].req.bi_io_vec[0].bv_page);
-+			else
-+				ptrs[count++] = page_address(sh->dev[i].page);
-+			if (count <= disks-2 && !test_bit(R5_UPTODATE, &sh->dev[i].flags) &&
-+			    !test_bit(R5_Direct, &sh->dev[i].flags))
- 				printk("block %d/%d not uptodate on parity calc\n", i,count);
- 			i = raid6_next_disk(i, disks);
- 		} while ( i != d0_idx );
-@@ -1597,7 +1713,8 @@ static void handle_stripe5(struct stripe
- 		if (sh->dev[i].written) {
- 		    dev = &sh->dev[i];
- 		    if (!test_bit(R5_LOCKED, &dev->flags) &&
--			 test_bit(R5_UPTODATE, &dev->flags) ) {
-+			 (test_bit(R5_UPTODATE, &dev->flags) ||
-+			  test_bit(R5_Direct, &dev->flags)) ) {
- 			/* We can return any write requests */
- 			    struct bio *wbi, *wbi2;
- 			    int bitmap_end = 0;
-@@ -1605,6 +1722,7 @@ static void handle_stripe5(struct stripe
- 			    spin_lock_irq(&conf->device_lock);
- 			    wbi = dev->written;
- 			    dev->written = NULL;
-+			    clear_bit(R5_Direct, &dev->flags);
- 			    while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 				    wbi2 = r5_next_bio(wbi, dev->sector);
- 				    if (--wbi->bi_phys_segments == 0) {
-@@ -2173,7 +2291,8 @@ static void handle_stripe6(struct stripe
- 			if (sh->dev[i].written) {
- 				dev = &sh->dev[i];
- 				if (!test_bit(R5_LOCKED, &dev->flags) &&
--				    test_bit(R5_UPTODATE, &dev->flags) ) {
-+				    (test_bit(R5_UPTODATE, &dev->flags) ||
-+				     test_bit(R5_Direct, &dev->flags)) ) {
- 					/* We can return any write requests */
- 					int bitmap_end = 0;
- 					struct bio *wbi, *wbi2;
-@@ -2182,6 +2301,7 @@ static void handle_stripe6(struct stripe
- 					spin_lock_irq(&conf->device_lock);
- 					wbi = dev->written;
- 					dev->written = NULL;
-+					clear_bit(R5_Direct, &dev->flags);
- 					while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 						wbi2 = r5_next_bio(wbi, dev->sector);
- 						if (--wbi->bi_phys_segments == 0) {
-@@ -3450,6 +3570,9 @@ static int run(mddev_t *mddev)
- 	mddev->queue->max_phys_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;
- 	mddev->queue->max_hw_segments = conf->chunk_size * conf->previous_raid_disks >> PAGE_SHIFT;;
- 
-+	/* raid5 device is able to do zcopy right now. */
-+	mddev->queue->backing_dev_info.capabilities |= BDI_CAP_PAGE_CONSTANT_WRITE;
-+
- 	return 0;
- abort:
- 	if (conf) {
-@@ -3536,9 +3659,11 @@ static void status (struct seq_file *seq
- 			atomic_read(&conf->handled_in_raid5d),
- 			atomic_read(&conf->out_of_stripes),
- 			atomic_read(&conf->handle_called));
--	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw",
-+	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw. zcopy writes: %u, copied writes: %u",
- 			atomic_read(&conf->reads_for_rmw),
--			atomic_read(&conf->reads_for_rcw));
-+			atomic_read(&conf->reads_for_rcw),
-+			atomic_read(&conf->writes_zcopy),
-+			atomic_read(&conf->writes_copied));
- 	seq_printf (seq, "\n\t\t%u delayed, %u bit delayed, %u active, queues: %u in, %u out\n",
- 			atomic_read(&conf->delayed), atomic_read(&conf->bit_delayed),
- 			atomic_read(&conf->active_stripes),
-diff -pur linux-2.6.18-53.orig/include/linux/backing-dev.h linux-2.6.18-53/include/linux/backing-dev.h
---- linux-2.6.18-53.orig/include/linux/backing-dev.h	2007-12-28 14:49:26.000000000 +0800
-+++ linux-2.6.18-53/include/linux/backing-dev.h	2007-12-28 19:09:32.000000000 +0800
-@@ -48,6 +48,7 @@ struct backing_dev_info {
- #define BDI_CAP_READ_MAP	0x00000010	/* Can be mapped for reading */
- #define BDI_CAP_WRITE_MAP	0x00000020	/* Can be mapped for writing */
- #define BDI_CAP_EXEC_MAP	0x00000040	/* Can be mapped for execution */
-+#define BDI_CAP_PAGE_CONSTANT_WRITE	0x00000080	/* Zcopy write - for raid5 */
- #define BDI_CAP_VMFLAGS \
- 	(BDI_CAP_READ_MAP | BDI_CAP_WRITE_MAP | BDI_CAP_EXEC_MAP)
- 
-@@ -94,11 +95,18 @@ static inline int bdi_rw_congested(struc
- #define bdi_cap_account_dirty(bdi) \
- 	(!((bdi)->capabilities & BDI_CAP_NO_ACCT_DIRTY))
- 
-+#define bdi_cap_page_constant_write(bdi) \
-+	((bdi)->capabilities & BDI_CAP_PAGE_CONSTANT_WRITE)
-+
- #define mapping_cap_writeback_dirty(mapping) \
- 	bdi_cap_writeback_dirty((mapping)->backing_dev_info)
- 
- #define mapping_cap_account_dirty(mapping) \
- 	bdi_cap_account_dirty((mapping)->backing_dev_info)
- 
-+#define mapping_cap_page_constant_write(mapping) \
-+	bdi_cap_page_constant_write((mapping)->backing_dev_info)
-+	
-+
- 
- #endif		/* _LINUX_BACKING_DEV_H */
-diff -pur linux-2.6.18-53.orig/include/linux/page-flags.h linux-2.6.18-53/include/linux/page-flags.h
---- linux-2.6.18-53.orig/include/linux/page-flags.h	2007-12-28 14:49:26.000000000 +0800
-+++ linux-2.6.18-53/include/linux/page-flags.h	2007-12-28 19:09:32.000000000 +0800
-@@ -86,6 +86,7 @@
- #define PG_reclaim		17	/* To be reclaimed asap */
- #define PG_nosave_free		18	/* Free, should not be written */
- #define PG_buddy		19	/* Page is free, on buddy lists */
-+#define PG_constant		20	/* To mark if the page is constant */
- 
- /* PG_owner_priv_1 users should have descriptive aliases */
- #define PG_checked              PG_owner_priv_1 /* Used by some filesystems */
-@@ -252,6 +253,14 @@
- 
- struct page;	/* forward declaration */
- 
-+#define PageConstant(page) 	test_bit(PG_constant, &(page)->flags)
-+#define SetPageConstant(page) 	set_bit(PG_constant, &(page)->flags)
-+#define ClearPageConstant(page) clear_bit(PG_constant, &(page->flags))
-+#define TestSetPageConstant(page) test_and_set_bit(PG_constant, &(page)->flags)
-+
-+extern int set_page_constant(struct page *page);
-+extern void clear_page_constant(struct page *);
-+
- int test_clear_page_dirty(struct page *page);
- int test_clear_page_writeback(struct page *page);
- int test_set_page_writeback(struct page *page);
-diff -pur linux-2.6.18-53.orig/include/linux/raid/raid5.h linux-2.6.18-53/include/linux/raid/raid5.h
---- linux-2.6.18-53.orig/include/linux/raid/raid5.h	2007-12-28 18:55:24.000000000 +0800
-+++ linux-2.6.18-53/include/linux/raid/raid5.h	2007-12-28 19:09:32.000000000 +0800
-@@ -156,8 +156,9 @@ struct stripe_head {
- #define	R5_Overlap	7	/* There is a pending overlapping request on this block */
- #define	R5_ReadError	8	/* seen a read error here recently */
- #define	R5_ReWrite	9	/* have tried to over-write the readerror */
--
- #define	R5_Expanded	10	/* This block now has post-expand data */
-+#define	R5_Direct	11	/* Use the pages in bio to do the write directly. */
-+
- /*
-  * Write method
-  */
-diff -pur linux-2.6.18-53.orig/mm/filemap.c linux-2.6.18-53/mm/filemap.c
---- linux-2.6.18-53.orig/mm/filemap.c	2007-12-28 14:49:26.000000000 +0800
-+++ linux-2.6.18-53/mm/filemap.c	2007-12-28 19:09:32.000000000 +0800
-@@ -30,6 +30,7 @@
- #include <linux/security.h>
- #include <linux/syscalls.h>
- #include <linux/cpuset.h>
-+#include <linux/rmap.h>
- #include "filemap.h"
- #include "internal.h"
- 
-@@ -566,11 +567,55 @@ void end_page_writeback(struct page *pag
- 		if (!test_clear_page_writeback(page))
- 			BUG();
- 	}
-+	clear_page_constant(page);
- 	smp_mb__after_clear_bit();
- 	wake_up_page(page, PG_writeback);
- }
- EXPORT_SYMBOL(end_page_writeback);
- 
-+/* Make a page to be constant, `constant' means any write to this page will
-+ * be blocked until clear_page_constant is called.
-+ * The page lock must be held.
-+ */
-+int set_page_constant(struct page *page)
-+{
-+	BUG_ON(!PageLocked(page));
-+
-+	/* If it's an anonymous page and haven't been added to swap cache,
-+	 * return directly because we have no way to swap this page.
-+	 */
-+	if (page_mapping(page) == NULL)
-+		return SWAP_FAIL;
-+
-+	BUG_ON(!PageUptodate(page));
-+
-+	/* I have to clear page uptodate before trying to remove
-+	 * it from user's page table because otherwise, the page may be
-+	 * reinstalled by a page access which happens between try_to_unmap()
-+	 * and ClearPageUptodate(). -jay
-+	 */
-+	ClearPageUptodate(page);
-+	if (page_mapped(page) && try_to_unmap(page, 0) != SWAP_SUCCESS) {
-+		SetPageUptodate(page);
-+		return SWAP_FAIL;
-+	}
-+	SetPageConstant(page);
-+	return SWAP_SUCCESS;
-+}
-+
-+void clear_page_constant(struct page *page)
-+{
-+	if (PageConstant(page)) {
-+		BUG_ON(!PageLocked(page));
-+		BUG_ON(PageUptodate(page));
-+		ClearPageConstant(page);
-+		SetPageUptodate(page);
-+		unlock_page(page);
-+	}
-+}
-+EXPORT_SYMBOL(set_page_constant);
-+EXPORT_SYMBOL(clear_page_constant);
-+
- /**
-  * __lock_page - get a lock on the page, assuming we need to sleep to get it
-  * @page: the page to lock
diff --git a/lustre/kernel_patches/patches/raid5-zerocopy.patch b/lustre/kernel_patches/patches/raid5-zerocopy.patch
deleted file mode 100644
index 5095906dfbdca8659d00da10eab46fbf93bd9675..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid5-zerocopy.patch
+++ /dev/null
@@ -1,376 +0,0 @@
-diff -pru linux-2.6.9.orig/drivers/md/raid5.c linux-2.6.9/drivers/md/raid5.c
---- linux-2.6.9.orig/drivers/md/raid5.c	2007-07-09 02:43:33.000000000 -0600
-+++ linux-2.6.9/drivers/md/raid5.c	2007-07-13 00:39:15.000000000 -0600
-@@ -412,6 +412,7 @@ static int raid5_end_read_request (struc
- 		clear_buffer_uptodate(bh);
- 	}
- #endif
-+	BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags));
- 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 	set_bit(STRIPE_HANDLE, &sh->state);
- 	release_stripe(sh);
-@@ -450,6 +451,10 @@ static int raid5_end_write_request (stru
- 
- 	rdev_dec_pending(conf->disks[i].rdev, conf->mddev);
- 	
-+	if (test_bit(R5_Direct, &sh->dev[i].flags)) {
-+		BUG_ON(sh->dev[i].req.bi_io_vec[0].bv_page == sh->dev[i].page);
-+		sh->dev[i].req.bi_io_vec[0].bv_page = sh->dev[i].page;
-+	}
- 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 	set_bit(STRIPE_HANDLE, &sh->state);
- 	__release_stripe(conf, sh);
-@@ -620,7 +625,27 @@ static sector_t compute_blocknr(struct s
- 	return r_sector;
- }
- 
-+static struct page *zero_copy_data(struct bio *bio, sector_t sector)
-+{
-+	sector_t bi_sector = bio->bi_sector;
-+	struct page *page = NULL;
-+	struct bio_vec *bvl;
-+	int i;
- 
-+	bio_for_each_segment(bvl, bio, i) {
-+		if (sector == bi_sector)
-+			page = bio_iovec_idx(bio, i)->bv_page;
-+		bi_sector += bio_iovec_idx(bio, i)->bv_len >> 9;
-+		if (bi_sector >= sector + STRIPE_SECTORS) {
-+			/* check if the stripe is covered by one page */
-+			if (page == bio_iovec_idx(bio, i)->bv_page &&
-+			    PageConstant(page))
-+				return page;
-+			return NULL;
-+		}
-+	}
-+	return NULL;
-+}
- 
- /*
-  * Copy data between a page in the stripe cache, and one or more bion
-@@ -716,8 +741,9 @@ static void compute_parity(struct stripe
- {
- 	raid5_conf_t *conf = sh->raid_conf;
- 	int i, pd_idx = sh->pd_idx, disks = conf->raid_disks, count;
--	void *ptr[MAX_XOR_BLOCKS];
-+	void *ptr[MAX_XOR_BLOCKS], *h_ptr[2];
- 	struct bio *chosen;
-+	struct page *page;
- 
- 	PRINTK("compute_parity, stripe %llu, method %d\n",
- 		(unsigned long long)sh->sector, method);
-@@ -744,13 +770,14 @@ static void compute_parity(struct stripe
- 		break;
- 	case RECONSTRUCT_WRITE:
- 		memset(ptr[0], 0, STRIPE_SIZE);
--		for (i= disks; i-- ;)
-+		for (i= disks; i-- ;) {
- 			if (i!=pd_idx && sh->dev[i].towrite) {
- 				chosen = sh->dev[i].towrite;
- 				sh->dev[i].towrite = NULL;
- 				if (sh->dev[i].written) BUG();
- 				sh->dev[i].written = chosen;
- 			}
-+		}
- 		break;
- 	case CHECK_PARITY:
- 		break;
-@@ -760,34 +787,88 @@ static void compute_parity(struct stripe
- 		count = 1;
- 	}
- 	
--	for (i = disks; i--;)
--		if (sh->dev[i].written) {
--			sector_t sector = sh->dev[i].sector;
--			struct bio *wbi = sh->dev[i].written;
--			while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
--				copy_data(1, wbi, sh->dev[i].page, sector);
--				wbi = r5_next_bio(wbi, sector);
-+	for (i = disks; i--;) {
-+		struct bio *wbi = sh->dev[i].written;
-+		sector_t sector;
-+
-+		if (!wbi)
-+			continue;
-+
-+		sector = sh->dev[i].sector;
-+		set_bit(R5_LOCKED, &sh->dev[i].flags);
-+		BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags));
-+
-+		/* check if it's covered by a single page
-+		   and whole stripe is written at once.
-+		 * in this case we can avoid memcpy() */
-+		if (!wbi->bi_next && test_bit(R5_OVERWRITE, &sh->dev[i].flags) &&
-+		    test_bit(R5_Insync, &sh->dev[i].flags)) {
-+			page = zero_copy_data(wbi, sector);
-+			if (page) {
-+				atomic_inc(&conf->writes_zcopy);
-+				sh->dev[i].req.bi_io_vec[0].bv_page = page;
-+				set_bit(R5_Direct, &sh->dev[i].flags);
-+				clear_bit(R5_UPTODATE, &sh->dev[i].flags);
-+				clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+				continue;
- 			}
-+		}
- 
--			set_bit(R5_LOCKED, &sh->dev[i].flags);
--			set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		atomic_inc(&conf->writes_copied);
-+		clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+		set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
-+			copy_data(1, wbi, sh->dev[i].page, sector);
-+			wbi = r5_next_bio(wbi, sector);
- 		}
-+	}
- 
-+	h_ptr[0] = ptr[0];
- 	switch(method) {
- 	case RECONSTRUCT_WRITE:
- 	case CHECK_PARITY:
--		for (i=disks; i--;)
--			if (i != pd_idx) {
--				ptr[count++] = page_address(sh->dev[i].page);
--				check_xor();
-+		for (i=disks; i--;) {
-+			if (i == pd_idx)
-+				continue;
-+			if (test_bit(R5_Direct, &sh->dev[i].flags))
-+				page = sh->dev[i].req.bi_io_vec[0].bv_page;
-+			else
-+				page = sh->dev[i].page;
-+
-+			/* have to compute the parity immediately for
-+			 * a highmem page. it would happen for zerocopy. -jay
-+			 */
-+			if (PageHighMem(page)) {
-+				h_ptr[1] = kmap_atomic(page, KM_USER0);
-+				xor_block(2, STRIPE_SIZE, h_ptr);
-+				kunmap_atomic(page, KM_USER0);
-+			} else {
-+				ptr[count++] = page_address(page);
- 			}
-+			check_xor();
-+		}
- 		break;
- 	case READ_MODIFY_WRITE:
--		for (i = disks; i--;)
--			if (sh->dev[i].written) {
--				ptr[count++] = page_address(sh->dev[i].page);
--				check_xor();
-+		for (i = disks; i--;) {
-+			if (!sh->dev[i].written)
-+				continue;
-+			if (test_bit(R5_Direct, &sh->dev[i].flags))
-+				page = sh->dev[i].req.bi_io_vec[0].bv_page;
-+			else
-+				page = sh->dev[i].page;
-+
-+			/* have to compute the parity immediately for
-+			 * a highmem page. it would happen for zerocopy. -jay
-+			 */
-+			if (PageHighMem(page)) {
-+				h_ptr[1] = kmap_atomic(page, KM_USER0);
-+				xor_block(2, STRIPE_SIZE, h_ptr);
-+				kunmap_atomic(page, KM_USER0);
-+			} else {
-+				ptr[count++] = page_address(page);
- 			}
-+			check_xor();
-+		}
- 	}
- 	if (count != 1)
- 		xor_block(count, STRIPE_SIZE, ptr);
-@@ -1059,13 +1140,15 @@ static void handle_stripe(struct stripe_
- 		if (sh->dev[i].written) {
- 		    dev = &sh->dev[i];
- 		    if (!test_bit(R5_LOCKED, &dev->flags) &&
--			 test_bit(R5_UPTODATE, &dev->flags) ) {
-+			 (test_bit(R5_UPTODATE, &dev->flags) ||
-+			  	test_bit(R5_Direct, &dev->flags)) ) {
- 			/* We can return any write requests */
- 			    struct bio *wbi, *wbi2;
- 			    PRINTK("Return write for disc %d\n", i);
- 			    spin_lock_irq(&conf->device_lock);
- 			    wbi = dev->written;
- 			    dev->written = NULL;
-+			    clear_bit(R5_Direct, &dev->flags);
- 			    while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 				    wbi2 = r5_next_bio(wbi, dev->sector);
- 				    if (--wbi->bi_phys_segments == 0) {
-@@ -1831,6 +1914,7 @@ memory = conf->max_nr_stripes * (sizeof(
- 		if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe)
- 			mddev->queue->backing_dev_info.ra_pages = 2 * stripe;
- 	}
-+	mddev->queue->backing_dev_info.capabilities |= BDI_CAP_PAGE_CONST_WRITE;
- 
- 	/* Ok, everything is just fine now */
- 	mddev->array_size =  mddev->size * (mddev->raid_disks - 1);
-@@ -1918,9 +2002,11 @@ static void status (struct seq_file *seq
- 			atomic_read(&conf->handled_in_raid5d),
- 			atomic_read(&conf->out_of_stripes),
- 			atomic_read(&conf->handle_called));
--	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw",
-+	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw. zcopy writes: %u, copied writes: %u",
- 			atomic_read(&conf->reads_for_rmw),
--			atomic_read(&conf->reads_for_rcw));
-+			atomic_read(&conf->reads_for_rcw),
-+			atomic_read(&conf->writes_zcopy),
-+			atomic_read(&conf->writes_copied));
- 	seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n",
- 			atomic_read(&conf->delayed),
- 			atomic_read(&conf->active_stripes),
-diff -pru linux-2.6.9.orig/include/linux/backing-dev.h linux-2.6.9/include/linux/backing-dev.h
---- linux-2.6.9.orig/include/linux/backing-dev.h	2004-10-18 15:53:46.000000000 -0600
-+++ linux-2.6.9/include/linux/backing-dev.h	2007-07-13 00:12:46.000000000 -0600
-@@ -30,8 +30,11 @@ struct backing_dev_info {
- 	void *congested_data;	/* Pointer to aux data for congested func */
- 	void (*unplug_io_fn)(struct backing_dev_info *, struct page *);
- 	void *unplug_io_data;
-+	unsigned int capabilities;
- };
- 
-+#define BDI_CAP_PAGE_CONST_WRITE      0x00000001
-+
- extern struct backing_dev_info default_backing_dev_info;
- void default_unplug_io_fn(struct backing_dev_info *bdi, struct page *page);
- 
-@@ -62,4 +65,7 @@ static inline int bdi_rw_congested(struc
- 				  (1 << BDI_write_congested));
- }
- 
-+#define mapping_cap_page_constant_write(mapping) \
-+	((mapping)->backing_dev_info->capabilities & BDI_CAP_PAGE_CONST_WRITE)
-+
- #endif		/* _LINUX_BACKING_DEV_H */
-diff -pru linux-2.6.9.orig/include/linux/page-flags.h linux-2.6.9/include/linux/page-flags.h
---- linux-2.6.9.orig/include/linux/page-flags.h	2004-10-18 15:54:39.000000000 -0600
-+++ linux-2.6.9/include/linux/page-flags.h	2007-07-13 00:12:46.000000000 -0600
-@@ -74,6 +74,7 @@
- #define PG_swapcache		16	/* Swap page: swp_entry_t in private */
- #define PG_mappedtodisk		17	/* Has blocks allocated on-disk */
- #define PG_reclaim		18	/* To be reclaimed asap */
-+#define PG_constant		19  /* To mark the page is constant */
- 
- 
- /*
-@@ -298,6 +299,11 @@ extern unsigned long __read_page_state(u
- #define PageSwapCache(page)	0
- #endif
- 
-+#define PageConstant(page) test_bit(PG_constant, &(page)->flags)
-+#define SetPageConstant(page) set_bit(PG_constant, &(page)->flags)
-+#define ClearPageConstant(page) clear_bit(PG_constant, &(page->flags))
-+#define TestSetPageConstant(page) test_and_set_bit(PG_constant, &(page)->flags)
-+
- struct page;	/* forward declaration */
- 
- int test_clear_page_dirty(struct page *page);
-diff -pru linux-2.6.9.orig/include/linux/pagemap.h linux-2.6.9/include/linux/pagemap.h
---- linux-2.6.9.orig/include/linux/pagemap.h	2004-10-18 15:53:06.000000000 -0600
-+++ linux-2.6.9/include/linux/pagemap.h	2007-07-13 00:12:46.000000000 -0600
-@@ -191,6 +191,19 @@ static inline void wait_on_page_writebac
- 
- extern void end_page_writeback(struct page *page);
- 
-+extern int set_page_constant(struct page *page);
-+extern void clear_page_constant(struct page *);
-+static inline int set_page_constant_lock(struct page *page)
-+{
-+        BUG_ON(PageLocked(page));
-+        lock_page(page);
-+        if (set_page_constant(page)) {
-+                unlock_page(page);
-+                return 1;
-+        }
-+        return 0;
-+}
-+
- /*
-  * Fault a userspace page into pagetables.  Return non-zero on a fault.
-  *
-diff -pru linux-2.6.9.orig/include/linux/raid/raid5.h linux-2.6.9/include/linux/raid/raid5.h
---- linux-2.6.9.orig/include/linux/raid/raid5.h	2007-07-09 02:43:33.000000000 -0600
-+++ linux-2.6.9/include/linux/raid/raid5.h	2007-07-13 00:39:15.000000000 -0600
-@@ -153,6 +153,7 @@ struct stripe_head {
- #define	R5_Wantread	4	/* want to schedule a read */
- #define	R5_Wantwrite	5
- #define	R5_Syncio	6	/* this io need to be accounted as resync io */
-+#define	R5_Direct	7	/* use page from passed bio to avoid memcpy */
- 
- /*
-  * Write method
-@@ -234,6 +235,8 @@ struct raid5_private_data {
- 	atomic_t		out_of_stripes;
- 	atomic_t		reads_for_rmw;
- 	atomic_t		reads_for_rcw;
-+	atomic_t 		writes_zcopy;
-+	atomic_t		writes_copied;
- 	atomic_t		handle_called;
- 	atomic_t		delayed;
- 	atomic_t		in_reqs_in_queue;
-diff -pru linux-2.6.9.orig/mm/filemap.c linux-2.6.9/mm/filemap.c
---- linux-2.6.9.orig/mm/filemap.c	2007-07-09 02:43:33.000000000 -0600
-+++ linux-2.6.9/mm/filemap.c	2007-07-13 00:12:46.000000000 -0600
-@@ -27,6 +27,8 @@
- #include <linux/pagevec.h>
- #include <linux/blkdev.h>
- #include <linux/security.h>
-+#include <linux/rmap.h>
-+
- /*
-  * This is needed for the following functions:
-  *  - try_to_release_page
-@@ -486,11 +488,52 @@ void end_page_writeback(struct page *pag
- 			BUG();
- 		smp_mb__after_clear_bit();
- 	}
-+	clear_page_constant(page);
- 	wake_up_page(page);
- }
- 
- EXPORT_SYMBOL(end_page_writeback);
- 
-+/* Mark a page in bio to be constant, page must be locked */
-+int set_page_constant(struct page *page)
-+{
-+	BUG_ON(!PageLocked(page));
-+
-+	/* If it's an anonymous page and haven't been added to swap cache, 
-+	 * do it here.
-+	 */
-+	if (PageAnon(page) && !PageSwapCache(page))
-+		return 1;
-+
-+	BUG_ON(!PageUptodate(page));
-+
-+	/* I have to clear page uptodate before trying to remove
-+	 * it from user's page table because otherwise, the page may be
-+	 * reinstalled by a page access which happens between try_to_unmap()
-+	 * and ClearPageUptodate(). -jay
-+	 */
-+	ClearPageUptodate(page);
-+	if (page_mapped(page) && try_to_unmap(page) != SWAP_SUCCESS) {
-+		SetPageUptodate(page);
-+		return 1;
-+	}
-+	SetPageConstant(page);
-+	return 0;
-+}
-+
-+void clear_page_constant(struct page *page)
-+{
-+	if (PageConstant(page)) {
-+		BUG_ON(!PageLocked(page));
-+		BUG_ON(PageUptodate(page));
-+		ClearPageConstant(page);
-+		SetPageUptodate(page);
-+		unlock_page(page);
-+	}
-+}
-+EXPORT_SYMBOL(set_page_constant);
-+EXPORT_SYMBOL(clear_page_constant);
-+
- /*
-  * Get a lock on the page, assuming we need to sleep to get it.
-  *
diff --git a/lustre/kernel_patches/patches/raid6-configurable-cachesize.patch b/lustre/kernel_patches/patches/raid6-configurable-cachesize.patch
deleted file mode 100644
index fa28bc3528c0bdff8f45bcdc5619042a2595ddbe..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-configurable-cachesize.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- linux-2.6.9.orig/drivers/md/raid6main.c	2006-09-07 23:10:43.000000000 +0800
-+++ linux-2.6.9/drivers/md/raid6main.c	2006-09-07 23:11:25.000000000 +0800
-@@ -33,7 +33,7 @@
-  * Stripe cache
-  */
- 
--#define NR_STRIPES		256
-+static int raid6_nr_stripes = 256 * 8;
- #define STRIPE_SIZE		PAGE_SIZE
- #define STRIPE_SHIFT		(PAGE_SHIFT - 9)
- #define STRIPE_SECTORS		(STRIPE_SIZE>>9)
-@@ -111,7 +111,7 @@ static inline void __release_stripe(raid
- 			list_add_tail(&sh->lru, &conf->inactive_list);
- 			atomic_dec(&conf->active_stripes);
- 			if (!conf->inactive_blocked ||
--			    atomic_read(&conf->active_stripes) < (NR_STRIPES*3/4))
-+			    atomic_read(&conf->active_stripes) < (raid6_nr_stripes*3/4))
- 				wake_up(&conf->wait_for_stripe);
- 		}
- 	}
-@@ -274,7 +274,7 @@ static struct stripe_head *get_active_st
- 				conf->inactive_blocked = 1;
- 				wait_event_lock_irq(conf->wait_for_stripe,
- 						    !list_empty(&conf->inactive_list) &&
--						    (atomic_read(&conf->active_stripes) < (NR_STRIPES *3/4)
-+						    (atomic_read(&conf->active_stripes) < (raid6_nr_stripes *3/4)
- 						     || !conf->inactive_blocked),
- 						    conf->device_lock,
- 						    unplug_slaves(conf->mddev);
-@@ -1805,7 +1805,7 @@ static int run (mddev_t *mddev)
- 	conf->chunk_size = mddev->chunk_size;
- 	conf->level = mddev->level;
- 	conf->algorithm = mddev->layout;
--	conf->max_nr_stripes = NR_STRIPES;
-+	conf->max_nr_stripes = raid6_nr_stripes;
- 
- 	/* device size must be a multiple of chunk size */
- 	mddev->size &= ~(mddev->chunk_size/1024 -1);
-@@ -2139,5 +2139,6 @@ static void raid6_exit (void)
- 
- module_init(raid6_init);
- module_exit(raid6_exit);
-+module_param(raid6_nr_stripes, int, 0644);
- MODULE_LICENSE("GPL");
- MODULE_ALIAS("md-personality-8"); /* RAID6 */
diff --git a/lustre/kernel_patches/patches/raid6-large-io.patch b/lustre/kernel_patches/patches/raid6-large-io.patch
deleted file mode 100644
index 85a7f43ab52c3955798bfb53fb682ebf28bbd616..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-large-io.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- linux-2.6.9.orig/drivers/md/raid6main.c	2006-09-07 23:12:09.000000000 +0800
-+++ linux-2.6.9/drivers/md/raid6main.c	2006-09-07 23:12:44.000000000 +0800
-@@ -1775,6 +1775,11 @@ static int run (mddev_t *mddev)
- 	mddev->queue->unplug_fn = raid6_unplug_device;
- 	mddev->queue->issue_flush_fn = raid6_issue_flush;
- 
-+	/* in order to support large I/Os */
-+	blk_queue_max_sectors(mddev->queue, mddev->chunk_size * mddev->raid_disks >> 9);
-+	mddev->queue->max_phys_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT;
-+	mddev->queue->max_hw_segments = mddev->chunk_size * mddev->raid_disks >> PAGE_SHIFT;
-+
- 	PRINTK("raid6: run(%s) called.\n", mdname(mddev));
- 
- 	ITERATE_RDEV(mddev,rdev,tmp) {
diff --git a/lustre/kernel_patches/patches/raid6-merge-ios.patch b/lustre/kernel_patches/patches/raid6-merge-ios.patch
deleted file mode 100644
index e245ba750039c1d282fc5bae2e7729207656bf44..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-merge-ios.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c
---- linux-2.6.9.orig/drivers/md/raid6main.c	2008-01-10 13:51:32.000000000 +0800
-+++ linux-2.6.9/drivers/md/raid6main.c	2008-01-10 13:52:20.000000000 +0800
-@@ -956,6 +956,26 @@ static void add_stripe_bio (struct strip
- 	}
- }
- 
-+/*
-+ * The whole idea is to collect all bio's and then issue them
-+ * disk by disk to assist merging a bit -bzzz
-+ */
-+static void raid6_flush_bios(raid6_conf_t *conf, struct bio *bios[], int raid_disks)
-+{
-+	struct bio *bio, *nbio;
-+	int i;
-+ 
-+	for (i = 0; i < raid_disks; i++) {
-+		bio = bios[i];
-+		while (bio) {
-+			nbio = bio->bi_next;
-+			bio->bi_next = NULL;
-+			generic_make_request(bio);
-+			bio = nbio;
-+		}
-+		bios[i] = NULL;
-+	}
-+}
- 
- /*
-  * handle_stripe - do things to a stripe.
-@@ -975,7 +995,7 @@ static void add_stripe_bio (struct strip
-  *
-  */
- 
--static void handle_stripe(struct stripe_head *sh)
-+static void handle_stripe(struct stripe_head *sh, struct bio *bios[])
- {
- 	raid6_conf_t *conf = sh->raid_conf;
- 	int disks = conf->raid_disks;
-@@ -1452,7 +1472,11 @@ static void handle_stripe(struct stripe_
- 			bi->bi_size = STRIPE_SIZE;
- 			bi->bi_next = NULL;
- 			atomic_inc(&conf->out_reqs_in_queue);
--			generic_make_request(bi);
-+			if(bios) {
-+				bi->bi_next = bios[i];
-+				bios[i] = bi;
-+			} else 
-+				generic_make_request(bi);
- 		} else {
- 			PRINTK("skip op %ld on disc %d for sector %llu\n",
- 				bi->bi_rw, i, (unsigned long long)sh->sector);
-@@ -1575,6 +1599,7 @@ static int make_request (request_queue_t
- 	int sectors_per_chunk;
- 	int stripes_per_chunk, sectors_per_block;
- 	int sectors_per_stripe;
-+	struct bio *bios[MD_SB_DISKS];
- 	int i, j;
- 
- 	atomic_inc(&conf->in_reqs_in_queue);
-@@ -1611,6 +1636,7 @@ static int make_request (request_queue_t
- 	sector_div(block, sectors_per_block);
- 	sectors = bi->bi_size >> 9;
-  
-+	memset(&bios, 0, sizeof(bios));
-  repeat:
- 	stripe = block * (sectors_per_block / data_disks);
- 	b_sector = stripe * data_disks;
-@@ -1630,9 +1656,17 @@ static int make_request (request_queue_t
- 			new_sector = raid6_compute_sector(r_sector, raid_disks,
- 							data_disks, &dd_idx, 
- 							&pd_idx, conf);
--			if (sh == NULL)
--				sh = get_active_stripe(conf, new_sector, pd_idx,
--							(bi->bi_rw&RWA_MASK));
-+			if (sh == NULL) {
-+				/* first, try to get stripe w/o blocking
-+				 * if we can't, then it's time to submit
-+				 * all collected bio's in order to free
-+				 * some space in the cache -bzzz */
-+				sh = get_active_stripe(conf, new_sector, pd_idx, 1);
-+				if (!sh && !(bi->bi_rw&RWA_MASK)) {
-+					raid6_flush_bios(conf, bios, raid_disks);
-+					sh = get_active_stripe(conf, new_sector, pd_idx, 0);
-+				}
-+			}
- 			if (sh) {
- 				add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
- 			} else {
-@@ -1653,7 +1687,7 @@ static int make_request (request_queue_t
- 
- 		if (sh) {
- 			raid6_plug_device(conf);
--			handle_stripe(sh);
-+			handle_stripe(sh, bios);
- 			release_stripe(sh);
- 			sh = NULL;
- 		}
-@@ -1664,6 +1698,9 @@ static int make_request (request_queue_t
- 	if(sectors > 0)
- 		goto repeat;
- 
-+	/* now flush all bio's */
-+	raid6_flush_bios(conf, bios, raid_disks);
-+
- 	spin_lock_irq(&conf->device_lock);
- 	if (--bi->bi_phys_segments == 0) {
- 		int bytes = bi->bi_size;
-@@ -1719,7 +1756,7 @@ static int sync_request (mddev_t *mddev,
- 	clear_bit(STRIPE_INSYNC, &sh->state);
- 	spin_unlock(&sh->lock);
- 
--	handle_stripe(sh);
-+	handle_stripe(sh, NULL);
- 	release_stripe(sh);
- 
- 	return STRIPE_SECTORS;
-@@ -1769,7 +1806,7 @@ static void raid6d (mddev_t *mddev)
- 		handled++;
- 
- 		atomic_inc(&conf->handled_in_raid5d);
--		handle_stripe(sh);
-+		handle_stripe(sh, NULL);
- 		release_stripe(sh);
- 
- 		spin_lock_irq(&conf->device_lock);
diff --git a/lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch b/lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch
deleted file mode 100644
index 5bc0a3e650865451a5c6113e3b8f11e96b61b462..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-serialize-ovelapping-reqs.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c
---- linux-2.6.9.orig/drivers/md/raid6main.c	2008-01-10 13:55:37.000000000 +0800
-+++ linux-2.6.9/drivers/md/raid6main.c	2008-01-10 13:55:56.000000000 +0800
-@@ -749,6 +749,10 @@ static void compute_parity(struct stripe
- 			if ( i != pd_idx && i != qd_idx && sh->dev[i].towrite ) {
- 				chosen = sh->dev[i].towrite;
- 				sh->dev[i].towrite = NULL;
-+
-+				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
-+					wake_up(&conf->wait_for_overlap);
-+
- 				if (sh->dev[i].written) BUG();
- 				sh->dev[i].written = chosen;
- 			}
-@@ -907,7 +911,7 @@ static void compute_block_2(struct strip
-  * toread/towrite point to the first in a chain.
-  * The bi_next chain must be in order.
-  */
--static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
-+static int add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
- {
- 	struct bio **bip;
- 	raid6_conf_t *conf = sh->raid_conf;
-@@ -924,10 +928,13 @@ static void add_stripe_bio (struct strip
- 	else
- 		bip = &sh->dev[dd_idx].toread;
- 	while (*bip && (*bip)->bi_sector < bi->bi_sector) {
--		BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector);
-+		if((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector)
-+			goto overlap;
- 		bip = & (*bip)->bi_next;
- 	}
--/* FIXME do I need to worry about overlapping bion */
-+	if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9))
-+		goto overlap;
-+
- 	if (*bip && bi->bi_next && (*bip) != bi->bi_next)
- 		BUG();
- 	if (*bip)
-@@ -954,6 +961,14 @@ static void add_stripe_bio (struct strip
- 		if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS)
- 			set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags);
- 	}
-+
-+	return 1;
-+
-+overlap:
-+	set_bit(R5_Overlap, &sh->dev[dd_idx].flags);
-+	spin_unlock_irq(&conf->device_lock);
-+	spin_unlock(&sh->lock);
-+	return 0;
- }
- 
- /*
-@@ -1038,6 +1053,9 @@ static void handle_stripe(struct stripe_
- 			spin_lock_irq(&conf->device_lock);
- 			rbi = dev->toread;
- 			dev->toread = NULL;
-+
-+			if (test_and_clear_bit(R5_Overlap, &dev->flags))
-+				wake_up(&conf->wait_for_overlap);
- 			spin_unlock_irq(&conf->device_lock);
- 			while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 				copy_data(0, rbi, dev->page, dev->sector);
-@@ -1087,6 +1105,9 @@ static void handle_stripe(struct stripe_
- 			sh->dev[i].towrite = NULL;
- 			if (bi) to_write--;
- 
-+			if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
-+				wake_up(&conf->wait_for_overlap);
-+
- 			while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 				struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
- 				clear_bit(BIO_UPTODATE, &bi->bi_flags);
-@@ -1115,6 +1136,8 @@ static void handle_stripe(struct stripe_
- 			if (!test_bit(R5_Insync, &sh->dev[i].flags)) {
- 				bi = sh->dev[i].toread;
- 				sh->dev[i].toread = NULL;
-+				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
-+					wake_up(&conf->wait_for_overlap);
- 				if (bi) to_read--;
- 				while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 					struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
-@@ -1648,6 +1671,8 @@ static int make_request (request_queue_t
- 		sh = NULL;
- 		/* iterrate through all pages in the stripe */
- 		for (j = 0; j < data_disks && sectors > 0; j++) {
-+			DEFINE_WAIT(w);
-+
- 			if (r_sector + STRIPE_SECTORS <= bi->bi_sector ||
- 			    r_sector >= last_sector) {
- 				r_sector += sectors_per_chunk;
-@@ -1656,6 +1681,9 @@ static int make_request (request_queue_t
- 			new_sector = raid6_compute_sector(r_sector, raid_disks,
- 							data_disks, &dd_idx, 
- 							&pd_idx, conf);
-+
-+retry:
-+			prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE);
- 			if (sh == NULL) {
- 				/* first, try to get stripe w/o blocking
- 				 * if we can't, then it's time to submit
-@@ -1668,10 +1696,18 @@ static int make_request (request_queue_t
- 				}
- 			}
- 			if (sh) {
--				add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
-+				if(!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
-+					/* Failed to be added due to overlapped. */
-+					raid6_unplug_device(mddev->queue);
-+					release_stripe(sh);
-+					schedule();
-+					goto retry;
-+				}
-+				finish_wait(&conf->wait_for_overlap, &w);
- 			} else {
- 				/* cannot get stripe for read-ahead, just give-up */
- 				clear_bit(BIO_UPTODATE, &bi->bi_flags);
-+				finish_wait(&conf->wait_for_overlap, &w);
- 				sectors = 0;
- 				break;
- 			}
-@@ -1847,6 +1883,7 @@ static int run (mddev_t *mddev)
- 
- 	conf->device_lock = SPIN_LOCK_UNLOCKED;
- 	init_waitqueue_head(&conf->wait_for_stripe);
-+	init_waitqueue_head(&conf->wait_for_overlap);
- 	INIT_LIST_HEAD(&conf->handle_list);
- 	INIT_LIST_HEAD(&conf->delayed_list);
- 	INIT_LIST_HEAD(&conf->inactive_list);
-diff -pur linux-2.6.9.orig/include/linux/raid/raid5.h linux-2.6.9/include/linux/raid/raid5.h
---- linux-2.6.9.orig/include/linux/raid/raid5.h	2008-01-10 13:46:05.000000000 +0800
-+++ linux-2.6.9/include/linux/raid/raid5.h	2008-01-10 13:55:56.000000000 +0800
-@@ -154,6 +154,8 @@ struct stripe_head {
- #define	R5_Wantwrite	5
- #define	R5_Syncio	6	/* this io need to be accounted as resync io */
- #define	R5_Direct	7	/* use page from passed bio to avoid memcpy */
-+#define	R5_Overlap      8	/* There is a pending overlapping request 
-+					 * on this block */
- 
- /*
-  * Write method
-@@ -221,6 +223,7 @@ struct raid5_private_data {
- 	atomic_t		active_stripes;
- 	struct list_head	inactive_list;
- 	wait_queue_head_t	wait_for_stripe;
-+	wait_queue_head_t	wait_for_overlap;
- 	int			inactive_blocked;	/* release of inactive stripes blocked,
- 							 * waiting for 25% to be free
- 							 */        
diff --git a/lustre/kernel_patches/patches/raid6-stats.patch b/lustre/kernel_patches/patches/raid6-stats.patch
deleted file mode 100644
index c173a088dadc9e918c2d0b9230c04c5ba0a42463..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-stats.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-diff -pur linux-2.6.9-55.0.9.orig/drivers/md/raid6main.c linux-2.6.9-55.0.9/drivers/md/raid6main.c
---- linux-2.6.9-55.0.9.orig/drivers/md/raid6main.c	2007-09-28 17:53:55.000000000 +0800
-+++ linux-2.6.9-55.0.9/drivers/md/raid6main.c	2007-12-13 20:19:11.000000000 +0800
-@@ -96,9 +96,10 @@ static inline void __release_stripe(raid
- 		if (atomic_read(&conf->active_stripes)==0)
- 			BUG();
- 		if (test_bit(STRIPE_HANDLE, &sh->state)) {
--			if (test_bit(STRIPE_DELAYED, &sh->state))
-+			if (test_bit(STRIPE_DELAYED, &sh->state)) {
- 				list_add_tail(&sh->lru, &conf->delayed_list);
--			else
-+				atomic_inc(&conf->delayed);
-+			} else
- 				list_add_tail(&sh->lru, &conf->handle_list);
- 			md_wakeup_thread(conf->mddev->thread);
- 		} else {
-@@ -269,6 +270,7 @@ static struct stripe_head *get_active_st
- 			if (noblock && sh == NULL)
- 				break;
- 			if (!sh) {
-+				atomic_inc(&conf->out_of_stripes);
- 				conf->inactive_blocked = 1;
- 				wait_event_lock_irq(conf->wait_for_stripe,
- 						    !list_empty(&conf->inactive_list) &&
-@@ -290,6 +292,9 @@ static struct stripe_head *get_active_st
- 				if (list_empty(&sh->lru))
- 					BUG();
- 				list_del_init(&sh->lru);
-+				if (test_bit(STRIPE_DELAYED, &sh->state))
-+					atomic_dec(&conf->delayed);
-+
- 			}
- 		}
- 	} while (sh == NULL);
-@@ -368,6 +373,8 @@ static int raid6_end_read_request (struc
- 	if (bi->bi_size)
- 		return 1;
- 
-+	atomic_dec(&conf->out_reqs_in_queue);
-+
- 	for (i=0 ; i<disks; i++)
- 		if (bi == &sh->dev[i].req)
- 			break;
-@@ -445,6 +452,8 @@ static int raid6_end_write_request (stru
- 		if (bi == &sh->dev[i].req)
- 			break;
- 
-+	atomic_dec(&conf->out_reqs_in_queue);
-+
- 	PRINTK("end_write_request %llu/%d, count %d, uptodate: %d.\n",
- 		(unsigned long long)sh->sector, i, atomic_read(&sh->count),
- 		uptodate);
-@@ -989,6 +998,7 @@ static void handle_stripe(struct stripe_
- 	spin_lock(&sh->lock);
- 	clear_bit(STRIPE_HANDLE, &sh->state);
- 	clear_bit(STRIPE_DELAYED, &sh->state);
-+	atomic_inc(&conf->handle_called);
- 
- 	syncing = test_bit(STRIPE_SYNCING, &sh->state);
- 	/* Now to look around and see what can be done */
-@@ -1257,6 +1267,7 @@ static void handle_stripe(struct stripe_
- 						set_bit(R5_LOCKED, &dev->flags);
- 						set_bit(R5_Wantread, &dev->flags);
- 						locked++;
-+						atomic_inc(&conf->reads_for_rcw);
- 					} else {
- 						PRINTK("Request delayed stripe %llu block %d for Reconstruct\n",
- 						       (unsigned long long)sh->sector, i);
-@@ -1390,6 +1401,7 @@ static void handle_stripe(struct stripe_
- 		bi->bi_next = NULL;
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 	}
- 	for (i=disks; i-- ;) {
- 		int rw;
-@@ -1405,10 +1417,13 @@ static void handle_stripe(struct stripe_
- 		bi = &sh->dev[i].req;
- 
- 		bi->bi_rw = rw;
--		if (rw)
-+		if (rw) {
-+			atomic_inc(&conf->writes_out);
- 			bi->bi_end_io = raid6_end_write_request;
--		else
-+		} else {
-+			atomic_inc(&conf->reads_out);
- 			bi->bi_end_io = raid6_end_read_request;
-+		}
- 
- 		spin_lock_irq(&conf->device_lock);
- 		rdev = conf->disks[i].rdev;
-@@ -1436,12 +1451,14 @@ static void handle_stripe(struct stripe_
- 			bi->bi_io_vec[0].bv_offset = 0;
- 			bi->bi_size = STRIPE_SIZE;
- 			bi->bi_next = NULL;
-+			atomic_inc(&conf->out_reqs_in_queue);
- 			generic_make_request(bi);
- 		} else {
- 			PRINTK("skip op %ld on disc %d for sector %llu\n",
- 				bi->bi_rw, i, (unsigned long long)sh->sector);
- 			clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 			set_bit(STRIPE_HANDLE, &sh->state);
-+			atomic_dec(&conf->delayed);
- 		}
- 	}
- }
-@@ -1555,6 +1572,8 @@ static int make_request (request_queue_t
- 	sector_t logical_sector, last_sector;
- 	struct stripe_head *sh;
- 
-+	atomic_inc(&conf->in_reqs_in_queue);
-+
- 	if (unlikely(bio_barrier(bi))) {
- 		bio_endio(bi, bi->bi_size, -EOPNOTSUPP);
- 		return 0;
-@@ -1563,9 +1582,11 @@ static int make_request (request_queue_t
- 	if (bio_data_dir(bi)==WRITE) {
- 		disk_stat_inc(mddev->gendisk, writes);
- 		disk_stat_add(mddev->gendisk, write_sectors, bio_sectors(bi));
-+		atomic_inc(&conf->writes_in);
- 	} else {
- 		disk_stat_inc(mddev->gendisk, reads);
- 		disk_stat_add(mddev->gendisk, read_sectors, bio_sectors(bi));
-+		atomic_inc(&conf->reads_in);
- 	}
- 
- 	logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1);
-@@ -1605,6 +1626,7 @@ static int make_request (request_queue_t
- 
- 		if ( bio_data_dir(bi) == WRITE )
- 			md_write_end(mddev);
-+		atomic_dec(&conf->in_reqs_in_queue);
- 		bi->bi_size = 0;
- 		bi->bi_end_io(bi, bytes, 0);
- 	}
-@@ -1701,6 +1723,8 @@ static void raid6d (mddev_t *mddev)
- 		spin_unlock_irq(&conf->device_lock);
- 
- 		handled++;
-+
-+		atomic_inc(&conf->handled_in_raid5d);
- 		handle_stripe(sh);
- 		release_stripe(sh);
- 
-@@ -1940,6 +1964,23 @@ static void status (struct seq_file *seq
- 			    conf->disks[i].rdev &&
- 			    conf->disks[i].rdev->in_sync ? "U" : "_");
- 	seq_printf (seq, "]");
-+ 
-+	seq_printf (seq, "\n\t\tin: %u reads, %u writes; out: %u reads, %u writes",
-+		atomic_read(&conf->reads_in), atomic_read(&conf->writes_in),
-+		atomic_read(&conf->reads_out), atomic_read(&conf->writes_out));
-+	seq_printf (seq, "\n\t\t%u in raid5d, %u out of stripes, %u handle called",
-+		atomic_read(&conf->handled_in_raid5d),
-+		atomic_read(&conf->out_of_stripes),
-+		atomic_read(&conf->handle_called));
-+	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw",
-+		atomic_read(&conf->reads_for_rmw),
-+		atomic_read(&conf->reads_for_rcw));
-+	seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n",
-+		atomic_read(&conf->delayed),
-+		atomic_read(&conf->active_stripes),
-+		atomic_read(&conf->in_reqs_in_queue),
-+		atomic_read(&conf->out_reqs_in_queue));
-+
- #if RAID6_DUMPSTATE
- 	seq_printf (seq, "\n");
- 	printall(seq, conf);
diff --git a/lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch b/lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch
deleted file mode 100644
index d29a6c3d4729a7168af0a1f7973304de2e2cee10..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-stripe-by-stripe-handling.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c
---- linux-2.6.9.orig/drivers/md/raid6main.c	2008-01-10 13:47:18.000000000 +0800
-+++ linux-2.6.9/drivers/md/raid6main.c	2008-01-10 13:49:06.000000000 +0800
-@@ -1571,6 +1571,11 @@ static int make_request (request_queue_t
- 	sector_t new_sector;
- 	sector_t logical_sector, last_sector;
- 	struct stripe_head *sh;
-+	sector_t stripe, sectors, block, r_sector, b_sector;
-+	int sectors_per_chunk;
-+	int stripes_per_chunk, sectors_per_block;
-+	int sectors_per_stripe;
-+	int i, j;
- 
- 	atomic_inc(&conf->in_reqs_in_queue);
- 
-@@ -1596,30 +1601,69 @@ static int make_request (request_queue_t
- 	bi->bi_phys_segments = 1;	/* over-loaded to count active stripes */
- 	if ( bio_data_dir(bi) == WRITE )
- 		md_write_start(mddev);
--	for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
- 
--		new_sector = raid6_compute_sector(logical_sector,
--						  raid_disks, data_disks, &dd_idx, &pd_idx, conf);
--
--		PRINTK("raid6: make_request, sector %Lu logical %Lu\n",
--		       (unsigned long long)new_sector,
--		       (unsigned long long)logical_sector);
-+	sectors_per_chunk = conf->chunk_size >> 9;
-+	stripes_per_chunk = conf->chunk_size / STRIPE_SIZE;
-+	sectors_per_stripe = STRIPE_SECTORS * data_disks;
-+	sectors_per_block = stripes_per_chunk * sectors_per_stripe;
-+ 
-+	block = logical_sector & ~((sector_t)sectors_per_block - 1);
-+	sector_div(block, sectors_per_block);
-+	sectors = bi->bi_size >> 9;
-+ 
-+ repeat:
-+	stripe = block * (sectors_per_block / data_disks);
-+	b_sector = stripe * data_disks;
-+	/* iterate through all stripes in this block,
-+	 * where block is a set of internal stripes
-+	 * which covers chunk */
-+	for (i = 0; i < stripes_per_chunk && sectors > 0; i++) {
-+		r_sector = b_sector + (i * STRIPE_SECTORS);
-+		sh = NULL;
-+		/* iterrate through all pages in the stripe */
-+		for (j = 0; j < data_disks && sectors > 0; j++) {
-+			if (r_sector + STRIPE_SECTORS <= bi->bi_sector ||
-+			    r_sector >= last_sector) {
-+				r_sector += sectors_per_chunk;
-+				continue;
-+			}
-+			new_sector = raid6_compute_sector(r_sector, raid_disks,
-+							data_disks, &dd_idx, 
-+							&pd_idx, conf);
-+			if (sh == NULL)
-+				sh = get_active_stripe(conf, new_sector, pd_idx,
-+							(bi->bi_rw&RWA_MASK));
-+			if (sh) {
-+				add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
-+			} else {
-+				/* cannot get stripe for read-ahead, just give-up */
-+				clear_bit(BIO_UPTODATE, &bi->bi_flags);
-+				sectors = 0;
-+				break;
-+			}
-+ 
-+			BUG_ON (new_sector != stripe);
-+			sectors -= STRIPE_SECTORS;
-+			if (bi->bi_sector > r_sector)
-+				sectors += bi->bi_sector - r_sector;
-+			if (r_sector + STRIPE_SECTORS > last_sector)
-+				sectors += r_sector + STRIPE_SECTORS - last_sector;
-+			r_sector += sectors_per_chunk;
-+		}
- 
--		sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
- 		if (sh) {
--
--			add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
--
- 			raid6_plug_device(conf);
- 			handle_stripe(sh);
- 			release_stripe(sh);
--		} else {
--			/* cannot get stripe for read-ahead, just give-up */
--			clear_bit(BIO_UPTODATE, &bi->bi_flags);
--			break;
-+			sh = NULL;
- 		}
- 
-+		stripe += STRIPE_SECTORS;
- 	}
-+	block++;
-+	if(sectors > 0)
-+		goto repeat;
-+
- 	spin_lock_irq(&conf->device_lock);
- 	if (--bi->bi_phys_segments == 0) {
- 		int bytes = bi->bi_size;
diff --git a/lustre/kernel_patches/patches/raid6-zerocopy.patch b/lustre/kernel_patches/patches/raid6-zerocopy.patch
deleted file mode 100644
index 95b713d465fa12a952bbb438e73f67ce514a52e6..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/raid6-zerocopy.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-diff -pur linux-2.6.9.orig/drivers/md/raid6main.c linux-2.6.9/drivers/md/raid6main.c
---- linux-2.6.9.orig/drivers/md/raid6main.c	2008-01-10 14:02:08.000000000 +0800
-+++ linux-2.6.9/drivers/md/raid6main.c	2008-01-10 14:01:56.000000000 +0800
-@@ -430,6 +430,7 @@ static int raid6_end_read_request (struc
- 		clear_buffer_uptodate(bh);
- 	}
- #endif
-+	BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags));
- 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 	set_bit(STRIPE_HANDLE, &sh->state);
- 	release_stripe(sh);
-@@ -468,6 +469,10 @@ static int raid6_end_write_request (stru
- 
- 	rdev_dec_pending(conf->disks[i].rdev, conf->mddev);
- 
-+	if (test_bit(R5_Direct, &sh->dev[i].flags)) {
-+		BUG_ON(sh->dev[i].req.bi_io_vec[0].bv_page == sh->dev[i].page);
-+		sh->dev[i].req.bi_io_vec[0].bv_page = sh->dev[i].page;
-+	}
- 	clear_bit(R5_LOCKED, &sh->dev[i].flags);
- 	set_bit(STRIPE_HANDLE, &sh->state);
- 	__release_stripe(conf, sh);
-@@ -664,7 +669,27 @@ static sector_t compute_blocknr(struct s
- 	return r_sector;
- }
- 
-+static struct page *zero_copy_data(struct bio *bio, sector_t sector)
-+{
-+	sector_t bi_sector = bio->bi_sector;
-+	struct page *page = NULL;
-+	struct bio_vec *bvl;
-+	int i;
- 
-+	bio_for_each_segment(bvl, bio, i) {
-+		if (sector == bi_sector)
-+			page = bio_iovec_idx(bio, i)->bv_page;
-+		bi_sector += bio_iovec_idx(bio, i)->bv_len >> 9;
-+		if (bi_sector >= sector + STRIPE_SECTORS) {
-+			/* check if the stripe is covered by one page */
-+			if (page == bio_iovec_idx(bio, i)->bv_page &&
-+			    PageConstant(page))
-+				return page;
-+			return NULL;
-+		}
-+	}
-+	return NULL;
-+}
- 
- /*
-  * Copy data between a page in the stripe cache, and one or more bion
-@@ -731,6 +756,7 @@ static void compute_parity(struct stripe
- 	raid6_conf_t *conf = sh->raid_conf;
- 	int i, pd_idx = sh->pd_idx, qd_idx, d0_idx, disks = conf->raid_disks, count;
- 	struct bio *chosen;
-+	struct page *page;
- 	/**** FIX THIS: This could be very bad if disks is close to 256 ****/
- 	void *ptrs[disks];
- 
-@@ -761,18 +787,46 @@ static void compute_parity(struct stripe
- 		BUG();		/* Not implemented yet */
- 	}
- 
--	for (i = disks; i--;)
--		if (sh->dev[i].written) {
--			sector_t sector = sh->dev[i].sector;
--			struct bio *wbi = sh->dev[i].written;
--			while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
--				copy_data(1, wbi, sh->dev[i].page, sector);
--				wbi = r5_next_bio(wbi, sector);
-+	for (i = disks; i--;) {
-+		struct bio *wbi = sh->dev[i].written;
-+		sector_t sector;
-+
-+		if (!wbi)
-+			continue;
-+
-+		sector = sh->dev[i].sector;
-+		set_bit(R5_LOCKED, &sh->dev[i].flags);
-+		BUG_ON(test_bit(R5_Direct, &sh->dev[i].flags));
-+
-+		/* check if it's covered by a single page
-+		 * and whole stripe is written at once.
-+		 * in this case we can avoid memcpy() */
-+		if (!wbi->bi_next && test_bit(R5_Insync, &sh->dev[i].flags) &&
-+		    test_bit(R5_OVERWRITE, &sh->dev[i].flags)) {
-+			page = zero_copy_data(wbi, sector);
-+			/* we don't do zerocopy on a HighMem page. Raid6 tend 
-+			 * to prepare all of the pages' content to be accessed
-+			 * before computing PQ parity. If we need to support HighMem
-+			 * page also, we have to modify the gen_syndrome()
-+			 * algorithm. -jay */
-+			if (page && !PageHighMem(page)) {
-+				atomic_inc(&conf->writes_zcopy);
-+				sh->dev[i].req.bi_io_vec[0].bv_page = page;
-+				set_bit(R5_Direct, &sh->dev[i].flags);
-+				clear_bit(R5_UPTODATE, &sh->dev[i].flags);
-+				clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+				continue;
- 			}
-+		}
- 
--			set_bit(R5_LOCKED, &sh->dev[i].flags);
--			set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		atomic_inc(&conf->writes_copied);
-+		clear_bit(R5_OVERWRITE, &sh->dev[i].flags);
-+		set_bit(R5_UPTODATE, &sh->dev[i].flags);
-+		while (wbi && wbi->bi_sector < sector + STRIPE_SECTORS) {
-+			copy_data(1, wbi, sh->dev[i].page, sector);
-+			wbi = r5_next_bio(wbi, sector);
- 		}
-+	}
- 
- //	switch(method) {
- //	case RECONSTRUCT_WRITE:
-@@ -783,7 +837,10 @@ static void compute_parity(struct stripe
- 		count = 0;
- 		i = d0_idx;
- 		do {
--			ptrs[count++] = page_address(sh->dev[i].page);
-+			if (test_bit(R5_Direct, &sh->dev[i].flags))
-+				ptrs[count++] = page_address(sh->dev[i].req.bi_io_vec[0].bv_page);
-+			else
-+				ptrs[count++] = page_address(sh->dev[i].page);
- 
- 			i = raid6_next_disk(i, disks);
- 		} while ( i != d0_idx );
-@@ -1185,7 +1242,8 @@ static void handle_stripe(struct stripe_
- 			if (sh->dev[i].written) {
- 				dev = &sh->dev[i];
- 				if (!test_bit(R5_LOCKED, &dev->flags) &&
--				    test_bit(R5_UPTODATE, &dev->flags) ) {
-+				    (test_bit(R5_UPTODATE, &dev->flags) ||
-+					 test_bit(R5_Direct, &dev->flags)) ) {
- 					/* We can return any write requests */
- 					struct bio *wbi, *wbi2;
- 					PRINTK("Return write for stripe %llu disc %d\n",
-@@ -1193,6 +1251,7 @@ static void handle_stripe(struct stripe_
- 					spin_lock_irq(&conf->device_lock);
- 					wbi = dev->written;
- 					dev->written = NULL;
-+					clear_bit(R5_Direct, &dev->flags);
- 					while (wbi && wbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 						wbi2 = r5_next_bio(wbi, dev->sector);
- 						if (--wbi->bi_phys_segments == 0) {
-@@ -2008,6 +2067,7 @@ static int run (mddev_t *mddev)
- 		if (mddev->queue->backing_dev_info.ra_pages < 2 * stripe)
- 			mddev->queue->backing_dev_info.ra_pages = 2 * stripe;
- 	}
-+	mddev->queue->backing_dev_info.capabilities |= BDI_CAP_PAGE_CONST_WRITE;
- 
- 	/* Ok, everything is just fine now */
- 	mddev->array_size =  mddev->size * (mddev->raid_disks - 2);
-@@ -2095,9 +2155,11 @@ static void status (struct seq_file *seq
- 		atomic_read(&conf->handled_in_raid5d),
- 		atomic_read(&conf->out_of_stripes),
- 		atomic_read(&conf->handle_called));
--	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw",
-+	seq_printf (seq, "\n\t\treads: %u for rmw, %u for rcw. zcopy writes: %u, copied writes: %u",
- 		atomic_read(&conf->reads_for_rmw),
--		atomic_read(&conf->reads_for_rcw));
-+		atomic_read(&conf->reads_for_rcw),
-+		atomic_read(&conf->writes_zcopy),
-+		atomic_read(&conf->writes_copied));
- 	seq_printf (seq, "\n\t\t%u delayed, %u active, queues: %u in, %u out\n",
- 		atomic_read(&conf->delayed),
- 		atomic_read(&conf->active_stripes),
diff --git a/lustre/kernel_patches/patches/remove-suid-2.6-suse.patch b/lustre/kernel_patches/patches/remove-suid-2.6-suse.patch
deleted file mode 100644
index 4a4e10fd1960ab4a08f21ecf09bb3a190e2fbaba..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/remove-suid-2.6-suse.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- linux-2.6.5-7.141/mm/filemap.c.orig	2005-02-18 14:53:26.000000000 +0200
-+++ linux-2.6.5-7.141/mm/filemap.c	2005-02-18 22:37:28.727492096 +0200
-@@ -1816,6 +1816,19 @@ int remove_suid(struct dentry *dentry)
- 
- 	if (unlikely(kill && !capable(CAP_FSETID))) {
- 		struct iattr newattrs;
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		if (op && op->setattr_raw) {
-+			newattrs.ia_mode = mode & ~S_ISUID;
-+			if (kill & ATTR_KILL_SGID)
-+				newattrs.ia_mode &= ~S_ISGID;
-+
-+			newattrs.ia_valid = ATTR_FORCE | ATTR_MODE;
-+			result = op->setattr_raw(dentry->d_inode, &newattrs);
-+			/* the file system wants to use normal vfs path now */
-+			if (result != -EOPNOTSUPP)
-+				return result;
-+		}
- 
- 		newattrs.ia_valid = ATTR_FORCE | kill;
- 		result = notify_change(dentry, &newattrs);
diff --git a/lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch b/lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch
deleted file mode 100644
index 5c4eab5b8e85cb4e2f488d897f80a88c871e43c4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/rollback-raid5ch-to-55.patch
+++ /dev/null
@@ -1,329 +0,0 @@
---- linux-2.6.9-67/drivers/md/raid5.c	2007-11-21 21:12:50.000000000 -0700
-+++ linux-2.6.9-55.0.12/drivers/md/raid5.c	2007-11-02 01:10:35.000000000 -0700
-@@ -49,7 +49,7 @@
-  * This macro is used to determine the 'next' bio in the list, given the sector
-  * of the current stripe+device
-  */
--#define r5_next_bio(bio, sect) ( ( (bio)->bi_sector + ((bio)->bi_size>>9) < sect + STRIPE_SECTORS) ? (bio)->bi_next : NULL)
-+#define r5_next_bio(bio, sect) ( ( bio->bi_sector + (bio->bi_size>>9) < sect + STRIPE_SECTORS) ? bio->bi_next : NULL)
- /*
-  * The following can be used to debug the driver
-  */
-@@ -232,7 +232,6 @@ static struct stripe_head *__find_stripe
- }
- 
- static void unplug_slaves(mddev_t *mddev);
--static void raid5_unplug_device(request_queue_t *q);
- 
- static struct stripe_head *get_active_stripe(raid5_conf_t *conf, sector_t sector,
- 					     int pd_idx, int noblock) 
-@@ -727,10 +726,6 @@ static void compute_parity(struct stripe
- 				ptr[count++] = page_address(sh->dev[i].page);
- 				chosen = sh->dev[i].towrite;
- 				sh->dev[i].towrite = NULL;
--
--				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--					wake_up(&conf->wait_for_overlap);
--
- 				if (sh->dev[i].written) BUG();
- 				sh->dev[i].written = chosen;
- 				check_xor();
-@@ -743,10 +738,6 @@ static void compute_parity(struct stripe
- 			if (i!=pd_idx && sh->dev[i].towrite) {
- 				chosen = sh->dev[i].towrite;
- 				sh->dev[i].towrite = NULL;
--
--				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--					wake_up(&conf->wait_for_overlap);
--
- 				if (sh->dev[i].written) BUG();
- 				sh->dev[i].written = chosen;
- 			}
-@@ -803,7 +794,7 @@ static void compute_parity(struct stripe
-  * toread/towrite point to the first in a chain. 
-  * The bi_next chain must be in order.
-  */
--static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
-+static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
- {
- 	struct bio **bip;
- 	raid5_conf_t *conf = sh->raid_conf;
-@@ -820,13 +811,10 @@ static int add_stripe_bio(struct stripe_
- 	else
- 		bip = &sh->dev[dd_idx].toread;
- 	while (*bip && (*bip)->bi_sector < bi->bi_sector) {
--		if ((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector)
--			goto overlap;
-+		BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector);
- 		bip = & (*bip)->bi_next;
- 	}
--	if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9))
--		goto overlap;
--
-+/* FIXME do I need to worry about overlapping bion */
- 	if (*bip && bi->bi_next && (*bip) != bi->bi_next)
- 		BUG();
- 	if (*bip)
-@@ -841,7 +829,7 @@ static int add_stripe_bio(struct stripe_
- 		(unsigned long long)sh->sector, dd_idx);
- 
- 	if (forwrite) {
--		/* check if page is covered */
-+		/* check if page is coverred */
- 		sector_t sector = sh->dev[dd_idx].sector;
- 		for (bi=sh->dev[dd_idx].towrite;
- 		     sector < sh->dev[dd_idx].sector + STRIPE_SECTORS &&
-@@ -853,13 +841,6 @@ static int add_stripe_bio(struct stripe_
- 		if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS)
- 			set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags);
- 	}
--	return 1;
--
-- overlap:
--	set_bit(R5_Overlap, &sh->dev[dd_idx].flags);
--	spin_unlock_irq(&conf->device_lock);
--	spin_unlock(&sh->lock);
--	return 0;
- }
- 
- 
-@@ -920,8 +901,6 @@ static void handle_stripe(struct stripe_
- 			spin_lock_irq(&conf->device_lock);
- 			rbi = dev->toread;
- 			dev->toread = NULL;
--			if (test_and_clear_bit(R5_Overlap, &dev->flags))
--				wake_up(&conf->wait_for_overlap);
- 			spin_unlock_irq(&conf->device_lock);
- 			while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 				copy_data(0, rbi, dev->page, dev->sector);
-@@ -969,9 +948,6 @@ static void handle_stripe(struct stripe_
- 			sh->dev[i].towrite = NULL;
- 			if (bi) to_write--;
- 
--			if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--				wake_up(&conf->wait_for_overlap);
--
- 			while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 				struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
- 				clear_bit(BIO_UPTODATE, &bi->bi_flags);
-@@ -1000,8 +976,6 @@ static void handle_stripe(struct stripe_
- 			if (!test_bit(R5_Insync, &sh->dev[i].flags)) {
- 				bi = sh->dev[i].toread;
- 				sh->dev[i].toread = NULL;
--				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--					wake_up(&conf->wait_for_overlap);
- 				if (bi) to_read--;
- 				while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 					struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
-@@ -1441,7 +1415,6 @@ static int make_request (request_queue_t
- 	if ( bio_data_dir(bi) == WRITE )
- 		md_write_start(mddev);
- 	for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
--		DEFINE_WAIT(w);
- 		
- 		new_sector = raid5_compute_sector(logical_sector,
- 						  raid_disks, data_disks, &dd_idx, &pd_idx, conf);
-@@ -1450,28 +1423,17 @@ static int make_request (request_queue_t
- 			(unsigned long long)new_sector, 
- 			(unsigned long long)logical_sector);
- 
--	retry:
--		prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE);
- 		sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
- 		if (sh) {
--			if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
--				/* Add failed due to overlap.  Flush everything
--				 * and wait a while
--				 */
--				raid5_unplug_device(mddev->queue);
--				release_stripe(sh);
--				schedule();
--				goto retry;
--			}
--			finish_wait(&conf->wait_for_overlap, &w);
-+
-+			add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
-+
- 			raid5_plug_device(conf);
- 			handle_stripe(sh);
- 			release_stripe(sh);
--
- 		} else {
- 			/* cannot get stripe for read-ahead, just give-up */
- 			clear_bit(BIO_UPTODATE, &bi->bi_flags);
--			finish_wait(&conf->wait_for_overlap, &w);
- 			break;
- 		}
- 			
-@@ -1619,7 +1581,6 @@ static int run (mddev_t *mddev)
- 
- 	conf->device_lock = SPIN_LOCK_UNLOCKED;
- 	init_waitqueue_head(&conf->wait_for_stripe);
--	init_waitqueue_head(&conf->wait_for_overlap);
- 	INIT_LIST_HEAD(&conf->handle_list);
- 	INIT_LIST_HEAD(&conf->delayed_list);
- 	INIT_LIST_HEAD(&conf->inactive_list);
---- linux-2.6.9-67/include/linux/raid/raid5.h	2007-11-21 21:12:41.000000000 -0700
-+++ linux-2.6.9-55.0.12/include/linux/raid/raid5.h	2004-10-18 15:54:55.000000000 -0600
-@@ -152,7 +152,6 @@ struct stripe_head {
- #define	R5_Wantread	4	/* want to schedule a read */
- #define	R5_Wantwrite	5
- #define	R5_Syncio	6	/* this io need to be accounted as resync io */
--#define	R5_Overlap	7	/* There is a pending overlapping request on this block */
- 
- /*
-  * Write method
-@@ -220,7 +219,6 @@ struct raid5_private_data {
- 	atomic_t		active_stripes;
- 	struct list_head	inactive_list;
- 	wait_queue_head_t	wait_for_stripe;
--	wait_queue_head_t	wait_for_overlap;
- 	int			inactive_blocked;	/* release of inactive stripes blocked,
- 							 * waiting for 25% to be free
- 							 */        
---- linux-2.6.9-67/drivers/md/raid6main.c	2007-11-21 21:12:41.000000000 -0700
-+++ linux-2.6.9-55.0.12/drivers/md/raid6main.c	2007-11-02 01:10:20.000000000 -0700
-@@ -54,7 +54,7 @@
-  * This macro is used to determine the 'next' bio in the list, given the sector
-  * of the current stripe+device
-  */
--#define r5_next_bio(bio, sect) ( ( (bio)->bi_sector + ((bio)->bi_size>>9) < sect + STRIPE_SECTORS) ? (bio)->bi_next : NULL)
-+#define r5_next_bio(bio, sect) ( ( bio->bi_sector + (bio->bi_size>>9) < sect + STRIPE_SECTORS) ? bio->bi_next : NULL)
- /*
-  * The following can be used to debug the driver
-  */
-@@ -740,10 +740,6 @@ static void compute_parity(struct stripe
- 			if ( i != pd_idx && i != qd_idx && sh->dev[i].towrite ) {
- 				chosen = sh->dev[i].towrite;
- 				sh->dev[i].towrite = NULL;
--
--				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--					wake_up(&conf->wait_for_overlap);
--
- 				if (sh->dev[i].written) BUG();
- 				sh->dev[i].written = chosen;
- 			}
-@@ -902,7 +898,7 @@ static void compute_block_2(struct strip
-  * toread/towrite point to the first in a chain.
-  * The bi_next chain must be in order.
-  */
--static int add_stripe_bio(struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
-+static void add_stripe_bio (struct stripe_head *sh, struct bio *bi, int dd_idx, int forwrite)
- {
- 	struct bio **bip;
- 	raid6_conf_t *conf = sh->raid_conf;
-@@ -919,13 +915,10 @@ static int add_stripe_bio(struct stripe_
- 	else
- 		bip = &sh->dev[dd_idx].toread;
- 	while (*bip && (*bip)->bi_sector < bi->bi_sector) {
--		if ((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector)
--			goto overlap;
--		bip = &(*bip)->bi_next;
-+		BUG_ON((*bip)->bi_sector + ((*bip)->bi_size >> 9) > bi->bi_sector);
-+		bip = & (*bip)->bi_next;
- 	}
--	if (*bip && (*bip)->bi_sector < bi->bi_sector + ((bi->bi_size)>>9))
--		goto overlap;
--
-+/* FIXME do I need to worry about overlapping bion */
- 	if (*bip && bi->bi_next && (*bip) != bi->bi_next)
- 		BUG();
- 	if (*bip)
-@@ -940,7 +933,7 @@ static int add_stripe_bio(struct stripe_
- 		(unsigned long long)sh->sector, dd_idx);
- 
- 	if (forwrite) {
--		/* check if page is covered */
-+		/* check if page is coverred */
- 		sector_t sector = sh->dev[dd_idx].sector;
- 		for (bi=sh->dev[dd_idx].towrite;
- 		     sector < sh->dev[dd_idx].sector + STRIPE_SECTORS &&
-@@ -952,13 +945,6 @@ static int add_stripe_bio(struct stripe_
- 		if (sector >= sh->dev[dd_idx].sector + STRIPE_SECTORS)
- 			set_bit(R5_OVERWRITE, &sh->dev[dd_idx].flags);
- 	}
--	return 1;
--
-- overlap:
--	set_bit(R5_Overlap, &sh->dev[dd_idx].flags);
--	spin_unlock_irq(&conf->device_lock);
--	spin_unlock(&sh->lock);
--	return 0;
- }
- 
- 
-@@ -1022,8 +1008,6 @@ static void handle_stripe(struct stripe_
- 			spin_lock_irq(&conf->device_lock);
- 			rbi = dev->toread;
- 			dev->toread = NULL;
--			if (test_and_clear_bit(R5_Overlap, &dev->flags))
--				wake_up(&conf->wait_for_overlap);
- 			spin_unlock_irq(&conf->device_lock);
- 			while (rbi && rbi->bi_sector < dev->sector + STRIPE_SECTORS) {
- 				copy_data(0, rbi, dev->page, dev->sector);
-@@ -1073,9 +1057,6 @@ static void handle_stripe(struct stripe_
- 			sh->dev[i].towrite = NULL;
- 			if (bi) to_write--;
- 
--			if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--				wake_up(&conf->wait_for_overlap);
--
- 			while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 				struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
- 				clear_bit(BIO_UPTODATE, &bi->bi_flags);
-@@ -1104,8 +1085,6 @@ static void handle_stripe(struct stripe_
- 			if (!test_bit(R5_Insync, &sh->dev[i].flags)) {
- 				bi = sh->dev[i].toread;
- 				sh->dev[i].toread = NULL;
--				if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
--					wake_up(&conf->wait_for_overlap);
- 				if (bi) to_read--;
- 				while (bi && bi->bi_sector < sh->dev[i].sector + STRIPE_SECTORS){
- 					struct bio *nextbi = r5_next_bio(bi, sh->dev[i].sector);
-@@ -1597,7 +1576,6 @@ static int make_request (request_queue_t
- 	if ( bio_data_dir(bi) == WRITE )
- 		md_write_start(mddev);
- 	for (;logical_sector < last_sector; logical_sector += STRIPE_SECTORS) {
--		DEFINE_WAIT(w);
- 
- 		new_sector = raid6_compute_sector(logical_sector,
- 						  raid_disks, data_disks, &dd_idx, &pd_idx, conf);
-@@ -1606,27 +1584,17 @@ static int make_request (request_queue_t
- 		       (unsigned long long)new_sector,
- 		       (unsigned long long)logical_sector);
- 
--	retry:
--		prepare_to_wait(&conf->wait_for_overlap, &w, TASK_UNINTERRUPTIBLE);
- 		sh = get_active_stripe(conf, new_sector, pd_idx, (bi->bi_rw&RWA_MASK));
- 		if (sh) {
--			if (!add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK))) {
--				/* Add failed due to overlap.  Flush everything
--				 * and wait a while
--				 */
--				raid6_unplug_device(mddev->queue);
--				release_stripe(sh);
--				schedule();
--				goto retry;
--			}
--			finish_wait(&conf->wait_for_overlap, &w);
-+
-+			add_stripe_bio(sh, bi, dd_idx, (bi->bi_rw&RW_MASK));
-+
- 			raid6_plug_device(conf);
- 			handle_stripe(sh);
- 			release_stripe(sh);
- 		} else {
- 			/* cannot get stripe for read-ahead, just give-up */
- 			clear_bit(BIO_UPTODATE, &bi->bi_flags);
--			finish_wait(&conf->wait_for_overlap, &w);
- 			break;
- 		}
- 
-@@ -1774,7 +1742,6 @@ static int run (mddev_t *mddev)
- 
- 	conf->device_lock = SPIN_LOCK_UNLOCKED;
- 	init_waitqueue_head(&conf->wait_for_stripe);
--	init_waitqueue_head(&conf->wait_for_overlap);
- 	INIT_LIST_HEAD(&conf->handle_list);
- 	INIT_LIST_HEAD(&conf->delayed_list);
- 	INIT_LIST_HEAD(&conf->inactive_list);
diff --git a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch b/lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch
deleted file mode 100644
index 33160d9915747b0cfe0d4c29d57dc908300c3338..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel4.patch
+++ /dev/null
@@ -1,652 +0,0 @@
-Index: linux-2.6.9-5.0.3.EL/drivers/scsi/Kconfig
-===================================================================
-Index: linux-2.6.9/drivers/scsi/Kconfig
-===================================================================
---- linux-2.6.9.orig/drivers/scsi/Kconfig	2007-07-23 14:19:13.000000000 +0400
-+++ linux-2.6.9/drivers/scsi/Kconfig	2007-07-26 14:16:36.000000000 +0400
-@@ -61,6 +61,14 @@ config SCSI_DUMP
- 	help
- 	   SCSI dump support
- 
-+config SD_IOSTATS
-+   bool "Enable SCSI disk I/O stats"
-+   depends on BLK_DEV_SD
-+   default y
-+   ---help---
-+     This enables SCSI disk I/O stats collection.  You must also enable
-+     /proc file system support if you want this feature.
-+
- config CHR_DEV_ST
- 	tristate "SCSI tape support"
- 	depends on SCSI
-Index: linux-2.6.9/drivers/scsi/scsi_proc.c
-===================================================================
---- linux-2.6.9.orig/drivers/scsi/scsi_proc.c	2007-03-13 02:47:28.000000000 +0300
-+++ linux-2.6.9/drivers/scsi/scsi_proc.c	2007-07-26 14:16:36.000000000 +0400
-@@ -38,7 +38,8 @@
- /* 4K page size, but our output routines, use some slack for overruns */
- #define PROC_BLOCK_SIZE (3*1024)
- 
--static struct proc_dir_entry *proc_scsi;
-+struct proc_dir_entry *proc_scsi;
-+EXPORT_SYMBOL(proc_scsi);
- 
- /* Protect sht->present and sht->proc_dir */
- static DECLARE_MUTEX(global_host_template_sem);
-Index: linux-2.6.9/drivers/scsi/sd.c
-===================================================================
---- linux-2.6.9.orig/drivers/scsi/sd.c	2007-03-13 02:47:27.000000000 +0300
-+++ linux-2.6.9/drivers/scsi/sd.c	2007-07-28 14:55:56.000000000 +0400
-@@ -63,6 +63,67 @@
- 
- #include "scsi_logging.h"
- 
-+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS))
-+# include <linux/proc_fs.h>
-+# include <linux/seq_file.h>
-+
-+typedef struct {
-+        unsigned long long iostat_size;
-+        unsigned long long iostat_count;
-+} iostat_counter_t;
-+
-+#define IOSTAT_NCOUNTERS 16
-+typedef struct {
-+        iostat_counter_t        iostat_read_histogram[IOSTAT_NCOUNTERS];
-+        iostat_counter_t        iostat_write_histogram[IOSTAT_NCOUNTERS];
-+        struct timeval          iostat_timeval;
-+
-+	/* queue depth: how well the pipe is filled up */
-+	unsigned long long	iostat_queue_ticks[IOSTAT_NCOUNTERS];
-+	unsigned long long	iostat_queue_ticks_sum;
-+	unsigned long		iostat_queue_depth;
-+	unsigned long		iostat_queue_stamp;
-+
-+	/* seeks: how linear the traffic is */
-+	unsigned long long	iostat_next_sector;
-+	unsigned long long	iostat_seek_sectors;
-+	unsigned long long	iostat_seeks;
-+	unsigned long long	iostat_sectors;
-+	unsigned long long	iostat_reqs;
-+	unsigned long		iostat_read_reqs;
-+	unsigned long		iostat_write_reqs;
-+
-+	/* process time: how long it takes to process requests */
-+	unsigned long		iostat_rtime[IOSTAT_NCOUNTERS];
-+	unsigned long		iostat_wtime[IOSTAT_NCOUNTERS];
-+
-+	/* queue time: how long process spent in elevator's queue */
-+	unsigned long		iostat_rtime_in_queue[IOSTAT_NCOUNTERS];
-+	unsigned long		iostat_wtime_in_queue[IOSTAT_NCOUNTERS];
-+
-+	char			iostat_name[32];
-+
-+	/* must be the last field, as it's used to know size to be memset'ed */
-+	spinlock_t              iostat_lock;
-+}  ____cacheline_aligned_in_smp iostat_stats_t;
-+
-+iostat_stats_t       **sd_iostats;
-+struct proc_dir_entry *sd_iostats_procdir;
-+char                   sd_iostats_procdir_name[] = "sd_iostats";
-+
-+extern void sd_iostats_init(void);
-+extern void sd_iostats_init_disk(struct gendisk *);
-+extern void sd_iostats_fini(void);
-+void sd_iostats_start_req(struct scsi_cmnd *SCpnt);
-+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt);
-+#else
-+static inline void sd_iostats_init(void) {}
-+static inline void sd_iostats_init_disk(struct gendisk *disk) {}
-+static inline void sd_iostats_fini(void) {}
-+static inline void sd_iostats_start_req(struct scsi_cmnd *SCpnt) {}
-+static inline void sd_iostats_finish_req(struct scsi_cmnd *SCpnt) {}
-+#endif
-+
- /*
-  * More than enough for everybody ;)  The huge number of majors
-  * is a leftover from 16bit dev_t days, we don't really need that
-@@ -76,6 +137,7 @@
-  */
- #define SD_MAX_DISKS	(((26 * 26) + 26 + 1) * 26)
- 
-+#define SD_STATS 256
- /*
-  * Time out in seconds for disks and Magneto-opticals (which are slower).
-  */
-@@ -278,6 +340,8 @@ static int sd_init_command(struct scsi_c
- 	SCSI_LOG_HLQUEUE(2, printk("%s : block=%llu\n",
- 				   disk->disk_name, (unsigned long long)block));
- 
-+	sd_iostats_start_req(SCpnt);
-+
- 	/*
- 	 * If we have a 1K hardware sectorsize, prevent access to single
- 	 * 512 byte sectors.  In theory we could handle this - in fact
-@@ -474,6 +538,7 @@ static int sd_open(struct inode *inode, 
- 			scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT);
- 	}
- 
-+   sd_iostats_init_disk(disk);
- 	return 0;
- 
- error_out:
-@@ -849,6 +914,9 @@ static void sd_rw_intr(struct scsi_cmnd 
- 			break;
- 		}
- 	}
-+
-+	sd_iostats_finish_req(SCpnt);
-+
- 	/*
- 	 * This calls the generic completion function, now that we know
- 	 * how many actual sectors finished, and how many sectors we need
-@@ -1575,6 +1643,481 @@ static void sd_shutdown(struct device *d
- 	sd_sync_cache(sdp);
- }	
- 
-+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS))
-+static int
-+sd_iostats_seq_show(struct seq_file *seq, void *v)
-+{
-+	struct timeval     now;
-+	struct gendisk *disk = seq->private;
-+	iostat_stats_t    *stats;
-+	unsigned long long read_len;
-+	unsigned long long read_len_tot;
-+	unsigned long      read_num;
-+	unsigned long      read_num_tot;
-+	unsigned long long write_len;
-+	unsigned long long write_len_tot;
-+	unsigned long      write_num;
-+	unsigned long      write_num_tot;
-+	int                i;
-+	int                maxi;
-+
-+	if (sd_iostats == NULL) {
-+		printk(KERN_ERR "sd_iostats_seq_show: NULL stats array\n");
-+		BUG();
-+	}
-+
-+	stats = sd_iostats[scsi_disk(disk)->index];
-+	if (stats == NULL) {
-+		printk(KERN_ERR "sd_iostats_seq_show: NULL stats entry\n");
-+		BUG();
-+	}
-+
-+	do_gettimeofday(&now);
-+	now.tv_sec -= stats->iostat_timeval.tv_sec;
-+	now.tv_usec -= stats->iostat_timeval.tv_usec;
-+	if (now.tv_usec < 0) {
-+		now.tv_usec += 1000000;
-+		now.tv_sec--;
-+	}
-+
-+	/* this sampling races with updates */
-+	seq_printf(seq, "index:        %lu   snapshot_time:         %lu.%06lu\n",
-+			(unsigned long) scsi_disk(disk)->index,
-+			now.tv_sec, now.tv_usec);
-+
-+	for (i = IOSTAT_NCOUNTERS - 1; i > 0; i--)
-+		if (stats->iostat_read_histogram[i].iostat_count != 0 ||
-+				stats->iostat_write_histogram[i].iostat_count != 0)
-+			break;
-+	maxi = i;
-+
-+	seq_printf(seq, "%8s %8s %12s %8s %12s\n", "size", 
-+			"reads", "total", "writes", "total");
-+
-+	read_len_tot = write_len_tot = 0;
-+	read_num_tot = write_num_tot = 0;
-+	for (i = 0; i <= maxi; i++) {
-+		read_len = stats->iostat_read_histogram[i].iostat_size;
-+		read_len_tot += read_len;
-+		read_num = stats->iostat_read_histogram[i].iostat_count;
-+		read_num_tot += read_num;
-+
-+		write_len = stats->iostat_write_histogram[i].iostat_size;
-+		write_len_tot += write_len;
-+		write_num = stats->iostat_write_histogram[i].iostat_count;
-+		write_num_tot += write_num;
-+
-+		seq_printf (seq, "%8d %8lu %12llu %8lu %12llu\n", 
-+				512<<i, read_num, read_len, write_num, write_len);
-+	}
-+
-+	seq_printf(seq, "%8s %8lu %12llu %8lu %12llu\n\n", "total",
-+			read_num_tot, read_len_tot, 
-+			write_num_tot, write_len_tot);
-+
-+	seq_printf(seq, "%8s %8s %8s\n", "qdepth", "ticks", "%");
-+	for (i = 0; i < IOSTAT_NCOUNTERS; i++) {
-+		unsigned long long ticks, percent;
-+		ticks = stats->iostat_queue_ticks[i];
-+		if (ticks == 0)
-+			continue;
-+		percent = stats->iostat_queue_ticks[i] * 100;
-+		do_div(percent, stats->iostat_queue_ticks_sum);
-+		seq_printf(seq, "%8d %8llu %8llu\n", i, ticks, percent);
-+	}
-+
-+	if (stats->iostat_reqs != 0) {
-+		unsigned long long aveseek = 0, percent = 0;
-+
-+		if (stats->iostat_seeks) {
-+			aveseek = stats->iostat_seek_sectors;
-+			do_div(aveseek, stats->iostat_seeks);
-+			percent = stats->iostat_seeks * 100;
-+			do_div(percent, stats->iostat_reqs);
-+		}
-+
-+		seq_printf(seq, "\n%llu sectors in %llu reqs: %llu seek(s) over "
-+				"%llu sectors in ave, %llu%% of all reqs\n",
-+				stats->iostat_sectors, stats->iostat_reqs,
-+				stats->iostat_seeks, aveseek, percent);
-+	}
-+
-+	seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "process time", "reads",
-+			"%%", "writes", "%%");
-+	for (i = 0; i < IOSTAT_NCOUNTERS; i++) {
-+		unsigned long read_percent = 0, write_percent = 0;
-+		if (stats->iostat_wtime[i] == 0 &&
-+				stats->iostat_rtime[i] == 0)
-+			continue;
-+		if (stats->iostat_read_reqs)
-+			read_percent = stats->iostat_rtime[i] * 100 / 
-+				stats->iostat_read_reqs;
-+		if (stats->iostat_write_reqs)
-+			write_percent = stats->iostat_wtime[i] * 100 / 
-+				stats->iostat_write_reqs;
-+		seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n",
-+				jiffies_to_msecs(((1UL << i) >> 1) << 1),
-+				stats->iostat_rtime[i], read_percent,
-+				stats->iostat_wtime[i], write_percent);
-+	}
-+
-+	seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "time in queue", "reads",
-+			"%%", "writes", "%%");
-+	for (i = 0; i < IOSTAT_NCOUNTERS; i++) {
-+		unsigned long read_percent = 0, write_percent = 0;
-+		if (stats->iostat_wtime_in_queue[i] == 0 &&
-+				stats->iostat_rtime_in_queue[i] == 0)
-+			continue;
-+		if (stats->iostat_read_reqs)
-+			read_percent = stats->iostat_rtime_in_queue[i] * 100 / 
-+				stats->iostat_read_reqs;
-+		if (stats->iostat_write_reqs)
-+			write_percent = stats->iostat_wtime_in_queue[i] * 100 / 
-+				stats->iostat_write_reqs;
-+		seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n",
-+				jiffies_to_msecs(((1UL << i) >> 1) << 1),
-+				stats->iostat_rtime_in_queue[i],
-+				read_percent,
-+				stats->iostat_wtime_in_queue[i],
-+				write_percent);
-+	}
-+
-+	return 0;
-+}
-+
-+static void *
-+sd_iostats_seq_start(struct seq_file *p, loff_t *pos)
-+{
-+	return (*pos == 0) ? (void *)1 : NULL;
-+}
-+
-+static void *
-+sd_iostats_seq_next(struct seq_file *p, void *v, loff_t *pos)
-+{
-+	++*pos;
-+	return NULL;
-+}
-+
-+static void
-+sd_iostats_seq_stop(struct seq_file *p, void *v)
-+{
-+}
-+
-+static struct seq_operations sd_iostats_seqops = {
-+	.start = sd_iostats_seq_start,
-+	.stop  = sd_iostats_seq_stop,
-+	.next  = sd_iostats_seq_next,
-+	.show  = sd_iostats_seq_show,
-+};
-+
-+static int
-+sd_iostats_seq_open (struct inode *inode, struct file *file)
-+{
-+	int                    rc;
-+
-+	rc = seq_open(file, &sd_iostats_seqops);
-+	if (rc != 0)
-+		return rc;
-+
-+	((struct seq_file *)file->private_data)->private = PDE(inode)->data;
-+	return 0;
-+}
-+
-+static ssize_t
-+sd_iostats_seq_write(struct file *file, const char *buffer,
-+                     size_t len, loff_t *off)
-+{
-+	struct seq_file   *seq = file->private_data;
-+	struct gendisk *disk = seq->private;
-+	iostat_stats_t    *stats = sd_iostats[scsi_disk(disk)->index];
-+	unsigned long      flags;
-+	unsigned long      qdepth;
-+
-+
-+	spin_lock_irqsave (&stats->iostat_lock, flags);
-+	qdepth = stats->iostat_queue_depth;
-+	memset (stats, 0, offsetof(iostat_stats_t, iostat_lock));
-+	do_gettimeofday(&stats->iostat_timeval);
-+	stats->iostat_queue_stamp = jiffies;
-+	stats->iostat_queue_depth = qdepth;
-+	spin_unlock_irqrestore (&stats->iostat_lock, flags);
-+
-+	return len;
-+}
-+
-+static struct file_operations sd_iostats_proc_fops = {
-+	.owner   = THIS_MODULE,
-+	.open    = sd_iostats_seq_open,
-+	.read    = seq_read,
-+	.write   = sd_iostats_seq_write,
-+	.llseek  = seq_lseek,
-+	.release = seq_release,
-+};
-+
-+extern struct proc_dir_entry *proc_scsi;
-+
-+void
-+sd_iostats_init(void)
-+{
-+	int    i;
-+
-+	sd_iostats = kmalloc(SD_STATS * sizeof(iostat_stats_t *), GFP_KERNEL);
-+	if (sd_iostats == NULL) {
-+		printk(KERN_WARNING "Can't keep sd iostats: "
-+			"ENOMEM allocating stats array size %d\n",
-+			SD_STATS * sizeof(iostat_stats_t *));
-+		return;
-+	}
-+
-+	for (i = 0; i < SD_STATS; i++)
-+		sd_iostats[i] = NULL;
-+
-+	if (proc_scsi == NULL) {
-+		printk(KERN_WARNING "No access to sd iostats: "
-+			"proc_scsi is NULL\n");
-+		return;
-+	}
-+
-+	sd_iostats_procdir = create_proc_entry(sd_iostats_procdir_name,
-+			S_IFDIR | S_IRUGO | S_IXUGO,
-+			proc_scsi);
-+	if (sd_iostats_procdir == NULL) {
-+		printk(KERN_WARNING "No access to sd iostats: "
-+			"can't create /proc/scsi/%s\n", sd_iostats_procdir_name);
-+		return;
-+        }
-+}
-+
-+void
-+sd_iostats_init_disk(struct gendisk *disk)
-+{
-+	struct proc_dir_entry *pde;
-+	unsigned long          flags;
-+	iostat_stats_t        *stats;
-+
-+	if (sd_iostats == NULL || sd_iostats_procdir == NULL)
-+		return;
-+
-+	if (scsi_disk(disk)->index > SD_STATS) {
-+		printk(KERN_ERR "sd_iostats_init_disk: "
-+			"unexpected disk index %d(%d)\n",
-+			scsi_disk(disk)->index, SD_STATS);
-+		return;
-+	}
-+
-+	if (sd_iostats[scsi_disk(disk)->index] != NULL)
-+		return;
-+
-+	stats = kmalloc(sizeof(*stats), GFP_KERNEL);
-+	if (stats == NULL) {
-+		printk(KERN_WARNING "Can't keep %s iostats: "
-+			"ENOMEM allocating stats size %d\n", 
-+			disk->disk_name, sizeof(*stats));
-+		return;
-+	}
-+
-+	memset (stats, 0, sizeof(*stats));
-+	do_gettimeofday(&stats->iostat_timeval);
-+	stats->iostat_queue_stamp = jiffies;
-+	spin_lock_init(&stats->iostat_lock);
-+
-+
-+	spin_lock_irqsave(&stats->iostat_lock, flags);
-+
-+	if (sd_iostats[scsi_disk(disk)->index] != NULL) {
-+		spin_unlock_irqrestore(&stats->iostat_lock, flags);
-+		kfree (stats);
-+		return;
-+	}
-+
-+	sd_iostats[scsi_disk(disk)->index] = stats;
-+
-+	spin_unlock_irqrestore(&stats->iostat_lock, flags);
-+
-+	strncpy(stats->iostat_name, disk->disk_name,
-+		sizeof(stats->iostat_name)-1);
-+
-+	pde = create_proc_entry(stats->iostat_name, S_IRUGO | S_IWUSR,
-+				sd_iostats_procdir);
-+	if (pde == NULL) {
-+		printk(KERN_WARNING "Can't create /proc/scsi/%s/%s\n",
-+			sd_iostats_procdir_name, disk->disk_name);
-+	} else {
-+		pde->proc_fops = &sd_iostats_proc_fops;
-+		pde->data = disk;
-+	}
-+}
-+
-+void sd_iostats_fini(void)
-+{
-+	int  i;
-+
-+	if (sd_iostats == NULL)
-+		return;
-+
-+	for (i = 0; i < SD_STATS; i++) {
-+		if (sd_iostats[i] == NULL)
-+			continue;
-+		if (sd_iostats_procdir != NULL)
-+			remove_proc_entry(sd_iostats[i]->iostat_name,
-+						sd_iostats_procdir);
-+		kfree(sd_iostats[i]);
-+	}
-+
-+	if (proc_scsi != NULL && sd_iostats_procdir != NULL)
-+		remove_proc_entry(sd_iostats_procdir_name, proc_scsi);
-+
-+	sd_iostats_procdir = NULL;
-+	kfree(sd_iostats);
-+	sd_iostats = NULL;
-+}
-+
-+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt)
-+{
-+	struct request		*rq = SCpnt->request;
-+	iostat_stats_t		*stats;
-+	unsigned long		*tcounter;
-+	int			tbucket;
-+	int			tmp;
-+	unsigned long		irqflags;
-+	int			disk, i;
-+
-+	disk = scsi_disk(rq->rq_disk)->index;
-+
-+	if (sd_iostats == NULL)
-+		return;
-+
-+	if (disk < 0 || disk >= SD_STATS) {
-+		printk(KERN_ERR "sd_iostats_bump: unexpected disk index "
-+		        "%d([0-%d])\n", disk, SD_STATS);
-+		BUG();
-+	}
-+
-+	stats = sd_iostats[disk];
-+	if (stats == NULL)
-+		return;
-+
-+	tmp = jiffies -  rq->start_time;
-+	for (tbucket = 0; tmp > 1; tbucket++)
-+		tmp >>= 1;
-+	if (tbucket >= IOSTAT_NCOUNTERS)
-+		tbucket = IOSTAT_NCOUNTERS - 1;
-+	//printk("%u ticks in D to %u\n", jiffies - rq->start_time, tbucket);
-+
-+	tcounter = rq_data_dir(rq) == WRITE ? 
-+		&stats->iostat_wtime[tbucket] : &stats->iostat_rtime[tbucket];
-+
-+	spin_lock_irqsave(&stats->iostat_lock, irqflags);
-+
-+	/* update delay stats */
-+	(*tcounter)++;
-+
-+	/* update queue depth stats */
-+	i = stats->iostat_queue_depth;
-+	if (i >= IOSTAT_NCOUNTERS)
-+		i = IOSTAT_NCOUNTERS - 1;
-+	stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_depth--;
-+
-+	/* update seek stats. XXX: not sure about nr_sectors */
-+	stats->iostat_sectors += rq->nr_sectors;
-+	stats->iostat_reqs++;
-+	if (rq->sector != stats->iostat_next_sector) {
-+		stats->iostat_seek_sectors += 
-+			rq->sector > stats->iostat_next_sector ?
-+			rq->sector - stats->iostat_next_sector :
-+			stats->iostat_next_sector - rq->sector;
-+		stats->iostat_seeks++;
-+	}
-+	stats->iostat_next_sector = rq->sector + rq->nr_sectors;
-+
-+	stats->iostat_queue_stamp = jiffies;
-+
-+	spin_unlock_irqrestore(&stats->iostat_lock, irqflags);
-+}
-+
-+void sd_iostats_start_req(struct scsi_cmnd *SCpnt)
-+{
-+	struct request		*rq = SCpnt->request;
-+	iostat_stats_t		*stats;
-+	iostat_counter_t	*counter;
-+	int			bucket;
-+	int			tbucket;
-+	int			tmp;
-+	unsigned long		irqflags;
-+	int			disk, i;
-+	int			nsect;
-+
-+	disk = scsi_disk(rq->rq_disk)->index;
-+
-+	if (sd_iostats == NULL)
-+		return;
-+
-+	if (disk < 0 || disk >= SD_STATS) {
-+		printk(KERN_ERR "sd_iostats_bump: unexpected disk index %d([0-%d])\n",
-+			disk, SD_STATS);
-+		BUG();
-+	}
-+
-+	stats = sd_iostats[disk];
-+	if (stats == NULL)
-+		return;
-+
-+	nsect = SCpnt->request_bufflen >> 9;
-+	for (bucket = 0, tmp = nsect; tmp > 1; bucket++)
-+		tmp >>= 1;
-+
-+	if (bucket >= IOSTAT_NCOUNTERS) {
-+		printk (KERN_ERR "sd_iostats_bump: nsect %d too big\n", nsect);
-+		BUG();
-+	}
-+
-+	counter = rq_data_dir(rq) == WRITE ? 
-+		&stats->iostat_write_histogram[bucket] :
-+		&stats->iostat_read_histogram[bucket];
-+
-+	tmp = jiffies - rq->start_time;
-+	for (tbucket = 0; tmp > 1; tbucket++)
-+		tmp >>= 1;
-+	if (tbucket >= IOSTAT_NCOUNTERS)
-+		tbucket = IOSTAT_NCOUNTERS - 1;
-+	//printk("%u ticks in Q to %u\n", jiffies - rq->start_time, tbucket);
-+
-+	/* an ugly hack to know exact processing time. the right
-+	 * solution is to add one more field to struct request
-+	 * hopefully it will break nothing ... */
-+	rq->start_time = jiffies;
-+
-+	spin_lock_irqsave(&stats->iostat_lock, irqflags);
-+
-+	/* update queue depth stats */
-+	i = stats->iostat_queue_depth;
-+	if (i >= IOSTAT_NCOUNTERS)
-+		i = IOSTAT_NCOUNTERS - 1;
-+	stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_depth++;
-+
-+	/* update delay stats */
-+	if (rq_data_dir(rq) == WRITE) {
-+		stats->iostat_wtime_in_queue[tbucket]++;
-+		stats->iostat_write_reqs++;
-+	} else {
-+		stats->iostat_rtime_in_queue[tbucket]++;
-+		stats->iostat_read_reqs++;
-+	}
-+
-+	/* update size stats */
-+	counter->iostat_size += nsect;
-+	counter->iostat_count++;
-+
-+	stats->iostat_queue_stamp = jiffies;
-+
-+	spin_unlock_irqrestore(&stats->iostat_lock, irqflags);
-+}
-+#endif
-+
- /**
-  *	init_sd - entry point for this driver (both when built in or when
-  *	a module).
-@@ -1584,6 +2127,7 @@ static void sd_shutdown(struct device *d
- static int __init init_sd(void)
- {
- 	int majors = 0, i;
-+   int rc = 0;
- 
- 	SCSI_LOG_HLQUEUE(3, printk("init_sd: sd driver entry point\n"));
- 
-@@ -1594,7 +2138,10 @@ static int __init init_sd(void)
- 	if (!majors)
- 		return -ENODEV;
- 
--	return scsi_register_driver(&sd_template.gendrv);
-+   rc = scsi_register_driver(&sd_template.gendrv);
-+   if (rc == 0)
-+      sd_iostats_init();
-+   return rc;
- }
- 
- /**
-@@ -1608,6 +2155,7 @@ static void __exit exit_sd(void)
- 
- 	SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
- 
-+   sd_iostats_fini();
- 	scsi_unregister_driver(&sd_template.gendrv);
- 	for (i = 0; i < SD_MAJORS; i++)
- 		unregister_blkdev(sd_major(i), "sd");
diff --git a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch b/lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch
deleted file mode 100644
index e38e22af27253235ca8e0c355c166cb92f4d609b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/sd_iostats-2.6-rhel5.patch
+++ /dev/null
@@ -1,650 +0,0 @@
-Index: linux-2.6.9-5.0.3.EL/drivers/scsi/Kconfig
-===================================================================
-Index: linux-2.6.9/drivers/scsi/Kconfig
-===================================================================
---- linux-2.6.9.orig/drivers/scsi/Kconfig	2007-07-23 14:19:13.000000000 +0400
-+++ linux-2.6.9/drivers/scsi/Kconfig	2007-07-26 14:16:36.000000000 +0400
-@@ -61,6 +61,14 @@ config SCSI_DUMP
- 	help
- 	   SCSI dump support
- 
-+config SD_IOSTATS
-+   bool "Enable SCSI disk I/O stats"
-+   depends on BLK_DEV_SD
-+   default y
-+   ---help---
-+     This enables SCSI disk I/O stats collection.  You must also enable
-+     /proc file system support if you want this feature.
-+
- config CHR_DEV_ST
- 	tristate "SCSI tape support"
- 	depends on SCSI
-Index: linux-2.6.9/drivers/scsi/scsi_proc.c
-===================================================================
---- linux-2.6.9.orig/drivers/scsi/scsi_proc.c	2007-03-13 02:47:28.000000000 +0300
-+++ linux-2.6.9/drivers/scsi/scsi_proc.c	2007-07-26 14:16:36.000000000 +0400
-@@ -38,7 +38,8 @@
- /* 4K page size, but our output routines, use some slack for overruns */
- #define PROC_BLOCK_SIZE (3*1024)
- 
--static struct proc_dir_entry *proc_scsi;
-+struct proc_dir_entry *proc_scsi;
-+EXPORT_SYMBOL(proc_scsi);
- 
- /* Protect sht->present and sht->proc_dir */
- static DECLARE_MUTEX(global_host_template_sem);
-Index: linux-2.6.9/drivers/scsi/sd.c
-===================================================================
---- linux-2.6.9.orig/drivers/scsi/sd.c	2007-03-13 02:47:27.000000000 +0300
-+++ linux-2.6.9/drivers/scsi/sd.c	2007-07-28 14:55:56.000000000 +0400
-@@ -63,6 +63,67 @@
- 
- #include "scsi_logging.h"
- 
-+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS))
-+# include <linux/proc_fs.h>
-+# include <linux/seq_file.h>
-+
-+typedef struct {
-+        unsigned long long iostat_size;
-+        unsigned long long iostat_count;
-+} iostat_counter_t;
-+
-+#define IOSTAT_NCOUNTERS 16
-+typedef struct {
-+        iostat_counter_t        iostat_read_histogram[IOSTAT_NCOUNTERS];
-+        iostat_counter_t        iostat_write_histogram[IOSTAT_NCOUNTERS];
-+        struct timeval          iostat_timeval;
-+
-+	/* queue depth: how well the pipe is filled up */
-+	unsigned long long	iostat_queue_ticks[IOSTAT_NCOUNTERS];
-+	unsigned long long	iostat_queue_ticks_sum;
-+	unsigned long		iostat_queue_depth;
-+	unsigned long		iostat_queue_stamp;
-+
-+	/* seeks: how linear the traffic is */
-+	unsigned long long	iostat_next_sector;
-+	unsigned long long	iostat_seek_sectors;
-+	unsigned long long	iostat_seeks;
-+	unsigned long long	iostat_sectors;
-+	unsigned long long	iostat_reqs;
-+	unsigned long		iostat_read_reqs;
-+	unsigned long		iostat_write_reqs;
-+
-+	/* process time: how long it takes to process requests */
-+	unsigned long		iostat_rtime[IOSTAT_NCOUNTERS];
-+	unsigned long		iostat_wtime[IOSTAT_NCOUNTERS];
-+
-+	/* queue time: how long process spent in elevator's queue */
-+	unsigned long		iostat_rtime_in_queue[IOSTAT_NCOUNTERS];
-+	unsigned long		iostat_wtime_in_queue[IOSTAT_NCOUNTERS];
-+
-+	char			iostat_name[32];
-+
-+	/* must be the last field, as it's used to know size to be memset'ed */
-+	spinlock_t              iostat_lock;
-+}  ____cacheline_aligned_in_smp iostat_stats_t;
-+
-+iostat_stats_t       **sd_iostats;
-+struct proc_dir_entry *sd_iostats_procdir;
-+char                   sd_iostats_procdir_name[] = "sd_iostats";
-+
-+extern void sd_iostats_init(void);
-+extern void sd_iostats_init_disk(struct gendisk *);
-+extern void sd_iostats_fini(void);
-+void sd_iostats_start_req(struct scsi_cmnd *SCpnt);
-+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt);
-+#else
-+static inline void sd_iostats_init(void) {}
-+static inline void sd_iostats_init_disk(struct gendisk *disk) {}
-+static inline void sd_iostats_fini(void) {}
-+static inline void sd_iostats_start_req(struct scsi_cmnd *SCpnt) {}
-+static inline void sd_iostats_finish_req(struct scsi_cmnd *SCpnt) {}
-+#endif
-+
- /*
-  * More than enough for everybody ;)  The huge number of majors
-  * is a leftover from 16bit dev_t days, we don't really need that
-@@ -76,6 +137,7 @@
-  */
- #define SD_MAX_DISKS	(((26 * 26) + 26 + 1) * 26)
- 
-+#define SD_STATS 256
- /*
-  * Time out in seconds for disks and Magneto-opticals (which are slower).
-  */
-@@ -278,6 +340,8 @@ static int sd_init_command(struct scsi_c
- 	SCSI_LOG_HLQUEUE(2, printk("%s : block=%llu\n",
- 				   disk->disk_name, (unsigned long long)block));
- 
-+	sd_iostats_start_req(SCpnt);
-+
- 	/*
- 	 * If we have a 1K hardware sectorsize, prevent access to single
- 	 * 512 byte sectors.  In theory we could handle this - in fact
-@@ -474,6 +538,7 @@ static int sd_open(struct inode *inode, 
- 			scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT);
- 	}
- 
-+   sd_iostats_init_disk(disk);
- 	return 0;
- 
- error_out:
-@@ -849,6 +914,7 @@ static void sd_rw_intr(struct scsi_cmnd 
- 		break;
- 	}
-  out:
-+	sd_iostats_finish_req(SCpnt);
- 	scsi_io_completion(SCpnt, good_bytes);
- }
-
-@@ -1575,6 +1643,481 @@ static void sd_shutdown(struct device *d
- 	sd_sync_cache(sdp);
- }	
- 
-+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS))
-+static int
-+sd_iostats_seq_show(struct seq_file *seq, void *v)
-+{
-+	struct timeval     now;
-+	struct gendisk *disk = seq->private;
-+	iostat_stats_t    *stats;
-+	unsigned long long read_len;
-+	unsigned long long read_len_tot;
-+	unsigned long      read_num;
-+	unsigned long      read_num_tot;
-+	unsigned long long write_len;
-+	unsigned long long write_len_tot;
-+	unsigned long      write_num;
-+	unsigned long      write_num_tot;
-+	int                i;
-+	int                maxi;
-+
-+	if (sd_iostats == NULL) {
-+		printk(KERN_ERR "sd_iostats_seq_show: NULL stats array\n");
-+		BUG();
-+	}
-+
-+	stats = sd_iostats[scsi_disk(disk)->index];
-+	if (stats == NULL) {
-+		printk(KERN_ERR "sd_iostats_seq_show: NULL stats entry\n");
-+		BUG();
-+	}
-+
-+	do_gettimeofday(&now);
-+	now.tv_sec -= stats->iostat_timeval.tv_sec;
-+	now.tv_usec -= stats->iostat_timeval.tv_usec;
-+	if (now.tv_usec < 0) {
-+		now.tv_usec += 1000000;
-+		now.tv_sec--;
-+	}
-+
-+	/* this sampling races with updates */
-+	seq_printf(seq, "index:        %lu   snapshot_time:         %lu.%06lu\n",
-+			(unsigned long) scsi_disk(disk)->index,
-+			now.tv_sec, now.tv_usec);
-+
-+	for (i = IOSTAT_NCOUNTERS - 1; i > 0; i--)
-+		if (stats->iostat_read_histogram[i].iostat_count != 0 ||
-+				stats->iostat_write_histogram[i].iostat_count != 0)
-+			break;
-+	maxi = i;
-+
-+	seq_printf(seq, "%8s %8s %12s %8s %12s\n", "size", 
-+			"reads", "total", "writes", "total");
-+
-+	read_len_tot = write_len_tot = 0;
-+	read_num_tot = write_num_tot = 0;
-+	for (i = 0; i <= maxi; i++) {
-+		read_len = stats->iostat_read_histogram[i].iostat_size;
-+		read_len_tot += read_len;
-+		read_num = stats->iostat_read_histogram[i].iostat_count;
-+		read_num_tot += read_num;
-+
-+		write_len = stats->iostat_write_histogram[i].iostat_size;
-+		write_len_tot += write_len;
-+		write_num = stats->iostat_write_histogram[i].iostat_count;
-+		write_num_tot += write_num;
-+
-+		seq_printf (seq, "%8d %8lu %12llu %8lu %12llu\n", 
-+				512<<i, read_num, read_len, write_num, write_len);
-+	}
-+
-+	seq_printf(seq, "%8s %8lu %12llu %8lu %12llu\n\n", "total",
-+			read_num_tot, read_len_tot, 
-+			write_num_tot, write_len_tot);
-+
-+	seq_printf(seq, "%8s %8s %8s\n", "qdepth", "ticks", "%");
-+	for (i = 0; i < IOSTAT_NCOUNTERS; i++) {
-+		unsigned long long ticks, percent;
-+		ticks = stats->iostat_queue_ticks[i];
-+		if (ticks == 0)
-+			continue;
-+		percent = stats->iostat_queue_ticks[i] * 100;
-+		do_div(percent, stats->iostat_queue_ticks_sum);
-+		seq_printf(seq, "%8d %8llu %8llu\n", i, ticks, percent);
-+	}
-+
-+	if (stats->iostat_reqs != 0) {
-+		unsigned long long aveseek = 0, percent = 0;
-+
-+		if (stats->iostat_seeks) {
-+			aveseek = stats->iostat_seek_sectors;
-+			do_div(aveseek, stats->iostat_seeks);
-+			percent = stats->iostat_seeks * 100;
-+			do_div(percent, stats->iostat_reqs);
-+		}
-+
-+		seq_printf(seq, "\n%llu sectors in %llu reqs: %llu seek(s) over "
-+				"%llu sectors in ave, %llu%% of all reqs\n",
-+				stats->iostat_sectors, stats->iostat_reqs,
-+				stats->iostat_seeks, aveseek, percent);
-+	}
-+
-+	seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "process time", "reads",
-+			"%%", "writes", "%%");
-+	for (i = 0; i < IOSTAT_NCOUNTERS; i++) {
-+		unsigned long read_percent = 0, write_percent = 0;
-+		if (stats->iostat_wtime[i] == 0 &&
-+				stats->iostat_rtime[i] == 0)
-+			continue;
-+		if (stats->iostat_read_reqs)
-+			read_percent = stats->iostat_rtime[i] * 100 / 
-+				stats->iostat_read_reqs;
-+		if (stats->iostat_write_reqs)
-+			write_percent = stats->iostat_wtime[i] * 100 / 
-+				stats->iostat_write_reqs;
-+		seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n",
-+				jiffies_to_msecs(((1UL << i) >> 1) << 1),
-+				stats->iostat_rtime[i], read_percent,
-+				stats->iostat_wtime[i], write_percent);
-+	}
-+
-+	seq_printf(seq, "\n%16s %8s %8s %8s %8s\n", "time in queue", "reads",
-+			"%%", "writes", "%%");
-+	for (i = 0; i < IOSTAT_NCOUNTERS; i++) {
-+		unsigned long read_percent = 0, write_percent = 0;
-+		if (stats->iostat_wtime_in_queue[i] == 0 &&
-+				stats->iostat_rtime_in_queue[i] == 0)
-+			continue;
-+		if (stats->iostat_read_reqs)
-+			read_percent = stats->iostat_rtime_in_queue[i] * 100 / 
-+				stats->iostat_read_reqs;
-+		if (stats->iostat_write_reqs)
-+			write_percent = stats->iostat_wtime_in_queue[i] * 100 / 
-+				stats->iostat_write_reqs;
-+		seq_printf(seq, "%16u %8lu %8lu %8lu %8lu\n",
-+				jiffies_to_msecs(((1UL << i) >> 1) << 1),
-+				stats->iostat_rtime_in_queue[i],
-+				read_percent,
-+				stats->iostat_wtime_in_queue[i],
-+				write_percent);
-+	}
-+
-+	return 0;
-+}
-+
-+static void *
-+sd_iostats_seq_start(struct seq_file *p, loff_t *pos)
-+{
-+	return (*pos == 0) ? (void *)1 : NULL;
-+}
-+
-+static void *
-+sd_iostats_seq_next(struct seq_file *p, void *v, loff_t *pos)
-+{
-+	++*pos;
-+	return NULL;
-+}
-+
-+static void
-+sd_iostats_seq_stop(struct seq_file *p, void *v)
-+{
-+}
-+
-+static struct seq_operations sd_iostats_seqops = {
-+	.start = sd_iostats_seq_start,
-+	.stop  = sd_iostats_seq_stop,
-+	.next  = sd_iostats_seq_next,
-+	.show  = sd_iostats_seq_show,
-+};
-+
-+static int
-+sd_iostats_seq_open (struct inode *inode, struct file *file)
-+{
-+	int                    rc;
-+
-+	rc = seq_open(file, &sd_iostats_seqops);
-+	if (rc != 0)
-+		return rc;
-+
-+	((struct seq_file *)file->private_data)->private = PDE(inode)->data;
-+	return 0;
-+}
-+
-+static ssize_t
-+sd_iostats_seq_write(struct file *file, const char *buffer,
-+                     size_t len, loff_t *off)
-+{
-+	struct seq_file   *seq = file->private_data;
-+	struct gendisk *disk = seq->private;
-+	iostat_stats_t    *stats = sd_iostats[scsi_disk(disk)->index];
-+	unsigned long      flags;
-+	unsigned long      qdepth;
-+
-+
-+	spin_lock_irqsave (&stats->iostat_lock, flags);
-+	qdepth = stats->iostat_queue_depth;
-+	memset (stats, 0, offsetof(iostat_stats_t, iostat_lock));
-+	do_gettimeofday(&stats->iostat_timeval);
-+	stats->iostat_queue_stamp = jiffies;
-+	stats->iostat_queue_depth = qdepth;
-+	spin_unlock_irqrestore (&stats->iostat_lock, flags);
-+
-+	return len;
-+}
-+
-+static struct file_operations sd_iostats_proc_fops = {
-+	.owner   = THIS_MODULE,
-+	.open    = sd_iostats_seq_open,
-+	.read    = seq_read,
-+	.write   = sd_iostats_seq_write,
-+	.llseek  = seq_lseek,
-+	.release = seq_release,
-+};
-+
-+extern struct proc_dir_entry *proc_scsi;
-+
-+void
-+sd_iostats_init(void)
-+{
-+	int    i;
-+
-+	sd_iostats = kmalloc(SD_STATS * sizeof(iostat_stats_t *), GFP_KERNEL);
-+	if (sd_iostats == NULL) {
-+		printk(KERN_WARNING "Can't keep sd iostats: "
-+			"ENOMEM allocating stats array size %d\n",
-+			SD_STATS * sizeof(iostat_stats_t *));
-+		return;
-+	}
-+
-+	for (i = 0; i < SD_STATS; i++)
-+		sd_iostats[i] = NULL;
-+
-+	if (proc_scsi == NULL) {
-+		printk(KERN_WARNING "No access to sd iostats: "
-+			"proc_scsi is NULL\n");
-+		return;
-+	}
-+
-+	sd_iostats_procdir = create_proc_entry(sd_iostats_procdir_name,
-+			S_IFDIR | S_IRUGO | S_IXUGO,
-+			proc_scsi);
-+	if (sd_iostats_procdir == NULL) {
-+		printk(KERN_WARNING "No access to sd iostats: "
-+			"can't create /proc/scsi/%s\n", sd_iostats_procdir_name);
-+		return;
-+        }
-+}
-+
-+void
-+sd_iostats_init_disk(struct gendisk *disk)
-+{
-+	struct proc_dir_entry *pde;
-+	unsigned long          flags;
-+	iostat_stats_t        *stats;
-+
-+	if (sd_iostats == NULL || sd_iostats_procdir == NULL)
-+		return;
-+
-+	if (scsi_disk(disk)->index > SD_STATS) {
-+		printk(KERN_ERR "sd_iostats_init_disk: "
-+			"unexpected disk index %d(%d)\n",
-+			scsi_disk(disk)->index, SD_STATS);
-+		return;
-+	}
-+
-+	if (sd_iostats[scsi_disk(disk)->index] != NULL)
-+		return;
-+
-+	stats = kmalloc(sizeof(*stats), GFP_KERNEL);
-+	if (stats == NULL) {
-+		printk(KERN_WARNING "Can't keep %s iostats: "
-+			"ENOMEM allocating stats size %d\n", 
-+			disk->disk_name, sizeof(*stats));
-+		return;
-+	}
-+
-+	memset (stats, 0, sizeof(*stats));
-+	do_gettimeofday(&stats->iostat_timeval);
-+	stats->iostat_queue_stamp = jiffies;
-+	spin_lock_init(&stats->iostat_lock);
-+
-+
-+	spin_lock_irqsave(&stats->iostat_lock, flags);
-+
-+	if (sd_iostats[scsi_disk(disk)->index] != NULL) {
-+		spin_unlock_irqrestore(&stats->iostat_lock, flags);
-+		kfree (stats);
-+		return;
-+	}
-+
-+	sd_iostats[scsi_disk(disk)->index] = stats;
-+
-+	spin_unlock_irqrestore(&stats->iostat_lock, flags);
-+
-+	strncpy(stats->iostat_name, disk->disk_name,
-+		sizeof(stats->iostat_name)-1);
-+
-+	pde = create_proc_entry(stats->iostat_name, S_IRUGO | S_IWUSR,
-+				sd_iostats_procdir);
-+	if (pde == NULL) {
-+		printk(KERN_WARNING "Can't create /proc/scsi/%s/%s\n",
-+			sd_iostats_procdir_name, disk->disk_name);
-+	} else {
-+		pde->proc_fops = &sd_iostats_proc_fops;
-+		pde->data = disk;
-+	}
-+}
-+
-+void sd_iostats_fini(void)
-+{
-+	int  i;
-+
-+	if (sd_iostats == NULL)
-+		return;
-+
-+	for (i = 0; i < SD_STATS; i++) {
-+		if (sd_iostats[i] == NULL)
-+			continue;
-+		if (sd_iostats_procdir != NULL)
-+			remove_proc_entry(sd_iostats[i]->iostat_name,
-+						sd_iostats_procdir);
-+		kfree(sd_iostats[i]);
-+	}
-+
-+	if (proc_scsi != NULL && sd_iostats_procdir != NULL)
-+		remove_proc_entry(sd_iostats_procdir_name, proc_scsi);
-+
-+	sd_iostats_procdir = NULL;
-+	kfree(sd_iostats);
-+	sd_iostats = NULL;
-+}
-+
-+void sd_iostats_finish_req(struct scsi_cmnd *SCpnt)
-+{
-+	struct request		*rq = SCpnt->request;
-+	iostat_stats_t		*stats;
-+	unsigned long		*tcounter;
-+	int			tbucket;
-+	int			tmp;
-+	unsigned long		irqflags;
-+	int			disk, i;
-+
-+	disk = scsi_disk(rq->rq_disk)->index;
-+
-+	if (sd_iostats == NULL)
-+		return;
-+
-+	if (disk < 0 || disk >= SD_STATS) {
-+		printk(KERN_ERR "sd_iostats_bump: unexpected disk index "
-+		        "%d([0-%d])\n", disk, SD_STATS);
-+		BUG();
-+	}
-+
-+	stats = sd_iostats[disk];
-+	if (stats == NULL)
-+		return;
-+
-+	tmp = jiffies -  rq->start_time;
-+	for (tbucket = 0; tmp > 1; tbucket++)
-+		tmp >>= 1;
-+	if (tbucket >= IOSTAT_NCOUNTERS)
-+		tbucket = IOSTAT_NCOUNTERS - 1;
-+	//printk("%u ticks in D to %u\n", jiffies - rq->start_time, tbucket);
-+
-+	tcounter = rq_data_dir(rq) == WRITE ? 
-+		&stats->iostat_wtime[tbucket] : &stats->iostat_rtime[tbucket];
-+
-+	spin_lock_irqsave(&stats->iostat_lock, irqflags);
-+
-+	/* update delay stats */
-+	(*tcounter)++;
-+
-+	/* update queue depth stats */
-+	i = stats->iostat_queue_depth;
-+	if (i >= IOSTAT_NCOUNTERS)
-+		i = IOSTAT_NCOUNTERS - 1;
-+	stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_depth--;
-+
-+	/* update seek stats. XXX: not sure about nr_sectors */
-+	stats->iostat_sectors += rq->nr_sectors;
-+	stats->iostat_reqs++;
-+	if (rq->sector != stats->iostat_next_sector) {
-+		stats->iostat_seek_sectors += 
-+			rq->sector > stats->iostat_next_sector ?
-+			rq->sector - stats->iostat_next_sector :
-+			stats->iostat_next_sector - rq->sector;
-+		stats->iostat_seeks++;
-+	}
-+	stats->iostat_next_sector = rq->sector + rq->nr_sectors;
-+
-+	stats->iostat_queue_stamp = jiffies;
-+
-+	spin_unlock_irqrestore(&stats->iostat_lock, irqflags);
-+}
-+
-+void sd_iostats_start_req(struct scsi_cmnd *SCpnt)
-+{
-+	struct request		*rq = SCpnt->request;
-+	iostat_stats_t		*stats;
-+	iostat_counter_t	*counter;
-+	int			bucket;
-+	int			tbucket;
-+	int			tmp;
-+	unsigned long		irqflags;
-+	int			disk, i;
-+	int			nsect;
-+
-+	disk = scsi_disk(rq->rq_disk)->index;
-+
-+	if (sd_iostats == NULL)
-+		return;
-+
-+	if (disk < 0 || disk >= SD_STATS) {
-+		printk(KERN_ERR "sd_iostats_bump: unexpected disk index %d([0-%d])\n",
-+			disk, SD_STATS);
-+		BUG();
-+	}
-+
-+	stats = sd_iostats[disk];
-+	if (stats == NULL)
-+		return;
-+
-+	nsect = SCpnt->request_bufflen >> 9;
-+	for (bucket = 0, tmp = nsect; tmp > 1; bucket++)
-+		tmp >>= 1;
-+
-+	if (bucket >= IOSTAT_NCOUNTERS) {
-+		printk (KERN_ERR "sd_iostats_bump: nsect %d too big\n", nsect);
-+		BUG();
-+	}
-+
-+	counter = rq_data_dir(rq) == WRITE ? 
-+		&stats->iostat_write_histogram[bucket] :
-+		&stats->iostat_read_histogram[bucket];
-+
-+	tmp = jiffies - rq->start_time;
-+	for (tbucket = 0; tmp > 1; tbucket++)
-+		tmp >>= 1;
-+	if (tbucket >= IOSTAT_NCOUNTERS)
-+		tbucket = IOSTAT_NCOUNTERS - 1;
-+	//printk("%u ticks in Q to %u\n", jiffies - rq->start_time, tbucket);
-+
-+	/* an ugly hack to know exact processing time. the right
-+	 * solution is to add one more field to struct request
-+	 * hopefully it will break nothing ... */
-+	rq->start_time = jiffies;
-+
-+	spin_lock_irqsave(&stats->iostat_lock, irqflags);
-+
-+	/* update queue depth stats */
-+	i = stats->iostat_queue_depth;
-+	if (i >= IOSTAT_NCOUNTERS)
-+		i = IOSTAT_NCOUNTERS - 1;
-+	stats->iostat_queue_ticks[i] += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_ticks_sum += jiffies - stats->iostat_queue_stamp;
-+	stats->iostat_queue_depth++;
-+
-+	/* update delay stats */
-+	if (rq_data_dir(rq) == WRITE) {
-+		stats->iostat_wtime_in_queue[tbucket]++;
-+		stats->iostat_write_reqs++;
-+	} else {
-+		stats->iostat_rtime_in_queue[tbucket]++;
-+		stats->iostat_read_reqs++;
-+	}
-+
-+	/* update size stats */
-+	counter->iostat_size += nsect;
-+	counter->iostat_count++;
-+
-+	stats->iostat_queue_stamp = jiffies;
-+
-+	spin_unlock_irqrestore(&stats->iostat_lock, irqflags);
-+}
-+#endif
-+
- /**
-  *	init_sd - entry point for this driver (both when built in or when
-  *	a module).
-@@ -1584,6 +2127,7 @@ static void sd_shutdown(struct device *d
- static int __init init_sd(void)
- {
- 	int majors = 0, i;
-+   int rc = 0;
- 
- 	SCSI_LOG_HLQUEUE(3, printk("init_sd: sd driver entry point\n"));
- 
-@@ -1594,7 +2138,10 @@ static int __init init_sd(void)
- 	if (!majors)
- 		return -ENODEV;
- 
--	return scsi_register_driver(&sd_template.gendrv);
-+   rc = scsi_register_driver(&sd_template.gendrv);
-+   if (rc == 0)
-+      sd_iostats_init();
-+   return rc;
- }
- 
- /**
-@@ -1608,6 +2155,7 @@ static void __exit exit_sd(void)
- 
- 	SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
- 
-+   sd_iostats_fini();
- 	scsi_unregister_driver(&sd_template.gendrv);
- 	for (i = 0; i < SD_MAJORS; i++)
- 		unregister_blkdev(sd_major(i), "sd");
diff --git a/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch
deleted file mode 100644
index d6efdc68a8ceae7fd422fbca0f59fe61b5230e77..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/sd_iostats-2.6.22-vanilla.patch
+++ /dev/null
@@ -1,484 +0,0 @@
-Index: linux-2.6.22.5/drivers/scsi/Kconfig
-===================================================================
---- linux-2.6.22.5.orig/drivers/scsi/Kconfig	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/drivers/scsi/Kconfig	2008-02-21 01:20:41.000000000 -0700
-@@ -76,6 +76,14 @@
- 	  In this case, do not compile the driver for your SCSI host adapter
- 	  (below) as a module either.
- 
-+config SD_IOSTATS
-+   bool "Enable SCSI disk I/O stats"
-+   depends on BLK_DEV_SD
-+   default y
-+   ---help---
-+     This enables SCSI disk I/O stats collection.  You must also enable
-+     /proc file system support if you want this feature.
-+
- config CHR_DEV_ST
- 	tristate "SCSI tape support"
- 	depends on SCSI
-Index: linux-2.6.22.5/drivers/scsi/sd.c
-===================================================================
---- linux-2.6.22.5.orig/drivers/scsi/sd.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/drivers/scsi/sd.c	2008-02-21 01:20:41.000000000 -0700
-@@ -62,6 +62,38 @@
- 
- #include "scsi_logging.h"
- 
-+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS))
-+# include <linux/proc_fs.h>
-+# include <linux/seq_file.h>
-+
-+typedef struct {
-+        unsigned long long iostat_size;
-+        unsigned long long iostat_count;
-+} iostat_counter_t;
-+
-+#define IOSTAT_NCOUNTERS 16
-+typedef struct {
-+        iostat_counter_t        iostat_read_histogram[IOSTAT_NCOUNTERS];
-+        iostat_counter_t        iostat_write_histogram[IOSTAT_NCOUNTERS];
-+        struct timeval          iostat_timeval;
-+} iostat_stats_t;
-+
-+iostat_stats_t       **sd_iostats;
-+spinlock_t             sd_iostats_lock;
-+struct proc_dir_entry *sd_iostats_procdir;
-+char                   sd_iostats_procdir_name[] = "sd_iostats";
-+
-+extern void sd_iostats_init(void);
-+extern void sd_iostats_init_disk(struct gendisk *);
-+extern void sd_iostats_fini(void);
-+extern void sd_iostats_bump(int disk, unsigned int nsect, int iswrite);
-+#else
-+static inline void sd_iostats_init(void) {}
-+static inline void sd_iostats_init_disk(struct gendisk *disk) {}
-+static inline void sd_iostats_fini(void) {}
-+static inline void sd_iostats_bump(int disk, unsigned int nsect, int iswrite) {}
-+#endif
-+
- MODULE_AUTHOR("Eric Youngdale");
- MODULE_DESCRIPTION("SCSI disk (sd) driver");
- MODULE_LICENSE("GPL");
-@@ -89,6 +121,7 @@
- static DEFINE_IDR(sd_index_idr);
- static DEFINE_SPINLOCK(sd_index_lock);
- 
-+#define SD_STATS 256
- /* This semaphore is used to mediate the 0->1 reference get in the
-  * face of object destruction (i.e. we can't allow a get on an
-  * object after last put) */
-@@ -368,6 +401,9 @@
- 	SCSI_LOG_HLQUEUE(2, scmd_printk(KERN_INFO, SCpnt, "block=%llu\n",
- 					(unsigned long long)block));
- 
-+   sd_iostats_bump(scsi_disk(disk)->index, this_count,
-+                   rq_data_dir(SCpnt->request) == WRITE);
-+
- 	/*
- 	 * If we have a 1K hardware sectorsize, prevent access to single
- 	 * 512 byte sectors.  In theory we could handle this - in fact
-@@ -575,6 +611,7 @@
- 			scsi_set_medium_removal(sdev, SCSI_REMOVAL_PREVENT);
- 	}
- 
-+   sd_iostats_init_disk(disk);
- 	return 0;
- 
- error_out:
-@@ -601,8 +638,20 @@
- 
- 	SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, "sd_release\n"));
- 
--	if (!--sdkp->openers && sdev->removable) {
--		if (scsi_block_when_processing_errors(sdev))
-+	if (!--sdkp->openers) {
-+		/*
-+		 * Remove sd_iostats information about this disk
-+		 */
-+		if (sd_iostats_procdir != NULL) {
-+			remove_proc_entry(disk->disk_name, sd_iostats_procdir);
-+		}
-+		if (sd_iostats != NULL) {
-+			if (sd_iostats[sdkp->index] != NULL) {
-+				kfree (sd_iostats[sdkp->index]);
-+				sd_iostats[sdkp->index] = NULL;
-+			}
-+		}
-+		if (sdev->removable && scsi_block_when_processing_errors(sdev))
- 			scsi_set_medium_removal(sdev, SCSI_REMOVAL_ALLOW);
- 	}
- 
-@@ -1563,6 +1612,342 @@
- 	return 0;
- }
- 
-+#if (defined(CONFIG_SD_IOSTATS) && defined(CONFIG_PROC_FS))
-+static int
-+sd_iostats_seq_show(struct seq_file *seq, void *v)
-+{
-+        struct timeval     now;
-+        struct gendisk *disk;
-+        iostat_stats_t    *stats;
-+        unsigned long long read_len;
-+        unsigned long long read_len_tot;
-+        unsigned long      read_num;
-+        unsigned long      read_num_tot;
-+        unsigned long long write_len;
-+        unsigned long long write_len_tot;
-+        unsigned long      write_num;
-+        unsigned long      write_num_tot;
-+        int                i;
-+        int                maxi;
-+
-+	if (seq == NULL || seq->private == NULL) {
-+		printk(KERN_ERR "sd_iostats_seq_show: NULL disk\n");
-+		BUG();
-+	}
-+
-+	disk = seq->private;
-+
-+	if (scsi_disk(disk) == NULL || (disk->flags & GENHD_FL_UP) == 0) {
-+		seq_printf(seq, "sd_iostats_seq_show: Device %s "
-+				"does not exist\n", disk->disk_name);
-+		return 0;
-+	}
-+
-+        if (sd_iostats == NULL) {
-+                printk(KERN_ERR "sd_iostats_seq_show: NULL stats array\n");
-+                BUG();
-+        }
-+
-+        stats = sd_iostats[scsi_disk(disk)->index];
-+        if (stats == NULL) {
-+                seq_printf(seq, "sd_iostats_seq_show: sd_iostats "
-+				"entry %d does not exist\n",
-+				scsi_disk(disk)->index);
-+		return 0;
-+        }
-+
-+        do_gettimeofday(&now);
-+        now.tv_sec -= stats->iostat_timeval.tv_sec;
-+        now.tv_usec -= stats->iostat_timeval.tv_usec;
-+        if (now.tv_usec < 0) {
-+                now.tv_usec += 1000000;
-+                now.tv_sec--;
-+        }
-+
-+        /* this sampling races with updates */
-+        seq_printf(seq, "index:        %lu   snapshot_time:         %lu.%06lu\n",
-+                   scsi_disk(disk)->index, now.tv_sec, now.tv_usec);
-+
-+        for (i = IOSTAT_NCOUNTERS - 1; i > 0; i--)
-+                if (stats->iostat_read_histogram[i].iostat_count != 0 ||
-+                    stats->iostat_write_histogram[i].iostat_count != 0)
-+                        break;
-+        maxi = i;
-+
-+        seq_printf(seq, "%8s %8s %12s %8s %12s\n", "size", 
-+                   "reads", "total", "writes", "total");
-+
-+        read_len_tot = write_len_tot = 0;
-+        read_num_tot = write_num_tot = 0;
-+        for (i = 0; i <= maxi; i++) {
-+                read_len = stats->iostat_read_histogram[i].iostat_size;
-+                read_len_tot += read_len;
-+                read_num = stats->iostat_read_histogram[i].iostat_count;
-+                read_num_tot += read_num;
-+
-+                write_len = stats->iostat_write_histogram[i].iostat_size;
-+                write_len_tot += write_len;
-+                write_num = stats->iostat_write_histogram[i].iostat_count;
-+                write_num_tot += write_num;
-+
-+                seq_printf (seq, "%8d %8lu %12llu %8lu %12llu\n", 
-+                            512<<i, read_num, read_len, write_num, write_len);
-+        }
-+        
-+        seq_printf(seq, "%8s %8lu %12llu %8lu %12llu\n", "total",
-+                   read_num_tot, read_len_tot, 
-+                   write_num_tot, write_len_tot);
-+        return 0;
-+}
-+
-+static void *
-+sd_iostats_seq_start(struct seq_file *p, loff_t *pos)
-+{
-+        return (*pos == 0) ? (void *)1 : NULL;
-+}
-+
-+static void *
-+sd_iostats_seq_next(struct seq_file *p, void *v, loff_t *pos)
-+{
-+        ++*pos;
-+        return NULL;
-+}
-+
-+static void
-+sd_iostats_seq_stop(struct seq_file *p, void *v)
-+{
-+}
-+
-+static struct seq_operations sd_iostats_seqops = {
-+        .start = sd_iostats_seq_start,
-+        .stop  = sd_iostats_seq_stop,
-+        .next  = sd_iostats_seq_next,
-+        .show  = sd_iostats_seq_show,
-+};
-+
-+static int
-+sd_iostats_seq_open (struct inode *inode, struct file *file)
-+{
-+        int                    rc;
-+
-+        rc = seq_open(file, &sd_iostats_seqops);
-+        if (rc != 0)
-+                return rc;
-+
-+        ((struct seq_file *)file->private_data)->private = PDE(inode)->data;
-+        return 0;
-+}
-+
-+static ssize_t
-+sd_iostats_seq_write(struct file *file, const char *buffer,
-+                     size_t len, loff_t *off)
-+{
-+        struct seq_file   *seq = file->private_data;
-+        struct gendisk *disk = seq->private;
-+        iostat_stats_t    *stats = sd_iostats[scsi_disk(disk)->index];
-+        unsigned long      flags;
-+        
-+        
-+        spin_lock_irqsave (&sd_iostats_lock, flags);
-+        memset (stats, 0, sizeof(*stats));
-+        do_gettimeofday(&stats->iostat_timeval);
-+        spin_unlock_irqrestore (&sd_iostats_lock, flags);
-+
-+        return len;
-+}
-+
-+static struct file_operations sd_iostats_proc_fops = {
-+        .owner   = THIS_MODULE,
-+        .open    = sd_iostats_seq_open,
-+        .read    = seq_read,
-+        .write   = sd_iostats_seq_write,
-+        .llseek  = seq_lseek,
-+        .release = seq_release,
-+};
-+
-+extern struct proc_dir_entry *proc_scsi;
-+
-+void
-+sd_iostats_init(void)
-+{
-+        int    i;
-+
-+        spin_lock_init(&sd_iostats_lock);
-+
-+        sd_iostats = kmalloc(SD_STATS * sizeof(iostat_stats_t *), GFP_KERNEL);
-+        if (sd_iostats == NULL) {
-+                printk(KERN_WARNING "Can't keep sd iostats: "
-+                       "ENOMEM allocating stats array size %ld\n",
-+                       SD_STATS * sizeof(iostat_stats_t *));
-+                return;
-+        }
-+
-+        for (i = 0; i < SD_STATS; i++)
-+                sd_iostats[i] = NULL;
-+
-+        if (proc_scsi == NULL) {
-+                printk(KERN_WARNING "No access to sd iostats: "
-+                       "proc_scsi is NULL\n");
-+                return;
-+        }
-+
-+        sd_iostats_procdir = create_proc_entry(sd_iostats_procdir_name,
-+                                               S_IFDIR | S_IRUGO | S_IXUGO,
-+                                               proc_scsi);
-+        if (sd_iostats_procdir == NULL) {
-+                printk(KERN_WARNING "No access to sd iostats: "
-+                       "can't create /proc/scsi/%s\n", sd_iostats_procdir_name);
-+                return;
-+        }
-+}
-+
-+void
-+sd_iostats_init_disk(struct gendisk *disk)
-+{
-+        struct proc_dir_entry *pde;
-+        unsigned long          flags;
-+        iostat_stats_t        *stats;
-+
-+        if (sd_iostats == NULL ||
-+            sd_iostats_procdir == NULL)
-+                return;
-+
-+        if (scsi_disk(disk)->index > SD_STATS) {
-+                printk(KERN_ERR "sd_iostats_init_disk: "
-+                       "unexpected disk index %d(%d)\n",
-+                       scsi_disk(disk)->index, SD_STATS);
-+				    return;
-+        }
-+
-+        if (sd_iostats[scsi_disk(disk)->index] != NULL)
-+                return;
-+
-+        stats = kmalloc(sizeof(*stats), GFP_KERNEL);
-+        if (stats == NULL) {
-+                printk(KERN_WARNING "Can't keep %s iostats: "
-+                       "ENOMEM allocating stats size %ld\n", 
-+                       disk->disk_name, sizeof(*stats));
-+                return;
-+        }
-+
-+        memset (stats, 0, sizeof(*stats));
-+        do_gettimeofday(&stats->iostat_timeval);
-+
-+        spin_lock_irqsave(&sd_iostats_lock, flags);
-+
-+        if (sd_iostats[scsi_disk(disk)->index] != NULL) {
-+                spin_unlock_irqrestore(&sd_iostats_lock, flags);
-+                kfree (stats);
-+                return;
-+        }
-+
-+        sd_iostats[scsi_disk(disk)->index] = stats;
-+        
-+        spin_unlock_irqrestore(&sd_iostats_lock, flags);
-+        
-+        pde = create_proc_entry(disk->disk_name, S_IRUGO | S_IWUSR, 
-+                                sd_iostats_procdir);
-+        if (pde == NULL) {
-+                printk(KERN_WARNING "Can't create /proc/scsi/%s/%s\n",
-+                       sd_iostats_procdir_name, disk->disk_name);
-+        } else {
-+                pde->proc_fops = &sd_iostats_proc_fops;
-+                pde->data = disk;
-+        }
-+}
-+
-+static void sd_devname(unsigned int disknum, char *buffer)
-+{
-+        if (disknum < 26)
-+                sprintf(buffer, "sd%c", 'a' + disknum);
-+        else {
-+                unsigned int min1;
-+                unsigned int min2;
-+                /*
-+                 * For larger numbers of disks, we need to go to a new
-+                 * naming scheme.
-+                 */
-+                min1 = disknum / 26;
-+                min2 = disknum % 26;
-+                sprintf(buffer, "sd%c%c", 'a' + min1 - 1, 'a' + min2);
-+        }
-+}
-+
-+void
-+sd_iostats_fini(void)
-+{
-+        char name[6];
-+        int  i;
-+        
-+        if (sd_iostats_procdir != NULL) {
-+                for (i = 0; i < SD_STATS; i++) {
-+                        sd_devname(i, name);
-+                        remove_proc_entry(name, sd_iostats_procdir);
-+                }
-+
-+                if (proc_scsi == NULL) {
-+                        printk(KERN_ERR "sd_iostats_fini: proc_scsi NULL\n");
-+                        BUG();
-+                }
-+                remove_proc_entry(sd_iostats_procdir_name,
-+                                  proc_scsi);
-+
-+                sd_iostats_procdir = NULL;
-+        }
-+        
-+        if (sd_iostats != NULL) {
-+                for (i = 0; i < SD_STATS; i++) {
-+                        if (sd_iostats[i] != NULL)
-+                                kfree (sd_iostats[i]);
-+                }
-+                
-+                kfree(sd_iostats);
-+                sd_iostats = NULL;
-+        }
-+}
-+
-+void
-+sd_iostats_bump(int disk, unsigned int nsect, int iswrite)
-+{
-+        iostat_stats_t    *stats;
-+        iostat_counter_t  *counter;
-+        int                bucket;
-+        int                tmp;
-+        unsigned long      irqflags;
-+
-+        if (sd_iostats == NULL)
-+                return;
-+
-+        if (disk < 0 || disk >= SD_STATS) {
-+                printk(KERN_ERR "sd_iostats_bump: unexpected disk index %d([0-%d])\n",
-+                       disk, SD_STATS);
-+                BUG();
-+        }
-+
-+        for (bucket = 0, tmp = nsect; tmp > 1; bucket++)
-+                tmp /= 2;
-+
-+        if (bucket >= IOSTAT_NCOUNTERS) {
-+                printk (KERN_ERR "sd_iostats_bump: nsect %d too big\n", nsect);
-+                BUG();
-+        }
-+
-+        spin_lock_irqsave(&sd_iostats_lock, irqflags);
-+        
-+        stats = sd_iostats[disk];
-+        if (stats != NULL) {
-+                counter = iswrite ? 
-+                          &stats->iostat_write_histogram[bucket] :
-+                          &stats->iostat_read_histogram[bucket];
-+
-+                counter->iostat_size += nsect;
-+                counter->iostat_count++;
-+        }
-+
-+        spin_unlock_irqrestore(&sd_iostats_lock, irqflags);
-+}
-+#endif
-+
- /**
-  *	sd_probe - called during driver initialization and whenever a
-  *	new scsi device is attached to the system. It is called once
-@@ -1854,6 +2239,7 @@
- 	err = scsi_register_driver(&sd_template.gendrv);
- 	if (err)
- 		goto err_out_class;
-+	sd_iostats_init();
- 
- 	return 0;
- 
-@@ -1876,6 +2262,7 @@
- 
- 	SCSI_LOG_HLQUEUE(3, printk("exit_sd: exiting sd driver\n"));
- 
-+	sd_iostats_fini();
- 	scsi_unregister_driver(&sd_template.gendrv);
- 	class_unregister(&sd_disk_class);
- 
-Index: linux-2.6.22.5/drivers/scsi/scsi_proc.c
-===================================================================
---- linux-2.6.22.5.orig/drivers/scsi/scsi_proc.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/drivers/scsi/scsi_proc.c	2008-02-21 01:20:41.000000000 -0700
-@@ -40,7 +40,8 @@
- /* 4K page size, but our output routines, use some slack for overruns */
- #define PROC_BLOCK_SIZE (3*1024)
- 
--static struct proc_dir_entry *proc_scsi;
-+struct proc_dir_entry *proc_scsi;
-+EXPORT_SYMBOL(proc_scsi);
- 
- /* Protect sht->present and sht->proc_dir */
- static DEFINE_MUTEX(global_host_template_mutex);
diff --git a/lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch b/lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch
deleted file mode 100644
index 0f94dd572a24f9a01b132be261443f09886dfe0a..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/tcp-rto_proc-2.6.9.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-Index: linux+rhel4+chaos/include/linux/sysctl.h
-===================================================================
---- linux+rhel4+chaos.orig/include/linux/sysctl.h
-+++ linux+rhel4+chaos/include/linux/sysctl.h
-@@ -348,6 +348,8 @@ enum
- 	NET_IPV4_ICMP_ERRORS_USE_INBOUND_IFADDR=109,
- 	NET_IPV4_TCP_WORKAROUND_SIGNED_WINDOWS=110,
- 	NET_TCP_SLOW_START_AFTER_IDLE=111,
-+	NET_TCP_RTO_MAX=112,
-+	NET_TCP_RTO_INIT=113,
- };
- 
- enum {
-Index: linux+rhel4+chaos/net/ipv4/sysctl_net_ipv4.c
-===================================================================
---- linux+rhel4+chaos.orig/net/ipv4/sysctl_net_ipv4.c
-+++ linux+rhel4+chaos/net/ipv4/sysctl_net_ipv4.c
-@@ -49,6 +49,10 @@ extern int inet_peer_maxttl;
- extern int inet_peer_gc_mintime;
- extern int inet_peer_gc_maxtime;
- 
-+/* From tcp_timer.c */
-+extern unsigned sysctl_tcp_rto_max;
-+extern unsigned sysctl_tcp_rto_init;
-+
- #ifdef CONFIG_SYSCTL
- static int tcp_retr1_max = 255; 
- static int ip_local_port_range_min[] = { 1, 1 };
-@@ -699,6 +703,22 @@ ctl_table ipv4_table[] = {
- 		.mode		= 0644,
- 		.proc_handler	= &proc_dointvec,
- 	},
-+	{
-+		.ctl_name	= NET_TCP_RTO_MAX,
-+		.procname	= "tcp_rto_max",
-+		.data		= &sysctl_tcp_rto_max,
-+		.maxlen		= sizeof(unsigned),
-+		.mode		= 0644, 
-+		.proc_handler	= &proc_dointvec
-+	},
-+	{
-+		.ctl_name	= NET_TCP_RTO_INIT,
-+		.procname	= "tcp_rto_init",
-+		.data		= &sysctl_tcp_rto_init,
-+		.maxlen		= sizeof(unsigned), 
-+		.mode		= 0644,
-+		.proc_handler	= &proc_dointvec
-+	},
- 	{ .ctl_name = 0 }
- };
- 
-Index: linux+rhel4+chaos/net/ipv4/tcp_timer.c
-===================================================================
---- linux+rhel4+chaos.orig/net/ipv4/tcp_timer.c
-+++ linux+rhel4+chaos/net/ipv4/tcp_timer.c
-@@ -32,6 +32,9 @@ int sysctl_tcp_retries1 = TCP_RETR1;
- int sysctl_tcp_retries2 = TCP_RETR2;
- int sysctl_tcp_orphan_retries;
- 
-+unsigned sysctl_tcp_rto_max        = TCP_RTO_MAX;
-+unsigned sysctl_tcp_rto_init       = TCP_TIMEOUT_INIT;
-+
- static void tcp_write_timer(unsigned long);
- static void tcp_delack_timer(unsigned long);
- static void tcp_keepalive_timer (unsigned long data);
-@@ -104,7 +107,7 @@ static int tcp_out_of_resources(struct s
- 
- 	/* If peer does not open window for long time, or did not transmit 
- 	 * anything for long time, penalize it. */
--	if ((s32)(tcp_time_stamp - tp->lsndtime) > 2*TCP_RTO_MAX || !do_reset)
-+	if ((s32)(tcp_time_stamp - tp->lsndtime) > 2*sysctl_tcp_rto_max || !do_reset)
- 		orphans <<= 1;
- 
- 	/* If some dubious ICMP arrived, penalize even more. */
-@@ -186,7 +189,7 @@ static int tcp_write_timeout(struct sock
- 
- 		retry_until = sysctl_tcp_retries2;
- 		if (sock_flag(sk, SOCK_DEAD)) {
--			int alive = (tp->rto < TCP_RTO_MAX);
-+			int alive = (tp->rto < sysctl_tcp_rto_max);
-  
- 			retry_until = tcp_orphan_retries(sk, alive);
- 
-@@ -292,7 +295,7 @@ static void tcp_probe_timer(struct sock 
- 	max_probes = sysctl_tcp_retries2;
- 
- 	if (sock_flag(sk, SOCK_DEAD)) {
--		int alive = ((tp->rto<<tp->backoff) < TCP_RTO_MAX);
-+		int alive = ((tp->rto<<tp->backoff) < sysctl_tcp_rto_max);
-  
- 		max_probes = tcp_orphan_retries(sk, alive);
- 
-@@ -336,7 +339,7 @@ static void tcp_retransmit_timer(struct 
- 			       inet->num, tp->snd_una, tp->snd_nxt);
- 		}
- #endif
--		if (tcp_time_stamp - tp->rcv_tstamp > TCP_RTO_MAX) {
-+		if (tcp_time_stamp - tp->rcv_tstamp > sysctl_tcp_rto_max) {
- 			tcp_write_err(sk);
- 			goto out;
- 		}
-@@ -405,7 +408,7 @@ static void tcp_retransmit_timer(struct 
- 	tp->retransmits++;
- 
- out_reset_timer:
--	tp->rto = min(tp->rto << 1, TCP_RTO_MAX);
-+	tp->rto = min(tp->rto << 1, sysctl_tcp_rto_max);
- 	tcp_reset_xmit_timer(sk, TCP_TIME_RETRANS, tp->rto);
- 	if (tp->retransmits > sysctl_tcp_retries1)
- 		__sk_dst_reset(sk);
-@@ -502,7 +505,7 @@ static void tcp_synack_timer(struct sock
- 	if (tp->defer_accept)
- 		max_retries = tp->defer_accept;
- 
--	budget = 2*(TCP_SYNQ_HSIZE/(TCP_TIMEOUT_INIT/TCP_SYNQ_INTERVAL));
-+	budget = 2*(TCP_SYNQ_HSIZE/(sysctl_tcp_rto_init/TCP_SYNQ_INTERVAL));
- 	i = lopt->clock_hand;
- 
- 	do {
-@@ -516,8 +519,8 @@ static void tcp_synack_timer(struct sock
- 
- 					if (req->retrans++ == 0)
- 						lopt->qlen_young--;
--					timeo = min((TCP_TIMEOUT_INIT << req->retrans),
--						    TCP_RTO_MAX);
-+					timeo = min((sysctl_tcp_rto_init << req->retrans),
-+						    sysctl_tcp_rto_max);
- 					req->expires = now + timeo;
- 					reqp = &req->dl_next;
- 					continue;
diff --git a/lustre/kernel_patches/patches/uml-2.6.10-fc3.patch b/lustre/kernel_patches/patches/uml-2.6.10-fc3.patch
deleted file mode 100644
index 625b21c2ad04b94c73f341ab473486a45678a797..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/uml-2.6.10-fc3.patch
+++ /dev/null
@@ -1,3781 +0,0 @@
-Index: linux-2.6.10/lib/Kconfig.debug
-===================================================================
---- linux-2.6.10.orig/lib/Kconfig.debug	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/lib/Kconfig.debug	2005-04-07 22:05:29.475761192 +0800
-@@ -23,7 +23,6 @@
- config MAGIC_SYSRQ
- 	bool "Magic SysRq key"
- 	depends on DEBUG_KERNEL && (H8300 || M68KNOMMU || V850)
--	depends (USERMODE && MCONSOLE)
- 	help
- 	  Enables console device to interpret special characters as
- 	  commands to dump state information.
-Index: linux-2.6.10/mm/mprotect.c
-===================================================================
---- linux-2.6.10.orig/mm/mprotect.c	2004-12-25 05:35:50.000000000 +0800
-+++ linux-2.6.10/mm/mprotect.c	2005-04-07 22:05:29.475761192 +0800
-@@ -93,19 +93,20 @@
- {
- 	pgd_t *dir;
- 	unsigned long beg = start;
-+	struct mm_struct * mm = vma->vm_mm;
- 
--	dir = pgd_offset(current->mm, start);
-+	dir = pgd_offset(mm, start);
- 	flush_cache_range(vma, beg, end);
- 	if (start >= end)
- 		BUG();
--	spin_lock(&current->mm->page_table_lock);
-+	spin_lock(&mm->page_table_lock);
- 	do {
- 		change_pmd_range(dir, start, end - start, newprot);
- 		start = (start + PGDIR_SIZE) & PGDIR_MASK;
- 		dir++;
- 	} while (start && (start < end));
- 	flush_tlb_range(vma, beg, end);
--	spin_unlock(&current->mm->page_table_lock);
-+	spin_unlock(&mm->page_table_lock);
- 	return;
- }
- 
-@@ -190,8 +191,9 @@
- 	return error;
- }
- 
--asmlinkage long
--sys_mprotect(unsigned long start, size_t len, unsigned long prot)
-+long
-+do_mprotect(struct mm_struct *mm, unsigned long start, size_t len,
-+	     unsigned long prot)
- {
- 	unsigned long vm_flags, nstart, end, tmp;
- 	struct vm_area_struct *vma, *prev;
-@@ -220,9 +222,9 @@
- 
- 	vm_flags = calc_vm_prot_bits(prot);
- 
--	down_write(&current->mm->mmap_sem);
-+	down_write(&mm->mmap_sem);
- 
--	vma = find_vma_prev(current->mm, start, &prev);
-+	vma = find_vma_prev(mm, start, &prev);
- 	error = -ENOMEM;
- 	if (!vma)
- 		goto out;
-@@ -288,6 +290,11 @@
- 		}
- 	}
- out:
--	up_write(&current->mm->mmap_sem);
-+	up_write(&mm->mmap_sem);
- 	return error;
- }
-+
-+asmlinkage long sys_mprotect(unsigned long start, size_t len, unsigned long prot)
-+{
-+        return(do_mprotect(current->mm, start, len, prot));
-+}
-Index: linux-2.6.10/mm/mmap.c
-===================================================================
---- linux-2.6.10.orig/mm/mmap.c	2005-04-06 23:38:33.000000000 +0800
-+++ linux-2.6.10/mm/mmap.c	2005-04-07 22:05:29.476761040 +0800
-@@ -759,11 +759,11 @@
-  * The caller must hold down_write(current->mm->mmap_sem).
-  */
- 
--unsigned long do_mmap_pgoff(struct file * file, unsigned long addr,
--			unsigned long len, unsigned long prot,
--			unsigned long flags, unsigned long pgoff)
-+unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file * file,
-+			    unsigned long addr, unsigned long len,
-+			    unsigned long prot, unsigned long flags,
-+			    unsigned long pgoff)
- {
--	struct mm_struct * mm = current->mm;
- 	struct vm_area_struct * vma, * prev;
- 	struct inode *inode;
- 	unsigned int vm_flags;
-@@ -1037,7 +1037,7 @@
- 	return error;
- }
- 
--EXPORT_SYMBOL(do_mmap_pgoff);
-+EXPORT_SYMBOL(__do_mmap_pgoff);
- 
- /* Get an address range which is currently unmapped.
-  * For shmat() with addr=0.
-Index: linux-2.6.10/mm/proc_mm.c
-===================================================================
---- linux-2.6.10.orig/mm/proc_mm.c	2005-04-07 19:34:21.197950744 +0800
-+++ linux-2.6.10/mm/proc_mm.c	2005-04-07 22:05:29.476761040 +0800
-@@ -0,0 +1,181 @@
-+/*
-+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-+ * Licensed under the GPL
-+ */
-+
-+#include "linux/mm.h"
-+#include "linux/init.h"
-+#include "linux/proc_fs.h"
-+#include "linux/proc_mm.h"
-+#include "linux/file.h"
-+#include "linux/mman.h"
-+#include "asm/uaccess.h"
-+#include "asm/mmu_context.h"
-+
-+static struct file_operations proc_mm_fops;
-+
-+struct mm_struct *proc_mm_get_mm(int fd)
-+{
-+	struct mm_struct *ret = ERR_PTR(-EBADF);
-+	struct file *file;
-+
-+	file = fget(fd);
-+	if (!file)
-+		goto out;
-+
-+	ret = ERR_PTR(-EINVAL);
-+	if(file->f_op != &proc_mm_fops)
-+		goto out_fput;
-+
-+	ret = file->private_data;
-+ out_fput:
-+	fput(file);
-+ out:
-+	return(ret);
-+}
-+
-+extern long do_mmap2(struct mm_struct *mm, unsigned long addr,
-+		     unsigned long len, unsigned long prot,
-+		     unsigned long flags, unsigned long fd,
-+		     unsigned long pgoff);
-+
-+static ssize_t write_proc_mm(struct file *file, const char *buffer,
-+			     size_t count, loff_t *ppos)
-+{
-+	struct mm_struct *mm = file->private_data;
-+	struct proc_mm_op req;
-+	int n, ret;
-+
-+	if(count > sizeof(req))
-+		return(-EINVAL);
-+
-+	n = copy_from_user(&req, buffer, count);
-+	if(n != 0)
-+		return(-EFAULT);
-+
-+	ret = count;
-+	switch(req.op){
-+	case MM_MMAP: {
-+		struct mm_mmap *map = &req.u.mmap;
-+
-+		/* Nobody ever noticed it, but do_mmap_pgoff() calls
-+		 * get_unmapped_area() which checks current->mm, if
-+		 * MAP_FIXED is not set, so mmap() could replace
-+		 * an old mapping.
-+		 */
-+		if (! (map->flags & MAP_FIXED))
-+			return(-EINVAL);
-+
-+		ret = do_mmap2(mm, map->addr, map->len, map->prot,
-+			       map->flags, map->fd, map->offset >> PAGE_SHIFT);
-+		if((ret & ~PAGE_MASK) == 0)
-+			ret = count;
-+
-+		break;
-+	}
-+	case MM_MUNMAP: {
-+		struct mm_munmap *unmap = &req.u.munmap;
-+
-+		down_write(&mm->mmap_sem);
-+		ret = do_munmap(mm, unmap->addr, unmap->len);
-+		up_write(&mm->mmap_sem);
-+
-+		if(ret == 0)
-+			ret = count;
-+		break;
-+	}
-+	case MM_MPROTECT: {
-+		struct mm_mprotect *protect = &req.u.mprotect;
-+
-+		ret = do_mprotect(mm, protect->addr, protect->len,
-+				  protect->prot);
-+		if(ret == 0)
-+			ret = count;
-+		break;
-+	}
-+
-+	case MM_COPY_SEGMENTS: {
-+		struct mm_struct *from = proc_mm_get_mm(req.u.copy_segments);
-+
-+		if(IS_ERR(from)){
-+			ret = PTR_ERR(from);
-+			break;
-+		}
-+
-+		ret = copy_context(mm, from);
-+		if(ret == 0)
-+			ret = count;
-+		break;
-+	}
-+	default:
-+		ret = -EINVAL;
-+		break;
-+	}
-+
-+	return(ret);
-+}
-+
-+static int open_proc_mm(struct inode *inode, struct file *file)
-+{
-+	struct mm_struct *mm = mm_alloc();
-+	int ret;
-+
-+	ret = -ENOMEM;
-+	if(mm == NULL)
-+		goto out_mem;
-+
-+	init_new_empty_context(mm);
-+	arch_pick_mmap_layout(mm);
-+
-+	spin_lock(&mmlist_lock);
-+	list_add(&mm->mmlist, &current->mm->mmlist);
-+	spin_unlock(&mmlist_lock);
-+
-+	file->private_data = mm;
-+
-+	return(0);
-+
-+ out_mem:
-+	return(ret);
-+}
-+
-+static int release_proc_mm(struct inode *inode, struct file *file)
-+{
-+	struct mm_struct *mm = file->private_data;
-+
-+	mmput(mm);
-+	return(0);
-+}
-+
-+static struct file_operations proc_mm_fops = {
-+	.open		= open_proc_mm,
-+	.release	= release_proc_mm,
-+	.write		= write_proc_mm,
-+};
-+
-+static int make_proc_mm(void)
-+{
-+	struct proc_dir_entry *ent;
-+
-+	ent = create_proc_entry("mm", 0222, &proc_root);
-+	if(ent == NULL){
-+		printk("make_proc_mm : Failed to register /proc/mm\n");
-+		return(0);
-+	}
-+	ent->proc_fops = &proc_mm_fops;
-+
-+	return(0);
-+}
-+
-+__initcall(make_proc_mm);
-+
-+/*
-+ * Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-Index: linux-2.6.10/mm/Makefile
-===================================================================
---- linux-2.6.10.orig/mm/Makefile	2004-12-25 05:35:00.000000000 +0800
-+++ linux-2.6.10/mm/Makefile	2005-04-07 22:05:29.477760888 +0800
-@@ -18,3 +18,4 @@
- obj-$(CONFIG_SHMEM) += shmem.o
- obj-$(CONFIG_TINY_SHMEM) += tiny-shmem.o
- 
-+obj-$(CONFIG_PROC_MM)	+= proc_mm.o
-Index: linux-2.6.10/arch/um/drivers/mconsole_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/drivers/mconsole_kern.c	2004-12-25 05:33:49.000000000 +0800
-+++ linux-2.6.10/arch/um/drivers/mconsole_kern.c	2005-04-07 22:05:29.477760888 +0800
-@@ -204,6 +204,68 @@
- }
- #endif
- 
-+/* This is a more convoluted version of mconsole_proc, which has some stability
-+ * problems; however, we need it fixed, because it is expected that UML users
-+ * mount HPPFS instead of procfs on /proc. And we want mconsole_proc to still
-+ * show the real procfs content, not the ones from hppfs.*/
-+#if 0
-+void mconsole_proc(struct mc_request *req)
-+{
-+	char path[64];
-+	char *buf;
-+	int len;
-+	int fd;
-+	int first_chunk = 1;
-+	char *ptr = req->request.data;
-+
-+	ptr += strlen("proc");
-+	while(isspace(*ptr)) ptr++;
-+	snprintf(path, sizeof(path), "/proc/%s", ptr);
-+
-+	fd = sys_open(path, 0, 0);
-+	if (fd < 0) {
-+		mconsole_reply(req, "Failed to open file", 1, 0);
-+		printk("open %s: %d\n",path,fd);
-+		goto out;
-+	}
-+
-+	buf = kmalloc(PAGE_SIZE, GFP_KERNEL);
-+	if(buf == NULL){
-+		mconsole_reply(req, "Failed to allocate buffer", 1, 0);
-+		goto out_close;
-+	}
-+
-+	for (;;) {
-+		len = sys_read(fd, buf, PAGE_SIZE-1);
-+		if (len < 0) {
-+			mconsole_reply(req, "Read of file failed", 1, 0);
-+			goto out_free;
-+		}
-+		/*Begin the file content on his own line.*/
-+		if (first_chunk) {
-+			mconsole_reply(req, "\n", 0, 1);
-+			first_chunk = 0;
-+		}
-+		if (len == PAGE_SIZE-1) {
-+			buf[len] = '\0';
-+			mconsole_reply(req, buf, 0, 1);
-+		} else {
-+			buf[len] = '\0';
-+			mconsole_reply(req, buf, 0, 0);
-+			break;
-+		}
-+	}
-+	/*END*/
-+
-+ out_free:
-+	kfree(buf);
-+ out_close:
-+	sys_close(fd);
-+ out:
-+	/* nothing */;
-+}
-+#endif
-+
- void mconsole_proc(struct mc_request *req)
- {
- 	char path[64];
-Index: linux-2.6.10/arch/um/drivers/net_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/drivers/net_kern.c	2004-12-25 05:34:44.000000000 +0800
-+++ linux-2.6.10/arch/um/drivers/net_kern.c	2005-04-07 22:05:29.478760736 +0800
-@@ -126,10 +126,6 @@
- 	lp->tl.data = (unsigned long) &lp->user;
- 	netif_start_queue(dev);
- 
--	spin_lock(&opened_lock);
--	list_add(&lp->list, &opened);
--	spin_unlock(&opened_lock);
--
- 	/* clear buffer - it can happen that the host side of the interface
- 	 * is full when we get here.  In this case, new data is never queued,
- 	 * SIGIOs never arrive, and the net never works.
-@@ -152,9 +148,6 @@
- 	free_irq(dev->irq, dev);
- 	if(lp->close != NULL) (*lp->close)(lp->fd, &lp->user);
- 	lp->fd = -1;
--	spin_lock(&opened_lock);
--	list_del(&lp->list);
--	spin_unlock(&opened_lock);
- 
- 	spin_unlock(&lp->lock);
- 	return 0;
-@@ -397,6 +390,11 @@
- 
- 	if (device->have_mac)
- 		set_ether_mac(dev, device->mac);
-+
-+	spin_lock(&opened_lock);
-+	list_add(&lp->list, &opened);
-+	spin_unlock(&opened_lock);
-+
- 	return(0);
- }
- 
-@@ -705,7 +703,7 @@
- static void close_devices(void)
- {
- 	struct list_head *ele;
--	struct uml_net_private *lp;	
-+	struct uml_net_private *lp;
- 
- 	list_for_each(ele, &opened){
- 		lp = list_entry(ele, struct uml_net_private, list);
-Index: linux-2.6.10/arch/um/drivers/net_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/drivers/net_user.c	2004-12-25 05:34:26.000000000 +0800
-+++ linux-2.6.10/arch/um/drivers/net_user.c	2005-04-07 22:05:29.478760736 +0800
-@@ -173,10 +173,12 @@
- 	pe_data.stdout = fds[1];
- 	pid = run_helper(change_pre_exec, &pe_data, argv, NULL);
- 
--	os_close_file(fds[1]);
- 	read_output(fds[0], output, output_len);
-+	os_close_file(fds[0]);
-+	os_close_file(fds[1]);
- 
--	CATCH_EINTR(err = waitpid(pid, NULL, 0));
-+	if (pid > 0)
-+		CATCH_EINTR(err = waitpid(pid, NULL, 0));
- 	return(pid);
- }
- 
-Index: linux-2.6.10/arch/um/os-Linux/process.c
-===================================================================
---- linux-2.6.10.orig/arch/um/os-Linux/process.c	2004-12-25 05:34:00.000000000 +0800
-+++ linux-2.6.10/arch/um/os-Linux/process.c	2005-04-07 22:14:57.660384000 +0800
-@@ -94,10 +94,16 @@
- 		CATCH_EINTR(waitpid(pid, NULL, 0));
- 		
- }
-+/* Kill off a ptraced child by all means available. kill it normally first,
-+ * then PTRACE_KILL it, then PTRACE_CONT it in case it's in a run state from
-+ * which it can't exit directly.
-+ */
- 
- void os_kill_ptraced_process(int pid, int reap_child)
- {
-+	kill(pid, SIGKILL);
- 	ptrace(PTRACE_KILL, pid);
-+	ptrace(PTRACE_CONT, pid);
- 	if(reap_child)
- 		CATCH_EINTR(waitpid(pid, NULL, 0));
- }
-Index: linux-2.6.10/arch/um/os-Linux/elf_aux.c
-===================================================================
---- linux-2.6.10.orig/arch/um/os-Linux/elf_aux.c	2005-04-07 19:34:21.197950744 +0800
-+++ linux-2.6.10/arch/um/os-Linux/elf_aux.c	2005-04-07 22:05:29.478760736 +0800
-@@ -0,0 +1,67 @@
-+/*
-+ *  arch/um/kernel/elf_aux.c
-+ *
-+ *  Scan the Elf auxiliary vector provided by the host to extract
-+ *  information about vsyscall-page, etc.
-+ *
-+ *  Copyright (C) 2004 Fujitsu Siemens Computers GmbH
-+ *  Author: Bodo Stroesser (bodo.stroesser@fujitsu-siemens.com)
-+ */
-+#include <elf.h>
-+#include <stddef.h>
-+#include "init.h"
-+#include "elf_user.h"
-+
-+#if ELF_CLASS == ELFCLASS32
-+typedef Elf32_auxv_t elf_auxv_t;
-+#else
-+typedef Elf64_auxv_t elf_auxv_t;
-+#endif
-+
-+char * elf_aux_platform;
-+long elf_aux_hwcap;
-+
-+unsigned long vsyscall_ehdr;
-+unsigned long vsyscall_end;
-+
-+unsigned long __kernel_vsyscall;
-+
-+
-+__init void scan_elf_aux( char **envp)
-+{
-+	long page_size = 0;
-+	elf_auxv_t * auxv;
-+
-+	while ( *envp++ != NULL) ;
-+
-+	for ( auxv = (elf_auxv_t *)envp; auxv->a_type != AT_NULL; auxv++) {
-+		switch ( auxv->a_type ) {
-+			case AT_SYSINFO:
-+				__kernel_vsyscall = auxv->a_un.a_val;
-+				break;
-+			case AT_SYSINFO_EHDR:
-+				vsyscall_ehdr = auxv->a_un.a_val;
-+				break;
-+			case AT_HWCAP:
-+				elf_aux_hwcap = auxv->a_un.a_val;
-+				break;
-+			case AT_PLATFORM:
-+				elf_aux_platform = auxv->a_un.a_val;
-+				break;
-+			case AT_PAGESZ:
-+				page_size = auxv->a_un.a_val;
-+				break;
-+		}
-+	}
-+	if ( ! __kernel_vsyscall || ! vsyscall_ehdr ||
-+	     ! elf_aux_hwcap || ! elf_aux_platform ||
-+	     ! page_size || (vsyscall_ehdr % page_size) ) {
-+		__kernel_vsyscall = 0;
-+		vsyscall_ehdr = 0;
-+		elf_aux_hwcap = 0;
-+		elf_aux_platform = "i586";
-+	}
-+	else {
-+		vsyscall_end = vsyscall_ehdr + page_size;
-+	}
-+}
-Index: linux-2.6.10/arch/um/os-Linux/user_syms.c
-===================================================================
---- linux-2.6.10.orig/arch/um/os-Linux/user_syms.c	2004-12-25 05:35:23.000000000 +0800
-+++ linux-2.6.10/arch/um/os-Linux/user_syms.c	2005-04-07 22:05:29.478760736 +0800
-@@ -26,6 +26,9 @@
- 
- EXPORT_SYMBOL(strstr);
- 
-+EXPORT_SYMBOL(vsyscall_ehdr);
-+EXPORT_SYMBOL(vsyscall_end);
-+
- /* Here, instead, I can provide a fake prototype. Yes, someone cares: genksyms.
-  * However, the modules will use the CRC defined *here*, no matter if it is
-  * good; so the versions of these symbols will always match
-Index: linux-2.6.10/arch/um/os-Linux/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/os-Linux/Makefile	2004-12-25 05:35:00.000000000 +0800
-+++ linux-2.6.10/arch/um/os-Linux/Makefile	2005-04-07 22:05:29.479760584 +0800
-@@ -3,9 +3,9 @@
- # Licensed under the GPL
- #
- 
--obj-y = file.o process.o time.o tty.o user_syms.o drivers/
-+obj-y = elf_aux.o file.o process.o time.o tty.o user_syms.o drivers/
- 
--USER_OBJS := $(foreach file,file.o process.o time.o tty.o,$(obj)/$(file))
-+USER_OBJS := $(foreach file,elf_aux.o file.o process.o time.o tty.o,$(obj)/$(file))
- 
- $(USER_OBJS) : %.o: %.c
- 	$(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
-Index: linux-2.6.10/arch/um/sys-i386/signal.c
-===================================================================
---- linux-2.6.10.orig/arch/um/sys-i386/signal.c	2005-04-07 19:34:21.197950744 +0800
-+++ linux-2.6.10/arch/um/sys-i386/signal.c	2005-04-07 22:05:29.479760584 +0800
-@@ -0,0 +1,374 @@
-+/*
-+ * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
-+ * Licensed under the GPL
-+ */
-+
-+#include "linux/signal.h"
-+#include "linux/ptrace.h"
-+#include "asm/current.h"
-+#include "asm/ucontext.h"
-+#include "asm/uaccess.h"
-+#include "asm/unistd.h"
-+#include "frame_kern.h"
-+#include "signal_user.h"
-+#include "ptrace_user.h"
-+#include "sigcontext.h"
-+#include "mode.h"
-+
-+#ifdef CONFIG_MODE_SKAS
-+
-+#include "skas.h"
-+
-+static int copy_sc_from_user_skas(struct pt_regs *regs,
-+				  struct sigcontext *from)
-+{
-+  	struct sigcontext sc;
-+	unsigned long fpregs[HOST_FP_SIZE];
-+	int err;
-+
-+	err = copy_from_user(&sc, from, sizeof(sc));
-+	err |= copy_from_user(fpregs, sc.fpstate, sizeof(fpregs));
-+	if(err)
-+		return(err);
-+
-+	REGS_GS(regs->regs.skas.regs) = sc.gs;
-+	REGS_FS(regs->regs.skas.regs) = sc.fs;
-+	REGS_ES(regs->regs.skas.regs) = sc.es;
-+	REGS_DS(regs->regs.skas.regs) = sc.ds;
-+	REGS_EDI(regs->regs.skas.regs) = sc.edi;
-+	REGS_ESI(regs->regs.skas.regs) = sc.esi;
-+	REGS_EBP(regs->regs.skas.regs) = sc.ebp;
-+	REGS_SP(regs->regs.skas.regs) = sc.esp;
-+	REGS_EBX(regs->regs.skas.regs) = sc.ebx;
-+	REGS_EDX(regs->regs.skas.regs) = sc.edx;
-+	REGS_ECX(regs->regs.skas.regs) = sc.ecx;
-+	REGS_EAX(regs->regs.skas.regs) = sc.eax;
-+	REGS_IP(regs->regs.skas.regs) = sc.eip;
-+	REGS_CS(regs->regs.skas.regs) = sc.cs;
-+	REGS_EFLAGS(regs->regs.skas.regs) = sc.eflags;
-+	REGS_SS(regs->regs.skas.regs) = sc.ss;
-+	regs->regs.skas.fault_addr = sc.cr2;
-+	regs->regs.skas.fault_type = FAULT_WRITE(sc.err);
-+	regs->regs.skas.trap_type = sc.trapno;
-+
-+	err = ptrace_setfpregs(userspace_pid[0], fpregs);
-+	if(err < 0){
-+	  	printk("copy_sc_from_user_skas - PTRACE_SETFPREGS failed, "
-+		       "errno = %d\n", err);
-+		return(1);
-+	}
-+
-+	return(0);
-+}
-+
-+int copy_sc_to_user_skas(struct sigcontext *to, struct _fpstate *to_fp,
-+			 struct pt_regs *regs, unsigned long fault_addr,
-+			 int fault_type)
-+{
-+  	struct sigcontext sc;
-+	unsigned long fpregs[HOST_FP_SIZE];
-+	int err;
-+
-+	sc.gs = REGS_GS(regs->regs.skas.regs);
-+	sc.fs = REGS_FS(regs->regs.skas.regs);
-+	sc.es = REGS_ES(regs->regs.skas.regs);
-+	sc.ds = REGS_DS(regs->regs.skas.regs);
-+	sc.edi = REGS_EDI(regs->regs.skas.regs);
-+	sc.esi = REGS_ESI(regs->regs.skas.regs);
-+	sc.ebp = REGS_EBP(regs->regs.skas.regs);
-+	sc.esp = REGS_SP(regs->regs.skas.regs);
-+	sc.ebx = REGS_EBX(regs->regs.skas.regs);
-+	sc.edx = REGS_EDX(regs->regs.skas.regs);
-+	sc.ecx = REGS_ECX(regs->regs.skas.regs);
-+	sc.eax = REGS_EAX(regs->regs.skas.regs);
-+	sc.eip = REGS_IP(regs->regs.skas.regs);
-+	sc.cs = REGS_CS(regs->regs.skas.regs);
-+	sc.eflags = REGS_EFLAGS(regs->regs.skas.regs);
-+	sc.esp_at_signal = regs->regs.skas.regs[UESP];
-+	sc.ss = regs->regs.skas.regs[SS];
-+	sc.cr2 = fault_addr;
-+	sc.err = TO_SC_ERR(fault_type);
-+	sc.trapno = regs->regs.skas.trap_type;
-+
-+	err = ptrace_getfpregs(userspace_pid[0], fpregs);
-+	if(err < 0){
-+	  	printk("copy_sc_to_user_skas - PTRACE_GETFPREGS failed, "
-+		       "errno = %d\n", err);
-+		return(1);
-+	}
-+	to_fp = (to_fp ? to_fp : (struct _fpstate *) (to + 1));
-+	sc.fpstate = to_fp;
-+
-+	if(err)
-+	  	return(err);
-+
-+	return(copy_to_user(to, &sc, sizeof(sc)) ||
-+	       copy_to_user(to_fp, fpregs, sizeof(fpregs)));
-+}
-+#endif
-+
-+#ifdef CONFIG_MODE_TT
-+int copy_sc_from_user_tt(struct sigcontext *to, struct sigcontext *from,
-+			 int fpsize)
-+{
-+	struct _fpstate *to_fp, *from_fp;
-+	unsigned long sigs;
-+	int err;
-+
-+	to_fp = to->fpstate;
-+	from_fp = from->fpstate;
-+	sigs = to->oldmask;
-+	err = copy_from_user(to, from, sizeof(*to));
-+	to->oldmask = sigs;
-+	if(to_fp != NULL){
-+		err |= copy_from_user(&to->fpstate, &to_fp,
-+				      sizeof(to->fpstate));
-+		err |= copy_from_user(to_fp, from_fp, fpsize);
-+	}
-+	return(err);
-+}
-+
-+int copy_sc_to_user_tt(struct sigcontext *to, struct _fpstate *fp,
-+		       struct sigcontext *from, int fpsize)
-+{
-+	struct _fpstate *to_fp, *from_fp;
-+	int err;
-+
-+	to_fp =	(fp ? fp : (struct _fpstate *) (to + 1));
-+	from_fp = from->fpstate;
-+	err = copy_to_user(to, from, sizeof(*to));
-+	if(from_fp != NULL){
-+		err |= copy_to_user(&to->fpstate, &to_fp,
-+					 sizeof(to->fpstate));
-+		err |= copy_to_user(to_fp, from_fp, fpsize);
-+	}
-+	return(err);
-+}
-+#endif
-+
-+static int copy_sc_from_user(struct pt_regs *to, void *from)
-+{
-+	int ret;
-+
-+	ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from,
-+					       sizeof(struct _fpstate)),
-+			  copy_sc_from_user_skas(to, from));
-+	return(ret);
-+}
-+
-+static int copy_sc_to_user(struct sigcontext *to, struct _fpstate *fp,
-+			   struct pt_regs *from)
-+{
-+	return(CHOOSE_MODE(copy_sc_to_user_tt(to, fp, UPT_SC(&from->regs),
-+					      sizeof(*fp)),
-+			   copy_sc_to_user_skas(to, fp, from,
-+						current->thread.cr2,
-+						current->thread.err)));
-+}
-+
-+static int copy_ucontext_to_user(struct ucontext *uc, struct _fpstate *fp,
-+				 sigset_t *set, unsigned long sp)
-+{
-+	int err = 0;
-+
-+	err |= put_user(current->sas_ss_sp, &uc->uc_stack.ss_sp);
-+	err |= put_user(sas_ss_flags(sp), &uc->uc_stack.ss_flags);
-+	err |= put_user(current->sas_ss_size, &uc->uc_stack.ss_size);
-+	err |= copy_sc_to_user(&uc->uc_mcontext, fp, &current->thread.regs);
-+	err |= copy_to_user(&uc->uc_sigmask, set, sizeof(*set));
-+	return(err);
-+}
-+
-+struct sigframe
-+{
-+	char *pretcode;
-+	int sig;
-+	struct sigcontext sc;
-+	struct _fpstate fpstate;
-+	unsigned long extramask[_NSIG_WORDS-1];
-+	char retcode[8];
-+};
-+
-+struct rt_sigframe
-+{
-+	char *pretcode;
-+	int sig;
-+	struct siginfo *pinfo;
-+	void *puc;
-+	struct siginfo info;
-+	struct ucontext uc;
-+	struct _fpstate fpstate;
-+	char retcode[8];
-+};
-+
-+int setup_signal_stack_sc(unsigned long stack_top, int sig,
-+			  struct k_sigaction *ka, struct pt_regs *regs,
-+			  sigset_t *mask)
-+{
-+	struct sigframe __user *frame;
-+	void *restorer;
-+	int err = 0;
-+
-+	stack_top &= -8UL;
-+	frame = (struct sigframe *) stack_top - 1;
-+	if(verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
-+		return(1);
-+
-+	restorer = (void *) frame->retcode;
-+	if(ka->sa.sa_flags & SA_RESTORER)
-+		restorer = ka->sa.sa_restorer;
-+
-+	err |= __put_user(restorer, &frame->pretcode);
-+	err |= __put_user(sig, &frame->sig);
-+	err |= copy_sc_to_user(&frame->sc, NULL, regs);
-+	err |= __put_user(mask->sig[0], &frame->sc.oldmask);
-+	if (_NSIG_WORDS > 1)
-+		err |= __copy_to_user(&frame->extramask, &mask->sig[1],
-+				      sizeof(frame->extramask));
-+
-+	/*
-+	 * This is popl %eax ; movl $,%eax ; int $0x80
-+	 *
-+	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
-+	 * reasons and because gdb uses it as a signature to notice
-+	 * signal handler stack frames.
-+	 */
-+	err |= __put_user(0xb858, (short __user *)(frame->retcode+0));
-+	err |= __put_user(__NR_sigreturn, (int __user *)(frame->retcode+2));
-+	err |= __put_user(0x80cd, (short __user *)(frame->retcode+6));
-+
-+	if(err)
-+		return(err);
-+
-+	PT_REGS_SP(regs) = (unsigned long) frame;
-+	PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler;
-+	PT_REGS_EAX(regs) = (unsigned long) sig;
-+	PT_REGS_EDX(regs) = (unsigned long) 0;
-+	PT_REGS_ECX(regs) = (unsigned long) 0;
-+
-+	if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED))
-+		ptrace_notify(SIGTRAP);
-+	return(0);
-+}
-+
-+int setup_signal_stack_si(unsigned long stack_top, int sig,
-+			  struct k_sigaction *ka, struct pt_regs *regs,
-+			  siginfo_t *info, sigset_t *mask)
-+{
-+	struct rt_sigframe __user *frame;
-+	void *restorer;
-+	int err = 0;
-+
-+	stack_top &= -8UL;
-+	frame = (struct rt_sigframe *) stack_top - 1;
-+	if(verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
-+		return(1);
-+
-+	restorer = (void *) frame->retcode;
-+	if(ka->sa.sa_flags & SA_RESTORER)
-+		restorer = ka->sa.sa_restorer;
-+
-+	err |= __put_user(restorer, &frame->pretcode);
-+	err |= __put_user(sig, &frame->sig);
-+	err |= __put_user(&frame->info, &frame->pinfo);
-+	err |= __put_user(&frame->uc, &frame->puc);
-+	err |= copy_siginfo_to_user(&frame->info, info);
-+	err |= copy_ucontext_to_user(&frame->uc, &frame->fpstate, mask,
-+				     PT_REGS_SP(regs));
-+
-+	/*
-+	 * This is movl $,%eax ; int $0x80
-+	 *
-+	 * WE DO NOT USE IT ANY MORE! It's only left here for historical
-+	 * reasons and because gdb uses it as a signature to notice
-+	 * signal handler stack frames.
-+	 */
-+	err |= __put_user(0xb8, (char __user *)(frame->retcode+0));
-+	err |= __put_user(__NR_rt_sigreturn, (int __user *)(frame->retcode+1));
-+	err |= __put_user(0x80cd, (short __user *)(frame->retcode+5));
-+
-+	if(err)
-+		return(err);
-+
-+	PT_REGS_SP(regs) = (unsigned long) frame;
-+	PT_REGS_IP(regs) = (unsigned long) ka->sa.sa_handler;
-+	PT_REGS_EAX(regs) = (unsigned long) sig;
-+	PT_REGS_EDX(regs) = (unsigned long) &frame->info;
-+	PT_REGS_ECX(regs) = (unsigned long) &frame->uc;
-+
-+	if ((current->ptrace & PT_DTRACE) && (current->ptrace & PT_PTRACED))
-+		ptrace_notify(SIGTRAP);
-+	return(0);
-+}
-+
-+long sys_sigreturn(struct pt_regs regs)
-+{
-+	unsigned long __user sp = PT_REGS_SP(&current->thread.regs);
-+	struct sigframe __user *frame = (struct sigframe *)(sp - 8);
-+	sigset_t set;
-+	struct sigcontext __user *sc = &frame->sc;
-+	unsigned long __user *oldmask = &sc->oldmask;
-+	unsigned long __user *extramask = &frame->extramask;
-+	int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
-+
-+	if(copy_from_user(&set.sig[0], oldmask, sizeof(&set.sig[0])) ||
-+	   copy_from_user(&set.sig[1], extramask, sig_size))
-+		goto segfault;
-+
-+	sigdelsetmask(&set, ~_BLOCKABLE);
-+
-+	spin_lock_irq(&current->sighand->siglock);
-+	current->blocked = set;
-+	recalc_sigpending();
-+	spin_unlock_irq(&current->sighand->siglock);
-+
-+	if(copy_sc_from_user(&current->thread.regs, sc))
-+		goto segfault;
-+
-+	PT_REGS_SYSCALL_NR(&current->thread.regs) = -1; /* Avoid ERESTART handling */
-+	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
-+
-+ segfault:
-+	force_sig(SIGSEGV, current);
-+	return 0;
-+}
-+
-+long sys_rt_sigreturn(struct pt_regs regs)
-+{
-+	unsigned long __user sp = PT_REGS_SP(&current->thread.regs);
-+	struct rt_sigframe __user *frame = (struct rt_sigframe *) (sp - 4);
-+	sigset_t set;
-+	struct ucontext __user *uc = &frame->uc;
-+	int sig_size = _NSIG_WORDS * sizeof(unsigned long);
-+
-+	if(copy_from_user(&set, &uc->uc_sigmask, sig_size))
-+		goto segfault;
-+
-+	sigdelsetmask(&set, ~_BLOCKABLE);
-+
-+	spin_lock_irq(&current->sighand->siglock);
-+	current->blocked = set;
-+	recalc_sigpending();
-+	spin_unlock_irq(&current->sighand->siglock);
-+
-+	if(copy_sc_from_user(&current->thread.regs, &uc->uc_mcontext))
-+		goto segfault;
-+
-+	PT_REGS_SYSCALL_NR(&current->thread.regs) = -1; /* Avoid ERESTART handling */
-+	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
-+
-+ segfault:
-+	force_sig(SIGSEGV, current);
-+	return 0;
-+}
-+
-+/*
-+ * Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-Index: linux-2.6.10/arch/um/sys-i386/ptrace_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/sys-i386/ptrace_user.c	2004-12-25 05:35:50.000000000 +0800
-+++ linux-2.6.10/arch/um/sys-i386/ptrace_user.c	2005-04-07 22:05:29.480760432 +0800
-@@ -17,17 +17,30 @@
- 
- int ptrace_getregs(long pid, unsigned long *regs_out)
- {
--	return(ptrace(PTRACE_GETREGS, pid, 0, regs_out));
-+	if(ptrace(PTRACE_GETREGS, pid, 0, regs_out) < 0)
-+		return(-errno);
-+	return(0);
- }
- 
- int ptrace_setregs(long pid, unsigned long *regs)
- {
--	return(ptrace(PTRACE_SETREGS, pid, 0, regs));
-+	if(ptrace(PTRACE_SETREGS, pid, 0, regs) < 0)
-+		return(-errno);
-+	return(0);
- }
- 
- int ptrace_getfpregs(long pid, unsigned long *regs)
- {
--	return(ptrace(PTRACE_GETFPREGS, pid, 0, regs));
-+	if(ptrace(PTRACE_GETFPREGS, pid, 0, regs) < 0)
-+		return(-errno);
-+	return(0);
-+}
-+
-+int ptrace_setfpregs(long pid, unsigned long *regs)
-+{
-+	if(ptrace(PTRACE_SETFPREGS, pid, 0, regs) < 0)
-+		return(-errno);
-+	return(0);
- }
- 
- static void write_debugregs(int pid, unsigned long *regs)
-Index: linux-2.6.10/arch/um/sys-i386/sysrq.c
-===================================================================
---- linux-2.6.10.orig/arch/um/sys-i386/sysrq.c	2004-12-25 05:33:49.000000000 +0800
-+++ linux-2.6.10/arch/um/sys-i386/sysrq.c	2005-04-07 22:05:29.480760432 +0800
-@@ -33,3 +33,13 @@
- 
-         show_trace((unsigned long *) &regs);
- }
-+
-+/* Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-Index: linux-2.6.10/arch/um/sys-i386/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/sys-i386/Makefile	2004-12-25 05:34:01.000000000 +0800
-+++ linux-2.6.10/arch/um/sys-i386/Makefile	2005-04-07 22:05:29.480760432 +0800
-@@ -1,5 +1,5 @@
- obj-y = bitops.o bugs.o checksum.o fault.o ksyms.o ldt.o ptrace.o \
--	ptrace_user.o semaphore.o sigcontext.o syscalls.o sysrq.o
-+	ptrace_user.o semaphore.o signal.o sigcontext.o syscalls.o sysrq.o
- 
- obj-$(CONFIG_HIGHMEM) += highmem.o
- obj-$(CONFIG_MODULES) += module.o
-Index: linux-2.6.10/arch/um/sys-i386/sigcontext.c
-===================================================================
---- linux-2.6.10.orig/arch/um/sys-i386/sigcontext.c	2004-12-25 05:33:49.000000000 +0800
-+++ linux-2.6.10/arch/um/sys-i386/sigcontext.c	2005-04-07 22:05:29.480760432 +0800
-@@ -9,22 +9,14 @@
- #include <asm/sigcontext.h>
- #include "sysdep/ptrace.h"
- #include "kern_util.h"
--#include "frame_user.h"
--
--int sc_size(void *data)
--{
--	struct arch_frame_data *arch = data;
--
--	return(sizeof(struct sigcontext) + arch->fpstate_size);
--}
- 
- void sc_to_sc(void *to_ptr, void *from_ptr)
- {
- 	struct sigcontext *to = to_ptr, *from = from_ptr;
--	int size = sizeof(*to) + signal_frame_sc.common.arch.fpstate_size;
- 
--	memcpy(to, from, size);
--	if(from->fpstate != NULL) to->fpstate = (struct _fpstate *) (to + 1);
-+	memcpy(to, from, sizeof(*to) + sizeof(struct _fpstate));
-+	if(from->fpstate != NULL)
-+		to->fpstate = (struct _fpstate *) (to + 1);
- }
- 
- unsigned long *sc_sigmask(void *sc_ptr)
-Index: linux-2.6.10/arch/um/kernel/main.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/main.c	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/main.c	2005-04-07 22:05:29.480760432 +0800
-@@ -81,6 +81,8 @@
- 
- extern int uml_exitcode;
- 
-+extern void scan_elf_aux( char **envp);
-+
- int main(int argc, char **argv, char **envp)
- {
- 	char **new_argv;
-@@ -147,6 +149,8 @@
- 	set_handler(SIGTERM, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);
- 	set_handler(SIGHUP, last_ditch_exit, SA_ONESHOT | SA_NODEFER, -1);
- 
-+	scan_elf_aux( envp);
-+
- 	do_uml_initcalls();
- 	ret = linux_main(argc, argv);
- 
-@@ -155,18 +159,20 @@
- 		int err;
- 
- 		printf("\n");
--
--		/* Let any pending signals fire, then disable them.  This
--		 * ensures that they won't be delivered after the exec, when
--		 * they are definitely not expected.
--		 */
--		unblock_signals();
-+		/* stop timers and set SIG*ALRM to be ignored */
- 		disable_timer();
-+		/* disable SIGIO for the fds and set SIGIO to be ignored */
- 		err = deactivate_all_fds();
- 		if(err)
- 			printf("deactivate_all_fds failed, errno = %d\n",
- 			       -err);
- 
-+		/* Let any pending signals fire now.  This ensures
-+		 * that they won't be delivered after the exec, when
-+		 * they are definitely not expected.
-+		 */
-+		unblock_signals();
-+
- 		execvp(new_argv[0], new_argv);
- 		perror("Failed to exec kernel");
- 		ret = 1;
-Index: linux-2.6.10/arch/um/kernel/process.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/process.c	2004-12-25 05:35:25.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/process.c	2005-04-07 22:05:29.481760280 +0800
-@@ -13,6 +13,7 @@
- #include <setjmp.h>
- #include <sys/time.h>
- #include <sys/ptrace.h>
-+#include <linux/ptrace.h>
- #include <sys/wait.h>
- #include <sys/mman.h>
- #include <asm/ptrace.h>
-@@ -285,6 +286,9 @@
- 	printk("Checking that ptrace can change system call numbers...");
- 	pid = start_ptraced_child(&stack);
- 
-+	if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
-+		panic("check_ptrace: PTRACE_SETOPTIONS failed, errno = %d", errno);
-+
- 	while(1){
- 		if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
- 			panic("check_ptrace : ptrace failed, errno = %d", 
-@@ -292,8 +296,8 @@
- 		CATCH_EINTR(n = waitpid(pid, &status, WUNTRACED));
- 		if(n < 0)
- 			panic("check_ptrace : wait failed, errno = %d", errno);
--		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
--			panic("check_ptrace : expected SIGTRAP, "
-+		if(!WIFSTOPPED(status) || (WSTOPSIG(status) != (SIGTRAP|SYSCALL_TRAP)))
-+			panic("check_ptrace : expected (SIGTRAP|SYSCALL_TRAP), "
- 			      "got status = %d", status);
- 		
- 		syscall = ptrace(PTRACE_PEEKUSER, pid, PT_SYSCALL_NR_OFFSET,
-Index: linux-2.6.10/arch/um/kernel/initrd_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/initrd_user.c	2004-12-25 05:34:26.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/initrd_user.c	2005-04-07 22:05:29.481760280 +0800
-@@ -29,6 +29,8 @@
- 		       filename, -n);
- 		return(-1);
- 	}
-+
-+	os_close_file(fd);
- 	return(0);
- }
- 
-Index: linux-2.6.10/arch/um/kernel/time_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/time_kern.c	2004-12-25 05:35:00.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/time_kern.c	2005-04-07 22:05:29.481760280 +0800
-@@ -170,7 +170,7 @@
- void timer_handler(int sig, union uml_pt_regs *regs)
- {
- 	local_irq_disable();
--	update_process_times(user_context(UPT_SP(regs)));
-+	update_process_times(CHOOSE_MODE(user_context(UPT_SP(regs)), (regs)->skas.is_user));
- 	local_irq_enable();
- 	if(current_thread->cpu == 0)
- 		timer_irq(regs);
-Index: linux-2.6.10/arch/um/kernel/helper.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/helper.c	2004-12-25 05:34:45.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/helper.c	2005-04-07 22:05:29.482760128 +0800
-@@ -49,14 +49,14 @@
- 	return(0);
- }
- 
--/* XXX The alloc_stack here breaks if this is called in the tracing thread */
--
-+/* Returns either the pid of the child process we run or -E* on failure.
-+ * XXX The alloc_stack here breaks if this is called in the tracing thread */
- int run_helper(void (*pre_exec)(void *), void *pre_data, char **argv,
- 	       unsigned long *stack_out)
- {
- 	struct helper_data data;
- 	unsigned long stack, sp;
--	int pid, fds[2], err, n;
-+	int pid, fds[2], ret, n;
- 
- 	if((stack_out != NULL) && (*stack_out != 0))
- 		stack = *stack_out;
-@@ -64,16 +64,16 @@
- 	if(stack == 0)
- 		return(-ENOMEM);
- 
--	err = os_pipe(fds, 1, 0);
--	if(err < 0){
--		printk("run_helper : pipe failed, err = %d\n", -err);
-+	ret = os_pipe(fds, 1, 0);
-+	if(ret < 0){
-+		printk("run_helper : pipe failed, ret = %d\n", -ret);
- 		goto out_free;
- 	}
- 
--	err = os_set_exec_close(fds[1], 1);
--	if(err < 0){
--		printk("run_helper : setting FD_CLOEXEC failed, err = %d\n",
--		       -err);
-+	ret = os_set_exec_close(fds[1], 1);
-+	if(ret < 0){
-+		printk("run_helper : setting FD_CLOEXEC failed, ret = %d\n",
-+		       -ret);
- 		goto out_close;
- 	}
- 
-@@ -85,34 +85,36 @@
- 	pid = clone(helper_child, (void *) sp, CLONE_VM | SIGCHLD, &data);
- 	if(pid < 0){
- 		printk("run_helper : clone failed, errno = %d\n", errno);
--		err = -errno;
-+		ret = -errno;
- 		goto out_close;
- 	}
- 
- 	os_close_file(fds[1]);
--	n = os_read_file(fds[0], &err, sizeof(err));
-+	fds[1] = -1;
-+
-+	/*Read the errno value from the child.*/
-+	n = os_read_file(fds[0], &ret, sizeof(ret));
- 	if(n < 0){
--		printk("run_helper : read on pipe failed, err = %d\n", -n);
--		err = n;
--		goto out_kill;
-+		printk("run_helper : read on pipe failed, ret = %d\n", -n);
-+		ret = n;
-+		os_kill_process(pid, 1);
- 	}
- 	else if(n != 0){
- 		CATCH_EINTR(n = waitpid(pid, NULL, 0));
--		pid = -errno;
-+		ret = -errno;
-+	} else {
-+		ret = pid;
- 	}
- 
--	if(stack_out == NULL) free_stack(stack, 0);
--        else *stack_out = stack;
--	return(pid);
--
-- out_kill:
--	os_kill_process(pid, 1);
-  out_close:
-+	if (fds[1] != -1)
-+		os_close_file(fds[1]);
- 	os_close_file(fds[0]);
--	os_close_file(fds[1]);
-  out_free:
--	free_stack(stack, 0);
--	return(err);
-+	if(stack_out == NULL)
-+		free_stack(stack, 0);
-+        else *stack_out = stack;
-+	return(ret);
- }
- 
- int run_helper_thread(int (*proc)(void *), void *arg, unsigned int flags, 
-Index: linux-2.6.10/arch/um/kernel/irq_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/irq_user.c	2004-12-25 05:34:32.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/irq_user.c	2005-04-07 22:05:29.482760128 +0800
-@@ -374,6 +374,8 @@
- 		if(err)
- 			return(err);
- 	}
-+	/* If there is a signal already queued, after unblocking ignore it */
-+	set_handler(SIGIO, SIG_IGN, 0, -1);
- 
- 	return(0);
- }
-Index: linux-2.6.10/arch/um/kernel/mem.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/mem.c	2004-12-25 05:34:32.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/mem.c	2005-04-07 22:05:29.482760128 +0800
-@@ -175,6 +175,30 @@
- }
- #endif /* CONFIG_HIGHMEM */
- 
-+static void __init fixaddr_user_init( void)
-+{
-+	long size = FIXADDR_USER_END - FIXADDR_USER_START;
-+	pgd_t *pgd;
-+	pmd_t *pmd;
-+	pte_t *pte;
-+	unsigned long paddr, vaddr = FIXADDR_USER_START;
-+
-+	if (  ! size )
-+		return;
-+
-+	fixrange_init( FIXADDR_USER_START, FIXADDR_USER_END, swapper_pg_dir);
-+	paddr = (unsigned long)alloc_bootmem_low_pages( size);
-+	memcpy( (void *)paddr, (void *)FIXADDR_USER_START, size);
-+	paddr = __pa(paddr);
-+	for ( ; size > 0; size-=PAGE_SIZE, vaddr+=PAGE_SIZE, paddr+=PAGE_SIZE) {
-+		pgd = swapper_pg_dir + pgd_index(vaddr);
-+		pmd = pmd_offset(pgd, vaddr);
-+		pte = pte_offset_kernel(pmd, vaddr);
-+		/*pte_set_val( (*pte), paddr, PAGE_READONLY);*/
-+		pte_val(*pte) = paddr | pgprot_val(PAGE_READONLY);
-+	}
-+}
-+
- void paging_init(void)
- {
- 	unsigned long zones_size[MAX_NR_ZONES], vaddr;
-@@ -195,6 +219,8 @@
- 	vaddr = __fix_to_virt(__end_of_fixed_addresses - 1) & PMD_MASK;
- 	fixrange_init(vaddr, FIXADDR_TOP, swapper_pg_dir);
- 
-+	fixaddr_user_init();
-+
- #ifdef CONFIG_HIGHMEM
- 	init_highmem();
- #endif
-Index: linux-2.6.10/arch/um/kernel/skas/process.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/process.c	2004-12-25 05:35:39.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/process.c	2005-04-07 22:05:29.483759976 +0800
-@@ -11,6 +11,7 @@
- #include <sched.h>
- #include <sys/wait.h>
- #include <sys/ptrace.h>
-+#include <linux/ptrace.h>
- #include <sys/mman.h>
- #include <sys/user.h>
- #include <asm/unistd.h>
-@@ -60,15 +61,10 @@
- /*To use the same value of using_sysemu as the caller, ask it that value (in local_using_sysemu)*/
- static void handle_trap(int pid, union uml_pt_regs *regs, int local_using_sysemu)
- {
--	int err, syscall_nr, status;
--
--	syscall_nr = PT_SYSCALL_NR(regs->skas.regs);
--	UPT_SYSCALL_NR(regs) = syscall_nr;
--	if(syscall_nr < 0){
--		relay_signal(SIGTRAP, regs);
--		return;
--	}
- 
-+ 	int err, status;
-+  
-+ 	UPT_SYSCALL_NR(regs) = PT_SYSCALL_NR(regs->skas.regs); /* Mark this as a syscall */
- 	if (!local_using_sysemu)
- 	{
- 		err = ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, __NR_getpid);
-@@ -82,7 +78,8 @@
- 			      "errno = %d\n", errno);
- 
- 		CATCH_EINTR(err = waitpid(pid, &status, WUNTRACED));
--		if((err < 0) || !WIFSTOPPED(status) || (WSTOPSIG(status) != SIGTRAP))
-+		if((err < 0) || !WIFSTOPPED(status) ||
-+		                (WSTOPSIG(status) != (SIGTRAP|SYSCALL_TRAP)))
- 			panic("handle_trap - failed to wait at end of syscall, "
- 			      "errno = %d, status = %d\n", errno, status);
- 	}
-@@ -131,6 +128,10 @@
- 		panic("start_userspace : expected SIGSTOP, got status = %d",
- 		      status);
- 
-+	if (ptrace(PTRACE_OLDSETOPTIONS, pid, NULL, (void *)PTRACE_O_TRACESYSGOOD) < 0)
-+		panic("start_userspace : PTRACE_SETOPTIONS failed, errno=%d\n",
-+		      errno);
-+
- 	if(munmap(stack, PAGE_SIZE) < 0)
- 		panic("start_userspace : munmap failed, errno = %d\n", errno);
- 
-@@ -160,15 +161,19 @@
- 
- 		regs->skas.is_user = 1;
- 		save_registers(regs);
-+		UPT_SYSCALL_NR(regs) = -1; /* Assume: It's not a syscall */
- 
- 		if(WIFSTOPPED(status)){
- 		  	switch(WSTOPSIG(status)){
- 			case SIGSEGV:
- 				handle_segv(pid);
- 				break;
--			case SIGTRAP:
-+			case (SIGTRAP|SYSCALL_TRAP):
- 			        handle_trap(pid, regs, local_using_sysemu);
- 				break;
-+			case SIGTRAP:
-+				relay_signal(SIGTRAP, regs);
-+				break;
- 			case SIGIO:
- 			case SIGVTALRM:
- 			case SIGILL:
-@@ -222,9 +227,10 @@
- 	block_signals();
- 	if(sigsetjmp(fork_buf, 1) == 0)
- 		new_thread_proc(stack, handler);
--	set_signals(flags);
- 
- 	remove_sigstack();
-+
-+	set_signals(flags);
- }
- 
- void thread_wait(void *sw, void *fb)
-Index: linux-2.6.10/arch/um/kernel/skas/sys-i386/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/sys-i386/Makefile	2004-12-25 05:35:27.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/sys-i386/Makefile	2005-04-07 19:34:21.197950744 +0800
-@@ -1,12 +0,0 @@
--# 
--# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
--# Licensed under the GPL
--#
--
--obj-y = sigcontext.o
--
--USER_OBJS = sigcontext.o
--USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
--
--$(USER_OBJS) : %.o: %.c
--	$(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
-Index: linux-2.6.10/arch/um/kernel/skas/sys-i386/sigcontext.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/sys-i386/sigcontext.c	2004-12-25 05:33:51.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/sys-i386/sigcontext.c	2005-04-07 19:34:21.197950744 +0800
-@@ -1,114 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#include <errno.h>
--#include <asm/sigcontext.h>
--#include <sys/ptrace.h>
--#include <linux/ptrace.h>
--#include "sysdep/ptrace.h"
--#include "sysdep/ptrace_user.h"
--#include "kern_util.h"
--#include "user.h"
--#include "sigcontext.h"
--#include "mode.h"
--
--int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs, void *from_ptr)
--{
--  	struct sigcontext sc, *from = from_ptr;
--	unsigned long fpregs[FP_FRAME_SIZE];
--	int err;
--
--	err = copy_from_user_proc(&sc, from, sizeof(sc));
--	err |= copy_from_user_proc(fpregs, sc.fpstate, sizeof(fpregs));
--	if(err)
--		return(err);
--
--	regs->skas.regs[GS] = sc.gs;
--	regs->skas.regs[FS] = sc.fs;
--	regs->skas.regs[ES] = sc.es;
--	regs->skas.regs[DS] = sc.ds;
--	regs->skas.regs[EDI] = sc.edi;
--	regs->skas.regs[ESI] = sc.esi;
--	regs->skas.regs[EBP] = sc.ebp;
--	regs->skas.regs[UESP] = sc.esp;
--	regs->skas.regs[EBX] = sc.ebx;
--	regs->skas.regs[EDX] = sc.edx;
--	regs->skas.regs[ECX] = sc.ecx;
--	regs->skas.regs[EAX] = sc.eax;
--	regs->skas.regs[EIP] = sc.eip;
--	regs->skas.regs[CS] = sc.cs;
--	regs->skas.regs[EFL] = sc.eflags;
--	regs->skas.regs[SS] = sc.ss;
--	regs->skas.fault_addr = sc.cr2;
--	regs->skas.fault_type = FAULT_WRITE(sc.err);
--	regs->skas.trap_type = sc.trapno;
--
--	err = ptrace(PTRACE_SETFPREGS, pid, 0, fpregs);
--	if(err < 0){
--	  	printk("copy_sc_to_user - PTRACE_SETFPREGS failed, "
--		       "errno = %d\n", errno);
--		return(1);
--	}
--
--	return(0);
--}
--
--int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp,
--			 union uml_pt_regs *regs, unsigned long fault_addr,
--			 int fault_type)
--{
--  	struct sigcontext sc, *to = to_ptr;
--	struct _fpstate *to_fp;
--	unsigned long fpregs[FP_FRAME_SIZE];
--	int err;
--
--	sc.gs = regs->skas.regs[GS];
--	sc.fs = regs->skas.regs[FS];
--	sc.es = regs->skas.regs[ES];
--	sc.ds = regs->skas.regs[DS];
--	sc.edi = regs->skas.regs[EDI];
--	sc.esi = regs->skas.regs[ESI];
--	sc.ebp = regs->skas.regs[EBP];
--	sc.esp = regs->skas.regs[UESP];
--	sc.ebx = regs->skas.regs[EBX];
--	sc.edx = regs->skas.regs[EDX];
--	sc.ecx = regs->skas.regs[ECX];
--	sc.eax = regs->skas.regs[EAX];
--	sc.eip = regs->skas.regs[EIP];
--	sc.cs = regs->skas.regs[CS];
--	sc.eflags = regs->skas.regs[EFL];
--	sc.esp_at_signal = regs->skas.regs[UESP];
--	sc.ss = regs->skas.regs[SS];
--	sc.cr2 = fault_addr;
--	sc.err = TO_SC_ERR(fault_type);
--	sc.trapno = regs->skas.trap_type;
--
--	err = ptrace(PTRACE_GETFPREGS, pid, 0, fpregs);
--	if(err < 0){
--	  	printk("copy_sc_to_user - PTRACE_GETFPREGS failed, "
--		       "errno = %d\n", errno);
--		return(1);
--	}
--	to_fp = (struct _fpstate *) 
--		(fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to)));
--	sc.fpstate = to_fp;
--
--	if(err)
--	  	return(err);
--
--	return(copy_to_user_proc(to, &sc, sizeof(sc)) ||
--	       copy_to_user_proc(to_fp, fpregs, sizeof(fpregs)));
--}
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/um/kernel/skas/process_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/process_kern.c	2004-12-25 05:35:50.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/process_kern.c	2005-04-07 22:05:29.488759216 +0800
-@@ -19,7 +19,6 @@
- #include "os.h"
- #include "user_util.h"
- #include "tlb.h"
--#include "frame.h"
- #include "kern.h"
- #include "mode.h"
- #include "proc_mm.h"
-@@ -183,7 +182,6 @@
- int start_uml_skas(void)
- {
- 	start_userspace(0);
--	capture_signal_stack();
- 
- 	init_new_thread_signals(1);
- 	uml_idle_timer();
-Index: linux-2.6.10/arch/um/kernel/skas/trap_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/trap_user.c	2004-12-25 05:34:32.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/trap_user.c	2005-04-07 22:05:29.488759216 +0800
-@@ -21,6 +21,14 @@
- 	int save_errno = errno;
- 	int save_user;
- 
-+	/* This is done because to allow SIGSEGV to be delivered inside a SEGV
-+	 * handler.  This can happen in copy_user, and if SEGV is disabled,
-+	 * the process will die.
-+	 * XXX Figure out why this is better than SA_NODEFER
-+	 */
-+	if(sig == SIGSEGV)
-+		change_sig(SIGSEGV, 1);
-+
- 	r = &TASK_REGS(get_current())->skas;
- 	save_user = r->is_user;
- 	r->is_user = 0;
-Index: linux-2.6.10/arch/um/kernel/skas/syscall_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/syscall_kern.c	2004-12-25 05:35:00.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/syscall_kern.c	2005-04-07 22:05:29.488759216 +0800
-@@ -6,6 +6,7 @@
- #include "linux/sys.h"
- #include "linux/ptrace.h"
- #include "asm/errno.h"
-+#include "linux/ptrace.h"
- #include "asm/unistd.h"
- #include "asm/ptrace.h"
- #include "asm/current.h"
-Index: linux-2.6.10/arch/um/kernel/skas/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/Makefile	2004-12-25 05:34:30.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/Makefile	2005-04-07 22:05:29.488759216 +0800
-@@ -4,8 +4,7 @@
- #
- 
- obj-y := exec_kern.o mem.o mem_user.o mmu.o process.o process_kern.o \
--	syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o \
--	sys-$(SUBARCH)/
-+ 	syscall_kern.o syscall_user.o time.o tlb.o trap_user.o uaccess.o
- 
- subdir-y := util
- 
-Index: linux-2.6.10/arch/um/kernel/skas/include/mmu-skas.h
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/include/mmu-skas.h	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/include/mmu-skas.h	2005-04-07 22:05:29.488759216 +0800
-@@ -22,3 +22,27 @@
-  * c-file-style: "linux"
-  * End:
-  */
-+/*
-+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-+ * Licensed under the GPL
-+ */
-+
-+#ifndef __SKAS_MMU_H
-+#define __SKAS_MMU_H
-+
-+struct mmu_context_skas {
-+	int mm_fd;
-+};
-+
-+#endif
-+
-+/*
-+ * Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-Index: linux-2.6.10/arch/um/kernel/skas/include/mode-skas.h
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/include/mode-skas.h	2004-12-25 05:34:58.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/include/mode-skas.h	2005-04-07 22:05:29.489759064 +0800
-@@ -14,6 +14,40 @@
- extern int have_fpx_regs;
- 
- extern void user_time_init_skas(void);
-+extern void sig_handler_common_skas(int sig, void *sc_ptr);
-+extern void halt_skas(void);
-+extern void reboot_skas(void);
-+extern void kill_off_processes_skas(void);
-+extern int is_skas_winch(int pid, int fd, void *data);
-+
-+#endif
-+
-+/*
-+ * Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-+/*
-+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-+ * Licensed under the GPL
-+ */
-+
-+#ifndef __MODE_SKAS_H__
-+#define __MODE_SKAS_H__
-+
-+#include <sysdep/ptrace.h>
-+
-+extern unsigned long exec_regs[];
-+extern unsigned long exec_fp_regs[];
-+extern unsigned long exec_fpx_regs[];
-+extern int have_fpx_regs;
-+
-+extern void user_time_init_skas(void);
- extern int copy_sc_from_user_skas(int pid, union uml_pt_regs *regs,
- 				  void *from_ptr);
- extern int copy_sc_to_user_skas(int pid, void *to_ptr, void *fp,
-Index: linux-2.6.10/arch/um/kernel/skas/include/uaccess-skas.h
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/skas/include/uaccess-skas.h	2004-12-25 05:34:32.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/skas/include/uaccess-skas.h	2005-04-07 22:05:29.489759064 +0800
-@@ -7,6 +7,51 @@
- #define __SKAS_UACCESS_H
- 
- #include "asm/errno.h"
-+#include "asm/fixmap.h"
-+
-+#define access_ok_skas(type, addr, size) \
-+	((segment_eq(get_fs(), KERNEL_DS)) || \
-+	 (((unsigned long) (addr) < TASK_SIZE) && \
-+	  ((unsigned long) (addr) + (size) <= TASK_SIZE)) || \
-+	 ((type == VERIFY_READ ) && \
-+	  ((unsigned long) (addr) >= FIXADDR_USER_START) && \
-+	  ((unsigned long) (addr) + (size) <= FIXADDR_USER_END) && \
-+	  ((unsigned long) (addr) + (size) >= (unsigned long)(addr))))
-+
-+static inline int verify_area_skas(int type, const void * addr,
-+				   unsigned long size)
-+{
-+	return(access_ok_skas(type, addr, size) ? 0 : -EFAULT);
-+}
-+
-+extern int copy_from_user_skas(void *to, const void *from, int n);
-+extern int copy_to_user_skas(void *to, const void *from, int n);
-+extern int strncpy_from_user_skas(char *dst, const char *src, int count);
-+extern int __clear_user_skas(void *mem, int len);
-+extern int clear_user_skas(void *mem, int len);
-+extern int strnlen_user_skas(const void *str, int len);
-+
-+#endif
-+
-+/*
-+ * Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-+/*
-+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-+ * Licensed under the GPL
-+ */
-+
-+#ifndef __SKAS_UACCESS_H
-+#define __SKAS_UACCESS_H
-+
-+#include "asm/errno.h"
- 
- #define access_ok_skas(type, addr, size) \
- 	((segment_eq(get_fs(), KERNEL_DS)) || \
-Index: linux-2.6.10/arch/um/kernel/tt/syscall_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/syscall_user.c	2004-12-25 05:35:01.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/syscall_user.c	2005-04-07 22:05:29.489759064 +0800
-@@ -42,37 +42,31 @@
- 	syscall_trace(regs, 1);
- 	record_syscall_end(index, result);
- }
--
--int do_syscall(void *task, int pid, int local_using_sysemu)
--{
--	unsigned long proc_regs[FRAME_SIZE];
--	union uml_pt_regs *regs;
--	int syscall;
--
--	if(ptrace_getregs(pid, proc_regs) < 0)
--		tracer_panic("Couldn't read registers");
--	syscall = PT_SYSCALL_NR(proc_regs);
--
--	regs = TASK_REGS(task);
--	UPT_SYSCALL_NR(regs) = syscall;
--
--	if(syscall < 0)
--		return(0);
--
--	if((syscall != __NR_sigreturn) &&
--	   ((unsigned long *) PT_IP(proc_regs) >= &_stext) && 
--	   ((unsigned long *) PT_IP(proc_regs) <= &_etext))
--		tracer_panic("I'm tracing myself and I can't get out");
--
--	if(local_using_sysemu)
--		return(1);
--
--	if(ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, 
--		  __NR_getpid) < 0)
--		tracer_panic("do_syscall : Nullifying syscall failed, "
--			     "errno = %d", errno);
--	return(1);
--}
-+  
-+ void do_sigtrap(void *task)
-+ {
-+ 	UPT_SYSCALL_NR(TASK_REGS(task)) = -1;
-+ }
-+ 
-+ void do_syscall(void *task, int pid, int local_using_sysemu)
-+  {
-+  	unsigned long proc_regs[FRAME_SIZE];
-+  
-+  	if(ptrace_getregs(pid, proc_regs) < 0)
-+  		tracer_panic("Couldn't read registers");
-+  
-+ 	UPT_SYSCALL_NR(TASK_REGS(task)) = PT_SYSCALL_NR(proc_regs);
-+  
-+ 	if(((unsigned long *) PT_IP(proc_regs) >= &_stext) &&
-+  	   ((unsigned long *) PT_IP(proc_regs) <= &_etext))
-+  		tracer_panic("I'm tracing myself and I can't get out");
-+  
-+ 	/* syscall number -1 in sysemu skips syscall restarting in host */
-+  	if(ptrace(PTRACE_POKEUSER, pid, PT_SYSCALL_NR_OFFSET, 
-+ 		  local_using_sysemu ? -1 : __NR_getpid) < 0)
-+  		tracer_panic("do_syscall : Nullifying syscall failed, "
-+  			     "errno = %d", errno);
-+  }
- 
- /*
-  * Overrides for Emacs so that we follow Linus's tabbing style.
-Index: linux-2.6.10/arch/um/kernel/tt/sys-i386/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/sys-i386/Makefile	2004-12-25 05:34:32.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/sys-i386/Makefile	2005-04-07 19:34:21.197950744 +0800
-@@ -1,12 +0,0 @@
--# 
--# Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
--# Licensed under the GPL
--#
--
--obj-y = sigcontext.o
--
--USER_OBJS = sigcontext.o
--USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))
--
--$(USER_OBJS) : %.o: %.c
--	$(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $<
-Index: linux-2.6.10/arch/um/kernel/tt/sys-i386/sigcontext.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/sys-i386/sigcontext.c	2004-12-25 05:35:39.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/sys-i386/sigcontext.c	2005-04-07 19:34:21.197950744 +0800
-@@ -1,60 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#include <stdlib.h>
--#include <asm/sigcontext.h>
--#include "kern_util.h"
--#include "sysdep/frame.h"
--
--int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data)
--{
--	struct arch_frame_data *arch = data;
--	struct sigcontext *to = to_ptr, *from = from_ptr;
--	struct _fpstate *to_fp, *from_fp;
--	unsigned long sigs;
--	int err;
--
--	to_fp = to->fpstate;
--	from_fp = from->fpstate;
--	sigs = to->oldmask;
--	err = copy_from_user_proc(to, from, sizeof(*to));
--	to->oldmask = sigs;
--	if(to_fp != NULL){
--		err |= copy_from_user_proc(&to->fpstate, &to_fp,
--					   sizeof(to->fpstate));
--		err |= copy_from_user_proc(to_fp, from_fp, arch->fpstate_size);
--	}
--	return(err);
--}
--
--int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr, void *data)
--{
--	struct arch_frame_data *arch = data;
--	struct sigcontext *to = to_ptr, *from = from_ptr;
--	struct _fpstate *to_fp, *from_fp;
--	int err;
--
--	to_fp = (struct _fpstate *) 
--		(fp ? (unsigned long) fp : ((unsigned long) to + sizeof(*to)));
--	from_fp = from->fpstate;
--	err = copy_to_user_proc(to, from, sizeof(*to));
--	if(from_fp != NULL){
--		err |= copy_to_user_proc(&to->fpstate, &to_fp,
--					 sizeof(to->fpstate));
--		err |= copy_to_user_proc(to_fp, from_fp, arch->fpstate_size);
--	}
--	return(err);
--}
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/um/kernel/tt/exec_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/exec_user.c	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/exec_user.c	2005-04-07 22:05:29.490758912 +0800
-@@ -10,6 +10,7 @@
- #include <errno.h>
- #include <sys/wait.h>
- #include <sys/ptrace.h>
-+#include <linux/ptrace.h>
- #include <signal.h>
- #include "user_util.h"
- #include "kern_util.h"
-@@ -35,7 +36,10 @@
- 		tracer_panic("do_exec failed to get registers - errno = %d",
- 			     errno);
- 
--	kill(old_pid, SIGKILL);
-+	os_kill_ptraced_process(old_pid, 0);
-+
-+	if (ptrace(PTRACE_OLDSETOPTIONS, new_pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
-+		tracer_panic("do_exec: PTRACE_SETOPTIONS failed, errno = %d", errno);
- 
- 	if(ptrace_setregs(new_pid, regs) < 0)
- 		tracer_panic("do_exec failed to start new proc - errno = %d",
-Index: linux-2.6.10/arch/um/kernel/tt/tracer.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/tracer.c	2004-12-25 05:33:49.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/tracer.c	2005-04-07 22:10:59.446598000 +0800
-@@ -13,6 +13,7 @@
- #include <string.h>
- #include <sys/mman.h>
- #include <sys/ptrace.h>
-+#include <linux/ptrace.h>
- #include <sys/time.h>
- #include <sys/wait.h>
- #include "user.h"
-@@ -25,7 +26,6 @@
- #include "mem_user.h"
- #include "process.h"
- #include "kern_util.h"
--#include "frame.h"
- #include "chan_user.h"
- #include "ptrace_user.h"
- #include "mode.h"
-@@ -72,6 +72,8 @@
- 	   (ptrace(PTRACE_CONT, pid, 0, 0) < 0))
- 		tracer_panic("OP_FORK failed to attach pid");
- 	wait_for_stop(pid, SIGSTOP, PTRACE_CONT, NULL);
-+	if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0)
-+		tracer_panic("OP_FORK: PTRACE_SETOPTIONS failed, errno = %d", errno);
- 	if(ptrace(PTRACE_CONT, pid, 0, 0) < 0)
- 		tracer_panic("OP_FORK failed to continue process");
- }
-@@ -141,7 +143,7 @@
- 	 * any more, the trace of those will land here.  So, we need to just 
- 	 * PTRACE_SYSCALL it.
- 	 */
--	case SIGTRAP:
-+	case (SIGTRAP|SYSCALL_TRAP):
- 		if(ptrace(PTRACE_SYSCALL, pid, 0, 0) < 0)
- 			tracer_panic("sleeping_process_signal : Failed to "
- 				     "PTRACE_SYSCALL pid %d, errno = %d\n",
-@@ -184,9 +186,8 @@
- 	unsigned long eip = 0;
- 	int status, pid = 0, sig = 0, cont_type, tracing = 0, op = 0;
- 	int last_index, proc_id = 0, n, err, old_tracing = 0, strace = 0;
--	int pt_syscall_parm, local_using_sysemu;
-+	int pt_syscall_parm, local_using_sysemu = 0;
- 
--	capture_signal_stack();
- 	signal(SIGPIPE, SIG_IGN);
- 	setup_tracer_winch();
- 	tracing_pid = os_getpid();
-@@ -198,6 +199,10 @@
- 		printf("waitpid on idle thread failed, errno = %d\n", errno);
- 		exit(1);
- 	}
-+	if (ptrace(PTRACE_OLDSETOPTIONS, pid, 0, (void *)PTRACE_O_TRACESYSGOOD) < 0) {
-+		printf("Failed to PTRACE_SETOPTIONS for idle thread, errno = %d\n", errno);
-+		exit(1);
-+	}
- 	if((ptrace(PTRACE_CONT, pid, 0, 0) < 0)){
- 		printf("Failed to continue idle thread, errno = %d\n", errno);
- 		exit(1);
-@@ -265,7 +270,25 @@
- #endif
- 		else if(WIFSIGNALED(status)){
- 			sig = WTERMSIG(status);
--			if(sig != 9){
-+		        if(sig == SIGKILL){
-+                                /* This is to make sure that processes die
-+                                * immediately without becoming zombies on
-+                                * all hosts. Before 2.6.9, kill(pid, SIGKILL)
-+                                * was enough to make sure a process went away
-+                                * immediately. After 2.6.9, they don't run
-+                                * any more, but they remain as zombies. So,
-+                                * a PTRACE_CONT is necessary in order to put
-+                                * them in a normal run state so that they die.
-+                                * I do a PTRACE_KILL here for good measure.
-+                                * Might as well kill it by all available
-+                                * means. These calls will likely fail when
-+                                * they are not needed because the process has
-+                                * already disappeared. However, they don't
-+                                * hurt.
-+                                */
-+                               ptrace(PTRACE_KILL, pid, 0, 0);
-+                               ptrace(PTRACE_CONT, pid, 0, 0);
-+                        } else {
- 				printf("Child %d exited with signal %d\n", pid,
- 				       sig);
- 			}
-@@ -297,7 +320,8 @@
- 			task = cpu_tasks[proc_id].task;
- 			tracing = is_tracing(task);
- 			old_tracing = tracing;
--
-+ 			if ( tracing ) /* Assume: no syscall, when coming from user */
-+ 				do_sigtrap(task);
- 			local_using_sysemu = get_using_sysemu();
- 			pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL;
- 
-@@ -306,6 +330,15 @@
- 				sig = 0;
- 				op = do_proc_op(task, proc_id);
- 				switch(op){
-+				/*
-+ 				 * This is called when entering user mode; after
-+ 				 * this, we start intercepting syscalls.
-+ 				 *
-+ 				 * In fact, a process is started in kernel mode,
-+ 				 * so with is_tracing() == 0 (and that is reset
-+ 				 * when executing syscalls, since UML kernel has
-+ 				 * the right to do syscalls);
-+ 				 */
- 				case OP_TRACE_ON:
- 					arch_leave_kernel(task, pid);
- 					tracing = 1;
-@@ -314,7 +347,13 @@
- 				case OP_HALT:
- 					unmap_physmem();
- 					kmalloc_ok = 0;
--					ptrace(PTRACE_KILL, pid, 0, 0);
-+					os_kill_ptraced_process(pid, 0);
-+					/* Now let's reap remaining zombies */
-+					errno = 0;
-+					do {
-+						waitpid(-1, &status,
-+							WUNTRACED);
-+					} while (errno != ECHILD);
- 					return(op == OP_REBOOT);
- 				case OP_NONE:
- 					printf("Detaching pid %d\n", pid);
-@@ -328,14 +367,26 @@
- 				 */
- 				pid = cpu_tasks[proc_id].pid;
- 				break;
-+			case (SIGTRAP|SYSCALL_TRAP):
-+ 				if(!tracing && (debugger_pid != -1)){
-+ 					child_signal(pid, W_STOPCODE(SIGTRAP));
-+ 					continue;
-+ 				}
-+ 				tracing = 0;
-+ 				/* local_using_sysemu has been already set
-+ 				 * below, since if we are here, is_tracing() on
-+ 				 * the traced task was 1, i.e. the process had
-+ 				 * already run through one iteration of the
-+ 				 * loop which executed a OP_TRACE_ON request.*/
-+ 				do_syscall(task, pid, local_using_sysemu);
-+ 				sig = SIGUSR2;
-+ 				break;
- 			case SIGTRAP:
- 				if(!tracing && (debugger_pid != -1)){
- 					child_signal(pid, status);
- 					continue;
- 				}
- 				tracing = 0;
--				if(do_syscall(task, pid, local_using_sysemu))
--					sig = SIGUSR2;
- 				break;
- 			case SIGPROF:
- 				if(tracing) sig = 0;
-@@ -371,6 +422,9 @@
- 				continue;
- 			}
- 
-+ 			local_using_sysemu = get_using_sysemu();
-+ 			pt_syscall_parm = local_using_sysemu ? PTRACE_SYSEMU : PTRACE_SYSCALL;
-+ 
- 			if(tracing){
- 				if(singlestepping(task))
- 					cont_type = PTRACE_SINGLESTEP;
-Index: linux-2.6.10/arch/um/kernel/tt/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/Makefile	2004-12-25 05:34:57.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/Makefile	2005-04-07 22:05:29.491758760 +0800
-@@ -8,7 +8,7 @@
- 
- obj-y = exec_kern.o exec_user.o gdb.o ksyms.o mem.o mem_user.o process_kern.o \
- 	syscall_kern.o syscall_user.o time.o tlb.o tracer.o trap_user.o \
--	uaccess.o uaccess_user.o sys-$(SUBARCH)/
-+	uaccess.o uaccess_user.o 
- 
- obj-$(CONFIG_PT_PROXY) += gdb_kern.o ptproxy/
- 
-Index: linux-2.6.10/arch/um/kernel/tt/include/mode-tt.h
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/include/mode-tt.h	2004-12-25 05:35:01.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/include/mode-tt.h	2005-04-07 22:05:29.491758760 +0800
-@@ -14,6 +14,41 @@
- 
- extern int tracer(int (*init_proc)(void *), void *sp);
- extern void user_time_init_tt(void);
-+extern void sig_handler_common_tt(int sig, void *sc);
-+extern void syscall_handler_tt(int sig, union uml_pt_regs *regs);
-+extern void reboot_tt(void);
-+extern void halt_tt(void);
-+extern int is_tracer_winch(int pid, int fd, void *data);
-+extern void kill_off_processes_tt(void);
-+
-+#endif
-+
-+/*
-+ * Overrides for Emacs so that we follow Linus's tabbing style.
-+ * Emacs will notice this stuff at the end of the file and automatically
-+ * adjust the settings for this buffer only.  This must remain at the end
-+ * of the file.
-+ * ---------------------------------------------------------------------------
-+ * Local variables:
-+ * c-file-style: "linux"
-+ * End:
-+ */
-+/*
-+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-+ * Licensed under the GPL
-+ */
-+
-+#ifndef __MODE_TT_H__
-+#define __MODE_TT_H__
-+
-+#include "sysdep/ptrace.h"
-+
-+enum { OP_NONE, OP_EXEC, OP_FORK, OP_TRACE_ON, OP_REBOOT, OP_HALT, OP_CB };
-+
-+extern int tracing_pid;
-+
-+extern int tracer(int (*init_proc)(void *), void *sp);
-+extern void user_time_init_tt(void);
- extern int copy_sc_from_user_tt(void *to_ptr, void *from_ptr, void *data);
- extern int copy_sc_to_user_tt(void *to_ptr, void *fp, void *from_ptr,
- 			      void *data);
-Index: linux-2.6.10/arch/um/kernel/tt/include/tt.h
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/tt/include/tt.h	2004-12-25 05:34:58.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/tt/include/tt.h	2005-04-07 22:05:29.491758760 +0800
-@@ -26,7 +26,8 @@
- extern int is_tracing(void *task);
- extern void syscall_handler(int sig, union uml_pt_regs *regs);
- extern void exit_kernel(int pid, void *task);
--extern int do_syscall(void *task, int pid, int local_using_sysemu);
-+extern void do_syscall(void *task, int pid, int local_using_sysemu);
-+extern void do_sigtrap(void *task);
- extern int is_valid_pid(int pid);
- extern void remap_data(void *segment_start, void *segment_end, int w);
- 
-Index: linux-2.6.10/arch/um/kernel/ptrace.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/ptrace.c	2004-12-25 05:35:50.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/ptrace.c	2005-04-07 22:05:29.491758760 +0800
-@@ -16,6 +16,7 @@
- #include "asm/uaccess.h"
- #include "kern_util.h"
- #include "ptrace_user.h"
-+#include "signal_user.h"
- 
- /*
-  * Called by kernel/ptrace.c when detaching..
-@@ -328,8 +329,10 @@
- 	/* the 0x80 provides a way for the tracing parent to distinguish
- 	   between a syscall stop and SIGTRAP delivery */
- 	tracesysgood = (current->ptrace & PT_TRACESYSGOOD) && !is_singlestep;
--	ptrace_notify(SIGTRAP | (tracesysgood ? 0x80 : 0));
--
-+	ptrace_notify(SIGTRAP | (tracesysgood ? SYSCALL_TRAP : 0));
-+ 	if ( entryexit ) /* force do_signal() --> is_syscall() */
-+ 		set_thread_flag(TIF_SIGPENDING);
-+ 
- 	/* force do_signal() --> is_syscall() */
- 	set_thread_flag(TIF_SIGPENDING);
- 
-Index: linux-2.6.10/arch/um/kernel/dyn.lds.S
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/dyn.lds.S	2004-12-25 05:34:48.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/dyn.lds.S	2005-04-07 22:05:29.492758608 +0800
-@@ -7,8 +7,11 @@
- 
- SECTIONS
- {
-+  PROVIDE (__executable_start = START);
-   . = START + SIZEOF_HEADERS;
-   .interp         : { *(.interp) }
-+  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
-+   * is remapped.*/
-   __binary_start = .;
-   . = ALIGN(4096);		/* Init code and data */
-   _stext = .;
-Index: linux-2.6.10/arch/um/kernel/um_arch.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/um_arch.c	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/um_arch.c	2005-04-07 22:05:29.492758608 +0800
-@@ -44,11 +44,6 @@
- 	.ipi_pipe		= { -1, -1 }
- };
- 
--/* Placeholder to make UML link until the vsyscall stuff is actually
-- * implemented
-- */
--void *__kernel_vsyscall;
--
- unsigned long thread_saved_pc(struct task_struct *task)
- {
- 	return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas,
-@@ -326,6 +321,11 @@
- 	 */
- 	check_tmpexec();
- 
-+	/* Need to check this early because mmapping happens before the
-+	 * kernel is running.
-+	 */
-+	check_tmpexec();
-+
- 	brk_start = (unsigned long) sbrk(0);
- 	CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start);
- 	/* Increase physical memory size for exec-shield users
-Index: linux-2.6.10/arch/um/kernel/time.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/time.c	2004-12-25 05:34:26.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/time.c	2005-04-07 22:05:29.492758608 +0800
-@@ -60,6 +60,9 @@
- 	   (setitimer(ITIMER_REAL, &disable, NULL) < 0))
- 		printk("disnable_timer - setitimer failed, errno = %d\n",
- 		       errno);
-+	/* If there are signals already queued, after unblocking ignore them */
-+	set_handler(SIGALRM, SIG_IGN, 0, -1);
-+	set_handler(SIGVTALRM, SIG_IGN, 0, -1);
- }
- 
- void switch_timers(int to_real)
-Index: linux-2.6.10/arch/um/kernel/process_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/process_kern.c	2004-12-25 05:34:57.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/process_kern.c	2005-04-07 22:05:29.493758456 +0800
-@@ -291,8 +291,6 @@
- 
- EXPORT_SYMBOL(disable_hlt);
- 
--extern int signal_frame_size;
--
- void *um_kmalloc(int size)
- {
- 	return(kmalloc(size, GFP_KERNEL));
-Index: linux-2.6.10/arch/um/kernel/trap_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/trap_user.c	2004-12-25 05:34:44.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/trap_user.c	2005-04-07 22:05:29.493758456 +0800
-@@ -18,7 +18,6 @@
- #include "sigcontext.h"
- #include "sysdep/sigcontext.h"
- #include "irq_user.h"
--#include "frame_user.h"
- #include "signal_user.h"
- #include "time_user.h"
- #include "task.h"
-Index: linux-2.6.10/arch/um/kernel/signal_kern.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/signal_kern.c	2004-12-25 05:34:58.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/signal_kern.c	2005-04-07 22:05:29.493758456 +0800
-@@ -230,53 +230,6 @@
- 	return(do_sigaltstack(uss, uoss, PT_REGS_SP(&current->thread.regs)));
- }
- 
--extern int userspace_pid[];
--
--static int copy_sc_from_user(struct pt_regs *to, void *from, 
--			     struct arch_frame_data *arch)
--{
--	int ret;
--
--	ret = CHOOSE_MODE(copy_sc_from_user_tt(UPT_SC(&to->regs), from, arch),
--			  copy_sc_from_user_skas(userspace_pid[0],
--						 &to->regs, from));
--	return(ret);
--}
--
--long sys_sigreturn(struct pt_regs regs)
--{
--	void __user *sc = sp_to_sc(PT_REGS_SP(&current->thread.regs));
--	void __user *mask = sp_to_mask(PT_REGS_SP(&current->thread.regs));
--	int sig_size = (_NSIG_WORDS - 1) * sizeof(unsigned long);
--
--	spin_lock_irq(&current->sighand->siglock);
--	copy_from_user(&current->blocked.sig[0], sc_sigmask(sc), 
--		       sizeof(current->blocked.sig[0]));
--	copy_from_user(&current->blocked.sig[1], mask, sig_size);
--	sigdelsetmask(&current->blocked, ~_BLOCKABLE);
--	recalc_sigpending();
--	spin_unlock_irq(&current->sighand->siglock);
--	copy_sc_from_user(&current->thread.regs, sc, 
--			  &signal_frame_sc.common.arch);
--	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
--}
--
--long sys_rt_sigreturn(struct pt_regs regs)
--{
--	unsigned long sp = PT_REGS_SP(&current->thread.regs);
--	struct ucontext __user *uc = sp_to_uc(sp);
--	int sig_size = _NSIG_WORDS * sizeof(unsigned long);
--
--	spin_lock_irq(&current->sighand->siglock);
--	copy_from_user(&current->blocked, &uc->uc_sigmask, sig_size);
--	sigdelsetmask(&current->blocked, ~_BLOCKABLE);
--	recalc_sigpending();
--	spin_unlock_irq(&current->sighand->siglock);
--	copy_sc_from_user(&current->thread.regs, &uc->uc_mcontext,
--			  &signal_frame_si.common.arch);
--	return(PT_REGS_SYSCALL_RET(&current->thread.regs));
--}
--
- /*
-  * Overrides for Emacs so that we follow Linus's tabbing style.
-  * Emacs will notice this stuff at the end of the file and automatically
-Index: linux-2.6.10/arch/um/kernel/uml.lds.S
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/uml.lds.S	2004-12-25 05:34:44.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/uml.lds.S	2005-04-07 22:05:29.494758304 +0800
-@@ -7,8 +7,12 @@
- 
- SECTIONS
- {
-+  /*This must contain the right address - not quite the default ELF one.*/
-+  PROVIDE (__executable_start = START);
-   . = START + SIZEOF_HEADERS;
- 
-+  /* Used in arch/um/kernel/mem.c. Any memory between START and __binary_start
-+   * is remapped.*/
-   __binary_start = .;
- #ifdef MODE_TT
-   .thread_private : {
-@@ -20,9 +24,13 @@
-   }
-   . = ALIGN(4096);
-   .remap : { arch/um/kernel/tt/unmap_fin.o (.text) }
--#endif
- 
-+  /*If you put this after #endif, STATIC build without TT mode
-+  gives a segfaulting binary. And after all, a hole just after
-+  binary_start is not very polite to glibc.*/
-   . = ALIGN(4096);		/* Init code and data */
-+#endif
-+
-   _stext = .;
-   __init_begin = .;
-   .init.text : {
-Index: linux-2.6.10/arch/um/kernel/ksyms.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/ksyms.c	2004-12-25 05:33:50.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/ksyms.c	2005-04-07 22:05:29.494758304 +0800
-@@ -48,6 +48,7 @@
- EXPORT_SYMBOL(mode_tt);
- EXPORT_SYMBOL(handle_page_fault);
- EXPORT_SYMBOL(find_iomem);
-+EXPORT_SYMBOL(end_iomem);
- 
- #ifdef CONFIG_MODE_TT
- EXPORT_SYMBOL(strncpy_from_user_tt);
-Index: linux-2.6.10/arch/um/kernel/signal_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/signal_user.c	2004-12-25 05:35:23.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/signal_user.c	2005-04-07 22:05:29.494758304 +0800
-@@ -61,6 +61,10 @@
-  * disable profiling; it's safe because the profiling code does not interact
-  * with the kernel code at all.*/
- 
-+/* Both here and in set/get_signal we don't touch SIGPROF, because we must not
-+ * disable profiling; it's safe because the profiling code does not interact
-+ * with the kernel code at all.*/
-+
- static void change_signals(int type)
- {
- 	sigset_t mask;
-Index: linux-2.6.10/arch/um/kernel/mem_user.c
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/mem_user.c	2004-12-25 05:34:57.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/mem_user.c	2005-04-07 22:05:29.494758304 +0800
-@@ -101,6 +101,8 @@
- 	}
- 	printf("OK\n");
- 	munmap(addr, UM_KERN_PAGE_SIZE);
-+
-+	os_close_file(fd);
- }
- 
- static int have_devanon = 0;
-@@ -261,6 +263,39 @@
- }
- #endif
- 
-+#if 0
-+/* Debugging facility for dumping stuff out to the host, avoiding the timing
-+ * problems that come with printf and breakpoints.
-+ * Enable in case of emergency.
-+ */
-+
-+int logging = 1;
-+int logging_fd = -1;
-+
-+int logging_line = 0;
-+char logging_buf[512];
-+
-+void log(char *fmt, ...)
-+{
-+        va_list ap;
-+        struct timeval tv;
-+        struct openflags flags;
-+
-+        if(logging == 0) return;
-+        if(logging_fd < 0){
-+                flags = of_create(of_trunc(of_rdwr(OPENFLAGS())));
-+                logging_fd = os_open_file("log", flags, 0644);
-+        }
-+        gettimeofday(&tv, NULL);
-+        sprintf(logging_buf, "%d\t %u.%u  ", logging_line++, tv.tv_sec,
-+                tv.tv_usec);
-+        va_start(ap, fmt);
-+        vsprintf(&logging_buf[strlen(logging_buf)], fmt, ap);
-+        va_end(ap);
-+        write(logging_fd, logging_buf, strlen(logging_buf));
-+}
-+#endif
-+
- /*
-  * Overrides for Emacs so that we follow Linus's tabbing style.
-  * Emacs will notice this stuff at the end of the file and automatically
-Index: linux-2.6.10/arch/um/kernel/Makefile
-===================================================================
---- linux-2.6.10.orig/arch/um/kernel/Makefile	2004-12-25 05:35:01.000000000 +0800
-+++ linux-2.6.10/arch/um/kernel/Makefile	2005-04-07 22:05:29.495758152 +0800
-@@ -6,7 +6,7 @@
- extra-y := vmlinux.lds
- clean-files := vmlinux.lds.S
- 
--obj-y = checksum.o config.o exec_kern.o exitcode.o frame_kern.o frame.o \
-+obj-y = checksum.o config.o exec_kern.o exitcode.o \
- 	helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \
- 	physmem.o process.o process_kern.o ptrace.o reboot.o resource.o \
- 	sigio_user.o sigio_kern.o signal_kern.o signal_user.o smp.o \
-Index: linux-2.6.10/arch/um/Kconfig
-===================================================================
---- linux-2.6.10.orig/arch/um/Kconfig	2004-12-25 05:34:45.000000000 +0800
-+++ linux-2.6.10/arch/um/Kconfig	2005-04-07 22:05:29.495758152 +0800
-@@ -139,6 +139,25 @@
- 
-         It is safe to say 'Y' here.
- 
-+config MAGIC_SYSRQ
-+        bool "Magic SysRq key"
-+        depends on MCONSOLE
-+        ---help---
-+        If you say Y here, you will have some control over the system even
-+        if the system crashes for example during kernel debugging (e.g., you
-+        will be able to flush the buffer cache to disk, reboot the system
-+        immediately or dump some status information). A key for each of the
-+        possible requests is provided.
-+
-+        This is the feature normally accomplished by pressing a key
-+        while holding SysRq (Alt+PrintScreen).
-+
-+        On UML, this is accomplished by sending a "sysrq" command with
-+        mconsole, followed by the letter for the requested command.
-+
-+        The keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
-+        unless you really know what this hack does.
-+
- config HOST_2G_2G
- 	bool "2G/2G host address space split"
- 	default n
-@@ -153,28 +172,28 @@
- 	So, if you do not know what to do here, say 'N'.
- 
- config SMP
--	bool "Symmetric multi-processing support (EXPERIMENTAL)"
--	default n
--	depends on MODE_TT && EXPERIMENTAL
--	help
--	This option enables UML SMP support.
--	It is NOT related to having a real SMP box. Not directly, at least.
-+        bool "Symmetric multi-processing support (EXPERIMENTAL)"
-+        default n
-+        depends on MODE_TT && EXPERIMENTAL
-+        help
-+        This option enables UML SMP support.
-+        It is NOT related to having a real SMP box. Not directly, at least.
-+
-+        UML implements virtual SMP by allowing as many processes to run
-+        simultaneously on the host as there are virtual processors configured.
-+
-+        Obviously, if the host is a uniprocessor, those processes will
-+        timeshare, but, inside UML, will appear to be running simultaneously.
-+        If the host is a multiprocessor, then UML processes may run
-+        simultaneously, depending on the host scheduler.
-+
-+        This, however, is supported only in TT mode. So, if you use the SKAS
-+        patch on your host, switching to TT mode and enabling SMP usually gives
-+        you worse performances.
-+        Also, since the support for SMP has been under-developed, there could
-+        be some bugs being exposed by enabling SMP.
- 
--	UML implements virtual SMP by allowing as many processes to run
--	simultaneously on the host as there are virtual processors configured.
--
--	Obviously, if the host is a uniprocessor, those processes will
--	timeshare, but, inside UML, will appear to be running simultaneously.
--	If the host is a multiprocessor, then UML processes may run
--	simultaneously, depending on the host scheduler.
--
--	This, however, is supported only in TT mode. So, if you use the SKAS
--	patch on your host, switching to TT mode and enabling SMP usually gives
--	you worse performances.
--	Also, since the support for SMP has been under-developed, there could
--	be some bugs being exposed by enabling SMP.
--
--	If you don't know what to do, say N.
-+        If you don't know what to do, say N.
- 
- config NR_CPUS
- 	int "Maximum number of CPUs (2-32)"
-@@ -282,4 +301,8 @@
- 	bool
- 	default n
- 
-+config INPUT
-+	bool
-+	default n
-+
- source "arch/um/Kconfig.debug"
-Index: linux-2.6.10/arch/um/include/frame.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/frame.h	2004-12-25 05:34:31.000000000 +0800
-+++ linux-2.6.10/arch/um/include/frame.h	2005-04-07 19:34:21.197950744 +0800
-@@ -1,53 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#ifndef __FRAME_H_
--#define __FRAME_H_
--
--#include "sysdep/frame.h"
--
--struct frame_common {
--	void *data;
--	int len;
--	int sig_index;
--	int sr_index;
--	int sr_relative;
--	int sp_index;
--	struct arch_frame_data arch;
--};
--
--struct sc_frame {
--	struct frame_common common;
--	int sc_index;
--};
--
--extern struct sc_frame signal_frame_sc;
--
--extern struct sc_frame signal_frame_sc_sr;
--
--struct si_frame {
--	struct frame_common common;
--	int sip_index;
--	int si_index;
--	int ucp_index;
--	int uc_index;
--};
--
--extern struct si_frame signal_frame_si;
--
--extern void capture_signal_stack(void);
--
--#endif
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/um/include/elf_user.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/elf_user.h	2005-04-07 19:34:21.197950744 +0800
-+++ linux-2.6.10/arch/um/include/elf_user.h	2005-04-07 22:05:29.495758152 +0800
-@@ -0,0 +1,19 @@
-+/*
-+ * Copyright (C) 2004 Fujitsu Siemens Computers GmbH
-+ * Author: Bodo Stroesser <bstroesser@fujitsu-siemens.com>
-+ * Licensed under the GPL
-+ */
-+
-+#ifndef __ELF_USER_H__
-+#define __ELF_USER_H__
-+
-+/* For compilation on a host that doesn't support AT_SYSINFO (Linux 2.4)  */
-+
-+#ifndef AT_SYSINFO
-+#define AT_SYSINFO 32
-+#endif
-+#ifndef AT_SYSINFO_EHDR
-+#define AT_SYSINFO_EHDR 33
-+#endif
-+
-+#endif
-Index: linux-2.6.10/arch/um/include/signal_user.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/signal_user.h	2004-12-25 05:33:49.000000000 +0800
-+++ linux-2.6.10/arch/um/include/signal_user.h	2005-04-07 22:05:29.496758000 +0800
-@@ -14,6 +14,8 @@
- extern int set_signals(int enable);
- extern int get_signals(void);
- 
-+#define SYSCALL_TRAP 0x80
-+
- #endif
- 
- /*
-Index: linux-2.6.10/arch/um/include/skas_ptrace.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/skas_ptrace.h	2004-12-25 05:35:27.000000000 +0800
-+++ linux-2.6.10/arch/um/include/skas_ptrace.h	2005-04-07 22:05:29.496758000 +0800
-@@ -6,6 +6,7 @@
- #ifndef __SKAS_PTRACE_H
- #define __SKAS_PTRACE_H
- 
-+#ifndef PTRACE_FAULTINFO
- struct ptrace_faultinfo {
- 	int is_write;
- 	unsigned long addr;
-@@ -21,6 +22,7 @@
- #define PTRACE_SIGPENDING 53
- #define PTRACE_LDT 54
- #define PTRACE_SWITCH_MM 55
-+#endif
- 
- #endif
- 
-Index: linux-2.6.10/arch/um/include/frame_kern.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/frame_kern.h	2004-12-25 05:34:57.000000000 +0800
-+++ linux-2.6.10/arch/um/include/frame_kern.h	2005-04-07 22:05:29.496758000 +0800
-@@ -6,8 +6,8 @@
- #ifndef __FRAME_KERN_H_
- #define __FRAME_KERN_H_
- 
--#include "frame.h"
--#include "sysdep/frame_kern.h"
-+#define _S(nr) (1<<((nr)-1))
-+#define _BLOCKABLE (~(_S(SIGKILL) | _S(SIGSTOP)))
- 
- extern int setup_signal_stack_sc(unsigned long stack_top, int sig, 
- 				 struct k_sigaction *ka,
-Index: linux-2.6.10/arch/um/include/ptrace_user.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/ptrace_user.h	2004-12-25 05:33:51.000000000 +0800
-+++ linux-2.6.10/arch/um/include/ptrace_user.h	2005-04-07 22:05:29.496758000 +0800
-@@ -26,4 +26,35 @@
- int get_using_sysemu(void);
- extern int sysemu_supported;
- 
-+
-+/* syscall emulation path in ptrace */
-+
-+#ifndef PTRACE_SYSEMU
-+#define PTRACE_SYSEMU 31
-+#endif
-+
-+/* On architectures, that started to support PTRACE_O_TRACESYSGOOD
-+ * in linux 2.4, there are two different definitions of
-+ * PTRACE_SETOPTIONS: linux 2.4 uses 21 while linux 2.6 uses 0x4200.
-+ * For binary compatibility, 2.6 also supports the old "21", named
-+ * PTRACE_OLDSETOPTION. On these architectures, UML always must use
-+ * "21", to ensure the kernel runs on 2.4 and 2.6 host without
-+ * recompilation. So, we use PTRACE_OLDSETOPTIONS in UML.
-+ * We also want to be able to build the kernel on 2.4, which doesn't
-+ * have PTRACE_OLDSETOPTIONS. So, if it is missing, we declare
-+ * PTRACE_OLDSETOPTIONS to to be the same as PTRACE_SETOPTIONS.
-+ *
-+ * On architectures, that start to support PTRACE_O_TRACESYSGOOD on
-+ * linux 2.6, PTRACE_OLDSETOPTIONS never is defined, and also isn't
-+ * supported by the host kernel. In that case, our trick lets us use
-+ * the new 0x4200 with the name PTRACE_OLDSETOPTIONS.
-+ */
-+#ifndef PTRACE_OLDSETOPTIONS
-+#define PTRACE_OLDSETOPTIONS PTRACE_SETOPTIONS
-+#endif
-+
-+void set_using_sysemu(int value);
-+int get_using_sysemu(void);
-+extern int sysemu_supported;
-+
- #endif
-Index: linux-2.6.10/arch/um/include/sysdep-i386/frame.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/sysdep-i386/frame.h	2004-12-25 05:35:01.000000000 +0800
-+++ linux-2.6.10/arch/um/include/sysdep-i386/frame.h	2005-04-07 19:34:21.197950744 +0800
-@@ -1,29 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#ifndef __FRAME_I386_H
--#define __FRAME_I386_H
--
--struct arch_frame_data_raw {
--	unsigned long fp_start;
--	unsigned long sr;
--};
--
--struct arch_frame_data {
--	int fpstate_size;
--};
--
--#endif
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/um/include/sysdep-i386/frame_kern.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/sysdep-i386/frame_kern.h	2004-12-25 05:34:26.000000000 +0800
-+++ linux-2.6.10/arch/um/include/sysdep-i386/frame_kern.h	2005-04-07 19:34:21.197950744 +0800
-@@ -1,69 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#ifndef __FRAME_KERN_I386_H
--#define __FRAME_KERN_I386_H
--
--/* This is called from sys_sigreturn.  It takes the sp at the point of the
-- * sigreturn system call and returns the address of the sigcontext struct
-- * on the stack.
-- */
--
--static inline void *sp_to_sc(unsigned long sp)
--{
--	return((void *) sp);
--}
--
--static inline void *sp_to_uc(unsigned long sp)
--{
--	unsigned long uc;
--
--	uc = sp + signal_frame_si.uc_index - 
--		signal_frame_si.common.sp_index - 4;
--	return((void *) uc);
--}
--
--static inline void *sp_to_rt_sc(unsigned long sp)
--{
--	unsigned long sc;
--
--	sc = sp - signal_frame_si.common.sp_index + 
--		signal_frame_si.common.len - 4;
--	return((void *) sc);
--}
--
--static inline void *sp_to_mask(unsigned long sp)
--{
--	unsigned long mask;
--
--	mask = sp - signal_frame_sc.common.sp_index + 
--		signal_frame_sc.common.len - 8;
--	return((void *) mask);
--}
--
--extern int sc_size(void *data);
--
--static inline void *sp_to_rt_mask(unsigned long sp)
--{
--	unsigned long mask;
--
--	mask = sp - signal_frame_si.common.sp_index + 
--		signal_frame_si.common.len + 
--		sc_size(&signal_frame_si.common.arch) - 4;
--	return((void *) mask);
--}
--
--#endif
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/um/include/sysdep-i386/frame_user.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/sysdep-i386/frame_user.h	2004-12-25 05:35:28.000000000 +0800
-+++ linux-2.6.10/arch/um/include/sysdep-i386/frame_user.h	2005-04-07 19:34:21.197950744 +0800
-@@ -1,91 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#ifndef __FRAME_USER_I386_H
--#define __FRAME_USER_I386_H
--
--#include <asm/page.h>
--#include "sysdep/frame.h"
--
--/* This stuff is to calculate the size of the fp state struct at runtime
-- * because it has changed between 2.2 and 2.4 and it would be good for a
-- * UML compiled on one to work on the other.
-- * So, setup_arch_frame_raw fills in the arch struct with the raw data, which
-- * just contains the address of the end of the sigcontext.  This is invoked
-- * from the signal handler.
-- * setup_arch_frame uses that data to figure out what 
-- * arch_frame_data.fpstate_size should be.  It really has no idea, since it's
-- * not allowed to do sizeof(struct fpstate) but it's safe to consider that it's
-- * everything from the end of the sigcontext up to the top of the stack.  So,
-- * it masks off the page number to get the offset within the page and subtracts
-- * that from the page size, and that's how big the fpstate struct will be
-- * considered to be.
-- */
--
--static inline void setup_arch_frame_raw(struct arch_frame_data_raw *data,
--					void *end, unsigned long srp)
--{
--	unsigned long sr = *((unsigned long *) srp);
--
--	data->fp_start = (unsigned long) end;
--	if((sr & PAGE_MASK) == ((unsigned long) end & PAGE_MASK))
--		data->sr = sr;
--	else data->sr = 0;
--}
--
--static inline void setup_arch_frame(struct arch_frame_data_raw *in, 
--				    struct arch_frame_data *out)
--{
--	unsigned long fpstate_start = in->fp_start;
--
--	if(in->sr == 0){
--		fpstate_start &= ~PAGE_MASK;
--		out->fpstate_size = PAGE_SIZE - fpstate_start;
--	}
--	else {
--		out->fpstate_size = in->sr - fpstate_start;
--	}
--}
--
--/* This figures out where on the stack the SA_RESTORER function address
-- * is stored.  For i386, it's the signal handler return address, so it's
-- * located next to the frame pointer.
-- * This is inlined, so __builtin_frame_address(0) is correct.  Otherwise,
-- * it would have to be __builtin_frame_address(1).
-- */
--
--#define frame_restorer() \
--({ \
--	unsigned long *fp; \
--\
--	fp = __builtin_frame_address(0); \
--	((unsigned long) (fp + 1)); \
--})
--
--/* Similarly, this returns the value of sp when the handler was first
-- * entered.  This is used to calculate the proper sp when delivering
-- * signals.
-- */
--
--#define frame_sp() \
--({ \
--	unsigned long *fp; \
--\
--	fp = __builtin_frame_address(0); \
--	((unsigned long) (fp + 1)); \
--})
--
--#endif
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/um/include/frame_user.h
-===================================================================
---- linux-2.6.10.orig/arch/um/include/frame_user.h	2004-12-25 05:33:50.000000000 +0800
-+++ linux-2.6.10/arch/um/include/frame_user.h	2005-04-07 19:34:21.197950744 +0800
-@@ -1,23 +0,0 @@
--/* 
-- * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-- * Licensed under the GPL
-- */
--
--#ifndef __FRAME_USER_H_
--#define __FRAME_USER_H_
--
--#include "sysdep/frame_user.h"
--#include "frame.h"
--
--#endif
--
--/*
-- * Overrides for Emacs so that we follow Linus's tabbing style.
-- * Emacs will notice this stuff at the end of the file and automatically
-- * adjust the settings for this buffer only.  This must remain at the end
-- * of the file.
-- * ---------------------------------------------------------------------------
-- * Local variables:
-- * c-file-style: "linux"
-- * End:
-- */
-Index: linux-2.6.10/arch/i386/kernel/ptrace.c
-===================================================================
---- linux-2.6.10.orig/arch/i386/kernel/ptrace.c	2004-12-25 05:34:29.000000000 +0800
-+++ linux-2.6.10/arch/i386/kernel/ptrace.c	2005-04-07 22:05:29.498757696 +0800
-@@ -15,6 +15,7 @@
- #include <linux/user.h>
- #include <linux/security.h>
- #include <linux/audit.h>
-+#include <linux/proc_mm.h>
- 
- #include <asm/uaccess.h>
- #include <asm/pgtable.h>
-@@ -406,15 +407,27 @@
- 		  }
- 		  break;
- 
-+ 	case PTRACE_SYSEMU: /* continue and stop at next syscall, which will not be executed */
- 	case PTRACE_SYSCALL:	/* continue and stop at next (return from) syscall */
- 	case PTRACE_CONT:	/* restart after signal. */
- 		ret = -EIO;
- 		if ((unsigned long) data > _NSIG)
- 			break;
-+		/* If we came here with PTRACE_SYSEMU and now continue with
-+		 * PTRACE_SYSCALL, entry.S used to intercept the syscall return.
-+		 * But it shouldn't!
-+		 * So we don't clear TIF_SYSCALL_EMU, which is always unused in
-+		 * this special case, to remember, we came from SYSEMU. That
-+		 * flag will be cleared by do_syscall_trace().
-+		 */
-+		if (request == PTRACE_SYSEMU) {
-+			set_tsk_thread_flag(child, TIF_SYSCALL_EMU);
-+		} else if (request == PTRACE_CONT) {
-+			clear_tsk_thread_flag(child, TIF_SYSCALL_EMU);
-+		}
- 		if (request == PTRACE_SYSCALL) {
- 			set_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
--		}
--		else {
-+		} else {
- 			clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- 		}
- 		child->exit_code = data;
-@@ -443,6 +456,8 @@
- 		ret = -EIO;
- 		if ((unsigned long) data > _NSIG)
- 			break;
-+		/*See do_syscall_trace to know why we don't clear
-+		 * TIF_SYSCALL_EMU.*/
- 		clear_tsk_thread_flag(child, TIF_SYSCALL_TRACE);
- 		set_singlestep(child);
- 		child->exit_code = data;
-@@ -542,6 +557,58 @@
- 					(struct user_desc __user *) data);
- 		break;
- 
-+#ifdef CONFIG_PROC_MM
-+	case PTRACE_FAULTINFO: {
-+		struct ptrace_faultinfo fault;
-+
-+		fault = ((struct ptrace_faultinfo)
-+			{ .is_write	= child->thread.error_code,
-+			  .addr		= child->thread.cr2 });
-+		ret = copy_to_user((unsigned long *) data, &fault,
-+				   sizeof(fault));
-+		if(ret)
-+			break;
-+		break;
-+	}
-+
-+	case PTRACE_SIGPENDING:
-+		ret = copy_to_user((unsigned long *) data,
-+				   &child->pending.signal,
-+				   sizeof(child->pending.signal));
-+		break;
-+
-+	case PTRACE_LDT: {
-+		struct ptrace_ldt ldt;
-+
-+		if(copy_from_user(&ldt, (unsigned long *) data,
-+				  sizeof(ldt))){
-+			ret = -EIO;
-+			break;
-+		}
-+		ret = __modify_ldt(child->mm, ldt.func, ldt.ptr, ldt.bytecount);
-+		break;
-+	}
-+
-+	case PTRACE_SWITCH_MM: {
-+		struct mm_struct *old = child->mm;
-+		struct mm_struct *new = proc_mm_get_mm(data);
-+
-+		if(IS_ERR(new)){
-+			ret = PTR_ERR(new);
-+			break;
-+		}
-+
-+		atomic_inc(&new->mm_users);
-+		task_lock(child);
-+		child->mm = new;
-+		child->active_mm = new;
-+		task_unlock(child);
-+		mmput(old);
-+		ret = 0;
-+		break;
-+	}
-+#endif
-+
- 	default:
- 		ret = ptrace_request(child, request, addr, data);
- 		break;
-@@ -557,8 +624,9 @@
-  * - triggered by current->work.syscall_trace
-  */
- __attribute__((regparm(3)))
--void do_syscall_trace(struct pt_regs *regs, int entryexit)
-+int do_syscall_trace(struct pt_regs *regs, int entryexit)
- {
-+	int is_sysemu, is_systrace, is_singlestep;
- 	if (unlikely(current->audit_context)) {
- 		if (!entryexit)
- 			audit_syscall_entry(current, regs->orig_eax,
-@@ -567,16 +635,27 @@
- 		else
- 			audit_syscall_exit(current, regs->eax);
- 	}
--
--	if (!test_thread_flag(TIF_SYSCALL_TRACE) &&
--	    !test_thread_flag(TIF_SINGLESTEP))
--		return;
-+	is_sysemu = test_thread_flag(TIF_SYSCALL_EMU);
-+	is_systrace = test_thread_flag(TIF_SYSCALL_TRACE);
-+	is_singlestep = test_thread_flag(TIF_SINGLESTEP);
-+
-+	if (!is_systrace && !is_singlestep && !is_sysemu)
-+		return 0;
-+	/* We can detect the case of coming from PTRACE_SYSEMU and now running
-+	 * with PTRACE_SYSCALL or PTRACE_SINGLESTEP, by TIF_SYSCALL_EMU being
-+	 * set additionally.
-+	 * If so let's reset the flag and return without action.
-+	 */
-+	if (is_sysemu && (is_systrace || is_singlestep)) {
-+		clear_thread_flag(TIF_SYSCALL_EMU);
-+		return 0;
-+	}
- 	if (!(current->ptrace & PT_PTRACED))
--		return;
-+		return 0;
- 	/* the 0x80 provides a way for the tracing parent to distinguish
- 	   between a syscall stop and SIGTRAP delivery */
- 	ptrace_notify(SIGTRAP | ((current->ptrace & PT_TRACESYSGOOD) &&
--				 !test_thread_flag(TIF_SINGLESTEP) ? 0x80 : 0));
-+				 !is_singlestep ? 0x80 : 0));
- 
- 	/*
- 	 * this isn't the same as continuing with a signal, but it will do
-@@ -587,4 +666,6 @@
- 		send_sig(current->exit_code, current, 1);
- 		current->exit_code = 0;
- 	}
-+	/* != 0 if nullifying the syscall, 0 if running it normally */
-+	return is_sysemu;
- }
-Index: linux-2.6.10/arch/i386/kernel/ldt.c
-===================================================================
---- linux-2.6.10.orig/arch/i386/kernel/ldt.c	2004-12-25 05:35:23.000000000 +0800
-+++ linux-2.6.10/arch/i386/kernel/ldt.c	2005-04-07 22:05:29.498757696 +0800
-@@ -18,6 +18,7 @@
- #include <asm/system.h>
- #include <asm/ldt.h>
- #include <asm/desc.h>
-+#include <asm/mmu_context.h>
- 
- #ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
- static void flush_ldt(void *null)
-@@ -27,11 +28,12 @@
- }
- #endif
- 
--static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
-+static int alloc_ldt(struct mm_struct *mm, int mincount, int reload)
- {
- 	void *oldldt;
- 	void *newldt;
- 	int oldsize;
-+	mm_context_t * pc = &mm->context;
- 
- 	if (mincount <= pc->size)
- 		return 0;
-@@ -58,13 +60,15 @@
- #ifdef CONFIG_SMP
- 		cpumask_t mask;
- 		preempt_disable();
--		load_LDT(pc);
-+		if (&current->active_mm->context == pc)
-+			load_LDT(pc);
- 		mask = cpumask_of_cpu(smp_processor_id());
--		if (!cpus_equal(current->mm->cpu_vm_mask, mask))
-+		if (!cpus_equal(mm->cpu_vm_mask, mask))
- 			smp_call_function(flush_ldt, NULL, 1, 1);
- 		preempt_enable();
- #else
--		load_LDT(pc);
-+		if (&current->active_mm->context == pc)
-+			load_LDT(pc);
- #endif
- 	}
- 	if (oldsize) {
-@@ -76,12 +80,12 @@
- 	return 0;
- }
- 
--static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
-+static inline int copy_ldt(struct mm_struct *new, struct mm_struct *old)
- {
--	int err = alloc_ldt(new, old->size, 0);
-+	int err = alloc_ldt(new, old->context.size, 0);
- 	if (err < 0)
- 		return err;
--	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
-+	memcpy(new->context.ldt, old->context.ldt, old->context.size*LDT_ENTRY_SIZE);
- 	return 0;
- }
- 
-@@ -89,22 +93,24 @@
-  * we do not have to muck with descriptors here, that is
-  * done in switch_mm() as needed.
-  */
--int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
-+int copy_context(struct mm_struct *mm, struct mm_struct *old_mm)
- {
--	struct mm_struct * old_mm;
- 	int retval = 0;
- 
--	init_MUTEX(&mm->context.sem);
--	mm->context.size = 0;
--	old_mm = current->mm;
- 	if (old_mm && old_mm->context.size > 0) {
- 		down(&old_mm->context.sem);
--		retval = copy_ldt(&mm->context, &old_mm->context);
-+		retval = copy_ldt(mm, old_mm);
- 		up(&old_mm->context.sem);
- 	}
- 	return retval;
- }
- 
-+int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
-+{
-+	init_new_empty_context(mm);
-+	return copy_context(mm, current->mm);
-+}
-+
- /*
-  * No need to lock the MM as we are the last user
-  */
-@@ -121,11 +127,11 @@
- 	}
- }
- 
--static int read_ldt(void __user * ptr, unsigned long bytecount)
-+static int read_ldt(struct mm_struct * mm, void __user * ptr,
-+		    unsigned long bytecount)
- {
- 	int err;
- 	unsigned long size;
--	struct mm_struct * mm = current->mm;
- 
- 	if (!mm->context.size)
- 		return 0;
-@@ -174,9 +180,8 @@
- 	return err;
- }
- 
--static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
-+static int write_ldt(struct mm_struct * mm, void __user * ptr, unsigned long bytecount, int oldmode)
- {
--	struct mm_struct * mm = current->mm;
- 	__u32 entry_1, entry_2, *lp;
- 	int error;
- 	struct user_desc ldt_info;
-@@ -200,7 +205,7 @@
- 
- 	down(&mm->context.sem);
- 	if (ldt_info.entry_number >= mm->context.size) {
--		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
-+		error = alloc_ldt(mm, ldt_info.entry_number+1, 1);
- 		if (error < 0)
- 			goto out_unlock;
- 	}
-@@ -233,23 +238,29 @@
- 	return error;
- }
- 
--asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
-+int __modify_ldt(struct mm_struct * mm, int func, void __user *ptr,
-+	       unsigned long bytecount)
- {
- 	int ret = -ENOSYS;
- 
- 	switch (func) {
- 	case 0:
--		ret = read_ldt(ptr, bytecount);
-+		ret = read_ldt(mm, ptr, bytecount);
- 		break;
- 	case 1:
--		ret = write_ldt(ptr, bytecount, 1);
-+		ret = write_ldt(mm, ptr, bytecount, 1);
- 		break;
- 	case 2:
- 		ret = read_default_ldt(ptr, bytecount);
- 		break;
- 	case 0x11:
--		ret = write_ldt(ptr, bytecount, 0);
-+		ret = write_ldt(mm, ptr, bytecount, 0);
- 		break;
- 	}
- 	return ret;
- }
-+
-+asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
-+{
-+	return __modify_ldt(current->mm, func, ptr, bytecount);
-+}
-Index: linux-2.6.10/arch/i386/kernel/sys_i386.c
-===================================================================
---- linux-2.6.10.orig/arch/i386/kernel/sys_i386.c	2004-12-25 05:35:39.000000000 +0800
-+++ linux-2.6.10/arch/i386/kernel/sys_i386.c	2005-04-07 22:05:29.499757544 +0800
-@@ -41,7 +41,7 @@
- }
- 
- /* common code for old and new mmaps */
--static inline long do_mmap2(
-+long do_mmap2(struct mm_struct *mm,
- 	unsigned long addr, unsigned long len,
- 	unsigned long prot, unsigned long flags,
- 	unsigned long fd, unsigned long pgoff)
-@@ -56,9 +56,9 @@
- 			goto out;
- 	}
- 
--	down_write(&current->mm->mmap_sem);
--	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
--	up_write(&current->mm->mmap_sem);
-+	down_write(&mm->mmap_sem);
-+	error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
-+	up_write(&mm->mmap_sem);
- 
- 	if (file)
- 		fput(file);
-@@ -70,7 +70,7 @@
- 	unsigned long prot, unsigned long flags,
- 	unsigned long fd, unsigned long pgoff)
- {
--	return do_mmap2(addr, len, prot, flags, fd, pgoff);
-+	return do_mmap2(current->mm, addr, len, prot, flags, fd, pgoff);
- }
- 
- /*
-@@ -101,7 +101,7 @@
- 	if (a.offset & ~PAGE_MASK)
- 		goto out;
- 
--	err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
-+	err = do_mmap2(current->mm, a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
- out:
- 	return err;
- }
-Index: linux-2.6.10/arch/i386/kernel/entry.S
-===================================================================
---- linux-2.6.10.orig/arch/i386/kernel/entry.S	2005-04-06 23:38:35.000000000 +0800
-+++ linux-2.6.10/arch/i386/kernel/entry.S	2005-04-07 22:05:29.499757544 +0800
-@@ -222,7 +222,7 @@
- 	SAVE_ALL
- 	GET_THREAD_INFO(%ebp)
- 
--	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
-+	testb $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
- 	jnz syscall_trace_entry
- 	cmpl $(nr_syscalls), %eax
- 	jae syscall_badsys
-@@ -245,8 +245,8 @@
- 	pushl %eax			# save orig_eax
- 	SAVE_ALL
- 	GET_THREAD_INFO(%ebp)
--					# system call tracing in operation
--	testb $(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
-+					# system call tracing in operation / emulation
-+	testb $(_TIF_SYSCALL_EMU|_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT),TI_flags(%ebp)
- 	jnz syscall_trace_entry
- 	cmpl $(nr_syscalls), %eax
- 	jae syscall_badsys
-@@ -307,6 +307,9 @@
- 	movl %esp, %eax
- 	xorl %edx,%edx
- 	call do_syscall_trace
-+	cmpl $0, %eax
-+	jne syscall_exit		# ret != 0 -> running under PTRACE_SYSEMU,
-+					# so must skip actual syscall
- 	movl ORIG_EAX(%esp), %eax
- 	cmpl $(nr_syscalls), %eax
- 	jnae syscall_call
-Index: linux-2.6.10/arch/i386/Kconfig
-===================================================================
---- linux-2.6.10.orig/arch/i386/Kconfig	2005-04-06 23:38:33.000000000 +0800
-+++ linux-2.6.10/arch/i386/Kconfig	2005-04-07 22:05:29.500757392 +0800
-@@ -738,6 +738,10 @@
- 	depends on HIGHMEM64G
- 	default y
- 
-+config PROC_MM
-+	bool "/proc/mm support"
-+	default y
-+
- # Common NUMA Features
- config NUMA
- 	bool "Numa Memory Allocation and Scheduler Support"
-Index: linux-2.6.10/fs/hostfs/hostfs.h
-===================================================================
---- linux-2.6.10.orig/fs/hostfs/hostfs.h	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/fs/hostfs/hostfs.h	2005-04-07 22:05:29.500757392 +0800
-@@ -16,9 +16,30 @@
- #define HOSTFS_ATTR_CTIME	64
- #define HOSTFS_ATTR_ATIME_SET	128
- #define HOSTFS_ATTR_MTIME_SET	256
-+
-+/* These two are unused by hostfs. */
- #define HOSTFS_ATTR_FORCE	512	/* Not a change, but a change it */
- #define HOSTFS_ATTR_ATTR_FLAG	1024
- 
-+/* If you are very careful, you'll notice that these two are missing:
-+ *
-+ * #define ATTR_KILL_SUID	2048
-+ * #define ATTR_KILL_SGID	4096
-+ *
-+ * and this is because they were added in 2.5 development in this patch:
-+ *
-+ * http://linux.bkbits.net:8080/linux-2.5/
-+ * cset@3caf4a12k4XgDzK7wyK-TGpSZ9u2Ww?nav=index.html
-+ * |src/.|src/include|src/include/linux|related/include/linux/fs.h
-+ *
-+ * Actually, they are not needed by most ->setattr() methods - they are set by
-+ * callers of notify_change() to notify that the setuid/setgid bits must be
-+ * dropped.
-+ * notify_change() will delete those flags, make sure attr->ia_valid & ATTR_MODE
-+ * is on, and remove the appropriate bits from attr->ia_mode (attr is a
-+ * "struct iattr *"). -BlaisorBlade
-+ */
-+
- struct hostfs_iattr {
- 	unsigned int	ia_valid;
- 	mode_t		ia_mode;
-Index: linux-2.6.10/fs/hostfs/hostfs_kern.c
-===================================================================
---- linux-2.6.10.orig/fs/hostfs/hostfs_kern.c	2004-12-25 05:34:01.000000000 +0800
-+++ linux-2.6.10/fs/hostfs/hostfs_kern.c	2005-04-07 22:05:29.501757240 +0800
-@@ -393,6 +393,7 @@
- static struct file_operations hostfs_file_fops = {
- 	.llseek		= generic_file_llseek,
- 	.read		= generic_file_read,
-+	.sendfile	= generic_file_sendfile,
- 	.write		= generic_file_write,
- 	.mmap		= generic_file_mmap,
- 	.open		= hostfs_file_open,
-@@ -818,6 +819,10 @@
- 	char *name;
- 	int err;
- 
-+	err = inode_change_ok(dentry->d_inode, attr);
-+	if (err)
-+		return err;
-+
- 	if(append)
- 		attr->ia_valid &= ~ATTR_SIZE;
- 
-Index: linux-2.6.10/kernel/fork.c
-===================================================================
---- linux-2.6.10.orig/kernel/fork.c	2005-04-06 23:38:35.000000000 +0800
-+++ linux-2.6.10/kernel/fork.c	2005-04-07 22:05:29.502757088 +0800
-@@ -927,6 +927,9 @@
- 	 * of CLONE_PTRACE.
- 	 */
- 	clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE);
-+#ifdef TIF_SYSCALL_EMU
-+	clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);
-+#endif
- 
- 	/* Our parent execution domain becomes current domain
- 	   These must match for thread signalling to apply */
-Index: linux-2.6.10/include/linux/ptrace.h
-===================================================================
---- linux-2.6.10.orig/include/linux/ptrace.h	2005-04-06 23:38:33.000000000 +0800
-+++ linux-2.6.10/include/linux/ptrace.h	2005-04-07 22:05:29.503756936 +0800
-@@ -20,6 +20,7 @@
- #define PTRACE_DETACH		0x11
- 
- #define PTRACE_SYSCALL		  24
-+#define PTRACE_SYSEMU		  31
- 
- /* 0x4200-0x4300 are reserved for architecture-independent additions.  */
- #define PTRACE_SETOPTIONS	0x4200
-Index: linux-2.6.10/include/linux/mm.h
-===================================================================
---- linux-2.6.10.orig/include/linux/mm.h	2005-04-06 23:38:33.000000000 +0800
-+++ linux-2.6.10/include/linux/mm.h	2005-04-07 22:05:29.503756936 +0800
-@@ -625,6 +625,9 @@
- extern struct shrinker *set_shrinker(int, shrinker_t);
- extern void remove_shrinker(struct shrinker *shrinker);
- 
-+extern long do_mprotect(struct mm_struct *mm, unsigned long start,
-+			size_t len, unsigned long prot);
-+
- /*
-  * On a two-level page table, this ends up being trivial. Thus the
-  * inlining and the symmetry break with pte_alloc_map() that does all
-@@ -684,9 +687,15 @@
- 
- extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
- 
--extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
-+extern unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file *file,
-+				   unsigned long addr, unsigned long len,
-+				   unsigned long prot, unsigned long flag,
-+				   unsigned long pgoff);
-+static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
- 	unsigned long len, unsigned long prot,
--	unsigned long flag, unsigned long pgoff);
-+	unsigned long flag, unsigned long pgoff) {
-+	return __do_mmap_pgoff(current->mm, file, addr, len, prot, flag, pgoff);
-+}
- 
- static inline unsigned long do_mmap(struct file *file, unsigned long addr,
- 	unsigned long len, unsigned long prot,
-Index: linux-2.6.10/include/linux/proc_mm.h
-===================================================================
---- linux-2.6.10.orig/include/linux/proc_mm.h	2005-04-07 19:34:21.197950744 +0800
-+++ linux-2.6.10/include/linux/proc_mm.h	2005-04-07 22:05:29.503756936 +0800
-@@ -0,0 +1,48 @@
-+/*
-+ * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
-+ * Licensed under the GPL
-+ */
-+
-+#ifndef __PROC_MM_H
-+#define __PROC_MM_H
-+
-+#include "linux/sched.h"
-+
-+#define MM_MMAP 54
-+#define MM_MUNMAP 55
-+#define MM_MPROTECT 56
-+#define MM_COPY_SEGMENTS 57
-+
-+struct mm_mmap {
-+	unsigned long addr;
-+	unsigned long len;
-+	unsigned long prot;
-+	unsigned long flags;
-+	unsigned long fd;
-+	unsigned long offset;
-+};
-+
-+struct mm_munmap {
-+	unsigned long addr;
-+	unsigned long len;
-+};
-+
-+struct mm_mprotect {
-+	unsigned long addr;
-+	unsigned long len;
-+        unsigned int prot;
-+};
-+
-+struct proc_mm_op {
-+	int op;
-+	union {
-+		struct mm_mmap mmap;
-+		struct mm_munmap munmap;
-+	        struct mm_mprotect mprotect;
-+		int copy_segments;
-+	} u;
-+};
-+
-+extern struct mm_struct *proc_mm_get_mm(int fd);
-+
-+#endif
-Index: linux-2.6.10/include/asm-um/elf.h
-===================================================================
---- linux-2.6.10.orig/include/asm-um/elf.h	2004-12-25 05:35:01.000000000 +0800
-+++ linux-2.6.10/include/asm-um/elf.h	2005-04-07 22:05:29.504756784 +0800
-@@ -3,7 +3,8 @@
- 
- #include "asm/archparam.h"
- 
--#define ELF_HWCAP (0)
-+extern long elf_aux_hwcap;
-+#define ELF_HWCAP (elf_aux_hwcap)
- 
- #define SET_PERSONALITY(ex, ibcs2) do ; while(0)
- 
-Index: linux-2.6.10/include/asm-um/archparam-i386.h
-===================================================================
---- linux-2.6.10.orig/include/asm-um/archparam-i386.h	2004-12-25 05:35:24.000000000 +0800
-+++ linux-2.6.10/include/asm-um/archparam-i386.h	2005-04-07 22:05:29.504756784 +0800
-@@ -10,7 +10,8 @@
- 
- #include "user.h"
- 
--#define ELF_PLATFORM "i586"
-+extern char * elf_aux_platform;
-+#define ELF_PLATFORM (elf_aux_platform)
- 
- #define ELF_ET_DYN_BASE (2 * TASK_SIZE / 3)
- 
-@@ -56,15 +57,13 @@
- 	pr_reg[16] = PT_REGS_SS(regs);		\
- } while(0);
- 
--#if 0 /* Turn this back on when UML has VSYSCALL working */
--#define VSYSCALL_BASE	(__fix_to_virt(FIX_VSYSCALL))
--#else
--#define VSYSCALL_BASE	0
--#endif
- 
--#define VSYSCALL_EHDR	((const struct elfhdr *) VSYSCALL_BASE)
--#define VSYSCALL_ENTRY	((unsigned long) &__kernel_vsyscall)
--extern void *__kernel_vsyscall;
-+extern unsigned long vsyscall_ehdr;
-+extern unsigned long vsyscall_end;
-+extern unsigned long __kernel_vsyscall;
-+
-+#define VSYSCALL_BASE vsyscall_ehdr
-+#define VSYSCALL_END vsyscall_end
- 
- /*
-  * Architecture-neutral AT_ values in 0-17, leave some room
-@@ -75,8 +74,10 @@
- 
- #define ARCH_DLINFO						\
- do {								\
--		NEW_AUX_ENT(AT_SYSINFO,	VSYSCALL_ENTRY);	\
--		NEW_AUX_ENT(AT_SYSINFO_EHDR, VSYSCALL_BASE);	\
-+	if ( vsyscall_ehdr ) {					\
-+		NEW_AUX_ENT(AT_SYSINFO,	__kernel_vsyscall);	\
-+		NEW_AUX_ENT(AT_SYSINFO_EHDR, vsyscall_ehdr);	\
-+	}							\
- } while (0)
- 
- /*
-@@ -87,22 +88,18 @@
-  * Dumping its extra ELF program headers includes all the other information
-  * a debugger needs to easily find how the vsyscall DSO was being used.
-  */
--#if 0
--#define ELF_CORE_EXTRA_PHDRS		(VSYSCALL_EHDR->e_phnum)
--#endif
--
--#undef ELF_CORE_EXTRA_PHDRS
-+#define ELF_CORE_EXTRA_PHDRS						      \
-+	(vsyscall_ehdr ? (((struct elfhdr *)vsyscall_ehdr)->e_phnum) : 0 )
- 
--#if 0
- #define ELF_CORE_WRITE_EXTRA_PHDRS					      \
--do {									      \
--	const struct elf_phdr *const vsyscall_phdrs =			      \
--		(const struct elf_phdr *) (VSYSCALL_BASE		      \
--					   + VSYSCALL_EHDR->e_phoff);	      \
-+if ( vsyscall_ehdr ) {							      \
-+	const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr;    \
-+	const struct elf_phdr *const phdrp =				      \
-+		(const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff);   \
- 	int i;								      \
- 	Elf32_Off ofs = 0;						      \
--	for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) {			      \
--		struct elf_phdr phdr = vsyscall_phdrs[i];		      \
-+	for (i = 0; i < ehdrp->e_phnum; ++i) {				      \
-+		struct elf_phdr phdr = phdrp[i];			      \
- 		if (phdr.p_type == PT_LOAD) {				      \
- 			ofs = phdr.p_offset = offset;			      \
- 			offset += phdr.p_filesz;			      \
-@@ -112,23 +109,19 @@
- 		phdr.p_paddr = 0; /* match other core phdrs */		      \
- 		DUMP_WRITE(&phdr, sizeof(phdr));			      \
- 	}								      \
--} while (0)
-+}
- #define ELF_CORE_WRITE_EXTRA_DATA					      \
--do {									      \
--	const struct elf_phdr *const vsyscall_phdrs =			      \
--		(const struct elf_phdr *) (VSYSCALL_BASE		      \
--					   + VSYSCALL_EHDR->e_phoff);	      \
-+if ( vsyscall_ehdr ) {							      \
-+	const struct elfhdr *const ehdrp = (struct elfhdr *)vsyscall_ehdr;    \
-+	const struct elf_phdr *const phdrp =				      \
-+		(const struct elf_phdr *) (vsyscall_ehdr + ehdrp->e_phoff);   \
- 	int i;								      \
--	for (i = 0; i < VSYSCALL_EHDR->e_phnum; ++i) {			      \
--		if (vsyscall_phdrs[i].p_type == PT_LOAD)		      \
--			DUMP_WRITE((void *) vsyscall_phdrs[i].p_vaddr,	      \
--				   vsyscall_phdrs[i].p_filesz);		      \
-+	for (i = 0; i < ehdrp->e_phnum; ++i) {				      \
-+		if (phdrp[i].p_type == PT_LOAD)				      \
-+			DUMP_WRITE((void *) phdrp[i].p_vaddr,		      \
-+				   phdrp[i].p_filesz);			      \
- 	}								      \
--} while (0)
--#endif
--
--#undef ELF_CORE_WRITE_EXTRA_PHDRS
--#undef ELF_CORE_WRITE_EXTRA_DATA
-+}
- 
- #define R_386_NONE	0
- #define R_386_32	1
-Index: linux-2.6.10/include/asm-um/fixmap.h
-===================================================================
---- linux-2.6.10.orig/include/asm-um/fixmap.h	2004-12-25 05:35:28.000000000 +0800
-+++ linux-2.6.10/include/asm-um/fixmap.h	2005-04-07 22:05:29.504756784 +0800
-@@ -3,6 +3,7 @@
- 
- #include <linux/config.h>
- #include <asm/kmap_types.h>
-+#include <asm/archparam.h>
- 
- /*
-  * Here we define all the compile-time 'special' virtual
-@@ -34,7 +35,6 @@
- 	FIX_KMAP_BEGIN,	/* reserved pte's for temporary kernel mappings */
- 	FIX_KMAP_END = FIX_KMAP_BEGIN+(KM_TYPE_NR*NR_CPUS)-1,
- #endif
--	FIX_VSYSCALL,
- 	__end_of_fixed_addresses
- };
- 
-@@ -68,8 +68,8 @@
-  * This is the range that is readable by user mode, and things
-  * acting like user mode such as get_user_pages.
-  */
--#define FIXADDR_USER_START	(__fix_to_virt(FIX_VSYSCALL))
--#define FIXADDR_USER_END	(FIXADDR_USER_START + PAGE_SIZE)
-+#define FIXADDR_USER_START	VSYSCALL_BASE
-+#define FIXADDR_USER_END	VSYSCALL_END
- 
- extern void __this_fixmap_does_not_exist(void);
- 
-Index: linux-2.6.10/include/asm-i386/thread_info.h
-===================================================================
---- linux-2.6.10.orig/include/asm-i386/thread_info.h	2004-12-25 05:34:00.000000000 +0800
-+++ linux-2.6.10/include/asm-i386/thread_info.h	2005-04-07 22:05:29.505756632 +0800
-@@ -139,6 +139,7 @@
- #define TIF_NEED_RESCHED	3	/* rescheduling necessary */
- #define TIF_SINGLESTEP		4	/* restore singlestep on return to user mode */
- #define TIF_IRET		5	/* return with iret */
-+#define TIF_SYSCALL_EMU		6	/* syscall emulation active */
- #define TIF_SYSCALL_AUDIT	7	/* syscall auditing active */
- #define TIF_POLLING_NRFLAG	16	/* true if poll_idle() is polling TIF_NEED_RESCHED */
- 
-@@ -148,12 +149,14 @@
- #define _TIF_NEED_RESCHED	(1<<TIF_NEED_RESCHED)
- #define _TIF_SINGLESTEP		(1<<TIF_SINGLESTEP)
- #define _TIF_IRET		(1<<TIF_IRET)
-+#define _TIF_SYSCALL_EMU	(1<<TIF_SYSCALL_EMU)
- #define _TIF_SYSCALL_AUDIT	(1<<TIF_SYSCALL_AUDIT)
- #define _TIF_POLLING_NRFLAG	(1<<TIF_POLLING_NRFLAG)
- 
- /* work to do on interrupt/exception return */
- #define _TIF_WORK_MASK \
--  (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP))
-+  (0x0000FFFF & ~(_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SINGLESTEP|\
-+		  _TIF_SYSCALL_EMU))
- #define _TIF_ALLWORK_MASK	0x0000FFFF	/* work to do on any return to u-space */
- 
- /*
-Index: linux-2.6.10/include/asm-i386/ptrace.h
-===================================================================
---- linux-2.6.10.orig/include/asm-i386/ptrace.h	2004-12-25 05:33:51.000000000 +0800
-+++ linux-2.6.10/include/asm-i386/ptrace.h	2005-04-07 22:05:29.505756632 +0800
-@@ -64,4 +64,26 @@
- #endif
- #endif
- 
-+/*For SKAS3 support.*/
-+#ifndef _LINUX_PTRACE_STRUCT_DEF
-+#define _LINUX_PTRACE_STRUCT_DEF
-+
-+#define PTRACE_FAULTINFO	  52
-+#define PTRACE_SIGPENDING	  53
-+#define PTRACE_LDT		  54
-+#define PTRACE_SWITCH_MM 	  55
-+
-+struct ptrace_faultinfo {
-+	int is_write;
-+	unsigned long addr;
-+};
-+
-+struct ptrace_ldt {
-+	int func;
-+  	void *ptr;
-+	unsigned long bytecount;
-+};
-+
-+#endif /*ifndef _LINUX_PTRACE_STRUCT_DEF*/
-+
- #endif
-Index: linux-2.6.10/include/asm-i386/mmu_context.h
-===================================================================
---- linux-2.6.10.orig/include/asm-i386/mmu_context.h	2004-12-25 05:33:48.000000000 +0800
-+++ linux-2.6.10/include/asm-i386/mmu_context.h	2005-04-07 22:05:29.505756632 +0800
-@@ -6,13 +6,25 @@
- #include <asm/atomic.h>
- #include <asm/pgalloc.h>
- #include <asm/tlbflush.h>
-+#include <asm/semaphore.h>
- 
- /*
-- * Used for LDT copy/destruction.
-+ * Used for LDT initialization/destruction. You cannot copy an LDT with
-+ * init_new_context, since it thinks you are passing it a new LDT and won't
-+ * deallocate its old content.
-  */
- int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
- void destroy_context(struct mm_struct *mm);
- 
-+/* LDT initialization for a clean environment - needed for SKAS.*/
-+static inline void init_new_empty_context(struct mm_struct *mm)
-+{
-+	init_MUTEX(&mm->context.sem);
-+	mm->context.size = 0;
-+}
-+
-+/* LDT copy for SKAS - for the above problem.*/
-+int copy_context(struct mm_struct *mm, struct mm_struct *old_mm);
- 
- static inline void enter_lazy_tlb(struct mm_struct *mm, struct task_struct *tsk)
- {
-@@ -29,6 +41,10 @@
- {
- 	int cpu = smp_processor_id();
- 
-+#ifdef CONFIG_SMP
-+	prev = per_cpu(cpu_tlbstate, cpu).active_mm;
-+#endif
-+
- 	if (likely(prev != next)) {
- 		/* stop flush ipis for the previous mm */
- 		cpu_clear(cpu, prev->cpu_vm_mask);
-@@ -50,7 +66,6 @@
- #ifdef CONFIG_SMP
- 	else {
- 		per_cpu(cpu_tlbstate, cpu).state = TLBSTATE_OK;
--		BUG_ON(per_cpu(cpu_tlbstate, cpu).active_mm != next);
- 
- 		if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) {
- 			/* We were in lazy tlb mode and leave_mm disabled 
-Index: linux-2.6.10/include/asm-i386/desc.h
-===================================================================
---- linux-2.6.10.orig/include/asm-i386/desc.h	2004-12-25 05:33:48.000000000 +0800
-+++ linux-2.6.10/include/asm-i386/desc.h	2005-04-07 22:05:29.505756632 +0800
-@@ -126,6 +126,9 @@
- 	put_cpu();
- }
- 
-+extern int __modify_ldt(struct mm_struct * mm, int func, void __user *ptr,
-+		      unsigned long bytecount);
-+
- #endif /* !__ASSEMBLY__ */
- 
- #endif
diff --git a/lustre/kernel_patches/patches/uml-exprt-clearuser.patch b/lustre/kernel_patches/patches/uml-exprt-clearuser.patch
deleted file mode 100644
index 22992c1da917ce3ee194aa58779710995c2e9980..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/uml-exprt-clearuser.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-Index: uml-2.4.24/arch/um/kernel/tt/ksyms.c
-===================================================================
---- uml-2.4.24.orig/arch/um/kernel/tt/ksyms.c	2005-05-04 13:59:58.000000000 +0300
-+++ uml-2.4.24/arch/um/kernel/tt/ksyms.c	2005-05-05 23:49:51.508354472 +0300
-@@ -12,6 +12,7 @@
- EXPORT_SYMBOL(__do_strncpy_from_user);
- EXPORT_SYMBOL(__do_strnlen_user); 
- EXPORT_SYMBOL(__do_clear_user);
-+EXPORT_SYMBOL(clear_user_tt);
- 
- EXPORT_SYMBOL(tracing_pid);
- EXPORT_SYMBOL(honeypot);
-Index: uml-2.4.24/arch/um/kernel/ksyms.c
-===================================================================
---- uml-2.4.24.orig/arch/um/kernel/ksyms.c	2005-05-04 13:54:24.000000000 +0300
-+++ uml-2.4.24/arch/um/kernel/ksyms.c	2005-05-05 23:50:19.649076432 +0300
-@@ -53,6 +53,7 @@
- #ifdef CONFIG_MODE_SKAS
- EXPORT_SYMBOL(copy_to_user_skas);
- EXPORT_SYMBOL(copy_from_user_skas);
-+EXPORT_SYMBOL(clear_user_skas);
- #endif
- 
- EXPORT_SYMBOL(os_stat_fd);
diff --git a/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch b/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch
deleted file mode 100644
index 449dd660ff0c2a9d4698518bc2a93c703aa01feb..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs-keep-inode-hashed-for-clear-inode.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/fs/inode.c.orig	2007-10-01 16:42:24.567821866 +0100
-+++ b/fs/inode.c	2007-10-01 16:43:30.022037788 +0100
-@@ -288,6 +288,12 @@
- 		if (inode->i_data.nrpages)
- 			truncate_inode_pages(&inode->i_data, 0);
- 		clear_inode(inode);
-+
-+		spin_lock(&inode_lock);
-+		hlist_del_init(&inode->i_hash);
-+		spin_unlock(&inode_lock);
-+
-+		wake_up_inode(inode);
- 		destroy_inode(inode);
- 		nr_disposed++;
- 	}
-@@ -317,7 +323,6 @@
- 		else {
- 			invalidate_inode_buffers(inode);
- 			if (!atomic_read(&inode->i_count)) {
--				hlist_del_init(&inode->i_hash);
- 				list_move(&inode->i_list, dispose);
- 				inode->i_state |= I_FREEING;
- 				count++;
-@@ -455,7 +460,6 @@
- 			if (!can_unuse(inode))
- 				continue;
- 		}
--		hlist_del_init(&inode->i_hash);
- 		list_move(&inode->i_list, &freeable);
- 		inode->i_state |= I_FREEING;
- 		nr_pruned++;
-
diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch
deleted file mode 100644
index 77631da1705284855ec3295ea81c5e03e6af8fd9..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-2.6-fc3.patch
+++ /dev/null
@@ -1,756 +0,0 @@
---- linux-2.6.10.orig/fs/exec.c
-+++ linux-2.6.10/fs/exec.c
-@@ -124,9 +124,10 @@
- 	struct file * file;
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_OPEN);
- 
--	nd.intent.open.flags = FMODE_READ;
--	error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
-+	nd.intent.it_flags = FMODE_READ|FMODE_EXEC;
-+	error = __user_walk_it(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -138,7 +139,7 @@
- 	if (error)
- 		goto exit;
- 
--	file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
-+	file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
- 	error = PTR_ERR(file);
- 	if (IS_ERR(file))
- 		goto out;
-@@ -485,8 +486,9 @@
- 	int err;
- 	struct file *file;
- 
--	nd.intent.open.flags = FMODE_READ;
--	err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
-+	intent_init(&nd.intent, IT_OPEN);
-+	nd.intent.it_flags = FMODE_READ|FMODE_EXEC;
-+	err = path_lookup(name, LOOKUP_FOLLOW, &nd);
- 	file = ERR_PTR(err);
- 
- 	if (!err) {
-@@ -499,7 +501,7 @@
- 				err = -EACCES;
- 			file = ERR_PTR(err);
- 			if (!err) {
--				file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
-+				file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
- 				if (!IS_ERR(file)) {
- 					err = deny_write_access(file);
- 					if (err) {
---- linux-2.6.10.orig/fs/inode.c
-+++ linux-2.6.10/fs/inode.c
-@@ -233,6 +233,7 @@
- 	inodes_stat.nr_unused--;
- }
- 
-+EXPORT_SYMBOL(__iget);
- /**
-  * clear_inode - clear an inode
-  * @inode: inode to clear
---- linux-2.6.10.orig/fs/namei.c
-+++ linux-2.6.10/fs/namei.c
-@@ -288,8 +288,19 @@
- 	return 0;
- }
- 
-+void intent_release(struct lookup_intent *it)
-+{
-+	if (!it)
-+		return;
-+	if (it->it_magic != INTENT_MAGIC)
-+		return;
-+	if (it->it_op_release)
-+		it->it_op_release(it);
-+}
-+
- void path_release(struct nameidata *nd)
- {
-+	intent_release(&nd->intent);
- 	dput(nd->dentry);
- 	mntput(nd->mnt);
- }
-@@ -379,7 +390,10 @@
- {
- 	struct dentry * result;
- 	struct inode *dir = parent->d_inode;
-+	int counter = 0;
- 
-+again:
-+	counter++;
- 	down(&dir->i_sem);
- 	/*
- 	 * First re-do the cached lookup just in case it was created
-@@ -418,7 +432,10 @@
- 	if (result->d_op && result->d_op->d_revalidate) {
- 		if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) {
- 			dput(result);
--			result = ERR_PTR(-ENOENT);
-+			if (counter > 10)
-+				result = ERR_PTR(-ESTALE);
-+			if (!IS_ERR(result))
-+				goto again;
- 		}
- 	}
- 	return result;
-@@ -449,6 +466,7 @@
- {
- 	int res = 0;
- 	char *name;
-+
- 	if (IS_ERR(link))
- 		goto fail;
- 
-@@ -458,6 +476,7 @@
- 			/* weird __emul_prefix() stuff did it */
- 			goto out;
- 	}
-+	intent_reset_fs_part(&nd->intent);
- 	res = link_path_walk(link, nd);
- out:
- 	if (nd->depth || res || nd->last_type!=LAST_NORM)
-@@ -666,6 +685,33 @@
- 	return PTR_ERR(dentry);
- }
- 
-+static int revalidate_special(struct nameidata *nd)
-+{
-+	struct dentry *dentry = nd->dentry;
-+	int err, counter = 0;
-+
-+ revalidate_again:
-+	if (!dentry->d_op || !dentry->d_op->d_revalidate)
-+		return 0;
-+	if (!dentry->d_op->d_revalidate(dentry, nd)) {
-+		struct dentry *new;
-+		if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd)))
-+			return err;
-+		new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
-+		if (IS_ERR(new))
-+			return PTR_ERR(new);
-+		d_invalidate(dentry);
-+		dput(dentry);
-+		nd->dentry = dentry = new;
-+		counter++;
-+		if (counter < 10)
-+			goto revalidate_again;
-+		//printk("excessive revalidate_it loops\n");
-+		return -ESTALE;
-+	}
-+	return 0;
-+}
-+
- /*
-  * Name resolution.
-  *
-@@ -767,8 +813,12 @@
- 			goto out_dput;
- 
- 		if (inode->i_op->follow_link) {
-+			int save_flags = nd->flags;
- 			mntget(next.mnt);
-+			nd->flags |= LOOKUP_LINK_NOTLAST;
- 			err = do_follow_link(next.dentry, nd);
-+			if (!(save_flags & LOOKUP_LINK_NOTLAST))
-+				nd->flags &= ~LOOKUP_LINK_NOTLAST;
- 			dput(next.dentry);
- 			mntput(next.mnt);
- 			if (err)
-@@ -807,14 +857,34 @@
- 				inode = nd->dentry->d_inode;
- 				/* fallthrough */
- 			case 1:
-+ 				nd->flags |= LOOKUP_LAST;
-+ 				err = revalidate_special(nd);
-+ 				nd->flags &= ~LOOKUP_LAST;
-+				if (!nd->dentry->d_inode)
-+					err = -ENOENT;
-+				if (err) {
-+ 					path_release(nd);
-+					goto return_err;
-+				}
-+				if (lookup_flags & LOOKUP_DIRECTORY) {
-+					err = -ENOTDIR;
-+					if (!nd->dentry->d_inode->i_op ||
-+					    !nd->dentry->d_inode->i_op->lookup){
-+						path_release(nd);
-+						goto return_err;
-+					}
-+				}
- 				goto return_reval;
- 		}
-+
- 		if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
- 			err = nd->dentry->d_op->d_hash(nd->dentry, &this);
- 			if (err < 0)
- 				break;
- 		}
-+		nd->flags |= LOOKUP_LAST;
- 		err = do_lookup(nd, &this, &next, atomic);
-+		nd->flags &= ~LOOKUP_LAST;
- 		if (err)
- 			break;
- 		follow_mount(&next.mnt, &next.dentry);
-@@ -1032,7 +1102,7 @@
- }
- 
- /* SMP-safe */
--struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
- {
- 	unsigned long hash;
- 	struct qstr this;
-@@ -1052,11 +1122,16 @@
- 	}
- 	this.hash = end_name_hash(hash);
- 
--	return lookup_hash(&this, base);
-+	return __lookup_hash(&this, base, nd);
- access:
- 	return ERR_PTR(-EACCES);
- }
- 
-+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+{
-+	return lookup_one_len_it(name, base, len, NULL);
-+}
-+
- /*
-  *	namei()
-  *
-@@ -1068,7 +1143,7 @@
-  * that namei follows links, while lnamei does not.
-  * SMP-safe
-  */
--int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
-+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)
- {
- 	char *tmp = getname(name);
- 	int err = PTR_ERR(tmp);
-@@ -1080,6 +1155,12 @@
- 	return err;
- }
- 
-+int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_it(name, flags, nd);
-+}
-+
- /*
-  * It's inline, so penalty for filesystems that don't use sticky bit is
-  * minimal.
-@@ -1363,8 +1444,8 @@
- 		acc_mode |= MAY_APPEND;
- 
- 	/* Fill in the open() intent data */
--	nd->intent.open.flags = flag;
--	nd->intent.open.create_mode = mode;
-+	nd->intent.it_flags = flag;
-+	nd->intent.it_create_mode = mode;
- 
- 	/*
- 	 * The simplest case - just a plain lookup.
-@@ -1379,6 +1460,7 @@
- 	/*
- 	 * Create - we need to know the parent.
- 	 */
-+	nd->intent.it_op |= IT_CREAT;
- 	error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
- 	if (error)
- 		return error;
-@@ -1395,7 +1477,9 @@
- 	dir = nd->dentry;
- 	nd->flags &= ~LOOKUP_PARENT;
- 	down(&dir->d_inode->i_sem);
-+	nd->flags |= LOOKUP_LAST;
- 	dentry = __lookup_hash(&nd->last, nd->dentry, nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 
- do_last:
- 	error = PTR_ERR(dentry);
-@@ -1508,7 +1592,9 @@
- 	}
- 	dir = nd->dentry;
- 	down(&dir->d_inode->i_sem);
-+	nd->flags |= LOOKUP_LAST;
- 	dentry = __lookup_hash(&nd->last, nd->dentry, nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	putname(nd->last.name);
- 	goto do_last;
- }
---- linux-2.6.10.orig/fs/namespace.c
-+++ linux-2.6.10/fs/namespace.c
-@@ -62,6 +62,7 @@
- 		INIT_LIST_HEAD(&mnt->mnt_mounts);
- 		INIT_LIST_HEAD(&mnt->mnt_list);
- 		INIT_LIST_HEAD(&mnt->mnt_fslink);
-+		INIT_LIST_HEAD(&mnt->mnt_lustre_list);
- 		if (name) {
- 			int size = strlen(name)+1;
- 			char *newname = kmalloc(size, GFP_KERNEL);
-@@ -113,6 +114,7 @@
- 
- static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)
- {
-+	memset(old_nd, 0, sizeof(*old_nd));
- 	old_nd->dentry = mnt->mnt_mountpoint;
- 	old_nd->mnt = mnt->mnt_parent;
- 	mnt->mnt_parent = mnt;
-@@ -176,6 +178,9 @@
- {
- 	struct super_block *sb = mnt->mnt_sb;
- 	dput(mnt->mnt_root);
-+	spin_lock(&dcache_lock);
-+	list_del(&mnt->mnt_lustre_list);
-+	spin_unlock(&dcache_lock);
- 	free_vfsmnt(mnt);
- 	deactivate_super(sb);
- }
-@@ -402,6 +407,8 @@
- 	 */
- 
- 	lock_kernel();
-+	if (sb->s_op->umount_lustre)
-+		sb->s_op->umount_lustre(sb);
- 	if( (flags&MNT_FORCE) && sb->s_op->umount_begin)
- 		sb->s_op->umount_begin(sb);
- 	unlock_kernel();
-@@ -627,6 +634,7 @@
- 		return err;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
-@@ -701,6 +709,7 @@
- 		return -EPERM;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
-@@ -1012,6 +1021,7 @@
- 	int retval = 0;
- 	int mnt_flags = 0;
- 
-+	intent_init(&nd.intent, IT_LOOKUP);
- 	/* Discard magic */
- 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
- 		flags &= ~MS_MGC_MSK;
---- linux-2.6.10.orig/fs/open.c
-+++ linux-2.6.10/fs/open.c
-@@ -216,12 +216,12 @@
- 	struct nameidata nd;
- 	struct inode * inode;
- 	int error;
--
-+	intent_init(&nd.intent, IT_GETATTR);
- 	error = -EINVAL;
- 	if (length < 0)	/* sorry, but loff_t says... */
- 		goto out;
- 
--	error = user_path_walk(path, &nd);
-+	error = user_path_walk_it(path, &nd);
- 	if (error)
- 		goto out;
- 	inode = nd.dentry->d_inode;
-@@ -475,6 +475,7 @@
- 	int old_fsuid, old_fsgid;
- 	kernel_cap_t old_cap;
- 	int res;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (mode & ~S_IRWXO)	/* where's F_OK, X_OK, W_OK, R_OK? */
- 		return -EINVAL;
-@@ -499,13 +500,14 @@
- 	else
- 		current->cap_effective = current->cap_permitted;
- 
--	res = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
-+	res = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
- 	if (!res) {
- 		res = permission(nd.dentry->d_inode, mode, &nd);
- 		/* SuS v2 requires we report a read only fs too */
- 		if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode)
- 		   && !special_file(nd.dentry->d_inode->i_mode))
- 			res = -EROFS;
-+
- 		path_release(&nd);
- 	}
- 
-@@ -520,8 +522,9 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -573,8 +576,9 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -758,8 +762,10 @@
- struct file *filp_open(const char * filename, int flags, int mode)
- {
- 	int namei_flags, error;
-+	struct file * temp_filp;
- 	struct nameidata nd;
- 
-+	intent_init(&nd.intent, IT_OPEN);
- 	namei_flags = flags;
- 	if ((namei_flags+1) & O_ACCMODE)
- 		namei_flags++;
-@@ -767,15 +773,26 @@
- 		namei_flags |= 2;
- 
- 	error = open_namei(filename, namei_flags, mode, &nd);
--	if (!error)
--		return dentry_open(nd.dentry, nd.mnt, flags);
--
-+	if (!error) {
-+		temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent);
-+		return temp_filp;
-+	}
- 	return ERR_PTR(error);
- }
- 
--EXPORT_SYMBOL(filp_open);
- 
- struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
-+ {
-+
-+	struct lookup_intent it;
-+	intent_init(&it, IT_LOOKUP);
-+
-+	return dentry_open_it(dentry, mnt, flags, &it);
-+}
-+
-+EXPORT_SYMBOL(dentry_open);
-+
-+struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags,struct lookup_intent *it)
- {
- 	struct file * f;
- 	struct inode *inode;
-@@ -787,6 +804,7 @@
- 		goto cleanup_dentry;
- 	f->f_flags = flags;
- 	f->f_mode = ((flags+1) & O_ACCMODE) | FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE;
-+	f->f_it = it;
- 	inode = dentry->d_inode;
- 	if (f->f_mode & FMODE_WRITE) {
- 		error = get_write_access(inode);
-@@ -805,6 +823,7 @@
- 		error = f->f_op->open(inode,f);
- 		if (error)
- 			goto cleanup_all;
-+		intent_release(it);
- 	}
- 	f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
- 
-@@ -830,13 +849,12 @@
- cleanup_file:
- 	put_filp(f);
- cleanup_dentry:
-+	intent_release(it);
- 	dput(dentry);
- 	mntput(mnt);
- 	return ERR_PTR(error);
- }
- 
--EXPORT_SYMBOL(dentry_open);
--
- /*
-  * Find an empty file descriptor entry, and mark it busy.
-  */
---- linux-2.6.10.orig/fs/stat.c
-+++ linux-2.6.10/fs/stat.c
-@@ -38,7 +38,7 @@
- 
- EXPORT_SYMBOL(generic_fillattr);
- 
--int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
- {
- 	struct inode *inode = dentry->d_inode;
- 	int retval;
-@@ -47,6 +47,8 @@
- 	if (retval)
- 		return retval;
- 
-+	if (inode->i_op->getattr_it)
-+		return inode->i_op->getattr_it(mnt, dentry, it, stat);
- 	if (inode->i_op->getattr)
- 		return inode->i_op->getattr(mnt, dentry, stat);
- 
-@@ -63,14 +65,20 @@
- 
- EXPORT_SYMBOL(vfs_getattr);
- 
-+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+{
-+	return vfs_getattr_it(mnt, dentry, NULL, stat);
-+}
-+
- int vfs_stat(char __user *name, struct kstat *stat)
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = user_path_walk(name, &nd);
-+	error = user_path_walk_it(name, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -82,10 +90,11 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = user_path_walk_link(name, &nd);
-+	error = user_path_walk_link_it(name, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -97,9 +106,12 @@
- {
- 	struct file *f = fget(fd);
- 	int error = -EBADF;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (f) {
--		error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
-+		error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
-+		intent_release(&nd.intent);
- 		fput(f);
- 	}
- 	return error;
---- linux-2.6.10.orig/include/linux/dcache.h
-+++ linux-2.6.10/include/linux/dcache.h
-@@ -4,6 +4,7 @@
- #ifdef __KERNEL__
- 
- #include <asm/atomic.h>
-+#include <linux/string.h>
- #include <linux/list.h>
- #include <linux/spinlock.h>
- #include <linux/cache.h>
-@@ -37,6 +38,8 @@
- 	const unsigned char *name;
- };
- 
-+#include <linux/namei.h>
-+
- struct dentry_stat_t {
- 	int nr_dentry;
- 	int nr_unused;
---- linux-2.6.10.orig/include/linux/fs.h
-+++ linux-2.6.10/include/linux/fs.h
-@@ -78,6 +78,7 @@
- 
- #define FMODE_READ 1
- #define FMODE_WRITE 2
-+#define FMODE_EXEC 4
- 
- /* Internal kernel extensions */
- #define FMODE_LSEEK	4
-@@ -262,6 +263,8 @@
- #define ATTR_ATTR_FLAG	1024
- #define ATTR_KILL_SUID	2048
- #define ATTR_KILL_SGID	4096
-+#define ATTR_RAW       	8192    /* file system, not vfs will massage attrs */
-+#define ATTR_FROM_OPEN 	16384    /* called from open path, ie O_TRUNC */
- 
- /*
-  * This is the Inode Attributes structure, used for notify_change().  It
-@@ -465,6 +468,7 @@
- 	struct block_device	*i_bdev;
- 	struct cdev		*i_cdev;
- 	int			i_cindex;
-+	void			*i_filterdata;
- 
- 	__u32			i_generation;
- 
-@@ -600,6 +604,7 @@
- 	spinlock_t		f_ep_lock;
- #endif /* #ifdef CONFIG_EPOLL */
- 	struct address_space	*f_mapping;
-+ 	struct lookup_intent    *f_it;
- };
- extern spinlock_t files_lock;
- #define file_list_lock() spin_lock(&files_lock);
-@@ -950,7 +955,9 @@
- 	void (*truncate) (struct inode *);
- 	int (*permission) (struct inode *, int, struct nameidata *);
- 	int (*setattr) (struct dentry *, struct iattr *);
-+	int (*setattr_raw) (struct inode *, struct iattr *);
- 	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
-+	int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
- 	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- 	ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
- 	ssize_t (*listxattr) (struct dentry *, char *, size_t);
-@@ -990,6 +997,7 @@
- 	int (*remount_fs) (struct super_block *, int *, char *);
- 	void (*clear_inode) (struct inode *);
- 	void (*umount_begin) (struct super_block *);
-+	void (*umount_lustre) (struct super_block *);
- 
- 	int (*show_options)(struct seq_file *, struct vfsmount *);
- };
-@@ -1181,6 +1189,7 @@
- extern struct vfsmount *kern_mount(struct file_system_type *);
- extern int may_umount_tree(struct vfsmount *);
- extern int may_umount(struct vfsmount *);
-+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
- extern long do_mount(char *, char *, char *, unsigned long, void *);
- 
- extern int vfs_statfs(struct super_block *, struct kstatfs *);
-@@ -1245,6 +1254,7 @@
- extern int do_truncate(struct dentry *, loff_t start);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
-+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
- extern int filp_close(struct file *, fl_owner_t id);
- extern char * getname(const char __user *);
- 
---- linux-2.6.10.orig/include/linux/mount.h
-+++ linux-2.6.10/include/linux/mount.h
-@@ -36,6 +36,8 @@
- 	struct list_head mnt_list;
- 	struct list_head mnt_fslink;	/* link in fs-specific expiry list */
- 	struct namespace *mnt_namespace; /* containing namespace */
-+	struct list_head mnt_lustre_list; /* GNS mount list */
-+	unsigned long mnt_last_used;	/* for GNS auto-umount (jiffies) */
- };
- 
- static inline struct vfsmount *mntget(struct vfsmount *mnt)
---- linux-2.6.10.orig/include/linux/namei.h
-+++ linux-2.6.10/include/linux/namei.h
-@@ -2,14 +2,55 @@
- #define _LINUX_NAMEI_H
- 
- #include <linux/linkage.h>
-+#include <linux/string.h>
- 
- struct vfsmount;
-+struct nameidata;
- 
--struct open_intent {
--	int	flags;
--	int	create_mode;
-+/* intent opcodes */
-+#define IT_OPEN		(1)
-+#define IT_CREAT	(1<<1)
-+#define IT_READDIR	(1<<2)
-+#define IT_GETATTR	(1<<3)
-+#define IT_LOOKUP	(1<<4)
-+#define IT_UNLINK	(1<<5)
-+#define IT_TRUNC	(1<<6)
-+#define IT_GETXATTR	(1<<7)
-+
-+struct lustre_intent_data {
-+	int	it_disposition;
-+	int	it_status;
-+	__u64	it_lock_handle;
-+	void	*it_data;
-+	int	it_lock_mode;
- };
- 
-+#define INTENT_MAGIC 0x19620323
-+struct lookup_intent {
-+	int	it_magic;
-+	void	(*it_op_release)(struct lookup_intent *);
-+	int	it_op;
-+	int	it_flags;
-+	int	it_create_mode;
-+	union {
-+		struct lustre_intent_data lustre;
-+	} d;
-+};
-+
-+static inline void intent_reset_fs_part(struct lookup_intent *it)
-+{
-+        memset(&it->d, 0, sizeof(it->d));
-+        it->it_magic = INTENT_MAGIC;
-+        it->it_op_release = NULL;
-+}
-+
-+static inline void intent_init(struct lookup_intent *it, int op)
-+{
-+	memset(it, 0, sizeof(*it));
-+	it->it_magic = INTENT_MAGIC;
-+	it->it_op = op;
-+}
-+
- enum { MAX_NESTED_LINKS = 8 };
- 
- struct nameidata {
-@@ -21,10 +62,7 @@
- 	unsigned	depth;
- 	char *saved_names[MAX_NESTED_LINKS + 1];
- 
--	/* Intent data */
--	union {
--		struct open_intent open;
--	} intent;
-+	struct lookup_intent intent;
- };
- 
- /*
-@@ -47,6 +85,8 @@
- #define LOOKUP_NOALT		32
- #define LOOKUP_ATOMIC		64
- #define LOOKUP_REVAL		128
-+#define LOOKUP_LAST		(0x1000)
-+#define LOOKUP_LINK_NOTLAST	(0x2000)
- 
- /*
-  * Intent data
-@@ -56,6 +96,12 @@
- #define LOOKUP_ACCESS		(0x0400)
- 
- extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
-+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd));
-+#define user_path_walk_it(name,nd) \
-+	__user_walk_it(name, LOOKUP_FOLLOW, nd)
-+#define user_path_walk_link_it(name,nd) \
-+	__user_walk_it(name, 0, nd)
-+extern void intent_release(struct lookup_intent *);
- #define user_path_walk(name,nd) \
- 	__user_walk(name, LOOKUP_FOLLOW, nd)
- #define user_path_walk_link(name,nd) \
-@@ -68,7 +114,6 @@
- 
- extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
- extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
--
- extern int follow_down(struct vfsmount **, struct dentry **);
- extern int follow_up(struct vfsmount **, struct dentry **);
- 
diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch
deleted file mode 100644
index e3a0f09318051c5cb1caacfae1a9d194773fe38c..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5-fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: linux-2.6.15.i686-cy/include/linux/dcache.h
-===================================================================
---- linux-2.6.15.i686-cy.orig/include/linux/dcache.h	2006-06-01 23:07:05.000000000 +0800
-+++ linux-2.6.15.i686-cy/include/linux/dcache.h	2006-06-01 23:10:21.000000000 +0800
-@@ -4,7 +4,6 @@
- #ifdef __KERNEL__
- 
- #include <asm/atomic.h>
--#include <linux/string.h>
- #include <linux/list.h>
- #include <linux/spinlock.h>
- #include <linux/cache.h>
-@@ -42,6 +41,7 @@
- 	const unsigned char *name;
- };
- 
-+struct inode;
- #include <linux/namei.h>
- 
- struct dentry_stat_t {
diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch
deleted file mode 100644
index ac628b922febb64f05e864cf582488ddda744ada..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-2.6-fc5.patch
+++ /dev/null
@@ -1,827 +0,0 @@
-Index: linux-2.6.15-fc5/fs/inode.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/inode.c	2006-05-31 04:08:19.000000000 +0800
-+++ linux-2.6.15-fc5/fs/inode.c	2006-05-31 17:24:35.000000000 +0800
-@@ -236,6 +236,7 @@
- 	inodes_stat.nr_unused--;
- }
- 
-+EXPORT_SYMBOL(__iget);
- /**
-  * clear_inode - clear an inode
-  * @inode: inode to clear
-Index: linux-2.6.15-fc5/fs/open.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/open.c	2006-05-31 04:08:39.000000000 +0800
-+++ linux-2.6.15-fc5/fs/open.c	2006-05-31 17:24:35.000000000 +0800
-@@ -224,12 +224,12 @@
- 	struct nameidata nd;
- 	struct inode * inode;
- 	int error;
--
-+	intent_init(&nd.intent, IT_GETATTR);
- 	error = -EINVAL;
- 	if (length < 0)	/* sorry, but loff_t says... */
- 		goto out;
- 
--	error = user_path_walk(path, &nd);
-+	error = user_path_walk_it(path, &nd);
- 	if (error)
- 		goto out;
- 	inode = nd.dentry->d_inode;
-@@ -488,6 +488,7 @@
- 	int old_fsuid, old_fsgid;
- 	kernel_cap_t old_cap;
- 	int res;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (mode & ~S_IRWXO)	/* where's F_OK, X_OK, W_OK, R_OK? */
- 		return -EINVAL;
-@@ -512,7 +513,7 @@
- 	else
- 		current->cap_effective = current->cap_permitted;
- 
--	res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
-+	res = __user_walk_fd_it(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
- 	if (!res) {
- 		res = vfs_permission(&nd, mode);
- 		/* SuS v2 requires we report a read only fs too */
-@@ -538,8 +539,9 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -591,8 +593,9 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -815,6 +818,7 @@
- 		error = open(inode, f);
- 		if (error)
- 			goto cleanup_all;
-+		intent_release(f->f_it);
- 	}
- 
- 	f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
-@@ -841,6 +845,7 @@
- 	f->f_dentry = NULL;
- 	f->f_vfsmnt = NULL;
- cleanup_file:
-+	intent_release(f->f_it);
- 	put_filp(f);
- 	dput(dentry);
- 	mntput(mnt);
-@@ -866,6 +871,7 @@
- {
- 	int namei_flags, error;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_OPEN);
- 
- 	namei_flags = flags;
- 	if ((namei_flags+1) & O_ACCMODE)
-@@ -902,19 +908,19 @@
- struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
- 		int (*open)(struct inode *, struct file *))
- {
--	if (IS_ERR(nd->intent.open.file))
-+	if (IS_ERR(nd->intent.file))
- 		goto out;
- 	if (IS_ERR(dentry))
- 		goto out_err;
--	nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt),
--					     nd->intent.open.flags - 1,
--					     nd->intent.open.file,
-+	nd->intent.file = __dentry_open(dget(dentry), mntget(nd->mnt),
-+					     nd->intent.flags - 1,
-+					     nd->intent.file,
- 					     open);
- out:
--	return nd->intent.open.file;
-+	return nd->intent.file;
- out_err:
- 	release_open_intent(nd);
--	nd->intent.open.file = (struct file *)dentry;
-+	nd->intent.file = (struct file *)dentry;
- 	goto out;
- }
- EXPORT_SYMBOL_GPL(lookup_instantiate_filp);
-@@ -931,7 +937,8 @@
- 	struct file *filp;
- 
- 	/* Pick up the filp from the open intent */
--	filp = nd->intent.open.file;
-+	filp = nd->intent.file;
-+	filp->f_it = &nd->intent; 
- 	/* Has the filesystem initialised the file for us? */
- 	if (filp->f_dentry == NULL)
- 		filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL);
-Index: linux-2.6.15-fc5/fs/nfsctl.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/nfsctl.c	2006-05-31 04:08:20.000000000 +0800
-+++ linux-2.6.15-fc5/fs/nfsctl.c	2006-05-31 17:24:35.000000000 +0800
-@@ -26,6 +26,7 @@
- 	struct nameidata nd;
- 	int error;
- 
-+	intent_init(&nd.intent, IT_OPEN);
- 	nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL);
- 
- 	if (IS_ERR(nd.mnt))
-Index: linux-2.6.15-fc5/fs/namei.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/namei.c	2006-05-31 04:08:33.000000000 +0800
-+++ linux-2.6.15-fc5/fs/namei.c	2006-05-31 17:24:35.000000000 +0800
-@@ -337,8 +337,19 @@
- 	return 0;
- }
- 
-+void intent_release(struct lookup_intent *it)
-+{
-+	if (!it)
-+		return;
-+	if (it->it_magic != INTENT_MAGIC)
-+		return;
-+	if (it->it_op_release)
-+		it->it_op_release(it);
-+}
-+
- void path_release(struct nameidata *nd)
- {
-+	intent_release(&nd->intent);
- 	dput(nd->dentry);
- 	mntput(nd->mnt);
- }
-@@ -359,10 +370,10 @@
-  */
- void release_open_intent(struct nameidata *nd)
- {
--	if (nd->intent.open.file->f_dentry == NULL)
--		put_filp(nd->intent.open.file);
-+	if (nd->intent.file->f_dentry == NULL)
-+		put_filp(nd->intent.file);
- 	else
--		fput(nd->intent.open.file);
-+		fput(nd->intent.file);
- }
- 
- /*
-@@ -440,8 +451,12 @@
- {
- 	struct dentry * result;
- 	struct inode *dir = parent->d_inode;
--
-+	int counter = 0;
-+	
- 	mutex_lock(&dir->i_mutex);
-+again:
-+	counter++;
-+
- 	/*
- 	 * First re-do the cached lookup just in case it was created
- 	 * while we waited for the directory semaphore..
-@@ -475,13 +490,16 @@
- 	 * Uhhuh! Nasty case: the cache was re-populated while
- 	 * we waited on the semaphore. Need to revalidate.
- 	 */
--	mutex_unlock(&dir->i_mutex);
- 	if (result->d_op && result->d_op->d_revalidate) {
- 		if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) {
- 			dput(result);
--			result = ERR_PTR(-ENOENT);
-+			if (counter > 10)
-+				result = ERR_PTR(-ESTALE);
-+			if (!IS_ERR(result))
-+				goto again;
- 		}
- 	}
-+	mutex_unlock(&dir->i_mutex);
- 	return result;
- }
- 
-@@ -509,7 +527,9 @@
- static __always_inline int __vfs_follow_link(struct nameidata *nd, const char *link)
- {
- 	int res = 0;
-+	struct lookup_intent it = nd->intent;
- 	char *name;
-+
- 	if (IS_ERR(link))
- 		goto fail;
- 
-@@ -519,6 +539,10 @@
- 			/* weird __emul_prefix() stuff did it */
- 			goto out;
- 	}
-+	intent_init(&nd->intent, it.it_op);
-+	nd->intent.it_flags = it.it_flags;
-+	nd->intent.it_create_mode = it.it_create_mode;
-+	nd->intent.file = it.file;
- 	res = link_path_walk(link, nd);
- out:
- 	if (nd->depth || res || nd->last_type!=LAST_NORM)
-@@ -772,6 +796,33 @@
- 	return PTR_ERR(dentry);
- }
- 
-+static int revalidate_special(struct nameidata *nd)
-+{
-+	struct dentry *dentry = nd->dentry;
-+	int err, counter = 0;
-+
-+ revalidate_again:
-+	if (!dentry->d_op || !dentry->d_op->d_revalidate)
-+		return 0;
-+	if (!dentry->d_op->d_revalidate(dentry, nd)) {
-+		struct dentry *new;
-+		if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd)))
-+			return err;
-+		new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
-+		if (IS_ERR(new))
-+			return PTR_ERR(new);
-+		d_invalidate(dentry);
-+		dput(dentry);
-+		nd->dentry = dentry = new;
-+		counter++;
-+		if (counter < 10)
-+			goto revalidate_again;
-+		//printk("excessive revalidate_it loops\n");
-+		return -ESTALE;
-+	}
-+	return 0;
-+}
-+
- /*
-  * Name resolution.
-  * This is the basic name resolution function, turning a pathname into
-@@ -870,7 +921,11 @@
- 			goto out_dput;
- 
- 		if (inode->i_op->follow_link) {
-+			int save_flags = nd->flags;
-+			nd->flags |= LOOKUP_LINK_NOTLAST;
- 			err = do_follow_link(&next, nd);
-+			if (!(save_flags & LOOKUP_LINK_NOTLAST))
-+				nd->flags &= ~LOOKUP_LINK_NOTLAST;
- 			if (err)
- 				goto return_err;
- 			err = -ENOENT;
-@@ -905,6 +960,23 @@
- 				inode = nd->dentry->d_inode;
- 				/* fallthrough */
- 			case 1:
-+				nd->flags |= LOOKUP_LAST;
-+				err = revalidate_special(nd);
-+				nd->flags &= ~LOOKUP_LAST;
-+				if (!nd->dentry->d_inode)
-+					err = -ENOENT;
-+				if (err) {
-+					path_release(nd);
-+					goto return_err;
-+				}
-+				if (lookup_flags & LOOKUP_DIRECTORY) {
-+					err = -ENOTDIR;
-+					if(!nd->dentry->d_inode->i_op ||
-+					  !nd->dentry->d_inode->i_op->lookup) {
-+						path_release(nd);
-+						goto return_err;
-+					}
-+				}
- 				goto return_reval;
- 		}
- 		if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
-@@ -912,7 +984,9 @@
- 			if (err < 0)
- 				break;
- 		}
-+		nd->flags |= LOOKUP_LAST;
- 		err = do_lookup(nd, &this, &next, atomic);
-+		nd->flags &= ~LOOKUP_LAST;
- 		if (err)
- 			break;
- 		inode = next.dentry->d_inode;
-@@ -1154,13 +1228,13 @@
- 
- 	if (filp == NULL)
- 		return -ENFILE;
--	nd->intent.open.file = filp;
--	nd->intent.open.flags = open_flags;
--	nd->intent.open.create_mode = create_mode;
-+	nd->intent.file = filp;
-+	nd->intent.flags = open_flags;
-+	nd->intent.create_mode = create_mode;
- 	err = do_path_lookup(dfd, name, lookup_flags|LOOKUP_OPEN, nd);
--	if (IS_ERR(nd->intent.open.file)) {
-+	if (IS_ERR(nd->intent.file)) {
- 		if (err == 0) {
--			err = PTR_ERR(nd->intent.open.file);
-+			err = PTR_ERR(nd->intent.file);
- 			path_release(nd);
- 		}
- 	} else if (err != 0)
-@@ -1263,7 +1337,7 @@
- }
- 
- /* SMP-safe */
--struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
- {
- 	unsigned long hash;
- 	struct qstr this;
-@@ -1283,11 +1357,17 @@
- 	}
- 	this.hash = end_name_hash(hash);
- 
--	return __lookup_hash(&this, base, NULL);
-+	return __lookup_hash(&this, base, nd);
- access:
- 	return ERR_PTR(-EACCES);
- }
- 
-+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+{
-+ 	return lookup_one_len_it(name, base, len, NULL);
-+}
-+
-+
- /*
-  *	namei()
-  *
-@@ -1299,8 +1379,9 @@
-  * that namei follows links, while lnamei does not.
-  * SMP-safe
-  */
--int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags,
--			    struct nameidata *nd)
-+
-+int fastcall __user_walk_fd_it(int dfd, const char __user *name, unsigned flags,
-+			       struct nameidata *nd)
- {
- 	char *tmp = getname(name);
- 	int err = PTR_ERR(tmp);
-@@ -1312,9 +1393,22 @@
- 	return err;
- }
- 
-+int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags,
-+			    struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_fd_it(dfd, name, flags, nd);	
-+}
-+
-+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)
-+{
-+	return __user_walk_fd_it(AT_FDCWD, name, flags, nd);
-+}
-+
- int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
- {
--	return __user_walk_fd(AT_FDCWD, name, flags, nd);
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_it(name, flags, nd);
- }
- 
- /*
-@@ -1596,6 +1690,8 @@
- 	if (flag & O_APPEND)
- 		acc_mode |= MAY_APPEND;
- 
-+ 	nd->intent.it_flags = flag;
-+ 	nd->intent.it_create_mode = mode;
- 	/*
- 	 * The simplest case - just a plain lookup.
- 	 */
-@@ -1610,6 +1706,7 @@
- 	/*
- 	 * Create - we need to know the parent.
- 	 */
-+ 	nd->intent.it_op |= IT_CREAT;
- 	error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode);
- 	if (error)
- 		return error;
-@@ -1626,7 +1723,9 @@
- 	dir = nd->dentry;
- 	nd->flags &= ~LOOKUP_PARENT;
- 	mutex_lock(&dir->d_inode->i_mutex);
-+	nd->flags |= LOOKUP_LAST;
- 	path.dentry = lookup_hash(nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	path.mnt = nd->mnt;
- 
- do_last:
-@@ -1685,7 +1784,7 @@
- exit_dput:
- 	dput_path(&path, nd);
- exit:
--	if (!IS_ERR(nd->intent.open.file))
-+	if (!IS_ERR(nd->intent.file))
- 		release_open_intent(nd);
- 	path_release(nd);
- 	return error;
-@@ -1728,7 +1827,9 @@
- 	}
- 	dir = nd->dentry;
- 	mutex_lock(&dir->d_inode->i_mutex);
-+	nd->flags |= LOOKUP_LAST;
- 	path.dentry = lookup_hash(nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	path.mnt = nd->mnt;
- 	__putname(nd->last.name);
- 	goto do_last;
-@@ -2240,6 +2341,8 @@
- 	int error;
- 	char * to;
- 
-+	intent_init(&nd.intent, IT_LOOKUP);
-+        intent_init(&old_nd.intent, IT_LOOKUP);
- 	if (flags != 0)
- 		return -EINVAL;
- 
-@@ -2247,7 +2350,7 @@
- 	if (IS_ERR(to))
- 		return PTR_ERR(to);
- 
--	error = __user_walk_fd(olddfd, oldname, 0, &old_nd);
-+	error = __user_walk_fd_it(olddfd, oldname, 0, &old_nd);
- 	if (error)
- 		goto exit;
- 	error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
-Index: linux-2.6.15-fc5/fs/stat.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/stat.c	2006-05-31 04:08:20.000000000 +0800
-+++ linux-2.6.15-fc5/fs/stat.c	2006-05-31 17:24:35.000000000 +0800
-@@ -38,7 +38,7 @@
- 
- EXPORT_SYMBOL(generic_fillattr);
- 
--int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
- {
- 	struct inode *inode = dentry->d_inode;
- 	int retval;
-@@ -47,6 +47,8 @@
- 	if (retval)
- 		return retval;
- 
-+	if (inode->i_op->getattr_it)
-+		return inode->i_op->getattr_it(mnt, dentry, it, stat);
- 	if (inode->i_op->getattr)
- 		return inode->i_op->getattr(mnt, dentry, stat);
- 
-@@ -61,6 +63,11 @@
- 	return 0;
- }
- 
-+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+{
-+	return vfs_getattr_it(mnt, dentry, NULL, stat);
-+}
-+
- EXPORT_SYMBOL(vfs_getattr);
- 
- int vfs_stat_fd(int dfd, char __user *name, struct kstat *stat)
-@@ -68,9 +75,10 @@
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd);
-+ 	intent_init(&nd.intent, IT_GETATTR);
-+	error = __user_walk_fd_it(dfd, name, LOOKUP_FOLLOW, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+ 		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -88,9 +96,10 @@
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_walk_fd(dfd, name, 0, &nd);
-+ 	intent_init(&nd.intent, IT_GETATTR);
-+	error = __user_walk_fd_it(dfd, name, 0, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+ 		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -107,9 +116,12 @@
- {
- 	struct file *f = fget(fd);
- 	int error = -EBADF;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (f) {
--		error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
-+		error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
-+		intent_release(&nd.intent);
- 		fput(f);
- 	}
- 	return error;
-Index: linux-2.6.15-fc5/fs/namespace.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/namespace.c	2006-05-31 04:08:33.000000000 +0800
-+++ linux-2.6.15-fc5/fs/namespace.c	2006-05-31 17:24:35.000000000 +0800
-@@ -74,6 +74,7 @@
- 		INIT_LIST_HEAD(&mnt->mnt_share);
- 		INIT_LIST_HEAD(&mnt->mnt_slave_list);
- 		INIT_LIST_HEAD(&mnt->mnt_slave);
-+		INIT_LIST_HEAD(&mnt->mnt_lustre_list);	
- 		if (name) {
- 			int size = strlen(name) + 1;
- 			char *newname = kmalloc(size, GFP_KERNEL);
-@@ -154,6 +155,7 @@
- 
- static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)
- {
-+	memset(old_nd, 0, sizeof(*old_nd));
- 	old_nd->dentry = mnt->mnt_mountpoint;
- 	old_nd->mnt = mnt->mnt_parent;
- 	mnt->mnt_parent = mnt;
-@@ -272,6 +274,9 @@
- {
- 	struct super_block *sb = mnt->mnt_sb;
- 	dput(mnt->mnt_root);
-+	spin_lock(&dcache_lock);
-+	list_del(&mnt->mnt_lustre_list);
-+	spin_unlock(&dcache_lock);
- 	free_vfsmnt(mnt);
- 	deactivate_super(sb);
- }
-@@ -538,6 +543,8 @@
- 	 */
- 
- 	lock_kernel();
-+ 	if (sb->s_op->umount_lustre)
-+ 		sb->s_op->umount_lustre(sb);
- 	if ((flags & MNT_FORCE) && sb->s_op->umount_begin)
- 		sb->s_op->umount_begin(sb);
- 	unlock_kernel();
-@@ -870,6 +877,7 @@
- 		return err;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
-@@ -955,6 +963,7 @@
- 		return -EPERM;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
-@@ -1270,6 +1279,7 @@
- 	int retval = 0;
- 	int mnt_flags = 0;
- 
-+	intent_init(&nd.intent, IT_LOOKUP);
- 	/* Discard magic */
- 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
- 		flags &= ~MS_MGC_MSK;
-Index: linux-2.6.15-fc5/fs/exec.c
-===================================================================
---- linux-2.6.15-fc5.orig/fs/exec.c	2006-05-31 04:08:33.000000000 +0800
-+++ linux-2.6.15-fc5/fs/exec.c	2006-05-31 17:24:35.000000000 +0800
-@@ -127,7 +127,9 @@
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
-+ 	intent_init(&nd.intent, IT_OPEN);
-+	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, 
-+					FMODE_READ | FMODE_EXEC);
- 	if (error)
- 		goto out;
- 
-@@ -477,7 +479,9 @@
- 	int err;
- 	struct file *file;
- 
--	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ);
-+ 	intent_init(&nd.intent, IT_OPEN);
-+	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, 
-+			       FMODE_READ | FMODE_EXEC);
- 	file = ERR_PTR(err);
- 
- 	if (!err) {
-Index: linux-2.6.15-fc5/include/linux/dcache.h
-===================================================================
---- linux-2.6.15-fc5.orig/include/linux/dcache.h	2006-05-31 04:08:33.000000000 +0800
-+++ linux-2.6.15-fc5/include/linux/dcache.h	2006-05-31 17:24:41.000000000 +0800
-@@ -4,6 +4,7 @@
- #ifdef __KERNEL__
- 
- #include <asm/atomic.h>
-+#include <linux/string.h>
- #include <linux/list.h>
- #include <linux/spinlock.h>
- #include <linux/cache.h>
-@@ -36,6 +37,8 @@
- 	const unsigned char *name;
- };
- 
-+#include <linux/namei.h>
-+
- struct dentry_stat_t {
- 	int nr_dentry;
- 	int nr_unused;
-Index: linux-2.6.15-fc5/include/linux/fs.h
-===================================================================
---- linux-2.6.15-fc5.orig/include/linux/fs.h	2006-05-31 04:08:33.000000000 +0800
-+++ linux-2.6.15-fc5/include/linux/fs.h	2006-05-31 17:24:35.000000000 +0800
-@@ -59,6 +59,7 @@
- 
- #define FMODE_READ 1
- #define FMODE_WRITE 2
-+#define FMODE_EXEC 4
- 
- /* Internal kernel extensions */
- #define FMODE_LSEEK	4
-@@ -265,6 +266,8 @@
- #define ATTR_KILL_SUID	2048
- #define ATTR_KILL_SGID	4096
- #define ATTR_FILE	8192
-+#define ATTR_RAW       	16384    /* file system, not vfs will massage attrs */
-+#define ATTR_FROM_OPEN 	32768    /* called from open path, ie O_TRUNC */
- 
- /*
-  * This is the Inode Attributes structure, used for notify_change().  It
-@@ -499,6 +502,7 @@
- 	struct block_device	*i_bdev;
- 	struct cdev		*i_cdev;
- 	int			i_cindex;
-+	void			*i_filterdata;
- 
- 	__u32			i_generation;
- 
-@@ -646,6 +650,7 @@
- 	spinlock_t		f_ep_lock;
- #endif /* #ifdef CONFIG_EPOLL */
- 	struct address_space	*f_mapping;
-+ 	struct lookup_intent    *f_it;
- };
- extern spinlock_t files_lock;
- #define file_list_lock() spin_lock(&files_lock);
-@@ -1043,7 +1048,9 @@
- 	void (*truncate) (struct inode *);
- 	int (*permission) (struct inode *, int, struct nameidata *);
- 	int (*setattr) (struct dentry *, struct iattr *);
-+	int (*setattr_raw) (struct inode *, struct iattr *);
- 	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
-+	int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
- 	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- 	ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
- 	ssize_t (*listxattr) (struct dentry *, char *, size_t);
-@@ -1084,6 +1091,7 @@
- 	int (*remount_fs) (struct super_block *, int *, char *);
- 	void (*clear_inode) (struct inode *);
- 	void (*umount_begin) (struct super_block *);
-+	void (*umount_lustre) (struct super_block *);
- 
- 	int (*show_options)(struct seq_file *, struct vfsmount *);
- 
-@@ -1286,6 +1294,7 @@
- extern int may_umount(struct vfsmount *);
- extern void umount_tree(struct vfsmount *, int, struct list_head *);
- extern void release_mounts(struct list_head *);
-+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
- extern long do_mount(char *, char *, char *, unsigned long, void *);
- extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
- extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
-@@ -1347,6 +1356,7 @@
- 			int mode);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
-+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
- extern int filp_close(struct file *, fl_owner_t id);
- extern char * getname(const char __user *);
- 
-Index: linux-2.6.15-fc5/include/linux/namei.h
-===================================================================
---- linux-2.6.15-fc5.orig/include/linux/namei.h	2006-05-31 04:08:39.000000000 +0800
-+++ linux-2.6.15-fc5/include/linux/namei.h	2006-05-31 17:24:35.000000000 +0800
-@@ -5,10 +5,39 @@
- 
- struct vfsmount;
- 
-+#define IT_OPEN                (1)
-+#define IT_CREAT       (1<<1)
-+#define IT_READDIR     (1<<2)
-+#define IT_GETATTR     (1<<3)
-+#define IT_LOOKUP      (1<<4)
-+#define IT_UNLINK      (1<<5)
-+#define IT_TRUNC       (1<<6)
-+#define IT_GETXATTR    (1<<7)
-+
-+struct lustre_intent_data {
-+	int     it_disposition;
-+	int     it_status;
-+	__u64   it_lock_handle;
-+	void    *it_data;
-+	int     it_lock_mode;
-+};
-+
-+#define INTENT_MAGIC 0x19620323
-+
-+#define it_flags flags
-+#define it_create_mode create_mode
-+#define lookup_intent open_intent
-+
- struct open_intent {
--	int	flags;
--	int	create_mode;
--	struct file *file;
-+       	int     it_magic;
-+       	void    (*it_op_release)(struct open_intent *);
-+       	int     it_op;
-+       	int     flags;
-+       	int     create_mode;
-+	struct  file *file;
-+       	union {
-+                struct lustre_intent_data lustre;
-+       	} d;
- };
- 
- enum { MAX_NESTED_LINKS = 8 };
-@@ -22,12 +51,16 @@
- 	unsigned	depth;
- 	char *saved_names[MAX_NESTED_LINKS + 1];
- 
--	/* Intent data */
--	union {
--		struct open_intent open;
--	} intent;
-+	struct lookup_intent intent;
- };
- 
-+static inline void intent_init(struct lookup_intent *it, int op)
-+{
-+	memset(it, 0, sizeof(*it));
-+	it->it_magic = INTENT_MAGIC;
-+	it->it_op = op;
-+}
-+
- /*
-  * Type of the last component on LOOKUP_PARENT
-  */
-@@ -49,7 +82,8 @@
- #define LOOKUP_NOALT		32
- #define LOOKUP_REVAL		64
- #define LOOKUP_ATOMIC		128
--
-+#define LOOKUP_LAST		(0x1000)
-+#define LOOKUP_LINK_NOTLAST	(0x2000)
- /*
-  * Intent data
-  */
-@@ -59,10 +93,19 @@
- 
- extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
- extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *));
-+extern int FASTCALL(__user_walk_fd_it(int dfd, const char __user *, unsigned, struct nameidata *));
- #define user_path_walk(name,nd) \
- 	__user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd)
- #define user_path_walk_link(name,nd) \
- 	__user_walk_fd(AT_FDCWD, name, 0, nd)
-+
-+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd));
-+#define user_path_walk_it(name,nd) \
-+ 	__user_walk_it(name, LOOKUP_FOLLOW, nd)
-+#define user_path_walk_link_it(name,nd) \
-+ 	__user_walk_it(name, 0, nd)
-+extern void intent_release(struct lookup_intent *);
-+
- extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
- extern int FASTCALL(path_walk(const char *, struct nameidata *));
- extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
-Index: linux-2.6.15-fc5/include/linux/mount.h
-===================================================================
---- linux-2.6.15-fc5.orig/include/linux/mount.h	2006-05-31 04:08:22.000000000 +0800
-+++ linux-2.6.15-fc5/include/linux/mount.h	2006-05-31 17:24:35.000000000 +0800
-@@ -46,6 +46,8 @@
- 	struct list_head mnt_slave;	/* slave list entry */
- 	struct vfsmount *mnt_master;	/* slave is on master->mnt_slave_list */
- 	struct namespace *mnt_namespace; /* containing namespace */
-+ 	struct list_head mnt_lustre_list; /* GNS mount list */
-+ 	unsigned long mnt_last_used;	/* for GNS auto-umount (jiffies) */
- 	int mnt_pinned;
- };
- 
diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch
deleted file mode 100644
index 66e65fb09a82769cdea2055c7bb2b5ed712ba9b4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch
+++ /dev/null
@@ -1,1461 +0,0 @@
-diff -rup RH_2_6_9_55.orig/fs/cifs/dir.c RH_2_6_9_55/fs/cifs/dir.c
---- RH_2_6_9_55.orig/fs/cifs/dir.c
-+++ RH_2_6_9_55/fs/cifs/dir.c
-@@ -157,11 +157,7 @@ cifs_create(struct inode *inode, struct 
-
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
-	if(nd && (nd->flags & LOOKUP_OPEN)) {
--#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5) /* SUSE included Lustre patch */
-		int oflags = nd->intent.it_flags;
--#else
--		int oflags = nd->intent.open.flags;
--#endif
-
-		desiredAccess = 0;
-		if (oflags & FMODE_READ)
-diff -rup RH_2_6_9_55.orig/fs/exec.c RH_2_6_9_55/fs/exec.c
---- RH_2_6_9_55.orig/fs/exec.c
-+++ RH_2_6_9_55/fs/exec.c
-@@ -126,9 +126,10 @@ asmlinkage long sys_uselib(const char __
- 	struct file * file;
- 	struct nameidata nd;
- 	int error;
--
--	nd.intent.open.flags = FMODE_READ|FMODE_EXEC;
--	error = __user_walk(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
-+	intent_init(&nd.intent, IT_OPEN);
-+  
-+	nd.intent.it_flags = FMODE_READ|FMODE_EXEC;
-+	error = __user_walk_it(library, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -140,7 +141,7 @@ asmlinkage long sys_uselib(const char __
- 	if (error)
- 		goto exit;
- 
--	file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
-+	file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
- 	error = PTR_ERR(file);
- 	if (IS_ERR(file))
- 		goto out;
-@@ -489,8 +490,9 @@ struct file *open_exec(const char *name)
- 	int err;
- 	struct file *file;
- 
--	nd.intent.open.flags = FMODE_READ|FMODE_EXEC;
--	err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
-+	intent_init(&nd.intent, IT_OPEN);
-+	nd.intent.it_flags = FMODE_READ|FMODE_EXEC;
-+	err = path_lookup_it(name, LOOKUP_FOLLOW, &nd);
- 	file = ERR_PTR(err);
- 
- 	if (!err) {
-@@ -501,7 +503,7 @@ struct file *open_exec(const char *name)
-			int err = permission(inode, MAY_EXEC, &nd);
- 			file = ERR_PTR(err);
- 			if (!err) {
--				file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
-+				file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
- 				if (!IS_ERR(file)) {
- 					err = deny_write_access(file);
- 					if (err) {
-diff -rup RH_2_6_9_55.orig/fs/inode.c RH_2_6_9_55/fs/inode.c
---- RH_2_6_9_55.orig/fs/inode.c
-+++ RH_2_6_9_55/fs/inode.c
-@@ -235,6 +235,7 @@ void __iget(struct inode * inode)
- 	inodes_stat.nr_unused--;
- }
- 
-+EXPORT_SYMBOL(__iget);
- /**
-  * clear_inode - clear an inode
-  * @inode: inode to clear
-diff -rup RH_2_6_9_55.orig/fs/namei.c RH_2_6_9_55/fs/namei.c
---- RH_2_6_9_55.orig/fs/namei.c
-+++ RH_2_6_9_55/fs/namei.c
-@@ -282,8 +282,19 @@ int deny_write_access(struct file * file
- 	return 0;
- }
- 
-+void intent_release(struct lookup_intent *it)
-+{
-+	if (!it)
-+		return;
-+	if (it->it_magic != INTENT_MAGIC)
-+		return;
-+	if (it->it_op_release)
-+		it->it_op_release(it);
-+}
-+
- void path_release(struct nameidata *nd)
- {
-+	intent_release(&nd->intent);
- 	dput(nd->dentry);
- 	mntput(nd->mnt);
- }
-@@ -395,8 +406,12 @@ static struct dentry * real_lookup(struc
- {
- 	struct dentry * result;
- 	struct inode *dir = parent->d_inode;
--
-+	int counter = 0;
-+	
-+again:
- 	down(&dir->i_sem);
-+	counter++;
-+
- 	/*
- 	 * First re-do the cached lookup just in case it was created
-	 * while we waited for the directory semaphore..
-@@ -433,8 +448,12 @@ static struct dentry * real_lookup(struc
-	up(&dir->i_sem);
- 	if (result->d_op && result->d_op->d_revalidate) {
-		result = do_revalidate(result, nd);
--		if (!result)
--			result = ERR_PTR(-ENOENT);
-+		if (!result) {
-+			if (counter > 10)
-+				result = ERR_PTR(-ESTALE);
-+			if (!IS_ERR(result))
-+				goto again;
-+		}
- 	}
- 	return result;
- }
-@@ -464,6 +483,7 @@ static inline int __vfs_follow_link(stru
- {
- 	int res = 0;
- 	char *name;
-+
- 	if (IS_ERR(link))
- 		goto fail;
- 
-@@ -473,6 +493,7 @@ static inline int __vfs_follow_link(stru
- 			/* weird __emul_prefix() stuff did it */
- 			goto out;
- 	}
-+	intent_reset_fs_part(&nd->intent);
- 	res = link_path_walk(link, nd);
- out:
- 	if (nd->depth || res || nd->last_type!=LAST_NORM)
-@@ -681,6 +702,33 @@ fail:
- 	return PTR_ERR(dentry);
- }
- 
-+static int revalidate_special(struct nameidata *nd)
-+{
-+	struct dentry *dentry = nd->dentry;
-+	int err, counter = 0;
-+
-+ revalidate_again:
-+	if (!dentry->d_op || !dentry->d_op->d_revalidate)
-+		return 0;
-+	if (!dentry->d_op->d_revalidate(dentry, nd)) {
-+		struct dentry *new;
-+		if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd)))
-+			return err;
-+		new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
-+		if (IS_ERR(new))
-+			return PTR_ERR(new);
-+		d_invalidate(dentry);
-+		dput(dentry);
-+		nd->dentry = dentry = new;
-+		counter++;
-+		if (counter < 10)
-+			goto revalidate_again;
-+		//printk("excessive revalidate_it loops\n");
-+		return -ESTALE;
-+	}
-+	return 0;
-+}
-+
- /*
-  * Name resolution.
-  * This is the basic name resolution function, turning a pathname into
-@@ -782,13 +830,17 @@ static fastcall int __link_path_walk(con
- 			goto out_dput;
- 
- 		if (inode->i_op->follow_link) {
-+			int save_flags = nd->flags;
- 			mntget(next.mnt);
-			if (next.mnt != nd->mnt) {
-				dput(nd->dentry);
-				nd->mnt = next.mnt;
-				nd->dentry = dget(next.dentry);
-			}
-+			nd->flags |= LOOKUP_LINK_NOTLAST;
- 			err = do_follow_link(next.dentry, nd);
-+			if (!(save_flags & LOOKUP_LINK_NOTLAST))
-+				nd->flags &= ~LOOKUP_LINK_NOTLAST;
- 			dput(next.dentry);
- 			mntput(next.mnt);
- 			if (err)
-@@ -828,14 +880,34 @@ last_component:
- 				inode = nd->dentry->d_inode;
- 				/* fallthrough */
- 			case 1:
-+				nd->flags |= LOOKUP_LAST;
-+				err = revalidate_special(nd);
-+				nd->flags &= ~LOOKUP_LAST;
-+				if (!nd->dentry->d_inode)
-+					err = -ENOENT;
-+				if (err) {
-+					path_release(nd);
-+					goto return_err;
-+				}
-+				if (lookup_flags & LOOKUP_DIRECTORY) {
-+					err = -ENOTDIR;
-+					if (!nd->dentry->d_inode->i_op ||
-+					    !nd->dentry->d_inode->i_op->lookup){
-+						path_release(nd);
-+						goto return_err;
-+					}
-+				}
- 				goto return_reval;
- 		}
-+		
- 		if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
- 			err = nd->dentry->d_op->d_hash(nd->dentry, &this);
- 			if (err < 0)
- 				break;
- 		}
-+		nd->flags |= LOOKUP_LAST;
- 		err = do_lookup(nd, &this, &next, atomic);
-+		nd->flags &= ~LOOKUP_LAST;
- 		if (err)
- 			break;
- 		follow_mount(&next.mnt, &next.dentry);
-@@ -1007,7 +1079,7 @@ set_it:
- }
- 
- /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */
--int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata *nd)
-+int fastcall path_lookup_it(const char *name, unsigned int flags, struct nameidata *nd)
- {
- 	int retval = 0;
- 
-@@ -1041,6 +1113,12 @@ out:
- 	return retval;
- }
- 
-+int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_GETATTR);
-+	return path_lookup_it(name, flags, nd);
-+}
-+
- /*
-  * Restricted form of lookup. Doesn't follow links, single-component only,
-  * needs parent already locked. Doesn't follow mounts.
-@@ -1091,7 +1169,7 @@ struct dentry * lookup_hash(struct qstr 
- }
- 
- /* SMP-safe */
--struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
- {
- 	unsigned long hash;
- 	struct qstr this;
-@@ -1111,11 +1189,16 @@ struct dentry * lookup_one_len(const cha
- 	}
- 	this.hash = end_name_hash(hash);
- 
--	return lookup_hash(&this, base);
-+	return __lookup_hash(&this, base, nd);
- access:
- 	return ERR_PTR(-EACCES);
- }
- 
-+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+{
-+	return lookup_one_len_it(name, base, len, NULL);
-+}
-+
- /*
-  *	namei()
-  *
-@@ -1127,18 +1210,24 @@ access:
-  * that namei follows links, while lnamei does not.
-  * SMP-safe
-  */
--int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
-+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)
- {
- 	char *tmp = getname(name);
- 	int err = PTR_ERR(tmp);
- 
- 	if (!IS_ERR(tmp)) {
--		err = path_lookup(tmp, flags, nd);
-+		err = path_lookup_it(tmp, flags, nd);
- 		putname(tmp);
- 	}
- 	return err;
- }
- 
-+int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_it(name, flags, nd);
-+}
-+
- /*
-  * It's inline, so penalty for filesystems that don't use sticky bit is
-  * minimal.
-@@ -1384,7 +1473,7 @@ int may_open(struct nameidata *nd, int a
- 		if (!error) {
- 			DQUOT_INIT(inode);
- 			
--			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME);
-+			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME|ATTR_FROM_OPEN);
- 		}
- 		put_write_access(inode);
- 		if (error)
-@@ -1425,14 +1514,14 @@ int open_namei(const char * pathname, in
- 		acc_mode |= MAY_APPEND;
- 
- 	/* Fill in the open() intent data */
--	nd->intent.open.flags = flag;
--	nd->intent.open.create_mode = mode;
-+	nd->intent.it_flags = flag;
-+	nd->intent.it_create_mode = mode;
- 
- 	/*
- 	 * The simplest case - just a plain lookup.
- 	 */
- 	if (!(flag & O_CREAT)) {
--		error = path_lookup(pathname, lookup_flags(flag)|LOOKUP_OPEN, nd);
-+		error = path_lookup_it(pathname, lookup_flags(flag)|LOOKUP_OPEN, nd);
- 		if (error)
- 			return error;
- 		goto ok;
-@@ -1441,7 +1530,8 @@ int open_namei(const char * pathname, in
- 	/*
- 	 * Create - we need to know the parent.
- 	 */
--	error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
-+	nd->intent.it_op |= IT_CREAT;
-+	error = path_lookup_it(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
- 	if (error)
- 		return error;
- 
-@@ -1457,7 +1547,9 @@ int open_namei(const char * pathname, in
- 	dir = nd->dentry;
- 	nd->flags &= ~LOOKUP_PARENT;
- 	down(&dir->d_inode->i_sem);
-+	nd->flags |= LOOKUP_LAST;
- 	dentry = __lookup_hash(&nd->last, nd->dentry, nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 
- do_last:
- 	error = PTR_ERR(dentry);
-@@ -1570,7 +1662,9 @@ do_link:
- 	}
- 	dir = nd->dentry;
- 	down(&dir->d_inode->i_sem);
-+	nd->flags |= LOOKUP_LAST;
- 	dentry = __lookup_hash(&nd->last, nd->dentry, nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	__putname(nd->last.name);
- 	goto do_last;
- }
-@@ -1644,10 +1738,20 @@ asmlinkage long sys_mknod(const char __u
- 	tmp = getname(filename);
- 	if (IS_ERR(tmp))
- 		return PTR_ERR(tmp);
--
--	error = path_lookup(tmp, LOOKUP_PARENT, &nd);
-+		
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	error = path_lookup_it(tmp, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
-+
-+	if (nd.dentry->d_inode->i_op->mknod_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->mknod_raw(&nd, mode, dev);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out2;
-+	}
-+
- 	dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(dentry);
- 
-@@ -1674,6 +1778,7 @@ asmlinkage long sys_mknod(const char __u
- 		dput(dentry);
- 	}
- 	up(&nd.dentry->d_inode->i_sem);
-+out2:
- 	path_release(&nd);
- out:
- 	putname(tmp);
-@@ -1716,10 +1821,20 @@ asmlinkage long sys_mkdir(const char __u
- 	if (!IS_ERR(tmp)) {
- 		struct dentry *dentry;
- 		struct nameidata nd;
-+		intent_init(&nd.intent, IT_LOOKUP);
- 
--		error = path_lookup(tmp, LOOKUP_PARENT, &nd);
-+		error = path_lookup_it(tmp, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+
-+		if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+			error = op->mkdir_raw(&nd, mode);
-+			/* the file system wants to use normal vfs path now */
-+			if (error != -EOPNOTSUPP)
-+				goto out2;
-+		}
-+
- 		dentry = lookup_create(&nd, 1);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1729,6 +1844,7 @@ asmlinkage long sys_mkdir(const char __u
- 			dput(dentry);
- 		}
- 		up(&nd.dentry->d_inode->i_sem);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(tmp);
-@@ -1814,7 +1930,8 @@ asmlinkage long sys_rmdir(const char __u
- 	if(IS_ERR(name))
- 		return PTR_ERR(name);
- 
--	error = path_lookup(name, LOOKUP_PARENT, &nd);
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	error = path_lookup_it(name, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto exit;
- 
-@@ -1829,6 +1946,16 @@ asmlinkage long sys_rmdir(const char __u
- 			error = -EBUSY;
- 			goto exit1;
- 	}
-+
-+	if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		error = op->rmdir_raw(&nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit1;
-+	}
-+
- 	down(&nd.dentry->d_inode->i_sem);
- 	dentry = lookup_hash(&nd.last, nd.dentry);
- 	error = PTR_ERR(dentry);
-@@ -1892,12 +2019,22 @@ asmlinkage long sys_unlink(const char __
- 	if(IS_ERR(name))
- 		return PTR_ERR(name);
- 
--	error = path_lookup(name, LOOKUP_PARENT, &nd);
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	error = path_lookup_it(name, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto exit;
- 	error = -EISDIR;
- 	if (nd.last_type != LAST_NORM)
- 		goto exit1;
-+	
-+	if (nd.dentry->d_inode->i_op->unlink_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->unlink_raw(&nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit1;
-+	}
-+
- 	down(&nd.dentry->d_inode->i_sem);
- 	dentry = lookup_hash(&nd.last, nd.dentry);
- 	error = PTR_ERR(dentry);
-@@ -1965,10 +2102,20 @@ asmlinkage long sys_symlink(const char _
- 	if (!IS_ERR(to)) {
- 		struct dentry *dentry;
- 		struct nameidata nd;
-+		intent_init(&nd.intent, IT_LOOKUP);
- 
--		error = path_lookup(to, LOOKUP_PARENT, &nd);
-+		error = path_lookup_it(to, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+
-+		if (nd.dentry->d_inode->i_op->symlink_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+			error = op->symlink_raw(&nd, from);
-+			/* the file system wants to use normal vfs path now */
-+			if (error != -EOPNOTSUPP)
-+				goto out2;
-+		}
-+
- 		dentry = lookup_create(&nd, 0);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1976,6 +2123,7 @@ asmlinkage long sys_symlink(const char _
- 			dput(dentry);
- 		}
- 		up(&nd.dentry->d_inode->i_sem);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(to);
-@@ -2045,15 +2193,26 @@ asmlinkage long sys_link(const char __us
- 	if (IS_ERR(to))
- 		return PTR_ERR(to);
- 
--	error = __user_walk(oldname, 0, &old_nd);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
-+	error = __user_walk_it(oldname, 0, &old_nd);
- 	if (error)
- 		goto exit;
--	error = path_lookup(to, LOOKUP_PARENT, &nd);
-+		
-+	intent_init(&nd.intent, IT_LOOKUP);		
-+	error = path_lookup_it(to, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
- 	error = -EXDEV;
- 	if (old_nd.mnt != nd.mnt)
- 		goto out_release;
-+	if (nd.dentry->d_inode->i_op->link_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->link_raw(&old_nd, &nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out_release;
-+	}
-+
- 	new_dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(new_dentry);
- 	if (!IS_ERR(new_dentry)) {
-@@ -2229,11 +2388,13 @@ static inline int do_rename(const char *
- 	struct dentry * trap;
- 	struct nameidata oldnd, newnd;
- 
--	error = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
-+	intent_init(&oldnd.intent, IT_LOOKUP);
-+	error = path_lookup_it(oldname, LOOKUP_PARENT, &oldnd);
- 	if (error)
- 		goto exit;
- 
--	error = path_lookup(newname, LOOKUP_PARENT, &newnd);
-+	intent_init(&newnd.intent, IT_LOOKUP);
-+	error = path_lookup_it(newname, LOOKUP_PARENT, &newnd);
- 	if (error)
- 		goto exit1;
- 
-@@ -2250,6 +2411,13 @@ static inline int do_rename(const char *
- 	if (newnd.last_type != LAST_NORM)
- 		goto exit2;
- 
-+	if (old_dir->d_inode->i_op->rename_raw) {
-+		error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit2;
-+	}
-+
- 	trap = lock_rename(new_dir, old_dir);
- 
- 	old_dentry = lookup_hash(&oldnd.last, old_dir);
-@@ -2281,8 +2449,7 @@ static inline int do_rename(const char *
- 	if (new_dentry == trap)
- 		goto exit5;
- 
--	error = vfs_rename(old_dir->d_inode, old_dentry,
--				   new_dir->d_inode, new_dentry);
-+	error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
- exit5:
- 	dput(new_dentry);
- exit4:
-@@ -2473,6 +2640,7 @@ EXPORT_SYMBOL(page_readlink);
- EXPORT_SYMBOL(page_symlink);
- EXPORT_SYMBOL(page_symlink_inode_operations);
- EXPORT_SYMBOL(path_lookup);
-+EXPORT_SYMBOL(path_lookup_it);
- EXPORT_SYMBOL(path_release);
- EXPORT_SYMBOL(path_walk);
- EXPORT_SYMBOL(permission);
-diff -urNp RH_2_6_9_42_0_3.orig/fs/namespace.c RH_2_6_9_42_0_3/fs/namespace.c
---- RH_2_6_9_42_0_3.orig/fs/namespace.c
-+++ RH_2_6_9_42_0_3/fs/namespace.c
-@@ -114,6 +115,7 @@ static inline int check_mnt(struct vfsmo
- 
- static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)
- {
-+	memset(old_nd, 0, sizeof(*old_nd));
- 	old_nd->dentry = mnt->mnt_mountpoint;
- 	old_nd->mnt = mnt->mnt_parent;
- 	mnt->mnt_parent = mnt;
-@@ -441,6 +442,8 @@ static int do_umount(struct vfsmount *mn
- 	 */
- 
- 	lock_kernel();
-+	if (sb->s_op->umount_lustre)
-+		sb->s_op->umount_lustre(sb);
- 	if( (flags&MNT_FORCE) && sb->s_op->umount_begin)
- 		sb->s_op->umount_begin(sb);
- 	unlock_kernel();
-@@ -665,7 +668,8 @@ static int do_loopback(struct nameidata 
- 		return err;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
--	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
-+	err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
- 
-@@ -739,7 +743,8 @@ static int do_move_mount(struct nameidat
- 		return -EPERM;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
--	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
-+	err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
- 
-@@ -1074,7 +1079,8 @@ long do_mount(char * dev_name, char * di
- 	flags &= ~(MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_ACTIVE);
- 
- 	/* ... and get the mountpoint */
--	retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd);
-+	intent_init(&nd.intent, IT_LOOKUP);	
-+	retval = path_lookup_it(dir_name, LOOKUP_FOLLOW, &nd);
- 	if (retval)
- 		return retval;
- 
-diff -rup RH_2_6_9_55.orig/fs/nfs/dir.c RH_2_6_9_55/fs/nfs/dir.c
---- RH_2_6_9_55.orig/fs/nfs/dir.c
-+++ RH_2_6_9_55/fs/nfs/dir.c
-@@ -839,7 +839,7 @@ int nfs_is_exclusive_create(struct inode
- 		return 0;
- 	if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
- 		return 0;
--	return (nd->intent.open.flags & O_EXCL) != 0;
-+	return (nd->intent.it_flags & O_EXCL) != 0;
- }
- 
- static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
-@@ -915,7 +915,7 @@ static int is_atomic_open(struct inode *
- 	if (nd->flags & LOOKUP_DIRECTORY)
- 		return 0;
- 	/* Are we trying to write to a read only partition? */
--	if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
-+	if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
- 		return 0;
- 	return 1;
- }
-@@ -936,7 +936,7 @@ static struct dentry *nfs_atomic_lookup(
- 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
- 
- 	/* Let vfs_create() deal with O_EXCL */
--	if (nd->intent.open.flags & O_EXCL)
-+	if (nd->intent.it_flags & O_EXCL)
- 		goto no_entry;
- 
- 	/* Open the file on the server */
-@@ -948,7 +948,7 @@ static struct dentry *nfs_atomic_lookup(
- 		goto out;
- 	}
- 
--	if (nd->intent.open.flags & O_CREAT) {
-+	if (nd->intent.it_flags & O_CREAT) {
- 		nfs_begin_data_update(dir);
- 		inode = nfs4_atomic_open(dir, dentry, nd);
- 		nfs_end_data_update(dir);
-@@ -967,7 +967,7 @@ static struct dentry *nfs_atomic_lookup(
- 			case -ENOTDIR:
- 				goto no_open;
- 			case -ELOOP:
--				if (!(nd->intent.open.flags & O_NOFOLLOW))
-+				if (!(nd->intent.it_flags & O_NOFOLLOW))
- 					goto no_open;
- 			/* case -EINVAL: */
- 			default:
-@@ -1005,7 +1005,7 @@ static int nfs_open_revalidate(struct de
- 	/* NFS only supports OPEN on regular files */
- 	if (!S_ISREG(inode->i_mode))
- 		goto no_open;
--	openflags = nd->intent.open.flags;
-+	openflags = nd->intent.it_flags;
- 	/* We cannot do exclusive creation on a positive dentry */
- 	if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
- 		goto no_open;
-@@ -1213,7 +1213,7 @@ static int nfs_create(struct inode *dir,
- 	attr.ia_valid = ATTR_MODE;
- 
- 	if (nd && (nd->flags & LOOKUP_CREATE))
--		open_flags = nd->intent.open.flags;
-+		open_flags = nd->intent.it_flags;
- 
- 	/*
- 	 * The 0 argument passed into the create function should one day
-diff -rup RH_2_6_9_55.orig/fs/nfs/nfs4proc.c RH_2_6_9_55/fs/nfs/nfs4proc.c
---- RH_2_6_9_55.orig/fs/nfs/nfs4proc.c
-+++ RH_2_6_9_55/fs/nfs/nfs4proc.c
-@@ -770,27 +770,27 @@ nfs4_atomic_open(struct inode *dir, stru
- 	struct nfs4_inc_open *inc_open;
- 
- 	if (nd->flags & LOOKUP_CREATE) {
--		attr.ia_mode = nd->intent.open.create_mode;
-+		attr.ia_mode = nd->intent.it_create_mode;
- 		attr.ia_valid = ATTR_MODE;
- 		if (!IS_POSIXACL(dir))
- 			attr.ia_mode &= ~current->fs->umask;
- 	} else {
- 		attr.ia_valid = 0;
--		BUG_ON(nd->intent.open.flags & O_CREAT);
-+		BUG_ON(nd->intent.it_flags & O_CREAT);
- 	}
- 
- 	/* track info in case the open never completes */
- 	if (!(inc_open = kmalloc(sizeof(*inc_open), GFP_KERNEL)))
- 		return ERR_PTR(-ENOMEM);
- 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
--	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.open.flags, &attr, cred);
-+	state = nfs4_do_open(dir, &dentry->d_name, nd->intent.it_flags, &attr, cred);
- 	put_rpccred(cred);
- 	if (IS_ERR(state)) {
- 		kfree(inc_open);
-		return (struct inode *)state;
-	}
-	inc_open->task = current;
--	inc_open->flags = nd->intent.open.flags;
-+	inc_open->flags = nd->intent.it_flags;
-	INIT_LIST_HEAD(&inc_open->state);
-	spin_lock(&state->inode->i_lock);
-	list_add(&inc_open->state, &state->inc_open);
-diff -rup RH_2_6_9_55.orig/fs/open.c RH_2_6_9_55/fs/open.c
---- RH_2_6_9_55.orig/fs/open.c
-+++ RH_2_6_9_55/fs/open.c
-@@ -195,6 +195,7 @@ out:
- int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs)
- {
- 	int err;
-+	struct inode_operations *op = dentry->d_inode->i_op;
- 	struct iattr newattrs;
- 
- 	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -204,8 +205,16 @@ int do_truncate(struct dentry *dentry, l
-	newattrs.ia_size = length;
-	newattrs.ia_valid = ATTR_SIZE | time_attrs;
- 	down(&dentry->d_inode->i_sem);
--	err = notify_change(dentry, &newattrs);
--	up(&dentry->d_inode->i_sem);
-+	if (op->setattr_raw) {
-+		newattrs.ia_valid |= ATTR_RAW;
-+		newattrs.ia_ctime = CURRENT_TIME;
-+		down_write(&dentry->d_inode->i_alloc_sem);
-+		err = op->setattr_raw(dentry->d_inode, &newattrs);
-+		up_write(&dentry->d_inode->i_alloc_sem);
-+	} else
-+		err = notify_change(dentry, &newattrs);
-+	up(&dentry->d_inode->i_sem);		
-+
- 	return err;
- }
-
-@@ -214,12 +223,13 @@ static inline long do_sys_truncate(const
- 	struct nameidata nd;
- 	struct inode * inode;
- 	int error;
--
-+	
- 	error = -EINVAL;
- 	if (length < 0)	/* sorry, but loff_t says... */
- 		goto out;
--
--	error = user_path_walk(path, &nd);
-+		
-+	intent_init(&nd.intent, IT_GETATTR);
-+	error = user_path_walk_it(path, &nd);
- 	if (error)
- 		goto out;
- 	inode = nd.dentry->d_inode;
-@@ -390,9 +400,19 @@ asmlinkage long sys_utime(char __user * 
- 		    (error = permission(inode,MAY_WRITE,&nd)) != 0)
- 			goto dput_and_out;
- 	}
--	down(&inode->i_sem);
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto dput_and_out;
-+	} else {
-+		down(&inode->i_sem);
-+		error = notify_change(nd.dentry, &newattrs);
-+		up(&inode->i_sem);
-+	}
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -443,9 +463,19 @@ long do_utimes(char __user * filename, s
- 		    (error = permission(inode,MAY_WRITE,&nd)) != 0)
- 			goto dput_and_out;
- 	}
--	down(&inode->i_sem);
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto dput_and_out;
-+	} else {
-+		down(&inode->i_sem);
-+		error = notify_change(nd.dentry, &newattrs);
-+		up(&inode->i_sem);
-+	}
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -473,6 +503,7 @@ asmlinkage long sys_access(const char __
- 	int old_fsuid, old_fsgid;
- 	kernel_cap_t old_cap;
- 	int res;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (mode & ~S_IRWXO)	/* where's F_OK, X_OK, W_OK, R_OK? */
- 		return -EINVAL;
-@@ -497,13 +528,14 @@ asmlinkage long sys_access(const char __
- 	else
- 		current->cap_effective = current->cap_permitted;
- 
--	res = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
-+	res = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
- 	if (!res) {
- 		res = permission(nd.dentry->d_inode, mode, &nd);
- 		/* SuS v2 requires we report a read only fs too */
- 		if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode)
- 		   && !special_file(nd.dentry->d_inode->i_mode))
- 			res = -EROFS;
-+
- 		path_release(&nd);
- 	}
- 
-@@ -518,8 +550,9 @@ asmlinkage long sys_chdir(const char __u
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -571,8 +604,9 @@ asmlinkage long sys_chroot(const char __
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -595,36 +629,52 @@ out:
- 
- EXPORT_SYMBOL_GPL(sys_chroot);
- 
--asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+int chmod_common(struct dentry *dentry, mode_t mode)
- {
--	struct inode * inode;
--	struct dentry * dentry;
--	struct file * file;
--	int err = -EBADF;
-+	struct inode * inode = dentry->d_inode;
- 	struct iattr newattrs;
-+	int error = -EROFS;
- 
--	file = fget(fd);
--	if (!file)
-+	if (IS_RDONLY(inode))
- 		goto out;
-+	
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
- 
--	dentry = file->f_dentry;
--	inode = dentry->d_inode;
-+		newattrs.ia_mode = mode;
-+		newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use the normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out;
-+	}
- 
--	err = -EROFS;
--	if (IS_RDONLY(inode))
--		goto out_putf;
--	err = -EPERM;
-+	error = -EPERM;
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto out_putf;
-+		goto out;
-+
- 	down(&inode->i_sem);
- 	if (mode == (mode_t) -1)
- 		mode = inode->i_mode;
- 	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
- 	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	err = notify_change(dentry, &newattrs);
-+	error = notify_change(dentry, &newattrs);
- 	up(&inode->i_sem);
-+out:
-+	return error;
-+}
- 
--out_putf:
-+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+{
-+	struct file * file;
-+	int err = -EBADF;
-+
-+	file = fget(fd);
-+	if (!file)
-+		goto out;
-+
-+	err = chmod_common(file->f_dentry, mode);
- 	fput(file);
- out:
- 	return err;
-@@ -633,32 +683,13 @@ out:
- asmlinkage long sys_chmod(const char __user * filename, mode_t mode)
- {
- 	struct nameidata nd;
--	struct inode * inode;
- 	int error;
--	struct iattr newattrs;
- 
- 	error = user_path_walk(filename, &nd);
- 	if (error)
- 		goto out;
--	inode = nd.dentry->d_inode;
-
--	error = -EROFS;
--	if (IS_RDONLY(inode))
--		goto dput_and_out;
--
--	error = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto dput_and_out;
--
--	down(&inode->i_sem);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
--
--dput_and_out:
-+	error = chmod_common(nd.dentry, mode);
- 	path_release(&nd);
- out:
- 	return error;
-@@ -679,6 +710,18 @@ static int chown_common(struct dentry * 
- 	if (IS_RDONLY(inode))
- 		goto out;
- 	error = -EPERM;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_uid = user;
-+		newattrs.ia_gid = group;
-+		newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			return error;
-+	}
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto out;
- 	newattrs.ia_valid =  ATTR_CTIME;
-@@ -692,6 +735,7 @@ static int chown_common(struct dentry * 
- 	}
- 	if (!S_ISDIR(inode->i_mode))
- 		newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
-+
- 	down(&inode->i_sem);
- 	error = notify_change(dentry, &newattrs);
- 	up(&inode->i_sem);
-@@ -739,8 +783,6 @@ asmlinkage long sys_fchown(unsigned int 
- 	return error;
- }
- 
--static struct file *__dentry_open(struct dentry *, struct vfsmount *, int, struct file *);
--
- /*
-  * Note that while the flag value (low two bits) for sys_open means:
-  *	00 - read-only
-@@ -758,8 +800,9 @@ static struct file *__dentry_open(struct
- struct file *filp_open(const char * filename, int flags, int mode)
- {
- 	int namei_flags, error;
-+	struct file * temp_filp;
- 	struct nameidata nd;
--	struct file *f;
-+	intent_init(&nd.intent, IT_OPEN);
- 
- 	namei_flags = flags;
- 	if ((namei_flags+1) & O_ACCMODE)
-@@ -767,16 +810,11 @@ struct file *filp_open(const char * file
- 	if (namei_flags & O_TRUNC)
- 		namei_flags |= 2;
- 
--	error = -ENFILE;
--	f = get_empty_filp();
--	if (f == NULL)
--		return ERR_PTR(error);
--
- 	error = open_namei(filename, namei_flags, mode, &nd);
--	if (!error)
--		return __dentry_open(nd.dentry, nd.mnt, flags, f);
--
--	put_filp(f);
-+	if (!error) {
-+		temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent);
-+		return temp_filp;
-+	}	
- 	return ERR_PTR(error);
- }
- 
-@@ -784,29 +822,27 @@ EXPORT_SYMBOL(filp_open);
- 
- struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
- {
--	int error;
--	struct file *f;
-+	struct lookup_intent it;
-+	intent_init(&it, IT_LOOKUP);
- 
--	error = -ENFILE;
--	f = get_empty_filp();
--	if (f == NULL) {
--		dput(dentry);
--		mntput(mnt);
--		return ERR_PTR(error);
--	}
--
--	return __dentry_open(dentry, mnt, flags, f);
-+	return dentry_open_it(dentry, mnt, flags, &it);
- }
- 
- EXPORT_SYMBOL(dentry_open);
- 
--static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags, struct file *f)
-+struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags, struct lookup_intent *it)
- {
-+	struct file *f;
- 	struct inode *inode;
- 	int error;
- 
-+	error = -ENFILE;
-+	f = get_empty_filp();
-+	if (!f)
-+		goto cleanup_dentry;
- 	f->f_flags = flags;
- 	f->f_mode = ((flags+1) & O_ACCMODE) | FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE;
-+	f->f_it = it;
- 	inode = dentry->d_inode;
- 	if (f->f_mode & FMODE_WRITE) {
- 		error = get_write_access(inode);
-@@ -825,6 +861,7 @@ static struct file *__dentry_open(struct
- 		error = f->f_op->open(inode,f);
- 		if (error)
- 			goto cleanup_all;
-+		intent_release(it);
- 	}
- 	f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
- 
-@@ -849,6 +886,8 @@ cleanup_all:
- 	f->f_vfsmnt = NULL;
- cleanup_file:
- 	put_filp(f);
-+cleanup_dentry:
-+	intent_release(it);
- 	dput(dentry);
- 	mntput(mnt);
- 	return ERR_PTR(error);
-diff -rup RH_2_6_9_55.orig/fs/stat.c RH_2_6_9_55/fs/stat.c
---- RH_2_6_9_55.orig/fs/stat.c
-+++ RH_2_6_9_55/fs/stat.c
-@@ -37,7 +37,7 @@ void generic_fillattr(struct inode *inod
- 
- EXPORT_SYMBOL(generic_fillattr);
- 
--int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
- {
- 	struct inode *inode = dentry->d_inode;
- 	int retval;
-@@ -46,6 +46,8 @@ int vfs_getattr(struct vfsmount *mnt, st
- 	if (retval)
- 		return retval;
- 
-+	if (inode->i_op->getattr_it)
-+		return inode->i_op->getattr_it(mnt, dentry, it, stat);
- 	if (inode->i_op->getattr)
- 		return inode->i_op->getattr(mnt, dentry, stat);
- 
-@@ -62,7 +64,7 @@ int vfs_getattr(struct vfsmount *mnt, st
- 
- EXPORT_SYMBOL(vfs_getattr);
- 
--int vfs_getattr64(struct vfsmount *mnt, struct dentry *dentry, struct kstat64 *stat)
-+int vfs_getattr64_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat64 *stat)
- {
-	struct inode *inode = dentry->d_inode;
-	int retval;
-@@ -79,6 +81,13 @@ int vfs_getattr64(struct vfsmount *mnt, 
-		return ixop->getattr64(mnt, dentry, stat);
-	}
-
-+	if (inode->i_op->getattr_it) {
-+		retval = inode->i_op->getattr_it(mnt, dentry, it, (struct kstat *) stat);
-+		if (retval == 0)
-+			stat->ino64 = stat->ino;
-+		return retval;
-+	}
-+
-	if (inode->i_op->getattr) {
-		retval = inode->i_op->getattr(mnt, dentry, (struct kstat *) stat);
-		if (retval == 0)
-@@ -98,16 +107,28 @@ int vfs_getattr64(struct vfsmount *mnt, 
-	return 0;
- }
-
-+
- EXPORT_SYMBOL(vfs_getattr64);
-
-+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+{
-+	return vfs_getattr_it(mnt, dentry, NULL, stat);
-+}
-+
-+int vfs_getattr64(struct vfsmount *mnt, struct dentry *dentry, struct kstat64 *stat)
-+{
-+	return vfs_getattr64_it(mnt, dentry, NULL, stat);
-+}
-+
- int vfs_stat(char __user *name, struct kstat *stat)
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = user_path_walk(name, &nd);
-+	error = user_path_walk_it(name, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -119,10 +140,11 @@ int vfs_lstat(char __user *name, struct 
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = user_path_walk_link(name, &nd);
-+	error = user_path_walk_link_it(name, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -134,9 +156,12 @@ int vfs_fstat(unsigned int fd, struct ks
- {
- 	struct file *f = fget(fd);
- 	int error = -EBADF;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (f) {
--		error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
-+		error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
-+		intent_release(&nd.intent);
- 		fput(f);
- 	}
- 	return error;
-@@ -148,10 +173,11 @@ int vfs_stat64(char __user *name, struct
- {
-	struct nameidata nd;
-	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
-
--	error = user_path_walk(name, &nd);
-+	error = user_path_walk_it(name, &nd);
- 	if (!error) {
--		error = vfs_getattr64(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr64_it(nd.mnt, nd.dentry, &nd.intent, stat);
-		path_release(&nd);
-	}
-	return error;
-@@ -163,10 +189,11 @@ int vfs_lstat64(char __user *name, struc
- {
-	struct nameidata nd;
-	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
-
--	error = user_path_walk_link(name, &nd);
-+	error = user_path_walk_link_it(name, &nd);
- 	if (!error) {
--		error = vfs_getattr64(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr64_it(nd.mnt, nd.dentry, &nd.intent, stat);
-		path_release(&nd);
-	}
-	return error;
-@@ -178,9 +205,11 @@ int vfs_fstat64(unsigned int fd, struct 
- {
-	struct file *f = fget(fd);
-	int error = -EBADF;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_GETATTR);
-
-	if (f) {
--		error = vfs_getattr64(f->f_vfsmnt, f->f_dentry, stat);
-+		error = vfs_getattr64_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
-		fput(f);
-	}
-	return error;
-diff -rup RH_2_6_9_55.orig/include/linux/dcache.h RH_2_6_9_55/include/linux/dcache.h
---- RH_2_6_9_55.orig/include/linux/dcache.h
-+++ RH_2_6_9_55/include/linux/dcache.h
-@@ -4,6 +4,7 @@
- #ifdef __KERNEL__
- 
- #include <asm/atomic.h>
-+#include <linux/string.h>
- #include <linux/list.h>
- #include <linux/spinlock.h>
- #include <linux/cache.h>
-@@ -37,6 +38,8 @@ struct qstr {
- 	const unsigned char *name;
- };
- 
-+#include <linux/namei.h>
-+
- struct dentry_stat_t {
- 	int nr_dentry;
- 	int nr_unused;
-diff -rup RH_2_6_9_55.orig/include/linux/fs.h RH_2_6_9_55/include/linux/fs.h
---- RH_2_6_9_55.orig/include/linux/fs.h
-+++ RH_2_6_9_55/include/linux/fs.h
-@@ -266,6 +266,8 @@ typedef void (dio_iodone_t)(struct inode
- #define ATTR_ATTR_FLAG	1024
- #define ATTR_KILL_SUID	2048
- #define ATTR_KILL_SGID	4096
-+#define ATTR_RAW       	8192    /* file system, not vfs will massage attrs */
-+#define ATTR_FROM_OPEN 	16384    /* called from open path, ie O_TRUNC */
- 
- /*
-  * This is the Inode Attributes structure, used for notify_change().  It
-@@ -464,6 +466,7 @@ struct inode {
- 	struct block_device	*i_bdev;
- 	struct cdev		*i_cdev;
- 	int			i_cindex;
-+	void			*i_filterdata;
- 
- 	__u32			i_generation;
- 
-@@ -597,6 +600,7 @@ struct file {
- 	spinlock_t		f_ep_lock;
- #endif /* #ifdef CONFIG_EPOLL */
- 	struct address_space	*f_mapping;
-+ 	struct lookup_intent    *f_it;
- };
- extern spinlock_t files_lock;
- #define file_list_lock() spin_lock(&files_lock);
-@@ -967,20 +971,29 @@ struct inode_operations {
- 	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
- 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- 	int (*link) (struct dentry *,struct inode *,struct dentry *);
-+	int (*link_raw) (struct nameidata *,struct nameidata *);
- 	int (*unlink) (struct inode *,struct dentry *);
-+	int (*unlink_raw) (struct nameidata *);
- 	int (*symlink) (struct inode *,struct dentry *,const char *);
-+	int (*symlink_raw) (struct nameidata *,const char *);
- 	int (*mkdir) (struct inode *,struct dentry *,int);
-+	int (*mkdir_raw) (struct nameidata *,int);
- 	int (*rmdir) (struct inode *,struct dentry *);
-+	int (*rmdir_raw) (struct nameidata *);
- 	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
-+	int (*mknod_raw) (struct nameidata *,int,dev_t);
- 	int (*rename) (struct inode *, struct dentry *,
- 			struct inode *, struct dentry *);
-+	int (*rename_raw) (struct nameidata *, struct nameidata *);
- 	int (*readlink) (struct dentry *, char __user *,int);
- 	int (*follow_link) (struct dentry *, struct nameidata *);
- 	void (*put_link) (struct dentry *, struct nameidata *);
- 	void (*truncate) (struct inode *);
- 	int (*permission) (struct inode *, int, struct nameidata *);
- 	int (*setattr) (struct dentry *, struct iattr *);
-+	int (*setattr_raw) (struct inode *, struct iattr *);
- 	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
-+	int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
- 	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- 	ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
- 	ssize_t (*listxattr) (struct dentry *, char *, size_t);
-@@ -1025,6 +1038,7 @@ struct super_operations {
- 	int (*remount_fs) (struct super_block *, int *, char *);
- 	void (*clear_inode) (struct inode *);
- 	void (*umount_begin) (struct super_block *);
-+	void (*umount_lustre) (struct super_block *);
- 
- 	int (*show_options)(struct seq_file *, struct vfsmount *);
- };
-@@ -1217,6 +1231,7 @@ extern int unregister_filesystem(struct 
- extern struct vfsmount *kern_mount(struct file_system_type *);
- extern int may_umount_tree(struct vfsmount *);
- extern int may_umount(struct vfsmount *);
-+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
- extern long do_mount(char *, char *, char *, unsigned long, void *);
- 
- extern int vfs_statfs(struct super_block *, struct kstatfs *);
-@@ -1277,10 +1292,10 @@ static inline int break_lease(struct ino
- }
- 
- /* fs/open.c */
--
- extern int do_truncate(struct dentry *, loff_t start, unsigned int);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
-+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
- extern int filp_close(struct file *, fl_owner_t id);
- extern char * getname(const char __user *);
- 
-diff -rup RH_2_6_9_55.orig/include/linux/mount.h RH_2_6_9_55/include/linux/mount.h
---- RH_2_6_9_55.orig/include/linux/mount.h
-+++ RH_2_6_9_55/include/linux/mount.h
-@@ -34,6 +34,7 @@ struct vfsmount
- 	struct list_head mnt_list;
- 	struct list_head mnt_fslink;	/* link in fs-specific expiry list */
- 	struct namespace *mnt_namespace; /* containing namespace */
-+	unsigned long mnt_last_used;	/* for GNS auto-umount (jiffies) */
- };
- 
- static inline struct vfsmount *mntget(struct vfsmount *mnt)
-diff -rup RH_2_6_9_55.orig/include/linux/namei.h RH_2_6_9_55/include/linux/namei.h
---- RH_2_6_9_55.orig/include/linux/namei.h
-+++ RH_2_6_9_55/include/linux/namei.h
-@@ -2,14 +2,55 @@
- #define _LINUX_NAMEI_H
- 
- #include <linux/linkage.h>
-+#include <linux/string.h>
- 
- struct vfsmount;
-+struct nameidata;
- 
--struct open_intent {
--	int	flags;
--	int	create_mode;
-+/* intent opcodes */
-+#define IT_OPEN		(1)
-+#define IT_CREAT	(1<<1)
-+#define IT_READDIR	(1<<2)
-+#define IT_GETATTR	(1<<3)
-+#define IT_LOOKUP	(1<<4)
-+#define IT_UNLINK	(1<<5)
-+#define IT_TRUNC	(1<<6)
-+#define IT_GETXATTR	(1<<7)
-+
-+struct lustre_intent_data {
-+	int	it_disposition;
-+	int	it_status;
-+	__u64	it_lock_handle;
-+	void	*it_data;
-+	int	it_lock_mode;
- };
- 
-+#define INTENT_MAGIC 0x19620323
-+struct lookup_intent {
-+	int	it_magic;
-+	void	(*it_op_release)(struct lookup_intent *);
-+	int	it_op;
-+	int	it_flags;
-+	int	it_create_mode;
-+	union {
-+		struct lustre_intent_data lustre;
-+	} d;
-+};
-+
-+static inline void intent_reset_fs_part(struct lookup_intent *it)
-+{
-+        memset(&it->d, 0, sizeof(it->d));
-+        it->it_magic = INTENT_MAGIC;
-+        it->it_op_release = NULL;
-+}
-+
-+static inline void intent_init(struct lookup_intent *it, int op)
-+{
-+	memset(it, 0, sizeof(*it));
-+	it->it_magic = INTENT_MAGIC;
-+	it->it_op = op;
-+}
-+
- enum { MAX_NESTED_LINKS = 8 };
- 
- struct nameidata {
-@@ -21,10 +62,7 @@ struct nameidata {
- 	unsigned	depth;
- 	char *saved_names[MAX_NESTED_LINKS + 1];
- 
--	/* Intent data */
--	union {
--		struct open_intent open;
--	} intent;
-+	struct lookup_intent intent;
- };
- 
- /*
-@@ -47,6 +85,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
- #define LOOKUP_NOALT		32
- #define LOOKUP_ATOMIC		64
- #define LOOKUP_REVAL		128
-+#define LOOKUP_LAST		(0x1000)
-+#define LOOKUP_LINK_NOTLAST	(0x2000)
- 
- /*
-  * Intent data
-@@ -56,11 +96,18 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
- #define LOOKUP_ACCESS		(0x0400)
- 
- extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
-+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd));
-+#define user_path_walk_it(name,nd) \
-+	__user_walk_it(name, LOOKUP_FOLLOW, nd)
-+#define user_path_walk_link_it(name,nd) \
-+	__user_walk_it(name, 0, nd)
-+extern void intent_release(struct lookup_intent *);
- #define user_path_walk(name,nd) \
- 	__user_walk(name, LOOKUP_FOLLOW, nd)
- #define user_path_walk_link(name,nd) \
- 	__user_walk(name, 0, nd)
- extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
-+extern int FASTCALL(path_lookup_it(const char *, unsigned, struct nameidata *));
- extern int FASTCALL(path_walk(const char *, struct nameidata *));
- extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
- extern void path_release(struct nameidata *);
diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch
deleted file mode 100644
index f1530698eb23975ec6f1d0e038f177f00bc515e4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-2.6-sles10.patch
+++ /dev/null
@@ -1,1500 +0,0 @@
-Index: LINUX-SRC-TREE/fs/9p/vfs_inode.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/9p/vfs_inode.c
-+++ LINUX-SRC-TREE/fs/9p/vfs_inode.c
-@@ -469,7 +469,7 @@ v9fs_vfs_create(struct inode *dir, struc
- 	perm = unixmode2p9mode(v9ses, mode);
- 
- 	if (nd && nd->flags & LOOKUP_OPEN)
--		flags = nd->intent.open.flags - 1;
-+		flags = nd->intent.flags - 1;
- 	else
- 		flags = O_RDWR;
- 
-Index: LINUX-SRC-TREE/fs/cifs/dir.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/cifs/dir.c
-+++ LINUX-SRC-TREE/fs/cifs/dir.c
-@@ -157,11 +157,7 @@ cifs_create(struct inode *inode, struct 
- 
- #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
- 	if(nd && (nd->flags & LOOKUP_OPEN)) {
--#if LINUX_VERSION_CODE == KERNEL_VERSION(2,6,5) /* SUSE included Lustre patch */
- 		int oflags = nd->intent.it_flags;
--#else
--		int oflags = nd->intent.open.flags;
--#endif
- 
- 		desiredAccess = 0;
- 		if (oflags & FMODE_READ)
-Index: LINUX-SRC-TREE/fs/exec.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/exec.c
-+++ LINUX-SRC-TREE/fs/exec.c
-@@ -129,7 +129,9 @@ asmlinkage long sys_uselib(const char __
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
-+ 	intent_init(&nd.intent, IT_OPEN);
-+	error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd,
-+					FMODE_READ | FMODE_EXEC);
- 	if (error)
- 		goto out;
- 
-@@ -481,7 +483,9 @@ struct file *open_exec(const char *name)
- 	int err;
- 	struct file *file;
- 
--	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ);
-+ 	intent_init(&nd.intent, IT_OPEN);
-+	err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd,
-+			       FMODE_READ | FMODE_EXEC, 0);
- 	file = ERR_PTR(err);
- 
- 	if (!err) {
-@@ -1543,7 +1547,7 @@ int do_coredump(long signr, int exit_cod
- 		goto close_fail;
- 	if (!file->f_op->write)
- 		goto close_fail;
--	if (do_truncate(file->f_dentry, 0, 0, file) != 0)
-+	if (do_truncate(file->f_dentry, 0, 0, file, 0) != 0)
- 		goto close_fail;
- 
- 	retval = binfmt->core_dump(signr, regs, file);
-Index: LINUX-SRC-TREE/fs/fuse/dir.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/fuse/dir.c
-+++ LINUX-SRC-TREE/fs/fuse/dir.c
-@@ -242,7 +242,7 @@ static int fuse_create_open(struct inode
- 	struct fuse_entry_out outentry;
- 	struct fuse_file *ff;
- 	struct file *file;
--	int flags = nd->intent.open.flags - 1;
-+	int flags = nd->intent.flags - 1;
- 
- 	err = -ENOSYS;
- 	if (fc->no_create)
-Index: LINUX-SRC-TREE/fs/inode.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/inode.c
-+++ LINUX-SRC-TREE/fs/inode.c
-@@ -236,6 +236,7 @@ void __iget(struct inode * inode)
- 	inodes_stat.nr_unused--;
- }
- 
-+EXPORT_SYMBOL(__iget);
- /**
-  * clear_inode - clear an inode
-  * @inode: inode to clear
-Index: LINUX-SRC-TREE/fs/namei.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/namei.c
-+++ LINUX-SRC-TREE/fs/namei.c
-@@ -337,8 +337,19 @@ int deny_write_access(struct file * file
- 	return 0;
- }
- 
-+void intent_release(struct lookup_intent *it)
-+{
-+	if (!it)
-+		return;
-+	if (it->it_magic != INTENT_MAGIC)
-+		return;
-+	if (it->it_op_release)
-+		it->it_op_release(it);
-+}
-+
- void path_release(struct nameidata *nd)
- {
-+	intent_release(&nd->intent);
- 	dput(nd->dentry);
- 	mntput(nd->mnt);
- }
-@@ -359,10 +370,10 @@ void path_release_on_umount(struct namei
-  */
- void release_open_intent(struct nameidata *nd)
- {
--	if (nd->intent.open.file->f_dentry == NULL)
--		put_filp(nd->intent.open.file);
-+	if (nd->intent.file->f_dentry == NULL)
-+		put_filp(nd->intent.file);
- 	else
--		fput(nd->intent.open.file);
-+		fput(nd->intent.file);
- }
- 
- /*
-@@ -440,8 +451,12 @@ static struct dentry * real_lookup(struc
- {
- 	struct dentry * result;
- 	struct inode *dir = parent->d_inode;
-+	int counter = 0;
- 
- 	mutex_lock(&dir->i_mutex);
-+again:
-+	counter++;
-+
- 	/*
- 	 * First re-do the cached lookup just in case it was created
- 	 * while we waited for the directory semaphore..
-@@ -475,13 +490,16 @@ static struct dentry * real_lookup(struc
- 	 * Uhhuh! Nasty case: the cache was re-populated while
- 	 * we waited on the semaphore. Need to revalidate.
- 	 */
--	mutex_unlock(&dir->i_mutex);
- 	if (result->d_op && result->d_op->d_revalidate) {
- 		if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) {
- 			dput(result);
--			result = ERR_PTR(-ENOENT);
-+			if (counter > 10)
-+				result = ERR_PTR(-ESTALE);
-+			if (!IS_ERR(result))
-+				goto again;
- 		}
- 	}
-+	mutex_unlock(&dir->i_mutex);
- 	return result;
- }
- 
-@@ -510,6 +528,7 @@ static __always_inline int __vfs_follow_
- {
- 	int res = 0;
- 	char *name;
-+
- 	if (IS_ERR(link))
- 		goto fail;
- 
-@@ -519,6 +538,7 @@ static __always_inline int __vfs_follow_
- 			/* weird __emul_prefix() stuff did it */
- 			goto out;
- 	}
-+	intent_reset_fs_part(&nd->intent);
- 	res = link_path_walk(link, nd);
- out:
- 	if (nd->depth || res || nd->last_type!=LAST_NORM)
-@@ -768,6 +788,33 @@ fail:
- 	return PTR_ERR(dentry);
- }
- 
-+static int revalidate_special(struct nameidata *nd)
-+{
-+	struct dentry *dentry = nd->dentry;
-+	int err, counter = 0;
-+
-+ revalidate_again:
-+	if (!dentry->d_op || !dentry->d_op->d_revalidate)
-+		return 0;
-+	if (!dentry->d_op->d_revalidate(dentry, nd)) {
-+		struct dentry *new;
-+		if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd)))
-+			return err;
-+		new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
-+		if (IS_ERR(new))
-+			return PTR_ERR(new);
-+		d_invalidate(dentry);
-+		dput(dentry);
-+		nd->dentry = dentry = new;
-+		counter++;
-+		if (counter < 10)
-+			goto revalidate_again;
-+		//printk("excessive revalidate_it loops\n");
-+		return -ESTALE;
-+	}
-+	return 0;
-+}
-+
- /*
-  * Name resolution.
-  * This is the basic name resolution function, turning a pathname into
-@@ -864,7 +911,11 @@ static fastcall int __link_path_walk(con
- 			goto out_dput;
- 
- 		if (inode->i_op->follow_link) {
-+			int save_flags = nd->flags;
-+			nd->flags |= LOOKUP_LINK_NOTLAST;
- 			err = do_follow_link(&next, nd);
-+			if (!(save_flags & LOOKUP_LINK_NOTLAST))
-+				nd->flags &= ~LOOKUP_LINK_NOTLAST;
- 			if (err)
- 				goto return_err;
- 			err = -ENOENT;
-@@ -899,6 +950,23 @@ last_component:
- 				inode = nd->dentry->d_inode;
- 				/* fallthrough */
- 			case 1:
-+				nd->flags |= LOOKUP_LAST;
-+				err = revalidate_special(nd);
-+				nd->flags &= ~LOOKUP_LAST;
-+				if (!nd->dentry->d_inode)
-+					err = -ENOENT;
-+				if (err) {
-+					path_release(nd);
-+					goto return_err;
-+				}
-+				if (lookup_flags & LOOKUP_DIRECTORY) {
-+					err = -ENOTDIR;
-+					if(!nd->dentry->d_inode->i_op ||
-+					  !nd->dentry->d_inode->i_op->lookup) {
-+						path_release(nd);
-+						goto return_err;
-+					}
-+				}
- 				goto return_reval;
- 		}
- 		if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
-@@ -906,7 +974,9 @@ last_component:
- 			if (err < 0)
- 				break;
- 		}
-+		nd->flags |= LOOKUP_LAST;
- 		err = do_lookup(nd, &this, &next);
-+		nd->flags &= ~LOOKUP_LAST;
- 		if (err)
- 			break;
- 		inode = next.dentry->d_inode;
-@@ -1066,7 +1136,7 @@ set_it:
- }
- 
- /* Returns 0 and nd will be valid on success; Retuns error, otherwise. */
--static int fastcall do_path_lookup(int dfd, const char *name,
-+static int fastcall do_path_lookup_it(int dfd, const char *name,
- 				unsigned int flags, struct nameidata *nd)
- {
- 	int retval = 0;
-@@ -1134,10 +1204,23 @@ fput_fail:
- 	goto out_fail;
- }
- 
--int fastcall path_lookup(const char *name, unsigned int flags,
-+static int fastcall do_path_lookup(int dfd, const char *name,
-+				unsigned int flags, struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_GETATTR);
-+	return do_path_lookup_it(dfd, name, flags, nd);
-+}
-+
-+int fastcall path_lookup_it(const char *name, unsigned int flags,
- 			struct nameidata *nd)
- {
--	return do_path_lookup(AT_FDCWD, name, flags, nd);
-+	return do_path_lookup_it(AT_FDCWD, name, flags, nd);
-+}
-+
-+int fastcall path_lookup(const char *name, unsigned int flags, struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_GETATTR);
-+	return path_lookup_it(name, flags, nd);
- }
- 
- static int __path_lookup_intent_open(int dfd, const char *name,
-@@ -1149,13 +1232,13 @@ static int __path_lookup_intent_open(int
- 
- 	if (filp == NULL)
- 		return -ENFILE;
--	nd->intent.open.file = filp;
--	nd->intent.open.flags = open_flags;
--	nd->intent.open.create_mode = create_mode;
--	err = do_path_lookup(dfd, name, lookup_flags|LOOKUP_OPEN, nd);
--	if (IS_ERR(nd->intent.open.file)) {
-+	nd->intent.file = filp;
-+	nd->intent.flags = open_flags;
-+	nd->intent.create_mode = create_mode;
-+	err = do_path_lookup_it(dfd, name, lookup_flags|LOOKUP_OPEN, nd);
-+	if (IS_ERR(nd->intent.file)) {
- 		if (err == 0) {
--			err = PTR_ERR(nd->intent.open.file);
-+			err = PTR_ERR(nd->intent.file);
- 			path_release(nd);
- 		}
- 	} else if (err != 0)
-@@ -1172,10 +1255,10 @@ static int __path_lookup_intent_open(int
-  * @open_flags: open intent flags
-  */
- int path_lookup_open(int dfd, const char *name, unsigned int lookup_flags,
--		struct nameidata *nd, int open_flags)
-+		struct nameidata *nd, int open_flags, int create_mode)
- {
- 	return __path_lookup_intent_open(dfd, name, lookup_flags, nd,
--			open_flags, 0);
-+			open_flags, create_mode);
- }
- 
- /**
-@@ -1258,7 +1341,7 @@ struct dentry * lookup_hash(struct namei
- }
- 
- /* SMP-safe */
--struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
- {
- 	unsigned long hash;
- 	struct qstr this;
-@@ -1278,11 +1361,17 @@ struct dentry * lookup_one_len(const cha
- 	}
- 	this.hash = end_name_hash(hash);
- 
--	return __lookup_hash(&this, base, NULL);
-+	return __lookup_hash(&this, base, nd);
- access:
- 	return ERR_PTR(-EACCES);
- }
- 
-+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+{
-+ 	return lookup_one_len_it(name, base, len, NULL);
-+}
-+
-+
- /*
-  *	namei()
-  *
-@@ -1294,22 +1383,36 @@ access:
-  * that namei follows links, while lnamei does not.
-  * SMP-safe
-  */
--int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags,
--			    struct nameidata *nd)
-+
-+int fastcall __user_walk_fd_it(int dfd, const char __user *name, unsigned flags,
-+			       struct nameidata *nd)
- {
- 	char *tmp = getname(name);
- 	int err = PTR_ERR(tmp);
- 
- 	if (!IS_ERR(tmp)) {
--		err = do_path_lookup(dfd, tmp, flags, nd);
-+		err = do_path_lookup_it(dfd, tmp, flags, nd);
- 		putname(tmp);
- 	}
- 	return err;
- }
- 
-+int fastcall __user_walk_fd(int dfd, const char __user *name, unsigned flags,
-+			    struct nameidata *nd)
-+{
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_fd_it(dfd, name, flags, nd);
-+}
-+
-+int fastcall __user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd)
-+{
-+	return __user_walk_fd_it(AT_FDCWD, name, flags, nd);
-+}
-+
- int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd)
- {
--	return __user_walk_fd(AT_FDCWD, name, flags, nd);
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_it(name, flags, nd);
- }
- 
- /*
-@@ -1545,7 +1648,7 @@ int may_open(struct nameidata *nd, int a
- 		if (!error) {
- 			DQUOT_INIT(inode);
- 			
--			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL);
-+			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL, 1);
- 		}
- 		put_write_access(inode);
- 		if (error)
-@@ -1595,7 +1698,7 @@ int open_namei(int dfd, const char *path
- 	 */
- 	if (!(flag & O_CREAT)) {
- 		error = path_lookup_open(dfd, pathname, lookup_flags(flag),
--					 nd, flag);
-+					 nd, flag, mode);
- 		if (error)
- 			return error;
- 		goto ok;
-@@ -1604,6 +1707,7 @@ int open_namei(int dfd, const char *path
- 	/*
- 	 * Create - we need to know the parent.
- 	 */
-+ 	nd->intent.it_op |= IT_CREAT;
- 	error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode);
- 	if (error)
- 		return error;
-@@ -1620,7 +1724,9 @@ int open_namei(int dfd, const char *path
- 	dir = nd->dentry;
- 	nd->flags &= ~LOOKUP_PARENT;
- 	mutex_lock(&dir->d_inode->i_mutex);
-+	nd->flags |= LOOKUP_LAST;
- 	path.dentry = lookup_hash(nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	path.mnt = nd->mnt;
- 
- do_last:
-@@ -1630,9 +1736,9 @@ do_last:
- 		goto exit;
- 	}
- 
--	if (IS_ERR(nd->intent.open.file)) {
-+	if (IS_ERR(nd->intent.file)) {
- 		mutex_unlock(&dir->d_inode->i_mutex);
--		error = PTR_ERR(nd->intent.open.file);
-+		error = PTR_ERR(nd->intent.file);
- 		goto exit_dput;
- 	}
- 
-@@ -1687,7 +1793,7 @@ ok:
- exit_dput:
- 	dput_path(&path, nd);
- exit:
--	if (!IS_ERR(nd->intent.open.file))
-+	if (!IS_ERR(nd->intent.file))
- 		release_open_intent(nd);
- 	path_release(nd);
- 	return error;
-@@ -1736,7 +1842,9 @@ do_link:
- 	}
- 	dir = nd->dentry;
- 	mutex_lock(&dir->d_inode->i_mutex);
-+	nd->flags |= LOOKUP_LAST;
- 	path.dentry = lookup_hash(nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	path.mnt = nd->mnt;
- 	__putname(nd->last.name);
- 	goto do_last;
-@@ -1821,15 +1929,26 @@ asmlinkage long sys_mknodat(int dfd, con
- 	struct dentry * dentry;
- 	struct nameidata nd;
- 
-+
- 	if (S_ISDIR(mode))
- 		return -EPERM;
- 	tmp = getname(filename);
- 	if (IS_ERR(tmp))
- 		return PTR_ERR(tmp);
- 
--	error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd);
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	error = do_path_lookup_it(dfd, tmp, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
-+
-+	if (nd.dentry->d_inode->i_op->mknod_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->mknod_raw(&nd, mode, dev);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out2;
-+	}
-+
- 	dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(dentry);
- 
-@@ -1856,6 +1975,7 @@ asmlinkage long sys_mknodat(int dfd, con
- 		dput(dentry);
- 	}
- 	mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 	path_release(&nd);
- out:
- 	putname(tmp);
-@@ -1901,9 +2021,18 @@ asmlinkage long sys_mkdirat(int dfd, con
- 		struct dentry *dentry;
- 		struct nameidata nd;
- 
--		error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd);
-+ 		intent_init(&nd.intent, IT_LOOKUP);
-+		error = do_path_lookup_it(dfd, tmp, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+ 		if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+ 			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 			error = op->mkdir_raw(&nd, mode);
-+ 			/* the file system wants to use normal vfs path now */
-+ 			if (error != -EOPNOTSUPP)
-+ 				goto out2;
-+ 		}
-+
- 		dentry = lookup_create(&nd, 1);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1913,6 +2042,7 @@ asmlinkage long sys_mkdirat(int dfd, con
- 			dput(dentry);
- 		}
- 		mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(tmp);
-@@ -1997,8 +2127,9 @@ static long do_rmdir(int dfd, const char
- 	name = getname(pathname);
- 	if(IS_ERR(name))
- 		return PTR_ERR(name);
--
--	error = do_path_lookup(dfd, name, LOOKUP_PARENT, &nd);
-+		
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	error = do_path_lookup_it(dfd, name, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto exit;
- 
-@@ -2013,6 +2144,14 @@ static long do_rmdir(int dfd, const char
- 			error = -EBUSY;
- 			goto exit1;
- 	}
-+	if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+                struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+                error = op->rmdir_raw(&nd);
-+                /* the file system wants to use normal vfs path now */
-+                if (error != -EOPNOTSUPP)
-+                        goto exit1;
-+        }
- 	mutex_lock(&nd.dentry->d_inode->i_mutex);
- 	dentry = lookup_hash(&nd);
- 	error = PTR_ERR(dentry);
-@@ -2081,12 +2220,20 @@ static long do_unlinkat(int dfd, const c
- 	if(IS_ERR(name))
- 		return PTR_ERR(name);
- 
--	error = do_path_lookup(dfd, name, LOOKUP_PARENT, &nd);
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	error = do_path_lookup_it(dfd, name, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto exit;
- 	error = -EISDIR;
- 	if (nd.last_type != LAST_NORM)
- 		goto exit1;
-+	if (nd.dentry->d_inode->i_op->unlink_raw) {
-+        	struct inode_operations *op = nd.dentry->d_inode->i_op;
-+        	error = op->unlink_raw(&nd);
-+                /* the file system wants to use normal vfs path now */
-+        	if (error != -EOPNOTSUPP)
-+                       goto exit1;
-+        }
- 	mutex_lock(&nd.dentry->d_inode->i_mutex);
- 	dentry = lookup_hash(&nd);
- 	error = PTR_ERR(dentry);
-@@ -2169,9 +2316,17 @@ asmlinkage long sys_symlinkat(const char
- 		struct dentry *dentry;
- 		struct nameidata nd;
- 
--		error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
-+ 		intent_init(&nd.intent, IT_LOOKUP);
-+		error = do_path_lookup_it(newdfd, to, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+		if (nd.dentry->d_inode->i_op->symlink_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 			error = op->symlink_raw(&nd, from);
-+ 			/* the file system wants to use normal vfs path now */
-+ 			if (error != -EOPNOTSUPP)
-+ 				goto out2;
-+ 		}
- 		dentry = lookup_create(&nd, 0);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -2179,6 +2334,7 @@ asmlinkage long sys_symlinkat(const char
- 			dput(dentry);
- 		}
- 		mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(to);
-@@ -2255,15 +2411,25 @@ asmlinkage long sys_linkat(int olddfd, c
- 	if (IS_ERR(to))
- 		return PTR_ERR(to);
- 
--	error = __user_walk_fd(olddfd, oldname, 0, &old_nd);
-+        intent_init(&old_nd.intent, IT_LOOKUP);
-+	error = __user_walk_fd_it(olddfd, oldname, 0, &old_nd);
- 	if (error)
- 		goto exit;
--	error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
-+		
-+	intent_init(&nd.intent, IT_LOOKUP);		
-+	error = do_path_lookup_it(newdfd, to, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
- 	error = -EXDEV;
- 	if (old_nd.mnt != nd.mnt)
- 		goto out_release;
-+	if (nd.dentry->d_inode->i_op->link_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->link_raw(&old_nd, &nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out_release;
-+	}
- 	new_dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(new_dentry);
- 	if (!IS_ERR(new_dentry)) {
-@@ -2440,12 +2606,14 @@ static int do_rename(int olddfd, const c
- 	struct dentry * old_dentry, *new_dentry;
- 	struct dentry * trap;
- 	struct nameidata oldnd, newnd;
--
--	error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd);
-+	
-+	intent_init(&oldnd.intent, IT_LOOKUP);
-+	error = do_path_lookup_it(olddfd, oldname, LOOKUP_PARENT, &oldnd);
- 	if (error)
- 		goto exit;
--
--	error = do_path_lookup(newdfd, newname, LOOKUP_PARENT, &newnd);
-+		
-+	intent_init(&newnd.intent, IT_LOOKUP);
-+	error = do_path_lookup_it(newdfd, newname, LOOKUP_PARENT, &newnd);
- 	if (error)
- 		goto exit1;
- 
-@@ -2462,6 +2630,13 @@ static int do_rename(int olddfd, const c
- 	if (newnd.last_type != LAST_NORM)
- 		goto exit2;
- 
-+	if (old_dir->d_inode->i_op->rename_raw) {
-+		error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit2;
-+	}
-+
- 	trap = lock_rename(new_dir, old_dir);
- 
- 	old_dentry = lookup_hash(&oldnd);
-@@ -2493,8 +2668,7 @@ static int do_rename(int olddfd, const c
- 	if (new_dentry == trap)
- 		goto exit5;
- 
--	error = vfs_rename(old_dir->d_inode, old_dentry,
--				   new_dir->d_inode, new_dentry);
-+	error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
- exit5:
- 	dput(new_dentry);
- exit4:
-@@ -2700,6 +2874,7 @@ EXPORT_SYMBOL(__page_symlink);
- EXPORT_SYMBOL(page_symlink);
- EXPORT_SYMBOL(page_symlink_inode_operations);
- EXPORT_SYMBOL(path_lookup);
-+EXPORT_SYMBOL(path_lookup_it);
- EXPORT_SYMBOL(path_release);
- EXPORT_SYMBOL(path_walk);
- EXPORT_SYMBOL(permission);
-Index: LINUX-SRC-TREE/fs/namespace.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/namespace.c
-+++ LINUX-SRC-TREE/fs/namespace.c
-@@ -75,6 +75,7 @@ struct vfsmount *alloc_vfsmnt(const char
- 		INIT_LIST_HEAD(&mnt->mnt_share);
- 		INIT_LIST_HEAD(&mnt->mnt_slave_list);
- 		INIT_LIST_HEAD(&mnt->mnt_slave);
-+		INIT_LIST_HEAD(&mnt->mnt_lustre_list);
- 		if (name) {
- 			int size = strlen(name) + 1;
- 			char *newname = kmalloc(size, GFP_KERNEL);
-@@ -155,6 +156,7 @@ static void __touch_namespace(struct nam
- 
- static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)
- {
-+	memset(old_nd, 0, sizeof(*old_nd));
- 	old_nd->dentry = mnt->mnt_mountpoint;
- 	old_nd->mnt = mnt->mnt_parent;
- 	mnt->mnt_parent = mnt;
-@@ -273,6 +275,9 @@ static inline void __mntput(struct vfsmo
- {
- 	struct super_block *sb = mnt->mnt_sb;
- 	dput(mnt->mnt_root);
-+	spin_lock(&dcache_lock);
-+	list_del(&mnt->mnt_lustre_list);
-+	spin_unlock(&dcache_lock);
- 	free_vfsmnt(mnt);
- 	deactivate_super(sb);
- }
-@@ -539,6 +544,8 @@ static int do_umount(struct vfsmount *mn
- 	 */
- 
- 	lock_kernel();
-+ 	if (sb->s_op->umount_lustre)
-+ 		sb->s_op->umount_lustre(sb);
- 	if ((flags & MNT_FORCE) && sb->s_op->umount_begin)
- 		sb->s_op->umount_begin(sb);
- 	unlock_kernel();
-@@ -871,7 +878,8 @@ static int do_loopback(struct nameidata 
- 		return err;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
--	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
-+	err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
- 
-@@ -956,7 +964,8 @@ static int do_move_mount(struct nameidat
- 		return -EPERM;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
--	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
-+	err = path_lookup_it(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
- 
-@@ -1271,6 +1280,7 @@ long do_mount(char *dev_name, char *dir_
- 	int retval = 0;
- 	int mnt_flags = 0;
- 
-+
- 	/* Discard magic */
- 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
- 		flags &= ~MS_MGC_MSK;
-@@ -1301,7 +1311,8 @@ long do_mount(char *dev_name, char *dir_
- 		   MS_NOATIME | MS_NODIRATIME);
- 
- 	/* ... and get the mountpoint */
--	retval = path_lookup(dir_name, LOOKUP_FOLLOW, &nd);
-+	intent_init(&nd.intent, IT_LOOKUP);	
-+	retval = path_lookup_it(dir_name, LOOKUP_FOLLOW, &nd);
- 	if (retval)
- 		return retval;
- 
-Index: LINUX-SRC-TREE/fs/nfs/dir.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/nfs/dir.c
-+++ LINUX-SRC-TREE/fs/nfs/dir.c
-@@ -834,7 +834,7 @@ int nfs_is_exclusive_create(struct inode
- 		return 0;
- 	if (nd == NULL || nfs_lookup_check_intent(nd, LOOKUP_CREATE) == 0)
- 		return 0;
--	return (nd->intent.open.flags & O_EXCL) != 0;
-+	return (nd->intent.it_flags & O_EXCL) != 0;
- }
- 
- static struct dentry *nfs_lookup(struct inode *dir, struct dentry * dentry, struct nameidata *nd)
-@@ -911,7 +911,7 @@ static int is_atomic_open(struct inode *
- 	if (nd->flags & LOOKUP_DIRECTORY)
- 		return 0;
- 	/* Are we trying to write to a read only partition? */
--	if (IS_RDONLY(dir) && (nd->intent.open.flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
-+	if (IS_RDONLY(dir) && (nd->intent.it_flags & (O_CREAT|O_TRUNC|FMODE_WRITE)))
- 		return 0;
- 	return 1;
- }
-@@ -932,7 +932,7 @@ static struct dentry *nfs_atomic_lookup(
- 	dentry->d_op = NFS_PROTO(dir)->dentry_ops;
- 
- 	/* Let vfs_create() deal with O_EXCL */
--	if (nd->intent.open.flags & O_EXCL) {
-+ 	if (nd->intent.it_flags & O_EXCL) {
- 		d_add(dentry, NULL);
- 		goto out;
- 	}
-@@ -947,7 +947,7 @@ static struct dentry *nfs_atomic_lookup(
- 		goto out;
- 	}
- 
--	if (nd->intent.open.flags & O_CREAT) {
-+	if (nd->intent.it_flags & O_CREAT) {
- 		nfs_begin_data_update(dir);
- 		res = nfs4_atomic_open(dir, dentry, nd);
- 		nfs_end_data_update(dir);
-@@ -966,7 +966,7 @@ static struct dentry *nfs_atomic_lookup(
- 			case -ENOTDIR:
- 				goto no_open;
- 			case -ELOOP:
--				if (!(nd->intent.open.flags & O_NOFOLLOW))
-+				if (!(nd->intent.it_flags & O_NOFOLLOW))
- 					goto no_open;
- 			/* case -EINVAL: */
- 			default:
-@@ -1002,7 +1002,7 @@ static int nfs_open_revalidate(struct de
- 	/* NFS only supports OPEN on regular files */
- 	if (!S_ISREG(inode->i_mode))
- 		goto no_open;
--	openflags = nd->intent.open.flags;
-+	openflags = nd->intent.it_flags;
- 	/* We cannot do exclusive creation on a positive dentry */
- 	if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
- 		goto no_open;
-@@ -1138,7 +1138,7 @@ static int nfs_create(struct inode *dir,
- 	attr.ia_valid = ATTR_MODE;
- 
- 	if (nd && (nd->flags & LOOKUP_CREATE))
--		open_flags = nd->intent.open.flags;
-+		open_flags = nd->intent.it_flags;
- 
- 	lock_kernel();
- 	nfs_begin_data_update(dir);
-Index: LINUX-SRC-TREE/fs/nfs/nfs4proc.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/nfs/nfs4proc.c
-+++ LINUX-SRC-TREE/fs/nfs/nfs4proc.c
-@@ -1220,7 +1220,7 @@ static void nfs4_intent_set_file(struct 
- 		ctx = (struct nfs_open_context *)filp->private_data;
- 		ctx->state = state;
- 	} else
--		nfs4_close_state(state, nd->intent.open.flags);
-+		nfs4_close_state(state, nd->intent.flags);
- }
- 
- struct dentry *
-@@ -1232,19 +1232,19 @@ nfs4_atomic_open(struct inode *dir, stru
- 	struct dentry *res;
- 
- 	if (nd->flags & LOOKUP_CREATE) {
--		attr.ia_mode = nd->intent.open.create_mode;
-+		attr.ia_mode = nd->intent.create_mode;
- 		attr.ia_valid = ATTR_MODE;
- 		if (!IS_POSIXACL(dir))
- 			attr.ia_mode &= ~current->fs->umask;
- 	} else {
- 		attr.ia_valid = 0;
--		BUG_ON(nd->intent.open.flags & O_CREAT);
-+		BUG_ON(nd->intent.flags & O_CREAT);
- 	}
- 
- 	cred = rpcauth_lookupcred(NFS_SERVER(dir)->client->cl_auth, 0);
- 	if (IS_ERR(cred))
- 		return (struct dentry *)cred;
--	state = nfs4_do_open(dir, dentry, nd->intent.open.flags, &attr, cred);
-+	state = nfs4_do_open(dir, dentry, nd->intent.flags, &attr, cred);
- 	put_rpccred(cred);
- 	if (IS_ERR(state)) {
- 		if (PTR_ERR(state) == -ENOENT)
-Index: LINUX-SRC-TREE/fs/nfsctl.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/nfsctl.c
-+++ LINUX-SRC-TREE/fs/nfsctl.c
-@@ -26,6 +26,7 @@ static struct file *do_open(char *name, 
- 	struct nameidata nd;
- 	int error;
- 
-+	intent_init(&nd.intent, IT_OPEN);
- 	nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL);
- 
- 	if (IS_ERR(nd.mnt))
-Index: LINUX-SRC-TREE/fs/open.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/open.c
-+++ LINUX-SRC-TREE/fs/open.c
-@@ -198,9 +198,10 @@ out:
- }
- 
- int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
--	struct file *filp)
-+	struct file *filp, int called_from_open)
- {
- 	int err;
-+	struct inode_operations *op = dentry->d_inode->i_op;
- 	struct iattr newattrs;
- 
- 	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -215,7 +216,17 @@ int do_truncate(struct dentry *dentry, l
- 	}
- 
- 	mutex_lock(&dentry->d_inode->i_mutex);
--	err = notify_change(dentry, &newattrs);
-+	if (called_from_open)
-+                newattrs.ia_valid |= ATTR_FROM_OPEN;
-+        if (op->setattr_raw) {
-+                newattrs.ia_valid |= ATTR_RAW;
-+                newattrs.ia_ctime = CURRENT_TIME;
-+                down_write(&dentry->d_inode->i_alloc_sem);
-+                err = op->setattr_raw(dentry->d_inode, &newattrs);
-+                up_write(&dentry->d_inode->i_alloc_sem);
-+        } else
-+                err = notify_change(dentry, &newattrs);
-+
- 	mutex_unlock(&dentry->d_inode->i_mutex);
- 	return err;
- }
-@@ -225,12 +236,12 @@ static long do_sys_truncate(const char _
- 	struct nameidata nd;
- 	struct inode * inode;
- 	int error;
--
-+	intent_init(&nd.intent, IT_GETATTR);
- 	error = -EINVAL;
- 	if (length < 0)	/* sorry, but loff_t says... */
- 		goto out;
- 
--	error = user_path_walk(path, &nd);
-+	error = user_path_walk_it(path, &nd);
- 	if (error)
- 		goto out;
- 	inode = nd.dentry->d_inode;
-@@ -270,7 +281,7 @@ static long do_sys_truncate(const char _
- 	error = locks_verify_truncate(inode, NULL, length);
- 	if (!error) {
- 		DQUOT_INIT(inode);
--		error = do_truncate(nd.dentry, length, 0, NULL);
-+		error = do_truncate(nd.dentry, length, 0, NULL, 0);
- 	}
- 	put_write_access(inode);
- 
-@@ -322,7 +333,7 @@ static long do_sys_ftruncate(unsigned in
- 
- 	error = locks_verify_truncate(inode, file, length);
- 	if (!error)
--		error = do_truncate(dentry, length, 0, file);
-+		error = do_truncate(dentry, length, 0, file, 0);
- out_putf:
- 	fput(file);
- out:
-@@ -407,9 +418,20 @@ asmlinkage long sys_utime(char __user * 
- 		    (error = vfs_permission(&nd, MAY_WRITE)) != 0)
- 			goto dput_and_out;
- 	}
--	mutex_lock(&inode->i_mutex);
--	error = notify_change(nd.dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
-+ 	if (inode->i_op->setattr_raw) {
-+ 		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+ 		newattrs.ia_valid |= ATTR_RAW;
-+ 		error = op->setattr_raw(inode, &newattrs);
-+ 		/* the file system wants to use normal vfs path now */
-+ 		if (error != -EOPNOTSUPP)
-+ 			goto dput_and_out;
-+ 	} else {
-+		mutex_lock(&inode->i_mutex);
-+ 		error = notify_change(nd.dentry, &newattrs);
-+		mutex_unlock(&inode->i_mutex);
-+ 	}
-+
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -495,6 +517,7 @@ asmlinkage long sys_faccessat(int dfd, c
- 	int old_fsuid, old_fsgid;
- 	kernel_cap_t old_cap;
- 	int res;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (mode & ~S_IRWXO)	/* where's F_OK, X_OK, W_OK, R_OK? */
- 		return -EINVAL;
-@@ -519,7 +542,7 @@ asmlinkage long sys_faccessat(int dfd, c
- 	else
- 		current->cap_effective = current->cap_permitted;
- 
--	res = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
-+	res = __user_walk_fd_it(dfd, filename, LOOKUP_FOLLOW|LOOKUP_ACCESS, &nd);
- 	if (!res) {
- 		res = vfs_permission(&nd, mode);
- 		/* SuS v2 requires we report a read only fs too */
-@@ -545,8 +568,9 @@ asmlinkage long sys_chdir(const char __u
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW|LOOKUP_DIRECTORY, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -596,8 +620,9 @@ asmlinkage long sys_chroot(const char __
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	error = __user_walk(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
-+	error = __user_walk_it(filename, LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
- 	if (error)
- 		goto out;
- 
-@@ -618,38 +643,55 @@ out:
- 	return error;
- }
- 
--asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+int chmod_common(struct dentry *dentry, mode_t mode)
- {
--	struct inode * inode;
--	struct dentry * dentry;
--	struct file * file;
--	int err = -EBADF;
-+	struct inode * inode = dentry->d_inode;
- 	struct iattr newattrs;
-+	int error = -EROFS;
- 
--	file = fget(fd);
--	if (!file)
-+	if (IS_RDONLY(inode))
- 		goto out;
- 
--	dentry = file->f_dentry;
--	inode = dentry->d_inode;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
- 
--	audit_inode(NULL, inode);
-+		newattrs.ia_mode = mode;
-+		newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out;
-+	}
- 
--	err = -EROFS;
--	if (IS_RDONLY(inode))
--		goto out_putf;
--	err = -EPERM;
-+	error = -EPERM;
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto out_putf;
-+		goto out;
-+
- 	mutex_lock(&inode->i_mutex);
- 	if (mode == (mode_t) -1)
- 		mode = inode->i_mode;
- 	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
- 	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	err = notify_change(dentry, &newattrs);
-+	error = notify_change(dentry, &newattrs);
- 	mutex_unlock(&inode->i_mutex);
-+out:
-+	return error;
-+}
-+
-+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+{
-+	struct file * file;
-+	int err = -EBADF;
-+
-+	file = fget(fd);
-+	if (!file)
-+		goto out;
-+
-+	audit_inode(NULL, file->f_dentry->d_inode);
-+
-+	err = chmod_common(file->f_dentry, mode);
- 
--out_putf:
- 	fput(file);
- out:
- 	return err;
-@@ -659,32 +701,12 @@ asmlinkage long sys_fchmodat(int dfd, co
- 			     mode_t mode)
- {
- 	struct nameidata nd;
--	struct inode * inode;
- 	int error;
--	struct iattr newattrs;
- 
- 	error = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd);
- 	if (error)
- 		goto out;
--	inode = nd.dentry->d_inode;
--
--	error = -EROFS;
--	if (IS_RDONLY(inode))
--		goto dput_and_out;
--
--	error = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto dput_and_out;
--
--	mutex_lock(&inode->i_mutex);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	error = notify_change(nd.dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
--
--dput_and_out:
-+	error = chmod_common(nd.dentry, mode);
- 	path_release(&nd);
- out:
- 	return error;
-@@ -710,6 +732,18 @@ static int chown_common(struct dentry * 
- 	if (IS_RDONLY(inode))
- 		goto out;
- 	error = -EPERM;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_uid = user;
-+		newattrs.ia_gid = group;
-+		newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			return error;
-+	}
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto out;
- 	newattrs.ia_valid =  ATTR_CTIME;
-@@ -823,6 +857,7 @@ static struct file *__dentry_open(struct
- 		error = open(inode, f);
- 		if (error)
- 			goto cleanup_all;
-+		intent_release(f->f_it);
- 	}
- 
- 	f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
-@@ -849,6 +884,7 @@ cleanup_all:
- 	f->f_dentry = NULL;
- 	f->f_vfsmnt = NULL;
- cleanup_file:
-+	intent_release(f->f_it);
- 	put_filp(f);
- 	dput(dentry);
- 	mntput(mnt);
-@@ -874,6 +910,7 @@ static struct file *do_filp_open(int dfd
- {
- 	int namei_flags, error;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_OPEN);
- 
- 	namei_flags = flags;
- 	if ((namei_flags+1) & O_ACCMODE)
-@@ -910,19 +947,19 @@ EXPORT_SYMBOL(filp_open);
- struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
- 		int (*open)(struct inode *, struct file *))
- {
--	if (IS_ERR(nd->intent.open.file))
-+	if (IS_ERR(nd->intent.file))
- 		goto out;
- 	if (IS_ERR(dentry))
- 		goto out_err;
--	nd->intent.open.file = __dentry_open(dget(dentry), mntget(nd->mnt),
--					     nd->intent.open.flags - 1,
--					     nd->intent.open.file,
-+	nd->intent.file = __dentry_open(dget(dentry), mntget(nd->mnt),
-+					     nd->intent.flags - 1,
-+					     nd->intent.file,
- 					     open);
- out:
--	return nd->intent.open.file;
-+	return nd->intent.file;
- out_err:
- 	release_open_intent(nd);
--	nd->intent.open.file = (struct file *)dentry;
-+	nd->intent.file = (struct file *)dentry;
- 	goto out;
- }
- EXPORT_SYMBOL_GPL(lookup_instantiate_filp);
-@@ -939,7 +976,8 @@ struct file *nameidata_to_filp(struct na
- 	struct file *filp;
- 
- 	/* Pick up the filp from the open intent */
--	filp = nd->intent.open.file;
-+	filp = nd->intent.file;
-+	filp->f_it = &nd->intent;
- 	/* Has the filesystem initialised the file for us? */
- 	if (filp->f_dentry == NULL)
- 		filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL);
-Index: LINUX-SRC-TREE/fs/stat.c
-===================================================================
---- LINUX-SRC-TREE.orig/fs/stat.c
-+++ LINUX-SRC-TREE/fs/stat.c
-@@ -38,7 +38,7 @@ void generic_fillattr(struct inode *inod
- 
- EXPORT_SYMBOL(generic_fillattr);
- 
--int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
- {
- 	struct inode *inode = dentry->d_inode;
- 	int retval;
-@@ -47,6 +47,8 @@ int vfs_getattr(struct vfsmount *mnt, st
- 	if (retval)
- 		return retval;
- 
-+	if (inode->i_op->getattr_it)
-+		return inode->i_op->getattr_it(mnt, dentry, it, stat);
- 	if (inode->i_op->getattr)
- 		return inode->i_op->getattr(mnt, dentry, stat);
- 
-@@ -61,6 +63,11 @@ int vfs_getattr(struct vfsmount *mnt, st
- 	return 0;
- }
- 
-+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+{
-+	return vfs_getattr_it(mnt, dentry, NULL, stat);
-+}
-+
- EXPORT_SYMBOL(vfs_getattr);
- 
- int vfs_stat_fd(int dfd, char __user *name, struct kstat *stat)
-@@ -68,9 +75,10 @@ int vfs_stat_fd(int dfd, char __user *na
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_walk_fd(dfd, name, LOOKUP_FOLLOW, &nd);
-+ 	intent_init(&nd.intent, IT_GETATTR);
-+	error = __user_walk_fd_it(dfd, name, LOOKUP_FOLLOW, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+ 		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -88,9 +96,10 @@ int vfs_lstat_fd(int dfd, char __user *n
- 	struct nameidata nd;
- 	int error;
- 
--	error = __user_walk_fd(dfd, name, 0, &nd);
-+ 	intent_init(&nd.intent, IT_GETATTR);
-+	error = __user_walk_fd_it(dfd, name, 0, &nd);
- 	if (!error) {
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+ 		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 	}
- 	return error;
-@@ -107,9 +116,12 @@ int vfs_fstat(unsigned int fd, struct ks
- {
- 	struct file *f = fget(fd);
- 	int error = -EBADF;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (f) {
--		error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
-+		error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
-+		intent_release(&nd.intent);
- 		fput(f);
- 	}
- 	return error;
-Index: LINUX-SRC-TREE/include/linux/dcache.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/dcache.h
-+++ LINUX-SRC-TREE/include/linux/dcache.h
-@@ -36,6 +36,9 @@ struct qstr {
- 	const unsigned char *name;
- };
- 
-+struct inode;
-+#include <linux/namei.h>
-+
- struct dentry_stat_t {
- 	int nr_dentry;
- 	int nr_unused;
-Index: LINUX-SRC-TREE/include/linux/fs.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/fs.h
-+++ LINUX-SRC-TREE/include/linux/fs.h
-@@ -61,6 +61,7 @@ extern int dir_notify_enable;
- 
- #define FMODE_READ 1
- #define FMODE_WRITE 2
-+#define FMODE_EXEC 16
- 
- /* Internal kernel extensions */
- #define FMODE_LSEEK	4
-@@ -272,6 +273,8 @@ typedef void (dio_iodone_t)(struct kiocb
- #define ATTR_KILL_SUID	2048
- #define ATTR_KILL_SGID	4096
- #define ATTR_FILE	8192
-+#define ATTR_RAW       	16384	/* file system, not vfs will massage attrs */
-+#define ATTR_FROM_OPEN 	65536	/* called from open path, ie O_TRUNC */
- #define ATTR_NO_BLOCK	32768	/* Return EAGAIN and don't block on long truncates */
- 
- /*
-@@ -517,6 +520,7 @@ struct inode {
- 	struct block_device	*i_bdev;
- 	struct cdev		*i_cdev;
- 	int			i_cindex;
-+	void			*i_filterdata;
- 
- 	__u32			i_generation;
- 
-@@ -664,6 +668,7 @@ struct file {
- 	spinlock_t		f_ep_lock;
- #endif /* #ifdef CONFIG_EPOLL */
- 	struct address_space	*f_mapping;
-+ 	struct lookup_intent    *f_it;
- };
- extern spinlock_t files_lock;
- #define file_list_lock() spin_lock(&files_lock);
-@@ -1059,20 +1064,29 @@ struct inode_operations {
- 	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
- 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- 	int (*link) (struct dentry *,struct inode *,struct dentry *);
-+	int (*link_raw) (struct nameidata *,struct nameidata *);
- 	int (*unlink) (struct inode *,struct dentry *);
-+	int (*unlink_raw) (struct nameidata *);
- 	int (*symlink) (struct inode *,struct dentry *,const char *);
-+	int (*symlink_raw) (struct nameidata *,const char *);
- 	int (*mkdir) (struct inode *,struct dentry *,int);
-+	int (*mkdir_raw) (struct nameidata *,int);
- 	int (*rmdir) (struct inode *,struct dentry *);
-+	int (*rmdir_raw) (struct nameidata *);
- 	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
-+	int (*mknod_raw) (struct nameidata *,int,dev_t);
- 	int (*rename) (struct inode *, struct dentry *,
- 			struct inode *, struct dentry *);
-+	int (*rename_raw) (struct nameidata *, struct nameidata *);
- 	int (*readlink) (struct dentry *, char __user *,int);
- 	void * (*follow_link) (struct dentry *, struct nameidata *);
- 	void (*put_link) (struct dentry *, struct nameidata *, void *);
- 	void (*truncate) (struct inode *);
- 	int (*permission) (struct inode *, int, struct nameidata *);
- 	int (*setattr) (struct dentry *, struct iattr *);
-+	int (*setattr_raw) (struct inode *, struct iattr *);
- 	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
-+	int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
- 	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- 	ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
- 	ssize_t (*listxattr) (struct dentry *, char *, size_t);
-@@ -1113,6 +1127,7 @@ struct super_operations {
- 	int (*remount_fs) (struct super_block *, int *, char *);
- 	void (*clear_inode) (struct inode *);
- 	void (*umount_begin) (struct super_block *);
-+	void (*umount_lustre) (struct super_block *);
- 
- 	int (*show_options)(struct seq_file *, struct vfsmount *);
- 
-@@ -1322,6 +1337,7 @@ extern int may_umount_tree(struct vfsmou
- extern int may_umount(struct vfsmount *);
- extern void umount_tree(struct vfsmount *, int, struct list_head *);
- extern void release_mounts(struct list_head *);
-+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
- extern long do_mount(char *, char *, char *, unsigned long, void *);
- extern struct vfsmount *copy_tree(struct vfsmount *, struct dentry *, int);
- extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *,
-@@ -1378,11 +1394,12 @@ static inline int break_lease(struct ino
- /* fs/open.c */
- 
- extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
--		       struct file *filp);
-+		       struct file *filp, int called_from_open);
- extern long do_sys_open(int fdf, const char __user *filename, int flags,
- 			int mode);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
-+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
- extern int filp_close(struct file *, fl_owner_t id);
- extern char * getname(const char __user *);
- 
-Index: LINUX-SRC-TREE/include/linux/mount.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/mount.h
-+++ LINUX-SRC-TREE/include/linux/mount.h
-@@ -46,6 +46,8 @@ struct vfsmount {
- 	struct list_head mnt_slave;	/* slave list entry */
- 	struct vfsmount *mnt_master;	/* slave is on master->mnt_slave_list */
- 	struct namespace *mnt_namespace; /* containing namespace */
-+ 	struct list_head mnt_lustre_list; /* GNS mount list */
-+ 	unsigned long mnt_last_used;	/* for GNS auto-umount (jiffies) */
- 	int mnt_pinned;
- };
- 
-Index: LINUX-SRC-TREE/include/linux/namei.h
-===================================================================
---- LINUX-SRC-TREE.orig/include/linux/namei.h
-+++ LINUX-SRC-TREE/include/linux/namei.h
-@@ -5,10 +5,39 @@
- 
- struct vfsmount;
- 
-+#define IT_OPEN                (1)
-+#define IT_CREAT       (1<<1)
-+#define IT_READDIR     (1<<2)
-+#define IT_GETATTR     (1<<3)
-+#define IT_LOOKUP      (1<<4)
-+#define IT_UNLINK      (1<<5)
-+#define IT_TRUNC       (1<<6)
-+#define IT_GETXATTR    (1<<7)
-+
-+struct lustre_intent_data {
-+	int     it_disposition;
-+	int     it_status;
-+	__u64   it_lock_handle;
-+	void    *it_data;
-+	int     it_lock_mode;
-+};
-+
-+#define INTENT_MAGIC 0x19620323
-+
-+#define it_flags flags
-+#define it_create_mode create_mode
-+#define lookup_intent open_intent
-+
- struct open_intent {
--	int	flags;
--	int	create_mode;
--	struct file *file;
-+       	int     it_magic;
-+       	void    (*it_op_release)(struct open_intent *);
-+       	int     it_op;
-+       	int     flags;
-+       	int     create_mode;
-+	struct  file *file;
-+       	union {
-+                struct lustre_intent_data lustre;
-+       	} d;
- };
- 
- enum { MAX_NESTED_LINKS = 8 };
-@@ -22,12 +51,23 @@ struct nameidata {
- 	unsigned	depth;
- 	char *saved_names[MAX_NESTED_LINKS + 1];
- 
--	/* Intent data */
--	union {
--		struct open_intent open;
--	} intent;
-+	struct lookup_intent intent;
- };
- 
-+static inline void intent_reset_fs_part(struct lookup_intent *it)
-+{
-+        memset(&it->d, 0, sizeof(it->d));
-+        it->it_magic = INTENT_MAGIC;
-+        it->it_op_release = NULL;
-+}
-+
-+static inline void intent_init(struct lookup_intent *it, int op)
-+{
-+	memset(it, 0, sizeof(*it));
-+	it->it_magic = INTENT_MAGIC;
-+	it->it_op = op;
-+}
-+
- /*
-  * Type of the last component on LOOKUP_PARENT
-  */
-@@ -48,6 +88,8 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
- #define LOOKUP_PARENT		16
- #define LOOKUP_NOALT		32
- #define LOOKUP_REVAL		64
-+#define LOOKUP_LAST		(0x1000)
-+#define LOOKUP_LINK_NOTLAST	(0x2000)
- /*
-  * Intent data
-  */
-@@ -57,18 +99,29 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA
- 
- extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
- extern int FASTCALL(__user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *));
-+extern int FASTCALL(__user_walk_fd_it(int dfd, const char __user *, unsigned, struct nameidata *));
- #define user_path_walk(name,nd) \
- 	__user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd)
- #define user_path_walk_link(name,nd) \
- 	__user_walk_fd(AT_FDCWD, name, 0, nd)
-+
-+extern int FASTCALL(__user_walk_it(const char __user *name, unsigned flags, struct nameidata *nd));
-+#define user_path_walk_it(name,nd) \
-+ 	__user_walk_it(name, LOOKUP_FOLLOW, nd)
-+#define user_path_walk_link_it(name,nd) \
-+ 	__user_walk_it(name, 0, nd)
-+extern void intent_release(struct lookup_intent *);
-+
- extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
-+extern int FASTCALL(path_lookup_it(const char *, unsigned, struct nameidata *));
- extern int FASTCALL(path_walk(const char *, struct nameidata *));
- extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
- extern void path_release(struct nameidata *);
- extern void path_release_on_umount(struct nameidata *);
- 
- extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags);
--extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
-+extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, 
-+			    int open_flags, int create_mode);
- extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
- 		int (*open)(struct inode *, struct file *));
- extern struct file *nameidata_to_filp(struct nameidata *nd, int flags);
diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch
deleted file mode 100644
index 862b94f0cfd76a9ec8a647d5a95261d43d66b5da..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch
+++ /dev/null
@@ -1,833 +0,0 @@
-Index: linux-2.6.5-12.1/fs/exec.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/exec.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/exec.c	2004-06-03 18:31:28.000000000 -0400
-@@ -125,9 +125,10 @@
- 	struct nameidata nd;
- 	int error;
- 
--	nd.intent.open.flags = FMODE_READ;
-+	intent_init(&nd.intent, IT_OPEN);
- 
--	FSHOOK_BEGIN_USER_WALK(open,
-+	nd.intent.it_flags = FMODE_READ|FMODE_EXEC;
-+	FSHOOK_BEGIN_USER_WALK_IT(open,
- 		error,
- 		library,
- 		LOOKUP_FOLLOW|LOOKUP_OPEN,
-@@ -144,7 +145,7 @@
- 		goto out;
- 	}
- 
--	file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
-+	file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
- 	error = PTR_ERR(file);
- 	if (IS_ERR(file))
- 		goto out;
-@@ -495,8 +496,9 @@
- 
- 	FSHOOK_BEGIN(open, err, .filename = name, .flags = O_RDONLY)
- 
--	nd.intent.open.flags = FMODE_READ;
--	err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_OPEN, &nd);
-+	intent_init(&nd.intent, IT_OPEN);
-+	nd.intent.it_flags = FMODE_READ|FMODE_EXEC;
-+	err = path_lookup(name, LOOKUP_FOLLOW, &nd);
- 	file = ERR_PTR(err);
- 
- 	if (!err) {
-@@ -509,7 +511,7 @@
- 				err = -EACCES;
- 			file = ERR_PTR(err);
- 			if (!err) {
--				file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
-+				file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &nd.intent);
- 				if (!IS_ERR(file)) {
- 					err = deny_write_access(file);
- 					if (err) {
-Index: linux-2.6.5-12.1/fs/namei.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/namei.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/namei.c	2004-06-03 18:42:17.000000000 -0400
-@@ -270,8 +270,19 @@
- 	return 0;
- }
- 
-+void intent_release(struct lookup_intent *it)
-+{
-+	if (!it)
-+		return;
-+	if (it->it_magic != INTENT_MAGIC)
-+		return;
-+	if (it->it_op_release)
-+		it->it_op_release(it);
-+}
-+
- void path_release(struct nameidata *nd)
- {
-+	intent_release(&nd->intent);
- 	dput(nd->dentry);
- 	mntput(nd->mnt);
- }
-@@ -348,7 +359,10 @@
- {
- 	struct dentry * result;
- 	struct inode *dir = parent->d_inode;
-+	int counter = 0;
- 
-+again:
-+	counter++;
- 	down(&dir->i_sem);
- 	/*
- 	 * First re-do the cached lookup just in case it was created
-@@ -387,7 +401,10 @@
- 	if (result->d_op && result->d_op->d_revalidate) {
- 		if (!result->d_op->d_revalidate(result, nd) && !d_invalidate(result)) {
- 			dput(result);
--			result = ERR_PTR(-ENOENT);
-+			if (counter > 10)
-+				result = ERR_PTR(-ESTALE);
-+			if (!IS_ERR(result))
-+				goto again;
- 		}
- 	}
- 	return result;
-@@ -564,6 +581,33 @@
- 	return PTR_ERR(dentry);
- }
- 
-+static int revalidate_special(struct nameidata *nd)
-+{
-+	struct dentry *dentry = nd->dentry;
-+	int err, counter = 0;
-+
-+ revalidate_again:
-+	if (!dentry->d_op || !dentry->d_op->d_revalidate)
-+		return 0;
-+	if (!dentry->d_op->d_revalidate(dentry, nd)) {
-+		struct dentry *new;
-+		if ((err = permission(dentry->d_parent->d_inode, MAY_EXEC, nd)))
-+			return err;
-+		new = real_lookup(dentry->d_parent, &dentry->d_name, nd);
-+		if (IS_ERR(new))
-+			return PTR_ERR(new);
-+		d_invalidate(dentry);
-+		dput(dentry);
-+		nd->dentry = dentry = new;
-+		counter++;
-+		if (counter < 10)
-+			goto revalidate_again;
-+		//printk("excessive revalidate_it loops\n");
-+		return -ESTALE;
-+	}
-+	return 0;
-+}
-+
- /*
-  * Name resolution.
-  *
-@@ -664,8 +708,12 @@
- 			goto out_dput;
- 
- 		if (inode->i_op->follow_link) {
-+			int save_flags = nd->flags;
- 			mntget(next.mnt);
-+			nd->flags |= LOOKUP_LINK_NOTLAST;
- 			err = do_follow_link(next.dentry, nd);
-+			if (!(save_flags & LOOKUP_LINK_NOTLAST))
-+				nd->flags &= ~LOOKUP_LINK_NOTLAST;
- 			dput(next.dentry);
- 			mntput(next.mnt);
- 			if (err)
-@@ -703,14 +749,34 @@
- 				inode = nd->dentry->d_inode;
- 				/* fallthrough */
- 			case 1:
-+				nd->flags |= LOOKUP_LAST;
-+				err = revalidate_special(nd);
-+				nd->flags &= ~LOOKUP_LAST;
-+				if (!nd->dentry->d_inode)
-+					err = -ENOENT;
-+				if (err) {
-+					path_release(nd);
-+					goto return_err;
-+				}
-+				if (lookup_flags & LOOKUP_DIRECTORY) {
-+					err = -ENOTDIR;
-+					if(!nd->dentry->d_inode->i_op ||
-+					  !nd->dentry->d_inode->i_op->lookup) {
-+						path_release(nd);
-+						goto return_err;
-+					}
-+				}
- 				goto return_reval;
- 		}
-+
- 		if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
- 			err = nd->dentry->d_op->d_hash(nd->dentry, &this);
- 			if (err < 0)
- 				break;
- 		}
-+		nd->flags |= LOOKUP_LAST;
- 		err = do_lookup(nd, &this, &next);
-+		nd->flags &= ~LOOKUP_LAST;
- 		if (err)
- 			break;
- 		follow_mount(&next.mnt, &next.dentry);
-@@ -936,7 +992,7 @@
- }
- 
- /* SMP-safe */
--struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd)
- {
- 	unsigned long hash;
- 	struct qstr this;
-@@ -956,11 +1012,16 @@
- 	}
- 	this.hash = end_name_hash(hash);
- 
--	return lookup_hash(&this, base);
-+	return __lookup_hash(&this, base, nd);
- access:
- 	return ERR_PTR(-EACCES);
- }
- 
-+struct dentry * lookup_one_len(const char * name, struct dentry * base, int len)
-+{
-+	return lookup_one_len_it(name, base, len, NULL);
-+}
-+
- /*
-  *	namei()
-  *
-@@ -972,7 +1033,8 @@
-  * that namei follows links, while lnamei does not.
-  * SMP-safe
-  */
--int fastcall __user_walk(const char __user *name, unsigned flags, struct nameidata *nd, const char **pname)
-+int fastcall __user_walk_it(const char __user *name, unsigned flags,
-+			    struct nameidata *nd, const char **pname)
- {
- 	char *tmp = getname(name);
- 	int err = PTR_ERR(tmp);
-@@ -987,6 +1049,13 @@
- 	return err;
- }
- 
-+int fastcall __user_walk(const char __user *name, unsigned flags,
-+			 struct nameidata *nd, const char **pname)
-+{
-+	intent_init(&nd->intent, IT_LOOKUP);
-+	return __user_walk_it(name, flags, nd, pname);
-+}
-+
- /*
-  * It's inline, so penalty for filesystems that don't use sticky bit is
-  * minimal.
-@@ -1259,8 +1328,8 @@
- 		acc_mode |= MAY_APPEND;
- 
- 	/* Fill in the open() intent data */
--	nd->intent.open.flags = flag;
--	nd->intent.open.create_mode = mode;
-+	nd->intent.it_flags = flag;
-+	nd->intent.it_create_mode = mode;
- 
- 	/*
- 	 * The simplest case - just a plain lookup.
-@@ -1275,6 +1344,7 @@
- 	/*
- 	 * Create - we need to know the parent.
- 	 */
-+	nd->intent.it_op |= IT_CREAT;
- 	error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
- 	if (error)
- 		return error;
-@@ -1291,7 +1361,9 @@
- 	dir = nd->dentry;
- 	nd->flags &= ~LOOKUP_PARENT;
- 	down(&dir->d_inode->i_sem);
-+	nd->flags |= LOOKUP_LAST;
- 	dentry = __lookup_hash(&nd->last, nd->dentry, nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 
- do_last:
- 	error = PTR_ERR(dentry);
-@@ -1396,7 +1468,9 @@
- 	}
- 	dir = nd->dentry;
- 	down(&dir->d_inode->i_sem);
-+	nd->flags |= LOOKUP_LAST;
- 	dentry = __lookup_hash(&nd->last, nd->dentry, nd);
-+	nd->flags &= ~LOOKUP_LAST;
- 	putname(nd->last.name);
- 	goto do_last;
- }
-@@ -2196,7 +2270,9 @@
- __vfs_follow_link(struct nameidata *nd, const char *link)
- {
- 	int res = 0;
-+	struct lookup_intent it = nd->intent;
- 	char *name;
-+
- 	if (IS_ERR(link))
- 		goto fail;
- 
-@@ -2206,6 +2282,10 @@
- 			/* weird __emul_prefix() stuff did it */
- 			goto out;
- 	}
-+
-+	intent_init(&nd->intent, it.it_op);
-+	nd->intent.it_flags = it.it_flags;
-+	nd->intent.it_create_mode = it.it_create_mode;
- 	res = link_path_walk(link, nd);
- out:
- 	if (current->link_count || res || nd->last_type!=LAST_NORM)
-Index: linux-2.6.5-12.1/fs/namespace.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/namespace.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/namespace.c	2004-06-03 18:31:28.000000000 -0400
-@@ -108,6 +108,7 @@
- 
- static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd)
- {
-+	memset(old_nd, 0, sizeof(*old_nd));
- 	old_nd->dentry = mnt->mnt_mountpoint;
- 	old_nd->mnt = mnt->mnt_parent;
- 	mnt->mnt_parent = mnt;
-@@ -533,6 +534,8 @@
- 		return err;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
-+
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
-@@ -601,6 +604,7 @@
- 		return -EPERM;
- 	if (!old_name || !*old_name)
- 		return -EINVAL;
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 	err = path_lookup(old_name, LOOKUP_FOLLOW, &old_nd);
- 	if (err)
- 		return err;
-@@ -750,6 +754,7 @@
- 	int retval = 0;
- 	int mnt_flags = 0;
- 
-+	intent_init(&nd.intent, IT_LOOKUP);
- 	/* Discard magic */
- 	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
- 		flags &= ~MS_MGC_MSK;
-Index: linux-2.6.5-12.1/fs/open.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/open.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/open.c	2004-06-03 18:31:28.000000000 -0400
-@@ -227,12 +227,12 @@
- 	struct nameidata nd;
- 	struct inode * inode;
- 	int error;
--
-+	intent_init(&nd.intent, IT_GETATTR);
- 	error = -EINVAL;
- 	if (length < 0)	/* sorry, but loff_t says... */
- 		goto out;
- 
--	FSHOOK_BEGIN_USER_PATH_WALK(truncate, error, path, nd, filename, .length = length)
-+	FSHOOK_BEGIN_USER_PATH_WALK_IT(truncate, error, path, nd, filename, .length = length)
- 
- 	inode = nd.dentry->d_inode;
- 
-@@ -466,6 +466,7 @@
- 	int old_fsuid, old_fsgid;
- 	kernel_cap_t old_cap;
- 	int res;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	if (mode & ~S_IRWXO)	/* where's F_OK, X_OK, W_OK, R_OK? */
- 		return -EINVAL;
-@@ -490,7 +491,7 @@
- 	else
- 		current->cap_effective = current->cap_permitted;
- 
--	FSHOOK_BEGIN_USER_WALK(access,
-+	FSHOOK_BEGIN_USER_WALK_IT(access,
- 		res,
- 		filename,
- 		LOOKUP_FOLLOW|LOOKUP_ACCESS,
-@@ -506,6 +507,7 @@
- 		if(!res && (mode & S_IWOTH) && IS_RDONLY(nd.dentry->d_inode)
- 		   && !special_file(nd.dentry->d_inode->i_mode))
- 			res = -EROFS;
-+
- 		path_release(&nd);
- 
- 	FSHOOK_END_USER_WALK(access, res, path)
-@@ -545,11 +547,13 @@
- 
- asmlinkage long sys_fchdir(unsigned int fd)
- {
-+	struct nameidata nd;
- 	struct file *file;
- 	struct dentry *dentry;
- 	struct inode *inode;
- 	struct vfsmount *mnt;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	FSHOOK_BEGIN(fchdir, error, .fd = fd)
- 
-@@ -582,8 +586,9 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	FSHOOK_BEGIN_USER_WALK(chroot,
-+	FSHOOK_BEGIN_USER_WALK_IT(chroot,
- 		error,
- 		filename,
- 		LOOKUP_FOLLOW | LOOKUP_DIRECTORY | LOOKUP_NOALT,
-@@ -670,7 +675,7 @@
- 	error = -EROFS;
- 	if (IS_RDONLY(inode))
- 		goto dput_and_out;
--
-+	
- 	error = -EPERM;
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto dput_and_out;
-@@ -804,27 +809,8 @@
-  * for the internal routines (ie open_namei()/follow_link() etc). 00 is
-  * used by symlinks.
-  */
--struct file *filp_open(const char * filename, int flags, int mode)
--{
--	int namei_flags, error;
--	struct nameidata nd;
--
--	namei_flags = flags;
--	if ((namei_flags+1) & O_ACCMODE)
--		namei_flags++;
--	if (namei_flags & O_TRUNC)
--		namei_flags |= 2;
--
--	error = open_namei(filename, namei_flags, mode, &nd);
--	if (!error)
--		return dentry_open(nd.dentry, nd.mnt, flags);
--
--	return ERR_PTR(error);
--}
--
--EXPORT_SYMBOL(filp_open);
--
--struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
-+struct file *dentry_open_it(struct dentry *dentry, struct vfsmount *mnt, int flags,
-+			    struct lookup_intent *it)
- {
- 	struct file * f;
- 	struct inode *inode;
-@@ -836,6 +822,7 @@
- 		goto cleanup_dentry;
- 	f->f_flags = flags;
- 	f->f_mode = (flags+1) & O_ACCMODE;
-+	f->f_it = it;
- 	inode = dentry->d_inode;
- 	if (f->f_mode & FMODE_WRITE) {
- 		error = get_write_access(inode);
-@@ -855,6 +842,7 @@
- 		error = f->f_op->open(inode,f);
- 		if (error)
- 			goto cleanup_all;
-+		intent_release(it);
- 	}
- 	f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
- 
-@@ -879,6 +867,7 @@
- cleanup_file:
- 	put_filp(f);
- cleanup_dentry:
-+	intent_release(it);
- 	dput(dentry);
- 	mntput(mnt);
- 	return ERR_PTR(error);
-@@ -886,6 +875,36 @@
- 
- EXPORT_SYMBOL(dentry_open);
- 
-+struct file *filp_open(const char * filename, int flags, int mode)
-+{
-+	int namei_flags, error;
-+	struct file * temp_filp;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_OPEN);
-+
-+	namei_flags = flags;
-+	if ((namei_flags+1) & O_ACCMODE)
-+		namei_flags++;
-+	if (namei_flags & O_TRUNC)
-+		namei_flags |= 2;
-+
-+	error = open_namei(filename, namei_flags, mode, &nd);
-+	if (!error) {
-+		temp_filp = dentry_open_it(nd.dentry, nd.mnt, flags, &nd.intent);
-+		return temp_filp;
-+	}	
-+	return ERR_PTR(error);
-+}
-+
-+
-+struct file *dentry_open(struct dentry *dentry, struct vfsmount *mnt, int flags)
-+{
-+	struct lookup_intent it;
-+	intent_init(&it, IT_LOOKUP);
-+
-+	return dentry_open_it(dentry, mnt, flags, &it);
-+}
-+
- /*
-  * Find an empty file descriptor entry, and mark it busy.
-  */
-Index: linux-2.6.5-12.1/fs/stat.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/stat.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/stat.c	2004-06-03 18:31:28.000000000 -0400
-@@ -37,7 +37,7 @@
- 
- EXPORT_SYMBOL(generic_fillattr);
- 
--int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+int vfs_getattr_it(struct vfsmount *mnt, struct dentry *dentry, struct lookup_intent *it, struct kstat *stat)
- {
- 	struct inode *inode = dentry->d_inode;
- 	int retval;
-@@ -46,6 +46,8 @@
- 	if (retval)
- 		return retval;
- 
-+	if (inode->i_op->getattr_it)
-+		return inode->i_op->getattr_it(mnt, dentry, it, stat);
- 	if (inode->i_op->getattr)
- 		return inode->i_op->getattr(mnt, dentry, stat);
- 
-@@ -62,14 +64,20 @@
- 
- EXPORT_SYMBOL(vfs_getattr);
- 
-+int vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
-+{
-+	return vfs_getattr_it(mnt, dentry, NULL, stat);
-+}
-+
- int vfs_stat(char __user *name, struct kstat *stat)
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	FSHOOK_BEGIN_USER_PATH_WALK(stat, error, name, nd, path, .link = false)
-+	FSHOOK_BEGIN_USER_PATH_WALK_IT(stat, error, name, nd, path, .link = false)
- 
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 
- 	FSHOOK_END_USER_WALK(stat, error, path)
-@@ -83,10 +91,11 @@
- {
- 	struct nameidata nd;
- 	int error;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
--	FSHOOK_BEGIN_USER_PATH_WALK_LINK(stat, error, name, nd, path, .link = true)
-+	FSHOOK_BEGIN_USER_PATH_WALK_LINK_IT(stat, error, name, nd, path, .link = true)
- 
--		error = vfs_getattr(nd.mnt, nd.dentry, stat);
-+		error = vfs_getattr_it(nd.mnt, nd.dentry, &nd.intent, stat);
- 		path_release(&nd);
- 
- 	FSHOOK_END_USER_WALK(stat, error, path)
-@@ -99,6 +108,8 @@
- int vfs_fstat(unsigned int fd, struct kstat *stat)
- {
- 	int error;
-+	struct nameidata nd;
-+	intent_init(&nd.intent, IT_GETATTR);
- 
- 	FSHOOK_BEGIN(fstat, error, .fd = fd)
- 
-@@ -106,7 +117,8 @@
- 
- 	error = -EBADF;
- 	if (f) {
--		error = vfs_getattr(f->f_vfsmnt, f->f_dentry, stat);
-+		error = vfs_getattr_it(f->f_vfsmnt, f->f_dentry, &nd.intent, stat);
-+		intent_release(&nd.intent);
- 		fput(f);
- 	}
- 
-Index: linux-2.6.5-12.1/fs/inode.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/inode.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/inode.c	2004-06-03 18:31:28.000000000 -0400
-@@ -221,6 +221,7 @@
- 	inodes_stat.nr_unused--;
- }
- 
-+EXPORT_SYMBOL(__iget);
- /**
-  * clear_inode - clear an inode
-  * @inode: inode to clear
-Index: linux-2.6.5-12.1/fs/super.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/super.c	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/fs/super.c	2004-06-03 18:31:28.000000000 -0400
-@@ -789,6 +789,8 @@
- 	return (struct vfsmount *)sb;
- }
- 
-+EXPORT_SYMBOL(do_kern_mount);
-+
- struct vfsmount *kern_mount(struct file_system_type *type)
- {
- 	return do_kern_mount(type->name, 0, type->name, NULL);
-Index: linux-2.6.5-12.1/fs/block_dev.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/block_dev.c	2004-05-10 12:21:55.000000000 -0400
-+++ linux-2.6.5-12.1/fs/block_dev.c	2004-06-03 18:31:28.000000000 -0400
-@@ -834,6 +834,7 @@
- 	if (!path || !*path)
- 		return ERR_PTR(-EINVAL);
- 
-+	intent_init(&nd.intent, IT_LOOKUP);
- 	error = path_lookup(path, LOOKUP_FOLLOW, &nd);
- 	if (error)
- 		return ERR_PTR(error);
-Index: linux-2.6.5-12.1/include/linux/dcache.h
-===================================================================
---- linux-2.6.5-12.1.orig/include/linux/dcache.h	2004-04-03 22:38:24.000000000 -0500
-+++ linux-2.6.5-12.1/include/linux/dcache.h	2004-06-03 18:31:28.000000000 -0400
-@@ -4,6 +4,7 @@
- #ifdef __KERNEL__
- 
- #include <asm/atomic.h>
-+#include <linux/string.h>
- #include <linux/list.h>
- #include <linux/spinlock.h>
- #include <linux/cache.h>
-@@ -35,6 +36,8 @@
- 	char name_str[0];
- };
- 
-+#include <linux/namei.h>
-+
- struct dentry_stat_t {
- 	int nr_dentry;
- 	int nr_unused;
-Index: linux-2.6.5-12.1/include/linux/fs.h
-===================================================================
---- linux-2.6.5-12.1.orig/include/linux/fs.h	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/include/linux/fs.h	2004-06-03 18:31:28.000000000 -0400
-@@ -76,6 +76,7 @@
- 
- #define FMODE_READ 1
- #define FMODE_WRITE 2
-+#define FMODE_EXEC 4
- 
- #define RW_MASK		1
- #define RWA_MASK	2
-@@ -250,6 +250,8 @@
- #define ATTR_ATTR_FLAG	1024
- #define ATTR_KILL_SUID	2048
- #define ATTR_KILL_SGID	4096
-+#define ATTR_RAW       	8192    /* file system, not vfs will massage attrs */
-+#define ATTR_FROM_OPEN 	16384    /* called from open path, ie O_TRUNC */
- 
- /*
-  * This is the Inode Attributes structure, used for notify_change().  It
-@@ -423,6 +425,7 @@
- 	struct block_device	*i_bdev;
- 	struct cdev		*i_cdev;
- 	int			i_cindex;
-+	void			*i_filterdata;
- 
- 	unsigned long		i_dnotify_mask; /* Directory notify events */
- 	struct dnotify_struct	*i_dnotify; /* for directory notifications */
-@@ -556,6 +559,7 @@
- 	spinlock_t		f_ep_lock;
- #endif /* #ifdef CONFIG_EPOLL */
- 	struct address_space	*f_mapping;
-+ 	struct lookup_intent    *f_it;
- };
- extern spinlock_t files_lock;
- #define file_list_lock() spin_lock(&files_lock);
-@@ -886,7 +890,9 @@
- 	void (*truncate) (struct inode *);
- 	int (*permission) (struct inode *, int, struct nameidata *);
- 	int (*setattr) (struct dentry *, struct iattr *);
-+	int (*setattr_raw) (struct inode *, struct iattr *);
- 	int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
-+	int (*getattr_it) (struct vfsmount *, struct dentry *, struct lookup_intent *, struct kstat *);
- 	int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
- 	ssize_t (*getxattr) (struct dentry *, const char *, void *, size_t);
- 	ssize_t (*listxattr) (struct dentry *, char *, size_t);
-@@ -1114,6 +1120,7 @@
- extern int unregister_filesystem(struct file_system_type *);
- extern struct vfsmount *kern_mount(struct file_system_type *);
- extern int may_umount(struct vfsmount *);
-+struct vfsmount *do_kern_mount(const char *type, int flags, const char *name, void *data);
- extern long do_mount(char *, char *, char *, unsigned long, void *);
- 
- extern int vfs_statfs(struct super_block *, struct kstatfs *);
-@@ -1178,6 +1185,7 @@
- extern int do_truncate(struct dentry *, loff_t start);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
-+extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
- extern int filp_close(struct file *, fl_owner_t id);
- extern char * getname(const char __user *);
- 
-Index: linux-2.6.5-12.1/include/linux/namei.h
-===================================================================
---- linux-2.6.5-12.1.orig/include/linux/namei.h	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/include/linux/namei.h	2004-06-03 18:31:28.000000000 -0400
-@@ -2,25 +2,55 @@
- #define _LINUX_NAMEI_H
- 
- #include <linux/linkage.h>
-+#include <linux/string.h>
- 
- struct vfsmount;
-+struct nameidata;
- 
--struct open_intent {
--	int	flags;
--	int	create_mode;
-+/* intent opcodes */
-+#define IT_OPEN     (1)
-+#define IT_CREAT    (1<<1)
-+#define IT_READDIR  (1<<2)
-+#define IT_GETATTR  (1<<3)
-+#define IT_LOOKUP   (1<<4)
-+#define IT_UNLINK   (1<<5)
-+#define IT_TRUNC    (1<<6)
-+#define IT_GETXATTR (1<<7)
-+
-+struct lustre_intent_data {
-+	int       it_disposition;
-+	int       it_status;
-+	__u64     it_lock_handle;
-+	void     *it_data;
-+	int       it_lock_mode;
- };
- 
-+#define INTENT_MAGIC 0x19620323
-+struct lookup_intent {
-+	int     it_magic;
-+	void    (*it_op_release)(struct lookup_intent *);
-+	int     it_op;
-+	int	it_flags;
-+	int	it_create_mode;
-+	union {
-+		struct lustre_intent_data lustre;
-+	} d;
-+};
-+
-+static inline void intent_init(struct lookup_intent *it, int op)
-+{
-+	memset(it, 0, sizeof(*it));
-+	it->it_magic = INTENT_MAGIC;
-+	it->it_op = op;
-+}
-+
- struct nameidata {
- 	struct dentry	*dentry;
- 	struct vfsmount *mnt;
- 	struct qstr	last;
- 	unsigned int	flags;
- 	int		last_type;
--
--	/* Intent data */
--	union {
--		struct open_intent open;
--	} intent;
-+	struct lookup_intent intent;
- };
- 
- /*
-@@ -41,6 +71,9 @@
- #define LOOKUP_CONTINUE		 4
- #define LOOKUP_PARENT		16
- #define LOOKUP_NOALT		32
-+#define LOOKUP_LAST		 (1<<6)
-+#define LOOKUP_LINK_NOTLAST	 (1<<7)
-+
- /*
-  * Intent data
-  */
-@@ -49,6 +82,12 @@
- #define LOOKUP_ACCESS		(0x0400)
- 
- extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *, const char **));
-+extern int FASTCALL(__user_walk_it(const char __user *, unsigned, struct nameidata *, const char **));
-+#define user_path_walk_it(name,nd) \
-+	__user_walk_it(name, LOOKUP_FOLLOW, nd, 0)
-+#define user_path_walk_link_it(name,nd) \
-+	__user_walk_it(name, 0, nd, 0)
-+extern void intent_release(struct lookup_intent *);
- #define user_path_walk(name,nd) \
- 	__user_walk(name, LOOKUP_FOLLOW, nd, 0)
- #define user_path_walk_link(name,nd) \
-@@ -60,7 +99,6 @@
- 
- extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
- extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
--
- extern int follow_down(struct vfsmount **, struct dentry **);
- extern int follow_up(struct vfsmount **, struct dentry **);
- 
-Index: linux-2.6.5-12.1/include/linux/fshooks.h
-===================================================================
---- linux-2.6.5-12.1.orig/include/linux/fshooks.h	2004-05-10 12:21:56.000000000 -0400
-+++ linux-2.6.5-12.1/include/linux/fshooks.h	2004-06-03 18:31:28.000000000 -0400
-@@ -90,12 +90,18 @@
- 
- #define FSHOOK_BEGIN_USER_WALK(type, err, path, flags, nd, field, args...) \
- 		FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk(path, flags, &nd, &info.field), nd, args)
-+#define FSHOOK_BEGIN_USER_WALK_IT(type, err, path, flags, nd, field, args...) \
-+		FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk_it(path, flags, &nd, &info.field), nd, args)
- 
- #define FSHOOK_BEGIN_USER_PATH_WALK(type, err, path, nd, field, args...) \
- 		FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk(path, LOOKUP_FOLLOW, &nd, &info.field), nd, args)
-+#define FSHOOK_BEGIN_USER_PATH_WALK_IT(type, err, path, nd, field, args...) \
-+		FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk_it(path, LOOKUP_FOLLOW, &nd, &info.field), nd, args)
- 
- #define FSHOOK_BEGIN_USER_PATH_WALK_LINK(type, err, path, nd, field, args...) \
- 		FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk(path, 0, &nd, &info.field), nd, args)
-+#define FSHOOK_BEGIN_USER_PATH_WALK_LINK_IT(type, err, path, nd, field, args...) \
-+		FSHOOK_BEGIN_USER_WALK_COMMON(type, err, __user_walk_it(path, 0, &nd, &info.field), nd, args)
- 
- #define FSHOOK_END_USER_WALK(type, err, field) \
- 				(void)(&info != (struct fshook_##type##_info *)-1L); \
-@@ -126,12 +132,18 @@
- 
- #define FSHOOK_BEGIN_USER_WALK(type, err, path, flags, nd, field, args...) \
- 	if (!(err = __user_walk(path, flags, &nd, 0))) {
-+#define FSHOOK_BEGIN_USER_WALK_IT(type, err, path, flags, nd, field, args...) \
-+	if (!(err = __user_walk_it(path, flags, &nd, 0))) {
- 
- #define FSHOOK_BEGIN_USER_PATH_WALK(type, err, path, nd, field, args...) \
- 	if (!(err = user_path_walk(path, &nd))) {
-+#define FSHOOK_BEGIN_USER_PATH_WALK_IT(type, err, path, nd, field, args...) \
-+	if (!(err = user_path_walk_it(path, &nd))) {
- 
- #define FSHOOK_BEGIN_USER_PATH_WALK_LINK(type, err, path, nd, field, args...) \
- 	if (!(err = user_path_walk_link(path, &nd))) {
-+#define FSHOOK_BEGIN_USER_PATH_WALK_LINK_IT(type, err, path, nd, field, args...) \
-+	if (!(err = user_path_walk_link_it(path, &nd))) {
- 
- #define FSHOOK_END_USER_WALK(type, err, field) ((void)0);}
- 
diff --git a/lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch b/lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch
deleted file mode 100644
index fc386d77b23d2f0598842e1c8de80c6be2afabfb..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_intent-reduce-stack-usage-2.6-suse-newer.patch
+++ /dev/null
@@ -1,42 +0,0 @@
----
- fs/namei.c            |    5 +----
- include/linux/namei.h |    7 +++++++
- 2 files changed, 8 insertions(+), 4 deletions(-)
-
---- linux-2.6.5-7.282.orig/fs/namei.c
-+++ linux-2.6.5-7.282/fs/namei.c
-@@ -2369,7 +2369,6 @@ static inline int
- __vfs_follow_link(struct nameidata *nd, const char *link)
- {
- 	int res = 0;
--	struct lookup_intent it = nd->intent;
- 	char *name;
- 
- 	if (IS_ERR(link))
-@@ -2382,9 +2381,7 @@ __vfs_follow_link(struct nameidata *nd, 
- 			goto out;
- 	}
- 
--	intent_init(&nd->intent, it.it_op);
--	nd->intent.it_flags = it.it_flags;
--	nd->intent.it_create_mode = it.it_create_mode;
-+	intent_reset_fs_part(&nd->intent);
- 	res = link_path_walk(link, nd);
- out:
- 	if (current->link_count || res || nd->last_type!=LAST_NORM)
---- linux-2.6.5-7.282.orig/include/linux/namei.h
-+++ linux-2.6.5-7.282/include/linux/namei.h
-@@ -37,6 +37,13 @@ struct lookup_intent {
- 	} d;
- };
- 
-+static inline void intent_reset_fs_part(struct lookup_intent *it)
-+{
-+        memset(&it->d, 0, sizeof(it->d));
-+        it->it_magic = INTENT_MAGIC;
-+        it->it_op_release = NULL;
-+}
-+
- static inline void intent_init(struct lookup_intent *it, int op)
- {
- 	memset(it, 0, sizeof(*it));
diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch
deleted file mode 100644
index 35e013853d11e393db016a122d7aacb2dbe784f5..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_nointent-2.6-fc5.patch
+++ /dev/null
@@ -1,472 +0,0 @@
-Index: linux-2.6.16.i686/net/unix/af_unix.c
-===================================================================
---- linux-2.6.16.i686.orig/net/unix/af_unix.c	2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/net/unix/af_unix.c	2006-05-30 22:27:40.000000000 +0800
-@@ -673,6 +673,7 @@
- 	int err = 0;
- 	
- 	if (sunname->sun_path[0]) {
-+		intent_init(&nd.intent, IT_LOOKUP);
- 		err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd);
- 		if (err)
- 			goto fail;
-Index: linux-2.6.16.i686/fs/open.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/open.c	2006-05-30 22:10:06.000000000 +0800
-+++ linux-2.6.16.i686/fs/open.c	2006-05-30 22:27:40.000000000 +0800
-@@ -197,9 +197,10 @@
- }
- 
- int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
--	struct file *filp)
-+	struct file *filp, int called_from_open)
- {
- 	int err;
-+	struct inode_operations *op = dentry->d_inode->i_op;
- 	struct iattr newattrs;
- 
- 	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -214,7 +215,17 @@
- 	}
- 
- 	mutex_lock(&dentry->d_inode->i_mutex);
--	err = notify_change(dentry, &newattrs);
-+	if (called_from_open)
-+                newattrs.ia_valid |= ATTR_FROM_OPEN;
-+        if (op->setattr_raw) {
-+                newattrs.ia_valid |= ATTR_RAW;
-+                newattrs.ia_ctime = CURRENT_TIME;
-+                down_write(&dentry->d_inode->i_alloc_sem);
-+                err = op->setattr_raw(dentry->d_inode, &newattrs);
-+                up_write(&dentry->d_inode->i_alloc_sem);
-+        } else
-+                err = notify_change(dentry, &newattrs);
-+
- 	mutex_unlock(&dentry->d_inode->i_mutex);
- 	return err;
- }
-@@ -269,7 +280,7 @@
- 	error = locks_verify_truncate(inode, NULL, length);
- 	if (!error) {
- 		DQUOT_INIT(inode);
--		error = do_truncate(nd.dentry, length, 0, NULL);
-+		error = do_truncate(nd.dentry, length, 0, NULL, 0);
- 	}
- 	put_write_access(inode);
- 
-@@ -321,7 +332,7 @@
- 
- 	error = locks_verify_truncate(inode, file, length);
- 	if (!error)
--		error = do_truncate(dentry, length, 0, file);
-+		error = do_truncate(dentry, length, 0, file, 0);
- out_putf:
- 	fput(file);
- out:
-@@ -406,9 +417,20 @@
- 		    (error = vfs_permission(&nd, MAY_WRITE)) != 0)
- 			goto dput_and_out;
- 	}
--	mutex_lock(&inode->i_mutex);
--	error = notify_change(nd.dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
-+ 	if (inode->i_op->setattr_raw) {
-+ 		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 
-+ 		newattrs.ia_valid |= ATTR_RAW;
-+ 		error = op->setattr_raw(inode, &newattrs);
-+ 		/* the file system wants to use normal vfs path now */
-+ 		if (error != -EOPNOTSUPP)
-+ 			goto dput_and_out;
-+ 	} else {
-+		mutex_lock(&inode->i_mutex);
-+ 		error = notify_change(nd.dentry, &newattrs);
-+		mutex_unlock(&inode->i_mutex);
-+ 	}
-+
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -623,77 +645,74 @@
- }
- 
- EXPORT_SYMBOL_GPL(sys_chroot);
--
--asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+  
-+int chmod_common(struct dentry *dentry, mode_t mode)
- {
--	struct inode * inode;
--	struct dentry * dentry;
--	struct file * file;
--	int err = -EBADF;
--	struct iattr newattrs;
--
--	file = fget(fd);
--	if (!file)
--		goto out;
--
--	dentry = file->f_dentry;
--	inode = dentry->d_inode;
--
--	err = -EROFS;
--	if (IS_RDONLY(inode))
--		goto out_putf;
--	err = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto out_putf;
-+ 	struct inode * inode = dentry->d_inode;
-+  	struct iattr newattrs;
-+ 	int error = -EROFS;
-+  
-+ 	if (IS_RDONLY(inode))
-+  		goto out;
-+ 	
-+ 	if (inode->i_op->setattr_raw) {
-+ 		struct inode_operations *op = dentry->d_inode->i_op;
-+ 
-+ 		newattrs.ia_mode = mode;
-+ 		newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+ 		newattrs.ia_valid |= ATTR_RAW;
-+ 		error = op->setattr_raw(inode, &newattrs);
-+ 		/* the file system wants to use normal vfs path now */
-+ 		if (error != -EOPNOTSUPP)
-+ 			goto out;
-+ 	}
-+  
-+ 	error = -EPERM;
-+  	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-+ 		goto out;
-+ 
- 	mutex_lock(&inode->i_mutex);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	err = notify_change(dentry, &newattrs);
-+  	if (mode == (mode_t) -1)
-+  		mode = inode->i_mode;
-+  	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
-+  	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+ 	error = notify_change(dentry, &newattrs);
- 	mutex_unlock(&inode->i_mutex);
-+out:
-+ 	return error;
-+}
- 
--out_putf:
--	fput(file);
-+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+{
-+ 	struct file * file;
-+ 	int err = -EBADF;
-+ 
-+ 	file = fget(fd);
-+ 	if (!file)
-+ 		goto out;
-+ 
-+ 	err = chmod_common(file->f_dentry, mode);
-+  	fput(file);
- out:
--	return err;
-+  	return err;
- }
- 
- asmlinkage long sys_fchmodat(int dfd, const char __user *filename,
- 			     mode_t mode)
- {
- 	struct nameidata nd;
--	struct inode * inode;
- 	int error;
--	struct iattr newattrs;
- 
- 	error = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd);
- 	if (error)
- 		goto out;
--	inode = nd.dentry->d_inode;
--
--	error = -EROFS;
--	if (IS_RDONLY(inode))
--		goto dput_and_out;
--
--	error = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto dput_and_out;
--
--	mutex_lock(&inode->i_mutex);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	error = notify_change(nd.dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
--
--dput_and_out:
--	path_release(&nd);
-+	error = chmod_common(nd.dentry, mode);
-+  	path_release(&nd);
- out:
--	return error;
-+  	return error;
- }
- 
-+
- asmlinkage long sys_chmod(const char __user *filename, mode_t mode)
- {
- 	return sys_fchmodat(AT_FDCWD, filename, mode);
-@@ -714,6 +733,18 @@
- 	if (IS_RDONLY(inode))
- 		goto out;
- 	error = -EPERM;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_uid = user;
-+		newattrs.ia_gid = group;
-+		newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			return error;
-+	}
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto out;
- 	newattrs.ia_valid =  ATTR_CTIME;
-Index: linux-2.6.16.i686/fs/namei.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/namei.c	2006-05-30 22:24:53.000000000 +0800
-+++ linux-2.6.16.i686/fs/namei.c	2006-05-30 22:27:51.000000000 +0800
-@@ -1644,7 +1644,7 @@
- 		if (!error) {
- 			DQUOT_INIT(inode);
- 			
--			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL);
-+			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL, 1);
- 		}
- 		put_write_access(inode);
- 		if (error)
-@@ -1912,6 +1912,7 @@
- 	char * tmp;
- 	struct dentry * dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	if (S_ISDIR(mode))
- 		return -EPERM;
-@@ -1922,6 +1923,15 @@
- 	error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
-+
-+	if (nd.dentry->d_inode->i_op->mknod_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->mknod_raw(&nd, mode, dev);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out2;
-+	}
-+
- 	dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(dentry);
- 
-@@ -1948,6 +1958,7 @@
- 		dput(dentry);
- 	}
- 	mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 	path_release(&nd);
- out:
- 	putname(tmp);
-@@ -1993,9 +2004,18 @@
- 		struct dentry *dentry;
- 		struct nameidata nd;
- 
-+ 		intent_init(&nd.intent, IT_LOOKUP);
- 		error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+ 		if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+ 			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 			error = op->mkdir_raw(&nd, mode);
-+ 			/* the file system wants to use normal vfs path now */
-+ 			if (error != -EOPNOTSUPP)
-+ 				goto out2;
-+ 		}
-+
- 		dentry = lookup_create(&nd, 1);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -2005,6 +2025,7 @@
- 			dput(dentry);
- 		}
- 		mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(tmp);
-@@ -2085,6 +2106,7 @@
- 	char * name;
- 	struct dentry *dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -2105,6 +2127,14 @@
- 			error = -EBUSY;
- 			goto exit1;
- 	}
-+	if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+                struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+                error = op->rmdir_raw(&nd);
-+                /* the file system wants to use normal vfs path now */
-+                if (error != -EOPNOTSUPP)
-+                        goto exit1;
-+        }
- 	mutex_lock(&nd.dentry->d_inode->i_mutex);
- 	dentry = lookup_hash(&nd);
- 	error = PTR_ERR(dentry);
-@@ -2168,6 +2198,7 @@
- 	struct dentry *dentry;
- 	struct nameidata nd;
- 	struct inode *inode = NULL;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -2179,6 +2210,13 @@
- 	error = -EISDIR;
- 	if (nd.last_type != LAST_NORM)
- 		goto exit1;
-+	if (nd.dentry->d_inode->i_op->unlink_raw) {
-+        	struct inode_operations *op = nd.dentry->d_inode->i_op;
-+        	error = op->unlink_raw(&nd);
-+                /* the file system wants to use normal vfs path now */
-+        	if (error != -EOPNOTSUPP)
-+                       goto exit1;
-+        }
- 	mutex_lock(&nd.dentry->d_inode->i_mutex);
- 	dentry = lookup_hash(&nd);
- 	error = PTR_ERR(dentry);
-@@ -2261,9 +2299,17 @@
- 		struct dentry *dentry;
- 		struct nameidata nd;
- 
-+ 		intent_init(&nd.intent, IT_LOOKUP);
- 		error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+		if (nd.dentry->d_inode->i_op->symlink_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 			error = op->symlink_raw(&nd, from);
-+ 			/* the file system wants to use normal vfs path now */
-+ 			if (error != -EOPNOTSUPP)
-+ 				goto out2;
-+ 		}
- 		dentry = lookup_create(&nd, 0);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -2271,6 +2317,7 @@
- 			dput(dentry);
- 		}
- 		mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:		
- 		path_release(&nd);
- out:
- 		putname(to);
-@@ -2358,6 +2405,13 @@
- 	error = -EXDEV;
- 	if (old_nd.mnt != nd.mnt)
- 		goto out_release;
-+	if (nd.dentry->d_inode->i_op->link_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->link_raw(&old_nd, &nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out_release;
-+	}
- 	new_dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(new_dentry);
- 	if (!IS_ERR(new_dentry)) {
-@@ -2534,6 +2588,8 @@
- 	struct dentry * old_dentry, *new_dentry;
- 	struct dentry * trap;
- 	struct nameidata oldnd, newnd;
-+	intent_init(&oldnd.intent, IT_LOOKUP);
-+	intent_init(&newnd.intent, IT_LOOKUP);
- 
- 	error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd);
- 	if (error)
-@@ -2556,6 +2612,13 @@
- 	if (newnd.last_type != LAST_NORM)
- 		goto exit2;
- 
-+	if (old_dir->d_inode->i_op->rename_raw) {
-+		error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit2;
-+	}
-+
- 	trap = lock_rename(new_dir, old_dir);
- 
- 	old_dentry = lookup_hash(&oldnd);
-@@ -2587,8 +2650,7 @@
- 	if (new_dentry == trap)
- 		goto exit5;
- 
--	error = vfs_rename(old_dir->d_inode, old_dentry,
--				   new_dir->d_inode, new_dentry);
-+	error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
- exit5:
- 	dput(new_dentry);
- exit4:
-Index: linux-2.6.16.i686/fs/exec.c
-===================================================================
---- linux-2.6.16.i686.orig/fs/exec.c	2006-05-30 21:33:00.000000000 +0800
-+++ linux-2.6.16.i686/fs/exec.c	2006-05-30 22:27:40.000000000 +0800
-@@ -1517,7 +1517,7 @@
- 		goto close_fail;
- 	if (!file->f_op->write)
- 		goto close_fail;
--	if (do_truncate(file->f_dentry, 0, 0, file) != 0)
-+	if (do_truncate(file->f_dentry, 0, 0, file, 0) != 0)
- 		goto close_fail;
- 
- 	retval = binfmt->core_dump(signr, regs, file);
-Index: linux-2.6.16.i686/include/linux/fs.h
-===================================================================
---- linux-2.6.16.i686.orig/include/linux/fs.h	2006-05-30 21:33:00.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/fs.h	2006-05-30 22:27:40.000000000 +0800
-@@ -1035,13 +1035,20 @@
- 	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
- 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- 	int (*link) (struct dentry *,struct inode *,struct dentry *);
-+	int (*link_raw) (struct nameidata *,struct nameidata *);
- 	int (*unlink) (struct inode *,struct dentry *);
-+	int (*unlink_raw) (struct nameidata *);
- 	int (*symlink) (struct inode *,struct dentry *,const char *);
-+	int (*symlink_raw) (struct nameidata *,const char *);
- 	int (*mkdir) (struct inode *,struct dentry *,int);
-+	int (*mkdir_raw) (struct nameidata *,int);
- 	int (*rmdir) (struct inode *,struct dentry *);
-+	int (*rmdir_raw) (struct nameidata *);
- 	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
-+	int (*mknod_raw) (struct nameidata *,int,dev_t);
- 	int (*rename) (struct inode *, struct dentry *,
- 			struct inode *, struct dentry *);
-+	int (*rename_raw) (struct nameidata *, struct nameidata *);
- 	int (*readlink) (struct dentry *, char __user *,int);
- 	void * (*follow_link) (struct dentry *, struct nameidata *);
- 	void (*put_link) (struct dentry *, struct nameidata *, void *);
-@@ -1351,7 +1358,7 @@
- /* fs/open.c */
- 
- extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
--		       struct file *filp);
-+		       struct file *filp, int called_from_open);
- extern long do_sys_open(int fdf, const char __user *filename, int flags,
- 			int mode);
- extern struct file *filp_open(const char *, int, int);
diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch
deleted file mode 100644
index c0e0c3d69072c7b6a0a0f0d3a5f11bf169f54898..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_nointent-2.6-rhel4.patch
+++ /dev/null
@@ -1,487 +0,0 @@
-Index: linux-2.6.9-5.0.3.EL/fs/namei.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/namei.c	2005-02-26 13:29:11.948782168 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/namei.c	2005-02-26 13:29:13.355568304 +0200
-@@ -1380,7 +1380,7 @@
- 		if (!error) {
- 			DQUOT_INIT(inode);
- 			
--			error = do_truncate(dentry, 0);
-+			error = do_truncate(dentry, 0, 1);
- 		}
- 		put_write_access(inode);
- 		if (error)
-@@ -1638,6 +1638,7 @@
- 	char * tmp;
- 	struct dentry * dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	if (S_ISDIR(mode))
- 		return -EPERM;
-@@ -1648,6 +1649,15 @@
- 	error = path_lookup(tmp, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
-+
-+	if (nd.dentry->d_inode->i_op->mknod_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->mknod_raw(&nd, mode, dev);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out2;
-+	}
-+
- 	dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(dentry);
- 
-@@ -1674,6 +1684,7 @@
- 		dput(dentry);
- 	}
- 	up(&nd.dentry->d_inode->i_sem);
-+out2:
- 	path_release(&nd);
- out:
- 	putname(tmp);
-@@ -1715,10 +1726,18 @@
- 	if (!IS_ERR(tmp)) {
- 		struct dentry *dentry;
- 		struct nameidata nd;
-+		intent_init(&nd.intent, IT_LOOKUP);
- 
- 		error = path_lookup(tmp, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+		if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+			error = op->mkdir_raw(&nd, mode);
-+			/* the file system wants to use normal vfs path now */
-+			if (error != -EOPNOTSUPP)
-+				goto out2;
-+		}
- 		dentry = lookup_create(&nd, 1);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1728,6 +1747,7 @@
- 			dput(dentry);
- 		}
- 		up(&nd.dentry->d_inode->i_sem);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(tmp);
-@@ -1808,6 +1828,7 @@
- 	char * name;
- 	struct dentry *dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -1828,6 +1849,16 @@
- 			error = -EBUSY;
- 			goto exit1;
- 	}
-+
-+	if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		error = op->rmdir_raw(&nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit1;
-+	}
-+
- 	down(&nd.dentry->d_inode->i_sem);
- 	dentry = lookup_hash(&nd.last, nd.dentry);
- 	error = PTR_ERR(dentry);
-@@ -1886,6 +1917,7 @@
- 	struct dentry *dentry;
- 	struct nameidata nd;
- 	struct inode *inode = NULL;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -1897,6 +1929,13 @@
- 	error = -EISDIR;
- 	if (nd.last_type != LAST_NORM)
- 		goto exit1;
-+	if (nd.dentry->d_inode->i_op->unlink_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->unlink_raw(&nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit1;
-+	}
- 	down(&nd.dentry->d_inode->i_sem);
- 	dentry = lookup_hash(&nd.last, nd.dentry);
- 	error = PTR_ERR(dentry);
-@@ -1963,10 +2002,18 @@
- 	if (!IS_ERR(to)) {
- 		struct dentry *dentry;
- 		struct nameidata nd;
-+		intent_init(&nd.intent, IT_LOOKUP);
- 
- 		error = path_lookup(to, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+		if (nd.dentry->d_inode->i_op->symlink_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+			error = op->symlink_raw(&nd, from);
-+			/* the file system wants to use normal vfs path now */
-+			if (error != -EOPNOTSUPP)
-+				goto out2;
-+		}
- 		dentry = lookup_create(&nd, 0);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1974,6 +2021,7 @@
- 			dput(dentry);
- 		}
- 		up(&nd.dentry->d_inode->i_sem);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(to);
-@@ -2037,6 +2085,8 @@
- 	struct nameidata nd, old_nd;
- 	int error;
- 	char * to;
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 
- 	to = getname(newname);
- 	if (IS_ERR(to))
-@@ -2051,6 +2101,13 @@
- 	error = -EXDEV;
- 	if (old_nd.mnt != nd.mnt)
- 		goto out_release;
-+	if (nd.dentry->d_inode->i_op->link_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->link_raw(&old_nd, &nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out_release;
-+	}
- 	new_dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(new_dentry);
- 	if (!IS_ERR(new_dentry)) {
-@@ -2223,6 +2280,8 @@
- 	struct dentry * old_dentry, *new_dentry;
- 	struct dentry * trap;
- 	struct nameidata oldnd, newnd;
-+	intent_init(&oldnd.intent, IT_LOOKUP);
-+	intent_init(&newnd.intent, IT_LOOKUP);
- 
- 	error = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
- 	if (error)
-@@ -2245,6 +2304,13 @@
- 	if (newnd.last_type != LAST_NORM)
- 		goto exit2;
- 
-+	if (old_dir->d_inode->i_op->rename_raw) {
-+		error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit2;
-+	}
-+
- 	trap = lock_rename(new_dir, old_dir);
- 
- 	old_dentry = lookup_hash(&oldnd.last, old_dir);
-@@ -2276,8 +2342,7 @@
- 	if (new_dentry == trap)
- 		goto exit5;
- 
--	error = vfs_rename(old_dir->d_inode, old_dentry,
--				   new_dir->d_inode, new_dentry);
-+	error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
- exit5:
- 	dput(new_dentry);
- exit4:
-Index: linux-2.6.9-5.0.3.EL/fs/open.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/open.c	2005-02-26 13:29:11.962780040 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/open.c	2005-02-26 13:29:13.359567696 +0200
-@@ -191,9 +191,10 @@
- 	return error;
- }
- 
--int do_truncate(struct dentry *dentry, loff_t length)
-+int do_truncate(struct dentry *dentry, loff_t length, int called_from_open)
- {
- 	int err;
-+	struct inode_operations *op = dentry->d_inode->i_op;
- 	struct iattr newattrs;
- 
- 	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -204,7 +205,14 @@
- 	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
- 	down(&dentry->d_inode->i_sem);
- 	down_write(&dentry->d_inode->i_alloc_sem);
--	err = notify_change(dentry, &newattrs);
-+	if (called_from_open)
-+		newattrs.ia_valid |= ATTR_FROM_OPEN;
-+	if (op->setattr_raw) {
-+		newattrs.ia_valid |= ATTR_RAW;
-+		newattrs.ia_ctime = CURRENT_TIME;
-+		err = op->setattr_raw(dentry->d_inode, &newattrs);
-+	} else
-+		err = notify_change(dentry, &newattrs);
- 	up_write(&dentry->d_inode->i_alloc_sem);
- 	up(&dentry->d_inode->i_sem);
- 	return err;
-@@ -260,7 +268,7 @@
- 	error = locks_verify_truncate(inode, NULL, length);
- 	if (!error) {
- 		DQUOT_INIT(inode);
--		error = do_truncate(nd.dentry, length);
-+		error = do_truncate(nd.dentry, length, 0);
- 	}
- 	put_write_access(inode);
- 
-@@ -312,7 +320,7 @@
- 
- 	error = locks_verify_truncate(inode, file, length);
- 	if (!error)
--		error = do_truncate(dentry, length);
-+		error = do_truncate(dentry, length, 0);
- out_putf:
- 	fput(file);
- out:
-@@ -391,9 +399,19 @@
- 		    (error = permission(inode,MAY_WRITE,&nd)) != 0)
- 			goto dput_and_out;
- 	}
--	down(&inode->i_sem);
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto dput_and_out;
-+	} else {
-+		down(&inode->i_sem);
-+		error = notify_change(nd.dentry, &newattrs);
-+		up(&inode->i_sem);
-+	}
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -444,9 +462,19 @@
- 		    (error = permission(inode,MAY_WRITE,&nd)) != 0)
- 			goto dput_and_out;
- 	}
--	down(&inode->i_sem);
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto dput_and_out;
-+	} else {
-+		down(&inode->i_sem);
-+		error = notify_change(nd.dentry, &newattrs);
-+		up(&inode->i_sem);
-+	}
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -600,36 +628,52 @@
- 
- EXPORT_SYMBOL_GPL(sys_chroot);
- 
--asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+int chmod_common(struct dentry *dentry, mode_t mode)
- {
--	struct inode * inode;
--	struct dentry * dentry;
--	struct file * file;
--	int err = -EBADF;
-+	struct inode * inode = dentry->d_inode;
- 	struct iattr newattrs;
-+	int error = -EROFS;
- 
--	file = fget(fd);
--	if (!file)
-+	if (IS_RDONLY(inode))
- 		goto out;
-+	
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
- 
--	dentry = file->f_dentry;
--	inode = dentry->d_inode;
-+		newattrs.ia_mode = mode;
-+		newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use the normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out;
-+	}
- 
--	err = -EROFS;
--	if (IS_RDONLY(inode))
--		goto out_putf;
--	err = -EPERM;
-+	error = -EPERM;
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto out_putf;
-+		goto out;
-+
- 	down(&inode->i_sem);
- 	if (mode == (mode_t) -1)
- 		mode = inode->i_mode;
- 	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
- 	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	err = notify_change(dentry, &newattrs);
-+	error = notify_change(dentry, &newattrs);
- 	up(&inode->i_sem);
-+out:
-+	return error;
-+}
- 
--out_putf:
-+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+{
-+	struct file * file;
-+	int err = -EBADF;
-+
-+	file = fget(fd);
-+	if (!file)
-+		goto out;
-+
-+	err = chmod_common(file->f_dentry, mode);
- 	fput(file);
- out:
- 	return err;
-@@ -638,32 +682,13 @@
- asmlinkage long sys_chmod(const char __user * filename, mode_t mode)
- {
- 	struct nameidata nd;
--	struct inode * inode;
- 	int error;
--	struct iattr newattrs;
- 
- 	error = user_path_walk(filename, &nd);
- 	if (error)
- 		goto out;
--	inode = nd.dentry->d_inode;
--
--	error = -EROFS;
--	if (IS_RDONLY(inode))
--		goto dput_and_out;
--
--	error = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto dput_and_out;
--
--	down(&inode->i_sem);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
- 
--dput_and_out:
-+	error = chmod_common(nd.dentry, mode);
- 	path_release(&nd);
- out:
- 	return error;
-@@ -684,6 +709,18 @@
- 	if (IS_RDONLY(inode))
- 		goto out;
- 	error = -EPERM;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_uid = user;
-+		newattrs.ia_gid = group;
-+		newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			return error;
-+	}
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto out;
- 	newattrs.ia_valid =  ATTR_CTIME;
-@@ -697,6 +734,7 @@
- 	}
- 	if (!S_ISDIR(inode->i_mode))
- 		newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
-+
- 	down(&inode->i_sem);
- 	error = notify_change(dentry, &newattrs);
- 	up(&inode->i_sem);
-Index: linux-2.6.9-5.0.3.EL/fs/exec.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/exec.c	2005-02-26 13:29:11.936783992 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/exec.c	2005-02-26 13:29:13.362567240 +0200
-@@ -1451,7 +1451,7 @@
- 		goto close_fail;
- 	if (!file->f_op->write)
- 		goto close_fail;
--	if (do_truncate(file->f_dentry, 0) != 0)
-+	if (do_truncate(file->f_dentry, 0, 0) != 0)
- 		goto close_fail;
- 
- 	retval = binfmt->core_dump(signr, regs, file);
-Index: linux-2.6.9-5.0.3.EL/include/linux/fs.h
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/fs.h	2005-02-26 13:29:11.987776240 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/fs.h	2005-02-26 13:29:13.365566784 +0200
-@@ -926,13 +926,20 @@
- 	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
- 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- 	int (*link) (struct dentry *,struct inode *,struct dentry *);
-+	int (*link_raw) (struct nameidata *,struct nameidata *);
- 	int (*unlink) (struct inode *,struct dentry *);
-+	int (*unlink_raw) (struct nameidata *);
- 	int (*symlink) (struct inode *,struct dentry *,const char *);
-+	int (*symlink_raw) (struct nameidata *,const char *);
- 	int (*mkdir) (struct inode *,struct dentry *,int);
-+	int (*mkdir_raw) (struct nameidata *,int);
- 	int (*rmdir) (struct inode *,struct dentry *);
-+	int (*rmdir_raw) (struct nameidata *);
- 	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
-+	int (*mknod_raw) (struct nameidata *,int,dev_t);
- 	int (*rename) (struct inode *, struct dentry *,
- 			struct inode *, struct dentry *);
-+	int (*rename_raw) (struct nameidata *, struct nameidata *);
- 	int (*readlink) (struct dentry *, char __user *,int);
- 	int (*follow_link) (struct dentry *, struct nameidata *);
- 	void (*put_link) (struct dentry *, struct nameidata *);
-@@ -1234,7 +1241,7 @@
- 
- /* fs/open.c */
- 
--extern int do_truncate(struct dentry *, loff_t start);
-+extern int do_truncate(struct dentry *, loff_t start, int called_from_open);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
- extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
-Index: linux-2.6.9-5.0.3.EL/net/unix/af_unix.c
-===================================================================
---- linux-2.6.9-5.0.3.EL.orig/net/unix/af_unix.c	2005-02-25 10:25:31.000000000 +0200
-+++ linux-2.6.9-5.0.3.EL/net/unix/af_unix.c	2005-02-26 13:29:13.387563440 +0200
-@@ -676,6 +676,7 @@
- 	int err = 0;
- 	
- 	if (sunname->sun_path[0]) {
-+		intent_init(&nd.intent, IT_LOOKUP);
- 		err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd);
- 		if (err)
- 			goto fail;
diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch
deleted file mode 100644
index aba3c8b3da80465920f1c8eff0e02d4028c63624..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_nointent-2.6-sles10.patch
+++ /dev/null
@@ -1,453 +0,0 @@
-Index: linux-2.6.16.21-0.8/net/unix/af_unix.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/net/unix/af_unix.c	2006-08-03 01:34:33.000000000 -0600
-+++ linux-2.6.16.21-0.8/net/unix/af_unix.c	2006-08-03 01:35:38.000000000 -0600
-@@ -673,6 +673,7 @@
- 	int err = 0;
- 	
- 	if (sunname->sun_path[0]) {
-+		intent_init(&nd.intent, IT_LOOKUP);
- 		err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd);
- 		if (err)
- 			goto fail;
-Index: linux-2.6.16.21-0.8/fs/open.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/open.c	2006-08-03 01:34:33.000000000 -0600
-+++ linux-2.6.16.21-0.8/fs/open.c	2006-08-03 02:54:31.000000000 -0600
-@@ -197,9 +197,10 @@
- }
- 
- int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
--	struct file *filp)
-+	struct file *filp, int called_from_open)
- {
- 	int err;
-+	struct inode_operations *op = dentry->d_inode->i_op;
- 	struct iattr newattrs;
- 
- 	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -214,7 +215,17 @@
- 	}
- 
- 	mutex_lock(&dentry->d_inode->i_mutex);
--	err = notify_change(dentry, &newattrs);
-+	if (called_from_open)
-+                newattrs.ia_valid |= ATTR_FROM_OPEN;
-+        if (op->setattr_raw) {
-+                newattrs.ia_valid |= ATTR_RAW;
-+                newattrs.ia_ctime = CURRENT_TIME;
-+                down_write(&dentry->d_inode->i_alloc_sem);
-+                err = op->setattr_raw(dentry->d_inode, &newattrs);
-+                up_write(&dentry->d_inode->i_alloc_sem);
-+        } else
-+                err = notify_change(dentry, &newattrs);
-+
- 	mutex_unlock(&dentry->d_inode->i_mutex);
- 	return err;
- }
-@@ -269,7 +280,7 @@
- 	error = locks_verify_truncate(inode, NULL, length);
- 	if (!error) {
- 		DQUOT_INIT(inode);
--		error = do_truncate(nd.dentry, length, 0, NULL);
-+		error = do_truncate(nd.dentry, length, 0, NULL, 0);
- 	}
- 	put_write_access(inode);
- 
-@@ -321,7 +332,7 @@
- 
- 	error = locks_verify_truncate(inode, file, length);
- 	if (!error)
--		error = do_truncate(dentry, length, 0, file);
-+		error = do_truncate(dentry, length, 0, file, 0);
- out_putf:
- 	fput(file);
- out:
-@@ -406,9 +417,20 @@
- 		    (error = vfs_permission(&nd, MAY_WRITE)) != 0)
- 			goto dput_and_out;
- 	}
--	mutex_lock(&inode->i_mutex);
--	error = notify_change(nd.dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
-+ 	if (inode->i_op->setattr_raw) {
-+ 		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+ 		newattrs.ia_valid |= ATTR_RAW;
-+ 		error = op->setattr_raw(inode, &newattrs);
-+ 		/* the file system wants to use normal vfs path now */
-+ 		if (error != -EOPNOTSUPP)
-+ 			goto dput_and_out;
-+ 	} else {
-+		mutex_lock(&inode->i_mutex);
-+ 		error = notify_change(nd.dentry, &newattrs);
-+		mutex_unlock(&inode->i_mutex);
-+ 	}
-+
- dput_and_out:
- 	path_release(&nd);
- out:
-@@ -620,36 +642,52 @@
- 	return error;
- }
- 
-+int chmod_common(struct dentry *dentry, mode_t mode)
-+{
-+      struct inode * inode = dentry->d_inode;
-+      struct iattr newattrs;
-+      int error = -EROFS;
-+
-+      if (IS_RDONLY(inode))
-+              goto out;
-+
-+      if (inode->i_op->setattr_raw) {
-+              struct inode_operations *op = dentry->d_inode->i_op;
-+
-+              newattrs.ia_mode = mode;
-+              newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+              newattrs.ia_valid |= ATTR_RAW;
-+              error = op->setattr_raw(inode, &newattrs);
-+              /* the file system wants to use normal vfs path now */
-+              if (error != -EOPNOTSUPP)
-+                    goto out;
-+      }
-+
-+      error = -EPERM;
-+      if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-+              goto out;
-+
-+      mutex_lock(&inode->i_mutex);
-+      if (mode == (mode_t) -1)
-+              mode = inode->i_mode;
-+      newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
-+      newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+      error = notify_change(dentry, &newattrs);
-+      mutex_unlock(&inode->i_mutex);
-+out:
-+      return error;
-+}
-+
- asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
- {
--	struct inode * inode;
--	struct dentry * dentry;
- 	struct file * file;
- 	int err = -EBADF;
--	struct iattr newattrs;
- 
- 	file = fget(fd);
- 	if (!file)
- 		goto out;
- 
--	dentry = file->f_dentry;
--	inode = dentry->d_inode;
--
--	err = -EROFS;
--	if (IS_RDONLY(inode))
--		goto out_putf;
--	err = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto out_putf;
--	mutex_lock(&inode->i_mutex);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	err = notify_change(dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
--
--out_putf:
-+        err = chmod_common(file->f_dentry, mode);
- 	fput(file);
- out:
- 	return err;
-@@ -659,32 +697,12 @@
- 			     mode_t mode)
- {
- 	struct nameidata nd;
--	struct inode * inode;
- 	int error;
--	struct iattr newattrs;
- 
- 	error = __user_walk_fd(dfd, filename, LOOKUP_FOLLOW, &nd);
- 	if (error)
- 		goto out;
--	inode = nd.dentry->d_inode;
--
--	error = -EROFS;
--	if (IS_RDONLY(inode))
--		goto dput_and_out;
--
--	error = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto dput_and_out;
--
--	mutex_lock(&inode->i_mutex);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	error = notify_change(nd.dentry, &newattrs);
--	mutex_unlock(&inode->i_mutex);
--
--dput_and_out:
-+	error = chmod_common(nd.dentry, mode);
- 	path_release(&nd);
- out:
- 	return error;
-@@ -710,6 +728,18 @@
- 	if (IS_RDONLY(inode))
- 		goto out;
- 	error = -EPERM;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_uid = user;
-+		newattrs.ia_gid = group;
-+		newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			return error;
-+	}
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto out;
- 	newattrs.ia_valid =  ATTR_CTIME;
-Index: linux-2.6.16.21-0.8/fs/namei.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/namei.c	2006-08-03 01:34:33.000000000 -0600
-+++ linux-2.6.16.21-0.8/fs/namei.c	2006-08-03 02:54:31.000000000 -0600
-@@ -1637,7 +1637,7 @@
- 		if (!error) {
- 			DQUOT_INIT(inode);
- 			
--			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL);
-+			error = do_truncate(dentry, 0, ATTR_MTIME|ATTR_CTIME, NULL, 1);
- 		}
- 		put_write_access(inode);
- 		if (error)
-@@ -1911,6 +1911,7 @@
- 	char * tmp;
- 	struct dentry * dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	if (S_ISDIR(mode))
- 		return -EPERM;
-@@ -1921,6 +1922,15 @@
- 	error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
-+
-+	if (nd.dentry->d_inode->i_op->mknod_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->mknod_raw(&nd, mode, dev);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out2;
-+	}
-+
- 	dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(dentry);
- 
-@@ -1947,6 +1957,7 @@
- 		dput(dentry);
- 	}
- 	mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 	path_release(&nd);
- out:
- 	putname(tmp);
-@@ -1992,9 +2003,18 @@
- 		struct dentry *dentry;
- 		struct nameidata nd;
- 
-+ 		intent_init(&nd.intent, IT_LOOKUP);
- 		error = do_path_lookup(dfd, tmp, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+ 		if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+ 			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 			error = op->mkdir_raw(&nd, mode);
-+ 			/* the file system wants to use normal vfs path now */
-+ 			if (error != -EOPNOTSUPP)
-+ 				goto out2;
-+ 		}
-+
- 		dentry = lookup_create(&nd, 1);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -2004,6 +2024,7 @@
- 			dput(dentry);
- 		}
- 		mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(tmp);
-@@ -2084,6 +2105,7 @@
- 	char * name;
- 	struct dentry *dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -2104,6 +2126,14 @@
- 			error = -EBUSY;
- 			goto exit1;
- 	}
-+	if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+                struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+                error = op->rmdir_raw(&nd);
-+                /* the file system wants to use normal vfs path now */
-+                if (error != -EOPNOTSUPP)
-+                        goto exit1;
-+        }
- 	mutex_lock(&nd.dentry->d_inode->i_mutex);
- 	dentry = lookup_hash(&nd);
- 	error = PTR_ERR(dentry);
-@@ -2167,6 +2197,7 @@
- 	struct dentry *dentry;
- 	struct nameidata nd;
- 	struct inode *inode = NULL;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -2178,6 +2209,13 @@
- 	error = -EISDIR;
- 	if (nd.last_type != LAST_NORM)
- 		goto exit1;
-+	if (nd.dentry->d_inode->i_op->unlink_raw) {
-+        	struct inode_operations *op = nd.dentry->d_inode->i_op;
-+        	error = op->unlink_raw(&nd);
-+                /* the file system wants to use normal vfs path now */
-+        	if (error != -EOPNOTSUPP)
-+                       goto exit1;
-+        }
- 	mutex_lock(&nd.dentry->d_inode->i_mutex);
- 	dentry = lookup_hash(&nd);
- 	error = PTR_ERR(dentry);
-@@ -2260,9 +2298,17 @@
- 		struct dentry *dentry;
- 		struct nameidata nd;
- 
-+ 		intent_init(&nd.intent, IT_LOOKUP);
- 		error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+		if (nd.dentry->d_inode->i_op->symlink_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+ 			error = op->symlink_raw(&nd, from);
-+ 			/* the file system wants to use normal vfs path now */
-+ 			if (error != -EOPNOTSUPP)
-+ 				goto out2;
-+ 		}
- 		dentry = lookup_create(&nd, 0);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -2270,6 +2316,7 @@
- 			dput(dentry);
- 		}
- 		mutex_unlock(&nd.dentry->d_inode->i_mutex);
-+out2:
- 		path_release(&nd);
- out:
- 		putname(to);
-@@ -2357,6 +2404,13 @@
- 	error = -EXDEV;
- 	if (old_nd.mnt != nd.mnt)
- 		goto out_release;
-+	if (nd.dentry->d_inode->i_op->link_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->link_raw(&old_nd, &nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out_release;
-+	}
- 	new_dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(new_dentry);
- 	if (!IS_ERR(new_dentry)) {
-@@ -2533,6 +2587,8 @@
- 	struct dentry * old_dentry, *new_dentry;
- 	struct dentry * trap;
- 	struct nameidata oldnd, newnd;
-+	intent_init(&oldnd.intent, IT_LOOKUP);
-+	intent_init(&newnd.intent, IT_LOOKUP);
- 
- 	error = do_path_lookup(olddfd, oldname, LOOKUP_PARENT, &oldnd);
- 	if (error)
-@@ -2555,6 +2611,13 @@
- 	if (newnd.last_type != LAST_NORM)
- 		goto exit2;
- 
-+	if (old_dir->d_inode->i_op->rename_raw) {
-+		error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit2;
-+	}
-+
- 	trap = lock_rename(new_dir, old_dir);
- 
- 	old_dentry = lookup_hash(&oldnd);
-@@ -2586,8 +2649,7 @@
- 	if (new_dentry == trap)
- 		goto exit5;
- 
--	error = vfs_rename(old_dir->d_inode, old_dentry,
--				   new_dir->d_inode, new_dentry);
-+	error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
- exit5:
- 	dput(new_dentry);
- exit4:
-Index: linux-2.6.16.21-0.8/fs/exec.c
-===================================================================
---- linux-2.6.16.21-0.8.orig/fs/exec.c	2006-08-03 01:34:33.000000000 -0600
-+++ linux-2.6.16.21-0.8/fs/exec.c	2006-08-03 01:35:38.000000000 -0600
-@@ -1524,7 +1524,7 @@
- 		goto close_fail;
- 	if (!file->f_op->write)
- 		goto close_fail;
--	if (do_truncate(file->f_dentry, 0, 0, file) != 0)
-+	if (do_truncate(file->f_dentry, 0, 0, file, 0) != 0)
- 		goto close_fail;
- 
- 	retval = binfmt->core_dump(signr, regs, file);
-Index: linux-2.6.16.21-0.8/include/linux/fs.h
-===================================================================
---- linux-2.6.16.21-0.8.orig/include/linux/fs.h	2006-08-03 01:34:33.000000000 -0600
-+++ linux-2.6.16.21-0.8/include/linux/fs.h	2006-08-03 01:35:38.000000000 -0600
-@@ -1041,13 +1041,20 @@
- 	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
- 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- 	int (*link) (struct dentry *,struct inode *,struct dentry *);
-+	int (*link_raw) (struct nameidata *,struct nameidata *);
- 	int (*unlink) (struct inode *,struct dentry *);
-+	int (*unlink_raw) (struct nameidata *);
- 	int (*symlink) (struct inode *,struct dentry *,const char *);
-+	int (*symlink_raw) (struct nameidata *,const char *);
- 	int (*mkdir) (struct inode *,struct dentry *,int);
-+	int (*mkdir_raw) (struct nameidata *,int);
- 	int (*rmdir) (struct inode *,struct dentry *);
-+	int (*rmdir_raw) (struct nameidata *);
- 	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
-+	int (*mknod_raw) (struct nameidata *,int,dev_t);
- 	int (*rename) (struct inode *, struct dentry *,
- 			struct inode *, struct dentry *);
-+	int (*rename_raw) (struct nameidata *, struct nameidata *);
- 	int (*readlink) (struct dentry *, char __user *,int);
- 	void * (*follow_link) (struct dentry *, struct nameidata *);
- 	void (*put_link) (struct dentry *, struct nameidata *, void *);
-@@ -1357,7 +1364,7 @@
- /* fs/open.c */
- 
- extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
--		       struct file *filp);
-+		       struct file *filp, int called_from_open);
- extern long do_sys_open(int fdf, const char __user *filename, int flags,
- 			int mode);
- extern struct file *filp_open(const char *, int, int);
diff --git a/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch
deleted file mode 100644
index 184fa4940121754d658a8b970b735ed1ce849106..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_nointent-2.6-suse.patch
+++ /dev/null
@@ -1,472 +0,0 @@
- 0 files changed
-
-.old..........pc/vfs_nointent_2.6.0-suse/fs/namei.c
-.new.........fs/namei.c
-Index: linux-2.6.5-12.1/fs/namei.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/namei.c	2004-05-11 15:41:54.000000000 -0400
-+++ linux-2.6.5-12.1/fs/namei.c	2004-05-11 15:42:00.000000000 -0400
-@@ -1292,7 +1292,7 @@
- 		if (!error) {
- 			DQUOT_INIT(inode);
- 			
--			error = do_truncate(dentry, 0);
-+			error = do_truncate(dentry, 0, 1);
- 		}
- 		put_write_access(inode);
- 		if (error)
-@@ -1542,6 +1542,7 @@
- 	char * tmp;
- 	struct dentry * dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	if (S_ISDIR(mode))
- 		return -EPERM;
-@@ -1554,6 +1555,15 @@
- 	error = path_lookup(tmp, LOOKUP_PARENT, &nd);
- 	if (error)
- 		goto out;
-+
-+	if (nd.dentry->d_inode->i_op->mknod_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->mknod_raw(&nd, mode, dev);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out2;
-+	}
-+
- 	dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(dentry);
- 
-@@ -1580,6 +1590,7 @@
- 		dput(dentry);
- 	}
- 	up(&nd.dentry->d_inode->i_sem);
-+out2:
- 	path_release(&nd);
- out:
- 	putname(tmp);
-@@ -1626,10 +1637,20 @@
- 
- 		struct dentry *dentry;
- 		struct nameidata nd;
-+		intent_init(&nd.intent, IT_LOOKUP);
- 
- 		error = path_lookup(tmp, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+
-+		if (nd.dentry->d_inode->i_op->mkdir_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+			error = op->mkdir_raw(&nd, mode);
-+			/* the file system wants to use normal vfs path now */
-+			if (error != -EOPNOTSUPP)
-+				goto out2;
-+		}
-+
- 		dentry = lookup_create(&nd, 1);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1639,6 +1658,7 @@
- 			dput(dentry);
- 		}
- 		up(&nd.dentry->d_inode->i_sem);
-+out2:
- 		path_release(&nd);
- out:
- 
-@@ -1722,6 +1742,7 @@
- 	char * name;
- 	struct dentry *dentry;
- 	struct nameidata nd;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -1744,6 +1765,16 @@
- 			error = -EBUSY;
- 			goto exit1;
- 	}
-+
-+	if (nd.dentry->d_inode->i_op->rmdir_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		error = op->rmdir_raw(&nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit1;
-+	}
-+
- 	down(&nd.dentry->d_inode->i_sem);
- 	dentry = lookup_hash(&nd.last, nd.dentry);
- 	error = PTR_ERR(dentry);
-@@ -1805,6 +1834,7 @@
- 	struct dentry *dentry;
- 	struct nameidata nd;
- 	struct inode *inode = NULL;
-+	intent_init(&nd.intent, IT_LOOKUP);
- 
- 	name = getname(pathname);
- 	if(IS_ERR(name))
-@@ -1818,6 +1848,13 @@
- 	error = -EISDIR;
- 	if (nd.last_type != LAST_NORM)
- 		goto exit1;
-+	if (nd.dentry->d_inode->i_op->unlink_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->unlink_raw(&nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit1;
-+	}
- 	down(&nd.dentry->d_inode->i_sem);
- 	dentry = lookup_hash(&nd.last, nd.dentry);
- 	error = PTR_ERR(dentry);
-@@ -1891,10 +1928,18 @@
- 
- 		struct dentry *dentry;
- 		struct nameidata nd;
-+		intent_init(&nd.intent, IT_LOOKUP);
- 
- 		error = path_lookup(to, LOOKUP_PARENT, &nd);
- 		if (error)
- 			goto out;
-+		if (nd.dentry->d_inode->i_op->symlink_raw) {
-+			struct inode_operations *op = nd.dentry->d_inode->i_op;
-+			error = op->symlink_raw(&nd, from);
-+			/* the file system wants to use normal vfs path now */
-+			if (error != -EOPNOTSUPP)
-+				goto out2;
-+		}
- 		dentry = lookup_create(&nd, 0);
- 		error = PTR_ERR(dentry);
- 		if (!IS_ERR(dentry)) {
-@@ -1902,6 +1947,7 @@
- 			dput(dentry);
- 		}
- 		up(&nd.dentry->d_inode->i_sem);
-+out2:
- 		path_release(&nd);
- out:
- 
-@@ -1968,6 +2014,8 @@
- 	struct nameidata nd, old_nd;
- 	int error;
- 	char * to;
-+	intent_init(&nd.intent, IT_LOOKUP);
-+	intent_init(&old_nd.intent, IT_LOOKUP);
- 
- 	to = getname(newname);
- 	if (IS_ERR(to))
-@@ -1986,6 +2034,13 @@
- 	error = -EXDEV;
- 	if (old_nd.mnt != nd.mnt)
- 		goto out_release;
-+	if (nd.dentry->d_inode->i_op->link_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+		error = op->link_raw(&old_nd, &nd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out_release;
-+	}
- 	new_dentry = lookup_create(&nd, 0);
- 	error = PTR_ERR(new_dentry);
- 	if (!IS_ERR(new_dentry)) {
-@@ -2160,6 +2215,8 @@
- 	struct dentry * old_dentry, *new_dentry;
- 	struct dentry * trap;
- 	struct nameidata oldnd, newnd;
-+	intent_init(&oldnd.intent, IT_LOOKUP);
-+	intent_init(&newnd.intent, IT_LOOKUP);
- 
- 	error = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
- 	if (error)
-@@ -2182,6 +2239,13 @@
- 	if (newnd.last_type != LAST_NORM)
- 		goto exit2;
- 
-+	if (old_dir->d_inode->i_op->rename_raw) {
-+		error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto exit2;
-+	}
-+
- 	trap = lock_rename(new_dir, old_dir);
- 
- 	old_dentry = lookup_hash(&oldnd.last, old_dir);
-@@ -2213,8 +2277,7 @@
- 	if (new_dentry == trap)
- 		goto exit5;
- 
--	error = vfs_rename(old_dir->d_inode, old_dentry,
--				   new_dir->d_inode, new_dentry);
-+	error = vfs_rename(old_dir->d_inode, old_dentry, new_dir->d_inode, new_dentry);
- exit5:
- 	dput(new_dentry);
- exit4:
-Index: linux-2.6.5-12.1/fs/open.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/open.c	2004-05-11 15:41:54.000000000 -0400
-+++ linux-2.6.5-12.1/fs/open.c	2004-05-11 16:07:02.000000000 -0400
-@@ -203,9 +203,10 @@
- 	return error;
- }
- 
--int do_truncate(struct dentry *dentry, loff_t length)
-+int do_truncate(struct dentry *dentry, loff_t length, int called_from_open)
- {
- 	int err;
-+	struct inode_operations *op = dentry->d_inode->i_op;
- 	struct iattr newattrs;
- 
- 	/* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -216,7 +217,14 @@
- 	newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
- 	down(&dentry->d_inode->i_sem);
- 	down_write(&dentry->d_inode->i_alloc_sem);
--	err = notify_change(dentry, &newattrs);
-+	if (called_from_open)
-+		newattrs.ia_valid |= ATTR_FROM_OPEN;
-+	if (op->setattr_raw) {
-+		newattrs.ia_valid |= ATTR_RAW;
-+		newattrs.ia_ctime = CURRENT_TIME;
-+		err = op->setattr_raw(dentry->d_inode, &newattrs);
-+	} else
-+		err = notify_change(dentry, &newattrs);
- 	up_write(&dentry->d_inode->i_alloc_sem);
- 	up(&dentry->d_inode->i_sem);
- 	return err;
-@@ -271,7 +279,7 @@
- 	error = locks_verify_truncate(inode, NULL, length);
- 	if (!error) {
- 		DQUOT_INIT(inode);
--		error = do_truncate(nd.dentry, length);
-+		error = do_truncate(nd.dentry, length, 0);
- 	}
- 	put_write_access(inode);
- 
-@@ -328,7 +336,7 @@
- 
- 	error = locks_verify_truncate(inode, file, length);
- 	if (!error)
--		error = do_truncate(dentry, length);
-+		error = do_truncate(dentry, length, 0);
- out_putf:
- 	fput(file);
- out:
-@@ -402,9 +410,19 @@
- 		    (error = permission(inode,MAY_WRITE,&nd)) != 0)
- 			goto dput_and_out;
- 	}
--	down(&inode->i_sem);
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = nd.dentry->d_inode->i_op;
-+
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto dput_and_out;
-+	} else {
-+		down(&inode->i_sem);
-+		error = notify_change(nd.dentry, &newattrs);
-+		up(&inode->i_sem);
-+	}
- dput_and_out:
- 	path_release(&nd);
- 
-@@ -613,39 +631,55 @@
- 	return error;
- }
- 
--asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+int chmod_common(struct dentry *dentry, mode_t mode)
- {
--	struct inode * inode;
--	struct dentry * dentry;
--	struct file * file;
--	int err;
-+	struct inode * inode = dentry->d_inode;
- 	struct iattr newattrs;
-+	int error = -EROFS;
- 
--	FSHOOK_BEGIN(fchmod, err, .fd = fd, .mode = mode)
--
--	err = -EBADF;
--	file = fget(fd);
--	if (!file)
-+	if (IS_RDONLY(inode))
- 		goto out;
-+	
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_mode = mode;
-+		newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use the normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			goto out;
-+	}
- 
--	dentry = file->f_dentry;
--	inode = dentry->d_inode;
--
--	err = -EROFS;
--	if (IS_RDONLY(inode))
--		goto out_putf;
--	err = -EPERM;
-+	error = -EPERM;
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto out_putf;
-+		goto out;
-+
- 	down(&inode->i_sem);
- 	if (mode == (mode_t) -1)
- 		mode = inode->i_mode;
- 	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
- 	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	err = notify_change(dentry, &newattrs);
-+	error = notify_change(dentry, &newattrs);
- 	up(&inode->i_sem);
- 
--out_putf:
-+out:
-+	return error;
-+}
-+
-+asmlinkage long sys_fchmod(unsigned int fd, mode_t mode)
-+{
-+	struct file * file;
-+	int err = -EBADF;
-+
-+	FSHOOK_BEGIN(fchmod, err, .fd = fd, .mode = mode)
-+
-+	file = fget(fd);
-+	if (!file)
-+		goto out;
-+
-+	err = chmod_common(file->f_dentry, mode);
- 	fput(file);
- out:
- 
-@@ -657,9 +691,7 @@
- asmlinkage long sys_chmod(const char __user * filename, mode_t mode)
- {
- 	struct nameidata nd;
--	struct inode * inode;
- 	int error;
--	struct iattr newattrs;
- 
- 	FSHOOK_BEGIN_USER_PATH_WALK(chmod,
- 		error,
-@@ -669,25 +701,7 @@
- 		.mode = mode,
- 		.link = false)
- 
--	inode = nd.dentry->d_inode;
--
--	error = -EROFS;
--	if (IS_RDONLY(inode))
--		goto dput_and_out;
--	
--	error = -EPERM;
--	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
--		goto dput_and_out;
--
--	down(&inode->i_sem);
--	if (mode == (mode_t) -1)
--		mode = inode->i_mode;
--	newattrs.ia_mode = (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
--	newattrs.ia_valid = ATTR_MODE | ATTR_CTIME;
--	error = notify_change(nd.dentry, &newattrs);
--	up(&inode->i_sem);
--
--dput_and_out:
-+	error = chmod_common(nd.dentry, mode);
- 	path_release(&nd);
- 
- 	FSHOOK_END_USER_WALK(chmod, error, path)
-@@ -710,6 +724,18 @@
- 	if (IS_RDONLY(inode))
- 		goto out;
- 	error = -EPERM;
-+	if (inode->i_op->setattr_raw) {
-+		struct inode_operations *op = dentry->d_inode->i_op;
-+
-+		newattrs.ia_uid = user;
-+		newattrs.ia_gid = group;
-+		newattrs.ia_valid = ATTR_UID | ATTR_GID | ATTR_CTIME;
-+		newattrs.ia_valid |= ATTR_RAW;
-+		error = op->setattr_raw(inode, &newattrs);
-+		/* the file system wants to use normal vfs path now */
-+		if (error != -EOPNOTSUPP)
-+			return error;
-+	}
- 	if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
- 		goto out;
- 	newattrs.ia_valid =  ATTR_CTIME;
-Index: linux-2.6.5-12.1/fs/exec.c
-===================================================================
---- linux-2.6.5-12.1.orig/fs/exec.c	2004-05-11 15:41:54.000000000 -0400
-+++ linux-2.6.5-12.1/fs/exec.c	2004-05-11 15:42:00.000000000 -0400
-@@ -1435,7 +1435,7 @@
- 		goto close_fail;
- 	if (!file->f_op->write)
- 		goto close_fail;
--	if (do_truncate(file->f_dentry, 0) != 0)
-+	if (do_truncate(file->f_dentry, 0, 0) != 0)
- 		goto close_fail;
- 
- 	retval = binfmt->core_dump(signr, regs, file);
-Index: linux-2.6.5-12.1/include/linux/fs.h
-===================================================================
---- linux-2.6.5-12.1.orig/include/linux/fs.h	2004-05-11 15:41:54.000000000 -0400
-+++ linux-2.6.5-12.1/include/linux/fs.h	2004-05-11 15:42:00.000000000 -0400
-@@ -878,13 +878,20 @@
- 	int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
- 	struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
- 	int (*link) (struct dentry *,struct inode *,struct dentry *);
-+	int (*link_raw) (struct nameidata *,struct nameidata *);
- 	int (*unlink) (struct inode *,struct dentry *);
-+	int (*unlink_raw) (struct nameidata *);
- 	int (*symlink) (struct inode *,struct dentry *,const char *);
-+	int (*symlink_raw) (struct nameidata *,const char *);
- 	int (*mkdir) (struct inode *,struct dentry *,int);
-+	int (*mkdir_raw) (struct nameidata *,int);
- 	int (*rmdir) (struct inode *,struct dentry *);
-+	int (*rmdir_raw) (struct nameidata *);
- 	int (*mknod) (struct inode *,struct dentry *,int,dev_t);
-+	int (*mknod_raw) (struct nameidata *,int,dev_t);
- 	int (*rename) (struct inode *, struct dentry *,
- 			struct inode *, struct dentry *);
-+	int (*rename_raw) (struct nameidata *, struct nameidata *);
- 	int (*readlink) (struct dentry *, char __user *,int);
- 	int (*follow_link) (struct dentry *, struct nameidata *);
- 	void (*truncate) (struct inode *);
-@@ -1182,7 +1189,7 @@
- 
- /* fs/open.c */
- 
--extern int do_truncate(struct dentry *, loff_t start);
-+extern int do_truncate(struct dentry *, loff_t start, int called_from_open);
- extern struct file *filp_open(const char *, int, int);
- extern struct file * dentry_open(struct dentry *, struct vfsmount *, int);
- extern struct file * dentry_open_it(struct dentry *, struct vfsmount *, int, struct lookup_intent *);
-Index: linux-2.6.5-12.1/net/unix/af_unix.c
-===================================================================
---- linux-2.6.5-12.1.orig/net/unix/af_unix.c	2004-04-03 22:37:36.000000000 -0500
-+++ linux-2.6.5-12.1/net/unix/af_unix.c	2004-05-11 15:42:00.000000000 -0400
-@@ -676,6 +676,7 @@
- 	int err = 0;
- 	
- 	if (sunname->sun_path[0]) {
-+		intent_init(&nd.intent, IT_LOOKUP);
- 		err = path_lookup(sunname->sun_path, LOOKUP_FOLLOW, &nd);
- 		if (err)
- 			goto fail;
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch b/lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch
deleted file mode 100644
index e0db838a12eb4e1ef05b0990354ee279955a21d5..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6-fc3.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Index: linux-2.6.11/fs/dcache.c
-===================================================================
---- linux-2.6.11.orig/fs/dcache.c	2005-04-13 22:44:37.698760922 -0400
-+++ linux-2.6.11/fs/dcache.c	2005-04-13 22:44:50.482498026 -0400
-@@ -1197,15 +1197,24 @@
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
- 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
- 
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
- 	__d_rehash(entry, list);
- 	spin_unlock(&entry->d_lock);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
-+}
-+
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
- }
- 
- #define do_switch(x,y) do { \
-Index: linux-2.6.11/include/linux/dcache.h
-===================================================================
---- linux-2.6.11.orig/include/linux/dcache.h	2005-04-13 22:35:23.515178600 -0400
-+++ linux-2.6.11/include/linux/dcache.h	2005-04-13 22:44:43.188221365 -0400
-@@ -159,6 +159,8 @@
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID     0x0020  /* Lustre invalidated */
-+
- 
- extern spinlock_t dcache_lock;
- 
-@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry 
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch b/lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch
deleted file mode 100644
index 04ac6fe2c027179d9caf98bfb7e3e04b0562f1f2..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6-rhel4.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-diff -urp RH_2_6_9_42_0_3.orig/fs/dcache.c RH_2_6_9_42_0_3/fs/dcache.c
---- RH_2_6_9_42_0_3.orig/fs/dcache.c
-+++ RH_2_6_9_42_0_3/fs/dcache.c
-@@ -229,7 +229,14 @@ int d_invalidate(struct dentry * dentry)
- 		spin_unlock(&dcache_lock);
- 		return 0;
- 	}
--	/*
-+
-+        /* network invalidation by Lustre */
-+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
-+		spin_unlock(&dcache_lock);
-+		return 0;
-+	}
-+
-+        /*
- 	 * Check whether to do a partial shrink_dcache
- 	 * to get rid of unused child entries.
- 	 */
-@@ -1187,19 +1194,28 @@ void d_delete(struct dentry * dentry)
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
- 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
- 
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
-  	entry->d_flags &= ~DCACHE_UNHASHED;
- 	spin_unlock(&entry->d_lock);
- 	entry->d_bucket = list;
-  	hlist_add_head_rcu(&entry->d_hash, list);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
- }
- 
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
-+}
-+
- #define do_switch(x,y) do { \
- 	__typeof__ (x) __tmp = x; \
- 	x = y; y = __tmp; } while (0)
-diff -urp RH_2_6_9_42_0_3.orig/include/linux/dcache.h RH_2_6_9_42_0_3/include/linux/dcache.h
---- RH_2_6_9_42_0_3.orig/include/linux/dcache.h
-+++ RH_2_6_9_42_0_3/include/linux/dcache.h
-@@ -157,6 +157,8 @@ d_iput:		no		no		no       yes
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID     0x0020  /* Lustre invalidated */
-+
- 
- extern spinlock_t dcache_lock;
- 
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch b/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch
deleted file mode 100644
index cf1616742b5174f5e2b790f2a5ab8eec8e1fb025..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6-rhel5.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-diff -urp linux-2.6.18.rawops/fs/dcache.c linux-2.6.18.races/fs/dcache.c
---- linux-2.6.18.rawops/fs/dcache.c	2007-02-08 19:00:31.000000000 +0200
-+++ linux-2.6.18.races/fs/dcache.c	2007-02-14 19:23:49.000000000 +0200
-@@ -230,6 +230,13 @@ int d_invalidate(struct dentry * dentry)
- 		spin_unlock(&dcache_lock);
- 		return 0;
- 	}
-+
-+	/* network invalidation by Lustre */
-+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
-+		spin_unlock(&dcache_lock);
-+		return 0;
-+	}
-+
- 	/*
- 	 * Check whether to do a partial shrink_dcache
- 	 * to get rid of unused child entries.
-@@ -1400,13 +1407,21 @@ static void _d_rehash(struct dentry * en
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
--	spin_lock(&dcache_lock);
-+ 	if (lock)
-+	    spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
- 	_d_rehash(entry);
- 	spin_unlock(&entry->d_lock);
--	spin_unlock(&dcache_lock);
-+ 	if (lock)	
-+	    spin_unlock(&dcache_lock);
-+}
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
- }
- 
- #define do_switch(x,y) do { \
-@@ -1481,7 +1496,7 @@ static void switch_names(struct dentry *
-  * Update the dcache to reflect the move of a file name. Negative
-  * dcache entries should not be moved in this way.
-  */
--static void d_move_locked(struct dentry * dentry, struct dentry * target)
-+void d_move_locked(struct dentry * dentry, struct dentry * target)
- {
- 	struct hlist_head *list;
- 
-@@ -1549,6 +1563,8 @@ already_unhashed:
- 	spin_unlock(&dentry->d_lock);
- 	write_sequnlock(&rename_lock);
- }
-+
-+EXPORT_SYMBOL(d_move_locked);
- 
- /**
-  * d_move - move a dentry
-diff -urp linux-2.6.18.rawops/include/linux/dcache.h linux-2.6.18.races/include/linux/dcache.h
---- linux-2.6.18.rawops/include/linux/dcache.h	2007-02-14 16:52:37.000000000 +0200
-+++ linux-2.6.18.races/include/linux/dcache.h	2007-02-14 19:21:14.000000000 +0200
-@@ -177,6 +177,7 @@ d_iput:		no		no		no       yes
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID	0x0040  /* Lustre invalidated */
- 
- #define DCACHE_INOTIFY_PARENT_WATCHED	0x0020 /* Parent inode is watched */
- 
-@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry 
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
-@@ -289,6 +291,7 @@ static inline struct dentry *d_add_uniqu
- 
- /* used for rename() and baskets */
- extern void d_move(struct dentry *, struct dentry *);
-+extern void d_move_locked(struct dentry *, struct dentry *);
- 
- /* appendix may either be NULL or be used for transname suffixes */
- extern struct dentry * d_lookup(struct dentry *, struct qstr *);
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_races-2.6-suse.patch
deleted file mode 100644
index 756ac9e2e47826ff9785bbd4b2265935b0c73a5d..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6-suse.patch
+++ /dev/null
@@ -1,68 +0,0 @@
- fs/dcache.c            |   24 ++++++++++++++++++++----
- include/linux/dcache.h |    2 ++
- 2 files changed, 22 insertions(+), 4 deletions(-)
-
---- linux-2.6.0-test1/fs/dcache.c~vfs_races_2.5.72_rev1	2003-07-24 15:52:47.000000000 +0400
-+++ linux-2.6.0-test1-alexey/fs/dcache.c	2003-09-13 16:21:16.000000000 +0400
-@@ -212,6 +212,13 @@ int d_invalidate(struct dentry * dentry)
- 		spin_unlock(&dcache_lock);
- 		return 0;
- 	}
-+
-+	/* network invalidation by Lustre */
-+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
-+		spin_unlock(&dcache_lock);
-+		return 0;
-+	}
-+
- 	/*
- 	 * Check whether to do a partial shrink_dcache
- 	 * to get rid of unused child entries.
-@@ -1135,14 +1142,23 @@ void d_delete(struct dentry * dentry)
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
- 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
-  	entry->d_vfs_flags &= ~DCACHE_UNHASHED;
- 	entry->d_bucket = list;
-  	hlist_add_head_rcu(&entry->d_hash, list);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
-+}
-+
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
- }
- 
- #define do_switch(x,y) do { \
---- linux-2.6.0-test1/include/linux/dcache.h~vfs_races_2.5.72_rev1	2003-09-13 16:21:05.000000000 +0400
-+++ linux-2.6.0-test1-alexey/include/linux/dcache.h	2003-09-13 16:21:16.000000000 +0400
-@@ -156,6 +156,8 @@ d_iput:		no		no		yes
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID     0x0020  /* Lustre invalidated */
-+
- 
- extern spinlock_t dcache_lock;
- 
-@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry 
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
-
-_
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6.12.patch b/lustre/kernel_patches/patches/vfs_races-2.6.12.patch
deleted file mode 100644
index 86661256d7f8b2ce7a942aea0510126ebf65a859..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6.12.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-Index: linux-2.6.7-vanilla/fs/dcache.c
-===================================================================
---- linux-2.6.7-vanilla.orig/fs/dcache.c	2004-07-01 12:09:19.000000000 +0300
-+++ linux-2.6.7-vanilla/fs/dcache.c	2004-07-01 12:29:12.510193264 +0300
-@@ -219,6 +219,13 @@
- 		spin_unlock(&dcache_lock);
- 		return 0;
- 	}
-+
-+	/* network invalidation by Lustre */
-+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
-+		spin_unlock(&dcache_lock);
-+		return 0;
-+	}
-+
- 	/*
- 	 * Check whether to do a partial shrink_dcache
- 	 * to get rid of unused child entries.
-@@ -1199,16 +1199,25 @@
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
- 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
- 
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
- 	__d_rehash(entry, list);
- 	spin_unlock(&entry->d_lock);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
- }
- 
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
-+ }
-+
- #define do_switch(x,y) do { \
- 	__typeof__ (x) __tmp = x; \
- 	x = y; y = __tmp; } while (0)
-Index: linux-2.6.7-vanilla/include/linux/dcache.h
-===================================================================
---- linux-2.6.7-vanilla.orig/include/linux/dcache.h	2004-07-01 12:24:53.602553208 +0300
-+++ linux-2.6.7-vanilla/include/linux/dcache.h	2004-07-01 12:27:29.757814000 +0300
-@@ -159,6 +159,8 @@
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID     0x0020  /* Lustre invalidated */
-+
- 
- extern spinlock_t dcache_lock;
- 
-@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry 
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch b/lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch
deleted file mode 100644
index 2d3fc7f4049fe03378294bf7aecfe822990b56a9..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6.18-vanilla.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-Index: linux-2.6/fs/dcache.c
-===================================================================
---- linux-2.6.orig/fs/dcache.c	2006-08-31 11:59:09.000000000 +0800
-+++ linux-2.6/fs/dcache.c	2006-09-06 14:01:37.000000000 +0800
-@@ -226,6 +226,13 @@ int d_invalidate(struct dentry * dentry)
- 		spin_unlock(&dcache_lock);
- 		return 0;
- 	}
-+
-+	/* network invalidation by Lustre */
-+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
-+		spin_unlock(&dcache_lock);
-+		return 0;
-+	}
-+
- 	/*
- 	 * Check whether to do a partial shrink_dcache
- 	 * to get rid of unused child entries.
-@@ -1242,17 +1249,26 @@ static void __d_rehash(struct dentry * e
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
- 	struct hlist_head *list = d_hash(entry->d_parent, entry->d_name.hash);
- 
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
- 	__d_rehash(entry, list);
- 	spin_unlock(&entry->d_lock);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
- }
- 
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
-+ }
-+
- #define do_switch(x,y) do { \
- 	__typeof__ (x) __tmp = x; \
- 	x = y; y = __tmp; } while (0)
-Index: linux-2.6/include/linux/dcache.h
-===================================================================
---- linux-2.6.orig/include/linux/dcache.h	2006-08-31 12:00:23.000000000 +0800
-+++ linux-2.6/include/linux/dcache.h	2006-09-06 14:02:36.000000000 +0800
-@@ -176,6 +176,7 @@ d_iput:		no		no		no       yes
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID	0x0040  /* Lustre invalidated */
- 
- #define DCACHE_INOTIFY_PARENT_WATCHED	0x0020 /* Parent inode is watched */
- 
-@@ -254,6 +255,7 @@ extern int have_submounts(struct dentry 
-  * This adds the entry to the hash queues.
-  */
- extern void d_rehash(struct dentry *);
-+extern void d_rehash_cond(struct dentry *, int lock);
- 
- /**
-  * d_add - add dentry to hash queues
diff --git a/lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch b/lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch
deleted file mode 100644
index 264349404c4d7b19cd8fe696642b2c85b89dd0fe..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vfs_races-2.6.22-vanilla.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-Index: linux-2.6.22.5/fs/dcache.c
-===================================================================
---- linux-2.6.22.5.orig/fs/dcache.c	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/fs/dcache.c	2008-02-21 00:56:09.000000000 -0700
-@@ -245,6 +245,13 @@
- 		spin_unlock(&dcache_lock);
- 		return 0;
- 	}
-+
-+	/* network invalidation by Lustre */
-+	if (dentry->d_flags & DCACHE_LUSTRE_INVALID) {
-+		spin_unlock(&dcache_lock);
-+		return 0;
-+	}
-+
- 	/*
- 	 * Check whether to do a partial shrink_dcache
- 	 * to get rid of unused child entries.
-@@ -1441,13 +1448,22 @@
-  * Adds a dentry to the hash according to its name.
-  */
-  
--void d_rehash(struct dentry * entry)
-+void d_rehash_cond(struct dentry * entry, int lock)
- {
--	spin_lock(&dcache_lock);
-+	if (lock)
-+		spin_lock(&dcache_lock);
- 	spin_lock(&entry->d_lock);
- 	_d_rehash(entry);
- 	spin_unlock(&entry->d_lock);
--	spin_unlock(&dcache_lock);
-+	if (lock)
-+		spin_unlock(&dcache_lock);
-+}
-+
-+EXPORT_SYMBOL(d_rehash_cond);
-+
-+void d_rehash(struct dentry * entry)
-+{
-+	d_rehash_cond(entry, 1);
- }
- 
- #define do_switch(x,y) do { \
-Index: linux-2.6.22.5/include/linux/dcache.h
-===================================================================
---- linux-2.6.22.5.orig/include/linux/dcache.h	2007-08-22 17:23:54.000000000 -0600
-+++ linux-2.6.22.5/include/linux/dcache.h	2008-02-21 00:56:09.000000000 -0700
-@@ -174,6 +174,7 @@
- 
- #define DCACHE_REFERENCED	0x0008  /* Recently used, don't discard. */
- #define DCACHE_UNHASHED		0x0010	
-+#define DCACHE_LUSTRE_INVALID	0x0040  /* Lustre invalidated */
- 
- #define DCACHE_INOTIFY_PARENT_WATCHED	0x0020 /* Parent inode is watched */
- 
diff --git a/lustre/kernel_patches/patches/vm-tunables-rhel4.patch b/lustre/kernel_patches/patches/vm-tunables-rhel4.patch
deleted file mode 100644
index db2460b21721b3ac0338c1f0350e67677b8ea036..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/patches/vm-tunables-rhel4.patch
+++ /dev/null
@@ -1,19 +0,0 @@
-Index: linux+rhel4+chaos/mm/page_alloc.c
-===================================================================
---- linux+rhel4+chaos.orig/mm/page_alloc.c
-+++ linux+rhel4+chaos/mm/page_alloc.c
-@@ -1972,8 +1972,12 @@ static void setup_per_zone_pages_min(voi
- 			                   lowmem_pages;
- 		}
- 
--		zone->pages_low = zone->pages_min * 2;
--		zone->pages_high = zone->pages_min * 3;
-+		/*
-+		 * When interpreting these watermarks, just keep in mind that:
-+		 * zone->pages_min == (zone->pages_min * 4) / 4;
-+		 */
-+		zone->pages_low  = (zone->pages_min * 5) / 4;
-+		zone->pages_high = (zone->pages_min * 6) / 4;
- 		spin_unlock_irqrestore(&zone->lru_lock, flags);
- 	}
- }
diff --git a/lustre/kernel_patches/series/2.6-fc3.series b/lustre/kernel_patches/series/2.6-fc3.series
deleted file mode 100644
index dff06960dcaba2dfab55582852d38f1e989b6497..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-fc3.series
+++ /dev/null
@@ -1,23 +0,0 @@
-uml-2.6.10-fc3.patch
-lustre_version.patch
-fc3_to_rhel4_updates.patch 
-vfs_intent-2.6-fc3.patch
-vfs_nointent-2.6-rhel4.patch
-vfs_races-2.6-fc3.patch
-nfs-cifs-intent-2.6-fc3.patch
-iopen-misc-2.6-fc3.patch
-export-truncate-2.6-suse.patch
-export_symbols-2.6-rhel4.patch
-dev_read_only-2.6-suse.patch
-export-2.6-suse.patch
-lookup_bdev_init_intent.patch
-remove-suid-2.6-suse.patch
-export-show_task-2.6-vanilla.patch
-sd_iostats-2.6-rhel4.patch
-jbd-2.6.10-jcberr.patch
-hostfs_readdir_large.patch
-ext3-patch-fuzz-fixup-fc3.patch
-uml-exprt-clearuser.patch
-fsprivate-2.6.patch
-linux-2.6.9-ext3-sub-second-timestamp.patch 
-bitops_ext2_find_next_le_bit-2.6.patch 
diff --git a/lustre/kernel_patches/series/2.6-fc5.series b/lustre/kernel_patches/series/2.6-fc5.series
deleted file mode 100644
index 8dd8c569eb429e118f0accabe78e7ea9e8464cff..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-fc5.series
+++ /dev/null
@@ -1,18 +0,0 @@
-lustre_version.patch
-vfs_intent-2.6-fc5.patch 
-vfs_nointent-2.6-fc5.patch 
-vfs_races-2.6.12.patch
-jbd-2.6.10-jcberr.patch
-nfs-cifs-intent-2.6-fc5.patch 
-iopen-misc-2.6.12.patch
-export-truncate-2.6-suse.patch 
-export_symbols-2.6.12.patch 
-dev_read_only-2.6-fc5.patch 
-export-2.6-fc5.patch 
-lookup_bdev_init_intent.patch
-8kstack-2.6.12.patch
-remove-suid-2.6-suse.patch
-export-show_task-2.6-fc5.patch 
-sd_iostats-2.6-rhel4.patch 
-export_symbol_numa-2.6-fc5.patch 
-vfs_intent-2.6-fc5-fix.patch
diff --git a/lustre/kernel_patches/series/2.6-rhel4.series b/lustre/kernel_patches/series/2.6-rhel4.series
deleted file mode 100644
index 8cdcacb5fb24aa8d62fdfd2d9ce8793f519c8575..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-rhel4.series
+++ /dev/null
@@ -1,41 +0,0 @@
-lustre_version.patch
-vfs_intent-2.6-rhel4.patch
-vfs_races-2.6-rhel4.patch
-iopen-misc-2.6-suse.patch 
-export_symbols-2.6-rhel4.patch 
-dev_read_only-2.6-suse.patch 
-export-log-2.6-rhel4.patch
-lookup_bdev_init_intent.patch
-remove-suid-2.6-suse.patch
-export-show_task-2.6-vanilla.patch
-sd_iostats-2.6-rhel4.patch 
-blkdev_tunables-2.6-suse.patch
-fsprivate-2.6.patch
-export_symbol_numa.patch 
-qsnet-rhel4-2.6.patch
-linux-2.6-binutils-2.16.patch
-vm-tunables-rhel4.patch 
-tcp-rto_proc-2.6.9.patch
-rollback-raid5ch-to-55.patch
-raid5-stats.patch
-raid5-configurable-cachesize.patch
-raid5-large-io.patch
-raid5-stripe-by-stripe-handling.patch
-raid5-merge-ios.patch
-raid5-serialize-ovelapping-reqs.patch
-raid5-zerocopy.patch
-raid6-stats.patch
-raid6-configurable-cachesize.patch
-raid6-large-io.patch
-raid6-stripe-by-stripe-handling.patch
-raid6-merge-ios.patch
-raid6-serialize-ovelapping-reqs.patch
-raid6-zerocopy.patch
-jbd-stats-2.6.9.patch 
-bitops_ext2_find_next_le_bit-2.6.patch 
-quota-deadlock-on-pagelock-core.patch
-quota-umount-race-fix.patch
-quota-deadlock-on-pagelock-ext3.patch
-vfs-keep-inode-hashed-for-clear-inode.patch
-modpost_external_module_updates_rhel4.patch
-mpt-fusion-downgrade-to-3_02_73-rhel4.patch
diff --git a/lustre/kernel_patches/series/2.6-rhel5.series b/lustre/kernel_patches/series/2.6-rhel5.series
deleted file mode 100644
index 1f2cb664daaf5952226938993d3db1f30fa58baa..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-rhel5.series
+++ /dev/null
@@ -1,19 +0,0 @@
-lustre_version.patch
-vfs_races-2.6-rhel5.patch
-i_filter_data.patch
-jbd-jcberr-2.6.18-vanilla.patch
-export_symbols-2.6.18-vanilla.patch
-dev_read_only-2.6.18-vanilla.patch
-export-2.6.18-vanilla.patch
-8kstack-2.6.12.patch
-export-show_task-2.6.18-vanilla.patch
-sd_iostats-2.6-rhel5.patch
-export_symbol_numa-2.6-fc5.patch
-jbd-stats-2.6-rhel5.patch
-raid5-stats-rhel5.patch
-raid5-configurable-cachesize-rhel5.patch
-raid5-large-io-rhel5.patch
-raid5-stripe-by-stripe-handling-rhel5.patch
-raid5-merge-ios-rhel5.patch
-raid5-zerocopy-rhel5.patch
-md-rebuild-policy.patch
diff --git a/lustre/kernel_patches/series/2.6-sles10.series b/lustre/kernel_patches/series/2.6-sles10.series
deleted file mode 100644
index 8a3494302ede07921351ca170e49ab3a3fc6cc2b..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-sles10.series
+++ /dev/null
@@ -1,14 +0,0 @@
-lustre_version.patch
-jbd-2.6.10-jcberr.patch
-iopen-misc-2.6.12.patch
-export_symbols-2.6.12.patch 
-dev_read_only-2.6-fc5.patch 
-export-2.6-fc5.patch 
-export-show_task-2.6-fc5.patch 
-sd_iostats-2.6-rhel5.patch 
-export_symbol_numa-2.6-fc5.patch 
-blkdev_tunables-2.6-sles10.patch
-jbd-stats-2.6-sles10.patch
-i_filter_data.patch
-quota-fix-oops-in-invalidate_dquots.patch
-fmode-exec-2.6-sles10.patch
diff --git a/lustre/kernel_patches/series/2.6-suse-newer.series b/lustre/kernel_patches/series/2.6-suse-newer.series
deleted file mode 100644
index 1f092e8e9b9dbabf2dcf2044c2ad9414f87d0833..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-suse-newer.series
+++ /dev/null
@@ -1,17 +0,0 @@
-lustre-version-revert_suse.patch
-lustre_version.patch
-dev_read_only-2.6-lnxi.patch
-sd_iostats-2.6-rhel4.patch 
-blkdev_tunables-2.6-suse.patch
-uml-exprt-clearuser.patch
-qsnet-suse-2.6.patch 
-fsprivate-2.6.patch
-dcache-qstr-api-fix-2.6-suse.patch 
-iallocsem_consistency.patch
-jbd-stats-2.6.5.patch 
-bitops_ext2_find_next_le_bit-2.6.patch
-2.6.5-quotafix.patch
-vfs_intent-reduce-stack-usage-2.6-suse-newer.patch
-atomic_add_return-sles9.patch
-modpost_external_module_updates_sles9.patch
-netpoll_xmit_lock-2.6-suse.patch
diff --git a/lustre/kernel_patches/series/2.6-suse.series b/lustre/kernel_patches/series/2.6-suse.series
deleted file mode 100644
index 8bc1f6e89abe9377d77631f2d3d0a4e662e7f1af..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6-suse.series
+++ /dev/null
@@ -1,14 +0,0 @@
-lustre_version.patch
-vfs_intent-2.6-suse.patch
-vfs_nointent-2.6-suse.patch
-vfs_races-2.6-suse.patch
-nfs-cifs-intent-2.6-suse.patch
-iopen-misc-2.6-suse.patch
-export-truncate-2.6-suse.patch
-export_symbols-2.6-suse.patch
-dev_read_only-2.6-suse.patch
-export-2.6-suse.patch
-header-guards-2.6-suse.patch
-md_path_lookup-2.6-suse.patch
-ext3-super-ntohl.patch
-export-show_task-2.6-vanilla.patch
diff --git a/lustre/kernel_patches/series/2.6.18-vanilla.series b/lustre/kernel_patches/series/2.6.18-vanilla.series
deleted file mode 100644
index 7dc4f8e9f9e79bc3cc0b9f7e0cc06e4669941233..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6.18-vanilla.series
+++ /dev/null
@@ -1,16 +0,0 @@
-lustre_version.patch
-vfs_races-2.6.18-vanilla.patch
-i_filter_data.patch
-jbd-jcberr-2.6.18-vanilla.patch
-iopen-misc-2.6.18-vanilla.patch
-export-truncate-2.6.18-vanilla.patch 
-export_symbols-2.6.18-vanilla.patch 
-dev_read_only-2.6.18-vanilla.patch 
-export-2.6.18-vanilla.patch 
-8kstack-2.6.12.patch
-export-show_task-2.6.18-vanilla.patch 
-sd_iostats-2.6-rhel5.patch 
-export_symbol_numa-2.6.18.patch 
-jbd-16tb-overflow-fixes.patch
-jbd-check-for-unmapped-buffer.patch
-jbd-stats-2.6-rhel5.patch
diff --git a/lustre/kernel_patches/series/2.6.22-vanilla.series b/lustre/kernel_patches/series/2.6.22-vanilla.series
deleted file mode 100644
index e259c63084997f9c7e122bcfa2a966c8f594385c..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/series/2.6.22-vanilla.series
+++ /dev/null
@@ -1,12 +0,0 @@
-lustre_version.patch
-vfs_races-2.6.22-vanilla.patch 
-i_filter_data.patch
-jbd-jcberr-2.6.18-vanilla.patch
-iopen-misc-2.6.22-vanilla.patch 
-export-truncate-2.6.18-vanilla.patch 
-export_symbols-2.6.22-vanilla.patch 
-dev_read_only-2.6.22-vanilla.patch 
-export-2.6.18-vanilla.patch 
-8kstack-2.6.12.patch
-export-show_task-2.6.18-vanilla.patch 
-sd_iostats-2.6.22-vanilla.patch 
diff --git a/lustre/kernel_patches/targets/.cvsignore b/lustre/kernel_patches/targets/.cvsignore
deleted file mode 100644
index ba141e8c6a499f1f8b2a7c6038a2a3a50a76b698..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-*.target
diff --git a/lustre/kernel_patches/targets/2.6-fc5.target.in b/lustre/kernel_patches/targets/2.6-fc5.target.in
deleted file mode 100644
index fe27302105b8c104c7580d2d5047ec87581b0e89..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-fc5.target.in
+++ /dev/null
@@ -1,18 +0,0 @@
-lnxmaj="2.6.15"
-lnxrel="fc5"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
-SERIES=2.6-fc5.series
-VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
-RHBUILD=1
-LINUX26=1
-LUSTRE_VERSION=@VERSION@
-
-BASE_ARCHS="i686"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686"
-UP_ARCHS=""
-
diff --git a/lustre/kernel_patches/targets/2.6-patchless.target.in b/lustre/kernel_patches/targets/2.6-patchless.target.in
deleted file mode 100644
index ed2a1202b06a29a6f875f7f2bce2912a8fe481d4..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-patchless.target.in
+++ /dev/null
@@ -1,25 +0,0 @@
-lnxmaj="2.6.16"
-lnxrel="22"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
-SERIES=
-VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}
-RHBUILD=1
-LINUX26=1
-LUSTRE_VERSION=@VERSION@
-
-BASE_ARCHS="i686 x86_64 ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686 x86_64 ia64"
-UP_ARCHS=""
-
-# Modules in this kernel do not build with gcc 4 or gcc 2.96
-for cc in gcc33 gcc32 ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/2.6-rhel4.target.in b/lustre/kernel_patches/targets/2.6-rhel4.target.in
deleted file mode 100644
index 390f959abb15d1ffd65842c18f5e478877f3301f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-rhel4.target.in
+++ /dev/null
@@ -1,25 +0,0 @@
-lnxmaj="2.6.9"
-lnxrel="67.0.7.EL"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
-SERIES=2.6-rhel4.series
-VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
-RHBUILD=1
-LINUX26=1
-LUSTRE_VERSION=@VERSION@
-
-BASE_ARCHS="i686 x86_64 ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686 x86_64 ia64"
-UP_ARCHS=""
-
-# Modules in this kernel do not build with gcc 4 or gcc 2.96
-for cc in gcc33 gcc32 ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/2.6-rhel5.target.in b/lustre/kernel_patches/targets/2.6-rhel5.target.in
deleted file mode 100644
index 6c39710a624bd2dfa702adc23c66812f9e8a53a8..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-rhel5.target.in
+++ /dev/null
@@ -1,24 +0,0 @@
-lnxmaj="2.6.18"
-lnxrel="53.1.14.el5"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
-SERIES=2.6-rhel5.series
-VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
-RHBUILD=1
-LINUX26=1
-LUSTRE_VERSION=@VERSION@
-
-BASE_ARCHS="i686 x86_64 ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686 x86_64 ia64"
-UP_ARCHS=""
-
-for cc in gcc ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/2.6-sles10.target.in b/lustre/kernel_patches/targets/2.6-sles10.target.in
deleted file mode 100644
index 35ddd8529b9fe867986a1a27bbb8547778c9f441..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-sles10.target.in
+++ /dev/null
@@ -1,37 +0,0 @@
-lnxmaj="2.6.16"
-lnxrel="54-0.2.5"
-
-# this is the delimeter that goes between $lnxmaj and $lnxrel
-# defaults to "-"
-EXTRA_VERSION_DELIMITER="."
-
-# this is the delimeter that goes before the "smp" at the end of the version
-# defaults to empty
-TARGET_DELIMITER="-"
-
-KERNEL=linux-$lnxmaj.$lnxrel.tar.bz2
-SERIES=2.6-sles10.series
-VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.@VERSION@"
-LUSTRE_VERSION=@VERSION@
-RHBUILD=0
-LINUX26=1
-# No /boot/Kerntypes* in SLES10
-SUSEBUILD=0
-
-BASE_ARCHS="i686 ppc x86_64 ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="x86_64 ia64"
-BIGSMP_ARCHS="i686"
-PSERIES64_ARCHS="ppc"
-UP_ARCHS=""
-SRC_ARCHS=""
-
-for cc in gcc ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/2.6-suse.target.in b/lustre/kernel_patches/targets/2.6-suse.target.in
deleted file mode 100644
index 872367957f41ca3eb3896f044ca33aab6e8e7a6f..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-suse.target.in
+++ /dev/null
@@ -1,29 +0,0 @@
-lnxmaj="2.6.5"
-lnxrel="7.311"
-
-KERNEL=linux-$lnxmaj-$lnxrel.tar.bz2
-# they include our patches
-SERIES=2.6-suse-newer.series
-VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.@VERSION@"
-LUSTRE_VERSION=@VERSION@
-RHBUILD=0
-LINUX26=1
-SUSEBUILD=1
-
-BASE_ARCHS="i686 ppc x86_64 ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="x86_64 ia64"
-BIGSMP_ARCHS="i686"
-PSERIES64_ARCHS="ppc"
-UP_ARCHS=""
-SRC_ARCHS=""
-
-for cc in gcc33 ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/2.6-vanilla.target.in b/lustre/kernel_patches/targets/2.6-vanilla.target.in
deleted file mode 100644
index dd7a0c2fc94717729253be29f2b8364c07b54867..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/2.6-vanilla.target.in
+++ /dev/null
@@ -1,29 +0,0 @@
-lnxmaj="2.6.18"
-lnxrel="8"
-
-KERNEL=linux-$lnxmaj.$lnxrel.tar.bz2
-SERIES=2.6.18-vanilla.series
-VERSION=$lnxmaj
-EXTRA_VERSION="${lnxrel}_lustre.@VERSION@"
-LUSTRE_VERSION=@VERSION@
-RHBUILD=0
-LINUX26=1
-# No /boot/Kerntypes* in SLES10
-SUSEBUILD=0
-
-
-BASE_ARCHS="i686 x86_64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686 x86_64"
-BIGSMP_ARCHS=""
-UP_ARCHS=""
-SRC_ARCHS=""
-
-for cc in gcc ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/hp_pnnl-2.4.target.in b/lustre/kernel_patches/targets/hp_pnnl-2.4.target.in
deleted file mode 100644
index 28c1be3a0924a9a45df9407a1e4ab392d5f7ac12..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/hp_pnnl-2.4.target.in
+++ /dev/null
@@ -1,17 +0,0 @@
-lnxmaj=2.4.20
-lnxrel=hp_pnnl
-
-KERNEL=linux-$lnxmaj-$lnxrel.tar.gz
-SERIES=hp-pnnl-2.4.20
-VERSION=$lnxmaj
-EXTRA_VERSION=$lnxrel_lustre.@VERSION@
-LUSTRE_VERSION=@VERSION@
-RHBUILD=0
-
-BASE_ARCHS="ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="ia64"
-UP_ARCHS=""
-SRC_ARCHS="ia64"
diff --git a/lustre/kernel_patches/targets/rh-2.4.target.in b/lustre/kernel_patches/targets/rh-2.4.target.in
deleted file mode 100644
index d27ed40111206b544f56099e75302ba74dfd4a1a..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/rh-2.4.target.in
+++ /dev/null
@@ -1,24 +0,0 @@
-lnxmaj="2.4.20"
-lnxrel="31.9"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.gz
-SERIES=rh-2.4.20
-VERSION=$lnxmaj
-EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
-LUSTRE_VERSION=@VERSION@
-RHBUILD=1
-
-BASE_ARCHS="i686"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686"
-UP_ARCHS=""
-
-# the modules in this kernel do not build with gcc 3
-for cc in i386-redhat-linux-gcc-2.96 gcc296 gcc ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/rhel-2.4.target.in b/lustre/kernel_patches/targets/rhel-2.4.target.in
deleted file mode 100644
index cea2b02d4fe6d0f044866812d27cde4bc194d702..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/rhel-2.4.target.in
+++ /dev/null
@@ -1,24 +0,0 @@
-lnxmaj="2.4.21"
-lnxrel="47.0.1.EL"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
-SERIES=rhel-2.4.21
-VERSION=${lnxmaj}
-LUSTRE_VERSION=@VERSION@
-EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
-RHBUILD=1
-
-BASE_ARCHS="i686 x86_64 ia64"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686 x86_64 ia64"
-UP_ARCHS=""
-
-# the modules in this kernel do not build with gcc 4, 3.4, or 2.96
-for cc in gcc32 gcc33 ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/sles-2.4.target.in b/lustre/kernel_patches/targets/sles-2.4.target.in
deleted file mode 100644
index badeaebbbfdc91ebe6a7d1dc674b71273662fa83..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/sles-2.4.target.in
+++ /dev/null
@@ -1,26 +0,0 @@
-lnxmaj="2.4.21"
-lnxrel="273"
-
-KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2
-SERIES=suse-2.4.21-jvn
-VERSION=${lnxmaj}
-EXTRA_VERSION=${lnxrel}_lustre.@VERSION@
-LUSTRE_VERSION=@VERSION@
-RHBUILD=0
-LINUX26=0
-SUSEBUILD=1
-
-BASE_ARCHS="i686"
-BIGMEM_ARCHS=""
-BOOT_ARCHS=""
-JENSEN_ARCHS=""
-SMP_ARCHS="i686"
-UP_ARCHS=""
-
-# the modules in this kernel do not build with gcc 4 or 2.96
-for cc in gcc32 gcc33 ; do
-    if which $cc >/dev/null 2>/dev/null ; then
-        export CC=$cc
-        break
-    fi
-done
diff --git a/lustre/kernel_patches/targets/suse-2.4.21-2.target.in b/lustre/kernel_patches/targets/suse-2.4.21-2.target.in
deleted file mode 100644
index d00ca78dfe085a024ab271363d0d2b71c81926c7..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/targets/suse-2.4.21-2.target.in
+++ /dev/null
@@ -1,15 +0,0 @@
-KERNEL=linux-2.4.21-x86_64.tar.gz
-SERIES=suse-2.4.21-2
-VERSION=2.4.21
-EXTRA_VERSION=lustre.@VERSION@
-LUSTRE_VERSION=@VERSION@
-RHBUILD=0
-
-BASE_ARCHS="x86_64"
-BIGMEM_ARCHS=""
-BOOT_ARCH=""
-JENSEN_ARCHS=""
-SMP_ARCHS=""
-UP_ARCHS="x86_64"
-
-ARCH="x86_64"
diff --git a/lustre/kernel_patches/which_patch b/lustre/kernel_patches/which_patch
deleted file mode 100644
index 937ae2b472f86f6c813a1c84a17e3605a28f1f53..0000000000000000000000000000000000000000
--- a/lustre/kernel_patches/which_patch
+++ /dev/null
@@ -1,19 +0,0 @@
-SERIES                VERSION                  COMMENT
-
-SUPPORTED KERNELS:
-2.6-suse              SLES9 before SP1         already in SLES9 SP1 kernel
-2.6-suse-newer        SLES9: 2.6.5-7.311       extra patches for SLES9 after SP1
-2.6-rhel4             RHEL4: 2.6.9-67.0.7.EL
-2.6-sles10            SLES10: 2.6.16.54-0.2.5
-2.6-rhel5             RHEL5: 2.6.18-53.1.14.el5
-2.6.18-vanilla        kernel.org: 2.6.18.8
-2.6.22-vanilla        kernel.org: 2.6.22.14
-
-CLIENT SUPPORT FOR UNPATCHED KERNELS:
-                   kernel.org 2.6.16-2.6.19
-                   RHEL4: 2.6.9-42.0.8EL
-
-NB - The patches in the 2.6-suse series should already be in the SLES9 SP1
-     kernel.  The patches in the 2.6-suse-newer series are patches that
-     have been created since the SP1 kernel was released and should be
-     applied to the already-patched SP1 kernel.
diff --git a/lustre/ldlm/.cvsignore b/lustre/ldlm/.cvsignore
deleted file mode 100644
index bde2a9fdf5260890a1d38fec8a0adbc981377369..0000000000000000000000000000000000000000
--- a/lustre/ldlm/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.deps
-Makefile
-Makefile.in
-.*.cmd
-.*.flags
-.tmp_versions
diff --git a/lustre/ldlm/Makefile.am b/lustre/ldlm/Makefile.am
deleted file mode 100644
index b5993fc928d94b7f21205395a20f2339955b151a..0000000000000000000000000000000000000000
--- a/lustre/ldlm/Makefile.am
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-#
-# ldlm is built into ptlrpc
-#
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES = ldlm_extent.c ldlm_flock.c ldlm_internal.h ldlm_lib.c \
-	ldlm_lock.c ldlm_lockd.c ldlm_plain.c ldlm_request.c	     \
-	ldlm_resource.c l_lock.c ldlm_inodebits.c ldlm_pool.c 	     \
-	interval_tree.c
diff --git a/lustre/ldlm/interval_tree.c b/lustre/ldlm/interval_tree.c
deleted file mode 100644
index bedf5b3a45ab520270a984ecb2e7216827149b1a..0000000000000000000000000000000000000000
--- a/lustre/ldlm/interval_tree.c
+++ /dev/null
@@ -1,752 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Interval tree library used by ldlm extent lock code
- *
- *  Copyright (c) 2007 Cluster File Systems, Inc.
- *   Author: Huang Wei <huangwei@clusterfs.com>
- *   Author: Jay Xiong <jinshan.xiong@sun.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-#ifdef __KERNEL__
-# include <lustre_dlm.h>
-#else
-# include <liblustre.h>
-# include <libcfs/kp30.h>
-#endif
-#include <obd_support.h>
-#include <interval_tree.h>
-
-enum {
-        INTERVAL_RED = 0,
-        INTERVAL_BLACK = 1
-};
-
-static inline int node_is_left_child(struct interval_node *node)
-{
-        LASSERT(node->in_parent != NULL);
-        return node == node->in_parent->in_left;
-}
-
-static inline int node_is_right_child(struct interval_node *node)
-{
-        LASSERT(node->in_parent != NULL);
-        return node == node->in_parent->in_right;
-}
-
-static inline int node_is_red(struct interval_node *node)
-{
-        return node->in_color == INTERVAL_RED;
-}
-
-static inline int node_is_black(struct interval_node *node)
-{
-        return node->in_color == INTERVAL_BLACK;
-}
-
-static inline int extent_compare(struct interval_node_extent *e1,
-                                 struct interval_node_extent *e2)
-{
-        int rc;
-        if (e1->start == e2->start) {
-                if (e1->end < e2->end)
-                        rc = -1;
-                else if (e1->end > e2->end)
-                        rc = 1;
-                else
-                        rc = 0;
-        } else {
-                if (e1->start < e2->start)
-                        rc = -1;
-                else
-                        rc = 1;
-        }
-        return rc;
-}
-
-static inline int extent_equal(struct interval_node_extent *e1,
-                               struct interval_node_extent *e2)
-{
-        return (e1->start == e2->start) && (e1->end == e2->end);
-}
-
-static inline int extent_overlapped(struct interval_node_extent *e1, 
-                                    struct interval_node_extent *e2)
-{
-        return (e1->start <= e2->end) && (e2->start <= e1->end);
-}
-
-static inline int node_compare(struct interval_node *n1,
-                               struct interval_node *n2)
-{
-        return extent_compare(&n1->in_extent, &n2->in_extent);
-}
-
-static inline int node_equal(struct interval_node *n1,
-                             struct interval_node *n2)
-{
-        return extent_equal(&n1->in_extent, &n2->in_extent);
-}
-
-static inline __u64 max_u64(__u64 x, __u64 y)
-{
-        return x > y ? x : y;
-}
-
-static inline __u64 min_u64(__u64 x, __u64 y)
-{
-        return x < y ? x : y;
-}
-
-#define interval_for_each(node, root)                   \
-for (node = interval_first(root); node != NULL;         \
-     node = interval_next(node))
-
-#define interval_for_each_reverse(node, root)           \
-for (node = interval_last(root); node != NULL;          \
-     node = interval_prev(node))
-
-static struct interval_node *interval_first(struct interval_node *node)
-{
-        ENTRY;
-
-        if (!node)
-                RETURN(NULL);
-        while (node->in_left)
-                node = node->in_left;
-        RETURN(node);
-}
-
-static struct interval_node *interval_last(struct interval_node *node)
-{
-        ENTRY;
-
-        if (!node)
-                RETURN(NULL);
-        while (node->in_right)
-                node = node->in_right;
-        RETURN(node);
-}
-
-static struct interval_node *interval_next(struct interval_node *node)
-{
-        ENTRY;
-
-        if (!node)
-                RETURN(NULL);
-        if (node->in_right)
-                RETURN(interval_first(node->in_right));
-        while (node->in_parent && node_is_right_child(node))
-                node = node->in_parent;
-        RETURN(node->in_parent);
-}
-
-static struct interval_node *interval_prev(struct interval_node *node)
-{
-        ENTRY;
-
-        if (!node)
-                RETURN(NULL);
-
-        if (node->in_left)
-                RETURN(interval_last(node->in_left));
-
-        while (node->in_parent && node_is_left_child(node))
-                node = node->in_parent;
-
-        RETURN(node->in_parent);
-}
-
-enum interval_iter interval_iterate(struct interval_node *root,
-                                    interval_callback_t func,
-                                    void *data)
-{
-        struct interval_node *node;
-        enum interval_iter rc = INTERVAL_ITER_CONT;
-        ENTRY;
-        
-        interval_for_each(node, root) {
-                rc = func(node, data);
-                if (rc == INTERVAL_ITER_STOP)
-                        break;
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(interval_iterate);
-
-enum interval_iter interval_iterate_reverse(struct interval_node *root,
-                                            interval_callback_t func,
-                                            void *data)
-{
-        struct interval_node *node;
-        enum interval_iter rc = INTERVAL_ITER_CONT;
-        ENTRY;
-        
-        interval_for_each_reverse(node, root) {
-                rc = func(node, data);
-                if (rc == INTERVAL_ITER_STOP)
-                        break;
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(interval_iterate_reverse);
-
-/* try to find a node with same interval in the tree,
- * if found, return the pointer to the node, otherwise return NULL*/
-struct interval_node *interval_find(struct interval_node *root,
-                                    struct interval_node_extent *ex)
-{
-        struct interval_node *walk = root;
-        int rc;
-        ENTRY;
-
-        while (walk) {
-                rc = extent_compare(ex, &walk->in_extent);
-                if (rc == 0)
-                        break;
-                else if (rc < 0)
-                        walk = walk->in_left;
-                else
-                        walk = walk->in_right;
-        }
-
-        RETURN(walk);
-}
-EXPORT_SYMBOL(interval_find);
-
-static void __rotate_change_maxhigh(struct interval_node *node,
-                                    struct interval_node *rotate)
-{
-        __u64 left_max, right_max;
-
-        rotate->in_max_high = node->in_max_high;
-        left_max = node->in_left ? node->in_left->in_max_high : 0;
-        right_max = node->in_right ? node->in_right->in_max_high : 0;
-        node->in_max_high  = max_u64(interval_high(node),
-                                     max_u64(left_max,right_max));
-}
-
-/* The left rotation "pivots" around the link from node to node->right, and
- * - node will be linked to node->right's left child, and
- * - node->right's left child will be linked to node's right child.  */
-static void __rotate_left(struct interval_node *node,
-                          struct interval_node **root)
-{
-        struct interval_node *right = node->in_right;
-        struct interval_node *parent = node->in_parent;
-
-        node->in_right = right->in_left;
-        if (node->in_right)
-                right->in_left->in_parent = node;
-
-        right->in_left = node;
-        right->in_parent = parent;
-        if (parent) {
-                if (node_is_left_child(node))
-                        parent->in_left = right;
-                else
-                        parent->in_right = right;
-        } else {
-                *root = right;
-        }
-        node->in_parent = right;
-
-        /* update max_high for node and right */
-        __rotate_change_maxhigh(node, right);
-}
-
-/* The right rotation "pivots" around the link from node to node->left, and
- * - node will be linked to node->left's right child, and
- * - node->left's right child will be linked to node's left child.  */
-static void __rotate_right(struct interval_node *node,
-                           struct interval_node **root)
-{
-        struct interval_node *left = node->in_left;
-        struct interval_node *parent = node->in_parent;
-
-        node->in_left = left->in_right;
-        if (node->in_left)
-                left->in_right->in_parent = node;
-        left->in_right = node;
-
-        left->in_parent = parent;
-        if (parent) {
-                if (node_is_right_child(node))
-                        parent->in_right = left;
-                else
-                        parent->in_left = left;
-        } else {
-                *root = left;
-        }
-        node->in_parent = left;
-
-        /* update max_high for node and left */
-        __rotate_change_maxhigh(node, left);
-}
-
-#define interval_swap(a, b) do {                        \
-        struct interval_node *c = a; a = b; b = c;      \
-} while (0)
-
-/*
- * Operations INSERT and DELETE, when run on a tree with n keys, 
- * take O(logN) time.Because they modify the tree, the result 
- * may violate the red-black properties.To restore these properties, 
- * we must change the colors of some of the nodes in the tree 
- * and also change the pointer structure.
- */
-static void interval_insert_color(struct interval_node *node,
-                                  struct interval_node **root)
-{
-        struct interval_node *parent, *gparent;
-        ENTRY;
-
-        while ((parent = node->in_parent) && node_is_red(parent)) {
-                gparent = parent->in_parent;
-                /* Parent is RED, so gparent must not be NULL */
-                if (node_is_left_child(parent)) {
-                        struct interval_node *uncle;
-                        uncle = gparent->in_right;
-                        if (uncle && node_is_red(uncle)) {
-                                uncle->in_color = INTERVAL_BLACK;
-                                parent->in_color = INTERVAL_BLACK;
-                                gparent->in_color = INTERVAL_RED;
-                                node = gparent;
-                                continue;
-                        }
-
-                        if (parent->in_right == node) {
-                                __rotate_left(parent, root);
-                                interval_swap(node, parent);
-                        }
-
-                        parent->in_color = INTERVAL_BLACK;
-                        gparent->in_color = INTERVAL_RED;
-                        __rotate_right(gparent, root);
-                } else {
-                        struct interval_node *uncle;
-                        uncle = gparent->in_left;
-                        if (uncle && node_is_red(uncle)) {
-                                uncle->in_color = INTERVAL_BLACK;
-                                parent->in_color = INTERVAL_BLACK;
-                                gparent->in_color = INTERVAL_RED;
-                                node = gparent;
-                                continue;
-                        }
-
-                        if (node_is_left_child(node)) {
-                                __rotate_right(parent, root);
-                                interval_swap(node, parent);
-                        }
-
-                        parent->in_color = INTERVAL_BLACK;
-                        gparent->in_color = INTERVAL_RED;
-                        __rotate_left(gparent, root);
-                }
-        }
-
-        (*root)->in_color = INTERVAL_BLACK;
-        EXIT;
-}
-
-struct interval_node *interval_insert(struct interval_node *node,
-                                      struct interval_node **root)
-                     
-{
-        struct interval_node **p, *parent = NULL;
-        ENTRY;
-
-        p = root;
-        while (*p) {
-                parent = *p;
-                if (node_equal(parent, node))
-                        RETURN(parent);
-
-                /* max_high field must be updated after each iteration */
-                if (parent->in_max_high < interval_high(node))
-                        parent->in_max_high = interval_high(node);
-
-                if (node_compare(node, parent) < 0)
-                        p = &parent->in_left;
-                else 
-                        p = &parent->in_right;
-        }
-
-        /* link node into the tree */
-        node->in_parent = parent;
-        node->in_color = INTERVAL_RED;
-        node->in_left = node->in_right = NULL;
-        *p = node;
-
-        interval_insert_color(node, root);
-
-        RETURN(NULL);
-}
-EXPORT_SYMBOL(interval_insert);
-
-static inline int node_is_black_or_0(struct interval_node *node)
-{
-        return !node || node_is_black(node);
-}
-
-static void interval_erase_color(struct interval_node *node,
-                                 struct interval_node *parent,
-                                 struct interval_node **root)
-{
-        struct interval_node *tmp;
-        ENTRY;
-
-        while (node_is_black_or_0(node) && node != *root) {
-                if (parent->in_left == node) {
-                        tmp = parent->in_right;
-                        if (node_is_red(tmp)) {
-                                tmp->in_color = INTERVAL_BLACK;
-                                parent->in_color = INTERVAL_RED;
-                                __rotate_left(parent, root);
-                                tmp = parent->in_right;
-                        }
-                        if (node_is_black_or_0(tmp->in_left) &&
-                            node_is_black_or_0(tmp->in_right)) {
-                                tmp->in_color = INTERVAL_RED;
-                                node = parent;
-                                parent = node->in_parent;
-                        } else {
-                                if (node_is_black_or_0(tmp->in_right)) {
-                                        struct interval_node *o_left;
-                                        if ((o_left = tmp->in_left))
-                                             o_left->in_color = INTERVAL_BLACK;
-                                        tmp->in_color = INTERVAL_RED;
-                                        __rotate_right(tmp, root);
-                                        tmp = parent->in_right;
-                                }
-                                tmp->in_color = parent->in_color;
-                                parent->in_color = INTERVAL_BLACK;
-                                if (tmp->in_right)
-                                    tmp->in_right->in_color = INTERVAL_BLACK;
-                                __rotate_left(parent, root);
-                                node = *root;
-                                break;
-                        }
-                } else {
-                        tmp = parent->in_left;
-                        if (node_is_red(tmp)) {
-                                tmp->in_color = INTERVAL_BLACK;
-                                parent->in_color = INTERVAL_RED;
-                                __rotate_right(parent, root);
-                                tmp = parent->in_left;
-                        }
-                        if (node_is_black_or_0(tmp->in_left) &&
-                            node_is_black_or_0(tmp->in_right)) {
-                                tmp->in_color = INTERVAL_RED;
-                                node = parent;
-                                parent = node->in_parent;
-                        } else {
-                                if (node_is_black_or_0(tmp->in_left)) {
-                                        struct interval_node *o_right;
-                                        if ((o_right = tmp->in_right))
-                                            o_right->in_color = INTERVAL_BLACK;
-                                        tmp->in_color = INTERVAL_RED;
-                                        __rotate_left(tmp, root);
-                                        tmp = parent->in_left;
-                                }
-                                tmp->in_color = parent->in_color;
-                                parent->in_color = INTERVAL_BLACK;
-                                if (tmp->in_left)
-                                        tmp->in_left->in_color = INTERVAL_BLACK;
-                                __rotate_right(parent, root);
-                                node = *root;
-                                break;
-                        }
-                }
-        }
-        if (node)
-                node->in_color = INTERVAL_BLACK;
-        EXIT;
-}
-
-/* 
- * if the @max_high value of @node is changed, this function traverse  a path 
- * from node  up to the root to update max_high for the whole tree.
- */
-static void update_maxhigh(struct interval_node *node,
-                           __u64  old_maxhigh)
-{
-        __u64 left_max, right_max;
-        ENTRY;
-
-        while (node) {
-                left_max = node->in_left ? node->in_left->in_max_high : 0;
-                right_max = node->in_right ? node->in_right->in_max_high : 0;
-                node->in_max_high = max_u64(interval_high(node),
-                                            max_u64(left_max, right_max));
-
-                if (node->in_max_high >= old_maxhigh)
-                        break;
-                node = node->in_parent;
-        }
-        EXIT;
-}
-
-void interval_erase(struct interval_node *node,
-                    struct interval_node **root)
-{
-        struct interval_node *child, *parent;
-        int color;
-        ENTRY;
-
-        if (!node->in_left) {
-                child = node->in_right;
-        } else if (!node->in_right) {
-                child = node->in_left;
-        } else { /* Both left and right child are not NULL */
-                struct interval_node *old = node;
-
-                node = interval_next(node);
-                child = node->in_right;
-                parent = node->in_parent;
-                color = node->in_color;
-
-                if (child)
-                        child->in_parent = parent;
-                if (parent == old) {
-                        parent->in_right = child;
-                        parent = node;
-                } else {
-                        parent->in_left = child;
-                }
-
-                node->in_color = old->in_color;
-                node->in_right = old->in_right;
-                node->in_left = old->in_left;
-                node->in_parent = old->in_parent;
-
-                if (old->in_parent) {
-                        if (node_is_left_child(old))
-                                old->in_parent->in_left = node;
-                        else
-                                old->in_parent->in_right = node;
-                } else {
-                        *root = node;
-                }
-
-                old->in_left->in_parent = node;
-                if (old->in_right)
-                        old->in_right->in_parent = node;
-                update_maxhigh(child, node->in_max_high);
-                update_maxhigh(node, old->in_max_high);
-                goto color;
-        }
-        parent = node->in_parent;
-        color = node->in_color;
-
-        if (child)
-                child->in_parent = parent;
-        if (parent) {
-                if (node_is_left_child(node))
-                        parent->in_left = child;
-                else
-                        parent->in_right = child;
-        } else {
-                *root = child;
-        }
-
-        update_maxhigh(child, node->in_max_high);
-
-color:
-        if (color == INTERVAL_BLACK)
-                interval_erase_color(child, parent, root);
-        EXIT;
-}
-EXPORT_SYMBOL(interval_erase);
-
-static inline int interval_may_overlap(struct interval_node *node,
-                                          struct interval_node_extent *ext)
-{
-        return (ext->start <= node->in_max_high &&
-                ext->end >= interval_low(node));
-}
-
-/*
- * This function finds all intervals that overlap interval ext,
- * and calls func to handle resulted intervals one by one.
- * in lustre, this function will find all conflicting locks in
- * the granted queue and add these locks to the ast work list.
- *
- * {
- *       if (node == NULL)
- *               return 0;
- *       if (ext->end < interval_low(node)) {
- *               interval_search(node->in_left, ext, func, data);
- *       } else if (interval_may_overlap(node, ext)) {
- *               if (extent_overlapped(ext, &node->in_extent))
- *                       func(node, data);
- *               interval_search(node->in_left, ext, func, data);
- *               interval_search(node->in_right, ext, func, data);
- *       }
- *       return 0;
- * }
- *
- */
-enum interval_iter interval_search(struct interval_node *node,
-                                   struct interval_node_extent *ext,
-                                   interval_callback_t func,
-                                   void *data)
-{
-        struct interval_node *parent;
-        enum interval_iter rc = INTERVAL_ITER_CONT;
-
-        LASSERT(ext != NULL);
-        LASSERT(func != NULL);
-
-        while (node) {
-                if (ext->end < interval_low(node)) {
-                        if (node->in_left) {
-                                node = node->in_left;
-                                continue;
-                        }
-                } else if (interval_may_overlap(node, ext)) {
-                        if (extent_overlapped(ext, &node->in_extent)) {
-                                rc = func(node, data);
-                                if (rc == INTERVAL_ITER_STOP)
-                                        break;
-                        }
-
-                        if (node->in_left) {
-                                node = node->in_left;
-                                continue;
-                        }
-                        if (node->in_right) {
-                                node = node->in_right;
-                                continue;
-                        }
-                } 
-
-                parent = node->in_parent;
-                while (parent) {
-                        if (node_is_left_child(node) &&
-                            parent->in_right) {
-                                /* If we ever got the left, it means that the 
-                                 * parent met ext->end<interval_low(parent), or
-                                 * may_overlap(parent). If the former is true,
-                                 * we needn't go back. So stop early and check
-                                 * may_overlap(parent) after this loop.  */
-                                node = parent->in_right;
-                                break;
-                        }
-                        node = parent;
-                        parent = parent->in_parent;
-                }
-                if (parent == NULL || !interval_may_overlap(parent, ext))
-                        break;
-        }
-
-        return rc;
-}
-EXPORT_SYMBOL(interval_search);
-
-static enum interval_iter interval_overlap_cb(struct interval_node *n,
-                                              void *args)
-{
-        *(int *)args = 1;
-        return INTERVAL_ITER_STOP;
-}
-
-int interval_is_overlapped(struct interval_node *root,
-                           struct interval_node_extent *ext)
-{
-        int has = 0;
-        (void)interval_search(root, ext, interval_overlap_cb, &has);
-        return has;
-}
-EXPORT_SYMBOL(interval_is_overlapped);
-
-/* Don't expand to low. Expanding downwards is expensive, and meaningless to
- * some extents, because programs seldom do IO backward.
- *
- * The recursive algorithm of expanding low:
- * expand_low {
- *        struct interval_node *tmp;
- *        static __u64 res = 0;
- *
- *        if (root == NULL)
- *                return res;
- *        if (root->in_max_high < low) {
- *                res = max_u64(root->in_max_high + 1, res);
- *                return res;
- *        } else if (low < interval_low(root)) {
- *                interval_expand_low(root->in_left, low);
- *                return res;
- *        }
- *
- *        if (interval_high(root) < low)
- *                res = max_u64(interval_high(root) + 1, res);
- *        interval_expand_low(root->in_left, low);
- *        interval_expand_low(root->in_right, low);
- *
- *        return res;
- * }
- *
- * It's much easy to eliminate the recursion, see interval_search for 
- * an example. -jay
- */
-static inline __u64 interval_expand_low(struct interval_node *root, __u64 low)
-{
-        /* we only concern the empty tree right now. */
-        if (root == NULL)
-                return 0;
-        return low;
-}
-
-static inline __u64 interval_expand_high(struct interval_node *node, __u64 high)
-{
-        __u64 result = ~0;
-
-        while (node != NULL) {
-                if (node->in_max_high < high)
-                        break;
-                        
-                if (interval_low(node) > high) {
-                        result = interval_low(node) - 1;
-                        node = node->in_left;
-                } else {
-                        node = node->in_right;
-                }
-        }
-
-        return result;
-}
-
-/* expanding the extent based on @ext. */
-void interval_expand(struct interval_node *root,
-                     struct interval_node_extent *ext,
-                     struct interval_node_extent *limiter)
-{
-        /* The assertion of interval_is_overlapped is expensive because we may
-         * travel many nodes to find the overlapped node. */
-        LASSERT(interval_is_overlapped(root, ext) == 0);
-        if (!limiter || limiter->start < ext->start)
-                ext->start = interval_expand_low(root, ext->start);
-        if (!limiter || limiter->end > ext->end)
-                ext->end = interval_expand_high(root, ext->end);
-        LASSERT(interval_is_overlapped(root, ext) == 0);
-}
-EXPORT_SYMBOL(interval_expand);
diff --git a/lustre/ldlm/l_lock.c b/lustre/ldlm/l_lock.c
deleted file mode 100644
index e23a75530c5344ddd40fee3ff040a48efd79d067..0000000000000000000000000000000000000000
--- a/lustre/ldlm/l_lock.c
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else 
-#include <liblustre.h>
-#endif
-
-#include <lustre_dlm.h>
-#include <lustre_lib.h>
-
-/*
- * ldlm locking uses resource to serialize access to locks
- * but there is a case when we change resource of lock upon
- * enqueue reply. we rely on that lock->l_resource = new_res
- * is atomic
- */
-struct ldlm_resource * lock_res_and_lock(struct ldlm_lock *lock)
-{
-        struct ldlm_resource *res = lock->l_resource;
-
-        if (ns_is_server(res->lr_namespace)) {
-                /* on server-side resource of lock doesn't change */
-                lock_res(res);
-                return res;
-        } 
-
-        spin_lock(&lock->l_lock);
-        res = lock->l_resource;
-        lock_res(res);
-        return res;
-}
-
-void unlock_res_and_lock(struct ldlm_lock *lock)
-{
-        struct ldlm_resource *res = lock->l_resource;
-
-        if (ns_is_server(res->lr_namespace)) {
-                /* on server-side resource of lock doesn't change */
-                unlock_res(res);
-                return;
-        }
-
-        unlock_res(res);
-        spin_unlock(&lock->l_lock);
-}
-
diff --git a/lustre/ldlm/ldlm_extent.c b/lustre/ldlm/ldlm_extent.c
deleted file mode 100644
index cc0e3aa92020ef3fb79f5ff842604157a5b08548..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_extent.c
+++ /dev/null
@@ -1,881 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <lustre_dlm.h>
-#include <obd_support.h>
-#include <obd.h>
-#include <lustre_lib.h>
-
-#include "ldlm_internal.h"
-
-#define LDLM_MAX_GROWN_EXTENT (32 * 1024 * 1024 - 1)
-
-/* fixup the ldlm_extent after expanding */
-static void ldlm_extent_internal_policy_fixup(struct ldlm_lock *req,
-                                              struct ldlm_extent *new_ex,
-                                              int conflicting)
-{
-        ldlm_mode_t req_mode = req->l_req_mode;
-        __u64 req_start = req->l_req_extent.start;
-        __u64 req_end = req->l_req_extent.end;
-        __u64 req_align, mask;
- 
-        if (conflicting > 32 && (req_mode == LCK_PW || req_mode == LCK_CW)) {
-                if (req_end < req_start + LDLM_MAX_GROWN_EXTENT)
-                        new_ex->end = min(req_start + LDLM_MAX_GROWN_EXTENT,
-                                          new_ex->end);
-        }
-
-        if (new_ex->start == 0 && new_ex->end == OBD_OBJECT_EOF) {
-                EXIT;
-                return;
-        }
-
-        /* we need to ensure that the lock extent is properly aligned to what
-         * the client requested.  We align it to the lowest-common denominator
-         * of the clients requested lock start and end alignment. */
-        mask = 0x1000ULL;
-        req_align = (req_end + 1) | req_start;
-        if (req_align != 0) {
-                while ((req_align & mask) == 0)
-                        mask <<= 1;
-        }
-        mask -= 1;
-        /* We can only shrink the lock, not grow it.
-         * This should never cause lock to be smaller than requested,
-         * since requested lock was already aligned on these boundaries. */
-        new_ex->start = ((new_ex->start - 1) | mask) + 1;
-        new_ex->end = ((new_ex->end + 1) & ~mask) - 1;
-        LASSERTF(new_ex->start <= req_start,
-                 "mask "LPX64" grant start "LPU64" req start "LPU64"\n",
-                 mask, new_ex->start, req_start);
-        LASSERTF(new_ex->end >= req_end,
-                 "mask "LPX64" grant end "LPU64" req end "LPU64"\n",
-                 mask, new_ex->end, req_end);
-}
-
-/* The purpose of this function is to return:
- * - the maximum extent
- * - containing the requested extent
- * - and not overlapping existing conflicting extents outside the requested one
- *
- * Use interval tree to expand the lock extent for granted lock.
- */
-static void ldlm_extent_internal_policy_granted(struct ldlm_lock *req,
-                                                struct ldlm_extent *new_ex)
-{
-        struct ldlm_resource *res = req->l_resource;
-        ldlm_mode_t req_mode = req->l_req_mode;
-        __u64 req_start = req->l_req_extent.start;
-        __u64 req_end = req->l_req_extent.end;
-        struct ldlm_interval_tree *tree;
-        struct interval_node_extent limiter = { new_ex->start, new_ex->end };
-        int conflicting = 0;
-        int idx;
-        ENTRY;
-
-        lockmode_verify(req_mode);
-
-        /* using interval tree to handle the ldlm extent granted locks */
-        for (idx = 0; idx < LCK_MODE_NUM; idx++) {
-                struct interval_node_extent ext = { req_start, req_end };
-
-                tree = &res->lr_itree[idx];
-                if (lockmode_compat(tree->lit_mode, req_mode))
-                        continue;
-
-                conflicting += tree->lit_size;
-                if (conflicting > 4)
-                        limiter.start = req_start;
-
-                if (interval_is_overlapped(tree->lit_root, &ext))
-                        printk("req_mode = %d, tree->lit_mode = %d, tree->lit_size = %d\n",
-                               req_mode, tree->lit_mode, tree->lit_size);
-                interval_expand(tree->lit_root, &ext, &limiter);
-                limiter.start = max(limiter.start, ext.start);
-                limiter.end = min(limiter.end, ext.end);
-                if (limiter.start == req_start && limiter.end == req_end)
-                        break;
-        }
-
-        new_ex->start = limiter.start;
-        new_ex->end = limiter.end;
-        LASSERT(new_ex->start <= req_start);
-        LASSERT(new_ex->end >= req_end);
-
-        ldlm_extent_internal_policy_fixup(req, new_ex, conflicting);
-        EXIT;
-}
-
-/* The purpose of this function is to return:
- * - the maximum extent
- * - containing the requested extent
- * - and not overlapping existing conflicting extents outside the requested one
- */
-static void
-ldlm_extent_internal_policy_waiting(struct ldlm_lock *req,
-                                    struct ldlm_extent *new_ex)
-{
-        struct list_head *tmp;
-        struct ldlm_resource *res = req->l_resource;
-        ldlm_mode_t req_mode = req->l_req_mode;
-        __u64 req_start = req->l_req_extent.start;
-        __u64 req_end = req->l_req_extent.end;
-        int conflicting = 0;
-        ENTRY;
-
-        lockmode_verify(req_mode);
-
-        /* for waiting locks */
-        list_for_each(tmp, &res->lr_waiting) {
-                struct ldlm_lock *lock;
-                struct ldlm_extent *l_extent;
-
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                l_extent = &lock->l_policy_data.l_extent;
-
-                /* We already hit the minimum requested size, search no more */
-                if (new_ex->start == req_start && new_ex->end == req_end) {
-                        EXIT;
-                        return;
-                }
-
-                /* Don't conflict with ourselves */
-                if (req == lock)
-                        continue;
-
-                /* Locks are compatible, overlap doesn't matter */
-                /* Until bug 20 is fixed, try to avoid granting overlapping
-                 * locks on one client (they take a long time to cancel) */
-                if (lockmode_compat(lock->l_req_mode, req_mode) &&
-                    lock->l_export != req->l_export)
-                        continue;
-
-                /* If this is a high-traffic lock, don't grow downwards at all
-                 * or grow upwards too much */
-                ++conflicting;
-                if (conflicting > 4)
-                        new_ex->start = req_start;
-
-                /* If lock doesn't overlap new_ex, skip it. */
-                if (!ldlm_extent_overlap(l_extent, new_ex))
-                        continue;
-
-                /* Locks conflicting in requested extents and we can't satisfy
-                 * both locks, so ignore it.  Either we will ping-pong this
-                 * extent (we would regardless of what extent we granted) or
-                 * lock is unused and it shouldn't limit our extent growth. */
-                if (ldlm_extent_overlap(&lock->l_req_extent,&req->l_req_extent))
-                        continue;
-
-                /* We grow extents downwards only as far as they don't overlap
-                 * with already-granted locks, on the assumtion that clients
-                 * will be writing beyond the initial requested end and would
-                 * then need to enqueue a new lock beyond previous request.
-                 * l_req_extent->end strictly < req_start, checked above. */
-                if (l_extent->start < req_start && new_ex->start != req_start) {
-                        if (l_extent->end >= req_start)
-                                new_ex->start = req_start;
-                        else
-                                new_ex->start = min(l_extent->end+1, req_start);
-                }
-
-                /* If we need to cancel this lock anyways because our request
-                 * overlaps the granted lock, we grow up to its requested
-                 * extent start instead of limiting this extent, assuming that
-                 * clients are writing forwards and the lock had over grown
-                 * its extent downwards before we enqueued our request. */
-                if (l_extent->end > req_end) {
-                        if (l_extent->start <= req_end)
-                                new_ex->end = max(lock->l_req_extent.start - 1,
-                                                  req_end);
-                        else
-                                new_ex->end = max(l_extent->start - 1, req_end);
-                }
-        }
-
-        ldlm_extent_internal_policy_fixup(req, new_ex, conflicting);
-        EXIT;
-}
-
-
-/* In order to determine the largest possible extent we can grant, we need
- * to scan all of the queues. */
-static void ldlm_extent_policy(struct ldlm_resource *res,
-                               struct ldlm_lock *lock, int *flags)
-{
-        struct ldlm_extent new_ex = { .start = 0, .end = OBD_OBJECT_EOF };
-
-        if (lock->l_export == NULL)
-                /*
-                 * this is local lock taken by server (e.g., as a part of
-                 * OST-side locking, or unlink handling). Expansion doesn't
-                 * make a lot of sense for local locks, because they are
-                 * dropped immediately on operation completion and would only
-                 * conflict with other threads.
-                 */
-                return;
-
-        if (lock->l_policy_data.l_extent.start == 0 &&
-            lock->l_policy_data.l_extent.end == OBD_OBJECT_EOF)
-                /* fast-path whole file locks */
-                return;
-
-        ldlm_extent_internal_policy_granted(lock, &new_ex);
-        ldlm_extent_internal_policy_waiting(lock, &new_ex);
-
-        if (new_ex.start != lock->l_policy_data.l_extent.start ||
-            new_ex.end != lock->l_policy_data.l_extent.end) {
-                *flags |= LDLM_FL_LOCK_CHANGED;
-                lock->l_policy_data.l_extent.start = new_ex.start;
-                lock->l_policy_data.l_extent.end = new_ex.end;
-        }
-}
-
-static int ldlm_check_contention(struct ldlm_lock *lock, int contended_locks)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        cfs_time_t now = cfs_time_current();
-
-        CDEBUG(D_DLMTRACE, "contended locks = %d\n", contended_locks);
-        if (contended_locks > res->lr_namespace->ns_contended_locks)
-                res->lr_contention_time = now;
-        return cfs_time_before(now, cfs_time_add(res->lr_contention_time,
-                cfs_time_seconds(res->lr_namespace->ns_contention_time)));
-}
-
-struct ldlm_extent_compat_args {
-        struct list_head *work_list;
-        struct ldlm_lock *lock;
-        ldlm_mode_t mode;
-        int *locks;
-        int *compat;
-};
-
-static enum interval_iter ldlm_extent_compat_cb(struct interval_node *n,
-                                                void *data)
-{
-        struct ldlm_extent_compat_args *priv = data;
-        struct ldlm_interval *node = to_ldlm_interval(n);
-        struct ldlm_extent *extent;
-        struct list_head *work_list = priv->work_list;
-        struct ldlm_lock *lock, *enq = priv->lock;
-        ldlm_mode_t mode = priv->mode;
-        int count = 0;
-        ENTRY;
-
-        LASSERT(!list_empty(&node->li_group));
-
-        list_for_each_entry(lock, &node->li_group, l_sl_policy) {
-                /* interval tree is for granted lock */
-                LASSERTF(mode == lock->l_granted_mode,
-                         "mode = %s, lock->l_granted_mode = %s\n",
-                         ldlm_lockname[mode],
-                         ldlm_lockname[lock->l_granted_mode]);
-
-                count++;
-                if (lock->l_blocking_ast)
-                        ldlm_add_ast_work_item(lock, enq, work_list);
-        }
-        LASSERT(count > 0);
-
-        /* don't count conflicting glimpse locks */
-        extent = ldlm_interval_extent(node);
-        if (!(mode == LCK_PR &&
-            extent->start == 0 && extent->end == OBD_OBJECT_EOF))
-                *priv->locks += count;
-
-        if (priv->compat)
-                *priv->compat = 0;
-
-        RETURN(INTERVAL_ITER_CONT);
-}
-
-/* Determine if the lock is compatible with all locks on the queue.
- * We stop walking the queue if we hit ourselves so we don't take
- * conflicting locks enqueued after us into accound, or we'd wait forever.
- *
- * 0 if the lock is not compatible
- * 1 if the lock is compatible
- * 2 if this group lock is compatible and requires no further checking
- * negative error, such as EWOULDBLOCK for group locks
- */
-static int
-ldlm_extent_compat_queue(struct list_head *queue, struct ldlm_lock *req,
-                         int *flags, ldlm_error_t *err,
-                         struct list_head *work_list, int *contended_locks)
-{
-        struct list_head *tmp;
-        struct ldlm_lock *lock;
-        struct ldlm_resource *res = req->l_resource;
-        ldlm_mode_t req_mode = req->l_req_mode;
-        __u64 req_start = req->l_req_extent.start;
-        __u64 req_end = req->l_req_extent.end;
-        int compat = 1;
-        int scan = 0;
-        int check_contention;
-        ENTRY;
-
-        lockmode_verify(req_mode);
-
-        /* Using interval tree for granted lock */
-        if (queue == &res->lr_granted) {
-                struct ldlm_interval_tree *tree;
-                struct ldlm_extent_compat_args data = {.work_list = work_list,
-                                               .lock = req,
-                                               .locks = contended_locks,
-                                               .compat = &compat };
-                struct interval_node_extent ex = { .start = req_start,
-                                                   .end = req_end };
-                int idx, rc;
-
-                for (idx = 0; idx < LCK_MODE_NUM; idx++) {
-                        tree = &res->lr_itree[idx];
-                        if (tree->lit_root == NULL) /* empty tree, skipped */
-                                continue;
-
-                        data.mode = tree->lit_mode;
-                        if (lockmode_compat(req_mode, tree->lit_mode)) {
-                                struct ldlm_interval *node;
-                                struct ldlm_extent *extent;
-
-                                if (req_mode != LCK_GROUP)
-                                        continue;
-
-                                /* group lock, grant it immediately if
-                                 * compatible */
-                                node = to_ldlm_interval(tree->lit_root);
-                                extent = ldlm_interval_extent(node);
-                                if (req->l_policy_data.l_extent.gid ==
-                                    extent->gid)
-                                        RETURN(2);
-                        }
-
-                        if (tree->lit_mode == LCK_GROUP) {
-                                if (*flags & LDLM_FL_BLOCK_NOWAIT) {
-                                        compat = -EWOULDBLOCK;
-                                        goto destroylock;
-                                }
-
-                                *flags |= LDLM_FL_NO_TIMEOUT;
-                                if (!work_list)
-                                        RETURN(0);
-
-                                /* if work list is not NULL,add all
-                                   locks in the tree to work list */
-                                compat = 0;
-                                interval_iterate(tree->lit_root,
-                                                 ldlm_extent_compat_cb, &data);
-                                continue;
-                        }
-
-                        if (!work_list) {
-                                rc = interval_is_overlapped(tree->lit_root,&ex);
-                                if (rc)
-                                        RETURN(0);
-                        } else {
-                                interval_search(tree->lit_root, &ex,
-                                                ldlm_extent_compat_cb, &data);
-                                if (!list_empty(work_list) && compat)
-                                        compat = 0;
-                        }
-                }
-                RETURN(compat);
-        }
-
-        /* for waiting queue */
-        list_for_each(tmp, queue) {
-                check_contention = 1;
-
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (req == lock)
-                        break;
-
-                if (unlikely(scan)) {
-                        /* We only get here if we are queuing GROUP lock
-                           and met some incompatible one. The main idea of this
-                           code is to insert GROUP lock past compatible GROUP
-                           lock in the waiting queue or if there is not any,
-                           then in front of first non-GROUP lock */
-                        if (lock->l_req_mode != LCK_GROUP) {
-                                /* Ok, we hit non-GROUP lock, there should be no
-                                more GROUP locks later on, queue in front of
-                                first non-GROUP lock */
-
-                                ldlm_resource_insert_lock_after(lock, req);
-                                list_del_init(&lock->l_res_link);
-                                ldlm_resource_insert_lock_after(req, lock);
-                                compat = 0;
-                                break;
-                        }
-                        if (req->l_policy_data.l_extent.gid ==
-                             lock->l_policy_data.l_extent.gid) {
-                                /* found it */
-                                ldlm_resource_insert_lock_after(lock, req);
-                                compat = 0;
-                                break;
-                        }
-                        continue;
-                }
-
-                /* locks are compatible, overlap doesn't matter */
-                if (lockmode_compat(lock->l_req_mode, req_mode)) {
-                        if (req_mode == LCK_PR &&
-                            ((lock->l_policy_data.l_extent.start <=
-                             req->l_policy_data.l_extent.start) &&
-                             (lock->l_policy_data.l_extent.end >=
-                              req->l_policy_data.l_extent.end))) {
-                                /* If we met a PR lock just like us or wider,
-                                   and nobody down the list conflicted with
-                                   it, that means we can skip processing of
-                                   the rest of the list and safely place
-                                   ourselves at the end of the list, or grant
-                                   (dependent if we met an conflicting locks
-                                   before in the list).
-                                   In case of 1st enqueue only we continue
-                                   traversing if there is something conflicting
-                                   down the list because we need to make sure
-                                   that something is marked as AST_SENT as well,
-                                   in cse of empy worklist we would exit on
-                                   first conflict met. */
-                                /* There IS a case where such flag is
-                                   not set for a lock, yet it blocks
-                                   something. Luckily for us this is
-                                   only during destroy, so lock is
-                                   exclusive. So here we are safe */
-                                if (!(lock->l_flags & LDLM_FL_AST_SENT)) {
-                                        RETURN(compat);
-                                }
-                        }
-
-                        /* non-group locks are compatible, overlap doesn't
-                           matter */
-                        if (likely(req_mode != LCK_GROUP))
-                                continue;
-
-                        /* If we are trying to get a GROUP lock and there is
-                           another one of this kind, we need to compare gid */
-                        if (req->l_policy_data.l_extent.gid ==
-                            lock->l_policy_data.l_extent.gid) {
-                                /* If existing lock with matched gid is granted,
-                                   we grant new one too. */
-                                if (lock->l_req_mode == lock->l_granted_mode)
-                                        RETURN(2);
-
-                                /* Otherwise we are scanning queue of waiting
-                                 * locks and it means current request would
-                                 * block along with existing lock (that is
-                                 * already blocked.
-                                 * If we are in nonblocking mode - return
-                                 * immediately */
-                                if (*flags & LDLM_FL_BLOCK_NOWAIT) {
-                                        compat = -EWOULDBLOCK;
-                                        goto destroylock;
-                                }
-                                /* If this group lock is compatible with another
-                                 * group lock on the waiting list, they must be
-                                 * together in the list, so they can be granted
-                                 * at the same time.  Otherwise the later lock
-                                 * can get stuck behind another, incompatible,
-                                 * lock. */
-                                ldlm_resource_insert_lock_after(lock, req);
-                                /* Because 'lock' is not granted, we can stop
-                                 * processing this queue and return immediately.
-                                 * There is no need to check the rest of the
-                                 * list. */
-                                RETURN(0);
-                        }
-                }
-
-                if (unlikely(req_mode == LCK_GROUP &&
-                             (lock->l_req_mode != lock->l_granted_mode))) {
-                        scan = 1;
-                        compat = 0;
-                        if (lock->l_req_mode != LCK_GROUP) {
-                                /* Ok, we hit non-GROUP lock, there should
-                                 * be no more GROUP locks later on, queue in
-                                 * front of first non-GROUP lock */
-
-                                ldlm_resource_insert_lock_after(lock, req);
-                                list_del_init(&lock->l_res_link);
-                                ldlm_resource_insert_lock_after(req, lock);
-                                break;
-                        }
-                        if (req->l_policy_data.l_extent.gid ==
-                             lock->l_policy_data.l_extent.gid) {
-                                /* found it */
-                                ldlm_resource_insert_lock_after(lock, req);
-                                break;
-                        }
-                        continue;
-                }
-
-                if (unlikely(lock->l_req_mode == LCK_GROUP)) {
-                        /* If compared lock is GROUP, then requested is PR/PW/
-                         * so this is not compatible; extent range does not
-                         * matter */
-                        if (*flags & LDLM_FL_BLOCK_NOWAIT) {
-                                compat = -EWOULDBLOCK;
-                                goto destroylock;
-                        } else {
-                                *flags |= LDLM_FL_NO_TIMEOUT;
-                        }
-                } else if (lock->l_policy_data.l_extent.end < req_start ||
-                           lock->l_policy_data.l_extent.start > req_end) {
-                        /* if a non group lock doesn't overlap skip it */
-                        continue;
-                } else if (lock->l_req_extent.end < req_start ||
-                           lock->l_req_extent.start > req_end)
-                        /* false contention, the requests doesn't really overlap */
-                                check_contention = 0;
-
-                if (!work_list)
-                        RETURN(0);
-
-                /* don't count conflicting glimpse locks */
-                if (lock->l_req_mode == LCK_PR &&
-                    lock->l_policy_data.l_extent.start == 0 &&
-                    lock->l_policy_data.l_extent.end == OBD_OBJECT_EOF)
-                        check_contention = 0;
-
-                *contended_locks += check_contention;
-
-                compat = 0;
-                if (lock->l_blocking_ast)
-                        ldlm_add_ast_work_item(lock, req, work_list);
-        }
-
-        if (ldlm_check_contention(req, *contended_locks) &&
-            compat == 0 &&
-            (*flags & LDLM_FL_DENY_ON_CONTENTION) &&
-            req->l_req_mode != LCK_GROUP &&
-            req_end - req_start <=
-            req->l_resource->lr_namespace->ns_max_nolock_size)
-                GOTO(destroylock, compat = -EUSERS);
-
-        RETURN(compat);
-destroylock:
-        list_del_init(&req->l_res_link);
-        ldlm_lock_destroy_nolock(req);
-        *err = compat;
-        RETURN(compat);
-}
-
-static void discard_bl_list(struct list_head *bl_list)
-{
-        struct list_head *tmp, *pos;
-        ENTRY;
-
-        list_for_each_safe(pos, tmp, bl_list) {
-                struct ldlm_lock *lock =
-                        list_entry(pos, struct ldlm_lock, l_bl_ast);
-
-                list_del_init(&lock->l_bl_ast);
-                LASSERT(lock->l_flags & LDLM_FL_AST_SENT);
-                lock->l_flags &= ~LDLM_FL_AST_SENT;
-                LASSERT(lock->l_bl_ast_run == 0);
-                LASSERT(lock->l_blocking_lock);
-                LDLM_LOCK_PUT(lock->l_blocking_lock);
-                lock->l_blocking_lock = NULL;
-                LDLM_LOCK_PUT(lock);
-        }
-        EXIT;
-}
-
-/* If first_enq is 0 (ie, called from ldlm_reprocess_queue):
-  *   - blocking ASTs have already been sent
-  *   - must call this function with the ns lock held
-  *
-  * If first_enq is 1 (ie, called from ldlm_lock_enqueue):
-  *   - blocking ASTs have not been sent
-  *   - must call this function with the ns lock held once */
-int ldlm_process_extent_lock(struct ldlm_lock *lock, int *flags, int first_enq,
-                             ldlm_error_t *err, struct list_head *work_list)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        struct list_head rpc_list = CFS_LIST_HEAD_INIT(rpc_list);
-        int rc, rc2;
-        int contended_locks = 0;
-        ENTRY;
-
-        LASSERT(list_empty(&res->lr_converting));
-        LASSERT(!(*flags & LDLM_FL_DENY_ON_CONTENTION) ||
-                !(lock->l_flags & LDLM_AST_DISCARD_DATA));
-        check_res_locked(res);
-        *err = ELDLM_OK;
-
-        if (!first_enq) {
-                /* Careful observers will note that we don't handle -EWOULDBLOCK
-                 * here, but it's ok for a non-obvious reason -- compat_queue
-                 * can only return -EWOULDBLOCK if (flags & BLOCK_NOWAIT).
-                 * flags should always be zero here, and if that ever stops
-                 * being true, we want to find out. */
-                LASSERT(*flags == 0);
-                rc = ldlm_extent_compat_queue(&res->lr_granted, lock, flags,
-                                              err, NULL, &contended_locks);
-                if (rc == 1) {
-                        rc = ldlm_extent_compat_queue(&res->lr_waiting, lock,
-                                                      flags, err, NULL,
-                                                      &contended_locks);
-                }
-                if (rc == 0)
-                        RETURN(LDLM_ITER_STOP);
-
-                ldlm_resource_unlink_lock(lock);
-
-                if (!OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_EVICT_RACE))
-                        ldlm_extent_policy(res, lock, flags);
-                ldlm_grant_lock(lock, work_list);
-                RETURN(LDLM_ITER_CONTINUE);
-        }
-
- restart:
-        contended_locks = 0;
-        rc = ldlm_extent_compat_queue(&res->lr_granted, lock, flags, err,
-                                      &rpc_list, &contended_locks);
-        if (rc < 0)
-                GOTO(out, rc); /* lock was destroyed */
-        if (rc == 2)
-                goto grant;
-
-        rc2 = ldlm_extent_compat_queue(&res->lr_waiting, lock, flags, err,
-                                       &rpc_list, &contended_locks);
-        if (rc2 < 0)
-                GOTO(out, rc = rc2); /* lock was destroyed */
-
-        if (rc + rc2 == 2) {
-        grant:
-                ldlm_extent_policy(res, lock, flags);
-                ldlm_resource_unlink_lock(lock);
-                ldlm_grant_lock(lock, NULL);
-        } else {
-                /* If either of the compat_queue()s returned failure, then we
-                 * have ASTs to send and must go onto the waiting list.
-                 *
-                 * bug 2322: we used to unlink and re-add here, which was a
-                 * terrible folly -- if we goto restart, we could get
-                 * re-ordered!  Causes deadlock, because ASTs aren't sent! */
-                if (list_empty(&lock->l_res_link))
-                        ldlm_resource_add_lock(res, &res->lr_waiting, lock);
-                unlock_res(res);
-                rc = ldlm_run_bl_ast_work(&rpc_list);
-                lock_res(res);
-
-                if (rc == -ERESTART) {
-                        /* lock was granted while resource was unlocked. */
-                        if (lock->l_granted_mode == lock->l_req_mode) {
-                                /* bug 11300: if the lock has been granted,
-                                 * break earlier because otherwise, we will go
-                                 * to restart and ldlm_resource_unlink will be
-                                 * called and it causes the interval node to be
-                                 * freed. Then we will fail at 
-                                 * ldlm_extent_add_lock() */
-                                *flags &= ~(LDLM_FL_BLOCK_GRANTED | LDLM_FL_BLOCK_CONV |
-                                            LDLM_FL_BLOCK_WAIT);
-                                GOTO(out, rc = 0);
-                        }
-
-                        GOTO(restart, -ERESTART);
-                }
-
-                *flags |= LDLM_FL_BLOCK_GRANTED;
-                /* this way we force client to wait for the lock
-                 * endlessly once the lock is enqueued -bzzz */
-                *flags |= LDLM_FL_NO_TIMEOUT;
-
-        }
-        RETURN(0);
-out:
-        if (!list_empty(&rpc_list)) {
-                LASSERT(!(lock->l_flags & LDLM_AST_DISCARD_DATA));
-                discard_bl_list(&rpc_list);
-        }
-        RETURN(rc);
-}
-
-/* When a lock is cancelled by a client, the KMS may undergo change if this
- * is the "highest lock".  This function returns the new KMS value.
- * Caller must hold ns_lock already.
- *
- * NB: A lock on [x,y] protects a KMS of up to y + 1 bytes! */
-__u64 ldlm_extent_shift_kms(struct ldlm_lock *lock, __u64 old_kms)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        struct list_head *tmp;
-        struct ldlm_lock *lck;
-        __u64 kms = 0;
-        ENTRY;
-
-        /* don't let another thread in ldlm_extent_shift_kms race in
-         * just after we finish and take our lock into account in its
-         * calculation of the kms */
-        lock->l_flags |= LDLM_FL_KMS_IGNORE;
-
-        list_for_each(tmp, &res->lr_granted) {
-                lck = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (lck->l_flags & LDLM_FL_KMS_IGNORE)
-                        continue;
-
-                if (lck->l_policy_data.l_extent.end >= old_kms)
-                        RETURN(old_kms);
-
-                /* This extent _has_ to be smaller than old_kms (checked above)
-                 * so kms can only ever be smaller or the same as old_kms. */
-                if (lck->l_policy_data.l_extent.end + 1 > kms)
-                        kms = lck->l_policy_data.l_extent.end + 1;
-        }
-        LASSERTF(kms <= old_kms, "kms "LPU64" old_kms "LPU64"\n", kms, old_kms);
-
-        RETURN(kms);
-}
-
-cfs_mem_cache_t *ldlm_interval_slab;
-struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock)
-{
-        struct ldlm_interval *node;
-        ENTRY;
-
-        LASSERT(lock->l_resource->lr_type == LDLM_EXTENT);
-        OBD_SLAB_ALLOC(node, ldlm_interval_slab, CFS_ALLOC_IO, sizeof(*node));
-        if (node == NULL)
-                RETURN(NULL);
-
-        CFS_INIT_LIST_HEAD(&node->li_group);
-        ldlm_interval_attach(node, lock);
-        RETURN(node);
-}
-
-void ldlm_interval_free(struct ldlm_interval *node)
-{
-        if (node) {
-                LASSERT(list_empty(&node->li_group));
-                OBD_SLAB_FREE(node, ldlm_interval_slab, sizeof(*node));
-        }
-}
-
-/* interval tree, for LDLM_EXTENT. */
-void ldlm_interval_attach(struct ldlm_interval *n,
-                          struct ldlm_lock *l)
-{
-        LASSERT(l->l_tree_node == NULL);
-        LASSERT(l->l_resource->lr_type == LDLM_EXTENT);
-
-        list_add_tail(&l->l_sl_policy, &n->li_group);
-        l->l_tree_node = n;
-}
-
-struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l)
-{
-        struct ldlm_interval *n = l->l_tree_node;
-
-        if (n == NULL)
-                return NULL;
-
-        LASSERT(!list_empty(&n->li_group));
-        l->l_tree_node = NULL;
-        list_del_init(&l->l_sl_policy);
-
-        return (list_empty(&n->li_group) ? n : NULL);
-}
-
-static inline int lock_mode_to_index(ldlm_mode_t mode)
-{
-        int index;
-
-        LASSERT(mode != 0);
-        LASSERT(IS_PO2(mode));
-        for (index = -1; mode; index++, mode >>= 1) ;
-        LASSERT(index < LCK_MODE_NUM);
-        return index;
-}
-
-void ldlm_extent_add_lock(struct ldlm_resource *res,
-                          struct ldlm_lock *lock)
-{
-        struct interval_node *found, **root;
-        struct ldlm_interval *node;
-        struct ldlm_extent *extent;
-        int idx;
-
-        LASSERT(lock->l_granted_mode == lock->l_req_mode);
-
-        node = lock->l_tree_node;
-        LASSERT(node != NULL);
-
-        idx = lock_mode_to_index(lock->l_granted_mode);
-        LASSERT(lock->l_granted_mode == 1 << idx);
-        LASSERT(lock->l_granted_mode == res->lr_itree[idx].lit_mode);
-
-        /* node extent initialize */
-        extent = &lock->l_policy_data.l_extent;
-        interval_set(&node->li_node, extent->start, extent->end);
-
-        root = &res->lr_itree[idx].lit_root;
-        found = interval_insert(&node->li_node, root);
-        if (found) { /* The policy group found. */
-                struct ldlm_interval *tmp = ldlm_interval_detach(lock);
-                LASSERT(tmp != NULL);
-                ldlm_interval_free(tmp);
-                ldlm_interval_attach(to_ldlm_interval(found), lock);
-        }
-        res->lr_itree[idx].lit_size++;
-
-        /* even though we use interval tree to manage the extent lock, we also
-         * add the locks into grant list, for debug purpose, .. */
-        ldlm_resource_add_lock(res, &res->lr_granted, lock);
-}
-
-void ldlm_extent_unlink_lock(struct ldlm_lock *lock)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        struct ldlm_interval *node;
-        struct ldlm_interval_tree *tree;
-        int idx;
-
-        if (lock->l_granted_mode != lock->l_req_mode)
-                return;
-
-        LASSERT(lock->l_tree_node != NULL);
-        idx = lock_mode_to_index(lock->l_granted_mode);
-        LASSERT(lock->l_granted_mode == 1 << idx);
-        tree = &res->lr_itree[idx];
-
-        LASSERT(tree->lit_root != NULL); /* assure the tree is not null */
-
-        tree->lit_size--;
-        node = ldlm_interval_detach(lock);
-        if (node) {
-                interval_erase(&node->li_node, &tree->lit_root);
-                ldlm_interval_free(node);
-        }
-}
diff --git a/lustre/ldlm/ldlm_flock.c b/lustre/ldlm/ldlm_flock.c
deleted file mode 100644
index bd92a84d8b6a960efde7256ec11e4ce8c27ad3d0..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_flock.c
+++ /dev/null
@@ -1,579 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Hewlett-Packard Development Company LP.
- *   Developed under the sponsorship of the US Government under
- *   Subcontract No. B514193
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-
-#ifdef __KERNEL__
-#include <lustre_dlm.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_lib.h>
-#include <libcfs/list.h>
-#else
-#include <liblustre.h>
-#include <obd_class.h>
-#endif
-
-#include "ldlm_internal.h"
-
-#define l_flock_waitq   l_lru
-
-static struct list_head ldlm_flock_waitq = CFS_LIST_HEAD_INIT(ldlm_flock_waitq);
-
-int ldlm_flock_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
-                            void *data, int flag);
-
-/**
- * list_for_remaining_safe - iterate over the remaining entries in a list
- *              and safeguard against removal of a list entry.
- * @pos:        the &struct list_head to use as a loop counter. pos MUST
- *              have been initialized prior to using it in this macro.
- * @n:          another &struct list_head to use as temporary storage
- * @head:       the head for your list.
- */
-#define list_for_remaining_safe(pos, n, head) \
-        for (n = pos->next; pos != (head); pos = n, n = pos->next)
-
-static inline int
-ldlm_same_flock_owner(struct ldlm_lock *lock, struct ldlm_lock *new)
-{
-        return((new->l_policy_data.l_flock.pid ==
-                lock->l_policy_data.l_flock.pid) &&
-               (new->l_export == lock->l_export));
-}
-
-static inline int
-ldlm_flocks_overlap(struct ldlm_lock *lock, struct ldlm_lock *new)
-{
-        return((new->l_policy_data.l_flock.start <=
-                lock->l_policy_data.l_flock.end) &&
-               (new->l_policy_data.l_flock.end >=
-                lock->l_policy_data.l_flock.start));
-}
-
-static inline void
-ldlm_flock_destroy(struct ldlm_lock *lock, ldlm_mode_t mode, int flags)
-{
-        ENTRY;
-
-        LDLM_DEBUG(lock, "ldlm_flock_destroy(mode: %d, flags: 0x%x)",
-                   mode, flags);
-
-        LASSERT(list_empty(&lock->l_flock_waitq));
-
-        list_del_init(&lock->l_res_link);
-        if (flags == LDLM_FL_WAIT_NOREPROC) {
-                /* client side - set a flag to prevent sending a CANCEL */
-                lock->l_flags |= LDLM_FL_LOCAL_ONLY | LDLM_FL_CBPENDING;
-
-                /* when reaching here, it is under lock_res_and_lock(). Thus, 
-                   need call the nolock version of ldlm_lock_decref_internal*/
-                ldlm_lock_decref_internal_nolock(lock, mode);
-        }
-
-        ldlm_lock_destroy_nolock(lock);
-        EXIT;
-}
-
-static int
-ldlm_flock_deadlock(struct ldlm_lock *req, struct ldlm_lock *blocking_lock)
-{
-        struct obd_export *req_export = req->l_export;
-        struct obd_export *blocking_export = blocking_lock->l_export;
-        pid_t req_pid = req->l_policy_data.l_flock.pid;
-        pid_t blocking_pid = blocking_lock->l_policy_data.l_flock.pid;
-        struct ldlm_lock *lock;
-
-restart:
-        list_for_each_entry(lock, &ldlm_flock_waitq, l_flock_waitq) {
-                if ((lock->l_policy_data.l_flock.pid != blocking_pid) ||
-                    (lock->l_export != blocking_export))
-                        continue;
-
-                blocking_pid = lock->l_policy_data.l_flock.blocking_pid;
-                blocking_export = (struct obd_export *)(long)
-                        lock->l_policy_data.l_flock.blocking_export;
-                if (blocking_pid == req_pid && blocking_export == req_export)
-                        return 1;
-
-                goto restart;
-        }
-
-        return 0;
-}
-
-int
-ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq,
-                        ldlm_error_t *err, struct list_head *work_list)
-{
-        struct ldlm_resource *res = req->l_resource;
-        struct ldlm_namespace *ns = res->lr_namespace;
-        struct list_head *tmp;
-        struct list_head *ownlocks = NULL;
-        struct ldlm_lock *lock = NULL;
-        struct ldlm_lock *new = req;
-        struct ldlm_lock *new2 = NULL;
-        ldlm_mode_t mode = req->l_req_mode;
-        int local = ns_is_client(ns);
-        int added = (mode == LCK_NL);
-        int overlaps = 0;
-        int splitted = 0;
-        ENTRY;
-
-        CDEBUG(D_DLMTRACE, "flags %#x pid %u mode %u start "LPU64" end "LPU64
-               "\n", *flags, new->l_policy_data.l_flock.pid, mode,
-               req->l_policy_data.l_flock.start,
-               req->l_policy_data.l_flock.end);
-
-        *err = ELDLM_OK;
-
-        if (local) {
-                /* No blocking ASTs are sent to the clients for
-                 * Posix file & record locks */
-                req->l_blocking_ast = NULL;
-        } else {
-                /* Called on the server for lock cancels. */
-                req->l_blocking_ast = ldlm_flock_blocking_ast;
-        }
-
-reprocess:
-        if ((*flags == LDLM_FL_WAIT_NOREPROC) || (mode == LCK_NL)) {
-                /* This loop determines where this processes locks start
-                 * in the resource lr_granted list. */
-                list_for_each(tmp, &res->lr_granted) {
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                        if (ldlm_same_flock_owner(lock, req)) {
-                                ownlocks = tmp;
-                                break;
-                        }
-                }
-        } else {
-                lockmode_verify(mode);
-
-                /* This loop determines if there are existing locks
-                 * that conflict with the new lock request. */
-                list_for_each(tmp, &res->lr_granted) {
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                        if (ldlm_same_flock_owner(lock, req)) {
-                                if (!ownlocks)
-                                        ownlocks = tmp;
-                                continue;
-                        }
-
-                        /* locks are compatible, overlap doesn't matter */
-                        if (lockmode_compat(lock->l_granted_mode, mode))
-                                continue;
-
-                        if (!ldlm_flocks_overlap(lock, req))
-                                continue;
-
-                        if (!first_enq)
-                                RETURN(LDLM_ITER_CONTINUE);
-
-                        if (*flags & LDLM_FL_BLOCK_NOWAIT) {
-                                ldlm_flock_destroy(req, mode, *flags);
-                                *err = -EAGAIN;
-                                RETURN(LDLM_ITER_STOP);
-                        }
-
-                        if (*flags & LDLM_FL_TEST_LOCK) {
-                                ldlm_flock_destroy(req, mode, *flags);
-                                req->l_req_mode = lock->l_granted_mode;
-                                req->l_policy_data.l_flock.pid =
-                                        lock->l_policy_data.l_flock.pid;
-                                req->l_policy_data.l_flock.start =
-                                        lock->l_policy_data.l_flock.start;
-                                req->l_policy_data.l_flock.end =
-                                        lock->l_policy_data.l_flock.end;
-                                *flags |= LDLM_FL_LOCK_CHANGED;
-                                RETURN(LDLM_ITER_STOP);
-                        }
-
-                        if (ldlm_flock_deadlock(req, lock)) {
-                                ldlm_flock_destroy(req, mode, *flags);
-                                *err = -EDEADLK;
-                                RETURN(LDLM_ITER_STOP);
-                        }
-
-                        req->l_policy_data.l_flock.blocking_pid =
-                                lock->l_policy_data.l_flock.pid;
-                        req->l_policy_data.l_flock.blocking_export =
-                                (long)(void *)lock->l_export;
-
-                        LASSERT(list_empty(&req->l_flock_waitq));
-                        list_add_tail(&req->l_flock_waitq, &ldlm_flock_waitq);
-
-                        ldlm_resource_add_lock(res, &res->lr_waiting, req);
-                        *flags |= LDLM_FL_BLOCK_GRANTED;
-                        RETURN(LDLM_ITER_STOP);
-                }
-        }
-
-        if (*flags & LDLM_FL_TEST_LOCK) {
-                ldlm_flock_destroy(req, mode, *flags);
-                req->l_req_mode = LCK_NL;
-                *flags |= LDLM_FL_LOCK_CHANGED;
-                RETURN(LDLM_ITER_STOP);
-        }
-
-        /* In case we had slept on this lock request take it off of the
-         * deadlock detection waitq. */
-        list_del_init(&req->l_flock_waitq);
-
-        /* Scan the locks owned by this process that overlap this request.
-         * We may have to merge or split existing locks. */
-
-        if (!ownlocks)
-                ownlocks = &res->lr_granted;
-
-        list_for_remaining_safe(ownlocks, tmp, &res->lr_granted) {
-                lock = list_entry(ownlocks, struct ldlm_lock, l_res_link);
-
-                if (!ldlm_same_flock_owner(lock, new))
-                        break;
-
-                if (lock->l_granted_mode == mode) {
-                        /* If the modes are the same then we need to process
-                         * locks that overlap OR adjoin the new lock. The extra
-                         * logic condition is necessary to deal with arithmetic
-                         * overflow and underflow. */
-                        if ((new->l_policy_data.l_flock.start >
-                             (lock->l_policy_data.l_flock.end + 1))
-                            && (lock->l_policy_data.l_flock.end !=
-                                OBD_OBJECT_EOF))
-                                continue;
-
-                        if ((new->l_policy_data.l_flock.end <
-                             (lock->l_policy_data.l_flock.start - 1))
-                            && (lock->l_policy_data.l_flock.start != 0))
-                                break;
-
-                        if (new->l_policy_data.l_flock.start <
-                            lock->l_policy_data.l_flock.start) {
-                                lock->l_policy_data.l_flock.start =
-                                        new->l_policy_data.l_flock.start;
-                        } else {
-                                new->l_policy_data.l_flock.start =
-                                        lock->l_policy_data.l_flock.start;
-                        }
-
-                        if (new->l_policy_data.l_flock.end >
-                            lock->l_policy_data.l_flock.end) {
-                                lock->l_policy_data.l_flock.end =
-                                        new->l_policy_data.l_flock.end;
-                        } else {
-                                new->l_policy_data.l_flock.end =
-                                        lock->l_policy_data.l_flock.end;
-                        }
-
-                        if (added) {
-                                ldlm_flock_destroy(lock, mode, *flags);
-                        } else {
-                                new = lock;
-                                added = 1;
-                        }
-                        continue;
-                }
-
-                if (new->l_policy_data.l_flock.start >
-                    lock->l_policy_data.l_flock.end)
-                        continue;
-
-                if (new->l_policy_data.l_flock.end <
-                    lock->l_policy_data.l_flock.start)
-                        break;
-
-                ++overlaps;
-
-                if (new->l_policy_data.l_flock.start <=
-                    lock->l_policy_data.l_flock.start) {
-                        if (new->l_policy_data.l_flock.end <
-                            lock->l_policy_data.l_flock.end) {
-                                lock->l_policy_data.l_flock.start =
-                                        new->l_policy_data.l_flock.end + 1;
-                                break;
-                        }
-                        ldlm_flock_destroy(lock, lock->l_req_mode, *flags);
-                        continue;
-                }
-                if (new->l_policy_data.l_flock.end >=
-                    lock->l_policy_data.l_flock.end) {
-                        lock->l_policy_data.l_flock.end =
-                                new->l_policy_data.l_flock.start - 1;
-                        continue;
-                }
-
-                /* split the existing lock into two locks */
-
-                /* if this is an F_UNLCK operation then we could avoid
-                 * allocating a new lock and use the req lock passed in
-                 * with the request but this would complicate the reply
-                 * processing since updates to req get reflected in the
-                 * reply. The client side replays the lock request so
-                 * it must see the original lock data in the reply. */
-
-                /* XXX - if ldlm_lock_new() can sleep we should
-                 * release the ns_lock, allocate the new lock,
-                 * and restart processing this lock. */
-                if (!new2) {
-                        unlock_res_and_lock(req);
-                         new2 = ldlm_lock_create(ns, res->lr_name, LDLM_FLOCK,
-                                        lock->l_granted_mode, NULL, NULL, NULL,
-                                        NULL, 0);
-                        lock_res_and_lock(req);
-                        if (!new2) {
-                                ldlm_flock_destroy(req, lock->l_granted_mode, *flags);
-                                *err = -ENOLCK;
-                                RETURN(LDLM_ITER_STOP);
-                        }
-                        goto reprocess;
-                }
-
-                splitted = 1;
-
-                new2->l_granted_mode = lock->l_granted_mode;
-                new2->l_policy_data.l_flock.pid =
-                        new->l_policy_data.l_flock.pid;
-                new2->l_policy_data.l_flock.start =
-                        lock->l_policy_data.l_flock.start;
-                new2->l_policy_data.l_flock.end =
-                        new->l_policy_data.l_flock.start - 1;
-                lock->l_policy_data.l_flock.start =
-                        new->l_policy_data.l_flock.end + 1;
-                new2->l_conn_export = lock->l_conn_export;
-                if (lock->l_export != NULL) {
-                        new2->l_export = class_export_get(lock->l_export);
-                        spin_lock(&new2->l_export->exp_ldlm_data.led_lock);
-                        list_add(&new2->l_export_chain,
-                                 &new2->l_export->exp_ldlm_data.led_held_locks);
-                        spin_unlock(&new2->l_export->exp_ldlm_data.led_lock);
-                }
-                if (*flags == LDLM_FL_WAIT_NOREPROC) {
-                        ldlm_lock_addref_internal_nolock(new2, lock->l_granted_mode);
-                }
-
-                /* insert new2 at lock */
-                ldlm_resource_add_lock(res, ownlocks, new2);
-                LDLM_LOCK_PUT(new2);
-                break;
-        }
-
-        /* if new2 is created but never used, destroy it*/
-        if (splitted == 0 && new2 != NULL)
-                ldlm_lock_destroy_nolock(new2);
-
-        /* At this point we're granting the lock request. */
-        req->l_granted_mode = req->l_req_mode;
-
-        /* Add req to the granted queue before calling ldlm_reprocess_all(). */
-        if (!added) {
-                list_del_init(&req->l_res_link);
-                /* insert new lock before ownlocks in list. */
-                ldlm_resource_add_lock(res, ownlocks, req);
-        }
-
-        if (*flags != LDLM_FL_WAIT_NOREPROC) {
-                if (first_enq) {
-                        /* If this is an unlock, reprocess the waitq and
-                         * send completions ASTs for locks that can now be 
-                         * granted. The only problem with doing this
-                         * reprocessing here is that the completion ASTs for
-                         * newly granted locks will be sent before the unlock
-                         * completion is sent. It shouldn't be an issue. Also
-                         * note that ldlm_process_flock_lock() will recurse,
-                         * but only once because first_enq will be false from
-                         * ldlm_reprocess_queue. */
-                        if ((mode == LCK_NL) && overlaps) {
-                                struct list_head rpc_list
-                                                    = CFS_LIST_HEAD_INIT(rpc_list);
-                                int rc;
-restart:
-                                ldlm_reprocess_queue(res, &res->lr_waiting,
-                                                     &rpc_list);
-
-                                unlock_res_and_lock(req);
-                                rc = ldlm_run_cp_ast_work(&rpc_list);
-                                lock_res_and_lock(req);
-                                if (rc == -ERESTART)
-                                        GOTO(restart, -ERESTART);
-                       }
-                } else {
-                        LASSERT(req->l_completion_ast);
-                        ldlm_add_ast_work_item(req, NULL, work_list);
-                }
-        }
-
-        /* In case we're reprocessing the requested lock we can't destroy
-         * it until after calling ldlm_ast_work_item() above so that lawi()
-         * can bump the reference count on req. Otherwise req could be freed
-         * before the completion AST can be sent.  */
-        if (added)
-                ldlm_flock_destroy(req, mode, *flags);
-
-        ldlm_resource_dump(D_OTHER, res);
-        RETURN(LDLM_ITER_CONTINUE);
-}
-
-struct ldlm_flock_wait_data {
-        struct ldlm_lock *fwd_lock;
-        int               fwd_generation;
-};
-
-static void
-ldlm_flock_interrupted_wait(void *data)
-{
-        struct ldlm_lock *lock;
-        struct lustre_handle lockh;
-        int rc;
-        ENTRY;
-
-        lock = ((struct ldlm_flock_wait_data *)data)->fwd_lock;
-
-        /* take lock off the deadlock detection waitq. */
-        list_del_init(&lock->l_flock_waitq);
-
-        /* client side - set flag to prevent lock from being put on lru list */
-        lock->l_flags |= LDLM_FL_CBPENDING;
-
-        ldlm_lock_decref_internal(lock, lock->l_req_mode);
-        ldlm_lock2handle(lock, &lockh);
-        rc = ldlm_cli_cancel(&lockh);
-        if (rc != ELDLM_OK)
-                CERROR("ldlm_cli_cancel: %d\n", rc);
-
-        EXIT;
-}
-
-int
-ldlm_flock_completion_ast(struct ldlm_lock *lock, int flags, void *data)
-{
-        struct ldlm_namespace *ns;
-        cfs_flock_t *getlk = lock->l_ast_data;
-        struct ldlm_flock_wait_data fwd;
-        struct obd_device *obd;
-        struct obd_import *imp = NULL;
-        ldlm_error_t err;
-        int rc = 0;
-        struct l_wait_info lwi;
-        ENTRY;
-
-        CDEBUG(D_DLMTRACE, "flags: 0x%x data: %p getlk: %p\n",
-               flags, data, getlk);
-
-        LASSERT(flags != LDLM_FL_WAIT_NOREPROC);
-
-        if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED |
-                       LDLM_FL_BLOCK_CONV)))
-                goto  granted;
-
-        LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, "
-                   "sleeping");
-
-        fwd.fwd_lock = lock;
-        obd = class_exp2obd(lock->l_conn_export);
-
-        /* if this is a local lock, then there is no import */
-        if (obd != NULL)
-                imp = obd->u.cli.cl_import;
-
-        if (imp != NULL) {
-                spin_lock(&imp->imp_lock);
-                fwd.fwd_generation = imp->imp_generation;
-                spin_unlock(&imp->imp_lock);
-        }
-
-        lwi = LWI_TIMEOUT_INTR(0, NULL, ldlm_flock_interrupted_wait, &fwd);
-
-        /* Go to sleep until the lock is granted. */
-        rc = l_wait_event(lock->l_waitq,
-                          ((lock->l_req_mode == lock->l_granted_mode) ||
-                           lock->l_destroyed), &lwi);
-
-        LDLM_DEBUG(lock, "client-side enqueue waking up: rc = %d", rc);
-        RETURN(rc);
- 
-granted:
-
-        LDLM_DEBUG(lock, "client-side enqueue granted");
-        ns = lock->l_resource->lr_namespace;
-        lock_res_and_lock(lock);
-
-        /* take lock off the deadlock detection waitq. */
-        list_del_init(&lock->l_flock_waitq);
-
-        /* ldlm_lock_enqueue() has already placed lock on the granted list. */
-        list_del_init(&lock->l_res_link);
-
-        if (flags & LDLM_FL_TEST_LOCK) {
-                /* fcntl(F_GETLK) request */
-                /* The old mode was saved in getlk->fl_type so that if the mode
-                 * in the lock changes we can decref the approprate refcount. */
-                ldlm_flock_destroy(lock, cfs_flock_type(getlk), LDLM_FL_WAIT_NOREPROC);
-                switch (lock->l_granted_mode) {
-                case LCK_PR:
-                        cfs_flock_set_type(getlk, F_RDLCK);
-                        break;
-                case LCK_PW:
-                        cfs_flock_set_type(getlk, F_WRLCK);
-                        break;
-                default:
-                        cfs_flock_set_type(getlk, F_UNLCK);
-                }
-                cfs_flock_set_pid(getlk, (pid_t)lock->l_policy_data.l_flock.pid);
-                cfs_flock_set_start(getlk, (loff_t)lock->l_policy_data.l_flock.start);
-                cfs_flock_set_end(getlk, (loff_t)lock->l_policy_data.l_flock.end);
-        } else {
-                int noreproc = LDLM_FL_WAIT_NOREPROC;
-
-                /* We need to reprocess the lock to do merges or splits
-                 * with existing locks owned by this process. */
-                ldlm_process_flock_lock(lock, &noreproc, 1, &err, NULL);
-                if (flags == 0)
-                        cfs_waitq_signal(&lock->l_waitq);
-        }
-        unlock_res_and_lock(lock);
-        RETURN(0);
-}
-EXPORT_SYMBOL(ldlm_flock_completion_ast);
-
-int ldlm_flock_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
-                            void *data, int flag)
-{
-        struct ldlm_namespace *ns;
-        ENTRY;
-
-        LASSERT(lock);
-        LASSERT(flag == LDLM_CB_CANCELING);
-
-        ns = lock->l_resource->lr_namespace;
-
-        /* take lock off the deadlock detection waitq. */
-        lock_res_and_lock(lock);
-        list_del_init(&lock->l_flock_waitq);
-        unlock_res_and_lock(lock);
-        RETURN(0);
-}
diff --git a/lustre/ldlm/ldlm_inodebits.c b/lustre/ldlm/ldlm_inodebits.c
deleted file mode 100644
index c378c28ff5b295744c87f2063869425d611e5dcb..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_inodebits.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003, 2004 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <lustre_dlm.h>
-#include <obd_support.h>
-#include <lustre_lib.h>
-
-#include "ldlm_internal.h"
-
-/* Determine if the lock is compatible with all locks on the queue. */
-static int
-ldlm_inodebits_compat_queue(struct list_head *queue, struct ldlm_lock *req,
-                            struct list_head *work_list)
-{
-        struct list_head *tmp, *tmp_tail;
-        struct ldlm_lock *lock;
-        ldlm_mode_t req_mode = req->l_req_mode;
-        __u64 req_bits = req->l_policy_data.l_inodebits.bits;
-        int compat = 1;
-        ENTRY;
-
-        LASSERT(req_bits); /* There is no sense in lock with no bits set,
-                              I think. Also such a lock would be compatible
-                               with any other bit lock */
-        list_for_each(tmp, queue) {
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (req == lock)
-                        RETURN(compat);
-
-                /* locks are compatible, bits don't matter */
-                if (lockmode_compat(lock->l_req_mode, req_mode)) {
-                        /* jump to next mode group */
-                        if (LDLM_SL_HEAD(&lock->l_sl_mode))
-                                tmp = &list_entry(lock->l_sl_mode.next, 
-                                                  struct ldlm_lock,
-                                                  l_sl_mode)->l_res_link;
-                        continue;
-                }
-
-                tmp_tail = tmp;
-                if (LDLM_SL_HEAD(&lock->l_sl_mode))
-                        tmp_tail = &list_entry(lock->l_sl_mode.next,
-                                               struct ldlm_lock,
-                                               l_sl_mode)->l_res_link;
-                for (;;) {
-                        /* locks with bits overlapped are conflicting locks */
-                        if (lock->l_policy_data.l_inodebits.bits & req_bits) {
-                                /* conflicting policy */
-                                if (!work_list)
-                                        RETURN(0);
-                               
-                                compat = 0;
-                                if (lock->l_blocking_ast)
-                                        ldlm_add_ast_work_item(lock, req, 
-                                                               work_list);
-                                /* add all members of the policy group */
-                                if (LDLM_SL_HEAD(&lock->l_sl_policy)) {
-                                        do {
-                                                tmp = lock->l_res_link.next;
-                                                lock = list_entry(tmp,
-                                                            struct ldlm_lock,
-                                                            l_res_link);
-                                                if (lock->l_blocking_ast)
-                                                        ldlm_add_ast_work_item(
-                                                                     lock,
-                                                                     req,
-                                                                     work_list);
-                                        } while (!LDLM_SL_TAIL(&lock->l_sl_policy));
-                                }
-                        } else if (LDLM_SL_HEAD(&lock->l_sl_policy)) {
-                                /* jump to next policy group */
-                                tmp = &list_entry(lock->l_sl_policy.next,
-                                                  struct ldlm_lock,
-                                                  l_sl_policy)->l_res_link;
-                        }
-                        if (tmp == tmp_tail)
-                                break;
-                        else
-                                tmp = tmp->next;
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                }       /* for locks in a mode group */
-        }       /* for each lock in the queue */
-
-        RETURN(compat);
-}
-
-/* If first_enq is 0 (ie, called from ldlm_reprocess_queue):
-  *   - blocking ASTs have already been sent
-  *   - must call this function with the ns lock held
-  *
-  * If first_enq is 1 (ie, called from ldlm_lock_enqueue):
-  *   - blocking ASTs have not been sent
-  *   - must call this function with the ns lock held once */
-int ldlm_process_inodebits_lock(struct ldlm_lock *lock, int *flags,
-                                int first_enq, ldlm_error_t *err,
-                                struct list_head *work_list)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        struct list_head rpc_list = CFS_LIST_HEAD_INIT(rpc_list);
-        int rc;
-        ENTRY;
-
-        LASSERT(list_empty(&res->lr_converting));
-        check_res_locked(res);
-
-        if (!first_enq) {
-                LASSERT(work_list != NULL);
-                rc = ldlm_inodebits_compat_queue(&res->lr_granted, lock, NULL);
-                if (!rc)
-                        RETURN(LDLM_ITER_STOP);
-                rc = ldlm_inodebits_compat_queue(&res->lr_waiting, lock, NULL);
-                if (!rc)
-                        RETURN(LDLM_ITER_STOP);
-
-                ldlm_resource_unlink_lock(lock);
-                ldlm_grant_lock(lock, work_list);
-                RETURN(LDLM_ITER_CONTINUE);
-        }
-
- restart:
-        rc = ldlm_inodebits_compat_queue(&res->lr_granted, lock, &rpc_list);
-        rc += ldlm_inodebits_compat_queue(&res->lr_waiting, lock, &rpc_list);
-
-        if (rc != 2) {
-                /* If either of the compat_queue()s returned 0, then we
-                 * have ASTs to send and must go onto the waiting list.
-                 *
-                 * bug 2322: we used to unlink and re-add here, which was a
-                 * terrible folly -- if we goto restart, we could get
-                 * re-ordered!  Causes deadlock, because ASTs aren't sent! */
-                if (list_empty(&lock->l_res_link))
-                        ldlm_resource_add_lock(res, &res->lr_waiting, lock);
-                unlock_res(res);
-                rc = ldlm_run_bl_ast_work(&rpc_list);
-                lock_res(res);
-                if (rc == -ERESTART)
-                        GOTO(restart, -ERESTART);
-                *flags |= LDLM_FL_BLOCK_GRANTED;
-        } else {
-                ldlm_resource_unlink_lock(lock);
-                ldlm_grant_lock(lock, NULL);
-        }
-        RETURN(0);
-}
diff --git a/lustre/ldlm/ldlm_internal.h b/lustre/ldlm/ldlm_internal.h
deleted file mode 100644
index 1e8cf31a48b689637dfbdb2a9878fa1768dfcf63..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_internal.h
+++ /dev/null
@@ -1,204 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#define MAX_STRING_SIZE 128
-
-extern atomic_t ldlm_srv_namespace_nr;
-extern atomic_t ldlm_cli_namespace_nr;
-extern struct semaphore ldlm_srv_namespace_lock;
-extern struct list_head ldlm_srv_namespace_list;
-extern struct semaphore ldlm_cli_namespace_lock;
-extern struct list_head ldlm_cli_namespace_list;
-
-static inline atomic_t *ldlm_namespace_nr(ldlm_side_t client)
-{
-        return client == LDLM_NAMESPACE_SERVER ? 
-                &ldlm_srv_namespace_nr : &ldlm_cli_namespace_nr;
-}
-
-static inline struct list_head *ldlm_namespace_list(ldlm_side_t client)
-{
-        return client == LDLM_NAMESPACE_SERVER ? 
-                &ldlm_srv_namespace_list : &ldlm_cli_namespace_list;
-}
-
-static inline struct semaphore *ldlm_namespace_lock(ldlm_side_t client)
-{
-        return client == LDLM_NAMESPACE_SERVER ? 
-                &ldlm_srv_namespace_lock : &ldlm_cli_namespace_lock;
-}
-
-/* ldlm_request.c */
-typedef enum {
-        LDLM_ASYNC,
-        LDLM_SYNC,
-} ldlm_sync_t;
-
-/* Cancel lru flag, it indicates we cancel aged locks. */
-enum {
-        LDLM_CANCEL_AGED   = 1 << 0, /* Cancel aged locks (non lru resize). */
-        LDLM_CANCEL_PASSED = 1 << 1, /* Cancel passed number of locks. */
-        LDLM_CANCEL_SHRINK = 1 << 2, /* Cancel locks from shrinker. */
-        LDLM_CANCEL_LRUR   = 1 << 3  /* Cancel locks from lru resize. */
-};
-
-int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync, 
-                    int flags);
-int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels,
-                          int count, int max, int cancel_flags, int flags);
-int ldlm_cancel_lru_estimate(struct ldlm_namespace *ns, int count, int max, 
-                             int flags);
-extern int ldlm_enqueue_min;
-int ldlm_get_enq_timeout(struct ldlm_lock *lock);
-
-/* ldlm_resource.c */
-int ldlm_resource_putref_locked(struct ldlm_resource *res);
-void ldlm_resource_insert_lock_after(struct ldlm_lock *original,
-                                     struct ldlm_lock *new);
-int ldlm_namespace_free_prior(struct ldlm_namespace *ns);
-int ldlm_namespace_free_post(struct ldlm_namespace *ns, int force);
-
-/* ldlm_lock.c */
-
-/* Number of blocking/completion callbacks that will be sent in
- * parallel (see bug 11301). */
-#define PARALLEL_AST_LIMIT      200
-
-struct ldlm_cb_set_arg {
-        struct ptlrpc_request_set *set;
-        atomic_t restart;
-        __u32 type; /* LDLM_BL_CALLBACK or LDLM_CP_CALLBACK */
-};
-
-void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list);
-struct ldlm_lock *
-ldlm_lock_create(struct ldlm_namespace *ns, struct ldlm_res_id,
-                 ldlm_type_t type, ldlm_mode_t, ldlm_blocking_callback,
-                 ldlm_completion_callback, ldlm_glimpse_callback, void *data,
-                 __u32 lvb_len);
-ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *, struct ldlm_lock **,
-                               void *cookie, int *flags);
-void ldlm_lock_addref_internal(struct ldlm_lock *, __u32 mode);
-void ldlm_lock_addref_internal_nolock(struct ldlm_lock *, __u32 mode);
-void ldlm_lock_decref_internal(struct ldlm_lock *, __u32 mode);
-void ldlm_lock_decref_internal_nolock(struct ldlm_lock *, __u32 mode);
-void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new,
-                                struct list_head *work_list);
-int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue,
-                         struct list_head *work_list);
-int ldlm_run_bl_ast_work(struct list_head *rpc_list);
-int ldlm_run_cp_ast_work(struct list_head *rpc_list);
-int ldlm_lock_remove_from_lru(struct ldlm_lock *lock);
-int ldlm_lock_remove_from_lru_nolock(struct ldlm_lock *lock);
-void ldlm_lock_add_to_lru_nolock(struct ldlm_lock *lock);
-void ldlm_lock_add_to_lru(struct ldlm_lock *lock);
-void ldlm_lock_touch_in_lru(struct ldlm_lock *lock);
-void ldlm_lock_destroy_nolock(struct ldlm_lock *lock);
-
-/* ldlm_lockd.c */
-int ldlm_bl_to_thread_lock(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
-                           struct ldlm_lock *lock);
-int ldlm_bl_to_thread_list(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
-                           struct list_head *cancels, int count);
-
-void ldlm_handle_bl_callback(struct ldlm_namespace *ns,
-                             struct ldlm_lock_desc *ld, struct ldlm_lock *lock);
-
-/* ldlm_plain.c */
-int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq,
-                            ldlm_error_t *err, struct list_head *work_list);
-
-/* ldlm_extent.c */
-int ldlm_process_extent_lock(struct ldlm_lock *lock, int *flags, int first_enq,
-                             ldlm_error_t *err, struct list_head *work_list);
-void ldlm_extent_add_lock(struct ldlm_resource *res, struct ldlm_lock *lock);
-void ldlm_extent_unlink_lock(struct ldlm_lock *lock);
-
-/* ldlm_flock.c */
-int ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq,
-                            ldlm_error_t *err, struct list_head *work_list);
-
-/* ldlm_inodebits.c */
-int ldlm_process_inodebits_lock(struct ldlm_lock *lock, int *flags,
-                                int first_enq, ldlm_error_t *err,
-                                struct list_head *work_list);
-
-/* l_lock.c */
-void l_check_ns_lock(struct ldlm_namespace *ns);
-void l_check_no_ns_lock(struct ldlm_namespace *ns);
-
-extern cfs_proc_dir_entry_t *ldlm_svc_proc_dir;
-extern cfs_proc_dir_entry_t *ldlm_type_proc_dir;
-
-struct ldlm_state {
-        struct ptlrpc_service *ldlm_cb_service;
-        struct ptlrpc_service *ldlm_cancel_service;
-        struct ptlrpc_client *ldlm_client;
-        struct ptlrpc_connection *ldlm_server_conn;
-        struct ldlm_bl_pool *ldlm_bl_pool;
-};
-
-/* interval tree, for LDLM_EXTENT. */
-extern cfs_mem_cache_t *ldlm_interval_slab; /* slab cache for ldlm_interval */
-extern void ldlm_interval_attach(struct ldlm_interval *n, struct ldlm_lock *l);
-extern struct ldlm_interval *ldlm_interval_detach(struct ldlm_lock *l);
-extern struct ldlm_interval *ldlm_interval_alloc(struct ldlm_lock *lock);
-extern void ldlm_interval_free(struct ldlm_interval *node);
-/* this function must be called with res lock held */
-static inline struct ldlm_extent *
-ldlm_interval_extent(struct ldlm_interval *node)
-{
-        struct ldlm_lock *lock;
-        LASSERT(!list_empty(&node->li_group));
-
-        lock = list_entry(node->li_group.next, struct ldlm_lock, l_sl_policy);
-        return &lock->l_policy_data.l_extent;
-}
-
-int ldlm_init(void);
-void ldlm_exit(void);
-
-enum ldlm_policy_res {
-        LDLM_POLICY_CANCEL_LOCK,
-        LDLM_POLICY_KEEP_LOCK
-};
-
-typedef enum ldlm_policy_res ldlm_policy_res_t;
-
-#define LDLM_POOL_PROC_READER(var, type)                                    \
-        static int lprocfs_rd_##var(char *page, char **start, off_t off,    \
-                                    int count, int *eof, void *data)        \
-        {                                                                   \
-                struct ldlm_pool *pl = data;                                \
-                type tmp;                                                   \
-                                                                            \
-                spin_lock(&pl->pl_lock);                                    \
-                tmp = pl->pl_##var;                                         \
-                spin_unlock(&pl->pl_lock);                                  \
-                                                                            \
-                return lprocfs_rd_uint(page, start, off, count, eof, &tmp); \
-        }                                                                   \
-        struct __##var##__dummy_read {;} /* semicolon catcher */
-
-#define LDLM_POOL_PROC_WRITER(var, type)                                    \
-        int lprocfs_wr_##var(struct file *file, const char *buffer,         \
-                             unsigned long count, void *data)               \
-        {                                                                   \
-                struct ldlm_pool *pl = data;                                \
-                type tmp;                                                   \
-                int rc;                                                     \
-                                                                            \
-                rc = lprocfs_wr_uint(file, buffer, count, &tmp);            \
-                if (rc) {                                                   \
-                        CERROR("Can't parse user input, rc = %d\n", rc);    \
-                        return rc;                                          \
-                }                                                           \
-                                                                            \
-                spin_lock(&pl->pl_lock);                                    \
-                pl->pl_##var = tmp;                                         \
-                spin_unlock(&pl->pl_lock);                                  \
-                                                                            \
-                return rc;                                                  \
-        }                                                                   \
-        struct __##var##__dummy_write {;} /* semicolon catcher */
diff --git a/lustre/ldlm/ldlm_lib.c b/lustre/ldlm/ldlm_lib.c
deleted file mode 100644
index bdb1ac731c7e9d832e962ea11454d5b33feef528..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_lib.c
+++ /dev/null
@@ -1,1749 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LDLM
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else
-# include <liblustre.h>
-#endif
-#include <obd.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_net.h>
-#include "ldlm_internal.h"
-
-/* @priority: if non-zero, move the selected to the list head
- * @create: if zero, only search in existed connections
- */
-static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,
-                           int priority, int create)
-{
-        struct ptlrpc_connection *ptlrpc_conn;
-        struct obd_import_conn *imp_conn = NULL, *item;
-        int rc = 0;
-        ENTRY;
-
-        if (!create && !priority) {
-                CDEBUG(D_HA, "Nothing to do\n");
-                RETURN(-EINVAL);
-        }
-
-        ptlrpc_conn = ptlrpc_uuid_to_connection(uuid);
-        if (!ptlrpc_conn) {
-                CDEBUG(D_HA, "can't find connection %s\n", uuid->uuid);
-                RETURN (-ENOENT);
-        }
-
-        if (create) {
-                OBD_ALLOC(imp_conn, sizeof(*imp_conn));
-                if (!imp_conn) {
-                        GOTO(out_put, rc = -ENOMEM);
-                }
-        }
-
-        spin_lock(&imp->imp_lock);
-        list_for_each_entry(item, &imp->imp_conn_list, oic_item) {
-                if (obd_uuid_equals(uuid, &item->oic_uuid)) {
-                        if (priority) {
-                                list_del(&item->oic_item);
-                                list_add(&item->oic_item, &imp->imp_conn_list);
-                                item->oic_last_attempt = 0;
-                        }
-                        CDEBUG(D_HA, "imp %p@%s: found existing conn %s%s\n",
-                               imp, imp->imp_obd->obd_name, uuid->uuid,
-                               (priority ? ", moved to head" : ""));
-                        spin_unlock(&imp->imp_lock);
-                        GOTO(out_free, rc = 0);
-                }
-        }
-        /* not found */
-        if (create) {
-                imp_conn->oic_conn = ptlrpc_conn;
-                imp_conn->oic_uuid = *uuid;
-                item->oic_last_attempt = 0;
-                if (priority)
-                        list_add(&imp_conn->oic_item, &imp->imp_conn_list);
-                else
-                        list_add_tail(&imp_conn->oic_item, &imp->imp_conn_list);
-                CDEBUG(D_HA, "imp %p@%s: add connection %s at %s\n",
-                       imp, imp->imp_obd->obd_name, uuid->uuid,
-                       (priority ? "head" : "tail"));
-        } else {
-                spin_unlock(&imp->imp_lock);
-                GOTO(out_free, rc = -ENOENT);
-
-        }
-
-        spin_unlock(&imp->imp_lock);
-        RETURN(0);
-out_free:
-        if (imp_conn)
-                OBD_FREE(imp_conn, sizeof(*imp_conn));
-out_put:
-        ptlrpc_put_connection(ptlrpc_conn);
-        RETURN(rc);
-}
-
-int import_set_conn_priority(struct obd_import *imp, struct obd_uuid *uuid)
-{
-        return import_set_conn(imp, uuid, 1, 0);
-}
-
-int client_import_add_conn(struct obd_import *imp, struct obd_uuid *uuid,
-                           int priority)
-{
-        return import_set_conn(imp, uuid, priority, 1);
-}
-
-int client_import_del_conn(struct obd_import *imp, struct obd_uuid *uuid)
-{
-        struct obd_import_conn *imp_conn;
-        struct obd_export *dlmexp;
-        int rc = -ENOENT;
-        ENTRY;
-
-        spin_lock(&imp->imp_lock);
-        if (list_empty(&imp->imp_conn_list)) {
-                LASSERT(!imp->imp_connection);
-                GOTO(out, rc);
-        }
-
-        list_for_each_entry(imp_conn, &imp->imp_conn_list, oic_item) {
-                if (!obd_uuid_equals(uuid, &imp_conn->oic_uuid))
-                        continue;
-                LASSERT(imp_conn->oic_conn);
-
-                /* is current conn? */
-                if (imp_conn == imp->imp_conn_current) {
-                        LASSERT(imp_conn->oic_conn == imp->imp_connection);
-
-                        if (imp->imp_state != LUSTRE_IMP_CLOSED &&
-                            imp->imp_state != LUSTRE_IMP_DISCON) {
-                                CERROR("can't remove current connection\n");
-                                GOTO(out, rc = -EBUSY);
-                        }
-
-                        ptlrpc_put_connection(imp->imp_connection);
-                        imp->imp_connection = NULL;
-
-                        dlmexp = class_conn2export(&imp->imp_dlm_handle);
-                        if (dlmexp && dlmexp->exp_connection) {
-                                LASSERT(dlmexp->exp_connection ==
-                                        imp_conn->oic_conn);
-                                ptlrpc_put_connection(dlmexp->exp_connection);
-                                dlmexp->exp_connection = NULL;
-                        }
-                }
-
-                list_del(&imp_conn->oic_item);
-                ptlrpc_put_connection(imp_conn->oic_conn);
-                OBD_FREE(imp_conn, sizeof(*imp_conn));
-                CDEBUG(D_HA, "imp %p@%s: remove connection %s\n",
-                       imp, imp->imp_obd->obd_name, uuid->uuid);
-                rc = 0;
-                break;
-        }
-out:
-        spin_unlock(&imp->imp_lock);
-        if (rc == -ENOENT)
-                CERROR("connection %s not found\n", uuid->uuid);
-        RETURN(rc);
-}
-
-/* configure an RPC client OBD device
- *
- * lcfg parameters:
- * 1 - client UUID
- * 2 - server UUID
- * 3 - inactive-on-startup
- */
-int client_obd_setup(struct obd_device *obddev, obd_count len, void *buf)
-{
-        struct lustre_cfg* lcfg = buf;
-        struct client_obd *cli = &obddev->u.cli;
-        struct obd_import *imp;
-        struct obd_uuid server_uuid;
-        int rq_portal, rp_portal, connect_op;
-        char *name = obddev->obd_type->typ_name;
-        int rc;
-        ENTRY;
-
-        /* In a more perfect world, we would hang a ptlrpc_client off of
-         * obd_type and just use the values from there. */
-        if (!strcmp(name, LUSTRE_OSC_NAME)) {
-#ifdef __KERNEL__
-                /* Can be removed in Lustre 1.8, for compatibility only */
-                rq_portal = OST_IO_PORTAL;
-#else
-                rq_portal = OST_REQUEST_PORTAL;
-#endif
-                rp_portal = OSC_REPLY_PORTAL;
-                connect_op = OST_CONNECT;
-        } else if (!strcmp(name, LUSTRE_MDC_NAME)) {
-                rq_portal = MDS_REQUEST_PORTAL;
-                rp_portal = MDC_REPLY_PORTAL;
-                connect_op = MDS_CONNECT;
-        } else if (!strcmp(name, LUSTRE_MGC_NAME)) {
-                rq_portal = MGS_REQUEST_PORTAL;
-                rp_portal = MGC_REPLY_PORTAL;
-                connect_op = MGS_CONNECT;
-        } else {
-                CERROR("unknown client OBD type \"%s\", can't setup\n",
-                       name);
-                RETURN(-EINVAL);
-        }
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
-                CERROR("requires a TARGET UUID\n");
-                RETURN(-EINVAL);
-        }
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 1) > 37) {
-                CERROR("client UUID must be less than 38 characters\n");
-                RETURN(-EINVAL);
-        }
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 2) < 1) {
-                CERROR("setup requires a SERVER UUID\n");
-                RETURN(-EINVAL);
-        }
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 2) > 37) {
-                CERROR("target UUID must be less than 38 characters\n");
-                RETURN(-EINVAL);
-        }
-
-        sema_init(&cli->cl_sem, 1);
-        sema_init(&cli->cl_mgc_sem, 1);
-        cli->cl_conn_count = 0;
-        memcpy(server_uuid.uuid, lustre_cfg_buf(lcfg, 2),
-               min_t(unsigned int, LUSTRE_CFG_BUFLEN(lcfg, 2),
-                     sizeof(server_uuid)));
-
-        cli->cl_dirty = 0;
-        cli->cl_avail_grant = 0;
-        /* FIXME: should limit this for the sum of all cl_dirty_max */
-        cli->cl_dirty_max = OSC_MAX_DIRTY_DEFAULT * 1024 * 1024;
-        if (cli->cl_dirty_max >> CFS_PAGE_SHIFT > num_physpages / 8)
-                cli->cl_dirty_max = num_physpages << (CFS_PAGE_SHIFT - 3);
-        CFS_INIT_LIST_HEAD(&cli->cl_cache_waiters);
-        CFS_INIT_LIST_HEAD(&cli->cl_loi_ready_list);
-        CFS_INIT_LIST_HEAD(&cli->cl_loi_write_list);
-        CFS_INIT_LIST_HEAD(&cli->cl_loi_read_list);
-        client_obd_list_lock_init(&cli->cl_loi_list_lock);
-        cli->cl_r_in_flight = 0;
-        cli->cl_w_in_flight = 0;
-        spin_lock_init(&cli->cl_read_rpc_hist.oh_lock);
-        spin_lock_init(&cli->cl_write_rpc_hist.oh_lock);
-        spin_lock_init(&cli->cl_read_page_hist.oh_lock);
-        spin_lock_init(&cli->cl_write_page_hist.oh_lock);
-        spin_lock_init(&cli->cl_read_offset_hist.oh_lock);
-        spin_lock_init(&cli->cl_write_offset_hist.oh_lock);
-        cfs_waitq_init(&cli->cl_destroy_waitq);
-        atomic_set(&cli->cl_destroy_in_flight, 0);
-#ifdef ENABLE_CHECKSUM
-        /* Turn on checksumming by default. */
-        cli->cl_checksum = 1;
-        /*
-         * The supported checksum types will be worked out at connect time
-         * Set cl_chksum* to CRC32 for now to avoid returning screwed info
-         * through procfs.
-         */
-        cli->cl_cksum_type = cli->cl_supp_cksum_types = OBD_CKSUM_CRC32;
-#endif
-        atomic_set(&cli->cl_resends, OSC_DEFAULT_RESENDS);
-
-        /* This value may be changed at connect time in
-           ptlrpc_connect_interpret. */
-        cli->cl_max_pages_per_rpc = min((int)PTLRPC_MAX_BRW_PAGES,
-                                        (int)(1024 * 1024 >> CFS_PAGE_SHIFT));
-
-        if (!strcmp(name, LUSTRE_MDC_NAME)) {
-                cli->cl_max_rpcs_in_flight = MDC_MAX_RIF_DEFAULT;
-        } else if (num_physpages >> (20 - CFS_PAGE_SHIFT) <= 128 /* MB */) {
-                cli->cl_max_rpcs_in_flight = 2;
-        } else if (num_physpages >> (20 - CFS_PAGE_SHIFT) <= 256 /* MB */) {
-                cli->cl_max_rpcs_in_flight = 3;
-        } else if (num_physpages >> (20 - CFS_PAGE_SHIFT) <= 512 /* MB */) {
-                cli->cl_max_rpcs_in_flight = 4;
-        } else {
-                cli->cl_max_rpcs_in_flight = OSC_MAX_RIF_DEFAULT;
-        }
-        rc = ldlm_get_ref();
-        if (rc) {
-                CERROR("ldlm_get_ref failed: %d\n", rc);
-                GOTO(err, rc);
-        }
-
-        ptlrpc_init_client(rq_portal, rp_portal, name,
-                           &obddev->obd_ldlm_client);
-
-        imp = class_new_import(obddev);
-        if (imp == NULL)
-                GOTO(err_ldlm, rc = -ENOENT);
-        imp->imp_client = &obddev->obd_ldlm_client;
-        imp->imp_connect_op = connect_op;
-        imp->imp_initial_recov = 1;
-        imp->imp_initial_recov_bk = 0;
-        CFS_INIT_LIST_HEAD(&imp->imp_pinger_chain);
-        memcpy(cli->cl_target_uuid.uuid, lustre_cfg_buf(lcfg, 1),
-               LUSTRE_CFG_BUFLEN(lcfg, 1));
-        class_import_put(imp);
-
-        rc = client_import_add_conn(imp, &server_uuid, 1);
-        if (rc) {
-                CERROR("can't add initial connection\n");
-                GOTO(err_import, rc);
-        }
-
-        cli->cl_import = imp;
-        /* cli->cl_max_mds_{easize,cookiesize} updated by mdc_init_ea_size() */
-        cli->cl_max_mds_easize = sizeof(struct lov_mds_md);
-        cli->cl_max_mds_cookiesize = sizeof(struct llog_cookie);
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) {
-                if (!strcmp(lustre_cfg_string(lcfg, 3), "inactive")) {
-                        CDEBUG(D_HA, "marking %s %s->%s as inactive\n",
-                               name, obddev->obd_name,
-                               cli->cl_target_uuid.uuid);
-                        spin_lock(&imp->imp_lock);
-                        imp->imp_invalid = 1;
-                        spin_unlock(&imp->imp_lock);
-                }
-        }
-
-        cli->cl_qchk_stat = CL_NOT_QUOTACHECKED;
-
-        RETURN(rc);
-
-err_import:
-        class_destroy_import(imp);
-err_ldlm:
-        ldlm_put_ref(0);
-err:
-        RETURN(rc);
-
-}
-
-int client_obd_cleanup(struct obd_device *obddev)
-{
-        ENTRY;
-        ldlm_put_ref(obddev->obd_force);
-        RETURN(0);
-}
-
-/* ->o_connect() method for client side (OSC and MDC and MGC) */
-int client_connect_import(struct lustre_handle *dlm_handle,
-                          struct obd_device *obd, struct obd_uuid *cluuid,
-                          struct obd_connect_data *data, void *localdata)
-{
-        struct client_obd *cli = &obd->u.cli;
-        struct obd_import *imp = cli->cl_import;
-        struct obd_export *exp;
-        struct obd_connect_data *ocd;
-        struct ldlm_namespace *to_be_freed = NULL;
-        int rc;
-        ENTRY;
-
-        mutex_down(&cli->cl_sem);
-        rc = class_connect(dlm_handle, obd, cluuid);
-        if (rc)
-                GOTO(out_sem, rc);
-
-        cli->cl_conn_count++;
-        if (cli->cl_conn_count > 1)
-                GOTO(out_sem, rc);
-        exp = class_conn2export(dlm_handle);
-
-        if (obd->obd_namespace != NULL)
-                CERROR("already have namespace!\n");
-        obd->obd_namespace = ldlm_namespace_new(obd->obd_name,
-                                                LDLM_NAMESPACE_CLIENT,
-                                                LDLM_NAMESPACE_GREEDY);
-        if (obd->obd_namespace == NULL)
-                GOTO(out_disco, rc = -ENOMEM);
-
-        imp->imp_dlm_handle = *dlm_handle;
-        rc = ptlrpc_init_import(imp);
-        if (rc != 0)
-                GOTO(out_ldlm, rc);
-
-        ocd = &imp->imp_connect_data;
-        if (data) {
-                *ocd = *data;
-                imp->imp_connect_flags_orig = data->ocd_connect_flags;
-        }
-
-        rc = ptlrpc_connect_import(imp, NULL);
-        if (rc != 0) {
-                LASSERT (imp->imp_state == LUSTRE_IMP_DISCON);
-                GOTO(out_ldlm, rc);
-        }
-        LASSERT(exp->exp_connection);
-
-        if (data) {
-                LASSERT((ocd->ocd_connect_flags & data->ocd_connect_flags) ==
-                        ocd->ocd_connect_flags);
-                data->ocd_connect_flags = ocd->ocd_connect_flags;
-        }
-
-        ptlrpc_pinger_add_import(imp);
-        EXIT;
-
-        if (rc) {
-out_ldlm:
-                ldlm_namespace_free_prior(obd->obd_namespace);
-                to_be_freed = obd->obd_namespace;
-                obd->obd_namespace = NULL;
-out_disco:
-                cli->cl_conn_count--;
-                class_disconnect(exp);
-        } else {
-                class_export_put(exp);
-        }
-out_sem:
-        mutex_up(&cli->cl_sem);
-        if (to_be_freed)
-                ldlm_namespace_free_post(to_be_freed, 0);
-        return rc;
-}
-
-int client_disconnect_export(struct obd_export *exp)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct client_obd *cli;
-        struct obd_import *imp;
-        struct ldlm_namespace *to_be_freed = NULL;
-        int rc = 0, err;
-        ENTRY;
-
-        if (!obd) {
-                CERROR("invalid export for disconnect: exp %p cookie "LPX64"\n",
-                       exp, exp ? exp->exp_handle.h_cookie : -1);
-                RETURN(-EINVAL);
-        }
-
-        cli = &obd->u.cli;
-        imp = cli->cl_import;
-
-        mutex_down(&cli->cl_sem);
-        if (!cli->cl_conn_count) {
-                CERROR("disconnecting disconnected device (%s)\n",
-                       obd->obd_name);
-                GOTO(out_sem, rc = -EINVAL);
-        }
-
-        cli->cl_conn_count--;
-        if (cli->cl_conn_count)
-                GOTO(out_no_disconnect, rc = 0);
-
-        /* Mark import deactivated now, so we don't try to reconnect if any
-         * of the cleanup RPCs fails (e.g. ldlm cancel, etc).  We don't
-         * fully deactivate the import, or that would drop all requests. */
-        spin_lock(&imp->imp_lock);
-        imp->imp_deactive = 1;
-        spin_unlock(&imp->imp_lock);
-
-        /* Some non-replayable imports (MDS's OSCs) are pinged, so just
-         * delete it regardless.  (It's safe to delete an import that was
-         * never added.) */
-        (void)ptlrpc_pinger_del_import(imp);
-
-        if (obd->obd_namespace != NULL) {
-                /* obd_force == local only */
-                ldlm_cli_cancel_unused(obd->obd_namespace, NULL,
-                                       obd->obd_force ? LDLM_FL_LOCAL_ONLY:0,
-                                       NULL);
-                ldlm_namespace_free_prior(obd->obd_namespace);
-                to_be_freed = obd->obd_namespace;
-        }
-
-        rc = ptlrpc_disconnect_import(imp, 0);
-
-        ptlrpc_invalidate_import(imp);
-        /* set obd_namespace to NULL only after invalidate, because we can have
-         * some connect requests in flight, and his need store a connect flags
-         * in obd_namespace. bug 14260 */
-        obd->obd_namespace = NULL;
-	
-        ptlrpc_free_rq_pool(imp->imp_rq_pool);
-        class_destroy_import(imp);
-        cli->cl_import = NULL;
-
-        EXIT;
- out_no_disconnect:
-        err = class_disconnect(exp);
-        if (!rc && err)
-                rc = err;
- out_sem:
-        mutex_up(&cli->cl_sem);
-        if (to_be_freed)
-                ldlm_namespace_free_post(to_be_freed, obd->obd_force);
-        RETURN(rc);
-}
-
-/* --------------------------------------------------------------------------
- * from old lib/target.c
- * -------------------------------------------------------------------------- */
-
-int target_handle_reconnect(struct lustre_handle *conn, struct obd_export *exp,
-                            struct obd_uuid *cluuid)
-{
-        ENTRY;
-        if (exp->exp_connection && exp->exp_imp_reverse) {
-                struct lustre_handle *hdl;
-                hdl = &exp->exp_imp_reverse->imp_remote_handle;
-                /* Might be a re-connect after a partition. */
-                if (!memcmp(&conn->cookie, &hdl->cookie, sizeof conn->cookie)) {
-                        CWARN("%s: %s reconnecting\n", exp->exp_obd->obd_name,
-                              cluuid->uuid);
-                        conn->cookie = exp->exp_handle.h_cookie;
-                        /* target_handle_connect() treats EALREADY and
-                         * -EALREADY differently.  EALREADY means we are
-                         * doing a valid reconnect from the same client. */
-                        RETURN(EALREADY);
-                } else {
-                        CERROR("%s reconnecting from %s, "
-                               "handle mismatch (ours "LPX64", theirs "
-                               LPX64")\n", cluuid->uuid,
-                               exp->exp_connection->c_remote_uuid.uuid,
-                               hdl->cookie, conn->cookie);
-                        memset(conn, 0, sizeof *conn);
-                        /* target_handle_connect() treats EALREADY and
-                         * -EALREADY differently.  -EALREADY is an error
-                         * (same UUID, different handle). */
-                        RETURN(-EALREADY);
-                }
-        }
-
-        conn->cookie = exp->exp_handle.h_cookie;
-        CDEBUG(D_HA, "connect export for UUID '%s' at %p, cookie "LPX64"\n",
-               cluuid->uuid, exp, conn->cookie);
-        RETURN(0);
-}
-
-void target_client_add_cb(struct obd_device *obd, __u64 transno, void *cb_data,
-                          int error)
-{
-        struct obd_export *exp = cb_data;
-
-        CDEBUG(D_RPCTRACE, "%s: committing for initial connect of %s\n",
-               obd->obd_name, exp->exp_client_uuid.uuid);
-
-        spin_lock(&exp->exp_lock);
-        exp->exp_need_sync = 0;
-        spin_unlock(&exp->exp_lock);
-}
-EXPORT_SYMBOL(target_client_add_cb);
-
-static void 
-target_start_and_reset_recovery_timer(struct obd_device *obd,
-                                      svc_handler_t handler,
-                                      struct ptlrpc_request *req,
-                                      int new_client);
-
-int target_handle_connect(struct ptlrpc_request *req, svc_handler_t handler)
-{
-        struct obd_device *target, *targref = NULL;
-        struct obd_export *export = NULL;
-        struct obd_import *revimp;
-        struct lustre_handle conn;
-        struct obd_uuid tgtuuid;
-        struct obd_uuid cluuid;
-        struct obd_uuid remote_uuid;
-        char *str, *tmp;
-        int rc = 0, abort_recovery;
-        struct obd_connect_data *data;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*data) };
-        lnet_nid_t client_nid = 0;
-        ENTRY;
-
-        OBD_RACE(OBD_FAIL_TGT_CONN_RACE);
-
-        lustre_set_req_swabbed(req, REQ_REC_OFF);
-        str = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF, sizeof(tgtuuid)-1);
-        if (str == NULL) {
-                DEBUG_REQ(D_ERROR, req, "bad target UUID for connect");
-                GOTO(out, rc = -EINVAL);
-        }
-
-        obd_str2uuid (&tgtuuid, str);
-        target = class_uuid2obd(&tgtuuid);
-        /* COMPAT_146 */
-        /* old (pre 1.6) lustre_process_log tries to connect to mdsname
-           (eg. mdsA) instead of uuid. */
-        if (!target) {
-                snprintf((char *)tgtuuid.uuid, sizeof(tgtuuid), "%s_UUID", str);
-                target = class_uuid2obd(&tgtuuid);
-        }
-        if (!target)
-                target = class_name2obd(str);
-        /* end COMPAT_146 */
-
-        if (!target || target->obd_stopping || !target->obd_set_up) {
-                LCONSOLE_ERROR_MSG(0x137, "UUID '%s' is not available "
-                                   " for connect (%s)\n", str,
-                                   !target ? "no target" :
-                                   (target->obd_stopping ? "stopping" :
-                                   "not set up"));
-                GOTO(out, rc = -ENODEV);
-        }
-
-        if (target->obd_no_conn) {
-                LCONSOLE_WARN("%s: temporarily refusing client connection "
-                              "from %s\n", target->obd_name, 
-                              libcfs_nid2str(req->rq_peer.nid));
-                GOTO(out, rc = -EAGAIN);
-        }
-
-        /* Make sure the target isn't cleaned up while we're here. Yes, 
-           there's still a race between the above check and our incref here. 
-           Really, class_uuid2obd should take the ref. */
-        targref = class_incref(target);
-
-        lustre_set_req_swabbed(req, REQ_REC_OFF + 1);
-        str = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF + 1,
-                                sizeof(cluuid) - 1);
-        if (str == NULL) {
-                DEBUG_REQ(D_ERROR, req, "bad client UUID for connect");
-                GOTO(out, rc = -EINVAL);
-        }
-
-        obd_str2uuid (&cluuid, str);
-
-        /* XXX extract a nettype and format accordingly */
-        switch (sizeof(lnet_nid_t)) {
-                /* NB the casts only avoid compiler warnings */
-        case 8:
-                snprintf(remote_uuid.uuid, sizeof remote_uuid,
-                         "NET_"LPX64"_UUID", (__u64)req->rq_peer.nid);
-                break;
-        case 4:
-                snprintf(remote_uuid.uuid, sizeof remote_uuid,
-                         "NET_%x_UUID", (__u32)req->rq_peer.nid);
-                break;
-        default:
-                LBUG();
-        }
-
-        spin_lock_bh(&target->obd_processing_task_lock);
-        abort_recovery = target->obd_abort_recovery;
-        spin_unlock_bh(&target->obd_processing_task_lock);
-        if (abort_recovery)
-                target_abort_recovery(target);
-
-        tmp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2, sizeof conn);
-        if (tmp == NULL)
-                GOTO(out, rc = -EPROTO);
-
-        memcpy(&conn, tmp, sizeof conn);
-
-        data = lustre_swab_reqbuf(req, REQ_REC_OFF + 3, sizeof(*data),
-                                  lustre_swab_connect);
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        if (lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_LIBCLIENT) {
-                if (!data) {
-                        DEBUG_REQ(D_WARNING, req, "Refusing old (unversioned) "
-                                  "libclient connection attempt");
-                        GOTO(out, rc = -EPROTO);
-                } else if (data->ocd_version < LUSTRE_VERSION_CODE -
-                                               LUSTRE_VERSION_ALLOWED_OFFSET ||
-                           data->ocd_version > LUSTRE_VERSION_CODE +
-                                               LUSTRE_VERSION_ALLOWED_OFFSET) {
-                        DEBUG_REQ(D_WARNING, req, "Refusing %s (%d.%d.%d.%d) "
-                                  "libclient connection attempt",
-                                  data->ocd_version < LUSTRE_VERSION_CODE ?
-                                  "old" : "new",
-                                  OBD_OCD_VERSION_MAJOR(data->ocd_version),
-                                  OBD_OCD_VERSION_MINOR(data->ocd_version),
-                                  OBD_OCD_VERSION_PATCH(data->ocd_version),
-                                  OBD_OCD_VERSION_FIX(data->ocd_version));
-                        data = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                              offsetof(typeof(*data),
-                                                       ocd_version) +
-                                              sizeof(data->ocd_version));
-                        if (data) {
-                                data->ocd_connect_flags = OBD_CONNECT_VERSION;
-                                data->ocd_version = LUSTRE_VERSION_CODE;
-                        }
-                        GOTO(out, rc = -EPROTO);
-                }
-        }
-
-        /* lctl gets a backstage, all-access pass. */
-        if (obd_uuid_equals(&cluuid, &target->obd_uuid))
-                goto dont_check_exports;
-
-        spin_lock(&target->obd_dev_lock);
-        export = lustre_hash_get_object_by_key(target->obd_uuid_hash_body, &cluuid);
-
-        if (export != NULL && export->exp_connecting) { /* bug 9635, et. al. */
-                CWARN("%s: exp %p already connecting\n",
-                      export->exp_obd->obd_name, export);
-                class_export_put(export);
-                export = NULL;
-                rc = -EALREADY;
-        } else if (export != NULL && export->exp_connection != NULL &&
-                   req->rq_peer.nid != export->exp_connection->c_peer.nid) {
-                /* make darn sure this is coming from the same peer
-                 * if the UUIDs matched */
-                  CWARN("%s: cookie %s seen on new NID %s when "
-                          "existing NID %s is already connected\n",
-                        target->obd_name, cluuid.uuid,
-                  libcfs_nid2str(req->rq_peer.nid),
-                  libcfs_nid2str(export->exp_connection->c_peer.nid));
-                  class_export_put(export);
-                  export = NULL;
-                  rc = -EALREADY;
-        } else if (export != NULL && export->exp_failed) { /* bug 11327 */
-                CDEBUG(D_HA, "%s: exp %p evict in progress - new cookie needed "
-                      "for connect\n", export->exp_obd->obd_name, export);
-                class_export_put(export);
-                export = NULL;
-                rc = -ENODEV;
-        } else if (export != NULL) {
-                spin_lock(&export->exp_lock);
-                export->exp_connecting = 1;
-                spin_unlock(&export->exp_lock);
-                class_export_put(export);
-                spin_unlock(&target->obd_dev_lock);
-                LASSERT(export->exp_obd == target);
-
-                rc = target_handle_reconnect(&conn, export, &cluuid);
-        }
-
-        /* If we found an export, we already unlocked. */
-        if (!export) {
-                spin_unlock(&target->obd_dev_lock);
-                OBD_FAIL_TIMEOUT(OBD_FAIL_TGT_DELAY_CONNECT, 2 * obd_timeout);
-        } else if (req->rq_export == NULL &&
-                   atomic_read(&export->exp_rpc_count) > 0) {
-                CWARN("%s: refuse connection from %s/%s to 0x%p; still busy "
-                      "with %d references\n", target->obd_name, cluuid.uuid,
-                      libcfs_nid2str(req->rq_peer.nid),
-                      export, atomic_read(&export->exp_refcount));
-                GOTO(out, rc = -EBUSY);
-        } else if (req->rq_export != NULL &&
-                   atomic_read(&export->exp_rpc_count) > 1) {
-                CWARN("%s: refuse reconnection from %s@%s to 0x%p; still busy "
-                      "with %d active RPCs\n", target->obd_name, cluuid.uuid,
-                      libcfs_nid2str(req->rq_peer.nid),
-                      export, atomic_read(&export->exp_rpc_count));
-                GOTO(out, rc = -EBUSY);
-        } else if (lustre_msg_get_conn_cnt(req->rq_reqmsg) == 1) {
-                CERROR("%s: NID %s (%s) reconnected with 1 conn_cnt; "
-                       "cookies not random?\n", target->obd_name,
-                       libcfs_nid2str(req->rq_peer.nid), cluuid.uuid);
-                GOTO(out, rc = -EALREADY);
-        } else {
-                OBD_FAIL_TIMEOUT(OBD_FAIL_TGT_DELAY_RECONNECT, 2 * obd_timeout);
-        }
-
-        if (rc < 0)
-                GOTO(out, rc);
-
-        /* Tell the client if we're in recovery. */
-        if (target->obd_recovering) {
-                lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_RECOVERING);
-                /* If this is the first time a client connects,
-                   reset the recovery timer */
-                if (rc == 0)
-                        target_start_and_reset_recovery_timer(target, handler,
-                                                              req, !export);
-        }
-
-        /* We want to handle EALREADY but *not* -EALREADY from
-         * target_handle_reconnect(), return reconnection state in a flag */
-        if (rc == EALREADY) {
-                lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_RECONNECT);
-                rc = 0;
-        } else {
-                LASSERT(rc == 0);
-        }
-
-        /* Tell the client if we support replayable requests */
-        if (target->obd_replayable)
-                lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_REPLAYABLE);
-        client_nid = req->rq_peer.nid;
-
-        if (export == NULL) {
-                if (target->obd_recovering) {
-                        CERROR("%s: denying connection for new client %s (%s): "
-                               "%d clients in recovery for %lds\n",
-                               target->obd_name,
-                               libcfs_nid2str(req->rq_peer.nid), cluuid.uuid,
-                               target->obd_recoverable_clients,
-                               cfs_duration_sec(cfs_time_sub(cfs_timer_deadline(&target->obd_recovery_timer),
-                                                             cfs_time_current())));
-                        rc = -EBUSY;
-                } else {
- dont_check_exports:
-                        rc = obd_connect(&conn, target, &cluuid, data,
-                                         &client_nid);
-                }
-        } else {
-                rc = obd_reconnect(export, target, &cluuid, data);
-        }
-
-        if (rc)
-                GOTO(out, rc);
-
-        /* Return only the parts of obd_connect_data that we understand, so the
-         * client knows that we don't understand the rest. */
-        if (data)
-                memcpy(lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*data)),
-                       data, sizeof(*data));
-
-        /* If all else goes well, this is our RPC return code. */
-        req->rq_status = 0;
-
-        lustre_msg_set_handle(req->rq_repmsg, &conn);
-
-        /* ownership of this export ref transfers to the request AFTER we
-         * drop any previous reference the request had, but we don't want
-         * that to go to zero before we get our new export reference. */
-        export = class_conn2export(&conn);
-        if (!export) {
-                DEBUG_REQ(D_ERROR, req, "Missing export!");
-                GOTO(out, rc = -ENODEV);
-        }
-
-        /* If the client and the server are the same node, we will already
-         * have an export that really points to the client's DLM export,
-         * because we have a shared handles table.
-         *
-         * XXX this will go away when shaver stops sending the "connect" handle
-         * in the real "remote handle" field of the request --phik 24 Apr 2003
-         */
-        if (req->rq_export != NULL)
-                class_export_put(req->rq_export);
-
-        req->rq_export = export;
-
-        spin_lock(&export->exp_lock);
-        if (export->exp_conn_cnt >= lustre_msg_get_conn_cnt(req->rq_reqmsg)) {
-                CERROR("%s: %s already connected at higher conn_cnt: %d > %d\n",
-                       cluuid.uuid, libcfs_nid2str(req->rq_peer.nid),
-                       export->exp_conn_cnt,
-                       lustre_msg_get_conn_cnt(req->rq_reqmsg));
-
-                spin_unlock(&export->exp_lock);
-                GOTO(out, rc = -EALREADY);
-        }
-        export->exp_conn_cnt = lustre_msg_get_conn_cnt(req->rq_reqmsg);
-
-        /* request from liblustre?  Don't evict it for not pinging. */
-        if (lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_LIBCLIENT) {
-                export->exp_libclient = 1;
-                spin_unlock(&export->exp_lock);
-
-                spin_lock(&target->obd_dev_lock);
-                list_del_init(&export->exp_obd_chain_timed);
-                spin_unlock(&target->obd_dev_lock);
-        } else {
-                spin_unlock(&export->exp_lock);
-        }
-
-        if (export->exp_connection != NULL)
-                ptlrpc_put_connection(export->exp_connection);
-        export->exp_connection = ptlrpc_get_connection(req->rq_peer,
-                                                       req->rq_self,
-                                                       &remote_uuid);
-
-        spin_lock(&target->obd_dev_lock);
-        /* Export might be hashed already, e.g. if this is reconnect */
-        if (hlist_unhashed(&export->exp_nid_hash))
-                lustre_hash_additem(export->exp_obd->obd_nid_hash_body,
-                                    &export->exp_connection->c_peer.nid,
-                                    &export->exp_nid_hash);
-        spin_unlock(&target->obd_dev_lock);
-
-        if (lustre_msg_get_op_flags(req->rq_repmsg) & MSG_CONNECT_RECONNECT) {
-                revimp = class_import_get(export->exp_imp_reverse);
-                GOTO(set_flags, rc = 0);
-        }
-
-        if (target->obd_recovering)
-                target->obd_connected_clients++;
-
-        memcpy(&conn,
-               lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2, sizeof conn),
-               sizeof conn);
-
-        if (export->exp_imp_reverse != NULL)
-                class_destroy_import(export->exp_imp_reverse);
-        revimp = export->exp_imp_reverse = class_new_import(target);
-        revimp->imp_connection = ptlrpc_connection_addref(export->exp_connection);
-        revimp->imp_client = &export->exp_obd->obd_ldlm_client;
-        revimp->imp_remote_handle = conn;
-        revimp->imp_dlm_fake = 1;
-        revimp->imp_state = LUSTRE_IMP_FULL;
-
-set_flags:
-        if (req->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V1 &&
-            lustre_msg_get_op_flags(req->rq_reqmsg) & MSG_CONNECT_NEXT_VER) {
-                revimp->imp_msg_magic = LUSTRE_MSG_MAGIC_V2;
-                lustre_msg_add_op_flags(req->rq_repmsg, MSG_CONNECT_NEXT_VER);
-        } else {
-                /* unknown versions will be caught in
-                 * ptlrpc_handle_server_req_in->lustre_unpack_msg() */
-                revimp->imp_msg_magic = req->rq_reqmsg->lm_magic;
-        }
-
-        if (revimp->imp_msg_magic != LUSTRE_MSG_MAGIC_V1) {
-                if (export->exp_connect_flags & OBD_CONNECT_AT)
-                        revimp->imp_msghdr_flags |= MSGHDR_AT_SUPPORT;
-                else
-                        revimp->imp_msghdr_flags &= ~MSGHDR_AT_SUPPORT;
-        }
-
-        class_import_put(revimp);
-out:
-        if (export) {
-                spin_lock(&export->exp_lock);
-                export->exp_connecting = 0;
-                spin_unlock(&export->exp_lock);
-        }
-        if (targref)
-                class_decref(targref);
-        if (rc)
-                req->rq_status = rc;
-        RETURN(rc);
-}
-
-int target_handle_disconnect(struct ptlrpc_request *req)
-{
-        int rc;
-        ENTRY;
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        /* keep the rq_export around so we can send the reply */
-        req->rq_status = obd_disconnect(class_export_get(req->rq_export));
-        RETURN(0);
-}
-
-void target_destroy_export(struct obd_export *exp)
-{
-        /* exports created from last_rcvd data, and "fake"
-           exports created by lctl don't have an import */
-        if (exp->exp_imp_reverse != NULL)
-                class_destroy_import(exp->exp_imp_reverse);
-
-        /* We cancel locks at disconnect time, but this will catch any locks
-         * granted in a race with recovery-induced disconnect. */
-        if (exp->exp_obd->obd_namespace != NULL)
-                ldlm_cancel_locks_for_export(exp);
-}
-
-/*
- * Recovery functions
- */
-
-
-static void target_release_saved_req(struct ptlrpc_request *req)
-{
-        ptlrpc_req_drop_rs(req);
-        class_export_put(req->rq_export);
-        OBD_FREE(req->rq_reqmsg, req->rq_reqlen);
-        OBD_FREE(req, sizeof *req);
-}
-
-static void target_finish_recovery(struct obd_device *obd)
-{
-        struct list_head *tmp, *n;
-
-        LCONSOLE_INFO("%s: sending delayed replies to recovered clients\n",
-                      obd->obd_name);
-
-        ldlm_reprocess_all_ns(obd->obd_namespace);
-
-        /* when recovery finished, cleanup orphans on mds and ost */
-        if (OBT(obd) && OBP(obd, postrecov)) {
-                int rc = OBP(obd, postrecov)(obd);
-                LCONSOLE_WARN("%s: recovery %s: rc %d\n", obd->obd_name,
-                              rc < 0 ? "failed" : "complete", rc);
-        }
-
-        list_for_each_safe(tmp, n, &obd->obd_delayed_reply_queue) {
-                struct ptlrpc_request *req;
-                req = list_entry(tmp, struct ptlrpc_request, rq_list);
-                list_del(&req->rq_list);
-                DEBUG_REQ(D_HA, req, "delayed:");
-                ptlrpc_reply(req);
-                target_release_saved_req(req);
-        }
-        obd->obd_recovery_end = cfs_time_current_sec();
-}
-
-static void abort_recovery_queue(struct obd_device *obd)
-{
-        struct ptlrpc_request *req;
-        struct list_head *tmp, *n;
-        int rc;
-
-        list_for_each_safe(tmp, n, &obd->obd_recovery_queue) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_list);
-                list_del(&req->rq_list);
-                DEBUG_REQ(D_ERROR, req, "aborted:");
-                req->rq_status = -ENOTCONN;
-                req->rq_type = PTL_RPC_MSG_ERR;
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc == 0)
-                        ptlrpc_reply(req);
-                else
-                        DEBUG_REQ(D_ERROR, req,
-                                  "packing failed for abort-reply; skipping");
-                target_release_saved_req(req);
-        }
-}
-
-/* Called from a cleanup function if the device is being cleaned up
-   forcefully.  The exports should all have been disconnected already,
-   the only thing left to do is
-     - clear the recovery flags
-     - cancel the timer
-     - free queued requests and replies, but don't send replies
-   Because the obd_stopping flag is set, no new requests should be received.
-
-*/
-void target_cleanup_recovery(struct obd_device *obd)
-{
-        struct list_head *tmp, *n;
-        struct ptlrpc_request *req;
-        ENTRY;
-
-        LASSERT(obd->obd_stopping);
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (!obd->obd_recovering) {
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                EXIT;
-                return;
-        }
-        obd->obd_recovering = obd->obd_abort_recovery = 0;
-        target_cancel_recovery_timer(obd);
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        list_for_each_safe(tmp, n, &obd->obd_delayed_reply_queue) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_list);
-                list_del(&req->rq_list);
-                target_release_saved_req(req);
-        }
-
-        list_for_each_safe(tmp, n, &obd->obd_recovery_queue) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_list);
-                list_del(&req->rq_list);
-                target_release_saved_req(req);
-        }
-        EXIT;
-}
-
-void target_abort_recovery(void *data)
-{
-        struct obd_device *obd = data;
-        ENTRY;
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (!obd->obd_recovering) {
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                EXIT;
-                return;
-        }
-        obd->obd_recovering = obd->obd_abort_recovery = 0;
-        target_cancel_recovery_timer(obd);
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        LCONSOLE_WARN("%s: recovery period over; %d clients never reconnected "
-                      "after %lds (%d clients did)\n",
-                      obd->obd_name, obd->obd_recoverable_clients,
-                      cfs_time_current_sec()- obd->obd_recovery_start,
-                      obd->obd_connected_clients);
-        class_disconnect_stale_exports(obd);
-        abort_recovery_queue(obd);
-
-        target_finish_recovery(obd);
-        CDEBUG(D_HA, "%s: recovery complete\n", obd_uuid2str(&obd->obd_uuid));
-        EXIT;
-}
-
-static void target_recovery_expired(unsigned long castmeharder)
-{
-        struct obd_device *obd = (struct obd_device *)castmeharder;
-        CERROR("%s: recovery timed out, aborting\n", obd->obd_name);
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (obd->obd_recovering)
-                obd->obd_abort_recovery = 1;
-        cfs_waitq_signal(&obd->obd_next_transno_waitq);
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-}
-
-
-/* obd_processing_task_lock should be held */
-void target_cancel_recovery_timer(struct obd_device *obd)
-{
-        CDEBUG(D_HA, "%s: cancel recovery timer\n", obd->obd_name);
-        cfs_timer_disarm(&obd->obd_recovery_timer);
-}
-
-/* extend = 1 means require at least "duration" seconds left in the timer,
-   extend = 0 means set the total duration (start_recovery_timer) */
-static void reset_recovery_timer(struct obd_device *obd, int duration,
-                                 int extend)
-{
-        cfs_time_t now = cfs_time_current_sec();
-        cfs_duration_t left;
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (!obd->obd_recovering) {
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                return;
-        }
-
-        left = cfs_time_sub(obd->obd_recovery_end, now);
-
-        if (extend && (duration > left))
-                obd->obd_recovery_timeout += duration - left;
-        else if (!extend && (duration > obd->obd_recovery_timeout))
-                /* Track the client's largest expected replay time */
-                obd->obd_recovery_timeout = duration;
-#ifdef CRAY_XT3
-        /* 
-         * If total recovery time already exceed the 
-         * obd_recovery_max_time, then CRAY XT3 will 
-         * abort the recovery
-         */
-        if(obd->obd_recovery_timeout > obd->obd_recovery_max_time)
-                obd->obd_recovery_timeout = obd->obd_recovery_max_time;
-#endif
-        obd->obd_recovery_end = obd->obd_recovery_start + 
-                                obd->obd_recovery_timeout;
-        if (cfs_time_before(now, obd->obd_recovery_end)) {
-                left = cfs_time_sub(obd->obd_recovery_end, now);
-                cfs_timer_arm(&obd->obd_recovery_timer, cfs_time_shift(left));
-        }
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-        CDEBUG(D_HA, "%s: recovery timer will expire in %u seconds\n",
-               obd->obd_name, (unsigned)left);
-}
-
-static void check_and_start_recovery_timer(struct obd_device *obd,
-                                           svc_handler_t handler)
-{
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (obd->obd_recovery_handler) { 
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                return;
-        }
-        CWARN("%s: starting recovery timer\n", obd->obd_name);
-        obd->obd_recovery_start = cfs_time_current_sec();
-        /* minimum */
-        obd->obd_recovery_timeout = OBD_RECOVERY_FACTOR * obd_timeout;
-        obd->obd_recovery_handler = handler;
-        cfs_timer_init(&obd->obd_recovery_timer, target_recovery_expired, obd);
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        reset_recovery_timer(obd, obd->obd_recovery_timeout, 0);
-}
-
-/* Reset the timer with each new client connection */
-/*
- * This timer is actually reconnect_timer, which is for making sure 
- * the total recovery window is at least as big as my reconnect 
- * attempt timing. So the initial recovery time_out will be set to
- * OBD_RECOVERY_FACTOR * obd_timeout. If the timeout coming
- * from client is bigger than this, then the recovery time_out will
- * be extend to make sure the client could be reconnected, in the 
- * process, the timeout from the new client should be ignored.
- */
-
-static void
-target_start_and_reset_recovery_timer(struct obd_device *obd,
-                                      svc_handler_t handler,
-                                      struct ptlrpc_request *req,
-                                      int new_client)
-{
-        int req_timeout = OBD_RECOVERY_FACTOR * 
-                          lustre_msg_get_timeout(req->rq_reqmsg);
-
-        check_and_start_recovery_timer(obd, handler);
-
-        if (req_timeout > obd->obd_recovery_timeout && !new_client)
-                reset_recovery_timer(obd, req_timeout, 0);
-}
-
-static int check_for_next_transno(struct obd_device *obd)
-{
-        struct ptlrpc_request *req;
-        int wake_up = 0, connected, completed, queue_len, max;
-        __u64 next_transno, req_transno;
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        req = list_entry(obd->obd_recovery_queue.next,
-                         struct ptlrpc_request, rq_list);
-        max = obd->obd_max_recoverable_clients;
-        req_transno = lustre_msg_get_transno(req->rq_reqmsg);
-        connected = obd->obd_connected_clients;
-        completed = max - obd->obd_recoverable_clients;
-        queue_len = obd->obd_requests_queued_for_recovery;
-        next_transno = obd->obd_next_recovery_transno;
-
-        CDEBUG(D_HA,"max: %d, connected: %d, completed: %d, queue_len: %d, "
-               "req_transno: "LPU64", next_transno: "LPU64"\n",
-               max, connected, completed, queue_len, req_transno, next_transno);
-        if (obd->obd_abort_recovery) {
-                CDEBUG(D_HA, "waking for aborted recovery\n");
-                wake_up = 1;
-        } else if (!obd->obd_recovering) {
-                CDEBUG(D_HA, "waking for completed recovery (?)\n");
-                wake_up = 1;
-        } else if (req_transno == next_transno) {
-                CDEBUG(D_HA, "waking for next ("LPD64")\n", next_transno);
-                wake_up = 1;
-        } else if (queue_len + completed == max) {
-                CDEBUG(D_ERROR,
-                       "waking for skipped transno (skip: "LPD64
-                       ", ql: %d, comp: %d, conn: %d, next: "LPD64")\n",
-                       next_transno, queue_len, completed, max, req_transno);
-                obd->obd_next_recovery_transno = req_transno;
-                wake_up = 1;
-        }
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-        LASSERT(lustre_msg_get_transno(req->rq_reqmsg) >= next_transno);
-        return wake_up;
-}
-
-static void process_recovery_queue(struct obd_device *obd)
-{
-        struct ptlrpc_request *req;
-        int abort_recovery = 0;
-        struct l_wait_info lwi = { 0 };
-        ENTRY;
-
-        for (;;) {
-                spin_lock_bh(&obd->obd_processing_task_lock);
-                LASSERT(obd->obd_processing_task == cfs_curproc_pid());
-                req = list_entry(obd->obd_recovery_queue.next,
-                                 struct ptlrpc_request, rq_list);
-
-                if (lustre_msg_get_transno(req->rq_reqmsg) !=
-                    obd->obd_next_recovery_transno) {
-                        spin_unlock_bh(&obd->obd_processing_task_lock);
-                        CDEBUG(D_HA, "Waiting for transno "LPD64" (1st is "
-                               LPD64", x"LPU64")\n",
-                               obd->obd_next_recovery_transno,
-                               lustre_msg_get_transno(req->rq_reqmsg),
-                               req->rq_xid);
-                        l_wait_event(obd->obd_next_transno_waitq,
-                                     check_for_next_transno(obd), &lwi);
-                        spin_lock_bh(&obd->obd_processing_task_lock);
-                        abort_recovery = obd->obd_abort_recovery;
-                        spin_unlock_bh(&obd->obd_processing_task_lock);
-                        if (abort_recovery) {
-                                target_abort_recovery(obd);
-                                return;
-                        }
-                        continue;
-                }
-                list_del_init(&req->rq_list);
-                obd->obd_requests_queued_for_recovery--;
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-
-                DEBUG_REQ(D_HA, req, "processing: ");
-                (void)obd->obd_recovery_handler(req);
-                obd->obd_replayed_requests++;
-                reset_recovery_timer(obd, OBD_RECOVERY_FACTOR *
-                       AT_OFF ? obd_timeout :
-                       at_get(&req->rq_rqbd->rqbd_service->srv_at_estimate), 1);
-                /* bug 1580: decide how to properly sync() in recovery */
-                //mds_fsync_super(obd->u.obt.obt_sb);
-                class_export_put(req->rq_export);
-                ptlrpc_req_drop_rs(req);
-                OBD_FREE(req->rq_reqmsg, req->rq_reqlen);
-                OBD_FREE(req, sizeof *req);
-                spin_lock_bh(&obd->obd_processing_task_lock);
-                obd->obd_next_recovery_transno++;
-                if (list_empty(&obd->obd_recovery_queue)) {
-                        obd->obd_processing_task = 0;
-                        spin_unlock_bh(&obd->obd_processing_task_lock);
-                        break;
-                }
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-        }
-        EXIT;
-}
-
-int target_queue_recovery_request(struct ptlrpc_request *req,
-                                  struct obd_device *obd)
-{
-        struct list_head *tmp;
-        int inserted = 0;
-        __u64 transno = lustre_msg_get_transno(req->rq_reqmsg);
-        struct ptlrpc_request *saved_req;
-        struct lustre_msg *reqmsg;
-
-        /* CAVEAT EMPTOR: The incoming request message has been swabbed
-         * (i.e. buflens etc are in my own byte order), but type-dependent
-         * buffers (eg mds_body, ost_body etc) have NOT been swabbed. */
-
-        if (!transno) {
-                CFS_INIT_LIST_HEAD(&req->rq_list);
-                DEBUG_REQ(D_HA, req, "not queueing");
-                return 1;
-        }
-
-        /* XXX If I were a real man, these LBUGs would be sane cleanups. */
-        /* XXX just like the request-dup code in queue_final_reply */
-        OBD_ALLOC(saved_req, sizeof *saved_req);
-        if (!saved_req)
-                LBUG();
-        OBD_ALLOC(reqmsg, req->rq_reqlen);
-        if (!reqmsg)
-                LBUG();
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-
-        /* If we're processing the queue, we want don't want to queue this
-         * message.
-         *
-         * Also, if this request has a transno less than the one we're waiting
-         * for, we should process it now.  It could (and currently always will)
-         * be an open request for a descriptor that was opened some time ago.
-         *
-         * Also, a resent, replayed request that has already been
-         * handled will pass through here and be processed immediately.
-         */
-        if (obd->obd_processing_task == cfs_curproc_pid() ||
-            transno < obd->obd_next_recovery_transno) {
-                /* Processing the queue right now, don't re-add. */
-                LASSERT(list_empty(&req->rq_list));
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                OBD_FREE(reqmsg, req->rq_reqlen);
-                OBD_FREE(saved_req, sizeof *saved_req);
-                return 1;
-        }
-
-        /* A resent, replayed request that is still on the queue; just drop it.
-           The queued request will handle this. */
-        if ((lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT|MSG_REPLAY)) ==
-            (MSG_RESENT | MSG_REPLAY)) {
-                DEBUG_REQ(D_ERROR, req, "dropping resent queued req");
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                OBD_FREE(reqmsg, req->rq_reqlen);
-                OBD_FREE(saved_req, sizeof *saved_req);
-                return 0;
-        }
-
-        memcpy(saved_req, req, sizeof *req);
-        memcpy(reqmsg, req->rq_reqmsg, req->rq_reqlen);
-        req = saved_req;
-        req->rq_reqmsg = reqmsg;
-        class_export_get(req->rq_export);
-        CFS_INIT_LIST_HEAD(&req->rq_list);
-
-        /* XXX O(n^2) */
-        list_for_each(tmp, &obd->obd_recovery_queue) {
-                struct ptlrpc_request *reqiter =
-                        list_entry(tmp, struct ptlrpc_request, rq_list);
-
-                if (lustre_msg_get_transno(reqiter->rq_reqmsg) > transno) {
-                        list_add_tail(&req->rq_list, &reqiter->rq_list);
-                        inserted = 1;
-                        break;
-                }
-        }
-
-        if (!inserted) {
-                list_add_tail(&req->rq_list, &obd->obd_recovery_queue);
-        }
-
-        obd->obd_requests_queued_for_recovery++;
-
-        if (obd->obd_processing_task != 0) {
-                /* Someone else is processing this queue, we'll leave it to
-                 * them.
-                 */
-                cfs_waitq_signal(&obd->obd_next_transno_waitq);
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                return 0;
-        }
-
-        /* Nobody is processing, and we know there's (at least) one to process
-         * now, so we'll do the honours.
-         */
-        obd->obd_processing_task = cfs_curproc_pid();
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        process_recovery_queue(obd);
-        return 0;
-}
-
-struct obd_device * target_req2obd(struct ptlrpc_request *req)
-{
-        return req->rq_export->exp_obd;
-}
-
-int target_queue_last_replay_reply(struct ptlrpc_request *req, int rc)
-{
-        struct obd_device *obd = target_req2obd(req);
-        struct ptlrpc_request *saved_req;
-        struct lustre_msg *reqmsg;
-        int recovery_done = 0;
-
-        LASSERT ((rc == 0) == req->rq_packed_final);
-
-        if (!req->rq_packed_final) {
-                /* Just like ptlrpc_error, but without the sending. */
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc)
-                        return rc;
-                req->rq_type = PTL_RPC_MSG_ERR;
-        }
-
-        LASSERT(!req->rq_reply_state->rs_difficult);
-        LASSERT(list_empty(&req->rq_list));
-        /* XXX a bit like the request-dup code in queue_recovery_request */
-        OBD_ALLOC(saved_req, sizeof *saved_req);
-        if (!saved_req)
-                return -ENOMEM;
-        OBD_ALLOC(reqmsg, req->rq_reqlen);
-        if (!reqmsg) {
-                OBD_FREE(saved_req, sizeof *req);
-                return -ENOMEM;
-        }
-        *saved_req = *req;
-        memcpy(reqmsg, req->rq_reqmsg, req->rq_reqlen);
-
-        /* Don't race cleanup */
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (obd->obd_stopping) {
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                OBD_FREE(reqmsg, req->rq_reqlen);
-                OBD_FREE(saved_req, sizeof *req);
-                req->rq_status = -ENOTCONN;
-                /* rv is ignored anyhow */
-                return -ENOTCONN;
-        }
-        ptlrpc_rs_addref(req->rq_reply_state);  /* +1 ref for saved reply */
-        req = saved_req;
-        req->rq_reqmsg = reqmsg;
-        class_export_get(req->rq_export);
-        list_add(&req->rq_list, &obd->obd_delayed_reply_queue);
-
-        /* only count the first "replay over" request from each
-           export */
-        if (req->rq_export->exp_replay_needed) {
-                --obd->obd_recoverable_clients;
-                
-                spin_lock(&req->rq_export->exp_lock);
-                req->rq_export->exp_replay_needed = 0;
-                spin_unlock(&req->rq_export->exp_lock);
-        }
-        recovery_done = (obd->obd_recoverable_clients == 0);
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        OBD_RACE(OBD_FAIL_LDLM_RECOV_CLIENTS);
-        if (recovery_done) {
-                spin_lock_bh(&obd->obd_processing_task_lock);
-                obd->obd_recovering = obd->obd_abort_recovery = 0;
-                target_cancel_recovery_timer(obd);
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-
-                target_finish_recovery(obd);
-                CDEBUG(D_HA, "%s: recovery complete\n",
-                       obd_uuid2str(&obd->obd_uuid));
-        } else {
-                CWARN("%s: %d recoverable clients remain\n",
-                       obd->obd_name, obd->obd_recoverable_clients);
-                cfs_waitq_signal(&obd->obd_next_transno_waitq);
-        }
-
-        return 1;
-}
-
-static inline struct ldlm_pool *ldlm_exp2pl(struct obd_export *exp)
-{
-        LASSERT(exp != NULL);
-        return &exp->exp_obd->obd_namespace->ns_pool;
-}
-
-int target_pack_pool_reply(struct ptlrpc_request *req)
-{
-        struct ldlm_pool *pl;
-        ENTRY;
-    
-        if (!req->rq_export || !req->rq_export->exp_obd ||
-            !req->rq_export->exp_obd->obd_namespace ||
-            !exp_connect_lru_resize(req->rq_export)) {
-                lustre_msg_set_slv(req->rq_repmsg, 0);
-                lustre_msg_set_limit(req->rq_repmsg, 0);
-                RETURN(0);
-        }
-        
-        pl = ldlm_exp2pl(req->rq_export);
-
-        spin_lock(&pl->pl_lock);
-        LASSERT(ldlm_pool_get_slv(pl) != 0 && ldlm_pool_get_limit(pl) != 0);
-        lustre_msg_set_slv(req->rq_repmsg, ldlm_pool_get_slv(pl));
-        lustre_msg_set_limit(req->rq_repmsg, ldlm_pool_get_limit(pl));
-        spin_unlock(&pl->pl_lock);
-
-        RETURN(0);
-}
-
-int
-target_send_reply_msg (struct ptlrpc_request *req, int rc, int fail_id)
-{
-        if (OBD_FAIL_CHECK(fail_id | OBD_FAIL_ONCE)) {
-                obd_fail_loc |= OBD_FAIL_ONCE | OBD_FAILED;
-                DEBUG_REQ(D_ERROR, req, "dropping reply");
-                return (-ECOMM);
-        }
-
-        if (rc) {
-                DEBUG_REQ(D_ERROR, req, "processing error (%d)", rc);
-                req->rq_status = rc;
-                return (ptlrpc_error(req));
-        } else {
-                DEBUG_REQ(D_NET, req, "sending reply");
-        }
-
-        return (ptlrpc_send_reply(req, PTLRPC_REPLY_MAYBE_DIFFICULT));
-}
-
-void
-target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)
-{
-        int                        netrc;
-        struct ptlrpc_reply_state *rs;
-        struct obd_device         *obd;
-        struct obd_export         *exp;
-        struct ptlrpc_service     *svc;
-
-        svc = req->rq_rqbd->rqbd_service;
-        rs = req->rq_reply_state;
-        if (rs == NULL || !rs->rs_difficult) {
-                /* no notifiers */
-                target_send_reply_msg (req, rc, fail_id);
-                return;
-        }
-
-        /* must be an export if locks saved */
-        LASSERT (req->rq_export != NULL);
-        /* req/reply consistent */
-        LASSERT (rs->rs_service == svc);
-
-        /* "fresh" reply */
-        LASSERT (!rs->rs_scheduled);
-        LASSERT (!rs->rs_scheduled_ever);
-        LASSERT (!rs->rs_handled);
-        LASSERT (!rs->rs_on_net);
-        LASSERT (rs->rs_export == NULL);
-        LASSERT (list_empty(&rs->rs_obd_list));
-        LASSERT (list_empty(&rs->rs_exp_list));
-
-        exp = class_export_get (req->rq_export);
-        obd = exp->exp_obd;
-
-        /* disable reply scheduling onto srv_reply_queue while I'm setting up */
-        rs->rs_scheduled = 1;
-        rs->rs_on_net    = 1;
-        rs->rs_xid       = req->rq_xid;
-        rs->rs_transno   = req->rq_transno;
-        rs->rs_export    = exp;
-
-        spin_lock(&obd->obd_uncommitted_replies_lock);
-
-        if (rs->rs_transno > obd->obd_last_committed) {
-                /* not committed already */
-                list_add_tail (&rs->rs_obd_list,
-                               &obd->obd_uncommitted_replies);
-        }
-
-        spin_unlock (&obd->obd_uncommitted_replies_lock);
-        spin_lock (&exp->exp_lock);
-
-        list_add_tail (&rs->rs_exp_list, &exp->exp_outstanding_replies);
-
-        spin_unlock(&exp->exp_lock);
-
-        netrc = target_send_reply_msg (req, rc, fail_id);
-
-        spin_lock(&svc->srv_lock);
-
-        svc->srv_n_difficult_replies++;
-
-        if (netrc != 0) {
-                /* error sending: reply is off the net.  Also we need +1
-                 * reply ref until ptlrpc_server_handle_reply() is done
-                 * with the reply state (if the send was successful, there
-                 * would have been +1 ref for the net, which
-                 * reply_out_callback leaves alone) */
-                rs->rs_on_net = 0;
-                ptlrpc_rs_addref(rs);
-                atomic_inc (&svc->srv_outstanding_replies);
-        }
-
-        if (!rs->rs_on_net ||                   /* some notifier */
-            list_empty(&rs->rs_exp_list) ||     /* completed already */
-            list_empty(&rs->rs_obd_list)) {
-                list_add_tail (&rs->rs_list, &svc->srv_reply_queue);
-                cfs_waitq_signal (&svc->srv_waitq);
-        } else {
-                list_add (&rs->rs_list, &svc->srv_active_replies);
-                rs->rs_scheduled = 0;           /* allow notifier to schedule */
-        }
-
-        spin_unlock(&svc->srv_lock);
-}
-
-int target_handle_ping(struct ptlrpc_request *req)
-{
-        obd_ping(req->rq_export);
-        return lustre_pack_reply(req, 1, NULL, NULL);
-}
-
-void target_committed_to_req(struct ptlrpc_request *req)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-
-        if (!obd->obd_no_transno && req->rq_repmsg != NULL)
-                lustre_msg_set_last_committed(req->rq_repmsg,
-                                              obd->obd_last_committed);
-        else
-                DEBUG_REQ(D_IOCTL, req, "not sending last_committed update (%d/"
-                          "%d)", obd->obd_no_transno, req->rq_repmsg == NULL);
-
-        CDEBUG(D_INFO, "last_committed x"LPU64", this req x"LPU64"\n",
-               obd->obd_last_committed, req->rq_xid);
-}
-
-EXPORT_SYMBOL(target_committed_to_req);
-
-#ifdef HAVE_QUOTA_SUPPORT
-int target_handle_qc_callback(struct ptlrpc_request *req)
-{
-        struct obd_quotactl *oqctl;
-        struct client_obd *cli = &req->rq_export->exp_obd->u.cli;
-
-        oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),
-                                   lustre_swab_obd_quotactl);
-        if (oqctl == NULL) {
-                CERROR("Can't unpack obd_quotactl\n");
-                RETURN(-EPROTO);
-        }
-
-        cli->cl_qchk_stat = oqctl->qc_stat;
-
-        return 0;
-}
-
-int target_handle_dqacq_callback(struct ptlrpc_request *req)
-{
-#ifdef __KERNEL__
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct obd_device *master_obd;
-        struct lustre_quota_ctxt *qctxt;
-        struct qunit_data *qdata = NULL;
-        int rc = 0;
-        int repsize[2] = { sizeof(struct ptlrpc_body), 0 };
-        ENTRY;
-
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_DROP_QUOTA_REQ))
-                RETURN(rc);
-
-        repsize[1] = quota_get_qunit_data_size(req->rq_export->
-                                               exp_connect_flags);
-
-        rc = lustre_pack_reply(req, 2, repsize, NULL);
-        if (rc)
-                RETURN(rc);
-
-        LASSERT(req->rq_export);
-
-        /* there are three forms of qunit(historic causes), so we need to
-         * adjust qunits from slaves to the same form here */
-        OBD_ALLOC(qdata, sizeof(struct qunit_data));
-        if (!qdata)
-                RETURN(-ENOMEM);
-        rc = quota_get_qdata(req, qdata, QUOTA_REQUEST, QUOTA_EXPORT);
-        if (rc < 0) {
-                CDEBUG(D_ERROR, "Can't unpack qunit_data\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        /* we use the observer */
-        LASSERT(obd->obd_observer && obd->obd_observer->obd_observer);
-        master_obd = obd->obd_observer->obd_observer;
-        qctxt = &master_obd->u.obt.obt_qctxt;
-
-        LASSERT(qctxt->lqc_handler);
-        rc = qctxt->lqc_handler(master_obd, qdata,
-                                lustre_msg_get_opc(req->rq_reqmsg));
-        if (rc && rc != -EDQUOT)
-                CDEBUG(rc == -EBUSY  ? D_QUOTA : D_ERROR,
-                       "dqacq failed! (rc:%d)\n", rc);
-        req->rq_status = rc;
-
-        /* there are three forms of qunit(historic causes), so we need to
-         * adjust the same form to different forms slaves needed */
-        rc = quota_copy_qdata(req, qdata, QUOTA_REPLY, QUOTA_EXPORT);
-        if (rc < 0) {
-                CDEBUG(D_ERROR, "Can't pack qunit_data\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        /* Block the quota req. b=14840 */
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_BLOCK_QUOTA_REQ, obd_timeout);
-
-        rc = ptlrpc_reply(req);
-out:
-        OBD_FREE(qdata, sizeof(struct qunit_data));
-        RETURN(rc);
-#else
-        return 0;
-#endif /* !__KERNEL__ */
-}
-#endif /* HAVE_QUOTA_SUPPORT */
-
-ldlm_mode_t lck_compat_array[] = {
-        [LCK_EX] LCK_COMPAT_EX,
-        [LCK_PW] LCK_COMPAT_PW,
-        [LCK_PR] LCK_COMPAT_PR,
-        [LCK_CW] LCK_COMPAT_CW,
-        [LCK_CR] LCK_COMPAT_CR,
-        [LCK_NL] LCK_COMPAT_NL,
-        [LCK_GROUP] LCK_COMPAT_GROUP
-};
diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c
deleted file mode 100644
index b63aaba665f92fada1a71192ddf3ca373f8cc5c8..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_lock.c
+++ /dev/null
@@ -1,1968 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/lustre_intent.h>
-#else
-# include <liblustre.h>
-# include <libcfs/kp30.h>
-#endif
-
-#include <obd_class.h>
-#include "ldlm_internal.h"
-
-//struct lustre_lock ldlm_everything_lock;
-
-/* lock's skip list pointers fix mode */
-#define LDLM_JOIN_NONE          0
-#define LDLM_MODE_JOIN_RIGHT    1
-#define LDLM_MODE_JOIN_LEFT     (1 << 1)
-#define LDLM_POLICY_JOIN_RIGHT  (1 << 2)
-#define LDLM_POLICY_JOIN_LEFT   (1 << 3)
-
-/* lock types */
-char *ldlm_lockname[] = {
-        [0] "--",
-        [LCK_EX] "EX",
-        [LCK_PW] "PW",
-        [LCK_PR] "PR",
-        [LCK_CW] "CW",
-        [LCK_CR] "CR",
-        [LCK_NL] "NL",
-        [LCK_GROUP] "GROUP"
-};
-
-char *ldlm_typename[] = {
-        [LDLM_PLAIN] "PLN",
-        [LDLM_EXTENT] "EXT",
-        [LDLM_FLOCK] "FLK",
-        [LDLM_IBITS] "IBT",
-};
-
-char *ldlm_it2str(int it)
-{
-        switch (it) {
-        case IT_OPEN:
-                return "open";
-        case IT_CREAT:
-                return "creat";
-        case (IT_OPEN | IT_CREAT):
-                return "open|creat";
-        case IT_READDIR:
-                return "readdir";
-        case IT_GETATTR:
-                return "getattr";
-        case IT_LOOKUP:
-                return "lookup";
-        case IT_UNLINK:
-                return "unlink";
-        case IT_GETXATTR:
-                return "getxattr";
-        default:
-                CERROR("Unknown intent %d\n", it);
-                return "UNKNOWN";
-        }
-}
-
-extern cfs_mem_cache_t *ldlm_lock_slab;
-
-static ldlm_processing_policy ldlm_processing_policy_table[] = {
-        [LDLM_PLAIN] ldlm_process_plain_lock,
-        [LDLM_EXTENT] ldlm_process_extent_lock,
-#ifdef __KERNEL__
-        [LDLM_FLOCK] ldlm_process_flock_lock,
-#endif
-        [LDLM_IBITS] ldlm_process_inodebits_lock,
-};
-
-ldlm_processing_policy ldlm_get_processing_policy(struct ldlm_resource *res)
-{
-        return ldlm_processing_policy_table[res->lr_type];
-}
-
-void ldlm_register_intent(struct ldlm_namespace *ns, ldlm_res_policy arg)
-{
-        ns->ns_policy = arg;
-}
-
-/*
- * REFCOUNTED LOCK OBJECTS
- */
-
-
-/*
- * Lock refcounts, during creation:
- *   - one special one for allocation, dec'd only once in destroy
- *   - one for being a lock that's in-use
- *   - one for the addref associated with a new lock
- */
-struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock)
-{
-        atomic_inc(&lock->l_refc);
-        return lock;
-}
-
-static void ldlm_lock_free(struct ldlm_lock *lock, size_t size)
-{
-        LASSERT(size == sizeof(*lock));
-        OBD_SLAB_FREE(lock, ldlm_lock_slab, sizeof(*lock));
-}
-
-void ldlm_lock_put(struct ldlm_lock *lock)
-{
-        ENTRY;
-
-        LASSERT(lock->l_resource != LP_POISON);
-        LASSERT(atomic_read(&lock->l_refc) > 0);
-        if (atomic_dec_and_test(&lock->l_refc)) {
-                struct ldlm_resource *res;
-
-                LDLM_DEBUG(lock, "final lock_put on destroyed lock, freeing it.");
-
-                res = lock->l_resource;
-                LASSERT(lock->l_destroyed);
-                LASSERT(list_empty(&lock->l_res_link));
-                LASSERT(list_empty(&lock->l_pending_chain));
-
-                atomic_dec(&res->lr_namespace->ns_locks);
-                ldlm_resource_putref(res);
-                lock->l_resource = NULL;
-                if (lock->l_export) {
-                        class_export_put(lock->l_export);
-                        lock->l_export = NULL;
-                }
-
-                if (lock->l_lvb_data != NULL)
-                        OBD_FREE(lock->l_lvb_data, lock->l_lvb_len);
-
-                ldlm_interval_free(ldlm_interval_detach(lock));
-                OBD_FREE_RCU_CB(lock, sizeof(*lock), &lock->l_handle, 
-                      	        ldlm_lock_free);
-        }
-
-        EXIT;
-}
-
-int ldlm_lock_remove_from_lru_nolock(struct ldlm_lock *lock)
-{
-        int rc = 0;
-        if (!list_empty(&lock->l_lru)) {
-                struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
-                LASSERT(lock->l_resource->lr_type != LDLM_FLOCK);
-                list_del_init(&lock->l_lru);
-                ns->ns_nr_unused--;
-                LASSERT(ns->ns_nr_unused >= 0);
-                rc = 1;
-        }
-        return rc;
-}
-
-int ldlm_lock_remove_from_lru(struct ldlm_lock *lock)
-{
-        struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
-        int rc;
-        ENTRY;
-        spin_lock(&ns->ns_unused_lock);
-        rc = ldlm_lock_remove_from_lru_nolock(lock);
-        spin_unlock(&ns->ns_unused_lock);
-        EXIT;
-        return rc;
-}
-
-void ldlm_lock_add_to_lru_nolock(struct ldlm_lock *lock)
-{
-        struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
-        lock->l_last_used = cfs_time_current();
-        LASSERT(list_empty(&lock->l_lru));
-        list_add_tail(&lock->l_lru, &ns->ns_unused_list);
-        LASSERT(ns->ns_nr_unused >= 0);
-        ns->ns_nr_unused++;
-}
-
-void ldlm_lock_add_to_lru(struct ldlm_lock *lock)
-{
-        struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
-        ENTRY;
-        spin_lock(&ns->ns_unused_lock);
-        ldlm_lock_add_to_lru_nolock(lock);
-        spin_unlock(&ns->ns_unused_lock);
-        EXIT;
-}
-
-void ldlm_lock_touch_in_lru(struct ldlm_lock *lock)
-{
-        struct ldlm_namespace *ns = lock->l_resource->lr_namespace;
-        ENTRY;
-        spin_lock(&ns->ns_unused_lock);
-        if (!list_empty(&lock->l_lru)) {
-                ldlm_lock_remove_from_lru_nolock(lock);
-                ldlm_lock_add_to_lru_nolock(lock);
-        }
-        spin_unlock(&ns->ns_unused_lock);
-        EXIT;
-}
-
-/* This used to have a 'strict' flag, which recovery would use to mark an
- * in-use lock as needing-to-die.  Lest I am ever tempted to put it back, I
- * shall explain why it's gone: with the new hash table scheme, once you call
- * ldlm_lock_destroy, you can never drop your final references on this lock.
- * Because it's not in the hash table anymore.  -phil */
-int ldlm_lock_destroy_internal(struct ldlm_lock *lock)
-{
-        ENTRY;
-
-        if (lock->l_readers || lock->l_writers) {
-                LDLM_ERROR(lock, "lock still has references");
-                ldlm_lock_dump(D_ERROR, lock, 0);
-                LBUG();
-        }
-
-        if (!list_empty(&lock->l_res_link)) {
-                LDLM_ERROR(lock, "lock still on resource");
-                ldlm_lock_dump(D_ERROR, lock, 0);
-                LBUG();
-        }
-
-        if (lock->l_destroyed) {
-                LASSERT(list_empty(&lock->l_lru));
-                EXIT;
-                return 0;
-        }
-        lock->l_destroyed = 1;
-
-        if (lock->l_export)
-                spin_lock(&lock->l_export->exp_ldlm_data.led_lock);
-        list_del_init(&lock->l_export_chain);
-        if (lock->l_export)
-                spin_unlock(&lock->l_export->exp_ldlm_data.led_lock);
-
-        ldlm_lock_remove_from_lru(lock);
-        class_handle_unhash(&lock->l_handle);
-
-#if 0
-        /* Wake anyone waiting for this lock */
-        /* FIXME: I should probably add yet another flag, instead of using
-         * l_export to only call this on clients */
-        if (lock->l_export)
-                class_export_put(lock->l_export);
-        lock->l_export = NULL;
-        if (lock->l_export && lock->l_completion_ast)
-                lock->l_completion_ast(lock, 0);
-#endif
-        EXIT;
-        return 1;
-}
-
-void ldlm_lock_destroy(struct ldlm_lock *lock)
-{
-        int first;
-        ENTRY;
-        lock_res_and_lock(lock);
-        first = ldlm_lock_destroy_internal(lock);
-        unlock_res_and_lock(lock);
-
-        /* drop reference from hashtable only for first destroy */
-        if (first)
-                LDLM_LOCK_PUT(lock);
-        EXIT;
-}
-
-void ldlm_lock_destroy_nolock(struct ldlm_lock *lock)
-{
-        int first;
-        ENTRY;
-        first = ldlm_lock_destroy_internal(lock);
-        /* drop reference from hashtable only for first destroy */
-        if (first)
-                LDLM_LOCK_PUT(lock);
-        EXIT;
-}
-
-/* this is called by portals_handle2object with the handle lock taken */
-static void lock_handle_addref(void *lock)
-{
-        LDLM_LOCK_GET((struct ldlm_lock *)lock);
-}
-
-/*
- * usage: pass in a resource on which you have done ldlm_resource_get
- *        pass in a parent lock on which you have done a ldlm_lock_get
- *        after return, ldlm_*_put the resource and parent
- * returns: lock with refcount 2 - one for current caller and one for remote
- */
-static struct ldlm_lock *ldlm_lock_new(struct ldlm_resource *resource)
-{
-        struct ldlm_lock *lock;
-        ENTRY;
-
-        if (resource == NULL)
-                LBUG();
-
-        OBD_SLAB_ALLOC(lock, ldlm_lock_slab, CFS_ALLOC_IO, sizeof(*lock));
-        if (lock == NULL)
-                RETURN(NULL);
-
-        spin_lock_init(&lock->l_lock);
-        lock->l_resource = ldlm_resource_getref(resource);
-
-        atomic_set(&lock->l_refc, 2);
-        CFS_INIT_LIST_HEAD(&lock->l_res_link);
-        CFS_INIT_LIST_HEAD(&lock->l_lru);
-        CFS_INIT_LIST_HEAD(&lock->l_export_chain);
-        CFS_INIT_LIST_HEAD(&lock->l_pending_chain);
-        CFS_INIT_LIST_HEAD(&lock->l_bl_ast);
-        CFS_INIT_LIST_HEAD(&lock->l_cp_ast);
-        cfs_waitq_init(&lock->l_waitq);
-        lock->l_blocking_lock = NULL;
-        lock->l_sl_mode.prev = NULL;
-        lock->l_sl_mode.next = NULL;
-        lock->l_sl_policy.prev = NULL;
-        lock->l_sl_policy.next = NULL;
-
-        atomic_inc(&resource->lr_namespace->ns_locks);
-        CFS_INIT_LIST_HEAD(&lock->l_handle.h_link);
-        class_handle_hash(&lock->l_handle, lock_handle_addref);
-
-        CFS_INIT_LIST_HEAD(&lock->l_extents_list);
-        spin_lock_init(&lock->l_extents_list_lock);
-        CFS_INIT_LIST_HEAD(&lock->l_cache_locks_list);
-
-        RETURN(lock);
-}
-
-int ldlm_lock_change_resource(struct ldlm_namespace *ns, struct ldlm_lock *lock,
-                              struct ldlm_res_id new_resid)
-{
-        struct ldlm_resource *oldres = lock->l_resource;
-        struct ldlm_resource *newres;
-        int type;
-        ENTRY;
-
-        LASSERT(ns_is_client(ns));
-
-        lock_res_and_lock(lock);
-        if (memcmp(&new_resid, &lock->l_resource->lr_name,
-                   sizeof(lock->l_resource->lr_name)) == 0) {
-                /* Nothing to do */
-                unlock_res_and_lock(lock);
-                RETURN(0);
-        }
-
-        LASSERT(new_resid.name[0] != 0);
-
-        /* This function assumes that the lock isn't on any lists */
-        LASSERT(list_empty(&lock->l_res_link));
-
-        type = oldres->lr_type;
-        unlock_res_and_lock(lock);
-
-        newres = ldlm_resource_get(ns, NULL, new_resid, type, 1);
-        if (newres == NULL) {
-                LBUG();
-                RETURN(-ENOMEM);
-        }
-
-        lock_res_and_lock(lock);
-        LASSERT(memcmp(&new_resid, &lock->l_resource->lr_name,
-                       sizeof(lock->l_resource->lr_name)) != 0);
-        lock_res(newres);
-        lock->l_resource = newres;
-        unlock_res(oldres);
-        unlock_res_and_lock(lock);
-
-        /* ...and the flowers are still standing! */
-        ldlm_resource_putref(oldres);
-
-        RETURN(0);
-}
-
-/*
- *  HANDLES
- */
-
-void ldlm_lock2handle(struct ldlm_lock *lock, struct lustre_handle *lockh)
-{
-        lockh->cookie = lock->l_handle.h_cookie;
-}
-
-/* if flags: atomically get the lock and set the flags.
- *           Return NULL if flag already set
- */
-
-struct ldlm_lock *__ldlm_handle2lock(struct lustre_handle *handle, int flags)
-{
-        struct ldlm_namespace *ns;
-        struct ldlm_lock *lock = NULL, *retval = NULL;
-        ENTRY;
-
-        LASSERT(handle);
-
-        lock = class_handle2object(handle->cookie);
-        if (lock == NULL)
-                RETURN(NULL);
-
-        LASSERT(lock->l_resource != NULL);
-        ns = lock->l_resource->lr_namespace;
-        LASSERT(ns != NULL);
-
-        lock_res_and_lock(lock);
-
-        /* It's unlikely but possible that someone marked the lock as
-         * destroyed after we did handle2object on it */
-        if (lock->l_destroyed) {
-                unlock_res_and_lock(lock);
-                CDEBUG(D_INFO, "lock already destroyed: lock %p\n", lock);
-                LDLM_LOCK_PUT(lock);
-                GOTO(out, retval);
-        }
-
-        if (flags && (lock->l_flags & flags)) {
-                unlock_res_and_lock(lock);
-                LDLM_LOCK_PUT(lock);
-                GOTO(out, retval);
-        }
-
-        if (flags)
-                lock->l_flags |= flags;
-
-        unlock_res_and_lock(lock);
-        retval = lock;
-        EXIT;
- out:
-        return retval;
-}
-
-struct ldlm_lock *ldlm_handle2lock_ns(struct ldlm_namespace *ns,
-                                      struct lustre_handle *handle)
-{
-        struct ldlm_lock *retval = NULL;
-        retval = __ldlm_handle2lock(handle, 0);
-        return retval;
-}
-
-void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc)
-{
-        struct obd_export *exp = lock->l_export?:lock->l_conn_export;
-        /* INODEBITS_INTEROP: If the other side does not support
-         * inodebits, reply with a plain lock descriptor.
-         */
-        if ((lock->l_resource->lr_type == LDLM_IBITS) &&
-            (exp && !(exp->exp_connect_flags & OBD_CONNECT_IBITS))) {
-                struct ldlm_resource res = *lock->l_resource;
-
-                /* Make sure all the right bits are set in this lock we
-                   are going to pass to client */
-                LASSERTF(lock->l_policy_data.l_inodebits.bits ==
-                         (MDS_INODELOCK_LOOKUP|MDS_INODELOCK_UPDATE),
-                         "Inappropriate inode lock bits during "
-                         "conversion " LPU64 "\n",
-                         lock->l_policy_data.l_inodebits.bits);
-                res.lr_type = LDLM_PLAIN;
-                ldlm_res2desc(&res, &desc->l_resource);
-                /* Convert "new" lock mode to something old client can
-                   understand */
-                if ((lock->l_req_mode == LCK_CR) ||
-                    (lock->l_req_mode == LCK_CW))
-                        desc->l_req_mode = LCK_PR;
-                else
-                        desc->l_req_mode = lock->l_req_mode;
-                if ((lock->l_granted_mode == LCK_CR) ||
-                    (lock->l_granted_mode == LCK_CW)) {
-                        desc->l_granted_mode = LCK_PR;
-                } else {
-                        /* We never grant PW/EX locks to clients */
-                        LASSERT((lock->l_granted_mode != LCK_PW) &&
-                                (lock->l_granted_mode != LCK_EX));
-                        desc->l_granted_mode = lock->l_granted_mode;
-                }
-
-                /* We do not copy policy here, because there is no
-                   policy for plain locks */
-        } else {
-                ldlm_res2desc(lock->l_resource, &desc->l_resource);
-                desc->l_req_mode = lock->l_req_mode;
-                desc->l_granted_mode = lock->l_granted_mode;
-                desc->l_policy_data = lock->l_policy_data;
-        }
-}
-
-void ldlm_add_bl_work_item(struct ldlm_lock *lock, struct ldlm_lock *new,
-                           struct list_head *work_list)
-{
-        if ((lock->l_flags & LDLM_FL_AST_SENT) == 0) {
-                LDLM_DEBUG(lock, "lock incompatible; sending blocking AST.");
-                lock->l_flags |= LDLM_FL_AST_SENT;
-                /* If the enqueuing client said so, tell the AST recipient to
-                 * discard dirty data, rather than writing back. */
-                if (new->l_flags & LDLM_AST_DISCARD_DATA)
-                        lock->l_flags |= LDLM_FL_DISCARD_DATA;
-                LASSERT(list_empty(&lock->l_bl_ast));
-                list_add(&lock->l_bl_ast, work_list);
-                LDLM_LOCK_GET(lock);
-                LASSERT(lock->l_blocking_lock == NULL);
-                lock->l_blocking_lock = LDLM_LOCK_GET(new);
-        }
-}
-
-void ldlm_add_cp_work_item(struct ldlm_lock *lock, struct list_head *work_list)
-{
-        if ((lock->l_flags & LDLM_FL_CP_REQD) == 0) {
-                lock->l_flags |= LDLM_FL_CP_REQD;
-                LDLM_DEBUG(lock, "lock granted; sending completion AST.");
-                LASSERT(list_empty(&lock->l_cp_ast));
-                list_add(&lock->l_cp_ast, work_list);
-                LDLM_LOCK_GET(lock);
-        }
-}
-
-/* must be called with lr_lock held */
-void ldlm_add_ast_work_item(struct ldlm_lock *lock, struct ldlm_lock *new,
-                                struct list_head *work_list)
-{
-        ENTRY;
-        check_res_locked(lock->l_resource);
-        if (new)
-                ldlm_add_bl_work_item(lock, new, work_list);
-        else 
-                ldlm_add_cp_work_item(lock, work_list);
-        EXIT;
-}
-
-void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode)
-{
-        struct ldlm_lock *lock;
-
-        lock = ldlm_handle2lock(lockh);
-        LASSERT(lock != NULL);
-        ldlm_lock_addref_internal(lock, mode);
-        LDLM_LOCK_PUT(lock);
-}
-
-void ldlm_lock_addref_internal_nolock(struct ldlm_lock *lock, __u32 mode)
-{
-        ldlm_lock_remove_from_lru(lock);
-        if (mode & (LCK_NL | LCK_CR | LCK_PR))
-                lock->l_readers++;
-        if (mode & (LCK_EX | LCK_CW | LCK_PW | LCK_GROUP))
-                lock->l_writers++;
-        LDLM_LOCK_GET(lock);
-        LDLM_DEBUG(lock, "ldlm_lock_addref(%s)", ldlm_lockname[mode]);
-}
-
-/* only called for local locks */
-void ldlm_lock_addref_internal(struct ldlm_lock *lock, __u32 mode)
-{
-        lock_res_and_lock(lock);
-        ldlm_lock_addref_internal_nolock(lock, mode);
-        unlock_res_and_lock(lock);
-}
-
-/* only called in ldlm_flock_destroy and for local locks.
- * for LDLM_FLOCK type locks, l_blocking_ast is null, and
- * ldlm_lock_remove_from_lru() does nothing, it is safe 
- * for ldlm_flock_destroy usage by dropping some code */
-void ldlm_lock_decref_internal_nolock(struct ldlm_lock *lock, __u32 mode)
-{
-        LDLM_DEBUG(lock, "ldlm_lock_decref(%s)", ldlm_lockname[mode]);
-        if (mode & (LCK_NL | LCK_CR | LCK_PR)) {
-                LASSERT(lock->l_readers > 0);
-                lock->l_readers--;
-        }
-        if (mode & (LCK_EX | LCK_CW | LCK_PW | LCK_GROUP)) {
-                LASSERT(lock->l_writers > 0);
-                lock->l_writers--;
-        }
-
-        LDLM_LOCK_PUT(lock);    /* matches the ldlm_lock_get in addref */
-}
-
-void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode)
-{
-        struct ldlm_namespace *ns;
-        ENTRY;
-
-        lock_res_and_lock(lock);
-
-        ns = lock->l_resource->lr_namespace;
-
-        ldlm_lock_decref_internal_nolock(lock, mode);
-
-        if (lock->l_flags & LDLM_FL_LOCAL &&
-            !lock->l_readers && !lock->l_writers) {
-                /* If this is a local lock on a server namespace and this was
-                 * the last reference, cancel the lock. */
-                CDEBUG(D_INFO, "forcing cancel of local lock\n");
-                lock->l_flags |= LDLM_FL_CBPENDING;
-        }
-
-        if (!lock->l_readers && !lock->l_writers &&
-            (lock->l_flags & LDLM_FL_CBPENDING)) {
-                /* If we received a blocked AST and this was the last reference,
-                 * run the callback. */
-                if (ns_is_server(ns) && lock->l_export)
-                        CERROR("FL_CBPENDING set on non-local lock--just a "
-                               "warning\n");
-
-                LDLM_DEBUG(lock, "final decref done on cbpending lock");
-
-                LDLM_LOCK_GET(lock); /* dropped by bl thread */
-                ldlm_lock_remove_from_lru(lock);
-                unlock_res_and_lock(lock);
-                if ((lock->l_flags & LDLM_FL_ATOMIC_CB) ||
-                    ldlm_bl_to_thread_lock(ns, NULL, lock) != 0)
-                        ldlm_handle_bl_callback(ns, NULL, lock);
-        } else if (ns_is_client(ns) &&
-                   !lock->l_readers && !lock->l_writers &&
-                   !(lock->l_flags & LDLM_FL_NO_LRU) &&
-                   !(lock->l_flags & LDLM_FL_BL_AST)) {
-                /* If this is a client-side namespace and this was the last
-                 * reference, put it on the LRU. */
-                ldlm_lock_add_to_lru(lock);
-                unlock_res_and_lock(lock);
-                /* Call ldlm_cancel_lru() only if EARLY_CANCEL and LRU RESIZE 
-                 * are not supported by the server, otherwise, it is done on 
-                 * enqueue. */
-                if (!exp_connect_cancelset(lock->l_conn_export) && 
-                    !ns_connect_lru_resize(ns))
-                        ldlm_cancel_lru(ns, 0, LDLM_ASYNC, 0);
-        } else {
-                unlock_res_and_lock(lock);
-        }
-
-        EXIT;
-}
-
-void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode)
-{
-        struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0);
-        LASSERTF(lock != NULL, "Non-existing lock: "LPX64"\n", lockh->cookie);
-        ldlm_lock_decref_internal(lock, mode);
-        LDLM_LOCK_PUT(lock);
-}
-
-/* This will drop a lock reference and mark it for destruction, but will not
- * necessarily cancel the lock before returning. */
-void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode)
-{
-        struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0);
-        ENTRY;
-
-        LASSERT(lock != NULL);
-
-        LDLM_DEBUG(lock, "ldlm_lock_decref(%s)", ldlm_lockname[mode]);
-        lock_res_and_lock(lock);
-        lock->l_flags |= LDLM_FL_CBPENDING;
-        unlock_res_and_lock(lock);
-        ldlm_lock_decref_internal(lock, mode);
-        LDLM_LOCK_PUT(lock);
-}
-
-/*
- * search_granted_lock
- *
- * Description:
- *      Finds a position to insert the new lock.
- * Parameters:
- *      queue [input]:  the granted list where search acts on;
- *      req [input]:    the lock whose position to be located;
- *      lockp [output]: the position where the lock should be inserted before, or
- *                      NULL indicating @req should be appended to @queue.
- * Return Values:
- *      Bit-masks combination of following values indicating in which way the 
- *      lock need to be inserted.
- *      - LDLM_JOIN_NONE:       noting about skip list needs to be fixed;
- *      - LDLM_MODE_JOIN_RIGHT: @req needs join right becoming the head of a 
- *                              mode group;
- *      - LDLM_POLICY_JOIN_RIGHT: @req needs join right becoming the head of
- *                                a policy group.
- * NOTE: called by
- *  - ldlm_grant_lock_with_skiplist
- */
-static int search_granted_lock(struct list_head *queue, 
-                        struct ldlm_lock *req,
-                        struct ldlm_lock **lockp)
-{
-        struct list_head *tmp, *tmp_tail;
-        struct ldlm_lock *lock, *mode_head_lock;
-        int rc = LDLM_JOIN_NONE;
-        ENTRY;
-
-        list_for_each(tmp, queue) {
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (lock->l_req_mode != req->l_req_mode) {
-                        if (LDLM_SL_HEAD(&lock->l_sl_mode))
-                                tmp = &list_entry(lock->l_sl_mode.next,
-                                                  struct ldlm_lock,
-                                                  l_sl_mode)->l_res_link;
-                        continue;
-                }
-                
-                /* found the same mode group */
-                if (lock->l_resource->lr_type == LDLM_PLAIN) {
-                        *lockp = lock;
-                        rc = LDLM_MODE_JOIN_RIGHT;
-                        GOTO(out, rc);
-                } else if (lock->l_resource->lr_type == LDLM_IBITS) {
-                        tmp_tail = tmp;
-                        if (LDLM_SL_HEAD(&lock->l_sl_mode))
-                                tmp_tail = &list_entry(lock->l_sl_mode.next,
-                                                       struct ldlm_lock,
-                                                       l_sl_mode)->l_res_link;
-                        mode_head_lock = lock;
-                        for (;;) {
-                                if (lock->l_policy_data.l_inodebits.bits ==
-                                    req->l_policy_data.l_inodebits.bits) {
-                                        /* matched policy lock is found */
-                                        *lockp = lock;
-                                        rc |= LDLM_POLICY_JOIN_RIGHT;
-
-                                        /* if the policy group head is also a 
-                                         * mode group head or a single mode
-                                         * group lock */
-                                        if (LDLM_SL_HEAD(&lock->l_sl_mode) ||
-                                            (tmp == tmp_tail &&
-                                             LDLM_SL_EMPTY(&lock->l_sl_mode)))
-                                                rc |= LDLM_MODE_JOIN_RIGHT;
-                                        GOTO(out, rc);
-                                }
-
-                                if (LDLM_SL_HEAD(&lock->l_sl_policy))
-                                        tmp = &list_entry(lock->l_sl_policy.next,
-                                                          struct ldlm_lock,
-                                                          l_sl_policy)->l_res_link;
-
-                                if (tmp == tmp_tail)
-                                        break;
-                                else
-                                        tmp = tmp->next;
-                                lock = list_entry(tmp, struct ldlm_lock, 
-                                                  l_res_link);
-                        }  /* for all locks in the matched mode group */
-
-                        /* no matched policy group is found, insert before
-                         * the mode group head lock */
-                        *lockp = mode_head_lock;
-                        rc = LDLM_MODE_JOIN_RIGHT;
-                        GOTO(out, rc);
-                } else {
-                        LDLM_ERROR(lock, "is not LDLM_PLAIN or LDLM_IBITS lock");
-                        LBUG();
-                }
-        }
-
-        /* no matched mode group is found, append to the end */
-        *lockp = NULL;
-        rc = LDLM_JOIN_NONE;
-        EXIT;
-out:
-        return rc;
-}
-
-static void ldlm_granted_list_add_lock(struct ldlm_lock *lock, 
-                                       struct ldlm_lock *lockp,
-                                       int join)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        ENTRY;
-
-        LASSERT(lockp || join == LDLM_JOIN_NONE);
-
-        check_res_locked(res);
-
-        ldlm_resource_dump(D_OTHER, res);
-        CDEBUG(D_OTHER, "About to add this lock:\n");
-        ldlm_lock_dump(D_OTHER, lock, 0);
-
-        if (lock->l_destroyed) {
-                CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n");
-                return;
-        }
-
-        LASSERT(list_empty(&lock->l_res_link));
-
-        if (!lockp)
-                list_add_tail(&lock->l_res_link, &lock->l_resource->lr_granted);
-        else if ((join & LDLM_MODE_JOIN_LEFT) || (join & LDLM_POLICY_JOIN_LEFT))
-                list_add(&lock->l_res_link, &lockp->l_res_link);
-        else
-                list_add_tail(&lock->l_res_link, &lockp->l_res_link);
-
-        /* fix skip lists */
-        if (join & LDLM_MODE_JOIN_RIGHT) {
-                LASSERT(! LDLM_SL_TAIL(&lockp->l_sl_mode));
-                if (LDLM_SL_EMPTY(&lockp->l_sl_mode)) {
-                        lock->l_sl_mode.next = &lockp->l_sl_mode;
-                        lockp->l_sl_mode.prev = &lock->l_sl_mode;
-                } else if (LDLM_SL_HEAD(&lockp->l_sl_mode)) {
-                        lock->l_sl_mode.next = lockp->l_sl_mode.next;
-                        lockp->l_sl_mode.next = NULL;
-                        lock->l_sl_mode.next->prev = &lock->l_sl_mode;
-                }
-        } else if (join & LDLM_MODE_JOIN_LEFT) {
-                LASSERT(! LDLM_SL_HEAD(&lockp->l_sl_mode));
-                if (LDLM_SL_EMPTY(&lockp->l_sl_mode)) {
-                        lock->l_sl_mode.prev = &lockp->l_sl_mode;
-                        lockp->l_sl_mode.next = &lock->l_sl_mode;
-                } else if (LDLM_SL_TAIL(&lockp->l_sl_mode)) {
-                        lock->l_sl_mode.prev = lockp->l_sl_mode.prev;
-                        lockp->l_sl_mode.prev = NULL;
-                        lock->l_sl_mode.prev->next = &lock->l_sl_mode;
-                }
-        }
-        
-        if (join & LDLM_POLICY_JOIN_RIGHT) {
-                LASSERT(! LDLM_SL_TAIL(&lockp->l_sl_policy));
-                if (LDLM_SL_EMPTY(&lockp->l_sl_policy)) {
-                        lock->l_sl_policy.next = &lockp->l_sl_policy;
-                        lockp->l_sl_policy.prev = &lock->l_sl_policy;
-                } else if (LDLM_SL_HEAD(&lockp->l_sl_policy)) {
-                        lock->l_sl_policy.next = lockp->l_sl_policy.next;
-                        lockp->l_sl_policy.next = NULL;
-                        lock->l_sl_policy.next->prev = &lock->l_sl_policy;
-                }
-        } else if (join & LDLM_POLICY_JOIN_LEFT) {
-                LASSERT(! LDLM_SL_HEAD(&lockp->l_sl_policy));
-                if (LDLM_SL_EMPTY(&lockp->l_sl_policy)) {
-                        lock->l_sl_policy.prev = &lockp->l_sl_policy;
-                        lockp->l_sl_policy.next = &lock->l_sl_policy;
-                } else if (LDLM_SL_TAIL(&lockp->l_sl_policy)) {
-                        lock->l_sl_policy.prev = lockp->l_sl_policy.prev;
-                        lockp->l_sl_policy.prev = NULL;
-                        lock->l_sl_policy.prev->next = &lock->l_sl_policy;
-                }
-        }
-
-        EXIT;
-}
-
-static void ldlm_grant_lock_with_skiplist(struct ldlm_lock *lock)
-{
-        int join = LDLM_JOIN_NONE;
-        struct ldlm_lock *lockp = NULL;
-        ENTRY;
-
-        LASSERT(lock->l_req_mode == lock->l_granted_mode);
-
-        join = search_granted_lock(&lock->l_resource->lr_granted, lock, &lockp);
-        ldlm_granted_list_add_lock(lock, lockp, join);
-        EXIT;
-}
-
-/* NOTE: called by
- *  - ldlm_lock_enqueue
- *  - ldlm_reprocess_queue
- *  - ldlm_lock_convert
- *
- * must be called with lr_lock held
- */
-void ldlm_grant_lock(struct ldlm_lock *lock, struct list_head *work_list)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        ENTRY;
-
-        check_res_locked(res);
-
-        lock->l_granted_mode = lock->l_req_mode;
-        if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS)
-                ldlm_grant_lock_with_skiplist(lock);
-        else if (res->lr_type == LDLM_EXTENT)
-                ldlm_extent_add_lock(res, lock);
-        else
-                ldlm_resource_add_lock(res, &res->lr_granted, lock);
-
-        if (lock->l_granted_mode < res->lr_most_restr)
-                res->lr_most_restr = lock->l_granted_mode;
-
-        if (work_list && lock->l_completion_ast != NULL)
-                ldlm_add_ast_work_item(lock, NULL, work_list);
-
-        ldlm_pool_add(&res->lr_namespace->ns_pool, lock);
-        EXIT;
-}
-
-/* returns a referenced lock or NULL.  See the flag descriptions below, in the
- * comment above ldlm_lock_match */
-static struct ldlm_lock *search_queue(struct list_head *queue,
-                                      ldlm_mode_t *mode,
-                                      ldlm_policy_data_t *policy,
-                                      struct ldlm_lock *old_lock, int flags)
-{
-        struct ldlm_lock *lock;
-        struct list_head *tmp;
-
-        list_for_each(tmp, queue) {
-                ldlm_mode_t match;
-
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (lock == old_lock)
-                        continue;
-
-                /* llite sometimes wants to match locks that will be
-                 * canceled when their users drop, but we allow it to match
-                 * if it passes in CBPENDING and the lock still has users.
-                 * this is generally only going to be used by children
-                 * whose parents already hold a lock so forward progress
-                 * can still happen. */
-                if (lock->l_flags & LDLM_FL_CBPENDING &&
-                    !(flags & LDLM_FL_CBPENDING))
-                        continue;
-                if (lock->l_flags & LDLM_FL_CBPENDING &&
-                    lock->l_readers == 0 && lock->l_writers == 0)
-                        continue;
-
-                if (!(lock->l_req_mode & *mode))
-                        continue;
-
-                match = lock->l_req_mode;
-                if (lock->l_resource->lr_type == LDLM_EXTENT &&
-                    (lock->l_policy_data.l_extent.start >
-                     policy->l_extent.start ||
-                     lock->l_policy_data.l_extent.end < policy->l_extent.end))
-                        continue;
-
-                if (unlikely(match == LCK_GROUP) &&
-                    lock->l_resource->lr_type == LDLM_EXTENT &&
-                    lock->l_policy_data.l_extent.gid != policy->l_extent.gid)
-                        continue;
-
-                /* We match if we have existing lock with same or wider set
-                   of bits. */
-                if (lock->l_resource->lr_type == LDLM_IBITS &&
-                     ((lock->l_policy_data.l_inodebits.bits &
-                      policy->l_inodebits.bits) !=
-                      policy->l_inodebits.bits))
-                        continue;
-
-                if (lock->l_destroyed || (lock->l_flags & LDLM_FL_FAILED))
-                        continue;
-
-                if ((flags & LDLM_FL_LOCAL_ONLY) &&
-                    !(lock->l_flags & LDLM_FL_LOCAL))
-                        continue;
-
-                if (flags & LDLM_FL_TEST_LOCK) {
-                        LDLM_LOCK_GET(lock);
-                        ldlm_lock_touch_in_lru(lock);
-                } else {
-                        ldlm_lock_addref_internal_nolock(lock, match);
-                }
-                *mode = match;
-                return lock;
-        }
-
-        return NULL;
-}
-
-void ldlm_lock_allow_match(struct ldlm_lock *lock)
-{
-        lock_res_and_lock(lock);
-        lock->l_flags |= LDLM_FL_LVB_READY;
-        cfs_waitq_signal(&lock->l_waitq);
-        unlock_res_and_lock(lock);
-}
-
-/* Can be called in two ways:
- *
- * If 'ns' is NULL, then lockh describes an existing lock that we want to look
- * for a duplicate of.
- *
- * Otherwise, all of the fields must be filled in, to match against.
- *
- * If 'flags' contains LDLM_FL_LOCAL_ONLY, then only match local locks on the
- *     server (ie, connh is NULL)
- * If 'flags' contains LDLM_FL_BLOCK_GRANTED, then only locks on the granted
- *     list will be considered
- * If 'flags' contains LDLM_FL_CBPENDING, then locks that have been marked
- *     to be canceled can still be matched as long as they still have reader
- *     or writer refernces
- * If 'flags' contains LDLM_FL_TEST_LOCK, then don't actually reference a lock,
- *     just tell us if we would have matched.
- *
- * Returns 1 if it finds an already-existing lock that is compatible; in this
- * case, lockh is filled in with a addref()ed lock
- */
-ldlm_mode_t ldlm_lock_match(struct ldlm_namespace *ns, int flags,
-                            struct ldlm_res_id *res_id, ldlm_type_t type,
-                            ldlm_policy_data_t *policy, ldlm_mode_t mode,
-                            struct lustre_handle *lockh)
-{
-        struct ldlm_resource *res;
-        struct ldlm_lock *lock, *old_lock = NULL;
-        int rc = 0;
-        ENTRY;
-
-        if (ns == NULL) {
-                old_lock = ldlm_handle2lock(lockh);
-                LASSERT(old_lock);
-
-                ns = old_lock->l_resource->lr_namespace;
-                res_id = &old_lock->l_resource->lr_name;
-                type = old_lock->l_resource->lr_type;
-                mode = old_lock->l_req_mode;
-        }
-
-        res = ldlm_resource_get(ns, NULL, *res_id, type, 0);
-        if (res == NULL) {
-                LASSERT(old_lock == NULL);
-                RETURN(0);
-        }
-
-        lock_res(res);
-
-        lock = search_queue(&res->lr_granted, &mode, policy, old_lock, flags);
-        if (lock != NULL)
-                GOTO(out, rc = 1);
-        if (flags & LDLM_FL_BLOCK_GRANTED)
-                GOTO(out, rc = 0);
-        lock = search_queue(&res->lr_converting, &mode, policy, old_lock, flags);
-        if (lock != NULL)
-                GOTO(out, rc = 1);
-        lock = search_queue(&res->lr_waiting, &mode, policy, old_lock, flags);
-        if (lock != NULL)
-                GOTO(out, rc = 1);
-
-        EXIT;
- out:
-        unlock_res(res);
-        ldlm_resource_putref(res);
-
-        if (lock) {
-                ldlm_lock2handle(lock, lockh);
-                if ((flags & LDLM_FL_LVB_READY) && (!(lock->l_flags & LDLM_FL_LVB_READY))) {
-                        struct l_wait_info lwi;
-                        if (lock->l_completion_ast) {
-                                int err = lock->l_completion_ast(lock,
-                                                          LDLM_FL_WAIT_NOREPROC,
-                                                                 NULL);
-                                if (err) {
-                                        if (flags & LDLM_FL_TEST_LOCK)
-                                                LDLM_LOCK_PUT(lock);
-                                        else
-                                                ldlm_lock_decref_internal(lock, mode);
-                                        rc = 0;
-                                        goto out2;
-                                }
-                        }
-
-                        lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(obd_timeout), NULL,
-                                               LWI_ON_SIGNAL_NOOP, NULL);
-
-                        /* XXX FIXME see comment on CAN_MATCH in lustre_dlm.h */
-                        l_wait_event(lock->l_waitq,
-                                     (lock->l_flags & LDLM_FL_LVB_READY), &lwi);
-                }
-        }
- out2:
-        if (rc) {
-                LDLM_DEBUG(lock, "matched ("LPU64" "LPU64")",
-                           (type == LDLM_PLAIN || type == LDLM_IBITS) ?
-                                res_id->name[2] : policy->l_extent.start,
-                           (type == LDLM_PLAIN || type == LDLM_IBITS) ?
-                                res_id->name[3] : policy->l_extent.end);
-        } else if (!(flags & LDLM_FL_TEST_LOCK)) {/*less verbose for test-only*/
-                LDLM_DEBUG_NOLOCK("not matched ns %p type %u mode %u res "
-                                  LPU64"/"LPU64" ("LPU64" "LPU64")", ns,
-                                  type, mode, res_id->name[0], res_id->name[1],
-                                  (type == LDLM_PLAIN || type == LDLM_IBITS) ?
-                                        res_id->name[2] :policy->l_extent.start,
-                                (type == LDLM_PLAIN || type == LDLM_IBITS) ?
-                                        res_id->name[3] : policy->l_extent.end);
-        }
-        if (old_lock)
-                LDLM_LOCK_PUT(old_lock);
-        if (flags & LDLM_FL_TEST_LOCK && rc)
-                LDLM_LOCK_PUT(lock);
-
-        return rc ? mode : 0;
-}
-
-/* Returns a referenced lock */
-struct ldlm_lock *ldlm_lock_create(struct ldlm_namespace *ns,
-                                   struct ldlm_res_id res_id, ldlm_type_t type,
-                                   ldlm_mode_t mode,
-                                   ldlm_blocking_callback blocking,
-                                   ldlm_completion_callback completion,
-                                   ldlm_glimpse_callback glimpse,
-                                   void *data, __u32 lvb_len)
-{
-        struct ldlm_lock *lock;
-        struct ldlm_resource *res;
-        ENTRY;
-
-        res = ldlm_resource_get(ns, NULL, res_id, type, 1);
-        if (res == NULL)
-                RETURN(NULL);
-
-        lock = ldlm_lock_new(res);
-        ldlm_resource_putref(res);
-
-        if (lock == NULL)
-                RETURN(NULL);
-
-        lock->l_req_mode = mode;
-        lock->l_ast_data = data;
-        lock->l_blocking_ast = blocking;
-        lock->l_completion_ast = completion;
-        lock->l_glimpse_ast = glimpse;
-        lock->l_pid = cfs_curproc_pid();
-
-        lock->l_tree_node = NULL;
-        /* if this is the extent lock, allocate the interval tree node */
-        if (type == LDLM_EXTENT) {
-                if (ldlm_interval_alloc(lock) == NULL)
-                        GOTO(out, 0);
-        }
-
-        if (lvb_len) {
-                lock->l_lvb_len = lvb_len;
-                OBD_ALLOC(lock->l_lvb_data, lvb_len);
-                if (lock->l_lvb_data == NULL)
-                        GOTO(out, 0);
-        }
-
-        RETURN(lock);
-
-out:
-        if (lock->l_lvb_data)
-                OBD_FREE(lock->l_lvb_data, lvb_len);
-        ldlm_interval_free(ldlm_interval_detach(lock));
-        OBD_SLAB_FREE(lock, ldlm_lock_slab, sizeof(*lock));
-        return NULL;
-}
-
-ldlm_error_t ldlm_lock_enqueue(struct ldlm_namespace *ns,
-                               struct ldlm_lock **lockp,
-                               void *cookie, int *flags)
-{
-        struct ldlm_lock *lock = *lockp;
-        struct ldlm_resource *res = lock->l_resource;
-        int local = ns_is_client(res->lr_namespace);
-        ldlm_processing_policy policy;
-        ldlm_error_t rc = ELDLM_OK;
-        struct ldlm_interval *node = NULL;
-        ENTRY;
-
-        do_gettimeofday(&lock->l_enqueued_time);
-        /* policies are not executed on the client or during replay */
-        if ((*flags & (LDLM_FL_HAS_INTENT|LDLM_FL_REPLAY)) == LDLM_FL_HAS_INTENT
-            && !local && ns->ns_policy) {
-                rc = ns->ns_policy(ns, lockp, cookie, lock->l_req_mode, *flags,
-                                   NULL);
-                if (rc == ELDLM_LOCK_REPLACED) {
-                        /* The lock that was returned has already been granted,
-                         * and placed into lockp.  If it's not the same as the
-                         * one we passed in, then destroy the old one and our
-                         * work here is done. */
-                        if (lock != *lockp) {
-                                ldlm_lock_destroy(lock);
-                                LDLM_LOCK_PUT(lock);
-                        }
-                        *flags |= LDLM_FL_LOCK_CHANGED;
-                        RETURN(0);
-                } else if (rc != ELDLM_OK ||
-                           (rc == ELDLM_OK && (*flags & LDLM_FL_INTENT_ONLY))) {
-                        ldlm_lock_destroy(lock);
-                        RETURN(rc);
-                }
-        }
-
-        /* For a replaying lock, it might be already in granted list. So
-         * unlinking the lock will cause the interval node to be freed, we
-         * have to allocate the interval node early otherwise we can't regrant
-         * this lock in the future. - jay */
-        if (!local && (*flags & LDLM_FL_REPLAY) && res->lr_type == LDLM_EXTENT)
-                OBD_SLAB_ALLOC(node, ldlm_interval_slab, CFS_ALLOC_IO,
-                               sizeof(*node));
-
-        lock_res_and_lock(lock);
-        if (local && lock->l_req_mode == lock->l_granted_mode) {
-                /* The server returned a blocked lock, but it was granted
-                 * before we got a chance to actually enqueue it.  We don't
-                 * need to do anything else. */
-                *flags &= ~(LDLM_FL_BLOCK_GRANTED |
-                            LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_WAIT);
-                GOTO(out, ELDLM_OK);
-        }
-
-        ldlm_resource_unlink_lock(lock);
-        if (res->lr_type == LDLM_EXTENT && lock->l_tree_node == NULL) {
-                if (node == NULL) {
-                        ldlm_lock_destroy_nolock(lock);
-                        GOTO(out, rc = -ENOMEM);
-                }
-
-                CFS_INIT_LIST_HEAD(&node->li_group);
-                ldlm_interval_attach(node, lock);
-                node = NULL;
-        }
-
-        /* Some flags from the enqueue want to make it into the AST, via the
-         * lock's l_flags. */
-        lock->l_flags |= *flags & LDLM_AST_DISCARD_DATA;
-
-        /* This distinction between local lock trees is very important; a client
-         * namespace only has information about locks taken by that client, and
-         * thus doesn't have enough information to decide for itself if it can
-         * be granted (below).  In this case, we do exactly what the server
-         * tells us to do, as dictated by the 'flags'.
-         *
-         * We do exactly the same thing during recovery, when the server is
-         * more or less trusting the clients not to lie.
-         *
-         * FIXME (bug 268): Detect obvious lies by checking compatibility in
-         * granted/converting queues. */
-        if (local) {
-                if (*flags & LDLM_FL_BLOCK_CONV)
-                        ldlm_resource_add_lock(res, &res->lr_converting, lock);
-                else if (*flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED))
-                        ldlm_resource_add_lock(res, &res->lr_waiting, lock);
-                else
-                        ldlm_grant_lock(lock, NULL);
-                GOTO(out, ELDLM_OK);
-        } else if (*flags & LDLM_FL_REPLAY) {
-                if (*flags & LDLM_FL_BLOCK_CONV) {
-                        ldlm_resource_add_lock(res, &res->lr_converting, lock);
-                        GOTO(out, ELDLM_OK);
-                } else if (*flags & LDLM_FL_BLOCK_WAIT) {
-                        ldlm_resource_add_lock(res, &res->lr_waiting, lock);
-                        GOTO(out, ELDLM_OK);
-                } else if (*flags & LDLM_FL_BLOCK_GRANTED) {
-                        ldlm_grant_lock(lock, NULL);
-                        GOTO(out, ELDLM_OK);
-                }
-                /* If no flags, fall through to normal enqueue path. */
-        }
-
-        policy = ldlm_processing_policy_table[res->lr_type];
-        policy(lock, flags, 1, &rc, NULL);
-        GOTO(out, rc);
-out:
-        unlock_res_and_lock(lock);
-        if (node)
-                OBD_SLAB_FREE(node, ldlm_interval_slab, sizeof(*node));
-        return rc;
-}
-
-/* Must be called with namespace taken: queue is waiting or converting. */
-int ldlm_reprocess_queue(struct ldlm_resource *res, struct list_head *queue,
-                         struct list_head *work_list)
-{
-        struct list_head *tmp, *pos;
-        ldlm_processing_policy policy;
-        int flags;
-        int rc = LDLM_ITER_CONTINUE;
-        ldlm_error_t err;
-        ENTRY;
-
-        check_res_locked(res);
-
-        policy = ldlm_processing_policy_table[res->lr_type];
-        LASSERT(policy);
-
-        list_for_each_safe(tmp, pos, queue) {
-                struct ldlm_lock *pending;
-                pending = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                CDEBUG(D_INFO, "Reprocessing lock %p\n", pending);
-
-                flags = 0;
-                rc = policy(pending, &flags, 0, &err, work_list);
-                if (rc != LDLM_ITER_CONTINUE)
-                        break;
-        }
-
-        RETURN(rc);
-}
-
-/* Helper function for pair ldlm_run_{bl,cp}_ast_work().
- * 
- * Send an existing rpc set specified by @arg->set and then
- * destroy it. Create new one if @do_create flag is set. */
-static void
-ldlm_send_and_maybe_create_set(struct ldlm_cb_set_arg *arg, int do_create)
-{
-        int rc;
-
-        rc = ptlrpc_set_wait(arg->set);
-        if (arg->type == LDLM_BL_CALLBACK)
-                OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2);
-        ptlrpc_set_destroy(arg->set);
-
-        if (do_create)
-                arg->set = ptlrpc_prep_set();
-}
-
-int ldlm_run_bl_ast_work(struct list_head *rpc_list)
-{
-        struct ldlm_cb_set_arg arg;
-        struct list_head *tmp, *pos;
-        struct ldlm_lock_desc d;
-        int ast_count;
-        int rc = 0;
-        ENTRY;
-
-        arg.set = ptlrpc_prep_set();
-        atomic_set(&arg.restart, 0);
-        arg.type = LDLM_BL_CALLBACK;
-
-        ast_count = 0;
-        list_for_each_safe(tmp, pos, rpc_list) {
-                struct ldlm_lock *lock =
-                        list_entry(tmp, struct ldlm_lock, l_bl_ast);
-
-                /* nobody should touch l_bl_ast */
-                lock_res_and_lock(lock);
-                list_del_init(&lock->l_bl_ast);
-
-                LASSERT(lock->l_flags & LDLM_FL_AST_SENT);
-                LASSERT(lock->l_bl_ast_run == 0);
-                LASSERT(lock->l_blocking_lock);
-                lock->l_bl_ast_run++;
-                unlock_res_and_lock(lock);
-
-                ldlm_lock2desc(lock->l_blocking_lock, &d);
-
-                LDLM_LOCK_PUT(lock->l_blocking_lock);
-                lock->l_blocking_lock = NULL;
-                rc = lock->l_blocking_ast(lock, &d, (void *)&arg, 
-                                          LDLM_CB_BLOCKING);
-                LDLM_LOCK_PUT(lock);
-                ast_count++;
-
-                /* Send the request set if it exceeds the PARALLEL_AST_LIMIT,
-                 * and create a new set for requests that remained in
-                 * @rpc_list */
-                if (unlikely(ast_count == PARALLEL_AST_LIMIT)) {
-                        ldlm_send_and_maybe_create_set(&arg, 1);
-                        ast_count = 0;
-                }
-        }
-
-        if (ast_count > 0)
-                ldlm_send_and_maybe_create_set(&arg, 0);
-        else
-                /* In case when number of ASTs is multiply of
-                 * PARALLEL_AST_LIMIT or @rpc_list was initially empty,
-                 * @arg.set must be destroyed here, otherwise we get 
-                 * write memory leaking. */
-                ptlrpc_set_destroy(arg.set);
-
-        RETURN(atomic_read(&arg.restart) ? -ERESTART : 0);
-}
-
-int ldlm_run_cp_ast_work(struct list_head *rpc_list)
-{
-        struct ldlm_cb_set_arg arg;
-        struct list_head *tmp, *pos;
-        int ast_count;
-        int rc = 0;
-        ENTRY;
-
-        arg.set = ptlrpc_prep_set();
-        atomic_set(&arg.restart, 0);
-        arg.type = LDLM_CP_CALLBACK;
-
-        /* It's possible to receive a completion AST before we've set
-         * the l_completion_ast pointer: either because the AST arrived
-         * before the reply, or simply because there's a small race
-         * window between receiving the reply and finishing the local
-         * enqueue. (bug 842)
-         *
-         * This can't happen with the blocking_ast, however, because we
-         * will never call the local blocking_ast until we drop our
-         * reader/writer reference, which we won't do until we get the
-         * reply and finish enqueueing. */
-        
-        ast_count = 0;
-        list_for_each_safe(tmp, pos, rpc_list) {
-                struct ldlm_lock *lock =
-                        list_entry(tmp, struct ldlm_lock, l_cp_ast);
-                ldlm_completion_callback completion_callback;
-
-                /* nobody should touch l_cp_ast */
-                lock_res_and_lock(lock);
-                list_del_init(&lock->l_cp_ast);
-                LASSERT(lock->l_flags & LDLM_FL_CP_REQD);
-                /* save l_completion_ast since it can be changed by
-                 * mds_intent_policy(), see bug 14225 */
-                completion_callback = lock->l_completion_ast;
-                lock->l_flags &= ~LDLM_FL_CP_REQD;
-                unlock_res_and_lock(lock);
-
-                if (completion_callback != NULL) {
-                        rc = completion_callback(lock, 0, (void *)&arg);
-                        ast_count++;
-                }
-                LDLM_LOCK_PUT(lock);
-
-                /* Send the request set if it exceeds the PARALLEL_AST_LIMIT,
-                 * and create a new set for requests that remained in
-                 * @rpc_list */
-                if (unlikely(ast_count == PARALLEL_AST_LIMIT)) {
-                        ldlm_send_and_maybe_create_set(&arg, 1);
-                        ast_count = 0;
-                }
-        }
-
-        if (ast_count > 0)
-                ldlm_send_and_maybe_create_set(&arg, 0);
-        else
-                /* In case when number of ASTs is multiply of
-                 * PARALLEL_AST_LIMIT or @rpc_list was initially empty,
-                 * @arg.set must be destroyed here, otherwise we get 
-                 * write memory leaking. */
-                ptlrpc_set_destroy(arg.set);
-
-        RETURN(atomic_read(&arg.restart) ? -ERESTART : 0);
-}
-
-static int reprocess_one_queue(struct ldlm_resource *res, void *closure)
-{
-        ldlm_reprocess_all(res);
-        return LDLM_ITER_CONTINUE;
-}
-
-void ldlm_reprocess_all_ns(struct ldlm_namespace *ns)
-{
-        struct list_head *tmp;
-        int i, rc;
-
-        ENTRY;
-        spin_lock(&ns->ns_hash_lock);
-        for (i = 0; i < RES_HASH_SIZE; i++) {
-                tmp = ns->ns_hash[i].next;
-                while (tmp != &(ns->ns_hash[i])) {
-                        struct ldlm_resource *res =
-                                list_entry(tmp, struct ldlm_resource, lr_hash);
-
-                        ldlm_resource_getref(res);
-                        spin_unlock(&ns->ns_hash_lock);
-
-                        rc = reprocess_one_queue(res, NULL);
-
-                        spin_lock(&ns->ns_hash_lock);
-                        tmp = tmp->next;
-                        ldlm_resource_putref_locked(res);
-
-                        if (rc == LDLM_ITER_STOP)
-                                GOTO(out, rc);
-                }
-        }
- out:
-        spin_unlock(&ns->ns_hash_lock);
-        EXIT;
-}
-
-void ldlm_reprocess_all(struct ldlm_resource *res)
-{
-        CFS_LIST_HEAD(rpc_list);
-        int rc;
-        ENTRY;
-
-        /* Local lock trees don't get reprocessed. */
-        if (ns_is_client(res->lr_namespace)) {
-                EXIT;
-                return;
-        }
-
- restart:
-        lock_res(res);
-        rc = ldlm_reprocess_queue(res, &res->lr_converting, &rpc_list);
-        if (rc == LDLM_ITER_CONTINUE)
-                ldlm_reprocess_queue(res, &res->lr_waiting, &rpc_list);
-        unlock_res(res);
-
-        rc = ldlm_run_cp_ast_work(&rpc_list);
-        if (rc == -ERESTART) {
-                LASSERT(list_empty(&rpc_list));
-                goto restart;
-        }
-        EXIT;
-}
-
-void ldlm_cancel_callback(struct ldlm_lock *lock)
-{
-        check_res_locked(lock->l_resource);
-        if (!(lock->l_flags & LDLM_FL_CANCEL)) {
-                lock->l_flags |= LDLM_FL_CANCEL;
-                if (lock->l_blocking_ast) {
-                        // l_check_no_ns_lock(ns);
-                        unlock_res_and_lock(lock);
-                        lock->l_blocking_ast(lock, NULL, lock->l_ast_data,
-                                             LDLM_CB_CANCELING);
-                        lock_res_and_lock(lock);
-                } else {
-                        LDLM_DEBUG(lock, "no blocking ast");
-                }
-        }
-        lock->l_flags |= LDLM_FL_BL_DONE;
-}
-
-void ldlm_unlink_lock_skiplist(struct ldlm_lock *req)
-{
-        struct ldlm_lock *lock;
-
-        if (req->l_resource->lr_type != LDLM_PLAIN &&
-            req->l_resource->lr_type != LDLM_IBITS)
-                return;
-        
-        if (LDLM_SL_HEAD(&req->l_sl_mode)) {
-                lock = list_entry(req->l_res_link.next, struct ldlm_lock,
-                                  l_res_link);
-                if (req->l_sl_mode.next == &lock->l_sl_mode) {
-                        lock->l_sl_mode.prev = NULL;
-                } else {
-                        lock->l_sl_mode.next = req->l_sl_mode.next;
-                        lock->l_sl_mode.next->prev = &lock->l_sl_mode;
-                }
-                req->l_sl_mode.next = NULL;
-        } else if (LDLM_SL_TAIL(&req->l_sl_mode)) {
-                lock = list_entry(req->l_res_link.prev, struct ldlm_lock,
-                                  l_res_link);
-                if (req->l_sl_mode.prev == &lock->l_sl_mode) {
-                        lock->l_sl_mode.next = NULL;
-                } else {
-                        lock->l_sl_mode.prev = req->l_sl_mode.prev;
-                        lock->l_sl_mode.prev->next = &lock->l_sl_mode;
-                }
-                req->l_sl_mode.prev = NULL;
-        }
-
-        if (LDLM_SL_HEAD(&req->l_sl_policy)) {
-                lock = list_entry(req->l_res_link.next, struct ldlm_lock,
-                                  l_res_link);
-                if (req->l_sl_policy.next == &lock->l_sl_policy) {
-                        lock->l_sl_policy.prev = NULL;
-                } else {
-                        lock->l_sl_policy.next = req->l_sl_policy.next;
-                        lock->l_sl_policy.next->prev = &lock->l_sl_policy;
-                }
-                req->l_sl_policy.next = NULL;
-        } else if (LDLM_SL_TAIL(&req->l_sl_policy)) {
-                lock = list_entry(req->l_res_link.prev, struct ldlm_lock,
-                                  l_res_link);
-                if (req->l_sl_policy.prev == &lock->l_sl_policy) {
-                        lock->l_sl_policy.next = NULL;
-                } else {
-                        lock->l_sl_policy.prev = req->l_sl_policy.prev;
-                        lock->l_sl_policy.prev->next = &lock->l_sl_policy;
-                }
-                req->l_sl_policy.prev = NULL;
-        }
-}
-
-void ldlm_lock_cancel(struct ldlm_lock *lock)
-{
-        struct ldlm_resource *res;
-        struct ldlm_namespace *ns;
-        ENTRY;
-
-        lock_res_and_lock(lock);
-
-        res = lock->l_resource;
-        ns = res->lr_namespace;
-
-        /* Please do not, no matter how tempting, remove this LBUG without
-         * talking to me first. -phik */
-        if (lock->l_readers || lock->l_writers) {
-                LDLM_ERROR(lock, "lock still has references");
-                LBUG();
-        }
-
-        ldlm_del_waiting_lock(lock);
-
-        /* Releases res lock */
-        ldlm_cancel_callback(lock);
-
-        /* Yes, second time, just in case it was added again while we were
-           running with no res lock in ldlm_cancel_callback */
-        ldlm_del_waiting_lock(lock); 
-        ldlm_resource_unlink_lock(lock);
-        ldlm_lock_destroy_nolock(lock);
-
-        if (lock->l_granted_mode == lock->l_req_mode)
-                ldlm_pool_del(&ns->ns_pool, lock);
-
-        /* Make sure we will not be called again for same lock what is possible
-         * if not to zero out lock->l_granted_mode */
-        lock->l_granted_mode = 0;
-        unlock_res_and_lock(lock);
-
-        EXIT;
-}
-
-int ldlm_lock_set_data(struct lustre_handle *lockh, void *data)
-{
-        struct ldlm_lock *lock = ldlm_handle2lock(lockh);
-        ENTRY;
-
-        if (lock == NULL)
-                RETURN(-EINVAL);
-
-        lock->l_ast_data = data;
-        LDLM_LOCK_PUT(lock);
-        RETURN(0);
-}
-
-void ldlm_cancel_locks_for_export(struct obd_export *exp)
-{
-        struct ldlm_lock *lock;
-        struct ldlm_resource *res;
-
-        spin_lock(&exp->exp_ldlm_data.led_lock);
-        while(!list_empty(&exp->exp_ldlm_data.led_held_locks)) {
-                lock = list_entry(exp->exp_ldlm_data.led_held_locks.next,
-                                  struct ldlm_lock, l_export_chain);
-                res = ldlm_resource_getref(lock->l_resource);
-                LDLM_LOCK_GET(lock);
-                spin_unlock(&exp->exp_ldlm_data.led_lock);
-
-                LDLM_DEBUG(lock, "export %p", exp);
-                ldlm_res_lvbo_update(res, NULL, 0, 1);
-
-                ldlm_lock_cancel(lock);
-                ldlm_reprocess_all(res);
-
-                ldlm_resource_putref(res);
-                LDLM_LOCK_PUT(lock);
-                spin_lock(&exp->exp_ldlm_data.led_lock);
-        }
-        spin_unlock(&exp->exp_ldlm_data.led_lock);
-}
-
-struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
-                                        __u32 *flags)
-{
-        CFS_LIST_HEAD(rpc_list);
-        struct ldlm_resource *res;
-        struct ldlm_namespace *ns;
-        int granted = 0;
-        int old_mode, rc;
-        struct ldlm_lock *mark_lock = NULL;
-        int join= LDLM_JOIN_NONE;
-        ldlm_error_t err;
-        struct ldlm_interval *node;
-        ENTRY;
-
-        if (new_mode == lock->l_granted_mode) { // No changes? Just return.
-                *flags |= LDLM_FL_BLOCK_GRANTED;
-                RETURN(lock->l_resource);
-        }
-
-        /* I can't check the type of lock here because the bitlock of lock
-         * is not held here, so do the allocation blindly. -jay */
-        OBD_SLAB_ALLOC(node, ldlm_interval_slab, CFS_ALLOC_IO, sizeof(*node));
-        if (node == NULL)  /* Actually, this causes EDEADLOCK to be returned */
-                RETURN(NULL);
-
-        LASSERTF(new_mode == LCK_PW && lock->l_granted_mode == LCK_PR,
-                 "new_mode %u, granted %u\n", new_mode, lock->l_granted_mode);
-
-        lock_res_and_lock(lock);
-
-        res = lock->l_resource;
-        ns = res->lr_namespace;
-
-        old_mode = lock->l_req_mode;
-        lock->l_req_mode = new_mode;
-        if (res->lr_type == LDLM_PLAIN || res->lr_type == LDLM_IBITS) {
-                /* remember the lock position where the lock might be 
-                 * added back to the granted list later and also 
-                 * remember the join mode for skiplist fixing. */
-                if (LDLM_SL_HEAD(&lock->l_sl_mode))
-                        join = LDLM_MODE_JOIN_RIGHT;
-                else if (LDLM_SL_TAIL(&lock->l_sl_mode))
-                        join = LDLM_MODE_JOIN_LEFT;
-                if (LDLM_SL_HEAD(&lock->l_sl_policy))
-                        join |= LDLM_POLICY_JOIN_RIGHT;
-                else if (LDLM_SL_TAIL(&lock->l_sl_policy))
-                        join |= LDLM_POLICY_JOIN_LEFT;
-
-                LASSERT(!((join & LDLM_MODE_JOIN_RIGHT) &&
-                          (join & LDLM_POLICY_JOIN_LEFT)));
-                LASSERT(!((join & LDLM_MODE_JOIN_LEFT) &&
-                          (join & LDLM_POLICY_JOIN_RIGHT)));
-
-                if ((join & LDLM_MODE_JOIN_LEFT) ||
-                    (join & LDLM_POLICY_JOIN_LEFT))
-                        mark_lock = list_entry(lock->l_res_link.prev,
-                                               struct ldlm_lock, l_res_link);
-                else if (lock->l_res_link.next != &res->lr_granted)
-                        mark_lock = list_entry(lock->l_res_link.next,
-                                               struct ldlm_lock, l_res_link);
-        } else {
-                ldlm_resource_unlink_lock(lock);
-                if (res->lr_type == LDLM_EXTENT) {
-                        /* FIXME: ugly code, I have to attach the lock to a 
-                         * interval node again since perhaps it will be granted
-                         * soon */
-                        CFS_INIT_LIST_HEAD(&node->li_group);
-                        ldlm_interval_attach(node, lock);
-                        node = NULL;
-                }
-        }
-
-        /* If this is a local resource, put it on the appropriate list. */
-        if (ns_is_client(res->lr_namespace)) {
-                if (*flags & (LDLM_FL_BLOCK_CONV | LDLM_FL_BLOCK_GRANTED)) {
-                        ldlm_resource_add_lock(res, &res->lr_converting, lock);
-                } else {
-                        /* This should never happen, because of the way the
-                         * server handles conversions. */
-                        LDLM_ERROR(lock, "Erroneous flags %d on local lock\n",
-                                   *flags);
-                        LBUG();
-
-                        ldlm_grant_lock(lock, &rpc_list);
-                        granted = 1;
-                        /* FIXME: completion handling not with ns_lock held ! */
-                        if (lock->l_completion_ast)
-                                lock->l_completion_ast(lock, 0, NULL);
-                }
-        } else {
-                int pflags = 0;
-                ldlm_processing_policy policy;
-                policy = ldlm_processing_policy_table[res->lr_type];
-                rc = policy(lock, &pflags, 0, &err, &rpc_list);
-                if (rc == LDLM_ITER_STOP) {
-                        lock->l_req_mode = old_mode;
-                        if (res->lr_type == LDLM_EXTENT)
-                                ldlm_extent_add_lock(res, lock);
-                        else
-                                ldlm_granted_list_add_lock(lock, mark_lock,
-                                                           join);
-                        res = NULL;
-                } else {
-                        *flags |= LDLM_FL_BLOCK_GRANTED;
-                        granted = 1;
-                }
-        }
-        unlock_res_and_lock(lock);
-
-        if (granted)
-                ldlm_run_cp_ast_work(&rpc_list);
-        if (node)
-                OBD_SLAB_FREE(node, ldlm_interval_slab, sizeof(*node));
-        RETURN(res);
-}
-
-void ldlm_lock_dump(int level, struct ldlm_lock *lock, int pos)
-{
-        struct obd_device *obd = NULL;
-
-        if (!((libcfs_debug | D_ERROR) & level))
-                return;
-
-        if (!lock) {
-                CDEBUG(level, "  NULL LDLM lock\n");
-                return;
-        }
-
-        CDEBUG(level," -- Lock dump: %p/"LPX64" (rc: %d) (pos: %d) (pid: %d)\n",
-               lock, lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
-               pos, lock->l_pid);
-        if (lock->l_conn_export != NULL)
-                obd = lock->l_conn_export->exp_obd;
-        if (lock->l_export && lock->l_export->exp_connection) {
-                CDEBUG(level, "  Node: NID %s (rhandle: "LPX64")\n",
-                     libcfs_nid2str(lock->l_export->exp_connection->c_peer.nid),
-                     lock->l_remote_handle.cookie);
-        } else if (obd == NULL) {
-                CDEBUG(level, "  Node: local\n");
-        } else {
-                struct obd_import *imp = obd->u.cli.cl_import;
-                CDEBUG(level, "  Node: NID %s (rhandle: "LPX64")\n",
-                       libcfs_nid2str(imp->imp_connection->c_peer.nid),
-                       lock->l_remote_handle.cookie);
-        }
-        CDEBUG(level, "  Resource: %p ("LPU64"/"LPU64")\n", lock->l_resource,
-               lock->l_resource->lr_name.name[0],
-               lock->l_resource->lr_name.name[1]);
-        CDEBUG(level, "  Req mode: %s, grant mode: %s, rc: %u, read: %d, "
-               "write: %d flags: %#x\n", ldlm_lockname[lock->l_req_mode],
-               ldlm_lockname[lock->l_granted_mode],
-               atomic_read(&lock->l_refc), lock->l_readers, lock->l_writers,
-               lock->l_flags);
-        if (lock->l_resource->lr_type == LDLM_EXTENT)
-                CDEBUG(level, "  Extent: "LPU64" -> "LPU64
-                       " (req "LPU64"-"LPU64")\n",
-                       lock->l_policy_data.l_extent.start,
-                       lock->l_policy_data.l_extent.end,
-                       lock->l_req_extent.start, lock->l_req_extent.end);
-        else if (lock->l_resource->lr_type == LDLM_FLOCK)
-                CDEBUG(level, "  Pid: %d Extent: "LPU64" -> "LPU64"\n",
-                       lock->l_policy_data.l_flock.pid,
-                       lock->l_policy_data.l_flock.start,
-                       lock->l_policy_data.l_flock.end);
-       else if (lock->l_resource->lr_type == LDLM_IBITS)
-                CDEBUG(level, "  Bits: "LPX64"\n",
-                       lock->l_policy_data.l_inodebits.bits);
-}
-
-void ldlm_lock_dump_handle(int level, struct lustre_handle *lockh)
-{
-        struct ldlm_lock *lock;
-
-        if (!((libcfs_debug | D_ERROR) & level))
-                return;
-
-        lock = ldlm_handle2lock(lockh);
-        if (lock == NULL)
-                return;
-
-        ldlm_lock_dump(D_OTHER, lock, 0);
-
-        LDLM_LOCK_PUT(lock);
-}
-
-void _ldlm_lock_debug(struct ldlm_lock *lock, __u32 level,
-		      struct libcfs_debug_msg_data *data, const char *fmt,
-                      ...)
-{
-        va_list args;
-        cfs_debug_limit_state_t *cdls = data->msg_cdls;
-
-	va_start(args, fmt);
-        if (lock->l_resource == NULL) {
-                libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file,
-                                   data->msg_fn, data->msg_line, fmt, args,
-                                   " ns: \?\? lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s "
-                                   "res: \?\? rrc=\?\? type: \?\?\? flags: %x remote: "
-                                   LPX64" expref: %d pid: %u\n", lock,
-                                   lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
-                                   lock->l_readers, lock->l_writers,
-                                   ldlm_lockname[lock->l_granted_mode],
-                                   ldlm_lockname[lock->l_req_mode],
-                                   lock->l_flags, lock->l_remote_handle.cookie,
-                                   lock->l_export ?
-                                        atomic_read(&lock->l_export->exp_refcount) : -99,
-                                   lock->l_pid);
-		va_end(args);
-                return;
-        }
-
-        switch (lock->l_resource->lr_type) {
-        case LDLM_EXTENT:
-                libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file,
-                                   data->msg_fn, data->msg_line, fmt, args,
-                                   " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s "
-                                   "res: "LPU64"/"LPU64" rrc: %d type: %s ["LPU64"->"LPU64
-                                   "] (req "LPU64"->"LPU64") flags: %x remote: "LPX64
-                                    " expref: %d pid: %u\n",
-                                    lock->l_resource->lr_namespace->ns_name, lock,
-                                    lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
-                                    lock->l_readers, lock->l_writers,
-                                    ldlm_lockname[lock->l_granted_mode],
-                                    ldlm_lockname[lock->l_req_mode],
-                                    lock->l_resource->lr_name.name[0],
-                                    lock->l_resource->lr_name.name[1],
-                                    atomic_read(&lock->l_resource->lr_refcount),
-                                    ldlm_typename[lock->l_resource->lr_type],
-                                    lock->l_policy_data.l_extent.start,
-                                    lock->l_policy_data.l_extent.end,
-                                    lock->l_req_extent.start, lock->l_req_extent.end,
-                                    lock->l_flags, lock->l_remote_handle.cookie,
-                                    lock->l_export ?
-                                        atomic_read(&lock->l_export->exp_refcount) : -99,
-                                    lock->l_pid);
-                break;
-        case LDLM_FLOCK:
-                libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file,
-                                   data->msg_fn, data->msg_line, fmt, args,
-                                   " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s "
-                                   "res: "LPU64"/"LPU64" rrc: %d type: %s pid: %d "
-                                   "["LPU64"->"LPU64"] flags: %x remote: "LPX64
-                                   " expref: %d pid: %u\n",
-                                   lock->l_resource->lr_namespace->ns_name, lock,
-                                   lock->l_handle.h_cookie, atomic_read(&lock->l_refc),
-                                   lock->l_readers, lock->l_writers,
-                                   ldlm_lockname[lock->l_granted_mode],
-                                   ldlm_lockname[lock->l_req_mode],
-                                   lock->l_resource->lr_name.name[0],
-                                   lock->l_resource->lr_name.name[1],
-                                   atomic_read(&lock->l_resource->lr_refcount),
-                                   ldlm_typename[lock->l_resource->lr_type],
-                                   lock->l_policy_data.l_flock.pid,
-                                   lock->l_policy_data.l_flock.start,
-                                   lock->l_policy_data.l_flock.end,
-                                   lock->l_flags, lock->l_remote_handle.cookie,
-                                   lock->l_export ?
-                                        atomic_read(&lock->l_export->exp_refcount) : -99,
-                                   lock->l_pid);
-                break;
-        case LDLM_IBITS:
-                libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file,
-                                   data->msg_fn, data->msg_line, fmt, args,
-                                   " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s "
-                                   "res: "LPU64"/"LPU64" bits "LPX64" rrc: %d type: %s "
-                                   "flags: %x remote: "LPX64" expref: %d "
-                                   "pid %u\n",
-                                   lock->l_resource->lr_namespace->ns_name,
-                                   lock, lock->l_handle.h_cookie,
-                                   atomic_read (&lock->l_refc),
-                                   lock->l_readers, lock->l_writers,
-                                   ldlm_lockname[lock->l_granted_mode],
-                                   ldlm_lockname[lock->l_req_mode],
-                                   lock->l_resource->lr_name.name[0],
-                                   lock->l_resource->lr_name.name[1],
-                                   lock->l_policy_data.l_inodebits.bits,
-                                   atomic_read(&lock->l_resource->lr_refcount),
-                                   ldlm_typename[lock->l_resource->lr_type],
-                                   lock->l_flags, lock->l_remote_handle.cookie,
-                                   lock->l_export ?
-                                        atomic_read(&lock->l_export->exp_refcount) : -99,
-                                   lock->l_pid);
-                break;
-        default:
-                libcfs_debug_vmsg2(cdls, data->msg_subsys, level, data->msg_file,
-                                   data->msg_fn, data->msg_line, fmt, args,
-                                   " ns: %s lock: %p/"LPX64" lrc: %d/%d,%d mode: %s/%s "
-                                   "res: "LPU64"/"LPU64" rrc: %d type: %s flags: %x "
-                                   "remote: "LPX64" expref: %d pid: %u\n",
-                                   lock->l_resource->lr_namespace->ns_name,
-                                   lock, lock->l_handle.h_cookie,
-                                   atomic_read (&lock->l_refc),
-                                   lock->l_readers, lock->l_writers,
-                                   ldlm_lockname[lock->l_granted_mode],
-                                   ldlm_lockname[lock->l_req_mode],
-                                   lock->l_resource->lr_name.name[0],
-                                   lock->l_resource->lr_name.name[1],
-                                   atomic_read(&lock->l_resource->lr_refcount),
-                                   ldlm_typename[lock->l_resource->lr_type],
-                                   lock->l_flags, lock->l_remote_handle.cookie,
-                                   lock->l_export ?
-                                         atomic_read(&lock->l_export->exp_refcount) : -99,
-                                   lock->l_pid);
-                break;
-        }
-        va_end(args);
-}
-EXPORT_SYMBOL(_ldlm_lock_debug);
diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c
deleted file mode 100644
index 850f540f037ec125d5eb3cfe5cdfa53ae262ec9c..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_lockd.c
+++ /dev/null
@@ -1,2222 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002-2004 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LDLM
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <lustre_dlm.h>
-#include <obd_class.h>
-#include <libcfs/list.h>
-#include "ldlm_internal.h"
-
-#ifdef __KERNEL__
-static int ldlm_num_threads;
-CFS_MODULE_PARM(ldlm_num_threads, "i", int, 0444,
-                "number of DLM service threads to start");
-#endif
-
-extern cfs_mem_cache_t *ldlm_resource_slab;
-extern cfs_mem_cache_t *ldlm_lock_slab;
-extern struct lustre_lock ldlm_handle_lock;
-
-static struct semaphore ldlm_ref_sem;
-static int ldlm_refcount;
-
-static struct ldlm_state *ldlm_state;
-
-inline cfs_time_t round_timeout(cfs_time_t timeout)
-{
-        return cfs_time_seconds((int)cfs_duration_sec(cfs_time_sub(timeout, 0)) + 1);
-}
-
-/* timeout for initial callback (AST) reply (bz10399) */
-static inline unsigned int ldlm_get_rq_timeout(void)
-{
-        /* Non-AT value */
-        unsigned int timeout = min(ldlm_timeout, obd_timeout / 3);
-
-        return timeout < 1 ? 1 : timeout;
-}
-
-#ifdef __KERNEL__
-/* w_l_spinlock protects both waiting_locks_list and expired_lock_thread */
-static spinlock_t waiting_locks_spinlock;   /* BH lock (timer) */
-static struct list_head waiting_locks_list;
-static cfs_timer_t waiting_locks_timer;
-
-static struct expired_lock_thread {
-        cfs_waitq_t               elt_waitq;
-        int                       elt_state;
-        int                       elt_dump;
-        struct list_head          elt_expired_locks;
-} expired_lock_thread;
-#endif
-
-#define ELT_STOPPED   0
-#define ELT_READY     1
-#define ELT_TERMINATE 2
-
-struct ldlm_bl_pool {
-        spinlock_t              blp_lock;
-
-        /*
-         * blp_prio_list is used for callbacks that should be handled
-         * as a priority. It is used for LDLM_FL_DISCARD_DATA requests.
-         * see bug 13843
-         */
-        struct list_head        blp_prio_list;
-
-        /*
-         * blp_list is used for all other callbacks which are likely
-         * to take longer to process.
-         */
-        struct list_head        blp_list;
-
-        cfs_waitq_t             blp_waitq;
-        struct completion       blp_comp;
-        atomic_t                blp_num_threads;
-        atomic_t                blp_busy_threads;
-        int                     blp_min_threads;
-        int                     blp_max_threads;
-};
-
-struct ldlm_bl_work_item {
-        struct list_head        blwi_entry;
-        struct ldlm_namespace   *blwi_ns;
-        struct ldlm_lock_desc   blwi_ld;
-        struct ldlm_lock        *blwi_lock;
-        struct list_head        blwi_head;
-        int                     blwi_count;
-};
-
-#ifdef __KERNEL__
-
-static inline int have_expired_locks(void)
-{
-        int need_to_run;
-
-        ENTRY;
-        spin_lock_bh(&waiting_locks_spinlock);
-        need_to_run = !list_empty(&expired_lock_thread.elt_expired_locks);
-        spin_unlock_bh(&waiting_locks_spinlock);
-
-        RETURN(need_to_run);
-}
-
-static int expired_lock_main(void *arg)
-{
-        struct list_head *expired = &expired_lock_thread.elt_expired_locks;
-        struct l_wait_info lwi = { 0 };
-        int do_dump;
-
-        ENTRY;
-        cfs_daemonize("ldlm_elt");
-
-        expired_lock_thread.elt_state = ELT_READY;
-        cfs_waitq_signal(&expired_lock_thread.elt_waitq);
-
-        while (1) {
-                l_wait_event(expired_lock_thread.elt_waitq,
-                             have_expired_locks() ||
-                             expired_lock_thread.elt_state == ELT_TERMINATE,
-                             &lwi);
-
-                spin_lock_bh(&waiting_locks_spinlock);
-                if (expired_lock_thread.elt_dump) {
-                        spin_unlock_bh(&waiting_locks_spinlock);
-
-                        /* from waiting_locks_callback, but not in timer */
-                        libcfs_debug_dumplog();
-                        libcfs_run_lbug_upcall(__FILE__,
-                                                "waiting_locks_callback",
-                                                expired_lock_thread.elt_dump);
-
-                        spin_lock_bh(&waiting_locks_spinlock);
-                        expired_lock_thread.elt_dump = 0;
-                }
-
-                do_dump = 0;
-
-                while (!list_empty(expired)) {
-                        struct obd_export *export;
-                        struct ldlm_lock *lock;
-
-                        lock = list_entry(expired->next, struct ldlm_lock,
-                                          l_pending_chain);
-                        if ((void *)lock < LP_POISON + CFS_PAGE_SIZE &&
-                            (void *)lock >= LP_POISON) {
-                                spin_unlock_bh(&waiting_locks_spinlock);
-                                CERROR("free lock on elt list %p\n", lock);
-                                LBUG();
-                        }
-                        list_del_init(&lock->l_pending_chain);
-                        if ((void *)lock->l_export < LP_POISON + CFS_PAGE_SIZE &&
-                            (void *)lock->l_export >= LP_POISON) {
-                                CERROR("lock with free export on elt list %p\n",
-                                       lock->l_export);
-                                lock->l_export = NULL;
-                                LDLM_ERROR(lock, "free export");
-                                continue;
-                        }
-                        export = class_export_get(lock->l_export);
-                        spin_unlock_bh(&waiting_locks_spinlock);
-
-                        do_dump++;
-                        class_fail_export(export);
-                        class_export_put(export);
-                        spin_lock_bh(&waiting_locks_spinlock);
-                }
-                spin_unlock_bh(&waiting_locks_spinlock);
-
-                if (do_dump && obd_dump_on_eviction) {
-                        CERROR("dump the log upon eviction\n");
-                        libcfs_debug_dumplog();
-                }
-
-                if (expired_lock_thread.elt_state == ELT_TERMINATE)
-                        break;
-        }
-
-        expired_lock_thread.elt_state = ELT_STOPPED;
-        cfs_waitq_signal(&expired_lock_thread.elt_waitq);
-        RETURN(0);
-}
-
-/* This is called from within a timer interrupt and cannot schedule */
-static void waiting_locks_callback(unsigned long unused)
-{
-        struct ldlm_lock *lock, *last = NULL;
-
-        spin_lock_bh(&waiting_locks_spinlock);
-        while (!list_empty(&waiting_locks_list)) {
-                lock = list_entry(waiting_locks_list.next, struct ldlm_lock,
-                                  l_pending_chain);
-
-                if (cfs_time_after(lock->l_callback_timeout, cfs_time_current())
-                    || (lock->l_req_mode == LCK_GROUP))
-                        break;
-
-                LDLM_ERROR(lock, "lock callback timer expired after %lds: "
-                           "evicting client at %s ",
-                           cfs_time_current_sec()- lock->l_enqueued_time.tv_sec,
-                           libcfs_nid2str(
-                                   lock->l_export->exp_connection->c_peer.nid));
-                if (lock == last) {
-                        LDLM_ERROR(lock, "waiting on lock multiple times");
-                        CERROR("wll %p n/p %p/%p, l_pending %p n/p %p/%p\n",
-                               &waiting_locks_list,
-                               waiting_locks_list.next, waiting_locks_list.prev,
-                               &lock->l_pending_chain,
-                               lock->l_pending_chain.next,
-                               lock->l_pending_chain.prev);
-
-                        CFS_INIT_LIST_HEAD(&waiting_locks_list);    /* HACK */
-                        expired_lock_thread.elt_dump = __LINE__;
-
-                        /* LBUG(); */
-                        CEMERG("would be an LBUG, but isn't (bug 5653)\n");
-                        libcfs_debug_dumpstack(NULL);
-                        /*blocks* libcfs_debug_dumplog(); */
-                        /*blocks* libcfs_run_lbug_upcall(file, func, line); */
-                        break;
-                }
-                last = lock;
-
-                list_del(&lock->l_pending_chain);
-                list_add(&lock->l_pending_chain,
-                         &expired_lock_thread.elt_expired_locks);
-        }
-
-        if (!list_empty(&expired_lock_thread.elt_expired_locks)) {
-                if (obd_dump_on_timeout)
-                        expired_lock_thread.elt_dump = __LINE__;
-
-                cfs_waitq_signal(&expired_lock_thread.elt_waitq);
-        }
-
-        /*
-         * Make sure the timer will fire again if we have any locks
-         * left.
-         */
-        if (!list_empty(&waiting_locks_list)) {
-                cfs_time_t timeout_rounded;
-                lock = list_entry(waiting_locks_list.next, struct ldlm_lock,
-                                  l_pending_chain);
-                timeout_rounded = (cfs_time_t)round_timeout(lock->l_callback_timeout);
-                cfs_timer_arm(&waiting_locks_timer, timeout_rounded);
-        }
-        spin_unlock_bh(&waiting_locks_spinlock);
-}
-
-/*
- * Indicate that we're waiting for a client to call us back cancelling a given
- * lock.  We add it to the pending-callback chain, and schedule the lock-timeout
- * timer to fire appropriately.  (We round up to the next second, to avoid
- * floods of timer firings during periods of high lock contention and traffic).
- *
- * Called with the namespace lock held.
- */
-static int __ldlm_add_waiting_lock(struct ldlm_lock *lock)
-{
-        int timeout;
-        cfs_time_t timeout_rounded;
-
-        if (!list_empty(&lock->l_pending_chain))
-                return 0;
-
-        timeout = ldlm_get_enq_timeout(lock);
-
-        lock->l_callback_timeout = cfs_time_shift(timeout);
-
-        timeout_rounded = round_timeout(lock->l_callback_timeout);
-
-        if (cfs_time_before(timeout_rounded, 
-                            cfs_timer_deadline(&waiting_locks_timer)) ||
-            !cfs_timer_is_armed(&waiting_locks_timer)) {
-                cfs_timer_arm(&waiting_locks_timer, timeout_rounded);
-        }
-        /* if the new lock has a shorter timeout than something earlier on
-           the list, we'll wait the longer amount of time; no big deal. */
-        list_add_tail(&lock->l_pending_chain, &waiting_locks_list); /* FIFO */
-        return 1;
-}
-
-static int ldlm_add_waiting_lock(struct ldlm_lock *lock)
-{
-        int ret;
-
-        LASSERT(!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK));
-
-        spin_lock_bh(&waiting_locks_spinlock);
-        if (lock->l_destroyed) {
-                static cfs_time_t next;
-                spin_unlock_bh(&waiting_locks_spinlock);
-                LDLM_ERROR(lock, "not waiting on destroyed lock (bug 5653)");
-                if (cfs_time_after(cfs_time_current(), next)) {
-                        next = cfs_time_shift(14400);
-                        libcfs_debug_dumpstack(NULL);
-                }
-                return 0;
-        }
-
-        ret = __ldlm_add_waiting_lock(lock);
-        spin_unlock_bh(&waiting_locks_spinlock);
-
-        LDLM_DEBUG(lock, "%sadding to wait list",
-                   ret == 0 ? "not re-" : "");
-        return ret;
-}
-
-/*
- * Remove a lock from the pending list, likely because it had its cancellation
- * callback arrive without incident.  This adjusts the lock-timeout timer if
- * needed.  Returns 0 if the lock wasn't pending after all, 1 if it was.
- *
- * Called with namespace lock held.
- */
-int __ldlm_del_waiting_lock(struct ldlm_lock *lock)
-{
-        struct list_head *list_next;
-
-        if (list_empty(&lock->l_pending_chain))
-                return 0;
-
-        list_next = lock->l_pending_chain.next;
-        if (lock->l_pending_chain.prev == &waiting_locks_list) {
-                /* Removing the head of the list, adjust timer. */
-                if (list_next == &waiting_locks_list) {
-                        /* No more, just cancel. */
-                        cfs_timer_disarm(&waiting_locks_timer);
-                } else {
-                        struct ldlm_lock *next;
-                        next = list_entry(list_next, struct ldlm_lock,
-                                          l_pending_chain);
-                        cfs_timer_arm(&waiting_locks_timer,
-                                      round_timeout(next->l_callback_timeout));
-                }
-        }
-        list_del_init(&lock->l_pending_chain);
-
-        return 1;
-}
-
-int ldlm_del_waiting_lock(struct ldlm_lock *lock)
-{
-        int ret;
-
-        if (lock->l_export == NULL) {
-                /* We don't have a "waiting locks list" on clients. */
-                LDLM_DEBUG(lock, "client lock: no-op");
-                return 0;
-        }
-
-        spin_lock_bh(&waiting_locks_spinlock);
-        ret = __ldlm_del_waiting_lock(lock);
-        spin_unlock_bh(&waiting_locks_spinlock);
-
-        LDLM_DEBUG(lock, "%s", ret == 0 ? "wasn't waiting" : "removed");
-        return ret;
-}
-
-/*
- * Prolong the lock
- *
- * Called with namespace lock held.
- */
-int ldlm_refresh_waiting_lock(struct ldlm_lock *lock)
-{
-        if (lock->l_export == NULL) {
-                /* We don't have a "waiting locks list" on clients. */
-                LDLM_DEBUG(lock, "client lock: no-op");
-                return 0;
-        }
-
-        spin_lock_bh(&waiting_locks_spinlock);
-
-        if (list_empty(&lock->l_pending_chain)) {
-                spin_unlock_bh(&waiting_locks_spinlock);
-                LDLM_DEBUG(lock, "wasn't waiting");
-                return 0;
-        }
-
-        __ldlm_del_waiting_lock(lock);
-        __ldlm_add_waiting_lock(lock);
-        spin_unlock_bh(&waiting_locks_spinlock);
-
-        LDLM_DEBUG(lock, "refreshed");
-        return 1;
-}
-
-#else /* !__KERNEL__ */
-
-static int ldlm_add_waiting_lock(struct ldlm_lock *lock)
-{
-        LASSERT(!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK));
-        RETURN(1);
-}
-
-int ldlm_del_waiting_lock(struct ldlm_lock *lock)
-{
-        RETURN(0);
-}
-
-int ldlm_refresh_waiting_lock(struct ldlm_lock *lock)
-{
-        RETURN(0);
-}
-#endif /* __KERNEL__ */
-
-static void ldlm_failed_ast(struct ldlm_lock *lock, int rc,
-                            const char *ast_type)
-{
-        struct ptlrpc_connection *conn = lock->l_export->exp_connection;
-        char                     *str = libcfs_nid2str(conn->c_peer.nid);
-
-        LCONSOLE_ERROR_MSG(0x138, "%s: A client on nid %s was evicted due "
-                             "to a lock %s callback to %s timed out: rc %d\n",
-                             lock->l_export->exp_obd->obd_name, str,
-                             ast_type, obd_export_nid2str(lock->l_export), rc);
-
-        if (obd_dump_on_timeout)
-                libcfs_debug_dumplog();
-        class_fail_export(lock->l_export);
-}
-
-static int ldlm_handle_ast_error(struct ldlm_lock *lock,
-                                 struct ptlrpc_request *req, int rc,
-                                 const char *ast_type)
-{
-        lnet_process_id_t peer = req->rq_import->imp_connection->c_peer;
-
-        if (rc == -ETIMEDOUT || rc == -EINTR || rc == -ENOTCONN) {
-                LASSERT(lock->l_export);
-                if (lock->l_export->exp_libclient) {
-                        LDLM_DEBUG(lock, "%s AST to liblustre client (nid %s)"
-                                   " timeout, just cancelling lock", ast_type,
-                                   libcfs_nid2str(peer.nid));
-                        ldlm_lock_cancel(lock);
-                        rc = -ERESTART;
-                } else if (lock->l_flags & LDLM_FL_CANCEL) {
-                        LDLM_DEBUG(lock, "%s AST timeout from nid %s, but "
-                                   "cancel was received (AST reply lost?)",
-                                   ast_type, libcfs_nid2str(peer.nid));
-                        ldlm_lock_cancel(lock);
-                        rc = -ERESTART;
-                } else {
-                        ldlm_del_waiting_lock(lock);
-                        ldlm_failed_ast(lock, rc, ast_type);
-                }
-        } else if (rc) {
-                if (rc == -EINVAL)
-                        LDLM_DEBUG(lock, "client (nid %s) returned %d"
-                                   " from %s AST - normal race",
-                                   libcfs_nid2str(peer.nid),
-                                   lustre_msg_get_status(req->rq_repmsg),
-                                   ast_type);
-                else
-                        LDLM_ERROR(lock, "client (nid %s) returned %d "
-                                   "from %s AST", libcfs_nid2str(peer.nid),
-                                   (req->rq_repmsg != NULL) ?
-                                   lustre_msg_get_status(req->rq_repmsg) : 0,
-                                   ast_type);
-                ldlm_lock_cancel(lock);
-                /* Server-side AST functions are called from ldlm_reprocess_all,
-                 * which needs to be told to please restart its reprocessing. */
-                rc = -ERESTART;
-        }
-
-        return rc;
-}
-
-static int ldlm_cb_interpret(struct ptlrpc_request *req, void *data, int rc)
-{
-        struct ldlm_cb_set_arg *arg;
-        struct ldlm_lock *lock;
-        ENTRY;
-
-        LASSERT(data != NULL);
-
-        arg = req->rq_async_args.pointer_arg[0];
-        lock = req->rq_async_args.pointer_arg[1];
-        LASSERT(lock != NULL);
-        if (rc != 0) {
-                /* If client canceled the lock but the cancel has not
-                 * been recieved yet, we need to update lvbo to have the
-                 * proper attributes cached. */
-                if (rc == -EINVAL && arg->type == LDLM_BL_CALLBACK)
-                        ldlm_res_lvbo_update(lock->l_resource, NULL,
-                                             0, 1);
-                rc = ldlm_handle_ast_error(lock, req, rc,
-                                           arg->type == LDLM_BL_CALLBACK
-                                           ? "blocking" : "completion");
-        }
-
-        LDLM_LOCK_PUT(lock);
-
-        if (rc == -ERESTART)
-                atomic_set(&arg->restart, 1);
-
-        RETURN(0);
-}
-
-static inline int ldlm_bl_and_cp_ast_fini(struct ptlrpc_request *req,
-                                          struct ldlm_cb_set_arg *arg,
-                                          struct ldlm_lock *lock,
-                                          int instant_cancel)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (unlikely(instant_cancel)) {
-                rc = ptl_send_rpc(req, 1);
-                ptlrpc_req_finished(req);
-                if (rc == 0)
-                        /* If we cancelled the lock, we need to restart
-                         * ldlm_reprocess_queue */
-                        atomic_set(&arg->restart, 1);
-        } else {
-                LDLM_LOCK_GET(lock);
-                ptlrpc_set_add_req(arg->set, req);
-        }
-
-        RETURN(rc);
-}
-
-/*
- * ->l_blocking_ast() method for server-side locks. This is invoked when newly
- * enqueued server lock conflicts with given one.
- *
- * Sends blocking ast rpc to the client owning that lock; arms timeout timer
- * to wait for client response.
- */
-int ldlm_server_blocking_ast(struct ldlm_lock *lock,
-                             struct ldlm_lock_desc *desc,
-                             void *data, int flag)
-{
-        struct ldlm_cb_set_arg *arg = data;
-        struct ldlm_request *body;
-        struct ptlrpc_request *req;
-        int size[] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                       [DLM_LOCKREQ_OFF]     = sizeof(*body) };
-        int instant_cancel = 0, rc;
-        ENTRY;
-
-        if (flag == LDLM_CB_CANCELING) {
-                /* Don't need to do anything here. */
-                RETURN(0);
-        }
-
-        LASSERT(lock);
-        LASSERT(data != NULL);
-
-        req = ptlrpc_prep_req(lock->l_export->exp_imp_reverse,
-                              LUSTRE_DLM_VERSION, LDLM_BL_CALLBACK, 2, size,
-                              NULL);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        req->rq_async_args.pointer_arg[0] = arg;
-        req->rq_async_args.pointer_arg[1] = lock;
-        req->rq_interpret_reply = ldlm_cb_interpret;
-        req->rq_no_resend = 1;
-
-        lock_res(lock->l_resource);
-        if (lock->l_granted_mode != lock->l_req_mode) {
-                /* this blocking AST will be communicated as part of the
-                 * completion AST instead */
-                unlock_res(lock->l_resource);
-                ptlrpc_req_finished(req);
-                LDLM_DEBUG(lock, "lock not granted, not sending blocking AST");
-                RETURN(0);
-        }
-
-        if (lock->l_destroyed) {
-                /* What's the point? */
-                unlock_res(lock->l_resource);
-                ptlrpc_req_finished(req);
-                RETURN(0);
-        }
-
-#if 0
-        if (CURRENT_SECONDS - lock->l_export->exp_last_request_time > 30){
-                unlock_res(lock->l_resource);
-                ptlrpc_req_finished(req);
-                ldlm_failed_ast(lock, -ETIMEDOUT, "Not-attempted blocking");
-                RETURN(-ETIMEDOUT);
-        }
-#endif
-
-        if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK)
-                instant_cancel = 1;
-
-        body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body));
-        body->lock_handle[0] = lock->l_remote_handle;
-        body->lock_desc = *desc;
-        body->lock_flags |= (lock->l_flags & LDLM_AST_FLAGS);
-
-        LDLM_DEBUG(lock, "server preparing blocking AST");
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-        if (instant_cancel) {
-                unlock_res(lock->l_resource);
-                ldlm_lock_cancel(lock);
-        } else {
-                LASSERT(lock->l_granted_mode == lock->l_req_mode);
-                ldlm_add_waiting_lock(lock);
-                unlock_res(lock->l_resource);
-        }
-
-        req->rq_send_state = LUSTRE_IMP_FULL;
-        /* ptlrpc_prep_req already set timeout */
-        if (AT_OFF)
-                req->rq_timeout = ldlm_get_rq_timeout();
-
-        if (lock->l_export && lock->l_export->exp_ldlm_stats)
-                lprocfs_counter_incr(lock->l_export->exp_ldlm_stats,
-                                     LDLM_BL_CALLBACK - LDLM_FIRST_OPC);
-
-        rc = ldlm_bl_and_cp_ast_fini(req, arg, lock, instant_cancel);
-
-        RETURN(rc);
-}
-
-int ldlm_server_completion_ast(struct ldlm_lock *lock, int flags, void *data)
-{
-        struct ldlm_cb_set_arg *arg = data;
-        struct ldlm_request *body;
-        struct ptlrpc_request *req;
-        struct timeval granted_time;
-        long total_enqueue_wait;
-        int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(*body) };
-        int rc, buffers = 2, instant_cancel = 0;
-        ENTRY;
-
-        LASSERT(lock != NULL);
-        LASSERT(data != NULL);
-
-        do_gettimeofday(&granted_time);
-        total_enqueue_wait = cfs_timeval_sub(&granted_time,
-                                             &lock->l_enqueued_time, NULL);
-
-        if (total_enqueue_wait / ONE_MILLION > obd_timeout)
-                /* non-fatal with AT - change to LDLM_DEBUG? */
-                LDLM_ERROR(lock, "enqueue wait took %luus from %lu",
-                           total_enqueue_wait, lock->l_enqueued_time.tv_sec);
-
-        lock_res_and_lock(lock);
-        if (lock->l_resource->lr_lvb_len) {
-                size[DLM_REQ_REC_OFF] = lock->l_resource->lr_lvb_len;
-                buffers = 3;
-        }
-        unlock_res_and_lock(lock);
-
-        req = ptlrpc_prep_req(lock->l_export->exp_imp_reverse,
-                              LUSTRE_DLM_VERSION, LDLM_CP_CALLBACK, buffers,
-                              size, NULL);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        req->rq_async_args.pointer_arg[0] = arg;
-        req->rq_async_args.pointer_arg[1] = lock;
-        req->rq_interpret_reply = ldlm_cb_interpret;
-        req->rq_no_resend = 1;
-
-        body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body));
-        body->lock_handle[0] = lock->l_remote_handle;
-        body->lock_flags = flags;
-        ldlm_lock2desc(lock, &body->lock_desc);
-
-        if (buffers == 3) {
-                void *lvb;
-
-                lvb = lustre_msg_buf(req->rq_reqmsg, DLM_REQ_REC_OFF,
-                                     lock->l_resource->lr_lvb_len);
-                lock_res_and_lock(lock);
-                memcpy(lvb, lock->l_resource->lr_lvb_data,
-                       lock->l_resource->lr_lvb_len);
-                unlock_res_and_lock(lock);
-        }
-
-        LDLM_DEBUG(lock, "server preparing completion AST (after %ldus wait)",
-                   total_enqueue_wait);
-
-        /* Server-side enqueue wait time estimate, used in
-            __ldlm_add_waiting_lock to set future enqueue timers */
-        at_add(&lock->l_resource->lr_namespace->ns_at_estimate,
-               total_enqueue_wait / ONE_MILLION);
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-
-        req->rq_send_state = LUSTRE_IMP_FULL;
-        /* ptlrpc_prep_req already set timeout */
-        if (AT_OFF)
-                req->rq_timeout = ldlm_get_rq_timeout();
-
-        /* We only send real blocking ASTs after the lock is granted */
-        lock_res_and_lock(lock);
-        if (lock->l_flags & LDLM_FL_AST_SENT) {
-                body->lock_flags |= LDLM_FL_AST_SENT;
-
-                /* We might get here prior to ldlm_handle_enqueue setting
-                 * LDLM_FL_CANCEL_ON_BLOCK flag. Then we will put this lock
-                 * into waiting list, but this is safe and similar code in
-                 * ldlm_handle_enqueue will call ldlm_lock_cancel() still,
-                 * that would not only cancel the lock, but will also remove
-                 * it from waiting list */
-                if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) {
-                        unlock_res_and_lock(lock);
-                        ldlm_lock_cancel(lock);
-                        instant_cancel = 1;
-                        lock_res_and_lock(lock);
-                } else {
-                        ldlm_add_waiting_lock(lock); /* start the lock-timeout
-                                                         clock */
-                }
-        }
-        unlock_res_and_lock(lock);
-
-        if (lock->l_export && lock->l_export->exp_ldlm_stats)
-                lprocfs_counter_incr(lock->l_export->exp_ldlm_stats,
-                                     LDLM_CP_CALLBACK - LDLM_FIRST_OPC);
-
-        rc = ldlm_bl_and_cp_ast_fini(req, arg, lock, instant_cancel);
-
-        RETURN(rc);
-}
-
-int ldlm_server_glimpse_ast(struct ldlm_lock *lock, void *data)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        struct ldlm_request *body;
-        struct ptlrpc_request *req;
-        int size[] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                       [DLM_LOCKREQ_OFF]     = sizeof(*body) };
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(lock != NULL);
-
-        req = ptlrpc_prep_req(lock->l_export->exp_imp_reverse,
-                              LUSTRE_DLM_VERSION, LDLM_GL_CALLBACK, 2, size,
-                              NULL);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body));
-        body->lock_handle[0] = lock->l_remote_handle;
-        ldlm_lock2desc(lock, &body->lock_desc);
-
-        lock_res_and_lock(lock);
-        size[REPLY_REC_OFF] = lock->l_resource->lr_lvb_len;
-        unlock_res_and_lock(lock);
-        res = lock->l_resource;
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        req->rq_send_state = LUSTRE_IMP_FULL;
-        /* ptlrpc_prep_req already set timeout */
-        if (AT_OFF)
-                req->rq_timeout = ldlm_get_rq_timeout();
-
-        if (lock->l_export && lock->l_export->exp_ldlm_stats)
-                lprocfs_counter_incr(lock->l_export->exp_ldlm_stats,
-                                     LDLM_GL_CALLBACK - LDLM_FIRST_OPC);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc == -ELDLM_NO_LOCK_DATA)
-                LDLM_DEBUG(lock, "lost race - client has a lock but no inode");
-        else if (rc != 0)
-                rc = ldlm_handle_ast_error(lock, req, rc, "glimpse");
-        else
-                rc = ldlm_res_lvbo_update(res, req->rq_repmsg,
-                                          REPLY_REC_OFF, 1);
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-static struct ldlm_lock *
-find_existing_lock(struct obd_export *exp, struct lustre_handle *remote_hdl)
-{
-        struct list_head *iter;
-
-        spin_lock(&exp->exp_ldlm_data.led_lock);
-        list_for_each(iter, &exp->exp_ldlm_data.led_held_locks) {
-                struct ldlm_lock *lock;
-                lock = list_entry(iter, struct ldlm_lock, l_export_chain);
-                if (lock->l_remote_handle.cookie == remote_hdl->cookie) {
-                        LDLM_LOCK_GET(lock);
-                        spin_unlock(&exp->exp_ldlm_data.led_lock);
-                        return lock;
-                }
-        }
-        spin_unlock(&exp->exp_ldlm_data.led_lock);
-        return NULL;
-}
-
-static void ldlm_svc_get_eopc(struct ldlm_request *dlm_req,
-                       struct lprocfs_stats *srv_stats)
-{
-        int lock_type = 0, op = 0;
-
-        lock_type = dlm_req->lock_desc.l_resource.lr_type;
-
-        switch (lock_type) {
-        case LDLM_PLAIN:
-                op = PTLRPC_LAST_CNTR + LDLM_PLAIN_ENQUEUE;
-                break;
-        case LDLM_EXTENT:
-                if (dlm_req->lock_flags & LDLM_FL_HAS_INTENT)
-                        op = PTLRPC_LAST_CNTR + LDLM_GLIMPSE_ENQUEUE;
-                else
-                        op = PTLRPC_LAST_CNTR + LDLM_EXTENT_ENQUEUE;
-                break;
-        case LDLM_FLOCK:
-                op = PTLRPC_LAST_CNTR + LDLM_FLOCK_ENQUEUE;
-                break;
-        case LDLM_IBITS:
-                op = PTLRPC_LAST_CNTR + LDLM_IBITS_ENQUEUE;
-                break;
-        default:
-                op = 0;
-                break;
-        }
-
-        if (op)
-                lprocfs_counter_incr(srv_stats, op);
-
-        return ;
-}
-
-/*
- * Main server-side entry point into LDLM. This is called by ptlrpc service
- * threads to carry out client lock enqueueing requests.
- */
-int ldlm_handle_enqueue(struct ptlrpc_request *req,
-                        ldlm_completion_callback completion_callback,
-                        ldlm_blocking_callback blocking_callback,
-                        ldlm_glimpse_callback glimpse_callback)
-{
-        struct obd_device *obddev = req->rq_export->exp_obd;
-        struct ldlm_reply *dlm_rep;
-        struct ldlm_request *dlm_req;
-        int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREPLY_OFF]   = sizeof(*dlm_rep) };
-        int rc = 0;
-        __u32 flags;
-        ldlm_error_t err = ELDLM_OK;
-        struct ldlm_lock *lock = NULL;
-        void *cookie = NULL;
-        ENTRY;
-
-        LDLM_DEBUG_NOLOCK("server-side enqueue handler START");
-
-        dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req),
-                                     lustre_swab_ldlm_request);
-        if (dlm_req == NULL) {
-                CERROR ("Can't unpack dlm_req\n");
-                GOTO(out, rc = -EFAULT);
-        }
-
-        ldlm_request_cancel(req, dlm_req, LDLM_ENQUEUE_CANCEL_OFF);
-        flags = dlm_req->lock_flags;
-
-        LASSERT(req->rq_export);
-
-        if (req->rq_rqbd->rqbd_service->srv_stats)
-                ldlm_svc_get_eopc(dlm_req,
-                                  req->rq_rqbd->rqbd_service->srv_stats);
-
-        if (req->rq_export->exp_ldlm_stats)
-                lprocfs_counter_incr(req->rq_export->exp_ldlm_stats,
-                                     LDLM_ENQUEUE - LDLM_FIRST_OPC);
-
-        if (dlm_req->lock_desc.l_resource.lr_type < LDLM_MIN_TYPE ||
-            dlm_req->lock_desc.l_resource.lr_type >= LDLM_MAX_TYPE) {
-                DEBUG_REQ(D_ERROR, req, "invalid lock request type %d",
-                          dlm_req->lock_desc.l_resource.lr_type);
-                GOTO(out, rc = -EFAULT);
-        }
-
-        if (dlm_req->lock_desc.l_req_mode <= LCK_MINMODE ||
-            dlm_req->lock_desc.l_req_mode >= LCK_MAXMODE ||
-            dlm_req->lock_desc.l_req_mode & (dlm_req->lock_desc.l_req_mode-1)) {
-                DEBUG_REQ(D_ERROR, req, "invalid lock request mode %d",
-                          dlm_req->lock_desc.l_req_mode);
-                GOTO(out, rc = -EFAULT);
-        }
-
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) {
-                if (dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN) {
-                        DEBUG_REQ(D_ERROR, req,
-                                  "PLAIN lock request from IBITS client?");
-                        GOTO(out, rc = -EPROTO);
-                }
-        } else if (dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) {
-                DEBUG_REQ(D_ERROR, req,
-                          "IBITS lock request from unaware client?");
-                GOTO(out, rc = -EPROTO);
-        }
-
-#if 0
-        /* FIXME this makes it impossible to use LDLM_PLAIN locks -- check
-           against server's _CONNECT_SUPPORTED flags? (I don't want to use
-           ibits for mgc/mgs) */
-
-        /* INODEBITS_INTEROP: Perform conversion from plain lock to
-         * inodebits lock if client does not support them. */
-        if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS) &&
-            (dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN)) {
-                dlm_req->lock_desc.l_resource.lr_type = LDLM_IBITS;
-                dlm_req->lock_desc.l_policy_data.l_inodebits.bits =
-                        MDS_INODELOCK_LOOKUP | MDS_INODELOCK_UPDATE;
-                if (dlm_req->lock_desc.l_req_mode == LCK_PR)
-                        dlm_req->lock_desc.l_req_mode = LCK_CR;
-        }
-#endif
-
-        if (flags & LDLM_FL_REPLAY) {
-                lock = find_existing_lock(req->rq_export,
-                                          &dlm_req->lock_handle[0]);
-                if (lock != NULL) {
-                        DEBUG_REQ(D_DLMTRACE, req, "found existing lock cookie "
-                                  LPX64, lock->l_handle.h_cookie);
-                        GOTO(existing_lock, rc = 0);
-                }
-        }
-
-        /* The lock's callback data might be set in the policy function */
-        lock = ldlm_lock_create(obddev->obd_namespace,
-                                dlm_req->lock_desc.l_resource.lr_name,
-                                dlm_req->lock_desc.l_resource.lr_type,
-                                dlm_req->lock_desc.l_req_mode,
-                                blocking_callback, completion_callback,
-                                glimpse_callback, NULL, 0);
-        if (!lock)
-                GOTO(out, rc = -ENOMEM);
-
-        do_gettimeofday(&lock->l_enqueued_time);
-        lock->l_remote_handle = dlm_req->lock_handle[0];
-        LDLM_DEBUG(lock, "server-side enqueue handler, new lock created");
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_ENQUEUE_BLOCKED, obd_timeout * 2);
-        /* Don't enqueue a lock onto the export if it has already
-         * been evicted.  Cancel it now instead. (bug 3822) */
-        if (req->rq_export->exp_failed) {
-                LDLM_ERROR(lock, "lock on destroyed export %p", req->rq_export);
-                GOTO(out, rc = -ENOTCONN);
-        }
-        lock->l_export = class_export_get(req->rq_export);
-        spin_lock(&lock->l_export->exp_ldlm_data.led_lock);
-        list_add(&lock->l_export_chain,
-                 &lock->l_export->exp_ldlm_data.led_held_locks);
-        spin_unlock(&lock->l_export->exp_ldlm_data.led_lock);
-
-existing_lock:
-
-        if (flags & LDLM_FL_HAS_INTENT) {
-                /* In this case, the reply buffer is allocated deep in
-                 * local_lock_enqueue by the policy function. */
-                cookie = req;
-        } else {
-                int buffers = 2;
-
-                lock_res_and_lock(lock);
-                if (lock->l_resource->lr_lvb_len) {
-                        size[DLM_REPLY_REC_OFF] = lock->l_resource->lr_lvb_len;
-                        buffers = 3;
-                }
-                unlock_res_and_lock(lock);
-
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR))
-                        GOTO(out, rc = -ENOMEM);
-
-                rc = lustre_pack_reply(req, buffers, size, NULL);
-                if (rc)
-                        GOTO(out, rc);
-        }
-
-        if (dlm_req->lock_desc.l_resource.lr_type != LDLM_PLAIN)
-                lock->l_policy_data = dlm_req->lock_desc.l_policy_data;
-        if (dlm_req->lock_desc.l_resource.lr_type == LDLM_EXTENT)
-                lock->l_req_extent = lock->l_policy_data.l_extent;
-
-        err = ldlm_lock_enqueue(obddev->obd_namespace, &lock, cookie, (int *)&flags);
-        if (err)
-                GOTO(out, err);
-
-        dlm_rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF,
-                                 sizeof(*dlm_rep));
-        dlm_rep->lock_flags = flags;
-
-        ldlm_lock2desc(lock, &dlm_rep->lock_desc);
-        ldlm_lock2handle(lock, &dlm_rep->lock_handle);
-
-        /* We never send a blocking AST until the lock is granted, but
-         * we can tell it right now */
-        lock_res_and_lock(lock);
-
-        /* Now take into account flags to be inherited from original lock
-           request both in reply to client and in our own lock flags. */
-        dlm_rep->lock_flags |= dlm_req->lock_flags & LDLM_INHERIT_FLAGS;
-        lock->l_flags |= dlm_req->lock_flags & LDLM_INHERIT_FLAGS;
-
-        /* Don't move a pending lock onto the export if it has already
-         * been evicted.  Cancel it now instead. (bug 5683) */
-        if (req->rq_export->exp_failed ||
-            OBD_FAIL_CHECK_ONCE(OBD_FAIL_LDLM_ENQUEUE_OLD_EXPORT)) {
-                LDLM_ERROR(lock, "lock on destroyed export %p", req->rq_export);
-                rc = -ENOTCONN;
-        } else if (lock->l_flags & LDLM_FL_AST_SENT) {
-                dlm_rep->lock_flags |= LDLM_FL_AST_SENT;
-                if (lock->l_granted_mode == lock->l_req_mode) {
-                        /* Only cancel lock if it was granted, because it
-                         * would be destroyed immediatelly and would never
-                         * be granted in the future, causing timeouts on client.
-                         * Not granted lock will be cancelled immediatelly after
-                         * sending completion AST.
-                         */
-                        if (dlm_rep->lock_flags & LDLM_FL_CANCEL_ON_BLOCK) {
-                                unlock_res_and_lock(lock);
-                                ldlm_lock_cancel(lock);
-                                lock_res_and_lock(lock);
-                        } else
-                                ldlm_add_waiting_lock(lock);
-                }
-        }
-        /* Make sure we never ever grant usual metadata locks to liblustre
-           clients */
-        if ((dlm_req->lock_desc.l_resource.lr_type == LDLM_PLAIN ||
-            dlm_req->lock_desc.l_resource.lr_type == LDLM_IBITS) &&
-             req->rq_export->exp_libclient) {
-                if (!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) ||
-                    !(dlm_rep->lock_flags & LDLM_FL_CANCEL_ON_BLOCK)) {
-                        CERROR("Granting sync lock to libclient. "
-                               "req fl %d, rep fl %d, lock fl %d\n",
-                               dlm_req->lock_flags, dlm_rep->lock_flags,
-                               lock->l_flags);
-                        LDLM_ERROR(lock, "sync lock");
-                        if (dlm_req->lock_flags & LDLM_FL_HAS_INTENT) {
-                                struct ldlm_intent *it;
-                                it = lustre_msg_buf(req->rq_reqmsg,
-                                                    DLM_INTENT_IT_OFF,
-                                                    sizeof(*it));
-                                if (it != NULL) {
-                                        CERROR("This is intent %s ("LPU64")\n",
-                                               ldlm_it2str(it->opc), it->opc);
-                                }
-                        }
-                }
-        }
-
-        unlock_res_and_lock(lock);
-
-        EXIT;
- out:
-        req->rq_status = rc ?: err;  /* return either error - bug 11190 */
-        if (!req->rq_packed_final) {
-                err = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc == 0)
-                        rc = err;
-        }
-
-        /* The LOCK_CHANGED code in ldlm_lock_enqueue depends on this
-         * ldlm_reprocess_all.  If this moves, revisit that code. -phil */
-        if (lock) {
-                LDLM_DEBUG(lock, "server-side enqueue handler, sending reply"
-                           "(err=%d, rc=%d)", err, rc);
-
-                if (rc == 0) {
-                        lock_res_and_lock(lock);
-                        size[DLM_REPLY_REC_OFF] = lock->l_resource->lr_lvb_len;
-                        if (size[DLM_REPLY_REC_OFF] > 0) {
-                                void *lvb = lustre_msg_buf(req->rq_repmsg,
-                                                       DLM_REPLY_REC_OFF,
-                                                       size[DLM_REPLY_REC_OFF]);
-                                LASSERTF(lvb != NULL, "req %p, lock %p\n",
-                                         req, lock);
-
-                                memcpy(lvb, lock->l_resource->lr_lvb_data,
-                                       size[DLM_REPLY_REC_OFF]);
-                        }
-                        unlock_res_and_lock(lock);
-                } else {
-                        lock_res_and_lock(lock);
-                        ldlm_resource_unlink_lock(lock);
-                        ldlm_lock_destroy_nolock(lock);
-                        unlock_res_and_lock(lock);
-                }
-
-                if (!err && dlm_req->lock_desc.l_resource.lr_type != LDLM_FLOCK)
-                        ldlm_reprocess_all(lock->l_resource);
-
-                LDLM_LOCK_PUT(lock);
-        }
-
-        LDLM_DEBUG_NOLOCK("server-side enqueue handler END (lock %p, rc %d)",
-                          lock, rc);
-
-        return rc;
-}
-
-int ldlm_handle_convert(struct ptlrpc_request *req)
-{
-        struct ldlm_request *dlm_req;
-        struct ldlm_reply *dlm_rep;
-        struct ldlm_lock *lock;
-        int rc;
-        int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREPLY_OFF]   = sizeof(*dlm_rep) };
-        ENTRY;
-
-        dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req),
-                                     lustre_swab_ldlm_request);
-        if (dlm_req == NULL) {
-                CERROR ("Can't unpack dlm_req\n");
-                RETURN (-EFAULT);
-        }
-
-        if (req->rq_export && req->rq_export->exp_ldlm_stats)
-                lprocfs_counter_incr(req->rq_export->exp_ldlm_stats,
-                                     LDLM_CONVERT - LDLM_FIRST_OPC);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        dlm_rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF,
-                                 sizeof(*dlm_rep));
-        dlm_rep->lock_flags = dlm_req->lock_flags;
-
-        lock = ldlm_handle2lock(&dlm_req->lock_handle[0]);
-        if (!lock) {
-                req->rq_status = EINVAL;
-        } else {
-                void *res = NULL;
-
-                LDLM_DEBUG(lock, "server-side convert handler START");
-
-                do_gettimeofday(&lock->l_enqueued_time);
-                res = ldlm_lock_convert(lock, dlm_req->lock_desc.l_req_mode,
-                                        &dlm_rep->lock_flags);
-                if (res) {
-                        if (ldlm_del_waiting_lock(lock))
-                                LDLM_DEBUG(lock, "converted waiting lock");
-                        req->rq_status = 0;
-                } else {
-                        req->rq_status = EDEADLOCK;
-                }
-        }
-
-        if (lock) {
-                if (!req->rq_status)
-                        ldlm_reprocess_all(lock->l_resource);
-                LDLM_DEBUG(lock, "server-side convert handler END");
-                LDLM_LOCK_PUT(lock);
-        } else
-                LDLM_DEBUG_NOLOCK("server-side convert handler END");
-
-        RETURN(0);
-}
-
-/* Cancel all the locks whos handles are packed into ldlm_request */
-int ldlm_request_cancel(struct ptlrpc_request *req,
-                        struct ldlm_request *dlm_req, int first)
-{
-        struct ldlm_resource *res, *pres = NULL;
-        struct ldlm_lock *lock;
-        int i, count, done = 0;
-        ENTRY;
-
-        count = dlm_req->lock_count ? dlm_req->lock_count : 1;
-        if (first >= count)
-                RETURN(0);
-
-        /* There is no lock on the server at the replay time,
-         * skip lock cancelling to make replay tests to pass. */
-        if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY)
-                RETURN(0);
-
-        LDLM_DEBUG_NOLOCK("server-side cancel handler START: %d locks",
-                          count - first);
-        for (i = first; i < count; i++) {
-                lock = ldlm_handle2lock(&dlm_req->lock_handle[i]);
-                if (!lock) {
-                        LDLM_DEBUG_NOLOCK("server-side cancel handler stale "
-                                          "lock (cookie "LPU64")",
-                                          dlm_req->lock_handle[i].cookie);
-                        continue;
-                }
-
-                done++;
-                res = lock->l_resource;
-                if (res != pres) {
-                        if (pres != NULL) {
-                                ldlm_reprocess_all(pres);
-                                ldlm_resource_putref(pres);
-                        }
-                        if (res != NULL) {
-                                ldlm_resource_getref(res);
-                                ldlm_res_lvbo_update(res, NULL, 0, 1);
-                        }
-                        pres = res;
-                }
-                ldlm_lock_cancel(lock);
-                LDLM_LOCK_PUT(lock);
-        }
-        if (pres != NULL) {
-                ldlm_reprocess_all(pres);
-                ldlm_resource_putref(pres);
-        }
-        LDLM_DEBUG_NOLOCK("server-side cancel handler END");
-        RETURN(done);
-}
-
-int ldlm_handle_cancel(struct ptlrpc_request *req)
-{
-        struct ldlm_request *dlm_req;
-        int rc;
-        ENTRY;
-
-        dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req),
-                                     lustre_swab_ldlm_request);
-        if (dlm_req == NULL) {
-                CERROR("bad request buffer for cancel\n");
-                RETURN(-EFAULT);
-        }
-
-        if (req->rq_export && req->rq_export->exp_ldlm_stats)
-                lprocfs_counter_incr(req->rq_export->exp_ldlm_stats,
-                                     LDLM_CANCEL - LDLM_FIRST_OPC);
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        if (!ldlm_request_cancel(req, dlm_req, 0))
-                req->rq_status = ESTALE;
-
-        if (ptlrpc_reply(req) != 0)
-                LBUG();
-
-        RETURN(0);
-}
-
-void ldlm_handle_bl_callback(struct ldlm_namespace *ns,
-                             struct ldlm_lock_desc *ld, struct ldlm_lock *lock)
-{
-        int do_ast;
-        ENTRY;
-
-        LDLM_DEBUG(lock, "client blocking AST callback handler START");
-
-        lock_res_and_lock(lock);
-        lock->l_flags |= LDLM_FL_CBPENDING;
-
-        if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK)
-                lock->l_flags |= LDLM_FL_CANCEL;
-
-        do_ast = (!lock->l_readers && !lock->l_writers);
-        unlock_res_and_lock(lock);
-
-        if (do_ast) {
-                LDLM_DEBUG(lock, "already unused, calling "
-                           "callback (%p)", lock->l_blocking_ast);
-                if (lock->l_blocking_ast != NULL)
-                        lock->l_blocking_ast(lock, ld, lock->l_ast_data,
-                                             LDLM_CB_BLOCKING);
-        } else {
-                LDLM_DEBUG(lock, "Lock still has references, will be"
-                           " cancelled later");
-        }
-
-        LDLM_DEBUG(lock, "client blocking callback handler END");
-        LDLM_LOCK_PUT(lock);
-        EXIT;
-}
-
-static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
-                                    struct ldlm_namespace *ns,
-                                    struct ldlm_request *dlm_req,
-                                    struct ldlm_lock *lock)
-{
-        CFS_LIST_HEAD(ast_list);
-        ENTRY;
-
-        LDLM_DEBUG(lock, "client completion callback handler START");
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_BL_CB_RACE)) {
-                int to = cfs_time_seconds(1);
-                while (to > 0) {
-                        to = schedule_timeout(to);
-                        if (lock->l_granted_mode == lock->l_req_mode ||
-                            lock->l_destroyed)
-                                break;
-                }
-        }
-
-        lock_res_and_lock(lock);
-        if (lock->l_destroyed ||
-            lock->l_granted_mode == lock->l_req_mode) {
-                /* bug 11300: the lock has already been granted */
-                unlock_res_and_lock(lock);
-                LDLM_DEBUG(lock, "Double grant race happened");
-                LDLM_LOCK_PUT(lock);
-                EXIT;
-                return;
-        }
-
-        /* If we receive the completion AST before the actual enqueue returned,
-         * then we might need to switch lock modes, resources, or extents. */
-        if (dlm_req->lock_desc.l_granted_mode != lock->l_req_mode) {
-                lock->l_req_mode = dlm_req->lock_desc.l_granted_mode;
-                LDLM_DEBUG(lock, "completion AST, new lock mode");
-        }
-
-        if (lock->l_resource->lr_type != LDLM_PLAIN) {
-                lock->l_policy_data = dlm_req->lock_desc.l_policy_data;
-                LDLM_DEBUG(lock, "completion AST, new policy data");
-        }
-
-        ldlm_resource_unlink_lock(lock);
-        if (memcmp(&dlm_req->lock_desc.l_resource.lr_name,
-                   &lock->l_resource->lr_name,
-                   sizeof(lock->l_resource->lr_name)) != 0) {
-                unlock_res_and_lock(lock);
-                ldlm_lock_change_resource(ns, lock,
-                                         dlm_req->lock_desc.l_resource.lr_name);
-                LDLM_DEBUG(lock, "completion AST, new resource");
-                CERROR("change resource!\n");
-                lock_res_and_lock(lock);
-        }
-
-        if (dlm_req->lock_flags & LDLM_FL_AST_SENT) {
-                /* BL_AST locks are not needed in lru.
-                 * let ldlm_cancel_lru() be fast. */
-                ldlm_lock_remove_from_lru(lock);
-                lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST;
-                LDLM_DEBUG(lock, "completion AST includes blocking AST");
-        }
-
-        if (lock->l_lvb_len) {
-                void *lvb;
-                lvb = lustre_swab_reqbuf(req, DLM_REQ_REC_OFF, lock->l_lvb_len,
-                                         lock->l_lvb_swabber);
-                if (lvb == NULL) {
-                        LDLM_ERROR(lock, "completion AST did not contain "
-                                   "expected LVB!");
-                } else {
-                        memcpy(lock->l_lvb_data, lvb, lock->l_lvb_len);
-                }
-        }
-
-        ldlm_grant_lock(lock, &ast_list);
-        unlock_res_and_lock(lock);
-
-        LDLM_DEBUG(lock, "callback handler finished, about to run_ast_work");
-
-        ldlm_run_cp_ast_work(&ast_list);
-
-        LDLM_DEBUG_NOLOCK("client completion callback handler END (lock %p)",
-                          lock);
-        LDLM_LOCK_PUT(lock);
-        EXIT;
-}
-
-static void ldlm_handle_gl_callback(struct ptlrpc_request *req,
-                                    struct ldlm_namespace *ns,
-                                    struct ldlm_request *dlm_req,
-                                    struct ldlm_lock *lock)
-{
-        int rc = -ENOSYS;
-        ENTRY;
-
-        LDLM_DEBUG(lock, "client glimpse AST callback handler");
-
-        if (lock->l_glimpse_ast != NULL)
-                rc = lock->l_glimpse_ast(lock, req);
-
-        if (req->rq_repmsg != NULL) {
-                ptlrpc_reply(req);
-        } else {
-                req->rq_status = rc;
-                ptlrpc_error(req);
-        }
-
-        lock_res_and_lock(lock);
-        if (lock->l_granted_mode == LCK_PW &&
-            !lock->l_readers && !lock->l_writers &&
-            cfs_time_after(cfs_time_current(),
-                           cfs_time_add(lock->l_last_used, 
-                                        cfs_time_seconds(10)))) {
-                unlock_res_and_lock(lock);
-                if (ldlm_bl_to_thread_lock(ns, NULL, lock))
-                        ldlm_handle_bl_callback(ns, NULL, lock);
-
-                EXIT;
-                return;
-        }
-        unlock_res_and_lock(lock);
-        LDLM_LOCK_PUT(lock);
-        EXIT;
-}
-
-static int ldlm_callback_reply(struct ptlrpc_request *req, int rc)
-{
-        req->rq_status = rc;
-        if (!req->rq_packed_final) {
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc)
-                        return rc;
-        }
-        return ptlrpc_reply(req);
-}
-
-#ifdef __KERNEL__
-static int ldlm_bl_to_thread(struct ldlm_namespace *ns,
-                             struct ldlm_lock_desc *ld, struct ldlm_lock *lock,
-                             struct list_head *cancels, int count)
-{
-        struct ldlm_bl_pool *blp = ldlm_state->ldlm_bl_pool;
-        struct ldlm_bl_work_item *blwi;
-        ENTRY;
-
-        if (cancels && count == 0)
-                RETURN(0);
-
-        OBD_ALLOC(blwi, sizeof(*blwi));
-        if (blwi == NULL)
-                RETURN(-ENOMEM);
-
-        blwi->blwi_ns = ns;
-        if (ld != NULL)
-                blwi->blwi_ld = *ld;
-        if (count) {
-                list_add(&blwi->blwi_head, cancels);
-                list_del_init(cancels);
-                blwi->blwi_count = count;
-        } else {
-                blwi->blwi_lock = lock;
-        }
-        spin_lock(&blp->blp_lock);
-        if (lock && lock->l_flags & LDLM_FL_DISCARD_DATA) {
-                /* add LDLM_FL_DISCARD_DATA requests to the priority list */
-                list_add_tail(&blwi->blwi_entry, &blp->blp_prio_list);
-        } else {
-                /* other blocking callbacks are added to the regular list */
-                list_add_tail(&blwi->blwi_entry, &blp->blp_list);
-        }
-        cfs_waitq_signal(&blp->blp_waitq);
-        spin_unlock(&blp->blp_lock);
-
-        RETURN(0);
-}
-#endif
-
-int ldlm_bl_to_thread_lock(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
-                           struct ldlm_lock *lock)
-{
-#ifdef __KERNEL__
-        RETURN(ldlm_bl_to_thread(ns, ld, lock, NULL, 0));
-#else
-        RETURN(-ENOSYS);
-#endif
-}
-
-int ldlm_bl_to_thread_list(struct ldlm_namespace *ns, struct ldlm_lock_desc *ld,
-                           struct list_head *cancels, int count)
-{
-#ifdef __KERNEL__
-        RETURN(ldlm_bl_to_thread(ns, ld, NULL, cancels, count));
-#else
-        RETURN(-ENOSYS);
-#endif
-}
-
-static int ldlm_callback_handler(struct ptlrpc_request *req)
-{
-        struct ldlm_namespace *ns;
-        struct ldlm_request *dlm_req;
-        struct ldlm_lock *lock;
-        int rc;
-        ENTRY;
-
-        /* Requests arrive in sender's byte order.  The ptlrpc service
-         * handler has already checked and, if necessary, byte-swapped the
-         * incoming request message body, but I am responsible for the
-         * message buffers. */
-
-        if (req->rq_export == NULL) {
-                struct ldlm_request *dlm_req;
-
-                CDEBUG(D_RPCTRACE, "operation %d from %s with bad "
-                       "export cookie "LPX64"; this is "
-                       "normal if this node rebooted with a lock held\n",
-                       lustre_msg_get_opc(req->rq_reqmsg),
-                       libcfs_id2str(req->rq_peer),
-                       lustre_msg_get_handle(req->rq_reqmsg)->cookie);
-
-                dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF,
-                                             sizeof(*dlm_req),
-                                             lustre_swab_ldlm_request);
-                if (dlm_req != NULL)
-                        CDEBUG(D_RPCTRACE, "--> lock cookie: "LPX64"\n",
-                               dlm_req->lock_handle[0].cookie);
-
-                ldlm_callback_reply(req, -ENOTCONN);
-                RETURN(0);
-        }
-
-        LASSERT(req->rq_export != NULL);
-        LASSERT(req->rq_export->exp_obd != NULL);
-
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-        case LDLM_BL_CALLBACK:
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_BL_CALLBACK, 0);
-                break;
-        case LDLM_CP_CALLBACK:
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_CP_CALLBACK, 0);
-                break;
-        case LDLM_GL_CALLBACK:
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_GL_CALLBACK, 0);
-                break;
-        case OBD_LOG_CANCEL: /* remove this eventually - for 1.4.0 compat */
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0);
-                rc = llog_origin_handle_cancel(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        case OBD_QC_CALLBACK:
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_QC_CALLBACK_NET, 0);
-                rc = target_handle_qc_callback(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        case QUOTA_DQACQ:
-        case QUOTA_DQREL:
-                /* reply in handler */
-                rc = target_handle_dqacq_callback(req);
-                RETURN(0);
-        case LLOG_ORIGIN_HANDLE_CREATE:
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_create(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        case LLOG_ORIGIN_HANDLE_NEXT_BLOCK:
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_next_block(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        case LLOG_ORIGIN_HANDLE_READ_HEADER:
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_read_header(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        case LLOG_ORIGIN_HANDLE_CLOSE:
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_close(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        default:
-                CERROR("unknown opcode %u\n",
-                       lustre_msg_get_opc(req->rq_reqmsg));
-                ldlm_callback_reply(req, -EPROTO);
-                RETURN(0);
-        }
-
-        ns = req->rq_export->exp_obd->obd_namespace;
-        LASSERT(ns != NULL);
-
-        dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF, sizeof(*dlm_req),
-                                     lustre_swab_ldlm_request);
-        if (dlm_req == NULL) {
-                CERROR ("can't unpack dlm_req\n");
-                ldlm_callback_reply(req, -EPROTO);
-                RETURN (0);
-        }
-
-        /* Force a known safe race, send a cancel to the server for a lock
-         * which the server has already started a blocking callback on. */
-        if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_BL_CB_RACE) &&
-            lustre_msg_get_opc(req->rq_reqmsg) == LDLM_BL_CALLBACK) {
-                rc = ldlm_cli_cancel(&dlm_req->lock_handle[0]);
-                if (rc < 0)
-                        CERROR("ldlm_cli_cancel: %d\n", rc);
-        }
-
-        lock = ldlm_handle2lock_ns(ns, &dlm_req->lock_handle[0]);
-        if (!lock) {
-                CDEBUG(D_DLMTRACE, "callback on lock "LPX64" - lock "
-                       "disappeared\n", dlm_req->lock_handle[0].cookie);
-                ldlm_callback_reply(req, -EINVAL);
-                RETURN(0);
-        }
-
-        /* Copy hints/flags (e.g. LDLM_FL_DISCARD_DATA) from AST. */
-        lock_res_and_lock(lock);
-        lock->l_flags |= (dlm_req->lock_flags & LDLM_AST_FLAGS);
-        if (lustre_msg_get_opc(req->rq_reqmsg) == LDLM_BL_CALLBACK) {
-                /* If somebody cancels locks and cache is already droped,
-                 * we can tell the server we have no lock. Otherwise, we
-                 * should send cancel after dropping the cache. */
-                if ((lock->l_flags & LDLM_FL_CANCELING) &&
-                    (lock->l_flags & LDLM_FL_BL_DONE)) {
-                        LDLM_DEBUG(lock, "callback on lock "
-                                   LPX64" - lock disappeared\n",
-                                   dlm_req->lock_handle[0].cookie);
-                        unlock_res_and_lock(lock);
-                        LDLM_LOCK_PUT(lock);
-                        ldlm_callback_reply(req, -EINVAL);
-                        RETURN(0);
-                }
-                /* BL_AST locks are not needed in lru.
-                 * let ldlm_cancel_lru() be fast. */
-                ldlm_lock_remove_from_lru(lock);
-                lock->l_flags |= LDLM_FL_BL_AST;
-        }
-        unlock_res_and_lock(lock);
-
-        /* We want the ost thread to get this reply so that it can respond
-         * to ost requests (write cache writeback) that might be triggered
-         * in the callback.
-         *
-         * But we'd also like to be able to indicate in the reply that we're
-         * cancelling right now, because it's unused, or have an intent result
-         * in the reply, so we might have to push the responsibility for sending
-         * the reply down into the AST handlers, alas. */
-
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-        case LDLM_BL_CALLBACK:
-                CDEBUG(D_INODE, "blocking ast\n");
-                if (!(lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK))
-                        ldlm_callback_reply(req, 0);
-                if (ldlm_bl_to_thread_lock(ns, &dlm_req->lock_desc, lock))
-                        ldlm_handle_bl_callback(ns, &dlm_req->lock_desc, lock);
-                break;
-        case LDLM_CP_CALLBACK:
-                CDEBUG(D_INODE, "completion ast\n");
-                ldlm_callback_reply(req, 0);
-                ldlm_handle_cp_callback(req, ns, dlm_req, lock);
-                break;
-        case LDLM_GL_CALLBACK:
-                CDEBUG(D_INODE, "glimpse ast\n");
-                ldlm_handle_gl_callback(req, ns, dlm_req, lock);
-                break;
-        default:
-                LBUG();                         /* checked above */
-        }
-
-        RETURN(0);
-}
-
-static int ldlm_cancel_handler(struct ptlrpc_request *req)
-{
-        int rc;
-        ENTRY;
-
-        /* Requests arrive in sender's byte order.  The ptlrpc service
-         * handler has already checked and, if necessary, byte-swapped the
-         * incoming request message body, but I am responsible for the
-         * message buffers. */
-
-        if (req->rq_export == NULL) {
-                struct ldlm_request *dlm_req;
-
-                CERROR("operation %d from %s with bad export cookie "LPU64"\n",
-                       lustre_msg_get_opc(req->rq_reqmsg),
-                       libcfs_id2str(req->rq_peer),
-                       lustre_msg_get_handle(req->rq_reqmsg)->cookie);
-
-                dlm_req = lustre_swab_reqbuf(req, DLM_LOCKREQ_OFF,
-                                             sizeof(*dlm_req),
-                                             lustre_swab_ldlm_request);
-                if (dlm_req != NULL)
-                        ldlm_lock_dump_handle(D_ERROR,
-                                              &dlm_req->lock_handle[0]);
-
-                ldlm_callback_reply(req, -ENOTCONN);
-                RETURN(0);
-        }
-
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-
-        /* XXX FIXME move this back to mds/handler.c, bug 249 */
-        case LDLM_CANCEL:
-                CDEBUG(D_INODE, "cancel\n");
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_CANCEL, 0);
-                rc = ldlm_handle_cancel(req);
-                if (rc)
-                        break;
-                RETURN(0);
-        case OBD_LOG_CANCEL:
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0);
-                rc = llog_origin_handle_cancel(req);
-                ldlm_callback_reply(req, rc);
-                RETURN(0);
-        default:
-                CERROR("invalid opcode %d\n",
-                       lustre_msg_get_opc(req->rq_reqmsg));
-                ldlm_callback_reply(req, -EINVAL);
-        }
-
-        RETURN(0);
-}
-
-#ifdef __KERNEL__
-static struct ldlm_bl_work_item *ldlm_bl_get_work(struct ldlm_bl_pool *blp)
-{
-        struct ldlm_bl_work_item *blwi = NULL;
-        static unsigned int num_bl = 0;
-
-        spin_lock(&blp->blp_lock);
-        /* process a request from the blp_list at least every blp_num_threads */
-        if (!list_empty(&blp->blp_list) &&
-            (list_empty(&blp->blp_prio_list) || num_bl == 0))
-                blwi = list_entry(blp->blp_list.next,
-                                  struct ldlm_bl_work_item, blwi_entry);
-        else
-                if (!list_empty(&blp->blp_prio_list))
-                        blwi = list_entry(blp->blp_prio_list.next,
-                                          struct ldlm_bl_work_item, blwi_entry);
-
-        if (blwi) {
-                if (++num_bl >= atomic_read(&blp->blp_num_threads))
-                        num_bl = 0;
-                list_del(&blwi->blwi_entry);
-        }
-        spin_unlock(&blp->blp_lock);
-
-        return blwi;
-}
-
-/* This only contains temporary data until the thread starts */
-struct ldlm_bl_thread_data {
-        char                    bltd_name[CFS_CURPROC_COMM_MAX];
-        struct ldlm_bl_pool     *bltd_blp;
-        struct completion       bltd_comp;
-        int                     bltd_num;
-};
-
-static int ldlm_bl_thread_main(void *arg);
-
-static int ldlm_bl_thread_start(struct ldlm_bl_pool *blp)
-{
-        struct ldlm_bl_thread_data bltd = { .bltd_blp = blp };
-        int rc;
-
-        init_completion(&bltd.bltd_comp);
-        rc = cfs_kernel_thread(ldlm_bl_thread_main, &bltd, 0);
-        if (rc < 0) {
-                CERROR("cannot start LDLM thread ldlm_bl_%02d: rc %d\n",
-                       atomic_read(&blp->blp_num_threads), rc);
-                return rc;
-        }
-        wait_for_completion(&bltd.bltd_comp);
-
-        return 0;
-}
-
-static int ldlm_bl_thread_main(void *arg)
-{
-        struct ldlm_bl_pool *blp;
-        ENTRY;
-
-        {
-                struct ldlm_bl_thread_data *bltd = arg;
-
-                blp = bltd->bltd_blp;
-
-                bltd->bltd_num = atomic_inc_return(&blp->blp_num_threads) - 1;
-                atomic_inc(&blp->blp_busy_threads);
-
-                snprintf(bltd->bltd_name, sizeof(bltd->bltd_name) - 1,
-                        "ldlm_bl_%02d", bltd->bltd_num);
-                cfs_daemonize(bltd->bltd_name);
-
-                complete(&bltd->bltd_comp);
-                /* cannot use bltd after this, it is only on caller's stack */
-        }
-
-        while (1) {
-                struct l_wait_info lwi = { 0 };
-                struct ldlm_bl_work_item *blwi = NULL;
-
-                blwi = ldlm_bl_get_work(blp);
-
-                if (blwi == NULL) {
-                        int busy;
-
-                        atomic_dec(&blp->blp_busy_threads);
-                        l_wait_event_exclusive(blp->blp_waitq,
-                                         (blwi = ldlm_bl_get_work(blp)) != NULL,
-                                         &lwi);
-                        busy = atomic_inc_return(&blp->blp_busy_threads);
-
-                        if (blwi->blwi_ns == NULL)
-                                /* added by ldlm_cleanup() */
-                                break;
-
-                        /* Not fatal if racy and have a few too many threads */
-                        if (unlikely(busy < blp->blp_max_threads &&
-                                    busy >= atomic_read(&blp->blp_num_threads)))
-                                /* discard the return value, we tried */
-                                ldlm_bl_thread_start(blp);
-                } else {
-                        if (blwi->blwi_ns == NULL)
-                                /* added by ldlm_cleanup() */
-                                break;
-                }
-
-                if (blwi->blwi_count) {
-                        /* The special case when we cancel locks in lru
-                         * asynchronously, we pass the list of locks here.
-                         * Thus lock is marked LDLM_FL_CANCELING, and already
-                         * canceled locally. */
-                        ldlm_cli_cancel_list(&blwi->blwi_head,
-                                             blwi->blwi_count, NULL, 0);
-                } else {
-                        ldlm_handle_bl_callback(blwi->blwi_ns, &blwi->blwi_ld,
-                                                blwi->blwi_lock);
-                }
-                OBD_FREE(blwi, sizeof(*blwi));
-        }
-
-        atomic_dec(&blp->blp_busy_threads);
-        atomic_dec(&blp->blp_num_threads);
-        complete(&blp->blp_comp);
-        RETURN(0);
-}
-
-#endif
-
-static int ldlm_setup(void);
-static int ldlm_cleanup(int force);
-
-int ldlm_get_ref(void)
-{
-        int rc = 0;
-        ENTRY;
-        mutex_down(&ldlm_ref_sem);
-        if (++ldlm_refcount == 1) {
-                rc = ldlm_setup();
-                if (rc)
-                        ldlm_refcount--;
-        }
-        mutex_up(&ldlm_ref_sem);
-
-        RETURN(rc);
-}
-
-void ldlm_put_ref(int force)
-{
-        ENTRY;
-        mutex_down(&ldlm_ref_sem);
-        if (ldlm_refcount == 1) {
-                int rc = ldlm_cleanup(force);
-                if (rc)
-                        CERROR("ldlm_cleanup failed: %d\n", rc);
-                else
-                        ldlm_refcount--;
-        } else {
-                ldlm_refcount--;
-        }
-        mutex_up(&ldlm_ref_sem);
-
-        EXIT;
-}
-
-static int ldlm_setup(void)
-{
-        struct ldlm_bl_pool *blp;
-        int rc = 0;
-        int ldlm_min_threads = LDLM_THREADS_AUTO_MIN;
-        int ldlm_max_threads = LDLM_THREADS_AUTO_MAX;
-#ifdef __KERNEL__
-        int i;
-#endif
-        ENTRY;
-
-        if (ldlm_state != NULL)
-                RETURN(-EALREADY);
-
-        OBD_ALLOC(ldlm_state, sizeof(*ldlm_state));
-        if (ldlm_state == NULL)
-                RETURN(-ENOMEM);
-
-#ifdef LPROCFS
-        rc = ldlm_proc_setup();
-        if (rc != 0)
-                GOTO(out_free, rc);
-#endif
-
-#ifdef __KERNEL__
-        if (ldlm_num_threads) {
-                /* If ldlm_num_threads is set, it is the min and the max. */
-                if (ldlm_num_threads > LDLM_THREADS_AUTO_MAX)
-                        ldlm_num_threads = LDLM_THREADS_AUTO_MAX;
-                if (ldlm_num_threads < LDLM_THREADS_AUTO_MIN)
-                        ldlm_num_threads = LDLM_THREADS_AUTO_MIN;
-                ldlm_min_threads = ldlm_max_threads = ldlm_num_threads;
-        }
-#endif
-
-        ldlm_state->ldlm_cb_service =
-                ptlrpc_init_svc(LDLM_NBUFS, LDLM_BUFSIZE, LDLM_MAXREQSIZE,
-                                LDLM_MAXREPSIZE, LDLM_CB_REQUEST_PORTAL,
-                                LDLM_CB_REPLY_PORTAL, 1800,
-                                ldlm_callback_handler, "ldlm_cbd",
-                                ldlm_svc_proc_dir, NULL,
-                                ldlm_min_threads, ldlm_max_threads,
-                                "ldlm_cb");
-
-        if (!ldlm_state->ldlm_cb_service) {
-                CERROR("failed to start service\n");
-                GOTO(out_proc, rc = -ENOMEM);
-        }
-
-        ldlm_state->ldlm_cancel_service =
-                ptlrpc_init_svc(LDLM_NBUFS, LDLM_BUFSIZE, LDLM_MAXREQSIZE,
-                                LDLM_MAXREPSIZE, LDLM_CANCEL_REQUEST_PORTAL,
-                                LDLM_CANCEL_REPLY_PORTAL, 6000,
-                                ldlm_cancel_handler, "ldlm_canceld",
-                                ldlm_svc_proc_dir, NULL,
-                                ldlm_min_threads, ldlm_max_threads,
-                                "ldlm_cn");
-
-        if (!ldlm_state->ldlm_cancel_service) {
-                CERROR("failed to start service\n");
-                GOTO(out_proc, rc = -ENOMEM);
-        }
-
-        OBD_ALLOC(blp, sizeof(*blp));
-        if (blp == NULL)
-                GOTO(out_proc, rc = -ENOMEM);
-        ldlm_state->ldlm_bl_pool = blp;
-
-        spin_lock_init(&blp->blp_lock);
-        CFS_INIT_LIST_HEAD(&blp->blp_list);
-        CFS_INIT_LIST_HEAD(&blp->blp_prio_list);
-        cfs_waitq_init(&blp->blp_waitq);
-        atomic_set(&blp->blp_num_threads, 0);
-        atomic_set(&blp->blp_busy_threads, 0);
-        blp->blp_min_threads = ldlm_min_threads;
-        blp->blp_max_threads = ldlm_max_threads;
-
-#ifdef __KERNEL__
-        for (i = 0; i < blp->blp_min_threads; i++) {
-                rc = ldlm_bl_thread_start(blp);
-                if (rc < 0)
-                        GOTO(out_thread, rc);
-        }
-
-        rc = ptlrpc_start_threads(NULL, ldlm_state->ldlm_cancel_service);
-        if (rc)
-                GOTO(out_thread, rc);
-
-        rc = ptlrpc_start_threads(NULL, ldlm_state->ldlm_cb_service);
-        if (rc)
-                GOTO(out_thread, rc);
-
-        CFS_INIT_LIST_HEAD(&expired_lock_thread.elt_expired_locks);
-        expired_lock_thread.elt_state = ELT_STOPPED;
-        cfs_waitq_init(&expired_lock_thread.elt_waitq);
-
-        CFS_INIT_LIST_HEAD(&waiting_locks_list);
-        spin_lock_init(&waiting_locks_spinlock);
-        cfs_timer_init(&waiting_locks_timer, waiting_locks_callback, 0);
-
-        rc = cfs_kernel_thread(expired_lock_main, NULL, CLONE_VM | CLONE_FILES);
-        if (rc < 0) {
-                CERROR("Cannot start ldlm expired-lock thread: %d\n", rc);
-                GOTO(out_thread, rc);
-        }
-
-        wait_event(expired_lock_thread.elt_waitq,
-                   expired_lock_thread.elt_state == ELT_READY);
-#endif
-
-#ifdef __KERNEL__
-        rc = ldlm_pools_init();
-        if (rc)
-                GOTO(out_thread, rc);
-#endif
-
-        RETURN(0);
-
-#ifdef __KERNEL__
- out_thread:
-        ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service);
-        ptlrpc_unregister_service(ldlm_state->ldlm_cb_service);
-#endif
-
- out_proc:
-#ifdef LPROCFS
-        ldlm_proc_cleanup();
- out_free:
-#endif
-        OBD_FREE(ldlm_state, sizeof(*ldlm_state));
-        ldlm_state = NULL;
-        return rc;
-}
-
-static int ldlm_cleanup(int force)
-{
-#ifdef __KERNEL__
-        struct ldlm_bl_pool *blp = ldlm_state->ldlm_bl_pool;
-#endif
-        ENTRY;
-
-        if (!list_empty(ldlm_namespace_list(LDLM_NAMESPACE_SERVER)) || 
-            !list_empty(ldlm_namespace_list(LDLM_NAMESPACE_CLIENT))) {
-                CERROR("ldlm still has namespaces; clean these up first.\n");
-                ldlm_dump_all_namespaces(LDLM_NAMESPACE_SERVER, D_DLMTRACE);
-                ldlm_dump_all_namespaces(LDLM_NAMESPACE_CLIENT, D_DLMTRACE);
-                RETURN(-EBUSY);
-        }
-
-#ifdef __KERNEL__
-        ldlm_pools_fini();
-#endif
-
-#ifdef __KERNEL__
-        while (atomic_read(&blp->blp_num_threads) > 0) {
-                struct ldlm_bl_work_item blwi = { .blwi_ns = NULL };
-
-                init_completion(&blp->blp_comp);
-
-                spin_lock(&blp->blp_lock);
-                list_add_tail(&blwi.blwi_entry, &blp->blp_list);
-                cfs_waitq_signal(&blp->blp_waitq);
-                spin_unlock(&blp->blp_lock);
-
-                wait_for_completion(&blp->blp_comp);
-        }
-        OBD_FREE(blp, sizeof(*blp));
-
-        ptlrpc_unregister_service(ldlm_state->ldlm_cb_service);
-        ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service);
-        ldlm_proc_cleanup();
-
-        expired_lock_thread.elt_state = ELT_TERMINATE;
-        cfs_waitq_signal(&expired_lock_thread.elt_waitq);
-        wait_event(expired_lock_thread.elt_waitq,
-                   expired_lock_thread.elt_state == ELT_STOPPED);
-#else
-        ptlrpc_unregister_service(ldlm_state->ldlm_cb_service);
-        ptlrpc_unregister_service(ldlm_state->ldlm_cancel_service);
-#endif
-
-        OBD_FREE(ldlm_state, sizeof(*ldlm_state));
-        ldlm_state = NULL;
-
-        RETURN(0);
-}
-
-int __init ldlm_init(void)
-{
-        init_mutex(&ldlm_ref_sem);
-        init_mutex(ldlm_namespace_lock(LDLM_NAMESPACE_SERVER));
-        init_mutex(ldlm_namespace_lock(LDLM_NAMESPACE_CLIENT));
-        ldlm_resource_slab = cfs_mem_cache_create("ldlm_resources",
-                                               sizeof(struct ldlm_resource), 0,
-                                               SLAB_HWCACHE_ALIGN);
-        if (ldlm_resource_slab == NULL)
-                return -ENOMEM;
-
-        ldlm_lock_slab = cfs_mem_cache_create("ldlm_locks",
-                                           sizeof(struct ldlm_lock), 0,
-                                           SLAB_HWCACHE_ALIGN);
-        if (ldlm_lock_slab == NULL) {
-                cfs_mem_cache_destroy(ldlm_resource_slab);
-                return -ENOMEM;
-        }
-
-        ldlm_interval_slab = cfs_mem_cache_create("interval_node",
-                                        sizeof(struct ldlm_interval),
-                                        0, SLAB_HWCACHE_ALIGN);
-        if (ldlm_interval_slab == NULL) {
-                cfs_mem_cache_destroy(ldlm_resource_slab);
-                cfs_mem_cache_destroy(ldlm_lock_slab);
-                return -ENOMEM;
-        }
-
-        return 0;
-}
-
-void __exit ldlm_exit(void)
-{
-        int rc;
-        if (ldlm_refcount)
-                CERROR("ldlm_refcount is %d in ldlm_exit!\n", ldlm_refcount);
-        rc = cfs_mem_cache_destroy(ldlm_resource_slab);
-        LASSERTF(rc == 0, "couldn't free ldlm resource slab\n");
-        rc = cfs_mem_cache_destroy(ldlm_lock_slab);
-        LASSERTF(rc == 0, "couldn't free ldlm lock slab\n");
-        rc = cfs_mem_cache_destroy(ldlm_interval_slab);
-        LASSERTF(rc == 0, "couldn't free interval node slab\n");
-}
-
-/* ldlm_extent.c */
-EXPORT_SYMBOL(ldlm_extent_shift_kms);
-
-/* ldlm_lock.c */
-EXPORT_SYMBOL(ldlm_get_processing_policy);
-EXPORT_SYMBOL(ldlm_lock2desc);
-EXPORT_SYMBOL(ldlm_register_intent);
-EXPORT_SYMBOL(ldlm_lockname);
-EXPORT_SYMBOL(ldlm_typename);
-EXPORT_SYMBOL(ldlm_lock2handle);
-EXPORT_SYMBOL(__ldlm_handle2lock);
-EXPORT_SYMBOL(ldlm_lock_get);
-EXPORT_SYMBOL(ldlm_lock_put);
-EXPORT_SYMBOL(ldlm_lock_match);
-EXPORT_SYMBOL(ldlm_lock_cancel);
-EXPORT_SYMBOL(ldlm_lock_addref);
-EXPORT_SYMBOL(ldlm_lock_decref);
-EXPORT_SYMBOL(ldlm_lock_decref_and_cancel);
-EXPORT_SYMBOL(ldlm_lock_change_resource);
-EXPORT_SYMBOL(ldlm_lock_set_data);
-EXPORT_SYMBOL(ldlm_it2str);
-EXPORT_SYMBOL(ldlm_lock_dump);
-EXPORT_SYMBOL(ldlm_lock_dump_handle);
-EXPORT_SYMBOL(ldlm_cancel_locks_for_export);
-EXPORT_SYMBOL(ldlm_reprocess_all_ns);
-EXPORT_SYMBOL(ldlm_lock_allow_match);
-
-/* ldlm_request.c */
-EXPORT_SYMBOL(ldlm_completion_ast);
-EXPORT_SYMBOL(ldlm_blocking_ast);
-EXPORT_SYMBOL(ldlm_glimpse_ast);
-EXPORT_SYMBOL(ldlm_expired_completion_wait);
-EXPORT_SYMBOL(ldlm_prep_enqueue_req);
-EXPORT_SYMBOL(ldlm_prep_elc_req);
-EXPORT_SYMBOL(ldlm_cli_convert);
-EXPORT_SYMBOL(ldlm_cli_enqueue);
-EXPORT_SYMBOL(ldlm_cli_enqueue_fini);
-EXPORT_SYMBOL(ldlm_cli_enqueue_local);
-EXPORT_SYMBOL(ldlm_cli_cancel);
-EXPORT_SYMBOL(ldlm_cli_cancel_unused);
-EXPORT_SYMBOL(ldlm_cli_cancel_req);
-EXPORT_SYMBOL(ldlm_cli_join_lru);
-EXPORT_SYMBOL(ldlm_replay_locks);
-EXPORT_SYMBOL(ldlm_resource_foreach);
-EXPORT_SYMBOL(ldlm_namespace_foreach);
-EXPORT_SYMBOL(ldlm_namespace_foreach_res);
-EXPORT_SYMBOL(ldlm_resource_iterate);
-EXPORT_SYMBOL(ldlm_cancel_resource_local);
-EXPORT_SYMBOL(ldlm_cli_cancel_list);
-
-/* ldlm_lockd.c */
-EXPORT_SYMBOL(ldlm_server_blocking_ast);
-EXPORT_SYMBOL(ldlm_server_completion_ast);
-EXPORT_SYMBOL(ldlm_server_glimpse_ast);
-EXPORT_SYMBOL(ldlm_handle_enqueue);
-EXPORT_SYMBOL(ldlm_handle_cancel);
-EXPORT_SYMBOL(ldlm_request_cancel);
-EXPORT_SYMBOL(ldlm_handle_convert);
-EXPORT_SYMBOL(ldlm_del_waiting_lock);
-EXPORT_SYMBOL(ldlm_get_ref);
-EXPORT_SYMBOL(ldlm_put_ref);
-EXPORT_SYMBOL(ldlm_refresh_waiting_lock);
-
-/* ldlm_resource.c */
-EXPORT_SYMBOL(ldlm_namespace_new);
-EXPORT_SYMBOL(ldlm_namespace_cleanup);
-EXPORT_SYMBOL(ldlm_namespace_free);
-EXPORT_SYMBOL(ldlm_namespace_dump);
-EXPORT_SYMBOL(ldlm_dump_all_namespaces);
-EXPORT_SYMBOL(ldlm_resource_get);
-EXPORT_SYMBOL(ldlm_resource_putref);
-EXPORT_SYMBOL(ldlm_resource_unlink_lock);
-
-/* ldlm_lib.c */
-EXPORT_SYMBOL(client_import_add_conn);
-EXPORT_SYMBOL(client_import_del_conn);
-EXPORT_SYMBOL(client_obd_setup);
-EXPORT_SYMBOL(client_obd_cleanup);
-EXPORT_SYMBOL(client_connect_import);
-EXPORT_SYMBOL(client_disconnect_export);
-EXPORT_SYMBOL(target_abort_recovery);
-EXPORT_SYMBOL(target_cleanup_recovery);
-EXPORT_SYMBOL(target_handle_connect);
-EXPORT_SYMBOL(target_destroy_export);
-EXPORT_SYMBOL(target_cancel_recovery_timer);
-EXPORT_SYMBOL(target_send_reply);
-EXPORT_SYMBOL(target_queue_recovery_request);
-EXPORT_SYMBOL(target_handle_ping);
-EXPORT_SYMBOL(target_pack_pool_reply);
-EXPORT_SYMBOL(target_handle_disconnect);
-EXPORT_SYMBOL(target_queue_last_replay_reply);
-
-/* l_lock.c */
-EXPORT_SYMBOL(lock_res_and_lock);
-EXPORT_SYMBOL(unlock_res_and_lock);
-
diff --git a/lustre/ldlm/ldlm_plain.c b/lustre/ldlm/ldlm_plain.c
deleted file mode 100644
index 71778cd072c031b1d4088e327a02f7994c43616d..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_plain.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-
-#ifdef __KERNEL__
-#include <lustre_dlm.h>
-#include <obd_support.h>
-#include <lustre_lib.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include "ldlm_internal.h"
-
-static inline int
-ldlm_plain_compat_queue(struct list_head *queue, struct ldlm_lock *req,
-                        struct list_head *work_list)
-{
-        struct list_head *tmp;
-        struct ldlm_lock *lock;
-        ldlm_mode_t req_mode = req->l_req_mode;
-        int compat = 1;
-        ENTRY;
-
-        lockmode_verify(req_mode);
-
-        list_for_each(tmp, queue) {
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (req == lock)
-                        RETURN(compat);
-
-                if (lockmode_compat(lock->l_req_mode, req_mode)) {
-                        /* jump to next mode group */
-                        if (LDLM_SL_HEAD(&lock->l_sl_mode))
-                                tmp = &list_entry(lock->l_sl_mode.next, 
-                                                  struct ldlm_lock,
-                                                  l_sl_mode)->l_res_link;
-                        continue;
-                }
-
-                if (!work_list)
-                        RETURN(0);
-
-                compat = 0;
-                if (lock->l_blocking_ast)
-                        ldlm_add_ast_work_item(lock, req, work_list);
-                if (LDLM_SL_HEAD(&lock->l_sl_mode)) {
-                        /* add all members of the mode group */
-                        do {
-                                tmp = lock->l_res_link.next;
-                                lock = list_entry(tmp, struct ldlm_lock, 
-                                                  l_res_link);
-                                if (lock->l_blocking_ast)
-                                        ldlm_add_ast_work_item(
-                                                        lock, req, work_list);
-                        } while (!LDLM_SL_TAIL(&lock->l_sl_mode));
-                }
-        }
-
-        RETURN(compat);
-}
-
-/* If first_enq is 0 (ie, called from ldlm_reprocess_queue):
- *   - blocking ASTs have already been sent
- *   - must call this function with the resource lock held
- *
- * If first_enq is 1 (ie, called from ldlm_lock_enqueue):
- *   - blocking ASTs have not been sent
- *   - must call this function with the resource lock held */
-int ldlm_process_plain_lock(struct ldlm_lock *lock, int *flags, int first_enq,
-                            ldlm_error_t *err, struct list_head *work_list)
-{
-        struct ldlm_resource *res = lock->l_resource;
-        struct list_head rpc_list = CFS_LIST_HEAD_INIT(rpc_list);
-        int rc;
-        ENTRY;
-
-        check_res_locked(res);
-        LASSERT(list_empty(&res->lr_converting));
-
-        if (!first_enq) {
-                LASSERT(work_list != NULL);
-                rc = ldlm_plain_compat_queue(&res->lr_granted, lock, NULL);
-                if (!rc)
-                        RETURN(LDLM_ITER_STOP);
-                rc = ldlm_plain_compat_queue(&res->lr_waiting, lock, NULL);
-                if (!rc)
-                        RETURN(LDLM_ITER_STOP);
-
-                ldlm_resource_unlink_lock(lock);
-                ldlm_grant_lock(lock, work_list);
-                RETURN(LDLM_ITER_CONTINUE);
-        }
-
- restart:
-        rc = ldlm_plain_compat_queue(&res->lr_granted, lock, &rpc_list);
-        rc += ldlm_plain_compat_queue(&res->lr_waiting, lock, &rpc_list);
-
-        if (rc != 2) {
-                /* If either of the compat_queue()s returned 0, then we
-                 * have ASTs to send and must go onto the waiting list.
-                 *
-                 * bug 2322: we used to unlink and re-add here, which was a
-                 * terrible folly -- if we goto restart, we could get
-                 * re-ordered!  Causes deadlock, because ASTs aren't sent! */
-                if (list_empty(&lock->l_res_link))
-                        ldlm_resource_add_lock(res, &res->lr_waiting, lock);
-                unlock_res(res);
-                rc = ldlm_run_bl_ast_work(&rpc_list);
-                lock_res(res);
-                if (rc == -ERESTART)
-                        GOTO(restart, -ERESTART);
-                *flags |= LDLM_FL_BLOCK_GRANTED;
-        } else {
-                ldlm_resource_unlink_lock(lock);
-                ldlm_grant_lock(lock, NULL);
-        }
-        RETURN(0);
-}
diff --git a/lustre/ldlm/ldlm_pool.c b/lustre/ldlm/ldlm_pool.c
deleted file mode 100644
index dcae25431d4861cae71dd511cd3d056c41917ebd..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_pool.c
+++ /dev/null
@@ -1,1145 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2007 Cluster File Systems, Inc.
- *   Author: Yury Umanets <umka@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-/* Idea of this code is rather simple. Each second, for each server namespace
- * we have SLV - server lock volume which is calculated on current number of
- * granted locks, grant speed for past period, etc - that is, locking load.
- * This SLV number may be thought as a flow definition for simplicity. It is
- * sent to clients with each occasion to let them know what is current load
- * situation on the server. By default, at the beginning, SLV on server is
- * set max value which is calculated as the following: allow to one client
- * have all locks of limit ->pl_limit for 10h.
- *
- * Next, on clients, number of cached locks is not limited artificially in any
- * way as it was before. Instead, client calculates CLV, that is, client lock
- * volume for each lock and compares it with last SLV from the server. CLV is
- * calculated as the number of locks in LRU * lock live time in seconds. If
- * CLV > SLV - lock is canceled.
- *
- * Client has LVF, that is, lock volume factor which regulates how much sensitive
- * client should be about last SLV from server. The higher LVF is the more locks
- * will be canceled on client. Default value for it is 1. Setting LVF to 2 means
- * that client will cancel locks 2 times faster.
- *
- * Locks on a client will be canceled more intensively in these cases:
- * (1) if SLV is smaller, that is, load is higher on the server;
- * (2) client has a lot of locks (the more locks are held by client, the bigger
- *     chances that some of them should be canceled);
- * (3) client has old locks (taken some time ago);
- *
- * Thus, according to flow paradigm that we use for better understanding SLV,
- * CLV is the volume of particle in flow described by SLV. According to this,
- * if flow is getting thinner, more and more particles become outside of it and
- * as particles are locks, they should be canceled.
- *
- * General idea of this belongs to Vitaly Fertman (vitaly@clusterfs.com). Andreas
- * Dilger (adilger@clusterfs.com) proposed few nice ideas like using LVF and many
- * cleanups. Flow definition to allow more easy understanding of the logic belongs
- * to Nikita Danilov (nikita@clusterfs.com) as well as many cleanups and fixes.
- * And design and implementation are done by Yury Umanets (umka@clusterfs.com).
- *
- * Glossary for terms used:
- *
- * pl_limit - Number of allowed locks in pool. Applies to server and client
- * side (tunable);
- *
- * pl_granted - Number of granted locks (calculated);
- * pl_grant_rate - Number of granted locks for last T (calculated);
- * pl_cancel_rate - Number of canceled locks for last T (calculated);
- * pl_grant_speed - Grant speed (GR - CR) for last T (calculated);
- * pl_grant_plan - Planned number of granted locks for next T (calculated);
- *
- * pl_grant_step - Grant plan step, that is how ->pl_grant_plan
- * will change in next T (tunable);
- *
- * pl_server_lock_volume - Current server lock volume (calculated);
- *
- * As it may be seen from list above, we have few possible tunables which may
- * affect behavior much. They all may be modified via proc. However, they also
- * give a possibility for constructing few pre-defined behavior policies. If
- * none of predefines is suitable for a working pattern being used, new one may
- * be "constructed" via proc tunables.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-
-#ifdef __KERNEL__
-# include <lustre_dlm.h>
-#else
-# include <liblustre.h>
-# include <libcfs/kp30.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_support.h>
-#include "ldlm_internal.h"
-
-#ifdef HAVE_LRU_RESIZE_SUPPORT
-
-/* 50 ldlm locks for 1MB of RAM. */
-#define LDLM_POOL_HOST_L ((num_physpages >> (20 - PAGE_SHIFT)) * 50)
-
-/* Default step in % for grant plan. */
-#define LDLM_POOL_GSP (10)
-
-/* LDLM_POOL_GSP% of all locks is default GP. */
-#define LDLM_POOL_GP(L)   (((L) * LDLM_POOL_GSP) / 100)
-
-/* Max age for locks on clients. */
-#define LDLM_POOL_MAX_AGE (36000)
-
-#ifdef __KERNEL__
-extern cfs_proc_dir_entry_t *ldlm_ns_proc_dir;
-#endif
-
-#define avg(src, add) \
-        ((src) = ((src) + (add)) / 2)
-
-static inline __u64 dru(__u64 val, __u32 div)
-{
-        __u64 ret = val + (div - 1);
-        do_div(ret, div);
-        return ret;
-}
-
-static inline __u64 ldlm_pool_slv_max(__u32 L)
-{
-        /* Allow to have all locks for 1 client for 10 hrs.
-         * Formula is the following: limit * 10h / 1 client. */
-        __u64 lim = L *  LDLM_POOL_MAX_AGE / 1;
-        return lim;
-}
-
-static inline __u64 ldlm_pool_slv_min(__u32 L)
-{
-        return 1;
-}
-
-enum {
-        LDLM_POOL_FIRST_STAT = 0,
-        LDLM_POOL_GRANTED_STAT = LDLM_POOL_FIRST_STAT,
-        LDLM_POOL_GRANT_STAT,
-        LDLM_POOL_CANCEL_STAT,
-        LDLM_POOL_GRANT_RATE_STAT,
-        LDLM_POOL_CANCEL_RATE_STAT,
-        LDLM_POOL_GRANT_PLAN_STAT,
-        LDLM_POOL_SLV_STAT,
-        LDLM_POOL_SHRINK_REQTD_STAT,
-        LDLM_POOL_SHRINK_FREED_STAT,
-        LDLM_POOL_RECALC_STAT,
-        LDLM_POOL_TIMING_STAT,
-        LDLM_POOL_LAST_STAT
-};
-
-static inline struct ldlm_namespace *ldlm_pl2ns(struct ldlm_pool *pl)
-{
-        return container_of(pl, struct ldlm_namespace, ns_pool);
-}
-
-/* Should be called under ->pl_lock taken */
-static inline void ldlm_pool_recalc_grant_plan(struct ldlm_pool *pl)
-{
-        int granted, grant_step, limit;
-        
-        limit = ldlm_pool_get_limit(pl);
-        granted = atomic_read(&pl->pl_granted);
-
-        grant_step = ((limit - granted) * pl->pl_grant_step) / 100;
-        pl->pl_grant_plan = granted + grant_step;
-}
-
-/* Should be called under ->pl_lock taken */
-static inline void ldlm_pool_recalc_slv(struct ldlm_pool *pl)
-{
-        int grant_usage, granted, grant_plan;
-        __u64 slv, slv_factor;
-        __u32 limit;
-
-        slv = ldlm_pool_get_slv(pl);
-        grant_plan = pl->pl_grant_plan;
-        limit = ldlm_pool_get_limit(pl);
-        granted = atomic_read(&pl->pl_granted);
-
-        grant_usage = limit - (granted - grant_plan);
-        if (grant_usage <= 0)
-                grant_usage = 1;
-
-        /* Find out SLV change factor which is the ratio of grant usage 
-         * from limit. SLV changes as fast as the ratio of grant plan 
-         * consumtion. The more locks from grant plan are not consumed 
-         * by clients in last interval (idle time), the faster grows 
-         * SLV. And the opposite, the more grant plan is over-consumed
-         * (load time) the faster drops SLV. */
-        slv_factor = (grant_usage * 100) / limit;
-        if (2 * abs(granted - limit) > limit) {
-                slv_factor *= slv_factor;
-                slv_factor = dru(slv_factor, 100);
-        }
-        slv = slv * slv_factor;
-        slv = dru(slv, 100);
-
-        if (slv > ldlm_pool_slv_max(limit)) {
-                slv = ldlm_pool_slv_max(limit);
-        } else if (slv < ldlm_pool_slv_min(limit)) {
-                slv = ldlm_pool_slv_min(limit);
-        }
-
-        ldlm_pool_set_slv(pl, slv);
-}
-
-static inline void ldlm_pool_recalc_stats(struct ldlm_pool *pl)
-{
-        __u64 slv = ldlm_pool_get_slv(pl);
-        int grant_plan = pl->pl_grant_plan;
-        int granted = atomic_read(&pl->pl_granted);
-        int grant_rate = atomic_read(&pl->pl_grant_rate);
-        int cancel_rate = atomic_read(&pl->pl_cancel_rate);
-
-        lprocfs_counter_add(pl->pl_stats, LDLM_POOL_SLV_STAT, 
-                            slv);
-        lprocfs_counter_add(pl->pl_stats, LDLM_POOL_GRANTED_STAT,
-                            granted);
-        lprocfs_counter_add(pl->pl_stats, LDLM_POOL_GRANT_RATE_STAT,
-                            grant_rate);
-        lprocfs_counter_add(pl->pl_stats, LDLM_POOL_GRANT_PLAN_STAT,
-                            grant_plan);
-        lprocfs_counter_add(pl->pl_stats, LDLM_POOL_CANCEL_RATE_STAT,
-                            cancel_rate);
-}
-
-static int ldlm_srv_pool_recalc(struct ldlm_pool *pl)
-{
-        time_t recalc_interval_sec;
-        ENTRY;
-
-        spin_lock(&pl->pl_lock);
-        recalc_interval_sec = cfs_time_current_sec() - pl->pl_recalc_time;
-        if (recalc_interval_sec > 0) {
-                /* Update statistics */
-                ldlm_pool_recalc_stats(pl);
-
-                /* Recalc SLV after last period. This should be done
-                 * _before_ recalculating new grant plan. */
-                ldlm_pool_recalc_slv(pl);
-
-                /* Update grant_plan for new period. */
-                ldlm_pool_recalc_grant_plan(pl);
-
-                /* Zero out all rates and speed for the last period. */
-                atomic_set(&pl->pl_grant_rate, 0);
-                atomic_set(&pl->pl_cancel_rate, 0);
-                atomic_set(&pl->pl_grant_speed, 0);
-                pl->pl_recalc_time = cfs_time_current_sec();
-                lprocfs_counter_add(pl->pl_stats, LDLM_POOL_TIMING_STAT, 
-                                    recalc_interval_sec);
-        }
-        spin_unlock(&pl->pl_lock);
-        RETURN(0);
-}
-
-/* Our goal here is to decrease SLV the way to make a client hold
- * @nr locks smaller in next 10h. */
-static int ldlm_srv_pool_shrink(struct ldlm_pool *pl,
-                                int nr, unsigned int gfp_mask)
-{
-        __u32 limit;
-        ENTRY;
-
-        /* VM is asking how many entries may be potentially freed. */
-        if (nr == 0)
-                RETURN(atomic_read(&pl->pl_granted));
-
-        /* Client already canceled locks but server is already in shrinker
-         * and can't cancel anything. Let's catch this race. */
-        if (atomic_read(&pl->pl_granted) == 0)
-                RETURN(0);
-
-        spin_lock(&pl->pl_lock);
-
-        /* We want shrinker to possibly cause cancelation of @nr locks from
-         * clients or grant approximately @nr locks smaller next intervals.
-         *
-         * This is why we decresed SLV by @nr. This effect will only be as
-         * long as one re-calc interval (1s these days) and this should be
-         * enough to pass this decreased SLV to all clients. On next recalc
-         * interval pool will either increase SLV if locks load is not high
-         * or will keep on same level or even decrease again, thus, shrinker
-         * decreased SLV will affect next recalc intervals and this way will
-         * make locking load lower. */
-        if (nr < ldlm_pool_get_slv(pl)) {
-                ldlm_pool_set_slv(pl, ldlm_pool_get_slv(pl) - nr);
-        } else {
-                limit = ldlm_pool_get_limit(pl);
-                ldlm_pool_set_slv(pl, ldlm_pool_slv_min(limit));
-        }
-        spin_unlock(&pl->pl_lock);
-
-        /* We did not really free any memory here so far, it only will be
-         * freed later may be, so that we return 0 to not confuse VM. */
-        RETURN(0);
-}
-
-static int ldlm_srv_pool_setup(struct ldlm_pool *pl, int limit)
-{
-        ENTRY;
-        ldlm_pool_set_limit(pl, limit);
-        RETURN(0);
-}
-
-static int ldlm_cli_pool_recalc(struct ldlm_pool *pl)
-{
-        time_t recalc_interval_sec;
-        ENTRY;
-
-        spin_lock(&pl->pl_lock);
-
-        recalc_interval_sec = cfs_time_current_sec() - pl->pl_recalc_time;
-        if (recalc_interval_sec > 0) {
-                /* Update statistics only every T */
-                ldlm_pool_recalc_stats(pl);
-
-                /* Zero out grant/cancel rates and speed for last period. */
-                atomic_set(&pl->pl_grant_rate, 0);
-                atomic_set(&pl->pl_cancel_rate, 0);
-                atomic_set(&pl->pl_grant_speed, 0);
-                pl->pl_recalc_time = cfs_time_current_sec();
-                lprocfs_counter_add(pl->pl_stats, LDLM_POOL_TIMING_STAT, 
-                                    recalc_interval_sec);
-        }
-        spin_unlock(&pl->pl_lock);
-
-        /* Do not cancel locks in case lru resize is disabled for this ns */
-        if (!ns_connect_lru_resize(ldlm_pl2ns(pl)))
-                RETURN(0);
-
-        /* In the time of canceling locks on client we do not need to maintain
-         * sharp timing, we only want to cancel locks asap according to new SLV.
-         * This may be called when SLV has changed much, this is why we do not
-         * take into account pl->pl_recalc_time here. */
-        RETURN(ldlm_cancel_lru(ldlm_pl2ns(pl), 0, LDLM_ASYNC, 
-                               LDLM_CANCEL_LRUR));
-}
-
-static int ldlm_cli_pool_shrink(struct ldlm_pool *pl,
-                                int nr, unsigned int gfp_mask)
-{
-        ENTRY;
-        
-        /* Do not cancel locks in case lru resize is disabled for this ns */
-        if (!ns_connect_lru_resize(ldlm_pl2ns(pl)))
-                RETURN(0);
-
-        /* Find out how many locks may be released according to shrink 
-         * policy. */
-        if (nr == 0)
-                RETURN(ldlm_cancel_lru_estimate(ldlm_pl2ns(pl), 0, 0, 
-                                                LDLM_CANCEL_SHRINK));
-
-        /* Cancel @nr locks accoding to shrink policy */
-        RETURN(ldlm_cancel_lru(ldlm_pl2ns(pl), nr, LDLM_SYNC, 
-                               LDLM_CANCEL_SHRINK));
-}
-
-struct ldlm_pool_ops ldlm_srv_pool_ops = {
-        .po_recalc = ldlm_srv_pool_recalc,
-        .po_shrink = ldlm_srv_pool_shrink,
-        .po_setup  = ldlm_srv_pool_setup
-};
-
-struct ldlm_pool_ops ldlm_cli_pool_ops = {
-        .po_recalc = ldlm_cli_pool_recalc,
-        .po_shrink = ldlm_cli_pool_shrink
-};
-
-int ldlm_pool_recalc(struct ldlm_pool *pl)
-{
-        int count;
-
-        if (pl->pl_ops->po_recalc != NULL) {
-                count = pl->pl_ops->po_recalc(pl);
-                lprocfs_counter_add(pl->pl_stats, LDLM_POOL_RECALC_STAT, 
-                                    count);
-                return count;
-        }
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pool_recalc);
-
-int ldlm_pool_shrink(struct ldlm_pool *pl, int nr,
-                     unsigned int gfp_mask)
-{
-        int cancel = 0;
-        
-        if (pl->pl_ops->po_shrink != NULL) {
-                cancel = pl->pl_ops->po_shrink(pl, nr, gfp_mask);
-                if (nr > 0) {
-                        lprocfs_counter_add(pl->pl_stats, 
-                                            LDLM_POOL_SHRINK_REQTD_STAT,
-                                            nr);
-                        lprocfs_counter_add(pl->pl_stats, 
-                                            LDLM_POOL_SHRINK_FREED_STAT,
-                                            cancel);
-                        CDEBUG(D_DLMTRACE, "%s: request to shrink %d locks, "
-                               "shrunk %d\n", pl->pl_name, nr, cancel);
-                }
-        }
-        return cancel;
-}
-EXPORT_SYMBOL(ldlm_pool_shrink);
-
-/* The purpose of this function is to re-setup limit and maximal allowed
- * slv according to the passed limit. */
-int ldlm_pool_setup(struct ldlm_pool *pl, int limit)
-{
-        ENTRY;
-        if (pl->pl_ops->po_setup != NULL)
-                RETURN(pl->pl_ops->po_setup(pl, limit));
-        RETURN(0);
-}
-EXPORT_SYMBOL(ldlm_pool_setup);
-
-#ifdef __KERNEL__
-static int lprocfs_rd_pool_state(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data)
-{
-        int granted, grant_rate, cancel_rate, grant_step;
-        int nr = 0, grant_speed, grant_plan;
-        struct ldlm_pool *pl = data;
-        __u32 limit;
-        __u64 slv;
-
-        spin_lock(&pl->pl_lock);
-        slv = ldlm_pool_get_slv(pl);
-        limit = ldlm_pool_get_limit(pl);
-        grant_plan = pl->pl_grant_plan;
-        grant_step = pl->pl_grant_step;
-        granted = atomic_read(&pl->pl_granted);
-        grant_rate = atomic_read(&pl->pl_grant_rate);
-        grant_speed = atomic_read(&pl->pl_grant_speed);
-        cancel_rate = atomic_read(&pl->pl_cancel_rate);
-        spin_unlock(&pl->pl_lock);
-
-        nr += snprintf(page + nr, count - nr, "LDLM pool state (%s):\n",
-                       pl->pl_name);
-        nr += snprintf(page + nr, count - nr, "  SLV: "LPU64"\n", slv);
-
-        nr += snprintf(page + nr, count - nr, "  LVF: %d\n",
-                       atomic_read(&pl->pl_lock_volume_factor));
-
-        nr += snprintf(page + nr, count - nr, "  GSP: %d%%\n",
-                       grant_step);
-        nr += snprintf(page + nr, count - nr, "  GP:  %d\n",
-                       grant_plan);
-        nr += snprintf(page + nr, count - nr, "  GR:  %d\n",
-                       grant_rate);
-        nr += snprintf(page + nr, count - nr, "  CR:  %d\n",
-                       cancel_rate);
-        nr += snprintf(page + nr, count - nr, "  GS:  %d\n",
-                       grant_speed);
-        nr += snprintf(page + nr, count - nr, "  G:   %d\n",
-                       granted);
-        nr += snprintf(page + nr, count - nr, "  L:   %d\n",
-                       limit);
-        return nr;
-}
-
-LDLM_POOL_PROC_READER(grant_plan, int);
-LDLM_POOL_PROC_READER(grant_step, int);
-LDLM_POOL_PROC_WRITER(grant_step, int);
-
-static int ldlm_pool_proc_init(struct ldlm_pool *pl)
-{
-        struct ldlm_namespace *ns = ldlm_pl2ns(pl);
-        struct proc_dir_entry *parent_ns_proc;
-        struct lprocfs_vars pool_vars[2];
-        char *var_name = NULL;
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(var_name, MAX_STRING_SIZE + 1);
-        if (!var_name)
-                RETURN(-ENOMEM);
-
-        parent_ns_proc = lprocfs_srch(ldlm_ns_proc_dir, ns->ns_name);
-        if (parent_ns_proc == NULL) {
-                CERROR("%s: proc entry is not initialized\n",
-                       ns->ns_name);
-                GOTO(out_free_name, rc = -EINVAL);
-        }
-        pl->pl_proc_dir = lprocfs_register("pool", parent_ns_proc,
-                                           NULL, NULL);
-        if (IS_ERR(pl->pl_proc_dir)) {
-                CERROR("LProcFS failed in ldlm-pool-init\n");
-                rc = PTR_ERR(pl->pl_proc_dir);
-                GOTO(out_free_name, rc);
-        }
-
-        var_name[MAX_STRING_SIZE] = '\0';
-        memset(pool_vars, 0, sizeof(pool_vars));
-        pool_vars[0].name = var_name;
-
-        snprintf(var_name, MAX_STRING_SIZE, "server_lock_volume");
-        pool_vars[0].data = &pl->pl_server_lock_volume;
-        pool_vars[0].read_fptr = lprocfs_rd_u64;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "limit");
-        pool_vars[0].data = &pl->pl_limit;
-        pool_vars[0].read_fptr = lprocfs_rd_atomic;
-        pool_vars[0].write_fptr = lprocfs_wr_atomic;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "granted");
-        pool_vars[0].data = &pl->pl_granted;
-        pool_vars[0].read_fptr = lprocfs_rd_atomic;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "grant_speed");
-        pool_vars[0].data = &pl->pl_grant_speed;
-        pool_vars[0].read_fptr = lprocfs_rd_atomic;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "cancel_rate");
-        pool_vars[0].data = &pl->pl_cancel_rate;
-        pool_vars[0].read_fptr = lprocfs_rd_atomic;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "grant_rate");
-        pool_vars[0].data = &pl->pl_grant_rate;
-        pool_vars[0].read_fptr = lprocfs_rd_atomic;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "grant_plan");
-        pool_vars[0].data = pl;
-        pool_vars[0].read_fptr = lprocfs_rd_grant_plan;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "grant_step");
-        pool_vars[0].data = pl;
-        pool_vars[0].read_fptr = lprocfs_rd_grant_step;
-        if (ns_is_server(ns))
-                pool_vars[0].write_fptr = lprocfs_wr_grant_step;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "lock_volume_factor");
-        pool_vars[0].data = &pl->pl_lock_volume_factor;
-        pool_vars[0].read_fptr = lprocfs_rd_atomic;
-        pool_vars[0].write_fptr = lprocfs_wr_atomic;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        snprintf(var_name, MAX_STRING_SIZE, "state");
-        pool_vars[0].data = pl;
-        pool_vars[0].read_fptr = lprocfs_rd_pool_state;
-        lprocfs_add_vars(pl->pl_proc_dir, pool_vars, 0);
-
-        pl->pl_stats = lprocfs_alloc_stats(LDLM_POOL_LAST_STAT -
-                                           LDLM_POOL_FIRST_STAT, 0);
-        if (!pl->pl_stats)
-                GOTO(out_free_name, rc = -ENOMEM);
-
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANTED_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "granted", "locks");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANT_STAT, 
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "grant", "locks");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_CANCEL_STAT, 
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "cancel", "locks");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANT_RATE_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "grant_rate", "locks/s");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_CANCEL_RATE_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "cancel_rate", "locks/s");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_GRANT_PLAN_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "grant_plan", "locks/s");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_SLV_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "slv", "slv");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_SHRINK_REQTD_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "shrink_request", "locks");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_SHRINK_FREED_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "shrink_freed", "locks");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_RECALC_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "recalc_freed", "locks");
-        lprocfs_counter_init(pl->pl_stats, LDLM_POOL_TIMING_STAT,
-                             LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
-                             "recalc_timing", "sec");
-        lprocfs_register_stats(pl->pl_proc_dir, "stats", pl->pl_stats);
-
-        EXIT;
-out_free_name:
-        OBD_FREE(var_name, MAX_STRING_SIZE + 1);
-        return rc;
-}
-
-static void ldlm_pool_proc_fini(struct ldlm_pool *pl)
-{
-        if (pl->pl_stats != NULL) {
-                lprocfs_free_stats(&pl->pl_stats);
-                pl->pl_stats = NULL;
-        }
-        if (pl->pl_proc_dir != NULL) {
-                lprocfs_remove(&pl->pl_proc_dir);
-                pl->pl_proc_dir = NULL;
-        }
-}
-#else /* !__KERNEL__*/
-#define ldlm_pool_proc_init(pl) (0)
-#define ldlm_pool_proc_fini(pl) while (0) {}
-#endif
-
-int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns,
-                   int idx, ldlm_side_t client)
-{
-        int rc;
-        ENTRY;
-
-        spin_lock_init(&pl->pl_lock);
-        atomic_set(&pl->pl_granted, 0);
-        pl->pl_recalc_time = cfs_time_current_sec();
-        atomic_set(&pl->pl_lock_volume_factor, 1);
-
-        atomic_set(&pl->pl_grant_rate, 0);
-        atomic_set(&pl->pl_cancel_rate, 0);
-        atomic_set(&pl->pl_grant_speed, 0);
-        pl->pl_grant_step = LDLM_POOL_GSP;
-        pl->pl_grant_plan = LDLM_POOL_GP(LDLM_POOL_HOST_L);
-
-        snprintf(pl->pl_name, sizeof(pl->pl_name), "ldlm-pool-%s-%d",
-                 ns->ns_name, idx);
-
-        if (client == LDLM_NAMESPACE_SERVER) {
-                pl->pl_ops = &ldlm_srv_pool_ops;
-                ldlm_pool_set_limit(pl, LDLM_POOL_HOST_L);
-                ldlm_pool_set_slv(pl, ldlm_pool_slv_max(LDLM_POOL_HOST_L));
-        } else {
-                ldlm_pool_set_slv(pl, 1);
-                ldlm_pool_set_limit(pl, 1);
-                pl->pl_ops = &ldlm_cli_pool_ops;
-        }
-
-        rc = ldlm_pool_proc_init(pl);
-        if (rc)
-                RETURN(rc);
-
-        CDEBUG(D_DLMTRACE, "Lock pool %s is initialized\n", pl->pl_name);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(ldlm_pool_init);
-
-void ldlm_pool_fini(struct ldlm_pool *pl)
-{
-        ENTRY;
-        ldlm_pool_proc_fini(pl);
-        pl->pl_ops = NULL;
-        EXIT;
-}
-EXPORT_SYMBOL(ldlm_pool_fini);
-
-void ldlm_pool_add(struct ldlm_pool *pl, struct ldlm_lock *lock)
-{
-        /* FLOCK locks are special in a sense that they are almost never
-         * cancelled, instead special kind of lock is used to drop them.
-         * also there is no LRU for flock locks, so no point in tracking
-         * them anyway */
-        if (lock->l_resource->lr_type == LDLM_FLOCK)
-                return;
-
-        ENTRY;
-                
-        atomic_inc(&pl->pl_granted);
-        atomic_inc(&pl->pl_grant_rate);
-        atomic_inc(&pl->pl_grant_speed);
-
-        lprocfs_counter_incr(pl->pl_stats, LDLM_POOL_GRANT_STAT);
- 
-        /* Do not do pool recalc for client side as all locks which
-         * potentially may be canceled has already been packed into 
-         * enqueue/cancel rpc. Also we do not want to run out of stack
-         * with too long call paths. */
-        if (ns_is_server(ldlm_pl2ns(pl)))
-                ldlm_pool_recalc(pl);
-        EXIT;
-}
-EXPORT_SYMBOL(ldlm_pool_add);
-
-void ldlm_pool_del(struct ldlm_pool *pl, struct ldlm_lock *lock)
-{
-        if (lock->l_resource->lr_type == LDLM_FLOCK)
-                return;
-        ENTRY;
-        LASSERT(atomic_read(&pl->pl_granted) > 0);
-        atomic_dec(&pl->pl_granted);
-        atomic_inc(&pl->pl_cancel_rate);
-        atomic_dec(&pl->pl_grant_speed);
-        
-        lprocfs_counter_incr(pl->pl_stats, LDLM_POOL_CANCEL_STAT);
-
-        if (ns_is_server(ldlm_pl2ns(pl)))
-                ldlm_pool_recalc(pl);
-        EXIT;
-}
-EXPORT_SYMBOL(ldlm_pool_del);
-
-/* ->pl_lock should be taken. */
-__u64 ldlm_pool_get_slv(struct ldlm_pool *pl)
-{
-        return pl->pl_server_lock_volume;
-}
-EXPORT_SYMBOL(ldlm_pool_get_slv);
-
-/* ->pl_lock should be taken. */
-void ldlm_pool_set_slv(struct ldlm_pool *pl, __u64 slv)
-{
-        pl->pl_server_lock_volume = slv;
-}
-EXPORT_SYMBOL(ldlm_pool_set_slv);
-
-__u32 ldlm_pool_get_limit(struct ldlm_pool *pl)
-{
-        return atomic_read(&pl->pl_limit);
-}
-EXPORT_SYMBOL(ldlm_pool_get_limit);
-
-void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit)
-{
-        atomic_set(&pl->pl_limit, limit);
-}
-EXPORT_SYMBOL(ldlm_pool_set_limit);
-
-/* Server side is only enabled for kernel space for now. */
-#ifdef __KERNEL__
-static int ldlm_pool_granted(struct ldlm_pool *pl)
-{
-        return atomic_read(&pl->pl_granted);
-}
-
-static struct ptlrpc_thread *ldlm_pools_thread;
-static struct shrinker *ldlm_pools_srv_shrinker;
-static struct shrinker *ldlm_pools_cli_shrinker;
-static struct completion ldlm_pools_comp;
-
-void ldlm_pools_wakeup(void)
-{
-        ENTRY;
-        if (ldlm_pools_thread == NULL)
-                return;
-        ldlm_pools_thread->t_flags |= SVC_EVENT;
-        cfs_waitq_signal(&ldlm_pools_thread->t_ctl_waitq);
-        EXIT;
-}
-EXPORT_SYMBOL(ldlm_pools_wakeup);
-
-/* Cancel @nr locks from all namespaces (if possible). Returns number of
- * cached locks after shrink is finished. All namespaces are asked to
- * cancel approximately equal amount of locks. */
-static int ldlm_pools_shrink(ldlm_side_t client, int nr, 
-                             unsigned int gfp_mask)
-{
-        int total = 0, cached = 0, nr_ns;
-        struct ldlm_namespace *ns;
-
-        if (nr != 0 && !(gfp_mask & __GFP_FS))
-                return -1;
-
-        CDEBUG(D_DLMTRACE, "request to shrink %d %s locks from all pools\n",
-               nr, client == LDLM_NAMESPACE_CLIENT ? "client" : "server");
-
-        /* Find out how many resources we may release. */
-        for (nr_ns = atomic_read(ldlm_namespace_nr(client)); 
-             nr_ns > 0; nr_ns--) 
-        {
-                mutex_down(ldlm_namespace_lock(client));
-                if (list_empty(ldlm_namespace_list(client))) {
-                        mutex_up(ldlm_namespace_lock(client));
-                        return 0;
-                }
-                ns = ldlm_namespace_first(client);
-                ldlm_namespace_get(ns);
-                ldlm_namespace_move(ns, client);
-                mutex_up(ldlm_namespace_lock(client));
-                total += ldlm_pool_shrink(&ns->ns_pool, 0, gfp_mask);
-                ldlm_namespace_put(ns, 1);
-        }
- 
-        if (nr == 0 || total == 0)
-                return total;
-
-        /* Shrink at least ldlm_namespace_nr(client) namespaces. */
-        for (nr_ns = atomic_read(ldlm_namespace_nr(client)); 
-             nr_ns > 0; nr_ns--) 
-        {
-                int cancel, nr_locks;
-
-                /* Do not call shrink under ldlm_namespace_lock(client) */
-                mutex_down(ldlm_namespace_lock(client));
-                if (list_empty(ldlm_namespace_list(client))) {
-                        mutex_up(ldlm_namespace_lock(client));
-                        /* If list is empty, we can't return any @cached > 0,
-                         * that probably would cause needless shrinker
-                         * call. */
-                        cached = 0;
-                        break;
-                }
-                ns = ldlm_namespace_first(client);
-                ldlm_namespace_get(ns);
-                ldlm_namespace_move(ns, client);
-                mutex_up(ldlm_namespace_lock(client));
-                
-                nr_locks = ldlm_pool_granted(&ns->ns_pool);
-                cancel = 1 + nr_locks * nr / total;
-                ldlm_pool_shrink(&ns->ns_pool, cancel, gfp_mask);
-                cached += ldlm_pool_granted(&ns->ns_pool);
-                ldlm_namespace_put(ns, 1);
-        }
-        return cached;
-}
-
-static int ldlm_pools_srv_shrink(int nr, unsigned int gfp_mask)
-{
-        return ldlm_pools_shrink(LDLM_NAMESPACE_SERVER, nr, gfp_mask);
-}
-
-static int ldlm_pools_cli_shrink(int nr, unsigned int gfp_mask)
-{
-        return ldlm_pools_shrink(LDLM_NAMESPACE_CLIENT, nr, gfp_mask);
-}
-
-void ldlm_pools_recalc(ldlm_side_t client)
-{
-        __u32 nr_l = 0, nr_p = 0, l;
-        struct ldlm_namespace *ns;
-        int nr, equal = 0;
-
-        /* No need to setup pool limit for client pools. */
-        if (client == LDLM_NAMESPACE_SERVER) {
-                /* Check all modest namespaces first. */
-                mutex_down(ldlm_namespace_lock(client));
-                list_for_each_entry(ns, ldlm_namespace_list(client), 
-                                    ns_list_chain) 
-                {
-                        if (ns->ns_appetite != LDLM_NAMESPACE_MODEST)
-                                continue;
-
-                        l = ldlm_pool_granted(&ns->ns_pool);
-                        if (l == 0)
-                                l = 1;
-
-                        /* Set the modest pools limit equal to their avg granted
-                         * locks + 5%. */
-                        l += dru(l * LDLM_POOLS_MODEST_MARGIN, 100);
-                        ldlm_pool_setup(&ns->ns_pool, l);
-                        nr_l += l;
-                        nr_p++;
-                }
-
-                /* Make sure that modest namespaces did not eat more that 2/3 
-                 * of limit */
-                if (nr_l >= 2 * (LDLM_POOL_HOST_L / 3)) {
-                        CWARN("\"Modest\" pools eat out 2/3 of server locks "
-                              "limit (%d of %lu). This means that you have too "
-                              "many clients for this amount of server RAM. "
-                              "Upgrade server!\n", nr_l, LDLM_POOL_HOST_L);
-                        equal = 1;
-                }
-
-                /* The rest is given to greedy namespaces. */
-                list_for_each_entry(ns, ldlm_namespace_list(client), 
-                                    ns_list_chain) 
-                {
-                        if (!equal && ns->ns_appetite != LDLM_NAMESPACE_GREEDY)
-                                continue;
-
-                        if (equal) {
-                                /* In the case 2/3 locks are eaten out by
-                                 * modest pools, we re-setup equal limit
-                                 * for _all_ pools. */
-                                l = LDLM_POOL_HOST_L /
-                                        atomic_read(ldlm_namespace_nr(client));
-                        } else {
-                                /* All the rest of greedy pools will have
-                                 * all locks in equal parts.*/
-                                l = (LDLM_POOL_HOST_L - nr_l) /
-                                        (atomic_read(ldlm_namespace_nr(client)) -
-                                         nr_p);
-                        }
-                        ldlm_pool_setup(&ns->ns_pool, l);
-                }
-                mutex_up(ldlm_namespace_lock(client));
-        }
-
-        /* Recalc at least ldlm_namespace_nr(client) namespaces. */
-        for (nr = atomic_read(ldlm_namespace_nr(client)); nr > 0; nr--) {
-                /* Lock the list, get first @ns in the list, getref, move it
-                 * to the tail, unlock and call pool recalc. This way we avoid
-                 * calling recalc under @ns lock what is really good as we get
-                 * rid of potential deadlock on client nodes when canceling
-                 * locks synchronously. */
-                mutex_down(ldlm_namespace_lock(client));
-                if (list_empty(ldlm_namespace_list(client))) {
-                        mutex_up(ldlm_namespace_lock(client));
-                        break;
-                }
-                ns = ldlm_namespace_first(client);
-                ldlm_namespace_get(ns);
-                ldlm_namespace_move(ns, client);
-                mutex_up(ldlm_namespace_lock(client));
-
-                /* After setup is done - recalc the pool. */
-                ldlm_pool_recalc(&ns->ns_pool);
-                ldlm_namespace_put(ns, 1);
-        }
-}
-EXPORT_SYMBOL(ldlm_pools_recalc);
-
-static int ldlm_pools_thread_main(void *arg)
-{
-        struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
-        char *t_name = "ldlm_poold";
-        ENTRY;
-
-        cfs_daemonize(t_name);
-        thread->t_flags = SVC_RUNNING;
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-
-        CDEBUG(D_DLMTRACE, "%s: pool thread starting, process %d\n",
-               t_name, cfs_curproc_pid());
-
-        while (1) {
-                struct l_wait_info lwi;
-
-                /* Recal all pools on this tick. */
-                ldlm_pools_recalc(LDLM_NAMESPACE_SERVER);
-                ldlm_pools_recalc(LDLM_NAMESPACE_CLIENT);
-                
-                /* Wait until the next check time, or until we're
-                 * stopped. */
-                lwi = LWI_TIMEOUT(cfs_time_seconds(LDLM_POOLS_THREAD_PERIOD),
-                                  NULL, NULL);
-                l_wait_event(thread->t_ctl_waitq, (thread->t_flags &
-                                                   (SVC_STOPPING|SVC_EVENT)),
-                             &lwi);
-
-                if (thread->t_flags & SVC_STOPPING) {
-                        thread->t_flags &= ~SVC_STOPPING;
-                        break;
-                } else if (thread->t_flags & SVC_EVENT) {
-                        thread->t_flags &= ~SVC_EVENT;
-                }
-        }
-
-        thread->t_flags = SVC_STOPPED;
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-
-        CDEBUG(D_DLMTRACE, "%s: pool thread exiting, process %d\n",
-               t_name, cfs_curproc_pid());
-
-        complete_and_exit(&ldlm_pools_comp, 0);
-}
-
-static int ldlm_pools_thread_start(void)
-{
-        struct l_wait_info lwi = { 0 };
-        int rc;
-        ENTRY;
-
-        if (ldlm_pools_thread != NULL)
-                RETURN(-EALREADY);
-
-        OBD_ALLOC_PTR(ldlm_pools_thread);
-        if (ldlm_pools_thread == NULL)
-                RETURN(-ENOMEM);
-
-        init_completion(&ldlm_pools_comp);
-        cfs_waitq_init(&ldlm_pools_thread->t_ctl_waitq);
-
-        /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
-         * just drop the VM and FILES in ptlrpc_daemonize() right away. */
-        rc = cfs_kernel_thread(ldlm_pools_thread_main, ldlm_pools_thread,
-                               CLONE_VM | CLONE_FILES);
-        if (rc < 0) {
-                CERROR("Can't start pool thread, error %d\n",
-                       rc);
-                OBD_FREE(ldlm_pools_thread, sizeof(*ldlm_pools_thread));
-                ldlm_pools_thread = NULL;
-                RETURN(rc);
-        }
-        l_wait_event(ldlm_pools_thread->t_ctl_waitq,
-                     (ldlm_pools_thread->t_flags & SVC_RUNNING), &lwi);
-        RETURN(0);
-}
-
-static void ldlm_pools_thread_stop(void)
-{
-        ENTRY;
-
-        if (ldlm_pools_thread == NULL) {
-                EXIT;
-                return;
-        }
-
-        ldlm_pools_thread->t_flags = SVC_STOPPING;
-        cfs_waitq_signal(&ldlm_pools_thread->t_ctl_waitq);
-
-        /* Make sure that pools thread is finished before freeing @thread.
-         * This fixes possible race and oops due to accessing freed memory
-         * in pools thread. */
-        wait_for_completion(&ldlm_pools_comp);
-        OBD_FREE_PTR(ldlm_pools_thread);
-        ldlm_pools_thread = NULL;
-        EXIT;
-}
-
-int ldlm_pools_init(void)
-{
-        int rc;
-        ENTRY;
-
-        rc = ldlm_pools_thread_start();
-        if (rc == 0) {
-                ldlm_pools_srv_shrinker = set_shrinker(DEFAULT_SEEKS,
-                                                       ldlm_pools_srv_shrink);
-                ldlm_pools_cli_shrinker = set_shrinker(DEFAULT_SEEKS,
-                                                       ldlm_pools_cli_shrink);
-        }
-        RETURN(rc);
-}
-EXPORT_SYMBOL(ldlm_pools_init);
-
-void ldlm_pools_fini(void)
-{
-        if (ldlm_pools_srv_shrinker != NULL) {
-                remove_shrinker(ldlm_pools_srv_shrinker);
-                ldlm_pools_srv_shrinker = NULL;
-        }
-        if (ldlm_pools_cli_shrinker != NULL) {
-                remove_shrinker(ldlm_pools_cli_shrinker);
-                ldlm_pools_cli_shrinker = NULL;
-        }
-        ldlm_pools_thread_stop();
-}
-EXPORT_SYMBOL(ldlm_pools_fini);
-#endif /* __KERNEL__ */
-
-#else /* !HAVE_LRU_RESIZE_SUPPORT */
-int ldlm_pool_setup(struct ldlm_pool *pl, int limit)
-{
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pool_setup);
-
-int ldlm_pool_recalc(struct ldlm_pool *pl)
-{
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pool_recalc);
-
-int ldlm_pool_shrink(struct ldlm_pool *pl,
-                     int nr, unsigned int gfp_mask)
-{
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pool_shrink);
-
-int ldlm_pool_init(struct ldlm_pool *pl, struct ldlm_namespace *ns,
-                   int idx, ldlm_side_t client)
-{
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pool_init);
-
-void ldlm_pool_fini(struct ldlm_pool *pl)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pool_fini);
-
-void ldlm_pool_add(struct ldlm_pool *pl, struct ldlm_lock *lock)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pool_add);
-
-void ldlm_pool_del(struct ldlm_pool *pl, struct ldlm_lock *lock)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pool_del);
-
-__u64 ldlm_pool_get_slv(struct ldlm_pool *pl)
-{
-        return 1;
-}
-EXPORT_SYMBOL(ldlm_pool_get_slv);
-
-void ldlm_pool_set_slv(struct ldlm_pool *pl, __u64 slv)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pool_set_slv);
-
-__u32 ldlm_pool_get_limit(struct ldlm_pool *pl)
-{
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pool_get_limit);
-
-void ldlm_pool_set_limit(struct ldlm_pool *pl, __u32 limit)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pool_set_limit);
-
-int ldlm_pools_init(void)
-{
-        return 0;
-}
-EXPORT_SYMBOL(ldlm_pools_init);
-
-void ldlm_pools_fini(void)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pools_fini);
-
-void ldlm_pools_wakeup(void)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pools_wakeup);
-
-void ldlm_pools_recalc(ldlm_side_t client)
-{
-        return;
-}
-EXPORT_SYMBOL(ldlm_pools_recalc);
-#endif /* HAVE_LRU_RESIZE_SUPPORT */
diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c
deleted file mode 100644
index aa3d1ae7b2da664e712ce672f94d87fde6774ce4..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_request.c
+++ /dev/null
@@ -1,2002 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-#ifndef __KERNEL__
-#include <signal.h>
-#include <liblustre.h>
-#endif
-
-#include <lustre_dlm.h>
-#include <obd_class.h>
-#include <obd.h>
-
-#include "ldlm_internal.h"
-
-int ldlm_enqueue_min = OBD_TIMEOUT_DEFAULT;
-CFS_MODULE_PARM(ldlm_enqueue_min, "i", int, 0644,
-                "lock enqueue timeout minimum");
-
-static void interrupted_completion_wait(void *data)
-{
-}
-
-struct lock_wait_data {
-        struct ldlm_lock *lwd_lock;
-        __u32             lwd_conn_cnt;
-};
-
-struct ldlm_async_args {
-        struct lustre_handle lock_handle;
-};
-
-int ldlm_expired_completion_wait(void *data)
-{
-        struct lock_wait_data *lwd = data;
-        struct ldlm_lock *lock = lwd->lwd_lock;
-        struct obd_import *imp;
-        struct obd_device *obd;
-
-        ENTRY;
-        if (lock->l_conn_export == NULL) {
-                static cfs_time_t next_dump = 0, last_dump = 0;
-
-                LDLM_ERROR(lock, "lock timed out (enqueued at %lu, %lus ago); "
-                           "not entering recovery in server code, just going "
-                           "back to sleep", lock->l_enqueued_time.tv_sec,
-                           cfs_time_current_sec() -
-                           lock->l_enqueued_time.tv_sec);
-                if (cfs_time_after(cfs_time_current(), next_dump)) {
-                        last_dump = next_dump;
-                        next_dump = cfs_time_shift(300);
-                        ldlm_namespace_dump(D_DLMTRACE,
-                                            lock->l_resource->lr_namespace);
-                        if (last_dump == 0)
-                                libcfs_debug_dumplog();
-                }
-                RETURN(0);
-        }
-
-        obd = lock->l_conn_export->exp_obd;
-        imp = obd->u.cli.cl_import;
-        ptlrpc_fail_import(imp, lwd->lwd_conn_cnt);
-        LDLM_ERROR(lock, "lock timed out (enqueued at %lu, %lus ago), entering "
-                   "recovery for %s@%s", lock->l_enqueued_time.tv_sec,
-                   CURRENT_SECONDS - lock->l_enqueued_time.tv_sec,
-                   obd2cli_tgt(obd), imp->imp_connection->c_remote_uuid.uuid);
-
-        RETURN(0);
-}
-
-/* We use the same basis for both server side and client side functions
-   from a single node. */
-int ldlm_get_enq_timeout(struct ldlm_lock *lock)
-{
-        int timeout = at_get(&lock->l_resource->lr_namespace->ns_at_estimate);
-        if (AT_OFF)
-                return obd_timeout / 2;
-        /* Since these are non-updating timeouts, we should be conservative.
-           It would be nice to have some kind of "early reply" mechanism for
-           lock callbacks too... */
-        timeout = timeout + (timeout >> 1); /* 150% */
-        return max(timeout, ldlm_enqueue_min);
-}
-
-static int is_granted_or_cancelled(struct ldlm_lock *lock)
-{
-        int ret = 0;
-
-        lock_res_and_lock(lock);
-        if (((lock->l_req_mode == lock->l_granted_mode) &&
-             !(lock->l_flags & LDLM_FL_CP_REQD)) ||
-            (lock->l_flags & LDLM_FL_FAILED))
-                ret = 1;
-        unlock_res_and_lock(lock);
-
-        return ret;
-}
-
-int ldlm_completion_ast(struct ldlm_lock *lock, int flags, void *data)
-{
-        /* XXX ALLOCATE - 160 bytes */
-        struct lock_wait_data lwd;
-        struct obd_device *obd;
-        struct obd_import *imp = NULL;
-        struct l_wait_info lwi;
-        __u32 timeout;
-        int rc = 0;
-        ENTRY;
-
-        if (flags == LDLM_FL_WAIT_NOREPROC) {
-                LDLM_DEBUG(lock, "client-side enqueue waiting on pending lock");
-                goto noreproc;
-        }
-
-        if (!(flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED |
-                       LDLM_FL_BLOCK_CONV))) {
-                cfs_waitq_signal(&lock->l_waitq);
-                RETURN(0);
-        }
-
-        LDLM_DEBUG(lock, "client-side enqueue returned a blocked lock, "
-                   "sleeping");
-        ldlm_lock_dump(D_OTHER, lock, 0);
-        ldlm_reprocess_all(lock->l_resource);
-
-noreproc:
-
-        obd = class_exp2obd(lock->l_conn_export);
-
-        /* if this is a local lock, then there is no import */
-        if (obd != NULL) {
-                imp = obd->u.cli.cl_import;
-        }
-
-        /* Wait a long time for enqueue - server may have to callback a
-           lock from another client.  Server will evict the other client if it
-           doesn't respond reasonably, and then give us the lock. */
-        timeout = ldlm_get_enq_timeout(lock) * 2;
-
-        lwd.lwd_lock = lock;
-
-        if (lock->l_flags & LDLM_FL_NO_TIMEOUT) {
-                LDLM_DEBUG(lock, "waiting indefinitely because of NO_TIMEOUT");
-                lwi = LWI_INTR(interrupted_completion_wait, &lwd);
-        } else {
-                lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(timeout),
-                                       ldlm_expired_completion_wait,
-                                       interrupted_completion_wait, &lwd);
-        }
-
-        if (imp != NULL) {
-                spin_lock(&imp->imp_lock);
-                lwd.lwd_conn_cnt = imp->imp_conn_cnt;
-                spin_unlock(&imp->imp_lock);
-        }
-
-        /* Go to sleep until the lock is granted or cancelled. */
-        rc = l_wait_event(lock->l_waitq, is_granted_or_cancelled(lock), &lwi);
-
-        if (lock->l_destroyed || lock->l_flags & LDLM_FL_FAILED) {
-                LDLM_DEBUG(lock, "client-side enqueue waking up: destroyed");
-                RETURN(-EIO);
-        }
-
-        if (rc) {
-                LDLM_DEBUG(lock, "client-side enqueue waking up: failed (%d)",
-                           rc);
-                RETURN(rc);
-        }
-
-        LDLM_DEBUG(lock, "client-side enqueue waking up: granted after %lds",
-                   cfs_time_current_sec() - lock->l_enqueued_time.tv_sec);
-
-        /* Update our time estimate */
-        at_add(&lock->l_resource->lr_namespace->ns_at_estimate,
-               cfs_time_current_sec() - lock->l_enqueued_time.tv_sec);
-
-        RETURN(0);
-}
-
-/*
- * ->l_blocking_ast() callback for LDLM locks acquired by server-side OBDs.
- */
-int ldlm_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
-                      void *data, int flag)
-{
-        int do_ast;
-        ENTRY;
-
-        if (flag == LDLM_CB_CANCELING) {
-                /* Don't need to do anything here. */
-                RETURN(0);
-        }
-
-        lock_res_and_lock(lock);
-        /* Get this: if ldlm_blocking_ast is racing with intent_policy, such
-         * that ldlm_blocking_ast is called just before intent_policy method
-         * takes the ns_lock, then by the time we get the lock, we might not
-         * be the correct blocking function anymore.  So check, and return
-         * early, if so. */
-        if (lock->l_blocking_ast != ldlm_blocking_ast) {
-                unlock_res_and_lock(lock);
-                RETURN(0);
-        }
-
-        lock->l_flags |= LDLM_FL_CBPENDING;
-        do_ast = (!lock->l_readers && !lock->l_writers);
-        unlock_res_and_lock(lock);
-
-        if (do_ast) {
-                struct lustre_handle lockh;
-                int rc;
-
-                LDLM_DEBUG(lock, "already unused, calling ldlm_cli_cancel");
-                ldlm_lock2handle(lock, &lockh);
-                rc = ldlm_cli_cancel(&lockh);
-                if (rc < 0)
-                        CERROR("ldlm_cli_cancel: %d\n", rc);
-        } else {
-                LDLM_DEBUG(lock, "Lock still has references, will be "
-                           "cancelled later");
-        }
-        RETURN(0);
-}
-
-/*
- * ->l_glimpse_ast() for DLM extent locks acquired on the server-side. See
- * comment in filter_intent_policy() on why you may need this.
- */
-int ldlm_glimpse_ast(struct ldlm_lock *lock, void *reqp)
-{
-        /*
-         * Returning -ELDLM_NO_LOCK_DATA actually works, but the reason for
-         * that is rather subtle: with OST-side locking, it may so happen that
-         * _all_ extent locks are held by the OST. If client wants to obtain
-         * current file size it calls ll{,u}_glimpse_size(), and (as locks are
-         * on the server), dummy glimpse callback fires and does
-         * nothing. Client still receives correct file size due to the
-         * following fragment in filter_intent_policy():
-         *
-         * rc = l->l_glimpse_ast(l, NULL); // this will update the LVB
-         * if (rc != 0 && res->lr_namespace->ns_lvbo &&
-         *     res->lr_namespace->ns_lvbo->lvbo_update) {
-         *         res->lr_namespace->ns_lvbo->lvbo_update(res, NULL, 0, 1);
-         * }
-         *
-         * that is, after glimpse_ast() fails, filter_lvbo_update() runs, and
-         * returns correct file size to the client.
-         */
-        return -ELDLM_NO_LOCK_DATA;
-}
-
-int ldlm_cli_enqueue_local(struct ldlm_namespace *ns,
-                           struct ldlm_res_id *res_id,
-                           ldlm_type_t type, ldlm_policy_data_t *policy,
-                           ldlm_mode_t mode, int *flags,
-                           ldlm_blocking_callback blocking,
-                           ldlm_completion_callback completion,
-                           ldlm_glimpse_callback glimpse,
-                           void *data, __u32 lvb_len, void *lvb_swabber,
-                           struct lustre_handle *lockh)
-{
-        struct ldlm_lock *lock;
-        int err;
-        ENTRY;
-
-        LASSERT(!(*flags & LDLM_FL_REPLAY));
-        if (ns_is_client(ns)) {
-                CERROR("Trying to enqueue local lock in a shadow namespace\n");
-                LBUG();
-        }
-
-        lock = ldlm_lock_create(ns, *res_id, type, mode, blocking,
-                                completion, glimpse, data, lvb_len);
-        if (!lock)
-                GOTO(out_nolock, err = -ENOMEM);
-        LDLM_DEBUG(lock, "client-side local enqueue handler, new lock created");
-
-        ldlm_lock_addref_internal(lock, mode);
-        ldlm_lock2handle(lock, lockh);
-        lock_res_and_lock(lock);
-        lock->l_flags |= LDLM_FL_LOCAL;
-        if (*flags & LDLM_FL_ATOMIC_CB)
-                lock->l_flags |= LDLM_FL_ATOMIC_CB;
-        lock->l_lvb_swabber = lvb_swabber;
-        unlock_res_and_lock(lock);
-        if (policy != NULL)
-                lock->l_policy_data = *policy;
-        if (type == LDLM_EXTENT)
-                lock->l_req_extent = policy->l_extent;
-
-        err = ldlm_lock_enqueue(ns, &lock, policy, flags);
-        if (err != ELDLM_OK)
-                GOTO(out, err);
-
-        if (policy != NULL)
-                *policy = lock->l_policy_data;
-        if ((*flags) & LDLM_FL_LOCK_CHANGED)
-                *res_id = lock->l_resource->lr_name;
-
-        LDLM_DEBUG_NOLOCK("client-side local enqueue handler END (lock %p)",
-                          lock);
-
-        if (lock->l_completion_ast)
-                lock->l_completion_ast(lock, *flags, NULL);
-
-        LDLM_DEBUG(lock, "client-side local enqueue END");
-        EXIT;
- out:
-        LDLM_LOCK_PUT(lock);
- out_nolock:
-        return err;
-}
-
-static void failed_lock_cleanup(struct ldlm_namespace *ns,
-                                struct ldlm_lock *lock,
-                                struct lustre_handle *lockh, int mode)
-{
-        /* Set a flag to prevent us from sending a CANCEL (bug 407) */
-        lock_res_and_lock(lock);
-        lock->l_flags |= LDLM_FL_LOCAL_ONLY;
-        unlock_res_and_lock(lock);
-        LDLM_DEBUG(lock, "setting FL_LOCAL_ONLY");
-
-        ldlm_lock_decref_and_cancel(lockh, mode);
-
-        /* XXX - HACK because we shouldn't call ldlm_lock_destroy()
-         *       from llite/file.c/ll_file_flock(). */
-        if (lock->l_resource->lr_type == LDLM_FLOCK) {
-                ldlm_lock_destroy(lock);
-        }
-}
-
-int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
-                          ldlm_type_t type, __u8 with_policy, ldlm_mode_t mode,
-                          int *flags, void *lvb, __u32 lvb_len,
-                          void *lvb_swabber, struct lustre_handle *lockh,int rc)
-{
-        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
-        int is_replay = *flags & LDLM_FL_REPLAY;
-        struct ldlm_lock *lock;
-        struct ldlm_reply *reply;
-        int cleanup_phase = 1;
-        ENTRY;
-
-        lock = ldlm_handle2lock(lockh);
-        /* ldlm_cli_enqueue is holding a reference on this lock. */
-        if (!lock) {
-                LASSERT(type == LDLM_FLOCK);
-                RETURN(-ENOLCK);
-        }
-
-        if (rc != ELDLM_OK) {
-                LASSERT(!is_replay);
-                LDLM_DEBUG(lock, "client-side enqueue END (%s)",
-                           rc == ELDLM_LOCK_ABORTED ? "ABORTED" : "FAILED");
-                if (rc == ELDLM_LOCK_ABORTED) {
-                        /* Before we return, swab the reply */
-                        reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF,
-                                                   sizeof(*reply),
-                                                   lustre_swab_ldlm_reply);
-                        if (reply == NULL) {
-                                CERROR("Can't unpack ldlm_reply\n");
-                                rc = -EPROTO;
-                        }
-                        if (lvb_len) {
-                                void *tmplvb;
-                                tmplvb = lustre_swab_repbuf(req,
-                                                            DLM_REPLY_REC_OFF,
-                                                            lvb_len,
-                                                            lvb_swabber);
-                                if (tmplvb == NULL)
-                                        GOTO(cleanup, rc = -EPROTO);
-                                if (lvb != NULL)
-                                        memcpy(lvb, tmplvb, lvb_len);
-                        }
-                }
-                GOTO(cleanup, rc);
-        }
-
-        reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, sizeof(*reply),
-                                   lustre_swab_ldlm_reply);
-        if (reply == NULL) {
-                CERROR("Can't unpack ldlm_reply\n");
-                GOTO(cleanup, rc = -EPROTO);
-        }
-
-        /* lock enqueued on the server */
-        cleanup_phase = 0;
-
-        lock_res_and_lock(lock);
-        lock->l_remote_handle = reply->lock_handle;
-        *flags = reply->lock_flags;
-        lock->l_flags |= reply->lock_flags & LDLM_INHERIT_FLAGS;
-        /* move NO_TIMEOUT flag to the lock to force ldlm_lock_match()
-         * to wait with no timeout as well */
-        lock->l_flags |= reply->lock_flags & LDLM_FL_NO_TIMEOUT;
-        unlock_res_and_lock(lock);
-
-        CDEBUG(D_INFO, "local: %p, remote cookie: "LPX64", flags: 0x%x\n",
-               lock, reply->lock_handle.cookie, *flags);
-
-        /* If enqueue returned a blocked lock but the completion handler has
-         * already run, then it fixed up the resource and we don't need to do it
-         * again. */
-        if ((*flags) & LDLM_FL_LOCK_CHANGED) {
-                int newmode = reply->lock_desc.l_req_mode;
-                LASSERT(!is_replay);
-                if (newmode && newmode != lock->l_req_mode) {
-                        LDLM_DEBUG(lock, "server returned different mode %s",
-                                   ldlm_lockname[newmode]);
-                        lock->l_req_mode = newmode;
-                }
-
-                if (reply->lock_desc.l_resource.lr_name.name[0] !=
-                    lock->l_resource->lr_name.name[0]) {
-                        CDEBUG(D_INFO, "remote intent success, locking %ld "
-                               "instead of %ld\n",
-                              (long)reply->lock_desc.l_resource.lr_name.name[0],
-                               (long)lock->l_resource->lr_name.name[0]);
-
-                        ldlm_lock_change_resource(ns, lock,
-                                           reply->lock_desc.l_resource.lr_name);
-                        if (lock->l_resource == NULL) {
-                                LBUG();
-                                GOTO(cleanup, rc = -ENOMEM);
-                        }
-                        LDLM_DEBUG(lock, "client-side enqueue, new resource");
-                }
-                if (with_policy)
-                        if (!(type == LDLM_IBITS && !(exp->exp_connect_flags &
-                                                    OBD_CONNECT_IBITS)))
-                                lock->l_policy_data =
-                                                 reply->lock_desc.l_policy_data;
-                if (type != LDLM_PLAIN)
-                        LDLM_DEBUG(lock,"client-side enqueue, new policy data");
-        }
-
-        if ((*flags) & LDLM_FL_AST_SENT ||
-            /* Cancel extent locks as soon as possible on a liblustre client,
-             * because it cannot handle asynchronous ASTs robustly (see
-             * bug 7311). */
-            (LIBLUSTRE_CLIENT && type == LDLM_EXTENT)) {
-                lock_res_and_lock(lock);
-                lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_BL_AST;
-                unlock_res_and_lock(lock);
-                LDLM_DEBUG(lock, "enqueue reply includes blocking AST");
-        }
-
-        /* If the lock has already been granted by a completion AST, don't
-         * clobber the LVB with an older one. */
-        if (lvb_len && (lock->l_req_mode != lock->l_granted_mode)) {
-                void *tmplvb;
-                tmplvb = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF, lvb_len,
-                                            lvb_swabber);
-                if (tmplvb == NULL)
-                        GOTO(cleanup, rc = -EPROTO);
-                memcpy(lock->l_lvb_data, tmplvb, lvb_len);
-        }
-
-        if (!is_replay) {
-                rc = ldlm_lock_enqueue(ns, &lock, NULL, flags);
-                if (lock->l_completion_ast != NULL) {
-                        int err = lock->l_completion_ast(lock, *flags, NULL);
-                        if (!rc)
-                                rc = err;
-                        if (rc && type != LDLM_FLOCK) /* bug 9425, bug 10250 */
-                                cleanup_phase = 1;
-                }
-        }
-
-        if (lvb_len && lvb != NULL) {
-                /* Copy the LVB here, and not earlier, because the completion
-                 * AST (if any) can override what we got in the reply */
-                memcpy(lvb, lock->l_lvb_data, lvb_len);
-        }
-
-        LDLM_DEBUG(lock, "client-side enqueue END");
-        EXIT;
-cleanup:
-        if (cleanup_phase == 1 && rc)
-                failed_lock_cleanup(ns, lock, lockh, mode);
-        /* Put lock 2 times, the second reference is held by ldlm_cli_enqueue */
-        LDLM_LOCK_PUT(lock);
-        LDLM_LOCK_PUT(lock);
-        return rc;
-}
-
-/* PAGE_SIZE-512 is to allow TCP/IP and LNET headers to fit into
- * a single page on the send/receive side. XXX: 512 should be changed
- * to more adequate value. */
-static inline int ldlm_req_handles_avail(struct obd_export *exp,
-                                         int *size, int bufcount, int off)
-{
-        int avail = min_t(int, LDLM_MAXREQSIZE, PAGE_SIZE - 512);
-
-        avail -= lustre_msg_size(class_exp2cliimp(exp)->imp_msg_magic,
-                                 bufcount, size);
-        avail /= sizeof(struct lustre_handle);
-        avail += LDLM_LOCKREQ_HANDLES - off;
-
-        return avail;
-}
-
-static inline int ldlm_cancel_handles_avail(struct obd_export *exp)
-{
-        int size[2] = { sizeof(struct ptlrpc_body),
-                        sizeof(struct ldlm_request) };
-        return ldlm_req_handles_avail(exp, size, 2, 0);
-}
-
-/* Cancel lru locks and pack them into the enqueue request. Pack there the given
- * @count locks in @cancels. */
-struct ptlrpc_request *ldlm_prep_elc_req(struct obd_export *exp, int version,
-                                         int opc, int bufcount, int *size,
-                                         int bufoff, int canceloff,
-                                         struct list_head *cancels, int count)
-{
-        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
-        int flags, avail, to_free, pack = 0;
-        struct ldlm_request *dlm = NULL;
-        struct ptlrpc_request *req;
-        CFS_LIST_HEAD(head);
-        ENTRY;
-
-        if (cancels == NULL)
-                cancels = &head;
-        if (exp_connect_cancelset(exp)) {
-                /* Estimate the amount of free space in the request. */
-                LASSERT(bufoff < bufcount);
-
-                avail = ldlm_req_handles_avail(exp, size, bufcount, canceloff);
-                flags = ns_connect_lru_resize(ns) ? 
-                        LDLM_CANCEL_LRUR : LDLM_CANCEL_AGED;
-                to_free = !ns_connect_lru_resize(ns) &&
-                          opc == LDLM_ENQUEUE ? 1 : 0;
-
-                /* Cancel lru locks here _only_ if the server supports 
-                 * EARLY_CANCEL. Otherwise we have to send extra CANCEL
-                 * rpc, what will make us slower. */
-                if (avail > count)
-                        count += ldlm_cancel_lru_local(ns, cancels, to_free,
-                                                       avail - count, 0, flags);
-                if (avail > count)
-                        pack = count;
-                else
-                        pack = avail;
-                size[bufoff] = ldlm_request_bufsize(pack, opc);
-        }
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), version,
-                              opc, bufcount, size, NULL);
-        if (exp_connect_cancelset(exp) && req) {
-                if (canceloff) {
-                        dlm = lustre_msg_buf(req->rq_reqmsg, bufoff,
-                                             sizeof(*dlm));
-                        /* Skip first lock handler in ldlm_request_pack(),
-                         * this method will incrment @lock_count according
-                         * to the lock handle amount actually written to
-                         * the buffer. */
-                        dlm->lock_count = canceloff;
-                }
-                /* Pack into the request @pack lock handles. */
-                ldlm_cli_cancel_list(cancels, pack, req, bufoff);
-                /* Prepare and send separate cancel rpc for others. */
-                ldlm_cli_cancel_list(cancels, count - pack, NULL, 0);
-        } else {
-                ldlm_lock_list_put(cancels, l_bl_ast, count);
-        }
-        RETURN(req);
-}
-
-struct ptlrpc_request *ldlm_prep_enqueue_req(struct obd_export *exp,
-                                             int bufcount, int *size,
-                                             struct list_head *cancels,
-                                             int count)
-{
-        return ldlm_prep_elc_req(exp, LUSTRE_DLM_VERSION, LDLM_ENQUEUE,
-                                 bufcount, size, DLM_LOCKREQ_OFF,
-                                 LDLM_ENQUEUE_CANCEL_OFF, cancels, count);
-}
-
-/* If a request has some specific initialisation it is passed in @reqp,
- * otherwise it is created in ldlm_cli_enqueue.
- *
- * Supports sync and async requests, pass @async flag accordingly. If a
- * request was created in ldlm_cli_enqueue and it is the async request,
- * pass it to the caller in @reqp. */
-int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
-                     struct ldlm_enqueue_info *einfo, struct ldlm_res_id res_id,
-                     ldlm_policy_data_t *policy, int *flags,
-                     void *lvb, __u32 lvb_len, void *lvb_swabber,
-                     struct lustre_handle *lockh, int async)
-{
-        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
-        struct ldlm_lock *lock;
-        struct ldlm_request *body;
-        struct ldlm_reply *reply;
-        int size[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(*body),
-                        [DLM_REPLY_REC_OFF]   = lvb_len };
-        int is_replay = *flags & LDLM_FL_REPLAY;
-        int req_passed_in = 1, rc, err;
-        struct ptlrpc_request *req;
-        ENTRY;
-
-        LASSERT(exp != NULL);
-
-        /* If we're replaying this lock, just check some invariants.
-         * If we're creating a new lock, get everything all setup nice. */
-        if (is_replay) {
-                lock = ldlm_handle2lock(lockh);
-                LASSERT(lock != NULL);
-                LDLM_DEBUG(lock, "client-side enqueue START");
-                LASSERT(exp == lock->l_conn_export);
-        } else {
-                lock = ldlm_lock_create(ns, res_id, einfo->ei_type,
-                                        einfo->ei_mode, einfo->ei_cb_bl,
-                                        einfo->ei_cb_cp, einfo->ei_cb_gl,
-                                        einfo->ei_cbdata, lvb_len);
-                if (lock == NULL)
-                        RETURN(-ENOMEM);
-                /* for the local lock, add the reference */
-                ldlm_lock_addref_internal(lock, einfo->ei_mode);
-                ldlm_lock2handle(lock, lockh);
-                lock->l_lvb_swabber = lvb_swabber;
-                if (policy != NULL) {
-                        /* INODEBITS_INTEROP: If the server does not support
-                         * inodebits, we will request a plain lock in the
-                         * descriptor (ldlm_lock2desc() below) but use an
-                         * inodebits lock internally with both bits set.
-                         */
-                        if (einfo->ei_type == LDLM_IBITS &&
-                            !(exp->exp_connect_flags & OBD_CONNECT_IBITS))
-                                lock->l_policy_data.l_inodebits.bits =
-                                        MDS_INODELOCK_LOOKUP |
-                                        MDS_INODELOCK_UPDATE;
-                        else
-                                lock->l_policy_data = *policy;
-                }
-
-                if (einfo->ei_type == LDLM_EXTENT)
-                        lock->l_req_extent = policy->l_extent;
-                LDLM_DEBUG(lock, "client-side enqueue START");
-        }
-
-        /* lock not sent to server yet */
-
-        if (reqp == NULL || *reqp == NULL) {
-                req = ldlm_prep_enqueue_req(exp, 2, size, NULL, 0);
-                if (req == NULL) {
-                        failed_lock_cleanup(ns, lock, lockh, einfo->ei_mode);
-                        LDLM_LOCK_PUT(lock);
-                        RETURN(-ENOMEM);
-                }
-                req_passed_in = 0;
-                if (reqp)
-                        *reqp = req;
-        } else {
-                req = *reqp;
-                LASSERTF(lustre_msg_buflen(req->rq_reqmsg, DLM_LOCKREQ_OFF) >=
-                         sizeof(*body), "buflen[%d] = %d, not "LPSZ"\n",
-                         DLM_LOCKREQ_OFF,
-                         lustre_msg_buflen(req->rq_reqmsg, DLM_LOCKREQ_OFF),
-                         sizeof(*body));
-        }
-
-        lock->l_conn_export = exp;
-        lock->l_export = NULL;
-        lock->l_blocking_ast = einfo->ei_cb_bl;
-
-        /* Dump lock data into the request buffer */
-        body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body));
-        ldlm_lock2desc(lock, &body->lock_desc);
-        body->lock_flags = *flags;
-        body->lock_handle[0] = *lockh;
-
-        /* Continue as normal. */
-        if (!req_passed_in) {
-                size[DLM_LOCKREPLY_OFF] = sizeof(*reply);
-                ptlrpc_req_set_repsize(req, 2 + (lvb_len > 0), size);
-        }
-
-        /*
-         * Liblustre client doesn't get extent locks, except for O_APPEND case
-         * where [0, OBD_OBJECT_EOF] lock is taken, or truncate, where
-         * [i_size, OBD_OBJECT_EOF] lock is taken.
-         */
-        LASSERT(ergo(LIBLUSTRE_CLIENT, einfo->ei_type != LDLM_EXTENT ||
-                     policy->l_extent.end == OBD_OBJECT_EOF));
-
-        if (async) {
-                LASSERT(reqp != NULL);
-                RETURN(0);
-        }
-
-        LDLM_DEBUG(lock, "sending request");
-        rc = ptlrpc_queue_wait(req);
-        err = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, policy ? 1 : 0,
-                                    einfo->ei_mode, flags, lvb, lvb_len,
-                                    lvb_swabber, lockh, rc);
-
-        /* If ldlm_cli_enqueue_fini did not find the lock, we need to free
-         * one reference that we took */
-        if (err == -ENOLCK)
-                LDLM_LOCK_PUT(lock);
-        else
-                rc = err;
-
-        if (!req_passed_in && req != NULL) {
-                ptlrpc_req_finished(req);
-                if (reqp)
-                        *reqp = NULL;
-        }
-
-        RETURN(rc);
-}
-
-static int ldlm_cli_convert_local(struct ldlm_lock *lock, int new_mode,
-                                  __u32 *flags)
-{
-        struct ldlm_resource *res;
-        int rc;
-        ENTRY;
-        if (ns_is_client(lock->l_resource->lr_namespace)) {
-                CERROR("Trying to cancel local lock\n");
-                LBUG();
-        }
-        LDLM_DEBUG(lock, "client-side local convert");
-
-        res = ldlm_lock_convert(lock, new_mode, flags);
-        if (res) {
-                ldlm_reprocess_all(res);
-                rc = 0;
-        } else {
-                rc = EDEADLOCK;
-        }
-        LDLM_DEBUG(lock, "client-side local convert handler END");
-        LDLM_LOCK_PUT(lock);
-        RETURN(rc);
-}
-
-/* FIXME: one of ldlm_cli_convert or the server side should reject attempted
- * conversion of locks which are on the waiting or converting queue */
-/* Caller of this code is supposed to take care of lock readers/writers
-   accounting */
-int ldlm_cli_convert(struct lustre_handle *lockh, int new_mode, __u32 *flags)
-{
-        struct ldlm_request *body;
-        struct ldlm_reply *reply;
-        struct ldlm_lock *lock;
-        struct ldlm_resource *res;
-        struct ptlrpc_request *req;
-        int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(*body) };
-        int rc;
-        ENTRY;
-
-        lock = ldlm_handle2lock(lockh);
-        if (!lock) {
-                LBUG();
-                RETURN(-EINVAL);
-        }
-        *flags = 0;
-
-        if (lock->l_conn_export == NULL)
-                RETURN(ldlm_cli_convert_local(lock, new_mode, flags));
-
-        LDLM_DEBUG(lock, "client-side convert");
-
-        req = ptlrpc_prep_req(class_exp2cliimp(lock->l_conn_export),
-                              LUSTRE_DLM_VERSION, LDLM_CONVERT, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body));
-        body->lock_handle[0] = lock->l_remote_handle;
-
-        body->lock_desc.l_req_mode = new_mode;
-        body->lock_flags = *flags;
-
-        size[DLM_LOCKREPLY_OFF] = sizeof(*reply);
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc != ELDLM_OK)
-                GOTO(out, rc);
-
-        reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, sizeof(*reply),
-                                   lustre_swab_ldlm_reply);
-        if (reply == NULL) {
-                CERROR ("Can't unpack ldlm_reply\n");
-                GOTO (out, rc = -EPROTO);
-        }
-
-        if (req->rq_status)
-                GOTO(out, rc = req->rq_status);
-
-        res = ldlm_lock_convert(lock, new_mode, &reply->lock_flags);
-        if (res != NULL) {
-                ldlm_reprocess_all(res);
-                /* Go to sleep until the lock is granted. */
-                /* FIXME: or cancelled. */
-                if (lock->l_completion_ast) {
-                        rc = lock->l_completion_ast(lock, LDLM_FL_WAIT_NOREPROC,
-                                                    NULL);
-                        if (rc)
-                                GOTO(out, rc);
-                }
-        } else {
-                rc = EDEADLOCK;
-        }
-        EXIT;
- out:
-        LDLM_LOCK_PUT(lock);
-        ptlrpc_req_finished(req);
-        return rc;
-}
-
-/* Cancel locks locally.
- * Returns:
- * LDLM_FL_LOCAL_ONLY if tere is no need in a CANCEL rpc to the server;
- * LDLM_FL_CANCELING otherwise;
- * LDLM_FL_BL_AST if there is a need in a separate CANCEL rpc. */
-static int ldlm_cli_cancel_local(struct ldlm_lock *lock)
-{
-        int rc = LDLM_FL_LOCAL_ONLY;
-        ENTRY;
-
-        if (lock->l_conn_export) {
-                int local_only;
-
-                LDLM_DEBUG(lock, "client-side cancel");
-                /* Set this flag to prevent others from getting new references*/
-                lock_res_and_lock(lock);
-                lock->l_flags |= LDLM_FL_CBPENDING;
-                local_only = (lock->l_flags &
-                              (LDLM_FL_LOCAL_ONLY|LDLM_FL_CANCEL_ON_BLOCK));
-                ldlm_cancel_callback(lock);
-                rc = (lock->l_flags & LDLM_FL_BL_AST) ?
-                        LDLM_FL_BL_AST : LDLM_FL_CANCELING;
-                unlock_res_and_lock(lock);
-
-                if (local_only) {
-                        CDEBUG(D_DLMTRACE, "not sending request (at caller's "
-                               "instruction)\n");
-                        rc = LDLM_FL_LOCAL_ONLY;
-                }
-                ldlm_lock_cancel(lock);
-        } else {
-                if (ns_is_client(lock->l_resource->lr_namespace)) {
-                        LDLM_ERROR(lock, "Trying to cancel local lock");
-                        LBUG();
-                }
-                LDLM_DEBUG(lock, "server-side local cancel");
-                ldlm_lock_cancel(lock);
-                ldlm_reprocess_all(lock->l_resource);
-                LDLM_DEBUG(lock, "server-side local cancel handler END");
-        }
-
-        RETURN(rc);
-}
-
-/* Pack @count locks in @head into ldlm_request buffer at the offset @off,
-   of the request @req. */
-static void ldlm_cancel_pack(struct ptlrpc_request *req, int off,
-                             struct list_head *head, int count)
-{
-        struct ldlm_request *dlm;
-        struct ldlm_lock *lock;
-        int max, packed = 0;
-        ENTRY;
-
-        dlm = lustre_msg_buf(req->rq_reqmsg, off, sizeof(*dlm));
-        LASSERT(dlm != NULL);
-
-        /* Check the room in the request buffer. */
-        max = lustre_msg_buflen(req->rq_reqmsg, off) -
-                sizeof(struct ldlm_request);
-        max /= sizeof(struct lustre_handle);
-        max += LDLM_LOCKREQ_HANDLES;
-        LASSERT(max >= dlm->lock_count + count);
-
-        /* XXX: it would be better to pack lock handles grouped by resource.
-         * so that the server cancel would call filter_lvbo_update() less
-         * frequently. */
-        list_for_each_entry(lock, head, l_bl_ast) {
-                if (!count--)
-                        break;
-                LASSERT(lock->l_conn_export);
-                /* Pack the lock handle to the given request buffer. */
-                LDLM_DEBUG(lock, "packing");
-                dlm->lock_handle[dlm->lock_count++] = lock->l_remote_handle;
-                packed++;
-        }
-        CDEBUG(D_DLMTRACE, "%d locks packed\n", packed);
-        EXIT;
-}
-
-/* Prepare and send a batched cancel rpc, it will include count lock handles
- * of locks given in @head. */
-int ldlm_cli_cancel_req(struct obd_export *exp,
-                        struct list_head *cancels, int count)
-{
-        struct ptlrpc_request *req = NULL;
-        struct ldlm_request *body;
-        int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(*body) };
-        struct obd_import *imp;
-        int free, sent = 0;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(exp != NULL);
-        LASSERT(count > 0);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_PAUSE_CANCEL, obd_fail_val);
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_CANCEL_RACE))
-                RETURN(count);
-
-        free = ldlm_req_handles_avail(exp, size, 2, 0);
-        if (count > free)
-                count = free;
-
-        size[DLM_LOCKREQ_OFF] = ldlm_request_bufsize(count, LDLM_CANCEL);
-        while (1) {
-                imp = class_exp2cliimp(exp);
-                if (imp == NULL || imp->imp_invalid) {
-                        CDEBUG(D_DLMTRACE,
-                               "skipping cancel on invalid import %p\n", imp);
-                        RETURN(count);
-                }
-
-                req = ptlrpc_prep_req(imp, LUSTRE_DLM_VERSION, LDLM_CANCEL, 2,
-                                      size, NULL);
-                if (!req)
-                        GOTO(out, rc = -ENOMEM);
-
-                req->rq_no_resend = 1;
-                req->rq_no_delay = 1;
-
-                req->rq_request_portal = LDLM_CANCEL_REQUEST_PORTAL;
-                req->rq_reply_portal = LDLM_CANCEL_REPLY_PORTAL;
-                ptlrpc_at_set_req_timeout(req);
-
-                body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF,
-                                      sizeof(*body));
-                ldlm_cancel_pack(req, DLM_LOCKREQ_OFF, cancels, count);
-
-                ptlrpc_req_set_repsize(req, 1, NULL);
-                rc = ptlrpc_queue_wait(req);
-
-                if (rc == ESTALE) {
-                        CDEBUG(D_DLMTRACE, "client/server (nid %s) "
-                               "out of sync -- not fatal\n",
-                               libcfs_nid2str(req->rq_import->
-                                              imp_connection->c_peer.nid));
-                        rc = 0;
-                } else if (rc == -ETIMEDOUT && /* check there was no reconnect*/
-                           req->rq_import_generation == imp->imp_generation) {
-                        ptlrpc_req_finished(req);
-                        continue;
-                } else if (rc != ELDLM_OK) {
-                        CERROR("Got rc %d from cancel RPC: canceling "
-                               "anyway\n", rc);
-                        break;
-                }
-                sent = count;
-                break;
-        }
-
-        ptlrpc_req_finished(req);
-        EXIT;
-out:
-        return sent ? sent : rc;
-}
-
-static inline struct ldlm_pool *ldlm_imp2pl(struct obd_import *imp)
-{
-        LASSERT(imp != NULL);
-        return &imp->imp_obd->obd_namespace->ns_pool;
-}
-
-int ldlm_cli_update_pool(struct ptlrpc_request *req)
-{
-        __u64 old_slv, new_slv;
-        struct ldlm_pool *pl;
-        __u32 new_limit;
-        ENTRY;
-    
-        if (!imp_connect_lru_resize(req->rq_import))
-                RETURN(0);
-
-        /* In some cases RPC may contain slv and limit zeroed out. This is 
-         * the case when server does not support lru resize feature. This is
-         * also possible in some recovery cases when server side reqs have no
-         * ref to obd export and thus access to server side namespace is no 
-         * possible. */
-        if (lustre_msg_get_slv(req->rq_repmsg) == 0 || 
-            lustre_msg_get_limit(req->rq_repmsg) == 0) {
-                DEBUG_REQ(D_HA, req, "zero SLV or Limit found "
-                          "(SLV: "LPU64", Limit: %u)", 
-                          lustre_msg_get_slv(req->rq_repmsg), 
-                          lustre_msg_get_limit(req->rq_repmsg));
-                RETURN(0);
-        }
-
-        new_limit = lustre_msg_get_limit(req->rq_repmsg);
-        new_slv = lustre_msg_get_slv(req->rq_repmsg);
-        pl = ldlm_imp2pl(req->rq_import);
-        
-        spin_lock(&pl->pl_lock);
-        old_slv = ldlm_pool_get_slv(pl);
-        ldlm_pool_set_slv(pl, new_slv);
-        ldlm_pool_set_limit(pl, new_limit);
-
-        /* Check if we need to wakeup pools thread for fast SLV change. 
-         * This is only done when threads period is noticably long like 
-         * 10s or more. */
-#if defined(__KERNEL__) && (LDLM_POOLS_THREAD_PERIOD >= 10)
-        {
-                __u64 fast_change = old_slv * LDLM_POOLS_FAST_SLV_CHANGE;
-                do_div(fast_change, 100);
-
-                /* Wake up pools thread only if SLV has changed more than 
-                 * 50% since last update. In this case we want to react asap. 
-                 * Otherwise it is no sense to wake up pools as they are 
-                 * re-calculated every LDLM_POOLS_THREAD_PERIOD anyways. */
-                if (old_slv > new_slv && old_slv - new_slv > fast_change)
-                        ldlm_pools_wakeup();
-        }
-#endif
-        spin_unlock(&pl->pl_lock);
-        RETURN(0);
-}
-EXPORT_SYMBOL(ldlm_cli_update_pool);
-
-int ldlm_cli_cancel(struct lustre_handle *lockh)
-{
-        struct ldlm_namespace *ns;
-        int avail, flags, count = 1, rc = 0;
-        struct ldlm_lock *lock;
-        CFS_LIST_HEAD(cancels);
-        ENTRY;
-
-        /* concurrent cancels on the same handle can happen */
-        lock = __ldlm_handle2lock(lockh, LDLM_FL_CANCELING);
-        if (lock == NULL) {
-                LDLM_DEBUG_NOLOCK("lock is already being destroyed\n");
-                RETURN(0);
-        }
-        
-        rc = ldlm_cli_cancel_local(lock);
-        if (rc < 0 || rc == LDLM_FL_LOCAL_ONLY) {
-                LDLM_LOCK_PUT(lock);
-                RETURN(rc < 0 ? rc : 0);
-        }
-        /* Even if the lock is marked as LDLM_FL_BL_AST, this is a LDLM_CANCEL
-         * rpc which goes to canceld portal, so we can cancel other lru locks
-         * here and send them all as one LDLM_CANCEL rpc. */
-        LASSERT(list_empty(&lock->l_bl_ast));
-        list_add(&lock->l_bl_ast, &cancels);
-
-        if (exp_connect_cancelset(lock->l_conn_export)) {
-                avail = ldlm_cancel_handles_avail(lock->l_conn_export);
-                LASSERT(avail > 0);
-
-                ns = lock->l_resource->lr_namespace;
-                flags = ns_connect_lru_resize(ns) ?
-                        LDLM_CANCEL_LRUR : LDLM_CANCEL_AGED;
-                count += ldlm_cancel_lru_local(ns, &cancels, 0, avail - 1,
-                                               LDLM_FL_BL_AST, flags);
-        }
-        ldlm_cli_cancel_list(&cancels, count, NULL, 0);
-        RETURN(0);
-}
-
-/* XXX until we will have compound requests and can cut cancels from generic rpc
- * we need send cancels with LDLM_FL_BL_AST flag as separate rpc */
-static int ldlm_cancel_list(struct list_head *cancels, int count, int flags)
-{
-        CFS_LIST_HEAD(head);
-        struct ldlm_lock *lock, *next;
-        int left = 0, bl_ast = 0, rc;
-
-        left = count;
-        list_for_each_entry_safe(lock, next, cancels, l_bl_ast) {
-                if (left-- == 0)
-                        break;
-
-                if (flags & LDLM_FL_LOCAL_ONLY) {
-                        rc = LDLM_FL_LOCAL_ONLY;
-                        ldlm_lock_cancel(lock);
-                } else {
-                        rc = ldlm_cli_cancel_local(lock);
-                }
-                if (!(flags & LDLM_FL_BL_AST) && (rc == LDLM_FL_BL_AST)) {
-                        LDLM_DEBUG(lock, "Cancel lock separately");
-                        list_del_init(&lock->l_bl_ast);
-                        list_add(&lock->l_bl_ast, &head);
-                        bl_ast ++;
-                        continue;
-                }
-                if (rc == LDLM_FL_LOCAL_ONLY) {
-                        /* CANCEL RPC should not be sent to server. */
-                        list_del_init(&lock->l_bl_ast);
-                        LDLM_LOCK_PUT(lock);
-                        count--;
-                }
-
-        }
-        if (bl_ast > 0) {
-                count -= bl_ast;
-                ldlm_cli_cancel_list(&head, bl_ast, NULL, 0);
-        }
-
-        RETURN(count);
-}
-
-/* Return 1 to stop lru processing and keep current lock cached. Return zero 
- * otherwise. */
-static ldlm_policy_res_t ldlm_cancel_shrink_policy(struct ldlm_namespace *ns,
-                                                   struct ldlm_lock *lock,
-                                                   int unused, int added, 
-                                                   int count)
-{
-        int lock_cost;
-        __u64 page_nr;
-
-        /* Stop lru processing when we reached passed @count or checked all 
-         * locks in lru. */
-        if (count && added >= count)
-                return LDLM_POLICY_KEEP_LOCK;
-
-        if (lock->l_resource->lr_type == LDLM_EXTENT) {
-                struct ldlm_extent *l_extent;
-
-                /* For all extent locks cost is 1 + number of pages in
-                 * their extent. */
-                l_extent = &lock->l_policy_data.l_extent;
-                page_nr = (l_extent->end - l_extent->start);
-                do_div(page_nr, CFS_PAGE_SIZE);
-
-#ifdef __KERNEL__
-                /* XXX: In fact this is evil hack, we can't access inode
-                 * here. For doing it right we need somehow to have number
-                 * of covered by lock. This should be fixed later when 10718 
-                 * is landed. */
-                if (lock->l_ast_data != NULL) {
-                        struct inode *inode = lock->l_ast_data;
-                        if (page_nr > inode->i_mapping->nrpages)
-                                page_nr = inode->i_mapping->nrpages;
-                }
-#endif
-                lock_cost = 1 + page_nr;
-        } else {
-                /* For all locks which are not extent ones cost is 1 */
-                lock_cost = 1;
-        }
-
-        /* Keep all expensive locks in lru for the memory pressure time
-         * cancel policy. They anyways may be canceled by lru resize
-         * pplicy if they have not small enough CLV. */
-        return lock_cost > ns->ns_shrink_thumb ? 
-                LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK;
-}
-
-/* Return 1 to stop lru processing and keep current lock cached. Return zero 
- * otherwise. */
-static ldlm_policy_res_t ldlm_cancel_lrur_policy(struct ldlm_namespace *ns,
-                                                 struct ldlm_lock *lock, 
-                                                 int unused, int added, 
-                                                 int count)
-{
-        cfs_time_t cur = cfs_time_current();
-        struct ldlm_pool *pl = &ns->ns_pool;
-        __u64 slv, lvf, lv;
-        cfs_time_t la;
-
-        /* Stop lru processing when we reached passed @count or checked all 
-         * locks in lru. */
-        if (count && added >= count)
-                return LDLM_POLICY_KEEP_LOCK;
-
-        spin_lock(&pl->pl_lock);
-        slv = ldlm_pool_get_slv(pl);
-        lvf = atomic_read(&pl->pl_lock_volume_factor);
-        spin_unlock(&pl->pl_lock);
-
-        la = cfs_duration_sec(cfs_time_sub(cur, 
-                              lock->l_last_used));
-
-        /* Stop when slv is not yet come from server or 
-         * lv is smaller than it is. */
-        lv = lvf * la * unused;
-        return (slv == 1 || lv < slv) ? 
-                LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK;
-}
-
-/* Return 1 to stop lru processing and keep current lock cached. Return zero 
- * otherwise. */
-static ldlm_policy_res_t ldlm_cancel_passed_policy(struct ldlm_namespace *ns,
-                                                   struct ldlm_lock *lock, 
-                                                   int unused, int added,
-                                                   int count)
-{
-        /* Stop lru processing when we reached passed @count or checked all 
-         * locks in lru. */
-        return (added >= count) ? 
-                LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK;
-}
-
-/* Return 1 to stop lru processing and keep current lock cached. Return zero 
- * otherwise. */
-static ldlm_policy_res_t ldlm_cancel_aged_policy(struct ldlm_namespace *ns,
-                                                 struct ldlm_lock *lock, 
-                                                 int unused, int added,
-                                                 int count)
-{
-        /* Stop lru processing if young lock is found and we reached passed 
-         * @count. */
-        return ((added >= count) && 
-                cfs_time_before(cfs_time_current(),
-                                cfs_time_add(lock->l_last_used,
-                                             ns->ns_max_age))) ? 
-                LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK;
-}
-
-/* Return 1 to stop lru processing and keep current lock cached. Return zero 
- * otherwise. */
-static ldlm_policy_res_t ldlm_cancel_default_policy(struct ldlm_namespace *ns,
-                                                    struct ldlm_lock *lock, 
-                                                    int unused, int added,
-                                                    int count)
-{
-        /* Stop lru processing when we reached passed @count or checked all 
-         * locks in lru. */
-        return (added >= count) ? 
-                LDLM_POLICY_KEEP_LOCK : LDLM_POLICY_CANCEL_LOCK;
-}
-
-typedef ldlm_policy_res_t (*ldlm_cancel_lru_policy_t)(struct ldlm_namespace *, 
-                                                      struct ldlm_lock *, int, 
-                                                      int, int);
-
-static ldlm_cancel_lru_policy_t
-ldlm_cancel_lru_policy(struct ldlm_namespace *ns, int flags)
-{
-        if (ns_connect_lru_resize(ns)) {
-                if (flags & LDLM_CANCEL_SHRINK)
-                        return ldlm_cancel_shrink_policy;
-                else if (flags & LDLM_CANCEL_LRUR)
-                        return ldlm_cancel_lrur_policy;
-                else if (flags & LDLM_CANCEL_PASSED)
-                        return ldlm_cancel_passed_policy;
-        } else {
-                if (flags & LDLM_CANCEL_AGED)
-                        return ldlm_cancel_aged_policy;
-        }
-        
-        return ldlm_cancel_default_policy;
-}
- 
-/* - Free space in lru for @count new locks,
- *   redundant unused locks are canceled locally;
- * - also cancel locally unused aged locks;
- * - do not cancel more than @max locks;
- * - GET the found locks and add them into the @cancels list.
- *
- * A client lock can be added to the l_bl_ast list only when it is
- * marked LDLM_FL_CANCELING. Otherwise, somebody is already doing CANCEL.
- * There are the following use cases: ldlm_cancel_resource_local(),
- * ldlm_cancel_lru_local() and ldlm_cli_cancel(), which check&set this
- * flag properly. As any attempt to cancel a lock rely on this flag,
- * l_bl_ast list is accessed later without any special locking.
- *
- * Calling policies for enabled lru resize:
- * ----------------------------------------
- * flags & LDLM_CANCEL_LRUR - use lru resize policy (SLV from server) to
- *                            cancel not more than @count locks;
- *
- * flags & LDLM_CANCEL_PASSED - cancel @count number of old locks (located at
- *                              the beginning of lru list);
- *
- * flags & LDLM_CANCEL_SHRINK - cancel not more than @count locks according to
- *                              memory pressre policy function;
- *
- * flags & LDLM_CANCEL_AGED -   cancel locks according to "aged policy".
- */
-int ldlm_cancel_lru_local(struct ldlm_namespace *ns, struct list_head *cancels,
-                          int count, int max, int cancel_flags, int flags)
-{
-        ldlm_cancel_lru_policy_t pf;
-        struct ldlm_lock *lock, *next;
-        int added = 0, unused;
-        ENTRY;
-
-        spin_lock(&ns->ns_unused_lock);
-        unused = ns->ns_nr_unused;
-
-        if (!ns_connect_lru_resize(ns))
-                count += unused - ns->ns_max_unused;
-
-        pf = ldlm_cancel_lru_policy(ns, flags);
-        LASSERT(pf != NULL);
-        
-        while (!list_empty(&ns->ns_unused_list)) {
-                /* For any flags, stop scanning if @max is reached. */
-                if (max && added >= max)
-                        break;
-
-                list_for_each_entry_safe(lock, next, &ns->ns_unused_list, l_lru){
-                        /* No locks which got blocking requests. */
-                        LASSERT(!(lock->l_flags & LDLM_FL_BL_AST));
-
-                        /* Somebody is already doing CANCEL. No need in this
-                         * lock in lru, do not traverse it again. */
-                        if (!(lock->l_flags & LDLM_FL_CANCELING))
-                                break;
-
-                        ldlm_lock_remove_from_lru_nolock(lock);
-                }
-                if (&lock->l_lru == &ns->ns_unused_list)
-                        break;
-
-                /* Pass the lock through the policy filter and see if it
-                 * should stay in lru.
-                 *
-                 * Even for shrinker policy we stop scanning if
-                 * we find a lock that should stay in the cache.
-                 * We should take into account lock age anyway
-                 * as new lock even if it is small of weight is
-                 * valuable resource. 
-                 *
-                 * That is, for shrinker policy we drop only
-                 * old locks, but additionally chose them by
-                 * their weight. Big extent locks will stay in 
-                 * the cache. */
-                if (pf(ns, lock, unused, added, count) == LDLM_POLICY_KEEP_LOCK)
-                        break;
-
-                LDLM_LOCK_GET(lock); /* dropped by bl thread */
-                spin_unlock(&ns->ns_unused_lock);
-
-                lock_res_and_lock(lock);
-                /* Check flags again under the lock. */
-                if ((lock->l_flags & LDLM_FL_CANCELING) ||
-                    (ldlm_lock_remove_from_lru(lock) == 0)) {
-                        /* other thread is removing lock from lru or
-                         * somebody is already doing CANCEL or
-                         * there is a blocking request which will send
-                         * cancel by itseft or the lock is matched
-                         * is already not unused. */
-                        unlock_res_and_lock(lock);
-                        LDLM_LOCK_PUT(lock);
-                        spin_lock(&ns->ns_unused_lock);
-                        continue;
-                }
-                LASSERT(!lock->l_readers && !lock->l_writers);
-
-                /* If we have chosen to cancel this lock voluntarily, we
-                 * better send cancel notification to server, so that it
-                 * frees appropriate state. This might lead to a race 
-                 * where while we are doing cancel here, server is also 
-                 * silently cancelling this lock. */
-                lock->l_flags &= ~LDLM_FL_CANCEL_ON_BLOCK;
-
-                /* Setting the CBPENDING flag is a little misleading,
-                 * but prevents an important race; namely, once
-                 * CBPENDING is set, the lock can accumulate no more
-                 * readers/writers. Since readers and writers are
-                 * already zero here, ldlm_lock_decref() won't see
-                 * this flag and call l_blocking_ast */
-                lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_CANCELING;
-
-                /* We can't re-add to l_lru as it confuses the
-                 * refcounting in ldlm_lock_remove_from_lru() if an AST
-                 * arrives after we drop ns_lock below. We use l_bl_ast
-                 * and can't use l_pending_chain as it is used both on
-                 * server and client nevertheless bug 5666 says it is
-                 * used only on server */
-                LASSERT(list_empty(&lock->l_bl_ast));
-                list_add(&lock->l_bl_ast, cancels);
-                unlock_res_and_lock(lock);
-                spin_lock(&ns->ns_unused_lock);
-                added++;
-                unused--;
-        }
-        spin_unlock(&ns->ns_unused_lock);
-        RETURN(ldlm_cancel_list(cancels, added, cancel_flags));
-}
-
-/* Returns number of locks which could be canceled next time when 
- * ldlm_cancel_lru() is called. Used from locks pool shrinker. */
-int ldlm_cancel_lru_estimate(struct ldlm_namespace *ns,
-                             int count, int max, int flags)
-{
-        ldlm_cancel_lru_policy_t pf;
-        struct ldlm_lock *lock;
-        int added = 0, unused;
-        ENTRY;
-
-        pf = ldlm_cancel_lru_policy(ns, flags);
-        LASSERT(pf != NULL);
-        spin_lock(&ns->ns_unused_lock);
-        unused = ns->ns_nr_unused;
-
-        list_for_each_entry(lock, &ns->ns_unused_list, l_lru) {
-                /* For any flags, stop scanning if @max is reached. */
-                if (max && added >= max)
-                        break;
-
-                /* Somebody is already doing CANCEL or there is a
-                 * blocking request will send cancel. Let's not count 
-                 * this lock. */
-                if ((lock->l_flags & LDLM_FL_CANCELING) ||
-                    (lock->l_flags & LDLM_FL_BL_AST)) 
-                        continue;
-
-                /* Pass the lock through the policy filter and see if it
-                 * should stay in lru. */
-                if (pf(ns, lock, unused, added, count) == LDLM_POLICY_KEEP_LOCK)
-                        break;
-
-                added++;
-                unused--;
-        }
-        spin_unlock(&ns->ns_unused_lock);
-        RETURN(added);
-}
-
-/* when called with LDLM_ASYNC the blocking callback will be handled
- * in a thread and this function will return after the thread has been
- * asked to call the callback.  when called with LDLM_SYNC the blocking
- * callback will be performed in this function. */
-int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr, ldlm_sync_t sync, 
-                    int flags)
-{
-        CFS_LIST_HEAD(cancels);
-        int count, rc;
-        ENTRY;
-
-#ifndef __KERNEL__
-        sync = LDLM_SYNC; /* force to be sync in user space */
-#endif
-        count = ldlm_cancel_lru_local(ns, &cancels, nr, 0, 0, flags);
-        if (sync == LDLM_ASYNC) {
-                rc = ldlm_bl_to_thread_list(ns, NULL, &cancels, count);
-                if (rc == 0)
-                        RETURN(count);
-        }
-
-        /* If an error occured in ASYNC mode, or
-         * this is SYNC mode, cancel the list. */
-        ldlm_cli_cancel_list(&cancels, count, NULL, 0);
-        RETURN(count);
-}
-
-/* Find and cancel locally unused locks found on resource, matched to the
- * given policy, mode. GET the found locks and add them into the @cancels
- * list. */
-int ldlm_cancel_resource_local(struct ldlm_resource *res,
-                               struct list_head *cancels,
-                               ldlm_policy_data_t *policy,
-                               ldlm_mode_t mode, int lock_flags,
-                               int cancel_flags, void *opaque)
-{
-        struct ldlm_lock *lock;
-        int count = 0;
-        ENTRY;
-
-        lock_res(res);
-        list_for_each_entry(lock, &res->lr_granted, l_res_link) {
-                if (opaque != NULL && lock->l_ast_data != opaque) {
-                        LDLM_ERROR(lock, "data %p doesn't match opaque %p",
-                                   lock->l_ast_data, opaque);
-                        //LBUG();
-                        continue;
-                }
-
-                if (lock->l_readers || lock->l_writers) {
-                        if (cancel_flags & LDLM_FL_WARN) {
-                                LDLM_ERROR(lock, "lock in use");
-                                //LBUG();
-                        }
-                        continue;
-                }
-
-                /* If somebody is already doing CANCEL, or blocking ast came,
-                 * skip this lock. */
-                if (lock->l_flags & LDLM_FL_BL_AST || 
-                    lock->l_flags & LDLM_FL_CANCELING)
-                        continue;
-
-                if (lockmode_compat(lock->l_granted_mode, mode))
-                        continue;
-
-                /* If policy is given and this is IBITS lock, add to list only
-                 * those locks that match by policy. */
-                if (policy && (lock->l_resource->lr_type == LDLM_IBITS) &&
-                    !(lock->l_policy_data.l_inodebits.bits &
-                      policy->l_inodebits.bits))
-                        continue;
-
-                /* See CBPENDING comment in ldlm_cancel_lru */
-                lock->l_flags |= LDLM_FL_CBPENDING | LDLM_FL_CANCELING |
-                        lock_flags;
-
-                LASSERT(list_empty(&lock->l_bl_ast));
-                list_add(&lock->l_bl_ast, cancels);
-                LDLM_LOCK_GET(lock);
-                count++;
-        }
-        unlock_res(res);
-
-        /* Handle only @count inserted locks. */
-        RETURN(ldlm_cancel_list(cancels, count, cancel_flags));
-}
-
-/* If @req is NULL, send CANCEL request to server with handles of locks
- * in the @cancels. If EARLY_CANCEL is not supported, send CANCEL requests
- * separately per lock.
- * If @req is not NULL, put handles of locks in @cancels into the request
- * buffer at the offset @off.
- * Destroy @cancels at the end. */
-int ldlm_cli_cancel_list(struct list_head *cancels, int count,
-                         struct ptlrpc_request *req, int off)
-{
-        struct ldlm_lock *lock;
-        int res = 0;
-        ENTRY;
-
-        if (list_empty(cancels) || count == 0)
-                RETURN(0);
-
-        while (count) {
-                LASSERT(!list_empty(cancels));
-                lock = list_entry(cancels->next, struct ldlm_lock, l_bl_ast);
-                LASSERT(lock->l_conn_export);
-
-                if (exp_connect_cancelset(lock->l_conn_export)) {
-                        res = count;
-                        if (req)
-                                ldlm_cancel_pack(req, off, cancels, count);
-                        else
-                                res = ldlm_cli_cancel_req(lock->l_conn_export,
-                                                          cancels, count);
-                } else {
-                        res = ldlm_cli_cancel_req(lock->l_conn_export,
-                                                  cancels, 1);
-                }
-
-                if (res < 0) {
-                        CERROR("ldlm_cli_cancel_list: %d\n", res);
-                        res = count;
-                }
-
-                count -= res;
-                ldlm_lock_list_put(cancels, l_bl_ast, res);
-        }
-        RETURN(0);
-}
-
-static int ldlm_cli_cancel_unused_resource(struct ldlm_namespace *ns,
-                                           struct ldlm_res_id res_id,
-                                           int flags, void *opaque)
-{
-        struct ldlm_resource *res;
-        CFS_LIST_HEAD(cancels);
-        int count;
-        int rc;
-        ENTRY;
-
-        res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
-        if (res == NULL) {
-                /* This is not a problem. */
-                CDEBUG(D_INFO, "No resource "LPU64"\n", res_id.name[0]);
-                RETURN(0);
-        }
-
-        count = ldlm_cancel_resource_local(res, &cancels, NULL, LCK_MINMODE,
-                                           0, flags, opaque);
-        rc = ldlm_cli_cancel_list(&cancels, count, NULL, 0);
-        if (rc != ELDLM_OK)
-                CERROR("ldlm_cli_cancel_unused_resource: %d\n", rc);
-
-        ldlm_resource_putref(res);
-        RETURN(0);
-}
-
-static inline int have_no_nsresource(struct ldlm_namespace *ns)
-{
-        int no_resource = 0;
-
-        spin_lock(&ns->ns_hash_lock);
-        if (ns->ns_resources == 0)
-                no_resource = 1;
-        spin_unlock(&ns->ns_hash_lock);
-
-        RETURN(no_resource);
-}
-
-/* Cancel all locks on a namespace (or a specific resource, if given)
- * that have 0 readers/writers.
- *
- * If flags & LDLM_FL_LOCAL_ONLY, throw the locks away without trying
- * to notify the server. */
-int ldlm_cli_cancel_unused(struct ldlm_namespace *ns,
-                           struct ldlm_res_id *res_id, int flags, void *opaque)
-{
-        int i;
-        ENTRY;
-
-        if (ns == NULL)
-                RETURN(ELDLM_OK);
-
-        if (res_id)
-                RETURN(ldlm_cli_cancel_unused_resource(ns, *res_id, flags,
-                                                       opaque));
-
-        spin_lock(&ns->ns_hash_lock);
-        for (i = 0; i < RES_HASH_SIZE; i++) {
-                struct list_head *tmp;
-                tmp = ns->ns_hash[i].next;
-                while (tmp != &(ns->ns_hash[i])) {
-                        struct ldlm_resource *res;
-                        int rc;
-
-                        res = list_entry(tmp, struct ldlm_resource, lr_hash);
-                        ldlm_resource_getref(res);
-                        spin_unlock(&ns->ns_hash_lock);
-
-                        rc = ldlm_cli_cancel_unused_resource(ns, res->lr_name,
-                                                             flags, opaque);
-
-                        if (rc)
-                                CERROR("ldlm_cli_cancel_unused ("LPU64"): %d\n",
-                                       res->lr_name.name[0], rc);
-
-                        spin_lock(&ns->ns_hash_lock);
-                        tmp = tmp->next;
-                        ldlm_resource_putref_locked(res);
-                }
-        }
-        spin_unlock(&ns->ns_hash_lock);
-
-        RETURN(ELDLM_OK);
-}
-
-/* join/split resource locks to/from lru list */
-int ldlm_cli_join_lru(struct ldlm_namespace *ns,
-                      struct ldlm_res_id *res_id, int join)
-{
-        struct ldlm_resource *res;
-        struct ldlm_lock *lock, *n;
-        int count = 0;
-        ENTRY;
-
-        LASSERT(ns_is_client(ns));
-
-        res = ldlm_resource_get(ns, NULL, *res_id, LDLM_EXTENT, 0);
-        if (res == NULL)
-                RETURN(count);
-        LASSERT(res->lr_type == LDLM_EXTENT);
-
-        lock_res(res);
-        if (!join)
-                goto split;
-
-        list_for_each_entry_safe (lock, n, &res->lr_granted, l_res_link) {
-                if (list_empty(&lock->l_lru) &&
-                    !lock->l_readers && !lock->l_writers &&
-                    !(lock->l_flags & LDLM_FL_LOCAL) &&
-                    !(lock->l_flags & LDLM_FL_CBPENDING) &&
-                    !(lock->l_flags & LDLM_FL_BL_AST)) {
-                        ldlm_lock_add_to_lru(lock);
-                        lock->l_flags &= ~LDLM_FL_NO_LRU;
-                        LDLM_DEBUG(lock, "join lock to lru");
-                        count++;
-                }
-        }
-        goto unlock;
-split:
-        spin_lock(&ns->ns_unused_lock);
-        list_for_each_entry_safe (lock, n, &ns->ns_unused_list, l_lru) {
-                if (lock->l_resource == res) {
-                        ldlm_lock_remove_from_lru_nolock(lock);
-                        lock->l_flags |= LDLM_FL_NO_LRU;
-                        LDLM_DEBUG(lock, "split lock from lru");
-                        count++;
-                }
-        }
-        spin_unlock(&ns->ns_unused_lock);
-unlock:
-        unlock_res(res);
-        ldlm_resource_putref(res);
-        RETURN(count);
-}
-
-/* Lock iterators. */
-
-int ldlm_resource_foreach(struct ldlm_resource *res, ldlm_iterator_t iter,
-                          void *closure)
-{
-        struct list_head *tmp, *next;
-        struct ldlm_lock *lock;
-        int rc = LDLM_ITER_CONTINUE;
-
-        ENTRY;
-
-        if (!res)
-                RETURN(LDLM_ITER_CONTINUE);
-
-        lock_res(res);
-        list_for_each_safe(tmp, next, &res->lr_granted) {
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (iter(lock, closure) == LDLM_ITER_STOP)
-                        GOTO(out, rc = LDLM_ITER_STOP);
-        }
-
-        list_for_each_safe(tmp, next, &res->lr_converting) {
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (iter(lock, closure) == LDLM_ITER_STOP)
-                        GOTO(out, rc = LDLM_ITER_STOP);
-        }
-
-        list_for_each_safe(tmp, next, &res->lr_waiting) {
-                lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-
-                if (iter(lock, closure) == LDLM_ITER_STOP)
-                        GOTO(out, rc = LDLM_ITER_STOP);
-        }
- out:
-        unlock_res(res);
-        RETURN(rc);
-}
-
-struct iter_helper_data {
-        ldlm_iterator_t iter;
-        void *closure;
-};
-
-static int ldlm_iter_helper(struct ldlm_lock *lock, void *closure)
-{
-        struct iter_helper_data *helper = closure;
-        return helper->iter(lock, helper->closure);
-}
-
-static int ldlm_res_iter_helper(struct ldlm_resource *res, void *closure)
-{
-        return ldlm_resource_foreach(res, ldlm_iter_helper, closure);
-}
-
-int ldlm_namespace_foreach(struct ldlm_namespace *ns, ldlm_iterator_t iter,
-                           void *closure)
-{
-        struct iter_helper_data helper = { iter: iter, closure: closure };
-        return ldlm_namespace_foreach_res(ns, ldlm_res_iter_helper, &helper);
-}
-
-int ldlm_namespace_foreach_res(struct ldlm_namespace *ns,
-                               ldlm_res_iterator_t iter, void *closure)
-{
-        int i, rc = LDLM_ITER_CONTINUE;
-        struct ldlm_resource *res;
-        struct list_head *tmp;
-
-        ENTRY;
-        spin_lock(&ns->ns_hash_lock);
-        for (i = 0; i < RES_HASH_SIZE; i++) {
-                tmp = ns->ns_hash[i].next;
-                while (tmp != &(ns->ns_hash[i])) {
-                        res = list_entry(tmp, struct ldlm_resource, lr_hash);
-                        ldlm_resource_getref(res);
-                        spin_unlock(&ns->ns_hash_lock);
-
-                        rc = iter(res, closure);
-
-                        spin_lock(&ns->ns_hash_lock);
-                        tmp = tmp->next;
-                        ldlm_resource_putref_locked(res);
-                        if (rc == LDLM_ITER_STOP)
-                                GOTO(out, rc);
-                }
-        }
- out:
-        spin_unlock(&ns->ns_hash_lock);
-        RETURN(rc);
-}
-
-/* non-blocking function to manipulate a lock whose cb_data is being put away.*/
-void ldlm_resource_iterate(struct ldlm_namespace *ns, struct ldlm_res_id *res_id,
-                           ldlm_iterator_t iter, void *data)
-{
-        struct ldlm_resource *res;
-        ENTRY;
-
-        if (ns == NULL) {
-                CERROR("must pass in namespace\n");
-                LBUG();
-        }
-
-        res = ldlm_resource_get(ns, NULL, *res_id, 0, 0);
-        if (res == NULL) {
-                EXIT;
-                return;
-        }
-
-        ldlm_resource_foreach(res, iter, data);
-        ldlm_resource_putref(res);
-        EXIT;
-}
-
-/* Lock replay */
-
-static int ldlm_chain_lock_for_replay(struct ldlm_lock *lock, void *closure)
-{
-        struct list_head *list = closure;
-
-        /* we use l_pending_chain here, because it's unused on clients. */
-        LASSERTF(list_empty(&lock->l_pending_chain),"lock %p next %p prev %p\n",
-                 lock, &lock->l_pending_chain.next,&lock->l_pending_chain.prev);
-        /* bug 9573: don't replay locks left after eviction */
-        if (!(lock->l_flags & LDLM_FL_FAILED))
-                list_add(&lock->l_pending_chain, list);
-        return LDLM_ITER_CONTINUE;
-}
-
-static int replay_lock_interpret(struct ptlrpc_request *req,
-                                 struct ldlm_async_args *aa, int rc)
-{
-        struct ldlm_lock *lock;
-        struct ldlm_reply *reply;
-
-        ENTRY;
-        atomic_dec(&req->rq_import->imp_replay_inflight);
-        if (rc != ELDLM_OK)
-                GOTO(out, rc);
-
-
-        reply = lustre_swab_repbuf(req, DLM_LOCKREPLY_OFF, sizeof(*reply),
-                                   lustre_swab_ldlm_reply);
-        if (reply == NULL) {
-                CERROR("Can't unpack ldlm_reply\n");
-                GOTO (out, rc = -EPROTO);
-        }
-
-        lock = ldlm_handle2lock(&aa->lock_handle);
-        if (!lock) {
-                CERROR("received replay ack for unknown local cookie "LPX64
-                       " remote cookie "LPX64 " from server %s id %s\n",
-                       aa->lock_handle.cookie, reply->lock_handle.cookie,
-                       req->rq_export->exp_client_uuid.uuid,
-                       libcfs_id2str(req->rq_peer));
-                GOTO(out, rc = -ESTALE);
-        }
-
-        lock->l_remote_handle = reply->lock_handle;
-        LDLM_DEBUG(lock, "replayed lock:");
-        ptlrpc_import_recovery_state_machine(req->rq_import);
-        LDLM_LOCK_PUT(lock);
-out:
-        if (rc != ELDLM_OK)
-                ptlrpc_connect_import(req->rq_import, NULL);
-
-
-        RETURN(rc);
-}
-
-static int replay_one_lock(struct obd_import *imp, struct ldlm_lock *lock)
-{
-        struct ptlrpc_request *req;
-        struct ldlm_request *body;
-        struct ldlm_reply *reply;
-        struct ldlm_async_args *aa;
-        int buffers = 2;
-        int size[3] = { sizeof(struct ptlrpc_body) };
-        int flags;
-        ENTRY;
-
-
-        /* Bug 11974: Do not replay a lock which is actively being canceled */
-        if (lock->l_flags & LDLM_FL_CANCELING) {
-                LDLM_DEBUG(lock, "Not replaying canceled lock:");
-                RETURN(0);
-        }
-
-        /* If this is reply-less callback lock, we cannot replay it, since
-         * server might have long dropped it, but notification of that event was
-         * lost by network. (and server granted conflicting lock already) */
-        if (lock->l_flags & LDLM_FL_CANCEL_ON_BLOCK) {
-                LDLM_DEBUG(lock, "Not replaying reply-less lock:");
-                ldlm_lock_cancel(lock);
-                RETURN(0);
-        }
-        /*
-         * If granted mode matches the requested mode, this lock is granted.
-         *
-         * If they differ, but we have a granted mode, then we were granted
-         * one mode and now want another: ergo, converting.
-         *
-         * If we haven't been granted anything and are on a resource list,
-         * then we're blocked/waiting.
-         *
-         * If we haven't been granted anything and we're NOT on a resource list,
-         * then we haven't got a reply yet and don't have a known disposition.
-         * This happens whenever a lock enqueue is the request that triggers
-         * recovery.
-         */
-        if (lock->l_granted_mode == lock->l_req_mode)
-                flags = LDLM_FL_REPLAY | LDLM_FL_BLOCK_GRANTED;
-        else if (lock->l_granted_mode)
-                flags = LDLM_FL_REPLAY | LDLM_FL_BLOCK_CONV;
-        else if (!list_empty(&lock->l_res_link))
-                flags = LDLM_FL_REPLAY | LDLM_FL_BLOCK_WAIT;
-        else
-                flags = LDLM_FL_REPLAY;
-
-        size[DLM_LOCKREQ_OFF] = sizeof(*body);
-        req = ptlrpc_prep_req(imp, LUSTRE_DLM_VERSION, LDLM_ENQUEUE, 2, size,
-                              NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        /* We're part of recovery, so don't wait for it. */
-        req->rq_send_state = LUSTRE_IMP_REPLAY_LOCKS;
-
-        body = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF, sizeof(*body));
-        ldlm_lock2desc(lock, &body->lock_desc);
-        body->lock_flags = flags;
-
-        ldlm_lock2handle(lock, &body->lock_handle[0]);
-        size[DLM_LOCKREPLY_OFF] = sizeof(*reply);
-        if (lock->l_lvb_len != 0) {
-                buffers = 3;
-                size[DLM_REPLY_REC_OFF] = lock->l_lvb_len;
-        }
-        ptlrpc_req_set_repsize(req, buffers, size);
-
-        LDLM_DEBUG(lock, "replaying lock:");
-
-        atomic_inc(&req->rq_import->imp_replay_inflight);
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct ldlm_async_args *)&req->rq_async_args;
-        aa->lock_handle = body->lock_handle[0];
-        req->rq_interpret_reply = replay_lock_interpret;
-        ptlrpcd_add_req(req);
-
-        RETURN(0);
-}
-
-int ldlm_replay_locks(struct obd_import *imp)
-{
-        struct ldlm_namespace *ns = imp->imp_obd->obd_namespace;
-        struct list_head list;
-        struct ldlm_lock *lock, *next;
-        int rc = 0;
-
-        ENTRY;
-        CFS_INIT_LIST_HEAD(&list);
-
-        LASSERT(atomic_read(&imp->imp_replay_inflight) == 0);
-
-        /* ensure this doesn't fall to 0 before all have been queued */
-        atomic_inc(&imp->imp_replay_inflight);
-
-        (void)ldlm_namespace_foreach(ns, ldlm_chain_lock_for_replay, &list);
-
-        list_for_each_entry_safe(lock, next, &list, l_pending_chain) {
-                list_del_init(&lock->l_pending_chain);
-                if (rc)
-                        continue; /* or try to do the rest? */
-                rc = replay_one_lock(imp, lock);
-        }
-
-        atomic_dec(&imp->imp_replay_inflight);
-
-        RETURN(rc);
-}
diff --git a/lustre/ldlm/ldlm_resource.c b/lustre/ldlm/ldlm_resource.c
deleted file mode 100644
index df5bc2cbd47fe8ce6a9fdeaebc5f714b851ddf1b..0000000000000000000000000000000000000000
--- a/lustre/ldlm/ldlm_resource.c
+++ /dev/null
@@ -1,1061 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Peter Braam <braam@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LDLM
-#ifdef __KERNEL__
-# include <lustre_dlm.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include "ldlm_internal.h"
-
-cfs_mem_cache_t *ldlm_resource_slab, *ldlm_lock_slab;
-
-atomic_t ldlm_srv_namespace_nr = ATOMIC_INIT(0);
-atomic_t ldlm_cli_namespace_nr = ATOMIC_INIT(0);
-
-struct semaphore ldlm_srv_namespace_lock;
-struct list_head ldlm_srv_namespace_list = 
-        CFS_LIST_HEAD_INIT(ldlm_srv_namespace_list);
-
-struct semaphore ldlm_cli_namespace_lock;
-struct list_head ldlm_cli_namespace_list = 
-        CFS_LIST_HEAD_INIT(ldlm_cli_namespace_list);
-
-cfs_proc_dir_entry_t *ldlm_type_proc_dir = NULL;
-cfs_proc_dir_entry_t *ldlm_ns_proc_dir = NULL;
-cfs_proc_dir_entry_t *ldlm_svc_proc_dir = NULL;
-
-#ifdef LPROCFS
-static int ldlm_proc_dump_ns(struct file *file, const char *buffer,
-                             unsigned long count, void *data)
-{
-        ldlm_dump_all_namespaces(LDLM_NAMESPACE_SERVER, D_DLMTRACE);
-        ldlm_dump_all_namespaces(LDLM_NAMESPACE_CLIENT, D_DLMTRACE);
-        RETURN(count);
-}
-
-int ldlm_proc_setup(void)
-{
-        int rc;
-        struct lprocfs_vars list[] = {
-                { "dump_namespaces", NULL, ldlm_proc_dump_ns, NULL },
-                { NULL }};
-        ENTRY;
-        LASSERT(ldlm_ns_proc_dir == NULL);
-
-        ldlm_type_proc_dir = lprocfs_register(OBD_LDLM_DEVICENAME,
-                                              proc_lustre_root,
-                                              NULL, NULL);
-        if (IS_ERR(ldlm_type_proc_dir)) {
-                CERROR("LProcFS failed in ldlm-init\n");
-                rc = PTR_ERR(ldlm_type_proc_dir);
-                GOTO(err, rc);
-        }
-
-        ldlm_ns_proc_dir = lprocfs_register("namespaces",
-                                            ldlm_type_proc_dir,
-                                            NULL, NULL);
-        if (IS_ERR(ldlm_ns_proc_dir)) {
-                CERROR("LProcFS failed in ldlm-init\n");
-                rc = PTR_ERR(ldlm_ns_proc_dir);
-                GOTO(err_type, rc);
-        }
-
-        ldlm_svc_proc_dir = lprocfs_register("services",
-                                            ldlm_type_proc_dir,
-                                            NULL, NULL);
-        if (IS_ERR(ldlm_svc_proc_dir)) {
-                CERROR("LProcFS failed in ldlm-init\n");
-                rc = PTR_ERR(ldlm_svc_proc_dir);
-                GOTO(err_ns, rc);
-        }
-
-        rc = lprocfs_add_vars(ldlm_type_proc_dir, list, NULL);
-
-        RETURN(0);
-
-err_ns:
-        lprocfs_remove(&ldlm_ns_proc_dir);
-err_type:
-        lprocfs_remove(&ldlm_type_proc_dir);
-err:
-        ldlm_svc_proc_dir = NULL;
-        RETURN(rc);
-}
-
-void ldlm_proc_cleanup(void)
-{
-        if (ldlm_svc_proc_dir) 
-                lprocfs_remove(&ldlm_svc_proc_dir);
-
-        if (ldlm_ns_proc_dir) 
-                lprocfs_remove(&ldlm_ns_proc_dir);
-
-        if (ldlm_type_proc_dir)
-                lprocfs_remove(&ldlm_type_proc_dir);
-}
-
-static int lprocfs_rd_lru_size(char *page, char **start, off_t off,
-                               int count, int *eof, void *data)
-{
-        struct ldlm_namespace *ns = data;
-        __u32 *nr = &ns->ns_max_unused;
-
-        if (ns_connect_lru_resize(ns))
-                nr = &ns->ns_nr_unused;
-        return lprocfs_rd_uint(page, start, off, count, eof, nr);
-}
-
-static int lprocfs_wr_lru_size(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct ldlm_namespace *ns = data;
-        char dummy[MAX_STRING_SIZE + 1], *end;
-        unsigned long tmp;
-        int lru_resize;
-
-        dummy[MAX_STRING_SIZE] = '\0';
-        if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
-                return -EFAULT;
-
-        if (count == 6 && memcmp(dummy, "clear", 5) == 0) {
-                CDEBUG(D_DLMTRACE,
-                       "dropping all unused locks from namespace %s\n",
-                       ns->ns_name);
-                if (ns_connect_lru_resize(ns)) {
-                        int canceled, unused  = ns->ns_nr_unused;
-                        
-                        /* Try to cancel all @ns_nr_unused locks. */
-                        canceled = ldlm_cancel_lru(ns, unused, LDLM_SYNC, 
-                                                   LDLM_CANCEL_PASSED);
-                        if (canceled < unused) {
-                                CERROR("not all requested locks are canceled, "
-                                       "requested: %d, canceled: %d\n", unused, 
-                                       canceled);
-                                return -EINVAL;
-                        }
-                } else {
-                        tmp = ns->ns_max_unused;
-                        ns->ns_max_unused = 0;
-                        ldlm_cancel_lru(ns, 0, LDLM_SYNC, LDLM_CANCEL_PASSED);
-                        ns->ns_max_unused = tmp;
-                }
-                return count;
-        }
-
-        tmp = simple_strtoul(dummy, &end, 0);
-        if (dummy == end) {
-                CERROR("invalid value written\n");
-                return -EINVAL;
-        }
-        lru_resize = (tmp == 0);
-        
-        if (ns_connect_lru_resize(ns)) {
-                if (!lru_resize)
-                        ns->ns_max_unused = (unsigned int)tmp;
-                        
-                if (tmp > ns->ns_nr_unused)
-                        tmp = ns->ns_nr_unused;
-                tmp = ns->ns_nr_unused - tmp;
-                
-                CDEBUG(D_DLMTRACE, "changing namespace %s unused locks from %u to %u\n", 
-                       ns->ns_name, ns->ns_nr_unused, (unsigned int)tmp);
-                ldlm_cancel_lru(ns, (unsigned int)tmp, LDLM_ASYNC, LDLM_CANCEL_PASSED);
-                
-                if (!lru_resize) {
-                        CDEBUG(D_DLMTRACE, "disable lru_resize for namespace %s\n", 
-                               ns->ns_name);
-                        ns->ns_connect_flags &= ~OBD_CONNECT_LRU_RESIZE;
-                }
-        } else {
-                CDEBUG(D_DLMTRACE, "changing namespace %s max_unused from %u to %u\n",
-                       ns->ns_name, ns->ns_max_unused, (unsigned int)tmp);
-                ns->ns_max_unused = (unsigned int)tmp;
-                ldlm_cancel_lru(ns, 0, LDLM_ASYNC, LDLM_CANCEL_PASSED);
-                
-                /* Make sure that originally lru resize was supported before 
-                 * turning it on here. */
-                if (lru_resize && 
-                    (ns->ns_orig_connect_flags & OBD_CONNECT_LRU_RESIZE)) {
-                        CDEBUG(D_DLMTRACE, "enable lru_resize for namespace %s\n", 
-                               ns->ns_name);
-                        ns->ns_connect_flags |= OBD_CONNECT_LRU_RESIZE;
-                }
-        }
-        return count;
-}
-
-void ldlm_proc_namespace(struct ldlm_namespace *ns)
-{
-        struct lprocfs_vars lock_vars[2];
-        char lock_name[MAX_STRING_SIZE + 1];
-
-        LASSERT(ns != NULL);
-        LASSERT(ns->ns_name != NULL);
-
-        lock_name[MAX_STRING_SIZE] = '\0';
-
-        memset(lock_vars, 0, sizeof(lock_vars));
-        lock_vars[0].name = lock_name;
-
-        snprintf(lock_name, MAX_STRING_SIZE, "%s/resource_count", ns->ns_name);
-        lock_vars[0].data = &ns->ns_refcount;
-        lock_vars[0].read_fptr = lprocfs_rd_atomic;
-        lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-
-        snprintf(lock_name, MAX_STRING_SIZE, "%s/lock_count", ns->ns_name);
-        lock_vars[0].data = &ns->ns_locks;
-        lock_vars[0].read_fptr = lprocfs_rd_atomic;
-        lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-
-        if (ns_is_client(ns)) {
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/lock_unused_count",
-                         ns->ns_name);
-                lock_vars[0].data = &ns->ns_nr_unused;
-                lock_vars[0].read_fptr = lprocfs_rd_uint;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/lru_size",
-                         ns->ns_name);
-                lock_vars[0].data = ns;
-                lock_vars[0].read_fptr = lprocfs_rd_lru_size;
-                lock_vars[0].write_fptr = lprocfs_wr_lru_size;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-                
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/shrink_thumb",
-                         ns->ns_name);
-                lock_vars[0].data = ns;
-                lock_vars[0].read_fptr = lprocfs_rd_uint;
-                lock_vars[0].write_fptr = lprocfs_wr_uint;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-                
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/lru_max_age",
-                         ns->ns_name);
-                lock_vars[0].data = &ns->ns_max_age;
-                lock_vars[0].read_fptr = lprocfs_rd_uint;
-                lock_vars[0].write_fptr = lprocfs_wr_uint;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-        } else {
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/max_nolock_bytes",
-                         ns->ns_name);
-                lock_vars[0].data = &ns->ns_max_nolock_size;
-                lock_vars[0].read_fptr = lprocfs_rd_uint;
-                lock_vars[0].write_fptr = lprocfs_wr_uint;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/contention_seconds",
-                         ns->ns_name);
-                lock_vars[0].data = &ns->ns_contention_time;
-                lock_vars[0].read_fptr = lprocfs_rd_uint;
-                lock_vars[0].write_fptr = lprocfs_wr_uint;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-
-                snprintf(lock_name, MAX_STRING_SIZE, "%s/contended_locks",
-                         ns->ns_name);
-                lock_vars[0].data = &ns->ns_contended_locks;
-                lock_vars[0].read_fptr = lprocfs_rd_uint;
-                lock_vars[0].write_fptr = lprocfs_wr_uint;
-                lprocfs_add_vars(ldlm_ns_proc_dir, lock_vars, 0);
-        }
-}
-#undef MAX_STRING_SIZE
-#else
-#define ldlm_proc_namespace(ns) do {} while (0)
-#endif /* LPROCFS */
-
-struct ldlm_namespace *ldlm_namespace_new(char *name, ldlm_side_t client, 
-                                          ldlm_appetite_t apt)
-{
-        struct ldlm_namespace *ns = NULL;
-        struct list_head *bucket;
-        int rc, idx, namelen;
-        ENTRY;
-
-        rc = ldlm_get_ref();
-        if (rc) {
-                CERROR("ldlm_get_ref failed: %d\n", rc);
-                RETURN(NULL);
-        }
-
-        OBD_ALLOC_PTR(ns);
-        if (!ns)
-                GOTO(out_ref, NULL);
-
-        OBD_VMALLOC(ns->ns_hash, sizeof(*ns->ns_hash) * RES_HASH_SIZE);
-        if (!ns->ns_hash)
-                GOTO(out_ns, NULL);
-
-        namelen = strlen(name);
-        OBD_ALLOC(ns->ns_name, namelen + 1);
-        if (!ns->ns_name)
-                GOTO(out_hash, NULL);
-
-        ns->ns_shrink_thumb = LDLM_LOCK_SHRINK_THUMB;
-        ns->ns_appetite = apt;
-        strcpy(ns->ns_name, name);
-
-        CFS_INIT_LIST_HEAD(&ns->ns_root_list);
-        ns->ns_refcount = 0;
-        ns->ns_client = client;
-        spin_lock_init(&ns->ns_hash_lock);
-        atomic_set(&ns->ns_locks, 0);
-        ns->ns_resources = 0;
-        cfs_waitq_init(&ns->ns_waitq);
-        ns->ns_max_nolock_size = NS_DEFAULT_MAX_NOLOCK_BYTES;
-        ns->ns_contention_time = NS_DEFAULT_CONTENTION_SECONDS;
-        ns->ns_contended_locks = NS_DEFAULT_CONTENDED_LOCKS;
-
-        for (bucket = ns->ns_hash + RES_HASH_SIZE - 1; bucket >= ns->ns_hash;
-             bucket--)
-                CFS_INIT_LIST_HEAD(bucket);
-
-        CFS_INIT_LIST_HEAD(&ns->ns_unused_list);
-        ns->ns_nr_unused = 0;
-        ns->ns_max_unused = LDLM_DEFAULT_LRU_SIZE;
-        ns->ns_max_age = LDLM_DEFAULT_MAX_ALIVE;
-        spin_lock_init(&ns->ns_unused_lock);
-        ns->ns_orig_connect_flags = 0;
-        ns->ns_connect_flags = 0;
-
-        ldlm_proc_namespace(ns);
-
-        idx = atomic_read(ldlm_namespace_nr(client));
-        
-        rc = ldlm_pool_init(&ns->ns_pool, ns, idx, client);
-        if (rc) {
-                CERROR("Can't initialize lock pool, rc %d\n", rc);
-                GOTO(out_proc, rc);
-        }
-
-        at_init(&ns->ns_at_estimate, ldlm_enqueue_min, 0);
-
-        mutex_down(ldlm_namespace_lock(client));
-        list_add(&ns->ns_list_chain, ldlm_namespace_list(client));
-        atomic_inc(ldlm_namespace_nr(client));
-        mutex_up(ldlm_namespace_lock(client));
-
-        RETURN(ns);
-out_proc:
-        ldlm_namespace_cleanup(ns, 0);
-        OBD_FREE(ns->ns_name, namelen + 1);
-out_hash:
-        OBD_VFREE(ns->ns_hash, sizeof(*ns->ns_hash) * RES_HASH_SIZE);
-out_ns:
-        OBD_FREE_PTR(ns);
-out_ref:
-        ldlm_put_ref(0);
-        RETURN(NULL);
-}
-
-extern struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock);
-
-/* If flags contains FL_LOCAL_ONLY, don't try to tell the server, just cleanup.
- * This is currently only used for recovery, and we make certain assumptions
- * as a result--notably, that we shouldn't cancel locks with refs. -phil
- *
- * Called with the ns_lock held. */
-static void cleanup_resource(struct ldlm_resource *res, struct list_head *q,
-                             int flags)
-{
-        struct list_head *tmp;
-        int rc = 0, client = ns_is_client(res->lr_namespace);
-        int local_only = (flags & LDLM_FL_LOCAL_ONLY);
-        ENTRY;
-
-        
-        do {
-                struct ldlm_lock *lock = NULL;
- 
-                /* first, we look for non-cleaned-yet lock
-                 * all cleaned locks are marked by CLEANED flag */
-                lock_res(res);
-                list_for_each(tmp, q) {
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                        if (lock->l_flags & LDLM_FL_CLEANED) {
-                                lock = NULL;
-                                continue;
-                        }
-                        LDLM_LOCK_GET(lock);
-                        lock->l_flags |= LDLM_FL_CLEANED;
-                        break;
-                }
-                
-                if (lock == NULL) {
-                        unlock_res(res);
-                        break;
-                }
-
-                /* Set CBPENDING so nothing in the cancellation path
-                 * can match this lock */
-                lock->l_flags |= LDLM_FL_CBPENDING;
-                lock->l_flags |= LDLM_FL_FAILED;
-                lock->l_flags |= flags;
-
-                /* ... without sending a CANCEL message for local_only. */
-                if (local_only)
-                        lock->l_flags |= LDLM_FL_LOCAL_ONLY;
-
-                if (local_only && (lock->l_readers || lock->l_writers)) {
-                        /* This is a little bit gross, but much better than the
-                         * alternative: pretend that we got a blocking AST from
-                         * the server, so that when the lock is decref'd, it
-                         * will go away ... */
-                        unlock_res(res);
-                        LDLM_DEBUG(lock, "setting FL_LOCAL_ONLY");
-                        if (lock->l_completion_ast)
-                                lock->l_completion_ast(lock, 0, NULL);
-                        LDLM_LOCK_PUT(lock);
-                        continue;
-                }
-
-                if (client) {
-                        struct lustre_handle lockh;
-
-                        unlock_res(res);
-                        ldlm_lock2handle(lock, &lockh);
-                        rc = ldlm_cli_cancel(&lockh);
-                        if (rc)
-                                CERROR("ldlm_cli_cancel: %d\n", rc);
-                } else {
-                        ldlm_resource_unlink_lock(lock);
-                        unlock_res(res);
-                        LDLM_DEBUG(lock, "Freeing a lock still held by a "
-                                   "client node");
-                        ldlm_lock_destroy(lock);
-                }
-                LDLM_LOCK_PUT(lock);
-        } while (1);
-
-        EXIT;
-}
-
-int ldlm_namespace_cleanup(struct ldlm_namespace *ns, int flags)
-{
-        struct list_head *tmp;
-        int i;
-
-        if (ns == NULL) {
-                CDEBUG(D_INFO, "NULL ns, skipping cleanup\n");
-                return ELDLM_OK;
-        }
-
-        for (i = 0; i < RES_HASH_SIZE; i++) {
-                spin_lock(&ns->ns_hash_lock);
-                tmp = ns->ns_hash[i].next;
-                while (tmp != &(ns->ns_hash[i])) {
-                        struct ldlm_resource *res;
-                        res = list_entry(tmp, struct ldlm_resource, lr_hash);
-                        ldlm_resource_getref(res);
-                        spin_unlock(&ns->ns_hash_lock);
-
-                        cleanup_resource(res, &res->lr_granted, flags);
-                        cleanup_resource(res, &res->lr_converting, flags);
-                        cleanup_resource(res, &res->lr_waiting, flags);
-
-                        spin_lock(&ns->ns_hash_lock);
-                        tmp  = tmp->next;
-
-                        /* XXX: former stuff caused issues in case of race
-                         * between ldlm_namespace_cleanup() and lockd() when
-                         * client gets blocking ast when lock gets distracted by
-                         * server. This is 1_4 branch solution, let's see how
-                         * will it behave. */
-                        if (!ldlm_resource_putref_locked(res))
-                                CDEBUG(D_INFO,
-                                       "Namespace %s resource refcount nonzero "
-                                       "(%d) after lock cleanup; forcing cleanup.\n",
-                                       ns->ns_name, atomic_read(&res->lr_refcount));
-                }
-                spin_unlock(&ns->ns_hash_lock);
-        }
-
-        return ELDLM_OK;
-}
-
-int ldlm_namespace_free_prior(struct ldlm_namespace *ns)
-{
-        ENTRY;
-        if (!ns)
-                RETURN(ELDLM_OK);
-
-        mutex_down(ldlm_namespace_lock(ns->ns_client));
-        /*
-         * Some asserts and possibly other parts of code still using 
-         * list_empty(&ns->ns_list_chain). This is why it is important
-         * to use list_del_init() here.
-         */
-        list_del_init(&ns->ns_list_chain);
-        atomic_dec(ldlm_namespace_nr(ns->ns_client));
-        ldlm_pool_fini(&ns->ns_pool);
-        mutex_up(ldlm_namespace_lock(ns->ns_client));
-
-        /* At shutdown time, don't call the cancellation callback */
-        ldlm_namespace_cleanup(ns, 0);
-
-        if (ns->ns_refcount > 0) {
-                struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
-                int rc;
-                CDEBUG(D_DLMTRACE,
-                       "dlm namespace %s free waiting on refcount %d\n",
-                       ns->ns_name, ns->ns_refcount);
-                rc = l_wait_event(ns->ns_waitq,
-                                  ns->ns_refcount == 0, &lwi);
-                if (ns->ns_refcount)
-                        LCONSOLE_ERROR_MSG(0x139, "Lock manager: wait for %s "
-                                           "namespace cleanup aborted with %d "
-                                           "resources in use. (%d)\nI'm going "
-                                           "to try to clean up anyway, but I "
-                                           "might need a reboot of this node.\n",
-                                            ns->ns_name, (int) ns->ns_refcount, 
-                                            rc);
-                CDEBUG(D_DLMTRACE,
-                       "dlm namespace %s free done waiting\n", ns->ns_name);
-        }
-
-        RETURN(ELDLM_OK);
-}
-
-int ldlm_namespace_free_post(struct ldlm_namespace *ns, int force)
-{
-        ENTRY;
-        if (!ns)
-                RETURN(ELDLM_OK);
-
-#ifdef LPROCFS
-        {
-                struct proc_dir_entry *dir;
-                dir = lprocfs_srch(ldlm_ns_proc_dir, ns->ns_name);
-                if (dir == NULL) {
-                        CERROR("dlm namespace %s has no procfs dir?\n",
-                               ns->ns_name);
-                } else {
-                        lprocfs_remove(&dir);
-                }
-        }
-#endif
-        OBD_VFREE(ns->ns_hash, sizeof(*ns->ns_hash) * RES_HASH_SIZE);
-        OBD_FREE(ns->ns_name, strlen(ns->ns_name) + 1);
-        /* 
-         * @ns should be not on list in this time, otherwise this will cause
-         * issues realted to using freed @ns in pools thread. 
-         */
-        LASSERT(list_empty(&ns->ns_list_chain));
-        OBD_FREE_PTR(ns);
-        ldlm_put_ref(force);
-        RETURN(ELDLM_OK);
-}
-
-/* Cleanup the resource, and free namespace.
- * bug 12864:
- * Deadlock issue: 
- * proc1: destroy import 
- *        class_disconnect_export(grab cl_sem) -> 
- *              -> ldlm_namespace_free -> 
- *              -> lprocfs_remove(grab _lprocfs_lock).
- * proc2: read proc info
- *        lprocfs_fops_read(grab _lprocfs_lock) ->
- *              -> osc_rd_active, etc(grab cl_sem).
- *
- * So that I have to split the ldlm_namespace_free into two parts - the first
- * part ldlm_namespace_free_prior is used to cleanup the resource which is
- * being used; the 2nd part ldlm_namespace_free_post is used to unregister the
- * lprocfs entries, and then free memory. It will be called w/o cli->cl_sem 
- * held.
- */
-int ldlm_namespace_free(struct ldlm_namespace *ns, int force)
-{
-        ldlm_namespace_free_prior(ns);
-        ldlm_namespace_free_post(ns, force);
-        return ELDLM_OK;
-}
-
-void ldlm_namespace_get_nolock(struct ldlm_namespace *ns)
-{
-        LASSERT(ns->ns_refcount >= 0);
-        ns->ns_refcount++;
-}
-
-void ldlm_namespace_get(struct ldlm_namespace *ns)
-{
-        spin_lock(&ns->ns_hash_lock);
-        ldlm_namespace_get_nolock(ns);
-        spin_unlock(&ns->ns_hash_lock);
-}
-
-void ldlm_namespace_put_nolock(struct ldlm_namespace *ns, int wakeup)
-{
-        LASSERT(ns->ns_refcount > 0);
-        ns->ns_refcount--;
-        if (ns->ns_refcount == 0 && wakeup)
-                wake_up(&ns->ns_waitq);
-}
-
-void ldlm_namespace_put(struct ldlm_namespace *ns, int wakeup)
-{
-        spin_lock(&ns->ns_hash_lock);
-        ldlm_namespace_put_nolock(ns, wakeup);
-        spin_unlock(&ns->ns_hash_lock);
-}
-
-/* Should be called under ldlm_namespace_lock(client) taken */
-void ldlm_namespace_move(struct ldlm_namespace *ns, ldlm_side_t client)
-{
-        LASSERT(!list_empty(&ns->ns_list_chain));
-        LASSERT_SEM_LOCKED(ldlm_namespace_lock(client));
-        list_move_tail(&ns->ns_list_chain, ldlm_namespace_list(client));
-}
-
-/* Should be called under ldlm_namespace_lock(client) taken */
-struct ldlm_namespace *ldlm_namespace_first(ldlm_side_t client)
-{
-        LASSERT_SEM_LOCKED(ldlm_namespace_lock(client));
-        LASSERT(!list_empty(ldlm_namespace_list(client)));
-        return container_of(ldlm_namespace_list(client)->next, 
-                struct ldlm_namespace, ns_list_chain);
-}
-
-static __u32 ldlm_hash_fn(struct ldlm_resource *parent, struct ldlm_res_id name)
-{
-        __u32 hash = 0;
-        int i;
-
-        for (i = 0; i < RES_NAME_SIZE; i++)
-                hash += name.name[i];
-
-        hash += (__u32)((unsigned long)parent >> 4);
-
-        return (hash & RES_HASH_MASK);
-}
-
-static struct ldlm_resource *ldlm_resource_new(void)
-{
-        struct ldlm_resource *res;
-        int idx;
-
-        OBD_SLAB_ALLOC(res, ldlm_resource_slab, CFS_ALLOC_IO, sizeof *res);
-        if (res == NULL)
-                return NULL;
-
-        memset(res, 0, sizeof(*res));
-
-        CFS_INIT_LIST_HEAD(&res->lr_children);
-        CFS_INIT_LIST_HEAD(&res->lr_childof);
-        CFS_INIT_LIST_HEAD(&res->lr_granted);
-        CFS_INIT_LIST_HEAD(&res->lr_converting);
-        CFS_INIT_LIST_HEAD(&res->lr_waiting);
-
-        /* initialize interval trees for each lock mode*/
-        for (idx = 0; idx < LCK_MODE_NUM; idx++) {
-                res->lr_itree[idx].lit_size = 0;
-                res->lr_itree[idx].lit_mode = 1 << idx;
-                res->lr_itree[idx].lit_root = NULL;
-        }
-
-        atomic_set(&res->lr_refcount, 1);
-        spin_lock_init(&res->lr_lock);
-
-        /* one who creates the resource must unlock
-         * the semaphore after lvb initialization */
-        init_MUTEX_LOCKED(&res->lr_lvb_sem);
-
-        return res;
-}
-
-/* must be called with hash lock held */
-static struct ldlm_resource *
-ldlm_resource_find(struct ldlm_namespace *ns, struct ldlm_res_id name, __u32 hash)
-{
-        struct list_head *bucket, *tmp;
-        struct ldlm_resource *res;
-
-        LASSERT_SPIN_LOCKED(&ns->ns_hash_lock);
-        bucket = ns->ns_hash + hash;
-
-        list_for_each(tmp, bucket) {
-                res = list_entry(tmp, struct ldlm_resource, lr_hash);
-                if (memcmp(&res->lr_name, &name, sizeof(res->lr_name)) == 0)
-                        return res;
-        }
-
-        return NULL;
-}
-
-/* Args: locked namespace
- * Returns: newly-allocated, referenced, unlocked resource */
-static struct ldlm_resource *
-ldlm_resource_add(struct ldlm_namespace *ns, struct ldlm_resource *parent,
-                  struct ldlm_res_id name, __u32 hash, ldlm_type_t type)
-{
-        struct list_head *bucket;
-        struct ldlm_resource *res, *old_res;
-        ENTRY;
-
-        LASSERTF(type >= LDLM_MIN_TYPE && type < LDLM_MAX_TYPE,
-                 "type: %d\n", type);
-
-        res = ldlm_resource_new();
-        if (!res)
-                RETURN(NULL);
-
-        res->lr_name = name;
-        res->lr_namespace = ns;
-        res->lr_type = type;
-        res->lr_most_restr = LCK_NL;
-
-        spin_lock(&ns->ns_hash_lock);
-        old_res = ldlm_resource_find(ns, name, hash);
-        if (old_res) {
-                /* someone won the race and added the resource before */
-                ldlm_resource_getref(old_res);
-                spin_unlock(&ns->ns_hash_lock);
-                OBD_SLAB_FREE(res, ldlm_resource_slab, sizeof *res);
-                /* synchronize WRT resource creation */
-                if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) {
-                        down(&old_res->lr_lvb_sem);
-                        up(&old_res->lr_lvb_sem);
-                }
-                RETURN(old_res);
-        }
-
-        /* we won! let's add the resource */
-        bucket = ns->ns_hash + hash;
-        list_add(&res->lr_hash, bucket);
-        ns->ns_resources++;
-        ldlm_namespace_get_nolock(ns);
-
-        if (parent == NULL) {
-                list_add(&res->lr_childof, &ns->ns_root_list);
-        } else {
-                res->lr_parent = parent;
-                list_add(&res->lr_childof, &parent->lr_children);
-        }
-        spin_unlock(&ns->ns_hash_lock);
-
-        if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) {
-                int rc;
-
-                OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_CREATE_RESOURCE, 2);
-                rc = ns->ns_lvbo->lvbo_init(res);
-                if (rc)
-                        CERROR("lvbo_init failed for resource "
-                               LPU64": rc %d\n", name.name[0], rc);
-                /* we create resource with locked lr_lvb_sem */
-                up(&res->lr_lvb_sem);
-        }
-
-        RETURN(res);
-}
-
-/* Args: unlocked namespace
- * Locks: takes and releases ns->ns_lock and res->lr_lock
- * Returns: referenced, unlocked ldlm_resource or NULL */
-struct ldlm_resource *
-ldlm_resource_get(struct ldlm_namespace *ns, struct ldlm_resource *parent,
-                  struct ldlm_res_id name, ldlm_type_t type, int create)
-{
-        __u32 hash = ldlm_hash_fn(parent, name);
-        struct ldlm_resource *res = NULL;
-        ENTRY;
-
-        LASSERT(ns != NULL);
-        LASSERT(ns->ns_hash != NULL);
-        LASSERT(name.name[0] != 0);
-
-        spin_lock(&ns->ns_hash_lock);
-        res = ldlm_resource_find(ns, name, hash);
-        if (res) {
-                ldlm_resource_getref(res);
-                spin_unlock(&ns->ns_hash_lock);
-                /* synchronize WRT resource creation */
-                if (ns->ns_lvbo && ns->ns_lvbo->lvbo_init) {
-                        down(&res->lr_lvb_sem);
-                        up(&res->lr_lvb_sem);
-                }
-                RETURN(res);
-        }
-        spin_unlock(&ns->ns_hash_lock);
-
-        if (create == 0)
-                RETURN(NULL);
-
-        res = ldlm_resource_add(ns, parent, name, hash, type);
-        RETURN(res);
-}
-
-struct ldlm_resource *ldlm_resource_getref(struct ldlm_resource *res)
-{
-        LASSERT(res != NULL);
-        LASSERT(res != LP_POISON);
-        atomic_inc(&res->lr_refcount);
-        CDEBUG(D_INFO, "getref res: %p count: %d\n", res,
-               atomic_read(&res->lr_refcount));
-        return res;
-}
-
-void __ldlm_resource_putref_final(struct ldlm_resource *res)
-{
-        struct ldlm_namespace *ns = res->lr_namespace;
-
-        LASSERT_SPIN_LOCKED(&ns->ns_hash_lock);
-
-        if (!list_empty(&res->lr_granted)) {
-                ldlm_resource_dump(D_ERROR, res);
-                LBUG();
-        }
-
-        if (!list_empty(&res->lr_converting)) {
-                ldlm_resource_dump(D_ERROR, res);
-                LBUG();
-        }
-
-        if (!list_empty(&res->lr_waiting)) {
-                ldlm_resource_dump(D_ERROR, res);
-                LBUG();
-        }
-
-        if (!list_empty(&res->lr_children)) {
-                ldlm_resource_dump(D_ERROR, res);
-                LBUG();
-        }
-
-        /* Pass 0 as second argument to not wake up ->ns_waitq yet, will do it
-         * later. */
-        ldlm_namespace_put_nolock(ns, 0);
-        list_del_init(&res->lr_hash);
-        list_del_init(&res->lr_childof);
-
-        ns->ns_resources--;
-        if (ns->ns_resources == 0)
-                wake_up(&ns->ns_waitq);
-}
-
-/* Returns 1 if the resource was freed, 0 if it remains. */
-int ldlm_resource_putref(struct ldlm_resource *res)
-{
-        struct ldlm_namespace *ns = res->lr_namespace;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_INFO, "putref res: %p count: %d\n", res,
-               atomic_read(&res->lr_refcount) - 1);
-        LASSERTF(atomic_read(&res->lr_refcount) > 0, "%d",
-                 atomic_read(&res->lr_refcount));
-        LASSERTF(atomic_read(&res->lr_refcount) < LI_POISON, "%d",
-                 atomic_read(&res->lr_refcount));
-
-        if (atomic_dec_and_lock(&res->lr_refcount, &ns->ns_hash_lock)) {
-                __ldlm_resource_putref_final(res);
-                spin_unlock(&ns->ns_hash_lock);
-                if (res->lr_lvb_data)
-                        OBD_FREE(res->lr_lvb_data, res->lr_lvb_len);
-                OBD_SLAB_FREE(res, ldlm_resource_slab, sizeof *res);
-                rc = 1;
-        }
-
-        RETURN(rc);
-}
-
-/* Returns 1 if the resource was freed, 0 if it remains. */
-int ldlm_resource_putref_locked(struct ldlm_resource *res)
-{
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_INFO, "putref res: %p count: %d\n", res,
-               atomic_read(&res->lr_refcount) - 1);
-        LASSERT(atomic_read(&res->lr_refcount) > 0);
-        LASSERT(atomic_read(&res->lr_refcount) < LI_POISON);
-
-        LASSERT(atomic_read(&res->lr_refcount) >= 0);
-        if (atomic_dec_and_test(&res->lr_refcount)) {
-                __ldlm_resource_putref_final(res);
-                if (res->lr_lvb_data)
-                        OBD_FREE(res->lr_lvb_data, res->lr_lvb_len);
-                OBD_SLAB_FREE(res, ldlm_resource_slab, sizeof *res);
-                rc = 1;
-        }
-
-        RETURN(rc);
-}
-
-void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head,
-                            struct ldlm_lock *lock)
-{
-        check_res_locked(res);
-
-        ldlm_resource_dump(D_OTHER, res);
-        CDEBUG(D_OTHER, "About to add this lock:\n");
-        ldlm_lock_dump(D_OTHER, lock, 0);
-
-        if (lock->l_destroyed) {
-                CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n");
-                return;
-        }
-
-        LASSERT(list_empty(&lock->l_res_link));
-
-        list_add_tail(&lock->l_res_link, head);
-}
-
-void ldlm_resource_insert_lock_after(struct ldlm_lock *original,
-                                     struct ldlm_lock *new)
-{
-        struct ldlm_resource *res = original->l_resource;
-
-        check_res_locked(res);
-
-        ldlm_resource_dump(D_OTHER, res);
-        CDEBUG(D_OTHER, "About to insert this lock after %p:\n", original);
-        ldlm_lock_dump(D_OTHER, new, 0);
-
-        if (new->l_destroyed) {
-                CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n");
-                goto out;
-        }
-
-        LASSERT(list_empty(&new->l_res_link));
-
-        list_add(&new->l_res_link, &original->l_res_link);
- out:;
-}
-
-void ldlm_resource_unlink_lock(struct ldlm_lock *lock)
-{
-        int type = lock->l_resource->lr_type;
-
-        check_res_locked(lock->l_resource);
-        if (type == LDLM_IBITS || type == LDLM_PLAIN)
-                ldlm_unlink_lock_skiplist(lock);
-        else if (type == LDLM_EXTENT)
-                ldlm_extent_unlink_lock(lock);
-        list_del_init(&lock->l_res_link);
-}
-
-void ldlm_res2desc(struct ldlm_resource *res, struct ldlm_resource_desc *desc)
-{
-        desc->lr_type = res->lr_type;
-        desc->lr_name = res->lr_name;
-}
-
-void ldlm_dump_all_namespaces(ldlm_side_t client, int level)
-{
-        struct list_head *tmp;
-
-        if (!((libcfs_debug | D_ERROR) & level))
-                return;
-
-        mutex_down(ldlm_namespace_lock(client));
-
-        list_for_each(tmp, ldlm_namespace_list(client)) {
-                struct ldlm_namespace *ns;
-                ns = list_entry(tmp, struct ldlm_namespace, ns_list_chain);
-                ldlm_namespace_dump(level, ns);
-        }
-
-        mutex_up(ldlm_namespace_lock(client));
-}
-
-void ldlm_namespace_dump(int level, struct ldlm_namespace *ns)
-{
-        struct list_head *tmp;
-
-        if (!((libcfs_debug | D_ERROR) & level))
-                return;
-
-        CDEBUG(level, "--- Namespace: %s (rc: %d, side: %s)\n", 
-               ns->ns_name, ns->ns_refcount, 
-               ns_is_client(ns) ? "client" : "server");
-
-        if (cfs_time_before(cfs_time_current(), ns->ns_next_dump))
-                return;
-
-        spin_lock(&ns->ns_hash_lock);
-        tmp = ns->ns_root_list.next;
-        while (tmp != &ns->ns_root_list) {
-                struct ldlm_resource *res;
-                res = list_entry(tmp, struct ldlm_resource, lr_childof);
-
-                ldlm_resource_getref(res);
-                spin_unlock(&ns->ns_hash_lock);
-
-                lock_res(res);
-                ldlm_resource_dump(level, res);
-                unlock_res(res);
-                
-                spin_lock(&ns->ns_hash_lock);
-                tmp = tmp->next;
-                ldlm_resource_putref_locked(res);
-        }
-        ns->ns_next_dump = cfs_time_shift(10);
-        spin_unlock(&ns->ns_hash_lock);
-}
-
-void ldlm_resource_dump(int level, struct ldlm_resource *res)
-{
-        struct list_head *tmp;
-        int pos;
-
-        CLASSERT(RES_NAME_SIZE == 4);
-
-        if (!((libcfs_debug | D_ERROR) & level))
-                return;
-
-        CDEBUG(level, "--- Resource: %p ("LPU64"/"LPU64"/"LPU64"/"LPU64
-               ") (rc: %d)\n", res, res->lr_name.name[0], res->lr_name.name[1],
-               res->lr_name.name[2], res->lr_name.name[3],
-               atomic_read(&res->lr_refcount));
-
-        if (!list_empty(&res->lr_granted)) {
-                pos = 0;
-                CDEBUG(level, "Granted locks:\n");
-                list_for_each(tmp, &res->lr_granted) {
-                        struct ldlm_lock *lock;
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                        ldlm_lock_dump(level, lock, ++pos);
-                }
-        }
-        if (!list_empty(&res->lr_converting)) {
-                pos = 0;
-                CDEBUG(level, "Converting locks:\n");
-                list_for_each(tmp, &res->lr_converting) {
-                        struct ldlm_lock *lock;
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                        ldlm_lock_dump(level, lock, ++pos);
-                }
-        }
-        if (!list_empty(&res->lr_waiting)) {
-                pos = 0;
-                CDEBUG(level, "Waiting locks:\n");
-                list_for_each(tmp, &res->lr_waiting) {
-                        struct ldlm_lock *lock;
-                        lock = list_entry(tmp, struct ldlm_lock, l_res_link);
-                        ldlm_lock_dump(level, lock, ++pos);
-                }
-        }
-}
diff --git a/lustre/liblustre/.cvsignore b/lustre/liblustre/.cvsignore
deleted file mode 100644
index fb1a186e8b734dbc81811f00d04e746ce3ad212a..0000000000000000000000000000000000000000
--- a/lustre/liblustre/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-Makefile.in
-.deps
-TAGS
-libtest
diff --git a/lustre/liblustre/Makefile.am b/lustre/liblustre/Makefile.am
deleted file mode 100644
index cf60902e3e8da2ace74c3468c73f6e4d71efadba..0000000000000000000000000000000000000000
--- a/lustre/liblustre/Makefile.am
+++ /dev/null
@@ -1,69 +0,0 @@
-## Liblustre excecutables & libraries Makefile
-SUBDIRS = . tests
-
-AM_CPPFLAGS = $(HAVE_EFENCE) -I$(SYSIO)/include -D_LARGEFILE64_SOURCE=1 \
-              $(LLCPPFLAGS) -I$(top_srcdir)/lnet/ulnds
-AM_CFLAGS = $(LLCFLAGS)
-
-AM_LIBS = $(LIBEFENCE)
-
-
-
-LUSTRE_LIBS = libllite.a \
-              $(top_builddir)/lustre/lov/liblov.a \
-              $(top_builddir)/lustre/obdecho/libobdecho.a \
-              $(top_builddir)/lustre/osc/libosc.a \
-              $(top_builddir)/lustre/mdc/libmdc.a \
-              $(top_builddir)/lustre/mgc/libmgc.a \
-              $(top_builddir)/lustre/ptlrpc/libptlrpc.a \
-              $(top_builddir)/lustre/obdclass/liblustreclass.a \
-              $(top_builddir)/lustre/lvfs/liblvfs.a
-
-if QUOTA
-QUOTA_LIBS = $(top_builddir)/lustre/quota/libquota.a
-endif
-
-LND_LIBS =
-if BUILD_USOCKLND
-LND_LIBS +=    $(top_builddir)/lnet/ulnds/socklnd/libsocklnd.a
-endif
-if BUILD_UPTLLND
-LND_LIBS +=   $(top_builddir)/lnet/ulnds/ptllnd/libptllnd.a
-endif
-
-LNET_LIBS =   $(top_builddir)/lnet/utils/libuptlctl.a \
-              $(top_builddir)/lnet/lnet/liblnet.a
-
-SYSIO_LIBS =  $(SYSIO)/lib/libsysio.a
-
-if LIBLUSTRE
-lib_LIBRARIES = liblustre.a
-noinst_LIBRARIES = libllite.a
-
-install-exec-hook: liblustre.so
-	@$(NORMAL_INSTALL)
-	$(mkinstalldirs) $(DESTDIR)$(libdir)
-	@list=$< ; for p in $$list; do \
-	  if test -f $$p; then \
-	    f="`echo $$p | sed -e 's|^.*/||'`"; \
-	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
-	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
-	  else :; fi; \
-	done
-else
-install-exec-hook:
-endif
-
-libllite_a_SOURCES = llite_lib.c super.c namei.c rw.c file.c dir.c \
-		     lutil.c lutil.h llite_lib.h
-
-# for make rpms -- need cleanup
-liblustre_a_SOURCES = llite_lib.c super.c namei.c rw.c file.c dir.c \
-		     llite_lib.h
-
-liblustre.a : $(LUSTRE_LIBS) $(LND_LIBS) $(LNET_LIBS) $(SYSIO_LIBS) $(QUOTA_LIBS)
-	sh $(srcdir)/genlib.sh "$(SYSIO)" "$(LIBS)" "$(LND_LIBS)" "$(PTHREAD_LIBS)" "$(QUOTA_LIBS)" "$(CAP_LIBS)" "$(ZLIB)"
-
-EXTRA_DIST = genlib.sh
-
-CLEANFILES := liblsupport.a liblustre.so
diff --git a/lustre/liblustre/dir.c b/lustre/liblustre/dir.c
deleted file mode 100644
index e6788bfe607e69380147c3f84446a1f7c6cfdec1..0000000000000000000000000000000000000000
--- a/lustre/liblustre/dir.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light directory handling
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <unistd.h>
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
-#ifdef HAVE_ASM_TYPES_H
-#include <asm/types.h>
-#elif defined(HAVE_SYS_TYPES_H)
-#include <sys/types.h>
-#endif
-
-#ifdef HAVE_LINUX_UNISTD_H
-#include <linux/unistd.h>
-#elif defined(HAVE_UNISTD_H)
-#include <unistd.h>
-#endif
-
-#include <dirent.h>
-
-#include "llite_lib.h"
-
-static int llu_dir_do_readpage(struct inode *inode, struct page *page)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct ll_fid mdc_fid;
-        __u64 offset;
-        int rc = 0;
-        struct ptlrpc_request *request;
-        struct lustre_handle lockh;
-        struct mds_body *body;
-        struct lookup_intent it = { .it_op = IT_READDIR };
-        struct mdc_op_data data;
-        struct obd_device *obddev = class_exp2obd(sbi->ll_mdc_exp);
-        struct ldlm_res_id res_id =
-                { .name = {st->st_ino, (__u64)lli->lli_st_generation} };
-        ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_UPDATE } };
-        ENTRY;
-
-        rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED,
-                             &res_id, LDLM_IBITS, &policy, LCK_CR, &lockh);
-        if (!rc) {
-                struct ldlm_enqueue_info einfo = {LDLM_IBITS, LCK_CR,
-                        llu_mdc_blocking_ast, ldlm_completion_ast, NULL, inode};
-
-                llu_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0);
-
-                rc = mdc_enqueue(sbi->ll_mdc_exp, &einfo, &it,
-                                 &data, &lockh, NULL, 0,
-                                 LDLM_FL_CANCEL_ON_BLOCK);
-                request = (struct ptlrpc_request *)it.d.lustre.it_data;
-                if (request)
-                        ptlrpc_req_finished(request);
-                if (rc < 0) {
-                        CERROR("lock enqueue: err: %d\n", rc);
-                        RETURN(rc);
-                }
-        }
-        ldlm_lock_dump_handle(D_OTHER, &lockh);
-
-        mdc_pack_fid(&mdc_fid, st->st_ino, lli->lli_st_generation, S_IFDIR);
-
-        offset = (__u64)page->index << CFS_PAGE_SHIFT;
-        rc = mdc_readpage(sbi->ll_mdc_exp, &mdc_fid,
-                          offset, page, &request);
-        if (!rc) {
-                body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*body));
-                LASSERT(body != NULL);         /* checked by mdc_readpage() */
-                /* swabbed by mdc_readpage() */
-                LASSERT(lustre_rep_swabbed(request, REPLY_REC_OFF));
-
-                st->st_size = body->size;
-        } else {
-                CERROR("read_dir_page(%ld) error %d\n", page->index, rc);
-        }
-        ptlrpc_req_finished(request);
-        EXIT;
-
-        ldlm_lock_decref(&lockh, LCK_CR);
-        return rc;
-}
-
-static struct page *llu_dir_read_page(struct inode *ino, unsigned long pgidx)
-{
-        struct page *page;
-        int rc;
-        ENTRY;
-
-        OBD_PAGE_ALLOC(page, 0);
-        if (!page)
-                RETURN(ERR_PTR(-ENOMEM));
-        page->index = pgidx;
-
-        rc = llu_dir_do_readpage(ino, page);
-        if (rc) {
-                OBD_PAGE_FREE(page);
-                RETURN(ERR_PTR(rc));
-        }
-
-        return page;
-}
-
-enum {
-        EXT2_FT_UNKNOWN,
-        EXT2_FT_REG_FILE,
-        EXT2_FT_DIR,
-        EXT2_FT_CHRDEV,
-        EXT2_FT_BLKDEV,
-        EXT2_FT_FIFO,
-        EXT2_FT_SOCK,
-        EXT2_FT_SYMLINK,
-        EXT2_FT_MAX
-};
-
-static unsigned char ext2_filetype_table[EXT2_FT_MAX] = {
-        [EXT2_FT_UNKNOWN]       DT_UNKNOWN,
-        [EXT2_FT_REG_FILE]      DT_REG,
-        [EXT2_FT_DIR]           DT_DIR,
-        [EXT2_FT_CHRDEV]        DT_CHR,
-        [EXT2_FT_BLKDEV]        DT_BLK,
-        [EXT2_FT_FIFO]          DT_FIFO,
-        [EXT2_FT_SOCK]          DT_SOCK,
-        [EXT2_FT_SYMLINK]       DT_LNK,
-};
-
-#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
-#define ROUND_UP64(x)   (((x)+sizeof(__u64)-1) & ~(sizeof(__u64)-1))
-
-static int filldir(char *buf, int buflen,
-                   const char *name, int namelen, loff_t offset,
-                   ino_t ino, unsigned int d_type, int *filled)
-{
-        struct dirent64 *dirent = (struct dirent64 *) (buf + *filled);
-        int reclen = ROUND_UP64(NAME_OFFSET(dirent) + namelen + 1);
-
-        /* check overflow */
-        if ((*filled + reclen) > buflen)
-                return 1;
-
-        dirent->d_ino = ino;
-        dirent->d_off = offset;
-        dirent->d_reclen = reclen;
-#ifndef _AIX
-        dirent->d_type = (unsigned short) d_type;
-#endif
-        memcpy(dirent->d_name, name, namelen);
-        dirent->d_name[namelen] = 0;
-
-        *filled += reclen;
-
-        return 0;
-}
-
-ssize_t llu_iop_filldirentries(struct inode *ino, _SYSIO_OFF_T *basep, 
-			       char *buf, size_t nbytes)
-{
-        struct llu_inode_info *lli = llu_i2info(ino);
-        struct intnl_stat *st = llu_i2stat(ino);
-        loff_t pos = *basep, offset;
-        int filled = 0;
-        unsigned long pgidx, maxpages;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        if (st->st_size == 0) {
-                CWARN("dir size is 0?\n");
-                RETURN(0);
-        }
-
-        if (pos == -1)
-                pos = lli->lli_dir_pos;
-
-        maxpages = (st->st_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-        pgidx = pos >> CFS_PAGE_SHIFT;
-        offset = pos & ~CFS_PAGE_MASK;
-
-        for ( ; pgidx < maxpages ; pgidx++, offset = 0) {
-                struct page *page;
-                struct ext2_dirent *de;
-                char *addr, *limit;
-
-                page = llu_dir_read_page(ino, pgidx);
-                if (IS_ERR(page))
-                        continue;
-
-                /* size might have been updated by mdc_readpage */
-                maxpages = (st->st_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-
-                /* fill in buffer */
-                addr = page->addr;
-                limit = addr + CFS_PAGE_SIZE - EXT2_DIR_REC_LEN(1);
-                de = (struct ext2_dirent *) (addr + offset);
-
-                for ( ; (char*) de <= limit; de = ext2_next_entry(de)) {
-                        if (de->inode) {
-                                int over;
-                                unsigned char d_type = DT_UNKNOWN;
-
-                                if (de->file_type < EXT2_FT_MAX)
-                                        d_type = ext2_filetype_table[de->file_type];
-
-                                offset = (char*) de - addr;
-                                over =  filldir(buf, nbytes, de->name, de->name_len,
-                                                (((__u64)pgidx << CFS_PAGE_SHIFT) | offset)
-                                                + le16_to_cpu(de->rec_len),
-                                                le32_to_cpu(de->inode), d_type, &filled);
-                                if (over) {
-                                        OBD_PAGE_FREE(page);
-                                        /*
-                                         * if buffer overflow with no data
-                                         * returned yet, then report error
-                                         * instead of eof
-                                         */
-                                        if (filled == 0)
-                                                RETURN(-EINVAL);
-
-                                        GOTO(done, 0);
-                                }
-                        }
-                }
-                
-                OBD_PAGE_FREE(page);
-        }
-done:
-        lli->lli_dir_pos = (__u64)pgidx << CFS_PAGE_SHIFT | offset;
-        *basep = lli->lli_dir_pos;
-        liblustre_wait_event(0);
-        RETURN(filled);
-}
diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c
deleted file mode 100644
index bd67c0f87cf7b5ae2b6dbd8efd821b4028f2d7d6..0000000000000000000000000000000000000000
--- a/lustre/liblustre/file.c
+++ /dev/null
@@ -1,521 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light file operations
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/queue.h>
-#include <fcntl.h>
-
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
-#include "llite_lib.h"
-
-/* Pack the required supplementary groups into the supplied groups array.
- * If we don't need to use the groups from the target inode(s) then we
- * instead pack one or more groups from the user's supplementary group
- * array in case it might be useful.  Not needed if doing an MDS-side upcall. */
-void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2)
-{
-        LASSERT(i1 != NULL);
-        LASSERT(suppgids != NULL);
-
-        if (in_group_p(i1->i_stbuf.st_gid))
-                suppgids[0] = i1->i_stbuf.st_gid;
-        else
-                suppgids[0] = -1;
-
-        if (i2) {
-                if (in_group_p(i2->i_stbuf.st_gid))
-                        suppgids[1] = i2->i_stbuf.st_gid;
-                else
-                        suppgids[1] = -1;
-        } else {
-                suppgids[1] = -1;
-        }
-}
-
-void llu_prepare_mdc_op_data(struct mdc_op_data *data,
-                             struct inode *i1,
-                             struct inode *i2,
-                             const char *name,
-                             int namelen,
-                             int mode)
-{
-        LASSERT(i1 != NULL || i2 != NULL);
-
-        if (i1) {
-                ll_i2gids(data->suppgids, i1, i2);
-                ll_inode2fid(&data->fid1, i1);
-        }else {
-                ll_i2gids(data->suppgids, i2, i1);
-                ll_inode2fid(&data->fid1, i2);
-        }
-
-        if (i2)
-                ll_inode2fid(&data->fid2, i2);
-        else
-                memset(&data->fid2, 0, sizeof(data->fid2));
-
-        data->name = name;
-        data->namelen = namelen;
-        data->create_mode = mode;
-        data->mod_time = CURRENT_TIME;
-        data->data = NULL;
-}
-
-void obdo_refresh_inode(struct inode *dst,
-                        struct obdo *src,
-                        obd_flag valid)
-{
-        struct intnl_stat *st = llu_i2stat(dst);
-        valid &= src->o_valid;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE,"valid "LPX64", cur time %lu/%lu, new %lu/%lu\n",
-                       src->o_valid, LTIME_S(st->st_mtime),
-                       LTIME_S(st->st_ctime),
-                       (long)src->o_mtime, (long)src->o_ctime);
-
-        if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(st->st_atime))
-                LTIME_S(st->st_atime) = src->o_atime;
-        
-        /* mtime is always updated with ctime, but can be set in past.
-           As write and utime(2) may happen within 1 second, and utime's
-           mtime has a priority over write's one, leave mtime from mds 
-           for the same ctimes. */
-        if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(st->st_ctime)) {
-                LTIME_S(st->st_ctime) = src->o_ctime;
-                if (valid & OBD_MD_FLMTIME)
-                        LTIME_S(st->st_mtime) = src->o_mtime;
-        }
-        if (valid & OBD_MD_FLSIZE && src->o_size > st->st_size)
-                st->st_size = src->o_size;
-        /* optimum IO size */
-        if (valid & OBD_MD_FLBLKSZ)
-                st->st_blksize = src->o_blksize;
-        /* allocation of space */
-        if (valid & OBD_MD_FLBLOCKS && src->o_blocks > st->st_blocks)
-                st->st_blocks = src->o_blocks;
-}
-
-int llu_local_open(struct llu_inode_info *lli, struct lookup_intent *it)
-{
-        struct ptlrpc_request *req = it->d.lustre.it_data;
-        struct ll_file_data *fd;
-        struct mds_body *body;
-        ENTRY;
-
-        body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);                 /* reply already checked out */
-        /* and swabbed down */
-        LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF));
-
-        /* already opened? */
-        if (lli->lli_open_count++)
-                RETURN(0);
-
-        LASSERT(!lli->lli_file_data);
-
-        OBD_ALLOC(fd, sizeof(*fd));
-        /* We can't handle this well without reorganizing ll_file_open and
-         * ll_mdc_close, so don't even try right now. */
-        LASSERT(fd != NULL);
-
-        memcpy(&fd->fd_mds_och.och_fh, &body->handle, sizeof(body->handle));
-        fd->fd_mds_och.och_magic = OBD_CLIENT_HANDLE_MAGIC;
-        lli->lli_file_data = fd;
-
-        mdc_set_open_replay_data(&fd->fd_mds_och, it->d.lustre.it_data);
-
-        RETURN(0);
-}
-
-int llu_iop_open(struct pnode *pnode, int flags, mode_t mode)
-{
-        struct inode *inode = pnode->p_base->pb_ino;
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct ll_file_data *fd;
-        struct ptlrpc_request *request;
-        struct lookup_intent *it;
-        struct lov_stripe_md *lsm;
-        int rc = 0;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        /* don't do anything for '/' */
-        if (llu_is_root_inode(inode))
-                RETURN(0);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu\n", (long long)st->st_ino);
-        LL_GET_INTENT(inode, it);
-
-        if (!it->d.lustre.it_disposition) {
-                LBUG();
-        }
-
-        rc = it_open_error(DISP_OPEN_OPEN, it);
-        if (rc)
-                GOTO(out_release, rc);
-
-        rc = llu_local_open(lli, it);
-        if (rc)
-                LBUG();
-
-        if (!S_ISREG(st->st_mode))
-                GOTO(out_release, rc = 0);
-
-        fd = lli->lli_file_data;
-
-        lsm = lli->lli_smd;
-        if (lsm == NULL) {
-                if (fd->fd_flags & O_LOV_DELAY_CREATE) {
-                        CDEBUG(D_INODE, "object creation was delayed\n");
-                        GOTO(out_release, rc);
-                }
-        }
-        fd->fd_flags &= ~O_LOV_DELAY_CREATE;
-
-        lli->lli_open_flags = flags & ~(O_CREAT | O_EXCL | O_TRUNC);
-
- out_release:
-        request = it->d.lustre.it_data;
-        ptlrpc_req_finished(request);
-
-        it->it_op_release(it);
-        OBD_FREE(it, sizeof(*it));
-
-        /* libsysio hasn't done anything for O_TRUNC. here we
-         * simply simulate it as open(...); truncate(...); */
-        if (rc == 0 && (flags & O_TRUNC) && S_ISREG(st->st_mode)) {
-                struct iattr attr;
-
-                memset(&attr, 0, sizeof(attr));
-                attr.ia_size = 0;
-                attr.ia_valid |= ATTR_SIZE | ATTR_RAW;
-                rc = llu_setattr_raw(inode, &attr);
-                if (rc)
-                        CERROR("error %d truncate in open()\n", rc);
-        }
-
-        liblustre_wait_event(0);
-        RETURN(rc);
-}
-
-int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
-{
-        struct mds_body *body;
-        struct lov_mds_md *eadata;
-        struct lov_stripe_md *lsm = NULL;
-        struct obd_trans_info oti = { 0 };
-        struct obdo *oa;
-        int rc;
-        ENTRY;
-
-        /* req is swabbed so this is safe */
-        body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, sizeof(*body));
-
-        if (!(body->valid & OBD_MD_FLEASIZE))
-                RETURN(0);
-
-        if (body->eadatasize == 0) {
-                CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        /* The MDS sent back the EA because we unlinked the last reference
-         * to this file. Use this EA to unlink the objects on the OST.
-         * It's opaque so we don't swab here; we leave it to obd_unpackmd() to
-         * check it is complete and sensible. */
-        eadata = lustre_swab_repbuf(request, REPLY_REC_OFF+1, body->eadatasize,
-                                    NULL);
-        LASSERT(eadata != NULL);
-        if (eadata == NULL) {
-                CERROR("Can't unpack MDS EA data\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        rc = obd_unpackmd(llu_i2obdexp(dir), &lsm, eadata,body->eadatasize);
-        if (rc < 0) {
-                CERROR("obd_unpackmd: %d\n", rc);
-                GOTO(out, rc);
-        }
-        LASSERT(rc >= sizeof(*lsm));
-
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                GOTO(out_free_memmd, rc = -ENOMEM);
-
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_mode = body->mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE;
-
-        if (body->valid & OBD_MD_FLCOOKIE) {
-                oa->o_valid |= OBD_MD_FLCOOKIE;
-                oti.oti_logcookies =
-                        lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF + 2,
-                                       sizeof(struct llog_cookie) *
-                                       lsm->lsm_stripe_count);
-                if (oti.oti_logcookies == NULL) {
-                        oa->o_valid &= ~OBD_MD_FLCOOKIE;
-                        body->valid &= ~OBD_MD_FLCOOKIE;
-                }
-        }
-
-        rc = obd_destroy(llu_i2obdexp(dir), oa, lsm, &oti, NULL);
-        OBDO_FREE(oa);
-        if (rc)
-                CERROR("obd destroy objid 0x"LPX64" error %d\n",
-                       lsm->lsm_object_id, rc);
- out_free_memmd:
-        obd_free_memmd(llu_i2obdexp(dir), &lsm);
- out:
-        return rc;
-}
-
-int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct ll_file_data *fd = lli->lli_file_data;
-        struct ptlrpc_request *req = NULL;
-        struct obd_client_handle *och = &fd->fd_mds_och;
-        struct obdo obdo;
-        int rc, valid;
-        ENTRY;
-
-        /* clear group lock, if present */
-        if (fd->fd_flags & LL_FILE_GROUP_LOCKED) {
-                struct lov_stripe_md *lsm = llu_i2info(inode)->lli_smd;
-                fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK);
-                rc = llu_extent_unlock(fd, inode, lsm, LCK_GROUP,
-                                       &fd->fd_cwlockh);
-        }
-
-        obdo.o_id = st->st_ino;
-        obdo.o_valid = OBD_MD_FLID;
-        valid = OBD_MD_FLTYPE | OBD_MD_FLMODE | OBD_MD_FLSIZE |OBD_MD_FLBLOCKS |
-                OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME;
-        if (test_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags))
-                valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
-
-        obdo_from_inode(&obdo, inode, valid);
-
-        if (0 /* ll_is_inode_dirty(inode) */) {
-                obdo.o_flags = MDS_BFLAG_UNCOMMITTED_WRITES;
-                obdo.o_valid |= OBD_MD_FLFLAGS;
-        }
-        rc = mdc_close(mdc_exp, &obdo, och, &req);
-        if (rc == EAGAIN) {
-                /* We are the last writer, so the MDS has instructed us to get
-                 * the file size and any write cookies, then close again. */
-                //ll_queue_done_writing(inode);
-                rc = 0;
-        } else if (rc) {
-                CERROR("inode %llu close failed: rc %d\n",
-                       (long long)st->st_ino, rc);
-        } else {
-                rc = llu_objects_destroy(req, inode);
-                if (rc)
-                        CERROR("inode %llu ll_objects destroy: rc = %d\n",
-                               (long long)st->st_ino, rc);
-        }
-
-        mdc_clear_open_replay_data(och);
-        ptlrpc_req_finished(req);
-        och->och_fh.cookie = DEAD_HANDLE_MAGIC;
-        lli->lli_file_data = NULL;
-        OBD_FREE(fd, sizeof(*fd));
-
-        RETURN(rc);
-}
-
-int llu_file_release(struct inode *inode)
-{
-        struct ll_file_data *fd;
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct llu_inode_info *lli = llu_i2info(inode);
-        int rc = 0, rc2;
-
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu\n",
-               (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation);
-
-        if (llu_is_root_inode(inode))
-                RETURN(0);
-
-        /* still opened by others? */
-        if (--lli->lli_open_count)
-                RETURN(0);
-
-        fd = lli->lli_file_data;
-        if (!fd) /* no process opened the file after an mcreate */
-                RETURN(0);
-
-        rc2 = llu_mdc_close(sbi->ll_mdc_exp, inode);
-        if (rc2 && !rc)
-                rc = rc2;
-
-        RETURN(rc);
-}
-
-/*
- * libsysio require us return 0
- */
-int llu_iop_close(struct inode *inode)
-{
-        int rc;
-        struct ldlm_res_id res_id =
-                { .name = {llu_i2stat(inode)->st_ino,
-                 (__u64)llu_i2info(inode)->lli_st_generation, LDLM_FLOCK} };
-        struct lustre_handle lockh = {0};
-
-        liblustre_wait_event(0);
-
-        /* If we have posix locks on this file - clear all of those */
-        if (ldlm_lock_match(
-                      class_exp2obd(llu_i2mdcexp(inode))->obd_namespace,
-                      LDLM_FL_BLOCK_GRANTED|LDLM_FL_TEST_LOCK|LDLM_FL_CBPENDING,
-                      &res_id, LDLM_FLOCK, NULL, LCK_PR|LCK_PW, &lockh)) {
-                struct file_lock lock;
-                lock.fl_type = F_UNLCK;
-                lock.fl_flags = FL_POSIX;
-                lock.fl_start = 0;
-                lock.fl_end = OFFSET_MAX;
-                lock.fl_pid = getpid();
-                lock.fl_notify = NULL;
-                lock.fl_insert = NULL;
-                lock.fl_remove = NULL;
-                lock.fl_owner = NULL;
-                lock.fl_file = NULL;
-
-                llu_file_flock(inode, F_SETLK, &lock);
-        }
-
-        rc = llu_file_release(inode);
-        if (rc) {
-                CERROR("file close error %d\n", rc);
-        }
-        /* if open count == 0 && stale_flag is set, should we
-         * remove the inode immediately? */
-        liblustre_wait_idle();
-        return 0;
-}
-
-_SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off)
-{
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        if (off < 0 || off > ll_file_maxbytes(ino))
-                RETURN(-EINVAL);
-
-        RETURN(off);
-}
-
-/* this isn't where truncate starts.  roughly:
- * llu_iop_{open,setattr}->llu_setattr_raw->llu_vmtruncate->llu_truncate
- * we grab the lock back in setattr_raw to avoid races. */
-static void llu_truncate(struct inode *inode, obd_flag flags)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct obd_info oinfo = { { { 0 } } };
-        struct obdo oa = { 0 };
-        int rc;
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p) to %llu\n",
-               (long long)st->st_ino, lli->lli_st_generation, inode,
-               (long long)st->st_size);
-
-        if (!lli->lli_smd) {
-                CDEBUG(D_INODE, "truncate on inode %llu with no objects\n",
-                       (long long)st->st_ino);
-                EXIT;
-                return;
-        }
-
-        oinfo.oi_md = lli->lli_smd;
-        oinfo.oi_policy.l_extent.start = st->st_size;
-        oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF;
-        oinfo.oi_oa = &oa;
-        oa.o_id = lli->lli_smd->lsm_object_id;
-        oa.o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS;
-        oa.o_flags = flags; /* We don't actually want to copy inode flags */
- 
-        obdo_from_inode(&oa, inode,
-                        OBD_MD_FLTYPE | OBD_MD_FLMODE | OBD_MD_FLATIME |
-                        OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-
-        obd_adjust_kms(llu_i2obdexp(inode), lli->lli_smd, st->st_size, 1);
-
-        CDEBUG(D_INFO, "calling punch for "LPX64" (all bytes after %Lu)\n",
-               oa.o_id, (long long)st->st_size);
-
-        /* truncate == punch from new size to absolute end of file */
-        rc = obd_punch_rqset(llu_i2obdexp(inode), &oinfo, NULL);
-        if (rc)
-                CERROR("obd_truncate fails (%d) ino %llu\n",
-                       rc, (long long)st->st_ino);
-        else
-                obdo_to_inode(inode, &oa, OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                          OBD_MD_FLATIME | OBD_MD_FLMTIME |
-                                          OBD_MD_FLCTIME);
-
-        EXIT;
-        return;
-} /* llu_truncate */
-
-int llu_vmtruncate(struct inode * inode, loff_t offset, obd_flag flags)
-{
-        llu_i2stat(inode)->st_size = offset;
-
-        /*
-         * llu_truncate() is only called from this
-         * point. llu_vmtruncate/llu_truncate split exists to mimic the
-         * structure of Linux VFS truncate code path.
-         */
-
-        llu_truncate(inode, flags);
-
-        return 0;
-}
diff --git a/lustre/liblustre/genlib.sh b/lustre/liblustre/genlib.sh
deleted file mode 100755
index 8bbecd85d6ced2e560c30470f00f55e406e8cb30..0000000000000000000000000000000000000000
--- a/lustre/liblustre/genlib.sh
+++ /dev/null
@@ -1,112 +0,0 @@
-#!/bin/bash
-#set -xv
-set -e
-
-#
-# This script is to generate lib lustre library as a whole. It will leave
-# two files on current directory: liblustre.a and liblustre.so.
-#
-# Most concern here is the libraries linking order
-#
-# FIXME: How to do this cleanly use makefile?
-#
-
-AR=/usr/bin/ar
-# see http://osdir.com/ml/gmane.comp.gnu.binutils.bugs/2006-01/msg00016.php
-LD=gcc
-RANLIB=/usr/bin/ranlib
-
-CWD=`pwd`
-
-SYSIO=$1
-LIBS=$2
-LND_LIBS=$3
-PTHREAD_LIBS=$4
-QUOTA_LIBS=$5
-CAP_LIBS=$6
-ZLIB=$7
-
-if [ ! -f $SYSIO/lib/libsysio.a ]; then
-  echo "ERROR: $SYSIO/lib/libsysio.a dosen't exist"
-  exit 1
-fi
-
-# do cleanup at first
-rm -f liblustre.so
-
-ALL_OBJS=
-
-build_obj_list() {
-  _objs=`$AR -t $1/$2`
-  for _lib in $_objs; do
-    ALL_OBJS=$ALL_OBJS"$1/$_lib ";
-  done;
-}
-
-#
-# special treatment for libsysio
-#
-sysio_tmp=$CWD/sysio_tmp_`date +%s`
-rm -rf $sysio_tmp
-build_sysio_obj_list() {
-  _objs=`$AR -t $1`
-  mkdir -p $sysio_tmp
-  cd $sysio_tmp
-  $AR -x $1
-  cd ..
-  for _lib in $_objs; do
-    ALL_OBJS=$ALL_OBJS"$sysio_tmp/$_lib ";
-  done
-}
-
-# lustre components libs
-build_obj_list . libllite.a
-build_obj_list ../lov liblov.a
-build_obj_list ../obdecho libobdecho.a
-build_obj_list ../osc libosc.a
-build_obj_list ../mdc libmdc.a
-build_obj_list ../mgc libmgc.a
-build_obj_list ../ptlrpc libptlrpc.a
-build_obj_list ../obdclass liblustreclass.a
-build_obj_list ../lvfs liblvfs.a
-
-# lnet components libs
-build_obj_list ../../lnet/utils libuptlctl.a
-build_obj_list ../../lnet/libcfs libcfs.a
-if $(echo "$LND_LIBS" | grep "socklnd" >/dev/null) ; then
-	build_obj_list ../../lnet/ulnds/socklnd libsocklnd.a
-fi
-if $(echo "$LND_LIBS" | grep "ptllnd" >/dev/null) ; then
-	build_obj_list ../../lnet/ulnds/ptllnd libptllnd.a
-fi
-build_obj_list ../../lnet/lnet liblnet.a
-
-if [ "x$QUOTA_LIBS" != "x" ]; then
-  build_obj_list ../quota libquota.a
-fi
-
-# create static lib lsupport
-rm -f $CWD/liblsupport.a
-$AR -cru $CWD/liblsupport.a $ALL_OBJS
-$RANLIB $CWD/liblsupport.a
-
-# if libsysio is already in our LIBS we don't need to link against it here
-if $(echo "$LIBS" | grep -v -- "-lsysio" >/dev/null) ; then
-  build_sysio_obj_list $SYSIO/lib/libsysio.a
-fi
-
-# create static lib lustre
-rm -f $CWD/liblustre.a
-$AR -cru $CWD/liblustre.a $ALL_OBJS
-$RANLIB $CWD/liblustre.a
-
-# create shared lib lustre
-rm -f $CWD/liblustre.so
-OS=`uname`
-if test x$OS = xAIX; then
-$LD -shared -o $CWD/liblustre.so $ALL_OBJS -lpthread -Xlinker -bnoipath ../../libsyscall.so
-else
-$LD -shared -nostdlib -o $CWD/liblustre.so $ALL_OBJS $CAP_LIBS $PTHREAD_LIBS $ZLIB
-fi
-
-rm -rf $sysio_tmp
diff --git a/lustre/liblustre/llite_lib.c b/lustre/liblustre/llite_lib.c
deleted file mode 100644
index 09d17c342cf927813e4343ecce3d31561ec28524..0000000000000000000000000000000000000000
--- a/lustre/liblustre/llite_lib.c
+++ /dev/null
@@ -1,390 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light common routines
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/queue.h>
-
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-/* both sys/queue.h (libsysio require it) and portals/lists.h have definition
- * of 'LIST_HEAD'. undef it to suppress warnings
- */
-#undef LIST_HEAD
-#include <liblustre.h>
-#include <lnet/lnetctl.h>     /* needed for parse_dump */
-
-#include "lutil.h"
-#include "llite_lib.h"
-
-static int lllib_init(void)
-{
-        if (liblustre_init_current("liblustre") ||
-            init_lib_portals() ||
-            init_obdclass() ||
-            ptlrpc_init() ||
-            mgc_init() ||
-            mdc_init() ||
-            lov_init() ||
-            osc_init())
-                return -1;
-
-        return _sysio_fssw_register("lustre", &llu_fssw_ops);
-}
-
-int liblustre_process_log(struct config_llog_instance *cfg,
-                          char *mgsnid, char *profile,
-                          int allow_recov)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        char  *peer = "MGS_UUID";
-        struct obd_device *obd;
-        struct lustre_handle mgc_conn = {0, };
-        struct obd_export *exp;
-        char  *name = "mgc_dev";
-        class_uuid_t uuid;
-        struct obd_uuid mgc_uuid;
-        struct llog_ctxt *ctxt;
-        lnet_nid_t nid = 0;
-        char *mdsnid;
-        int err, rc = 0;
-        struct obd_connect_data *ocd = NULL;
-        ENTRY;
-
-        ll_generate_random_uuid(uuid);
-        class_uuid_unparse(uuid, &mgc_uuid);
-
-        nid = libcfs_str2nid(mgsnid);
-        if (nid == LNET_NID_ANY) {
-                CERROR("Can't parse NID %s\n", mgsnid);
-                RETURN(-EINVAL);
-        }
-
-        lustre_cfg_bufs_reset(&bufs, NULL);
-        lustre_cfg_bufs_set_string(&bufs, 1, peer);
-        lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs);
-        lcfg->lcfg_nid = nid;
-        rc = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0)
-                GOTO(out, rc);
-
-        lustre_cfg_bufs_reset(&bufs, name);
-        lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MGC_NAME);
-        lustre_cfg_bufs_set_string(&bufs, 2, mgc_uuid.uuid);
-        lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
-        rc = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0)
-                GOTO(out_del_uuid, rc);
-
-        lustre_cfg_bufs_reset(&bufs, name);
-        lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MGS_OBDNAME);
-        lustre_cfg_bufs_set_string(&bufs, 2, peer);
-        lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
-        rc = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0)
-                GOTO(out_detach, rc);
-
-        while ((mdsnid = strsep(&mgsnid, ","))) {
-                nid = libcfs_str2nid(mdsnid);
-                lustre_cfg_bufs_reset(&bufs, NULL);
-                lustre_cfg_bufs_set_string(&bufs, 1, libcfs_nid2str(nid));
-                lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs);
-                lcfg->lcfg_nid = nid;
-                rc = class_process_config(lcfg);
-                lustre_cfg_free(lcfg);
-                if (rc) {
-                        CERROR("Add uuid for %s failed %d\n",
-                               libcfs_nid2str(nid), rc);
-                        continue;
-                }
-
-                lustre_cfg_bufs_reset(&bufs, name);
-                lustre_cfg_bufs_set_string(&bufs, 1, libcfs_nid2str(nid));
-                lcfg = lustre_cfg_new(LCFG_ADD_CONN, &bufs);
-                lcfg->lcfg_nid = nid;
-                rc = class_process_config(lcfg);
-                lustre_cfg_free(lcfg);
-                if (rc) {
-                        CERROR("Add conn for %s failed %d\n",
-                               libcfs_nid2str(nid), rc);
-                        continue;
-                }
-        }
-
-        obd = class_name2obd(name);
-        if (obd == NULL)
-                GOTO(out_cleanup, rc = -EINVAL);
-
-        OBD_ALLOC(ocd, sizeof(*ocd));
-        if (ocd == NULL)
-                GOTO(out_cleanup, rc = -ENOMEM);
-
-        ocd->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_AT;
-#ifdef LIBLUSTRE_POSIX_ACL
-        ocd->ocd_connect_flags |= OBD_CONNECT_ACL;
-#endif
-        ocd->ocd_version = LUSTRE_VERSION_CODE;
-
-        rc = obd_connect(&mgc_conn, obd, &mgc_uuid, ocd, NULL);
-        if (rc) {
-                CERROR("cannot connect to %s at %s: rc = %d\n",
-                       LUSTRE_MGS_OBDNAME, mgsnid, rc);
-                GOTO(out_cleanup, rc);
-        }
-
-        exp = class_conn2export(&mgc_conn);
-
-        ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
-        cfg->cfg_flags |= CFG_F_COMPAT146;
-        rc = class_config_parse_llog(ctxt, profile, cfg);
-        llog_ctxt_put(ctxt);
-        if (rc) {
-                CERROR("class_config_parse_llog failed: rc = %d\n", rc);
-        }
-
-        /* We don't so much care about errors in cleaning up the config llog
-         * connection, as we have already read the config by this point. */
-        err = obd_disconnect(exp);
-        if (err)
-                CERROR("obd_disconnect failed: rc = %d\n", err);
-
-out_cleanup:
-        if (ocd)
-                OBD_FREE(ocd, sizeof(*ocd));
-
-        lustre_cfg_bufs_reset(&bufs, name);
-        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err)
-                CERROR("mdc_cleanup failed: rc = %d\n", err);
-
-out_detach:
-        lustre_cfg_bufs_reset(&bufs, name);
-        lcfg = lustre_cfg_new(LCFG_DETACH, &bufs);
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err)
-                CERROR("mdc_detach failed: rc = %d\n", err);
-
-out_del_uuid:
-        lustre_cfg_bufs_reset(&bufs, name);
-        lustre_cfg_bufs_set_string(&bufs, 1, peer);
-        lcfg = lustre_cfg_new(LCFG_DEL_UUID, &bufs);
-        err = class_process_config(lcfg);
-        if (err)
-                CERROR("del MDC UUID failed: rc = %d\n", err);
-        lustre_cfg_free(lcfg);
-out:
-
-        RETURN(rc);
-}
-
-/* parse host:/fsname string */
-int ll_parse_mount_target(const char *target, char **mgsnid,
-                          char **fsname)
-{
-        static char buf[256];
-        char *s;
-
-        buf[255] = 0;
-        strncpy(buf, target, 255);
-
-        if ((s = strchr(buf, ':'))) {
-                *mgsnid = buf;
-                *s = '\0';
-
-                while (*++s == '/')
-                        ;
-                sprintf(s + strlen(s), "-client");
-                *fsname = s;
-
-                return 0;
-        }
-
-        return -1;
-}
-
-/*
- * early liblustre init
- * called from C startup in catamount apps, before main()
- *
- * The following is a skeleton sysio startup sequence,
- * as implemented in C startup (skipping error handling).
- * In this framework none of these calls need be made here
- * or in the apps themselves.  The NAMESPACE_STRING specifying
- * the initial set of fs ops (creates, mounts, etc.) is passed
- * as an environment variable.
- *
- *      _sysio_init();
- *      _sysio_incore_init();
- *      _sysio_native_init();
- *      _sysio_lustre_init();
- *      _sysio_boot(NAMESPACE_STRING);
- *
- * the name _sysio_lustre_init() follows the naming convention
- * established in other fs drivers from libsysio:
- *  _sysio_incore_init(), _sysio_native_init()
- *
- * _sysio_lustre_init() must be called before _sysio_boot()
- * to enable libsysio's processing of namespace init strings containing
- * lustre filesystem operations
- */
-int _sysio_lustre_init(void)
-{
-        int err;
-        char *envstr;
-#ifndef INIT_SYSIO
-        extern void __liblustre_cleanup_(void);
-#endif
-
-        liblustre_init_random();
-
-        err = lllib_init();
-        if (err) {
-                perror("init llite driver");
-                return err;
-        }
-
-        envstr = getenv("LIBLUSTRE_TIMEOUT");
-        if (envstr != NULL) {
-                obd_timeout = (unsigned int)strtol(envstr, NULL, 0);
-                printf("LibLustre: obd timeout=%u seconds\n",
-                        obd_timeout);
-        }
-
-        /* debug peer on timeout? */
-        envstr = getenv("LIBLUSTRE_DEBUG_PEER_ON_TIMEOUT");
-        if (envstr != NULL) {
-                obd_debug_peer_on_timeout = 
-                        (unsigned int)strtol(envstr, NULL, 0);
-                printf("LibLustre: debug peer on timeout=%d\n",
-                        obd_debug_peer_on_timeout ? 0 : 1);
-        }
-
-#ifndef INIT_SYSIO
-        (void)atexit(__liblustre_cleanup_);
-#endif
-        return err;
-}
-
-extern int _sysio_native_init();
-
-char *lustre_path = NULL;
-
-void __liblustre_setup_(void)
-{
-        char *target = NULL;
-        char *lustre_driver = "lustre";
-        unsigned mntflgs = 0;
-        int err;
-
-        lustre_path = getenv("LIBLUSTRE_MOUNT_POINT");
-        if (!lustre_path) {
-                lustre_path = "/mnt/lustre";
-        }
-
-        /* mount target */
-        target = getenv("LIBLUSTRE_MOUNT_TARGET");
-        if (!target) {
-                printf("LibLustre: no mount target specified\n");
-                exit(1);
-        }
-
-        CDEBUG(D_CONFIG, "LibLustre: mount point %s, target %s\n",
-               lustre_path, target);
-
-#ifdef INIT_SYSIO
-        /* initialize libsysio & mount rootfs */
-        if (_sysio_init()) {
-                perror("init sysio");
-                exit(1);
-        }
-        _sysio_native_init();
-
-        err = _sysio_mount_root("/", "native", mntflgs, NULL);
-        if (err) {
-                fprintf(stderr, "sysio mount failed: %s\n", strerror(errno));
-                exit(1);
-        }
-
-        if (_sysio_lustre_init())
-                exit(1);
-#endif /* INIT_SYSIO */
-
-        err = mount(target, lustre_path, lustre_driver, mntflgs, NULL);
-        if (err) {
-                fprintf(stderr, "Lustre mount failed: %s\n", strerror(errno));
-                exit(1);
-        }
-}
-
-void __liblustre_cleanup_(void)
-{
-#ifndef INIT_SYSIO
-        /* guard against being called multiple times */
-        static int cleaned = 0;
-
-        if (cleaned)
-                return;
-        cleaned++;
-#endif
-
-        /* user app might chdir to a lustre directory, and leave busy pnode
-         * during finaly libsysio cleanup. here we chdir back to "/".
-         * but it can't fix the situation that liblustre is mounted
-         * at "/".
-         */
-        chdir("/");
-#if 0
-        umount(lustre_path);
-#endif
-        /* we can't call umount here, because libsysio will not cleanup
-         * opening files for us. _sysio_shutdown() will cleanup fds at
-         * first but which will also close the sockets we need for umount
-         * liblutre. this dilema lead to another hack in
-         * libsysio/src/file_hack.c FIXME
-         */
-#ifdef INIT_SYSIO
-        _sysio_shutdown();
-        cleanup_lib_portals();
-        LNetFini();
-#endif
-}
diff --git a/lustre/liblustre/llite_lib.h b/lustre/liblustre/llite_lib.h
deleted file mode 100644
index e943aa46eca2711a1fb231d37189c423e7d693b9..0000000000000000000000000000000000000000
--- a/lustre/liblustre/llite_lib.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef __LLU_H_
-#define __LLU_H_
-
-#include <liblustre.h>
-#include <obd.h>
-#include <obd_class.h>
-#include <lustre_mds.h>
-#include <lustre_lite.h>
-#include <lustre_ver.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-/* This should not be "optimized" use ~0ULL because page->index is a long and 
- * 32-bit systems are therefore limited to 16TB in a mapping */
-#define PAGE_CACHE_MAXBYTES ((__u64)(~0UL) << CFS_PAGE_SHIFT)
-
-struct ll_file_data {
-        struct obd_client_handle fd_mds_och;
-        __u32 fd_flags;
-        struct lustre_handle fd_cwlockh;
-        unsigned long fd_gid;
-};
-
-struct llu_sb_info
-{
-        struct obd_uuid          ll_sb_uuid;
-        struct obd_export       *ll_mdc_exp;
-        struct obd_export       *ll_osc_exp;
-        obd_id                   ll_rootino;
-        int                      ll_flags;
-        struct lustre_client_ocd ll_lco;
-        struct list_head         ll_conn_chain;
-
-        struct obd_uuid          ll_mds_uuid;
-        struct obd_uuid          ll_mds_peer_uuid;
-        char                    *ll_instance;
-};
-
-#define LL_SBI_NOLCK            0x1
-
-#define LLI_F_HAVE_OST_SIZE_LOCK        0
-#define LLI_F_HAVE_MDS_SIZE_LOCK        1
-
-struct llu_inode_info {
-        struct llu_sb_info     *lli_sbi;
-        struct ll_fid           lli_fid;
-
-        struct lov_stripe_md   *lli_smd;
-        char                   *lli_symlink_name;
-        struct semaphore        lli_open_sem;
-        __u64                   lli_maxbytes;
-        unsigned long           lli_flags;
-
-        /* for libsysio */
-        struct file_identifier  lli_sysio_fid;
-
-        struct lookup_intent   *lli_it;
-
-        /* XXX workaround for libsysio readdir */
-        loff_t                  lli_dir_pos;
-
-        /* in libsysio we have no chance to store data in file,
-         * so place it here. since it's possible that an file
-         * was opened several times without close, we track an
-         * open_count here */
-        struct ll_file_data    *lli_file_data;
-        int                     lli_open_flags;
-        int                     lli_open_count;
-
-        /* not for stat, change it later */
-        int                     lli_st_flags;
-        unsigned long           lli_st_generation;
-};
-
-static inline struct llu_sb_info *llu_fs2sbi(struct filesys *fs)
-{
-        return (struct llu_sb_info*)(fs->fs_private);
-}
-
-static inline struct llu_inode_info *llu_i2info(struct inode *inode)
-{
-        return (struct llu_inode_info*)(inode->i_private);
-}
-
-static inline struct intnl_stat *llu_i2stat(struct inode *inode)
-{
-        return &inode->i_stbuf;
-}
-
-static inline struct llu_sb_info *llu_i2sbi(struct inode *inode)
-{
-        return llu_i2info(inode)->lli_sbi;
-}
-
-static inline struct obd_export *llu_i2obdexp(struct inode *inode)
-{
-        return llu_i2info(inode)->lli_sbi->ll_osc_exp;
-}
-
-static inline struct obd_export *llu_i2mdcexp(struct inode *inode)
-{
-        return llu_i2info(inode)->lli_sbi->ll_mdc_exp;
-}
-
-static inline int llu_is_root_inode(struct inode *inode)
-{
-        return (llu_i2info(inode)->lli_fid.id ==
-                llu_i2info(inode)->lli_sbi->ll_rootino);
-}
-
-#define LL_SAVE_INTENT(inode, it)                                              \
-do {                                                                           \
-        struct lookup_intent *temp;                                            \
-        LASSERT(llu_i2info(inode)->lli_it == NULL);                            \
-        OBD_ALLOC(temp, sizeof(*temp));                                        \
-        memcpy(temp, it, sizeof(*temp));                                       \
-        llu_i2info(inode)->lli_it = temp;                                      \
-        CDEBUG(D_DENTRY, "alloc intent %p to inode %p(ino %llu)\n",            \
-                        temp, inode, (long long)llu_i2stat(inode)->st_ino);    \
-} while(0)
-
-
-#define LL_GET_INTENT(inode, it)                                               \
-do {                                                                           \
-        it = llu_i2info(inode)->lli_it;                                        \
-                                                                               \
-        LASSERT(it);                                                           \
-        llu_i2info(inode)->lli_it = NULL;                                      \
-        CDEBUG(D_DENTRY, "dettach intent %p from inode %p(ino %llu)\n",        \
-                        it, inode, (long long)llu_i2stat(inode)->st_ino);      \
-} while(0)
-
-/* interpet return codes from intent lookup */
-#define LL_LOOKUP_POSITIVE 1
-#define LL_LOOKUP_NEGATIVE 2
-
-static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode)
-{
-        *fid = llu_i2info(inode)->lli_fid;
-}
-
-struct it_cb_data {
-        struct inode *icbd_parent;
-        struct pnode *icbd_child;
-        obd_id hash;
-};
-
-void ll_i2gids(__u32 *suppgids, struct inode *i1,struct inode *i2);
-
-typedef int (*intent_finish_cb)(struct ptlrpc_request *,
-                                struct inode *parent, struct pnode *pnode,
-                                struct lookup_intent *, int offset, obd_id ino);
-int llu_intent_lock(struct inode *parent, struct pnode *pnode,
-                    struct lookup_intent *, int flags, intent_finish_cb);
-
-static inline __u64 ll_file_maxbytes(struct inode *inode)
-{
-        return llu_i2info(inode)->lli_maxbytes;
-}
-
-struct mount_option_s
-{
-        char *mdc_uuid;
-        char *osc_uuid;
-};
-
-#define IS_BAD_PTR(ptr)         \
-        ((unsigned long)(ptr) == 0 || (unsigned long)(ptr) > -1000UL)
-
-/* llite_lib.c */
-int liblustre_process_log(struct config_llog_instance *cfg, char *mgsnid,
-                          char *profile, int allow_recov);
-int ll_parse_mount_target(const char *target, char **mgsnid,
-                          char **fsname);
-
-extern struct mount_option_s mount_option;
-
-/* super.c */
-void llu_update_inode(struct inode *inode, struct mds_body *body,
-                      struct lov_stripe_md *lmm);
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid);
-int ll_it_open_error(int phase, struct lookup_intent *it);
-struct inode *llu_iget(struct filesys *fs, struct lustre_md *md);
-int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm);
-int llu_setattr_raw(struct inode *inode, struct iattr *attr);
-int llu_file_flock(struct inode *ino, int cmd, struct file_lock *file_lock);
-
-extern struct fssw_ops llu_fssw_ops;
-
-/* file.c */
-void llu_prepare_mdc_op_data(struct mdc_op_data *data,
-                             struct inode *i1,
-                             struct inode *i2,
-                             const char *name,
-                             int namelen,
-                             int mode);
-int llu_create(struct inode *dir, struct pnode_base *pnode, int mode);
-int llu_local_open(struct llu_inode_info *lli, struct lookup_intent *it);
-int llu_iop_open(struct pnode *pnode, int flags, mode_t mode);
-int llu_mdc_close(struct obd_export *mdc_exp, struct inode *inode);
-int llu_file_release(struct inode *inode);
-int llu_iop_close(struct inode *inode);
-_SYSIO_OFF_T llu_iop_pos(struct inode *ino, _SYSIO_OFF_T off);
-int llu_vmtruncate(struct inode * inode, loff_t offset, obd_flag obd_flags);
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid);
-int llu_objects_destroy(struct ptlrpc_request *request, struct inode *dir);
-
-/* rw.c */
-int llu_iop_read(struct inode *ino, struct ioctx *ioctxp);
-int llu_iop_write(struct inode *ino, struct ioctx *ioctxp);
-int llu_iop_iodone(struct ioctx *ioctxp);
-int llu_glimpse_size(struct inode *inode);
-int llu_extent_lock_cancel_cb(struct ldlm_lock *lock,
-                                    struct ldlm_lock_desc *new, void *data,
-                                    int flag);
-int llu_extent_lock(struct ll_file_data *fd, struct inode *inode,
-                    struct lov_stripe_md *lsm, int mode,
-                    ldlm_policy_data_t *policy, struct lustre_handle *lockh,
-                    int ast_flags);
-int llu_extent_unlock(struct ll_file_data *fd, struct inode *inode,
-                      struct lov_stripe_md *lsm, int mode,
-                      struct lustre_handle *lockh);
-
-/* namei.c */
-int llu_iop_lookup(struct pnode *pnode,
-                   struct inode **inop,
-                   struct intent *intnt,
-                   const char *path);
-void unhook_stale_inode(struct pnode *pno);
-struct inode *llu_inode_from_lock(struct ldlm_lock *lock);
-int llu_mdc_blocking_ast(struct ldlm_lock *lock,
-                         struct ldlm_lock_desc *desc,
-                         void *data, int flag);
-
-/* dir.c */
-ssize_t llu_iop_filldirentries(struct inode *ino, _SYSIO_OFF_T *basep, 
-                               char *buf, size_t nbytes);
-
-/* ext2 related */
-#define EXT2_NAME_LEN (255)
-
-struct ext2_dirent {
-        __u32   inode;
-        __u16   rec_len;
-        __u8    name_len;
-        __u8    file_type;
-        char    name[EXT2_NAME_LEN];
-};
-
-#define EXT2_DIR_PAD                    4
-#define EXT2_DIR_ROUND                  (EXT2_DIR_PAD - 1)
-#define EXT2_DIR_REC_LEN(name_len)      (((name_len) + 8 + EXT2_DIR_ROUND) & \
-                                         ~EXT2_DIR_ROUND)
-
-static inline struct ext2_dirent *ext2_next_entry(struct ext2_dirent *p)
-{
-        return (struct ext2_dirent*)((char*) p + le16_to_cpu(p->rec_len));
-}
-
-static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb)
-{
-        struct intnl_stat *st = llu_i2stat(inode);
-        lvb->lvb_size = st->st_size;
-        lvb->lvb_blocks = st->st_blocks;
-        lvb->lvb_mtime = st->st_mtime;
-        lvb->lvb_atime = st->st_atime;
-        lvb->lvb_ctime = st->st_ctime;
-}
-
-#endif
diff --git a/lustre/liblustre/lutil.c b/lustre/liblustre/lutil.c
deleted file mode 100644
index 99f1cfe95535ef0cd76a499d472dfdb561fcf729..0000000000000000000000000000000000000000
--- a/lustre/liblustre/lutil.c
+++ /dev/null
@@ -1,239 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <signal.h>
-#include <sys/types.h>
-
-#include <fcntl.h>
-#ifdef HAVE_NETDB_H
-#include <netdb.h>
-#endif
-#ifdef _AIX
-#include "syscall_AIX.h"
-#else
-#include <syscall.h>
-#endif
-#include <sys/utsname.h>
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#include <sys/socket.h>
-#ifdef HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#ifdef HAVE_CATAMOUNT_DATA_H
-#include <catamount/data.h>
-#endif
-
-#include "lutil.h"
-
-
-unsigned int libcfs_subsystem_debug = ~0 - (S_LNET | S_LND);
-unsigned int libcfs_debug = 0;
-
-struct task_struct     *current;
-
-void *inter_module_get(char *arg)
-{
-        if (!strcmp(arg, "ldlm_cli_cancel_unused"))
-                return ldlm_cli_cancel_unused;
-        else if (!strcmp(arg, "ldlm_namespace_cleanup"))
-                return ldlm_namespace_cleanup;
-        else if (!strcmp(arg, "ldlm_replay_locks"))
-                return ldlm_replay_locks;
-#ifdef HAVE_QUOTA_SUPPORT
-        else if (!strcmp(arg, "osc_quota_interface"))
-                return &osc_quota_interface;
-        else if (!strcmp(arg, "mdc_quota_interface"))
-                return &mdc_quota_interface;
-        else if (!strcmp(arg, "lov_quota_interface"))
-                return &lov_quota_interface;
-#endif
-        else
-                return NULL;
-}
-
-/*
- * random number generator stuff
- */
-
-#ifdef HAVE_GETHOSTBYNAME
-static int get_ipv4_addr()
-{
-        struct utsname myname;
-        struct hostent *hptr;
-        int ip;
-
-        if (uname(&myname) < 0)
-                return 0;
-
-        hptr = gethostbyname(myname.nodename);
-        if (hptr == NULL ||
-            hptr->h_addrtype != AF_INET ||
-            *hptr->h_addr_list == NULL) {
-                CWARN("Warning: fail to get local IPv4 address\n");
-                return 0;
-        }
-
-        ip = ntohl(*((int *) *hptr->h_addr_list));
-
-        return ip;
-}
-#endif
-
-void liblustre_init_random()
-{
-        int seed[2];
-        struct timeval tv;
-
-#ifdef LIBLUSTRE_USE_URANDOM
-        int _rand_dev_fd;
-        _rand_dev_fd = syscall(SYS_open, "/dev/urandom", O_RDONLY);
-        if (_rand_dev_fd >= 0) {
-                if (syscall(SYS_read, _rand_dev_fd,
-                            &seed, sizeof(seed)) == sizeof(seed)) {
-                        ll_srand(seed[0], seed[1]);
-                        return;
-                }
-                syscall(SYS_close, _rand_dev_fd);
-        }
-#endif /* LIBLUSTRE_USE_URANDOM */
-
-#ifdef HAVE_GETHOSTBYNAME
-        seed[0] = get_ipv4_addr();
-#else
-        seed[0] = _my_pnid;
-#endif
-        gettimeofday(&tv, NULL);
-        ll_srand(tv.tv_sec ^ __swab32(seed[0]), tv.tv_usec ^__swab32(getpid()));
-}
-
-static void init_capability(__u32 *res)
-{
-#ifdef HAVE_LIBCAP
-        cap_t syscap;
-        cap_flag_value_t capval;
-        int i;
-
-        *res = 0;
-
-        syscap = cap_get_proc();
-        if (!syscap) {
-                CWARN("Warning: failed to get system capability, "
-                      "set to minimal\n");
-                return;
-        }
-
-        for (i = 0; i < sizeof(cap_value_t) * 8; i++) {
-                if (!cap_get_flag(syscap, i, CAP_EFFECTIVE, &capval)) {
-                        if (capval == CAP_SET) {
-                                *res |= 1 << i;
-                        }
-                }
-        }
-#else
-	/*
-	 * set fake cap flags to ship to linux server
-	 * from client platforms that have none (eg. catamount)
-	 *  full capability for root
-	 *  no capability for anybody else
-	 */
-#define FAKE_ROOT_CAP 0x1ffffeff
-#define FAKE_USER_CAP 0
-
-	*res = (current->fsuid == 0) ? FAKE_ROOT_CAP: FAKE_USER_CAP;
-#endif
-}
-
-int in_group_p(gid_t gid)
-{
-        int i;
-
-        if (gid == current->fsgid)
-                return 1;
-
-        for (i = 0; i < current->ngroups; i++) {
-                if (gid == current->groups[i])
-                        return 1;
-        }
-
-        return 0;
-}
-
-int liblustre_init_current(char *comm)
-{
-        current = malloc(sizeof(*current));
-        if (!current) {
-                CERROR("Not enough memory\n");
-                return -ENOMEM;
-        }
-
-        strncpy(current->comm, comm, sizeof(current->comm));
-        current->pid = getpid();
-        current->fsuid = geteuid();
-        current->fsgid = getegid();
-        memset(&current->pending, 0, sizeof(current->pending));
-
-        current->max_groups = sysconf(_SC_NGROUPS_MAX);
-        current->groups = malloc(sizeof(gid_t) * current->max_groups);
-        if (!current->groups) {
-                CERROR("Not enough memory\n");
-                return -ENOMEM;
-        }
-        current->ngroups = getgroups(current->max_groups, current->groups);
-        if (current->ngroups < 0) {
-                perror("Error getgroups");
-                return -EINVAL;
-        }
-
-        init_capability(&current->cap_effective);
-
-        return 0;
-}
-
-int init_lib_portals()
-{
-        int rc;
-        ENTRY;
-
-        rc = libcfs_debug_init(5 * 1024 * 1024);
-        if (rc != 0) {
-                CERROR("libcfs_debug_init() failed: %d\n", rc);
-                RETURN (-ENXIO);
-        }
-
-        rc = LNetInit();
-        if (rc != 0) {
-                CERROR("LNetInit() failed: %d\n", rc);
-                RETURN (-ENXIO);
-        }
-        RETURN(0);
-}
-
-extern void ptlrpc_exit_portals(void);
-void cleanup_lib_portals()
-{
-        libcfs_debug_cleanup();
-        ptlrpc_exit_portals();
-}
diff --git a/lustre/liblustre/lutil.h b/lustre/liblustre/lutil.h
deleted file mode 100644
index d235eb8eb4747f6e5fd41e37e1910a15a94c7a8e..0000000000000000000000000000000000000000
--- a/lustre/liblustre/lutil.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __LUTIL_H_
-#define __LUTIL_H_
-
-#include <liblustre.h>
-#include <obd.h>
-#include <obd_class.h>
-
-void liblustre_init_random(void);
-int liblustre_init_current(char *comm);
-int init_lib_portals(void);
-void cleanup_lib_portals(void);
-
-#endif
diff --git a/lustre/liblustre/namei.c b/lustre/liblustre/namei.c
deleted file mode 100644
index 2404ac5cd4b44adf48d0ab61a4495d50fe05eb94..0000000000000000000000000000000000000000
--- a/lustre/liblustre/namei.c
+++ /dev/null
@@ -1,589 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light name resolution
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
-#include "llite_lib.h"
-
-void ll_intent_drop_lock(struct lookup_intent *it)
-{
-        struct lustre_handle *handle;
-
-        if (it->it_op && it->d.lustre.it_lock_mode) {
-                handle = (struct lustre_handle *)&it->d.lustre.it_lock_handle;
-                CDEBUG(D_DLMTRACE, "releasing lock with cookie "LPX64
-                       " from it %p\n", handle->cookie, it);
-                ldlm_lock_decref(handle, it->d.lustre.it_lock_mode);
-
-                /* bug 494: intent_release may be called multiple times, from
-                 * this thread and we don't want to double-decref this lock */
-                it->d.lustre.it_lock_mode = 0;
-        }
-}
-
-void ll_intent_release(struct lookup_intent *it)
-{
-        ENTRY;
-
-        ll_intent_drop_lock(it);
-        it->it_magic = 0;
-        it->it_op_release = 0;
-        it->d.lustre.it_disposition = 0;
-        it->d.lustre.it_data = NULL;
-        EXIT;
-}
-
-#if 0
-/*
- * remove the stale inode from pnode
- */
-void unhook_stale_inode(struct pnode *pno)
-{
-        struct inode *inode = pno->p_base->pb_ino;
-        ENTRY;
-
-        LASSERT(inode);
-        LASSERT(llu_i2info(inode)->lli_stale_flag);
-
-        pno->p_base->pb_ino = NULL;
-        I_RELE(inode);
-
-        if (!llu_i2info(inode)->lli_open_count) {
-                CDEBUG(D_INODE, "unhook inode %p (ino %lu) from pno %p\n",
-                                inode, llu_i2info(inode)->lli_st_ino, pno);
-                if (!inode->i_ref)
-                        _sysio_i_gone(inode);
-        }
-
-        EXIT;
-        return;
-}
-#endif
-
-void llu_lookup_finish_locks(struct lookup_intent *it, struct pnode *pnode)
-{
-        struct inode *inode;
-        LASSERT(it);
-        LASSERT(pnode);
-
-        inode = pnode->p_base->pb_ino;
-        if (it->d.lustre.it_lock_mode && inode != NULL) {
-                CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%llu/%lu)\n",
-                       inode, (long long)llu_i2stat(inode)->st_ino,
-                       llu_i2info(inode)->lli_st_generation);
-                mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode);
-        }
-
-        /* drop lookup/getattr locks */
-        if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR)
-                ll_intent_release(it);
-
-}
-
-static inline void llu_invalidate_inode_pages(struct inode * inode)
-{
-        /* do nothing */
-}
-
-int llu_mdc_blocking_ast(struct ldlm_lock *lock,
-                         struct ldlm_lock_desc *desc,
-                         void *data, int flag)
-{
-        int rc;
-        struct lustre_handle lockh;
-        ENTRY;
-
-
-        switch (flag) {
-        case LDLM_CB_BLOCKING:
-                ldlm_lock2handle(lock, &lockh);
-                rc = ldlm_cli_cancel(&lockh);
-                if (rc < 0) {
-                        CDEBUG(D_INODE, "ldlm_cli_cancel: %d\n", rc);
-                        RETURN(rc);
-                }
-                break;
-        case LDLM_CB_CANCELING: {
-                struct inode *inode = llu_inode_from_lock(lock);
-                struct llu_inode_info *lli;
-                struct intnl_stat *st;
-                __u64 bits = lock->l_policy_data.l_inodebits.bits;
-
-                /* Invalidate all dentries associated with this inode */
-                if (inode == NULL)
-                        break;
-
-                lli =  llu_i2info(inode);
-                st = llu_i2stat(inode);
-
-                if (bits & MDS_INODELOCK_UPDATE)
-                        clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags);
-
-                if (lock->l_resource->lr_name.name[0] != st->st_ino ||
-                    lock->l_resource->lr_name.name[1] !=lli->lli_st_generation){
-                        LDLM_ERROR(lock, "data mismatch with ino %llu/%lu",
-                                  (long long)st->st_ino,lli->lli_st_generation);
-                }
-                if (S_ISDIR(st->st_mode) &&
-                    (bits & MDS_INODELOCK_UPDATE)) {
-                        CDEBUG(D_INODE, "invalidating inode %llu\n",
-                               (long long)st->st_ino);
-
-                        llu_invalidate_inode_pages(inode);
-                }
-
-/*
-                if (inode->i_sb->s_root &&
-                    inode != inode->i_sb->s_root->d_inode)
-                        ll_unhash_aliases(inode);
-*/
-                I_RELE(inode);
-                break;
-        }
-        default:
-                LBUG();
-        }
-
-        RETURN(0);
-}
-
-static int pnode_revalidate_finish(struct ptlrpc_request *req,
-                                   int offset,
-                                   struct lookup_intent *it,
-                                   struct pnode *pnode)
-{
-        struct inode *inode = pnode->p_base->pb_ino;
-        struct lustre_md md;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(inode);
-
-        if (!req)
-                RETURN(0);
-
-        if (it_disposition(it, DISP_LOOKUP_NEG))
-                RETURN(-ENOENT);
-
-        rc = mdc_req2lustre_md(req, offset, llu_i2sbi(inode)->ll_osc_exp, &md);
-        if (rc)
-                RETURN(rc);
-
-        llu_update_inode(inode, md.body, md.lsm);
-
-        RETURN(rc);
-}
-
-static int llu_pb_revalidate(struct pnode *pnode, int flags,
-                             struct lookup_intent *it)
-{
-        struct pnode_base *pb = pnode->p_base;
-        struct it_cb_data icbd;
-        struct mdc_op_data op_data;
-        struct ptlrpc_request *req = NULL;
-        struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
-        struct obd_export *exp;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,intent=%x\n",
-               (int)pb->pb_name.len, pb->pb_name.name, it ? it->it_op : 0);
-
-        /* We don't want to cache negative dentries, so return 0 immediately.
-         * We believe that this is safe, that negative dentries cannot be
-         * pinned by someone else */
-        if (pb->pb_ino == NULL) {
-                CDEBUG(D_INODE, "negative pb\n");
-                RETURN(0);
-        }
-
-        /* This is due to bad interaction with libsysio. remove this when we
-         * switched to libbsdio XXX
-         */
-        {
-                struct llu_inode_info *lli = llu_i2info(pb->pb_ino);
-                struct intnl_stat *st = llu_i2stat(pb->pb_ino);
-                if (lli->lli_it) {
-                        CDEBUG(D_INODE, "inode %llu still have intent "
-                                        "%p(opc 0x%x), release it\n",
-                                        (long long) st->st_ino, lli->lli_it,
-                                        lli->lli_it->it_op);
-                        ll_intent_release(lli->lli_it);
-                        OBD_FREE(lli->lli_it, sizeof(*lli->lli_it));
-                        lli->lli_it = NULL;
-                }
-        }
-
-        exp = llu_i2mdcexp(pb->pb_ino);
-        icbd.icbd_parent = pnode->p_parent->p_base->pb_ino;
-        icbd.icbd_child = pnode;
-
-        if (!it) {
-                it = &lookup_it;
-                it->it_op_release = ll_intent_release;
-        }
-
-        llu_prepare_mdc_op_data(&op_data, pnode->p_parent->p_base->pb_ino,
-                                pb->pb_ino, pb->pb_name.name,pb->pb_name.len,0);
-
-        rc = mdc_intent_lock(exp, &op_data, NULL, 0, it, flags,
-                             &req, llu_mdc_blocking_ast,
-                             LDLM_FL_CANCEL_ON_BLOCK);
-        /* If req is NULL, then mdc_intent_lock only tried to do a lock match;
-         * if all was well, it will return 1 if it found locks, 0 otherwise. */
-        if (req == NULL && rc >= 0)
-                GOTO(out, rc);
-
-        if (rc < 0)
-                GOTO(out, rc = 0);
-
-        rc = pnode_revalidate_finish(req, DLM_REPLY_REC_OFF, it, pnode);
-        if (rc != 0) {
-                ll_intent_release(it);
-                GOTO(out, rc = 0);
-        }
-        rc = 1;
-
-        /* Note: ll_intent_lock may cause a callback, check this! */
-
-        if (it->it_op & IT_OPEN)
-                LL_SAVE_INTENT(pb->pb_ino, it);
-
- out:
-        if (req && rc == 1)
-                ptlrpc_req_finished(req);
-        if (rc == 0) {
-                LASSERT(pb->pb_ino);
-                I_RELE(pb->pb_ino);
-                pb->pb_ino = NULL;
-        } else {
-                llu_lookup_finish_locks(it, pnode);
-        }
-        RETURN(rc);
-}
-
-static int lookup_it_finish(struct ptlrpc_request *request, int offset,
-                            struct lookup_intent *it, void *data)
-{
-        struct it_cb_data *icbd = data;
-        struct pnode *child = icbd->icbd_child;
-        struct inode *parent = icbd->icbd_parent;
-        struct llu_sb_info *sbi = llu_i2sbi(parent);
-        struct inode *inode = NULL;
-        int rc;
-
-        /* libsysio require us generate inode right away if success.
-         * so if mds created new inode for us we need make sure it
-         * succeeded. thus for any error we can't delay to the
-         * llu_file_open() time. */
-        if (it_disposition(it, DISP_OPEN_CREATE) &&
-            it_open_error(DISP_OPEN_CREATE, it)) {
-                CDEBUG(D_INODE, "detect mds create error\n");
-                return it_open_error(DISP_OPEN_CREATE, it);
-        }
-        if (it_disposition(it, DISP_OPEN_OPEN) &&
-            it_open_error(DISP_OPEN_OPEN, it)) {
-                CDEBUG(D_INODE, "detect mds open error\n");
-                /* undo which did by mdc_intent_lock */
-                if (it_disposition(it, DISP_OPEN_CREATE) &&
-                    !it_open_error(DISP_OPEN_CREATE, it)) {
-                        LASSERT(request);
-                        LASSERT(atomic_read(&request->rq_refcount) > 1);
-                        CDEBUG(D_INODE, "dec a ref of req %p\n", request);
-                        ptlrpc_req_finished(request);
-                }
-                return it_open_error(DISP_OPEN_OPEN, it);
-        }
-
-        /* NB 1 request reference will be taken away by ll_intent_lock()
-         * when I return
-         */
-        if (!it_disposition(it, DISP_LOOKUP_NEG) || (it->it_op & IT_CREAT)) {
-                struct lustre_md md;
-                struct llu_inode_info *lli;
-                struct intnl_stat *st;
-                ENTRY;
-
-                if (it_disposition(it, DISP_OPEN_CREATE))
-                        ptlrpc_req_finished(request);
-
-                rc = mdc_req2lustre_md(request, offset, sbi->ll_osc_exp, &md);
-                if (rc)
-                        RETURN(rc);
-
-                inode = llu_iget(parent->i_fs, &md);
-                if (!inode || IS_ERR(inode)) {
-                        /* free the lsm if we allocated one above */
-                        if (md.lsm != NULL)
-                                obd_free_memmd(sbi->ll_osc_exp, &md.lsm);
-                        RETURN(inode ? PTR_ERR(inode) : -ENOMEM);
-                } else if (md.lsm != NULL &&
-                           llu_i2info(inode)->lli_smd != md.lsm) {
-                        obd_free_memmd(sbi->ll_osc_exp, &md.lsm);
-                }
-
-                lli = llu_i2info(inode);
-                st = llu_i2stat(inode);
-
-                /* If this is a stat, get the authoritative file size */
-                if (it->it_op == IT_GETATTR && S_ISREG(st->st_mode) &&
-                    lli->lli_smd != NULL) {
-                        struct lov_stripe_md *lsm = lli->lli_smd;
-                        ldlm_error_t rc;
-
-                        LASSERT(lsm->lsm_object_id != 0);
-
-                        /* bug 2334: drop MDS lock before acquiring OST lock */
-                        ll_intent_drop_lock(it);
-
-                        rc = llu_glimpse_size(inode);
-                        if (rc) {
-                                I_RELE(inode);
-                                RETURN(rc);
-                        }
-                }
-        } else {
-                ENTRY;
-        }
-
-        /* intent will be further used in cases of open()/getattr() */
-        if (inode && (it->it_op & IT_OPEN))
-                LL_SAVE_INTENT(inode, it);
-
-        child->p_base->pb_ino = inode;
-
-        RETURN(0);
-}
-
-struct inode *llu_inode_from_lock(struct ldlm_lock *lock)
-{
-        struct inode *inode;
-        lock_res_and_lock(lock);
-
-        if (lock->l_ast_data) {
-                inode = (struct inode *)lock->l_ast_data;
-                I_REF(inode);
-        } else
-                inode = NULL;
-
-        unlock_res_and_lock(lock);
-        return inode;
-}
-
-static int llu_lookup_it(struct inode *parent, struct pnode *pnode,
-                         struct lookup_intent *it, int flags)
-{
-        struct mdc_op_data op_data;
-        struct it_cb_data icbd;
-        struct ptlrpc_request *req = NULL;
-        struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
-        int rc;
-        ENTRY;
-
-        if (pnode->p_base->pb_name.len > EXT2_NAME_LEN)
-                RETURN(-ENAMETOOLONG);
-
-        if (!it) {
-                it = &lookup_it;
-                it->it_op_release = ll_intent_release;
-        }
-
-        icbd.icbd_child = pnode;
-        icbd.icbd_parent = parent;
-
-        llu_prepare_mdc_op_data(&op_data, parent, NULL,
-                                pnode->p_base->pb_name.name,
-                                pnode->p_base->pb_name.len, flags);
-
-        rc = mdc_intent_lock(llu_i2mdcexp(parent), &op_data, NULL, 0, it,
-                             flags, &req, llu_mdc_blocking_ast,
-                             LDLM_FL_CANCEL_ON_BLOCK);
-        if (rc < 0)
-                GOTO(out, rc);
-
-        rc = lookup_it_finish(req, DLM_REPLY_REC_OFF, it, &icbd);
-        if (rc != 0) {
-                ll_intent_release(it);
-                GOTO(out, rc);
-        }
-
-        llu_lookup_finish_locks(it, pnode);
-
- out:
-        if (req)
-                ptlrpc_req_finished(req);
-        return rc;
-}
-
-static struct lookup_intent*
-translate_lookup_intent(struct intent *intent, const char *path)
-{
-        struct lookup_intent *it;
-        int fmode;
-
-        /* libsysio trick */
-        if (!intent || path) {
-                CDEBUG(D_VFSTRACE, "not intent needed\n");
-                return NULL;
-        }
-
-        OBD_ALLOC(it, sizeof(*it));
-        LASSERT(it);
-
-        memset(it, 0, sizeof(*it));
-
-        /* libsysio will assign intent like following:
-         * NOTE: INT_CREAT has include INT_UPDPARENT
-         *
-         * open: INT_OPEN [| INT_CREAT]
-         * mkdir: INT_CREAT
-         * symlink: INT_CREAT
-         * unlink: INT_UPDPARENT
-         * rmdir: INT_UPDPARENT
-         * mknod: INT_CREAT
-         * stat: INT_GETATTR
-         * setattr: NULL
-         *
-         * following logic is adjusted for libsysio
-         */
-
-        it->it_flags = intent->int_arg2 ? *((int*)intent->int_arg2) : 0;
-
-        if (intent->int_opmask & INT_OPEN) {
-                it->it_op |= IT_OPEN;
-
-                /* convert access mode from O_ to FMODE_ */
-                if (it->it_flags & O_WRONLY)
-                        fmode = FMODE_WRITE;
-                else if (it->it_flags & O_RDWR)
-                        fmode = FMODE_READ | FMODE_WRITE;
-                else
-                        fmode = FMODE_READ;
-                it->it_flags &= ~O_ACCMODE;
-                it->it_flags |= fmode;
-        }
-
-        /* XXX libsysio has strange code on intent handling,
-         * more check later */
-        if (it->it_flags & O_CREAT) {
-                it->it_op |= IT_CREAT;
-                it->it_create_mode = *((int*)intent->int_arg1);
-                /* bug 7278: libsysio hack. For O_EXCL, libsysio depends on
-                   this lookup to return negative result, but then there is no
-                   way to find out original intent in ll_iop_open(). So we just
-                   clear O_EXCL from libsysio flags here to avoid checking
-                   for negative result. O_EXCL will be enforced by MDS. */
-                *((int*)intent->int_arg2) &= ~O_EXCL;
-        }
-
-        if (intent->int_opmask & INT_GETATTR)
-                it->it_op |= IT_GETATTR;
-
-        LASSERT(!(intent->int_opmask & INT_SETATTR));
-
-        /* libsysio is different to linux vfs when doing unlink/rmdir,
-         * INT_UPDPARENT was passed down during name resolution. Here
-         * we treat it as normal lookup, later unlink()/rmdir() will
-         * do the actual work */
-
-        /* conform to kernel code, if only IT_LOOKUP was set, don't
-         * pass down it */
-        if (!it->it_op || it->it_op == IT_LOOKUP) {
-                OBD_FREE(it, sizeof(*it));
-                it = NULL;
-        }
-        if (it)
-                it->it_op_release = ll_intent_release;
-
-        CDEBUG(D_VFSTRACE, "final intent 0x%x\n", it ? it->it_op : 0);
-        return it;
-}
-
-int llu_iop_lookup(struct pnode *pnode,
-                   struct inode **inop,
-                   struct intent *intnt,
-                   const char *path)
-{
-        struct lookup_intent *it;
-        int rc;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        *inop = NULL;
-
-        /* the mount root inode have no name, so don't call
-         * remote in this case. but probably we need revalidate
-         * it here? FIXME */
-        if (pnode->p_mount->mnt_root == pnode) {
-                struct inode *i = pnode->p_base->pb_ino;
-                *inop = i;
-                RETURN(0);
-        }
-
-        if (!pnode->p_base->pb_name.len)
-                RETURN(-EINVAL);
-
-        it = translate_lookup_intent(intnt, path);
-
-        /* param flags is not used, let it be 0 */
-        if (llu_pb_revalidate(pnode, 0, it)) {
-                LASSERT(pnode->p_base->pb_ino);
-                *inop = pnode->p_base->pb_ino;
-                GOTO(out, rc = 0);
-        }
-
-        rc = llu_lookup_it(pnode->p_parent->p_base->pb_ino, pnode, it, 0);
-        if (!rc) {
-                if (!pnode->p_base->pb_ino)
-                        rc = -ENOENT;
-                else
-                        *inop = pnode->p_base->pb_ino;
-        }
-
-out:
-        liblustre_wait_event(0);
-        RETURN(rc);
-}
diff --git a/lustre/liblustre/rw.c b/lustre/liblustre/rw.c
deleted file mode 100644
index e096a0e84afe55217b5e66ac0fcfc9cefbb9f4bd..0000000000000000000000000000000000000000
--- a/lustre/liblustre/rw.c
+++ /dev/null
@@ -1,892 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light block IO
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/queue.h>
-#include <fcntl.h>
-#include <sys/uio.h>
-
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
-#include "llite_lib.h"
-
-struct llu_io_group
-{
-        struct obd_io_group    *lig_oig;
-        struct inode           *lig_inode;
-        struct lustre_rw_params *lig_params;
-        int                     lig_maxpages;
-        int                     lig_npages;
-        __u64                   lig_rwcount;
-        struct ll_async_page   *lig_llaps;
-        struct page            *lig_pages;
-        void                   *lig_llap_cookies;
-};
-
-#define LLU_IO_GROUP_SIZE(x) \
-        (sizeof(struct llu_io_group) + \
-         (sizeof(struct ll_async_page) + \
-          sizeof(struct page) + \
-          llap_cookie_size) * (x))
-
-struct llu_io_session
-{
-        struct inode           *lis_inode;
-        int                     lis_cmd;
-        int                     lis_max_groups;
-        int                     lis_ngroups;
-        struct llu_io_group    *lis_groups[0];
-};
-#define LLU_IO_SESSION_SIZE(x)  \
-        (sizeof(struct llu_io_session) + (x) * 2 * sizeof(void *))
-
-
-typedef ssize_t llu_file_piov_t(const struct iovec *iovec, int iovlen,
-                                _SYSIO_OFF_T pos, ssize_t len,
-                                void *private);
-
-size_t llap_cookie_size;
-
-static int llu_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp = llu_i2obdexp(inode);
-        struct {
-                char name[16];
-                struct ldlm_lock *lock;
-                struct lov_stripe_md *lsm;
-        } key = { .name = "lock_to_stripe", .lock = lock, .lsm = lsm };
-        __u32 stripe, vallen = sizeof(stripe);
-        int rc;
-        ENTRY;
-
-        if (lsm->lsm_stripe_count == 1)
-                RETURN(0);
-
-        /* get our offset in the lov */
-        rc = obd_get_info(exp, sizeof(key), &key, &vallen, &stripe);
-        if (rc != 0) {
-                CERROR("obd_get_info: rc = %d\n", rc);
-                LBUG();
-        }
-        LASSERT(stripe < lsm->lsm_stripe_count);
-        RETURN(stripe);
-}
-
-int llu_extent_lock_cancel_cb(struct ldlm_lock *lock,
-                                    struct ldlm_lock_desc *new, void *data,
-                                    int flag)
-{
-        struct lustre_handle lockh = { 0 };
-        int rc;
-        ENTRY;
-
-        if ((unsigned long)data > 0 && (unsigned long)data < 0x1000) {
-                LDLM_ERROR(lock, "cancelling lock with bad data %p", data);
-                LBUG();
-        }
-
-        switch (flag) {
-        case LDLM_CB_BLOCKING:
-                ldlm_lock2handle(lock, &lockh);
-                rc = ldlm_cli_cancel(&lockh);
-                if (rc != ELDLM_OK)
-                        CERROR("ldlm_cli_cancel failed: %d\n", rc);
-                break;
-        case LDLM_CB_CANCELING: {
-                struct inode *inode;
-                struct llu_inode_info *lli;
-                struct lov_stripe_md *lsm;
-                __u32 stripe;
-                __u64 kms;
-
-                /* This lock wasn't granted, don't try to evict pages */
-                if (lock->l_req_mode != lock->l_granted_mode)
-                        RETURN(0);
-
-                inode = llu_inode_from_lock(lock);
-                if (!inode)
-                        RETURN(0);
-                lli= llu_i2info(inode);
-                if (!lli)
-                        goto iput;
-                if (!lli->lli_smd)
-                        goto iput;
-                lsm = lli->lli_smd;
-
-                stripe = llu_lock_to_stripe_offset(inode, lock);
-                lock_res_and_lock(lock);
-                kms = ldlm_extent_shift_kms(lock,
-                                            lsm->lsm_oinfo[stripe]->loi_kms);
-                unlock_res_and_lock(lock);
-                if (lsm->lsm_oinfo[stripe]->loi_kms != kms)
-                        LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
-                                   lsm->lsm_oinfo[stripe]->loi_kms, kms);
-                lsm->lsm_oinfo[stripe]->loi_kms = kms;
-iput:
-                I_RELE(inode);
-                break;
-        }
-        default:
-                LBUG();
-        }
-
-        RETURN(0);
-}
-
-static int llu_glimpse_callback(struct ldlm_lock *lock, void *reqp)
-{
-        struct ptlrpc_request *req = reqp;
-        struct inode *inode = llu_inode_from_lock(lock);
-        struct llu_inode_info *lli;
-        struct ost_lvb *lvb;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*lvb) };
-        int rc, stripe = 0;
-        ENTRY;
-
-        if (inode == NULL)
-                GOTO(out, rc = -ELDLM_NO_LOCK_DATA);
-        lli = llu_i2info(inode);
-        if (lli == NULL)
-                GOTO(iput, rc = -ELDLM_NO_LOCK_DATA);
-        if (lli->lli_smd == NULL)
-                GOTO(iput, rc = -ELDLM_NO_LOCK_DATA);
-
-        /* First, find out which stripe index this lock corresponds to. */
-        if (lli->lli_smd->lsm_stripe_count > 1)
-                stripe = llu_lock_to_stripe_offset(inode, lock);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(iput, rc);
-
-        lvb = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*lvb));
-        lvb->lvb_size = lli->lli_smd->lsm_oinfo[stripe]->loi_kms;
-
-        LDLM_DEBUG(lock, "i_size: %llu -> stripe number %u -> kms "LPU64,
-                   (long long)llu_i2stat(inode)->st_size, stripe,lvb->lvb_size);
- iput:
-        I_RELE(inode);
- out:
-        /* These errors are normal races, so we don't want to fill the console
-         * with messages by calling ptlrpc_error() */
-        if (rc == -ELDLM_NO_LOCK_DATA)
-                lustre_pack_reply(req, 1, NULL, NULL);
-
-        req->rq_status = rc;
-        return rc;
-}
-
-/* NB: lov_merge_size will prefer locally cached writes if they extend the
- * file (because it prefers KMS over RSS when larger) */
-int llu_glimpse_size(struct inode *inode)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct lustre_handle lockh = { 0 };
-        struct ldlm_enqueue_info einfo = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        struct ost_lvb lvb;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_DLMTRACE, "Glimpsing inode %llu\n", (long long)st->st_ino);
-
-        if (!lli->lli_smd) {
-                CDEBUG(D_DLMTRACE, "No objects for inode %llu\n", 
-                       (long long)st->st_ino);
-                RETURN(0);
-        }
-
-        einfo.ei_type = LDLM_EXTENT;
-        einfo.ei_mode = LCK_PR;
-        einfo.ei_cb_bl = osc_extent_blocking_cb;
-        einfo.ei_cb_cp = ldlm_completion_ast;
-        einfo.ei_cb_gl = llu_glimpse_callback;
-        einfo.ei_cbdata = inode;
-
-        oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF;
-        oinfo.oi_lockh = &lockh;
-        oinfo.oi_md = lli->lli_smd;
-        oinfo.oi_flags = LDLM_FL_HAS_INTENT;
-
-        rc = obd_enqueue_rqset(sbi->ll_osc_exp, &oinfo, &einfo);
-        if (rc) {
-                CERROR("obd_enqueue returned rc %d, returning -EIO\n", rc);
-                RETURN(rc > 0 ? -EIO : rc);
-        }
-
-        inode_init_lvb(inode, &lvb);
-        rc = obd_merge_lvb(sbi->ll_osc_exp, lli->lli_smd, &lvb, 0);
-        st->st_size = lvb.lvb_size;
-        st->st_blocks = lvb.lvb_blocks;
-        /* handle st_blocks overflow gracefully */
-        if (st->st_blocks < lvb.lvb_blocks)
-                st->st_blocks = ~0UL;
-        st->st_mtime = lvb.lvb_mtime;
-        st->st_atime = lvb.lvb_atime;
-        st->st_ctime = lvb.lvb_ctime;
-
-        CDEBUG(D_DLMTRACE, "glimpse: size: "LPU64", blocks: "LPU64"\n",
-               (__u64)st->st_size, (__u64)st->st_blocks);
-
-        RETURN(rc);
-}
-
-int llu_extent_lock(struct ll_file_data *fd, struct inode *inode,
-                    struct lov_stripe_md *lsm, int mode,
-                    ldlm_policy_data_t *policy, struct lustre_handle *lockh,
-                    int ast_flags)
-{
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct ldlm_enqueue_info einfo = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        struct ost_lvb lvb;
-        int rc;
-        ENTRY;
-
-        LASSERT(!lustre_handle_is_used(lockh));
-        CLASSERT(ELDLM_OK == 0);
-
-        /* XXX phil: can we do this?  won't it screw the file size up? */
-        if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) ||
-            (sbi->ll_flags & LL_SBI_NOLCK) || mode == LCK_NL)
-                RETURN(0);
-
-        CDEBUG(D_DLMTRACE, "Locking inode %llu, start "LPU64" end "LPU64"\n",
-               (long long)st->st_ino, policy->l_extent.start,
-               policy->l_extent.end);
-
-        einfo.ei_type = LDLM_EXTENT;
-        einfo.ei_mode = mode;
-        einfo.ei_cb_bl = osc_extent_blocking_cb;
-        einfo.ei_cb_cp = ldlm_completion_ast;
-        einfo.ei_cb_gl = llu_glimpse_callback;
-        einfo.ei_cbdata = inode;
-
-        oinfo.oi_policy = *policy;
-        oinfo.oi_lockh = lockh;
-        oinfo.oi_md = lsm;
-        oinfo.oi_flags = ast_flags;
-
-        rc = obd_enqueue(sbi->ll_osc_exp, &oinfo, &einfo, NULL);
-        *policy = oinfo.oi_policy;
-        if (rc > 0)
-                rc = -EIO;
-
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 1);
-        if (policy->l_extent.start == 0 &&
-            policy->l_extent.end == OBD_OBJECT_EOF)
-                st->st_size = lvb.lvb_size;
-
-        if (rc == 0) {
-                st->st_mtime = lvb.lvb_mtime;
-                st->st_atime = lvb.lvb_atime;
-                st->st_ctime = lvb.lvb_ctime;
-        }
-
-        RETURN(rc);
-}
-
-int llu_extent_unlock(struct ll_file_data *fd, struct inode *inode,
-                struct lov_stripe_md *lsm, int mode,
-                struct lustre_handle *lockh)
-{
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        int rc;
-        ENTRY;
-
-        CLASSERT(ELDLM_OK == 0);
-
-        /* XXX phil: can we do this?  won't it screw the file size up? */
-        if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) ||
-            (sbi->ll_flags & LL_SBI_NOLCK) || mode == LCK_NL)
-                RETURN(0);
-
-        rc = obd_cancel(sbi->ll_osc_exp, lsm, mode, lockh);
-
-        RETURN(rc);
-}
-
-#define LLAP_MAGIC 12346789
-
-struct ll_async_page {
-        int             llap_magic;
-        void           *llap_cookie;
-        int             llap_queued;
-        struct page    *llap_page;
-        struct inode   *llap_inode;
-};
-
-static void llu_ap_fill_obdo(void *data, int cmd, struct obdo *oa)
-{
-        struct ll_async_page *llap;
-        struct inode *inode;
-        struct lov_stripe_md *lsm;
-        obd_flag valid_flags;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        inode = llap->llap_inode;
-        lsm = llu_i2info(inode)->lli_smd;
-
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_valid = OBD_MD_FLID;
-        valid_flags = OBD_MD_FLTYPE | OBD_MD_FLATIME;
-        if (cmd & OBD_BRW_WRITE)
-                valid_flags |= OBD_MD_FLMTIME | OBD_MD_FLCTIME |
-                        OBD_MD_FLUID | OBD_MD_FLGID |
-                        OBD_MD_FLFID | OBD_MD_FLGENER;
-
-        obdo_from_inode(oa, inode, valid_flags);
-        EXIT;
-}
-
-static void llu_ap_update_obdo(void *data, int cmd, struct obdo *oa,
-                               obd_valid valid)
-{
-        struct ll_async_page *llap;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        obdo_from_inode(oa, llap->llap_inode, valid);
-
-        EXIT;
-}
-
-/* called for each page in a completed rpc.*/
-static int llu_ap_completion(void *data, int cmd, struct obdo *oa, int rc)
-{
-        struct ll_async_page *llap;
-        struct page *page;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        llap->llap_queued = 0;
-        page = llap->llap_page;
-
-        if (rc != 0) {
-                if (cmd & OBD_BRW_WRITE)
-                        CERROR("writeback error on page %p index %ld: %d\n",
-                               page, page->index, rc);
-        }
-        RETURN(0);
-}
-
-static struct obd_async_page_ops llu_async_page_ops = {
-        .ap_make_ready =        NULL,
-        .ap_refresh_count =     NULL,
-        .ap_fill_obdo =         llu_ap_fill_obdo,
-        .ap_update_obdo =       llu_ap_update_obdo,
-        .ap_completion =        llu_ap_completion,
-};
-
-static int llu_queue_pio(int cmd, struct llu_io_group *group,
-                         char *buf, size_t count, loff_t pos)
-{
-        struct llu_inode_info *lli = llu_i2info(group->lig_inode);
-        struct intnl_stat *st = llu_i2stat(group->lig_inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp = llu_i2obdexp(group->lig_inode);
-        struct page *pages = &group->lig_pages[group->lig_npages],*page = pages;
-        struct ll_async_page *llap = &group->lig_llaps[group->lig_npages];
-        void *llap_cookie = group->lig_llap_cookies +
-                llap_cookie_size * group->lig_npages;
-        int i, rc, npages = 0, ret_bytes = 0;
-        int local_lock;
-        ENTRY;
-
-        if (!exp)
-                RETURN(-EINVAL);
-
-        local_lock = group->lig_params->lrp_lock_mode != LCK_NL;
-        /* prepare the pages array */
-	do {
-                unsigned long index, offset, bytes;
-
-                offset = (pos & ~CFS_PAGE_MASK);
-                index = pos >> CFS_PAGE_SHIFT;
-                bytes = CFS_PAGE_SIZE - offset;
-                if (bytes > count)
-                        bytes = count;
-
-                /* prevent read beyond file range */
-                if (/* local_lock && */
-                    cmd == OBD_BRW_READ && pos + bytes >= st->st_size) {
-                        if (pos >= st->st_size)
-                                break;
-                        bytes = st->st_size - pos;
-                }
-
-                /* prepare page for this index */
-                page->index = index;
-                page->addr = buf - offset;
-
-                page->_offset = offset;
-                page->_count = bytes;
-
-                page++;
-                npages++;
-                count -= bytes;
-                pos += bytes;
-                buf += bytes;
-
-                group->lig_rwcount += bytes;
-                ret_bytes += bytes;
-        } while (count);
-
-        group->lig_npages += npages;
-
-        for (i = 0, page = pages; i < npages;
-             i++, page++, llap++, llap_cookie += llap_cookie_size){
-                llap->llap_magic = LLAP_MAGIC;
-                llap->llap_cookie = llap_cookie;
-                rc = obd_prep_async_page(exp, lsm, NULL, page,
-                                         (obd_off)page->index << CFS_PAGE_SHIFT,
-                                         &llu_async_page_ops,
-                                         llap, &llap->llap_cookie,
-                                         1 /* no cache in liblustre at all */,
-                                         NULL);
-                if (rc) {
-                        LASSERT(rc < 0);
-                        llap->llap_cookie = NULL;
-                        RETURN(rc);
-                }
-                CDEBUG(D_CACHE, "llap %p page %p group %p obj off "LPU64"\n",
-                       llap, page, llap->llap_cookie,
-                       (obd_off)pages->index << CFS_PAGE_SHIFT);
-                page->private = (unsigned long)llap;
-                llap->llap_page = page;
-                llap->llap_inode = group->lig_inode;
-
-                rc = obd_queue_group_io(exp, lsm, NULL, group->lig_oig,
-                                        llap->llap_cookie, cmd,
-                                        page->_offset, page->_count,
-                                        group->lig_params->lrp_brw_flags,
-                                        ASYNC_READY | ASYNC_URGENT |
-                                        ASYNC_COUNT_STABLE | ASYNC_GROUP_SYNC);
-                if (!local_lock && cmd == OBD_BRW_READ) {
-                        /*
-                         * In OST-side locking case short reads cannot be
-                         * detected properly.
-                         *
-                         * The root of the problem is that
-                         *
-                         * kms = lov_merge_size(lsm, 1);
-                         * if (end >= kms)
-                         *         glimpse_size(inode);
-                         * else
-                         *         st->st_size = kms;
-                         *
-                         * logic in the read code (both llite and liblustre)
-                         * only works correctly when client holds DLM lock on
-                         * [start, end]. Without DLM lock KMS can be
-                         * completely out of date, and client can either make
-                         * spurious short-read (missing concurrent write), or
-                         * return stale data (missing concurrent
-                         * truncate). For llite client this is fatal, because
-                         * incorrect data are cached and can be later sent
-                         * back to the server (vide bug 5047). This is hard to
-                         * fix by handling short-reads on the server, as there
-                         * is no easy way to communicate file size (or amount
-                         * of bytes read/written) back to the client,
-                         * _especially_ because OSC pages can be sliced and
-                         * dices into multiple RPCs arbitrary. Fortunately,
-                         * liblustre doesn't cache data and the worst case is
-                         * that we get race with concurrent write or truncate.
-                         */
-                }
-                if (rc) {
-                        LASSERT(rc < 0);
-                        RETURN(rc);
-                }
-
-                llap->llap_queued = 1;
-        }
-
-        RETURN(ret_bytes);
-}
-
-static
-struct llu_io_group * get_io_group(struct inode *inode, int maxpages,
-                                   struct lustre_rw_params *params)
-{
-        struct llu_io_group *group;
-        int rc;
-
-        if (!llap_cookie_size)
-                llap_cookie_size = obd_prep_async_page(llu_i2obdexp(inode),
-                                                       NULL, NULL, NULL, 0,
-                                                       NULL, NULL, NULL, 0,
-                                                       NULL);
-
-        OBD_ALLOC(group, LLU_IO_GROUP_SIZE(maxpages));
-        if (!group)
-                return ERR_PTR(-ENOMEM);
-
-        I_REF(inode);
-        group->lig_inode = inode;
-        group->lig_maxpages = maxpages;
-        group->lig_params = params;
-        group->lig_llaps = (struct ll_async_page *)(group + 1);
-        group->lig_pages = (struct page *)(&group->lig_llaps[maxpages]);
-        group->lig_llap_cookies = (void *)(&group->lig_pages[maxpages]);
-
-        rc = oig_init(&group->lig_oig);
-        if (rc) {
-                OBD_FREE(group, LLU_IO_GROUP_SIZE(maxpages));
-                return ERR_PTR(rc);
-        }
-
-        return group;
-}
-
-static int max_io_pages(ssize_t len, int iovlen)
-{
-        return (((len + CFS_PAGE_SIZE -1) >> CFS_PAGE_SHIFT) + 2 + iovlen - 1);
-}
-
-static
-void put_io_group(struct llu_io_group *group)
-{
-        struct lov_stripe_md *lsm = llu_i2info(group->lig_inode)->lli_smd;
-        struct obd_export *exp = llu_i2obdexp(group->lig_inode);
-        struct ll_async_page *llap = group->lig_llaps;
-        int i;
-
-        for (i = 0; i < group->lig_npages; i++, llap++) {
-                if (llap->llap_cookie)
-                        obd_teardown_async_page(exp, lsm, NULL,
-                                                llap->llap_cookie);
-        }
-
-        I_RELE(group->lig_inode);
-
-        oig_release(group->lig_oig);
-        OBD_FREE(group, LLU_IO_GROUP_SIZE(group->lig_maxpages));
-}
-
-static
-ssize_t llu_file_prwv(const struct iovec *iovec, int iovlen,
-                        _SYSIO_OFF_T pos, ssize_t len,
-                        void *private)
-{
-        struct llu_io_session *session = (struct llu_io_session *) private;
-        struct inode *inode = session->lis_inode;
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct ll_file_data *fd = lli->lli_file_data;
-        struct lustre_handle lockh = {0};
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp = NULL;
-        struct llu_io_group *iogroup;
-        struct lustre_rw_params p;
-        struct ost_lvb lvb;
-        __u64 kms;
-        int err, is_read, iovidx, ret;
-        int local_lock;
-        ssize_t ret_len = len;
-        ENTRY;
-
-        /* in a large iov read/write we'll be repeatedly called.
-         * so give a chance to answer cancel ast here
-         */
-        liblustre_wait_event(0);
-
-        exp = llu_i2obdexp(inode);
-        if (exp == NULL)
-                RETURN(-EINVAL);
-
-        if (len == 0 || iovlen == 0)
-                RETURN(0);
-
-        if (pos + len > lli->lli_maxbytes)
-                RETURN(-ERANGE);
-
-        lustre_build_lock_params(session->lis_cmd, lli->lli_open_flags,
-                                 lli->lli_sbi->ll_lco.lco_flags,
-                                 pos, len, &p);
-
-        iogroup = get_io_group(inode, max_io_pages(len, iovlen), &p);
-        if (IS_ERR(iogroup))
-                RETURN(PTR_ERR(iogroup));
-
-        local_lock = p.lrp_lock_mode != LCK_NL;
-
-        err = llu_extent_lock(fd, inode, lsm, p.lrp_lock_mode, &p.lrp_policy,
-                              &lockh, p.lrp_ast_flags);
-        if (err != ELDLM_OK)
-                GOTO(err_put, err);
-
-        is_read = (session->lis_cmd == OBD_BRW_READ);
-        if (is_read) {
-                /*
-                 * If OST-side locking is used, KMS can be completely out of
-                 * date, and, hence, cannot be used for short-read
-                 * detection. Rely in OST to handle short reads in that case.
-                 */
-                inode_init_lvb(inode, &lvb);
-                obd_merge_lvb(exp, lsm, &lvb, 1);
-                kms = lvb.lvb_size;
-                /* extent.end is last byte of the range */
-                if (p.lrp_policy.l_extent.end >= kms) {
-                        /* A glimpse is necessary to determine whether
-                         * we return a short read or some zeroes at
-                         * the end of the buffer
-                         *
-                         * In the case of OST-side locking KMS can be
-                         * completely out of date and short-reads maybe
-                         * mishandled. See llu_queue_pio() for more detailed
-                         * comment.
-                         */
-                        if ((err = llu_glimpse_size(inode))) {
-                                GOTO(err_unlock, err);
-                        }
-                } else {
-                        st->st_size = kms;
-                }
-        } else if (lli->lli_open_flags & O_APPEND) {
-                pos = st->st_size;
-        }
-
-        for (iovidx = 0; iovidx < iovlen; iovidx++) {
-                char *buf = (char *) iovec[iovidx].iov_base;
-                size_t count = iovec[iovidx].iov_len;
-
-                if (!count)
-                        continue;
-                if (len < count)
-                        count = len;
-                if (IS_BAD_PTR(buf) || IS_BAD_PTR(buf + count)) {
-                        GOTO(err_unlock, err = -EFAULT);
-                }
-
-                if (is_read) {
-                        if (/* local_lock && */ pos >= st->st_size)
-                                break;
-                } else {
-                        if (pos >= lli->lli_maxbytes) {
-                                GOTO(err_unlock, err = -EFBIG);
-                        }
-                        if (pos + count >= lli->lli_maxbytes)
-                                count = lli->lli_maxbytes - pos;
-                }
-
-                ret = llu_queue_pio(session->lis_cmd, iogroup, buf, count, pos);
-                if (ret < 0) {
-                        GOTO(err_unlock, err = ret);
-                } else {
-                        pos += ret;
-                        if (!is_read) {
-                                LASSERT(ret == count);
-                                obd_adjust_kms(exp, lsm, pos, 0);
-                                /* file size grow immediately */
-                                if (pos > st->st_size)
-                                        st->st_size = pos;
-                        }
-                        len -= ret;
-                        if (!len)
-                                break;
-                }
-        }
-        LASSERT(len == 0 || is_read); /* libsysio should guarantee this */
-
-        err = obd_trigger_group_io(exp, lsm, NULL, iogroup->lig_oig);
-        if (err)
-                GOTO(err_unlock, err);
-
-        err = oig_wait(iogroup->lig_oig);
-        if (err) {
-                CERROR("%s error: %s\n", is_read ? "read" : "write", strerror(-err));
-                GOTO(err_unlock, err);
-        }
-
-        ret = llu_extent_unlock(fd, inode, lsm, p.lrp_lock_mode, &lockh);
-        if (ret)
-                CERROR("extent unlock error %d\n", ret);
-
-        session->lis_groups[session->lis_ngroups++] = iogroup;
-        RETURN(ret_len);
-
-err_unlock:
-        llu_extent_unlock(fd, inode, lsm, p.lrp_lock_mode, &lockh);
-err_put:
-        put_io_group(iogroup);
-        RETURN((ssize_t)err);
-}
-
-static
-struct llu_io_session *get_io_session(struct inode *ino, int ngroups, int cmd)
-{
-        struct llu_io_session *session;
-
-        OBD_ALLOC(session, LLU_IO_SESSION_SIZE(ngroups));
-        if (!session)
-                return NULL;
-
-        I_REF(ino);
-        session->lis_inode = ino;
-        session->lis_max_groups = ngroups;
-        session->lis_cmd = cmd;
-        return session;
-}
-
-static void put_io_session(struct llu_io_session *session)
-{
-        int i;
-
-        for (i = 0; i < session->lis_ngroups; i++) {
-                if (session->lis_groups[i]) {
-                        put_io_group(session->lis_groups[i]);
-                        session->lis_groups[i] = NULL;
-                }
-        }
-
-        I_RELE(session->lis_inode);
-        OBD_FREE(session, LLU_IO_SESSION_SIZE(session->lis_max_groups));
-}
-
-static int llu_file_rwx(struct inode *ino,
-                        struct ioctx *ioctx,
-                        int read)
-{
-        struct llu_io_session *session;
-        ssize_t cc;
-        int cmd = read ? OBD_BRW_READ : OBD_BRW_WRITE;
-        ENTRY;
-
-        LASSERT(ioctx->ioctx_xtvlen >= 0);
-        LASSERT(ioctx->ioctx_iovlen >= 0);
-
-        liblustre_wait_event(0);
-
-        if (!ioctx->ioctx_xtvlen)
-                RETURN(0);
-
-        /* XXX consider other types later */
-        if (S_ISDIR(llu_i2stat(ino)->st_mode))
-                RETURN(-EISDIR);
-        if (!S_ISREG(llu_i2stat(ino)->st_mode))
-                RETURN(-EOPNOTSUPP);
-
-        session = get_io_session(ino, ioctx->ioctx_xtvlen * 2, cmd);
-        if (!session)
-                RETURN(-ENOMEM);
-
-        cc = _sysio_enumerate_extents(ioctx->ioctx_xtv, ioctx->ioctx_xtvlen,
-                                      ioctx->ioctx_iov, ioctx->ioctx_iovlen,
-                                      llu_file_prwv, session);
-
-        if (cc >= 0) {
-                LASSERT(!ioctx->ioctx_cc);
-                ioctx->ioctx_private = session;
-                cc = 0;
-        } else {
-                put_io_session(session);
-        }
-
-        liblustre_wait_event(0);
-        RETURN(cc);
-}
-
-int llu_iop_read(struct inode *ino,
-                 struct ioctx *ioctx)
-{
-        /* BUG: 5972 */
-        struct intnl_stat *st = llu_i2stat(ino);
-        st->st_atime = CURRENT_TIME;
-
-        return llu_file_rwx(ino, ioctx, 1);
-}
-
-int llu_iop_write(struct inode *ino,
-                  struct ioctx *ioctx)
-{
-        struct intnl_stat *st = llu_i2stat(ino);
-        st->st_mtime = st->st_ctime = CURRENT_TIME;
-
-        return llu_file_rwx(ino, ioctx, 0);
-}
-
-int llu_iop_iodone(struct ioctx *ioctx)
-{
-        struct llu_io_session *session;
-        struct llu_io_group *group;
-        int i, err = 0, rc = 0;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        session = (struct llu_io_session *) ioctx->ioctx_private;
-        LASSERT(session);
-        LASSERT(!IS_ERR(session));
-
-        for (i = 0; i < session->lis_ngroups; i++) {
-                group = session->lis_groups[i];
-                if (group) {
-                        if (!rc) {
-                                err = oig_wait(group->lig_oig);
-                                if (err)
-                                        rc = err;
-                        }
-                        if (!rc)
-                                ioctx->ioctx_cc += group->lig_rwcount;
-                        put_io_group(group);
-                        session->lis_groups[i] = NULL;
-                }
-        }
-
-        if (rc) {
-                LASSERT(rc < 0);
-                ioctx->ioctx_cc = -1;
-                ioctx->ioctx_errno = -rc;
-        }
-
-        put_io_session(session);
-        ioctx->ioctx_private = NULL;
-        liblustre_wait_event(0);
-
-        RETURN(1);
-}
diff --git a/lustre/liblustre/super.c b/lustre/liblustre/super.c
deleted file mode 100644
index 24b40580ad409a30afb359d5af9aebe2cfc455ba..0000000000000000000000000000000000000000
--- a/lustre/liblustre/super.c
+++ /dev/null
@@ -1,2102 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light Super operations
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <stdlib.h>
-#include <string.h>
-#include <assert.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-#ifndef __CYGWIN__
-# include <sys/statvfs.h>
-#else
-# include <sys/statfs.h>
-#endif
-
-#include <sysio.h>
-#ifdef HAVE_XTIO_H
-#include <xtio.h>
-#endif
-#include <fs.h>
-#include <mount.h>
-#include <inode.h>
-#ifdef HAVE_FILE_H
-#include <file.h>
-#endif
-
-#undef LIST_HEAD
-
-#include "llite_lib.h"
-
-#ifndef MAY_EXEC
-#define MAY_EXEC        1
-#define MAY_WRITE       2
-#define MAY_READ        4
-#endif
-
-#define S_IXUGO (S_IXUSR|S_IXGRP|S_IXOTH)
-
-static int ll_permission(struct inode *inode, int mask)
-{
-        struct intnl_stat *st = llu_i2stat(inode);
-        mode_t mode = st->st_mode;
-
-        if (current->fsuid == st->st_uid)
-                mode >>= 6;
-        else if (in_group_p(st->st_gid))
-                mode >>= 3;
-
-        if ((mode & mask & (MAY_READ|MAY_WRITE|MAY_EXEC)) == mask)
-                return 0;
-
-        if ((mask & (MAY_READ|MAY_WRITE)) ||
-            (st->st_mode & S_IXUGO))
-                if (capable(CAP_DAC_OVERRIDE))
-                        return 0;
-
-        if (mask == MAY_READ ||
-            (S_ISDIR(st->st_mode) && !(mask & MAY_WRITE))) {
-                if (capable(CAP_DAC_READ_SEARCH))
-                        return 0;
-        }
-
-        return -EACCES;
-}
-
-static void llu_fsop_gone(struct filesys *fs)
-{
-        struct llu_sb_info *sbi = (struct llu_sb_info *) fs->fs_private;
-        struct obd_device *obd = class_exp2obd(sbi->ll_mdc_exp);
-        int next = 0;
-        ENTRY;
-
-        list_del(&sbi->ll_conn_chain);
-        obd_unregister_lock_cancel_cb(sbi->ll_osc_exp,
-                                      llu_extent_lock_cancel_cb);
-        obd_disconnect(sbi->ll_osc_exp);
-        obd_disconnect(sbi->ll_mdc_exp);
-
-        while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, &next)) != NULL)
-                class_manual_cleanup(obd);
-
-        OBD_FREE(sbi, sizeof(*sbi));
-
-        liblustre_wait_idle();
-        EXIT;
-}
-
-static struct inode_ops llu_inode_ops;
-
-void llu_update_inode(struct inode *inode, struct mds_body *body,
-                      struct lov_stripe_md *lsm)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-
-        LASSERT ((lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0));
-        if (lsm != NULL) {
-                if (lli->lli_smd == NULL) {
-                        lli->lli_smd = lsm;
-                        lli->lli_maxbytes = lsm->lsm_maxbytes;
-                        if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES)
-                                lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
-                } else {
-                        if (lov_stripe_md_cmp(lli->lli_smd, lsm)) {
-                                CERROR("lsm mismatch for inode %lld\n",
-                                       (long long)st->st_ino);
-                                LBUG();
-                        }
-                }
-        }
-
-        if (body->valid & OBD_MD_FLID)
-                st->st_ino = body->ino;
-        if (body->valid & OBD_MD_FLATIME &&
-            body->atime > LTIME_S(st->st_atime))
-                LTIME_S(st->st_atime) = body->atime;
-        
-        /* mtime is always updated with ctime, but can be set in past.
-           As write and utime(2) may happen within 1 second, and utime's
-           mtime has a priority over write's one, so take mtime from mds 
-           for the same ctimes. */
-        if (body->valid & OBD_MD_FLCTIME &&
-            body->ctime >= LTIME_S(st->st_ctime)) {
-                LTIME_S(st->st_ctime) = body->ctime;
-                if (body->valid & OBD_MD_FLMTIME)
-                        LTIME_S(st->st_mtime) = body->mtime;
-        }
-        if (body->valid & OBD_MD_FLMODE)
-                st->st_mode = (st->st_mode & S_IFMT)|(body->mode & ~S_IFMT);
-        if (body->valid & OBD_MD_FLTYPE)
-                st->st_mode = (st->st_mode & ~S_IFMT)|(body->mode & S_IFMT);
-        if (S_ISREG(st->st_mode))
-                st->st_blksize = min(2UL * PTLRPC_MAX_BRW_SIZE, LL_MAX_BLKSIZE);
-        else
-                st->st_blksize = 4096;
-        if (body->valid & OBD_MD_FLUID)
-                st->st_uid = body->uid;
-        if (body->valid & OBD_MD_FLGID)
-                st->st_gid = body->gid;
-        if (body->valid & OBD_MD_FLNLINK)
-                st->st_nlink = body->nlink;
-        if (body->valid & OBD_MD_FLRDEV)
-                st->st_rdev = body->rdev;
-        if (body->valid & OBD_MD_FLSIZE)
-                st->st_size = body->size;
-        if (body->valid & OBD_MD_FLBLOCKS)
-                st->st_blocks = body->blocks;
-        if (body->valid & OBD_MD_FLFLAGS)
-                lli->lli_st_flags = body->flags;
-        if (body->valid & OBD_MD_FLGENER)
-                lli->lli_st_generation = body->generation;
-
-        /* fillin fid */
-        if (body->valid & OBD_MD_FLID)
-                lli->lli_fid.id = body->ino;
-        if (body->valid & OBD_MD_FLGENER)
-                lli->lli_fid.generation = body->generation;
-        if (body->valid & OBD_MD_FLTYPE)
-                lli->lli_fid.f_type = body->mode & S_IFMT;
-}
-
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
-{
-        struct llu_inode_info *lli = llu_i2info(dst);
-        struct intnl_stat *st = llu_i2stat(dst);
-
-        valid &= src->o_valid;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE,"valid "LPX64", cur time %lu/%lu, new %lu/%lu\n",
-                       src->o_valid,
-                       LTIME_S(st->st_mtime), LTIME_S(st->st_ctime),
-                       (long)src->o_mtime, (long)src->o_ctime);
-
-        if (valid & OBD_MD_FLATIME)
-                LTIME_S(st->st_atime) = src->o_atime;
-        if (valid & OBD_MD_FLMTIME)
-                LTIME_S(st->st_mtime) = src->o_mtime;
-        if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(st->st_ctime))
-                LTIME_S(st->st_ctime) = src->o_ctime;
-        if (valid & OBD_MD_FLSIZE)
-                st->st_size = src->o_size;
-        if (valid & OBD_MD_FLBLOCKS) /* allocation of space */
-                st->st_blocks = src->o_blocks;
-        if (valid & OBD_MD_FLBLKSZ)
-                st->st_blksize = src->o_blksize;
-        if (valid & OBD_MD_FLTYPE)
-                st->st_mode = (st->st_mode & ~S_IFMT) | (src->o_mode & S_IFMT);
-        if (valid & OBD_MD_FLMODE)
-                st->st_mode = (st->st_mode & S_IFMT) | (src->o_mode & ~S_IFMT);
-        if (valid & OBD_MD_FLUID)
-                st->st_uid = src->o_uid;
-        if (valid & OBD_MD_FLGID)
-                st->st_gid = src->o_gid;
-        if (valid & OBD_MD_FLFLAGS)
-                lli->lli_st_flags = src->o_flags;
-        if (valid & OBD_MD_FLGENER)
-                lli->lli_st_generation = src->o_generation;
-}
-
-#define S_IRWXUGO       (S_IRWXU|S_IRWXG|S_IRWXO)
-#define S_IALLUGO       (S_ISUID|S_ISGID|S_ISVTX|S_IRWXUGO)
-
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid)
-{
-        struct llu_inode_info *lli = llu_i2info(src);
-        struct intnl_stat *st = llu_i2stat(src);
-        obd_flag newvalid = 0;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
-                       valid, LTIME_S(st->st_mtime),
-                       LTIME_S(st->st_ctime));
-
-        if (valid & OBD_MD_FLATIME) {
-                dst->o_atime = LTIME_S(st->st_atime);
-                newvalid |= OBD_MD_FLATIME;
-        }
-        if (valid & OBD_MD_FLMTIME) {
-                dst->o_mtime = LTIME_S(st->st_mtime);
-                newvalid |= OBD_MD_FLMTIME;
-        }
-        if (valid & OBD_MD_FLCTIME) {
-                dst->o_ctime = LTIME_S(st->st_ctime);
-                newvalid |= OBD_MD_FLCTIME;
-        }
-        if (valid & OBD_MD_FLSIZE) {
-                dst->o_size = st->st_size;
-                newvalid |= OBD_MD_FLSIZE;
-        }
-        if (valid & OBD_MD_FLBLOCKS) {  /* allocation of space (x512 bytes) */
-                dst->o_blocks = st->st_blocks;
-                newvalid |= OBD_MD_FLBLOCKS;
-        }
-        if (valid & OBD_MD_FLBLKSZ) {   /* optimal block size */
-                dst->o_blksize = st->st_blksize;
-                newvalid |= OBD_MD_FLBLKSZ;
-        }
-        if (valid & OBD_MD_FLTYPE) {
-                dst->o_mode = (dst->o_mode & S_IALLUGO)|(st->st_mode & S_IFMT);
-                newvalid |= OBD_MD_FLTYPE;
-        }
-        if (valid & OBD_MD_FLMODE) {
-                dst->o_mode = (dst->o_mode & S_IFMT)|(st->st_mode & S_IALLUGO);
-                newvalid |= OBD_MD_FLMODE;
-        }
-        if (valid & OBD_MD_FLUID) {
-                dst->o_uid = st->st_uid;
-                newvalid |= OBD_MD_FLUID;
-        }
-        if (valid & OBD_MD_FLGID) {
-                dst->o_gid = st->st_gid;
-                newvalid |= OBD_MD_FLGID;
-        }
-        if (valid & OBD_MD_FLFLAGS) {
-                dst->o_flags = lli->lli_st_flags;
-                newvalid |= OBD_MD_FLFLAGS;
-        }
-        if (valid & OBD_MD_FLGENER) {
-                dst->o_generation = lli->lli_st_generation;
-                newvalid |= OBD_MD_FLGENER;
-        }
-        if (valid & OBD_MD_FLFID) {
-                dst->o_fid = st->st_ino;
-                newvalid |= OBD_MD_FLFID;
-        }
-
-        dst->o_valid |= newvalid;
-}
-
-/*
- * really does the getattr on the inode and updates its fields
- */
-int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct obd_export *exp = llu_i2obdexp(inode);
-        struct ptlrpc_request_set *set;
-        struct obd_info oinfo = { { { 0 } } };
-        struct obdo oa = { 0 };
-        obd_flag refresh_valid;
-        int rc;
-        ENTRY;
-
-        LASSERT(lsm);
-        LASSERT(lli);
-
-        oinfo.oi_md = lsm;
-        oinfo.oi_oa = &oa;
-        oa.o_id = lsm->lsm_object_id;
-        oa.o_mode = S_IFREG;
-        oa.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLSIZE |
-                OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME |
-                OBD_MD_FLCTIME;
-
-        set = ptlrpc_prep_set();
-        if (set == NULL) {
-                CERROR ("ENOMEM allocing request set\n");
-                rc = -ENOMEM;
-        } else {
-                rc = obd_getattr_async(exp, &oinfo, set);
-                if (rc == 0)
-                        rc = ptlrpc_set_wait(set);
-                ptlrpc_set_destroy(set);
-        }
-        if (rc)
-                RETURN(rc);
-
-        refresh_valid = OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME |
-                        OBD_MD_FLCTIME | OBD_MD_FLSIZE;
-
-        obdo_refresh_inode(inode, &oa, refresh_valid);
-
-        RETURN(0);
-}
-
-static struct inode* llu_new_inode(struct filesys *fs,
-                                   struct ll_fid *fid)
-{
-        struct inode *inode;
-        struct llu_inode_info *lli;
-        struct intnl_stat st = {
-                .st_dev  = 0,
-#ifndef AUTOMOUNT_FILE_NAME
-                .st_mode = fid->f_type & S_IFMT,
-#else
-                .st_mode = fid->f_type /* all of the bits! */
-#endif
-                .st_uid  = geteuid(),
-                .st_gid  = getegid(),
-        };
-
-        OBD_ALLOC(lli, sizeof(*lli));
-        if (!lli)
-                return NULL;
-
-        /* initialize lli here */
-        lli->lli_sbi = llu_fs2sbi(fs);
-        lli->lli_smd = NULL;
-        lli->lli_symlink_name = NULL;
-        lli->lli_flags = 0;
-        lli->lli_maxbytes = (__u64)(~0UL);
-        lli->lli_file_data = NULL;
-
-        lli->lli_sysio_fid.fid_data = &lli->lli_fid;
-        lli->lli_sysio_fid.fid_len = sizeof(lli->lli_fid);
-        lli->lli_fid = *fid;
-
-        /* file identifier is needed by functions like _sysio_i_find() */
-        inode = _sysio_i_new(fs, &lli->lli_sysio_fid,
-                             &st, 0, &llu_inode_ops, lli);
-
-        if (!inode)
-                OBD_FREE(lli, sizeof(*lli));
-
-        return inode;
-}
-
-static int llu_have_md_lock(struct inode *inode, __u64 lockpart)
-{
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct lustre_handle lockh;
-        struct ldlm_res_id res_id = { .name = {0} };
-        struct obd_device *obddev;
-        ldlm_policy_data_t policy = { .l_inodebits = { lockpart } };
-        int flags;
-        ENTRY;
-
-        LASSERT(inode);
-
-        obddev = sbi->ll_mdc_exp->exp_obd;
-        res_id.name[0] = llu_i2stat(inode)->st_ino;
-        res_id.name[1] = lli->lli_st_generation;
-
-        CDEBUG(D_INFO, "trying to match res "LPU64"\n", res_id.name[0]);
-
-        flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_CBPENDING | LDLM_FL_TEST_LOCK;
-        if (ldlm_lock_match(obddev->obd_namespace, flags, &res_id, LDLM_IBITS,
-                            &policy, LCK_CR|LCK_CW|LCK_PR|LCK_PW, &lockh)) {
-                RETURN(1);
-        }
-        RETURN(0);
-}
-
-static int llu_inode_revalidate(struct inode *inode)
-{
-        struct lov_stripe_md *lsm = NULL;
-        ENTRY;
-
-        if (!inode) {
-                CERROR("REPORT THIS LINE TO PETER\n");
-                RETURN(0);
-        }
-
-        if (!llu_have_md_lock(inode, MDS_INODELOCK_UPDATE)) {
-                struct lustre_md md;
-                struct ptlrpc_request *req = NULL;
-                struct llu_sb_info *sbi = llu_i2sbi(inode);
-                struct ll_fid fid;
-                unsigned long valid = OBD_MD_FLGETATTR;
-                int rc, ealen = 0;
-
-                /* Why don't we update all valid MDS fields here, if we're
-                 * doing an RPC anyways?  -phil */
-                if (S_ISREG(llu_i2stat(inode)->st_mode)) {
-                        ealen = obd_size_diskmd(sbi->ll_osc_exp, NULL);
-                        valid |= OBD_MD_FLEASIZE;
-                }
-                ll_inode2fid(&fid, inode);
-                rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, ealen, &req);
-                if (rc) {
-                        CERROR("failure %d inode %llu\n", rc,
-                               (long long)llu_i2stat(inode)->st_ino);
-                        RETURN(-abs(rc));
-                }
-                rc = mdc_req2lustre_md(req, REPLY_REC_OFF, sbi->ll_osc_exp,&md);
-
-                /* XXX Too paranoid? */
-                if (((md.body->valid ^ valid) & OBD_MD_FLEASIZE) &&
-                    !((md.body->valid & OBD_MD_FLNLINK) &&
-                      (md.body->nlink == 0))) {
-                        CERROR("Asked for %s eadata but got %s (%d)\n",
-                               (valid & OBD_MD_FLEASIZE) ? "some" : "no",
-                               (md.body->valid & OBD_MD_FLEASIZE) ? "some":"none",
-                                md.body->eadatasize);
-                }
-                if (rc) {
-                        ptlrpc_req_finished(req);
-                        RETURN(rc);
-                }
-
-
-                llu_update_inode(inode, md.body, md.lsm);
-                if (md.lsm != NULL && llu_i2info(inode)->lli_smd != md.lsm)
-                        obd_free_memmd(sbi->ll_osc_exp, &md.lsm);
-
-                if (md.body->valid & OBD_MD_FLSIZE)
-                        set_bit(LLI_F_HAVE_MDS_SIZE_LOCK,
-                                &llu_i2info(inode)->lli_flags);
-                ptlrpc_req_finished(req);
-        }
-
-        lsm = llu_i2info(inode)->lli_smd;
-        if (!lsm)       /* object not yet allocated, don't validate size */
-                RETURN(0);
-
-        /* ll_glimpse_size will prefer locally cached writes if they extend
-         * the file */
-        RETURN(llu_glimpse_size(inode));
-}
-
-static void copy_stat_buf(struct inode *ino, struct intnl_stat *b)
-{
-        *b = *llu_i2stat(ino);
-}
-
-static int llu_iop_getattr(struct pnode *pno,
-                           struct inode *ino,
-                           struct intnl_stat *b)
-{
-        int rc;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        if (!ino) {
-                LASSERT(pno);
-                LASSERT(pno->p_base->pb_ino);
-                ino = pno->p_base->pb_ino;
-        } else {
-                LASSERT(!pno || pno->p_base->pb_ino == ino);
-        }
-
-        /* libsysio might call us directly without intent lock,
-         * we must re-fetch the attrs here
-         */
-        rc = llu_inode_revalidate(ino);
-        if (!rc) {
-                copy_stat_buf(ino, b);
-                LASSERT(!llu_i2info(ino)->lli_it);
-        }
-
-        liblustre_wait_event(0);
-        RETURN(rc);
-}
-
-static int null_if_equal(struct ldlm_lock *lock, void *data)
-{
-        if (data == lock->l_ast_data) {
-                lock->l_ast_data = NULL;
-
-                if (lock->l_req_mode != lock->l_granted_mode)
-                        LDLM_ERROR(lock,"clearing inode with ungranted lock\n");
-        }
-
-        return LDLM_ITER_CONTINUE;
-}
-
-void llu_clear_inode(struct inode *inode)
-{
-        struct ll_fid fid;
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu/%lu(%p)\n",
-               (long long)llu_i2stat(inode)->st_ino, lli->lli_st_generation,
-               inode);
-
-        ll_inode2fid(&fid, inode);
-        clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &(lli->lli_flags));
-        mdc_change_cbdata(sbi->ll_mdc_exp, &fid, null_if_equal, inode);
-
-        if (lli->lli_smd)
-                obd_change_cbdata(sbi->ll_osc_exp, lli->lli_smd,
-                                  null_if_equal, inode);
-
-        if (lli->lli_smd) {
-                obd_free_memmd(sbi->ll_osc_exp, &lli->lli_smd);
-                lli->lli_smd = NULL;
-        }
-
-        if (lli->lli_symlink_name) {
-                OBD_FREE(lli->lli_symlink_name,
-                         strlen(lli->lli_symlink_name) + 1);
-                lli->lli_symlink_name = NULL;
-        }
-
-        EXIT;
-}
-
-void llu_iop_gone(struct inode *inode)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        ENTRY;
-
-        liblustre_wait_event(0);
-        llu_clear_inode(inode);
-
-        OBD_FREE(lli, sizeof(*lli));
-        EXIT;
-}
-
-static int inode_setattr(struct inode * inode, struct iattr * attr)
-{
-        unsigned int ia_valid = attr->ia_valid;
-        struct intnl_stat *st = llu_i2stat(inode);
-        int error = 0;
-
-        /*
-         * inode_setattr() is only ever invoked with ATTR_SIZE (by
-         * llu_setattr_raw()) when file has no bodies. Check this.
-         */
-        LASSERT(ergo(ia_valid & ATTR_SIZE, llu_i2info(inode)->lli_smd == NULL));
-
-        if (ia_valid & ATTR_SIZE)
-                st->st_size = attr->ia_size;
-        if (ia_valid & ATTR_UID)
-                st->st_uid = attr->ia_uid;
-        if (ia_valid & ATTR_GID)
-                st->st_gid = attr->ia_gid;
-        if (ia_valid & ATTR_ATIME)
-                st->st_atime = attr->ia_atime;
-        if (ia_valid & ATTR_MTIME)
-                st->st_mtime = attr->ia_mtime;
-        if (ia_valid & ATTR_CTIME)
-                st->st_ctime = attr->ia_ctime;
-        if (ia_valid & ATTR_MODE) {
-                st->st_mode = attr->ia_mode;
-                if (!in_group_p(st->st_gid) && !capable(CAP_FSETID))
-                        st->st_mode &= ~S_ISGID;
-        }
-        /* mark_inode_dirty(inode); */
-        return error;
-}
-
-/* If this inode has objects allocated to it (lsm != NULL), then the OST
- * object(s) determine the file size and mtime.  Otherwise, the MDS will
- * keep these values until such a time that objects are allocated for it.
- * We do the MDS operations first, as it is checking permissions for us.
- * We don't to the MDS RPC if there is nothing that we want to store there,
- * otherwise there is no harm in updating mtime/atime on the MDS if we are
- * going to do an RPC anyways.
- *
- * If we are doing a truncate, we will send the mtime and ctime updates
- * to the OST with the punch RPC, otherwise we do an explicit setattr RPC.
- * I don't believe it is possible to get e.g. ATTR_MTIME_SET and ATTR_SIZE
- * at the same time.
- */
-int llu_setattr_raw(struct inode *inode, struct iattr *attr)
-{
-        struct lov_stripe_md *lsm = llu_i2info(inode)->lli_smd;
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct intnl_stat *st = llu_i2stat(inode);
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        int ia_valid = attr->ia_valid;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu\n", (long long)st->st_ino);
-
-        if (ia_valid & ATTR_SIZE) {
-                if (attr->ia_size > ll_file_maxbytes(inode)) {
-                        CDEBUG(D_INODE, "file too large %llu > "LPU64"\n",
-                               (long long)attr->ia_size,
-                               ll_file_maxbytes(inode));
-                        RETURN(-EFBIG);
-                }
-
-                attr->ia_valid |= ATTR_MTIME | ATTR_CTIME;
-        }
-
-        /* We mark all of the fields "set" so MDS/OST does not re-set them */
-        if (attr->ia_valid & ATTR_CTIME) {
-                attr->ia_ctime = CURRENT_TIME;
-                attr->ia_valid |= ATTR_CTIME_SET;
-        }
-        if (!(ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) {
-                attr->ia_atime = CURRENT_TIME;
-                attr->ia_valid |= ATTR_ATIME_SET;
-        }
-        if (!(ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) {
-                attr->ia_mtime = CURRENT_TIME;
-                attr->ia_valid |= ATTR_MTIME_SET;
-        }
-        if ((attr->ia_valid & ATTR_CTIME) && !(attr->ia_valid & ATTR_MTIME)) {
-                /* To avoid stale mtime on mds, obtain it from ost and send 
-                   to mds. */
-                rc = llu_glimpse_size(inode);
-                if (rc) 
-                        RETURN(rc);
-                
-                attr->ia_valid |= ATTR_MTIME_SET | ATTR_MTIME;
-                attr->ia_mtime = inode->i_stbuf.st_mtime;
-        }
-
-        if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME))
-                CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %lu\n",
-                       LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime),
-                       LTIME_S(CURRENT_TIME));
-        if (lsm)
-                attr->ia_valid &= ~ATTR_SIZE;
-
-        /* If only OST attributes being set on objects, don't do MDS RPC.
-         * In that case, we need to check permissions and update the local
-         * inode ourselves so we can call obdo_from_inode() always. */
-        if (ia_valid & (lsm ? ~(ATTR_SIZE | ATTR_FROM_OPEN | ATTR_RAW) : ~0)) {
-                struct lustre_md md;
-                llu_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0);
-
-                rc = mdc_setattr(sbi->ll_mdc_exp, &op_data,
-                                  attr, NULL, 0, NULL, 0, &request);
-
-                if (rc) {
-                        ptlrpc_req_finished(request);
-                        if (rc != -EPERM && rc != -EACCES)
-                                CERROR("mdc_setattr fails: rc = %d\n", rc);
-                        RETURN(rc);
-                }
-
-                rc = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp,
-                                       &md);
-                if (rc) {
-                        ptlrpc_req_finished(request);
-                        RETURN(rc);
-                }
-
-                /* We call inode_setattr to adjust timestamps.
-                 * If there is at least some data in file, we cleared ATTR_SIZE
-                 * above to avoid invoking vmtruncate, otherwise it is important
-                 * to call vmtruncate in inode_setattr to update inode->i_size
-                 * (bug 6196) */
-                inode_setattr(inode, attr);
-                llu_update_inode(inode, md.body, md.lsm);
-                ptlrpc_req_finished(request);
-
-                if (!lsm || !S_ISREG(st->st_mode)) {
-                        CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n");
-                        RETURN(0);
-                }
-        } else {
-                /* The OST doesn't check permissions, but the alternative is
-                 * a gratuitous RPC to the MDS.  We already rely on the client
-                 * to do read/write/truncate permission checks, so is mtime OK?
-                 */
-                if (ia_valid & (ATTR_MTIME | ATTR_ATIME)) {
-                        /* from sys_utime() */
-                        if (!(ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))) {
-                                if (current->fsuid != st->st_uid &&
-                                    (rc = ll_permission(inode, MAY_WRITE)) != 0)
-                                        RETURN(rc);
-                        } else {
-                                /* from inode_change_ok() */
-                                if (current->fsuid != st->st_uid &&
-                                    !capable(CAP_FOWNER))
-                                        RETURN(-EPERM);
-                        }
-                }
-
-                /* Won't invoke llu_vmtruncate(), as we already cleared
-                 * ATTR_SIZE */
-                inode_setattr(inode, attr);
-        }
-
-        if (ia_valid & ATTR_SIZE) {
-                ldlm_policy_data_t policy = { .l_extent = {attr->ia_size,
-                                                           OBD_OBJECT_EOF} };
-                struct lustre_handle lockh = { 0, };
-                struct lustre_handle match_lockh = { 0, };
-
-                int err;
-                int flags = LDLM_FL_TEST_LOCK; /* for assertion check below */
-                int lock_mode;
-                obd_flag obd_flags;
-
-                /* check that there are no matching locks */
-                LASSERT(obd_match(sbi->ll_osc_exp, lsm, LDLM_EXTENT, &policy,
-                                  LCK_PW, &flags, inode, &match_lockh) <= 0);
-
-                /* XXX when we fix the AST intents to pass the discard-range
-                 * XXX extent, make ast_flags always LDLM_AST_DISCARD_DATA
-                 * XXX here. */
-                flags = (attr->ia_size == 0) ? LDLM_AST_DISCARD_DATA : 0;
-
-                if (sbi->ll_lco.lco_flags & OBD_CONNECT_TRUNCLOCK) {
-                        lock_mode = LCK_NL;
-                        obd_flags = OBD_FL_TRUNCLOCK;
-                        CDEBUG(D_INODE, "delegating locking to the OST");
-                } else {
-                        lock_mode = LCK_PW;
-                        obd_flags = 0;
-                }
-
-                /* with lock_mode == LK_NL no lock is taken. */
-                rc = llu_extent_lock(NULL, inode, lsm, lock_mode, &policy,
-                                     &lockh, flags);
-                if (rc != ELDLM_OK) {
-                        if (rc > 0)
-                                RETURN(-ENOLCK);
-                        RETURN(rc);
-                }
-
-                rc = llu_vmtruncate(inode, attr->ia_size, obd_flags);
-
-                /* unlock now as we don't mind others file lockers racing with
-                 * the mds updates below? */
-                err = llu_extent_unlock(NULL, inode, lsm, lock_mode, &lockh);
-                if (err) {
-                        CERROR("llu_extent_unlock failed: %d\n", err);
-                        if (!rc)
-                                rc = err;
-                }
-        } else if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) {
-                struct obd_info oinfo = { { { 0 } } };
-                struct obdo oa;
-
-                CDEBUG(D_INODE, "set mtime on OST inode %llu to %lu\n",
-                       (long long)st->st_ino, LTIME_S(attr->ia_mtime));
-                oa.o_id = lsm->lsm_object_id;
-                oa.o_valid = OBD_MD_FLID;
-
-                obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
-                                            OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-
-                oinfo.oi_oa = &oa;
-                oinfo.oi_md = lsm;
-
-                rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL);
-                if (rc)
-                        CERROR("obd_setattr_async fails: rc=%d\n", rc);
-        }
-        RETURN(rc);
-}
-
-/* here we simply act as a thin layer to glue it with
- * llu_setattr_raw(), which is copy from kernel
- */
-static int llu_iop_setattr(struct pnode *pno,
-                           struct inode *ino,
-                           unsigned mask,
-                           struct intnl_stat *stbuf)
-{
-        struct iattr iattr;
-        int rc;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-        LASSERT(!(mask & ~(SETATTR_MTIME | SETATTR_ATIME |
-                           SETATTR_UID | SETATTR_GID |
-                           SETATTR_LEN | SETATTR_MODE)));
-        memset(&iattr, 0, sizeof(iattr));
-
-        if (mask & SETATTR_MODE) {
-                iattr.ia_mode = stbuf->st_mode;
-                iattr.ia_valid |= ATTR_MODE;
-        }
-        if (mask & SETATTR_MTIME) {
-                iattr.ia_mtime = stbuf->st_mtime;
-                iattr.ia_valid |= ATTR_MTIME | ATTR_MTIME_SET;
-        }
-        if (mask & SETATTR_ATIME) {
-                iattr.ia_atime = stbuf->st_atime;
-                iattr.ia_valid |= ATTR_ATIME | ATTR_ATIME_SET;
-        }
-        if (mask & SETATTR_UID) {
-                iattr.ia_uid = stbuf->st_uid;
-                iattr.ia_valid |= ATTR_UID;
-        }
-        if (mask & SETATTR_GID) {
-                iattr.ia_gid = stbuf->st_gid;
-                iattr.ia_valid |= ATTR_GID;
-        }
-        if (mask & SETATTR_LEN) {
-                iattr.ia_size = stbuf->st_size; /* XXX signed expansion problem */
-                iattr.ia_valid |= ATTR_SIZE;
-        }
-
-        iattr.ia_valid |= ATTR_RAW | ATTR_CTIME;
-        iattr.ia_ctime = CURRENT_TIME;
-
-        rc = llu_setattr_raw(ino, &iattr);
-        liblustre_wait_idle();
-        RETURN(rc);
-}
-
-#define EXT2_LINK_MAX           32000
-
-static int llu_iop_symlink_raw(struct pnode *pno, const char *tgt)
-{
-        struct inode *dir = pno->p_base->pb_parent->pb_ino;
-        struct qstr *qstr = &pno->p_base->pb_name;
-        const char *name = qstr->name;
-        int len = qstr->len;
-        struct ptlrpc_request *request = NULL;
-        struct llu_sb_info *sbi = llu_i2sbi(dir);
-        struct mdc_op_data op_data;
-        int err = -EMLINK;
-        ENTRY;
-
-        liblustre_wait_event(0);
-        if (llu_i2stat(dir)->st_nlink >= EXT2_LINK_MAX)
-                RETURN(err);
-
-        llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0);
-        err = mdc_create(sbi->ll_mdc_exp, &op_data,
-                         tgt, strlen(tgt) + 1, S_IFLNK | S_IRWXUGO,
-                         current->fsuid, current->fsgid, current->cap_effective,
-                         0, &request);
-        ptlrpc_req_finished(request);
-        liblustre_wait_event(0);
-        RETURN(err);
-}
-
-static int llu_readlink_internal(struct inode *inode,
-                                 struct ptlrpc_request **request,
-                                 char **symname)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct llu_sb_info *sbi = llu_i2sbi(inode);
-        struct ll_fid fid;
-        struct mds_body *body;
-        struct intnl_stat *st = llu_i2stat(inode);
-        int rc, symlen = st->st_size + 1;
-        ENTRY;
-
-        *request = NULL;
-
-        if (lli->lli_symlink_name) {
-                *symname = lli->lli_symlink_name;
-                CDEBUG(D_INODE, "using cached symlink %s\n", *symname);
-                RETURN(0);
-        }
-
-        ll_inode2fid(&fid, inode);
-        rc = mdc_getattr(sbi->ll_mdc_exp, &fid,
-                         OBD_MD_LINKNAME, symlen, request);
-        if (rc) {
-                CERROR("inode %llu: rc = %d\n", (long long)st->st_ino, rc);
-                RETURN(rc);
-        }
-
-        body = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF,
-                              sizeof(*body));
-        LASSERT(body != NULL);
-        LASSERT(lustre_rep_swabbed(*request, REPLY_REC_OFF));
-
-        if ((body->valid & OBD_MD_LINKNAME) == 0) {
-                CERROR ("OBD_MD_LINKNAME not set on reply\n");
-                GOTO (failed, rc = -EPROTO);
-        }
-
-        LASSERT(symlen != 0);
-        if (body->eadatasize != symlen) {
-                CERROR("inode %llu: symlink length %d not expected %d\n",
-                       (long long)st->st_ino, body->eadatasize - 1, symlen - 1);
-                GOTO(failed, rc = -EPROTO);
-        }
-
-        *symname = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF + 1,
-                                   symlen);
-        if (*symname == NULL ||
-            strnlen(*symname, symlen) != symlen - 1) {
-                /* not full/NULL terminated */
-                CERROR("inode %llu: symlink not NULL terminated string"
-                       "of length %d\n", (long long)st->st_ino, symlen - 1);
-                GOTO(failed, rc = -EPROTO);
-        }
-
-        OBD_ALLOC(lli->lli_symlink_name, symlen);
-        /* do not return an error if we cannot cache the symlink locally */
-        if (lli->lli_symlink_name)
-                memcpy(lli->lli_symlink_name, *symname, symlen);
-
-        RETURN(0);
-
- failed:
-        ptlrpc_req_finished (*request);
-        RETURN (-EPROTO);
-}
-
-static int llu_iop_readlink(struct pnode *pno, char *data, size_t bufsize)
-{
-        struct inode *inode = pno->p_base->pb_ino;
-        struct ptlrpc_request *request;
-        char *symname;
-        int rc;
-        ENTRY;
-
-        liblustre_wait_event(0);
-        rc = llu_readlink_internal(inode, &request, &symname);
-        if (rc)
-                GOTO(out, rc);
-
-        LASSERT(symname);
-        strncpy(data, symname, bufsize);
-        rc = strlen(symname);
-
-        ptlrpc_req_finished(request);
- out:
-        liblustre_wait_event(0);
-        RETURN(rc);
-}
-
-static int llu_iop_mknod_raw(struct pnode *pno,
-                             mode_t mode,
-                             dev_t dev)
-{
-        struct ptlrpc_request *request = NULL;
-        struct inode *dir = pno->p_parent->p_base->pb_ino;
-        struct llu_sb_info *sbi = llu_i2sbi(dir);
-        struct mdc_op_data op_data;
-        int err = -EMLINK;
-        ENTRY;
-
-        liblustre_wait_event(0);
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu\n",
-               (int)pno->p_base->pb_name.len, pno->p_base->pb_name.name,
-               (long long)llu_i2stat(dir)->st_ino);
-
-        if (llu_i2stat(dir)->st_nlink >= EXT2_LINK_MAX)
-                RETURN(err);
-
-        switch (mode & S_IFMT) {
-        case 0:
-        case S_IFREG:
-                mode |= S_IFREG; /* for mode = 0 case, fallthrough */
-        case S_IFCHR:
-        case S_IFBLK:
-        case S_IFIFO:
-        case S_IFSOCK:
-                llu_prepare_mdc_op_data(&op_data, dir, NULL,
-                                        pno->p_base->pb_name.name,
-                                        pno->p_base->pb_name.len,
-                                        0);
-                err = mdc_create(sbi->ll_mdc_exp, &op_data, NULL, 0, mode,
-                                 current->fsuid, current->fsgid,
-                                 current->cap_effective, dev, &request);
-                ptlrpc_req_finished(request);
-                break;
-        case S_IFDIR:
-                err = -EPERM;
-                break;
-        default:
-                err = -EINVAL;
-        }
-        liblustre_wait_event(0);
-        RETURN(err);
-}
-
-static int llu_iop_link_raw(struct pnode *old, struct pnode *new)
-{
-        struct inode *src = old->p_base->pb_ino;
-        struct inode *dir = new->p_parent->p_base->pb_ino;
-        const char *name = new->p_base->pb_name.name;
-        int namelen = new->p_base->pb_name.len;
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        int rc;
-        ENTRY;
-
-        LASSERT(src);
-        LASSERT(dir);
-
-        liblustre_wait_event(0);
-        llu_prepare_mdc_op_data(&op_data, src, dir, name, namelen, 0);
-        rc = mdc_link(llu_i2sbi(src)->ll_mdc_exp, &op_data, &request);
-        ptlrpc_req_finished(request);
-        liblustre_wait_event(0);
-
-        RETURN(rc);
-}
-
-/*
- * libsysio will clear the inode immediately after return
- */
-static int llu_iop_unlink_raw(struct pnode *pno)
-{
-        struct inode *dir = pno->p_base->pb_parent->pb_ino;
-        struct qstr *qstr = &pno->p_base->pb_name;
-        const char *name = qstr->name;
-        int len = qstr->len;
-        struct inode *target = pno->p_base->pb_ino;
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        int rc;
-        ENTRY;
-
-        LASSERT(target);
-
-        liblustre_wait_event(0);
-        llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0);
-        rc = mdc_unlink(llu_i2sbi(dir)->ll_mdc_exp, &op_data, &request);
-        if (!rc)
-                rc = llu_objects_destroy(request, dir);
-        ptlrpc_req_finished(request);
-        liblustre_wait_idle();
-
-        RETURN(rc);
-}
-
-static int llu_iop_rename_raw(struct pnode *old, struct pnode *new)
-{
-        struct inode *src = old->p_parent->p_base->pb_ino;
-        struct inode *tgt = new->p_parent->p_base->pb_ino;
-        const char *oldname = old->p_base->pb_name.name;
-        int oldnamelen = old->p_base->pb_name.len;
-        const char *newname = new->p_base->pb_name.name;
-        int newnamelen = new->p_base->pb_name.len;
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        int rc;
-        ENTRY;
-
-        LASSERT(src);
-        LASSERT(tgt);
-
-        liblustre_wait_event(0);
-        llu_prepare_mdc_op_data(&op_data, src, tgt, NULL, 0, 0);
-        rc = mdc_rename(llu_i2sbi(src)->ll_mdc_exp, &op_data,
-                        oldname, oldnamelen, newname, newnamelen,
-                        &request);
-        if (!rc) {
-                rc = llu_objects_destroy(request, src);
-        }
-
-        ptlrpc_req_finished(request);
-        liblustre_wait_idle();
-
-        RETURN(rc);
-}
-
-#ifdef _HAVE_STATVFS
-static int llu_statfs_internal(struct llu_sb_info *sbi,
-                               struct obd_statfs *osfs, __u64 max_age)
-{
-        struct obd_statfs obd_osfs;
-        int rc;
-        ENTRY;
-
-        rc = obd_statfs(class_exp2obd(sbi->ll_mdc_exp), osfs, max_age, 0);
-        if (rc) {
-                CERROR("mdc_statfs fails: rc = %d\n", rc);
-                RETURN(rc);
-        }
-
-        CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
-               osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
-
-        rc = obd_statfs_rqset(class_exp2obd(sbi->ll_osc_exp),
-                              &obd_osfs, max_age, 0);
-        if (rc) {
-                CERROR("obd_statfs fails: rc = %d\n", rc);
-                RETURN(rc);
-        }
-
-        CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
-               obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree,
-               obd_osfs.os_files);
-
-        osfs->os_blocks = obd_osfs.os_blocks;
-        osfs->os_bfree = obd_osfs.os_bfree;
-        osfs->os_bavail = obd_osfs.os_bavail;
-
-        /* If we don't have as many objects free on the OST as inodes
-         * on the MDS, we reduce the total number of inodes to
-         * compensate, so that the "inodes in use" number is correct.
-         */
-        if (obd_osfs.os_ffree < osfs->os_ffree) {
-                osfs->os_files = (osfs->os_files - osfs->os_ffree) +
-                        obd_osfs.os_ffree;
-                osfs->os_ffree = obd_osfs.os_ffree;
-        }
-
-        RETURN(rc);
-}
-
-static int llu_statfs(struct llu_sb_info *sbi, struct statfs *sfs)
-{
-        struct obd_statfs osfs;
-        int rc;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:\n");
-
-        /* For now we will always get up-to-date statfs values, but in the
-         * future we may allow some amount of caching on the client (e.g.
-         * from QOS or lprocfs updates). */
-        rc = llu_statfs_internal(sbi, &osfs, cfs_time_current_64() - HZ);
-        if (rc)
-                return rc;
-
-        statfs_unpack(sfs, &osfs);
-
-        if (sizeof(sfs->f_blocks) == 4) {
-                while (osfs.os_blocks > ~0UL) {
-                        sfs->f_bsize <<= 1;
-
-                        osfs.os_blocks >>= 1;
-                        osfs.os_bfree >>= 1;
-                        osfs.os_bavail >>= 1;
-                }
-        }
-
-        sfs->f_blocks = osfs.os_blocks;
-        sfs->f_bfree = osfs.os_bfree;
-        sfs->f_bavail = osfs.os_bavail;
-
-        return 0;
-}
-
-static int llu_iop_statvfs(struct pnode *pno,
-                           struct inode *ino,
-                           struct intnl_statvfs *buf)
-{
-        struct statfs fs;
-        int rc;
-        ENTRY;
-
-        liblustre_wait_event(0);
-
-#ifndef __CYGWIN__
-        LASSERT(pno->p_base->pb_ino);
-        rc = llu_statfs(llu_i2sbi(pno->p_base->pb_ino), &fs);
-        if (rc)
-                RETURN(rc);
-
-        /* from native driver */
-        buf->f_bsize = fs.f_bsize;  /* file system block size */
-        buf->f_frsize = fs.f_bsize; /* file system fundamental block size */
-        buf->f_blocks = fs.f_blocks;
-        buf->f_bfree = fs.f_bfree;
-        buf->f_bavail = fs.f_bavail;
-        buf->f_files = fs.f_files;  /* Total number serial numbers */
-        buf->f_ffree = fs.f_ffree;  /* Number free serial numbers */
-        buf->f_favail = fs.f_ffree; /* Number free ser num for non-privileged*/
-        buf->f_fsid = fs.f_fsid.__val[1];
-        buf->f_flag = 0;            /* No equiv in statfs; maybe use type? */
-        buf->f_namemax = fs.f_namelen;
-#endif
-
-        liblustre_wait_event(0);
-        RETURN(0);
-}
-#endif /* _HAVE_STATVFS */
-
-static int llu_iop_mkdir_raw(struct pnode *pno, mode_t mode)
-{
-        struct inode *dir = pno->p_base->pb_parent->pb_ino;
-        struct qstr *qstr = &pno->p_base->pb_name;
-        const char *name = qstr->name;
-        int len = qstr->len;
-        struct ptlrpc_request *request = NULL;
-        struct intnl_stat *st = llu_i2stat(dir);
-        struct mdc_op_data op_data;
-        int err = -EMLINK;
-        ENTRY;
-
-        liblustre_wait_event(0);
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n", len, name,
-               (long long)st->st_ino, llu_i2info(dir)->lli_st_generation, dir);
-
-        if (st->st_nlink >= EXT2_LINK_MAX)
-                RETURN(err);
-
-        llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, 0);
-        err = mdc_create(llu_i2sbi(dir)->ll_mdc_exp, &op_data, NULL, 0, mode | S_IFDIR,
-                         current->fsuid, current->fsgid, current->cap_effective,
-                         0, &request);
-        ptlrpc_req_finished(request);
-        liblustre_wait_event(0);
-        RETURN(err);
-}
-
-static int llu_iop_rmdir_raw(struct pnode *pno)
-{
-        struct inode *dir = pno->p_base->pb_parent->pb_ino;
-        struct qstr *qstr = &pno->p_base->pb_name;
-        const char *name = qstr->name;
-        int len = qstr->len;
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        int rc;
-        ENTRY;
-
-        liblustre_wait_event(0);
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%llu/%lu(%p)\n", len, name,
-               (long long)llu_i2stat(dir)->st_ino,
-               llu_i2info(dir)->lli_st_generation, dir);
-
-        llu_prepare_mdc_op_data(&op_data, dir, NULL, name, len, S_IFDIR);
-        rc = mdc_unlink(llu_i2sbi(dir)->ll_mdc_exp, &op_data, &request);
-        ptlrpc_req_finished(request);
-
-        liblustre_wait_event(0);
-        RETURN(rc);
-}
-
-#ifdef O_DIRECT
-#define FCNTL_FLMASK (O_APPEND|O_NONBLOCK|O_ASYNC|O_DIRECT)
-#else
-#define FCNTL_FLMASK (O_APPEND|O_NONBLOCK|O_ASYNC)
-#endif
-#define FCNTL_FLMASK_INVALID (O_NONBLOCK|O_ASYNC)
-
-/* refer to ll_file_flock() for details */
-int llu_file_flock(struct inode *ino, int cmd, struct file_lock *file_lock)
-{
-        struct llu_inode_info *lli = llu_i2info(ino);
-        struct intnl_stat *st = llu_i2stat(ino);
-        struct ldlm_res_id res_id =
-                { .name = {st->st_ino, lli->lli_st_generation, LDLM_FLOCK} };
-        struct ldlm_enqueue_info einfo = { LDLM_FLOCK, 0, NULL,
-                ldlm_flock_completion_ast, NULL, file_lock };
-        struct lustre_handle lockh = {0};
-        ldlm_policy_data_t flock;
-        int flags = 0;
-        int rc;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%llu file_lock=%p\n",
-               (unsigned long long) st->st_ino, file_lock);
-
-        flock.l_flock.pid = file_lock->fl_pid;
-        flock.l_flock.start = file_lock->fl_start;
-        flock.l_flock.end = file_lock->fl_end;
-
-        switch (file_lock->fl_type) {
-        case F_RDLCK:
-                einfo.ei_mode = LCK_PR;
-                break;
-        case F_UNLCK:
-                einfo.ei_mode = LCK_NL;
-                break;
-        case F_WRLCK:
-                einfo.ei_mode = LCK_PW;
-                break;
-        default:
-                CERROR("unknown fcntl lock type: %d\n", file_lock->fl_type);
-                LBUG();
-        }
-
-        switch (cmd) {
-        case F_SETLKW:
-#ifdef F_SETLKW64
-#if F_SETLKW64 != F_SETLKW
-        case F_SETLKW64:
-#endif
-#endif
-                flags = 0;
-                break;
-        case F_SETLK:
-#ifdef F_SETLK64
-#if F_SETLK64 != F_SETLK
-        case F_SETLK64:
-#endif
-#endif
-                flags = LDLM_FL_BLOCK_NOWAIT;
-                break;
-        case F_GETLK:
-#ifdef F_GETLK64
-#if F_GETLK64 != F_GETLK
-        case F_GETLK64:
-#endif
-#endif
-                flags = LDLM_FL_TEST_LOCK;
-                file_lock->fl_type = einfo.ei_mode;
-                break;
-        default:
-                CERROR("unknown fcntl cmd: %d\n", cmd);
-                LBUG();
-        }
-
-        CDEBUG(D_DLMTRACE, "inode=%llu, pid=%u, flags=%#x, mode=%u, "
-               "start="LPU64", end="LPU64"\n",
-               (unsigned long long) st->st_ino, flock.l_flock.pid,
-               flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
-
-        rc = ldlm_cli_enqueue(llu_i2mdcexp(ino), NULL, &einfo, res_id, 
-                              &flock, &flags, NULL, 0, NULL, &lockh, 0);
-
-        RETURN(rc);
-}
-
-static int assign_type(struct file_lock *fl, int type)
-{
-        switch (type) {
-        case F_RDLCK:
-        case F_WRLCK:
-        case F_UNLCK:
-                fl->fl_type = type;
-                return 0;
-        default:
-                return -EINVAL;
-        }
-}
-
-static int flock_to_posix_lock(struct inode *ino,
-                               struct file_lock *fl,
-                               struct flock *l)
-{
-        switch (l->l_whence) {
-        /* XXX: only SEEK_SET is supported in lustre */
-        case SEEK_SET:
-                fl->fl_start = 0;
-                break;
-        default:
-                return -EINVAL;
-        }
-
-        fl->fl_end = l->l_len - 1;
-        if (l->l_len < 0)
-                return -EINVAL;
-        if (l->l_len == 0)
-                fl->fl_end = OFFSET_MAX;
-
-        fl->fl_pid = getpid();
-        fl->fl_flags = FL_POSIX;
-        fl->fl_notify = NULL;
-        fl->fl_insert = NULL;
-        fl->fl_remove = NULL;
-        /* XXX: these fields can't be filled with suitable values,
-                but I think lustre doesn't use them.
-         */
-        fl->fl_owner = NULL;
-        fl->fl_file = NULL;
-
-        return assign_type(fl, l->l_type);
-}
-
-static int llu_fcntl_getlk(struct inode *ino, struct flock *flock)
-{
-        struct file_lock fl;
-        int error;
-
-        error = -EINVAL;
-        if ((flock->l_type != F_RDLCK) && (flock->l_type != F_WRLCK))
-                goto out;
-
-        error = flock_to_posix_lock(ino, &fl, flock);
-        if (error)
-                goto out;
-
-        error = llu_file_flock(ino, F_GETLK, &fl);
-        if (error)
-                goto out;
-
-        flock->l_type = F_UNLCK;
-        if (fl.fl_type != F_UNLCK) {
-                flock->l_pid = fl.fl_pid;
-                flock->l_start = fl.fl_start;
-                flock->l_len = fl.fl_end == OFFSET_MAX ? 0:
-                        fl.fl_end - fl.fl_start + 1;
-                flock->l_whence = SEEK_SET;
-                flock->l_type = fl.fl_type;
-        }
-
-out:
-        return error;
-}
-
-static int llu_fcntl_setlk(struct inode *ino, int cmd, struct flock *flock)
-{
-        struct file_lock fl;
-        int flags = llu_i2info(ino)->lli_open_flags + 1;
-        int error;
-
-        error = flock_to_posix_lock(ino, &fl, flock);
-        if (error)
-                goto out;
-        if (cmd == F_SETLKW)
-                fl.fl_flags |= FL_SLEEP;
-
-        error = -EBADF;
-        switch (flock->l_type) {
-        case F_RDLCK:
-                if (!(flags & FMODE_READ))
-                        goto out;
-                break;
-        case F_WRLCK:
-                if (!(flags & FMODE_WRITE))
-                        goto out;
-                break;
-        case F_UNLCK:
-                break;
-        default:
-                error = -EINVAL;
-                goto out;
-        }
-
-        error = llu_file_flock(ino, cmd, &fl);
-        if (error)
-                goto out;
-
-out:
-        return error;
-}
-
-static int llu_iop_fcntl(struct inode *ino, int cmd, va_list ap, int *rtn)
-{
-        struct llu_inode_info *lli = llu_i2info(ino);
-        long flags;
-        struct flock *flock;
-        long err = 0;
-
-        liblustre_wait_event(0);
-        switch (cmd) {
-        case F_GETFL:
-                *rtn = lli->lli_open_flags;
-                break;
-        case F_SETFL:
-                flags = va_arg(ap, long);
-                flags &= FCNTL_FLMASK;
-                if (flags & FCNTL_FLMASK_INVALID) {
-                        LCONSOLE_ERROR_MSG(0x010, "liblustre does not support "
-                                           "the O_NONBLOCK or O_ASYNC flags. "
-                                           "Please fix your application.\n");
-                        *rtn = -1;
-                        err = -EINVAL;
-                        break;
-                }
-                lli->lli_open_flags = (int)(flags & FCNTL_FLMASK) |
-                                      (lli->lli_open_flags & ~FCNTL_FLMASK);
-                *rtn = 0;
-                break;
-        case F_GETLK:
-#ifdef F_GETLK64
-#if F_GETLK64 != F_GETLK
-        case F_GETLK64:
-#endif
-#endif
-                flock = va_arg(ap, struct flock *);
-                err = llu_fcntl_getlk(ino, flock);
-                *rtn = err? -1: 0;
-                break;
-        case F_SETLK:
-#ifdef F_SETLKW64
-#if F_SETLKW64 != F_SETLKW
-        case F_SETLKW64:
-#endif
-#endif
-        case F_SETLKW:
-#ifdef F_SETLK64
-#if F_SETLK64 != F_SETLK
-        case F_SETLK64:
-#endif
-#endif
-                flock = va_arg(ap, struct flock *);
-                err = llu_fcntl_setlk(ino, cmd, flock);
-                *rtn = err? -1: 0;
-                break;
-        default:
-                CERROR("unsupported fcntl cmd %x\n", cmd);
-                *rtn = -1;
-                err = -ENOSYS;
-                break;
-        }
-
-        liblustre_wait_event(0);
-        return err;
-}
-
-static int llu_get_grouplock(struct inode *inode, unsigned long arg)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct ll_file_data *fd = lli->lli_file_data;
-        ldlm_policy_data_t policy = { .l_extent = { .start = 0,
-                                                    .end = OBD_OBJECT_EOF}};
-        struct lustre_handle lockh = { 0 };
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        ldlm_error_t err;
-        int flags = 0;
-        ENTRY;
-
-        if (fd->fd_flags & LL_FILE_GROUP_LOCKED) {
-                RETURN(-EINVAL);
-        }
-
-        policy.l_extent.gid = arg;
-        if (lli->lli_open_flags & O_NONBLOCK)
-                flags = LDLM_FL_BLOCK_NOWAIT;
-
-        err = llu_extent_lock(fd, inode, lsm, LCK_GROUP, &policy, &lockh,
-                              flags);
-        if (err)
-                RETURN(err);
-
-        fd->fd_flags |= LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK;
-        fd->fd_gid = arg;
-        memcpy(&fd->fd_cwlockh, &lockh, sizeof(lockh));
-
-        RETURN(0);
-}
-
-static int llu_put_grouplock(struct inode *inode, unsigned long arg)
-{
-        struct llu_inode_info *lli = llu_i2info(inode);
-        struct ll_file_data *fd = lli->lli_file_data;
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        ldlm_error_t err;
-        ENTRY;
-
-        if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED))
-                RETURN(-EINVAL);
-
-        if (fd->fd_gid != arg)
-                RETURN(-EINVAL);
-
-        fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK);
-
-        err = llu_extent_unlock(fd, inode, lsm, LCK_GROUP, &fd->fd_cwlockh);
-        if (err)
-                RETURN(err);
-
-        fd->fd_gid = 0;
-        memset(&fd->fd_cwlockh, 0, sizeof(fd->fd_cwlockh));
-
-        RETURN(0);
-}
-
-static int llu_lov_dir_setstripe(struct inode *ino, unsigned long arg)
-{
-        struct llu_sb_info *sbi = llu_i2sbi(ino); 
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        struct iattr attr = { 0 };
-        struct lov_user_md lum, *lump = (struct lov_user_md *)arg;
-        int rc = 0;
-
-        llu_prepare_mdc_op_data(&op_data, ino, NULL, NULL, 0, 0);
-
-        LASSERT(sizeof(lum) == sizeof(*lump));
-        LASSERT(sizeof(lum.lmm_objects[0]) ==
-                sizeof(lump->lmm_objects[0]));
-        rc = copy_from_user(&lum, lump, sizeof(lum));
-        if (rc)
-                return(-EFAULT);
-
-        if (lum.lmm_magic != LOV_USER_MAGIC)
-                RETURN(-EINVAL);
-
-        if (lum.lmm_magic != cpu_to_le32(LOV_USER_MAGIC))
-                lustre_swab_lov_user_md(&lum);
-
-        /* swabbing is done in lov_setstripe() on server side */
-        rc = mdc_setattr(sbi->ll_mdc_exp, &op_data,
-                         &attr, &lum, sizeof(lum), NULL, 0, &request);
-        if (rc) {
-                ptlrpc_req_finished(request);
-                if (rc != -EPERM && rc != -EACCES)
-                        CERROR("mdc_setattr fails: rc = %d\n", rc);
-                return rc;
-        }
-        ptlrpc_req_finished(request);
-
-        return rc;
-}
-
-static int llu_lov_setstripe_ea_info(struct inode *ino, int flags,
-                                     struct lov_user_md *lum, int lum_size)
-{
-        struct llu_sb_info *sbi = llu_i2sbi(ino); 
-        struct obd_export *exp = llu_i2obdexp(ino);
-        struct llu_inode_info *lli = llu_i2info(ino);
-        struct llu_inode_info *lli2 = NULL;
-        struct lov_stripe_md *lsm;
-        struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags};
-        struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_CR,
-                llu_mdc_blocking_ast, ldlm_completion_ast, NULL, NULL };
-
-        struct ptlrpc_request *req = NULL;
-        struct lustre_md md;
-        struct mdc_op_data data;
-        struct lustre_handle lockh;
-        int rc = 0;
-        ENTRY;
-
-        lsm = lli->lli_smd;
-        if (lsm) {
-                CDEBUG(D_IOCTL, "stripe already exists for ino "LPU64"\n",
-                       lli->lli_fid.id);
-                return -EEXIST;
-        }
-
-        OBD_ALLOC(lli2, sizeof(struct llu_inode_info));
-        if (!lli2)
-                return -ENOMEM;
-        
-        memcpy(lli2, lli, sizeof(struct llu_inode_info));
-        lli2->lli_open_count = 0;
-        lli2->lli_it = NULL;
-        lli2->lli_file_data = NULL;
-        lli2->lli_smd = NULL;
-        lli2->lli_symlink_name = NULL;
-        ino->i_private = lli2;
-
-        llu_prepare_mdc_op_data(&data, NULL, ino, NULL, 0, O_RDWR);
-
-        rc = mdc_enqueue(sbi->ll_mdc_exp, &einfo, &oit, &data,
-                         &lockh, lum, lum_size, LDLM_FL_INTENT_ONLY);
-        if (rc)
-                GOTO(out, rc);
-        
-        req = oit.d.lustre.it_data;
-        rc = it_open_error(DISP_IT_EXECD, &oit);
-        if (rc) {
-                req->rq_replay = 0;
-                GOTO(out, rc);
-        }
-        
-        rc = it_open_error(DISP_OPEN_OPEN, &oit);
-        if (rc) {
-                req->rq_replay = 0;
-                GOTO(out, rc);
-        }
-        
-        rc = mdc_req2lustre_md(req, DLM_REPLY_REC_OFF, exp, &md);
-        if (rc)
-                GOTO(out, rc);
-        
-        llu_update_inode(ino, md.body, md.lsm);
-        lli->lli_smd = lli2->lli_smd;
-        lli2->lli_smd = NULL;
-
-        llu_local_open(lli2, &oit);
-       
-        /* release intent */
-        if (lustre_handle_is_used(&lockh))
-                ldlm_lock_decref(&lockh, LCK_CR);
-
-        ptlrpc_req_finished(req);
-        req = NULL;
-        
-        rc = llu_file_release(ino);
- out:
-        ino->i_private = lli;
-        if (lli2)
-                OBD_FREE(lli2, sizeof(struct llu_inode_info));
-        if (req != NULL)
-                ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-static int llu_lov_file_setstripe(struct inode *ino, unsigned long arg)
-{
-        struct lov_user_md lum, *lump = (struct lov_user_md *)arg;
-        int rc;
-        int flags = FMODE_WRITE;
-        ENTRY;
-
-        LASSERT(sizeof(lum) == sizeof(*lump));
-        LASSERT(sizeof(lum.lmm_objects[0]) == sizeof(lump->lmm_objects[0]));
-        rc = copy_from_user(&lum, lump, sizeof(lum));
-        if (rc)
-                RETURN(-EFAULT);
-
-        rc = llu_lov_setstripe_ea_info(ino, flags, &lum, sizeof(lum));
-        RETURN(rc);
-}
-
-static int llu_lov_setstripe(struct inode *ino, unsigned long arg)
-{
-        struct intnl_stat *st = llu_i2stat(ino);
-        if (S_ISREG(st->st_mode))
-                return llu_lov_file_setstripe(ino, arg);
-        if (S_ISDIR(st->st_mode))
-                return llu_lov_dir_setstripe(ino, arg);
-        
-        return -EINVAL; 
-}
-
-static int llu_lov_getstripe(struct inode *ino, unsigned long arg)
-{
-        struct lov_stripe_md *lsm = llu_i2info(ino)->lli_smd;
-
-        if (!lsm)
-                RETURN(-ENODATA);
-
-        return obd_iocontrol(LL_IOC_LOV_GETSTRIPE, llu_i2obdexp(ino), 0, lsm,
-                            (void *)arg);
-}
-
-static int llu_iop_ioctl(struct inode *ino, unsigned long int request,
-                         va_list ap)
-{
-        unsigned long arg;
-        int rc;
-
-        liblustre_wait_event(0);
-
-        switch (request) {
-        case LL_IOC_GROUP_LOCK:
-                arg = va_arg(ap, unsigned long);
-                rc = llu_get_grouplock(ino, arg);
-                break;
-        case LL_IOC_GROUP_UNLOCK:
-                arg = va_arg(ap, unsigned long);
-                rc = llu_put_grouplock(ino, arg);
-                break;
-        case LL_IOC_LOV_SETSTRIPE:
-                arg = va_arg(ap, unsigned long);
-                rc = llu_lov_setstripe(ino, arg);
-                break;
-        case LL_IOC_LOV_GETSTRIPE:
-                arg = va_arg(ap, unsigned long);
-                rc = llu_lov_getstripe(ino, arg);
-                break;
-        default:
-                CERROR("did not support ioctl cmd %lx\n", request);
-                rc = -ENOSYS;
-                break;
-        }
-
-        liblustre_wait_event(0);
-        return rc;
-}
-
-/*
- * we already do syncronous read/write
- */
-static int llu_iop_sync(struct inode *inode)
-{
-        liblustre_wait_event(0);
-        return 0;
-}
-
-static int llu_iop_datasync(struct inode *inode)
-{
-        liblustre_wait_event(0);
-        return 0;
-}
-
-struct filesys_ops llu_filesys_ops =
-{
-        fsop_gone: llu_fsop_gone,
-};
-
-struct inode *llu_iget(struct filesys *fs, struct lustre_md *md)
-{
-        struct inode *inode;
-        struct ll_fid fid;
-        struct file_identifier fileid = {&fid, sizeof(fid)};
-
-        if ((md->body->valid &
-             (OBD_MD_FLGENER | OBD_MD_FLID | OBD_MD_FLTYPE)) !=
-            (OBD_MD_FLGENER | OBD_MD_FLID | OBD_MD_FLTYPE)) {
-                CERROR("bad md body valid mask "LPX64"\n", md->body->valid);
-                LBUG();
-                return ERR_PTR(-EPERM);
-        }
-
-        /* try to find existing inode */
-        fid.id = md->body->ino;
-        fid.generation = md->body->generation;
-        fid.f_type = md->body->mode & S_IFMT;
-
-        inode = _sysio_i_find(fs, &fileid);
-        if (inode) {
-                struct llu_inode_info *lli = llu_i2info(inode);
-
-                if (inode->i_zombie ||
-                    lli->lli_st_generation != md->body->generation) {
-                        I_RELE(inode);
-                }
-                else {
-                        llu_update_inode(inode, md->body, md->lsm);
-                        return inode;
-                }
-        }
-
-        inode = llu_new_inode(fs, &fid);
-        if (inode)
-                llu_update_inode(inode, md->body, md->lsm);
-
-        return inode;
-}
-
-extern struct list_head lustre_profile_list;
-
-static int
-llu_fsswop_mount(const char *source,
-                 unsigned flags,
-                 const void *data __IS_UNUSED,
-                 struct pnode *tocover,
-                 struct mount **mntp)
-{
-        struct filesys *fs;
-        struct inode *root;
-        struct pnode_base *rootpb;
-        struct obd_device *obd;
-        struct ll_fid rootfid;
-        struct llu_sb_info *sbi;
-        struct obd_statfs osfs;
-        static struct qstr noname = { NULL, 0, 0 };
-        struct ptlrpc_request *request = NULL;
-        struct lustre_handle mdc_conn = {0, };
-        struct lustre_handle osc_conn = {0, };
-        struct lustre_md md;
-        class_uuid_t uuid;
-        struct config_llog_instance cfg = {0, };
-        char ll_instance[sizeof(sbi) * 2 + 1];
-        struct lustre_profile *lprof;
-        char *zconf_mgsnid, *zconf_profile;
-        char *osc = NULL, *mdc = NULL;
-        int async = 1, err = -EINVAL;
-        struct obd_connect_data ocd = {0,};
-
-        ENTRY;
-
-        if (ll_parse_mount_target(source,
-                                  &zconf_mgsnid,
-                                  &zconf_profile)) {
-                CERROR("mal-formed target %s\n", source);
-                RETURN(err);
-        }
-        if (!zconf_mgsnid || !zconf_profile) {
-                printf("Liblustre: invalid target %s\n", source);
-                RETURN(err);
-        }
-        /* allocate & initialize sbi */
-        OBD_ALLOC(sbi, sizeof(*sbi));
-        if (!sbi)
-                RETURN(-ENOMEM);
-
-        CFS_INIT_LIST_HEAD(&sbi->ll_conn_chain);
-        ll_generate_random_uuid(uuid);
-        class_uuid_unparse(uuid, &sbi->ll_sb_uuid);
-
-        /* generate a string unique to this super, let's try
-         the address of the super itself.*/
-        sprintf(ll_instance, "%p", sbi);
-
-        /* retrive & parse config log */
-        cfg.cfg_instance = ll_instance;
-        cfg.cfg_uuid = sbi->ll_sb_uuid;
-        err = liblustre_process_log(&cfg, zconf_mgsnid, zconf_profile, 1);
-        if (err < 0) {
-                CERROR("Unable to process log: %s\n", zconf_profile);
-                GOTO(out_free, err);
-        }
-
-        lprof = class_get_profile(zconf_profile);
-        if (lprof == NULL) {
-                CERROR("No profile found: %s\n", zconf_profile);
-                GOTO(out_free, err = -EINVAL);
-        }
-        OBD_ALLOC(osc, strlen(lprof->lp_osc) + strlen(ll_instance) + 2);
-        sprintf(osc, "%s-%s", lprof->lp_osc, ll_instance);
-
-        OBD_ALLOC(mdc, strlen(lprof->lp_mdc) + strlen(ll_instance) + 2);
-        sprintf(mdc, "%s-%s", lprof->lp_mdc, ll_instance);
-
-        if (!osc) {
-                CERROR("no osc\n");
-                GOTO(out_free, err = -EINVAL);
-        }
-        if (!mdc) {
-                CERROR("no mdc\n");
-                GOTO(out_free, err = -EINVAL);
-        }
-
-        fs = _sysio_fs_new(&llu_filesys_ops, flags, sbi);
-        if (!fs) {
-                err = -ENOMEM;
-                goto out_free;
-        }
-
-        obd = class_name2obd(mdc);
-        if (!obd) {
-                CERROR("MDC %s: not setup or attached\n", mdc);
-                GOTO(out_free, err = -EINVAL);
-        }
-        obd_set_info_async(obd->obd_self_export, strlen("async"), "async",
-                           sizeof(async), &async, NULL);
-
-        ocd.ocd_connect_flags = OBD_CONNECT_IBITS | OBD_CONNECT_VERSION |
-                OBD_CONNECT_AT;
-#ifdef LIBLUSTRE_POSIX_ACL
-        ocd.ocd_connect_flags |= OBD_CONNECT_ACL;
-#endif
-        ocd.ocd_ibits_known = MDS_INODELOCK_FULL;
-        ocd.ocd_version = LUSTRE_VERSION_CODE;
-
-        /* setup mdc */
-        err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, &ocd, NULL);
-        if (err) {
-                CERROR("cannot connect to %s: rc = %d\n", mdc, err);
-                GOTO(out_free, err);
-        }
-        sbi->ll_mdc_exp = class_conn2export(&mdc_conn);
-
-        err = obd_statfs(obd, &osfs, 100000000, 0);
-        if (err)
-                GOTO(out_mdc, err);
-
-        /*
-         * FIXME fill fs stat data into sbi here!!! FIXME
-         */
-
-        /* setup osc */
-        obd = class_name2obd(osc);
-        if (!obd) {
-                CERROR("OSC %s: not setup or attached\n", osc);
-                GOTO(out_mdc, err = -EINVAL);
-        }
-        obd_set_info_async(obd->obd_self_export, strlen("async"), "async",
-                           sizeof(async), &async, NULL);
-
-        obd->obd_upcall.onu_owner = &sbi->ll_lco;
-        obd->obd_upcall.onu_upcall = ll_ocd_update;
-
-        ocd.ocd_connect_flags = OBD_CONNECT_SRVLOCK | OBD_CONNECT_REQPORTAL |
-                OBD_CONNECT_VERSION | OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_AT;
-        ocd.ocd_version = LUSTRE_VERSION_CODE;
-        err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, &ocd, NULL);
-        if (err) {
-                CERROR("cannot connect to %s: rc = %d\n", osc, err);
-                GOTO(out_mdc, err);
-        }
-        sbi->ll_osc_exp = class_conn2export(&osc_conn);
-        sbi->ll_lco.lco_flags = ocd.ocd_connect_flags;
-
-        err = obd_register_lock_cancel_cb(sbi->ll_osc_exp,
-                                          llu_extent_lock_cancel_cb);
-        if (err) {
-                CERROR("cannot register lock cancel callback: rc = %d\n", err);
-                GOTO(out_osc, err);
-        }
-
-        mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp);
-
-        err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid);
-        if (err) {
-                CERROR("cannot mds_connect: rc = %d\n", err);
-                GOTO(out_lock_cn_cb, err);
-        }
-        CDEBUG(D_SUPER, "rootfid "LPU64"\n", rootfid.id);
-        sbi->ll_rootino = rootfid.id;
-
-        /* fetch attr of root inode */
-        err = mdc_getattr(sbi->ll_mdc_exp, &rootfid,
-                          OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS, 0, 
-                          &request);
-        if (err) {
-                CERROR("mdc_getattr failed for root: rc = %d\n", err);
-                GOTO(out_lock_cn_cb, err);
-        }
-
-        err = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, &md);
-        if (err) {
-                CERROR("failed to understand root inode md: rc = %d\n",err);
-                GOTO(out_request, err);
-        }
-
-        LASSERT(sbi->ll_rootino != 0);
-
-        root = llu_iget(fs, &md);
-        if (!root || IS_ERR(root)) {
-                CERROR("fail to generate root inode\n");
-                GOTO(out_request, err = -EBADF);
-        }
-
-        /*
-         * Generate base path-node for root.
-         */
-        rootpb = _sysio_pb_new(&noname, NULL, root);
-        if (!rootpb) {
-                err = -ENOMEM;
-                goto out_inode;
-        }
-
-        err = _sysio_do_mount(fs, rootpb, flags, tocover, mntp);
-        if (err) {
-                _sysio_pb_gone(rootpb);
-                goto out_inode;
-        }
-
-        ptlrpc_req_finished(request);
-
-        CDEBUG(D_SUPER, "LibLustre: %s mounted successfully!\n", source);
-        liblustre_wait_idle();
-
-        return 0;
-
-out_inode:
-        _sysio_i_gone(root);
-out_request:
-        ptlrpc_req_finished(request);
-out_lock_cn_cb:
-        obd_unregister_lock_cancel_cb(sbi->ll_osc_exp,
-                                      llu_extent_lock_cancel_cb);
-out_osc:
-        obd_disconnect(sbi->ll_osc_exp);
-out_mdc:
-        obd_disconnect(sbi->ll_mdc_exp);
-out_free:
-        if (osc)
-                OBD_FREE(osc, strlen(osc) + 1);
-        if (mdc)
-                OBD_FREE(mdc, strlen(mdc) + 1);
-        OBD_FREE(sbi, sizeof(*sbi));
-
-        liblustre_wait_idle();
-        return err;
-}
-
-struct fssw_ops llu_fssw_ops = {
-        llu_fsswop_mount
-};
-
-static struct inode_ops llu_inode_ops = {
-        inop_lookup:    llu_iop_lookup,
-        inop_getattr:   llu_iop_getattr,
-        inop_setattr:   llu_iop_setattr,
-        inop_filldirentries:     llu_iop_filldirentries,
-        inop_mkdir:     llu_iop_mkdir_raw,
-        inop_rmdir:     llu_iop_rmdir_raw,
-        inop_symlink:   llu_iop_symlink_raw,
-        inop_readlink:  llu_iop_readlink,
-        inop_open:      llu_iop_open,
-        inop_close:     llu_iop_close,
-        inop_link:      llu_iop_link_raw,
-        inop_unlink:    llu_iop_unlink_raw,
-        inop_rename:    llu_iop_rename_raw,
-        inop_pos:       llu_iop_pos,
-        inop_read:      llu_iop_read,
-        inop_write:     llu_iop_write,
-        inop_iodone:    llu_iop_iodone,
-        inop_fcntl:     llu_iop_fcntl,
-        inop_sync:      llu_iop_sync,
-        inop_datasync:  llu_iop_datasync,
-        inop_ioctl:     llu_iop_ioctl,
-        inop_mknod:     llu_iop_mknod_raw,
-#ifdef _HAVE_STATVFS
-        inop_statvfs:   llu_iop_statvfs,
-#endif
-        inop_gone:      llu_iop_gone,
-};
diff --git a/lustre/liblustre/tests/.cvsignore b/lustre/liblustre/tests/.cvsignore
deleted file mode 100644
index eb542ffaaea9f69c20cf4fa8d252216626ed945e..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/.cvsignore
+++ /dev/null
@@ -1,8 +0,0 @@
-Makefile
-Makefile.in
-.deps
-echo_test
-recovery_small
-replay_ost_single
-replay_single
-sanity
diff --git a/lustre/liblustre/tests/Makefile.am b/lustre/liblustre/tests/Makefile.am
deleted file mode 100644
index f3906bfb9b83a392353dad4bcc7250a8e741d7d7..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/Makefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-## Liblustre excecutables & libraries Makefile
-
-AM_CPPFLAGS = -I$(SYSIO)/include -I/opt/lam/include $(LLCPPFLAGS) -I$(top_srcdir)/lnet/ulnds
-AM_CFLAGS = $(LLCFLAGS)
-AM_LIBS = $(LIBEFENCE) $(LIBREADLINE)
-
-LLIB_EXEC = $(top_builddir)/lustre/utils/liblustreapi.a $(top_builddir)/lustre/liblustre/liblustre.a $(CAP_LIBS) $(PTHREAD_LIBS) $(ZLIB)
-
-if LIBLUSTRE
-noinst_LIBRARIES = libtestcommon.a
-
-if LIBLUSTRE_TESTS
-noinst_PROGRAMS = sanity echo_test
-
-if !CRAY_XT3
-noinst_PROGRAMS += recovery_small replay_single replay_ost_single
-endif # !CRAY_XT3
-
-if MPITESTS
-noinst_PROGRAMS += test_lock_cancel
-endif # MPITESTS
-
-liblustre_testdir=$(libdir)/lustre/liblustre/tests
-liblustre_test_PROGRAMS = $(noinst_PROGRAMS)
-liblustre_test_LIBRARIES = $(noinst_LIBRARIES)
-
-endif # LIBLUSTRE_TESTS
-endif # LIBLUSTRE
-
-libtestcommon_a_SOURCES = test_common.c test_common.h
-
-echo_test_SOURCES = echo_test.c  $(top_srcdir)/lustre/utils/parser.c $(top_srcdir)/lustre/utils/obd.c $(top_srcdir)/lustre/utils/lustre_cfg.c
-echo_test_CFLAGS = $(LL_CFLAGS)
-echo_test_LDADD = $(top_builddir)/lustre/liblustre/liblsupport.a $(LIBREADLINE) $(CAP_LIBS) $(PTHREAD_LIBS) $(ZLIB)
-echo_test_DEPENDENCIES=$(top_builddir)/lustre/liblustre/liblsupport.a
-
-sanity_SOURCES = sanity.c
-sanity_CFLAGS = $(LL_CFLAGS)
-sanity_LDADD := libtestcommon.a $(LLIB_EXEC)
-sanity_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a
-
-recovery_small_SOURCES = recovery_small.c
-recovery_small_CFLAGS = $(LL_CFLAGS)
-recovery_small_LDADD := libtestcommon.a $(LLIB_EXEC) 
-recovery_small_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a
-
-replay_single_SOURCES = replay_single.c
-replay_single_CFLAGS = $(LL_CFLAGS)
-replay_single_LDADD := libtestcommon.a $(LLIB_EXEC)
-replay_single_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a
-
-replay_ost_single_SOURCES = replay_ost_single.c
-replay_ost_single_CFLAGS = $(LL_CFLAGS)
-replay_ost_single_LDADD := libtestcommon.a $(LLIB_EXEC)
-replay_ost_single_DEPENDENCIES = $(top_builddir)/lustre/liblustre/liblustre.a libtestcommon.a
-
-if MPITESTS
-test_lock_cancel_SOURCES = test_lock_cancel.c
-test_lock_cancel_CFLAGS = $(LL_CFLAGS) -I/opt/lam/include
-test_lock_cancel_LDADD :=  $(LLIB_EXEC)  -L/opt/lam/lib -lmpi -llam
-endif
-
-
diff --git a/lustre/liblustre/tests/echo_test.c b/lustre/liblustre/tests/echo_test.c
deleted file mode 100644
index 62a11de2c4a74f3c88123c0743f6dadb3d189d4f..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/echo_test.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002-2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <liblustre.h>
-#include <obd.h>
-#include <obd_class.h>
-#include <obd_ost.h>
-
-#define LIBLUSTRE_TEST 1
-#include "../utils/lctl.c"
-
-#include "../lutil.h"
-
-
-#ifdef CRAY_XT3
-int _sysio_lustre_init(void)
-{
-        /*
-         * This is an aweful HACK.  Basically the problem is on
-         * Catamount, the build system links in liblustre.a to
-         * all the test executables, and at this point its not
-         * clear how to modify the build system to prevent this
-         * from happening.  So providing our own call to 
-         * _sysio_lustre_init() that does nothing, prevents
-         * liblustre.a from initializing.
-         *
-         * Why is liblustre.a initializing a problem anyway.  Well
-         * this main() in this module calls init_obdclass(), as 
-         * well as the llite_lib.c's _sysio_lustre_init().  Two
-         * calls to init_obdclass() cause an assertion.  Secondly
-         * it doesn't even logically make sense, this is module
-         * does not need lustre file system functionality, it's 
-         * just the echo_tester.
-         * 
-         */
-        /*lprintf("--> THIS OVERRIDES liblustre.a INITIALIZATION <--\n");*/
-        return 0;
-}
-#endif
-
-
-
-extern int class_handle_ioctl(unsigned int cmd, unsigned long arg);
-
-static int liblustre_ioctl(int dev_id, unsigned int opc, void *ptr)
-{
-	int   rc = -EINVAL;
-	
-	switch (dev_id) {
-	default:
-		fprintf(stderr, "Unexpected device id %d\n", dev_id);
-		abort();
-		break;
-		
-	case OBD_DEV_ID:
-		rc = class_handle_ioctl(opc, (unsigned long)ptr);
-		break;
-	}
-
-	return rc;
-}
-
-static char *echo_server_nid = NULL;
-static char *echo_server_ostname = "obd1";
-static char *osc_dev_name = "OSC_DEV_NAME";
-static char *echo_dev_name = "ECHO_CLIENT_DEV_NAME";
-
-static int connect_echo_client(void)
-{
-	struct lustre_cfg *lcfg;
-        struct lustre_cfg_bufs bufs;
-        lnet_nid_t nid;
-	char *peer = "ECHO_PEER_NID";
-	class_uuid_t osc_uuid, echo_uuid;
-	struct obd_uuid osc_uuid_str, echo_uuid_str;
-	int err;
-	ENTRY;
-
-        ll_generate_random_uuid(osc_uuid);
-        class_uuid_unparse(osc_uuid, &osc_uuid_str);
-        ll_generate_random_uuid(echo_uuid);
-        class_uuid_unparse(echo_uuid, &echo_uuid_str);
-
-        nid = libcfs_str2nid(echo_server_nid);
-        if (nid == LNET_NID_ANY) {
-                CERROR("Can't parse NID %s\n", echo_server_nid);
-                RETURN(-EINVAL);
-        }
-
-        /* add uuid */
-        lustre_cfg_bufs_reset(&bufs, NULL);
-        lustre_cfg_bufs_set_string(&bufs, 1, peer);
-        lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs);
-        lcfg->lcfg_nid = nid;
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed add_uuid\n");
-                RETURN(-EINVAL);
-	}
-
-        /* attach osc */
-        lustre_cfg_bufs_reset(&bufs, osc_dev_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_OSC_NAME);
-        lustre_cfg_bufs_set_string(&bufs, 2, osc_uuid_str.uuid);
-        lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed attach osc\n");
-                RETURN(-EINVAL);
-	}
-
-	/* setup osc */
-        lustre_cfg_bufs_reset(&bufs, osc_dev_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, echo_server_ostname);
-        lustre_cfg_bufs_set_string(&bufs, 2, peer);
-        lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed setup osc\n");
-                RETURN(-EINVAL);
-	}
-
-	/* attach echo_client */
-        lustre_cfg_bufs_reset(&bufs, echo_dev_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, "echo_client");
-        lustre_cfg_bufs_set_string(&bufs, 2, echo_uuid_str.uuid);
-        lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed attach echo_client\n");
-                RETURN(-EINVAL);
-	}
-
-	/* setup echo_client */
-        lustre_cfg_bufs_reset(&bufs, echo_dev_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, osc_dev_name);
-        lustre_cfg_bufs_set_string(&bufs, 2, NULL);
-        lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed setup echo_client\n");
-                RETURN(-EINVAL);
-	}
-
-	RETURN(0);
-}
-
-static int disconnect_echo_client(void)
-{
-	struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg = NULL;
-	int err;
-	ENTRY;
-
-	/* cleanup echo_client */
-        lustre_cfg_bufs_reset(&bufs, echo_dev_name);
-        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-        err = class_process_config(lcfg);
-        if (err < 0) {
-                lustre_cfg_free(lcfg);
-		CERROR("failed cleanup echo_client\n");
-                RETURN(-EINVAL);
-	}
-
-	/* detach echo_client */
-        lcfg->lcfg_command = LCFG_DETACH;
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed detach echo_client\n");
-                RETURN(-EINVAL);
-	}
-
-	/* cleanup osc */
-        lustre_cfg_bufs_reset(&bufs, osc_dev_name);
-        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-        err = class_process_config(lcfg);
-        if (err < 0) {
-                lustre_cfg_free(lcfg);
-		CERROR("failed cleanup osc device\n");
-                RETURN(-EINVAL);
-	}
-
-	/* detach osc */
-        lcfg->lcfg_command = LCFG_DETACH;
-        err = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        if (err < 0) {
-		CERROR("failed detach osc device\n");
-                RETURN(-EINVAL);
-	}
-
-	RETURN(0);
-}
-
-static void usage(const char *s)
-{
-	printf("Usage: %s -s ost_host_name [-n ost_name] [-x lctl_options ...]\n", s);
-	printf("    ost_host_name: the host name of echo server\n");
-	printf("    ost_name: ost name, default is \"obd1\"\n");
-        printf("    lctl_options: options to pass to lctl.\n");
-        printf("            (e.g. -x --device 1 test_getattr 10000 -5)\n");
-}
-
-extern int time_ptlwait1;
-extern int time_ptlwait2;
-extern int time_ptlselect;
-
-int main(int argc, char **argv) 
-{
-	int c, rc;
-	int xindex  = -1;  /* index of -x option */
-
-        /* loop until all options are consumed or we hit
-         * a -x option 
-         */
-	while ((c = getopt(argc, argv, "s:n:x:")) != -1 && 
-               xindex == -1) {
-		switch (c) {
-		case 's':
-			echo_server_nid = optarg;
-			break;
-		case 'n':
-			echo_server_ostname = optarg;
-			break;
-		case 'x':
-			xindex = optind-1;
-			break;
-		default:
-			usage(argv[0]);
-			return 1;
-		}
-	}
-
-        /*
-         * Only warn with usage() if the -x option isn't specificed
-         * because when using -x this check is not valid.
-         */
-        if (optind != argc && xindex == -1)
-                usage(argv[0]);
-
-	if (!echo_server_nid) {
-		usage(argv[0]);
-		return 1;
-	}
-
-        libcfs_debug = 0;
-        libcfs_subsystem_debug = 0;
-
-        liblustre_init_random();
-
-	if (liblustre_init_current(argv[0]) ||
-	    init_obdclass() || init_lib_portals() ||
-	    ptlrpc_init() ||
-	    mdc_init() ||
-	    lov_init() ||
-	    osc_init() ||
-	    echo_client_init()) {
-		printf("error\n");
-		return 1;
-	}
-
-	rc = connect_echo_client();
-	if (rc)
-		return rc;
-
-	set_ioc_handler(liblustre_ioctl);
-
-
-        /*
-         * If the -x option is not specified pass no args to lctl
-         * otherwise pass all the options after the "-x" to lctl
-         *
-         * HACK: in the case when the -x option is specified
-         * lctl sees argv[0] == "-x" and not the real argv[0] seen
-         * in this function.  If that is a problem, a mapping will
-         * have to be done to fix that.  However for normal functioning
-         * it seems to be irrelavant
-         */
-	if( xindex == -1 )
-		rc = lctl_main(1, &argv[0]);
-	else
-		rc = lctl_main(argc-xindex+1, &argv[xindex-1]);
-
-	rc |= disconnect_echo_client();
-
-	return rc;
-}
diff --git a/lustre/liblustre/tests/recovery_small.c b/lustre/liblustre/tests/recovery_small.c
deleted file mode 100644
index 6af93f126cf64359a88df17859cb0f1e2e747c59..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/recovery_small.c
+++ /dev/null
@@ -1,390 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define _BSD_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-#include <getopt.h>
-
-#include <sysio.h>
-#include <mount.h>
-
-#include "test_common.h"
-
-#define MAX_STRING_SIZE 2048
-
-static struct {
-        const char   *name;
-        unsigned long code;
-} drop_arr [] =
-{
-        {"MDS_REQUEST", 0x123},
-        {"MDS_REPLY", 0x122},
-        {NULL, 0}
-};
-
-static int drop_index = 0;
-
-static char mds_server[1024] = {0, };
-static char ssh_cmd[MAX_STRING_SIZE] = {0,};
-
-int do_stat(const char *name, struct stat *buf)
-{
-	struct stat stat;
-        int rc;
-
-	rc = lstat(name, &stat);
-        if (rc) {
-		printf("error %d stat %s\n", rc, name);
-		exit(1);
-	}
-        if (buf)
-                memcpy(buf, &stat, sizeof(*buf));
-
-	return 0;
-}
-
-void prepare_reg(const char *path)
-{
-        int fd, rc;
-
-        fd = open(path, O_RDWR|O_CREAT, 00644);
-        if (fd < 0) {
-                printf("error %d create %s\n", fd, path);
-                exit(1);
-        }
-
-        rc = close(fd);
-        if (rc) {
-                printf("error %d close %s\n", rc, path);
-                exit(1);
-        }
-}
-
-void cleanup_reg(const char *path)
-{
-        int rc;
-
-        rc = unlink(path);
-        if (rc) {
-                printf("error %d unlink %s\n", rc, path);
-                exit(1);
-        }
-}
-
-void prepare_dir(const char *path)
-{
-        int rc;
-
-        rc = mkdir(path, 00644);
-        if (rc < 0) {
-                printf("error %d mkdir %s\n", rc, path);
-                exit(1);
-        }
-}
-
-void cleanup_dir(const char *path)
-{
-        int rc;
-
-        rc = rmdir(path);
-        if (rc) {
-                printf("error %d unlink %s\n", rc, path);
-                exit(1);
-        }
-}
-
-#define FAIL()                                                             \
-    do {                                                                   \
-        char cmd[MAX_STRING_SIZE];                                         \
-        int rc;                                                            \
-                                                                           \
-        if (drop_arr[drop_index].name) {                                   \
-            printf("server drops next %s\n", drop_arr[drop_index].name);   \
-            sprintf(cmd,                                                   \
-                    "%s %s \"echo %lu > /proc/sys/lustre/fail_loc\"",      \
-                    ssh_cmd, mds_server, drop_arr[drop_index].code);       \
-            if (system(cmd)) {                                             \
-                printf("error excuting remote command: %d\n", rc);         \
-                exit(rc);                                                  \
-            }                                                              \
-        }                                                                  \
-    } while (0)
-
-#define RECOVER()                                                          \
-    do {                                                                   \
-        char cmd[1024];                                                    \
-                                                                           \
-        if (drop_arr[drop_index].name) {                                   \
-            sprintf(cmd, "%s %s \"echo 0 > /proc/sys/lustre/fail_loc\"",   \
-                    ssh_cmd, mds_server);                                  \
-            system(cmd);                                                   \
-        }                                                                  \
-    } while (0)
-
-#define ENTRY(str)                                                      \
-        do {                                                            \
-                char buf[100];                                          \
-                int len;                                                \
-                sprintf(buf, "===== START: %s ", (str));                \
-                len = strlen(buf);                                      \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', 100-len);                  \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-        } while (0)
-
-#define LEAVE()                                                         \
-        do {                                                            \
-                printf("----- END TEST successfully ---");              \
-                printf("-----------------------------");                \
-                printf("-------------------\n");                        \
-        } while (0)
-
-
-void t1()
-{
-        char *path="/mnt/lustre/test_t1";
-        ENTRY("create/delete");
-
-        FAIL();
-        t_touch(path);
-        RECOVER();
-        FAIL();
-        t_unlink(path);
-        RECOVER();
-        LEAVE();
-}
-
-void t2()
-{
-        char *path="/mnt/lustre/test_t2";
-        ENTRY("mkdir/rmdir");
-
-        FAIL();
-        t_mkdir(path);
-        RECOVER();
-        FAIL();
-        t_rmdir(path);
-        RECOVER();
-        LEAVE();
-}
-
-void t3()
-{
-        char *path="/mnt/lustre/test_t3";
-        ENTRY("regular stat");
-
-        t_touch(path);
-        FAIL();
-        t_check_stat(path, NULL);
-        RECOVER();
-        t_unlink(path);
-        LEAVE();
-}
-
-void t4()
-{
-        char *path="/mnt/lustre/test_t4";
-        ENTRY("dir stat");
-
-        t_mkdir(path);
-        FAIL();
-        t_check_stat(path, NULL);
-        RECOVER();
-        t_rmdir(path);
-        LEAVE();
-}
-
-void t5()
-{
-        char *path="/mnt/lustre/test_t5";
-        const int bufsize = 4096;
-	char wbuf[bufsize], rbuf[bufsize];
-        int npages = 100;
-        int fd, rc, i;
-        ENTRY("sequential page aligned file I/O");
-
-        t_touch(path);
-
-	fd = t_open(path);
-
-	for (i = 0; i < npages; i++ ) {
-                memset(wbuf, i, bufsize);
-		rc = write(fd, wbuf, bufsize);
-                if (rc != bufsize) {
-                        printf("write error %d (i = %d)\n", rc, i);
-                        exit(1);
-                }
-	}
-        printf("succefully write %d pages\n", npages);
-
-	lseek(fd, 0, SEEK_SET);
-
-	for (i = 0; i < npages; i++ ) {
-		memset(rbuf, 0, bufsize);
-		rc = read(fd, rbuf, bufsize);
-                if (rc != bufsize) {
-                        printf("read error %d (i = %d)\n", rc, i);
-                        exit(1);
-                }
-	}
-        printf("succefully read & verified %d pages\n", npages);
-
-        t_close(fd);
-
-        t_unlink(path);
-        LEAVE();
-}
-
-void t6()
-{
-        char *path="/mnt/lustre/test_t6";
-        char *path2="/mnt/lustre/test_t6_link";
-        ENTRY("symlink");
-
-        t_touch(path);
-        FAIL();
-        t_symlink(path, path2);
-        RECOVER();
-        t_check_stat(path2, NULL);
-        t_unlink(path2);
-        t_unlink(path);
-        LEAVE();
-}
-
-void t7()
-{
-        char *path="/mnt/lustre/test_t7";
-        ENTRY("mknod");
-
-        FAIL();
-        t_mknod(path, S_IFCHR | 0644, 5, 4);
-        RECOVER();
-        t_check_stat(path, NULL);
-        t_unlink(path);
-        LEAVE();
-}
-
-extern int libcfs_debug;
-extern int libcfs_subsystem_debug;
-
-extern void __liblustre_setup_(void);
-extern void __liblustre_cleanup_(void);
-
-void usage(const char *cmd)
-{
-        printf("Usage: \t%s -s mds_hostname --target mdsnid:/mdsname/profile\n", cmd);
-        printf("       \t%s -s mds_hostname --dumpfile dumpfile\n", cmd);
-        exit(-1);
-}
-
-int main(int argc, char * argv[])
-{
-        int opt_index, c;
-        char cmd[1024];
-        static struct option long_opts[] = {
-                {"target", 1, 0, 0},
-                {"dumpfile", 1, 0, 0},
-                {"ssh", 1, 0, 0},
-                {0, 0, 0, 0}
-        };
-
-        if (argc < 3 - (getenv(ENV_LUSTRE_MNTTGT)||getenv(ENV_LUSTRE_DUMPFILE)))
-                usage(argv[0]);
-
-        while ((c = getopt_long(argc, argv, "s:", long_opts, &opt_index)) != -1) {
-                switch (c) {
-                case 0: {
-                        if (!optarg[0])
-                                usage(argv[0]);
-
-                        if (!strcmp(long_opts[opt_index].name, "target")) {
-                                setenv(ENV_LUSTRE_MNTTGT, optarg, 1);
-                        } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) {
-                                setenv(ENV_LUSTRE_DUMPFILE, optarg, 1);
-                        } else if (!strcmp(long_opts[opt_index].name, "ssh")) {
-                                safe_strncpy(ssh_cmd, optarg, MAX_STRING_SIZE);
-                        } else
-                                usage(argv[0]);
-                        break;
-                }
-                case 's':
-                        safe_strncpy(mds_server, optarg, MAX_STRING_SIZE);
-                        break;
-                default:
-                        usage(argv[0]);
-                }
-        }
-
-        if (optind != argc)
-                usage(argv[0]);
-
-        if (strlen(mds_server) == 0)
-                usage(argv[0]);
-
-        /* default to using ssh */
-        if (!strlen(ssh_cmd)) {
-                safe_strncpy(ssh_cmd, "ssh", MAX_STRING_SIZE);
-        }
-
-        sprintf(cmd, "%s %s cat /dev/null", ssh_cmd, mds_server);
-        if (system(cmd)) {
-                printf("Can't access server node: %s using method: %s\n", mds_server, ssh_cmd);
-                exit(-1);
-        }
-
-        setenv(ENV_LUSTRE_TIMEOUT, "5", 1);
-
-        __liblustre_setup_();
-
-        while (drop_arr[drop_index].name) {
-                t1();
-                t2();
-                t3();
-                t4();
-#if 0
-                t5();
-#endif
-                t6();
-                t7();
-
-                drop_index++;
-        }
-
-	printf("liblustre is about shutdown\n");
-        __liblustre_cleanup_();
-
-	printf("complete successfully\n");
-        return (0);
-}
diff --git a/lustre/liblustre/tests/replay_ost_single.c b/lustre/liblustre/tests/replay_ost_single.c
deleted file mode 100644
index 418ba94177b6b12e7b230e107d34bdb2017935d6..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/replay_ost_single.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define _BSD_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-#include <signal.h>
-
-#include <sysio.h>
-#include <mount.h>
-
-#include "test_common.h"
-
-
-
-static char mds_server[1024] = {0,};
-static char barrier_script[1024] = {0,};
-static char failover_script[1024] = {0,};
-static char barrier_cmd[1024] = {0,};
-static char failover_cmd[1024] = {0,};
-
-static void replay_barrier()
-{
-        int rc;
-
-        if ((rc = system(barrier_cmd))) {
-                printf("excute barrier error: %d\n", rc);
-                exit(rc);
-        }
-}
-
-static void mds_failover()
-{
-        int rc;
-
-        if ((rc = system(failover_cmd))) {
-                printf("excute failover error: %d\n", rc);
-                exit(rc);
-        }
-}
-
-
-#define ENTRY(str)                                                      \
-        do {                                                            \
-                char buf[100];                                          \
-                int len;                                                \
-                sprintf(buf, "===== START: %s ", (str));                \
-                len = strlen(buf);                                      \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', 100-len);                  \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-        } while (0)
-
-#define LEAVE()                                                         \
-        do {                                                            \
-                printf("----- END TEST successfully ---");              \
-                printf("-----------------------------");                \
-                printf("-------------------\n");                        \
-        } while (0)
-
-void t0()
-{
-        const int bufsize = 4096;
-        char *path = "/mnt/lustre/rp_ost_t0_file";
-        char buf[bufsize];
-        int fd, i, j, rc;
-        ENTRY("open-failover-write-verification (no ping involved)");
-
-        printf("create/open file...\n");
-        t_touch(path);
-        fd = t_open(path);
-        printf("OST failover...\n");
-        replay_barrier();
-        mds_failover();
-
-        printf("write file...\n");
-        for (i = 0; i < 20; i++) {
-                memset(buf, i, bufsize);
-                if ((rc = write(fd, buf, bufsize)) != bufsize) {
-                        perror("write error after failover");
-                        printf("i = %d, rc = %d\n", i, rc);
-                        exit(-1);
-                }
-        }
-
-        /* verify */
-        printf("read & verify...\n");
-        lseek(fd, 0, SEEK_SET);
-        for (i = 0; i < 20; i++) {
-                memset(buf, -1, bufsize);
-                if ((rc = read(fd, buf, bufsize)) != bufsize) {
-                        perror("read error rc");
-                        printf("i = %d, rc = %d\n", i, rc);
-                        exit(-1);
-                }
-                for (j = 0; j < bufsize; j++) {
-                        if (buf[j] != i) {
-                                printf("verify error!\n");
-                                exit(-1);
-                        }
-                }
-        }
-        t_close(fd);
-        t_unlink(path);
-        LEAVE();
-}
-
-void t1()
-{
-        const int bufsize = 4096;
-        char *path = "/mnt/lustre/rp_ost_t1_file";
-        char buf[bufsize];
-        int fd, i, j;
-        ENTRY("open-write-close-open-failover-read (no ping involved)");
-
-        printf("create/open file...\n");
-        t_touch(path);
-        fd = t_open(path);
-        printf("write file...\n");
-        for (i = 0; i < 20; i++) {
-                memset(buf, i, bufsize);
-                if (write(fd, buf, bufsize) != bufsize) {
-                        perror("write error");
-                        exit(-1);
-                }
-        }
-        printf("close/reopen...\n");
-        t_close(fd);
-        fd = t_open(path);
-        lseek(fd, 0, SEEK_SET);
-
-        printf("OST failover...\n");
-        replay_barrier();
-        mds_failover();
-
-        printf("read & verify...\n");
-        for (i = 0; i < 20; i++) {
-                memset(buf, -1, bufsize);
-                if (read(fd, buf, bufsize) != bufsize) {
-                        perror("read error after failover");
-                        exit(-1);
-                }
-                for (j = 0; j < bufsize; j++) {
-                        if (buf[j] != i) {
-                                printf("verify error after failover\n");
-                                exit(-1);
-                        }
-                }
-        }
-
-        t_close(fd);
-        t_unlink(path);
-        LEAVE();
-}
-
-void t2()
-{
-        char *path = "/mnt/lustre/rp_ost_t2_file";
-        char *str = "xxxxjoiwlsdf98lsjdfsjfoajflsjfajfoaidfojaj08eorje;";
-        ENTRY("empty replay");
-
-        replay_barrier();
-        mds_failover();
-
-        t_echo_create(path, str);
-        t_grep(path, str);
-        t_unlink(path);
-}
-
-void t3()
-{
-        char *path = "/mnt/lustre/rp_ost_t3_file";
-        char *str = "xxxxjoiwlsdf98lsjdfsjfoajflsjfajfoaidfojaj08eorje;";
-        ENTRY("touch");
-
-        printf("touch to create a file\n");
-        t_echo_create(path, str);
-        replay_barrier();
-        mds_failover();
-
-        printf("read & verify\n");
-        t_grep(path, str);
-        t_unlink(path);
-        /* XXX have problem without this, seems server side problem XXX */
-        sleep(5);
-}
-
-void t4()
-{
-        char *path = "/mnt/lustre/rp_ost_t4_file";
-        char namebuf[1024];
-        char str[1024];
-        int count = 10, i;
-        ENTRY("|X| 10 open(CREAT)s (ping involved)");
-
-        printf("create %d files\n", count);
-        for (i = 0; i < count; i++) {
-                sprintf(namebuf, "%s%02d", path, i);
-                sprintf(str, "%s-%08d-%08x-AAAAA", "content", i, i);
-                t_echo_create(namebuf, str);
-        }
-        replay_barrier();
-        mds_failover();
-
-        printf("read & verify\n");
-        for (i = 0; i < count; i++) {
-                sprintf(namebuf, "%s%02d", path, i);
-                sprintf(str, "%s-%08d-%08x-AAAAA", "content", i, i);
-                t_grep(namebuf, str);
-                t_unlink(namebuf);
-        }
-}
-
-extern int libcfs_debug;
-extern int libcfs_subsystem_debug;
-
-extern void __liblustre_setup_(void);
-extern void __liblustre_cleanup_(void);
-
-void usage(const char *cmd)
-{
-        printf("Usage: \t%s --target mdsnid:/mdsname/profile -s ost_hostname "
-                "-b \"barrier cmd\" -f \"failover cmd\"\n", cmd);
-        printf("       \t%s --dumpfile dumpfile -s ost_hostname -b \"barrier cmd\" "
-                "-f \"failover cmd\"\n", cmd);
-        exit(-1);
-}
-
-void test_ssh()
-{
-        char cmd[1024];
-
-        sprintf(cmd, "ssh %s cat /dev/null", mds_server);
-        if (system(cmd)) {
-                printf("ssh can't access server node: %s\n", mds_server);
-                exit(-1);
-        }
-}
-
-int main(int argc, char * const argv[])
-{
-        int opt_index, c;
-        static struct option long_opts[] = {
-                {"target", 1, 0, 0},
-                {"dumpfile", 1, 0, 0},
-                {0, 0, 0, 0}
-        };
-
-        if (argc < 4)
-                usage(argv[0]);
-
-        while ((c = getopt_long(argc, argv, "s:b:f:", long_opts, &opt_index)) != -1) {
-                switch (c) {
-                case 0: {
-                        if (!optarg[0])
-                                usage(argv[0]);
-
-                        if (!strcmp(long_opts[opt_index].name, "target")) {
-                                setenv(ENV_LUSTRE_MNTTGT, optarg, 1);
-                        } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) {
-                                setenv(ENV_LUSTRE_DUMPFILE, optarg, 1);
-                        } else
-                                usage(argv[0]);
-                        break;
-                }
-                case 's':
-                        strcpy(mds_server, optarg);
-                        break;
-                case 'b':
-                        strcpy(barrier_script, optarg);
-                        break;
-                case 'f':
-                        strcpy(failover_script, optarg);
-                        break;
-                default:
-                        usage(argv[0]);
-                }
-        }
-
-        if (optind != argc)
-                usage(argv[0]);
-        if (!strlen(mds_server) || !strlen(barrier_script) ||
-            !strlen(failover_script))
-                usage(argv[0]);
-
-        test_ssh();
-
-        /* prepare remote command */
-        sprintf(barrier_cmd, "ssh %s \"%s\"", mds_server, barrier_script);
-        sprintf(failover_cmd, "ssh %s \"%s\"", mds_server, failover_script);
-
-        setenv(ENV_LUSTRE_TIMEOUT, "5", 1);
-
-        __liblustre_setup_();
-
-        t0();
-        t1();
-        t2();
-        t3();
-        t4();
-
-	printf("liblustre is about shutdown\n");
-        __liblustre_cleanup_();
-
-	printf("complete successfully\n");
-	return 0;
-}
diff --git a/lustre/liblustre/tests/replay_single.c b/lustre/liblustre/tests/replay_single.c
deleted file mode 100644
index 17155f80b3146241bd8a062616c3b8bafd9a17bf..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/replay_single.c
+++ /dev/null
@@ -1,423 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define _BSD_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-#include <signal.h>
-
-#include <sysio.h>
-#include <mount.h>
-
-#include "test_common.h"
-
-#define MAX_STRING_SIZE 2048
-
-static char mds_server[MAX_STRING_SIZE] = {0,};
-static char barrier_script[MAX_STRING_SIZE] = {0,};
-static char failover_script[MAX_STRING_SIZE] = {0,};
-static char barrier_cmd[MAX_STRING_SIZE] = {0,};
-static char failover_cmd[MAX_STRING_SIZE] = {0,};
-static char ssh_cmd[MAX_STRING_SIZE] = {0,};
-
-static void replay_barrier()
-{
-        int rc;
-
-        if ((rc = system(barrier_cmd))) {
-                printf("excute barrier error: %d\n", rc);
-                exit(rc);
-        }
-}
-
-static void mds_failover()
-{
-        int rc;
-
-        if ((rc = system(failover_cmd))) {
-                printf("excute failover error: %d\n", rc);
-                exit(rc);
-        }
-}
-
-
-#define ENTRY(str)                                                      \
-        do {                                                            \
-                char buf[100];                                          \
-                int len;                                                \
-                sprintf(buf, "===== START: %s ", (str));                \
-                len = strlen(buf);                                      \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', 100-len);                  \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-        } while (0)
-
-#define LEAVE()                                                         \
-        do {                                                            \
-                printf("----- END TEST successfully ---");              \
-                printf("-----------------------------");                \
-                printf("-------------------\n");                        \
-        } while (0)
-
-void t0()
-{
-        char *path="/mnt/lustre/f0";
-        ENTRY("empty replay");
-        replay_barrier();
-        mds_failover();
-        t_check_stat_fail("/mnt/lustre/f0");
-        LEAVE();
-}
-
-void t1()
-{
-        char *path="/mnt/lustre/f1";
-        ENTRY("simple create");
-
-        replay_barrier();
-        t_create(path);
-        mds_failover();
-        t_check_stat(path, NULL);
-        t_unlink(path);
-        LEAVE();
-}
-
-void t2a()
-{
-        char *path="/mnt/lustre/f2a";
-        ENTRY("touch");
-
-        replay_barrier();
-        t_touch(path);
-        mds_failover();
-        t_check_stat(path, NULL);
-        t_unlink(path);
-        LEAVE();
-}
-
-void t2b()
-{
-        char *path="/mnt/lustre/f2b";
-        ENTRY("mcreate+touch");
-
-        t_create(path);
-        replay_barrier();
-        t_touch(path);
-        mds_failover();
-        t_check_stat(path, NULL);
-        t_unlink(path);
-        LEAVE();
-}
-
-
-void n_create_delete(int nfiles)
-{
-        char *base="/mnt/lustre/f3_";
-        char path[100];
-        char str[100];
-        int i;
-
-        replay_barrier();
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%d\n", base, i);
-                sprintf(str, "TEST#%d CONTENT\n", i);
-                t_echo_create(path, str);
-        }
-        mds_failover();
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%d\n", base, i);
-                sprintf(str, "TEST#%d CONTENT\n", i);
-                t_grep(path, str);
-        }
-        replay_barrier();
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%d\n", base, i);
-                t_unlink(path);
-        }
-        mds_failover();
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%d\n", base, i);
-                t_check_stat_fail(path);
-        }
-        LEAVE();
-}
-
-void t3a()
-{
-        ENTRY("10 create/delete");
-        n_create_delete(10);
-        LEAVE();
-}
-
-void t3b()
-{
-        ENTRY("30 create/delete(>1'st block precreated)");
-        n_create_delete(30);
-        LEAVE();
-}
-
-void t4()
-{
-        char *dir="/mnt/lustre/d4";
-        char *path="/mnt/lustre/d4/f1";
-        ENTRY("mkdir + contained create");
-
-        replay_barrier();
-        t_mkdir(dir);
-        t_create(path);
-        mds_failover();
-        t_check_stat(dir, NULL);
-        t_check_stat(path, NULL);
-        sleep(2); /* wait for log process thread */
-
-        replay_barrier();
-        t_unlink(path);
-        t_rmdir(dir);
-        mds_failover();
-        t_check_stat_fail(dir);
-        t_check_stat_fail(path);
-        LEAVE();
-}
-
-void t5()
-{
-        char *dir="/mnt/lustre/d5";
-        char *path="/mnt/lustre/d5/f1";
-        ENTRY("mkdir |X| contained create");
-
-        t_mkdir(dir);
-        replay_barrier();
-        t_create(path);
-        mds_failover();
-        t_check_stat(dir, NULL);
-        t_check_stat(path, NULL);
-        t_unlink(path);
-        t_rmdir(dir);
-        LEAVE();
-}
-
-void t6()
-{
-        char *path="/mnt/lustre/f6";
-        int fd;
-        ENTRY("open |X| close");
-
-        replay_barrier();
-        t_create(path);
-        fd = t_open(path);
-        sleep(1);
-        mds_failover();
-        t_check_stat(path, NULL);
-        t_close(fd);
-        t_unlink(path);
-        LEAVE();
-}
-
-void t7()
-{
-        char *path="/mnt/lustre/f7";
-        char *path2="/mnt/lustre/f7-2";
-        ENTRY("create |X| rename unlink");
-
-        t_create(path);
-        replay_barrier();
-        t_rename(path, path2);
-        mds_failover();
-        t_check_stat_fail(path);
-        t_check_stat(path2, NULL);
-        t_unlink(path2);
-}
-
-void t8()
-{
-        char *path="/mnt/lustre/f8";
-        char *path2="/mnt/lustre/f8-2";
-        ENTRY("create open write rename |X| create-old-name read");
-
-        t_create(path);
-        t_echo_create(path, "old");
-        t_rename(path, path2);
-        replay_barrier();
-        t_echo_create(path, "new");
-        mds_failover();
-        t_grep(path, "new");
-        t_grep(path2, "old");
-        t_unlink(path);
-        t_unlink(path2);
-}
-
-void t9()
-{
-        char *path="/mnt/lustre/f9";
-        char *path2="/mnt/lustre/f9-2";
-        ENTRY("|X| open(O_CREAT), unlink, touch new, unlink new");
-
-        replay_barrier();
-        t_create(path);
-        t_unlink(path);
-        t_create(path2);
-        mds_failover();
-        t_check_stat_fail(path);
-        t_check_stat(path2, NULL);
-        t_unlink(path2);
-}
-
-void t10()
-{
-        char *path="/mnt/lustre/f10";
-        char *path2="/mnt/lustre/f10-2";
-        ENTRY("|X| mcreate, open write, rename");
-
-        replay_barrier();
-        t_create(path);
-        t_echo_create(path, "old");
-        t_rename(path, path2);
-        t_grep(path2, "old");
-        mds_failover();
-        t_grep(path2, "old");
-        t_unlink(path2);
-}
-
-extern int libcfs_debug;
-extern int libcfs_subsystem_debug;
-
-extern void __liblustre_setup_(void);
-extern void __liblustre_cleanup_(void);
-
-void usage(const char *cmd)
-{
-        printf("Usage: \t%s --target mdsnid:/mdsname/profile -s mds_hostname "
-                "-b \"barrier cmd\" -f \"failover cmd\" [--rsh \"rsh_cmd\"]\n", cmd);
-        printf("       \t%s --dumpfile dumpfile -s mds_hostname -b \"barrier cmd\" "
-                "-f \"failover cmd\" [--rsh \"rsh_cmd\"]\n", cmd);
-        exit(-1);
-}
-
-void test_ssh()
-{
-        char cmd[MAX_STRING_SIZE];
-
-        sprintf(cmd, "%s %s cat /dev/null", ssh_cmd, mds_server);
-        if (system(cmd)) {
-                printf("Can't access server node: %s using method: %s\n", mds_server, ssh_cmd);
-                exit(-1);
-        }
-}
-
-int main(int argc, char * const argv[])
-{
-        int opt_index, c;
-        static struct option long_opts[] = {
-                {"target", 1, 0, 0},
-                {"dumpfile", 1, 0, 0},
-                {"ssh", 1, 0, 0},
-                {0, 0, 0, 0}
-        };
-
-        if (argc < 4 - (getenv(ENV_LUSTRE_MNTTGT)||getenv(ENV_LUSTRE_DUMPFILE)))
-                usage(argv[0]);
-
-        while ((c = getopt_long(argc, argv, "s:b:f:", long_opts, &opt_index)) != -1) {
-                switch (c) {
-                case 0: {
-                        if (!optarg[0])
-                                usage(argv[0]);
-
-                        if (!strcmp(long_opts[opt_index].name, "target")) {
-                                setenv(ENV_LUSTRE_MNTTGT, optarg, 1);
-                        } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) {
-                                setenv(ENV_LUSTRE_DUMPFILE, optarg, 1);
-                        } else if (!strcmp(long_opts[opt_index].name, "ssh")) {
-                                safe_strncpy(ssh_cmd, optarg, MAX_STRING_SIZE);
-                        } else
-                                usage(argv[0]);
-                        break;
-                }
-                case 's':
-                        safe_strncpy(mds_server, optarg, MAX_STRING_SIZE);
-                        break;
-                case 'b':
-                        safe_strncpy(barrier_script, optarg, MAX_STRING_SIZE);
-                        break;
-                case 'f':
-                        safe_strncpy(failover_script, optarg, MAX_STRING_SIZE);
-                        break;
-                default:
-                        usage(argv[0]);
-                }
-        }
-
-        if (optind != argc)
-                usage(argv[0]);
-        if (!strlen(mds_server) || !strlen(barrier_script) ||
-            !strlen(failover_script))
-                usage(argv[0]);
-
-        /* default to using ssh */
-        if (!strlen(ssh_cmd)) {
-                safe_strncpy(ssh_cmd, "ssh", MAX_STRING_SIZE);
-        }
-
-        test_ssh();
-
-        /* prepare remote command */
-        sprintf(barrier_cmd, "%s %s \"%s\"", 
-                ssh_cmd, mds_server, barrier_script);
-        sprintf(failover_cmd, "%s %s \"%s\"", 
-                ssh_cmd, mds_server, failover_script);
-
-        setenv(ENV_LUSTRE_TIMEOUT, "10", 1);
-
-        __liblustre_setup_();
-
-        t0();
-        t1();
-        t2a();
-        t2b();
-        t3a();
-        t3b();
-        t4();
-        t5();
-        t6();
-        t7();
-        t8();
-        t9();
-        t10();
-
-	printf("liblustre is about shutdown\n");
-        __liblustre_cleanup_();
-
-	printf("complete successfully\n");
-	return 0;
-}
diff --git a/lustre/liblustre/tests/sanity.c b/lustre/liblustre/tests/sanity.c
deleted file mode 100644
index 27f7211d4359c75fbb682e17045d402ef8ff9fd7..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/sanity.c
+++ /dev/null
@@ -1,1518 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define _BSD_SOURCE
-#define _FILE_OFFSET_BITS 64
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <signal.h>
-#include <errno.h>
-#include <dirent.h>
-#include <sys/uio.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include <liblustre.h>
-#include "test_common.h"
-#include <lustre/liblustreapi.h>
-
-#define _npages (2048)
-
-void *buf_alloc;
-int buf_size;
-int opt_verbose;
-struct timeval start;
-
-extern char *lustre_path;
-
-#define ENTRY(str)                                                      \
-        do {                                                            \
-                char buf[100];                                          \
-                int len;                                                \
-                sprintf(buf, "===== START %s: %s ", __FUNCTION__, (str)); \
-                len = strlen(buf);                                      \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', 100-len);                  \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-                gettimeofday(&start, NULL);                             \
-        } while (0)
-
-#define LEAVE()                                                         \
-        do {                                                            \
-                struct timeval stop;                                    \
-                char buf[100] = { '\0' };                               \
-                int len = sizeof(buf) - 1;                              \
-                long usec;                                              \
-                gettimeofday(&stop, NULL);                              \
-                usec = (stop.tv_sec - start.tv_sec) * 1000000 +         \
-                       (stop.tv_usec - start.tv_usec);                  \
-                len = snprintf(buf, len,                                \
-                               "===== END TEST %s: successfully (%gs)", \
-                               __FUNCTION__, (double)usec / 1000000);   \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', sizeof(buf) - len);        \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-                return 0;                                               \
-        } while (0)
-
-#define MAX_PATH_LENGTH 4096
-
-int t1(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t1", lustre_path);
-
-        if (opt_verbose)
-                printf("touch+unlink %s\n", path);
-
-        t_touch(path);
-        t_unlink(path);
-        LEAVE();
-}
-
-int t2(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-
-        ENTRY("mkdir/rmdir");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t2", lustre_path);
-
-        t_mkdir(path);
-        t_rmdir(path);
-        LEAVE();
-}
-
-int t3(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-
-        ENTRY("regular stat");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t3", lustre_path);
-
-        t_touch(path);
-        t_check_stat(path, NULL);
-        t_unlink(path);
-        LEAVE();
-}
-
-int t4(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-
-        ENTRY("dir stat");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t4", lustre_path);
-
-        t_mkdir(path);
-        t_check_stat(path, NULL);
-        t_rmdir(path);
-        LEAVE();
-}
-
-int t6(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-        char path2[MAX_PATH_LENGTH] = "";
-
-        ENTRY("symlink");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t6", lustre_path);
-        snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6_link", lustre_path);
-
-        t_touch(path);
-        t_symlink(path, path2);
-        t_check_stat(path2, NULL);
-        t_unlink(path2);
-        t_unlink(path);
-        LEAVE();
-}
-
-int t6b(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-        char path2[MAX_PATH_LENGTH] = "";
-        char cwd[MAX_PATH_LENGTH] = "";
-        char *tmp;
-        int fd;
-
-        ENTRY("symlink + chdir and open");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t6b", lustre_path);
-        snprintf(path2, MAX_PATH_LENGTH, "%s/test_t6b_link", lustre_path);
-
-        t_mkdir(path);
-        t_symlink(path, path2);
-        t_check_stat(path2, NULL);
-
-        tmp = getcwd(cwd, MAX_PATH_LENGTH);
-        if (tmp == NULL) {
-                fprintf(stderr, "current path too long to fit in "
-                        "MAX_PATH_LENGTH?\n");
-                LEAVE();
-        }
-        t_chdir(path2);
-        t_chdir(cwd);
-        t_rmdir(path);
-        t_touch(path);
-
-        fd = t_open(path2);
-        t_close(fd);
-
-        t_unlink(path2);
-        t_unlink(path);
-        LEAVE();
-}
-
-int t7(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-        int rc;
-
-        ENTRY("mknod");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t7", lustre_path);
-
-        if (geteuid() != 0) {
-                rc = mknod(path, S_IFCHR | 0644, (5<<8 | 4));
-                if (rc != -1 || errno != EPERM) {
-                        printf("mknod shouldn't success: rc %d, errno %d\n",
-                                rc, errno);
-                }
-        } else {
-                t_mknod(path, S_IFCHR | 0644, 5, 4);
-                t_check_stat(path, NULL);
-                t_unlink(path);
-        }
-        LEAVE();
-}
-
-int t8(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-
-        ENTRY("chmod");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t8", lustre_path);
-
-        /* Check file. */
-        t_touch(path);
-        t_chmod_raw(path, 0700);
-        t_check_stat(path, NULL);
-        t_unlink(path);
-
-        /* Check dir. */
-        t_mkdir(path);
-        t_chmod_raw(path, 0700);
-        t_check_stat(path, NULL);
-        t_rmdir(path);
-
-        LEAVE();
-}
-
-int t9(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-        char path2[MAX_PATH_LENGTH] = "";
-
-        ENTRY("hard link");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t9", lustre_path);
-        snprintf(path2, MAX_PATH_LENGTH, "%s/test_t9_link", lustre_path);
-
-        t_touch(path);
-        t_link(path, path2);
-        t_check_stat(path, NULL);
-        t_check_stat(path2, NULL);
-        t_unlink(path);
-        t_unlink(path2);
-        LEAVE();
-}
-
-int t10(char *name)
-{
-        char dir1[MAX_PATH_LENGTH] = "";
-        char dir2[MAX_PATH_LENGTH] = "";
-        char path1[MAX_PATH_LENGTH] = "";
-        char path2[MAX_PATH_LENGTH] = "";
-        char rename1[MAX_PATH_LENGTH] = "";
-        char rename2[MAX_PATH_LENGTH] = "";
-        char rename3[MAX_PATH_LENGTH] = "";
-
-        ENTRY("rename");
-        snprintf(dir1, MAX_PATH_LENGTH, "%s/test_t10_dir1", lustre_path);
-        snprintf(dir2, MAX_PATH_LENGTH, "%s/test_t10_dir2", lustre_path);
-        snprintf(path1, MAX_PATH_LENGTH, "%s/test_t10_reg1", lustre_path);
-        snprintf(path2, MAX_PATH_LENGTH, "%s/test_t10_reg2", lustre_path);
-        snprintf(rename1, MAX_PATH_LENGTH, "%s/test_t10_dir1/rename1", lustre_path);
-        snprintf(rename2, MAX_PATH_LENGTH, "%s/test_t10_dir2/rename2", lustre_path);
-        snprintf(rename3, MAX_PATH_LENGTH, "%s/test_t10_dir2/rename3", lustre_path);
-
-        t_mkdir(dir1);
-        t_mkdir(dir2);
-        t_touch(path1);
-        t_touch(path2);
-        t_rename(path1, rename1);
-        t_rename(path2, rename2);
-        t_rename(rename1, rename2);
-        t_rename(dir1, rename3);
-        t_unlink(rename2);
-        t_rmdir(rename3);
-        t_rmdir(dir2);
-        LEAVE();
-}
-
-int t11(char *name)
-{
-        char *base=lustre_path;
-        char path[MAX_PATH_LENGTH], path2[MAX_PATH_LENGTH];
-        int i, j, level = 5, nreg = 5;
-        ENTRY("deep tree");
-
-        safe_strncpy(path, base, MAX_PATH_LENGTH);
-
-        for (i = 0; i < level; i++) {
-                for (j = 0; j < nreg; j++) {
-                        sprintf(path2, "%s/file%d", path, j);
-                        t_touch(path2);
-                }
-
-                strcat(path, "/dir");
-                t_mkdir(path);
-        }
-
-        for (i = level; i > 0; i--) {
-                safe_strncpy(path, base, MAX_PATH_LENGTH);
-                for (j = 1; j < i; j++)
-                        strcat(path, "/dir");
-
-                for (j = 0; j < nreg; j++) {
-                        sprintf(path2, "%s/file%d", path, j);
-                        t_unlink(path2);
-                }
-
-                strcat(path, "/dir");
-                t_rmdir(path);
-        }
-
-        LEAVE();
-}
-
-int t12(char *name)
-{
-        char dir[MAX_PATH_LENGTH] = "";
-        char buf[1024*128];
-        int fd;
-        ENTRY("empty directory readdir");
-        snprintf(dir, MAX_PATH_LENGTH, "%s/test_t12_dir", lustre_path);
-
-        t_mkdir(dir);
-        fd = t_opendir(dir);
-        t_ls(fd, buf, sizeof(buf));
-        t_close(fd);
-        t_rmdir(dir);
-        LEAVE();
-}
-
-int t13(char *name)
-{
-        char dir[MAX_PATH_LENGTH] = "";
-        char path[1024];
-        char buf[1024];
-        const int nfiles = 20;
-        char *prefix = "test13_filename_prefix_";
-        int fd, i;
-        ENTRY("multiple entries directory readdir");
-        snprintf(dir, MAX_PATH_LENGTH, "%s/test_t13_dir/", lustre_path);
-
-        t_mkdir(dir);
-        printf("Creating %d files...\n", nfiles);
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%s%05d", dir, prefix, i);
-                t_touch(path);
-        }
-        fd = t_opendir(dir);
-        t_ls(fd, buf, sizeof(buf));
-        t_close(fd);
-        printf("Cleanup...\n");
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%s%05d", dir, prefix, i);
-                t_unlink(path);
-        }
-        t_rmdir(dir);
-        LEAVE();
-}
-
-int t14(char *name)
-{
-        char dir[MAX_PATH_LENGTH] = "";
-        char path[1024];
-        char buf[1024];
-        const int nfiles = 256;
-        char *prefix = "test14_filename_long_prefix_AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA___";
-        struct dirent64 *ent;
-        int fd, i, rc, pos, index;
-        loff_t base = 0;
-        ENTRY(">1 block(4k) directory readdir");
-        snprintf(dir, MAX_PATH_LENGTH, "%s/test_t14_dir/", lustre_path);
-
-        rc = mkdir(dir, 0755);
-        if (rc < 0 && errno != EEXIST) {
-                printf("mkdir(%s) error: %s\n", dir, strerror(errno));
-                exit(1);
-        }
-        printf("Creating %d files...\n", nfiles);
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%s%05d", dir, prefix, i);
-                t_touch(path);
-        }
-        fd = t_opendir(dir);
-        printf("Listing...\n");
-        index = 0;
-        while ((rc = getdirentries64(fd, buf, 1024, &base)) > 0) {
-                pos = 0;
-                while (pos < rc) {
-                        char *item;
-
-                        ent = (struct dirent64 *) ((char*) buf + pos);
-                        item = (char *) ent->d_name;
-                        if (!strcmp(item, ".") || !strcmp(item, ".."))
-                                goto iter;
-                        if (strstr(item, prefix) != item) {
-                                printf("found bad name %s\n", item);
-                                return(-1);
-                        }
-                        printf("[%03d]: %s\n",
-                                index++, item + strlen(prefix));
-iter:
-                        pos += ent->d_reclen;
-                }
-        }
-        if (rc < 0) {
-                printf("getdents error %d\n", rc);
-                return(-1);
-        }
-        if (index != nfiles) {
-                printf("get %d files != %d\n", index, nfiles);
-                return(-1);
-        }
-        t_close(fd);
-        printf("Cleanup...\n");
-        for (i = 0; i < nfiles; i++) {
-                sprintf(path, "%s%s%05d", dir, prefix, i);
-                t_unlink(path);
-        }
-        t_rmdir(dir);
-        LEAVE();
-}
-
-int t15(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd;
-        ENTRY("open-stat-close");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t15_file", lustre_path);
-
-        t_touch(file);
-        fd = t_open(file);
-        t_check_stat(file, NULL);
-        t_close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-int t16(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        ENTRY("small-write-read");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t16_file", lustre_path);
-
-        t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaa");
-        t_grep(file, "aaaaaaaaaaaaaaaaaaaaaa");
-        t_unlink(file);
-        LEAVE();
-}
-
-int t17(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd;
-        ENTRY("open-unlink without close");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t17_file", lustre_path);
-
-        fd = open(file, O_WRONLY | O_CREAT, 0666);
-        if (fd < 0) {
-                printf("failed to create file: %s\n", strerror(errno));
-                return(-1);
-        }
-        t_unlink(file);
-        LEAVE();
-}
-
-int t18(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        char buf[128];
-        int fd, i;
-        struct stat statbuf[3];
-        ENTRY("write should change mtime/ctime");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t18_file", lustre_path);
-
-        for (i = 0; i < 3; i++) {
-                fd = open(file, O_RDWR|O_CREAT|O_APPEND, (mode_t)0666);
-                if (fd < 0) {
-                        printf("error open file: %s\n", strerror(errno));
-                        return(-1);
-                }
-                if (write(fd, buf, sizeof(buf)) != sizeof(buf)) {
-                        printf("error write file\n");
-                        return(-1);
-                }
-                close(fd);
-                if(stat(file, &statbuf[i]) != 0) {
-                        printf("Error stat\n");
-                        return(1);
-                }
-                printf("ctime %lu, mtime %lu\n",
-                        statbuf[i].st_ctime, statbuf[i].st_mtime);
-                sleep(2);
-        }
-
-        for (i = 1; i < 3; i++) {
-                if ((statbuf[i].st_ctime <= statbuf[i-1].st_ctime) ||
-                    (statbuf[i].st_mtime <= statbuf[i-1].st_mtime)) {
-                        printf("time error\n");
-                        return(-1);
-                }
-        }
-        t_unlink(file);
-        LEAVE();
-}
-
-int t18b(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int i;
-        struct stat statbuf[3];
-        ENTRY("utime should change mtime/atime/ctime");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t18b_file", lustre_path);
-        t_touch(file);
-
-        for (i = 0; i < 3; i++) {
-                t_utime(file, NULL);
-                if(stat(file, &statbuf[i]) != 0) {
-                        printf("Error stat\n");
-                        return(1);
-                }
-                printf("atime %lu, mtime %lu, ctime %lu\n",
-                       statbuf[i].st_atime, statbuf[i].st_mtime,
-                       statbuf[i].st_ctime);
-                sleep(2);
-        }
-
-        for (i = 1; i < 3; i++) {
-                if ((statbuf[i].st_atime <= statbuf[i-1].st_atime) ||
-                    (statbuf[i].st_mtime <= statbuf[i-1].st_mtime) ||
-                    (statbuf[i].st_ctime <= statbuf[i-1].st_ctime)) {
-                        printf("time error\n");
-                        return(-1);
-                }
-        }
-        t_unlink(file);
-        LEAVE();
-}
-
-static int check_file_size(char *file, off_t size)
-{
-        struct stat statbuf;
-
-        if (stat(file, &statbuf) != 0) {
-                printf("Error stat(%s)\n", file);
-                return(1);
-        }
-        if (statbuf.st_size != size) {
-                printf("size of %s: %ld != %lld\n", file, statbuf.st_size, (unsigned long long )size);
-                return(-1);
-        }
-        return 0;
-}
-
-int t19(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd;
-        int result;
-        ENTRY("open(O_TRUNC) should truncate file to 0-length");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t19_file", lustre_path);
-
-        t_echo_create(file, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
-
-        fd = open(file, O_RDWR|O_CREAT|O_TRUNC, (mode_t)0666);
-        if (fd < 0) {
-                printf("error open file: %s\n", strerror(errno));
-                return(-1);
-        }
-        close(fd);
-        result = check_file_size(file, 0);
-        if (result != 0)
-                return result;
-        t_unlink(file);
-        LEAVE();
-}
-
-int t20(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd;
-        struct iovec iov[2];
-        char buf[100];
-        ssize_t ret;
-        ENTRY("trap app's general bad pointer for file i/o");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t20_file", lustre_path);
-
-        fd = open(file, O_RDWR|O_CREAT, (mode_t)0666);
-        if (fd < 0) {
-                printf("error open file: %s\n", strerror(errno));
-                return(-1);
-        }
-
-        ret = write(fd, NULL, 20);
-        if (ret != -1 || errno != EFAULT) {
-                printf("write 1: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-        ret = write(fd, (void *)-1, 20);
-        if (ret != -1 || errno != EFAULT) {
-                printf("write 2: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-        iov[0].iov_base = NULL;
-        iov[0].iov_len = 10;
-        iov[1].iov_base = (void *)-1;
-        iov[1].iov_len = 10;
-        ret = writev(fd, iov, 2);
-        if (ret != -1 || errno != EFAULT) {
-                printf("writev 1: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-        iov[0].iov_base = NULL;
-        iov[0].iov_len = 0;
-        iov[1].iov_base = buf;
-        iov[1].iov_len = sizeof(buf);
-        ret = writev(fd, iov, 2);
-        if (ret != sizeof(buf)) {
-                printf("write 3 ret %ld, error %d\n", ret, errno);
-                return(1);
-        }
-        lseek(fd, 0, SEEK_SET);
-
-        ret = read(fd, NULL, 20);
-        if (ret != -1 || errno != EFAULT) {
-                printf("read 1: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-        ret = read(fd, (void *)-1, 20);
-        if (ret != -1 || errno != EFAULT) {
-                printf("read 2: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-        iov[0].iov_base = NULL;
-        iov[0].iov_len = 10;
-        iov[1].iov_base = (void *)-1;
-        iov[1].iov_len = 10;
-        ret = readv(fd, iov, 2);
-        if (ret != -1 || errno != EFAULT) {
-                printf("readv 1: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-        iov[0].iov_base = NULL;
-        iov[0].iov_len = 0;
-        iov[1].iov_base = buf;
-        iov[1].iov_len = sizeof(buf);
-        ret = readv(fd, iov, 2);
-        if (ret != sizeof(buf)) {
-                printf("read 3 ret %ld, error %d\n", ret, errno);
-                return(1);
-        }
-
-        close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-int t21(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd, ret;
-        struct flock lock = {
-                .l_type = F_RDLCK,
-                .l_whence = SEEK_SET,
-        };
-
-        ENTRY("basic fcntl support");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t21_file", lustre_path);
-
-        fd = open(file, O_RDWR|O_CREAT, (mode_t)0666);
-        if (fd < 0) {
-                printf("error open file: %s\n", file);
-                return(-1);
-        }
-
-        t_fcntl(fd, F_SETFL, O_APPEND);
-        if (!(ret = t_fcntl(fd, F_GETFL)) & O_APPEND) {
-                printf("error get flag: ret %x\n", ret);
-                return(-1);
-        }
-
-        t_fcntl(fd, F_SETLK, &lock);
-        t_fcntl(fd, F_GETLK, &lock);
-        lock.l_type = F_WRLCK;
-        t_fcntl(fd, F_SETLKW, &lock);
-        t_fcntl(fd, F_GETLK, &lock);
-        lock.l_type = F_UNLCK;
-        t_fcntl(fd, F_SETLK, &lock);
-
-        close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-int t22(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd;
-        char *str = "1234567890";
-        char buf[100];
-        ssize_t ret;
-        ENTRY("make sure O_APPEND take effect");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t22_file", lustre_path);
-
-        fd = open(file, O_RDWR|O_CREAT|O_APPEND, (mode_t)0666);
-        if (fd < 0) {
-                printf("error open file: %s\n", strerror(errno));
-                return(-1);
-        }
-
-        lseek(fd, 100, SEEK_SET);
-        ret = write(fd, str, strlen(str));
-        if (ret != strlen(str)) {
-                printf("write 1: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-
-        lseek(fd, 0, SEEK_SET);
-        ret = read(fd, buf, sizeof(buf));
-        if (ret != strlen(str)) {
-                printf("read 1 got %ld\n", ret);
-                return(1);
-        }
-
-        if (memcmp(buf, str, strlen(str))) {
-                printf("read 1 data err\n");
-                return(1);
-        }
-
-        if (fcntl(fd, F_SETFL, 0)) {
-                printf("fcntl err: %s\n", strerror(errno));
-                return(1);
-        }
-
-        lseek(fd, 100, SEEK_SET);
-        ret = write(fd, str, strlen(str));
-        if (ret != strlen(str)) {
-                printf("write 2: ret %ld, errno %d\n", ret, errno);
-                return(1);
-        }
-
-        lseek(fd, 100, SEEK_SET);
-        ret = read(fd, buf, sizeof(buf));
-        if (ret != strlen(str)) {
-                printf("read 2 got %ld\n", ret);
-                return(1);
-        }
-
-        if (memcmp(buf, str, strlen(str))) {
-                printf("read 2 data err\n");
-                return(1);
-        }
-
-        close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-int t23(char *name)
-{
-        char path[MAX_PATH_LENGTH];
-        int fd;
-        long long ret;
-        loff_t off;
-
-        ENTRY("handle seek > 2GB");
-        snprintf(path, MAX_PATH_LENGTH, "%s/f%s", lustre_path, name);
-
-        fd = open(path, O_WRONLY | O_CREAT | O_LARGEFILE, 0666);
-        if (fd < 0) {
-                printf("failed to create file %s: %s\n", path, strerror(errno));
-                return(-1);
-        }
-
-        off = 2048ULL * 1024 * 1024 - buf_size / 2;
-        ret = lseek(fd, off, SEEK_SET);
-        if (ret != off) {
-                printf("seek error for initial %llu != %llu\n",
-                       ret, (long long)off);
-                return -1;
-        }
-
-        ret = write(fd, buf_alloc, buf_size);
-        if (ret != buf_size) {
-                printf("write error for %d != %llubytes @ %llu\n",
-                       buf_size, ret, (long long)off);
-                if (ret == -1)
-                        perror("write");
-                return -1;
-        }
-
-        ret = lseek(fd, off, SEEK_SET);
-        if (ret != off) {
-                printf("seek < 2GB error for %llu != %llu\n",
-                       ret, (long long)off);
-                if (ret == -1)
-                        perror("seek < 2GB");
-                return -1;
-        }
-
-        ret = lseek(fd, off + buf_size - 2, SEEK_SET);
-        if (ret != off + buf_size - 2) {
-                printf("seek > 2GB error for %llu != %llu\n",
-                       ret, (long long)off);
-                if (ret == -1)
-                        perror("seek > 2GB");
-                return -1;
-        }
-
-        ret = lseek(fd, -buf_size + 2, SEEK_CUR);
-        if (ret != off) {
-                printf("relative seek error for %d %llu != %llu\n",
-                       -buf_size + 2, ret, (unsigned long long) off);
-                if (ret == -1)
-                        perror("relative seek");
-                return -1;
-        }
-
-        ret = lseek(fd, 0, SEEK_END);
-        if (ret != off + buf_size) {
-                printf("end seek error for %llu != %llu\n",
-                       ret, (long long)off + buf_size);
-                if (ret == -1)
-                        perror("end seek");
-                return -1;
-        }
-
-        ret = lseek(fd, 0, SEEK_SET);
-        if (ret != 0) {
-                printf("seek 0 error for %llu != 0\n", ret);
-                if (ret == -1)
-                        perror("seek 0");
-                return -1;
-        }
-
-        off = 2048ULL * 1024 * 1024, SEEK_SET;
-        ret = lseek(fd, off, SEEK_SET);
-        if (ret != off) {
-                printf("seek 2GB error for %llu != %llu\n", ret, (unsigned long long) off);
-                if (ret == -1)
-                        perror("seek 2GB");
-                return -1;
-        }
-
-        close(fd);
-        t_unlink(path);
-        LEAVE();
-}
-
-/* pos:   i/o start from
- * xfer:  npages per transfer
- */
-static int pages_io(int xfer, loff_t pos)
-{
-        char path[MAX_PATH_LENGTH] = "";
-
-        int check_sum[_npages] = {0,}, *buf;
-        int fd, rc, i, j, data_error = 0;
-        struct timeval tw1, tw2, tr1, tr2;
-        double tw, tr;
-        loff_t ret;
-
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t50", lustre_path);
-
-        memset(buf_alloc, 0, buf_size);
-
-        /* create sample data */
-        for (i = 0, buf = buf_alloc; i < _npages; i++) {
-                for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) {
-                        *buf = rand();
-                }
-        }
-
-        /* compute checksum */
-        for (i = 0, buf = buf_alloc; i < _npages; i++) {
-                for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) {
-                        check_sum[i] += *buf;
-                }
-        }
-
-        unlink(path);
-        t_touch(path);
-
-        fd = t_open(path);
-
-        /* write */
-        ret = lseek(fd, pos, SEEK_SET);
-        if (ret != pos) {
-                perror("write seek");
-                return 1;
-        }
-        gettimeofday(&tw1, NULL);
-        for (i = 0, buf = buf_alloc; i < _npages;
-             i += xfer, buf += xfer * PAGE_SIZE / sizeof(int)) {
-                rc = write(fd, buf, PAGE_SIZE * xfer);
-                if (rc != PAGE_SIZE * xfer) {
-                        printf("write error (i %d, rc %d): %s\n", i, rc,
-                               strerror(errno));
-                        return(1);
-                }
-        }
-        gettimeofday(&tw2, NULL);
-
-        memset(buf_alloc, 0, buf_size);
-
-        /* read */
-        ret = lseek(fd, pos, SEEK_SET);
-        if (ret != pos) {
-                perror("read seek");
-                return 1;
-        }
-        gettimeofday(&tr1, NULL);
-        for (i = 0, buf = buf_alloc; i < _npages;
-             i += xfer, buf += xfer * PAGE_SIZE / sizeof(int)) {
-                rc = read(fd, buf, PAGE_SIZE * xfer);
-                if (rc != PAGE_SIZE * xfer) {
-                        printf("read error (i %d, rc %d): %s\n", i, rc,
-                               strerror(errno));
-                        return(1);
-                }
-        }
-        gettimeofday(&tr2, NULL);
-
-        /* compute checksum */
-        for (i = 0, buf = buf_alloc; i < _npages; i++) {
-                int sum = 0;
-                for (j = 0; j < PAGE_SIZE/sizeof(int); j++, buf++) {
-                        sum += *buf;
-                }
-                if (sum != check_sum[i]) {
-                        data_error = 1;
-                        printf("chunk %d checksum error expected %#x got %#x\n",
-                                i, check_sum[i], sum);
-                }
-        }
-
-        t_close(fd);
-        t_unlink(path);
-        tw = (tw2.tv_sec - tw1.tv_sec) * 1000000 + (tw2.tv_usec - tw1.tv_usec);
-        tr = (tr2.tv_sec - tr1.tv_sec) * 1000000 + (tr2.tv_usec - tr1.tv_usec);
-        printf(" (R:%.3fM/s, W:%.3fM/s)\n",
-                (_npages * PAGE_SIZE) / (tw / 1000000.0) / (1024 * 1024),
-                (_npages * PAGE_SIZE) / (tr / 1000000.0) / (1024 * 1024));
-
-        if (data_error)
-                return 1;
-
-        return 0;
-}
-
-int t50(char *name)
-{
-        int np = 1;
-        loff_t offset = 0;
-
-        ENTRY("4k aligned i/o sanity");
-        while (np <= _npages) {
-                printf("%3d per xfer(total %d)...\t", np, _npages);
-                fflush(stdout);
-                if (pages_io(np, offset) != 0)
-                        return 1;
-                np += np;
-        }
-        LEAVE();
-}
-
-int t50b(char *name)
-{
-        loff_t off_array[] = {1, 17, 255, 258, 4095, 4097, 8191,
-                              1024*1024*1024*1024ULL};
-        int i;
-        loff_t offset;
-
-        ENTRY("4k un-aligned i/o sanity");
-        for (i = 0; i < sizeof(off_array)/sizeof(loff_t); i++) {
-                offset = off_array[i];
-                printf("16 per xfer(total %d), offset %10lld...\t",
-                        _npages, (unsigned long long) offset);
-                if (pages_io(16, offset) != 0)
-                        return 1;
-        }
-
-        LEAVE();
-}
-
-enum {
-        T51_STEP = 42,
-        T51_NR   = 1000
-};
-
-/*
- * truncate(2) checks.
- */
-int t51(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd;
-        off_t size;
-        int result;
-
-        ENTRY("truncate() should truncate file to proper length");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t51_file", lustre_path);
-
-        for (size = 0; size < T51_NR * T51_STEP; size += T51_STEP) {
-                t_echo_create(file, "");
-                if (truncate(file, size) != 0) {
-                        printf("\nerror truncating file: %s\n",strerror(errno));
-                        return(-1);
-                }
-                result = check_file_size(file, size);
-                if (result != 0)
-                        return result;
-                t_unlink(file);
-
-                t_echo_create(file, "");
-                fd = open(file, O_RDWR|O_CREAT, (mode_t)0666);
-                if (fd < 0) {
-                        printf("\nerror open file: %s\n", strerror(errno));
-                        return(-1);
-                }
-                if (ftruncate(fd, size) != 0) {
-                        printf("\nerror ftruncating file:%s\n",strerror(errno));
-                        return(-1);
-                }
-                close(fd);
-                result = check_file_size(file, size);
-                if (result != 0)
-                        return result;
-                t_unlink(file);
-                if (size % (T51_STEP * (T51_NR / 75)) == 0) {
-                        printf(".");
-                        fflush(stdout);
-                }
-        }
-        printf("\n");
-        LEAVE();
-}
-/*
- * check atime update during read
- */
-int t52(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        char buf[16];
-        struct stat statbuf;
-        time_t atime;
-        time_t diff;
-        int fd, i;
-
-        ENTRY("atime should be updated during read");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t52_file", lustre_path);
-
-        t_echo_create(file, "check atime update during read");
-        fd = open(file, O_RDONLY);
-        if (fd < 0) {
-                printf("\nerror open file: %s\n", strerror(errno));
-                return(-1);
-        }
-        stat(file, &statbuf);
-        printf("st_atime=%s", ctime(&statbuf.st_atime));
-        atime = statbuf.st_atime;
-        for (i = 0; i < 3; i++) {
-                sleep(2);
-                read(fd, buf, sizeof(buf));
-                stat(file, &statbuf);
-                printf("st_atime=%s", ctime(&statbuf.st_atime));
-                diff = statbuf.st_atime - atime;
-                if (diff <= 0) {
-                        printf("atime doesn't updated! failed!\n");
-                        close(fd);
-                        t_unlink(file);
-                        return -1;
-                }       
-                atime = statbuf.st_atime; 
-        }
-        close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-#define NEW_TIME        10000
-int t53(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        struct utimbuf times;   /* struct. buffer for utime() */
-        struct stat stat_buf;   /* struct buffer to hold file info. */
-        time_t mtime, atime;
- 
-        ENTRY("mtime/atime should be updated by utime() call");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t53_file", lustre_path);
-
-        t_echo_create(file, "check mtime/atime update by utime() call");
- 
-        /* Initialize the modification and access time in the times arg */
-        times.actime = NEW_TIME+10;
-        times.modtime = NEW_TIME;
- 
-        /* file modification/access time */
-        utime(file, &times);
- 
-        if (stat(file, &stat_buf) < 0) {
-                printf("stat(2) of %s failed, error:%d %s\n",
-                        file, errno, strerror(errno)); 
-        }
-        mtime = stat_buf.st_mtime;
-        atime = stat_buf.st_atime;
- 
-        if ((mtime == NEW_TIME) && (atime == NEW_TIME + 10)) {
-                t_unlink(file);
-                LEAVE();
-        }
-
-        printf("mod time %ld, expected %ld\n", mtime, (long)NEW_TIME);
-        printf("acc time %ld, expected %ld\n", atime, (long)NEW_TIME + 10);
- 
-        t_unlink(file);
-        return (-1);
-}
-
-int t54(char *name)
-{
-        char file[MAX_PATH_LENGTH] = "";
-        struct flock lock;
-        int fd, err;
-
-        ENTRY("fcntl should return 0 when succeed in getting flock");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t54_file", lustre_path);
-
-        t_echo_create(file, "fcntl should return 0 when succeed");
-
-        fd = open(file, O_RDWR);
-        if (fd < 0) {
-                printf("\nerror open file: %s\n", strerror(errno));
-                return(-1);
-        }
-        lock.l_type   = F_WRLCK;
-        lock.l_start  = 0;
-        lock.l_whence = 0;
-        lock.l_len    = 1;
-        if ((err = t_fcntl(fd, F_SETLKW, &lock)) != 0) {
-                fprintf(stderr, "fcntl returned: %d (%s)\n", 
-                        err, strerror(err));
-                close(fd);
-                t_unlink(file);
-                return (-1);
-        }
-
-        lock.l_type   = F_UNLCK;
-        t_fcntl(fd, F_SETLKW, &lock);
-        close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-/* for O_DIRECTORY */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#define STRIPE_SIZE       (2048 * 2048)
-#define STRIPE_OFFSET           0
-#define STRIPE_COUNT            1
-int t55(char *name)
-{
-        char path[MAX_PATH_LENGTH] = "";
-        char file[MAX_PATH_LENGTH] = "";
-        struct lov_user_md *lum = NULL;
-        struct lov_user_ost_data *lo = NULL;
-        int index, fd, buflen, rc;
-
-        ENTRY("setstripe/getstripe");
-        snprintf(path, MAX_PATH_LENGTH, "%s/test_t55", lustre_path);
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t55/file_t55", lustre_path);
-      
-        buflen = sizeof(struct lov_user_md);
-        buflen += STRIPE_COUNT * sizeof(struct lov_user_ost_data);
-        lum = (struct lov_user_md *)malloc(buflen);
-        if (!lum) {
-                printf("out of memory!\n");
-                return -1;
-        }
-        memset(lum, 0, buflen);
-
-        t_mkdir(path);
-        rc = llapi_file_create(path, STRIPE_SIZE, STRIPE_OFFSET,
-                               STRIPE_COUNT, LOV_PATTERN_RAID0);
-        if (rc) {
-                printf("llapi_file_create failed: rc = %d (%s) \n",
-                       rc, strerror(-rc));
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-
-        fd = open(file, O_CREAT | O_RDWR, 0644);
-        if (fd < 0) {
-                printf("open file(%s) failed: rc = %d (%s) \n)",
-                       file, fd, strerror(errno));
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-        
-        lum->lmm_magic = LOV_USER_MAGIC;
-        lum->lmm_stripe_count = STRIPE_COUNT;
-        rc = ioctl(fd, LL_IOC_LOV_GETSTRIPE, lum);
-        if (rc) {
-                printf("dir:ioctl(LL_IOC_LOV_GETSTRIPE) failed: rc = %d(%s)\n",
-                       rc, strerror(errno));
-                close(fd);
-                t_unlink(file);
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-
-        close(fd);
-
-        if (opt_verbose) {
-                printf("lmm_magic:          0x%08X\n",  lum->lmm_magic);
-                printf("lmm_object_id:      "LPX64"\n", lum->lmm_object_id);
-                printf("lmm_object_gr:      "LPX64"\n", lum->lmm_object_gr);
-                printf("lmm_stripe_count:   %u\n", (int)lum->lmm_stripe_count);
-                printf("lmm_stripe_size:    %u\n",      lum->lmm_stripe_size);
-                printf("lmm_stripe_pattern: %x\n",      lum->lmm_pattern);
-        
-                for (index = 0; index < lum->lmm_stripe_count; index++) {
-                        lo = lum->lmm_objects + index;
-                        printf("object %d:\n", index);
-                        printf("\tobject_gr:    "LPX64"\n", lo->l_object_gr);
-                        printf("\tobject_id:    "LPX64"\n", lo->l_object_id);
-                        printf("\tost_gen:      %#x\n", lo->l_ost_gen);
-                        printf("\tost_idx:      %u\n", lo->l_ost_idx);
-                }
-        }
-
-        if (lum->lmm_magic != LOV_USER_MAGIC ||
-            lum->lmm_pattern != LOV_PATTERN_RAID0 ||
-            lum->lmm_stripe_size != STRIPE_SIZE ||
-            lum->lmm_objects[0].l_ost_idx != STRIPE_OFFSET ||
-            lum->lmm_stripe_count != STRIPE_COUNT) {
-                printf("incorrect striping information!\n");
-                t_unlink(file);
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-        t_unlink(file);
-
-        /* setstripe on regular file */
-        rc = llapi_file_create(file, STRIPE_SIZE, STRIPE_OFFSET,
-                               STRIPE_COUNT, LOV_PATTERN_RAID0);
-        if (rc) {
-                printf("llapi_file_create failed: rc = %d (%s) \n",
-                       rc, strerror(-rc));
-                t_unlink(file);
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-        fd = open(file, O_RDWR, 0644);
-        if (fd < 0) {
-                printf("failed to open(%s): rc = %d (%s)\n", 
-                       file, fd, strerror(errno));
-                t_unlink(file);
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-
-        lum->lmm_magic = LOV_USER_MAGIC;
-        lum->lmm_stripe_count = STRIPE_COUNT;
-        rc = ioctl(fd, LL_IOC_LOV_GETSTRIPE, lum);
-        if (rc) {
-                printf("file:ioctl(LL_IOC_LOV_GETSTRIPE) failed: rc = %d(%s)\n",
-                       rc, strerror(errno));
-                close(fd);
-                t_unlink(file);
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-        close(fd);
-
-        if (opt_verbose) {
-                printf("lmm_magic:          0x%08X\n",  lum->lmm_magic);
-                printf("lmm_object_id:      "LPX64"\n", lum->lmm_object_id);
-                printf("lmm_object_gr:      "LPX64"\n", lum->lmm_object_gr);
-                printf("lmm_stripe_count:   %u\n", (int)lum->lmm_stripe_count);
-                printf("lmm_stripe_size:    %u\n",      lum->lmm_stripe_size);
-                printf("lmm_stripe_pattern: %x\n",      lum->lmm_pattern);
-        
-                for (index = 0; index < lum->lmm_stripe_count; index++) {
-                        lo = lum->lmm_objects + index;
-                        printf("object %d:\n", index);
-                        printf("\tobject_gr:    "LPX64"\n", lo->l_object_gr);
-                        printf("\tobject_id:    "LPX64"\n", lo->l_object_id);
-                        printf("\tost_gen:      %#x\n", lo->l_ost_gen);
-                        printf("\tost_idx:      %u\n", lo->l_ost_idx);
-                }
-        }
-
-        if (lum->lmm_magic != LOV_USER_MAGIC ||
-            lum->lmm_pattern != LOV_PATTERN_RAID0 ||
-            lum->lmm_stripe_size != STRIPE_SIZE ||
-            lum->lmm_objects[0].l_ost_idx != STRIPE_OFFSET ||
-            lum->lmm_stripe_count != STRIPE_COUNT) {
-                printf("incorrect striping information!\n");
-                t_unlink(file);
-                t_rmdir(path);
-                free(lum);
-                return -1;
-        }
-
-        t_unlink(file);
-        t_rmdir(path);
-        free(lum);
-        LEAVE();
-}
-
-/*
- * getdirentries should return -1 and set errno to EINVAL when the size
- * specified as an argument is too small to contain at least one entry
- * (see bugzilla ticket 12229)
- */
-int t56(char *name)
-{
-        int fd;
-        size_t nbytes;
-        off_t basep = 0;
-        ssize_t rc = 0;
-        struct dirent dir;
-
-        ENTRY("getdirentries should fail if nbytes is too small");
-
-        /* Set count to be very small.  The result should be EINVAL */
-        nbytes = 8;
-
-        /* open the directory and call getdirentries */
-        fd = t_opendir(lustre_path);
-
-        rc = getdirentries(fd, (char *)&dir, nbytes, &basep);
-
-        if (rc != -1) {
-                printf("Test failed: getdirentries returned %ld\n", rc);
-                t_close(fd);
-                return -1;
-        }
-        if (errno != EINVAL) {
-                printf("Test failed: getdirentries returned %ld but errno is set"
-                                " to %d (should be EINVAL)\n", rc, errno);
-                t_close(fd);
-                return -1;
-        }
-        t_close(fd);
-
-        LEAVE();
-}
-
-
-extern void __liblustre_setup_(void);
-extern void __liblustre_cleanup_(void);
-
-
-void usage(char *cmd)
-{
-        printf("\n"
-               "usage: %s [--only {test}] --target mgsnid:/fsname\n",
-               cmd);
-        printf("       %s --dumpfile dumpfile\n", cmd);
-        exit(-1);
-}
-
-struct testlist {
-        int (*test)(char *name);
-        char *name;
-} testlist[] = {
-        { t1, "1" },
-        { t2, "2" },
-        { t3, "3" },
-        { t4, "4" },
-        { t6, "6" },
-        { t6b, "6b" },
-        { t7, "7" },
-        { t8, "8" },
-        { t9, "9" },
-        { t10, "10" },
-        { t11, "11" },
-        { t12, "12" },
-        { t13, "13" },
-        { t14, "14" },
-        { t15, "15" },
-        { t16, "16" },
-        { t17, "17" },
-        { t18, "18" },
-        { t18b, "t8b" },
-        { t19, "19" },
-        { t20, "20" },
-        { t21, "21" },
-        { t22, "22" },
-        { t23, "23" },
-        { t50, "50" },
-        { t50b, "50b" },
-        { t51, "51" },
-        { t53, "53" },
-        { t54, "54" },
-        { t55, "55" },
-        { t56, "56" },
-        { NULL, NULL }
-};
-
-int main(int argc, char * const argv[])
-{
-        struct testlist *test;
-        int opt_index, c, rc = 0, numonly = 0;
-        char *only[100];
-        static struct option long_opts[] = {
-                {"dumpfile", 1, 0, 'd'},
-                {"only", 1, 0, 'o'},
-                {"target", 1, 0, 't'},
-                {"verbose", 1, 0, 'v'},
-                {0, 0, 0, 0}
-        };
-
-        while ((c = getopt_long(argc, argv, "d:o:t:v", long_opts, &opt_index)) != -1) {
-                switch (c) {
-                case 'd':
-                        setenv(ENV_LUSTRE_DUMPFILE, optarg, 1);
-                        break;
-                case 'o':
-                        if (numonly == 0)
-                                printf("Only running test(s): ");
-                        printf("%s ", optarg);
-                        only[numonly++] = optarg;
-                        break;
-                case 't':
-                        setenv(ENV_LUSTRE_MNTTGT, optarg, 1);
-                        break;
-                case 'v':
-                        opt_verbose++;
-                        break;
-                default:
-                        usage(argv[0]);
-                        break;
-                }
-        }
-
-        if (getenv(ENV_LUSTRE_MNTTGT) == NULL &&
-            getenv(ENV_LUSTRE_DUMPFILE) == NULL)
-                usage(argv[0]);
-
-        if (optind != argc)
-                usage(argv[0]);
-
-        printf("\n");
-
-        __liblustre_setup_();
-
-        buf_size = _npages * PAGE_SIZE;
-        if (opt_verbose)
-                printf("allocating %d bytes buffer\n", buf_size);
-        buf_alloc = calloc(1, buf_size);
-        if (buf_alloc == NULL) {
-                fprintf(stderr, "error allocating %d\n", buf_size);
-                exit(-ENOMEM);
-        }
-
-        for (test = testlist; test->test != NULL; test++) {
-                int run = 1, i;
-
-                if (numonly > 0) {
-                        int len;
-
-                        run = 0;
-                        len = strlen(test->name);
-                        for (i = 0; i < numonly; i++) {
-                                int olen = strlen(only[i]);
-
-                                if (len < olen)
-                                        continue;
-
-                                if (strncmp(only[i], test->name, olen) == 0) {
-                                        switch(test->name[olen]) {
-                                        case '0': case '1': case '2': case '3':
-                                        case '4': case '5': case '6': case '7':
-                                        case '8': case '9':
-                                                break;
-                                        default:
-                                                run = 1;
-                                                break;
-                                        }
-                                }
-                        }
-                }
-                if (run && (rc = (test->test)(test->name)) != 0)
-                        break;
-        }
-
-        free(buf_alloc);
-
-        printf("liblustre is about to shutdown\n");
-        __liblustre_cleanup_();
-
-        printf("complete successfully\n");
-        return rc;
-}
diff --git a/lustre/liblustre/tests/test_common.c b/lustre/liblustre/tests/test_common.c
deleted file mode 100644
index 29377b188037f87b365a99316749c8f50504085e..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/test_common.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <dirent.h>
-#include <utime.h>
-#include <stdarg.h>
-
-#include "test_common.h"
-
-int exit_on_err = 1;
-
-/******************************************************************
- * util functions
- ******************************************************************/
-
-#define EXIT(err)					\
-	do {						\
-		if (exit_on_err)			\
-			exit(err);			\
-	} while (0)
-
-#define EXIT_RET(err)					\
-	do {						\
-		if (exit_on_err)			\
-			exit(err);			\
-		else					\
-			return (err);			\
-	} while (0)
-
-
-void t_touch(const char *path)
-{
-        int fd, rc;
-
-        fd = open(path, O_RDWR|O_CREAT, 0644);
-        if (fd < 0) {
-                printf("open(%s) error: %s\n", path, strerror(errno));
-                EXIT(fd);
-        }
-
-        rc = close(fd);
-        if (rc) {
-                printf("close(%s) error: %s\n", path, strerror(errno));
-                EXIT(rc);
-        }
-}
-
-/* XXX Now libsysio don't support mcreate */
-void t_create(const char *path)
-{
-        return t_touch(path);
-#if 0
-        int rc;
-
-        rc = mknod(path, S_IFREG | 0644, 0);
-        if (rc) {
-                printf("mknod(%s) error: %s\n", path, strerror(errno));
-                exit(-1);
-        }
-#endif
-}
-
-void t_link(const char *src, const char *dst)
-{
-	int rc;
-
-	rc = link(src, dst);
-	if (rc) {
-		printf("link(%s -> %s) error: %s\n", src, dst, strerror(errno));
-		EXIT(1);
-	}
-}
-
-void t_unlink(const char *path)
-{
-        int rc;
-
-        rc = unlink(path);
-        if (rc) {
-                printf("unlink(%s) error: %s\n", path, strerror(errno));
-                EXIT(-1);
-        }
-}
-
-void t_mkdir(const char *path)
-{
-        int rc;
-
-        rc = mkdir(path, 00755);
-        if (rc < 0) {
-                printf("mkdir(%s) error: %s\n", path, strerror(errno));
-                EXIT(1);
-        }
-}
-
-void t_rmdir(const char *path)
-{
-        int rc;
-
-        rc = rmdir(path);
-        if (rc) {
-                printf("rmdir(%s) error: %s\n", path, strerror(errno));
-                EXIT(1);
-        }
-}
-
-void t_symlink(const char *src, const char *new)
-{
-	int rc;
-
-	rc = symlink(src, new);
-	if (rc) {
-		printf("symlink(%s<-%s) error: %s\n", src, new, strerror(errno));
-		EXIT(1);
-	}
-}
-
-#define MKDEV(a,b) (((a) << 8) | (b))
-void t_mknod(const char *path, mode_t mode, int major, int minor)
-{
-	int rc;
-
-        rc = mknod(path, mode, MKDEV(5, 4));
-        if (rc) {
-                printf("mknod(%s) error: %s\n", path, strerror(errno));
-                EXIT(1);
-        }
-}
-
-void t_chmod_raw(const char *path, mode_t mode)
-{
-	int rc;
-	
-	rc = chmod(path, mode);
-	if (rc) {
-                printf("chmod(%s) error: %s\n", path, strerror(errno));
-                EXIT(1);
-        }
-}
-
-void t_chmod(const char *path, const char *format, ...)
-{
-}
-
-void t_rename(const char *oldpath, const char *newpath)
-{
-        int rc;
-
-        rc = rename(oldpath, newpath);
-        if (rc) {
-                printf("rename(%s -> %s) error: %s\n",
-		       oldpath, newpath, strerror(errno));
-                EXIT(1);
-        }
-}
-
-int t_open_readonly(const char *path)
-{
-        int fd;
-
-        fd = open(path, O_RDONLY);
-        if (fd < 0) {
-                printf("open(%s) error: %s\n", path, strerror(errno));
-                EXIT_RET(fd);
-        }
-        return fd;
-}
-
-int t_open(const char *path)
-{
-        int fd;
-
-        fd = open(path, O_RDWR | O_LARGEFILE);
-        if (fd < 0) {
-                printf("open(%s) error: %s\n", path, strerror(errno));
-                EXIT_RET(fd);
-        }
-        return fd;
-}
-
-int t_chdir(const char *path)
-{
-        int rc = chdir(path);
-        if (rc < 0) {
-                printf("chdir(%s) error: %s\n", path, strerror(errno));
-                EXIT_RET(rc);
-        }
-        return rc;
-}
-
-int t_utime(const char *path, const struct utimbuf *buf)
-{
-        int rc = utime(path, buf);
-        if (rc < 0) {
-                printf("utime(%s, %p) error: %s\n", path, buf,
-                       strerror(errno));
-                EXIT_RET(rc);
-        }
-        return rc;
-}
-
-int t_opendir(const char *path)
-{
-        int fd;
-
-        fd = open(path, O_RDONLY);
-        if (fd < 0) {
-                printf("opendir(%s) error: %s\n", path, strerror(errno));
-                EXIT_RET(fd);
-        }
-        return fd;
-}
-
-void t_close(int fd)
-{
-        int rc;
-
-        rc = close(fd);
-        if (rc < 0) {
-                printf("close(%d) error: %s\n", fd, strerror(errno));
-                EXIT(1);
-        }
-}
-
-int t_check_stat(const char *name, struct stat *buf)
-{
-	struct stat stat;
-        int rc;
-
-        memset(&stat, 0, sizeof(stat));
-
-	rc = lstat(name, &stat);
-        if (rc) {
-		printf("error %d stat %s\n", rc, name);
-		EXIT_RET(rc);
-	}
-        if (buf)
-                memcpy(buf, &stat, sizeof(*buf));
-        if (stat.st_blksize == 0) {
-                printf("error: blksize is 0\n");
-                EXIT_RET(-EINVAL);
-        }
-
-	return 0;
-}
-
-int t_check_stat_fail(const char *name)
-{
-	struct stat stat;
-        int rc;
-
-	rc = lstat(name, &stat);
-        if (!rc) {
-		printf("%s still exists\n", name);
-		EXIT(-1);
-	}
-
-	return 0;
-}
-
-void t_echo_create(const char *path, const char *str)
-{
-        int fd, rc;
-
-        fd = open(path, O_RDWR|O_CREAT, 0644);
-        if (fd < 0) {
-                printf("open(%s) error: %s\n", path, strerror(errno));
-                EXIT(fd);
-        }
-
-	if (write(fd, str, strlen(str)+1) != strlen(str)+1) {
-                printf("write(%s) error: %s\n", path, strerror(errno));
-                EXIT(fd);
-	}
-
-        rc = close(fd);
-        if (rc) {
-                printf("close(%s) error: %s\n", path, strerror(errno));
-                EXIT(rc);
-        }
-}
-
-static void _t_grep(const char *path, char *str, int should_contain)
-{
-	char buf[1024];
-	int fd;
-	int rc;
-	
-	fd = t_open_readonly(path);
-	if (lseek(fd, 0, SEEK_SET) == -1) {
-		printf("pread_once: seek to 0 error: %s\n", strerror(errno));
-		EXIT(fd);
-	}
-
-	rc = read(fd, buf, 1023);
-	if (rc < 0) {
-		printf("grep: read error: %s\n", strerror(errno));
-		EXIT(-1);
-	}
-	close(fd);
-	buf[rc] = 0;
-
-	if ((strstr(buf, str) != 0) ^ should_contain) {
-		printf("grep: can't find string %s\n", str);
-		EXIT(-1);
-	}
-}
-
-void t_grep(const char *path, char *str)
-{
-	_t_grep(path, str, 1);
-}
-
-void t_grep_v(const char *path, char *str)
-{
-	_t_grep(path, str, 0);
-}
-
-void t_ls(int fd, char *buf, int size)
-{
-	struct dirent64 *ent;
-	int rc, pos;
-	loff_t base = 0;
-
-	printf("dir entries listing...\n");
-	while ((rc = getdirentries64(fd, buf, size, &base)) > 0) {
-		pos = 0;
-		while (pos < rc) {
-			ent = (struct dirent64 *) ((char*) buf + pos);
-			printf("%s\n", ent->d_name);
-			pos += ent->d_reclen;
-		}
-	}
-
-	if (rc < 0) {
-		printf("getdents error %d\n", rc);
-		EXIT(-1);
-	}
-}
-
-int t_fcntl(int fd, int cmd, ...)
-{
-	va_list ap;
-	long arg;
-	struct flock *lock;
-	int rc = -1;
-
-	va_start(ap, cmd);
-	switch (cmd) {
-	case F_GETFL:
-		va_end(ap);
-		rc = fcntl(fd, cmd);
-		if (rc == -1) {
-			printf("fcntl GETFL failed: %s\n",
-				 strerror(errno));
-			EXIT(1);
-		}
-		break;
-	case F_SETFL:
-		arg = va_arg(ap, long);
-		va_end(ap);
-		rc = fcntl(fd, cmd, arg);
-		if (rc == -1) {
-			printf("fcntl SETFL %ld failed: %s\n",
-				 arg, strerror(errno));
-			EXIT(1);
-		}
-		break;
-	case F_GETLK:
-#ifdef F_GETLK64
-#if F_GETLK64 != F_GETLK
-        case F_GETLK64:
-#endif
-#endif
-	case F_SETLK:
-#ifdef F_SETLK64
-#if F_SETLK64 != F_SETLK
-        case F_SETLK64:
-#endif
-#endif
-	case F_SETLKW:
-#ifdef F_SETLKW64
-#if F_SETLKW64 != F_SETLKW
-        case F_SETLKW64:
-#endif
-#endif
-		lock = va_arg(ap, struct flock *);
-		va_end(ap);
-		rc = fcntl(fd, cmd, lock);
-		if (rc == -1) {
-			printf("fcntl cmd %d failed: %s\n",
-				 cmd, strerror(errno));
-			EXIT(1);
-		}
-		break;
-	case F_DUPFD:
-		arg = va_arg(ap, long);
-		va_end(ap);
-		rc = fcntl(fd, cmd, arg);
-		if (rc == -1) {
-			printf("fcntl F_DUPFD %d failed: %s\n",
-				 (int)arg, strerror(errno));
-			EXIT(1);
-		}
-		break;
-	default:
-		va_end(ap);
-		printf("fcntl cmd %d not supported\n", cmd);
-		EXIT(1);
-	}
-	return rc;
-}
-
-char *safe_strncpy(char *dst, char *src, int max_size)
-{
-       int src_size;
-       src_size=strlen(src);
-       if (src_size >= max_size) {
-	 src_size=max_size-1;
-       }
-       memcpy(dst, src, src_size);
-       dst[src_size]=0;
-
-       return(dst);
-}
diff --git a/lustre/liblustre/tests/test_common.h b/lustre/liblustre/tests/test_common.h
deleted file mode 100644
index 5949a42c8a74b1546e632127e0dcedc40b508e27..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/test_common.h
+++ /dev/null
@@ -1,40 +0,0 @@
-#ifndef __TEST_COMMON__H
-#define __TEST_COMMON__H
-
-#define ENV_LUSTRE_MNTPNT               "LIBLUSTRE_MOUNT_POINT"
-#define ENV_LUSTRE_MNTTGT               "LIBLUSTRE_MOUNT_TARGET"
-#define ENV_LUSTRE_TIMEOUT              "LIBLUSTRE_TIMEOUT"
-#define ENV_LUSTRE_DUMPFILE             "LIBLUSTRE_DUMPFILE"
-
-extern int exit_on_err;
-
-#include <utime.h> /* for utimbuf */
-
-void t_touch(const char *path);
-void t_create(const char *path);
-void t_link(const char *src, const char *dst);
-void t_unlink(const char *path);
-void t_mkdir(const char *path);
-void t_rmdir(const char *path);
-void t_symlink(const char *src, const char *new);
-void t_mknod(const char *path, mode_t mode, int major, int minor);
-void t_chmod_raw(const char *path, mode_t mode);
-void t_chmod(const char *path, const char *format, ...);
-void t_rename(const char *oldpath, const char *newpath);
-int t_open_readonly(const char *path);
-int t_open(const char *path);
-int t_chdir(const char *path);
-int t_utime(const char *path, const struct utimbuf *buf);
-int t_opendir(const char *path);
-void t_close(int fd);
-int t_check_stat(const char *name, struct stat *buf);
-int t_check_stat_fail(const char *name);
-void t_echo_create(const char *path, const char *str);
-void t_grep(const char *path, char *str);
-void t_grep_v(const char *path, char *str);
-void t_ls(int fd, char *buf, int size);
-int t_fcntl(int fd, int cmd, ...);
-
-char *safe_strncpy(char *dst, char *src, int max_size);
-
-#endif
diff --git a/lustre/liblustre/tests/test_lock_cancel.c b/lustre/liblustre/tests/test_lock_cancel.c
deleted file mode 100644
index 9350e4c5f08267bd7accea1fd3d54ebf290982fa..0000000000000000000000000000000000000000
--- a/lustre/liblustre/tests/test_lock_cancel.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define _BSD_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <string.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-
-#include <sysio.h>
-#include <mount.h>
-
-#include <test_common.h>
-
-#include <mpi.h>
-
-/******************************************************************************/
-/*
- * MPI_CHECK will display a custom error message as well as an error string
- * from the MPI_STATUS and then exit the program
- */
-
-#define MPI_CHECK(MPI_STATUS, MSG) do {                                  \
-    char resultString[MPI_MAX_ERROR_STRING];                             \
-    int resultLength;                                                    \
-                                                                         \
-    if (MPI_STATUS != MPI_SUCCESS) {                                     \
-        fprintf(stdout, "** error **\n");                                \
-        fprintf(stdout, "ERROR in %s (line %d): %s.\n",                  \
-                __FILE__, __LINE__, MSG);                                \
-        MPI_Error_string(MPI_STATUS, resultString, &resultLength);       \
-        fprintf(stdout, "MPI %s\n", resultString);                       \
-        fprintf(stdout, "** exiting **\n");                              \
-        MPI_Abort(MPI_COMM_WORLD, 1);                                    \
-    }                                                                    \
-} while(0)
-
-int		numTasks     = 0,	/* MPI variables */
-		rank         = 0,
-		tasksPerNode = 0;	/* tasks per node */
-
-
-
-
-static char *test_file_name = "/mnt/lustre/test_lock_cancel";
-
-extern void __liblustre_setup_(void);
-extern void __liblustre_cleanup_(void);
-
-void usage(char *cmd)
-{
-        printf("Usage: \t%s --target mdsnid:/mdsname/profile\n", cmd);
-        printf("       \t%s --dumpfile dumpfile\n", cmd);
-        exit(-1);
-}
-
-int main(int argc, char *argv[])
-{
-        int opt_index, c;
-        static struct option long_opts[] = {
-                {"target", 1, 0, 0},
-                {"dumpfile", 1, 0, 0},
-                {0, 0, 0, 0}
-        };
-	int fd;
-        long time1, time2;
-        struct stat statbuf;
-
-        if (argc < 3)
-                usage(argv[0]);
-
-        while ((c = getopt_long(argc, argv, "", long_opts, &opt_index)) != -1) {
-                switch (c) {
-                case 0: {
-                        if (!optarg[0])
-                                usage(argv[0]);
-
-                        if (!strcmp(long_opts[opt_index].name, "target")) {
-                                setenv(ENV_LUSTRE_MNTTGT, optarg, 1);
-                        } else if (!strcmp(long_opts[opt_index].name, "dumpfile")) {
-                                setenv(ENV_LUSTRE_DUMPFILE, optarg, 1);
-                        } else
-                                usage(argv[0]);
-                        break;
-                }
-                default:
-                        usage(argv[0]);
-                }
-        }
-
-        if (optind != argc)
-                usage(argv[0]);
-
-        __liblustre_setup_();
-
-	MPI_CHECK(MPI_Init(&argc, &argv), "MPI_Init()");
-	MPI_CHECK(MPI_Comm_size(MPI_COMM_WORLD, &numTasks), "MPI_Comm_size");
-	MPI_CHECK(MPI_Comm_rank(MPI_COMM_WORLD, &rank), "MPI_Comm_rank");
-
-        if (numTasks < 2) {
-                printf("this demo can't run on single node!\n");
-                goto cleanup;
-        }
-
-        if (rank == 0) {
-                unlink(test_file_name);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-        if (rank == 1) {
-                printf("Node 1: creating file %s ...\n", test_file_name);
-                fflush(stdout);
-
-                fd = open(test_file_name, O_CREAT|O_RDWR, 0755);
-                if (fd < 0) {
-                        printf("Node %d: creat file err: %d", rank, fd);
-                        fflush(stdout);
-                        goto cleanup;
-                }
-                close(fd);
-                printf("Node 1: done creation. perform stat on file %s ...\n", test_file_name);
-                fflush(stdout);
-
-                if (stat(test_file_name, &statbuf)) {
-                        printf("Node %d: stat file err: %d", rank, fd);
-                        fflush(stdout);
-                        goto cleanup;
-                }
-
-                printf("Node %d: done stat on file\n", rank);
-                fflush(stdout);
-        } else {
-                printf("Node %d: waiting node 1 create & stat file\n", rank);
-                fflush(stdout);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-        
-        if (rank == 1) {
-                printf("Node 1: file has been create+stat, abort excution here!!!!!!!\n");
-                fflush(stdout);
-                exit(0);
-        }
-        
-        sleep(1);
-        printf("Node %d: synced with Node 1. sleep 5 seconds...\n", rank);
-        fflush(stdout);
-        sleep(5);
-        printf("Node %d: wakeup from sleep. perform unlink()...\n", rank);
-        fflush(stdout);
-
-        time1 = time(NULL);
-        if (unlink(test_file_name)) {
-                printf("Node %d: error unlink file: %d\n", rank, fd);
-                fflush(stdout);
-                goto cleanup;
-        }
-        time2 = time(NULL);
-        printf("Node %d: successfully unlink file, cost %ld seconds.\n",
-                rank, time2 - time1);
-        fflush(stdout);
-
-cleanup:
-        __liblustre_cleanup_();
-        printf("Node %d: end sucessfully.\n", rank);
-	return 0;
-}
diff --git a/lustre/llite/.cvsignore b/lustre/llite/.cvsignore
deleted file mode 100644
index 016f1949fa729d1dcc8edadf2b447097c33b9398..0000000000000000000000000000000000000000
--- a/lustre/llite/.cvsignore
+++ /dev/null
@@ -1,16 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.cmd
-.*.flags
-.*.o.d
-.tmp_versions
-.depend
diff --git a/lustre/llite/Makefile.in b/lustre/llite/Makefile.in
deleted file mode 100644
index fad7b02fd057d039e9de0d8431e49fe314d3e40d..0000000000000000000000000000000000000000
--- a/lustre/llite/Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
-MODULES := lustre llite_lloop
-lustre-objs := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o rw.o lproc_llite.o namei.o symlink.o llite_mmap.o xattr.o statahead.o
-
-llite_lloop-objs := lloop.o
-
-ifeq ($(PATCHLEVEL),4)
-lustre-objs += rw24.o super.o
-else
-lustre-objs += rw26.o super25.o
-endif
-
-@INCLUDE_RULES@
diff --git a/lustre/llite/autoMakefile.am b/lustre/llite/autoMakefile.am
deleted file mode 100644
index 3ebe906bec5fc9d4aa023b25530539304aa8fe6a..0000000000000000000000000000000000000000
--- a/lustre/llite/autoMakefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if MODULES
-modulefs_DATA = lustre$(KMODEXT) llite_lloop$(KMODEXT)
-endif
-
-DIST_SOURCES := $(lustre-objs:.o=.c) llite_internal.h rw24.c super.c rw26.c super25.c
-DIST_SOURCES += $(llite_lloop-objs:.o=.c)
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c
deleted file mode 100644
index 96e01b117c8bfdf0d7da45aa094ab01044df1581..0000000000000000000000000000000000000000
--- a/lustre/llite/dcache.c
+++ /dev/null
@@ -1,794 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/fs.h>
-#include <linux/sched.h>
-#include <linux/smp_lock.h>
-#include <linux/quotaops.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <obd_support.h>
-#include <lustre_lite.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <linux/lustre_version.h>
-
-#include "llite_internal.h"
-
-/* should NOT be called with the dcache lock, see fs/dcache.c */
-static void ll_release(struct dentry *de)
-{
-        struct ll_dentry_data *lld;
-        ENTRY;
-        LASSERT(de != NULL);
-        lld = ll_d2d(de);
-        if (lld == NULL) { /* NFS copies the de->d_op methods (bug 4655) */
-                EXIT;
-                return;
-        }
-#ifndef HAVE_VFS_INTENT_PATCHES
-        if (lld->lld_it) {
-                ll_intent_release(lld->lld_it);
-                OBD_FREE(lld->lld_it, sizeof(*lld->lld_it));
-        }
-#endif
-        LASSERT(lld->lld_cwd_count == 0);
-        LASSERT(lld->lld_mnt_count == 0);
-        OBD_FREE(de->d_fsdata, sizeof(*lld));
-
-        EXIT;
-}
-
-#ifdef DCACHE_LUSTRE_INVALID
-/* Compare if two dentries are the same.  Don't match if the existing dentry
- * is marked DCACHE_LUSTRE_INVALID.  Returns 1 if different, 0 if the same.
- *
- * This avoids a race where ll_lookup_it() instantiates a dentry, but we get
- * an AST before calling d_revalidate_it().  The dentry still exists (marked
- * INVALID) so d_lookup() matches it, but we have no lock on it (so
- * lock_match() fails) and we spin around real_lookup(). */
-int ll_dcompare(struct dentry *parent, struct qstr *d_name, struct qstr *name)
-{
-        struct dentry *dchild;
-        ENTRY;
-
-        if (d_name->len != name->len)
-                RETURN(1);
-
-        if (memcmp(d_name->name, name->name, name->len))
-                RETURN(1);
-
-        /* XXX: d_name must be in-dentry structure */
-        dchild = container_of(d_name, struct dentry, d_name); /* ugh */
-        if (dchild->d_flags & DCACHE_LUSTRE_INVALID) {
-                CDEBUG(D_DENTRY,"INVALID dentry %p not matched, was bug 3784\n",
-                       dchild);
-                RETURN(1);
-        }
-
-        RETURN(0);
-}
-#endif
-
-/* should NOT be called with the dcache lock, see fs/dcache.c */
-static int ll_ddelete(struct dentry *de)
-{
-        ENTRY;
-        LASSERT(de);
-#ifndef DCACHE_LUSTRE_INVALID
-#define DCACHE_LUSTRE_INVALID 0
-#endif
-
-        CDEBUG(D_DENTRY, "%s dentry %.*s (%p, parent %p, inode %p) %s%s\n",
-               (de->d_flags & DCACHE_LUSTRE_INVALID ? "deleting" : "keeping"),
-               de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode,
-               d_unhashed(de) ? "" : "hashed,",
-               list_empty(&de->d_subdirs) ? "" : "subdirs");
-#if DCACHE_LUSTRE_INVALID == 0
-#undef DCACHE_LUSTRE_INVALID
-#endif
-
-        RETURN(0);
-}
-
-void ll_set_dd(struct dentry *de)
-{
-        ENTRY;
-        LASSERT(de != NULL);
-
-        CDEBUG(D_DENTRY, "ldd on dentry %.*s (%p) parent %p inode %p refc %d\n",
-               de->d_name.len, de->d_name.name, de, de->d_parent, de->d_inode,
-               atomic_read(&de->d_count));
-
-        if (de->d_fsdata == NULL) {
-                struct ll_dentry_data *lld;
-
-                OBD_ALLOC(lld, sizeof(struct ll_dentry_data));
-                if (likely(lld != NULL)) {
-                        cfs_waitq_init(&lld->lld_waitq);
-                        lock_dentry(de);
-                        if (likely(de->d_fsdata == NULL))
-                                de->d_fsdata = lld;
-                        else
-                                OBD_FREE(lld, sizeof(struct ll_dentry_data));
-                        unlock_dentry(de);
-                }
-        }
-
-        EXIT;
-}
-
-void ll_intent_drop_lock(struct lookup_intent *it)
-{
-        struct lustre_handle *handle;
-
-        if (it->it_op && it->d.lustre.it_lock_mode) {
-                handle = (struct lustre_handle *)&it->d.lustre.it_lock_handle;
-                CDEBUG(D_DLMTRACE, "releasing lock with cookie "LPX64
-                       " from it %p\n", handle->cookie, it);
-                ldlm_lock_decref(handle, it->d.lustre.it_lock_mode);
-
-                /* bug 494: intent_release may be called multiple times, from
-                 * this thread and we don't want to double-decref this lock */
-                it->d.lustre.it_lock_mode = 0;
-        }
-}
-
-void ll_intent_release(struct lookup_intent *it)
-{
-        ENTRY;
-
-        ll_intent_drop_lock(it);
-#ifdef HAVE_VFS_INTENT_PATCHES
-        it->it_magic = 0;
-        it->it_op_release = 0;
-#endif
-        /* We are still holding extra reference on a request, need to free it */
-        if (it_disposition(it, DISP_ENQ_OPEN_REF)) /* open req for llfile_open*/
-                ptlrpc_req_finished(it->d.lustre.it_data);
-        if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */
-                ptlrpc_req_finished(it->d.lustre.it_data);
-        if (it_disposition(it, DISP_ENQ_COMPLETE)) /* saved req from revalidate
-                                                    * to lookup */
-                ptlrpc_req_finished(it->d.lustre.it_data);
-
-        it->d.lustre.it_disposition = 0;
-        it->d.lustre.it_data = NULL;
-        EXIT;
-}
-
-/* Drop dentry if it is not used already, unhash otherwise.
-   Should be called with dcache lock held!
-   Returns: 1 if dentry was dropped, 0 if unhashed. */
-int ll_drop_dentry(struct dentry *dentry)
-{
-        lock_dentry(dentry);
-        if (atomic_read(&dentry->d_count) == 0) {
-                CDEBUG(D_DENTRY, "deleting dentry %.*s (%p) parent %p "
-                       "inode %p\n", dentry->d_name.len,
-                       dentry->d_name.name, dentry, dentry->d_parent,
-                       dentry->d_inode);
-                dget_locked(dentry);
-                __d_drop(dentry);
-                unlock_dentry(dentry);
-                spin_unlock(&dcache_lock);
-                dput(dentry);
-                spin_lock(&dcache_lock);
-                return 1;
-        }
-	/* disconected dentry can not be find without lookup, because we 
-	 * not need his to unhash or mark invalid. */
-	if (dentry->d_flags & DCACHE_DISCONNECTED) {
-		unlock_dentry(dentry);
-		RETURN (0);
-	}
-
-#ifdef DCACHE_LUSTRE_INVALID
-        if (!(dentry->d_flags & DCACHE_LUSTRE_INVALID)) {
-#else
-        if (!d_unhashed(dentry)) {
-#endif
-                CDEBUG(D_DENTRY, "unhashing dentry %.*s (%p) parent %p "
-                       "inode %p refc %d\n", dentry->d_name.len,
-                       dentry->d_name.name, dentry, dentry->d_parent,
-                       dentry->d_inode, atomic_read(&dentry->d_count));
-                /* actually we don't unhash the dentry, rather just
-                 * mark it inaccessible for to __d_lookup(). otherwise
-                 * sys_getcwd() could return -ENOENT -bzzz */
-#ifdef DCACHE_LUSTRE_INVALID
-                dentry->d_flags |= DCACHE_LUSTRE_INVALID;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-                __d_drop(dentry);
-                if (dentry->d_inode) {
-                        /* Put positive dentries to orphan list */
-                        list_add(&dentry->d_hash,
-                                 &ll_i2sbi(dentry->d_inode)->ll_orphan_dentry_list);
-                }
-#endif
-#else
-                if (!dentry->d_inode || !S_ISDIR(dentry->d_inode->i_mode))
-                        __d_drop(dentry);
-#endif
-
-        }
-        unlock_dentry(dentry);
-        return 0;
-}
-
-void ll_unhash_aliases(struct inode *inode)
-{
-        struct list_head *tmp, *head;
-        ENTRY;
-
-        if (inode == NULL) {
-                CERROR("unexpected NULL inode, tell phil\n");
-                return;
-        }
-
-        CDEBUG(D_INODE, "marking dentries for ino %lu/%u(%p) invalid\n",
-               inode->i_ino, inode->i_generation, inode);
-
-        head = &inode->i_dentry;
-        spin_lock(&dcache_lock);
-restart:
-        tmp = head;
-        while ((tmp = tmp->next) != head) {
-                struct dentry *dentry = list_entry(tmp, struct dentry, d_alias);
-
-                if (dentry->d_name.len == 1 && dentry->d_name.name[0] == '/') {
-                        CERROR("called on root (?) dentry=%p, inode=%p "
-                               "ino=%lu\n", dentry, inode, inode->i_ino);
-                        lustre_dump_dentry(dentry, 1);
-                        libcfs_debug_dumpstack(NULL);
-                } else if (d_mountpoint(dentry)) {
-                        /* For mountpoints we skip removal of the dentry
-                           which happens solely because we have a lock on it
-                           obtained when this dentry was not a mountpoint yet */
-                        CDEBUG(D_DENTRY, "Skippind mountpoint dentry removal "
-                                         "%.*s (%p) parent %p\n",
-                                          dentry->d_name.len,
-                                          dentry->d_name.name,
-                                          dentry, dentry->d_parent);
-
-                        continue;
-                }
-
-                if (ll_drop_dentry(dentry))
-                          goto restart;
-        }
-        spin_unlock(&dcache_lock);
-        EXIT;
-}
-
-int revalidate_it_finish(struct ptlrpc_request *request, int offset,
-                         struct lookup_intent *it, struct dentry *de)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (!request)
-                RETURN(0);
-
-        if (it_disposition(it, DISP_LOOKUP_NEG))
-                RETURN(-ENOENT);
-
-        rc = ll_prep_inode(ll_i2sbi(de->d_inode)->ll_osc_exp, &de->d_inode,
-                           request, offset, NULL);
-
-        RETURN(rc);
-}
-
-void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry)
-{
-        LASSERT(it != NULL);
-        LASSERT(dentry != NULL);
-
-        if (it->d.lustre.it_lock_mode && dentry->d_inode != NULL) {
-                struct inode *inode = dentry->d_inode;
-                CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n",
-                       inode, inode->i_ino, inode->i_generation);
-                mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode);
-        }
-
-        /* drop lookup or getattr locks immediately */
-        if (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR) {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-                /* on 2.6 there are situation when several lookups and
-                 * revalidations may be requested during single operation.
-                 * therefore, we don't release intent here -bzzz */
-                ll_intent_drop_lock(it);
-#else
-                ll_intent_release(it);
-#endif
-        }
-}
-
-void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft)
-{
-        struct lookup_intent *it = *itp;
-#if defined(HAVE_VFS_INTENT_PATCHES)&&(LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        if (it) {
-                LASSERTF(it->it_magic == INTENT_MAGIC, "bad intent magic: %x\n",
-                         it->it_magic);
-        }
-#endif
-
-        if (!it || it->it_op == IT_GETXATTR)
-                it = *itp = deft;
-
-#ifdef HAVE_VFS_INTENT_PATCHES
-        it->it_op_release = ll_intent_release;
-#endif
-}
-
-int ll_revalidate_it(struct dentry *de, int lookup_flags,
-                     struct lookup_intent *it)
-{
-        struct mdc_op_data op_data;
-        struct ptlrpc_request *req = NULL;
-        struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
-        struct obd_export *exp;
-        int first = 0, rc;
-
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%s,intent=%s\n", de->d_name.name,
-               LL_IT2STR(it));
-
-        if (de->d_inode == NULL) {
-                /* We can only use negative dentries if this is stat or lookup,
-                   for opens and stuff we do need to query server. */
-                /* If there is IT_CREAT in intent op set, then we must throw
-                   away this negative dentry and actually do the request to
-                   kernel to create whatever needs to be created (if possible)*/
-                if (it && (it->it_op & IT_CREAT))
-                        RETURN(0);
-
-#ifdef DCACHE_LUSTRE_INVALID
-                if (de->d_flags & DCACHE_LUSTRE_INVALID)
-                        RETURN(0);
-#endif
-
-                rc = ll_have_md_lock(de->d_parent->d_inode,
-                                     MDS_INODELOCK_UPDATE);
-                GOTO(out_sa, rc);
-        }
-
-        exp = ll_i2mdcexp(de->d_inode);
-
-        /* Never execute intents for mount points.
-         * Attributes will be fixed up in ll_inode_revalidate_it */
-        if (d_mountpoint(de))
-                GOTO(out_sa, rc = 1);
-
-        /* Root of the lustre tree. Always valid.
-         * Attributes will be fixed up in ll_inode_revalidate_it */
-        if (de == de->d_sb->s_root)
-                GOTO(out_sa, rc = 1);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MDC_REVALIDATE_PAUSE, 5);
-        ll_frob_intent(&it, &lookup_it);
-        LASSERT(it);
-
-        ll_prepare_mdc_op_data(&op_data, de->d_parent->d_inode, de->d_inode,
-                               de->d_name.name, de->d_name.len, 0, NULL);
-
-        if ((it->it_op == IT_OPEN) && de->d_inode) {
-                struct inode *inode = de->d_inode;
-                struct ll_inode_info *lli = ll_i2info(inode);
-                struct obd_client_handle **och_p;
-                __u64 *och_usecount;
-                /* We used to check for MDS_INODELOCK_OPEN here, but in fact
-                 * just having LOOKUP lock is enough to justify inode is the
-                 * same. And if inode is the same and we have suitable
-                 * openhandle, then there is no point in doing another OPEN RPC
-                 * just to throw away newly received openhandle.
-                 * There are no security implications too, if file owner or
-                 * access mode is change, LOOKUP lock is revoked */
-
-                if (it->it_flags & FMODE_WRITE) {
-                        och_p = &lli->lli_mds_write_och;
-                        och_usecount = &lli->lli_open_fd_write_count;
-                } else if (it->it_flags & FMODE_EXEC) {
-                        och_p = &lli->lli_mds_exec_och;
-                        och_usecount = &lli->lli_open_fd_exec_count;
-                } else {
-                        och_p = &lli->lli_mds_read_och;
-                        och_usecount = &lli->lli_open_fd_read_count;
-                }
-                /* Check for the proper lock. */
-                if (!ll_have_md_lock(inode, MDS_INODELOCK_LOOKUP))
-                        goto do_lock;
-                down(&lli->lli_och_sem);
-                if (*och_p) { /* Everything is open already, do nothing */
-                        /*(*och_usecount)++;  Do not let them steal our open
-                                              handle from under us */
-                        /* XXX The code above was my original idea, but in case
-                           we have the handle, but we cannot use it due to later
-                           checks (e.g. O_CREAT|O_EXCL flags set), nobody
-                           would decrement counter increased here. So we just
-                           hope the lock won't be invalidated in between. But
-                           if it would be, we'll reopen the open request to
-                           MDS later during file open path */
-                        up(&lli->lli_och_sem);
-                        RETURN(1);
-                } else {
-                        up(&lli->lli_och_sem);
-                }
-        }
-
-        if (it->it_op == IT_GETATTR)
-                first = ll_statahead_enter(de->d_parent->d_inode, &de, 0);
-
-do_lock:
-        it->it_create_mode &= ~current->fs->umask;
-
-        rc = mdc_intent_lock(exp, &op_data, NULL, 0, it, lookup_flags,
-                             &req, ll_mdc_blocking_ast, 0);
-        if (it->it_op == IT_GETATTR && !first)
-                ll_statahead_exit(de, rc);
-        /* If req is NULL, then mdc_intent_lock only tried to do a lock match;
-         * if all was well, it will return 1 if it found locks, 0 otherwise. */
-        if (req == NULL && rc >= 0) {
-                if (!rc)
-                        goto do_lookup;
-                GOTO(out, rc);
-        }
-
-        if (rc < 0) {
-                if (rc != -ESTALE) {
-                        CDEBUG(D_INFO, "ll_intent_lock: rc %d : it->it_status "
-                               "%d\n", rc, it->d.lustre.it_status);
-                }
-                GOTO(out, rc = 0);
-        }
-
-revalidate_finish:
-        rc = revalidate_it_finish(req, DLM_REPLY_REC_OFF, it, de);
-        if (rc != 0) {
-                ll_intent_release(it);
-                GOTO(out, rc = 0);
-        }
-        if ((it->it_op & IT_OPEN) && de->d_inode && 
-            !S_ISREG(de->d_inode->i_mode) && 
-            !S_ISDIR(de->d_inode->i_mode)) {
-                ll_release_openhandle(de, it);
-        }
-        rc = 1;
-
-        /* unfortunately ll_intent_lock may cause a callback and revoke our
-         * dentry */
-        spin_lock(&dcache_lock);
-        lock_dentry(de);
-        __d_drop(de);
-        unlock_dentry(de);
-        d_rehash_cond(de, 0);
-        spin_unlock(&dcache_lock);
-
- out:
-        /* We do not free request as it may be reused during following lookup
-         * (see comment in mdc/mdc_locks.c::mdc_intent_lock()), request will
-         * be freed in ll_lookup_it or in ll_intent_release. But if
-         * request was not completed, we need to free it. (bug 5154, 9903) */
-        if (req != NULL && !it_disposition(it, DISP_ENQ_COMPLETE))
-                ptlrpc_req_finished(req);
-        if (rc == 0) {
-#ifdef DCACHE_LUSTRE_INVALID
-                ll_unhash_aliases(de->d_inode);
-                /* done in ll_unhash_aliases()
-                dentry->d_flags |= DCACHE_LUSTRE_INVALID; */
-#else
-                /* We do not want d_invalidate to kill all child dentries too */
-                d_drop(de);
-#endif
-        } else {
-                CDEBUG(D_DENTRY, "revalidated dentry %.*s (%p) parent %p "
-                               "inode %p refc %d\n", de->d_name.len,
-                               de->d_name.name, de, de->d_parent, de->d_inode,
-                               atomic_read(&de->d_count));
-                ll_lookup_finish_locks(it, de);
-#ifdef DCACHE_LUSTRE_INVALID
-                lock_dentry(de);
-                de->d_flags &= ~DCACHE_LUSTRE_INVALID;
-                unlock_dentry(de);
-#endif
-        }
-        RETURN(rc);
-/* This part is here to combat evil-evil race in real_lookup on 2.6 kernels.
- * The race details are: We enter do_lookup() looking for some name,
- * there is nothing in dcache for this name yet and d_lookup() returns NULL.
- * We proceed to real_lookup(), and while we do this, another process does
- * open on the same file we looking up (most simple reproducer), open succeeds
- * and the dentry is added. Now back to us. In real_lookup() we do d_lookup()
- * again and suddenly find the dentry, so we call d_revalidate on it, but there
- * is no lock, so without this code we would return 0, but unpatched
- * real_lookup just returns -ENOENT in such a case instead of retrying the
- * lookup. Once this is dealt with in real_lookup(), all of this ugly mess
- * can go and we can just check locks in ->d_revalidate without doing any
- * RPCs ever. */
-do_lookup:
-        if (it != &lookup_it) {
-                ll_lookup_finish_locks(it, de);
-                it = &lookup_it;
-        }
-        /*do real lookup here */
-        ll_prepare_mdc_op_data(&op_data, de->d_parent->d_inode, NULL,
-                               de->d_name.name, de->d_name.len, 0, NULL);
-        rc = mdc_intent_lock(exp, &op_data, NULL, 0,  it, 0, &req,
-                             ll_mdc_blocking_ast, 0);
-        if (rc >= 0) {
-                struct mds_body *mds_body = lustre_msg_buf(req->rq_repmsg,
-                                                           DLM_REPLY_REC_OFF,
-                                                           sizeof(*mds_body));
-                struct ll_fid fid = { 0 };
-
-                if (de->d_inode)
-                         ll_inode2fid(&fid, de->d_inode);
-
-                /* see if we got same inode, if not - return error */
-                if(!memcmp(&fid, &mds_body->fid1, sizeof(struct ll_fid)))
-                        goto revalidate_finish;
-                ll_intent_release(it);
-        }
-        GOTO(out, rc = 0);
-
-out_sa:
-        /*
-         * For rc == 1 case, should not return directly to prevent losing
-         * statahead windows; for rc == 0 case, the "lookup" will be done later.
-         */
-        if (it && it->it_op == IT_GETATTR && rc == 1) {
-                first = ll_statahead_enter(de->d_parent->d_inode, &de, 0);
-                if (!first)
-                        ll_statahead_exit(de, rc);
-        }
-
-        return rc;
-}
-
-/*static*/ void ll_pin(struct dentry *de, struct vfsmount *mnt, int flag)
-{
-        struct inode *inode= de->d_inode;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_dentry_data *ldd = ll_d2d(de);
-        struct obd_client_handle *handle;
-        int rc = 0;
-        ENTRY;
-        LASSERT(ldd);
-
-        lock_kernel();
-        /* Strictly speaking this introduces an additional race: the
-         * increments should wait until the rpc has returned.
-         * However, given that at present the function is void, this
-         * issue is moot. */
-        if (flag == 1 && (++ldd->lld_mnt_count) > 1) {
-                unlock_kernel();
-                EXIT;
-                return;
-        }
-
-        if (flag == 0 && (++ldd->lld_cwd_count) > 1) {
-                unlock_kernel();
-                EXIT;
-                return;
-        }
-        unlock_kernel();
-
-        handle = (flag) ? &ldd->lld_mnt_och : &ldd->lld_cwd_och;
-        rc = obd_pin(sbi->ll_mdc_exp, inode->i_ino, inode->i_generation,
-                     inode->i_mode & S_IFMT, handle, flag);
-
-        if (rc) {
-                lock_kernel();
-                memset(handle, 0, sizeof(*handle));
-                if (flag == 0)
-                        ldd->lld_cwd_count--;
-                else
-                        ldd->lld_mnt_count--;
-                unlock_kernel();
-        }
-
-        EXIT;
-        return;
-}
-
-/*static*/ void ll_unpin(struct dentry *de, struct vfsmount *mnt, int flag)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(de->d_inode);
-        struct ll_dentry_data *ldd = ll_d2d(de);
-        struct obd_client_handle handle;
-        int count, rc = 0;
-        ENTRY;
-        LASSERT(ldd);
-
-        lock_kernel();
-        /* Strictly speaking this introduces an additional race: the
-         * increments should wait until the rpc has returned.
-         * However, given that at present the function is void, this
-         * issue is moot. */
-        handle = (flag) ? ldd->lld_mnt_och : ldd->lld_cwd_och;
-        if (handle.och_magic != OBD_CLIENT_HANDLE_MAGIC) {
-                /* the "pin" failed */
-                unlock_kernel();
-                EXIT;
-                return;
-        }
-
-        if (flag)
-                count = --ldd->lld_mnt_count;
-        else
-                count = --ldd->lld_cwd_count;
-        unlock_kernel();
-
-        if (count != 0) {
-                EXIT;
-                return;
-        }
-
-        rc = obd_unpin(sbi->ll_mdc_exp, &handle, flag);
-        EXIT;
-        return;
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-#ifdef HAVE_VFS_INTENT_PATCHES
-static int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
-{
-        int rc;
-        ENTRY;
-
-        if (nd && nd->flags & LOOKUP_LAST && !(nd->flags & LOOKUP_LINK_NOTLAST))
-                rc = ll_revalidate_it(dentry, nd->flags, &nd->intent);
-        else
-                rc = ll_revalidate_it(dentry, 0, NULL);
-
-        RETURN(rc);
-}
-#else
-int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
-{
-        int rc;
-        ENTRY;
-
-        if (nd && !(nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT))) {
-                struct lookup_intent *it;
-                it = ll_convert_intent(&nd->intent.open, nd->flags);
-                if (IS_ERR(it))
-                        RETURN(0);
-                if (it->it_op == (IT_OPEN|IT_CREAT))
-                        if (nd->intent.open.flags & O_EXCL) {
-                                CDEBUG(D_VFSTRACE, "create O_EXCL, returning 0\n");
-                                rc = 0;
-                                goto out_it;
-                        }
-
-                rc = ll_revalidate_it(dentry, nd->flags, it);
-
-                if (rc && (nd->flags & LOOKUP_OPEN) &&
-                    it_disposition(it, DISP_OPEN_OPEN)) {/*Open*/
-#ifdef HAVE_FILE_IN_STRUCT_INTENT
-// XXX Code duplication with ll_lookup_nd
-                        if (S_ISFIFO(dentry->d_inode->i_mode)) {
-                                // We cannot call open here as it would
-                                // deadlock.
-                                ptlrpc_req_finished(
-                                               (struct ptlrpc_request *)
-                                                  it->d.lustre.it_data);
-                        } else {
-                                struct file *filp;
-
-                                nd->intent.open.file->private_data = it;
-                                filp = lookup_instantiate_filp(nd, dentry,NULL);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
-/* 2.6.1[456] have a bug in open_namei() that forgets to check
- * nd->intent.open.file for error, so we need to return it as lookup's result
- * instead */
-                                if (IS_ERR(filp))
-                                        rc = 0;
-#endif
-                        }
-#else
-                        ll_release_openhandle(dentry, it);
-#endif /* HAVE_FILE_IN_STRUCT_INTENT */
-                }
-                if (!rc && (nd->flags & LOOKUP_CREATE) &&
-                    it_disposition(it, DISP_OPEN_CREATE)) {
-                        /* We created something but we may only return
-                         * negative dentry here, so save request in dentry,
-                         * if lookup will be called later on, it will
-                         * pick the request, otherwise it would be freed
-                         * with dentry */
-                        ll_d2d(dentry)->lld_it = it;
-                        it = NULL; /* avoid freeing */
-                }
-                        
-out_it:
-                if (it) {
-                        ll_intent_release(it);
-                        OBD_FREE(it, sizeof(*it));
-                }
-        } else {
-                rc = ll_revalidate_it(dentry, 0, NULL);
-        }
-
-        RETURN(rc);
-}
-#endif
-#endif
-
-struct dentry_operations ll_d_ops = {
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        .d_revalidate = ll_revalidate_nd,
-#else
-        .d_revalidate_it = ll_revalidate_it,
-#endif
-        .d_release = ll_release,
-        .d_delete = ll_ddelete,
-#ifdef DCACHE_LUSTRE_INVALID
-        .d_compare = ll_dcompare,
-#endif
-#if 0
-        .d_pin = ll_pin,
-        .d_unpin = ll_unpin,
-#endif
-};
-
-static int ll_fini_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
-{
-        ENTRY;
-        /* need lookup */
-        RETURN(0);
-}
-
-struct dentry_operations ll_fini_d_ops = {
-        .d_revalidate = ll_fini_revalidate_nd,
-        .d_release = ll_release,
-};
-
-/*
- * It is for the following race condition:
- * When someone (maybe statahead thread) adds the dentry to the dentry hash
- * table, the dentry's "d_op" maybe NULL, at the same time, another (maybe
- * "ls -l") process finds such dentry by "do_lookup()" without "do_revalidate()"
- * called. It causes statahead window lost, and maybe other issues. --Fan Yong
- */
-static int ll_init_revalidate_nd(struct dentry *dentry, struct nameidata *nd)
-{
-        struct l_wait_info lwi = { 0 };
-        struct ll_dentry_data *lld;
-        ENTRY;
-
-        ll_set_dd(dentry);
-        lld = ll_d2d(dentry);
-        if (unlikely(lld == NULL))
-                RETURN(-ENOMEM);
-
-        l_wait_event(lld->lld_waitq, dentry->d_op != &ll_init_d_ops, &lwi);
-        if (likely(dentry->d_op == &ll_d_ops))
-                RETURN(ll_revalidate_nd(dentry, nd));
-        else
-                RETURN(dentry->d_op == &ll_fini_d_ops ? 0 : -EINVAL);
-}
-
-struct dentry_operations ll_init_d_ops = {
-        .d_revalidate = ll_init_revalidate_nd,
-        .d_release = ll_release,
-};
diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c
deleted file mode 100644
index 5b9955ee5e084513ae9860152c60218d3ad27f88..0000000000000000000000000000000000000000
--- a/lustre/llite/dir.c
+++ /dev/null
@@ -1,1087 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Directory code for lustre client.
- *
- *  Copyright (C) 2002--2007 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#include <linux/fs.h>
-#include <linux/pagemap.h>
-#include <linux/mm.h>
-#include <linux/version.h>
-#include <linux/smp_lock.h>
-#include <asm/uaccess.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-# include <linux/locks.h>   // for wait_on_buffer
-#else
-# include <linux/buffer_head.h>   // for wait_on_buffer
-#endif
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
-#include "llite_internal.h"
-
-/*
- * Directory entries are currently in the same format as ext2/ext3, but will
- * be changed in the future to accomodate FIDs
- */
-#define LL_DIR_NAME_LEN (255)
-
-static const int LL_DIR_PAD = 4;
-
-struct ll_dir_entry {
-        /* number of inode, referenced by this entry */
-	__le32	lde_inode;
-        /* total record length, multiple of LL_DIR_PAD */
-	__le16	lde_rec_len;
-        /* length of name */
-	__u8	lde_name_len;
-        /* file type: regular, directory, device, etc. */
-	__u8	lde_file_type;
-        /* name. NOT NUL-terminated */
-	char	lde_name[LL_DIR_NAME_LEN];
-};
-
-static inline unsigned ll_dir_rec_len(unsigned name_len)
-{
-        return (name_len + 8 + LL_DIR_PAD - 1) & ~(LL_DIR_PAD - 1);
-}
-
-#ifndef HAVE_PAGE_CHECKED
-#ifdef HAVE_PG_FS_MISC
-#define PageChecked(page)        test_bit(PG_fs_misc, &(page)->flags)
-#define SetPageChecked(page)     set_bit(PG_fs_misc, &(page)->flags)
-#else
-#error PageChecked or PageFsMisc not defined in kernel
-#endif
-#endif
-
-/* returns the page unlocked, but with a reference */
-static int ll_dir_readpage(struct file *file, struct page *page)
-{
-        struct inode *inode = page->mapping->host;
-        struct ll_fid mdc_fid;
-        __u64 offset;
-        struct ptlrpc_request *request;
-        struct mds_body *body;
-        int rc = 0;
-        ENTRY;
-
-        offset = (__u64)page->index << CFS_PAGE_SHIFT;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) off "LPU64"\n",
-               inode->i_ino, inode->i_generation, inode, offset);
-
-        mdc_pack_fid(&mdc_fid, inode->i_ino, inode->i_generation, S_IFDIR);
-
-        rc = mdc_readpage(ll_i2sbi(inode)->ll_mdc_exp, &mdc_fid,
-                          offset, page, &request);
-        if (!rc) {
-                body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*body));
-                LASSERT(body != NULL); /* checked by mdc_readpage() */
-                /* swabbed by mdc_readpage() */
-                LASSERT(lustre_rep_swabbed(request, REPLY_REC_OFF));
-
-                if (body->size != i_size_read(inode)) {
-                        ll_inode_size_lock(inode, 0);
-                        i_size_write(inode, body->size);
-                        ll_inode_size_unlock(inode, 0);
-                }
-
-                SetPageUptodate(page);
-        }
-        ptlrpc_req_finished(request);
-
-        unlock_page(page);
-        EXIT;
-        return rc;
-}
-
-struct address_space_operations ll_dir_aops = {
-        .readpage  = ll_dir_readpage,
-};
-
-static inline unsigned ll_dir_page_mask(struct inode *inode)
-{
-        return ~(inode->i_sb->s_blocksize - 1);
-}
-
-/*
- * Check consistency of a single entry.
- */
-static int ll_dir_check_entry(struct inode *dir, struct ll_dir_entry *ent,
-                              unsigned offset, unsigned rec_len, pgoff_t index)
-{
-        const char *msg;
-
-        /*
-         * Consider adding more checks.
-         */
-
-        if (unlikely(rec_len < ll_dir_rec_len(1)))
-                msg = "entry is too short";
-        else if (unlikely(rec_len & 3))
-                msg = "wrong alignment";
-        else if (unlikely(rec_len < ll_dir_rec_len(ent->lde_name_len)))
-                msg = "rec_len doesn't match name_len";
-        else if (unlikely(((offset + rec_len - 1) ^ offset) &
-                          ll_dir_page_mask(dir)))
-                msg = "directory entry across blocks";
-        else
-                return 0;
-        CERROR("%s: bad entry in directory %lu/%u: %s - "
-               "offset=%lu+%u, inode=%lu, rec_len=%d,"
-               " name_len=%d\n", ll_i2mdcexp(dir)->exp_obd->obd_name,
-               dir->i_ino, dir->i_generation, msg,
-               index << CFS_PAGE_SHIFT,
-               offset, (unsigned long)le32_to_cpu(ent->lde_inode),
-               rec_len, ent->lde_name_len);
-        return -EIO;
-}
-
-static inline struct ll_dir_entry *ll_entry_at(void *base, unsigned offset)
-{
-        return (struct ll_dir_entry *)(base + offset);
-}
-
-static void ll_dir_check_page(struct inode *dir, struct page *page)
-{
-        int      err;
-        unsigned size = dir->i_sb->s_blocksize;
-        char    *addr = page_address(page);
-        unsigned off;
-        unsigned limit;
-        unsigned reclen;
-
-        struct ll_dir_entry *ent;
-
-        err = 0;
-        if ((i_size_read(dir) >> CFS_PAGE_SHIFT) == (__u64)page->index) {
-                /*
-                 * Last page.
-                 */
-                limit = i_size_read(dir) & ~CFS_PAGE_MASK;
-                if (limit & (size - 1)) {
-                        CERROR("%s: dir %lu/%u size %llu doesn't match %u\n",
-                               ll_i2mdcexp(dir)->exp_obd->obd_name, dir->i_ino,
-                               dir->i_generation, i_size_read(dir), size);
-                        err++;
-                } else {
-                        /*
-                         * Place dummy forwarding entries to streamline
-                         * ll_readdir().
-                         */
-                        for (off = limit; off < CFS_PAGE_SIZE; off += size) {
-                                ent = ll_entry_at(addr, off);
-                                ent->lde_rec_len = cpu_to_le16(size);
-                                ent->lde_name_len = 0;
-                                ent->lde_inode = 0;
-                        }
-                }
-        } else
-                limit = CFS_PAGE_SIZE;
-
-        for (off = 0;
-             !err && off <= limit - ll_dir_rec_len(1); off += reclen) {
-                ent    = ll_entry_at(addr, off);
-                reclen = le16_to_cpu(ent->lde_rec_len);
-                err    = ll_dir_check_entry(dir, ent, off, reclen, page->index);
-        }
-
-        if (!err && off != limit) {
-                ent = ll_entry_at(addr, off);
-                CERROR("%s: entry in directory %lu/%u spans the page boundary "
-                       "offset="LPU64"+%u, inode=%lu\n",
-                       ll_i2mdcexp(dir)->exp_obd->obd_name,
-                       dir->i_ino, dir->i_generation,
-                       (__u64)page->index << CFS_PAGE_SHIFT,
-                       off, (unsigned long)le32_to_cpu(ent->lde_inode));
-                err++;
-        }
-        if (err)
-                SetPageError(page);
-        SetPageChecked(page);
-}
-
-struct page *ll_get_dir_page(struct inode *dir, unsigned long n)
-{
-        struct ldlm_res_id res_id =
-                { .name = { dir->i_ino, (__u64)dir->i_generation} };
-        struct lustre_handle lockh;
-        struct obd_device *obddev = class_exp2obd(ll_i2sbi(dir)->ll_mdc_exp);
-        struct address_space *mapping = dir->i_mapping;
-        struct page *page;
-        ldlm_policy_data_t policy = {.l_inodebits = {MDS_INODELOCK_UPDATE} };
-        int rc;
-
-        rc = ldlm_lock_match(obddev->obd_namespace, LDLM_FL_BLOCK_GRANTED,
-                             &res_id, LDLM_IBITS, &policy, LCK_CR, &lockh);
-        if (!rc) {
-                struct lookup_intent it = { .it_op = IT_READDIR };
-                struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_CR,
-                       ll_mdc_blocking_ast, ldlm_completion_ast, NULL, dir };
-                struct ptlrpc_request *request;
-                struct mdc_op_data data;
-
-                ll_prepare_mdc_op_data(&data, dir, NULL, NULL, 0, 0, NULL);
-
-                rc = mdc_enqueue(ll_i2sbi(dir)->ll_mdc_exp, &einfo, &it,
-                                 &data, &lockh, NULL, 0, 0);
-
-                request = (struct ptlrpc_request *)it.d.lustre.it_data;
-                if (request)
-                        ptlrpc_req_finished(request);
-                if (rc < 0) {
-                        CERROR("lock enqueue: rc: %d\n", rc);
-                        return ERR_PTR(rc);
-                }
-        }
-        ldlm_lock_dump_handle(D_OTHER, &lockh);
-
-        page = read_cache_page(mapping, n,
-                               (filler_t*)mapping->a_ops->readpage, NULL);
-        if (IS_ERR(page))
-                GOTO(out_unlock, page);
-
-        wait_on_page(page);
-        (void)kmap(page);
-        if (!PageUptodate(page))
-                goto fail;
-        if (!PageChecked(page))
-                ll_dir_check_page(dir, page);
-        if (PageError(page))
-                goto fail;
-
-out_unlock:
-        ldlm_lock_decref(&lockh, LCK_CR);
-        return page;
-
-fail:
-        kunmap(page);
-        page_cache_release(page);
-        page = ERR_PTR(-EIO);
-        goto out_unlock;
-}
-
-/*
- * p is at least 6 bytes before the end of page
- */
-static inline struct ll_dir_entry *ll_dir_next_entry(struct ll_dir_entry *p)
-{
-        return ll_entry_at(p, le16_to_cpu(p->lde_rec_len));
-}
-
-static inline unsigned ll_dir_validate_entry(char *base, unsigned offset,
-                                             unsigned mask)
-{
-        struct ll_dir_entry *de = ll_entry_at(base, offset);
-        struct ll_dir_entry *p  = ll_entry_at(base, offset & mask);
-        while (p < de && p->lde_rec_len > 0)
-                p = ll_dir_next_entry(p);
-        return (char *)p - base;
-}
-
-/*
- * File type constants. The same as in ext2 for compatibility.
- */
-
-enum {
-        LL_DIR_FT_UNKNOWN,
-        LL_DIR_FT_REG_FILE,
-        LL_DIR_FT_DIR,
-        LL_DIR_FT_CHRDEV,
-        LL_DIR_FT_BLKDEV,
-        LL_DIR_FT_FIFO,
-        LL_DIR_FT_SOCK,
-        LL_DIR_FT_SYMLINK,
-        LL_DIR_FT_MAX
-};
-
-static unsigned char ll_dir_filetype_table[LL_DIR_FT_MAX] = {
-        [LL_DIR_FT_UNKNOWN]  = DT_UNKNOWN,
-        [LL_DIR_FT_REG_FILE] = DT_REG,
-        [LL_DIR_FT_DIR]      = DT_DIR,
-        [LL_DIR_FT_CHRDEV]   = DT_CHR,
-        [LL_DIR_FT_BLKDEV]   = DT_BLK,
-        [LL_DIR_FT_FIFO]     = DT_FIFO,
-        [LL_DIR_FT_SOCK]     = DT_SOCK,
-        [LL_DIR_FT_SYMLINK]  = DT_LNK,
-};
-
-/*
- * Process one page. Returns:
- *
- *     -ve: filldir commands readdir to stop.
- *     +ve: number of entries submitted to filldir.
- *       0: no live entries on this page.
- */
-
-int ll_readdir_page(char *addr, __u64 base, unsigned *offset,
-                    filldir_t filldir, void *cookie)
-{
-        struct ll_dir_entry *de;
-        char *end;
-        int nr;
-
-        de = ll_entry_at(addr, *offset);
-        end = addr + CFS_PAGE_SIZE - ll_dir_rec_len(1);
-        for (nr = 0 ;(char*)de <= end; de = ll_dir_next_entry(de)) {
-                if (de->lde_inode != 0) {
-                        nr++;
-                        *offset = (char *)de - addr;
-                        if (filldir(cookie, de->lde_name, de->lde_name_len,
-                                    base | *offset, le32_to_cpu(de->lde_inode),
-                                    ll_dir_filetype_table[de->lde_file_type &
-                                                          (LL_DIR_FT_MAX - 1)]))
-                                return -1;
-                }
-        }
-        return nr;
-}
-
-int ll_readdir(struct file *filp, void *dirent, filldir_t filldir)
-{
-        struct inode *inode = filp->f_dentry->d_inode;
-        loff_t pos          = filp->f_pos;
-        unsigned offset     = pos & ~CFS_PAGE_MASK;
-        pgoff_t idx         = pos >> CFS_PAGE_SHIFT;
-        pgoff_t npages      = dir_pages(inode);
-        unsigned chunk_mask = ll_dir_page_mask(inode);
-        int need_revalidate = (filp->f_version != inode->i_version);
-        int rc              = 0;
-        int done; /* when this becomes negative --- stop iterating */
-
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) pos %llu/%llu\n",
-               inode->i_ino, inode->i_generation, inode,
-               pos, i_size_read(inode));
-
-        /*
-         * Checking ->i_size without the lock. Should be harmless, as server
-         * re-checks.
-         */
-        if (pos > i_size_read(inode) - ll_dir_rec_len(1))
-                RETURN(0);
-
-        for (done = 0; idx < npages; idx++, offset = 0) {
-                /*
-                 * We can assume that all blocks on this page are filled with
-                 * entries, because ll_dir_check_page() placed special dummy
-                 * entries for us.
-                 */
-
-                char *kaddr;
-                struct page *page;
-
-                CDEBUG(D_EXT2,"read %lu of dir %lu/%u page %lu/%lu "
-                       "size %llu\n",
-                       CFS_PAGE_SIZE, inode->i_ino, inode->i_generation,
-                       idx, npages, i_size_read(inode));
-                page = ll_get_dir_page(inode, idx);
-
-                /* size might have been updated by mdc_readpage */
-                npages = dir_pages(inode);
-
-                if (IS_ERR(page)) {
-                        rc = PTR_ERR(page);
-                        CERROR("error reading dir %lu/%u page %lu: rc %d\n",
-                               inode->i_ino, inode->i_generation, idx, rc);
-                        continue;
-                }
-
-                kaddr = page_address(page);
-                if (need_revalidate) {
-                        /*
-                         * File offset was changed by lseek() and possibly
-                         * points in the middle of an entry. Re-scan from the
-                         * beginning of the chunk.
-                         */
-                        offset = ll_dir_validate_entry(kaddr, offset,
-                                                       chunk_mask);
-                        need_revalidate = 0;
-                }
-                done = ll_readdir_page(kaddr, idx << CFS_PAGE_SHIFT,
-                                       &offset, filldir, dirent);
-                kunmap(page);
-                page_cache_release(page);
-                if (done > 0)
-                        /*
-                         * Some entries were sent to the user space, return
-                         * success.
-                         */
-                        rc = 0;
-                else if (done < 0)
-                        /*
-                         * filldir is satisfied.
-                         */
-                        break;
-        }
-
-        filp->f_pos = (idx << CFS_PAGE_SHIFT) | offset;
-        filp->f_version = inode->i_version;
-        touch_atime(filp->f_vfsmnt, filp->f_dentry);
-
-        RETURN(rc);
-}
-
-#define QCTL_COPY(out, in)              \
-do {                                    \
-        Q_COPY(out, in, qc_cmd);        \
-        Q_COPY(out, in, qc_type);       \
-        Q_COPY(out, in, qc_id);         \
-        Q_COPY(out, in, qc_stat);       \
-        Q_COPY(out, in, qc_dqinfo);     \
-        Q_COPY(out, in, qc_dqblk);      \
-} while (0)
-
-int ll_send_mgc_param(struct obd_export *mgc, char *string)
-{
-        struct mgs_send_param *msp;
-        int rc = 0;
-
-        OBD_ALLOC_PTR(msp);
-        if (!msp)
-                return -ENOMEM;
-
-        strncpy(msp->mgs_param, string, MGS_PARAM_MAXLEN);
-        rc = obd_set_info_async(mgc, strlen(KEY_SET_INFO), KEY_SET_INFO,
-                                sizeof(struct mgs_send_param), msp, NULL);
-        if (rc)
-                CERROR("Failed to set parameter: %d\n", rc);
-
-        OBD_FREE_PTR(msp);
-        return rc;
-}
-
-char *ll_get_fsname(struct inode *inode)
-{
-        struct lustre_sb_info *lsi = s2lsi(inode->i_sb);
-        char *ptr, *fsname;
-        int len;
-
-        OBD_ALLOC(fsname, MGS_PARAM_MAXLEN);
-        len = strlen(lsi->lsi_lmd->lmd_profile);
-        ptr = strrchr(lsi->lsi_lmd->lmd_profile, '-');
-        if (ptr && (strcmp(ptr, "-client") == 0))
-                len -= 7;
-        strncpy(fsname, lsi->lsi_lmd->lmd_profile, len);
-        fsname[len] = '\0';
-
-        return fsname;
-}
-
-int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,
-                     int set_default)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct mdc_op_data data;
-        struct ptlrpc_request *req = NULL;
-        struct lustre_sb_info *lsi = s2lsi(inode->i_sb);
-        struct obd_device *mgc = lsi->lsi_mgc;
-        char *fsname = NULL, *param = NULL;
-
-        struct iattr attr = { 0 };
-        int rc = 0;
-
-        /*
-         * This is coming from userspace, so should be in
-         * local endian.  But the MDS would like it in little
-         * endian, so we swab it before we send it.
-         */
-        if (lump->lmm_magic != LOV_USER_MAGIC)
-                RETURN(-EINVAL);
-
-        if (lump->lmm_magic != cpu_to_le32(LOV_USER_MAGIC))
-                lustre_swab_lov_user_md(lump);
-
-        ll_prepare_mdc_op_data(&data, inode, NULL, NULL, 0, 0, NULL);
-
-        /* swabbing is done in lov_setstripe() on server side */
-        rc = mdc_setattr(sbi->ll_mdc_exp, &data,
-                         &attr, lump, sizeof(*lump), NULL, 0, &req);
-        if (rc) {
-                ptlrpc_req_finished(req);
-                if (rc != -EPERM && rc != -EACCES)
-                        CERROR("mdc_setattr fails: rc = %d\n", rc);
-                return rc;
-        }
-        ptlrpc_req_finished(req);
-
-        if (set_default && mgc->u.cli.cl_mgc_mgsexp) {
-                OBD_ALLOC(param, MGS_PARAM_MAXLEN);
-
-                /* Get fsname and assume devname to be -MDT0000. */
-                fsname = ll_get_fsname(inode);
-                /* Set root stripesize */
-                sprintf(param, "%s-MDT0000.lov.stripesize=%u", fsname,
-                        lump->lmm_stripe_size);
-                rc = ll_send_mgc_param(mgc->u.cli.cl_mgc_mgsexp, param);
-                if (rc)
-                        goto end;
-
-                /* Set root stripecount */
-                sprintf(param, "%s-MDT0000.lov.stripecount=%u", fsname,
-                        lump->lmm_stripe_count);
-                rc = ll_send_mgc_param(mgc->u.cli.cl_mgc_mgsexp, param);
-                if (rc)
-                        goto end;
-
-                /* Set root stripeoffset */
-                sprintf(param, "%s-MDT0000.lov.stripeoffset=%u", fsname,
-                        lump->lmm_stripe_offset);
-                rc = ll_send_mgc_param(mgc->u.cli.cl_mgc_mgsexp, param);
-                if (rc)
-                        goto end;
-end:
-                if (fsname)
-                        OBD_FREE(fsname, MGS_PARAM_MAXLEN);
-                if (param)
-                        OBD_FREE(param, MGS_PARAM_MAXLEN);
-        }
-        return rc;
-}
-
-int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmmp,
-                     int *lmm_size, struct ptlrpc_request **request)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_fid     fid;
-        struct mds_body   *body;
-        struct lov_mds_md *lmm = NULL;
-        struct ptlrpc_request *req = NULL;
-        int rc, lmmsize;
-
-        ll_inode2fid(&fid, inode);
-
-        rc = ll_get_max_mdsize(sbi, &lmmsize);
-        if (rc)
-                RETURN(rc);
-
-        rc = mdc_getattr(sbi->ll_mdc_exp, &fid,
-                        OBD_MD_FLEASIZE|OBD_MD_FLDIREA,
-                        lmmsize, &req);
-        if (rc < 0) {
-                CDEBUG(D_INFO, "mdc_getattr failed on inode "
-                       "%lu/%u: rc %d\n", inode->i_ino,
-                       inode->i_generation, rc);
-                GOTO(out, rc);
-        }
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                        sizeof(*body));
-        LASSERT(body != NULL); /* checked by mdc_getattr_name */
-        /* swabbed by mdc_getattr_name */
-        LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF));
-
-        lmmsize = body->eadatasize;
-
-        if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
-            lmmsize == 0) {
-                GOTO(out, rc = -ENODATA);
-        }
-
-        lmm = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, lmmsize);
-        LASSERT(lmm != NULL);
-        LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF + 1));
-
-        /*
-         * This is coming from the MDS, so is probably in
-         * little endian.  We convert it to host endian before
-         * passing it to userspace.
-         */
-        if (lmm->lmm_magic == __swab32(LOV_MAGIC)) {
-                lustre_swab_lov_user_md((struct lov_user_md *)lmm);
-        }
-out:
-        *lmmp = lmm;
-        *lmm_size = lmmsize;
-        *request = req;
-        return rc;
-}
-
-static int ll_dir_ioctl(struct inode *inode, struct file *file,
-                        unsigned int cmd, unsigned long arg)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct obd_ioctl_data *data;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), cmd=%#x\n",
-               inode->i_ino, inode->i_generation, inode, cmd);
-
-        /* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */
-        if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */
-                return -ENOTTY;
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1);
-        switch(cmd) {
-        case EXT3_IOC_GETFLAGS:
-        case EXT3_IOC_SETFLAGS:
-                RETURN(ll_iocontrol(inode, file, cmd, arg));
-        case EXT3_IOC_GETVERSION_OLD:
-        case EXT3_IOC_GETVERSION:
-                RETURN(put_user(inode->i_generation, (int *)arg));
-        /* We need to special case any other ioctls we want to handle,
-         * to send them to the MDS/OST as appropriate and to properly
-         * network encode the arg field.
-        case EXT3_IOC_SETVERSION_OLD:
-        case EXT3_IOC_SETVERSION:
-        */
-        case IOC_MDC_LOOKUP: {
-                struct ptlrpc_request *request = NULL;
-                struct ll_fid fid;
-                char *buf = NULL;
-                char *filename;
-                int namelen, rc, len = 0;
-
-                rc = obd_ioctl_getdata(&buf, &len, (void *)arg);
-                if (rc)
-                        RETURN(rc);
-                data = (void *)buf;
-
-                filename = data->ioc_inlbuf1;
-                namelen = data->ioc_inllen1;
-
-                if (namelen < 1) {
-                        CDEBUG(D_INFO, "IOC_MDC_LOOKUP missing filename\n");
-                        GOTO(out, rc = -EINVAL);
-                }
-
-                ll_inode2fid(&fid, inode);
-                rc = mdc_getattr_name(sbi->ll_mdc_exp, &fid, filename, namelen,
-                                      OBD_MD_FLID, 0, &request);
-                if (rc < 0) {
-                        CDEBUG(D_INFO, "mdc_getattr_name: %d\n", rc);
-                        GOTO(out, rc);
-                }
-
-                ptlrpc_req_finished(request);
-
-                EXIT;
-        out:
-                obd_ioctl_freedata(buf, len);
-                return rc;
-        }
-        case LL_IOC_LOV_SETSTRIPE: {
-                struct lov_user_md lum, *lump = (struct lov_user_md *)arg;
-                int rc = 0;
-                int set_default = 0;
-
-                LASSERT(sizeof(lum) == sizeof(*lump));
-                LASSERT(sizeof(lum.lmm_objects[0]) ==
-                        sizeof(lump->lmm_objects[0]));
-                rc = copy_from_user(&lum, lump, sizeof(lum));
-                if (rc)
-                        return(-EFAULT);
-
-                if (inode->i_sb->s_root == file->f_dentry)
-                        set_default = 1;
-
-                rc = ll_dir_setstripe(inode, &lum, set_default);
-
-                return rc;
-        }
-        case LL_IOC_OBD_STATFS:
-                RETURN(ll_obd_statfs(inode, (void *)arg));
-        case LL_IOC_LOV_GETSTRIPE:
-        case LL_IOC_MDC_GETINFO:
-        case IOC_MDC_GETFILEINFO:
-        case IOC_MDC_GETFILESTRIPE: {
-                struct ptlrpc_request *request = NULL;
-                struct mds_body *body;
-                struct lov_user_md *lump;
-                struct lov_mds_md *lmm = NULL;
-                char *filename = NULL;
-                int rc, lmmsize;
-
-                if (cmd == IOC_MDC_GETFILEINFO ||
-                    cmd == IOC_MDC_GETFILESTRIPE) {
-                        filename = getname((const char *)arg);
-                        if (IS_ERR(filename))
-                                RETURN(PTR_ERR(filename));
-
-                        rc = ll_lov_getstripe_ea_info(inode, filename, &lmm,
-                                                      &lmmsize, &request);
-                } else {
-                        rc = ll_dir_getstripe(inode, &lmm, &lmmsize, &request);
-                }
-
-                if (request) {
-                        body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF,
-                                              sizeof(*body));
-                        LASSERT(body != NULL); /* checked by mdc_getattr_name */
-                        /* swabbed by mdc_getattr_name */
-                        LASSERT(lustre_rep_swabbed(request, REPLY_REC_OFF));
-                } else {
-                        GOTO(out_req, rc);
-                }
-
-                if (rc < 0) {
-                        if (rc == -ENODATA && (cmd == IOC_MDC_GETFILEINFO ||
-                                               cmd == LL_IOC_MDC_GETINFO))
-                                GOTO(skip_lmm, rc = 0);
-                        else
-                                GOTO(out_req, rc);
-                }
-
-                if (cmd == IOC_MDC_GETFILESTRIPE ||
-                    cmd == LL_IOC_LOV_GETSTRIPE) {
-                        lump = (struct lov_user_md *)arg;
-                } else {
-                        struct lov_user_mds_data *lmdp;
-                        lmdp = (struct lov_user_mds_data *)arg;
-                        lump = &lmdp->lmd_lmm;
-                }
-                rc = copy_to_user(lump, lmm, lmmsize);
-                if (rc)
-                        GOTO(out_lmm, rc = -EFAULT);
-        skip_lmm:
-                if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) {
-                        struct lov_user_mds_data *lmdp;
-                        lstat_t st = { 0 };
-
-                        st.st_dev     = inode->i_sb->s_dev;
-                        st.st_mode    = body->mode;
-                        st.st_nlink   = body->nlink;
-                        st.st_uid     = body->uid;
-                        st.st_gid     = body->gid;
-                        st.st_rdev    = body->rdev;
-                        st.st_size    = body->size;
-                        st.st_blksize = CFS_PAGE_SIZE;
-                        st.st_blocks  = body->blocks;
-                        st.st_atime   = body->atime;
-                        st.st_mtime   = body->mtime;
-                        st.st_ctime   = body->ctime;
-                        st.st_ino     = body->ino;
-
-                        lmdp = (struct lov_user_mds_data *)arg;
-                        rc = copy_to_user(&lmdp->lmd_st, &st, sizeof(st));
-                        if (rc)
-                                GOTO(out_lmm, rc = -EFAULT);
-                }
-
-                EXIT;
-        out_lmm:
-                if (lmm && lmm->lmm_magic == LOV_MAGIC_JOIN)
-                        OBD_FREE(lmm, lmmsize);
-        out_req:
-                ptlrpc_req_finished(request);
-                if (filename)
-                        putname(filename);
-                return rc;
-        }
-        case IOC_LOV_GETINFO: {
-                struct lov_user_mds_data *lumd;
-                struct lov_stripe_md *lsm;
-                struct lov_user_md *lum;
-                struct lov_mds_md *lmm;
-                int lmmsize;
-                lstat_t st;
-                int rc;
-
-                lumd = (struct lov_user_mds_data *)arg;
-                lum = &lumd->lmd_lmm;
-
-                rc = ll_get_max_mdsize(sbi, &lmmsize);
-                if (rc)
-                        RETURN(rc);
-
-                OBD_ALLOC(lmm, lmmsize);
-                rc = copy_from_user(lmm, lum, lmmsize);
-                if (rc)
-                        GOTO(free_lmm, rc = -EFAULT);
-
-                rc = obd_unpackmd(sbi->ll_osc_exp, &lsm, lmm, lmmsize);
-                if (rc < 0)
-                        GOTO(free_lmm, rc = -ENOMEM);
-
-                rc = obd_checkmd(sbi->ll_osc_exp, sbi->ll_mdc_exp, lsm);
-                if (rc)
-                        GOTO(free_lsm, rc);
-
-                /* Perform glimpse_size operation. */
-                memset(&st, 0, sizeof(st));
-
-                rc = ll_glimpse_ioctl(sbi, lsm, &st);
-                if (rc)
-                        GOTO(free_lsm, rc);
-
-                rc = copy_to_user(&lumd->lmd_st, &st, sizeof(st));
-                if (rc)
-                        GOTO(free_lsm, rc = -EFAULT);
-
-                EXIT;
-        free_lsm:
-                obd_free_memmd(sbi->ll_osc_exp, &lsm);
-        free_lmm:
-                OBD_FREE(lmm, lmmsize);
-                return rc;
-        }
-        case OBD_IOC_LLOG_CATINFO: {
-                struct ptlrpc_request *req = NULL;
-                char *buf = NULL;
-                int rc, len = 0;
-                char *bufs[3] = { NULL }, *str;
-                int lens[3] = { sizeof(struct ptlrpc_body) };
-                int size[2] = { sizeof(struct ptlrpc_body) };
-
-                rc = obd_ioctl_getdata(&buf, &len, (void *)arg);
-                if (rc)
-                        RETURN(rc);
-                data = (void *)buf;
-
-                if (!data->ioc_inlbuf1) {
-                        obd_ioctl_freedata(buf, len);
-                        RETURN(-EINVAL);
-                }
-
-                lens[REQ_REC_OFF] = data->ioc_inllen1;
-                bufs[REQ_REC_OFF] = data->ioc_inlbuf1;
-                if (data->ioc_inllen2) {
-                        lens[REQ_REC_OFF + 1] = data->ioc_inllen2;
-                        bufs[REQ_REC_OFF + 1] = data->ioc_inlbuf2;
-                } else {
-                        lens[REQ_REC_OFF + 1] = 0;
-                        bufs[REQ_REC_OFF + 1] = NULL;
-                }
-
-                req = ptlrpc_prep_req(sbi2mdc(sbi)->cl_import,
-                                      LUSTRE_LOG_VERSION, LLOG_CATINFO, 3, lens,
-                                      bufs);
-                if (!req)
-                        GOTO(out_catinfo, rc = -ENOMEM);
-
-                size[REPLY_REC_OFF] = data->ioc_plen1;
-                ptlrpc_req_set_repsize(req, 2, size);
-
-                rc = ptlrpc_queue_wait(req);
-                str = lustre_msg_string(req->rq_repmsg, REPLY_REC_OFF,
-                                        data->ioc_plen1);
-                if (!rc)
-                        rc = copy_to_user(data->ioc_pbuf1, str,data->ioc_plen1);
-                ptlrpc_req_finished(req);
-        out_catinfo:
-                obd_ioctl_freedata(buf, len);
-                RETURN(rc);
-        }
-        case OBD_IOC_QUOTACHECK: {
-                struct obd_quotactl *oqctl;
-                int rc, error = 0;
-
-                if (!capable(CAP_SYS_ADMIN))
-                        RETURN(-EPERM);
-
-                OBD_ALLOC_PTR(oqctl);
-                if (!oqctl)
-                        RETURN(-ENOMEM);
-                oqctl->qc_type = arg;
-                rc = obd_quotacheck(sbi->ll_mdc_exp, oqctl);
-                if (rc < 0) {
-                        CDEBUG(D_INFO, "mdc_quotacheck failed: rc %d\n", rc);
-                        error = rc;
-                }
-
-                rc = obd_quotacheck(sbi->ll_osc_exp, oqctl);
-                if (rc < 0)
-                        CDEBUG(D_INFO, "osc_quotacheck failed: rc %d\n", rc);
-
-                OBD_FREE_PTR(oqctl);
-                return error ?: rc;
-        }
-        case OBD_IOC_POLL_QUOTACHECK: {
-                struct if_quotacheck *check;
-                int rc;
-
-                if (!capable(CAP_SYS_ADMIN))
-                        RETURN(-EPERM);
-
-                OBD_ALLOC_PTR(check);
-                if (!check)
-                        RETURN(-ENOMEM);
-
-                rc = obd_iocontrol(cmd, sbi->ll_mdc_exp, 0, (void *)check,
-                                   NULL);
-                if (rc) {
-                        CDEBUG(D_QUOTA, "mdc ioctl %d failed: %d\n", cmd, rc);
-                        if (copy_to_user((void *)arg, check, sizeof(*check)))
-                                rc = -EFAULT;
-                        GOTO(out_poll, rc);
-                }
-
-                rc = obd_iocontrol(cmd, sbi->ll_osc_exp, 0, (void *)check,
-                                   NULL);
-                if (rc) {
-                        CDEBUG(D_QUOTA, "osc ioctl %d failed: %d\n", cmd, rc);
-                        if (copy_to_user((void *)arg, check, sizeof(*check)))
-                                rc = -EFAULT;
-                        GOTO(out_poll, rc);
-                }
-        out_poll:
-                OBD_FREE_PTR(check);
-                RETURN(rc);
-        }
-#ifdef HAVE_QUOTA_SUPPORT
-        case OBD_IOC_QUOTACTL: {
-                struct if_quotactl *qctl;
-                struct obd_quotactl *oqctl;
-
-                int cmd, type, id, rc = 0;
-
-                OBD_ALLOC_PTR(qctl);
-                if (!qctl)
-                        RETURN(-ENOMEM);
-
-                OBD_ALLOC_PTR(oqctl);
-                if (!oqctl) {
-                        OBD_FREE_PTR(qctl);
-                        RETURN(-ENOMEM);
-                }
-                if (copy_from_user(qctl, (void *)arg, sizeof(*qctl)))
-                        GOTO(out_quotactl, rc = -EFAULT);
-
-                cmd = qctl->qc_cmd;
-                type = qctl->qc_type;
-                id = qctl->qc_id;
-                switch (cmd) {
-                case LUSTRE_Q_INVALIDATE:
-                case Q_QUOTAON:
-                case Q_QUOTAOFF:
-                case Q_SETQUOTA:
-                case Q_SETINFO:
-                        if (!capable(CAP_SYS_ADMIN))
-                                GOTO(out_quotactl, rc = -EPERM);
-                        break;
-                case Q_GETQUOTA:
-                        if (((type == USRQUOTA && current->euid != id) ||
-                             (type == GRPQUOTA && !in_egroup_p(id))) &&
-                            !capable(CAP_SYS_ADMIN))
-                                GOTO(out_quotactl, rc = -EPERM);
-
-                        /* XXX: dqb_valid is borrowed as a flag to mark that
-                         *      only mds quota is wanted */
-                        if (qctl->qc_dqblk.dqb_valid) {
-                                qctl->obd_uuid = sbi->ll_mdc_exp->exp_obd->
-                                                        u.cli.cl_target_uuid;
-                                qctl->qc_dqblk.dqb_valid = 0;
-                        }
-
-                        break;
-                case Q_GETINFO:
-                        break;
-                default:
-                        CERROR("unsupported quotactl op: %#x\n", cmd);
-                        GOTO(out_quotactl, -ENOTTY);
-                }
-
-                QCTL_COPY(oqctl, qctl);
-
-                if (qctl->obd_uuid.uuid[0]) {
-                        struct obd_device *obd;
-                        struct obd_uuid *uuid = &qctl->obd_uuid;
-
-                        obd = class_find_client_notype(uuid,
-                                         &sbi->ll_osc_exp->exp_obd->obd_uuid);
-                        if (!obd)
-                                GOTO(out_quotactl, rc = -ENOENT);
-
-                        if (cmd == Q_GETINFO)
-                                oqctl->qc_cmd = Q_GETOINFO;
-                        else if (cmd == Q_GETQUOTA)
-                                oqctl->qc_cmd = Q_GETOQUOTA;
-                        else
-                                GOTO(out_quotactl, rc = -EINVAL);
-
-                        if (sbi->ll_mdc_exp->exp_obd == obd) {
-                                rc = obd_quotactl(sbi->ll_mdc_exp, oqctl);
-                        } else {
-                                int i;
-                                struct obd_export *exp;
-                                struct lov_obd *lov = &sbi->ll_osc_exp->
-                                                            exp_obd->u.lov;
-
-                                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                                        if (!lov->lov_tgts[i] ||
-                                            !lov->lov_tgts[i]->ltd_active)
-                                                continue;
-                                        exp = lov->lov_tgts[i]->ltd_exp;
-                                        if (exp->exp_obd == obd) {
-                                                rc = obd_quotactl(exp, oqctl);
-                                                break;
-                                        }
-                                }
-                        }
-
-                        oqctl->qc_cmd = cmd;
-                        QCTL_COPY(qctl, oqctl);
-
-                        if (copy_to_user((void *)arg, qctl, sizeof(*qctl)))
-                                rc = -EFAULT;
-
-                        GOTO(out_quotactl, rc);
-                }
-
-                rc = obd_quotactl(sbi->ll_mdc_exp, oqctl);
-                if (rc && rc != -EBUSY && cmd == Q_QUOTAON) {
-                        oqctl->qc_cmd = Q_QUOTAOFF;
-                        obd_quotactl(sbi->ll_mdc_exp, oqctl);
-                }
-
-                QCTL_COPY(qctl, oqctl);
-
-                if (copy_to_user((void *)arg, qctl, sizeof(*qctl)))
-                        rc = -EFAULT;
-        out_quotactl:
-                OBD_FREE_PTR(qctl);
-                OBD_FREE_PTR(oqctl);
-                RETURN(rc);
-        }
-#endif /* HAVE_QUOTA_SUPPORT */
-        case OBD_IOC_GETNAME_OLD:
-        case OBD_IOC_GETNAME: {
-                struct obd_device *obd = class_exp2obd(sbi->ll_osc_exp);
-                if (!obd)
-                        RETURN(-EFAULT);
-                if (copy_to_user((void *)arg, obd->obd_name,
-                                strlen(obd->obd_name) + 1))
-                        RETURN (-EFAULT);
-                RETURN(0);
-        }
-        default:
-                RETURN(obd_iocontrol(cmd, sbi->ll_osc_exp,0,NULL,(void *)arg));
-        }
-}
-
-struct file_operations ll_dir_operations = {
-        .open     = ll_file_open,
-        .release  = ll_file_release,
-        .read     = generic_read_dir,
-        .readdir  = ll_readdir,
-        .ioctl    = ll_dir_ioctl
-};
-
diff --git a/lustre/llite/file.c b/lustre/llite/file.c
deleted file mode 100644
index ddaa5aba2e3d57c5b4299ddbc04e2e5b48074f24..0000000000000000000000000000000000000000
--- a/lustre/llite/file.c
+++ /dev/null
@@ -1,3093 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_dlm.h>
-#include <lustre_lite.h>
-#include <linux/pagemap.h>
-#include <linux/file.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/lustre_compat25.h>
-#endif
-#include "llite_internal.h"
-
-/* also used by llite/special.c:ll_special_open() */
-struct ll_file_data *ll_file_data_get(void)
-{
-        struct ll_file_data *fd;
-
-        OBD_SLAB_ALLOC_PTR(fd, ll_file_data_slab);
-        return fd;
-}
-
-static void ll_file_data_put(struct ll_file_data *fd)
-{
-        if (fd != NULL)
-                OBD_SLAB_FREE_PTR(fd, ll_file_data_slab);
-}
-
-static int ll_close_inode_openhandle(struct inode *inode,
-                                     struct obd_client_handle *och)
-{
-        struct ptlrpc_request *req = NULL;
-        struct obd_device *obd;
-        struct obdo *oa;
-        int rc;
-        ENTRY;
-
-        obd = class_exp2obd(ll_i2mdcexp(inode));
-        if (obd == NULL) {
-                CERROR("Invalid MDC connection handle "LPX64"\n",
-                       ll_i2mdcexp(inode)->exp_handle.h_cookie);
-                GOTO(out, rc = 0);
-        }
-
-        /*
-         * here we check if this is forced umount. If so this is called on
-         * canceling "open lock" and we do not call mdc_close() in this case, as
-         * it will not be successful, as import is already deactivated.
-         */
-        if (obd->obd_force)
-                GOTO(out, rc = 0);
-
-        OBDO_ALLOC(oa);
-        if (!oa)
-                RETURN(-ENOMEM); // XXX We leak openhandle and request here.
-
-        oa->o_id = inode->i_ino;
-        oa->o_valid = OBD_MD_FLID;
-        obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLMODE |
-                                   OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                   OBD_MD_FLATIME | OBD_MD_FLMTIME |
-                                   OBD_MD_FLCTIME);
-        if (ll_is_inode_dirty(inode)) {
-                oa->o_flags = MDS_BFLAG_UNCOMMITTED_WRITES;
-                oa->o_valid |= OBD_MD_FLFLAGS;
-        }
-
-        rc = mdc_close(ll_i2mdcexp(inode), oa, och, &req);
-        if (rc == EAGAIN) {
-                /* We are the last writer, so the MDS has instructed us to get
-                 * the file size and any write cookies, then close again. */
-                ll_queue_done_writing(inode);
-                rc = 0;
-        } else if (rc) {
-                CERROR("inode %lu mdc close failed: rc = %d\n",
-                       inode->i_ino, rc);
-        }
-
-        OBDO_FREE(oa);
-
-        if (rc == 0) {
-                rc = ll_objects_destroy(req, inode);
-                if (rc)
-                        CERROR("inode %lu ll_objects destroy: rc = %d\n",
-                               inode->i_ino, rc);
-        }
-
-        ptlrpc_req_finished(req); /* This is close request */
-        EXIT;
-out:
-        mdc_clear_open_replay_data(och);
-
-        return rc;
-}
-
-int ll_mdc_real_close(struct inode *inode, int flags)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        int rc = 0;
-        struct obd_client_handle **och_p;
-        struct obd_client_handle *och;
-        __u64 *och_usecount;
-
-        ENTRY;
-
-        if (flags & FMODE_WRITE) {
-                och_p = &lli->lli_mds_write_och;
-                och_usecount = &lli->lli_open_fd_write_count;
-        } else if (flags & FMODE_EXEC) {
-                och_p = &lli->lli_mds_exec_och;
-                och_usecount = &lli->lli_open_fd_exec_count;
-         } else {
-                LASSERT(flags & FMODE_READ);
-                och_p = &lli->lli_mds_read_och;
-                och_usecount = &lli->lli_open_fd_read_count;
-        }
-
-        down(&lli->lli_och_sem);
-        if (*och_usecount) { /* There are still users of this handle, so
-                                skip freeing it. */
-                up(&lli->lli_och_sem);
-                RETURN(0);
-        }
-        och=*och_p;
-        *och_p = NULL;
-        up(&lli->lli_och_sem);
-
-        if (och) { /* There might be a race and somebody have freed this och
-                      already */
-                rc = ll_close_inode_openhandle(inode, och);
-                och->och_fh.cookie = DEAD_HANDLE_MAGIC;
-                OBD_FREE(och, sizeof *och);
-        }
-
-        RETURN(rc);
-}
-
-int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode,
-                        struct file *file)
-{
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
-        struct ll_inode_info *lli = ll_i2info(inode);
-        int rc = 0;
-        ENTRY;
-
-        /* clear group lock, if present */
-        if (unlikely(fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
-                struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd;
-                fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK);
-                rc = ll_extent_unlock(fd, inode, lsm, LCK_GROUP,
-                                      &fd->fd_cwlockh);
-        }
-
-        /* Let's see if we have good enough OPEN lock on the file and if
-           we can skip talking to MDS */
-        if (file->f_dentry->d_inode) { /* Can this ever be false? */
-                int lockmode;
-                int flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
-                struct lustre_handle lockh;
-                struct inode *inode = file->f_dentry->d_inode;
-                struct ldlm_res_id file_res_id = {.name={inode->i_ino,
-                                                         inode->i_generation}};
-                ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
-
-                down(&lli->lli_och_sem);
-                if (fd->fd_omode & FMODE_WRITE) {
-                        lockmode = LCK_CW;
-                        LASSERT(lli->lli_open_fd_write_count);
-                        lli->lli_open_fd_write_count--;
-                } else if (fd->fd_omode & FMODE_EXEC) {
-                        lockmode = LCK_PR;
-                        LASSERT(lli->lli_open_fd_exec_count);
-                        lli->lli_open_fd_exec_count--;
-                } else {
-                        lockmode = LCK_CR;
-                        LASSERT(lli->lli_open_fd_read_count);
-                        lli->lli_open_fd_read_count--;
-                }
-                up(&lli->lli_och_sem);
-
-                if (!ldlm_lock_match(mdc_exp->exp_obd->obd_namespace, flags,
-                                     &file_res_id, LDLM_IBITS, &policy,lockmode,
-                                     &lockh)) {
-                        rc = ll_mdc_real_close(file->f_dentry->d_inode,
-                                                fd->fd_omode);
-                }
-        } else {
-                CERROR("Releasing a file %p with negative dentry %p. Name %s",
-                       file, file->f_dentry, file->f_dentry->d_name.name);
-        }
-
-        LUSTRE_FPRIVATE(file) = NULL;
-        ll_file_data_put(fd);
-
-        RETURN(rc);
-}
-
-int lov_test_and_clear_async_rc(struct lov_stripe_md *lsm);
-
-/* While this returns an error code, fput() the caller does not, so we need
- * to make every effort to clean up all of our state here.  Also, applications
- * rarely check close errors and even if an error is returned they will not
- * re-try the close call.
- */
-int ll_file_release(struct inode *inode, struct file *file)
-{
-        struct ll_file_data *fd;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        int rc;
-
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
-               inode->i_generation, inode);
-
-
-        if (inode->i_sb->s_root != file->f_dentry)
-                ll_stats_ops_tally(sbi, LPROC_LL_RELEASE, 1);
-        fd = LUSTRE_FPRIVATE(file);
-        LASSERT(fd != NULL);
-
-        /*
-         * The last ref on @file, maybe not the the owner pid of statahead.
-         * Different processes can open the same dir, "ll_opendir_key" means:
-         * it is me that should stop the statahead thread.
-         */
-        if (lli->lli_opendir_key == fd)
-                ll_stop_statahead(inode, fd);
-
-        if (inode->i_sb->s_root == file->f_dentry) {
-                LUSTRE_FPRIVATE(file) = NULL;
-                ll_file_data_put(fd);
-                RETURN(0);
-        }
-        
-        if (lsm)
-                lov_test_and_clear_async_rc(lsm);
-        lli->lli_async_rc = 0;
-
-        rc = ll_mdc_close(sbi->ll_mdc_exp, inode, file);
-        RETURN(rc);
-}
-
-static int ll_intent_file_open(struct file *file, void *lmm,
-                               int lmmsize, struct lookup_intent *itp)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode);
-        struct mdc_op_data data;
-        struct dentry *parent = file->f_dentry->d_parent;
-        const char *name = file->f_dentry->d_name.name;
-        const int len = file->f_dentry->d_name.len;
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ptlrpc_request *req;
-        int rc;
-        ENTRY;
-
-        if (!parent)
-                RETURN(-ENOENT);
-
-        ll_prepare_mdc_op_data(&data, parent->d_inode, inode,
-                               name, len, O_RDWR, NULL);
-
-        /* Usually we come here only for NFSD, and we want open lock.
-           But we can also get here with pre 2.6.15 patchless kernels, and in
-           that case that lock is also ok */
-        /* We can also get here if there was cached open handle in revalidate_it
-         * but it disappeared while we were getting from there to ll_file_open.
-         * But this means this file was closed and immediatelly opened which
-         * makes a good candidate for using OPEN lock */
-        /* If lmmsize & lmm are not 0, we are just setting stripe info
-         * parameters. No need for the open lock */
-        if (!lmm && !lmmsize)
-                itp->it_flags |= MDS_OPEN_LOCK;
-
-        rc = mdc_intent_lock(sbi->ll_mdc_exp, &data, lmm, lmmsize, itp,
-                              0 /*unused */, &req, ll_mdc_blocking_ast, 0);
-        if (rc == -ESTALE) {
-                /* reason for keep own exit path - don`t flood log
-                * with messages with -ESTALE errors.
-                */
-                if (!it_disposition(itp, DISP_OPEN_OPEN) || 
-                     it_open_error(DISP_OPEN_OPEN, itp))
-                        GOTO(out, rc);
-                ll_release_openhandle(file->f_dentry, itp);
-                GOTO(out_stale, rc);
-        }
-
-        if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) {
-                rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, itp);
-                CDEBUG(D_VFSTRACE, "lock enqueue: err: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        if (itp->d.lustre.it_lock_mode)
-                mdc_set_lock_data(&itp->d.lustre.it_lock_handle,
-                                  inode);
-
-        rc = ll_prep_inode(sbi->ll_osc_exp, &file->f_dentry->d_inode,
-                           req, DLM_REPLY_REC_OFF, NULL);
-out:
-        ptlrpc_req_finished(itp->d.lustre.it_data);
-
-out_stale:
-        it_clear_disposition(itp, DISP_ENQ_COMPLETE);
-        ll_intent_drop_lock(itp);
-
-        RETURN(rc);
-}
-
-
-static void ll_och_fill(struct ll_inode_info *lli, struct lookup_intent *it,
-                        struct obd_client_handle *och)
-{
-        struct ptlrpc_request *req = it->d.lustre.it_data;
-        struct mds_body *body;
-
-        LASSERT(och);
-
-        body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
-        LASSERT(body != NULL);                  /* reply already checked out */
-        /* and swabbed in mdc_enqueue */
-        LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF));
-
-        memcpy(&och->och_fh, &body->handle, sizeof(body->handle));
-        och->och_magic = OBD_CLIENT_HANDLE_MAGIC;
-        lli->lli_io_epoch = body->io_epoch;
-
-        mdc_set_open_replay_data(och, it->d.lustre.it_data);
-}
-
-int ll_local_open(struct file *file, struct lookup_intent *it,
-                  struct ll_file_data *fd, struct obd_client_handle *och)
-{
-        ENTRY;
-
-        LASSERT(!LUSTRE_FPRIVATE(file));
-
-        LASSERT(fd != NULL);
-
-        if (och)
-                ll_och_fill(ll_i2info(file->f_dentry->d_inode), it, och);
-        LUSTRE_FPRIVATE(file) = fd;
-        ll_readahead_init(file->f_dentry->d_inode, &fd->fd_ras);
-        fd->fd_omode = it->it_flags;
-
-        RETURN(0);
-}
-
-/* Open a file, and (for the very first open) create objects on the OSTs at
- * this time.  If opened with O_LOV_DELAY_CREATE, then we don't do the object
- * creation or open until ll_lov_setstripe() ioctl is called.  We grab
- * lli_open_sem to ensure no other process will create objects, send the
- * stripe MD to the MDS, or try to destroy the objects if that fails.
- *
- * If we already have the stripe MD locally then we don't request it in
- * mdc_open(), by passing a lmm_size = 0.
- *
- * It is up to the application to ensure no other processes open this file
- * in the O_LOV_DELAY_CREATE case, or the default striping pattern will be
- * used.  We might be able to avoid races of that sort by getting lli_open_sem
- * before returning in the O_LOV_DELAY_CREATE case and dropping it here
- * or in ll_file_release(), but I'm not sure that is desirable/necessary.
- */
-int ll_file_open(struct inode *inode, struct file *file)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lookup_intent *it, oit = { .it_op = IT_OPEN,
-                                          .it_flags = file->f_flags };
-        struct lov_stripe_md *lsm;
-        struct ptlrpc_request *req = NULL;
-        struct obd_client_handle **och_p;
-        __u64 *och_usecount;
-        struct ll_file_data *fd;
-        int rc = 0, opendir_set = 0;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), flags %o\n", inode->i_ino,
-               inode->i_generation, inode, file->f_flags);
-
-#ifdef HAVE_VFS_INTENT_PATCHES
-        it = file->f_it;
-#else
-        it = file->private_data; /* XXX: compat macro */
-        file->private_data = NULL; /* prevent ll_local_open assertion */
-#endif
-
-        fd = ll_file_data_get();
-        if (fd == NULL)
-                RETURN(-ENOMEM);
-
-        if (S_ISDIR(inode->i_mode)) {
-                spin_lock(&lli->lli_lock);
-                /*
-                 * "lli->lli_opendir_pid != 0" means someone has set it.
-                 * "lli->lli_sai != NULL" means the previous statahead has not
-                 *                        been cleanup.
-                 */ 
-                if (lli->lli_opendir_pid == 0 && lli->lli_sai == NULL) {
-                        opendir_set = 1;
-                        lli->lli_opendir_pid = cfs_curproc_pid();
-                        lli->lli_opendir_key = fd;
-                } else if (unlikely(lli->lli_opendir_pid == cfs_curproc_pid())) {
-                        /* Two cases for this:
-                         * (1) The same process open such directory many times.
-                         * (2) The old process opened the directory, and exited
-                         *     before its children processes. Then new process
-                         *     with the same pid opens such directory before the
-                         *     old process's children processes exit.
-                         * Change the owner to the latest one.
-                         */
-                        opendir_set = 2;
-                        lli->lli_opendir_key = fd;
-                }
-                spin_unlock(&lli->lli_lock);
-        }
-
-        if (inode->i_sb->s_root == file->f_dentry) {
-                LUSTRE_FPRIVATE(file) = fd;
-                RETURN(0);
-        }
-
-        if (!it || !it->d.lustre.it_disposition) {
-                /* Convert f_flags into access mode. We cannot use file->f_mode,
-                 * because everything but O_ACCMODE mask was stripped from it */
-                if ((oit.it_flags + 1) & O_ACCMODE)
-                        oit.it_flags++;
-                if (file->f_flags & O_TRUNC)
-                        oit.it_flags |= FMODE_WRITE;
-
-                /* kernel only call f_op->open in dentry_open.  filp_open calls
-                 * dentry_open after call to open_namei that checks permissions.
-                 * Only nfsd_open call dentry_open directly without checking
-                 * permissions and because of that this code below is safe. */
-                if (oit.it_flags & FMODE_WRITE)
-                        oit.it_flags |= MDS_OPEN_OWNEROVERRIDE;
-
-                /* We do not want O_EXCL here, presumably we opened the file
-                 * already? XXX - NFS implications? */
-                oit.it_flags &= ~O_EXCL;
-
-                it = &oit;
-        }
-
-restart:
-        /* Let's see if we have file open on MDS already. */
-        if (it->it_flags & FMODE_WRITE) {
-                och_p = &lli->lli_mds_write_och;
-                och_usecount = &lli->lli_open_fd_write_count;
-        } else if (it->it_flags & FMODE_EXEC) {
-                och_p = &lli->lli_mds_exec_och;
-                och_usecount = &lli->lli_open_fd_exec_count;
-         } else {
-                och_p = &lli->lli_mds_read_och;
-                och_usecount = &lli->lli_open_fd_read_count;
-        }
-
-        LASSERTF(it->it_flags != 0, "it %p dist %d \n", it,
-                 it->d.lustre.it_disposition);
-
-        down(&lli->lli_och_sem);
-        if (*och_p) { /* Open handle is present */
-                if (it_disposition(it, DISP_OPEN_OPEN)) {
-                        /* Well, there's extra open request that we do not need,
-                           let's close it somehow. This will decref request. */
-                        rc = it_open_error(DISP_OPEN_OPEN, it);
-                        if (rc) {
-                                up(&lli->lli_och_sem);
-                                ll_file_data_put(fd);
-                                GOTO(out_openerr, rc);
-                        }       
-                        ll_release_openhandle(file->f_dentry, it);
-                        lprocfs_counter_incr(ll_i2sbi(inode)->ll_stats, 
-                                             LPROC_LL_OPEN);
-                }
-                (*och_usecount)++;
-
-                rc = ll_local_open(file, it, fd, NULL);
-
-                LASSERTF(rc == 0, "rc = %d\n", rc);
-        } else {
-                LASSERT(*och_usecount == 0);
-                if (!it->d.lustre.it_disposition) {
-                        /* We cannot just request lock handle now, new ELC code
-                           means that one of other OPEN locks for this file
-                           could be cancelled, and since blocking ast handler
-                           would attempt to grab och_sem as well, that would
-                           result in a deadlock */
-                        up(&lli->lli_och_sem);
-                        rc = ll_intent_file_open(file, NULL, 0, it);
-                        if (rc) {
-                                ll_file_data_put(fd);
-                                GOTO(out_openerr, rc);
-                        }
-
-                        mdc_set_lock_data(&it->d.lustre.it_lock_handle,
-                                          file->f_dentry->d_inode);
-                        goto restart;
-                }
- 
-                OBD_ALLOC(*och_p, sizeof (struct obd_client_handle));
-                if (!*och_p) {
-                        ll_file_data_put(fd);
-                        GOTO(out_och_free, rc = -ENOMEM);
-                }
-                (*och_usecount)++;
-               req = it->d.lustre.it_data;
-
-                /* mdc_intent_lock() didn't get a request ref if there was an
-                 * open error, so don't do cleanup on the request here
-                 * (bug 3430) */
-                /* XXX (green): Should not we bail out on any error here, not
-                 * just open error? */
-                rc = it_open_error(DISP_OPEN_OPEN, it);
-                if (rc) {
-                        ll_file_data_put(fd);
-                        GOTO(out_och_free, rc);
-                }
-
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_OPEN, 1);
-                rc = ll_local_open(file, it, fd, *och_p);
-                LASSERTF(rc == 0, "rc = %d\n", rc);
-        }
-        up(&lli->lli_och_sem);
-
-        /* Must do this outside lli_och_sem lock to prevent deadlock where
-           different kind of OPEN lock for this same inode gets cancelled
-           by ldlm_cancel_lru */
-        if (!S_ISREG(inode->i_mode))
-                GOTO(out, rc);
-
-        lsm = lli->lli_smd;
-        if (lsm == NULL) {
-                if (file->f_flags & O_LOV_DELAY_CREATE ||
-                    !(file->f_mode & FMODE_WRITE)) {
-                        CDEBUG(D_INODE, "object creation was delayed\n");
-                        GOTO(out, rc);
-                }
-        }
-        file->f_flags &= ~O_LOV_DELAY_CREATE;
-        GOTO(out, rc);
- out:
-        ptlrpc_req_finished(req);
-        if (req)
-                it_clear_disposition(it, DISP_ENQ_OPEN_REF);
-        if (rc == 0) {
-                ll_open_complete(inode);
-        } else {
-out_och_free:
-                if (*och_p) {
-                        OBD_FREE(*och_p, sizeof (struct obd_client_handle));
-                        *och_p = NULL; /* OBD_FREE writes some magic there */
-                        (*och_usecount)--;
-                }
-                up(&lli->lli_och_sem);
-out_openerr:
-                if (opendir_set) {
-                        lli->lli_opendir_key = NULL;
-                        lli->lli_opendir_pid = 0;
-                } else if (unlikely(opendir_set == 2)) {
-                        ll_stop_statahead(inode, fd);
-                }
-        }
-        return rc;
-}
-
-/* Fills the obdo with the attributes for the inode defined by lsm */
-int ll_lsm_getattr(struct obd_export *exp, struct lov_stripe_md *lsm,
-                   struct obdo *oa)
-{
-        struct ptlrpc_request_set *set;
-        struct obd_info oinfo = { { { 0 } } };
-        int rc;
-        ENTRY;
-
-        LASSERT(lsm != NULL);
-
-        memset(oa, 0, sizeof *oa);
-        oinfo.oi_md = lsm;
-        oinfo.oi_oa = oa;
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_mode = S_IFREG;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLSIZE |
-                OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME |
-                OBD_MD_FLCTIME;
-
-        set = ptlrpc_prep_set();
-        if (set == NULL) {
-                rc = -ENOMEM;
-        } else {
-                rc = obd_getattr_async(exp, &oinfo, set);
-                if (rc == 0)
-                        rc = ptlrpc_set_wait(set);
-                ptlrpc_set_destroy(set);
-        }
-        if (rc)
-                RETURN(rc);
-
-        oa->o_valid &= (OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ | OBD_MD_FLMTIME |
-                        OBD_MD_FLCTIME | OBD_MD_FLSIZE);
-        RETURN(0);
-}
-
-static inline void ll_remove_suid(struct inode *inode)
-{
-        unsigned int mode;
-
-        /* set S_IGID if S_IXGRP is set, and always set S_ISUID */
-        mode = (inode->i_mode & S_IXGRP)*(S_ISGID/S_IXGRP) | S_ISUID;
-
-        /* was any of the uid bits set? */
-        mode &= inode->i_mode;
-        if (mode && !capable(CAP_FSETID)) {
-                inode->i_mode &= ~mode;
-                // XXX careful here - we cannot change the size
-        }
-}
-
-static int ll_lock_to_stripe_offset(struct inode *inode, struct ldlm_lock *lock)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp = ll_i2obdexp(inode);
-        struct {
-                char name[16];
-                struct ldlm_lock *lock;
-                struct lov_stripe_md *lsm;
-        } key = { .name = "lock_to_stripe", .lock = lock, .lsm = lsm };
-        __u32 stripe, vallen = sizeof(stripe);
-        int rc;
-        ENTRY;
-
-        if (lsm->lsm_stripe_count == 1)
-                GOTO(check, stripe = 0);
-
-        /* get our offset in the lov */
-        rc = obd_get_info(exp, sizeof(key), &key, &vallen, &stripe);
-        if (rc != 0) {
-                CERROR("obd_get_info: rc = %d\n", rc);
-                RETURN(rc);
-        }
-        LASSERT(stripe < lsm->lsm_stripe_count);
-
-check:
-        if (lsm->lsm_oinfo[stripe]->loi_id != lock->l_resource->lr_name.name[0]||
-            lsm->lsm_oinfo[stripe]->loi_gr != lock->l_resource->lr_name.name[1]){
-                LDLM_ERROR(lock, "resource doesn't match object "LPU64"/"LPU64,
-                           lsm->lsm_oinfo[stripe]->loi_id,
-                           lsm->lsm_oinfo[stripe]->loi_gr);
-                RETURN(-ELDLM_NO_LOCK_DATA);
-        }
-
-        RETURN(stripe);
-}
-
-/* Get extra page reference to ensure it is not going away */
-void ll_pin_extent_cb(void *data)
-{
-        struct page *page = data;
-        
-        page_cache_get(page);
-
-        return;
-}
-/* Flush the page from page cache for an extent as its canceled.
- * Page to remove is delivered as @data.
- *
- * No one can dirty the extent until we've finished our work and they cannot
- * enqueue another lock.  The DLM protects us from ll_file_read/write here,
- * but other kernel actors could have pages locked.
- *
- * If @discard is set, there is no need to write the page if it is dirty.
- *
- * Called with the DLM lock held. */
-int ll_page_removal_cb(void *data, int discard)
-{
-        int rc;
-        struct page *page = data;
-        struct address_space *mapping;
-
-        ENTRY;
-
-        /* We have page reference already from ll_pin_page */
-        lock_page(page);
-
-        /* Already truncated by somebody */
-        if (!page->mapping)
-                GOTO(out, rc = 0);
-
-        mapping = page->mapping;
-
-        ll_teardown_mmaps(mapping,
-                          (__u64)page->index << PAGE_CACHE_SHIFT,
-                          ((__u64)page->index<<PAGE_CACHE_SHIFT)|
-                                                              ~PAGE_CACHE_MASK);        
-        LL_CDEBUG_PAGE(D_PAGE, page, "removing page\n");
-
-        if (!discard && clear_page_dirty_for_io(page)) {
-                LASSERT(page->mapping);
-                rc = ll_call_writepage(page->mapping->host, page);
-                /* either waiting for io to complete or reacquiring
-                 * the lock that the failed writepage released */
-                lock_page(page);
-                wait_on_page_writeback(page);
-                if (rc != 0) {
-                        CERROR("writepage inode %lu(%p) of page %p "
-                               "failed: %d\n", mapping->host->i_ino,
-                               mapping->host, page, rc);
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-                        if (rc == -ENOSPC)
-                                set_bit(AS_ENOSPC, &mapping->flags);
-                        else
-                                set_bit(AS_EIO, &mapping->flags);
-#else
-                        mapping->gfp_mask |= AS_EIO_MASK;
-#endif
-                }
-        }
-        if (page->mapping != NULL) {
-                struct ll_async_page *llap = llap_cast_private(page);
-                // checking again to account for writeback's lock_page()
-                LL_CDEBUG_PAGE(D_PAGE, page, "truncating\n");
-                if (llap)
-                        ll_ra_accounting(llap, page->mapping);
-                ll_truncate_complete_page(page);
-        }
-        EXIT;
-out:
-        LASSERT(!PageWriteback(page));
-        unlock_page(page);
-        page_cache_release(page);
-
-        return 0;
-}
-
-int ll_extent_lock_cancel_cb(struct ldlm_lock *lock, struct ldlm_lock_desc *new,
-                             void *data, int flag)
-{
-        struct inode *inode;
-        struct ll_inode_info *lli;
-        struct lov_stripe_md *lsm;
-        int stripe;
-        __u64 kms;
-
-        ENTRY;
-
-        if ((unsigned long)data > 0 && (unsigned long)data < 0x1000) {
-                LDLM_ERROR(lock, "cancelling lock with bad data %p", data);
-                LBUG();
-        }
-
-        inode = ll_inode_from_lock(lock);
-        if (inode == NULL)
-                RETURN(0);
-        lli = ll_i2info(inode);
-        if (lli == NULL)
-                GOTO(iput, 0);
-        if (lli->lli_smd == NULL)
-                GOTO(iput, 0);
-        lsm = lli->lli_smd;
-
-        stripe = ll_lock_to_stripe_offset(inode, lock);
-        if (stripe < 0)
-                GOTO(iput, 0);
-
-        lov_stripe_lock(lsm);
-        lock_res_and_lock(lock);
-        kms = ldlm_extent_shift_kms(lock,
-                                    lsm->lsm_oinfo[stripe]->loi_kms);
-
-        if (lsm->lsm_oinfo[stripe]->loi_kms != kms)
-                LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
-                           lsm->lsm_oinfo[stripe]->loi_kms, kms);
-        lsm->lsm_oinfo[stripe]->loi_kms = kms;
-        unlock_res_and_lock(lock);
-        lov_stripe_unlock(lsm);
-        ll_try_done_writing(inode);
-        EXIT;
-iput:
-        iput(inode);
-
-        return 0;
-}
-
-#if 0
-int ll_async_completion_ast(struct ldlm_lock *lock, int flags, void *data)
-{
-        /* XXX ALLOCATE - 160 bytes */
-        struct inode *inode = ll_inode_from_lock(lock);
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lustre_handle lockh = { 0 };
-        struct ost_lvb *lvb;
-        int stripe;
-        ENTRY;
-
-        if (flags & (LDLM_FL_BLOCK_WAIT | LDLM_FL_BLOCK_GRANTED |
-                     LDLM_FL_BLOCK_CONV)) {
-                LBUG(); /* not expecting any blocked async locks yet */
-                LDLM_DEBUG(lock, "client-side async enqueue returned a blocked "
-                           "lock, returning");
-                ldlm_lock_dump(D_OTHER, lock, 0);
-                ldlm_reprocess_all(lock->l_resource);
-                RETURN(0);
-        }
-
-        LDLM_DEBUG(lock, "client-side async enqueue: granted/glimpsed");
-
-        stripe = ll_lock_to_stripe_offset(inode, lock);
-        if (stripe < 0)
-                goto iput;
-
-        if (lock->l_lvb_len) {
-                struct lov_stripe_md *lsm = lli->lli_smd;
-                __u64 kms;
-                lvb = lock->l_lvb_data;
-                lsm->lsm_oinfo[stripe].loi_rss = lvb->lvb_size;
-
-                lock_res_and_lock(lock);
-                ll_inode_size_lock(inode, 1);
-                kms = MAX(lsm->lsm_oinfo[stripe].loi_kms, lvb->lvb_size);
-                kms = ldlm_extent_shift_kms(NULL, kms);
-                if (lsm->lsm_oinfo[stripe].loi_kms != kms)
-                        LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
-                                   lsm->lsm_oinfo[stripe].loi_kms, kms);
-                lsm->lsm_oinfo[stripe].loi_kms = kms;
-                ll_inode_size_unlock(inode, 1);
-                unlock_res_and_lock(lock);
-        }
-
-iput:
-        iput(inode);
-        wake_up(&lock->l_waitq);
-
-        ldlm_lock2handle(lock, &lockh);
-        ldlm_lock_decref(&lockh, LCK_PR);
-        RETURN(0);
-}
-#endif
-
-static int ll_glimpse_callback(struct ldlm_lock *lock, void *reqp)
-{
-        struct ptlrpc_request *req = reqp;
-        struct inode *inode = ll_inode_from_lock(lock);
-        struct ll_inode_info *lli;
-        struct lov_stripe_md *lsm;
-        struct ost_lvb *lvb;
-        int rc, stripe;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*lvb) };
-        ENTRY;
-
-        if (inode == NULL)
-                GOTO(out, rc = -ELDLM_NO_LOCK_DATA);
-        lli = ll_i2info(inode);
-        if (lli == NULL)
-                GOTO(iput, rc = -ELDLM_NO_LOCK_DATA);
-        lsm = lli->lli_smd;
-        if (lsm == NULL)
-                GOTO(iput, rc = -ELDLM_NO_LOCK_DATA);
-
-        /* First, find out which stripe index this lock corresponds to. */
-        stripe = ll_lock_to_stripe_offset(inode, lock);
-        if (stripe < 0)
-                GOTO(iput, rc = -ELDLM_NO_LOCK_DATA);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(iput, rc);
-
-        lvb = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*lvb));
-        lvb->lvb_size = lli->lli_smd->lsm_oinfo[stripe]->loi_kms;
-        lvb->lvb_mtime = LTIME_S(inode->i_mtime);
-        lvb->lvb_atime = LTIME_S(inode->i_atime);
-        lvb->lvb_ctime = LTIME_S(inode->i_ctime);
-
-        LDLM_DEBUG(lock, "i_size: %llu -> stripe number %u -> kms "LPU64
-                   " atime "LPU64", mtime "LPU64", ctime "LPU64,
-                   i_size_read(inode), stripe, lvb->lvb_size, lvb->lvb_mtime,
-                   lvb->lvb_atime, lvb->lvb_ctime);
- iput:
-        iput(inode);
-
- out:
-        /* These errors are normal races, so we don't want to fill the console
-         * with messages by calling ptlrpc_error() */
-        if (rc == -ELDLM_NO_LOCK_DATA)
-                lustre_pack_reply(req, 1, NULL, NULL);
-
-        req->rq_status = rc;
-        return rc;
-}
-
-int ll_glimpse_ioctl(struct ll_sb_info *sbi, struct lov_stripe_md *lsm,
-                     lstat_t *st)
-{
-        struct lustre_handle lockh = { 0 };
-        struct ldlm_enqueue_info einfo = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        struct ost_lvb lvb;
-        int rc;
-        
-        ENTRY;
-        
-        einfo.ei_type = LDLM_EXTENT;
-        einfo.ei_mode = LCK_PR;
-        einfo.ei_cb_bl = osc_extent_blocking_cb;
-        einfo.ei_cb_cp = ldlm_completion_ast;
-        einfo.ei_cb_gl = ll_glimpse_callback;
-        einfo.ei_cbdata = NULL;
-
-        oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF;
-        oinfo.oi_lockh = &lockh;
-        oinfo.oi_md = lsm;
-        oinfo.oi_flags = LDLM_FL_HAS_INTENT;
-
-        rc = obd_enqueue_rqset(sbi->ll_osc_exp, &oinfo, &einfo);
-        if (rc == -ENOENT)
-                RETURN(rc);
-        if (rc != 0) {
-                CERROR("obd_enqueue returned rc %d, "
-                       "returning -EIO\n", rc);
-                RETURN(rc > 0 ? -EIO : rc);
-        }
-        
-        lov_stripe_lock(lsm);
-        memset(&lvb, 0, sizeof(lvb));
-        obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 0);
-        st->st_size = lvb.lvb_size;
-        st->st_blocks = lvb.lvb_blocks;
-        st->st_mtime = lvb.lvb_mtime;
-        st->st_atime = lvb.lvb_atime;
-        st->st_ctime = lvb.lvb_ctime;
-        lov_stripe_unlock(lsm);
-        
-        RETURN(rc);
-}
-
-/* NB: obd_merge_lvb will prefer locally cached writes if they extend the
- * file (because it prefers KMS over RSS when larger) */
-int ll_glimpse_size(struct inode *inode, int ast_flags)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct lustre_handle lockh = { 0 };
-        struct ldlm_enqueue_info einfo = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        struct ost_lvb lvb;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_DLMTRACE, "Glimpsing inode %lu\n", inode->i_ino);
-
-        if (!lli->lli_smd) {
-                CDEBUG(D_DLMTRACE, "No objects for inode %lu\n", inode->i_ino);
-                RETURN(0);
-        }
-
-        /* NOTE: this looks like DLM lock request, but it may not be one. Due
-         *       to LDLM_FL_HAS_INTENT flag, this is glimpse request, that
-         *       won't revoke any conflicting DLM locks held. Instead,
-         *       ll_glimpse_callback() will be called on each client
-         *       holding a DLM lock against this file, and resulting size
-         *       will be returned for each stripe. DLM lock on [0, EOF] is
-         *       acquired only if there were no conflicting locks. */
-        einfo.ei_type = LDLM_EXTENT;
-        einfo.ei_mode = LCK_PR;
-        einfo.ei_cb_bl = osc_extent_blocking_cb;
-        einfo.ei_cb_cp = ldlm_completion_ast;
-        einfo.ei_cb_gl = ll_glimpse_callback;
-        einfo.ei_cbdata = inode;
-
-        oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF;
-        oinfo.oi_lockh = &lockh;
-        oinfo.oi_md = lli->lli_smd;
-        oinfo.oi_flags = ast_flags | LDLM_FL_HAS_INTENT;
-
-        rc = obd_enqueue_rqset(sbi->ll_osc_exp, &oinfo, &einfo);
-        if (rc == -ENOENT)
-                RETURN(rc);
-        if (rc != 0) {
-                CERROR("obd_enqueue returned rc %d, returning -EIO\n", rc);
-                RETURN(rc > 0 ? -EIO : rc);
-        }
-
-        ll_inode_size_lock(inode, 1);
-        inode_init_lvb(inode, &lvb);
-        rc = obd_merge_lvb(sbi->ll_osc_exp, lli->lli_smd, &lvb, 0);
-        i_size_write(inode, lvb.lvb_size);
-        inode->i_blocks = lvb.lvb_blocks;
-        LTIME_S(inode->i_mtime) = lvb.lvb_mtime;
-        LTIME_S(inode->i_atime) = lvb.lvb_atime;
-        LTIME_S(inode->i_ctime) = lvb.lvb_ctime;
-        ll_inode_size_unlock(inode, 1);
-
-        CDEBUG(D_DLMTRACE, "glimpse: size: %llu, blocks: %llu\n",
-               i_size_read(inode), (long long)inode->i_blocks);
-
-        RETURN(rc);
-}
-
-int ll_extent_lock(struct ll_file_data *fd, struct inode *inode,
-                   struct lov_stripe_md *lsm, int mode,
-                   ldlm_policy_data_t *policy, struct lustre_handle *lockh,
-                   int ast_flags)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ost_lvb lvb;
-        struct ldlm_enqueue_info einfo = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        int rc;
-        ENTRY;
-
-        LASSERT(!lustre_handle_is_used(lockh));
-        LASSERT(lsm != NULL);
-
-        /* don't drop the mmapped file to LRU */
-        if (mapping_mapped(inode->i_mapping))
-                ast_flags |= LDLM_FL_NO_LRU;
-
-        /* XXX phil: can we do this?  won't it screw the file size up? */
-        if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) ||
-            (sbi->ll_flags & LL_SBI_NOLCK))
-                RETURN(0);
-
-        CDEBUG(D_DLMTRACE, "Locking inode %lu, start "LPU64" end "LPU64"\n",
-               inode->i_ino, policy->l_extent.start, policy->l_extent.end);
-
-        einfo.ei_type = LDLM_EXTENT;
-        einfo.ei_mode = mode;
-        einfo.ei_cb_bl = osc_extent_blocking_cb;
-        einfo.ei_cb_cp = ldlm_completion_ast;
-        einfo.ei_cb_gl = ll_glimpse_callback;
-        einfo.ei_cbdata = inode;
-
-        oinfo.oi_policy = *policy;
-        oinfo.oi_lockh = lockh;
-        oinfo.oi_md = lsm;
-        oinfo.oi_flags = ast_flags;
-
-        rc = obd_enqueue(sbi->ll_osc_exp, &oinfo, &einfo, NULL);
-        *policy = oinfo.oi_policy;
-        if (rc > 0)
-                rc = -EIO;
-
-        ll_inode_size_lock(inode, 1);
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(sbi->ll_osc_exp, lsm, &lvb, 1);
-
-        if (policy->l_extent.start == 0 &&
-            policy->l_extent.end == OBD_OBJECT_EOF) {
-                /* vmtruncate()->ll_truncate() first sets the i_size and then
-                 * the kms under both a DLM lock and the
-                 * ll_inode_size_lock().  If we don't get the
-                 * ll_inode_size_lock() here we can match the DLM lock and
-                 * reset i_size from the kms before the truncating path has
-                 * updated the kms.  generic_file_write can then trust the
-                 * stale i_size when doing appending writes and effectively
-                 * cancel the result of the truncate.  Getting the
-                 * ll_inode_size_lock() after the enqueue maintains the DLM
-                 * -> ll_inode_size_lock() acquiring order. */
-                i_size_write(inode, lvb.lvb_size);
-                CDEBUG(D_INODE, "inode=%lu, updating i_size %llu\n",
-                       inode->i_ino, i_size_read(inode));
-        }
-
-        if (rc == 0) {
-                LTIME_S(inode->i_mtime) = lvb.lvb_mtime;
-                LTIME_S(inode->i_atime) = lvb.lvb_atime;
-                LTIME_S(inode->i_ctime) = lvb.lvb_ctime;
-        }
-        ll_inode_size_unlock(inode, 1);
-
-        RETURN(rc);
-}
-
-int ll_extent_unlock(struct ll_file_data *fd, struct inode *inode,
-                     struct lov_stripe_md *lsm, int mode,
-                     struct lustre_handle *lockh)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        int rc;
-        ENTRY;
-
-        /* XXX phil: can we do this?  won't it screw the file size up? */
-        if ((fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK)) ||
-            (sbi->ll_flags & LL_SBI_NOLCK))
-                RETURN(0);
-
-        rc = obd_cancel(sbi->ll_osc_exp, lsm, mode, lockh);
-
-        RETURN(rc);
-}
-
-static void ll_set_file_contended(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-
-        lli->lli_contention_time = cfs_time_current();
-        set_bit(LLI_F_CONTENDED, &lli->lli_flags);
-}
-
-void ll_clear_file_contended(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-
-        clear_bit(LLI_F_CONTENDED, &lli->lli_flags);
-}
-
-static int ll_is_file_contended(struct file *file)
-{
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
-        ENTRY;
-
-        if (!(sbi->ll_lco.lco_flags & OBD_CONNECT_SRVLOCK)) {
-                CDEBUG(D_INFO, "the server does not support SRVLOCK feature,"
-                       " osc connect flags = 0x"LPX64"\n",
-                       sbi->ll_lco.lco_flags);
-                RETURN(0);
-        }
-        if (fd && (fd->fd_flags & LL_FILE_IGNORE_LOCK))
-                RETURN(1);
-        if (test_bit(LLI_F_CONTENDED, &lli->lli_flags)) {
-                cfs_time_t cur_time = cfs_time_current();
-                cfs_time_t retry_time;
-
-                retry_time = cfs_time_add(
-                        lli->lli_contention_time,
-                        cfs_time_seconds(sbi->ll_contention_time));
-                if (cfs_time_after(cur_time, retry_time)) {
-                        ll_clear_file_contended(inode);
-                        RETURN(0);
-                }
-                RETURN(1);
-        }
-        RETURN(0);
-}
-
-static int ll_file_get_tree_lock_iov(struct ll_lock_tree *tree,
-                                     struct file *file, const struct iovec *iov,
-                                     unsigned long nr_segs,
-                                     loff_t start, loff_t end, int rw)
-{
-        int append;
-        int tree_locked = 0;
-        int rc;
-        struct inode * inode = file->f_dentry->d_inode;
-
-        append = (rw == WRITE) && (file->f_flags & O_APPEND);
-
-        if (append || !ll_is_file_contended(file)) {
-                struct ll_lock_tree_node *node;
-                int ast_flags;
-
-                ast_flags = append ? 0 : LDLM_FL_DENY_ON_CONTENTION;
-                if (file->f_flags & O_NONBLOCK)
-                        ast_flags |= LDLM_FL_BLOCK_NOWAIT;
-                node = ll_node_from_inode(inode, start, end,
-                                          (rw == WRITE) ? LCK_PW : LCK_PR);
-                if (IS_ERR(node)) {
-                        rc = PTR_ERR(node);
-                        GOTO(out, rc);
-                }
-                tree->lt_fd = LUSTRE_FPRIVATE(file);
-                rc = ll_tree_lock_iov(tree, node, iov, nr_segs, ast_flags);
-                if (rc == 0)
-                        tree_locked = 1;
-                else if (rc == -EUSERS)
-                        ll_set_file_contended(inode);
-                else
-                        GOTO(out, rc);
-        }
-        RETURN(tree_locked);
-out:
-        return rc;
-}
-
-/* XXX: exact copy from kernel code (__generic_file_aio_write_nolock from rhel4)
- */
-static size_t ll_file_get_iov_count(const struct iovec *iov, 
-                                     unsigned long *nr_segs)
-{
-        size_t count = 0;
-        unsigned long seg;
-
-        for (seg = 0; seg < *nr_segs; seg++) {
-                const struct iovec *iv = &iov[seg];
-
-                /*
-                 * If any segment has a negative length, or the cumulative
-                 * length ever wraps negative then return -EINVAL.
-                 */
-                count += iv->iov_len;
-                if (unlikely((ssize_t)(count|iv->iov_len) < 0))
-                        return -EINVAL;
-                if (access_ok(VERIFY_WRITE, iv->iov_base, iv->iov_len))
-                        continue;
-                if (seg == 0)
-                        return -EFAULT;
-                *nr_segs = seg;
-                count -= iv->iov_len;   /* This segment is no good */
-                break;
-        }
-        return count;
-}
-
-static int iov_copy_update(unsigned long *nr_segs, const struct iovec **iov_out,
-                           unsigned long *nrsegs_copy,
-                           struct iovec *iov_copy, size_t *offset,
-                           size_t size)
-{
-        int i;
-        const struct iovec *iov = *iov_out;
-        for (i = 0; i < *nr_segs;
-             i++) {
-                const struct iovec *iv = &iov[i];
-                struct iovec *ivc = &iov_copy[i];
-                *ivc = *iv;
-                if (i == 0) {
-                        ivc->iov_len -= *offset;
-                        ivc->iov_base += *offset;
-                }
-                if (ivc->iov_len >= size) {
-                        ivc->iov_len = size;
-                        if (i == 0)
-                                *offset += size;
-                        else
-                                *offset = size;
-                        break;
-                }
-                size -= ivc->iov_len;
-        }
-        *iov_out += i;
-        *nr_segs -= i;
-        *nrsegs_copy = i + 1;
-
-        return 0;
-}
-
-#ifdef HAVE_FILE_READV
-static ssize_t ll_file_readv(struct file *file, const struct iovec *iov,
-                              unsigned long nr_segs, loff_t *ppos)
-{
-#else
-static ssize_t ll_file_aio_read(struct kiocb *iocb, const struct iovec *iov,
-                                unsigned long nr_segs, loff_t pos)
-{
-        struct file *file = iocb->ki_filp;
-        loff_t *ppos = &iocb->ki_pos;
-#endif
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_lock_tree tree;
-        struct ost_lvb lvb;
-        struct ll_ra_read bead;
-        int ra = 0;
-        loff_t end;
-        ssize_t retval, chunk, sum = 0;
-        int tree_locked;
-        struct iovec *iov_copy = NULL;
-        unsigned long nrsegs_copy, nrsegs_orig = 0;
-        size_t count, iov_offset = 0;
-        __u64 kms;
-        ENTRY;
-
-        count = ll_file_get_iov_count(iov, &nr_segs);
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
-               inode->i_ino, inode->i_generation, inode, count, *ppos);
-        /* "If nbyte is 0, read() will return 0 and have no other results."
-         *                      -- Single Unix Spec */
-        if (count == 0)
-                RETURN(0);
-
-        ll_stats_ops_tally(sbi, LPROC_LL_READ_BYTES, count);
-
-        if (!lsm) {
-                /* Read on file with no objects should return zero-filled
-                 * buffers up to file size (we can get non-zero sizes with
-                 * mknod + truncate, then opening file for read. This is a
-                 * common pattern in NFS case, it seems). Bug 6243 */
-                int notzeroed;
-                /* Since there are no objects on OSTs, we have nothing to get
-                 * lock on and so we are forced to access inode->i_size
-                 * unguarded */
-
-                /* Read beyond end of file */
-                if (*ppos >= i_size_read(inode))
-                        RETURN(0);
-
-                if (count > i_size_read(inode) - *ppos)
-                        count = i_size_read(inode) - *ppos;
-                /* Make sure to correctly adjust the file pos pointer for
-                 * EFAULT case */
-                for (nrsegs_copy = 0; nrsegs_copy < nr_segs; nrsegs_copy++) {
-                        const struct iovec *iv = &iov[nrsegs_copy];
-
-                        if (count < iv->iov_len)
-                                chunk = count;
-                        else
-                                chunk = iv->iov_len;
-                        notzeroed = clear_user(iv->iov_base, chunk);
-                        sum += (chunk - notzeroed);
-                        count -= (chunk - notzeroed);
-                        if (notzeroed || !count)
-                                break;
-                }
-                *ppos += sum;
-                if (!sum)
-                        RETURN(-EFAULT);
-                RETURN(sum);
-        }
-repeat:
-        if (sbi->ll_max_rw_chunk != 0) {
-                /* first, let's know the end of the current stripe */
-                end = *ppos;
-                obd_extent_calc(sbi->ll_osc_exp, lsm, OBD_CALC_STRIPE_END,
-                                (obd_off *)&end);
-
-                /* correct, the end is beyond the request */
-                if (end > *ppos + count - 1)
-                        end = *ppos + count - 1;
-
-                /* and chunk shouldn't be too large even if striping is wide */
-                if (end - *ppos > sbi->ll_max_rw_chunk)
-                        end = *ppos + sbi->ll_max_rw_chunk - 1;
-
-                chunk = end - *ppos + 1;
-                if ((count == chunk) && (iov_offset == 0)) {
-                        if (iov_copy)
-                                OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig);
-
-                        iov_copy = (struct iovec *)iov;
-                        nrsegs_copy = nr_segs;
-                } else {
-                        if (!iov_copy) {
-                                nrsegs_orig = nr_segs;
-                                OBD_ALLOC(iov_copy, sizeof(*iov) * nr_segs);
-                                if (!iov_copy)
-                                        GOTO(out, retval = -ENOMEM); 
-                        }
-
-                        iov_copy_update(&nr_segs, &iov, &nrsegs_copy, iov_copy,
-                                        &iov_offset, chunk);
-                }
-        } else {
-                end = *ppos + count - 1;
-                iov_copy = (struct iovec *)iov;
-                nrsegs_copy = nr_segs;
-        }
-
-        tree_locked = ll_file_get_tree_lock_iov(&tree, file, iov_copy,
-                                                nrsegs_copy, *ppos, end, READ);
-        if (tree_locked < 0)
-                GOTO(out, retval = tree_locked);
-
-        ll_inode_size_lock(inode, 1);
-        /*
-         * Consistency guarantees: following possibilities exist for the
-         * relation between region being read and real file size at this
-         * moment:
-         *
-         *  (A): the region is completely inside of the file;
-         *
-         *  (B-x): x bytes of region are inside of the file, the rest is
-         *  outside;
-         *
-         *  (C): the region is completely outside of the file.
-         *
-         * This classification is stable under DLM lock acquired by
-         * ll_tree_lock() above, because to change class, other client has to
-         * take DLM lock conflicting with our lock. Also, any updates to
-         * ->i_size by other threads on this client are serialized by
-         * ll_inode_size_lock(). This guarantees that short reads are handled
-         * correctly in the face of concurrent writes and truncates.
-         */
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(ll_i2sbi(inode)->ll_osc_exp, lsm, &lvb, 1);
-        kms = lvb.lvb_size;
-        if (*ppos + count - 1 > kms) {
-                /* A glimpse is necessary to determine whether we return a
-                 * short read (B) or some zeroes at the end of the buffer (C) */
-                ll_inode_size_unlock(inode, 1);
-                retval = ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED);
-                if (retval) {
-                        ll_tree_unlock(&tree);
-                        goto out;
-                }
-        } else {
-                /* region is within kms and, hence, within real file size (A).
-                 * We need to increase i_size to cover the read region so that
-                 * generic_file_read() will do its job, but that doesn't mean
-                 * the kms size is _correct_, it is only the _minimum_ size.
-                 * If someone does a stat they will get the correct size which
-                 * will always be >= the kms value here.  b=11081 */
-                if (i_size_read(inode) < kms)
-                        i_size_write(inode, kms);
-                ll_inode_size_unlock(inode, 1);
-        }
-
-        chunk = end - *ppos + 1;
-        CDEBUG(D_INODE,"Read ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n",
-               inode->i_ino, chunk, *ppos, i_size_read(inode));
-
-        /* turn off the kernel's read-ahead */
-        if (tree_locked) {
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-                file->f_ramax = 0;
-#else
-                file->f_ra.ra_pages = 0;
-#endif
-                /* initialize read-ahead window once per syscall */
-                if (ra == 0) {
-                        ra = 1;
-                        bead.lrr_start = *ppos >> CFS_PAGE_SHIFT;
-                        bead.lrr_count = (count + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-                        ll_ra_read_in(file, &bead);
-                }
-
-                /* BUG: 5972 */
-                file_accessed(file);
-#ifdef HAVE_FILE_READV
-                retval = generic_file_readv(file, iov_copy, nrsegs_copy, ppos);
-#else
-                retval = generic_file_aio_read(iocb, iov_copy, nrsegs_copy,
-                                               *ppos);
-#endif
-                ll_tree_unlock(&tree);
-        } else {
-                retval = ll_file_lockless_io(file, iov_copy, nrsegs_copy, ppos,
-                                             READ, chunk);
-        }
-        ll_rw_stats_tally(sbi, current->pid, file, count, 0);
-        if (retval > 0) {
-                count -= retval;
-                sum += retval;
-                if (retval == chunk && count > 0)
-                        goto repeat;
-        }
-
- out:
-        if (ra != 0)
-                ll_ra_read_ex(file, &bead);
-        retval = (sum > 0) ? sum : retval;
-
-        if (iov_copy && iov_copy != iov)
-                OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig);
-
-        RETURN(retval);
-}
-
-static ssize_t ll_file_read(struct file *file, char *buf, size_t count,
-                            loff_t *ppos)
-{
-        struct iovec local_iov = { .iov_base = (void __user *)buf,
-                                   .iov_len = count };
-#ifdef HAVE_FILE_READV
-        return ll_file_readv(file, &local_iov, 1, ppos);
-#else
-        struct kiocb kiocb;
-        ssize_t ret;
-
-        init_sync_kiocb(&kiocb, file);
-        kiocb.ki_pos = *ppos;
-        kiocb.ki_left = count;
-
-        ret = ll_file_aio_read(&kiocb, &local_iov, 1, kiocb.ki_pos);
-        *ppos = kiocb.ki_pos;
-        return ret;
-#endif
-}
-
-/*
- * Write to a file (through the page cache).
- */
-#ifdef HAVE_FILE_WRITEV
-static ssize_t ll_file_writev(struct file *file, const struct iovec *iov,
-                              unsigned long nr_segs, loff_t *ppos)
-{
-#else /* AIO stuff */
-static ssize_t ll_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
-                                 unsigned long nr_segs, loff_t pos)
-{
-        struct file *file = iocb->ki_filp;
-        loff_t *ppos = &iocb->ki_pos;
-#endif
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd;
-        struct ll_lock_tree tree;
-        loff_t maxbytes = ll_file_maxbytes(inode);
-        loff_t lock_start, lock_end, end;
-        ssize_t retval, chunk, sum = 0;
-        int tree_locked;
-        struct iovec *iov_copy = NULL;
-        unsigned long nrsegs_copy, nrsegs_orig = 0;
-        size_t count, iov_offset = 0;
-        ENTRY;
-
-        count = ll_file_get_iov_count(iov, &nr_segs);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
-               inode->i_ino, inode->i_generation, inode, count, *ppos);
-        
-        SIGNAL_MASK_ASSERT(); /* XXX BUG 1511 */
-
-        /* POSIX, but surprised the VFS doesn't check this already */
-        if (count == 0)
-                RETURN(0);
-
-        /* If file was opened for LL_IOC_LOV_SETSTRIPE but the ioctl wasn't
-         * called on the file, don't fail the below assertion (bug 2388). */
-        if (file->f_flags & O_LOV_DELAY_CREATE &&
-            ll_i2info(inode)->lli_smd == NULL)
-                RETURN(-EBADF);
-
-        LASSERT(ll_i2info(inode)->lli_smd != NULL);
-
-        down(&ll_i2info(inode)->lli_write_sem);
-
-repeat:
-        chunk = 0; /* just to fix gcc's warning */
-        end = *ppos + count - 1;
-
-        if (file->f_flags & O_APPEND) {
-                lock_start = 0;
-                lock_end = OBD_OBJECT_EOF;
-                iov_copy = (struct iovec *)iov;
-                nrsegs_copy = nr_segs;
-        } else if (sbi->ll_max_rw_chunk != 0) {
-                /* first, let's know the end of the current stripe */
-                end = *ppos;
-                obd_extent_calc(sbi->ll_osc_exp, lsm, OBD_CALC_STRIPE_END, 
-                                (obd_off *)&end);
-
-                /* correct, the end is beyond the request */
-                if (end > *ppos + count - 1)
-                        end = *ppos + count - 1;
-
-                /* and chunk shouldn't be too large even if striping is wide */
-                if (end - *ppos > sbi->ll_max_rw_chunk)
-                        end = *ppos + sbi->ll_max_rw_chunk - 1;
-                lock_start = *ppos;
-                lock_end = end;
-                chunk = end - *ppos + 1;
-                if ((count == chunk) && (iov_offset == 0)) {
-                        if (iov_copy)
-                                OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig);
-
-                        iov_copy = (struct iovec *)iov;
-                        nrsegs_copy = nr_segs;
-                } else {
-                        if (!iov_copy) {
-                                nrsegs_orig = nr_segs;
-                                OBD_ALLOC(iov_copy, sizeof(*iov) * nr_segs);
-                                if (!iov_copy)
-                                        GOTO(out, retval = -ENOMEM); 
-                        }
-                        iov_copy_update(&nr_segs, &iov, &nrsegs_copy, iov_copy,
-                                        &iov_offset, chunk);
-                }
-        } else {
-                lock_start = *ppos;
-                lock_end = end;
-                iov_copy = (struct iovec *)iov;
-                nrsegs_copy = nr_segs;
-        }
-
-        tree_locked = ll_file_get_tree_lock_iov(&tree, file, iov_copy,
-                                                nrsegs_copy, lock_start,
-                                                lock_end, WRITE);
-        if (tree_locked < 0)
-                GOTO(out, retval = tree_locked);
-
-        /* This is ok, g_f_w will overwrite this under i_sem if it races
-         * with a local truncate, it just makes our maxbyte checking easier.
-         * The i_size value gets updated in ll_extent_lock() as a consequence
-         * of the [0,EOF] extent lock we requested above. */
-        if (file->f_flags & O_APPEND) {
-                *ppos = i_size_read(inode);
-                end = *ppos + count - 1;
-        }
-
-        if (*ppos >= maxbytes) {
-                send_sig(SIGXFSZ, current, 0);
-                GOTO(out_unlock, retval = -EFBIG);
-        }
-        if (end > maxbytes - 1)
-                end = maxbytes - 1;
-
-        /* generic_file_write handles O_APPEND after getting i_mutex */
-        chunk = end - *ppos + 1;
-        CDEBUG(D_INFO, "Writing inode %lu, "LPSZ" bytes, offset %Lu\n",
-               inode->i_ino, chunk, *ppos);
-        if (tree_locked)
-#ifdef HAVE_FILE_WRITEV
-                retval = generic_file_writev(file, iov_copy, nrsegs_copy, ppos);
-#else
-                retval = generic_file_aio_write(iocb, iov_copy, nrsegs_copy,
-                                                *ppos);
-#endif
-        else
-                retval = ll_file_lockless_io(file, iov_copy, nrsegs_copy,
-                                             ppos, WRITE, chunk);
-        ll_rw_stats_tally(ll_i2sbi(inode), current->pid, file, chunk, 1);
-
-out_unlock:
-        if (tree_locked)
-                ll_tree_unlock(&tree);
-
-out:
-        if (retval > 0) {
-                count -= retval;
-                sum += retval;
-                if (retval == chunk && count > 0)
-                        goto repeat;
-        }
-
-        up(&ll_i2info(inode)->lli_write_sem);
-
-        if (iov_copy && iov_copy != iov)
-                OBD_FREE(iov_copy, sizeof(*iov) * nrsegs_orig);
-
-        retval = (sum > 0) ? sum : retval;
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_WRITE_BYTES,
-                           retval > 0 ? retval : 0);
-        RETURN(retval);
-}
-
-static ssize_t ll_file_write(struct file *file, const char *buf, size_t count,
-                             loff_t *ppos)
-{
-        struct iovec local_iov = { .iov_base = (void __user *)buf,
-                                   .iov_len = count };
-
-#ifdef HAVE_FILE_WRITEV
-        return ll_file_writev(file, &local_iov, 1, ppos);
-#else
-        struct kiocb kiocb;
-        ssize_t ret;
-
-        init_sync_kiocb(&kiocb, file);
-        kiocb.ki_pos = *ppos;
-        kiocb.ki_left = count;
-
-        ret = ll_file_aio_write(&kiocb, &local_iov, 1, kiocb.ki_pos);
-        *ppos = kiocb.ki_pos;
-
-        return ret;
-#endif
-}
-
-/*
- * Send file content (through pagecache) somewhere with helper
- */
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-static ssize_t ll_file_sendfile(struct file *in_file, loff_t *ppos,size_t count,
-                                read_actor_t actor, void *target)
-{
-        struct inode *inode = in_file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct ll_lock_tree tree;
-        struct ll_lock_tree_node *node;
-        struct ost_lvb lvb;
-        struct ll_ra_read bead;
-        int rc;
-        ssize_t retval;
-        __u64 kms;
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),size="LPSZ",offset=%Ld\n",
-               inode->i_ino, inode->i_generation, inode, count, *ppos);
-
-        /* "If nbyte is 0, read() will return 0 and have no other results."
-         *                      -- Single Unix Spec */
-        if (count == 0)
-                RETURN(0);
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_READ_BYTES, count);
-        /* turn off the kernel's read-ahead */
-        in_file->f_ra.ra_pages = 0;
-
-        /* File with no objects, nothing to lock */
-        if (!lsm)
-                RETURN(generic_file_sendfile(in_file, ppos, count, actor, target));
-
-        node = ll_node_from_inode(inode, *ppos, *ppos + count - 1, LCK_PR);
-        if (IS_ERR(node))
-                RETURN(PTR_ERR(node));
-
-        tree.lt_fd = LUSTRE_FPRIVATE(in_file);
-        rc = ll_tree_lock(&tree, node, NULL, count,
-                          in_file->f_flags & O_NONBLOCK?LDLM_FL_BLOCK_NOWAIT:0);
-        if (rc != 0)
-                RETURN(rc);
-
-        ll_clear_file_contended(inode);
-        ll_inode_size_lock(inode, 1);
-        /*
-         * Consistency guarantees: following possibilities exist for the
-         * relation between region being read and real file size at this
-         * moment:
-         *
-         *  (A): the region is completely inside of the file;
-         *
-         *  (B-x): x bytes of region are inside of the file, the rest is
-         *  outside;
-         *
-         *  (C): the region is completely outside of the file.
-         *
-         * This classification is stable under DLM lock acquired by
-         * ll_tree_lock() above, because to change class, other client has to
-         * take DLM lock conflicting with our lock. Also, any updates to
-         * ->i_size by other threads on this client are serialized by
-         * ll_inode_size_lock(). This guarantees that short reads are handled
-         * correctly in the face of concurrent writes and truncates.
-         */
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(ll_i2sbi(inode)->ll_osc_exp, lsm, &lvb, 1);
-        kms = lvb.lvb_size;
-        if (*ppos + count - 1 > kms) {
-                /* A glimpse is necessary to determine whether we return a
-                 * short read (B) or some zeroes at the end of the buffer (C) */
-                ll_inode_size_unlock(inode, 1);
-                retval = ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED);
-                if (retval)
-                        goto out;
-        } else {
-                /* region is within kms and, hence, within real file size (A) */
-                i_size_write(inode, kms);
-                ll_inode_size_unlock(inode, 1);
-        }
-
-        CDEBUG(D_INFO, "Send ino %lu, "LPSZ" bytes, offset %lld, i_size %llu\n",
-               inode->i_ino, count, *ppos, i_size_read(inode));
-
-        bead.lrr_start = *ppos >> CFS_PAGE_SHIFT;
-        bead.lrr_count = (count + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-        ll_ra_read_in(in_file, &bead);
-        /* BUG: 5972 */
-        file_accessed(in_file);
-        retval = generic_file_sendfile(in_file, ppos, count, actor, target);
-        ll_ra_read_ex(in_file, &bead);
-
- out:
-        ll_tree_unlock(&tree);
-        RETURN(retval);
-}
-#endif
-
-static int ll_lov_recreate_obj(struct inode *inode, struct file *file,
-                               unsigned long arg)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct obd_export *exp = ll_i2obdexp(inode);
-        struct ll_recreate_obj ucreatp;
-        struct obd_trans_info oti = { 0 };
-        struct obdo *oa = NULL;
-        int lsm_size;
-        int rc = 0;
-        struct lov_stripe_md *lsm, *lsm2;
-        ENTRY;
-
-        if (!capable (CAP_SYS_ADMIN))
-                RETURN(-EPERM);
-
-        rc = copy_from_user(&ucreatp, (struct ll_recreate_obj *)arg,
-                            sizeof(struct ll_recreate_obj));
-        if (rc) {
-                RETURN(-EFAULT);
-        }
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                RETURN(-ENOMEM);
-
-        down(&lli->lli_size_sem);
-        lsm = lli->lli_smd;
-        if (lsm == NULL)
-                GOTO(out, rc = -ENOENT);
-        lsm_size = sizeof(*lsm) + (sizeof(struct lov_oinfo) *
-                   (lsm->lsm_stripe_count));
-
-        OBD_ALLOC(lsm2, lsm_size);
-        if (lsm2 == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        oa->o_id = ucreatp.lrc_id;
-        oa->o_nlink = ucreatp.lrc_ost_idx;
-        oa->o_flags |= OBD_FL_RECREATE_OBJS;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS;
-        obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
-                        OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-
-        memcpy(lsm2, lsm, lsm_size);
-        rc = obd_create(exp, oa, &lsm2, &oti);
-
-        OBD_FREE(lsm2, lsm_size);
-        GOTO(out, rc);
-out:
-        up(&lli->lli_size_sem);
-        OBDO_FREE(oa);
-        return rc;
-}
-
-int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
-                                    int flags, struct lov_user_md *lum,
-                                    int lum_size)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm;
-        struct lookup_intent oit = {.it_op = IT_OPEN, .it_flags = flags};
-        int rc = 0;
-        ENTRY;
-
-        down(&lli->lli_size_sem);
-        lsm = lli->lli_smd;
-        if (lsm) {
-                up(&lli->lli_size_sem);
-                CDEBUG(D_IOCTL, "stripe already exists for ino %lu\n",
-                       inode->i_ino);
-                RETURN(-EEXIST);
-        }
-
-        rc = ll_intent_file_open(file, lum, lum_size, &oit);
-        if (rc)
-                GOTO(out, rc);
-        if (it_disposition(&oit, DISP_LOOKUP_NEG))
-                GOTO(out_req_free, rc = -ENOENT);
-        rc = oit.d.lustre.it_status;
-        if (rc < 0)
-                GOTO(out_req_free, rc);
-
-        ll_release_openhandle(file->f_dentry, &oit);
-
- out:
-        up(&lli->lli_size_sem);
-        ll_intent_release(&oit);
-        RETURN(rc);
-out_req_free:
-        ptlrpc_req_finished((struct ptlrpc_request *) oit.d.lustre.it_data);
-        goto out;
-}
-
-int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, 
-                             struct lov_mds_md **lmmp, int *lmm_size, 
-                             struct ptlrpc_request **request)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_fid  fid;
-        struct mds_body  *body;
-        struct lov_mds_md *lmm = NULL;
-        struct ptlrpc_request *req = NULL;
-        int rc, lmmsize;
-
-        ll_inode2fid(&fid, inode);
-
-        rc = ll_get_max_mdsize(sbi, &lmmsize);
-        if (rc)
-                RETURN(rc);
-
-        rc = mdc_getattr_name(sbi->ll_mdc_exp, &fid,
-                        filename, strlen(filename) + 1,
-                        OBD_MD_FLEASIZE | OBD_MD_FLDIREA,
-                        lmmsize, &req);
-        if (rc < 0) {
-                CDEBUG(D_INFO, "mdc_getattr_name failed "
-                                "on %s: rc %d\n", filename, rc);
-                GOTO(out, rc);
-        }
-
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                        sizeof(*body));
-        LASSERT(body != NULL); /* checked by mdc_getattr_name */
-        /* swabbed by mdc_getattr_name */
-        LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF));
-
-        lmmsize = body->eadatasize;
-
-        if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
-                        lmmsize == 0) {
-                GOTO(out, rc = -ENODATA);
-        }
-
-        lmm = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1,
-                        lmmsize);
-        LASSERT(lmm != NULL);
-        LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF + 1));
-
-        /*
-         * This is coming from the MDS, so is probably in
-         * little endian.  We convert it to host endian before
-         * passing it to userspace.
-         */
-        if (lmm->lmm_magic == __swab32(LOV_MAGIC)) {
-                lustre_swab_lov_user_md((struct lov_user_md *)lmm);
-                lustre_swab_lov_user_md_objects((struct lov_user_md *)lmm);
-        } else if (lmm->lmm_magic == __swab32(LOV_MAGIC_JOIN)) {
-                lustre_swab_lov_user_md_join((struct lov_user_md_join *)lmm);
-        }
-
-        if (lmm->lmm_magic == LOV_MAGIC_JOIN) {
-                struct lov_stripe_md *lsm;
-                struct lov_user_md_join *lmj;
-                int lmj_size, i, aindex = 0;
-
-                rc = obd_unpackmd(sbi->ll_osc_exp, &lsm, lmm, lmmsize);
-                if (rc < 0)
-                        GOTO(out, rc = -ENOMEM);
-                rc = obd_checkmd(sbi->ll_osc_exp, sbi->ll_mdc_exp, lsm);
-                if (rc)
-                        GOTO(out_free_memmd, rc);
-
-                lmj_size = sizeof(struct lov_user_md_join) +
-                        lsm->lsm_stripe_count *
-                        sizeof(struct lov_user_ost_data_join);
-                OBD_ALLOC(lmj, lmj_size);
-                if (!lmj)
-                        GOTO(out_free_memmd, rc = -ENOMEM);
-
-                memcpy(lmj, lmm, sizeof(struct lov_user_md_join));
-                for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                        struct lov_extent *lex =
-                                &lsm->lsm_array->lai_ext_array[aindex];
-
-                        if (lex->le_loi_idx + lex->le_stripe_count <= i)
-                                aindex ++;
-                        CDEBUG(D_INFO, "aindex %d i %d l_extent_start "
-                                        LPU64" len %d\n", aindex, i,
-                                        lex->le_start, (int)lex->le_len);
-                        lmj->lmm_objects[i].l_extent_start =
-                                lex->le_start;
-
-                        if ((int)lex->le_len == -1)
-                                lmj->lmm_objects[i].l_extent_end = -1;
-                        else
-                                lmj->lmm_objects[i].l_extent_end =
-                                        lex->le_start + lex->le_len;
-                        lmj->lmm_objects[i].l_object_id =
-                                lsm->lsm_oinfo[i]->loi_id;
-                        lmj->lmm_objects[i].l_object_gr =
-                                lsm->lsm_oinfo[i]->loi_gr;
-                        lmj->lmm_objects[i].l_ost_gen =
-                                lsm->lsm_oinfo[i]->loi_ost_gen;
-                        lmj->lmm_objects[i].l_ost_idx =
-                                lsm->lsm_oinfo[i]->loi_ost_idx;
-                }
-                lmm = (struct lov_mds_md *)lmj;
-                lmmsize = lmj_size;
-out_free_memmd:
-                obd_free_memmd(sbi->ll_osc_exp, &lsm);
-        }
-out:
-        *lmmp = lmm;
-        *lmm_size = lmmsize;
-        *request = req;
-        return rc;
-}
-static int ll_lov_setea(struct inode *inode, struct file *file,
-                            unsigned long arg)
-{
-        int flags = MDS_OPEN_HAS_OBJS | FMODE_WRITE;
-        struct lov_user_md  *lump;
-        int lum_size = sizeof(struct lov_user_md) +
-                       sizeof(struct lov_user_ost_data);
-        int rc;
-        ENTRY;
-
-        if (!capable (CAP_SYS_ADMIN))
-                RETURN(-EPERM);
-
-        OBD_ALLOC(lump, lum_size);
-        if (lump == NULL) {
-                RETURN(-ENOMEM);
-        }
-        rc = copy_from_user(lump, (struct lov_user_md  *)arg, lum_size);
-        if (rc) {
-                OBD_FREE(lump, lum_size);
-                RETURN(-EFAULT);
-        }
-
-        rc = ll_lov_setstripe_ea_info(inode, file, flags, lump, lum_size);
-
-        OBD_FREE(lump, lum_size);
-        RETURN(rc);
-}
-
-static int ll_lov_setstripe(struct inode *inode, struct file *file,
-                            unsigned long arg)
-{
-        struct lov_user_md lum, *lump = (struct lov_user_md *)arg;
-        int rc;
-        int flags = FMODE_WRITE;
-        ENTRY;
-
-        /* Bug 1152: copy properly when this is no longer true */
-        LASSERT(sizeof(lum) == sizeof(*lump));
-        LASSERT(sizeof(lum.lmm_objects[0]) == sizeof(lump->lmm_objects[0]));
-        rc = copy_from_user(&lum, lump, sizeof(lum));
-        if (rc)
-                RETURN(-EFAULT);
-
-        rc = ll_lov_setstripe_ea_info(inode, file, flags, &lum, sizeof(lum));
-        if (rc == 0) {
-                 put_user(0, &lump->lmm_stripe_count);
-                 rc = obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2obdexp(inode),
-                                    0, ll_i2info(inode)->lli_smd, lump);
-        }
-        RETURN(rc);
-}
-
-static int ll_lov_getstripe(struct inode *inode, unsigned long arg)
-{
-        struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd;
-
-        if (!lsm)
-                RETURN(-ENODATA);
-
-        return obd_iocontrol(LL_IOC_LOV_GETSTRIPE, ll_i2obdexp(inode), 0, lsm,
-                            (void *)arg);
-}
-
-static int ll_get_grouplock(struct inode *inode, struct file *file,
-                            unsigned long arg)
-{
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
-        ldlm_policy_data_t policy = { .l_extent = { .start = 0,
-                                                    .end = OBD_OBJECT_EOF}};
-        struct lustre_handle lockh = { 0 };
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        int flags = 0, rc;
-        ENTRY;
-
-        if (fd->fd_flags & LL_FILE_GROUP_LOCKED) {
-                RETURN(-EINVAL);
-        }
-
-        policy.l_extent.gid = arg;
-        if (file->f_flags & O_NONBLOCK)
-                flags = LDLM_FL_BLOCK_NOWAIT;
-
-        rc = ll_extent_lock(fd, inode, lsm, LCK_GROUP, &policy, &lockh, flags);
-        if (rc)
-                RETURN(rc);
-
-        fd->fd_flags |= LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK;
-        fd->fd_gid = arg;
-        memcpy(&fd->fd_cwlockh, &lockh, sizeof(lockh));
-
-        RETURN(0);
-}
-
-static int ll_put_grouplock(struct inode *inode, struct file *file,
-                            unsigned long arg)
-{
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        int rc;
-        ENTRY;
-
-        if (!(fd->fd_flags & LL_FILE_GROUP_LOCKED)) {
-                /* Ugh, it's already unlocked. */
-                RETURN(-EINVAL);
-        }
-
-        if (fd->fd_gid != arg) /* Ugh? Unlocking with different gid? */
-                RETURN(-EINVAL);
-
-        fd->fd_flags &= ~(LL_FILE_GROUP_LOCKED|LL_FILE_IGNORE_LOCK);
-
-        rc = ll_extent_unlock(fd, inode, lsm, LCK_GROUP, &fd->fd_cwlockh);
-        if (rc)
-                RETURN(rc);
-
-        fd->fd_gid = 0;
-        memset(&fd->fd_cwlockh, 0, sizeof(fd->fd_cwlockh));
-
-        RETURN(0);
-}
-
-static int join_sanity_check(struct inode *head, struct inode *tail)
-{
-        ENTRY;
-        if ((ll_i2sbi(head)->ll_flags & LL_SBI_JOIN) == 0) {
-                CERROR("server do not support join \n");
-                RETURN(-EINVAL);
-        }
-        if (!S_ISREG(tail->i_mode) || !S_ISREG(head->i_mode)) {
-                CERROR("tail ino %lu and ino head %lu must be regular\n",
-                       head->i_ino, tail->i_ino);
-                RETURN(-EINVAL);
-        }
-        if (head->i_ino == tail->i_ino) {
-                CERROR("file %lu can not be joined to itself \n", head->i_ino);
-                RETURN(-EINVAL);
-        }
-        if (i_size_read(head) % JOIN_FILE_ALIGN) {
-                CERROR("hsize %llu must be times of 64K\n", i_size_read(head));
-                RETURN(-EINVAL);
-        }
-        RETURN(0);
-}
-
-static int join_file(struct inode *head_inode, struct file *head_filp,
-                     struct file *tail_filp)
-{
-        struct dentry *tail_dentry = tail_filp->f_dentry;
-        struct lookup_intent oit = {.it_op = IT_OPEN,
-                                   .it_flags = head_filp->f_flags|O_JOIN_FILE};
-        struct ldlm_enqueue_info einfo = { LDLM_IBITS, LCK_PW,
-                ll_mdc_blocking_ast, ldlm_completion_ast, NULL, NULL };
-
-        struct lustre_handle lockh;
-        struct mdc_op_data *op_data;
-        int    rc;
-        loff_t data;
-        ENTRY;
-
-        tail_dentry = tail_filp->f_dentry;
-
-        OBD_ALLOC_PTR(op_data);
-        if (op_data == NULL) {
-                RETURN(-ENOMEM);
-        }
-
-        data = i_size_read(head_inode);
-        ll_prepare_mdc_op_data(op_data, head_inode,
-                               tail_dentry->d_parent->d_inode,
-                               tail_dentry->d_name.name,
-                               tail_dentry->d_name.len, 0, &data);
-        rc = mdc_enqueue(ll_i2mdcexp(head_inode), &einfo, &oit,
-                         op_data, &lockh, NULL, 0, 0);
-
-        if (rc < 0)
-                GOTO(out, rc);
-
-        rc = oit.d.lustre.it_status;
-
-        if (rc < 0 || it_open_error(DISP_OPEN_OPEN, &oit)) {
-                rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, &oit);
-                ptlrpc_req_finished((struct ptlrpc_request *)
-                                    oit.d.lustre.it_data);
-                GOTO(out, rc);
-        }
-
-        if (oit.d.lustre.it_lock_mode) { /* If we got lock - release it right
-                                           * away */
-                ldlm_lock_decref(&lockh, oit.d.lustre.it_lock_mode);
-                oit.d.lustre.it_lock_mode = 0;
-        }
-        ll_release_openhandle(head_filp->f_dentry, &oit);
-out:
-        if (op_data)
-                OBD_FREE_PTR(op_data);
-        ll_intent_release(&oit);
-        RETURN(rc);
-}
-
-static int ll_file_join(struct inode *head, struct file *filp,
-                        char *filename_tail)
-{
-        struct inode *tail = NULL, *first = NULL, *second = NULL;
-        struct dentry *tail_dentry;
-        struct file *tail_filp, *first_filp, *second_filp;
-        struct ll_lock_tree first_tree, second_tree;
-        struct ll_lock_tree_node *first_node, *second_node;
-        struct ll_inode_info *hlli = ll_i2info(head), *tlli;
-        int rc = 0, cleanup_phase = 0;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:head=%lu/%u(%p) tail %s\n",
-               head->i_ino, head->i_generation, head, filename_tail);
-
-        tail_filp = filp_open(filename_tail, O_WRONLY, 0644);
-        if (IS_ERR(tail_filp)) {
-                CERROR("Can not open tail file %s", filename_tail);
-                rc = PTR_ERR(tail_filp);
-                GOTO(cleanup, rc);
-        }
-        tail = igrab(tail_filp->f_dentry->d_inode);
-
-        tlli = ll_i2info(tail);
-        tail_dentry = tail_filp->f_dentry;
-        LASSERT(tail_dentry);
-        cleanup_phase = 1;
-
-        /*reorder the inode for lock sequence*/
-        first = head->i_ino > tail->i_ino ? head : tail;
-        second = head->i_ino > tail->i_ino ? tail : head;
-        first_filp = head->i_ino > tail->i_ino ? filp : tail_filp;
-        second_filp = head->i_ino > tail->i_ino ? tail_filp : filp;
-
-        CDEBUG(D_INFO, "reorder object from %lu:%lu to %lu:%lu \n",
-               head->i_ino, tail->i_ino, first->i_ino, second->i_ino);
-        first_node = ll_node_from_inode(first, 0, OBD_OBJECT_EOF, LCK_EX);
-        if (IS_ERR(first_node)){
-                rc = PTR_ERR(first_node);
-                GOTO(cleanup, rc);
-        }
-        first_tree.lt_fd = first_filp->private_data;
-        rc = ll_tree_lock(&first_tree, first_node, NULL, 0, 0);
-        if (rc != 0)
-                GOTO(cleanup, rc);
-        cleanup_phase = 2;
-
-        second_node = ll_node_from_inode(second, 0, OBD_OBJECT_EOF, LCK_EX);
-        if (IS_ERR(second_node)){
-                rc = PTR_ERR(second_node);
-                GOTO(cleanup, rc);
-        }
-        second_tree.lt_fd = second_filp->private_data;
-        rc = ll_tree_lock(&second_tree, second_node, NULL, 0, 0);
-        if (rc != 0)
-                GOTO(cleanup, rc);
-        cleanup_phase = 3;
-
-        rc = join_sanity_check(head, tail);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = join_file(head, filp, tail_filp);
-        if (rc)
-                GOTO(cleanup, rc);
-cleanup:
-        switch (cleanup_phase) {
-        case 3:
-                ll_tree_unlock(&second_tree);
-                obd_cancel_unused(ll_i2obdexp(second),
-                                  ll_i2info(second)->lli_smd, 0, NULL);
-        case 2:
-                ll_tree_unlock(&first_tree);
-                obd_cancel_unused(ll_i2obdexp(first),
-                                  ll_i2info(first)->lli_smd, 0, NULL);
-        case 1:
-                filp_close(tail_filp, 0);
-                if (tail)
-                        iput(tail);
-                if (head && rc == 0) {
-                        obd_free_memmd(ll_i2sbi(head)->ll_osc_exp,
-                                       &hlli->lli_smd);
-                        hlli->lli_smd = NULL;
-                }
-        case 0:
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        RETURN(rc);
-}
-
-int ll_release_openhandle(struct dentry *dentry, struct lookup_intent *it)
-{
-        struct inode *inode = dentry->d_inode;
-        struct obd_client_handle *och;
-        int rc;
-        ENTRY;
-
-        LASSERT(inode);
-
-        /* Root ? Do nothing. */
-        if (dentry->d_inode->i_sb->s_root == dentry)
-                RETURN(0);
-
-        /* No open handle to close? Move away */
-        if (!it_disposition(it, DISP_OPEN_OPEN))
-                RETURN(0);
-
-        LASSERT(it_open_error(DISP_OPEN_OPEN, it) == 0);
-
-        OBD_ALLOC(och, sizeof(*och));
-        if (!och)
-                GOTO(out, rc = -ENOMEM);
-
-        ll_och_fill(ll_i2info(inode), it, och);
-
-        rc = ll_close_inode_openhandle(inode, och);
-
-        OBD_FREE(och, sizeof(*och));
- out:
-        /* this one is in place of ll_file_open */
-        ptlrpc_req_finished(it->d.lustre.it_data);
-        it_clear_disposition(it, DISP_ENQ_OPEN_REF);
-        RETURN(rc);
-}
-
-int ll_file_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-                  unsigned long arg)
-{
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
-        int flags;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),cmd=%x\n", inode->i_ino,
-               inode->i_generation, inode, cmd);
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_IOCTL, 1);
-
-        /* asm-ppc{,64} declares TCGETS, et. al. as type 't' not 'T' */
-        if (_IOC_TYPE(cmd) == 'T' || _IOC_TYPE(cmd) == 't') /* tty ioctls */
-                RETURN(-ENOTTY);
-
-        switch(cmd) {
-        case LL_IOC_GETFLAGS:
-                /* Get the current value of the file flags */
-                return put_user(fd->fd_flags, (int *)arg);
-        case LL_IOC_SETFLAGS:
-        case LL_IOC_CLRFLAGS:
-                /* Set or clear specific file flags */
-                /* XXX This probably needs checks to ensure the flags are
-                 *     not abused, and to handle any flag side effects.
-                 */
-                if (get_user(flags, (int *) arg))
-                        RETURN(-EFAULT);
-
-                if (cmd == LL_IOC_SETFLAGS) {
-                        if ((flags & LL_FILE_IGNORE_LOCK) &&
-                            !(file->f_flags & O_DIRECT)) {
-                                CERROR("%s: unable to disable locking on "
-                                       "non-O_DIRECT file\n", current->comm);
-                                RETURN(-EINVAL);
-                        }
-
-                        fd->fd_flags |= flags;
-                } else {
-                        fd->fd_flags &= ~flags;
-                }
-                RETURN(0);
-        case LL_IOC_LOV_SETSTRIPE:
-                RETURN(ll_lov_setstripe(inode, file, arg));
-        case LL_IOC_LOV_SETEA:
-                RETURN(ll_lov_setea(inode, file, arg));
-        case LL_IOC_LOV_GETSTRIPE:
-                RETURN(ll_lov_getstripe(inode, arg));
-        case LL_IOC_RECREATE_OBJ:
-                RETURN(ll_lov_recreate_obj(inode, file, arg));
-        case EXT3_IOC_GETFLAGS:
-        case EXT3_IOC_SETFLAGS:
-                RETURN(ll_iocontrol(inode, file, cmd, arg));
-        case EXT3_IOC_GETVERSION_OLD:
-        case EXT3_IOC_GETVERSION:
-                RETURN(put_user(inode->i_generation, (int *)arg));
-        case LL_IOC_JOIN: {
-                char *ftail;
-                int rc;
-
-                ftail = getname((const char *)arg);
-                if (IS_ERR(ftail))
-                        RETURN(PTR_ERR(ftail));
-                rc = ll_file_join(inode, file, ftail);
-                putname(ftail);
-                RETURN(rc);
-        }
-        case LL_IOC_GROUP_LOCK:
-                RETURN(ll_get_grouplock(inode, file, arg));
-        case LL_IOC_GROUP_UNLOCK:
-                RETURN(ll_put_grouplock(inode, file, arg));
-        case IOC_OBD_STATFS:
-                RETURN(ll_obd_statfs(inode, (void *)arg));
-        case OBD_IOC_GETNAME_OLD:
-        case OBD_IOC_GETNAME: {
-                struct obd_device *obd =
-                        class_exp2obd(ll_i2sbi(inode)->ll_osc_exp);
-                if (!obd)
-                        RETURN(-EFAULT);
-                if (copy_to_user((void *)arg, obd->obd_name,
-                                strlen(obd->obd_name) + 1))
-                        RETURN (-EFAULT);
-                RETURN(0);
-        }
-
-        /* We need to special case any other ioctls we want to handle,
-         * to send them to the MDS/OST as appropriate and to properly
-         * network encode the arg field.
-        case EXT3_IOC_SETVERSION_OLD:
-        case EXT3_IOC_SETVERSION:
-        */
-        default: {
-                int err;
-
-                if (LLIOC_STOP == 
-                    ll_iocontrol_call(inode, file, cmd, arg, &err))
-                        RETURN(err);
-
-                RETURN(obd_iocontrol(cmd, ll_i2obdexp(inode), 0, NULL,
-                                     (void *)arg));
-        }
-        }
-}
-
-loff_t ll_file_seek(struct file *file, loff_t offset, int origin)
-{
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        loff_t retval;
-        ENTRY;
-        retval = offset + ((origin == 2) ? i_size_read(inode) :
-                           (origin == 1) ? file->f_pos : 0);
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), to=%Lu=%#Lx(%s)\n",
-               inode->i_ino, inode->i_generation, inode, retval, retval,
-               origin == 2 ? "SEEK_END": origin == 1 ? "SEEK_CUR" : "SEEK_SET");
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LLSEEK, 1);
-
-        if (origin == 2) { /* SEEK_END */
-                int nonblock = 0, rc;
-
-                if (file->f_flags & O_NONBLOCK)
-                        nonblock = LDLM_FL_BLOCK_NOWAIT;
-
-                if (lsm != NULL) {
-                        rc = ll_glimpse_size(inode, nonblock);
-                        if (rc != 0)
-                                RETURN(rc);
-                }
-
-                ll_inode_size_lock(inode, 0);
-                offset += i_size_read(inode);
-                ll_inode_size_unlock(inode, 0);
-        } else if (origin == 1) { /* SEEK_CUR */
-                offset += file->f_pos;
-        }
-
-        retval = -EINVAL;
-        if (offset >= 0 && offset <= ll_file_maxbytes(inode)) {
-                if (offset != file->f_pos) {
-                        file->f_pos = offset;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-                        file->f_reada = 0;
-                        file->f_version = ++event;
-#else
-                        file->f_version = 0;
-#endif
-                }
-                retval = offset;
-        }
-
-        RETURN(retval);
-}
-
-int ll_fsync(struct file *file, struct dentry *dentry, int data)
-{
-        struct inode *inode = dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct ll_fid fid;
-        struct ptlrpc_request *req;
-        int rc, err;
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
-               inode->i_generation, inode);
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FSYNC, 1);
-
-        /* fsync's caller has already called _fdata{sync,write}, we want
-         * that IO to finish before calling the osc and mdc sync methods */
-        rc = filemap_fdatawait(inode->i_mapping);
-
-        /* catch async errors that were recorded back when async writeback
-         * failed for pages in this mapping. */
-        err = lli->lli_async_rc;
-        lli->lli_async_rc = 0;
-        if (rc == 0)
-                rc = err;
-        if (lsm) {
-                err = lov_test_and_clear_async_rc(lsm);
-                if (rc == 0)
-                        rc = err;
-        }
-
-        ll_inode2fid(&fid, inode);
-        err = mdc_sync(ll_i2sbi(inode)->ll_mdc_exp, &fid, &req);
-        if (!rc)
-                rc = err;
-        if (!err)
-                ptlrpc_req_finished(req);
-
-        if (data && lsm) {
-                struct obdo *oa;
-
-                OBDO_ALLOC(oa);
-                if (!oa)
-                        RETURN(rc ? rc : -ENOMEM);
-
-                oa->o_id = lsm->lsm_object_id;
-                oa->o_valid = OBD_MD_FLID;
-                obdo_from_inode(oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
-                                           OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-
-                err = obd_sync(ll_i2sbi(inode)->ll_osc_exp, oa, lsm,
-                               0, OBD_OBJECT_EOF);
-                if (!rc)
-                        rc = err;
-                OBDO_FREE(oa);
-        }
-
-        RETURN(rc);
-}
-
-int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
-{
-        struct inode *inode = file->f_dentry->d_inode;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ldlm_res_id res_id =
-                    { .name = {inode->i_ino, inode->i_generation, LDLM_FLOCK} };
-        struct ldlm_enqueue_info einfo = { LDLM_FLOCK, 0, NULL,
-                ldlm_flock_completion_ast, NULL, file_lock };
-        struct lustre_handle lockh = {0};
-        ldlm_policy_data_t flock;
-        int flags = 0;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu file_lock=%p\n",
-               inode->i_ino, file_lock);
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FLOCK, 1);
-
-        if (file_lock->fl_flags & FL_FLOCK) {
-                LASSERT((cmd == F_SETLKW) || (cmd == F_SETLK));
-                /* set missing params for flock() calls */
-                file_lock->fl_end = OFFSET_MAX;
-                file_lock->fl_pid = current->tgid;
-        }
-        flock.l_flock.pid = file_lock->fl_pid;
-        flock.l_flock.start = file_lock->fl_start;
-        flock.l_flock.end = file_lock->fl_end;
-
-        switch (file_lock->fl_type) {
-        case F_RDLCK:
-                einfo.ei_mode = LCK_PR;
-                break;
-        case F_UNLCK:
-                /* An unlock request may or may not have any relation to
-                 * existing locks so we may not be able to pass a lock handle
-                 * via a normal ldlm_lock_cancel() request. The request may even
-                 * unlock a byte range in the middle of an existing lock. In
-                 * order to process an unlock request we need all of the same
-                 * information that is given with a normal read or write record
-                 * lock request. To avoid creating another ldlm unlock (cancel)
-                 * message we'll treat a LCK_NL flock request as an unlock. */
-                einfo.ei_mode = LCK_NL;
-                break;
-        case F_WRLCK:
-                einfo.ei_mode = LCK_PW;
-                break;
-        default:
-                CERROR("unknown fcntl lock type: %d\n", file_lock->fl_type);
-                LBUG();
-        }
-
-        switch (cmd) {
-        case F_SETLKW:
-#ifdef F_SETLKW64
-        case F_SETLKW64:
-#endif
-                flags = 0;
-                break;
-        case F_SETLK:
-#ifdef F_SETLK64
-        case F_SETLK64:
-#endif
-                flags = LDLM_FL_BLOCK_NOWAIT;
-                break;
-        case F_GETLK:
-#ifdef F_GETLK64
-        case F_GETLK64:
-#endif
-                flags = LDLM_FL_TEST_LOCK;
-                /* Save the old mode so that if the mode in the lock changes we
-                 * can decrement the appropriate reader or writer refcount. */
-                file_lock->fl_type = einfo.ei_mode;
-                break;
-        default:
-                CERROR("unknown fcntl lock command: %d\n", cmd);
-                LBUG();
-        }
-
-        CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, "
-               "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid,
-               flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
-
-        rc = ldlm_cli_enqueue(sbi->ll_mdc_exp, NULL, &einfo, res_id,
-                              &flock, &flags, NULL, 0, NULL, &lockh, 0);
-        if ((file_lock->fl_flags & FL_FLOCK) && (rc == 0))
-                ll_flock_lock_file_wait(file, file_lock, (cmd == F_SETLKW));
-#ifdef HAVE_F_OP_FLOCK
-        if ((file_lock->fl_flags & FL_POSIX) && (rc == 0) &&
-            !(flags & LDLM_FL_TEST_LOCK))
-                posix_lock_file_wait(file, file_lock);
-#endif
-
-        RETURN(rc);
-}
-
-int ll_file_noflock(struct file *file, int cmd, struct file_lock *file_lock)
-{
-        ENTRY;
-
-        RETURN(-ENOSYS);
-}
-
-int ll_have_md_lock(struct inode *inode, __u64 bits)
-{
-        struct lustre_handle lockh;
-        struct ldlm_res_id res_id = { .name = {0} };
-        struct obd_device *obddev;
-        ldlm_policy_data_t policy = { .l_inodebits = {bits}};
-        int flags;
-        ENTRY;
-
-        if (!inode)
-               RETURN(0);
-
-        obddev = ll_i2mdcexp(inode)->exp_obd;
-        res_id.name[0] = inode->i_ino;
-        res_id.name[1] = inode->i_generation;
-
-        CDEBUG(D_INFO, "trying to match res "LPU64"\n", res_id.name[0]);
-
-        flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_CBPENDING | LDLM_FL_TEST_LOCK;
-        if (ldlm_lock_match(obddev->obd_namespace, flags, &res_id, LDLM_IBITS,
-                            &policy, LCK_CR|LCK_CW|LCK_PR|LCK_PW, &lockh)) {
-                RETURN(1);
-        }
-
-        RETURN(0);
-}
-
-static int ll_inode_revalidate_fini(struct inode *inode, int rc) {
-        if (rc == -ENOENT) { /* Already unlinked. Just update nlink
-                              * and return success */
-                inode->i_nlink = 0;
-                /* This path cannot be hit for regular files unless in
-                 * case of obscure races, so no need to to validate
-                 * size. */
-                if (!S_ISREG(inode->i_mode) &&
-                    !S_ISDIR(inode->i_mode))
-                        return 0;
-        }
-
-        if (rc) {
-                CERROR("failure %d inode %lu\n", rc, inode->i_ino);
-                return -abs(rc);
-
-        }
-
-        return 0;
-}
-
-int ll_inode_revalidate_it(struct dentry *dentry, struct lookup_intent *it)
-{
-        struct inode *inode = dentry->d_inode;
-        struct ptlrpc_request *req = NULL;
-        struct obd_export *exp;
-        int rc;
-        ENTRY;
-
-        if (!inode) {
-                CERROR("REPORT THIS LINE TO PETER\n");
-                RETURN(0);
-        }
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),name=%s\n",
-               inode->i_ino, inode->i_generation, inode, dentry->d_name.name);
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,0))
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REVALIDATE, 1);
-#endif
-
-        exp = ll_i2mdcexp(inode);
-
-        if (exp->exp_connect_flags & OBD_CONNECT_ATTRFID) {
-                struct lookup_intent oit = { .it_op = IT_GETATTR };
-                struct mdc_op_data op_data;
-
-                /* Call getattr by fid, so do not provide name at all. */
-                ll_prepare_mdc_op_data(&op_data, dentry->d_parent->d_inode,
-                                       dentry->d_inode, NULL, 0, 0, NULL);
-                rc = mdc_intent_lock(exp, &op_data, NULL, 0,
-                                     /* we are not interested in name
-                                        based lookup */
-                                     &oit, 0, &req,
-                                     ll_mdc_blocking_ast, 0);
-                if (rc < 0) {
-                        rc = ll_inode_revalidate_fini(inode, rc);
-                        GOTO (out, rc);
-                }
-                
-                rc = revalidate_it_finish(req, DLM_REPLY_REC_OFF, &oit, dentry);
-                if (rc != 0) {
-                        ll_intent_release(&oit);
-                        GOTO(out, rc);
-                }
-
-                /* Unlinked? Unhash dentry, so it is not picked up later by
-                   do_lookup() -> ll_revalidate_it(). We cannot use d_drop
-                   here to preserve get_cwd functionality on 2.6.
-                   Bug 10503 */
-                if (!dentry->d_inode->i_nlink) {
-                        spin_lock(&dcache_lock);
-                        ll_drop_dentry(dentry);
-                        spin_unlock(&dcache_lock);
-                }
-
-                ll_lookup_finish_locks(&oit, dentry);
-        } else if (!ll_have_md_lock(dentry->d_inode,
-                                  MDS_INODELOCK_UPDATE|MDS_INODELOCK_LOOKUP)) {
-                struct ll_sb_info *sbi = ll_i2sbi(dentry->d_inode);
-                struct ll_fid fid;
-                obd_valid valid = OBD_MD_FLGETATTR;
-                int ealen = 0;
-
-                if (S_ISREG(inode->i_mode)) {
-                        rc = ll_get_max_mdsize(sbi, &ealen);
-                        if (rc) 
-                                RETURN(rc); 
-                        valid |= OBD_MD_FLEASIZE | OBD_MD_FLMODEASIZE;
-                }
-                ll_inode2fid(&fid, inode);
-                rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, ealen, &req);
-                if (rc) {
-                        rc = ll_inode_revalidate_fini(inode, rc);
-                        RETURN(rc);
-                }
-
-                rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, REPLY_REC_OFF,
-                                   NULL);
-                if (rc)
-                        GOTO(out, rc);
-        }
-
-        /* if object not yet allocated, don't validate size */
-        if (ll_i2info(inode)->lli_smd == NULL) 
-                GOTO(out, rc = 0);
-
-        /* ll_glimpse_size will prefer locally cached writes if they extend
-         * the file */
-        rc = ll_glimpse_size(inode, 0);
-
-out:
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-int ll_getattr_it(struct vfsmount *mnt, struct dentry *de,
-                  struct lookup_intent *it, struct kstat *stat)
-{
-        struct inode *inode = de->d_inode;
-        int res = 0;
-
-        res = ll_inode_revalidate_it(de, it);
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETATTR, 1);
-
-        if (res)
-                return res;
-
-        stat->dev = inode->i_sb->s_dev;
-        stat->ino = inode->i_ino;
-        stat->mode = inode->i_mode;
-        stat->nlink = inode->i_nlink;
-        stat->uid = inode->i_uid;
-        stat->gid = inode->i_gid;
-        stat->rdev = kdev_t_to_nr(inode->i_rdev);
-        stat->atime = inode->i_atime;
-        stat->mtime = inode->i_mtime;
-        stat->ctime = inode->i_ctime;
-#ifdef HAVE_INODE_BLKSIZE
-        stat->blksize = inode->i_blksize;
-#else
-        stat->blksize = 1<<inode->i_blkbits;
-#endif
-
-        ll_inode_size_lock(inode, 0);
-        stat->size = i_size_read(inode);
-        stat->blocks = inode->i_blocks;
-        ll_inode_size_unlock(inode, 0);
-
-        return 0;
-}
-int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
-{
-        struct lookup_intent it = { .it_op = IT_GETATTR };
-
-        return ll_getattr_it(mnt, de, &it, stat);
-}
-#endif
-
-static
-int lustre_check_acl(struct inode *inode, int mask)
-{
-#ifdef CONFIG_FS_POSIX_ACL
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct posix_acl *acl;
-        int rc;
-        ENTRY;
-
-        spin_lock(&lli->lli_lock);
-        acl = posix_acl_dup(lli->lli_posix_acl);
-        spin_unlock(&lli->lli_lock);
-
-        if (!acl)
-                RETURN(-EAGAIN);
-
-        rc = posix_acl_permission(inode, acl, mask);
-        posix_acl_release(acl);
-
-        RETURN(rc);
-#else
-        return -EAGAIN;
-#endif
-}
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,10))
-int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd)
-{
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), mask %o\n",
-               inode->i_ino, inode->i_generation, inode, mask);
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1);
-        return generic_permission(inode, mask, lustre_check_acl);
-}
-#else
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
-int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd)
-#else
-int ll_inode_permission(struct inode *inode, int mask)
-#endif
-{
-        int mode = inode->i_mode;
-        int rc;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), mask %o\n",
-               inode->i_ino, inode->i_generation, inode, mask);
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1);
-
-        if ((mask & MAY_WRITE) && IS_RDONLY(inode) &&
-            (S_ISREG(mode) || S_ISDIR(mode) || S_ISLNK(mode)))
-                return -EROFS;
-        if ((mask & MAY_WRITE) && IS_IMMUTABLE(inode))
-                return -EACCES;
-        if (current->fsuid == inode->i_uid) {
-                mode >>= 6;
-        } else if (1) {
-                if (((mode >> 3) & mask & S_IRWXO) != mask)
-                        goto check_groups;
-                rc = lustre_check_acl(inode, mask);
-                if (rc == -EAGAIN)
-                        goto check_groups;
-                if (rc == -EACCES)
-                        goto check_capabilities;
-                return rc;
-        } else {
-check_groups:
-                if (in_group_p(inode->i_gid))
-                        mode >>= 3;
-        }
-        if ((mode & mask & S_IRWXO) == mask)
-                return 0;
-
-check_capabilities:
-        if (!(mask & MAY_EXEC) ||
-            (inode->i_mode & S_IXUGO) || S_ISDIR(inode->i_mode))
-                if (capable(CAP_DAC_OVERRIDE))
-                        return 0;
-
-        if (capable(CAP_DAC_READ_SEARCH) && ((mask == MAY_READ) ||
-            (S_ISDIR(inode->i_mode) && !(mask & MAY_WRITE))))
-                return 0;
-
-        return -EACCES;
-}
-#endif
-
-/* -o localflock - only provides locally consistent flock locks */
-struct file_operations ll_file_operations = {
-        .read           = ll_file_read,
-#ifdef HAVE_FILE_READV
-        .readv          = ll_file_readv,
-#else
-        .aio_read       = ll_file_aio_read,
-#endif
-        .write          = ll_file_write,
-#ifdef HAVE_FILE_WRITEV
-        .writev         = ll_file_writev,
-#else
-        .aio_write      = ll_file_aio_write,
-#endif
-        .ioctl          = ll_file_ioctl,
-        .open           = ll_file_open,
-        .release        = ll_file_release,
-        .mmap           = ll_file_mmap,
-        .llseek         = ll_file_seek,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        .sendfile       = ll_file_sendfile,
-#endif
-        .fsync          = ll_fsync,
-};
-
-struct file_operations ll_file_operations_flock = {
-        .read           = ll_file_read,
-#ifdef HAVE_FILE_READV
-        .readv          = ll_file_readv,
-#else
-        .aio_read       = ll_file_aio_read,
-#endif
-        .write          = ll_file_write,
-#ifdef HAVE_FILE_WRITEV
-        .writev         = ll_file_writev,
-#else   
-        .aio_write      = ll_file_aio_write,
-#endif
-        .ioctl          = ll_file_ioctl,
-        .open           = ll_file_open,
-        .release        = ll_file_release,
-        .mmap           = ll_file_mmap,
-        .llseek         = ll_file_seek,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        .sendfile       = ll_file_sendfile,
-#endif
-        .fsync          = ll_fsync,
-#ifdef HAVE_F_OP_FLOCK
-        .flock          = ll_file_flock,
-#endif
-        .lock           = ll_file_flock
-};
-
-/* These are for -o noflock - to return ENOSYS on flock calls */
-struct file_operations ll_file_operations_noflock = {
-        .read           = ll_file_read,
-#ifdef HAVE_FILE_READV
-        .readv          = ll_file_readv,
-#else
-        .aio_read       = ll_file_aio_read,
-#endif
-        .write          = ll_file_write,
-#ifdef HAVE_FILE_WRITEV
-        .writev         = ll_file_writev,
-#else   
-        .aio_write      = ll_file_aio_write,
-#endif
-        .ioctl          = ll_file_ioctl,
-        .open           = ll_file_open,
-        .release        = ll_file_release,
-        .mmap           = ll_file_mmap,
-        .llseek         = ll_file_seek,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        .sendfile       = ll_file_sendfile,
-#endif
-        .fsync          = ll_fsync,
-#ifdef HAVE_F_OP_FLOCK
-        .flock          = ll_file_noflock,
-#endif
-        .lock           = ll_file_noflock
-};
-
-struct inode_operations ll_file_inode_operations = {
-#ifdef HAVE_VFS_INTENT_PATCHES
-        .setattr_raw    = ll_setattr_raw,
-#endif
-        .setattr        = ll_setattr,
-        .truncate       = ll_truncate,
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        .getattr        = ll_getattr,
-#else
-        .revalidate_it  = ll_inode_revalidate_it,
-#endif
-        .permission     = ll_inode_permission,
-        .setxattr       = ll_setxattr,
-        .getxattr       = ll_getxattr,
-        .listxattr      = ll_listxattr,
-        .removexattr    = ll_removexattr,
-};
-
-/* dynamic ioctl number support routins */
-static struct llioc_ctl_data {
-        struct rw_semaphore ioc_sem;
-        struct list_head    ioc_head;
-} llioc = { 
-        __RWSEM_INITIALIZER(llioc.ioc_sem), 
-        CFS_LIST_HEAD_INIT(llioc.ioc_head)
-};
-
-
-struct llioc_data {
-        struct list_head        iocd_list;
-        unsigned int            iocd_size;
-        llioc_callback_t        iocd_cb;
-        unsigned int            iocd_count;
-        unsigned int            iocd_cmd[0];
-};
-
-void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd)
-{
-        unsigned int size;
-        struct llioc_data *in_data = NULL;
-        ENTRY;
-
-        if (cb == NULL || cmd == NULL ||
-            count > LLIOC_MAX_CMD || count < 0)
-                RETURN(NULL);
-
-        size = sizeof(*in_data) + count * sizeof(unsigned int);
-        OBD_ALLOC(in_data, size);
-        if (in_data == NULL)
-                RETURN(NULL);
-
-        memset(in_data, 0, sizeof(*in_data));
-        in_data->iocd_size = size;
-        in_data->iocd_cb = cb;
-        in_data->iocd_count = count;
-        memcpy(in_data->iocd_cmd, cmd, sizeof(unsigned int) * count);
-
-        down_write(&llioc.ioc_sem);
-        list_add_tail(&in_data->iocd_list, &llioc.ioc_head);
-        up_write(&llioc.ioc_sem);
-
-        RETURN(in_data);
-}
-
-void ll_iocontrol_unregister(void *magic)
-{
-        struct llioc_data *tmp;
-
-        if (magic == NULL)
-                return;
-
-        down_write(&llioc.ioc_sem);
-        list_for_each_entry(tmp, &llioc.ioc_head, iocd_list) {
-                if (tmp == magic) {
-                        unsigned int size = tmp->iocd_size;
-
-                        list_del(&tmp->iocd_list);
-                        up_write(&llioc.ioc_sem);
-
-                        OBD_FREE(tmp, size);
-                        return;
-                }
-        }
-        up_write(&llioc.ioc_sem);
-
-        CWARN("didn't find iocontrol register block with magic: %p\n", magic);
-}
-
-EXPORT_SYMBOL(ll_iocontrol_register);
-EXPORT_SYMBOL(ll_iocontrol_unregister);
-
-enum llioc_iter ll_iocontrol_call(struct inode *inode, struct file *file, 
-                        unsigned int cmd, unsigned long arg, int *rcp)
-{
-        enum llioc_iter ret = LLIOC_CONT;
-        struct llioc_data *data;
-        int rc = -EINVAL, i;
-
-        down_read(&llioc.ioc_sem);
-        list_for_each_entry(data, &llioc.ioc_head, iocd_list) {
-                for (i = 0; i < data->iocd_count; i++) {
-                        if (cmd != data->iocd_cmd[i]) 
-                                continue;
-
-                        ret = data->iocd_cb(inode, file, cmd, arg, data, &rc);
-                        break;
-                }
-
-                if (ret == LLIOC_STOP)
-                        break;
-        }
-        up_read(&llioc.ioc_sem);
-
-        if (rcp)
-                *rcp = rc;
-        return ret;
-}
diff --git a/lustre/llite/llite_close.c b/lustre/llite/llite_close.c
deleted file mode 100644
index d36f2d6f8e2377f7c42d88cf50a57fe39f3c2f3d..0000000000000000000000000000000000000000
--- a/lustre/llite/llite_close.c
+++ /dev/null
@@ -1,269 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Lite routines to issue a secondary close after writeback
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/module.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <lustre_lite.h>
-#include "llite_internal.h"
-
-#ifdef HAVE_CLOSE_THREAD
-/* record that a write is in flight */
-void llap_write_pending(struct inode *inode, struct ll_async_page *llap)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        spin_lock(&lli->lli_lock);
-        list_add(&llap->llap_pending_write, &lli->lli_pending_write_llaps);
-        spin_unlock(&lli->lli_lock);
-}
-
-/* record that a write has completed */
-void llap_write_complete(struct inode *inode, struct ll_async_page *llap)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        spin_lock(&lli->lli_lock);
-        list_del_init(&llap->llap_pending_write);
-        spin_unlock(&lli->lli_lock);
-}
-
-void ll_open_complete(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        spin_lock(&lli->lli_lock);
-        lli->lli_send_done_writing = 0;
-        spin_unlock(&lli->lli_lock);
-}
-
-/* if we close with writes in flight then we want the completion or cancelation
- * of those writes to send a DONE_WRITING rpc to the MDS */
-int ll_is_inode_dirty(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        int rc = 0;
-        ENTRY;
-
-        spin_lock(&lli->lli_lock);
-        if (!list_empty(&lli->lli_pending_write_llaps))
-                rc = 1;
-        spin_unlock(&lli->lli_lock);
-        RETURN(rc);
-}
-
-void ll_try_done_writing(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ll_close_queue *lcq = ll_i2sbi(inode)->ll_lcq;
-
-        spin_lock(&lli->lli_lock);
-
-        if (lli->lli_send_done_writing &&
-            list_empty(&lli->lli_pending_write_llaps)) {
-
-                spin_lock(&lcq->lcq_lock);
-                if (list_empty(&lli->lli_close_item)) {
-                        CDEBUG(D_INODE, "adding inode %lu/%u to close list\n",
-                               inode->i_ino, inode->i_generation);
-                        igrab(inode);
-                        list_add_tail(&lli->lli_close_item, &lcq->lcq_list);
-                        wake_up(&lcq->lcq_waitq);
-                }
-                spin_unlock(&lcq->lcq_lock);
-        }
-
-        spin_unlock(&lli->lli_lock);
-}
-
-/* The MDS needs us to get the real file attributes, then send a DONE_WRITING */
-void ll_queue_done_writing(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        ENTRY;
-
-        spin_lock(&lli->lli_lock);
-        lli->lli_send_done_writing = 1;
-        spin_unlock(&lli->lli_lock);
-
-        ll_try_done_writing(inode);
-        EXIT;
-}
-
-/* If we know the file size and have the cookies:
- *  - send a DONE_WRITING rpc
- *
- * Otherwise:
- *  - get a whole-file lock
- *  - get the authoritative size and all cookies with GETATTRs
- *  - send a DONE_WRITING rpc
- */
-static void ll_close_done_writing(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        ldlm_policy_data_t policy = { .l_extent = {0, OBD_OBJECT_EOF } };
-        struct lustre_handle lockh = { 0 };
-        struct obdo obdo;
-        obd_flag valid;
-        int rc, ast_flags = 0;
-        ENTRY;
-
-        memset(&obdo, 0, sizeof(obdo));
-        if (test_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags))
-                goto rpc;
-
-        rc = ll_extent_lock(NULL, inode, lli->lli_smd, LCK_PW, &policy, &lockh,
-                            ast_flags);
-        if (rc != 0) {
-                CERROR("lock acquisition failed (%d): unable to send "
-                       "DONE_WRITING for inode %lu/%u\n", rc, inode->i_ino,
-                       inode->i_generation);
-                GOTO(out, rc);
-        }
-
-        rc = ll_lsm_getattr(ll_i2obdexp(inode), lli->lli_smd, &obdo);
-        if (rc) {
-                CERROR("inode_getattr failed (%d): unable to send DONE_WRITING "
-                       "for inode %lu/%u\n", rc, inode->i_ino,
-                       inode->i_generation);
-                ll_extent_unlock(NULL, inode, lli->lli_smd, LCK_PW, &lockh);
-                GOTO(out, rc);
-        }
-
-        obdo_refresh_inode(inode, &obdo, valid);
-
-        CDEBUG(D_INODE, "objid "LPX64" size %Lu, blocks %lu, blksize %lu\n",
-               lli->lli_smd->lsm_object_id, i_size_read(inode), inode->i_blocks,
-               1<<inode->i_blkbits);
-
-        set_bit(LLI_F_HAVE_OST_SIZE_LOCK, &lli->lli_flags);
-
-        rc = ll_extent_unlock(NULL, inode, lli->lli_smd, LCK_PW, &lockh);
-        if (rc != ELDLM_OK)
-                CERROR("unlock failed (%d)?  proceeding anyways...\n", rc);
-
- rpc:
-        obdo.o_id = inode->i_ino;
-        obdo.o_size = i_size_read(inode);
-        obdo.o_blocks = inode->i_blocks;
-        obdo.o_valid = OBD_MD_FLID | OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
-
-        rc = mdc_done_writing(ll_i2sbi(inode)->ll_mdc_exp, &obdo);
- out:
-}
-
-
-static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq)
-{
-        struct ll_inode_info *lli = NULL;
-
-        spin_lock(&lcq->lcq_lock);
-
-        if (lcq->lcq_list.next == NULL)
-                lli = ERR_PTR(-1);
-        else if (!list_empty(&lcq->lcq_list)) {
-                lli = list_entry(lcq->lcq_list.next, struct ll_inode_info,
-                                 lli_close_item);
-                list_del(&lli->lli_close_item);
-        }
-
-        spin_unlock(&lcq->lcq_lock);
-        return lli;
-}
-#else
-static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq)
-{
-        if (lcq->lcq_list.next == NULL)
-                return ERR_PTR(-1);
-
-	return NULL;
-}
-#endif
-
-static int ll_close_thread(void *arg)
-{
-        struct ll_close_queue *lcq = arg;
-        ENTRY;
-
-        {
-                char name[CFS_CURPROC_COMM_MAX];
-                snprintf(name, sizeof(name) - 1, "ll_close");
-                cfs_daemonize(name);
-        }
-        
-        complete(&lcq->lcq_comp);
-
-        while (1) {
-                struct l_wait_info lwi = { 0 };
-                struct ll_inode_info *lli;
-                //struct inode *inode;
-
-                l_wait_event_exclusive(lcq->lcq_waitq,
-                                       (lli = ll_close_next_lli(lcq)) != NULL,
-                                       &lwi);
-                if (IS_ERR(lli))
-                        break;
-
-                //inode = ll_info2i(lli);
-                //ll_close_done_writing(inode);
-                //iput(inode);
-        }
-
-        complete(&lcq->lcq_comp);
-        RETURN(0);
-}
-
-int ll_close_thread_start(struct ll_close_queue **lcq_ret)
-{
-        struct ll_close_queue *lcq;
-        pid_t pid;
-
-        OBD_FAIL_RETURN(OBD_FAIL_LDLM_CLOSE_THREAD, -EINTR);
-        OBD_ALLOC(lcq, sizeof(*lcq));
-        if (lcq == NULL)
-                return -ENOMEM;
-
-        spin_lock_init(&lcq->lcq_lock);
-        INIT_LIST_HEAD(&lcq->lcq_list);
-        init_waitqueue_head(&lcq->lcq_waitq);
-        init_completion(&lcq->lcq_comp);
-
-        pid = kernel_thread(ll_close_thread, lcq, 0);
-        if (pid < 0) {
-                OBD_FREE(lcq, sizeof(*lcq));
-                return pid;
-        }
-
-        wait_for_completion(&lcq->lcq_comp);
-        *lcq_ret = lcq;
-        return 0;
-}
-
-void ll_close_thread_shutdown(struct ll_close_queue *lcq)
-{
-        init_completion(&lcq->lcq_comp);
-        lcq->lcq_list.next = NULL;
-        wake_up(&lcq->lcq_waitq);
-        wait_for_completion(&lcq->lcq_comp);
-        OBD_FREE(lcq, sizeof(*lcq));
-}
-
-
diff --git a/lustre/llite/llite_internal.h b/lustre/llite/llite_internal.h
deleted file mode 100644
index 3ae815a1bf94baf432b6b1f412f71b1864e2fe50..0000000000000000000000000000000000000000
--- a/lustre/llite/llite_internal.h
+++ /dev/null
@@ -1,944 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef LLITE_INTERNAL_H
-#define LLITE_INTERNAL_H
-
-#include <linux/ext2_fs.h>
-#ifdef CONFIG_FS_POSIX_ACL
-# include <linux/fs.h>
-#ifdef HAVE_XATTR_ACL
-# include <linux/xattr_acl.h>
-#endif
-#ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
-# include <linux/posix_acl_xattr.h>
-#endif
-#endif
-
-#include <lustre_debug.h>
-#include <lustre_ver.h>
-#include <linux/lustre_version.h>
-#include <lustre_disk.h>  /* for s2sbi */
- 
-/*
-struct lustre_intent_data {
-        __u64 it_lock_handle[2];
-        __u32 it_disposition;
-        __u32 it_status;
-        __u32 it_lock_mode;
-        }; */
-
-/* If there is no FMODE_EXEC defined, make it to match nothing */
-#ifndef FMODE_EXEC
-#define FMODE_EXEC 0
-#endif
-
-#define LL_IT2STR(it) ((it) ? ldlm_it2str((it)->it_op) : "0")
-#define LUSTRE_FPRIVATE(file) ((file)->private_data)
-
-#ifdef HAVE_VFS_INTENT_PATCHES
-static inline struct lookup_intent *ll_nd2it(struct nameidata *nd)
-{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        return &nd->intent;
-#else
-        return nd->intent;
-#endif
-}
-#endif
-
-struct ll_dentry_data {
-        int                      lld_cwd_count;
-        int                      lld_mnt_count;
-        struct obd_client_handle lld_cwd_och;
-        struct obd_client_handle lld_mnt_och;
-#ifndef HAVE_VFS_INTENT_PATCHES
-        struct lookup_intent    *lld_it;
-#endif
-        cfs_waitq_t              lld_waitq;
-};
-
-#define ll_d2d(de) ((struct ll_dentry_data*)((de)->d_fsdata))
-
-extern struct file_operations ll_pgcache_seq_fops;
-
-#define LLI_INODE_MAGIC                 0x111d0de5
-#define LLI_INODE_DEAD                  0xdeadd00d
-#define LLI_F_HAVE_OST_SIZE_LOCK        0
-#define LLI_F_HAVE_MDS_SIZE_LOCK        1
-#define LLI_F_CONTENDED                 2
-#define LLI_F_SRVLOCK                   3
-
-struct ll_inode_info {
-        int                     lli_inode_magic;
-        struct semaphore        lli_size_sem;           /* protect open and change size */
-        void                   *lli_size_sem_owner;
-        struct semaphore        lli_write_sem;
-        struct lov_stripe_md   *lli_smd;
-        char                   *lli_symlink_name;
-        __u64                   lli_maxbytes;
-        __u64                   lli_io_epoch;
-        unsigned long           lli_flags;
-        cfs_time_t              lli_contention_time;
-
-        /* this lock protects s_d_w and p_w_ll and mmap_cnt */
-        spinlock_t              lli_lock;
-#ifdef HAVE_CLOSE_THREAD
-        struct list_head        lli_pending_write_llaps;
-        struct list_head        lli_close_item;
-        int                     lli_send_done_writing;
-#endif
-        atomic_t                lli_mmap_cnt;
-
-        /* for writepage() only to communicate to fsync */
-        int                     lli_async_rc;
-
-        struct posix_acl       *lli_posix_acl;
-
-        struct list_head        lli_dead_list;
-
-        struct semaphore        lli_och_sem; /* Protects access to och pointers
-                                                and their usage counters */
-        /* We need all three because every inode may be opened in different
-           modes */
-        struct obd_client_handle *lli_mds_read_och;
-        __u64                   lli_open_fd_read_count;
-        struct obd_client_handle *lli_mds_write_och;
-        __u64                   lli_open_fd_write_count;
-        struct obd_client_handle *lli_mds_exec_och;
-        __u64                   lli_open_fd_exec_count;
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        struct inode            lli_vfs_inode;
-#endif
-
-        /* metadata stat-ahead */
-        /*
-         * "opendir_pid" is the token when lookup/revalid -- I am the owner of
-         * dir statahead.
-         */
-        pid_t                   lli_opendir_pid;
-        /* 
-         * since parent-child threads can share the same @file struct,
-         * "opendir_key" is the token when dir close for case of parent exit
-         * before child -- it is me should cleanup the dir readahead. */
-        void                   *lli_opendir_key;
-        struct ll_statahead_info *lli_sai;
-};
-
-/*
- * Locking to guarantee consistency of non-atomic updates to long long i_size,
- * consistency between file size and KMS, and consistency within
- * ->lli_smd->lsm_oinfo[]'s.
- *
- * Implemented by ->lli_size_sem and ->lsm_sem, nested in that order.
- */
-
-void ll_inode_size_lock(struct inode *inode, int lock_lsm);
-void ll_inode_size_unlock(struct inode *inode, int unlock_lsm);
-
-// FIXME: replace the name of this with LL_I to conform to kernel stuff
-// static inline struct ll_inode_info *LL_I(struct inode *inode)
-static inline struct ll_inode_info *ll_i2info(struct inode *inode)
-{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        return container_of(inode, struct ll_inode_info, lli_vfs_inode);
-#else
-        CLASSERT(sizeof(inode->u) >= sizeof(struct ll_inode_info));
-        return (struct ll_inode_info *)&(inode->u.generic_ip);
-#endif
-}
-
-/* default to about 40meg of readahead on a given system.  That much tied
- * up in 512k readahead requests serviced at 40ms each is about 1GB/s. */
-#define SBI_DEFAULT_READAHEAD_MAX (40UL << (20 - CFS_PAGE_SHIFT))
-
-/* default to read-ahead full files smaller than 2MB on the second read */
-#define SBI_DEFAULT_READAHEAD_WHOLE_MAX (2UL << (20 - CFS_PAGE_SHIFT))
-
-enum ra_stat {
-        RA_STAT_HIT = 0,
-        RA_STAT_MISS,
-        RA_STAT_DISTANT_READPAGE,
-        RA_STAT_MISS_IN_WINDOW,
-        RA_STAT_FAILED_GRAB_PAGE,
-        RA_STAT_FAILED_MATCH,
-        RA_STAT_DISCARDED,
-        RA_STAT_ZERO_LEN,
-        RA_STAT_ZERO_WINDOW,
-        RA_STAT_EOF,
-        RA_STAT_MAX_IN_FLIGHT,
-        RA_STAT_WRONG_GRAB_PAGE,
-        _NR_RA_STAT,
-};
-
-struct ll_ra_info {
-        unsigned long             ra_cur_pages;
-        unsigned long             ra_max_pages;
-        unsigned long             ra_max_read_ahead_whole_pages;
-        unsigned long             ra_stats[_NR_RA_STAT];
-};
-
-/* LL_HIST_MAX=32 causes an overflow */
-#define LL_HIST_MAX 28
-#define LL_HIST_START 12 /* buckets start at 2^12 = 4k */
-#define LL_PROCESS_HIST_MAX 10
-struct per_process_info {
-        pid_t pid;
-        struct obd_histogram pp_r_hist;
-        struct obd_histogram pp_w_hist;
-};
-
-/* pp_extents[LL_PROCESS_HIST_MAX] will hold the combined process info */
-struct ll_rw_extents_info {
-        struct per_process_info pp_extents[LL_PROCESS_HIST_MAX + 1];
-};
-
-#define LL_OFFSET_HIST_MAX 100
-struct ll_rw_process_info {
-        pid_t                     rw_pid;
-        int                       rw_op;
-        loff_t                    rw_range_start;
-        loff_t                    rw_range_end;
-        loff_t                    rw_last_file_pos;
-        loff_t                    rw_offset;
-        size_t                    rw_smallest_extent;
-        size_t                    rw_largest_extent;
-        struct file               *rw_last_file;
-};
-
-
-enum stats_track_type {
-        STATS_TRACK_ALL = 0,  /* track all processes */
-        STATS_TRACK_PID,      /* track process with this pid */
-        STATS_TRACK_PPID,     /* track processes with this ppid */
-        STATS_TRACK_GID,      /* track processes with this gid */
-        STATS_TRACK_LAST,
-};
-
-/* flags for sbi->ll_flags */
-#define LL_SBI_NOLCK            0x01 /* DLM locking disabled (directio-only) */
-#define LL_SBI_DATA_CHECKSUM    0x02 /* checksum each page on the wire */
-#define LL_SBI_FLOCK            0x04
-#define LL_SBI_USER_XATTR       0x08 /* support user xattr */
-#define LL_SBI_ACL              0x10 /* support ACL */
-#define LL_SBI_JOIN             0x20 /* support JOIN */
-#define LL_SBI_LOCALFLOCK       0x40 /* Local flocks support by kernel */
-#define LL_SBI_LRU_RESIZE       0x80 /* support lru resize */
-#define LL_SBI_LLITE_CHECKSUM  0x100 /* checksum each page in memory */
-
-/* default value for ll_sb_info->contention_time */
-#define SBI_DEFAULT_CONTENTION_SECONDS     60
-
-struct ll_sb_info {
-        struct list_head          ll_list;
-        /* this protects pglist and ra_info.  It isn't safe to
-         * grab from interrupt contexts */
-        spinlock_t                ll_lock;
-        spinlock_t                ll_pp_extent_lock; /* Lock for pp_extent entries */
-        spinlock_t                ll_process_lock; /* Lock for ll_rw_process_info */
-        struct obd_uuid           ll_sb_uuid;
-        struct obd_export        *ll_mdc_exp;
-        struct obd_export        *ll_osc_exp;
-        struct proc_dir_entry    *ll_proc_root;
-        obd_id                    ll_rootino; /* number of root inode */
-
-        int                       ll_flags;
-        struct list_head          ll_conn_chain; /* per-conn chain of SBs */
-        struct lustre_client_ocd  ll_lco;
-
-        struct list_head          ll_orphan_dentry_list; /*please don't ask -p*/
-        struct ll_close_queue    *ll_lcq;
-
-        struct lprocfs_stats     *ll_stats; /* lprocfs stats counter */
-
-        unsigned long             ll_async_page_max;
-        unsigned long             ll_async_page_count;
-        unsigned long             ll_pglist_gen;
-        struct list_head          ll_pglist; /* all pages (llap_pglist_item) */
-
-        unsigned                  ll_contention_time; /* seconds */
-
-        struct ll_ra_info         ll_ra_info;
-        unsigned int              ll_namelen;
-        struct file_operations   *ll_fop;
-
-#ifdef HAVE_EXPORT___IGET
-        struct list_head          ll_deathrow; /* inodes to be destroyed (b1443) */
-        spinlock_t                ll_deathrow_lock;
-#endif
-        /* =0 - hold lock over whole read/write
-         * >0 - max. chunk to be read/written w/o lock re-acquiring */
-        unsigned long             ll_max_rw_chunk;
-
-        /* Statistics */
-        struct ll_rw_extents_info ll_rw_extents_info;
-        int                       ll_extent_process_count;
-        struct ll_rw_process_info ll_rw_process_info[LL_PROCESS_HIST_MAX];
-        unsigned int              ll_offset_process_count;
-        struct ll_rw_process_info ll_rw_offset_info[LL_OFFSET_HIST_MAX];
-        unsigned int              ll_rw_offset_entry_count;
-        enum stats_track_type     ll_stats_track_type;
-        int                       ll_stats_track_id;
-        int                       ll_rw_stats_on;
-        dev_t                     ll_sdev_orig; /* save s_dev before assign for
-                                                 * clustred nfs */
-
-        /* metadata stat-ahead */
-        unsigned int              ll_sa_max;     /* max statahead RPCs */
-        unsigned int              ll_sa_wrong;   /* statahead thread stopped for
-                                                  * low hit ratio */
-        unsigned int              ll_sa_total;   /* statahead thread started
-                                                  * count */
-        unsigned long long        ll_sa_blocked; /* ls count waiting for
-                                                  * statahead */
-        unsigned long long        ll_sa_cached;  /* ls count got in cache */
-        unsigned long long        ll_sa_hit;     /* hit count */
-        unsigned long long        ll_sa_miss;    /* miss count */
-};
-
-#define LL_DEFAULT_MAX_RW_CHUNK         (32 * 1024 * 1024)
-
-struct ll_ra_read {
-        pgoff_t             lrr_start;
-        pgoff_t             lrr_count;
-        struct task_struct *lrr_reader;
-        struct list_head    lrr_linkage;
-};
-
-/*
- * per file-descriptor read-ahead data.
- */
-struct ll_readahead_state {
-        spinlock_t      ras_lock;
-        /*
-         * index of the last page that read(2) needed and that wasn't in the
-         * cache. Used by ras_update() to detect seeks.
-         *
-         * XXX nikita: if access seeks into cached region, Lustre doesn't see
-         * this.
-         */
-        unsigned long   ras_last_readpage;
-        /*
-         * number of pages read after last read-ahead window reset. As window
-         * is reset on each seek, this is effectively a number of consecutive
-         * accesses. Maybe ->ras_accessed_in_window is better name.
-         *
-         * XXX nikita: window is also reset (by ras_update()) when Lustre
-         * believes that memory pressure evicts read-ahead pages. In that
-         * case, it probably doesn't make sense to expand window to
-         * PTLRPC_MAX_BRW_PAGES on the third access.
-         */
-        unsigned long   ras_consecutive_pages;
-        /*
-         * number of read requests after the last read-ahead window reset
-         * As window is reset on each seek, this is effectively the number 
-         * on consecutive read request and is used to trigger read-ahead.
-         */
-        unsigned long   ras_consecutive_requests;
-        /*
-         * Parameters of current read-ahead window. Handled by
-         * ras_update(). On the initial access to the file or after a seek,
-         * window is reset to 0. After 3 consecutive accesses, window is
-         * expanded to PTLRPC_MAX_BRW_PAGES. Afterwards, window is enlarged by
-         * PTLRPC_MAX_BRW_PAGES chunks up to ->ra_max_pages.
-         */
-        unsigned long   ras_window_start, ras_window_len;
-        /*
-         * Where next read-ahead should start at. This lies within read-ahead
-         * window. Read-ahead window is read in pieces rather than at once
-         * because: 1. lustre limits total number of pages under read-ahead by
-         * ->ra_max_pages (see ll_ra_count_get()), 2. client cannot read pages
-         * not covered by DLM lock.
-         */
-        unsigned long   ras_next_readahead;
-        /*
-         * Total number of ll_file_read requests issued, reads originating
-         * due to mmap are not counted in this total.  This value is used to
-         * trigger full file read-ahead after multiple reads to a small file.
-         */
-        unsigned long   ras_requests;
-        /*
-         * Page index with respect to the current request, these value 
-         * will not be accurate when dealing with reads issued via mmap.
-         */
-        unsigned long   ras_request_index;
-        /*
-         * list of struct ll_ra_read's one per read(2) call current in
-         * progress against this file descriptor. Used by read-ahead code,
-         * protected by ->ras_lock.
-         */
-        struct list_head ras_read_beads;
-        /* 
-         * The following 3 items are used for detecting the stride I/O
-         * mode. 
- 	 * In stride I/O mode, 
-         * ...............|-----data-----|****gap*****|--------|******|.... 
-         *    offset      |-stride_pages-|-stride_gap-| 
-         * ras_stride_offset = offset;
-         * ras_stride_length = stride_pages + stride_gap;
-         * ras_stride_pages = stride_pages;
-         * Note: all these three items are counted by pages.
-         */
-        unsigned long ras_stride_length;
-        unsigned long ras_stride_pages;
-        pgoff_t ras_stride_offset;
-        /* 
-         * number of consecutive stride request count, and it is similar as
-         * ras_consecutive_requests, but used for stride I/O mode.
-         * Note: only more than 2 consecutive stride request are detected,
-         * stride read-ahead will be enable
-         */
-        unsigned long ras_consecutive_stride_requests;
-};
-
-extern cfs_mem_cache_t *ll_file_data_slab;
-struct lustre_handle;
-struct ll_file_data {
-        struct ll_readahead_state fd_ras;
-        int fd_omode;
-        struct lustre_handle fd_cwlockh;
-        unsigned long fd_gid;
-        __u32 fd_flags;
-};
-
-struct lov_stripe_md;
-
-extern spinlock_t inode_lock;
-
-extern struct proc_dir_entry *proc_lustre_fs_root;
-
-static inline struct inode *ll_info2i(struct ll_inode_info *lli)
-{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        return &lli->lli_vfs_inode;
-#else
-        return list_entry(lli, struct inode, u.generic_ip);
-#endif
-}
-
-struct it_cb_data {
-        struct inode *icbd_parent;
-        struct dentry **icbd_childp;
-        obd_id hash;
-};
-
-void ll_i2gids(__u32 *suppgids, struct inode *i1,struct inode *i2);
-
-#define LLAP_MAGIC 98764321
-
-extern cfs_mem_cache_t *ll_async_page_slab;
-extern size_t ll_async_page_slab_size;
-struct ll_async_page {
-        int              llap_magic;
-         /* only trust these if the page lock is providing exclusion */
-        unsigned int     llap_write_queued:1,
-                         llap_defer_uptodate:1,
-                         llap_origin:3,
-                         llap_ra_used:1,
-                         llap_ignore_quota:1,
-                         llap_nocache:1,
-                         llap_lockless_io_page:1;
-        void            *llap_cookie;
-        struct page     *llap_page;
-        struct list_head llap_pending_write;
-        struct list_head llap_pglist_item;
-        /* checksum for paranoid I/O debugging */
-        __u32 llap_checksum;
-};
-
-/*
- * enumeration of llap_from_page() call-sites. Used to export statistics in
- * /proc/fs/lustre/llite/fsN/dump_page_cache.
- */
-enum {
-        LLAP_ORIGIN_UNKNOWN = 0,
-        LLAP_ORIGIN_READPAGE,
-        LLAP_ORIGIN_READAHEAD,
-        LLAP_ORIGIN_COMMIT_WRITE,
-        LLAP_ORIGIN_WRITEPAGE,
-        LLAP_ORIGIN_REMOVEPAGE,
-        LLAP_ORIGIN_LOCKLESS_IO,
-        LLAP__ORIGIN_MAX,
-};
-extern char *llap_origins[];
-
-#ifdef HAVE_REGISTER_CACHE
-#define ll_register_cache(cache) register_cache(cache)
-#define ll_unregister_cache(cache) unregister_cache(cache)
-#else
-#define ll_register_cache(cache) do {} while (0)
-#define ll_unregister_cache(cache) do {} while (0)
-#endif
-
-void ll_ra_read_in(struct file *f, struct ll_ra_read *rar);
-void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar);
-struct ll_ra_read *ll_ra_read_get(struct file *f);
-
-/* llite/lproc_llite.c */
-#ifdef LPROCFS
-int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
-                                struct super_block *sb, char *osc, char *mdc);
-void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi);
-void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count);
-void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
-                        struct super_block *sb, char *osc, char *mdc){return 0;}
-static inline void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi) {}
-static void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) {}
-static void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-
-/* llite/dir.c */
-extern struct file_operations ll_dir_operations;
-extern struct inode_operations ll_dir_inode_operations;
-
-struct page *ll_get_dir_page(struct inode *dir, unsigned long n);
-/*
- * p is at least 6 bytes before the end of page
- */
-typedef struct ext2_dir_entry_2 ext2_dirent;
-
-static inline ext2_dirent *ext2_next_entry(ext2_dirent *p)
-{
-        return (ext2_dirent *)((char*)p + le16_to_cpu(p->rec_len));
-}
-
-static inline unsigned
-ext2_validate_entry(char *base, unsigned offset, unsigned mask)
-{
-        ext2_dirent *de = (ext2_dirent*)(base + offset);
-        ext2_dirent *p = (ext2_dirent*)(base + (offset&mask));
-        while ((char*)p < (char*)de)
-                p = ext2_next_entry(p);
-        return (char *)p - base;
-}
-
-static inline void ext2_put_page(struct page *page)
-{
-        kunmap(page);
-        page_cache_release(page);
-}
-
-static inline unsigned long dir_pages(struct inode *inode)
-{
-        return (inode->i_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-}
-
-/* llite/namei.c */
-int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir);
-struct inode *ll_iget(struct super_block *sb, ino_t hash,
-                      struct lustre_md *lic);
-int ll_mdc_cancel_unused(struct lustre_handle *, struct inode *, int flags,
-                         void *opaque);
-int ll_mdc_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
-                        void *data, int flag);
-int ll_prepare_mdc_op_data(struct mdc_op_data *,
-                           struct inode *i1, struct inode *i2,
-                           const char *name, int namelen, int mode, void *data);
-#ifndef HAVE_VFS_INTENT_PATCHES
-struct lookup_intent *ll_convert_intent(struct open_intent *oit,
-                                        int lookup_flags);
-#endif
-void ll_pin_extent_cb(void *data);
-int ll_page_removal_cb(void *data, int discard);
-int ll_extent_lock_cancel_cb(struct ldlm_lock *lock, struct ldlm_lock_desc *new,
-                             void *data, int flag);
-int lookup_it_finish(struct ptlrpc_request *request, int offset,
-                     struct lookup_intent *it, void *data);
-void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry);
-
-/* llite/rw.c */
-int ll_prepare_write(struct file *, struct page *, unsigned from, unsigned to);
-int ll_commit_write(struct file *, struct page *, unsigned from, unsigned to);
-int ll_writepage(struct page *page);
-void ll_inode_fill_obdo(struct inode *inode, int cmd, struct obdo *oa);
-int ll_ap_completion(void *data, int cmd, struct obdo *oa, int rc);
-int llap_shrink_cache(struct ll_sb_info *sbi, int shrink_fraction);
-extern struct cache_definition ll_cache_definition;
-void ll_removepage(struct page *page);
-int ll_readpage(struct file *file, struct page *page);
-struct ll_async_page *llap_cast_private(struct page *page);
-void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras);
-void ll_ra_accounting(struct ll_async_page *llap,struct address_space *mapping);
-void ll_truncate(struct inode *inode);
-int ll_file_punch(struct inode *, loff_t, int);
-ssize_t ll_file_lockless_io(struct file *, const struct iovec *,
-                            unsigned long, loff_t *, int, ssize_t);
-void ll_clear_file_contended(struct inode*);
-int ll_sync_page_range(struct inode *, struct address_space *, loff_t, size_t);
-
-/* llite/file.c */
-extern struct file_operations ll_file_operations;
-extern struct file_operations ll_file_operations_flock;
-extern struct file_operations ll_file_operations_noflock;
-extern struct inode_operations ll_file_inode_operations;
-extern int ll_inode_revalidate_it(struct dentry *, struct lookup_intent *);
-extern int ll_have_md_lock(struct inode *inode, __u64 bits);
-int ll_extent_lock(struct ll_file_data *, struct inode *,
-                   struct lov_stripe_md *, int mode, ldlm_policy_data_t *,
-                   struct lustre_handle *, int ast_flags);
-int ll_extent_unlock(struct ll_file_data *, struct inode *,
-                     struct lov_stripe_md *, int mode, struct lustre_handle *);
-int ll_file_open(struct inode *inode, struct file *file);
-int ll_file_release(struct inode *inode, struct file *file);
-int ll_lsm_getattr(struct obd_export *, struct lov_stripe_md *, struct obdo *);
-int ll_glimpse_ioctl(struct ll_sb_info *sbi, 
-                     struct lov_stripe_md *lsm, lstat_t *st);
-int ll_glimpse_size(struct inode *inode, int ast_flags);
-int ll_local_open(struct file *file,
-                  struct lookup_intent *it, struct ll_file_data *fd,
-                  struct obd_client_handle *och);
-int ll_release_openhandle(struct dentry *, struct lookup_intent *);
-int ll_mdc_close(struct obd_export *mdc_exp, struct inode *inode,
-                 struct file *file);
-int ll_mdc_real_close(struct inode *inode, int flags);
-extern void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, struct file
-                               *file, size_t count, int rw);
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-int ll_getattr_it(struct vfsmount *mnt, struct dentry *de,
-               struct lookup_intent *it, struct kstat *stat);
-int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat);
-#endif
-struct ll_file_data *ll_file_data_get(void);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
-int ll_inode_permission(struct inode *inode, int mask, struct nameidata *nd);
-#else
-int ll_inode_permission(struct inode *inode, int mask);
-#endif
-int ll_lov_setstripe_ea_info(struct inode *inode, struct file *file,
-                             int flags, struct lov_user_md *lum,
-                             int lum_size);
-int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
-                             struct lov_mds_md **lmm, int *lmm_size,
-                             struct ptlrpc_request **request);
-int ll_dir_setstripe(struct inode *inode, struct lov_user_md *lump,
-                     int set_default);
-int ll_dir_getstripe(struct inode *inode, struct lov_mds_md **lmm, 
-                     int *lmm_size, struct ptlrpc_request **request);
-
-/* llite/dcache.c */
-extern struct dentry_operations ll_init_d_ops;
-extern struct dentry_operations ll_d_ops;
-extern struct dentry_operations ll_fini_d_ops;
-void ll_intent_drop_lock(struct lookup_intent *);
-void ll_intent_release(struct lookup_intent *);
-extern void ll_set_dd(struct dentry *de);
-int ll_drop_dentry(struct dentry *dentry);
-void ll_unhash_aliases(struct inode *);
-void ll_frob_intent(struct lookup_intent **itp, struct lookup_intent *deft);
-void ll_lookup_finish_locks(struct lookup_intent *it, struct dentry *dentry);
-int ll_dcompare(struct dentry *parent, struct qstr *d_name, struct qstr *name);
-int revalidate_it_finish(struct ptlrpc_request *request, int offset,
-                         struct lookup_intent *it, struct dentry *de);
-
-/* llite/llite_lib.c */
-extern struct super_operations lustre_super_operations;
-
-char *ll_read_opt(const char *opt, char *data);
-void ll_lli_init(struct ll_inode_info *lli);
-int ll_fill_super(struct super_block *sb);
-void ll_put_super(struct super_block *sb);
-void ll_kill_super(struct super_block *sb);
-struct inode *ll_inode_from_lock(struct ldlm_lock *lock);
-void ll_clear_inode(struct inode *inode);
-int ll_setattr_raw(struct inode *inode, struct iattr *attr);
-int ll_setattr(struct dentry *de, struct iattr *attr);
-#ifndef HAVE_STATFS_DENTRY_PARAM
-int ll_statfs(struct super_block *sb, struct kstatfs *sfs);
-#else
-int ll_statfs(struct dentry *de, struct kstatfs *sfs);
-#endif
-int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
-                       __u64 max_age, __u32 flags);
-void ll_update_inode(struct inode *inode, struct lustre_md *md);
-void ll_read_inode2(struct inode *inode, void *opaque);
-int ll_iocontrol(struct inode *inode, struct file *file,
-                 unsigned int cmd, unsigned long arg);
-#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT
-void ll_umount_begin(struct vfsmount *vfsmnt, int flags);
-#else
-void ll_umount_begin(struct super_block *sb);
-#endif
-int ll_remount_fs(struct super_block *sb, int *flags, char *data);
-int ll_prep_inode(struct obd_export *exp, struct inode **inode,
-                  struct ptlrpc_request *req, int offset, struct super_block *);
-void lustre_dump_dentry(struct dentry *, int recur);
-void lustre_dump_inode(struct inode *);
-struct ll_async_page *llite_pglist_next_llap(struct ll_sb_info *sbi,
-                                             struct list_head *list);
-int ll_obd_statfs(struct inode *inode, void *arg);
-int ll_get_max_mdsize(struct ll_sb_info *sbi, int *max_mdsize);
-int ll_process_config(struct lustre_cfg *lcfg);
-
-/* llite/llite_nfs.c */
-extern struct export_operations lustre_export_operations;
-__u32 get_uuid2int(const char *name, int len);
-struct dentry *ll_fh_to_dentry(struct super_block *sb, __u32 *data, int len,
-                               int fhtype, int parent);
-int ll_dentry_to_fh(struct dentry *, __u32 *datap, int *lenp, int need_parent);
-
-/* llite/special.c */
-extern struct inode_operations ll_special_inode_operations;
-extern struct file_operations ll_special_chr_inode_fops;
-extern struct file_operations ll_special_chr_file_fops;
-extern struct file_operations ll_special_blk_inode_fops;
-extern struct file_operations ll_special_fifo_inode_fops;
-extern struct file_operations ll_special_fifo_file_fops;
-extern struct file_operations ll_special_sock_inode_fops;
-
-/* llite/symlink.c */
-extern struct inode_operations ll_fast_symlink_inode_operations;
-
-/* llite/llite_close.c */
-struct ll_close_queue {
-        spinlock_t              lcq_lock;
-        struct list_head        lcq_list;
-        wait_queue_head_t       lcq_waitq;
-        struct completion       lcq_comp;
-};
-
-#ifdef HAVE_CLOSE_THREAD
-void llap_write_pending(struct inode *inode, struct ll_async_page *llap);
-void llap_write_complete(struct inode *inode, struct ll_async_page *llap);
-void ll_open_complete(struct inode *inode);
-int ll_is_inode_dirty(struct inode *inode);
-void ll_try_done_writing(struct inode *inode);
-void ll_queue_done_writing(struct inode *inode);
-#else
-static inline void llap_write_pending(struct inode *inode,
-                                      struct ll_async_page *llap) { return; };
-static inline void llap_write_complete(struct inode *inode,
-                                       struct ll_async_page *llap) { return; };
-static inline void ll_open_complete(struct inode *inode) { return; };
-static inline int ll_is_inode_dirty(struct inode *inode) { return 0; };
-static inline void ll_try_done_writing(struct inode *inode) { return; };
-static inline void ll_queue_done_writing(struct inode *inode) { return; };
-//static inline void ll_close_thread_shutdown(struct ll_close_queue *lcq) { return; };
-//static inline int ll_close_thread_start(struct ll_close_queue **lcq_ret) { return 0; };
-#endif
-void ll_close_thread_shutdown(struct ll_close_queue *lcq);
-int ll_close_thread_start(struct ll_close_queue **lcq_ret);
-
-/* llite/llite_mmap.c */
-#if  (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-typedef struct rb_root  rb_root_t;
-typedef struct rb_node  rb_node_t;
-#endif
-
-struct ll_lock_tree_node;
-struct ll_lock_tree {
-        rb_root_t                       lt_root;
-        struct list_head                lt_locked_list;
-        struct ll_file_data             *lt_fd;
-};
-
-int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last);
-int ll_file_mmap(struct file * file, struct vm_area_struct * vma);
-struct ll_lock_tree_node * ll_node_from_inode(struct inode *inode, __u64 start,
-                                              __u64 end, ldlm_mode_t mode);
-int ll_tree_lock(struct ll_lock_tree *tree,
-                 struct ll_lock_tree_node *first_node,
-                 const char *buf, size_t count, int ast_flags);
-int ll_tree_lock_iov(struct ll_lock_tree *tree,
-                     struct ll_lock_tree_node *first_node,
-                     const struct iovec *iov, unsigned long nr_segs,
-                     int ast_flags);
-int ll_tree_unlock(struct ll_lock_tree *tree);
-
-#define    ll_s2sbi(sb)        (s2lsi(sb)->lsi_llsbi)
-
-#if  (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-static inline __u64 ll_ts2u64(struct timespec *time)
-{
-        __u64 t = time->tv_sec;
-        return t;
-}
-#else  /* 2.4 here */
-static inline __u64 ll_ts2u64(time_t *time)
-{
-        return *time;
-}
-#endif
-
-/* don't need an addref as the sb_info should be holding one */
-static inline struct obd_export *ll_s2obdexp(struct super_block *sb)
-{
-        return ll_s2sbi(sb)->ll_osc_exp;
-}
-
-/* don't need an addref as the sb_info should be holding one */
-static inline struct obd_export *ll_s2mdcexp(struct super_block *sb)
-{
-        return ll_s2sbi(sb)->ll_mdc_exp;
-}
-
-static inline struct client_obd *sbi2mdc(struct ll_sb_info *sbi)
-{
-        struct obd_device *obd = sbi->ll_mdc_exp->exp_obd;
-        if (obd == NULL)
-                LBUG();
-        return &obd->u.cli;
-}
-
-// FIXME: replace the name of this with LL_SB to conform to kernel stuff
-static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
-{
-        return ll_s2sbi(inode->i_sb);
-}
-
-static inline struct obd_export *ll_i2obdexp(struct inode *inode)
-{
-        return ll_s2obdexp(inode->i_sb);
-}
-
-static inline struct obd_export *ll_i2mdcexp(struct inode *inode)
-{
-        return ll_s2mdcexp(inode->i_sb);
-}
-
-static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode)
-{
-        mdc_pack_fid(fid, inode->i_ino, inode->i_generation,
-                     inode->i_mode & S_IFMT);
-}
-
-static inline int ll_mds_max_easize(struct super_block *sb)
-{
-        return sbi2mdc(ll_s2sbi(sb))->cl_max_mds_easize;
-}
-
-static inline __u64 ll_file_maxbytes(struct inode *inode)
-{
-        return ll_i2info(inode)->lli_maxbytes;
-}
-
-/* llite/xattr.c */
-int ll_setxattr(struct dentry *dentry, const char *name,
-                const void *value, size_t size, int flags);
-ssize_t ll_getxattr(struct dentry *dentry, const char *name,
-                    void *buffer, size_t size);
-ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size);
-int ll_removexattr(struct dentry *dentry, const char *name);
-
-/* statahead.c */
-
-#define LL_SA_RPC_MIN   2
-#define LL_SA_RPC_DEF   32
-#define LL_SA_RPC_MAX   8192
-
-/* per inode struct, for dir only */
-struct ll_statahead_info {
-        struct inode           *sai_inode;
-        unsigned int            sai_generation; /* generation for statahead */
-        atomic_t                sai_refcount;   /* when access this struct, hold
-                                                 * refcount */
-        unsigned int            sai_sent;       /* stat requests sent count */
-        unsigned int            sai_replied;    /* stat requests which received
-                                                 * reply */
-        unsigned int            sai_max;        /* max ahead of lookup */
-        unsigned int            sai_index;      /* index of statahead entry */
-        unsigned int            sai_hit;        /* hit count */
-        unsigned int            sai_miss;       /* miss count:
-                                                 * for "ls -al" case, it includes
-                                                 * hidden dentry miss;
-                                                 * for "ls -l" case, it does not
-                                                 * include hidden dentry miss.
-                                                 * "sai_miss_hidden" is used for
-                                                 * the later case.
-                                                 */
-        unsigned int            sai_consecutive_miss; /* consecutive miss */
-        unsigned int            sai_miss_hidden;/* "ls -al", but first dentry
-                                                 * is not a hidden one */
-        unsigned int            sai_skip_hidden;/* skipped hidden dentry count */
-        unsigned int            sai_ls_all:1;   /* "ls -al", do stat-ahead for
-                                                 * hidden entries */
-        cfs_waitq_t             sai_waitq;      /* stat-ahead wait queue */
-        struct ptlrpc_thread    sai_thread;     /* stat-ahead thread */
-        struct list_head        sai_entries;    /* stat-ahead entries */
-};
-
-int do_statahead_enter(struct inode *dir, struct dentry **dentry, int lookup);
-void ll_statahead_exit(struct dentry *dentry, int result);
-void ll_stop_statahead(struct inode *inode, void *key);
-
-static inline
-void ll_d_wakeup(struct dentry *dentry)
-{
-        struct ll_dentry_data *lld = ll_d2d(dentry);
-
-        LASSERT(dentry->d_op != &ll_init_d_ops);
-        if (lld != NULL)
-                cfs_waitq_broadcast(&lld->lld_waitq);
-}
-
-static inline
-int ll_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup)
-{
-        struct ll_sb_info        *sbi = ll_i2sbi(dir);
-        struct ll_inode_info     *lli = ll_i2info(dir);
-
-        if (sbi->ll_sa_max == 0)
-                return -ENOTSUPP;
-
-        /* not the same process, don't statahead */
-        if (lli->lli_opendir_pid != cfs_curproc_pid())
-                return -EBADF;
-
-        return do_statahead_enter(dir, dentryp, lookup);
-}
-
-/* llite ioctl register support rountine */
-#ifdef __KERNEL__
-enum llioc_iter {
-        LLIOC_CONT = 0,
-        LLIOC_STOP
-};
-
-#define LLIOC_MAX_CMD           256
-
-/*
- * Rules to write a callback function:
- *
- * Parameters:
- *  @magic: Dynamic ioctl call routine will feed this vaule with the pointer
- *      returned to ll_iocontrol_register.  Callback functions should use this
- *      data to check the potential collasion of ioctl cmd. If collasion is 
- *      found, callback function should return LLIOC_CONT.
- *  @rcp: The result of ioctl command.
- *
- *  Return values:
- *      If @magic matches the pointer returned by ll_iocontrol_data, the 
- *      callback should return LLIOC_STOP; return LLIOC_STOP otherwise.
- */
-typedef enum llioc_iter (*llioc_callback_t)(struct inode *inode, 
-                struct file *file, unsigned int cmd, unsigned long arg,
-                void *magic, int *rcp);
-
-enum llioc_iter ll_iocontrol_call(struct inode *inode, struct file *file, 
-                unsigned int cmd, unsigned long arg, int *rcp);
-
-/* export functions */
-/* Register ioctl block dynamatically for a regular file. 
- *
- * @cmd: the array of ioctl command set
- * @count: number of commands in the @cmd
- * @cb: callback function, it will be called if an ioctl command is found to 
- *      belong to the command list @cmd.
- *
- * Return vaule:
- *      A magic pointer will be returned if success; 
- *      otherwise, NULL will be returned. 
- * */
-void *ll_iocontrol_register(llioc_callback_t cb, int count, unsigned int *cmd);
-void ll_iocontrol_unregister(void *magic);
-
-#endif
-
-#endif /* LLITE_INTERNAL_H */
diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c
deleted file mode 100644
index 54fcd637409ad9de7b7ccb95486fecaa0b91d069..0000000000000000000000000000000000000000
--- a/lustre/llite/llite_lib.c
+++ /dev/null
@@ -1,2188 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light Super operations
- *
- *  Copyright (c) 2002-2005 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/random.h>
-#include <linux/version.h>
-
-#include <lustre_lite.h>
-#include <lustre_ha.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include <lustre_disk.h>
-#include <lustre_param.h>
-#include <lustre_cache.h>
-#include "llite_internal.h"
-
-cfs_mem_cache_t *ll_file_data_slab;
-
-LIST_HEAD(ll_super_blocks);
-spinlock_t ll_sb_lock = SPIN_LOCK_UNLOCKED;
-
-extern struct address_space_operations ll_aops;
-extern struct address_space_operations ll_dir_aops;
-
-#ifndef log2
-#define log2(n) ffz(~(n))
-#endif
-
-
-static struct ll_sb_info *ll_init_sbi(void)
-{
-        struct ll_sb_info *sbi = NULL;
-        class_uuid_t uuid;
-        int i;
-        ENTRY;
-
-        OBD_ALLOC(sbi, sizeof(*sbi));
-        if (!sbi)
-                RETURN(NULL);
-
-        spin_lock_init(&sbi->ll_lock);
-        spin_lock_init(&sbi->ll_lco.lco_lock);
-        spin_lock_init(&sbi->ll_pp_extent_lock);
-        spin_lock_init(&sbi->ll_process_lock);
-        sbi->ll_rw_stats_on = 0;
-        INIT_LIST_HEAD(&sbi->ll_pglist);
-        if (num_physpages >> (20 - CFS_PAGE_SHIFT) < 512)
-                sbi->ll_async_page_max = num_physpages / 2;
-        else
-                sbi->ll_async_page_max = (num_physpages / 4) * 3;
-        sbi->ll_ra_info.ra_max_pages = min(num_physpages / 8,
-                                           SBI_DEFAULT_READAHEAD_MAX);
-        sbi->ll_ra_info.ra_max_read_ahead_whole_pages =
-                                           SBI_DEFAULT_READAHEAD_WHOLE_MAX;
-        sbi->ll_contention_time = SBI_DEFAULT_CONTENTION_SECONDS;
-        INIT_LIST_HEAD(&sbi->ll_conn_chain);
-        INIT_LIST_HEAD(&sbi->ll_orphan_dentry_list);
-
-        ll_generate_random_uuid(uuid);
-        class_uuid_unparse(uuid, &sbi->ll_sb_uuid);
-        CDEBUG(D_CONFIG, "generated uuid: %s\n", sbi->ll_sb_uuid.uuid);
-
-        spin_lock(&ll_sb_lock);
-        list_add_tail(&sbi->ll_list, &ll_super_blocks);
-        spin_unlock(&ll_sb_lock);
-
-#ifdef ENABLE_CHECKSUM
-        sbi->ll_flags |= LL_SBI_DATA_CHECKSUM;
-#endif
-#ifdef ENABLE_LLITE_CHECKSUM
-        sbi->ll_flags |= LL_SBI_LLITE_CHECKSUM;
-#endif
-
-#ifdef HAVE_LRU_RESIZE_SUPPORT
-        sbi->ll_flags |= LL_SBI_LRU_RESIZE;
-#endif
-
-#ifdef HAVE_EXPORT___IGET
-        INIT_LIST_HEAD(&sbi->ll_deathrow);
-        spin_lock_init(&sbi->ll_deathrow_lock);
-#endif
-        for (i = 0; i <= LL_PROCESS_HIST_MAX; i++) {
-                spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_r_hist.oh_lock);
-                spin_lock_init(&sbi->ll_rw_extents_info.pp_extents[i].pp_w_hist.oh_lock);
-        }
-
-        /* metadata statahead is enabled by default */
-        sbi->ll_sa_max = LL_SA_RPC_DEF;
-
-        RETURN(sbi);
-}
-
-void ll_free_sbi(struct super_block *sb)
-{
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        ENTRY;
-
-        if (sbi != NULL) {
-                spin_lock(&ll_sb_lock);
-                list_del(&sbi->ll_list);
-                spin_unlock(&ll_sb_lock);
-                OBD_FREE(sbi, sizeof(*sbi));
-        }
-        EXIT;
-}
-
-static struct dentry_operations ll_d_root_ops = {
-#ifdef DCACHE_LUSTRE_INVALID
-        .d_compare = ll_dcompare,
-#endif
-};
-
-static int client_common_fill_super(struct super_block *sb,
-                                    char *mdc, char *osc)
-{
-        struct inode *root = 0;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        struct obd_device *obd;
-        struct ll_fid rootfid;
-        struct obd_statfs osfs;
-        struct ptlrpc_request *request = NULL;
-        struct lustre_handle osc_conn = {0, };
-        struct lustre_handle mdc_conn = {0, };
-        struct lustre_md md;
-        struct obd_connect_data *data = NULL;
-        int err, checksum;
-        ENTRY;
-
-        obd = class_name2obd(mdc);
-        if (!obd) {
-                CERROR("MDC %s: not setup or attached\n", mdc);
-                RETURN(-EINVAL);
-        }
-
-        OBD_ALLOC(data, sizeof(*data));
-        if (data == NULL)
-                RETURN(-ENOMEM);
-
-        if (proc_lustre_fs_root) {
-                err = lprocfs_register_mountpoint(proc_lustre_fs_root, sb,
-                                                  osc, mdc);
-                if (err < 0)
-                        CERROR("could not register mount in /proc/lustre");
-        }
-
-        /* indicate the features supported by this client */
-        data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_IBITS |
-                OBD_CONNECT_JOIN | OBD_CONNECT_ATTRFID | OBD_CONNECT_NODEVOH |
-                OBD_CONNECT_CANCELSET | OBD_CONNECT_AT;
-#ifdef HAVE_LRU_RESIZE_SUPPORT
-        if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
-                data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
-#endif
-#ifdef CONFIG_FS_POSIX_ACL
-        data->ocd_connect_flags |= OBD_CONNECT_ACL;
-#endif
-        data->ocd_ibits_known = MDS_INODELOCK_FULL;
-        data->ocd_version = LUSTRE_VERSION_CODE;
-
-        if (sb->s_flags & MS_RDONLY)
-                data->ocd_connect_flags |= OBD_CONNECT_RDONLY;
-        if (sbi->ll_flags & LL_SBI_USER_XATTR)
-                data->ocd_connect_flags |= OBD_CONNECT_XATTR;
-
-#ifdef HAVE_MS_FLOCK_LOCK
-        /* force vfs to use lustre handler for flock() calls - bug 10743 */
-        sb->s_flags |= MS_FLOCK_LOCK;
-#endif
-
-        if (sbi->ll_flags & LL_SBI_FLOCK)
-                sbi->ll_fop = &ll_file_operations_flock;
-        else if (sbi->ll_flags & LL_SBI_LOCALFLOCK)
-                sbi->ll_fop = &ll_file_operations;
-        else
-                sbi->ll_fop = &ll_file_operations_noflock;
-
-        err = obd_connect(&mdc_conn, obd, &sbi->ll_sb_uuid, data, NULL);
-        if (err == -EBUSY) {
-                LCONSOLE_ERROR_MSG(0x14f, "An MDT (mdc %s) is performing "
-                                   "recovery, of which this client is not a "
-                                   "part. Please wait for recovery to complete,"
-                                   " abort, or time out.\n", mdc);
-                GOTO(out, err);
-        } else if (err) {
-                CERROR("cannot connect to %s: rc = %d\n", mdc, err);
-                GOTO(out, err);
-        }
-        sbi->ll_mdc_exp = class_conn2export(&mdc_conn);
-
-        err = obd_statfs(obd, &osfs, cfs_time_current_64() - HZ, 0);
-        if (err)
-                GOTO(out_mdc, err);
-
-        /* MDC connect is surely finished by now because we actually sent
-         * a statfs RPC, otherwise obd_connect() is asynchronous. */
-        *data = class_exp2cliimp(sbi->ll_mdc_exp)->imp_connect_data;
-
-        LASSERT(osfs.os_bsize);
-        sb->s_blocksize = osfs.os_bsize;
-        sb->s_blocksize_bits = log2(osfs.os_bsize);
-        sb->s_magic = LL_SUPER_MAGIC;
-
-        /* for bug 11559. in $LINUX/fs/read_write.c, function do_sendfile():
-         *         retval = in_file->f_op->sendfile(...);
-         *         if (*ppos > max)
-         *                 retval = -EOVERFLOW;
-         *
-         * it will check if *ppos is greater than max. However, max equals to
-         * s_maxbytes, which is a negative integer in a x86_64 box since loff_t
-         * has been defined as a signed long long ineger in linux kernel. */
-#if BITS_PER_LONG == 64
-        sb->s_maxbytes = PAGE_CACHE_MAXBYTES >> 1;
-#else
-        sb->s_maxbytes = PAGE_CACHE_MAXBYTES;
-#endif
-        sbi->ll_namelen = osfs.os_namelen;
-        sbi->ll_max_rw_chunk = LL_DEFAULT_MAX_RW_CHUNK;
-
-        if ((sbi->ll_flags & LL_SBI_USER_XATTR) &&
-            !(data->ocd_connect_flags & OBD_CONNECT_XATTR)) {
-                LCONSOLE_INFO("Disabling user_xattr feature because "
-                              "it is not supported on the server\n");
-                sbi->ll_flags &= ~LL_SBI_USER_XATTR;
-        }
-
-        if (data->ocd_connect_flags & OBD_CONNECT_ACL) {
-#ifdef MS_POSIXACL
-                sb->s_flags |= MS_POSIXACL;
-#endif
-                sbi->ll_flags |= LL_SBI_ACL;
-        } else
-                sbi->ll_flags &= ~LL_SBI_ACL;
-
-        if (data->ocd_connect_flags & OBD_CONNECT_JOIN)
-                sbi->ll_flags |= LL_SBI_JOIN;
-
-        sbi->ll_sdev_orig = sb->s_dev;
-        /* We set sb->s_dev equal on all lustre clients in order to support
-         * NFS export clustering.  NFSD requires that the FSID be the same
-         * on all clients. */
-        /* s_dev is also used in lt_compare() to compare two fs, but that is
-         * only a node-local comparison. */
-        sb->s_dev = get_uuid2int(sbi2mdc(sbi)->cl_target_uuid.uuid,
-                                 strlen(sbi2mdc(sbi)->cl_target_uuid.uuid));
-        obd = class_name2obd(osc);
-        if (!obd) {
-                CERROR("OSC %s: not setup or attached\n", osc);
-                GOTO(out_mdc, err = -ENODEV);
-        }
-
-        data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_GRANT |
-                OBD_CONNECT_REQPORTAL | OBD_CONNECT_BRW_SIZE | 
-                OBD_CONNECT_SRVLOCK | OBD_CONNECT_CANCELSET | OBD_CONNECT_AT;
-
-        if (!OBD_FAIL_CHECK(OBD_FAIL_OSC_CONNECT_CKSUM)) {
-                /* OBD_CONNECT_CKSUM should always be set, even if checksums are
-                 * disabled by default, because it can still be enabled on the
-                 * fly via /proc. As a consequence, we still need to come to an
-                 * agreement on the supported algorithms at connect time */
-                data->ocd_connect_flags |= OBD_CONNECT_CKSUM;
-
-                if (OBD_FAIL_CHECK(OBD_FAIL_OSC_CKSUM_ADLER_ONLY))
-                        data->ocd_cksum_types = OBD_CKSUM_ADLER;
-                else
-                        /* send the list of supported checksum types */
-                        data->ocd_cksum_types = OBD_CKSUM_ALL;
-        }
-
-#ifdef HAVE_LRU_RESIZE_SUPPORT
-        if (sbi->ll_flags & LL_SBI_LRU_RESIZE)
-                data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
-#endif
-
-        CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d "
-               "ocd_grant: %d\n", data->ocd_connect_flags,
-               data->ocd_version, data->ocd_grant);
-
-        obd->obd_upcall.onu_owner = &sbi->ll_lco;
-        obd->obd_upcall.onu_upcall = ll_ocd_update;
-        data->ocd_brw_size = PTLRPC_MAX_BRW_PAGES << CFS_PAGE_SHIFT;
-
-        err = obd_connect(&osc_conn, obd, &sbi->ll_sb_uuid, data, NULL);
-        if (err == -EBUSY) {
-                LCONSOLE_ERROR_MSG(0x150, "An OST (osc %s) is performing "
-                                   "recovery, of which this client is not a "
-                                   "part.  Please wait for recovery to "
-                                   "complete, abort, or time out.\n", osc);
-                GOTO(out, err);
-        } else if (err) {
-                CERROR("cannot connect to %s: rc = %d\n", osc, err);
-                GOTO(out_mdc, err);
-        }
-        sbi->ll_osc_exp = class_conn2export(&osc_conn);
-        spin_lock(&sbi->ll_lco.lco_lock);
-        sbi->ll_lco.lco_flags = data->ocd_connect_flags;
-        spin_unlock(&sbi->ll_lco.lco_lock);
-
-        err = obd_register_page_removal_cb(sbi->ll_osc_exp,
-                                           ll_page_removal_cb, 
-                                           ll_pin_extent_cb);
-        if (err) {
-                CERROR("cannot register page removal callback: rc = %d\n",err);
-                GOTO(out_osc, err);
-        }
-        err = obd_register_lock_cancel_cb(sbi->ll_osc_exp,
-                                          ll_extent_lock_cancel_cb);
-        if (err) {
-                CERROR("cannot register lock cancel callback: rc = %d\n", err);
-                GOTO(out_page_rm_cb, err);
-        }
-
-        err = mdc_init_ea_size(sbi->ll_mdc_exp, sbi->ll_osc_exp);
-        if (err) {
-                CERROR("cannot set max EA and cookie sizes: rc = %d\n", err);
-                GOTO(out_lock_cn_cb, err);
-        }
-
-        err = obd_prep_async_page(sbi->ll_osc_exp, NULL, NULL, NULL,
-                                  0, NULL, NULL, NULL, 0, NULL);
-        if (err < 0) {
-                LCONSOLE_ERROR_MSG(0x151, "There are no OST's in this "
-                                   "filesystem. There must be at least one "
-                                   "active OST for a client to start.\n");
-                GOTO(out_lock_cn_cb, err);
-        }
-
-        if (!ll_async_page_slab) {
-                ll_async_page_slab_size =
-                        size_round(sizeof(struct ll_async_page)) + err;
-                ll_async_page_slab = cfs_mem_cache_create("ll_async_page",
-                                                          ll_async_page_slab_size,
-                                                          0, 0);
-                if (!ll_async_page_slab)
-                        GOTO(out_lock_cn_cb, -ENOMEM);
-        }
-
-        err = mdc_getstatus(sbi->ll_mdc_exp, &rootfid);
-        if (err) {
-                CERROR("cannot mds_connect: rc = %d\n", err);
-                GOTO(out_lock_cn_cb, err);
-        }
-        CDEBUG(D_SUPER, "rootfid "LPU64"\n", rootfid.id);
-        sbi->ll_rootino = rootfid.id;
-
-        sb->s_op = &lustre_super_operations;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        sb->s_export_op = &lustre_export_operations;
-#endif
-
-        /* make root inode
-         * XXX: move this to after cbd setup? */
-        err = mdc_getattr(sbi->ll_mdc_exp, &rootfid,
-                          OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS |
-                          (sbi->ll_flags & LL_SBI_ACL ? OBD_MD_FLACL : 0),
-                          0, &request);
-        if (err) {
-                CERROR("mdc_getattr failed for root: rc = %d\n", err);
-                GOTO(out_lock_cn_cb, err);
-        }
-
-        err = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, &md);
-        if (err) {
-                CERROR("failed to understand root inode md: rc = %d\n",err);
-                ptlrpc_req_finished (request);
-                GOTO(out_lock_cn_cb, err);
-        }
-
-        LASSERT(sbi->ll_rootino != 0);
-        root = ll_iget(sb, sbi->ll_rootino, &md);
-
-        ptlrpc_req_finished(request);
-
-        if (root == NULL || is_bad_inode(root)) {
-                mdc_free_lustre_md(sbi->ll_osc_exp, &md);
-                CERROR("lustre_lite: bad iget4 for root\n");
-                GOTO(out_root, err = -EBADF);
-        }
-
-        err = ll_close_thread_start(&sbi->ll_lcq);
-        if (err) {
-                CERROR("cannot start close thread: rc %d\n", err);
-                GOTO(out_root, err);
-        }
-
-        checksum = sbi->ll_flags & LL_SBI_DATA_CHECKSUM;
-        err = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"),
-                                 "checksum", sizeof(checksum),
-                                 &checksum, NULL);
-
-        /* making vm readahead 0 for 2.4.x. In the case of 2.6.x,
-           backing dev info assigned to inode mapping is used for
-           determining maximal readahead. */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && \
-    !defined(KERNEL_HAS_AS_MAX_READAHEAD)
-        /* bug 2805 - set VM readahead to zero */
-        vm_max_readahead = vm_min_readahead = 0;
-#endif
-
-        sb->s_root = d_alloc_root(root);
-        if (data != NULL)
-                OBD_FREE(data, sizeof(*data));
-        sb->s_root->d_op = &ll_d_root_ops;
-        RETURN(err);
-
-out_root:
-        if (root)
-                iput(root);
-out_lock_cn_cb:
-        obd_unregister_lock_cancel_cb(sbi->ll_osc_exp,
-                                      ll_extent_lock_cancel_cb);
-out_page_rm_cb:
-        obd_unregister_page_removal_cb(sbi->ll_osc_exp,
-                                       ll_page_removal_cb);
-out_osc:
-        obd_disconnect(sbi->ll_osc_exp);
-        sbi->ll_osc_exp = NULL;
-out_mdc:
-        obd_disconnect(sbi->ll_mdc_exp);
-        sbi->ll_mdc_exp = NULL;
-out:
-        if (data != NULL)
-                OBD_FREE(data, sizeof(*data));
-        lprocfs_unregister_mountpoint(sbi);
-        RETURN(err);
-}
-
-int ll_get_max_mdsize(struct ll_sb_info *sbi, int *lmmsize)
-{
-        int size, rc;
-
-        *lmmsize = obd_size_diskmd(sbi->ll_osc_exp, NULL);
-        size = sizeof(int);
-        rc = obd_get_info(sbi->ll_mdc_exp, strlen("max_easize"), "max_easize",
-                          &size, lmmsize);
-        if (rc)
-                CERROR("Get max mdsize error rc %d \n", rc);
-
-        RETURN(rc);
-}
-
-void ll_dump_inode(struct inode *inode)
-{
-        struct list_head *tmp;
-        int dentry_count = 0;
-
-        LASSERT(inode != NULL);
-
-        list_for_each(tmp, &inode->i_dentry)
-                dentry_count++;
-
-        CERROR("inode %p dump: dev=%s ino=%lu mode=%o count=%u, %d dentries\n",
-               inode, ll_i2mdcexp(inode)->exp_obd->obd_name, inode->i_ino,
-               inode->i_mode, atomic_read(&inode->i_count), dentry_count);
-}
-
-void lustre_dump_dentry(struct dentry *dentry, int recur)
-{
-        struct list_head *tmp;
-        int subdirs = 0;
-
-        LASSERT(dentry != NULL);
-
-        list_for_each(tmp, &dentry->d_subdirs)
-                subdirs++;
-
-        CERROR("dentry %p dump: name=%.*s parent=%.*s (%p), inode=%p, count=%u,"
-               " flags=0x%x, fsdata=%p, %d subdirs\n", dentry,
-               dentry->d_name.len, dentry->d_name.name,
-               dentry->d_parent->d_name.len, dentry->d_parent->d_name.name,
-               dentry->d_parent, dentry->d_inode, atomic_read(&dentry->d_count),
-               dentry->d_flags, dentry->d_fsdata, subdirs);
-        if (dentry->d_inode != NULL)
-                ll_dump_inode(dentry->d_inode);
-
-        if (recur == 0)
-                return;
-
-        list_for_each(tmp, &dentry->d_subdirs) {
-                struct dentry *d = list_entry(tmp, struct dentry, d_child);
-                lustre_dump_dentry(d, recur - 1);
-        }
-}
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-void lustre_throw_orphan_dentries(struct super_block *sb)
-{
-        struct dentry *dentry, *next;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-
-        /* Do this to get rid of orphaned dentries. That is not really trw. */
-        list_for_each_entry_safe(dentry, next, &sbi->ll_orphan_dentry_list,
-                                 d_hash) {
-                CWARN("found orphan dentry %.*s (%p->%p) at unmount, dumping "
-                      "before and after shrink_dcache_parent\n",
-                      dentry->d_name.len, dentry->d_name.name, dentry, next);
-                lustre_dump_dentry(dentry, 1);
-                shrink_dcache_parent(dentry);
-                lustre_dump_dentry(dentry, 1);
-        }
-}
-#else
-#define lustre_throw_orphan_dentries(sb)
-#endif
-
-#ifdef HAVE_EXPORT___IGET
-static void prune_dir_dentries(struct inode *inode)
-{
-        struct dentry *dentry, *prev = NULL;
-
-        /* due to lustre specific logic, a directory
-         * can have few dentries - a bug from VFS POV */
-restart:
-        spin_lock(&dcache_lock);
-        if (!list_empty(&inode->i_dentry)) {
-                dentry = list_entry(inode->i_dentry.prev,
-                                    struct dentry, d_alias);
-                /* in order to prevent infinite loops we
-                 * break if previous dentry is busy */
-                if (dentry != prev) {
-                        prev = dentry;
-                        dget_locked(dentry);
-                        spin_unlock(&dcache_lock);
-
-                        /* try to kill all child dentries */
-                        shrink_dcache_parent(dentry);
-                        dput(dentry);
-
-                        /* now try to get rid of current dentry */
-                        d_prune_aliases(inode);
-                        goto restart;
-                }
-        }
-        spin_unlock(&dcache_lock);
-}
-
-static void prune_deathrow_one(struct ll_inode_info *lli)
-{
-        struct inode *inode = ll_info2i(lli);
-
-        /* first, try to drop any dentries - they hold a ref on the inode */
-        if (S_ISDIR(inode->i_mode))
-                prune_dir_dentries(inode);
-        else
-                d_prune_aliases(inode);
-
-
-        /* if somebody still uses it, leave it */
-        LASSERT(atomic_read(&inode->i_count) > 0);
-        if (atomic_read(&inode->i_count) > 1)
-                goto out;
-
-        CDEBUG(D_INODE, "inode %lu/%u(%d) looks a good candidate for prune\n",
-               inode->i_ino,inode->i_generation, atomic_read(&inode->i_count));
-
-        /* seems nobody uses it anymore */
-        inode->i_nlink = 0;
-
-out:
-        iput(inode);
-        return;
-}
-
-static void prune_deathrow(struct ll_sb_info *sbi, int try)
-{
-        struct ll_inode_info *lli;
-        int empty;
-
-        do {
-                if (need_resched() && try)
-                        break;
-
-                if (try) {
-                        if (!spin_trylock(&sbi->ll_deathrow_lock))
-                                break;
-                } else {
-                        spin_lock(&sbi->ll_deathrow_lock);
-                }
-
-                empty = 1;
-                lli = NULL;
-                if (!list_empty(&sbi->ll_deathrow)) {
-                        lli = list_entry(sbi->ll_deathrow.next,
-                                         struct ll_inode_info,
-                                         lli_dead_list);
-                        list_del_init(&lli->lli_dead_list);
-                        if (!list_empty(&sbi->ll_deathrow))
-                                empty = 0;
-                }
-                spin_unlock(&sbi->ll_deathrow_lock);
-
-                if (lli)
-                        prune_deathrow_one(lli);
-
-        } while (empty == 0);
-}
-#else /* !HAVE_EXPORT___IGET */
-#define prune_deathrow(sbi, try) do {} while (0)
-#endif /* HAVE_EXPORT___IGET */
-
-void client_common_put_super(struct super_block *sb)
-{
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        ENTRY;
-
-        ll_close_thread_shutdown(sbi->ll_lcq);
-
-        lprocfs_unregister_mountpoint(sbi);
-
-        /* destroy inodes in deathrow */
-        prune_deathrow(sbi, 0);
-
-        list_del(&sbi->ll_conn_chain);
-
-        /* callbacks is cleared after disconnect each target */
-        obd_disconnect(sbi->ll_osc_exp);
-        sbi->ll_osc_exp = NULL;
-
-        obd_disconnect(sbi->ll_mdc_exp);
-        sbi->ll_mdc_exp = NULL;
-
-        lustre_throw_orphan_dentries(sb);
-
-        EXIT;
-}
-
-void ll_kill_super(struct super_block *sb)
-{
-        struct ll_sb_info *sbi;
-
-        ENTRY;
-
-        /* not init sb ?*/
-        if (!(sb->s_flags & MS_ACTIVE))
-                return;
-
-        sbi = ll_s2sbi(sb);
-        /* we need restore s_dev from changed for clustred NFS before put_super
-         * because new kernels have cached s_dev and change sb->s_dev in 
-         * put_super not affected real removing devices */
-        if (sbi)
-                sb->s_dev = sbi->ll_sdev_orig;
-        EXIT;
-}
-
-char *ll_read_opt(const char *opt, char *data)
-{
-        char *value;
-        char *retval;
-        ENTRY;
-
-        CDEBUG(D_SUPER, "option: %s, data %s\n", opt, data);
-        if (strncmp(opt, data, strlen(opt)))
-                RETURN(NULL);
-        if ((value = strchr(data, '=')) == NULL)
-                RETURN(NULL);
-
-        value++;
-        OBD_ALLOC(retval, strlen(value) + 1);
-        if (!retval) {
-                CERROR("out of memory!\n");
-                RETURN(NULL);
-        }
-
-        memcpy(retval, value, strlen(value)+1);
-        CDEBUG(D_SUPER, "Assigned option: %s, value %s\n", opt, retval);
-        RETURN(retval);
-}
-
-static inline int ll_set_opt(const char *opt, char *data, int fl)
-{
-        if (strncmp(opt, data, strlen(opt)) != 0)
-                return(0);
-        else
-                return(fl);
-}
-
-/* non-client-specific mount options are parsed in lmd_parse */
-static int ll_options(char *options, int *flags)
-{
-        int tmp;
-        char *s1 = options, *s2;
-        ENTRY;
-
-        if (!options)
-                RETURN(0);
-
-        CDEBUG(D_CONFIG, "Parsing opts %s\n", options);
-
-        while (*s1) {
-                CDEBUG(D_SUPER, "next opt=%s\n", s1);
-                tmp = ll_set_opt("nolock", s1, LL_SBI_NOLCK);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("flock", s1, LL_SBI_FLOCK);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("localflock", s1, LL_SBI_LOCALFLOCK);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("noflock", s1, LL_SBI_FLOCK|LL_SBI_LOCALFLOCK);
-                if (tmp) {
-                        *flags &= ~tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("user_xattr", s1, LL_SBI_USER_XATTR);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("nouser_xattr", s1, LL_SBI_USER_XATTR);
-                if (tmp) {
-                        *flags &= ~tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("acl", s1, LL_SBI_ACL);
-                if (tmp) {
-                        /* Ignore deprecated mount option.  The client will
-                         * always try to mount with ACL support, whether this
-                         * is used depends on whether server supports it. */
-                        goto next;
-                }
-                tmp = ll_set_opt("noacl", s1, LL_SBI_ACL);
-                if (tmp) {
-                        goto next;
-                }
-
-                tmp = ll_set_opt("checksum", s1, LL_SBI_DATA_CHECKSUM);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("nochecksum", s1, LL_SBI_DATA_CHECKSUM);
-                if (tmp) {
-                        *flags &= ~tmp;
-                        goto next;
-                }
-
-                tmp = ll_set_opt("lruresize", s1, LL_SBI_LRU_RESIZE);
-                if (tmp) {
-                        *flags |= tmp;
-                        goto next;
-                }
-                tmp = ll_set_opt("nolruresize", s1, LL_SBI_LRU_RESIZE);
-                if (tmp) {
-                        *flags &= ~tmp;
-                        goto next;
-                }
-                LCONSOLE_ERROR_MSG(0x152, "Unknown option '%s', won't mount.\n",
-                                   s1);
-                RETURN(-EINVAL);
-
-next:
-                /* Find next opt */
-                s2 = strchr(s1, ',');
-                if (s2 == NULL)
-                        break;
-                s1 = s2 + 1;
-        }
-        RETURN(0);
-}
-
-void ll_lli_init(struct ll_inode_info *lli)
-{
-        lli->lli_inode_magic = LLI_INODE_MAGIC;
-        sema_init(&lli->lli_size_sem, 1);
-        sema_init(&lli->lli_write_sem, 1);
-        lli->lli_flags = 0;
-        lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
-        spin_lock_init(&lli->lli_lock);
-        sema_init(&lli->lli_och_sem, 1);
-        lli->lli_mds_read_och = lli->lli_mds_write_och = NULL;
-        lli->lli_mds_exec_och = NULL;
-        lli->lli_open_fd_read_count = lli->lli_open_fd_write_count = 0;
-        lli->lli_open_fd_exec_count = 0;
-        INIT_LIST_HEAD(&lli->lli_dead_list);
-#ifdef HAVE_CLOSE_THREAD
-        INIT_LIST_HEAD(&lli->lli_pending_write_llaps);
-#endif
-}
-
-/* COMPAT_146 */
-#define MDCDEV "mdc_dev"
-static int old_lustre_process_log(struct super_block *sb, char *newprofile,
-                                  struct config_llog_instance *cfg)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device *obd;
-        struct lustre_handle mdc_conn = {0, };
-        struct obd_export *exp;
-        char *ptr, *mdt, *profile;
-        char niduuid[10] = "mdtnid0";
-        class_uuid_t uuid;
-        struct obd_uuid mdc_uuid;
-        struct llog_ctxt *ctxt;
-        struct obd_connect_data ocd = { 0 };
-        lnet_nid_t nid;
-        int i, rc = 0, recov_bk = 1, failnodes = 0;
-        ENTRY;
-
-        ll_generate_random_uuid(uuid);
-        class_uuid_unparse(uuid, &mdc_uuid);
-        CDEBUG(D_HA, "generated uuid: %s\n", mdc_uuid.uuid);
-
-        /* Figure out the old mdt and profile name from new-style profile
-           ("lustre" from "mds/lustre-client") */
-        mdt = newprofile;
-        profile = strchr(mdt, '/');
-        if (profile == NULL) {
-                CDEBUG(D_CONFIG, "Can't find MDT name in %s\n", newprofile);
-                GOTO(out, rc = -EINVAL);
-        }
-        *profile = '\0';
-        profile++;
-        ptr = strrchr(profile, '-');
-        if (ptr == NULL) {
-                CDEBUG(D_CONFIG, "Can't find client name in %s\n", newprofile);
-                GOTO(out, rc = -EINVAL);
-        }
-        *ptr = '\0';
-
-        LCONSOLE_WARN("This looks like an old mount command; I will try to "
-                      "contact MDT '%s' for profile '%s'\n", mdt, profile);
-
-        /* Use nids from mount line: uml1,1@elan:uml2,2@elan:/lustre */
-        i = 0;
-        ptr = lsi->lsi_lmd->lmd_dev;
-        while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                rc = do_lcfg(MDCDEV, nid, LCFG_ADD_UUID, niduuid, 0,0,0);
-                i++;
-                /* Stop at the first failover nid */
-                if (*ptr == ':')
-                        break;
-        }
-        if (i == 0) {
-                CERROR("No valid MDT nids found.\n");
-                GOTO(out, rc = -EINVAL);
-        }
-        failnodes++;
-
-        rc = do_lcfg(MDCDEV, 0, LCFG_ATTACH, LUSTRE_MDC_NAME,mdc_uuid.uuid,0,0);
-        if (rc < 0)
-                GOTO(out_del_uuid, rc);
-
-        rc = do_lcfg(MDCDEV, 0, LCFG_SETUP, mdt, niduuid, 0, 0);
-        if (rc < 0) {
-                LCONSOLE_ERROR_MSG(0x153, "I couldn't establish a connection "
-                                   "with the MDT. Check that the MDT host NID "
-                                   "is correct and the networks are up.\n");
-                GOTO(out_detach, rc);
-        }
-
-        obd = class_name2obd(MDCDEV);
-        if (obd == NULL)
-                GOTO(out_cleanup, rc = -EINVAL);
-
-        /* Add any failover nids */
-        while (*ptr == ':') {
-                /* New failover node */
-                sprintf(niduuid, "mdtnid%d", failnodes);
-                i = 0;
-                while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                        i++;
-                        rc = do_lcfg(MDCDEV, nid, LCFG_ADD_UUID, niduuid,0,0,0);
-                        if (rc)
-                                CERROR("Add uuid for %s failed %d\n",
-                                       libcfs_nid2str(nid), rc);
-                        if (*ptr == ':')
-                                break;
-                }
-                if (i > 0) {
-                        rc = do_lcfg(MDCDEV, 0, LCFG_ADD_CONN, niduuid, 0, 0,0);
-                        if (rc)
-                                CERROR("Add conn for %s failed %d\n",
-                                       libcfs_nid2str(nid), rc);
-                        failnodes++;
-                } else {
-                        /* at ":/fsname" */
-                        break;
-                }
-        }
-
-        /* Try all connections, but only once. */
-        rc = obd_set_info_async(obd->obd_self_export,
-                                strlen("init_recov_bk"), "init_recov_bk",
-                                sizeof(recov_bk), &recov_bk, NULL);
-        if (rc)
-                GOTO(out_cleanup, rc);
-
-        /* If we don't have this then an ACL MDS will refuse the connection */
-        ocd.ocd_connect_flags = OBD_CONNECT_ACL;
-
-        rc = obd_connect(&mdc_conn, obd, &mdc_uuid, &ocd, NULL);
-        if (rc) {
-                CERROR("cannot connect to %s: rc = %d\n", mdt, rc);
-                GOTO(out_cleanup, rc);
-        }
-
-        exp = class_conn2export(&mdc_conn);
-
-        ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
-
-        cfg->cfg_flags |= CFG_F_COMPAT146;
-
-#if 1
-        rc = class_config_parse_llog(ctxt, profile, cfg);
-#else
-        /*
-         * For debugging, it's useful to just dump the log
-         */
-        rc = class_config_dump_llog(ctxt, profile, cfg);
-#endif
-        llog_ctxt_put(ctxt);
-        switch (rc) {
-        case 0: {
-                /* Set the caller's profile name to the old-style */
-                memcpy(newprofile, profile, strlen(profile) + 1);
-                break;
-        }
-        case -EINVAL:
-                LCONSOLE_ERROR_MSG(0x154, "%s: The configuration '%s' could not"
-                                   " be read from the MDT '%s'.  Make sure this"
-                                   " client and the MDT are running compatible "
-                                   "versions of Lustre.\n",
-                                   obd->obd_name, profile, mdt);
-                /* fall through */
-        default:
-                LCONSOLE_ERROR_MSG(0x155, "%s: The configuration '%s' could not"
-                                   " be read from the MDT '%s'.  This may be "
-                                   "the result of communication errors between "
-                                   "the client and the MDT, or if the MDT is "
-                                   "not running.\n", obd->obd_name, profile,
-                                   mdt);
-                break;
-        }
-
-        /* We don't so much care about errors in cleaning up the config llog
-         * connection, as we have already read the config by this point. */
-        obd_disconnect(exp);
-
-out_cleanup:
-        do_lcfg(MDCDEV, 0, LCFG_CLEANUP, 0, 0, 0, 0);
-
-out_detach:
-        do_lcfg(MDCDEV, 0, LCFG_DETACH, 0, 0, 0, 0);
-
-out_del_uuid:
-        /* class_add_uuid adds a nid even if the same uuid exists; we might
-           delete any copy here.  So they all better match. */
-        for (i = 0; i < failnodes; i++) {
-                sprintf(niduuid, "mdtnid%d", i);
-                do_lcfg(MDCDEV, 0, LCFG_DEL_UUID, niduuid, 0, 0, 0);
-        }
-        /* class_import_put will get rid of the additional connections */
-out:
-        RETURN(rc);
-}
-/* end COMPAT_146 */
-
-int ll_fill_super(struct super_block *sb)
-{
-        struct lustre_profile *lprof;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct ll_sb_info *sbi;
-        char  *osc = NULL, *mdc = NULL;
-        char  *profilenm = get_profile_name(sb);
-        struct config_llog_instance cfg = {0, };
-        char   ll_instance[sizeof(sb) * 2 + 1];
-        int    err;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op: sb %p\n", sb);
-
-        cfs_module_get();
-
-        /* client additional sb info */
-        lsi->lsi_llsbi = sbi = ll_init_sbi();
-        if (!sbi) {
-                cfs_module_put();
-                RETURN(-ENOMEM);
-        }
-
-        err = ll_options(lsi->lsi_lmd->lmd_opts, &sbi->ll_flags);
-        if (err)
-                GOTO(out_free, err);
-
-        /* Generate a string unique to this super, in case some joker tries
-           to mount the same fs at two mount points.
-           Use the address of the super itself.*/
-        sprintf(ll_instance, "%p", sb);
-        cfg.cfg_instance = ll_instance;
-        cfg.cfg_uuid = lsi->lsi_llsbi->ll_sb_uuid;
-
-        /* set up client obds */
-        if (strchr(profilenm, '/') != NULL) /* COMPAT_146 */
-                err = -EINVAL; /* skip error messages, use old config code */
-        else
-                err = lustre_process_log(sb, profilenm, &cfg);
-        /* COMPAT_146 */
-        if (err < 0) {
-                char *oldname;
-                int rc, oldnamelen;
-                oldnamelen = strlen(profilenm) + 1;
-                /* Temp storage for 1.4.6 profile name */
-                OBD_ALLOC(oldname, oldnamelen);
-                if (oldname) {
-                        memcpy(oldname, profilenm, oldnamelen);
-                        rc = old_lustre_process_log(sb, oldname, &cfg);
-                        if (rc >= 0) {
-                                /* That worked - update the profile name
-                                   permanently */
-                                err = rc;
-                                OBD_FREE(lsi->lsi_lmd->lmd_profile,
-                                         strlen(lsi->lsi_lmd->lmd_profile) + 1);
-                                OBD_ALLOC(lsi->lsi_lmd->lmd_profile,
-                                         strlen(oldname) + 1);
-                                if (!lsi->lsi_lmd->lmd_profile) {
-                                        OBD_FREE(oldname, oldnamelen);
-                                        GOTO(out_free, err = -ENOMEM);
-                                }
-                                memcpy(lsi->lsi_lmd->lmd_profile, oldname,
-                                       strlen(oldname) + 1);
-                                profilenm = get_profile_name(sb);
-                                /* Don't ever try to recover the MGS */
-                                rc = ptlrpc_set_import_active(
-                                        lsi->lsi_mgc->u.cli.cl_import, 0);
-                        }
-                        OBD_FREE(oldname, oldnamelen);
-                }
-        }
-        /* end COMPAT_146 */
-        if (err < 0) {
-                CERROR("Unable to process log: %d\n", err);
-                GOTO(out_free, err);
-        }
-
-        lprof = class_get_profile(profilenm);
-        if (lprof == NULL) {
-                LCONSOLE_ERROR_MSG(0x156, "The client profile '%s' could not be"
-                                   " read from the MGS.  Does that filesystem "
-                                   "exist?\n", profilenm);
-                GOTO(out_free, err = -EINVAL);
-        }
-        CDEBUG(D_CONFIG, "Found profile %s: mdc=%s osc=%s\n", profilenm,
-               lprof->lp_mdc, lprof->lp_osc);
-
-        OBD_ALLOC(osc, strlen(lprof->lp_osc) +
-                  strlen(ll_instance) + 2);
-        if (!osc)
-                GOTO(out_free, err = -ENOMEM);
-        sprintf(osc, "%s-%s", lprof->lp_osc, ll_instance);
-
-        OBD_ALLOC(mdc, strlen(lprof->lp_mdc) +
-                  strlen(ll_instance) + 2);
-        if (!mdc)
-                GOTO(out_free, err = -ENOMEM);
-        sprintf(mdc, "%s-%s", lprof->lp_mdc, ll_instance);
-
-        /* connections, registrations, sb setup */
-        err = client_common_fill_super(sb, mdc, osc);
-
-out_free:
-        if (mdc)
-                OBD_FREE(mdc, strlen(mdc) + 1);
-        if (osc)
-                OBD_FREE(osc, strlen(osc) + 1);
-        if (err)
-                ll_put_super(sb);
-        else
-                LCONSOLE_WARN("Client %s has started\n", profilenm);
-
-        RETURN(err);
-} /* ll_fill_super */
-
-
-void ll_put_super(struct super_block *sb)
-{
-        struct config_llog_instance cfg;
-        char   ll_instance[sizeof(sb) * 2 + 1];
-        struct obd_device *obd;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        char *profilenm = get_profile_name(sb);
-        int force = 1, next;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op: sb %p - %s\n", sb, profilenm);
-
-        sprintf(ll_instance, "%p", sb);
-        cfg.cfg_instance = ll_instance;
-        lustre_end_log(sb, NULL, &cfg);
-
-        if (sbi->ll_mdc_exp) {
-                obd = class_exp2obd(sbi->ll_mdc_exp);
-                if (obd) 
-                        force = obd->obd_force;
-        }
-
-        /* We need to set force before the lov_disconnect in
-           lustre_common_put_super, since l_d cleans up osc's as well. */
-        if (force) {
-                next = 0;
-                while ((obd = class_devices_in_group(&sbi->ll_sb_uuid,
-                                                     &next)) != NULL) {
-                        obd->obd_force = force;
-                }
-        }
-
-        if (sbi->ll_lcq) {
-                /* Only if client_common_fill_super succeeded */
-                client_common_put_super(sb);
-        }
-
-        next = 0;
-        while ((obd = class_devices_in_group(&sbi->ll_sb_uuid, &next)) !=NULL) {
-                class_manual_cleanup(obd);
-        }
-
-        if (profilenm)
-                class_del_profile(profilenm);
-
-        ll_free_sbi(sb);
-        lsi->lsi_llsbi = NULL;
-
-        lustre_common_put_super(sb);
-
-        LCONSOLE_WARN("client %s umount complete\n", ll_instance);
-
-        cfs_module_put();
-
-        EXIT;
-} /* client_put_super */
-
-#ifdef HAVE_REGISTER_CACHE
-#include <linux/cache_def.h>
-#ifdef HAVE_CACHE_RETURN_INT
-static int
-#else
-static void
-#endif
-ll_shrink_cache(int priority, unsigned int gfp_mask)
-{
-        struct ll_sb_info *sbi;
-        int count = 0;
-
-        list_for_each_entry(sbi, &ll_super_blocks, ll_list)
-                count += llap_shrink_cache(sbi, priority);
-
-#ifdef HAVE_CACHE_RETURN_INT
-        return count;
-#endif
-}
-
-struct cache_definition ll_cache_definition = {
-        .name = "llap_cache",
-        .shrink = ll_shrink_cache
-};
-#endif /* HAVE_REGISTER_CACHE */
-
-struct inode *ll_inode_from_lock(struct ldlm_lock *lock)
-{
-        struct inode *inode = NULL;
-        /* NOTE: we depend on atomic igrab() -bzzz */
-        lock_res_and_lock(lock);
-        if (lock->l_ast_data) {
-                struct ll_inode_info *lli = ll_i2info(lock->l_ast_data);
-                if (lli->lli_inode_magic == LLI_INODE_MAGIC) {
-                        inode = igrab(lock->l_ast_data);
-                } else {
-                        inode = lock->l_ast_data;
-                        ldlm_lock_debug(NULL, inode->i_state & I_FREEING ?
-                                                D_INFO : D_WARNING,
-                                        lock, __FILE__, __func__, __LINE__,
-                                        "l_ast_data %p is bogus: magic %08x",
-                                        lock->l_ast_data, lli->lli_inode_magic);
-                        inode = NULL;
-                }
-        }
-        unlock_res_and_lock(lock);
-        return inode;
-}
-
-static int null_if_equal(struct ldlm_lock *lock, void *data)
-{
-        if (data == lock->l_ast_data) {
-                lock->l_ast_data = NULL;
-
-                if (lock->l_req_mode != lock->l_granted_mode)
-                        LDLM_ERROR(lock,"clearing inode with ungranted lock");
-        }
-
-        return LDLM_ITER_CONTINUE;
-}
-
-void ll_clear_inode(struct inode *inode)
-{
-        struct ll_fid fid;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
-               inode->i_generation, inode);
-
-        if (S_ISDIR(inode->i_mode)) {
-                /* these should have been cleared in ll_file_release */
-                LASSERT(lli->lli_sai == NULL);
-                LASSERT(lli->lli_opendir_key == NULL);
-                LASSERT(lli->lli_opendir_pid == 0);
-        }
-
-        ll_inode2fid(&fid, inode);
-        clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags);
-        mdc_change_cbdata(sbi->ll_mdc_exp, &fid, null_if_equal, inode);
-
-        LASSERT(!lli->lli_open_fd_write_count);
-        LASSERT(!lli->lli_open_fd_read_count);
-        LASSERT(!lli->lli_open_fd_exec_count);
-
-        if (lli->lli_mds_write_och)
-                ll_mdc_real_close(inode, FMODE_WRITE);
-        if (lli->lli_mds_exec_och) {
-                if (!FMODE_EXEC)
-                        CERROR("No FMODE exec, bug exec och is present for "
-                               "inode %ld\n", inode->i_ino);
-                ll_mdc_real_close(inode, FMODE_EXEC);
-        }
-        if (lli->lli_mds_read_och)
-                ll_mdc_real_close(inode, FMODE_READ);
-
-
-        if (lli->lli_smd) {
-                obd_change_cbdata(sbi->ll_osc_exp, lli->lli_smd,
-                                  null_if_equal, inode);
-
-                obd_free_memmd(sbi->ll_osc_exp, &lli->lli_smd);
-                lli->lli_smd = NULL;
-        }
-
-        if (lli->lli_symlink_name) {
-                OBD_FREE(lli->lli_symlink_name,
-                         strlen(lli->lli_symlink_name) + 1);
-                lli->lli_symlink_name = NULL;
-        }
-
-#ifdef CONFIG_FS_POSIX_ACL
-        if (lli->lli_posix_acl) {
-                LASSERT(atomic_read(&lli->lli_posix_acl->a_refcount) == 1);
-                posix_acl_release(lli->lli_posix_acl);
-                lli->lli_posix_acl = NULL;
-        }
-#endif
-
-        lli->lli_inode_magic = LLI_INODE_DEAD;
-
-#ifdef HAVE_EXPORT___IGET
-        spin_lock(&sbi->ll_deathrow_lock);
-        list_del_init(&lli->lli_dead_list);
-        spin_unlock(&sbi->ll_deathrow_lock);
-#endif
-
-        EXIT;
-}
-static int ll_setattr_do_truncate(struct inode *inode, loff_t new_size)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        int rc;
-        ldlm_policy_data_t policy = { .l_extent = {new_size,
-                                                   OBD_OBJECT_EOF } };
-        struct lustre_handle lockh = { 0 };
-        int local_lock = 0; /* 0 - no local lock;
-                             * 1 - lock taken by lock_extent;
-                             * 2 - by obd_match*/
-        int ast_flags;
-        int err;
-        ENTRY;
-
-        UNLOCK_INODE_MUTEX(inode);
-        UP_WRITE_I_ALLOC_SEM(inode);
-
-        if (sbi->ll_lco.lco_flags & OBD_CONNECT_TRUNCLOCK) {
-                ast_flags = LDLM_FL_BLOCK_GRANTED;
-                rc = obd_match(sbi->ll_osc_exp, lsm, LDLM_EXTENT,
-                               &policy, LCK_PW, &ast_flags, inode, &lockh);
-                if (rc > 0) {
-                        local_lock = 2;
-                        rc = 0;
-                } else if (rc == 0) {
-                        rc = ll_file_punch(inode, new_size, 1);
-                }
-        } else {
-                /* XXX when we fix the AST intents to pass the discard-range
-                 * XXX extent, make ast_flags always LDLM_AST_DISCARD_DATA
-                 * XXX here. */
-                ast_flags = (new_size == 0) ? LDLM_AST_DISCARD_DATA : 0;
-                rc = ll_extent_lock(NULL, inode, lsm, LCK_PW, &policy,
-                                    &lockh, ast_flags);
-                if (likely(rc == 0))
-                        local_lock = 1;
-        }
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        DOWN_WRITE_I_ALLOC_SEM(inode);
-        LOCK_INODE_MUTEX(inode);
-#else
-        LOCK_INODE_MUTEX(inode);
-        DOWN_WRITE_I_ALLOC_SEM(inode);
-#endif
-        if (likely(rc == 0)) {
-                /* Only ll_inode_size_lock is taken at this level.
-                 * lov_stripe_lock() is grabbed by ll_truncate() only over
-                 * call to obd_adjust_kms().  If vmtruncate returns 0, then
-                 * ll_truncate dropped ll_inode_size_lock() */
-                ll_inode_size_lock(inode, 0);
-                if (!local_lock)
-                        set_bit(LLI_F_SRVLOCK, &lli->lli_flags);
-                rc = vmtruncate(inode, new_size);
-                clear_bit(LLI_F_SRVLOCK, &lli->lli_flags);
-                if (rc != 0) {
-                        LASSERT(atomic_read(&lli->lli_size_sem.count) <= 0);
-                        ll_inode_size_unlock(inode, 0);
-                }
-        }
-        if (local_lock) {
-                if (local_lock == 2)
-                        err = obd_cancel(sbi->ll_osc_exp, lsm, LCK_PW, &lockh);
-                else
-                        err = ll_extent_unlock(NULL, inode, lsm, LCK_PW, &lockh);
-                if (unlikely(err != 0)){
-                        CERROR("extent unlock failed: err=%d,"
-                               " unlock method =%d\n", err, local_lock);
-                        if (rc == 0)
-                                rc = err;
-                }
-        }
-        RETURN(rc);
-}
-
-/* If this inode has objects allocated to it (lsm != NULL), then the OST
- * object(s) determine the file size and mtime.  Otherwise, the MDS will
- * keep these values until such a time that objects are allocated for it.
- * We do the MDS operations first, as it is checking permissions for us.
- * We don't to the MDS RPC if there is nothing that we want to store there,
- * otherwise there is no harm in updating mtime/atime on the MDS if we are
- * going to do an RPC anyways.
- *
- * If we are doing a truncate, we will send the mtime and ctime updates
- * to the OST with the punch RPC, otherwise we do an explicit setattr RPC.
- * I don't believe it is possible to get e.g. ATTR_MTIME_SET and ATTR_SIZE
- * at the same time.
- */
-int ll_setattr_raw(struct inode *inode, struct iattr *attr)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        struct lustre_md md;
-        int ia_valid = attr->ia_valid;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu valid %x\n", inode->i_ino,
-               attr->ia_valid);
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETATTR, 1);
-
-        if (ia_valid & ATTR_SIZE) {
-                if (attr->ia_size > ll_file_maxbytes(inode)) {
-                        CDEBUG(D_INODE, "file too large %llu > "LPU64"\n",
-                               attr->ia_size, ll_file_maxbytes(inode));
-                        RETURN(-EFBIG);
-                }
-
-                attr->ia_valid |= ATTR_MTIME | ATTR_CTIME;
-        }
-
-        /* POSIX: check before ATTR_*TIME_SET set (from inode_change_ok) */
-        if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) {
-                if (current->fsuid != inode->i_uid && !capable(CAP_FOWNER))
-                        RETURN(-EPERM);
-        }
-
-        /* We mark all of the fields "set" so MDS/OST does not re-set them */
-        if (attr->ia_valid & ATTR_CTIME) {
-                attr->ia_ctime = CURRENT_TIME;
-                attr->ia_valid |= ATTR_CTIME_SET;
-        }
-        if (!(ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) {
-                attr->ia_atime = CURRENT_TIME;
-                attr->ia_valid |= ATTR_ATIME_SET;
-        }
-        if (!(ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) {
-                attr->ia_mtime = CURRENT_TIME;
-                attr->ia_valid |= ATTR_MTIME_SET;
-        }
-        if ((attr->ia_valid & ATTR_CTIME) && !(attr->ia_valid & ATTR_MTIME)) {
-                /* To avoid stale mtime on mds, obtain it from ost and send
-                   to mds. */
-                rc = ll_glimpse_size(inode, 0);
-                if (rc)
-                        RETURN(rc);
-
-                attr->ia_valid |= ATTR_MTIME_SET | ATTR_MTIME;
-                attr->ia_mtime = inode->i_mtime;
-        }
-
-        if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME))
-                CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %lu\n",
-                       LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime),
-                       CURRENT_SECONDS);
-
-        /* NB: ATTR_SIZE will only be set after this point if the size
-         * resides on the MDS, ie, this file has no objects. */
-        if (lsm)
-                attr->ia_valid &= ~ATTR_SIZE;
-
-        /* We always do an MDS RPC, even if we're only changing the size;
-         * only the MDS knows whether truncate() should fail with -ETXTBUSY */
-        ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0, NULL);
-
-        rc = mdc_setattr(sbi->ll_mdc_exp, &op_data,
-                         attr, NULL, 0, NULL, 0, &request);
-
-        if (rc) {
-                ptlrpc_req_finished(request);
-                if (rc == -ENOENT) {
-                        inode->i_nlink = 0;
-                        /* Unlinked special device node?  Or just a race?
-                         * Pretend we done everything. */
-                        if (!S_ISREG(inode->i_mode) &&
-                            !S_ISDIR(inode->i_mode))
-                                rc = inode_setattr(inode, attr);
-                } else if (rc != -EPERM && rc != -EACCES && rc != -ETXTBSY)
-                        CERROR("mdc_setattr fails: rc = %d\n", rc);
-                RETURN(rc);
-        }
-
-        rc = mdc_req2lustre_md(request, REPLY_REC_OFF, sbi->ll_osc_exp, &md);
-        if (rc) {
-                ptlrpc_req_finished(request);
-                RETURN(rc);
-        }
-
-        /* We call inode_setattr to adjust timestamps.
-         * If there is at least some data in file, we cleared ATTR_SIZE above to
-         * avoid invoking vmtruncate, otherwise it is important to call
-         * vmtruncate in inode_setattr to update inode->i_size (bug 6196) */
-        rc = inode_setattr(inode, attr);
-
-        ll_update_inode(inode, &md);
-        ptlrpc_req_finished(request);
-
-        if (!lsm || !S_ISREG(inode->i_mode)) {
-                CDEBUG(D_INODE, "no lsm: not setting attrs on OST\n");
-                RETURN(rc);
-        }
-
-        /* We really need to get our PW lock before we change inode->i_size.
-         * If we don't we can race with other i_size updaters on our node, like
-         * ll_file_read.  We can also race with i_size propogation to other
-         * nodes through dirtying and writeback of final cached pages.  This
-         * last one is especially bad for racing o_append users on other
-         * nodes. */
-        if (ia_valid & ATTR_SIZE) {
-                rc = ll_setattr_do_truncate(inode, attr->ia_size);
-        } else if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET)) {
-                obd_flag flags;
-                struct obd_info oinfo = { { { 0 } } };
-                struct obdo *oa;
-                OBDO_ALLOC(oa);
-
-                CDEBUG(D_INODE, "set mtime on OST inode %lu to %lu\n",
-                       inode->i_ino, LTIME_S(attr->ia_mtime));
-
-                if (oa) {
-                        oa->o_id = lsm->lsm_object_id;
-                        oa->o_valid = OBD_MD_FLID;
-
-                        flags = OBD_MD_FLTYPE | OBD_MD_FLATIME |
-                                OBD_MD_FLMTIME | OBD_MD_FLCTIME |
-                                OBD_MD_FLFID | OBD_MD_FLGENER;
-
-                        obdo_from_inode(oa, inode, flags);
-
-                        oinfo.oi_oa = oa;
-                        oinfo.oi_md = lsm;
-
-                        rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL);
-                        if (rc)
-                                CERROR("obd_setattr_async fails: rc=%d\n", rc);
-                        OBDO_FREE(oa);
-                } else {
-                        rc = -ENOMEM;
-                }
-        }
-        RETURN(rc);
-}
-
-int ll_setattr(struct dentry *de, struct iattr *attr)
-{
-        if ((attr->ia_valid & (ATTR_CTIME|ATTR_SIZE|ATTR_MODE)) ==
-            (ATTR_CTIME|ATTR_SIZE|ATTR_MODE))
-                attr->ia_valid |= MDS_OPEN_OWNEROVERRIDE;
-
-        return ll_setattr_raw(de->d_inode, attr);
-}
-
-int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs,
-                       __u64 max_age, __u32 flags)
-{
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        struct obd_statfs obd_osfs;
-        int rc;
-        ENTRY;
-
-        rc = obd_statfs(class_exp2obd(sbi->ll_mdc_exp), osfs, max_age, flags);
-        if (rc) {
-                CERROR("mdc_statfs fails: rc = %d\n", rc);
-                RETURN(rc);
-        }
-
-        osfs->os_type = sb->s_magic;
-
-        CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
-               osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files);
-
-        rc = obd_statfs_rqset(class_exp2obd(sbi->ll_osc_exp),
-                              &obd_osfs, max_age, flags);
-        if (rc) {
-                CERROR("obd_statfs fails: rc = %d\n", rc);
-                RETURN(rc);
-        }
-
-        CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n",
-               obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree,
-               obd_osfs.os_files);
-
-        osfs->os_bsize = obd_osfs.os_bsize;
-        osfs->os_blocks = obd_osfs.os_blocks;
-        osfs->os_bfree = obd_osfs.os_bfree;
-        osfs->os_bavail = obd_osfs.os_bavail;
-
-        /* If we don't have as many objects free on the OST as inodes
-         * on the MDS, we reduce the total number of inodes to
-         * compensate, so that the "inodes in use" number is correct.
-         */
-        if (obd_osfs.os_ffree < osfs->os_ffree) {
-                osfs->os_files = (osfs->os_files - osfs->os_ffree) +
-                        obd_osfs.os_ffree;
-                osfs->os_ffree = obd_osfs.os_ffree;
-        }
-
-        RETURN(rc);
-}
-#ifndef HAVE_STATFS_DENTRY_PARAM
-int ll_statfs(struct super_block *sb, struct kstatfs *sfs)
-{
-#else
-int ll_statfs(struct dentry *de, struct kstatfs *sfs)
-{
-        struct super_block *sb = de->d_sb;
-#endif
-        struct obd_statfs osfs;
-        int rc;
-
-        CDEBUG(D_VFSTRACE, "VFS Op: at "LPU64" jiffies\n", get_jiffies_64());
-        ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STAFS, 1);
-
-        /* For now we will always get up-to-date statfs values, but in the
-         * future we may allow some amount of caching on the client (e.g.
-         * from QOS or lprocfs updates). */
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - 1, 0);
-        if (rc)
-                return rc;
-
-        statfs_unpack(sfs, &osfs);
-
-        /* We need to downshift for all 32-bit kernels, because we can't
-         * tell if the kernel is being called via sys_statfs64() or not.
-         * Stop before overflowing f_bsize - in which case it is better
-         * to just risk EOVERFLOW if caller is using old sys_statfs(). */
-        if (sizeof(long) < 8) {
-                while (osfs.os_blocks > ~0UL && sfs->f_bsize < 0x40000000) {
-                        sfs->f_bsize <<= 1;
-
-                        osfs.os_blocks >>= 1;
-                        osfs.os_bfree >>= 1;
-                        osfs.os_bavail >>= 1;
-                }
-        }
-
-        sfs->f_blocks = osfs.os_blocks;
-        sfs->f_bfree = osfs.os_bfree;
-        sfs->f_bavail = osfs.os_bavail;
-
-        return 0;
-}
-
-void ll_inode_size_lock(struct inode *inode, int lock_lsm)
-{
-        struct ll_inode_info *lli;
-        struct lov_stripe_md *lsm;
-
-        lli = ll_i2info(inode);
-        LASSERT(lli->lli_size_sem_owner != current);
-        down(&lli->lli_size_sem);
-        LASSERT(lli->lli_size_sem_owner == NULL);
-        lli->lli_size_sem_owner = current;
-        lsm = lli->lli_smd;
-        LASSERTF(lsm != NULL || lock_lsm == 0, "lsm %p, lock_lsm %d\n",
-                 lsm, lock_lsm);
-        if (lock_lsm)
-                lov_stripe_lock(lsm);
-}
-
-void ll_inode_size_unlock(struct inode *inode, int unlock_lsm)
-{
-        struct ll_inode_info *lli;
-        struct lov_stripe_md *lsm;
-
-        lli = ll_i2info(inode);
-        lsm = lli->lli_smd;
-        LASSERTF(lsm != NULL || unlock_lsm == 0, "lsm %p, lock_lsm %d\n",
-                 lsm, unlock_lsm);
-        if (unlock_lsm)
-                lov_stripe_unlock(lsm);
-        LASSERT(lli->lli_size_sem_owner == current);
-        lli->lli_size_sem_owner = NULL;
-        up(&lli->lli_size_sem);
-}
-
-static void ll_replace_lsm(struct inode *inode, struct lov_stripe_md *lsm)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-
-        dump_lsm(D_INODE, lsm);
-        dump_lsm(D_INODE, lli->lli_smd);
-        LASSERTF(lsm->lsm_magic == LOV_MAGIC_JOIN,
-                 "lsm must be joined lsm %p\n", lsm);
-        obd_free_memmd(ll_i2obdexp(inode), &lli->lli_smd);
-        CDEBUG(D_INODE, "replace lsm %p to lli_smd %p for inode %lu%u(%p)\n",
-               lsm, lli->lli_smd, inode->i_ino, inode->i_generation, inode);
-        lli->lli_smd = lsm;
-        lli->lli_maxbytes = lsm->lsm_maxbytes;
-        if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES)
-                lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
-}
-
-void ll_update_inode(struct inode *inode, struct lustre_md *md)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct mds_body *body = md->body;
-        struct lov_stripe_md *lsm = md->lsm;
-
-        LASSERT ((lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0));
-        if (lsm != NULL) {
-                if (lli->lli_smd == NULL) {
-                        if (lsm->lsm_magic != LOV_MAGIC &&
-                            lsm->lsm_magic != LOV_MAGIC_JOIN) {
-                                dump_lsm(D_ERROR, lsm);
-                                LBUG();
-                        }
-                        CDEBUG(D_INODE, "adding lsm %p to inode %lu/%u(%p)\n",
-                               lsm, inode->i_ino, inode->i_generation, inode);
-                        /* ll_inode_size_lock() requires it is only called
-                         * with lli_smd != NULL or lock_lsm == 0 or we can
-                         * race between lock/unlock.  bug 9547 */
-                        lli->lli_smd = lsm;
-                        lli->lli_maxbytes = lsm->lsm_maxbytes;
-                        if (lli->lli_maxbytes > PAGE_CACHE_MAXBYTES)
-                                lli->lli_maxbytes = PAGE_CACHE_MAXBYTES;
-                } else {
-                        if (lli->lli_smd->lsm_magic == lsm->lsm_magic &&
-                             lli->lli_smd->lsm_stripe_count ==
-                                        lsm->lsm_stripe_count) {
-                                if (lov_stripe_md_cmp(lli->lli_smd, lsm)) {
-                                        CERROR("lsm mismatch for inode %ld\n",
-                                                inode->i_ino);
-                                        CERROR("lli_smd:\n");
-                                        dump_lsm(D_ERROR, lli->lli_smd);
-                                        CERROR("lsm:\n");
-                                        dump_lsm(D_ERROR, lsm);
-                                        LBUG();
-                                }
-                        } else
-                                ll_replace_lsm(inode, lsm);
-                }
-                if (lli->lli_smd != lsm)
-                        obd_free_memmd(ll_i2obdexp(inode), &lsm);
-        }
-
-#ifdef CONFIG_FS_POSIX_ACL
-        LASSERT(!md->posix_acl || (body->valid & OBD_MD_FLACL));
-        if (body->valid & OBD_MD_FLACL) {
-                spin_lock(&lli->lli_lock);
-                if (lli->lli_posix_acl)
-                        posix_acl_release(lli->lli_posix_acl);
-                lli->lli_posix_acl = md->posix_acl;
-                spin_unlock(&lli->lli_lock);
-        }
-#endif
-
-        if (body->valid & OBD_MD_FLID)
-                inode->i_ino = body->ino;
-        if (body->valid & OBD_MD_FLATIME &&
-            body->atime > LTIME_S(inode->i_atime))
-                LTIME_S(inode->i_atime) = body->atime;
-
-        /* mtime is always updated with ctime, but can be set in past.
-           As write and utime(2) may happen within 1 second, and utime's
-           mtime has a priority over write's one, so take mtime from mds
-           for the same ctimes. */
-        if (body->valid & OBD_MD_FLCTIME &&
-            body->ctime >= LTIME_S(inode->i_ctime)) {
-                LTIME_S(inode->i_ctime) = body->ctime;
-                if (body->valid & OBD_MD_FLMTIME) {
-                        CDEBUG(D_INODE, "setting ino %lu mtime "
-                               "from %lu to "LPU64"\n", inode->i_ino,
-                               LTIME_S(inode->i_mtime), body->mtime);
-                        LTIME_S(inode->i_mtime) = body->mtime;
-                }
-        }
-        if (body->valid & OBD_MD_FLMODE)
-                inode->i_mode = (inode->i_mode & S_IFMT)|(body->mode & ~S_IFMT);
-        if (body->valid & OBD_MD_FLTYPE)
-                inode->i_mode = (inode->i_mode & ~S_IFMT)|(body->mode & S_IFMT);
-        if (S_ISREG(inode->i_mode)) {
-                inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS+1, LL_MAX_BLKSIZE_BITS);
-        } else {
-                inode->i_blkbits = inode->i_sb->s_blocksize_bits;
-        }
-#ifdef HAVE_INODE_BLKSIZE
-        inode->i_blksize = 1<<inode->i_blkbits;
-#endif
-        if (body->valid & OBD_MD_FLUID)
-                inode->i_uid = body->uid;
-        if (body->valid & OBD_MD_FLGID)
-                inode->i_gid = body->gid;
-        if (body->valid & OBD_MD_FLFLAGS)
-                inode->i_flags = ll_ext_to_inode_flags(body->flags);
-        if (body->valid & OBD_MD_FLNLINK)
-                inode->i_nlink = body->nlink;
-        if (body->valid & OBD_MD_FLGENER)
-                inode->i_generation = body->generation;
-        if (body->valid & OBD_MD_FLRDEV)
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-                inode->i_rdev = body->rdev;
-#else
-                inode->i_rdev = old_decode_dev(body->rdev);
-#endif
-        if (body->valid & OBD_MD_FLSIZE) {
-#if 0           /* Can't block ll_test_inode->ll_update_inode, b=14326*/
-                ll_inode_size_lock(inode, 0);
-                i_size_write(inode, body->size);
-                ll_inode_size_unlock(inode, 0);
-#else
-                inode->i_size = body->size;
-#endif
-        }
-        if (body->valid & OBD_MD_FLBLOCKS)
-                inode->i_blocks = body->blocks;
-
-        if (body->valid & OBD_MD_FLSIZE)
-                set_bit(LLI_F_HAVE_MDS_SIZE_LOCK, &lli->lli_flags);
-}
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-static struct backing_dev_info ll_backing_dev_info = {
-        .ra_pages       = 0,    /* No readahead */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12))
-        .capabilities   = 0,    /* Does contribute to dirty memory */
-#else
-        .memory_backed  = 0,    /* Does contribute to dirty memory */
-#endif
-};
-#endif
-
-void ll_read_inode2(struct inode *inode, void *opaque)
-{
-        struct lustre_md *md = opaque;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n", inode->i_ino,
-               inode->i_generation, inode);
-
-        ll_lli_init(lli);
-
-        LASSERT(!lli->lli_smd);
-
-        /* Core attributes from the MDS first.  This is a new inode, and
-         * the VFS doesn't zero times in the core inode so we have to do
-         * it ourselves.  They will be overwritten by either MDS or OST
-         * attributes - we just need to make sure they aren't newer. */
-        LTIME_S(inode->i_mtime) = 0;
-        LTIME_S(inode->i_atime) = 0;
-        LTIME_S(inode->i_ctime) = 0;
-        inode->i_rdev = 0;
-        ll_update_inode(inode, md);
-
-        /* OIDEBUG(inode); */
-
-        if (S_ISREG(inode->i_mode)) {
-                struct ll_sb_info *sbi = ll_i2sbi(inode);
-                inode->i_op = &ll_file_inode_operations;
-                inode->i_fop = sbi->ll_fop;
-                inode->i_mapping->a_ops = &ll_aops;
-                EXIT;
-        } else if (S_ISDIR(inode->i_mode)) {
-                inode->i_op = &ll_dir_inode_operations;
-                inode->i_fop = &ll_dir_operations;
-                inode->i_mapping->a_ops = &ll_dir_aops;
-                EXIT;
-        } else if (S_ISLNK(inode->i_mode)) {
-                inode->i_op = &ll_fast_symlink_inode_operations;
-                EXIT;
-        } else {
-                inode->i_op = &ll_special_inode_operations;
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-                init_special_inode(inode, inode->i_mode,
-                                   kdev_t_to_nr(inode->i_rdev));
-
-                /* initializing backing dev info. */
-                inode->i_mapping->backing_dev_info = &ll_backing_dev_info;
-#else
-                init_special_inode(inode, inode->i_mode, inode->i_rdev);
-#endif
-                EXIT;
-        }
-}
-
-int ll_iocontrol(struct inode *inode, struct file *file,
-                 unsigned int cmd, unsigned long arg)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ptlrpc_request *req = NULL;
-        int rc, flags = 0;
-        ENTRY;
-
-        switch(cmd) {
-        case EXT3_IOC_GETFLAGS: {
-                struct ll_fid fid;
-                struct mds_body *body;
-
-                ll_inode2fid(&fid, inode);
-                rc = mdc_getattr(sbi->ll_mdc_exp, &fid, OBD_MD_FLFLAGS,0,&req);
-                if (rc) {
-                        CERROR("failure %d inode %lu\n", rc, inode->i_ino);
-                        RETURN(-abs(rc));
-                }
-
-                body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*body));
-
-                /* We want to return EXT3_*_FL flags to the caller via this
-                 * ioctl.  An older MDS may be sending S_* flags, fix it up. */
-                flags = ll_inode_to_ext_flags(body->flags,
-                                              body->flags &MDS_BFLAG_EXT_FLAGS);
-                ptlrpc_req_finished (req);
-
-                RETURN(put_user(flags, (int *)arg));
-        }
-        case EXT3_IOC_SETFLAGS: {
-                struct mdc_op_data op_data;
-                struct ll_iattr_struct attr;
-                struct obd_info oinfo = { { { 0 } } };
-                struct lov_stripe_md *lsm = ll_i2info(inode)->lli_smd;
-
-                if (get_user(flags, (int *)arg))
-                        RETURN(-EFAULT);
-
-                oinfo.oi_md = lsm;
-                OBDO_ALLOC(oinfo.oi_oa);
-                if (!oinfo.oi_oa)
-                        RETURN(-ENOMEM);
-
-                ll_prepare_mdc_op_data(&op_data, inode, NULL, NULL, 0, 0, NULL);
-
-                memset(&attr, 0, sizeof(attr));
-                attr.ia_attr_flags = flags;
-                ((struct iattr *)&attr)->ia_valid |= ATTR_ATTR_FLAG;
-
-                rc = mdc_setattr(sbi->ll_mdc_exp, &op_data,
-                                 (struct iattr *)&attr, NULL, 0, NULL, 0, &req);
-                ptlrpc_req_finished(req);
-                if (rc || lsm == NULL) {
-                        OBDO_FREE(oinfo.oi_oa);
-                        RETURN(rc);
-                }
-
-                oinfo.oi_oa->o_id = lsm->lsm_object_id;
-                oinfo.oi_oa->o_flags = flags;
-                oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLFLAGS;
-
-                obdo_from_inode(oinfo.oi_oa, inode,
-                                OBD_MD_FLFID | OBD_MD_FLGENER);
-                rc = obd_setattr_rqset(sbi->ll_osc_exp, &oinfo, NULL);
-                OBDO_FREE(oinfo.oi_oa);
-                if (rc) {
-                        if (rc != -EPERM && rc != -EACCES)
-                                CERROR("mdc_setattr_async fails: rc = %d\n", rc);
-                        RETURN(rc);
-                }
-
-                inode->i_flags = ll_ext_to_inode_flags(flags |
-                                                       MDS_BFLAG_EXT_FLAGS);
-                RETURN(0);
-        }
-        default:
-                RETURN(-ENOSYS);
-        }
-
-        RETURN(0);
-}
-
-/* umount -f client means force down, don't save state */
-#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT
-void ll_umount_begin(struct vfsmount *vfsmnt, int flags)
-{
-        struct super_block *sb = vfsmnt->mnt_sb;
-#else
-void ll_umount_begin(struct super_block *sb)
-{
-#endif
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        struct obd_device *obd;
-        struct obd_ioctl_data ioc_data = { 0 };
-        ENTRY;
-
-#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT
-        if (!(flags & MNT_FORCE)) {
-                EXIT;
-                return;
-        }
-#endif
-
-        /* Tell the MGC we got umount -f */
-        lsi->lsi_flags |= LSI_UMOUNT_FORCE;
-
-        CDEBUG(D_VFSTRACE, "VFS Op: superblock %p count %d active %d\n", sb,
-               sb->s_count, atomic_read(&sb->s_active));
-
-        obd = class_exp2obd(sbi->ll_mdc_exp);
-        if (obd == NULL) {
-                CERROR("Invalid MDC connection handle "LPX64"\n",
-                       sbi->ll_mdc_exp->exp_handle.h_cookie);
-                EXIT;
-                return;
-        }
-        obd->obd_force = 1;
-        obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_mdc_exp, sizeof ioc_data,
-                      &ioc_data, NULL);
-
-        obd = class_exp2obd(sbi->ll_osc_exp);
-        if (obd == NULL) {
-                CERROR("Invalid LOV connection handle "LPX64"\n",
-                       sbi->ll_osc_exp->exp_handle.h_cookie);
-                EXIT;
-                return;
-        }
-
-        obd->obd_force = 1;
-        obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_osc_exp, sizeof ioc_data,
-                      &ioc_data, NULL);
-
-        /* Really, we'd like to wait until there are no requests outstanding,
-         * and then continue.  For now, we just invalidate the requests,
-         * schedule, and hope.
-         */
-        schedule();
-
-        EXIT;
-}
-
-int ll_remount_fs(struct super_block *sb, int *flags, char *data)
-{
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        int err;
-        __u32 read_only;
-
-        if ((*flags & MS_RDONLY) != (sb->s_flags & MS_RDONLY)) {
-                read_only = *flags & MS_RDONLY;
-                err = obd_set_info_async(sbi->ll_mdc_exp, strlen("read-only"),
-                                         "read-only", sizeof(read_only),
-                                         &read_only, NULL);
-                if (err) {
-                        CERROR("Failed to change the read-only flag during "
-                               "remount: %d\n", err);
-                        return err;
-                }
-
-                if (read_only)
-                        sb->s_flags |= MS_RDONLY;
-                else
-                        sb->s_flags &= ~MS_RDONLY;
-        }
-        return 0;
-}
-
-int ll_prep_inode(struct obd_export *exp, struct inode **inode,
-                  struct ptlrpc_request *req, int offset,struct super_block *sb)
-{
-        struct lustre_md md;
-        struct ll_sb_info *sbi = NULL;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(*inode || sb);
-        sbi = sb ? ll_s2sbi(sb) : ll_i2sbi(*inode);
-        prune_deathrow(sbi, 1);
-
-        rc = mdc_req2lustre_md(req, offset, exp, &md);
-        if (rc)
-                RETURN(rc);
-
-        if (*inode) {
-                ll_update_inode(*inode, &md);
-        } else {
-                LASSERT(sb);
-                *inode = ll_iget(sb, md.body->ino, &md);
-                if (*inode == NULL || is_bad_inode(*inode)) {
-                        mdc_free_lustre_md(exp, &md);
-                        rc = -ENOMEM;
-                        CERROR("new_inode -fatal: rc %d\n", rc);
-                        GOTO(out, rc);
-                }
-        }
-
-        rc = obd_checkmd(exp, ll_i2mdcexp(*inode),
-                         ll_i2info(*inode)->lli_smd);
-out:
-        RETURN(rc);
-}
-
-char *llap_origins[] = {
-        [LLAP_ORIGIN_UNKNOWN] = "--",
-        [LLAP_ORIGIN_READPAGE] = "rp",
-        [LLAP_ORIGIN_READAHEAD] = "ra",
-        [LLAP_ORIGIN_COMMIT_WRITE] = "cw",
-        [LLAP_ORIGIN_WRITEPAGE] = "wp",
-        [LLAP_ORIGIN_LOCKLESS_IO] = "ls"
-};
-
-struct ll_async_page *llite_pglist_next_llap(struct ll_sb_info *sbi,
-                                             struct list_head *list)
-{
-        struct ll_async_page *llap;
-        struct list_head *pos;
-
-        list_for_each(pos, list) {
-                if (pos == &sbi->ll_pglist)
-                        return NULL;
-                llap = list_entry(pos, struct ll_async_page, llap_pglist_item);
-                if (llap->llap_page == NULL)
-                        continue;
-                return llap;
-        }
-        LBUG();
-        return NULL;
-}
-
-int ll_obd_statfs(struct inode *inode, void *arg)
-{
-        struct ll_sb_info *sbi = NULL;
-        struct obd_device *client_obd = NULL, *lov_obd = NULL;
-        struct lov_obd *lov = NULL;
-        struct obd_statfs stat_buf = {0};
-        char *buf = NULL;
-        struct obd_ioctl_data *data = NULL;
-        __u32 type, index;
-        int len = 0, rc;
-
-        if (!inode || !(sbi = ll_i2sbi(inode)))
-                GOTO(out_statfs, rc = -EINVAL);
-
-        rc = obd_ioctl_getdata(&buf, &len, arg);
-        if (rc)
-                GOTO(out_statfs, rc);
-
-        data = (void*)buf;
-        if (!data->ioc_inlbuf1 || !data->ioc_inlbuf2 ||
-            !data->ioc_pbuf1 || !data->ioc_pbuf2)
-                GOTO(out_statfs, rc = -EINVAL);
-
-        memcpy(&type, data->ioc_inlbuf1, sizeof(__u32));
-        memcpy(&index, data->ioc_inlbuf2, sizeof(__u32));
-
-        if (type == LL_STATFS_MDC) {
-                if (index > 0)
-                        GOTO(out_statfs, rc = -ENODEV);
-                client_obd = class_exp2obd(sbi->ll_mdc_exp);
-        } else if (type == LL_STATFS_LOV) {
-                lov_obd = class_exp2obd(sbi->ll_osc_exp);
-                lov = &lov_obd->u.lov;
-
-                if (index >= lov->desc.ld_tgt_count)
-                        GOTO(out_statfs, rc = -ENODEV);
-
-                if (!lov->lov_tgts[index])
-                        /* Try again with the next index */
-                        GOTO(out_statfs, rc = -EAGAIN);
-
-                client_obd = class_exp2obd(lov->lov_tgts[index]->ltd_exp);
-                if (!lov->lov_tgts[index]->ltd_active)
-                        GOTO(out_uuid, rc = -ENODATA);
-        }
-
-        if (!client_obd)
-                GOTO(out_statfs, rc = -EINVAL);
-
-        rc = obd_statfs(client_obd, &stat_buf, cfs_time_current_64() - HZ, 1);
-        if (rc)
-                GOTO(out_statfs, rc);
-
-        if (copy_to_user(data->ioc_pbuf1, &stat_buf, data->ioc_plen1))
-                GOTO(out_statfs, rc = -EFAULT);
-
-out_uuid:
-        if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(client_obd),
-                         data->ioc_plen2))
-                rc = -EFAULT;
-
-out_statfs:
-        if (buf)
-                obd_ioctl_freedata(buf, len);
-        return rc;
-}
-
-int ll_process_config(struct lustre_cfg *lcfg)
-{
-        char *ptr;
-        void *sb;
-        struct lprocfs_static_vars lvars;
-        unsigned long x;
-        int rc = 0;
-
-        lprocfs_llite_init_vars(&lvars);
-
-        /* The instance name contains the sb: lustre-client-aacfe000 */
-        ptr = strrchr(lustre_cfg_string(lcfg, 0), '-');
-        if (!ptr || !*(++ptr))
-                return -EINVAL;
-        if (sscanf(ptr, "%lx", &x) != 1)
-                return -EINVAL;
-        sb = (void *)x;
-        /* This better be a real Lustre superblock! */
-        LASSERT(s2lsi((struct super_block *)sb)->lsi_lmd->lmd_magic == LMD_MAGIC);
-
-        /* Note we have not called client_common_fill_super yet, so
-           proc fns must be able to handle that! */
-        rc = class_process_proc_param(PARAM_LLITE, lvars.obd_vars,
-                                      lcfg, sb);
-        return(rc);
-}
-
diff --git a/lustre/llite/llite_mmap.c b/lustre/llite/llite_mmap.c
deleted file mode 100644
index 275ea3d915dfeaa1b0c37653d2481da6c5839914..0000000000000000000000000000000000000000
--- a/lustre/llite/llite_mmap.c
+++ /dev/null
@@ -1,668 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/smp_lock.h>
-#include <linux/unistd.h>
-#include <linux/version.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include <linux/fs.h>
-#include <linux/stat.h>
-#include <asm/uaccess.h>
-#include <linux/mm.h>
-#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/iobuf.h>
-#endif
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <lustre_lite.h>
-#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
-
-#define VMA_DEBUG(vma, fmt, arg...)                                     \
-        CDEBUG(D_MMAP, "vma(%p) start(%ld) end(%ld) pgoff(%ld) inode(%p) "   \
-               "ino(%lu) iname(%s): " fmt, vma, vma->vm_start, vma->vm_end,  \
-               vma->vm_pgoff, vma->vm_file->f_dentry->d_inode,               \
-               vma->vm_file->f_dentry->d_inode->i_ino,                       \
-               vma->vm_file->f_dentry->d_iname, ## arg);                     \
-
-
-struct ll_lock_tree_node {
-        rb_node_t               lt_node;
-        struct list_head        lt_locked_item;
-        __u64                   lt_oid;
-        ldlm_policy_data_t      lt_policy;
-        struct lustre_handle    lt_lockh;
-        ldlm_mode_t             lt_mode;
-        struct inode           *lt_inode;
-};
-
-int lt_get_mmap_locks(struct ll_lock_tree *tree,
-                      unsigned long addr, size_t count);
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
-                       int *type);
-#else
-
-struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
-                       int unused);
-#endif
-
-struct ll_lock_tree_node * ll_node_from_inode(struct inode *inode, __u64 start,
-                                              __u64 end, ldlm_mode_t mode)
-{
-        struct ll_lock_tree_node *node;
-
-        OBD_ALLOC(node, sizeof(*node));
-        if (node == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-
-        node->lt_inode = inode;
-        node->lt_oid = ll_i2info(inode)->lli_smd->lsm_object_id;
-        node->lt_policy.l_extent.start = start;
-        node->lt_policy.l_extent.end = end;
-        memset(&node->lt_lockh, 0, sizeof(node->lt_lockh));
-        INIT_LIST_HEAD(&node->lt_locked_item);
-        node->lt_mode = mode;
-
-        return node;
-}
-
-int lt_compare(struct ll_lock_tree_node *one, struct ll_lock_tree_node *two)
-{
-        /* To avoid multiple fs deadlock */
-        if (one->lt_inode->i_sb->s_dev < two->lt_inode->i_sb->s_dev)
-                return -1;
-        if (one->lt_inode->i_sb->s_dev > two->lt_inode->i_sb->s_dev)
-                return 1;
-
-        if (one->lt_oid < two->lt_oid)
-                return -1;
-        if (one->lt_oid > two->lt_oid)
-                return 1;
-
-        if (one->lt_policy.l_extent.end < two->lt_policy.l_extent.start)
-                return -1;
-        if (one->lt_policy.l_extent.start > two->lt_policy.l_extent.end)
-                return 1;
-
-        return 0; /* they are the same object and overlap */
-}
-
-static void lt_merge(struct ll_lock_tree_node *dst,
-                     struct ll_lock_tree_node *src)
-{
-        dst->lt_policy.l_extent.start = min(dst->lt_policy.l_extent.start,
-                                            src->lt_policy.l_extent.start);
-        dst->lt_policy.l_extent.end = max(dst->lt_policy.l_extent.end,
-                                          src->lt_policy.l_extent.end);
-
-        /* XXX could be a real call to the dlm to find superset modes */
-        if (src->lt_mode == LCK_PW && dst->lt_mode != LCK_PW)
-                dst->lt_mode = LCK_PW;
-}
-
-static void lt_insert(struct ll_lock_tree *tree,
-                      struct ll_lock_tree_node *node)
-{
-        struct ll_lock_tree_node *walk;
-        rb_node_t **p, *parent;
-        ENTRY;
-
-restart:
-        p = &tree->lt_root.rb_node;
-        parent = NULL;
-        while (*p) {
-                parent = *p;
-                walk = rb_entry(parent, struct ll_lock_tree_node, lt_node);
-                switch (lt_compare(node, walk)) {
-                case -1:
-                        p = &(*p)->rb_left;
-                        break;
-                case 1:
-                        p = &(*p)->rb_right;
-                        break;
-                case 0:
-                        lt_merge(node, walk);
-                        rb_erase(&walk->lt_node, &tree->lt_root);
-                        OBD_FREE(walk, sizeof(*walk));
-                        goto restart;
-                        break;
-                default:
-                        LBUG();
-                        break;
-                }
-        }
-        rb_link_node(&node->lt_node, parent, p);
-        rb_insert_color(&node->lt_node, &tree->lt_root);
-        EXIT;
-}
-
-static struct ll_lock_tree_node *lt_least_node(struct ll_lock_tree *tree)
-{
-        rb_node_t *rbnode;
-        struct ll_lock_tree_node *node = NULL;
-
-        for ( rbnode = tree->lt_root.rb_node; rbnode != NULL;
-              rbnode = rbnode->rb_left) {
-                if (rbnode->rb_left == NULL) {
-                        node = rb_entry(rbnode, struct ll_lock_tree_node,
-                                        lt_node);
-                        break;
-                }
-        }
-        RETURN(node);
-}
-
-int ll_tree_unlock(struct ll_lock_tree *tree)
-{
-        struct ll_lock_tree_node *node;
-        struct list_head *pos, *n;
-        struct inode *inode;
-        int rc = 0;
-        ENTRY;
-
-        list_for_each_safe(pos, n, &tree->lt_locked_list) {
-                node = list_entry(pos, struct ll_lock_tree_node,
-                                  lt_locked_item);
-
-                inode = node->lt_inode;
-                rc = ll_extent_unlock(tree->lt_fd, inode,
-                                      ll_i2info(inode)->lli_smd, node->lt_mode,
-                                      &node->lt_lockh);
-                if (rc != 0) {
-                        /* XXX better message */
-                        CERROR("couldn't unlock %d\n", rc);
-                }
-                list_del(&node->lt_locked_item);
-                OBD_FREE(node, sizeof(*node));
-        }
-
-        while ((node = lt_least_node(tree))) {
-                rb_erase(&node->lt_node, &tree->lt_root);
-                OBD_FREE(node, sizeof(*node));
-        }
-
-        RETURN(rc);
-}
-
-int ll_tree_lock_iov(struct ll_lock_tree *tree,
-                 struct ll_lock_tree_node *first_node,
-                 const struct iovec *iov, unsigned long nr_segs, int ast_flags)
-{
-        struct ll_lock_tree_node *node;
-        int rc = 0;
-        unsigned long seg;
-        ENTRY;
-
-        tree->lt_root.rb_node = NULL;
-        INIT_LIST_HEAD(&tree->lt_locked_list);
-        if (first_node != NULL)
-                lt_insert(tree, first_node);
-
-        /* To avoid such subtle deadlock case: client1 try to read file1 to
-         * mmapped file2, on the same time, client2 try to read file2 to
-         * mmapped file1.*/
-        for (seg = 0; seg < nr_segs; seg++) {
-                const struct iovec *iv = &iov[seg];
-                rc = lt_get_mmap_locks(tree, (unsigned long)iv->iov_base,
-                                       iv->iov_len);
-                if (rc)
-                        GOTO(out, rc);
-        }
-
-        while ((node = lt_least_node(tree))) {
-                struct inode *inode = node->lt_inode;
-                rc = ll_extent_lock(tree->lt_fd, inode,
-                                    ll_i2info(inode)->lli_smd, node->lt_mode,
-                                    &node->lt_policy, &node->lt_lockh,
-                                    ast_flags);
-                if (rc != 0)
-                        GOTO(out, rc);
-
-                rb_erase(&node->lt_node, &tree->lt_root);
-                list_add_tail(&node->lt_locked_item, &tree->lt_locked_list);
-        }
-        RETURN(rc);
-out:
-        ll_tree_unlock(tree);
-        RETURN(rc);
-}
-
-int ll_tree_lock(struct ll_lock_tree *tree,
-                 struct ll_lock_tree_node *first_node,
-                 const char *buf, size_t count, int ast_flags)
-{
-        struct iovec local_iov = { .iov_base = (void __user *)buf,
-                                   .iov_len = count };
-
-        return ll_tree_lock_iov(tree, first_node, &local_iov, 1, ast_flags);
-}
-
-static ldlm_mode_t mode_from_vma(struct vm_area_struct *vma)
-{
-        /* we only want to hold PW locks if the mmap() can generate
-         * writes back to the file and that only happens in shared
-         * writable vmas */
-        if ((vma->vm_flags & VM_SHARED) && (vma->vm_flags & VM_WRITE))
-                return LCK_PW;
-        return LCK_PR;
-}
-
-static void policy_from_vma(ldlm_policy_data_t *policy,
-                            struct vm_area_struct *vma, unsigned long addr,
-                            size_t count)
-{
-        policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) +
-                                 ((__u64)vma->vm_pgoff << CFS_PAGE_SHIFT);
-        policy->l_extent.end = (policy->l_extent.start + count - 1) |
-                               ~CFS_PAGE_MASK;
-}
-
-static struct vm_area_struct * our_vma(unsigned long addr, size_t count)
-{
-        struct mm_struct *mm = current->mm;
-        struct vm_area_struct *vma, *ret = NULL;
-        ENTRY;
-
-        /* No MM (e.g. NFS)? No vmas too. */
-        if (!mm)
-                RETURN(NULL);
-
-        spin_lock(&mm->page_table_lock);
-        for(vma = find_vma(mm, addr);
-            vma != NULL && vma->vm_start < (addr + count); vma = vma->vm_next) {
-                if (vma->vm_ops && vma->vm_ops->nopage == ll_nopage &&
-                    vma->vm_flags & VM_SHARED) {
-                        ret = vma;
-                        break;
-                }
-        }
-        spin_unlock(&mm->page_table_lock);
-        RETURN(ret);
-}
-
-int lt_get_mmap_locks(struct ll_lock_tree *tree,
-                      unsigned long addr, size_t count)
-{
-        struct vm_area_struct *vma;
-        struct ll_lock_tree_node *node;
-        ldlm_policy_data_t policy;
-        struct inode *inode;
-        ENTRY;
-
-        if (count == 0)
-                RETURN(0);
-
-        /* we need to look up vmas on page aligned addresses */
-        count += addr & (~CFS_PAGE_MASK);
-        addr &= CFS_PAGE_MASK;
-
-        while ((vma = our_vma(addr, count)) != NULL) {
-                LASSERT(vma->vm_file);
-
-                inode = vma->vm_file->f_dentry->d_inode;
-                policy_from_vma(&policy, vma, addr, count);
-                node = ll_node_from_inode(inode, policy.l_extent.start,
-                                          policy.l_extent.end,
-                                          mode_from_vma(vma));
-                if (IS_ERR(node)) {
-                        CERROR("not enough mem for lock_tree_node!\n");
-                        RETURN(-ENOMEM);
-                }
-                lt_insert(tree, node);
-
-                if (vma->vm_end - addr >= count)
-                        break;
-                count -= vma->vm_end - addr;
-                addr = vma->vm_end;
-        }
-        RETURN(0);
-}
-
-/* FIXME: there is a pagefault race goes as follow (only 2.4):
- * 1. A user process on node A accesses a portion of a mapped file,
- *    resulting in a page fault.  The pagefault handler invokes the
- *    ll_nopage function, which reads the page into memory.
- * 2. A user process on node B writes to the same portion of the file
- *    (either via mmap or write()), that cause node A to cancel the
- *    lock and truncate the page.
- * 3. Node A then executes the rest of do_no_page(), entering the
- *    now-invalid page into the PTEs.
- *
- * Make the whole do_no_page as a hook to cover both the page cache
- * and page mapping installing with dlm lock would eliminate this race.
- *
- * In 2.6, the truncate_count of address_space can cover this race.
- */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
-                       int *type)
-#else
-struct page *ll_nopage(struct vm_area_struct *vma, unsigned long address,
-                       int type /* unused */)
-#endif
-{
-        struct file *filp = vma->vm_file;
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(filp);
-        struct inode *inode = filp->f_dentry->d_inode;
-        struct lustre_handle lockh = { 0 };
-        ldlm_policy_data_t policy;
-        ldlm_mode_t mode;
-        struct page *page = NULL;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm;
-        struct ost_lvb lvb;
-        __u64 kms, old_mtime;
-        unsigned long pgoff, size, rand_read, seq_read;
-        int rc = 0;
-        ENTRY;
-
-        if (lli->lli_smd == NULL) {
-                CERROR("No lsm on fault?\n");
-                RETURN(NULL);
-        }
-
-        ll_clear_file_contended(inode);
-
-        /* start and end the lock on the first and last bytes in the page */
-        policy_from_vma(&policy, vma, address, CFS_PAGE_SIZE);
-
-        CDEBUG(D_MMAP, "nopage vma %p inode %lu, locking ["LPU64", "LPU64"]\n",
-               vma, inode->i_ino, policy.l_extent.start, policy.l_extent.end);
-
-        mode = mode_from_vma(vma);
-        old_mtime = LTIME_S(inode->i_mtime);
-
-        lsm = lli->lli_smd;
-        rc = ll_extent_lock(fd, inode, lsm, mode, &policy,
-                            &lockh, LDLM_FL_CBPENDING | LDLM_FL_NO_LRU);
-        if (rc != 0)
-                RETURN(NULL);
-
-        if (vma->vm_flags & VM_EXEC && LTIME_S(inode->i_mtime) != old_mtime)
-                CWARN("binary changed. inode %lu\n", inode->i_ino);
-
-        lov_stripe_lock(lsm);
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1);
-        kms = lvb.lvb_size;
-
-        pgoff = ((address - vma->vm_start) >> CFS_PAGE_SHIFT) + vma->vm_pgoff;
-        size = (kms + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-
-        if (pgoff >= size) {
-                lov_stripe_unlock(lsm);
-                ll_glimpse_size(inode, LDLM_FL_BLOCK_GRANTED);
-        } else {
-                /* XXX change inode size without ll_inode_size_lock() held!
-                 *     there is a race condition with truncate path. (see
-                 *     ll_extent_lock) */
-                /* XXX i_size_write() is not used because it is not safe to
-                 *     take the ll_inode_size_lock() due to a potential lock
-                 *     inversion (bug 6077).  And since it's not safe to use
-                 *     i_size_write() without a covering mutex we do the
-                 *     assignment directly.  It is not critical that the
-                 *     size be correct. */
-                /* NOTE: region is within kms and, hence, within real file size (A).
-                 * We need to increase i_size to cover the read region so that
-                 * generic_file_read() will do its job, but that doesn't mean
-                 * the kms size is _correct_, it is only the _minimum_ size.
-                 * If someone does a stat they will get the correct size which
-                 * will always be >= the kms value here.  b=11081 */
-                if (i_size_read(inode) < kms) {
-                        inode->i_size = kms;
-                        CDEBUG(D_INODE, "ino=%lu, updating i_size %llu\n",
-                               inode->i_ino, i_size_read(inode));
-                }
-                lov_stripe_unlock(lsm);
-        }
-
-        /* If mapping is writeable, adjust kms to cover this page,
-         * but do not extend kms beyond actual file size.
-         * policy.l_extent.end is set to the end of the page by policy_from_vma
-         * bug 10919 */
-        lov_stripe_lock(lsm);
-        if (mode == LCK_PW)
-                obd_adjust_kms(ll_i2obdexp(inode), lsm,
-                               min_t(loff_t, policy.l_extent.end + 1,
-                               i_size_read(inode)), 0);
-        lov_stripe_unlock(lsm);
-
-        /* disable VM_SEQ_READ and use VM_RAND_READ to make sure that
-         * the kernel will not read other pages not covered by ldlm in
-         * filemap_nopage. we do our readahead in ll_readpage.
-         */
-        rand_read = vma->vm_flags & VM_RAND_READ;
-        seq_read = vma->vm_flags & VM_SEQ_READ;
-        vma->vm_flags &= ~ VM_SEQ_READ;
-        vma->vm_flags |= VM_RAND_READ;
-
-        page = filemap_nopage(vma, address, type);
-        LL_CDEBUG_PAGE(D_PAGE, page, "got addr %lu type %lx\n", address,
-                       (long)type);
-        vma->vm_flags &= ~VM_RAND_READ;
-        vma->vm_flags |= (rand_read | seq_read);
-
-        ll_extent_unlock(fd, inode, ll_i2info(inode)->lli_smd, mode, &lockh);
-        RETURN(page);
-}
-
-/* To avoid cancel the locks covering mmapped region for lock cache pressure,
- * we track the mapped vma count by lli_mmap_cnt.
- * ll_vm_open():  when first vma is linked, split locks from lru.
- * ll_vm_close(): when last vma is unlinked, join all this file's locks to lru.
- *
- * XXX we don't check the if the region of vma/lock for performance.
- */
-static void ll_vm_open(struct vm_area_struct * vma)
-{
-        struct inode *inode = vma->vm_file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        ENTRY;
-
-        LASSERT(vma->vm_file);
-
-        spin_lock(&lli->lli_lock);
-        LASSERT(atomic_read(&lli->lli_mmap_cnt) >= 0);
-
-        atomic_inc(&lli->lli_mmap_cnt);
-        if (atomic_read(&lli->lli_mmap_cnt) == 1) {
-                struct lov_stripe_md *lsm = lli->lli_smd;
-                struct ll_sb_info *sbi = ll_i2sbi(inode);
-                int count;
-
-                spin_unlock(&lli->lli_lock);
-
-                if (!lsm)
-                        return;
-                count = obd_join_lru(sbi->ll_osc_exp, lsm, 0);
-                VMA_DEBUG(vma, "split %d unused locks from lru\n", count);
-        } else {
-                spin_unlock(&lli->lli_lock);
-        }
-
-}
-
-static void ll_vm_close(struct vm_area_struct *vma)
-{
-        struct inode *inode = vma->vm_file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        ENTRY;
-
-        LASSERT(vma->vm_file);
-
-        spin_lock(&lli->lli_lock);
-        LASSERT(atomic_read(&lli->lli_mmap_cnt) > 0);
-
-        atomic_dec(&lli->lli_mmap_cnt);
-        if (atomic_read(&lli->lli_mmap_cnt) == 0) {
-                struct lov_stripe_md *lsm = lli->lli_smd;
-                struct ll_sb_info *sbi = ll_i2sbi(inode);
-                int count;
-
-                spin_unlock(&lli->lli_lock);
-
-                if (!lsm)
-                        return;
-                count = obd_join_lru(sbi->ll_osc_exp, lsm, 1);
-                VMA_DEBUG(vma, "join %d unused locks to lru\n", count);
-        } else {
-                spin_unlock(&lli->lli_lock);
-        }
-}
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#ifndef HAVE_FILEMAP_POPULATE
-static int (*filemap_populate)(struct vm_area_struct * area, unsigned long address, unsigned long len, pgprot_t prot, unsigned long pgoff, int nonblock);
-#endif
-static int ll_populate(struct vm_area_struct *area, unsigned long address,
-                       unsigned long len, pgprot_t prot, unsigned long pgoff,
-                       int nonblock)
-{
-        int rc = 0;
-        ENTRY;
-
-        /* always set nonblock as true to avoid page read ahead */
-        rc = filemap_populate(area, address, len, prot, pgoff, 1);
-        RETURN(rc);
-}
-#endif
-
-/* return the user space pointer that maps to a file offset via a vma */
-static inline unsigned long file_to_user(struct vm_area_struct *vma, __u64 byte)
-{
-        return vma->vm_start + (byte - ((__u64)vma->vm_pgoff << CFS_PAGE_SHIFT));
-
-}
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-/* [first, last] are the byte offsets affected.
- * vm_{start, end} are user addresses of the first byte of the mapping and
- *      the next byte beyond it
- * vm_pgoff is the page index of the first byte in the mapping */
-static void teardown_vmas(struct vm_area_struct *vma, __u64 first,
-                          __u64 last)
-{
-        unsigned long address, len;
-        for (; vma ; vma = vma->vm_next_share) {
-                if (last >> CFS_PAGE_SHIFT < vma->vm_pgoff)
-                        continue;
-                if (first >> CFS_PAGE_SHIFT >= (vma->vm_pgoff +
-                    ((vma->vm_end - vma->vm_start) >> CFS_PAGE_SHIFT)))
-                        continue;
-
-                /* XXX in case of unmap the cow pages of a running file,
-                 * don't unmap these private writeable mapping here!
-                 * though that will break private mappping a little.
-                 *
-                 * the clean way is to check the mapping of every page
-                 * and just unmap the non-cow pages, just like
-                 * unmap_mapping_range() with even_cow=0 in kernel 2.6.
-                 */
-                if (!(vma->vm_flags & VM_SHARED) &&
-                    (vma->vm_flags & VM_WRITE))
-                        continue;
-
-                address = max((unsigned long)vma->vm_start,
-                              file_to_user(vma, first));
-                len = min((unsigned long)vma->vm_end,
-                          file_to_user(vma, last) + 1) - address;
-
-                VMA_DEBUG(vma, "zapping vma [first="LPU64" last="LPU64" "
-                          "address=%ld len=%ld]\n", first, last, address, len);
-                LASSERT(len > 0);
-                ll_zap_page_range(vma, address, len);
-        }
-}
-#endif
-
-/* XXX put nice comment here.  talk about __free_pte -> dirty pages and
- * nopage's reference passing to the pte */
-int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last)
-{
-        int rc = -ENOENT;
-        ENTRY;
-
-        LASSERTF(last > first, "last "LPU64" first "LPU64"\n", last, first);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        if (mapping_mapped(mapping)) {
-                rc = 0;
-                unmap_mapping_range(mapping, first + CFS_PAGE_SIZE - 1,
-                                    last - first + 1, 0);
-        }
-#else
-        spin_lock(&mapping->i_shared_lock);
-        if (mapping->i_mmap != NULL) {
-                rc = 0;
-                teardown_vmas(mapping->i_mmap, first, last);
-        }
-        if (mapping->i_mmap_shared != NULL) {
-                rc = 0;
-                teardown_vmas(mapping->i_mmap_shared, first, last);
-        }
-        spin_unlock(&mapping->i_shared_lock);
-#endif
-        RETURN(rc);
-}
-
-static struct vm_operations_struct ll_file_vm_ops = {
-        .nopage         = ll_nopage,
-        .open           = ll_vm_open,
-        .close          = ll_vm_close,
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        .populate       = ll_populate,
-#endif
-};
-
-int ll_file_mmap(struct file * file, struct vm_area_struct * vma)
-{
-        int rc;
-        ENTRY;
-
-        ll_stats_ops_tally(ll_i2sbi(file->f_dentry->d_inode), LPROC_LL_MAP, 1);
-        rc = generic_file_mmap(file, vma);
-        if (rc == 0) {
-#if !defined(HAVE_FILEMAP_POPULATE) && \
-    (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-                if (!filemap_populate)
-                        filemap_populate = vma->vm_ops->populate;
-#endif
-                vma->vm_ops = &ll_file_vm_ops;
-                vma->vm_ops->open(vma);
-                /* update the inode's size and mtime */
-                rc = ll_glimpse_size(file->f_dentry->d_inode, 0);
-        }
-
-        RETURN(rc);
-}
diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c
deleted file mode 100644
index 03dd4808197167d4b8a4d2d6a6ab3ff25f358bd1..0000000000000000000000000000000000000000
--- a/lustre/llite/llite_nfs.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   NFS export of Lustre Light File System 
- *
- *   Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-#include <lustre_lite.h>
-#include "llite_internal.h"
-#ifdef HAVE_LINUX_EXPORTFS_H
-#include <linux/exportfs.h>
-#endif
-
-__u32 get_uuid2int(const char *name, int len)
-{
-        __u32 key0 = 0x12a3fe2d, key1 = 0x37abe8f9;
-        while (len--) {
-                __u32 key = key1 + (key0 ^ (*name++ * 7152373));
-                if (key & 0x80000000) key -= 0x7fffffff;
-                key1 = key0;
-                key0 = key;
-        }
-        return (key0 << 1);
-}
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-static int ll_nfs_test_inode(struct inode *inode, unsigned long ino, void *opaque)
-#else
-static int ll_nfs_test_inode(struct inode *inode, void *opaque)
-#endif
-{
-        struct ll_fid *iid = opaque;
-
-        if (inode->i_ino == iid->id && inode->i_generation == iid->generation)
-                return 1;
-
-        return 0;
-}
-
-static struct inode * search_inode_for_lustre(struct super_block *sb,
-                                              unsigned long ino,
-                                              unsigned long generation,
-                                              int mode)
-{
-        struct ptlrpc_request *req = NULL;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        struct ll_fid fid;
-        unsigned long valid = 0;
-        int eadatalen = 0, rc;
-        struct inode *inode = NULL;
-        struct ll_fid iid = { .id = ino, .generation = generation };
-        ENTRY;
-
-        inode = ILOOKUP(sb, ino, ll_nfs_test_inode, &iid);
-
-        if (inode)
-                RETURN(inode);
-        if (S_ISREG(mode)) {
-                rc = ll_get_max_mdsize(sbi, &eadatalen);
-                if (rc) 
-                        RETURN(ERR_PTR(rc));
-                valid |= OBD_MD_FLEASIZE;
-        }
-        fid.id = (__u64)ino;
-        fid.generation = generation;
-        fid.f_type = mode;
-
-        rc = mdc_getattr(sbi->ll_mdc_exp, &fid, valid, eadatalen, &req);
-        if (rc) {
-                CERROR("failure %d inode %lu\n", rc, ino);
-                RETURN(ERR_PTR(rc));
-        }
-
-        rc = ll_prep_inode(sbi->ll_osc_exp, &inode, req, REPLY_REC_OFF, sb);
-        if (rc) {
-                ptlrpc_req_finished(req);
-                RETURN(ERR_PTR(rc));
-        }
-        ptlrpc_req_finished(req);
-
-        RETURN(inode);
-}
-
-static struct dentry *ll_iget_for_nfs(struct super_block *sb, unsigned long ino,
-                                      __u32 generation, umode_t mode)
-{
-        struct inode *inode;
-        struct dentry *result;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        struct list_head *lp;
-#endif
-        ENTRY;
-
-        if (ino == 0)
-                RETURN(ERR_PTR(-ESTALE));
-
-        inode = search_inode_for_lustre(sb, ino, generation, mode);
-        if (IS_ERR(inode)) {
-                RETURN(ERR_PTR(PTR_ERR(inode)));
-        }
-        if (is_bad_inode(inode) ||
-            (generation && inode->i_generation != generation)){
-                /* we didn't find the right inode.. */
-                CERROR("Inode %lu, Bad count: %lu %d or version  %u %u\n",
-                       inode->i_ino, (unsigned long)inode->i_nlink,
-                       atomic_read(&inode->i_count), inode->i_generation,
-                       generation);
-                iput(inode);
-                RETURN(ERR_PTR(-ESTALE));
-        }
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        result = d_alloc_anon(inode);
-        if (!result) {
-                iput(inode);
-                RETURN(ERR_PTR(-ENOMEM));
-        }
-#else
-        /* now to find a dentry.
-         * If possible, get a well-connected one
-         */
-        spin_lock(&dcache_lock);
-        for (lp = inode->i_dentry.next; lp != &inode->i_dentry ; lp=lp->next) {
-                result = list_entry(lp,struct dentry, d_alias);
-                lock_dentry(result);
-                if (!(result->d_flags & DCACHE_DISCONNECTED)) {
-                        dget_locked(result);
-                        ll_set_dflags(result, DCACHE_REFERENCED);
-                        unlock_dentry(result);
-                        spin_unlock(&dcache_lock);
-                        iput(inode);
-                        RETURN(result);
-                }
-                unlock_dentry(result);
-        }
-        spin_unlock(&dcache_lock);
-        result = d_alloc_root(inode);
-        if (result == NULL) {
-                iput(inode);
-                RETURN(ERR_PTR(-ENOMEM));
-        }
-        result->d_flags |= DCACHE_DISCONNECTED;
-
-#endif
-        ll_set_dd(result);
-
-        lock_dentry(result);
-        if (unlikely(result->d_op == &ll_init_d_ops)) {
-                result->d_op = &ll_d_ops;
-                unlock_dentry(result);
-                smp_wmb();
-                ll_d_wakeup(result);
-        } else {
-                result->d_op = &ll_d_ops;
-                unlock_dentry(result);
-        }
-
-        RETURN(result);
-}
-
-struct dentry *ll_fh_to_dentry(struct super_block *sb, __u32 *data, int len,
-                               int fhtype, int parent)
-{
-        switch (fhtype) {
-                case 2:
-                        if (len < 5)
-                                break;
-                        if (parent)
-                                return ll_iget_for_nfs(sb, data[3], 0, data[4]);
-                case 1:
-                        if (len < 3)
-                                break;
-                        if (parent)
-                                break;
-                        return ll_iget_for_nfs(sb, data[0], data[1], data[2]);
-                default: break;
-        }
-        return ERR_PTR(-EINVAL);
-}
-
-int ll_dentry_to_fh(struct dentry *dentry, __u32 *datap, int *lenp,
-                    int need_parent)
-{
-        if (*lenp < 3)
-                return 255;
-        *datap++ = dentry->d_inode->i_ino;
-        *datap++ = dentry->d_inode->i_generation;
-        *datap++ = (__u32)(S_IFMT & dentry->d_inode->i_mode);
-
-        if (*lenp == 3 || S_ISDIR(dentry->d_inode->i_mode)) {
-                *lenp = 3;
-                return 1;
-        }
-        if (dentry->d_parent) {
-                *datap++ = dentry->d_parent->d_inode->i_ino;
-                *datap++ = (__u32)(S_IFMT & dentry->d_parent->d_inode->i_mode);
-
-                *lenp = 5;
-                return 2;
-        }
-        *lenp = 3;
-        return 1;
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-struct dentry *ll_get_dentry(struct super_block *sb, void *data)
-{
-        __u32 *inump = (__u32*)data;
-        return ll_iget_for_nfs(sb, inump[0], inump[1], S_IFREG);
-}
-
-struct dentry *ll_get_parent(struct dentry *dchild)
-{
-        struct ptlrpc_request *req = NULL;
-        struct inode *dir = dchild->d_inode;
-        struct ll_sb_info *sbi;
-        struct dentry *result = NULL;
-        struct ll_fid fid;
-        struct mds_body *body;
-        char dotdot[] = "..";
-        int  rc = 0;
-        ENTRY;
-        
-        LASSERT(dir && S_ISDIR(dir->i_mode));
-        
-        sbi = ll_s2sbi(dir->i_sb);       
- 
-        fid.id = (__u64)dir->i_ino;
-        fid.generation = dir->i_generation;
-        fid.f_type = S_IFDIR;
-
-        rc = mdc_getattr_name(sbi->ll_mdc_exp, &fid, dotdot, strlen(dotdot) + 1,
-                              0, 0, &req);
-        if (rc) {
-                CERROR("failure %d inode %lu get parent\n", rc, dir->i_ino);
-                return ERR_PTR(rc);
-        }
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof (*body)); 
-       
-        LASSERT((body->valid & OBD_MD_FLGENER) && (body->valid & OBD_MD_FLID));
-        
-        result = ll_iget_for_nfs(dir->i_sb, body->ino, body->generation, S_IFDIR);
-
-        if (IS_ERR(result))
-                rc = PTR_ERR(result);
-
-        ptlrpc_req_finished(req);
-        if (rc)
-                return ERR_PTR(rc);
-        RETURN(result);
-} 
-
-struct export_operations lustre_export_operations = {
-       .get_parent = ll_get_parent,
-       .get_dentry = ll_get_dentry, 
-};
-#endif
diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c
deleted file mode 100644
index f42fd4a7c0346d6b6e668d0166bfca17d1265063..0000000000000000000000000000000000000000
--- a/lustre/llite/lloop.c
+++ /dev/null
@@ -1,764 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre virtual block device emulator.
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- *  linux/drivers/block/loop.c
- *
- *  Written by Theodore Ts'o, 3/29/93
- *
- * Copyright 1993 by Theodore Ts'o.  Redistribution of this file is
- * permitted under the GNU General Public License.
- *
- * DES encryption plus some minor changes by Werner Almesberger, 30-MAY-1993
- * more DES encryption plus IDEA encryption by Nicholas J. Leon, June 20, 1996
- *
- * Modularized and updated for 1.1.16 kernel - Mitch Dsouza 28th May 1994
- * Adapted for 1.3.59 kernel - Andries Brouwer, 1 Feb 1996
- *
- * Fixed do_loop_request() re-entrancy - Vincent.Renardias@waw.com Mar 20, 1997
- *
- * Added devfs support - Richard Gooch <rgooch@atnf.csiro.au> 16-Jan-1998
- *
- * Handle sparse backing files correctly - Kenn Humborg, Jun 28, 1998
- *
- * Loadable modules and other fixes by AK, 1998
- *
- * Make real block number available to downstream transfer functions, enables
- * CBC (and relatives) mode encryption requiring unique IVs per data block.
- * Reed H. Petty, rhp@draper.net
- *
- * Maximum number of loop devices now dynamic via max_loop module parameter.
- * Russell Kroll <rkroll@exploits.org> 19990701
- *
- * Maximum number of loop devices when compiled-in now selectable by passing
- * max_loop=<1-255> to the kernel on boot.
- * Erik I. Bols?, <eriki@himolde.no>, Oct 31, 1999
- *
- * Completely rewrite request handling to be make_request_fn style and
- * non blocking, pushing work to a helper thread. Lots of fixes from
- * Al Viro too.
- * Jens Axboe <axboe@suse.de>, Nov 2000
- *
- * Support up to 256 loop devices
- * Heinz Mauelshagen <mge@sistina.com>, Feb 2002
- *
- * Support for falling back on the write file operation when the address space
- * operations prepare_write and/or commit_write are not available on the
- * backing filesystem.
- * Anton Altaparmakov, 16 Feb 2005
- *
- * Still To Fix:
- * - Advisory locking is ignored here.
- * - Should use an own CAP_* category instead of CAP_SYS_ADMIN
- *
- */
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-
-#include <linux/sched.h>
-#include <linux/fs.h>
-#include <linux/file.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/major.h>
-#include <linux/wait.h>
-#include <linux/blkdev.h>
-#include <linux/blkpg.h>
-#include <linux/init.h>
-#include <linux/smp_lock.h>
-#include <linux/swap.h>
-#include <linux/slab.h>
-#include <linux/suspend.h>
-#include <linux/writeback.h>
-#include <linux/buffer_head.h>                /* for invalidate_bdev() */
-#include <linux/completion.h>
-#include <linux/highmem.h>
-#include <linux/gfp.h>
-#include <linux/swap.h>
-#include <linux/pagevec.h>
-
-#include <asm/uaccess.h>
-
-#include <lustre_lib.h>
-#include <lustre_lite.h>
-#include "llite_internal.h"
-
-#define LLOOP_MAX_SEGMENTS        PTLRPC_MAX_BRW_PAGES
-
-/* Possible states of device */
-enum {
-        LLOOP_UNBOUND,
-        LLOOP_BOUND,
-        LLOOP_RUNDOWN,
-};
-
-struct lloop_device {
-        int                lo_number;
-        int                lo_refcnt;
-        loff_t             lo_offset;
-        loff_t             lo_sizelimit;
-        int                lo_flags;
-        int                (*ioctl)(struct lloop_device *, int cmd, 
-                                 unsigned long arg); 
-
-        struct file *      lo_backing_file;
-        struct block_device *lo_device;
-        unsigned           lo_blocksize;
-
-        int                old_gfp_mask;
-
-        spinlock_t         lo_lock;
-        struct bio         *lo_bio;
-        struct bio         *lo_biotail;
-        int                lo_state;
-        struct semaphore   lo_sem;
-        struct semaphore   lo_ctl_mutex;
-        struct semaphore   lo_bh_mutex;
-        atomic_t           lo_pending;
-
-        request_queue_t    *lo_queue;
-
-        /* data to handle bio for lustre. */
-        struct lo_request_data {
-                struct brw_page    lrd_pages[LLOOP_MAX_SEGMENTS];
-                struct obdo        lrd_oa;
-        } lo_requests[1];
-
-};
-
-/*
- * Loop flags
- */
-enum {
-        LO_FLAGS_READ_ONLY       = 1,
-};
-
-static int lloop_major;
-static int max_loop = 8;
-static struct lloop_device *loop_dev;
-static struct gendisk **disks;
-static struct semaphore lloop_mutex;
-static void *ll_iocontrol_magic = NULL;
-
-static loff_t get_loop_size(struct lloop_device *lo, struct file *file)
-{
-        loff_t size, offset, loopsize;
-
-        /* Compute loopsize in bytes */
-        size = i_size_read(file->f_mapping->host);
-        offset = lo->lo_offset;
-        loopsize = size - offset;
-        if (lo->lo_sizelimit > 0 && lo->lo_sizelimit < loopsize)
-                loopsize = lo->lo_sizelimit;
-
-        /*
-         * Unfortunately, if we want to do I/O on the device,
-         * the number of 512-byte sectors has to fit into a sector_t.
-         */
-        return loopsize >> 9;
-}
-
-static int do_bio_filebacked(struct lloop_device *lo, struct bio *bio)
-{
-        struct inode *inode = lo->lo_backing_file->f_dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_info oinfo = {{{0}}};
-        struct brw_page *pg = lo->lo_requests[0].lrd_pages;
-        struct obdo *oa = &lo->lo_requests[0].lrd_oa;
-        pgoff_t offset;
-        int ret, cmd, i;
-        struct bio_vec *bvec;
-
-        BUG_ON(bio->bi_hw_segments > LLOOP_MAX_SEGMENTS);
-
-        offset = (pgoff_t)(bio->bi_sector << 9) + lo->lo_offset;
-        bio_for_each_segment(bvec, bio, i) {
-                BUG_ON(bvec->bv_offset != 0);
-                BUG_ON(bvec->bv_len != CFS_PAGE_SIZE);
-
-                pg->pg = bvec->bv_page;
-                pg->off = offset;
-                pg->count = bvec->bv_len;
-                pg->flag = OBD_BRW_SRVLOCK;
-
-                pg++;
-                offset += bvec->bv_len;
-        }
-
-        oa->o_mode = inode->i_mode;
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLMODE | OBD_MD_FLTYPE;
-        obdo_from_inode(oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER);
-
-        cmd = OBD_BRW_READ;
-        if (bio_rw(bio) == WRITE)
-                cmd = OBD_BRW_WRITE;
-
-        if (cmd == OBD_BRW_WRITE)
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_WRITE, bio->bi_size);
-        else
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_READ, bio->bi_size);
-        oinfo.oi_oa = oa;
-        oinfo.oi_md = lsm;
-        ret = obd_brw(cmd, ll_i2obdexp(inode), &oinfo, 
-                      (obd_count)(i - bio->bi_idx), 
-                      lo->lo_requests[0].lrd_pages, NULL);
-        if (ret == 0)
-                obdo_to_inode(inode, oa, OBD_MD_FLBLOCKS);
-        return ret;
-}
-
-
-/*
- * Add bio to back of pending list
- */
-static void loop_add_bio(struct lloop_device *lo, struct bio *bio)
-{
-        unsigned long flags;
-
-        spin_lock_irqsave(&lo->lo_lock, flags);
-        if (lo->lo_biotail) {
-                lo->lo_biotail->bi_next = bio;
-                lo->lo_biotail = bio;
-        } else
-                lo->lo_bio = lo->lo_biotail = bio;
-        spin_unlock_irqrestore(&lo->lo_lock, flags);
-
-        up(&lo->lo_bh_mutex);
-}
-
-/*
- * Grab first pending buffer
- */
-static struct bio *loop_get_bio(struct lloop_device *lo)
-{
-        struct bio *bio;
-
-        spin_lock_irq(&lo->lo_lock);
-        if ((bio = lo->lo_bio)) {
-                if (bio == lo->lo_biotail)
-                        lo->lo_biotail = NULL;
-                lo->lo_bio = bio->bi_next;
-                bio->bi_next = NULL;
-        }
-        spin_unlock_irq(&lo->lo_lock);
-
-        return bio;
-}
-
-static int loop_make_request(request_queue_t *q, struct bio *old_bio)
-{
-        struct lloop_device *lo = q->queuedata;
-        int rw = bio_rw(old_bio);
-
-        if (!lo)
-                goto out;
-
-        spin_lock_irq(&lo->lo_lock);
-        if (lo->lo_state != LLOOP_BOUND)
-                goto inactive;
-        atomic_inc(&lo->lo_pending);
-        spin_unlock_irq(&lo->lo_lock);
-
-        if (rw == WRITE) {
-                if (lo->lo_flags & LO_FLAGS_READ_ONLY)
-                        goto err;
-        } else if (rw == READA) {
-                rw = READ;
-        } else if (rw != READ) {
-                CERROR("lloop: unknown command (%x)\n", rw);
-                goto err;
-        }
-        loop_add_bio(lo, old_bio);
-        return 0;
-err:
-        if (atomic_dec_and_test(&lo->lo_pending))
-                up(&lo->lo_bh_mutex);
-out:
-        bio_io_error(old_bio, old_bio->bi_size);
-        return 0;
-inactive:
-        spin_unlock_irq(&lo->lo_lock);
-        goto out;
-}
-
-/*
- * kick off io on the underlying address space
- */
-static void loop_unplug(request_queue_t *q)
-{
-        struct lloop_device *lo = q->queuedata;
-
-        clear_bit(QUEUE_FLAG_PLUGGED, &q->queue_flags);
-        blk_run_address_space(lo->lo_backing_file->f_mapping);
-}
-
-static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
-{
-        int ret;
-        ret = do_bio_filebacked(lo, bio);
-        bio_endio(bio, bio->bi_size, ret);
-}
-
-/*
- * worker thread that handles reads/writes to file backed loop devices,
- * to avoid blocking in our make_request_fn. it also does loop decrypting
- * on reads for block backed loop, as that is too heavy to do from
- * b_end_io context where irqs may be disabled.
- */
-static int loop_thread(void *data)
-{
-        struct lloop_device *lo = data;
-        struct bio *bio;
-
-        daemonize("lloop%d", lo->lo_number);
-
-        set_user_nice(current, -20);
-
-        lo->lo_state = LLOOP_BOUND;
-        atomic_inc(&lo->lo_pending);
-
-        /*
-         * up sem, we are running
-         */
-        up(&lo->lo_sem);
-
-        for (;;) {
-                down_interruptible(&lo->lo_bh_mutex);
-                /*
-                 * could be upped because of tear-down, not because of
-                 * pending work
-                 */
-                if (!atomic_read(&lo->lo_pending))
-                        break;
-
-                bio = loop_get_bio(lo);
-                if (!bio) {
-                        CWARN("lloop(minor: %d): missing bio\n", lo->lo_number);
-                        continue;
-                }
-                loop_handle_bio(lo, bio);
-
-                /*
-                 * upped both for pending work and tear-down, lo_pending
-                 * will hit zero then
-                 */
-                if (atomic_dec_and_test(&lo->lo_pending))
-                        break;
-        }
-
-        up(&lo->lo_sem);
-        return 0;
-}
-
-static int loop_set_fd(struct lloop_device *lo, struct file *unused,
-                       struct block_device *bdev, struct file *file)
-{
-        struct inode        *inode;
-        struct address_space *mapping;
-        int                lo_flags = 0;
-        int                error;
-        loff_t                size;
-
-        if (!try_module_get(THIS_MODULE))
-                return -ENODEV;
-
-        error = -EBUSY;
-        if (lo->lo_state != LLOOP_UNBOUND)
-                goto out;
-
-        mapping = file->f_mapping;
-        inode = mapping->host;
-
-        error = -EINVAL;
-        if (!S_ISREG(inode->i_mode) || inode->i_sb->s_magic != LL_SUPER_MAGIC)
-                goto out;
-
-        if (!(file->f_mode & FMODE_WRITE))
-                lo_flags |= LO_FLAGS_READ_ONLY;
-
-        size = get_loop_size(lo, file);
-
-        if ((loff_t)(sector_t)size != size) {
-                error = -EFBIG;
-                goto out;
-        }
-
-        /* remove all pages in cache so as dirty pages not to be existent. */
-        truncate_inode_pages(mapping, 0);
-
-        set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0);
-
-        lo->lo_blocksize = CFS_PAGE_SIZE;
-        lo->lo_device = bdev;
-        lo->lo_flags = lo_flags;
-        lo->lo_backing_file = file;
-        lo->ioctl = NULL;
-        lo->lo_sizelimit = 0;
-        lo->old_gfp_mask = mapping_gfp_mask(mapping);
-        mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
-
-        lo->lo_bio = lo->lo_biotail = NULL;
-
-        /*
-         * set queue make_request_fn, and add limits based on lower level
-         * device
-         */
-        blk_queue_make_request(lo->lo_queue, loop_make_request);
-        lo->lo_queue->queuedata = lo;
-        lo->lo_queue->unplug_fn = loop_unplug;
-
-        /* queue parameters */
-        blk_queue_hardsect_size(lo->lo_queue, CFS_PAGE_SIZE);
-        blk_queue_max_sectors(lo->lo_queue, LLOOP_MAX_SEGMENTS);
-        blk_queue_max_phys_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS);
-
-        set_capacity(disks[lo->lo_number], size);
-        bd_set_size(bdev, size << 9);
-
-        set_blocksize(bdev, lo->lo_blocksize);
-
-        kernel_thread(loop_thread, lo, CLONE_KERNEL);
-        down(&lo->lo_sem);
-        return 0;
-
- out:
-        /* This is safe: open() is still holding a reference. */
-        module_put(THIS_MODULE);
-        return error;
-}
-
-static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, 
-                       int count)
-{
-        struct file *filp = lo->lo_backing_file;
-        int gfp = lo->old_gfp_mask;
-
-        if (lo->lo_state != LLOOP_BOUND)
-                return -ENXIO;
-
-        if (lo->lo_refcnt > count)        /* we needed one fd for the ioctl */
-                return -EBUSY;
-
-        if (filp == NULL)
-                return -EINVAL;
-
-        spin_lock_irq(&lo->lo_lock);
-        lo->lo_state = LLOOP_RUNDOWN;
-        if (atomic_dec_and_test(&lo->lo_pending))
-                up(&lo->lo_bh_mutex);
-        spin_unlock_irq(&lo->lo_lock);
-
-        down(&lo->lo_sem);
-        lo->lo_backing_file = NULL;
-        lo->ioctl = NULL;
-        lo->lo_device = NULL;
-        lo->lo_offset = 0;
-        lo->lo_sizelimit = 0;
-        lo->lo_flags = 0;
-        ll_invalidate_bdev(bdev, 0);
-        set_capacity(disks[lo->lo_number], 0);
-        bd_set_size(bdev, 0);
-        mapping_set_gfp_mask(filp->f_mapping, gfp);
-        lo->lo_state = LLOOP_UNBOUND;
-        fput(filp);
-        /* This is safe: open() is still holding a reference. */
-        module_put(THIS_MODULE);
-        return 0;
-}
-
-static int lo_open(struct inode *inode, struct file *file)
-{
-        struct lloop_device *lo = inode->i_bdev->bd_disk->private_data;
-
-        down(&lo->lo_ctl_mutex);
-        lo->lo_refcnt++;
-        up(&lo->lo_ctl_mutex);
-
-        return 0;
-}
-
-static int lo_release(struct inode *inode, struct file *file)
-{
-        struct lloop_device *lo = inode->i_bdev->bd_disk->private_data;
-
-        down(&lo->lo_ctl_mutex);
-        --lo->lo_refcnt;
-        up(&lo->lo_ctl_mutex);
-
-        return 0;
-}
-
-/* lloop device node's ioctl function. */
-static int lo_ioctl(struct inode *inode, struct file *unused, 
-        unsigned int cmd, unsigned long arg)
-{
-        struct lloop_device *lo = inode->i_bdev->bd_disk->private_data;
-        struct block_device *bdev = inode->i_bdev;
-        int err = 0;
-
-        down(&lloop_mutex);
-        switch (cmd) {
-        case LL_IOC_LLOOP_DETACH: {
-                err = loop_clr_fd(lo, bdev, 2);
-                if (err == 0)
-                        blkdev_put(bdev); /* grabbed in LLOOP_ATTACH */
-                break;
-        }
-
-        case LL_IOC_LLOOP_INFO: {
-                __u64 ino = 0;
-
-                if (lo->lo_state == LLOOP_BOUND)
-                        ino = lo->lo_backing_file->f_dentry->d_inode->i_ino;
-
-                if (put_user(ino, (__u64 *)arg))
-                        err = -EFAULT;
-                break; 
-        }
-
-        default:
-                err = -EINVAL;
-                break;
-        }
-        up(&lloop_mutex);
-
-        return err;
-}
-
-static struct block_device_operations lo_fops = {
-        .owner =        THIS_MODULE,
-        .open =         lo_open,
-        .release =      lo_release,
-        .ioctl =        lo_ioctl,
-};
-
-/* dynamic iocontrol callback. 
- * This callback is registered in lloop_init and will be called by 
- * ll_iocontrol_call. 
- * This is a llite regular file ioctl function. It takes the responsibility 
- * of attaching a file, and detaching a file by a lloop's device numner. 
- */
-static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, 
-                unsigned int cmd, unsigned long arg,
-                void *magic, int *rcp)
-{
-        struct lloop_device *lo = NULL;
-        struct block_device *bdev = NULL;
-        int err = 0;
-        dev_t dev;
-
-        if (magic != ll_iocontrol_magic)
-                return LLIOC_CONT;
-
-        if (disks == NULL)
-                GOTO(out1, err = -ENODEV);
-
-        down(&lloop_mutex);
-        switch (cmd) {
-        case LL_IOC_LLOOP_ATTACH: {
-                struct lloop_device *lo_free = NULL;
-                int i;
-
-                for (i = 0; i < max_loop; i++, lo = NULL) {
-                        lo = &loop_dev[i];
-                        if (lo->lo_state == LLOOP_UNBOUND) {
-                                if (!lo_free)
-                                        lo_free = lo;
-                                continue;
-                        }
-                        if (lo->lo_backing_file->f_dentry->d_inode == 
-                            file->f_dentry->d_inode)
-                                break;
-                }
-                if (lo || !lo_free)
-                        GOTO(out, err = -EBUSY);
-
-                lo = lo_free;
-                dev = MKDEV(lloop_major, lo->lo_number);
-
-                /* quit if the used pointer is writable */
-                if (put_user((long)old_encode_dev(dev), (long*)arg))
-                        GOTO(out, err = -EFAULT);
-
-                bdev = open_by_devnum(dev, file->f_mode);
-                if (IS_ERR(bdev))
-                        GOTO(out, err = PTR_ERR(bdev));
-
-                get_file(file);
-                err = loop_set_fd(lo, NULL, bdev, file);
-                if (err) {
-                        fput(file);
-                        blkdev_put(bdev);
-                }
-
-                break;
-        }
-
-        case LL_IOC_LLOOP_DETACH_BYDEV: {
-                int minor;
-                
-                dev = old_decode_dev(arg);
-                if (MAJOR(dev) != lloop_major)
-                        GOTO(out, err = -EINVAL);
-
-                minor = MINOR(dev);
-                if (minor > max_loop - 1)
-                        GOTO(out, err = -EINVAL);
-
-                lo = &loop_dev[minor];
-                if (lo->lo_state != LLOOP_BOUND)
-                        GOTO(out, err = -EINVAL);
-
-                bdev = lo->lo_device;
-                err = loop_clr_fd(lo, bdev, 1);
-                if (err == 0)
-                        blkdev_put(bdev); /* grabbed in LLOOP_ATTACH */
-
-                break;
-        }
-
-        default:
-                err = -EINVAL;
-                break;
-        }
-
-out:
-        up(&lloop_mutex);
-out1:
-        if (rcp)
-                *rcp = err;
-        return LLIOC_STOP;
-}
-
-static int __init lloop_init(void)
-{
-        int        i;
-        unsigned int cmdlist[] = {
-                LL_IOC_LLOOP_ATTACH,
-                LL_IOC_LLOOP_DETACH_BYDEV,
-        };
-
-        if (max_loop < 1 || max_loop > 256) {
-                CWARN("lloop: invalid max_loop (must be between"
-                      " 1 and 256), using default (8)\n");
-                max_loop = 8;
-        }
-
-        lloop_major = register_blkdev(0, "lloop");
-        if (lloop_major < 0)
-                return -EIO;
-
-        ll_iocontrol_magic = ll_iocontrol_register(lloop_ioctl, 2, cmdlist);
-        if (ll_iocontrol_magic == NULL)
-                goto out_mem1;
-
-        loop_dev = kmalloc(max_loop * sizeof(struct lloop_device), GFP_KERNEL);
-        if (!loop_dev)
-                goto out_mem1;
-        memset(loop_dev, 0, max_loop * sizeof(struct lloop_device));
-
-        disks = kmalloc(max_loop * sizeof(struct gendisk *), GFP_KERNEL);
-        if (!disks)
-                goto out_mem2;
-
-        for (i = 0; i < max_loop; i++) {
-                disks[i] = alloc_disk(1);
-                if (!disks[i])
-                        goto out_mem3;
-        }
-
-        init_MUTEX(&lloop_mutex);
-
-        for (i = 0; i < max_loop; i++) {
-                struct lloop_device *lo = &loop_dev[i];
-                struct gendisk *disk = disks[i];
-
-                memset(lo, 0, sizeof(*lo));
-                lo->lo_queue = blk_alloc_queue(GFP_KERNEL);
-                if (!lo->lo_queue)
-                        goto out_mem4;
-
-                init_MUTEX(&lo->lo_ctl_mutex);
-                init_MUTEX_LOCKED(&lo->lo_sem);
-                init_MUTEX_LOCKED(&lo->lo_bh_mutex);
-                lo->lo_number = i;
-                spin_lock_init(&lo->lo_lock);
-                disk->major = lloop_major;
-                disk->first_minor = i;
-                disk->fops = &lo_fops;
-                sprintf(disk->disk_name, "lloop%d", i);
-                disk->private_data = lo;
-                disk->queue = lo->lo_queue;
-        }
-
-        /* We cannot fail after we call this, so another loop!*/
-        for (i = 0; i < max_loop; i++)
-                add_disk(disks[i]);
-        return 0;
-
-out_mem4:
-        while (i--)
-                blk_put_queue(loop_dev[i].lo_queue);
-        i = max_loop;
-out_mem3:
-        while (i--)
-                put_disk(disks[i]);
-        kfree(disks);
-out_mem2:
-        kfree(loop_dev);
-out_mem1:
-        unregister_blkdev(lloop_major, "lloop");
-        ll_iocontrol_unregister(ll_iocontrol_magic);
-        CERROR("lloop: ran out of memory\n");
-        return -ENOMEM;
-}
-
-static void lloop_exit(void)
-{
-        int i;
-
-        ll_iocontrol_unregister(ll_iocontrol_magic);
-        for (i = 0; i < max_loop; i++) {
-                del_gendisk(disks[i]);
-                blk_put_queue(loop_dev[i].lo_queue);
-                put_disk(disks[i]);
-        }
-        if (ll_unregister_blkdev(lloop_major, "lloop"))
-                CWARN("lloop: cannot unregister blkdev\n");
-
-        kfree(disks);
-        kfree(loop_dev);
-}
-
-module_init(lloop_init);
-module_exit(lloop_exit);
-
-CFS_MODULE_PARM(max_loop, "i", int, 0444, "maximum of lloop_device");
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre virtual block device");
-MODULE_LICENSE("GPL");
diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c
deleted file mode 100644
index 04a7f9061092b45225db4ebdde513be29747fa17..0000000000000000000000000000000000000000
--- a/lustre/llite/lproc_llite.c
+++ /dev/null
@@ -1,1351 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <linux/version.h>
-#include <lustre_lite.h>
-#include <lprocfs_status.h>
-#include <linux/seq_file.h>
-#include <obd_support.h>
-
-#include "llite_internal.h"
-
-struct proc_dir_entry *proc_lustre_fs_root;
-
-#ifdef LPROCFS
-/* /proc/lustre/llite mount point registration */
-struct file_operations llite_dump_pgcache_fops;
-struct file_operations ll_ra_stats_fops;
-struct file_operations ll_rw_extents_stats_fops;
-struct file_operations ll_rw_extents_stats_pp_fops;
-struct file_operations ll_rw_offset_stats_fops;
-
-static int ll_rd_blksize(char *page, char **start, off_t off, int count,
-                         int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-        struct obd_statfs osfs;
-        int rc;
-
-        LASSERT(sb != NULL);
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ,
-                                OBD_STATFS_NODELAY);
-        if (!rc) {
-              *eof = 1;
-              rc = snprintf(page, count, "%u\n", osfs.os_bsize);
-        }
-
-        return rc;
-}
-
-static int ll_rd_kbytestotal(char *page, char **start, off_t off, int count,
-                             int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-        struct obd_statfs osfs;
-        int rc;
-
-        LASSERT(sb != NULL);
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ,
-                                OBD_STATFS_NODELAY);
-        if (!rc) {
-                __u32 blk_size = osfs.os_bsize >> 10;
-                __u64 result = osfs.os_blocks;
-
-                while (blk_size >>= 1)
-                        result <<= 1;
-
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", result);
-        }
-        return rc;
-
-}
-
-static int ll_rd_kbytesfree(char *page, char **start, off_t off, int count,
-                            int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-        struct obd_statfs osfs;
-        int rc;
-
-        LASSERT(sb != NULL);
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ,
-                                OBD_STATFS_NODELAY);
-        if (!rc) {
-                __u32 blk_size = osfs.os_bsize >> 10;
-                __u64 result = osfs.os_bfree;
-
-                while (blk_size >>= 1)
-                        result <<= 1;
-
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", result);
-        }
-        return rc;
-}
-
-static int ll_rd_kbytesavail(char *page, char **start, off_t off, int count,
-                             int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-        struct obd_statfs osfs;
-        int rc;
-
-        LASSERT(sb != NULL);
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ,
-                                OBD_STATFS_NODELAY);
-        if (!rc) {
-                __u32 blk_size = osfs.os_bsize >> 10;
-                __u64 result = osfs.os_bavail;
-
-                while (blk_size >>= 1)
-                        result <<= 1;
-
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", result);
-        }
-        return rc;
-}
-
-static int ll_rd_filestotal(char *page, char **start, off_t off, int count,
-                            int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-        struct obd_statfs osfs;
-        int rc;
-
-        LASSERT(sb != NULL);
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ,
-                                OBD_STATFS_NODELAY);
-        if (!rc) {
-                 *eof = 1;
-                 rc = snprintf(page, count, LPU64"\n", osfs.os_files);
-        }
-        return rc;
-}
-
-static int ll_rd_filesfree(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-        struct obd_statfs osfs;
-        int rc;
-
-        LASSERT(sb != NULL);
-        rc = ll_statfs_internal(sb, &osfs, cfs_time_current_64() - HZ,
-                                OBD_STATFS_NODELAY);
-        if (!rc) {
-                 *eof = 1;
-                 rc = snprintf(page, count, LPU64"\n", osfs.os_ffree);
-        }
-        return rc;
-
-}
-
-static int ll_rd_fstype(char *page, char **start, off_t off, int count,
-                        int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block*)data;
-
-        LASSERT(sb != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%s\n", sb->s_type->name);
-}
-
-static int ll_rd_sb_uuid(char *page, char **start, off_t off, int count,
-                         int *eof, void *data)
-{
-        struct super_block *sb = (struct super_block *)data;
-
-        LASSERT(sb != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%s\n", ll_s2sbi(sb)->ll_sb_uuid.uuid);
-}
-
-static int ll_rd_max_readahead_mb(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        long pages_number;
-        int mult;
-
-        spin_lock(&sbi->ll_lock);
-        pages_number = sbi->ll_ra_info.ra_max_pages;
-        spin_unlock(&sbi->ll_lock);
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        return lprocfs_read_frac_helper(page, count, pages_number, mult);
-}
-
-static int ll_wr_max_readahead_mb(struct file *file, const char *buffer,
-                                   unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        int mult, rc, pages_number;
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult);
-        if (rc)
-                return rc;
-
-        if (pages_number < 0 || pages_number > num_physpages / 2) {
-                CERROR("can't set file readahead more than %lu MB\n",
-                        num_physpages >> (20 - CFS_PAGE_SHIFT + 1)); /*1/2 of RAM*/
-                return -ERANGE;
-        }
-
-        spin_lock(&sbi->ll_lock);
-        sbi->ll_ra_info.ra_max_pages = pages_number;
-        spin_unlock(&sbi->ll_lock);
-
-        return count;
-}
-
-static int ll_rd_max_read_ahead_whole_mb(char *page, char **start, off_t off,
-                                       int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        long pages_number;
-        int mult;
-
-        spin_lock(&sbi->ll_lock);
-        pages_number = sbi->ll_ra_info.ra_max_read_ahead_whole_pages;
-        spin_unlock(&sbi->ll_lock);
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        return lprocfs_read_frac_helper(page, count, pages_number, mult);
-}
-
-static int ll_wr_max_read_ahead_whole_mb(struct file *file, const char *buffer,
-                                       unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        int mult, rc, pages_number;
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult);
-        if (rc)
-                return rc;
-
-        /* Cap this at the current max readahead window size, the readahead
-         * algorithm does this anyway so it's pointless to set it larger. */
-        if (pages_number < 0 || pages_number > sbi->ll_ra_info.ra_max_pages) {
-                CERROR("can't set max_read_ahead_whole_mb more than "
-                       "max_read_ahead_mb: %lu\n",
-                       sbi->ll_ra_info.ra_max_pages >> (20 - CFS_PAGE_SHIFT));
-                return -ERANGE;
-        }
-
-        spin_lock(&sbi->ll_lock);
-        sbi->ll_ra_info.ra_max_read_ahead_whole_pages = pages_number;
-        spin_unlock(&sbi->ll_lock);
-
-        return count;
-}
-
-static int ll_rd_max_cached_mb(char *page, char **start, off_t off,
-                               int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        long pages_number;
-        int mult;
-
-        spin_lock(&sbi->ll_lock);
-        pages_number = sbi->ll_async_page_max;
-        spin_unlock(&sbi->ll_lock);
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        return lprocfs_read_frac_helper(page, count, pages_number, mult);;
-}
-
-static int ll_wr_max_cached_mb(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        int mult, rc, pages_number;
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult);
-        if (rc)
-                return rc;
-
-        if (pages_number < 0 || pages_number > num_physpages) {
-                CERROR("can't set max cache more than %lu MB\n",
-                        num_physpages >> (20 - CFS_PAGE_SHIFT));
-                return -ERANGE;
-        }
-
-        spin_lock(&sbi->ll_lock);
-        sbi->ll_async_page_max = pages_number ;
-        spin_unlock(&sbi->ll_lock);
-        
-        if (!sbi->ll_osc_exp)
-                /* Not set up yet, don't call llap_shrink_cache */
-                return count;
-
-        if (sbi->ll_async_page_count >= sbi->ll_async_page_max)
-                llap_shrink_cache(sbi, 0);
-
-        return count;
-}
-
-static int ll_rd_checksum(char *page, char **start, off_t off,
-                          int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-
-        return snprintf(page, count, "%u\n",
-                        (sbi->ll_flags & LL_SBI_LLITE_CHECKSUM) ? 1 : 0);
-}
-
-static int ll_wr_checksum(struct file *file, const char *buffer,
-                          unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        int val, rc;
-
-        if (!sbi->ll_osc_exp)
-                /* Not set up yet */
-                return -EAGAIN;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-        if (val)
-                sbi->ll_flags |=  (LL_SBI_LLITE_CHECKSUM|LL_SBI_DATA_CHECKSUM);
-        else
-                sbi->ll_flags &= ~(LL_SBI_LLITE_CHECKSUM|LL_SBI_DATA_CHECKSUM);
-
-        rc = obd_set_info_async(sbi->ll_osc_exp, strlen("checksum"), "checksum",
-                                sizeof(val), &val, NULL);
-        if (rc)
-                CWARN("Failed to set OSC checksum flags: %d\n", rc);
-
-        return count;
-}
-
-static int ll_rd_max_rw_chunk(char *page, char **start, off_t off,
-                          int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-
-        return snprintf(page, count, "%lu\n", ll_s2sbi(sb)->ll_max_rw_chunk);
-}
-
-static int ll_wr_max_rw_chunk(struct file *file, const char *buffer,
-                          unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        int rc, val;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-        ll_s2sbi(sb)->ll_max_rw_chunk = val;
-        return count;
-}
-
-static int ll_rd_track_id(char *page, int count, void *data, 
-                          enum stats_track_type type)
-{
-        struct super_block *sb = data;
-
-        if (ll_s2sbi(sb)->ll_stats_track_type == type) {
-                return snprintf(page, count, "%d\n",
-                                ll_s2sbi(sb)->ll_stats_track_id);
-        
-        } else if (ll_s2sbi(sb)->ll_stats_track_type == STATS_TRACK_ALL) {
-                return snprintf(page, count, "0 (all)\n");
-        } else {
-                return snprintf(page, count, "untracked\n");
-        }
-}
-
-static int ll_wr_track_id(const char *buffer, unsigned long count, void *data,
-                          enum stats_track_type type)
-{
-        struct super_block *sb = data;
-        int rc, pid;
-
-        rc = lprocfs_write_helper(buffer, count, &pid);
-        if (rc)
-                return rc;
-        ll_s2sbi(sb)->ll_stats_track_id = pid;
-        if (pid == 0)
-                ll_s2sbi(sb)->ll_stats_track_type = STATS_TRACK_ALL;
-        else
-                ll_s2sbi(sb)->ll_stats_track_type = type;
-        lprocfs_clear_stats(ll_s2sbi(sb)->ll_stats);
-        return count;
-}
-
-static int ll_rd_track_pid(char *page, char **start, off_t off,
-                          int count, int *eof, void *data)
-{
-        return (ll_rd_track_id(page, count, data, STATS_TRACK_PID));
-}
-
-static int ll_wr_track_pid(struct file *file, const char *buffer,
-                          unsigned long count, void *data)
-{
-        return (ll_wr_track_id(buffer, count, data, STATS_TRACK_PID));
-}
-
-static int ll_rd_track_ppid(char *page, char **start, off_t off,
-                          int count, int *eof, void *data)
-{
-        return (ll_rd_track_id(page, count, data, STATS_TRACK_PPID));
-}
-
-static int ll_wr_track_ppid(struct file *file, const char *buffer,
-                          unsigned long count, void *data)
-{
-        return (ll_wr_track_id(buffer, count, data, STATS_TRACK_PPID));
-}
-
-static int ll_rd_track_gid(char *page, char **start, off_t off,
-                          int count, int *eof, void *data)
-{
-        return (ll_rd_track_id(page, count, data, STATS_TRACK_GID));
-}
-
-static int ll_wr_track_gid(struct file *file, const char *buffer,
-                          unsigned long count, void *data)
-{                                                                 
-        return (ll_wr_track_id(buffer, count, data, STATS_TRACK_GID));
-}
-
-static int ll_rd_contention_time(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-
-        *eof = 1;
-        return snprintf(page, count, "%u\n", ll_s2sbi(sb)->ll_contention_time);
-
-}
-
-static int ll_wr_contention_time(struct file *file, const char *buffer,
-                                 unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-
-        return lprocfs_write_helper(buffer, count,&sbi->ll_contention_time) ?:
-                count;
-}
-
-static int ll_rd_statahead_max(char *page, char **start, off_t off,
-                               int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-
-        return snprintf(page, count, "%u\n", sbi->ll_sa_max);
-}
-
-static int ll_wr_statahead_max(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val >= 0 && val <= LL_SA_RPC_MAX)
-                sbi->ll_sa_max = val;
-        else
-                CERROR("Bad statahead_max value %d. Valid values are in the "
-                       "range [0, %d]\n", val, LL_SA_RPC_MAX);
-
-        return count;
-}
-
-static int ll_rd_statahead_stats(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data)
-{
-        struct super_block *sb = data;
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-
-        return snprintf(page, count,
-                        "statahead wrong: %u\n"
-                        "statahead total: %u\n"
-                        "ls blocked:      %llu\n"
-                        "ls cached:       %llu\n"
-                        "hit count:       %llu\n"
-                        "miss count:      %llu\n",
-                        sbi->ll_sa_wrong,
-                        sbi->ll_sa_total,
-                        sbi->ll_sa_blocked,
-                        sbi->ll_sa_cached,
-                        sbi->ll_sa_hit,
-                        sbi->ll_sa_miss);
-}
-
-static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
-        { "uuid",         ll_rd_sb_uuid,          0, 0 },
-        //{ "mntpt_path",   ll_rd_path,             0, 0 },
-        { "fstype",       ll_rd_fstype,           0, 0 },
-        { "blocksize",    ll_rd_blksize,          0, 0 },
-        { "kbytestotal",  ll_rd_kbytestotal,      0, 0 },
-        { "kbytesfree",   ll_rd_kbytesfree,       0, 0 },
-        { "kbytesavail",  ll_rd_kbytesavail,      0, 0 },
-        { "filestotal",   ll_rd_filestotal,       0, 0 },
-        { "filesfree",    ll_rd_filesfree,        0, 0 },
-        //{ "filegroups",   lprocfs_rd_filegroups,  0, 0 },
-        { "max_read_ahead_mb", ll_rd_max_readahead_mb,
-                               ll_wr_max_readahead_mb, 0 },
-        { "max_read_ahead_whole_mb", ll_rd_max_read_ahead_whole_mb,
-                                     ll_wr_max_read_ahead_whole_mb, 0 },
-        { "max_cached_mb",  ll_rd_max_cached_mb, ll_wr_max_cached_mb, 0 },
-        { "checksum_pages", ll_rd_checksum, ll_wr_checksum, 0 },
-        { "max_rw_chunk",   ll_rd_max_rw_chunk, ll_wr_max_rw_chunk, 0 },
-        { "stats_track_pid",  ll_rd_track_pid, ll_wr_track_pid, 0 },
-        { "stats_track_ppid", ll_rd_track_ppid, ll_wr_track_ppid, 0 },
-        { "stats_track_gid",  ll_rd_track_gid, ll_wr_track_gid, 0 },
-        { "contention_seconds", ll_rd_contention_time, ll_wr_contention_time, 0},
-        { "statahead_max",      ll_rd_statahead_max, ll_wr_statahead_max, 0 },
-        { "statahead_stats",    ll_rd_statahead_stats, 0, 0 },
-        { 0 }
-};
-
-#define MAX_STRING_SIZE 128
-
-struct llite_file_opcode {
-        __u32       opcode;
-        __u32       type;
-        const char *opname;
-} llite_opcode_table[LPROC_LL_FILE_OPCODES] = {
-        /* file operation */
-        { LPROC_LL_DIRTY_HITS,     LPROCFS_TYPE_REGS, "dirty_pages_hits" },
-        { LPROC_LL_DIRTY_MISSES,   LPROCFS_TYPE_REGS, "dirty_pages_misses" },
-        { LPROC_LL_WB_WRITEPAGE,   LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "writeback_from_writepage" },
-        { LPROC_LL_WB_PRESSURE,    LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "writeback_from_pressure" },
-        { LPROC_LL_WB_OK,          LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "writeback_ok_pages" },
-        { LPROC_LL_WB_FAIL,        LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "writeback_failed_pages" },
-        { LPROC_LL_READ_BYTES,     LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES,
-                                   "read_bytes" },
-        { LPROC_LL_WRITE_BYTES,    LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES,
-                                   "write_bytes" },
-        { LPROC_LL_BRW_READ,       LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "brw_read" },
-        { LPROC_LL_BRW_WRITE,      LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "brw_write" },
-
-        { LPROC_LL_IOCTL,          LPROCFS_TYPE_REGS, "ioctl" },
-        { LPROC_LL_OPEN,           LPROCFS_TYPE_REGS, "open" },
-        { LPROC_LL_RELEASE,        LPROCFS_TYPE_REGS, "close" },
-        { LPROC_LL_MAP,            LPROCFS_TYPE_REGS, "mmap" },
-        { LPROC_LL_LLSEEK,         LPROCFS_TYPE_REGS, "seek" },
-        { LPROC_LL_FSYNC,          LPROCFS_TYPE_REGS, "fsync" },
-        /* inode operation */
-        { LPROC_LL_SETATTR,        LPROCFS_TYPE_REGS, "setattr" },
-        { LPROC_LL_TRUNC,          LPROCFS_TYPE_REGS, "truncate" },
-        { LPROC_LL_FLOCK,          LPROCFS_TYPE_REGS, "flock" },
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        { LPROC_LL_GETATTR,        LPROCFS_TYPE_REGS, "getattr" },
-#else
-        { LPROC_LL_REVALIDATE,     LPROCFS_TYPE_REGS, "getattr" },
-#endif
-        /* special inode operation */
-        { LPROC_LL_STAFS,          LPROCFS_TYPE_REGS, "statfs" },
-        { LPROC_LL_ALLOC_INODE,    LPROCFS_TYPE_REGS, "alloc_inode" },
-        { LPROC_LL_SETXATTR,       LPROCFS_TYPE_REGS, "setxattr" },
-        { LPROC_LL_GETXATTR,       LPROCFS_TYPE_REGS, "getxattr" },
-        { LPROC_LL_LISTXATTR,      LPROCFS_TYPE_REGS, "listxattr" },
-        { LPROC_LL_REMOVEXATTR,    LPROCFS_TYPE_REGS, "removexattr" },
-        { LPROC_LL_INODE_PERM,     LPROCFS_TYPE_REGS, "inode_permission" },
-        { LPROC_LL_DIRECT_READ,    LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "direct_read" },
-        { LPROC_LL_DIRECT_WRITE,   LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_PAGES,
-                                   "direct_write" },
-        { LPROC_LL_LOCKLESS_READ,  LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES,
-                                   "lockless_read_bytes" },
-        { LPROC_LL_LOCKLESS_WRITE, LPROCFS_CNTR_AVGMINMAX|LPROCFS_TYPE_BYTES,
-                                   "lockless_write_bytes" },
-
-};
-
-void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count)
-{
-        if (!sbi->ll_stats)
-                return;
-        if (sbi->ll_stats_track_type == STATS_TRACK_ALL)
-                lprocfs_counter_add(sbi->ll_stats, op, count);
-        else if (sbi->ll_stats_track_type == STATS_TRACK_PID &&
-                 sbi->ll_stats_track_id == current->pid)
-                lprocfs_counter_add(sbi->ll_stats, op, count);
-        else if (sbi->ll_stats_track_type == STATS_TRACK_PPID &&
-                 sbi->ll_stats_track_id == current->p_pptr->pid)
-                lprocfs_counter_add(sbi->ll_stats, op, count);
-        else if (sbi->ll_stats_track_type == STATS_TRACK_GID &&
-                 sbi->ll_stats_track_id == current->gid)
-                lprocfs_counter_add(sbi->ll_stats, op, count);
-}
-EXPORT_SYMBOL(ll_stats_ops_tally);
-
-int lprocfs_register_mountpoint(struct proc_dir_entry *parent,
-                                struct super_block *sb, char *osc, char *mdc)
-{
-        struct lprocfs_vars lvars[2];
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct ll_sb_info *sbi = ll_s2sbi(sb);
-        struct obd_device *obd;
-        char name[MAX_STRING_SIZE + 1], *ptr;
-        int err, id, len;
-        struct proc_dir_entry *entry;
-        ENTRY;
-
-        memset(lvars, 0, sizeof(lvars));
-
-        name[MAX_STRING_SIZE] = '\0';
-        lvars[0].name = name;
-
-        LASSERT(sbi != NULL);
-        LASSERT(mdc != NULL);
-        LASSERT(osc != NULL);
-
-        /* Get fsname */
-        len = strlen(lsi->lsi_lmd->lmd_profile);
-        ptr = strrchr(lsi->lsi_lmd->lmd_profile, '-');
-        if (ptr && (strcmp(ptr, "-client") == 0))
-                len -= 7; 
-        
-        /* Mount info */
-        snprintf(name, MAX_STRING_SIZE, "%.*s-%p", len,
-                 lsi->lsi_lmd->lmd_profile, sb);
-        
-        sbi->ll_proc_root = lprocfs_register(name, parent, NULL, NULL);
-        if (IS_ERR(sbi->ll_proc_root)) {
-                err = PTR_ERR(sbi->ll_proc_root);
-                sbi->ll_proc_root = NULL;
-                RETURN(err);
-        }
-
-        entry = create_proc_entry("dump_page_cache", 0444, sbi->ll_proc_root);
-        if (entry == NULL)
-                GOTO(out, err = -ENOMEM);
-        entry->proc_fops = &llite_dump_pgcache_fops;
-        entry->data = sbi;
-
-        entry = create_proc_entry("read_ahead_stats", 0644, sbi->ll_proc_root);
-        if (entry == NULL)
-                GOTO(out, err = -ENOMEM);
-        entry->proc_fops = &ll_ra_stats_fops;
-        entry->data = sbi;
-
-        entry = create_proc_entry("extents_stats", 0644, sbi->ll_proc_root);
-        if (entry == NULL)
-                 GOTO(out, err = -ENOMEM);
-        entry->proc_fops = &ll_rw_extents_stats_fops;
-        entry->data = sbi;
-
-        entry = create_proc_entry("extents_stats_per_process", 0644,
-                                  sbi->ll_proc_root);
-        if (entry == NULL)
-                 GOTO(out, err = -ENOMEM);
-        entry->proc_fops = &ll_rw_extents_stats_pp_fops;
-        entry->data = sbi;
-
-        entry = create_proc_entry("offset_stats", 0644, sbi->ll_proc_root);
-        if (entry == NULL)
-                GOTO(out, err = -ENOMEM);
-        entry->proc_fops = &ll_rw_offset_stats_fops;
-        entry->data = sbi;
-
-        /* File operations stats */
-        sbi->ll_stats = lprocfs_alloc_stats(LPROC_LL_FILE_OPCODES, 
-                                            LPROCFS_STATS_FLAG_PERCPU);
-        if (sbi->ll_stats == NULL)
-                GOTO(out, err = -ENOMEM);
-        /* do counter init */
-        for (id = 0; id < LPROC_LL_FILE_OPCODES; id++) {
-                __u32 type = llite_opcode_table[id].type;
-                void *ptr = NULL;
-                if (type & LPROCFS_TYPE_REGS)
-                        ptr = "regs";
-                else if (type & LPROCFS_TYPE_BYTES)
-                        ptr = "bytes";
-                else if (type & LPROCFS_TYPE_PAGES)
-                        ptr = "pages";
-                lprocfs_counter_init(sbi->ll_stats,
-                                     llite_opcode_table[id].opcode,
-                                     (type & LPROCFS_CNTR_AVGMINMAX),
-                                     llite_opcode_table[id].opname, ptr);
-        }
-        err = lprocfs_register_stats(sbi->ll_proc_root, "stats", sbi->ll_stats);
-        if (err)
-                GOTO(out, err);
-
-        err = lprocfs_add_vars(sbi->ll_proc_root, lprocfs_llite_obd_vars, sb);
-        if (err)
-                GOTO(out, err);
-
-        /* MDC info */
-        obd = class_name2obd(mdc);
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-        LASSERT(obd->obd_type->typ_name != NULL);
-
-        snprintf(name, MAX_STRING_SIZE, "%s/common_name",
-                 obd->obd_type->typ_name);
-        lvars[0].read_fptr = lprocfs_rd_name;
-        err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd);
-        if (err)
-                GOTO(out, err);
-
-        snprintf(name, MAX_STRING_SIZE, "%s/uuid", obd->obd_type->typ_name);
-        lvars[0].read_fptr = lprocfs_rd_uuid;
-        err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd);
-        if (err)
-                GOTO(out, err);
-
-        /* OSC */
-        obd = class_name2obd(osc);
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-        LASSERT(obd->obd_type->typ_name != NULL);
-
-        snprintf(name, MAX_STRING_SIZE, "%s/common_name",
-                 obd->obd_type->typ_name);
-        lvars[0].read_fptr = lprocfs_rd_name;
-        err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd);
-        if (err)
-                GOTO(out, err);
-
-        snprintf(name, MAX_STRING_SIZE, "%s/uuid", obd->obd_type->typ_name);
-        lvars[0].read_fptr = lprocfs_rd_uuid;
-        err = lprocfs_add_vars(sbi->ll_proc_root, lvars, obd);
-out:
-        if (err) {
-                lprocfs_remove(&sbi->ll_proc_root);
-                lprocfs_free_stats(&sbi->ll_stats);
-        }
-        RETURN(err);
-}
-
-void lprocfs_unregister_mountpoint(struct ll_sb_info *sbi)
-{
-        if (sbi->ll_proc_root) {
-                lprocfs_remove(&sbi->ll_proc_root);
-                lprocfs_free_stats(&sbi->ll_stats);
-        }
-}
-#undef MAX_STRING_SIZE
-
-#define seq_page_flag(seq, page, flag, has_flags) do {                  \
-                if (test_bit(PG_##flag, &(page)->flags)) {              \
-                        if (!has_flags)                                 \
-                                has_flags = 1;                          \
-                        else                                            \
-                                seq_putc(seq, '|');                     \
-                        seq_puts(seq, #flag);                           \
-                }                                                       \
-        } while(0);
-
-static void *llite_dump_pgcache_seq_start(struct seq_file *seq, loff_t *pos)
-{
-        struct ll_async_page *dummy_llap = seq->private;
-
-        if (dummy_llap->llap_magic == 2)
-                return NULL;
-
-        return (void *)1;
-}
-
-static int llite_dump_pgcache_seq_show(struct seq_file *seq, void *v)
-{
-        struct ll_async_page *llap, *dummy_llap = seq->private;
-        struct ll_sb_info *sbi = dummy_llap->llap_cookie;
-
-        /* 2.4 doesn't seem to have SEQ_START_TOKEN, so we implement
-         * it in our own state */
-        if (dummy_llap->llap_magic == 0) {
-                seq_printf(seq, "gener |  llap  cookie  origin wq du wb | page "
-                                "inode index count [ page flags ]\n");
-                return 0;
-        }
-
-        spin_lock(&sbi->ll_lock);
-
-        llap = llite_pglist_next_llap(sbi, &dummy_llap->llap_pglist_item);
-        if (llap != NULL)  {
-                int has_flags = 0;
-                struct page *page = llap->llap_page;
-
-                LASSERTF(llap->llap_origin < LLAP__ORIGIN_MAX, "%u\n",
-                         llap->llap_origin);
-
-                seq_printf(seq," %5lu | %p %p %s %s %s %s | %p %lu/%u(%p) "
-                           "%lu %u [",
-                           sbi->ll_pglist_gen,
-                           llap, llap->llap_cookie,
-                           llap_origins[llap->llap_origin],
-                           llap->llap_write_queued ? "wq" : "- ",
-                           llap->llap_defer_uptodate ? "du" : "- ",
-                           PageWriteback(page) ? "wb" : "-",
-                           page, page->mapping->host->i_ino,
-                           page->mapping->host->i_generation,
-                           page->mapping->host, page->index,
-                           page_count(page));
-                seq_page_flag(seq, page, locked, has_flags);
-                seq_page_flag(seq, page, error, has_flags);
-                seq_page_flag(seq, page, referenced, has_flags);
-                seq_page_flag(seq, page, uptodate, has_flags);
-                seq_page_flag(seq, page, dirty, has_flags);
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12))
-                seq_page_flag(seq, page, highmem, has_flags);
-#endif
-                seq_page_flag(seq, page, writeback, has_flags);
-                if (!has_flags)
-                        seq_puts(seq, "-]\n");
-                else
-                        seq_puts(seq, "]\n");
-        }
-
-        spin_unlock(&sbi->ll_lock);
-
-        return 0;
-}
-
-static void *llite_dump_pgcache_seq_next(struct seq_file *seq, void *v, 
-                                         loff_t *pos)
-{
-        struct ll_async_page *llap, *dummy_llap = seq->private;
-        struct ll_sb_info *sbi = dummy_llap->llap_cookie;
-
-        /* bail if we just displayed the banner */
-        if (dummy_llap->llap_magic == 0) {
-                dummy_llap->llap_magic = 1;
-                return dummy_llap;
-        }
-
-        /* we've just displayed the llap that is after us in the list.
-         * we advance to a position beyond it, returning null if there
-         * isn't another llap in the list beyond that new position. */
-        spin_lock(&sbi->ll_lock);
-        llap = llite_pglist_next_llap(sbi, &dummy_llap->llap_pglist_item);
-        list_del_init(&dummy_llap->llap_pglist_item);
-        if (llap) {
-                list_add(&dummy_llap->llap_pglist_item,&llap->llap_pglist_item);
-                llap =llite_pglist_next_llap(sbi,&dummy_llap->llap_pglist_item);
-        }
-        spin_unlock(&sbi->ll_lock);
-
-        ++*pos;
-        if (llap == NULL) {
-                dummy_llap->llap_magic = 2;
-                return NULL;
-        }
-        return dummy_llap;
-}
-
-static void null_stop(struct seq_file *seq, void *v)
-{
-}
-
-struct seq_operations llite_dump_pgcache_seq_sops = {
-        .start = llite_dump_pgcache_seq_start,
-        .stop = null_stop,
-        .next = llite_dump_pgcache_seq_next,
-        .show = llite_dump_pgcache_seq_show,
-};
-
-/* we're displaying llaps in a list_head list.  we don't want to hold a lock
- * while we walk the entire list, and we don't want to have to seek into
- * the right position in the list as an app advances with many syscalls.  we
- * allocate a dummy llap and hang it off file->private.  its position in
- * the list records where the app is currently displaying.  this way our
- * seq .start and .stop don't actually do anything.  .next returns null
- * when the dummy hits the end of the list which eventually leads to .release
- * where we tear down.  this kind of displaying is super-racey, so we put
- * a generation counter on the list so the output shows when the list
- * changes between reads.
- */
-static int llite_dump_pgcache_seq_open(struct inode *inode, struct file *file)
-{
-        struct proc_dir_entry *dp = PDE(inode);
-        struct ll_async_page *dummy_llap;
-        struct seq_file *seq;
-        struct ll_sb_info *sbi = dp->data;
-        int rc = -ENOMEM;
-
-        LPROCFS_ENTRY_AND_CHECK(dp);
-
-        OBD_ALLOC_PTR_WAIT(dummy_llap);
-        if (dummy_llap == NULL)
-                GOTO(out, rc);
-
-        dummy_llap->llap_page = NULL;
-        dummy_llap->llap_cookie = sbi;
-        dummy_llap->llap_magic = 0;
-
-        rc = seq_open(file, &llite_dump_pgcache_seq_sops);
-        if (rc) {
-                OBD_FREE(dummy_llap, sizeof(*dummy_llap));
-                GOTO(out, rc);
-        }
-        seq = file->private_data;
-        seq->private = dummy_llap;
-
-        spin_lock(&sbi->ll_lock);
-        list_add(&dummy_llap->llap_pglist_item, &sbi->ll_pglist);
-        spin_unlock(&sbi->ll_lock);
-
-out:
-        if (rc)
-                LPROCFS_EXIT();
-        return rc;
-}
-
-static int llite_dump_pgcache_seq_release(struct inode *inode,
-                                          struct file *file)
-{
-        struct seq_file *seq = file->private_data;
-        struct ll_async_page *dummy_llap = seq->private;
-        struct ll_sb_info *sbi = dummy_llap->llap_cookie;
-
-        spin_lock(&sbi->ll_lock);
-        if (!list_empty(&dummy_llap->llap_pglist_item))
-                list_del_init(&dummy_llap->llap_pglist_item);
-        spin_unlock(&sbi->ll_lock);
-        OBD_FREE(dummy_llap, sizeof(*dummy_llap));
-
-        return lprocfs_seq_release(inode, file);
-}
-
-struct file_operations llite_dump_pgcache_fops = {
-        .owner   = THIS_MODULE,
-        .open    = llite_dump_pgcache_seq_open,
-        .read    = seq_read,
-        .release = llite_dump_pgcache_seq_release,
-};
-
-static int ll_ra_stats_seq_show(struct seq_file *seq, void *v)
-{
-        struct timeval now;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_ra_info *ra = &sbi->ll_ra_info;
-        int i;
-        static char *ra_stat_strings[] = {
-                [RA_STAT_HIT] = "hits",
-                [RA_STAT_MISS] = "misses",
-                [RA_STAT_DISTANT_READPAGE] = "readpage not consecutive",
-                [RA_STAT_MISS_IN_WINDOW] = "miss inside window",
-                [RA_STAT_FAILED_GRAB_PAGE] = "failed grab_cache_page",
-                [RA_STAT_FAILED_MATCH] = "failed lock match",
-                [RA_STAT_DISCARDED] = "read but discarded",
-                [RA_STAT_ZERO_LEN] = "zero length file",
-                [RA_STAT_ZERO_WINDOW] = "zero size window",
-                [RA_STAT_EOF] = "read-ahead to EOF",
-                [RA_STAT_MAX_IN_FLIGHT] = "hit max r-a issue",
-                [RA_STAT_WRONG_GRAB_PAGE] = "wrong page from grab_cache_page",
-        };
-
-        do_gettimeofday(&now);
-
-        spin_lock(&sbi->ll_lock);
-
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
-        seq_printf(seq, "pending issued pages:           %lu\n",
-                   ra->ra_cur_pages);
-
-        for(i = 0; i < _NR_RA_STAT; i++)
-                seq_printf(seq, "%-25s %lu\n", ra_stat_strings[i], 
-                           ra->ra_stats[i]);
-
-        spin_unlock(&sbi->ll_lock);
-
-        return 0;
-}
-
-static ssize_t ll_ra_stats_seq_write(struct file *file, const char *buf,
-                                       size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_ra_info *ra = &sbi->ll_ra_info;
-
-        spin_lock(&sbi->ll_lock);
-        memset(ra->ra_stats, 0, sizeof(ra->ra_stats));
-        spin_unlock(&sbi->ll_lock);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(ll_ra_stats);
-
-#define pct(a,b) (b ? a * 100 / b : 0)
-
-static void ll_display_extents_info(struct ll_rw_extents_info *io_extents,
-                                   struct seq_file *seq, int which)
-{
-        unsigned long read_tot = 0, write_tot = 0, read_cum, write_cum;
-        unsigned long start, end, r, w;
-        char *unitp = "KMGTPEZY";
-        int i, units = 10;
-        struct per_process_info *pp_info = &io_extents->pp_extents[which];
-
-        read_cum = 0;
-        write_cum = 0;
-        start = 0;
-
-        for(i = 0; i < LL_HIST_MAX; i++) {
-                read_tot += pp_info->pp_r_hist.oh_buckets[i];
-                write_tot += pp_info->pp_w_hist.oh_buckets[i];
-        }
-
-        for(i = 0; i < LL_HIST_MAX; i++) {
-                r = pp_info->pp_r_hist.oh_buckets[i];
-                w = pp_info->pp_w_hist.oh_buckets[i];
-                read_cum += r;
-                write_cum += w;
-                end = 1 << (i + LL_HIST_START - units);
-                seq_printf(seq, "%4lu%c - %4lu%c%c: %14lu %4lu %4lu  | "
-                           "%14lu %4lu %4lu\n", start, *unitp, end, *unitp,
-                           (i == LL_HIST_MAX - 1) ? '+' : ' ',
-                           r, pct(r, read_tot), pct(read_cum, read_tot),
-                           w, pct(w, write_tot), pct(write_cum, write_tot));
-                start = end;
-                if (start == 1<<10) {
-                        start = 1;
-                        units += 10;
-                        unitp++;
-                }
-                if (read_cum == read_tot && write_cum == write_tot)
-                        break;
-        }
-}
-
-static int ll_rw_extents_stats_pp_seq_show(struct seq_file *seq, void *v)
-{
-        struct timeval now;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info;
-        int k;
-
-        do_gettimeofday(&now);
-
-        if (!sbi->ll_rw_stats_on) {
-                seq_printf(seq, "Disabled\n"
-                                "Write anything in this file to activate\n");
-                return 0;
-        }
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
-        seq_printf(seq, "%15s %19s       | %20s\n", " ", "read", "write");
-        seq_printf(seq, "%13s   %14s %4s %4s  | %14s %4s %4s\n", 
-                   "extents", "calls", "%", "cum%",
-                   "calls", "%", "cum%");
-        spin_lock(&sbi->ll_pp_extent_lock);
-        for(k = 0; k < LL_PROCESS_HIST_MAX; k++) {
-                if(io_extents->pp_extents[k].pid != 0) {
-                        seq_printf(seq, "\nPID: %d\n",
-                                   io_extents->pp_extents[k].pid);
-                        ll_display_extents_info(io_extents, seq, k);
-                }
-        }
-        spin_unlock(&sbi->ll_pp_extent_lock);
-        return 0;
-}
-
-static ssize_t ll_rw_extents_stats_pp_seq_write(struct file *file,
-                                                const char *buf, size_t len,
-                                                loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info;
-        int i;
-
-        sbi->ll_rw_stats_on = 1;
-        spin_lock(&sbi->ll_pp_extent_lock);
-        for(i = 0; i < LL_PROCESS_HIST_MAX; i++) {
-                io_extents->pp_extents[i].pid = 0;
-                lprocfs_oh_clear(&io_extents->pp_extents[i].pp_r_hist);
-                lprocfs_oh_clear(&io_extents->pp_extents[i].pp_w_hist);
-        }
-        spin_unlock(&sbi->ll_pp_extent_lock);
-        return len;
-}
-
-LPROC_SEQ_FOPS(ll_rw_extents_stats_pp);
-
-static int ll_rw_extents_stats_seq_show(struct seq_file *seq, void *v)
-{
-        struct timeval now;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info;
-
-        do_gettimeofday(&now);
-
-        if (!sbi->ll_rw_stats_on) {
-                seq_printf(seq, "Disabled\n"
-                                "Write anything in this file to activate\n");
-                return 0;
-        }
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
-
-        seq_printf(seq, "%15s %19s       | %20s\n", " ", "read", "write");
-        seq_printf(seq, "%13s   %14s %4s %4s  | %14s %4s %4s\n", 
-                   "extents", "calls", "%", "cum%",
-                   "calls", "%", "cum%");
-        spin_lock(&sbi->ll_lock);
-        ll_display_extents_info(io_extents, seq, LL_PROCESS_HIST_MAX);
-        spin_unlock(&sbi->ll_lock);
-
-        return 0;
-}
-
-static ssize_t ll_rw_extents_stats_seq_write(struct file *file, const char *buf,
-                                        size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info;
-        int i;
-
-        sbi->ll_rw_stats_on = 1;
-        spin_lock(&sbi->ll_pp_extent_lock);
-        for(i = 0; i <= LL_PROCESS_HIST_MAX; i++)
-        {
-                io_extents->pp_extents[i].pid = 0;
-                lprocfs_oh_clear(&io_extents->pp_extents[i].pp_r_hist);
-                lprocfs_oh_clear(&io_extents->pp_extents[i].pp_w_hist);
-        }
-        spin_unlock(&sbi->ll_pp_extent_lock);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(ll_rw_extents_stats);
-
-void ll_rw_stats_tally(struct ll_sb_info *sbi, pid_t pid, struct file
-                               *file, size_t count, int rw)
-{
-        int i, cur = -1;
-        struct ll_rw_process_info *process;
-        struct ll_rw_process_info *offset;
-        int *off_count = &sbi->ll_rw_offset_entry_count;
-        int *process_count = &sbi->ll_offset_process_count;
-        struct ll_rw_extents_info *io_extents = &sbi->ll_rw_extents_info;
-
-        if(!sbi->ll_rw_stats_on)
-                return;
-        process = sbi->ll_rw_process_info;
-        offset = sbi->ll_rw_offset_info;
-
-        spin_lock(&sbi->ll_pp_extent_lock);
-        /* Extent statistics */
-        for(i = 0; i < LL_PROCESS_HIST_MAX; i++) {
-                if(io_extents->pp_extents[i].pid == pid) {
-                        cur = i;
-                        break;
-                }
-        }
-
-        if (cur == -1) {
-                /* new process */
-                sbi->ll_extent_process_count = 
-                        (sbi->ll_extent_process_count + 1) % LL_PROCESS_HIST_MAX;
-                cur = sbi->ll_extent_process_count;
-                io_extents->pp_extents[cur].pid = pid;
-                lprocfs_oh_clear(&io_extents->pp_extents[cur].pp_r_hist);
-                lprocfs_oh_clear(&io_extents->pp_extents[cur].pp_w_hist);
-        }
-
-        for(i = 0; (count >= (1 << LL_HIST_START << i)) && 
-             (i < (LL_HIST_MAX - 1)); i++);
-        if (rw == 0) {
-                io_extents->pp_extents[cur].pp_r_hist.oh_buckets[i]++;
-                io_extents->pp_extents[LL_PROCESS_HIST_MAX].pp_r_hist.oh_buckets[i]++;
-        } else {
-                io_extents->pp_extents[cur].pp_w_hist.oh_buckets[i]++;
-                io_extents->pp_extents[LL_PROCESS_HIST_MAX].pp_w_hist.oh_buckets[i]++;
-        }
-        spin_unlock(&sbi->ll_pp_extent_lock);
-
-        spin_lock(&sbi->ll_process_lock);
-        /* Offset statistics */
-        for (i = 0; i < LL_PROCESS_HIST_MAX; i++) {
-                if (process[i].rw_pid == pid) {
-                        if (process[i].rw_last_file != file) {
-                                process[i].rw_range_start = file->f_pos;
-                                process[i].rw_last_file_pos =
-                                                        file->f_pos + count;
-                                process[i].rw_smallest_extent = count;
-                                process[i].rw_largest_extent = count;
-                                process[i].rw_offset = 0;
-                                process[i].rw_last_file = file;
-                                spin_unlock(&sbi->ll_process_lock);
-                                return;
-                        }
-                        if (process[i].rw_last_file_pos != file->f_pos) {
-                                *off_count =
-                                    (*off_count + 1) % LL_OFFSET_HIST_MAX;
-                                offset[*off_count].rw_op = process[i].rw_op;
-                                offset[*off_count].rw_pid = pid;
-                                offset[*off_count].rw_range_start =
-                                        process[i].rw_range_start;
-                                offset[*off_count].rw_range_end =
-                                        process[i].rw_last_file_pos;
-                                offset[*off_count].rw_smallest_extent =
-                                        process[i].rw_smallest_extent;
-                                offset[*off_count].rw_largest_extent =
-                                        process[i].rw_largest_extent;
-                                offset[*off_count].rw_offset =
-                                        process[i].rw_offset;
-                                process[i].rw_op = rw;
-                                process[i].rw_range_start = file->f_pos;
-                                process[i].rw_smallest_extent = count;
-                                process[i].rw_largest_extent = count;
-                                process[i].rw_offset = file->f_pos -
-                                        process[i].rw_last_file_pos;
-                        }
-                        if(process[i].rw_smallest_extent > count)
-                                process[i].rw_smallest_extent = count;
-                        if(process[i].rw_largest_extent < count)
-                                process[i].rw_largest_extent = count;
-                        process[i].rw_last_file_pos = file->f_pos + count;
-                        spin_unlock(&sbi->ll_process_lock);
-                        return;
-                }
-        }
-        *process_count = (*process_count + 1) % LL_PROCESS_HIST_MAX;
-        process[*process_count].rw_pid = pid;
-        process[*process_count].rw_op = rw;
-        process[*process_count].rw_range_start = file->f_pos;
-        process[*process_count].rw_last_file_pos = file->f_pos + count;
-        process[*process_count].rw_smallest_extent = count;
-        process[*process_count].rw_largest_extent = count;
-        process[*process_count].rw_offset = 0;
-        process[*process_count].rw_last_file = file;
-        spin_unlock(&sbi->ll_process_lock);
-}
-
-char lpszt[] = LPSZ;
-
-static int ll_rw_offset_stats_seq_show(struct seq_file *seq, void *v)
-{
-        struct timeval now;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_rw_process_info *offset = sbi->ll_rw_offset_info;
-        struct ll_rw_process_info *process = sbi->ll_rw_process_info;
-        char format[50];
-        int i;
-
-        do_gettimeofday(&now);
-
-        if (!sbi->ll_rw_stats_on) {
-                seq_printf(seq, "Disabled\n"
-                                "Write anything in this file to activate\n");
-                return 0;
-        }
-        spin_lock(&sbi->ll_process_lock);
-
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
-        seq_printf(seq, "%3s %10s %14s %14s %17s %17s %14s\n",
-                   "R/W", "PID", "RANGE START", "RANGE END",
-                   "SMALLEST EXTENT", "LARGEST EXTENT", "OFFSET");
-        sprintf(format, "%s%s%s%s%s\n",
-                "%3c %10d %14Lu %14Lu %17", lpszt+1, " %17", lpszt+1, " %14Ld");
-        /* We stored the discontiguous offsets here; print them first */
-        for(i = 0; i < LL_OFFSET_HIST_MAX; i++) {
-                if (offset[i].rw_pid != 0)
-                        /* Is there a way to snip the '%' off of LPSZ? */
-                        seq_printf(seq, format,
-                                   offset[i].rw_op ? 'W' : 'R',
-                                   offset[i].rw_pid,
-                                   offset[i].rw_range_start,
-                                   offset[i].rw_range_end,
-                                   offset[i].rw_smallest_extent,
-                                   offset[i].rw_largest_extent,
-                                   offset[i].rw_offset);
-        }
-        /* Then print the current offsets for each process */
-        for(i = 0; i < LL_PROCESS_HIST_MAX; i++) {
-                if (process[i].rw_pid != 0)
-                        seq_printf(seq, format,
-                                   process[i].rw_op ? 'W' : 'R',
-                                   process[i].rw_pid,
-                                   process[i].rw_range_start,
-                                   process[i].rw_last_file_pos,
-                                   process[i].rw_smallest_extent,
-                                   process[i].rw_largest_extent,
-                                   process[i].rw_offset);
-        }
-        spin_unlock(&sbi->ll_process_lock);
-
-        return 0;
-}
-
-static ssize_t ll_rw_offset_stats_seq_write(struct file *file, const char *buf,
-                                       size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct ll_sb_info *sbi = seq->private;
-        struct ll_rw_process_info *process_info = sbi->ll_rw_process_info;
-        struct ll_rw_process_info *offset_info = sbi->ll_rw_offset_info;
-
-        sbi->ll_rw_stats_on = 1;
-
-        spin_lock(&sbi->ll_process_lock);
-        sbi->ll_offset_process_count = 0;
-        sbi->ll_rw_offset_entry_count = 0;
-        memset(process_info, 0, sizeof(struct ll_rw_process_info) *
-               LL_PROCESS_HIST_MAX);
-        memset(offset_info, 0, sizeof(struct ll_rw_process_info) *
-               LL_OFFSET_HIST_MAX);
-        spin_unlock(&sbi->ll_process_lock);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(ll_rw_offset_stats);
-
-void lprocfs_llite_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = NULL;
-    lvars->obd_vars     = lprocfs_llite_obd_vars;
-}
-#endif /* LPROCFS */
diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c
deleted file mode 100644
index 2a0733fdd82fa6488d74de26785066356812ad04..0000000000000000000000000000000000000000
--- a/lustre/llite/namei.c
+++ /dev/null
@@ -1,1371 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/fs.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp_lock.h>
-#include <linux/quotaops.h>
-#include <linux/highmem.h>
-#include <linux/pagemap.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <obd_support.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
-#include <linux/lustre_version.h>
-#include "llite_internal.h"
-
-/* methods */
-
-/* called from iget{4,5_locked}->find_inode() under inode_lock spinlock */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-static int ll_test_inode(struct inode *inode, unsigned long ino, void *opaque)
-#else
-static int ll_test_inode(struct inode *inode, void *opaque)
-#endif
-{
-        static int last_ino, last_gen, last_count;
-        struct lustre_md *md = opaque;
-
-        if (!(md->body->valid & (OBD_MD_FLGENER | OBD_MD_FLID))) {
-                CERROR("MDS body missing inum or generation\n");
-                return 0;
-        }
-
-        if (last_ino == md->body->ino && last_gen == md->body->generation &&
-            last_count < 500) {
-                last_count++;
-        } else {
-                if (last_count > 1)
-                        CDEBUG(D_VFSTRACE, "compared %u/%u %u times\n",
-                               last_ino, last_gen, last_count);
-                last_count = 0;
-                last_ino = md->body->ino;
-                last_gen = md->body->generation;
-                CDEBUG(D_VFSTRACE,
-                       "comparing inode %p ino %lu/%u to body "LPU64"/%u\n",
-                       inode, inode->i_ino, inode->i_generation,
-                       md->body->ino, md->body->generation);
-        }
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        if (inode->i_ino != md->body->ino)
-                return 0;
-#endif
-        if (inode->i_generation != md->body->generation) {
-#ifdef HAVE_EXPORT___IGET
-                if (inode->i_state & (I_FREEING | I_CLEAR))
-                        return 0;
-                if (inode->i_nlink == 0)
-                        return 0;
-
-                /* add "duplicate" inode into deathrow for destroy */
-                spin_lock(&ll_i2sbi(inode)->ll_deathrow_lock);
-                if (list_empty(&ll_i2info(inode)->lli_dead_list)) {
-                        __iget(inode);
-                        list_add(&ll_i2info(inode)->lli_dead_list,
-                                 &ll_i2sbi(inode)->ll_deathrow);
-                }
-                spin_unlock(&ll_i2sbi(inode)->ll_deathrow_lock);
-#endif
-
-                return 0;
-        }
-
-        /* Apply the attributes in 'opaque' to this inode */
-        if (!(inode->i_state & (I_FREEING | I_CLEAR)))
-                ll_update_inode(inode, md);
-        return 1;
-}
-
-int ll_unlock(__u32 mode, struct lustre_handle *lockh)
-{
-        ENTRY;
-
-        ldlm_lock_decref(lockh, mode);
-
-        RETURN(0);
-}
-
-/* Get an inode by inode number (already instantiated by the intent lookup).
- * Returns inode or NULL
- */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-int ll_set_inode(struct inode *inode, void *opaque)
-{
-        ll_read_inode2(inode, opaque);
-        return 0;
-}
-
-struct inode *ll_iget(struct super_block *sb, ino_t hash,
-                      struct lustre_md *md)
-{
-        struct inode *inode;
-
-        LASSERT(hash != 0);
-        inode = iget5_locked(sb, hash, ll_test_inode, ll_set_inode, md);
-
-        if (inode) {
-                if (inode->i_state & I_NEW)
-                        unlock_new_inode(inode);
-                CDEBUG(D_VFSTRACE, "inode: %lu/%u(%p)\n", inode->i_ino,
-                       inode->i_generation, inode);
-        }
-
-        return inode;
-}
-#else
-struct inode *ll_iget(struct super_block *sb, ino_t hash,
-                      struct lustre_md *md)
-{
-        struct inode *inode;
-        LASSERT(hash != 0);
-        inode = iget4(sb, hash, ll_test_inode, md);
-        if (inode)
-                CDEBUG(D_VFSTRACE, "inode: %lu/%u(%p)\n", inode->i_ino,
-                       inode->i_generation, inode);
-        return inode;
-}
-#endif
-
-static void ll_drop_negative_dentry(struct inode *dir)
-{ 
-        struct dentry *dentry, *tmp_alias, *tmp_subdir;
-
-        spin_lock(&dcache_lock);
-restart:
-        list_for_each_entry_safe(dentry, tmp_alias,
-                                 &dir->i_dentry,d_alias) {
-                if (!list_empty(&dentry->d_subdirs)) {
-                        struct dentry *child;
-                        list_for_each_entry_safe(child, tmp_subdir,
-                                                 &dentry->d_subdirs,
-                                                 d_child) {
-                                /* XXX Print some debug here? */
-                                if (!child->d_inode)
-                                /* Negative dentry. If we were
-                                   dropping dcache lock, go
-                                   throught the list again */
-                                        if (ll_drop_dentry(child))
-                                                goto restart;
-                        }
-                }
-        }
-        spin_unlock(&dcache_lock);
-}
-
-int ll_mdc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
-                        void *data, int flag)
-{
-        int rc;
-        struct lustre_handle lockh;
-        ENTRY;
-
-        switch (flag) {
-        case LDLM_CB_BLOCKING:
-                ldlm_lock2handle(lock, &lockh);
-                rc = ldlm_cli_cancel(&lockh);
-                if (rc < 0) {
-                        CDEBUG(D_INODE, "ldlm_cli_cancel: %d\n", rc);
-                        RETURN(rc);
-                }
-                break;
-        case LDLM_CB_CANCELING: {
-                struct inode *inode = ll_inode_from_lock(lock);
-                __u64 bits = lock->l_policy_data.l_inodebits.bits;
-
-                /* Invalidate all dentries associated with this inode */
-                if (inode == NULL)
-                        break;
-
-                LASSERT(lock->l_flags & LDLM_FL_CANCELING);
-                if ((bits & MDS_INODELOCK_LOOKUP) &&
-                    ll_have_md_lock(inode, MDS_INODELOCK_LOOKUP))
-                        bits &= ~MDS_INODELOCK_LOOKUP;
-                if ((bits & MDS_INODELOCK_UPDATE) &&
-                    ll_have_md_lock(inode, MDS_INODELOCK_UPDATE))
-                        bits &= ~MDS_INODELOCK_UPDATE;
-                if ((bits & MDS_INODELOCK_OPEN) &&
-                    ll_have_md_lock(inode, MDS_INODELOCK_OPEN))
-                        bits &= ~MDS_INODELOCK_OPEN;
-                
-                if (lock->l_resource->lr_name.name[0] != inode->i_ino ||
-                    lock->l_resource->lr_name.name[1] != inode->i_generation) {
-                        LDLM_ERROR(lock, "data mismatch with ino %lu/%u (%p)",
-                                   inode->i_ino, inode->i_generation, inode);
-                }
-
-                if (bits & MDS_INODELOCK_OPEN) {
-                        int flags = 0;
-                        switch (lock->l_req_mode) {
-                        case LCK_CW:
-                                flags = FMODE_WRITE;
-                                break;
-                        case LCK_PR:
-                                flags = FMODE_EXEC;
-                                if (!FMODE_EXEC)
-                                        CERROR("open PR lock without FMODE_EXEC\n");
-                                break;
-                        case LCK_CR:
-                                flags = FMODE_READ;
-                                break;
-                        default:
-                                CERROR("Unexpected lock mode for OPEN lock "
-                                       "%d, inode %ld\n", lock->l_req_mode,
-                                       inode->i_ino);
-                        }
-                        ll_mdc_real_close(inode, flags);
-                }
-
-                if (bits & MDS_INODELOCK_UPDATE)
-                        clear_bit(LLI_F_HAVE_MDS_SIZE_LOCK,
-                                  &(ll_i2info(inode)->lli_flags));
-
-                if (S_ISDIR(inode->i_mode) &&
-                     (bits & MDS_INODELOCK_UPDATE)) {
-                        CDEBUG(D_INODE, "invalidating inode %lu\n",
-                               inode->i_ino);
-                        truncate_inode_pages(inode->i_mapping, 0);
-                        ll_drop_negative_dentry(inode);
-                        inode->i_version++; /* XXX: remove with inode version*/
-                }
-
-                if (inode->i_sb->s_root &&
-                    inode != inode->i_sb->s_root->d_inode &&
-                    (bits & MDS_INODELOCK_LOOKUP))
-                        ll_unhash_aliases(inode);
-                iput(inode);
-                break;
-        }
-        default:
-                LBUG();
-        }
-
-        RETURN(0);
-}
-
-int ll_mdc_cancel_unused(struct lustre_handle *conn, struct inode *inode,
-                         int flags, void *opaque)
-{
-        struct ldlm_res_id res_id =
-                { .name = {inode->i_ino, inode->i_generation} };
-        struct obd_device *obddev = class_conn2obd(conn);
-        ENTRY;
-
-        RETURN(ldlm_cli_cancel_unused(obddev->obd_namespace, &res_id, flags,
-                                      opaque));
-}
-
-/* Pack the required supplementary groups into the supplied groups array.
- * If we don't need to use the groups from the target inode(s) then we
- * instead pack one or more groups from the user's supplementary group
- * array in case it might be useful.  Not needed if doing an MDS-side upcall. */
-void ll_i2gids(__u32 *suppgids, struct inode *i1, struct inode *i2)
-{
-        int i;
-
-        LASSERT(i1 != NULL);
-        LASSERT(suppgids != NULL);
-
-        if (in_group_p(i1->i_gid))
-                suppgids[0] = i1->i_gid;
-        else
-                suppgids[0] = -1;
-
-        if (i2) {
-                if (in_group_p(i2->i_gid))
-                        suppgids[1] = i2->i_gid;
-                else
-                        suppgids[1] = -1;
-        } else {
-                suppgids[1] = -1;
-        }
-
-        for (i = 0; i < current_ngroups; i++) {
-                if (suppgids[0] == -1) {
-                        if (current_groups[i] != suppgids[1])
-                                suppgids[0] = current_groups[i];
-                        continue;
-                }
-                if (suppgids[1] == -1) {
-                        if (current_groups[i] != suppgids[0])
-                                suppgids[1] = current_groups[i];
-                        continue;
-                }
-                break;
-        }
-}
-
-int ll_prepare_mdc_op_data(struct mdc_op_data *op_data, struct inode *i1,
-                            struct inode *i2, const char *name, int namelen,
-                            int mode, void *data)
-{
-        LASSERT(i1);
-
-        if (namelen > ll_i2sbi(i1)->ll_namelen)
-                return -ENAMETOOLONG;
-        ll_i2gids(op_data->suppgids, i1, i2);
-        ll_inode2fid(&op_data->fid1, i1);
-
-        if (i2)
-                ll_inode2fid(&op_data->fid2, i2);
-        else
-                memset(&op_data->fid2, 0, sizeof(op_data->fid2));
-
-        op_data->name = name;
-        op_data->namelen = namelen;
-        op_data->create_mode = mode;
-        op_data->mod_time = CURRENT_SECONDS;
-        op_data->data = data;
-
-        return 0;
-}
-
-static void ll_d_add(struct dentry *de, struct inode *inode)
-{
-        CDEBUG(D_DENTRY, "adding inode %p to dentry %p\n", inode, de);
-        /* d_instantiate */
-        if (!list_empty(&de->d_alias)) {
-                spin_unlock(&dcache_lock);
-                CERROR("dentry %.*s %p alias next %p, prev %p\n",
-                       de->d_name.len, de->d_name.name, de,
-                       de->d_alias.next, de->d_alias.prev);
-                LBUG();
-        }
-        if (inode)
-                list_add(&de->d_alias, &inode->i_dentry);
-        de->d_inode = inode;
-
-        /* d_rehash */
-        if (!d_unhashed(de)) {
-                spin_unlock(&dcache_lock);
-                CERROR("dentry %.*s %p hash next %p\n",
-                       de->d_name.len, de->d_name.name, de, de->d_hash.next);
-                LBUG();
-        }
-        d_rehash_cond(de, 0);
-}
-
-/* Search "inode"'s alias list for a dentry that has the same name and parent
- * as de.  If found, return it.  If not found, return de.
- * Lustre can't use d_add_unique because don't unhash aliases for directory
- * in ll_revalidate_it.  After revaliadate inode will be have hashed aliases
- * and it triggers BUG_ON in d_instantiate_unique (bug #10954).
- */
-static struct dentry *ll_find_alias(struct inode *inode, struct dentry *de)
-{
-        struct list_head *tmp;
-        struct dentry *dentry;
-        struct dentry *last_discon = NULL;
-
-        spin_lock(&dcache_lock);
-        list_for_each(tmp, &inode->i_dentry) {
-                dentry = list_entry(tmp, struct dentry, d_alias);
-
-                /* We are called here with 'de' already on the aliases list. */
-                if (unlikely(dentry == de)) {
-                        CERROR("whoops\n");
-                        continue;
-                }
-
-                if (dentry->d_flags & DCACHE_DISCONNECTED) {
-                        LASSERT(last_discon == NULL);
-                        last_discon = dentry;
-                        continue;
-                }
-
-                if (dentry->d_parent != de->d_parent)
-                        continue;
-
-                if (dentry->d_name.hash != de->d_name.hash)
-                        continue;
-
-                if (dentry->d_name.len != de->d_name.len)
-                        continue;
-
-                if (memcmp(dentry->d_name.name, de->d_name.name,
-                           de->d_name.len) != 0)
-                        continue;
-
-                dget_locked(dentry);
-                lock_dentry(dentry);
-                __d_drop(dentry);
-#ifdef DCACHE_LUSTRE_INVALID
-                dentry->d_flags &= ~DCACHE_LUSTRE_INVALID;
-#endif
-                unlock_dentry(dentry);
-                d_rehash_cond(dentry, 0); /* avoid taking dcache_lock inside */
-                spin_unlock(&dcache_lock);
-                iput(inode);
-                CDEBUG(D_DENTRY, "alias dentry %.*s (%p) parent %p inode %p "
-                       "refc %d\n", de->d_name.len, de->d_name.name, de,
-                       de->d_parent, de->d_inode, atomic_read(&de->d_count));
-                return dentry;
-        }
-        if (last_discon) {
-                 CDEBUG(D_DENTRY, "Reuse disconnected dentry %p inode %p "
-                        "refc %d\n", last_discon, last_discon->d_inode,
-                        atomic_read(&last_discon->d_count));
-                 dget_locked(last_discon);
-                 spin_unlock(&dcache_lock);
-                 d_rehash(de);
-                 d_move(last_discon, de);
-                 iput(inode);
-                 return last_discon;
-        }
-
-        ll_d_add(de, inode);
-
-        spin_unlock(&dcache_lock);
-
-        return de;
-}
-
-int lookup_it_finish(struct ptlrpc_request *request, int offset,
-                     struct lookup_intent *it, void *data)
-{
-        struct it_cb_data *icbd = data;
-        struct dentry **de = icbd->icbd_childp;
-        struct inode *parent = icbd->icbd_parent;
-        struct ll_sb_info *sbi = ll_i2sbi(parent);
-        struct inode *inode = NULL;
-        int set = 0, rc;
-        ENTRY;
-
-        lock_dentry(*de);
-        if (likely((*de)->d_op != &ll_d_ops)) {
-                (*de)->d_op = &ll_init_d_ops;
-                set = 1;
-        }
-        unlock_dentry(*de);
-
-        /* NB 1 request reference will be taken away by ll_intent_lock()
-         * when I return */
-        if (!it_disposition(it, DISP_LOOKUP_NEG)) {
-                struct dentry *save = *de;
-
-                rc = ll_prep_inode(sbi->ll_osc_exp, &inode, request, offset,
-                                   (*de)->d_sb);
-                if (rc) {
-                        if (set) {
-                                lock_dentry(*de);
-                                if (likely((*de)->d_op == &ll_init_d_ops)) {
-                                        (*de)->d_op = &ll_fini_d_ops;
-                                        unlock_dentry(*de);
-                                        smp_wmb();
-                                        ll_d_wakeup(*de);
-                                } else {
-                                        unlock_dentry(*de);
-                                }
-                        }
-                        RETURN(rc);
-                }
-
-                CDEBUG(D_DLMTRACE, "setting l_data to inode %p (%lu/%u)\n",
-                       inode, inode->i_ino, inode->i_generation);
-                mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode);
-
-                /* We used to query real size from OSTs here, but actually
-                   this is not needed. For stat() calls size would be updated
-                   from subsequent do_revalidate()->ll_inode_revalidate_it() in
-                   2.4 and
-                   vfs_getattr_it->ll_getattr()->ll_inode_revalidate_it() in 2.6
-                   Everybody else who needs correct file size would call
-                   ll_glimpse_size or some equivalent themselves anyway.
-                   Also see bug 7198. */
-                *de = ll_find_alias(inode, *de);
-                if (set && *de != save) {
-                        lock_dentry(save);
-                        if (likely(save->d_op == &ll_init_d_ops)) {
-                                save->d_op = &ll_fini_d_ops;
-                                unlock_dentry(save);
-                                smp_wmb();
-                                ll_d_wakeup(save);
-                        } else {
-                                unlock_dentry(save);
-                        }
-                }
-        } else {
-                /* Check that parent has UPDATE lock. If there is none, we
-                   cannot afford to hash this dentry (done by ll_d_add) as it
-                   might get picked up later when UPDATE lock will appear */
-                if (ll_have_md_lock(parent, MDS_INODELOCK_UPDATE)) {
-                        spin_lock(&dcache_lock);
-                        ll_d_add(*de, inode);
-                        spin_unlock(&dcache_lock);
-                } else {
-                        /* We do not want to hash the dentry if don`t have a
-                         * lock, but if this dentry is later used in d_move,
-                         * we'd hit uninitialised list head d_hash, so we just
-                         * do this to init d_hash field but leave dentry
-                         * unhashed. (bug 10796). */
-                        d_rehash(*de);
-                        d_drop(*de);
-                }
-        }
-
-        ll_set_dd(*de);
-
-        lock_dentry(*de);
-        if (likely((*de)->d_op == &ll_init_d_ops)) {
-                (*de)->d_op = &ll_d_ops;
-                unlock_dentry(*de);
-                smp_wmb();
-                ll_d_wakeup(*de);
-        } else {
-                (*de)->d_op = &ll_d_ops;
-                unlock_dentry(*de);
-        }
-
-        RETURN(0);
-}
-
-static struct dentry *ll_lookup_it(struct inode *parent, struct dentry *dentry,
-                                   struct lookup_intent *it, int lookup_flags)
-{
-        struct dentry *save = dentry, *retval;
-        struct mdc_op_data op_data;
-        struct it_cb_data icbd;
-        struct ptlrpc_request *req = NULL;
-        struct lookup_intent lookup_it = { .it_op = IT_LOOKUP };
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n",
-               dentry->d_name.len, dentry->d_name.name, parent->i_ino,
-               parent->i_generation, parent, LL_IT2STR(it));
-
-        if (d_mountpoint(dentry))
-                CERROR("Tell Peter, lookup on mtpt, it %s\n", LL_IT2STR(it));
-
-        ll_frob_intent(&it, &lookup_it);
-
-        /* As do_lookup is called before follow_mount, root dentry may be left
-         * not valid, revalidate it here. */
-        if (parent->i_sb->s_root && (parent->i_sb->s_root->d_inode == parent) &&
-            (it->it_op & (IT_OPEN | IT_CREAT))) {
-                rc = ll_inode_revalidate_it(parent->i_sb->s_root, it);
-                if (rc)
-                        RETURN(ERR_PTR(rc));
-        }
-
-        if (it->it_op == IT_GETATTR) {
-                rc = ll_statahead_enter(parent, &dentry, 1);
-                if (rc >= 0) {
-                        ll_statahead_exit(dentry, rc);
-                        if (rc == 1)
-                                RETURN(retval = dentry);
-                }
-        }
-
-        icbd.icbd_parent = parent;
-        icbd.icbd_childp = &dentry;
-
-        rc = ll_prepare_mdc_op_data(&op_data, parent, NULL, dentry->d_name.name,
-                                    dentry->d_name.len, lookup_flags, NULL);
-        if (rc)
-                RETURN(ERR_PTR(rc));
-
-        it->it_create_mode &= ~current->fs->umask;
-
-        rc = mdc_intent_lock(ll_i2mdcexp(parent), &op_data, NULL, 0, it,
-                             lookup_flags, &req, ll_mdc_blocking_ast, 0);
-
-        if (rc < 0)
-                GOTO(out, retval = ERR_PTR(rc));
-
-        rc = lookup_it_finish(req, DLM_REPLY_REC_OFF, it, &icbd);
-        if (rc != 0) {
-                ll_intent_release(it);
-                GOTO(out, retval = ERR_PTR(rc));
-        }
-
-        if ((it->it_op & IT_OPEN) && dentry->d_inode &&
-            !S_ISREG(dentry->d_inode->i_mode) &&
-            !S_ISDIR(dentry->d_inode->i_mode)) {
-                ll_release_openhandle(dentry, it);
-        }
-        ll_lookup_finish_locks(it, dentry);
-
-        if (dentry == save)
-                GOTO(out, retval = NULL);
-        else
-                GOTO(out, retval = dentry);
- out:
-        if (req)
-                ptlrpc_req_finished(req);
-        return retval;
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-#ifdef HAVE_VFS_INTENT_PATCHES
-static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,
-                                   struct nameidata *nd)
-{
-        struct dentry *de;
-        ENTRY;
-
-        if (nd && nd->flags & LOOKUP_LAST && !(nd->flags & LOOKUP_LINK_NOTLAST))
-                de = ll_lookup_it(parent, dentry, &nd->intent, nd->flags);
-        else
-                de = ll_lookup_it(parent, dentry, NULL, 0);
-
-        RETURN(de);
-}
-#else
-struct lookup_intent *ll_convert_intent(struct open_intent *oit,
-                                        int lookup_flags)
-{
-        struct lookup_intent *it;
-
-        OBD_ALLOC(it, sizeof(*it));
-        if (!it)
-                return ERR_PTR(-ENOMEM);
-
-        if (lookup_flags & LOOKUP_OPEN) {
-                it->it_op = IT_OPEN;
-                if (lookup_flags & LOOKUP_CREATE)
-                        it->it_op |= IT_CREAT;
-                it->it_create_mode = oit->create_mode;
-                it->it_flags = oit->flags;
-        } else {
-                it->it_op = IT_GETATTR;
-        }
-
-#ifndef HAVE_FILE_IN_STRUCT_INTENT
-                /* Since there is no way to pass our intent to ll_file_open,
-                 * just check the file is there. Actual open will be done
-                 * in ll_file_open */
-                if (it->it_op & IT_OPEN)
-                        it->it_op = IT_LOOKUP;
-#endif
-
-        return it;
-}
-
-static struct dentry *ll_lookup_nd(struct inode *parent, struct dentry *dentry,
-                                   struct nameidata *nd)
-{
-        struct dentry *de;
-        ENTRY;
-
-        if (nd && !(nd->flags & (LOOKUP_CONTINUE|LOOKUP_PARENT))) {
-                struct lookup_intent *it;
-
-#if defined(HAVE_FILE_IN_STRUCT_INTENT) && (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
-                /* Did we came here from failed revalidate just to propagate
-                 * its error? */
-                if (nd->flags & LOOKUP_OPEN)
-                        if (IS_ERR(nd->intent.open.file))
-                                RETURN((struct dentry *)nd->intent.open.file);
-#endif
-
-                if (ll_d2d(dentry) && ll_d2d(dentry)->lld_it) {
-                        it = ll_d2d(dentry)->lld_it;
-                        ll_d2d(dentry)->lld_it = NULL;
-                } else {
-                        it = ll_convert_intent(&nd->intent.open, nd->flags);
-                        if (IS_ERR(it))
-                                RETURN((struct dentry *)it);
-                }
-
-                de = ll_lookup_it(parent, dentry, it, nd->flags);
-                if (de)
-                        dentry = de;
-                if ((nd->flags & LOOKUP_OPEN) && !IS_ERR(dentry)) { /* Open */
-                        if (dentry->d_inode &&
-                            it_disposition(it, DISP_OPEN_OPEN)) { /* nocreate */
-#ifdef HAVE_FILE_IN_STRUCT_INTENT
-                                if (S_ISFIFO(dentry->d_inode->i_mode)) {
-                                        // We cannot call open here as it would
-                                        // deadlock.
-                                        ptlrpc_req_finished(
-                                                       (struct ptlrpc_request *)
-                                                          it->d.lustre.it_data);
-                                } else {
-                                        struct file *filp;
-                                        nd->intent.open.file->private_data = it;
-                                        filp =lookup_instantiate_filp(nd,dentry,
-                                                                      NULL);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
-/* 2.6.1[456] have a bug in open_namei() that forgets to check
- * nd->intent.open.file for error, so we need to return it as lookup's result
- * instead */
-                                        if (IS_ERR(filp)) {
-                                                if (de)
-                                                        dput(de);
-                                                de = (struct dentry *) filp;
-                                        }
-#endif
-
-                                }
-#else /* HAVE_FILE_IN_STRUCT_INTENT */
-                                /* Release open handle as we have no way to
-                                 * pass it to ll_file_open */
-                                ll_release_openhandle(dentry, it);
-#endif /* HAVE_FILE_IN_STRUCT_INTENT */
-                        } else if (it_disposition(it, DISP_OPEN_CREATE)) {
-                                // XXX This can only reliably work on assumption
-                                // that there are NO hashed negative dentries.
-                                ll_d2d(dentry)->lld_it = it;
-                                it = NULL; /* Will be freed in ll_create_nd */
-                                /* We absolutely depend on ll_create_nd to be
-                                 * called to not leak this intent and possible
-                                 * data attached to it */
-                        }
-                }
-
-                if (it) {
-                        ll_intent_release(it);
-                        OBD_FREE(it, sizeof(*it));
-                }
-        } else {
-                de = ll_lookup_it(parent, dentry, NULL, 0);
-        }
-
-        RETURN(de);
-}
-#endif
-#endif
-
-/* We depend on "mode" being set with the proper file type/umask by now */
-static struct inode *ll_create_node(struct inode *dir, const char *name,
-                                    int namelen, const void *data, int datalen,
-                                    int mode, __u64 extra,
-                                    struct lookup_intent *it)
-{
-        struct inode *inode = NULL;
-        struct ptlrpc_request *request = NULL;
-        struct ll_sb_info *sbi = ll_i2sbi(dir);
-        int rc;
-        ENTRY;
-
-        LASSERT(it && it->d.lustre.it_disposition);
-
-        LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF));
-        request = it->d.lustre.it_data;
-        it_clear_disposition(it, DISP_ENQ_CREATE_REF);
-        rc = ll_prep_inode(sbi->ll_osc_exp, &inode, request, DLM_REPLY_REC_OFF,
-                           dir->i_sb);
-        if (rc)
-                GOTO(out, inode = ERR_PTR(rc));
-
-        LASSERT(list_empty(&inode->i_dentry));
-
-        /* We asked for a lock on the directory, but were granted a
-         * lock on the inode.  Since we finally have an inode pointer,
-         * stuff it in the lock. */
-        CDEBUG(D_DLMTRACE, "setting l_ast_data to inode %p (%lu/%u)\n",
-               inode, inode->i_ino, inode->i_generation);
-        mdc_set_lock_data(&it->d.lustre.it_lock_handle, inode);
-        EXIT;
- out:
-        ptlrpc_req_finished(request);
-        return inode;
-}
-
-/*
- * By the time this is called, we already have created the directory cache
- * entry for the new file, but it is so far negative - it has no inode.
- *
- * We defer creating the OBD object(s) until open, to keep the intent and
- * non-intent code paths similar, and also because we do not have the MDS
- * inode number before calling ll_create_node() (which is needed for LOV),
- * so we would need to do yet another RPC to the MDS to store the LOV EA
- * data on the MDS.  If needed, we would pass the PACKED lmm as data and
- * lmm_size in datalen (the MDS still has code which will handle that).
- *
- * If the create succeeds, we fill in the inode information
- * with d_instantiate().
- */
-static int ll_create_it(struct inode *dir, struct dentry *dentry, int mode,
-                        struct lookup_intent *it)
-{
-        struct inode *inode;
-        struct ptlrpc_request *request = it->d.lustre.it_data;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),intent=%s\n",
-               dentry->d_name.len, dentry->d_name.name, dir->i_ino,
-               dir->i_generation, dir, LL_IT2STR(it));
-
-        rc = it_open_error(DISP_OPEN_CREATE, it);
-        if (rc)
-                RETURN(rc);
-
-        mdc_store_inode_generation(request, DLM_INTENT_REC_OFF,
-                                   DLM_REPLY_REC_OFF);
-        inode = ll_create_node(dir, dentry->d_name.name, dentry->d_name.len,
-                               NULL, 0, mode, 0, it);
-        if (IS_ERR(inode)) {
-                RETURN(PTR_ERR(inode));
-        }
-
-        d_instantiate(dentry, inode);
-        /* Negative dentry may be unhashed if parent does not have UPDATE lock,
-         * but some callers, e.g. do_coredump, expect dentry to be hashed after
-         * successful create. Hash it here. */
-        spin_lock(&dcache_lock);
-        if (d_unhashed(dentry))
-                d_rehash_cond(dentry, 0);
-        spin_unlock(&dcache_lock);
-        RETURN(0);
-}
-
-static void ll_update_times(struct ptlrpc_request *request, int offset,
-                            struct inode *inode)
-{
-        struct mds_body *body = lustre_msg_buf(request->rq_repmsg, offset,
-                                               sizeof(*body));
-        LASSERT(body);
-
-        /* mtime is always updated with ctime, but can be set in past.
-           As write and utime(2) may happen within 1 second, and utime's
-           mtime has a priority over write's one, so take mtime from mds
-           for the same ctimes. */
-        if (body->valid & OBD_MD_FLCTIME &&
-            body->ctime >= LTIME_S(inode->i_ctime)) {
-                LTIME_S(inode->i_ctime) = body->ctime;
-
-                if (body->valid & OBD_MD_FLMTIME) {
-                        CDEBUG(D_INODE, "setting ino %lu mtime from %lu "
-                               "to "LPU64"\n", inode->i_ino,
-                               LTIME_S(inode->i_mtime), body->mtime);
-                        LTIME_S(inode->i_mtime) = body->mtime;
-                }
-        }
-}
-
-static int ll_new_node(struct inode *dir, struct qstr *name,
-                       const char *tgt, int mode,
-                       int rdev, struct dentry *dchild)
-{
-        struct ptlrpc_request *request = NULL;
-        struct inode *inode = NULL;
-        struct ll_sb_info *sbi = ll_i2sbi(dir);
-        struct mdc_op_data op_data;
-        int tgt_len = 0;
-        int err;
-
-        ENTRY;
-        if (unlikely(tgt != NULL))
-                tgt_len = strlen(tgt)+1;
-
-        err = ll_prepare_mdc_op_data(&op_data, dir, NULL, name->name,
-                                     name->len, 0, NULL);
-        if (err)
-                GOTO(err_exit, err);
-
-        err = mdc_create(sbi->ll_mdc_exp, &op_data, tgt, tgt_len,
-                         mode, current->fsuid, current->fsgid,
-                         current->cap_effective, rdev, &request);
-        if (err)
-                GOTO(err_exit, err);
-
-        ll_update_times(request, REPLY_REC_OFF, dir);
-
-        if (dchild) {
-                err = ll_prep_inode(sbi->ll_osc_exp, &inode, request,
-                                    REPLY_REC_OFF, dchild->d_sb);
-                if (err)
-                     GOTO(err_exit, err);
-
-                d_drop(dchild);
-                d_instantiate(dchild, inode);
-                EXIT;
-        }
-err_exit:
-        ptlrpc_req_finished(request);
-
-        return err;
-}
-
-
-static int ll_mknod_generic(struct inode *dir, struct qstr *name, int mode,
-                            unsigned rdev, struct dentry *dchild)
-{
-        int err;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p) mode %o dev %x\n",
-               name->len, name->name, dir->i_ino, dir->i_generation, dir,
-               mode, rdev);
-
-        mode &= ~current->fs->umask;
-
-        switch (mode & S_IFMT) {
-        case 0:
-                mode |= S_IFREG; /* for mode = 0 case, fallthrough */
-        case S_IFREG:
-        case S_IFCHR:
-        case S_IFBLK:
-        case S_IFIFO:
-        case S_IFSOCK:
-                err = ll_new_node(dir, name, NULL, mode, rdev, dchild);
-                break;
-        case S_IFDIR:
-                err = -EPERM;
-                break;
-        default:
-                err = -EINVAL;
-        }
-        RETURN(err);
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-#ifndef HAVE_VFS_INTENT_PATCHES
-static int ll_create_nd(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
-{
-        struct lookup_intent *it = ll_d2d(dentry)->lld_it;
-        int rc;
-
-        if (!it)
-                return ll_mknod_generic(dir, &dentry->d_name, mode, 0, dentry);
-
-        ll_d2d(dentry)->lld_it = NULL;
-
-        /* Was there an error? Propagate it! */
-        if (it->d.lustre.it_status) {
-                rc = it->d.lustre.it_status;
-                goto out;
-        }
-
-        rc = ll_create_it(dir, dentry, mode, it);
-#ifdef HAVE_FILE_IN_STRUCT_INTENT
-        if (nd && (nd->flags & LOOKUP_OPEN) && dentry->d_inode) { /* Open */
-                nd->intent.open.file->private_data = it;
-                lookup_instantiate_filp(nd, dentry, NULL);
-        }
-#else
-        ll_release_openhandle(dentry,it);
-#endif
-
-out:
-        ll_intent_release(it);
-        OBD_FREE(it, sizeof(*it));
-
-        return rc;
-}
-#else
-static int ll_create_nd(struct inode *dir, struct dentry *dentry, int mode, struct nameidata *nd)
-{
-
-        if (!nd || !nd->intent.d.lustre.it_disposition)
-                /* No saved request? Just mknod the file */
-                return ll_mknod_generic(dir, &dentry->d_name, mode, 0, dentry);
-
-        return ll_create_it(dir, dentry, mode, &nd->intent);
-}
-#endif
-#endif
-
-static int ll_symlink_generic(struct inode *dir, struct qstr *name,
-                              const char *tgt, struct dentry *dchild)
-{
-        int err;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p),target=%.*s\n",
-               name->len, name->name, dir->i_ino, dir->i_generation,
-               dir, 3000, tgt);
-
-        err = ll_new_node(dir, name, (char *)tgt, S_IFLNK | S_IRWXUGO,
-                          0, dchild);
-        RETURN(err);
-}
-
-static int ll_link_generic(struct inode *src,  struct inode *dir,
-                           struct qstr *name, struct dentry *dchild)
-{
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data;
-        int err;
-        struct ll_sb_info *sbi = ll_i2sbi(dir);
-
-        ENTRY;
-        CDEBUG(D_VFSTRACE,
-               "VFS Op: inode=%lu/%u(%p), dir=%lu/%u(%p), target=%.*s\n",
-               src->i_ino, src->i_generation, src, dir->i_ino,
-               dir->i_generation, dir, name->len, name->name);
-
-        err = ll_prepare_mdc_op_data(&op_data, src, dir, name->name,
-                                     name->len, 0, NULL);
-        if (err)
-                GOTO(out, err);
-        err = mdc_link(sbi->ll_mdc_exp, &op_data, &request);
-        if (err)
-               GOTO(out, err);
-
-        if (dchild) {
-                d_drop(dchild);
-        }
-        ll_update_times(request, REPLY_REC_OFF, dir);
-
-        EXIT;
-out:
-        ptlrpc_req_finished(request);
-        RETURN(err);
-}
-
-static int ll_mkdir_generic(struct inode *dir, struct qstr *name, int mode,
-                            struct dentry *dchild)
-
-{
-        int err;
-
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
-               name->len, name->name, dir->i_ino, dir->i_generation, dir);
-
-        mode = (mode & (S_IRWXUGO|S_ISVTX) & ~current->fs->umask) | S_IFDIR;
-        err = ll_new_node(dir, name, NULL, mode, 0, dchild);
-
-        RETURN(err);
-}
-
-/* Try to find the child dentry by its name.
-   If found, put the result fid into @fid. */
-static void ll_get_child_fid(struct inode * dir, struct qstr *name,
-                             struct ll_fid *fid)
-{
-        struct dentry *parent, *child;
-        
-        parent = list_entry(dir->i_dentry.next, struct dentry, d_alias);
-        child = d_lookup(parent, name);
-        if (child) {
-                if (child->d_inode)
-                        ll_inode2fid(fid, child->d_inode);
-                dput(child);
-        }
-}
-
-static int ll_rmdir_generic(struct inode *dir, struct dentry *dparent,
-                            struct qstr *name)
-{
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data = {{0}};
-        struct dentry *dentry;
-        int rc;
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
-               name->len, name->name, dir->i_ino, dir->i_generation, dir);
-
-        /* Check if we have something mounted at the dir we are going to delete
-         * In such a case there would always be dentry present. */
-        if (dparent) {
-                dentry = d_lookup(dparent, name);
-                if (dentry) {
-                        int mounted = d_mountpoint(dentry);
-                        dput(dentry);
-                        if (mounted)
-                                GOTO(out, rc = -EBUSY);
-                }
-        }
-
-        rc = ll_prepare_mdc_op_data(&op_data, dir, NULL, name->name,
-                                    name->len, S_IFDIR, NULL);
-        if (rc)
-                GOTO(out, rc);
-        
-        ll_get_child_fid(dir, name, &op_data.fid3);
-        rc = mdc_unlink(ll_i2sbi(dir)->ll_mdc_exp, &op_data, &request);
-        if (rc)
-                GOTO(out, rc);
-        ll_update_times(request, REPLY_REC_OFF, dir);
-
-        EXIT;
-out:
-        ptlrpc_req_finished(request);
-        return(rc);
-}
-
-int ll_objects_destroy(struct ptlrpc_request *request, struct inode *dir)
-{
-        struct mds_body *body;
-        struct lov_mds_md *eadata;
-        struct lov_stripe_md *lsm = NULL;
-        struct obd_trans_info oti = { 0 };
-        struct obdo *oa;
-        int rc;
-        ENTRY;
-
-        /* req is swabbed so this is safe */
-        body = lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF, sizeof(*body));
-
-        if (!(body->valid & OBD_MD_FLEASIZE))
-                RETURN(0);
-
-        if (body->eadatasize == 0) {
-                CERROR("OBD_MD_FLEASIZE set but eadatasize zero\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        /* The MDS sent back the EA because we unlinked the last reference
-         * to this file. Use this EA to unlink the objects on the OST.
-         * It's opaque so we don't swab here; we leave it to obd_unpackmd() to
-         * check it is complete and sensible. */
-        eadata = lustre_swab_repbuf(request, REPLY_REC_OFF + 1,
-                                    body->eadatasize, NULL);
-        LASSERT(eadata != NULL);
-        if (eadata == NULL) {
-                CERROR("Can't unpack MDS EA data\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        rc = obd_unpackmd(ll_i2obdexp(dir), &lsm, eadata, body->eadatasize);
-        if (rc < 0) {
-                CERROR("obd_unpackmd: %d\n", rc);
-                GOTO(out, rc);
-        }
-        LASSERT(rc >= sizeof(*lsm));
-
-        rc = obd_checkmd(ll_i2obdexp(dir), ll_i2mdcexp(dir), lsm);
-        if (rc)
-                GOTO(out_free_memmd, rc);
-
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                GOTO(out_free_memmd, rc = -ENOMEM);
-
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_mode = body->mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE;
-
-        if (body->valid & OBD_MD_FLCOOKIE) {
-                oa->o_valid |= OBD_MD_FLCOOKIE;
-                oti.oti_logcookies =
-                        lustre_msg_buf(request->rq_repmsg, REPLY_REC_OFF + 2,
-                                       sizeof(struct llog_cookie) *
-                                       lsm->lsm_stripe_count);
-                if (oti.oti_logcookies == NULL) {
-                        oa->o_valid &= ~OBD_MD_FLCOOKIE;
-                        body->valid &= ~OBD_MD_FLCOOKIE;
-                }
-        }
-
-        rc = obd_destroy(ll_i2obdexp(dir), oa, lsm, &oti, ll_i2mdcexp(dir));
-        OBDO_FREE(oa);
-        if (rc)
-                CERROR("obd destroy objid "LPX64" error %d\n",
-                       lsm->lsm_object_id, rc);
- out_free_memmd:
-        obd_free_memmd(ll_i2obdexp(dir), &lsm);
- out:
-        return rc;
-}
-
-static int ll_unlink_generic(struct inode * dir, struct qstr *name)
-{
-        struct ptlrpc_request *request = NULL;
-        struct mdc_op_data op_data = {{0}};
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:name=%.*s,dir=%lu/%u(%p)\n",
-               name->len, name->name, dir->i_ino, dir->i_generation, dir);
-
-        rc = ll_prepare_mdc_op_data(&op_data, dir, NULL, name->name,
-                                    name->len, 0, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        ll_get_child_fid(dir, name, &op_data.fid3);
-        rc = mdc_unlink(ll_i2sbi(dir)->ll_mdc_exp, &op_data, &request);
-        if (rc)
-                GOTO(out, rc);
-
-        ll_update_times(request, REPLY_REC_OFF, dir);
-
-        rc = ll_objects_destroy(request, dir);
-        if (rc)
-                GOTO(out, rc);
-        EXIT;
- out:
-        ptlrpc_req_finished(request);
-        return(rc);
-}
-
-static int ll_rename_generic(struct inode *src, struct qstr *src_name,
-                             struct inode *tgt, struct qstr *tgt_name)
-{
-        struct ptlrpc_request *request = NULL;
-        struct ll_sb_info *sbi = ll_i2sbi(src);
-        struct mdc_op_data op_data = {{0}};
-        int err;
-
-        ENTRY;
-        CDEBUG(D_VFSTRACE,"VFS Op:oldname=%.*s,src_dir=%lu/%u(%p),newname=%.*s,"
-               "tgt_dir=%lu/%u(%p)\n", src_name->len, src_name->name,
-               src->i_ino, src->i_generation, src, tgt_name->len,
-               tgt_name->name, tgt->i_ino, tgt->i_generation, tgt);
-
-        err = ll_prepare_mdc_op_data(&op_data, src, tgt, NULL, 0, 0, NULL);
-        if (err)
-                GOTO(out, err);
-        
-        ll_get_child_fid(src, src_name, &op_data.fid3);
-        ll_get_child_fid(tgt, tgt_name, &op_data.fid4);
-        err = mdc_rename(sbi->ll_mdc_exp, &op_data,
-                         src_name->name, src_name->len,
-                         tgt_name->name, tgt_name->len, &request);
-        if (err)
-                GOTO(out, err);
-        ll_update_times(request, REPLY_REC_OFF, src);
-        ll_update_times(request, REPLY_REC_OFF, tgt);
-        err = ll_objects_destroy(request, src);
-        if (err)
-                GOTO(out, err);
-
-        EXIT;
-out:
-        ptlrpc_req_finished(request);
-
-        return(err);
-}
-
-#ifdef HAVE_VFS_INTENT_PATCHES
-static int ll_mknod_raw(struct nameidata *nd, int mode, dev_t rdev)
-{
-        return ll_mknod_generic(nd->dentry->d_inode, &nd->last, mode,rdev,NULL);
-}
-static int ll_rename_raw(struct nameidata *srcnd, struct nameidata *tgtnd)
-{
-        return ll_rename_generic(srcnd->dentry->d_inode, &srcnd->last,
-                                 tgtnd->dentry->d_inode, &tgtnd->last);
-}
-static int ll_link_raw(struct nameidata *srcnd, struct nameidata *tgtnd)
-{
-        return ll_link_generic(srcnd->dentry->d_inode, tgtnd->dentry->d_inode,
-                               &tgtnd->last, NULL);
-}
-static int ll_symlink_raw(struct nameidata *nd, const char *tgt)
-{
-        return ll_symlink_generic(nd->dentry->d_inode, &nd->last, tgt, NULL);
-}
-static int ll_rmdir_raw(struct nameidata *nd)
-{
-        return ll_rmdir_generic(nd->dentry->d_inode, nd->dentry, &nd->last);
-}
-static int ll_mkdir_raw(struct nameidata *nd, int mode)
-{
-        return ll_mkdir_generic(nd->dentry->d_inode, &nd->last, mode, NULL);
-}
-static int ll_unlink_raw(struct nameidata *nd)
-{
-        return ll_unlink_generic(nd->dentry->d_inode, &nd->last);
-}
-#endif
-
-static int ll_mknod(struct inode *dir, struct dentry *dchild, int mode,
-                    ll_dev_t rdev)
-{
-        return ll_mknod_generic(dir, &dchild->d_name, mode,
-                                old_encode_dev(rdev), dchild);
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-static int ll_unlink(struct inode * dir, struct dentry *dentry)
-{
-        return ll_unlink_generic(dir, &dentry->d_name);
-}
-static int ll_mkdir(struct inode *dir, struct dentry *dentry, int mode)
-{
-        return ll_mkdir_generic(dir, &dentry->d_name, mode, dentry);
-}
-static int ll_rmdir(struct inode *dir, struct dentry *dentry)
-{
-        return ll_rmdir_generic(dir, NULL, &dentry->d_name);
-}
-static int ll_symlink(struct inode *dir, struct dentry *dentry,
-                      const char *oldname)
-{
-        return ll_symlink_generic(dir, &dentry->d_name, oldname, dentry);
-}
-static int ll_link(struct dentry *old_dentry, struct inode *dir,
-                   struct dentry *new_dentry)
-{
-        return ll_link_generic(old_dentry->d_inode, dir,
-                               &new_dentry->d_name, new_dentry);
-}
-static int ll_rename(struct inode *old_dir, struct dentry *old_dentry,
-                     struct inode *new_dir, struct dentry *new_dentry)
-{
-        return ll_rename_generic(old_dir, &old_dentry->d_name, new_dir,
-                                 &new_dentry->d_name);
-}
-#endif
-
-struct inode_operations ll_dir_inode_operations = {
-#ifdef HAVE_VFS_INTENT_PATCHES
-        .link_raw           = ll_link_raw,
-        .unlink_raw         = ll_unlink_raw,
-        .symlink_raw        = ll_symlink_raw,
-        .mkdir_raw          = ll_mkdir_raw,
-        .rmdir_raw          = ll_rmdir_raw,
-        .mknod_raw          = ll_mknod_raw,
-        .rename_raw         = ll_rename_raw,
-        .setattr            = ll_setattr,
-        .setattr_raw        = ll_setattr_raw,
-#endif
-        .mknod              = ll_mknod,
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        .create_it          = ll_create_it,
-        .lookup_it          = ll_lookup_it,
-        .revalidate_it      = ll_inode_revalidate_it,
-#else
-        .lookup             = ll_lookup_nd,
-        .create             = ll_create_nd,
-        /* We need all these non-raw things for NFSD, to not patch it. */
-        .unlink             = ll_unlink,
-        .mkdir              = ll_mkdir,
-        .rmdir              = ll_rmdir,
-        .symlink            = ll_symlink,
-        .link               = ll_link,
-        .rename             = ll_rename,
-        .setattr            = ll_setattr,
-        .getattr            = ll_getattr,
-#endif
-        .permission         = ll_inode_permission,
-        .setxattr           = ll_setxattr,
-        .getxattr           = ll_getxattr,
-        .listxattr          = ll_listxattr,
-        .removexattr        = ll_removexattr,
-};
-
-struct inode_operations ll_special_inode_operations = {
-#ifdef HAVE_VFS_INTENT_PATCHES
-        .setattr_raw    = ll_setattr_raw,
-#endif
-        .setattr        = ll_setattr,
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        .getattr        = ll_getattr,
-#else
-        .revalidate_it  = ll_inode_revalidate_it,
-#endif
-        .permission     = ll_inode_permission,
-        .setxattr       = ll_setxattr,
-        .getxattr       = ll_getxattr,
-        .listxattr      = ll_listxattr,
-        .removexattr    = ll_removexattr,
-};
diff --git a/lustre/llite/rw.c b/lustre/llite/rw.c
deleted file mode 100644
index c48c39e23ecf0d28f5441b49ef1b3ad1680888d0..0000000000000000000000000000000000000000
--- a/lustre/llite/rw.c
+++ /dev/null
@@ -1,2185 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Lite I/O page cache routines shared by different kernel revs
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/smp_lock.h>
-#include <linux/unistd.h>
-#include <linux/version.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include <linux/fs.h>
-#include <linux/stat.h>
-#include <asm/uaccess.h>
-#include <linux/mm.h>
-#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <lustre_lite.h>
-#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
-
-#ifndef list_for_each_prev_safe
-#define list_for_each_prev_safe(pos, n, head) \
-        for (pos = (head)->prev, n = pos->prev; pos != (head); \
-                pos = n, n = pos->prev )
-#endif
-
-cfs_mem_cache_t *ll_async_page_slab = NULL;
-size_t ll_async_page_slab_size = 0;
-
-/* SYNCHRONOUS I/O to object storage for an inode */
-static int ll_brw(int cmd, struct inode *inode, struct obdo *oa,
-                  struct page *page, int flags)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_info oinfo = { { { 0 } } };
-        struct brw_page pg;
-        int rc;
-        ENTRY;
-
-        pg.pg = page;
-        pg.off = ((obd_off)page->index) << CFS_PAGE_SHIFT;
-
-        if ((cmd & OBD_BRW_WRITE) && (pg.off+CFS_PAGE_SIZE>i_size_read(inode)))
-                pg.count = i_size_read(inode) % CFS_PAGE_SIZE;
-        else
-                pg.count = CFS_PAGE_SIZE;
-
-        LL_CDEBUG_PAGE(D_PAGE, page, "%s %d bytes ino %lu at "LPU64"/"LPX64"\n",
-                       cmd & OBD_BRW_WRITE ? "write" : "read", pg.count,
-                       inode->i_ino, pg.off, pg.off);
-        if (pg.count == 0) {
-                CERROR("ZERO COUNT: ino %lu: size %p:%Lu(%p:%Lu) idx %lu off "
-                       LPU64"\n", inode->i_ino, inode, i_size_read(inode),
-                       page->mapping->host, i_size_read(page->mapping->host),
-                       page->index, pg.off);
-        }
-
-        pg.flag = flags;
-
-        if (cmd & OBD_BRW_WRITE)
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_WRITE,
-                                   pg.count);
-        else
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_BRW_READ,
-                           pg.count);
-        oinfo.oi_oa = oa;
-        oinfo.oi_md = lsm;
-        rc = obd_brw(cmd, ll_i2obdexp(inode), &oinfo, 1, &pg, NULL);
-        if (rc == 0)
-                obdo_to_inode(inode, oa, OBD_MD_FLBLOCKS);
-        else if (rc != -EIO)
-                CERROR("error from obd_brw: rc = %d\n", rc);
-        RETURN(rc);
-}
-
-int ll_file_punch(struct inode * inode, loff_t new_size, int srvlock)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct obd_info oinfo = { { { 0 } } };
-        struct obdo oa;
-        int rc;
-
-        ENTRY;
-        CDEBUG(D_INFO, "calling punch for "LPX64" (new size %Lu=%#Lx)\n",
-               lli->lli_smd->lsm_object_id, new_size, new_size);
-
-        oinfo.oi_md = lli->lli_smd;
-        oinfo.oi_policy.l_extent.start = new_size;
-        oinfo.oi_policy.l_extent.end = OBD_OBJECT_EOF;
-        oinfo.oi_oa = &oa;
-        oa.o_id = lli->lli_smd->lsm_object_id;
-        oa.o_valid = OBD_MD_FLID;
-        oa.o_flags = srvlock ? OBD_FL_TRUNCLOCK : 0;
-        obdo_from_inode(&oa, inode, OBD_MD_FLTYPE | OBD_MD_FLMODE |OBD_MD_FLFID|
-                        OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME |
-                        OBD_MD_FLUID | OBD_MD_FLGID | OBD_MD_FLGENER |
-                        OBD_MD_FLBLOCKS);
-        rc = obd_punch_rqset(ll_i2obdexp(inode), &oinfo, NULL);
-        if (rc) {
-                CERROR("obd_truncate fails (%d) ino %lu\n", rc, inode->i_ino);
-                RETURN(rc);
-        }
-        obdo_to_inode(inode, &oa, OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                      OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-        RETURN(0);
-}
-/* this isn't where truncate starts.   roughly:
- * sys_truncate->ll_setattr_raw->vmtruncate->ll_truncate. setattr_raw grabs
- * DLM lock on [size, EOF], i_mutex, ->lli_size_sem, and WRITE_I_ALLOC_SEM to
- * avoid races.
- *
- * must be called under ->lli_size_sem */
-void ll_truncate(struct inode *inode)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        int srvlock = test_bit(LLI_F_SRVLOCK, &lli->lli_flags);
-        loff_t new_size;
-        ENTRY;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p) to %Lu=%#Lx\n",inode->i_ino,
-               inode->i_generation, inode, i_size_read(inode), i_size_read(inode));
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_TRUNC, 1);
-        if (lli->lli_size_sem_owner != current) {
-                EXIT;
-                return;
-        }
-
-        if (!lli->lli_smd) {
-                CDEBUG(D_INODE, "truncate on inode %lu with no objects\n",
-                       inode->i_ino);
-                GOTO(out_unlock, 0);
-        }
-
-        LASSERT(atomic_read(&lli->lli_size_sem.count) <= 0);
-
-        if (!srvlock) {
-                struct ost_lvb lvb;
-                int rc;
-
-                /* XXX I'm pretty sure this is a hack to paper over a more fundamental
-                 * race condition. */
-                lov_stripe_lock(lli->lli_smd);
-                inode_init_lvb(inode, &lvb);
-                rc = obd_merge_lvb(ll_i2obdexp(inode), lli->lli_smd, &lvb, 0);
-                inode->i_blocks = lvb.lvb_blocks;
-                if (lvb.lvb_size == i_size_read(inode) && rc == 0) {
-                        CDEBUG(D_VFSTRACE, "skipping punch for obj "LPX64", %Lu=%#Lx\n",
-                               lli->lli_smd->lsm_object_id, i_size_read(inode),
-                               i_size_read(inode));
-                        lov_stripe_unlock(lli->lli_smd);
-                        GOTO(out_unlock, 0);
-                }
-
-                obd_adjust_kms(ll_i2obdexp(inode), lli->lli_smd,
-                               i_size_read(inode), 1);
-                lov_stripe_unlock(lli->lli_smd);
-        }
-
-        if (unlikely((ll_i2sbi(inode)->ll_flags & LL_SBI_LLITE_CHECKSUM) &&
-                     (i_size_read(inode) & ~CFS_PAGE_MASK))) {
-                /* If the truncate leaves a partial page, update its checksum */
-                struct page *page = find_get_page(inode->i_mapping,
-                                                  i_size_read(inode) >>
-                                                  CFS_PAGE_SHIFT);
-                if (page != NULL) {
-                        struct ll_async_page *llap = llap_cast_private(page);
-                        if (llap != NULL) {
-                                char *kaddr = kmap_atomic(page, KM_USER0);
-                                llap->llap_checksum =
-                                        init_checksum(OSC_DEFAULT_CKSUM);
-                                llap->llap_checksum =
-                                        compute_checksum(llap->llap_checksum,
-                                                         kaddr, CFS_PAGE_SIZE,
-                                                         OSC_DEFAULT_CKSUM);
-                                kunmap_atomic(kaddr, KM_USER0);
-                        }
-                        page_cache_release(page);
-                }
-        }
-
-        new_size = i_size_read(inode);
-        ll_inode_size_unlock(inode, 0);
-        if (!srvlock)
-                ll_file_punch(inode, new_size, 0);
-
-        EXIT;
-        return;
-
- out_unlock:
-        ll_inode_size_unlock(inode, 0);
-} /* ll_truncate */
-
-int ll_prepare_write(struct file *file, struct page *page, unsigned from,
-                     unsigned to)
-{
-        struct inode *inode = page->mapping->host;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        obd_off offset = ((obd_off)page->index) << CFS_PAGE_SHIFT;
-        struct obd_info oinfo = { { { 0 } } };
-        struct brw_page pga;
-        struct obdo oa;
-        struct ost_lvb lvb;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(PageLocked(page));
-        (void)llap_cast_private(page); /* assertion */
-
-        /* Check to see if we should return -EIO right away */
-        pga.pg = page;
-        pga.off = offset;
-        pga.count = CFS_PAGE_SIZE;
-        pga.flag = 0;
-
-        oa.o_mode = inode->i_mode;
-        oa.o_id = lsm->lsm_object_id;
-        oa.o_valid = OBD_MD_FLID | OBD_MD_FLMODE | OBD_MD_FLTYPE;
-        obdo_from_inode(&oa, inode, OBD_MD_FLFID | OBD_MD_FLGENER);
-
-        oinfo.oi_oa = &oa;
-        oinfo.oi_md = lsm;
-        rc = obd_brw(OBD_BRW_CHECK, ll_i2obdexp(inode), &oinfo, 1, &pga, NULL);
-        if (rc)
-                RETURN(rc);
-
-        if (PageUptodate(page)) {
-                LL_CDEBUG_PAGE(D_PAGE, page, "uptodate\n");
-                RETURN(0);
-        }
-
-        /* We're completely overwriting an existing page, so _don't_ set it up
-         * to date until commit_write */
-        if (from == 0 && to == CFS_PAGE_SIZE) {
-                LL_CDEBUG_PAGE(D_PAGE, page, "full page write\n");
-                POISON_PAGE(page, 0x11);
-                RETURN(0);
-        }
-
-        /* If are writing to a new page, no need to read old data.  The extent
-         * locking will have updated the KMS, and for our purposes here we can
-         * treat it like i_size. */
-        lov_stripe_lock(lsm);
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1);
-        lov_stripe_unlock(lsm);
-        if (lvb.lvb_size <= offset) {
-                char *kaddr = kmap_atomic(page, KM_USER0);
-                LL_CDEBUG_PAGE(D_PAGE, page, "kms "LPU64" <= offset "LPU64"\n",
-                               lvb.lvb_size, offset);
-                memset(kaddr, 0, CFS_PAGE_SIZE);
-                kunmap_atomic(kaddr, KM_USER0);
-                GOTO(prepare_done, rc = 0);
-        }
-
-        /* XXX could be an async ocp read.. read-ahead? */
-        rc = ll_brw(OBD_BRW_READ, inode, &oa, page, 0);
-        if (rc == 0) {
-                /* bug 1598: don't clobber blksize */
-                oa.o_valid &= ~(OBD_MD_FLSIZE | OBD_MD_FLBLKSZ);
-                obdo_refresh_inode(inode, &oa, oa.o_valid);
-        }
-
-        EXIT;
- prepare_done:
-        if (rc == 0)
-                SetPageUptodate(page);
-
-        return rc;
-}
-
-static int ll_ap_make_ready(void *data, int cmd)
-{
-        struct ll_async_page *llap;
-        struct page *page;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        page = llap->llap_page;
-
-        LASSERTF(!(cmd & OBD_BRW_READ), "cmd %x page %p ino %lu index %lu\n", cmd, page,
-                 page->mapping->host->i_ino, page->index);
-
-        /* we're trying to write, but the page is locked.. come back later */
-        if (TryLockPage(page))
-                RETURN(-EAGAIN);
-
-        LASSERT(!PageWriteback(page));
-
-        /* if we left PageDirty we might get another writepage call
-         * in the future.  list walkers are bright enough
-         * to check page dirty so we can leave it on whatever list
-         * its on.  XXX also, we're called with the cli list so if
-         * we got the page cache list we'd create a lock inversion
-         * with the removepage path which gets the page lock then the
-         * cli lock */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-        clear_page_dirty(page);
-#else
-        LASSERTF(!PageWriteback(page),"cmd %x page %p ino %lu index %lu\n", cmd, page,
-                 page->mapping->host->i_ino, page->index);
-        clear_page_dirty_for_io(page);
-
-        /* This actually clears the dirty bit in the radix tree.*/
-        set_page_writeback(page);
-#endif
-
-        LL_CDEBUG_PAGE(D_PAGE, page, "made ready\n");
-        page_cache_get(page);
-
-        RETURN(0);
-}
-
-/* We have two reasons for giving llite the opportunity to change the
- * write length of a given queued page as it builds the RPC containing
- * the page:
- *
- * 1) Further extending writes may have landed in the page cache
- *    since a partial write first queued this page requiring us
- *    to write more from the page cache.  (No further races are possible, since
- *    by the time this is called, the page is locked.)
- * 2) We might have raced with truncate and want to avoid performing
- *    write RPCs that are just going to be thrown away by the
- *    truncate's punch on the storage targets.
- *
- * The kms serves these purposes as it is set at both truncate and extending
- * writes.
- */
-static int ll_ap_refresh_count(void *data, int cmd)
-{
-        struct ll_inode_info *lli;
-        struct ll_async_page *llap;
-        struct lov_stripe_md *lsm;
-        struct page *page;
-        struct inode *inode;
-        struct ost_lvb lvb;
-        __u64 kms;
-        ENTRY;
-
-        /* readpage queues with _COUNT_STABLE, shouldn't get here. */
-        LASSERT(cmd != OBD_BRW_READ);
-
-        llap = LLAP_FROM_COOKIE(data);
-        page = llap->llap_page;
-        inode = page->mapping->host;
-        lli = ll_i2info(inode);
-        lsm = lli->lli_smd;
-
-        lov_stripe_lock(lsm);
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1);
-        kms = lvb.lvb_size;
-        lov_stripe_unlock(lsm);
-
-        /* catch race with truncate */
-        if (((__u64)page->index << CFS_PAGE_SHIFT) >= kms)
-                return 0;
-
-        /* catch sub-page write at end of file */
-        if (((__u64)page->index << CFS_PAGE_SHIFT) + CFS_PAGE_SIZE > kms)
-                return kms % CFS_PAGE_SIZE;
-
-        return CFS_PAGE_SIZE;
-}
-
-void ll_inode_fill_obdo(struct inode *inode, int cmd, struct obdo *oa)
-{
-        struct lov_stripe_md *lsm;
-        obd_flag valid_flags;
-
-        lsm = ll_i2info(inode)->lli_smd;
-
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_valid = OBD_MD_FLID;
-        valid_flags = OBD_MD_FLTYPE | OBD_MD_FLATIME;
-        if (cmd & OBD_BRW_WRITE) {
-                oa->o_valid |= OBD_MD_FLEPOCH;
-                oa->o_easize = ll_i2info(inode)->lli_io_epoch;
-
-                valid_flags |= OBD_MD_FLMTIME | OBD_MD_FLCTIME |
-                        OBD_MD_FLUID | OBD_MD_FLGID |
-                        OBD_MD_FLFID | OBD_MD_FLGENER;
-        }
-
-        obdo_from_inode(oa, inode, valid_flags);
-}
-
-static void ll_ap_fill_obdo(void *data, int cmd, struct obdo *oa)
-{
-        struct ll_async_page *llap;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        ll_inode_fill_obdo(llap->llap_page->mapping->host, cmd, oa);
-
-        EXIT;
-}
-
-static void ll_ap_update_obdo(void *data, int cmd, struct obdo *oa,
-                              obd_valid valid)
-{
-        struct ll_async_page *llap;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        obdo_from_inode(oa, llap->llap_page->mapping->host, valid);
-
-        EXIT;
-}
-
-static struct obd_async_page_ops ll_async_page_ops = {
-        .ap_make_ready =        ll_ap_make_ready,
-        .ap_refresh_count =     ll_ap_refresh_count,
-        .ap_fill_obdo =         ll_ap_fill_obdo,
-        .ap_update_obdo =       ll_ap_update_obdo,
-        .ap_completion =        ll_ap_completion,
-};
-
-struct ll_async_page *llap_cast_private(struct page *page)
-{
-        struct ll_async_page *llap = (struct ll_async_page *)page_private(page);
-
-        LASSERTF(llap == NULL || llap->llap_magic == LLAP_MAGIC,
-                 "page %p private %lu gave magic %d which != %d\n",
-                 page, page_private(page), llap->llap_magic, LLAP_MAGIC);
-
-        return llap;
-}
-
-/* Try to shrink the page cache for the @sbi filesystem by 1/@shrink_fraction.
- *
- * There is an llap attached onto every page in lustre, linked off @sbi.
- * We add an llap to the list so we don't lose our place during list walking.
- * If llaps in the list are being moved they will only move to the end
- * of the LRU, and we aren't terribly interested in those pages here (we
- * start at the beginning of the list where the least-used llaps are.
- */
-int llap_shrink_cache(struct ll_sb_info *sbi, int shrink_fraction)
-{
-        struct ll_async_page *llap, dummy_llap = { .llap_magic = 0xd11ad11a };
-        unsigned long total, want, count = 0;
-
-        total = sbi->ll_async_page_count;
-
-        /* There can be a large number of llaps (600k or more in a large
-         * memory machine) so the VM 1/6 shrink ratio is likely too much.
-         * Since we are freeing pages also, we don't necessarily want to
-         * shrink so much.  Limit to 40MB of pages + llaps per call. */
-        if (shrink_fraction == 0)
-                want = sbi->ll_async_page_count - sbi->ll_async_page_max + 32;
-        else
-                want = (total + shrink_fraction - 1) / shrink_fraction;
-
-        if (want > 40 << (20 - CFS_PAGE_SHIFT))
-                want = 40 << (20 - CFS_PAGE_SHIFT);
-
-        CDEBUG(D_CACHE, "shrinking %lu of %lu pages (1/%d)\n",
-               want, total, shrink_fraction);
-
-        spin_lock(&sbi->ll_lock);
-        list_add(&dummy_llap.llap_pglist_item, &sbi->ll_pglist);
-
-        while (--total >= 0 && count < want) {
-                struct page *page;
-                int keep;
-
-                if (unlikely(need_resched())) {
-                        spin_unlock(&sbi->ll_lock);
-                        cond_resched();
-                        spin_lock(&sbi->ll_lock);
-                }
-
-                llap = llite_pglist_next_llap(sbi,&dummy_llap.llap_pglist_item);
-                list_del_init(&dummy_llap.llap_pglist_item);
-                if (llap == NULL)
-                        break;
-
-                page = llap->llap_page;
-                LASSERT(page != NULL);
-
-                list_add(&dummy_llap.llap_pglist_item, &llap->llap_pglist_item);
-
-                /* Page needs/undergoing IO */
-                if (TryLockPage(page)) {
-                        LL_CDEBUG_PAGE(D_PAGE, page, "can't lock\n");
-                        continue;
-                }
-
-               keep = (llap->llap_write_queued || PageDirty(page) ||
-                      PageWriteback(page) || (!PageUptodate(page) &&
-                      llap->llap_origin != LLAP_ORIGIN_READAHEAD));
-
-                LL_CDEBUG_PAGE(D_PAGE, page,"%s LRU page: %s%s%s%s%s origin %s\n",
-                               keep ? "keep" : "drop",
-                               llap->llap_write_queued ? "wq " : "",
-                               PageDirty(page) ? "pd " : "",
-                               PageUptodate(page) ? "" : "!pu ",
-                               PageWriteback(page) ? "wb" : "",
-                               llap->llap_defer_uptodate ? "" : "!du",
-                               llap_origins[llap->llap_origin]);
-
-                /* If page is dirty or undergoing IO don't discard it */
-                if (keep) {
-                        unlock_page(page);
-                        continue;
-                }
-
-                page_cache_get(page);
-                spin_unlock(&sbi->ll_lock);
-
-                if (page->mapping != NULL) {
-                        ll_teardown_mmaps(page->mapping,
-                                         (__u64)page->index << CFS_PAGE_SHIFT,
-                                         ((__u64)page->index << CFS_PAGE_SHIFT)|
-                                          ~CFS_PAGE_MASK);
-                        if (!PageDirty(page) && !page_mapped(page)) {
-                                ll_ra_accounting(llap, page->mapping);
-                                ll_truncate_complete_page(page);
-                                ++count;
-                        } else {
-                                LL_CDEBUG_PAGE(D_PAGE, page, "Not dropping page"
-                                                             " because it is "
-                                                             "%s\n",
-                                                              PageDirty(page)?
-                                                              "dirty":"mapped");
-                        }
-                }
-                unlock_page(page);
-                page_cache_release(page);
-
-                spin_lock(&sbi->ll_lock);
-        }
-        list_del(&dummy_llap.llap_pglist_item);
-        spin_unlock(&sbi->ll_lock);
-
-        CDEBUG(D_CACHE, "shrank %lu/%lu and left %lu unscanned\n",
-               count, want, total);
-
-        return count;
-}
-
-static struct ll_async_page *llap_from_page_with_lockh(struct page *page,
-                                                       unsigned origin,
-                                                       struct lustre_handle *lockh)
-{
-        struct ll_async_page *llap;
-        struct obd_export *exp;
-        struct inode *inode = page->mapping->host;
-        struct ll_sb_info *sbi;
-        int rc;
-        ENTRY;
-
-        if (!inode) {
-                static int triggered;
-
-                if (!triggered) {
-                        LL_CDEBUG_PAGE(D_ERROR, page, "Bug 10047. Wrong anon "
-                                       "page received\n");
-                        libcfs_debug_dumpstack(NULL);
-                        triggered = 1;
-                }
-                RETURN(ERR_PTR(-EINVAL));
-        }
-        sbi = ll_i2sbi(inode);
-        LASSERT(ll_async_page_slab);
-        LASSERTF(origin < LLAP__ORIGIN_MAX, "%u\n", origin);
-
-        llap = llap_cast_private(page);
-        if (llap != NULL) {
-                /* move to end of LRU list, except when page is just about to
-                 * die */
-                if (origin != LLAP_ORIGIN_REMOVEPAGE) {
-                        spin_lock(&sbi->ll_lock);
-                        sbi->ll_pglist_gen++;
-                        list_del_init(&llap->llap_pglist_item);
-                        list_add_tail(&llap->llap_pglist_item, &sbi->ll_pglist);
-                        spin_unlock(&sbi->ll_lock);
-                }
-                GOTO(out, llap);
-        }
-
-        exp = ll_i2obdexp(page->mapping->host);
-        if (exp == NULL)
-                RETURN(ERR_PTR(-EINVAL));
-
-        /* limit the number of lustre-cached pages */
-        if (sbi->ll_async_page_count >= sbi->ll_async_page_max)
-                llap_shrink_cache(sbi, 0);
-
-        OBD_SLAB_ALLOC(llap, ll_async_page_slab, CFS_ALLOC_STD,
-                       ll_async_page_slab_size);
-        if (llap == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-        llap->llap_magic = LLAP_MAGIC;
-        llap->llap_cookie = (void *)llap + size_round(sizeof(*llap));
-
-        /* XXX: for bug 11270 - check for lockless origin here! */
-        if (origin == LLAP_ORIGIN_LOCKLESS_IO)
-                llap->llap_nocache = 1;
-
-        rc = obd_prep_async_page(exp, ll_i2info(inode)->lli_smd, NULL, page,
-                                 (obd_off)page->index << CFS_PAGE_SHIFT,
-                                 &ll_async_page_ops, llap, &llap->llap_cookie,
-                                 llap->llap_nocache, lockh);
-        if (rc) {
-                OBD_SLAB_FREE(llap, ll_async_page_slab,
-                              ll_async_page_slab_size);
-                RETURN(ERR_PTR(rc));
-        }
-
-        CDEBUG(D_CACHE, "llap %p page %p cookie %p obj off "LPU64"\n", llap,
-               page, llap->llap_cookie, (obd_off)page->index << CFS_PAGE_SHIFT);
-        /* also zeroing the PRIVBITS low order bitflags */
-        __set_page_ll_data(page, llap);
-        llap->llap_page = page;
-
-        spin_lock(&sbi->ll_lock);
-        sbi->ll_pglist_gen++;
-        sbi->ll_async_page_count++;
-        list_add_tail(&llap->llap_pglist_item, &sbi->ll_pglist);
-        spin_unlock(&sbi->ll_lock);
-
- out:
-        if (unlikely(sbi->ll_flags & LL_SBI_LLITE_CHECKSUM)) {
-                __u32 csum;
-                char *kaddr = kmap_atomic(page, KM_USER0);
-                csum = init_checksum(OSC_DEFAULT_CKSUM);
-                csum = compute_checksum(csum, kaddr, CFS_PAGE_SIZE,
-                                        OSC_DEFAULT_CKSUM);
-                kunmap_atomic(kaddr, KM_USER0);
-                if (origin == LLAP_ORIGIN_READAHEAD ||
-                    origin == LLAP_ORIGIN_READPAGE ||
-                    origin == LLAP_ORIGIN_LOCKLESS_IO) {
-                        llap->llap_checksum = 0;
-                } else if (origin == LLAP_ORIGIN_COMMIT_WRITE ||
-                           llap->llap_checksum == 0) {
-                        llap->llap_checksum = csum;
-                        CDEBUG(D_PAGE, "page %p cksum %x\n", page, csum);
-                } else if (llap->llap_checksum == csum) {
-                        /* origin == LLAP_ORIGIN_WRITEPAGE */
-                        CDEBUG(D_PAGE, "page %p cksum %x confirmed\n",
-                               page, csum);
-                } else {
-                        /* origin == LLAP_ORIGIN_WRITEPAGE */
-                        LL_CDEBUG_PAGE(D_ERROR, page, "old cksum %x != new "
-                                       "%x!\n", llap->llap_checksum, csum);
-                }
-        }
-
-        llap->llap_origin = origin;
-        RETURN(llap);
-}
-
-static inline struct ll_async_page *llap_from_page(struct page *page,
-                                                   unsigned origin)
-{
-        return llap_from_page_with_lockh(page, origin, NULL);
-}
-
-static int queue_or_sync_write(struct obd_export *exp, struct inode *inode,
-                               struct ll_async_page *llap,
-                               unsigned to, obd_flag async_flags)
-{
-        unsigned long size_index = i_size_read(inode) >> CFS_PAGE_SHIFT;
-        struct obd_io_group *oig;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        int rc, noquot = llap->llap_ignore_quota ? OBD_BRW_NOQUOTA : 0;
-        ENTRY;
-
-        /* _make_ready only sees llap once we've unlocked the page */
-        llap->llap_write_queued = 1;
-        rc = obd_queue_async_io(exp, ll_i2info(inode)->lli_smd, NULL,
-                                llap->llap_cookie, OBD_BRW_WRITE | noquot,
-                                0, 0, 0, async_flags);
-        if (rc == 0) {
-                LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, "write queued\n");
-                llap_write_pending(inode, llap);
-                GOTO(out, 0);
-        }
-
-        llap->llap_write_queued = 0;
-
-        rc = oig_init(&oig);
-        if (rc)
-                GOTO(out, rc);
-
-        /* make full-page requests if we are not at EOF (bug 4410) */
-        if (to != CFS_PAGE_SIZE && llap->llap_page->index < size_index) {
-                LL_CDEBUG_PAGE(D_PAGE, llap->llap_page,
-                               "sync write before EOF: size_index %lu, to %d\n",
-                               size_index, to);
-                to = CFS_PAGE_SIZE;
-        } else if (to != CFS_PAGE_SIZE && llap->llap_page->index == size_index){
-                int size_to = i_size_read(inode) & ~CFS_PAGE_MASK;
-                LL_CDEBUG_PAGE(D_PAGE, llap->llap_page,
-                               "sync write at EOF: size_index %lu, to %d/%d\n",
-                               size_index, to, size_to);
-                if (to < size_to)
-                        to = size_to;
-        }
-
-        /* compare the checksum once before the page leaves llite */
-        if (unlikely((sbi->ll_flags & LL_SBI_LLITE_CHECKSUM) &&
-                     llap->llap_checksum != 0)) {
-                __u32 csum;
-                struct page *page = llap->llap_page;
-                char *kaddr = kmap_atomic(page, KM_USER0);
-                csum = init_checksum(OSC_DEFAULT_CKSUM);
-                csum = compute_checksum(csum, kaddr, CFS_PAGE_SIZE,
-                                        OSC_DEFAULT_CKSUM);
-                kunmap_atomic(kaddr, KM_USER0);
-                if (llap->llap_checksum == csum) {
-                        CDEBUG(D_PAGE, "page %p cksum %x confirmed\n",
-                               page, csum);
-                } else {
-                        CERROR("page %p old cksum %x != new cksum %x!\n",
-                               page, llap->llap_checksum, csum);
-                }
-        }
-
-        rc = obd_queue_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig,
-                                llap->llap_cookie, OBD_BRW_WRITE | noquot,
-                                0, to, 0, ASYNC_READY | ASYNC_URGENT |
-                                ASYNC_COUNT_STABLE | ASYNC_GROUP_SYNC);
-        if (rc)
-                GOTO(free_oig, rc);
-
-        rc = obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig);
-        if (rc)
-                GOTO(free_oig, rc);
-
-        rc = oig_wait(oig);
-
-        if (!rc && async_flags & ASYNC_READY) {
-                unlock_page(llap->llap_page);
-                if (PageWriteback(llap->llap_page)) {
-                        end_page_writeback(llap->llap_page);
-                }
-        }
-
-        LL_CDEBUG_PAGE(D_PAGE, llap->llap_page, "sync write returned %d\n", rc);
-
-free_oig:
-        oig_release(oig);
-out:
-        RETURN(rc);
-}
-
-/* update our write count to account for i_size increases that may have
- * happened since we've queued the page for io. */
-
-/* be careful not to return success without setting the page Uptodate or
- * the next pass through prepare_write will read in stale data from disk. */
-int ll_commit_write(struct file *file, struct page *page, unsigned from,
-                    unsigned to)
-{
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(file);
-        struct inode *inode = page->mapping->host;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct obd_export *exp;
-        struct ll_async_page *llap;
-        loff_t size;
-        struct lustre_handle *lockh = NULL;
-        int rc = 0;
-        ENTRY;
-
-        SIGNAL_MASK_ASSERT(); /* XXX BUG 1511 */
-        LASSERT(inode == file->f_dentry->d_inode);
-        LASSERT(PageLocked(page));
-
-        CDEBUG(D_INODE, "inode %p is writing page %p from %d to %d at %lu\n",
-               inode, page, from, to, page->index);
-
-        if (fd->fd_flags & LL_FILE_GROUP_LOCKED)
-                lockh = &fd->fd_cwlockh;
-
-        llap = llap_from_page_with_lockh(page, LLAP_ORIGIN_COMMIT_WRITE, lockh);
-        if (IS_ERR(llap))
-                RETURN(PTR_ERR(llap));
-
-        exp = ll_i2obdexp(inode);
-        if (exp == NULL)
-                RETURN(-EINVAL);
-
-        llap->llap_ignore_quota = capable(CAP_SYS_RESOURCE);
-
-        /* queue a write for some time in the future the first time we
-         * dirty the page */
-        if (!PageDirty(page)) {
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRTY_MISSES, 1);
-
-                rc = queue_or_sync_write(exp, inode, llap, to, 0);
-                if (rc)
-                        GOTO(out, rc);
-        } else {
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRTY_HITS, 1);
-        }
-
-        /* put the page in the page cache, from now on ll_removepage is
-         * responsible for cleaning up the llap.
-         * only set page dirty when it's queued to be write out */
-        if (llap->llap_write_queued)
-                set_page_dirty(page);
-
-out:
-        size = (((obd_off)page->index) << CFS_PAGE_SHIFT) + to;
-        ll_inode_size_lock(inode, 0);
-        if (rc == 0) {
-                lov_stripe_lock(lsm);
-                obd_adjust_kms(exp, lsm, size, 0);
-                lov_stripe_unlock(lsm);
-                if (size > i_size_read(inode))
-                        i_size_write(inode, size);
-                SetPageUptodate(page);
-        } else if (size > i_size_read(inode)) {
-                /* this page beyond the pales of i_size, so it can't be
-                 * truncated in ll_p_r_e during lock revoking. we must
-                 * teardown our book-keeping here. */
-                ll_removepage(page);
-        }
-        ll_inode_size_unlock(inode, 0);
-        RETURN(rc);
-}
-
-static unsigned long ll_ra_count_get(struct ll_sb_info *sbi, unsigned long len)
-{
-        struct ll_ra_info *ra = &sbi->ll_ra_info;
-        unsigned long ret;
-        ENTRY;
-
-        spin_lock(&sbi->ll_lock);
-        ret = min(ra->ra_max_pages - ra->ra_cur_pages, len);
-        ra->ra_cur_pages += ret;
-        spin_unlock(&sbi->ll_lock);
-
-        RETURN(ret);
-}
-
-static void ll_ra_count_put(struct ll_sb_info *sbi, unsigned long len)
-{
-        struct ll_ra_info *ra = &sbi->ll_ra_info;
-        spin_lock(&sbi->ll_lock);
-        LASSERTF(ra->ra_cur_pages >= len, "r_c_p %lu len %lu\n",
-                 ra->ra_cur_pages, len);
-        ra->ra_cur_pages -= len;
-        spin_unlock(&sbi->ll_lock);
-}
-
-/* called for each page in a completed rpc.*/
-int ll_ap_completion(void *data, int cmd, struct obdo *oa, int rc)
-{
-        struct ll_async_page *llap;
-        struct page *page;
-        int ret = 0;
-        ENTRY;
-
-        llap = LLAP_FROM_COOKIE(data);
-        page = llap->llap_page;
-        LASSERT(PageLocked(page));
-        LASSERT(CheckWriteback(page,cmd));
-
-        LL_CDEBUG_PAGE(D_PAGE, page, "completing cmd %d with %d\n", cmd, rc);
-
-        if (cmd & OBD_BRW_READ && llap->llap_defer_uptodate)
-                ll_ra_count_put(ll_i2sbi(page->mapping->host), 1);
-
-        if (rc == 0)  {
-                if (cmd & OBD_BRW_READ) {
-                        if (!llap->llap_defer_uptodate)
-                                SetPageUptodate(page);
-                } else {
-                        llap->llap_write_queued = 0;
-                }
-                ClearPageError(page);
-        } else {
-                if (cmd & OBD_BRW_READ) {
-                        llap->llap_defer_uptodate = 0;
-                }
-                SetPageError(page);
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-                if (rc == -ENOSPC)
-                        set_bit(AS_ENOSPC, &page->mapping->flags);
-                else
-                        set_bit(AS_EIO, &page->mapping->flags);
-#else
-                page->mapping->gfp_mask |= AS_EIO_MASK;
-#endif
-        }
-
-        unlock_page(page);
-
-        if (cmd & OBD_BRW_WRITE) {
-                llap_write_complete(page->mapping->host, llap);
-                ll_try_done_writing(page->mapping->host);
-        }
-
-        if (PageWriteback(page)) {
-                end_page_writeback(page);
-        }
-        page_cache_release(page);
-
-        RETURN(ret);
-}
-
-static void __ll_put_llap(struct page *page)
-{
-        struct inode *inode = page->mapping->host;
-        struct obd_export *exp;
-        struct ll_async_page *llap;
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        int rc;
-        ENTRY;
-
-        exp = ll_i2obdexp(inode);
-        if (exp == NULL) {
-                CERROR("page %p ind %lu gave null export\n", page, page->index);
-                EXIT;
-                return;
-        }
-
-        llap = llap_from_page(page, LLAP_ORIGIN_REMOVEPAGE);
-        if (IS_ERR(llap)) {
-                CERROR("page %p ind %lu couldn't find llap: %ld\n", page,
-                       page->index, PTR_ERR(llap));
-                EXIT;
-                return;
-        }
-
-        //llap_write_complete(inode, llap);
-        rc = obd_teardown_async_page(exp, ll_i2info(inode)->lli_smd, NULL,
-                                     llap->llap_cookie);
-        if (rc != 0)
-                CERROR("page %p ind %lu failed: %d\n", page, page->index, rc);
-
-        /* this unconditional free is only safe because the page lock
-         * is providing exclusivity to memory pressure/truncate/writeback..*/
-        __clear_page_ll_data(page);
-
-        spin_lock(&sbi->ll_lock);
-        if (!list_empty(&llap->llap_pglist_item))
-                list_del_init(&llap->llap_pglist_item);
-        sbi->ll_pglist_gen++;
-        sbi->ll_async_page_count--;
-        spin_unlock(&sbi->ll_lock);
-        OBD_SLAB_FREE(llap, ll_async_page_slab, ll_async_page_slab_size);
-
-        EXIT;
-}
-
-/* the kernel calls us here when a page is unhashed from the page cache.
- * the page will be locked and the kernel is holding a spinlock, so
- * we need to be careful.  we're just tearing down our book-keeping
- * here. */
-void ll_removepage(struct page *page)
-{
-        struct ll_async_page *llap = llap_cast_private(page);
-        ENTRY;
-
-        LASSERT(!in_interrupt());
-
-        /* sync pages or failed read pages can leave pages in the page
-         * cache that don't have our data associated with them anymore */
-        if (page_private(page) == 0) {
-                EXIT;
-                return;
-        }
-
-        LASSERT(!llap->llap_lockless_io_page);
-        LASSERT(!llap->llap_nocache);
-
-        LL_CDEBUG_PAGE(D_PAGE, page, "being evicted\n");
-        __ll_put_llap(page);
-
-        EXIT;
-}
-
-static int ll_issue_page_read(struct obd_export *exp,
-                              struct ll_async_page *llap,
-                              struct obd_io_group *oig, int defer)
-{
-        struct page *page = llap->llap_page;
-        int rc;
-
-        page_cache_get(page);
-        llap->llap_defer_uptodate = defer;
-        llap->llap_ra_used = 0;
-        rc = obd_queue_group_io(exp, ll_i2info(page->mapping->host)->lli_smd,
-                                NULL, oig, llap->llap_cookie, OBD_BRW_READ, 0,
-                                CFS_PAGE_SIZE, 0, ASYNC_COUNT_STABLE | ASYNC_READY |
-                                              ASYNC_URGENT);
-        if (rc) {
-                LL_CDEBUG_PAGE(D_ERROR, page, "read queue failed: rc %d\n", rc);
-                page_cache_release(page);
-        }
-        RETURN(rc);
-}
-
-static void ll_ra_stats_inc_unlocked(struct ll_ra_info *ra, enum ra_stat which)
-{
-        LASSERTF(which >= 0 && which < _NR_RA_STAT, "which: %u\n", which);
-        ra->ra_stats[which]++;
-}
-
-static void ll_ra_stats_inc(struct address_space *mapping, enum ra_stat which)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(mapping->host);
-        struct ll_ra_info *ra = &ll_i2sbi(mapping->host)->ll_ra_info;
-
-        spin_lock(&sbi->ll_lock);
-        ll_ra_stats_inc_unlocked(ra, which);
-        spin_unlock(&sbi->ll_lock);
-}
-
-void ll_ra_accounting(struct ll_async_page *llap, struct address_space *mapping)
-{
-        if (!llap->llap_defer_uptodate || llap->llap_ra_used)
-                return;
-
-        ll_ra_stats_inc(mapping, RA_STAT_DISCARDED);
-}
-
-#define RAS_CDEBUG(ras) \
-        CDEBUG(D_READA,                                                      \
-               "lrp %lu cr %lu cp %lu ws %lu wl %lu nra %lu r %lu ri %lu"    \
-               "csr %lu sf %lu sp %lu sl %lu \n", 		     	     \
-               ras->ras_last_readpage, ras->ras_consecutive_requests,        \
-               ras->ras_consecutive_pages, ras->ras_window_start,            \
-               ras->ras_window_len, ras->ras_next_readahead,                 \
-               ras->ras_requests, ras->ras_request_index,		     \
-               ras->ras_consecutive_stride_requests, ras->ras_stride_offset, \
-               ras->ras_stride_pages, ras->ras_stride_length)
-
-static int index_in_window(unsigned long index, unsigned long point,
-                           unsigned long before, unsigned long after)
-{
-        unsigned long start = point - before, end = point + after;
-
-        if (start > point)
-               start = 0;
-        if (end < point)
-               end = ~0;
-
-        return start <= index && index <= end;
-}
-
-static struct ll_readahead_state *ll_ras_get(struct file *f)
-{
-        struct ll_file_data       *fd;
-
-        fd = LUSTRE_FPRIVATE(f);
-        return &fd->fd_ras;
-}
-
-void ll_ra_read_in(struct file *f, struct ll_ra_read *rar)
-{
-        struct ll_readahead_state *ras;
-
-        ras = ll_ras_get(f);
-
-        spin_lock(&ras->ras_lock);
-        ras->ras_requests++;
-        ras->ras_request_index = 0;
-        ras->ras_consecutive_requests++;
-        rar->lrr_reader = current;
-
-        list_add(&rar->lrr_linkage, &ras->ras_read_beads);
-        spin_unlock(&ras->ras_lock);
-}
-
-void ll_ra_read_ex(struct file *f, struct ll_ra_read *rar)
-{
-        struct ll_readahead_state *ras;
-
-        ras = ll_ras_get(f);
-
-        spin_lock(&ras->ras_lock);
-        list_del_init(&rar->lrr_linkage);
-        spin_unlock(&ras->ras_lock);
-}
-
-static struct ll_ra_read *ll_ra_read_get_locked(struct ll_readahead_state *ras)
-{
-        struct ll_ra_read *scan;
-
-        list_for_each_entry(scan, &ras->ras_read_beads, lrr_linkage) {
-                if (scan->lrr_reader == current)
-                        return scan;
-        }
-        return NULL;
-}
-
-struct ll_ra_read *ll_ra_read_get(struct file *f)
-{
-        struct ll_readahead_state *ras;
-        struct ll_ra_read         *bead;
-
-        ras = ll_ras_get(f);
-
-        spin_lock(&ras->ras_lock);
-        bead = ll_ra_read_get_locked(ras);
-        spin_unlock(&ras->ras_lock);
-        return bead;
-}
-
-static int ll_read_ahead_page(struct obd_export *exp, struct obd_io_group *oig,
-                              int index, struct address_space *mapping)
-{
-        struct ll_async_page *llap;
-        struct page *page;
-        unsigned int gfp_mask = 0;
-        int rc = 0;
-
-        gfp_mask = GFP_HIGHUSER & ~__GFP_WAIT;
-#ifdef __GFP_NOWARN
-        gfp_mask |= __GFP_NOWARN;
-#endif
-        page = grab_cache_page_nowait_gfp(mapping, index, gfp_mask);
-        if (page == NULL) {
-                ll_ra_stats_inc(mapping, RA_STAT_FAILED_GRAB_PAGE);
-                CDEBUG(D_READA, "g_c_p_n failed\n");
-                return 0;
-        }
-
-        /* Check if page was truncated or reclaimed */
-        if (page->mapping != mapping) {
-                ll_ra_stats_inc(mapping, RA_STAT_WRONG_GRAB_PAGE);
-                CDEBUG(D_READA, "g_c_p_n returned invalid page\n");
-                GOTO(unlock_page, rc = 0);	
-        }
-
-        /* we do this first so that we can see the page in the /proc
-         * accounting */
-        llap = llap_from_page(page, LLAP_ORIGIN_READAHEAD);
-        if (IS_ERR(llap) || llap->llap_defer_uptodate) {
-                if (PTR_ERR(llap) == -ENOLCK) {
-                        ll_ra_stats_inc(mapping, RA_STAT_FAILED_MATCH);
-                        CDEBUG(D_READA | D_PAGE,
-                               "Adding page to cache failed index "
-                                "%d\n", index);
-                                CDEBUG(D_READA, "nolock page\n");
-                                GOTO(unlock_page, rc = -ENOLCK);
-                }
-                CDEBUG(D_READA, "read-ahead page\n");
-                GOTO(unlock_page, rc = 0);	
-        }
-
-        /* skip completed pages */
-        if (Page_Uptodate(page))
-                GOTO(unlock_page, rc = 0);	
-
-        /* bail out when we hit the end of the lock. */
-        rc = ll_issue_page_read(exp, llap, oig, 1);
-        if (rc == 0) {
-                LL_CDEBUG_PAGE(D_READA | D_PAGE, page, "started read-ahead\n");
-                rc = 1;
-        } else {
-unlock_page:	
-                unlock_page(page);
-                LL_CDEBUG_PAGE(D_READA | D_PAGE, page, "skipping read-ahead\n");
-        }
-        page_cache_release(page);
-        return rc;
-}
-
-/* ra_io_arg will be filled in the beginning of ll_readahead with
- * ras_lock, then the following ll_read_ahead_pages will read RA
- * pages according to this arg, all the items in this structure are
- * counted by page index.
- */
-struct ra_io_arg {
-        unsigned long ria_start;  /* start offset of read-ahead*/
-        unsigned long ria_end;    /* end offset of read-ahead*/
-        /* If stride read pattern is detected, ria_stoff means where
-         * stride read is started. Note: for normal read-ahead, the
-         * value here is meaningless, and also it will not be accessed*/
-        pgoff_t ria_stoff;
-        /* ria_length and ria_pages are the length and pages length in the
-         * stride I/O mode. And they will also be used to check whether
-         * it is stride I/O read-ahead in the read-ahead pages*/
-        unsigned long ria_length;
-        unsigned long ria_pages;
-};
-
-#define RIA_DEBUG(ria) 						      \
-        CDEBUG(D_READA, "rs %lu re %lu ro %lu rl %lu rp %lu\n",       \
-        ria->ria_start, ria->ria_end, ria->ria_stoff, ria->ria_length,\
-        ria->ria_pages)
-
-#define RAS_INCREASE_STEP (1024 * 1024 >> CFS_PAGE_SHIFT)
-
-static inline int stride_io_mode(struct ll_readahead_state *ras)
-{
-        return ras->ras_consecutive_stride_requests > 1;
-}
-
-/* The function calculates how much pages will be read in
- * [off, off + length], which will be read by stride I/O mode,
- * stride_offset = st_off, stride_lengh = st_len,
- * stride_pages = st_pgs
- */
-static unsigned long
-stride_pg_count(pgoff_t st_off, unsigned long st_len, unsigned long st_pgs,
-                unsigned long off, unsigned length)
-{
-        unsigned long cont_len = st_off > off ?  st_off - off : 0;
-        unsigned long stride_len = length + off > st_off ?
-                           length + off + 1 - st_off : 0;
-        unsigned long left, pg_count;
-
-        if (st_len == 0 || length == 0)
-                return length;
-
-        left = do_div(stride_len, st_len);
-        left = min(left, st_pgs);
-
-        pg_count = left + stride_len * st_pgs + cont_len;
-
-        LASSERT(pg_count >= left);
-
-        CDEBUG(D_READA, "st_off %lu, st_len %lu st_pgs %lu off %lu length %u"
-               "pgcount %lu\n", st_off, st_len, st_pgs, off, length, pg_count);
-
-        return pg_count;
-}
-
-static int ria_page_count(struct ra_io_arg *ria)
-{
-        __u64 length = ria->ria_end >= ria->ria_start ?
-                       ria->ria_end - ria->ria_start + 1 : 0;
-
-        return stride_pg_count(ria->ria_stoff, ria->ria_length,
-                               ria->ria_pages, ria->ria_start,
-                               length);
-}
-
-/*Check whether the index is in the defined ra-window */
-static int ras_inside_ra_window(unsigned long idx, struct ra_io_arg *ria)
-{
-        /* If ria_length == ria_pages, it means non-stride I/O mode,
-         * idx should always inside read-ahead window in this case
-         * For stride I/O mode, just check whether the idx is inside
-         * the ria_pages. */
-        return ria->ria_length == 0 || ria->ria_length == ria->ria_pages ||
-               (idx - ria->ria_stoff) % ria->ria_length < ria->ria_pages;
-}
-
-static int ll_read_ahead_pages(struct obd_export *exp,
-                               struct obd_io_group *oig,
-                               struct ra_io_arg *ria,	
-                               unsigned long *reserved_pages,
-                               struct address_space *mapping,
-                               unsigned long *ra_end)
-{
-        int rc, count = 0, stride_ria;
-        unsigned long page_idx;
-
-        LASSERT(ria != NULL);
-        RIA_DEBUG(ria);
-
-        stride_ria = ria->ria_length > ria->ria_pages && ria->ria_pages > 0;
-        for (page_idx = ria->ria_start; page_idx <= ria->ria_end &&
-                        *reserved_pages > 0; page_idx++) {
-                if (ras_inside_ra_window(page_idx, ria)) {
-                        /* If the page is inside the read-ahead window*/
-                        rc = ll_read_ahead_page(exp, oig, page_idx, mapping);
-        		if (rc == 1) {
-	        		(*reserved_pages)--;
-		        	count ++;
-		        } else if (rc == -ENOLCK)
-			        break;
-                } else if (stride_ria) {
-                        /* If it is not in the read-ahead window, and it is
-                         * read-ahead mode, then check whether it should skip
-                         * the stride gap */
-			pgoff_t offset;
-                        /* FIXME: This assertion only is valid when it is for
-                         * forward read-ahead, it will be fixed when backward
-                         * read-ahead is implemented */
-                        LASSERTF(page_idx > ria->ria_stoff, "since %lu in the"
-                                " gap of ra window,it should bigger than stride"
-                                " offset %lu \n", page_idx, ria->ria_stoff);
-
-                        offset = page_idx - ria->ria_stoff;
-			offset = offset % (ria->ria_length);
-			if (offset > ria->ria_pages) {
-				page_idx += ria->ria_length - offset;
-                                CDEBUG(D_READA, "i %lu skip %lu \n", page_idx,
-                                       ria->ria_length - offset);
-                                continue;
-                        }
-                }
-        }
-        *ra_end = page_idx;
-        return count;
-}
-
-static int ll_readahead(struct ll_readahead_state *ras,
-                         struct obd_export *exp, struct address_space *mapping,
-                         struct obd_io_group *oig, int flags)
-{
-        unsigned long start = 0, end = 0, reserved;
-        unsigned long ra_end, len;
-        struct inode *inode;
-        struct lov_stripe_md *lsm;
-        struct ll_ra_read *bead;
-        struct ost_lvb lvb;
-        struct ra_io_arg ria = { 0 };
-        int ret = 0;
-        __u64 kms;
-        ENTRY;
-
-        inode = mapping->host;
-        lsm = ll_i2info(inode)->lli_smd;
-
-        lov_stripe_lock(lsm);
-        inode_init_lvb(inode, &lvb);
-        obd_merge_lvb(ll_i2obdexp(inode), lsm, &lvb, 1);
-        kms = lvb.lvb_size;
-        lov_stripe_unlock(lsm);
-        if (kms == 0) {
-                ll_ra_stats_inc(mapping, RA_STAT_ZERO_LEN);
-                RETURN(0);
-        }
-
-        spin_lock(&ras->ras_lock);
-        bead = ll_ra_read_get_locked(ras);
-        /* Enlarge the RA window to encompass the full read */
-        if (bead != NULL && ras->ras_window_start + ras->ras_window_len <
-            bead->lrr_start + bead->lrr_count) {
-                ras->ras_window_len = bead->lrr_start + bead->lrr_count -
-                                      ras->ras_window_start;
-        }
-       	/* Reserve a part of the read-ahead window that we'll be issuing */
-        if (ras->ras_window_len) {
-                start = ras->ras_next_readahead;
-                end = ras->ras_window_start + ras->ras_window_len - 1;
-        }
-        if (end != 0) {
-                /* Truncate RA window to end of file */
-                end = min(end, (unsigned long)((kms - 1) >> CFS_PAGE_SHIFT));
-                ras->ras_next_readahead = max(end, end + 1);
-                RAS_CDEBUG(ras);
-        }
-	ria.ria_start = start;
-	ria.ria_end = end;
-	/* If stride I/O mode is detected, get stride window*/
-	if (stride_io_mode(ras)) {
-		ria.ria_length = ras->ras_stride_length;
-		ria.ria_pages = ras->ras_stride_pages;
-	}
-        spin_unlock(&ras->ras_lock);
-
-        if (end == 0) {
-                ll_ra_stats_inc(mapping, RA_STAT_ZERO_WINDOW);
-                RETURN(0);
-        }
-
-        len = ria_page_count(&ria);
-        if (len == 0)
-                RETURN(0);
-
-        reserved = ll_ra_count_get(ll_i2sbi(inode), len);
-        if (reserved < end - start + 1)
-                ll_ra_stats_inc(mapping, RA_STAT_MAX_IN_FLIGHT);
-
-        CDEBUG(D_READA, "reserved page %lu \n", reserved);
-	
-        ret = ll_read_ahead_pages(exp, oig, &ria, &reserved, mapping, &ra_end);
-
-        LASSERTF(reserved >= 0, "reserved %lu\n", reserved);
-        if (reserved != 0)
-                ll_ra_count_put(ll_i2sbi(inode), reserved);
-
-        if (ra_end == end + 1 && ra_end == (kms >> CFS_PAGE_SHIFT))
-                ll_ra_stats_inc(mapping, RA_STAT_EOF);
-
-        /* if we didn't get to the end of the region we reserved from
-         * the ras we need to go back and update the ras so that the
-         * next read-ahead tries from where we left off.  we only do so
-         * if the region we failed to issue read-ahead on is still ahead
-         * of the app and behind the next index to start read-ahead from */
-        CDEBUG(D_READA, "ra_end %lu end %lu stride end %lu \n",
-               ra_end, end, ria.ria_end);
-
-        if (ra_end != (end + 1)) {
-                spin_lock(&ras->ras_lock);
-                if (ra_end < ras->ras_next_readahead &&
-                    index_in_window(ra_end, ras->ras_window_start, 0,
-                                    ras->ras_window_len)) {
-                	ras->ras_next_readahead = ra_end;
-                       	RAS_CDEBUG(ras);
-                }
-                spin_unlock(&ras->ras_lock);
-        }
-
-        RETURN(ret);
-}
-
-static void ras_set_start(struct ll_readahead_state *ras, unsigned long index)
-{
-        ras->ras_window_start = index & (~(RAS_INCREASE_STEP - 1));
-}
-
-/* called with the ras_lock held or from places where it doesn't matter */
-static void ras_reset(struct ll_readahead_state *ras, unsigned long index)
-{
-        ras->ras_last_readpage = index;
-        ras->ras_consecutive_requests = 0;
-        ras->ras_consecutive_pages = 0;
-        ras->ras_window_len = 0;
-        ras_set_start(ras, index);
-        ras->ras_next_readahead = max(ras->ras_window_start, index);
-
-        RAS_CDEBUG(ras);
-}
-
-/* called with the ras_lock held or from places where it doesn't matter */
-static void ras_stride_reset(struct ll_readahead_state *ras)
-{
-        ras->ras_consecutive_stride_requests = 0;
-        RAS_CDEBUG(ras);
-}
-
-void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras)
-{
-        spin_lock_init(&ras->ras_lock);
-        ras_reset(ras, 0);
-        ras->ras_requests = 0;
-        INIT_LIST_HEAD(&ras->ras_read_beads);
-}
-
-/* Check whether the read request is in the stride window.
- * If it is in the stride window, return 1, otherwise return 0.
- * and also update stride_gap and stride_pages.
- */
-static int index_in_stride_window(unsigned long index,
-                                  struct ll_readahead_state *ras,
-                                  struct inode *inode)
-{
-        int stride_gap = index - ras->ras_last_readpage - 1;
-
-        LASSERT(stride_gap != 0);
-
-        if (ras->ras_consecutive_pages == 0)
-                return 0;
-
-        /*Otherwise check the stride by itself */
-        if ((ras->ras_stride_length - ras->ras_stride_pages) == stride_gap &&
-            ras->ras_consecutive_pages == ras->ras_stride_pages)
-                return 1;
-
-        if (stride_gap >= 0) {
-                /*
-                 * only set stride_pages, stride_length if
-                 * it is forward reading ( stride_gap > 0)
-                 */
-                ras->ras_stride_pages = ras->ras_consecutive_pages;
-                ras->ras_stride_length = stride_gap + ras->ras_consecutive_pages;
-        } else {
-                /*
-                 * If stride_gap < 0,(back_forward reading),
-                 * reset the stride_pages/length.
-                 * FIXME:back_ward stride I/O read.
-                 *
-                 */
-                ras->ras_stride_pages = 0;
-                ras->ras_stride_length = 0;
-        }
-        RAS_CDEBUG(ras);
-
-        return 0;
-}
-
-static unsigned long
-stride_page_count(struct ll_readahead_state *ras, unsigned long len)
-{
-        return stride_pg_count(ras->ras_stride_offset, ras->ras_stride_length,
-                               ras->ras_stride_pages, ras->ras_stride_offset,
-                               len);
-}
-
-/* Stride Read-ahead window will be increased inc_len according to
- * stride I/O pattern */
-static void ras_stride_increase_window(struct ll_readahead_state *ras,
-                                       struct ll_ra_info *ra,
-                                       unsigned long inc_len)
-{
-        unsigned long left, step, window_len;
-        unsigned long stride_len;
-
-        LASSERT(ras->ras_stride_length > 0);
-
-        stride_len = ras->ras_window_start + ras->ras_window_len -
-                     ras->ras_stride_offset;
-
-        LASSERTF(stride_len >= 0, "window_start %lu, window_len %lu"
-                 " stride_offset %lu\n", ras->ras_window_start,
-                 ras->ras_window_len, ras->ras_stride_offset);
-
-        left = stride_len % ras->ras_stride_length;
-
-        window_len = ras->ras_window_len - left;
-
-        if (left < ras->ras_stride_pages)
-                left += inc_len;
-        else
-                left = ras->ras_stride_pages + inc_len;
-
-        LASSERT(ras->ras_stride_pages != 0);
-
-        step = left / ras->ras_stride_pages;
-        left %= ras->ras_stride_pages;
-
-        window_len += step * ras->ras_stride_length + left;
-
-        if (stride_page_count(ras, window_len) <= ra->ra_max_pages)
-                ras->ras_window_len = window_len;
-
-        RAS_CDEBUG(ras);
-}
-
-/* Set stride I/O read-ahead window start offset */
-static void ras_set_stride_offset(struct ll_readahead_state *ras)
-{
-        unsigned long window_len = ras->ras_next_readahead -
-                                   ras->ras_window_start;
-        unsigned long left;
-
-        LASSERT(ras->ras_stride_length != 0);
-
-        left = window_len % ras->ras_stride_length;
-
-        ras->ras_stride_offset = ras->ras_next_readahead - left;
-
-        RAS_CDEBUG(ras);
-}
-
-static void ras_update(struct ll_sb_info *sbi, struct inode *inode,
-                       struct ll_readahead_state *ras, unsigned long index,
-                       unsigned hit)
-{
-        struct ll_ra_info *ra = &sbi->ll_ra_info;
-        int zero = 0, stride_zero = 0, stride_detect = 0, ra_miss = 0;
-        ENTRY;
-
-        spin_lock(&sbi->ll_lock);
-        spin_lock(&ras->ras_lock);
-
-        ll_ra_stats_inc_unlocked(ra, hit ? RA_STAT_HIT : RA_STAT_MISS);
-
-        /* reset the read-ahead window in two cases.  First when the app seeks
-         * or reads to some other part of the file.  Secondly if we get a
-         * read-ahead miss that we think we've previously issued.  This can
-         * be a symptom of there being so many read-ahead pages that the VM is
-         * reclaiming it before we get to it. */
-        if (!index_in_window(index, ras->ras_last_readpage, 8, 8)) {
-                zero = 1;
-                ll_ra_stats_inc_unlocked(ra, RA_STAT_DISTANT_READPAGE);
-		/* check whether it is in stride I/O mode*/
-                if (!index_in_stride_window(index, ras, inode))
-                        stride_zero = 1;
-        } else if (!hit && ras->ras_window_len &&
-                   index < ras->ras_next_readahead &&
-                   index_in_window(index, ras->ras_window_start, 0,
-                                   ras->ras_window_len)) {
-                zero = 1;
-		ra_miss = 1;
-                /* If it hits read-ahead miss and the stride I/O is still
-                 * not detected, reset stride stuff to re-detect the whole
-                 * stride I/O mode to avoid complication */
-                if (!stride_io_mode(ras))
-                        stride_zero = 1;
-                ll_ra_stats_inc_unlocked(ra, RA_STAT_MISS_IN_WINDOW);
-        }
-
-        /* On the second access to a file smaller than the tunable
-         * ra_max_read_ahead_whole_pages trigger RA on all pages in the
-         * file up to ra_max_pages.  This is simply a best effort and
-         * only occurs once per open file.  Normal RA behavior is reverted
-         * to for subsequent IO.  The mmap case does not increment
-         * ras_requests and thus can never trigger this behavior. */
-        if (ras->ras_requests == 2 && !ras->ras_request_index) {
-                __u64 kms_pages;
-
-                kms_pages = (i_size_read(inode) + CFS_PAGE_SIZE - 1) >>
-                            CFS_PAGE_SHIFT;
-
-                CDEBUG(D_READA, "kmsp "LPU64" mwp %lu mp %lu\n", kms_pages,
-                       ra->ra_max_read_ahead_whole_pages, ra->ra_max_pages);
-
-                if (kms_pages &&
-                    kms_pages <= ra->ra_max_read_ahead_whole_pages) {
-                        ras->ras_window_start = 0;
-                        ras->ras_last_readpage = 0;
-                        ras->ras_next_readahead = 0;
-                        ras->ras_window_len = min(ra->ra_max_pages,
-                                ra->ra_max_read_ahead_whole_pages);
-                        GOTO(out_unlock, 0);
-                }
-        }
-
-        if (zero) {
-                /* If it is discontinuous read, check
-                 * whether it is stride I/O mode*/
-                if (stride_zero) {
-                        ras_reset(ras, index);
-                        ras->ras_consecutive_pages++;
-                        ras_stride_reset(ras);
-                        RAS_CDEBUG(ras);
-                        GOTO(out_unlock, 0);
-                } else {
-                        /* The read is still in stride window or
- 			 * it hits read-ahead miss */
-
-                        /* If ra-window miss is hitted, which probably means VM
-                         * pressure, and some read-ahead pages were reclaimed.So
-                         * the length of ra-window will not increased, but also
-                         * not reset to avoid redetecting the stride I/O mode.*/
-        		ras->ras_consecutive_requests = 0;
-                        if (!ra_miss) {
-                                ras->ras_consecutive_pages = 0;
-                                if (++ras->ras_consecutive_stride_requests > 1)
-                                        stride_detect = 1;
-                        }
-                        RAS_CDEBUG(ras);
-                }
-        } else if (ras->ras_consecutive_stride_requests > 1) {
-                /* If this is contiguous read but in stride I/O mode
-                 * currently, check whether stride step still is valid,
-                 * if invalid, it will reset the stride ra window*/ 	
-                if (ras->ras_consecutive_pages + 1 > ras->ras_stride_pages)
-                        ras_stride_reset(ras);
-        }
-
-        ras->ras_last_readpage = index;
-        ras->ras_consecutive_pages++;
-        ras_set_start(ras, index);
-        ras->ras_next_readahead = max(ras->ras_window_start,
-                                      ras->ras_next_readahead);
-        RAS_CDEBUG(ras);
-
-        /* Trigger RA in the mmap case where ras_consecutive_requests
-         * is not incremented and thus can't be used to trigger RA */
-        if (!ras->ras_window_len && ras->ras_consecutive_pages == 4) {
-                ras->ras_window_len = RAS_INCREASE_STEP;
-                GOTO(out_unlock, 0);
-        }
-
-        /* Initially reset the stride window offset to next_readahead*/
-        if (ras->ras_consecutive_stride_requests == 2 && stride_detect)
-                ras_set_stride_offset(ras);
-
-        /* The initial ras_window_len is set to the request size.  To avoid
-         * uselessly reading and discarding pages for random IO the window is
-         * only increased once per consecutive request received. */
-        if ((ras->ras_consecutive_requests > 1 &&
-            !ras->ras_request_index) || stride_detect) {
-                if (stride_io_mode(ras))
-                        ras_stride_increase_window(ras, ra, RAS_INCREASE_STEP);
-                else
-                        ras->ras_window_len = min(ras->ras_window_len +
-                                                  RAS_INCREASE_STEP,
-                                                  ra->ra_max_pages);
-        }
-        EXIT;
-out_unlock:
-        RAS_CDEBUG(ras);
-        ras->ras_request_index++;
-        spin_unlock(&ras->ras_lock);
-        spin_unlock(&sbi->ll_lock);
-        return;
-}
-
-int ll_writepage(struct page *page)
-{
-        struct inode *inode = page->mapping->host;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct obd_export *exp;
-        struct ll_async_page *llap;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(PageLocked(page));
-
-        exp = ll_i2obdexp(inode);
-        if (exp == NULL)
-                GOTO(out, rc = -EINVAL);
-
-        llap = llap_from_page(page, LLAP_ORIGIN_WRITEPAGE);
-        if (IS_ERR(llap))
-                GOTO(out, rc = PTR_ERR(llap));
-
-        LASSERT(!llap->llap_nocache);
-        LASSERT(!PageWriteback(page));
-        set_page_writeback(page);
-
-        page_cache_get(page);
-        if (llap->llap_write_queued) {
-                LL_CDEBUG_PAGE(D_PAGE, page, "marking urgent\n");
-                rc = obd_set_async_flags(exp, lli->lli_smd, NULL,
-                                         llap->llap_cookie,
-                                         ASYNC_READY | ASYNC_URGENT);
-        } else {
-                rc = queue_or_sync_write(exp, inode, llap, CFS_PAGE_SIZE,
-                                         ASYNC_READY | ASYNC_URGENT);
-        }
-        if (rc)
-                page_cache_release(page);
-out:
-        if (rc) {
-                if (!lli->lli_async_rc)
-                        lli->lli_async_rc = rc;
-                /* re-dirty page on error so it retries write */
-                if (PageWriteback(page)) {
-                        end_page_writeback(page);
-                }
-                /* resend page only for not started IO*/
-                if (!PageError(page))
-                        ll_redirty_page(page);
-                unlock_page(page);
-        }
-        RETURN(rc);
-}
-
-/*
- * for now we do our readpage the same on both 2.4 and 2.5.  The kernel's
- * read-ahead assumes it is valid to issue readpage all the way up to
- * i_size, but our dlm locks make that not the case.  We disable the
- * kernel's read-ahead and do our own by walking ahead in the page cache
- * checking for dlm lock coverage.  the main difference between 2.4 and
- * 2.6 is how read-ahead gets batched and issued, but we're using our own,
- * so they look the same.
- */
-int ll_readpage(struct file *filp, struct page *page)
-{
-        struct ll_file_data *fd = LUSTRE_FPRIVATE(filp);
-        struct inode *inode = page->mapping->host;
-        struct obd_export *exp;
-        struct ll_async_page *llap;
-        struct obd_io_group *oig = NULL;
-        struct lustre_handle *lockh = NULL;
-        int rc;
-        ENTRY;
-
-        LASSERT(PageLocked(page));
-        LASSERT(!PageUptodate(page));
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p),offset=%Lu=%#Lx\n",
-               inode->i_ino, inode->i_generation, inode,
-               (((loff_t)page->index) << CFS_PAGE_SHIFT),
-               (((loff_t)page->index) << CFS_PAGE_SHIFT));
-        LASSERT(atomic_read(&filp->f_dentry->d_inode->i_count) > 0);
-
-        if (!ll_i2info(inode)->lli_smd) {
-                /* File with no objects - one big hole */
-                /* We use this just for remove_from_page_cache that is not
-                 * exported, we'd make page back up to date. */
-                ll_truncate_complete_page(page);
-                clear_page(kmap(page));
-                kunmap(page);
-                SetPageUptodate(page);
-                unlock_page(page);
-                RETURN(0);
-        }
-
-        rc = oig_init(&oig);
-        if (rc < 0)
-                GOTO(out, rc);
-
-        exp = ll_i2obdexp(inode);
-        if (exp == NULL)
-                GOTO(out, rc = -EINVAL);
-
-        if (fd->fd_flags & LL_FILE_GROUP_LOCKED)
-                lockh = &fd->fd_cwlockh;
-
-        llap = llap_from_page_with_lockh(page, LLAP_ORIGIN_READPAGE, lockh);
-        if (IS_ERR(llap)) {
-                if (PTR_ERR(llap) == -ENOLCK) {
-                        CWARN("ino %lu page %lu (%llu) not covered by "
-                              "a lock (mmap?).  check debug logs.\n",
-                              inode->i_ino, page->index,
-                              (long long)page->index << PAGE_CACHE_SHIFT);
-                }
-                GOTO(out, rc = PTR_ERR(llap));
-        }
-
-        if (ll_i2sbi(inode)->ll_ra_info.ra_max_pages)
-                ras_update(ll_i2sbi(inode), inode, &fd->fd_ras, page->index,
-                           llap->llap_defer_uptodate);
-
-
-        if (llap->llap_defer_uptodate) {
-                /* This is the callpath if we got the page from a readahead */
-                llap->llap_ra_used = 1;
-                rc = ll_readahead(&fd->fd_ras, exp, page->mapping, oig,
-                                  fd->fd_flags);
-                if (rc > 0)
-                        obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd,
-                                             NULL, oig);
-                LL_CDEBUG_PAGE(D_PAGE, page, "marking uptodate from defer\n");
-                SetPageUptodate(page);
-                unlock_page(page);
-                GOTO(out_oig, rc = 0);
-        }
-
-        rc = ll_issue_page_read(exp, llap, oig, 0);
-        if (rc)
-                GOTO(out, rc);
-
-        LL_CDEBUG_PAGE(D_PAGE, page, "queued readpage\n");
-        /* We have just requested the actual page we want, see if we can tack
-         * on some readahead to that page's RPC before it is sent. */
-        if (ll_i2sbi(inode)->ll_ra_info.ra_max_pages)
-                ll_readahead(&fd->fd_ras, exp, page->mapping, oig,
-                             fd->fd_flags);
-
-        rc = obd_trigger_group_io(exp, ll_i2info(inode)->lli_smd, NULL, oig);
-
-out:
-        if (rc)
-                unlock_page(page);
-out_oig:
-        if (oig != NULL)
-                oig_release(oig);
-        RETURN(rc);
-}
-
-static void ll_file_put_pages(struct page **pages, int numpages)
-{
-        int i;
-        struct page **pp;
-        ENTRY;
-
-        for (i = 0, pp = pages; i < numpages; i++, pp++) {
-                if (*pp) {
-                        LL_CDEBUG_PAGE(D_PAGE, (*pp), "free\n");
-                        __ll_put_llap(*pp);
-                        if (page_private(*pp))
-                                CERROR("the llap wasn't freed\n");
-                        (*pp)->mapping = NULL;
-                        if (page_count(*pp) != 1)
-                                CERROR("page %p, flags %#lx, count %i, private %p\n",
-                                (*pp), (unsigned long)(*pp)->flags, page_count(*pp),
-                                (void*)page_private(*pp));
-                        __free_pages(*pp, 0);
-                }
-        }
-        OBD_FREE(pages, numpages * sizeof(struct page*));
-        EXIT;
-}
-
-static struct page **ll_file_prepare_pages(int numpages, struct inode *inode,
-                                           unsigned long first)
-{
-        struct page **pages;
-        int i;
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(pages, sizeof(struct page *) * numpages);
-        if (pages == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-        for (i = 0; i < numpages; i++) {
-                struct page *page;
-                struct ll_async_page *llap;
-
-                page = alloc_pages(GFP_HIGHUSER, 0);
-                if (page == NULL)
-                        GOTO(err, rc = -ENOMEM);
-                pages[i] = page;
-                /* llap_from_page needs page index and mapping to be set */
-                page->index = first++;
-                page->mapping = inode->i_mapping;
-                llap = llap_from_page(page, LLAP_ORIGIN_LOCKLESS_IO);
-                if (IS_ERR(llap))
-                        GOTO(err, rc = PTR_ERR(llap));
-                llap->llap_lockless_io_page = 1;
-        }
-        RETURN(pages);
-err:
-        ll_file_put_pages(pages, numpages);
-        RETURN(ERR_PTR(rc));
- }
-
-static ssize_t ll_file_copy_pages(struct page **pages, int numpages,
-                                  const struct iovec *iov, unsigned long nsegs,
-                                  ssize_t iov_offset, loff_t pos, size_t count,
-                                  int rw)
-{
-        ssize_t amount = 0;
-        int i;
-        int updatechecksum = ll_i2sbi(pages[0]->mapping->host)->ll_flags &
-                             LL_SBI_LLITE_CHECKSUM;
-        ENTRY;
-
-        for (i = 0; i < numpages; i++) {
-                unsigned offset, bytes, left = 0;
-                char *vaddr;
-
-                vaddr = kmap(pages[i]);
-                offset = pos & (CFS_PAGE_SIZE - 1);
-                bytes = min_t(unsigned, CFS_PAGE_SIZE - offset, count);
-                LL_CDEBUG_PAGE(D_PAGE, pages[i], "op = %s, addr = %p, "
-                               "bytes = %u\n",
-                               (rw == WRITE) ? "CFU" : "CTU",
-                               vaddr + offset, bytes);
-                while (bytes > 0 && !left && nsegs) {
-                        unsigned copy = min_t(ssize_t, bytes,
-                                               iov->iov_len - iov_offset);
-                        if (rw == WRITE) {
-                                left = copy_from_user(vaddr + offset,
-                                                      iov->iov_base +iov_offset,
-                                                      copy);
-                                if (updatechecksum) {
-                                        struct ll_async_page *llap;
-
-                                        llap = llap_cast_private(pages[i]);
-                                        llap->llap_checksum =
-                                                init_checksum(OSC_DEFAULT_CKSUM);
-                                        llap->llap_checksum =
-                                           compute_checksum(llap->llap_checksum,
-                                                            vaddr,CFS_PAGE_SIZE,
-                                                            OSC_DEFAULT_CKSUM);
-                                }
-                        } else {
-                                left = copy_to_user(iov->iov_base + iov_offset,
-                                                    vaddr + offset, copy);
-                        }
-
-                        amount += copy;
-                        count -= copy;
-                        pos += copy;
-                        iov_offset += copy;
-                        bytes -= copy;
-                        if (iov_offset == iov->iov_len) {
-                                iov_offset = 0;
-                                iov++;
-                                nsegs--;
-                        }
-                }
-                kunmap(pages[i]);
-                if (left) {
-                        amount -= left;
-                        break;
-                }
-        }
-        if (amount == 0)
-                RETURN(-EFAULT);
-        RETURN(amount);
-}
-
-static int ll_file_oig_pages(struct inode * inode, struct page **pages,
-                             int numpages, loff_t pos, size_t count, int rw)
-{
-        struct obd_io_group *oig;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct obd_export *exp;
-        loff_t org_pos = pos;
-        obd_flag brw_flags;
-        int rc;
-        int i;
-        ENTRY;
-
-        exp = ll_i2obdexp(inode);
-        if (exp == NULL)
-                RETURN(-EINVAL);
-        rc = oig_init(&oig);
-        if (rc)
-                RETURN(rc);
-        brw_flags = OBD_BRW_SRVLOCK;
-        if (capable(CAP_SYS_RESOURCE))
-                brw_flags |= OBD_BRW_NOQUOTA;
-
-        for (i = 0; i < numpages; i++) {
-                struct ll_async_page *llap;
-                unsigned from, bytes;
-
-                from = pos & (CFS_PAGE_SIZE - 1);
-                bytes = min_t(unsigned, CFS_PAGE_SIZE - from,
-                              count - pos + org_pos);
-                llap = llap_cast_private(pages[i]);
-                LASSERT(llap);
-
-                lock_page(pages[i]);
-
-                LL_CDEBUG_PAGE(D_PAGE, pages[i], "offset "LPU64","
-                               " from %u, bytes = %u\n",
-                               pos, from, bytes);
-                LASSERTF(pos >> CFS_PAGE_SHIFT == pages[i]->index,
-                         "wrong page index %lu (%lu)\n",
-                         pages[i]->index,
-                         (unsigned long)(pos >> CFS_PAGE_SHIFT));
-                rc = obd_queue_group_io(exp, lli->lli_smd, NULL, oig,
-                                        llap->llap_cookie,
-                                        (rw == WRITE) ?
-                                        OBD_BRW_WRITE:OBD_BRW_READ,
-                                        from, bytes, brw_flags,
-                                        ASYNC_READY | ASYNC_URGENT |
-                                        ASYNC_COUNT_STABLE | ASYNC_GROUP_SYNC);
-                if (rc) {
-                        i++;
-                        GOTO(out, rc);
-                }
-                pos += bytes;
-        }
-        rc = obd_trigger_group_io(exp, lli->lli_smd, NULL, oig);
-        if (rc)
-                GOTO(out, rc);
-        rc = oig_wait(oig);
-out:
-        while(--i >= 0)
-                unlock_page(pages[i]);
-        oig_release(oig);
-        RETURN(rc);
-}
-
-/* Advance through passed iov, adjust iov pointer as necessary and return
- * starting offset in individual entry we are pointing at. Also reduce
- * nr_segs as needed */
-static ssize_t ll_iov_advance(const struct iovec **iov, unsigned long *nr_segs,
-                              ssize_t offset)
-{
-        while (*nr_segs > 0) {
-                if ((*iov)->iov_len > offset)
-                        return ((*iov)->iov_len - offset);
-                offset -= (*iov)->iov_len;
-                (*iov)++;
-                (*nr_segs)--;
-        }
-        return 0;
-}
-
-ssize_t ll_file_lockless_io(struct file *file, const struct iovec *iov,
-                            unsigned long nr_segs,
-                            loff_t *ppos, int rw, ssize_t count)
-{
-        loff_t pos;
-        struct inode *inode = file->f_dentry->d_inode;
-        ssize_t rc = 0;
-        int max_pages;
-        size_t amount = 0;
-        unsigned long first, last;
-        const struct iovec *iv = &iov[0];
-        unsigned long nsegs = nr_segs;
-        unsigned long offset = 0;
-        ENTRY;
-
-        if (rw == READ) {
-                loff_t isize;
-
-                ll_inode_size_lock(inode, 0);
-                isize = i_size_read(inode);
-                ll_inode_size_unlock(inode, 0);
-                if (*ppos >= isize)
-                        GOTO(out, rc = 0);
-                if (*ppos + count >= isize)
-                        count -= *ppos + count - isize;
-                if (count == 0)
-                        GOTO(out, rc);
-        } else {
-                rc = generic_write_checks(file, ppos, &count, 0);
-                if (rc)
-                        GOTO(out, rc);
-                rc = remove_suid(file->f_dentry);
-                if (rc)
-                        GOTO(out, rc);
-        }
-
-        pos = *ppos;
-        first = pos >> CFS_PAGE_SHIFT;
-        last = (pos + count - 1) >> CFS_PAGE_SHIFT;
-        max_pages = PTLRPC_MAX_BRW_PAGES *
-                ll_i2info(inode)->lli_smd->lsm_stripe_count;
-        CDEBUG(D_INFO, "%u, stripe_count = %u\n",
-               PTLRPC_MAX_BRW_PAGES /* max_pages_per_rpc */,
-               ll_i2info(inode)->lli_smd->lsm_stripe_count);
-
-        while (first <= last && rc >= 0) {
-                int pages_for_io;
-                struct page **pages;
-                size_t bytes = count - amount;
-
-                pages_for_io = min_t(int, last - first + 1, max_pages);
-                pages = ll_file_prepare_pages(pages_for_io, inode, first);
-                if (IS_ERR(pages)) {
-                        rc = PTR_ERR(pages);
-                        break;
-                }
-                if (rw == WRITE) {
-                        rc = ll_file_copy_pages(pages, pages_for_io, iv, nsegs,
-                                                offset, pos + amount, bytes,
-                                                rw);
-                        if (rc < 0)
-                                GOTO(put_pages, rc);
-                        offset = ll_iov_advance(&iv, &nsegs, offset + rc);
-                        bytes = rc;
-                }
-                rc = ll_file_oig_pages(inode, pages, pages_for_io,
-                                       pos + amount, bytes, rw);
-                if (rc)
-                        GOTO(put_pages, rc);
-                if (rw == READ) {
-                        rc = ll_file_copy_pages(pages, pages_for_io, iv, nsegs,
-                                                offset, pos + amount, bytes, rw);
-                        if (rc < 0)
-                                GOTO(put_pages, rc);
-                        offset = ll_iov_advance(&iv, &nsegs, offset + rc);
-                        bytes = rc;
-                }
-                amount += bytes;
-put_pages:
-                ll_file_put_pages(pages, pages_for_io);
-                first += pages_for_io;
-                /* a short read/write check */
-                if (pos + amount < ((loff_t)first << CFS_PAGE_SHIFT))
-                        break;
-                /* Check if we are out of userspace buffers. (how that could
-                   happen?) */
-                if (nsegs == 0)
-                        break;
-        }
-        /* NOTE: don't update i_size and KMS in absence of LDLM locks even
-         * write makes the file large */
-        file_accessed(file);
-        if (rw == READ && amount < count && rc == 0) {
-                unsigned long not_cleared;
-
-                while (nsegs > 0) {
-                        ssize_t to_clear = min_t(ssize_t, count - amount,
-                                                 iv->iov_len - offset);
-                        not_cleared = clear_user(iv->iov_base + offset,
-                                                 to_clear);
-                        amount += to_clear - not_cleared;
-                        if (not_cleared) {
-                                rc = -EFAULT;
-                                break;
-                        }
-                        offset = 0;
-                        iv++;
-                        nsegs--;
-                }
-        }
-        if (amount > 0) {
-                lprocfs_counter_add(ll_i2sbi(inode)->ll_stats,
-                                    (rw == WRITE) ?
-                                    LPROC_LL_LOCKLESS_WRITE :
-                                    LPROC_LL_LOCKLESS_READ,
-                                    (long)amount);
-                *ppos += amount;
-                RETURN(amount);
-        }
-out:
-        RETURN(rc);
-}
diff --git a/lustre/llite/rw24.c b/lustre/llite/rw24.c
deleted file mode 100644
index ab83f8f58ac60f8a8d3741c0caa07d2e8f6dce0b..0000000000000000000000000000000000000000
--- a/lustre/llite/rw24.c
+++ /dev/null
@@ -1,144 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Lite I/O page cache for the 2.4 kernel version
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/smp_lock.h>
-#include <linux/unistd.h>
-#include <linux/version.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include <linux/fs.h>
-#include <linux/iobuf.h>
-#include <linux/stat.h>
-#include <asm/uaccess.h>
-#include <linux/mm.h>
-#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <lustre_lite.h>
-#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
-
-static int ll_direct_IO_24(int rw,
-#ifdef HAVE_DIO_FILE
-                           struct file *file,
-#else
-                           struct inode *inode,
-#endif
-                           struct kiobuf *iobuf, unsigned long blocknr,
-                           int blocksize)
-{
-#ifdef HAVE_DIO_FILE
-        struct inode *inode = file->f_dentry->d_inode;
-#endif
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct brw_page *pga;
-        struct obdo oa;
-        int length, i, flags, rc = 0;
-        loff_t offset, offset_orig;
-        ENTRY;
-
-        if (!lsm || !lsm->lsm_object_id)
-                RETURN(-EBADF);
-
-        offset = ((obd_off)blocknr << inode->i_blkbits);
-        offset_orig = offset;
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), size="LPSZ
-               ", offset=%lld=%llx, pages %u\n",
-               inode->i_ino, inode->i_generation, inode, iobuf->length,
-               offset, offset, iobuf->nr_pages);
-
-        /* FIXME: io smaller than CFS_PAGE_SIZE is broken on ia64 */
-        if ((iobuf->offset & (~CFS_PAGE_MASK)) ||
-            (iobuf->length & (~CFS_PAGE_MASK)))
-                RETURN(-EINVAL);
-
-        OBD_ALLOC(pga, sizeof(*pga) * iobuf->nr_pages);
-        if (!pga)
-                RETURN(-ENOMEM);
-
-        flags = 0 /* | OBD_BRW_DIRECTIO */;
-        length = iobuf->length;
-        rw = rw ? OBD_BRW_WRITE : OBD_BRW_READ;
-
-        for (i = 0, length = iobuf->length; length > 0;
-             length -= pga[i].count, offset += pga[i].count, i++) { /*i last!*/
-                pga[i].pg = iobuf->maplist[i];
-                pga[i].off = offset;
-                /* To the end of the page, or the length, whatever is less */
-                pga[i].count = min_t(int, CFS_PAGE_SIZE - (offset & ~CFS_PAGE_MASK),
-                                     length);
-                pga[i].flag = flags;
-                if (rw == OBD_BRW_READ)
-                        POISON_PAGE(iobuf->maplist[i], 0x0d);
-        }
-
-        ll_inode_fill_obdo(inode, rw, &oa);
-
-        if (rw == OBD_BRW_WRITE)
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_WRITE, iobuf->length);
-        else
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_READ, iobuf->length);
-        rc = obd_brw_rqset(rw, ll_i2obdexp(inode), &oa, lsm, iobuf->nr_pages,
-                           pga, NULL);
-        if ((rc > 0) && (rw == OBD_BRW_WRITE)) {
-                lov_stripe_lock(lsm);
-                obd_adjust_kms(ll_i2obdexp(inode), lsm, offset_orig + rc, 0);
-                lov_stripe_unlock(lsm);
-        }
-
-        OBD_FREE(pga, sizeof(*pga) * iobuf->nr_pages);
-        RETURN(rc);
-}
-
-#ifdef KERNEL_HAS_AS_MAX_READAHEAD
-static int ll_max_readahead(struct inode *inode)
-{
-        return 0;
-}
-#endif
-
-struct address_space_operations ll_aops = {
-        .readpage       = ll_readpage,
-        .direct_IO      = ll_direct_IO_24,
-        .writepage      = ll_writepage,
-        .prepare_write  = ll_prepare_write,
-        .commit_write   = ll_commit_write,
-        .removepage     = ll_removepage,
-        .sync_page      = NULL,
-        .bmap           = NULL,
-#ifdef KERNEL_HAS_AS_MAX_READAHEAD
-        .max_readahead  = ll_max_readahead,
-#endif
-};
-
diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c
deleted file mode 100644
index 82efcd3bf77830c27113b22b316de49df6aa1b7f..0000000000000000000000000000000000000000
--- a/lustre/llite/rw26.c
+++ /dev/null
@@ -1,329 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Lite I/O page cache routines for the 2.5/2.6 kernel version
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/smp_lock.h>
-#include <linux/unistd.h>
-#include <linux/version.h>
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include <linux/fs.h>
-#include <linux/buffer_head.h>
-#include <linux/mpage.h>
-#include <linux/writeback.h>
-#include <linux/stat.h>
-#include <asm/uaccess.h>
-#ifdef HAVE_SEGMENT_H
-# include <asm/segment.h>
-#endif
-#include <linux/mm.h>
-#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <lustre_lite.h>
-#include "llite_internal.h"
-#include <linux/lustre_compat25.h>
-
-static int ll_writepage_26(struct page *page, struct writeback_control *wbc)
-{
-        return ll_writepage(page);
-}
-
-/* It is safe to not check anything in invalidatepage/releasepage below
-   because they are run with page locked and all our io is happening with
-   locked page too */
-#ifdef HAVE_INVALIDATEPAGE_RETURN_INT
-static int ll_invalidatepage(struct page *page, unsigned long offset)
-{
-        if (offset)
-                return 0;
-        if (PagePrivate(page))
-                ll_removepage(page);
-        return 1;
-}
-#else
-static void ll_invalidatepage(struct page *page, unsigned long offset)
-{
-        if (offset)
-                return;
-        if (PagePrivate(page))
-                ll_removepage(page);
-}
-#endif
-
-static int ll_releasepage(struct page *page, gfp_t gfp_mask)
-{
-        if (PagePrivate(page))
-                ll_removepage(page);
-        return 1;
-}
-
-#define MAX_DIRECTIO_SIZE 2*1024*1024*1024UL
-
-static inline int ll_get_user_pages(int rw, unsigned long user_addr,
-                                    size_t size, struct page ***pages)
-{
-        int result = -ENOMEM;
-        int page_count;
-
-        /* set an arbitrary limit to prevent arithmetic overflow */
-        if (size > MAX_DIRECTIO_SIZE) {
-                *pages = NULL;
-                return -EFBIG;
-        }
-
-        page_count = ((user_addr + size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT)-
-                      (user_addr >> CFS_PAGE_SHIFT);
-
-        OBD_ALLOC_WAIT(*pages, page_count * sizeof(**pages));
-        if (*pages) {
-                down_read(&current->mm->mmap_sem);
-                result = get_user_pages(current, current->mm, user_addr,
-                                        page_count, (rw == READ), 0, *pages,
-                                        NULL);
-                up_read(&current->mm->mmap_sem);
-                if (result < 0)
-                        OBD_FREE(*pages, page_count * sizeof(**pages));
-        }
-
-        return result;
-}
-
-/*  ll_free_user_pages - tear down page struct array
- *  @pages: array of page struct pointers underlying target buffer */
-static void ll_free_user_pages(struct page **pages, int npages, int do_dirty)
-{
-        int i;
-
-        for (i = 0; i < npages; i++) {
-                if (do_dirty)
-                        set_page_dirty_lock(pages[i]);
-                page_cache_release(pages[i]);
-        }
-
-        OBD_FREE(pages, npages * sizeof(*pages));
-}
-
-static ssize_t ll_direct_IO_26_seg(int rw, struct inode *inode,
-                                   struct address_space *mapping,
-                                   struct obd_info *oinfo,
-                                   struct ptlrpc_request_set *set,
-                                   size_t size, loff_t file_offset,
-                                   struct page **pages, int page_count)
-{
-        struct brw_page *pga;
-        int i, rc = 0;
-        size_t length;
-        ENTRY;
-
-        OBD_ALLOC(pga, sizeof(*pga) * page_count);
-        if (!pga) {
-                CDEBUG(D_VFSTRACE, "sizeof(*pga) = %u page_count = %u\n",
-                      (int)sizeof(*pga), page_count);
-                RETURN(-ENOMEM);
-        }
-
-        for (i = 0, length = size; length > 0;
-             length -=pga[i].count, file_offset +=pga[i].count,i++) {/*i last!*/
-                pga[i].pg = pages[i];
-                pga[i].off = file_offset;
-                /* To the end of the page, or the length, whatever is less */
-                pga[i].count = min_t(int, CFS_PAGE_SIZE -(file_offset & ~CFS_PAGE_MASK),
-                                     length);
-                pga[i].flag = 0;
-                if (rw == READ)
-                        POISON_PAGE(pages[i], 0x0d);
-        }
-
-        rc = obd_brw_async(rw == WRITE ? OBD_BRW_WRITE : OBD_BRW_READ,
-                           ll_i2obdexp(inode), oinfo, page_count,
-                           pga, NULL, set);
-        if (rc == 0)
-                rc = size;
-
-        OBD_FREE(pga, sizeof(*pga) * page_count);
-        RETURN(rc);
-}
-
-/* This is the maximum size of a single O_DIRECT request, based on a 128kB
- * kmalloc limit.  We need to fit all of the brw_page structs, each one
- * representing PAGE_SIZE worth of user data, into a single buffer, and
- * then truncate this to be a full-sized RPC.  This is 22MB for 4kB pages. */
-#define MAX_DIO_SIZE ((128 * 1024 / sizeof(struct brw_page) * CFS_PAGE_SIZE) & \
-                      ~(PTLRPC_MAX_BRW_SIZE - 1))
-static ssize_t ll_direct_IO_26(int rw, struct kiocb *iocb,
-                               const struct iovec *iov, loff_t file_offset,
-                               unsigned long nr_segs)
-{
-        struct file *file = iocb->ki_filp;
-        struct inode *inode = file->f_mapping->host;
-        ssize_t count = iov_length(iov, nr_segs), tot_bytes = 0;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct lov_stripe_md *lsm = lli->lli_smd;
-        struct ptlrpc_request_set *set;
-        struct obd_info oinfo;
-        struct obdo oa;
-        unsigned long seg;
-        size_t size = MAX_DIO_SIZE;
-        ENTRY;
-
-        if (!lli->lli_smd || !lli->lli_smd->lsm_object_id)
-                RETURN(-EBADF);
-
-        /* FIXME: io smaller than CFS_PAGE_SIZE is broken on ia64 ??? */
-        if ((file_offset & (~CFS_PAGE_MASK)) || (count & ~CFS_PAGE_MASK))
-                RETURN(-EINVAL);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), size="LPSZ" (max %lu), "
-               "offset=%lld=%llx, pages "LPSZ" (max %lu)\n",
-               inode->i_ino, inode->i_generation, inode, count, MAX_DIO_SIZE,
-               file_offset, file_offset, count >> CFS_PAGE_SHIFT,
-               MAX_DIO_SIZE >> CFS_PAGE_SHIFT);
-
-        if (rw == WRITE)
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_WRITE, count);
-        else
-                ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_DIRECT_READ, count);
-
-        /* Check that all user buffers are aligned as well */
-        for (seg = 0; seg < nr_segs; seg++) {
-                if (((unsigned long)iov[seg].iov_base & ~CFS_PAGE_MASK) ||
-                    (iov[seg].iov_len & ~CFS_PAGE_MASK))
-                        RETURN(-EINVAL);
-        }
-
-        set = ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        ll_inode_fill_obdo(inode, rw == WRITE ? OBD_BRW_WRITE : OBD_BRW_READ, &oa);
-        oinfo.oi_oa = &oa;
-        oinfo.oi_md = lsm;
-
-        /* need locking between buffered and direct access. and race with 
-         *size changing by concurrent truncates and writes. */
-        if (rw == READ)
-                LOCK_INODE_MUTEX(inode);
-
-        for (seg = 0; seg < nr_segs; seg++) {
-                size_t iov_left = iov[seg].iov_len;
-                unsigned long user_addr = (unsigned long)iov[seg].iov_base;
-
-                if (rw == READ) {
-                        if (file_offset >= inode->i_size)
-                                break;
-                        if (file_offset + iov_left > inode->i_size)
-                                iov_left = inode->i_size - file_offset;
-                }
-
-                while (iov_left > 0) {
-                        struct page **pages;
-                        int page_count;
-                        ssize_t result;
-
-                        page_count = ll_get_user_pages(rw, user_addr,
-                                                       min(size, iov_left),
-                                                       &pages);
-                        LASSERT(page_count != 0);
-                        if (page_count > 0) {
-                                result = ll_direct_IO_26_seg(rw, inode,
-                                                             file->f_mapping,
-                                                             &oinfo, set,
-                                                             min(size,iov_left),
-                                                             file_offset, pages,
-                                                             page_count);
-                                ll_free_user_pages(pages, page_count, rw==READ);
-                        } else {
-                                result = 0;
-                        }
-                        if (page_count < 0 || result <= 0) {
-                                /* If we can't allocate a large enough buffer
-                                 * for the request, shrink it to a smaller
-                                 * PAGE_SIZE multiple and try again.
-                                 * We should always be able to kmalloc for a
-                                 * page worth of page pointers = 4MB on i386. */
-                                if ((page_count == -ENOMEM||result == -ENOMEM)&&
-                                    size > (CFS_PAGE_SIZE / sizeof(*pages)) *
-                                           CFS_PAGE_SIZE) {
-                                        size = ((((size / 2) - 1) |
-                                                 ~CFS_PAGE_MASK) + 1) &
-                                                CFS_PAGE_MASK;
-                                        CDEBUG(D_VFSTRACE, "DIO size now %u\n",
-                                               (int)size);
-                                        continue;
-                                }
-                                if (tot_bytes > 0)
-                                        GOTO(wait_io, tot_bytes);
-                                GOTO(out, tot_bytes = page_count < 0 ? page_count : result);
-                        }
-
-                        tot_bytes += result;
-                        file_offset += result;
-                        iov_left -= result;
-                        user_addr += result;
-                }
-        }
-
-        if (tot_bytes > 0) {
-                int rc;
-        wait_io:
-                rc = ptlrpc_set_wait(set);
-                if (rc)
-                        GOTO(out, tot_bytes = rc);
-                if (rw == WRITE) {
-                        lov_stripe_lock(lsm);
-                        obd_adjust_kms(ll_i2obdexp(inode), lsm, file_offset, 0);
-                        lov_stripe_unlock(lsm);
-                }
-        }
-out:
-        if (rw == READ)
-                UNLOCK_INODE_MUTEX(inode);
-
-        ptlrpc_set_destroy(set);
-        RETURN(tot_bytes);
-}
-
-struct address_space_operations ll_aops = {
-        .readpage       = ll_readpage,
-//        .readpages      = ll_readpages,
-        .direct_IO      = ll_direct_IO_26,
-        .writepage      = ll_writepage_26,
-        .writepages     = generic_writepages,
-        .set_page_dirty = __set_page_dirty_nobuffers,
-        .sync_page      = NULL,
-        .prepare_write  = ll_prepare_write,
-        .commit_write   = ll_commit_write,
-        .invalidatepage = ll_invalidatepage,
-        .releasepage    = ll_releasepage,
-        .bmap           = NULL
-};
diff --git a/lustre/llite/statahead.c b/lustre/llite/statahead.c
deleted file mode 100644
index 24b245d8655c214eceb38d48cceb57e0c35f02de..0000000000000000000000000000000000000000
--- a/lustre/llite/statahead.c
+++ /dev/null
@@ -1,927 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2007 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/fs.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp_lock.h>
-#include <linux/highmem.h>
-#include <linux/pagemap.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <obd_support.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
-#include <linux/lustre_version.h>
-#include "llite_internal.h"
-
-struct ll_sai_entry {
-        struct list_head        se_list;
-        unsigned int            se_index;
-        int                     se_stat;
-};
-
-enum {
-        SA_ENTRY_UNSTATED = 0,
-        SA_ENTRY_STATED
-};
-
-static unsigned int sai_generation = 0;
-static spinlock_t sai_generation_lock = SPIN_LOCK_UNLOCKED;
-
-static struct ll_statahead_info *ll_sai_alloc(void)
-{
-        struct ll_statahead_info *sai;
-
-        OBD_ALLOC_PTR(sai);
-        if (!sai)
-                return NULL;
-
-        spin_lock(&sai_generation_lock);
-        sai->sai_generation = ++sai_generation;
-        spin_unlock(&sai_generation_lock);
-        atomic_set(&sai->sai_refcount, 1);
-        sai->sai_max = LL_SA_RPC_MIN;
-        cfs_waitq_init(&sai->sai_waitq);
-        cfs_waitq_init(&sai->sai_thread.t_ctl_waitq);
-        CFS_INIT_LIST_HEAD(&sai->sai_entries);
-        return sai;
-}
-
-static inline 
-struct ll_statahead_info *ll_sai_get(struct ll_statahead_info *sai)
-{
-        LASSERT(sai);
-        atomic_inc(&sai->sai_refcount);
-        return sai;
-}
-
-static void ll_sai_put(struct ll_statahead_info *sai)
-{
-        struct inode         *inode = sai->sai_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        ENTRY;
-
-        if (atomic_dec_and_lock(&sai->sai_refcount, &lli->lli_lock)) {
-                struct ll_sai_entry *entry, *next;
-
-                lli->lli_sai = NULL;
-                spin_unlock(&lli->lli_lock);
-
-                LASSERT(sai->sai_thread.t_flags & SVC_STOPPED);
-
-                if (sai->sai_sent > sai->sai_replied)
-                        CWARN("statahead for dir %lu/%u does not finish: "
-                              "[sent:%u] [replied:%u]\n",
-                              inode->i_ino, inode->i_generation,
-                              sai->sai_sent, sai->sai_replied);
-
-                list_for_each_entry_safe(entry, next, &sai->sai_entries,
-                                         se_list) {
-                        list_del(&entry->se_list);
-                        OBD_FREE_PTR(entry);
-                }
-                OBD_FREE_PTR(sai);
-                iput(inode);
-        }
-        EXIT;
-}
-
-static struct ll_sai_entry *
-ll_sai_entry_get(struct ll_statahead_info *sai, unsigned int index, int stat)
-{
-        struct ll_inode_info *lli = ll_i2info(sai->sai_inode);
-        struct ll_sai_entry  *entry;
-        ENTRY;
-
-        OBD_ALLOC_PTR(entry);
-        if (entry == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-        
-        CDEBUG(D_READA, "alloc sai entry %p index %u, stat %d\n",
-               entry, index, stat);
-        entry->se_index = index;
-        entry->se_stat  = stat;
-
-        spin_lock(&lli->lli_lock);
-        list_add_tail(&entry->se_list, &sai->sai_entries);
-        spin_unlock(&lli->lli_lock);
-
-        RETURN(entry);
-}
-
-/*
- * inside lli_lock
- * return value:
- *  0: can not find the entry with the index
- *  1: it is the first entry
- *  2: it is not the first entry
- */
-static int
-ll_sai_entry_set(struct ll_statahead_info *sai, unsigned int index, int stat)
-{
-        struct ll_sai_entry *entry;
-        int                  rc = 0;
-        ENTRY;
-
-        if (list_empty(&sai->sai_entries))
-                RETURN(0);
-
-        entry = list_entry(sai->sai_entries.next, struct ll_sai_entry, se_list);
-        if (entry->se_index == index)
-                GOTO(out, rc = 1);
-
-        while (entry->se_list.next != &sai->sai_entries &&
-               entry->se_index < index) {
-                entry = list_entry(entry->se_list.next, struct ll_sai_entry,
-                                   se_list);
-                if (entry->se_index == index)
-                        GOTO(out, rc = 2);
-        }
-
-        EXIT;
-
-out:
-        if (rc) {
-                LASSERT(entry->se_stat == SA_ENTRY_UNSTATED);
-                entry->se_stat = stat;
-        }
-
-        return rc;
-}
-
-/*
- * Check whether first entry was stated already or not.
- * No need to hold lli_lock, for:
- * (1) it is me that remove entry from the list
- * (2) the statahead thread only add new entry to the list tail
- */
-static int ll_sai_entry_stated(struct ll_statahead_info *sai)
-{
-        struct ll_sai_entry  *entry;
-        int                   rc = 0;
-        ENTRY;
-
-        if (!list_empty(&sai->sai_entries)) {
-                entry = list_entry(sai->sai_entries.next, struct ll_sai_entry,
-                                   se_list);
-                rc = (entry->se_stat != SA_ENTRY_UNSTATED);
-        }
-
-        RETURN(rc);
-}
-
-static void ll_sai_entry_put(struct ll_statahead_info *sai)
-{
-        struct ll_inode_info *lli = ll_i2info(sai->sai_inode);
-        struct ll_sai_entry  *entry;
-        ENTRY;
-        
-        spin_lock(&lli->lli_lock);
-        if (!list_empty(&sai->sai_entries)) {
-                entry = list_entry(sai->sai_entries.next,
-                                   struct ll_sai_entry, se_list);
-                list_del(&entry->se_list);
-                OBD_FREE_PTR(entry);
-        }
-        spin_unlock(&lli->lli_lock);
-
-        EXIT;
-}
-
-/* finish lookup/revalidate */
-static int ll_statahead_interpret(struct obd_export *exp,
-                                  struct ptlrpc_request *req,
-                                  struct md_enqueue_info *minfo,
-                                  int rc)
-{
-        struct lookup_intent     *it = &minfo->mi_it;
-        struct dentry            *dentry = minfo->mi_dentry;
-        struct inode             *dir = dentry->d_parent->d_inode;
-        struct ll_inode_info     *lli = ll_i2info(dir);
-        struct ll_statahead_info *sai = NULL;
-        ENTRY;
-
-        CDEBUG(D_READA, "interpret statahead %.*s rc %d\n",
-               dentry->d_name.len, dentry->d_name.name, rc);
-
-        spin_lock(&lli->lli_lock);
-        if (unlikely(lli->lli_sai == NULL ||
-            lli->lli_sai->sai_generation != minfo->mi_generation)) {
-                spin_unlock(&lli->lli_lock);
-                GOTO(out_free, rc = -ESTALE);
-        } else {
-                sai = ll_sai_get(lli->lli_sai);
-                spin_unlock(&lli->lli_lock);
-        }
-
-        if (rc || dir == NULL)
-                GOTO(out, rc);
-
-        if (dentry->d_inode == NULL) {
-                /* lookup */
-                struct dentry    *save = dentry;
-                struct it_cb_data icbd = {
-                        .icbd_parent   = dir,
-                        .icbd_childp   = &dentry
-                };
-
-                rc = lookup_it_finish(req, DLM_REPLY_REC_OFF, it, &icbd);
-                if (!rc)
-                        /* 
-                         * Here dentry->d_inode might be NULL,
-                         * because the entry may have been removed before
-                         * we start doing stat ahead.
-                         */
-                        ll_lookup_finish_locks(it, dentry);
-
-                if (dentry != save)
-                        dput(save);
-        } else {
-                /* revalidate */
-                struct mds_body *body;
-
-                body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF,
-                                      sizeof(*body));
-                if (memcmp(&minfo->mi_data.fid2, &body->fid1,
-                           sizeof(body->fid1))) {
-                        ll_unhash_aliases(dentry->d_inode);
-                        GOTO(out, rc = -EAGAIN);
-                }
-
-                rc = revalidate_it_finish(req, DLM_REPLY_REC_OFF, it, dentry);
-                if (rc) {
-                        ll_unhash_aliases(dentry->d_inode);
-                        GOTO(out, rc);
-                }
-
-                spin_lock(&dcache_lock);
-                lock_dentry(dentry);
-                __d_drop(dentry);
-#ifdef DCACHE_LUSTRE_INVALID
-                dentry->d_flags &= ~DCACHE_LUSTRE_INVALID;
-#endif
-                unlock_dentry(dentry);
-                d_rehash_cond(dentry, 0);
-                spin_unlock(&dcache_lock);
-
-                ll_lookup_finish_locks(it, dentry);
-        }
-        EXIT;
-
-out:
-        if (sai != NULL) {
-                int first;
-
-                sai->sai_replied++;
-                spin_lock(&lli->lli_lock);
-                first = ll_sai_entry_set(sai,
-                                         (unsigned int)(long)minfo->mi_cbdata,
-                                         SA_ENTRY_STATED);
-                /*
-                 * wake up the "ls -l" process only when the first entry
-                 * returned.
-                 */
-                spin_unlock(&lli->lli_lock);
-                if (first == 1)
-                        cfs_waitq_signal(&sai->sai_waitq);
-                else if (first == 0)
-                        CDEBUG(D_READA, "can't find sai entry for dir "
-                               "%lu/%u generation %u index %d\n",
-                               dir->i_ino, dir->i_generation,
-                               minfo->mi_generation,
-                               (unsigned int)(long)minfo->mi_cbdata);
-
-                ll_sai_put(sai);
-        }
-out_free:
-        ll_intent_release(it);
-        OBD_FREE_PTR(minfo);
-
-        dput(dentry);
-        return rc;
-}
-
-static void sa_args_fini(struct md_enqueue_info *minfo,
-                         struct ldlm_enqueue_info *einfo)
-{
-        LASSERT(minfo && einfo);
-        OBD_FREE_PTR(minfo);
-        OBD_FREE_PTR(einfo);
-}
-
-static int sa_args_prep(struct inode *dir, struct dentry *dentry,
-                        struct md_enqueue_info **pmi,
-                        struct ldlm_enqueue_info **pei)
-{
-        struct ll_inode_info     *lli = ll_i2info(dir);
-        struct md_enqueue_info   *minfo;
-        struct ldlm_enqueue_info *einfo;
-
-        OBD_ALLOC_PTR(einfo);
-        if (einfo == NULL)
-                return -ENOMEM;
-
-        OBD_ALLOC_PTR(minfo);
-        if (minfo == NULL) {
-                OBD_FREE_PTR(einfo);
-                return -ENOMEM;
-        }
-
-        minfo->mi_exp = ll_i2mdcexp(dir);
-        minfo->mi_it.it_op = IT_GETATTR;
-        minfo->mi_dentry = dentry;
-        minfo->mi_cb = ll_statahead_interpret;
-        minfo->mi_generation = lli->lli_sai->sai_generation;
-        minfo->mi_cbdata = (void *)(long)lli->lli_sai->sai_index;
-
-        einfo->ei_type   = LDLM_IBITS;
-        einfo->ei_mode   = it_to_lock_mode(&minfo->mi_it);
-        einfo->ei_cb_bl  = ll_mdc_blocking_ast;
-        einfo->ei_cb_cp  = ldlm_completion_ast;
-        einfo->ei_cb_gl  = NULL;
-        einfo->ei_cbdata = NULL;
-
-        *pmi = minfo;
-        *pei = einfo;
-
-        return 0;
-}
-
-/* similar to ll_lookup_it(). */
-static int do_sa_lookup(struct inode *dir, struct dentry *dentry)
-{
-        struct md_enqueue_info   *minfo;
-        struct ldlm_enqueue_info *einfo;
-        int                       rc;                
-        ENTRY;
-
-        rc = sa_args_prep(dir, dentry, &minfo, &einfo);
-        if (rc)
-                RETURN(rc);
-
-        rc = ll_prepare_mdc_op_data(&minfo->mi_data, dir, NULL,
-                                    dentry->d_name.name, dentry->d_name.len, 0,
-                                    NULL);
-        if (rc == 0)
-                rc = mdc_intent_getattr_async(minfo->mi_exp, minfo, einfo);
-
-        if (rc)
-                sa_args_fini(minfo, einfo);
-
-        RETURN(rc);
-}
-
-/* 
- * similar to ll_revalidate_it().
- * return value:
- *  1      -- dentry valid
- *  0      -- will send stat-ahead request
- *  others -- prepare stat-ahead request failed
- */
-static int do_sa_revalidate(struct dentry *dentry)
-{
-        struct inode             *inode = dentry->d_inode;
-        struct ll_fid             fid;
-        struct lookup_intent      it = { .it_op = IT_GETATTR };
-        struct md_enqueue_info   *minfo;
-        struct ldlm_enqueue_info *einfo;
-        int rc;
-        ENTRY;
-
-        if (inode == NULL)
-                RETURN(1);
-
-        if (d_mountpoint(dentry))
-                RETURN(1);
-
-        if (dentry == dentry->d_sb->s_root)
-                RETURN(1);
-
-        ll_inode2fid(&fid, inode);
-
-        rc = mdc_revalidate_lock(ll_i2mdcexp(inode), &it, &fid);
-        if (rc == 1) {
-                ll_intent_release(&it);
-                RETURN(1);
-        }
-
-        rc = sa_args_prep(dentry->d_parent->d_inode, dentry, &minfo, &einfo);
-        if (rc)
-                RETURN(rc);
-
-        rc = ll_prepare_mdc_op_data(&minfo->mi_data, dentry->d_parent->d_inode,
-                                    inode, dentry->d_name.name,
-                                    dentry->d_name.len, 0, NULL);
-        if (rc == 0)
-                rc = mdc_intent_getattr_async(minfo->mi_exp, minfo, einfo);
-
-        if (rc)
-                sa_args_fini(minfo, einfo);
-
-        RETURN(rc);
-}
-
-static inline void ll_name2qstr(struct qstr *this, const char *name, int namelen)
-{
-        unsigned long hash = init_name_hash();
-        unsigned int  c;
-
-        this->name = name;
-        this->len  = namelen;
-        for (; namelen > 0; namelen--, name++) {
-                c = *(const unsigned char *)name;
-                hash = partial_name_hash(c, hash);
-        }
-        this->hash = end_name_hash(hash);
-}
-
-static int ll_statahead_one(struct dentry *parent, ext2_dirent *de)
-{
-        struct inode           *dir = parent->d_inode;
-        struct ll_inode_info   *lli = ll_i2info(dir);
-        struct qstr             name;
-        struct dentry          *dentry;
-        struct ll_sai_entry    *se;
-        int                     rc;
-        ENTRY;
-
-#ifdef DCACHE_LUSTRE_INVALID
-        if (parent->d_flags & DCACHE_LUSTRE_INVALID) {
-#else
-        if (d_unhashed(parent)) {
-#endif
-                CDEBUG(D_READA, "parent dentry@%p %.*s is "
-                       "invalid, skip statahead\n",
-                       parent, parent->d_name.len, parent->d_name.name);
-                RETURN(-EINVAL);
-        }
-
-        se = ll_sai_entry_get(lli->lli_sai, lli->lli_sai->sai_index,
-                              SA_ENTRY_UNSTATED);
-        if (IS_ERR(se))
-                RETURN(PTR_ERR(se));
-
-        ll_name2qstr(&name, de->name, de->name_len);
-        dentry = d_lookup(parent, &name);
-        if (!dentry) {
-                dentry = d_alloc(parent, &name);
-                if (dentry) {
-                        rc = do_sa_lookup(dir, dentry);
-                        if (rc)
-                                dput(dentry);
-                } else {
-                        GOTO(out, rc = -ENOMEM);
-                }
-        } else {
-                rc = do_sa_revalidate(dentry);
-                if (rc)
-                        dput(dentry);
-        }
-
-        EXIT;
-
-out:
-        if (rc) {
-                CDEBUG(D_READA, "set sai entry %p index %u stat %d rc %d\n",
-                       se, se->se_index, se->se_stat, rc);
-                se->se_stat = rc;
-                cfs_waitq_signal(&lli->lli_sai->sai_waitq);
-        } else {
-                lli->lli_sai->sai_sent++;
-        }
-
-        lli->lli_sai->sai_index++;
-        return rc;
-}
-                
-static inline int sa_check_stop(struct ll_statahead_info *sai)
-{
-        return !!(sai->sai_thread.t_flags & SVC_STOPPING);
-}
-
-static inline int sa_not_full(struct ll_statahead_info *sai)
-{
-        return sai->sai_index < sai->sai_hit + sai->sai_miss + sai->sai_max;
-}
-
-/* (1) hit ratio less than 80%
- * or
- * (2) consecutive miss more than 8
- */
-static inline int sa_low_hit(struct ll_statahead_info *sai)
-{
-        return ((sai->sai_hit < 4 * sai->sai_miss && sai->sai_hit > 7) ||
-                (sai->sai_consecutive_miss > 8));
-}
-
-struct ll_sa_thread_args {
-        struct dentry   *sta_parent;
-        pid_t            sta_pid;
-};
-
-static int ll_statahead_thread(void *arg)
-{
-        struct ll_sa_thread_args *sta = arg;
-        struct dentry            *parent = dget(sta->sta_parent);
-        struct inode             *dir = parent->d_inode;
-        struct ll_inode_info     *lli = ll_i2info(dir);
-        struct ll_sb_info        *sbi = ll_i2sbi(dir);
-        struct ll_statahead_info *sai = ll_sai_get(lli->lli_sai);
-        struct ptlrpc_thread     *thread = &sai->sai_thread;
-        unsigned long             index = 0;
-        int                       first = 0;
-        int                       rc = 0;
-        char                      name[16] = "";
-        ENTRY;
-
-        sbi->ll_sa_total++;
-        snprintf(name, 15, "ll_sa_%u", sta->sta_pid);
-        cfs_daemonize(name);
-        spin_lock(&lli->lli_lock);
-        thread->t_flags = SVC_RUNNING;
-        spin_unlock(&lli->lli_lock);
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-        CDEBUG(D_READA, "start doing statahead for %s\n", parent->d_name.name);
-
-        while (1) {
-                struct l_wait_info lwi = { 0 };
-                unsigned long npages;
-                char *kaddr, *limit;
-                ext2_dirent *de;
-                struct page *page;
-
-                npages = dir_pages(dir);
-                /* reach the end of dir */
-                if (index >= npages) {
-                        CDEBUG(D_READA, "reach end, index/npages %lu/%lu\n",
-                               index, npages);
-                        break;
-                }
-
-                page = ll_get_dir_page(dir, index);
-                if (IS_ERR(page)) {
-                        rc = PTR_ERR(page);
-                        CERROR("error reading dir %lu/%u page %lu/%u: rc %d\n",
-                               dir->i_ino, dir->i_generation, index,
-                               sai->sai_index, rc);
-                        break;
-                }
-
-                kaddr = page_address(page);
-                limit = kaddr + CFS_PAGE_SIZE - EXT2_DIR_REC_LEN(1);
-                de = (ext2_dirent *)kaddr;
-                if (!index) {
-                        de = ext2_next_entry(de); /* skip "." */
-                        de = ext2_next_entry(de); /* skip ".." */
-                }
-
-                for (; (char*)de <= limit; de = ext2_next_entry(de)) {
-                        if (!de->inode)
-                                continue;
-
-                        if (de->name[0] == '.' && !sai->sai_ls_all) {
-                                /* skip hidden files */
-                                sai->sai_skip_hidden++;
-                                continue;
-                        }
-
-                        /* don't stat-ahead first entry */
-                        if (unlikely(!first)) {
-                                first++;
-                                continue;
-                        }
-
-                        l_wait_event(thread->t_ctl_waitq,
-                                     sa_check_stop(sai) || sa_not_full(sai),
-                                     &lwi);
-
-                        if (unlikely(sa_check_stop(sai))) {
-                                ext2_put_page(page);
-                                GOTO(out, rc);
-                        }
-
-                        rc = ll_statahead_one(parent, de);
-                        if (rc < 0) {
-                                ext2_put_page(page);
-                                GOTO(out, rc);
-                        }
-                }
-                ext2_put_page(page);
-                index++;
-        }
-        EXIT;
-out:
-        spin_lock(&lli->lli_lock);
-        thread->t_flags = SVC_STOPPED;
-        spin_unlock(&lli->lli_lock);
-        cfs_waitq_signal(&sai->sai_waitq);
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-        ll_sai_put(sai);
-        dput(parent);
-        CDEBUG(D_READA, "statahead thread stopped, pid %d\n",
-               cfs_curproc_pid());
-        return rc;
-}
-
-/* called in ll_file_release() */
-void ll_stop_statahead(struct inode *inode, void *key)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ptlrpc_thread *thread;
-
-        spin_lock(&lli->lli_lock);
-        if (lli->lli_opendir_pid == 0 ||
-            unlikely(lli->lli_opendir_key != key)) {
-                spin_unlock(&lli->lli_lock);
-                return;
-        }
-
-        lli->lli_opendir_key = NULL;
-        lli->lli_opendir_pid = 0;
-
-        if (lli->lli_sai) {
-                struct l_wait_info lwi = { 0 };
-
-                thread = &lli->lli_sai->sai_thread;
-                if (!(thread->t_flags & SVC_STOPPED)) {
-                        thread->t_flags = SVC_STOPPING;
-                        spin_unlock(&lli->lli_lock);
-                        cfs_waitq_signal(&thread->t_ctl_waitq);
-
-                        CDEBUG(D_READA, "stopping statahead thread, pid %d\n",
-                               cfs_curproc_pid());
-                        l_wait_event(thread->t_ctl_waitq,
-                                     thread->t_flags & SVC_STOPPED,
-                                     &lwi);
-                } else {
-                        spin_unlock(&lli->lli_lock);
-                }
-
-                /*
-                 * Put the ref which was held when first statahead_enter.
-                 * It maybe not the last ref for some statahead requests
-                 * maybe inflight.
-                 */
-                ll_sai_put(lli->lli_sai);
-                return;
-        }
-        spin_unlock(&lli->lli_lock);
-}
-
-enum {
-        LS_NONE_FIRST_DE = 0,   /* not first dirent, or is "." */
-        LS_FIRST_DE,            /* the first non-hidden dirent */
-        LS_FIRST_DOT_DE         /* the first hidden dirent, that is ".xxx" */
-};
-
-static int is_first_dirent(struct inode *dir, struct dentry *dentry)
-{
-        struct qstr   *d_name = &dentry->d_name;
-        unsigned long  npages, index = 0;
-        struct page   *page;
-        ext2_dirent   *de;
-        char          *kaddr, *limit;
-        int            rc = LS_NONE_FIRST_DE, dot_de;
-        ENTRY;
-
-        while (1) {
-                npages = dir_pages(dir);
-                /* reach the end of dir */
-                if (index >= npages) {
-                        CDEBUG(D_READA, "reach end, index/npages %lu/%lu\n",
-                               index, npages);
-                        break;
-                }
-
-                page = ll_get_dir_page(dir, index);
-                if (IS_ERR(page)) {
-                        rc = PTR_ERR(page);
-                        CERROR("error reading dir %lu/%u page %lu: rc %d\n",
-                               dir->i_ino, dir->i_generation, index, rc);
-                        break;
-                }
-
-                kaddr = page_address(page);
-                limit = kaddr + CFS_PAGE_SIZE - EXT2_DIR_REC_LEN(1);
-                de = (ext2_dirent *)kaddr;
-                if (!index) {
-                        de = ext2_next_entry(de); /* skip "." */
-                        de = ext2_next_entry(de); /* skip ".." */
-                }
-
-                for (; (char*)de <= limit; de = ext2_next_entry(de)) {
-                        if (!de->inode)
-                                continue;
-
-                        if (de->name[0] == '.')
-                                dot_de = 1;
-                        else
-                                dot_de = 0;
-
-                        if (dot_de && d_name->name[0] != '.') {
-                                CDEBUG(D_READA, "%.*s skip hidden file %.*s\n",
-                                       d_name->len, d_name->name,
-                                       de->name_len, de->name);
-                                continue;
-                        }
-
-                        if (d_name->len == de->name_len &&
-                            !strncmp(d_name->name, de->name, d_name->len))
-                                rc = LS_FIRST_DE + dot_de;
-                        else
-                                rc = LS_NONE_FIRST_DE;
-                        ext2_put_page(page);
-                        RETURN(rc);
-                }
-                ext2_put_page(page);
-                index++;
-        }
-        RETURN(rc);
-}
-
-/* Start statahead thread if this is the first dir entry.
- * Otherwise if a thread is started already, wait it until it is ahead of me.
- * Return value: 
- *  0       -- miss
- *  1       -- hit
- *  -EEXIST -- stat ahead thread started, and this is the first dentry
- *  -EBADFD -- statahead thread exit and not dentry available
- *  others  -- error
- */
-int do_statahead_enter(struct inode *dir, struct dentry **dentryp, int lookup)
-{
-        struct ll_sb_info        *sbi = ll_i2sbi(dir);
-        struct ll_inode_info     *lli = ll_i2info(dir);
-        struct ll_statahead_info *sai = lli->lli_sai;
-        struct ll_sa_thread_args  sta;
-        struct l_wait_info        lwi = { 0 };
-        int                       rc;
-        ENTRY;
-
-        LASSERT(lli->lli_opendir_pid == cfs_curproc_pid());
-
-        if (sai) {
-                if (unlikely(sai->sai_thread.t_flags & SVC_STOPPED &&
-                             list_empty(&sai->sai_entries)))
-                        RETURN(-EBADFD);
-
-                if ((*dentryp)->d_name.name[0] == '.') {
-                        if (likely(sai->sai_ls_all ||
-                            sai->sai_miss_hidden >= sai->sai_skip_hidden)) {
-                                /*
-                                 * Hidden dentry is the first one, or statahead
-                                 * thread does not skip so many hidden dentries
-                                 * before "sai_ls_all" enabled as below.
-                                 */
-                        } else {
-                                if (!sai->sai_ls_all)
-                                        /*
-                                         * It maybe because hidden dentry is not
-                                         * the first one, "sai_ls_all" was not
-                                         * set, then "ls -al" missed. Enable
-                                         * "sai_ls_all" for such case.
-                                         */
-                                        sai->sai_ls_all = 1;
-
-                                /*
-                                 * Such "getattr" has been skipped before
-                                 * "sai_ls_all" enabled as above.
-                                 */
-                                sai->sai_miss_hidden++;
-                                RETURN(-ENOENT);
-                        }
-                }
-
-                if (ll_sai_entry_stated(sai)) {
-                        sbi->ll_sa_cached++;
-                } else {
-                        sbi->ll_sa_blocked++;
-                        /* thread started already, avoid double-stat */
-                        l_wait_event(sai->sai_waitq,
-                                     ll_sai_entry_stated(sai) ||
-                                     sai->sai_thread.t_flags & SVC_STOPPED,
-                                     &lwi);
-                }
-
-                if (lookup) {
-                        struct dentry *result;
-
-                        result = d_lookup((*dentryp)->d_parent,
-                                          &(*dentryp)->d_name);
-                        if (result) {
-                                LASSERT(result != *dentryp);
-                                dput(*dentryp);
-                                *dentryp = result;
-                                RETURN(1);
-                        }
-                }
-                /* do nothing for revalidate */
-                RETURN(0);
-        }
-
-         /* I am the "lli_opendir_pid" owner, only me can set "lli_sai". */ 
-        LASSERT(lli->lli_sai == NULL);
-
-        rc = is_first_dirent(dir, *dentryp);
-        if (rc == LS_NONE_FIRST_DE) {
-                /* It is not "ls -{a}l" operation, no need statahead for it */
-                spin_lock(&lli->lli_lock);
-                lli->lli_opendir_key = NULL;
-                lli->lli_opendir_pid = 0;
-                spin_unlock(&lli->lli_lock);
-                RETURN(-EBADF);
-        }
-
-        sai = ll_sai_alloc();
-        if (sai == NULL)
-                RETURN(-ENOMEM);
-        
-        sai->sai_inode  = igrab(dir);
-        sai->sai_ls_all = (rc == LS_FIRST_DOT_DE);
-
-        sta.sta_parent = (*dentryp)->d_parent;
-        sta.sta_pid    = cfs_curproc_pid();
-
-        lli->lli_sai = sai;
-        rc = cfs_kernel_thread(ll_statahead_thread, &sta, 0);
-        if (rc < 0) {
-                CERROR("can't start ll_sa thread, rc: %d\n", rc);
-                sai->sai_thread.t_flags = SVC_STOPPED;
-                ll_sai_put(sai);
-                LASSERT(lli->lli_sai == NULL);
-                RETURN(rc);
-        }
-
-        l_wait_event(sai->sai_thread.t_ctl_waitq, 
-                     sai->sai_thread.t_flags & (SVC_RUNNING | SVC_STOPPED),
-                     &lwi);
-
-        /*
-         * We don't stat-ahead for the first dirent since we are already in
-         * lookup, and -EEXIST also indicates that this is the first dirent.
-         */
-        RETURN(-EEXIST);
-}
-
-/* update hit/miss count */
-void ll_statahead_exit(struct dentry *dentry, int result)
-{
-        struct dentry        *parent = dentry->d_parent;
-        struct ll_inode_info *lli = ll_i2info(parent->d_inode);
-        struct ll_sb_info    *sbi = ll_i2sbi(parent->d_inode);
-
-        if (lli->lli_opendir_pid != cfs_curproc_pid())
-                return;
-
-        if (lli->lli_sai) {
-                struct ll_statahead_info *sai = lli->lli_sai;
-
-                if (result == 1) {
-                        sbi->ll_sa_hit++;
-                        sai->sai_hit++;
-                        sai->sai_consecutive_miss = 0;
-                        sai->sai_max = min(2 * sai->sai_max, sbi->ll_sa_max);
-                } else {
-                        sbi->ll_sa_miss++;
-                        sai->sai_miss++;
-                        sai->sai_consecutive_miss++;
-                        if (sa_low_hit(sai)) {
-                                sbi->ll_sa_wrong++;
-                                CDEBUG(D_READA, "statahead for dir %.*s hit "
-                                       "ratio too low: hit/miss %u/%u, "
-                                       "sent/replied %u/%u. stopping statahead "
-                                       "thread: pid %d\n",
-                                       parent->d_name.len, parent->d_name.name,
-                                       sai->sai_hit, sai->sai_miss,
-                                       sai->sai_sent, sai->sai_replied,
-                                       cfs_curproc_pid());
-                                spin_lock(&lli->lli_lock);
-                                if (!(sai->sai_thread.t_flags & SVC_STOPPED))
-                                        sai->sai_thread.t_flags = SVC_STOPPING;
-                                spin_unlock(&lli->lli_lock);
-                        }
-                }
-                cfs_waitq_signal(&sai->sai_thread.t_ctl_waitq);
-                ll_sai_entry_put(sai);
-        }
-}
diff --git a/lustre/llite/super.c b/lustre/llite/super.c
deleted file mode 100644
index 3bb93581c26cbc0effc4d189052894e2637c15e7..0000000000000000000000000000000000000000
--- a/lustre/llite/super.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Client Super operations
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/random.h>
-#include <linux/version.h>
-#include <lustre_lite.h>
-#include <lustre_ha.h>
-#include <lustre_dlm.h>
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/random.h>
-#include <linux/cache_def.h>
-#include <lprocfs_status.h>
-#include "llite_internal.h"
-#include <lustre/lustre_user.h>
-
-extern struct address_space_operations ll_aops;
-extern struct address_space_operations ll_dir_aops;
-
-
-/* exported operations */
-struct super_operations lustre_super_operations =
-{
-        .read_inode2    = ll_read_inode2,
-        .clear_inode    = ll_clear_inode,
-        .put_super      = ll_put_super,
-        .statfs         = ll_statfs,
-        .umount_begin   = ll_umount_begin,
-        .fh_to_dentry   = ll_fh_to_dentry,
-        .dentry_to_fh   = ll_dentry_to_fh,
-        .remount_fs     = ll_remount_fs,
-};
-
-
-void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg));
-
-static int __init init_lustre_lite(void)
-{
-        int i, seed[2];
-        struct timeval tv;
-        lnet_process_id_t lnet_id;
-
-        printk(KERN_INFO "Lustre: Lustre Client File System; "
-               "info@clusterfs.com\n");
-        ll_file_data_slab = cfs_mem_cache_create("ll_file_data",
-                                                 sizeof(struct ll_file_data), 0,
-                                                 SLAB_HWCACHE_ALIGN);
-        if (ll_file_data_slab == NULL)
-                return -ENOMEM;
-
-        if (proc_lustre_root)
-                proc_lustre_fs_root = proc_mkdir("llite", proc_lustre_root);
-
-        ll_register_cache(&ll_cache_definition);
-
-        lustre_register_client_fill_super(ll_fill_super);
-        lustre_register_client_process_config(ll_process_config);
-
-        get_random_bytes(seed, sizeof(seed));
-
-        /* Nodes with small feet have little entropy
-         * the NID for this node gives the most entropy in the low bits */
-        for (i = 0; ; i++) {
-                if (LNetGetId(i, &lnet_id) == -ENOENT) {
-                        break;
-                }
-                if (LNET_NETTYP(LNET_NIDNET(lnet_id.nid)) != LOLND) {
-                        seed[0] ^= LNET_NIDADDR(lnet_id.nid);
-                }
-        }
-
-        do_gettimeofday(&tv);
-        ll_srand(tv.tv_sec ^ seed[0], tv.tv_usec ^ seed[1]);
-
-        return 0;
-}
-
-static void __exit exit_lustre_lite(void)
-{
-        int rc;
-
-        lustre_register_client_fill_super(NULL);
-        lustre_register_client_process_config(NULL);
-
-        ll_unregister_cache(&ll_cache_definition);
-
-        rc = cfs_mem_cache_destroy(ll_file_data_slab);
-        LASSERTF(rc == 0, "couldn't destroy ll_file_data slab\n");
-        if (ll_async_page_slab) {
-                rc = cfs_mem_cache_destroy(ll_async_page_slab);
-                LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n");
-        }
-
-        if (proc_lustre_fs_root)
-                lprocfs_remove(&proc_lustre_fs_root);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Lite Client File System");
-MODULE_LICENSE("GPL");
-
-module_init(init_lustre_lite);
-module_exit(exit_lustre_lite);
diff --git a/lustre/llite/super25.c b/lustre/llite/super25.c
deleted file mode 100644
index d7fc8356f30158374c265b42cd0575b23788e395..0000000000000000000000000000000000000000
--- a/lustre/llite/super25.c
+++ /dev/null
@@ -1,170 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light Super operations
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <linux/module.h>
-#include <linux/types.h>
-#include <linux/random.h>
-#include <linux/version.h>
-#include <lustre_lite.h>
-#include <lustre_ha.h>
-#include <lustre_dlm.h>
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <lprocfs_status.h>
-#include "llite_internal.h"
-
-static cfs_mem_cache_t *ll_inode_cachep;
-
-static struct inode *ll_alloc_inode(struct super_block *sb)
-{
-        struct ll_inode_info *lli;
-        ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_ALLOC_INODE, 1);
-        OBD_SLAB_ALLOC_PTR(lli, ll_inode_cachep);
-        if (lli == NULL)
-                return NULL;
-
-        inode_init_once(&lli->lli_vfs_inode);
-        ll_lli_init(lli);
-
-        return &lli->lli_vfs_inode;
-}
-
-static void ll_destroy_inode(struct inode *inode)
-{
-        struct ll_inode_info *ptr = ll_i2info(inode);
-        OBD_SLAB_FREE_PTR(ptr, ll_inode_cachep);
-}
-
-int ll_init_inodecache(void)
-{
-        ll_inode_cachep = cfs_mem_cache_create("lustre_inode_cache",
-                                               sizeof(struct ll_inode_info),
-                                               0, SLAB_HWCACHE_ALIGN);
-        if (ll_inode_cachep == NULL)
-                return -ENOMEM;
-        return 0;
-}
-
-void ll_destroy_inodecache(void)
-{
-        int rc;
-
-        rc = cfs_mem_cache_destroy(ll_inode_cachep);
-        LASSERTF(rc == 0, "ll_inode_cache: not all structures were freed\n");
-}
-
-/* exported operations */
-struct super_operations lustre_super_operations =
-{
-        .alloc_inode   = ll_alloc_inode,
-        .destroy_inode = ll_destroy_inode,
-        .clear_inode   = ll_clear_inode,
-        .put_super     = ll_put_super,
-        .statfs        = ll_statfs,
-        .umount_begin  = ll_umount_begin,
-        .remount_fs    = ll_remount_fs,
-};
-
-
-void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg));
-
-static int __init init_lustre_lite(void)
-{
-        int i, rc, seed[2];
-        struct timeval tv;
-        lnet_process_id_t lnet_id;
-
-        printk(KERN_INFO "Lustre: Lustre Client File System; "
-               "info@clusterfs.com\n");
-        rc = ll_init_inodecache();
-        if (rc)
-                return -ENOMEM;
-        ll_file_data_slab = cfs_mem_cache_create("ll_file_data",
-                                                 sizeof(struct ll_file_data), 0,
-                                                 SLAB_HWCACHE_ALIGN);
-        if (ll_file_data_slab == NULL) {
-                ll_destroy_inodecache();
-                return -ENOMEM;
-        }
-
-        proc_lustre_fs_root = proc_lustre_root ?
-                              proc_mkdir("llite", proc_lustre_root) : NULL;
-
-        ll_register_cache(&ll_cache_definition);
-
-        lustre_register_client_fill_super(ll_fill_super);
-        lustre_register_kill_super_cb(ll_kill_super);
-
-        lustre_register_client_process_config(ll_process_config);
-
-        ll_get_random_bytes(seed, sizeof(seed));
-
-        /* Nodes with small feet have little entropy
-         * the NID for this node gives the most entropy in the low bits */
-        for (i=0; ; i++) {
-                if (LNetGetId(i, &lnet_id) == -ENOENT) {
-                        break;
-                }
-                if (LNET_NETTYP(LNET_NIDNET(lnet_id.nid)) != LOLND) {
-                        seed[0] ^= LNET_NIDADDR(lnet_id.nid);
-                }
-        }
-
-        do_gettimeofday(&tv);
-        ll_srand(tv.tv_sec ^ seed[0], tv.tv_usec ^ seed[1]);
-
-        return rc;
-}
-
-static void __exit exit_lustre_lite(void)
-{
-        int rc;
-
-        lustre_register_client_fill_super(NULL);
-        lustre_register_kill_super_cb(NULL);
-
-        lustre_register_client_process_config(NULL);
-
-        ll_unregister_cache(&ll_cache_definition);
-
-        ll_destroy_inodecache();
-        rc = cfs_mem_cache_destroy(ll_file_data_slab);
-        LASSERTF(rc == 0, "couldn't destroy ll_file_data slab\n");
-        
-        if (ll_async_page_slab) {
-                rc = cfs_mem_cache_destroy(ll_async_page_slab);
-                LASSERTF(rc == 0, "couldn't destroy ll_async_page slab\n");
-        }
-
-        if (proc_lustre_fs_root)
-                lprocfs_remove(&proc_lustre_fs_root);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Lite Client File System");
-MODULE_LICENSE("GPL");
-
-module_init(init_lustre_lite);
-module_exit(exit_lustre_lite);
diff --git a/lustre/llite/symlink.c b/lustre/llite/symlink.c
deleted file mode 100644
index 21de06bd076e06a6fbb46615b620308243d7e08a..0000000000000000000000000000000000000000
--- a/lustre/llite/symlink.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/fs.h>
-#include <linux/mm.h>
-#include <linux/stat.h>
-#include <linux/smp_lock.h>
-#include <linux/version.h>
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <lustre_lite.h>
-#include "llite_internal.h"
-
-static int ll_readlink_internal(struct inode *inode,
-                                struct ptlrpc_request **request, char **symname)
-{
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ll_fid fid;
-        struct mds_body *body;
-        int rc, symlen = i_size_read(inode) + 1;
-        ENTRY;
-
-        *request = NULL;
-
-        if (lli->lli_symlink_name) {
-                *symname = lli->lli_symlink_name;
-                CDEBUG(D_INODE, "using cached symlink %s\n", *symname);
-                RETURN(0);
-        }
-
-        ll_inode2fid(&fid, inode);
-        rc = mdc_getattr(sbi->ll_mdc_exp, &fid,
-                         OBD_MD_LINKNAME, symlen, request);
-        if (rc) {
-                if (rc != -ENOENT)
-                        CERROR("inode %lu: rc = %d\n", inode->i_ino, rc);
-                GOTO (failed, rc);
-        }
-
-        body = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF,
-                              sizeof(*body));
-        LASSERT(body != NULL);
-        LASSERT(lustre_rep_swabbed(*request, REPLY_REC_OFF));
-
-        if ((body->valid & OBD_MD_LINKNAME) == 0) {
-                CERROR("OBD_MD_LINKNAME not set on reply\n");
-                GOTO(failed, rc = -EPROTO);
-        }
-        
-        LASSERT(symlen != 0);
-        if (body->eadatasize != symlen) {
-                CERROR("inode %lu: symlink length %d not expected %d\n",
-                        inode->i_ino, body->eadatasize - 1, symlen - 1);
-                GOTO(failed, rc = -EPROTO);
-        }
-
-        *symname = lustre_msg_buf((*request)->rq_repmsg, REPLY_REC_OFF + 1,
-                                  symlen);
-        if (*symname == NULL ||
-            strnlen (*symname, symlen) != symlen - 1) {
-                /* not full/NULL terminated */
-                CERROR("inode %lu: symlink not NULL terminated string"
-                        "of length %d\n", inode->i_ino, symlen - 1);
-                GOTO(failed, rc = -EPROTO);
-        }
-
-        OBD_ALLOC(lli->lli_symlink_name, symlen);
-        /* do not return an error if we cannot cache the symlink locally */
-        if (lli->lli_symlink_name) {
-                memcpy(lli->lli_symlink_name, *symname, symlen);
-                ptlrpc_req_finished (*request);
-                *request = NULL;
-                *symname = lli->lli_symlink_name;
-        }
-
-        RETURN(0);
-
- failed:
-        ptlrpc_req_finished (*request);
-        RETURN (rc);
-}
-
-static int ll_readlink(struct dentry *dentry, char *buffer, int buflen)
-{
-        struct inode *inode = dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-        struct ptlrpc_request *request;
-        char *symname;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op\n");
-        /* on symlinks lli_open_sem protects lli_symlink_name allocation/data */
-        down(&lli->lli_size_sem);
-        rc = ll_readlink_internal(inode, &request, &symname);
-        if (rc)
-                GOTO(out, rc);
-
-        rc = vfs_readlink(dentry, buffer, buflen, symname);
-        ptlrpc_req_finished(request);
- out:
-        up(&lli->lli_size_sem);
-        RETURN(rc);
-}
-
-#ifdef HAVE_COOKIE_FOLLOW_LINK
-# define LL_FOLLOW_LINK_RETURN_TYPE void *
-#else
-# define LL_FOLLOW_LINK_RETURN_TYPE int
-#endif
-
-static LL_FOLLOW_LINK_RETURN_TYPE ll_follow_link(struct dentry *dentry, struct nameidata *nd)
-{
-        struct inode *inode = dentry->d_inode;
-        struct ll_inode_info *lli = ll_i2info(inode);
-#ifdef HAVE_VFS_INTENT_PATCHES
-        struct lookup_intent *it = ll_nd2it(nd);
-#endif
-        struct ptlrpc_request *request;
-        int rc;
-        char *symname;
-        ENTRY;
-
-#ifdef HAVE_VFS_INTENT_PATCHES
-        if (it != NULL) {
-                int op = it->it_op;
-                int mode = it->it_create_mode;
-
-                ll_intent_release(it);
-                it->it_op = op;
-                it->it_create_mode = mode;
-        }
-#endif
-
-        CDEBUG(D_VFSTRACE, "VFS Op\n");
-        down(&lli->lli_size_sem);
-        rc = ll_readlink_internal(inode, &request, &symname);
-        up(&lli->lli_size_sem);
-        if (rc) {
-                path_release(nd); /* Kernel assumes that ->follow_link()
-                                     releases nameidata on error */
-                GOTO(out, rc);
-        }
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8))
-        rc = vfs_follow_link(nd, symname);
-#else
-# ifdef HAVE_COOKIE_FOLLOW_LINK
-        nd_set_link(nd, symname);
-        /* @symname may contain a pointer to the request message buffer,
-           we delay request releasing until ll_put_link then. */
-        RETURN(request);
-# else
-        if (request != NULL) {
-                /* falling back to recursive follow link if the request
-                 * needs to be cleaned up still. */
-                rc = vfs_follow_link(nd, symname);
-                GOTO(out, rc);
-        }
-        nd_set_link(nd, symname);
-        RETURN(0);
-# endif
-#endif
-out:
-        ptlrpc_req_finished(request);
-#ifdef HAVE_COOKIE_FOLLOW_LINK
-        RETURN(ERR_PTR(rc));
-#else
-        RETURN(rc);
-#endif
-}
-
-#ifdef HAVE_COOKIE_FOLLOW_LINK
-static void ll_put_link(struct dentry *dentry, struct nameidata *nd, void *cookie)
-{
-        ptlrpc_req_finished(cookie);
-}
-#endif
-
-struct inode_operations ll_fast_symlink_inode_operations = {
-        .readlink       = ll_readlink,
-        .setattr        = ll_setattr,
-#ifdef HAVE_VFS_INTENT_PATCHES
-        .setattr_raw    = ll_setattr_raw,
-#endif
-        .follow_link    = ll_follow_link,
-#ifdef HAVE_COOKIE_FOLLOW_LINK
-        .put_link       = ll_put_link,
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        .revalidate_it  = ll_inode_revalidate_it,
-#else 
-        .getattr        = ll_getattr,
-#endif
-        .permission     = ll_inode_permission,
-        .setxattr       = ll_setxattr,
-        .getxattr       = ll_getxattr,
-        .listxattr      = ll_listxattr,
-        .removexattr    = ll_removexattr,
-};
diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c
deleted file mode 100644
index 2565fed619bb0887cc34a71fe3341a842774b68d..0000000000000000000000000000000000000000
--- a/lustre/llite/xattr.c
+++ /dev/null
@@ -1,411 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2004 - 2005 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <linux/fs.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/smp_lock.h>
-
-#define DEBUG_SUBSYSTEM S_LLITE
-
-#include <obd_support.h>
-#include <lustre_lite.h>
-#include <lustre_dlm.h>
-#include <linux/lustre_version.h>
-
-#ifndef POSIX_ACL_XATTR_ACCESS
-#ifndef XATTR_NAME_ACL_ACCESS
-#define XATTR_NAME_ACL_ACCESS   "system.posix_acl_access"
-#endif
-#define POSIX_ACL_XATTR_ACCESS XATTR_NAME_ACL_ACCESS
-#endif
-#ifndef POSIX_ACL_XATTR_DEFAULT
-#ifndef XATTR_NAME_ACL_DEFAULT
-#define XATTR_NAME_ACL_DEFAULT  "system.posix_acl_default"
-#endif
-#define POSIX_ACL_XATTR_DEFAULT XATTR_NAME_ACL_DEFAULT
-#endif
-
-#include "llite_internal.h"
-
-#define XATTR_USER_PREFIX       "user."
-#define XATTR_TRUSTED_PREFIX    "trusted."
-#define XATTR_SECURITY_PREFIX   "security."
-#define XATTR_LUSTRE_PREFIX     "lustre."
-
-#define XATTR_USER_T            (1)
-#define XATTR_TRUSTED_T         (2)
-#define XATTR_SECURITY_T        (3)
-#define XATTR_ACL_ACCESS_T      (4)
-#define XATTR_ACL_DEFAULT_T     (5)
-#define XATTR_LUSTRE_T          (6)
-#define XATTR_OTHER_T           (7)
-
-static
-int get_xattr_type(const char *name)
-{
-        if (!strcmp(name, POSIX_ACL_XATTR_ACCESS))
-                return XATTR_ACL_ACCESS_T;
-
-        if (!strcmp(name, POSIX_ACL_XATTR_DEFAULT))
-                return XATTR_ACL_DEFAULT_T;
-
-        if (!strncmp(name, XATTR_USER_PREFIX,
-                     sizeof(XATTR_USER_PREFIX) - 1))
-                return XATTR_USER_T;
-
-        if (!strncmp(name, XATTR_TRUSTED_PREFIX,
-                     sizeof(XATTR_TRUSTED_PREFIX) - 1))
-                return XATTR_TRUSTED_T;
-
-        if (!strncmp(name, XATTR_SECURITY_PREFIX,
-                     sizeof(XATTR_SECURITY_PREFIX) - 1))
-                return XATTR_SECURITY_T;
-
-        if (!strncmp(name, XATTR_LUSTRE_PREFIX,
-                     sizeof(XATTR_LUSTRE_PREFIX) - 1))
-                return XATTR_LUSTRE_T;
-
-        return XATTR_OTHER_T;
-}
-
-static
-int xattr_type_filter(struct ll_sb_info *sbi, int xattr_type)
-{
-        if ((xattr_type == XATTR_ACL_ACCESS_T ||
-             xattr_type == XATTR_ACL_DEFAULT_T) &&
-            !(sbi->ll_flags & LL_SBI_ACL))
-                return -EOPNOTSUPP;
-
-        if (xattr_type == XATTR_USER_T && !(sbi->ll_flags & LL_SBI_USER_XATTR))
-                return -EOPNOTSUPP;
-        if (xattr_type == XATTR_TRUSTED_T && !capable(CAP_SYS_ADMIN))
-                return -EPERM;
-        if (xattr_type == XATTR_OTHER_T)
-                return -EOPNOTSUPP;
-
-        return 0;
-}
-
-static
-int ll_setxattr_common(struct inode *inode, const char *name,
-                       const void *value, size_t size,
-                       int flags, __u64 valid)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ptlrpc_request *req;
-        struct ll_fid fid;
-        int xattr_type, rc;
-        ENTRY;
-
-
-        xattr_type = get_xattr_type(name);
-        rc = xattr_type_filter(sbi, xattr_type);
-        if (rc)
-                RETURN(rc);
-
-        /* b10667: ignore lustre special xattr for now */
-        if ((xattr_type == XATTR_TRUSTED_T && strcmp(name, "trusted.lov") == 0) ||
-            (xattr_type == XATTR_LUSTRE_T && strcmp(name, "lustre.lov") == 0))
-                RETURN(0);
-
-        ll_inode2fid(&fid, inode);
-        rc = mdc_setxattr(sbi->ll_mdc_exp, &fid, valid,
-                          name, value, size, 0, flags, &req);
-        if (rc) {
-                if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) {
-                        LCONSOLE_INFO("Disabling user_xattr feature because "
-                                      "it is not supported on the server\n"); 
-                        sbi->ll_flags &= ~LL_SBI_USER_XATTR;
-                }
-                RETURN(rc);
-        }
-
-        ptlrpc_req_finished(req);
-        RETURN(0);
-}
-
-int ll_setxattr(struct dentry *dentry, const char *name,
-                const void *value, size_t size, int flags)
-{
-        struct inode *inode = dentry->d_inode;
-
-        LASSERT(inode);
-        LASSERT(name);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n",
-               inode->i_ino, inode->i_generation, inode, name);
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_SETXATTR, 1);
-
-        if ((strncmp(name, XATTR_TRUSTED_PREFIX, 
-                    sizeof(XATTR_TRUSTED_PREFIX) - 1) == 0 &&
-             strcmp(name + sizeof(XATTR_TRUSTED_PREFIX) - 1, "lov") == 0) ||
-            (strncmp(name, XATTR_LUSTRE_PREFIX, 
-                    sizeof(XATTR_LUSTRE_PREFIX) - 1) == 0 &&
-             strcmp(name + sizeof(XATTR_LUSTRE_PREFIX) - 1, "lov") == 0)) {
-                struct lov_user_md *lump = (struct lov_user_md *)value;
-                int rc = 0;
-
-                if (S_ISREG(inode->i_mode)) {
-                        struct file f;
-                        int flags = FMODE_WRITE;
-                        
-                        f.f_dentry = dentry;
-                        rc = ll_lov_setstripe_ea_info(inode, &f, flags, 
-                                                      lump, sizeof(*lump));
-                        /* b10667: rc always be 0 here for now */
-                        rc = 0;
-                } else if (S_ISDIR(inode->i_mode)) {
-                        rc = ll_dir_setstripe(inode, lump, 0);
-                }
-                
-                return rc;
-        }
-
-        return ll_setxattr_common(inode, name, value, size, flags,
-                                  OBD_MD_FLXATTR);
-}
-
-int ll_removexattr(struct dentry *dentry, const char *name)
-{
-        struct inode *inode = dentry->d_inode;
-
-        LASSERT(inode);
-        LASSERT(name);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n",
-               inode->i_ino, inode->i_generation, inode, name);
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_REMOVEXATTR, 1);
-        return ll_setxattr_common(inode, name, NULL, 0, 0,
-                                  OBD_MD_FLXATTRRM);
-}
-
-static
-int ll_getxattr_common(struct inode *inode, const char *name,
-                       void *buffer, size_t size, __u64 valid)
-{
-        struct ll_sb_info *sbi = ll_i2sbi(inode);
-        struct ptlrpc_request *req = NULL;
-        struct mds_body *body;
-        struct ll_fid fid;
-        void *xdata;
-        int xattr_type, rc;
-        ENTRY;
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n",
-               inode->i_ino, inode->i_generation, inode);
-
-
-        /* listxattr have slightly different behavior from of ext3:
-         * without 'user_xattr' ext3 will list all xattr names but
-         * filtered out "^user..*"; we list them all for simplicity.
-         */
-        if (!name) {
-                xattr_type = XATTR_OTHER_T;
-                goto do_getxattr;
-        }
-
-        xattr_type = get_xattr_type(name);
-        rc = xattr_type_filter(sbi, xattr_type);
-        if (rc)
-                RETURN(rc);
-
-        /* posix acl is under protection of LOOKUP lock. when calling to this,
-         * we just have path resolution to the target inode, so we have great
-         * chance that cached ACL is uptodate.
-         */
-#ifdef CONFIG_FS_POSIX_ACL
-        if (xattr_type == XATTR_ACL_ACCESS_T) {
-                struct ll_inode_info *lli = ll_i2info(inode);
-                struct posix_acl *acl;
-
-                spin_lock(&lli->lli_lock);
-                acl = posix_acl_dup(lli->lli_posix_acl);
-                spin_unlock(&lli->lli_lock);
-
-                if (!acl)
-                        RETURN(-ENODATA);
-
-                rc = posix_acl_to_xattr(acl, buffer, size);
-                posix_acl_release(acl);
-                RETURN(rc);
-        }
-        if (xattr_type == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode))
-                RETURN(-ENODATA);
-#endif
-
-do_getxattr:
-        ll_inode2fid(&fid, inode);
-        rc = mdc_getxattr(sbi->ll_mdc_exp, &fid, valid, name, NULL, 0, size,
-                          &req);
-        if (rc) {
-                if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) {
-                        LCONSOLE_INFO("Disabling user_xattr feature because "
-                                      "it is not supported on the server\n"); 
-                        sbi->ll_flags &= ~LL_SBI_USER_XATTR;
-                }
-                RETURN(rc);
-        }
-
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*body));
-        LASSERT(body);
-        LASSERT(lustre_rep_swabbed(req, REPLY_REC_OFF));
-
-        /* only detect the xattr size */
-        if (size == 0)
-                GOTO(out, rc = body->eadatasize);
-
-        if (size < body->eadatasize) {
-                CERROR("server bug: replied size %u > %u\n",
-                       body->eadatasize, (int)size);
-                GOTO(out, rc = -ERANGE);
-        }
-
-        if (lustre_msg_bufcount(req->rq_repmsg) < 3) {
-                CERROR("reply bufcount %u\n",
-                       lustre_msg_bufcount(req->rq_repmsg));
-                GOTO(out, rc = -EFAULT);
-        }
-
-        /* do not need swab xattr data */
-        lustre_set_rep_swabbed(req, REPLY_REC_OFF + 1);
-        xdata = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1,
-                               body->eadatasize);
-        if (!xdata) {
-                CERROR("can't extract: %u : %u\n", body->eadatasize,
-                       lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1));
-                GOTO(out, rc = -EFAULT);
-        }
-
-        LASSERT(buffer);
-        memcpy(buffer, xdata, body->eadatasize);
-        rc = body->eadatasize;
-out:
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-ssize_t ll_getxattr(struct dentry *dentry, const char *name,
-                    void *buffer, size_t size)
-{
-        struct inode *inode = dentry->d_inode;
-
-        LASSERT(inode);
-        LASSERT(name);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p), xattr %s\n",
-               inode->i_ino, inode->i_generation, inode, name);
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_GETXATTR, 1);
-
-        if ((strncmp(name, XATTR_TRUSTED_PREFIX, 
-                    sizeof(XATTR_TRUSTED_PREFIX) - 1) == 0 &&
-             strcmp(name + sizeof(XATTR_TRUSTED_PREFIX) - 1, "lov") == 0) ||
-            (strncmp(name, XATTR_LUSTRE_PREFIX, 
-                    sizeof(XATTR_LUSTRE_PREFIX) - 1) == 0 &&
-             strcmp(name + sizeof(XATTR_LUSTRE_PREFIX) - 1, "lov") == 0)) {
-                struct lov_user_md *lump;
-                struct lov_mds_md *lmm = NULL;
-                struct ptlrpc_request *request = NULL;
-                int rc = 0, lmmsize;
-
-                if (S_ISREG(inode->i_mode)) {
-                        rc = ll_lov_getstripe_ea_info(dentry->d_parent->d_inode, 
-                                                      dentry->d_name.name, &lmm, 
-                                                      &lmmsize, &request);
-                } else if (S_ISDIR(inode->i_mode)) {
-                        rc = ll_dir_getstripe(inode, &lmm, &lmmsize, &request);
-                }
-
-                if (rc < 0)
-                       GOTO(out, rc);
-                if (size == 0)
-                       GOTO(out, rc = lmmsize);
-
-                if (size < lmmsize) {
-                        CERROR("server bug: replied size %u > %u\n",
-                               lmmsize, (int)size);
-                        GOTO(out, rc = -ERANGE);
-                }
-
-                lump = (struct lov_user_md *)buffer;
-                memcpy(lump, lmm, lmmsize);
-
-                rc = lmmsize;
-out:
-                ptlrpc_req_finished(request);
-                return(rc);
-        }
-
-        return ll_getxattr_common(inode, name, buffer, size, OBD_MD_FLXATTR);
-}
-
-ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size)
-{
-        struct inode *inode = dentry->d_inode;
-        int rc = 0, rc2 = 0;
-        struct lov_mds_md *lmm = NULL;
-        struct ptlrpc_request *request = NULL;
-        int lmmsize;
-
-        LASSERT(inode);
-
-        CDEBUG(D_VFSTRACE, "VFS Op:inode=%lu/%u(%p)\n",
-               inode->i_ino, inode->i_generation, inode);
-
-        ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1);
-
-        rc = ll_getxattr_common(inode, NULL, buffer, size, OBD_MD_FLXATTRLS);
-
-        if (S_ISREG(inode->i_mode)) {
-                struct ll_inode_info *lli = ll_i2info(inode);
-                struct lov_stripe_md *lsm = NULL;
-                lsm = lli->lli_smd;
-                if (lsm == NULL)
-                        rc2 = -1; 
-        } else if (S_ISDIR(inode->i_mode)) {
-                rc2 = ll_dir_getstripe(inode, &lmm, &lmmsize, &request);
-        }
-
-        if (rc2 < 0) {
-                GOTO(out, rc2 = 0);
-        } else {
-                const int prefix_len = sizeof(XATTR_LUSTRE_PREFIX) - 1;
-                const size_t name_len   = sizeof("lov") - 1;
-                const size_t total_len  = prefix_len + name_len + 1;
-
-                if (buffer && (rc + total_len) <= size) {
-                        buffer += rc;
-                        memcpy(buffer,XATTR_LUSTRE_PREFIX, prefix_len);
-                        memcpy(buffer+prefix_len, "lov", name_len);
-                        buffer[prefix_len + name_len] = '\0';
-                }
-                rc2 = total_len;
-        }
-out:
-        ptlrpc_req_finished(request);
-        rc = rc + rc2;
-        
-        return rc;
-}
-
diff --git a/lustre/lov/.cvsignore b/lustre/lov/.cvsignore
deleted file mode 100644
index b4ba3ac1ed084dee65b90cb4123e1a351b3167f7..0000000000000000000000000000000000000000
--- a/lustre/lov/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-.deps
-Makefile
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.*.o.d
-.tmp_versions
-.depend
diff --git a/lustre/lov/Info.plist b/lustre/lov/Info.plist
deleted file mode 100644
index 006f79441b18f3592d717fd4484f683abece1ed6..0000000000000000000000000000000000000000
--- a/lustre/lov/Info.plist
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>lov</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.clusterfs.lustre.lov</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>KEXT</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.1</string>
-        <key>OSBundleCompatibleVersion</key>
-        <string>1.0.0</string>
-	<key>OSBundleLibraries</key>
-	<dict>
-		<key>com.apple.kpi.bsd</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.libkern</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.mach</key>
-		<string>8.0.0b1</string>
-		<key>com.clusterfs.lustre.libcfs</key>
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.lvfs</key>
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.obdclass</key>
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.ptlrpc</key>
-		<string>1.0.0</string>
-	</dict>
-</dict>
-</plist>
diff --git a/lustre/lov/Makefile.in b/lustre/lov/Makefile.in
deleted file mode 100644
index f714192216d8a013cf0f8ba927fdfcfefeb53fb4..0000000000000000000000000000000000000000
--- a/lustre/lov/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := lov
-lov-objs := lov_log.o lov_obd.o lov_pack.o lproc_lov.o lov_offset.o lov_merge.o lov_request.o lov_qos.o lov_ea.o
-
-@INCLUDE_RULES@
diff --git a/lustre/lov/autoMakefile.am b/lustre/lov/autoMakefile.am
deleted file mode 100644
index 583a42512efc63de7d39001993d54423295845ef..0000000000000000000000000000000000000000
--- a/lustre/lov/autoMakefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-# Copyright (C) 2002 Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if LIBLUSTRE
-noinst_LIBRARIES = liblov.a
-liblov_a_SOURCES = lov_log.c lov_obd.c lov_pack.c lov_request.c lov_offset.c lov_qos.c lov_merge.c lov_ea.c lov_internal.h
-liblov_a_CPPFLAGS = $(LLCPPFLAGS)
-liblov_a_CFLAGS = $(LLCFLAGS)
-endif
-
-if MODULES
-if LINUX
-modulefs_DATA = lov$(KMODEXT)
-endif
-
-if DARWIN
-macos_PROGRAMS := lov
-
-lov_SOURCES :=          \
-        lov_log.c       \
-        lov_obd.c       \
-        lov_pack.c      \
-        lov_request.c   \
-        lov_merge.c     \
-        lov_qos.c       \
-        lov_offset.c    \
-        lov_internal.h
-
-lov_CFLAGS := $(EXTRA_KCFLAGS)
-lov_LDFLAGS := $(EXTRA_KLDFLAGS)
-lov_LDADD := $(EXTRA_KLIBS)
-
-plist_DATA := Info.plist
-
-install_data_hook := fix-kext-ownership
-
-endif # DARWIN
-
-endif # MODULES
-
-install-data-hook: $(install_data_hook)
-
-DIST_SOURCES = $(lov-objs:.o=.c) lov_internal.h
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
diff --git a/lustre/lov/lov_ea.c b/lustre/lov/lov_ea.c
deleted file mode 100755
index d5d60d6a91ad38c31e89ad02c489a1ef1b0346d3..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_ea.c
+++ /dev/null
@@ -1,611 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *   Author: Wang Di <wangdi@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-
-#ifdef __KERNEL__
-#include <asm/div64.h>
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_log.h>
-
-#include "lov_internal.h"
-
-struct lovea_unpack_args {
-        struct lov_stripe_md *lsm;
-        int                   cursor;
-};
-
-static int lsm_lmm_verify_common(struct lov_mds_md *lmm, int lmm_bytes,
-                                 int stripe_count)
-{
-
-        if (stripe_count == 0 || stripe_count > LOV_V1_INSANE_STRIPE_COUNT) {
-                CERROR("bad stripe count %d\n", stripe_count);
-                lov_dump_lmm_v1(D_WARNING, lmm);
-                return -EINVAL;
-        }
-
-        if (lmm->lmm_object_id == 0) {
-                CERROR("zero object id\n");
-                lov_dump_lmm_v1(D_WARNING, lmm);
-                return -EINVAL;
-        }
-
-        if (lmm->lmm_pattern != cpu_to_le32(LOV_PATTERN_RAID0)) {
-                CERROR("bad striping pattern\n");
-                lov_dump_lmm_v1(D_WARNING, lmm);
-                return -EINVAL;
-        }
-
-        if (lmm->lmm_stripe_size == 0 ||
-            (stripe_count != -1 &&
-             (__u64)le32_to_cpu(lmm->lmm_stripe_size)*stripe_count >
-             0xffffffff)) {
-                CERROR("bad stripe size %u\n",
-                       le32_to_cpu(lmm->lmm_stripe_size));
-                lov_dump_lmm_v1(D_WARNING, lmm);
-                return -EINVAL;
-        }
-        return 0;
-}
-
-struct lov_stripe_md *lsm_alloc_plain(int stripe_count, int *size)
-{
-        struct lov_stripe_md *lsm;
-        int i, oinfo_ptrs_size;
-        struct lov_oinfo *loi;
-
-        LASSERT(stripe_count > 0);
-
-        oinfo_ptrs_size = sizeof(struct lov_oinfo *) * stripe_count;
-        *size = sizeof(struct lov_stripe_md) + oinfo_ptrs_size;
-
-        OBD_ALLOC(lsm, *size);
-        if (!lsm)
-                return NULL;;
-
-        for (i = 0; i < stripe_count; i++) {
-                OBD_SLAB_ALLOC(loi, lov_oinfo_slab, CFS_ALLOC_IO, sizeof(*loi));
-                if (loi == NULL)
-                        goto err;
-                lsm->lsm_oinfo[i] = loi;
-        }
-        lsm->lsm_stripe_count = stripe_count;
-        return lsm;
-
-err:
-        while (--i >= 0)
-                OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab, sizeof(*loi));
-        OBD_FREE(lsm, *size);
-        return NULL;
-}
-
-void lsm_free_plain(struct lov_stripe_md *lsm)
-{
-        int stripe_count = lsm->lsm_stripe_count;
-        int i;
-
-        for (i = 0; i < stripe_count; i++)
-                OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab,
-                              sizeof(struct lov_oinfo));
-        OBD_FREE(lsm, sizeof(struct lov_stripe_md) +
-                 stripe_count * sizeof(struct lov_oinfo *));
-}
-
-static void lsm_unpackmd_common(struct lov_stripe_md *lsm,
-                                struct lov_mds_md *lmm)
-{
-        lsm->lsm_object_id = le64_to_cpu(lmm->lmm_object_id);
-        lsm->lsm_object_gr = le64_to_cpu(lmm->lmm_object_gr);
-        lsm->lsm_stripe_size = le32_to_cpu(lmm->lmm_stripe_size);
-        lsm->lsm_pattern = le32_to_cpu(lmm->lmm_pattern);
-}
-
-static void
-lsm_stripe_by_index_plain(struct lov_stripe_md *lsm, int *stripeno,
-                           obd_off *lov_off, unsigned long *swidth)
-{
-        if (swidth)
-                *swidth = (ulong)lsm->lsm_stripe_size * lsm->lsm_stripe_count;
-}
-
-static void
-lsm_stripe_by_offset_plain(struct lov_stripe_md *lsm, int *stripeno,
-                           obd_off *lov_off, unsigned long *swidth)
-{
-        if (swidth)
-                *swidth = (ulong)lsm->lsm_stripe_size * lsm->lsm_stripe_count;
-}
-
-static obd_off
-lsm_stripe_offset_by_index_plain(struct lov_stripe_md *lsm,
-                                  int stripe_index)
-{
-        return 0;
-}
-
-static obd_off
-lsm_stripe_offset_by_offset_plain(struct lov_stripe_md *lsm,
-                                  obd_off lov_off)
-{
-        return 0;
-}
-
-static int
-lsm_stripe_index_by_offset_plain(struct lov_stripe_md *lsm,
-                                  obd_off lov_off)
-{
-        return 0;
-}
-
-static int lsm_revalidate_plain(struct lov_stripe_md *lsm,
-                                struct obd_device *obd)
-{
-        return 0;
-}
-
-static int lsm_destroy_plain(struct lov_stripe_md *lsm, struct obdo *oa,
-                             struct obd_export *md_exp)
-{
-        return 0;
-}
-
-static int lsm_lmm_verify_plain(struct lov_mds_md *lmm, int lmm_bytes,
-                             int *stripe_count)
-{
-        if (lmm_bytes < sizeof(*lmm)) {
-                CERROR("lov_mds_md too small: %d, need at least %d\n",
-                       lmm_bytes, (int)sizeof(*lmm));
-                return -EINVAL;
-        }
-
-        *stripe_count = le32_to_cpu(lmm->lmm_stripe_count);
-
-        if (lmm_bytes < lov_mds_md_v1_size(*stripe_count)) {
-                CERROR("LOV EA too small: %d, need %d\n",
-                       lmm_bytes, lov_mds_md_v1_size(*stripe_count));
-                lov_dump_lmm_v1(D_WARNING, lmm);
-                return -EINVAL;
-        }
-
-        return lsm_lmm_verify_common(lmm, lmm_bytes, *stripe_count);
-}
-
-int lsm_unpackmd_plain(struct lov_obd *lov, struct lov_stripe_md *lsm,
-                    struct lov_mds_md_v1 *lmm)
-{
-        struct lov_oinfo *loi;
-        int i;
-
-        lsm_unpackmd_common(lsm, lmm);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                /* XXX LOV STACKING call down to osc_unpackmd() */
-                loi = lsm->lsm_oinfo[i];
-                loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id);
-                loi->loi_gr = le64_to_cpu(lmm->lmm_objects[i].l_object_gr);
-                loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx);
-                loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen);
-                if (loi->loi_ost_idx >= lov->desc.ld_tgt_count) {
-                        CERROR("OST index %d more than OST count %d\n",
-                               loi->loi_ost_idx, lov->desc.ld_tgt_count);
-                        lov_dump_lmm_v1(D_WARNING, lmm);
-                        return -EINVAL;
-                }
-                if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                        CERROR("OST index %d missing\n", loi->loi_ost_idx);
-                        lov_dump_lmm_v1(D_WARNING, lmm);
-                        return -EINVAL;
-                }
-        }
-
-        return 0;
-}
-
-struct lsm_operations lsm_plain_ops = {
-        .lsm_free            = lsm_free_plain,
-        .lsm_destroy         = lsm_destroy_plain,
-        .lsm_stripe_by_index    = lsm_stripe_by_index_plain,
-        .lsm_stripe_by_offset   = lsm_stripe_by_offset_plain,
-        .lsm_revalidate         = lsm_revalidate_plain,
-        .lsm_stripe_offset_by_index  = lsm_stripe_offset_by_index_plain,
-        .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_plain,
-        .lsm_stripe_index_by_offset  = lsm_stripe_index_by_offset_plain,
-        .lsm_lmm_verify         = lsm_lmm_verify_plain,
-        .lsm_unpackmd           = lsm_unpackmd_plain,
-};
-
-struct lov_extent *lovea_off2le(struct lov_stripe_md *lsm, obd_off lov_off)
-{
-        struct lov_array_info *lai;
-        struct lov_extent *le;
-        int i = 0;
-
-        LASSERT(lsm->lsm_array != NULL);
-        lai = lsm->lsm_array;
-        LASSERT(lai->lai_ext_count > 1);
-
-        for (le = lai->lai_ext_array, i = 0;
-             i < lai->lai_ext_count && le->le_start + le->le_len <= lov_off
-             && le->le_len != -1;
-             i ++, le ++) {
-               ; /* empty loop */
-        }
-
-        CDEBUG(D_INFO, "off "LPU64" idx %d, ext "LPU64":"LPU64" idx %d sc %d\n",
-               lov_off, i, le->le_start, le->le_len, le->le_loi_idx,
-               le->le_stripe_count);
-
-        RETURN(le);
-}
-
-struct lov_extent *lovea_idx2le(struct lov_stripe_md *lsm, int stripe_no)
-{
-        struct lov_extent *le;
-        struct lov_array_info *lai;
-        int i, stripe_index;
-
-        LASSERT(lsm->lsm_array != NULL);
-        LASSERT(stripe_no >= 0 && stripe_no <= lsm->lsm_stripe_count);
-        lai = lsm->lsm_array;
-        LASSERT(lai->lai_ext_count > 1);
-
-        for (le = lai->lai_ext_array, i = 0, stripe_index = le->le_stripe_count;
-             i < lai->lai_ext_count && stripe_index <= stripe_no &&
-             le->le_len != -1; i ++, le ++,
-             stripe_index += le->le_stripe_count) {
-                ; /* empty loop */
-        }
-
-        CDEBUG(D_INFO, "stripe %d idx %d, ext "LPU64":"LPU64" idx %d sc %d\n",
-               stripe_no, i, le->le_start, le->le_len, le->le_loi_idx,
-               le->le_stripe_count);
-        RETURN(le);
-}
-
-static void lovea_free_array_info(struct lov_stripe_md *lsm)
-{
-        if (!lsm || !lsm->lsm_array)
-                return;
-
-        if (lsm->lsm_array->lai_ext_array)
-                OBD_FREE(lsm->lsm_array->lai_ext_array,
-                         lsm->lsm_array->lai_ext_count *
-                         sizeof(struct lov_extent));
-
-        OBD_FREE_PTR(lsm->lsm_array);
-}
-
-static void lsm_free_join(struct lov_stripe_md *lsm)
-{
-        lovea_free_array_info(lsm);
-        lsm_free_plain(lsm);
-}
-
-static void
-lsm_stripe_by_index_join(struct lov_stripe_md *lsm, int *stripeno,
-                           obd_off *lov_off, unsigned long *swidth)
-{
-        struct lov_extent *le;
-
-        LASSERT(stripeno != NULL);
-
-        le = lovea_idx2le(lsm, *stripeno);
-
-        LASSERT(le != NULL && le->le_stripe_count != 0);
-
-        *stripeno -= le->le_loi_idx;
-
-        if (swidth)
-                *swidth = (ulong)lsm->lsm_stripe_size * le->le_stripe_count;
-
-        if (lov_off) {
-                struct lov_extent *lov_le = lovea_off2le(lsm, *lov_off);
-                if (lov_le == le) {
-                        *lov_off = (*lov_off > le->le_start) ?
-                                   (*lov_off - le->le_start) : 0;
-                } else {
-                        *lov_off = (*lov_off > le->le_start) ?
-                                   le->le_len : 0;
-                        LASSERT(*lov_off != -1);
-                }
-        }
-}
-
-static void
-lsm_stripe_by_offset_join(struct lov_stripe_md *lsm, int *stripeno,
-                           obd_off *lov_off, unsigned long *swidth)
-{
-        struct lov_extent *le;
-
-        LASSERT(lov_off != NULL);
-
-        le = lovea_off2le(lsm, *lov_off);
-
-        LASSERT(le != NULL && le->le_stripe_count != 0);
-
-        *lov_off = (*lov_off > le->le_start) ? (*lov_off - le->le_start) : 0;
-
-        if (stripeno)
-                *stripeno -= le->le_loi_idx;
-
-        if (swidth)
-                *swidth = (ulong)lsm->lsm_stripe_size * le->le_stripe_count;
-}
-
-static obd_off
-lsm_stripe_offset_by_index_join(struct lov_stripe_md *lsm,
-                                 int stripe_index)
-{
-        struct lov_extent *le;
-
-        le = lovea_idx2le(lsm, stripe_index);
-
-        return le ? le->le_start : 0;
-}
-
-static obd_off
-lsm_stripe_offset_by_offset_join(struct lov_stripe_md *lsm,
-                                 obd_off lov_off)
-{
-        struct lov_extent *le;
-
-        le = lovea_off2le(lsm, lov_off);
-
-        return le ? le->le_start : 0;
-}
-
-static int
-lsm_stripe_index_by_offset_join(struct lov_stripe_md *lsm,
-                                 obd_off lov_off)
-{
-        struct lov_extent *le = NULL;
-
-        le = lovea_off2le(lsm, lov_off);
-
-        return le ? le->le_loi_idx : 0;
-}
-
-static int lovea_unpack_array(struct llog_handle *handle,
-                              struct llog_rec_hdr *rec, void *data)
-{
-        struct lovea_unpack_args *args = (struct lovea_unpack_args *)data;
-        struct llog_array_rec *la_rec = (struct llog_array_rec*)rec;
-        struct mds_extent_desc *med = &la_rec->lmr_med;
-        struct lov_stripe_md *lsm = args->lsm;
-        int cursor = args->cursor++;
-        struct lov_mds_md *lmm;
-        struct lov_array_info *lai;
-        struct lov_oinfo * loi;
-        int i, loi_index;
-        ENTRY;
-
-        /* sanity check */
-        LASSERT(lsm->lsm_stripe_count != 0);
-        lmm = &med->med_lmm;
-        LASSERT(lsm->lsm_array != NULL);
-
-        lai = lsm->lsm_array;
-
-        if (cursor == 0) {
-               lai->lai_ext_array[cursor].le_loi_idx = 0;
-        } else {
-               int next_loi_index = lai->lai_ext_array[cursor - 1].le_loi_idx +
-                                 lai->lai_ext_array[cursor - 1].le_stripe_count;
-               lai->lai_ext_array[cursor].le_loi_idx = next_loi_index;
-        }
-        /* insert extent desc into lsm extent array  */
-        lai->lai_ext_array[cursor].le_start = le64_to_cpu(med->med_start);
-        lai->lai_ext_array[cursor].le_len   = le64_to_cpu(med->med_len);
-        lai->lai_ext_array[cursor].le_stripe_count = lmm->lmm_stripe_count;
-
-        /* unpack extent's lmm to lov_oinfo array */
-        loi_index = lai->lai_ext_array[cursor].le_loi_idx;
-        CDEBUG(D_INFO, "lovea upackmd cursor %d, loi_index %d extent "
-                        LPU64":"LPU64"\n", cursor, loi_index, med->med_start,
-                        med->med_len);
-
-        for (i = 0; i < le32_to_cpu(lmm->lmm_stripe_count); i ++, loi_index++) {
-                /* XXX LOV STACKING call down to osc_unpackmd() */
-                loi = lsm->lsm_oinfo[loi_index];
-                loi->loi_id = le64_to_cpu(lmm->lmm_objects[i].l_object_id);
-                loi->loi_gr = le64_to_cpu(lmm->lmm_objects[i].l_object_gr);
-                loi->loi_ost_idx = le32_to_cpu(lmm->lmm_objects[i].l_ost_idx);
-                loi->loi_ost_gen = le32_to_cpu(lmm->lmm_objects[i].l_ost_gen);
-        }
-
-        RETURN(0);
-}
-
-static int lsm_revalidate_join(struct lov_stripe_md *lsm,
-                               struct obd_device *obd)
-{
-        struct llog_handle *llh;
-        struct llog_ctxt *ctxt;
-        struct lovea_unpack_args args;
-        int rc, rc2;
-        ENTRY;
-
-        LASSERT(lsm->lsm_array != NULL);
-
-        /*Revalidate lsm might be called from client or MDS server.
-         *So the ctxt might be in different position
-         */
-        ctxt = llog_get_context(obd, LLOG_LOVEA_REPL_CTXT);
-        if (!ctxt)
-                ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT);
-
-        LASSERT(ctxt);
-
-        if (lsm->lsm_array && lsm->lsm_array->lai_ext_array)
-                GOTO(release_ctxt, rc = 0);
-
-        CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n",
-               lsm->lsm_array->lai_array_id.lgl_oid,
-               lsm->lsm_array->lai_array_id.lgl_ogr);
-        OBD_ALLOC(lsm->lsm_array->lai_ext_array,lsm->lsm_array->lai_ext_count *
-                                                sizeof (struct lov_extent));
-        if (!lsm->lsm_array->lai_ext_array)
-                GOTO(release_ctxt, rc = -ENOMEM);        
-
-        CDEBUG(D_INFO, "get lsm logid: "LPU64":"LPU64"\n",
-               lsm->lsm_array->lai_array_id.lgl_oid,
-               lsm->lsm_array->lai_array_id.lgl_ogr);
-
-        rc = llog_create(ctxt, &llh, &lsm->lsm_array->lai_array_id, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        args.lsm = lsm;
-        args.cursor = 0;
-        rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc == 0)
-                rc = llog_process(llh, lovea_unpack_array, &args, NULL);
-        rc2 = llog_close(llh);
-        if (rc == 0)
-                rc = rc2;
-out:
-        if (rc)
-                lovea_free_array_info(lsm);
-release_ctxt:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-int lsm_destroy_join(struct lov_stripe_md *lsm, struct obdo *oa, 
-                      struct obd_export *md_exp)
-{
-        struct llog_ctxt *ctxt;
-        struct llog_handle *llh;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(md_exp != NULL);
-        /*for those orphan inode, we should keep array id*/
-        if (!(oa->o_valid & OBD_MD_FLCOOKIE))
-                RETURN(rc);
-
-        ctxt = llog_get_context(md_exp->exp_obd, LLOG_LOVEA_REPL_CTXT);
-        if (!ctxt)
-                RETURN(-EINVAL);
-
-        LASSERT(lsm->lsm_array != NULL);
-        rc = llog_create(ctxt, &llh, &lsm->lsm_array->lai_array_id,
-                         NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc == 0) {
-                rc = llog_destroy(llh);
-        }
-        llog_free_handle(llh);
-out:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-static int lsm_lmm_verify_join(struct lov_mds_md *lmm, int lmm_bytes,
-                               int *stripe_count)
-{
-        struct lov_mds_md_join *lmmj = (struct lov_mds_md_join *)lmm;
-
-        if (lmm_bytes < sizeof(*lmmj)) {
-                CERROR("lov_mds_md too small: %d, need at least %d\n",
-                       lmm_bytes, (int)sizeof(*lmmj));
-                return -EINVAL;
-        }
-
-        if (lmmj->lmmj_array_id.lgl_oid == 0) {
-                CERROR("zero array object id\n");
-                return -EINVAL;
-        }
-
-        *stripe_count = le32_to_cpu(lmmj->lmmj_md.lmm_stripe_count);
-
-        return lsm_lmm_verify_common(&lmmj->lmmj_md, lmm_bytes, *stripe_count);
-}
-
-static int lovea_init_array_info(struct lov_stripe_md *lsm,
-                                 struct llog_logid *logid,
-                                 __u32 extent_count)
-{
-        struct lov_array_info *lai;
-        ENTRY;
-
-        OBD_ALLOC_PTR(lai);
-        if (!lai)
-                RETURN(-ENOMEM);
-
-        lai->lai_array_id = *logid;
-        lai->lai_ext_count = extent_count;
-        lsm->lsm_array = lai;
-        RETURN(0);
-}
-
-static int lsm_unpackmd_join(struct lov_obd *lov, struct lov_stripe_md *lsm,
-                      struct lov_mds_md *lmm)
-{
-        struct lov_mds_md_join *lmmj = (struct lov_mds_md_join*)lmm;
-        int    rc;
-        ENTRY;
-
-        lsm_unpackmd_common(lsm, &lmmj->lmmj_md);
-
-        rc = lovea_init_array_info(lsm, &lmmj->lmmj_array_id,
-                                   lmmj->lmmj_extent_count);
-        if (rc) {
-                CERROR("Init joined lsm id"LPU64" arrary error %d",
-                        lsm->lsm_object_id, rc);
-                GOTO(out, rc);
-        }
-out:
-        RETURN(rc);
-}
-
-struct lsm_operations lsm_join_ops = {
-        .lsm_free             = lsm_free_join,
-        .lsm_destroy          = lsm_destroy_join,
-        .lsm_stripe_by_index  = lsm_stripe_by_index_join,
-        .lsm_stripe_by_offset = lsm_stripe_by_offset_join,
-        .lsm_revalidate       = lsm_revalidate_join,
-        .lsm_stripe_offset_by_index  = lsm_stripe_offset_by_index_join,
-        .lsm_stripe_offset_by_offset = lsm_stripe_offset_by_offset_join,
-        .lsm_stripe_index_by_offset  = lsm_stripe_index_by_offset_join,
-        .lsm_lmm_verify         = lsm_lmm_verify_join,
-        .lsm_unpackmd           = lsm_unpackmd_join,
-};
-
-
diff --git a/lustre/lov/lov_internal.h b/lustre/lov/lov_internal.h
deleted file mode 100644
index 164ff8d24ffa2aee9e5ee2109ffee16989881392..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_internal.h
+++ /dev/null
@@ -1,274 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2003 Cluster File Systems, Inc.
- *
- * This code is issued under the GNU General Public License.
- * See the file COPYING in this distribution
- */
-
-#ifndef LOV_INTERNAL_H
-#define LOV_INTERNAL_H
-
-#include <lustre/lustre_user.h>
-
-struct lov_lock_handles {
-        struct portals_handle   llh_handle;
-        atomic_t                llh_refcount;
-        int                     llh_stripe_count;
-        struct lustre_handle    llh_handles[0];
-};
-
-struct lov_request {
-        struct obd_info          rq_oi;
-        struct lov_request_set  *rq_rqset;
-
-        struct list_head         rq_link;
-
-        int                      rq_idx;        /* index in lov->tgts array */
-        int                      rq_stripe;     /* stripe number */
-        int                      rq_complete;
-        int                      rq_rc;
-        int                      rq_buflen;     /* length of sub_md */
-
-        obd_count                rq_oabufs;
-        obd_count                rq_pgaidx;
-};
-
-struct lov_request_set {
-        struct ldlm_enqueue_info*set_ei;
-        struct obd_info         *set_oi;
-        atomic_t                 set_refcount;
-        struct obd_export       *set_exp;
-        /* XXX: There is @set_exp already, however obd_statfs gets obd_device
-           only. */
-        struct obd_device       *set_obd;
-        int                      set_count;
-        int                      set_completes;
-        int                      set_success;
-        struct llog_cookie      *set_cookies;
-        int                      set_cookie_sent;
-        struct obd_trans_info   *set_oti;
-        obd_count                set_oabufs;
-        struct brw_page         *set_pga;
-        struct lov_lock_handles *set_lockh;
-        struct list_head         set_list;
-};
-
-#define LOV_AP_MAGIC 8200
-
-struct lov_async_page {
-        int                             lap_magic;
-        int                             lap_stripe;
-        obd_off                         lap_sub_offset;
-        obd_id                          lap_loi_id;
-        void                            *lap_sub_cookie;
-        struct obd_async_page_ops       *lap_caller_ops;
-        void                            *lap_caller_data;
-};
-
-#define LAP_FROM_COOKIE(c)                                                     \
-        (LASSERT(((struct lov_async_page *)(c))->lap_magic == LOV_AP_MAGIC),   \
-         (struct lov_async_page *)(c))
-
-extern cfs_mem_cache_t *lov_oinfo_slab;
-
-static inline void lov_llh_addref(void *llhp)
-{
-        struct lov_lock_handles *llh = llhp;
-        atomic_inc(&llh->llh_refcount);
-        CDEBUG(D_INFO, "GETting llh %p : new refcount %d\n", llh,
-               atomic_read(&llh->llh_refcount));
-}
-
-static inline struct lov_lock_handles *lov_llh_new(struct lov_stripe_md *lsm)
-{
-        struct lov_lock_handles *llh;
-
-        OBD_ALLOC(llh, sizeof *llh +
-                  sizeof(*llh->llh_handles) * lsm->lsm_stripe_count);
-        if (llh == NULL)
-                return NULL;
-        atomic_set(&llh->llh_refcount, 2);
-        llh->llh_stripe_count = lsm->lsm_stripe_count;
-        CFS_INIT_LIST_HEAD(&llh->llh_handle.h_link);
-        class_handle_hash(&llh->llh_handle, lov_llh_addref);
-        return llh;
-}
-
-static inline struct lov_lock_handles *
-lov_handle2llh(struct lustre_handle *handle)
-{
-        LASSERT(handle != NULL);
-        return(class_handle2object(handle->cookie));
-}
-
-static inline void lov_llh_put(struct lov_lock_handles *llh)
-{
-        CDEBUG(D_INFO, "PUTting llh %p : new refcount %d\n", llh,
-               atomic_read(&llh->llh_refcount) - 1);
-        LASSERT(atomic_read(&llh->llh_refcount) > 0 &&
-                atomic_read(&llh->llh_refcount) < 0x5a5a);
-        if (atomic_dec_and_test(&llh->llh_refcount)) {
-                class_handle_unhash(&llh->llh_handle);
-                /* The structure may be held by other threads because RCU. -jxiong */
-                if (atomic_read(&llh->llh_refcount))
-                        return;
-
-                OBD_FREE_RCU(llh, sizeof *llh +
-                         sizeof(*llh->llh_handles) * llh->llh_stripe_count, &llh->llh_handle);
-        }
-}
-
-#define lov_uuid2str(lv, index) \
-        (char *)((lv)->lov_tgts[index]->ltd_uuid.uuid)
-
-/* lov_merge.c */
-void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_flag valid,
-                     struct lov_stripe_md *lsm, int stripeno, int *set);
-int lov_merge_lvb(struct obd_export *exp, struct lov_stripe_md *lsm,
-                  struct ost_lvb *lvb, int kms_only);
-int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
-                   obd_off size, int shrink);
-
-/* lov_offset.c */
-obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size,
-                         int stripeno);
-int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,
-                      int stripeno, obd_off *obd_off);
-obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size,
-                           int stripeno);
-int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno,
-                          obd_off start, obd_off end,
-                          obd_off *obd_start, obd_off *obd_end);
-int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off);
-
-/* lov_qos.c */
-#define LOV_USES_ASSIGNED_STRIPE        0
-#define LOV_USES_DEFAULT_STRIPE         1
-int qos_add_tgt(struct obd_device *obd, __u32 index);
-int qos_del_tgt(struct obd_device *obd, __u32 index);
-void qos_shrink_lsm(struct lov_request_set *set);
-int qos_prep_create(struct obd_export *exp, struct lov_request_set *set);
-void qos_update(struct lov_obd *lov);
-int qos_remedy_create(struct lov_request_set *set, struct lov_request *req);
-
-/* lov_request.c */
-void lov_set_add_req(struct lov_request *req, struct lov_request_set *set);
-void lov_update_set(struct lov_request_set *set,
-                    struct lov_request *req, int rc);
-int lov_update_common_set(struct lov_request_set *set,
-                          struct lov_request *req, int rc);
-int lov_prep_create_set(struct obd_export *exp, struct obd_info *oifo,
-                        struct lov_stripe_md **ea, struct obdo *src_oa,
-                        struct obd_trans_info *oti,
-                        struct lov_request_set **reqset);
-int lov_update_create_set(struct lov_request_set *set,
-                          struct lov_request *req, int rc);
-int lov_fini_create_set(struct lov_request_set *set, struct lov_stripe_md **ea);
-int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo,
-                     obd_count oa_bufs, struct brw_page *pga,
-                     struct obd_trans_info *oti,
-                     struct lov_request_set **reqset);
-int lov_fini_brw_set(struct lov_request_set *set);
-int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct lov_request_set **reqset);
-int lov_fini_getattr_set(struct lov_request_set *set);
-int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct obdo *src_oa, struct lov_stripe_md *lsm,
-                         struct obd_trans_info *oti,
-                         struct lov_request_set **reqset);
-int lov_update_destroy_set(struct lov_request_set *set,
-                           struct lov_request *req, int rc);
-int lov_fini_destroy_set(struct lov_request_set *set);
-int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct obd_trans_info *oti,
-                         struct lov_request_set **reqset);
-int lov_update_setattr_set(struct lov_request_set *set,
-                           struct lov_request *req, int rc);
-int lov_fini_setattr_set(struct lov_request_set *set);
-int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo,
-                       struct obd_trans_info *oti,
-                       struct lov_request_set **reqset);
-int lov_fini_punch_set(struct lov_request_set *set);
-int lov_prep_sync_set(struct obd_export *exp, struct obd_info *obd_info,
-                      struct obdo *src_oa,
-                      struct lov_stripe_md *lsm, obd_off start,
-                      obd_off end, struct lov_request_set **reqset);
-int lov_fini_sync_set(struct lov_request_set *set);
-int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct ldlm_enqueue_info *einfo,
-                         struct lov_request_set **reqset);
-int lov_fini_enqueue_set(struct lov_request_set *set, __u32 mode, int rc,
-                         struct ptlrpc_request_set *rqset);
-int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
-                       struct lov_stripe_md *lsm,
-                       ldlm_policy_data_t *policy, __u32 mode,
-                       struct lustre_handle *lockh,
-                       struct lov_request_set **reqset);
-int lov_update_match_set(struct lov_request_set *set, struct lov_request *req,
-                         int rc);
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags);
-int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
-                        struct lov_stripe_md *lsm,
-                        __u32 mode, struct lustre_handle *lockh,
-                        struct lov_request_set **reqset);
-int lov_fini_cancel_set(struct lov_request_set *set);
-int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
-                        struct lov_request_set **reqset);
-void lov_update_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                       struct obd_statfs *lov_sfs, int success);
-int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                    int success);
-int lov_fini_statfs_set(struct lov_request_set *set);
-
-/* lov_obd.c */
-void lov_fix_desc(struct lov_desc *desc);
-int lov_get_stripecnt(struct lov_obd *lov, __u32 stripe_count);
-void lov_getref(struct obd_device *obd);
-void lov_putref(struct obd_device *obd);
-
-/* lov_log.c */
-int lov_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                  int count, struct llog_catid *logid, struct obd_uuid *uuid);
-int lov_llog_finish(struct obd_device *obd, int count);
-
-/* lov_pack.c */
-int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmm,
-               struct lov_stripe_md *lsm);
-int lov_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
-                 struct lov_mds_md *lmm, int lmm_bytes);
-int lov_setstripe(struct obd_export *exp,
-                  struct lov_stripe_md **lsmp, struct lov_user_md *lump);
-int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,
-              struct lov_user_md *lump);
-int lov_getstripe(struct obd_export *exp,
-                  struct lov_stripe_md *lsm, struct lov_user_md *lump);
-int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count,
-                      int pattern, int magic);
-void lov_free_memmd(struct lov_stripe_md **lsmp);
-
-void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm);
-void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj);
-/* lov_ea.c */
-int lov_unpackmd_join(struct lov_obd *lov, struct lov_stripe_md *lsm,
-                      struct lov_mds_md *lmm);
-struct lov_stripe_md *lsm_alloc_plain(int stripe_count, int *size);
-void lsm_free_plain(struct lov_stripe_md *lsm);
-
-struct lov_extent *lovea_idx2le(struct lov_stripe_md *lsm, int stripe_no);
-struct lov_extent *lovea_off2le(struct lov_stripe_md *lsm, obd_off lov_off);
-int lovea_destroy_object(struct lov_obd *lov, struct lov_stripe_md *lsm,
-                         struct obdo *oa, void *data);
-/* lproc_lov.c */
-extern struct file_operations lov_proc_target_fops;
-#ifdef LPROCFS
-void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-#endif
diff --git a/lustre/lov/lov_log.c b/lustre/lov/lov_log.c
deleted file mode 100644
index 6e59ecfd23654f66acbecb471f03cd211f50f0af..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_log.c
+++ /dev/null
@@ -1,243 +0,0 @@
- /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- * Author: Phil Schwan <phil@clusterfs.com>
- *         Peter Braam <braam@clusterfs.com>
- *         Mike Shaver <shaver@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <lustre_lib.h>
-#include <lustre_net.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <lustre_mds.h>
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <obd_ost.h>
-#include <lprocfs_status.h>
-
-#include "lov_internal.h"
-
-/* Add log records for each OSC that this object is striped over, and return
- * cookies for each one.  We _would_ have nice abstraction here, except that
- * we need to keep cookies in stripe order, even if some are NULL, so that
- * the right cookies are passed back to the right OSTs at the client side.
- * Unset cookies should be all-zero (which will never occur naturally). */
-static int lov_llog_origin_add(struct llog_ctxt *ctxt,
-                        struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                        struct llog_cookie *logcookies, int numcookies)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct lov_obd *lov = &obd->u.lov;
-        int i, rc = 0;
-        ENTRY;
-
-        LASSERTF(logcookies && numcookies >= lsm->lsm_stripe_count, 
-                 "logcookies %p, numcookies %d lsm->lsm_stripe_count %d \n",
-                 logcookies, numcookies, lsm->lsm_stripe_count);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_oinfo *loi = lsm->lsm_oinfo[i];
-                struct obd_device *child = 
-                        lov->lov_tgts[loi->loi_ost_idx]->ltd_exp->exp_obd; 
-                struct llog_ctxt *cctxt = llog_get_context(child, ctxt->loc_idx);
-
-                /* fill mds unlink/setattr log record */
-                switch (rec->lrh_type) {
-                case MDS_UNLINK_REC: {
-                        struct llog_unlink_rec *lur = (struct llog_unlink_rec *)rec;
-                        lur->lur_oid = loi->loi_id;
-                        lur->lur_ogen = loi->loi_gr;
-                        break;
-                }
-                case MDS_SETATTR_REC: {
-                        struct llog_setattr_rec *lsr = (struct llog_setattr_rec *)rec;
-                        lsr->lsr_oid = loi->loi_id;
-                        lsr->lsr_ogen = loi->loi_gr;
-                        break;
-                }
-                default:
-                        break;
-                }
-
-                rc += llog_add(cctxt, rec, NULL, logcookies + rc,
-                                numcookies - rc);
-                llog_ctxt_put(cctxt);
-        }
-
-        RETURN(rc);
-}
-
-static int lov_llog_origin_connect(struct llog_ctxt *ctxt, int count,
-                                   struct llog_logid *logid,
-                                   struct llog_gen *gen,
-                                   struct obd_uuid *uuid)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct lov_obd *lov = &obd->u.lov;
-        int i, rc = 0, err = 0;
-        ENTRY;
-
-        lov_getref(obd);
-        for (i = 0; i < count; i++) {
-                struct obd_device *child;
-                struct llog_ctxt *cctxt;
-                
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
-                        continue;
-                if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid))
-                        continue;
-                CDEBUG(D_CONFIG, "connect %d/%d\n", i, count);
-                child = lov->lov_tgts[i]->ltd_exp->exp_obd;
-                cctxt = llog_get_context(child, ctxt->loc_idx);
-                rc = llog_connect(cctxt, 1, logid, gen, uuid);
-                llog_ctxt_put(cctxt);
- 
-                if (rc) {
-                        CERROR("error osc_llog_connect tgt %d (%d)\n", i, rc);
-                        if (!err) 
-                                err = rc;
-                }
-        }
-        lov_putref(obd);
-
-        RETURN(err);
-}
-
-/* the replicators commit callback */
-static int lov_llog_repl_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm,
-                          int count, struct llog_cookie *cookies, int flags)
-{
-        struct lov_obd *lov;
-        struct obd_device *obd = ctxt->loc_obd;
-        int rc = 0, i;
-        ENTRY;
-
-        LASSERT(lsm != NULL);
-        LASSERT(count == lsm->lsm_stripe_count);
-
-        lov = &obd->u.lov;
-        lov_getref(obd);
-        for (i = 0; i < count; i++, cookies++) {
-                struct lov_oinfo *loi = lsm->lsm_oinfo[i];
-                struct obd_device *child = 
-                        lov->lov_tgts[loi->loi_ost_idx]->ltd_exp->exp_obd;
-                struct llog_ctxt *cctxt = 
-                        llog_get_context(child, ctxt->loc_idx);
-                int err;
-
-                err = llog_cancel(cctxt, NULL, 1, cookies, flags);
-                llog_ctxt_put(cctxt);
-                if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CERROR("error: objid "LPX64" subobj "LPX64
-                               " on OST idx %d: rc = %d\n", lsm->lsm_object_id,
-                               loi->loi_id, loi->loi_ost_idx, err);
-                        if (!rc)
-                                rc = err;
-                }
-        }
-        lov_putref(obd);
-        RETURN(rc);
-}
-
-static struct llog_operations lov_mds_ost_orig_logops = {
-        lop_add: lov_llog_origin_add,
-        lop_connect: lov_llog_origin_connect
-};
-
-static struct llog_operations lov_size_repl_logops = {
-        lop_cancel: lov_llog_repl_cancel
-};
-
-int lov_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                  int count, struct llog_catid *logid, struct obd_uuid *uuid)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct obd_device *child;
-        int i, rc = 0, err = 0;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_MDS_OST_ORIG_CTXT, tgt, 0, NULL,
-                        &lov_mds_ost_orig_logops);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL,
-                        &lov_size_repl_logops);
-        if (rc)
-                RETURN(rc);
-
-        lov_getref(obd);
-        /* count may not match lov->desc.ld_tgt_count during dynamic ost add */
-        for (i = 0; i < count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
-                        continue;
-                if (uuid && !obd_uuid_equals(uuid, &lov->lov_tgts[i]->ltd_uuid))
-                        continue;
-                CDEBUG(D_CONFIG, "init %d/%d\n", i, count);
-                LASSERT(lov->lov_tgts[i]->ltd_exp);
-                child = lov->lov_tgts[i]->ltd_exp->exp_obd;
-                rc = obd_llog_init(child, tgt, 1, logid + i, uuid);
-                if (rc) {
-                        CERROR("error osc_llog_init idx %d osc '%s' tgt '%s' "
-                               "(rc=%d)\n", i, child->obd_name, tgt->obd_name,
-                               rc);
-                        if (!err) 
-                                err = rc;
-                }
-        }
-        lov_putref(obd);
-        RETURN(err);
-}
-
-int lov_llog_finish(struct obd_device *obd, int count)
-{
-        struct llog_ctxt *ctxt;
-        int rc = 0, rc2 = 0;
-        ENTRY;
-
-        /* cleanup our llogs only if the ctxts have been setup
-         * (client lov doesn't setup, mds lov does). */
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
-        if (ctxt)
-                rc = llog_cleanup(ctxt);
-
-        ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT);
-        if (ctxt)
-                rc2 = llog_cleanup(ctxt);
-        if (!rc)
-                rc = rc2;
-
-        /* lov->tgt llogs are cleaned during osc_cleanup. */
-        RETURN(rc);
-}
diff --git a/lustre/lov/lov_merge.c b/lustre/lov/lov_merge.c
deleted file mode 100644
index 45544c94f9f0e40a36b843c7129515a2c44ded3a..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_merge.c
+++ /dev/null
@@ -1,179 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-
-#include "lov_internal.h"
-
-/* Merge the lock value block(&lvb) attributes from each of the stripes in a
- * file into a single lvb. It is expected that the caller initializes the
- * current atime, mtime, ctime to avoid regressing a more uptodate time on
- * the local client.
- *
- * If @kms_only is set then we do not consider the recently seen size (rss)
- * when updating the known minimum size (kms).  Even when merging RSS, we will
- * take the KMS value if it's larger.  This prevents getattr from stomping on
- * dirty cached pages which extend the file size. */
-int lov_merge_lvb(struct obd_export *exp, struct lov_stripe_md *lsm,
-                  struct ost_lvb *lvb, int kms_only)
-{
-        struct lov_oinfo *loi;
-        __u64 size = 0;
-        __u64 blocks = 0;
-        __u64 current_mtime = lvb->lvb_mtime;
-        __u64 current_atime = lvb->lvb_atime;
-        __u64 current_ctime = lvb->lvb_ctime;
-        int i;
-        int rc = 0;
-
-        LASSERT_SPIN_LOCKED(&lsm->lsm_lock);
-#ifdef __KERNEL__
-        LASSERT(lsm->lsm_lock_owner == cfs_current());
-#endif
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                obd_size lov_size, tmpsize;
-
-                loi = lsm->lsm_oinfo[i];
-                if (OST_LVB_IS_ERR(loi->loi_lvb.lvb_blocks)) {
-                        rc = OST_LVB_GET_ERR(loi->loi_lvb.lvb_blocks);
-                        continue;
-                }
-
-                tmpsize = loi->loi_kms;
-                if (kms_only == 0 && loi->loi_lvb.lvb_size > tmpsize)
-                        tmpsize = loi->loi_lvb.lvb_size;
-
-                lov_size = lov_stripe_size(lsm, tmpsize, i);
-                if (lov_size > size)
-                        size = lov_size;
-                /* merge blocks, mtime, atime */
-                blocks += loi->loi_lvb.lvb_blocks;
-                if (loi->loi_lvb.lvb_atime > current_atime)
-                        current_atime = loi->loi_lvb.lvb_atime;
-
-                /* mtime is always updated with ctime, but can be set in past.
-                   As write and utime(2) may happen within 1 second, and utime's
-                   mtime has a priority over write's one, leave mtime from mds 
-                   for the same ctimes. */
-                if (loi->loi_lvb.lvb_ctime > current_ctime) {
-                        current_ctime = loi->loi_lvb.lvb_ctime;
-                        current_mtime = loi->loi_lvb.lvb_mtime;
-                }
-        }
-
-        lvb->lvb_size = size;
-        lvb->lvb_blocks = blocks;
-        lvb->lvb_mtime = current_mtime;
-        lvb->lvb_atime = current_atime;
-        lvb->lvb_ctime = current_ctime;
-        RETURN(rc);
-}
-
-/* Must be called under the lov_stripe_lock() */
-int lov_adjust_kms(struct obd_export *exp, struct lov_stripe_md *lsm,
-                   obd_off size, int shrink)
-{
-        struct lov_oinfo *loi;
-        int stripe = 0;
-        __u64 kms;
-        ENTRY;
-
-        LASSERT_SPIN_LOCKED(&lsm->lsm_lock);
-#ifdef __KERNEL__
-        LASSERT(lsm->lsm_lock_owner == cfs_current());
-#endif
-
-        if (shrink) {
-                struct lov_oinfo *loi;
-                for (; stripe < lsm->lsm_stripe_count; stripe++) {
-                        loi = lsm->lsm_oinfo[stripe];
-                        kms = lov_size_to_stripe(lsm, size, stripe);
-                        CDEBUG(D_INODE,
-                               "stripe %d KMS %sing "LPU64"->"LPU64"\n",
-                               stripe, kms > loi->loi_kms ? "increas" :
-                               kms < loi->loi_kms ? "shrink" : "leav",
-                               loi->loi_kms, kms);
-                        loi->loi_kms = loi->loi_lvb.lvb_size = kms;
-                }
-                RETURN(0);
-        }
-
-        if (size > 0)
-                stripe = lov_stripe_number(lsm, size - 1);
-        kms = lov_size_to_stripe(lsm, size, stripe);
-        loi = lsm->lsm_oinfo[stripe];
-
-        CDEBUG(D_INODE, "stripe %d KMS %sincreasing "LPU64"->"LPU64"\n",
-               stripe, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms);
-        if (kms > loi->loi_kms)
-                loi->loi_kms = kms;
-
-        RETURN(0);
-}
-
-void lov_merge_attrs(struct obdo *tgt, struct obdo *src, obd_flag valid,
-                     struct lov_stripe_md *lsm, int stripeno, int *set)
-{
-        valid &= src->o_valid;
-
-        if (*set) {
-                if (valid & OBD_MD_FLSIZE) {
-                        /* this handles sparse files properly */
-                        obd_size lov_size;
-
-                        lov_size = lov_stripe_size(lsm, src->o_size, stripeno);
-                        if (lov_size > tgt->o_size)
-                                tgt->o_size = lov_size;
-                }
-                if (valid & OBD_MD_FLBLOCKS)
-                        tgt->o_blocks += src->o_blocks;
-                if (valid & OBD_MD_FLBLKSZ)
-                        tgt->o_blksize += src->o_blksize;
-                if (valid & OBD_MD_FLCTIME && tgt->o_ctime < src->o_ctime)
-                        tgt->o_ctime = src->o_ctime;
-                /* Only mtime from OSTs are merged here, as they cannot be set
-                   in past (only MDS's mtime can) do not look at ctime. */
-                if (valid & OBD_MD_FLMTIME && tgt->o_mtime < src->o_mtime)
-                        tgt->o_mtime = src->o_mtime;
-        } else {
-                memcpy(tgt, src, sizeof(*tgt));
-                tgt->o_id = lsm->lsm_object_id;
-                if (valid & OBD_MD_FLSIZE)
-                        tgt->o_size = lov_stripe_size(lsm,src->o_size,stripeno);
-                *set = 1;
-        }
-}
diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c
deleted file mode 100644
index 93787c4a72d2bd71213c316ac60f0e5565fc1bcf..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_obd.c
+++ /dev/null
@@ -1,2859 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002-2006 Cluster File Systems, Inc.
- * Author: Phil Schwan <phil@clusterfs.com>
- *         Peter Braam <braam@clusterfs.com>
- *         Mike Shaver <shaver@clusterfs.com>
- *         Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <lustre_lib.h>
-#include <lustre_net.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <lustre_mds.h>
-#include <lustre_debug.h>
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <obd_ost.h>
-#include <lprocfs_status.h>
-#include <lustre_param.h>
-#include <lustre_cache.h>
-
-#include "lov_internal.h"
-
-
-/* Keep a refcount of lov->tgt usage to prevent racing with addition/deletion.
-   Any function that expects lov_tgts to remain stationary must take a ref. */
-void lov_getref(struct obd_device *obd)
-{
-        struct lov_obd *lov = &obd->u.lov;
-
-        /* nobody gets through here until lov_putref is done */
-        mutex_down(&lov->lov_lock);
-        atomic_inc(&lov->lov_refcount);
-        mutex_up(&lov->lov_lock);
-        return;
-}
-
-static void __lov_del_obd(struct obd_device *obd, __u32 index);
-
-void lov_putref(struct obd_device *obd)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        mutex_down(&lov->lov_lock);
-        /* ok to dec to 0 more than once -- ltd_exp's will be null */
-        if (atomic_dec_and_test(&lov->lov_refcount) && lov->lov_death_row) {
-                int i;
-                CDEBUG(D_CONFIG, "destroying %d lov targets\n", 
-                       lov->lov_death_row);
-                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                        if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_reap)
-                                continue;
-                        /* Disconnect and delete from list */
-                        __lov_del_obd(obd, i);
-                        lov->lov_death_row--;
-                }
-        }
-        mutex_up(&lov->lov_lock);
-}
-
-static int lov_register_page_removal_cb(struct obd_export *exp,
-                                        obd_page_removal_cb_t func,
-                                        obd_pin_extent_cb pin_cb)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int i, rc = 0;
-
-        if (lov->lov_page_removal_cb && lov->lov_page_removal_cb != func)
-                return -EBUSY;
-
-        if (lov->lov_page_pin_cb && lov->lov_page_pin_cb != pin_cb)
-                return -EBUSY;
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp)
-                        continue;
-                rc |= obd_register_page_removal_cb(lov->lov_tgts[i]->ltd_exp,
-                                                   func, pin_cb);
-        }
-
-        lov->lov_page_removal_cb = func;
-        lov->lov_page_pin_cb = pin_cb;
-
-        return rc;
-}
-
-static int lov_unregister_page_removal_cb(struct obd_export *exp,
-                                        obd_page_removal_cb_t func)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int i, rc = 0;
-
-        if (lov->lov_page_removal_cb && lov->lov_page_removal_cb != func)
-                return -EINVAL;
-
-        lov->lov_page_removal_cb = NULL;
-        lov->lov_page_pin_cb = NULL;
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp)
-                        continue;
-                rc |= obd_unregister_page_removal_cb(lov->lov_tgts[i]->ltd_exp,
-                                                     func);
-        }
-
-        return rc;
-}
-
-static int lov_register_lock_cancel_cb(struct obd_export *exp,
-                                         obd_lock_cancel_cb func)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int i, rc = 0;
-
-        if (lov->lov_lock_cancel_cb && lov->lov_lock_cancel_cb != func)
-                return -EBUSY;
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp)
-                        continue;
-                rc |= obd_register_lock_cancel_cb(lov->lov_tgts[i]->ltd_exp,
-                                                  func);
-        }
-
-        lov->lov_lock_cancel_cb = func;
-
-        return rc;
-}
-
-static int lov_unregister_lock_cancel_cb(struct obd_export *exp,
-                                         obd_lock_cancel_cb func)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int i, rc = 0;
-
-        if (lov->lov_lock_cancel_cb && lov->lov_lock_cancel_cb != func)
-                return -EINVAL;
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp)
-                        continue;
-                rc |= obd_unregister_lock_cancel_cb(lov->lov_tgts[i]->ltd_exp,
-                                                    func);
-        }
-        lov->lov_lock_cancel_cb = NULL;
-        return rc;
-}
-
-#define MAX_STRING_SIZE 128
-static int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, 
-                           struct obd_connect_data *data)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct obd_uuid tgt_uuid;
-        struct obd_device *tgt_obd;
-        struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" };
-        struct lustre_handle conn = {0, };
-        struct obd_import *imp;
-
-#ifdef __KERNEL__
-        cfs_proc_dir_entry_t *lov_proc_dir;
-#endif
-        int rc;
-        ENTRY;
-
-        if (!lov->lov_tgts[index])
-                RETURN(-EINVAL);
-
-        tgt_uuid = lov->lov_tgts[index]->ltd_uuid;
-        tgt_obd = class_find_client_obd(&tgt_uuid, LUSTRE_OSC_NAME,
-                                        &obd->obd_uuid);
-
-        if (!tgt_obd) {
-                CERROR("Target %s not attached\n", obd_uuid2str(&tgt_uuid));
-                RETURN(-EINVAL);
-        }
-        
-        if (!tgt_obd->obd_set_up) {
-                CERROR("Target %s not set up\n", obd_uuid2str(&tgt_uuid));
-                RETURN(-EINVAL);
-        }
-
-        if (data && (data->ocd_connect_flags & OBD_CONNECT_INDEX))
-                data->ocd_index = index;
-
-        /*
-         * Divine LOV knows that OBDs under it are OSCs.
-         */
-        imp = tgt_obd->u.cli.cl_import;
-
-        if (activate) {
-                tgt_obd->obd_no_recov = 0;
-                /* FIXME this is probably supposed to be 
-                   ptlrpc_set_import_active.  Horrible naming. */
-                ptlrpc_activate_import(imp);
-        }
-
-        if (imp->imp_invalid) {
-                CERROR("not connecting OSC %s; administratively "
-                       "disabled\n", obd_uuid2str(&tgt_uuid));
-                rc = obd_register_observer(tgt_obd, obd);
-                if (rc) {
-                        CERROR("Target %s register_observer error %d; "
-                               "will not be able to reactivate\n",
-                               obd_uuid2str(&tgt_uuid), rc);
-                }
-                RETURN(0);
-        }
-
-        rc = obd_connect(&conn, tgt_obd, &lov_osc_uuid, data, NULL);
-        if (rc) {
-                CERROR("Target %s connect error %d\n",
-                       obd_uuid2str(&tgt_uuid), rc);
-                RETURN(rc);
-        }
-        lov->lov_tgts[index]->ltd_exp = class_conn2export(&conn);
-        if (!lov->lov_tgts[index]->ltd_exp) {
-                CERROR("Target %s: null export!\n", obd_uuid2str(&tgt_uuid));
-                RETURN(-ENODEV);
-        }
-
-        rc = obd_register_page_removal_cb(lov->lov_tgts[index]->ltd_exp,
-                                          lov->lov_page_removal_cb,
-                                          lov->lov_page_pin_cb);
-        if (rc) {
-                obd_disconnect(lov->lov_tgts[index]->ltd_exp);
-                lov->lov_tgts[index]->ltd_exp = NULL;
-                RETURN(rc);
-        }
-
-        rc = obd_register_lock_cancel_cb(lov->lov_tgts[index]->ltd_exp,
-                                         lov->lov_lock_cancel_cb);
-        if (rc) {
-                obd_unregister_page_removal_cb(lov->lov_tgts[index]->ltd_exp,
-                                               lov->lov_page_removal_cb);
-                obd_disconnect(lov->lov_tgts[index]->ltd_exp);
-                lov->lov_tgts[index]->ltd_exp = NULL;
-                RETURN(rc);
-        }
-
-        rc = obd_register_observer(tgt_obd, obd);
-        if (rc) {
-                CERROR("Target %s register_observer error %d\n",
-                       obd_uuid2str(&tgt_uuid), rc);
-                obd_unregister_lock_cancel_cb(lov->lov_tgts[index]->ltd_exp,
-                                              lov->lov_lock_cancel_cb);
-                obd_unregister_page_removal_cb(lov->lov_tgts[index]->ltd_exp,
-                                               lov->lov_page_removal_cb);
-                obd_disconnect(lov->lov_tgts[index]->ltd_exp);
-                lov->lov_tgts[index]->ltd_exp = NULL;
-                RETURN(rc);
-        }
-
-        lov->lov_tgts[index]->ltd_reap = 0;
-        if (activate) {
-                lov->lov_tgts[index]->ltd_active = 1;
-                lov->desc.ld_active_tgt_count++;
-                lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 0;
-        }
-        CDEBUG(D_CONFIG, "Connected tgt idx %d %s (%s) %sactive\n", index,
-               obd_uuid2str(&tgt_uuid), tgt_obd->obd_name, activate ? "":"in");
-
-#ifdef __KERNEL__
-        lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds");
-        if (lov_proc_dir) {
-                struct obd_device *osc_obd = class_conn2obd(&conn);
-                cfs_proc_dir_entry_t *osc_symlink;
-                char name[MAX_STRING_SIZE];
-
-                LASSERT(osc_obd != NULL);
-                LASSERT(osc_obd->obd_magic == OBD_DEVICE_MAGIC);
-                LASSERT(osc_obd->obd_type->typ_name != NULL);
-                snprintf(name, MAX_STRING_SIZE, "../../../%s/%s",
-                         osc_obd->obd_type->typ_name,
-                         osc_obd->obd_name);
-                osc_symlink = proc_symlink(osc_obd->obd_name, lov_proc_dir,
-                                           name);
-                if (osc_symlink == NULL) {
-                        CERROR("could not register LOV target "
-                               "/proc/fs/lustre/%s/%s/target_obds/%s.",
-                               obd->obd_type->typ_name, obd->obd_name,
-                               osc_obd->obd_name);
-                        lprocfs_remove(&lov_proc_dir);
-                }
-        }
-#endif
-
-        rc = qos_add_tgt(obd, index);
-        if (rc) 
-                CERROR("qos_add_tgt failed %d\n", rc);
-
-        RETURN(0);
-}
-
-static int lov_connect(struct lustre_handle *conn, struct obd_device *obd,
-                       struct obd_uuid *cluuid, struct obd_connect_data *data,
-                       void *localdata)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_tgt_desc *tgt;
-        int i, rc;
-        ENTRY;
-
-        CDEBUG(D_CONFIG, "connect #%d\n", lov->lov_connects);
-
-        rc = class_connect(conn, obd, cluuid);
-        if (rc)
-                RETURN(rc);
-
-        /* Why should there ever be more than 1 connect? */
-        lov->lov_connects++;
-        LASSERT(lov->lov_connects == 1);
-        
-        memset(&lov->lov_ocd, 0, sizeof(lov->lov_ocd));
-        if (data)
-                lov->lov_ocd = *data;
-
-        lov_getref(obd);
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                tgt = lov->lov_tgts[i];
-                if (!tgt || obd_uuid_empty(&tgt->ltd_uuid))
-                        continue;
-                /* Flags will be lowest common denominator */
-                rc = lov_connect_obd(obd, i, lov->lov_tgts[i]->ltd_activate,
-                                     &lov->lov_ocd);
-                if (rc) {
-                        CERROR("%s: lov connect tgt %d failed: %d\n", 
-                               obd->obd_name, i, rc);
-                        continue;
-                }
-        }
-        lov_putref(obd);
-        
-        RETURN(0);
-}
-
-static int lov_disconnect_obd(struct obd_device *obd, __u32 index)
-{
-        cfs_proc_dir_entry_t *lov_proc_dir;
-        struct lov_obd *lov = &obd->u.lov;
-        struct obd_device *osc_obd =
-                class_exp2obd(lov->lov_tgts[index]->ltd_exp);
-        int rc;
-
-        ENTRY;
-
-        CDEBUG(D_CONFIG, "%s: disconnecting target %s\n", 
-               obd->obd_name, osc_obd->obd_name);
-
-        obd_unregister_lock_cancel_cb(lov->lov_tgts[index]->ltd_exp,
-                                      lov->lov_lock_cancel_cb);
-        obd_unregister_page_removal_cb(lov->lov_tgts[index]->ltd_exp,
-                                       lov->lov_page_removal_cb);
-        if (lov->lov_tgts[index]->ltd_active) {
-                lov->lov_tgts[index]->ltd_active = 0;
-                lov->desc.ld_active_tgt_count--;
-                lov->lov_tgts[index]->ltd_exp->exp_obd->obd_inactive = 1;
-        }
-
-        lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds");
-        if (lov_proc_dir) {
-                cfs_proc_dir_entry_t *osc_symlink;
-
-                osc_symlink = lprocfs_srch(lov_proc_dir, osc_obd->obd_name);
-                if (osc_symlink) {
-                        lprocfs_remove(&osc_symlink);
-                } else {
-                        CERROR("/proc/fs/lustre/%s/%s/target_obds/%s missing.",
-                               obd->obd_type->typ_name, obd->obd_name,
-                               osc_obd->obd_name);
-                }
-        }
-
-        if (obd->obd_no_recov) {
-                /* Pass it on to our clients.
-                 * XXX This should be an argument to disconnect,
-                 * XXX not a back-door flag on the OBD.  Ah well.
-                 */
-                if (osc_obd)
-                        osc_obd->obd_no_recov = 1;
-        }
-
-        obd_register_observer(osc_obd, NULL);
-
-        rc = obd_disconnect(lov->lov_tgts[index]->ltd_exp);
-        if (rc) {
-                CERROR("Target %s disconnect error %d\n",
-                       lov_uuid2str(lov, index), rc);
-                rc = 0;
-        }
-
-        qos_del_tgt(obd, index);
-
-        lov->lov_tgts[index]->ltd_exp = NULL;
-        RETURN(0);
-}
-
-static int lov_del_target(struct obd_device *obd, __u32 index, 
-                          struct obd_uuid *uuidp, int gen);
-
-static int lov_disconnect(struct obd_export *exp)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        int i, rc;
-        ENTRY;
-
-        if (!lov->lov_tgts)
-                goto out;
-
-        /* Only disconnect the underlying layers on the final disconnect. */
-        lov->lov_connects--;
-        if (lov->lov_connects != 0) {
-                /* why should there be more than 1 connect? */
-                CERROR("disconnect #%d\n", lov->lov_connects);
-                goto out;
-        }
-
-        /* Let's hold another reference so lov_del_obd doesn't spin through
-           putref every time */
-        lov_getref(obd);
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (lov->lov_tgts[i] && lov->lov_tgts[i]->ltd_exp) {
-                        /* Disconnection is the last we know about an obd */
-                        lov_del_target(obd, i, 0, lov->lov_tgts[i]->ltd_gen);
-                }
-        }
-        lov_putref(obd);
-
-out:
-        rc = class_disconnect(exp); /* bz 9811 */
-        RETURN(rc);
-}
-
-/* Error codes:
- *
- *  -EINVAL  : UUID can't be found in the LOV's target list
- *  -ENOTCONN: The UUID is found, but the target connection is bad (!)
- *  -EBADF   : The UUID is found, but the OBD is the wrong type (!)
- */
-static int lov_set_osc_active(struct obd_device *obd, struct obd_uuid *uuid,
-                              int activate)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_tgt_desc *tgt;
-        int i, rc = 0;
-        ENTRY;
-
-        CDEBUG(D_INFO, "Searching in lov %p for uuid %s (activate=%d)\n",
-               lov, uuid->uuid, activate);
-
-        lov_getref(obd);
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                tgt = lov->lov_tgts[i];
-                if (!tgt || !tgt->ltd_exp)
-                        continue;
-
-                CDEBUG(D_INFO, "lov idx %d is %s conn "LPX64"\n",
-                       i, obd_uuid2str(&tgt->ltd_uuid),
-                       tgt->ltd_exp->exp_handle.h_cookie);
-                if (obd_uuid_equals(uuid, &tgt->ltd_uuid))
-                        break;
-        }
-
-        if (i == lov->desc.ld_tgt_count)
-                GOTO(out, rc = -EINVAL);
-
-        if (lov->lov_tgts[i]->ltd_active == activate) {
-                CDEBUG(D_INFO, "OSC %s already %sactive!\n", uuid->uuid,
-                       activate ? "" : "in");
-                GOTO(out, rc);
-        }
-
-        CDEBUG(D_CONFIG, "Marking OSC %s %sactive\n", obd_uuid2str(uuid),
-               activate ? "" : "in");
-
-        lov->lov_tgts[i]->ltd_active = activate;
-
-        if (activate) {
-                lov->desc.ld_active_tgt_count++;
-                lov->lov_tgts[i]->ltd_exp->exp_obd->obd_inactive = 0;
-        } else {
-                lov->desc.ld_active_tgt_count--;
-                lov->lov_tgts[i]->ltd_exp->exp_obd->obd_inactive = 1;
-        }
-        /* remove any old qos penalty */
-        lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0;
-
- out:
-        lov_putref(obd);
-        RETURN(rc);
-}
-
-static int lov_notify(struct obd_device *obd, struct obd_device *watched,
-                      enum obd_notify_event ev, void *data)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (ev == OBD_NOTIFY_ACTIVE || ev == OBD_NOTIFY_INACTIVE) {
-                struct obd_uuid *uuid;
-
-                LASSERT(watched);
-                
-                if (strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) {
-                        CERROR("unexpected notification of %s %s!\n",
-                               watched->obd_type->typ_name,
-                               watched->obd_name);
-                        RETURN(-EINVAL);
-                }
-                uuid = &watched->u.cli.cl_target_uuid;
-
-                /* Set OSC as active before notifying the observer, so the
-                 * observer can use the OSC normally.
-                 */
-                rc = lov_set_osc_active(obd, uuid, ev == OBD_NOTIFY_ACTIVE);
-                if (rc) {
-                        CERROR("%sactivation of %s failed: %d\n",
-                               (ev == OBD_NOTIFY_ACTIVE) ? "" : "de",
-                               obd_uuid2str(uuid), rc);
-                        RETURN(rc);
-                }
-        }
-
-        /* Pass the notification up the chain. */
-        if (watched) {
-                rc = obd_notify_observer(obd, watched, ev, data);
-        } else {
-                /* NULL watched means all osc's in the lov (only for syncs) */
-                struct lov_obd *lov = &obd->u.lov;
-                struct obd_device *tgt_obd;
-                int i;
-                lov_getref(obd);
-                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                        if (!lov->lov_tgts[i])
-                                continue;
-                        tgt_obd = class_exp2obd(lov->lov_tgts[i]->ltd_exp);
-                        rc = obd_notify_observer(obd, tgt_obd, ev, data);
-                        if (rc) {
-                                CERROR("%s: notify %s of %s failed %d\n",
-                                       obd->obd_name, 
-                                       obd->obd_observer->obd_name,
-                                       tgt_obd->obd_name, rc);
-                                break;
-                        }
-                }
-                lov_putref(obd);
-        }
-
-        RETURN(rc);
-}
-
-static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
-                          __u32 index, int gen, int active)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_tgt_desc *tgt;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_CONFIG, "uuid:%s idx:%d gen:%d active:%d\n",
-               uuidp->uuid, index, gen, active);
-
-        if (gen <= 0) {
-                CERROR("request to add OBD %s with invalid generation: %d\n",
-                       uuidp->uuid, gen);
-                RETURN(-EINVAL);
-        }
-
-        mutex_down(&lov->lov_lock);
-
-        if ((index < lov->lov_tgt_size) && (lov->lov_tgts[index] != NULL)) {
-                tgt = lov->lov_tgts[index];
-                CERROR("UUID %s already assigned at LOV target index %d\n",
-                       obd_uuid2str(&tgt->ltd_uuid), index);
-                mutex_up(&lov->lov_lock);
-                RETURN(-EEXIST);
-        }
-
-        if (index >= lov->lov_tgt_size) {
-                /* We need to reallocate the lov target array. */
-                struct lov_tgt_desc **newtgts, **old = NULL;
-                __u32 newsize, oldsize = 0;
-
-                newsize = max(lov->lov_tgt_size, (__u32)2);
-                while (newsize < index + 1) 
-                        newsize = newsize << 1;
-                OBD_ALLOC(newtgts, sizeof(*newtgts) * newsize);
-                if (newtgts == NULL) {
-                        mutex_up(&lov->lov_lock);
-                        RETURN(-ENOMEM);
-                }
-
-                if (lov->lov_tgt_size) {
-                        memcpy(newtgts, lov->lov_tgts, sizeof(*newtgts) * 
-                               lov->lov_tgt_size);
-                        old = lov->lov_tgts;
-                        oldsize = lov->lov_tgt_size;
-                }
-
-                lov->lov_tgts = newtgts;
-                lov->lov_tgt_size = newsize;
-#ifdef __KERNEL__
-                smp_rmb();
-#endif
-                if (old)
-                        OBD_FREE(old, sizeof(*old) * oldsize);
-
-                CDEBUG(D_CONFIG, "tgts: %p size: %d\n",
-                       lov->lov_tgts, lov->lov_tgt_size);
-        }
-
-
-        OBD_ALLOC_PTR(tgt);
-        if (!tgt) {
-                mutex_up(&lov->lov_lock);
-                RETURN(-ENOMEM);
-        }
-
-        memset(tgt, 0, sizeof(*tgt));
-        tgt->ltd_uuid = *uuidp;
-        /* XXX - add a sanity check on the generation number. */
-        tgt->ltd_gen = gen;
-        tgt->ltd_index = index;
-        tgt->ltd_activate = active;
-        lov->lov_tgts[index] = tgt;
-        if (index >= lov->desc.ld_tgt_count)
-                lov->desc.ld_tgt_count = index + 1;
-        mutex_up(&lov->lov_lock);
-
-        CDEBUG(D_CONFIG, "idx=%d ltd_gen=%d ld_tgt_count=%d\n",
-                index, tgt->ltd_gen, lov->desc.ld_tgt_count);
-        
-        if (lov->lov_connects == 0) { 
-                /* lov_connect hasn't been called yet. We'll do the
-                   lov_connect_obd on this target when that fn first runs,
-                   because we don't know the connect flags yet. */
-                RETURN(0);
-        }
-
-        lov_getref(obd);
-
-        rc = lov_connect_obd(obd, index, active, &lov->lov_ocd);
-        if (rc)
-                GOTO(out, rc);
-
-        rc = lov_notify(obd, tgt->ltd_exp->exp_obd, 
-                        active ? OBD_NOTIFY_ACTIVE : OBD_NOTIFY_INACTIVE,
-                        (void *)&index);
-
-out:
-        if (rc) {
-                CERROR("add failed (%d), deleting %s\n", rc, 
-                       obd_uuid2str(&tgt->ltd_uuid));
-                lov_del_target(obd, index, 0, 0);
-        }
-        lov_putref(obd);
-        RETURN(rc);
-}
-
-/* Schedule a target for deletion */
-static int lov_del_target(struct obd_device *obd, __u32 index, 
-                          struct obd_uuid *uuidp, int gen)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        int count = lov->desc.ld_tgt_count;
-        int rc = 0;
-        ENTRY;
-
-        if (index >= count) {
-                CERROR("LOV target index %d >= number of LOV OBDs %d.\n",
-                       index, count);
-                RETURN(-EINVAL);
-        }
-
-        lov_getref(obd);
-
-        if (!lov->lov_tgts[index]) {
-                CERROR("LOV target at index %d is not setup.\n", index);
-                GOTO(out, rc = -EINVAL);
-        }
-
-        if (uuidp && !obd_uuid_equals(uuidp, &lov->lov_tgts[index]->ltd_uuid)) {
-                CERROR("LOV target UUID %s at index %d doesn't match %s.\n",
-                       lov_uuid2str(lov, index), index,
-                       obd_uuid2str(uuidp));
-                GOTO(out, rc = -EINVAL);
-        }
-
-        CDEBUG(D_CONFIG, "uuid: %s idx: %d gen: %d exp: %p active: %d\n",
-               lov_uuid2str(lov, index), index,
-               lov->lov_tgts[index]->ltd_gen, lov->lov_tgts[index]->ltd_exp, 
-               lov->lov_tgts[index]->ltd_active);
-
-        lov->lov_tgts[index]->ltd_reap = 1;
-        lov->lov_death_row++;
-        /* we really delete it from lov_putref */
-out:
-        lov_putref(obd);
-
-        RETURN(rc);
-}
-
-/* We are holding lov_lock */
-static void __lov_del_obd(struct obd_device *obd, __u32 index)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct obd_device *osc_obd;
-        struct lov_tgt_desc *tgt = lov->lov_tgts[index];
-
-        LASSERT(tgt);
-        LASSERT(tgt->ltd_reap);
-
-        osc_obd = class_exp2obd(tgt->ltd_exp);
-
-        CDEBUG(D_CONFIG, "Removing tgt %s : %s\n",
-               lov_uuid2str(lov, index), 
-               osc_obd ? osc_obd->obd_name : "<no obd>");
-
-        if (tgt->ltd_exp)
-                lov_disconnect_obd(obd, index);
-
-        /* XXX - right now there is a dependency on ld_tgt_count being the
-         * maximum tgt index for computing the mds_max_easize. So we can't
-         * shrink it. */
-
-        lov->lov_tgts[index] = NULL;
-        OBD_FREE_PTR(tgt);        
-
-        /* Manual cleanup - no cleanup logs to clean up the osc's.  We must
-           do it ourselves. And we can't do it from lov_cleanup,
-           because we just lost our only reference to it. */
-        if (osc_obd) {
-                /* Use lov's force/fail flags. */
-                osc_obd->obd_force = obd->obd_force;
-                osc_obd->obd_fail = obd->obd_fail;
-                class_manual_cleanup(osc_obd);
-        }
-}
-
-void lov_fix_desc(struct lov_desc *desc)
-{
-        if (desc->ld_default_stripe_size < PTLRPC_MAX_BRW_SIZE) {
-                LCONSOLE_WARN("Increasing default stripe size to min %u\n",
-                              PTLRPC_MAX_BRW_SIZE);
-                desc->ld_default_stripe_size = PTLRPC_MAX_BRW_SIZE;
-        } else if (desc->ld_default_stripe_size & (LOV_MIN_STRIPE_SIZE - 1)) {
-                desc->ld_default_stripe_size &= ~(LOV_MIN_STRIPE_SIZE - 1);
-                LCONSOLE_WARN("Changing default stripe size to "LPU64" (a "
-                              "multiple of %u)\n",
-                              desc->ld_default_stripe_size,LOV_MIN_STRIPE_SIZE);
-        }
-
-        if (desc->ld_default_stripe_count == 0)
-                desc->ld_default_stripe_count = 1;
-
-        /* from lov_setstripe */
-        if ((desc->ld_pattern != 0) && 
-            (desc->ld_pattern != LOV_PATTERN_RAID0)) {
-                LCONSOLE_WARN("Unknown stripe pattern: %#x\n",desc->ld_pattern);
-                desc->ld_pattern = 0;
-        }
-        /* fix qos_maxage */
-        if (desc->ld_qos_maxage == 0)
-                desc->ld_qos_maxage = QOS_DEFAULT_MAXAGE;
-}
-
-static int lov_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-        struct lustre_cfg *lcfg = buf;
-        struct lov_desc *desc;
-        struct lov_obd *lov = &obd->u.lov;
-        int count;
-        ENTRY;
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
-                CERROR("LOV setup requires a descriptor\n");
-                RETURN(-EINVAL);
-        }
-
-        desc = (struct lov_desc *)lustre_cfg_buf(lcfg, 1);
-
-        if (sizeof(*desc) > LUSTRE_CFG_BUFLEN(lcfg, 1)) {
-                CERROR("descriptor size wrong: %d > %d\n",
-                       (int)sizeof(*desc), LUSTRE_CFG_BUFLEN(lcfg, 1));
-                RETURN(-EINVAL);
-        }
-
-        if (desc->ld_magic != LOV_DESC_MAGIC) {
-                if (desc->ld_magic == __swab32(LOV_DESC_MAGIC)) {
-                            CDEBUG(D_OTHER, "%s: Swabbing lov desc %p\n",
-                                   obd->obd_name, desc);
-                            lustre_swab_lov_desc(desc);
-                } else {
-                        CERROR("%s: Bad lov desc magic: %#x\n",
-                               obd->obd_name, desc->ld_magic);
-                        RETURN(-EINVAL);
-                }
-        }
-
-        lov_fix_desc(desc);
-
-        /* Because of 64-bit divide/mod operations only work with a 32-bit
-         * divisor in a 32-bit kernel, we cannot support a stripe width
-         * of 4GB or larger on 32-bit CPUs. */
-        count = desc->ld_default_stripe_count;
-        if ((count > 0 ? count : desc->ld_tgt_count) *
-            desc->ld_default_stripe_size > 0xffffffff) {
-                CERROR("LOV: stripe width "LPU64"x%u > 4294967295 bytes\n",
-                       desc->ld_default_stripe_size, count);
-                RETURN(-EINVAL);
-        }
-
-        desc->ld_active_tgt_count = 0;
-        lov->desc = *desc;
-        lov->lov_tgt_size = 0;
-        sema_init(&lov->lov_lock, 1);
-        atomic_set(&lov->lov_refcount, 0);
-        CFS_INIT_LIST_HEAD(&lov->lov_qos.lq_oss_list);
-        init_rwsem(&lov->lov_qos.lq_rw_sem);
-        lov->lov_qos.lq_dirty = 1;
-        lov->lov_qos.lq_dirty_rr = 1;
-        lov->lov_qos.lq_reset = 1;
-        /* Default priority is toward free space balance */
-        lov->lov_qos.lq_prio_free = 232;
-
-        lprocfs_lov_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-#ifdef LPROCFS
-        {
-                cfs_proc_dir_entry_t *entry;
-
-                entry = create_proc_entry("target_obd", 0444,
-                                          obd->obd_proc_entry);
-                if (entry != NULL) {
-                        entry->proc_fops = &lov_proc_target_fops;
-                        entry->data = obd;
-                }
-        }
-#endif
-
-        RETURN(0);
-}
-
-static int lov_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY: {
-                struct lov_obd *lov = &obd->u.lov;
-                int i;
-                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                        if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
-                                continue;
-                        obd_precleanup(class_exp2obd(lov->lov_tgts[i]->ltd_exp),
-                                       OBD_CLEANUP_EARLY);
-                }
-                break;
-        }
-        case OBD_CLEANUP_EXPORTS:
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                rc = obd_llog_finish(obd, 0);
-                if (rc != 0)
-                        CERROR("failed to cleanup llogging subsystems\n");
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int lov_cleanup(struct obd_device *obd)
-{
-        struct lov_obd *lov = &obd->u.lov;
-
-        lprocfs_obd_cleanup(obd);
-        if (lov->lov_tgts) {
-                int i;
-                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                        if (lov->lov_tgts[i]) {
-                                /* Inactive targets may never have connected */
-                                if (lov->lov_tgts[i]->ltd_active ||
-                                    atomic_read(&lov->lov_refcount)) 
-                                        /* We should never get here - these 
-                                           should have been removed in the 
-                                           disconnect. */
-                                        CERROR("lov tgt %d not cleaned!"
-                                               " deathrow=%d, lovrc=%d\n",
-                                               i, lov->lov_death_row, 
-                                               atomic_read(&lov->lov_refcount));
-                                lov_del_target(obd, i, 0, 0);
-                        }
-                }
-                OBD_FREE(lov->lov_tgts, sizeof(*lov->lov_tgts) * 
-                         lov->lov_tgt_size);
-                lov->lov_tgt_size = 0;
-        }
-        
-        if (lov->lov_qos.lq_rr_size) 
-                OBD_FREE(lov->lov_qos.lq_rr_array, lov->lov_qos.lq_rr_size);
-
-        RETURN(0);
-}
-
-static int lov_process_config(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lustre_cfg *lcfg = buf;
-        struct obd_uuid obd_uuid;
-        int cmd;
-        int rc = 0;
-        ENTRY;
-
-        switch(cmd = lcfg->lcfg_command) {
-        case LCFG_LOV_ADD_OBD:
-        case LCFG_LOV_ADD_INA:
-        case LCFG_LOV_DEL_OBD: {
-                __u32 index;
-                int gen;
-                /* lov_modify_tgts add  0:lov_mdsA  1:ost1_UUID  2:0  3:1 */
-                if (LUSTRE_CFG_BUFLEN(lcfg, 1) > sizeof(obd_uuid.uuid))
-                        GOTO(out, rc = -EINVAL);
-
-                obd_str2uuid(&obd_uuid,  lustre_cfg_buf(lcfg, 1));
-
-                if (sscanf(lustre_cfg_buf(lcfg, 2), "%d", &index) != 1)
-                        GOTO(out, rc = -EINVAL);
-                if (sscanf(lustre_cfg_buf(lcfg, 3), "%d", &gen) != 1)
-                        GOTO(out, rc = -EINVAL);
-                if (cmd == LCFG_LOV_ADD_OBD)
-                        rc = lov_add_target(obd, &obd_uuid, index, gen, 1);
-                else if (cmd == LCFG_LOV_ADD_INA)
-                        rc = lov_add_target(obd, &obd_uuid, index, gen, 0);
-                else
-                        rc = lov_del_target(obd, index, &obd_uuid, gen);
-                GOTO(out, rc);
-        }
-        case LCFG_PARAM: {
-                struct lprocfs_static_vars lvars = { 0 };
-                struct lov_desc *desc = &(obd->u.lov.desc);
-                
-                if (!desc)
-                        GOTO(out, rc = -EINVAL);
-                
-                lprocfs_lov_init_vars(&lvars);
-                
-                rc = class_process_proc_param(PARAM_LOV, lvars.obd_vars,
-                                              lcfg, obd);
-                GOTO(out, rc);
-        }
-        default: {
-                CERROR("Unknown command: %d\n", lcfg->lcfg_command);
-                GOTO(out, rc = -EINVAL);
-
-        }
-        }
-out:
-        RETURN(rc);
-}
-
-#ifndef log2
-#define log2(n) ffz(~(n))
-#endif
-
-static int lov_clear_orphans(struct obd_export *export, struct obdo *src_oa,
-                             struct lov_stripe_md **ea,
-                             struct obd_trans_info *oti)
-{
-        struct lov_obd *lov;
-        struct obdo *tmp_oa;
-        struct obd_uuid *ost_uuid = NULL;
-        int rc = 0, i;
-        ENTRY;
-
-        LASSERT(src_oa->o_valid & OBD_MD_FLFLAGS &&
-                src_oa->o_flags == OBD_FL_DELORPHAN);
-
-        lov = &export->exp_obd->u.lov;
-
-        OBDO_ALLOC(tmp_oa);
-        if (tmp_oa == NULL)
-                RETURN(-ENOMEM);
-
-        if (src_oa->o_valid & OBD_MD_FLINLINE) {
-                ost_uuid = (struct obd_uuid *)src_oa->o_inline;
-                CDEBUG(D_HA, "clearing orphans only for %s\n",
-                       ost_uuid->uuid);
-        }
-
-        lov_getref(export->exp_obd);
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                struct lov_stripe_md obj_md;
-                struct lov_stripe_md *obj_mdp = &obj_md;
-                struct lov_tgt_desc *tgt;
-                int err;
-
-                tgt = lov->lov_tgts[i];
-                if (!tgt)
-                        continue;
-
-                /* if called for a specific target, we don't
-                   care if it is not active. */
-                if (!lov->lov_tgts[i]->ltd_active && ost_uuid == NULL) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", i);
-                        continue;
-                }
-
-                if (ost_uuid && !obd_uuid_equals(ost_uuid, &tgt->ltd_uuid))
-                        continue;
-
-                CDEBUG(D_CONFIG,"Clear orphans for %d:%s\n", i, 
-                       obd_uuid2str(ost_uuid));
-
-                memcpy(tmp_oa, src_oa, sizeof(*tmp_oa));
-
-                LASSERT(lov->lov_tgts[i]->ltd_exp);
-                /* XXX: LOV STACKING: use real "obj_mdp" sub-data */
-                err = obd_create(lov->lov_tgts[i]->ltd_exp, 
-                                 tmp_oa, &obj_mdp, oti);
-                if (err)
-                        /* This export will be disabled until it is recovered,
-                           and then orphan recovery will be completed. */
-                        CERROR("error in orphan recovery on OST idx %d/%d: "
-                               "rc = %d\n", i, lov->desc.ld_tgt_count, err);
-
-                if (ost_uuid)
-                        break;
-        }
-        lov_putref(export->exp_obd);
-
-        OBDO_FREE(tmp_oa);
-        RETURN(rc);
-}
-
-static int lov_recreate(struct obd_export *exp, struct obdo *src_oa,
-                        struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct lov_stripe_md *obj_mdp, *lsm;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        unsigned ost_idx;
-        int rc, i;
-        ENTRY;
-
-        LASSERT(src_oa->o_valid & OBD_MD_FLFLAGS &&
-                src_oa->o_flags & OBD_FL_RECREATE_OBJS);
-
-        OBD_ALLOC(obj_mdp, sizeof(*obj_mdp));
-        if (obj_mdp == NULL)
-                RETURN(-ENOMEM);
-
-        ost_idx = src_oa->o_nlink;
-        lsm = *ea;
-        if (lsm == NULL)
-                GOTO(out, rc = -EINVAL);
-        if (ost_idx >= lov->desc.ld_tgt_count ||
-            !lov->lov_tgts[ost_idx])
-                GOTO(out, rc = -EINVAL);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                if (lsm->lsm_oinfo[i]->loi_ost_idx == ost_idx) {
-                        if (lsm->lsm_oinfo[i]->loi_id != src_oa->o_id)
-                                GOTO(out, rc = -EINVAL);
-                        break;
-                }
-        }
-        if (i == lsm->lsm_stripe_count)
-                GOTO(out, rc = -EINVAL);
-
-        rc = obd_create(lov->lov_tgts[ost_idx]->ltd_exp, src_oa, &obj_mdp, oti);
-out:
-        OBD_FREE(obj_mdp, sizeof(*obj_mdp));
-        RETURN(rc);
-}
-
-/* the LOV expects oa->o_id to be set to the LOV object id */
-static int lov_create(struct obd_export *exp, struct obdo *src_oa,
-                      struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct lov_obd *lov;
-        struct obd_info oinfo;
-        struct lov_request_set *set = NULL;
-        struct lov_request *req;
-        struct obd_statfs osfs;
-        __u64 maxage;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(ea != NULL);
-        if (exp == NULL)
-                RETURN(-EINVAL);
-
-        if ((src_oa->o_valid & OBD_MD_FLFLAGS) &&
-            src_oa->o_flags == OBD_FL_DELORPHAN) {
-                rc = lov_clear_orphans(exp, src_oa, ea, oti);
-                RETURN(rc);
-        }
-
-        lov = &exp->exp_obd->u.lov;
-        if (!lov->desc.ld_active_tgt_count)
-                RETURN(-EIO);
-
-        /* Recreate a specific object id at the given OST index */
-        if ((src_oa->o_valid & OBD_MD_FLFLAGS) &&
-            (src_oa->o_flags & OBD_FL_RECREATE_OBJS)) {
-                 rc = lov_recreate(exp, src_oa, ea, oti);
-                 RETURN(rc);
-        }
-
-        maxage = cfs_time_shift_64(-lov->desc.ld_qos_maxage);
-        obd_statfs_rqset(exp->exp_obd, &osfs, maxage, OBD_STATFS_NODELAY);
-
-        rc = lov_prep_create_set(exp, &oinfo, ea, src_oa, oti, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each_entry(req, &set->set_list, rq_link) {
-                /* XXX: LOV STACKING: use real "obj_mdp" sub-data */
-                rc = obd_create(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                req->rq_oi.oi_oa, &req->rq_oi.oi_md, oti);
-                lov_update_create_set(set, req, rc);
-        }
-        rc = lov_fini_create_set(set, ea);
-        RETURN(rc);
-}
-
-#define ASSERT_LSM_MAGIC(lsmp)                                                  \
-do {                                                                            \
-        LASSERT((lsmp) != NULL);                                                \
-        LASSERTF(((lsmp)->lsm_magic == LOV_MAGIC ||                             \
-                 (lsmp)->lsm_magic == LOV_MAGIC_JOIN), "%p->lsm_magic=%x\n",    \
-                 (lsmp), (lsmp)->lsm_magic);                                    \
-} while (0)
-
-static int lov_destroy(struct obd_export *exp, struct obdo *oa,
-                       struct lov_stripe_md *lsm, struct obd_trans_info *oti,
-                       struct obd_export *md_exp)
-{
-        struct lov_request_set *set;
-        struct obd_info oinfo;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov;
-        int rc = 0, err;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        if (oa->o_valid & OBD_MD_FLCOOKIE) {
-                LASSERT(oti);
-                LASSERT(oti->oti_logcookies);
-        }
-
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_destroy_set(exp, &oinfo, oa, lsm, oti, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                int err;
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                if (oa->o_valid & OBD_MD_FLCOOKIE)
-                        oti->oti_logcookies = set->set_cookies + req->rq_stripe;
-
-                err = obd_destroy(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                  req->rq_oi.oi_oa, NULL, oti, NULL);
-                err = lov_update_common_set(set, req, err);
-                if (err) {
-                        CERROR("error: destroying objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               oa->o_id, req->rq_oi.oi_oa->o_id,
-                               req->rq_idx, err);
-                        if (!rc)
-                                rc = err;
-                }
-        }
-
-        if (rc == 0) {
-                LASSERT(lsm_op_find(lsm->lsm_magic) != NULL);
-                rc = lsm_op_find(lsm->lsm_magic)->lsm_destroy(lsm, oa, md_exp);
-        }
-        err = lov_fini_destroy_set(set);
-        RETURN(rc ? rc : err);
-}
-
-static int lov_getattr(struct obd_export *exp, struct obd_info *oinfo)
-{
-        struct lov_request_set *set;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov;
-        int err = 0, rc = 0;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-
-        rc = lov_prep_getattr_set(exp, oinfo, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx "
-                       "%u\n", oinfo->oi_oa->o_id, req->rq_stripe, 
-                       req->rq_oi.oi_oa->o_id, req->rq_idx);
-
-                rc = obd_getattr(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                 &req->rq_oi);
-                err = lov_update_common_set(set, req, rc);
-                if (err) {
-                        CERROR("error: getattr objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               oinfo->oi_oa->o_id, req->rq_oi.oi_oa->o_id,
-                               req->rq_idx, err);
-                        break;
-                }
-        }
-
-        rc = lov_fini_getattr_set(set);
-        if (err)
-                rc = err;
-        RETURN(rc);
-}
-
-static int lov_getattr_interpret(struct ptlrpc_request_set *rqset, 
-                                 void *data, int rc)
-{
-        struct lov_request_set *lovset = (struct lov_request_set *)data;
-        int err;
-        ENTRY;
-
-        /* don't do attribute merge if this aysnc op failed */
-        if (rc)
-                lovset->set_completes = 0;
-        err = lov_fini_getattr_set(lovset);
-        RETURN(rc ? rc : err);
-}
-
-static int lov_getattr_async(struct obd_export *exp, struct obd_info *oinfo,
-                              struct ptlrpc_request_set *rqset)
-{
-        struct lov_request_set *lovset;
-        struct lov_obd *lov;
-        struct list_head *pos;
-        struct lov_request *req;
-        int rc = 0, err;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-
-        rc = lov_prep_getattr_set(exp, oinfo, &lovset);
-        if (rc)
-                RETURN(rc);
-
-        CDEBUG(D_INFO, "objid "LPX64": %ux%u byte stripes\n",
-               oinfo->oi_md->lsm_object_id, oinfo->oi_md->lsm_stripe_count, 
-               oinfo->oi_md->lsm_stripe_size);
-
-        list_for_each (pos, &lovset->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx "
-                       "%u\n", oinfo->oi_oa->o_id, req->rq_stripe, 
-                       req->rq_oi.oi_oa->o_id, req->rq_idx);
-                rc = obd_getattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                       &req->rq_oi, rqset);
-                if (rc) {
-                        CERROR("error: getattr objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               oinfo->oi_oa->o_id, req->rq_oi.oi_oa->o_id,
-                               req->rq_idx, rc);
-                        GOTO(out, rc);
-                }
-        }
-
-        if (!list_empty(&rqset->set_requests)) {
-                LASSERT(rc == 0);
-                LASSERT (rqset->set_interpret == NULL);
-                rqset->set_interpret = lov_getattr_interpret;
-                rqset->set_arg = (void *)lovset;
-                RETURN(rc);
-        }
-out:
-        if (rc)
-                lovset->set_completes = 0;
-        err = lov_fini_getattr_set(lovset);
-        RETURN(rc ? rc : err);
-}
-
-static int lov_setattr(struct obd_export *exp, struct obd_info *oinfo,
-                       struct obd_trans_info *oti)
-{
-        struct lov_request_set *set;
-        struct lov_obd *lov;
-        struct list_head *pos;
-        struct lov_request *req;
-        int err = 0, rc = 0;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        /* for now, we only expect the following updates here */
-        LASSERT(!(oinfo->oi_oa->o_valid & ~(OBD_MD_FLID | OBD_MD_FLTYPE | 
-                                            OBD_MD_FLMODE | OBD_MD_FLATIME | 
-                                            OBD_MD_FLMTIME | OBD_MD_FLCTIME |
-                                            OBD_MD_FLFLAGS | OBD_MD_FLSIZE | 
-                                            OBD_MD_FLGROUP | OBD_MD_FLUID | 
-                                            OBD_MD_FLGID | OBD_MD_FLINLINE |
-                                            OBD_MD_FLFID | OBD_MD_FLGENER)));
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_setattr_set(exp, oinfo, oti, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                rc = obd_setattr(lov->lov_tgts[req->rq_idx]->ltd_exp, 
-                                 &req->rq_oi, NULL);
-                err = lov_update_setattr_set(set, req, rc);
-                if (err) {
-                        CERROR("error: setattr objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               set->set_oi->oi_oa->o_id, 
-                               req->rq_oi.oi_oa->o_id, req->rq_idx, err);
-                        if (!rc)
-                                rc = err;
-                }
-        }
-        err = lov_fini_setattr_set(set);
-        if (!rc)
-                rc = err;
-        RETURN(rc);
-}
-
-static int lov_setattr_interpret(struct ptlrpc_request_set *rqset,
-                                 void *data, int rc)
-{
-        struct lov_request_set *lovset = (struct lov_request_set *)data;
-        int err;
-        ENTRY;
-
-        if (rc)
-                lovset->set_completes = 0;
-        err = lov_fini_setattr_set(lovset);
-        RETURN(rc ? rc : err);
-}
-
-/* If @oti is given, the request goes from MDS and responses from OSTs are not
-   needed. Otherwise, a client is waiting for responses. */
-static int lov_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
-                             struct obd_trans_info *oti,
-                             struct ptlrpc_request_set *rqset)
-{
-        struct lov_request_set *set;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-        if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) {
-                LASSERT(oti);
-                LASSERT(oti->oti_logcookies);
-        }
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_setattr_set(exp, oinfo, oti, &set);
-        if (rc)
-                RETURN(rc);
-
-        CDEBUG(D_INFO, "objid "LPX64": %ux%u byte stripes\n",
-               oinfo->oi_md->lsm_object_id, oinfo->oi_md->lsm_stripe_count,
-               oinfo->oi_md->lsm_stripe_size);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE)
-                        oti->oti_logcookies = set->set_cookies + req->rq_stripe;
-
-                CDEBUG(D_INFO, "objid "LPX64"[%d] has subobj "LPX64" at idx "
-                       "%u\n", oinfo->oi_oa->o_id, req->rq_stripe,
-                       req->rq_oi.oi_oa->o_id, req->rq_idx);
-
-                rc = obd_setattr_async(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                       &req->rq_oi, oti, rqset);
-                if (rc) {
-                        CERROR("error: setattr objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               set->set_oi->oi_oa->o_id,
-                               req->rq_oi.oi_oa->o_id,
-                               req->rq_idx, rc);
-                        break;
-                }
-        }
-
-        /* If we are not waiting for responses on async requests, return. */
-        if (rc || !rqset || list_empty(&rqset->set_requests)) {
-                int err;
-                if (rc)
-                        set->set_completes = 0;
-                err = lov_fini_setattr_set(set);
-                RETURN(rc ? rc : err);
-        }
-
-        LASSERT(rqset->set_interpret == NULL);
-        rqset->set_interpret = lov_setattr_interpret;
-        rqset->set_arg = (void *)set;
-
-        RETURN(0);
-}
-
-static int lov_punch_interpret(struct ptlrpc_request_set *rqset,
-                               void *data, int rc)
-{
-        struct lov_request_set *lovset = (struct lov_request_set *)data;
-        int err;
-        ENTRY;
-
-        if (rc)
-                lovset->set_completes = 0;
-        err = lov_fini_punch_set(lovset);
-        RETURN(rc ? rc : err);
-}
-
-/* FIXME: maybe we'll just make one node the authoritative attribute node, then
- * we can send this 'punch' to just the authoritative node and the nodes
- * that the punch will affect. */
-static int lov_punch(struct obd_export *exp, struct obd_info *oinfo,
-                     struct obd_trans_info *oti,
-                     struct ptlrpc_request_set *rqset)
-{
-        struct lov_request_set *set;
-        struct lov_obd *lov;
-        struct list_head *pos;
-        struct lov_request *req;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_punch_set(exp, oinfo, oti, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                rc = obd_punch(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                               &req->rq_oi, NULL, rqset);
-                if (rc) {
-                        CERROR("error: punch objid "LPX64" subobj "LPX64
-                               " on OST idx %d: rc = %d\n",
-                               set->set_oi->oi_oa->o_id,
-                               req->rq_oi.oi_oa->o_id, req->rq_idx, rc);
-                        break;
-                }
-        }
-
-        if (rc || list_empty(&rqset->set_requests)) {
-                int err;
-                err = lov_fini_punch_set(set);
-                RETURN(rc ? rc : err);
-        }
-
-        LASSERT(rqset->set_interpret == NULL);
-        rqset->set_interpret = lov_punch_interpret;
-        rqset->set_arg = (void *)set;
-
-        RETURN(0);
-}
-
-static int lov_sync(struct obd_export *exp, struct obdo *oa,
-                    struct lov_stripe_md *lsm, obd_off start, obd_off end)
-{
-        struct lov_request_set *set;
-        struct obd_info oinfo;
-        struct lov_obd *lov;
-        struct list_head *pos;
-        struct lov_request *req;
-        int err = 0, rc = 0;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_sync_set(exp, &oinfo, oa, lsm, start, end, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                rc = obd_sync(lov->lov_tgts[req->rq_idx]->ltd_exp, 
-                              req->rq_oi.oi_oa, NULL, 
-                              req->rq_oi.oi_policy.l_extent.start,
-                              req->rq_oi.oi_policy.l_extent.end);
-                err = lov_update_common_set(set, req, rc);
-                if (err) {
-                        CERROR("error: fsync objid "LPX64" subobj "LPX64
-                               " on OST idx %d: rc = %d\n",
-                               set->set_oi->oi_oa->o_id,
-                               req->rq_oi.oi_oa->o_id, req->rq_idx, rc);
-                        if (!rc)
-                                rc = err;
-                }
-        }
-        err = lov_fini_sync_set(set);
-        if (!rc)
-                rc = err;
-        RETURN(rc);
-}
-
-static int lov_brw_check(struct lov_obd *lov, struct obd_info *lov_oinfo,
-                         obd_count oa_bufs, struct brw_page *pga)
-{
-        struct obd_info oinfo = { { { 0 } } };
-        int i, rc = 0;
-
-        oinfo.oi_oa = lov_oinfo->oi_oa;
-
-        /* The caller just wants to know if there's a chance that this
-         * I/O can succeed */
-        for (i = 0; i < oa_bufs; i++) {
-                int stripe = lov_stripe_number(lov_oinfo->oi_md, pga[i].off);
-                int ost = lov_oinfo->oi_md->lsm_oinfo[stripe]->loi_ost_idx;
-                obd_off start, end;
-
-                if (!lov_stripe_intersects(lov_oinfo->oi_md, i, pga[i].off,
-                                           pga[i].off + pga[i].count,
-                                           &start, &end))
-                        continue;
-
-                if (!lov->lov_tgts[ost] || !lov->lov_tgts[ost]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", ost);
-                        return -EIO;
-                }
-
-                rc = obd_brw(OBD_BRW_CHECK, lov->lov_tgts[ost]->ltd_exp, &oinfo,
-                             1, &pga[i], NULL);
-                if (rc)
-                        break;
-        }
-        return rc;
-}
-
-static int lov_brw(int cmd, struct obd_export *exp, struct obd_info *oinfo,
-                   obd_count oa_bufs, struct brw_page *pga,
-                   struct obd_trans_info *oti)
-{
-        struct lov_request_set *set;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int err, rc = 0;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-
-        if (cmd == OBD_BRW_CHECK) {
-                rc = lov_brw_check(lov, oinfo, oa_bufs, pga);
-                RETURN(rc);
-        }
-
-        rc = lov_prep_brw_set(exp, oinfo, oa_bufs, pga, oti, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                struct obd_export *sub_exp;
-                struct brw_page *sub_pga;
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                sub_exp = lov->lov_tgts[req->rq_idx]->ltd_exp;
-                sub_pga = set->set_pga + req->rq_pgaidx;
-                rc = obd_brw(cmd, sub_exp, &req->rq_oi, req->rq_oabufs,
-                             sub_pga, oti);
-                if (rc)
-                        break;
-                lov_update_common_set(set, req, rc);
-        }
-
-        err = lov_fini_brw_set(set);
-        if (!rc)
-                rc = err;
-        RETURN(rc);
-}
-
-static int lov_brw_interpret(struct ptlrpc_request_set *reqset, void *data,
-                             int rc)
-{
-        struct lov_request_set *lovset = (struct lov_request_set *)data;
-        ENTRY;
-
-        if (rc) {
-                lovset->set_completes = 0;
-                lov_fini_brw_set(lovset);
-        } else {
-                rc = lov_fini_brw_set(lovset);
-        }
-
-        RETURN(rc);
-}
-
-static int lov_brw_async(int cmd, struct obd_export *exp,
-                         struct obd_info *oinfo, obd_count oa_bufs,
-                         struct brw_page *pga, struct obd_trans_info *oti,
-                         struct ptlrpc_request_set *set)
-{
-        struct lov_request_set *lovset;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-
-        if (cmd == OBD_BRW_CHECK) {
-                rc = lov_brw_check(lov, oinfo, oa_bufs, pga);
-                RETURN(rc);
-        }
-
-        rc = lov_prep_brw_set(exp, oinfo, oa_bufs, pga, oti, &lovset);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &lovset->set_list) {
-                struct obd_export *sub_exp;
-                struct brw_page *sub_pga;
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                sub_exp = lov->lov_tgts[req->rq_idx]->ltd_exp;
-                sub_pga = lovset->set_pga + req->rq_pgaidx;
-                rc = obd_brw_async(cmd, sub_exp, &req->rq_oi, req->rq_oabufs,
-                                   sub_pga, oti, set);
-                if (rc)
-                        GOTO(out, rc);
-                lov_update_common_set(lovset, req, rc);
-        }
-        LASSERT(rc == 0);
-        LASSERT(set->set_interpret == NULL);
-        LASSERT(set->set_arg == NULL);
-        rc = ptlrpc_set_add_cb(set, lov_brw_interpret, lovset);
-        if (rc)
-                GOTO(out, rc);
-
-        RETURN(rc);
-out:
-        lov_fini_brw_set(lovset);
-        RETURN(rc);
-}
-
-static int lov_ap_make_ready(void *data, int cmd)
-{
-        struct lov_async_page *lap = LAP_FROM_COOKIE(data);
-
-        return lap->lap_caller_ops->ap_make_ready(lap->lap_caller_data, cmd);
-}
-
-static int lov_ap_refresh_count(void *data, int cmd)
-{
-        struct lov_async_page *lap = LAP_FROM_COOKIE(data);
-
-        return lap->lap_caller_ops->ap_refresh_count(lap->lap_caller_data,
-                                                     cmd);
-}
-
-static void lov_ap_fill_obdo(void *data, int cmd, struct obdo *oa)
-{
-        struct lov_async_page *lap = LAP_FROM_COOKIE(data);
-
-        lap->lap_caller_ops->ap_fill_obdo(lap->lap_caller_data, cmd, oa);
-        /* XXX woah, shouldn't we be altering more here?  size? */
-        oa->o_id = lap->lap_loi_id;
-        oa->o_stripe_idx = lap->lap_stripe;
-}
-
-static void lov_ap_update_obdo(void *data, int cmd, struct obdo *oa,
-                               obd_valid valid)
-{
-        struct lov_async_page *lap = LAP_FROM_COOKIE(data);
-
-        lap->lap_caller_ops->ap_update_obdo(lap->lap_caller_data, cmd,oa,valid);
-}
-
-static int lov_ap_completion(void *data, int cmd, struct obdo *oa, int rc)
-{
-        struct lov_async_page *lap = LAP_FROM_COOKIE(data);
-
-        /* in a raid1 regime this would down a count of many ios
-         * in flight, onl calling the caller_ops completion when all
-         * the raid1 ios are complete */
-        rc = lap->lap_caller_ops->ap_completion(lap->lap_caller_data,cmd,oa,rc);
-        return rc;
-}
-
-static struct obd_async_page_ops lov_async_page_ops = {
-        .ap_make_ready =        lov_ap_make_ready,
-        .ap_refresh_count =     lov_ap_refresh_count,
-        .ap_fill_obdo =         lov_ap_fill_obdo,
-        .ap_update_obdo =       lov_ap_update_obdo,
-        .ap_completion =        lov_ap_completion,
-};
-
-int lov_prep_async_page(struct obd_export *exp, struct lov_stripe_md *lsm,
-                           struct lov_oinfo *loi, cfs_page_t *page,
-                           obd_off offset, struct obd_async_page_ops *ops,
-                           void *data, void **res, int nocache,
-                           struct lustre_handle *lockh)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_async_page *lap;
-        struct lov_lock_handles *lov_lockh = NULL;
-        int rc = 0;
-        ENTRY;
-
-        if (!page) {
-                int i = 0;
-                /* Find an existing osc so we can get it's stupid sizeof(*oap).
-                   Only because of this layering limitation will a client 
-                   mount with no osts fail */
-                while (!lov->lov_tgts || !lov->lov_tgts[i] || 
-                       !lov->lov_tgts[i]->ltd_exp) {
-                        i++;
-                        if (i >= lov->desc.ld_tgt_count) 
-                                RETURN(-ENOMEDIUM);
-                }
-                rc = size_round(sizeof(*lap)) +
-                        obd_prep_async_page(lov->lov_tgts[i]->ltd_exp, NULL,
-                                            NULL, NULL, 0, NULL, NULL, NULL, 0,
-                                            NULL);
-                RETURN(rc);
-        }
-        ASSERT_LSM_MAGIC(lsm);
-        LASSERT(loi == NULL);
-
-        lap = *res;
-        lap->lap_magic = LOV_AP_MAGIC;
-        lap->lap_caller_ops = ops;
-        lap->lap_caller_data = data;
-
-        /* for now only raid 0 which passes through */
-        lap->lap_stripe = lov_stripe_number(lsm, offset);
-        lov_stripe_offset(lsm, offset, lap->lap_stripe, &lap->lap_sub_offset);
-        loi = lsm->lsm_oinfo[lap->lap_stripe];
-
-        /* so the callback doesn't need the lsm */
-        lap->lap_loi_id = loi->loi_id;
-
-        lap->lap_sub_cookie = (void *)lap + size_round(sizeof(*lap));
-
-        if (lockh) {
-                lov_lockh = lov_handle2llh(lockh);
-                if (lov_lockh) {
-                        lockh = lov_lockh->llh_handles + lap->lap_stripe;
-                }
-        }
-
-        rc = obd_prep_async_page(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                 lsm, loi, page, lap->lap_sub_offset,
-                                 &lov_async_page_ops, lap,
-                                 &lap->lap_sub_cookie, nocache, lockh);
-        if (lov_lockh)
-                lov_llh_put(lov_lockh);
-        if (rc)
-                RETURN(rc);
-        CDEBUG(D_CACHE, "lap %p page %p cookie %p off "LPU64"\n", lap, page,
-               lap->lap_sub_cookie, offset);
-        RETURN(0);
-}
-
-static int lov_queue_async_io(struct obd_export *exp,
-                              struct lov_stripe_md *lsm,
-                              struct lov_oinfo *loi, void *cookie,
-                              int cmd, obd_off off, int count,
-                              obd_flag brw_flags, obd_flag async_flags)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_async_page *lap;
-        int rc;
-
-        LASSERT(loi == NULL);
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        lap = LAP_FROM_COOKIE(cookie);
-
-        loi = lsm->lsm_oinfo[lap->lap_stripe];
-
-        rc = obd_queue_async_io(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, lsm,
-                                loi, lap->lap_sub_cookie, cmd, off, count,
-                                brw_flags, async_flags);
-        RETURN(rc);
-}
-
-static int lov_set_async_flags(struct obd_export *exp,
-                               struct lov_stripe_md *lsm,
-                               struct lov_oinfo *loi, void *cookie,
-                               obd_flag async_flags)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_async_page *lap;
-        int rc;
-
-        LASSERT(loi == NULL);
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        lap = LAP_FROM_COOKIE(cookie);
-
-        loi = lsm->lsm_oinfo[lap->lap_stripe];
-
-        rc = obd_set_async_flags(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                 lsm, loi, lap->lap_sub_cookie, async_flags);
-        RETURN(rc);
-}
-
-static int lov_queue_group_io(struct obd_export *exp,
-                              struct lov_stripe_md *lsm,
-                              struct lov_oinfo *loi,
-                              struct obd_io_group *oig, void *cookie,
-                              int cmd, obd_off off, int count,
-                              obd_flag brw_flags, obd_flag async_flags)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_async_page *lap;
-        int rc;
-
-        LASSERT(loi == NULL);
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        lap = LAP_FROM_COOKIE(cookie);
-
-        loi = lsm->lsm_oinfo[lap->lap_stripe];
-
-        rc = obd_queue_group_io(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp, lsm,
-                                loi, oig, lap->lap_sub_cookie, cmd, off, count,
-                                brw_flags, async_flags);
-        RETURN(rc);
-}
-
-/* this isn't exactly optimal.  we may have queued sync io in oscs on
- * all stripes, but we don't record that fact at queue time.  so we
- * trigger sync io on all stripes. */
-static int lov_trigger_group_io(struct obd_export *exp,
-                                struct lov_stripe_md *lsm,
-                                struct lov_oinfo *loi,
-                                struct obd_io_group *oig)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i, err;
-
-        LASSERT(loi == NULL);
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                loi = lsm->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] || 
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                err = obd_trigger_group_io(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                           lsm, loi, oig);
-                if (rc == 0 && err != 0)
-                        rc = err;
-        };
-        RETURN(rc);
-}
-
-static int lov_teardown_async_page(struct obd_export *exp,
-                                   struct lov_stripe_md *lsm,
-                                   struct lov_oinfo *loi, void *cookie)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_async_page *lap;
-        int rc;
-
-        LASSERT(loi == NULL);
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        lap = LAP_FROM_COOKIE(cookie);
-
-        loi = lsm->lsm_oinfo[lap->lap_stripe];
-
-        rc = obd_teardown_async_page(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                     lsm, loi, lap->lap_sub_cookie);
-        if (rc) {
-                CERROR("unable to teardown sub cookie %p: %d\n",
-                       lap->lap_sub_cookie, rc);
-                RETURN(rc);
-        }
-        RETURN(rc);
-}
-
-static int lov_enqueue_interpret(struct ptlrpc_request_set *rqset,
-                                 void *data, int rc)
-{
-        struct lov_request_set *lovset = (struct lov_request_set *)data;
-        ENTRY;
-        rc = lov_fini_enqueue_set(lovset, lovset->set_ei->ei_mode, rc, rqset);
-        RETURN(rc);
-}
-
-static int lov_enqueue(struct obd_export *exp, struct obd_info *oinfo,
-                       struct ldlm_enqueue_info *einfo,
-                       struct ptlrpc_request_set *rqset)
-{
-        ldlm_mode_t mode = einfo->ei_mode;
-        struct lov_request_set *set;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov;
-        ldlm_error_t rc;
-        ENTRY;
-
-        LASSERT(oinfo);
-        ASSERT_LSM_MAGIC(oinfo->oi_md);
-        LASSERT(mode == (mode & -mode));
-
-        /* we should never be asked to replay a lock this way. */
-        LASSERT((oinfo->oi_flags & LDLM_FL_REPLAY) == 0);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_enqueue_set(exp, oinfo, einfo, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                rc = obd_enqueue(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                 &req->rq_oi, einfo, rqset);
-                if (rc != ELDLM_OK)
-                        GOTO(out, rc);
-        }
-
-        if (rqset && !list_empty(&rqset->set_requests)) {
-                LASSERT(rc == 0);
-                LASSERT(rqset->set_interpret == NULL);
-                rqset->set_interpret = lov_enqueue_interpret;
-                rqset->set_arg = (void *)set;
-                RETURN(rc);
-        }
-out:
-        rc = lov_fini_enqueue_set(set, mode, rc, rqset);
-        RETURN(rc);
-}
-
-static int lov_match(struct obd_export *exp, struct lov_stripe_md *lsm,
-                     __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                     int *flags, void *data, struct lustre_handle *lockh)
-{
-        struct lov_request_set *set;
-        struct obd_info oinfo;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lustre_handle *lov_lockhp;
-        int lov_flags, rc = 0;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-        LASSERT((*flags & LDLM_FL_TEST_LOCK) || mode == (mode & -mode));
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_match_set(exp, &oinfo, lsm, policy, mode, lockh, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                ldlm_policy_data_t sub_policy;
-                req = list_entry(pos, struct lov_request, rq_link);
-                lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe;
-                LASSERT(lov_lockhp);
-
-                lov_flags = *flags;
-                sub_policy.l_extent = req->rq_oi.oi_policy.l_extent;
-
-                rc = obd_match(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                               req->rq_oi.oi_md, type, &sub_policy,
-                               mode, &lov_flags, data, lov_lockhp);
-                rc = lov_update_match_set(set, req, rc);
-                if (rc <= 0)
-                        break;
-        }
-        lov_fini_match_set(set, mode, *flags);
-        RETURN(rc);
-}
-
-static int lov_change_cbdata(struct obd_export *exp,
-                             struct lov_stripe_md *lsm, ldlm_iterator_t it,
-                             void *data)
-{
-        struct lov_obd *lov;
-        struct lov_oinfo *loi;
-        int rc = 0, i;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_stripe_md submd;
-
-                loi = lsm->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                        CDEBUG(D_HA, "lov idx %d NULL \n", loi->loi_ost_idx);
-                        continue;
-                }
-                submd.lsm_object_id = loi->loi_id;
-                submd.lsm_stripe_count = 0;
-                rc = obd_change_cbdata(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                       &submd, it, data);
-        }
-        RETURN(rc);
-}
-
-static int lov_cancel(struct obd_export *exp, struct lov_stripe_md *lsm,
-                      __u32 mode, struct lustre_handle *lockh)
-{
-        struct lov_request_set *set;
-        struct obd_info oinfo;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lustre_handle *lov_lockhp;
-        ldlm_mode_t this_mode;
-        int err = 0, rc = 0;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        LASSERT(lockh);
-        lov = &exp->exp_obd->u.lov;
-        rc = lov_prep_cancel_set(exp, &oinfo, lsm, mode, lockh, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-                lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe;
-
-                /* If this lock was used for a write or truncate, the object
-                 * will have been recreated by the OST, cancel the lock
-                 * (setting LCK_GROUP incidentally causes immediate cancel). */
-                if (OST_LVB_IS_ERR(lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_blocks) &&
-                    (mode == LCK_PW || mode == LCK_CW))
-                        this_mode = LCK_GROUP;
-                else
-                        this_mode = mode;
-
-                rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                req->rq_oi.oi_md, this_mode, lov_lockhp);
-                rc = lov_update_common_set(set, req, rc);
-                if (rc) {
-                        CERROR("error: cancel objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               lsm->lsm_object_id,
-                               req->rq_oi.oi_md->lsm_object_id,
-                               req->rq_idx, rc);
-                        err = rc;
-                }
-
-        }
-        lov_fini_cancel_set(set);
-        RETURN(err);
-}
-
-static int lov_cancel_unused(struct obd_export *exp,
-                             struct lov_stripe_md *lsm, int flags, void *opaque)
-{
-        struct lov_obd *lov;
-        struct lov_oinfo *loi;
-        int rc = 0, i;
-        ENTRY;
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        if (lsm == NULL) {
-                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                        int err;
-                        if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp)
-                                continue;
-
-                        err = obd_cancel_unused(lov->lov_tgts[i]->ltd_exp, NULL,
-                                                flags, opaque);
-                        if (!rc)
-                                rc = err;
-                }
-                RETURN(rc);
-        }
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_stripe_md submd;
-                int err;
-
-                loi = lsm->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                        CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active)
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-
-                submd.lsm_object_id = loi->loi_id;
-                submd.lsm_stripe_count = 0;
-                err = obd_cancel_unused(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                        &submd, flags, opaque);
-                if (err && lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CERROR("error: cancel unused objid "LPX64" subobj "LPX64
-                               " on OST idx %d: rc = %d\n", lsm->lsm_object_id,
-                               loi->loi_id, loi->loi_ost_idx, err);
-                        if (!rc)
-                                rc = err;
-                }
-        }
-        RETURN(rc);
-}
-
-static int lov_join_lru(struct obd_export *exp,
-                        struct lov_stripe_md *lsm, int join)
-{
-        struct lov_obd *lov;
-        struct lov_oinfo *loi;
-        int i, count = 0;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        lov = &exp->exp_obd->u.lov;
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_stripe_md submd;
-                int rc = 0;
-
-                loi = lsm->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                        CDEBUG(D_HA, "lov idx %d NULL\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                if (!lov->lov_tgts[loi->loi_ost_idx]->ltd_active)
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-
-                submd.lsm_object_id = loi->loi_id;
-                submd.lsm_stripe_count = 0;
-                rc = obd_join_lru(lov->lov_tgts[loi->loi_ost_idx]->ltd_exp,
-                                  &submd, join);
-                if (rc < 0) {
-                        CERROR("join lru failed. objid: "LPX64" subobj: "LPX64
-                               " ostidx: %d rc: %d\n", lsm->lsm_object_id,
-                               loi->loi_id, loi->loi_ost_idx, rc);
-                        return rc;
-                } else {
-                        count += rc;
-                }
-        }
-        RETURN(count);
-}
-
-static int lov_statfs_interpret(struct ptlrpc_request_set *rqset,
-                                void *data, int rc)
-{
-        struct lov_request_set *lovset = (struct lov_request_set *)data;
-        int err;
-        ENTRY;
-
-        if (rc)
-                lovset->set_completes = 0;
-
-        err = lov_fini_statfs_set(lovset);
-        RETURN(rc ? rc : err);
-}
-
-static int lov_statfs_async(struct obd_device *obd, struct obd_info *oinfo,
-                            __u64 max_age, struct ptlrpc_request_set *rqset)
-{
-        struct lov_request_set *set;
-        struct lov_request *req;
-        struct list_head *pos;
-        struct lov_obd *lov;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(oinfo != NULL);
-        LASSERT(oinfo->oi_osfs != NULL);
-
-        lov = &obd->u.lov;
-        rc = lov_prep_statfs_set(obd, oinfo, &set);
-        if (rc)
-                RETURN(rc);
-
-        list_for_each (pos, &set->set_list) {
-                struct obd_device *osc_obd;
-
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                osc_obd = class_exp2obd(lov->lov_tgts[req->rq_idx]->ltd_exp);
-                rc = obd_statfs_async(osc_obd, &req->rq_oi, max_age, rqset);
-                if (rc)
-                        break;
-        }
-
-        if (rc || list_empty(&rqset->set_requests)) {
-                int err;
-                if (rc)
-                        set->set_completes = 0;
-                err = lov_fini_statfs_set(set);
-                RETURN(rc ? rc : err);
-        }
-
-        LASSERT(rqset->set_interpret == NULL);
-        rqset->set_interpret = lov_statfs_interpret;
-        rqset->set_arg = (void *)set;
-        RETURN(0);
-}
-
-static int lov_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                      __u64 max_age, __u32 flags)
-{
-        struct ptlrpc_request_set *set = NULL;
-        struct obd_info oinfo = { { { 0 } } };
-        int rc = 0;
-        ENTRY;
-
-        /* for obdclass we forbid using obd_statfs_rqset, but prefer using async
-         * statfs requests */
-        set = ptlrpc_prep_set();
-        if (set == NULL)
-                RETURN(-ENOMEM);
-
-        oinfo.oi_osfs = osfs;
-        oinfo.oi_flags = flags;
-        rc = lov_statfs_async(obd, &oinfo, max_age, set);
-        if (rc == 0)
-                rc = ptlrpc_set_wait(set);
-        ptlrpc_set_destroy(set);
-
-        RETURN(rc);
-}
-
-static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg)
-{
-        struct obd_device *obddev = class_exp2obd(exp);
-        struct lov_obd *lov = &obddev->u.lov;
-        int i, rc, count = lov->desc.ld_tgt_count;
-        struct obd_uuid *uuidp;
-        ENTRY;
-
-        switch (cmd) {
-        case OBD_IOC_LOV_GET_CONFIG: {
-                struct obd_ioctl_data *data;
-                struct lov_desc *desc;
-                char *buf = NULL;
-                __u32 *genp;
-
-                len = 0;
-                if (obd_ioctl_getdata(&buf, &len, (void *)uarg))
-                        RETURN(-EINVAL);
-
-                data = (struct obd_ioctl_data *)buf;
-
-                if (sizeof(*desc) > data->ioc_inllen1) {
-                        obd_ioctl_freedata(buf, len);
-                        RETURN(-EINVAL);
-                }
-
-                if (sizeof(uuidp->uuid) * count > data->ioc_inllen2) {
-                        obd_ioctl_freedata(buf, len);
-                        RETURN(-EINVAL);
-                }
-
-                if (sizeof(__u32) * count > data->ioc_inllen3) {
-                        obd_ioctl_freedata(buf, len);
-                        RETURN(-EINVAL);
-                }
-
-                desc = (struct lov_desc *)data->ioc_inlbuf1;
-                memcpy(desc, &(lov->desc), sizeof(*desc));
-
-                uuidp = (struct obd_uuid *)data->ioc_inlbuf2;
-                genp = (__u32 *)data->ioc_inlbuf3;
-                /* the uuid will be empty for deleted OSTs */
-                for (i = 0; i < count; i++, uuidp++, genp++) {
-                        if (!lov->lov_tgts[i]) 
-                                continue;
-                        *uuidp = lov->lov_tgts[i]->ltd_uuid;
-                        *genp = lov->lov_tgts[i]->ltd_gen;
-                }
-
-                rc = copy_to_user((void *)uarg, buf, len);
-                if (rc)
-                        rc = -EFAULT;
-                obd_ioctl_freedata(buf, len);
-                break;
-        }
-        case LL_IOC_LOV_SETSTRIPE:
-                rc = lov_setstripe(exp, karg, uarg);
-                break;
-        case LL_IOC_LOV_GETSTRIPE:
-                rc = lov_getstripe(exp, karg, uarg);
-                break;
-        case LL_IOC_LOV_SETEA:
-                rc = lov_setea(exp, karg, uarg);
-                break;
-        default: {
-                int set = 0;
-
-                if (count == 0)
-                        RETURN(-ENOTTY);
-
-                rc = 0;
-                for (i = 0; i < count; i++) {
-                        int err;
-
-                        /* OST was disconnected */
-                        if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_exp)
-                                continue;
-
-                        err = obd_iocontrol(cmd, lov->lov_tgts[i]->ltd_exp,
-                                            len, karg, uarg);
-                        if (err == -ENODATA && cmd == OBD_IOC_POLL_QUOTACHECK) {
-                                RETURN(err);
-                        } else if (err) {
-                                if (lov->lov_tgts[i]->ltd_active) {
-                                        CDEBUG(err == -ENOTTY ?
-                                               D_IOCTL : D_WARNING,
-                                               "iocontrol OSC %s on OST "
-                                               "idx %d cmd %x: err = %d\n",
-                                               lov_uuid2str(lov, i),
-                                               i, cmd, err);
-                                        if (!rc)
-                                                rc = err;
-                                }
-                        } else {
-                                set = 1;
-                        }
-                }
-                if (!set && !rc)
-                        rc = -EIO;
-        }
-        }
-
-        RETURN(rc);
-}
-
-static int lov_get_info(struct obd_export *exp, __u32 keylen,
-                        void *key, __u32 *vallen, void *val)
-{
-        struct obd_device *obddev = class_exp2obd(exp);
-        struct lov_obd *lov = &obddev->u.lov;
-        int i, rc;
-        ENTRY;
-
-        if (!vallen || !val)
-                RETURN(-EFAULT);
-
-        lov_getref(obddev);
-
-        if (KEY_IS("lock_to_stripe")) {
-                struct {
-                        char name[16];
-                        struct ldlm_lock *lock;
-                        struct lov_stripe_md *lsm;
-                } *data = key;
-                struct ldlm_res_id *res_id = &data->lock->l_resource->lr_name;
-                struct lov_oinfo *loi;
-                __u32 *stripe = val;
-
-                if (*vallen < sizeof(*stripe))
-                        GOTO(out, rc = -EFAULT);
-                *vallen = sizeof(*stripe);
-
-                /* XXX This is another one of those bits that will need to
-                 * change if we ever actually support nested LOVs.  It uses
-                 * the lock's export to find out which stripe it is. */
-                /* XXX - it's assumed all the locks for deleted OSTs have
-                 * been cancelled. Also, the export for deleted OSTs will
-                 * be NULL and won't match the lock's export. */
-                for (i = 0; i < data->lsm->lsm_stripe_count; i++) {
-                        loi = data->lsm->lsm_oinfo[i];
-                        if (!lov->lov_tgts[loi->loi_ost_idx])
-                                continue;
-                        if (lov->lov_tgts[loi->loi_ost_idx]->ltd_exp ==
-                            data->lock->l_conn_export &&
-                            loi->loi_id == res_id->name[0] &&
-                            loi->loi_gr == res_id->name[1]) {
-                                *stripe = i;
-                                GOTO(out, rc = 0);
-                        }
-                }
-                LDLM_ERROR(data->lock, "lock on inode without such object");
-                dump_lsm(D_ERROR, data->lsm);
-                GOTO(out, rc = -ENXIO);
-        } else if (KEY_IS(KEY_LAST_ID)) {
-                struct obd_id_info *info = val;
-                __u32 size = sizeof(obd_id);
-                struct lov_tgt_desc *tgt;
-
-                LASSERT(*vallen == sizeof(struct obd_id_info));
-                tgt = lov->lov_tgts[info->idx];
-
-                if (!tgt || !tgt->ltd_active)
-                        GOTO(out, rc = -ESRCH);
-
-                rc = obd_get_info(tgt->ltd_exp, keylen, key, &size, info->data);
-                GOTO(out, rc = 0);
-        } else if (KEY_IS(KEY_LOVDESC)) {
-                struct lov_desc *desc_ret = val;
-                *desc_ret = lov->desc;
-
-                GOTO(out, rc = 0);
-        } else if (KEY_IS(KEY_LOV_IDX)) {
-                struct lov_tgt_desc *tgt;
-
-                for(i = 0; i < lov->desc.ld_tgt_count; i++) {
-                        tgt = lov->lov_tgts[i];
-                        if (obd_uuid_equals(val, &tgt->ltd_uuid))
-                                GOTO(out, rc = i);
-                }
-        }
-
-        rc = -EINVAL;
-out:
-        lov_putref(obddev);
-        RETURN(rc);
-}
-
-static int lov_set_info_async(struct obd_export *exp, obd_count keylen,
-                              void *key, obd_count vallen, void *val,
-                              struct ptlrpc_request_set *set)
-{
-        struct obd_device *obddev = class_exp2obd(exp);
-        struct lov_obd *lov = &obddev->u.lov;
-        obd_count count;
-        int i, rc = 0, err, incr = 0, check_uuid = 0, do_inactive = 0;
-        int no_set = !set;
-        unsigned next_id = 0;
-        struct lov_tgt_desc *tgt;
-        void *data;
-        ENTRY;
-
-        if (no_set) {
-                set = ptlrpc_prep_set();
-                if (!set)
-                        RETURN(-ENOMEM);
-        }
-
-        lov_getref(obddev);
-        count = lov->desc.ld_tgt_count;
-
-        if (KEY_IS(KEY_NEXT_ID)) {
-                count = vallen / sizeof(struct obd_id_info);
-                vallen = sizeof(obd_id);
-                incr = sizeof(struct obd_id_info);
-                do_inactive = 1;
-                next_id = 1;
-        } else if (KEY_IS("checksum")) {
-                do_inactive = 1;
-        } else if (KEY_IS(KEY_MDS_CONN) || KEY_IS("unlinked")) {
-                check_uuid = val ? 1 : 0;
-        } else if (KEY_IS("evict_by_nid")) {
-                /* use defaults:
-                do_inactive = incr = 0;
-                 */
-        }
-
-        for (i = 0; i < count; i++, val = (char *)val + incr) {
-                if (next_id) {
-                        tgt = lov->lov_tgts[((struct obd_id_info*)val)->idx];
-                        data = ((struct obd_id_info*)val)->data;
-                } else {
-                        tgt = lov->lov_tgts[i];
-                        data = val;
-                }
-                /* OST was disconnected */
-                if (!tgt || !tgt->ltd_exp)
-                        continue;
-
-                /* OST is inactive and we don't want inactive OSCs */
-                if (!tgt->ltd_active && !do_inactive)
-                        continue;
-
-                /* Only want a specific OSC */
-                if (check_uuid &&
-                    !obd_uuid_equals(val, &tgt->ltd_uuid))
-                        continue;
-
-                err = obd_set_info_async(tgt->ltd_exp,
-                                         keylen, key, vallen, data, set);
-                if (!rc)
-                        rc = err;
-        }
-        lov_putref(obddev);
-        if (no_set) {
-                err = ptlrpc_set_wait(set);
-                if (!rc)
-                        rc = err;
-                ptlrpc_set_destroy(set);
-        }
-        RETURN(rc);
-}
-
-static int lov_checkmd(struct obd_export *exp, struct obd_export *md_exp,
-                       struct lov_stripe_md *lsm)
-{
-        int rc;
-        ENTRY;
-
-        if (!lsm)
-                RETURN(0);
-        LASSERT(md_exp);
-        LASSERT(lsm_op_find(lsm->lsm_magic) != NULL);
-        rc = lsm_op_find(lsm->lsm_magic)->lsm_revalidate(lsm, md_exp->exp_obd);
-
-        RETURN(rc);
-}
-
-int lov_test_and_clear_async_rc(struct lov_stripe_md *lsm)
-{
-        struct lov_oinfo *loi;
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                loi = lsm->lsm_oinfo[i];
-                if (loi->loi_ar.ar_rc && !rc)
-                        rc = loi->loi_ar.ar_rc;
-                loi->loi_ar.ar_rc = 0;
-        }
-        RETURN(rc);
-}
-EXPORT_SYMBOL(lov_test_and_clear_async_rc);
-
-
-static int lov_extent_calc(struct obd_export *exp, struct lov_stripe_md *lsm,
-                           int cmd, __u64 *offset)
-{
-        __u64 start;
-        __u32 ssize  = lsm->lsm_stripe_size;
-
-        start = *offset;
-        do_div(start, ssize);
-        start = start * ssize;
-
-        CDEBUG(D_DLMTRACE, "offset "LPU64", stripe %u, start "LPU64
-               ", end "LPU64"\n", *offset, ssize, start, start + ssize - 1);
-        if (cmd == OBD_CALC_STRIPE_END) {
-                *offset = start + ssize - 1;
-        } else if (cmd == OBD_CALC_STRIPE_START) {
-                *offset = start;
-        } else {
-                LBUG();
-        }
-
-        RETURN(0);
-}
-
-#if 0
-struct lov_multi_wait {
-        struct ldlm_lock *lock;
-        wait_queue_t      wait;
-        int               completed;
-        int               generation;
-};
-
-int lov_complete_many(struct obd_export *exp, struct lov_stripe_md *lsm,
-                      struct lustre_handle *lockh)
-{
-        struct lov_lock_handles *lov_lockh = NULL;
-        struct lustre_handle *lov_lockhp;
-        struct lov_obd *lov;
-        struct lov_oinfo *loi;
-        struct lov_multi_wait *queues;
-        int rc = 0, i;
-        ENTRY;
-
-        ASSERT_LSM_MAGIC(lsm);
-
-        if (!exp || !exp->exp_obd)
-                RETURN(-ENODEV);
-
-        LASSERT(lockh != NULL);
-        if (lsm->lsm_stripe_count > 1) {
-                lov_lockh = lov_handle2llh(lockh);
-                if (lov_lockh == NULL) {
-                        CERROR("LOV: invalid lov lock handle %p\n", lockh);
-                        RETURN(-EINVAL);
-                }
-
-                lov_lockhp = lov_lockh->llh_handles;
-        } else {
-                lov_lockhp = lockh;
-        }
-
-        OBD_ALLOC(queues, lsm->lsm_stripe_count * sizeof(*queues));
-        if (queues == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        lov = &exp->exp_obd->u.lov;
-        for (i = 0, loi = lsm->lsm_oinfo; i < lsm->lsm_stripe_count;
-             i++, loi++, lov_lockhp++) {
-                struct ldlm_lock *lock;
-                struct obd_device *obd;
-
-                lock = ldlm_handle2lock(lov_lockhp);
-                if (lock == NULL) {
-                        CDEBUG(D_HA, "lov idx %d subobj "LPX64" no lock?\n",
-                               loi->loi_ost_idx, loi->loi_id);
-                        queues[i].completed = 1;
-                        continue;
-                }
-
-                queues[i].lock = lock;
-                init_waitqueue_entry(&(queues[i].wait), current);
-                add_wait_queue(lock->l_waitq, &(queues[i].wait));
-
-                obd = class_exp2obd(lock->l_conn_export);
-                if (obd != NULL)
-                        imp = obd->u.cli.cl_import;
-                if (imp != NULL) {
-                        spin_lock(&imp->imp_lock);
-                        queues[i].generation = imp->imp_generation;
-                        spin_unlock(&imp->imp_lock);
-                }
-        }
-
-        lwi = LWI_TIMEOUT_INTR(obd_timeout * HZ, ldlm_expired_completion_wait,
-                               interrupted_completion_wait, &lwd);
-        rc = l_wait_event_added(check_multi_complete(queues, lsm), &lwi);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++)
-                remove_wait_queue(lock->l_waitq, &(queues[i].wait));
-
-        if (rc == -EINTR || rc == -ETIMEDOUT) {
-
-
-        }
-
- out:
-        if (lov_lockh != NULL)
-                lov_llh_put(lov_lockh);
-        RETURN(rc);
-}
-#endif
-
-void lov_stripe_lock(struct lov_stripe_md *md)
-{
-        LASSERT(md->lsm_lock_owner != cfs_current());
-        spin_lock(&md->lsm_lock);
-        LASSERT(md->lsm_lock_owner == NULL);
-        md->lsm_lock_owner = cfs_current();
-}
-EXPORT_SYMBOL(lov_stripe_lock);
-
-void lov_stripe_unlock(struct lov_stripe_md *md)
-{
-        LASSERT(md->lsm_lock_owner == cfs_current());
-        md->lsm_lock_owner = NULL;
-        spin_unlock(&md->lsm_lock);
-}
-EXPORT_SYMBOL(lov_stripe_unlock);
-
-struct obd_ops lov_obd_ops = {
-        .o_owner               = THIS_MODULE,
-        .o_setup               = lov_setup,
-        .o_precleanup          = lov_precleanup,
-        .o_cleanup             = lov_cleanup,
-        .o_process_config      = lov_process_config,
-        .o_connect             = lov_connect,
-        .o_disconnect          = lov_disconnect,
-        .o_statfs              = lov_statfs,
-        .o_statfs_async        = lov_statfs_async,
-        .o_packmd              = lov_packmd,
-        .o_unpackmd            = lov_unpackmd,
-        .o_checkmd             = lov_checkmd,
-        .o_create              = lov_create,
-        .o_destroy             = lov_destroy,
-        .o_getattr             = lov_getattr,
-        .o_getattr_async       = lov_getattr_async,
-        .o_setattr             = lov_setattr,
-        .o_setattr_async       = lov_setattr_async,
-        .o_brw                 = lov_brw,
-        .o_brw_async           = lov_brw_async,
-        .o_prep_async_page     = lov_prep_async_page,
-        .o_queue_async_io      = lov_queue_async_io,
-        .o_set_async_flags     = lov_set_async_flags,
-        .o_queue_group_io      = lov_queue_group_io,
-        .o_trigger_group_io    = lov_trigger_group_io,
-        .o_teardown_async_page = lov_teardown_async_page,
-        .o_merge_lvb           = lov_merge_lvb,
-        .o_adjust_kms          = lov_adjust_kms,
-        .o_punch               = lov_punch,
-        .o_sync                = lov_sync,
-        .o_enqueue             = lov_enqueue,
-        .o_match               = lov_match,
-        .o_change_cbdata       = lov_change_cbdata,
-        .o_cancel              = lov_cancel,
-        .o_cancel_unused       = lov_cancel_unused,
-        .o_join_lru            = lov_join_lru,
-        .o_iocontrol           = lov_iocontrol,
-        .o_get_info            = lov_get_info,
-        .o_set_info_async      = lov_set_info_async,
-        .o_extent_calc         = lov_extent_calc,
-        .o_llog_init           = lov_llog_init,
-        .o_llog_finish         = lov_llog_finish,
-        .o_notify              = lov_notify,
-        .o_register_page_removal_cb = lov_register_page_removal_cb,
-        .o_unregister_page_removal_cb = lov_unregister_page_removal_cb,
-        .o_register_lock_cancel_cb = lov_register_lock_cancel_cb,
-        .o_unregister_lock_cancel_cb = lov_unregister_lock_cancel_cb,
-};
-
-static quota_interface_t *quota_interface;
-extern quota_interface_t lov_quota_interface;
-
-cfs_mem_cache_t *lov_oinfo_slab;
-
-int __init lov_init(void)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-        int rc, rc2;
-        ENTRY;
-
-        lov_oinfo_slab = cfs_mem_cache_create("lov_oinfo",
-                                              sizeof(struct lov_oinfo), 
-                                              0, SLAB_HWCACHE_ALIGN);
-        if (lov_oinfo_slab == NULL)
-                return -ENOMEM;
-        lprocfs_lov_init_vars(&lvars);
-
-        request_module("lquota");
-        quota_interface = PORTAL_SYMBOL_GET(lov_quota_interface);
-        init_obd_quota_ops(quota_interface, &lov_obd_ops);
-
-        rc = class_register_type(&lov_obd_ops, lvars.module_vars,
-                                 LUSTRE_LOV_NAME);
-        if (rc) {
-                if (quota_interface)
-                        PORTAL_SYMBOL_PUT(lov_quota_interface);
-                rc2 = cfs_mem_cache_destroy(lov_oinfo_slab);
-                LASSERT(rc2 == 0);
-        }
-
-        RETURN(rc);
-}
-
-#ifdef __KERNEL__
-static void /*__exit*/ lov_exit(void)
-{
-        int rc;
-
-        if (quota_interface)
-                PORTAL_SYMBOL_PUT(lov_quota_interface);
-
-        class_unregister_type(LUSTRE_LOV_NAME);
-        rc = cfs_mem_cache_destroy(lov_oinfo_slab);
-        LASSERT(rc == 0);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Logical Object Volume OBD driver");
-MODULE_LICENSE("GPL");
-
-cfs_module(lov, LUSTRE_VERSION_STRING, lov_init, lov_exit);
-#endif
diff --git a/lustre/lov/lov_offset.c b/lustre/lov/lov_offset.c
deleted file mode 100644
index 471788239f770ee368e4510832c4fa03b7bfb1b6..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_offset.c
+++ /dev/null
@@ -1,279 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-
-#include "lov_internal.h"
-
-/* compute object size given "stripeno" and the ost size */
-obd_size lov_stripe_size(struct lov_stripe_md *lsm, obd_size ost_size,
-                         int stripeno)
-{
-        unsigned long ssize  = lsm->lsm_stripe_size;
-        unsigned long swidth, stripe_size;
-        int sindex = stripeno;
-        obd_size lov_size;
-        int magic = lsm->lsm_magic;
-        ENTRY;
-
-        if (ost_size == 0)
-                RETURN(0);
-
-        LASSERT(lsm_op_find(magic) != NULL);
-        lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, NULL, &swidth);
- 
-        /* do_div(a, b) returns a % b, and a = a / b */
-        stripe_size = do_div(ost_size, ssize);
-        if (stripe_size)
-                lov_size = ost_size * swidth + stripeno * ssize + stripe_size;
-        else
-                lov_size = (ost_size - 1) * swidth + (stripeno + 1) * ssize;
-
-        lov_size += lsm_op_find(magic)->lsm_stripe_offset_by_index(lsm, sindex);
-        RETURN(lov_size);
-}
-
-/* we have an offset in file backed by an lov and want to find out where
- * that offset lands in our given stripe of the file.  for the easy
- * case where the offset is within the stripe, we just have to scale the
- * offset down to make it relative to the stripe instead of the lov.
- *
- * the harder case is what to do when the offset doesn't intersect the
- * stripe.  callers will want start offsets clamped ahead to the start
- * of the nearest stripe in the file.  end offsets similarly clamped to the
- * nearest ending byte of a stripe in the file:
- *
- * all this function does is move offsets to the nearest region of the
- * stripe, and it does its work "mod" the full length of all the stripes.
- * consider a file with 3 stripes:
- *
- *             S                                              E
- * ---------------------------------------------------------------------
- * |    0    |     1     |     2     |    0    |     1     |     2     |
- * ---------------------------------------------------------------------
- *
- * to find stripe 1's offsets for S and E, it divides by the full stripe
- * width and does its math in the context of a single set of stripes:
- *
- *             S         E
- * -----------------------------------
- * |    0    |     1     |     2     |
- * -----------------------------------
- *
- * it'll notice that E is outside stripe 1 and clamp it to the end of the
- * stripe, then multiply it back out by lov_off to give the real offsets in
- * the stripe:
- *
- *   S                   E
- * ---------------------------------------------------------------------
- * |    1    |     1     |     1     |    1    |     1     |     1     |
- * ---------------------------------------------------------------------
- *
- * it would have done similarly and pulled S forward to the start of a 1
- * stripe if, say, S had landed in a 0 stripe.
- *
- * this rounding isn't always correct.  consider an E lov offset that lands
- * on a 0 stripe, the "mod stripe width" math will pull it forward to the
- * start of a 1 stripe, when in fact it wanted to be rounded back to the end
- * of a previous 1 stripe.  this logic is handled by callers and this is why:
- *
- * this function returns < 0 when the offset was "before" the stripe and
- * was moved forward to the start of the stripe in question;  0 when it
- * falls in the stripe and no shifting was done; > 0 when the offset
- * was outside the stripe and was pulled back to its final byte. */
-int lov_stripe_offset(struct lov_stripe_md *lsm, obd_off lov_off,
-                      int stripeno, obd_off *obd_off)
-{
-        unsigned long ssize  = lsm->lsm_stripe_size;
-        unsigned long swidth, stripe_off, this_stripe;
-        __u64 l_off, s_off;
-        int magic = lsm->lsm_magic;
-        int ret = 0;
-
-        if (lov_off == OBD_OBJECT_EOF) {
-                *obd_off = OBD_OBJECT_EOF;
-                return 0;
-        }
-
-        LASSERT(lsm_op_find(magic) != NULL);
-        /*It will check whether the lov_off and stripeno 
-         *are in the same extent. 
-         *1) lov_off extent < stripeno extent, ret = -1, obd_off = 0
-         *2) lov_off extent > stripeno extent, ret = 1, 
-         *   obd_off = lov_off extent offset*/
-        l_off = lsm_op_find(magic)->lsm_stripe_offset_by_index(lsm, stripeno);
-        s_off = lsm_op_find(magic)->lsm_stripe_offset_by_offset(lsm, lov_off);
-        if (s_off < l_off) {
-                ret = -1;
-                *obd_off = 0;
-                return ret;
-        } else if (s_off > l_off) {
-                ret = 1;
-                *obd_off = s_off;
-                return ret;
-        }
-        /*If they are in the same extent, original logic*/
-        lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, &lov_off,
-                                                &swidth);
-       
-        /* do_div(a, b) returns a % b, and a = a / b */
-        stripe_off = do_div(lov_off, swidth);
-
-        this_stripe = stripeno * ssize;
-        if (stripe_off < this_stripe) {
-                stripe_off = 0;
-                ret = -1;
-        } else {
-                stripe_off -= this_stripe;
-
-                if (stripe_off >= ssize) {
-                        stripe_off = ssize;
-                        ret = 1;
-                }
-        }
-
-        *obd_off = lov_off * ssize + stripe_off;
-        return ret;
-}
-
-/* Given a whole-file size and a stripe number, give the file size which
- * corresponds to the individual object of that stripe.
- *
- * This behaves basically in the same was as lov_stripe_offset, except that
- * file sizes falling before the beginning of a stripe are clamped to the end
- * of the previous stripe, not the beginning of the next:
- *
- *                                               S
- * ---------------------------------------------------------------------
- * |    0    |     1     |     2     |    0    |     1     |     2     |
- * ---------------------------------------------------------------------
- *
- * if clamped to stripe 2 becomes:
- *
- *                                   S
- * ---------------------------------------------------------------------
- * |    0    |     1     |     2     |    0    |     1     |     2     |
- * ---------------------------------------------------------------------
- */
-obd_off lov_size_to_stripe(struct lov_stripe_md *lsm, obd_off file_size,
-                           int stripeno)
-{
-        unsigned long ssize  = lsm->lsm_stripe_size;
-        unsigned long swidth, stripe_off, this_stripe;
-        int magic = lsm->lsm_magic;
-
-        if (file_size == OBD_OBJECT_EOF)
-                return OBD_OBJECT_EOF;
-
-        LASSERT(lsm_op_find(magic) != NULL);
-        lsm_op_find(magic)->lsm_stripe_by_index(lsm, &stripeno, &file_size,
-                                                &swidth);
-
-        /* do_div(a, b) returns a % b, and a = a / b */
-        stripe_off = do_div(file_size, swidth);
-
-        this_stripe = stripeno * ssize;
-        if (stripe_off < this_stripe) {
-                /* Move to end of previous stripe, or zero */
-                if (file_size > 0) {
-                        file_size--;
-                        stripe_off = ssize;
-                } else {
-                        stripe_off = 0;
-                }
-        } else {
-                stripe_off -= this_stripe;
-
-                if (stripe_off >= ssize) {
-                        /* Clamp to end of this stripe */
-                        stripe_off = ssize;
-                }
-        }
-
-        return (file_size * ssize + stripe_off);
-}
-
-/* given an extent in an lov and a stripe, calculate the extent of the stripe
- * that is contained within the lov extent.  this returns true if the given
- * stripe does intersect with the lov extent. */
-int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno,
-                          obd_off start, obd_off end,
-                          obd_off *obd_start, obd_off *obd_end)
-{
-        int start_side, end_side;
-
-        start_side = lov_stripe_offset(lsm, start, stripeno, obd_start);
-        end_side = lov_stripe_offset(lsm, end, stripeno, obd_end);
-
-        CDEBUG(D_INODE, "["LPU64"->"LPU64"] -> [(%d) "LPU64"->"LPU64" (%d)]\n",
-               start, end, start_side, *obd_start, *obd_end, end_side);
-
-        /* this stripe doesn't intersect the file extent when neither
-         * start or the end intersected the stripe and obd_start and
-         * obd_end got rounded up to the save value. */
-        if (start_side != 0 && end_side != 0 && *obd_start == *obd_end)
-                return 0;
-
-        /* as mentioned in the lov_stripe_offset commentary, end
-         * might have been shifted in the wrong direction.  This
-         * happens when an end offset is before the stripe when viewed
-         * through the "mod stripe size" math. we detect it being shifted
-         * in the wrong direction and touch it up.
-         * interestingly, this can't underflow since end must be > start
-         * if we passed through the previous check.
-         * (should we assert for that somewhere?) */
-        if (end_side != 0)
-                (*obd_end)--;
-
-        return 1;
-}
-
-/* compute which stripe number "lov_off" will be written into */
-int lov_stripe_number(struct lov_stripe_md *lsm, obd_off lov_off)
-{
-        unsigned long ssize  = lsm->lsm_stripe_size;
-        unsigned long swidth, stripe_off;
-        obd_off offset = lov_off;
-        int magic = lsm->lsm_magic;
-
-        LASSERT(lsm_op_find(magic) != NULL);
-        lsm_op_find(magic)->lsm_stripe_by_offset(lsm, NULL, &lov_off, &swidth);
-
-        stripe_off = do_div(lov_off, swidth);
-
-        return (stripe_off/ssize +
-                lsm_op_find(magic)->lsm_stripe_index_by_offset(lsm, offset));
-}
diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c
deleted file mode 100644
index ba8663b72f70046a2773b052644a0102250c837d..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_pack.c
+++ /dev/null
@@ -1,455 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * (Un)packing of OST/MDS requests
- *
- */
-
-#define DEBUG_SUBSYSTEM S_LOV
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <lustre_net.h>
-#include <obd.h>
-#include <obd_lov.h>
-#include <obd_class.h>
-#include <obd_support.h>
-#include <lustre/lustre_user.h>
-
-#include "lov_internal.h"
-
-void lov_dump_lmm_v1(int level, struct lov_mds_md_v1 *lmm)
-{
-        struct lov_ost_data_v1 *lod;
-        int i;
-
-        CDEBUG(level, "objid "LPX64", magic 0x%08x, pattern %#x\n",
-               le64_to_cpu(lmm->lmm_object_id), le32_to_cpu(lmm->lmm_magic),
-               le32_to_cpu(lmm->lmm_pattern));
-        CDEBUG(level,"stripe_size %u, stripe_count %u\n",
-               le32_to_cpu(lmm->lmm_stripe_size),
-               le32_to_cpu(lmm->lmm_stripe_count));
-
-        if (le32_to_cpu(lmm->lmm_stripe_count) <= LOV_V1_INSANE_STRIPE_COUNT) {
-                for (i = 0, lod = lmm->lmm_objects;
-                     i < (int)le32_to_cpu(lmm->lmm_stripe_count); i++, lod++)
-                         CDEBUG(level,
-                                "stripe %u idx %u subobj "LPX64"/"LPX64"\n",
-                                i, le32_to_cpu(lod->l_ost_idx),
-                                le64_to_cpu(lod->l_object_gr),
-                                le64_to_cpu(lod->l_object_id));
-        } else {
-                CDEBUG(level, "bad stripe_count %u > max_stripe_count %u\n",
-                       le32_to_cpu(lmm->lmm_stripe_count),
-                       LOV_V1_INSANE_STRIPE_COUNT);
-        }
-}
-
-void lov_dump_lmm_join(int level, struct lov_mds_md_join *lmmj)
-{
-
-        CDEBUG(level, "objid "LPX64", magic 0x%08X, pattern %#X\n",
-               le64_to_cpu(lmmj->lmmj_md.lmm_object_id), 
-               le32_to_cpu(lmmj->lmmj_md.lmm_magic),
-               le32_to_cpu(lmmj->lmmj_md.lmm_pattern));
-        CDEBUG(level,"stripe_size %u, stripe_count %u extent_count %u \n",
-               le32_to_cpu(lmmj->lmmj_md.lmm_stripe_size),
-               le32_to_cpu(lmmj->lmmj_md.lmm_stripe_count), 
-               le32_to_cpu(lmmj->lmmj_extent_count));
-}
-
-#define LMM_ASSERT(test)                                                \
-do {                                                                    \
-        if (!(test)) lov_dump_lmm(D_ERROR, lmm);                        \
-        LASSERT(test); /* so we know what assertion failed */           \
-} while(0)
-
-/* Pack LOV object metadata for disk storage.  It is packed in LE byte
- * order and is opaque to the networking layer.
- *
- * XXX In the future, this will be enhanced to get the EA size from the
- *     underlying OSC device(s) to get their EA sizes so we can stack
- *     LOVs properly.  For now lov_mds_md_size() just assumes one obd_id
- *     per stripe.
- */
-int lov_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
-               struct lov_stripe_md *lsm)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_oinfo *loi;
-        struct lov_mds_md *lmm;
-        int stripe_count = lov->desc.ld_tgt_count;
-        int lmm_size;
-        int i;
-        ENTRY;
-
-        if (lsm) {
-                if (lsm->lsm_magic != LOV_MAGIC) {
-                        CERROR("bad mem LOV MAGIC: 0x%08X != 0x%08X\n",
-                               lsm->lsm_magic, LOV_MAGIC);
-                        RETURN(-EINVAL);
-                }
-                if (!lmmp) {
-                        stripe_count = lov_get_stripecnt(lov, lsm->lsm_stripe_count);
-                        lsm->lsm_stripe_count = stripe_count;
-                } else {
-                        stripe_count = lsm->lsm_stripe_count;
-                }
-        }
-
-        /* XXX LOV STACKING call into osc for sizes */
-        lmm_size = lov_mds_md_size(stripe_count);
-
-        if (!lmmp)
-                RETURN(lmm_size);
-
-        if (*lmmp && !lsm) {
-                stripe_count = le32_to_cpu((*lmmp)->lmm_stripe_count);
-                OBD_FREE(*lmmp, lov_mds_md_size(stripe_count));
-                *lmmp = NULL;
-                RETURN(0);
-        }
-
-        if (!*lmmp) {
-                OBD_ALLOC(*lmmp, lmm_size);
-                if (!*lmmp)
-                        RETURN(-ENOMEM);
-        }
-
-        lmm = *lmmp;
-        lmm->lmm_magic = cpu_to_le32(LOV_MAGIC); /* only write new format */
-
-        if (!lsm)
-                RETURN(lmm_size);
-
-        lmm->lmm_object_id = cpu_to_le64(lsm->lsm_object_id);
-        lmm->lmm_object_gr = cpu_to_le64(lsm->lsm_object_gr);
-        lmm->lmm_stripe_size = cpu_to_le32(lsm->lsm_stripe_size);
-        lmm->lmm_stripe_count = cpu_to_le32(stripe_count);
-        lmm->lmm_pattern = cpu_to_le32(lsm->lsm_pattern);
-
-        for (i = 0; i < stripe_count; i++) {
-                loi = lsm->lsm_oinfo[i];
-                /* XXX LOV STACKING call down to osc_packmd() to do packing */
-                LASSERTF(loi->loi_id, "lmm_oid "LPU64" stripe %u/%u idx %u\n",
-                         lmm->lmm_object_id, i, stripe_count, loi->loi_ost_idx);
-                lmm->lmm_objects[i].l_object_id = cpu_to_le64(loi->loi_id);
-                lmm->lmm_objects[i].l_object_gr = cpu_to_le64(loi->loi_gr);
-                lmm->lmm_objects[i].l_ost_gen = cpu_to_le32(loi->loi_ost_gen);
-                lmm->lmm_objects[i].l_ost_idx = cpu_to_le32(loi->loi_ost_idx);
-        }
-
-        RETURN(lmm_size);
-}
-
-/* Find the max stripecount we should use */
-int lov_get_stripecnt(struct lov_obd *lov, __u32 stripe_count)
-{
-        if (!stripe_count)
-                stripe_count = lov->desc.ld_default_stripe_count;
-        if (stripe_count > lov->desc.ld_active_tgt_count)
-                stripe_count = lov->desc.ld_active_tgt_count;
-        if (!stripe_count)
-                stripe_count = 1;
-        /* for now, we limit the stripe count directly, when bug 4424 is
-         * fixed this needs to be somewhat dynamic based on whether ext3
-         * can handle larger EA sizes. */
-        if (stripe_count > LOV_MAX_STRIPE_COUNT)
-                stripe_count = LOV_MAX_STRIPE_COUNT;
-
-        return stripe_count;
-}
-
-
-static int lov_verify_lmm(void *lmm, int lmm_bytes, int *stripe_count)
-{
-        int rc;
-
-        if (lsm_op_find(le32_to_cpu(*(__u32 *)lmm)) == NULL) {
-                CERROR("bad disk LOV MAGIC: 0x%08X; dumping V1 LMM:\n",
-                       le32_to_cpu(*(__u32 *)lmm));
-                lov_dump_lmm_v1(D_WARNING, lmm);
-                return -EINVAL;
-        }
-        rc = lsm_op_find(le32_to_cpu(*(__u32 *)lmm))->lsm_lmm_verify(lmm,
-                                     lmm_bytes, stripe_count);
-        return rc;
-}
-
-int lov_alloc_memmd(struct lov_stripe_md **lsmp, int stripe_count, 
-                      int pattern, int magic)
-{
-        int i, lsm_size;
-        ENTRY;
-
-        CDEBUG(D_INFO, "alloc lsm, stripe_count %d\n", stripe_count);
-
-        *lsmp = lsm_alloc_plain(stripe_count, &lsm_size);
-        if (!*lsmp) {
-                CERROR("can't allocate lsmp, stripe_count %d\n", stripe_count);
-                RETURN(-ENOMEM);
-        }
-
-        spin_lock_init(&(*lsmp)->lsm_lock);
-        (*lsmp)->lsm_magic = magic;
-        (*lsmp)->lsm_stripe_count = stripe_count;
-        (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES * stripe_count;
-        (*lsmp)->lsm_pattern = pattern;
-        (*lsmp)->lsm_oinfo[0]->loi_ost_idx = ~0;
-
-        for (i = 0; i < stripe_count; i++)
-                loi_init((*lsmp)->lsm_oinfo[i]);
-
-        RETURN(lsm_size);
-}
-
-void lov_free_memmd(struct lov_stripe_md **lsmp)
-{
-        struct lov_stripe_md *lsm = *lsmp;
-        
-        LASSERT(lsm_op_find(lsm->lsm_magic) != NULL);
-        lsm_op_find(lsm->lsm_magic)->lsm_free(lsm);
-        
-        *lsmp = NULL;
-}
-
-
-/* Unpack LOV object metadata from disk storage.  It is packed in LE byte
- * order and is opaque to the networking layer.
- */
-int lov_unpackmd(struct obd_export *exp,  struct lov_stripe_md **lsmp, 
-                 struct lov_mds_md *lmm, int lmm_bytes)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        int rc = 0, stripe_count, lsm_size;
-        __u32 magic;
-        ENTRY;
-
-        /* If passed an MDS struct use values from there, otherwise defaults */
-        if (lmm) {
-                rc = lov_verify_lmm(lmm, lmm_bytes, &stripe_count);
-                if (rc)
-                        RETURN(rc);
-                magic = le32_to_cpu(lmm->lmm_magic);
-        } else {
-                stripe_count = lov_get_stripecnt(lov, 0);
-                magic = LOV_MAGIC;
-        }
-
-        /* If we aren't passed an lsmp struct, we just want the size */
-        if (!lsmp) {
-                /* XXX LOV STACKING call into osc for sizes */
-                LBUG();
-                RETURN(lov_stripe_md_size(stripe_count));
-        }
-
-        /* If we are passed an allocated struct but nothing to unpack, free */
-        if (*lsmp && !lmm) {
-                lov_free_memmd(lsmp);
-                RETURN(0);
-        }
-
-        lsm_size = lov_alloc_memmd(lsmp, stripe_count, LOV_PATTERN_RAID0, 
-                                   magic);
-        if (lsm_size < 0)
-                RETURN(lsm_size);
-
-        /* If we are passed a pointer but nothing to unpack, we only alloc */
-        if (!lmm)
-                RETURN(lsm_size);
-
-        LASSERT(lsm_op_find(magic) != NULL);
-        rc = lsm_op_find(magic)->lsm_unpackmd(lov, *lsmp, lmm);
-        if (rc) {
-                lov_free_memmd(lsmp);
-                RETURN(rc);
-        }
-
-        RETURN(lsm_size);
-}
-
-/* Configure object striping information on a new file.
- *
- * @lmmu is a pointer to a user struct with one or more of the fields set to
- * indicate the application preference: lmm_stripe_count, lmm_stripe_size,
- * lmm_stripe_offset, and lmm_stripe_pattern.  lmm_magic must be LOV_MAGIC.
- * @lsmp is a pointer to an in-core stripe MD that needs to be filled in.
- */
-int lov_setstripe(struct obd_export *exp, struct lov_stripe_md **lsmp,
-                  struct lov_user_md *lump)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_user_md lum;
-        int stripe_count;
-        int rc;
-        ENTRY;
-
-        rc = copy_from_user(&lum, lump, sizeof(lum));
-        if (rc)
-                RETURN(-EFAULT);
-
-        if (lum.lmm_magic != LOV_USER_MAGIC) {
-                if (lum.lmm_magic == __swab32(LOV_USER_MAGIC)) {
-                        lustre_swab_lov_user_md(&lum);
-                } else {
-                        CDEBUG(D_IOCTL, "bad userland LOV MAGIC:"
-                               " %#08x != %#08x\n",
-                               lum.lmm_magic, LOV_USER_MAGIC);
-                        RETURN(-EINVAL);
-                }
-        }
-
-        if (lum.lmm_pattern == 0) {
-                lum.lmm_pattern = lov->desc.ld_pattern ?
-                        lov->desc.ld_pattern : LOV_PATTERN_RAID0;
-        }
-
-        if (lum.lmm_pattern != LOV_PATTERN_RAID0) {
-                CDEBUG(D_IOCTL, "bad userland stripe pattern: %#x\n",
-                       lum.lmm_pattern);
-                RETURN(-EINVAL);
-        }
-
-        /* 64kB is the largest common page size we see (ia64), and matches the
-         * check in lfs */
-        if (lum.lmm_stripe_size & (LOV_MIN_STRIPE_SIZE - 1)) {
-                CDEBUG(D_IOCTL, "stripe size %u not multiple of %u, fixing\n",
-                       lum.lmm_stripe_size, LOV_MIN_STRIPE_SIZE);
-                lum.lmm_stripe_size = LOV_MIN_STRIPE_SIZE;
-        }
-
-        if ((lum.lmm_stripe_offset >= lov->desc.ld_tgt_count) &&
-            (lum.lmm_stripe_offset != (typeof(lum.lmm_stripe_offset))(-1))) {
-                CDEBUG(D_IOCTL, "stripe offset %u > number of OSTs %u\n",
-                       lum.lmm_stripe_offset, lov->desc.ld_tgt_count);
-                RETURN(-EINVAL);
-        }
-        stripe_count = lov_get_stripecnt(lov, lum.lmm_stripe_count);
-
-        if ((__u64)lum.lmm_stripe_size * stripe_count > ~0U) {
-                CDEBUG(D_IOCTL, "stripe width %ux%u exceeds %u bytes\n",
-                       lum.lmm_stripe_size, (int)lum.lmm_stripe_count, ~0U);
-                RETURN(-EINVAL);
-        }
-
-        rc = lov_alloc_memmd(lsmp, stripe_count, lum.lmm_pattern, LOV_MAGIC);
-
-        if (rc < 0)
-                RETURN(rc);
-
-        (*lsmp)->lsm_oinfo[0]->loi_ost_idx = lum.lmm_stripe_offset;
-        (*lsmp)->lsm_stripe_size = lum.lmm_stripe_size;
-
-        RETURN(0);
-}
-
-int lov_setea(struct obd_export *exp, struct lov_stripe_md **lsmp,
-              struct lov_user_md *lump)
-{
-        int i;
-        int rc;
-        struct obd_export *oexp;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        obd_id last_id = 0;
-
-        ENTRY;
-        for (i = 0; i < lump->lmm_stripe_count; i++) {
-                __u32 len = sizeof(last_id);
-                oexp = lov->lov_tgts[lump->lmm_objects[i].l_ost_idx]->ltd_exp;
-                rc = obd_get_info(oexp, strlen("last_id"), "last_id",
-                                  &len, &last_id);
-                if (rc)
-                        RETURN(rc);
-                if (lump->lmm_objects[i].l_object_id > last_id) {
-                        CERROR("Setting EA for object > than last id on "
-                               "ost idx %d "LPD64" > "LPD64" \n",
-                               lump->lmm_objects[i].l_ost_idx,
-                               lump->lmm_objects[i].l_object_id, last_id);
-                        RETURN(-EINVAL);
-                }
-        }
-
-        rc = lov_setstripe(exp, lsmp, lump);
-        if (rc)
-                RETURN(rc);
-
-        for (i = 0; i < lump->lmm_stripe_count; i++) {
-                (*lsmp)->lsm_oinfo[i]->loi_ost_idx =
-                        lump->lmm_objects[i].l_ost_idx;
-                (*lsmp)->lsm_oinfo[i]->loi_id = lump->lmm_objects[i].l_object_id;
-                (*lsmp)->lsm_oinfo[i]->loi_gr = lump->lmm_objects[i].l_object_gr;
-        }
-        RETURN(0);
-}
-
-
-/* Retrieve object striping information.
- *
- * @lump is a pointer to an in-core struct with lmm_ost_count indicating
- * the maximum number of OST indices which will fit in the user buffer.
- * lmm_magic must be LOV_USER_MAGIC.
- */
-int lov_getstripe(struct obd_export *exp, struct lov_stripe_md *lsm,
-                  struct lov_user_md *lump)
-{
-        struct lov_user_md lum;
-        struct lov_mds_md *lmmk = NULL;
-        int rc, lmm_size;
-        ENTRY;
-
-        if (!lsm)
-                RETURN(-ENODATA);
-
-        rc = copy_from_user(&lum, lump, sizeof(lum));
-        if (rc)
-                RETURN(-EFAULT);
-
-        if (lum.lmm_magic != LOV_USER_MAGIC)
-                RETURN(-EINVAL);
-
-        rc = lov_packmd(exp, &lmmk, lsm);
-        if (rc < 0)
-                RETURN(rc);
-        lmm_size = rc;
-        rc = 0;
-
-        /* FIXME: Bug 1185 - copy fields properly when structs change */
-        LASSERT(sizeof(lum) == sizeof(*lmmk));
-        LASSERT(sizeof(lum.lmm_objects[0]) == sizeof(lmmk->lmm_objects[0]));
-
-        /* User wasn't expecting this many OST entries */
-        if (lum.lmm_stripe_count == 0) {
-                if (copy_to_user(lump, lmmk, sizeof(lum)))
-                        rc = -EFAULT;
-        } else if (lum.lmm_stripe_count < lmmk->lmm_stripe_count) {
-                rc = -EOVERFLOW;
-        } else if (copy_to_user(lump, lmmk, lmm_size)) {
-                rc = -EFAULT;
-        }
-
-        obd_free_diskmd(exp, &lmmk);
-
-        RETURN(rc);
-}
diff --git a/lustre/lov/lov_qos.c b/lustre/lov/lov_qos.c
deleted file mode 100644
index 19d06888ec170a6414d0baeb3a13d82ed011cec0..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_qos.c
+++ /dev/null
@@ -1,956 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-#include "lov_internal.h"
-
-/* #define QOS_DEBUG 1 */
-#define D_QOS D_OTHER
-
-#define TGT_BAVAIL(i)  (lov->lov_tgts[i]->ltd_exp->exp_obd->obd_osfs.os_bavail*\
-                        lov->lov_tgts[i]->ltd_exp->exp_obd->obd_osfs.os_bsize)
-#define TGT_FFREE(i)   (lov->lov_tgts[i]->ltd_exp->exp_obd->obd_osfs.os_ffree)
-
-
-int qos_add_tgt(struct obd_device *obd, __u32 index)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_qos_oss *oss, *temposs;
-        struct obd_export *exp = lov->lov_tgts[index]->ltd_exp;
-        int rc = 0, found = 0;
-        ENTRY;
-
-        /* We only need this QOS struct on MDT, not clients - but we may not
-         * have registered the LOV's observer yet, so there's no way to know */
-        if (!exp || !exp->exp_connection) {
-                CERROR("Missing connection\n");
-                RETURN(-ENOTCONN);
-        }
-
-        down_write(&lov->lov_qos.lq_rw_sem);
-        mutex_down(&lov->lov_lock);
-        list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
-                if (obd_uuid_equals(&oss->lqo_uuid,
-                                    &exp->exp_connection->c_remote_uuid)) {
-                        found++;
-                        break;
-                }
-        }
-
-        if (!found) {
-                OBD_ALLOC_PTR(oss);
-                if (!oss)
-                        GOTO(out, rc = -ENOMEM);
-                memcpy(&oss->lqo_uuid,
-                       &exp->exp_connection->c_remote_uuid,
-                       sizeof(oss->lqo_uuid));
-        } else {
-                /* Assume we have to move this one */
-                list_del(&oss->lqo_oss_list);
-        }
-
-        oss->lqo_ost_count++;
-        lov->lov_tgts[index]->ltd_qos.ltq_oss = oss;
-
-        /* Add sorted by # of OSTs.  Find the first entry that we're
-           bigger than... */
-        list_for_each_entry(temposs, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
-                if (oss->lqo_ost_count > temposs->lqo_ost_count)
-                        break;
-        }
-        /* ...and add before it.  If we're the first or smallest, temposs
-           points to the list head, and we add to the end. */
-        list_add_tail(&oss->lqo_oss_list, &temposs->lqo_oss_list);
-
-        lov->lov_qos.lq_dirty = 1;
-        lov->lov_qos.lq_dirty_rr = 1;
-
-        CDEBUG(D_QOS, "add tgt %s to OSS %s (%d OSTs)\n",
-               obd_uuid2str(&lov->lov_tgts[index]->ltd_uuid),
-               obd_uuid2str(&oss->lqo_uuid),
-               oss->lqo_ost_count);
-
-out:
-        mutex_up(&lov->lov_lock);
-        up_write(&lov->lov_qos.lq_rw_sem);
-        RETURN(rc);
-}
-
-int qos_del_tgt(struct obd_device *obd, __u32 index)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_qos_oss *oss;
-        int rc = 0;
-        ENTRY;
-
-        if (!lov->lov_tgts[index])
-                RETURN(0);
-
-        down_write(&lov->lov_qos.lq_rw_sem);
-
-        oss = lov->lov_tgts[index]->ltd_qos.ltq_oss;
-        if (!oss)
-                GOTO(out, rc = -ENOENT);
-
-        oss->lqo_ost_count--;
-        if (oss->lqo_ost_count == 0) {
-                CDEBUG(D_QOS, "removing OSS %s\n",
-                       obd_uuid2str(&oss->lqo_uuid));
-                list_del(&oss->lqo_oss_list);
-                OBD_FREE_PTR(oss);
-        }
-
-        lov->lov_qos.lq_dirty = 1;
-        lov->lov_qos.lq_dirty_rr = 1;
-out:
-        up_write(&lov->lov_qos.lq_rw_sem);
-        RETURN(rc);
-}
-
-/* Recalculate per-object penalties for OSSs and OSTs,
-   depends on size of each ost in an oss */
-static int qos_calc_ppo(struct obd_device *obd)
-{
-        struct lov_obd *lov = &obd->u.lov;
-        struct lov_qos_oss *oss;
-        __u64 ba_max, ba_min, temp;
-        __u32 num_active;
-        int rc, i, prio_wide;
-        ENTRY;
-
-        if (!lov->lov_qos.lq_dirty)
-                GOTO(out, rc = 0);
-
-        num_active = lov->desc.ld_active_tgt_count - 1;
-        if (num_active < 1)
-                GOTO(out, rc = -EAGAIN);
-
-        /* find bavail on each OSS */
-        list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
-                oss->lqo_bavail = 0;
-        }
-        lov->lov_qos.lq_active_oss_count = 0;
-
-        /* How badly user wants to select osts "widely" (not recently chosen
-           and not on recent oss's).  As opposed to "freely" (free space
-           avail.) 0-256. */
-        prio_wide = 256 - lov->lov_qos.lq_prio_free;
-
-        ba_min = (__u64)(-1);
-        ba_max = 0;
-        /* Calculate OST penalty per object */
-        /* (lov ref taken in alloc_qos) */
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
-                        continue;
-                temp = TGT_BAVAIL(i);
-                if (!temp)
-                        continue;
-                ba_min = min(temp, ba_min);
-                ba_max = max(temp, ba_max);
-
-                /* Count the number of usable OSS's */
-                if (lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_bavail == 0)
-                        lov->lov_qos.lq_active_oss_count++;
-                lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_bavail += temp;
-
-                /* per-OST penalty is prio * TGT_bavail / (num_ost - 1) / 2 */
-                temp >>= 1;
-                do_div(temp, num_active);
-                lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj =
-                        (temp * prio_wide) >> 8;
-
-                if (lov->lov_qos.lq_reset == 0)
-                        lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0;
-        }
-
-        num_active = lov->lov_qos.lq_active_oss_count - 1;
-        if (num_active < 1) {
-                /* If there's only 1 OSS, we can't penalize it, so instead
-                   we have to double the OST penalty */
-                num_active = 1;
-                for (i = 0; i < lov->desc.ld_tgt_count; i++)
-                        if (lov->lov_tgts[i]) 
-                            lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj <<= 1;
-        }
-
-        /* Per-OSS penalty is prio * oss_avail / oss_osts / (num_oss - 1) / 2 */
-        list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
-                temp = oss->lqo_bavail >> 1;
-                do_div(temp, oss->lqo_ost_count * num_active);
-                oss->lqo_penalty_per_obj = (temp * prio_wide) >> 8;
-                if (lov->lov_qos.lq_reset == 0)
-                        oss->lqo_penalty = 0;
-        }
-
-        lov->lov_qos.lq_dirty = 0;
-        lov->lov_qos.lq_reset = 0;
-
-        /* If each ost has almost same free space,
-         * do rr allocation for better creation performance */
-        lov->lov_qos.lq_same_space = 0;
-        temp = ba_max - ba_min;
-        ba_min = (ba_min * 51) >> 8;     /* 51/256 = .20 */
-        if (temp < ba_min) {
-                /* Difference is less than 20% */
-                lov->lov_qos.lq_same_space = 1;
-                /* Reset weights for the next time we enter qos mode */
-                lov->lov_qos.lq_reset = 0;
-        }
-        rc = 0;
-
-out:
-        if (!rc && lov->lov_qos.lq_same_space)
-                RETURN(-EAGAIN);
-        RETURN(rc);
-}
-
-static int qos_calc_weight(struct lov_obd *lov, int i)
-{
-        __u64 temp, temp2;
-
-        /* Final ost weight = TGT_BAVAIL - ost_penalty - oss_penalty */
-        temp = TGT_BAVAIL(i);
-        temp2 = lov->lov_tgts[i]->ltd_qos.ltq_penalty +
-                lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_penalty;
-        if (temp < temp2)
-                lov->lov_tgts[i]->ltd_qos.ltq_weight = 0;
-        else
-                lov->lov_tgts[i]->ltd_qos.ltq_weight = temp - temp2;
-        return 0;
-}
-
-/* We just used this index for a stripe; adjust everyone's weights */
-static int qos_used(struct lov_obd *lov, __u32 index, __u64 *total_wt)
-{
-        struct lov_qos_oss *oss;
-        int i;
-        ENTRY;
-
-        /* Don't allocate from this stripe anymore, until the next alloc_qos */
-        lov->lov_tgts[index]->ltd_qos.ltq_usable = 0;
-
-        oss = lov->lov_tgts[index]->ltd_qos.ltq_oss;
-
-        /* Decay old penalty by half (we're adding max penalty, and don't
-           want it to run away.) */
-        lov->lov_tgts[index]->ltd_qos.ltq_penalty >>= 1;
-        oss->lqo_penalty >>= 1;
-
-        /* Set max penalties for this OST and OSS */
-        lov->lov_tgts[index]->ltd_qos.ltq_penalty +=
-                lov->lov_tgts[index]->ltd_qos.ltq_penalty_per_obj *
-                lov->desc.ld_active_tgt_count;
-        oss->lqo_penalty += oss->lqo_penalty_per_obj *
-                lov->lov_qos.lq_active_oss_count;
-
-        /* Decrease all OSS penalties */
-        list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
-                if (oss->lqo_penalty < oss->lqo_penalty_per_obj)
-                        oss->lqo_penalty = 0;
-                else
-                        oss->lqo_penalty -= oss->lqo_penalty_per_obj;
-        }
-
-        *total_wt = 0;
-        /* Decrease all OST penalties */
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
-                        continue;
-                if (lov->lov_tgts[i]->ltd_qos.ltq_penalty <
-                    lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj)
-                        lov->lov_tgts[i]->ltd_qos.ltq_penalty = 0;
-                else
-                        lov->lov_tgts[i]->ltd_qos.ltq_penalty -=
-                        lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj;
-
-                qos_calc_weight(lov, i);
-
-                /* Recalc the total weight of usable osts */
-                if (lov->lov_tgts[i]->ltd_qos.ltq_usable)
-                        *total_wt += lov->lov_tgts[i]->ltd_qos.ltq_weight;
-
-#ifdef QOS_DEBUG
-                CDEBUG(D_QOS, "recalc tgt %d avail="LPU64
-                       " ostppo="LPU64" ostp="LPU64" ossppo="LPU64
-                       " ossp="LPU64" wt="LPU64"\n",
-                       i, TGT_BAVAIL(i) >> 10,
-                       lov->lov_tgts[i]->ltd_qos.ltq_penalty_per_obj >> 10,
-                       lov->lov_tgts[i]->ltd_qos.ltq_penalty >> 10,
-                       lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_penalty_per_obj>>10,
-                       lov->lov_tgts[i]->ltd_qos.ltq_oss->lqo_penalty>>10,
-                       lov->lov_tgts[i]->ltd_qos.ltq_weight>>10);
-#endif
-        }
-
-        RETURN(0);
-}
-
-#define LOV_QOS_EMPTY ((__u32)-1)
-/* compute optimal round-robin order, based on OSTs per OSS */
-static int qos_calc_rr(struct lov_obd *lov)
-{
-        struct lov_qos_oss *oss;
-        unsigned ost_count, placed, real_count;
-        int i;
-        ENTRY;
-
-        if (!lov->lov_qos.lq_dirty_rr) {
-                LASSERT(lov->lov_qos.lq_rr_size);
-                RETURN(0);
-        }
-
-        down_write(&lov->lov_qos.lq_rw_sem);
-        ost_count = lov->desc.ld_tgt_count;
-
-        if (lov->lov_qos.lq_rr_size)
-                OBD_FREE(lov->lov_qos.lq_rr_array, lov->lov_qos.lq_rr_size);
-        lov->lov_qos.lq_rr_size = ost_count *
-                sizeof(lov->lov_qos.lq_rr_array[0]);
-        OBD_ALLOC(lov->lov_qos.lq_rr_array, lov->lov_qos.lq_rr_size);
-        if (!lov->lov_qos.lq_rr_array) {
-                lov->lov_qos.lq_rr_size = 0;
-                up_write(&lov->lov_qos.lq_rw_sem);
-                RETURN(-ENOMEM);
-        }
-
-        real_count = 0;
-        for (i = 0; i < ost_count; i++) {
-                lov->lov_qos.lq_rr_array[i] = LOV_QOS_EMPTY;
-                if (lov->lov_tgts[i])
-                        real_count++;
-        }
-
-        /* Place all the OSTs from 1 OSS at the same time. */
-        placed = 0;
-        list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
-                int j = 0;
-                for (i = 0; i < ost_count; i++) {
-                        if (lov->lov_tgts[i] &&
-                            (lov->lov_tgts[i]->ltd_qos.ltq_oss == oss)) {
-                              /* Evenly space these OSTs across arrayspace */
-                              int next = j * ost_count / oss->lqo_ost_count;
-                              while (lov->lov_qos.lq_rr_array[next] !=
-                                     LOV_QOS_EMPTY)
-                                      next = (next + 1) % ost_count;
-                              lov->lov_qos.lq_rr_array[next] = i;
-                              j++;
-                              placed++;
-                        }
-                }
-                LASSERT(j == oss->lqo_ost_count);
-        }
-
-        lov->lov_qos.lq_dirty_rr = 0;
-        up_write(&lov->lov_qos.lq_rw_sem);
-
-        if (placed != real_count) {
-                /* This should never happen */
-                LCONSOLE_ERROR_MSG(0x14e, "Failed to place all OSTs in the "
-                                   "round-robin list (%d of %d).\n", 
-                                   placed, real_count);
-                for (i = 0; i < ost_count; i++) {
-                        LCONSOLE(D_WARNING, "rr #%d ost idx=%d\n", i,
-                                 lov->lov_qos.lq_rr_array[i]);
-                }
-                lov->lov_qos.lq_dirty_rr = 1;
-                RETURN(-EAGAIN);
-        }
-
-#ifdef QOS_DEBUG
-        for (i = 0; i < ost_count; i++) {
-                LCONSOLE(D_QOS, "rr #%d ost idx=%d\n", i,
-                         lov->lov_qos.lq_rr_array[i]);
-        }
-#endif
-
-        RETURN(0);
-}
-
-
-void qos_shrink_lsm(struct lov_request_set *set)
-{
-        struct lov_stripe_md *lsm = set->set_oi->oi_md, *lsm_new;
-        /* XXX LOV STACKING call into osc for sizes */
-        unsigned oldsize, newsize;
-
-        if (set->set_oti && set->set_cookies && set->set_cookie_sent) {
-                struct llog_cookie *cookies;
-                oldsize = lsm->lsm_stripe_count * sizeof(*cookies);
-                newsize = set->set_count * sizeof(*cookies);
-
-                cookies = set->set_cookies;
-                oti_alloc_cookies(set->set_oti, set->set_count);
-                if (set->set_oti->oti_logcookies) {
-                        memcpy(set->set_oti->oti_logcookies, cookies, newsize);
-                        OBD_FREE(cookies, oldsize);
-                        set->set_cookies = set->set_oti->oti_logcookies;
-                } else {
-                        CWARN("'leaking' %d bytes\n", oldsize - newsize);
-                }
-        }
-
-        CWARN("using fewer stripes for object "LPU64": old %u new %u\n",
-              lsm->lsm_object_id, lsm->lsm_stripe_count, set->set_count);
-        LASSERT(lsm->lsm_stripe_count >= set->set_count);
-
-        newsize = lov_stripe_md_size(set->set_count);
-        OBD_ALLOC(lsm_new, newsize);
-        if (lsm_new != NULL) {
-                int i;
-                memcpy(lsm_new, lsm, sizeof(*lsm));
-                for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                        if (i < set->set_count) {
-                                lsm_new->lsm_oinfo[i] = lsm->lsm_oinfo[i];
-                                continue;
-                        }
-                        OBD_SLAB_FREE(lsm->lsm_oinfo[i], lov_oinfo_slab,
-                                      sizeof(struct lov_oinfo));
-                }
-                lsm_new->lsm_stripe_count = set->set_count;
-                OBD_FREE(lsm, sizeof(struct lov_stripe_md) +
-                         lsm->lsm_stripe_count * sizeof(struct lov_oinfo *));
-                set->set_oi->oi_md = lsm_new;
-        } else {
-                CWARN("'leaking' few bytes\n");
-        }
-}
-
-int qos_remedy_create(struct lov_request_set *set, struct lov_request *req)
-{
-        struct lov_stripe_md *lsm = set->set_oi->oi_md;
-        struct lov_obd *lov = &set->set_exp->exp_obd->u.lov;
-        unsigned ost_idx, ost_count = lov->desc.ld_tgt_count;
-        int stripe, i, rc = -EIO;
-        ENTRY;
-
-        ost_idx = (req->rq_idx + lsm->lsm_stripe_count) % ost_count;
-        for (i = 0; i < ost_count; i++, ost_idx = (ost_idx + 1) % ost_count) {
-                if (!lov->lov_tgts[ost_idx] ||
-                    !lov->lov_tgts[ost_idx]->ltd_active)
-                        continue;
-                /* check if objects has been created on this ost */
-                for (stripe = 0; stripe < lsm->lsm_stripe_count; stripe++) {
-                        if (stripe == req->rq_stripe)
-                                continue;
-                        if (ost_idx == lsm->lsm_oinfo[stripe]->loi_ost_idx)
-                                break;
-                }
-
-                if (stripe >= lsm->lsm_stripe_count) {
-                        req->rq_idx = ost_idx;
-                        rc = obd_create(lov->lov_tgts[ost_idx]->ltd_exp,
-                                        req->rq_oi.oi_oa, &req->rq_oi.oi_md,
-                                        set->set_oti);
-                        if (!rc)
-                                break;
-                }
-        }
-        RETURN(rc);
-}
-
-static int min_stripe_count(int stripe_cnt, int flags)
-{
-        return (flags & LOV_USES_DEFAULT_STRIPE ?
-                stripe_cnt - (stripe_cnt / 4) : stripe_cnt);
-}
-
-#define LOV_CREATE_RESEED_MULT 4
-#define LOV_CREATE_RESEED_MIN  1000
-/* Allocate objects on osts with round-robin algorithm */
-static int alloc_rr(struct lov_obd *lov, int *idx_arr, int *stripe_cnt,
-                    int flags)
-{
-        unsigned array_idx, ost_count = lov->desc.ld_tgt_count;
-        unsigned ost_active_count = lov->desc.ld_active_tgt_count;
-        int i, *idx_pos;
-        __u32 ost_idx;
-        int ost_start_idx_temp;
-        int speed = 0;
-        int stripe_cnt_min = min_stripe_count(*stripe_cnt, flags);
-        ENTRY;
-
-        i = qos_calc_rr(lov);
-        if (i)
-                RETURN(i);
-
-        if (--lov->lov_start_count <= 0) {
-                lov->lov_start_idx = ll_rand() % ost_count;
-                lov->lov_start_count =
-                        (LOV_CREATE_RESEED_MIN / max(ost_active_count, 1U) +
-                         LOV_CREATE_RESEED_MULT) * max(ost_active_count, 1U);
-        } else if (stripe_cnt_min >= ost_active_count ||
-                   lov->lov_start_idx > ost_count) {
-                /* If we have allocated from all of the OSTs, slowly
-                 * precess the next start if the OST/stripe count isn't
-                 * already doing this for us. */
-                lov->lov_start_idx %= ost_count;
-                if (*stripe_cnt > 1 && (ost_active_count % (*stripe_cnt)) != 1)
-                        ++lov->lov_offset_idx;
-        }
-        down_read(&lov->lov_qos.lq_rw_sem);
-        ost_start_idx_temp = lov->lov_start_idx;
-
-repeat_find :
-        array_idx = (lov->lov_start_idx + lov->lov_offset_idx) % ost_count;
-        idx_pos = idx_arr;
-#ifdef QOS_DEBUG
-        CDEBUG(D_QOS, "want %d startidx %d startcnt %d offset %d active %d "
-               "count %d arrayidx %d\n",
-               stripe_cnt, lov->lov_start_idx, lov->lov_start_count,
-               lov->lov_offset_idx, ost_active_count, ost_count, array_idx);
-#endif
-
-        for (i = 0; i < ost_count; i++, array_idx=(array_idx + 1) % ost_count) {
-                ++lov->lov_start_idx;
-                ost_idx = lov->lov_qos.lq_rr_array[array_idx];
-#ifdef QOS_DEBUG
-                CDEBUG(D_QOS, "#%d strt %d act %d strp %d ary %d idx %d\n",
-                       i, lov->lov_start_idx,
-                       ((ost_idx != LOV_QOS_EMPTY) && lov->lov_tgts[ost_idx]) ?
-                       lov->lov_tgts[ost_idx]->ltd_active : 0,
-                       idx_pos - idx_arr, array_idx, ost_idx);
-#endif
-                if ((ost_idx == LOV_QOS_EMPTY) || !lov->lov_tgts[ost_idx] ||
-                    !lov->lov_tgts[ost_idx]->ltd_active)
-                        continue;
-
-                /* Fail Check before osc_precreate() is called
-                   so we can only 'fail' single OSC. */
-                if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && ost_idx == 0)
-                        continue;
-
-                /* Drop slow OSCs if we can */
-                if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed)
-                        continue;
-
-                *idx_pos = ost_idx;
-                idx_pos++;
-                /* We have enough stripes */
-                if (idx_pos - idx_arr == *stripe_cnt)
-                        break;
-        }
-        if ((speed < 2) && (idx_pos - idx_arr < stripe_cnt_min)) {
-                /* Try again, allowing slower OSCs */
-                speed++;
-                lov->lov_start_idx = ost_start_idx_temp;
-                goto repeat_find;
-        }
-
-        up_read(&lov->lov_qos.lq_rw_sem);
-
-        *stripe_cnt = idx_pos - idx_arr;
-        RETURN(0);
-}
-
-/* alloc objects on osts with specific stripe offset */
-static int alloc_specific(struct lov_obd *lov, struct lov_stripe_md *lsm,
-                          int *idx_arr)
-{
-        unsigned ost_idx, ost_count = lov->desc.ld_tgt_count;
-        int i, *idx_pos;
-        int speed = 0;
-        ENTRY;
-
-repeat_find:
-        ost_idx = lsm->lsm_oinfo[0]->loi_ost_idx;
-        idx_pos = idx_arr;
-        for (i = 0; i < ost_count; i++, ost_idx = (ost_idx + 1) % ost_count) {
-                if (!lov->lov_tgts[ost_idx] ||
-                    !lov->lov_tgts[ost_idx]->ltd_active) {
-                        continue;
-                }
-
-                /* Fail Check before osc_precreate() is called
-                   so we can only 'fail' single OSC. */
-                if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && ost_idx == 0)
-                        continue;
-
-                /* Drop slow OSCs if we can, but not for requested start idx */
-                if (obd_precreate(lov->lov_tgts[ost_idx]->ltd_exp) > speed &&
-                    (i != 0 || speed < 2))
-                        continue;
-
-                *idx_pos = ost_idx;
-                idx_pos++;
-                /* We have enough stripes */
-                if (idx_pos - idx_arr == lsm->lsm_stripe_count)
-                        RETURN(0);
-        }
-        if (speed < 2) {
-                /* Try again, allowing slower OSCs */
-                speed++;
-                goto repeat_find;
-        }
-
-        /* If we were passed specific striping params, then a failure to
-         * meet those requirements is an error, since we can't reallocate
-         * that memory (it might be part of a larger array or something).
-         *
-         * We can only get here if lsm_stripe_count was originally > 1.
-         */
-        CERROR("can't lstripe objid "LPX64": have "LPSZ" want %u\n",
-               lsm->lsm_object_id, idx_pos - idx_arr, lsm->lsm_stripe_count);
-        RETURN(-EFBIG);
-}
-
-/* Alloc objects on osts with optimization based on:
-   - free space
-   - network resources (shared OSS's)
-*/
-static int alloc_qos(struct obd_export *exp, int *idx_arr, int *stripe_cnt,
-                     int flags)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        static time_t last_warn = 0;
-        time_t now = cfs_time_current_sec();
-        __u64 total_bavail, total_weight = 0;
-        __u32 ost_count;
-        int nfound, good_osts, i, warn = 0, rc = 0;
-        int stripe_cnt_min = min_stripe_count(*stripe_cnt, flags);
-        ENTRY;
-
-        if (stripe_cnt_min < 1)
-                GOTO(out, rc = -EINVAL);
-
-        lov_getref(exp->exp_obd);
-        down_write(&lov->lov_qos.lq_rw_sem);
-
-        ost_count = lov->desc.ld_tgt_count;
-
-        if (lov->desc.ld_active_tgt_count < 2)
-                GOTO(out, rc = -EAGAIN);
-
-        rc = qos_calc_ppo(exp->exp_obd);
-        if (rc)
-                GOTO(out, rc);
-
-        total_bavail = 0;
-        good_osts = 0;
-        /* Warn users about zero available space/inode every 30 min */
-        if (cfs_time_sub(now, last_warn) > 60 * 30)
-                warn = 1;
-        /* Find all the OSTs that are valid stripe candidates */
-        for (i = 0; i < ost_count; i++) {
-                __u64 bavail;
-
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
-                        continue;
-                bavail = TGT_BAVAIL(i);
-                if (!bavail) {
-                        if (warn) {
-                                CDEBUG(D_QOS, "no free space on %s\n",
-                                     obd_uuid2str(&lov->lov_tgts[i]->ltd_uuid));
-                                last_warn = now;
-                        }
-                        continue;
-                }
-                if (!TGT_FFREE(i)) {
-                        if (warn) {
-                                CDEBUG(D_QOS, "no free inodes on %s\n",
-                                     obd_uuid2str(&lov->lov_tgts[i]->ltd_uuid));
-                                last_warn = now;
-                        }
-                        continue;
-                }
-
-                /* Fail Check before osc_precreate() is called
-                   so we can only 'fail' single OSC. */
-                if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_PRECREATE) && i == 0)
-                        continue;
-
-                if (obd_precreate(lov->lov_tgts[i]->ltd_exp) > 2)
-                        continue;
-
-                lov->lov_tgts[i]->ltd_qos.ltq_usable = 1;
-                qos_calc_weight(lov, i);
-                total_bavail += bavail;
-                total_weight += lov->lov_tgts[i]->ltd_qos.ltq_weight;
-
-                good_osts++;
-        }
-
-        if (good_osts < stripe_cnt_min)
-                GOTO(out, rc = -EAGAIN);
-
-        if (!total_bavail)
-                GOTO(out, rc = -ENOSPC);
-
-        /* We have enough osts */
-        if (good_osts < *stripe_cnt)
-                *stripe_cnt = good_osts;
-
-        /* Find enough OSTs with weighted random allocation. */
-        nfound = 0;
-        while (nfound < *stripe_cnt) {
-                __u64 rand, cur_weight;
-
-                cur_weight = 0;
-                rc = -ENODEV;
-
-                if (total_weight) {
-#if BITS_PER_LONG == 32
-                        rand = ll_rand() % (unsigned)total_weight;
-                        /* If total_weight > 32-bit, first generate the high
-                         * 32 bits of the random number, then add in the low
-                         * 32 bits (truncated to the upper limit, if needed) */
-                        if (total_weight > 0xffffffffULL)
-                                rand = (__u64)(ll_rand() %
-                                          (unsigned)(total_weight >> 32)) << 32;
-                        else
-                                rand = 0;
-
-                        if (rand == (total_weight & 0xffffffff00000000ULL))
-                                rand |= ll_rand() % (unsigned)total_weight;
-                        else
-                                rand |= ll_rand();
-
-#else
-                        rand = ((__u64)ll_rand() << 32 | ll_rand()) %
-                                total_weight;
-#endif
-                } else {
-                        rand = 0;
-                }
-
-                /* On average, this will hit larger-weighted osts more often.
-                   0-weight osts will always get used last (only when rand=0).*/
-                for (i = 0; i < ost_count; i++) {
-                        if (!lov->lov_tgts[i] ||
-                            !lov->lov_tgts[i]->ltd_qos.ltq_usable)
-                                continue;
-
-                        cur_weight += lov->lov_tgts[i]->ltd_qos.ltq_weight;
-                        if (cur_weight >= rand) {
-#ifdef QOS_DEBUG
-                                CDEBUG(D_QOS, "assigned stripe=%d to idx=%d\n",
-                                       nfound, i);
-#endif
-                                idx_arr[nfound++] = i;
-                                qos_used(lov, i, &total_weight);
-                                rc = 0;
-                                break;
-                        }
-                }
-                /* should never satisfy below condition */
-                if (rc) {
-                        CERROR("Didn't find any OSTs?\n");
-                        break;
-                }
-        }
-        LASSERT(nfound == *stripe_cnt);
-
-out:
-        up_write(&lov->lov_qos.lq_rw_sem);
-
-        if (rc == -EAGAIN)
-                rc = alloc_rr(lov, idx_arr, stripe_cnt, flags);
-
-        lov_putref(exp->exp_obd);
-        RETURN(rc);
-}
-
-/* return new alloced stripe count on success */
-static int alloc_idx_array(struct obd_export *exp, struct lov_stripe_md *lsm,
-                           int newea, int **idx_arr, int *arr_cnt, int flags)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int stripe_cnt = lsm->lsm_stripe_count;
-        int i, rc = 0;
-        int *tmp_arr = NULL;
-        ENTRY;
-
-        *arr_cnt = stripe_cnt;
-        OBD_ALLOC(tmp_arr, *arr_cnt * sizeof(int));
-        if (tmp_arr == NULL)
-                RETURN(-ENOMEM);
-        for (i = 0; i < *arr_cnt; i++)
-                tmp_arr[i] = -1;
-
-        if (newea ||
-            lsm->lsm_oinfo[0]->loi_ost_idx >= lov->desc.ld_tgt_count)
-                rc = alloc_qos(exp, tmp_arr, &stripe_cnt, flags);
-        else
-                rc = alloc_specific(lov, lsm, tmp_arr);
-
-        if (rc)
-                GOTO(out_arr, rc);
-
-        *idx_arr = tmp_arr;
-        RETURN(stripe_cnt);
-out_arr:
-        OBD_FREE(tmp_arr, *arr_cnt * sizeof(int));
-        *arr_cnt = 0;
-        RETURN(rc);
-}
-
-static void free_idx_array(int *idx_arr, int arr_cnt)
-{
-        if (arr_cnt)
-                OBD_FREE(idx_arr, arr_cnt * sizeof(int));
-}
-
-int qos_prep_create(struct obd_export *exp, struct lov_request_set *set)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_stripe_md *lsm;
-        struct obdo *src_oa = set->set_oi->oi_oa;
-        struct obd_trans_info *oti = set->set_oti;
-        int i, stripes, rc = 0, newea = 0;
-        int flag = LOV_USES_ASSIGNED_STRIPE;
-        int *idx_arr = NULL, idx_cnt = 0;
-        ENTRY;
-
-        LASSERT(src_oa->o_valid & OBD_MD_FLID);
-
-        if (set->set_oi->oi_md == NULL) {
-                int stripes_def = lov_get_stripecnt(lov, 0);
-
-                /* If the MDS file was truncated up to some size, stripe over
-                 * enough OSTs to allow the file to be created at that size.
-                 * This may mean we use more than the default # of stripes. */
-                if (src_oa->o_valid & OBD_MD_FLSIZE) {
-                        obd_size min_bavail = LUSTRE_STRIPE_MAXBYTES;
-
-                        /* Find a small number of stripes we can use
-                           (up to # of active osts). */
-                        stripes = 1;
-                        lov_getref(exp->exp_obd);
-                        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                                if (!lov->lov_tgts[i] ||
-                                    !lov->lov_tgts[i]->ltd_active)
-                                        continue;
-                                min_bavail = min(min_bavail, TGT_BAVAIL(i));
-                                if (min_bavail * stripes > src_oa->o_size)
-                                        break;
-                                stripes++;
-                        }
-                        lov_putref(exp->exp_obd);
-
-                        if (stripes < stripes_def)
-                                stripes = stripes_def;
-                } else {
-                         flag = LOV_USES_DEFAULT_STRIPE;
-                         stripes = stripes_def;
-                }
-
-                rc = lov_alloc_memmd(&set->set_oi->oi_md, stripes,
-                                     lov->desc.ld_pattern ?
-                                     lov->desc.ld_pattern : LOV_PATTERN_RAID0,
-                                     LOV_MAGIC);
-                if (rc < 0)
-                        GOTO(out_err, rc);
-                newea = 1;
-                rc = 0;
-        }
-
-        lsm = set->set_oi->oi_md;
-        lsm->lsm_object_id = src_oa->o_id;
-        if (!lsm->lsm_stripe_size)
-                lsm->lsm_stripe_size = lov->desc.ld_default_stripe_size;
-        if (!lsm->lsm_pattern) {
-                LASSERT(lov->desc.ld_pattern);
-                lsm->lsm_pattern = lov->desc.ld_pattern;
-        }
-
-        stripes = alloc_idx_array(exp, lsm, newea, &idx_arr, &idx_cnt, flag);
-        if (stripes <= 0)
-                GOTO(out_err, rc = stripes ? stripes : -EIO);
-        LASSERTF(stripes <= lsm->lsm_stripe_count,"requested %d allocated %d\n",
-                 lsm->lsm_stripe_count, stripes);
-
-        for (i = 0; i < stripes; i++) {
-                struct lov_request *req;
-                int ost_idx = idx_arr[i];
-                LASSERT(ost_idx >= 0);
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_err, rc = -ENOMEM);
-                lov_set_add_req(req, set);
-
-                req->rq_buflen = sizeof(*req->rq_oi.oi_md);
-                OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen);
-                if (req->rq_oi.oi_md == NULL)
-                        GOTO(out_err, rc = -ENOMEM);
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL)
-                        GOTO(out_err, rc = -ENOMEM);
-
-                req->rq_idx = ost_idx;
-                req->rq_stripe = i;
-                /* create data objects with "parent" OA */
-                memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa));
-
-                /* XXX When we start creating objects on demand, we need to
-                 *     make sure that we always create the object on the
-                 *     stripe which holds the existing file size.
-                 */
-                if (src_oa->o_valid & OBD_MD_FLSIZE) {
-                        req->rq_oi.oi_oa->o_size =
-                                lov_size_to_stripe(lsm, src_oa->o_size, i);
-
-                        CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n",
-                               i, req->rq_oi.oi_oa->o_size, src_oa->o_size);
-                }
-
-        }
-        LASSERT(set->set_count == stripes);
-
-        if (stripes < lsm->lsm_stripe_count)
-                qos_shrink_lsm(set);
-
-        if (oti && (src_oa->o_valid & OBD_MD_FLCOOKIE)) {
-                oti_alloc_cookies(oti, set->set_count);
-                if (!oti->oti_logcookies)
-                        GOTO(out_err, rc = -ENOMEM);
-                set->set_cookies = oti->oti_logcookies;
-        }
-out_err:
-        if (newea && rc)
-                obd_free_memmd(exp, &set->set_oi->oi_md);
-        free_idx_array(idx_arr, idx_cnt);
-        EXIT;
-        return rc;
-}
-
-void qos_update(struct lov_obd *lov)
-{
-        ENTRY;
-        lov->lov_qos.lq_dirty = 1;
-}
-
diff --git a/lustre/lov/lov_request.c b/lustre/lov/lov_request.c
deleted file mode 100644
index 82153b7a46966b3005f44da9bb8fa2b487bfb03a..0000000000000000000000000000000000000000
--- a/lustre/lov/lov_request.c
+++ /dev/null
@@ -1,1639 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_LOV
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <lustre/lustre_idl.h>
-
-#include "lov_internal.h"
-
-static void lov_init_set(struct lov_request_set *set)
-{
-        set->set_count = 0;
-        set->set_completes = 0;
-        set->set_success = 0;
-        set->set_cookies = 0;
-        CFS_INIT_LIST_HEAD(&set->set_list);
-        atomic_set(&set->set_refcount, 1);
-}
-
-static void lov_finish_set(struct lov_request_set *set)
-{
-        struct list_head *pos, *n;
-        ENTRY;
-
-        LASSERT(set);
-        list_for_each_safe(pos, n, &set->set_list) {
-                struct lov_request *req = list_entry(pos, struct lov_request,
-                                                     rq_link);
-                list_del_init(&req->rq_link);
-
-                if (req->rq_oi.oi_oa)
-                        OBDO_FREE(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_md)
-                        OBD_FREE(req->rq_oi.oi_md, req->rq_buflen);
-                if (req->rq_oi.oi_osfs)
-                        OBD_FREE(req->rq_oi.oi_osfs,
-                                 sizeof(*req->rq_oi.oi_osfs));
-                OBD_FREE(req, sizeof(*req));
-        }
-
-        if (set->set_pga) {
-                int len = set->set_oabufs * sizeof(*set->set_pga);
-                OBD_FREE(set->set_pga, len);
-        }
-        if (set->set_lockh)
-                lov_llh_put(set->set_lockh);
-
-        OBD_FREE(set, sizeof(*set));
-        EXIT;
-}
-
-void lov_update_set(struct lov_request_set *set,
-                    struct lov_request *req, int rc)
-{
-        req->rq_complete = 1;
-        req->rq_rc = rc;
-
-        set->set_completes++;
-        if (rc == 0)
-                set->set_success++;
-}
-
-int lov_update_common_set(struct lov_request_set *set,
-                          struct lov_request *req, int rc)
-{
-        struct lov_obd *lov = &set->set_exp->exp_obd->u.lov;
-        ENTRY;
-
-        lov_update_set(set, req, rc);
-
-        /* grace error on inactive ost */
-        if (rc && !(lov->lov_tgts[req->rq_idx] && 
-                    lov->lov_tgts[req->rq_idx]->ltd_active))
-                rc = 0;
-
-        /* FIXME in raid1 regime, should return 0 */
-        RETURN(rc);
-}
-
-void lov_set_add_req(struct lov_request *req, struct lov_request_set *set)
-{
-        list_add_tail(&req->rq_link, &set->set_list);
-        set->set_count++;
-}
-
-int lov_update_enqueue_set(struct lov_request *req, __u32 mode, int rc)
-{
-        struct lov_request_set *set = req->rq_rqset;
-        struct lustre_handle *lov_lockhp;
-        struct lov_oinfo *loi;
-        ENTRY;
-
-        LASSERT(set != NULL);
-        LASSERT(set->set_oi != NULL);
-
-        lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe;
-        loi = set->set_oi->oi_md->lsm_oinfo[req->rq_stripe];
-
-        /* XXX LOV STACKING: OSC gets a copy, created in lov_prep_enqueue_set
-         * and that copy can be arbitrarily out of date.
-         *
-         * The LOV API is due for a serious rewriting anyways, and this
-         * can be addressed then. */
-
-        if (rc == ELDLM_OK) {
-                struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp);
-                __u64 tmp;
-
-                LASSERT(lock != NULL);
-                lov_stripe_lock(set->set_oi->oi_md);
-                loi->loi_lvb = req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb;
-                tmp = loi->loi_lvb.lvb_size;
-                /* Extend KMS up to the end of this lock and no further
-                 * A lock on [x,y] means a KMS of up to y + 1 bytes! */
-                if (tmp > lock->l_policy_data.l_extent.end)
-                        tmp = lock->l_policy_data.l_extent.end + 1;
-                if (tmp >= loi->loi_kms) {
-                        LDLM_DEBUG(lock, "lock acquired, setting rss="LPU64
-                                   ", kms="LPU64, loi->loi_lvb.lvb_size, tmp);
-                        loi->loi_kms = tmp;
-                        loi->loi_kms_valid = 1;
-                } else {
-                        LDLM_DEBUG(lock, "lock acquired, setting rss="
-                                   LPU64"; leaving kms="LPU64", end="LPU64,
-                                   loi->loi_lvb.lvb_size, loi->loi_kms,
-                                   lock->l_policy_data.l_extent.end);
-                }
-                lov_stripe_unlock(set->set_oi->oi_md);
-                ldlm_lock_allow_match(lock);
-                LDLM_LOCK_PUT(lock);
-        } else if ((rc == ELDLM_LOCK_ABORTED) &&
-                   (set->set_oi->oi_flags & LDLM_FL_HAS_INTENT)) {
-                memset(lov_lockhp, 0, sizeof(*lov_lockhp));
-                lov_stripe_lock(set->set_oi->oi_md);
-                loi->loi_lvb = req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb;
-                lov_stripe_unlock(set->set_oi->oi_md);
-                CDEBUG(D_INODE, "glimpsed, setting rss="LPU64"; leaving"
-                       " kms="LPU64"\n", loi->loi_lvb.lvb_size, loi->loi_kms);
-                rc = ELDLM_OK;
-        } else {
-                struct obd_export *exp = set->set_exp;
-                struct lov_obd *lov = &exp->exp_obd->u.lov;
-
-                memset(lov_lockhp, 0, sizeof(*lov_lockhp));
-                if (lov->lov_tgts[req->rq_idx] &&
-                    lov->lov_tgts[req->rq_idx]->ltd_active) {
-                        /* -EUSERS used by OST to report file contention */
-                        if (rc != -EINTR && rc != -EUSERS)
-                                CERROR("enqueue objid "LPX64" subobj "
-                                       LPX64" on OST idx %d: rc %d\n",
-                                       set->set_oi->oi_md->lsm_object_id,
-                                       loi->loi_id, loi->loi_ost_idx, rc);
-                } else {
-                        rc = ELDLM_OK;
-                }
-        }
-        lov_update_set(set, req, rc);
-        RETURN(rc);
-}
-
-/* The callback for osc_enqueue that updates lov info for every OSC request. */
-static int cb_update_enqueue(struct obd_info *oinfo, int rc)
-{
-        struct ldlm_enqueue_info *einfo;
-        struct lov_request *lovreq;
-
-        lovreq = container_of(oinfo, struct lov_request, rq_oi);
-        einfo = lovreq->rq_rqset->set_ei;
-        return lov_update_enqueue_set(lovreq, einfo->ei_mode, rc);
-}
-
-static int enqueue_done(struct lov_request_set *set, __u32 mode)
-{
-        struct lov_request *req;
-        struct lov_obd *lov = &set->set_exp->exp_obd->u.lov;
-        int rc = 0;
-        ENTRY;
-
-        /* enqueue/match success, just return */
-        if (set->set_completes && set->set_completes == set->set_success)
-                RETURN(0);
-
-        /* cancel enqueued/matched locks */
-        list_for_each_entry(req, &set->set_list, rq_link) {
-                struct lustre_handle *lov_lockhp;
-
-                if (!req->rq_complete || req->rq_rc)
-                        continue;
-
-                lov_lockhp = set->set_lockh->llh_handles + req->rq_stripe;
-                LASSERT(lov_lockhp);
-                if (!lustre_handle_is_used(lov_lockhp))
-                        continue;
-
-                rc = obd_cancel(lov->lov_tgts[req->rq_idx]->ltd_exp,
-                                req->rq_oi.oi_md, mode, lov_lockhp);
-                if (rc && lov->lov_tgts[req->rq_idx] &&
-                    lov->lov_tgts[req->rq_idx]->ltd_active)
-                        CERROR("cancelling obdjid "LPX64" on OST "
-                               "idx %d error: rc = %d\n",
-                               req->rq_oi.oi_md->lsm_object_id,
-                               req->rq_idx, rc);
-        }
-        if (set->set_lockh)
-                lov_llh_put(set->set_lockh);
-        RETURN(rc);
-}
-
-int lov_fini_enqueue_set(struct lov_request_set *set, __u32 mode, int rc,
-                         struct ptlrpc_request_set *rqset)
-{
-        int ret = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        /* Do enqueue_done only for sync requests and if any request
-         * succeeded. */
-        if (!rqset) {
-                if (rc)
-                        set->set_completes = 0;
-                ret = enqueue_done(set, mode);
-        } else if (set->set_lockh)
-                lov_llh_put(set->set_lockh);
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc ? rc : ret);
-}
-
-int lov_prep_enqueue_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct ldlm_enqueue_info *einfo,
-                         struct lov_request_set **reqset)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_request_set *set;
-        int i, rc = 0;
-        struct lov_oinfo *loi;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-        set->set_ei = einfo;
-        set->set_lockh = lov_llh_new(oinfo->oi_md);
-        if (set->set_lockh == NULL)
-                GOTO(out_set, rc = -ENOMEM);
-        oinfo->oi_lockh->cookie = set->set_lockh->llh_handle.h_cookie;
-
-        for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) {
-                struct lov_request *req;
-                obd_off start, end;
-
-                loi = oinfo->oi_md->lsm_oinfo[i];
-                if (!lov_stripe_intersects(oinfo->oi_md, i,
-                                           oinfo->oi_policy.l_extent.start,
-                                           oinfo->oi_policy.l_extent.end,
-                                           &start, &end))
-                        continue;
-
-                if (!lov->lov_tgts[loi->loi_ost_idx] ||
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-
-                req->rq_buflen = sizeof(*req->rq_oi.oi_md) +
-                        sizeof(struct lov_oinfo *) +
-                        sizeof(struct lov_oinfo);
-                OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen);
-                if (req->rq_oi.oi_md == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-                req->rq_oi.oi_md->lsm_oinfo[0] =
-                        ((void *)req->rq_oi.oi_md) + sizeof(*req->rq_oi.oi_md) +
-                        sizeof(struct lov_oinfo *);
-
-
-                req->rq_rqset = set;
-                /* Set lov request specific parameters. */
-                req->rq_oi.oi_lockh = set->set_lockh->llh_handles + i;
-                req->rq_oi.oi_cb_up = cb_update_enqueue;
-                req->rq_oi.oi_flags = oinfo->oi_flags;
-
-                LASSERT(req->rq_oi.oi_lockh);
-
-                req->rq_oi.oi_policy.l_extent.gid =
-                        oinfo->oi_policy.l_extent.gid;
-                req->rq_oi.oi_policy.l_extent.start = start;
-                req->rq_oi.oi_policy.l_extent.end = end;
-
-                req->rq_idx = loi->loi_ost_idx;
-                req->rq_stripe = i;
-
-                /* XXX LOV STACKING: submd should be from the subobj */
-                req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
-                req->rq_oi.oi_md->lsm_stripe_count = 0;
-                req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms_valid =
-                        loi->loi_kms_valid;
-                req->rq_oi.oi_md->lsm_oinfo[0]->loi_kms = loi->loi_kms;
-                req->rq_oi.oi_md->lsm_oinfo[0]->loi_lvb = loi->loi_lvb;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(0);
-out_set:
-        lov_fini_enqueue_set(set, einfo->ei_mode, rc, NULL);
-        RETURN(rc);
-}
-
-int lov_update_match_set(struct lov_request_set *set, struct lov_request *req,
-                         int rc)
-{
-        int ret = rc;
-        ENTRY;
-
-        if (rc > 0)
-                ret = 0;
-        else if (rc == 0)
-                ret = 1;
-        lov_update_set(set, req, ret);
-        RETURN(rc);
-}
-
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        rc = enqueue_done(set, mode);
-        if ((set->set_count == set->set_success) &&
-            (flags & LDLM_FL_TEST_LOCK))
-                lov_llh_put(set->set_lockh);
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
-                       struct lov_stripe_md *lsm, ldlm_policy_data_t *policy,
-                       __u32 mode, struct lustre_handle *lockh,
-                       struct lov_request_set **reqset)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct lov_request_set *set;
-        int i, rc = 0;
-        struct lov_oinfo *loi;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-        set->set_oi->oi_md = lsm;
-        set->set_lockh = lov_llh_new(lsm);
-        if (set->set_lockh == NULL)
-                GOTO(out_set, rc = -ENOMEM);
-        lockh->cookie = set->set_lockh->llh_handle.h_cookie;
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++){
-                struct lov_request *req;
-                obd_off start, end;
-
-                loi = lsm->lsm_oinfo[i];
-                if (!lov_stripe_intersects(lsm, i, policy->l_extent.start,
-                                           policy->l_extent.end, &start, &end))
-                        continue;
-
-                /* FIXME raid1 should grace this error */
-                if (!lov->lov_tgts[loi->loi_ost_idx] ||
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        GOTO(out_set, rc = -EIO);
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-
-                req->rq_buflen = sizeof(*req->rq_oi.oi_md);
-                OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen);
-                if (req->rq_oi.oi_md == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-
-                req->rq_oi.oi_policy.l_extent.start = start;
-                req->rq_oi.oi_policy.l_extent.end = end;
-                req->rq_oi.oi_policy.l_extent.gid = policy->l_extent.gid;
-
-                req->rq_idx = loi->loi_ost_idx;
-                req->rq_stripe = i;
-
-                /* XXX LOV STACKING: submd should be from the subobj */
-                req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
-                req->rq_oi.oi_md->lsm_stripe_count = 0;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_match_set(set, mode, 0);
-        RETURN(rc);
-}
-
-int lov_fini_cancel_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-
-        LASSERT(set->set_exp);
-        if (set->set_lockh)
-                lov_llh_put(set->set_lockh);
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
-                        struct lov_stripe_md *lsm, __u32 mode,
-                        struct lustre_handle *lockh,
-                        struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        int i, rc = 0;
-        struct lov_oinfo *loi;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-        set->set_oi->oi_md = lsm;
-        set->set_lockh = lov_handle2llh(lockh);
-        if (set->set_lockh == NULL) {
-                CERROR("LOV: invalid lov lock handle %p\n", lockh);
-                GOTO(out_set, rc = -EINVAL);
-        }
-        lockh->cookie = set->set_lockh->llh_handle.h_cookie;
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++){
-                struct lov_request *req;
-                struct lustre_handle *lov_lockhp;
-
-                loi = lsm->lsm_oinfo[i];
-                lov_lockhp = set->set_lockh->llh_handles + i;
-                if (!lustre_handle_is_used(lov_lockhp)) {
-                        CDEBUG(D_RPCTRACE,"lov idx %d subobj "LPX64" no lock\n",
-                               loi->loi_ost_idx, loi->loi_id);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-
-                req->rq_buflen = sizeof(*req->rq_oi.oi_md);
-                OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen);
-                if (req->rq_oi.oi_md == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-
-                req->rq_idx = loi->loi_ost_idx;
-                req->rq_stripe = i;
-
-                /* XXX LOV STACKING: submd should be from the subobj */
-                req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
-                req->rq_oi.oi_md->lsm_stripe_count = 0;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_cancel_set(set);
-        RETURN(rc);
-}
-
-static int create_done(struct obd_export *exp, struct lov_request_set *set,
-                       struct lov_stripe_md **lsmp)
-{
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        struct obd_trans_info *oti = set->set_oti;
-        struct obdo *src_oa = set->set_oi->oi_oa;
-        struct lov_request *req;
-        struct obdo *ret_oa = NULL;
-        int attrset = 0, rc = 0;
-        ENTRY;
-
-        LASSERT(set->set_completes);
-
-        /* try alloc objects on other osts if osc_create fails for
-         * exceptions: RPC failure, ENOSPC, etc */
-        if (set->set_count != set->set_success) {
-                list_for_each_entry (req, &set->set_list, rq_link) {
-                        if (req->rq_rc == 0)
-                                continue;
-
-                        set->set_completes--;
-                        req->rq_complete = 0;
-
-                        rc = qos_remedy_create(set, req);
-                        lov_update_create_set(set, req, rc);
-
-                        if (rc)
-                                break;
-                }
-        }
-
-        /* no successful creates */
-        if (set->set_success == 0)
-                GOTO(cleanup, rc);
-
-        /* If there was an explicit stripe set, fail.  Otherwise, we
-         * got some objects and that's not bad. */
-        if (set->set_count != set->set_success) {
-                if (*lsmp)
-                        GOTO(cleanup, rc);
-                set->set_count = set->set_success;
-                qos_shrink_lsm(set);
-        }
-
-        OBDO_ALLOC(ret_oa);
-        if (ret_oa == NULL)
-                GOTO(cleanup, rc = -ENOMEM);
-
-        list_for_each_entry(req, &set->set_list, rq_link) {
-                if (!req->rq_complete || req->rq_rc)
-                        continue;
-                lov_merge_attrs(ret_oa, req->rq_oi.oi_oa,
-                                req->rq_oi.oi_oa->o_valid, set->set_oi->oi_md,
-                                req->rq_stripe, &attrset);
-        }
-        if (src_oa->o_valid & OBD_MD_FLSIZE &&
-            ret_oa->o_size != src_oa->o_size) {
-                CERROR("original size "LPU64" isn't new object size "LPU64"\n",
-                       src_oa->o_size, ret_oa->o_size);
-                LBUG();
-        }
-        ret_oa->o_id = src_oa->o_id;
-        memcpy(src_oa, ret_oa, sizeof(*src_oa));
-        OBDO_FREE(ret_oa);
-
-        *lsmp = set->set_oi->oi_md;
-        GOTO(done, rc = 0);
-
-cleanup:
-        list_for_each_entry(req, &set->set_list, rq_link) {
-                struct obd_export *sub_exp;
-                int err = 0;
-
-                if (!req->rq_complete || req->rq_rc)
-                        continue;
-
-                sub_exp = lov->lov_tgts[req->rq_idx]->ltd_exp;
-                err = obd_destroy(sub_exp, req->rq_oi.oi_oa, NULL, oti, NULL);
-                if (err)
-                        CERROR("Failed to uncreate objid "LPX64" subobj "
-                               LPX64" on OST idx %d: rc = %d\n",
-                               src_oa->o_id, req->rq_oi.oi_oa->o_id,
-                               req->rq_idx, rc);
-        }
-        if (*lsmp == NULL)
-                obd_free_memmd(exp, &set->set_oi->oi_md);
-done:
-        if (oti && set->set_cookies) {
-                oti->oti_logcookies = set->set_cookies;
-                if (!set->set_cookie_sent) {
-                        oti_free_cookies(oti);
-                        src_oa->o_valid &= ~OBD_MD_FLCOOKIE;
-                } else {
-                        src_oa->o_valid |= OBD_MD_FLCOOKIE;
-                }
-        }
-        RETURN(rc);
-}
-
-int lov_fini_create_set(struct lov_request_set *set,struct lov_stripe_md **lsmp)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes)
-                rc = create_done(set->set_exp, set, lsmp);
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-int lov_update_create_set(struct lov_request_set *set,
-                          struct lov_request *req, int rc)
-{
-        struct obd_trans_info *oti = set->set_oti;
-        struct lov_stripe_md *lsm = set->set_oi->oi_md;
-        struct lov_oinfo *loi;
-        struct lov_obd *lov = &set->set_exp->exp_obd->u.lov;
-        ENTRY;
-
-        req->rq_stripe = set->set_success;
-        loi = lsm->lsm_oinfo[req->rq_stripe];
-
-        if (rc && lov->lov_tgts[req->rq_idx] &&
-            lov->lov_tgts[req->rq_idx]->ltd_active) {
-                CERROR("error creating fid "LPX64" sub-object"
-                       " on OST idx %d/%d: rc = %d\n",
-                       set->set_oi->oi_oa->o_id, req->rq_idx,
-                       lsm->lsm_stripe_count, rc);
-                if (rc > 0) {
-                        CERROR("obd_create returned invalid err %d\n", rc);
-                        rc = -EIO;
-                }
-        }
-        lov_update_set(set, req, rc);
-        if (rc)
-                RETURN(rc);
-
-        loi->loi_id = req->rq_oi.oi_oa->o_id;
-        loi->loi_ost_idx = req->rq_idx;
-        CDEBUG(D_INODE, "objid "LPX64" has subobj "LPX64"/"LPU64" at idx %d\n",
-               lsm->lsm_object_id, loi->loi_id, loi->loi_id, req->rq_idx);
-        loi_init(loi);
-
-        if (oti && set->set_cookies)
-                ++oti->oti_logcookies;
-        if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLCOOKIE)
-                set->set_cookie_sent++;
-
-        RETURN(0);
-}
-
-int lov_prep_create_set(struct obd_export *exp, struct obd_info *oinfo,
-                        struct lov_stripe_md **lsmp, struct obdo *src_oa,
-                        struct obd_trans_info *oti,
-                        struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-        set->set_oi->oi_md = *lsmp;
-        set->set_oi->oi_oa = src_oa;
-        set->set_oti = oti;
-
-        rc = qos_prep_create(exp, set);
-        if (rc)
-                lov_fini_create_set(set, lsmp);
-        else
-                *reqset = set;
-        RETURN(rc);
-}
-
-static int common_attr_done(struct lov_request_set *set)
-{
-        struct list_head *pos;
-        struct lov_request *req;
-        struct obdo *tmp_oa;
-        int rc = 0, attrset = 0;
-        ENTRY;
-
-        LASSERT(set->set_oi != NULL);
-
-        if (set->set_oi->oi_oa == NULL)
-                RETURN(0);
-
-        if (!set->set_success)
-                RETURN(-EIO);
-
-        OBDO_ALLOC(tmp_oa);
-        if (tmp_oa == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                if (!req->rq_complete || req->rq_rc)
-                        continue;
-                if (req->rq_oi.oi_oa->o_valid == 0)   /* inactive stripe */
-                        continue;
-                lov_merge_attrs(tmp_oa, req->rq_oi.oi_oa,
-                                req->rq_oi.oi_oa->o_valid,
-                                set->set_oi->oi_md, req->rq_stripe, &attrset);
-        }
-        if (!attrset) {
-                CERROR("No stripes had valid attrs\n");
-                rc = -EIO;
-        }
-        tmp_oa->o_id = set->set_oi->oi_oa->o_id;
-        memcpy(set->set_oi->oi_oa, tmp_oa, sizeof(*set->set_oi->oi_oa));
-out:
-        if (tmp_oa)
-                OBDO_FREE(tmp_oa);
-        RETURN(rc);
-
-}
-
-static int brw_done(struct lov_request_set *set)
-{
-        struct lov_stripe_md *lsm = set->set_oi->oi_md;
-        struct lov_oinfo     *loi = NULL;
-        struct list_head *pos;
-        struct lov_request *req;
-        ENTRY;
-
-        list_for_each (pos, &set->set_list) {
-                req = list_entry(pos, struct lov_request, rq_link);
-
-                if (!req->rq_complete || req->rq_rc)
-                        continue;
-
-                loi = lsm->lsm_oinfo[req->rq_stripe];
-
-                if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLBLOCKS)
-                        loi->loi_lvb.lvb_blocks = req->rq_oi.oi_oa->o_blocks;
-        }
-
-        RETURN(0);
-}
-
-int lov_fini_brw_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes) {
-                rc = brw_done(set);
-                /* FIXME update qos data here */
-        }
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-int lov_prep_brw_set(struct obd_export *exp, struct obd_info *oinfo,
-                     obd_count oa_bufs, struct brw_page *pga,
-                     struct obd_trans_info *oti,
-                     struct lov_request_set **reqset)
-{
-        struct {
-                obd_count       index;
-                obd_count       count;
-                obd_count       off;
-        } *info = NULL;
-        struct lov_request_set *set;
-        struct lov_oinfo *loi = NULL;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i, shift;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oti = oti;
-        set->set_oi = oinfo;
-        set->set_oabufs = oa_bufs;
-        OBD_ALLOC(set->set_pga, oa_bufs * sizeof(*set->set_pga));
-        if (!set->set_pga)
-                GOTO(out, rc = -ENOMEM);
-
-        OBD_ALLOC(info, sizeof(*info) * oinfo->oi_md->lsm_stripe_count);
-        if (!info)
-                GOTO(out, rc = -ENOMEM);
-
-        /* calculate the page count for each stripe */
-        for (i = 0; i < oa_bufs; i++) {
-                int stripe = lov_stripe_number(oinfo->oi_md, pga[i].off);
-                info[stripe].count++;
-        }
-
-        /* alloc and initialize lov request */
-        shift = 0;
-        for (i = 0 ; i < oinfo->oi_md->lsm_stripe_count; i++){
-                struct lov_request *req;
-
-                if (info[i].count == 0)
-                        continue;
-
-                loi = oinfo->oi_md->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] || 
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        GOTO(out, rc = -EIO);
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out, rc = -ENOMEM);
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out, rc = -ENOMEM);
-                }
-
-                if (oinfo->oi_oa) {
-                        memcpy(req->rq_oi.oi_oa, oinfo->oi_oa,
-                               sizeof(*req->rq_oi.oi_oa));
-                }
-                req->rq_oi.oi_oa->o_id = loi->loi_id;
-                req->rq_oi.oi_oa->o_stripe_idx = i;
-
-                req->rq_buflen = sizeof(*req->rq_oi.oi_md);
-                OBD_ALLOC(req->rq_oi.oi_md, req->rq_buflen);
-                if (req->rq_oi.oi_md == NULL) {
-                        OBDO_FREE(req->rq_oi.oi_oa);
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out, rc = -ENOMEM);
-                }
-
-                req->rq_idx = loi->loi_ost_idx;
-                req->rq_stripe = i;
-
-                /* XXX LOV STACKING */
-                req->rq_oi.oi_md->lsm_object_id = loi->loi_id;
-                req->rq_oi.oi_md->lsm_object_gr = oinfo->oi_md->lsm_object_gr;
-                req->rq_oabufs = info[i].count;
-                req->rq_pgaidx = shift;
-                shift += req->rq_oabufs;
-
-                /* remember the index for sort brw_page array */
-                info[i].index = req->rq_pgaidx;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out, rc = -EIO);
-
-        /* rotate & sort the brw_page array */
-        for (i = 0; i < oa_bufs; i++) {
-                int stripe = lov_stripe_number(oinfo->oi_md, pga[i].off);
-
-                shift = info[stripe].index + info[stripe].off;
-                LASSERT(shift < oa_bufs);
-                set->set_pga[shift] = pga[i];
-                lov_stripe_offset(oinfo->oi_md, pga[i].off, stripe,
-                                  &set->set_pga[shift].off);
-                info[stripe].off++;
-        }
-out:
-        if (info)
-                OBD_FREE(info, sizeof(*info) * oinfo->oi_md->lsm_stripe_count);
-
-        if (rc == 0)
-                *reqset = set;
-        else
-                lov_fini_brw_set(set);
-
-        RETURN(rc);
-}
-
-int lov_fini_getattr_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes)
-                rc = common_attr_done(set);
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-/* The callback for osc_getattr_async that finilizes a request info when a
- * response is recieved. */
-static int cb_getattr_update(struct obd_info *oinfo, int rc)
-{
-        struct lov_request *lovreq;
-        lovreq = container_of(oinfo, struct lov_request, rq_oi);
-        return lov_update_common_set(lovreq->rq_rqset, lovreq, rc);
-}
-
-int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        struct lov_oinfo *loi = NULL;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-
-        for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) {
-                struct lov_request *req;
-
-                loi = oinfo->oi_md->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] ||
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-
-                req->rq_stripe = i;
-                req->rq_idx = loi->loi_ost_idx;
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-                memcpy(req->rq_oi.oi_oa, oinfo->oi_oa,
-                       sizeof(*req->rq_oi.oi_oa));
-                req->rq_oi.oi_oa->o_id = loi->loi_id;
-                req->rq_oi.oi_cb_up = cb_getattr_update;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_getattr_set(set);
-        RETURN(rc);
-}
-
-int lov_fini_destroy_set(struct lov_request_set *set)
-{
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes) {
-                /* FIXME update qos data here */
-        }
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(0);
-}
-
-int lov_prep_destroy_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct obdo *src_oa, struct lov_stripe_md *lsm,
-                         struct obd_trans_info *oti,
-                         struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        struct lov_oinfo *loi = NULL;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-        set->set_oi->oi_md = lsm;
-        set->set_oi->oi_oa = src_oa;
-        set->set_oti = oti;
-        if (oti != NULL && src_oa->o_valid & OBD_MD_FLCOOKIE)
-                set->set_cookies = oti->oti_logcookies;
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_request *req;
-
-                loi = lsm->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] || 
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-
-                req->rq_stripe = i;
-                req->rq_idx = loi->loi_ost_idx;
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-                memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa));
-                req->rq_oi.oi_oa->o_id = loi->loi_id;
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_destroy_set(set);
-        RETURN(rc);
-}
-
-int lov_fini_setattr_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes) {
-                rc = common_attr_done(set);
-                /* FIXME update qos data here */
-        }
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-        RETURN(rc);
-}
-
-int lov_update_setattr_set(struct lov_request_set *set,
-                           struct lov_request *req, int rc)
-{
-        struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov;
-        struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md;
-        ENTRY;
-
-        lov_update_set(set, req, rc);
-
-        /* grace error on inactive ost */
-        if (rc && !(lov->lov_tgts[req->rq_idx] && 
-                    lov->lov_tgts[req->rq_idx]->ltd_active))
-                rc = 0;
-
-        if (rc == 0) {
-                if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLCTIME)
-                        lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_ctime =
-                                req->rq_oi.oi_oa->o_ctime;
-                if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLMTIME)
-                        lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_mtime =
-                                req->rq_oi.oi_oa->o_mtime;
-                if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLATIME)
-                        lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_atime =
-                                req->rq_oi.oi_oa->o_atime;
-        }
-
-        RETURN(rc);
-}
-
-/* The callback for osc_setattr_async that finilizes a request info when a
- * response is recieved. */
-static int cb_setattr_update(struct obd_info *oinfo, int rc)
-{
-        struct lov_request *lovreq;
-        lovreq = container_of(oinfo, struct lov_request, rq_oi);
-        return lov_update_setattr_set(lovreq->rq_rqset, lovreq, rc);
-}
-
-int lov_prep_setattr_set(struct obd_export *exp, struct obd_info *oinfo,
-                         struct obd_trans_info *oti,
-                         struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        struct lov_oinfo *loi = NULL;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oti = oti;
-        set->set_oi = oinfo;
-        if (oti != NULL && oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE)
-                set->set_cookies = oti->oti_logcookies;
-
-        for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) {
-                struct lov_request *req;
-
-                loi = oinfo->oi_md->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] ||
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-                req->rq_stripe = i;
-                req->rq_idx = loi->loi_ost_idx;
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-                memcpy(req->rq_oi.oi_oa, oinfo->oi_oa,
-                       sizeof(*req->rq_oi.oi_oa));
-                req->rq_oi.oi_oa->o_id = loi->loi_id;
-                req->rq_oi.oi_oa->o_stripe_idx = i;
-                req->rq_oi.oi_cb_up = cb_setattr_update;
-                req->rq_rqset = set;
-
-                if (oinfo->oi_oa->o_valid & OBD_MD_FLSIZE) {
-                        int off = lov_stripe_offset(oinfo->oi_md,
-                                                    oinfo->oi_oa->o_size, i,
-                                                    &req->rq_oi.oi_oa->o_size);
-
-                        if (off < 0 && req->rq_oi.oi_oa->o_size)
-                                req->rq_oi.oi_oa->o_size--;
-
-                        CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n",
-                               i, req->rq_oi.oi_oa->o_size,
-                               oinfo->oi_oa->o_size);
-                }
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_setattr_set(set);
-        RETURN(rc);
-}
-
-int lov_fini_punch_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes) {
-                rc = -EIO;
-                /* FIXME update qos data here */
-                if (set->set_success)
-                        rc = common_attr_done(set);
-        }
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-int lov_update_punch_set(struct lov_request_set *set,
-                           struct lov_request *req, int rc)
-{
-        struct lov_obd *lov = &req->rq_rqset->set_exp->exp_obd->u.lov;
-        struct lov_stripe_md *lsm = req->rq_rqset->set_oi->oi_md;
-        ENTRY;
-
-        lov_update_set(set, req, rc);
-
-        /* grace error on inactive ost */
-        if (rc && !lov->lov_tgts[req->rq_idx]->ltd_active)
-                rc = 0;
-
-        if (rc == 0) {
-                lov_stripe_lock(lsm);
-                if (req->rq_oi.oi_oa->o_valid & OBD_MD_FLBLOCKS) {
-                        lsm->lsm_oinfo[req->rq_stripe]->loi_lvb.lvb_blocks =
-                                req->rq_oi.oi_oa->o_blocks;
-                }
-
-                /* Do we need to update lvb_size here? It needn't because
-                 * it have been done in ll_truncate(). -jay */
-                lov_stripe_unlock(lsm);
-        }
-
-        RETURN(rc);
-}
-
-/* The callback for osc_punch that finilizes a request info when a response
- * is recieved. */
-static int cb_update_punch(struct obd_info *oinfo, int rc)
-{
-        struct lov_request *lovreq;
-        lovreq = container_of(oinfo, struct lov_request, rq_oi);
-        return lov_update_punch_set(lovreq->rq_rqset, lovreq, rc);
-}
-
-int lov_prep_punch_set(struct obd_export *exp, struct obd_info *oinfo,
-                       struct obd_trans_info *oti,
-                       struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        struct lov_oinfo *loi = NULL;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_oi = oinfo;
-        set->set_exp = exp;
-
-        for (i = 0; i < oinfo->oi_md->lsm_stripe_count; i++) {
-                struct lov_request *req;
-                obd_off rs, re;
-
-                loi = oinfo->oi_md->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] ||
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                if (!lov_stripe_intersects(oinfo->oi_md, i,
-                                           oinfo->oi_policy.l_extent.start,
-                                           oinfo->oi_policy.l_extent.end,
-                                           &rs, &re))
-                        continue;
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-                req->rq_stripe = i;
-                req->rq_idx = loi->loi_ost_idx;
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-                memcpy(req->rq_oi.oi_oa, oinfo->oi_oa,
-                       sizeof(*req->rq_oi.oi_oa));
-                req->rq_oi.oi_oa->o_id = loi->loi_id;
-                req->rq_oi.oi_oa->o_stripe_idx = i;
-                req->rq_oi.oi_cb_up = cb_update_punch;
-                req->rq_rqset = set;
-
-                req->rq_oi.oi_policy.l_extent.start = rs;
-                req->rq_oi.oi_policy.l_extent.end = re;
-                req->rq_oi.oi_policy.l_extent.gid = -1;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_punch_set(set);
-        RETURN(rc);
-}
-
-int lov_fini_sync_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-        LASSERT(set->set_exp);
-        if (set->set_completes) {
-                if (!set->set_success)
-                        rc = -EIO;
-                /* FIXME update qos data here */
-        }
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-int lov_prep_sync_set(struct obd_export *exp, struct obd_info *oinfo,
-                      struct obdo *src_oa, struct lov_stripe_md *lsm,
-                      obd_off start, obd_off end,
-                      struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        struct lov_oinfo *loi = NULL;
-        struct lov_obd *lov = &exp->exp_obd->u.lov;
-        int rc = 0, i;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_exp = exp;
-        set->set_oi = oinfo;
-        set->set_oi->oi_md = lsm;
-        set->set_oi->oi_oa = src_oa;
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                struct lov_request *req;
-                obd_off rs, re;
-
-                loi = lsm->lsm_oinfo[i];
-                if (!lov->lov_tgts[loi->loi_ost_idx] ||
-                    !lov->lov_tgts[loi->loi_ost_idx]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", loi->loi_ost_idx);
-                        continue;
-                }
-
-                if (!lov_stripe_intersects(lsm, i, start, end, &rs, &re))
-                        continue;
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-                req->rq_stripe = i;
-                req->rq_idx = loi->loi_ost_idx;
-
-                OBDO_ALLOC(req->rq_oi.oi_oa);
-                if (req->rq_oi.oi_oa == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-                memcpy(req->rq_oi.oi_oa, src_oa, sizeof(*req->rq_oi.oi_oa));
-                req->rq_oi.oi_oa->o_id = loi->loi_id;
-                req->rq_oi.oi_oa->o_stripe_idx = i;
-
-                req->rq_oi.oi_policy.l_extent.start = rs;
-                req->rq_oi.oi_policy.l_extent.end = re;
-                req->rq_oi.oi_policy.l_extent.gid = -1;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_sync_set(set);
-        RETURN(rc);
-}
-
-#define LOV_U64_MAX ((__u64)~0ULL)
-#define LOV_SUM_MAX(tot, add)                                           \
-        do {                                                            \
-                if ((tot) + (add) < (tot))                              \
-                        (tot) = LOV_U64_MAX;                            \
-                else                                                    \
-                        (tot) += (add);                                 \
-        } while(0)
-
-int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs,int success)
-{
-        ENTRY;
-
-        if (success) {
-                __u32 expected_stripes = lov_get_stripecnt(&obd->u.lov, 0);
-
-                if (osfs->os_files != LOV_U64_MAX)
-                        do_div(osfs->os_files, expected_stripes);
-                if (osfs->os_ffree != LOV_U64_MAX)
-                        do_div(osfs->os_ffree, expected_stripes);
-
-                spin_lock(&obd->obd_osfs_lock);
-                memcpy(&obd->obd_osfs, osfs, sizeof(*osfs));
-                obd->obd_osfs_age = get_jiffies_64();
-                spin_unlock(&obd->obd_osfs_lock);
-                RETURN(0);
-        }
-
-        RETURN(-EIO);
-}
-
-int lov_fini_statfs_set(struct lov_request_set *set)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (set == NULL)
-                RETURN(0);
-
-        if (set->set_completes) {
-                rc = lov_fini_statfs(set->set_obd, set->set_oi->oi_osfs,
-                                     set->set_success);
-        }
-
-        if (atomic_dec_and_test(&set->set_refcount))
-                lov_finish_set(set);
-
-        RETURN(rc);
-}
-
-void lov_update_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                       struct obd_statfs *lov_sfs, int success)
-{
-        int shift = 0, quit = 0;
-        __u64 tmp;
-        spin_lock(&obd->obd_osfs_lock);
-        memcpy(&obd->obd_osfs, lov_sfs, sizeof(*lov_sfs));
-        obd->obd_osfs_age = get_jiffies_64();
-        spin_unlock(&obd->obd_osfs_lock);
-
-        if (success == 0) {
-                memcpy(osfs, lov_sfs, sizeof(*lov_sfs));
-        } else {
-                if (osfs->os_bsize != lov_sfs->os_bsize) {
-                        /* assume all block sizes are always powers of 2 */
-                        /* get the bits difference */
-                        tmp = osfs->os_bsize | lov_sfs->os_bsize;
-                        for (shift = 0; shift <= 64; ++shift) {
-                                if (tmp & 1) {
-                                        if (quit)
-                                                break;
-                                        else
-                                                quit = 1;
-                                        shift = 0;
-                                }
-                                tmp >>= 1;
-                        }
-                }
-
-                if (osfs->os_bsize < lov_sfs->os_bsize) {
-                        osfs->os_bsize = lov_sfs->os_bsize;
-
-                        osfs->os_bfree  >>= shift;
-                        osfs->os_bavail >>= shift;
-                        osfs->os_blocks >>= shift;
-                } else if (shift != 0) {
-                        lov_sfs->os_bfree  >>= shift;
-                        lov_sfs->os_bavail >>= shift;
-                        lov_sfs->os_blocks >>= shift;
-                }
-#ifdef MIN_DF
-                /* Sandia requested that df (and so, statfs) only
-                   returned minimal available space on
-                   a single OST, so people would be able to
-                   write this much data guaranteed. */
-                if (osfs->os_bavail > lov_sfs->os_bavail) {
-                        /* Presumably if new bavail is smaller,
-                           new bfree is bigger as well */
-                        osfs->os_bfree = lov_sfs->os_bfree;
-                        osfs->os_bavail = lov_sfs->os_bavail;
-                }
-#else
-                osfs->os_bfree += lov_sfs->os_bfree;
-                osfs->os_bavail += lov_sfs->os_bavail;
-#endif
-                osfs->os_blocks += lov_sfs->os_blocks;
-                /* XXX not sure about this one - depends on policy.
-                 *   - could be minimum if we always stripe on all OBDs
-                 *     (but that would be wrong for any other policy,
-                 *     if one of the OBDs has no more objects left)
-                 *   - could be sum if we stripe whole objects
-                 *   - could be average, just to give a nice number
-                 *
-                 * To give a "reasonable" (if not wholly accurate)
-                 * number, we divide the total number of free objects
-                 * by expected stripe count (watch out for overflow).
-                 */
-                LOV_SUM_MAX(osfs->os_files, lov_sfs->os_files);
-                LOV_SUM_MAX(osfs->os_ffree, lov_sfs->os_ffree);
-        }
-}
-
-/* The callback for osc_statfs_async that finilizes a request info when a
- * response is recieved. */
-static int cb_statfs_update(struct obd_info *oinfo, int rc)
-{
-        struct lov_request *lovreq;
-        struct obd_statfs *osfs, *lov_sfs;
-        struct obd_device *obd;
-        struct lov_obd *lov;
-        int success;
-        ENTRY;
-
-        lovreq = container_of(oinfo, struct lov_request, rq_oi);
-        lov = &lovreq->rq_rqset->set_obd->u.lov;
-        obd = class_exp2obd(lov->lov_tgts[lovreq->rq_idx]->ltd_exp);
-
-        osfs = lovreq->rq_rqset->set_oi->oi_osfs;
-        lov_sfs = oinfo->oi_osfs;
-
-        success = lovreq->rq_rqset->set_success;
-
-        /* XXX: the same is done in lov_update_common_set, however
-           lovset->set_exp is not initialized. */
-        lov_update_set(lovreq->rq_rqset, lovreq, rc);
-        if (rc) {
-                if (rc && !(lov->lov_tgts[lovreq->rq_idx] &&
-                            lov->lov_tgts[lovreq->rq_idx]->ltd_active))
-                        rc = 0;
-                RETURN(rc);
-        }
-
-        lov_update_statfs(obd, osfs, lov_sfs, success);
-        qos_update(lov);
-
-        RETURN(0);
-}
-
-int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo,
-                        struct lov_request_set **reqset)
-{
-        struct lov_request_set *set;
-        struct lov_obd *lov = &obd->u.lov;
-        int rc = 0, i;
-        ENTRY;
-
-        OBD_ALLOC(set, sizeof(*set));
-        if (set == NULL)
-                RETURN(-ENOMEM);
-        lov_init_set(set);
-
-        set->set_obd = obd;
-        set->set_oi = oinfo;
-
-        /* We only get block data from the OBD */
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                struct lov_request *req;
-
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) {
-                        CDEBUG(D_HA, "lov idx %d inactive\n", i);
-                        continue;
-                }
-
-                OBD_ALLOC(req, sizeof(*req));
-                if (req == NULL)
-                        GOTO(out_set, rc = -ENOMEM);
-
-                OBD_ALLOC(req->rq_oi.oi_osfs, sizeof(*req->rq_oi.oi_osfs));
-                if (req->rq_oi.oi_osfs == NULL) {
-                        OBD_FREE(req, sizeof(*req));
-                        GOTO(out_set, rc = -ENOMEM);
-                }
-
-                req->rq_idx = i;
-                req->rq_oi.oi_cb_up = cb_statfs_update;
-                req->rq_rqset = set;
-
-                lov_set_add_req(req, set);
-        }
-        if (!set->set_count)
-                GOTO(out_set, rc = -EIO);
-        *reqset = set;
-        RETURN(rc);
-out_set:
-        lov_fini_statfs_set(set);
-        RETURN(rc);
-}
diff --git a/lustre/lov/lproc_lov.c b/lustre/lov/lproc_lov.c
deleted file mode 100644
index c585feaf96076afc39c4248ab945dd9ea1cc7e76..0000000000000000000000000000000000000000
--- a/lustre/lov/lproc_lov.c
+++ /dev/null
@@ -1,365 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <asm/statfs.h>
-#endif
-#include <lprocfs_status.h>
-#include <obd_class.h>
-#include <linux/seq_file.h>
-#include "lov_internal.h"
-
-#ifdef LPROCFS
-static int lov_rd_stripesize(char *page, char **start, off_t off, int count,
-                             int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        *eof = 1;
-        return snprintf(page, count, LPU64"\n", desc->ld_default_stripe_size);
-}
-
-static int lov_wr_stripesize(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-        __u64 val;
-        int rc;
-        
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        rc = lprocfs_write_u64_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        desc->ld_default_stripe_size = val;
-        lov_fix_desc(desc);
-        return count;
-}
-
-static int lov_rd_stripeoffset(char *page, char **start, off_t off, int count,
-                               int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        *eof = 1;
-        return snprintf(page, count, LPU64"\n", desc->ld_default_stripe_offset);
-}
-
-static int lov_wr_stripeoffset(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-        __u64 val;
-        int rc;
-        
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        rc = lprocfs_write_u64_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        desc->ld_default_stripe_offset = val;
-        lov_fix_desc(desc);
-        return count;
-}
-
-static int lov_rd_stripetype(char *page, char **start, off_t off, int count,
-                             int *eof, void *data)
-{
-        struct obd_device* dev = (struct obd_device*)data;
-        struct lov_desc *desc;
-
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        *eof = 1;
-        return snprintf(page, count, "%u\n", desc->ld_pattern);
-}
-
-static int lov_wr_stripetype(struct file *file, const char *buffer,
-                             unsigned long count, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-        int val, rc;
-        
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        desc->ld_pattern = val;
-        lov_fix_desc(desc);
-        return count;
-}
-
-static int lov_rd_stripecount(char *page, char **start, off_t off, int count,
-                              int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        *eof = 1;
-        return snprintf(page, count, "%ld\n",
-                        (long)(desc->ld_default_stripe_count + 1) - 1);
-}
-
-static int lov_wr_stripecount(struct file *file, const char *buffer,
-                              unsigned long count, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_desc *desc;
-        int val, rc;
-        
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        desc->ld_default_stripe_count = val;
-        lov_fix_desc(desc);
-        return count;
-}
-
-static int lov_rd_numobd(char *page, char **start, off_t off, int count,
-                         int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device*)data;
-        struct lov_desc *desc;
-
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        *eof = 1;
-        return snprintf(page, count, "%u\n", desc->ld_tgt_count);
-
-}
-
-static int lov_rd_activeobd(char *page, char **start, off_t off, int count,
-                            int *eof, void *data)
-{
-        struct obd_device* dev = (struct obd_device*)data;
-        struct lov_desc *desc;
-
-        LASSERT(dev != NULL);
-        desc = &dev->u.lov.desc;
-        *eof = 1;
-        return snprintf(page, count, "%u\n", desc->ld_active_tgt_count);
-}
-
-static int lov_rd_desc_uuid(char *page, char **start, off_t off, int count,
-                            int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device*) data;
-        struct lov_obd *lov;
-
-        LASSERT(dev != NULL);
-        lov = &dev->u.lov;
-        *eof = 1;
-        return snprintf(page, count, "%s\n", lov->desc.ld_uuid.uuid);
-}
-
-/* free priority (0-255): how badly user wants to choose empty osts */ 
-static int lov_rd_qos_priofree(char *page, char **start, off_t off, int count,
-                               int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device*) data;
-        struct lov_obd *lov;
-
-        LASSERT(dev != NULL);
-        lov = &dev->u.lov;
-        *eof = 1;
-        return snprintf(page, count, "%d%%\n", 
-                        (lov->lov_qos.lq_prio_free * 100) >> 8);
-}
-
-static int lov_wr_qos_priofree(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_obd *lov;
-        int val, rc;
-        LASSERT(dev != NULL);
-
-        lov = &dev->u.lov;
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val > 100)
-                return -EINVAL;
-        lov->lov_qos.lq_prio_free = (val << 8) / 100;
-        lov->lov_qos.lq_dirty = 1;
-        lov->lov_qos.lq_reset = 1;
-        return count;
-}
-
-static int lov_rd_qos_maxage(char *page, char **start, off_t off, int count,
-                             int *eof, void *data)
-{
-        struct obd_device *dev = (struct obd_device*) data;
-        struct lov_obd *lov;
-
-        LASSERT(dev != NULL);
-        lov = &dev->u.lov;
-        *eof = 1;
-        return snprintf(page, count, "%u Sec\n", lov->desc.ld_qos_maxage);
-}
-
-static int lov_wr_qos_maxage(struct file *file, const char *buffer,
-                             unsigned long count, void *data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-        struct lov_obd *lov;
-        int val, rc;
-        LASSERT(dev != NULL);
-
-        lov = &dev->u.lov;
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val <= 0)
-                return -EINVAL;
-        lov->desc.ld_qos_maxage = val;
-        return count;
-}
-
-static void *lov_tgt_seq_start(struct seq_file *p, loff_t *pos)
-{
-        struct obd_device *dev = p->private;
-        struct lov_obd *lov = &dev->u.lov;
-
-        while (*pos < lov->desc.ld_tgt_count) {
-                if (lov->lov_tgts[*pos])
-                        return lov->lov_tgts[*pos];
-                ++*pos;
-        }
-        return NULL;
-}
-
-static void lov_tgt_seq_stop(struct seq_file *p, void *v)
-{
-}
-
-static void *lov_tgt_seq_next(struct seq_file *p, void *v, loff_t *pos)
-{
-        struct obd_device *dev = p->private;
-        struct lov_obd *lov = &dev->u.lov;
-
-        while (++*pos < lov->desc.ld_tgt_count) {
-                if (lov->lov_tgts[*pos])
-                        return lov->lov_tgts[*pos];
-        }
-        return NULL;
-}
-
-static int lov_tgt_seq_show(struct seq_file *p, void *v)
-{
-        struct lov_tgt_desc *tgt = v;
-        return seq_printf(p, "%d: %s %sACTIVE\n", tgt->ltd_index, 
-                          obd_uuid2str(&tgt->ltd_uuid), 
-                          tgt->ltd_active ? "" : "IN");
-}
-
-struct seq_operations lov_tgt_sops = {
-        .start = lov_tgt_seq_start,
-        .stop = lov_tgt_seq_stop,
-        .next = lov_tgt_seq_next,
-        .show = lov_tgt_seq_show,
-};
-
-static int lov_target_seq_open(struct inode *inode, struct file *file)
-{
-        struct proc_dir_entry *dp = PDE(inode);
-        struct seq_file *seq;
-        int rc;
-
-        LPROCFS_ENTRY_AND_CHECK(dp);
-        rc = seq_open(file, &lov_tgt_sops);
-        if (rc) {
-                LPROCFS_EXIT();
-                return rc;
-        }
-
-        seq = file->private_data;
-        seq->private = dp->data;
-        return 0;
-}
-
-struct lprocfs_vars lprocfs_lov_obd_vars[] = {
-        { "uuid",         lprocfs_rd_uuid,        0, 0 },
-        { "stripesize",   lov_rd_stripesize,      lov_wr_stripesize, 0 },
-        { "stripeoffset", lov_rd_stripeoffset,    lov_wr_stripeoffset, 0 },
-        { "stripecount",  lov_rd_stripecount,     lov_wr_stripecount, 0 },
-        { "stripetype",   lov_rd_stripetype,      lov_wr_stripetype, 0 },
-        { "numobd",       lov_rd_numobd,          0, 0 },
-        { "activeobd",    lov_rd_activeobd,       0, 0 },
-        { "filestotal",   lprocfs_rd_filestotal,  0, 0 },
-        { "filesfree",    lprocfs_rd_filesfree,   0, 0 },
-        /*{ "filegroups", lprocfs_rd_filegroups,  0, 0 },*/
-        { "blocksize",    lprocfs_rd_blksize,     0, 0 },
-        { "kbytestotal",  lprocfs_rd_kbytestotal, 0, 0 },
-        { "kbytesfree",   lprocfs_rd_kbytesfree,  0, 0 },
-        { "kbytesavail",  lprocfs_rd_kbytesavail, 0, 0 },
-        { "desc_uuid",    lov_rd_desc_uuid,       0, 0 },
-        { "qos_prio_free",lov_rd_qos_priofree,    lov_wr_qos_priofree, 0 },
-        { "qos_maxage",   lov_rd_qos_maxage,      lov_wr_qos_maxage, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_lov_module_vars[] = {
-        { "num_refs",     lprocfs_rd_numrefs,     0, 0 },
-        { 0 }
-};
-
-void lprocfs_lov_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_lov_module_vars;
-    lvars->obd_vars     = lprocfs_lov_obd_vars;
-}
-
-struct file_operations lov_proc_target_fops = {
-        .owner   = THIS_MODULE,
-        .open    = lov_target_seq_open,
-        .read    = seq_read,
-        .llseek  = seq_lseek,
-        .release = lprocfs_seq_release,
-};
-#endif /* LPROCFS */
-
diff --git a/lustre/lvfs/.cvsignore b/lustre/lvfs/.cvsignore
deleted file mode 100644
index fe3989f935370d3ff4675ea803052f969d76fef2..0000000000000000000000000000000000000000
--- a/lustre/lvfs/.cvsignore
+++ /dev/null
@@ -1,19 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-fsfilt-*.c
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
-sources
-fsfilt_ldiskfs*
-fsfilt-ldiskfs*
diff --git a/lustre/lvfs/Info.plist b/lustre/lvfs/Info.plist
deleted file mode 100644
index 44439e2a89a7691882ffbba61a535ebfc7411f4d..0000000000000000000000000000000000000000
--- a/lustre/lvfs/Info.plist
+++ /dev/null
@@ -1,37 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>lvfs</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.clusterfs.lustre.lvfs</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>KEXT</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.1</string> 
-	<key>OSBundleCompatibleVersion</key> 
-	<string>1.0.0</string>
-	<key>OSBundleLibraries</key>
-	<dict>
-		<key>com.apple.kpi.bsd</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.libkern</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.mach</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.unsupported</key>
-		<string>8.0.0b1</string>
-		<key>com.clusterfs.lustre.libcfs</key> 
-		<string>1.0.0</string>
-	</dict>
-</dict>
-</plist>
diff --git a/lustre/lvfs/Makefile.in b/lustre/lvfs/Makefile.in
deleted file mode 100644
index de72dbdf108450556a51cd7fa4c237834e91d806..0000000000000000000000000000000000000000
--- a/lustre/lvfs/Makefile.in
+++ /dev/null
@@ -1,20 +0,0 @@
-MODULES := lvfs
-@SERVER_TRUE@MODULES += fsfilt_@BACKINGFS@
-@QUOTA_TRUE@MODULES += quotafmt_test
-
-lvfs-objs := lvfs_common.o lvfs_linux.o fsfilt.o upcall_cache.o prng.o lvfs_lib.o
-@QUOTA_TRUE@lvfs-objs += lustre_quota_fmt.o lustre_quota_fmt_convert.o
-
-@QUOTA_TRUE@quotafmt-objs := quotafmt_test.o
-
-ifeq ($(PATCHLEVEL),6)
-fsfilt_@BACKINGFS@-objs := fsfilt-@BACKINGFS@.o
-
-$(obj)/fsfilt-%.c: $(obj)/fsfilt_%.c
-	ln -s $< $@
-endif
-
-# for <ext3/xattr.h> on 2.6
-EXTRA_PRE_CFLAGS := -I@LINUX@/fs -I@LDISKFS_DIR@ -I@LDISKFS_DIR@/ldiskfs
-
-@INCLUDE_RULES@
diff --git a/lustre/lvfs/autoMakefile.am b/lustre/lvfs/autoMakefile.am
deleted file mode 100644
index b7b3a484e25b3210b33d00173b986af25c71c209..0000000000000000000000000000000000000000
--- a/lustre/lvfs/autoMakefile.am
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-if LIBLUSTRE
-noinst_LIBRARIES = liblvfs.a
-liblvfs_a_SOURCES = lvfs_userfs.c prng.c lvfs_lib.c
-liblvfs_a_CFLAGS = $(LLCFLAGS)
-liblvfs_a_CPPFLAGS = $(LLCPPFLAGS)
-
-#if MYSQL
-#liblvfs_a_SOURCES += lvfs_user_mysql.c
-#endif
-endif
-
-if MODULES
-
-if LINUX
-
-modulefs_DATA := lvfs$(KMODEXT)
-
-if SERVER
-modulefs_DATA += fsfilt_$(BACKINGFS)$(KMODEXT)
-
-sources: fsfilt_$(BACKINGFS).c
-	touch sources
-
-else #SERVER
-sources:
-
-endif #SERVER
-
-fsfilt_extN.c: fsfilt_ext3.c
-	sed -e "s/EXT3/EXTN/g" -e "s/ext3/extN/g" $< > $@
-
-ldiskfs_sed_flags = \
-	-e "s/dx_hash_info/ext3_dx_hash_info/g" \
-	-e "s/dir_private_info/ext3_dir_private_info/g" \
-	-e "s/DX_HASH/EXT3_DX_HASH/g" \
-	-e "s/reserve_window/ext3_reserve_window/g" \
-	-e "s/rsv_window_add/ext3_rsv_window_add/g" \
-	-e "s/EXT3/LDISKFS/g" -e "s/ext3/ldiskfs/g"
-
-fsfilt_ldiskfs.c: fsfilt_ext3.c
-	sed $(strip $(ldiskfs_sed_flags)) $< > $@
-fsfilt_ldiskfs_quota.h: fsfilt_ext3_quota.h
-	sed $(strip $(ldiskfs_sed_flags)) $< > $@
-
-endif # LINUX
-
-if DARWIN
-
-macos_PROGRAMS := lvfs
-
-lvfs_SOURCES := lvfs_darwin.c
-
-lvfs_CFLAGS := $(EXTRA_KCFLAGS)
-lvfs_LDFLAGS := $(EXTRA_KLDFLAGS)
-lvfs_LDADD := $(EXTRA_KLIBS)
-
-plist_DATA := Info.plist
-
-install_data_hook := fix-kext-ownership
-
-endif # DARWIN
-
-else # MODULES
-
-sources:
-
-endif # MODULES
-
-install-data-hook: $(install_data_hook)
-
-DIST_SOURCES = fsfilt.c fsfilt_ext3.c fsfilt_reiserfs.c lvfs_common.c \
-	lvfs_internal.h lvfs_linux.c lvfs_userfs.c \
-	upcall_cache.c prng.c lvfs_lib.c\
-	lustre_quota_fmt.c lustre_quota_fmt.h quotafmt_test.c \
-	lustre_quota_fmt_convert.c \
-        # quotacheck_test.c quotactl_test.c fsfilt_ext3_quota.h
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-CLEANFILES = fsfilt-*.c fsfilt_ldiskfs*.c fsfilt_extN.c sources
-
diff --git a/lustre/lvfs/fsfilt.c b/lustre/lvfs/fsfilt.c
deleted file mode 100644
index 6f88917f3d3c125a7c772e3a595b9af5863b9913..0000000000000000000000000000000000000000
--- a/lustre/lvfs/fsfilt.c
+++ /dev/null
@@ -1,109 +0,0 @@
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <linux/fs.h>
-#include <linux/jbd.h>
-#include <linux/module.h>
-#include <linux/kmod.h>
-#include <linux/slab.h>
-#include <libcfs/kp30.h>
-#include <lustre_fsfilt.h>
-
-LIST_HEAD(fsfilt_types);
-
-static struct fsfilt_operations *fsfilt_search_type(const char *type)
-{
-        struct fsfilt_operations *found;
-        struct list_head *p;
-
-        list_for_each(p, &fsfilt_types) {
-                found = list_entry(p, struct fsfilt_operations, fs_list);
-                if (!strcmp(found->fs_type, type)) {
-                        return found;
-                }
-        }
-        return NULL;
-}
-
-int fsfilt_register_ops(struct fsfilt_operations *fs_ops)
-{
-        struct fsfilt_operations *found;
-
-        /* lock fsfilt_types list */
-        if ((found = fsfilt_search_type(fs_ops->fs_type))) {
-                if (found != fs_ops) {
-                        CERROR("different operations for type %s\n",
-                               fs_ops->fs_type);
-                        /* unlock fsfilt_types list */
-                        RETURN(-EEXIST);
-                }
-        } else {
-                PORTAL_MODULE_USE;
-                list_add(&fs_ops->fs_list, &fsfilt_types);
-        }
-
-        /* unlock fsfilt_types list */
-        return 0;
-}
-
-void fsfilt_unregister_ops(struct fsfilt_operations *fs_ops)
-{
-        struct list_head *p;
-
-        /* lock fsfilt_types list */
-        list_for_each(p, &fsfilt_types) {
-                struct fsfilt_operations *found;
-
-                found = list_entry(p, typeof(*found), fs_list);
-                if (found == fs_ops) {
-                        list_del(p);
-                        PORTAL_MODULE_UNUSE;
-                        break;
-                }
-        }
-        /* unlock fsfilt_types list */
-}
-
-struct fsfilt_operations *fsfilt_get_ops(const char *type)
-{
-        struct fsfilt_operations *fs_ops;
-
-        /* lock fsfilt_types list */
-        if (!(fs_ops = fsfilt_search_type(type))) {
-                char name[32];
-                int rc;
-
-                snprintf(name, sizeof(name) - 1, "fsfilt_%s", type);
-                name[sizeof(name) - 1] = '\0';
-
-                if (!(rc = request_module(name))) {
-                        fs_ops = fsfilt_search_type(type);
-                        CDEBUG(D_INFO, "Loaded module '%s'\n", name);
-                        if (!fs_ops)
-                                rc = -ENOENT;
-                }
-
-                if (rc) {
-                        CERROR("Can't find %s interface\n", name);
-                        RETURN(ERR_PTR(rc < 0 ? rc : -rc));
-                        /* unlock fsfilt_types list */
-                }
-        }
-        try_module_get(fs_ops->fs_owner);
-        /* unlock fsfilt_types list */
-
-        return fs_ops;
-}
-
-void fsfilt_put_ops(struct fsfilt_operations *fs_ops)
-{
-        module_put(fs_ops->fs_owner);
-}
-
-
-EXPORT_SYMBOL(fsfilt_register_ops);
-EXPORT_SYMBOL(fsfilt_unregister_ops);
-EXPORT_SYMBOL(fsfilt_get_ops);
-EXPORT_SYMBOL(fsfilt_put_ops);
diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c
deleted file mode 100644
index 88f31b8059223a12a975d0f0f6c7dc6575708f59..0000000000000000000000000000000000000000
--- a/lustre/lvfs/fsfilt_ext3.c
+++ /dev/null
@@ -1,2219 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/lib/fsfilt_ext3.c
- *  Lustre filesystem abstraction routines
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/jbd.h>
-#include <linux/slab.h>
-#include <linux/pagemap.h>
-#include <linux/quotaops.h>
-#include <linux/ext3_fs.h>
-#include <linux/ext3_jbd.h>
-#include <linux/version.h>
-#include <linux/bitops.h>
-#include <linux/quota.h>
-#include <linux/quotaio_v1.h>
-#include <linux/quotaio_v2.h>
-#include <linux/parser.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/ext3_xattr.h>
-#else
-#include <ext3/xattr.h>
-#endif
-
-#include <libcfs/kp30.h>
-#include <lustre_fsfilt.h>
-#include <obd.h>
-#include <lustre_quota.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/iobuf.h>
-#endif
-#include <linux/lustre_compat25.h>
-#include <linux/lprocfs_status.h>
-
-#ifdef EXT3_MULTIBLOCK_ALLOCATOR
-#include <linux/ext3_extents.h>
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
-#define FSFILT_DATA_TRANS_BLOCKS(sb)      EXT3_DATA_TRANS_BLOCKS
-#define FSFILT_DELETE_TRANS_BLOCKS(sb)    EXT3_DELETE_TRANS_BLOCKS
-#else
-#define FSFILT_DATA_TRANS_BLOCKS(sb)      EXT3_DATA_TRANS_BLOCKS(sb)
-#define FSFILT_DELETE_TRANS_BLOCKS(sb)    EXT3_DELETE_TRANS_BLOCKS(sb)
-#endif
-
-#ifdef EXT3_SINGLEDATA_TRANS_BLOCKS_HAS_SB
-/* for kernels 2.6.18 and later */
-#define FSFILT_SINGLEDATA_TRANS_BLOCKS(sb) EXT3_SINGLEDATA_TRANS_BLOCKS(sb)
-#else
-#define FSFILT_SINGLEDATA_TRANS_BLOCKS(sb) EXT3_SINGLEDATA_TRANS_BLOCKS
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#define fsfilt_ext3_journal_start(inode, nblocks) \
-                                journal_start(EXT3_JOURNAL(inode),nblocks)
-#define fsfilt_ext3_journal_stop(handle)          journal_stop(handle)
-#else
-#define fsfilt_ext3_journal_start(inode, nblocks) ext3_journal_start(inode, nblocks)
-#define fsfilt_ext3_journal_stop(handle)          ext3_journal_stop(handle)
-#endif
-
-static cfs_mem_cache_t *fcb_cache;
-
-struct fsfilt_cb_data {
-        struct journal_callback cb_jcb; /* jbd private data - MUST BE FIRST */
-        fsfilt_cb_t cb_func;            /* MDS/OBD completion function */
-        struct obd_device *cb_obd;      /* MDS/OBD completion device */
-        __u64 cb_last_rcvd;             /* MDS/OST last committed operation */
-        void *cb_data;                  /* MDS/OST completion function data */
-};
-
-#ifndef EXT3_XATTR_INDEX_TRUSTED        /* temporary until we hit l28 kernel */
-#define EXT3_XATTR_INDEX_TRUSTED        4
-#endif
-
-static char *fsfilt_ext3_get_label(struct super_block *sb)
-{
-        return EXT3_SB(sb)->s_es->s_volume_name;
-}
-
-static int fsfilt_ext3_set_label(struct super_block *sb, char *label)
-{
-        /* see e.g. fsfilt_ext3_write_record() */
-        journal_t *journal;
-        handle_t *handle;
-        int err;
-
-        journal = EXT3_SB(sb)->s_journal;
-        lock_24kernel();
-        handle = journal_start(journal, 1);
-        unlock_24kernel();
-        if (IS_ERR(handle)) {
-                CERROR("can't start transaction\n");
-                return(PTR_ERR(handle));
-        }
-
-        err = ext3_journal_get_write_access(handle, EXT3_SB(sb)->s_sbh);
-        if (err)
-                goto out;
-
-        memcpy(EXT3_SB(sb)->s_es->s_volume_name, label,
-               sizeof(EXT3_SB(sb)->s_es->s_volume_name));
-
-        err = ext3_journal_dirty_metadata(handle, EXT3_SB(sb)->s_sbh);
-
-out:
-        lock_24kernel();
-        journal_stop(handle);
-        unlock_24kernel();
-
-        return(err);
-}
-
-static char *fsfilt_ext3_uuid(struct super_block *sb)
-{
-        return EXT3_SB(sb)->s_es->s_uuid;
-}
-
-#ifdef HAVE_DISK_INODE_VERSION
-/*
- * Get the 64-bit version for an inode.
- */
-static __u64 fsfilt_ext3_get_version(struct inode *inode)
-{
-        return EXT3_I(inode)->i_fs_version;
-}
-
-/*
- * Set the 64-bit version and return the old version.
- */
-static __u64 fsfilt_ext3_set_version(struct inode *inode, __u64 new_version)
-{
-        __u64 old_version = EXT3_I(inode)->i_fs_version;
-
-        (EXT3_I(inode))->i_fs_version = new_version;
-        return old_version;
-}
-
-#endif
-
-/*
- * We don't currently need any additional blocks for rmdir and
- * unlink transactions because we are storing the OST oa_id inside
- * the inode (which we will be changing anyways as part of this
- * transaction).
- */
-static void *fsfilt_ext3_start(struct inode *inode, int op, void *desc_private,
-                               int logs)
-{
-        /* For updates to the last received file */
-        int nblocks = FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb);
-        journal_t *journal;
-        void *handle;
-
-        if (current->journal_info) {
-                CDEBUG(D_INODE, "increasing refcount on %p\n",
-                       current->journal_info);
-                goto journal_start;
-        }
-
-        switch(op) {
-        case FSFILT_OP_RMDIR:
-        case FSFILT_OP_UNLINK:
-                /* delete one file + create/update logs for each stripe */
-                nblocks += FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb);
-                nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                            FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)) * logs;
-                break;
-        case FSFILT_OP_RENAME:
-                /* modify additional directory */
-                nblocks += FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb);
-                /* no break */
-        case FSFILT_OP_SYMLINK:
-                /* additional block + block bitmap + GDT for long symlink */
-                nblocks += 3;
-                /* no break */
-        case FSFILT_OP_CREATE: {
-#if defined(EXT3_EXTENTS_FL) && defined(EXT3_INDEX_FL)
-                static int warned;
-                if (!warned) {
-                        if (!test_opt(inode->i_sb, EXTENTS)) {
-                                warned = 1;
-                        } else if (((EXT3_I(inode)->i_flags &
-                              cpu_to_le32(EXT3_EXTENTS_FL | EXT3_INDEX_FL)) ==
-                              cpu_to_le32(EXT3_EXTENTS_FL | EXT3_INDEX_FL))) {
-                                CWARN("extent-mapped directory found - contact "
-                                      "CFS: support@clusterfs.com\n");
-                                warned = 1;
-                        }
-                }
-#endif
-                /* no break */
-        }
-        case FSFILT_OP_MKDIR:
-        case FSFILT_OP_MKNOD:
-                /* modify one inode + block bitmap + GDT */
-                nblocks += 3;
-                /* no break */
-        case FSFILT_OP_LINK:
-                /* modify parent directory */
-                nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                         FSFILT_DATA_TRANS_BLOCKS(inode->i_sb);
-                /* create/update logs for each stripe */
-                nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                            FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)) * logs;
-                break;
-        case FSFILT_OP_SETATTR:
-                /* Setattr on inode */
-                nblocks += 1;
-                nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                         FSFILT_DATA_TRANS_BLOCKS(inode->i_sb);
-                /* quota chown log for each stripe */
-                nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                            FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb)) * logs;
-                break;
-        case FSFILT_OP_CANCEL_UNLINK:
-                /* blocks for log header bitmap update OR
-                 * blocks for catalog header bitmap update + unlink of logs */
-                nblocks = (LLOG_CHUNK_SIZE >> inode->i_blkbits) +
-                        FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb) * logs;
-                break;
-        case FSFILT_OP_JOIN:
-                /* delete 2 file(file + array id) + create 1 file (array id) 
-                 * create/update logs for each stripe */
-                nblocks += 2 * FSFILT_DELETE_TRANS_BLOCKS(inode->i_sb);
-               
-                /*create array log for head file*/ 
-                nblocks += 3;
-                nblocks += (EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                            FSFILT_SINGLEDATA_TRANS_BLOCKS(inode->i_sb));
-                /*update head file array */
-                nblocks += EXT3_INDEX_EXTRA_TRANS_BLOCKS +
-                         FSFILT_DATA_TRANS_BLOCKS(inode->i_sb);
-                break;
-        default: CERROR("unknown transaction start op %d\n", op);
-                LBUG();
-        }
-
-        LASSERT(current->journal_info == desc_private);
-        journal = EXT3_SB(inode->i_sb)->s_journal;
-        if (nblocks > journal->j_max_transaction_buffers) {
-                CWARN("too many credits %d for op %ux%u using %d instead\n",
-                      nblocks, op, logs, journal->j_max_transaction_buffers);
-                nblocks = journal->j_max_transaction_buffers;
-        }
-
- journal_start:
-        LASSERTF(nblocks > 0, "can't start %d credit transaction\n", nblocks);
-        lock_24kernel();
-        handle = fsfilt_ext3_journal_start(inode, nblocks);
-        unlock_24kernel();
-
-        if (!IS_ERR(handle))
-                LASSERT(current->journal_info == handle);
-        else
-                CERROR("error starting handle for op %u (%u credits): rc %ld\n",
-                       op, nblocks, PTR_ERR(handle));
-        return handle;
-}
-
-/*
- * Calculate the number of buffer credits needed to write multiple pages in
- * a single ext3 transaction.  No, this shouldn't be here, but as yet ext3
- * doesn't have a nice API for calculating this sort of thing in advance.
- *
- * See comment above ext3_writepage_trans_blocks for details.  We assume
- * no data journaling is being done, but it does allow for all of the pages
- * being non-contiguous.  If we are guaranteed contiguous pages we could
- * reduce the number of (d)indirect blocks a lot.
- *
- * With N blocks per page and P pages, for each inode we have at most:
- * N*P indirect
- * min(N*P, blocksize/4 + 1) dindirect blocks
- * niocount tindirect
- *
- * For the entire filesystem, we have at most:
- * min(sum(nindir + P), ngroups) bitmap blocks (from the above)
- * min(sum(nindir + P), gdblocks) group descriptor blocks (from the above)
- * objcount inode blocks
- * 1 superblock
- * 2 * EXT3_SINGLEDATA_TRANS_BLOCKS for the quota files
- *
- * 1 EXT3_DATA_TRANS_BLOCKS for the last_rcvd update.
- */
-static int fsfilt_ext3_credits_needed(int objcount, struct fsfilt_objinfo *fso,
-                                      int niocount, struct niobuf_local *nb)
-{
-        struct super_block *sb = fso->fso_dentry->d_inode->i_sb;
-        __u64 next_indir;
-        const int blockpp = 1 << (CFS_PAGE_SHIFT - sb->s_blocksize_bits);
-        int nbitmaps = 0, ngdblocks;
-        int needed = objcount + 1; /* inodes + superblock */
-        int i, j;
-
-        for (i = 0, j = 0; i < objcount; i++, fso++) {
-                /* two or more dindirect blocks in case we cross boundary */
-                int ndind = (long)((nb[j + fso->fso_bufcnt - 1].offset -
-                                    nb[j].offset) >>
-                                   sb->s_blocksize_bits) /
-                        (EXT3_ADDR_PER_BLOCK(sb) * EXT3_ADDR_PER_BLOCK(sb));
-                nbitmaps += min(fso->fso_bufcnt, ndind > 0 ? ndind : 2);
-
-                /* leaf, indirect, tindirect blocks for first block */
-                nbitmaps += blockpp + 2;
-
-                j += fso->fso_bufcnt;
-        }
-
-        next_indir = nb[0].offset +
-                (EXT3_ADDR_PER_BLOCK(sb) << sb->s_blocksize_bits);
-        for (i = 1; i < niocount; i++) {
-                if (nb[i].offset >= next_indir) {
-                        nbitmaps++;     /* additional indirect */
-                        next_indir = nb[i].offset +
-                                (EXT3_ADDR_PER_BLOCK(sb)<<sb->s_blocksize_bits);
-                } else if (nb[i].offset != nb[i - 1].offset + sb->s_blocksize) {
-                        nbitmaps++;     /* additional indirect */
-                }
-                nbitmaps += blockpp;    /* each leaf in different group? */
-        }
-
-        ngdblocks = nbitmaps;
-        if (nbitmaps > EXT3_SB(sb)->s_groups_count)
-                nbitmaps = EXT3_SB(sb)->s_groups_count;
-        if (ngdblocks > EXT3_SB(sb)->s_gdb_count)
-                ngdblocks = EXT3_SB(sb)->s_gdb_count;
-
-        needed += nbitmaps + ngdblocks;
-
-        /* last_rcvd update */
-        needed += FSFILT_DATA_TRANS_BLOCKS(sb);
-
-#if defined(CONFIG_QUOTA)
-        /* We assume that there will be 1 bit set in s_dquot.flags for each
-         * quota file that is active.  This is at least true for now.
-         */
-        needed += hweight32(sb_any_quota_enabled(sb)) *
-                FSFILT_SINGLEDATA_TRANS_BLOCKS(sb);
-#endif
-
-        return needed;
-}
-
-/* We have to start a huge journal transaction here to hold all of the
- * metadata for the pages being written here.  This is necessitated by
- * the fact that we do lots of prepare_write operations before we do
- * any of the matching commit_write operations, so even if we split
- * up to use "smaller" transactions none of them could complete until
- * all of them were opened.  By having a single journal transaction,
- * we eliminate duplicate reservations for common blocks like the
- * superblock and group descriptors or bitmaps.
- *
- * We will start the transaction here, but each prepare_write will
- * add a refcount to the transaction, and each commit_write will
- * remove a refcount.  The transaction will be closed when all of
- * the pages have been written.
- */
-static void *fsfilt_ext3_brw_start(int objcount, struct fsfilt_objinfo *fso,
-                                   int niocount, struct niobuf_local *nb,
-                                   void *desc_private, int logs)
-{
-        journal_t *journal;
-        handle_t *handle;
-        int needed;
-        ENTRY;
-
-        LASSERT(current->journal_info == desc_private);
-        journal = EXT3_SB(fso->fso_dentry->d_inode->i_sb)->s_journal;
-        needed = fsfilt_ext3_credits_needed(objcount, fso, niocount, nb);
-
-        /* The number of blocks we could _possibly_ dirty can very large.
-         * We reduce our request if it is absurd (and we couldn't get that
-         * many credits for a single handle anyways).
-         *
-         * At some point we have to limit the size of I/Os sent at one time,
-         * increase the size of the journal, or we have to calculate the
-         * actual journal requirements more carefully by checking all of
-         * the blocks instead of being maximally pessimistic.  It remains to
-         * be seen if this is a real problem or not.
-         */
-        if (needed > journal->j_max_transaction_buffers) {
-                CERROR("want too many journal credits (%d) using %d instead\n",
-                       needed, journal->j_max_transaction_buffers);
-                needed = journal->j_max_transaction_buffers;
-        }
-
-        LASSERTF(needed > 0, "can't start %d credit transaction\n", needed);
-        lock_24kernel();
-        handle = fsfilt_ext3_journal_start(fso->fso_dentry->d_inode, needed);
-        unlock_24kernel();
-        if (IS_ERR(handle)) {
-                CERROR("can't get handle for %d credits: rc = %ld\n", needed,
-                       PTR_ERR(handle));
-        } else {
-                LASSERT(handle->h_buffer_credits >= needed);
-                LASSERT(current->journal_info == handle);
-        }
-
-        RETURN(handle);
-}
-
-static int fsfilt_ext3_extend(struct inode *inode, unsigned int nblocks,void *h)
-{
-       handle_t *handle = h;
-
-       /* fsfilt_extend called with nblocks = 0 for testing in special cases */
-       if (nblocks == 0) {
-               handle->h_buffer_credits = 0;
-               CWARN("setting credits of handle %p to zero by request\n", h);
-       }
-
-       if (handle->h_buffer_credits > nblocks)
-                return 0;
-       if (journal_extend(handle, nblocks) == 0)
-                return 0;
-
-       ext3_mark_inode_dirty(handle, inode);
-       return journal_restart(handle, nblocks);
-}
-
-static int fsfilt_ext3_commit(struct inode *inode, void *h, int force_sync)
-{
-        int rc;
-        handle_t *handle = h;
-
-        LASSERT(current->journal_info == handle);
-        if (force_sync)
-                handle->h_sync = 1; /* recovery likes this */
-
-        lock_24kernel();
-        rc = fsfilt_ext3_journal_stop(handle);
-        unlock_24kernel();
-
-        return rc;
-}
-
-static int fsfilt_ext3_commit_async(struct inode *inode, void *h,
-                                    void **wait_handle)
-{
-        unsigned long tid;
-        transaction_t *transaction;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-        unsigned long rtid;
-#endif
-        handle_t *handle = h;
-        journal_t *journal;
-        int rc;
-
-        LASSERT(current->journal_info == handle);
-
-        lock_24kernel();
-        transaction = handle->h_transaction;
-        journal = transaction->t_journal;
-        tid = transaction->t_tid;
-        /* we don't want to be blocked */
-        handle->h_sync = 0;
-        rc = fsfilt_ext3_journal_stop(handle);
-        if (rc) {
-                CERROR("error while stopping transaction: %d\n", rc);
-                unlock_24kernel();
-                return rc;
-        }
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-        rtid = log_start_commit(journal, transaction);
-        if (rtid != tid)
-                CERROR("strange race: %lu != %lu\n",
-                       (unsigned long) tid, (unsigned long) rtid);
-#else
-        log_start_commit(journal, tid);
-#endif
-        unlock_24kernel();
-
-        *wait_handle = (void *) tid;
-        CDEBUG(D_INODE, "commit async: %lu\n", (unsigned long) tid);
-        return 0;
-}
-
-static int fsfilt_ext3_commit_wait(struct inode *inode, void *h)
-{
-        journal_t *journal = EXT3_JOURNAL(inode);
-        tid_t tid = (tid_t)(long)h;
-
-        CDEBUG(D_INODE, "commit wait: %lu\n", (unsigned long) tid);
-        if (unlikely(is_journal_aborted(journal)))
-                return -EIO;
-
-        log_wait_commit(EXT3_JOURNAL(inode), tid);
-
-        if (unlikely(is_journal_aborted(journal)))
-                return -EIO;
-        return 0;
-}
-
-static int fsfilt_ext3_setattr(struct dentry *dentry, void *handle,
-                               struct iattr *iattr, int do_trunc)
-{
-        struct inode *inode = dentry->d_inode;
-        int rc = 0;
-
-        lock_24kernel();
-
-        /* Avoid marking the inode dirty on the superblock list unnecessarily.
-         * We are already writing the inode to disk as part of this
-         * transaction and want to avoid a lot of extra inode writeout
-         * later on. b=9828 */
-        if (iattr->ia_valid & ATTR_SIZE && !do_trunc) {
-                /* ATTR_SIZE would invoke truncate: clear it */
-                iattr->ia_valid &= ~ATTR_SIZE;
-                EXT3_I(inode)->i_disksize = iattr->ia_size;
-                i_size_write(inode, iattr->ia_size);
-
-                if (iattr->ia_valid & ATTR_UID)
-                        inode->i_uid = iattr->ia_uid;
-                if (iattr->ia_valid & ATTR_GID)
-                        inode->i_gid = iattr->ia_gid;
-                if (iattr->ia_valid & ATTR_ATIME)
-                        inode->i_atime = iattr->ia_atime;
-                if (iattr->ia_valid & ATTR_MTIME)
-                        inode->i_mtime = iattr->ia_mtime;
-                if (iattr->ia_valid & ATTR_CTIME)
-                        inode->i_ctime = iattr->ia_ctime;
-                if (iattr->ia_valid & ATTR_MODE) {
-                        inode->i_mode = iattr->ia_mode;
-
-                        if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
-                                inode->i_mode &= ~S_ISGID;
-                }
-
-                inode->i_sb->s_op->dirty_inode(inode);
-
-                goto out;
-        }
-
-        /* Don't allow setattr to change file type */
-        if (iattr->ia_valid & ATTR_MODE)
-                iattr->ia_mode = (inode->i_mode & S_IFMT) |
-                                 (iattr->ia_mode & ~S_IFMT);
-
-        /* We set these flags on the client, but have already checked perms
-         * so don't confuse inode_change_ok. */
-        iattr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET);
-
-        if (inode->i_op->setattr) {
-                rc = inode->i_op->setattr(dentry, iattr);
-        } else {
-                rc = inode_change_ok(inode, iattr);
-                if (!rc)
-                        rc = inode_setattr(inode, iattr);
-        }
-
- out:
-        unlock_24kernel();
-        RETURN(rc);
-}
-
-static int fsfilt_ext3_iocontrol(struct inode * inode, struct file *file,
-                                 unsigned int cmd, unsigned long arg)
-{
-        int rc = 0;
-        ENTRY;
-
-        /* FIXME: Can't do this because of nested transaction deadlock */
-        if (cmd == EXT3_IOC_SETFLAGS && (*(int *)arg) & EXT3_JOURNAL_DATA_FL) {
-                CERROR("can't set data journal flag on file\n");
-                RETURN(-EPERM);
-        }
-
-        if (inode->i_fop->ioctl)
-                rc = inode->i_fop->ioctl(inode, file, cmd, arg);
-        else
-                RETURN(-ENOTTY);
-
-        RETURN(rc);
-}
-
-static int fsfilt_ext3_set_md(struct inode *inode, void *handle,
-                              void *lmm, int lmm_size, const char *name)
-{
-        int rc;
-
-        LASSERT(TRYLOCK_INODE_MUTEX(inode) == 0);
-
-        lock_24kernel();
-        rc = ext3_xattr_set_handle(handle, inode, EXT3_XATTR_INDEX_TRUSTED,
-                                   name, lmm, lmm_size, 0);
-
-        unlock_24kernel();
-
-        if (rc && rc != -EROFS)
-                CERROR("error adding MD data to inode %lu: rc = %d\n",
-                       inode->i_ino, rc);
-        return rc;
-}
-
-/* Must be called with i_mutex held */
-static int fsfilt_ext3_get_md(struct inode *inode, void *lmm, int lmm_size,
-                              const char *name)
-{
-        int rc;
-
-        LASSERT(TRYLOCK_INODE_MUTEX(inode) == 0);
-        lock_24kernel();
-
-        rc = ext3_xattr_get(inode, EXT3_XATTR_INDEX_TRUSTED,
-                            name, lmm, lmm_size);
-        unlock_24kernel();
-
-        /* This gives us the MD size */
-        if (lmm == NULL)
-                return (rc == -ENODATA) ? 0 : rc;
-
-        if (rc < 0) {
-                CDEBUG(D_INFO, "error getting EA %d/%s from inode %lu: rc %d\n",
-                       EXT3_XATTR_INDEX_TRUSTED, name,
-                       inode->i_ino, rc);
-                memset(lmm, 0, lmm_size);
-                return (rc == -ENODATA) ? 0 : rc;
-        }
-
-        return rc;
-}
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-static int fsfilt_ext3_send_bio(int rw, struct inode *inode, struct bio *bio)
-{
-        submit_bio(rw, bio);
-        return 0;
-}
-#else
-static int fsfilt_ext3_send_bio(int rw, struct inode *inode, struct kiobuf *bio)
-{
-        int rc, blk_per_page;
-
-        rc = brw_kiovec(rw, 1, &bio, inode->i_dev,
-                        KIOBUF_GET_BLOCKS(bio), 1 << inode->i_blkbits);
-        /*
-         * brw_kiovec() returns number of bytes actually written. If error
-         * occurred after something was written, error code is returned though
-         * kiobuf->errno. (See bug 6854.)
-         */
-
-        blk_per_page = CFS_PAGE_SIZE >> inode->i_blkbits;
-
-        if (rc != (1 << inode->i_blkbits) * bio->nr_pages * blk_per_page) {
-                CERROR("short write?  expected %d, wrote %d (%d)\n",
-                       (1 << inode->i_blkbits) * bio->nr_pages * blk_per_page,
-                       rc, bio->errno);
-        }
-        if (bio->errno != 0) {
-                CERROR("IO error. Wrote %d of %d (%d)\n",
-                       rc,
-                       (1 << inode->i_blkbits) * bio->nr_pages * blk_per_page,
-                       bio->errno);
-                rc = bio->errno;
-        }
-
-        return rc;
-}
-#endif
-
-static ssize_t fsfilt_ext3_readpage(struct file *file, char *buf, size_t count,
-                                    loff_t *off)
-{
-        struct inode *inode = file->f_dentry->d_inode;
-        int rc = 0;
-
-        if (S_ISREG(inode->i_mode))
-                rc = file->f_op->read(file, buf, count, off);
-        else {
-                const int blkbits = inode->i_sb->s_blocksize_bits;
-                const int blksize = inode->i_sb->s_blocksize;
-
-                CDEBUG(D_EXT2, "reading "LPSZ" at dir %lu+%llu\n",
-                       count, inode->i_ino, *off);
-                while (count > 0) {
-                        struct buffer_head *bh;
-
-                        bh = NULL;
-                        if (*off < i_size_read(inode)) {
-                                int err = 0;
-
-                                bh = ext3_bread(NULL, inode, *off >> blkbits,
-                                                0, &err);
-
-                                CDEBUG(D_EXT2, "read %u@%llu\n", blksize, *off);
-
-                                if (bh) {
-                                        memcpy(buf, bh->b_data, blksize);
-                                        brelse(bh);
-                                } else if (err) {
-                                        /* XXX in theory we should just fake
-                                         * this buffer and continue like ext3,
-                                         * especially if this is a partial read
-                                         */
-                                        CERROR("error read dir %lu+%llu: %d\n",
-                                               inode->i_ino, *off, err);
-                                        RETURN(err);
-                                }
-                        }
-                        if (!bh) {
-                                struct ext3_dir_entry_2 *fake = (void *)buf;
-
-                                CDEBUG(D_EXT2, "fake %u@%llu\n", blksize, *off);
-                                memset(fake, 0, sizeof(*fake));
-                                fake->rec_len = cpu_to_le16(blksize);
-                        }
-                        count -= blksize;
-                        buf += blksize;
-                        *off += blksize;
-                        rc += blksize;
-                }
-        }
-
-        return rc;
-}
-
-static void fsfilt_ext3_cb_func(struct journal_callback *jcb, int error)
-{
-        struct fsfilt_cb_data *fcb = (struct fsfilt_cb_data *)jcb;
-
-        fcb->cb_func(fcb->cb_obd, fcb->cb_last_rcvd, fcb->cb_data, error);
-
-        OBD_SLAB_FREE(fcb, fcb_cache, sizeof *fcb);
-}
-
-static int fsfilt_ext3_add_journal_cb(struct obd_device *obd, __u64 last_rcvd,
-                                      void *handle, fsfilt_cb_t cb_func,
-                                      void *cb_data)
-{
-        struct fsfilt_cb_data *fcb;
-
-        OBD_SLAB_ALLOC(fcb, fcb_cache, CFS_ALLOC_IO, sizeof *fcb);
-        if (fcb == NULL)
-                RETURN(-ENOMEM);
-
-        fcb->cb_func = cb_func;
-        fcb->cb_obd = obd;
-        fcb->cb_last_rcvd = last_rcvd;
-        fcb->cb_data = cb_data;
-
-        CDEBUG(D_EXT2, "set callback for last_rcvd: "LPD64"\n", last_rcvd);
-        lock_24kernel();
-        journal_callback_set(handle, fsfilt_ext3_cb_func,
-                             (struct journal_callback *)fcb);
-        unlock_24kernel();
-
-        return 0;
-}
-
-/*
- * We need to hack the return value for the free inode counts because
- * the current EA code requires one filesystem block per inode with EAs,
- * so it is possible to run out of blocks before we run out of inodes.
- *
- * This can be removed when the ext3 EA code is fixed.
- */
-static int fsfilt_ext3_statfs(struct super_block *sb, struct obd_statfs *osfs)
-{
-        struct kstatfs sfs;
-        int rc;
-
-        memset(&sfs, 0, sizeof(sfs));
-        rc = ll_do_statfs(sb,&sfs);
-
-        if (!rc && sfs.f_bfree < sfs.f_ffree) {
-                sfs.f_files = (sfs.f_files - sfs.f_ffree) + sfs.f_bfree;
-                sfs.f_ffree = sfs.f_bfree;
-        }
-
-        statfs_pack(osfs, &sfs);
-        return rc;
-}
-
-static int fsfilt_ext3_sync(struct super_block *sb)
-{
-        return ext3_force_commit(sb);
-}
-
-#if defined(EXT3_MULTIBLOCK_ALLOCATOR) && (!defined(EXT3_EXT_CACHE_NO) || defined(EXT_CACHE_MARK))
-#warning "kernel code has old extents/mballoc patch, disabling"
-#undef EXT3_MULTIBLOCK_ALLOCATOR
-#endif
-#ifndef EXT3_EXTENTS_FL
-#define EXT3_EXTENTS_FL                 0x00080000 /* Inode uses extents */
-#endif
-
-#ifdef EXT3_MULTIBLOCK_ALLOCATOR
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#define ext3_up_truncate_sem(inode)  up_write(&EXT3_I(inode)->truncate_sem);
-#define ext3_down_truncate_sem(inode)  down_write(&EXT3_I(inode)->truncate_sem);
-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17))
-#define ext3_up_truncate_sem(inode)  up(&EXT3_I(inode)->truncate_sem);
-#define ext3_down_truncate_sem(inode)  down(&EXT3_I(inode)->truncate_sem);
-#else
-#define ext3_up_truncate_sem(inode)  mutex_unlock(&EXT3_I(inode)->truncate_mutex);
-#define ext3_down_truncate_sem(inode)  mutex_lock(&EXT3_I(inode)->truncate_mutex);
-#endif
-
-#ifndef EXT_ASSERT
-#define EXT_ASSERT(cond)  BUG_ON(!(cond))
-#endif
-
-#ifdef EXT3_EXT_HAS_NO_TREE
-/* for kernels 2.6.18 and later */
-#define ext3_ext_base                   inode
-#define ext3_ext_base2inode(inode)      (inode)
-#define EXT_DEPTH(inode)                ext_depth(inode)
-#define EXT_GENERATION(inode)           ext_generation(inode)
-#define fsfilt_ext3_ext_walk_space(inode, block, num, cb, cbdata) \
-                        ext3_ext_walk_space(inode, block, num, cb, cbdata);
-#else
-#define ext3_ext_base                   ext3_extents_tree
-#define ext3_ext_base2inode(tree)       (tree->inode)
-#define fsfilt_ext3_ext_walk_space(tree, block, num, cb, cbdata) \
-                        ext3_ext_walk_space(tree, block, num, cb);
-#endif
-
-#include <linux/lustre_version.h>
-#if EXT3_EXT_MAGIC == 0xf301
-#define ee_start e_start
-#define ee_block e_block
-#define ee_len   e_num
-#endif
-#ifndef EXT3_BB_MAX_BLOCKS
-#define ext3_mb_new_blocks(handle, inode, goal, count, aflags, err) \
-        ext3_new_blocks(handle, inode, count, goal, err)
-#endif
-
-struct bpointers {
-        unsigned long *blocks;
-        int *created;
-        unsigned long start;
-        int num;
-        int init_num;
-        int create;
-};
-
-static int ext3_ext_find_goal(struct inode *inode, struct ext3_ext_path *path,
-                              unsigned long block, int *aflags)
-{
-        struct ext3_inode_info *ei = EXT3_I(inode);
-        unsigned long bg_start;
-        unsigned long colour;
-        int depth;
-
-        if (path) {
-                struct ext3_extent *ex;
-                depth = path->p_depth;
-
-                /* try to predict block placement */
-                if ((ex = path[depth].p_ext)) {
-#if 0
-                        /* This prefers to eat into a contiguous extent
-                         * rather than find an extent that the whole
-                         * request will fit into.  This can fragment data
-                         * block allocation and prevents our lovely 1M I/Os
-                         * from reaching the disk intact. */
-                        if (ex->ee_block + ex->ee_len == block)
-                                *aflags |= 1;
-#endif
-                        return ex->ee_start + (block - ex->ee_block);
-                }
-
-                /* it looks index is empty
-                 * try to find starting from index itself */
-                if (path[depth].p_bh)
-                        return path[depth].p_bh->b_blocknr;
-        }
-
-        /* OK. use inode's group */
-        bg_start = (ei->i_block_group * EXT3_BLOCKS_PER_GROUP(inode->i_sb)) +
-                le32_to_cpu(EXT3_SB(inode->i_sb)->s_es->s_first_data_block);
-        colour = (current->pid % 16) *
-                (EXT3_BLOCKS_PER_GROUP(inode->i_sb) / 16);
-        return bg_start + colour + block;
-}
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/locks.h>
-static void ll_unmap_underlying_metadata(struct super_block *sb,
-                                         unsigned long blocknr)
-{
-        struct buffer_head *old_bh;
-
-        old_bh = get_hash_table(sb->s_dev, blocknr, sb->s_blocksize);
-        if (old_bh) {
-                mark_buffer_clean(old_bh);
-                wait_on_buffer(old_bh);
-                clear_bit(BH_Req, &old_bh->b_state);
-                __brelse(old_bh);
-        }
-}
-#else
-#define ll_unmap_underlying_metadata(sb, blocknr) \
-        unmap_underlying_metadata((sb)->s_bdev, blocknr)
-#endif
-
-#ifndef EXT3_MB_HINT_GROUP_ALLOC
-static unsigned long new_blocks(handle_t *handle, struct ext3_ext_base *base,
-                                struct ext3_ext_path *path, unsigned long block,
-                                unsigned long *count, int *err)
-{
-        unsigned long pblock, goal;
-        int aflags = 0;
-        struct inode *inode = ext3_ext_base2inode(base);
-
-        goal = ext3_ext_find_goal(inode, path, block, &aflags);
-        aflags |= 2; /* block have been already reserved */
-        lock_24kernel();
-        pblock = ext3_mb_new_blocks(handle, inode, goal, count, aflags, err);
-        unlock_24kernel();
-        return pblock;
-
-}
-#else
-static unsigned long new_blocks(handle_t *handle, struct ext3_ext_base *base,
-                                struct ext3_ext_path *path, unsigned long block,
-                                unsigned long *count, int *err)
-{
-        struct inode *inode = ext3_ext_base2inode(base);
-        struct ext3_allocation_request ar;
-        unsigned long pblock;
-        int aflags;
-
-        /* find neighbour allocated blocks */
-        ar.lleft = block;
-        *err = ext3_ext_search_left(base, path, &ar.lleft, &ar.pleft);
-        if (*err)
-                return 0;
-        ar.lright = block;
-        *err = ext3_ext_search_right(base, path, &ar.lright, &ar.pright);
-        if (*err)
-                return 0;
-
-        /* allocate new block */
-        ar.goal = ext3_ext_find_goal(inode, path, block, &aflags);
-        ar.inode = inode;
-        ar.logical = block;
-        ar.len = *count;
-        ar.flags = EXT3_MB_HINT_DATA;
-        pblock = ext3_mb_new_blocks(handle, &ar, err);
-        *count = ar.len;
-        return pblock;
-}
-#endif
-
-#ifdef EXT3_EXT_HAS_NO_TREE
-static int ext3_ext_new_extent_cb(struct ext3_ext_base *base,
-                                  struct ext3_ext_path *path,
-                                  struct ext3_ext_cache *cex,
-#ifdef HAVE_EXT_PREPARE_CB_EXTENT
-                                  struct ext3_extent *ex,
-#endif
-                                  void *cbdata)
-{
-        struct bpointers *bp = cbdata;
-#else
-static int ext3_ext_new_extent_cb(struct ext3_ext_base *base,
-                                  struct ext3_ext_path *path,
-                                  struct ext3_ext_cache *cex
-#ifdef HAVE_EXT_PREPARE_CB_EXTENT
-                                  , struct ext3_extent *ex
-#endif
-                                 )
-{
-        struct bpointers *bp = base->private;
-#endif
-        struct inode *inode = ext3_ext_base2inode(base);
-        struct ext3_extent nex;
-        unsigned long pblock;
-        unsigned long tgen;
-        int err, i;
-        unsigned long count;
-        handle_t *handle;
-
-        i = EXT_DEPTH(base);
-        EXT_ASSERT(i == path->p_depth);
-        EXT_ASSERT(path[i].p_hdr);
-
-        if (cex->ec_type == EXT3_EXT_CACHE_EXTENT) {
-                err = EXT_CONTINUE;
-                goto map;
-        }
-
-        if (bp->create == 0) {
-                i = 0;
-                if (cex->ec_block < bp->start)
-                        i = bp->start - cex->ec_block;
-                if (i >= cex->ec_len)
-                        CERROR("nothing to do?! i = %d, e_num = %u\n",
-                                        i, cex->ec_len);
-                for (; i < cex->ec_len && bp->num; i++) {
-                        *(bp->created) = 0;
-                        bp->created++;
-                        *(bp->blocks) = 0;
-                        bp->blocks++;
-                        bp->num--;
-                        bp->start++;
-                }
-
-                return EXT_CONTINUE;
-        }
-
-        tgen = EXT_GENERATION(base);
-        count = ext3_ext_calc_credits_for_insert(base, path);
-        ext3_up_truncate_sem(inode);
-
-        lock_24kernel();
-        handle = fsfilt_ext3_journal_start(inode, count+EXT3_ALLOC_NEEDED+1);
-        unlock_24kernel();
-        if (IS_ERR(handle)) {
-                ext3_down_truncate_sem(inode);
-                return PTR_ERR(handle);
-        }
-
-        ext3_down_truncate_sem(inode);
-        if (tgen != EXT_GENERATION(base)) {
-                /* the tree has changed. so path can be invalid at moment */
-                lock_24kernel();
-                fsfilt_ext3_journal_stop(handle);
-                unlock_24kernel();
-                return EXT_REPEAT;
-        }
-
-        count = cex->ec_len;
-        pblock = new_blocks(handle, base, path, cex->ec_block, &count, &err);
-        if (!pblock)
-                goto out;
-        EXT_ASSERT(count <= cex->ec_len);
-
-        /* insert new extent */
-        nex.ee_block = cex->ec_block;
-        nex.ee_start = pblock;
-        nex.ee_len = count;
-        err = ext3_ext_insert_extent(handle, base, path, &nex);
-        if (err) {
-                CERROR("can't insert extent: %d\n", err);
-                /* XXX: export ext3_free_blocks() */
-                /*ext3_free_blocks(handle, inode, nex.ee_start, nex.ee_len, 0);*/
-                goto out;
-        }
-
-        /*
-         * Putting len of the actual extent we just inserted,
-         * we are asking ext3_ext_walk_space() to continue
-         * scaning after that block
-         */
-        cex->ec_len = nex.ee_len;
-        cex->ec_start = nex.ee_start;
-        BUG_ON(nex.ee_len == 0);
-        BUG_ON(nex.ee_block != cex->ec_block);
-
-out:
-        lock_24kernel();
-        fsfilt_ext3_journal_stop(handle);
-        unlock_24kernel();
-map:
-        if (err >= 0) {
-                /* map blocks */
-                if (bp->num == 0) {
-                        CERROR("hmm. why do we find this extent?\n");
-                        CERROR("initial space: %lu:%u\n",
-                                bp->start, bp->init_num);
-                        CERROR("current extent: %u/%u/%u %d\n",
-                                cex->ec_block, cex->ec_len,
-                                cex->ec_start, cex->ec_type);
-                }
-                i = 0;
-                if (cex->ec_block < bp->start)
-                        i = bp->start - cex->ec_block;
-                if (i >= cex->ec_len)
-                        CERROR("nothing to do?! i = %d, e_num = %u\n",
-                                        i, cex->ec_len);
-                for (; i < cex->ec_len && bp->num; i++) {
-                        *(bp->blocks) = cex->ec_start + i;
-                        if (cex->ec_type == EXT3_EXT_CACHE_EXTENT) {
-                                *(bp->created) = 0;
-                        } else {
-                                *(bp->created) = 1;
-                                /* unmap any possible underlying metadata from
-                                 * the block device mapping.  bug 6998. */
-                                ll_unmap_underlying_metadata(inode->i_sb,
-                                                             *(bp->blocks));
-                        }
-                        bp->created++;
-                        bp->blocks++;
-                        bp->num--;
-                        bp->start++;
-                }
-        }
-        return err;
-}
-
-int fsfilt_map_nblocks(struct inode *inode, unsigned long block,
-                       unsigned long num, unsigned long *blocks,
-                       int *created, int create)
-{
-#ifdef EXT3_EXT_HAS_NO_TREE
-        struct ext3_ext_base *base = inode;
-#else
-        struct ext3_extents_tree tree;
-        struct ext3_ext_base *base = &tree;
-#endif
-        struct bpointers bp;
-        int err;
-
-        CDEBUG(D_OTHER, "blocks %lu-%lu requested for inode %u\n",
-               block, block + num - 1, (unsigned) inode->i_ino);
-
-#ifndef EXT3_EXT_HAS_NO_TREE
-        ext3_init_tree_desc(base, inode);
-        tree.private = &bp;
-#endif
-        bp.blocks = blocks;
-        bp.created = created;
-        bp.start = block;
-        bp.init_num = bp.num = num;
-        bp.create = create;
-
-        ext3_down_truncate_sem(inode);
-        err = fsfilt_ext3_ext_walk_space(base, block, num, ext3_ext_new_extent_cb, &bp);
-        ext3_ext_invalidate_cache(base);
-        ext3_up_truncate_sem(inode);
-
-        return err;
-}
-
-int fsfilt_ext3_map_ext_inode_pages(struct inode *inode, struct page **page,
-                                    int pages, unsigned long *blocks,
-                                    int *created, int create)
-{
-        int blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits;
-        int rc = 0, i = 0;
-        struct page *fp = NULL;
-        int clen = 0;
-
-        CDEBUG(D_OTHER, "inode %lu: map %d pages from %lu\n",
-                inode->i_ino, pages, (*page)->index);
-
-        /* pages are sorted already. so, we just have to find
-         * contig. space and process them properly */
-        while (i < pages) {
-                if (fp == NULL) {
-                        /* start new extent */
-                        fp = *page++;
-                        clen = 1;
-                        i++;
-                        continue;
-                } else if (fp->index + clen == (*page)->index) {
-                        /* continue the extent */
-                        page++;
-                        clen++;
-                        i++;
-                        continue;
-                }
-
-                /* process found extent */
-                rc = fsfilt_map_nblocks(inode, fp->index * blocks_per_page,
-                                        clen * blocks_per_page, blocks,
-                                        created, create);
-                if (rc)
-                        GOTO(cleanup, rc);
-
-                /* look for next extent */
-                fp = NULL;
-                blocks += blocks_per_page * clen;
-                created += blocks_per_page * clen;
-        }
-
-        if (fp)
-                rc = fsfilt_map_nblocks(inode, fp->index * blocks_per_page,
-                                        clen * blocks_per_page, blocks,
-                                        created, create);
-cleanup:
-        return rc;
-}
-#endif /* EXT3_MULTIBLOCK_ALLOCATOR */
-
-extern int ext3_map_inode_page(struct inode *inode, struct page *page,
-                               unsigned long *blocks, int *created, int create);
-int fsfilt_ext3_map_bm_inode_pages(struct inode *inode, struct page **page,
-                                   int pages, unsigned long *blocks,
-                                   int *created, int create)
-{
-        int blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits;
-        unsigned long *b;
-        int rc = 0, i, *cr;
-
-        for (i = 0, cr = created, b = blocks; i < pages; i++, page++) {
-                rc = ext3_map_inode_page(inode, *page, b, cr, create);
-                if (rc) {
-                        CERROR("ino %lu, blk %lu cr %u create %d: rc %d\n",
-                               inode->i_ino, *b, *cr, create, rc);
-                        break;
-                }
-
-                b += blocks_per_page;
-                cr += blocks_per_page;
-        }
-        return rc;
-}
-
-int fsfilt_ext3_map_inode_pages(struct inode *inode, struct page **page,
-                                int pages, unsigned long *blocks,
-                                int *created, int create,
-                                struct semaphore *optional_sem)
-{
-        int rc;
-#ifdef EXT3_MULTIBLOCK_ALLOCATOR
-        if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) {
-                rc = fsfilt_ext3_map_ext_inode_pages(inode, page, pages,
-                                                     blocks, created, create);
-                return rc;
-        }
-#endif
-        if (optional_sem != NULL)
-                down(optional_sem);
-        rc = fsfilt_ext3_map_bm_inode_pages(inode, page, pages, blocks,
-                                            created, create);
-        if (optional_sem != NULL)
-                up(optional_sem);
-
-        return rc;
-}
-
-static int fsfilt_ext3_read_record(struct file * file, void *buf,
-                                   int size, loff_t *offs)
-{
-        struct inode *inode = file->f_dentry->d_inode;
-        unsigned long block;
-        struct buffer_head *bh;
-        int err, blocksize, csize, boffs;
-
-        /* prevent reading after eof */
-        lock_kernel();
-        if (i_size_read(inode) < *offs + size) {
-                size = i_size_read(inode) - *offs;
-                unlock_kernel();
-                if (size < 0) {
-                        CERROR("size %llu is too short for read %u@%llu\n",
-                               i_size_read(inode), size, *offs);
-                        return -EIO;
-                } else if (size == 0) {
-                        return 0;
-                }
-        } else {
-                unlock_kernel();
-        }
-
-        blocksize = 1 << inode->i_blkbits;
-
-        while (size > 0) {
-                block = *offs >> inode->i_blkbits;
-                boffs = *offs & (blocksize - 1);
-                csize = min(blocksize - boffs, size);
-                bh = ext3_bread(NULL, inode, block, 0, &err);
-                if (!bh) {
-                        CERROR("can't read block: %d\n", err);
-                        return err;
-                }
-
-                memcpy(buf, bh->b_data + boffs, csize);
-                brelse(bh);
-
-                *offs += csize;
-                buf += csize;
-                size -= csize;
-        }
-        return 0;
-}
-
-static int fsfilt_ext3_write_record(struct file *file, void *buf, int bufsize,
-                                    loff_t *offs, int force_sync)
-{
-        struct buffer_head *bh = NULL;
-        unsigned long block;
-        struct inode *inode = file->f_dentry->d_inode;
-        loff_t old_size = i_size_read(inode), offset = *offs;
-        loff_t new_size = i_size_read(inode);
-        handle_t *handle;
-        int err = 0, block_count = 0, blocksize, size, boffs;
-
-        /* Determine how many transaction credits are needed */
-        blocksize = 1 << inode->i_blkbits;
-        block_count = (*offs & (blocksize - 1)) + bufsize;
-        block_count = (block_count + blocksize - 1) >> inode->i_blkbits;
-
-        lock_24kernel();
-        handle = fsfilt_ext3_journal_start(inode,
-                               block_count * FSFILT_DATA_TRANS_BLOCKS(inode->i_sb) + 2);
-        unlock_24kernel();
-        if (IS_ERR(handle)) {
-                CERROR("can't start transaction for %d blocks (%d bytes)\n",
-                       block_count * FSFILT_DATA_TRANS_BLOCKS(inode->i_sb) + 2, bufsize);
-                return PTR_ERR(handle);
-        }
-
-        while (bufsize > 0) {
-                if (bh != NULL)
-                        brelse(bh);
-
-                block = offset >> inode->i_blkbits;
-                boffs = offset & (blocksize - 1);
-                size = min(blocksize - boffs, bufsize);
-                bh = ext3_bread(handle, inode, block, 1, &err);
-                if (!bh) {
-                        CERROR("can't read/create block: %d\n", err);
-                        goto out;
-                }
-
-                err = ext3_journal_get_write_access(handle, bh);
-                if (err) {
-                        CERROR("journal_get_write_access() returned error %d\n",
-                               err);
-                        goto out;
-                }
-                LASSERT(bh->b_data + boffs + size <= bh->b_data + bh->b_size);
-                memcpy(bh->b_data + boffs, buf, size);
-                err = ext3_journal_dirty_metadata(handle, bh);
-                if (err) {
-                        CERROR("journal_dirty_metadata() returned error %d\n",
-                               err);
-                        goto out;
-                }
-                if (offset + size > new_size)
-                        new_size = offset + size;
-                offset += size;
-                bufsize -= size;
-                buf += size;
-        }
-
-        if (force_sync)
-                handle->h_sync = 1; /* recovery likes this */
-out:
-        if (bh)
-                brelse(bh);
-
-        /* correct in-core and on-disk sizes */
-        if (new_size > i_size_read(inode)) {
-                lock_kernel();
-                if (new_size > i_size_read(inode))
-                        i_size_write(inode, new_size);
-                if (i_size_read(inode) > EXT3_I(inode)->i_disksize)
-                        EXT3_I(inode)->i_disksize = i_size_read(inode);
-                if (i_size_read(inode) > old_size)
-                        mark_inode_dirty(inode);
-                unlock_kernel();
-        }
-
-        lock_24kernel();
-        fsfilt_ext3_journal_stop(handle);
-        unlock_24kernel();
-
-        if (err == 0)
-                *offs = offset;
-        return err;
-}
-
-static int fsfilt_ext3_setup(struct super_block *sb)
-{
-        struct ext3_sb_info *sbi = EXT3_SB(sb);
-#if 0
-        sbi->dx_lock = fsfilt_ext3_dx_lock;
-        sbi->dx_unlock = fsfilt_ext3_dx_unlock;
-#endif
-#ifdef S_PDIROPS
-        CWARN("Enabling PDIROPS\n");
-        set_opt(sbi->s_mount_opt, PDIROPS);
-        sb->s_flags |= S_PDIROPS;
-#endif
-        if (!EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_DIR_INDEX))
-                CWARN("filesystem doesn't have dir_index feature enabled\n");
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,6)) && HAVE_QUOTA_SUPPORT
-        /* enable journaled quota support */
-        /* kfreed in ext3_put_super() */
-        sbi->s_qf_names[USRQUOTA] = kstrdup("lquota.user", GFP_KERNEL);
-        if (!sbi->s_qf_names[USRQUOTA])
-                return -ENOMEM;
-        sbi->s_qf_names[GRPQUOTA] = kstrdup("lquota.group", GFP_KERNEL);
-        if (!sbi->s_qf_names[GRPQUOTA]) {
-                kfree(sbi->s_qf_names[USRQUOTA]);
-                sbi->s_qf_names[USRQUOTA] = NULL;
-                return -ENOMEM;
-        }
-        sbi->s_jquota_fmt = QFMT_VFS_V0;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13))
-        set_opt(sbi->s_mount_opt, QUOTA);
-#endif
-#endif
-        return 0;
-}
-
-/* If fso is NULL, op is FSFILT operation, otherwise op is number of fso
-   objects. Logs is number of logfiles to update */
-static int fsfilt_ext3_get_op_len(int op, struct fsfilt_objinfo *fso, int logs)
-{
-        if ( !fso ) {
-                switch(op) {
-                case FSFILT_OP_CREATE:
-                                 /* directory leaf, index & indirect & EA*/
-                        return 4 + 3 * logs;
-                case FSFILT_OP_UNLINK:
-                        return 3 * logs;
-                }
-        } else {
-                int i;
-                int needed = 0;
-                struct super_block *sb = fso->fso_dentry->d_inode->i_sb;
-                int blockpp = 1 << (CFS_PAGE_SHIFT - sb->s_blocksize_bits);
-                int addrpp = EXT3_ADDR_PER_BLOCK(sb) * blockpp;
-                for (i = 0; i < op; i++, fso++) {
-                        int nblocks = fso->fso_bufcnt * blockpp;
-                        int ndindirect = min(nblocks, addrpp + 1);
-                        int nindir = nblocks + ndindirect + 1;
-
-                        needed += nindir;
-                }
-                return needed + 3 * logs;
-        }
-
-        return 0;
-}
-
-static const char *op_quotafile[] = { "lquota.user", "lquota.group" };
-
-#define DQINFO_COPY(out, in)                    \
-do {                                            \
-        Q_COPY(out, in, dqi_bgrace);            \
-        Q_COPY(out, in, dqi_igrace);            \
-        Q_COPY(out, in, dqi_flags);             \
-        Q_COPY(out, in, dqi_valid);             \
-} while (0)
-
-#define DQBLK_COPY(out, in)                     \
-do {                                            \
-        Q_COPY(out, in, dqb_bhardlimit);        \
-        Q_COPY(out, in, dqb_bsoftlimit);        \
-        Q_COPY(out, in, dqb_curspace);          \
-        Q_COPY(out, in, dqb_ihardlimit);        \
-        Q_COPY(out, in, dqb_isoftlimit);        \
-        Q_COPY(out, in, dqb_curinodes);         \
-        Q_COPY(out, in, dqb_btime);             \
-        Q_COPY(out, in, dqb_itime);             \
-        Q_COPY(out, in, dqb_valid);             \
-} while (0)
-
-      
-
-static int fsfilt_ext3_quotactl(struct super_block *sb,
-                                struct obd_quotactl *oqc)
-{
-        int i, rc = 0, error = 0;
-        struct quotactl_ops *qcop;
-        struct if_dqinfo *info;
-        struct if_dqblk *dqblk;
-        ENTRY;
-
-        if (!sb->s_qcop)
-                RETURN(-ENOSYS);
-
-        OBD_ALLOC_PTR(info);
-        if (!info)
-                RETURN(-ENOMEM);
-        OBD_ALLOC_PTR(dqblk);
-        if (!dqblk) {
-                OBD_FREE_PTR(info);
-                RETURN(-ENOMEM);
-        }
-
-        DQINFO_COPY(info, &oqc->qc_dqinfo);
-        DQBLK_COPY(dqblk, &oqc->qc_dqblk);
-
-        qcop = sb->s_qcop;
-        if (oqc->qc_cmd == Q_QUOTAON || oqc->qc_cmd == Q_QUOTAOFF) {
-                for (i = 0; i < MAXQUOTAS; i++) {
-                        if (!Q_TYPESET(oqc, i))
-                                continue;
-
-                        if (oqc->qc_cmd == Q_QUOTAON) {
-                                if (!qcop->quota_on)
-                                        GOTO(out, rc = -ENOSYS);
-                                rc = qcop->quota_on(sb, i, oqc->qc_id,
-                                                    (char *)op_quotafile[i]);
-                        } else if (oqc->qc_cmd == Q_QUOTAOFF) {
-                                if (!qcop->quota_off)
-                                        GOTO(out, rc = -ENOSYS);
-                                rc = qcop->quota_off(sb, i);
-                        }
-
-                        if (rc == -EBUSY)
-                                error = rc;
-                        else if (rc)
-                                GOTO(out, rc);
-                }
-                GOTO(out, rc ?: error);
-        }
-
-        switch (oqc->qc_cmd) {
-        case Q_GETOINFO:
-        case Q_GETINFO:
-                if (!qcop->get_info)
-                        GOTO(out, rc = -ENOSYS);
-                rc = qcop->get_info(sb, oqc->qc_type, info);
-                break;
-        case Q_SETQUOTA:
-        case Q_INITQUOTA:
-                if (!qcop->set_dqblk)
-                        GOTO(out, rc = -ENOSYS);
-                rc = qcop->set_dqblk(sb, oqc->qc_type, oqc->qc_id, dqblk);
-                break;
-        case Q_GETOQUOTA:
-        case Q_GETQUOTA:
-                if (!qcop->get_dqblk)
-                        GOTO(out, rc = -ENOSYS);
-                rc = qcop->get_dqblk(sb, oqc->qc_type, oqc->qc_id, dqblk);
-                if (!rc)
-                        dqblk->dqb_valid = QIF_LIMITS | QIF_USAGE;
-                break;
-        case Q_SYNC:
-                if (!sb->s_qcop->quota_sync)
-                        GOTO(out, rc = -ENOSYS);
-                qcop->quota_sync(sb, oqc->qc_type);
-                break;
-        default:
-                CERROR("unsupported quotactl command: %d", oqc->qc_cmd);
-                LBUG();
-        }
-out:
-        DQINFO_COPY(&oqc->qc_dqinfo, info);
-        DQBLK_COPY(&oqc->qc_dqblk, dqblk);
-
-        OBD_FREE_PTR(info);
-        OBD_FREE_PTR(dqblk);
-
-        if (rc)
-                CDEBUG(D_QUOTA, "quotactl command %#x, id %u, type %d "
-                                "failed: %d\n",
-                       oqc->qc_cmd, oqc->qc_id, oqc->qc_type, rc);
-        RETURN(rc);
-}
-
-struct chk_dqblk{
-        struct hlist_node       dqb_hash;        /* quotacheck hash */
-        struct list_head        dqb_list;        /* in list also */
-        qid_t                   dqb_id;          /* uid/gid */
-        short                   dqb_type;        /* USRQUOTA/GRPQUOTA */
-        qsize_t                 dqb_bhardlimit;  /* block hard limit */
-        qsize_t                 dqb_bsoftlimit;  /* block soft limit */
-        qsize_t                 dqb_curspace;    /* current space */
-        qsize_t                 dqb_ihardlimit;  /* inode hard limit */
-        qsize_t                 dqb_isoftlimit;  /* inode soft limit */
-        qsize_t                 dqb_curinodes;   /* current inodes */
-        __u64                   dqb_btime;       /* block grace time */
-        __u64                   dqb_itime;       /* inode grace time */
-        __u32                   dqb_valid;       /* flag for above fields */
-};
-
-static inline unsigned int chkquot_hash(qid_t id, int type)
-                                        __attribute__((__const__));
-
-static inline unsigned int chkquot_hash(qid_t id, int type)
-{
-        return (id * (MAXQUOTAS - type)) % NR_DQHASH;
-}
-
-static inline struct chk_dqblk *
-find_chkquot(struct hlist_head *head, qid_t id, int type)
-{
-        struct hlist_node *node;
-        struct chk_dqblk *cdqb;
-
-        hlist_for_each(node, head) {
-                cdqb = hlist_entry(node, struct chk_dqblk, dqb_hash);
-                if (cdqb->dqb_id == id && cdqb->dqb_type == type)
-                        return cdqb;
-        }
-
-        return NULL;
-}
-
-static struct chk_dqblk *alloc_chkquot(qid_t id, int type)
-{
-        struct chk_dqblk *cdqb;
-
-        OBD_ALLOC_PTR(cdqb);
-        if (cdqb) {
-                INIT_HLIST_NODE(&cdqb->dqb_hash);
-                INIT_LIST_HEAD(&cdqb->dqb_list);
-                cdqb->dqb_id = id;
-                cdqb->dqb_type = type;
-        }
-
-        return cdqb;
-}
-
-static struct chk_dqblk *
-cqget(struct super_block *sb, struct hlist_head *hash, struct list_head *list,
-      qid_t id, int type, int first_check)
-{
-        struct hlist_head *head = hash + chkquot_hash(id, type);
-        struct if_dqblk dqb;
-        struct chk_dqblk *cdqb;
-        int rc;
-
-        cdqb = find_chkquot(head, id, type);
-        if (cdqb)
-                return cdqb;
-
-        cdqb = alloc_chkquot(id, type);
-        if (!cdqb)
-                return NULL;
-
-        if (!first_check) {
-                rc = sb->s_qcop->get_dqblk(sb, type, id, &dqb);
-                if (rc) {
-                        CERROR("get_dqblk of id %u, type %d failed: %d\n",
-                               id, type, rc);
-                } else {
-                        DQBLK_COPY(cdqb, &dqb);
-                        cdqb->dqb_curspace = 0;
-                        cdqb->dqb_curinodes = 0;
-                }
-        }
-
-        hlist_add_head(&cdqb->dqb_hash, head);
-        list_add_tail(&cdqb->dqb_list, list);
-
-        return cdqb;
-}
-
-static inline int quota_onoff(struct super_block *sb, int cmd, int type)
-{
-        struct obd_quotactl *oqctl;
-        int rc;
-
-        OBD_ALLOC_PTR(oqctl);
-        if (!oqctl)
-                RETURN(-ENOMEM);
-
-        oqctl->qc_cmd = cmd;
-        oqctl->qc_id = QFMT_LDISKFS;
-        oqctl->qc_type = type;
-        rc = fsfilt_ext3_quotactl(sb, oqctl);
-
-        OBD_FREE_PTR(oqctl);
-        return rc;
-}
-
-static inline int read_old_dqinfo(struct super_block *sb, int type,
-                                  struct if_dqinfo *dqinfo)
-{
-        struct obd_quotactl *oqctl;
-        int rc;
-        ENTRY;
-
-        OBD_ALLOC_PTR(oqctl);
-        if (!oqctl)
-                RETURN(-ENOMEM);
-
-        oqctl->qc_cmd = Q_GETINFO;
-        oqctl->qc_type = type;
-        rc = fsfilt_ext3_quotactl(sb, oqctl);
-        if (!rc)
-                ((struct obd_dqinfo *)dqinfo)[type] = oqctl->qc_dqinfo;
-
-        OBD_FREE_PTR(oqctl);
-        RETURN(rc);
-}
-
-static inline struct ext3_group_desc *
-get_group_desc(struct super_block *sb, int group)
-{
-        unsigned long desc_block, desc;
-        struct ext3_group_desc *gdp;
-
-        desc_block = group / EXT3_DESC_PER_BLOCK(sb);
-        desc = group % EXT3_DESC_PER_BLOCK(sb);
-        gdp = (struct ext3_group_desc *)
-              EXT3_SB(sb)->s_group_desc[desc_block]->b_data;
-
-        return gdp + desc;
-}
-
-static inline struct buffer_head *
-read_inode_bitmap(struct super_block *sb, unsigned long group)
-{
-        struct ext3_group_desc *desc;
-        struct buffer_head *bh;
-
-        desc = get_group_desc(sb, group);
-        bh = sb_bread(sb, le32_to_cpu(desc->bg_inode_bitmap));
-
-        return bh;
-}
-
-static inline struct inode *ext3_iget_inuse(struct super_block *sb,
-                                     struct buffer_head *bitmap_bh,
-                                     int index, unsigned long ino)
-{
-        struct inode *inode = NULL;
-
-        if (ext3_test_bit(index, bitmap_bh->b_data))
-                inode = iget(sb, ino);
-
-        return inode;
-}
-
-struct qchk_ctxt {
-        struct hlist_head       qckt_hash[NR_DQHASH];        /* quotacheck hash */
-        struct list_head        qckt_list;                   /* quotacheck list */
-        int                     qckt_first_check[MAXQUOTAS]; /* 1 if no old quotafile */
-        struct if_dqinfo        qckt_dqinfo[MAXQUOTAS];      /* old dqinfo */
-};
-
-static int add_inode_quota(struct inode *inode, struct qchk_ctxt *qctxt,
-                           struct obd_quotactl *oqc)
-{
-        struct chk_dqblk *cdqb[MAXQUOTAS] = { NULL, };
-        loff_t size = 0;
-        qid_t qid[MAXQUOTAS];
-        int cnt, i, rc = 0;
-
-        if (!inode)
-                return 0;
-
-        qid[USRQUOTA] = inode->i_uid;
-        qid[GRPQUOTA] = inode->i_gid;
-
-        if (S_ISDIR(inode->i_mode) ||
-            S_ISREG(inode->i_mode) ||
-            S_ISLNK(inode->i_mode))
-                size = inode_get_bytes(inode);
-
-        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-                if (!Q_TYPESET(oqc, cnt))
-                        continue;
-
-                cdqb[cnt] = cqget(inode->i_sb, qctxt->qckt_hash,
-                                &qctxt->qckt_list, qid[cnt], cnt,
-                                qctxt->qckt_first_check[cnt]);
-                if (!cdqb[cnt]) {
-                        rc = -ENOMEM;
-                        break;
-                }
-
-                cdqb[cnt]->dqb_curspace += size;
-                cdqb[cnt]->dqb_curinodes++;
-        }
-
-        if (rc) {
-                for (i = 0; i < cnt; i++) {
-                        if (!Q_TYPESET(oqc, i))
-                                continue;
-                        LASSERT(cdqb[i]);
-                        cdqb[i]->dqb_curspace -= size;
-                        cdqb[i]->dqb_curinodes--;
-                }
-        }
-
-        return rc;
-}
-
-static int v2_write_dqheader(struct file *f, int type)
-{
-        static const __u32 quota_magics[] = V2_INITQMAGICS;
-        static const __u32 quota_versions[] = V2_INITQVERSIONS;
-        struct v2_disk_dqheader dqhead;
-        loff_t offset = 0;
-
-        CLASSERT(ARRAY_SIZE(quota_magics) == ARRAY_SIZE(quota_versions));
-        LASSERT(0 <= type && type < ARRAY_SIZE(quota_magics));
-
-        dqhead.dqh_magic = cpu_to_le32(quota_magics[type]);
-        dqhead.dqh_version = cpu_to_le32(quota_versions[type]);
-
-        return cfs_user_write(f, (char *)&dqhead, sizeof(dqhead), &offset);
-}
-
-/* write dqinfo struct in a new quota file */
-static int v2_write_dqinfo(struct file *f, int type, struct if_dqinfo *info)
-{
-        struct v2_disk_dqinfo dqinfo;
-        __u32 blocks = V2_DQTREEOFF + 1;
-        loff_t offset = V2_DQINFOOFF;
-
-        if (info) {
-                dqinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace);
-                dqinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace);
-                dqinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK &
-                                               ~DQF_INFO_DIRTY);
-        } else {
-                dqinfo.dqi_bgrace = cpu_to_le32(MAX_DQ_TIME);
-                dqinfo.dqi_igrace = cpu_to_le32(MAX_IQ_TIME);
-                dqinfo.dqi_flags = 0;
-        }
-
-        dqinfo.dqi_blocks = cpu_to_le32(blocks);
-        dqinfo.dqi_free_blk = 0;
-        dqinfo.dqi_free_entry = 0;
-
-        return cfs_user_write(f, (char *)&dqinfo, sizeof(dqinfo), &offset);
-}
-
-static int create_new_quota_files(struct qchk_ctxt *qctxt,
-                                  struct obd_quotactl *oqc)
-{
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct if_dqinfo *info = qctxt->qckt_first_check[i]?
-                                         NULL : &qctxt->qckt_dqinfo[i];
-                struct file *file;
-
-                if (!Q_TYPESET(oqc, i))
-                        continue;
-
-                file = filp_open(op_quotafile[i], O_RDWR | O_CREAT | O_TRUNC,
-                                 0644);
-                if (IS_ERR(file)) {
-                        rc = PTR_ERR(file);
-                        CERROR("can't create %s file: rc = %d\n",
-                               op_quotafile[i], rc);
-                        GOTO(out, rc);
-                }
-
-                if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                        CERROR("file %s is not regular", op_quotafile[i]);
-                        filp_close(file, 0);
-                        GOTO(out, rc = -EINVAL);
-                }
-
-                rc = v2_write_dqheader(file, i);
-                if (rc) {
-                        filp_close(file, 0);
-                        GOTO(out, rc);
-                }
-
-                rc = v2_write_dqinfo(file, i, info);
-                filp_close(file, 0);
-                if (rc)
-                        GOTO(out, rc);
-        }
-
-out:
-        RETURN(rc);
-}
-
-
-static int commit_chkquot(struct super_block *sb, struct qchk_ctxt *qctxt,
-                          struct chk_dqblk *cdqb)
-{
-        struct obd_quotactl *oqc;
-        long now;
-        int rc;
-        ENTRY;
-
-        OBD_ALLOC_PTR(oqc);
-        if (!oqc)
-                RETURN(-ENOMEM);
-
-        now = CURRENT_SECONDS;
-
-        if (cdqb->dqb_bsoftlimit &&
-            toqb(cdqb->dqb_curspace) >= cdqb->dqb_bsoftlimit &&
-            !cdqb->dqb_btime)
-                cdqb->dqb_btime =
-                        now + qctxt->qckt_dqinfo[cdqb->dqb_type].dqi_bgrace;
-
-        if (cdqb->dqb_isoftlimit &&
-            cdqb->dqb_curinodes >= cdqb->dqb_isoftlimit &&
-            !cdqb->dqb_itime)
-                cdqb->dqb_itime =
-                        now + qctxt->qckt_dqinfo[cdqb->dqb_type].dqi_igrace;
-
-        cdqb->dqb_valid = QIF_ALL;
-
-        oqc->qc_cmd = Q_SETQUOTA;
-        oqc->qc_type = cdqb->dqb_type;
-        oqc->qc_id = cdqb->dqb_id;
-        DQBLK_COPY(&oqc->qc_dqblk, cdqb);
-
-        rc = fsfilt_ext3_quotactl(sb, oqc);
-        OBD_FREE_PTR(oqc);
-        RETURN(rc);
-}
-
-static int prune_chkquots(struct super_block *sb,
-                          struct qchk_ctxt *qctxt, int error)
-{
-        struct chk_dqblk *cdqb, *tmp;
-        int rc;
-
-        list_for_each_entry_safe(cdqb, tmp, &qctxt->qckt_list, dqb_list) {
-                if (!error) {
-                        rc = commit_chkquot(sb, qctxt, cdqb);
-                        if (rc)
-                                error = rc;
-                }
-                hlist_del_init(&cdqb->dqb_hash);
-                list_del(&cdqb->dqb_list);
-                OBD_FREE_PTR(cdqb);
-        }
-
-        return error;
-}
-
-static int fsfilt_ext3_quotacheck(struct super_block *sb,
-                                  struct obd_quotactl *oqc)
-{
-        struct ext3_sb_info *sbi = EXT3_SB(sb);
-        int i, group;
-        struct qchk_ctxt *qctxt;
-        struct buffer_head *bitmap_bh = NULL;
-        unsigned long ino;
-        struct inode *inode;
-        int rc = 0;
-        ENTRY;
-
-        /* turn on quota and read dqinfo if existed */
-        OBD_ALLOC_PTR(qctxt);
-        if (!qctxt) {
-                oqc->qc_stat = -ENOMEM;
-                RETURN(-ENOMEM);
-        }
-
-        for (i = 0; i < NR_DQHASH; i++)
-                INIT_HLIST_HEAD(&qctxt->qckt_hash[i]);
-        INIT_LIST_HEAD(&qctxt->qckt_list);
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                if (!Q_TYPESET(oqc, i))
-                        continue;
-
-                rc = quota_onoff(sb, Q_QUOTAON, i);
-                if (!rc || rc == -EBUSY) {
-                        rc = read_old_dqinfo(sb, i, qctxt->qckt_dqinfo);
-                        if (rc)
-                                GOTO(out, rc);
-                } else if (rc == -ENOENT) {
-                        qctxt->qckt_first_check[i] = 1;
-                } else if (rc) {
-                        GOTO(out, rc);
-                }
-        }
-
-        /* check quota and update in hash */
-        for (group = 0; group < sbi->s_groups_count; group++) {
-                ino = group * sbi->s_inodes_per_group + 1;
-                bitmap_bh = read_inode_bitmap(sb, group);
-                if (!bitmap_bh) {
-                        CERROR("read_inode_bitmap group %d failed", group);
-                        GOTO(out, -EIO);
-                }
-
-                for (i = 0; i < sbi->s_inodes_per_group; i++, ino++) {
-                        if (ino < sbi->s_first_ino)
-                                continue;
-
-                        inode = ext3_iget_inuse(sb, bitmap_bh, i, ino);
-                        rc = add_inode_quota(inode, qctxt, oqc);
-                        iput(inode);
-                        if (rc) {
-                                brelse(bitmap_bh);
-                                GOTO(out, rc);
-                        }
-                }
-
-                brelse(bitmap_bh);
-        }
-
-        /* read old quota limits from old quota file. (only for the user
-         * has limits but hasn't file) */
-#ifdef HAVE_QUOTA_SUPPORT
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct list_head id_list;
-                struct dquot_id *dqid, *tmp;
-
-                if (!Q_TYPESET(oqc, i))
-                        continue;
-
-                if (qctxt->qckt_first_check[i])
-                        continue;
-
-
-                LASSERT(sb_dqopt(sb)->files[i] != NULL);
-                INIT_LIST_HEAD(&id_list);
-#ifndef KERNEL_SUPPORTS_QUOTA_READ 
-                rc = lustre_get_qids(sb_dqopt(sb)->files[i], NULL, i, &id_list);
-#else
-                rc = lustre_get_qids(NULL, sb_dqopt(sb)->files[i], i, &id_list);
-#endif
-                if (rc)
-                        CERROR("read old limits failed. (rc:%d)\n", rc);
-
-                list_for_each_entry_safe(dqid, tmp, &id_list, di_link) {
-                        list_del_init(&dqid->di_link);
-
-                        if (!rc)
-                                cqget(sb, qctxt->qckt_hash, &qctxt->qckt_list,
-                                      dqid->di_id, i,
-                                      qctxt->qckt_first_check[i]);
-                        kfree(dqid);
-                }
-        }
-#endif
-        /* turn off quota cause we are to dump chk_dqblk to files */
-        quota_onoff(sb, Q_QUOTAOFF, oqc->qc_type);
-
-        rc = create_new_quota_files(qctxt, oqc);
-        if (rc)
-                GOTO(out, rc);
-
-        /* we use vfs functions to set dqblk, so turn quota on */
-        rc = quota_onoff(sb, Q_QUOTAON, oqc->qc_type);
-out:
-        /* dump and free chk_dqblk */
-        rc = prune_chkquots(sb, qctxt, rc);
-        OBD_FREE_PTR(qctxt);
-
-        /* turn off quota, `lfs quotacheck` will turn on when all
-         * nodes quotacheck finish. */
-        quota_onoff(sb, Q_QUOTAOFF, oqc->qc_type);
-
-        oqc->qc_stat = rc;
-        if (rc)
-                CERROR("quotacheck failed: rc = %d\n", rc);
-
-        RETURN(rc);
-}
-
-#ifdef HAVE_QUOTA_SUPPORT
-static int fsfilt_ext3_quotainfo(struct lustre_quota_info *lqi, int type, 
-                                 int cmd)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (lqi->qi_files[type] == NULL) {
-                CERROR("operate qinfo before it's enabled!\n");
-                RETURN(-EIO);
-        }
-
-        switch (cmd) {
-        case QFILE_CHK:
-                rc = lustre_check_quota_file(lqi, type);
-                break;
-        case QFILE_RD_INFO:
-                rc = lustre_read_quota_info(lqi, type);
-                break;
-        case QFILE_WR_INFO:
-                rc = lustre_write_quota_info(lqi, type);
-                break;
-        case QFILE_INIT_INFO:
-                rc = lustre_init_quota_info(lqi, type);
-                break;
-        case QFILE_CONVERT:
-                rc = lustre_quota_convert(lqi, type);
-                break;
-        default:
-                CERROR("Unsupported admin quota file cmd %d\n", cmd);
-                LBUG();
-                break;
-        }
-        RETURN(rc);
-}
-
-static int fsfilt_ext3_qids(struct file *file, struct inode *inode, int type,
-                            struct list_head *list)
-{
-        return lustre_get_qids(file, inode, type, list);
-}
-
-static int fsfilt_ext3_dquot(struct lustre_dquot *dquot, int cmd)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (dquot->dq_info->qi_files[dquot->dq_type] == NULL) {
-                CERROR("operate dquot before it's enabled!\n");
-                RETURN(-EIO);
-        }
-
-        switch (cmd) {
-        case QFILE_RD_DQUOT:
-                rc = lustre_read_dquot(dquot);
-                break;
-        case QFILE_WR_DQUOT:
-                if (dquot->dq_dqb.dqb_ihardlimit ||
-                    dquot->dq_dqb.dqb_isoftlimit ||
-                    dquot->dq_dqb.dqb_bhardlimit ||
-                    dquot->dq_dqb.dqb_bsoftlimit)
-                        clear_bit(DQ_FAKE_B, &dquot->dq_flags);
-                else
-                        set_bit(DQ_FAKE_B, &dquot->dq_flags);
-
-                rc = lustre_commit_dquot(dquot);
-                if (rc >= 0)
-                        rc = 0;
-                break;
-        default:
-                CERROR("Unsupported admin quota file cmd %d\n", cmd);
-                LBUG();
-                break;
-        }
-        RETURN(rc);
-}
-#endif
-
-static lvfs_sbdev_type fsfilt_ext3_journal_sbdev(struct super_block *sb)
-{
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-        return (EXT3_SB(sb)->journal_bdev);
-#else
-        return kdev_t_to_nr(EXT3_SB(sb)->s_journal->j_dev);
-#endif
-}
-
-static struct fsfilt_operations fsfilt_ext3_ops = {
-        .fs_type                = "ext3",
-        .fs_owner               = THIS_MODULE,
-        .fs_getlabel            = fsfilt_ext3_get_label,
-        .fs_setlabel            = fsfilt_ext3_set_label,
-        .fs_uuid                = fsfilt_ext3_uuid,
-        .fs_start               = fsfilt_ext3_start,
-        .fs_brw_start           = fsfilt_ext3_brw_start,
-        .fs_extend              = fsfilt_ext3_extend,
-        .fs_commit              = fsfilt_ext3_commit,
-        .fs_commit_async        = fsfilt_ext3_commit_async,
-        .fs_commit_wait         = fsfilt_ext3_commit_wait,
-        .fs_setattr             = fsfilt_ext3_setattr,
-        .fs_iocontrol           = fsfilt_ext3_iocontrol,
-        .fs_set_md              = fsfilt_ext3_set_md,
-        .fs_get_md              = fsfilt_ext3_get_md,
-        .fs_readpage            = fsfilt_ext3_readpage,
-        .fs_add_journal_cb      = fsfilt_ext3_add_journal_cb,
-        .fs_statfs              = fsfilt_ext3_statfs,
-        .fs_sync                = fsfilt_ext3_sync,
-        .fs_map_inode_pages     = fsfilt_ext3_map_inode_pages,
-        .fs_write_record        = fsfilt_ext3_write_record,
-        .fs_read_record         = fsfilt_ext3_read_record,
-        .fs_setup               = fsfilt_ext3_setup,
-        .fs_send_bio            = fsfilt_ext3_send_bio,
-        .fs_get_op_len          = fsfilt_ext3_get_op_len,
-        .fs_quotactl            = fsfilt_ext3_quotactl,
-        .fs_quotacheck          = fsfilt_ext3_quotacheck,
-#ifdef HAVE_DISK_INODE_VERSION
-        .fs_get_version         = fsfilt_ext3_get_version,
-        .fs_set_version         = fsfilt_ext3_set_version,
-#endif
-#ifdef HAVE_QUOTA_SUPPORT
-        .fs_quotainfo           = fsfilt_ext3_quotainfo,
-        .fs_qids                = fsfilt_ext3_qids,
-        .fs_dquot               = fsfilt_ext3_dquot,
-#endif
-        .fs_journal_sbdev       = fsfilt_ext3_journal_sbdev,
-};
-
-static int __init fsfilt_ext3_init(void)
-{
-        int rc;
-
-        fcb_cache = cfs_mem_cache_create("fsfilt_ext3_fcb",
-                                         sizeof(struct fsfilt_cb_data), 0, 0);
-        if (!fcb_cache) {
-                CERROR("error allocating fsfilt journal callback cache\n");
-                GOTO(out, rc = -ENOMEM);
-        }
-
-        rc = fsfilt_register_ops(&fsfilt_ext3_ops);
-
-        if (rc) {
-                int err = cfs_mem_cache_destroy(fcb_cache);
-                LASSERTF(err == 0, "error destroying new cache: rc %d\n", err);
-        }
-out:
-        return rc;
-}
-
-static void __exit fsfilt_ext3_exit(void)
-{
-        int rc;
-
-        fsfilt_unregister_ops(&fsfilt_ext3_ops);
-        rc = cfs_mem_cache_destroy(fcb_cache);
-        LASSERTF(rc == 0, "couldn't destroy fcb_cache slab\n");
-}
-
-module_init(fsfilt_ext3_init);
-module_exit(fsfilt_ext3_exit);
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre ext3 Filesystem Helper v0.1");
-MODULE_LICENSE("GPL");
diff --git a/lustre/lvfs/fsfilt_reiserfs.c b/lustre/lvfs/fsfilt_reiserfs.c
deleted file mode 100644
index 00a0433ff3ccaa1acea4a0c937432e98b6b58f28..0000000000000000000000000000000000000000
--- a/lustre/lvfs/fsfilt_reiserfs.c
+++ /dev/null
@@ -1,244 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/lib/fsfilt_reiserfs.c
- *  Lustre filesystem abstraction routines
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- * NOTE - According to Hans Reiser, this could actually be implemented more
- *        efficiently than creating a directory and putting ASCII objids in it.
- *        Instead, we should return the reiserfs object ID as the lustre objid
- *        (although I'm not sure what impact that would have on backup/restore).
- */
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <linux/fs.h>
-#include <linux/slab.h>
-#include <linux/pagemap.h>
-#include <linux/quotaops.h>
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-#include <linux/init.h>
-#include <asm/statfs.h>
-#endif
-#include <libcfs/kp30.h>
-#include <lustre_fsfilt.h>
-#include <obd.h>
-#include <linux/module.h>
-#include <linux/init.h>
-
-/* XXX We cannot include linux/reiserfs_fs.h here, because of symbols clash,
-   but we need MAX_HEIGHT definition for proper reserve calculations
-#include <linux/reiserfs_fs.h>
-*/
-#define MAX_HEIGHT 5 /* maximal height of a tree. don't change this without
-                        changing JOURNAL_PER_BALANCE_CNT */
-
-static void *fsfilt_reiserfs_start(struct inode *inode, int op,
-                                   void *desc_private, int logs)
-{
-        return (void *)0xf00f00be;
-}
-
-static void *fsfilt_reiserfs_brw_start(int objcount, struct fsfilt_objinfo *fso,
-                                       int niocount, struct niobuf_local *nb,
-                                       void *desc_private, int logs)
-{
-        return (void *)0xf00f00be;
-}
-
-static int fsfilt_reiserfs_commit(struct inode *inode, void *handle,
-                                  int force_sync)
-{
-        if (handle != (void *)0xf00f00be) {
-                CERROR("bad handle %p", handle);
-                return -EINVAL;
-        }
-
-        return 0;
-}
-
-static int fsfilt_reiserfs_setattr(struct dentry *dentry, void *handle,
-                               struct iattr *iattr, int do_trunc)
-{
-        struct inode *inode = dentry->d_inode;
-        int rc;
-
-        lock_kernel();
-
-        /* A _really_ horrible hack to avoid removing the data stored
-         * in the block pointers; this is really the "small" stripe MD data.
-         * We can avoid further hackery by virtue of the MDS file size being
-         * zero all the time (which doesn't invoke block truncate at unlink
-         * time), so we assert we never change the MDS file size from zero.
-         */
-        if (iattr->ia_valid & ATTR_SIZE && !do_trunc) {
-                /* ATTR_SIZE would invoke truncate: clear it */
-                iattr->ia_valid &= ~ATTR_SIZE;
-                i_size_write(inode, iattr->ia_size);
-
-                /* make sure _something_ gets set - so new inode
-                 * goes to disk (probably won't work over XFS
-                 */
-                if (!iattr->ia_valid & ATTR_MODE) {
-                        iattr->ia_valid |= ATTR_MODE;
-                        iattr->ia_mode = inode->i_mode;
-                }
-        }
-
-        /* We set these flags on the client, but have already checked perms
-         * so don't confuse inode_change_ok. */
-        iattr->ia_valid &= ~(ATTR_MTIME_SET | ATTR_ATIME_SET);
-
-        if (inode->i_op->setattr) {
-                rc = inode->i_op->setattr(dentry, iattr);
-        } else {
-                rc = inode_change_ok(inode, iattr);
-                if (!rc)
-                        rc = inode_setattr(inode, iattr);
-        }
-
-        unlock_kernel();
-
-        return rc;
-}
-
-static int fsfilt_reiserfs_set_md(struct inode *inode, void *handle,
-                                  void *lmm, int lmm_size, const char *name)
-{
-        /* XXX write stripe data into MDS file itself */
-        CERROR("not implemented yet\n");
-
-        return -ENOSYS;
-}
-
-static int fsfilt_reiserfs_get_md(struct inode *inode, void *lmm, int lmm_size,
-                                  const char *name)
-{
-        if (lmm == NULL)
-                return i_size_read(inode);
-
-        CERROR("not implemented yet\n");
-        return -ENOSYS;
-}
-
-static ssize_t fsfilt_reiserfs_readpage(struct file *file, char *buf, size_t count,
-                                        loff_t *offset)
-{
-        return file->f_op->read(file, buf, count, offset);
-}
-
-static int fsfilt_reiserfs_add_journal_cb(struct obd_device *obd,
-                                          __u64 last_rcvd, void *handle,
-                                          fsfilt_cb_t cb_func, void *cb_data)
-{
-        static unsigned long next = 0;
-
-        if (time_after(jiffies, next)) {
-                CERROR("no journal callback kernel patch, faking it...\n");
-                next = jiffies + 300 * HZ;
-        }
-
-        cb_func(obd, last_rcvd, cb_data, 0);
-
-        return 0;
-}
-
-static int fsfilt_reiserfs_statfs(struct super_block *sb,
-                                  struct obd_statfs *osfs)
-{
-        struct kstatfs sfs;
-        int rc;
-
-        memset(&sfs, 0, sizeof(sfs));
-        rc = ll_do_statfs(sb, &sfs);
-        statfs_pack(osfs, &sfs);
-        return rc;
-}
-
-static int fsfilt_reiserfs_sync(struct super_block *sb)
-{
-        return fsync_dev(sb->s_dev);
-}
-
-/* If fso is NULL, op is FSFILT operation, otherwise op is number of fso
-   objects. Logs is number of logfiles to update */
-static int fsfilt_reiserfs_get_op_len(int op, struct fsfilt_objinfo *fso,
-                                      int logs)
-{
-        if ( !fso ) {
-                switch(op) {
-                case FSFILT_OP_CREATE:
-                                 /* directory leaf, index & indirect & EA*/
-                        return MAX_HEIGHT + logs;
-                case FSFILT_OP_UNLINK:
-                        return MAX_HEIGHT + logs;
-                }
-
-        } else {
-                int i;
-                int needed = MAX_HEIGHT;
-                struct super_block *sb = fso->fso_dentry->d_inode->i_sb;
-                int blockpp = 1 << (CFS_PAGE_SHIFT - sb->s_blocksize_bits);
-                for (i = 0; i < op; i++, fso++) {
-                        int nblocks = fso->fso_bufcnt * blockpp;
-
-                        needed += nblocks;
-                }
-                return needed + logs;
-        }
-
-        return 0;
-}
-static struct fsfilt_operations fsfilt_reiserfs_ops = {
-        .fs_type                = "reiserfs",
-        .fs_owner               = THIS_MODULE,
-        .fs_start               = fsfilt_reiserfs_start,
-        .fs_brw_start           = fsfilt_reiserfs_brw_start,
-        .fs_commit              = fsfilt_reiserfs_commit,
-        .fs_setattr             = fsfilt_reiserfs_setattr,
-        .fs_set_md              = fsfilt_reiserfs_set_md,
-        .fs_get_md              = fsfilt_reiserfs_get_md,
-        .fs_readpage            = fsfilt_reiserfs_readpage,
-        .fs_add_journal_cb      = fsfilt_reiserfs_add_journal_cb,
-        .fs_statfs              = fsfilt_reiserfs_statfs,
-        .fs_sync                = fsfilt_reiserfs_sync,
-        .fs_get_op_len          = fsfilt_reiserfs_get_op_len,
-};
-
-static int __init fsfilt_reiserfs_init(void)
-{
-        return fsfilt_register_ops(&fsfilt_reiserfs_ops);
-}
-
-static void __exit fsfilt_reiserfs_exit(void)
-{
-        fsfilt_unregister_ops(&fsfilt_reiserfs_ops);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre reiserfs Filesystem Helper v0.1");
-MODULE_LICENSE("GPL");
-
-module_init(fsfilt_reiserfs_init);
-module_exit(fsfilt_reiserfs_exit);
diff --git a/lustre/lvfs/lustre_quota_fmt.c b/lustre/lvfs/lustre_quota_fmt.c
deleted file mode 100644
index e910a0c40b4421f81e7b799115b17f74fb8a8703..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lustre_quota_fmt.c
+++ /dev/null
@@ -1,1079 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre administrative quota format.
- *
- *  from
- *  linux/fs/quota_v2.c
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/mount.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/quotaio_v1.h>
-
-#include <asm/byteorder.h>
-#include <asm/uaccess.h>
-
-#include <lustre_quota.h>
-#include <obd_support.h>
-#include "lustre_quota_fmt.h"
-
-static const uint lustre_initqversions[][MAXQUOTAS] = {
-        [LUSTRE_QUOTA_V1] = LUSTRE_INITQVERSIONS,
-        [LUSTRE_QUOTA_V2] = LUSTRE_INITQVERSIONS_V2
-};
-
-static const int lustre_dqstrinblk[] = {
-        [LUSTRE_QUOTA_V1] = LUSTRE_DQSTRINBLK,
-        [LUSTRE_QUOTA_V2] = LUSTRE_DQSTRINBLK_V2
-};
-
-static const int lustre_disk_dqblk_sz[] = {
-        [LUSTRE_QUOTA_V1] = sizeof(struct lustre_disk_dqblk),
-        [LUSTRE_QUOTA_V2] = sizeof(struct lustre_disk_dqblk_v2)
-};
-
-int check_quota_file(struct file *f, struct inode *inode, int type, 
-                     lustre_quota_version_t version)
-{
-        struct lustre_disk_dqheader dqhead;
-        mm_segment_t fs;
-        ssize_t size;
-        loff_t offset = 0;
-        static const uint quota_magics[] = LUSTRE_INITQMAGICS;
-        const uint *quota_versions = lustre_initqversions[version];
-
-        if (f) {
-                fs = get_fs();
-                set_fs(KERNEL_DS);
-                size = f->f_op->read(f, (char *)&dqhead,
-                                     sizeof(struct lustre_disk_dqheader), 
-                                     &offset);
-                set_fs(fs);
-        } else { 
-#ifndef KERNEL_SUPPORTS_QUOTA_READ
-                size = 0;
-#else
-                struct super_block *sb = inode->i_sb;
-                size = sb->s_op->quota_read(sb, type, (char *)&dqhead, 
-                                            sizeof(struct lustre_disk_dqheader), 0);
-#endif
-        }
-        if (size != sizeof(struct lustre_disk_dqheader))
-                return -EINVAL;
-        if (le32_to_cpu(dqhead.dqh_magic) != quota_magics[type] ||
-            le32_to_cpu(dqhead.dqh_version) != quota_versions[type])
-                return -EINVAL;
-        return 0;
-}
-
-/* Check whether given file is really lustre admin quotafile */
-int lustre_check_quota_file(struct lustre_quota_info *lqi, int type)
-{
-        struct file *f = lqi->qi_files[type];
-        return check_quota_file(f, NULL, type, lqi->qi_version);
-}
-
-int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info)
-{
-        mm_segment_t fs;
-        struct lustre_disk_dqinfo dinfo;
-        ssize_t size;
-        loff_t offset = LUSTRE_DQINFOOFF;
-
-        fs = get_fs();
-        set_fs(KERNEL_DS);
-        size = f->f_op->read(f, (char *)&dinfo, 
-                             sizeof(struct lustre_disk_dqinfo), &offset);
-        set_fs(fs);
-        if (size != sizeof(struct lustre_disk_dqinfo)) {
-                CERROR("Can't read info structure on device %s.\n",
-                       f->f_vfsmnt->mnt_sb->s_id);
-                return -EINVAL;
-        }
-        info->dqi_bgrace = le32_to_cpu(dinfo.dqi_bgrace);
-        info->dqi_igrace = le32_to_cpu(dinfo.dqi_igrace);
-        info->dqi_flags = le32_to_cpu(dinfo.dqi_flags);
-        info->dqi_blocks = le32_to_cpu(dinfo.dqi_blocks);
-        info->dqi_free_blk = le32_to_cpu(dinfo.dqi_free_blk);
-        info->dqi_free_entry = le32_to_cpu(dinfo.dqi_free_entry);
-        return 0;
-}
-
-/* Read information header from quota file */
-int lustre_read_quota_info(struct lustre_quota_info *lqi, int type)
-{
-        return lustre_read_quota_file_info(lqi->qi_files[type], &lqi->qi_info[type]);
-}
-
-/* Write information header to quota file */
-int lustre_write_quota_info(struct lustre_quota_info *lqi, int type)
-{
-        mm_segment_t fs;
-        struct lustre_disk_dqinfo dinfo;
-        struct lustre_mem_dqinfo *info = &lqi->qi_info[type];
-        struct file *f = lqi->qi_files[type];
-        ssize_t size;
-        loff_t offset = LUSTRE_DQINFOOFF;
-
-        info->dqi_flags &= ~DQF_INFO_DIRTY;
-        dinfo.dqi_bgrace = cpu_to_le32(info->dqi_bgrace);
-        dinfo.dqi_igrace = cpu_to_le32(info->dqi_igrace);
-        dinfo.dqi_flags = cpu_to_le32(info->dqi_flags & DQF_MASK);
-        dinfo.dqi_blocks = cpu_to_le32(info->dqi_blocks);
-        dinfo.dqi_free_blk = cpu_to_le32(info->dqi_free_blk);
-        dinfo.dqi_free_entry = cpu_to_le32(info->dqi_free_entry);
-        fs = get_fs();
-        set_fs(KERNEL_DS);
-        size = f->f_op->write(f, (char *)&dinfo, 
-                              sizeof(struct lustre_disk_dqinfo), &offset);
-        set_fs(fs);
-        if (size != sizeof(struct lustre_disk_dqinfo)) {
-                printk(KERN_WARNING
-                       "Can't write info structure on device %s.\n",
-                       f->f_vfsmnt->mnt_sb->s_id);
-                return -1;
-        }
-        return 0;
-}
-
-#define DQ2MQ(v) ((sizeof(v) == sizeof(__u64)) ? \
-                le64_to_cpu(v) : le32_to_cpu(v))
-
-#define MQ2DQ(v,newv) ((sizeof(v) == sizeof(__u64)) ? \
-                (v = cpu_to_le64((__u64)newv)) : (v = cpu_to_le32((__u32)newv)))
-
-#define DQF_GET(var,ver,field) ((ver == LUSTRE_QUOTA_V1)?\
-                DQ2MQ(((struct lustre_disk_dqblk*)(var))->field):\
-                DQ2MQ(((struct lustre_disk_dqblk_v2*)(var))->field))
-
-#define DQF_PUT(var,ver,field,val) ((ver == LUSTRE_QUOTA_V1)?\
-                MQ2DQ(((struct lustre_disk_dqblk*)(var))->field, val):\
-                MQ2DQ(((struct lustre_disk_dqblk_v2*)(var))->field, val))
-
-void disk2memdqb(struct lustre_mem_dqblk *m, void *d,
-                 lustre_quota_version_t version)
-{
-        m->dqb_ihardlimit = DQF_GET(d, version, dqb_ihardlimit);
-        m->dqb_isoftlimit = DQF_GET(d, version, dqb_isoftlimit);
-        m->dqb_curinodes = DQF_GET(d, version, dqb_curinodes);
-        m->dqb_itime = DQF_GET(d, version, dqb_itime);
-        m->dqb_bhardlimit = DQF_GET(d, version, dqb_bhardlimit);
-        m->dqb_bsoftlimit = DQF_GET(d, version, dqb_bsoftlimit);
-        m->dqb_curspace = DQF_GET(d, version, dqb_curspace);
-        m->dqb_btime = DQF_GET(d, version, dqb_btime);
-}
-
-static int check_quota_bounds(struct lustre_mem_dqblk *m, 
-                              lustre_quota_version_t version)
-{
-        return (version == LUSTRE_QUOTA_V1  &&
-                m->dqb_ihardlimit <= MAX_UL &&
-                m->dqb_isoftlimit <= MAX_UL &&
-                m->dqb_curinodes <= MAX_UL  &&
-                m->dqb_bhardlimit <= MAX_UL &&
-                m->dqb_bsoftlimit <= MAX_UL) ||
-                version != LUSTRE_QUOTA_V1;
-}
-
-static int mem2diskdqb(void *d, struct lustre_mem_dqblk *m,
-                       qid_t id, lustre_quota_version_t version)
-{
-        if (!check_quota_bounds(m, version))
-                return -EINVAL;
-
-        DQF_PUT(d, version, dqb_ihardlimit, m->dqb_ihardlimit);
-        DQF_PUT(d, version, dqb_isoftlimit, m->dqb_isoftlimit);
-        DQF_PUT(d, version, dqb_curinodes, m->dqb_curinodes);
-        DQF_PUT(d, version, dqb_itime, m->dqb_itime);
-        DQF_PUT(d, version, dqb_bhardlimit, m->dqb_bhardlimit);
-        DQF_PUT(d, version, dqb_bsoftlimit, m->dqb_bsoftlimit);
-        DQF_PUT(d, version, dqb_curspace, m->dqb_curspace);
-        DQF_PUT(d, version, dqb_btime, m->dqb_btime);
-        DQF_PUT(d, version, dqb_id, id);
-
-        return 0;
-}
-
-dqbuf_t getdqbuf(void)
-{
-        dqbuf_t buf = kmalloc(LUSTRE_DQBLKSIZE, GFP_NOFS);
-        if (!buf)
-                printk(KERN_WARNING
-                       "VFS: Not enough memory for quota buffers.\n");
-        return buf;
-}
-
-void freedqbuf(dqbuf_t buf)
-{
-        kfree(buf);
-}
-
-ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf)
-{
-        mm_segment_t fs;
-        ssize_t ret;
-        loff_t offset = blk << LUSTRE_DQBLKSIZE_BITS;
-
-        memset(buf, 0, LUSTRE_DQBLKSIZE);
-        fs = get_fs();
-        set_fs(KERNEL_DS);
-        ret = filp->f_op->read(filp, (char *)buf, LUSTRE_DQBLKSIZE, &offset);
-        set_fs(fs);
-        return ret;
-}
-
-ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf)
-{
-        mm_segment_t fs;
-        ssize_t ret;
-        loff_t offset = blk << LUSTRE_DQBLKSIZE_BITS;
-
-        fs = get_fs();
-        set_fs(KERNEL_DS);
-        ret = filp->f_op->write(filp, (char *)buf, LUSTRE_DQBLKSIZE, &offset);
-        set_fs(fs);
-        return ret;
-}
-
-void lustre_mark_info_dirty(struct lustre_mem_dqinfo *info)
-{
-        set_bit(DQF_INFO_DIRTY_B, &info->dqi_flags);
-}
-
-/* Remove empty block from list and return it */
-int get_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info)
-{
-        dqbuf_t buf = getdqbuf();
-        struct lustre_disk_dqdbheader *dh =
-            (struct lustre_disk_dqdbheader *)buf;
-        int ret, blk;
-
-        if (!buf)
-                return -ENOMEM;
-        if (info->dqi_free_blk) {
-                blk = info->dqi_free_blk;
-                if ((ret = read_blk(filp, blk, buf)) < 0)
-                        goto out_buf;
-                info->dqi_free_blk = le32_to_cpu(dh->dqdh_next_free);
-        } else {
-                memset(buf, 0, LUSTRE_DQBLKSIZE);
-                /* Assure block allocation... */
-                if ((ret = write_blk(filp, info->dqi_blocks, buf)) < 0)
-                        goto out_buf;
-                blk = info->dqi_blocks++;
-        }
-        lustre_mark_info_dirty(info);
-        ret = blk;
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Insert empty block to the list */
-int put_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info,
-                   dqbuf_t buf, uint blk)
-{
-        struct lustre_disk_dqdbheader *dh =
-            (struct lustre_disk_dqdbheader *)buf;
-        int err;
-
-        dh->dqdh_next_free = cpu_to_le32(info->dqi_free_blk);
-        dh->dqdh_prev_free = cpu_to_le32(0);
-        dh->dqdh_entries = cpu_to_le16(0);
-        info->dqi_free_blk = blk;
-        lustre_mark_info_dirty(info);
-        if ((err = write_blk(filp, blk, buf)) < 0)
-                /* Some strange block. We had better leave it... */
-                return err;
-        return 0;
-}
-
-/* Remove given block from the list of blocks with free entries */
-int remove_free_dqentry(struct file *filp,
-                        struct lustre_mem_dqinfo *info, dqbuf_t buf,
-                        uint blk)
-{
-        dqbuf_t tmpbuf = getdqbuf();
-        struct lustre_disk_dqdbheader *dh =
-            (struct lustre_disk_dqdbheader *)buf;
-        uint nextblk = le32_to_cpu(dh->dqdh_next_free), prevblk =
-            le32_to_cpu(dh->dqdh_prev_free);
-        int err;
-
-        if (!tmpbuf)
-                return -ENOMEM;
-        if (nextblk) {
-                if ((err = read_blk(filp, nextblk, tmpbuf)) < 0)
-                        goto out_buf;
-                ((struct lustre_disk_dqdbheader *)tmpbuf)->dqdh_prev_free =
-                    dh->dqdh_prev_free;
-                if ((err = write_blk(filp, nextblk, tmpbuf)) < 0)
-                        goto out_buf;
-        }
-        if (prevblk) {
-                if ((err = read_blk(filp, prevblk, tmpbuf)) < 0)
-                        goto out_buf;
-                ((struct lustre_disk_dqdbheader *)tmpbuf)->dqdh_next_free =
-                    dh->dqdh_next_free;
-                if ((err = write_blk(filp, prevblk, tmpbuf)) < 0)
-                        goto out_buf;
-        } else {
-                info->dqi_free_entry = nextblk;
-                lustre_mark_info_dirty(info);
-        }
-        freedqbuf(tmpbuf);
-        dh->dqdh_next_free = dh->dqdh_prev_free = cpu_to_le32(0);
-        err = write_blk(filp, blk, buf);
-        if (err < 0)      /* No matter whether write succeeds block is out of list */
-                CERROR("VFS: Can't write block (%u) with "
-                       "free entries (rc=%d).\n", blk, err);
-        return 0;
-out_buf:
-        freedqbuf(tmpbuf);
-        return err;
-}
-
-/* Insert given block to the beginning of list with free entries */
-int insert_free_dqentry(struct file *filp,
-                        struct lustre_mem_dqinfo *info, dqbuf_t buf,
-                        uint blk)
-{
-        dqbuf_t tmpbuf = getdqbuf();
-        struct lustre_disk_dqdbheader *dh =
-            (struct lustre_disk_dqdbheader *)buf;
-        int err;
-
-        if (!tmpbuf)
-                return -ENOMEM;
-        dh->dqdh_next_free = cpu_to_le32(info->dqi_free_entry);
-        dh->dqdh_prev_free = cpu_to_le32(0);
-        if ((err = write_blk(filp, blk, buf)) < 0)
-                goto out_buf;
-        if (info->dqi_free_entry) {
-                if ((err = read_blk(filp, info->dqi_free_entry, tmpbuf)) < 0)
-                        goto out_buf;
-                ((struct lustre_disk_dqdbheader *)tmpbuf)->dqdh_prev_free =
-                    cpu_to_le32(blk);
-                if ((err = write_blk(filp, info->dqi_free_entry, tmpbuf)) < 0)
-                        goto out_buf;
-        }
-        freedqbuf(tmpbuf);
-        info->dqi_free_entry = blk;
-        lustre_mark_info_dirty(info);
-        return 0;
-out_buf:
-        freedqbuf(tmpbuf);
-        return err;
-}
-
-
-
-/* Find space for dquot */
-static uint find_free_dqentry(struct lustre_dquot *dquot, int *err, 
-                              lustre_quota_version_t version)
-{
-        struct lustre_quota_info *lqi = dquot->dq_info;
-        struct file *filp = lqi->qi_files[dquot->dq_type];
-        struct lustre_mem_dqinfo *info = &lqi->qi_info[dquot->dq_type];
-        uint blk, i;
-        struct lustre_disk_dqdbheader *dh;
-        void *ddquot;
-        int dqblk_sz = lustre_disk_dqblk_sz[version];
-        int dqstrinblk = lustre_dqstrinblk[version];
-        char fakedquot[dqblk_sz];
-        dqbuf_t buf;
-
-        *err = 0;
-        if (!(buf = getdqbuf())) {
-                *err = -ENOMEM;
-                return 0;
-        }
-        dh = (struct lustre_disk_dqdbheader *)buf;
-        ddquot = GETENTRIES(buf, version);
-        if (info->dqi_free_entry) {
-                blk = info->dqi_free_entry;
-                if ((*err = read_blk(filp, blk, buf)) < 0)
-                        goto out_buf;
-        } else {
-                blk = get_free_dqblk(filp, info);
-                if ((int)blk < 0) {
-                        *err = blk;
-                        freedqbuf(buf);
-                        return 0;
-                }
-                memset(buf, 0, LUSTRE_DQBLKSIZE);
-                info->dqi_free_entry = blk; /* This is enough as block is 
-                                               already zeroed and entry list
-                                               is empty... */
-                lustre_mark_info_dirty(info);
-        }
-
-        /* Will block be full */
-        if (le16_to_cpu(dh->dqdh_entries) + 1 >= dqstrinblk)
-                if ((*err = remove_free_dqentry(filp, info, buf, blk)) < 0) {
-                        CERROR("VFS: Can't remove block %u"
-                               " from entry free list.\n", blk);
-                        goto out_buf;
-                }
-        dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries) + 1);
-        memset(fakedquot, 0, dqblk_sz);
-        /* Find free structure in block */
-        for (i = 0; i < dqstrinblk &&
-             memcmp(fakedquot, (char*)ddquot + i * dqblk_sz, 
-                    sizeof(fakedquot)); i++);
-
-        if (i == dqstrinblk) {
-                CERROR("VFS: Data block full but it shouldn't.\n");
-                *err = -EIO;
-                goto out_buf;
-        }
-
-        if ((*err = write_blk(filp, blk, buf)) < 0) {
-                CERROR("VFS: Can't write quota data block %u.\n", blk);
-                goto out_buf;
-        }
-        dquot->dq_off =
-            (blk << LUSTRE_DQBLKSIZE_BITS) +
-            sizeof(struct lustre_disk_dqdbheader) +
-            i * dqblk_sz;
-        freedqbuf(buf);
-        return blk;
-out_buf:
-        freedqbuf(buf);
-        return 0;
-}
-
-/* Insert reference to structure into the trie */
-static int do_insert_tree(struct lustre_dquot *dquot, uint * treeblk, int depth, 
-                          lustre_quota_version_t version)
-{
-        struct lustre_quota_info *lqi = dquot->dq_info;
-        struct file *filp = lqi->qi_files[dquot->dq_type];
-        struct lustre_mem_dqinfo *info = &lqi->qi_info[dquot->dq_type];
-        dqbuf_t buf;
-        int ret = 0, newson = 0, newact = 0;
-        u32 *ref;
-        uint newblk;
-
-        if (!(buf = getdqbuf()))
-                return -ENOMEM;
-        if (!*treeblk) {
-                ret = get_free_dqblk(filp, info);
-                if (ret < 0)
-                        goto out_buf;
-                *treeblk = ret;
-                memset(buf, 0, LUSTRE_DQBLKSIZE);
-                newact = 1;
-        } else {
-                if ((ret = read_blk(filp, *treeblk, buf)) < 0) {
-                        CERROR("VFS: Can't read tree quota block %u.\n",
-                               *treeblk);
-                        goto out_buf;
-                }
-        }
-        ref = (u32 *) buf;
-        newblk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]);
-        if (!newblk)
-                newson = 1;
-        if (depth == LUSTRE_DQTREEDEPTH - 1) {
-
-                if (newblk) {
-                        CERROR("VFS: Inserting already present quota entry "
-                               "(block %u).\n", 
-                               ref[GETIDINDEX(dquot->dq_id, depth)]);
-                        ret = -EIO;
-                        goto out_buf;
-                }
-
-                newblk = find_free_dqentry(dquot, &ret, version);
-        } else
-                ret = do_insert_tree(dquot, &newblk, depth + 1, version);
-        if (newson && ret >= 0) {
-                ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(newblk);
-                ret = write_blk(filp, *treeblk, buf);
-        } else if (newact && ret < 0)
-                put_free_dqblk(filp, info, buf, *treeblk);
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Wrapper for inserting quota structure into tree */
-static inline int dq_insert_tree(struct lustre_dquot *dquot, 
-                                 lustre_quota_version_t version)
-{
-        int tmp = LUSTRE_DQTREEOFF;
-        return do_insert_tree(dquot, &tmp, 0, version);
-}
-
-/*
- *  We don't have to be afraid of deadlocks as we never have quotas on quota files...
- */
-static int lustre_write_dquot(struct lustre_dquot *dquot, 
-                              lustre_quota_version_t version)
-{
-        int type = dquot->dq_type;
-        struct file *filp;
-        mm_segment_t fs;
-        loff_t offset;
-        ssize_t ret;
-        int dqblk_sz = lustre_disk_dqblk_sz[version];
-        char ddquot[dqblk_sz], empty[dqblk_sz];
-
-        ret = mem2diskdqb(ddquot, &dquot->dq_dqb, dquot->dq_id, version);
-        if (ret < 0)
-                return ret;
-
-        if (!dquot->dq_off)
-                if ((ret = dq_insert_tree(dquot, version)) < 0) {
-                        CERROR("VFS: Error %Zd occurred while creating quota.\n",
-                               ret);
-                        return ret;
-                }
-        filp = dquot->dq_info->qi_files[type];
-        offset = dquot->dq_off;
-        /* Argh... We may need to write structure full of zeroes but that would be
-         * treated as an empty place by the rest of the code. Format change would
-         * be definitely cleaner but the problems probably are not worth it */
-        memset(empty, 0, dqblk_sz);
-        if (!memcmp(empty, ddquot, dqblk_sz))
-                DQF_PUT(ddquot, version, dqb_itime, 1);
-        fs = get_fs();
-        set_fs(KERNEL_DS);
-        ret = filp->f_op->write(filp, ddquot,
-                                dqblk_sz, &offset);
-        set_fs(fs);
-        if (ret != dqblk_sz) {
-                printk(KERN_WARNING "VFS: dquota write failed on dev %s\n",
-                       filp->f_dentry->d_sb->s_id);
-                if (ret >= 0)
-                        ret = -ENOSPC;
-        } else
-                ret = 0;
-
-        return ret;
-}
-
-/* Free dquot entry in data block */
-static int free_dqentry(struct lustre_dquot *dquot, uint blk, 
-                        lustre_quota_version_t version)
-{
-        struct file *filp = dquot->dq_info->qi_files[dquot->dq_type];
-        struct lustre_mem_dqinfo *info =
-            &dquot->dq_info->qi_info[dquot->dq_type];
-        struct lustre_disk_dqdbheader *dh;
-        dqbuf_t buf = getdqbuf();
-        int dqstrinblk = lustre_dqstrinblk[version];
-        int ret = 0;
-
-        if (!buf)
-                return -ENOMEM;
-        if (dquot->dq_off >> LUSTRE_DQBLKSIZE_BITS != blk) {
-                CERROR("VFS: Quota structure has offset to other block (%u) "
-                       "than it should (%u).\n", blk, 
-                       (uint)(dquot->dq_off >> LUSTRE_DQBLKSIZE_BITS));
-                goto out_buf;
-        }
-        if ((ret = read_blk(filp, blk, buf)) < 0) {
-                CERROR("VFS: Can't read quota data block %u\n", blk);
-                goto out_buf;
-        }
-        dh = (struct lustre_disk_dqdbheader *)buf;
-        dh->dqdh_entries = cpu_to_le16(le16_to_cpu(dh->dqdh_entries) - 1);
-        if (!le16_to_cpu(dh->dqdh_entries)) {   /* Block got free? */
-                if ((ret = remove_free_dqentry(filp, info, buf, blk)) < 0 ||
-                    (ret = put_free_dqblk(filp, info, buf, blk)) < 0) {
-                        CERROR("VFS: Can't move quota data block (%u) "
-                               "to free list.\n", blk);
-                        goto out_buf;
-                }
-        } else {
-                memset(buf + (dquot->dq_off & ((1<<LUSTRE_DQBLKSIZE_BITS) - 1)),
-                       0, lustre_disk_dqblk_sz[version]);
-                if (le16_to_cpu(dh->dqdh_entries) == dqstrinblk - 1) {
-                        /* Insert will write block itself */
-                        if ((ret =
-                             insert_free_dqentry(filp, info, buf, blk)) < 0) {
-                                CERROR("VFS: Can't insert quota data block (%u) "
-                                       "to free entry list.\n", blk);
-                                goto out_buf;
-                        }
-                } else if ((ret = write_blk(filp, blk, buf)) < 0) {
-                        CERROR("VFS: Can't write quota data block %u\n", blk);
-                        goto out_buf;
-                }
-        }
-        dquot->dq_off = 0;      /* Quota is now unattached */
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Remove reference to dquot from tree */
-static int remove_tree(struct lustre_dquot *dquot, uint * blk, int depth, 
-                       lustre_quota_version_t version)
-{
-        struct file *filp = dquot->dq_info->qi_files[dquot->dq_type];
-        struct lustre_mem_dqinfo *info =
-            &dquot->dq_info->qi_info[dquot->dq_type];
-        dqbuf_t buf = getdqbuf();
-        int ret = 0;
-        uint newblk;
-        u32 *ref = (u32 *) buf;
-
-        if (!buf)
-                return -ENOMEM;
-        if ((ret = read_blk(filp, *blk, buf)) < 0) {
-                CERROR("VFS: Can't read quota data block %u\n", *blk);
-                goto out_buf;
-        }
-        newblk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]);
-        if (depth == LUSTRE_DQTREEDEPTH - 1) {
-                ret = free_dqentry(dquot, newblk, version);
-                newblk = 0;
-        } else
-                ret = remove_tree(dquot, &newblk, depth + 1, version);
-        if (ret >= 0 && !newblk) {
-                int i;
-                ref[GETIDINDEX(dquot->dq_id, depth)] = cpu_to_le32(0);
-                for (i = 0; i < LUSTRE_DQBLKSIZE && !buf[i]; i++)
-                        /* Block got empty? */ ;
-                /* don't put the root block into free blk list! */
-                if (i == LUSTRE_DQBLKSIZE && *blk != LUSTRE_DQTREEOFF) {
-                        put_free_dqblk(filp, info, buf, *blk);
-                        *blk = 0;
-                } else if ((ret = write_blk(filp, *blk, buf)) < 0)
-                        CERROR("VFS: Can't write quota tree block %u.\n", *blk);
-        }
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Delete dquot from tree */
-static int lustre_delete_dquot(struct lustre_dquot *dquot, 
-                                lustre_quota_version_t version)
-{
-        uint tmp = LUSTRE_DQTREEOFF;
-
-        if (!dquot->dq_off)     /* Even not allocated? */
-                return 0;
-        return remove_tree(dquot, &tmp, 0, version);
-}
-
-/* Find entry in block */
-static loff_t find_block_dqentry(struct lustre_dquot *dquot, uint blk, 
-                                 lustre_quota_version_t version)
-{
-        struct file *filp = dquot->dq_info->qi_files[dquot->dq_type];
-        dqbuf_t buf = getdqbuf();
-        loff_t ret = 0;
-        int i;
-        char *ddquot = GETENTRIES(buf, version);
-        int dqblk_sz = lustre_disk_dqblk_sz[version];
-        int dqstrinblk = lustre_dqstrinblk[version];
-
-        if (!buf)
-                return -ENOMEM;
-        if ((ret = read_blk(filp, blk, buf)) < 0) {
-                CERROR("VFS: Can't read quota tree block %u.\n", blk);
-                goto out_buf;
-        }
-        if (dquot->dq_id)
-                for (i = 0; i < dqstrinblk && 
-                     DQF_GET(ddquot+i*dqblk_sz, version, dqb_id) != dquot->dq_id;
-                     i++) ;
-        else {                  /* ID 0 as a bit more complicated searching... */
-                char fakedquot[dqblk_sz];
-
-                memset(fakedquot, 0, sizeof(fakedquot));
-                for (i = 0; i < dqstrinblk; i++)
-                        if (!DQF_GET(ddquot + i*dqblk_sz, version, dqb_id)
-                            && memcmp(fakedquot, ddquot + i*dqblk_sz,
-                                      dqblk_sz))
-                                break;
-        }
-        if (i == dqstrinblk) {
-                CERROR("VFS: Quota for id %u referenced but not present.\n",
-                       dquot->dq_id);
-                ret = -EIO;
-                goto out_buf;
-        } else
-                ret =
-                    (blk << LUSTRE_DQBLKSIZE_BITS) +
-                    sizeof(struct lustre_disk_dqdbheader) +
-                    i * dqblk_sz;
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Find entry for given id in the tree */
-static loff_t find_tree_dqentry(struct lustre_dquot *dquot, uint blk, int depth, 
-                                lustre_quota_version_t version)
-{
-        struct file *filp = dquot->dq_info->qi_files[dquot->dq_type];
-        dqbuf_t buf = getdqbuf();
-        loff_t ret = 0;
-        u32 *ref = (u32 *) buf;
-
-        if (!buf)
-                return -ENOMEM;
-        if ((ret = read_blk(filp, blk, buf)) < 0) {
-                CERROR("VFS: Can't read quota tree block %u.\n", blk);
-                goto out_buf;
-        }
-        ret = 0;
-        blk = le32_to_cpu(ref[GETIDINDEX(dquot->dq_id, depth)]);
-        if (!blk)               /* No reference? */
-                goto out_buf;
-        if (depth < LUSTRE_DQTREEDEPTH - 1)
-                ret = find_tree_dqentry(dquot, blk, depth + 1, version);
-        else
-                ret = find_block_dqentry(dquot, blk, version);
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Find entry for given id in the tree - wrapper function */
-static inline loff_t find_dqentry(struct lustre_dquot *dquot, 
-                                  lustre_quota_version_t version)
-{
-        return find_tree_dqentry(dquot, LUSTRE_DQTREEOFF, 0, version);
-}
-
-int lustre_read_dquot(struct lustre_dquot *dquot)
-{
-        int type = dquot->dq_type;
-        struct file *filp;
-        mm_segment_t fs;
-        loff_t offset;
-        int ret = 0, dqblk_sz;
-        lustre_quota_version_t version;
-
-        /* Invalidated quota? */
-        if (!dquot->dq_info || !(filp = dquot->dq_info->qi_files[type])) {
-                CERROR("VFS: Quota invalidated while reading!\n");
-                return -EIO;
-        }
-
-        version = dquot->dq_info->qi_version;
-        dqblk_sz = lustre_disk_dqblk_sz[version];
-
-        offset = find_dqentry(dquot, version);
-        if (offset <= 0) {      /* Entry not present? */
-                if (offset < 0)
-                        CERROR("VFS: Can't read quota structure for id %u.\n",
-                               dquot->dq_id);
-                dquot->dq_off = 0;
-                set_bit(DQ_FAKE_B, &dquot->dq_flags);
-                memset(&dquot->dq_dqb, 0, sizeof(struct lustre_mem_dqblk));
-                ret = offset;
-        } else {
-                char ddquot[dqblk_sz], empty[dqblk_sz];
-
-                dquot->dq_off = offset;
-                fs = get_fs();
-                set_fs(KERNEL_DS);
-                if ((ret = filp->f_op->read(filp, ddquot, dqblk_sz, &offset)) !=
-                    dqblk_sz) {
-                        if (ret >= 0)
-                                ret = -EIO;
-                        CERROR("VFS: Error while reading quota structure "
-                               "for id %u.\n", dquot->dq_id);
-                        memset(ddquot, 0, dqblk_sz);
-                } else {
-                        ret = 0;
-                        /* We need to escape back all-zero structure */
-                        memset(empty, 0, dqblk_sz);
-                        DQF_PUT(empty, version, dqb_itime, 1);
-                        if (!memcmp(empty, ddquot, dqblk_sz))
-                                DQF_PUT(ddquot, version, dqb_itime, 0);
-                }
-                set_fs(fs);
-                disk2memdqb(&dquot->dq_dqb, ddquot, version);
-        }
-
-        return ret;
-}
-
-/* Commit changes of dquot to disk - it might also mean deleting it when quota became fake */
-int lustre_commit_dquot(struct lustre_dquot *dquot)
-{
-        int rc = 0;
-        lustre_quota_version_t version = dquot->dq_info->qi_version;
-
-        /* always clear the flag so we don't loop on an IO error... */
-        clear_bit(DQ_MOD_B, &dquot->dq_flags);
-
-        /* The block/inode usage in admin quotafile isn't the real usage
-         * over all cluster, so keep the fake dquot entry on disk is
-         * meaningless, just remove it */
-        if (test_bit(DQ_FAKE_B, &dquot->dq_flags))
-                rc = lustre_delete_dquot(dquot, version);
-        else
-                rc = lustre_write_dquot(dquot, version);
-
-        if (rc < 0)
-                return rc;
-
-        if (lustre_info_dirty(&dquot->dq_info->qi_info[dquot->dq_type]))
-                rc = lustre_write_quota_info(dquot->dq_info, dquot->dq_type);
-
-        return rc;
-}
-
-int lustre_init_quota_header(struct lustre_quota_info *lqi, int type, int fakemagics)
-{
-        static const uint quota_magics[] = LUSTRE_INITQMAGICS;
-        static const uint fake_magics[] = LUSTRE_BADQMAGICS;
-        const uint* quota_versions = lustre_initqversions[lqi->qi_version];
-        struct lustre_disk_dqheader dqhead;
-        ssize_t size;
-        loff_t offset = 0;
-        struct file *fp = lqi->qi_files[type];
-        int rc = 0;
-
-        /* write quotafile header */
-        dqhead.dqh_magic = cpu_to_le32(fakemagics ? 
-                                       fake_magics[type] : quota_magics[type]);
-        dqhead.dqh_version = cpu_to_le32(quota_versions[type]);
-        size = fp->f_op->write(fp, (char *)&dqhead,
-                               sizeof(struct lustre_disk_dqheader), &offset);
-
-        if (size != sizeof(struct lustre_disk_dqheader)) {
-                CERROR("error writing quotafile header (rc:%d)\n", rc);
-                rc = size;
-        }
-
-        return rc;
-}
-
-/* We need to export this function to initialize quotafile, because we haven't
- * user level check utility */
-int lustre_init_quota_info_generic(struct lustre_quota_info *lqi, int type,
-                                   int fakemagics)
-{
-        struct lustre_mem_dqinfo *dqinfo = &lqi->qi_info[type];
-        int rc;
-
-        rc = lustre_init_quota_header(lqi, type, fakemagics);
-        if (rc)
-                return rc;
-
-        /* write init quota info */
-        memset(dqinfo, 0, sizeof(*dqinfo));
-        dqinfo->dqi_bgrace = MAX_DQ_TIME;
-        dqinfo->dqi_igrace = MAX_IQ_TIME;
-        dqinfo->dqi_blocks = LUSTRE_DQTREEOFF + 1;
-
-        return lustre_write_quota_info(lqi, type);
-}
-
-int lustre_init_quota_info(struct lustre_quota_info *lqi, int type)
-{
-        return lustre_init_quota_info_generic(lqi, type, 0);
-}
-
-ssize_t quota_read(struct file *file, struct inode *inode, int type,
-                   uint blk, dqbuf_t buf)
-{
-        if (file) {
-                return read_blk(file, blk, buf);
-        } else {
-#ifndef KERNEL_SUPPORTS_QUOTA_READ
-                return -ENOTSUPP;
-#else
-                struct super_block *sb = inode->i_sb;
-                memset(buf, 0, LUSTRE_DQBLKSIZE);
-                return sb->s_op->quota_read(sb, type, (char *)buf,
-                                            LUSTRE_DQBLKSIZE, 
-                                            blk << LUSTRE_DQBLKSIZE_BITS);
-#endif
-        }
-}
-
-static int walk_block_dqentry(struct file *filp, struct inode *inode, int type,
-                              uint blk, struct list_head *list)
-{
-        dqbuf_t buf = getdqbuf();
-        loff_t ret = 0;
-        struct lustre_disk_dqdbheader *dqhead =
-            (struct lustre_disk_dqdbheader *)buf;
-        struct dqblk *blk_item;
-        struct dqblk *pos;
-        struct list_head *tmp;
-
-        if (!buf)
-                return -ENOMEM;
-        if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) {
-                CERROR("VFS: Can't read quota tree block %u.\n", blk);
-                goto out_buf;
-        }
-        ret = 0;
-
-        if (!le32_to_cpu(dqhead->dqdh_entries))
-                goto out_buf;
-
-        if (list_empty(list)) {
-                tmp = list;
-                goto done;
-        }
-
-        list_for_each_entry(pos, list, link) {
-                if (blk == pos->blk)    /* we got this blk already */
-                        goto out_buf;
-                if (blk > pos->blk)
-                        continue;
-                break;
-        }
-        tmp = &pos->link;
-done:
-        blk_item = kmalloc(sizeof(*blk_item), GFP_NOFS);
-        if (!blk_item) {
-                ret = -ENOMEM;
-                goto out_buf;
-        }
-        blk_item->blk = blk;
-        INIT_LIST_HEAD(&blk_item->link);
-
-        list_add_tail(&blk_item->link, tmp);
-
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-int walk_tree_dqentry(struct file *filp, struct inode *inode, int type, 
-                      uint blk, int depth, struct list_head *list)
-{
-        dqbuf_t buf = getdqbuf();
-        loff_t ret = 0;
-        int index;
-        u32 *ref = (u32 *) buf;
-
-        if (!buf)
-                return -ENOMEM;
-        if ((ret = quota_read(filp, inode, type, blk, buf)) < 0) {
-                CERROR("VFS: Can't read quota tree block %u.\n", blk);
-                goto out_buf;
-        }
-        ret = 0;
-
-        for (index = 0; index <= 0xff && !ret; index++) {
-                blk = le32_to_cpu(ref[index]);
-                if (!blk)       /* No reference */
-                        continue;
-
-                if (depth < LUSTRE_DQTREEDEPTH - 1)
-                        ret = walk_tree_dqentry(filp, inode, type, blk,
-                                                depth + 1, list);
-                else
-                        ret = walk_block_dqentry(filp, inode, type, blk, list);
-        }
-out_buf:
-        freedqbuf(buf);
-        return ret;
-}
-
-/* Walk through the quota file (v2 format) to get all ids with quota limit */
-int lustre_get_qids(struct file *fp, struct inode *inode, int type,
-                    struct list_head *list)
-{
-        struct list_head blk_list;
-        struct dqblk *blk_item, *tmp;
-        dqbuf_t buf = NULL;
-        char *ddquot;
-        int rc;
-        lustre_quota_version_t version;
-
-        ENTRY;
-
-        if (check_quota_file(fp, inode, type, LUSTRE_QUOTA_V1) == 0)
-                version = LUSTRE_QUOTA_V1;
-        else if (check_quota_file(fp, inode, type, LUSTRE_QUOTA_V2) == 0)
-                version = LUSTRE_QUOTA_V2;
-        else {
-                CERROR("unknown quota file format!\n");
-                RETURN(-EINVAL);
-        }
-
-        if (!list_empty(list)) {
-                CERROR("not empty list\n");
-                RETURN(-EINVAL);
-        }
-
-        INIT_LIST_HEAD(&blk_list);
-        rc = walk_tree_dqentry(fp, inode, type, LUSTRE_DQTREEOFF, 0, &blk_list);
-        if (rc) {
-                CERROR("walk through quota file failed!(%d)\n", rc);
-                GOTO(out_free, rc);
-        }
-        if (list_empty(&blk_list))
-                RETURN(0);
-
-        buf = getdqbuf();
-        if (!buf)
-                RETURN(-ENOMEM);
-        ddquot = GETENTRIES(buf, version);
-
-        list_for_each_entry(blk_item, &blk_list, link) {
-                loff_t ret = 0;
-                int i, dqblk_sz = lustre_disk_dqblk_sz[version];
-                char fakedquot[dqblk_sz];
-
-                memset(buf, 0, LUSTRE_DQBLKSIZE);
-                if ((ret = quota_read(fp, inode, type, blk_item->blk, buf))<0) {
-                        CERROR("VFS: Can't read quota tree block %u.\n",
-                               blk_item->blk);
-                        GOTO(out_free, rc = ret);
-                }
-
-                memset(fakedquot, 0, dqblk_sz);
-                for (i = 0; i < lustre_dqstrinblk[version]; i++) {
-                        struct dquot_id *dqid;
-                        /* skip empty entry */
-                        if (!memcmp(fakedquot, ddquot + i*dqblk_sz, dqblk_sz))
-                                continue;
-
-                        dqid = kmalloc(sizeof(*dqid), GFP_NOFS);
-                        if (!dqid) 
-                                GOTO(out_free, rc = -ENOMEM);
-
-                        dqid->di_id = DQF_GET(ddquot + i * dqblk_sz, 
-                                              version, dqb_id);
-                        INIT_LIST_HEAD(&dqid->di_link);
-                        list_add(&dqid->di_link, list);
-                }
-        }
-
-out_free:
-        list_for_each_entry_safe(blk_item, tmp, &blk_list, link) {
-                list_del_init(&blk_item->link);
-                kfree(blk_item);
-        }
-        if (buf)
-                freedqbuf(buf);
-
-        RETURN(rc);
-}
-
-
-EXPORT_SYMBOL(lustre_read_quota_info);
-EXPORT_SYMBOL(lustre_write_quota_info);
-EXPORT_SYMBOL(lustre_check_quota_file);
-EXPORT_SYMBOL(lustre_read_dquot);
-EXPORT_SYMBOL(lustre_commit_dquot);
-EXPORT_SYMBOL(lustre_init_quota_info);
-EXPORT_SYMBOL(lustre_get_qids);
diff --git a/lustre/lvfs/lustre_quota_fmt.h b/lustre/lvfs/lustre_quota_fmt.h
deleted file mode 100644
index b0638f59a8f0cccee10d5222a32a51ee1a941fb4..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lustre_quota_fmt.h
+++ /dev/null
@@ -1,189 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre administrative quota format
- *
- * from
- * include/linux/quotaio_v2.h
- */
-#ifndef _LUSTRE_QUOTA_FMT_H
-#define _LUSTRE_QUOTA_FMT_H
-
-#include <linux/types.h>
-#include <linux/quota.h>
-
-/*
- * Definitions of magics and versions of current quota files
- * Same with quota v2's magic
- */
-#define LUSTRE_INITQMAGICS {\
-        0xd9c01f11,     /* USRQUOTA */\
-        0xd9c01927      /* GRPQUOTA */\
-}
-
-/* Invalid magics that mark quota file as inconsistent */
-#define LUSTRE_BADQMAGICS {\
-        0xbadbadba,     /* USRQUOTA */\
-        0xbadbadba      /* GRPQUOTA */\
-}
-
-/* for the verson 1 of lustre_disk_dqblk*/
-#define LUSTRE_INITQVERSIONS {\
-        0,              /* USRQUOTA */\
-        0               /* GRPQUOTA */\
-}
-
-/*
- * The following structure defines the format of the disk quota file
- * (as it appears on disk) - the file is a radix tree whose leaves point
- * to blocks of these structures. for the version 1.
- */
-struct lustre_disk_dqblk {
-        __u32 dqb_id;           /* id this quota applies to */
-        __u32 dqb_ihardlimit;   /* absolute limit on allocated inodes */
-        __u32 dqb_isoftlimit;   /* preferred inode limit */
-        __u32 dqb_curinodes;    /* current # allocated inodes */
-        __u32 dqb_bhardlimit;   /* absolute limit on disk space (in QUOTABLOCK_SIZE) */
-        __u32 dqb_bsoftlimit;   /* preferred limit on disk space (in QUOTABLOCK_SIZE) */
-        __u64 dqb_curspace;     /* current space occupied (in bytes) */
-        __u64 dqb_btime;        /* time limit for excessive disk use */
-        __u64 dqb_itime;        /* time limit for excessive inode use */
-};
-
-/* Number of entries in one blocks(21 entries) */
-#define LUSTRE_DQSTRINBLK \
-                ((LUSTRE_DQBLKSIZE - sizeof(struct lustre_disk_dqdbheader)) \
-                / sizeof(struct lustre_disk_dqblk)) 
-#define GETENTRIES_V1(buf) (((char *)buf)+sizeof(struct lustre_disk_dqdbheader))
-
-/* for the verson 2 of lustre_disk_dqblk*/
-#define LUSTRE_INITQVERSIONS_V2 {\
-        1,		/* USRQUOTA */\
-        1		/* GRPQUOTA */\
-}
-
-/*
- * The following structure defines the format of the disk quota file
- * (as it appears on disk) - the file is a radix tree whose leaves point
- * to blocks of these structures. for the version 2.
- */
-struct lustre_disk_dqblk_v2 {
-        __u32 dqb_id;           /* id this quota applies to */
-        __u32 padding;
-        __u64 dqb_ihardlimit;   /* absolute limit on allocated inodes */
-        __u64 dqb_isoftlimit;   /* preferred inode limit */
-        __u64 dqb_curinodes;    /* current # allocated inodes */
-        __u64 dqb_bhardlimit;   /* absolute limit on disk space (in QUOTABLOCK_SIZE) */
-        __u64 dqb_bsoftlimit;   /* preferred limit on disk space (in QUOTABLOCK_SIZE) */
-        __u64 dqb_curspace;     /* current space occupied (in bytes) */
-        __u64 dqb_btime;        /* time limit for excessive disk use */
-        __u64 dqb_itime;        /* time limit for excessive inode use */
-};
-
-/* Number of entries in one blocks(14 entries) */
-#define LUSTRE_DQSTRINBLK_V2 \
-                ((LUSTRE_DQBLKSIZE - sizeof(struct lustre_disk_dqdbheader)) \
-		/ sizeof(struct lustre_disk_dqblk_v2)) 
-#define GETENTRIES_V2(buf) (((char *)buf)+sizeof(struct lustre_disk_dqdbheader))
-
-#define GETENTRIES(buf,version) ((version == LUSTRE_QUOTA_V1) ? \
-                                GETENTRIES_V1(buf) : GETENTRIES_V2(buf))
-
-/*
- * Here are header structures as written on disk and their in-memory copies
- */
-/* First generic header */
-struct lustre_disk_dqheader {
-        __u32 dqh_magic;        /* Magic number identifying file */
-        __u32 dqh_version;      /* File version */
-};
-
-/* Header with type and version specific information */
-struct lustre_disk_dqinfo {
-        __u32 dqi_bgrace;       /* Time before block soft limit becomes hard limit */
-        __u32 dqi_igrace;       /* Time before inode soft limit becomes hard limit */
-        __u32 dqi_flags;        /* Flags for quotafile (DQF_*) */
-        __u32 dqi_blocks;       /* Number of blocks in file */
-        __u32 dqi_free_blk;     /* Number of first free block in the list */
-        __u32 dqi_free_entry;   /* Number of block with at least one free entry */
-};
-
-/*
- *  Structure of header of block with quota structures. It is padded to 16 bytes so
- *  there will be space for exactly 21 quota-entries in a block
- */
-struct lustre_disk_dqdbheader {
-        __u32 dqdh_next_free;   /* Number of next block with free entry */
-        __u32 dqdh_prev_free;   /* Number of previous block with free entry */
-        __u16 dqdh_entries;     /* Number of valid entries in block */
-        __u16 dqdh_pad1;
-        __u32 dqdh_pad2;
-};
-
-#ifdef LPROCFS
-void lprocfs_quotfmt_test_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static void lprocfs_quotfmt_test_init_vars(struct lprocfs_static_vars *lvars) {}
-#endif
-
-#define LUSTRE_DQINFOOFF	sizeof(struct lustre_disk_dqheader)     /* Offset of info header in file */
-#define LUSTRE_DQBLKSIZE_BITS	10
-#define LUSTRE_DQBLKSIZE	(1 << LUSTRE_DQBLKSIZE_BITS)    /* Size of block with quota structures */
-#define LUSTRE_DQTREEOFF	1       /* Offset of tree in file in blocks */
-#define LUSTRE_DQTREEDEPTH	4       /* Depth of quota tree */
-
-typedef char *dqbuf_t;
-
-#define GETIDINDEX(id, depth) (((id) >> ((LUSTRE_DQTREEDEPTH-(depth)-1)*8)) & 0xff)
-
-#define MAX_UL (0xffffffffUL)
-
-#define lustre_info_dirty(info) test_bit(DQF_INFO_DIRTY_B, &(info)->dqi_flags)
-
-struct dqblk {
-        struct list_head link;
-        uint blk;
-};
-
-/* come from lustre_fmt_common.c */
-dqbuf_t getdqbuf(void);
-void freedqbuf(dqbuf_t buf);
-void disk2memdqb(struct lustre_mem_dqblk *m, void *d,
-                        enum lustre_quota_version version);
-void lustre_mark_info_dirty(struct lustre_mem_dqinfo *info);
-int lustre_init_quota_header(struct lustre_quota_info *lqi, int type, 
-                             int fakemagics);
-int lustre_init_quota_info_generic(struct lustre_quota_info *lqi, int type,
-                                   int fakemagics);
-int lustre_read_quota_info(struct lustre_quota_info *lqi, int type);
-int lustre_read_quota_file_info(struct file* f, struct lustre_mem_dqinfo* info);
-int lustre_write_quota_info(struct lustre_quota_info *lqi, int type);
-ssize_t read_blk(struct file *filp, uint blk, dqbuf_t buf);
-ssize_t write_blk(struct file *filp, uint blk, dqbuf_t buf);
-int get_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info);
-int put_free_dqblk(struct file *filp, struct lustre_mem_dqinfo *info,
-                          dqbuf_t buf, uint blk);
-int remove_free_dqentry(struct file *filp,
-                               struct lustre_mem_dqinfo *info, dqbuf_t buf,
-                               uint blk);
-int insert_free_dqentry(struct file *filp,
-                               struct lustre_mem_dqinfo *info, dqbuf_t buf,
-                               uint blk);
-ssize_t quota_read(struct file *file, struct inode *inode, int type,
-                   uint blk, dqbuf_t buf);
-int walk_tree_dqentry(struct file *filp, struct inode *inode, int type,
-                      uint blk, int depth, struct list_head *list);
-int check_quota_file(struct file *f, struct inode *inode, int type,
-                     lustre_quota_version_t version);
-int lustre_check_quota_file(struct lustre_quota_info *lqi, int type);
-int lustre_read_dquot(struct lustre_dquot *dquot);
-int lustre_commit_dquot(struct lustre_dquot *dquot);
-int lustre_init_quota_info(struct lustre_quota_info *lqi, int type);
-int lustre_get_qids(struct file *fp, struct inode *inode, int type,
-                    struct list_head *list);
-
-
-/* come from lustre_quota_fmt_conver.c */
-int lustre_quota_convert(struct lustre_quota_info *lqi, int type);
-
-#endif                          /* lustre_quota_fmt.h */
diff --git a/lustre/lvfs/lustre_quota_fmt_convert.c b/lustre/lvfs/lustre_quota_fmt_convert.c
deleted file mode 100644
index 70350ed8f2f8f584bfbbe0f179d166a29a95727b..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lustre_quota_fmt_convert.c
+++ /dev/null
@@ -1,185 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * convert quota format.
- *
- *  from
- *  linux/fs/quota_v2.c
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/mount.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/quotaio_v1.h>
-
-#include <asm/byteorder.h>
-#include <asm/uaccess.h>
-
-#include <lustre_quota.h>
-#include <obd_support.h>
-#include "lustre_quota_fmt.h"
-
-static int admin_convert_dqinfo(struct file *fp_v1, struct file *fp_v2,
-                                struct lustre_quota_info *lqi, int type)
-{
-        struct lustre_mem_dqinfo *info_old, *info_new = &lqi->qi_info[type];
-        int rc;
-
-        OBD_ALLOC_PTR(info_old);
-        if (info_old == NULL)
-                return -ENOMEM;
-
-        rc = lustre_read_quota_file_info(fp_v1, info_old);
-        if (!rc) {
-                /* save essential fields: bgrace, igrace, flags */
-                info_new->dqi_bgrace = info_old->dqi_bgrace;
-                info_new->dqi_igrace = info_old->dqi_igrace;
-                info_new->dqi_flags  = info_old->dqi_flags;
-                rc = lustre_write_quota_info(lqi, type);
-        }
-
-        OBD_FREE_PTR(info_old);
-
-        return rc;
-}
-
-static int admin_convert_v1_to_v2(struct file *fp_v1, struct file *fp_v2,
-                                  struct lustre_quota_info *lqi, int type)
-{
-        struct list_head blk_list;
-        struct dqblk *blk_item, *tmp;
-        dqbuf_t buf = NULL;
-        struct lustre_disk_dqblk *ddquot;
-        struct lustre_dquot *dquot = NULL;
-        int rc;
-
-        ENTRY;
-
-        INIT_LIST_HEAD(&blk_list);
-
-        rc = admin_convert_dqinfo(fp_v1, fp_v2, lqi, type);
-        if (rc) {
-                CERROR("could not copy dqinfo!(%d)\n", rc);
-                GOTO(out_free, rc);
-        }
-
-        rc = walk_tree_dqentry(fp_v1, NULL, type, LUSTRE_DQTREEOFF, 0, &blk_list);
-        if (rc) {
-                CERROR("walk through quota file failed!(%d)\n", rc);
-                GOTO(out_free, rc);
-        }
-        if (list_empty(&blk_list))
-                RETURN(0);
-
-        buf = getdqbuf();
-        if (!buf)
-                GOTO(out_free, rc = -ENOMEM);
-
-        ddquot = (struct lustre_disk_dqblk*)GETENTRIES(buf, LUSTRE_QUOTA_V1);
-
-        OBD_ALLOC_PTR(dquot);
-        if (dquot == NULL)
-                GOTO(out_free, rc = -ENOMEM);
-
-        list_for_each_entry(blk_item, &blk_list, link) {
-                loff_t ret = 0;
-                int i;
-                struct lustre_disk_dqblk fakedquot;
-
-                memset(buf, 0, LUSTRE_DQBLKSIZE);
-                if ((ret = quota_read(fp_v1, NULL, type, blk_item->blk, buf))<0) {
-                        CERROR("VFS: Can't read quota tree block %u.\n",
-                               blk_item->blk);
-                        GOTO(out_free, rc = ret);
-                }
-
-                memset(&fakedquot, 0, sizeof(struct lustre_disk_dqblk));
-                for (i = 0; i < LUSTRE_DQSTRINBLK; i++) {
-                        /* skip empty entry */
-                        if (!memcmp
-                            (&fakedquot, ddquot + i,
-                             sizeof(struct lustre_disk_dqblk)))
-                                continue;
-
-                        memset(dquot, 0, sizeof(*dquot));
-
-                        dquot->dq_id = le32_to_cpu(ddquot[i].dqb_id);
-                        dquot->dq_type = type;
-                        dquot->dq_info = lqi;
-
-                        disk2memdqb(&dquot->dq_dqb, &ddquot[i], LUSTRE_QUOTA_V1);
-                        rc = lustre_commit_dquot(dquot);
-                        if (rc < 0)
-                                GOTO(out_free, rc);
-                }
-        }
-
-        EXIT;
-
-out_free:
-        list_for_each_entry_safe(blk_item, tmp, &blk_list, link) {
-                list_del_init(&blk_item->link);
-                kfree(blk_item);
-        }
-        if (buf)
-                freedqbuf(buf);
-        if (dquot)
-                OBD_FREE_PTR(dquot);
-        return rc;
-}
-
-int lustre_quota_convert(struct lustre_quota_info *lqi, int type)
-{
-        struct file *f_v2 = lqi->qi_files[type];
-        const char *qf_v1[] = LUSTRE_ADMIN_QUOTAFILES_V1;
-        char name[64];
-        struct file *f_v1;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(f_v2);
-
-        rc = lustre_init_quota_info_generic(lqi, type, 1);
-        if (rc) {
-                CERROR("could not initialize new quota file(%d)\n", rc);
-                RETURN(rc);
-        }
-
-        /* Open old quota file and copy to the new one */
-        sprintf(name, "OBJECTS/%s", qf_v1[type]);
-        f_v1 = filp_open(name, O_RDONLY, 0);
-        if (!IS_ERR(f_v1)) {
-                if (!check_quota_file(f_v1, NULL, type, LUSTRE_QUOTA_V1)) {
-                        rc = admin_convert_v1_to_v2(f_v1, f_v2, lqi, type);
-                        if (rc)
-                                CERROR("failed to convert v1 quota file"
-                                       " to v2 quota file.\n");
-                        else
-                                CDEBUG(D_INFO, "Found v1 quota file, "
-                                               "successfully converted to v2.\n");
-                }
-                else
-                        CERROR("old quota file is broken, "
-                               "new quota file will be empty\n");
-
-                filp_close(f_v1, 0);
-        } else if (PTR_ERR(f_v1) != -ENOENT) /* No quota file is ok */
-                CERROR("old quota file can not be open, "
-                       "new quota file will be empty (%ld)\n", PTR_ERR(f_v1));
-
-        /* mark corresponding quota file as correct */
-        if (!rc)
-                lustre_init_quota_header(lqi, type, 0);
-
-        RETURN(rc);
-}
-
-EXPORT_SYMBOL(lustre_quota_convert);
diff --git a/lustre/lvfs/lvfs_common.c b/lustre/lvfs/lvfs_common.c
deleted file mode 100644
index 183461650522c2b885e4ff1d87d96aaf4fc0174d..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lvfs_common.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org/
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <lvfs.h>
-
-struct dentry *lvfs_fid2dentry(struct lvfs_run_ctxt *ctxt, __u64 id,
-                               __u32 gen, __u64 gr, void *data)
-{
-        return ctxt->cb_ops.l_fid2dentry(id, gen, gr, data);
-}
-EXPORT_SYMBOL(lvfs_fid2dentry);
diff --git a/lustre/lvfs/lvfs_darwin.c b/lustre/lvfs/lvfs_darwin.c
deleted file mode 100644
index 1feb31ced5e1875f198fa21adae7218984e2bdfb..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lvfs_darwin.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <libcfs/libcfs.h>
-#include <obd.h>
-#include <lvfs.h>
-#include <lustre_lib.h>
-
-atomic_t obd_memory;
-int obd_memmax;
-
-/* XXX currently ctxt functions should not be used ?? */
-void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
-	       struct lvfs_ucred *cred)
-{
-	LBUG();
-}
-
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
-              struct lvfs_ucred *cred)
-{
-	LBUG();
-}
-
-static int __init lvfs_init(void)
-{
-	int ret = 0;
-	ENTRY;
-
-	RETURN(ret);
-}
-
-static void __exit lvfs_exit(void)
-{
-	int leaked;
-	ENTRY;
-	
-	leaked = atomic_read(&obd_memory);
-	CDEBUG(leaked ? D_ERROR : D_INFO,
-	       "obd mem max: %d leaked: %d\n", obd_memmax, leaked);
-
-	return;
-}
-
-cfs_module(lvfs, "1.0.0", lvfs_init, lvfs_exit);
-
diff --git a/lustre/lvfs/lvfs_internal.h b/lustre/lvfs/lvfs_internal.h
deleted file mode 100644
index 091fd99c6a0b02fb8f0efe8921a5085a3f85a52a..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lvfs_internal.h
+++ /dev/null
@@ -1,5 +0,0 @@
-int  fsfilt_ext3_init(void);
-void fsfilt_ext3_exit(void);
-
-int  fsfilt_reiser_init(void);
-void fsfilt_reiser_exit(void);
diff --git a/lustre/lvfs/lvfs_lib.c b/lustre/lvfs/lvfs_lib.c
deleted file mode 100644
index 1a7bd013ffee4e7c796091513ceda2c08c42de2c..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lvfs_lib.c
+++ /dev/null
@@ -1,264 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/lvfs/lvfs_lib.c
- *  Lustre filesystem abstraction routines
- *
- *  Copyright (C) 2007 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include <linux/random.h>
-#else
-#include <liblustre.h>
-#endif
-#include <lustre_lib.h>
-#include <lprocfs_status.h>
-
-__u64 obd_max_pages = 0;
-__u64 obd_max_alloc = 0;
-
-#ifdef __KERNEL__
-struct lprocfs_stats *obd_memory = NULL;
-spinlock_t obd_updatemax_lock = SPIN_LOCK_UNLOCKED;
-/* refine later and change to seqlock or simlar from libcfs */
-#else
-__u64 obd_alloc;
-__u64 obd_pages;
-#endif
-
-unsigned int obd_fail_val = 0;
-unsigned int obd_fail_loc = 0;
-unsigned int obd_alloc_fail_rate = 0;
-
-int obd_alloc_fail(const void *ptr, const char *name, const char *type,
-                   size_t size, const char *file, int line)
-{
-        if (ptr == NULL ||
-            (ll_rand() & OBD_ALLOC_FAIL_MASK) < obd_alloc_fail_rate) {
-                CERROR("%s%salloc of %s ("LPU64" bytes) failed at %s:%d\n",
-                       ptr ? "force " :"", type, name, (__u64)size, file,
-                       line);
-                CERROR(LPU64" total bytes and "LPU64" total pages "           
-                       "("LPU64" bytes) allocated by Lustre, "                
-                       "%d total bytes by LNET\n",                            
-                       obd_memory_sum(),                                     
-                       obd_pages_sum() << CFS_PAGE_SHIFT,                                      
-                       obd_pages_sum(),           
-                       atomic_read(&libcfs_kmemory));                         
-               return 1;
-        }
-        return 0;
-}
-EXPORT_SYMBOL(obd_alloc_fail);
-
-#ifdef __KERNEL__
-void obd_update_maxusage()
-{
-        __u64 max1, max2;
-
-        max1 = obd_pages_sum();
-        max2 = obd_memory_sum();
-
-        spin_lock(&obd_updatemax_lock);
-        if (max1 > obd_max_pages)
-                obd_max_pages = max1;
-        if (max2 > obd_max_alloc)
-                obd_max_alloc = max2;
-        spin_unlock(&obd_updatemax_lock);
-        
-}
-
-__u64 obd_memory_max(void)
-{
-        __u64 ret;
-
-        spin_lock(&obd_updatemax_lock);
-        ret = obd_max_alloc;
-        spin_unlock(&obd_updatemax_lock);
-
-        return ret;
-}
-
-__u64 obd_pages_max(void)
-{
-        __u64 ret;
-
-        spin_lock(&obd_updatemax_lock);
-        ret = obd_max_pages;
-        spin_unlock(&obd_updatemax_lock);
-
-        return ret;
-}
-
-EXPORT_SYMBOL(obd_update_maxusage);
-EXPORT_SYMBOL(obd_pages_max);
-EXPORT_SYMBOL(obd_memory_max);
-EXPORT_SYMBOL(obd_memory);
-
-#endif
-
-#ifdef LPROCFS
-__s64 lprocfs_read_helper(struct lprocfs_counter *lc,
-                          enum lprocfs_fields_flags field)
-{
-        __s64 ret = 0;
-        int centry;
-
-        if (!lc)
-                RETURN(0);
-        do {
-                centry = atomic_read(&lc->lc_cntl.la_entry);
-
-                switch (field) {
-                        case LPROCFS_FIELDS_FLAGS_CONFIG:
-                                ret = lc->lc_config;
-                                break;
-                        case LPROCFS_FIELDS_FLAGS_SUM:
-                                ret = lc->lc_sum;
-                                break;
-                        case LPROCFS_FIELDS_FLAGS_MIN:
-                                ret = lc->lc_min;
-                                break;
-                        case LPROCFS_FIELDS_FLAGS_MAX:
-                                ret = lc->lc_max;
-                                break;
-                        case LPROCFS_FIELDS_FLAGS_AVG:
-                                ret = (lc->lc_max - lc->lc_min)/2;
-                                break;
-                        case LPROCFS_FIELDS_FLAGS_SUMSQUARE:
-                                ret = lc->lc_sumsquare;
-                                break;
-                        case LPROCFS_FIELDS_FLAGS_COUNT:
-                                ret = lc->lc_count;
-                                break;
-                        default:
-                                break;
-                };
-        } while (centry != atomic_read(&lc->lc_cntl.la_entry) &&
-                 centry != atomic_read(&lc->lc_cntl.la_exit));
-
-        RETURN(ret);
-}
-EXPORT_SYMBOL(lprocfs_read_helper);
-
-void lprocfs_counter_add(struct lprocfs_stats *stats, int idx,
-                                       long amount)
-{
-        struct lprocfs_counter *percpu_cntr;
-        int smp_id;
-
-        if (stats == NULL)
-                return;
-
-        /* With per-client stats, statistics are allocated only for
-         * single CPU area, so the smp_id should be 0 always. */
-        smp_id = lprocfs_stats_lock(stats, LPROCFS_GET_SMP_ID);
-
-        percpu_cntr = &(stats->ls_percpu[smp_id]->lp_cntr[idx]);
-        atomic_inc(&percpu_cntr->lc_cntl.la_entry);
-        percpu_cntr->lc_count++;
-
-        if (percpu_cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) {
-                percpu_cntr->lc_sum += amount;
-                if (percpu_cntr->lc_config & LPROCFS_CNTR_STDDEV)
-                        percpu_cntr->lc_sumsquare += (__u64)amount * amount;
-                if (amount < percpu_cntr->lc_min)
-                        percpu_cntr->lc_min = amount;
-                if (amount > percpu_cntr->lc_max)
-                        percpu_cntr->lc_max = amount;
-        }
-        atomic_inc(&percpu_cntr->lc_cntl.la_exit);
-        lprocfs_stats_unlock(stats);
-}
-EXPORT_SYMBOL(lprocfs_counter_add);
-
-void lprocfs_counter_sub(struct lprocfs_stats *stats, int idx,
-                                       long amount)
-{
-        struct lprocfs_counter *percpu_cntr;
-        int smp_id;
-
-        if (stats == NULL)
-                return;
-
-        /* With per-client stats, statistics are allocated only for
-         * single CPU area, so the smp_id should be 0 always. */
-        smp_id = lprocfs_stats_lock(stats, LPROCFS_GET_SMP_ID);
-
-        percpu_cntr = &(stats->ls_percpu[smp_id]->lp_cntr[idx]);
-        atomic_inc(&percpu_cntr->lc_cntl.la_entry);
-        if (percpu_cntr->lc_config & LPROCFS_CNTR_AVGMINMAX)
-                percpu_cntr->lc_sum -= amount;
-        atomic_inc(&percpu_cntr->lc_cntl.la_exit);
-        lprocfs_stats_unlock(stats);
-}
-EXPORT_SYMBOL(lprocfs_counter_sub);
-#endif  /* LPROCFS */
-
-EXPORT_SYMBOL(obd_fail_loc);
-EXPORT_SYMBOL(obd_alloc_fail_rate);
-EXPORT_SYMBOL(obd_fail_val);
-
-int obd_fail_check(__u32 id)
-{
-        static int count = 0;
-        if (likely((obd_fail_loc & OBD_FAIL_MASK_LOC) !=
-                   (id & OBD_FAIL_MASK_LOC)))
-                return 0;
-
-        if ((obd_fail_loc & (OBD_FAILED | OBD_FAIL_ONCE)) ==
-            (OBD_FAILED | OBD_FAIL_ONCE)) {
-                count = 0; /* paranoia */
-                return 0;
-        }
-
-        if (obd_fail_loc & OBD_FAIL_RAND) {
-                unsigned int ll_rand(void);
-                if (obd_fail_val < 2)
-                        return 0;
-                if (ll_rand() % obd_fail_val > 0)
-                        return 0;
-        }
-
-        if (obd_fail_loc & OBD_FAIL_SKIP) {
-                count++;
-                if (count < obd_fail_val)
-                        return 0;
-                count = 0;
-        }
-
-        /* Overridden by FAIL_ONCE */
-        if (obd_fail_loc & OBD_FAIL_SOME) {
-                count++;
-                if (count >= obd_fail_val) {
-                        count = 0;
-                        /* Don't fail anymore */
-                        obd_fail_loc |= OBD_FAIL_ONCE;
-                }
-        }
-
-        obd_fail_loc |= OBD_FAILED;
-        /* Handle old checks that OR in this */
-        if (id & OBD_FAIL_ONCE)
-                obd_fail_loc |= OBD_FAIL_ONCE;
-
-        return 1;
-}
-EXPORT_SYMBOL(obd_fail_check);
diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c
deleted file mode 100644
index beea8baa9186a63db3f1f2a5188738a827033dfd..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lvfs_linux.c
+++ /dev/null
@@ -1,510 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/lib/lvfs_linux.c
- *  Lustre filesystem abstraction routines
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <linux/version.h>
-#include <linux/fs.h>
-#include <asm/unistd.h>
-#include <linux/slab.h>
-#include <linux/pagemap.h>
-#include <linux/quotaops.h>
-#include <linux/version.h>
-#include <libcfs/kp30.h>
-#include <lustre_fsfilt.h>
-#include <obd.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/lustre_compat25.h>
-#include <lvfs.h>
-#include "lvfs_internal.h"
-
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre_quota.h>
-
-/* Debugging check only needed during development */
-#ifdef OBD_CTXT_DEBUG
-# define ASSERT_CTXT_MAGIC(magic) LASSERT((magic) == OBD_RUN_CTXT_MAGIC)
-# define ASSERT_NOT_KERNEL_CTXT(msg) LASSERTF(!segment_eq(get_fs(), get_ds()),\
-                                              msg)
-# define ASSERT_KERNEL_CTXT(msg) LASSERTF(segment_eq(get_fs(), get_ds()), msg)
-#else
-# define ASSERT_CTXT_MAGIC(magic) do {} while(0)
-# define ASSERT_NOT_KERNEL_CTXT(msg) do {} while(0)
-# define ASSERT_KERNEL_CTXT(msg) do {} while(0)
-#endif
-
-static void push_group_info(struct lvfs_run_ctxt *save,
-                            struct upcall_cache_entry *uce)
-{
-        struct group_info *ginfo = uce ? uce->ue_group_info : NULL;
-
-        if (!ginfo) {
-                save->ngroups = current_ngroups;
-                current_ngroups = 0;
-        } else {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4)
-                task_lock(current);
-                save->group_info = current->group_info;
-                current->group_info = ginfo;
-                task_unlock(current);
-#else
-                LASSERT(ginfo->ngroups <= NGROUPS);
-                LASSERT(current->ngroups <= NGROUPS_SMALL);
-                /* save old */
-                save->group_info.ngroups = current->ngroups;
-                if (current->ngroups)
-                        memcpy(save->group_info.small_block, current->groups,
-                               current->ngroups * sizeof(gid_t));
-                /* push new */
-                current->ngroups = ginfo->ngroups;
-                if (ginfo->ngroups)
-                        memcpy(current->groups, ginfo->small_block,
-                               current->ngroups * sizeof(gid_t));
-#endif
-        }
-}
-
-static void pop_group_info(struct lvfs_run_ctxt *save,
-                           struct upcall_cache_entry *uce)
-{
-        struct group_info *ginfo = uce ? uce->ue_group_info : NULL;
-
-        if (!ginfo) {
-                current_ngroups = save->ngroups;
-        } else {
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4)
-                task_lock(current);
-                current->group_info = save->group_info;
-                task_unlock(current);
-#else
-                current->ngroups = save->group_info.ngroups;
-                if (current->ngroups)
-                        memcpy(current->groups, save->group_info.small_block,
-                               current->ngroups * sizeof(gid_t));
-#endif
-        }
-}
-
-/* push / pop to root of obd store */
-void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
-               struct lvfs_ucred *uc)
-{
-        //ASSERT_NOT_KERNEL_CTXT("already in kernel context!\n");
-        ASSERT_CTXT_MAGIC(new_ctx->magic);
-        OBD_SET_CTXT_MAGIC(save);
-
-        /*
-        CDEBUG(D_INFO,
-               "= push %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               save, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
-
-        save->fs = get_fs();
-        LASSERT(atomic_read(&current->fs->pwd->d_count));
-        LASSERT(atomic_read(&new_ctx->pwd->d_count));
-        save->pwd = dget(current->fs->pwd);
-        save->pwdmnt = mntget(current->fs->pwdmnt);
-        save->luc.luc_umask = current->fs->umask;
-
-        LASSERT(save->pwd);
-        LASSERT(save->pwdmnt);
-        LASSERT(new_ctx->pwd);
-        LASSERT(new_ctx->pwdmnt);
-
-        if (uc) {
-                save->luc.luc_fsuid = current->fsuid;
-                save->luc.luc_fsgid = current->fsgid;
-                save->luc.luc_cap = current->cap_effective;
-
-                current->fsuid = uc->luc_fsuid;
-                current->fsgid = uc->luc_fsgid;
-                current->cap_effective = uc->luc_cap;
-                push_group_info(save, uc->luc_uce);
-        }
-        current->fs->umask = 0; /* umask already applied on client */
-        set_fs(new_ctx->fs);
-        ll_set_fs_pwd(current->fs, new_ctx->pwdmnt, new_ctx->pwd);
-
-        /*
-        CDEBUG(D_INFO,
-               "= push %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               new_ctx, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
-}
-EXPORT_SYMBOL(push_ctxt);
-
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
-              struct lvfs_ucred *uc)
-{
-        //printk("pc0");
-        ASSERT_CTXT_MAGIC(saved->magic);
-        //printk("pc1");
-        ASSERT_KERNEL_CTXT("popping non-kernel context!\n");
-
-        /*
-        CDEBUG(D_INFO,
-               " = pop  %p==%p = cur %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               new_ctx, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
-
-        LASSERTF(current->fs->pwd == new_ctx->pwd, "%p != %p\n",
-                 current->fs->pwd, new_ctx->pwd);
-        LASSERTF(current->fs->pwdmnt == new_ctx->pwdmnt, "%p != %p\n",
-                 current->fs->pwdmnt, new_ctx->pwdmnt);
-
-        set_fs(saved->fs);
-        ll_set_fs_pwd(current->fs, saved->pwdmnt, saved->pwd);
-
-        dput(saved->pwd);
-        mntput(saved->pwdmnt);
-        current->fs->umask = saved->luc.luc_umask;
-        if (uc) {
-                current->fsuid = saved->luc.luc_fsuid;
-                current->fsgid = saved->luc.luc_fsgid;
-                current->cap_effective = saved->luc.luc_cap;
-                pop_group_info(saved, uc->luc_uce);
-        }
-
-        /*
-        CDEBUG(D_INFO,
-               "= pop  %p->%p = cur fs %p pwd %p:d%d:i%d (%.*s), pwdmnt %p:%d\n",
-               saved, current, current->fs, current->fs->pwd,
-               atomic_read(&current->fs->pwd->d_count),
-               atomic_read(&current->fs->pwd->d_inode->i_count),
-               current->fs->pwd->d_name.len, current->fs->pwd->d_name.name,
-               current->fs->pwdmnt,
-               atomic_read(&current->fs->pwdmnt->mnt_count));
-        */
-}
-EXPORT_SYMBOL(pop_ctxt);
-
-/* utility to make a file */
-struct dentry *simple_mknod(struct dentry *dir, char *name, int mode, int fix)
-{
-        struct dentry *dchild;
-        int err = 0;
-        ENTRY;
-
-        ASSERT_KERNEL_CTXT("kernel doing mknod outside kernel context\n");
-        CDEBUG(D_INODE, "creating file %.*s\n", (int)strlen(name), name);
-
-        dchild = ll_lookup_one_len(name, dir, strlen(name));
-        if (IS_ERR(dchild))
-                GOTO(out_up, dchild);
-
-        if (dchild->d_inode) {
-                int old_mode = dchild->d_inode->i_mode;
-                if (!S_ISREG(old_mode))
-                        GOTO(out_err, err = -EEXIST);
-
-                /* Fixup file permissions if necessary */
-                if (fix && (old_mode & S_IALLUGO) != (mode & S_IALLUGO)) {
-                        CWARN("fixing permissions on %s from %o to %o\n",
-                              name, old_mode, mode);
-                        dchild->d_inode->i_mode = (mode & S_IALLUGO) |
-                                                  (old_mode & ~S_IALLUGO);
-                        mark_inode_dirty(dchild->d_inode);
-                }
-                GOTO(out_up, dchild);
-        }
-
-        err = ll_vfs_create(dir->d_inode, dchild, (mode & ~S_IFMT) | S_IFREG,
-                            NULL);
-        if (err)
-                GOTO(out_err, err);
-
-        RETURN(dchild);
-
-out_err:
-        dput(dchild);
-        dchild = ERR_PTR(err);
-out_up:
-        return dchild;
-}
-EXPORT_SYMBOL(simple_mknod);
-
-/* utility to make a directory */
-struct dentry *simple_mkdir(struct dentry *dir, char *name, int mode, int fix)
-{
-        struct dentry *dchild;
-        int err = 0;
-        ENTRY;
-
-        ASSERT_KERNEL_CTXT("kernel doing mkdir outside kernel context\n");
-        CDEBUG(D_INODE, "creating directory %.*s\n", (int)strlen(name), name);
-        dchild = ll_lookup_one_len(name, dir, strlen(name));
-        if (IS_ERR(dchild))
-                GOTO(out_up, dchild);
-
-        if (dchild->d_inode) {
-                int old_mode = dchild->d_inode->i_mode;
-                if (!S_ISDIR(old_mode)) {
-                        CERROR("found %s (%lu/%u) is mode %o\n", name,
-                               dchild->d_inode->i_ino,
-                               dchild->d_inode->i_generation, old_mode);
-                        GOTO(out_err, err = -ENOTDIR);
-                }
-
-                /* Fixup directory permissions if necessary */
-                if (fix && (old_mode & S_IALLUGO) != (mode & S_IALLUGO)) {
-                        CDEBUG(D_CONFIG, 
-                               "fixing permissions on %s from %o to %o\n",
-                               name, old_mode, mode);
-                        dchild->d_inode->i_mode = (mode & S_IALLUGO) |
-                                                  (old_mode & ~S_IALLUGO);
-                        mark_inode_dirty(dchild->d_inode);
-                }
-                GOTO(out_up, dchild);
-        }
-
-        err = vfs_mkdir(dir->d_inode, dchild, mode);
-        if (err)
-                GOTO(out_err, err);
-
-        RETURN(dchild);
-
-out_err:
-        dput(dchild);
-        dchild = ERR_PTR(err);
-out_up:
-        return dchild;
-}
-EXPORT_SYMBOL(simple_mkdir);
-
-/* utility to rename a file */
-int lustre_rename(struct dentry *dir, char *oldname, char *newname)
-{
-        struct dentry *dchild_old, *dchild_new;
-        int err = 0;
-        ENTRY;
-
-        ASSERT_KERNEL_CTXT("kernel doing rename outside kernel context\n");
-        CDEBUG(D_INODE, "renaming file %.*s to %.*s\n", 
-               (int)strlen(oldname), oldname, (int)strlen(newname), newname);
-
-        dchild_old = ll_lookup_one_len(oldname, dir, strlen(oldname));
-        if (IS_ERR(dchild_old))
-                RETURN(PTR_ERR(dchild_old));
-
-        if (!dchild_old->d_inode) 
-                GOTO(put_old, err = -ENOENT);
-
-        dchild_new = ll_lookup_one_len(newname, dir, strlen(newname));
-        if (IS_ERR(dchild_new))
-                GOTO(put_old, err = PTR_ERR(dchild_new));
-
-        err = vfs_rename(dir->d_inode, dchild_old, dir->d_inode, dchild_new);
-
-        dput(dchild_new);
-put_old:
-        dput(dchild_old);
-        RETURN(err);
-}
-EXPORT_SYMBOL(lustre_rename);
-
-/*
- * Read a file from within kernel context.  Prior to calling this
- * function we should already have done a push_ctxt().
- */
-int lustre_fread(struct file *file, void *buf, int len, loff_t *off)
-{
-        ASSERT_KERNEL_CTXT("kernel doing read outside kernel context\n");
-        if (!file || !file->f_op || !file->f_op->read || !off)
-                RETURN(-ENOSYS);
-
-        return file->f_op->read(file, buf, len, off);
-}
-EXPORT_SYMBOL(lustre_fread);
-
-/*
- * Write a file from within kernel context.  Prior to calling this
- * function we should already have done a push_ctxt().
- */
-int lustre_fwrite(struct file *file, const void *buf, int len, loff_t *off)
-{
-        ENTRY;
-        ASSERT_KERNEL_CTXT("kernel doing write outside kernel context\n");
-        if (!file)
-                RETURN(-ENOENT);
-        if (!file->f_op)
-                RETURN(-ENOSYS);
-        if (!off)
-                RETURN(-EINVAL);
-
-        if (!file->f_op->write)
-                RETURN(-EROFS);
-
-        RETURN(file->f_op->write(file, buf, len, off));
-}
-EXPORT_SYMBOL(lustre_fwrite);
-
-/*
- * Sync a file from within kernel context.  Prior to calling this
- * function we should already have done a push_ctxt().
- */
-int lustre_fsync(struct file *file)
-{
-        ENTRY;
-        ASSERT_KERNEL_CTXT("kernel doing sync outside kernel context\n");
-        if (!file || !file->f_op || !file->f_op->fsync)
-                RETURN(-ENOSYS);
-
-        RETURN(file->f_op->fsync(file, file->f_dentry, 0));
-}
-EXPORT_SYMBOL(lustre_fsync);
-
-struct l_file *l_dentry_open(struct lvfs_run_ctxt *ctxt, struct l_dentry *de,
-                             int flags)
-{
-        mntget(ctxt->pwdmnt);
-        return dentry_open(de, ctxt->pwdmnt, flags);
-}
-EXPORT_SYMBOL(l_dentry_open);
-
-#ifdef HAVE_VFS_READDIR_U64_INO
-static int l_filldir(void *__buf, const char *name, int namlen, loff_t offset,
-                     u64 ino, unsigned int d_type)
-#else
-static int l_filldir(void *__buf, const char *name, int namlen, loff_t offset,
-                     ino_t ino, unsigned int d_type)
-#endif
-{
-        struct l_linux_dirent *dirent;
-        struct l_readdir_callback *buf = (struct l_readdir_callback *)__buf;
-
-        dirent = buf->lrc_dirent;
-        if (dirent)
-               dirent->lld_off = offset;
-
-        OBD_ALLOC(dirent, sizeof(*dirent));
-
-        if (!dirent)
-                return -ENOMEM;
-
-        list_add_tail(&dirent->lld_list, buf->lrc_list);
-
-        buf->lrc_dirent = dirent;
-        dirent->lld_ino = ino;
-        LASSERT(sizeof(dirent->lld_name) >= namlen + 1);
-        memcpy(dirent->lld_name, name, namlen);
-
-        return 0;
-}
-
-long l_readdir(struct file *file, struct list_head *dentry_list)
-{
-        struct l_linux_dirent *lastdirent;
-        struct l_readdir_callback buf;
-        int error;
-
-        buf.lrc_dirent = NULL;
-        buf.lrc_list = dentry_list; 
-
-        error = vfs_readdir(file, l_filldir, &buf);
-        if (error < 0)
-                return error;
-
-        lastdirent = buf.lrc_dirent;
-        if (lastdirent)
-                lastdirent->lld_off = file->f_pos;
-
-        return 0; 
-}
-EXPORT_SYMBOL(l_readdir);
-
-
-#ifdef LUSTRE_KERNEL_VERSION
-#ifndef HAVE_CLEAR_RDONLY_ON_PUT
-#error rdonly patchset must be updated [cfs bz11248]
-#endif
-
-void dev_set_rdonly(lvfs_sbdev_type dev);
-int dev_check_rdonly(lvfs_sbdev_type dev);
-
-void __lvfs_set_rdonly(lvfs_sbdev_type dev, lvfs_sbdev_type jdev)
-{
-        lvfs_sbdev_sync(dev);
-        if (jdev && (jdev != dev)) {
-                CDEBUG(D_IOCTL | D_HA, "set journal dev %lx rdonly\n",
-                       (long)jdev);
-                dev_set_rdonly(jdev);
-        }
-        CDEBUG(D_IOCTL | D_HA, "set dev %lx rdonly\n", (long)dev);
-        dev_set_rdonly(dev);
-}
-
-int lvfs_check_rdonly(lvfs_sbdev_type dev)
-{
-        return dev_check_rdonly(dev);
-}
-
-EXPORT_SYMBOL(__lvfs_set_rdonly);
-EXPORT_SYMBOL(lvfs_check_rdonly);
-#endif /* LUSTRE_KERNEL_VERSION */
-
-int lvfs_check_io_health(struct obd_device *obd, struct file *file)
-{
-        char *write_page = NULL;
-        loff_t offset = 0;
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(write_page, CFS_PAGE_SIZE);
-        if (!write_page)
-                RETURN(-ENOMEM);
-        
-        rc = fsfilt_write_record(obd, file, write_page, CFS_PAGE_SIZE, &offset, 1);
-       
-        OBD_FREE(write_page, CFS_PAGE_SIZE);
-
-        CDEBUG(D_INFO, "write 1 page synchronously for checking io rc %d\n",rc);
-        RETURN(rc); 
-}
-EXPORT_SYMBOL(lvfs_check_io_health);
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre VFS Filesystem Helper v0.1");
-MODULE_LICENSE("GPL");
diff --git a/lustre/lvfs/lvfs_userfs.c b/lustre/lvfs/lvfs_userfs.c
deleted file mode 100644
index 28afe5fea9682915cdae995de86c9eb7fb87657a..0000000000000000000000000000000000000000
--- a/lustre/lvfs/lvfs_userfs.c
+++ /dev/null
@@ -1,44 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/lib/lvfs_userfs.c
- *  Lustre filesystem abstraction routines
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <liblustre.h>
-#include <lvfs.h>
-#include "lvfs_internal.h"
-
-#include <obd.h>
-#include <lustre_lib.h>
-
-/* XXX currently ctxt functions should not be used ?? */
-void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx,
-               struct lvfs_ucred *uc)
-{
-        LBUG();
-}
-
-void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx,
-              struct lvfs_ucred *uc)
-{
-        LBUG();
-}
diff --git a/lustre/lvfs/prng.c b/lustre/lvfs/prng.c
deleted file mode 100644
index 4922c04c4535530ef7eb2ecc9c431c2f3dc79ebb..0000000000000000000000000000000000000000
--- a/lustre/lvfs/prng.c
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- * concatenation of following two 16-bit multiply with carry generators
- * x(n)=a*x(n-1)+carry mod 2^16 and y(n)=b*y(n-1)+carry mod 2^16,
- * number and carry packed within the same 32 bit integer.
- * algorithm recommended by Marsaglia
- ******************************************************************/
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#define get_random_bytes(val, size)     (*val) = 0
-#endif
-#include <obd_class.h>
-#include <linux/random.h>
-
-/*
-From: George Marsaglia <geo@stat.fsu.edu>
-Newsgroups: sci.math
-Subject: Re: A RANDOM NUMBER GENERATOR FOR C
-Date: Tue, 30 Sep 1997 05:29:35 -0700
-
- * You may replace the two constants 36969 and 18000 by any
- * pair of distinct constants from this list:
- * 18000 18030 18273 18513 18879 19074 19098 19164 19215 19584
- * 19599 19950 20088 20508 20544 20664 20814 20970 21153 21243
- * 21423 21723 21954 22125 22188 22293 22860 22938 22965 22974
- * 23109 23124 23163 23208 23508 23520 23553 23658 23865 24114
- * 24219 24660 24699 24864 24948 25023 25308 25443 26004 26088
- * 26154 26550 26679 26838 27183 27258 27753 27795 27810 27834
- * 27960 28320 28380 28689 28710 28794 28854 28959 28980 29013
- * 29379 29889 30135 30345 30459 30714 30903 30963 31059 31083
- * (or any other 16-bit constants k for which both k*2^16-1
- * and k*2^15-1 are prime) */
-
-#define RANDOM_CONST_A 18030
-#define RANDOM_CONST_B 29013
-
-static unsigned int seed_x = 521288629;
-static unsigned int seed_y = 362436069;
-unsigned int ll_rand(void)
-{
-
-	seed_x = RANDOM_CONST_A * (seed_x & 65535) + (seed_x >> 16);
-	seed_y = RANDOM_CONST_B * (seed_y & 65535) + (seed_y >> 16);
-
-	return ((seed_x << 16) + (seed_y & 65535));
-}
-EXPORT_SYMBOL(ll_rand);
-
-/* Note that if the input seeds are not completely random, then there is
- * a preferred location for the entropy in the two seeds, in order to avoid
- * the initial values from the PRNG to be the same each time.
- *
- * seed1 (seed_x) should have the most entropy in the low bits of the word
- * seed2 (seed_y) should have the most entropy in the high bits of the word */
-void ll_srand(unsigned int seed1, unsigned int seed2)
-{
-	if (seed1)
-		seed_x = seed1;	/* use default seeds if parameter is 0 */
-	if (seed2)
-		seed_y = seed2;
-}
-EXPORT_SYMBOL(ll_srand);
-
-void ll_get_random_bytes(void *buf, int size)
-{
-        int *p = buf;
-        int rem, tmp;
-
-        LASSERT(size >= 0);
-
-        rem = min((int)((unsigned long)buf & (sizeof(int) - 1)), size);
-        if (rem) {
-                get_random_bytes(&tmp, sizeof(tmp));
-                tmp ^= ll_rand();
-                memcpy(buf, &tmp, rem);
-                p = buf + rem;
-                size -= rem;
-        }
-
-        while (size >= sizeof(int)) {
-                get_random_bytes(&tmp, sizeof(tmp));
-                *p = ll_rand() ^ tmp;
-                size -= sizeof(int);
-                p++;
-        }
-        buf = p;
-        if (size) {
-                get_random_bytes(&tmp, sizeof(tmp));
-                tmp ^= ll_rand();
-                memcpy(buf, &tmp, size);
-        }
-}
-EXPORT_SYMBOL(ll_get_random_bytes); 
-
-void ll_generate_random_uuid(class_uuid_t uuid_out)
-{
-        ll_get_random_bytes(uuid_out, sizeof(class_uuid_t));
-}
-EXPORT_SYMBOL(ll_generate_random_uuid);
diff --git a/lustre/lvfs/quotafmt_test.c b/lustre/lvfs/quotafmt_test.c
deleted file mode 100644
index 3e7f592426db48d3051c5c5513837e9300ef144a..0000000000000000000000000000000000000000
--- a/lustre/lvfs/quotafmt_test.c
+++ /dev/null
@@ -1,508 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- * Kernel module to test lustre administrative quotafile format APIs
- * from the OBD setup function */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/kernel.h>
-#include <linux/random.h>
-
-#include <lustre_quota.h>
-#include <obd_class.h>
-
-#include "lustre_quota_fmt.h"
-
-char *test_quotafile[2] = { "usrquota_test", "grpquota_test" };
-
-static int quotfmt_initialize(struct lustre_quota_info *lqi,
-                              struct obd_device *tgt,
-                              struct lvfs_run_ctxt *saved)
-{
-        struct lustre_disk_dqheader dqhead;
-        static const uint quota_magics[] = LUSTRE_INITQMAGICS;
-        static const uint quota_versions[] = LUSTRE_INITQVERSIONS;
-        struct file *fp;
-        struct inode *parent_inode = tgt->obd_lvfs_ctxt.pwd->d_inode;
-        size_t size;
-        struct dentry *de;
-        int i, rc = 0;
-        ENTRY;
-
-        push_ctxt(saved, &tgt->obd_lvfs_ctxt, NULL);
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                loff_t offset = 0;
-                char *name = test_quotafile[i];
-                int namelen = strlen(name);
-
-                /* remove the stale test quotafile */
-                LOCK_INODE_MUTEX(parent_inode);
-                de = lookup_one_len(name, tgt->obd_lvfs_ctxt.pwd, namelen);
-                if (!IS_ERR(de) && de->d_inode)
-                        vfs_unlink(parent_inode, de);
-                if (!IS_ERR(de))
-                        dput(de);
-                UNLOCK_INODE_MUTEX(parent_inode);
-
-                /* create quota file */
-                fp = filp_open(name, O_CREAT | O_EXCL, 0644);
-                if (IS_ERR(fp)) {
-                        rc = PTR_ERR(fp);
-                        CERROR("error creating test quotafile %s (rc = %d)\n",
-                               name, rc);
-                        break;
-                }
-                lqi->qi_files[i] = fp;
-
-                /* write quotafile header */
-                dqhead.dqh_magic = cpu_to_le32(quota_magics[i]);
-                dqhead.dqh_version = cpu_to_le32(quota_versions[i]);
-                size = fp->f_op->write(fp, (char *)&dqhead,
-                                       sizeof(struct lustre_disk_dqheader),
-                                       &offset);
-                if (size != sizeof(struct lustre_disk_dqheader)) {
-                        CERROR("error writing quotafile header %s (rc = %d)\n",
-                               name, rc);
-                        rc = size;
-                        break;
-                }
-        }
-
-        RETURN(rc);
-}
-
-static int quotfmt_finalize(struct lustre_quota_info *lqi,
-                            struct obd_device *tgt, struct lvfs_run_ctxt *saved)
-{
-        struct dentry *de;
-        struct inode *parent_inode = tgt->obd_lvfs_ctxt.pwd->d_inode;
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                char *name = test_quotafile[i];
-                int namelen = strlen(name);
-
-                if (lqi->qi_files[i] == NULL)
-                        continue;
-
-                /* close quota file */
-                filp_close(lqi->qi_files[i], 0);
-
-                /* unlink quota file */
-                LOCK_INODE_MUTEX(parent_inode);
-
-                de = lookup_one_len(name, tgt->obd_lvfs_ctxt.pwd, namelen);
-                if (IS_ERR(de) || de->d_inode == NULL) {
-                        rc = IS_ERR(de) ? PTR_ERR(de) : -ENOENT;
-                        CERROR("error lookup quotafile %s (rc = %d)\n",
-                               name, rc);
-                        goto dput;
-                }
-
-                rc = vfs_unlink(parent_inode, de);
-                if (rc)
-                        CERROR("error unlink quotafile %s (rc = %d)\n",
-                               name, rc);
-              dput:
-                if (!IS_ERR(de))
-                        dput(de);
-                UNLOCK_INODE_MUTEX(parent_inode);
-        }
-
-        pop_ctxt(saved, &tgt->obd_lvfs_ctxt, NULL);
-        RETURN(rc);
-}
-
-static int quotfmt_test_1(struct lustre_quota_info *lqi)
-{
-        int i;
-        ENTRY;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                if (lustre_check_quota_file(lqi, i))
-                        RETURN(-EINVAL);
-        }
-        RETURN(0);
-}
-
-static void print_quota_info(struct lustre_quota_info *lqi)
-{
-#if 0
-        struct lustre_mem_dqinfo *dqinfo;
-        int i;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                dqinfo = &lqi->qi_info[i];
-                printk("%s quota info:\n", i == USRQUOTA ? "user " : "group");
-                printk
-                    ("dqi_bgrace(%u) dqi_igrace(%u) dqi_flags(%lu) dqi_blocks(%u) "
-                     "dqi_free_blk(%u) dqi_free_entry(%u)\n",
-                     dqinfo->dqi_bgrace, dqinfo->dqi_igrace, dqinfo->dqi_flags,
-                     dqinfo->dqi_blocks, dqinfo->dqi_free_blk,
-                     dqinfo->dqi_free_entry);
-        }
-#endif
-}
-
-static int quotfmt_test_2(struct lustre_quota_info *lqi)
-{
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct lustre_mem_dqinfo dqinfo;
-
-                rc = lustre_init_quota_info(lqi, i);
-                if (rc) {
-                        CERROR("init quotainfo(%d) failed! (rc:%d)\n", i, rc);
-                        break;
-                }
-                memcpy(&dqinfo, &lqi->qi_info[i], sizeof(dqinfo));
-
-                rc = lustre_read_quota_info(lqi, i);
-                if (rc) {
-                        CERROR("read quotainfo(%d) failed! (rc:%d)\n", i, rc);
-                        break;
-                }
-
-                if (memcmp(&dqinfo, &lqi->qi_info[i], sizeof(dqinfo))) {
-                        rc = -EINVAL;
-                        break;
-                }
-        }
-        RETURN(rc);
-}
-
-static struct lustre_dquot *get_rand_dquot(struct lustre_quota_info *lqi)
-{
-        struct lustre_dquot *dquot;
-        unsigned int rand;
-
-        OBD_ALLOC(dquot, sizeof(*dquot));
-        if (dquot == NULL)
-                return NULL;
-
-        get_random_bytes(&rand, sizeof(rand));
-        if (!rand)
-                rand = 1000;
-
-        dquot->dq_info = lqi;
-        dquot->dq_id = rand % 1000 + 1;
-        dquot->dq_type = rand % MAXQUOTAS;
-
-        dquot->dq_dqb.dqb_bhardlimit = rand;
-        dquot->dq_dqb.dqb_bsoftlimit = rand / 2;
-        dquot->dq_dqb.dqb_curspace = rand / 3;
-        dquot->dq_dqb.dqb_ihardlimit = rand;
-        dquot->dq_dqb.dqb_isoftlimit = rand / 2;
-        dquot->dq_dqb.dqb_curinodes = rand / 3;
-        dquot->dq_dqb.dqb_btime = jiffies;
-        dquot->dq_dqb.dqb_itime = jiffies;
-
-        return dquot;
-}
-
-static void put_rand_dquot(struct lustre_dquot *dquot)
-{
-        OBD_FREE(dquot, sizeof(*dquot));
-}
-
-static int write_check_dquot(struct lustre_quota_info *lqi)
-{
-        struct lustre_dquot *dquot;
-        struct lustre_mem_dqblk dqblk;
-        int rc = 0;
-        ENTRY;
-
-        dquot = get_rand_dquot(lqi);
-        if (dquot == NULL)
-                RETURN(-ENOMEM);
-
-        /* for already exists entry, we set the dq_off by read_dquot */
-        rc = lustre_read_dquot(dquot);
-        if (rc) {
-                CERROR("read dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        clear_bit(DQ_FAKE_B, &dquot->dq_flags);
-        /* for already exists entry, we rewrite it */
-        rc = lustre_commit_dquot(dquot);
-        if (rc) {
-                CERROR("commit dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-        memcpy(&dqblk, &dquot->dq_dqb, sizeof(dqblk));
-        memset(&dquot->dq_dqb, 0, sizeof(dqblk));
-
-        rc = lustre_read_dquot(dquot);
-        if (rc) {
-                CERROR("read dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        if (memcmp(&dqblk, &dquot->dq_dqb, sizeof(dqblk))) {
-                rc = -EINVAL;
-                GOTO(out, rc);
-        }
-      out:
-        put_rand_dquot(dquot);
-        RETURN(rc);
-}
-
-static int quotfmt_test_3(struct lustre_quota_info *lqi)
-{
-        struct lustre_dquot *dquot;
-        int i = 0, rc = 0;
-        ENTRY;
-
-        dquot = get_rand_dquot(lqi);
-        if (dquot == NULL)
-                RETURN(-ENOMEM);
-      repeat:
-        clear_bit(DQ_FAKE_B, &dquot->dq_flags);
-        /* write a new dquot */
-        rc = lustre_commit_dquot(dquot);
-        if (rc) {
-                CERROR("commit dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-        dquot->dq_off = 0;
-        memset(&dquot->dq_dqb, 0, sizeof(dquot->dq_dqb));
-
-        /* check if this dquot is on disk now */
-        rc = lustre_read_dquot(dquot);
-        if (rc) {
-                CERROR("read dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-        if (!dquot->dq_off || test_bit(DQ_FAKE_B, &dquot->dq_flags)) {
-                CERROR("the dquot isn't committed\n");
-                GOTO(out, rc = -EINVAL);
-        }
-
-        /* remove this dquot */
-        set_bit(DQ_FAKE_B, &dquot->dq_flags);
-        dquot->dq_dqb.dqb_curspace = 0;
-        dquot->dq_dqb.dqb_curinodes = 0;
-        rc = lustre_commit_dquot(dquot);
-        if (rc) {
-                CERROR("remove dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        /* check if the dquot is really removed */
-        clear_bit(DQ_FAKE_B, &dquot->dq_flags);
-        dquot->dq_off = 0;
-        rc = lustre_read_dquot(dquot);
-        if (rc) {
-                CERROR("read dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-        if (!test_bit(DQ_FAKE_B, &dquot->dq_flags) || dquot->dq_off) {
-                CERROR("the dquot isn't removed!\n");
-                GOTO(out, rc = -EINVAL);
-        }
-
-        /* check if this dquot can be write again */
-        if (++i < 2)
-                goto repeat;
-
-        print_quota_info(lqi);
-
-      out:
-        put_rand_dquot(dquot);
-        RETURN(rc);
-}
-
-static int quotfmt_test_4(struct lustre_quota_info *lqi)
-{
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < 30000; i++) {
-                rc = write_check_dquot(lqi);
-                if (rc) {
-                        CERROR("write/check dquot failed at %d! (rc:%d)\n",
-                               i, rc);
-                        break;
-                }
-        }
-        print_quota_info(lqi);
-        RETURN(rc);
-}
-
-static int quotfmt_test_5(struct lustre_quota_info *lqi)
-{
-#ifndef KERNEL_SUPPORTS_QUOTA_READ 
-        int i, rc = 0;
-
-        for (i = USRQUOTA; i < MAXQUOTAS && !rc; i++) {
-                struct list_head list;
-                struct dquot_id *dqid, *tmp;
-
-                INIT_LIST_HEAD(&list);
-                rc = lustre_get_qids(lqi->qi_files[i], NULL, i, &list);
-                if (rc) {
-                        CERROR("%s get all %ss (rc:%d):\n",
-                               rc ? "error" : "success",
-                               i == USRQUOTA ? "uid" : "gid", rc);
-                }
-                list_for_each_entry_safe(dqid, tmp, &list, di_link) {
-                        list_del_init(&dqid->di_link);
-                        if (rc == 0)
-                                printk("%d ", dqid->di_id);
-                        kfree(dqid);
-                }
-                printk("\n");
-        }
-        return rc;
-#else
-        CWARN("kernel supports quota_read OR kernel version >= 2.6.12, test skipped\n");
-        return 0;
-#endif
-}
-
-static int quotfmt_run_tests(struct obd_device *obd, struct obd_device *tgt)
-{
-        struct lvfs_run_ctxt saved;
-        struct lustre_quota_info *lqi = NULL;
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(lqi, sizeof(*lqi));
-        if (lqi == NULL) {
-                CERROR("not enough memory\n");
-                RETURN(-ENOMEM);
-        }
-
-        CWARN("=== Initialize quotafile test\n");
-        rc = quotfmt_initialize(lqi, tgt, &saved);
-        if (rc)
-                GOTO(out, rc);
-
-        CWARN("=== test  1: check quota header\n");
-        rc = quotfmt_test_1(lqi);
-        if (rc) {
-                CERROR("check quota header failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("=== test  2: write/read quota info\n");
-        rc = quotfmt_test_2(lqi);
-        if (rc) {
-                CERROR("write/read quota info failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("=== test  3: write/remove dquot\n");
-        rc = quotfmt_test_3(lqi);
-        if (rc) {
-                CERROR("write/remove dquot failed! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("=== test  4: write/read 30000 dquot\n");
-        rc = quotfmt_test_4(lqi);
-        if (rc) {
-                CERROR("write/read 30000 dquot failed\n");
-                GOTO(out, rc);
-        }
-
-        CWARN("=== test 5: walk through quota file to get all ids\n");
-        rc = quotfmt_test_5(lqi);
-        if (rc) {
-                CERROR("walk through quota file failed\n");
-                GOTO(out, rc);
-        }
-
-      out:
-        CWARN("=== Finalize quotafile test\n");
-        rc = quotfmt_finalize(lqi, tgt, &saved);
-        OBD_FREE(lqi, sizeof(*lqi));
-        RETURN(rc);
-}
-
-static int quotfmt_test_cleanup(struct obd_device *obd)
-{
-        ENTRY;
-        lprocfs_obd_cleanup(obd);
-        RETURN(0);
-}
-
-static int quotfmt_test_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        struct lustre_cfg *lcfg = buf;
-        struct obd_device *tgt;
-        int rc;
-        ENTRY;
-
-        if (lcfg->lcfg_bufcount < 1) {
-                CERROR("requires a mds OBD name\n");
-                RETURN(-EINVAL);
-        }
-
-        tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
-        if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
-                CERROR("target device not attached or not set up (%s)\n",
-                       lustre_cfg_string(lcfg, 1));
-                RETURN(-EINVAL);
-        }
-
-        rc = quotfmt_run_tests(obd, tgt);
-        if (rc)
-                quotfmt_test_cleanup(obd);
-
-        lprocfs_quotfmt_test_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        RETURN(rc);
-}
-
-static struct obd_ops quotfmt_obd_ops = {
-        .o_owner = THIS_MODULE,
-        .o_setup = quotfmt_test_setup,
-        .o_cleanup = quotfmt_test_cleanup,
-};
-
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_quotfmt_test_obd_vars[] = { {0} };
-static struct lprocfs_vars lprocfs_quotfmt_test_module_vars[] = { {0} };
-
-void lprocfs_quotfmt_test_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_quotfmt_test_module_vars;
-    lvars->obd_vars     = lprocfs_quotfmt_test_obd_vars;
-}
-#endif
-static int __init quotfmt_test_init(void)
-{
-        struct lprocfs_static_vars lvars;
-
-        lprocfs_quotfmt_test_init_vars(&lvars);
-        return class_register_type(&quotfmt_obd_ops, lvars.module_vars,
-                                   "quotfmt_test");
-}
-
-static void __exit quotfmt_test_exit(void)
-{
-        class_unregister_type("quotfmt_test");
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("administrative quotafile test module");
-MODULE_LICENSE("GPL");
-
-module_init(quotfmt_test_init);
-module_exit(quotfmt_test_exit);
diff --git a/lustre/lvfs/upcall_cache.c b/lustre/lvfs/upcall_cache.c
deleted file mode 100644
index 61e1e85e1f59689547c48db1387cc30357b4a39f..0000000000000000000000000000000000000000
--- a/lustre/lvfs/upcall_cache.c
+++ /dev/null
@@ -1,518 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Supplementary groups cache.
- *
- *  Copyright (c) 2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define DEBUG_SUBSYSTEM S_SEC
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/kmod.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/version.h>
-#include <linux/unistd.h>
-
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include <linux/fs.h>
-#include <linux/stat.h>
-#include <asm/uaccess.h>
-#include <linux/slab.h>
-
-#include <obd_support.h>
-#include <lustre_lib.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4)
-struct group_info *groups_alloc(int ngroups)
-{
-        struct group_info *ginfo;
-
-        LASSERT(ngroups <= NGROUPS_SMALL);
-
-        OBD_ALLOC(ginfo, sizeof(*ginfo) + 1 * sizeof(gid_t *));
-        if (!ginfo)
-                return NULL;
-        ginfo->ngroups = ngroups;
-        ginfo->nblocks = 1;
-        ginfo->blocks[0] = ginfo->small_block;
-        atomic_set(&ginfo->usage, 1);
-
-        return ginfo;
-}
-
-void groups_free(struct group_info *ginfo)
-{
-        LASSERT(ginfo->ngroups <= NGROUPS_SMALL);
-        LASSERT(ginfo->nblocks == 1);
-        LASSERT(ginfo->blocks[0] == ginfo->small_block);
-
-        OBD_FREE(ginfo, sizeof(*ginfo) + 1 * sizeof(gid_t *));
-}
-#endif
-
-static struct upcall_cache_entry *alloc_entry(__u64 key)
-{
-        struct upcall_cache_entry *entry;
-
-        OBD_ALLOC(entry, sizeof(*entry));
-        if (!entry)
-                return NULL;
-
-        UC_CACHE_SET_NEW(entry);
-        INIT_LIST_HEAD(&entry->ue_hash);
-        entry->ue_key = key;
-        atomic_set(&entry->ue_refcount, 0);
-        init_waitqueue_head(&entry->ue_waitq);
-        return entry;
-}
-
-/* protected by hash lock */
-static void free_entry(struct upcall_cache_entry *entry)
-{
-        if (entry->ue_group_info)
-                groups_free(entry->ue_group_info);
-        list_del(&entry->ue_hash);
-        CDEBUG(D_OTHER, "destroy cache entry %p for key "LPU64"\n",
-               entry, entry->ue_key);
-        OBD_FREE(entry, sizeof(*entry));
-}
-
-static void get_entry(struct upcall_cache_entry *entry)
-{
-        atomic_inc(&entry->ue_refcount);
-}
-
-static void put_entry(struct upcall_cache_entry *entry)
-{
-        if (atomic_dec_and_test(&entry->ue_refcount) &&
-            (UC_CACHE_IS_INVALID(entry) || UC_CACHE_IS_EXPIRED(entry))) {
-                free_entry(entry);
-        }
-}
-
-static int check_unlink_entry(struct upcall_cache_entry *entry)
-{
-        if (UC_CACHE_IS_VALID(entry) &&
-            time_before(jiffies, entry->ue_expire))
-                return 0;
-
-        if (UC_CACHE_IS_ACQUIRING(entry)) {
-                if (time_before(jiffies, entry->ue_acquire_expire))
-                        return 0;
-
-                UC_CACHE_SET_EXPIRED(entry);
-                wake_up_all(&entry->ue_waitq);
-        } else if (!UC_CACHE_IS_INVALID(entry)) {
-                UC_CACHE_SET_EXPIRED(entry);
-        }
-
-        list_del_init(&entry->ue_hash);
-        if (!atomic_read(&entry->ue_refcount))
-                free_entry(entry);
-        return 1;
-}
-
-static int refresh_entry(struct upcall_cache *hash,
-                         struct upcall_cache_entry *entry)
-{
-        char *argv[4];
-        char *envp[3];
-        char keystr[16];
-        int rc;
-        ENTRY;
-
-        snprintf(keystr, 16, LPU64, entry->ue_key);
-
-        CDEBUG(D_INFO, "The groups upcall is: %s \n", hash->uc_upcall);
-        argv[0] = hash->uc_upcall;
-        argv[1] = hash->uc_name;
-        argv[2] = keystr;
-        argv[3] = NULL;
-
-        envp[0] = "HOME=/";
-        envp[1] = "PATH=/sbin:/usr/sbin";
-        envp[2] = NULL;
-
-        rc = USERMODEHELPER(argv[0], argv, envp);
-        if (rc < 0) {
-                CERROR("%s: error invoking getgroups upcall %s %s %s: rc %d; "
-                       "check /proc/fs/lustre/mds/%s/group_upcall\n",
-                       hash->uc_name, argv[0], argv[1], argv[2], rc, argv[1]);
-        } else {
-                CDEBUG(D_HA, "%s: invoked upcall %s %s %s\n", hash->uc_name,
-                       argv[0], argv[1], argv[2]);
-                rc = 0;
-        }
-        RETURN(rc);
-}
-
-static int entry_set_group_info(struct upcall_cache_entry *entry, __u32 primary,
-                                __u32 ngroups, __u32 *groups)
-{
-        struct group_info *ginfo;
-        int i, j;
-        ENTRY;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,4)
-        if (ngroups > NGROUPS)
-                ngroups = NGROUPS;
-#endif
-
-        if (ngroups > NGROUPS_MAX) {
-                CERROR("using first %d supplementary groups for uid "LPU64"\n",
-                       NGROUPS_MAX, entry->ue_key);
-                ngroups = NGROUPS_MAX;
-        }
-
-        ginfo = groups_alloc(ngroups);
-        if (!ginfo) {
-                CERROR("uid "LPU64" update can't alloc ginfo for %d groups\n",
-                       entry->ue_key, ngroups);
-                RETURN(-ENOMEM);
-        }
-        entry->ue_group_info = ginfo;
-        entry->ue_primary = primary;
-
-        for (i = 0; i < ginfo->nblocks; i++) {
-                int cp_count = min(NGROUPS_PER_BLOCK, (int)ngroups);
-                int off = i * NGROUPS_PER_BLOCK;
-
-                for (j = 0; j < cp_count; j++)
-                        ginfo->blocks[i][j] = groups[off + j];
-
-                ngroups -= cp_count;
-        }
-        RETURN(0);
-}
-
-struct upcall_cache_entry *upcall_cache_get_entry(struct upcall_cache *hash,
-                                                  __u64 key, __u32 primary,
-                                                  __u32 ngroups, __u32 *groups)
-{
-        struct upcall_cache_entry *entry = NULL, *new = NULL, *next;
-        struct list_head *head;
-        wait_queue_t wait;
-        int rc, found;
-        ENTRY;
-
-        LASSERT(hash);
-
-        if (strcmp(hash->uc_upcall, "NONE") == 0) {
-                new = alloc_entry(key);
-                if (!new) {
-                        CERROR("fail to alloc entry\n");
-                        RETURN(NULL);
-                }
-                get_entry(new);
-
-                /* We have to sort the groups for 2.6 kernels */
-                LASSERT(ngroups <= 2);
-                if (ngroups == 2 && groups[1] == -1)
-                        ngroups--;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4)
-                /* 2.6 needs groups array sorted */
-                if (ngroups == 2 && groups[0] > groups[1]) {
-                        __u32 tmp = groups[1];
-                        groups[1] = groups[0];
-                        groups[0] = tmp;
-                }
-#endif
-                if (ngroups > 0 && groups[0] == -1) {
-                        groups[0] = groups[1];
-                        ngroups--;
-                }
-
-                rc = entry_set_group_info(new, primary, ngroups, groups);
-
-                /* We can't cache this entry as it only has a subset of
-                 * the user's groups, as sent in suppgid1, suppgid2. */
-                UC_CACHE_SET_EXPIRED(new);
-                RETURN(new);
-        }
-        head = &hash->uc_hashtable[UC_CACHE_HASH_INDEX(key)];
-find_again:
-        found = 0;
-        spin_lock(&hash->uc_lock);
-        list_for_each_entry_safe(entry, next, head, ue_hash) {
-                /* check invalid & expired items */
-                if (check_unlink_entry(entry))
-                        continue;
-                if (entry->ue_key == key) {
-                        found = 1;
-                        break;
-                }
-        }
-
-        if (!found) { /* didn't find it */
-                if (!new) {
-                        spin_unlock(&hash->uc_lock);
-                        new = alloc_entry(key);
-                        if (!new) {
-                                CERROR("fail to alloc entry\n");
-                                RETURN(ERR_PTR(-ENOMEM));
-                        }
-                        goto find_again;
-                } else {
-                        list_add(&new->ue_hash, head);
-                        entry = new;
-                }
-        } else {
-                if (new) {
-                        free_entry(new);
-                        new = NULL;
-                }
-                list_move(&entry->ue_hash, head);
-        }
-        get_entry(entry);
-
-        /* acquire for new one */
-        if (UC_CACHE_IS_NEW(entry)) {
-                UC_CACHE_SET_ACQUIRING(entry);
-                UC_CACHE_CLEAR_NEW(entry);
-                entry->ue_acquire_expire = jiffies + hash->uc_acquire_expire;
-                spin_unlock(&hash->uc_lock);
-                rc = refresh_entry(hash, entry);
-                spin_lock(&hash->uc_lock);
-                if (rc < 0) {
-                        UC_CACHE_CLEAR_ACQUIRING(entry);
-                        UC_CACHE_SET_INVALID(entry);
-                }
-                /* fall through */
-        }
-        /* someone (and only one) is doing upcall upon
-         * this item, just wait it complete
-         */
-        if (UC_CACHE_IS_ACQUIRING(entry)) {
-                init_waitqueue_entry(&wait, current);
-                add_wait_queue(&entry->ue_waitq, &wait);
-                set_current_state(TASK_INTERRUPTIBLE);
-                spin_unlock(&hash->uc_lock);
-
-                schedule_timeout(hash->uc_acquire_expire);
-
-                spin_lock(&hash->uc_lock);
-                remove_wait_queue(&entry->ue_waitq, &wait);
-                if (UC_CACHE_IS_ACQUIRING(entry)) {
-                        static unsigned long next;
-                        /* we're interrupted or upcall failed in the middle */
-                        if (time_after(jiffies, next)) {
-                                CERROR("acquire timeout exceeded for key "LPU64
-                                       "\n", entry->ue_key);
-                                next = jiffies + 1800;
-                        }
-                        put_entry(entry);
-                        GOTO(out, entry = ERR_PTR(-EIDRM));
-                }
-                /* fall through */
-        }
-
-        /* invalid means error, don't need to try again */
-        if (UC_CACHE_IS_INVALID(entry)) {
-                put_entry(entry);
-                GOTO(out, entry = ERR_PTR(-EIDRM));
-        }
-
-        /* check expired
-         * We can't refresh the existing one because some
-         * memory might be shared by multiple processes.
-         */
-        if (check_unlink_entry(entry)) {
-                /* if expired, try again. but if this entry is
-                 * created by me but too quickly turn to expired
-                 * without any error, should at least give a
-                 * chance to use it once.
-                 */
-                if (entry != new) {
-                        put_entry(entry);
-                        spin_unlock(&hash->uc_lock);
-                        new = NULL;
-                        goto find_again;
-                }
-        }
-
-        /* Now we know it's good */
-out:
-        spin_unlock(&hash->uc_lock);
-        RETURN(entry);
-}
-EXPORT_SYMBOL(upcall_cache_get_entry);
-
-void upcall_cache_put_entry(struct upcall_cache *hash,
-                            struct upcall_cache_entry *entry)
-{
-        ENTRY;
-
-        if (!entry) {
-                EXIT;
-                return;
-        }
-
-        LASSERT(atomic_read(&entry->ue_refcount) > 0);
-        spin_lock(&hash->uc_lock);
-        put_entry(entry);
-        spin_unlock(&hash->uc_lock);
-        EXIT;
-}
-EXPORT_SYMBOL(upcall_cache_put_entry);
-
-int upcall_cache_downcall(struct upcall_cache *hash, __u32 err, __u64 key,
-                          __u32 primary, __u32 ngroups, __u32 *groups)
-{
-        struct upcall_cache_entry *entry = NULL;
-        struct list_head *head;
-        int found = 0, rc = 0;
-        ENTRY;
-
-        LASSERT(hash);
-
-        head = &hash->uc_hashtable[UC_CACHE_HASH_INDEX(key)];
-
-        spin_lock(&hash->uc_lock);
-        list_for_each_entry(entry, head, ue_hash) {
-                if (entry->ue_key == key) {
-                        found = 1;
-                        get_entry(entry);
-                        break;
-                }
-        }
-
-        if (!found) {
-                CDEBUG(D_OTHER, "%s: upcall for key "LPU64" not expected\n",
-                       hash->uc_name, entry->ue_key);
-                /* haven't found, it's possible */
-                spin_unlock(&hash->uc_lock);
-                RETURN(-EINVAL);
-        }
-
-        if (err) {
-                CDEBUG(D_OTHER, "%s: upcall for key "LPU64" returned %d\n",
-                       hash->uc_name, entry->ue_key, err);
-                GOTO(out, rc = -EINVAL);
-        }
-
-        if (!UC_CACHE_IS_ACQUIRING(entry)) {
-                CDEBUG(D_RPCTRACE,"%s: found uptodate entry %p (key "LPU64")\n",
-                       hash->uc_name, entry, entry->ue_key);
-                GOTO(out, rc = 0);
-        }
-
-        if (UC_CACHE_IS_INVALID(entry) || UC_CACHE_IS_EXPIRED(entry)) {
-                CERROR("%s: found a stale entry %p (key "LPU64") in ioctl\n",
-                       hash->uc_name, entry, entry->ue_key);
-                GOTO(out, rc = -EINVAL);
-        }
-
-        spin_unlock(&hash->uc_lock);
-        rc = entry_set_group_info(entry, primary, ngroups, groups);
-        spin_lock(&hash->uc_lock);
-        if (rc)
-                GOTO(out, rc);
-
-        entry->ue_expire = jiffies + hash->uc_entry_expire;
-        UC_CACHE_SET_VALID(entry);
-        CDEBUG(D_OTHER, "%s: created upcall cache entry %p for key "LPU64"\n",
-               hash->uc_name, entry, entry->ue_key);
-out:
-        if (rc) {
-                UC_CACHE_SET_INVALID(entry);
-                list_del_init(&entry->ue_hash);
-        }
-        UC_CACHE_CLEAR_ACQUIRING(entry);
-        spin_unlock(&hash->uc_lock);
-        wake_up_all(&entry->ue_waitq);
-        put_entry(entry);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(upcall_cache_downcall);
-
-static void cache_flush(struct upcall_cache *hash, int force)
-{
-        struct upcall_cache_entry *entry, *next;
-        int i;
-        ENTRY;
-
-        spin_lock(&hash->uc_lock);
-        for (i = 0; i < UC_CACHE_HASH_SIZE; i++) {
-                list_for_each_entry_safe(entry, next,
-                                         &hash->uc_hashtable[i], ue_hash) {
-                        if (!force && atomic_read(&entry->ue_refcount)) {
-                                UC_CACHE_SET_EXPIRED(entry);
-                                continue;
-                        }
-                        LASSERT(!atomic_read(&entry->ue_refcount));
-                        free_entry(entry);
-                }
-        }
-        spin_unlock(&hash->uc_lock);
-        EXIT;
-}
-
-void upcall_cache_flush_idle(struct upcall_cache *cache)
-{
-        cache_flush(cache, 0);
-}
-EXPORT_SYMBOL(upcall_cache_flush_idle);
-
-void upcall_cache_flush_all(struct upcall_cache *cache)
-{
-        cache_flush(cache, 1);
-}
-EXPORT_SYMBOL(upcall_cache_flush_all);
-
-struct upcall_cache *upcall_cache_init(const char *name)
-{
-        struct upcall_cache *hash;
-        int i;
-        ENTRY;
-
-        OBD_ALLOC(hash, sizeof(*hash));
-        if (!hash)
-                RETURN(ERR_PTR(-ENOMEM));
-
-        spin_lock_init(&hash->uc_lock);
-        for (i = 0; i < UC_CACHE_HASH_SIZE; i++)
-                INIT_LIST_HEAD(&hash->uc_hashtable[i]);
-        strncpy(hash->uc_name, name, sizeof(hash->uc_name) - 1);
-        /* set default value, proc tunable */
-        strcpy(hash->uc_upcall, "NONE");
-        hash->uc_entry_expire = 10 * 60 * HZ;
-        hash->uc_acquire_expire = 15 * HZ;
-
-        RETURN(hash);
-}
-EXPORT_SYMBOL(upcall_cache_init);
-
-void upcall_cache_cleanup(struct upcall_cache *hash)
-{
-        if (!hash)
-                return;
-        upcall_cache_flush_all(hash);
-        OBD_FREE(hash, sizeof(*hash));
-}
-EXPORT_SYMBOL(upcall_cache_cleanup);
diff --git a/lustre/mdc/.cvsignore b/lustre/mdc/.cvsignore
deleted file mode 100644
index 5d26f004c3ff3840392e34cb4aaed5287963f9a1..0000000000000000000000000000000000000000
--- a/lustre/mdc/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
diff --git a/lustre/mdc/Makefile.in b/lustre/mdc/Makefile.in
deleted file mode 100644
index b9b97935faa4dec8095d5f478478c354d10de453..0000000000000000000000000000000000000000
--- a/lustre/mdc/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := mdc
-mdc-objs := mdc_request.o mdc_reint.o lproc_mdc.o mdc_lib.o mdc_locks.o
-
-@INCLUDE_RULES@
diff --git a/lustre/mdc/autoMakefile.am b/lustre/mdc/autoMakefile.am
deleted file mode 100644
index e39cc9f4634eeaf7d6d03a4a8c93e6ccd3d50792..0000000000000000000000000000000000000000
--- a/lustre/mdc/autoMakefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if LIBLUSTRE
-noinst_LIBRARIES = libmdc.a
-libmdc_a_SOURCES = mdc_request.c mdc_reint.c mdc_lib.c mdc_internal.h mdc_locks.c
-libmdc_a_CPPFLAGS = $(LLCPPFLAGS)
-libmdc_a_CFLAGS = $(LLCFLAGS)
-endif
-
-if MODULES
-modulefs_DATA = mdc$(KMODEXT)
-endif
-
-DIST_SOURCES = $(mdc-objs:.o=.c) mdc_internal.h
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
diff --git a/lustre/mdc/lproc_mdc.c b/lustre/mdc/lproc_mdc.c
deleted file mode 100644
index dafe84edbd3ee6d2a1632d7677c54d2f5a77b660..0000000000000000000000000000000000000000
--- a/lustre/mdc/lproc_mdc.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#include <linux/vfs.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-
-#ifdef LPROCFS
-
-static int mdc_rd_max_rpcs_in_flight(char *page, char **start, off_t off,
-                                     int count, int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int rc;
-
-        spin_lock(&cli->cl_loi_list_lock);
-        rc = snprintf(page, count, "%u\n", cli->cl_max_rpcs_in_flight);
-        spin_unlock(&cli->cl_loi_list_lock);
-        return rc;
-}
-
-static int mdc_wr_max_rpcs_in_flight(struct file *file, const char *buffer,
-                                     unsigned long count, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < 1 || val > MDC_MAX_RIF_MAX)
-                return -ERANGE;
-
-        spin_lock(&cli->cl_loi_list_lock);
-        cli->cl_max_rpcs_in_flight = val;
-        spin_unlock(&cli->cl_loi_list_lock);
-
-        return count;
-}
-static struct lprocfs_vars lprocfs_mdc_obd_vars[] = {
-        { "uuid",            lprocfs_rd_uuid,        0, 0 },
-        { "ping",            0, lprocfs_wr_ping,        0 },
-        { "connect_flags",   lprocfs_rd_connect_flags, 0, 0 },
-        { "blocksize",       lprocfs_rd_blksize,     0, 0 },
-        { "kbytestotal",     lprocfs_rd_kbytestotal, 0, 0 },
-        { "kbytesfree",      lprocfs_rd_kbytesfree,  0, 0 },
-        { "kbytesavail",     lprocfs_rd_kbytesavail, 0, 0 },
-        { "filestotal",      lprocfs_rd_filestotal,  0, 0 },
-        { "filesfree",       lprocfs_rd_filesfree,   0, 0 },
-        /*{ "filegroups",      lprocfs_rd_filegroups,  0, 0 },*/
-        { "mds_server_uuid", lprocfs_rd_server_uuid, 0, 0 },
-        { "mds_conn_uuid",   lprocfs_rd_conn_uuid,   0, 0 },
-        { "max_rpcs_in_flight", mdc_rd_max_rpcs_in_flight,
-                                mdc_wr_max_rpcs_in_flight, 0 },
-        { "timeouts",        lprocfs_rd_timeouts,    0, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_mdc_module_vars[] = {
-        { "num_refs",        lprocfs_rd_numrefs,     0, 0 },
-        { 0 }
-};
-
-void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_mdc_module_vars;
-    lvars->obd_vars     = lprocfs_mdc_obd_vars;
-}
-#endif /* LPROCFS */
-
diff --git a/lustre/mdc/mdc_internal.h b/lustre/mdc/mdc_internal.h
deleted file mode 100644
index 843bcbe6a1bf1c7e204c74b523765f7a58c3a575..0000000000000000000000000000000000000000
--- a/lustre/mdc/mdc_internal.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- * MDC internal definitions.
- */
-
-#include <lustre_mds.h>
-#ifdef LPROCFS
-void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline void lprocfs_mdc_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-void mdc_pack_req_body(struct ptlrpc_request *req, int offset,
-                       __u64 valid, struct ll_fid *fid, int ea_size, int flags);
-void mdc_pack_rep_body(struct ptlrpc_request *);
-void mdc_readdir_pack(struct ptlrpc_request *req, int offset, __u64 pg_off,
-		      __u32 size, struct ll_fid *mdc_fid);
-void mdc_getattr_pack(struct ptlrpc_request *req, int offset, __u64 valid,
-                      int flags, struct mdc_op_data *data);
-void mdc_setattr_pack(struct ptlrpc_request *req, int offset,
-                      struct mdc_op_data *data,
-                      struct iattr *iattr, void *ea, int ealen,
-                      void *ea2, int ea2len);
-void mdc_create_pack(struct ptlrpc_request *req, int offset,
-                     struct mdc_op_data *op_data, const void *data, int datalen,
-                     __u32 mode, __u32 uid, __u32 gid, __u32 cap_effective,
-                     __u64 rdev);
-void mdc_open_pack(struct ptlrpc_request *req, int offset,
-                   struct mdc_op_data *op_data, __u32 mode, __u64 rdev,
-                   __u32 flags, const void *data, int datalen);
-void mdc_join_pack(struct ptlrpc_request *req, int offset,
-                   struct mdc_op_data *op_data, __u64 head_size);
-void mdc_unlink_pack(struct ptlrpc_request *req, int offset,
-                     struct mdc_op_data *data);
-void mdc_link_pack(struct ptlrpc_request *req, int offset,
-                   struct mdc_op_data *data);
-void mdc_rename_pack(struct ptlrpc_request *req, int offset,
-                     struct mdc_op_data *data,
-                     const char *old, int oldlen, const char *new, int newlen);
-void mdc_close_pack(struct ptlrpc_request *req, int offset, struct obdo *oa,
-                    __u64 valid, struct obd_client_handle *och);
-void mdc_exit_request(struct client_obd *cli);
-void mdc_enter_request(struct client_obd *cli);
-
-struct mdc_open_data {
-        struct obd_client_handle *mod_och;
-        struct ptlrpc_request    *mod_open_req;
-        struct ptlrpc_request    *mod_close_req;
-};
-
-struct mdc_rpc_lock {
-        struct semaphore rpcl_sem;
-        struct lookup_intent *rpcl_it;
-};
-
-static inline void mdc_init_rpc_lock(struct mdc_rpc_lock *lck)
-{
-        sema_init(&lck->rpcl_sem, 1);
-        lck->rpcl_it = NULL;
-}
-
-static inline void mdc_get_rpc_lock(struct mdc_rpc_lock *lck,
-                                    struct lookup_intent *it)
-{
-        ENTRY;
-        if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
-                down(&lck->rpcl_sem);
-                LASSERT(lck->rpcl_it == NULL);
-                lck->rpcl_it = it;
-        }
-}
-
-static inline void mdc_put_rpc_lock(struct mdc_rpc_lock *lck,
-                                    struct lookup_intent *it)
-{
-        if (!it || (it->it_op != IT_GETATTR && it->it_op != IT_LOOKUP)) {
-                LASSERT(it == lck->rpcl_it);
-                lck->rpcl_it = NULL;
-                up(&lck->rpcl_sem);
-        }
-        EXIT;
-}
diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c
deleted file mode 100644
index bb02005ca60648dd324b43c57deb7572e10aeadc..0000000000000000000000000000000000000000
--- a/lustre/mdc/mdc_lib.c
+++ /dev/null
@@ -1,461 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_MDC
-#ifndef __KERNEL__
-# include <fcntl.h>
-# include <liblustre.h>
-#endif
-#include <lustre/lustre_idl.h>
-#include <lustre_net.h>
-#include "mdc_internal.h"
-
-#ifndef __KERNEL__
-/* some liblustre hackings here */
-#ifndef O_DIRECTORY
-#define O_DIRECTORY     0
-#endif
-#endif
-
-void mdc_readdir_pack(struct ptlrpc_request *req, int offset, __u64 pg_off,
-                      __u32 size, struct ll_fid *fid)
-{
-        struct mds_body *b;
-
-        b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b));
-        b->fsuid = current->fsuid;
-        b->fsgid = current->fsgid;
-        b->capability = current->cap_effective;
-        b->fid1 = *fid;
-        b->size = pg_off;                       /* !! */
-        b->suppgid = -1;
-        b->nlink = size;                        /* !! */
-}
-
-static void mdc_pack_body(struct mds_body *b)
-{
-        LASSERT (b != NULL);
-
-        b->fsuid = current->fsuid;
-        b->fsgid = current->fsgid;
-        b->capability = current->cap_effective;
-}
-
-void mdc_pack_req_body(struct ptlrpc_request *req, int offset,
-                       __u64 valid, struct ll_fid *fid, int ea_size, int flags)
-{
-        struct mds_body *b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b));
-
-        if (fid)
-                b->fid1 = *fid;
-        b->valid = valid;
-        b->eadatasize = ea_size;
-        b->flags = flags;
-        mdc_pack_body(b);
-}
-
-/* packing of MDS records */
-void mdc_create_pack(struct ptlrpc_request *req, int offset,
-                     struct mdc_op_data *op_data, const void *data, int datalen,
-                     __u32 mode, __u32 uid, __u32 gid, __u32 cap_effective,
-                     __u64 rdev)
-{
-        struct mds_rec_create *rec;
-        char *tmp;
-        rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec));
-
-        rec->cr_opcode = REINT_CREATE;
-        rec->cr_fsuid = uid;
-        rec->cr_fsgid = gid;
-        rec->cr_cap = cap_effective;
-        rec->cr_fid = op_data->fid1;
-        memset(&rec->cr_replayfid, 0, sizeof(rec->cr_replayfid));
-        rec->cr_mode = mode;
-        rec->cr_rdev = rdev;
-        rec->cr_time = op_data->mod_time;
-        rec->cr_suppgid = op_data->suppgids[0];
-
-        tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, op_data->namelen + 1);
-        LOGL0(op_data->name, op_data->namelen, tmp);
-
-        if (data) {
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, datalen);
-                memcpy (tmp, data, datalen);
-        }
-}
-
-static __u32 mds_pack_open_flags(__u32 flags)
-{
-        __u32 cr_flags = (flags & (FMODE_READ | FMODE_WRITE |
-                                   MDS_OPEN_DELAY_CREATE | MDS_OPEN_HAS_EA |
-                                   MDS_OPEN_HAS_OBJS | MDS_OPEN_OWNEROVERRIDE |
-                                   MDS_OPEN_LOCK));
-        if (flags & O_CREAT)
-                cr_flags |= MDS_OPEN_CREAT;
-        if (flags & O_EXCL)
-                cr_flags |= MDS_OPEN_EXCL;
-        if (flags & O_TRUNC)
-                cr_flags |= MDS_OPEN_TRUNC;
-        if (flags & O_APPEND)
-                cr_flags |= MDS_OPEN_APPEND;
-        if (flags & O_SYNC)
-                cr_flags |= MDS_OPEN_SYNC;
-        if (flags & O_DIRECTORY)
-                cr_flags |= MDS_OPEN_DIRECTORY;
-        if (flags & O_JOIN_FILE)
-                cr_flags |= MDS_OPEN_JOIN_FILE;
-#ifdef FMODE_EXEC
-        if (flags & FMODE_EXEC)
-                cr_flags |= MDS_FMODE_EXEC;
-#endif
-        return cr_flags;
-}
-
-/* packing of MDS records */
-void mdc_join_pack(struct ptlrpc_request *req, int offset,
-                   struct mdc_op_data *op_data, __u64 head_size)
-{
-        struct mds_rec_join *rec;
-
-        rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*rec));
-        LASSERT(rec != NULL);
-        rec->jr_fid = op_data->fid2;
-        rec->jr_headsize = head_size;
-}
-
-void mdc_open_pack(struct ptlrpc_request *req, int offset,
-                   struct mdc_op_data *op_data, __u32 mode, __u64 rdev,
-                   __u32 flags, const void *lmm, int lmmlen)
-{
-        struct mds_rec_create *rec;
-        char *tmp;
-        rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec));
-
-        /* XXX do something about time, uid, gid */
-        rec->cr_opcode = REINT_OPEN;
-        rec->cr_fsuid = current->fsuid;
-        rec->cr_fsgid = current->fsgid;
-        rec->cr_cap = current->cap_effective;
-        rec->cr_fid = op_data->fid1;
-        memset(&rec->cr_replayfid, 0, sizeof(rec->cr_replayfid));
-        rec->cr_mode = mode;
-        rec->cr_flags = mds_pack_open_flags(flags);
-        rec->cr_rdev = rdev;
-        rec->cr_time = op_data->mod_time;
-        rec->cr_suppgid = op_data->suppgids[0];
-
-        if (op_data->name) {
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1,
-                                     op_data->namelen + 1);
-                LOGL0(op_data->name, op_data->namelen, tmp);
-        }
-
-        if (lmm) {
-                rec->cr_flags |= MDS_OPEN_HAS_EA;
-#ifndef __KERNEL__
-                /*XXX a hack for liblustre to set EA (LL_IOC_LOV_SETSTRIPE) */
-                rec->cr_replayfid = op_data->fid2;
-#endif
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, lmmlen);
-                memcpy (tmp, lmm, lmmlen);
-        }
-}
-
-static inline __u64 attr_pack(unsigned int ia_valid) {
-        __u64 sa_valid = 0;
-
-        if (ia_valid & ATTR_MODE)
-                sa_valid |= MDS_ATTR_MODE;
-        if (ia_valid & ATTR_UID)
-                sa_valid |= MDS_ATTR_UID;
-        if (ia_valid & ATTR_GID)
-                sa_valid |= MDS_ATTR_GID;
-        if (ia_valid & ATTR_SIZE)
-                sa_valid |= MDS_ATTR_SIZE;
-        if (ia_valid & ATTR_ATIME)
-                sa_valid |= MDS_ATTR_ATIME;
-        if (ia_valid & ATTR_MTIME)
-                sa_valid |= MDS_ATTR_MTIME;
-        if (ia_valid & ATTR_CTIME)
-                sa_valid |= MDS_ATTR_CTIME;
-        if (ia_valid & ATTR_ATIME_SET)
-                sa_valid |= MDS_ATTR_ATIME_SET;
-        if (ia_valid & ATTR_MTIME_SET)
-                sa_valid |= MDS_ATTR_MTIME_SET;
-        if (ia_valid & ATTR_FORCE)
-                sa_valid |= MDS_ATTR_FORCE;
-        if (ia_valid & ATTR_ATTR_FLAG)
-                sa_valid |= MDS_ATTR_ATTR_FLAG;
-        if (ia_valid & ATTR_KILL_SUID)
-                sa_valid |=  MDS_ATTR_KILL_SUID;
-        if (ia_valid & ATTR_KILL_SGID)
-                sa_valid |= MDS_ATTR_KILL_SGID;
-        if (ia_valid & ATTR_CTIME_SET)
-                sa_valid |= MDS_ATTR_CTIME_SET;
-        if (ia_valid & ATTR_FROM_OPEN)
-                sa_valid |= MDS_ATTR_FROM_OPEN;
-        if (ia_valid & MDS_OPEN_OWNEROVERRIDE)
-                /* NFSD hack (see bug 5781) */
-                sa_valid |= MDS_OPEN_OWNEROVERRIDE;
-        return sa_valid;
-}
-
-void mdc_setattr_pack(struct ptlrpc_request *req, int offset,
-                      struct mdc_op_data *data, struct iattr *iattr, void *ea,
-                      int ealen, void *ea2, int ea2len)
-{
-        struct mds_rec_setattr *rec = lustre_msg_buf(req->rq_reqmsg, offset,
-                                                     sizeof(*rec));
-        rec->sa_opcode = REINT_SETATTR;
-        rec->sa_fsuid = current->fsuid;
-        rec->sa_fsgid = current->fsgid;
-        rec->sa_cap = current->cap_effective;
-        rec->sa_fid = data->fid1;
-        rec->sa_suppgid = -1;
-
-        if (iattr) {
-                rec->sa_valid = attr_pack(iattr->ia_valid);
-                rec->sa_mode = iattr->ia_mode;
-                rec->sa_uid = iattr->ia_uid;
-                rec->sa_gid = iattr->ia_gid;
-                rec->sa_size = iattr->ia_size;
-                rec->sa_atime = LTIME_S(iattr->ia_atime);
-                rec->sa_mtime = LTIME_S(iattr->ia_mtime);
-                rec->sa_ctime = LTIME_S(iattr->ia_ctime);
-                rec->sa_attr_flags =
-                               ((struct ll_iattr_struct *)iattr)->ia_attr_flags;
-                if ((iattr->ia_valid & ATTR_GID) && in_group_p(iattr->ia_gid))
-                        rec->sa_suppgid = iattr->ia_gid;
-                else
-                        rec->sa_suppgid = data->suppgids[0];
-        }
-
-        if (ealen == 0)
-                return;
-
-        memcpy(lustre_msg_buf(req->rq_reqmsg, offset + 1, ealen), ea, ealen);
-
-        if (ea2len == 0)
-                return;
-
-        memcpy(lustre_msg_buf(req->rq_reqmsg, offset + 2, ea2len), ea2, ea2len);
-}
-
-void mdc_unlink_pack(struct ptlrpc_request *req, int offset,
-                     struct mdc_op_data *data)
-{
-        struct mds_rec_unlink *rec;
-        char *tmp;
-
-        rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec));
-        LASSERT (rec != NULL);
-
-        rec->ul_opcode = REINT_UNLINK;
-        rec->ul_fsuid = current->fsuid;
-        rec->ul_fsgid = current->fsgid;
-        rec->ul_cap = current->cap_effective;
-        rec->ul_mode = data->create_mode;
-        rec->ul_suppgid = data->suppgids[0];
-        rec->ul_fid1 = data->fid1;
-        rec->ul_fid2 = data->fid2;
-        rec->ul_time = data->mod_time;
-
-        tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, data->namelen + 1);
-        LASSERT (tmp != NULL);
-        LOGL0(data->name, data->namelen, tmp);
-}
-
-void mdc_link_pack(struct ptlrpc_request *req, int offset,
-                   struct mdc_op_data *data)
-{
-        struct mds_rec_link *rec;
-        char *tmp;
-
-        rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec));
-
-        rec->lk_opcode = REINT_LINK;
-        rec->lk_fsuid = current->fsuid;
-        rec->lk_fsgid = current->fsgid;
-        rec->lk_cap = current->cap_effective;
-        rec->lk_suppgid1 = data->suppgids[0];
-        rec->lk_suppgid2 = data->suppgids[1];
-        rec->lk_fid1 = data->fid1;
-        rec->lk_fid2 = data->fid2;
-        rec->lk_time = data->mod_time;
-
-        tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, data->namelen + 1);
-        LOGL0(data->name, data->namelen, tmp);
-}
-
-void mdc_rename_pack(struct ptlrpc_request *req, int offset,
-                     struct mdc_op_data *data,
-                     const char *old, int oldlen, const char *new, int newlen)
-{
-        struct mds_rec_rename *rec;
-        char *tmp;
-
-        rec = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*rec));
-
-        /* XXX do something about time, uid, gid */
-        rec->rn_opcode = REINT_RENAME;
-        rec->rn_fsuid = current->fsuid;
-        rec->rn_fsgid = current->fsgid;
-        rec->rn_cap = current->cap_effective;
-        rec->rn_suppgid1 = data->suppgids[0];
-        rec->rn_suppgid2 = data->suppgids[1];
-        rec->rn_fid1 = data->fid1;
-        rec->rn_fid2 = data->fid2;
-        rec->rn_time = data->mod_time;
-
-        tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1, oldlen + 1);
-        LOGL0(old, oldlen, tmp);
-
-        if (new) {
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset + 2, newlen + 1);
-                LOGL0(new, newlen, tmp);
-        }
-}
-
-void mdc_getattr_pack(struct ptlrpc_request *req, int offset, __u64 valid,
-                      int flags, struct mdc_op_data *data)
-{
-        struct mds_body *b;
-        b = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*b));
-
-        b->fsuid = current->fsuid;
-        b->fsgid = current->fsgid;
-        b->capability = current->cap_effective;
-        b->valid = valid;
-        b->flags = flags | MDS_BFLAG_EXT_FLAGS;
-        /* skip MDS_BFLAG_EXT_FLAGS to verify the "client < 1.4.7" case 
-         * refer to bug 12848.
-         */
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDC_OLD_EXT_FLAGS))
-                b->flags &= ~MDS_BFLAG_EXT_FLAGS;
-        b->suppgid = data->suppgids[0];
-
-        b->fid1 = data->fid1;
-        b->fid2 = data->fid2;
-        if (data->name) {
-                char *tmp;
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset + 1,
-                                     data->namelen + 1);
-                memcpy(tmp, data->name, data->namelen);
-                data->name = tmp;
-        }
-}
-
-void mdc_close_pack(struct ptlrpc_request *req, int offset, struct obdo *oa,
-                    __u64 valid, struct obd_client_handle *och)
-{
-        struct mds_body *body;
-
-        body = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*body));
-
-        mdc_pack_fid(&body->fid1, oa->o_id, 0, oa->o_mode);
-        memcpy(&body->handle, &och->och_fh, sizeof(body->handle));
-        if (oa->o_valid & OBD_MD_FLATIME) {
-                body->atime = oa->o_atime;
-                body->valid |= OBD_MD_FLATIME;
-        }
-        if (oa->o_valid & OBD_MD_FLMTIME) {
-                body->mtime = oa->o_mtime;
-                body->valid |= OBD_MD_FLMTIME;
-        }
-        if (oa->o_valid & OBD_MD_FLCTIME) {
-                body->ctime = oa->o_ctime;
-                body->valid |= OBD_MD_FLCTIME;
-        }
-        if (oa->o_valid & OBD_MD_FLSIZE) {
-                body->size = oa->o_size;
-                body->valid |= OBD_MD_FLSIZE;
-        }
-        if (oa->o_valid & OBD_MD_FLBLOCKS) {
-                body->blocks = oa->o_blocks;
-                body->valid |= OBD_MD_FLBLOCKS;
-        }
-        if (oa->o_valid & OBD_MD_FLFLAGS) {
-                body->flags = oa->o_flags;
-                body->valid |= OBD_MD_FLFLAGS;
-        }
-}
-
-struct mdc_cache_waiter {       
-        struct list_head        mcw_entry;
-        wait_queue_head_t       mcw_waitq;
-};
-
-static int mdc_req_avail(struct client_obd *cli, struct mdc_cache_waiter *mcw)
-{
-        int rc;
-        ENTRY;
-        spin_lock(&cli->cl_loi_list_lock);
-        rc = list_empty(&mcw->mcw_entry);
-        spin_unlock(&cli->cl_loi_list_lock);
-        RETURN(rc);
-};
-
-/* We record requests in flight in cli->cl_r_in_flight here.
- * There is only one write rpc possible in mdc anyway. If this to change
- * in the future - the code may need to be revisited. */
-void mdc_enter_request(struct client_obd *cli)
-{
-        struct mdc_cache_waiter mcw;
-        struct l_wait_info lwi = { 0 };
-
-        spin_lock(&cli->cl_loi_list_lock);
-        if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) {
-                list_add_tail(&mcw.mcw_entry, &cli->cl_cache_waiters);
-                init_waitqueue_head(&mcw.mcw_waitq);
-                spin_unlock(&cli->cl_loi_list_lock);
-                l_wait_event(mcw.mcw_waitq, mdc_req_avail(cli, &mcw), &lwi);
-        } else {
-                cli->cl_r_in_flight++;
-                spin_unlock(&cli->cl_loi_list_lock);
-        }
-}
-
-void mdc_exit_request(struct client_obd *cli)
-{
-        struct list_head *l, *tmp;
-        struct mdc_cache_waiter *mcw;
-
-        spin_lock(&cli->cl_loi_list_lock);
-        cli->cl_r_in_flight--;
-
-        list_for_each_safe(l, tmp, &cli->cl_cache_waiters) {
-                if (cli->cl_r_in_flight >= cli->cl_max_rpcs_in_flight) {
-                        /* No free request slots anymore */
-                        break;
-                }
-
-                mcw = list_entry(l, struct mdc_cache_waiter, mcw_entry);
-                list_del_init(&mcw->mcw_entry);
-                cli->cl_r_in_flight++;
-                wake_up(&mcw->mcw_waitq);
-        }
-        /* Empty waiting list? Decrease reqs in-flight number */
-
-        spin_unlock(&cli->cl_loi_list_lock);
-}
diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c
deleted file mode 100644
index 91d923d9e8acbcdbd88a23ceec9ddf5839a11011..0000000000000000000000000000000000000000
--- a/lustre/mdc/mdc_locks.c
+++ /dev/null
@@ -1,906 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDC
-
-#ifdef __KERNEL__
-# include <linux/module.h>
-# include <linux/pagemap.h>
-# include <linux/miscdevice.h>
-# include <linux/init.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include "mdc_internal.h"
-
-int it_disposition(struct lookup_intent *it, int flag)
-{
-        return it->d.lustre.it_disposition & flag;
-}
-EXPORT_SYMBOL(it_disposition);
-
-void it_set_disposition(struct lookup_intent *it, int flag)
-{
-        it->d.lustre.it_disposition |= flag;
-}
-EXPORT_SYMBOL(it_set_disposition);
-
-void it_clear_disposition(struct lookup_intent *it, int flag)
-{
-        it->d.lustre.it_disposition &= ~flag;
-}
-EXPORT_SYMBOL(it_clear_disposition);
-
-int it_open_error(int phase, struct lookup_intent *it)
-{
-        if (it_disposition(it, DISP_OPEN_OPEN)) {
-                if (phase >= DISP_OPEN_OPEN)
-                        return it->d.lustre.it_status;
-                else
-                        return 0;
-        }
-
-        if (it_disposition(it, DISP_OPEN_CREATE)) {
-                if (phase >= DISP_OPEN_CREATE)
-                        return it->d.lustre.it_status;
-                else
-                        return 0;
-        }
-
-        if (it_disposition(it, DISP_LOOKUP_EXECD)) {
-                if (phase >= DISP_LOOKUP_EXECD)
-                        return it->d.lustre.it_status;
-                else
-                        return 0;
-        }
-
-        if (it_disposition(it, DISP_IT_EXECD)) {
-                if (phase >= DISP_IT_EXECD)
-                        return it->d.lustre.it_status;
-                else
-                        return 0;
-        }
-        CERROR("it disp: %X, status: %d\n", it->d.lustre.it_disposition,
-               it->d.lustre.it_status);
-        LBUG();
-        return 0;
-}
-EXPORT_SYMBOL(it_open_error);
-
-/* this must be called on a lockh that is known to have a referenced lock */
-void mdc_set_lock_data(__u64 *l, void *data)
-{
-        struct ldlm_lock *lock;
-        struct lustre_handle *lockh = (struct lustre_handle *)l;
-        ENTRY;
-
-        if (!*l) {
-                EXIT;
-                return;
-        }
-
-        lock = ldlm_handle2lock(lockh);
-
-        LASSERT(lock != NULL);
-        lock_res_and_lock(lock);
-#ifdef __KERNEL__
-        if (lock->l_ast_data && lock->l_ast_data != data) {
-                struct inode *new_inode = data;
-                struct inode *old_inode = lock->l_ast_data;
-                LASSERTF(old_inode->i_state & I_FREEING,
-                         "Found existing inode %p/%lu/%u state %lu in lock: "
-                         "setting data to %p/%lu/%u\n", old_inode,
-                         old_inode->i_ino, old_inode->i_generation,
-                         old_inode->i_state,
-                         new_inode, new_inode->i_ino, new_inode->i_generation);
-        }
-#endif
-        lock->l_ast_data = data;
-        unlock_res_and_lock(lock);
-        LDLM_LOCK_PUT(lock);
-
-        EXIT;
-}
-EXPORT_SYMBOL(mdc_set_lock_data);
-
-int mdc_change_cbdata(struct obd_export *exp, struct ll_fid *fid, 
-                      ldlm_iterator_t it, void *data)
-{
-        struct ldlm_res_id res_id = { .name = {0} };
-        ENTRY;
-
-        res_id.name[0] = fid->id;
-        res_id.name[1] = fid->generation;
-
-        ldlm_resource_iterate(class_exp2obd(exp)->obd_namespace, &res_id,
-                              it, data);
-
-        EXIT;
-        return 0;
-}
-
-static inline void mdc_clear_replay_flag(struct ptlrpc_request *req, int rc)
-{
-        /* Don't hold error requests for replay. */
-        if (req->rq_replay) {
-                spin_lock(&req->rq_lock);
-                req->rq_replay = 0;
-                spin_unlock(&req->rq_lock);
-        }
-        if (rc && req->rq_transno != 0) {
-                DEBUG_REQ(D_ERROR, req, "transno returned on error rc %d", rc);
-                LBUG();
-        }
-}
-
-static int round_up(int val)
-{
-        int ret = 1;
-        while (val) {
-                val >>= 1;
-                ret <<= 1;
-        }
-        return ret;
-}
-
-/* Save a large LOV EA into the request buffer so that it is available
- * for replay.  We don't do this in the initial request because the
- * original request doesn't need this buffer (at most it sends just the
- * lov_mds_md) and it is a waste of RAM/bandwidth to send the empty
- * buffer and may also be difficult to allocate and save a very large
- * request buffer for each open. (bug 5707)
- *
- * OOM here may cause recovery failure if lmm is needed (only for the
- * original open if the MDS crashed just when this client also OOM'd)
- * but this is incredibly unlikely, and questionable whether the client
- * could do MDS recovery under OOM anyways... */
-static void mdc_realloc_openmsg(struct ptlrpc_request *req,
-                                struct mds_body *body)
-{
-        int old_len, new_size, old_size;
-        struct lustre_msg *old_msg = req->rq_reqmsg;
-        struct lustre_msg *new_msg;
-
-        old_len = lustre_msg_buflen(old_msg, DLM_INTENT_REC_OFF + 2);
-        old_size = lustre_packed_msg_size(old_msg);
-        lustre_msg_set_buflen(old_msg, DLM_INTENT_REC_OFF + 2,
-                              body->eadatasize);
-        new_size = lustre_packed_msg_size(old_msg);
-
-        OBD_ALLOC(new_msg, new_size);
-        if (new_msg != NULL) {
-                DEBUG_REQ(D_INFO, req, "replace reqmsg for larger EA %u\n",
-                          body->eadatasize);
-                memcpy(new_msg, old_msg, old_size);
-
-                spin_lock(&req->rq_lock);
-                req->rq_reqmsg = new_msg;
-                req->rq_reqlen = new_size;
-                spin_unlock(&req->rq_lock);
-
-                OBD_FREE(old_msg, old_size);
-        } else {
-                lustre_msg_set_buflen(old_msg, DLM_INTENT_REC_OFF + 2, old_len);
-                body->valid &= ~OBD_MD_FLEASIZE;
-                body->eadatasize = 0;
-        }
-}
-
-static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp,
-                                                   struct lookup_intent *it,
-                                                   struct mdc_op_data *data,
-                                                   void *lmm, int lmmsize)
-{
-        struct ptlrpc_request *req;
-        struct ldlm_intent *lit;
-        struct obd_device *obddev = class_exp2obd(exp);
-        int size[7] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(struct ldlm_request),
-                        [DLM_INTENT_IT_OFF]   = sizeof(*lit),
-                        [DLM_INTENT_REC_OFF]  = sizeof(struct mds_rec_create),
-                        [DLM_INTENT_REC_OFF+1]= data->namelen + 1,
-                        /* As an optimization, we allocate an RPC request buffer
-                         * for at least a default-sized LOV EA even if we aren't
-                         * sending one.  We grow the whole request to the next
-                         * power-of-two size since we get that much from a slab
-                         * allocation anyways. This avoids an allocation below
-                         * in the common case where we need to save a
-                         * default-sized LOV EA for open replay. */
-                        [DLM_INTENT_REC_OFF+2]= max(lmmsize,
-                                         obddev->u.cli.cl_default_mds_easize) };
-        int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                           [DLM_LOCKREPLY_OFF]   = sizeof(struct ldlm_reply),
-                           [DLM_REPLY_REC_OFF]   = sizeof(struct mds_body),
-                           [DLM_REPLY_REC_OFF+1] = obddev->u.cli.
-                                                        cl_max_mds_easize,
-                           [DLM_REPLY_REC_OFF+2] = LUSTRE_POSIX_ACL_MAX_SIZE };
-        CFS_LIST_HEAD(cancels);
-        int do_join = (it->it_flags & O_JOIN_FILE) && data->data;
-        int count = 0;
-        int mode;
-        int rc;
-
-        it->it_create_mode |= S_IFREG;
-
-        rc = lustre_msg_size(class_exp2cliimp(exp)->imp_msg_magic, 6, size);
-        if (rc & (rc - 1))
-                size[DLM_INTENT_REC_OFF + 2] =
-                         min(size[DLM_INTENT_REC_OFF + 2] + round_up(rc) - rc,
-                                     obddev->u.cli.cl_max_mds_easize);
-
-                /* If inode is known, cancel conflicting OPEN locks. */
-        if (data->fid2.id) {
-                if (it->it_flags & (FMODE_WRITE|MDS_OPEN_TRUNC))
-                        mode = LCK_CW;
-#ifdef FMODE_EXEC
-                else if (it->it_flags & FMODE_EXEC)
-                        mode = LCK_PR;
-#endif
-                else
-                        mode = LCK_CR;
-                count = mdc_resource_get_unused(exp, &data->fid2, &cancels,
-                                                mode, MDS_INODELOCK_OPEN);
-        }
-
-        /* If CREATE or JOIN_FILE, cancel parent's UPDATE lock. */
-        if (it->it_op & IT_CREAT || do_join)
-                mode = LCK_EX;
-        else
-                mode = LCK_CR;
-        count += mdc_resource_get_unused(exp, &data->fid1, &cancels, mode,
-                                         MDS_INODELOCK_UPDATE);
-        if (do_join) {
-                __u64 head_size = (*(__u64 *)data->data);
-                        /* join is like an unlink of the tail */
-                size[DLM_INTENT_REC_OFF + 3] = sizeof(struct mds_rec_join);
-                req = ldlm_prep_enqueue_req(exp, 7, size, &cancels, count);
-                if (req)
-                        mdc_join_pack(req, DLM_INTENT_REC_OFF + 3, data, 
-                                      head_size);
-        } else {
-                req = ldlm_prep_enqueue_req(exp, 6, size, &cancels, count);
-                it->it_flags &= ~O_JOIN_FILE;
-        }
-
-        if (req) {
-                spin_lock(&req->rq_lock);
-                req->rq_replay = 1;
-                spin_unlock(&req->rq_lock);
-
-                /* pack the intent */
-                lit = lustre_msg_buf(req->rq_reqmsg, DLM_INTENT_IT_OFF,
-                                     sizeof(*lit));
-                lit->opc = (__u64)it->it_op;
-
-                /* pack the intended request */
-                mdc_open_pack(req, DLM_INTENT_REC_OFF, data,
-                              it->it_create_mode, 0, it->it_flags,
-                              lmm, lmmsize);
-
-                ptlrpc_req_set_repsize(req, 5, repsize);
-        }
-        return req;
-}
-
-static struct ptlrpc_request *mdc_intent_unlink_pack(struct obd_export *exp,
-                                                     struct lookup_intent *it,
-                                                     struct mdc_op_data *data)
-{
-        struct ptlrpc_request *req;
-        struct ldlm_intent *lit;
-        struct obd_device *obddev = class_exp2obd(exp);
-        int size[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(struct ldlm_request),
-                        [DLM_INTENT_IT_OFF]   = sizeof(*lit),
-                        [DLM_INTENT_REC_OFF]  = sizeof(struct mds_rec_unlink),
-                        [DLM_INTENT_REC_OFF+1]= data->namelen + 1 };
-        int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                           [DLM_LOCKREPLY_OFF]   = sizeof(struct ldlm_reply),
-                           [DLM_REPLY_REC_OFF]   = sizeof(struct mds_body),
-                           [DLM_REPLY_REC_OFF+1] = obddev->u.cli.
-                                                        cl_max_mds_easize,
-                           [DLM_REPLY_REC_OFF+2] = obddev->u.cli.
-                                                        cl_max_mds_cookiesize };
-
-        req = ldlm_prep_enqueue_req(exp, 5, size, NULL, 0);
-        if (req) {
-                /* pack the intent */
-                lit = lustre_msg_buf(req->rq_reqmsg, DLM_INTENT_IT_OFF,
-                                     sizeof(*lit));
-                lit->opc = (__u64)it->it_op;
-
-                /* pack the intended request */
-                mdc_unlink_pack(req, DLM_INTENT_REC_OFF, data);
-
-                ptlrpc_req_set_repsize(req, 5, repsize);
-        }
-        return req;
-}
-
-static struct ptlrpc_request *mdc_intent_lookup_pack(struct obd_export *exp,
-                                                     struct lookup_intent *it,
-                                                     struct mdc_op_data *data)
-{
-        struct ptlrpc_request *req;
-        struct ldlm_intent *lit;
-        struct obd_device *obddev = class_exp2obd(exp);
-        int size[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(struct ldlm_request),
-                        [DLM_INTENT_IT_OFF]   = sizeof(*lit),
-                        [DLM_INTENT_REC_OFF]  = sizeof(struct mds_body),
-                        [DLM_INTENT_REC_OFF+1]= data->namelen + 1 };
-        int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                           [DLM_LOCKREPLY_OFF]   = sizeof(struct ldlm_reply),
-                           [DLM_REPLY_REC_OFF]   = sizeof(struct mds_body),
-                           [DLM_REPLY_REC_OFF+1] = obddev->u.cli.
-                                                        cl_max_mds_easize,
-                           [DLM_REPLY_REC_OFF+2] = LUSTRE_POSIX_ACL_MAX_SIZE };
-        obd_valid valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE | OBD_MD_FLACL |
-                          OBD_MD_FLMODEASIZE | OBD_MD_FLDIREA;
-
-                req = ldlm_prep_enqueue_req(exp, 5, size, NULL, 0);
-        if (req) {
-                /* pack the intent */
-                lit = lustre_msg_buf(req->rq_reqmsg, DLM_INTENT_IT_OFF,
-                                     sizeof(*lit));
-                lit->opc = (__u64)it->it_op;
-
-                /* pack the intended request */
-                mdc_getattr_pack(req, DLM_INTENT_REC_OFF, valid, it->it_flags,
-                                 data);
-                ptlrpc_req_set_repsize(req, 5, repsize);
-        }
-        return req;
-}
-
-static struct ptlrpc_request *mdc_intent_readdir_pack(struct obd_export *exp)
-{
-        struct ptlrpc_request *req;
-        int size[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(struct ldlm_request) };
-        int repsize[2] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                           [DLM_LOCKREPLY_OFF]   = sizeof(struct ldlm_reply) };
-
-        req = ldlm_prep_enqueue_req(exp, 2, size, NULL, 0);
-        if (req)
-                ptlrpc_req_set_repsize(req, 2, repsize);
-        return req;
-}
-
-static int mdc_finish_enqueue(struct obd_export *exp,
-                              struct ptlrpc_request *req,
-                              struct ldlm_enqueue_info *einfo,
-                              struct lookup_intent *it,
-                              struct lustre_handle *lockh,
-                              int rc)
-{
-        struct ldlm_request *lockreq;
-        struct ldlm_reply *lockrep;
-        ENTRY;
-
-        LASSERT(rc >= 0);
-        /* Similarly, if we're going to replay this request, we don't want to
-         * actually get a lock, just perform the intent. */
-        if (req->rq_transno || req->rq_replay) {
-                lockreq = lustre_msg_buf(req->rq_reqmsg, DLM_LOCKREQ_OFF,
-                                         sizeof(*lockreq));
-                lockreq->lock_flags |= LDLM_FL_INTENT_ONLY;
-        }
-
-        if (rc == ELDLM_LOCK_ABORTED) {
-                einfo->ei_mode = 0;
-                memset(lockh, 0, sizeof(*lockh));
-                rc = 0;
-        } else { /* rc = 0 */
-                struct ldlm_lock *lock = ldlm_handle2lock(lockh);
-                LASSERT(lock);
-
-                /* If the server gave us back a different lock mode, we should
-                 * fix up our variables. */
-                if (lock->l_req_mode != einfo->ei_mode) {
-                        ldlm_lock_addref(lockh, lock->l_req_mode);
-                        ldlm_lock_decref(lockh, einfo->ei_mode);
-                        einfo->ei_mode = lock->l_req_mode;
-                }
-                LDLM_LOCK_PUT(lock);
-        }
-
-        lockrep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF,
-                                 sizeof(*lockrep));
-        LASSERT(lockrep != NULL);                 /* checked by ldlm_cli_enqueue() */
-        /* swabbed by ldlm_cli_enqueue() */
-        LASSERT(lustre_rep_swabbed(req, DLM_LOCKREPLY_OFF));
-
-        it->d.lustre.it_disposition = (int)lockrep->lock_policy_res1;
-        it->d.lustre.it_status = (int)lockrep->lock_policy_res2;
-        it->d.lustre.it_lock_mode = einfo->ei_mode;
-        it->d.lustre.it_data = req;
-
-        if (it->d.lustre.it_status < 0 && req->rq_replay)
-                mdc_clear_replay_flag(req, it->d.lustre.it_status);
-
-        /* If we're doing an IT_OPEN which did not result in an actual
-         * successful open, then we need to remove the bit which saves
-         * this request for unconditional replay.
-         *
-         * It's important that we do this first!  Otherwise we might exit the
-         * function without doing so, and try to replay a failed create
-         * (bug 3440) */
-        if ((it->it_op & IT_OPEN) &&
-            req->rq_replay &&
-            (!it_disposition(it, DISP_OPEN_OPEN) ||
-             it->d.lustre.it_status != 0))
-                mdc_clear_replay_flag(req, it->d.lustre.it_status);
-
-        DEBUG_REQ(D_RPCTRACE, req, "op: %d disposition: %x, status: %d",
-                  it->it_op,it->d.lustre.it_disposition,it->d.lustre.it_status);
-
-        /* We know what to expect, so we do any byte flipping required here */
-        if (it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR)) {
-                struct mds_body *body;
-
-                body = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF, sizeof(*body),
-                                         lustre_swab_mds_body);
-                if (body == NULL) {
-                        CERROR ("Can't swab mds_body\n");
-                        RETURN (-EPROTO);
-                }
-
-                /* If this is a successful OPEN request, we need to set
-                   replay handler and data early, so that if replay happens
-                   immediately after swabbing below, new reply is swabbed
-                   by that handler correctly */
-                if (it_disposition(it, DISP_OPEN_OPEN) &&
-                    !it_open_error(DISP_OPEN_OPEN, it))
-                        mdc_set_open_replay_data(NULL, req);
-
-                if ((body->valid & OBD_MD_FLEASIZE) != 0) {
-                        void *eadata;
-
-                        /* The eadata is opaque; just check that it is there.
-                         * Eventually, obd_unpackmd() will check the contents */
-                        eadata = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF + 1,
-                                                    body->eadatasize, NULL);
-                        if (eadata == NULL) {
-                                CERROR ("Missing/short eadata\n");
-                                RETURN (-EPROTO);
-                        }
-                        if (body->valid & OBD_MD_FLMODEASIZE) {
-                                struct obd_device *obddev = class_exp2obd(exp);
-
-                                if (obddev->u.cli.cl_max_mds_easize < 
-                                                        body->max_mdsize) {
-                                        obddev->u.cli.cl_max_mds_easize = 
-                                                body->max_mdsize;
-                                        CDEBUG(D_INFO, "maxeasize become %d\n",
-                                               body->max_mdsize);
-                                }
-                                if (obddev->u.cli.cl_max_mds_cookiesize <
-                                                        body->max_cookiesize) {
-                                        obddev->u.cli.cl_max_mds_cookiesize =
-                                                body->max_cookiesize;
-                                        CDEBUG(D_INFO, "cookiesize become %d\n",
-                                               body->max_cookiesize);
-                                }
-                        }
-                        /* We save the reply LOV EA in case we have to replay
-                         * a create for recovery.  If we didn't allocate a
-                         * large enough request buffer above we need to
-                         * reallocate it here to hold the actual LOV EA. */
-                        if (it->it_op & IT_OPEN) {
-                                int offset = DLM_INTENT_REC_OFF + 2;
-                                void *lmm;
-
-                                if (lustre_msg_buflen(req->rq_reqmsg, offset) <
-                                    body->eadatasize)
-                                        mdc_realloc_openmsg(req, body);
-
-                                lmm = lustre_msg_buf(req->rq_reqmsg, offset,
-                                                     body->eadatasize);
-                                if (lmm)
-                                        memcpy(lmm, eadata, body->eadatasize);
-                        }
-                }
-        }
-
-        RETURN(rc);
-}
-
-/* We always reserve enough space in the reply packet for a stripe MD, because
- * we don't know in advance the file type. */
-int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
-                struct lookup_intent *it, struct mdc_op_data *data,
-                struct lustre_handle *lockh, void *lmm, int lmmsize,
-                int extra_lock_flags)
-{
-        struct ptlrpc_request *req;
-        struct obd_device *obddev = class_exp2obd(exp);
-        struct ldlm_res_id res_id =
-                { .name = {data->fid1.id, data->fid1.generation} };
-        ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_LOOKUP } };
-        int flags = extra_lock_flags | LDLM_FL_HAS_INTENT;
-        int rc;
-        ENTRY;
-
-        LASSERTF(einfo->ei_type == LDLM_IBITS,"lock type %d\n", einfo->ei_type);
-        if (it->it_op & (IT_UNLINK | IT_GETATTR | IT_READDIR))
-                policy.l_inodebits.bits = MDS_INODELOCK_UPDATE;
-
-        if (it->it_op & IT_OPEN) {
-                req = mdc_intent_open_pack(exp, it, data, lmm, lmmsize);
-                if (it->it_flags & O_JOIN_FILE) {
-                        policy.l_inodebits.bits = MDS_INODELOCK_UPDATE;
-                }
-        } else if (it->it_op & IT_UNLINK) {
-                req = mdc_intent_unlink_pack(exp, it, data);
-        } else if (it->it_op & (IT_GETATTR | IT_LOOKUP)) {
-                req = mdc_intent_lookup_pack(exp, it, data);
-        } else if (it->it_op == IT_READDIR) {
-                req = mdc_intent_readdir_pack(exp);
-        } else {
-                CERROR("bad it_op %x\n", it->it_op);
-                RETURN(-EINVAL);
-        }
-
-        if (!req)
-                RETURN(-ENOMEM);
-
-         /* It is important to obtain rpc_lock first (if applicable), so that
-          * threads that are serialised with rpc_lock are not polluting our
-          * rpcs in flight counter */
-        mdc_get_rpc_lock(obddev->u.cli.cl_rpc_lock, it);
-        mdc_enter_request(&obddev->u.cli);
-        rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, &policy, &flags, NULL,
-                              0, NULL, lockh, 0);
-        mdc_exit_request(&obddev->u.cli);
-        mdc_put_rpc_lock(obddev->u.cli.cl_rpc_lock, it);
-        if (rc < 0) {
-                CERROR("ldlm_cli_enqueue: %d\n", rc);
-                mdc_clear_replay_flag(req, rc);
-                ptlrpc_req_finished(req);
-                RETURN(rc);
-        }
-        rc = mdc_finish_enqueue(exp, req, einfo, it, lockh, rc);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(mdc_enqueue);
-
-int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it,
-                        struct ll_fid *fid)
-{
-                /* We could just return 1 immediately, but since we should only
-                 * be called in revalidate_it if we already have a lock, let's
-                 * verify that. */
-        struct ldlm_res_id res_id = {.name ={fid->id, fid->generation}};
-        struct lustre_handle lockh;
-        ldlm_policy_data_t policy;
-        ldlm_mode_t mode;
-
-        /* As not all attributes are kept under update lock, e.g. 
-           owner/group/acls are under lookup lock, we need both 
-           ibits for GETATTR. */
-        policy.l_inodebits.bits = (it->it_op == IT_GETATTR) ?
-                MDS_INODELOCK_UPDATE | MDS_INODELOCK_LOOKUP :
-                MDS_INODELOCK_LOOKUP;
-
-        mode = ldlm_lock_match(exp->exp_obd->obd_namespace,
-                               LDLM_FL_BLOCK_GRANTED, &res_id, LDLM_IBITS,
-                               &policy, LCK_CR|LCK_CW|LCK_PR|LCK_PW, &lockh);
-        if (mode) {
-                memcpy(&it->d.lustre.it_lock_handle, &lockh, sizeof(lockh));
-                it->d.lustre.it_lock_mode = mode;
-        }
-
-        return !!mode;
-}
-EXPORT_SYMBOL(mdc_revalidate_lock);
-
-static int mdc_finish_intent_lock(struct obd_export *exp,
-                                  struct ptlrpc_request *req,
-                                  struct mdc_op_data *data,
-                                  struct lookup_intent *it,
-                                  struct lustre_handle *lockh)
-{
-        struct mds_body *mds_body;
-        struct lustre_handle old_lock;
-        struct ldlm_lock *lock;
-        int rc;
-        ENTRY;
-
-        LASSERT(req != NULL);
-        LASSERT(req != LP_POISON);
-        LASSERT(req->rq_repmsg != LP_POISON);
-
-        if (!it_disposition(it, DISP_IT_EXECD)) {
-                /* The server failed before it even started executing the
-                 * intent, i.e. because it couldn't unpack the request. */
-                LASSERT(it->d.lustre.it_status != 0);
-                RETURN(it->d.lustre.it_status);
-        }
-        rc = it_open_error(DISP_IT_EXECD, it);
-        if (rc)
-                RETURN(rc);
-
-        mds_body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF,
-                                  sizeof(*mds_body));
-        /* mdc_enqueue checked */
-        LASSERT(mds_body != NULL);
-        /* mdc_enqueue swabbed */
-        LASSERT(lustre_rep_swabbed(req, DLM_REPLY_REC_OFF));
-
-        /* If we were revalidating a fid/name pair, mark the intent in
-         * case we fail and get called again from lookup */
-        if (data->fid2.id && (it->it_op != IT_GETATTR)) {
-                it_set_disposition(it, DISP_ENQ_COMPLETE);
-                /* Also: did we find the same inode? */
-                if (memcmp(&data->fid2, &mds_body->fid1, sizeof(data->fid2))) 
-                        RETURN(-ESTALE);
-        }
-
-        rc = it_open_error(DISP_LOOKUP_EXECD, it);
-        if (rc)
-                RETURN(rc);
-
-        /* keep requests around for the multiple phases of the call
-         * this shows the DISP_XX must guarantee we make it into the call
-         */
-        if (!it_disposition(it, DISP_ENQ_CREATE_REF) &&
-            it_disposition(it, DISP_OPEN_CREATE) &&
-            !it_open_error(DISP_OPEN_CREATE, it)) {
-                it_set_disposition(it, DISP_ENQ_CREATE_REF);
-                ptlrpc_request_addref(req); /* balanced in ll_create_node */
-        }
-        if (!it_disposition(it, DISP_ENQ_OPEN_REF) &&
-            it_disposition(it, DISP_OPEN_OPEN) &&
-            !it_open_error(DISP_OPEN_OPEN, it)) {
-                it_set_disposition(it, DISP_ENQ_OPEN_REF);
-                ptlrpc_request_addref(req); /* balanced in ll_file_open */
-                /* BUG 11546 - eviction in the middle of open rpc processing */
-                OBD_FAIL_TIMEOUT(OBD_FAIL_MDC_ENQUEUE_PAUSE, obd_timeout);
-        }
-
-        if (it->it_op & IT_CREAT) {
-                /* XXX this belongs in ll_create_it */
-        } else if (it->it_op == IT_OPEN) {
-                LASSERT(!it_disposition(it, DISP_OPEN_CREATE));
-        } else {
-                LASSERT(it->it_op & (IT_GETATTR | IT_LOOKUP));
-        }
-
-        /* If we already have a matching lock, then cancel the new
-         * one.  We have to set the data here instead of in
-         * mdc_enqueue, because we need to use the child's inode as
-         * the l_ast_data to match, and that's not available until
-         * intent_finish has performed the iget().) */
-        lock = ldlm_handle2lock(lockh);
-        if (lock) {
-                ldlm_policy_data_t policy = lock->l_policy_data;
-
-                LDLM_DEBUG(lock, "matching against this");
-                LDLM_LOCK_PUT(lock);
-                memcpy(&old_lock, lockh, sizeof(*lockh));
-                if (ldlm_lock_match(NULL, LDLM_FL_BLOCK_GRANTED, NULL,
-                                    LDLM_IBITS, &policy, LCK_NL, &old_lock)) {
-                        ldlm_lock_decref_and_cancel(lockh,
-                                                    it->d.lustre.it_lock_mode);
-                        memcpy(lockh, &old_lock, sizeof(old_lock));
-                        memcpy(&it->d.lustre.it_lock_handle, lockh,
-                               sizeof(*lockh));
-                }
-        }
-
-        CDEBUG(D_DENTRY,"D_IT dentry %.*s intent: %s status %d disp %x rc %d\n",
-               data->namelen, data->name, ldlm_it2str(it->it_op),
-               it->d.lustre.it_status, it->d.lustre.it_disposition, rc);
-        RETURN(rc);
-}
-
-/* 
- * This long block is all about fixing up the lock and request state
- * so that it is correct as of the moment _before_ the operation was
- * applied; that way, the VFS will think that everything is normal and
- * call Lustre's regular VFS methods.
- *
- * If we're performing a creation, that means that unless the creation
- * failed with EEXIST, we should fake up a negative dentry.
- *
- * For everything else, we want to lookup to succeed.
- *
- * One additional note: if CREATE or OPEN succeeded, we add an extra
- * reference to the request because we need to keep it around until
- * ll_create/ll_open gets called.
- *
- * The server will return to us, in it_disposition, an indication of
- * exactly what d.lustre.it_status refers to.
- *
- * If DISP_OPEN_OPEN is set, then d.lustre.it_status refers to the open() call,
- * otherwise if DISP_OPEN_CREATE is set, then it status is the
- * creation failure mode.  In either case, one of DISP_LOOKUP_NEG or
- * DISP_LOOKUP_POS will be set, indicating whether the child lookup
- * was successful.
- *
- * Else, if DISP_LOOKUP_EXECD then d.lustre.it_status is the rc of the
- * child lookup.
- */
-int mdc_intent_lock(struct obd_export *exp, struct mdc_op_data *op_data,
-                    void *lmm, int lmmsize, struct lookup_intent *it,
-                    int lookup_flags, struct ptlrpc_request **reqp,
-                    ldlm_blocking_callback cb_blocking, int extra_lock_flags)
-{
-        struct lustre_handle lockh;
-        int rc;
-        ENTRY;
-
-        LASSERT(it);
-
-        CDEBUG(D_DLMTRACE,"name: %.*s in inode "LPU64", intent: %s flags %#o\n",
-               op_data->namelen, op_data->name, op_data->fid1.id,
-               ldlm_it2str(it->it_op), it->it_flags);
-
-        if (op_data->fid2.id &&
-            (it->it_op == IT_LOOKUP || it->it_op == IT_GETATTR)) {
-                rc = mdc_revalidate_lock(exp, it, &op_data->fid2);
-                /* Only return failure if it was not GETATTR by cfid
-                   (from inode_revalidate) */
-                if (rc || op_data->namelen != 0)
-                        RETURN(rc);
-        }
-
-        /* lookup_it may be called only after revalidate_it has run, because
-         * revalidate_it cannot return errors, only zero.  Returning zero causes
-         * this call to lookup, which *can* return an error.
-         *
-         * We only want to execute the request associated with the intent one
-         * time, however, so don't send the request again.  Instead, skip past
-         * this and use the request from revalidate.  In this case, revalidate
-         * never dropped its reference, so the refcounts are all OK */
-        if (!it_disposition(it, DISP_ENQ_COMPLETE)) {
-                struct ldlm_enqueue_info einfo =
-                        { LDLM_IBITS, it_to_lock_mode(it), cb_blocking,
-                          ldlm_completion_ast, NULL, NULL };
-
-                rc = mdc_enqueue(exp, &einfo, it, op_data, &lockh,
-                                 lmm, lmmsize, extra_lock_flags);
-                if (rc < 0)
-                        RETURN(rc);
-                memcpy(&it->d.lustre.it_lock_handle, &lockh, sizeof(lockh));
-        } else if (!op_data->fid2.id) {
-                /* DISP_ENQ_COMPLETE set means there is extra reference on
-                 * request referenced from this intent, saved for subsequent
-                 * lookup.  This path is executed when we proceed to this
-                 * lookup, so we clear DISP_ENQ_COMPLETE */
-                it_clear_disposition(it, DISP_ENQ_COMPLETE);
-        }
-
-        *reqp = it->d.lustre.it_data;
-        rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(mdc_intent_lock);
-
-static int mdc_intent_getattr_async_interpret(struct ptlrpc_request *req,
-                                              void *unused, int rc)
-{
-        struct mdc_enqueue_args  *ma;
-        struct md_enqueue_info   *minfo;
-        struct ldlm_enqueue_info *einfo;
-        struct obd_export        *exp;
-        struct lookup_intent     *it;
-        struct lustre_handle     *lockh;
-        struct obd_device        *obddev;
-        int                       flags = LDLM_FL_HAS_INTENT;
-        ENTRY;
-
-        ma = (struct mdc_enqueue_args *)&req->rq_async_args;
-        minfo = ma->ma_mi;
-        einfo = ma->ma_ei;
-
-        exp   = minfo->mi_exp;
-        it    = &minfo->mi_it;
-        lockh = &minfo->mi_lockh;
-
-        obddev = class_exp2obd(exp);
-
-        mdc_exit_request(&obddev->u.cli);
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDC_GETATTR_ENQUEUE))
-                rc = -ETIMEDOUT;
-
-        rc = ldlm_cli_enqueue_fini(exp, req, einfo->ei_type, 1, einfo->ei_mode,
-                                   &flags, NULL, 0, NULL, lockh, rc);
-        if (rc < 0) {
-                CERROR("ldlm_cli_enqueue_fini: %d\n", rc);
-                mdc_clear_replay_flag(req, rc);
-                GOTO(out, rc);
-        }
-
-        rc = mdc_finish_enqueue(exp, req, einfo, it, lockh, rc);
-        if (rc)
-                GOTO(out, rc);
-
-        memcpy(&it->d.lustre.it_lock_handle, lockh, sizeof(*lockh));
-
-        rc = mdc_finish_intent_lock(exp, req, &minfo->mi_data, it, lockh);
-        GOTO(out, rc);
-out:
-        OBD_FREE_PTR(einfo);
-        minfo->mi_cb(exp, req, minfo, rc);
-
-        return 0;
-}
-
-int mdc_intent_getattr_async(struct obd_export *exp,
-                             struct md_enqueue_info *minfo,
-                             struct ldlm_enqueue_info *einfo)
-{
-        struct mdc_op_data      *op_data = &minfo->mi_data;
-        struct lookup_intent    *it = &minfo->mi_it;
-        struct ptlrpc_request   *req;
-        struct obd_device       *obddev = class_exp2obd(exp);
-        struct ldlm_res_id       res_id = {
-                                        .name = {op_data->fid1.id,
-                                                 op_data->fid1.generation}
-                                 };
-        ldlm_policy_data_t       policy = {
-                                        .l_inodebits = { MDS_INODELOCK_LOOKUP }
-                                 };
-        struct mdc_enqueue_args *aa;
-        int                      rc;
-        int                      flags = LDLM_FL_HAS_INTENT;
-        ENTRY;
-
-        CDEBUG(D_DLMTRACE,"name: %.*s in inode "LPU64", intent: %s flags %#o\n",
-               op_data->namelen, op_data->name, op_data->fid1.id,
-               ldlm_it2str(it->it_op), it->it_flags);
-
-        req = mdc_intent_lookup_pack(exp, it, op_data);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        mdc_enter_request(&obddev->u.cli);
-        rc = ldlm_cli_enqueue(exp, &req, einfo, res_id, &policy, &flags, NULL,
-                              0, NULL, &minfo->mi_lockh, 1);
-        if (rc < 0) {
-                mdc_exit_request(&obddev->u.cli);
-                RETURN(rc);
-        }
-
-        CLASSERT(sizeof(*aa) < sizeof(req->rq_async_args));
-        aa = (struct mdc_enqueue_args *)&req->rq_async_args;
-        aa->ma_mi = minfo;
-        aa->ma_ei = einfo;
-        req->rq_interpret_reply = mdc_intent_getattr_async_interpret;
-        ptlrpcd_add_req(req);
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(mdc_intent_getattr_async);
diff --git a/lustre/mdc/mdc_reint.c b/lustre/mdc/mdc_reint.c
deleted file mode 100644
index 2e663f90de45cbe972f4aa3d80d0621211ef9568..0000000000000000000000000000000000000000
--- a/lustre/mdc/mdc_reint.c
+++ /dev/null
@@ -1,335 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDC
-
-#ifdef __KERNEL__
-#ifndef AUTOCONF_INCLUDED
-# include <linux/config.h>
-#endif
-# include <linux/module.h>
-# include <linux/kernel.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include "mdc_internal.h"
-
-/* mdc_setattr does its own semaphore handling */
-static int mdc_reint(struct ptlrpc_request *request,
-                     struct mdc_rpc_lock *rpc_lock, int level)
-{
-        int rc;
-
-        request->rq_send_state = level;
-
-        mdc_get_rpc_lock(rpc_lock, NULL);
-        rc = ptlrpc_queue_wait(request);
-        mdc_put_rpc_lock(rpc_lock, NULL);
-        if (rc)
-                CDEBUG(D_INFO, "error in handling %d\n", rc);
-        else if (!lustre_swab_repbuf(request, REPLY_REC_OFF,
-                                     sizeof(struct mds_body),
-                                     lustre_swab_mds_body)) {
-                CERROR ("Can't unpack mds_body\n");
-                rc = -EPROTO;
-        }
-        return rc;
-}
-
-/* Find and cancel locally locks matched by inode @bits & @mode in the resource
- * found by @fid. Found locks are added into @cancel list. Returns the amount of
- * locks added to @cancels list. */
-int mdc_resource_get_unused(struct obd_export *exp, struct ll_fid *fid,
-                            struct list_head *cancels, ldlm_mode_t mode,
-                            __u64 bits)
-{
-        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
-        struct ldlm_res_id res_id = { .name = {fid->id, fid->generation} };
-        struct ldlm_resource *res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
-        ldlm_policy_data_t policy = {{0}};
-        int count;
-        ENTRY;
-
-        if (res == NULL)
-                RETURN(0);
-
-        /* Initialize ibits lock policy. */
-        policy.l_inodebits.bits = bits;
-        count = ldlm_cancel_resource_local(res, cancels, &policy,
-                                           mode, 0, 0, NULL);
-        ldlm_resource_putref(res);
-        RETURN(count);
-}
-
-struct ptlrpc_request *mdc_prep_elc_req(struct obd_export *exp,
-                                        int bufcount, int *size, int off,
-                                        struct list_head *cancels, int count)
-{
-        return ldlm_prep_elc_req(exp, LUSTRE_MDS_VERSION, MDS_REINT,
-                                 bufcount, size, off, 0, cancels, count);
-}
-
-/* If mdc_setattr is called with an 'iattr', then it is a normal RPC that
- * should take the normal semaphore and go to the normal portal.
- *
- * If it is called with iattr->ia_valid & ATTR_FROM_OPEN, then it is a
- * magic open-path setattr that should take the setattr semaphore and
- * go to the setattr portal. */
-int mdc_setattr(struct obd_export *exp, struct mdc_op_data *op_data,
-                struct iattr *iattr, void *ea, int ealen, void *ea2, int ea2len,
-                struct ptlrpc_request **request)
-{
-        CFS_LIST_HEAD(cancels);
-        struct ptlrpc_request *req;
-        struct mds_rec_setattr *rec;
-        struct mdc_rpc_lock *rpc_lock;
-        struct obd_device *obd = exp->exp_obd;
-        int size[5] = { sizeof(struct ptlrpc_body),
-                        sizeof(*rec), ealen, ea2len,
-                        sizeof(struct ldlm_request) };
-        int count, bufcount = 2, rc;
-        __u64 bits;
-        ENTRY;
-
-        LASSERT(iattr != NULL);
-
-        if (ealen > 0) {
-                bufcount++;
-                if (ea2len > 0)
-                        bufcount++;
-        }
-
-        bits = MDS_INODELOCK_UPDATE;
-        if (iattr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID))
-                bits |= MDS_INODELOCK_LOOKUP;
-        count = mdc_resource_get_unused(exp, &op_data->fid1,
-                                        &cancels, LCK_EX, bits);
-        if (exp_connect_cancelset(exp))
-                bufcount = 5;
-        req = mdc_prep_elc_req(exp, bufcount, size,
-                               REQ_REC_OFF + 3, &cancels, count);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        if (iattr->ia_valid & ATTR_FROM_OPEN) {
-                req->rq_request_portal = MDS_SETATTR_PORTAL;
-                ptlrpc_at_set_req_timeout(req);
-                rpc_lock = obd->u.cli.cl_setattr_lock;
-        } else {
-                rpc_lock = obd->u.cli.cl_rpc_lock;
-        }
-
-        if (iattr->ia_valid & (ATTR_MTIME | ATTR_CTIME))
-                CDEBUG(D_INODE, "setting mtime %lu, ctime %lu\n",
-                       LTIME_S(iattr->ia_mtime), LTIME_S(iattr->ia_ctime));
-        mdc_setattr_pack(req, REQ_REC_OFF, op_data, iattr,
-                         ea, ealen, ea2, ea2len);
-
-        size[REPLY_REC_OFF] = sizeof(struct mds_body);
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = mdc_reint(req, rpc_lock, LUSTRE_IMP_FULL);
-        *request = req;
-        if (rc == -ERESTARTSYS)
-                rc = 0;
-
-        RETURN(rc);
-}
-
-int mdc_create(struct obd_export *exp, struct mdc_op_data *op_data,
-               const void *data, int datalen, int mode, __u32 uid, __u32 gid,
-               __u32 cap_effective, __u64 rdev, struct ptlrpc_request **request)
-{
-        CFS_LIST_HEAD(cancels);
-        struct obd_device *obd = exp->exp_obd;
-        struct ptlrpc_request *req;
-        int level, bufcount = 3, rc;
-        int size[5] = { sizeof(struct ptlrpc_body),
-                        sizeof(struct mds_rec_create),
-                        op_data->namelen + 1, 0, sizeof(struct ldlm_request) };
-        int count;
-        ENTRY;
-
-        if (data && datalen) {
-                size[bufcount] = datalen;
-                bufcount++;
-        }
-
-        count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels,
-                                        LCK_EX, MDS_INODELOCK_UPDATE);
-        if (exp_connect_cancelset(exp))
-                bufcount = 5;
-        req = mdc_prep_elc_req(exp, bufcount, size,
-                               REQ_REC_OFF + 3, &cancels, count);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        /* mdc_create_pack fills msg->bufs[1] with name
-         * and msg->bufs[2] with tgt, for symlinks or lov MD data */
-        mdc_create_pack(req, REQ_REC_OFF, op_data, data, datalen, mode, uid,
-                        gid, cap_effective, rdev);
-
-        size[REPLY_REC_OFF] = sizeof(struct mds_body);
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        level = LUSTRE_IMP_FULL;
- resend:
-        rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, level);
-        /* Resend if we were told to. */
-        if (rc == -ERESTARTSYS) {
-                level = LUSTRE_IMP_RECOVER;
-                goto resend;
-        }
-
-        if (!rc)
-                mdc_store_inode_generation(req, REQ_REC_OFF, REPLY_REC_OFF);
-
-        *request = req;
-        RETURN(rc);
-}
-
-int mdc_unlink(struct obd_export *exp, struct mdc_op_data *op_data,
-               struct ptlrpc_request **request)
-{
-        CFS_LIST_HEAD(cancels);
-        struct obd_device *obd = class_exp2obd(exp);
-        struct ptlrpc_request *req = *request;
-        int size[4] = { sizeof(struct ptlrpc_body),
-                        sizeof(struct mds_rec_unlink),
-                        op_data->namelen + 1, sizeof(struct ldlm_request) };
-        int count, rc, bufcount = 3;
-        ENTRY;
-
-        LASSERT(req == NULL);
-        count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels,
-                                        LCK_EX, MDS_INODELOCK_UPDATE);
-        if (op_data->fid3.id)
-                count += mdc_resource_get_unused(exp, &op_data->fid3, &cancels,
-                                                 LCK_EX, MDS_INODELOCK_FULL);
-        if (exp_connect_cancelset(exp))
-                bufcount = 4;
-        req = mdc_prep_elc_req(exp, bufcount, size,
-                               REQ_REC_OFF + 2, &cancels, count);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-        *request = req;
-
-        size[REPLY_REC_OFF] = sizeof(struct mds_body);
-        size[REPLY_REC_OFF + 1] = obd->u.cli.cl_max_mds_easize;
-        size[REPLY_REC_OFF + 2] = obd->u.cli.cl_max_mds_cookiesize;
-        ptlrpc_req_set_repsize(req, 4, size);
-
-        mdc_unlink_pack(req, REQ_REC_OFF, op_data);
-
-        rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL);
-        if (rc == -ERESTARTSYS)
-                rc = 0;
-        RETURN(rc);
-}
-
-int mdc_link(struct obd_export *exp, struct mdc_op_data *op_data,
-             struct ptlrpc_request **request)
-{
-        CFS_LIST_HEAD(cancels);
-        struct obd_device *obd = exp->exp_obd;
-        struct ptlrpc_request *req;
-        int size[4] = { sizeof(struct ptlrpc_body),
-                        sizeof(struct mds_rec_link),
-                        op_data->namelen + 1, sizeof(struct ldlm_request) };
-        int count, rc, bufcount = 3;
-        ENTRY;
-
-        count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels,
-                                        LCK_EX, MDS_INODELOCK_UPDATE);
-        count += mdc_resource_get_unused(exp, &op_data->fid2, &cancels,
-                                         LCK_EX, MDS_INODELOCK_UPDATE);
-        if (exp_connect_cancelset(exp))
-                bufcount = 4;
-        req = mdc_prep_elc_req(exp, bufcount, size,
-                               REQ_REC_OFF + 2, &cancels, count);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        mdc_link_pack(req, REQ_REC_OFF, op_data);
-
-        size[REPLY_REC_OFF] = sizeof(struct mds_body);
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL);
-        *request = req;
-        if (rc == -ERESTARTSYS)
-                rc = 0;
-
-        RETURN(rc);
-}
-
-int mdc_rename(struct obd_export *exp, struct mdc_op_data *op_data,
-               const char *old, int oldlen, const char *new, int newlen,
-               struct ptlrpc_request **request)
-{
-        CFS_LIST_HEAD(cancels);
-        struct obd_device *obd = exp->exp_obd;
-        struct ptlrpc_request *req;
-        int size[5] = { sizeof(struct ptlrpc_body),
-                        sizeof(struct mds_rec_rename),
-                        oldlen + 1, newlen + 1, sizeof(struct ldlm_request) };
-        int count, rc, bufcount = 4;
-        ENTRY;
-
-        count = mdc_resource_get_unused(exp, &op_data->fid1, &cancels,
-                                        LCK_EX, MDS_INODELOCK_UPDATE);
-        count += mdc_resource_get_unused(exp, &op_data->fid2, &cancels,
-                                         LCK_EX, MDS_INODELOCK_UPDATE);
-        if (op_data->fid3.id)
-                count += mdc_resource_get_unused(exp, &op_data->fid3, &cancels,
-                                                 LCK_EX, MDS_INODELOCK_LOOKUP);
-        if (op_data->fid4.id)
-                count += mdc_resource_get_unused(exp, &op_data->fid4, &cancels,
-                                                 LCK_EX, MDS_INODELOCK_FULL);
-        if (exp_connect_cancelset(exp))
-                bufcount = 5;
-        req = mdc_prep_elc_req(exp, bufcount, size,
-                               REQ_REC_OFF + 3, &cancels, count);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        mdc_rename_pack(req, REQ_REC_OFF, op_data, old, oldlen, new, newlen);
-
-        size[REPLY_REC_OFF] = sizeof(struct mds_body);
-        size[REPLY_REC_OFF + 1] = obd->u.cli.cl_max_mds_easize;
-        size[REPLY_REC_OFF + 2] = obd->u.cli.cl_max_mds_cookiesize;
-        ptlrpc_req_set_repsize(req, 4, size);
-
-        rc = mdc_reint(req, obd->u.cli.cl_rpc_lock, LUSTRE_IMP_FULL);
-        *request = req;
-        if (rc == -ERESTARTSYS)
-                rc = 0;
-
-        RETURN(rc);
-}
diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c
deleted file mode 100644
index 0d40904db96b54502a92918d9aaed741edf46f68..0000000000000000000000000000000000000000
--- a/lustre/mdc/mdc_request.c
+++ /dev/null
@@ -1,1438 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDC
-
-#ifdef __KERNEL__
-# include <linux/module.h>
-# include <linux/pagemap.h>
-# include <linux/miscdevice.h>
-# include <linux/init.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include <lustre_param.h>
-#include "mdc_internal.h"
-
-static quota_interface_t *quota_interface;
-
-#define REQUEST_MINOR 244
-
-static quota_interface_t *quota_interface;
-extern quota_interface_t mdc_quota_interface;
-
-static int mdc_cleanup(struct obd_device *obd);
-
-extern int mds_queue_req(struct ptlrpc_request *);
-/* Helper that implements most of mdc_getstatus and signal_completed_replay. */
-/* XXX this should become mdc_get_info("key"), sending MDS_GET_INFO RPC */
-static int send_getstatus(struct obd_import *imp, struct ll_fid *rootfid,
-                          int level, int msg_flags)
-{
-        struct ptlrpc_request *req;
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, MDS_GETSTATUS, 2, size,
-                              NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        req->rq_send_state = level;
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        mdc_pack_req_body(req, REQ_REC_OFF, 0, NULL, 0, 0);
-        lustre_msg_add_flags(req->rq_reqmsg, msg_flags);
-        rc = ptlrpc_queue_wait(req);
-
-        if (!rc) {
-                body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                          lustre_swab_mds_body);
-                if (body == NULL) {
-                        CERROR ("Can't extract mds_body\n");
-                        GOTO (out, rc = -EPROTO);
-                }
-
-                memcpy(rootfid, &body->fid1, sizeof(*rootfid));
-
-                CDEBUG(D_NET, "root ino="LPU64", last_committed="LPU64
-                       ", last_xid="LPU64"\n",
-                       rootfid->id,
-                       lustre_msg_get_last_committed(req->rq_repmsg),
-                       lustre_msg_get_last_xid(req->rq_repmsg));
-        }
-
-        EXIT;
- out:
-        ptlrpc_req_finished(req);
-        return rc;
-}
-
-/* This should be mdc_get_info("rootfid") */
-int mdc_getstatus(struct obd_export *exp, struct ll_fid *rootfid)
-{
-        return send_getstatus(class_exp2cliimp(exp), rootfid, LUSTRE_IMP_FULL,
-                              0);
-}
-
-static
-int mdc_getattr_common(struct obd_export *exp, unsigned int ea_size, 
-                       unsigned int acl_size, struct ptlrpc_request *req)
-{
-        struct obd_device *obddev = class_exp2obd(exp);
-        struct mds_body *body;
-        void *eadata;
-        int size[4] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int bufcount = 2, rc;
-        ENTRY;
-
-        /* request message already built */
-
-        if (ea_size != 0) {
-                size[bufcount++] = ea_size;
-                CDEBUG(D_INODE, "reserved %u bytes for MD/symlink in packet\n",
-                       ea_size);
-        }
-        if (acl_size) {
-                size[bufcount++] = acl_size;
-                CDEBUG(D_INODE, "reserved %u bytes for ACL\n", acl_size);
-        }
-
-        ptlrpc_req_set_repsize(req, bufcount, size);
-
-        mdc_enter_request(&obddev->u.cli);
-        rc = ptlrpc_queue_wait(req);
-        mdc_exit_request(&obddev->u.cli);
-        if (rc != 0)
-                RETURN (rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack mds_body\n");
-                RETURN (-EPROTO);
-        }
-
-        CDEBUG(D_NET, "mode: %o\n", body->mode);
-
-        lustre_set_rep_swabbed(req, REPLY_REC_OFF + 1);
-        if (body->eadatasize != 0) {
-                /* reply indicates presence of eadata; check it's there... */
-                eadata = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1,
-                                        body->eadatasize);
-                if (eadata == NULL) {
-                        CERROR ("Missing/short eadata\n");
-                        RETURN (-EPROTO);
-                }
-        }
-        
-        if (body->valid & OBD_MD_FLMODEASIZE) {
-                if (exp->exp_obd->u.cli.cl_max_mds_easize < body->max_mdsize) 
-                        exp->exp_obd->u.cli.cl_max_mds_easize = 
-                                                body->max_mdsize;
-                if (exp->exp_obd->u.cli.cl_max_mds_cookiesize < 
-                                                body->max_cookiesize)
-                        exp->exp_obd->u.cli.cl_max_mds_cookiesize = 
-                                                body->max_cookiesize;
-        }
-
-        RETURN (0);
-}
-
-int mdc_getattr(struct obd_export *exp, struct ll_fid *fid,
-                obd_valid valid, unsigned int ea_size,
-                struct ptlrpc_request **request)
-{
-        struct ptlrpc_request *req;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(struct mds_body) };
-        int acl_size = 0, rc;
-        ENTRY;
-
-        /* XXX do we need to make another request here?  We just did a getattr
-         *     to do the lookup in the first place.
-         */
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_GETATTR, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, ea_size,
-                          MDS_BFLAG_EXT_FLAGS/*request "new" flags(bug 9486)*/);
-
-        /* currently only root inode will call us with FLACL */
-        if (valid & OBD_MD_FLACL)
-                acl_size = LUSTRE_POSIX_ACL_MAX_SIZE;
-
-        rc = mdc_getattr_common(exp, ea_size, acl_size, req);
-        if (rc != 0) {
-                ptlrpc_req_finished (req);
-                req = NULL;
-        }
- out:
-        *request = req;
-        RETURN (rc);
-}
-
-int mdc_getattr_name(struct obd_export *exp, struct ll_fid *fid,
-                     const char *filename, int namelen, unsigned long valid,
-                     unsigned int ea_size, struct ptlrpc_request **request)
-{
-        struct ptlrpc_request *req;
-        struct mds_body *body;
-        int rc, size[3] = { sizeof(struct ptlrpc_body), sizeof(*body), namelen};
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_GETATTR_NAME, 3, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, ea_size,
-                          MDS_BFLAG_EXT_FLAGS/*request "new" flags(bug 9486)*/);
- 
-        LASSERT(strnlen(filename, namelen) == namelen - 1);
-        memcpy(lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, namelen),
-               filename, namelen);
-
-        rc = mdc_getattr_common(exp, ea_size, 0, req);
-        if (rc != 0) {
-                ptlrpc_req_finished (req);
-                req = NULL;
-        }
- out:
-        *request = req;
-        RETURN(rc);
-}
-
-static
-int mdc_xattr_common(struct obd_export *exp, struct ll_fid *fid,
-                     int opcode, obd_valid valid, const char *xattr_name,
-                     const char *input, int input_size, int output_size,
-                     int flags, struct ptlrpc_request **request)
-{
-        struct obd_device *obddev = class_exp2obd(exp);
-        struct ptlrpc_request *req;
-        int size[4] = { sizeof(struct ptlrpc_body), sizeof(struct mds_body) };
-        // int size[3] = {sizeof(struct mds_body)}, bufcnt = 1;
-        int rc, xattr_namelen = 0, bufcnt = 2, offset;
-        void *tmp;
-        ENTRY;
-
-        if (xattr_name) {
-                xattr_namelen = strlen(xattr_name) + 1;
-                size[bufcnt++] = xattr_namelen;
-        }
-        if (input_size) {
-                LASSERT(input);
-                size[bufcnt++] = input_size;
-        }
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              opcode, bufcnt, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        /* request data */
-        mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, output_size, flags);
-
-        offset = REQ_REC_OFF + 1;
-
-        if (xattr_name) {
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset++, xattr_namelen);
-                memcpy(tmp, xattr_name, xattr_namelen);
-        }
-        if (input_size) {
-                tmp = lustre_msg_buf(req->rq_reqmsg, offset++, input_size);
-                memcpy(tmp, input, input_size);
-        }
-
-        /* reply buffers */
-        if (opcode == MDS_GETXATTR) {
-                size[REPLY_REC_OFF] = sizeof(struct mds_body);
-                bufcnt = 2;
-        } else {
-                bufcnt = 1;
-        }
-
-        /* we do this even output_size is 0, because server is doing that */
-        size[bufcnt++] = output_size;
-
-        ptlrpc_req_set_repsize(req, bufcnt, size);
-
-        /* make rpc */
-        if (opcode == MDS_SETXATTR)
-                mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-        else
-                mdc_enter_request(&obddev->u.cli);
-
-        rc = ptlrpc_queue_wait(req);
-
-        if (opcode == MDS_SETXATTR)
-                mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-        else
-                mdc_exit_request(&obddev->u.cli);
-
-        if (rc != 0)
-                GOTO(err_out, rc);
-
-        if (opcode == MDS_GETXATTR) {
-                struct mds_body * body = lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                          sizeof(*body),
-                                          lustre_swab_mds_body);
-                if (body == NULL) {
-                        CERROR ("Can't unpack mds_body\n");
-                        GOTO(err_out, rc = -EPROTO);
-                }
-        }
-out:
-        *request = req;
-        RETURN (rc);
-err_out:
-        ptlrpc_req_finished(req);
-        req = NULL;
-        goto out;
-}
-
-int mdc_setxattr(struct obd_export *exp, struct ll_fid *fid,
-                 obd_valid valid, const char *xattr_name,
-                 const char *input, int input_size,
-                 int output_size, int flags,
-                 struct ptlrpc_request **request)
-{
-        return mdc_xattr_common(exp, fid, MDS_SETXATTR, valid, xattr_name,
-                                input, input_size, output_size, flags, request);
-}
-
-int mdc_getxattr(struct obd_export *exp, struct ll_fid *fid,
-                 obd_valid valid, const char *xattr_name,
-                 const char *input, int input_size,
-                 int output_size, struct ptlrpc_request **request)
-{
-        return mdc_xattr_common(exp, fid, MDS_GETXATTR, valid, xattr_name,
-                                input, input_size, output_size, 0, request);
-}
-
-/* This should be called with both the request and the reply still packed. */
-void mdc_store_inode_generation(struct ptlrpc_request *req, int reqoff,
-                                int repoff)
-{
-        struct mds_rec_create *rec = lustre_msg_buf(req->rq_reqmsg, reqoff,
-                                                    sizeof(*rec));
-        struct mds_body *body = lustre_msg_buf(req->rq_repmsg, repoff,
-                                               sizeof(*body));
-
-        LASSERT (rec != NULL);
-        LASSERT (body != NULL);
-
-        memcpy(&rec->cr_replayfid, &body->fid1, sizeof rec->cr_replayfid);
-        if (body->fid1.id == 0) {
-                DEBUG_REQ(D_ERROR, req, "saving replay request with id = 0 "
-                          "gen = %u", body->fid1.generation);
-                LBUG();
-        }
-
-        DEBUG_REQ(D_INODE, req, "storing generation %u for ino "LPU64,
-                  rec->cr_replayfid.generation, rec->cr_replayfid.id);
-}
-
-#ifdef CONFIG_FS_POSIX_ACL
-static
-int mdc_unpack_acl(struct obd_export *exp, struct ptlrpc_request *req,
-                   struct lustre_md *md, unsigned int offset)
-{
-        struct mds_body  *body = md->body;
-        struct posix_acl *acl;
-        void             *buf;
-        int               rc;
-
-        if (!body->aclsize)
-                return 0;
-
-        buf = lustre_msg_buf(req->rq_repmsg, offset, body->aclsize);
-        if (!buf) {
-                CERROR("aclsize %u, bufcount %u, bufsize %u\n",
-                       body->aclsize, lustre_msg_bufcount(req->rq_repmsg),
-                       (lustre_msg_bufcount(req->rq_repmsg) <= offset) ?
-                                -1 : lustre_msg_buflen(req->rq_repmsg, offset));
-                return -EPROTO;
-        }
-
-        acl = posix_acl_from_xattr(buf, body->aclsize);
-        if (IS_ERR(acl)) {
-                rc = PTR_ERR(acl);
-                CERROR("convert xattr to acl: %d\n", rc);
-                return rc;
-        }
-
-        rc = posix_acl_valid(acl);
-        if (rc) {
-                CERROR("validate acl: %d\n", rc);
-                posix_acl_release(acl);
-                return rc;
-        }
-
-        md->posix_acl = acl;
-        return 0;
-}
-#else
-#define mdc_unpack_acl(exp, req, md, offset) 0
-#endif
-
-int mdc_req2lustre_md(struct ptlrpc_request *req, int offset,
-                      struct obd_export *exp,
-                      struct lustre_md *md)
-{
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(md);
-        memset(md, 0, sizeof(*md));
-
-        md->body = lustre_msg_buf(req->rq_repmsg, offset, sizeof (*md->body));
-        LASSERT (md->body != NULL);
-        LASSERT(lustre_rep_swabbed(req, offset));
-        offset++;
-
-        if (md->body->valid & OBD_MD_FLEASIZE) {
-                int lmmsize;
-                struct lov_mds_md *lmm;
-
-                if (!S_ISREG(md->body->mode)) {
-                        CERROR("OBD_MD_FLEASIZE set, should be a regular file, "
-                               "but is not\n");
-                        GOTO(err_out, rc = -EPROTO);
-                }
-
-                if (md->body->eadatasize == 0) {
-                        CERROR ("OBD_MD_FLEASIZE set, but eadatasize 0\n");
-                        GOTO(err_out, rc = -EPROTO);
-                }
-                lmmsize = md->body->eadatasize;
-                lmm = lustre_msg_buf(req->rq_repmsg, offset, lmmsize);
-                if (!lmm) {
-                        CERROR ("incorrect message: lmm == 0\n");
-                        GOTO(err_out, rc = -EPROTO);
-                }
-                LASSERT(lustre_rep_swabbed(req, offset));
-
-                rc = obd_unpackmd(exp, &md->lsm, lmm, lmmsize);
-                if (rc < 0)
-                        GOTO(err_out, rc);
-
-                if (rc < sizeof(*md->lsm)) {
-                        CERROR ("lsm size too small:  rc < sizeof (*md->lsm) "
-                                "(%d < "LPSZ")\n", rc, sizeof(*md->lsm));
-                        GOTO(err_out, rc = -EPROTO);
-                }
-                rc = 0;
-
-                offset++;
-        }
-
-        if (md->body->valid & OBD_MD_FLDIREA) {
-                if(!S_ISDIR(md->body->mode)) {
-                        CERROR("OBD_MD_FLDIREA set, should be a directory, but "
-                               "is not\n");
-                        GOTO(err_out, rc = -EPROTO);
-                }
-                offset++;
-        }
-
-        /* for ACL, it's possible that FLACL is set but aclsize is zero.
-         * only when aclsize != 0 there's an actual segment for ACL in
-         * reply buffer.
-         */
-        if ((md->body->valid & OBD_MD_FLACL) && md->body->aclsize) {
-                rc = mdc_unpack_acl(exp, req, md, offset);
-                if (rc)
-                        GOTO(err_out, rc);
-                offset++;
-        }
-out:
-        RETURN(rc);
-
-err_out:
-        if (md->lsm)
-                obd_free_memmd(exp, &md->lsm);
-        goto out;
-}
-
-void mdc_free_lustre_md(struct obd_export *exp, struct lustre_md *md)
-{
-        if (md->lsm)
-                obd_free_memmd(exp, &md->lsm);
-
-#ifdef CONFIG_FS_POSIX_ACL
-        if (md->posix_acl) {
-                posix_acl_release(md->posix_acl);
-                md->posix_acl = NULL;
-        }
-#endif
-}
-
-static void mdc_commit_open(struct ptlrpc_request *req)
-{
-        struct mdc_open_data *mod = req->rq_cb_data;
-        if (mod == NULL)
-                return;
-
-        if (mod->mod_close_req != NULL)
-                mod->mod_close_req->rq_cb_data = NULL;
-
-        if (mod->mod_och != NULL)
-                mod->mod_och->och_mod = NULL;
-
-        OBD_FREE(mod, sizeof(*mod));
-        req->rq_cb_data = NULL;
-}
-
-static void mdc_replay_open(struct ptlrpc_request *req)
-{
-        struct mdc_open_data *mod = req->rq_cb_data;
-        struct obd_client_handle *och;
-        struct ptlrpc_request *close_req;
-        struct lustre_handle old;
-        struct mds_body *body;
-        ENTRY;
-
-        body = lustre_swab_repbuf(req, DLM_REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_mds_body);
-        LASSERT (body != NULL);
-
-        if (mod == NULL) {
-                DEBUG_REQ(D_ERROR, req,
-                          "can't properly replay without open data");
-                EXIT;
-                return;
-        }
-
-        och = mod->mod_och;
-        if (och != NULL) {
-                struct lustre_handle *file_fh;
-                LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC);
-                file_fh = &och->och_fh;
-                CDEBUG(D_RPCTRACE, "updating handle from "LPX64" to "LPX64"\n",
-                       file_fh->cookie, body->handle.cookie);
-                memcpy(&old, file_fh, sizeof(old));
-                memcpy(file_fh, &body->handle, sizeof(*file_fh));
-        }
-
-        close_req = mod->mod_close_req;
-        if (close_req != NULL) {
-                struct mds_body *close_body;
-                LASSERT(lustre_msg_get_opc(close_req->rq_reqmsg) == MDS_CLOSE);
-                close_body = lustre_msg_buf(close_req->rq_reqmsg, REQ_REC_OFF,
-                                            sizeof(*close_body));
-                if (och != NULL)
-                        LASSERT(!memcmp(&old, &close_body->handle, sizeof old));
-                DEBUG_REQ(D_RPCTRACE, close_req, "updating close with new fh");
-                memcpy(&close_body->handle, &body->handle,
-                       sizeof(close_body->handle));
-        }
-
-        EXIT;
-}
-
-void mdc_set_open_replay_data(struct obd_client_handle *och,
-                              struct ptlrpc_request *open_req)
-{
-        struct mdc_open_data *mod;
-        struct mds_rec_create *rec = lustre_msg_buf(open_req->rq_reqmsg,
-                                                    DLM_INTENT_REC_OFF,
-                                                    sizeof(*rec));
-        struct mds_body *body = lustre_msg_buf(open_req->rq_repmsg,
-                                               DLM_REPLY_REC_OFF,
-                                               sizeof(*body));
-
-        /* If request is not eligible for replay, just bail out */
-        if (!open_req->rq_replay)
-                return;
-
-        /* incoming message in my byte order (it's been swabbed) */
-        LASSERT(rec != NULL);
-        LASSERT(lustre_rep_swabbed(open_req, DLM_REPLY_REC_OFF));
-        /* outgoing messages always in my byte order */
-        LASSERT(body != NULL);
-
-        if (och) {
-                OBD_ALLOC(mod, sizeof(*mod));
-                if (mod == NULL) {
-                        DEBUG_REQ(D_ERROR, open_req, "can't allocate mdc_open_data");
-                        return;
-                }
-
-                spin_lock(&open_req->rq_lock);
-                och->och_mod = mod;
-                mod->mod_och = och;
-                mod->mod_open_req = open_req;
-                open_req->rq_cb_data = mod;
-                open_req->rq_commit_cb = mdc_commit_open;
-                spin_unlock(&open_req->rq_lock);
-        }
-
-        memcpy(&rec->cr_replayfid, &body->fid1, sizeof rec->cr_replayfid);
-        open_req->rq_replay_cb = mdc_replay_open;
-        if (body->fid1.id == 0) {
-                DEBUG_REQ(D_ERROR, open_req, "saving replay request with "
-                          "id = 0 gen = %u", body->fid1.generation);
-                LBUG();
-        }
-
-        DEBUG_REQ(D_RPCTRACE, open_req, "set up replay data");
-}
-
-void mdc_clear_open_replay_data(struct obd_client_handle *och)
-{
-        struct mdc_open_data *mod = och->och_mod;
-
-        /* Don't free the structure now (it happens in mdc_commit_open, after
-         * we're sure we won't need to fix up the close request in the future),
-         * but make sure that replay doesn't poke at the och, which is about to
-         * be freed. */
-        LASSERT(mod != LP_POISON);
-        if (mod != NULL)
-                mod->mod_och = NULL;
-        och->och_mod = NULL;
-}
-
-static void mdc_commit_close(struct ptlrpc_request *req)
-{
-        struct mdc_open_data *mod = req->rq_cb_data;
-        struct ptlrpc_request *open_req;
-        struct obd_import *imp = req->rq_import;
-
-        DEBUG_REQ(D_RPCTRACE, req, "close req committed");
-        if (mod == NULL)
-                return;
-
-        mod->mod_close_req = NULL;
-        req->rq_cb_data = NULL;
-        req->rq_commit_cb = NULL;
-
-        open_req = mod->mod_open_req;
-        LASSERT(open_req != NULL);
-        LASSERT(open_req != LP_POISON);
-        LASSERT(open_req->rq_type != LI_POISON);
-
-        DEBUG_REQ(D_RPCTRACE, open_req, "open req balanced");
-        LASSERT(open_req->rq_transno != 0);
-        LASSERT(open_req->rq_import == imp);
-
-        /* We no longer want to preserve this for transno-unconditional
-         * replay. */
-        spin_lock(&open_req->rq_lock);
-        open_req->rq_replay = 0;
-        spin_unlock(&open_req->rq_lock);
-}
-
-int mdc_close(struct obd_export *exp, struct obdo *oa,
-              struct obd_client_handle *och, struct ptlrpc_request **request)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        int reqsize[2] = { sizeof(struct ptlrpc_body),
-                           sizeof(struct mds_body) };
-        int rc, repsize[4] = { sizeof(struct ptlrpc_body),
-                               sizeof(struct mds_body),
-                               obd->u.cli.cl_max_mds_easize,
-                               obd->u.cli.cl_max_mds_cookiesize };
-        struct ptlrpc_request *req;
-        struct mdc_open_data *mod;
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_CLOSE, 2, reqsize, NULL);
-        if (req == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        /* To avoid a livelock (bug 7034), we need to send CLOSE RPCs to a
-         * portal whose threads are not taking any DLM locks and are therefore
-         * always progressing */
-        req->rq_request_portal = MDS_READPAGE_PORTAL;
-        ptlrpc_at_set_req_timeout(req);
-
-        /* Ensure that this close's handle is fixed up during replay. */
-        LASSERT(och != NULL);
-        LASSERT(och->och_magic == OBD_CLIENT_HANDLE_MAGIC);
-        mod = och->och_mod;
-        if (likely(mod != NULL)) {
-                if (mod->mod_open_req->rq_type == LI_POISON) {
-                        CERROR("LBUG POISONED open %p!\n", mod->mod_open_req);
-                        LBUG();
-                        ptlrpc_req_finished(req);
-                        req = NULL;
-                        GOTO(out, rc = -EIO);
-                }
-                mod->mod_close_req = req;
-                DEBUG_REQ(D_RPCTRACE, mod->mod_open_req, "matched open");
-        } else {
-                CDEBUG(D_RPCTRACE, "couldn't find open req; expecting error\n");
-        }
-
-        mdc_close_pack(req, REQ_REC_OFF, oa, oa->o_valid, och);
-
-        ptlrpc_req_set_repsize(req, 4, repsize);
-        req->rq_commit_cb = mdc_commit_close;
-        LASSERT(req->rq_cb_data == NULL);
-        req->rq_cb_data = mod;
-
-        mdc_get_rpc_lock(obd->u.cli.cl_close_lock, NULL);
-        rc = ptlrpc_queue_wait(req);
-        mdc_put_rpc_lock(obd->u.cli.cl_close_lock, NULL);
-
-        if (req->rq_repmsg == NULL) {
-                CDEBUG(D_RPCTRACE, "request failed to send: %p, %d\n", req,
-                       req->rq_status);
-                if (rc == 0)
-                        rc = req->rq_status ? req->rq_status : -EIO;
-        } else if (rc == 0) {
-                rc = lustre_msg_get_status(req->rq_repmsg);
-                if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) {
-                        DEBUG_REQ(D_ERROR, req, "type == PTL_RPC_MSG_ERR, err "
-                                  "= %d", rc);
-                        if (rc > 0)
-                                rc = -rc;
-                } else if (mod == NULL) {
-                        CERROR("Unexpected: can't find mdc_open_data, but the "
-                               "close succeeded.  Please tell CFS.\n");
-                }
-                if (!lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                        sizeof(struct mds_body),
-                                        lustre_swab_mds_body)) {
-                        CERROR("Error unpacking mds_body\n");
-                        rc = -EPROTO;
-                }
-        }
-
-        EXIT;
-        *request = req;
- out:
-        if (rc != 0 && req && req->rq_commit_cb)
-                req->rq_commit_cb(req);
-
-        return rc;
-}
-
-int mdc_done_writing(struct obd_export *exp, struct obdo *obdo)
-{
-        struct ptlrpc_request *req;
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_DONE_WRITING, 2, size, NULL);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        mdc_pack_fid(&body->fid1, obdo->o_id, 0, obdo->o_mode);
-        body->size = obdo->o_size;
-        body->blocks = obdo->o_blocks;
-        body->flags = obdo->o_flags;
-        body->valid = obdo->o_valid;
-//        memcpy(&body->handle, &och->och_fh, sizeof(body->handle));
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-int mdc_readpage(struct obd_export *exp, struct ll_fid *fid, __u64 offset,
-                 struct page *page, struct ptlrpc_request **request)
-{
-        struct obd_import *imp = class_exp2cliimp(exp);
-        struct ptlrpc_request *req = NULL;
-        struct ptlrpc_bulk_desc *desc = NULL;
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        CDEBUG(D_INODE, "inode: "LPU64"\n", fid->id);
-
-        req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, MDS_READPAGE, 2, size,
-                              NULL);
-        if (req == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        req->rq_request_portal = MDS_READPAGE_PORTAL;
-        ptlrpc_at_set_req_timeout(req);
-
-        desc = ptlrpc_prep_bulk_imp(req, 1, BULK_PUT_SINK, MDS_BULK_PORTAL);
-        if (desc == NULL)
-                GOTO(out, rc = -ENOMEM);
-        /* NB req now owns desc and will free it when it gets freed */
-
-        ptlrpc_prep_bulk_page(desc, page, 0, CFS_PAGE_SIZE);
-
-        mdc_readdir_pack(req, REQ_REC_OFF, offset, CFS_PAGE_SIZE, fid);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        rc = ptlrpc_queue_wait(req);
-
-        if (rc == 0) {
-                body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                          lustre_swab_mds_body);
-                if (body == NULL) {
-                        CERROR("Can't unpack mds_body\n");
-                        GOTO(out, rc = -EPROTO);
-                }
-
-                if (req->rq_bulk->bd_nob_transferred != CFS_PAGE_SIZE) {
-                        CERROR ("Unexpected # bytes transferred: %d"
-                                " (%lu expected)\n",
-                                req->rq_bulk->bd_nob_transferred,
-                                CFS_PAGE_SIZE);
-                        GOTO (out, rc = -EPROTO);
-                }
-        }
-
-        EXIT;
- out:
-        *request = req;
-        return rc;
-}
-
-
-static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_ioctl_data *data = karg;
-        struct obd_import *imp = obd->u.cli.cl_import;
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_INC_USE_COUNT;
-#else
-        if (!try_module_get(THIS_MODULE)) {
-                CERROR("Can't get module. Is it alive?");
-                return -EINVAL;
-        }
-#endif
-        switch (cmd) {
-        case OBD_IOC_CLIENT_RECOVER:
-                rc = ptlrpc_recover_import(imp, data->ioc_inlbuf1);
-                if (rc < 0)
-                        GOTO(out, rc);
-                GOTO(out, rc = 0);
-        case IOC_OSC_SET_ACTIVE:
-                rc = ptlrpc_set_import_active(imp, data->ioc_offset);
-                GOTO(out, rc);
-        case OBD_IOC_PARSE: {
-                ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
-                rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
-                llog_ctxt_put(ctxt);
-                GOTO(out, rc);
-        }
-#ifdef __KERNEL__
-        case OBD_IOC_LLOG_INFO:
-        case OBD_IOC_LLOG_PRINT: {
-                ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
-                rc = llog_ioctl(ctxt, cmd, data);
-                llog_ctxt_put(ctxt);
-                GOTO(out, rc);
-        }
-#endif
-        case OBD_IOC_POLL_QUOTACHECK:
-                rc = lquota_poll_check(quota_interface, exp,
-                                       (struct if_quotacheck *)karg);
-                GOTO(out, rc);
-        default:
-                CERROR("mdc_ioctl(): unrecognised ioctl %#x\n", cmd);
-                GOTO(out, rc = -ENOTTY);
-        }
-out:
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_DEC_USE_COUNT;
-#else
-        module_put(THIS_MODULE);
-#endif
-
-        return rc;
-}
-
-int mdc_set_info_async(struct obd_export *exp, obd_count keylen,
-                       void *key, obd_count vallen, void *val,
-                       struct ptlrpc_request_set *set)
-{
-        struct obd_import *imp = class_exp2cliimp(exp);
-        int rc = -EINVAL;
-
-        if (KEY_IS(KEY_INIT_RECOV)) {
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-                spin_lock(&imp->imp_lock);
-                imp->imp_initial_recov = *(int *)val;
-                spin_unlock(&imp->imp_lock);
-
-                CDEBUG(D_HA, "%s: set imp_initial_recov = %d\n",
-                       exp->exp_obd->obd_name, imp->imp_initial_recov);
-                RETURN(0);
-        }
-        /* Turn off initial_recov after we try all backup servers once */
-        if (KEY_IS(KEY_INIT_RECOV_BACKUP)) {
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-
-                spin_lock(&imp->imp_lock);
-                imp->imp_initial_recov_bk = *(int *)val;
-                if (imp->imp_initial_recov_bk)
-                        imp->imp_initial_recov = 1;
-                spin_unlock(&imp->imp_lock);
-
-                CDEBUG(D_HA, "%s: set imp_initial_recov_bk = %d\n",
-                       exp->exp_obd->obd_name, imp->imp_initial_recov_bk);
-                RETURN(0);
-        }
-        if (KEY_IS("read-only")) {
-                struct ptlrpc_request *req;
-                int size[3] = { sizeof(struct ptlrpc_body), keylen, vallen };
-                char *bufs[3] = { NULL, key, val };
-
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-
-                if (*((int *)val)) {
-                        imp->imp_connect_flags_orig |= OBD_CONNECT_RDONLY;
-                        imp->imp_connect_data.ocd_connect_flags |=
-                                OBD_CONNECT_RDONLY;
-                } else {
-                        imp->imp_connect_flags_orig &= ~OBD_CONNECT_RDONLY;
-                        imp->imp_connect_data.ocd_connect_flags &=
-                                ~OBD_CONNECT_RDONLY;
-                }
-
-                req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, MDS_SET_INFO,
-                                      3, size, bufs);
-                if (req == NULL)
-                        RETURN(-ENOMEM);
-
-                ptlrpc_req_set_repsize(req, 1, NULL);
-                if (set) {
-                        rc = 0;
-                        ptlrpc_set_add_req(set, req);
-                        ptlrpc_check_set(set);
-                } else {
-                        rc = ptlrpc_queue_wait(req);
-                        ptlrpc_req_finished(req);
-                }
-
-                RETURN(rc);
-        }
-
-        RETURN(rc);
-}
-
-int mdc_get_info(struct obd_export *exp, __u32 keylen, void *key,
-                 __u32 *vallen, void *val)
-{
-        int rc = -EINVAL;
-
-        if (keylen == strlen("max_easize") &&
-            memcmp(key, "max_easize", strlen("max_easize")) == 0) {
-                int mdsize, *max_easize;
-
-                if (*vallen != sizeof(int))
-                        RETURN(-EINVAL);
-                mdsize = *(int*)val;
-                if (mdsize > exp->exp_obd->u.cli.cl_max_mds_easize)
-                        exp->exp_obd->u.cli.cl_max_mds_easize = mdsize;
-                max_easize = val;
-                *max_easize = exp->exp_obd->u.cli.cl_max_mds_easize;
-                RETURN(0);
-        }
-        RETURN(rc);
-}
-
-static int mdc_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                      __u64 max_age, __u32 flags)
-{
-        struct ptlrpc_request *req;
-        struct obd_statfs *msfs;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*msfs) };
-        ENTRY;
-
-        /* We could possibly pass max_age in the request (as an absolute
-         * timestamp or a "seconds.usec ago") so the target can avoid doing
-         * extra calls into the filesystem if that isn't necessary (e.g.
-         * during mount that would help a bit).  Having relative timestamps
-         * is not so great if request processing is slow, while absolute
-         * timestamps are not ideal because they need time synchronization. */
-        req = ptlrpc_prep_req(obd->u.cli.cl_import, LUSTRE_MDS_VERSION,
-                              MDS_STATFS, 1, NULL, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        if (flags & OBD_STATFS_NODELAY) {
-                /* procfs requests not want stay in wait for avoid deadlock */
-                req->rq_no_resend = 1;
-                req->rq_no_delay = 1;
-        }
-
-        rc = ptlrpc_queue_wait(req);
-
-        if (rc)
-                GOTO(out, rc);
-
-        msfs = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*msfs),
-                                  lustre_swab_obd_statfs);
-        if (msfs == NULL) {
-                CERROR("Can't unpack obd_statfs\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        memcpy(osfs, msfs, sizeof(*msfs));
-        EXIT;
-out:
-        ptlrpc_req_finished(req);
-
-        return rc;
-}
-
-static int mdc_pin(struct obd_export *exp, obd_id ino, __u32 gen, int type,
-                   struct obd_client_handle *handle, int flag)
-{
-        struct ptlrpc_request *req;
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_PIN, 2, size, NULL);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        mdc_pack_fid(&body->fid1, ino, gen, type);
-        body->flags = flag;
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-        rc = ptlrpc_queue_wait(req);
-        mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-        if (rc) {
-                CERROR("pin failed: %d\n", rc);
-                ptlrpc_req_finished(req);
-                RETURN(rc);
-        }
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL) {
-                ptlrpc_req_finished(req);
-                RETURN(rc);
-        }
-
-        memcpy(&handle->och_fh, &body->handle, sizeof(body->handle));
-        handle->och_magic = OBD_CLIENT_HANDLE_MAGIC;
-
-        OBD_ALLOC(handle->och_mod, sizeof(*handle->och_mod));
-        if (handle->och_mod == NULL) {
-                DEBUG_REQ(D_ERROR, req, "can't allocate mdc_open_data");
-                RETURN(-ENOMEM);
-        }
-        handle->och_mod->mod_open_req = req; /* will be dropped by unpin */
-
-        RETURN(rc);
-}
-
-static int mdc_unpin(struct obd_export *exp,
-                     struct obd_client_handle *handle, int flag)
-{
-        struct ptlrpc_request *req;
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        if (handle->och_magic != OBD_CLIENT_HANDLE_MAGIC)
-                RETURN(0);
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_CLOSE, 2, size, NULL);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->handle, &handle->och_fh, sizeof(body->handle));
-        body->flags = flag;
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-        mdc_get_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-        rc = ptlrpc_queue_wait(req);
-        mdc_put_rpc_lock(exp->exp_obd->u.cli.cl_rpc_lock, NULL);
-
-        if (rc != 0)
-                CERROR("unpin failed: %d\n", rc);
-
-        ptlrpc_req_finished(req);
-        ptlrpc_req_finished(handle->och_mod->mod_open_req);
-        OBD_FREE(handle->och_mod, sizeof(*handle->och_mod));
-        RETURN(rc);
-}
-
-int mdc_sync(struct obd_export *exp, struct ll_fid *fid,
-             struct ptlrpc_request **request)
-{
-        struct ptlrpc_request *req;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(struct mds_body) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MDS_VERSION,
-                              MDS_SYNC, 2, size, NULL);
-        if (!req)
-                RETURN(rc = -ENOMEM);
-
-        mdc_pack_req_body(req, REQ_REC_OFF, 0, fid, 0, 0);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc || request == NULL)
-                ptlrpc_req_finished(req);
-        else
-                *request = req;
-
-        RETURN(rc);
-}
-
-static int mdc_import_event(struct obd_device *obd, struct obd_import *imp,
-                            enum obd_import_event event)
-{
-        int rc = 0;
-
-        LASSERT(imp->imp_obd == obd);
-
-        switch (event) {
-        case IMP_EVENT_DISCON: {
-                ptlrpc_import_setasync(imp, -obd->obd_namespace->ns_max_unused);
-                break;
-        }
-        case IMP_EVENT_INACTIVE: {
-                rc = obd_notify_observer(obd, obd, OBD_NOTIFY_INACTIVE, NULL);
-                break;
-        }
-        case IMP_EVENT_INVALIDATE: {
-                struct ldlm_namespace *ns = obd->obd_namespace;
-
-                ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
-
-                break;
-        }
-        case IMP_EVENT_ACTIVE: {
-                rc = obd_notify_observer(obd, obd, OBD_NOTIFY_ACTIVE, NULL);
-                break;
-        }
-        case IMP_EVENT_OCD:
-                ptlrpc_import_setasync(imp, obd->obd_namespace->ns_max_unused);
-                break;
-
-        default:
-                CERROR("Unknown import event %x\n", event);
-                LBUG();
-        }
-        RETURN(rc);
-}
-
-static int mdc_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct client_obd *cli = &obd->u.cli;
-        struct lprocfs_static_vars lvars = { 0 };
-        int rc;
-        ENTRY;
-
-        OBD_ALLOC(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
-        if (!cli->cl_rpc_lock)
-                RETURN(-ENOMEM);
-        mdc_init_rpc_lock(cli->cl_rpc_lock);
-
-        ptlrpcd_addref();
-
-        OBD_ALLOC(cli->cl_setattr_lock, sizeof (*cli->cl_setattr_lock));
-        if (!cli->cl_setattr_lock)
-                GOTO(err_rpc_lock, rc = -ENOMEM);
-        mdc_init_rpc_lock(cli->cl_setattr_lock);
-
-        OBD_ALLOC(cli->cl_close_lock, sizeof (*cli->cl_close_lock));
-        if (!cli->cl_close_lock)
-                GOTO(err_setattr_lock, rc = -ENOMEM);
-        mdc_init_rpc_lock(cli->cl_close_lock);
-
-        rc = client_obd_setup(obd, len, buf);
-        if (rc)
-                GOTO(err_close_lock, rc);
-        lprocfs_mdc_init_vars(&lvars);
-        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0)
-                ptlrpc_lprocfs_register_obd(obd);
-
-        rc = obd_llog_init(obd, obd, 0, NULL, NULL);
-        if (rc) {
-                mdc_cleanup(obd);
-                CERROR("failed to setup llogging subsystems\n");
-        }
-
-        RETURN(rc);
-
-err_close_lock:
-        OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock));
-err_setattr_lock:
-        OBD_FREE(cli->cl_setattr_lock, sizeof (*cli->cl_setattr_lock));
-err_rpc_lock:
-        OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
-        ptlrpcd_decref();
-        RETURN(rc);
-}
-
-/* Initialize the default and maximum LOV EA and cookie sizes.  This allows
- * us to make MDS RPCs with large enough reply buffers to hold the
- * maximum-sized (= maximum striped) EA and cookie without having to
- * calculate this (via a call into the LOV + OSCs) each time we make an RPC. */
-int mdc_init_ea_size(struct obd_export *mdc_exp, struct obd_export *lov_exp)
-{
-        struct obd_device *obd = mdc_exp->exp_obd;
-        struct client_obd *cli = &obd->u.cli;
-        struct lov_stripe_md lsm = { .lsm_magic = LOV_MAGIC };
-        struct lov_desc desc;
-        __u32 valsize = sizeof(desc);
-        __u32 stripes;
-        int rc, size;
-        ENTRY;
-
-        rc = obd_get_info(lov_exp, strlen(KEY_LOVDESC) + 1, KEY_LOVDESC,
-                          &valsize, &desc);
-        if (rc)
-                RETURN(rc);
-
-        stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT);
-        lsm.lsm_stripe_count = stripes;
-        size = obd_size_diskmd(lov_exp, &lsm);
-        
-        if (cli->cl_max_mds_easize < size)
-                cli->cl_max_mds_easize = size;
-
-        lsm.lsm_stripe_count = desc.ld_default_stripe_count;
-        size = obd_size_diskmd(lov_exp, &lsm);
-
-        if (cli->cl_default_mds_easize < size)
-                cli->cl_default_mds_easize = size;
-
-        size = stripes * sizeof(struct llog_cookie);
-        if (cli->cl_max_mds_cookiesize < size)
-                cli->cl_max_mds_cookiesize = size;
-
-        CDEBUG(D_HA, "updating max_mdsize/max_cookiesize: %d/%d\n",
-               cli->cl_max_mds_easize, cli->cl_max_mds_cookiesize);
-        
-        RETURN(0);
-}
-
-static int mdc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY: 
-        case OBD_CLEANUP_EXPORTS:
-                /* If we set up but never connected, the
-                   client import will not have been cleaned. */
-                if (obd->u.cli.cl_import) {
-                        struct obd_import *imp;
-                        imp = obd->u.cli.cl_import;
-                        CERROR("client import never connected\n");
-                        ptlrpc_invalidate_import(imp);
-                        ptlrpc_free_rq_pool(imp->imp_rq_pool);
-                        class_destroy_import(imp);
-                        obd->u.cli.cl_import = NULL;
-                }
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                rc = obd_llog_finish(obd, 0);
-                if (rc != 0)
-                        CERROR("failed to cleanup llogging subsystems\n");
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int mdc_cleanup(struct obd_device *obd)
-{
-        struct client_obd *cli = &obd->u.cli;
-
-        OBD_FREE(cli->cl_rpc_lock, sizeof (*cli->cl_rpc_lock));
-        OBD_FREE(cli->cl_setattr_lock, sizeof (*cli->cl_setattr_lock));
-        OBD_FREE(cli->cl_close_lock, sizeof (*cli->cl_close_lock));
-
-        ptlrpc_lprocfs_unregister_obd(obd);
-        lprocfs_obd_cleanup(obd);
-        ptlrpcd_decref();
-
-        return client_obd_cleanup(obd);
-}
-
-
-static int mdc_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                         int count, struct llog_catid *logid, 
-                         struct obd_uuid *uuid)
-{
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL,
-                        &llog_client_ops);
-        if (rc == 0) {
-                ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
-                ctxt->loc_imp = obd->u.cli.cl_import;
-                llog_ctxt_put(ctxt);
-        }
-
-        rc = llog_setup(obd, LLOG_LOVEA_REPL_CTXT, tgt, 0, NULL,
-                       &llog_client_ops);
-        if (rc == 0) {
-                ctxt = llog_get_context(obd, LLOG_LOVEA_REPL_CTXT);
-                ctxt->loc_imp = obd->u.cli.cl_import;
-                llog_ctxt_put(ctxt);
-        }
-
-        RETURN(rc);
-}
-
-static int mdc_llog_finish(struct obd_device *obd, int count)
-{
-        int rc;
-        ENTRY;
-
-        rc = llog_cleanup(llog_get_context(obd, LLOG_LOVEA_REPL_CTXT));
-        if (rc) {
-                CERROR("can not cleanup LLOG_CONFIG_REPL_CTXT rc %d\n", rc);
-        }
-        rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_REPL_CTXT));
-        RETURN(rc);
-}
-
-static int mdc_process_config(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lustre_cfg *lcfg = buf;
-        struct lprocfs_static_vars lvars = { 0 };
-        int rc = 0;
-
-        lprocfs_mdc_init_vars(&lvars);
-        
-        rc = class_process_proc_param(PARAM_MDC, lvars.obd_vars, lcfg, obd);
-        return(rc);
-}
-
-struct obd_ops mdc_obd_ops = {
-        .o_owner        = THIS_MODULE,
-        .o_setup        = mdc_setup,
-        .o_precleanup   = mdc_precleanup,
-        .o_cleanup      = mdc_cleanup,
-        .o_add_conn     = client_import_add_conn,
-        .o_del_conn     = client_import_del_conn,
-        .o_connect      = client_connect_import,
-        .o_disconnect   = client_disconnect_export,
-        .o_iocontrol    = mdc_iocontrol,
-        .o_set_info_async = mdc_set_info_async,
-        .o_get_info     = mdc_get_info,
-        .o_statfs       = mdc_statfs,
-        .o_pin          = mdc_pin,
-        .o_unpin        = mdc_unpin,
-        .o_import_event = mdc_import_event,
-        .o_llog_init    = mdc_llog_init,
-        .o_llog_finish  = mdc_llog_finish,
-        .o_process_config = mdc_process_config,
-};
-
-int __init mdc_init(void)
-{
-        int rc;
-        struct lprocfs_static_vars lvars = { 0 };
-        lprocfs_mdc_init_vars(&lvars);
-        request_module("lquota");
-        quota_interface = PORTAL_SYMBOL_GET(mdc_quota_interface);
-        init_obd_quota_ops(quota_interface, &mdc_obd_ops);
-
-        rc = class_register_type(&mdc_obd_ops, lvars.module_vars,
-                                 LUSTRE_MDC_NAME);
-        if (rc && quota_interface)
-                PORTAL_SYMBOL_PUT(mdc_quota_interface);
-
-        RETURN(rc);
-}
-
-#ifdef __KERNEL__
-static void /*__exit*/ mdc_exit(void)
-{
-        if (quota_interface)
-                PORTAL_SYMBOL_PUT(mdc_quota_interface);
-
-        class_unregister_type(LUSTRE_MDC_NAME);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Metadata Client");
-MODULE_LICENSE("GPL");
-
-EXPORT_SYMBOL(mdc_req2lustre_md);
-EXPORT_SYMBOL(mdc_free_lustre_md);
-EXPORT_SYMBOL(mdc_change_cbdata);
-EXPORT_SYMBOL(mdc_getstatus);
-EXPORT_SYMBOL(mdc_getattr);
-EXPORT_SYMBOL(mdc_getattr_name);
-EXPORT_SYMBOL(mdc_create);
-EXPORT_SYMBOL(mdc_unlink);
-EXPORT_SYMBOL(mdc_rename);
-EXPORT_SYMBOL(mdc_link);
-EXPORT_SYMBOL(mdc_readpage);
-EXPORT_SYMBOL(mdc_setattr);
-EXPORT_SYMBOL(mdc_close);
-EXPORT_SYMBOL(mdc_done_writing);
-EXPORT_SYMBOL(mdc_sync);
-EXPORT_SYMBOL(mdc_set_open_replay_data);
-EXPORT_SYMBOL(mdc_clear_open_replay_data);
-EXPORT_SYMBOL(mdc_store_inode_generation);
-EXPORT_SYMBOL(mdc_init_ea_size);
-EXPORT_SYMBOL(mdc_getxattr);
-EXPORT_SYMBOL(mdc_setxattr);
-
-module_init(mdc_init);
-module_exit(mdc_exit);
-#endif
diff --git a/lustre/mds/.cvsignore b/lustre/mds/.cvsignore
deleted file mode 100644
index d5103fafd735a92dd05fc733eaa24d9d40e41390..0000000000000000000000000000000000000000
--- a/lustre/mds/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.o.flags
-.tmp_versions
-.depend
diff --git a/lustre/mds/Makefile.in b/lustre/mds/Makefile.in
deleted file mode 100644
index 96d7ec7f7c7bf2b8ba73e846122bd55e5045b2f5..0000000000000000000000000000000000000000
--- a/lustre/mds/Makefile.in
+++ /dev/null
@@ -1,5 +0,0 @@
-MODULES := mds
-mds-objs := mds_log.o mds_unlink_open.o mds_lov.o handler.o mds_reint.o
-mds-objs += mds_fs.o lproc_mds.o mds_open.o mds_lib.o mds_xattr.o mds_join.o
-
-@INCLUDE_RULES@
diff --git a/lustre/mds/autoMakefile.am b/lustre/mds/autoMakefile.am
deleted file mode 100644
index e5bdbcfba46094cc65c66de7f4afcc8d62c9d805..0000000000000000000000000000000000000000
--- a/lustre/mds/autoMakefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if MODULES
-modulefs_DATA = mds$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES := $(mds-objs:%.o=%.c) mds_internal.h
diff --git a/lustre/mds/commit_confd.c b/lustre/mds/commit_confd.c
deleted file mode 100644
index 8dd2fcdcb3ccb1d31c6f906066892080f81234b5..0000000000000000000000000000000000000000
--- a/lustre/mds/commit_confd.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2005 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-void commit_add(struct )
-{
-        struct obd_import *import = commit_uuid2import(rec->  uuid);
-
-        if (!import) {
-                CERROR("unaware of OST UUID %s - dorpping\n", rec-> uuid);
-                EXIT;
-                return;
-        }
-
-        spin_lock(&import->llcconf_lock);
-        list_add(&rec->  &import);
-        spin_unlock(&import->llcconf_lock);
-        EXIT;
-        return;
-}
-
-void commit_confd_conf_import(struct obd_import *import,
-                              struct llog_commit_confirm_daemon *lccd)
-{
-        struct list_head *tmp, *save;
-
-
-        list_for_each_safe(&import->import_cc_list, tmp, save) {
-                struct llog_canceld_ctxt *cd;
-
-                if (atomic_read(import->import_cc_count) <=
-                    lccd->llcconf_lowwater)
-                        break;
-
-                cd = list_entry(tmp, struct llog_canceld_ctxt *, llcconf_entry);
-                atomic_dec(&import->import_cc_count);
-                commit_confd_add_and_fire(cd);
-        }
-        EXIT;
-        return;
-}
-
-
-int commit_confd_main(void *data)
-{
-        struct llog_commit_confirm_daemon *lccd = data;
-
-        while (1) {
-                /* something has happened */
-                event_wait();
-
-                if (lccd->flags & LCCD_STOP)
-                        break;
-
-
-                /* lock llccd imporlist */
-                spin_lock(&lccd->llcconf_lock);
-                list_for_each_safe(&lccd->llcconf_list,   ) {
-                        struct obd_import *import;
-                        import = list_entry(&lccd->llcconf_list,
-                                            struct obd_import,
-                                            import_entry);
-                        get_import(import);
-                        spin_unlock(&lccd->llcconf_lock);
-                        if (atomic_read(import->import_cc_count) >
-                            lccd->llcconf_highwater)
-                                commit_confd_conf_import(import);
-                        put_import(import);
-                        spin_lock(&lccd->llcconf_lock);
-
-                }
-                spin_unlock(&lccd->llcconf_lock);
-
-        }
-
-        lccd->flags = LCCD_STOPPED;
-        RETURN(0);
-}
diff --git a/lustre/mds/handler.c b/lustre/mds/handler.c
deleted file mode 100644
index 072591a1252cff7c1c8cb38dfcf32069018fe897..0000000000000000000000000000000000000000
--- a/lustre/mds/handler.c
+++ /dev/null
@@ -1,2822 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mds/handler.c
- *  Lustre Metadata Server (mds) request handler
- *
- *  Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Mike Shaver <shaver@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <lustre_mds.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/random.h>
-#include <linux/fs.h>
-#include <linux/jbd.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# include <linux/smp_lock.h>
-# include <linux/buffer_head.h>
-# include <linux/workqueue.h>
-# include <linux/mount.h>
-#else
-# include <linux/locks.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_dlm.h>
-#include <obd_lov.h>
-#include <lustre_fsfilt.h>
-#include <lprocfs_status.h>
-#include <lustre_commit_confd.h>
-#include <lustre_quota.h>
-#include <lustre_disk.h>
-#include <lustre_param.h>
-
-#include "mds_internal.h"
-
-int mds_num_threads;
-CFS_MODULE_PARM(mds_num_threads, "i", int, 0444,
-                "number of MDS service threads to start");
-
-static int mds_intent_policy(struct ldlm_namespace *ns,
-                             struct ldlm_lock **lockp, void *req_cookie,
-                             ldlm_mode_t mode, int flags, void *data);
-static int mds_postsetup(struct obd_device *obd);
-static int mds_cleanup(struct obd_device *obd);
-
-/* Assumes caller has already pushed into the kernel filesystem context */
-static int mds_sendpage(struct ptlrpc_request *req, struct file *file,
-                        loff_t offset, int count)
-{
-        struct ptlrpc_bulk_desc *desc;
-        struct l_wait_info lwi;
-        struct page **pages;
-        int timeout;
-        int rc = 0, npages, i, tmpcount, tmpsize = 0;
-        ENTRY;
-
-        LASSERT((offset & ~CFS_PAGE_MASK) == 0); /* I'm dubious about this */
-
-        npages = (count + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-        OBD_ALLOC(pages, sizeof(*pages) * npages);
-        if (!pages)
-                GOTO(out, rc = -ENOMEM);
-
-        desc = ptlrpc_prep_bulk_exp(req, npages, BULK_PUT_SOURCE,
-                                    MDS_BULK_PORTAL);
-        if (desc == NULL)
-                GOTO(out_free, rc = -ENOMEM);
-
-        for (i = 0, tmpcount = count; i < npages; i++, tmpcount -= tmpsize) {
-                tmpsize = tmpcount > CFS_PAGE_SIZE ? CFS_PAGE_SIZE : tmpcount;
-
-                OBD_PAGE_ALLOC(pages[i], CFS_ALLOC_STD);
-                if (pages[i] == NULL)
-                        GOTO(cleanup_buf, rc = -ENOMEM);
-
-                ptlrpc_prep_bulk_page(desc, pages[i], 0, tmpsize);
-        }
-
-        for (i = 0, tmpcount = count; i < npages; i++, tmpcount -= tmpsize) {
-                tmpsize = tmpcount > CFS_PAGE_SIZE ? CFS_PAGE_SIZE : tmpcount;
-                CDEBUG(D_EXT2, "reading %u@%llu from dir %lu (size %llu)\n",
-                       tmpsize, offset, file->f_dentry->d_inode->i_ino,
-                       i_size_read(file->f_dentry->d_inode));
-
-                rc = fsfilt_readpage(req->rq_export->exp_obd, file,
-                                     kmap(pages[i]), tmpsize, &offset);
-                kunmap(pages[i]);
-
-                if (rc != tmpsize)
-                        GOTO(cleanup_buf, rc = -EIO);
-        }
-
-        LASSERT(desc->bd_nob == count);
-
-        rc = ptlrpc_start_bulk_transfer(desc);
-        if (rc)
-                GOTO(cleanup_buf, rc);
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SENDPAGE)) {
-                CERROR("obd_fail_loc=%x, fail operation rc=%d\n",
-                       OBD_FAIL_MDS_SENDPAGE, rc);
-                GOTO(abort_bulk, rc);
-        }
-
-        timeout = (int)req->rq_deadline - (int)cfs_time_current_sec();
-        if (timeout < 0) {
-                CERROR("Req deadline already passed %lu (now: %lu)\n",
-                       req->rq_deadline, cfs_time_current_sec());
-        }
-        lwi = LWI_TIMEOUT(max(timeout, 1) * HZ, NULL, NULL);
-        rc = l_wait_event(desc->bd_waitq, !ptlrpc_bulk_active(desc), &lwi);
-        LASSERT (rc == 0 || rc == -ETIMEDOUT);
-
-        if (rc == 0) {
-                if (desc->bd_success &&
-                    desc->bd_nob_transferred == count)
-                        GOTO(cleanup_buf, rc);
-
-                rc = -ETIMEDOUT; /* XXX should this be a different errno? */
-        }
-
-        DEBUG_REQ(D_ERROR, req, "bulk failed: %s %d(%d), evicting %s@%s\n",
-                  (rc == -ETIMEDOUT) ? "timeout" : "network error",
-                  desc->bd_nob_transferred, count,
-                  req->rq_export->exp_client_uuid.uuid,
-                  req->rq_export->exp_connection->c_remote_uuid.uuid);
-
-        class_fail_export(req->rq_export);
-
-        EXIT;
- abort_bulk:
-        ptlrpc_abort_bulk (desc);
- cleanup_buf:
-        for (i = 0; i < npages; i++)
-                if (pages[i])
-                        OBD_PAGE_FREE(pages[i]);
-
-        ptlrpc_free_bulk(desc);
- out_free:
-        OBD_FREE(pages, sizeof(*pages) * npages);
- out:
-        return rc;
-}
-
-/* only valid locked dentries or errors should be returned */
-struct dentry *mds_fid2locked_dentry(struct obd_device *obd, struct ll_fid *fid,
-                                     struct vfsmount **mnt, int lock_mode,
-                                     struct lustre_handle *lockh,
-                                     char *name, int namelen, __u64 lockpart)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct dentry *de = mds_fid2dentry(mds, fid, mnt), *retval = de;
-        struct ldlm_res_id res_id = { .name = {0} };
-        int flags = LDLM_FL_ATOMIC_CB, rc;
-        ldlm_policy_data_t policy = { .l_inodebits = { lockpart} }; 
-        ENTRY;
-
-        if (IS_ERR(de))
-                RETURN(de);
-
-        res_id.name[0] = de->d_inode->i_ino;
-        res_id.name[1] = de->d_inode->i_generation;
-        rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, 
-                                    LDLM_IBITS, &policy, lock_mode, &flags, 
-                                    ldlm_blocking_ast, ldlm_completion_ast,
-                                    NULL, NULL, 0, NULL, lockh);
-        if (rc != ELDLM_OK) {
-                l_dput(de);
-                retval = ERR_PTR(-EIO); /* XXX translate ldlm code */
-        }
-
-        RETURN(retval);
-}
-
-/* Look up an entry by inode number. */
-/* this function ONLY returns valid dget'd dentries with an initialized inode
-   or errors */
-struct dentry *mds_fid2dentry(struct mds_obd *mds, struct ll_fid *fid,
-                              struct vfsmount **mnt)
-{
-        char fid_name[32];
-        unsigned long ino = fid->id;
-        __u32 generation = fid->generation;
-        struct inode *inode;
-        struct dentry *result;
-
-        if (ino == 0)
-                RETURN(ERR_PTR(-ESTALE));
-
-        snprintf(fid_name, sizeof(fid_name), "0x%lx", ino);
-
-        CDEBUG(D_DENTRY, "--> mds_fid2dentry: ino/gen %lu/%u, sb %p\n",
-               ino, generation, mds->mds_obt.obt_sb);
-
-        /* under ext3 this is neither supposed to return bad inodes
-           nor NULL inodes. */
-        result = ll_lookup_one_len(fid_name, mds->mds_fid_de, strlen(fid_name));
-        if (IS_ERR(result))
-                RETURN(result);
-
-        inode = result->d_inode;
-        if (!inode)
-                RETURN(ERR_PTR(-ENOENT));
-
-       if (inode->i_nlink == 0) {
-                if (inode->i_mode == 0 &&
-                    LTIME_S(inode->i_ctime) == 0 ) {
-                        struct obd_device *obd = container_of(mds, struct
-                                                              obd_device, u.mds);
-                        LCONSOLE_WARN("Found inode with zero nlink, mode and "
-                                      "ctime -- this may indicate disk"
-                                      "corruption (device %s, inode %lu, link:"
-                                      " %lu, count: %d)\n", obd->obd_name, inode->i_ino,
-                                      (unsigned long)inode->i_nlink,
-                                      atomic_read(&inode->i_count));
-                }
-                dput(result);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        if (generation && inode->i_generation != generation) {
-                /* we didn't find the right inode.. */
-                CDEBUG(D_INODE, "found wrong generation: inode %lu, link: %lu, "
-                       "count: %d, generation %u/%u\n", inode->i_ino,
-                       (unsigned long)inode->i_nlink,
-                       atomic_read(&inode->i_count), inode->i_generation,
-                       generation);
-                dput(result);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        if (mnt) {
-                *mnt = mds->mds_vfsmnt;
-                mntget(*mnt);
-        }
-
-        RETURN(result);
-}
-
-static int mds_connect_internal(struct obd_export *exp, 
-                                struct obd_connect_data *data)
-{
-        struct obd_device *obd = exp->exp_obd;
-        if (data != NULL) {
-                data->ocd_connect_flags &= MDS_CONNECT_SUPPORTED;
-                data->ocd_ibits_known &= MDS_INODELOCK_FULL;
-
-                /* If no known bits (which should not happen, probably,
-                   as everybody should support LOOKUP and UPDATE bits at least)
-                   revert to compat mode with plain locks. */
-                if (!data->ocd_ibits_known &&
-                    data->ocd_connect_flags & OBD_CONNECT_IBITS)
-                        data->ocd_connect_flags &= ~OBD_CONNECT_IBITS;
-
-                if (!obd->u.mds.mds_fl_acl)
-                        data->ocd_connect_flags &= ~OBD_CONNECT_ACL;
-
-                if (!obd->u.mds.mds_fl_user_xattr)
-                        data->ocd_connect_flags &= ~OBD_CONNECT_XATTR;
-
-                exp->exp_connect_flags = data->ocd_connect_flags;
-                data->ocd_version = LUSTRE_VERSION_CODE;
-                exp->exp_mds_data.med_ibits_known = data->ocd_ibits_known;
-        }
-
-        if (obd->u.mds.mds_fl_acl &&
-            ((exp->exp_connect_flags & OBD_CONNECT_ACL) == 0)) {
-                CWARN("%s: MDS requires ACL support but client does not\n",
-                      obd->obd_name);
-                return -EBADE;
-        }
-        return 0;
-}
-
-static int mds_reconnect(struct obd_export *exp, struct obd_device *obd,
-                         struct obd_uuid *cluuid,
-                         struct obd_connect_data *data)
-{
-        int rc;
-        ENTRY;
-
-        if (exp == NULL || obd == NULL || cluuid == NULL)
-                RETURN(-EINVAL);
-
-        rc = mds_connect_internal(exp, data);
-
-        RETURN(rc);
-}
-
-/* Establish a connection to the MDS.
- *
- * This will set up an export structure for the client to hold state data
- * about that client, like open files, the last operation number it did
- * on the server, etc.
- */
-static int mds_connect(struct lustre_handle *conn, struct obd_device *obd,
-                       struct obd_uuid *cluuid, struct obd_connect_data *data,
-                       void *localdata)
-{
-        struct obd_export *exp;
-        struct mds_export_data *med;
-        struct mds_client_data *mcd = NULL;
-        lnet_nid_t *client_nid = (lnet_nid_t *)localdata;
-        int rc, abort_recovery;
-        ENTRY;
-
-        if (!conn || !obd || !cluuid)
-                RETURN(-EINVAL);
-
-        /* Check for aborted recovery. */
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        abort_recovery = obd->obd_abort_recovery;
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-        if (abort_recovery)
-                target_abort_recovery(obd);
-
-        /* XXX There is a small race between checking the list and adding a
-         * new connection for the same UUID, but the real threat (list
-         * corruption when multiple different clients connect) is solved.
-         *
-         * There is a second race between adding the export to the list,
-         * and filling in the client data below.  Hence skipping the case
-         * of NULL mcd above.  We should already be controlling multiple
-         * connects at the client, and we can't hold the spinlock over
-         * memory allocations without risk of deadlocking.
-         */
-        rc = class_connect(conn, obd, cluuid);
-        if (rc)
-                RETURN(rc);
-        exp = class_conn2export(conn);
-        LASSERT(exp);
-        med = &exp->exp_mds_data;
-
-        rc = mds_connect_internal(exp, data);
-        if (rc)
-                GOTO(out, rc);
-
-        OBD_ALLOC(mcd, sizeof(*mcd));
-        if (!mcd)
-                GOTO(out, rc = -ENOMEM);
-
-        memcpy(mcd->mcd_uuid, cluuid, sizeof(mcd->mcd_uuid));
-        med->med_mcd = mcd;
-
-        rc = mds_client_add(obd, exp, -1, *client_nid);
-        GOTO(out, rc);
-
-out:
-        if (rc) {
-                if (mcd) {
-                        OBD_FREE(mcd, sizeof(*mcd));
-                        med->med_mcd = NULL;
-                }
-                class_disconnect(exp);
-        } else {
-                class_export_put(exp);
-        }
-
-        RETURN(rc);
-}
-
-int mds_init_export(struct obd_export *exp)
-{
-        struct mds_export_data *med = &exp->exp_mds_data;
-
-        INIT_LIST_HEAD(&med->med_open_head);
-        spin_lock_init(&med->med_open_lock);
-        
-        spin_lock(&exp->exp_lock);
-        exp->exp_connecting = 1;
-        spin_unlock(&exp->exp_lock);
-
-        RETURN(0);
-}
-
-static int mds_destroy_export(struct obd_export *export)
-{
-        struct mds_export_data *med;
-        struct obd_device *obd = export->exp_obd;
-        struct mds_obd *mds = &obd->u.mds;
-        struct lvfs_run_ctxt saved;
-        struct lov_mds_md *lmm;
-        struct llog_cookie *logcookies;
-        int rc = 0;
-        ENTRY;
-
-        med = &export->exp_mds_data;
-        target_destroy_export(export);
-
-        if (obd_uuid_equals(&export->exp_client_uuid, &obd->obd_uuid))
-                RETURN(0);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        /* Close any open files (which may also cause orphan unlinking). */
-
-        OBD_ALLOC(lmm, mds->mds_max_mdsize);
-        if (lmm == NULL) {
-                CWARN("%s: allocation failure during cleanup; can not force "
-                      "close file handles on this service.\n", obd->obd_name);
-                GOTO(out, rc = -ENOMEM);
-        }
-
-        OBD_ALLOC(logcookies, mds->mds_max_cookiesize);
-        if (logcookies == NULL) {
-                CWARN("%s: allocation failure during cleanup; can not force "
-                      "close file handles on this service.\n", obd->obd_name);
-                OBD_FREE(lmm, mds->mds_max_mdsize);
-                GOTO(out, rc = -ENOMEM);
-        }
-
-        spin_lock(&med->med_open_lock);
-        while (!list_empty(&med->med_open_head)) {
-                struct list_head *tmp = med->med_open_head.next;
-                struct mds_file_data *mfd =
-                        list_entry(tmp, struct mds_file_data, mfd_list);
-                int lmm_size = mds->mds_max_mdsize;
-                umode_t mode = mfd->mfd_dentry->d_inode->i_mode;
-                __u64 valid = 0;
-
-                /* Remove mfd handle so it can't be found again.
-                 * We are consuming the mfd_list reference here. */
-                mds_mfd_unlink(mfd, 0);
-                spin_unlock(&med->med_open_lock);
-
-                /* If you change this message, be sure to update
-                 * replay_single:test_46 */
-                CDEBUG(D_INODE|D_IOCTL, "%s: force closing file handle for "
-                       "%.*s (ino %lu)\n", obd->obd_name,
-                       mfd->mfd_dentry->d_name.len,mfd->mfd_dentry->d_name.name,
-                       mfd->mfd_dentry->d_inode->i_ino);
-
-                rc = mds_get_md(obd, mfd->mfd_dentry->d_inode, lmm,
-                                &lmm_size, 1, 0);
-                if (rc < 0)
-                        CWARN("mds_get_md failure, rc=%d\n", rc);
-                else
-                        valid |= OBD_MD_FLEASIZE;
-
-                /* child orphan sem protects orphan_dec_test and
-                 * is_orphan race, mds_mfd_close drops it */
-                MDS_DOWN_WRITE_ORPHAN_SEM(mfd->mfd_dentry->d_inode);
-
-                rc = mds_mfd_close(NULL, REQ_REC_OFF, obd, mfd,
-                                   !(export->exp_flags & OBD_OPT_FAILOVER),
-                                   lmm, lmm_size, logcookies,
-                                   mds->mds_max_cookiesize,
-                                   &valid);
-
-                if (rc)
-                        CDEBUG(D_INODE|D_IOCTL, "Error closing file: %d\n", rc);
-
-                if (valid & OBD_MD_FLCOOKIE) {
-                        rc = mds_osc_destroy_orphan(obd, mode, lmm,
-                                                    lmm_size, logcookies, 1);
-                        if (rc < 0) {
-                                CDEBUG(D_INODE, "%s: destroy of orphan failed,"
-                                       " rc = %d\n", obd->obd_name, rc);
-                                rc = 0;
-                        }
-                        valid &= ~OBD_MD_FLCOOKIE;
-                }
-
-                spin_lock(&med->med_open_lock);
-        }
-
-        OBD_FREE(logcookies, mds->mds_max_cookiesize);
-        OBD_FREE(lmm, mds->mds_max_mdsize);
-
-        spin_unlock(&med->med_open_lock);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        mds_client_free(export);
-
- out:
-        RETURN(rc);
-}
-
-static int mds_disconnect(struct obd_export *exp)
-{
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(exp);
-        class_export_get(exp);
-
-        /* Disconnect early so that clients can't keep using export */
-        rc = class_disconnect(exp);
-        if (exp->exp_obd->obd_namespace != NULL)
-                ldlm_cancel_locks_for_export(exp);
-
-        /* complete all outstanding replies */
-        spin_lock(&exp->exp_lock);
-        while (!list_empty(&exp->exp_outstanding_replies)) {
-                struct ptlrpc_reply_state *rs =
-                        list_entry(exp->exp_outstanding_replies.next,
-                                   struct ptlrpc_reply_state, rs_exp_list);
-                struct ptlrpc_service *svc = rs->rs_service;
-
-                spin_lock(&svc->srv_lock);
-                list_del_init(&rs->rs_exp_list);
-                ptlrpc_schedule_difficult_reply(rs);
-                spin_unlock(&svc->srv_lock);
-        }
-        spin_unlock(&exp->exp_lock);
-
-        class_export_put(exp);
-        RETURN(rc);
-}
-
-static int mds_getstatus(struct ptlrpc_request *req)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_MDS_GETSTATUS_PACK, req->rq_status = -ENOMEM);
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(req->rq_status = rc);
-
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*body));
-        memcpy(&body->fid1, &mds->mds_rootfid, sizeof(body->fid1));
-
-        /* the last_committed and last_xid fields are filled in for all
-         * replies already - no need to do so here also.
-         */
-        RETURN(0);
-}
-
-/* get the LOV EA from @inode and store it into @md.  It can be at most
- * @size bytes, and @size is updated with the actual EA size.
- * The EA size is also returned on success, and -ve errno on failure. 
- * If there is no EA then 0 is returned. */
-int mds_get_md(struct obd_device *obd, struct inode *inode, void *md,
-               int *size, int lock, int flags)
-{
-        int rc = 0;
-        int lmm_size = 0;
-
-        if (lock)
-                LOCK_INODE_MUTEX(inode);
-        rc = fsfilt_get_md(obd, inode, md, *size, "lov");
-
-        if (rc == 0 && flags == MDS_GETATTR)
-                rc = mds_get_default_md(obd, md, &lmm_size);
-
-        if (rc < 0) {
-                CERROR("Error %d reading eadata for ino %lu\n",
-                       rc, inode->i_ino);
-        } else if (rc > 0) {
-                lmm_size = rc;
-                rc = mds_convert_lov_ea(obd, inode, md, lmm_size);
-
-                if (rc == 0) {
-                        *size = lmm_size;
-                        rc = lmm_size;
-                } else if (rc > 0) {
-                        *size = rc;
-                }
-        } else {
-                *size = 0;
-        }
-        if (lock)
-                UNLOCK_INODE_MUTEX(inode);
-
-        RETURN (rc);
-}
-
-
-/* Call with lock=1 if you want mds_pack_md to take the i_mutex.
- * Call with lock=0 if the caller has already taken the i_mutex. */
-int mds_pack_md(struct obd_device *obd, struct lustre_msg *msg, int offset,
-                struct mds_body *body, struct inode *inode, int lock, int flags)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        void *lmm;
-        int lmm_size;
-        int rc;
-        ENTRY;
-
-        lmm = lustre_msg_buf(msg, offset, 0);
-        if (lmm == NULL) {
-                /* Some problem with getting eadata when I sized the reply
-                 * buffer... */
-                CDEBUG(D_INFO, "no space reserved for inode %lu MD\n",
-                       inode->i_ino);
-                RETURN(0);
-        }
-        lmm_size = lustre_msg_buflen(msg, offset);
-
-        /* I don't really like this, but it is a sanity check on the client
-         * MD request.  However, if the client doesn't know how much space
-         * to reserve for the MD, it shouldn't be bad to have too much space.
-         */
-        if (lmm_size > mds->mds_max_mdsize) {
-                CWARN("Reading MD for inode %lu of %d bytes > max %d\n",
-                       inode->i_ino, lmm_size, mds->mds_max_mdsize);
-                // RETURN(-EINVAL);
-        }
-
-        rc = mds_get_md(obd, inode, lmm, &lmm_size, lock, flags);
-        if (rc > 0) {
-                if (S_ISDIR(inode->i_mode))
-                        body->valid |= OBD_MD_FLDIREA;
-                else
-                        body->valid |= OBD_MD_FLEASIZE;
-                body->eadatasize = lmm_size;
-                rc = 0;
-        }
-
-        RETURN(rc);
-}
-
-#ifdef CONFIG_FS_POSIX_ACL
-static
-int mds_pack_posix_acl(struct inode *inode, struct lustre_msg *repmsg,
-                       struct mds_body *repbody, int repoff)
-{
-        struct dentry de = { .d_inode = inode };
-        int buflen, rc;
-        ENTRY;
-
-        LASSERT(repbody->aclsize == 0);
-        LASSERT(lustre_msg_bufcount(repmsg) > repoff);
-
-        buflen = lustre_msg_buflen(repmsg, repoff);
-        if (!buflen)
-                GOTO(out, 0);
-
-        if (!inode->i_op || !inode->i_op->getxattr)
-                GOTO(out, 0);
-
-        lock_24kernel();
-        rc = inode->i_op->getxattr(&de, MDS_XATTR_NAME_ACL_ACCESS,
-                                   lustre_msg_buf(repmsg, repoff, buflen),
-                                   buflen);
-        unlock_24kernel();
-
-        if (rc >= 0)
-                repbody->aclsize = rc;
-        else if (rc != -ENODATA) {
-                CERROR("buflen %d, get acl: %d\n", buflen, rc);
-                RETURN(rc);
-        }
-        EXIT;
-out:
-        repbody->valid |= OBD_MD_FLACL;
-        return 0;
-}
-#else
-#define mds_pack_posix_acl(inode, repmsg, repbody, repoff) 0
-#endif
-
-int mds_pack_acl(struct mds_export_data *med, struct inode *inode,
-                 struct lustre_msg *repmsg, struct mds_body *repbody,
-                 int repoff)
-{
-        return mds_pack_posix_acl(inode, repmsg, repbody, repoff);
-}
-
-static int mds_getattr_internal(struct obd_device *obd, struct dentry *dentry,
-                                struct ptlrpc_request *req,
-                                struct mds_body *reqbody, int reply_off)
-{
-        struct mds_body *body;
-        struct inode *inode = dentry->d_inode;
-        int rc = 0;
-        int flags = 0;
-        ENTRY;
-
-        if (inode == NULL)
-                RETURN(-ENOENT);
-
-        body = lustre_msg_buf(req->rq_repmsg, reply_off, sizeof(*body));
-        LASSERT(body != NULL);                 /* caller prepped reply */
-
-        mds_pack_inode2fid(&body->fid1, inode);
-        body->flags = reqbody->flags; /* copy MDS_BFLAG_EXT_FLAGS if present */
-        mds_pack_inode2body(body, inode);
-        reply_off++;
-
-        if ((S_ISREG(inode->i_mode) && (reqbody->valid & OBD_MD_FLEASIZE)) ||
-            (S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA))) {
-                if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR &&
-                   ((S_ISDIR(inode->i_mode) && (reqbody->valid & OBD_MD_FLDIREA))))
-                        flags = MDS_GETATTR;
-
-                rc = mds_pack_md(obd, req->rq_repmsg, reply_off, body,
-                                 inode, 1, flags);
-
-                /* If we have LOV EA data, the OST holds size, atime, mtime */
-                if (!(body->valid & OBD_MD_FLEASIZE) &&
-                    !(body->valid & OBD_MD_FLDIREA))
-                        body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                        OBD_MD_FLATIME | OBD_MD_FLMTIME);
-
-                lustre_shrink_reply(req, reply_off, body->eadatasize, 0);
-                if (body->eadatasize)
-                        reply_off++;
-        } else if (S_ISLNK(inode->i_mode) &&
-                   (reqbody->valid & OBD_MD_LINKNAME) != 0) {
-                char *symname = lustre_msg_buf(req->rq_repmsg, reply_off, 0);
-                int len;
-
-                LASSERT (symname != NULL);       /* caller prepped reply */
-                len = lustre_msg_buflen(req->rq_repmsg, reply_off);
-
-                rc = inode->i_op->readlink(dentry, symname, len);
-                if (rc < 0) {
-                        CERROR("readlink failed: %d\n", rc);
-                } else if (rc != len - 1) {
-                        CERROR ("Unexpected readlink rc %d: expecting %d\n",
-                                rc, len - 1);
-                        rc = -EINVAL;
-                } else {
-                        CDEBUG(D_INODE, "read symlink dest %s\n", symname);
-                        body->valid |= OBD_MD_LINKNAME;
-                        body->eadatasize = rc + 1;
-                        symname[rc] = 0;        /* NULL terminate */
-                        rc = 0;
-                }
-                reply_off++;
-        } else if (reqbody->valid == OBD_MD_FLFLAGS &&
-                   reqbody->flags & MDS_BFLAG_EXT_FLAGS) {
-                int flags;
-
-                /* We only return the full set of flags on ioctl, otherwise we
-                 * get enough flags from the inode in mds_pack_inode2body(). */
-                rc = fsfilt_iocontrol(obd, inode, NULL, EXT3_IOC_GETFLAGS,
-                                      (long)&flags);
-                if (rc == 0)
-                        body->flags = flags | MDS_BFLAG_EXT_FLAGS;
-        }
-
-        if (reqbody->valid & OBD_MD_FLMODEASIZE) {
-                struct mds_obd *mds = mds_req2mds(req);
-                body->max_cookiesize = mds->mds_max_cookiesize;
-                body->max_mdsize = mds->mds_max_mdsize;
-                body->valid |= OBD_MD_FLMODEASIZE;
-        }
-
-        if (rc)
-                RETURN(rc);
-
-#ifdef CONFIG_FS_POSIX_ACL
-        if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) &&
-            (reqbody->valid & OBD_MD_FLACL)) {
-                rc = mds_pack_acl(&req->rq_export->exp_mds_data,
-                                  inode, req->rq_repmsg,
-                                  body, reply_off);
-
-                lustre_shrink_reply(req, reply_off, body->aclsize, 0);
-                if (body->aclsize)
-                        reply_off++;
-        }
-#endif
-
-        RETURN(rc);
-}
-
-static int mds_getattr_pack_msg(struct ptlrpc_request *req, struct inode *inode,
-                                int offset)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct mds_body *body;
-        int rc, bufcount = 2;
-        int size[4] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        LASSERT(offset == REQ_REC_OFF); /* non-intent */
-
-        body = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*body));
-        LASSERT(body != NULL);                    /* checked by caller */
-        LASSERT(lustre_req_swabbed(req, offset)); /* swabbed by caller */
-
-        if ((S_ISREG(inode->i_mode) && (body->valid & OBD_MD_FLEASIZE)) ||
-            (S_ISDIR(inode->i_mode) && (body->valid & OBD_MD_FLDIREA))) {
-                LOCK_INODE_MUTEX(inode);
-                rc = fsfilt_get_md(req->rq_export->exp_obd, inode, NULL, 0,
-                                   "lov");
-                UNLOCK_INODE_MUTEX(inode);
-                CDEBUG(D_INODE, "got %d bytes MD data for inode %lu\n",
-                       rc, inode->i_ino);
-                if ((rc == 0) && (lustre_msg_get_opc(req->rq_reqmsg) == MDS_GETATTR) &&
-                     ((S_ISDIR(inode->i_mode) && (body->valid & OBD_MD_FLDIREA))))
-                        rc = sizeof(struct lov_mds_md);
-                if (rc < 0) {
-                        if (rc != -ENODATA) {
-                                CERROR("error getting inode %lu MD: rc = %d\n",
-                                       inode->i_ino, rc);
-                                RETURN(rc);
-                        }
-                        size[bufcount] = 0;
-                } else if (rc > mds->mds_max_mdsize) {
-                        size[bufcount] = 0;
-                        CERROR("MD size %d larger than maximum possible %u\n",
-                               rc, mds->mds_max_mdsize);
-                } else {
-                        size[bufcount] = rc;
-                }
-                bufcount++;
-        } else if (S_ISLNK(inode->i_mode) && (body->valid & OBD_MD_LINKNAME)) {
-                if (i_size_read(inode) + 1 != body->eadatasize)
-                        CERROR("symlink size: %Lu, reply space: %d\n",
-                               i_size_read(inode) + 1, body->eadatasize);
-                size[bufcount] = min_t(int, i_size_read(inode) + 1,
-                                       body->eadatasize);
-                bufcount++;
-                CDEBUG(D_INODE, "symlink size: %Lu, reply space: %d\n",
-                       i_size_read(inode) + 1, body->eadatasize);
-        }
-
-#ifdef CONFIG_FS_POSIX_ACL
-        if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) &&
-            (body->valid & OBD_MD_FLACL)) {
-                struct dentry de = { .d_inode = inode };
-
-                size[bufcount] = 0;
-                if (inode->i_op && inode->i_op->getxattr) {
-                        lock_24kernel();
-                        rc = inode->i_op->getxattr(&de, MDS_XATTR_NAME_ACL_ACCESS,
-                                                   NULL, 0);
-                        unlock_24kernel();
-
-                        if (rc < 0) {
-                                if (rc != -ENODATA) {
-                                        CERROR("got acl size: %d\n", rc);
-                                        RETURN(rc);
-                                }
-                        } else
-                                size[bufcount] = rc;
-                }
-                bufcount++;
-        }
-#endif
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETATTR_PACK)) {
-                CERROR("failed MDS_GETATTR_PACK test\n");
-                req->rq_status = -ENOMEM;
-                RETURN(-ENOMEM);
-        }
-
-        rc = lustre_pack_reply(req, bufcount, size, NULL);
-        if (rc) {
-                req->rq_status = rc;
-                RETURN(rc);
-        }
-
-        RETURN(0);
-}
-
-static int mds_getattr_lock(struct ptlrpc_request *req, int offset,
-                            int child_part, struct lustre_handle *child_lockh)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_obd *mds = &obd->u.mds;
-        struct ldlm_reply *rep = NULL;
-        struct lvfs_run_ctxt saved;
-        struct mds_body *body;
-        struct dentry *dparent = NULL, *dchild = NULL;
-        struct lvfs_ucred uc = {NULL,};
-        struct lustre_handle parent_lockh;
-        int namesize;
-        int rc = 0, cleanup_phase = 0, resent_req = 0;
-        char *name;
-        ENTRY;
-
-        LASSERT(!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME));
-
-        /* Swab now, before anyone looks inside the request */
-        body = lustre_swab_reqbuf(req, offset, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL) {
-                CERROR("Can't swab mds_body\n");
-                RETURN(-EFAULT);
-        }
-
-        lustre_set_req_swabbed(req, offset + 1);
-        name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0);
-        if (name == NULL) {
-                CERROR("Can't unpack name\n");
-                RETURN(-EFAULT);
-        }
-        namesize = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-        /* namesize less than 2 means we have empty name, probably came from
-           revalidate by cfid, so no point in having name to be set */
-        if (namesize <= 1)
-                name = NULL;
-
-        rc = mds_init_ucred(&uc, req, offset);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        LASSERT(offset == REQ_REC_OFF || offset == DLM_INTENT_REC_OFF);
-        /* if requests were at offset 2, the getattr reply goes back at 1 */
-        if (offset == DLM_INTENT_REC_OFF) {
-                rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF,
-                                     sizeof(*rep));
-                offset = DLM_REPLY_REC_OFF;
-        }
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-        cleanup_phase = 1; /* kernel context */
-        intent_set_disposition(rep, DISP_LOOKUP_EXECD);
-
-        /* FIXME: handle raw lookup */
-#if 0
-        if (body->valid == OBD_MD_FLID) {
-                struct mds_body *mds_reply;
-                int size = sizeof(*mds_reply);
-                ino_t inum;
-                // The user requested ONLY the inode number, so do a raw lookup
-                rc = lustre_pack_reply(req, 1, &size, NULL);
-                if (rc) {
-                        CERROR("out of memory\n");
-                        GOTO(cleanup, rc);
-                }
-
-                rc = dir->i_op->lookup_raw(dir, name, namesize - 1, &inum);
-
-                mds_reply = lustre_msg_buf(req->rq_repmsg, offset,
-                                           sizeof(*mds_reply));
-                mds_reply->fid1.id = inum;
-                mds_reply->valid = OBD_MD_FLID;
-                GOTO(cleanup, rc);
-        }
-#endif
-
-        if (lustre_handle_is_used(child_lockh)) {
-                LASSERT(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT);
-                resent_req = 1;
-        }
-
-        if (resent_req == 0) {
-                if (name) {
-                        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_RESEND, obd_timeout*2);
-                        rc = mds_get_parent_child_locked(obd, &obd->u.mds, 
-                                                         &body->fid1,
-                                                         &parent_lockh, 
-                                                         &dparent, LCK_CR,
-                                                         MDS_INODELOCK_UPDATE,
-                                                         name, namesize,
-                                                         child_lockh, &dchild,
-                                                         LCK_CR, child_part);
-                } else {
-                        /* For revalidate by fid we always take UPDATE lock */
-                        dchild = mds_fid2locked_dentry(obd, &body->fid2, NULL,
-                                                       LCK_CR, child_lockh,
-                                                       NULL, 0, child_part);
-                        LASSERT(dchild);
-                        if (IS_ERR(dchild))
-                                rc = PTR_ERR(dchild);
-                } 
-                if (rc)
-                        GOTO(cleanup, rc);
-        } else {
-                struct ldlm_lock *granted_lock;
-                struct ll_fid child_fid;
-                struct ldlm_resource *res;
-                DEBUG_REQ(D_DLMTRACE, req, "resent, not enqueuing new locks");
-                granted_lock = ldlm_handle2lock(child_lockh);
-                LASSERTF(granted_lock != NULL, LPU64"/%u lockh "LPX64"\n",
-                         body->fid1.id, body->fid1.generation,
-                         child_lockh->cookie);
-
-
-                res = granted_lock->l_resource;
-                child_fid.id = res->lr_name.name[0];
-                child_fid.generation = res->lr_name.name[1];
-                dchild = mds_fid2dentry(&obd->u.mds, &child_fid, NULL);
-                LASSERT(!IS_ERR(dchild));
-                LDLM_LOCK_PUT(granted_lock);
-        }
-
-        cleanup_phase = 2; /* dchild, dparent, locks */
-
-        if (dchild->d_inode == NULL) {
-                intent_set_disposition(rep, DISP_LOOKUP_NEG);
-                /* in the intent case, the policy clears this error:
-                   the disposition is enough */
-                GOTO(cleanup, rc = -ENOENT);
-        } else {
-                intent_set_disposition(rep, DISP_LOOKUP_POS);
-        }
-
-        if (req->rq_repmsg == NULL) {
-                rc = mds_getattr_pack_msg(req, dchild->d_inode, offset);
-                if (rc != 0) {
-                        CERROR ("mds_getattr_pack_msg: %d\n", rc);
-                        GOTO (cleanup, rc);
-                }
-        }
-
-        rc = mds_getattr_internal(obd, dchild, req, body, offset);
-        GOTO(cleanup, rc); /* returns the lock to the client */
-
- cleanup:
-        switch (cleanup_phase) {
-        case 2:
-                if (resent_req == 0) {
-                        if (rc && dchild->d_inode)
-                                ldlm_lock_decref(child_lockh, LCK_CR);
-                        if (name) {
-                                ldlm_lock_decref(&parent_lockh, LCK_CR);
-                                l_dput(dparent);
-                        }
-                }
-                l_dput(dchild);
-        case 1:
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-        default:
-                mds_exit_ucred(&uc, mds);
-                if (!req->rq_packed_final) {
-                        int rc2 = lustre_pack_reply(req, 1, NULL, NULL);
-                        if (rc == 0)
-                                rc = rc2;
-                        req->rq_status = rc;
-                }
-        }
-        return rc;
-}
-
-static int mds_getattr(struct ptlrpc_request *req, int offset)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct lvfs_run_ctxt saved;
-        struct dentry *de;
-        struct mds_body *body;
-        struct lvfs_ucred uc = { NULL, };
-        int rc = 0;
-        ENTRY;
-
-        OBD_COUNTER_INCREMENT(obd, getattr);
-
-        body = lustre_swab_reqbuf(req, offset, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        rc = mds_init_ucred(&uc, req, offset);
-        if (rc)
-                GOTO(out_ucred, rc);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-        de = mds_fid2dentry(mds, &body->fid1, NULL);
-        if (IS_ERR(de)) {
-                rc = req->rq_status = PTR_ERR(de);
-                GOTO(out_pop, rc);
-        }
-
-        rc = mds_getattr_pack_msg(req, de->d_inode, offset);
-        if (rc != 0) {
-                CERROR("mds_getattr_pack_msg: %d\n", rc);
-                GOTO(out_pop, rc);
-        }
-
-        req->rq_status = mds_getattr_internal(obd, de, req, body,REPLY_REC_OFF);
-
-        l_dput(de);
-        GOTO(out_pop, rc);
-out_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-out_ucred:
-        if (!req->rq_packed_final) {
-                int rc2 = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc == 0)
-                        rc = rc2;
-                req->rq_status = rc;
-        }
-        mds_exit_ucred(&uc, mds);
-        return rc;
-}
-
-static int mds_obd_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                          __u64 max_age, __u32 flags)
-{
-        int rc;
-
-        spin_lock(&obd->obd_osfs_lock);
-        rc = fsfilt_statfs(obd, obd->u.obt.obt_sb, max_age);
-        if (rc == 0)
-                memcpy(osfs, &obd->obd_osfs, sizeof(*osfs));
-        spin_unlock(&obd->obd_osfs_lock);
-
-        return rc;
-}
-
-static int mds_statfs(struct ptlrpc_request *req)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct ptlrpc_service *svc = req->rq_rqbd->rqbd_service;
-        int rc, size[2] = { sizeof(struct ptlrpc_body),
-                            sizeof(struct obd_statfs) };
-        ENTRY;
-
-        /* This will trigger a watchdog timeout */
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_STATFS_LCW_SLEEP,
-                         (MDS_SERVICE_WATCHDOG_FACTOR * 
-                          at_get(&svc->srv_at_estimate) / 1000) + 1);
-        OBD_COUNTER_INCREMENT(obd, statfs);
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_STATFS_PACK))
-                GOTO(out, rc = -ENOMEM);
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        /* We call this so that we can cache a bit - 1 jiffie worth */
-        rc = mds_obd_statfs(obd, lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                                size[REPLY_REC_OFF]),
-                            cfs_time_current_64() - HZ, 0);
-        if (rc) {
-                CERROR("mds_obd_statfs failed: rc %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        EXIT;
-out:
-        req->rq_status = rc;
-        return 0;
-}
-
-static int mds_sync(struct ptlrpc_request *req, int offset)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_obd *mds = &obd->u.mds;
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, offset, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL)
-                GOTO(out, rc = -EFAULT);
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_SYNC_PACK))
-                GOTO(out, rc = -ENOMEM);
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        rc = fsfilt_sync(obd, obd->u.obt.obt_sb);
-        if (rc == 0 && body->fid1.id != 0) {
-                struct dentry *de;
-
-                de = mds_fid2dentry(mds, &body->fid1, NULL);
-                if (IS_ERR(de))
-                        GOTO(out, rc = PTR_ERR(de));
-
-                body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*body));
-                mds_pack_inode2fid(&body->fid1, de->d_inode);
-                mds_pack_inode2body(body, de->d_inode);
-
-                l_dput(de);
-        }
-        GOTO(out, rc);
-out:
-        req->rq_status = rc;
-        return 0;
-}
-
-/* mds_readpage does not take a DLM lock on the inode, because the client must
- * already have a PR lock.
- *
- * If we were to take another one here, a deadlock will result, if another
- * thread is already waiting for a PW lock. */
-static int mds_readpage(struct ptlrpc_request *req, int offset)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_obd *mds = &obd->u.mds;
-        struct vfsmount *mnt;
-        struct dentry *de;
-        struct file *file;
-        struct mds_body *body, *repbody;
-        struct lvfs_run_ctxt saved;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
-        struct lvfs_ucred uc = {NULL,};
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_MDS_READPAGE_PACK, -ENOMEM);
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        body = lustre_swab_reqbuf(req, offset, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL)
-                GOTO (out, rc = -EFAULT);
-
-        rc = mds_init_ucred(&uc, req, offset);
-        if (rc)
-                GOTO(out, rc);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-        de = mds_fid2dentry(&obd->u.mds, &body->fid1, &mnt);
-        if (IS_ERR(de))
-                GOTO(out_pop, rc = PTR_ERR(de));
-
-        CDEBUG(D_INODE, "ino %lu\n", de->d_inode->i_ino);
-
-        file = dentry_open(de, mnt, O_RDONLY | O_LARGEFILE);
-        /* note: in case of an error, dentry_open puts dentry */
-        if (IS_ERR(file))
-                GOTO(out_pop, rc = PTR_ERR(file));
-
-        /* body->size is actually the offset -eeb */
-        if ((body->size & (de->d_inode->i_sb->s_blocksize - 1)) != 0) {
-                CERROR("offset "LPU64" not on a block boundary of %lu\n",
-                       body->size, de->d_inode->i_sb->s_blocksize);
-                GOTO(out_file, rc = -EFAULT);
-        }
-
-        /* body->nlink is actually the #bytes to read -eeb */
-        if (body->nlink & (de->d_inode->i_sb->s_blocksize - 1)) {
-                CERROR("size %u is not multiple of blocksize %lu\n",
-                       body->nlink, de->d_inode->i_sb->s_blocksize);
-                GOTO(out_file, rc = -EFAULT);
-        }
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        repbody->size = i_size_read(file->f_dentry->d_inode);
-        repbody->valid = OBD_MD_FLSIZE;
-
-        /* to make this asynchronous make sure that the handling function
-           doesn't send a reply when this function completes. Instead a
-           callback function would send the reply */
-        /* body->size is actually the offset -eeb */
-        rc = mds_sendpage(req, file, body->size, body->nlink);
-
-out_file:
-        filp_close(file, 0);
-out_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-out:
-        mds_exit_ucred(&uc, mds);
-        req->rq_status = rc;
-        RETURN(0);
-}
-
-int mds_reint(struct ptlrpc_request *req, int offset,
-              struct lustre_handle *lockh)
-{
-        struct mds_update_record *rec; /* 116 bytes on the stack?  no sir! */
-        int rc;
-
-        OBD_ALLOC(rec, sizeof(*rec));
-        if (rec == NULL)
-                RETURN(-ENOMEM);
-
-        rc = mds_update_unpack(req, offset, rec);
-        if (rc || OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNPACK)) {
-                CERROR("invalid record\n");
-                GOTO(out, req->rq_status = -EINVAL);
-        }
-
-        mds_root_squash(&req->rq_export->exp_obd->u.mds, &req->rq_peer.nid,
-                        &rec->ur_uc.luc_fsuid, &rec->ur_uc.luc_fsgid,
-                        &rec->ur_uc.luc_cap, &rec->ur_uc.luc_suppgid1,
-                        &rec->ur_uc.luc_suppgid2);
-
-        /* rc will be used to interrupt a for loop over multiple records */
-        rc = mds_reint_rec(rec, offset, req, lockh);
- out:
-        OBD_FREE(rec, sizeof(*rec));
-        return rc;
-}
-
-static int mds_filter_recovery_request(struct ptlrpc_request *req,
-                                       struct obd_device *obd, int *process)
-{
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-        case MDS_CONNECT: /* This will never get here, but for completeness. */
-        case OST_CONNECT: /* This will never get here, but for completeness. */
-        case MDS_DISCONNECT:
-        case OST_DISCONNECT:
-               *process = 1;
-               RETURN(0);
-
-        case MDS_CLOSE:
-        case MDS_SYNC: /* used in unmounting */
-        case OBD_PING:
-        case MDS_REINT:
-        case LDLM_ENQUEUE:
-                *process = target_queue_recovery_request(req, obd);
-                RETURN(0);
-
-        default:
-                DEBUG_REQ(D_ERROR, req, "not permitted during recovery");
-                *process = 0;
-                /* XXX what should we set rq_status to here? */
-                req->rq_status = -EAGAIN;
-                RETURN(ptlrpc_error(req));
-        }
-}
-
-static char *reint_names[] = {
-        [REINT_SETATTR] "setattr",
-        [REINT_CREATE]  "create",
-        [REINT_LINK]    "link",
-        [REINT_UNLINK]  "unlink",
-        [REINT_RENAME]  "rename",
-        [REINT_OPEN]    "open",
-};
-
-static int mds_set_info_rpc(struct obd_export *exp, struct ptlrpc_request *req)
-{
-        void *key, *val;
-        int keylen, vallen, rc = 0;
-        ENTRY;
-
-        key = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, 1);
-        if (key == NULL) {
-                DEBUG_REQ(D_HA, req, "no set_info key");
-                RETURN(-EFAULT);
-        }
-        keylen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF);
-
-        val = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, 0);
-        vallen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1);
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        lustre_msg_set_status(req->rq_repmsg, 0);
-
-        if (KEY_IS("read-only")) {
-                if (val == NULL || vallen < sizeof(__u32)) {
-                        DEBUG_REQ(D_HA, req, "no set_info val");
-                        RETURN(-EFAULT);
-                }
-
-                if (*(__u32 *)val)
-                        exp->exp_connect_flags |= OBD_CONNECT_RDONLY;
-                else
-                        exp->exp_connect_flags &= ~OBD_CONNECT_RDONLY;
-        } else {
-                RETURN(-EINVAL);
-        }
-
-        RETURN(0);
-}
-
-static int mds_handle_quotacheck(struct ptlrpc_request *req)
-{
-        struct obd_quotactl *oqctl;
-        int rc;
-        ENTRY;
-
-        oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),
-                                   lustre_swab_obd_quotactl);
-        if (oqctl == NULL)
-                RETURN(-EPROTO);
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        req->rq_status = obd_quotacheck(req->rq_export, oqctl);
-        RETURN(0);
-}
-
-static int mds_handle_quotactl(struct ptlrpc_request *req)
-{
-        struct obd_quotactl *oqctl, *repoqc;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repoqc) };
-        ENTRY;
-
-        oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),
-                                   lustre_swab_obd_quotactl);
-        if (oqctl == NULL)
-                RETURN(-EPROTO);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repoqc = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*repoqc));
-
-        req->rq_status = obd_quotactl(req->rq_export, oqctl);
-        *repoqc = *oqctl;
-        RETURN(0);
-}
-
-static int mds_msg_check_version(struct lustre_msg *msg)
-{
-        int rc;
-
-        switch (lustre_msg_get_opc(msg)) {
-        case MDS_CONNECT:
-        case MDS_DISCONNECT:
-        case OBD_PING:
-                rc = lustre_msg_check_version(msg, LUSTRE_OBD_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_OBD_VERSION);
-                break;
-        case MDS_GETSTATUS:
-        case MDS_GETATTR:
-        case MDS_GETATTR_NAME:
-        case MDS_STATFS:
-        case MDS_READPAGE:
-        case MDS_REINT:
-        case MDS_CLOSE:
-        case MDS_DONE_WRITING:
-        case MDS_PIN:
-        case MDS_SYNC:
-        case MDS_GETXATTR:
-        case MDS_SETXATTR:
-        case MDS_SET_INFO:
-        case MDS_QUOTACHECK:
-        case MDS_QUOTACTL:
-        case QUOTA_DQACQ:
-        case QUOTA_DQREL:
-                rc = lustre_msg_check_version(msg, LUSTRE_MDS_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_MDS_VERSION);
-                break;
-        case LDLM_ENQUEUE:
-        case LDLM_CONVERT:
-        case LDLM_BL_CALLBACK:
-        case LDLM_CP_CALLBACK:
-                rc = lustre_msg_check_version(msg, LUSTRE_DLM_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_DLM_VERSION);
-                break;
-        case OBD_LOG_CANCEL:
-        case LLOG_ORIGIN_HANDLE_CREATE:
-        case LLOG_ORIGIN_HANDLE_NEXT_BLOCK:
-        case LLOG_ORIGIN_HANDLE_READ_HEADER:
-        case LLOG_ORIGIN_HANDLE_CLOSE:
-        case LLOG_ORIGIN_HANDLE_DESTROY:
-        case LLOG_ORIGIN_HANDLE_PREV_BLOCK:
-        case LLOG_CATINFO:
-                rc = lustre_msg_check_version(msg, LUSTRE_LOG_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_LOG_VERSION);
-                break;
-        default:
-                CERROR("MDS unknown opcode %d\n", lustre_msg_get_opc(msg));
-                rc = -ENOTSUPP;
-        }
-        return rc;
-}
-
-int mds_handle(struct ptlrpc_request *req)
-{
-        int should_process, fail = OBD_FAIL_MDS_ALL_REPLY_NET;
-        int rc = 0;
-        struct mds_obd *mds = NULL; /* quell gcc overwarning */
-        struct obd_device *obd = NULL;
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_MDS_ALL_REQUEST_NET | OBD_FAIL_ONCE, 0);
-
-        LASSERT(current->journal_info == NULL);
-
-        rc = mds_msg_check_version(req->rq_reqmsg);
-        if (rc) {
-                CERROR("MDS drop mal-formed request\n");
-                RETURN(rc);
-        }
-
-        /* XXX identical to OST */
-        if (lustre_msg_get_opc(req->rq_reqmsg) != MDS_CONNECT) {
-                struct mds_export_data *med;
-                int recovering, abort_recovery;
-
-                if (req->rq_export == NULL) {
-                        CERROR("operation %d on unconnected MDS from %s\n",
-                               lustre_msg_get_opc(req->rq_reqmsg),
-                               libcfs_id2str(req->rq_peer));
-                        req->rq_status = -ENOTCONN;
-                        GOTO(out, rc = -ENOTCONN);
-                }
-
-                med = &req->rq_export->exp_mds_data;
-                obd = req->rq_export->exp_obd;
-                mds = &obd->u.mds;
-
-                /* sanity check: if the xid matches, the request must
-                 * be marked as a resent or replayed */
-                if (req->rq_xid == le64_to_cpu(med->med_mcd->mcd_last_xid) ||
-                   req->rq_xid == le64_to_cpu(med->med_mcd->mcd_last_close_xid))
-                        if (!(lustre_msg_get_flags(req->rq_reqmsg) &
-                                 (MSG_RESENT | MSG_REPLAY))) {
-                                CERROR("rq_xid "LPU64" matches last_xid, "
-                                       "expected RESENT flag\n",
-                                        req->rq_xid);
-                                req->rq_status = -ENOTCONN;
-                                GOTO(out, rc = -EFAULT);
-                        }
-                /* else: note the opposite is not always true; a
-                 * RESENT req after a failover will usually not match
-                 * the last_xid, since it was likely never
-                 * committed. A REPLAYed request will almost never
-                 * match the last xid, however it could for a
-                 * committed, but still retained, open. */
-
-                /* Check for aborted recovery. */
-                spin_lock_bh(&obd->obd_processing_task_lock);
-                abort_recovery = obd->obd_abort_recovery;
-                recovering = obd->obd_recovering;
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                if (abort_recovery) {
-                        target_abort_recovery(obd);
-                } else if (recovering) {
-                        rc = mds_filter_recovery_request(req, obd,
-                                                         &should_process);
-                        if (rc || !should_process)
-                                RETURN(rc);
-                }
-        }
-
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-        case MDS_CONNECT:
-                DEBUG_REQ(D_INODE, req, "connect");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_CONNECT_NET, 0);
-                rc = target_handle_connect(req, mds_handle);
-                if (!rc) {
-                        /* Now that we have an export, set mds. */
-                        obd = req->rq_export->exp_obd;
-                        mds = mds_req2mds(req);
-                }
-                break;
-
-        case MDS_DISCONNECT:
-                DEBUG_REQ(D_INODE, req, "disconnect");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_DISCONNECT_NET, 0);
-                rc = target_handle_disconnect(req);
-                req->rq_status = rc;            /* superfluous? */
-                break;
-
-        case MDS_GETSTATUS:
-                DEBUG_REQ(D_INODE, req, "getstatus");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_GETSTATUS_NET, 0);
-                rc = mds_getstatus(req);
-                break;
-
-        case MDS_GETATTR:
-                DEBUG_REQ(D_INODE, req, "getattr");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_GETATTR_NET, 0);
-                rc = mds_getattr(req, REQ_REC_OFF);
-                break;
-
-        case MDS_SETXATTR:
-                DEBUG_REQ(D_INODE, req, "setxattr");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_SETXATTR_NET, 0);
-                rc = mds_setxattr(req);
-                break;
-
-        case MDS_GETXATTR:
-                DEBUG_REQ(D_INODE, req, "getxattr");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_GETXATTR_NET, 0);
-                rc = mds_getxattr(req);
-                break;
-
-        case MDS_GETATTR_NAME: {
-                struct lustre_handle lockh = { 0 };
-                DEBUG_REQ(D_INODE, req, "getattr_name");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_GETATTR_NAME_NET, 0);
-
-                /* If this request gets a reconstructed reply, we won't be
-                 * acquiring any new locks in mds_getattr_lock, so we don't
-                 * want to cancel.
-                 */
-                rc = mds_getattr_lock(req, REQ_REC_OFF, MDS_INODELOCK_UPDATE,
-                                      &lockh);
-                /* this non-intent call (from an ioctl) is special */
-                req->rq_status = rc;
-                if (rc == 0 && lustre_handle_is_used(&lockh))
-                        ldlm_lock_decref(&lockh, LCK_CR);
-                break;
-        }
-        case MDS_STATFS:
-                DEBUG_REQ(D_INODE, req, "statfs");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_STATFS_NET, 0);
-                rc = mds_statfs(req);
-                break;
-
-        case MDS_READPAGE:
-                DEBUG_REQ(D_INODE, req, "readpage");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_READPAGE_NET, 0);
-                rc = mds_readpage(req, REQ_REC_OFF);
-
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_SENDPAGE)) {
-                        RETURN(0);
-                }
-
-                break;
-
-        case MDS_REINT: {
-                __u32 *opcp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                             sizeof(*opcp));
-                __u32  opc;
-                int op = 0;
-                int size[4] = { sizeof(struct ptlrpc_body),
-                                sizeof(struct mds_body),
-                                mds->mds_max_mdsize,
-                                mds->mds_max_cookiesize };
-                int bufcount;
-
-                /* NB only peek inside req now; mds_reint() will swab it */
-                if (opcp == NULL) {
-                        CERROR ("Can't inspect opcode\n");
-                        rc = -EINVAL;
-                        break;
-                }
-                opc = *opcp;
-                if (lustre_msg_swabbed(req->rq_reqmsg))
-                        __swab32s(&opc);
-
-                DEBUG_REQ(D_INODE, req, "reint %d (%s)", opc,
-                          (opc < sizeof(reint_names) / sizeof(reint_names[0]) ||
-                           reint_names[opc] == NULL) ? reint_names[opc] :
-                                                       "unknown opcode");
-
-                switch (opc) {
-                case REINT_CREATE:
-                        op = PTLRPC_LAST_CNTR + MDS_REINT_CREATE;
-                        break;
-                case REINT_LINK:
-                        op = PTLRPC_LAST_CNTR + MDS_REINT_LINK;
-                        break;
-                case REINT_OPEN:
-                        op = PTLRPC_LAST_CNTR + MDS_REINT_OPEN;
-                        break;
-                case REINT_SETATTR:
-                        op = PTLRPC_LAST_CNTR + MDS_REINT_SETATTR;
-                        break;
-                case REINT_RENAME:
-                        op = PTLRPC_LAST_CNTR + MDS_REINT_RENAME;
-                        break;
-                case REINT_UNLINK:
-                        op = PTLRPC_LAST_CNTR + MDS_REINT_UNLINK;
-                        break;
-                default:
-                        op = 0;
-                        break;
-                }
-
-                if (op && req->rq_rqbd->rqbd_service->srv_stats)
-                        lprocfs_counter_incr(
-                                req->rq_rqbd->rqbd_service->srv_stats, op);
-
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_REINT_NET, 0);
-
-                if (opc == REINT_UNLINK || opc == REINT_RENAME)
-                        bufcount = 4;
-                else if (opc == REINT_OPEN)
-                        bufcount = 3;
-                else
-                        bufcount = 2;
-
-                rc = lustre_pack_reply(req, bufcount, size, NULL);
-                if (rc)
-                        break;
-
-                rc = mds_reint(req, REQ_REC_OFF, NULL);
-                fail = OBD_FAIL_MDS_REINT_NET_REP;
-                break;
-        }
-
-        case MDS_CLOSE:
-                DEBUG_REQ(D_INODE, req, "close");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_CLOSE_NET, 0);
-                rc = mds_close(req, REQ_REC_OFF);
-                fail = OBD_FAIL_MDS_CLOSE_NET_REP;
-                break;
-
-        case MDS_DONE_WRITING:
-                DEBUG_REQ(D_INODE, req, "done_writing");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_DONE_WRITING_NET, 0);
-                rc = mds_done_writing(req, REQ_REC_OFF);
-                break;
-
-        case MDS_PIN:
-                DEBUG_REQ(D_INODE, req, "pin");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_PIN_NET, 0);
-                rc = mds_pin(req, REQ_REC_OFF);
-                break;
-
-        case MDS_SYNC:
-                DEBUG_REQ(D_INODE, req, "sync");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_SYNC_NET, 0);
-                rc = mds_sync(req, REQ_REC_OFF);
-                break;
-
-        case MDS_SET_INFO:
-                DEBUG_REQ(D_INODE, req, "set_info");
-                rc = mds_set_info_rpc(req->rq_export, req);
-                break;
-
-        case MDS_QUOTACHECK:
-                DEBUG_REQ(D_INODE, req, "quotacheck");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_QUOTACHECK_NET, 0);
-                rc = mds_handle_quotacheck(req);
-                break;
-
-        case MDS_QUOTACTL:
-                DEBUG_REQ(D_INODE, req, "quotactl");
-                OBD_FAIL_RETURN(OBD_FAIL_MDS_QUOTACTL_NET, 0);
-                rc = mds_handle_quotactl(req);
-                break;
-
-        case OBD_PING:
-                DEBUG_REQ(D_INODE, req, "ping");
-                rc = target_handle_ping(req);
-                break;
-
-        case OBD_LOG_CANCEL:
-                CDEBUG(D_INODE, "log cancel\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0);
-                rc = -ENOTSUPP; /* la la la */
-                break;
-
-        case LDLM_ENQUEUE:
-                DEBUG_REQ(D_INODE, req, "enqueue");
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_ENQUEUE, 0);
-                rc = ldlm_handle_enqueue(req, ldlm_server_completion_ast,
-                                         ldlm_server_blocking_ast, NULL);
-                fail = OBD_FAIL_LDLM_REPLY;
-                break;
-        case LDLM_CONVERT:
-                DEBUG_REQ(D_INODE, req, "convert");
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_CONVERT, 0);
-                rc = ldlm_handle_convert(req);
-                break;
-        case LDLM_BL_CALLBACK:
-        case LDLM_CP_CALLBACK:
-                DEBUG_REQ(D_INODE, req, "callback");
-                CERROR("callbacks should not happen on MDS\n");
-                LBUG();
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_BL_CALLBACK, 0);
-                break;
-        case LLOG_ORIGIN_HANDLE_CREATE:
-                DEBUG_REQ(D_INODE, req, "llog_init");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_create(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_DESTROY:
-                DEBUG_REQ(D_INODE, req, "llog_init");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_destroy(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_NEXT_BLOCK:
-                DEBUG_REQ(D_INODE, req, "llog next block");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_next_block(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_PREV_BLOCK:
-                DEBUG_REQ(D_INODE, req, "llog prev block");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_prev_block(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_READ_HEADER:
-                DEBUG_REQ(D_INODE, req, "llog read header");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_read_header(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_CLOSE:
-                DEBUG_REQ(D_INODE, req, "llog close");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_origin_handle_close(req);
-                break;
-        case LLOG_CATINFO:
-                DEBUG_REQ(D_INODE, req, "llog catinfo");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOGD_NET, 0);
-                rc = llog_catinfo(req);
-                break;
-        default:
-                req->rq_status = -ENOTSUPP;
-                rc = ptlrpc_error(req);
-                RETURN(rc);
-        }
-
-        LASSERT(current->journal_info == NULL);
-
-        /* If we're DISCONNECTing, the mds_export_data is already freed */
-        if (!rc && lustre_msg_get_opc(req->rq_reqmsg) != MDS_DISCONNECT) {
-                struct mds_export_data *med = &req->rq_export->exp_mds_data;
-                
-                /* I don't think last_xid is used for anyway, so I'm not sure
-                   if we need to care about last_close_xid here.*/
-                lustre_msg_set_last_xid(req->rq_repmsg,
-                                       le64_to_cpu(med->med_mcd->mcd_last_xid));
-
-                target_committed_to_req(req);
-        }
-
-        EXIT;
- out:
-
-        if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_LAST_REPLAY) {
-                if (obd && obd->obd_recovering) {
-                        DEBUG_REQ(D_HA, req, "LAST_REPLAY, queuing reply");
-                        return target_queue_last_replay_reply(req, rc);
-                }
-                /* Lost a race with recovery; let the error path DTRT. */
-                rc = req->rq_status = -ENOTCONN;
-        }
-
-        target_send_reply(req, rc, fail);
-        return 0;
-}
-
-/* Update the server data on disk.  This stores the new mount_count and
- * also the last_rcvd value to disk.  If we don't have a clean shutdown,
- * then the server last_rcvd value may be less than that of the clients.
- * This will alert us that we may need to do client recovery.
- *
- * Also assumes for mds_last_transno that we are not modifying it (no locking).
- */
-int mds_update_server_data(struct obd_device *obd, int force_sync)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lr_server_data *lsd = mds->mds_server_data;
-        struct file *filp = mds->mds_rcvd_filp;
-        struct lvfs_run_ctxt saved;
-        loff_t off = 0;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_SUPER, "MDS mount_count is "LPU64", last_transno is "LPU64"\n",
-               mds->mds_mount_count, mds->mds_last_transno);
-
-        spin_lock(&mds->mds_transno_lock);
-        lsd->lsd_last_transno = cpu_to_le64(mds->mds_last_transno);
-        spin_unlock(&mds->mds_transno_lock);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = fsfilt_write_record(obd, filp, lsd, sizeof(*lsd), &off,force_sync);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (rc)
-                CERROR("error writing MDS server data: rc = %d\n", rc);
-
-        RETURN(rc);
-}
-
-static void fsoptions_to_mds_flags(struct mds_obd *mds, char *options)
-{
-        char *p = options;
-
-        if (!options)
-                return;
-
-        while (*options) {
-                int len;
-
-                while (*p && *p != ',')
-                        p++;
-
-                len = p - options;
-                if (len == sizeof("user_xattr") - 1 &&
-                    memcmp(options, "user_xattr", len) == 0) {
-                        mds->mds_fl_user_xattr = 1;
-                        LCONSOLE_INFO("Enabling user_xattr\n");
-                } else if (len == sizeof("nouser_xattr") - 1 &&
-                           memcmp(options, "nouser_xattr", len) == 0) {
-                        mds->mds_fl_user_xattr = 0;
-                        LCONSOLE_INFO("Disabling user_xattr\n");
-                } else if (len == sizeof("acl") - 1 &&
-                           memcmp(options, "acl", len) == 0) {
-#ifdef CONFIG_FS_POSIX_ACL
-                        mds->mds_fl_acl = 1;
-                        LCONSOLE_INFO("Enabling ACL\n");
-#else
-                        CWARN("ignoring unsupported acl mount option\n");
-#endif
-                } else if (len == sizeof("noacl") - 1 &&
-                           memcmp(options, "noacl", len) == 0) {
-#ifdef CONFIG_FS_POSIX_ACL
-                        mds->mds_fl_acl = 0;
-                        LCONSOLE_INFO("Disabling ACL\n");
-#endif
-                }
-
-                options = ++p;
-        }
-}
-
-/* mount the file system (secretly).  lustre_cfg parameters are:
- * 1 = device
- * 2 = fstype
- * 3 = config name
- * 4 = mount options
- */
-static int mds_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        struct lustre_cfg* lcfg = buf;
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_sb_info *lsi;
-        struct lustre_mount_info *lmi;
-        struct vfsmount *mnt;
-        struct obd_uuid uuid;
-        __u8 *uuid_ptr;
-        char *str, *label;
-        char ns_name[48];
-        int rc = 0;
-        ENTRY;
-
-        /* setup 1:/dev/loop/0 2:ext3 3:mdsA 4:errors=remount-ro,iopen_nopriv */
-
-        CLASSERT(offsetof(struct obd_device, u.obt) ==
-                 offsetof(struct obd_device, u.mds.mds_obt));
-
-        if (lcfg->lcfg_bufcount < 3)
-                RETURN(-EINVAL);
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 1) == 0 || LUSTRE_CFG_BUFLEN(lcfg, 2) == 0)
-                RETURN(-EINVAL);
-
-        lmi = server_get_mount(obd->obd_name);
-        if (!lmi) {
-                CERROR("Not mounted in lustre_fill_super?\n");
-                RETURN(-EINVAL);
-        }
-
-        /* We mounted in lustre_fill_super.
-           lcfg bufs 1, 2, 4 (device, fstype, mount opts) are ignored.*/
-        lsi = s2lsi(lmi->lmi_sb);
-        fsoptions_to_mds_flags(mds, lsi->lsi_ldd->ldd_mount_opts);
-        fsoptions_to_mds_flags(mds, lsi->lsi_lmd->lmd_opts);
-        mnt = lmi->lmi_mnt;
-        obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd));
-        if (IS_ERR(obd->obd_fsops))
-                GOTO(err_put, rc = PTR_ERR(obd->obd_fsops));
-
-        CDEBUG(D_SUPER, "%s: mnt = %p\n", lustre_cfg_string(lcfg, 1), mnt);
-
-        LASSERT(!lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb)));
-
-        sema_init(&mds->mds_epoch_sem, 1);
-        spin_lock_init(&mds->mds_transno_lock);
-        mds->mds_max_mdsize = sizeof(struct lov_mds_md);
-        mds->mds_max_cookiesize = sizeof(struct llog_cookie);
-        mds->mds_atime_diff = MAX_ATIME_DIFF;
-        mds->mds_evict_ost_nids = 1;
-
-        sprintf(ns_name, "mds-%s", obd->obd_uuid.uuid);
-        obd->obd_namespace = ldlm_namespace_new(ns_name, LDLM_NAMESPACE_SERVER,
-                                                LDLM_NAMESPACE_GREEDY);
-        if (obd->obd_namespace == NULL) {
-                mds_cleanup(obd);
-                GOTO(err_ops, rc = -ENOMEM);
-        }
-        ldlm_register_intent(obd->obd_namespace, mds_intent_policy);
-
-        lprocfs_mds_init_vars(&lvars);
-        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0 &&
-            lprocfs_alloc_obd_stats(obd, LPROC_MDS_LAST) == 0) {
-                /* Init private stats here */
-                mds_stats_counter_init(obd->obd_stats);
-                obd->obd_proc_exports_entry = proc_mkdir("exports",
-                                                         obd->obd_proc_entry);
-        }
-
-        rc = mds_fs_setup(obd, mnt);
-        if (rc) {
-                CERROR("%s: MDS filesystem method init failed: rc = %d\n",
-                       obd->obd_name, rc);
-                GOTO(err_ns, rc);
-        }
-
-        if (obd->obd_proc_exports_entry)
-                lprocfs_add_simple(obd->obd_proc_exports_entry,
-                                   "clear", lprocfs_nid_stats_clear_read,
-                                   lprocfs_nid_stats_clear_write, obd);
-
-        if (lcfg->lcfg_bufcount >= 4 && LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) {
-                class_uuid_t uuid;
-
-                ll_generate_random_uuid(uuid);
-                class_uuid_unparse(uuid, &mds->mds_lov_uuid);
-
-                OBD_ALLOC(mds->mds_profile, LUSTRE_CFG_BUFLEN(lcfg, 3));
-                if (mds->mds_profile == NULL)
-                        GOTO(err_fs, rc = -ENOMEM);
-
-                strncpy(mds->mds_profile, lustre_cfg_string(lcfg, 3),
-                        LUSTRE_CFG_BUFLEN(lcfg, 3));
-        }
-
-        ptlrpc_init_client(LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL,
-                           "mds_ldlm_client", &obd->obd_ldlm_client);
-        obd->obd_replayable = 1;
-
-        rc = lquota_setup(mds_quota_interface_ref, obd);
-        if (rc)
-                GOTO(err_fs, rc);
-
-        mds->mds_group_hash = upcall_cache_init(obd->obd_name);
-        if (IS_ERR(mds->mds_group_hash)) {
-                rc = PTR_ERR(mds->mds_group_hash);
-                mds->mds_group_hash = NULL;
-                GOTO(err_qctxt, rc);
-        }
-
-        /* Don't wait for mds_postrecov trying to clear orphans */
-        obd->obd_async_recov = 1;
-        rc = mds_postsetup(obd);
-        /* Bug 11557 - allow async abort_recov start
-           FIXME can remove most of this obd_async_recov plumbing
-        obd->obd_async_recov = 0;
-        */
-        if (rc)
-                GOTO(err_qctxt, rc);
-
-        uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb);
-        if (uuid_ptr != NULL) {
-                class_uuid_unparse(uuid_ptr, &uuid);
-                str = uuid.uuid;
-        } else {
-                str = "no UUID";
-        }
-
-        label = fsfilt_get_label(obd, obd->u.obt.obt_sb);
-        if (obd->obd_recovering) {
-                LCONSOLE_WARN("MDT %s now serving %s (%s%s%s), but will be in "
-                              "recovery for at least %d:%.02d, or until %d "
-                              "client%s reconnect. During this time new clients"
-                              " will not be allowed to connect. "
-                              "Recovery progress can be monitored by watching "
-                              "/proc/fs/lustre/mds/%s/recovery_status.\n",
-                              obd->obd_name, lustre_cfg_string(lcfg, 1),
-                              label ?: "", label ? "/" : "", str,
-                              obd->obd_recovery_timeout / 60,
-                              obd->obd_recovery_timeout % 60,
-                              obd->obd_max_recoverable_clients,
-                              (obd->obd_max_recoverable_clients == 1) ? "":"s",
-                              obd->obd_name);
-        } else {
-                LCONSOLE_INFO("MDT %s now serving %s (%s%s%s) with recovery "
-                              "%s\n", obd->obd_name, lustre_cfg_string(lcfg, 1),
-                              label ?: "", label ? "/" : "", str,
-                              obd->obd_replayable ? "enabled" : "disabled");
-        }
-
-        if (ldlm_timeout == LDLM_TIMEOUT_DEFAULT)
-                ldlm_timeout = 6;
-
-        RETURN(0);
-
-err_qctxt:
-        lquota_cleanup(mds_quota_interface_ref, obd);
-err_fs:
-        /* No extra cleanup needed for llog_init_commit_thread() */
-        mds_fs_cleanup(obd);
-        upcall_cache_cleanup(mds->mds_group_hash);
-        mds->mds_group_hash = NULL;
-err_ns:
-        lprocfs_free_obd_stats(obd);
-        lprocfs_obd_cleanup(obd);
-        ldlm_namespace_free(obd->obd_namespace, 0);
-        obd->obd_namespace = NULL;
-err_ops:
-        fsfilt_put_ops(obd->obd_fsops);
-err_put:
-        server_put_mount(obd->obd_name, mnt);
-        obd->u.obt.obt_sb = NULL;
-        return rc;
-}
-
-static int mds_lov_clean(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_device *osc = mds->mds_osc_obd;
-        ENTRY;
-
-        if (mds->mds_profile) {
-                class_del_profile(mds->mds_profile);
-                OBD_FREE(mds->mds_profile, strlen(mds->mds_profile) + 1);
-                mds->mds_profile = NULL;
-        }
-
-        /* There better be a lov */
-        if (!osc)
-                RETURN(0);
-        if (IS_ERR(osc))
-                RETURN(PTR_ERR(osc));
-
-        obd_register_observer(osc, NULL);
-
-        /* Give lov our same shutdown flags */
-        osc->obd_force = obd->obd_force;
-        osc->obd_fail = obd->obd_fail;
-
-        /* Cleanup the lov */
-        obd_disconnect(mds->mds_osc_exp);
-        class_manual_cleanup(osc);
-        mds->mds_osc_exp = NULL;
-
-        RETURN(0);
-}
-
-static int mds_postsetup(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int rc = 0;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_CONFIG_ORIG_CTXT, obd, 0, NULL,
-                        &llog_lvfs_ops);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_setup(obd, LLOG_LOVEA_ORIG_CTXT, obd, 0, NULL,
-                        &llog_lvfs_ops);
-        if (rc)
-                RETURN(rc);
-
-        if (mds->mds_profile) {
-                struct lustre_profile *lprof;
-                /* The profile defines which osc and mdc to connect to, for a 
-                   client.  We reuse that here to figure out the name of the
-                   lov to use (and ignore lprof->lp_mdc).
-                   The profile was set in the config log with 
-                   LCFG_MOUNTOPT profilenm oscnm mdcnm */
-                lprof = class_get_profile(mds->mds_profile);
-                if (lprof == NULL) {
-                        CERROR("No profile found: %s\n", mds->mds_profile);
-                        GOTO(err_cleanup, rc = -ENOENT);
-                }
-                rc = mds_lov_connect(obd, lprof->lp_osc);
-                if (rc)
-                        GOTO(err_cleanup, rc);
-        }
-
-        RETURN(rc);
-
-err_cleanup:
-        mds_lov_clean(obd);
-        llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT));
-        llog_cleanup(llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT));
-        RETURN(rc);
-}
-
-int mds_postrecov(struct obd_device *obd)
-{
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        if (obd->obd_fail)
-                RETURN(0);
-
-        LASSERT(!obd->obd_recovering);
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT); 
-        LASSERT(ctxt != NULL);
-        llog_ctxt_put(ctxt);
-
-        /* clean PENDING dir */
-        rc = mds_cleanup_pending(obd);
-        if (rc < 0)
-                GOTO(out, rc);
-
-        /* FIXME Does target_finish_recovery really need this to block? */
-        /* Notify the LOV, which will in turn call mds_notify for each tgt */
-        /* This means that we have to hack obd_notify to think we're obd_set_up
-           during mds_lov_connect. */
-        obd_notify(obd->u.mds.mds_osc_obd, NULL, 
-                   obd->obd_async_recov ? OBD_NOTIFY_SYNC_NONBLOCK :
-                   OBD_NOTIFY_SYNC, NULL);
-
-        /* quota recovery */
-        lquota_recovery(mds_quota_interface_ref, obd);
-
-out:
-        RETURN(rc);
-}
-
-/* We need to be able to stop an mds_lov_synchronize */
-static int mds_lov_early_clean(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_device *osc = mds->mds_osc_obd;
-
-        if (!osc || (!obd->obd_force && !obd->obd_fail))
-                return(0);
-
-        CDEBUG(D_HA, "abort inflight\n");
-        return (obd_precleanup(osc, OBD_CLEANUP_EARLY));
-}
-
-static int mds_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY:
-                break;
-        case OBD_CLEANUP_EXPORTS:
-                target_cleanup_recovery(obd);
-                mds_lov_early_clean(obd);
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                mds_lov_disconnect(obd);
-                mds_lov_clean(obd);
-                llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT));
-                llog_cleanup(llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT));
-                rc = obd_llog_finish(obd, 0);
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int mds_cleanup(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        lvfs_sbdev_type save_dev;
-        ENTRY;
-
-        if (obd->u.obt.obt_sb == NULL)
-                RETURN(0);
-        save_dev = lvfs_sbdev(obd->u.obt.obt_sb);
-
-        if (mds->mds_osc_exp)
-                /* lov export was disconnected by mds_lov_clean;
-                   we just need to drop our ref */
-                class_export_put(mds->mds_osc_exp);
-
-        remove_proc_entry("clear", obd->obd_proc_exports_entry);
-        lprocfs_free_per_client_stats(obd);
-        lprocfs_free_obd_stats(obd);
-        lprocfs_obd_cleanup(obd);
-
-        lquota_cleanup(mds_quota_interface_ref, obd);
-
-        mds_update_server_data(obd, 1);
-        mds_fs_cleanup(obd);
-
-        upcall_cache_cleanup(mds->mds_group_hash);
-        mds->mds_group_hash = NULL;
-
-        server_put_mount(obd->obd_name, mds->mds_vfsmnt);
-        obd->u.obt.obt_sb = NULL;
-
-        ldlm_namespace_free(obd->obd_namespace, obd->obd_force);
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (obd->obd_recovering) {
-                target_cancel_recovery_timer(obd);
-                obd->obd_recovering = 0;
-        }
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        fsfilt_put_ops(obd->obd_fsops);
-
-        LCONSOLE_INFO("MDT %s has stopped.\n", obd->obd_name);
-
-        RETURN(0);
-}
-
-static void fixup_handle_for_resent_req(struct ptlrpc_request *req, int offset,
-                                        struct ldlm_lock *new_lock,
-                                        struct ldlm_lock **old_lock,
-                                        struct lustre_handle *lockh)
-{
-        struct obd_export *exp = req->rq_export;
-        struct ldlm_request *dlmreq =
-                lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*dlmreq));
-        struct lustre_handle remote_hdl = dlmreq->lock_handle[0];
-        struct list_head *iter;
-
-        if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT))
-                return;
-
-        spin_lock(&exp->exp_ldlm_data.led_lock);
-        list_for_each(iter, &exp->exp_ldlm_data.led_held_locks) {
-                struct ldlm_lock *lock;
-                lock = list_entry(iter, struct ldlm_lock, l_export_chain);
-                if (lock == new_lock)
-                        continue;
-                if (lock->l_remote_handle.cookie == remote_hdl.cookie) {
-                        lockh->cookie = lock->l_handle.h_cookie;
-                        LDLM_DEBUG(lock, "restoring lock cookie");
-                        DEBUG_REQ(D_DLMTRACE, req,"restoring lock cookie "LPX64,
-                                  lockh->cookie);
-                        if (old_lock)
-                                *old_lock = LDLM_LOCK_GET(lock);
-                        spin_unlock(&exp->exp_ldlm_data.led_lock);
-                        return;
-                }
-        }
-        spin_unlock(&exp->exp_ldlm_data.led_lock);
-
-        /* If the xid matches, then we know this is a resent request,
-         * and allow it. (It's probably an OPEN, for which we don't
-         * send a lock */
-        if (req->rq_xid ==
-            le64_to_cpu(exp->exp_mds_data.med_mcd->mcd_last_xid))
-                return;
-
-        if (req->rq_xid ==
-            le64_to_cpu(exp->exp_mds_data.med_mcd->mcd_last_close_xid))
-                return;
-
-        /* This remote handle isn't enqueued, so we never received or
-         * processed this request.  Clear MSG_RESENT, because it can
-         * be handled like any normal request now. */
-
-        lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
-
-        DEBUG_REQ(D_DLMTRACE, req, "no existing lock with rhandle "LPX64,
-                  remote_hdl.cookie);
-}
-
-int intent_disposition(struct ldlm_reply *rep, int flag)
-{
-        if (!rep)
-                return 0;
-        return (rep->lock_policy_res1 & flag);
-}
-
-void intent_set_disposition(struct ldlm_reply *rep, int flag)
-{
-        if (!rep)
-                return;
-        rep->lock_policy_res1 |= flag;
-}
-
-#define IS_CLIENT_DISCONNECT_ERROR(error) \
-                (error == -ENOTCONN || error == -ENODEV)
-
-static int mds_intent_policy(struct ldlm_namespace *ns,
-                             struct ldlm_lock **lockp, void *req_cookie,
-                             ldlm_mode_t mode, int flags, void *data)
-{
-        struct ptlrpc_request *req = req_cookie;
-        struct ldlm_lock *lock = *lockp;
-        struct ldlm_intent *it;
-        struct mds_obd *mds = &req->rq_export->exp_obd->u.mds;
-        struct ldlm_reply *rep;
-        struct lustre_handle lockh = { 0 };
-        struct ldlm_lock *new_lock = NULL;
-        int getattr_part = MDS_INODELOCK_UPDATE;
-        int repsize[5] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                           [DLM_LOCKREPLY_OFF]   = sizeof(struct ldlm_reply),
-                           [DLM_REPLY_REC_OFF]   = sizeof(struct mds_body),
-                           [DLM_REPLY_REC_OFF+1] = mds->mds_max_mdsize };
-        int repbufcnt = 4, rc;
-        ENTRY;
-
-        LASSERT(req != NULL);
-
-        if (lustre_msg_bufcount(req->rq_reqmsg) <= DLM_INTENT_IT_OFF) {
-                /* No intent was provided */
-                rc = lustre_pack_reply(req, 2, repsize, NULL);
-                if (rc)
-                        RETURN(rc);
-                RETURN(0);
-        }
-
-        it = lustre_swab_reqbuf(req, DLM_INTENT_IT_OFF, sizeof(*it),
-                                lustre_swab_ldlm_intent);
-        if (it == NULL) {
-                CERROR("Intent missing\n");
-                RETURN(req->rq_status = -EFAULT);
-        }
-
-        LDLM_DEBUG(lock, "intent policy, opc: %s", ldlm_it2str(it->opc));
-
-        if ((req->rq_export->exp_connect_flags & OBD_CONNECT_ACL) &&
-            (it->opc & (IT_OPEN | IT_GETATTR | IT_LOOKUP)))
-                /* we should never allow OBD_CONNECT_ACL if not configured */
-                repsize[repbufcnt++] = LUSTRE_POSIX_ACL_MAX_SIZE;
-        else if (it->opc & IT_UNLINK)
-                repsize[repbufcnt++] = mds->mds_max_cookiesize;
-
-        rc = lustre_pack_reply(req, repbufcnt, repsize, NULL);
-        if (rc)
-                RETURN(req->rq_status = rc);
-
-        rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, sizeof(*rep));
-        intent_set_disposition(rep, DISP_IT_EXECD);
-
-
-        /* execute policy */
-        switch ((long)it->opc) {
-        case IT_OPEN:
-        case IT_CREAT|IT_OPEN:
-                mds_counter_incr(req->rq_export, LPROC_MDS_OPEN);
-                fixup_handle_for_resent_req(req, DLM_LOCKREQ_OFF, lock, NULL,
-                                            &lockh);
-                /* XXX swab here to assert that an mds_open reint
-                 * packet is following */
-                rep->lock_policy_res2 = mds_reint(req, DLM_INTENT_REC_OFF,
-                                                  &lockh);
-#if 0
-                /* We abort the lock if the lookup was negative and
-                 * we did not make it to the OPEN portion */
-                if (!intent_disposition(rep, DISP_LOOKUP_EXECD))
-                        RETURN(ELDLM_LOCK_ABORTED);
-                if (intent_disposition(rep, DISP_LOOKUP_NEG) &&
-                    !intent_disposition(rep, DISP_OPEN_OPEN))
-#endif
-
-                /* If there was an error of some sort or if we are not
-                 * returning any locks */
-                 if (rep->lock_policy_res2 ||
-                     !intent_disposition(rep, DISP_OPEN_LOCK)) {
-                        /* If it is the disconnect error (ENODEV & ENOCONN)
-                         * ptlrpc layer should know this imediately, it should
-                         * be replied by rq_stats, otherwise, return it by 
-                         * intent here
-                         */
-                        if (IS_CLIENT_DISCONNECT_ERROR(rep->lock_policy_res2))
-                                RETURN(rep->lock_policy_res2);
-                        else
-                                RETURN(ELDLM_LOCK_ABORTED);
-                 }
-                break;
-        case IT_LOOKUP:
-                        getattr_part = MDS_INODELOCK_LOOKUP;
-        case IT_GETATTR:
-                        getattr_part |= MDS_INODELOCK_LOOKUP;
-                        OBD_COUNTER_INCREMENT(req->rq_export->exp_obd, getattr);
-        case IT_READDIR:
-                fixup_handle_for_resent_req(req, DLM_LOCKREQ_OFF, lock,
-                                            &new_lock, &lockh);
-
-                /* INODEBITS_INTEROP: if this lock was converted from a
-                 * plain lock (client does not support inodebits), then
-                 * child lock must be taken with both lookup and update
-                 * bits set for all operations.
-                 */
-                if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_IBITS))
-                        getattr_part = MDS_INODELOCK_LOOKUP |
-                                       MDS_INODELOCK_UPDATE;
-
-                rep->lock_policy_res2 = mds_getattr_lock(req,DLM_INTENT_REC_OFF,
-                                                         getattr_part, &lockh);
-                /* FIXME: LDLM can set req->rq_status. MDS sets
-                   policy_res{1,2} with disposition and status.
-                   - replay: returns 0 & req->status is old status
-                   - otherwise: returns req->status */
-                if (intent_disposition(rep, DISP_LOOKUP_NEG))
-                        rep->lock_policy_res2 = 0;
-                if (!intent_disposition(rep, DISP_LOOKUP_POS) ||
-                    rep->lock_policy_res2)
-                        RETURN(ELDLM_LOCK_ABORTED);
-                if (req->rq_status != 0) {
-                        LBUG();
-                        rep->lock_policy_res2 = req->rq_status;
-                        RETURN(ELDLM_LOCK_ABORTED);
-                }
-                break;
-        default:
-                CERROR("Unhandled intent "LPD64"\n", it->opc);
-                RETURN(-EFAULT);
-        }
-
-        /* By this point, whatever function we called above must have either
-         * filled in 'lockh', been an intent replay, or returned an error.  We
-         * want to allow replayed RPCs to not get a lock, since we would just
-         * drop it below anyways because lock replay is done separately by the
-         * client afterwards.  For regular RPCs we want to give the new lock to
-         * the client instead of whatever lock it was about to get. */
-        if (new_lock == NULL)
-                new_lock = ldlm_handle2lock(&lockh);
-        if (new_lock == NULL && (flags & LDLM_FL_INTENT_ONLY))
-                RETURN(0);
-
-        LASSERTF(new_lock != NULL, "op "LPX64" lockh "LPX64"\n",
-                 it->opc, lockh.cookie);
-
-        /* If we've already given this lock to a client once, then we should
-         * have no readers or writers.  Otherwise, we should have one reader
-         * _or_ writer ref (which will be zeroed below) before returning the
-         * lock to a client. */
-        if (new_lock->l_export == req->rq_export) {
-                LASSERT(new_lock->l_readers + new_lock->l_writers == 0);
-        } else {
-                LASSERT(new_lock->l_export == NULL);
-                LASSERT(new_lock->l_readers + new_lock->l_writers == 1);
-        }
-
-        *lockp = new_lock;
-
-        if (new_lock->l_export == req->rq_export) {
-                /* Already gave this to the client, which means that we
-                 * reconstructed a reply. */
-                LASSERT(lustre_msg_get_flags(req->rq_reqmsg) &
-                        MSG_RESENT);
-                RETURN(ELDLM_LOCK_REPLACED);
-        }
-
-        /* Fixup the lock to be given to the client */
-        lock_res_and_lock(new_lock);
-        new_lock->l_readers = 0;
-        new_lock->l_writers = 0;
-
-        new_lock->l_export = class_export_get(req->rq_export);
-        spin_lock(&req->rq_export->exp_ldlm_data.led_lock);
-        list_add(&new_lock->l_export_chain,
-                 &new_lock->l_export->exp_ldlm_data.led_held_locks);
-        spin_unlock(&req->rq_export->exp_ldlm_data.led_lock);
-
-        new_lock->l_blocking_ast = lock->l_blocking_ast;
-        new_lock->l_completion_ast = lock->l_completion_ast;
-
-        memcpy(&new_lock->l_remote_handle, &lock->l_remote_handle,
-               sizeof(lock->l_remote_handle));
-
-        new_lock->l_flags &= ~LDLM_FL_LOCAL;
-
-        unlock_res_and_lock(new_lock);
-        LDLM_LOCK_PUT(new_lock);
-
-        RETURN(ELDLM_LOCK_REPLACED);
-}
-
-static int mdt_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lprocfs_static_vars lvars;
-        int mds_min_threads;
-        int mds_max_threads;
-        int rc = 0;
-        ENTRY;
-
-        lprocfs_mdt_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        sema_init(&mds->mds_health_sem, 1);
-
-        if (mds_num_threads) {
-                /* If mds_num_threads is set, it is the min and the max. */
-                if (mds_num_threads > MDS_THREADS_MAX)
-                        mds_num_threads = MDS_THREADS_MAX;
-                if (mds_num_threads < MDS_THREADS_MIN)
-                        mds_num_threads = MDS_THREADS_MIN;
-                mds_max_threads = mds_min_threads = mds_num_threads;
-        } else {
-                /* Base min threads on memory and cpus */
-                mds_min_threads = num_possible_cpus() * num_physpages >> 
-                        (27 - CFS_PAGE_SHIFT);
-                if (mds_min_threads < MDS_THREADS_MIN)
-                        mds_min_threads = MDS_THREADS_MIN;
-                /* Largest auto threads start value */
-                if (mds_min_threads > 32) 
-                        mds_min_threads = 32;
-                mds_max_threads = min(MDS_THREADS_MAX, mds_min_threads * 4);
-        }
-
-        mds->mds_service =
-                ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE,
-                                MDS_MAXREPSIZE, MDS_REQUEST_PORTAL,
-                                MDC_REPLY_PORTAL, MDS_SERVICE_WATCHDOG_FACTOR,
-                                mds_handle, LUSTRE_MDS_NAME,
-                                obd->obd_proc_entry, target_print_req,
-                                mds_min_threads, mds_max_threads, "ll_mdt");
-
-        if (!mds->mds_service) {
-                CERROR("failed to start service\n");
-                GOTO(err_lprocfs, rc = -ENOMEM);
-        }
-
-        rc = ptlrpc_start_threads(obd, mds->mds_service);
-        if (rc)
-                GOTO(err_thread, rc);
-
-        mds->mds_setattr_service =
-                ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE,
-                                MDS_MAXREPSIZE, MDS_SETATTR_PORTAL,
-                                MDC_REPLY_PORTAL, MDS_SERVICE_WATCHDOG_FACTOR,
-                                mds_handle, "mds_setattr",
-                                obd->obd_proc_entry, target_print_req,
-                                mds_min_threads, mds_max_threads,
-                                "ll_mdt_attr");
-        if (!mds->mds_setattr_service) {
-                CERROR("failed to start getattr service\n");
-                GOTO(err_thread, rc = -ENOMEM);
-        }
-
-        rc = ptlrpc_start_threads(obd, mds->mds_setattr_service);
-        if (rc)
-                GOTO(err_thread2, rc);
-
-        mds->mds_readpage_service =
-                ptlrpc_init_svc(MDS_NBUFS, MDS_BUFSIZE, MDS_MAXREQSIZE,
-                                MDS_MAXREPSIZE, MDS_READPAGE_PORTAL,
-                                MDC_REPLY_PORTAL, MDS_SERVICE_WATCHDOG_FACTOR,
-                                mds_handle, "mds_readpage",
-                                obd->obd_proc_entry, target_print_req,
-                                MDS_THREADS_MIN_READPAGE, mds_max_threads,
-                                "ll_mdt_rdpg");
-        if (!mds->mds_readpage_service) {
-                CERROR("failed to start readpage service\n");
-                GOTO(err_thread2, rc = -ENOMEM);
-        }
-
-        rc = ptlrpc_start_threads(obd, mds->mds_readpage_service);
-
-        if (rc)
-                GOTO(err_thread3, rc);
-
-        ping_evictor_start();
-
-        RETURN(0);
-
-err_thread3:
-        ptlrpc_unregister_service(mds->mds_readpage_service);
-        mds->mds_readpage_service = NULL;
-err_thread2:
-        ptlrpc_unregister_service(mds->mds_setattr_service);
-        mds->mds_setattr_service = NULL;
-err_thread:
-        ptlrpc_unregister_service(mds->mds_service);
-        mds->mds_service = NULL;
-err_lprocfs:
-        lprocfs_obd_cleanup(obd);
-        return rc;
-}
-
-static int mdt_cleanup(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        ENTRY;
-
-        ping_evictor_stop();
-
-        down(&mds->mds_health_sem);
-        ptlrpc_unregister_service(mds->mds_readpage_service);
-        ptlrpc_unregister_service(mds->mds_setattr_service);
-        ptlrpc_unregister_service(mds->mds_service);
-        mds->mds_readpage_service = NULL;
-        mds->mds_setattr_service = NULL;
-        mds->mds_service = NULL;
-        up(&mds->mds_health_sem);
-
-        lprocfs_obd_cleanup(obd);
-
-        RETURN(0);
-}
-
-static int mdt_health_check(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int rc = 0;
-
-        down(&mds->mds_health_sem);
-        rc |= ptlrpc_service_health_check(mds->mds_readpage_service);
-        rc |= ptlrpc_service_health_check(mds->mds_setattr_service);
-        rc |= ptlrpc_service_health_check(mds->mds_service);
-        up(&mds->mds_health_sem);
-
-        /*
-         * health_check to return 0 on healthy
-         * and 1 on unhealthy.
-         */
-        if(rc != 0)
-                rc = 1;
-
-        return rc;
-}
-
-static struct dentry *mds_lvfs_fid2dentry(__u64 id, __u32 gen, __u64 gr,
-                                          void *data)
-{
-        struct obd_device *obd = data;
-        struct ll_fid fid;
-        fid.id = id;
-        fid.generation = gen;
-        return mds_fid2dentry(&obd->u.mds, &fid, NULL);
-}
-
-static int mds_health_check(struct obd_device *obd)
-{
-        struct obd_device_target *odt = &obd->u.obt;
-#ifdef USE_HEALTH_CHECK_WRITE
-        struct mds_obd *mds = &obd->u.mds;
-#endif
-        int rc = 0;
-
-        if (odt->obt_sb->s_flags & MS_RDONLY)
-                rc = 1;
-
-#ifdef USE_HEALTH_CHECK_WRITE
-        LASSERT(mds->mds_health_check_filp != NULL);
-        rc |= !!lvfs_check_io_health(obd, mds->mds_health_check_filp);
-#endif
-
-        return rc;
-}
-
-static int mds_process_config(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lustre_cfg *lcfg = buf;
-        struct lprocfs_static_vars lvars;
-        int rc;
-
-        lprocfs_mds_init_vars(&lvars);
-        
-        rc = class_process_proc_param(PARAM_MDT, lvars.obd_vars, lcfg, obd);
-        
-        return(rc);
-}
-
-struct lvfs_callback_ops mds_lvfs_ops = {
-        l_fid2dentry:     mds_lvfs_fid2dentry,
-};
-
-/* use obd ops to offer management infrastructure */
-static struct obd_ops mds_obd_ops = {
-        .o_owner           = THIS_MODULE,
-        .o_connect         = mds_connect,
-        .o_reconnect       = mds_reconnect,
-        .o_init_export     = mds_init_export,
-        .o_destroy_export  = mds_destroy_export,
-        .o_disconnect      = mds_disconnect,
-        .o_setup           = mds_setup,
-        .o_precleanup      = mds_precleanup,
-        .o_cleanup         = mds_cleanup,
-        .o_postrecov       = mds_postrecov,
-        .o_statfs          = mds_obd_statfs,
-        .o_iocontrol       = mds_iocontrol,
-        .o_create          = mds_obd_create,
-        .o_destroy         = mds_obd_destroy,
-        .o_llog_init       = mds_llog_init,
-        .o_llog_finish     = mds_llog_finish,
-        .o_notify          = mds_notify,
-        .o_health_check    = mds_health_check,
-        .o_process_config  = mds_process_config,
-};
-
-static struct obd_ops mdt_obd_ops = {
-        .o_owner           = THIS_MODULE,
-        .o_setup           = mdt_setup,
-        .o_cleanup         = mdt_cleanup,
-        .o_health_check    = mdt_health_check,
-};
-
-quota_interface_t *mds_quota_interface_ref;
-extern quota_interface_t mds_quota_interface;
-
-static int __init mds_init(void)
-{
-        int rc;
-        struct lprocfs_static_vars lvars;
-
-        request_module("lquota");
-        mds_quota_interface_ref = PORTAL_SYMBOL_GET(mds_quota_interface);
-        rc = lquota_init(mds_quota_interface_ref);
-        if (rc) {
-                if (mds_quota_interface_ref)
-                        PORTAL_SYMBOL_PUT(mds_quota_interface);
-                return rc;
-        }
-        init_obd_quota_ops(mds_quota_interface_ref, &mds_obd_ops);
-        
-        lprocfs_mds_init_vars(&lvars);
-        class_register_type(&mds_obd_ops, lvars.module_vars, LUSTRE_MDS_NAME);
-        lprocfs_mdt_init_vars(&lvars);
-        class_register_type(&mdt_obd_ops, lvars.module_vars, LUSTRE_MDT_NAME);
-
-        return 0;
-}
-
-static void /*__exit*/ mds_exit(void)
-{
-        lquota_exit(mds_quota_interface_ref);
-        if (mds_quota_interface_ref)
-                PORTAL_SYMBOL_PUT(mds_quota_interface);
-
-        class_unregister_type(LUSTRE_MDS_NAME);
-        class_unregister_type(LUSTRE_MDT_NAME);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Metadata Server (MDS)");
-MODULE_LICENSE("GPL");
-
-module_init(mds_init);
-module_exit(mds_exit);
diff --git a/lustre/mds/lproc_mds.c b/lustre/mds/lproc_mds.c
deleted file mode 100644
index ba1562f43cc7dba8b2f62a7cf38fced1d23c25f7..0000000000000000000000000000000000000000
--- a/lustre/mds/lproc_mds.c
+++ /dev/null
@@ -1,645 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <asm/statfs.h>
-#endif
-#include <obd.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include "mds_internal.h"
-
-#ifdef LPROCFS
-static int lprocfs_mds_rd_mntdev(char *page, char **start, off_t off, int count,
-                                 int *eof, void *data)
-{
-        struct obd_device* obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->u.mds.mds_vfsmnt->mnt_devname);
-        *eof = 1;
-
-        return snprintf(page, count, "%s\n",obd->u.mds.mds_vfsmnt->mnt_devname);
-}
-
-static int lprocfs_mds_rd_evictostnids(char *page, char **start, off_t off,
-                                       int count, int *eof, void *data)
-{
-        struct obd_device* obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%d\n", obd->u.mds.mds_evict_ost_nids);
-}
-
-static int lprocfs_mds_wr_evictostnids(struct file *file, const char *buffer,
-                                       unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        obd->u.mds.mds_evict_ost_nids = !!val;
-
-        return count;
-}
-
-static int lprocfs_mds_wr_evict_client(struct file *file, const char *buffer,
-                                       unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-        char tmpbuf[sizeof(struct obd_uuid)];
-        struct ptlrpc_request_set *set;
-        int rc;
-
-        sscanf(buffer, "%40s", tmpbuf);
-
-        if (strncmp(tmpbuf, "nid:", 4) != 0)
-                return lprocfs_wr_evict_client(file, buffer, count, data);
-
-        set = ptlrpc_prep_set();
-        if (!set)
-                return -ENOMEM;
-
-        if (obd->u.mds.mds_evict_ost_nids) {
-                rc = obd_set_info_async(mds->mds_osc_exp,strlen("evict_by_nid"),
-                                        "evict_by_nid", strlen(tmpbuf + 4) + 1,
-                                        tmpbuf + 4, set);
-                if (rc)
-                        CERROR("Failed to evict nid %s from OSTs: rc %d\n",
-                               tmpbuf + 4, rc);
-                ptlrpc_check_set(set);
-        }
-
-        /* See the comments in function lprocfs_wr_evict_client()
-         * in ptlrpc/lproc_ptlrpc.c for details. - jay */
-        class_incref(obd);
-        LPROCFS_EXIT();
-
-        obd_export_evict_by_nid(obd, tmpbuf+4);
-
-
-        rc = ptlrpc_set_wait(set);
-        if (rc)
-                CERROR("Failed to evict nid %s from OSTs: rc %d\n", tmpbuf + 4,
-                       rc);
-
-        LPROCFS_ENTRY();
-        class_decref(obd);
-
-        ptlrpc_set_destroy(set);
-        return count;
-}
-
-static int lprocfs_wr_group_info(struct file *file, const char *buffer,
-                                 unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-        struct mds_grp_downcall_data sparam, *param = &sparam;
-        int size = 0, rc = count;
-
-        if (count < sizeof(param)) {
-                CERROR("%s: invalid data size %lu\n", obd->obd_name, count);
-                return count;
-        }
-
-        if (copy_from_user(param, buffer, sizeof(*param)) ||
-            param->mgd_magic != MDS_GRP_DOWNCALL_MAGIC) {
-                CERROR("%s: MDS group downcall bad params\n", obd->obd_name);
-                return count;
-        }
-
-        if (param->mgd_ngroups > NGROUPS_MAX) {
-                CWARN("%s: uid %u groups %d more than maximum %d\n",
-                      obd->obd_name, param->mgd_uid, param->mgd_ngroups,
-                      NGROUPS_MAX);
-                param->mgd_ngroups = NGROUPS_MAX;
-        }
-
-        if (param->mgd_ngroups > 0) {
-                size = offsetof(struct mds_grp_downcall_data,
-                                mgd_groups[param->mgd_ngroups]);
-                OBD_ALLOC(param, size);
-                if (!param) {
-                        CERROR("%s: fail to alloc %d bytes for uid %u"
-                               " with %d groups\n", obd->obd_name, size,
-                               sparam.mgd_uid, sparam.mgd_ngroups);
-                        param = &sparam;
-                        param->mgd_ngroups = 0;
-                } else if (copy_from_user(param, buffer, size)) {
-                        CERROR("%s: uid %u bad supplementary group data\n",
-                               obd->obd_name, sparam.mgd_uid);
-                        OBD_FREE(param, size);
-                        param = &sparam;
-                        param->mgd_ngroups = 0;
-                }
-        }
-        rc = upcall_cache_downcall(mds->mds_group_hash, param->mgd_err,
-                                   param->mgd_uid, param->mgd_gid,
-                                   param->mgd_ngroups, param->mgd_groups);
-
-        if (param && param != &sparam)
-                OBD_FREE(param, size);
-
-        return rc;
-}
-
-static int lprocfs_rd_group_expire(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        *eof = 1;
-        return snprintf(page, count, "%lu\n",
-                        obd->u.mds.mds_group_hash->uc_entry_expire / HZ);
-}
-
-static int lprocfs_wr_group_expire(struct file *file, const char *buffer,
-                                   unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val > 5)
-                obd->u.mds.mds_group_hash->uc_entry_expire = val * HZ;
-        else
-                CERROR("invalid expire time %u for group cache\n", val);
-
-        return count;
-}
-
-static int lprocfs_rd_group_acquire_expire(char *page, char **start, off_t off,
-                                           int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        *eof = 1;
-        return snprintf(page, count, "%lu\n",
-                        obd->u.mds.mds_group_hash->uc_acquire_expire / HZ);
-}
-
-static int lprocfs_wr_group_acquire_expire(struct file *file,const char *buffer,
-                                           unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val, rc = 0;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val > 2)
-                obd->u.mds.mds_group_hash->uc_acquire_expire = val * HZ;
-
-        return count;
-}
-
-static int lprocfs_rd_group_upcall(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        *eof = 1;
-        return snprintf(page, count, "%s\n",
-                        obd->u.mds.mds_group_hash->uc_upcall);
-}
-
-static int lprocfs_wr_group_upcall(struct file *file, const char *buffer,
-                                   unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct upcall_cache *hash = obd->u.mds.mds_group_hash;
-        char kernbuf[UC_CACHE_UPCALL_MAXPATH] = { '\0' };
-
-        if (count >= UC_CACHE_UPCALL_MAXPATH) {
-                CERROR("%s: group upcall too long\n", obd->obd_name);
-                return -EINVAL;
-        }
-
-        if (copy_from_user(kernbuf, buffer,
-                           min(count, UC_CACHE_UPCALL_MAXPATH - 1)))
-                return -EFAULT;
-
-        /* Remove any extraneous bits from the upcall (e.g. linefeeds) */
-        sscanf(kernbuf, "%s", hash->uc_upcall);
-
-        if (strcmp(hash->uc_name, obd->obd_name) != 0)
-                CWARN("%s: write to upcall name %s for MDS %s\n",
-                      obd->obd_name, hash->uc_upcall, obd->obd_name);
-        CWARN("%s: group upcall set to %s\n", obd->obd_name, hash->uc_upcall);
-
-        return count;
-}
-
-static int lprocfs_wr_group_flush(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-
-        upcall_cache_flush_idle(obd->u.mds.mds_group_hash);
-        return count;
-}
-
-static int lprocfs_wr_atime_diff(struct file *file, const char *buffer,
-                                 unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-        char kernbuf[20], *end;
-        unsigned long diff = 0;
-
-        if (count > (sizeof(kernbuf) - 1))
-                return -EINVAL;
-
-        if (copy_from_user(kernbuf, buffer, count))
-                return -EFAULT;
-
-        kernbuf[count] = '\0';
-
-        diff = simple_strtoul(kernbuf, &end, 0);
-        if (kernbuf == end)
-                return -EINVAL;
-
-        mds->mds_atime_diff = diff;
-        return count;
-}
-
-static int lprocfs_rd_atime_diff(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-
-        *eof = 1;
-        return snprintf(page, count, "%lu\n", mds->mds_atime_diff);
-}
-
-static int lprocfs_wr_rootsquash(struct file *file, const char *buffer,
-                                 unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-        char kernbuf[50], *tmp, *end;
-        unsigned long uid, gid;
-
-        if (count > (sizeof(kernbuf) - 1))
-                return -EINVAL;
-
-        if (copy_from_user(kernbuf, buffer, count))
-                return -EFAULT;
-
-        kernbuf[count] = '\0';
-
-        uid = simple_strtoul(kernbuf, &tmp, 0);
-        if (kernbuf == tmp) {
-                if (tmp[0] != ':')
-                        return -EINVAL;
-                uid = mds->mds_squash_uid;
-        }
-        /* skip ':' */
-        tmp++;
-        gid = simple_strtoul(tmp, &end, 0);
-        if (tmp == end)
-                gid = mds->mds_squash_gid;
-
-        mds->mds_squash_uid = uid;
-        mds->mds_squash_gid = gid;
-        return count;
-}
-
-static int lprocfs_rd_rootsquash(char *page, char **start, off_t off,
-                                 int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-
-        *eof = 1;
-        return snprintf(page, count, "%lu:%lu\n",
-                        (unsigned long)mds->mds_squash_uid,
-                        (unsigned long)mds->mds_squash_gid);
-}
-
-static int lprocfs_wr_nosquash_nid(struct file *file, const char *buffer,
-                                   unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-        char kernbuf[30], *start, *end;
-
-        if (count > (sizeof(kernbuf) - 1))
-                return -EINVAL;
-
-        if (copy_from_user(kernbuf, buffer, count))
-                return -EFAULT;
-        kernbuf[count] = '\0';
-
-        /* strip frontal whitespaces */
-        start = kernbuf;
-        while (*start && isspace(*start))
-                start++;
-        /* EOL - string doesn't contain NID */
-        if (*start == '\0')
-                return -EINVAL;
-        /* strip backward whitespaces */
-        end = kernbuf + count - 1;
-        while (*end && isspace(*end))
-                end--;
-        *(end + 1) = '\0';
-
-        mds->mds_nosquash_nid = libcfs_str2nid(start);
-        return count;
-}
-
-static int lprocfs_rd_nosquash_nid(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        struct mds_obd *mds = &obd->u.mds;
-
-        *eof = 1;
-        return snprintf(page, count, "%s\n",
-                        libcfs_nid2str(mds->mds_nosquash_nid));
-}
-
-#ifdef HAVE_QUOTA_SUPPORT
-static int lprocfs_mds_rd_switch_qs(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "changing qunit size is %s\n",
-                        obd->u.obt.obt_qctxt.lqc_switch_qs ?
-                        "enabled" : "disabled");
-}
-
-static int lprocfs_mds_rd_boundary_factor(char *page, char **start, off_t off,
-                                          int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_cqs_boundary_factor);
-}
-
-static int lprocfs_mds_rd_least_bunit(char *page, char **start, off_t off,
-                                      int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_cqs_least_bunit);
-}
-
-static int lprocfs_mds_rd_least_iunit(char *page, char **start, off_t off,
-                                      int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_cqs_least_iunit);
-}
-
-static int lprocfs_mds_rd_qs_factor(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_cqs_qs_factor);
-}
-
-static int lprocfs_mds_wr_switch_qs(struct file *file, const char *buffer,
-                                    unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val)
-            obd->u.obt.obt_qctxt.lqc_switch_qs = 1;
-        else
-            obd->u.obt.obt_qctxt.lqc_switch_qs = 0;
-
-        return count;
-}
-
-static int lprocfs_mds_wr_boundary_factor(struct file *file, const char *buffer,
-                                          unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < 2)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_cqs_boundary_factor = val;
-        return count;
-}
-
-static int lprocfs_mds_wr_least_bunit(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < PTLRPC_MAX_BRW_SIZE ||
-            val >= obd->u.obt.obt_qctxt.lqc_bunit_sz)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_cqs_least_bunit = val;
-        return count;
-}
-
-static int lprocfs_mds_wr_least_iunit(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < 1 || val >= obd->u.obt.obt_qctxt.lqc_iunit_sz)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_cqs_least_iunit = val;
-        return count;
-}
-
-static int lprocfs_mds_wr_qs_factor(struct file *file, const char *buffer,
-                                    unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < 2)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_cqs_qs_factor = val;
-        return count;
-}
-#endif
-
-struct lprocfs_vars lprocfs_mds_obd_vars[] = {
-        { "uuid",            lprocfs_rd_uuid,        0, 0 },
-        { "blocksize",       lprocfs_rd_blksize,     0, 0 },
-        { "kbytestotal",     lprocfs_rd_kbytestotal, 0, 0 },
-        { "kbytesfree",      lprocfs_rd_kbytesfree,  0, 0 },
-        { "kbytesavail",     lprocfs_rd_kbytesavail, 0, 0 },
-        { "filestotal",      lprocfs_rd_filestotal,  0, 0 },
-        { "filesfree",       lprocfs_rd_filesfree,   0, 0 },
-        { "fstype",          lprocfs_rd_fstype,      0, 0 },
-        { "mntdev",          lprocfs_mds_rd_mntdev,  0, 0 },
-        { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
-        { "evict_client",    0,                lprocfs_mds_wr_evict_client, 0 },
-        { "evict_ost_nids",  lprocfs_mds_rd_evictostnids,
-                                               lprocfs_mds_wr_evictostnids, 0 },
-        { "num_exports",     lprocfs_rd_num_exports, 0, 0 },
-#ifdef HAVE_QUOTA_SUPPORT
-        { "quota_bunit_sz",  lprocfs_quota_rd_bunit, lprocfs_quota_wr_bunit, 0 },
-        { "quota_btune_sz",  lprocfs_quota_rd_btune, lprocfs_quota_wr_btune, 0 },
-        { "quota_iunit_sz",  lprocfs_quota_rd_iunit, lprocfs_quota_wr_iunit, 0 },
-        { "quota_itune_sz",  lprocfs_quota_rd_itune, lprocfs_quota_wr_itune, 0 },
-        { "quota_type",      lprocfs_quota_rd_type,  lprocfs_quota_wr_type, 0 },
-        { "quota_switch_qs", lprocfs_mds_rd_switch_qs,
-                             lprocfs_mds_wr_switch_qs, 0 },
-        { "quota_boundary_factor", lprocfs_mds_rd_boundary_factor,
-                                   lprocfs_mds_wr_boundary_factor, 0 },
-        { "quota_least_bunit", lprocfs_mds_rd_least_bunit,
-                               lprocfs_mds_wr_least_bunit, 0 },
-        { "quota_least_iunit", lprocfs_mds_rd_least_iunit,
-                               lprocfs_mds_wr_least_iunit, 0 },
-        { "quota_qs_factor",   lprocfs_mds_rd_qs_factor,
-                               lprocfs_mds_wr_qs_factor, 0 },
-        { "quota_switch_seconds",  lprocfs_quota_rd_switch_seconds,
-                                   lprocfs_quota_wr_switch_seconds, 0 },
-#endif
-        { "group_expire_interval", lprocfs_rd_group_expire,
-                             lprocfs_wr_group_expire, 0},
-        { "group_acquire_expire", lprocfs_rd_group_acquire_expire,
-                             lprocfs_wr_group_acquire_expire, 0},
-        { "group_upcall",    lprocfs_rd_group_upcall,
-                             lprocfs_wr_group_upcall, 0},
-        { "group_flush",     0, lprocfs_wr_group_flush, 0},
-        { "group_info",      0, lprocfs_wr_group_info, 0 },
-        { "atime_diff",      lprocfs_rd_atime_diff, lprocfs_wr_atime_diff, 0 },
-        { "rootsquash",      lprocfs_rd_rootsquash,
-                             lprocfs_wr_rootsquash, 0 },
-        { "nosquash_nid",    lprocfs_rd_nosquash_nid,
-                             lprocfs_wr_nosquash_nid, 0 },
-        { 0 }
-};
-
-struct lprocfs_vars lprocfs_mds_module_vars[] = {
-        { "num_refs",     lprocfs_rd_numrefs,     0, 0 },
-        { 0 }
-};
-
-struct lprocfs_vars lprocfs_mdt_obd_vars[] = {
-        { "uuid",         lprocfs_rd_uuid,        0, 0 },
-        { 0 }
-};
-
-struct lprocfs_vars lprocfs_mdt_module_vars[] = {
-        { "num_refs",     lprocfs_rd_numrefs,     0, 0 },
-        { 0 }
-};
-
-void mds_counter_incr(struct obd_export *exp, int opcode)
-{
-        if (exp->exp_obd && exp->exp_obd->obd_stats)
-                lprocfs_counter_incr(exp->exp_obd->obd_stats, opcode);
-        if (exp->exp_nid_stats && exp->exp_nid_stats->nid_stats != NULL)
-                lprocfs_counter_incr(exp->exp_nid_stats->nid_stats, opcode);
-
-}
-
-void mds_stats_counter_init(struct lprocfs_stats *stats)
-{
-        lprocfs_counter_init(stats, LPROC_MDS_OPEN, 0, "open", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_CLOSE, 0, "close", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_MKNOD, 0, "mknod", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_LINK, 0, "link", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_UNLINK, 0, "unlink", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_MKDIR, 0, "mkdir", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_RMDIR, 0, "rmdir", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_RENAME, 0, "rename", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_GETXATTR, 0, "getxattr", "reqs");
-        lprocfs_counter_init(stats, LPROC_MDS_SETXATTR, 0, "setxattr", "reqs");
-}
-
-void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars = lprocfs_mds_module_vars;
-    lvars->obd_vars = lprocfs_mds_obd_vars;
-}
-
-void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars = lprocfs_mdt_module_vars;
-    lvars->obd_vars = lprocfs_mdt_obd_vars;
-}
-#endif
diff --git a/lustre/mds/mds_fs.c b/lustre/mds/mds_fs.c
deleted file mode 100644
index ce27d6acc1279e1ec022ca1ed05b5dea47e4b003..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_fs.c
+++ /dev/null
@@ -1,852 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  mds/mds_fs.c
- *  Lustre Metadata Server (MDS) filesystem interface code
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/module.h>
-#include <linux/kmod.h>
-#include <linux/version.h>
-#include <linux/sched.h>
-#include <lustre_quota.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <linux/mount.h>
-#endif
-#include <lustre_mds.h>
-#include <obd_class.h>
-#include <obd_support.h>
-#include <lustre_lib.h>
-#include <lustre_fsfilt.h>
-#include <lustre_disk.h>
-#include <libcfs/list.h>
-
-#include "mds_internal.h"
-
-
-static int mds_export_stats_init(struct obd_device *obd,
-                                 struct obd_export *exp,
-                                 lnet_nid_t client_nid)
-  {
-        int rc, num_stats, newnid;
-
-        rc = lprocfs_exp_setup(exp, client_nid, &newnid);
-        if (rc)
-                return rc;
-
-        if (client_nid && newnid) {
-                struct nid_stat *tmp = exp->exp_nid_stats;
-                LASSERT(tmp != NULL);
-
-                num_stats = (sizeof(*obd->obd_type->typ_ops) / sizeof(void *)) +
-                             LPROC_MDS_LAST - 1;
-                tmp->nid_stats = lprocfs_alloc_stats(num_stats,
-                                                     LPROCFS_STATS_FLAG_NOPERCPU);
-                if (tmp->nid_stats == NULL)
-                        return -ENOMEM;
-
-                lprocfs_init_ops_stats(LPROC_MDS_LAST, tmp->nid_stats);
-                rc = lprocfs_register_stats(tmp->nid_proc, "stats",
-                                            tmp->nid_stats);
-                if (rc)
-                        return rc;
-
-                mds_stats_counter_init(tmp->nid_stats);
-        }
-
-        return 0;
-}
-
-/* Add client data to the MDS.  We use a bitmap to locate a free space
- * in the last_rcvd file if cl_off is -1 (i.e. a new client).
- * Otherwise, we have just read the data from the last_rcvd file and
- * we know its offset.
- *
- * It should not be possible to fail adding an existing client - otherwise
- * mds_init_server_data() callsite needs to be fixed.
- */
-int mds_client_add(struct obd_device *obd, struct obd_export *exp,
-                   int cl_idx, lnet_nid_t client_nid)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct mds_export_data *med = &exp->exp_mds_data;
-        unsigned long *bitmap = mds->mds_client_bitmap;
-        int new_client = (cl_idx == -1);
-        int rc;
-        ENTRY;
-
-        LASSERT(bitmap != NULL);
-        LASSERTF(cl_idx > -2, "%d\n", cl_idx);
-
-        /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid))
-                RETURN(0);
-
-        /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
-         * there's no need for extra complication here
-         */
-        if (new_client) {
-                cl_idx = find_first_zero_bit(bitmap, LR_MAX_CLIENTS);
-        repeat:
-                if (cl_idx >= LR_MAX_CLIENTS ||
-                    OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_CLIENT_ADD)) {
-                        CERROR("no room for %u clients - fix LR_MAX_CLIENTS\n",
-                               cl_idx);
-                        return -EOVERFLOW;
-                }
-                if (test_and_set_bit(cl_idx, bitmap)) {
-                        cl_idx = find_next_zero_bit(bitmap, LR_MAX_CLIENTS,
-                                                    cl_idx);
-                        goto repeat;
-                }
-        } else {
-                if (test_and_set_bit(cl_idx, bitmap)) {
-                        CERROR("MDS client %d: bit already set in bitmap!!\n",
-                               cl_idx);
-                        LBUG();
-                }
-        }
-
-        CDEBUG(D_INFO, "client at idx %d with UUID '%s' added\n",
-               cl_idx, med->med_mcd->mcd_uuid);
-
-        med->med_lr_idx = cl_idx;
-        med->med_lr_off = le32_to_cpu(mds->mds_server_data->lsd_client_start) +
-                (cl_idx * le16_to_cpu(mds->mds_server_data->lsd_client_size));
-        LASSERTF(med->med_lr_off > 0, "med_lr_off = %llu\n", med->med_lr_off);
-        mds_export_stats_init(obd, exp, client_nid);
-
-        if (new_client) {
-                struct lvfs_run_ctxt saved;
-                loff_t off = med->med_lr_off;
-                struct file *file = mds->mds_rcvd_filp;
-                void *handle;
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                handle = fsfilt_start(obd, file->f_dentry->d_inode,
-                                      FSFILT_OP_SETATTR, NULL);
-                if (IS_ERR(handle)) {
-                        rc = PTR_ERR(handle);
-                        CERROR("unable to start transaction: rc %d\n", rc);
-                } else {
-                        rc = fsfilt_add_journal_cb(obd, 0, handle,
-                                                   target_client_add_cb, exp);
-                        if (rc == 0) {
-                                spin_lock(&exp->exp_lock);
-                                exp->exp_need_sync = 1;
-                                spin_unlock(&exp->exp_lock);
-                        }
-                        rc = fsfilt_write_record(obd, file, med->med_mcd,
-                                                 sizeof(*med->med_mcd),
-                                                 &off, rc /* sync if no cb */);
-                        fsfilt_commit(obd, file->f_dentry->d_inode, handle, 0);
-                }
-
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                if (rc)
-                        return rc;
-                CDEBUG(D_INFO, "wrote client mcd at idx %u off %llu (len %u)\n",
-                       med->med_lr_idx, med->med_lr_off,
-                       (unsigned int)sizeof(*med->med_mcd));
-        }
-        return 0;
-}
-
-int mds_client_free(struct obd_export *exp)
-{
-        struct mds_export_data *med = &exp->exp_mds_data;
-        struct mds_obd *mds = &exp->exp_obd->u.mds;
-        struct obd_device *obd = exp->exp_obd;
-        struct mds_client_data zero_mcd;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        loff_t off;
-        ENTRY;
-
-        if (!med->med_mcd)
-                RETURN(0);
-
-        /* XXX if mcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (!strcmp(med->med_mcd->mcd_uuid, obd->obd_uuid.uuid))
-                GOTO(free, 0);
-
-        CDEBUG(D_INFO, "freeing client at idx %u, offset %lld with UUID '%s'\n",
-               med->med_lr_idx, med->med_lr_off, med->med_mcd->mcd_uuid);
-
-        LASSERT(mds->mds_client_bitmap != NULL);
-
-        lprocfs_exp_cleanup(exp);
-
-        off = med->med_lr_off;
-
-        /* Don't clear med_lr_idx here as it is likely also unset.  At worst
-         * we leak a client slot that will be cleaned on the next recovery. */
-        if (off <= 0) {
-                CERROR("%s: client idx %d has offset %lld\n",
-                        obd->obd_name, med->med_lr_idx, off);
-                GOTO(free, rc = -EINVAL);
-        }
-
-        /* Clear the bit _after_ zeroing out the client so we don't
-           race with mds_client_add and zero out new clients.*/
-        if (!test_bit(med->med_lr_idx, mds->mds_client_bitmap)) {
-                CERROR("MDS client %u: bit already clear in bitmap!!\n",
-                       med->med_lr_idx);
-                LBUG();
-        }
-
-        if (!(exp->exp_flags & OBD_OPT_FAILOVER)) {
-                memset(&zero_mcd, 0, sizeof zero_mcd);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = fsfilt_write_record(obd, mds->mds_rcvd_filp, &zero_mcd,
-                                         sizeof(zero_mcd), &off,
-                                         (!exp->exp_libclient ||
-                                          exp->exp_need_sync));
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                CDEBUG(rc == 0 ? D_INFO : D_ERROR,
-                       "zeroing out client %s idx %u in %s rc %d\n",
-                       med->med_mcd->mcd_uuid, med->med_lr_idx, LAST_RCVD, rc);
-        }
-
-        if (!test_and_clear_bit(med->med_lr_idx, mds->mds_client_bitmap)) {
-                CERROR("MDS client %u: bit already clear in bitmap!!\n",
-                       med->med_lr_idx);
-                LBUG();
-        }
-
-
-        /* Make sure the server's last_transno is up to date. Do this
-         * after the client is freed so we know all the client's
-         * transactions have been committed. */
-        mds_update_server_data(exp->exp_obd, 0);
-
-        EXIT;
- free:
-        OBD_FREE(med->med_mcd, sizeof(*med->med_mcd));
-        med->med_mcd = NULL;
-
-        return 0;
-}
-
-static int mds_server_free_data(struct mds_obd *mds)
-{
-        OBD_FREE(mds->mds_client_bitmap, LR_MAX_CLIENTS / 8);
-        OBD_FREE(mds->mds_server_data, sizeof(*mds->mds_server_data));
-        mds->mds_server_data = NULL;
-
-        return 0;
-}
-
-static int mds_init_server_data(struct obd_device *obd, struct file *file)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lr_server_data *lsd;
-        struct mds_client_data *mcd = NULL;
-        loff_t off = 0;
-        unsigned long last_rcvd_size = i_size_read(file->f_dentry->d_inode);
-        __u64 mount_count;
-        int cl_idx, rc = 0;
-        ENTRY;
-
-        /* ensure padding in the struct is the correct size */
-        LASSERT(offsetof(struct lr_server_data, lsd_padding) +
-                sizeof(lsd->lsd_padding) == LR_SERVER_SIZE);
-        LASSERT(offsetof(struct mds_client_data, mcd_padding) +
-                sizeof(mcd->mcd_padding) == LR_CLIENT_SIZE);
-
-        OBD_ALLOC_WAIT(lsd, sizeof(*lsd));
-        if (!lsd)
-                RETURN(-ENOMEM);
-
-        OBD_ALLOC_WAIT(mds->mds_client_bitmap, LR_MAX_CLIENTS / 8);
-        if (!mds->mds_client_bitmap) {
-                OBD_FREE(lsd, sizeof(*lsd));
-                RETURN(-ENOMEM);
-        }
-
-        mds->mds_server_data = lsd;
-
-        if (last_rcvd_size == 0) {
-                LCONSOLE_WARN("%s: new disk, initializing\n", obd->obd_name);
-
-                memcpy(lsd->lsd_uuid, obd->obd_uuid.uuid,sizeof(lsd->lsd_uuid));
-                lsd->lsd_last_transno = 0;
-                mount_count = lsd->lsd_mount_count = 0;
-                lsd->lsd_server_size = cpu_to_le32(LR_SERVER_SIZE);
-                lsd->lsd_client_start = cpu_to_le32(LR_CLIENT_START);
-                lsd->lsd_client_size = cpu_to_le16(LR_CLIENT_SIZE);
-                lsd->lsd_feature_rocompat = cpu_to_le32(OBD_ROCOMPAT_LOVOBJID);
-                lsd->lsd_feature_incompat = cpu_to_le32(OBD_INCOMPAT_MDT);
-        } else {
-                rc = fsfilt_read_record(obd, file, lsd, sizeof(*lsd), &off);
-                if (rc) {
-                        CERROR("error reading MDS %s: rc %d\n", LAST_RCVD, rc);
-                        GOTO(err_msd, rc);
-                }
-                if (strcmp(lsd->lsd_uuid, obd->obd_uuid.uuid) != 0) {
-                        LCONSOLE_ERROR_MSG(0x157, "Trying to start OBD %s using"
-                                           " the wrong disk %s. Were the /dev/ "
-                                           "assignments rearranged?\n",
-                                           obd->obd_uuid.uuid, lsd->lsd_uuid);
-                        GOTO(err_msd, rc = -EINVAL);
-                }
-                /* COMPAT_146 */
-                /* Assume old last_rcvd format unless I_C_LR is set */
-                if (!(lsd->lsd_feature_incompat &
-                      cpu_to_le32(OBD_INCOMPAT_COMMON_LR)))
-                        lsd->lsd_mount_count = lsd->lsd_compat14;
-                /* end COMPAT_146 */
-                mount_count = le64_to_cpu(lsd->lsd_mount_count);
-        }
-
-        if (lsd->lsd_feature_incompat & ~cpu_to_le32(MDT_INCOMPAT_SUPP)) {
-                CERROR("%s: unsupported incompat filesystem feature(s) %x\n",
-                       obd->obd_name, le32_to_cpu(lsd->lsd_feature_incompat) &
-                       ~MDT_INCOMPAT_SUPP);
-                GOTO(err_msd, rc = -EINVAL);
-        }
-        if (lsd->lsd_feature_rocompat & ~cpu_to_le32(MDT_ROCOMPAT_SUPP)) {
-                CERROR("%s: unsupported read-only filesystem feature(s) %x\n",
-                       obd->obd_name, le32_to_cpu(lsd->lsd_feature_rocompat) &
-                       ~MDT_ROCOMPAT_SUPP);
-                /* Do something like remount filesystem read-only */
-                GOTO(err_msd, rc = -EINVAL);
-        }
-
-        lsd->lsd_feature_compat = cpu_to_le32(OBD_COMPAT_MDT);
-
-        mds->mds_last_transno = le64_to_cpu(lsd->lsd_last_transno);
-
-        CDEBUG(D_INODE, "%s: server last_transno: "LPU64"\n",
-               obd->obd_name, mds->mds_last_transno);
-        CDEBUG(D_INODE, "%s: server mount_count: "LPU64"\n",
-               obd->obd_name, mount_count + 1);
-        CDEBUG(D_INODE, "%s: server data size: %u\n",
-               obd->obd_name, le32_to_cpu(lsd->lsd_server_size));
-        CDEBUG(D_INODE, "%s: per-client data start: %u\n",
-               obd->obd_name, le32_to_cpu(lsd->lsd_client_start));
-        CDEBUG(D_INODE, "%s: per-client data size: %u\n",
-               obd->obd_name, le32_to_cpu(lsd->lsd_client_size));
-        CDEBUG(D_INODE, "%s: last_rcvd size: %lu\n",
-               obd->obd_name, last_rcvd_size);
-        CDEBUG(D_INODE, "%s: last_rcvd clients: %lu\n", obd->obd_name,
-               last_rcvd_size <= le32_to_cpu(lsd->lsd_client_start) ? 0 :
-               (last_rcvd_size - le32_to_cpu(lsd->lsd_client_start)) /
-                le16_to_cpu(lsd->lsd_client_size));
-
-        if (!lsd->lsd_server_size || !lsd->lsd_client_start ||
-            !lsd->lsd_client_size) {
-                CERROR("Bad last_rcvd contents!\n");
-                GOTO(err_msd, rc = -EINVAL);
-        }
-
-        /* When we do a clean MDS shutdown, we save the last_transno into
-         * the header.  If we find clients with higher last_transno values
-         * then those clients may need recovery done. */
-        for (cl_idx = 0, off = le32_to_cpu(lsd->lsd_client_start);
-             off < last_rcvd_size; cl_idx++) {
-                __u64 last_transno;
-                struct obd_export *exp;
-                struct mds_export_data *med;
-
-                if (!mcd) {
-                        OBD_ALLOC_WAIT(mcd, sizeof(*mcd));
-                        if (!mcd)
-                                GOTO(err_client, rc = -ENOMEM);
-                }
-
-                /* Don't assume off is incremented properly by
-                 * fsfilt_read_record(), in case sizeof(*mcd)
-                 * isn't the same as lsd->lsd_client_size.  */
-                off = le32_to_cpu(lsd->lsd_client_start) +
-                        cl_idx * le16_to_cpu(lsd->lsd_client_size);
-                rc = fsfilt_read_record(obd, file, mcd, sizeof(*mcd), &off);
-                if (rc) {
-                        CERROR("error reading MDS %s idx %d, off %llu: rc %d\n",
-                               LAST_RCVD, cl_idx, off, rc);
-                        break; /* read error shouldn't cause startup to fail */
-                }
-
-                if (mcd->mcd_uuid[0] == '\0') {
-                        CDEBUG(D_INFO, "skipping zeroed client at offset %d\n",
-                               cl_idx);
-                        continue;
-                }
-
-                last_transno = le64_to_cpu(mcd->mcd_last_transno) >
-                               le64_to_cpu(mcd->mcd_last_close_transno) ?
-                               le64_to_cpu(mcd->mcd_last_transno) :
-                               le64_to_cpu(mcd->mcd_last_close_transno);
-
-                /* These exports are cleaned up by mds_disconnect(), so they
-                 * need to be set up like real exports as mds_connect() does.
-                 */
-                CDEBUG(D_HA, "RCVRNG CLIENT uuid: %s idx: %d lr: "LPU64
-                       " srv lr: "LPU64" lx: "LPU64"\n", mcd->mcd_uuid, cl_idx,
-                       last_transno, le64_to_cpu(lsd->lsd_last_transno),
-                       le64_to_cpu(mcd->mcd_last_xid));
-
-                exp = class_new_export(obd, (struct obd_uuid *)mcd->mcd_uuid);
-                if (IS_ERR(exp)) {
-                        if (PTR_ERR(exp) == -EALREADY) {
-                                /* export already exists, zero out this one */
-                                mcd->mcd_uuid[0] = '\0';
-                        } else {
-                                GOTO(err_client, rc = PTR_ERR(exp));
-                        }
-                } else {
-                        med = &exp->exp_mds_data;
-                        med->med_mcd = mcd;
-                        rc = mds_client_add(obd, exp, cl_idx, 0);
-                        /* can't fail for existing client */
-                        LASSERTF(rc == 0, "rc = %d\n", rc);
-
-                        mcd = NULL;
-
-                        spin_lock(&exp->exp_lock);
-                        exp->exp_replay_needed = 1;
-                        exp->exp_connecting = 0;
-                        spin_unlock(&exp->exp_lock);
-
-                        obd->obd_recoverable_clients++;
-                        obd->obd_max_recoverable_clients++;
-                        class_export_put(exp);
-                }
-
-                /* Need to check last_rcvd even for duplicated exports. */
-                CDEBUG(D_OTHER, "client at idx %d has last_transno = "LPU64"\n",
-                       cl_idx, last_transno);
-
-                if (last_transno > mds->mds_last_transno)
-                        mds->mds_last_transno = last_transno;
-        }
-
-        if (mcd)
-                OBD_FREE(mcd, sizeof(*mcd));
-
-        obd->obd_last_committed = mds->mds_last_transno;
-
-        if (obd->obd_recoverable_clients) {
-                CWARN("RECOVERY: service %s, %d recoverable clients, "
-                      "last_transno "LPU64"\n", obd->obd_name,
-                      obd->obd_recoverable_clients, mds->mds_last_transno);
-                obd->obd_next_recovery_transno = obd->obd_last_committed + 1;
-                obd->obd_recovering = 1;
-                obd->obd_recovery_start = 0;
-                obd->obd_recovery_end = 0;
-                obd->obd_recovery_timeout = OBD_RECOVERY_FACTOR * obd_timeout;
-#ifdef CRAY_XT3
-                /* bz13079: this won't be changed for mds */
-                obd->obd_recovery_max_time = OBD_RECOVERY_MAX_TIME;
-#endif
-        }
-
-        mds->mds_mount_count = mount_count + 1;
-        lsd->lsd_mount_count = lsd->lsd_compat14 =
-                cpu_to_le64(mds->mds_mount_count);
-
-        /* save it, so mount count and last_transno is current */
-        rc = mds_update_server_data(obd, 1);
-        if (rc)
-                GOTO(err_client, rc);
-
-        RETURN(0);
-
-err_client:
-        class_disconnect_exports(obd);
-err_msd:
-        mds_server_free_data(mds);
-        RETURN(rc);
-}
-
-int mds_fs_setup(struct obd_device *obd, struct vfsmount *mnt)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lvfs_run_ctxt saved;
-        struct dentry *dentry;
-        struct file *file;
-        int rc;
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_MDS_FS_SETUP, -ENOENT);
-
-        rc = cleanup_group_info();
-        if (rc)
-                RETURN(rc);
-
-        mds->mds_vfsmnt = mnt;
-        /* why not mnt->mnt_sb instead of mnt->mnt_root->d_inode->i_sb? */
-        obd->u.obt.obt_sb = mnt->mnt_root->d_inode->i_sb;
-
-        rc = fsfilt_setup(obd, obd->u.obt.obt_sb);
-        if (rc)
-                RETURN(rc);
-
-        OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt);
-        obd->obd_lvfs_ctxt.pwdmnt = mnt;
-        obd->obd_lvfs_ctxt.pwd = mnt->mnt_root;
-        obd->obd_lvfs_ctxt.fs = get_ds();
-        obd->obd_lvfs_ctxt.cb_ops = mds_lvfs_ops;
-
-        /* setup the directory tree */
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        dentry = simple_mkdir(current->fs->pwd, "ROOT", 0755, 0);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot create ROOT directory: rc = %d\n", rc);
-                GOTO(err_pop, rc);
-        }
-
-        mds->mds_rootfid.id = dentry->d_inode->i_ino;
-        mds->mds_rootfid.generation = dentry->d_inode->i_generation;
-        mds->mds_rootfid.f_type = S_IFDIR;
-
-        dput(dentry);
-
-        dentry = lookup_one_len("__iopen__", current->fs->pwd,
-                                strlen("__iopen__"));
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot lookup __iopen__ directory: rc = %d\n", rc);
-                GOTO(err_pop, rc);
-        }
-
-        mds->mds_fid_de = dentry;
-        if (!dentry->d_inode || is_bad_inode(dentry->d_inode)) {
-                rc = -ENOENT;
-                CERROR("__iopen__ directory has no inode? rc = %d\n", rc);
-                GOTO(err_fid, rc);
-        }
-
-        dentry = simple_mkdir(current->fs->pwd, "PENDING", 0777, 1);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot create PENDING directory: rc = %d\n", rc);
-                GOTO(err_fid, rc);
-        }
-        mds->mds_pending_dir = dentry;
-
-        /* COMPAT_146 */
-        dentry = simple_mkdir(current->fs->pwd, MDT_LOGS_DIR, 0777, 1);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot create %s directory: rc = %d\n",
-                       MDT_LOGS_DIR, rc);
-                GOTO(err_pending, rc);
-        }
-        mds->mds_logs_dir = dentry;
-        /* end COMPAT_146 */
-
-        dentry = simple_mkdir(current->fs->pwd, "OBJECTS", 0777, 1);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot create OBJECTS directory: rc = %d\n", rc);
-                GOTO(err_logs, rc);
-        }
-        mds->mds_objects_dir = dentry;
-
-        /* open and test the last rcvd file */
-        file = filp_open(LAST_RCVD, O_RDWR | O_CREAT, 0644);
-        if (IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("cannot open/create %s file: rc = %d\n", LAST_RCVD, rc);
-                GOTO(err_objects, rc = PTR_ERR(file));
-        }
-        mds->mds_rcvd_filp = file;
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", LAST_RCVD,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(err_last_rcvd, rc = -ENOENT);
-        }
-
-        rc = mds_init_server_data(obd, file);
-        if (rc) {
-                CERROR("cannot read %s: rc = %d\n", LAST_RCVD, rc);
-                GOTO(err_last_rcvd, rc);
-        }
-
-        rc = mds_lov_init_objids(obd);
-        if (rc != 0) {
-               CERROR("cannot init lov objid rc = %d\n", rc);
-               GOTO(err_client, rc );
-        }
-
-        /* open and test the check io file junk */
-        file = filp_open(HEALTH_CHECK, O_RDWR | O_CREAT, 0644);
-        if (IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("cannot open/create %s file: rc = %d\n",HEALTH_CHECK,rc);
-                GOTO(err_lov_objid, rc = PTR_ERR(file));
-        }
-        mds->mds_health_check_filp = file;
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", HEALTH_CHECK,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(err_health_check, rc = -ENOENT);
-        }
-        rc = lvfs_check_io_health(obd, file);
-        if (rc)
-                GOTO(err_health_check, rc);
-err_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        return rc;
-
-err_health_check:
-        if (mds->mds_health_check_filp &&
-            filp_close(mds->mds_health_check_filp, 0))
-                CERROR("can't close %s after error\n", HEALTH_CHECK);
-err_lov_objid:
-         mds_lov_destroy_objids(obd);
-err_client:
-        class_disconnect_exports(obd);
-err_last_rcvd:
-        if (mds->mds_rcvd_filp && filp_close(mds->mds_rcvd_filp, 0))
-                CERROR("can't close %s after error\n", LAST_RCVD);
-err_objects:
-        dput(mds->mds_objects_dir);
-err_logs:
-        dput(mds->mds_logs_dir);
-err_pending:
-        dput(mds->mds_pending_dir);
-err_fid:
-        dput(mds->mds_fid_de);
-        goto err_pop;
-}
-
-int mds_fs_cleanup(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lvfs_run_ctxt saved;
-        int rc = 0;
-
-        if (obd->obd_fail)
-                LCONSOLE_WARN("%s: shutting down for failover; client state "
-                              "will be preserved.\n", obd->obd_name);
-
-        class_disconnect_exports(obd); /* cleans up client info too */
-        mds_server_free_data(mds);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (mds->mds_rcvd_filp) {
-                rc = filp_close(mds->mds_rcvd_filp, 0);
-                mds->mds_rcvd_filp = NULL;
-                if (rc)
-                        CERROR("%s file won't close, rc=%d\n", LAST_RCVD, rc);
-        }
-
-        mds_lov_destroy_objids(obd);
-
-        if (mds->mds_health_check_filp) {
-                rc = filp_close(mds->mds_health_check_filp, 0);
-                mds->mds_health_check_filp = NULL;
-                if (rc)
-                        CERROR("%s file won't close, rc=%d\n", HEALTH_CHECK,rc);
-        }
-        if (mds->mds_objects_dir != NULL) {
-                l_dput(mds->mds_objects_dir);
-                mds->mds_objects_dir = NULL;
-        }
-        if (mds->mds_logs_dir) {
-                l_dput(mds->mds_logs_dir);
-                mds->mds_logs_dir = NULL;
-        }
-        if (mds->mds_pending_dir) {
-                l_dput(mds->mds_pending_dir);
-                mds->mds_pending_dir = NULL;
-        }
-
-        lquota_fs_cleanup(mds_quota_interface_ref, obd);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        shrink_dcache_parent(mds->mds_fid_de);
-        dput(mds->mds_fid_de);
-        LL_DQUOT_OFF(obd->u.obt.obt_sb);
-
-        return rc;
-}
-
-/* Creates an object with the same name as its fid.  Because this is not at all
- * performance sensitive, it is accomplished by creating a file, checking the
- * fid, and renaming it. */
-int mds_obd_create(struct obd_export *exp, struct obdo *oa,
-                   struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct mds_obd *mds = &exp->exp_obd->u.mds;
-        struct inode *parent_inode = mds->mds_objects_dir->d_inode;
-        unsigned int tmpname = ll_rand();
-        struct file *filp;
-        struct dentry *new_child;
-        struct lvfs_run_ctxt saved;
-        char fidname[LL_FID_NAMELEN];
-        void *handle;
-        struct lvfs_ucred ucred = { 0 };
-        int rc = 0, err, namelen;
-        ENTRY;
-
-        /* the owner of object file should always be root */
-        cap_raise(ucred.luc_cap, CAP_SYS_RESOURCE);
-
-        push_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, &ucred);
-
-        sprintf(fidname, "OBJECTS/%u.%u", tmpname, current->pid);
-        filp = filp_open(fidname, O_CREAT | O_EXCL, 0666);
-        if (IS_ERR(filp)) {
-                rc = PTR_ERR(filp);
-                if (rc == -EEXIST) {
-                        CERROR("impossible object name collision %u\n",
-                               tmpname);
-                        LBUG();
-                }
-                CERROR("error creating tmp object %u: rc %d\n", tmpname, rc);
-                GOTO(out_pop, rc);
-        }
-
-        LASSERT(mds->mds_objects_dir == filp->f_dentry->d_parent);
-
-        oa->o_id = filp->f_dentry->d_inode->i_ino;
-        oa->o_generation = filp->f_dentry->d_inode->i_generation;
-        namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation);
-
-        LOCK_INODE_MUTEX(parent_inode);
-        new_child = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
-
-        if (IS_ERR(new_child)) {
-                CERROR("getting neg dentry for obj rename: %d\n", rc);
-                GOTO(out_close, rc = PTR_ERR(new_child));
-        }
-        if (new_child->d_inode != NULL) {
-                CERROR("impossible non-negative obj dentry " LPU64":%u!\n",
-                       oa->o_id, oa->o_generation);
-                LBUG();
-        }
-
-        handle = fsfilt_start(exp->exp_obd, mds->mds_objects_dir->d_inode,
-                              FSFILT_OP_RENAME, NULL);
-        if (IS_ERR(handle))
-                GOTO(out_dput, rc = PTR_ERR(handle));
-
-        lock_kernel();
-        rc = vfs_rename(mds->mds_objects_dir->d_inode, filp->f_dentry,
-                        mds->mds_objects_dir->d_inode, new_child);
-        unlock_kernel();
-        if (rc)
-                CERROR("error renaming new object "LPU64":%u: rc %d\n",
-                       oa->o_id, oa->o_generation, rc);
-
-        err = fsfilt_commit(exp->exp_obd, mds->mds_objects_dir->d_inode,
-                            handle, 0);
-        if (!err)
-                oa->o_valid |= OBD_MD_FLID | OBD_MD_FLGENER;
-        else if (!rc)
-                rc = err;
-out_dput:
-        dput(new_child);
-out_close:
-        UNLOCK_INODE_MUTEX(parent_inode);
-        err = filp_close(filp, 0);
-        if (err) {
-                CERROR("closing tmpfile %u: rc %d\n", tmpname, rc);
-                if (!rc)
-                        rc = err;
-        }
-out_pop:
-        pop_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, &ucred);
-        RETURN(rc);
-}
-
-int mds_obd_destroy(struct obd_export *exp, struct obdo *oa,
-                    struct lov_stripe_md *ea, struct obd_trans_info *oti,
-                    struct obd_export *md_exp)
-{
-        struct mds_obd *mds = &exp->exp_obd->u.mds;
-        struct inode *parent_inode = mds->mds_objects_dir->d_inode;
-        struct obd_device *obd = exp->exp_obd;
-        struct lvfs_run_ctxt saved;
-        struct lvfs_ucred ucred = { 0 };
-        char fidname[LL_FID_NAMELEN];
-        struct inode *inode = NULL;
-        struct dentry *de;
-        void *handle;
-        int err, namelen, rc = 0;
-        ENTRY;
-
-        cap_raise(ucred.luc_cap, CAP_SYS_RESOURCE);
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &ucred);
-
-        namelen = ll_fid2str(fidname, oa->o_id, oa->o_generation);
-
-        LOCK_INODE_MUTEX(parent_inode);
-        de = lookup_one_len(fidname, mds->mds_objects_dir, namelen);
-        if (IS_ERR(de)) {
-                rc = IS_ERR(de);
-                de = NULL;
-                CERROR("error looking up object "LPU64" %s: rc %d\n",
-                       oa->o_id, fidname, rc);
-                GOTO(out_dput, rc);
-        }
-        if (de->d_inode == NULL) {
-                CERROR("destroying non-existent object "LPU64" %s: rc %d\n",
-                       oa->o_id, fidname, rc);
-                GOTO(out_dput, rc = -ENOENT);
-        }
-
-        /* Stripe count is 1 here since this is some MDS specific stuff
-           that is unlinked, not spanned across multiple OSTs */
-        handle = fsfilt_start_log(obd, mds->mds_objects_dir->d_inode,
-                                  FSFILT_OP_UNLINK, oti, 1);
-
-        if (IS_ERR(handle))
-                GOTO(out_dput, rc = PTR_ERR(handle));
-
-        /* take a reference to protect inode from truncation within
-           vfs_unlink() context. bug 10409 */
-        inode = de->d_inode;
-        atomic_inc(&inode->i_count);
-        rc = vfs_unlink(mds->mds_objects_dir->d_inode, de);
-        if (rc)
-                CERROR("error destroying object "LPU64":%u: rc %d\n",
-                       oa->o_id, oa->o_generation, rc);
-
-        err = fsfilt_commit(obd, mds->mds_objects_dir->d_inode, handle, 0);
-        if (err && !rc)
-                rc = err;
-out_dput:
-        if (de != NULL)
-                l_dput(de);
-        UNLOCK_INODE_MUTEX(parent_inode);
-
-        if (inode)
-                iput(inode);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &ucred);
-        RETURN(rc);
-}
diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h
deleted file mode 100644
index 6041da69801a0515be8aa40cab8f51b0fc45dafc..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_internal.h
+++ /dev/null
@@ -1,289 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _MDS_INTERNAL_H
-#define _MDS_INTERNAL_H
-
-#include <lustre_disk.h>
-#include <lustre_mds.h>
-
-#define MDT_ROCOMPAT_SUPP       (OBD_ROCOMPAT_LOVOBJID)
-#define MDT_INCOMPAT_SUPP       (OBD_INCOMPAT_MDT | OBD_INCOMPAT_COMMON_LR)
-
-/* Data stored per client in the last_rcvd file.  In le32 order. */
-struct mds_client_data {
-        __u8 mcd_uuid[40];      /* client UUID */
-        __u64 mcd_last_transno; /* last completed transaction ID */
-        __u64 mcd_last_xid;     /* xid for the last transaction */
-        __u32 mcd_last_result;  /* result from last RPC */
-        __u32 mcd_last_data;    /* per-op data (disposition for open &c.) */
-        /* for MDS_CLOSE requests */
-        __u64 mcd_last_close_transno; /* last completed transaction ID */
-        __u64 mcd_last_close_xid;     /* xid for the last transaction */
-        __u32 mcd_last_close_result;  /* result from last RPC */
-        __u32 mcd_last_close_data;  /* per-op data (disposition for open &c.) */
-        __u8 mcd_padding[LR_CLIENT_SIZE - 88];
-};
-
-#define MDS_SERVICE_WATCHDOG_FACTOR 2000
-
-#define MAX_ATIME_DIFF 60
-
-struct mds_filter_data {
-        __u64 io_epoch;
-};
-
-#define MDS_FILTERDATA(inode) ((struct mds_filter_data *)(inode)->i_filterdata)
-
-static inline struct mds_obd *mds_req2mds(struct ptlrpc_request *req)
-{
-        return &req->rq_export->exp_obd->u.mds;
-}
-
-#ifdef __KERNEL__
-/* Open counts for files.  No longer atomic, must hold inode->i_sem */
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# define mds_inode_oatomic(inode)    ((inode)->i_cindex)
-#else
-# define mds_inode_oatomic(inode)    ((inode)->i_attr_flags)
-#endif
-
-#ifdef HAVE_I_ALLOC_SEM
-#define MDS_UP_READ_ORPHAN_SEM(i)          UP_READ_I_ALLOC_SEM(i)
-#define MDS_DOWN_READ_ORPHAN_SEM(i)        DOWN_READ_I_ALLOC_SEM(i)
-#define LASSERT_MDS_ORPHAN_READ_LOCKED(i)  LASSERT_I_ALLOC_SEM_READ_LOCKED(i)
-
-#define MDS_UP_WRITE_ORPHAN_SEM(i)         UP_WRITE_I_ALLOC_SEM(i)
-#define MDS_DOWN_WRITE_ORPHAN_SEM(i)       DOWN_WRITE_I_ALLOC_SEM(i)
-#define LASSERT_MDS_ORPHAN_WRITE_LOCKED(i) LASSERT_I_ALLOC_SEM_WRITE_LOCKED(i)
-#define MDS_PACK_MD_LOCK 1
-#else
-#define MDS_UP_READ_ORPHAN_SEM(i)          do { up(&(i)->i_sem); } while (0)
-#define MDS_DOWN_READ_ORPHAN_SEM(i)        do { down(&(i)->i_sem); } while (0)
-#define LASSERT_MDS_ORPHAN_READ_LOCKED(i)  LASSERT(down_trylock(&(i)->i_sem)!=0)
-
-#define MDS_UP_WRITE_ORPHAN_SEM(i)         do { up(&(i)->i_sem); } while (0)
-#define MDS_DOWN_WRITE_ORPHAN_SEM(i)       do { down(&(i)->i_sem); } while (0)
-#define LASSERT_MDS_ORPHAN_WRITE_LOCKED(i) LASSERT(down_trylock(&(i)->i_sem)!=0)
-#define MDS_PACK_MD_LOCK 0
-#endif
-
-static inline int mds_orphan_open_count(struct inode *inode)
-{
-        LASSERT_MDS_ORPHAN_READ_LOCKED(inode);
-        return mds_inode_oatomic(inode);
-}
-
-static inline int mds_orphan_open_inc(struct inode *inode)
-{
-        LASSERT_MDS_ORPHAN_WRITE_LOCKED(inode);
-        return ++mds_inode_oatomic(inode);
-}
-
-static inline int mds_orphan_open_dec_test(struct inode *inode)
-{
-        LASSERT_MDS_ORPHAN_WRITE_LOCKED(inode);
-        return --mds_inode_oatomic(inode) == 0;
-}
-
-#define mds_inode_is_orphan(inode)  ((inode)->i_flags & 0x4000000)
-
-static inline void mds_inode_set_orphan(struct inode *inode)
-{
-        inode->i_flags |= 0x4000000;
-        CDEBUG(D_VFSTRACE, "setting orphan flag on inode %p\n", inode);
-}
-
-static inline void mds_inode_unset_orphan(struct inode *inode)
-{
-        inode->i_flags &= ~(0x4000000);
-        CDEBUG(D_VFSTRACE, "removing orphan flag from inode %p\n", inode);
-}
-
-#endif /* __KERNEL__ */
-
-#define MDS_CHECK_RESENT(req, reconstruct)                                    \
-{                                                                             \
-        if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_RESENT) {              \
-                struct mds_client_data *mcd =                                 \
-                        req->rq_export->exp_mds_data.med_mcd;                 \
-                if (le64_to_cpu(mcd->mcd_last_xid) == req->rq_xid) {          \
-                        reconstruct;                                          \
-                        RETURN(le32_to_cpu(mcd->mcd_last_result));            \
-                }                                                             \
-                if (le64_to_cpu(mcd->mcd_last_close_xid) == req->rq_xid) {    \
-                        reconstruct;                                          \
-                        RETURN(le32_to_cpu(mcd->mcd_last_close_result));      \
-                }                                                             \
-                DEBUG_REQ(D_HA, req, "no reply for RESENT req (have "LPD64")",\
-                          mcd->mcd_last_xid);                                 \
-        }                                                                     \
-}
-
-/* mds/mds_reint.c */
-int res_gt(struct ldlm_res_id *res1, struct ldlm_res_id *res2,
-           ldlm_policy_data_t *p1, ldlm_policy_data_t *p2);
-int enqueue_ordered_locks(struct obd_device *obd, struct ldlm_res_id *p1_res_id,
-                          struct lustre_handle *p1_lockh, int p1_lock_mode,
-                          ldlm_policy_data_t *p1_policy,
-                          struct ldlm_res_id *p2_res_id,
-                          struct lustre_handle *p2_lockh, int p2_lock_mode,
-                          ldlm_policy_data_t *p2_policy);
-void mds_commit_cb(struct obd_device *, __u64 last_rcvd, void *data, int error);
-int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle,
-                       struct ptlrpc_request *req, int rc, __u32 op_data, 
-                       int force_sync);
-void mds_reconstruct_generic(struct ptlrpc_request *req);
-void mds_req_from_mcd(struct ptlrpc_request *req, struct mds_client_data *mcd);
-int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds,
-                                struct ll_fid *fid,
-                                struct lustre_handle *parent_lockh,
-                                struct dentry **dparentp, int parent_mode,
-                                __u64 parent_lockpart,
-                                char *name, int namelen,
-                                struct lustre_handle *child_lockh,
-                                struct dentry **dchildp, int child_mode,
-                                __u64 child_lockpart);
-int mds_lock_new_child(struct obd_device *obd, struct inode *inode,
-                       struct lustre_handle *child_lockh);
-int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode,
-                          struct lov_mds_md *lmm, int lmm_size,
-                          struct llog_cookie *logcookies, struct ll_fid *fid);
-
-int mds_get_parents_children_locked(struct obd_device *obd,
-                                    struct mds_obd *mds,
-                                    struct ll_fid *p1_fid,
-                                    struct dentry **de_srcdirp,
-                                    struct ll_fid *p2_fid,
-                                    struct dentry **de_tgtdirp,
-                                    int parent_mode,
-                                    const char *old_name, int old_len,
-                                    struct dentry **de_oldp,
-                                    const char *new_name, int new_len,
-                                    struct dentry **de_newp,
-                                    struct lustre_handle *dlm_handles,
-                                    int child_mode);
-
-void mds_shrink_reply(struct obd_device *obd, struct ptlrpc_request *req,
-                      struct mds_body *body, int md_off);
-int mds_get_cookie_size(struct obd_device *obd, struct lov_mds_md *lmm);
-/* mds/mds_lib.c */
-int mds_update_unpack(struct ptlrpc_request *, int offset,
-                      struct mds_update_record *);
-int mds_init_ucred(struct lvfs_ucred *ucred, struct ptlrpc_request *req,
-                   int offset);
-void mds_exit_ucred(struct lvfs_ucred *ucred, struct mds_obd *obd);
-void mds_root_squash(struct mds_obd *mds, lnet_nid_t *peernid,
-                     __u32 *fsuid, __u32 *fsgid, __u32 *cap,
-                     __u32 *suppgid, __u32 *suppgid2);
-
-/* mds/mds_unlink_open.c */
-int mds_osc_destroy_orphan(struct obd_device *obd, umode_t mode,
-                           struct lov_mds_md *lmm, int lmm_size,
-                           struct llog_cookie *logcookies, int log_unlink);
-int mds_cleanup_pending(struct obd_device *obd);
-
-/* mds/mds_log.c */
-int mds_log_op_unlink(struct obd_device *obd,
-                      struct lov_mds_md *lmm, int lmm_size,
-                      struct llog_cookie *logcookies, int cookies_size);
-int mds_log_op_setattr(struct obd_device *obd, struct inode *inode,
-                      struct lov_mds_md *lmm, int lmm_size,
-                      struct llog_cookie *logcookies, int cookies_size);
-int mds_llog_init(struct obd_device *obd, struct obd_device *tgt, int count,
-                  struct llog_catid *logid, struct obd_uuid *uuid);
-int mds_llog_finish(struct obd_device *obd, int count);
-
-/* mds/mds_lov.c */
-int mds_lov_connect(struct obd_device *obd, char * lov_name);
-int mds_lov_disconnect(struct obd_device *obd);
-
-int mds_lov_write_objids(struct obd_device *obd);
-void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm);
-int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid);
-
-int mds_lov_start_synchronize(struct obd_device *obd, 
-                              struct obd_device *watched,
-                              void *data, int nonblock);
-int mds_post_mds_lovconf(struct obd_device *obd);
-int mds_notify(struct obd_device *obd, struct obd_device *watched,
-               enum obd_notify_event ev, void *data);
-int mds_get_default_md(struct obd_device *obd, struct lov_mds_md *lmm,
-                       int *lmmsize);
-int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
-                       struct lov_mds_md *lmm, int lmm_size);
-int mds_init_lov_desc(struct obd_device *obd, struct obd_export *osc_exp);
-
-/* mds/mds_open.c */
-int mds_query_write_access(struct inode *inode);
-int mds_open(struct mds_update_record *rec, int offset,
-             struct ptlrpc_request *req, struct lustre_handle *);
-int mds_pin(struct ptlrpc_request *req, int offset);
-void mds_mfd_unlink(struct mds_file_data *mfd, int decref);
-int mds_mfd_close(struct ptlrpc_request *req, int offset,struct obd_device *obd,
-                  struct mds_file_data *mfd, int unlink_orphan,
-                  struct lov_mds_md *lmm, int lmm_size,
-                  struct llog_cookie *logcookies, int cookies_size,
-                  __u64 *valid);
-int mds_close(struct ptlrpc_request *req, int offset);
-int mds_done_writing(struct ptlrpc_request *req, int offset);
-
-/*mds/mds_join.c*/
-int mds_join_file(struct mds_update_record *rec, struct ptlrpc_request *req, 
-                  struct dentry *dchild, struct lustre_handle *lockh);
-
-/* mds/mds_fs.c */
-int mds_client_add(struct obd_device *obd, struct obd_export *exp,
-                   int cl_off, lnet_nid_t client_nid);
-int mds_client_free(struct obd_export *exp);
-int mds_obd_create(struct obd_export *exp, struct obdo *oa,
-                   struct lov_stripe_md **ea, struct obd_trans_info *oti);
-int mds_obd_destroy(struct obd_export *exp, struct obdo *oa,
-                    struct lov_stripe_md *ea, struct obd_trans_info *oti,
-                    struct obd_export *md_exp);
-
-/* mds/handler.c */
-extern struct lvfs_callback_ops mds_lvfs_ops;
-extern int mds_iocontrol(unsigned int cmd, struct obd_export *exp,
-                         int len, void *karg, void *uarg);
-int mds_postrecov(struct obd_device *obd);
-int mds_init_export(struct obd_export *exp);
-#ifdef __KERNEL__
-int mds_get_md(struct obd_device *, struct inode *, void *md, int *size,
-               int lock, int flags);
-int mds_pack_md(struct obd_device *, struct lustre_msg *, int offset,
-                struct mds_body *, struct inode *, int lock, int flags);
-void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode);
-void mds_pack_inode2body(struct mds_body *body, struct inode *inode);
-#endif
-int mds_pack_acl(struct mds_export_data *med, struct inode *inode,
-                 struct lustre_msg *repmsg, struct mds_body *repbody,
-                 int repoff);
-
-/* quota stuff */
-extern quota_interface_t *mds_quota_interface_ref;
-
-/* mds/mds_xattr.c */
-int mds_setxattr(struct ptlrpc_request *req);
-int mds_getxattr(struct ptlrpc_request *req);
-
-/* mds/lproc_mds.c */
-enum {
-        LPROC_MDS_OPEN = 0,
-        LPROC_MDS_CLOSE,
-        LPROC_MDS_MKNOD,
-        LPROC_MDS_LINK,
-        LPROC_MDS_UNLINK,
-        LPROC_MDS_MKDIR,
-        LPROC_MDS_RMDIR,
-        LPROC_MDS_RENAME,
-        LPROC_MDS_GETXATTR,
-        LPROC_MDS_SETXATTR,
-        LPROC_MDS_LAST,
-};
-void mds_counter_incr(struct obd_export *exp, int opcode);
-void mds_stats_counter_init(struct lprocfs_stats *stats);
-void lprocfs_mds_init_vars(struct lprocfs_static_vars *lvars);
-void lprocfs_mdt_init_vars(struct lprocfs_static_vars *lvars);
-#endif /* _MDS_INTERNAL_H */
diff --git a/lustre/mds/mds_join.c b/lustre/mds/mds_join.c
deleted file mode 100644
index af5ab2651c41d2ee457f26e057c27de822abaef9..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_join.c
+++ /dev/null
@@ -1,506 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/mds/mds_join.c
- *  Lustre Metadata join handler file
- *
- *  Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *   Author: Wang Di <wangdi@clusterfs.com>
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/fs.h>
-#include <linux/jbd.h>
-#include <linux/ext3_fs.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_log.h>
-#include <lustre_fsfilt.h>
-#include <lustre_lite.h>
-#include <obd_lov.h>
-#include "mds_internal.h"
-
-struct mdsea_cb_data {
-    struct llog_handle     *mc_llh;
-    struct lov_mds_md      *mc_lmm;
-    struct lov_mds_md_join *mc_lmm_join;
-    __u64                   mc_offset;
-    __u64                   mc_headfile_sz;
-};
-
-static int mdsea_iterate(struct llog_handle *llh_tail, llog_cb_t cb,
-                         void *cbdata)
-{
-    return llog_process(llh_tail, cb, cbdata, NULL);
-}
-
-static int mds_insert_join_lmm(struct llog_handle *llh,
-                               struct lov_mds_md *lmm,
-                               __u64 start, __u64 len,
-                               struct lov_mds_md_join *lmmj)
-{
-        struct llog_rec_hdr rec;
-        struct mds_extent_desc *med;
-        int sz_med, rc;
-        ENTRY;
-
-
-        sz_med = lov_mds_md_size(le32_to_cpu(lmm->lmm_stripe_count));
-        sz_med += 2 * sizeof(__u64);
-        sz_med = size_round(sz_med);
-
-        rec.lrh_len  = cpu_to_le32(sz_med);
-        rec.lrh_type = cpu_to_le32(LLOG_JOIN_REC);
-
-        CDEBUG(D_INFO, "insert extent "LPU64":"LPU64" lmm \n", start, len);
-
-        OBD_ALLOC(med, sz_med);
-        if (med == NULL)
-                RETURN(-ENOMEM);
-
-        med->med_start = start;
-        med->med_len = len;
-        memcpy(&med->med_lmm, lmm,
-                lov_mds_md_size(le32_to_cpu(lmm->lmm_stripe_count)));
-
-        rc = llog_write_rec(llh, &rec, NULL, 0, med, -1);
-        OBD_FREE(med, sz_med);
-
-        if (lmmj) {
-                /*modify lmmj for join stripe info*/
-                lmmj->lmmj_md.lmm_stripe_count += lmm->lmm_stripe_count;
-                lmmj->lmmj_extent_count ++;
-        }
-
-        RETURN(rc);
-}
-
-static int mdsea_append_extent(struct llog_handle *llh_tail,
-                               struct llog_rec_hdr *rec_in_tail,
-                               struct mdsea_cb_data *cbdata)
-{
-        struct mds_extent_desc *med =
-                        &((struct llog_array_rec *)rec_in_tail)->lmr_med;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_INODE, "insert lmm extent: "LPU64":"LPU64" \n",
-               med->med_start, med->med_len);
-        rc = mds_insert_join_lmm(cbdata->mc_llh, &med->med_lmm,
-                                 med->med_start + cbdata->mc_headfile_sz,
-                                 med->med_len, cbdata->mc_lmm_join);
-        if (rc) {
-                CERROR("error %d insert the lmm \n", rc);
-                RETURN(rc);
-        }
-        RETURN(LLOG_DEL_RECORD);
-}
-
-static void mds_init_stripe_join(struct lov_mds_md_join *lmmj,
-                                 struct lov_mds_md *lmm,
-                                 struct llog_logid  *logid)
-{
-        lmmj->lmmj_md.lmm_magic = cpu_to_le32(LOV_MAGIC_JOIN);
-        lmmj->lmmj_md.lmm_object_id = lmm->lmm_object_id;
-        lmmj->lmmj_md.lmm_object_gr = lmm->lmm_object_gr;
-        lmmj->lmmj_md.lmm_pattern = lmm->lmm_pattern;
-        lmmj->lmmj_md.lmm_stripe_size = lmm->lmm_stripe_size;
-        lmmj->lmmj_md.lmm_stripe_count = 0;
-        lmmj->lmmj_extent_count = 0;
-        lmmj->lmmj_array_id = *logid;
-}
-
-static int mdsea_cancel_last_extent(struct llog_handle *llh_tail,
-                                    struct llog_rec_hdr *rec_in_tail,
-                                    struct mdsea_cb_data *cbdata)
-{
-        struct mds_extent_desc *med =
-                        &((struct llog_array_rec *)rec_in_tail)->lmr_med;
-
-        CDEBUG(D_INODE, "extent: "LPU64":"LPU64" \n",  med->med_start,
-               med->med_len);
-
-        LASSERTF(cbdata->mc_offset == med->med_start,
-                 "A hole in the extent "LPU64"--"LPU64"\n",
-                 cbdata->mc_offset, med->med_start);
-
-        if (med->med_len != -1)
-                cbdata->mc_offset = med->med_start + med->med_len;
-
-        if (med->med_start > cbdata->mc_headfile_sz || (med->med_len == -1)) {
-                CDEBUG(D_INFO, "del rec offset"LPU64", head size "LPU64" \n",
-                       med->med_start, cbdata->mc_headfile_sz);
-                if (!cbdata->mc_lmm) {
-                        int stripe = le32_to_cpu(med->med_lmm.lmm_stripe_count);
-                        OBD_ALLOC(cbdata->mc_lmm, lov_mds_md_size(stripe));
-                        if (!cbdata->mc_lmm)
-                                RETURN(-ENOMEM);
-                        memcpy(cbdata->mc_lmm, &med->med_lmm,
-                               lov_mds_md_size(stripe));
-                }
-                RETURN(LLOG_DEL_RECORD);
-        }
-        RETURN(0);
-}
-
-static int  mds_adjust_last_extent(struct llog_handle *llh_head,
-                                   __u64 head_size)
-{
-        struct mdsea_cb_data  *cbdata;
-        int    rc;
-        ENTRY;
-
-        OBD_ALLOC_PTR(cbdata);
-
-        if (!cbdata)
-                RETURN(-ENOMEM);
-
-        cbdata->mc_headfile_sz = head_size;
-        /*Find the last extent and cancel the record in the lmm*/
-        rc = mdsea_iterate(llh_head, (llog_cb_t)mdsea_cancel_last_extent,
-                           cbdata);
-
-        if (rc) {
-                CERROR("can not find the last extent rc=%d\n", rc);
-                GOTO(exit, rc);
-        }
-
-        LASSERT(cbdata->mc_lmm);
-
-        CDEBUG(D_INODE, "insert lmm extent: "LPU64":"LPU64" \n",
-               cbdata->mc_offset, (head_size - cbdata->mc_offset));
-
-        rc = mds_insert_join_lmm(llh_head, cbdata->mc_lmm,
-                                 cbdata->mc_offset,
-                                 (head_size - cbdata->mc_offset),
-                                 NULL);
-        if (rc)
-                CERROR("error insert the lmm rc %d \n", rc);
-exit:
-        if (cbdata && cbdata->mc_lmm)
-                OBD_FREE(cbdata->mc_lmm,
-                         lov_mds_md_size(cbdata->mc_lmm->lmm_stripe_count));
-        if (cbdata)
-                OBD_FREE_PTR(cbdata);
-
-        RETURN(rc);
-}
-
-static void mds_finish_join(struct mds_obd *mds, struct ptlrpc_request *req,
-                           struct inode *inode, struct lov_mds_md_join *lmmj)
-{
-        struct mds_body *body = (struct mds_body *)
-                                lustre_msg_buf(req->rq_repmsg, 1, 0);
-        int max_cookiesize = lmmj->lmmj_md.lmm_stripe_count *
-                                sizeof(struct llog_cookie);
-        int max_easize = sizeof(*lmmj);
-
-        CDEBUG(D_INFO, "change the max md size from %d to "LPSZ"\n",
-               mds->mds_max_mdsize, sizeof(*lmmj));
-
-        if (mds->mds_max_mdsize < max_easize || 
-            mds->mds_max_cookiesize < max_cookiesize) {
-                body->max_mdsize = mds->mds_max_mdsize > max_easize ?
-                                   mds->mds_max_mdsize : max_easize;
-                mds->mds_max_mdsize = body->max_mdsize;
-                body->max_cookiesize = mds->mds_max_cookiesize > max_cookiesize?
-                                   mds->mds_max_cookiesize : max_cookiesize;
-                mds->mds_max_cookiesize = body->max_cookiesize;
-                body->valid |= OBD_MD_FLMODEASIZE;
-        }
-
-        if (body->valid & OBD_MD_FLMODEASIZE)
-                CDEBUG(D_INODE, "updating max_mdsize/max_cookiesize: %d/%d\n",
-                       mds->mds_max_mdsize, mds->mds_max_cookiesize);
-
-        mds_pack_inode2fid(&body->fid1, inode);
-        mds_pack_inode2body(body, inode);
-}
-
-static int mds_join_unlink_tail_inode(struct mds_update_record *rec,
-                                      struct ptlrpc_request *req,
-                                      struct mds_rec_join *join_rec,
-                                      struct lov_mds_md *tail_lmm,
-                                      int lmm_size, struct dentry *dchild,
-                                      void **handle,struct lustre_handle *lockh)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct inode *tail_inode, *head_inode;
-        struct dentry *de_tailparent = NULL, *de_tail = NULL, *de_head = NULL;
-        struct lustre_handle dlm_handles[4] = {{0}, {0}, {0}, {0}};
-        struct ll_fid head_fid;
-        int rc;
-        ENTRY;
-
-        if (lockh)
-                ldlm_lock_decref(lockh, LCK_EX);
-
-        head_inode = dchild->d_inode;
-        mdc_pack_fid(&head_fid, head_inode->i_ino, head_inode->i_generation,
-                      head_inode->i_mode & S_IFMT);
-
-        rc = mds_get_parents_children_locked(obd, mds, &join_rec->jr_fid,
-                                             &de_tailparent, &head_fid,
-                                             &de_head, LCK_EX, rec->ur_name,
-                                             rec->ur_namelen, &de_tail,
-                                             NULL, 0, NULL, dlm_handles,
-                                             LCK_EX);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        *lockh = dlm_handles[1];
-        LASSERT(de_tailparent);
-        tail_inode = de_tail->d_inode;
-        if (tail_inode == NULL) {
-                CERROR("tail inode doesn't exist(dir %lu,name %s)!\n",
-                       de_tailparent? de_tailparent->d_inode->i_ino : 0,
-                       rec->ur_name);
-                GOTO(cleanup, rc = -ENOENT);
-        }
-
-        if (!S_ISREG(tail_inode->i_mode)) {
-                CERROR("tail file is not a regular file (dir %lu, name %s)!\n",
-                       de_tailparent? de_tailparent->d_inode->i_ino : 0,
-                       rec->ur_name);
-                GOTO(cleanup, rc = -EINVAL);
-        }
-
-        *handle = fsfilt_start(obd, head_inode, FSFILT_OP_JOIN, NULL);
-        if (IS_ERR(*handle)) {
-                rc = PTR_ERR(*handle);
-                GOTO(cleanup, rc);
-        }
-
-        rc = mds_get_md(obd, tail_inode, tail_lmm, &lmm_size, 1, 0);
-        if (rc < 0) /* get md fails */
-                GOTO(cleanup, rc);
-
-        LASSERT(le32_to_cpu(tail_lmm->lmm_magic) == LOV_MAGIC_JOIN ||
-                le32_to_cpu(tail_lmm->lmm_magic) == LOV_MAGIC);
-
-        LASSERT(de_tailparent);
-        rc = vfs_unlink(de_tailparent->d_inode, de_tail);
-
-        if (rc == 0) {
-                CDEBUG(D_INODE, "delete the tail inode %lu/%u \n",
-                       tail_inode->i_ino, tail_inode->i_generation);
-        }
-cleanup:
-        if (dlm_handles[2].cookie != 0)
-                ldlm_lock_decref(&dlm_handles[2], LCK_EX);
-
-        if (dlm_handles[0].cookie != 0) {
-                if (rc)
-                        ldlm_lock_decref(&dlm_handles[0], LCK_EX);
-                else
-                        ptlrpc_save_lock(req, &dlm_handles[0], LCK_EX);
-        }
-        if (de_tail)
-                l_dput(de_tail);
-
-        if (de_tailparent)
-                l_dput(de_tailparent);
-
-        if (de_head)
-                l_dput(de_head);
-
-        RETURN(rc);
-}
-
-int mds_join_file(struct mds_update_record *rec, struct ptlrpc_request *req,
-                  struct dentry *de_head, struct lustre_handle *lockh)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct inode *head_inode = NULL;
-        struct lvfs_run_ctxt saved;
-        void *handle = NULL;
-        struct lov_mds_md *head_lmm, *tail_lmm;
-        struct lov_mds_md_join *head_lmmj = NULL, *tail_lmmj = NULL;
-        int lmm_size, rc = 0, cleanup_phase = 0, size;
-        struct llog_handle *llh_head = NULL, *llh_tail = NULL;
-        struct llog_ctxt *ctxt = NULL;
-        struct mds_rec_join *join_rec;
-        ENTRY;
-
-        join_rec = lustre_swab_reqbuf(req, DLM_INTENT_REC_OFF + 3,
-                                      sizeof(*join_rec),
-                                      lustre_swab_mds_rec_join);
-        if (join_rec == NULL)
-                RETURN (-EFAULT);
-
-        DEBUG_REQ(D_INODE, req,"head "LPU64"/%u, ptail ino "LPU64"/%u, tail %s",
-                  rec->ur_fid1->id, rec->ur_fid1->generation,
-                  join_rec->jr_fid.id, join_rec->jr_fid.generation,
-                  rec->ur_name);
-
-        size = mds->mds_max_mdsize;
-        lmm_size = mds->mds_max_mdsize;
-        OBD_ALLOC(head_lmm, lmm_size);
-        OBD_ALLOC(tail_lmm, lmm_size);
-        if (!head_lmm || !tail_lmm)
-                GOTO(cleanup, rc = -ENOMEM);
-
-        /* acquire head's dentry */
-        LASSERT(de_head);
-        head_inode = de_head->d_inode;
-        if (head_inode == NULL) {
-                CERROR("head inode doesn't exist!\n");
-                GOTO(cleanup, rc = -ENOENT);
-        }
-
-        /*Unlink tail inode and get the lmm back*/
-        rc = mds_join_unlink_tail_inode(rec, req, join_rec, tail_lmm, lmm_size,
-                                        de_head, &handle, lockh);
-        if (rc) {
-                CERROR("unlink tail_inode error %d\n", rc);
-                GOTO(cleanup, rc);
-        }
-
-        LOCK_INODE_MUTEX(head_inode);
-        cleanup_phase = 1;
-        rc = mds_get_md(obd, head_inode, head_lmm, &size, 0, 0);
-        if (rc < 0)
-                GOTO(cleanup, rc);
-
-        LASSERT(le32_to_cpu(head_lmm->lmm_magic) == LOV_MAGIC_JOIN ||
-                le32_to_cpu(head_lmm->lmm_magic) == LOV_MAGIC);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        ctxt = llog_get_context(obd, LLOG_LOVEA_ORIG_CTXT);
-        LASSERT(ctxt != NULL);
-        cleanup_phase = 2;
-        if (le32_to_cpu(head_lmm->lmm_magic) == LOV_MAGIC) { /*simple file */
-                struct llog_logid *llog_array;
-
-                rc = llog_create(ctxt, &llh_head, NULL, NULL);
-                if (rc) {
-                        CERROR("cannot create new log, error = %d\n", rc);
-                        GOTO(cleanup, rc);
-                }
-                cleanup_phase = 3;
-                llog_array = &llh_head->lgh_id;
-                CDEBUG(D_INFO,"create arrary for %lu with id "LPU64":"LPU64"\n",
-                       head_inode->i_ino, llog_array->lgl_oid,
-                       llog_array->lgl_ogr);
-                rc = llog_init_handle(llh_head, LLOG_F_IS_PLAIN, NULL);
-                if (rc)
-                        GOTO(cleanup, rc);
-                OBD_ALLOC_PTR(head_lmmj);
-                if (head_lmmj == NULL)
-                        GOTO(cleanup, rc = -ENOMEM);
-                mds_init_stripe_join(head_lmmj, head_lmm, llog_array);
-                mds_insert_join_lmm(llh_head, head_lmm, 0,join_rec->jr_headsize,
-                                    head_lmmj);
-        } else { /*head lmm is join file */
-                head_lmmj = (struct lov_mds_md_join *)head_lmm;
-                /* construct and fill extent llog object */
-                rc = llog_create(ctxt, &llh_head,
-                                 &head_lmmj->lmmj_array_id, NULL);
-                if (rc) {
-                        CERROR("cannot open existing log, error = %d\n", rc);
-                        GOTO(cleanup, rc);
-                }
-                cleanup_phase = 3;
-                rc = llog_init_handle(llh_head, LLOG_F_IS_PLAIN, NULL);
-                if (rc)
-                        GOTO(cleanup, rc);
-                rc = mds_adjust_last_extent(llh_head, join_rec->jr_headsize);
-                if (rc) {
-                        CERROR("can't adjust last extent of obj rc=%d\n", rc);
-                        GOTO(cleanup, rc);
-                }
-        }
-
-        if (le32_to_cpu(tail_lmm->lmm_magic) != LOV_MAGIC_JOIN) {
-                mds_insert_join_lmm(llh_head, tail_lmm, join_rec->jr_headsize,
-                                    -1, head_lmmj);
-        } else {
-                struct mdsea_cb_data cbdata;
-                tail_lmmj = (struct lov_mds_md_join *)tail_lmm;
-
-                rc = llog_create(ctxt,&llh_tail,&tail_lmmj->lmmj_array_id,NULL);
-                if (rc) {
-                        CERROR("cannot open existing log, error = %d\n", rc);
-                        GOTO(cleanup, rc);
-                }
-                rc = llog_init_handle(llh_tail, LLOG_F_IS_PLAIN, NULL);
-                if (rc) {
-                        llog_close(llh_tail);
-                        GOTO(cleanup, rc);
-                }
-                cbdata.mc_llh = llh_head;
-                cbdata.mc_headfile_sz = join_rec->jr_headsize;
-                cbdata.mc_lmm_join = head_lmmj;
-                rc = mdsea_iterate(llh_tail, (llog_cb_t)mdsea_append_extent,
-                                   &cbdata);
-                if (rc) {
-                        llog_close(llh_tail);
-                        CERROR("can not append extent log error %d \n", rc);
-                        GOTO(cleanup, rc);
-                }
-                rc = llog_destroy(llh_tail);
-                if (rc) {
-                        llog_close(llh_tail);
-                        CERROR("can not destroy log error %d \n", rc);
-                        GOTO(cleanup, rc);
-                }
-                llog_free_handle(llh_tail);
-        }
-        LASSERT(head_inode);
-        CDEBUG(D_INODE, "join finish, set lmm V2 to inode %lu \n",
-               head_inode->i_ino);
-        fsfilt_set_md(obd, head_inode, handle, head_lmmj,
-                      sizeof(struct lov_mds_md_join), "lov");
-        mds_finish_join(mds, req, head_inode, head_lmmj);
-cleanup:
-        rc = mds_finish_transno(mds, head_inode, handle, req, rc, 0, 0);
-        switch(cleanup_phase){
-        case 3:
-                llog_close(llh_head);
-        case 2:
-                llog_ctxt_put(ctxt);
-                if (head_lmmj && ((void*)head_lmmj != (void*)head_lmm))
-                        OBD_FREE_PTR(head_lmmj);
-
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        case 1:
-                UNLOCK_INODE_MUTEX(head_inode);
-        case 0:
-                if (tail_lmm != NULL)
-                        OBD_FREE(tail_lmm, lmm_size);
-                if (head_lmm != NULL)
-                        OBD_FREE(head_lmm, lmm_size);
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        req->rq_status = rc;
-        RETURN(rc);
-}
-
diff --git a/lustre/mds/mds_lib.c b/lustre/mds/mds_lib.c
deleted file mode 100644
index 9a144a6a75d8fe0b51e44ff8ce3ed41a86f6f2b3..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_lib.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/mm.h>
-#include <linux/string.h>
-#include <linux/stat.h>
-#include <linux/errno.h>
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-# include <linux/locks.h>   // for wait_on_buffer
-#else
-# include <linux/buffer_head.h>   // for wait_on_buffer
-#endif
-#include <linux/unistd.h>
-
-#include <asm/system.h>
-#include <asm/uaccess.h>
-
-#include <linux/fs.h>
-#include <linux/stat.h>
-#include <asm/uaccess.h>
-#include <linux/slab.h>
-
-#include <obd_support.h>
-#include <lustre_lib.h>
-#include "mds_internal.h"
-
-void mds_pack_inode2fid(struct ll_fid *fid, struct inode *inode)
-{
-        fid->id = inode->i_ino;
-        fid->generation = inode->i_generation;
-        fid->f_type = (S_IFMT & inode->i_mode);
-}
-
-/* Note that we can copy all of the fields, just some will not be "valid" */
-void mds_pack_inode2body(struct mds_body *b, struct inode *inode)
-{
-        b->valid |= OBD_MD_FLID | OBD_MD_FLCTIME | OBD_MD_FLUID |
-                    OBD_MD_FLGID | OBD_MD_FLFLAGS | OBD_MD_FLTYPE |
-                    OBD_MD_FLMODE | OBD_MD_FLNLINK | OBD_MD_FLGENER |
-                    OBD_MD_FLATIME | OBD_MD_FLMTIME; /* bug 2020 */
-
-        if (!S_ISREG(inode->i_mode))
-                b->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLATIME |
-                            OBD_MD_FLMTIME | OBD_MD_FLRDEV;
-
-        b->ino = inode->i_ino;
-        b->atime = LTIME_S(inode->i_atime);
-        b->mtime = LTIME_S(inode->i_mtime);
-        b->ctime = LTIME_S(inode->i_ctime);
-        b->mode = inode->i_mode;
-        b->size = i_size_read(inode);
-        b->blocks = inode->i_blocks;
-        b->uid = inode->i_uid;
-        b->gid = inode->i_gid;
-        b->flags = (b->flags & MDS_BFLAG_EXT_FLAGS) |
-                   ll_inode_to_ext_flags(inode->i_flags,
-                                         !(b->flags & MDS_BFLAG_EXT_FLAGS));
-        b->rdev = inode->i_rdev;
-        /* Return the correct link count for orphan inodes */
-        b->nlink = mds_inode_is_orphan(inode) ? 0 : inode->i_nlink;
-        b->generation = inode->i_generation;
-        b->suppgid = -1;
-}
-
-static inline unsigned int attr_unpack(__u64 sa_valid) {
-        unsigned int ia_valid = 0;
-
-        if (sa_valid & MDS_ATTR_MODE)
-                ia_valid |= ATTR_MODE;
-        if (sa_valid & MDS_ATTR_UID)
-                ia_valid |= ATTR_UID;
-        if (sa_valid & MDS_ATTR_GID)
-                ia_valid |= ATTR_GID;
-        if (sa_valid & MDS_ATTR_SIZE)
-                ia_valid |= ATTR_SIZE;
-        if (sa_valid & MDS_ATTR_ATIME)
-                ia_valid |= ATTR_ATIME;
-        if (sa_valid & MDS_ATTR_MTIME)
-                ia_valid |= ATTR_MTIME;
-        if (sa_valid & MDS_ATTR_CTIME)
-                ia_valid |= ATTR_CTIME;
-        if (sa_valid & MDS_ATTR_ATIME_SET)
-                ia_valid |= ATTR_ATIME_SET;
-        if (sa_valid & MDS_ATTR_MTIME_SET)
-                ia_valid |= ATTR_MTIME_SET;
-        if (sa_valid & MDS_ATTR_FORCE)
-                ia_valid |= ATTR_FORCE;
-        if (sa_valid & MDS_ATTR_ATTR_FLAG)
-                ia_valid |= ATTR_ATTR_FLAG;
-        if (sa_valid & MDS_ATTR_KILL_SUID)
-                ia_valid |=  ATTR_KILL_SUID;
-        if (sa_valid & MDS_ATTR_KILL_SGID)
-                ia_valid |= ATTR_KILL_SGID;
-        if (sa_valid & MDS_ATTR_CTIME_SET)
-                ia_valid |= ATTR_CTIME_SET;
-        if (sa_valid & MDS_ATTR_FROM_OPEN)
-                ia_valid |= ATTR_FROM_OPEN;
-        if (sa_valid & MDS_OPEN_OWNEROVERRIDE)
-                ia_valid |= MDS_OPEN_OWNEROVERRIDE;
-        return ia_valid;
-}
-
-/* unpacking */
-static int mds_setattr_unpack(struct ptlrpc_request *req, int offset,
-                              struct mds_update_record *r)
-{
-        struct iattr *attr = &r->ur_iattr;
-        struct mds_rec_setattr *rec;
-        ENTRY;
-
-        rec = lustre_swab_reqbuf(req, offset, sizeof(*rec),
-                                 lustre_swab_mds_rec_setattr);
-        if (rec == NULL)
-                RETURN (-EFAULT);
-
-        r->ur_uc.luc_fsuid = rec->sa_fsuid;
-        r->ur_uc.luc_fsgid = rec->sa_fsgid;
-        r->ur_uc.luc_cap = rec->sa_cap;
-        r->ur_uc.luc_suppgid1 = rec->sa_suppgid;
-        r->ur_uc.luc_suppgid2 = -1;
-        r->ur_fid1 = &rec->sa_fid;
-        attr->ia_valid = attr_unpack(rec->sa_valid);
-        attr->ia_mode = rec->sa_mode;
-        attr->ia_uid = rec->sa_uid;
-        attr->ia_gid = rec->sa_gid;
-        attr->ia_size = rec->sa_size;
-        LTIME_S(attr->ia_atime) = rec->sa_atime;
-        LTIME_S(attr->ia_mtime) = rec->sa_mtime;
-        LTIME_S(attr->ia_ctime) = rec->sa_ctime;
-        r->ur_flags = rec->sa_attr_flags;
-
-        lustre_set_req_swabbed(req, offset + 1);
-        r->ur_eadatalen = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-        if (r->ur_eadatalen) {
-                r->ur_eadata = lustre_msg_buf(req->rq_reqmsg, offset + 1, 0);
-                if (r->ur_eadata == NULL)
-                        RETURN(-EFAULT);
-        }
-        r->ur_cookielen = lustre_msg_buflen(req->rq_reqmsg, offset + 2);
-        if (r->ur_cookielen) {
-                r->ur_logcookies = lustre_msg_buf(req->rq_reqmsg, offset + 2,0);
-                if (r->ur_eadata == NULL)
-                        RETURN (-EFAULT);
-        }
-        if (lustre_msg_buflen(req->rq_reqmsg, offset + 3)) {
-                r->ur_dlm = lustre_swab_reqbuf(req, offset + 3,
-                                               sizeof(*r->ur_dlm),
-                                               lustre_swab_ldlm_request); 
-                if (r->ur_dlm == NULL)
-                        RETURN (-EFAULT);
-        }
-        RETURN(0);
-}
-
-static int mds_create_unpack(struct ptlrpc_request *req, int offset,
-                             struct mds_update_record *r)
-{
-        struct mds_rec_create *rec;
-        ENTRY;
-
-        rec = lustre_swab_reqbuf(req, offset, sizeof (*rec),
-                                 lustre_swab_mds_rec_create);
-        if (rec == NULL)
-                RETURN (-EFAULT);
-
-        r->ur_uc.luc_fsuid = rec->cr_fsuid;
-        r->ur_uc.luc_fsgid = rec->cr_fsgid;
-        r->ur_uc.luc_cap = rec->cr_cap;
-        r->ur_uc.luc_suppgid1 = rec->cr_suppgid;
-        r->ur_uc.luc_suppgid2 = -1;
-        r->ur_fid1 = &rec->cr_fid;
-        r->ur_fid2 = &rec->cr_replayfid;
-        r->ur_mode = rec->cr_mode;
-        r->ur_rdev = rec->cr_rdev;
-        r->ur_time = rec->cr_time;
-        r->ur_flags = rec->cr_flags;
-
-        lustre_set_req_swabbed(req, offset + 1);
-        r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0);
-        if (r->ur_name == NULL)
-                RETURN (-EFAULT);
-        r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-
-        lustre_set_req_swabbed(req, offset + 2);
-        r->ur_tgtlen = lustre_msg_buflen(req->rq_reqmsg, offset + 2);
-        if (r->ur_tgtlen) {
-                /* NB for now, we only seem to pass NULL terminated symlink
-                 * target strings here.  If this ever changes, we'll have
-                 * to stop checking for a buffer filled completely with a
-                 * NULL terminated string here, and make the callers check
-                 * depending on what they expect.  We should probably stash
-                 * it in r->ur_eadata in that case, so it's obvious... -eeb
-                 */
-                r->ur_tgt = lustre_msg_string(req->rq_reqmsg, offset + 2, 0);
-                if (r->ur_tgt == NULL)
-                        RETURN (-EFAULT);
-        }
-        if (lustre_msg_buflen(req->rq_reqmsg, offset + 3)) {
-                r->ur_dlm = lustre_swab_reqbuf(req, offset + 3,
-                                               sizeof(*r->ur_dlm),
-                                               lustre_swab_ldlm_request); 
-                if (r->ur_dlm == NULL)
-                        RETURN (-EFAULT);
-        }
-        RETURN(0);
-}
-
-static int mds_link_unpack(struct ptlrpc_request *req, int offset,
-                           struct mds_update_record *r)
-{
-        struct mds_rec_link *rec;
-        ENTRY;
-
-        rec = lustre_swab_reqbuf(req, offset, sizeof (*rec),
-                                 lustre_swab_mds_rec_link);
-        if (rec == NULL)
-                RETURN (-EFAULT);
-
-        r->ur_uc.luc_fsuid = rec->lk_fsuid;
-        r->ur_uc.luc_fsgid = rec->lk_fsgid;
-        r->ur_uc.luc_cap = rec->lk_cap;
-        r->ur_uc.luc_suppgid1 = rec->lk_suppgid1;
-        r->ur_uc.luc_suppgid2 = rec->lk_suppgid2;
-        r->ur_fid1 = &rec->lk_fid1;
-        r->ur_fid2 = &rec->lk_fid2;
-        r->ur_time = rec->lk_time;
-
-        lustre_set_req_swabbed(req, offset + 1);
-        r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0);
-        if (r->ur_name == NULL)
-                RETURN (-EFAULT);
-        r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-        if (lustre_msg_buflen(req->rq_reqmsg, offset + 2)) {
-                r->ur_dlm = lustre_swab_reqbuf(req, offset + 2,
-                                               sizeof(*r->ur_dlm),
-                                               lustre_swab_ldlm_request); 
-                if (r->ur_dlm == NULL)
-                        RETURN (-EFAULT);
-        }
-        RETURN(0);
-}
-
-static int mds_unlink_unpack(struct ptlrpc_request *req, int offset,
-                             struct mds_update_record *r)
-{
-        struct mds_rec_unlink *rec;
-        ENTRY;
-
-        rec = lustre_swab_reqbuf(req, offset, sizeof (*rec),
-                                 lustre_swab_mds_rec_unlink);
-        if (rec == NULL)
-                RETURN(-EFAULT);
-
-        r->ur_uc.luc_fsuid = rec->ul_fsuid;
-        r->ur_uc.luc_fsgid = rec->ul_fsgid;
-        r->ur_uc.luc_cap = rec->ul_cap;
-        r->ur_uc.luc_suppgid1 = rec->ul_suppgid;
-        r->ur_uc.luc_suppgid2 = -1;
-        r->ur_mode = rec->ul_mode;
-        r->ur_fid1 = &rec->ul_fid1;
-        r->ur_fid2 = &rec->ul_fid2;
-        r->ur_time = rec->ul_time;
-
-        lustre_set_req_swabbed(req, offset + 1);
-        r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0);
-        if (r->ur_name == NULL)
-                RETURN(-EFAULT);
-        r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-        
-        if (lustre_msg_buflen(req->rq_reqmsg, offset + 2)) {
-                r->ur_dlm = lustre_swab_reqbuf(req, offset + 2,
-                                               sizeof(*r->ur_dlm),
-                                               lustre_swab_ldlm_request); 
-                if (r->ur_dlm == NULL)
-                        RETURN (-EFAULT);
-        }
-        RETURN(0);
-}
-
-static int mds_rename_unpack(struct ptlrpc_request *req, int offset,
-                             struct mds_update_record *r)
-{
-        struct mds_rec_rename *rec;
-        ENTRY;
-
-        rec = lustre_swab_reqbuf(req, offset, sizeof (*rec),
-                                 lustre_swab_mds_rec_rename);
-        if (rec == NULL)
-                RETURN(-EFAULT);
-
-        r->ur_uc.luc_fsuid = rec->rn_fsuid;
-        r->ur_uc.luc_fsgid = rec->rn_fsgid;
-        r->ur_uc.luc_cap = rec->rn_cap;
-        r->ur_uc.luc_suppgid1 = rec->rn_suppgid1;
-        r->ur_uc.luc_suppgid2 = rec->rn_suppgid2;
-        r->ur_fid1 = &rec->rn_fid1;
-        r->ur_fid2 = &rec->rn_fid2;
-        r->ur_time = rec->rn_time;
-
-        lustre_set_req_swabbed(req, offset + 1);
-        r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0);
-        if (r->ur_name == NULL)
-                RETURN(-EFAULT);
-        r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-
-        lustre_set_req_swabbed(req, offset + 2);
-        r->ur_tgt = lustre_msg_string(req->rq_reqmsg, offset + 2, 0);
-        if (r->ur_tgt == NULL)
-                RETURN(-EFAULT);
-        r->ur_tgtlen = lustre_msg_buflen(req->rq_reqmsg, offset + 2);
-        if (lustre_msg_buflen(req->rq_reqmsg, offset + 3)) {
-                r->ur_dlm = lustre_swab_reqbuf(req, offset + 3,
-                                               sizeof(*r->ur_dlm),
-                                               lustre_swab_ldlm_request); 
-                if (r->ur_dlm == NULL)
-                        RETURN (-EFAULT);
-        }
-        RETURN(0);
-}
-
-static int mds_open_unpack(struct ptlrpc_request *req, int offset,
-                           struct mds_update_record *r)
-{
-        struct mds_rec_create *rec;
-        ENTRY;
-
-        rec = lustre_swab_reqbuf(req, offset, sizeof(*rec),
-                                 lustre_swab_mds_rec_create);
-        if (rec == NULL)
-                RETURN(-EFAULT);
-
-        r->ur_uc.luc_fsuid = rec->cr_fsuid;
-        r->ur_uc.luc_fsgid = rec->cr_fsgid;
-        r->ur_uc.luc_cap = rec->cr_cap;
-        r->ur_uc.luc_suppgid1 = rec->cr_suppgid;
-        r->ur_uc.luc_suppgid2 = -1;
-        r->ur_fid1 = &rec->cr_fid;
-        r->ur_fid2 = &rec->cr_replayfid;
-        r->ur_mode = rec->cr_mode;
-        r->ur_rdev = rec->cr_rdev;
-        r->ur_time = rec->cr_time;
-        r->ur_flags = rec->cr_flags;
-
-        lustre_set_req_swabbed(req, offset + 1);
-        r->ur_name = lustre_msg_string(req->rq_reqmsg, offset + 1, 0);
-        if (r->ur_name == NULL)
-                RETURN(-EFAULT);
-        r->ur_namelen = lustre_msg_buflen(req->rq_reqmsg, offset + 1);
-
-        lustre_set_req_swabbed(req, offset + 2);
-        r->ur_eadatalen = lustre_msg_buflen(req->rq_reqmsg, offset + 2);
-        if (r->ur_eadatalen) {
-                r->ur_eadata = lustre_msg_buf(req->rq_reqmsg, offset + 2, 0);
-                if (r->ur_eadata == NULL)
-                        RETURN (-EFAULT);
-        }
-        RETURN(0);
-}
-
-typedef int (*update_unpacker)(struct ptlrpc_request *req, int offset,
-                               struct mds_update_record *r);
-
-static update_unpacker mds_unpackers[REINT_MAX] = {
-        [REINT_SETATTR] mds_setattr_unpack,
-        [REINT_CREATE] mds_create_unpack,
-        [REINT_LINK] mds_link_unpack,
-        [REINT_UNLINK] mds_unlink_unpack,
-        [REINT_RENAME] mds_rename_unpack,
-        [REINT_OPEN] mds_open_unpack,
-};
-
-int mds_update_unpack(struct ptlrpc_request *req, int offset,
-                      struct mds_update_record *rec)
-{
-        mds_reint_t opcode, *opcodep;
-        int rc;
-        ENTRY;
-
-        /* NB don't lustre_swab_reqbuf() here.  We're just taking a peek
-         * and we want to leave it to the specific unpacker once we've
-         * identified the message type */
-        opcodep = lustre_msg_buf(req->rq_reqmsg, offset, sizeof (*opcodep));
-        if (opcodep == NULL)
-                RETURN(-EFAULT);
-
-        opcode = *opcodep;
-        if (lustre_msg_swabbed(req->rq_reqmsg))
-                __swab32s(&opcode);
-
-        if (opcode >= REINT_MAX || mds_unpackers[opcode] == NULL) {
-                CERROR("Unexpected opcode %d\n", opcode);
-                RETURN(-EFAULT);
-        }
-
-        rec->ur_opcode = opcode;
-        rc = mds_unpackers[opcode](req, offset, rec);
-
-        RETURN(rc);
-}
-
-void mds_root_squash(struct mds_obd *mds, lnet_nid_t *peernid,
-                     __u32 *fsuid, __u32 *fsgid, __u32 *cap,
-                     __u32 *suppgid, __u32 *suppgid2)
-{
-        if (!mds->mds_squash_uid || *fsuid)
-               return;
-
-        if (*peernid == mds->mds_nosquash_nid)
-                return;
-
-        CDEBUG(D_OTHER, "squash req from %s, (%d:%d/%x)=>(%d:%d/%x)\n",
-               libcfs_nid2str(*peernid), *fsuid, *fsgid, *cap,
-               mds->mds_squash_uid, mds->mds_squash_gid, 0);
-
-        *fsuid = mds->mds_squash_uid;
-        *fsgid = mds->mds_squash_gid;
-        *cap = 0;
-        *suppgid = -1;
-        if (suppgid2)
-                *suppgid2 = -1;
-}
-
-int mds_init_ucred(struct lvfs_ucred *ucred, struct ptlrpc_request *req,
-                   int offset)
-{
-        struct mds_body *body = lustre_msg_buf(req->rq_reqmsg, offset,
-                                               sizeof(*body));
-        struct mds_obd *mds = mds_req2mds(req);
-        int rc;
-
-        LASSERT(body != NULL); /* previously verified & swabbed by caller */
-
-#ifdef CRAY_XT3
-        if (req->rq_uid != LNET_UID_ANY) {
-                /* Non-root local cluster client */
-                LASSERT (req->rq_uid != 0);
-                ucred->luc_fsuid = req->rq_uid;
-        } else
-#endif
-        {
-                mds_root_squash(mds, &req->rq_peer.nid, &body->fsuid,
-                                &body->fsgid, &body->capability,
-                                &body->suppgid, NULL);
-
-                ucred->luc_fsuid = body->fsuid;
-                ucred->luc_fsgid = body->fsgid;
-                ucred->luc_cap = body->capability;
-        }
-
-        ucred->luc_uce = upcall_cache_get_entry(mds->mds_group_hash,
-                                                ucred->luc_fsuid,
-                                                ucred->luc_fsgid, 1,
-                                                &body->suppgid);
-        if (IS_ERR(ucred->luc_uce)) {
-                rc = PTR_ERR(ucred->luc_uce);
-                ucred->luc_uce = NULL;
-                return rc;
-        }
-
-#ifdef CRAY_XT3
-        if (ucred->luc_uce)
-                ucred->luc_fsgid = ucred->luc_uce->ue_primary;
-#endif
-
-        return 0;
-}
-
-void mds_exit_ucred(struct lvfs_ucred *ucred, struct mds_obd *mds)
-{
-        upcall_cache_put_entry(mds->mds_group_hash, ucred->luc_uce);
-}
diff --git a/lustre/mds/mds_log.c b/lustre/mds/mds_log.c
deleted file mode 100644
index 189707f3c0023cf12e1366aedcc823458e575432..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_log.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mds/mds_log.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/version.h>
-
-#include <libcfs/list.h>
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include <lustre_mds.h>
-#include <lustre_commit_confd.h>
-#include <lustre_log.h>
-
-#include "mds_internal.h"
-
-static int mds_llog_origin_add(struct llog_ctxt *ctxt,
-                        struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                        struct llog_cookie *logcookies, int numcookies)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct obd_device *lov_obd = obd->u.mds.mds_osc_obd;
-        struct llog_ctxt *lctxt;
-        int rc;
-        ENTRY;
-
-        lctxt = llog_get_context(lov_obd, ctxt->loc_idx);
-        rc = llog_add(lctxt, rec, lsm, logcookies, numcookies);
-        llog_ctxt_put(lctxt);
-
-        RETURN(rc);
-}
-
-static int mds_llog_origin_connect(struct llog_ctxt *ctxt, int count,
-                                   struct llog_logid *logid,
-                                   struct llog_gen *gen,
-                                   struct obd_uuid *uuid)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct obd_device *lov_obd = obd->u.mds.mds_osc_obd;
-        struct llog_ctxt *lctxt;
-        int rc;
-        ENTRY;
-
-        lctxt = llog_get_context(lov_obd, ctxt->loc_idx);
-        rc = llog_connect(lctxt, count, logid, gen, uuid);
-        llog_ctxt_put(lctxt);
-        RETURN(rc);
-}
-
-static int mds_llog_repl_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm,
-                          int count, struct llog_cookie *cookies, int flags)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct obd_device *lov_obd = obd->u.mds.mds_osc_obd;
-        struct llog_ctxt *lctxt;
-        int rc;
-        ENTRY;
-
-        lctxt = llog_get_context(lov_obd, ctxt->loc_idx);
-        rc = llog_cancel(lctxt, lsm, count, cookies, flags);
-        llog_ctxt_put(lctxt);
-        RETURN(rc);
-}
-
-int mds_log_op_unlink(struct obd_device *obd, 
-                      struct lov_mds_md *lmm, int lmm_size,
-                      struct llog_cookie *logcookies, int cookies_size)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lov_stripe_md *lsm = NULL;
-        struct llog_unlink_rec *lur;
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        if (IS_ERR(mds->mds_osc_obd))
-                RETURN(PTR_ERR(mds->mds_osc_obd));
-
-        rc = obd_unpackmd(mds->mds_osc_exp, &lsm, lmm, lmm_size);
-        if (rc < 0)
-                RETURN(rc);
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                GOTO(out, rc);
-        /* first prepare unlink log record */
-        OBD_ALLOC(lur, sizeof(*lur));
-        if (!lur)
-                GOTO(out, rc = -ENOMEM);
-        lur->lur_hdr.lrh_len = lur->lur_tail.lrt_len = sizeof(*lur);
-        lur->lur_hdr.lrh_type = MDS_UNLINK_REC;
-
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
-        rc = llog_add(ctxt, &lur->lur_hdr, lsm, logcookies,
-                      cookies_size / sizeof(struct llog_cookie));
-        llog_ctxt_put(ctxt);
-
-        OBD_FREE(lur, sizeof(*lur));
-out:
-        obd_free_memmd(mds->mds_osc_exp, &lsm);
-        RETURN(rc);
-}
-
-int mds_log_op_setattr(struct obd_device *obd, struct inode *inode,
-                      struct lov_mds_md *lmm, int lmm_size,
-                      struct llog_cookie *logcookies, int cookies_size)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lov_stripe_md *lsm = NULL;
-        struct llog_setattr_rec *lsr;
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        if (IS_ERR(mds->mds_osc_obd))
-                RETURN(PTR_ERR(mds->mds_osc_obd));
-
-        rc = obd_unpackmd(mds->mds_osc_exp, &lsm, lmm, lmm_size);
-        if (rc < 0)
-                RETURN(rc);
-
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                GOTO(out, rc);
-
-        OBD_ALLOC(lsr, sizeof(*lsr));
-        if (!lsr)
-                GOTO(out, rc = -ENOMEM);
-
-        /* prepare setattr log record */
-        lsr->lsr_hdr.lrh_len = lsr->lsr_tail.lrt_len = sizeof(*lsr);
-        lsr->lsr_hdr.lrh_type = MDS_SETATTR_REC;
-        lsr->lsr_uid = inode->i_uid;
-        lsr->lsr_gid = inode->i_gid;
-
-        /* write setattr log */
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
-        rc = llog_add(ctxt, &lsr->lsr_hdr, lsm, logcookies,
-                      cookies_size / sizeof(struct llog_cookie));
-
-        llog_ctxt_put(ctxt);
-
-        OBD_FREE(lsr, sizeof(*lsr));
- out:
-        obd_free_memmd(mds->mds_osc_exp, &lsm);
-        RETURN(rc);
-}
-
-static struct llog_operations mds_ost_orig_logops = {
-        lop_add:        mds_llog_origin_add,
-        lop_connect:    mds_llog_origin_connect,
-};
-
-static struct llog_operations mds_size_repl_logops = {
-        lop_cancel:     mds_llog_repl_cancel,
-};
-
-int mds_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                  int count, struct llog_catid *logid, struct obd_uuid *uuid)
-{
-        struct obd_device *lov_obd = obd->u.mds.mds_osc_obd;
-        int rc;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_MDS_OST_ORIG_CTXT, tgt, 0, NULL,
-                        &mds_ost_orig_logops);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, 0, NULL,
-                        &mds_size_repl_logops);
-        if (rc)
-                RETURN(rc);
-
-        rc = obd_llog_init(lov_obd, tgt, count, logid, uuid);
-        if (rc)
-                CERROR("lov_llog_init err %d\n", rc);
-
-        RETURN(rc);
-}
-
-int mds_llog_finish(struct obd_device *obd, int count)
-{
-        struct llog_ctxt *ctxt;
-        int rc = 0, rc2 = 0;
-        ENTRY;
-
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
-        if (ctxt)
-                rc = llog_cleanup(ctxt);
-
-        ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT);
-        if (ctxt)
-                rc2 = llog_cleanup(ctxt);
-        if (!rc)
-                rc = rc2;
-
-        RETURN(rc);
-}
diff --git a/lustre/mds/mds_lov.c b/lustre/mds/mds_lov.c
deleted file mode 100644
index d6bbdcb1f8fb21a4617874cd847ff83c324054ff..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_lov.c
+++ /dev/null
@@ -1,1104 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/mds/mds_lov.c
- *  Lustre Metadata Server (mds) handling of striped file data
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/module.h>
-#include <lustre_mds.h>
-#include <lustre/lustre_idl.h>
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <lustre_lib.h>
-#include <lustre_fsfilt.h>
-
-#include "mds_internal.h"
-
-static void mds_lov_dump_objids(const char *label, struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        unsigned int i=0, j;
-
-        CDEBUG(D_INFO, "dump from %s\n", label);
-        if (mds->mds_lov_page_dirty == NULL) {
-                CERROR("NULL bitmap!\n");
-                GOTO(skip_bitmap, i);
-        }
-
-        for(i=0; i < ((mds->mds_lov_page_dirty->size/BITS_PER_LONG)+1) ;i++)
-                CDEBUG(D_INFO, "%u - %lx\n", i, mds->mds_lov_page_dirty->data[i]);
-skip_bitmap:
-        if (mds->mds_lov_page_array == NULL) {
-                CERROR("not init page array!\n");
-                GOTO(skip_array, i);
-
-        }
-        for(i=0; i < MDS_LOV_OBJID_PAGES_COUNT ;i++) {
-                obd_id *data = mds->mds_lov_page_array[i];
-
-                if (data == NULL)
-                        continue;
-
-                for(j=0; j < OBJID_PER_PAGE(); j++) {
-                        if (data[j] == 0)
-                                continue;
-                        CDEBUG(D_INFO,"objid page %u idx %u - "LPU64" \n",
-                               i,j,data[j]);
-                }
-        }
-skip_array:
-        EXIT;
-}
-
-int mds_lov_init_objids(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int size = MDS_LOV_OBJID_PAGES_COUNT*sizeof(void *);
-        struct file *file;
-        int rc;
-        ENTRY;
-
-        CLASSERT(((MDS_LOV_ALLOC_SIZE % sizeof(obd_id)) == 0));
-
-        mds->mds_lov_page_dirty = ALLOCATE_BITMAP(MDS_LOV_OBJID_PAGES_COUNT);
-        if (mds->mds_lov_page_dirty == NULL)
-                RETURN(-ENOMEM);
-
-
-        OBD_ALLOC(mds->mds_lov_page_array, size);
-        if (mds->mds_lov_page_array == NULL)
-                GOTO(err_free_bitmap, rc = -ENOMEM);
-
-        /* open and test the lov objd file */
-        file = filp_open(LOV_OBJID, O_RDWR | O_CREAT, 0644);
-        if (IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("cannot open/create %s file: rc = %d\n", LOV_OBJID, rc);
-                GOTO(err_free, rc = PTR_ERR(file));
-        }
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", LOV_OBJID,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(err_open, rc = -ENOENT);
-        }
-        mds->mds_lov_objid_filp = file;
-
-        RETURN (0);
-err_open:
-        if (filp_close((struct file *)file, 0))
-                CERROR("can't close %s after error\n", LOV_OBJID);
-err_free:
-        OBD_FREE(mds->mds_lov_page_array, size);
-err_free_bitmap:
-        FREE_BITMAP(mds->mds_lov_page_dirty);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(mds_lov_init_objids);
-
-void mds_lov_destroy_objids(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int i, rc;
-        ENTRY;
-
-        if (mds->mds_lov_page_array != NULL) {
-                for(i=0;i<MDS_LOV_OBJID_PAGES_COUNT;i++) {
-                        obd_id *data = mds->mds_lov_page_array[i];
-                        if (data != NULL)
-                                OBD_FREE(data, MDS_LOV_ALLOC_SIZE);
-                }
-                OBD_FREE(mds->mds_lov_page_array,
-                         MDS_LOV_OBJID_PAGES_COUNT*sizeof(void *));
-        }
-
-        if (mds->mds_lov_objid_filp) {
-                rc = filp_close((struct file *)mds->mds_lov_objid_filp, 0);
-                mds->mds_lov_objid_filp = NULL;
-                if (rc)
-                        CERROR("%s file won't close, rc=%d\n", LOV_OBJID, rc);
-        }
-
-        FREE_BITMAP(mds->mds_lov_page_dirty);
-        EXIT;
-}
-EXPORT_SYMBOL(mds_lov_destroy_objids);
-
-void mds_lov_update_objids(struct obd_device *obd, struct lov_mds_md *lmm)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int j;
-        ENTRY;
-
-        /* if we create file without objects - lmm is NULL */
-        if (lmm == NULL)
-                return;
-
-        for (j = 0; j < le32_to_cpu(lmm->lmm_stripe_count); j++) {
-                int i = le32_to_cpu(lmm->lmm_objects[j].l_ost_idx);
-                obd_id id = le64_to_cpu(lmm->lmm_objects[j].l_object_id);
-                int page = i / OBJID_PER_PAGE();
-                int idx = i % OBJID_PER_PAGE();
-                obd_id *data = mds->mds_lov_page_array[page];
-
-                CDEBUG(D_INODE,"update last object for ost %d"
-                       " - new "LPU64" old "LPU64"\n", i, id, data[idx]);
-                if (id > data[idx]) {
-                        data[idx] = id;
-                        cfs_bitmap_set(mds->mds_lov_page_dirty, page);
-                }
-        }
-        EXIT;
-}
-EXPORT_SYMBOL(mds_lov_update_objids);
-
-static int mds_lov_read_objids(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        loff_t off = 0;
-        int i, rc = 0, count = 0, page = 0;
-        size_t size;
-        ENTRY;
-
-        /* Read everything in the file, even if our current lov desc
-           has fewer targets. Old targets not in the lov descriptor
-           during mds setup may still have valid objids. */
-        size = i_size_read(mds->mds_lov_objid_filp->f_dentry->d_inode);
-        if (size == 0)
-                RETURN(0);
-
-        page = (size/(OBJID_PER_PAGE()*sizeof(obd_id)))+1;
-        CDEBUG(D_INFO, "file size %d pages %d\n", size, page);
-        for(i=0; i < page; i++) {
-                obd_id *data =  mds->mds_lov_page_array[i];
-                loff_t off_old = off;
-
-                LASSERT(data == NULL);
-                OBD_ALLOC(data, MDS_LOV_ALLOC_SIZE);
-                if (data == NULL)
-                        GOTO(out, rc = -ENOMEM);
-
-                mds->mds_lov_page_array[i] = data;
-
-                rc = fsfilt_read_record(obd, mds->mds_lov_objid_filp, data,
-                                        OBJID_PER_PAGE()*sizeof(obd_id), &off);
-                if (rc < 0) {
-                        CERROR("Error reading objids %d\n", rc);
-                        GOTO(out, rc);
-                }
-                if (off == off_old)
-                        break; /* eof */
-
-                count += (off-off_old)/sizeof(obd_id);
-        }
-        mds->mds_lov_objid_count = count;
-        if (count) {
-                count --;
-                mds->mds_lov_objid_lastpage = count / OBJID_PER_PAGE();
-                mds->mds_lov_objid_lastidx = count % OBJID_PER_PAGE();
-        }
-        CDEBUG(D_INFO, "Read %u - %u %u objid\n", count,
-               mds->mds_lov_objid_lastpage, mds->mds_lov_objid_lastidx);
-out:
-        mds_lov_dump_objids("read",obd);
-
-        RETURN(rc);
-}
-
-int mds_lov_write_objids(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int i, rc = 0;
-        ENTRY;
-
-        if (cfs_bitmap_check_empty(mds->mds_lov_page_dirty))
-                RETURN(0);
-
-        mds_lov_dump_objids("write", obd);
-
-        cfs_foreach_bit(mds->mds_lov_page_dirty, i) {
-                obd_id *data =  mds->mds_lov_page_array[i];
-                unsigned int size = OBJID_PER_PAGE()*sizeof(obd_id);
-                loff_t off = i * size;
-
-                LASSERT(data != NULL);
-
-                /* check for particaly filled last page */
-                if (i == mds->mds_lov_objid_lastpage)
-                        size = (mds->mds_lov_objid_lastidx + 1) * sizeof(obd_id);
-
-                rc = fsfilt_write_record(obd, mds->mds_lov_objid_filp, data,
-                                         size, &off, 0);
-                if (rc < 0)
-                        break;
-                cfs_bitmap_clear(mds->mds_lov_page_dirty, i);
-        }
-        if (rc >= 0)
-                rc = 0;
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(mds_lov_write_objids);
-
-static int mds_lov_get_objid(struct obd_device * obd,
-                             __u32 idx)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        unsigned int page;
-        unsigned int off;
-        obd_id *data;
-        int rc = 0;
-        ENTRY;
-
-        page = idx / OBJID_PER_PAGE();
-        off = idx % OBJID_PER_PAGE();
-        data = mds->mds_lov_page_array[page];
-        if (data == NULL) {
-                OBD_ALLOC(data, MDS_LOV_ALLOC_SIZE);
-                if (data == NULL)
-                        GOTO(out, rc = -ENOMEM);
-
-                mds->mds_lov_page_array[page] = data;
-        }
-
-        if (data[off] == 0) {
-                /* We never read this lastid; ask the osc */
-                struct obd_id_info lastid;
-                __u32 size = sizeof(lastid);
-
-                lastid.idx = idx;
-                lastid.data = &data[off];
-                rc = obd_get_info(mds->mds_osc_exp, sizeof(KEY_LAST_ID),
-                                  KEY_LAST_ID, &size, &lastid);
-                if (rc)
-                        GOTO(out, rc);
-
-                if (idx > mds->mds_lov_objid_count) {
-                        mds->mds_lov_objid_count = idx;
-                        mds->mds_lov_objid_lastpage = page;
-                        mds->mds_lov_objid_lastidx = off;
-                }
-                cfs_bitmap_set(mds->mds_lov_page_dirty, page);
-        }
-        CDEBUG(D_INFO, "idx %d - %p - %d/%d - "LPU64"\n",
-               idx, data, page, off, data[off]);
-out:
-        RETURN(rc);
-}
-
-int mds_lov_clear_orphans(struct mds_obd *mds, struct obd_uuid *ost_uuid)
-{
-        int rc;
-        struct obdo oa;
-        struct obd_trans_info oti = {0};
-        struct lov_stripe_md  *empty_ea = NULL;
-        ENTRY;
-
-        LASSERT(mds->mds_lov_page_array != NULL);
-
-        /* This create will in fact either create or destroy:  If the OST is
-         * missing objects below this ID, they will be created.  If it finds
-         * objects above this ID, they will be removed. */
-        memset(&oa, 0, sizeof(oa));
-        oa.o_flags = OBD_FL_DELORPHAN;
-        oa.o_valid = OBD_MD_FLFLAGS | OBD_MD_FLGROUP;
-        if (ost_uuid != NULL) {
-                memcpy(&oa.o_inline, ost_uuid, sizeof(*ost_uuid));
-                oa.o_valid |= OBD_MD_FLINLINE;
-        }
-        rc = obd_create(mds->mds_osc_exp, &oa, &empty_ea, &oti);
-
-        RETURN(rc);
-}
-
-/* for one target */
-static int mds_lov_set_one_nextid(struct obd_device * obd, __u32 idx, obd_id *id)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int rc;
-        struct obd_id_info info;
-        ENTRY;
-
-        LASSERT(!obd->obd_recovering);
-
-        /* obd->obd_dev_sem must be held so mds_lov_objids doesn't change */
-        LASSERT_SEM_LOCKED(&obd->obd_dev_sem);
-
-        info.idx = idx;
-        info.data = id;
-
-        rc = obd_set_info_async(mds->mds_osc_exp, sizeof(KEY_NEXT_ID),
-                                KEY_NEXT_ID, sizeof(info), &info, NULL);
-        if (rc)
-                CERROR ("%s: mds_lov_set_nextid failed (%d)\n",
-                        obd->obd_name, rc);
-
-        RETURN(rc);
-}
-
-static __u32 mds_lov_get_idx(struct obd_export *lov,
-                             struct obd_uuid *ost_uuid)
-{
-        int rc;
-        int valsize = sizeof(ost_uuid);
-
-        rc = obd_get_info(lov, sizeof(KEY_LOV_IDX), KEY_LOV_IDX,
-                          &valsize, ost_uuid);
-        LASSERT(rc >= 0);
-
-        RETURN(rc);
-}
-
-/* Update the lov desc for a new size lov. */
-static int mds_lov_update_desc(struct obd_device *obd, struct obd_export *lov)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lov_desc *ld;
-        __u32 stripes, valsize = sizeof(mds->mds_lov_desc);
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(ld, sizeof(*ld));
-        if (!ld)
-                RETURN(-ENOMEM);
-
-        rc = obd_get_info(lov, sizeof(KEY_LOVDESC), KEY_LOVDESC,
-                          &valsize, ld);
-        if (rc)
-                GOTO(out, rc);
-
-        /* Don't change the mds_lov_desc until the objids size matches the
-           count (paranoia) */
-        mds->mds_lov_desc = *ld;
-        CDEBUG(D_CONFIG, "updated lov_desc, tgt_count: %d\n",
-               mds->mds_lov_desc.ld_tgt_count);
-
-        stripes = min_t(__u32, LOV_MAX_STRIPE_COUNT,
-                        mds->mds_lov_desc.ld_tgt_count);
-
-        mds->mds_max_mdsize = lov_mds_md_size(stripes);
-        mds->mds_max_cookiesize = stripes * sizeof(struct llog_cookie);
-        CDEBUG(D_CONFIG, "updated max_mdsize/max_cookiesize for %d stripes: "
-               "%d/%d\n", mds->mds_max_mdsize, mds->mds_max_cookiesize,
-               stripes);
-
-        /* If we added a target we have to reconnect the llogs */
-        /* We only _need_ to do this at first add (idx), or the first time
-           after recovery.  However, it should now be safe to call anytime. */
-        rc = llog_cat_initialize(obd, mds->mds_lov_desc.ld_tgt_count, NULL);
-
-out:
-        OBD_FREE(ld, sizeof(*ld));
-        RETURN(rc);
-}
-
-
-/* Inform MDS about new/updated target */
-static int mds_lov_update_mds(struct obd_device *obd,
-                              struct obd_device *watched,
-                              __u32 idx)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        __u32 old_count;
-        int rc = 0;
-        int page;
-        int off;
-        obd_id *data;
-
-        ENTRY;
-
-        /* Don't let anyone else mess with mds_lov_objids now */
-        mutex_down(&obd->obd_dev_sem);
-
-        old_count = mds->mds_lov_desc.ld_tgt_count;
-        rc = mds_lov_update_desc(obd, mds->mds_osc_exp);
-        if (rc)
-                GOTO(out, rc);
-
-        CDEBUG(D_CONFIG, "idx=%d, recov=%d/%d, cnt=%d/%d\n",
-               idx, obd->obd_recovering, obd->obd_async_recov, old_count,
-               mds->mds_lov_desc.ld_tgt_count);
-
-        /* idx is set as data from lov_notify. */
-        if (obd->obd_recovering)
-                GOTO(out, rc);
-
-        if (idx >= mds->mds_lov_desc.ld_tgt_count) {
-                CERROR("index %d > count %d!\n", idx,
-                       mds->mds_lov_desc.ld_tgt_count);
-                GOTO(out, rc = -EINVAL);
-        }
-
-        rc = mds_lov_get_objid(obd, idx);
-        if (rc) {
-                CERROR("Failed to get objid - %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        page = idx / OBJID_PER_PAGE();
-        off = idx % OBJID_PER_PAGE();
-        data = mds->mds_lov_page_array[page];
-        /* We have read this lastid from disk; tell the osc.
-           Don't call this during recovery. */
-        rc = mds_lov_set_one_nextid(obd, idx, &data[off]);
-        if (rc) {
-                CERROR("Failed to set next id, idx=%d rc=%d\n", idx,rc);
-                /* Don't abort the rest of the sync */
-                rc = 0;
-        }
-
-        CDEBUG(D_CONFIG, "last object "LPU64" from OST %d rc=%d\n",
-               data[off], idx, rc);
-out:
-        mutex_up(&obd->obd_dev_sem);
-        RETURN(rc);
-}
-
-/* update the LOV-OSC knowledge of the last used object id's */
-int mds_lov_connect(struct obd_device *obd, char * lov_name)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_handle conn = {0,};
-        struct obd_connect_data *data;
-        int rc;
-        ENTRY;
-
-        if (IS_ERR(mds->mds_osc_obd))
-                RETURN(PTR_ERR(mds->mds_osc_obd));
-
-        if (mds->mds_osc_obd)
-                RETURN(0);
-
-        mds->mds_osc_obd = class_name2obd(lov_name);
-        if (!mds->mds_osc_obd) {
-                CERROR("MDS cannot locate LOV %s\n", lov_name);
-                mds->mds_osc_obd = ERR_PTR(-ENOTCONN);
-                RETURN(-ENOTCONN);
-        }
-
-        OBD_ALLOC(data, sizeof(*data));
-        if (data == NULL)
-                RETURN(-ENOMEM);
-        data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_INDEX |
-                OBD_CONNECT_REQPORTAL | OBD_CONNECT_QUOTA64 | OBD_CONNECT_AT |
-                OBD_CONNECT_CHANGE_QS;
-#ifdef HAVE_LRU_RESIZE_SUPPORT
-        data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE;
-#endif
-        data->ocd_version = LUSTRE_VERSION_CODE;
-        /* NB: lov_connect() needs to fill in .ocd_index for each OST */
-        rc = obd_connect(&conn, mds->mds_osc_obd, &obd->obd_uuid, data, NULL);
-        OBD_FREE(data, sizeof(*data));
-        if (rc) {
-                CERROR("MDS cannot connect to LOV %s (%d)\n", lov_name, rc);
-                mds->mds_osc_obd = ERR_PTR(rc);
-                RETURN(rc);
-        }
-        mds->mds_osc_exp = class_conn2export(&conn);
-
-        rc = obd_register_observer(mds->mds_osc_obd, obd);
-        if (rc) {
-                CERROR("MDS cannot register as observer of LOV %s (%d)\n",
-                       lov_name, rc);
-                GOTO(err_discon, rc);
-        }
-
-        /* Deny new client connections until we are sure we have some OSTs */
-        obd->obd_no_conn = 1;
-
-        mutex_down(&obd->obd_dev_sem);
-        rc = mds_lov_read_objids(obd);
-        if (rc) {
-                CERROR("cannot read %s: rc = %d\n", "lov_objids", rc);
-                GOTO(err_reg, rc);
-        }
-
-        rc = mds_lov_update_desc(obd, mds->mds_osc_exp);
-        if (rc)
-                GOTO(err_reg, rc);
-
-        /* If we're mounting this code for the first time on an existing FS,
-         * we need to populate the objids array from the real OST values */
-        if (mds->mds_lov_desc.ld_tgt_count > mds->mds_lov_objid_count) {
-                __u32 i = mds->mds_lov_objid_count;
-                for(; i <= mds->mds_lov_desc.ld_tgt_count; i++) {
-                        rc = mds_lov_get_objid(obd, i);
-                        if (rc != 0)
-                                break;
-                }
-                if (rc == 0)
-                        rc = mds_lov_write_objids(obd);
-                if (rc)
-                        CERROR("got last objids from OSTs, but error "
-                                "in update objids file: %d\n", rc);
-        }
-
-        mutex_up(&obd->obd_dev_sem);
-
-        /* I want to see a callback happen when the OBD moves to a
-         * "For General Use" state, and that's when we'll call
-         * set_nextid().  The class driver can help us here, because
-         * it can use the obd_recovering flag to determine when the
-         * the OBD is full available. */
-        if (!obd->obd_recovering)
-                rc = mds_postrecov(obd);
-        RETURN(rc);
-
-err_reg:
-        mutex_up(&obd->obd_dev_sem);
-        obd_register_observer(mds->mds_osc_obd, NULL);
-err_discon:
-        obd_disconnect(mds->mds_osc_exp);
-        mds->mds_osc_exp = NULL;
-        mds->mds_osc_obd = ERR_PTR(rc);
-        RETURN(rc);
-}
-
-int mds_lov_disconnect(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int rc = 0;
-        ENTRY;
-
-        if (!IS_ERR(mds->mds_osc_obd) && mds->mds_osc_exp != NULL) {
-                obd_register_observer(mds->mds_osc_obd, NULL);
-
-                /* The actual disconnect of the mds_lov will be called from
-                 * class_disconnect_exports from mds_lov_clean. So we have to
-                 * ensure that class_cleanup doesn't fail due to the extra ref
-                 * we're holding now. The mechanism to do that already exists -
-                 * the obd_force flag. We'll drop the final ref to the
-                 * mds_osc_exp in mds_cleanup. */
-                mds->mds_osc_obd->obd_force = 1;
-        }
-
-        RETURN(rc);
-}
-
-int mds_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                  void *karg, void *uarg)
-{
-        static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" };
-        struct obd_device *obd = exp->exp_obd;
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_ioctl_data *data = karg;
-        struct lvfs_run_ctxt saved;
-        int rc = 0;
-
-        ENTRY;
-        CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd);
-
-        switch (cmd) {
-        case OBD_IOC_RECORD: {
-                char *name = data->ioc_inlbuf1;
-                struct llog_ctxt *ctxt;
-
-                if (mds->mds_cfg_llh)
-                        RETURN(-EBUSY);
-
-                ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = llog_create(ctxt, &mds->mds_cfg_llh, NULL, name);
-                llog_ctxt_put(ctxt);
-                if (rc == 0)
-                        llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN,
-                                         &cfg_uuid);
-                else
-                        mds->mds_cfg_llh = NULL;
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                RETURN(rc);
-        }
-
-        case OBD_IOC_ENDRECORD: {
-                if (!mds->mds_cfg_llh)
-                        RETURN(-EBADF);
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = llog_close(mds->mds_cfg_llh);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                mds->mds_cfg_llh = NULL;
-                RETURN(rc);
-        }
-
-        case OBD_IOC_CLEAR_LOG: {
-                char *name = data->ioc_inlbuf1;
-                struct llog_ctxt *ctxt;
-                if (mds->mds_cfg_llh)
-                        RETURN(-EBUSY);
-
-                ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = llog_create(ctxt, &mds->mds_cfg_llh, NULL, name);
-                llog_ctxt_put(ctxt);
-                if (rc == 0) {
-                        llog_init_handle(mds->mds_cfg_llh, LLOG_F_IS_PLAIN,
-                                         NULL);
-
-                        rc = llog_destroy(mds->mds_cfg_llh);
-                        llog_free_handle(mds->mds_cfg_llh);
-                }
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                mds->mds_cfg_llh = NULL;
-                RETURN(rc);
-        }
-
-        case OBD_IOC_DORECORD: {
-                char *cfg_buf;
-                struct llog_rec_hdr rec;
-                if (!mds->mds_cfg_llh)
-                        RETURN(-EBADF);
-
-                rec.lrh_len = llog_data_len(data->ioc_plen1);
-
-                if (data->ioc_type == LUSTRE_CFG_TYPE) {
-                        rec.lrh_type = OBD_CFG_REC;
-                } else {
-                        CERROR("unknown cfg record type:%d \n", data->ioc_type);
-                        RETURN(-EINVAL);
-                }
-
-                OBD_ALLOC(cfg_buf, data->ioc_plen1);
-                if (cfg_buf == NULL)
-                        RETURN(-EINVAL);
-                rc = copy_from_user(cfg_buf, data->ioc_pbuf1, data->ioc_plen1);
-                if (rc) {
-                        OBD_FREE(cfg_buf, data->ioc_plen1);
-                        RETURN(rc);
-                }
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = llog_write_rec(mds->mds_cfg_llh, &rec, NULL, 0,
-                                    cfg_buf, -1);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                OBD_FREE(cfg_buf, data->ioc_plen1);
-                RETURN(rc);
-        }
-
-        case OBD_IOC_PARSE: {
-                struct llog_ctxt *ctxt =
-                        llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                llog_ctxt_put(ctxt);
-                if (rc)
-                        RETURN(rc);
-
-                RETURN(rc);
-        }
-
-        case OBD_IOC_DUMP_LOG: {
-                struct llog_ctxt *ctxt =
-                        llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                llog_ctxt_put(ctxt);
-                if (rc)
-                        RETURN(rc);
-
-                RETURN(rc);
-        }
-
-        case OBD_IOC_SYNC: {
-                CDEBUG(D_INFO, "syncing mds %s\n", obd->obd_name);
-                rc = fsfilt_sync(obd, obd->u.obt.obt_sb);
-                RETURN(rc);
-        }
-
-        case OBD_IOC_SET_READONLY: {
-                void *handle;
-                struct inode *inode = obd->u.obt.obt_sb->s_root->d_inode;
-                BDEVNAME_DECLARE_STORAGE(tmp);
-                LCONSOLE_WARN("*** setting obd %s device '%s' read-only ***\n",
-                       obd->obd_name, ll_bdevname(obd->u.obt.obt_sb, tmp));
-
-                handle = fsfilt_start(obd, inode, FSFILT_OP_MKNOD, NULL);
-                if (!IS_ERR(handle))
-                        rc = fsfilt_commit(obd, inode, handle, 1);
-
-                CDEBUG(D_HA, "syncing mds %s\n", obd->obd_name);
-                rc = fsfilt_sync(obd, obd->u.obt.obt_sb);
-
-                lvfs_set_rdonly(obd, obd->u.obt.obt_sb);
-                RETURN(0);
-        }
-
-        case OBD_IOC_CATLOGLIST: {
-                int count = mds->mds_lov_desc.ld_tgt_count;
-                rc = llog_catalog_list(obd, count, data);
-                RETURN(rc);
-
-        }
-        case OBD_IOC_LLOG_CHECK:
-        case OBD_IOC_LLOG_CANCEL:
-        case OBD_IOC_LLOG_REMOVE: {
-                struct llog_ctxt *ctxt =
-                        llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                int rc2;
-
-                obd_llog_finish(obd, mds->mds_lov_desc.ld_tgt_count);
-                push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                rc = llog_ioctl(ctxt, cmd, data);
-                pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                llog_cat_initialize(obd, mds->mds_lov_desc.ld_tgt_count, NULL);
-                llog_ctxt_put(ctxt);
-                rc2 = obd_set_info_async(mds->mds_osc_exp,
-                                         sizeof(KEY_MDS_CONN), KEY_MDS_CONN,
-                                         0, NULL, NULL);
-                if (!rc)
-                        rc = rc2;
-                RETURN(rc);
-        }
-        case OBD_IOC_LLOG_INFO:
-        case OBD_IOC_LLOG_PRINT: {
-                struct llog_ctxt *ctxt =
-                        llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-
-                push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                rc = llog_ioctl(ctxt, cmd, data);
-                pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                llog_ctxt_put(ctxt);
-
-                RETURN(rc);
-        }
-
-        case OBD_IOC_ABORT_RECOVERY:
-                CERROR("aborting recovery for device %s\n", obd->obd_name);
-                target_abort_recovery(obd);
-                RETURN(0);
-
-        default:
-                CDEBUG(D_INFO, "unknown command %x\n", cmd);
-                RETURN(-EINVAL);
-        }
-        RETURN(0);
-
-}
-
-/* Collect the preconditions we need to allow client connects */
-static void mds_allow_cli(struct obd_device *obd, unsigned long flag)
-{
-        if (flag & CONFIG_LOG)
-                obd->u.mds.mds_fl_cfglog = 1;
-        if (flag & CONFIG_SYNC)
-                obd->u.mds.mds_fl_synced = 1;
-        if (obd->u.mds.mds_fl_cfglog /* bz11778: && obd->u.mds.mds_fl_synced */)
-                /* Open for clients */
-                obd->obd_no_conn = 0;
-}
-
-struct mds_lov_sync_info {
-        struct obd_device *mlsi_obd;     /* the lov device to sync */
-        struct obd_device *mlsi_watched; /* target osc */
-        __u32              mlsi_index;   /* index of target */
-};
-
-/* We only sync one osc at a time, so that we don't have to hold
-   any kind of lock on the whole mds_lov_desc, which may change
-   (grow) as a result of mds_lov_add_ost.  This also avoids any
-   kind of mismatch between the lov_desc and the mds_lov_desc,
-   which are not in lock-step during lov_add_obd */
-static int __mds_lov_synchronize(void *data)
-{
-        struct mds_lov_sync_info *mlsi = data;
-        struct obd_device *obd = mlsi->mlsi_obd;
-        struct obd_device *watched = mlsi->mlsi_watched;
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_uuid *uuid;
-        __u32  idx = mlsi->mlsi_index;
-        struct llog_ctxt *ctxt;
-        int rc = 0;
-        ENTRY;
-
-        OBD_FREE(mlsi, sizeof(*mlsi));
-
-        LASSERT(obd);
-        LASSERT(watched);
-        uuid = &watched->u.cli.cl_target_uuid;
-        LASSERT(uuid);
-
-        OBD_RACE(OBD_FAIL_MDS_LOV_SYNC_RACE);
-
-        rc = mds_lov_update_mds(obd, watched, idx);
-        if (rc != 0) {
-                CERROR("%s failed at update_mds: %d\n", obd_uuid2str(uuid), rc);
-                GOTO(out, rc);
-        }
-
-        rc = obd_set_info_async(mds->mds_osc_exp, sizeof(KEY_MDS_CONN),
-                                KEY_MDS_CONN, 0, uuid, NULL);
-        if (rc != 0)
-                GOTO(out, rc);
-
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
-        if (!ctxt)
-              RETURN(-ENODEV);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_LLOG_SYNC_TIMEOUT, 60);
-
-        rc = llog_connect(ctxt, obd->u.mds.mds_lov_desc.ld_tgt_count,
-                          NULL, NULL, uuid);
-        llog_ctxt_put(ctxt);
-
-        if (rc != 0) {
-                CERROR("%s failed at llog_origin_connect: %d\n",
-                       obd_uuid2str(uuid), rc);
-                GOTO(out, rc);
-        }
-
-        LCONSOLE_INFO("MDS %s: %s now active, resetting orphans\n",
-              obd->obd_name, obd_uuid2str(uuid));
-
-        if (obd->obd_stopping)
-                GOTO(out, rc = -ENODEV);
-
-        rc = mds_lov_clear_orphans(mds, uuid);
-        if (rc != 0) {
-                CERROR("%s failed at mds_lov_clear_orphans: %d\n",
-                       obd_uuid2str(uuid), rc);
-                GOTO(out, rc);
-        }
-
-        EXIT;
-out:
-        if (rc) {
-                /* Deactivate it for safety */
-                CERROR("%s sync failed %d, deactivating\n", obd_uuid2str(uuid),
-                       rc);
-                if (!obd->obd_stopping && mds->mds_osc_obd &&
-                    !mds->mds_osc_obd->obd_stopping && !watched->obd_stopping) 
-                        obd_notify(mds->mds_osc_obd, watched,
-                                   OBD_NOTIFY_INACTIVE, NULL);
-        } else {
-                /* We've successfully synced at least 1 OST and are ready
-                   to handle client requests */
-                mds_allow_cli(obd, CONFIG_SYNC);
-        }
-
-        class_decref(obd);
-        return rc;
-}
-
-int mds_lov_synchronize(void *data)
-{
-        struct mds_lov_sync_info *mlsi = data;
-        char name[20];
-
-        snprintf(name, sizeof(name), "ll_sync_%02u", mlsi->mlsi_index);
-        ptlrpc_daemonize(name);
-
-        RETURN(__mds_lov_synchronize(data));
-}
-
-int mds_lov_start_synchronize(struct obd_device *obd,
-                              struct obd_device *watched,
-                              void *data, int nonblock)
-{
-        struct mds_lov_sync_info *mlsi;
-        struct mds_obd *mds = &obd->u.mds;
-        int rc;
-        struct obd_uuid *uuid;
-        ENTRY;
-
-        LASSERT(watched);
-        uuid = &watched->u.cli.cl_target_uuid;
-
-        OBD_ALLOC(mlsi, sizeof(*mlsi));
-        if (mlsi == NULL)
-                RETURN(-ENOMEM);
-
-        mlsi->mlsi_obd = obd;
-        mlsi->mlsi_watched = watched;
-        if (data)
-                mlsi->mlsi_index = *(__u32 *)data;
-        else
-                mlsi->mlsi_index = mds_lov_get_idx(mds->mds_osc_exp, uuid);
-
-        /* Although class_export_get(obd->obd_self_export) would lock
-           the MDS in place, since it's only a self-export
-           it doesn't lock the LOV in place.  The LOV can be disconnected
-           during MDS precleanup, leaving nothing for __mds_lov_synchronize.
-           Simply taking an export ref on the LOV doesn't help, because it's
-           still disconnected. Taking an obd reference insures that we don't
-           disconnect the LOV.  This of course means a cleanup won't
-           finish for as long as the sync is blocking. */
-        class_incref(obd);
-
-        if (nonblock) {
-                /* Synchronize in the background */
-                rc = cfs_kernel_thread(mds_lov_synchronize, mlsi,
-                                       CLONE_VM | CLONE_FILES);
-                if (rc < 0) {
-                        CERROR("%s: error starting mds_lov_synchronize: %d\n",
-                               obd->obd_name, rc);
-                        class_decref(obd);
-                } else {
-                        CDEBUG(D_HA, "%s: mds_lov_synchronize idx=%d "
-                               "thread=%d\n", obd->obd_name,
-                               mlsi->mlsi_index, rc);
-                        rc = 0;
-                }
-        } else {
-                rc = __mds_lov_synchronize((void *)mlsi);
-        }
-
-        RETURN(rc);
-}
-
-int mds_notify(struct obd_device *obd, struct obd_device *watched,
-               enum obd_notify_event ev, void *data)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (ev) {
-        /* We only handle these: */
-        case OBD_NOTIFY_ACTIVE:
-        case OBD_NOTIFY_SYNC:
-        case OBD_NOTIFY_SYNC_NONBLOCK:
-                break;
-        case OBD_NOTIFY_CONFIG:
-                mds_allow_cli(obd, (unsigned long)data);
-        default:
-                RETURN(0);
-        }
-
-        CDEBUG(D_CONFIG, "notify %s ev=%d\n", watched->obd_name, ev);
-
-        if (strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME) != 0) {
-                CERROR("unexpected notification of %s %s!\n",
-                       watched->obd_type->typ_name, watched->obd_name);
-                RETURN(-EINVAL);
-        }
-
-        if (obd->obd_recovering) {
-                CWARN("MDS %s: in recovery, not resetting orphans on %s\n",
-                      obd->obd_name,
-                      obd_uuid2str(&watched->u.cli.cl_target_uuid));
-                /* We still have to fix the lov descriptor for ost's added
-                   after the mdt in the config log.  They didn't make it into
-                   mds_lov_connect. */
-                mutex_down(&obd->obd_dev_sem);
-                rc = mds_lov_update_desc(obd, obd->u.mds.mds_osc_exp);
-                mutex_up(&obd->obd_dev_sem);
-                mds_allow_cli(obd, CONFIG_SYNC);
-                RETURN(rc);
-        }
-
-        LASSERT(!llog_ctxt_null(obd, LLOG_MDS_OST_ORIG_CTXT));
-        rc = mds_lov_start_synchronize(obd, watched, data,
-                                       !(ev == OBD_NOTIFY_SYNC));
-
-        lquota_recovery(mds_quota_interface_ref, obd);
-
-        RETURN(rc);
-}
-
-int mds_get_default_md(struct obd_device *obd, struct lov_mds_md *lmm,
-                       int *size)
-{
-        struct lov_desc *ldesc;
-        ENTRY;
-
-        ldesc = &obd->u.mds.mds_lov_desc;
-        LASSERT(ldesc != NULL);
-
-        if (!lmm)
-                RETURN(0);
-
-        lmm->lmm_magic = LOV_MAGIC_V1;
-        lmm->lmm_object_gr = LOV_OBJECT_GROUP_DEFAULT;
-        lmm->lmm_pattern = ldesc->ld_pattern;
-        lmm->lmm_stripe_size = ldesc->ld_default_stripe_size;
-        lmm->lmm_stripe_count = ldesc->ld_default_stripe_count;
-        *size = sizeof(struct lov_mds_md);
-
-        RETURN(sizeof(struct lov_mds_md));
-}
-
-/* Convert the on-disk LOV EA structre.
- * We always try to convert from an old LOV EA format to the common in-memory
- * (lsm) format (obd_unpackmd() understands the old on-disk (lmm) format) and
- * then convert back to the new on-disk format and save it back to disk
- * (obd_packmd() only ever saves to the new on-disk format) so we don't have
- * to convert it each time this inode is accessed.
- *
- * This function is a bit interesting in the error handling.  We can safely
- * ship the old lmm to the client in case of failure, since it uses the same
- * obd_unpackmd() code and can do the conversion if the MDS fails for some
- * reason.  We will not delete the old lmm data until we have written the
- * new format lmm data in fsfilt_set_md(). */
-int mds_convert_lov_ea(struct obd_device *obd, struct inode *inode,
-                       struct lov_mds_md *lmm, int lmm_size)
-{
-        struct lov_stripe_md *lsm = NULL;
-        void *handle;
-        int rc, err;
-        ENTRY;
-
-        if (le32_to_cpu(lmm->lmm_magic) == LOV_MAGIC ||
-            le32_to_cpu(lmm->lmm_magic == LOV_MAGIC_JOIN))
-                RETURN(0);
-
-        CDEBUG(D_INODE, "converting LOV EA on %lu/%u from %#08x to %#08x\n",
-               inode->i_ino, inode->i_generation, le32_to_cpu(lmm->lmm_magic),
-               LOV_MAGIC);
-
-        rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, lmm, lmm_size);
-        if (rc < 0)
-                GOTO(conv_end, rc);
-
-        rc = obd_packmd(obd->u.mds.mds_osc_exp, &lmm, lsm);
-        if (rc < 0)
-                GOTO(conv_free, rc);
-        lmm_size = rc;
-
-        handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL);
-        if (IS_ERR(handle)) {
-                rc = PTR_ERR(handle);
-                GOTO(conv_free, rc);
-        }
-
-        rc = fsfilt_set_md(obd, inode, handle, lmm, lmm_size, "lov");
-
-        err = fsfilt_commit(obd, inode, handle, 0);
-        if (!rc)
-                rc = err ? err : lmm_size;
-        GOTO(conv_free, rc);
-conv_free:
-        obd_free_memmd(obd->u.mds.mds_osc_exp, &lsm);
-conv_end:
-        return rc;
-}
diff --git a/lustre/mds/mds_open.c b/lustre/mds/mds_open.c
deleted file mode 100644
index e879d0e8487a60530b0c8cb5a9929eac48fa7176..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_open.c
+++ /dev/null
@@ -1,1544 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Mike Shaver <shaver@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/version.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-# include <linux/buffer_head.h>
-# include <linux/workqueue.h>
-#else
-# include <linux/locks.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <lustre_fsfilt.h>
-#include <lprocfs_status.h>
-
-#include "mds_internal.h"
-
-/* Exported function from this file are:
- *
- * mds_open - called by the intent handler
- * mds_close - an rpc handling function
- * mds_pin - an rpc handling function - which will go away
- * mds_mfd_close - for force closing files when a client dies
- */
-
-/*
- * MDS file data handling: file data holds a handle for a file opened
- * by a client.
- */
-
-static void mds_mfd_addref(void *mfdp)
-{
-        struct mds_file_data *mfd = mfdp;
-
-        atomic_inc(&mfd->mfd_refcount);
-        CDEBUG(D_INFO, "GETting mfd %p : new refcount %d\n", mfd,
-               atomic_read(&mfd->mfd_refcount));
-}
-
-/* Create a new mds_file_data struct.
- * One reference for handle+med_open_head list and dropped by mds_mfd_unlink(),
- * one reference for the caller of this function. */
-struct mds_file_data *mds_mfd_new(void)
-{
-        struct mds_file_data *mfd;
-
-        OBD_ALLOC(mfd, sizeof *mfd);
-        if (mfd == NULL) {
-                CERROR("mds: out of memory\n");
-                return NULL;
-        }
-
-        atomic_set(&mfd->mfd_refcount, 2);
-
-        INIT_LIST_HEAD(&mfd->mfd_handle.h_link);
-        INIT_LIST_HEAD(&mfd->mfd_list);
-        class_handle_hash(&mfd->mfd_handle, mds_mfd_addref);
-
-        return mfd;
-}
-
-/* Get a new reference on the mfd pointed to by handle, if handle is still
- * valid.  Caller must drop reference with mds_mfd_put(). */
-static struct mds_file_data *mds_handle2mfd(struct lustre_handle *handle)
-{
-        ENTRY;
-        LASSERT(handle != NULL);
-        RETURN(class_handle2object(handle->cookie));
-}
-
-/* Drop mfd reference, freeing struct if this is the last one. */
-static void mds_mfd_put(struct mds_file_data *mfd)
-{
-        CDEBUG(D_INFO, "PUTting mfd %p : new refcount %d\n", mfd,
-               atomic_read(&mfd->mfd_refcount) - 1);
-        LASSERT(atomic_read(&mfd->mfd_refcount) > 0 &&
-                atomic_read(&mfd->mfd_refcount) < 0x5a5a);
-        if (atomic_dec_and_test(&mfd->mfd_refcount)) {
-                OBD_FREE_RCU(mfd, sizeof *mfd, &mfd->mfd_handle);
-        }
-}
-
-/* Remove the mfd handle so that it cannot be found by open/close again.
- * Caller must hold med_open_lock for mfd_list manipulation. */
-void mds_mfd_unlink(struct mds_file_data *mfd, int decref)
-{
-        class_handle_unhash(&mfd->mfd_handle);
-        list_del_init(&mfd->mfd_list);
-        if (decref)
-                mds_mfd_put(mfd);
-}
-
-/* Caller must hold mds->mds_epoch_sem */
-static int mds_alloc_filterdata(struct inode *inode)
-{
-        LASSERT(inode->i_filterdata == NULL);
-        OBD_ALLOC(inode->i_filterdata, sizeof(struct mds_filter_data));
-        if (inode->i_filterdata == NULL)
-                return -ENOMEM;
-        LASSERT(igrab(inode) == inode);
-        return 0;
-}
-
-/* Caller must hold mds->mds_epoch_sem */
-static void mds_free_filterdata(struct inode *inode)
-{
-        LASSERT(inode->i_filterdata != NULL);
-        OBD_FREE(inode->i_filterdata, sizeof(struct mds_filter_data));
-        inode->i_filterdata = NULL;
-        iput(inode);
-}
-
-/* Write access to a file: executors cause a negative count,
- * writers a positive count.  The semaphore is needed to perform
- * a check for the sign and then increment or decrement atomically.
- *
- * This code is closely tied to the allocation of the d_fsdata and the
- * MDS epoch, so we use the same semaphore for the whole lot.
- *
- * We could use a different semaphore for each file, if it ever shows
- * up in a profile, which it won't.
- *
- * epoch argument is nonzero during recovery */
-static int mds_get_write_access(struct mds_obd *mds, struct inode *inode,
-                                __u64 epoch)
-{
-        int rc = 0;
-
-        down(&mds->mds_epoch_sem);
-
-        if (atomic_read(&inode->i_writecount) < 0) {
-                up(&mds->mds_epoch_sem);
-                RETURN(-ETXTBSY);
-        }
-
-
-        if (MDS_FILTERDATA(inode) && MDS_FILTERDATA(inode)->io_epoch != 0) {
-                CDEBUG(D_INODE, "continuing MDS epoch "LPU64" for ino %lu/%u\n",
-                       MDS_FILTERDATA(inode)->io_epoch, inode->i_ino,
-                       inode->i_generation);
-                goto out;
-        }
-
-        if (inode->i_filterdata == NULL)
-                mds_alloc_filterdata(inode);
-        if (inode->i_filterdata == NULL) {
-                rc = -ENOMEM;
-                goto out;
-        }
-        if (epoch > mds->mds_io_epoch)
-                mds->mds_io_epoch = epoch;
-        else
-                mds->mds_io_epoch++;
-        MDS_FILTERDATA(inode)->io_epoch = mds->mds_io_epoch;
-        CDEBUG(D_INODE, "starting MDS epoch "LPU64" for ino %lu/%u\n",
-               mds->mds_io_epoch, inode->i_ino, inode->i_generation);
- out:
-        if (rc == 0)
-                atomic_inc(&inode->i_writecount);
-        up(&mds->mds_epoch_sem);
-        return rc;
-}
-
-/* Returns EAGAIN if the client needs to get size and/or cookies and close
- * again -- which is never true if the file is about to be unlinked.  Otherwise
- * returns the number of remaining writers. */
-static int mds_put_write_access(struct mds_obd *mds, struct inode *inode,
-                                struct mds_body *body, int unlinking)
-{
-        int rc = 0;
-        ENTRY;
-
-        down(&mds->mds_epoch_sem);
-        atomic_dec(&inode->i_writecount);
-        rc = atomic_read(&inode->i_writecount);
-        if (rc > 0)
-                GOTO(out, rc);
-#if 0
-        if (!unlinking && !(body->valid & OBD_MD_FLSIZE))
-                GOTO(out, rc = EAGAIN);
-#endif
-        mds_free_filterdata(inode);
- out:
-        up(&mds->mds_epoch_sem);
-        return rc;
-}
-
-static int mds_deny_write_access(struct mds_obd *mds, struct inode *inode)
-{
-        ENTRY;
-        down(&mds->mds_epoch_sem);
-        if (atomic_read(&inode->i_writecount) > 0) {
-                up(&mds->mds_epoch_sem);
-                RETURN(-ETXTBSY);
-        }
-        atomic_dec(&inode->i_writecount);
-        up(&mds->mds_epoch_sem);
-        RETURN(0);
-}
-
-static void mds_allow_write_access(struct inode *inode)
-{
-        ENTRY;
-        atomic_inc(&inode->i_writecount);
-}
-
-int mds_query_write_access(struct inode *inode)
-{
-        ENTRY;
-        RETURN(atomic_read(&inode->i_writecount));
-}
-
-/* This replaces the VFS dentry_open, it manages mfd and writecount */
-static struct mds_file_data *mds_dentry_open(struct dentry *dentry,
-                                             struct vfsmount *mnt, int flags,
-                                             struct ptlrpc_request *req)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct mds_file_data *mfd;
-        struct mds_body *body;
-        int error;
-        ENTRY;
-
-        mfd = mds_mfd_new();
-        if (mfd == NULL) {
-                CERROR("mds: out of memory\n");
-                GOTO(cleanup_dentry, error = -ENOMEM);
-        }
-
-        body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
-
-        if (flags & FMODE_WRITE) {
-                /* FIXME: in recovery, need to pass old epoch here */
-                error = mds_get_write_access(mds, dentry->d_inode, 0);
-                if (error)
-                        GOTO(cleanup_mfd, error);
-                body->io_epoch = MDS_FILTERDATA(dentry->d_inode)->io_epoch;
-        } else if (flags & MDS_FMODE_EXEC) {
-                error = mds_deny_write_access(mds, dentry->d_inode);
-                if (error)
-                        GOTO(cleanup_mfd, error);
-        }
-
-        dget(dentry);
-
-        /* Mark the file as open to handle open-unlink. */
-        MDS_DOWN_WRITE_ORPHAN_SEM(dentry->d_inode);
-        mds_orphan_open_inc(dentry->d_inode);
-        MDS_UP_WRITE_ORPHAN_SEM(dentry->d_inode);
-
-        mfd->mfd_mode = flags;
-        mfd->mfd_dentry = dentry;
-        mfd->mfd_xid = req->rq_xid;
-
-        spin_lock(&med->med_open_lock);
-        list_add(&mfd->mfd_list, &med->med_open_head);
-        spin_unlock(&med->med_open_lock);
-
-        body->handle.cookie = mfd->mfd_handle.h_cookie;
-
-        RETURN(mfd);
-
-cleanup_mfd:
-        mds_mfd_put(mfd);
-        mds_mfd_unlink(mfd, 1);
-cleanup_dentry:
-        return ERR_PTR(error);
-}
-
-/* Must be called with i_mutex held */
-static int mds_create_objects(struct ptlrpc_request *req, int offset,
-                              struct mds_update_record *rec,
-                              struct mds_obd *mds, struct obd_device *obd,
-                              struct dentry *dchild, void **handle,
-                              struct lov_mds_md **objid)
-{
-        struct inode *inode = dchild->d_inode;
-        struct obd_trans_info oti = { 0 };
-        struct lov_mds_md *lmm = NULL;
-        int rc, lmm_size;
-        struct mds_body *body;
-        struct obd_info oinfo = { { { 0 } } };
-        void *lmm_buf;
-        ENTRY;
-
-        *objid = NULL;
-
-        if (!S_ISREG(inode->i_mode))
-                RETURN(0);
-        if (rec->ur_flags & MDS_OPEN_DELAY_CREATE ||
-            !(rec->ur_flags & FMODE_WRITE))
-                RETURN(0);
-
-        body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
-
-        if (body->valid & OBD_MD_FLEASIZE)
-                RETURN(0);
-
-        oti_init(&oti, req);
-
-        /* replay case */
-        if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
-                if (rec->ur_fid2->id == 0) {
-                        DEBUG_REQ(D_ERROR, req, "fid2 not set on open replay");
-                        RETURN(-EFAULT);
-                }
-
-                body->valid |= OBD_MD_FLBLKSZ | OBD_MD_FLEASIZE;
-                lmm_size = rec->ur_eadatalen;
-                lmm = rec->ur_eadata;
-                LASSERT(lmm);
-
-                if (*handle == NULL)
-                        *handle = fsfilt_start(obd,inode,FSFILT_OP_CREATE,NULL);
-                if (IS_ERR(*handle)) {
-                        rc = PTR_ERR(*handle);
-                        *handle = NULL;
-                        GOTO(out_ids, rc);
-                }
-
-                rc = fsfilt_set_md(obd, inode, *handle, lmm, lmm_size, "lov");
-                if (rc)
-                        CERROR("open replay failed to set md:%d\n", rc);
-                lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, lmm_size);
-                LASSERT(lmm_buf);
-                memcpy(lmm_buf, lmm, lmm_size);
-
-                *objid = lmm_buf;
-                RETURN(rc);
-        }
-
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_ALLOC_OBDO))
-                GOTO(out_ids, rc = -ENOMEM);
-
-        OBDO_ALLOC(oinfo.oi_oa);
-        if (oinfo.oi_oa == NULL)
-                GOTO(out_ids, rc = -ENOMEM);
-        oinfo.oi_oa->o_uid = 0; /* must have 0 uid / gid on OST */
-        oinfo.oi_oa->o_gid = 0;
-        oinfo.oi_oa->o_mode = S_IFREG | 0600;
-        oinfo.oi_oa->o_id = inode->i_ino;
-        oinfo.oi_oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLFLAGS |
-                OBD_MD_FLMODE | OBD_MD_FLUID | OBD_MD_FLGID;
-        oinfo.oi_oa->o_size = 0;
-
-        obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLTYPE | OBD_MD_FLATIME |
-                        OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-
-        if (!(rec->ur_flags & MDS_OPEN_HAS_OBJS)) {
-                /* check if things like lfs setstripe are sending us the ea */
-                if (rec->ur_flags & MDS_OPEN_HAS_EA) {
-                        rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE,
-                                           mds->mds_osc_exp,
-                                           0, &oinfo.oi_md, rec->ur_eadata);
-                        if (rc)
-                                GOTO(out_oa, rc);
-                } else {
-                        OBD_ALLOC(lmm, mds->mds_max_mdsize);
-                        if (lmm == NULL)
-                                GOTO(out_oa, rc = -ENOMEM);
-
-                        lmm_size = mds->mds_max_mdsize;
-                        rc = mds_get_md(obd, dchild->d_parent->d_inode,
-                                        lmm, &lmm_size, 1, 0);
-                        if (rc > 0)
-                                rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE,
-                                                   mds->mds_osc_exp,
-                                                   0, &oinfo.oi_md, lmm);
-                        OBD_FREE(lmm, mds->mds_max_mdsize);
-                        if (rc)
-                                GOTO(out_oa, rc);
-                }
-                rc = obd_create(mds->mds_osc_exp, oinfo.oi_oa, 
-                                &oinfo.oi_md, &oti);
-                if (rc) {
-                        int level = D_ERROR;
-                        if (rc == -ENOSPC)
-                                level = D_INODE;
-                        CDEBUG(level, "error creating objects for "
-                                      "inode %lu: rc = %d\n",
-                               inode->i_ino, rc);
-                        if (rc > 0) {
-                                CERROR("obd_create returned invalid "
-                                       "rc %d\n", rc);
-                                rc = -EIO;
-                        }
-                        GOTO(out_oa, rc);
-                }
-        } else {
-                rc = obd_iocontrol(OBD_IOC_LOV_SETEA, mds->mds_osc_exp,
-                                   0, &oinfo.oi_md, rec->ur_eadata);
-                if (rc) {
-                        GOTO(out_oa, rc);
-                }
-                oinfo.oi_md->lsm_object_id = oinfo.oi_oa->o_id;
-        }
-        if (i_size_read(inode)) {
-                oinfo.oi_oa->o_size = i_size_read(inode);
-                obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLTYPE |
-                                OBD_MD_FLATIME | OBD_MD_FLMTIME |
-                                OBD_MD_FLCTIME | OBD_MD_FLSIZE);
-
-                /* pack lustre id to OST */
-                oinfo.oi_oa->o_fid = body->fid1.id;
-                oinfo.oi_oa->o_generation = body->fid1.generation;
-                oinfo.oi_oa->o_valid |= OBD_MD_FLFID | OBD_MD_FLGENER;
-
-                rc = obd_setattr_rqset(mds->mds_osc_exp, &oinfo, &oti);
-                if (rc) {
-                        CERROR("error setting attrs for inode %lu: rc %d\n",
-                               inode->i_ino, rc);
-                        if (rc > 0) {
-                                CERROR("obd_setattr_async returned bad rc %d\n",
-                                       rc);
-                                rc = -EIO;
-                        }
-                        GOTO(out_oa, rc);
-                }
-        }
-
-        body->valid |= OBD_MD_FLBLKSZ | OBD_MD_FLEASIZE;
-        obdo_refresh_inode(inode, oinfo.oi_oa, OBD_MD_FLBLKSZ);
-
-        LASSERT(oinfo.oi_md && oinfo.oi_md->lsm_object_id);
-        lmm = NULL;
-        rc = obd_packmd(mds->mds_osc_exp, &lmm, oinfo.oi_md);
-        if (rc < 0) {
-                CERROR("cannot pack lsm, err = %d\n", rc);
-                GOTO(out_oa, rc);
-        }
-        lmm_size = rc;
-        body->eadatasize = rc;
-
-        if (*handle == NULL)
-                *handle = fsfilt_start(obd, inode, FSFILT_OP_CREATE, NULL);
-        if (IS_ERR(*handle)) {
-                rc = PTR_ERR(*handle);
-                *handle = NULL;
-                GOTO(free_diskmd, rc);
-        }
-
-        rc = fsfilt_set_md(obd, inode, *handle, lmm, lmm_size, "lov");
-        lmm_buf = lustre_msg_buf(req->rq_repmsg, offset, lmm_size);
-        LASSERT(lmm_buf);
-        memcpy(lmm_buf, lmm, lmm_size);
-        *objid = lmm_buf; /* save for mds_lov_update_objid */
-
- free_diskmd:
-        obd_free_diskmd(mds->mds_osc_exp, &lmm);
- out_oa:
-        oti_free_cookies(&oti);
-        OBDO_FREE(oinfo.oi_oa);
- out_ids:
-        if (oinfo.oi_md)
-                obd_free_memmd(mds->mds_osc_exp, &oinfo.oi_md);
-        RETURN(rc);
-}
-
-static void reconstruct_open(struct mds_update_record *rec, int offset,
-                             struct ptlrpc_request *req,
-                             struct lustre_handle *child_lockh)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-        struct mds_client_data *mcd = med->med_mcd;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct mds_file_data *mfd;
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct dentry *parent, *dchild;
-        struct ldlm_reply *rep;
-        struct mds_body *body;
-        int rc;
-        struct list_head *t;
-        int put_child = 1;
-        ENTRY;
-
-        LASSERT(offset == DLM_INTENT_REC_OFF); /* only called via intent */
-        rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, sizeof(*rep));
-        body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF, sizeof(*body));
-
-        /* copy rc, transno and disp; steal locks */
-        mds_req_from_mcd(req, mcd);
-        intent_set_disposition(rep, le32_to_cpu(mcd->mcd_last_data));
-
-        /* Only replay if create or open actually happened. */
-        if (!intent_disposition(rep, DISP_OPEN_CREATE | DISP_OPEN_OPEN) ) {
-                EXIT;
-                return; /* error looking up parent or child */
-        }
-
-        parent = mds_fid2dentry(mds, rec->ur_fid1, NULL);
-        LASSERT(!IS_ERR(parent));
-
-        dchild = ll_lookup_one_len(rec->ur_name, parent, rec->ur_namelen - 1);
-        LASSERT(!IS_ERR(dchild));
-
-        if (!dchild->d_inode)
-                GOTO(out_dput, 0); /* child not present to open */
-
-        /* At this point, we know we have a child. We'll send
-         * it back _unless_ it not created and open failed.
-         */
-        if (intent_disposition(rep, DISP_OPEN_OPEN) &&
-            !intent_disposition(rep, DISP_OPEN_CREATE) &&
-            req->rq_status) {
-                GOTO(out_dput, 0);
-        }
-
-        mds_pack_inode2fid(&body->fid1, dchild->d_inode);
-        mds_pack_inode2body(body, dchild->d_inode);
-        if (S_ISREG(dchild->d_inode->i_mode)) {
-                rc = mds_pack_md(obd, req->rq_repmsg, DLM_REPLY_REC_OFF + 1,
-                                 body, dchild->d_inode, 1, 0);
-
-                if (rc)
-                        LASSERT(rc == req->rq_status);
-
-                /* If we have LOV EA data, the OST holds size, mtime */
-                if (!(body->valid & OBD_MD_FLEASIZE))
-                        body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                        OBD_MD_FLATIME | OBD_MD_FLMTIME);
-        }
-
-        if (!(rec->ur_flags & MDS_OPEN_JOIN_FILE))
-                lustre_shrink_reply(req, DLM_REPLY_REC_OFF + 1,
-                                    body->eadatasize, 0);
-
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_ACL &&
-            !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) {
-                int acl_off = DLM_REPLY_REC_OFF + (body->eadatasize ? 2 : 1);
-
-                rc = mds_pack_acl(med, dchild->d_inode, req->rq_repmsg,
-                                  body, acl_off);
-                lustre_shrink_reply(req, acl_off, body->aclsize, 0);
-                if (!req->rq_status && rc)
-                        req->rq_status = rc;
-        }
-
-        /* If we have -EEXIST as the status, and we were asked to create
-         * exclusively, we can tell we failed because the file already existed.
-         */
-        if (req->rq_status == -EEXIST &&
-            ((rec->ur_flags & (MDS_OPEN_CREAT | MDS_OPEN_EXCL)) ==
-             (MDS_OPEN_CREAT | MDS_OPEN_EXCL))) {
-                GOTO(out_dput, 0);
-        }
-
-        /* If we didn't get as far as trying to open, then some locking thing
-         * probably went wrong, and we'll just bail here.
-         */
-        if (!intent_disposition(rep, DISP_OPEN_OPEN))
-                GOTO(out_dput, 0);
-
-        /* If we failed, then we must have failed opening, so don't look for
-         * file descriptor or anything, just give the client the bad news.
-         */
-        if (req->rq_status)
-                GOTO(out_dput, 0);
-
-        mfd = NULL;
-        spin_lock(&med->med_open_lock);
-        list_for_each(t, &med->med_open_head) {
-                mfd = list_entry(t, struct mds_file_data, mfd_list);
-                if (mfd->mfd_xid == req->rq_xid) {
-                        mds_mfd_addref(mfd);
-                        break;
-                }
-                mfd = NULL;
-        }
-        spin_unlock(&med->med_open_lock);
-
-        /* #warning "XXX fixme" bug 2991 */
-        /* Here it used to LASSERT(mfd) if exp_outstanding_reply != NULL.
-         * Now that exp_outstanding_reply is a list, it's just using mfd != NULL
-         * to detect a re-open */
-        if (mfd == NULL) {
-                if (rec->ur_flags & MDS_OPEN_JOIN_FILE) {
-                        rc = mds_join_file(rec, req, dchild, NULL);
-                        if (rc)
-                                GOTO(out_dput, rc);
-                }
-                mntget(mds->mds_vfsmnt);
-                CERROR("Re-opened file \n");
-                mfd = mds_dentry_open(dchild, mds->mds_vfsmnt,
-                                      rec->ur_flags & ~MDS_OPEN_TRUNC, req);
-                if (!mfd) {
-                        CERROR("mds: out of memory\n");
-                        GOTO(out_dput, req->rq_status = -ENOMEM);
-                }
-                put_child = 0;
-        } else {
-                body->handle.cookie = mfd->mfd_handle.h_cookie;
-                CDEBUG(D_INODE, "resend mfd %p, cookie "LPX64"\n", mfd,
-                       mfd->mfd_handle.h_cookie);
-        }
-
-        mds_mfd_put(mfd);
-
- out_dput:
-        if (put_child)
-                l_dput(dchild);
-        l_dput(parent);
-        EXIT;
-}
-
-/* do NOT or the MAY_*'s, you'll get the weakest */
-static int accmode(struct inode *inode, int flags)
-{
-        int res = 0;
-
-        /* Sadly, NFSD reopens a file repeatedly during operation, so the
-         * "acc_mode = 0" allowance for newly-created files isn't honoured.
-         * NFSD uses the MDS_OPEN_OWNEROVERRIDE flag to say that a file
-         * owner can write to a file even if it is marked readonly to hide
-         * its brokenness. (bug 5781) */
-        if (flags & MDS_OPEN_OWNEROVERRIDE && inode->i_uid == current->fsuid)
-                return 0;
-
-        if (flags & FMODE_READ)
-                res = MAY_READ;
-        if (flags & (FMODE_WRITE|MDS_OPEN_TRUNC))
-                res |= MAY_WRITE;
-        if (flags & MDS_FMODE_EXEC)
-                res = MAY_EXEC;
-        return res;
-}
-
-/* Handles object creation, actual opening, and I/O epoch */
-static int mds_finish_open(struct ptlrpc_request *req, struct dentry *dchild,
-                           struct mds_body *body, int flags, void **handle,
-                           struct mds_update_record *rec,struct ldlm_reply *rep,
-                           struct lustre_handle *lockh)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_file_data *mfd = NULL;
-        struct lov_mds_md *lmm = NULL; /* object IDs created */
-        int rc = 0;
-        ENTRY;
-
-        /* atomically create objects if necessary */
-        LOCK_INODE_MUTEX(dchild->d_inode);
-
-        if (S_ISREG(dchild->d_inode->i_mode) &&
-            !(body->valid & OBD_MD_FLEASIZE)) {
-                rc = mds_pack_md(obd, req->rq_repmsg, DLM_REPLY_REC_OFF + 1,
-                                 body, dchild->d_inode, 0, 0);
-                if (rc) {
-                        UNLOCK_INODE_MUTEX(dchild->d_inode);
-                        RETURN(rc);
-                }
-        }
-        if (rec != NULL) {
-                if ((body->valid & OBD_MD_FLEASIZE) &&
-                    (rec->ur_flags & MDS_OPEN_HAS_EA)) {
-                        UNLOCK_INODE_MUTEX(dchild->d_inode);
-                        RETURN(-EEXIST);
-                }
-                if (rec->ur_flags & MDS_OPEN_JOIN_FILE) {
-                        UNLOCK_INODE_MUTEX(dchild->d_inode);
-                        rc = mds_join_file(rec, req, dchild, lockh);
-                        if (rc)
-                                RETURN(rc);
-                        LOCK_INODE_MUTEX(dchild->d_inode);
-                }
-                if (!(body->valid & OBD_MD_FLEASIZE) &&
-                    !(body->valid & OBD_MD_FLMODEASIZE)) {
-                        /* no EA: create objects */
-                        rc = mds_create_objects(req, DLM_REPLY_REC_OFF + 1, rec,
-                                                mds, obd, dchild, handle, &lmm);
-                        if (rc) {
-                                CERROR("mds_create_objects: rc = %d\n", rc);
-                                UNLOCK_INODE_MUTEX(dchild->d_inode);
-                                RETURN(rc);
-                        }
-                }
-        }
-        /* If the inode has no EA data, then MDS holds size, mtime */
-        if (S_ISREG(dchild->d_inode->i_mode) &&
-            !(body->valid & OBD_MD_FLEASIZE)) {
-                body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                OBD_MD_FLATIME | OBD_MD_FLMTIME);
-        }
-        UNLOCK_INODE_MUTEX(dchild->d_inode);
-
-        if (rec && !(rec->ur_flags & MDS_OPEN_JOIN_FILE))
-                lustre_shrink_reply(req, DLM_REPLY_REC_OFF + 1,
-                                    body->eadatasize, 0);
-
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_ACL &&
-            rec && !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) {
-                int acl_off = DLM_REPLY_REC_OFF + (body->eadatasize ? 2 : 1);
-
-                rc = mds_pack_acl(&req->rq_export->exp_mds_data,
-                                  dchild->d_inode, req->rq_repmsg,
-                                  body, acl_off);
-                lustre_shrink_reply(req, acl_off, body->aclsize, 0);
-                if (rc)
-                        RETURN(rc);
-        }
-
-        intent_set_disposition(rep, DISP_OPEN_OPEN);
-        mfd = mds_dentry_open(dchild, mds->mds_vfsmnt, flags, req);
-        if (IS_ERR(mfd))
-                RETURN(PTR_ERR(mfd));
-
-        CDEBUG(D_INODE, "mfd %p, cookie "LPX64"\n", mfd,
-               mfd->mfd_handle.h_cookie);
-
-        mds_lov_update_objids(obd, lmm);
-
-        if (rc) /* coverity[deadcode] */
-                mds_mfd_unlink(mfd, 1);
-
-        mds_mfd_put(mfd);
-        RETURN(rc);
-}
-
-static int mds_open_by_fid(struct ptlrpc_request *req, struct ll_fid *fid,
-                           struct mds_body *body, int flags,
-                           struct mds_update_record *rec,struct ldlm_reply *rep)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct dentry *dchild;
-        char fidname[LL_FID_NAMELEN];
-        int fidlen = 0, rc;
-        void *handle = NULL;
-        ENTRY;
-
-        fidlen = ll_fid2str(fidname, fid->id, fid->generation);
-        dchild = ll_lookup_one_len(fidname, mds->mds_pending_dir, fidlen);
-        if (IS_ERR(dchild)) {
-                rc = PTR_ERR(dchild);
-                CERROR("error looking up %s in PENDING: rc = %d\n",fidname, rc);
-                RETURN(rc);
-        }
-
-        if (dchild->d_inode != NULL) {
-                mds_inode_set_orphan(dchild->d_inode);
-                CWARN("Orphan %s found and opened in PENDING directory\n",
-                       fidname);
-        } else {
-                l_dput(dchild);
-
-                /* We didn't find it in PENDING so it isn't an orphan.  See
-                 * if it was a regular inode that was previously created. */
-                dchild = mds_fid2dentry(mds, fid, NULL);
-                if (IS_ERR(dchild))
-                        RETURN(PTR_ERR(dchild));
-        }
-
-        mds_pack_inode2fid(&body->fid1, dchild->d_inode);
-        mds_pack_inode2body(body, dchild->d_inode);
-        intent_set_disposition(rep, DISP_LOOKUP_EXECD);
-        intent_set_disposition(rep, DISP_LOOKUP_POS);
-
-        rc = mds_finish_open(req, dchild, body, flags, &handle, rec, rep, NULL);
-        rc = mds_finish_transno(mds, dchild->d_inode, handle,
-                                req, rc, rep ? rep->lock_policy_res1 : 0, 0);
-        /* XXX what do we do here if mds_finish_transno itself failed? */
-
-        l_dput(dchild);
-        RETURN(rc);
-}
-
-int mds_pin(struct ptlrpc_request *req, int offset)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_body *reqbody, *repbody;
-        struct lvfs_run_ctxt saved;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
-        ENTRY;
-
-        reqbody = lustre_msg_buf(req->rq_reqmsg, offset, sizeof(*reqbody));
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = mds_open_by_fid(req, &reqbody->fid1, repbody, reqbody->flags, NULL,
-                             NULL);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        RETURN(rc);
-}
-
-/*  Get an internal lock on the inode number (but not generation) to sync
- *  new inode creation with inode unlink (bug 2029).  If child_lockh is NULL
- *  we just get the lock as a barrier to wait for other holders of this lock,
- *  and drop it right away again. */
-int mds_lock_new_child(struct obd_device *obd, struct inode *inode,
-                       struct lustre_handle *child_lockh)
-{
-        struct ldlm_res_id child_res_id = { .name = { inode->i_ino, 0, 1, 0 } };
-        struct lustre_handle lockh;
-        int lock_flags = LDLM_FL_ATOMIC_CB;
-        int rc;
-
-        if (child_lockh == NULL)
-                child_lockh = &lockh;
-
-        rc = ldlm_cli_enqueue_local(obd->obd_namespace, &child_res_id,
-                                    LDLM_PLAIN, NULL, LCK_EX, &lock_flags,
-                                    ldlm_blocking_ast, ldlm_completion_ast,
-                                    NULL, NULL, 0, NULL, child_lockh);
-        if (rc != ELDLM_OK)
-                CERROR("ldlm_cli_enqueue_local: %d\n", rc);
-        else if (child_lockh == &lockh)
-                ldlm_lock_decref(child_lockh, LCK_EX);
-
-        RETURN(rc);
-}
-
-int mds_open(struct mds_update_record *rec, int offset,
-             struct ptlrpc_request *req, struct lustre_handle *child_lockh)
-{
-        /* XXX ALLOCATE _something_ - 464 bytes on stack here */
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct ldlm_reply *rep = NULL;
-        struct mds_body *body = NULL;
-        struct dentry *dchild = NULL, *dparent = NULL;
-        struct mds_export_data *med;
-        struct lustre_handle parent_lockh;
-        int rc = 0, cleanup_phase = 0, acc_mode, created = 0;
-        int parent_mode = LCK_CR;
-        void *handle = NULL;
-        struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT;
-        unsigned int qcids[MAXQUOTAS] = { current->fsuid, current->fsgid };
-        unsigned int qpids[MAXQUOTAS] = { 0, 0 };
-        int child_mode = LCK_CR;
-        /* Always returning LOOKUP lock if open succesful to guard
-           dentry on client. */
-        ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_LOOKUP}};
-        struct ldlm_res_id child_res_id = { .name = {0}};
-        int lock_flags = 0;
-        int rec_pending = 0;
-        unsigned int gid = current->fsgid;
-        ENTRY;
-
-        mds_counter_incr(req->rq_export, LPROC_MDS_OPEN);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_PAUSE_OPEN | OBD_FAIL_ONCE,
-                         (obd_timeout + 1) / 4);
-
-        CLASSERT(MAXQUOTAS < 4);
-        if (offset == DLM_INTENT_REC_OFF) { /* intent */
-                rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF,
-                                     sizeof(*rep));
-                body = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF,
-                                      sizeof(*body));
-        } else if (offset == REQ_REC_OFF) { /* non-intent reint */
-                body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*body));
-                LBUG(); /* XXX: not supported yet? */
-        } else {
-                body = NULL;
-                LBUG();
-        }
-
-        MDS_CHECK_RESENT(req, reconstruct_open(rec, offset, req, child_lockh));
-
-        /* Step 0: If we are passed a fid, then we assume the client already
-         * opened this file and is only replaying the RPC, so we open the
-         * inode by fid (at some large expense in security). */
-        /*XXX liblustre use mds_open_by_fid to implement LL_IOC_LOV_SETSTRIPE */
-        if (((lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) ||
-             (req->rq_export->exp_libclient && rec->ur_flags&MDS_OPEN_HAS_EA))&&
-            !(rec->ur_flags & MDS_OPEN_JOIN_FILE)) {
-                if (rec->ur_fid2->id == 0) {
-                        struct ldlm_lock *lock = ldlm_handle2lock(child_lockh);
-                        if (lock) {
-                                LDLM_ERROR(lock, "fid2 not set on open replay");
-                                LDLM_LOCK_PUT(lock);
-                        }
-                        DEBUG_REQ(D_ERROR, req, "fid2 not set on open replay");
-                        RETURN(-EFAULT);
-                }
-
-                rc = mds_open_by_fid(req, rec->ur_fid2, body, rec->ur_flags,
-                                     rec, rep);
-                if (rc != -ENOENT) {
-                        if (req->rq_export->exp_libclient &&
-                            rec->ur_flags & MDS_OPEN_HAS_EA)
-                                RETURN(0);
-
-                        RETURN(rc);
-                }
-
-                /* We didn't find the correct inode on disk either, so we
-                 * need to re-create it via a regular replay. */
-                if (!(rec->ur_flags & MDS_OPEN_CREAT)) {
-                        DEBUG_REQ(D_ERROR, req,"OPEN_CREAT not in open replay");
-                        RETURN(-EFAULT);
-                }
-        } else if (rec->ur_fid2->id) {
-                DEBUG_REQ(D_ERROR, req, "fid2 "LPU64"/%u on open non-replay",
-                          rec->ur_fid2->id, rec->ur_fid2->generation);
-                RETURN(-EFAULT);
-        }
-
-        /* If we got here, we must be called via intent */
-        LASSERT(offset == DLM_INTENT_REC_OFF);
-
-        med = &req->rq_export->exp_mds_data;
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OPEN_PACK)) {
-                CERROR("test case OBD_FAIL_MDS_OPEN_PACK\n");
-                RETURN(-ENOMEM);
-        }
-
-        /* Step 1: Find and lock the parent */
-        if (rec->ur_flags & (MDS_OPEN_CREAT | MDS_OPEN_JOIN_FILE))
-                parent_mode = LCK_EX;
-        dparent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, parent_mode,
-                                        &parent_lockh, rec->ur_name,
-                                        rec->ur_namelen - 1,
-                                        MDS_INODELOCK_UPDATE);
-        if (IS_ERR(dparent)) {
-                rc = PTR_ERR(dparent);
-                if (rc != -ENOENT) {
-                        CERROR("parent "LPU64"/%u lookup error %d\n",
-                               rec->ur_fid1->id, rec->ur_fid1->generation, rc);
-                } else {
-                        /* Just cannot find parent - make it look like
-                         * usual negative lookup to avoid extra MDS RPC */
-                        intent_set_disposition(rep, DISP_LOOKUP_EXECD);
-                        intent_set_disposition(rep, DISP_LOOKUP_NEG);
-                }
-                GOTO(cleanup, rc);
-        }
-        LASSERT(dparent->d_inode != NULL);
-
-        cleanup_phase = 1; /* parent dentry and lock */
-
-        if (rec->ur_flags & MDS_OPEN_JOIN_FILE) {
-                dchild = dget(dparent);
-                cleanup_phase = 2; /* child dentry */
-                acc_mode = accmode(dchild->d_inode, rec->ur_flags);
-                GOTO(found_child, rc);
-        }
-
-        /* Step 2: Lookup the child */
-      
-        if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) &&
-            (rec->ur_flags & MDS_OPEN_LOCK) && (rec->ur_namelen == 1)) {
-                /* hack for nfsd with no_subtree_check, it will use anon
-                 * dentry w/o filename to open the file. the anon dentry's
-                 * parent was set to itself, so rec->ur_fid1 is the file.
-                 * And in MDC it cannot derive the dentry's parent dentry,
-                 * hence the file's name, so we hack here in MDS, 
-                 * refer to bug 13030. */
-                dchild = mds_fid2dentry(mds, rec->ur_fid1, NULL);
-        } else {
-                dchild = ll_lookup_one_len(rec->ur_name, dparent,
-                                           rec->ur_namelen - 1);
-        }
-        if (IS_ERR(dchild)) {
-                rc = PTR_ERR(dchild);
-                dchild = NULL; /* don't confuse mds_finish_transno() below */
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 2; /* child dentry */
-
-        intent_set_disposition(rep, DISP_LOOKUP_EXECD);
-        if (dchild->d_inode)
-                intent_set_disposition(rep, DISP_LOOKUP_POS);
-        else
-                intent_set_disposition(rep, DISP_LOOKUP_NEG);
-
-        /*Step 3: If the child was negative, and we're supposed to, create it.*/
-        if (dchild->d_inode == NULL) {
-                unsigned long ino = rec->ur_fid2->id;
-                struct iattr iattr;
-                struct inode *inode;
-
-                if (!(rec->ur_flags & MDS_OPEN_CREAT)) {
-                        /* It's negative and we weren't supposed to create it */
-                        GOTO(cleanup, rc = -ENOENT);
-                }
-
-                if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)
-                        GOTO(cleanup, rc = -EROFS);
-
-                if (dparent->d_inode->i_mode & S_ISGID)
-                        gid = dparent->d_inode->i_gid;
-                else
-                        gid = current->fsgid;
-
-                /* we try to get enough quota to write here, and let ldiskfs
-                 * decide if it is out of quota or not b=14783 */
-                lquota_chkquota(mds_quota_interface_ref, obd,
-                                current->fsuid, gid, 1, &rec_pending);
-
-                intent_set_disposition(rep, DISP_OPEN_CREATE);
-                handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_CREATE,
-                                      NULL);
-                if (IS_ERR(handle)) {
-                        rc = PTR_ERR(handle);
-                        handle = NULL;
-                        GOTO(cleanup, rc);
-                }
-                dchild->d_fsdata = (void *) &dp;
-                dp.ldp_ptr = req;
-                dp.ldp_inum = ino;
-
-                rc = ll_vfs_create(dparent->d_inode, dchild, rec->ur_mode,NULL);
-                if (dchild->d_fsdata == (void *)(unsigned long)ino)
-                        dchild->d_fsdata = NULL;
-
-                if (rc) {
-                        CDEBUG(D_INODE, "error during create: %d\n", rc);
-                        GOTO(cleanup, rc);
-                }
-                inode = dchild->d_inode;
-                if (ino) {
-                        LASSERT(ino == inode->i_ino);
-                        /* Written as part of setattr */
-                        inode->i_generation = rec->ur_fid2->generation;
-                        CDEBUG(D_HA, "recreated ino %lu with gen %u\n",
-                               inode->i_ino, inode->i_generation);
-                }
-
-                created = 1;
-                LTIME_S(iattr.ia_atime) = rec->ur_time;
-                LTIME_S(iattr.ia_ctime) = rec->ur_time;
-                LTIME_S(iattr.ia_mtime) = rec->ur_time;
-
-                iattr.ia_uid = current->fsuid;  /* set by push_ctxt already */
-                iattr.ia_gid = gid;
-
-                iattr.ia_valid = ATTR_UID | ATTR_GID | ATTR_ATIME |
-                        ATTR_MTIME | ATTR_CTIME;
-
-                rc = fsfilt_setattr(obd, dchild, handle, &iattr, 0);
-                if (rc)
-                        CERROR("error on child setattr: rc = %d\n", rc);
-
-                iattr.ia_valid = ATTR_MTIME | ATTR_CTIME;
-
-                rc = fsfilt_setattr(obd, dparent, handle, &iattr, 0);
-                if (rc)
-                        CERROR("error on parent setattr: rc = %d\n", rc);
-
-                rc = fsfilt_commit(obd, dchild->d_inode, handle, 0);
-                handle = NULL;
-                acc_mode = 0;           /* Don't check for permissions */
-        } else {
-                acc_mode = accmode(dchild->d_inode, rec->ur_flags);
-        }
-
-        LASSERTF(!mds_inode_is_orphan(dchild->d_inode),
-                 "dchild %.*s (%p) inode %p/%lu/%u\n", dchild->d_name.len,
-                 dchild->d_name.name, dchild, dchild->d_inode,
-                 dchild->d_inode->i_ino, dchild->d_inode->i_generation);
-
-found_child:
-        mds_pack_inode2fid(&body->fid1, dchild->d_inode);
-        mds_pack_inode2body(body, dchild->d_inode);
-
-        if (S_ISREG(dchild->d_inode->i_mode)) {
-                /* Check permissions etc */
-                rc = ll_permission(dchild->d_inode, acc_mode, NULL);
-                if (rc != 0)
-                        GOTO(cleanup, rc);
-
-                if ((req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) &&
-                    (acc_mode & MAY_WRITE))
-                        GOTO(cleanup, rc = -EROFS);
-
-                /* An append-only file must be opened in append mode for
-                 * writing */
-                if (IS_APPEND(dchild->d_inode) && (acc_mode & MAY_WRITE) != 0 &&
-                    ((rec->ur_flags & MDS_OPEN_APPEND) == 0 ||
-                     (rec->ur_flags & MDS_OPEN_TRUNC) != 0))
-                        GOTO(cleanup, rc = -EPERM);
-        }
-
-        if (!created && (rec->ur_flags & MDS_OPEN_CREAT) &&
-            (rec->ur_flags & MDS_OPEN_EXCL)) {
-                /* File already exists, we didn't just create it, and we
-                 * were passed O_EXCL; err-or. */
-                GOTO(cleanup, rc = -EEXIST); // returns a lock to the client
-        }
-
-        /* if we are following a symlink, don't open */
-        if (S_ISLNK(dchild->d_inode->i_mode))
-                GOTO(cleanup_no_trans, rc = 0);
-
-        if (S_ISDIR(dchild->d_inode->i_mode)) {
-                if (rec->ur_flags & MDS_OPEN_CREAT ||
-                    rec->ur_flags & FMODE_WRITE) {
-                        /* we are trying to create or write a exist dir */
-                        GOTO(cleanup, rc = -EISDIR);
-                }
-                if (rec->ur_flags & MDS_FMODE_EXEC) {
-                        /* we are trying to exec a directory */
-                        GOTO(cleanup, rc = -EACCES);
-                }
-                if (ll_permission(dchild->d_inode, acc_mode, NULL)) {
-                        intent_set_disposition(rep, DISP_OPEN_OPEN);
-                        GOTO(cleanup, rc = -EACCES);
-                }
-        } else if (rec->ur_flags & MDS_OPEN_DIRECTORY) {
-                GOTO(cleanup, rc = -ENOTDIR);
-        }
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OPEN_CREATE)) {
-                obd_fail_loc = OBD_FAIL_LDLM_REPLY | OBD_FAIL_ONCE;
-                GOTO(cleanup, rc = -EAGAIN);
-        }
-
-        /* Obtain OPEN lock as well */
-        policy.l_inodebits.bits |= MDS_INODELOCK_OPEN;
-
-        /* We cannot use acc_mode here, because it is zeroed in case of
-           creating a file, so we get wrong lockmode */
-        if (rec->ur_flags & FMODE_WRITE)
-                child_mode = LCK_CW;
-        else if (rec->ur_flags & MDS_FMODE_EXEC)
-                child_mode = LCK_PR;
-        else
-                child_mode = LCK_CR;
-
-        if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) && 
-             (rec->ur_flags & MDS_OPEN_LOCK)) {
-                /* In case of replay we do not get a lock assuming that the
-                   caller has it already */
-                child_res_id.name[0] = dchild->d_inode->i_ino;
-                child_res_id.name[1] = dchild->d_inode->i_generation;
-
-                rc = ldlm_cli_enqueue_local(obd->obd_namespace, &child_res_id,
-                                            LDLM_IBITS, &policy, child_mode, 
-                                            &lock_flags, ldlm_blocking_ast, 
-                                            ldlm_completion_ast, NULL, NULL,
-                                            0, NULL, child_lockh);
-                if (rc != ELDLM_OK)
-                        GOTO(cleanup, rc);
-
-                /* Let mds_intent_policy know that we have a lock to return */
-                intent_set_disposition(rep, DISP_OPEN_LOCK);
-                cleanup_phase = 3;
-        }
-
-        if (!S_ISREG(dchild->d_inode->i_mode) &&
-            !S_ISDIR(dchild->d_inode->i_mode) &&
-            (req->rq_export->exp_connect_flags & OBD_CONNECT_NODEVOH)) {
-                /* If client supports this, do not return open handle for
-                 * special device nodes */
-                GOTO(cleanup_no_trans, rc = 0);
-        }
-
-        /* Step 5: mds_open it */
-        rc = mds_finish_open(req, dchild, body, rec->ur_flags, &handle, rec,
-                             rep, &parent_lockh);
-        GOTO(cleanup, rc);
-
- cleanup:
-        rc = mds_finish_transno(mds, dchild ? dchild->d_inode : NULL, handle,
-                                req, rc, rep ? rep->lock_policy_res1 : 0, 0);
-
- cleanup_no_trans:
-        if (rec_pending)
-                lquota_pending_commit(mds_quota_interface_ref, obd,
-                                      current->fsuid, gid, 1);
-        switch (cleanup_phase) {
-        case 3:
-                if (rc)
-                        /* It is safe to leave IT_OPEN_LOCK set, if rc is not 0,
-                         * mds_intent_policy won't try to return any locks */
-                        ldlm_lock_decref(child_lockh, child_mode);
-        case 2:
-                if (rc && created) {
-                        int err = vfs_unlink(dparent->d_inode, dchild);
-                        if (err) {
-                                CERROR("unlink(%.*s) in error path: %d\n",
-                                       dchild->d_name.len, dchild->d_name.name,
-                                       err);
-                        }
-                } else if (created) {
-                        mds_lock_new_child(obd, dchild->d_inode, NULL);
-                        /* save uid/gid for quota acquire/release */
-                        qpids[USRQUOTA] = dparent->d_inode->i_uid;
-                        qpids[GRPQUOTA] = dparent->d_inode->i_gid;
-                }
-                l_dput(dchild);
-        case 1:
-                if (dparent == NULL)
-                        break;
-
-                l_dput(dparent);
-                if (rc)
-                        ldlm_lock_decref(&parent_lockh, parent_mode);
-                else
-                        ptlrpc_save_lock(req, &parent_lockh, parent_mode);
-        }
-        /* trigger dqacq on the owner of child and parent */
-        lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc,
-                      FSFILT_OP_CREATE);
-        RETURN(rc);
-}
-
-/* Close a "file descriptor" and possibly unlink an orphan from the
- * PENDING directory.  Caller must hold child->i_mutex, this drops it.
- *
- * If we are being called from mds_disconnect() because the client has
- * disappeared, then req == NULL and we do not update last_rcvd because
- * there is nothing that could be recovered by the client at this stage
- * (it will not even _have_ an entry in last_rcvd anymore).
- *
- * Returns EAGAIN if the client needs to get more data and re-close. */
-int mds_mfd_close(struct ptlrpc_request *req, int offset,
-                  struct obd_device *obd, struct mds_file_data *mfd,
-                  int unlink_orphan, struct lov_mds_md *lmm, int lmm_size,
-                  struct llog_cookie *logcookies, int cookies_size,
-                  __u64 *valid)
-{
-        struct inode *inode = mfd->mfd_dentry->d_inode;
-        char fidname[LL_FID_NAMELEN];
-        int last_orphan, fidlen, rc = 0, cleanup_phase = 0;
-        struct dentry *pending_child = NULL;
-        struct mds_obd *mds = &obd->u.mds;
-        struct inode *pending_dir = mds->mds_pending_dir->d_inode;
-        void *handle = NULL;
-        struct mds_body *request_body = NULL, *reply_body = NULL;
-        struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT;
-        struct iattr iattr = { 0 };
-        ENTRY;
-
-        if (req && req->rq_reqmsg != NULL)
-                request_body = lustre_msg_buf(req->rq_reqmsg, offset,
-                                              sizeof(*request_body));
-        if (req && req->rq_repmsg != NULL)
-                reply_body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                            sizeof(*reply_body));
-
-        fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation);
-
-        CDEBUG(D_INODE, "inode %p ino %s nlink %d orphan %d\n", inode, fidname,
-               inode->i_nlink, mds_orphan_open_count(inode));
-
-        last_orphan = mds_orphan_open_dec_test(inode) &&
-                mds_inode_is_orphan(inode);
-        MDS_UP_WRITE_ORPHAN_SEM(inode);
-
-        /* this is half of the actual "close" */
-        if (mfd->mfd_mode & FMODE_WRITE) {
-                rc = mds_put_write_access(mds, inode, request_body,
-                                          last_orphan && unlink_orphan);
-        } else if (mfd->mfd_mode & MDS_FMODE_EXEC) {
-                mds_allow_write_access(inode);
-        }
-
-        if (last_orphan && unlink_orphan) {
-                int stripe_count = 0;
-                LASSERT(rc == 0); /* mds_put_write_access must have succeeded */
-
-                CDEBUG(D_INODE, "destroying orphan object %s\n", fidname);
-
-                if ((S_ISREG(inode->i_mode) && inode->i_nlink != 1) ||
-                    (S_ISDIR(inode->i_mode) && inode->i_nlink != 2))
-                        CERROR("found \"orphan\" %s %s with link count %d\n",
-                               S_ISREG(inode->i_mode) ? "file" : "dir",
-                               fidname, inode->i_nlink);
-
-                /* Sadly, there is no easy way to save pending_child from
-                 * mds_reint_unlink() into mfd, so we need to re-lookup,
-                 * but normally it will still be in the dcache. */
-                LOCK_INODE_MUTEX(pending_dir);
-                cleanup_phase = 1; /* UNLOCK_INODE_MUTEX(pending_dir) when finished */
-                pending_child = lookup_one_len(fidname, mds->mds_pending_dir,
-                                               fidlen);
-                if (IS_ERR(pending_child))
-                        GOTO(cleanup, rc = PTR_ERR(pending_child));
-                LASSERT(pending_child->d_inode != NULL);
-
-                cleanup_phase = 2; /* dput(pending_child) when finished */
-                if (S_ISDIR(pending_child->d_inode->i_mode)) {
-                        rc = vfs_rmdir(pending_dir, pending_child);
-                        if (rc)
-                                CERROR("error unlinking orphan dir %s: rc %d\n",
-                                       fidname,rc);
-                        goto out;
-                }
-
-                if (lmm != NULL) {
-                        stripe_count = le32_to_cpu(lmm->lmm_stripe_count);
-                }
-
-                handle = fsfilt_start_log(obd, pending_dir, FSFILT_OP_UNLINK,
-                                          NULL, stripe_count);
-                if (IS_ERR(handle)) {
-                        rc = PTR_ERR(handle);
-                        handle = NULL;
-                        GOTO(cleanup, rc);
-                }
-                if (lmm != NULL && (*valid & OBD_MD_FLEASIZE) &&
-                    mds_log_op_unlink(obd, lmm, lmm_size,
-                                      logcookies, cookies_size) > 0) {
-                        *valid |= OBD_MD_FLCOOKIE;
-                }
-
-                dp.ldp_inum = 0;
-                dp.ldp_ptr = req;
-                pending_child->d_fsdata = (void *) &dp;
-                rc = vfs_unlink(pending_dir, pending_child);
-                if (rc)
-                        CERROR("error unlinking orphan %s: rc %d\n",fidname,rc);
-
-                goto out; /* Don't bother updating attrs on unlinked inode */
-        }
-
-#if 0
-        if (request_body != NULL && mfd->mfd_mode & FMODE_WRITE && rc == 0) {
-                /* Update the on-disk attributes if this was the last write
-                 * close, and all information was provided (i.e., rc == 0)
-                 *
-                 * XXX this should probably be abstracted with mds_reint_setattr
-                 */
-
-                if (request_body->valid & OBD_MD_FLMTIME &&
-                    LTIME_S(iattr.ia_mtime) > LTIME_S(inode->i_mtime)) {
-                        LTIME_S(iattr.ia_mtime) = request_body->mtime;
-                        iattr.ia_valid |= ATTR_MTIME;
-                }
-                if (request_body->valid & OBD_MD_FLCTIME &&
-                    LTIME_S(iattr.ia_ctime) > LTIME_S(inode->i_ctime)) {
-                        LTIME_S(iattr.ia_ctime) = request_body->ctime;
-                        iattr.ia_valid |= ATTR_CTIME;
-                }
-
-                /* XXX can't set block count with fsfilt_setattr (!) */
-                if (request_body->valid & OBD_MD_FLSIZE) {
-                        iattr.ia_valid |= ATTR_SIZE;
-                        iattr.ia_size = request_body->size;
-                }
-                /* iattr.ia_blocks = request_body->blocks */
-
-        }
-#endif
-        if (request_body != NULL && request_body->valid & OBD_MD_FLATIME) {
-                /* Only start a transaction to write out only the atime if
-                 * it is more out-of-date than the specified limit.  If we
-                 * are already going to write out the atime then do it anyway.
-                 * */
-                LTIME_S(iattr.ia_atime) = request_body->atime;
-                if ((LTIME_S(iattr.ia_atime) >
-                     LTIME_S(inode->i_atime) + mds->mds_atime_diff) ||
-                    (iattr.ia_valid != 0 &&
-                     LTIME_S(iattr.ia_atime) > LTIME_S(inode->i_atime)))
-                        iattr.ia_valid |= ATTR_ATIME;
-        }
-
-        if (iattr.ia_valid != 0) {
-                handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL);
-                if (IS_ERR(handle)) {
-                        rc = PTR_ERR(handle);
-                        handle = NULL;
-                        GOTO(cleanup, rc);
-                }
-                rc = fsfilt_setattr(obd, mfd->mfd_dentry, handle, &iattr, 0);
-                if (rc)
-                        CERROR("error in setattr(%s): rc %d\n", fidname, rc);
-        }
-out:
-        /* If other clients have this file open for write, rc will be > 0 */
-        if (rc > 0)
-                rc = 0;
-        l_dput(mfd->mfd_dentry);
-        mds_mfd_put(mfd);
-
- cleanup:
-        if (req != NULL && reply_body != NULL) {
-                rc = mds_finish_transno(mds, pending_dir, handle, req, rc, 0, 0);
-        } else if (handle) {
-                int err = fsfilt_commit(obd, pending_dir, handle, 0);
-                if (err) {
-                        CERROR("error committing close: %d\n", err);
-                        if (!rc)
-                                rc = err;
-                }
-        }
-
-        switch (cleanup_phase) {
-        case 2:
-                dput(pending_child);
-        case 1:
-                UNLOCK_INODE_MUTEX(pending_dir);
-        }
-        RETURN(rc);
-}
-
-int mds_close(struct ptlrpc_request *req, int offset)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_body *body;
-        struct mds_file_data *mfd;
-        struct lvfs_run_ctxt saved;
-        struct inode *inode;
-        int rc, repsize[4] = { sizeof(struct ptlrpc_body),
-                               sizeof(struct mds_body),
-                               obd->u.mds.mds_max_mdsize,
-                               obd->u.mds.mds_max_cookiesize };
-        struct mds_body *reply_body;
-        struct lov_mds_md *lmm;
-        int lmm_size;
-        struct llog_cookie *logcookies;
-        int cookies_size;
-        ENTRY;
-
-        rc = lustre_pack_reply(req, 4, repsize, NULL);
-        if (rc)
-                req->rq_status = rc;
-                /* continue on to drop local open even if we can't send reply */
-        else
-                MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
-
-        CDEBUG(D_INODE, "close req->rep_len %d mdsize %d cookiesize %d\n",
-               req->rq_replen,
-               obd->u.mds.mds_max_mdsize, obd->u.mds.mds_max_cookiesize);
-        mds_counter_incr(req->rq_export, LPROC_MDS_CLOSE);
-
-        body = lustre_swab_reqbuf(req, offset, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL) {
-                CERROR("Can't unpack body\n");
-                req->rq_status = -EFAULT;
-                RETURN(-EFAULT);
-        }
-
-        if (body->flags & MDS_BFLAG_UNCOMMITTED_WRITES)
-                /* do some stuff */ ;
-
-        spin_lock(&med->med_open_lock);
-        mfd = mds_handle2mfd(&body->handle);
-        if (mfd == NULL) {
-                spin_unlock(&med->med_open_lock);
-                DEBUG_REQ(D_ERROR, req, "no handle for file close ino "LPD64
-                          ": cookie "LPX64, body->fid1.id, body->handle.cookie);
-                req->rq_status = -ESTALE;
-                RETURN(-ESTALE);
-        }
-        /* Remove mfd handle so it can't be found again.  We consume mfd_list
-         * reference here, but still have mds_handle2mfd ref until mfd_close. */
-        mds_mfd_unlink(mfd, 1);
-        spin_unlock(&med->med_open_lock);
-
-        inode = mfd->mfd_dentry->d_inode;
-        /* child orphan sem protects orphan_dec_test && is_orphan race */
-        MDS_DOWN_WRITE_ORPHAN_SEM(inode); /* mds_mfd_close drops this */
-        if (mds_inode_is_orphan(inode) && mds_orphan_open_count(inode) == 1) {
-                body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                      sizeof(*body));
-                LASSERT(body != NULL);
-
-                mds_pack_inode2fid(&body->fid1, inode);
-                mds_pack_inode2body(body, inode);
-                mds_pack_md(obd, req->rq_repmsg, REPLY_REC_OFF + 1, body, inode,
-                            MDS_PACK_MD_LOCK, 0);
-        }
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        reply_body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*reply_body));
-        lmm = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, 0);
-        lmm_size = lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1),
-        logcookies = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 2, 0);
-        cookies_size = lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 2);
-        req->rq_status = mds_mfd_close(req, offset, obd, mfd, 1,
-                                       lmm, lmm_size, logcookies, cookies_size,
-                                       &reply_body->valid);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        mds_shrink_reply(obd, req, body, REPLY_REC_OFF + 1);
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_CLOSE_PACK)) {
-                CERROR("test case OBD_FAIL_MDS_CLOSE_PACK\n");
-                req->rq_status = -ENOMEM;
-                RETURN(-ENOMEM);
-        }
-
-        RETURN(rc);
-}
-
-int mds_done_writing(struct ptlrpc_request *req, int offset)
-{
-        struct mds_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body),
-                            sizeof(struct mds_body) };
-        ENTRY;
-
-        MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
-
-        body = lustre_swab_reqbuf(req, offset, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL) {
-                CERROR("Can't unpack body\n");
-                req->rq_status = -EFAULT;
-                RETURN(-EFAULT);
-        }
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                req->rq_status = rc;
-
-        RETURN(0);
-}
diff --git a/lustre/mds/mds_reint.c b/lustre/mds/mds_reint.c
deleted file mode 100644
index f366f1282d95c5569ee1c4cd9512b2148419335b..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_reint.c
+++ /dev/null
@@ -1,2417 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/mds/mds_reint.c
- *  Lustre Metadata Server (mds) reintegration routines
- *
- *  Copyright (C) 2002-2005 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/fs.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_fsfilt.h>
-#include <lustre_ucache.h>
-
-#include "mds_internal.h"
-
-void mds_commit_cb(struct obd_device *obd, __u64 transno, void *data,
-                   int error)
-{
-        obd_transno_commit_cb(obd, transno, error);
-}
-
-struct mds_logcancel_data {
-        struct lov_mds_md      *mlcd_lmm;
-        int                     mlcd_size;
-        int                     mlcd_cookielen;
-        int                     mlcd_eadatalen;
-        struct llog_cookie      mlcd_cookies[0];
-};
-
-
-static void mds_cancel_cookies_cb(struct obd_device *obd, __u64 transno,
-                                  void *cb_data, int error)
-{
-        struct mds_logcancel_data *mlcd = cb_data;
-        struct lov_stripe_md *lsm = NULL;
-        struct llog_ctxt *ctxt;
-        int rc;
-
-        obd_transno_commit_cb(obd, transno, error);
-
-        CDEBUG(D_RPCTRACE, "cancelling %d cookies\n",
-               (int)(mlcd->mlcd_cookielen / sizeof(*mlcd->mlcd_cookies)));
-
-        rc = obd_unpackmd(obd->u.mds.mds_osc_exp, &lsm, mlcd->mlcd_lmm,
-                          mlcd->mlcd_eadatalen);
-        if (rc < 0) {
-                CERROR("bad LSM cancelling %d log cookies: rc %d\n",
-                       (int)(mlcd->mlcd_cookielen/sizeof(*mlcd->mlcd_cookies)),
-                       rc);
-        } else {
-                ///* XXX 0 normally, SENDNOW for debug */);
-                rc = obd_checkmd(obd->u.mds.mds_osc_exp, obd->obd_self_export,
-                                 lsm);
-                if (rc)
-                        CERROR("Can not revalidate lsm %p \n", lsm);
-
-                ctxt = llog_get_context(obd,mlcd->mlcd_cookies[0].lgc_subsys+1);
-                rc = llog_cancel(ctxt, lsm, mlcd->mlcd_cookielen /
-                                                sizeof(*mlcd->mlcd_cookies),
-                                 mlcd->mlcd_cookies, OBD_LLOG_FL_SENDNOW);
-                llog_ctxt_put(ctxt);
-
-                if (rc)
-                        CERROR("error cancelling %d log cookies: rc %d\n",
-                               (int)(mlcd->mlcd_cookielen /
-                                     sizeof(*mlcd->mlcd_cookies)), rc);
-        }
-
-        OBD_FREE(mlcd, mlcd->mlcd_size);
-}
-
-/* Assumes caller has already pushed us into the kernel context. */
-int mds_finish_transno(struct mds_obd *mds, struct inode *inode, void *handle,
-                       struct ptlrpc_request *req, int rc, __u32 op_data, 
-                       int force_sync)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-        struct mds_client_data *mcd = med->med_mcd;
-        struct obd_device *obd = req->rq_export->exp_obd;
-        __u64 transno, prev_transno;
-        int err;
-        loff_t off;
-        int log_pri = D_RPCTRACE;
-        ENTRY;
-
-        if (IS_ERR(handle)) {
-                LASSERT(rc != 0);
-                RETURN(rc);
-        }
-
-        /* if the export has already been failed, we have no last_rcvd slot */
-        if (req->rq_export->exp_failed || obd->obd_fail) {
-                CWARN("commit transaction for disconnected client %s: rc %d\n",
-                      req->rq_export->exp_client_uuid.uuid, rc);
-                if (rc == 0)
-                        rc = -ENOTCONN;
-                if (handle)
-                        GOTO(commit, rc);
-                RETURN(rc);
-        }
-
-        if (handle == NULL) {
-                /* if we're starting our own xaction, use our own inode */
-                inode = mds->mds_rcvd_filp->f_dentry->d_inode;
-                handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL);
-                if (IS_ERR(handle)) {
-                        CERROR("fsfilt_start: %ld\n", PTR_ERR(handle));
-                        RETURN(PTR_ERR(handle));
-                }
-        }
-
-        off = med->med_lr_off;
-
-        transno = lustre_msg_get_transno(req->rq_reqmsg);
-        if (rc != 0) {
-                if (transno != 0) {
-                        CERROR("%s: replay %s transno "LPU64" failed: rc %d\n",
-                               obd->obd_name,
-                               libcfs_nid2str(req->rq_export->exp_connection->c_peer.nid),
-                               transno, rc);
-                        transno = 0;
-                }
-        } else if (transno == 0) {
-                spin_lock(&mds->mds_transno_lock);
-                transno = ++mds->mds_last_transno;
-                spin_unlock(&mds->mds_transno_lock);
-        } else {
-                spin_lock(&mds->mds_transno_lock);
-                if (transno > mds->mds_last_transno)
-                        mds->mds_last_transno = transno;
-                spin_unlock(&mds->mds_transno_lock);
-        }
-
-        req->rq_transno = transno;
-        lustre_msg_set_transno(req->rq_repmsg, transno);
-        if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE) {
-                prev_transno = le64_to_cpu(mcd->mcd_last_close_transno);
-                mcd->mcd_last_close_transno = cpu_to_le64(transno);
-                mcd->mcd_last_close_xid = cpu_to_le64(req->rq_xid);
-                mcd->mcd_last_close_result = cpu_to_le32(rc);
-                mcd->mcd_last_close_data = cpu_to_le32(op_data);
-        } else {
-                prev_transno = le64_to_cpu(mcd->mcd_last_transno);
-                if (((lustre_msg_get_flags(req->rq_reqmsg) &
-                      (MSG_RESENT | MSG_REPLAY)) == 0) ||
-                    (transno > prev_transno)) {
-                        mcd->mcd_last_transno = cpu_to_le64(transno);
-                        mcd->mcd_last_xid     = cpu_to_le64(req->rq_xid);
-                        mcd->mcd_last_result  = cpu_to_le32(rc);
-                        mcd->mcd_last_data    = cpu_to_le32(op_data);
-                }
-        }
-        /* update the server data to not lose the greatest transno. Bug 11125 */
-        if ((transno == 0) && (prev_transno == mds->mds_last_transno))
-                mds_update_server_data(obd, 0);
-
-        if (off <= 0) {
-                CERROR("client idx %d has offset %lld\n", med->med_lr_idx, off);
-                err = -EINVAL;
-        } else {
-                struct obd_export *exp = req->rq_export;
-
-                if (!force_sync)
-                        force_sync = fsfilt_add_journal_cb(exp->exp_obd,transno, 
-                                                          handle, mds_commit_cb,
-                                                          NULL);
-
-                err = fsfilt_write_record(obd, mds->mds_rcvd_filp, mcd,
-                                          sizeof(*mcd), &off, 
-                                          force_sync | exp->exp_need_sync);
-                if (force_sync)
-                        mds_commit_cb(obd, transno, NULL, err);
-        }
-
-        if (err) {
-                log_pri = D_ERROR;
-                if (rc == 0)
-                        rc = err;
-        }
-
-        DEBUG_REQ(log_pri, req,
-                  "wrote trans #"LPU64" rc %d client %s at idx %u: err = %d",
-                  transno, rc, mcd->mcd_uuid, med->med_lr_idx, err);
-
-        err = mds_lov_write_objids(obd);
-        if (err) {
-                log_pri = D_ERROR;
-                if (rc == 0)
-                        rc = err;
-        }
-        CDEBUG(log_pri, "wrote objids: err = %d\n", err);
-
-commit:
-        err = fsfilt_commit(obd, inode, handle, 0);
-        if (err) {
-                CERROR("error committing transaction: %d\n", err);
-                if (!rc)
-                        rc = err;
-        }
-
-        RETURN(rc);
-}
-
-/* this gives the same functionality as the code between
- * sys_chmod and inode_setattr
- * chown_common and inode_setattr
- * utimes and inode_setattr
- */
-int mds_fix_attr(struct inode *inode, struct mds_update_record *rec)
-{
-        time_t now = CURRENT_SECONDS;
-        struct iattr *attr = &rec->ur_iattr;
-        unsigned int ia_valid = attr->ia_valid;
-        int error;
-        ENTRY;
-
-        if (ia_valid & ATTR_RAW)
-                attr->ia_valid &= ~ATTR_RAW;
-
-        if (!(ia_valid & ATTR_CTIME_SET))
-                LTIME_S(attr->ia_ctime) = now;
-        else
-                attr->ia_valid &= ~ATTR_CTIME_SET;
-        if (!(ia_valid & ATTR_ATIME_SET))
-                LTIME_S(attr->ia_atime) = now;
-        if (!(ia_valid & ATTR_MTIME_SET))
-                LTIME_S(attr->ia_mtime) = now;
-
-        if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-                RETURN((attr->ia_valid & ~ATTR_ATTR_FLAG) ? -EPERM : 0);
-
-        /* times */
-        if ((ia_valid & (ATTR_MTIME|ATTR_ATIME)) == (ATTR_MTIME|ATTR_ATIME)) {
-                if (current->fsuid != inode->i_uid &&
-                    (error = ll_permission(inode, MAY_WRITE, NULL)) != 0)
-                        RETURN(error);
-        }
-
-        if (ia_valid & ATTR_SIZE &&
-            /* NFSD hack for open(O_CREAT|O_TRUNC)=mknod+truncate (bug 5781) */
-            !(rec->ur_uc.luc_fsuid == inode->i_uid &&
-              ia_valid & MDS_OPEN_OWNEROVERRIDE)) {
-                if ((error = ll_permission(inode, MAY_WRITE, NULL)) != 0)
-                        RETURN(error);
-        }
-
-        if (ia_valid & (ATTR_UID | ATTR_GID)) {
-                /* chown */
-                error = -EPERM;
-                if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
-                        RETURN(-EPERM);
-                if (attr->ia_uid == (uid_t) -1)
-                        attr->ia_uid = inode->i_uid;
-                if (attr->ia_gid == (gid_t) -1)
-                        attr->ia_gid = inode->i_gid;
-                if (!(ia_valid & ATTR_MODE))
-                        attr->ia_mode = inode->i_mode;
-                /*
-                 * If the user or group of a non-directory has been
-                 * changed by a non-root user, remove the setuid bit.
-                 * 19981026 David C Niemi <niemi@tux.org>
-                 *
-                 * Changed this to apply to all users, including root,
-                 * to avoid some races. This is the behavior we had in
-                 * 2.0. The check for non-root was definitely wrong
-                 * for 2.2 anyway, as it should have been using
-                 * CAP_FSETID rather than fsuid -- 19990830 SD.
-                 */
-                if ((inode->i_mode & S_ISUID) == S_ISUID &&
-                    !S_ISDIR(inode->i_mode)) {
-                        attr->ia_mode &= ~S_ISUID;
-                        attr->ia_valid |= ATTR_MODE;
-                }
-                /*
-                 * Likewise, if the user or group of a non-directory
-                 * has been changed by a non-root user, remove the
-                 * setgid bit UNLESS there is no group execute bit
-                 * (this would be a file marked for mandatory
-                 * locking).  19981026 David C Niemi <niemi@tux.org>
-                 *
-                 * Removed the fsuid check (see the comment above) --
-                 * 19990830 SD.
-                 */
-                if (((inode->i_mode & (S_ISGID | S_IXGRP)) ==
-                     (S_ISGID | S_IXGRP)) && !S_ISDIR(inode->i_mode)) {
-                        attr->ia_mode &= ~S_ISGID;
-                        attr->ia_valid |= ATTR_MODE;
-                }
-        } else if (ia_valid & ATTR_MODE) {
-                int mode = attr->ia_mode;
-                /* chmod */
-                if (attr->ia_mode == (umode_t)-1)
-                        mode = inode->i_mode;
-                attr->ia_mode =
-                        (mode & S_IALLUGO) | (inode->i_mode & ~S_IALLUGO);
-        }
-        RETURN(0);
-}
-
-void mds_steal_ack_locks(struct ptlrpc_request *req)
-{
-        struct obd_export         *exp = req->rq_export;
-        struct list_head          *tmp;
-        struct ptlrpc_reply_state *oldrep;
-        struct ptlrpc_service     *svc;
-        int                        i;
-
-        /* CAVEAT EMPTOR: spinlock order */
-        spin_lock(&exp->exp_lock);
-        list_for_each (tmp, &exp->exp_outstanding_replies) {
-                oldrep = list_entry(tmp, struct ptlrpc_reply_state,rs_exp_list);
-
-                if (oldrep->rs_xid != req->rq_xid)
-                        continue;
-
-                if (lustre_msg_get_opc(oldrep->rs_msg) !=
-                    lustre_msg_get_opc(req->rq_reqmsg))
-                        CERROR ("Resent req xid "LPX64" has mismatched opc: "
-                                "new %d old %d\n", req->rq_xid,
-                                lustre_msg_get_opc(req->rq_reqmsg),
-                                lustre_msg_get_opc(oldrep->rs_msg));
-
-                svc = oldrep->rs_service;
-                spin_lock (&svc->srv_lock);
-
-                list_del_init (&oldrep->rs_exp_list);
-
-                CWARN("Stealing %d locks from rs %p x"LPD64".t"LPD64
-                      " o%d NID %s\n",
-                      oldrep->rs_nlocks, oldrep,
-                      oldrep->rs_xid, oldrep->rs_transno,
-                      lustre_msg_get_opc(oldrep->rs_msg),
-                      libcfs_nid2str(exp->exp_connection->c_peer.nid));
-
-                for (i = 0; i < oldrep->rs_nlocks; i++)
-                        ptlrpc_save_lock(req,
-                                         &oldrep->rs_locks[i],
-                                         oldrep->rs_modes[i]);
-                oldrep->rs_nlocks = 0;
-
-                DEBUG_REQ(D_DLMTRACE, req, "stole locks for");
-                ptlrpc_schedule_difficult_reply (oldrep);
-
-                spin_unlock (&svc->srv_lock);
-                break;
-        }
-        spin_unlock(&exp->exp_lock);
-}
-
-void mds_req_from_mcd(struct ptlrpc_request *req, struct mds_client_data *mcd)
-{
-        if (lustre_msg_get_opc(req->rq_reqmsg) == MDS_CLOSE) {
-                req->rq_transno = le64_to_cpu(mcd->mcd_last_close_transno);
-                lustre_msg_set_transno(req->rq_repmsg, req->rq_transno);
-                req->rq_status = le32_to_cpu(mcd->mcd_last_close_result);
-                lustre_msg_set_status(req->rq_repmsg, req->rq_status);
-        } else {
-                req->rq_transno = le64_to_cpu(mcd->mcd_last_transno);
-                lustre_msg_set_transno(req->rq_repmsg, req->rq_transno);
-                req->rq_status = le32_to_cpu(mcd->mcd_last_result);
-                lustre_msg_set_status(req->rq_repmsg, req->rq_status);
-        }
-        DEBUG_REQ(D_RPCTRACE, req, "restoring transno "LPD64"/status %d",
-                  req->rq_transno, req->rq_status);
-
-        mds_steal_ack_locks(req);
-}
-
-static void reconstruct_reint_setattr(struct mds_update_record *rec,
-                                      int offset, struct ptlrpc_request *req)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-        struct mds_obd *obd = &req->rq_export->exp_obd->u.mds;
-        struct dentry *de;
-        struct mds_body *body;
-
-        mds_req_from_mcd(req, med->med_mcd);
-
-        de = mds_fid2dentry(obd, rec->ur_fid1, NULL);
-        if (IS_ERR(de)) {
-                LASSERT(PTR_ERR(de) == req->rq_status);
-                return;
-        }
-
-        body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body));
-        mds_pack_inode2fid(&body->fid1, de->d_inode);
-        mds_pack_inode2body(body, de->d_inode);
-
-        /* Don't return OST-specific attributes if we didn't just set them */
-        if (rec->ur_iattr.ia_valid & ATTR_SIZE)
-                body->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
-        if (rec->ur_iattr.ia_valid & (ATTR_MTIME | ATTR_MTIME_SET))
-                body->valid |= OBD_MD_FLMTIME;
-        if (rec->ur_iattr.ia_valid & (ATTR_ATIME | ATTR_ATIME_SET))
-                body->valid |= OBD_MD_FLATIME;
-
-        l_dput(de);
-}
-
-int mds_osc_setattr_async(struct obd_device *obd, struct inode *inode,
-                          struct lov_mds_md *lmm, int lmm_size,
-                          struct llog_cookie *logcookies, struct ll_fid *fid)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_trans_info oti = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        int rc;
-        ENTRY;
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OST_SETATTR))
-                RETURN(0);
-
-        /* first get memory EA */
-        OBDO_ALLOC(oinfo.oi_oa);
-        if (!oinfo.oi_oa)
-                RETURN(-ENOMEM);
-
-        LASSERT(lmm);
-
-        rc = obd_unpackmd(mds->mds_osc_exp, &oinfo.oi_md, lmm, lmm_size);
-        if (rc < 0) {
-                CERROR("Error unpack md %p for inode %lu\n", lmm, inode->i_ino);
-                GOTO(out, rc);
-        }
-
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, oinfo.oi_md);
-        if (rc) {
-                CERROR("Error revalidate lsm %p \n", oinfo.oi_md);
-                GOTO(out, rc);
-        }
-
-        /* then fill oa */
-        obdo_from_inode(oinfo.oi_oa, inode, OBD_MD_FLUID | OBD_MD_FLGID);
-        oinfo.oi_oa->o_valid |= OBD_MD_FLID;
-        oinfo.oi_oa->o_id = oinfo.oi_md->lsm_object_id;
-        if (logcookies) {
-                oinfo.oi_oa->o_valid |= OBD_MD_FLCOOKIE;
-                oti.oti_logcookies = logcookies;
-        }
-
-        LASSERT(fid != NULL);
-        oinfo.oi_oa->o_fid = fid->id;
-        oinfo.oi_oa->o_generation = fid->generation;
-        oinfo.oi_oa->o_valid |= OBD_MD_FLFID | OBD_MD_FLGENER;
-
-        /* do async setattr from mds to ost not waiting for responses. */
-        rc = obd_setattr_async(mds->mds_osc_exp, &oinfo, &oti, NULL);
-        if (rc)
-                CDEBUG(D_INODE, "mds to ost setattr objid 0x"LPX64
-                       " on ost error %d\n", oinfo.oi_md->lsm_object_id, rc);
-out:
-        if (oinfo.oi_md)
-                obd_free_memmd(mds->mds_osc_exp, &oinfo.oi_md);
-        OBDO_FREE(oinfo.oi_oa);
-        RETURN(rc);
-}
-
-/* In the raw-setattr case, we lock the child inode.
- * In the write-back case or if being called from open, the client holds a lock
- * already.
- *
- * We use the ATTR_FROM_OPEN flag to tell these cases apart. */
-static int mds_reint_setattr(struct mds_update_record *rec, int offset,
-                             struct ptlrpc_request *req,
-                             struct lustre_handle *lh)
-{
-        unsigned int ia_valid = rec->ur_iattr.ia_valid;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_body *body;
-        struct dentry *de;
-        struct inode *inode = NULL;
-        struct lustre_handle lockh;
-        void *handle = NULL;
-        struct mds_logcancel_data *mlcd = NULL;
-        struct lov_mds_md *lmm = NULL;
-        struct llog_cookie *logcookies = NULL;
-        int lmm_size = 0, need_lock = 1, cookie_size = 0;
-        int rc = 0, cleanup_phase = 0, err, locked = 0, sync = 0;
-        unsigned int qcids[MAXQUOTAS] = { 0, 0 };
-        unsigned int qpids[MAXQUOTAS] = { rec->ur_iattr.ia_uid, 
-                                          rec->ur_iattr.ia_gid };
-        ENTRY;
-
-        LASSERT(offset == REQ_REC_OFF);
-        offset = REPLY_REC_OFF;
-
-        DEBUG_REQ(D_INODE, req, "setattr "LPU64"/%u %x", rec->ur_fid1->id,
-                  rec->ur_fid1->generation, rec->ur_iattr.ia_valid);
-        OBD_COUNTER_INCREMENT(obd, setattr);
-
-        MDS_CHECK_RESENT(req, reconstruct_reint_setattr(rec, offset, req));
-
-        if (rec->ur_dlm)
-                ldlm_request_cancel(req, rec->ur_dlm, 0);
-
-        if (rec->ur_iattr.ia_valid & ATTR_FROM_OPEN ||
-            (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)) {
-                de = mds_fid2dentry(mds, rec->ur_fid1, NULL);
-                if (IS_ERR(de))
-                        GOTO(cleanup, rc = PTR_ERR(de));
-                if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)
-                        GOTO(cleanup, rc = -EROFS);
-        } else {
-                __u64 lockpart = MDS_INODELOCK_UPDATE;
-                if (rec->ur_iattr.ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID))
-                        lockpart |= MDS_INODELOCK_LOOKUP;
-
-                de = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_EX,
-                                           &lockh, NULL, 0, lockpart);
-                if (IS_ERR(de))
-                        GOTO(cleanup, rc = PTR_ERR(de));
-                locked = 1;
-        }
-
-        cleanup_phase = 1;
-        inode = de->d_inode;
-        LASSERT(inode);
-
-        if ((rec->ur_iattr.ia_valid & ATTR_FROM_OPEN) ||
-            (rec->ur_iattr.ia_valid & ATTR_SIZE)) {
-                /* Check write access for the O_TRUNC case */
-                if (mds_query_write_access(inode) < 0)
-                        GOTO(cleanup, rc = -ETXTBSY);
-        }
-
-        /* save uid/gid for quota acq/rel */
-        qcids[USRQUOTA] = inode->i_uid;
-        qcids[GRPQUOTA] = inode->i_gid;
-
-        if ((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) &&
-            rec->ur_eadata != NULL) {
-                LOCK_INODE_MUTEX(inode);
-                need_lock = 0;
-        }
-
-        OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_SETATTR_WRITE, inode->i_sb);
-
-        /* start a log jounal handle if needed */
-        if (S_ISREG(inode->i_mode) &&
-            rec->ur_iattr.ia_valid & (ATTR_UID | ATTR_GID)) {
-                lmm_size = mds->mds_max_mdsize;
-                OBD_ALLOC(lmm, lmm_size);
-                if (lmm == NULL)
-                        GOTO(cleanup, rc = -ENOMEM);
-
-                cleanup_phase = 2;
-                rc = mds_get_md(obd, inode, lmm, &lmm_size, need_lock, 0);
-                if (rc < 0)
-                        GOTO(cleanup, rc);
-                rc = 0;
-
-                handle = fsfilt_start_log(obd, inode, FSFILT_OP_SETATTR, NULL,
-                                          le32_to_cpu(lmm->lmm_stripe_count));
-        } else {
-                handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL);
-        }
-        if (IS_ERR(handle))
-                GOTO(cleanup, rc = PTR_ERR(handle));
-
-        if (rec->ur_iattr.ia_valid & (ATTR_MTIME | ATTR_CTIME))
-                CDEBUG(D_INODE, "setting mtime %lu, ctime %lu\n",
-                       LTIME_S(rec->ur_iattr.ia_mtime),
-                       LTIME_S(rec->ur_iattr.ia_ctime));
-        rc = mds_fix_attr(inode, rec);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        if (rec->ur_iattr.ia_valid & ATTR_ATTR_FLAG) {  /* ioctl */
-                rc = fsfilt_iocontrol(obd, inode, NULL, EXT3_IOC_SETFLAGS,
-                                      (long)&rec->ur_flags);
-        } else if (rec->ur_iattr.ia_valid) {            /* setattr */
-                rc = fsfilt_setattr(obd, de, handle, &rec->ur_iattr, 0);
-                /* journal chown/chgrp in llog, just like unlink */
-                if (rc == 0 && lmm_size){
-                        cookie_size = mds_get_cookie_size(obd, lmm);
-                        OBD_ALLOC(logcookies, cookie_size);
-                        if (logcookies == NULL)
-                                GOTO(cleanup, rc = -ENOMEM);
-
-                        if (mds_log_op_setattr(obd, inode, lmm, lmm_size,
-                                               logcookies, cookie_size) <= 0) {
-                                OBD_FREE(logcookies, cookie_size);
-                                logcookies = NULL;
-                        }
-                }
-        }
-
-        if (rc == 0 && (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) &&
-            rec->ur_eadata != NULL) {
-                struct lov_stripe_md *lsm = NULL;
-                struct lov_user_md *lum = NULL;
-
-                rc = ll_permission(inode, MAY_WRITE, NULL);
-                if (rc < 0)
-                        GOTO(cleanup, rc);
-
-                lum = rec->ur_eadata;
-                /* if { size, offset, count } = { 0, -1, 0 } (i.e. all default
-                 * values specified) then delete default striping from dir. */
-                if (S_ISDIR(inode->i_mode) &&
-                    ((lum->lmm_stripe_size == 0 &&
-                      lum->lmm_stripe_offset ==
-                      (typeof(lum->lmm_stripe_offset))(-1) &&
-                      lum->lmm_stripe_count == 0) ||
-                    /* lmm_stripe_size == -1 is deprecated in 1.4.6 */
-                    lum->lmm_stripe_size ==
-                    (typeof(lum->lmm_stripe_size))(-1))){
-                        rc = fsfilt_set_md(obd, inode, handle, NULL, 0, "lov");
-                        if (rc)
-                                GOTO(cleanup, rc);
-                } else {
-                        rc = obd_iocontrol(OBD_IOC_LOV_SETSTRIPE,
-                                           mds->mds_osc_exp, 0,
-                                           &lsm, rec->ur_eadata);
-                        if (rc)
-                                GOTO(cleanup, rc);
-
-                        obd_free_memmd(mds->mds_osc_exp, &lsm);
-
-                        rc = fsfilt_set_md(obd, inode, handle, rec->ur_eadata,
-                                           rec->ur_eadatalen, "lov");
-                        if (rc)
-                                GOTO(cleanup, rc);
-                }
-        }
-
-        body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body));
-        mds_pack_inode2fid(&body->fid1, inode);
-        mds_pack_inode2body(body, inode);
-
-        /* don't return OST-specific attributes if we didn't just set them. */
-        if (ia_valid & ATTR_SIZE)
-                body->valid |= OBD_MD_FLSIZE | OBD_MD_FLBLOCKS;
-        if (ia_valid & (ATTR_MTIME | ATTR_MTIME_SET))
-                body->valid |= OBD_MD_FLMTIME;
-        if (ia_valid & (ATTR_ATIME | ATTR_ATIME_SET))
-                body->valid |= OBD_MD_FLATIME;
-
-        if (rc == 0 && rec->ur_cookielen && !IS_ERR(mds->mds_osc_obd)) {
-                OBD_ALLOC(mlcd, sizeof(*mlcd) + rec->ur_cookielen +
-                          rec->ur_eadatalen);
-                if (mlcd) {
-                        mlcd->mlcd_size = sizeof(*mlcd) + rec->ur_cookielen +
-                                rec->ur_eadatalen;
-                        mlcd->mlcd_eadatalen = rec->ur_eadatalen;
-                        mlcd->mlcd_cookielen = rec->ur_cookielen;
-                        mlcd->mlcd_lmm = (void *)&mlcd->mlcd_cookies +
-                                mlcd->mlcd_cookielen;
-                        memcpy(&mlcd->mlcd_cookies, rec->ur_logcookies,
-                               mlcd->mlcd_cookielen);
-                        memcpy(mlcd->mlcd_lmm, rec->ur_eadata,
-                               mlcd->mlcd_eadatalen);
-                } else {
-                        CERROR("unable to allocate log cancel data\n");
-                }
-        }
-        EXIT;
- cleanup:
-        if (mlcd != NULL)
-                sync = fsfilt_add_journal_cb(req->rq_export->exp_obd, 0, handle,
-                                             mds_cancel_cookies_cb, mlcd);
-        err = mds_finish_transno(mds, inode, handle, req, rc, 0, sync);
-        /* do mds to ost setattr if needed */
-        if (!rc && !err && lmm_size)
-                mds_osc_setattr_async(obd, inode, lmm, lmm_size,
-                                      logcookies, rec->ur_fid1);
-
-        switch (cleanup_phase) {
-        case 2:
-                OBD_FREE(lmm, mds->mds_max_mdsize);
-                if (logcookies)
-                        OBD_FREE(logcookies, cookie_size);
-        case 1:
-                if ((S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) &&
-                    rec->ur_eadata != NULL)
-                        UNLOCK_INODE_MUTEX(inode);
-                l_dput(de);
-                if (locked) {
-                        if (rc) {
-                                ldlm_lock_decref(&lockh, LCK_EX);
-                        } else {
-                                ptlrpc_save_lock (req, &lockh, LCK_EX);
-                        }
-                }
-        case 0:
-                break;
-        default:
-                LBUG();
-        }
-        if (err && !rc)
-                rc = err;
-
-        req->rq_status = rc;
-
-        /* trigger dqrel/dqacq for original owner and new owner */
-        if (ia_valid & (ATTR_UID | ATTR_GID))
-                lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc,
-                              FSFILT_OP_SETATTR);
-
-        return 0;
-}
-
-static void reconstruct_reint_create(struct mds_update_record *rec, int offset,
-                                     struct ptlrpc_request *req)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-        struct mds_obd *obd = &req->rq_export->exp_obd->u.mds;
-        struct dentry *parent, *child;
-        struct mds_body *body;
-
-        mds_req_from_mcd(req, med->med_mcd);
-
-        if (req->rq_status)
-                return;
-
-        parent = mds_fid2dentry(obd, rec->ur_fid1, NULL);
-        LASSERT(!IS_ERR(parent));
-        child = ll_lookup_one_len(rec->ur_name, parent, rec->ur_namelen - 1);
-        LASSERT(!IS_ERR(child));
-
-        body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body));
-        mds_pack_inode2fid(&body->fid1, child->d_inode);
-        mds_pack_inode2body(body, child->d_inode);
-
-        l_dput(parent);
-        l_dput(child);
-}
-
-static int mds_reint_create(struct mds_update_record *rec, int offset,
-                            struct ptlrpc_request *req,
-                            struct lustre_handle *lh)
-{
-        struct dentry *dparent = NULL;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct dentry *dchild = NULL;
-        struct inode *dir = NULL;
-        void *handle = NULL;
-        struct lustre_handle lockh;
-        int rc = 0, err, type = rec->ur_mode & S_IFMT, cleanup_phase = 0;
-        int created = 0;
-        unsigned int qcids[MAXQUOTAS] = { current->fsuid, current->fsgid };
-        unsigned int qpids[MAXQUOTAS] = { 0, 0 };
-        struct lvfs_dentry_params dp = LVFS_DENTRY_PARAMS_INIT;
-        int rec_pending = 0;
-        unsigned int gid = current->fsgid;
-        ENTRY;
-
-        LASSERT(offset == REQ_REC_OFF);
-        offset = REPLY_REC_OFF;
-
-        LASSERT(!strcmp(req->rq_export->exp_obd->obd_type->typ_name,
-                        LUSTRE_MDS_NAME));
-
-        DEBUG_REQ(D_INODE, req, "parent "LPU64"/%u name %s mode %o",
-                  rec->ur_fid1->id, rec->ur_fid1->generation,
-                  rec->ur_name, rec->ur_mode);
-
-        MDS_CHECK_RESENT(req, reconstruct_reint_create(rec, offset, req));
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_CREATE))
-                GOTO(cleanup, rc = -ESTALE);
-
-        if (rec->ur_dlm)
-                ldlm_request_cancel(req, rec->ur_dlm, 0);
-
-        dparent = mds_fid2locked_dentry(obd, rec->ur_fid1, NULL, LCK_EX, &lockh,
-                                        rec->ur_name, rec->ur_namelen - 1,
-                                        MDS_INODELOCK_UPDATE);
-        if (IS_ERR(dparent)) {
-                rc = PTR_ERR(dparent);
-                CDEBUG(D_DENTRY, "parent "LPU64"/%u lookup error %d\n",
-                               rec->ur_fid1->id, rec->ur_fid1->generation, rc);
-                GOTO(cleanup, rc);
-        }
-        cleanup_phase = 1; /* locked parent dentry */
-        dir = dparent->d_inode;
-        LASSERT(dir);
-
-        ldlm_lock_dump_handle(D_OTHER, &lockh);
-
-        dchild = ll_lookup_one_len(rec->ur_name, dparent, rec->ur_namelen - 1);
-        if (IS_ERR(dchild)) {
-                rc = PTR_ERR(dchild);
-                CDEBUG(D_DENTRY, "child lookup error %d\n", rc);
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 2; /* child dentry */
-
-        OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_CREATE_WRITE, dir->i_sb);
-
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY) {
-                if (dchild->d_inode)
-                        GOTO(cleanup, rc = -EEXIST);
-                GOTO(cleanup, rc = -EROFS);
-        }
-
-        if (dir->i_mode & S_ISGID && S_ISDIR(rec->ur_mode))
-                rec->ur_mode |= S_ISGID;
-
-        dchild->d_fsdata = (void *)&dp;
-        dp.ldp_inum = (unsigned long)rec->ur_fid2->id;
-        dp.ldp_ptr = req;
-
-        if (dir->i_mode & S_ISGID)
-                gid = dir->i_gid;
-        else
-                gid = current->fsgid;
-
-        /* we try to get enough quota to write here, and let ldiskfs
-         * decide if it is out of quota or not b=14783 */
-        lquota_chkquota(mds_quota_interface_ref, obd,
-                        current->fsuid, gid, 1, &rec_pending);
-
-        switch (type) {
-        case S_IFREG:{
-                handle = fsfilt_start(obd, dir, FSFILT_OP_CREATE, NULL);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                rc = ll_vfs_create(dir, dchild, rec->ur_mode, NULL);
-                mds_counter_incr(req->rq_export, LPROC_MDS_MKNOD);
-                EXIT;
-                break;
-        }
-        case S_IFDIR:{
-                handle = fsfilt_start(obd, dir, FSFILT_OP_MKDIR, NULL);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                rc = vfs_mkdir(dir, dchild, rec->ur_mode);
-                mds_counter_incr(req->rq_export, LPROC_MDS_MKDIR);
-                EXIT;
-                break;
-        }
-        case S_IFLNK:{
-                handle = fsfilt_start(obd, dir, FSFILT_OP_SYMLINK, NULL);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                if (rec->ur_tgt == NULL)        /* no target supplied */
-                        rc = -EINVAL;           /* -EPROTO? */
-                else
-                        rc = ll_vfs_symlink(dir, dchild, rec->ur_tgt, S_IALLUGO);
-                mds_counter_incr(req->rq_export, LPROC_MDS_MKNOD);
-                EXIT;
-                break;
-        }
-        case S_IFCHR:
-        case S_IFBLK:
-        case S_IFIFO:
-        case S_IFSOCK:{
-                int rdev = rec->ur_rdev;
-                handle = fsfilt_start(obd, dir, FSFILT_OP_MKNOD, NULL);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                rc = vfs_mknod(dir, dchild, rec->ur_mode, rdev);
-                mds_counter_incr(req->rq_export, LPROC_MDS_MKNOD);
-                EXIT;
-                break;
-        }
-        default:
-                CERROR("bad file type %o creating %s\n", type, rec->ur_name);
-                dchild->d_fsdata = NULL;
-                GOTO(cleanup, rc = -EINVAL);
-        }
-
-        /* In case we stored the desired inum in here, we want to clean up. */
-        if (dchild->d_fsdata == (void *)(unsigned long)rec->ur_fid2->id)
-                dchild->d_fsdata = NULL;
-
-        if (rc) {
-                CDEBUG(D_INODE, "error during create: %d\n", rc);
-                GOTO(cleanup, rc);
-        } else {
-                struct iattr iattr;
-                struct inode *inode = dchild->d_inode;
-                struct mds_body *body;
-
-                created = 1;
-                LTIME_S(iattr.ia_atime) = rec->ur_time;
-                LTIME_S(iattr.ia_ctime) = rec->ur_time;
-                LTIME_S(iattr.ia_mtime) = rec->ur_time;
-                iattr.ia_uid = current->fsuid;  /* set by push_ctxt already */
-                iattr.ia_gid = gid;
-                iattr.ia_valid = ATTR_UID | ATTR_GID | ATTR_ATIME |
-                        ATTR_MTIME | ATTR_CTIME;
-
-                if (rec->ur_fid2->id) {
-                        LASSERT(rec->ur_fid2->id == inode->i_ino);
-                        inode->i_generation = rec->ur_fid2->generation;
-                        /* Dirtied and committed by the upcoming setattr. */
-                        CDEBUG(D_INODE, "recreated ino %lu with gen %u\n",
-                               inode->i_ino, inode->i_generation);
-                } else {
-                        CDEBUG(D_INODE, "created ino %lu with gen %x\n",
-                               inode->i_ino, inode->i_generation);
-                }
-
-                rc = fsfilt_setattr(obd, dchild, handle, &iattr, 0);
-                if (rc)
-                        CERROR("error on child setattr: rc = %d\n", rc);
-
-                iattr.ia_valid = ATTR_MTIME | ATTR_CTIME;
-                rc = fsfilt_setattr(obd, dparent, handle, &iattr, 0);
-                if (rc)
-                        CERROR("error on parent setattr: rc = %d\n", rc);
-
-                if (S_ISDIR(inode->i_mode)) {
-                        struct lov_mds_md lmm;
-                        int lmm_size = sizeof(lmm);
-                        rc = mds_get_md(obd, dir, &lmm, &lmm_size, 1, 0);
-                        if (rc > 0) {
-                                LOCK_INODE_MUTEX(inode);
-                                rc = fsfilt_set_md(obd, inode, handle,
-                                                   &lmm, lmm_size, "lov");
-                                UNLOCK_INODE_MUTEX(inode);
-                        }
-                        if (rc)
-                                CERROR("error on copy stripe info: rc = %d\n",
-                                        rc);
-                }
-
-                body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body));
-                mds_pack_inode2fid(&body->fid1, inode);
-                mds_pack_inode2body(body, inode);
-        }
-        EXIT;
-
-cleanup:
-        err = mds_finish_transno(mds, dir, handle, req, rc, 0, 0);
-        if (rec_pending)
-                lquota_pending_commit(mds_quota_interface_ref, obd,
-                                      current->fsuid, gid, 1);
-
-        if (rc && created) {
-                /* Destroy the file we just created.  This should not need
-                 * extra journal credits, as we have already modified all of
-                 * the blocks needed in order to create the file in the first
-                 * place.
-                 */
-                switch (type) {
-                case S_IFDIR:
-                        err = vfs_rmdir(dir, dchild);
-                        if (err)
-                                CERROR("rmdir in error path: %d\n", err);
-                        break;
-                default:
-                        err = vfs_unlink(dir, dchild);
-                        if (err)
-                                CERROR("unlink in error path: %d\n", err);
-                        break;
-                }
-        } else if (created) {
-                /* The inode we were allocated may have just been freed
-                 * by an unlink operation.  We take this lock to
-                 * synchronize against the matching reply-ack-lock taken
-                 * in unlink, to avoid replay problems if this reply
-                 * makes it out to the client but the unlink's does not.
-                 * See bug 2029 for more detail.*/
-                mds_lock_new_child(obd, dchild->d_inode, NULL);
-                /* save uid/gid of create inode and parent */
-                qpids[USRQUOTA] = dir->i_uid;
-                qpids[GRPQUOTA] = dir->i_gid;
-        } else {
-                rc = err;
-        }
-
-        switch (cleanup_phase) {
-        case 2: /* child dentry */
-                l_dput(dchild);
-        case 1: /* locked parent dentry */
-                if (rc) {
-                        ldlm_lock_decref(&lockh, LCK_EX);
-                } else {
-                        ptlrpc_save_lock (req, &lockh, LCK_EX);
-                }
-                l_dput(dparent);
-        case 0:
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        req->rq_status = rc;
-
-        /* trigger dqacq on the owner of child and parent */
-        lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc,
-                      FSFILT_OP_CREATE);
-        return 0;
-}
-
-int res_gt(struct ldlm_res_id *res1, struct ldlm_res_id *res2,
-           ldlm_policy_data_t *p1, ldlm_policy_data_t *p2)
-{
-        int i;
-
-        for (i = 0; i < RES_NAME_SIZE; i++) {
-                /* return 1 here, because enqueue_ordered will skip resources
-                 * of all zeroes if they're sorted to the end of the list. */
-                if (res1->name[i] == 0 && res2->name[i] != 0)
-                        return 1;
-                if (res2->name[i] == 0 && res1->name[i] != 0)
-                        return 0;
-
-                if (res1->name[i] > res2->name[i])
-                        return 1;
-                if (res1->name[i] < res2->name[i])
-                        return 0;
-        }
-        if (!p1 || !p2)
-                return 0;
-        if (memcmp(p1, p2, sizeof(*p1)) < 0)
-                return 1;
-        return 0;
-}
-
-/* This function doesn't use ldlm_match_or_enqueue because we're always called
- * with EX or PW locks, and the MDS is no longer allowed to match write locks,
- * because they take the place of local semaphores.
- *
- * One or two locks are taken in numerical order.  A res_id->name[0] of 0 means
- * no lock is taken for that res_id.  Must be at least one non-zero res_id. */
-int enqueue_ordered_locks(struct obd_device *obd, struct ldlm_res_id *p1_res_id,
-                          struct lustre_handle *p1_lockh, int p1_lock_mode,
-                          ldlm_policy_data_t *p1_policy,
-                          struct ldlm_res_id *p2_res_id,
-                          struct lustre_handle *p2_lockh, int p2_lock_mode,
-                          ldlm_policy_data_t *p2_policy)
-{
-        struct ldlm_res_id *res_id[2] = { p1_res_id, p2_res_id };
-        struct lustre_handle *handles[2] = { p1_lockh, p2_lockh };
-        int lock_modes[2] = { p1_lock_mode, p2_lock_mode };
-        ldlm_policy_data_t *policies[2] = {p1_policy, p2_policy};
-        int rc, flags;
-        ENTRY;
-
-        LASSERT(p1_res_id != NULL && p2_res_id != NULL);
-
-        CDEBUG(D_INFO, "locks before: "LPU64"/"LPU64"\n",
-               res_id[0]->name[0], res_id[1]->name[0]);
-
-        if (res_gt(p1_res_id, p2_res_id, p1_policy, p2_policy)) {
-                handles[1] = p1_lockh;
-                handles[0] = p2_lockh;
-                res_id[1] = p1_res_id;
-                res_id[0] = p2_res_id;
-                lock_modes[1] = p1_lock_mode;
-                lock_modes[0] = p2_lock_mode;
-                policies[1] = p1_policy;
-                policies[0] = p2_policy;
-        }
-
-        CDEBUG(D_DLMTRACE, "lock order: "LPU64"/"LPU64"\n",
-               res_id[0]->name[0], res_id[1]->name[0]);
-
-        flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB;
-        rc = ldlm_cli_enqueue_local(obd->obd_namespace, res_id[0],
-                                    LDLM_IBITS, policies[0], lock_modes[0],
-                                    &flags, ldlm_blocking_ast, 
-                                    ldlm_completion_ast, NULL, NULL, 0, 
-                                    NULL, handles[0]);
-        if (rc != ELDLM_OK)
-                RETURN(-EIO);
-        ldlm_lock_dump_handle(D_OTHER, handles[0]);
-
-        if (memcmp(res_id[0], res_id[1], sizeof(*res_id[0])) == 0 &&
-            (policies[0]->l_inodebits.bits & policies[1]->l_inodebits.bits)) {
-                memcpy(handles[1], handles[0], sizeof(*(handles[1])));
-                ldlm_lock_addref(handles[1], lock_modes[1]);
-        } else if (res_id[1]->name[0] != 0) {
-                flags = LDLM_FL_LOCAL_ONLY | LDLM_FL_ATOMIC_CB;
-                rc = ldlm_cli_enqueue_local(obd->obd_namespace, res_id[1],
-                                            LDLM_IBITS, policies[1],
-                                            lock_modes[1], &flags, 
-                                            ldlm_blocking_ast,
-                                            ldlm_completion_ast, NULL, NULL,
-                                            0, NULL, handles[1]);
-                if (rc != ELDLM_OK) {
-                        ldlm_lock_decref(handles[0], lock_modes[0]);
-                        RETURN(-EIO);
-                }
-                ldlm_lock_dump_handle(D_OTHER, handles[1]);
-        }
-
-        RETURN(0);
-}
-
-static inline int res_eq(struct ldlm_res_id *res1, struct ldlm_res_id *res2)
-{
-        return !memcmp(res1, res2, sizeof(*res1));
-}
-
-static inline void
-try_to_aggregate_locks(struct ldlm_res_id *res1, ldlm_policy_data_t *p1,
-                        struct ldlm_res_id *res2, ldlm_policy_data_t *p2)
-{
-        if (!res_eq(res1, res2))
-                return;
-        /* XXX: any additional inodebits (to current LOOKUP and UPDATE)
-         * should be taken with great care here */
-        p1->l_inodebits.bits |= p2->l_inodebits.bits;
-}
-
-int enqueue_4ordered_locks(struct obd_device *obd,struct ldlm_res_id *p1_res_id,
-                           struct lustre_handle *p1_lockh, int p1_lock_mode,
-                           ldlm_policy_data_t *p1_policy, 
-                           struct ldlm_res_id *p2_res_id,
-                           struct lustre_handle *p2_lockh, int p2_lock_mode,
-                           ldlm_policy_data_t *p2_policy, 
-                           struct ldlm_res_id *c1_res_id,
-                           struct lustre_handle *c1_lockh, int c1_lock_mode,
-                           ldlm_policy_data_t *c1_policy, 
-                           struct ldlm_res_id *c2_res_id,
-                           struct lustre_handle *c2_lockh, int c2_lock_mode,
-                           ldlm_policy_data_t *c2_policy)
-{
-        struct ldlm_res_id *res_id[5] = { p1_res_id, p2_res_id,
-                                          c1_res_id, c2_res_id };
-        struct lustre_handle *dlm_handles[5] = { p1_lockh, p2_lockh,
-                                                 c1_lockh, c2_lockh };
-        int lock_modes[5] = { p1_lock_mode, p2_lock_mode,
-                              c1_lock_mode, c2_lock_mode };
-        ldlm_policy_data_t *policies[5] = {p1_policy, p2_policy,
-                                           c1_policy, c2_policy};
-        int rc, i, j, sorted, flags;
-        ENTRY;
-
-        CDEBUG(D_DLMTRACE, "locks before: "LPU64"/"LPU64"/"LPU64"/"LPU64"\n",
-               res_id[0]->name[0], res_id[1]->name[0], res_id[2]->name[0],
-               res_id[3]->name[0]);
-
-        /* simple insertion sort - we have at most 4 elements */
-        for (i = 1; i < 4; i++) {
-                j = i - 1;
-                dlm_handles[4] = dlm_handles[i];
-                res_id[4] = res_id[i];
-                lock_modes[4] = lock_modes[i];
-                policies[4] = policies[i];
-
-                sorted = 0;
-                do {
-                        if (res_gt(res_id[j], res_id[4], policies[j],
-                                   policies[4])) {
-                                dlm_handles[j + 1] = dlm_handles[j];
-                                res_id[j + 1] = res_id[j];
-                                lock_modes[j + 1] = lock_modes[j];
-                                policies[j + 1] = policies[j];
-                                j--;
-                        } else {
-                                sorted = 1;
-                        }
-                } while (j >= 0 && !sorted);
-
-                dlm_handles[j + 1] = dlm_handles[4];
-                res_id[j + 1] = res_id[4];
-                lock_modes[j + 1] = lock_modes[4];
-                policies[j + 1] = policies[4];
-        }
-
-        CDEBUG(D_DLMTRACE, "lock order: "LPU64"/"LPU64"/"LPU64"/"LPU64"\n",
-               res_id[0]->name[0], res_id[1]->name[0], res_id[2]->name[0],
-               res_id[3]->name[0]);
-
-        /* XXX we could send ASTs on all these locks first before blocking? */
-        for (i = 0; i < 4; i++) {
-                flags = LDLM_FL_ATOMIC_CB;
-                if (res_id[i]->name[0] == 0)
-                        break;
-                if (i && res_eq(res_id[i], res_id[i-1])) {
-                        memcpy(dlm_handles[i], dlm_handles[i-1],
-                               sizeof(*(dlm_handles[i])));
-                        ldlm_lock_addref(dlm_handles[i], lock_modes[i]);
-                } else {
-                        /* we need to enqueue locks with different inodebits
-                         * at once, because otherwise concurrent thread can
-                         * hit the windown between these two locks and we'll
-                         * get to deadlock. see bug 10360. note also, that it
-                         * is impossible to have >2 equal res. */
-                        if (i < 3)
-                                try_to_aggregate_locks(res_id[i], policies[i],
-                                                       res_id[i+1], policies[i+1]);
-                        rc = ldlm_cli_enqueue_local(obd->obd_namespace,
-                                                    res_id[i], LDLM_IBITS,
-                                                    policies[i], lock_modes[i],
-                                                    &flags, ldlm_blocking_ast,
-                                                    ldlm_completion_ast, NULL, 
-                                                    NULL, 0, NULL, 
-                                                    dlm_handles[i]);
-                        if (rc != ELDLM_OK)
-                                GOTO(out_err, rc = -EIO);
-                        ldlm_lock_dump_handle(D_OTHER, dlm_handles[i]);
-                }
-        }
-
-        RETURN(0);
-out_err:
-        while (i-- > 0)
-                ldlm_lock_decref(dlm_handles[i], lock_modes[i]);
-
-        return rc;
-}
-
-/* In the unlikely case that the child changed while we were waiting
- * on the lock, we need to drop the lock on the old child and either:
- * - if the child has a lower resource name, then we have to also
- *   drop the parent lock and regain the locks in the right order
- * - in the rename case, if the child has a lower resource name than one of
- *   the other parent/child resources (maxres) we also need to reget the locks
- * - if the child has a higher resource name (this is the common case)
- *   we can just get the lock on the new child (still in lock order)
- *
- * Returns 0 if the child did not change or if it changed but could be locked.
- * Returns 1 if the child changed and we need to re-lock (no locks held).
- * Returns -ve error with a valid dchild (no locks held). */
-static int mds_verify_child(struct obd_device *obd,
-                            struct ldlm_res_id *parent_res_id,
-                            struct lustre_handle *parent_lockh,
-                            struct dentry *dparent, int parent_mode,
-                            struct ldlm_res_id *child_res_id,
-                            struct lustre_handle *child_lockh,
-                            struct dentry **dchildp, int child_mode,
-                            ldlm_policy_data_t *child_policy,
-                            const char *name, int namelen,
-                            struct ldlm_res_id *maxres)
-{
-        struct dentry *vchild, *dchild = *dchildp;
-        int rc = 0, cleanup_phase = 2; /* parent, child locks */
-        ENTRY;
-
-        vchild = ll_lookup_one_len(name, dparent, namelen - 1);
-        if (IS_ERR(vchild))
-                GOTO(cleanup, rc = PTR_ERR(vchild));
-
-        if (likely((vchild->d_inode == NULL && child_res_id->name[0] == 0) ||
-                   (vchild->d_inode != NULL &&
-                    child_res_id->name[0] == vchild->d_inode->i_ino &&
-                    child_res_id->name[1] == vchild->d_inode->i_generation))) {
-                if (dchild != NULL)
-                        l_dput(dchild);
-                *dchildp = vchild;
-
-                RETURN(0);
-        }
-
-        CDEBUG(D_DLMTRACE, "child inode changed: %p != %p (%lu != "LPU64")\n",
-               vchild->d_inode, dchild ? dchild->d_inode : 0,
-               vchild->d_inode ? vchild->d_inode->i_ino : 0,
-               child_res_id->name[0]);
-        if (child_res_id->name[0] != 0)
-                ldlm_lock_decref(child_lockh, child_mode);
-        if (dchild)
-                l_dput(dchild);
-
-        cleanup_phase = 1; /* parent lock only */
-        *dchildp = dchild = vchild;
-
-        if (dchild->d_inode) {
-                int flags = LDLM_FL_ATOMIC_CB;
-                child_res_id->name[0] = dchild->d_inode->i_ino;
-                child_res_id->name[1] = dchild->d_inode->i_generation;
-
-                /* Make sure that we don't try to re-enqueue a lock on the
-                 * same resource if it happens that the source is renamed to
-                 * the target by another thread (bug 9974, thanks racer :-) */
-                if (!res_gt(child_res_id, parent_res_id, NULL, NULL) ||
-                    !res_gt(child_res_id, maxres, NULL, NULL)) {
-                        CDEBUG(D_DLMTRACE, "relock "LPU64"<("LPU64"|"LPU64")\n",
-                               child_res_id->name[0], parent_res_id->name[0],
-                               maxres->name[0]);
-                        GOTO(cleanup, rc = 1);
-                }
-
-                rc = ldlm_cli_enqueue_local(obd->obd_namespace, child_res_id, 
-                                            LDLM_IBITS, child_policy, 
-                                            child_mode, &flags, 
-                                            ldlm_blocking_ast, 
-                                            ldlm_completion_ast, NULL, 
-                                            NULL, 0, NULL, child_lockh);
-                if (rc != ELDLM_OK)
-                        GOTO(cleanup, rc = -EIO);
-        } else {
-                memset(child_res_id, 0, sizeof(*child_res_id));
-        }
-
-        EXIT;
-cleanup:
-        if (rc) {
-                switch(cleanup_phase) {
-                case 2:
-                        if (child_res_id->name[0] != 0)
-                                ldlm_lock_decref(child_lockh, child_mode);
-                case 1:
-                        ldlm_lock_decref(parent_lockh, parent_mode);
-                }
-        }
-        return rc;
-}
-
-#define INODE_CTIME_AGE (10)
-#define INODE_CTIME_OLD(inode) (LTIME_S(inode->i_ctime) +               \
-                                INODE_CTIME_AGE < CURRENT_SECONDS)
-
-int mds_get_parent_child_locked(struct obd_device *obd, struct mds_obd *mds,
-                                struct ll_fid *fid,
-                                struct lustre_handle *parent_lockh,
-                                struct dentry **dparentp, int parent_mode,
-                                __u64 parent_lockpart,
-                                char *name, int namelen,
-                                struct lustre_handle *child_lockh,
-                                struct dentry **dchildp, int child_mode,
-                                __u64 child_lockpart)
-{
-        struct ldlm_res_id child_res_id = { .name = {0} };
-        struct ldlm_res_id parent_res_id = { .name = {0} };
-        ldlm_policy_data_t parent_policy = {.l_inodebits = { parent_lockpart }};
-        ldlm_policy_data_t child_policy = {.l_inodebits = { child_lockpart }};
-        struct inode *inode;
-        int rc = 0, cleanup_phase = 0;
-        ENTRY;
-
-        /* Step 1: Lookup parent */
-        *dparentp = mds_fid2dentry(mds, fid, NULL);
-        if (IS_ERR(*dparentp)) {
-                rc = PTR_ERR(*dparentp);
-                *dparentp = NULL;
-                RETURN(rc);
-        }
-
-        CDEBUG(D_INODE, "parent ino %lu, name %s\n",
-               (*dparentp)->d_inode->i_ino, name);
-
-        parent_res_id.name[0] = (*dparentp)->d_inode->i_ino;
-        parent_res_id.name[1] = (*dparentp)->d_inode->i_generation;
-
-        cleanup_phase = 1; /* parent dentry */
-
-        /* Step 2: Lookup child (without DLM lock, to get resource name) */
-        *dchildp = ll_lookup_one_len(name, *dparentp, namelen - 1);
-        if (IS_ERR(*dchildp)) {
-                rc = PTR_ERR(*dchildp);
-                CDEBUG(D_INODE, "child lookup error %d\n", rc);
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 2; /* child dentry */
-        inode = (*dchildp)->d_inode;
-        if (inode != NULL) {
-                if (is_bad_inode(inode)) {
-                        CERROR("bad inode returned %lu/%u\n",
-                               inode->i_ino, inode->i_generation);
-                        GOTO(cleanup, rc = -ENOENT);
-                }
-                inode = igrab(inode);
-        }
-        if (inode == NULL)
-                goto retry_locks;
-
-        child_res_id.name[0] = inode->i_ino;
-        child_res_id.name[1] = inode->i_generation;
-
-        /* If we want a LCK_CR for a directory, and this directory has not been
-           changed for some time, we return not only a LOOKUP lock, but also an 
-           UPDATE lock to have negative dentry starts working for this dir.
-           Also we apply same logic to non-directories. If the file is rarely
-           changed - we return both locks and this might save us RPC on
-           later STAT. */
-        if ((child_mode & (LCK_CR|LCK_PR|LCK_CW)) && INODE_CTIME_OLD(inode))
-                child_policy.l_inodebits.bits |= MDS_INODELOCK_UPDATE;
-
-        iput(inode);
-
-retry_locks:
-        cleanup_phase = 2; /* child dentry */
-
-        /* Step 3: Lock parent and child in resource order.  If child doesn't
-         *         exist, we still have to lock the parent and re-lookup. */
-        rc = enqueue_ordered_locks(obd,&parent_res_id,parent_lockh,parent_mode,
-                                   &parent_policy,
-                                   &child_res_id, child_lockh, child_mode,
-                                   &child_policy);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        if (!(*dchildp)->d_inode)
-                cleanup_phase = 3; /* parent lock */
-        else
-                cleanup_phase = 4; /* child lock */
-
-        /* Step 4: Re-lookup child to verify it hasn't changed since locking */
-        rc = mds_verify_child(obd, &parent_res_id, parent_lockh, *dparentp,
-                              parent_mode, &child_res_id, child_lockh, dchildp,
-                              child_mode,&child_policy, name, namelen, &parent_res_id);
-        if (rc > 0)
-                goto retry_locks;
-        if (rc < 0) {
-                cleanup_phase = 2;
-                GOTO(cleanup, rc);
-        }
-
-cleanup:
-        if (rc) {
-                switch (cleanup_phase) {
-                case 4:
-                        ldlm_lock_decref(child_lockh, child_mode);
-                case 3:
-                        ldlm_lock_decref(parent_lockh, parent_mode);
-                case 2:
-                        l_dput(*dchildp);
-                case 1:
-                        l_dput(*dparentp);
-                default: ;
-                }
-        }
-        return rc;
-}
-
-void mds_reconstruct_generic(struct ptlrpc_request *req)
-{
-        struct mds_export_data *med = &req->rq_export->exp_mds_data;
-
-        mds_req_from_mcd(req, med->med_mcd);
-}
-
-/* If we are unlinking an open file/dir (i.e. creating an orphan) then
- * we instead link the inode into the PENDING directory until it is
- * finally released.  We can't simply call mds_reint_rename() or some
- * part thereof, because we don't have the inode to check for link
- * count/open status until after it is locked.
- *
- * For lock ordering, caller must get child->i_mutex first, then
- * pending->i_mutex before starting journal transaction.
- *
- * returns 1 on success
- * returns 0 if we lost a race and didn't make a new link
- * returns negative on error
- */
-static int mds_orphan_add_link(struct mds_update_record *rec,
-                               struct obd_device *obd, struct dentry *dentry)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct inode *pending_dir = mds->mds_pending_dir->d_inode;
-        struct inode *inode = dentry->d_inode;
-        struct dentry *pending_child;
-        char fidname[LL_FID_NAMELEN];
-        int fidlen = 0, rc, mode;
-        ENTRY;
-
-        LASSERT(inode != NULL);
-        LASSERT(!mds_inode_is_orphan(inode));
-#ifndef HAVE_I_ALLOC_SEM
-        LASSERT(TRYLOCK_INODE_MUTEX(inode) == 0);
-#endif
-        LASSERT(TRYLOCK_INODE_MUTEX(pending_dir) == 0);
-
-        fidlen = ll_fid2str(fidname, inode->i_ino, inode->i_generation);
-
-        CDEBUG(D_INODE, "pending destroy of %dx open %d linked %s %s = %s\n",
-               mds_orphan_open_count(inode), inode->i_nlink,
-               S_ISDIR(inode->i_mode) ? "dir" :
-                S_ISREG(inode->i_mode) ? "file" : "other",rec->ur_name,fidname);
-
-        if (mds_orphan_open_count(inode) == 0 || inode->i_nlink != 0)
-                RETURN(0);
-
-        pending_child = lookup_one_len(fidname, mds->mds_pending_dir, fidlen);
-        if (IS_ERR(pending_child))
-                RETURN(PTR_ERR(pending_child));
-
-        if (pending_child->d_inode != NULL) {
-                CERROR("re-destroying orphan file %s?\n", rec->ur_name);
-                LASSERT(pending_child->d_inode == inode);
-                GOTO(out_dput, rc = 0);
-        }
-
-        /* link() is semanticaly-wrong for S_IFDIR, so we set S_IFREG
-         * for linking and return real mode back then -bzzz */
-        mode = inode->i_mode;
-        inode->i_mode = S_IFREG;
-        rc = vfs_link(dentry, pending_dir, pending_child);
-        if (rc)
-                CERROR("error linking orphan %s to PENDING: rc = %d\n",
-                       rec->ur_name, rc);
-        else
-                mds_inode_set_orphan(inode);
-
-        /* return mode and correct i_nlink if inode is directory */
-        inode->i_mode = mode;
-        LASSERTF(inode->i_nlink == 1, "%s nlink == %d\n",
-                 S_ISDIR(mode) ? "dir" : S_ISREG(mode) ? "file" : "other",
-                 inode->i_nlink);
-        if (S_ISDIR(mode)) {
-                inode->i_nlink++;
-                pending_dir->i_nlink++;
-                mark_inode_dirty(inode);
-                mark_inode_dirty(pending_dir);
-        }
-
-        GOTO(out_dput, rc = 1);
-out_dput:
-        l_dput(pending_child);
-        RETURN(rc);
-}
-
-int mds_get_cookie_size(struct obd_device *obd, struct lov_mds_md *lmm)
-{
-        int count = le32_to_cpu(lmm->lmm_stripe_count);
-        int real_csize = count * sizeof(struct llog_cookie); 
-        return real_csize;
-}
-
-void mds_shrink_reply(struct obd_device *obd, struct ptlrpc_request *req,
-                      struct mds_body *body, int md_off)
-{
-        int cookie_size = 0, md_size = 0;
-
-        if (body && body->valid & OBD_MD_FLEASIZE) {
-                md_size = body->eadatasize;
-        }
-        if (body && body->valid & OBD_MD_FLCOOKIE) {
-                LASSERT(body->valid & OBD_MD_FLEASIZE);
-                cookie_size = mds_get_cookie_size(obd, lustre_msg_buf(
-                                                  req->rq_repmsg, md_off, 0));
-        }
-
-        CDEBUG(D_INFO, "Shrink to md_size %d cookie_size %d \n", md_size,
-               cookie_size);
- 
-        lustre_shrink_reply(req, md_off, md_size, 1);
-        
-        lustre_shrink_reply(req, md_off + (md_size > 0), cookie_size, 0); 
-}
-
-static int mds_reint_unlink(struct mds_update_record *rec, int offset,
-                            struct ptlrpc_request *req,
-                            struct lustre_handle *lh)
-{
-        struct dentry *dparent = NULL, *dchild;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_body *body = NULL;
-        struct inode *child_inode = NULL;
-        struct lustre_handle parent_lockh, child_lockh, child_reuse_lockh;
-        void *handle = NULL;
-        int rc = 0, cleanup_phase = 0;
-        unsigned int qcids[MAXQUOTAS] = { 0, 0 };
-        unsigned int qpids[MAXQUOTAS] = { 0, 0 };
-        ENTRY;
-
-        LASSERT(offset == REQ_REC_OFF); /*  || offset == DLM_INTENT_REC_OFF); */
-        offset = REPLY_REC_OFF;
-
-        DEBUG_REQ(D_INODE, req, "parent ino "LPU64"/%u, child %s",
-                  rec->ur_fid1->id, rec->ur_fid1->generation, rec->ur_name);
-
-        MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_UNLINK))
-                GOTO(cleanup, rc = -ENOENT);
-
-        if (rec->ur_dlm)
-                ldlm_request_cancel(req, rec->ur_dlm, 0);
-
-        rc = mds_get_parent_child_locked(obd, mds, rec->ur_fid1,
-                                         &parent_lockh, &dparent, LCK_EX,
-                                         MDS_INODELOCK_UPDATE, 
-                                         rec->ur_name, rec->ur_namelen,
-                                         &child_lockh, &dchild, LCK_EX, 
-                                         MDS_INODELOCK_FULL);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        cleanup_phase = 1; /* dchild, dparent, locks */
-
-        dget(dchild);
-        child_inode = dchild->d_inode;
-        if (child_inode == NULL) {
-                CDEBUG(D_INODE, "child doesn't exist (dir %lu, name %s)\n",
-                       dparent->d_inode->i_ino, rec->ur_name);
-                GOTO(cleanup, rc = -ENOENT);
-        }
-
-        /* save uid/gid for quota acquire/release */
-        qcids[USRQUOTA] = child_inode->i_uid;
-        qcids[GRPQUOTA] = child_inode->i_gid;
-        qpids[USRQUOTA] = dparent->d_inode->i_uid;
-        qpids[GRPQUOTA] = dparent->d_inode->i_gid;
-
-        cleanup_phase = 2; /* dchild has a lock */
-
-        /* We have to do these checks ourselves, in case we are making an
-         * orphan.  The client tells us whether rmdir() or unlink() was called,
-         * so we need to return appropriate errors (bug 72). */
-        if ((rec->ur_mode & S_IFMT) == S_IFDIR) {
-                if (!S_ISDIR(child_inode->i_mode))
-                        GOTO(cleanup, rc = -ENOTDIR);
-        } else {
-                if (S_ISDIR(child_inode->i_mode))
-                        GOTO(cleanup, rc = -EISDIR);
-        }
-
-        /* Check for EROFS after we check ENODENT, ENOTDIR, and EISDIR */
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)
-                GOTO(cleanup, rc = -EROFS);
-
-        /* Step 3: Get a lock on the ino to sync with creation WRT inode
-         * reuse (see bug 2029). */
-        rc = mds_lock_new_child(obd, child_inode, &child_reuse_lockh);
-        if (rc != ELDLM_OK)
-                GOTO(cleanup, rc);
-
-        cleanup_phase = 3; /* child inum lock */
-
-        OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_UNLINK_WRITE, dparent->d_inode->i_sb);
-
-        /* ldlm_reply in buf[0] if called via intent */
-        if (offset == DLM_INTENT_REC_OFF)
-                offset = DLM_REPLY_REC_OFF;
-
-        body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body));
-        LASSERT(body != NULL);
-
-        /* child orphan sem protects orphan_dec_test && is_orphan race */
-        MDS_DOWN_READ_ORPHAN_SEM(child_inode);
-        cleanup_phase = 4; /* MDS_UP_READ_ORPHAN_SEM(new_inode) when finished */
-
-        /* If this is potentially the last reference to this inode, get the
-         * OBD EA data first so the client can destroy OST objects.  We
-         * only do the object removal later if no open files/links remain. */
-        if ((S_ISDIR(child_inode->i_mode) && child_inode->i_nlink == 2) ||
-            child_inode->i_nlink == 1) {
-                if (mds_orphan_open_count(child_inode) > 0) {
-                        /* need to lock pending_dir before transaction */
-                        LOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode);
-                        cleanup_phase = 5; /* UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); */
-                } else if (S_ISREG(child_inode->i_mode)) {
-                        mds_pack_inode2fid(&body->fid1, child_inode);
-                        mds_pack_inode2body(body, child_inode);
-                        mds_pack_md(obd, req->rq_repmsg, offset + 1, body,
-                                    child_inode, MDS_PACK_MD_LOCK, 0);
-                }
-        }
-
-        /* Step 4: Do the unlink: we already verified ur_mode above (bug 72) */
-        switch (child_inode->i_mode & S_IFMT) {
-        case S_IFDIR:
-                /* Drop any lingering child directories before we start our
-                 * transaction, to avoid doing multiple inode dirty/delete
-                 * in our compound transaction (bug 1321). */
-                shrink_dcache_parent(dchild);
-                handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_RMDIR,
-                                      NULL);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                rc = vfs_rmdir(dparent->d_inode, dchild);
-                mds_counter_incr(req->rq_export, LPROC_MDS_RMDIR);
-                break;
-        case S_IFREG: {
-                struct lov_mds_md *lmm = lustre_msg_buf(req->rq_repmsg,
-                                                        offset + 1, 0);
-                handle = fsfilt_start_log(obd, dparent->d_inode,
-                                          FSFILT_OP_UNLINK, NULL,
-                                          le32_to_cpu(lmm->lmm_stripe_count));
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                rc = vfs_unlink(dparent->d_inode, dchild);
-                mds_counter_incr(req->rq_export, LPROC_MDS_UNLINK);
-                break;
-        }
-        case S_IFLNK:
-        case S_IFCHR:
-        case S_IFBLK:
-        case S_IFIFO:
-        case S_IFSOCK:
-                handle = fsfilt_start(obd, dparent->d_inode, FSFILT_OP_UNLINK,
-                                      NULL);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                rc = vfs_unlink(dparent->d_inode, dchild);
-                mds_counter_incr(req->rq_export, LPROC_MDS_UNLINK);
-                break;
-        default:
-                CERROR("bad file type %o unlinking %s\n", rec->ur_mode,
-                       rec->ur_name);
-                LBUG();
-                GOTO(cleanup, rc = -EINVAL);
-        }
-
-        if (rc == 0 && child_inode->i_nlink == 0) {
-                if (mds_orphan_open_count(child_inode) > 0)
-                        rc = mds_orphan_add_link(rec, obd, dchild);
-
-                if (rc == 1)
-                        GOTO(cleanup, rc = 0);
-
-                if (!S_ISREG(child_inode->i_mode))
-                        GOTO(cleanup, rc);
-
-                if (!(body->valid & OBD_MD_FLEASIZE)) {
-                        body->valid |=(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                       OBD_MD_FLATIME | OBD_MD_FLMTIME);
-                } else if (mds_log_op_unlink(obd,
-                                lustre_msg_buf(req->rq_repmsg, offset + 1, 0),
-                                lustre_msg_buflen(req->rq_repmsg, offset + 1),
-                                lustre_msg_buf(req->rq_repmsg, offset + 2, 0),
-                                lustre_msg_buflen(req->rq_repmsg, offset+2)) >
-                           0) {
-                        body->valid |= OBD_MD_FLCOOKIE;
-                }
-        }
-
-        GOTO(cleanup, rc);
-cleanup:
-        if (rc == 0) {
-                struct iattr iattr;
-                int err;
-
-                iattr.ia_valid = ATTR_MTIME | ATTR_CTIME;
-                LTIME_S(iattr.ia_mtime) = rec->ur_time;
-                LTIME_S(iattr.ia_ctime) = rec->ur_time;
-
-                err = fsfilt_setattr(obd, dparent, handle, &iattr, 0);
-                if (err)
-                        CERROR("error on parent setattr: rc = %d\n", err);
-        }
-
-        rc = mds_finish_transno(mds, dparent ? dparent->d_inode : NULL,
-                                handle, req, rc, 0, 0);
-        if (!rc)
-                (void)obd_set_info_async(mds->mds_osc_exp, strlen("unlinked"),
-                                         "unlinked", 0, NULL, NULL);
-        switch(cleanup_phase) {
-        case 5: /* pending_dir semaphore */
-                UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode);
-        case 4: /* child inode semaphore */
-                MDS_UP_READ_ORPHAN_SEM(child_inode);
-        case 3: /* child ino-reuse lock */
-                if (rc && body != NULL) {
-                        // Don't unlink the OST objects if the MDS unlink failed
-                        body->valid = 0;
-                }
-                if (rc)
-                        ldlm_lock_decref(&child_reuse_lockh, LCK_EX);
-                else
-                        ptlrpc_save_lock(req, &child_reuse_lockh, LCK_EX);
-        case 2: /* child lock */
-                ldlm_lock_decref(&child_lockh, LCK_EX);
-        case 1: /* child and parent dentry, parent lock */
-                if (rc)
-                        ldlm_lock_decref(&parent_lockh, LCK_EX);
-                else
-                        ptlrpc_save_lock(req, &parent_lockh, LCK_EX);
-                l_dput(dchild);
-                l_dput(dchild);
-                l_dput(dparent);
-        case 0:
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        req->rq_status = rc;
-
-        mds_shrink_reply(obd, req, body, REPLY_REC_OFF + 1);
-
-        /* trigger dqrel on the owner of child and parent */
-        lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc,
-                      FSFILT_OP_UNLINK);
-        return 0;
-}
-
-static int mds_reint_link(struct mds_update_record *rec, int offset,
-                          struct ptlrpc_request *req,
-                          struct lustre_handle *lh)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct dentry *de_src = NULL;
-        struct dentry *de_tgt_dir = NULL;
-        struct dentry *dchild = NULL;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct lustre_handle *handle = NULL, tgt_dir_lockh, src_lockh;
-        struct ldlm_res_id src_res_id = { .name = {0} };
-        struct ldlm_res_id tgt_dir_res_id = { .name = {0} };
-        ldlm_policy_data_t src_policy ={.l_inodebits = {MDS_INODELOCK_UPDATE}};
-        ldlm_policy_data_t tgt_dir_policy =
-                                       {.l_inodebits = {MDS_INODELOCK_UPDATE}};
-        int rc = 0, cleanup_phase = 0;
-        ENTRY;
-
-        LASSERT(offset == REQ_REC_OFF);
-
-        DEBUG_REQ(D_INODE, req, "original "LPU64"/%u to "LPU64"/%u %s",
-                  rec->ur_fid1->id, rec->ur_fid1->generation,
-                  rec->ur_fid2->id, rec->ur_fid2->generation, rec->ur_name);
-
-        mds_counter_incr(req->rq_export, LPROC_MDS_LINK);
-
-        MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_REINT_LINK))
-                GOTO(cleanup, rc = -ENOENT);
-
-        if (rec->ur_dlm)
-                ldlm_request_cancel(req, rec->ur_dlm, 0);
-        
-        /* Step 1: Lookup the source inode and target directory by FID */
-        de_src = mds_fid2dentry(mds, rec->ur_fid1, NULL);
-        if (IS_ERR(de_src))
-                GOTO(cleanup, rc = PTR_ERR(de_src));
-
-        cleanup_phase = 1; /* source dentry */
-
-        de_tgt_dir = mds_fid2dentry(mds, rec->ur_fid2, NULL);
-        if (IS_ERR(de_tgt_dir)) {
-                rc = PTR_ERR(de_tgt_dir);
-                de_tgt_dir = NULL;
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 2; /* target directory dentry */
-
-        CDEBUG(D_INODE, "linking %.*s/%s to inode %lu\n",
-               de_tgt_dir->d_name.len, de_tgt_dir->d_name.name, rec->ur_name,
-               de_src->d_inode->i_ino);
-
-        /* Step 2: Take the two locks */
-        src_res_id.name[0] = de_src->d_inode->i_ino;
-        src_res_id.name[1] = de_src->d_inode->i_generation;
-        tgt_dir_res_id.name[0] = de_tgt_dir->d_inode->i_ino;
-        tgt_dir_res_id.name[1] = de_tgt_dir->d_inode->i_generation;
-
-        rc = enqueue_ordered_locks(obd, &src_res_id, &src_lockh, LCK_EX,
-                                   &src_policy,
-                                   &tgt_dir_res_id, &tgt_dir_lockh, LCK_EX,
-                                   &tgt_dir_policy);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        cleanup_phase = 3; /* locks */
-
-        if (mds_inode_is_orphan(de_src->d_inode)) {
-                CDEBUG(D_INODE, "an attempt to link an orphan inode %lu/%u\n",
-                       de_src->d_inode->i_ino,
-                       de_src->d_inode->i_generation);
-                GOTO(cleanup, rc = -ENOENT);
-        }
-
-        /* Step 3: Lookup the child */
-        dchild = ll_lookup_one_len(rec->ur_name, de_tgt_dir, rec->ur_namelen-1);
-        if (IS_ERR(dchild)) {
-                rc = PTR_ERR(dchild);
-                if (rc != -EPERM && rc != -EACCES && rc != -ENAMETOOLONG)
-                        CERROR("child lookup error %d\n", rc);
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 4; /* child dentry */
-
-        if (dchild->d_inode) {
-                CDEBUG(D_INODE, "child exists (dir %lu, name %s)\n",
-                       de_tgt_dir->d_inode->i_ino, rec->ur_name);
-                rc = -EEXIST;
-                GOTO(cleanup, rc);
-        }
-
-        /* Step 4: Do it. */
-        OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_LINK_WRITE, de_src->d_inode->i_sb);
-
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)
-                GOTO(cleanup, rc = -EROFS);
-
-        handle = fsfilt_start(obd, de_tgt_dir->d_inode, FSFILT_OP_LINK, NULL);
-        if (IS_ERR(handle))
-                GOTO(cleanup, rc = PTR_ERR(handle));
-
-        rc = vfs_link(de_src, de_tgt_dir->d_inode, dchild);
-        if (rc && rc != -EPERM && rc != -EACCES)
-                CERROR("vfs_link error %d\n", rc);
-cleanup:
-        rc = mds_finish_transno(mds, de_tgt_dir ? de_tgt_dir->d_inode : NULL,
-                                handle, req, rc, 0, 0);
-        EXIT;
-
-        switch (cleanup_phase) {
-        case 4: /* child dentry */
-                l_dput(dchild);
-        case 3: /* locks */
-                if (rc) {
-                        ldlm_lock_decref(&src_lockh, LCK_EX);
-                        ldlm_lock_decref(&tgt_dir_lockh, LCK_EX);
-                } else {
-                        ptlrpc_save_lock(req, &src_lockh, LCK_EX);
-                        ptlrpc_save_lock(req, &tgt_dir_lockh, LCK_EX);
-                }
-        case 2: /* target dentry */
-                l_dput(de_tgt_dir);
-        case 1: /* source dentry */
-                l_dput(de_src);
-        case 0:
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        req->rq_status = rc;
-        return 0;
-}
-
-/* The idea here is that we need to get four locks in the end:
- * one on each parent directory, one on each child.  We need to take
- * these locks in some kind of order (to avoid deadlocks), and the order
- * I selected is "increasing resource number" order.  We need to look up
- * the children, however, before we know what the resource number(s) are.
- * Thus the following plan:
- *
- * 1,2. Look up the parents
- * 3,4. Look up the children
- * 5. Take locks on the parents and children, in order
- * 6. Verify that the children haven't changed since they were looked up
- *
- * If there was a race and the children changed since they were first looked
- * up, it is possible that mds_verify_child() will be able to just grab the
- * lock on the new child resource (if it has a higher resource than any other)
- * but we need to compare against not only its parent, but also against the
- * parent and child of the "other half" of the rename, hence maxres_{src,tgt}.
- *
- * We need the fancy igrab() on the child inodes because we aren't holding a
- * lock on the parent after the lookup is done, so dentry->d_inode may change
- * at any time, and igrab() itself doesn't like getting passed a NULL argument.
- */
-int mds_get_parents_children_locked(struct obd_device *obd,
-                                    struct mds_obd *mds,
-                                    struct ll_fid *p1_fid,
-                                    struct dentry **de_srcdirp,
-                                    struct ll_fid *p2_fid,
-                                    struct dentry **de_tgtdirp,
-                                    int parent_mode,
-                                    const char *old_name, int old_len,
-                                    struct dentry **de_oldp,
-                                    const char *new_name, int new_len,
-                                    struct dentry **de_newp,
-                                    struct lustre_handle *dlm_handles,
-                                    int child_mode)
-{
-        struct ldlm_res_id p1_res_id = { .name = {0} };
-        struct ldlm_res_id p2_res_id = { .name = {0} };
-        struct ldlm_res_id c1_res_id = { .name = {0} };
-        struct ldlm_res_id c2_res_id = { .name = {0} };
-        ldlm_policy_data_t p_policy = {.l_inodebits = {MDS_INODELOCK_UPDATE}};
-        /* Only dentry should disappear, but the inode itself would be
-           intact otherwise. */
-        ldlm_policy_data_t c1_policy = {.l_inodebits = {MDS_INODELOCK_LOOKUP}};
-        /* If something is going to be replaced, both dentry and inode locks are           needed */
-        ldlm_policy_data_t c2_policy = {.l_inodebits = {MDS_INODELOCK_FULL}};
-        struct ldlm_res_id *maxres_src, *maxres_tgt;
-        struct inode *inode;
-        int rc = 0, cleanup_phase = 0;
-        ENTRY;
-
-        /* Step 1: Lookup the source directory */
-        *de_srcdirp = mds_fid2dentry(mds, p1_fid, NULL);
-        if (IS_ERR(*de_srcdirp))
-                GOTO(cleanup, rc = PTR_ERR(*de_srcdirp));
-
-        cleanup_phase = 1; /* source directory dentry */
-
-        p1_res_id.name[0] = (*de_srcdirp)->d_inode->i_ino;
-        p1_res_id.name[1] = (*de_srcdirp)->d_inode->i_generation;
-
-        /* Step 2: Lookup the target directory */
-        if (memcmp(p1_fid, p2_fid, sizeof(*p1_fid)) == 0) {
-                *de_tgtdirp = dget(*de_srcdirp);
-        } else {
-                *de_tgtdirp = mds_fid2dentry(mds, p2_fid, NULL);
-                if (IS_ERR(*de_tgtdirp)) {
-                        rc = PTR_ERR(*de_tgtdirp);
-                        *de_tgtdirp = NULL;
-                        GOTO(cleanup, rc);
-                }
-        }
-
-        cleanup_phase = 2; /* target directory dentry */
-
-        p2_res_id.name[0] = (*de_tgtdirp)->d_inode->i_ino;
-        p2_res_id.name[1] = (*de_tgtdirp)->d_inode->i_generation;
-
-        /* Step 3: Lookup the source child entry */
-        *de_oldp = ll_lookup_one_len(old_name, *de_srcdirp, old_len - 1);
-        if (IS_ERR(*de_oldp)) {
-                rc = PTR_ERR(*de_oldp);
-                CDEBUG(D_INODE, "old child lookup error (%.*s): rc %d\n",
-                       old_len - 1, old_name, rc);
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 3; /* original name dentry */
-
-        inode = (*de_oldp)->d_inode;
-        if (inode != NULL)
-                inode = igrab(inode);
-        if (inode == NULL)
-                GOTO(cleanup, rc = -ENOENT);
-
-        c1_res_id.name[0] = inode->i_ino;
-        c1_res_id.name[1] = inode->i_generation;
-
-        iput(inode);
-
-        /* Step 4: Lookup the target child entry */
-        if (!new_name)
-                GOTO(retry_locks, rc);
-        *de_newp = ll_lookup_one_len(new_name, *de_tgtdirp, new_len - 1);
-        if (IS_ERR(*de_newp)) {
-                rc = PTR_ERR(*de_newp);
-                CDEBUG(D_DENTRY, "new child lookup error (%.*s): rc %d\n",
-                       old_len - 1, old_name, rc);
-                GOTO(cleanup, rc);
-        }
-
-        cleanup_phase = 4; /* target dentry */
-
-        inode = (*de_newp)->d_inode;
-        if (inode != NULL)
-                inode = igrab(inode);
-        if (inode == NULL)
-                goto retry_locks;
-
-        c2_res_id.name[0] = inode->i_ino;
-        c2_res_id.name[1] = inode->i_generation;
-        iput(inode);
-
-retry_locks:
-        /* Step 5: Take locks on the parents and child(ren) */
-        maxres_src = &p1_res_id;
-        maxres_tgt = &p2_res_id;
-        cleanup_phase = 4; /* target dentry */
-
-        if (c1_res_id.name[0] != 0 && res_gt(&c1_res_id, &p1_res_id,NULL,NULL))
-                maxres_src = &c1_res_id;
-        if (c2_res_id.name[0] != 0 && res_gt(&c2_res_id, &p2_res_id,NULL,NULL))
-                maxres_tgt = &c2_res_id;
-
-        rc = enqueue_4ordered_locks(obd, &p1_res_id,&dlm_handles[0],parent_mode,
-                                    &p_policy,
-                                    &p2_res_id, &dlm_handles[1], parent_mode,
-                                    &p_policy,
-                                    &c1_res_id, &dlm_handles[2], child_mode,
-                                    &c1_policy,
-                                    &c2_res_id, &dlm_handles[3], child_mode,
-                                    &c2_policy);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        cleanup_phase = 6; /* parent and child(ren) locks */
-
-        /* Step 6a: Re-lookup source child to verify it hasn't changed */
-        rc = mds_verify_child(obd, &p1_res_id, &dlm_handles[0], *de_srcdirp,
-                              parent_mode, &c1_res_id, &dlm_handles[2], de_oldp,
-                              child_mode, &c1_policy, old_name, old_len,
-                              maxres_tgt);
-        if (rc) {
-                if (c2_res_id.name[0] != 0)
-                        ldlm_lock_decref(&dlm_handles[3], child_mode);
-                ldlm_lock_decref(&dlm_handles[1], parent_mode);
-                cleanup_phase = 4;
-                if (rc > 0)
-                        goto retry_locks;
-                GOTO(cleanup, rc);
-        }
-
-        if ((*de_oldp)->d_inode == NULL)
-                GOTO(cleanup, rc = -ENOENT);
-
-        if (!new_name)
-                GOTO(cleanup, rc);
-        /* Step 6b: Re-lookup target child to verify it hasn't changed */
-        rc = mds_verify_child(obd, &p2_res_id, &dlm_handles[1], *de_tgtdirp,
-                              parent_mode, &c2_res_id, &dlm_handles[3], de_newp,
-                              child_mode, &c2_policy, new_name, new_len,
-                              maxres_src);
-        if (rc) {
-                ldlm_lock_decref(&dlm_handles[2], child_mode);
-                ldlm_lock_decref(&dlm_handles[0], parent_mode);
-                cleanup_phase = 4;
-                if (rc > 0)
-                        goto retry_locks;
-                GOTO(cleanup, rc);
-        }
-
-        EXIT;
-cleanup:
-        if (rc) {
-                switch (cleanup_phase) {
-                case 6: /* child lock(s) */
-                        if (c2_res_id.name[0] != 0)
-                                ldlm_lock_decref(&dlm_handles[3], child_mode);
-                        if (c1_res_id.name[0] != 0)
-                                ldlm_lock_decref(&dlm_handles[2], child_mode);
-                case 5: /* parent locks */
-                        ldlm_lock_decref(&dlm_handles[1], parent_mode);
-                        ldlm_lock_decref(&dlm_handles[0], parent_mode);
-                case 4: /* target dentry */
-                        l_dput(*de_newp);
-                case 3: /* source dentry */
-                        l_dput(*de_oldp);
-                case 2: /* target directory dentry */
-                        l_dput(*de_tgtdirp);
-                case 1: /* source directry dentry */
-                        l_dput(*de_srcdirp);
-                }
-        }
-
-        return rc;
-}
-
-static int mds_reint_rename(struct mds_update_record *rec, int offset,
-                            struct ptlrpc_request *req,
-                            struct lustre_handle *lockh)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct dentry *de_srcdir = NULL;
-        struct dentry *de_tgtdir = NULL;
-        struct dentry *de_old = NULL;
-        struct dentry *de_new = NULL;
-        struct inode *old_inode = NULL, *new_inode = NULL;
-        struct mds_obd *mds = mds_req2mds(req);
-        struct lustre_handle dlm_handles[4];
-        struct mds_body *body = NULL;
-        struct lov_mds_md *lmm = NULL;
-        int rc = 0, lock_count = 3, cleanup_phase = 0;
-        void *handle = NULL;
-        unsigned int qcids[MAXQUOTAS] = { 0, 0 };
-        unsigned int qpids[4] = { 0, 0, 0, 0 };
-        ENTRY;
-
-        LASSERT(offset == REQ_REC_OFF);
-        offset = REPLY_REC_OFF;
-
-        DEBUG_REQ(D_INODE, req, "parent "LPU64"/%u %s to "LPU64"/%u %s",
-                  rec->ur_fid1->id, rec->ur_fid1->generation, rec->ur_name,
-                  rec->ur_fid2->id, rec->ur_fid2->generation, rec->ur_tgt);
-
-        mds_counter_incr(req->rq_export, LPROC_MDS_RENAME);
-        
-        MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
-
-        if (rec->ur_dlm)
-                ldlm_request_cancel(req, rec->ur_dlm, 0);
-
-        rc = mds_get_parents_children_locked(obd, mds, rec->ur_fid1, &de_srcdir,
-                                             rec->ur_fid2, &de_tgtdir, LCK_EX,
-                                             rec->ur_name, rec->ur_namelen,
-                                             &de_old, rec->ur_tgt,
-                                             rec->ur_tgtlen, &de_new,
-                                             dlm_handles, LCK_EX);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        cleanup_phase = 1; /* parent(s), children, locks */
-
-        old_inode = de_old->d_inode;
-        new_inode = de_new->d_inode;
-
-        if (new_inode != NULL)
-                lock_count = 4;
-
-        /* sanity check for src inode */
-        if (old_inode->i_ino == de_srcdir->d_inode->i_ino ||
-            old_inode->i_ino == de_tgtdir->d_inode->i_ino)
-                GOTO(cleanup, rc = -EINVAL);
-
-        if (req->rq_export->exp_connect_flags & OBD_CONNECT_RDONLY)
-                GOTO(cleanup, rc = -EROFS);
-
-        if (new_inode == NULL)
-                goto no_unlink;
-
-        igrab(new_inode);
-        cleanup_phase = 2; /* iput(new_inode) when finished */
-
-        /* sanity check for dest inode */
-        if (new_inode->i_ino == de_srcdir->d_inode->i_ino ||
-            new_inode->i_ino == de_tgtdir->d_inode->i_ino)
-                GOTO(cleanup, rc = -EINVAL);
-
-        if (old_inode == new_inode)
-                GOTO(cleanup, rc = 0);
-
-        /* save uids/gids for qunit acquire/release */
-        qcids[USRQUOTA] = old_inode->i_uid;
-        qcids[GRPQUOTA] = old_inode->i_gid;
-        qpids[USRQUOTA] = de_tgtdir->d_inode->i_uid;
-        qpids[GRPQUOTA] = de_tgtdir->d_inode->i_gid;
-        qpids[2] = de_srcdir->d_inode->i_uid;
-        qpids[3] = de_srcdir->d_inode->i_gid;
-
-        /* if we are about to remove the target at first, pass the EA of
-         * that inode to client to perform and cleanup on OST */
-        body = lustre_msg_buf(req->rq_repmsg, offset, sizeof(*body));
-        LASSERT(body != NULL);
-
-        /* child orphan sem protects orphan_dec_test && is_orphan race */
-        MDS_DOWN_READ_ORPHAN_SEM(new_inode);
-        cleanup_phase = 3; /* MDS_UP_READ_ORPHAN_SEM(new_inode) when finished */
-
-        if ((S_ISDIR(new_inode->i_mode) && new_inode->i_nlink == 2) ||
-            new_inode->i_nlink == 1) {
-                if (mds_orphan_open_count(new_inode) > 0) {
-                        /* need to lock pending_dir before transaction */
-                        LOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode);
-                        cleanup_phase = 4; /* UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode); */
-                } else if (S_ISREG(new_inode->i_mode)) {
-                        mds_pack_inode2fid(&body->fid1, new_inode);
-                        mds_pack_inode2body(body, new_inode);
-                        mds_pack_md(obd, req->rq_repmsg, offset + 1, body,
-                                    new_inode, MDS_PACK_MD_LOCK, 0);
-                }
-        }
-
-no_unlink:
-        OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_REINT_RENAME_WRITE,
-                       de_srcdir->d_inode->i_sb);
-
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
-        /* Check if we are moving old entry into its child. 2.6 does not
-           check for this in vfs_rename() anymore */
-        if (is_subdir(de_new, de_old))
-                GOTO(cleanup, rc = -EINVAL);
-#endif
-
-        lmm = lustre_msg_buf(req->rq_repmsg, offset + 1, 0);
-        handle = fsfilt_start_log(obd, de_tgtdir->d_inode, FSFILT_OP_RENAME,
-                                  NULL, le32_to_cpu(lmm->lmm_stripe_count));
-
-        if (IS_ERR(handle))
-                GOTO(cleanup, rc = PTR_ERR(handle));
-
-        lock_kernel();
-        de_old->d_fsdata = req;
-        de_new->d_fsdata = req;
-
-        rc = vfs_rename(de_srcdir->d_inode, de_old, de_tgtdir->d_inode, de_new);
-        unlock_kernel();
-
-        if (rc == 0 && new_inode != NULL && new_inode->i_nlink == 0) {
-                if (mds_orphan_open_count(new_inode) > 0)
-                        rc = mds_orphan_add_link(rec, obd, de_new);
-
-                if (rc == 1)
-                        GOTO(cleanup, rc = 0);
-
-                if (!S_ISREG(new_inode->i_mode))
-                        GOTO(cleanup, rc);
-
-                if (!(body->valid & OBD_MD_FLEASIZE)) {
-                        body->valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS |
-                                        OBD_MD_FLATIME | OBD_MD_FLMTIME);
-                } else if (mds_log_op_unlink(obd,
-                                             lustre_msg_buf(req->rq_repmsg,
-                                                            offset + 1, 0),
-                                             lustre_msg_buflen(req->rq_repmsg,
-                                                               offset + 1),
-                                             lustre_msg_buf(req->rq_repmsg,
-                                                            offset + 2, 0),
-                                             lustre_msg_buflen(req->rq_repmsg,
-                                                               offset + 2))
-                           > 0) {
-                        body->valid |= OBD_MD_FLCOOKIE;
-                }
-        }
-
-        GOTO(cleanup, rc);
-cleanup:
-        rc = mds_finish_transno(mds, de_tgtdir ? de_tgtdir->d_inode : NULL,
-                                handle, req, rc, 0, 0);
-
-        switch (cleanup_phase) {
-        case 4:
-                UNLOCK_INODE_MUTEX(mds->mds_pending_dir->d_inode);
-        case 3:
-                MDS_UP_READ_ORPHAN_SEM(new_inode);
-        case 2:
-                iput(new_inode);
-        case 1:
-                if (rc) {
-                        if (lock_count == 4)
-                                ldlm_lock_decref(&(dlm_handles[3]), LCK_EX);
-                        ldlm_lock_decref(&(dlm_handles[2]), LCK_EX);
-                        ldlm_lock_decref(&(dlm_handles[1]), LCK_EX);
-                        ldlm_lock_decref(&(dlm_handles[0]), LCK_EX);
-                } else {
-                        if (lock_count == 4)
-                                ptlrpc_save_lock(req,&(dlm_handles[3]), LCK_EX);
-                        ptlrpc_save_lock(req, &(dlm_handles[2]), LCK_EX);
-                        ptlrpc_save_lock(req, &(dlm_handles[1]), LCK_EX);
-                        ptlrpc_save_lock(req, &(dlm_handles[0]), LCK_EX);
-                }
-                l_dput(de_new);
-                l_dput(de_old);
-                l_dput(de_tgtdir);
-                l_dput(de_srcdir);
-        case 0:
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-        req->rq_status = rc;
-
-        /* acquire/release qunit */
-        lquota_adjust(mds_quota_interface_ref, obd, qcids, qpids, rc,
-                      FSFILT_OP_RENAME);
-        return 0;
-}
-
-typedef int (*mds_reinter)(struct mds_update_record *, int offset,
-                           struct ptlrpc_request *, struct lustre_handle *);
-
-static mds_reinter reinters[REINT_MAX] = {
-        [REINT_SETATTR] mds_reint_setattr,
-        [REINT_CREATE] mds_reint_create,
-        [REINT_LINK] mds_reint_link,
-        [REINT_UNLINK] mds_reint_unlink,
-        [REINT_RENAME] mds_reint_rename,
-        [REINT_OPEN] mds_open
-};
-
-int mds_reint_rec(struct mds_update_record *rec, int offset,
-                  struct ptlrpc_request *req, struct lustre_handle *lockh)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mds_obd *mds = &obd->u.mds;
-        struct lvfs_run_ctxt saved;
-        int rc;
-#ifdef CRAY_XT3
-        gid_t fsgid = rec->ur_uc.luc_fsgid;
-#endif
-        ENTRY;
-
-#ifdef CRAY_XT3
-        if (req->rq_uid != LNET_UID_ANY) {
-                /* non-root local cluster client
-                 * NB root's creds are believed... */
-                LASSERT (req->rq_uid != 0);
-                rec->ur_uc.luc_fsuid = req->rq_uid;
-                rec->ur_uc.luc_cap = 0;
-        }
-#endif
-
-        /* get group info of this user */
-        rec->ur_uc.luc_uce = upcall_cache_get_entry(mds->mds_group_hash,
-                                                    rec->ur_uc.luc_fsuid,
-                                                    rec->ur_uc.luc_fsgid, 2,
-                                                    &rec->ur_uc.luc_suppgid1);
-
-        if (IS_ERR(rec->ur_uc.luc_uce)) {
-                rc = PTR_ERR(rec->ur_uc.luc_uce);
-                rec->ur_uc.luc_uce = NULL;
-                RETURN(rc);
-        }
-
-        /* checked by unpacker */
-        LASSERT(rec->ur_opcode < REINT_MAX && reinters[rec->ur_opcode] != NULL);
-
-#ifdef CRAY_XT3
-        if (rec->ur_uc.luc_uce)
-                rec->ur_uc.luc_fsgid = rec->ur_uc.luc_uce->ue_primary;
-#endif
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &rec->ur_uc);
-
-#ifdef CRAY_XT3
-        if (rec->ur_uc.luc_uce && fsgid != rec->ur_uc.luc_fsgid &&
-            in_group_p(fsgid)) {
-                rec->ur_uc.luc_fsgid = fsgid;
-                current->fsgid = saved.luc.luc_fsgid = fsgid;
-        }
-#endif
-
-        rc = reinters[rec->ur_opcode] (rec, offset, req, lockh);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &rec->ur_uc);
-
-        upcall_cache_put_entry(mds->mds_group_hash, rec->ur_uc.luc_uce);
-        RETURN(rc);
-}
diff --git a/lustre/mds/mds_unlink_open.c b/lustre/mds/mds_unlink_open.c
deleted file mode 100644
index 053c54915228faf8b0ce6ca9db5f0b217f99422b..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_unlink_open.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mds/mds_orphan.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-/* code for handling open unlinked files */
-
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/version.h>
-
-#include <libcfs/list.h>
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include <lustre_mds.h>
-#include <lustre_commit_confd.h>
-#include <lvfs.h>
-
-#include "mds_internal.h"
-
-int mds_osc_destroy_orphan(struct obd_device *obd,
-                           umode_t mode,
-                           struct lov_mds_md *lmm,
-                           int lmm_size,
-                           struct llog_cookie *logcookies,
-                           int log_unlink)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lov_stripe_md *lsm = NULL;
-        struct obd_trans_info oti = { 0 };
-        struct obdo *oa;
-        int rc;
-        ENTRY;
-
-        if (lmm_size == 0)
-                RETURN(0);
-
-        rc = obd_unpackmd(mds->mds_osc_exp, &lsm, lmm, lmm_size);
-        if (rc < 0) {
-                CERROR("Error unpack md %p\n", lmm);
-                RETURN(rc);
-        } else {
-                LASSERT(rc >= sizeof(*lsm));
-                rc = 0;
-        }
-
-        rc = obd_checkmd(mds->mds_osc_exp, obd->obd_self_export, lsm);
-        if (rc)
-                GOTO(out_free_memmd, rc);
-
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                GOTO(out_free_memmd, rc = -ENOMEM);
-        oa->o_id = lsm->lsm_object_id;
-        oa->o_mode = mode & S_IFMT;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE;
-
-        if (log_unlink && logcookies) {
-                oa->o_valid |= OBD_MD_FLCOOKIE;
-                oti.oti_logcookies = logcookies;
-        }
-        rc = obd_destroy(mds->mds_osc_exp, oa, lsm, &oti, obd->obd_self_export);
-        OBDO_FREE(oa);
-        if (rc)
-                CDEBUG(D_INODE, "destroy orphan objid 0x"LPX64" on ost error "
-                       "%d\n", lsm->lsm_object_id, rc);
-out_free_memmd:
-        obd_free_memmd(mds->mds_osc_exp, &lsm);
-        RETURN(rc);
-}
-
-static int mds_unlink_orphan(struct obd_device *obd, struct dentry *dchild,
-                             struct inode *inode, struct inode *pending_dir)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lov_mds_md *lmm = NULL;
-        struct llog_cookie *logcookies = NULL;
-        int lmm_size, log_unlink = 0, cookie_size = 0;
-        void *handle = NULL;
-        umode_t mode;
-        int rc, err;
-        ENTRY;
-
-        LASSERT(mds->mds_osc_obd != NULL);
-        
-        /* We don't need to do any of these other things for orhpan dirs,
-         * especially not mds_get_md (may get a default LOV EA, bug 4554) */
-        mode = inode->i_mode;
-        if (S_ISDIR(mode)) {
-                rc = vfs_rmdir(pending_dir, dchild);
-                if (rc)
-                        CERROR("error %d unlinking dir %*s from PENDING\n",
-                               rc, dchild->d_name.len, dchild->d_name.name);
-                RETURN(rc);
-        }
-
-        lmm_size = mds->mds_max_mdsize;
-        OBD_ALLOC(lmm, lmm_size);
-        if (lmm == NULL)
-                RETURN(-ENOMEM);
-
-        rc = mds_get_md(obd, inode, lmm, &lmm_size, 1, 0);
-        if (rc < 0)
-                GOTO(out_free_lmm, rc);
-
-        handle = fsfilt_start_log(obd, pending_dir, FSFILT_OP_UNLINK, NULL,
-                                  le32_to_cpu(lmm->lmm_stripe_count));
-        if (IS_ERR(handle)) {
-                rc = PTR_ERR(handle);
-                CERROR("error fsfilt_start: %d\n", rc);
-                handle = NULL;
-                GOTO(out_free_lmm, rc);
-        }
-
-        rc = vfs_unlink(pending_dir, dchild);
-        if (rc) {
-                CERROR("error %d unlinking orphan %.*s from PENDING\n",
-                       rc, dchild->d_name.len, dchild->d_name.name);
-        } else if (lmm_size) {
-                cookie_size = mds_get_cookie_size(obd, lmm); 
-                OBD_ALLOC(logcookies, cookie_size);
-                if (logcookies == NULL)
-                        rc = -ENOMEM;
-                else if (mds_log_op_unlink(obd, lmm,lmm_size,logcookies,
-                                           cookie_size) > 0)
-                        log_unlink = 1;
-        }
-
-        err = fsfilt_commit(obd, pending_dir, handle, 0);
-        if (err) {
-                CERROR("error committing orphan unlink: %d\n", err);
-                if (!rc)
-                        rc = err;
-        } else if (!rc) {
-                rc = mds_osc_destroy_orphan(obd, mode, lmm, lmm_size,
-                                            logcookies, log_unlink);
-        }
-
-        if (logcookies != NULL)
-                OBD_FREE(logcookies, cookie_size);
-out_free_lmm:
-        OBD_FREE(lmm, mds->mds_max_mdsize);
-        RETURN(rc);
-}
-
-/* Delete inodes which were previously open-unlinked but were not reopened
- * during MDS recovery for whatever reason (e.g. client also failed, recovery
- * aborted, etc). */
-int mds_cleanup_pending(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lvfs_run_ctxt saved;
-        struct file *file;
-        struct dentry *dchild, *dentry;
-        struct vfsmount *mnt;
-        struct inode *child_inode, *pending_dir = mds->mds_pending_dir->d_inode;
-        struct l_linux_dirent *dirent, *n;
-        struct list_head dentry_list;
-        char d_name[LL_FID_NAMELEN];
-        unsigned long inum;
-        int i = 0, rc = 0, item = 0, namlen;
-        ENTRY;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        /* dentry and mnt ref dropped in dentry_open() on error, or
-         * in filp_close() if dentry_open() succeeds */
-        dentry = dget(mds->mds_pending_dir);
-        if (IS_ERR(dentry))
-                GOTO(err_pop, rc = PTR_ERR(dentry));
-        mnt = mntget(mds->mds_vfsmnt);
-        if (IS_ERR(mnt))
-                GOTO(err_mntget, rc = PTR_ERR(mnt));
-
-        file = dentry_open(mds->mds_pending_dir, mds->mds_vfsmnt,
-                           O_RDONLY | O_LARGEFILE);
-        if (IS_ERR(file))
-                GOTO(err_pop, rc = PTR_ERR(file));
-
-        INIT_LIST_HEAD(&dentry_list);
-        rc = l_readdir(file, &dentry_list);
-        filp_close(file, 0);
-        if (rc < 0)
-                GOTO(err_out, rc);
-
-        list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) {
-                i++;
-                list_del(&dirent->lld_list);
-
-                namlen = strlen(dirent->lld_name);
-                LASSERT(sizeof(d_name) >= namlen + 1);
-                strcpy(d_name, dirent->lld_name);
-                inum = dirent->lld_ino;
-                OBD_FREE(dirent, sizeof(*dirent));
-
-                CDEBUG(D_INODE, "entry %d of PENDING DIR: %s\n", i, d_name);
-
-                if (((namlen == 1) && !strcmp(d_name, ".")) ||
-                    ((namlen == 2) && !strcmp(d_name, "..")) || inum == 0)
-                        continue;
-
-                LOCK_INODE_MUTEX(pending_dir);
-                dchild = lookup_one_len(d_name, mds->mds_pending_dir, namlen);
-                if (IS_ERR(dchild)) {
-                        UNLOCK_INODE_MUTEX(pending_dir);
-                        GOTO(err_out, rc = PTR_ERR(dchild));
-                }
-                if (!dchild->d_inode) {
-                        CWARN("%s: orphan %s has already been removed\n",
-                              obd->obd_name, d_name);
-                        GOTO(next, rc = 0);
-                }
-
-                if (is_bad_inode(dchild->d_inode)) {
-                        CERROR("%s: bad orphan inode found %lu/%u\n",
-                               obd->obd_name, dchild->d_inode->i_ino,
-                               dchild->d_inode->i_generation);
-                        GOTO(next, rc = -ENOENT);
-                }
-
-                child_inode = dchild->d_inode;
-                MDS_DOWN_READ_ORPHAN_SEM(child_inode);
-                if (mds_inode_is_orphan(child_inode) &&
-                    mds_orphan_open_count(child_inode)) {
-                        MDS_UP_READ_ORPHAN_SEM(child_inode);
-                        CWARN("%s: orphan %s re-opened during recovery\n",
-                              obd->obd_name, d_name);
-                        GOTO(next, rc = 0);
-                }
-                MDS_UP_READ_ORPHAN_SEM(child_inode);
-
-                rc = mds_unlink_orphan(obd, dchild, child_inode, pending_dir);
-                CDEBUG(D_INODE, "%s: removed orphan %s: rc %d\n",
-                       obd->obd_name, d_name, rc);
-                if (rc == 0)
-                        item++;
-                else
-                        rc = 0;
-next:
-                l_dput(dchild);
-                UNLOCK_INODE_MUTEX(pending_dir);
-        }
-        rc = 0;
-err_out:
-        list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) {
-                list_del(&dirent->lld_list);
-                OBD_FREE(dirent, sizeof(*dirent));
-        }
-err_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (item > 0)
-                CWARN("%s: removed %d pending open-unlinked files\n",
-                      obd->obd_name, item);
-        RETURN(rc);
-
-err_mntget:
-        l_dput(mds->mds_pending_dir);
-        goto err_pop;
-}
diff --git a/lustre/mds/mds_xattr.c b/lustre/mds/mds_xattr.c
deleted file mode 100644
index 6f663edc000c7f7a31f4ae10e3f0d727a3ed1815..0000000000000000000000000000000000000000
--- a/lustre/mds/mds_xattr.c
+++ /dev/null
@@ -1,366 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/mds/mds_xattr.c
- *  Lustre Metadata Server (mds) extended attributes handling
- *
- *  Copyright (C) 2004-2005 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/fs.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_fsfilt.h>
-#include <lustre_ucache.h>
-
-#include "mds_internal.h" 
-
-#ifndef XATTR_NAME_ACL_ACCESS
-#define XATTR_NAME_ACL_ACCESS   "system.posix_acl_access"
-#endif
-
-static int mds_getxattr_pack_msg(struct ptlrpc_request *req,
-                                 struct dentry *de,
-                                 struct mds_body *body)
-{
-        struct inode *inode = de->d_inode;
-        char *xattr_name;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int bufcnt = 2, rc = -EOPNOTSUPP, rc2;
-
-        if (inode == NULL)
-                return -ENOENT;
-
-        if (body->valid & OBD_MD_FLXATTR) {
-                xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF+1,0);
-                if (!xattr_name) {
-                        CERROR("can't extract xattr name\n");
-                        return -EFAULT;
-                }
-
-                if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_XATTR) &&
-                    (strncmp(xattr_name, "user.", 5) == 0))
-                        return -EOPNOTSUPP;
-
-                if (inode->i_op && inode->i_op->getxattr)
-                        rc = inode->i_op->getxattr(de, xattr_name, NULL, 0);
-        } else if (body->valid & OBD_MD_FLXATTRLS) {
-                if (inode->i_op && inode->i_op->listxattr)
-                        rc = inode->i_op->listxattr(de, NULL, 0);
-        } else {
-                CERROR("valid bits: "LPX64"\n", body->valid);
-                return -EINVAL;
-        }
-
-        if (rc < 0) {
-                if (rc != -ENODATA && rc != -EOPNOTSUPP)
-                        CWARN("get inode %lu EA size error: %d\n",
-                              inode->i_ino, rc);
-                bufcnt = 1;
-        } else {
-                size[bufcnt++] = min_t(int, body->eadatasize, rc);
-        }
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_MDS_GETXATTR_PACK)) {
-                CERROR("failed MDS_GETXATTR_PACK test\n");
-                req->rq_status = -ENOMEM;
-                return -ENOMEM;
-        }
-
-        rc2 = lustre_pack_reply(req, bufcnt, size, NULL);
-        if (rc2)
-                return rc2;
-
-        if (rc < 0)
-                req->rq_status = rc;
-        return 0;
-}
-
-static int mds_getxattr_internal(struct obd_device *obd,
-                                 struct dentry *dentry,
-                                 struct ptlrpc_request *req,
-                                 struct mds_body *reqbody)
-{
-        struct mds_body *repbody;
-        struct inode *inode = dentry->d_inode;
-        char *xattr_name;
-        void *buf = NULL;
-        int buflen, rc = -EOPNOTSUPP;
-        ENTRY;
-
-        if (inode == NULL)
-                GOTO(out, rc = -ENOENT);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        LASSERT(repbody != NULL);
-
-        buflen = lustre_msg_buflen(req->rq_repmsg, REPLY_REC_OFF + 1);
-        if (buflen)
-                buf = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, buflen);
-
-        if (reqbody->valid & OBD_MD_FLXATTR) {
-                xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF+1,0);
-                DEBUG_REQ(D_INODE, req, "getxattr %s", xattr_name);
-
-                if (inode->i_op && inode->i_op->getxattr) {
-                        lock_24kernel();
-                        rc = inode->i_op->getxattr(dentry, xattr_name,
-                                                   buf, buflen);
-                        unlock_24kernel();
-                }
-
-                if (rc < 0 && rc != -ENODATA && rc != -EOPNOTSUPP &&
-                    rc != -ERANGE)
-                        CDEBUG(D_OTHER, "getxattr failed: %d\n", rc);
-        } else if (reqbody->valid & OBD_MD_FLXATTRLS) {
-                DEBUG_REQ(D_INODE, req, "listxattr");
-
-                if (inode->i_op && inode->i_op->listxattr) {
-                        lock_24kernel();
-                        rc = inode->i_op->listxattr(dentry, buf, buflen);
-                        unlock_24kernel();
-                }
-                if (rc < 0)
-                        CDEBUG(D_OTHER, "listxattr failed: %d\n", rc);
-        } else
-                LBUG();
-
-        if (rc >= 0) {
-                repbody->eadatasize = rc;
-                rc = 0;
-        }
-out:
-        req->rq_status = rc;
-        RETURN(0);
-}
-
-int mds_getxattr(struct ptlrpc_request *req)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct lvfs_run_ctxt saved;
-        struct dentry *de;
-        struct mds_body *body;
-        struct lvfs_ucred uc = { NULL, };
-        int rc = 0;
-        ENTRY;
-
-        mds_counter_incr(req->rq_export, LPROC_MDS_GETXATTR);
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        rc = mds_init_ucred(&uc, req, REQ_REC_OFF);
-        if (rc)
-                GOTO(out_ucred, rc);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-        de = mds_fid2dentry(mds, &body->fid1, NULL);
-        if (IS_ERR(de)) {
-                rc = req->rq_status = PTR_ERR(de);
-                GOTO(out_pop, rc);
-        }
-
-        rc = mds_getxattr_pack_msg(req, de, body);
-        if (rc != 0 || req->rq_status)
-                GOTO(out_dput, rc);
-
-        rc = mds_getxattr_internal(obd, de, req, body);
-
-out_dput:
-        l_dput(de);
-out_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-out_ucred:
-        mds_exit_ucred(&uc, mds);
-        return rc;
-}
-
-/*
- * alwasy return 0, and set req->rq_status as error number in case
- * of failures.
- */
-static
-int mds_setxattr_internal(struct ptlrpc_request *req, struct mds_body *body)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct dentry *de;
-        struct inode *inode = NULL;
-        struct lustre_handle lockh;
-        void *handle = NULL;
-        char *xattr_name;
-        char *xattr = NULL;
-        int xattrlen;
-        int rc = -EOPNOTSUPP, err = 0;
-        __u64 lockpart;
-        ENTRY;
-
-        LASSERT(body);
-
-        DEBUG_REQ(D_INODE, req, "setxattr "LPU64"/%u",
-                  body->fid1.id, body->fid1.generation);
-
-        MDS_CHECK_RESENT(req, mds_reconstruct_generic(req));
-
-        lockpart = MDS_INODELOCK_UPDATE;
-
-        /* various sanity check for xattr name */
-        xattr_name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF + 1, 0);
-        if (!xattr_name) {
-                CERROR("can't extract xattr name\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        DEBUG_REQ(D_INODE, req, "%sxattr %s",
-                  body->valid & OBD_MD_FLXATTR ? "set" : "remove",
-                  xattr_name);
-
-        if (strncmp(xattr_name, "trusted.", 8) == 0) {
-                if (strcmp(xattr_name + 8, XATTR_LUSTRE_MDS_LOV_EA) == 0)
-                        GOTO(out, rc = -EACCES);
-        }
-
-        if (!(req->rq_export->exp_connect_flags & OBD_CONNECT_XATTR) &&
-            (strncmp(xattr_name, "user.", 5) == 0)) {
-                GOTO(out, rc = -EOPNOTSUPP);
-        }
-
-        if (!strcmp(xattr_name, XATTR_NAME_ACL_ACCESS))
-                lockpart |= MDS_INODELOCK_LOOKUP;
-
-        de = mds_fid2locked_dentry(obd, &body->fid1, NULL, LCK_EX,
-                                   &lockh, NULL, 0, lockpart);
-        if (IS_ERR(de))
-                GOTO(out, rc = PTR_ERR(de));
-
-        inode = de->d_inode;
-        LASSERT(inode);
-
-        OBD_FAIL_WRITE(obd, OBD_FAIL_MDS_SETXATTR_WRITE, inode->i_sb);
-
-        /* filter_op simply use setattr one */
-        handle = fsfilt_start(obd, inode, FSFILT_OP_SETATTR, NULL);
-        if (IS_ERR(handle))
-                GOTO(out_dput, rc = PTR_ERR(handle));
-
-        if (body->valid & OBD_MD_FLXATTR) {
-                if (inode->i_op && inode->i_op->setxattr) {
-                        if (lustre_msg_bufcount(req->rq_reqmsg) < 4) {
-                                CERROR("no xattr data supplied\n");
-                                GOTO(out_trans, rc = -EFAULT);
-                        }
-
-                        xattrlen = lustre_msg_buflen(req->rq_reqmsg,
-                                                     REQ_REC_OFF + 2);
-                        if (xattrlen)
-                                xattr = lustre_msg_buf(req->rq_reqmsg,
-                                                       REQ_REC_OFF+2, xattrlen);
-
-                        LOCK_INODE_MUTEX(inode);
-                        lock_24kernel();
-                        rc = inode->i_op->setxattr(de, xattr_name, xattr,
-                                                   xattrlen, body->flags);
-                        unlock_24kernel();
-                        UNLOCK_INODE_MUTEX(inode);
-                }
-        } else if (body->valid & OBD_MD_FLXATTRRM) {
-                if (inode->i_op && inode->i_op->removexattr) {
-                        LOCK_INODE_MUTEX(inode);
-                        lock_24kernel();
-                        rc = inode->i_op->removexattr(de, xattr_name);
-                        unlock_24kernel();
-                        UNLOCK_INODE_MUTEX(inode);
-                }
-        } else {
-                CERROR("valid bits: "LPX64"\n", body->valid);
-                rc = -EINVAL;
-        }
-
-        LASSERT(rc <= 0);
-out_trans:
-        err = mds_finish_transno(mds, inode, handle, req, rc, 0, 0);
-
-out_dput:
-        l_dput(de);
-        if (rc)
-                ldlm_lock_decref(&lockh, LCK_EX);
-        else
-                ptlrpc_save_lock (req, &lockh, LCK_EX);
-
-        if (err && !rc)
-                rc = err;
-out:
-        req->rq_status = rc;
-        return 0;
-}
-
-int mds_setxattr(struct ptlrpc_request *req)
-{
-        struct mds_obd *mds = mds_req2mds(req);
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct lvfs_run_ctxt saved;
-        struct mds_body *body;
-        struct lvfs_ucred uc = { NULL, };
-        int rc;
-        ENTRY;
-
-        mds_counter_incr(req->rq_export, LPROC_MDS_SETXATTR);
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_mds_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        if (lustre_msg_bufcount(req->rq_reqmsg) < 3)
-                RETURN(-EFAULT);
-
-        rc = mds_init_ucred(&uc, req, REQ_REC_OFF);
-        if (rc)
-                GOTO(out_ucred, rc);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        rc = mds_setxattr_internal(req, body);
-
-out_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, &uc);
-out_ucred:
-        mds_exit_ucred(&uc, mds);
-        return rc;
-}
diff --git a/lustre/mgc/.cvsignore b/lustre/mgc/.cvsignore
deleted file mode 100644
index d5103fafd735a92dd05fc733eaa24d9d40e41390..0000000000000000000000000000000000000000
--- a/lustre/mgc/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.o.flags
-.tmp_versions
-.depend
diff --git a/lustre/mgc/Makefile.in b/lustre/mgc/Makefile.in
deleted file mode 100644
index 8adca32e590a1a63e977e6aec8508e9e4986c224..0000000000000000000000000000000000000000
--- a/lustre/mgc/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := mgc
-mgc-objs := mgc_request.o lproc_mgc.o
-
-@INCLUDE_RULES@
diff --git a/lustre/mgc/autoMakefile.am b/lustre/mgc/autoMakefile.am
deleted file mode 100644
index 8b88691483fcdacd614838af693499fe25f8d224..0000000000000000000000000000000000000000
--- a/lustre/mgc/autoMakefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-# Copyright (C) 2006  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if LIBLUSTRE
-noinst_LIBRARIES = libmgc.a
-libmgc_a_SOURCES = libmgc.c
-libmgc_a_CPPFLAGS = $(LLCPPFLAGS)
-libmgc_a_CFLAGS = $(LLCFLAGS)
-endif
-
-if MODULES
-modulefs_DATA = mgc$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES := $(mgc-objs:%.o=%.c) libmgc.c mgc_internal.h
diff --git a/lustre/mgc/libmgc.c b/lustre/mgc/libmgc.c
deleted file mode 100644
index b72e8bbc6267ce45bbcd4d56ee8f3fd99000d667..0000000000000000000000000000000000000000
--- a/lustre/mgc/libmgc.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mgc/mgc_request.c
- *  Lustre Management Client
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-/* Minimal MGC for liblustre: only used to read the config log from the MGS
-   at setup time, no updates. */
- 
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MGC
-
-#include <liblustre.h>
-
-#include <obd_class.h>
-#include <lustre_dlm.h>
-#include <lustre_log.h>
-#include <lustre_fsfilt.h>
-#include <lustre_disk.h>
-
-static int mgc_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        int rc;
-        ENTRY;
-
-        ptlrpcd_addref();
-
-        rc = client_obd_setup(obd, len, buf);
-        if (rc)
-                GOTO(err_decref, rc);
-
-        rc = obd_llog_init(obd, obd, 0, NULL, NULL);
-        if (rc) {
-                CERROR("failed to setup llogging subsystems\n");
-                GOTO(err_cleanup, rc);
-        }
-
-        RETURN(rc);
-
-err_cleanup:
-        client_obd_cleanup(obd);
-err_decref:
-        ptlrpcd_decref();
-        RETURN(rc);
-}
-
-static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY: 
-        case OBD_CLEANUP_EXPORTS:
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                rc = obd_llog_finish(obd, 0);
-                if (rc != 0)
-                        CERROR("failed to cleanup llogging subsystems\n");
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int mgc_cleanup(struct obd_device *obd)
-{
-        struct client_obd *cli = &obd->u.cli;
-        int rc;
-        ENTRY;
-
-        LASSERT(cli->cl_mgc_vfsmnt == NULL);
-        
-        ptlrpcd_decref();
-
-        rc = client_obd_cleanup(obd);
-        RETURN(rc);
-}
-
-static int mgc_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                         int count, struct llog_catid *logid, 
-                         struct obd_uuid *uuid)
-{
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL,
-                        &llog_client_ops);
-        if (rc == 0) {
-                ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
-                ctxt->loc_imp = obd->u.cli.cl_import;
-                llog_ctxt_put(ctxt);
-        }
-
-        RETURN(rc);
-}
-
-static int mgc_llog_finish(struct obd_device *obd, int count)
-{
-        int rc;
-        ENTRY;
-
-        rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_REPL_CTXT));
-
-        RETURN(rc);
-}
-
-struct obd_ops mgc_obd_ops = {
-        .o_owner        = THIS_MODULE,
-        .o_setup        = mgc_setup,
-        .o_precleanup   = mgc_precleanup,
-        .o_cleanup      = mgc_cleanup,
-        .o_add_conn     = client_import_add_conn,
-        .o_del_conn     = client_import_del_conn,
-        .o_connect      = client_connect_import,
-        .o_disconnect   = client_disconnect_export,
-        .o_llog_init    = mgc_llog_init,
-        .o_llog_finish  = mgc_llog_finish,
-};
-
-int __init mgc_init(void)
-{
-        return class_register_type(&mgc_obd_ops, NULL, LUSTRE_MGC_NAME);
-}
-
diff --git a/lustre/mgc/lproc_mgc.c b/lustre/mgc/lproc_mgc.c
deleted file mode 100644
index 1b1fd1289d3e6c1f70d7cc8df331232efe45233c..0000000000000000000000000000000000000000
--- a/lustre/mgc/lproc_mgc.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002 Cluster File Systems, Inc.
- *
- * This file is part of the Lustre file system, http://www.lustre.org
- * Lustre is a trademark of Cluster File Systems, Inc.
- *
- * You may have signed or agreed to another license before downloading
- * this software.  If so, you are bound by the terms and conditions
- * of that agreement, and the following does not apply to you.  See the
- * LICENSE file included with this distribution for more information.
- *
- * If you did not agree to a different license, then this copy of Lustre
- * is open source software; you can redistribute it and/or  modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * In either case, Lustre 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
- * license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#include <linux/vfs.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-
-#ifdef LPROCFS
-
-static struct lprocfs_vars lprocfs_mgc_obd_vars[] = {
-        { "uuid",            lprocfs_rd_uuid,          0, 0 },
-        { "ping",            0, lprocfs_wr_ping,          0 },
-        { "connect_flags",   lprocfs_rd_connect_flags, 0, 0 },
-        { "mgs_server_uuid", lprocfs_rd_server_uuid,   0, 0 },
-        { "mgs_conn_uuid",   lprocfs_rd_conn_uuid,     0, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_mgc_module_vars[] = {
-        { "num_refs",        lprocfs_rd_numrefs,       0, 0 },
-        { 0 }
-};
-
-void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars)
-{
-        lvars->module_vars = lprocfs_mgc_module_vars;
-        lvars->obd_vars    = lprocfs_mgc_obd_vars;
-}
-#endif /* LPROCFS */
diff --git a/lustre/mgc/mgc_internal.h b/lustre/mgc/mgc_internal.h
deleted file mode 100644
index 1edf122e3e867a95b950c518b33d8b266b07cd05..0000000000000000000000000000000000000000
--- a/lustre/mgc/mgc_internal.h
+++ /dev/null
@@ -1,24 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _MGC_INTERNAL_H
-#define _MGC_INTERNAL_H
-
-#include <libcfs/kp30.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_lib.h>
-#include <lustre_dlm.h>
-#include <lustre_log.h>
-#include <lustre_export.h>
-
-#ifdef LPROCFS
-void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static void lprocfs_mgc_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif  /* LPROCFS */
-
-#endif  /* _MGC_INTERNAL_H */
diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c
deleted file mode 100644
index e1ab586eb1c925e9fe80138b949207bf631e2c2d..0000000000000000000000000000000000000000
--- a/lustre/mgc/mgc_request.c
+++ /dev/null
@@ -1,1285 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mgc/mgc_request.c
- *  Lustre Management Client
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MGC
-#define D_MGC D_CONFIG /*|D_WARNING*/
-
-#ifdef __KERNEL__
-# include <linux/module.h>
-# include <linux/pagemap.h>
-# include <linux/miscdevice.h>
-# include <linux/init.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include <lustre_log.h>
-#include <lustre_fsfilt.h>
-#include <lustre_disk.h>
-#include "mgc_internal.h"
-
-static int mgc_name2resid(char *name, int len, struct ldlm_res_id *res_id)
-{
-        __u64 resname = 0;
-
-        if (len > 8) {
-                CERROR("name too long: %s\n", name);
-                return -EINVAL;
-        }
-        if (len <= 0) {
-                CERROR("missing name: %s\n", name);
-                return -EINVAL;
-        }
-        memcpy(&resname, name, len);
-
-        memset(res_id, 0, sizeof(*res_id));
-
-        /* Always use the same endianness for the resid */
-        res_id->name[0] = cpu_to_le64(resname);
-        CDEBUG(D_MGC, "log %s to resid "LPX64"/"LPX64" (%.8s)\n", name,
-               res_id->name[0], res_id->name[1], (char *)&res_id->name[0]);
-        return 0;
-}
-
-int mgc_fsname2resid(char *fsname, struct ldlm_res_id *res_id)
-{
-        /* fsname is at most 8 chars long, maybe contain "-".
-         * e.g. "lustre", "CFS-000" */
-        return mgc_name2resid(fsname, strlen(fsname), res_id);
-}
-EXPORT_SYMBOL(mgc_fsname2resid);
-
-int mgc_logname2resid(char *logname, struct ldlm_res_id *res_id)
-{
-        char *name_end;
-        int len;
-
-        /* logname consists of "fsname-nodetype".
-         * e.g. "lustre-MDT0001", "CFS-000-client" */
-        name_end = strrchr(logname, '-');
-        LASSERT(name_end);
-        len = name_end - logname;
-        return mgc_name2resid(logname, len, res_id);
-}
-
-
-/********************** config llog list **********************/
-static struct list_head config_llog_list = LIST_HEAD_INIT(config_llog_list);
-static spinlock_t       config_list_lock = SPIN_LOCK_UNLOCKED;
-
-/* Take a reference to a config log */
-static int config_log_get(struct config_llog_data *cld)
-{
-        ENTRY;
-        if (cld->cld_stopping)
-                RETURN(1);
-        atomic_inc(&cld->cld_refcount);
-        CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
-               atomic_read(&cld->cld_refcount));
-        RETURN(0);
-}
-
-/* Drop a reference to a config log.  When no longer referenced, 
-   we can free the config log data */
-static void config_log_put(struct config_llog_data *cld)
-{
-        ENTRY;
-        CDEBUG(D_INFO, "log %s refs %d\n", cld->cld_logname,
-               atomic_read(&cld->cld_refcount));
-        if (atomic_dec_and_test(&cld->cld_refcount)) {
-                CDEBUG(D_MGC, "dropping config log %s\n", cld->cld_logname);
-                class_export_put(cld->cld_mgcexp);
-                spin_lock(&config_list_lock);
-                list_del(&cld->cld_list_chain);
-                spin_unlock(&config_list_lock);
-                OBD_FREE(cld->cld_logname, strlen(cld->cld_logname) + 1);
-                if (cld->cld_cfg.cfg_instance != NULL)
-                        OBD_FREE(cld->cld_cfg.cfg_instance, 
-                                 strlen(cld->cld_cfg.cfg_instance) + 1);
-                OBD_FREE(cld, sizeof(*cld));
-        }
-        EXIT;
-}
-
-/* Find a config log by name */
-static struct config_llog_data *config_log_find(char *logname, 
-                                               struct config_llog_instance *cfg)
-{
-        struct list_head *tmp;
-        struct config_llog_data *cld;
-        char *logid = logname;
-        int match_instance = 0;
-        ENTRY;
-
-        if (cfg && cfg->cfg_instance) {
-                match_instance++;
-                logid = cfg->cfg_instance;
-        }
-        if (!logid) {
-                CERROR("No log specified\n");
-                RETURN(ERR_PTR(-EINVAL));
-        }
-
-        spin_lock(&config_list_lock);
-        list_for_each(tmp, &config_llog_list) {
-                cld = list_entry(tmp, struct config_llog_data, cld_list_chain);
-                if (match_instance && cld->cld_cfg.cfg_instance && 
-                    strcmp(logid, cld->cld_cfg.cfg_instance) == 0)
-                        goto out_found;
-                if (!match_instance &&  
-                    strcmp(logid, cld->cld_logname) == 0)
-                        goto out_found;
-        }
-        spin_unlock(&config_list_lock);
-
-        CDEBUG(D_CONFIG, "can't get log %s\n", logid);
-        RETURN(ERR_PTR(-ENOENT));
-out_found:
-        atomic_inc(&cld->cld_refcount);
-        spin_unlock(&config_list_lock);
-        RETURN(cld);
-}
-
-/* Add this log to our list of active logs. 
-   We have one active log per "mount" - client instance or servername.
-   Each instance may be at a different point in the log. */
-static int config_log_add(char *logname, struct config_llog_instance *cfg,
-                          struct super_block *sb)
-{
-        struct config_llog_data *cld;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MGC, "adding config log %s:%s\n", logname, cfg->cfg_instance);
-        
-        OBD_ALLOC(cld, sizeof(*cld));
-        if (!cld) 
-                RETURN(-ENOMEM);
-        OBD_ALLOC(cld->cld_logname, strlen(logname) + 1);
-        if (!cld->cld_logname) { 
-                OBD_FREE(cld, sizeof(*cld));
-                RETURN(-ENOMEM);
-        }
-        strcpy(cld->cld_logname, logname);
-        cld->cld_cfg = *cfg;
-        cld->cld_cfg.cfg_last_idx = 0;
-        cld->cld_cfg.cfg_flags = 0;
-        cld->cld_cfg.cfg_sb = sb;
-        atomic_set(&cld->cld_refcount, 1);
-        
-        /* Keep the mgc around until we are done */
-        cld->cld_mgcexp = class_export_get(lsi->lsi_mgc->obd_self_export);
-        
-        if (cfg->cfg_instance != NULL) {
-                OBD_ALLOC(cld->cld_cfg.cfg_instance, 
-                          strlen(cfg->cfg_instance) + 1);
-                strcpy(cld->cld_cfg.cfg_instance, cfg->cfg_instance);
-        }
-        rc = mgc_logname2resid(logname, &cld->cld_resid);
-        spin_lock(&config_list_lock);
-        list_add(&cld->cld_list_chain, &config_llog_list);
-        spin_unlock(&config_list_lock);
-        
-        if (rc) {
-                config_log_put(cld);
-                RETURN(rc);
-        }
-        
-        RETURN(rc);
-}
-
-/* Stop watching for updates on this log. */
-static int config_log_end(char *logname, struct config_llog_instance *cfg)
-{       
-        struct config_llog_data *cld;
-        int rc = 0;
-        ENTRY;
-                                       
-        cld = config_log_find(logname, cfg);
-        if (IS_ERR(cld)) 
-                RETURN(PTR_ERR(cld));
-        /* drop the ref from the find */
-        config_log_put(cld);
-
-        cld->cld_stopping = 1;
-        /* drop the start ref */
-        config_log_put(cld);
-        CDEBUG(D_MGC, "end config log %s (%d)\n", logname ? logname : "client",
-               rc);
-        RETURN(rc);
-}
-
-/* reenqueue any lost locks */
-#define RQ_RUNNING 0x1
-#define RQ_NOW     0x2
-#define RQ_LATER   0x4
-#define RQ_STOP    0x8
-static int rq_state = 0;
-static cfs_waitq_t rq_waitq;
-
-static int mgc_process_log(struct obd_device *mgc, 
-                           struct config_llog_data *cld);
-
-static int mgc_requeue_thread(void *data)
-{
-        struct l_wait_info lwi_now, lwi_later;
-        struct config_llog_data *cld, *n;
-        char name[] = "ll_cfg_requeue";
-        int rc = 0;
-        ENTRY;
-        
-        ptlrpc_daemonize(name);
-        
-        CDEBUG(D_MGC, "Starting requeue thread\n");
-
-        lwi_later = LWI_TIMEOUT(60 * HZ, NULL, NULL);
-        l_wait_event(rq_waitq, rq_state & (RQ_NOW | RQ_STOP), &lwi_later);
-
-        /* Keep trying failed locks periodically */
-        spin_lock(&config_list_lock);
-        while (rq_state & (RQ_NOW | RQ_LATER)) {
-                /* Any new or requeued lostlocks will change the state */
-                rq_state &= ~(RQ_NOW | RQ_LATER); 
-                spin_unlock(&config_list_lock);
-
-                /* Always wait a few seconds to allow the server who 
-                   caused the lock revocation to finish its setup, plus some
-                   random so everyone doesn't try to reconnect at once. */
-                lwi_now = LWI_TIMEOUT(3 * HZ + (ll_rand() & 0xff) * (HZ / 100),
-                                      NULL, NULL);
-                l_wait_event(rq_waitq, rq_state & RQ_STOP, &lwi_now);
-                
-                spin_lock(&config_list_lock);
-                list_for_each_entry_safe(cld, n, &config_llog_list,
-                                         cld_list_chain) {
-                        spin_unlock(&config_list_lock);
-                        
-                        if (cld->cld_lostlock) {
-                                CDEBUG(D_MGC, "updating log %s\n", 
-                                       cld->cld_logname);
-                                cld->cld_lostlock = 0;
-                                rc = mgc_process_log(cld->cld_mgcexp->exp_obd,
-                                                     cld);
-                                /* Whether we enqueued again or not in 
-                                   mgc_process_log, we're done with the ref 
-                                   from the old enqueue */        
-                                config_log_put(cld);
-                        }
-
-                        spin_lock(&config_list_lock);
-                }
-                spin_unlock(&config_list_lock);
-                
-                /* Wait a bit to see if anyone else needs a requeue */
-                l_wait_event(rq_waitq, rq_state & (RQ_NOW | RQ_STOP),
-                             &lwi_later);
-                spin_lock(&config_list_lock);
-        }
-        /* spinlock and while guarantee RQ_NOW and RQ_LATER are not set */
-        rq_state &= ~RQ_RUNNING;
-        spin_unlock(&config_list_lock);
-        
-        CDEBUG(D_MGC, "Ending requeue thread\n");
-        RETURN(rc);
-}
-
-/* Add a cld to the list to requeue.  Start the requeue thread if needed.
-   We are responsible for dropping the config log reference from here on out. */
-static int mgc_requeue_add(struct config_llog_data *cld, int later)
-{
-        int rc = 0;
-
-        CDEBUG(D_INFO, "log %s: requeue (l=%d r=%d sp=%d st=%x)\n", 
-               cld->cld_logname, later, atomic_read(&cld->cld_refcount),
-               cld->cld_stopping, rq_state);
-        
-        /* Hold lock for rq_state */
-        spin_lock(&config_list_lock);
-        cld->cld_lostlock = 1;
-
-        if (cld->cld_stopping || (rq_state & RQ_STOP)) {
-                spin_unlock(&config_list_lock);
-                config_log_put(cld);
-                RETURN(0);
-        }
-
-        if (!(rq_state & RQ_RUNNING)) {
-                LASSERT(rq_state == 0);
-                rq_state = RQ_RUNNING | (later ? RQ_LATER : RQ_NOW);
-                spin_unlock(&config_list_lock);
-                rc = cfs_kernel_thread(mgc_requeue_thread, 0,
-                                       CLONE_VM | CLONE_FILES);
-                if (rc < 0) {
-                        CERROR("log %s: cannot start requeue thread (%d),"
-                               "no more log updates!\n", cld->cld_logname, rc);
-                        /* Drop the ref, since the rq thread won't */
-                        cld->cld_lostlock = 0;
-                        config_log_put(cld);
-                        rq_state = 0;
-                        RETURN(rc);
-                }
-        } else {
-                rq_state |= later ? RQ_LATER : RQ_NOW;
-                spin_unlock(&config_list_lock);
-                cfs_waitq_signal(&rq_waitq);
-        }
-
-        RETURN(0);
-}
-
-/********************** class fns **********************/
-
-static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb, 
-                        struct vfsmount *mnt)
-{
-        struct lvfs_run_ctxt saved;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct client_obd *cli = &obd->u.cli;
-        struct dentry *dentry;
-        char *label;
-        int err = 0;
-        ENTRY;
-
-        LASSERT(lsi);
-        LASSERT(lsi->lsi_srv_mnt == mnt);
-
-        /* The mgc fs exclusion sem. Only one fs can be setup at a time. */
-        down(&cli->cl_mgc_sem);
-
-        cleanup_group_info();
-
-        obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd));
-        if (IS_ERR(obd->obd_fsops)) {
-                up(&cli->cl_mgc_sem);
-                CERROR("No fstype %s rc=%ld\n", MT_STR(lsi->lsi_ldd), 
-                       PTR_ERR(obd->obd_fsops));
-                RETURN(PTR_ERR(obd->obd_fsops));
-        }
-
-        cli->cl_mgc_vfsmnt = mnt;
-        fsfilt_setup(obd, mnt->mnt_sb);
-
-        OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt);
-        obd->obd_lvfs_ctxt.pwdmnt = mnt;
-        obd->obd_lvfs_ctxt.pwd = mnt->mnt_root;
-        obd->obd_lvfs_ctxt.fs = get_ds();
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        dentry = lookup_one_len(MOUNT_CONFIGS_DIR, current->fs->pwd,
-                                strlen(MOUNT_CONFIGS_DIR));
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (IS_ERR(dentry)) {
-                err = PTR_ERR(dentry);
-                CERROR("cannot lookup %s directory: rc = %d\n", 
-                       MOUNT_CONFIGS_DIR, err);
-                GOTO(err_ops, err);
-        }
-        cli->cl_mgc_configs_dir = dentry;
-
-        /* We take an obd ref to insure that we can't get to mgc_cleanup
-           without calling mgc_fs_cleanup first. */
-        class_incref(obd);
-
-        label = fsfilt_get_label(obd, mnt->mnt_sb);
-        if (label)
-                CDEBUG(D_MGC, "MGC using disk labelled=%s\n", label);
-
-        /* We keep the cl_mgc_sem until mgc_fs_cleanup */
-        RETURN(0);
-
-err_ops:        
-        fsfilt_put_ops(obd->obd_fsops);
-        obd->obd_fsops = NULL;
-        cli->cl_mgc_vfsmnt = NULL;
-        up(&cli->cl_mgc_sem);
-        RETURN(err);
-}
-
-static int mgc_fs_cleanup(struct obd_device *obd)
-{
-        struct client_obd *cli = &obd->u.cli;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(cli->cl_mgc_vfsmnt != NULL);
-
-        if (cli->cl_mgc_configs_dir != NULL) {
-                struct lvfs_run_ctxt saved;
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                l_dput(cli->cl_mgc_configs_dir);
-                cli->cl_mgc_configs_dir = NULL; 
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                class_decref(obd);
-        }
-
-        cli->cl_mgc_vfsmnt = NULL;
-        if (obd->obd_fsops) 
-                fsfilt_put_ops(obd->obd_fsops);
-        
-        up(&cli->cl_mgc_sem);
-
-        RETURN(rc);
-}
-
-static atomic_t mgc_count = ATOMIC_INIT(0);
-static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY: 
-                break;
-        case OBD_CLEANUP_EXPORTS:
-                if (atomic_dec_and_test(&mgc_count)) {
-                        /* Kick the requeue waitq - cld's should all be 
-                           stopping */
-                        spin_lock(&config_list_lock);
-                        rq_state |= RQ_STOP;
-                        spin_unlock(&config_list_lock);
-                        cfs_waitq_signal(&rq_waitq);
-                }
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                rc = obd_llog_finish(obd, 0);
-                if (rc != 0)
-                        CERROR("failed to cleanup llogging subsystems\n");
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int mgc_cleanup(struct obd_device *obd)
-{
-        struct client_obd *cli = &obd->u.cli;
-        int rc;
-        ENTRY;
-
-        LASSERT(cli->cl_mgc_vfsmnt == NULL);
-        
-        /* COMPAT_146 - old config logs may have added profiles we don't 
-           know about */
-        if (obd->obd_type->typ_refcnt <= 1) 
-                /* Only for the last mgc */
-                class_del_profiles();
-
-        lprocfs_obd_cleanup(obd);
-        ptlrpcd_decref();
-
-        rc = client_obd_cleanup(obd);
-        RETURN(rc);
-}
-
-static int mgc_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        int rc;
-        ENTRY;
-
-        ptlrpcd_addref();
-
-        rc = client_obd_setup(obd, len, buf);
-        if (rc)
-                GOTO(err_decref, rc);
-
-        rc = obd_llog_init(obd, obd, 0, NULL, NULL);
-        if (rc) {
-                CERROR("failed to setup llogging subsystems\n");
-                GOTO(err_cleanup, rc);
-        }
-
-        lprocfs_mgc_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        spin_lock(&config_list_lock);
-        atomic_inc(&mgc_count);
-        if (atomic_read(&mgc_count) == 1) {
-                rq_state &= ~RQ_STOP;
-                cfs_waitq_init(&rq_waitq);
-        }
-        spin_unlock(&config_list_lock);
-        
-        RETURN(rc);
-
-err_cleanup:
-        client_obd_cleanup(obd);
-err_decref:
-        ptlrpcd_decref();
-        RETURN(rc);
-}
-
-/* based on ll_mdc_blocking_ast */
-static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
-                            void *data, int flag)
-{
-        struct lustre_handle lockh;
-        struct config_llog_data *cld = (struct config_llog_data *)data;
-        int rc = 0;
-        ENTRY;
-
-        switch (flag) {
-        case LDLM_CB_BLOCKING:
-                /* mgs wants the lock, give it up... */
-                LDLM_DEBUG(lock, "MGC blocking CB");
-                ldlm_lock2handle(lock, &lockh);
-                rc = ldlm_cli_cancel(&lockh);
-                break;
-        case LDLM_CB_CANCELING: {
-                /* We've given up the lock, prepare ourselves to update. */
-                LDLM_DEBUG(lock, "MGC cancel CB");
-                
-                CDEBUG(D_MGC, "Lock res "LPX64" (%.8s)\n",
-                       lock->l_resource->lr_name.name[0], 
-                       (char *)&lock->l_resource->lr_name.name[0]);
-                
-                if (!cld) {
-                        CERROR("missing data, won't requeue\n");
-                        break;
-                }
-                /* Are we done with this log? */
-                if (cld->cld_stopping) {
-                        CDEBUG(D_MGC, "log %s: stopping, won't requeue\n", 
-                               cld->cld_logname);
-                        config_log_put(cld);    
-                        break;
-                }
-                /* Make sure not to re-enqueue when the mgc is stopping
-                   (we get called from client_disconnect_export) */
-                if (!lock->l_conn_export ||
-                    !lock->l_conn_export->exp_obd->u.cli.cl_conn_count) {
-                        CDEBUG(D_MGC, "log %s: disconnecting, won't requeue\n",
-                               cld->cld_logname);
-                        config_log_put(cld);    
-                        break;
-                }
-                /* Did we fail to get the lock? */
-                if (lock->l_req_mode != lock->l_granted_mode) {
-                        CDEBUG(D_MGC, "log %s: original grant failed, will "
-                               "requeue later\n", cld->cld_logname);
-                        /* Try to re-enqueue later */
-                        rc = mgc_requeue_add(cld, 1);
-                        break;
-                }
-                /* Re-enqueue now */
-                rc = mgc_requeue_add(cld, 0);
-                break;
-        }
-        default:
-                LBUG();
-        }
-
-
-        if (rc) {
-                CERROR("%s CB failed %d:\n", flag == LDLM_CB_BLOCKING ? 
-                       "blocking" : "cancel", rc);
-                LDLM_ERROR(lock, "MGC ast");
-        }
-        RETURN(rc);
-}
-
-/* Take a config lock so we can get cancel notifications */
-static int mgc_enqueue(struct obd_export *exp, struct lov_stripe_md *lsm,
-                       __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                       int *flags, void *bl_cb, void *cp_cb, void *gl_cb,
-                       void *data, __u32 lvb_len, void *lvb_swabber,
-                       struct lustre_handle *lockh)
-{                       
-        struct config_llog_data *cld = (struct config_llog_data *)data;
-        struct ldlm_enqueue_info einfo = { type, mode, mgc_blocking_ast,
-                ldlm_completion_ast, NULL, data};
-
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MGC, "Enqueue for %s (res "LPX64")\n", cld->cld_logname,
-               cld->cld_resid.name[0]);
-                
-        /* We can only drop this config log ref when we drop the lock */
-        if (config_log_get(cld))
-                RETURN(ELDLM_LOCK_ABORTED);
-
-        /* We need a callback for every lockholder, so don't try to
-           ldlm_lock_match (see rev 1.1.2.11.2.47) */
-
-        rc = ldlm_cli_enqueue(exp, NULL, &einfo, cld->cld_resid,
-                              NULL, flags, NULL, 0, NULL, lockh, 0);
-        /* A failed enqueue should still call the mgc_blocking_ast, 
-           where it will be requeued if needed ("grant failed"). */ 
-
-        RETURN(rc);
-}
-
-static int mgc_cancel(struct obd_export *exp, struct lov_stripe_md *md,
-                      __u32 mode, struct lustre_handle *lockh)
-{
-        ENTRY;
-
-        ldlm_lock_decref(lockh, mode);
-
-        RETURN(0);
-}
-
-#if 0
-static int mgc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_ioctl_data *data = karg;
-        struct llog_ctxt *ctxt;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        ENTRY;
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_INC_USE_COUNT;
-#else
-        if (!try_module_get(THIS_MODULE)) {
-                CERROR("Can't get module. Is it alive?");
-                return -EINVAL;
-        }
-#endif
-        switch (cmd) {
-        /* REPLicator context */
-        case OBD_IOC_PARSE: {
-                CERROR("MGC parsing llog %s\n", data->ioc_inlbuf1);
-                ctxt = llog_get_context(exp->exp_obd, LLOG_CONFIG_REPL_CTXT);
-                rc = class_config_parse_llog(ctxt, data->ioc_inlbuf1, NULL);
-                GOTO(out, rc);
-        }
-#ifdef __KERNEL__
-        case OBD_IOC_LLOG_INFO:
-        case OBD_IOC_LLOG_PRINT: {
-                ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
-                rc = llog_ioctl(ctxt, cmd, data);
-
-                GOTO(out, rc);
-        }
-#endif
-        /* ORIGinator context */
-        case OBD_IOC_DUMP_LOG: {
-                ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                if (rc)
-                        RETURN(rc);
-
-                GOTO(out, rc);
-        }
-        default:
-                CERROR("mgc_ioctl(): unrecognised ioctl %#x\n", cmd);
-                GOTO(out, rc = -ENOTTY);
-        }
-out:
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_DEC_USE_COUNT;
-#else
-        module_put(THIS_MODULE);
-#endif
-
-        return rc;
-}
-#endif
-
-/* Send target_reg message to MGS */
-static int mgc_target_register(struct obd_export *exp,
-                               struct mgs_target_info *mti)
-{
-        struct ptlrpc_request *req;
-        struct mgs_target_info *req_mti, *rep_mti;
-        int size[] = { sizeof(struct ptlrpc_body), sizeof(*req_mti) };
-        int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*mti) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MGS_VERSION,
-                              MGS_TARGET_REG, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        req_mti = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*req_mti));
-        if (!req_mti) 
-                RETURN(-ENOMEM);
-        memcpy(req_mti, mti, sizeof(*req_mti));
-
-        ptlrpc_req_set_repsize(req, 2, rep_size);
-
-        CDEBUG(D_MGC, "register %s\n", mti->mti_svname);
-        
-        rc = ptlrpc_queue_wait(req);
-        if (!rc) {
-                rep_mti = lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                             sizeof(*rep_mti),
-                                             lustre_swab_mgs_target_info);
-                memcpy(mti, rep_mti, sizeof(*rep_mti));
-                CDEBUG(D_MGC, "register %s got index = %d\n",
-                       mti->mti_svname, mti->mti_stripe_index);
-        }
-        ptlrpc_req_finished(req);
-
-        RETURN(rc);
-}
-
-/* Send parameter to MGS*/
-static int mgc_set_mgs_param(struct obd_export *exp,
-                             struct mgs_send_param *msp)
-{
-        struct ptlrpc_request *req;
-        struct mgs_send_param *req_msp, *rep_msp;
-        int size[] = { sizeof(struct ptlrpc_body), sizeof(*req_msp) };
-        int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*msp) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_MGS_VERSION,
-                              MGS_SET_INFO, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        req_msp = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*req_msp));
-        if (!req_msp)
-                RETURN(-ENOMEM);
-
-        memcpy(req_msp, msp, sizeof(*req_msp));
-        ptlrpc_req_set_repsize(req, 2, rep_size);
-        rc = ptlrpc_queue_wait(req);
-        if (!rc) {
-                rep_msp = lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                             sizeof(*rep_msp), NULL);
-                memcpy(msp, rep_msp, sizeof(*rep_msp));
-        }
-
-        ptlrpc_req_finished(req);
-
-        RETURN(rc);
-}
-
-int mgc_set_info_async(struct obd_export *exp, obd_count keylen,
-                       void *key, obd_count vallen, void *val, 
-                       struct ptlrpc_request_set *set)
-{
-        struct obd_import *imp = class_exp2cliimp(exp);
-        int rc = -EINVAL;
-        ENTRY;
-
-        /* Try to "recover" the initial connection; i.e. retry */
-        if (KEY_IS(KEY_INIT_RECOV)) {
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-                spin_lock(&imp->imp_lock);
-                imp->imp_initial_recov = *(int *)val;
-                spin_unlock(&imp->imp_lock);
-                CDEBUG(D_HA, "%s: set imp_initial_recov = %d\n",
-                       exp->exp_obd->obd_name, imp->imp_initial_recov);
-                RETURN(0);
-        }
-        /* Turn off initial_recov after we try all backup servers once */
-        if (KEY_IS(KEY_INIT_RECOV_BACKUP)) {
-                int value;
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-                value = *(int *)val;
-                spin_lock(&imp->imp_lock);
-                imp->imp_initial_recov_bk = value > 0;
-                /* Even after the initial connection, give up all comms if 
-                   nobody answers the first time. */
-                imp->imp_recon_bk = 1;
-                spin_unlock(&imp->imp_lock);
-                CDEBUG(D_MGC, "InitRecov %s %d/%d:d%d:i%d:r%d:or%d:%s\n", 
-                       imp->imp_obd->obd_name, value, imp->imp_initial_recov,
-                       imp->imp_deactive, imp->imp_invalid, 
-                       imp->imp_replayable, imp->imp_obd->obd_replayable,
-                       ptlrpc_import_state_name(imp->imp_state));
-                /* Resurrect if we previously died */
-                if (imp->imp_invalid || value > 1) 
-                        ptlrpc_reconnect_import(imp);
-                RETURN(0);
-        }
-        /* FIXME move this to mgc_process_config */
-        if (KEY_IS("register_target")) {
-                struct mgs_target_info *mti;
-                if (vallen != sizeof(struct mgs_target_info))
-                        RETURN(-EINVAL);
-                mti = (struct mgs_target_info *)val;
-                CDEBUG(D_MGC, "register_target %s %#x\n",
-                       mti->mti_svname, mti->mti_flags);
-                rc =  mgc_target_register(exp, mti);
-                RETURN(rc);
-        }
-        if (KEY_IS("set_fs")) {
-                struct super_block *sb = (struct super_block *)val;
-                struct lustre_sb_info *lsi;
-                if (vallen != sizeof(struct super_block))
-                        RETURN(-EINVAL);
-                lsi = s2lsi(sb);
-                rc = mgc_fs_setup(exp->exp_obd, sb, lsi->lsi_srv_mnt);
-                if (rc) {
-                        CERROR("set_fs got %d\n", rc);
-                }
-                RETURN(rc);
-        }
-        if (KEY_IS("clear_fs")) {
-                if (vallen != 0)
-                        RETURN(-EINVAL);
-                rc = mgc_fs_cleanup(exp->exp_obd);
-                if (rc) {
-                        CERROR("clear_fs got %d\n", rc);
-                }
-                RETURN(rc);
-        }
-        if (KEY_IS(KEY_SET_INFO)) {
-                struct mgs_send_param *msp;
-
-                msp = (struct mgs_send_param *)val;
-                rc =  mgc_set_mgs_param(exp, msp);
-                RETURN(rc);
-        }
-
-        RETURN(rc);
-}
-
-static int mgc_import_event(struct obd_device *obd,
-                            struct obd_import *imp,
-                            enum obd_import_event event)
-{
-        int rc = 0;
-
-        LASSERT(imp->imp_obd == obd);
-        CDEBUG(D_MGC, "import event %#x\n", event);
-
-        switch (event) {
-        case IMP_EVENT_DISCON: 
-                /* MGC imports should not wait for recovery */
-                break;
-        case IMP_EVENT_INACTIVE: 
-                break;
-        case IMP_EVENT_INVALIDATE: {
-                struct ldlm_namespace *ns = obd->obd_namespace;
-                ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
-                break;
-        }
-        case IMP_EVENT_ACTIVE: 
-                LCONSOLE_WARN("%s: Reactivating import\n", obd->obd_name);
-                /* Clearing obd_no_recov allows us to continue pinging */
-                obd->obd_no_recov = 0;
-                break;
-        case IMP_EVENT_OCD:
-                break;
-        default:
-                CERROR("Unknown import event %#x\n", event);
-                LBUG();
-        }
-        RETURN(rc);
-}
-
-static int mgc_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                         int count, struct llog_catid *logid,
-                         struct obd_uuid *uuid)
-{
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_CONFIG_ORIG_CTXT, tgt, 0, NULL,
-                        &llog_lvfs_ops);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_setup(obd, LLOG_CONFIG_REPL_CTXT, tgt, 0, NULL,
-                        &llog_client_ops);
-        if (rc == 0) {
-                ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT);
-                ctxt->loc_imp = obd->u.cli.cl_import;
-                llog_ctxt_put(ctxt);
-        }
-
-        RETURN(rc);
-}
-
-static int mgc_llog_finish(struct obd_device *obd, int count)
-{
-        int rc;
-        ENTRY;
-
-        rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_REPL_CTXT));
-        rc = llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT));
-
-        RETURN(rc);
-}
-
-/* identical to mgs_log_is_empty */
-static int mgc_llog_is_empty(struct obd_device *obd, struct llog_ctxt *ctxt,
-                            char *name)
-{
-        struct lvfs_run_ctxt saved;
-        struct llog_handle *llh;
-        int rc = 0;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc == 0) {
-                llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-                rc = llog_get_size(llh);
-                llog_close(llh);
-        }
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        /* header is record 1 */
-        return(rc <= 1);
-}
-
-static int mgc_copy_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, 
-                            void *data)
-{
-        struct llog_rec_hdr local_rec = *rec;
-        struct llog_handle *local_llh = (struct llog_handle *)data;
-        char *cfg_buf = (char*) (rec + 1);
-        struct lustre_cfg *lcfg;
-        int rc = 0;
-        ENTRY;
-
-        /* Append all records */
-        local_rec.lrh_len -= sizeof(*rec) + sizeof(struct llog_rec_tail);
-        rc = llog_write_rec(local_llh, &local_rec, NULL, 0, 
-                            (void *)cfg_buf, -1);
-
-        lcfg = (struct lustre_cfg *)cfg_buf;
-        CDEBUG(D_INFO, "idx=%d, rc=%d, len=%d, cmd %x %s %s\n", 
-               rec->lrh_index, rc, rec->lrh_len, lcfg->lcfg_command, 
-               lustre_cfg_string(lcfg, 0), lustre_cfg_string(lcfg, 1));
-
-        RETURN(rc);
-}
-
-/* Copy a remote log locally */
-static int mgc_copy_llog(struct obd_device *obd, struct llog_ctxt *rctxt,
-                         struct llog_ctxt *lctxt, char *logname)
-{
-        struct llog_handle *local_llh, *remote_llh;
-        struct obd_uuid *uuid;
-        char *temp_log;
-        int rc, rc2;
-        ENTRY;
-
-        /* Write new log to a temp name, then vfs_rename over logname
-           upon successful completion. */
-
-        OBD_ALLOC(temp_log, strlen(logname) + 1);
-        if (!temp_log) 
-                RETURN(-ENOMEM);
-        sprintf(temp_log, "%sT", logname);
-
-        /* Make sure there's no old temp log */
-        rc = llog_create(lctxt, &local_llh, NULL, temp_log);
-        if (rc)
-                GOTO(out, rc);
-        rc = llog_init_handle(local_llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc) 
-                GOTO(out, rc);
-        rc = llog_destroy(local_llh);
-        llog_free_handle(local_llh);
-        if (rc)
-                GOTO(out, rc);
-
-        /* open local log */
-        rc = llog_create(lctxt, &local_llh, NULL, temp_log);
-        if (rc)
-                GOTO(out, rc);
-
-        /* set the log header uuid for fun */
-        OBD_ALLOC_PTR(uuid);
-        obd_str2uuid(uuid, logname);
-        rc = llog_init_handle(local_llh, LLOG_F_IS_PLAIN, uuid);
-        OBD_FREE_PTR(uuid);
-        if (rc)
-                GOTO(out_closel, rc);
-
-        /* open remote log */
-        rc = llog_create(rctxt, &remote_llh, NULL, logname);
-        if (rc)
-                GOTO(out_closel, rc);
-        rc = llog_init_handle(remote_llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc)
-                GOTO(out_closer, rc);
-
-        /* Copy remote log */
-        rc = llog_process(remote_llh, mgc_copy_handler,(void *)local_llh, NULL);
-
-out_closer:
-        rc2 = llog_close(remote_llh);
-        if (!rc)
-                rc = rc2;
-out_closel:
-        rc2 = llog_close(local_llh);
-        if (!rc)
-                rc = rc2;
-
-        /* We've copied the remote log to the local temp log, now
-           replace the old local log with the temp log. */
-        if (!rc) {
-                struct client_obd *cli = &obd->u.cli;
-                LASSERT(cli);
-                LASSERT(cli->cl_mgc_configs_dir);
-                rc = lustre_rename(cli->cl_mgc_configs_dir, temp_log, logname);
-        }
-        CDEBUG(D_MGC, "Copied remote log %s (%d)\n", logname, rc);
-out:
-        if (rc)
-                CERROR("Failed to copy remote log %s (%d)\n", logname, rc);
-        OBD_FREE(temp_log, strlen(logname) + 1);
-        RETURN(rc);
-}
-
-DECLARE_MUTEX(llog_process_lock);
-
-/* Get a config log from the MGS and process it.
-   This func is called for both clients and servers. */
-static int mgc_process_log(struct obd_device *mgc, 
-                           struct config_llog_data *cld)
-{
-        struct llog_ctxt *ctxt, *lctxt;
-        struct lustre_handle lockh;
-        struct client_obd *cli = &mgc->u.cli;
-        struct lvfs_run_ctxt saved;
-        struct lustre_sb_info *lsi;
-        int rc = 0, rcl, flags = 0, must_pop = 0;
-        ENTRY;
-
-        if (!cld || !cld->cld_cfg.cfg_sb) {
-                /* This should never happen */
-                CERROR("Missing cld, aborting log update\n");
-                RETURN(-EINVAL);
-        }
-        if (cld->cld_stopping) 
-                RETURN(0);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MGC_PAUSE_PROCESS_LOG, 20);
-
-        lsi = s2lsi(cld->cld_cfg.cfg_sb);
-
-        CDEBUG(D_MGC, "Process log %s:%s from %d\n", cld->cld_logname, 
-               cld->cld_cfg.cfg_instance, cld->cld_cfg.cfg_last_idx + 1);
-
-        ctxt = llog_get_context(mgc, LLOG_CONFIG_REPL_CTXT);
-        if (!ctxt) {
-                CERROR("missing llog context\n");
-                RETURN(-EINVAL);
-        }
-
-        /* I don't want mutliple processes running process_log at once -- 
-           sounds like badness.  It actually might be fine, as long as 
-           we're not trying to update from the same log
-           simultaneously (in which case we should use a per-log sem.) */
-        down(&llog_process_lock);
-
-        /* Get the cfg lock on the llog */
-        rcl = mgc_enqueue(mgc->u.cli.cl_mgc_mgsexp, NULL, LDLM_PLAIN, NULL, 
-                          LCK_CR, &flags, NULL, NULL, NULL, 
-                          cld, 0, NULL, &lockh);
-        if (rcl) 
-                CDEBUG(D_MGC, "Can't get cfg lock: %d\n", rcl);
-        
-        lctxt = llog_get_context(mgc, LLOG_CONFIG_ORIG_CTXT);
-
-        /* Copy the setup log locally if we can. Don't mess around if we're 
-           running an MGS though (logs are already local). */
-        if (lctxt && lsi && (lsi->lsi_flags & LSI_SERVER) && 
-            (lsi->lsi_srv_mnt == cli->cl_mgc_vfsmnt) &&
-            !IS_MGS(lsi->lsi_ldd)) {
-                push_ctxt(&saved, &mgc->obd_lvfs_ctxt, NULL);
-                must_pop++;
-                if (rcl == 0) 
-                        /* Only try to copy log if we have the lock. */
-                        rc = mgc_copy_llog(mgc, ctxt, lctxt, cld->cld_logname);
-                if (rcl || rc) {
-                        if (mgc_llog_is_empty(mgc, lctxt, cld->cld_logname)) {
-                                LCONSOLE_ERROR_MSG(0x13a, "Failed to get MGS "
-                                                   "log %s and no local copy."
-                                                   "\n", cld->cld_logname);
-                                GOTO(out_pop, rc = -ENOTCONN);
-                        }
-                        CDEBUG(D_MGC, "Failed to get MGS log %s, using local "
-                                      "copy for now, will try to update later.\n",
-                               cld->cld_logname);
-                }
-                /* Now, whether we copied or not, start using the local llog.
-                   If we failed to copy, we'll start using whatever the old 
-                   log has. */
-                llog_ctxt_put(ctxt);
-                ctxt = lctxt;
-        }
-
-        /* logname and instance info should be the same, so use our 
-           copy of the instance for the update.  The cfg_last_idx will
-           be updated here. */
-        rc = class_config_parse_llog(ctxt, cld->cld_logname, &cld->cld_cfg);
- 
-out_pop:
-        llog_ctxt_put(ctxt);
-        if (ctxt != lctxt)
-                llog_ctxt_put(lctxt);
-        if (must_pop) 
-                pop_ctxt(&saved, &mgc->obd_lvfs_ctxt, NULL);
-
-        /* Now drop the lock so MGS can revoke it */ 
-        if (!rcl) {
-                rcl = mgc_cancel(mgc->u.cli.cl_mgc_mgsexp, NULL, 
-                                 LCK_CR, &lockh);
-                if (rcl) 
-                        CERROR("Can't drop cfg lock: %d\n", rcl);
-        }
-        
-        CDEBUG(D_MGC, "%s: configuration from log '%s' %sed (%d).\n",
-               mgc->obd_name, cld->cld_logname, rc ? "fail" : "succeed", rc);
-
-        up(&llog_process_lock);
-        
-        RETURN(rc);
-}
-
-static int mgc_process_config(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lustre_cfg *lcfg = buf;
-        int cmd;
-        int rc = 0;
-        ENTRY;
-
-        switch(cmd = lcfg->lcfg_command) {
-        case LCFG_LOV_ADD_OBD: {
-                /* Add any new target, not just osts */
-                struct mgs_target_info *mti;
-
-                if (LUSTRE_CFG_BUFLEN(lcfg, 1) != 
-                    sizeof(struct mgs_target_info))
-                        GOTO(out, rc = -EINVAL);
-
-                mti = (struct mgs_target_info *)lustre_cfg_buf(lcfg, 1);
-                CDEBUG(D_MGC, "add_target %s %#x\n",    
-                       mti->mti_svname, mti->mti_flags);
-                rc = mgc_target_register(obd->u.cli.cl_mgc_mgsexp, mti);
-                break;
-        }
-        case LCFG_LOV_DEL_OBD:
-                /* Remove target from the fs? */  
-                /* FIXME */
-                CERROR("lov_del_obd unimplemented\n");
-                rc = -ENOSYS;
-                break;
-        case LCFG_LOG_START: {
-                struct config_llog_data *cld;
-                struct config_llog_instance *cfg;
-                struct super_block *sb;
-                char *logname = lustre_cfg_string(lcfg, 1);
-                cfg = (struct config_llog_instance *)lustre_cfg_buf(lcfg, 2);
-                sb = *(struct super_block **)lustre_cfg_buf(lcfg, 3);
-                
-                CDEBUG(D_MGC, "parse_log %s from %d\n", logname, 
-                       cfg->cfg_last_idx);
-
-                /* We're only called through here on the initial mount */
-                rc = config_log_add(logname, cfg, sb);
-                if (rc) 
-                        break;
-                cld = config_log_find(logname, cfg);
-                if (IS_ERR(cld)) {
-                        rc = PTR_ERR(cld);
-                        break;
-                }
-                
-                /* COMPAT_146 */
-                /* FIXME only set this for old logs!  Right now this forces
-                   us to always skip the "inside markers" check */
-                cld->cld_cfg.cfg_flags |= CFG_F_COMPAT146;
-                
-                rc = mgc_process_log(obd, cld);
-                config_log_put(cld);
-                
-                break;       
-        }
-        case LCFG_LOG_END: {
-                struct config_llog_instance *cfg = NULL;
-                char *logname = lustre_cfg_string(lcfg, 1);
-                if (lcfg->lcfg_bufcount >= 2)
-                        cfg = (struct config_llog_instance *)lustre_cfg_buf(
-                                lcfg, 2);
-                rc = config_log_end(logname, cfg);
-                break;
-        }
-        default: {
-                CERROR("Unknown command: %d\n", lcfg->lcfg_command);
-                GOTO(out, rc = -EINVAL);
-
-        }
-        }
-out:
-        RETURN(rc);
-}
-
-struct obd_ops mgc_obd_ops = {
-        .o_owner        = THIS_MODULE,
-        .o_setup        = mgc_setup,
-        .o_precleanup   = mgc_precleanup,
-        .o_cleanup      = mgc_cleanup,
-        .o_add_conn     = client_import_add_conn,
-        .o_del_conn     = client_import_del_conn,
-        .o_connect      = client_connect_import,
-        .o_disconnect   = client_disconnect_export,
-        //.o_enqueue      = mgc_enqueue,
-        .o_cancel       = mgc_cancel,
-        //.o_iocontrol    = mgc_iocontrol,
-        .o_set_info_async = mgc_set_info_async,
-        .o_import_event = mgc_import_event,
-        .o_llog_init    = mgc_llog_init,
-        .o_llog_finish  = mgc_llog_finish,
-        .o_process_config = mgc_process_config,
-};
-
-int __init mgc_init(void)
-{
-        return class_register_type(&mgc_obd_ops, NULL, LUSTRE_MGC_NAME);
-}
-
-#ifdef __KERNEL__
-static void /*__exit*/ mgc_exit(void)
-{
-        class_unregister_type(LUSTRE_MGC_NAME);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Management Client");
-MODULE_LICENSE("GPL");
-
-module_init(mgc_init);
-module_exit(mgc_exit);
-#endif
diff --git a/lustre/mgs/.cvsignore b/lustre/mgs/.cvsignore
deleted file mode 100644
index d5103fafd735a92dd05fc733eaa24d9d40e41390..0000000000000000000000000000000000000000
--- a/lustre/mgs/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.o.flags
-.tmp_versions
-.depend
diff --git a/lustre/mgs/Makefile.in b/lustre/mgs/Makefile.in
deleted file mode 100644
index 8bb6a5fe34c4dc075006aae815e1437301f087f6..0000000000000000000000000000000000000000
--- a/lustre/mgs/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := mgs
-mgs-objs := mgs_handler.o mgs_fs.o mgs_llog.o lproc_mgs.o
-
-@INCLUDE_RULES@
diff --git a/lustre/mgs/autoMakefile.am b/lustre/mgs/autoMakefile.am
deleted file mode 100644
index 53734b07ca1423719995eb54435b7f2af291f4f3..0000000000000000000000000000000000000000
--- a/lustre/mgs/autoMakefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if MODULES
-modulefs_DATA = mgs$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES := $(mgs-objs:%.o=%.c) mgs_internal.h
diff --git a/lustre/mgs/lproc_mgs.c b/lustre/mgs/lproc_mgs.c
deleted file mode 100644
index 5a4f32925315222bbda8f5bf38c127d5235f474d..0000000000000000000000000000000000000000
--- a/lustre/mgs/lproc_mgs.c
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <asm/statfs.h>
-#endif
-#include <obd.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include "mgs_internal.h"
-
-
-#ifdef LPROCFS
-
-static int lprocfs_mgs_rd_mntdev(char *page, char **start, off_t off, int count,
-                                 int *eof, void *data)
-{
-        struct obd_device* obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->u.mgs.mgs_vfsmnt->mnt_devname);
-        *eof = 1;
-
-        return snprintf(page, count, "%s\n",obd->u.mgs.mgs_vfsmnt->mnt_devname);
-}
-
-static int mgs_fs_seq_show(struct seq_file *seq, void *v)
-{
-        struct obd_device *obd = seq->private;
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct list_head dentry_list;
-        struct l_linux_dirent *dirent, *n;
-        int rc, len;
-        ENTRY;
-
-        LASSERT(obd != NULL);
-        rc = class_dentry_readdir(obd, mgs->mgs_configs_dir,
-                                  mgs->mgs_vfsmnt, &dentry_list);
-        if (rc) {
-                CERROR("Can't read config dir\n");
-                RETURN(rc);
-        }
-        list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) {
-                list_del(&dirent->lld_list);
-                len = strlen(dirent->lld_name);
-                if ((len > 7) && (strncmp(dirent->lld_name + len - 7, "-client",
-                                          len) == 0)) {
-                        seq_printf(seq, "%.*s\n", len - 7, dirent->lld_name);
-                }
-                OBD_FREE(dirent, sizeof(*dirent));
-        }
-
-        RETURN(0);
-}
-
-LPROC_SEQ_FOPS_RO(mgs_fs);
-
-int lproc_mgs_setup(struct obd_device *obd)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        int rc;
-
-        rc = lprocfs_obd_seq_create(obd, "filesystems", 0444,
-                                    &mgs_fs_fops, obd);
-        mgs->mgs_proc_live = proc_mkdir("live", obd->obd_proc_entry);
-        obd->obd_proc_exports_entry = proc_mkdir("exports",
-                                                 obd->obd_proc_entry);
-
-        return rc;
-}
-
-int lproc_mgs_cleanup(struct obd_device *obd)
-{
-        struct mgs_obd *mgs;
-
-        if (!obd)
-                return -EINVAL;
-
-        mgs = &obd->u.mgs;
-        if (mgs->mgs_proc_live) {
-                /* Should be no live entries */
-                LASSERT(mgs->mgs_proc_live->subdir == NULL);
-                lprocfs_remove(&mgs->mgs_proc_live);
-                mgs->mgs_proc_live = NULL;
-        }
-        lprocfs_free_per_client_stats(obd);
-        lprocfs_free_obd_stats(obd);
-
-        return lprocfs_obd_cleanup(obd);
-}
-
-static int mgs_live_seq_show(struct seq_file *seq, void *v) 
-{
-        struct fs_db *fsdb = seq->private;
-        int i;
-        
-        down(&fsdb->fsdb_sem);
-
-        seq_printf(seq, "fsname: %s\n", fsdb->fsdb_name);
-        seq_printf(seq, "flags: %#x     gen: %d\n", 
-                   fsdb->fsdb_flags, fsdb->fsdb_gen);
-        for (i = 0; i < INDEX_MAP_SIZE * 8; i++)
-                 if (test_bit(i, fsdb->fsdb_mdt_index_map)) 
-                         seq_printf(seq, "%s-MDT%04x\n", fsdb->fsdb_name, i);
-        for (i = 0; i < INDEX_MAP_SIZE * 8; i++)
-                 if (test_bit(i, fsdb->fsdb_ost_index_map)) 
-                         seq_printf(seq, "%s-OST%04x\n", fsdb->fsdb_name, i);
-
-        up(&fsdb->fsdb_sem);
-        return 0;
-}
-
-LPROC_SEQ_FOPS_RO(mgs_live);
-
-int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        int rc;
-
-        if (!mgs->mgs_proc_live) 
-                return 0;
-        rc = lprocfs_seq_create(mgs->mgs_proc_live, fsdb->fsdb_name, 0444, 
-                                &mgs_live_fops, fsdb);
-
-        return 0;
-}
-
-int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-
-        if (!mgs->mgs_proc_live) 
-                return 0;
-        remove_proc_entry(fsdb->fsdb_name, mgs->mgs_proc_live);
-        return 0;
-}
-
-struct lprocfs_vars lprocfs_mgs_obd_vars[] = {
-        { "uuid",            lprocfs_rd_uuid,        0, 0 },
-        { "fstype",          lprocfs_rd_fstype,      0, 0 },
-        { "mntdev",          lprocfs_mgs_rd_mntdev,  0, 0 },
-        { "num_exports",     lprocfs_rd_num_exports, 0, 0 },
-        { "evict_client",    0, lprocfs_wr_evict_client, 0 },
-        { 0 }
-};
-
-struct lprocfs_vars lprocfs_mgs_module_vars[] = {
-        { 0 }
-};
-
-void mgs_counter_incr(struct obd_export *exp, int opcode)
-{
-        lprocfs_counter_incr(exp->exp_obd->obd_stats, opcode);
-        lprocfs_counter_incr(exp->exp_ops_stats, opcode);
-}
-
-void mgs_stats_counter_init(struct lprocfs_stats *stats)
-{
-        lprocfs_counter_init(stats, LPROC_MGS_CONNECT, 0, "connect", "reqs");
-        lprocfs_counter_init(stats, LPROC_MGS_DISCONNECT, 0, "disconnect",
-                             "reqs");
-        lprocfs_counter_init(stats, LPROC_MGS_EXCEPTION, 0, "exception",
-                             "reqs");
-        lprocfs_counter_init(stats, LPROC_MGS_TARGET_REG, 0, "tgtreg", "reqs");
-        lprocfs_counter_init(stats, LPROC_MGS_TARGET_DEL, 0, "tgtdel", "reqs");
-}
-
-void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_mgs_module_vars;
-    lvars->obd_vars     = lprocfs_mgs_obd_vars;
-}
-#endif
diff --git a/lustre/mgs/mgs_fs.c b/lustre/mgs/mgs_fs.c
deleted file mode 100644
index 51abb0e03fc44a7828818d3786c7c5e6baa5788a..0000000000000000000000000000000000000000
--- a/lustre/mgs/mgs_fs.c
+++ /dev/null
@@ -1,240 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mgs/mgs_fs.c
- *  Lustre Management Server (MGS) filesystem interface code
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MGS
-
-#include <linux/module.h>
-#include <linux/kmod.h>
-#include <linux/version.h>
-#include <linux/sched.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <linux/mount.h>
-#endif
-#include <obd_class.h>
-#include <obd_support.h>
-#include <lustre_disk.h>
-#include <lustre_lib.h>
-#include <lustre_fsfilt.h>
-#include <libcfs/list.h>
-#include "mgs_internal.h"
-
-
-static int mgs_export_stats_init(struct obd_device *obd, struct obd_export *exp)
-{
-        int rc, num_stats, newnid;
-
-        rc = lprocfs_exp_setup(exp, 0, &newnid);
-        if (rc)
-                return rc;
-
-        if (newnid) {
-                num_stats = (sizeof(*obd->obd_type->typ_ops) / sizeof(void *)) +
-                             LPROC_MGS_LAST - 1;
-                exp->exp_ops_stats = lprocfs_alloc_stats(num_stats,
-                                                         LPROCFS_STATS_FLAG_NOPERCPU);
-                if (exp->exp_ops_stats == NULL)
-                        return -ENOMEM;
-                lprocfs_init_ops_stats(LPROC_MGS_LAST, exp->exp_ops_stats);
-                mgs_stats_counter_init(exp->exp_ops_stats);
-                lprocfs_register_stats(exp->exp_nid_stats->nid_proc, "stats", exp->exp_ops_stats);
-        }
-        return 0;
-}
-
-/* Add client export data to the MGS.  This data is currently NOT stored on
- * disk in the last_rcvd file or anywhere else.  In the event of a MGS
- * crash all connections are treated as new connections.
- */
-int mgs_client_add(struct obd_device *obd, struct obd_export *exp)
-{
-        return mgs_export_stats_init(obd, exp);
-}
-
-/* Remove client export data from the MGS */
-int mgs_client_free(struct obd_export *exp)
-{
-        return lprocfs_exp_cleanup(exp);
-}
-
-/* Same as mds_fid2dentry */
-/* Look up an entry by inode number. */
-/* this function ONLY returns valid dget'd dentries with an initialized inode
-   or errors */
-static struct dentry *mgs_fid2dentry(struct mgs_obd *mgs, struct ll_fid *fid)
-{
-        char fid_name[32];
-        unsigned long ino = fid->id;
-        __u32 generation = fid->generation;
-        struct inode *inode;
-        struct dentry *result;
-
-        CDEBUG(D_DENTRY, "--> mgs_fid2dentry: ino/gen %lu/%u, sb %p\n",
-               ino, generation, mgs->mgs_sb);
-
-        if (ino == 0)
-                RETURN(ERR_PTR(-ESTALE));
-        
-        snprintf(fid_name, sizeof(fid_name), "0x%lx", ino);
-        
-        /* under ext3 this is neither supposed to return bad inodes
-           nor NULL inodes. */
-        result = ll_lookup_one_len(fid_name, mgs->mgs_fid_de, strlen(fid_name));
-        if (IS_ERR(result))
-                RETURN(result);
-
-        inode = result->d_inode;
-        if (!inode)
-                RETURN(ERR_PTR(-ENOENT));
-
-        if (inode->i_generation == 0 || inode->i_nlink == 0) {
-                LCONSOLE_WARN("Found inode with zero generation or link -- this"
-                              " may indicate disk corruption (inode: %lu, link:"
-                              " %lu, count: %d)\n", inode->i_ino,
-                              (unsigned long)inode->i_nlink,
-                              atomic_read(&inode->i_count));
-                l_dput(result);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        if (generation && inode->i_generation != generation) {
-                /* we didn't find the right inode.. */
-                CDEBUG(D_INODE, "found wrong generation: inode %lu, link: %lu, "
-                       "count: %d, generation %u/%u\n", inode->i_ino,
-                       (unsigned long)inode->i_nlink,
-                       atomic_read(&inode->i_count), inode->i_generation,
-                       generation);
-                l_dput(result);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        RETURN(result);
-}
-
-static struct dentry *mgs_lvfs_fid2dentry(__u64 id, __u32 gen, __u64 gr,
-                                          void *data)
-{
-        struct obd_device *obd = data;
-        struct ll_fid fid;
-        fid.id = id;
-        fid.generation = gen;
-        return mgs_fid2dentry(&obd->u.mgs, &fid);
-}
-
-struct lvfs_callback_ops mgs_lvfs_ops = {
-        l_fid2dentry:     mgs_lvfs_fid2dentry,
-};
-
-int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct lvfs_run_ctxt saved;
-        struct dentry *dentry;
-        int rc;
-        ENTRY;
-
-        /* FIXME what's this?  Do I need it? */
-        rc = cleanup_group_info();
-        if (rc)
-                RETURN(rc);
-
-        mgs->mgs_vfsmnt = mnt;
-        mgs->mgs_sb = mnt->mnt_root->d_inode->i_sb;
-
-        rc = fsfilt_setup(obd, mgs->mgs_sb);
-        if (rc)
-                CWARN("fail to set fsfilter options\n");
-
-        OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt);
-        obd->obd_lvfs_ctxt.pwdmnt = mnt;
-        obd->obd_lvfs_ctxt.pwd = mnt->mnt_root;
-        obd->obd_lvfs_ctxt.fs = get_ds();
-        obd->obd_lvfs_ctxt.cb_ops = mgs_lvfs_ops;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        /* Setup the configs dir */
-        dentry = simple_mkdir(current->fs->pwd, MOUNT_CONFIGS_DIR, 0777, 1);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot create %s directory: rc = %d\n", 
-                       MOUNT_CONFIGS_DIR, rc);
-                GOTO(err_pop, rc);
-        }
-        mgs->mgs_configs_dir = dentry;
-
-        /* Need the iopen dir for fid2dentry, required by
-           LLOG_ORIGIN_HANDLE_READ_HEADER */
-        dentry = lookup_one_len("__iopen__", current->fs->pwd,
-                                strlen("__iopen__"));
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("cannot lookup __iopen__ directory: rc = %d\n", rc);
-                GOTO(err_configs, rc);
-        }
-        mgs->mgs_fid_de = dentry;
-        if (!dentry->d_inode || is_bad_inode(dentry->d_inode)) {
-                rc = -ENOENT;
-                CERROR("__iopen__ directory has no inode? rc = %d\n", rc);
-                GOTO(err_fid, rc);
-        }
-
-err_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        return rc;
-err_fid:
-        dput(mgs->mgs_fid_de);
-err_configs:
-        dput(mgs->mgs_configs_dir);
-        goto err_pop;
-}
-
-int mgs_fs_cleanup(struct obd_device *obd)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct lvfs_run_ctxt saved;
-        int rc = 0;
-
-        class_disconnect_exports(obd); /* cleans up client info too */
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        if (mgs->mgs_configs_dir) {
-                /*CERROR("configs dir dcount=%d\n",
-                       atomic_read(&mgs->mgs_configs_dir->d_count));*/
-                l_dput(mgs->mgs_configs_dir);
-                mgs->mgs_configs_dir = NULL;
-        }
-
-        shrink_dcache_parent(mgs->mgs_fid_de);
-        /*CERROR("fid dir dcount=%d\n",
-               atomic_read(&mgs->mgs_fid_de->d_count));*/
-        dput(mgs->mgs_fid_de);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        return rc;
-}
diff --git a/lustre/mgs/mgs_handler.c b/lustre/mgs/mgs_handler.c
deleted file mode 100644
index 6b7ba3ad496b54bca7ce0447b2b2a00fd4bc5552..0000000000000000000000000000000000000000
--- a/lustre/mgs/mgs_handler.c
+++ /dev/null
@@ -1,772 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mgs/mgs_handler.c
- *  Lustre Management Server (mgs) request handler
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MGS
-#define D_MGS D_CONFIG/*|D_WARNING*/
-
-#ifdef __KERNEL__
-# include <linux/module.h>
-# include <linux/pagemap.h>
-# include <linux/miscdevice.h>
-# include <linux/init.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-#include <lustre_fsfilt.h>
-#include <lustre_commit_confd.h>
-#include <lustre_disk.h>
-#include "mgs_internal.h"
-
-
-/* Establish a connection to the MGS.*/
-static int mgs_connect(struct lustre_handle *conn, struct obd_device *obd,
-                       struct obd_uuid *cluuid, struct obd_connect_data *data,
-                       void *localdata)
-{
-        struct obd_export *exp;
-        int rc;
-        ENTRY;
-
-        if (!conn || !obd || !cluuid)
-                RETURN(-EINVAL);
-
-        rc = class_connect(conn, obd, cluuid);
-        if (rc)
-                RETURN(rc);
-        exp = class_conn2export(conn);
-        LASSERT(exp);
-
-        mgs_counter_incr(exp, LPROC_MGS_CONNECT);
-
-        if (data != NULL) {
-                data->ocd_connect_flags &= MGS_CONNECT_SUPPORTED;
-                exp->exp_connect_flags = data->ocd_connect_flags;
-                data->ocd_version = LUSTRE_VERSION_CODE;
-        }
-
-        rc = mgs_client_add(obd, exp);
-
-        if (rc) {
-                class_disconnect(exp);
-        } else {
-                class_export_put(exp);
-        }
-
-        RETURN(rc);
-}
-
-static int mgs_disconnect(struct obd_export *exp)
-{
-        int rc;
-        ENTRY;
-
-        LASSERT(exp);
-
-        class_export_get(exp);
-        mgs_counter_incr(exp, LPROC_MGS_DISCONNECT);
-
-        /* Disconnect early so that clients can't keep using export */
-        rc = class_disconnect(exp);
-        ldlm_cancel_locks_for_export(exp);
-
-        /* complete all outstanding replies */
-        spin_lock(&exp->exp_lock);
-        while (!list_empty(&exp->exp_outstanding_replies)) {
-                struct ptlrpc_reply_state *rs =
-                        list_entry(exp->exp_outstanding_replies.next,
-                                   struct ptlrpc_reply_state, rs_exp_list);
-                struct ptlrpc_service *svc = rs->rs_service;
-
-                spin_lock(&svc->srv_lock);
-                list_del_init(&rs->rs_exp_list);
-                ptlrpc_schedule_difficult_reply(rs);
-                spin_unlock(&svc->srv_lock);
-        }
-        spin_unlock(&exp->exp_lock);
-
-        class_export_put(exp);
-        RETURN(rc);
-}
-
-static int mgs_cleanup(struct obd_device *obd);
-static int mgs_handle(struct ptlrpc_request *req);
-
-/* Start the MGS obd */
-static int mgs_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct lustre_mount_info *lmi;
-        struct lustre_sb_info *lsi;
-        struct vfsmount *mnt;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_CONFIG, "Starting MGS\n");
-
-        /* Find our disk */
-        lmi = server_get_mount(obd->obd_name);
-        if (!lmi) 
-                RETURN(rc = -EINVAL);
-
-        mnt = lmi->lmi_mnt;
-        lsi = s2lsi(lmi->lmi_sb);
-        obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd));
-        if (IS_ERR(obd->obd_fsops))
-                GOTO(err_put, rc = PTR_ERR(obd->obd_fsops));
-
-        /* namespace for mgs llog */
-        obd->obd_namespace = ldlm_namespace_new("MGS", LDLM_NAMESPACE_SERVER, 
-                                                LDLM_NAMESPACE_MODEST);
-        if (obd->obd_namespace == NULL)
-                GOTO(err_ops, rc = -ENOMEM);
-
-        /* ldlm setup */
-        ptlrpc_init_client(LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL,
-                           "mgs_ldlm_client", &obd->obd_ldlm_client);
-
-        LASSERT(!lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb)));
-
-        rc = mgs_fs_setup(obd, mnt);
-        if (rc) {
-                CERROR("%s: MGS filesystem method init failed: rc = %d\n",
-                       obd->obd_name, rc);
-                GOTO(err_ns, rc);
-        }
-
-        rc = llog_setup(obd, LLOG_CONFIG_ORIG_CTXT, obd, 0, NULL,
-                        &llog_lvfs_ops);
-        if (rc)
-                GOTO(err_fs, rc);
-
-        /* No recovery for MGC's */
-        obd->obd_replayable = 0;
-
-        /* Internal mgs setup */
-        mgs_init_fsdb_list(obd);
-        sema_init(&mgs->mgs_sem, 1);
-
-        /* Start the service threads */
-        mgs->mgs_service =
-                ptlrpc_init_svc(MGS_NBUFS, MGS_BUFSIZE, MGS_MAXREQSIZE,
-                                MGS_MAXREPSIZE, MGS_REQUEST_PORTAL,
-                                MGC_REPLY_PORTAL, 2000,
-                                mgs_handle, LUSTRE_MGS_NAME,
-                                obd->obd_proc_entry, NULL,
-                                MGS_THREADS_AUTO_MIN, MGS_THREADS_AUTO_MAX,
-                                "ll_mgs");
-
-        if (!mgs->mgs_service) {
-                CERROR("failed to start service\n");
-                GOTO(err_fs, rc = -ENOMEM);
-        }
-
-        rc = ptlrpc_start_threads(obd, mgs->mgs_service);
-        if (rc)
-                GOTO(err_thread, rc);
-
-        /* Setup proc */
-        lprocfs_mgs_init_vars(&lvars);
-        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0) {
-                lproc_mgs_setup(obd);
-        }
-
-        ping_evictor_start();
-
-        LCONSOLE_INFO("MGS %s started\n", obd->obd_name);
-
-        RETURN(0);
-
-err_thread:
-        ptlrpc_unregister_service(mgs->mgs_service);
-err_fs:
-        /* No extra cleanup needed for llog_init_commit_thread() */
-        mgs_fs_cleanup(obd);
-err_ns:
-        ldlm_namespace_free(obd->obd_namespace, 0);
-        obd->obd_namespace = NULL;
-err_ops:
-        fsfilt_put_ops(obd->obd_fsops);
-err_put:
-        server_put_mount(obd->obd_name, mnt);
-        mgs->mgs_sb = 0;
-        return rc;
-}
-
-static int mgs_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY:
-        case OBD_CLEANUP_EXPORTS:
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                llog_cleanup(llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT));
-                rc = obd_llog_finish(obd, 0);
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int mgs_ldlm_nsfree(void *data)
-{
-        struct ldlm_namespace *ns = (struct ldlm_namespace *)data;
-        int rc;
-        ENTRY;
-
-        ptlrpc_daemonize("ll_mgs_nsfree");
-        rc = ldlm_namespace_free(ns, 1 /* obd_force should always be on */);
-        RETURN(rc);
-}
-
-static int mgs_cleanup(struct obd_device *obd)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        ENTRY;
-
-        if (mgs->mgs_sb == NULL)
-                RETURN(0);
-        
-        ping_evictor_stop();
-
-        ptlrpc_unregister_service(mgs->mgs_service);
-
-        mgs_cleanup_fsdb_list(obd);
-        lproc_mgs_cleanup(obd);
-        mgs_fs_cleanup(obd);
-
-        server_put_mount(obd->obd_name, mgs->mgs_vfsmnt);
-        mgs->mgs_sb = NULL;
-
-        /* Free the namespace in it's own thread, so that if the 
-           ldlm_cancel_handler put the last mgs obd ref, we won't 
-           deadlock here. */
-        cfs_kernel_thread(mgs_ldlm_nsfree, obd->obd_namespace, 
-                          CLONE_VM | CLONE_FILES);
-
-        fsfilt_put_ops(obd->obd_fsops);
-
-        LCONSOLE_INFO("%s has stopped.\n", obd->obd_name);
-        RETURN(0);
-}
-
-/* similar to filter_prepare_destroy */
-static int mgs_get_cfg_lock(struct obd_device *obd, char *fsname,
-                            struct lustre_handle *lockh)
-{
-        struct ldlm_res_id res_id;
-        int rc, flags = 0;
-        ENTRY;
-
-        rc = mgc_fsname2resid(fsname, &res_id);
-        if (!rc) 
-                rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id,
-                                            LDLM_PLAIN, NULL, LCK_EX,
-                                            &flags, ldlm_blocking_ast,
-                                            ldlm_completion_ast, NULL,
-                                            fsname, 0, NULL, lockh);
-        if (rc) 
-                CERROR("can't take cfg lock for %s (%d)\n", fsname, rc);
-        
-        RETURN(rc);
-}
-
-static int mgs_put_cfg_lock(struct lustre_handle *lockh)
-{
-        ENTRY;
-        ldlm_lock_decref(lockh, LCK_EX);
-        RETURN(0);
-}
-
-/* rc=0 means ok
-      1 means update
-     <0 means error */
-static int mgs_check_target(struct obd_device *obd, struct mgs_target_info *mti)
-{
-        int rc;
-        ENTRY;
-
-        rc = mgs_check_index(obd, mti);
-        if (rc == 0) {
-                LCONSOLE_ERROR_MSG(0x13b, "%s claims to have registered, but "
-                                  "this MGS does not know about it.  Assuming "
-                                  "writeconf.\n", mti->mti_svname);
-                mti->mti_flags |= LDD_F_WRITECONF;
-                rc = 1;
-        } else if (rc == -1) {
-                LCONSOLE_ERROR_MSG(0x13c, "Client log %s-client has "
-                                   "disappeared! Regenerating all logs.\n",
-                                   mti->mti_fsname);
-                mti->mti_flags |= LDD_F_WRITECONF;
-                rc = 1;
-        } else {
-                /* Index is correctly marked as used */
-
-                /* If the logs don't contain the mti_nids then add 
-                   them as failover nids */
-                rc = mgs_check_failnid(obd, mti);
-        }
-
-        RETURN(rc);
-}
-
-/* Called whenever a target starts up.  Flags indicate first connect, etc. */
-static int mgs_handle_target_reg(struct ptlrpc_request *req)
-{    
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct lustre_handle lockh;
-        struct mgs_target_info *mti, *rep_mti;
-        int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*mti) };
-        int rc = 0, lockrc;
-        ENTRY;
-
-        mgs_counter_incr(req->rq_export, LPROC_MGS_TARGET_REG);
-
-        mti = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*mti),
-                                 lustre_swab_mgs_target_info);
-        
-        if (!(mti->mti_flags & (LDD_F_WRITECONF | LDD_F_UPGRADE14 |
-                                LDD_F_UPDATE))) {
-                /* We're just here as a startup ping. */
-                CDEBUG(D_MGS, "Server %s is running on %s\n",
-                       mti->mti_svname, obd_export_nid2str(req->rq_export));
-                rc = mgs_check_target(obd, mti);
-                /* above will set appropriate mti flags */
-                if (rc <= 0) 
-                        /* Nothing wrong, or fatal error */
-                        GOTO(out_nolock, rc);
-        }
-
-        /* Revoke the config lock to make sure nobody is reading. */
-        /* Although actually I think it should be alright if
-           someone was reading while we were updating the logs - if we 
-           revoke at the end they will just update from where they left off. */
-        lockrc = mgs_get_cfg_lock(obd, mti->mti_fsname, &lockh);
-        if (lockrc != ELDLM_OK) {
-                LCONSOLE_ERROR_MSG(0x13d, "%s: Can't signal other nodes to "
-                                   "update their configuration (%d). Updating "
-                                   "local logs anyhow; you might have to "
-                                   "manually restart other nodes to get the "
-                                   "latest configuration.\n",
-                                   obd->obd_name, lockrc);
-        }
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_MGS_PAUSE_TARGET_REG, 10);
-
-        /* Log writing contention is handled by the fsdb_sem */
-
-        if (mti->mti_flags & LDD_F_WRITECONF) {
-                if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
-                        rc = mgs_erase_logs(obd, mti->mti_fsname);
-                        LCONSOLE_WARN("%s: Logs for fs %s were removed by user "
-                                      "request.  All servers must be restarted "
-                                      "in order to regenerate the logs."
-                                      "\n", obd->obd_name, mti->mti_fsname);
-                } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
-                        rc = mgs_erase_log(obd, mti->mti_svname);
-                        LCONSOLE_WARN("%s: Regenerating %s log by user "
-                                      "request.\n",
-                                      obd->obd_name, mti->mti_svname);
-                }
-                mti->mti_flags |= LDD_F_UPDATE;
-                /* Erased logs means start from scratch. */
-                mti->mti_flags &= ~LDD_F_UPGRADE14; 
-        }
-
-        /* COMPAT_146 */
-        if (mti->mti_flags & LDD_F_UPGRADE14) {
-                rc = mgs_upgrade_sv_14(obd, mti);
-                if (rc) {
-                        CERROR("Can't upgrade from 1.4 (%d)\n", rc);
-                        GOTO(out, rc);
-                }
-                
-                /* We're good to go */
-                mti->mti_flags |= LDD_F_UPDATE;
-        }
-        /* end COMPAT_146 */
-
-        if (mti->mti_flags & LDD_F_UPDATE) {
-                CDEBUG(D_MGS, "updating %s, index=%d\n", mti->mti_svname, 
-                       mti->mti_stripe_index);
-                
-                /* create or update the target log 
-                   and update the client/mdt logs */
-                rc = mgs_write_log_target(obd, mti);
-                if (rc) {
-                        CERROR("Failed to write %s log (%d)\n", 
-                               mti->mti_svname, rc);
-                        GOTO(out, rc);
-                }
-
-                mti->mti_flags &= ~(LDD_F_VIRGIN | LDD_F_UPDATE | 
-                                    LDD_F_NEED_INDEX | LDD_F_WRITECONF |
-                                    LDD_F_UPGRADE14);
-                mti->mti_flags |= LDD_F_REWRITE_LDD;
-        }
-
-out:
-        /* done with log update */
-        if (lockrc == ELDLM_OK)
-                mgs_put_cfg_lock(&lockh);
-out_nolock:
-        CDEBUG(D_MGS, "replying with %s, index=%d, rc=%d\n", mti->mti_svname, 
-               mti->mti_stripe_index, rc);
-        lustre_pack_reply(req, 2, rep_size, NULL); 
-        /* send back the whole mti in the reply */
-        rep_mti = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*rep_mti));
-        memcpy(rep_mti, mti, sizeof(*rep_mti));
-
-        /* Flush logs to disk */
-        fsfilt_sync(obd, obd->u.mgs.mgs_sb);
-        RETURN(rc);
-}
-
-static int mgs_set_info_rpc(struct ptlrpc_request *req)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct mgs_send_param *msp, *rep_msp;
-        struct lustre_handle lockh;
-        int rep_size[] = { sizeof(struct ptlrpc_body), sizeof(*msp) };
-        int lockrc, rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        char fsname[MTI_NAME_MAXLEN];
-        ENTRY;
-
-        msp = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*msp), NULL);
-
-        /* Construct lustre_cfg structure to pass to function mgs_setparam */
-        lustre_cfg_bufs_reset(&bufs, NULL);
-        lustre_cfg_bufs_set_string(&bufs, 1, msp->mgs_param);
-        lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
-        rc = mgs_setparam(obd, lcfg, fsname);
-        if (rc) {
-                CERROR("Error %d in setting the parameter %s for fs %s\n",
-                       rc, msp->mgs_param, fsname);
-                RETURN(rc);
-        }
-
-        /* Revoke lock so everyone updates.  Should be alright if
-         * someone was already reading while we were updating the logs,
-         * so we don't really need to hold the lock while we're
-         * writing.
-         */
-        if (fsname[0]) {
-                lockrc = mgs_get_cfg_lock(obd, fsname, &lockh);
-                if (lockrc != ELDLM_OK)
-                        CERROR("lock error %d for fs %s\n", lockrc,
-                               fsname);
-                else
-                        mgs_put_cfg_lock(&lockh);
-        }
-        lustre_cfg_free(lcfg);
-
-        lustre_pack_reply(req, 2, rep_size, NULL);
-        rep_msp = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*rep_msp));
-        memcpy(rep_msp, msp, sizeof(*rep_msp));
-
-        RETURN(rc);
-}
-
-/* Called whenever a target cleans up. */
-/* XXX - Currently unused */
-static int mgs_handle_target_del(struct ptlrpc_request *req)
-{
-        ENTRY;
-        mgs_counter_incr(req->rq_export, LPROC_MGS_TARGET_DEL);
-        RETURN(0);
-}
-
-/* XXX - Currently unused */
-static int mgs_handle_exception(struct ptlrpc_request *req)
-{
-        ENTRY;
-        mgs_counter_incr(req->rq_export, LPROC_MGS_EXCEPTION);
-        RETURN(0);
-}
-
-int mgs_handle(struct ptlrpc_request *req)
-{
-        int fail = OBD_FAIL_MGS_ALL_REPLY_NET;
-        int opc, rc = 0;
-        ENTRY;
-
-        OBD_FAIL_TIMEOUT_MS(OBD_FAIL_MGS_PAUSE_REQ, obd_fail_val);
-        OBD_FAIL_RETURN(OBD_FAIL_MGS_ALL_REQUEST_NET, 0);
-
-        LASSERT(current->journal_info == NULL);
-        opc = lustre_msg_get_opc(req->rq_reqmsg);
-        if (opc != MGS_CONNECT) {
-                if (req->rq_export == NULL) {
-                        CERROR("lustre_mgs: operation %d on unconnected MGS\n",
-                               opc);
-                        req->rq_status = -ENOTCONN;
-                        GOTO(out, rc = -ENOTCONN);
-                }
-        }
-
-        switch (opc) {
-        case MGS_CONNECT:
-                DEBUG_REQ(D_MGS, req, "connect");
-                rc = target_handle_connect(req, mgs_handle);
-                if (!rc && (lustre_msg_get_conn_cnt(req->rq_reqmsg) > 1))
-                        /* Make clients trying to reconnect after a MGS restart
-                           happy; also requires obd_replayable */
-                        lustre_msg_add_op_flags(req->rq_repmsg,
-                                                MSG_CONNECT_RECONNECT);
-                break;
-        case MGS_DISCONNECT:
-                DEBUG_REQ(D_MGS, req, "disconnect");
-                rc = target_handle_disconnect(req);
-                req->rq_status = rc;            /* superfluous? */
-                break;
-        case MGS_EXCEPTION:
-                DEBUG_REQ(D_MGS, req, "exception");
-                rc = mgs_handle_exception(req);
-                break;
-        case MGS_TARGET_REG:
-                DEBUG_REQ(D_MGS, req, "target add");
-                rc = mgs_handle_target_reg(req);
-                break;
-        case MGS_TARGET_DEL:
-                DEBUG_REQ(D_MGS, req, "target del");
-                rc = mgs_handle_target_del(req);
-                break;
-        case MGS_SET_INFO:
-                rc = mgs_set_info_rpc(req);
-                break;
-
-        case LDLM_ENQUEUE:
-                DEBUG_REQ(D_MGS, req, "enqueue");
-                rc = ldlm_handle_enqueue(req, ldlm_server_completion_ast,
-                                         ldlm_server_blocking_ast, NULL);
-                break;
-        case LDLM_BL_CALLBACK:
-        case LDLM_CP_CALLBACK:
-                DEBUG_REQ(D_MGS, req, "callback");
-                CERROR("callbacks should not happen on MGS\n");
-                LBUG();
-                break;
-
-        case OBD_PING:
-                DEBUG_REQ(D_INFO, req, "ping");
-                rc = target_handle_ping(req);
-                break;
-        case OBD_LOG_CANCEL:
-                DEBUG_REQ(D_MGS, req, "log cancel");
-                rc = -ENOTSUPP; /* la la la */
-                break;
-
-        case LLOG_ORIGIN_HANDLE_CREATE:
-                DEBUG_REQ(D_MGS, req, "llog_init");
-                rc = llog_origin_handle_create(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_NEXT_BLOCK:
-                DEBUG_REQ(D_MGS, req, "llog next block");
-                rc = llog_origin_handle_next_block(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_READ_HEADER:
-                DEBUG_REQ(D_MGS, req, "llog read header");
-                rc = llog_origin_handle_read_header(req);
-                break;
-        case LLOG_ORIGIN_HANDLE_CLOSE:
-                DEBUG_REQ(D_MGS, req, "llog close");
-                rc = llog_origin_handle_close(req);
-                break;
-        case LLOG_CATINFO:
-                DEBUG_REQ(D_MGS, req, "llog catinfo");
-                rc = llog_catinfo(req);
-                break;
-        default:
-                req->rq_status = -ENOTSUPP;
-                rc = ptlrpc_error(req);
-                RETURN(rc);
-        }
-
-        LASSERT(current->journal_info == NULL);
-        
-        if (rc) 
-                CERROR("MGS handle cmd=%d rc=%d\n", opc, rc);
-
- out:
-        target_send_reply(req, rc, fail);
-        RETURN(0);
-}
-
-static inline int mgs_destroy_export(struct obd_export *exp)
-{
-        ENTRY;
-
-        target_destroy_export(exp);
-        mgs_client_free(exp);
-
-        RETURN(0);
-}
-
-/* from mdt_iocontrol */
-int mgs_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                  void *karg, void *uarg)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_ioctl_data *data = karg;
-        struct lvfs_run_ctxt saved;
-        int rc = 0;
-
-        ENTRY;
-        CDEBUG(D_IOCTL, "handling ioctl cmd %#x\n", cmd);
-
-        switch (cmd) {
-
-        case OBD_IOC_PARAM: {
-                struct lustre_handle lockh;
-                struct lustre_cfg *lcfg;
-                struct llog_rec_hdr rec;
-                char fsname[MTI_NAME_MAXLEN];
-                int lockrc;
-
-                rec.lrh_len = llog_data_len(data->ioc_plen1);
-
-                if (data->ioc_type == LUSTRE_CFG_TYPE) {
-                        rec.lrh_type = OBD_CFG_REC;
-                } else {
-                        CERROR("unknown cfg record type:%d \n", data->ioc_type);
-                        RETURN(-EINVAL);
-                }
-
-                OBD_ALLOC(lcfg, data->ioc_plen1);
-                if (lcfg == NULL)
-                        RETURN(-ENOMEM);
-                rc = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1);
-                if (rc) 
-                        GOTO(out_free, rc);
-
-                if (lcfg->lcfg_bufcount < 1)
-                        GOTO(out_free, rc = -EINVAL);
-
-                rc = mgs_setparam(obd, lcfg, fsname);
-                if (rc) {
-                        CERROR("setparam err %d\n", rc);
-                        GOTO(out_free, rc);
-                }
-
-                /* Revoke lock so everyone updates.  Should be alright if
-                   someone was already reading while we were updating the logs,
-                   so we don't really need to hold the lock while we're
-                   writing (above). */
-                if (fsname[0]) {
-                        lockrc = mgs_get_cfg_lock(obd, fsname, &lockh);
-                        if (lockrc != ELDLM_OK) 
-                                CERROR("lock error %d for fs %s\n", lockrc, 
-                                       fsname);
-                        else
-                                mgs_put_cfg_lock(&lockh);
-                }
-
-out_free:
-                OBD_FREE(lcfg, data->ioc_plen1);
-                RETURN(rc);
-        }
-
-        case OBD_IOC_DUMP_LOG: {
-                struct llog_ctxt *ctxt =
-                        llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = class_config_dump_llog(ctxt, data->ioc_inlbuf1, NULL);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                llog_ctxt_put(ctxt);
-                if (rc)
-                        RETURN(rc);
-
-                RETURN(rc);
-        }
-
-        case OBD_IOC_LLOG_CHECK:
-        case OBD_IOC_LLOG_INFO:
-        case OBD_IOC_LLOG_PRINT: {
-                struct llog_ctxt *ctxt =
-                        llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-
-                push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                rc = llog_ioctl(ctxt, cmd, data);
-                pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                llog_ctxt_put(ctxt);
-
-                RETURN(rc);
-        }
-
-        default:
-                CDEBUG(D_INFO, "unknown command %x\n", cmd);
-                RETURN(-EINVAL);
-        }
-        RETURN(0);
-}
-
-/* use obd ops to offer management infrastructure */
-static struct obd_ops mgs_obd_ops = {
-        .o_owner           = THIS_MODULE,
-        .o_connect         = mgs_connect,
-        .o_disconnect      = mgs_disconnect,
-        .o_setup           = mgs_setup,
-        .o_precleanup      = mgs_precleanup,
-        .o_cleanup         = mgs_cleanup,
-        .o_destroy_export  = mgs_destroy_export,
-        .o_iocontrol       = mgs_iocontrol,
-};
-
-static int __init mgs_init(void)
-{
-        struct lprocfs_static_vars lvars;
-
-        lprocfs_mgs_init_vars(&lvars);
-        class_register_type(&mgs_obd_ops, lvars.module_vars, LUSTRE_MGS_NAME);
-
-        return 0;
-}
-
-static void /*__exit*/ mgs_exit(void)
-{
-        class_unregister_type(LUSTRE_MGS_NAME);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre  Management Server (MGS)");
-MODULE_LICENSE("GPL");
-
-module_init(mgs_init);
-module_exit(mgs_exit);
diff --git a/lustre/mgs/mgs_internal.h b/lustre/mgs/mgs_internal.h
deleted file mode 100644
index 5fbe4488ce215e8b428ddea9272237da6d0e7ff6..0000000000000000000000000000000000000000
--- a/lustre/mgs/mgs_internal.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _MGS_INTERNAL_H
-#define _MGS_INTERNAL_H
-
-#ifdef __KERNEL__
-# include <linux/fs.h>
-#endif
-#include <libcfs/kp30.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_lib.h>
-#include <lustre_dlm.h>
-#include <lustre_log.h>
-#include <lustre_export.h>
-
-
-/* mgs_llog.c */
-int class_dentry_readdir(struct obd_device *obd, struct dentry *dir,
-                         struct vfsmount *inmnt, 
-                         struct list_head *dentry_list);
-
-#define INDEX_MAP_SIZE 8192     /* covers indicies to FFFF */
-#define FSDB_LOG_EMPTY  0x0001  /* missing client log */
-#define FSDB_OLDLOG14   0x0002  /* log starts in old (1.4) style */
-
-struct fs_db {
-        char              fsdb_name[9];
-        struct list_head  fsdb_list;           /* list of databases */
-        struct semaphore  fsdb_sem;
-        void             *fsdb_ost_index_map;  /* bitmap of used indicies */
-        void             *fsdb_mdt_index_map;  /* bitmap of used indicies */
-        /* COMPAT_146 these items must be recorded out of the old client log */
-        char             *fsdb_clilov;         /* COMPAT_146 client lov name */
-        char             *fsdb_mdtlov;         /* COMPAT_146 mds lov name */
-        char             *fsdb_mdc;            /* COMPAT_146 mdc name */
-        /* end COMPAT_146 */
-        __u32             fsdb_flags;
-        __u32             fsdb_gen;
-};
-
-int mgs_init_fsdb_list(struct obd_device *obd);
-int mgs_cleanup_fsdb_list(struct obd_device *obd);
-int mgs_check_index(struct obd_device *obd, struct mgs_target_info *mti);
-int mgs_check_failnid(struct obd_device *obd, struct mgs_target_info *mti);
-int mgs_write_log_target(struct obd_device *obd, struct mgs_target_info *mti);
-int mgs_upgrade_sv_14(struct obd_device *obd, struct mgs_target_info *mti);
-int mgs_erase_log(struct obd_device *obd, char *name);
-int mgs_erase_logs(struct obd_device *obd, char *fsname);
-int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname);
-
-/* mgs_fs.c */
-int mgs_client_add(struct obd_device *obd, struct obd_export *exp);
-int mgs_client_free(struct obd_export *exp);
-int mgs_fs_setup(struct obd_device *obd, struct vfsmount *mnt);
-int mgs_fs_cleanup(struct obd_device *obddev);
-
-#define strsuf(buf, suffix) (strcmp((buf)+strlen(buf)-strlen(suffix), (suffix)))
-
-#ifdef LPROCFS
-int lproc_mgs_setup(struct obd_device *dev);
-int lproc_mgs_cleanup(struct obd_device *obd);
-int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb);
-int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb);
-void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline int lproc_mgs_setup(struct obd_device *dev) 
-{return 0;}
-static inline int lproc_mgs_cleanup(struct obd_device *obd)
-{return 0;}
-static inline int lproc_mgs_add_live(struct obd_device *obd, struct fs_db *fsdb)
-{return 0;}
-static inline int lproc_mgs_del_live(struct obd_device *obd, struct fs_db *fsdb)
-{return 0;}
-static void lprocfs_mgs_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-/* mgs/lproc_mgs.c */
-enum {
-        LPROC_MGS_CONNECT = 0,
-        LPROC_MGS_DISCONNECT,
-        LPROC_MGS_EXCEPTION,
-        LPROC_MGS_TARGET_REG,
-        LPROC_MGS_TARGET_DEL,
-        LPROC_MGS_LAST
-};
-void mgs_counter_incr(struct obd_export *exp, int opcode);
-void mgs_stats_counter_init(struct lprocfs_stats *stats);
-
-#endif /* _MGS_INTERNAL_H */
-
diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c
deleted file mode 100644
index 8917d28b92c5552ecf2a71937977f8cd7632ba33..0000000000000000000000000000000000000000
--- a/lustre/mgs/mgs_llog.c
+++ /dev/null
@@ -1,2053 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/mgs/mgs_llog.c
- *  Lustre Management Server (mgs) config llog creation
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MGS
-#define D_MGS D_CONFIG /*|D_WARNING*/
-
-#ifdef __KERNEL__
-#include <linux/module.h>
-#include <linux/pagemap.h>
-#include <linux/fs.h>
-#endif
-
-#include <obd.h>
-#include <obd_lov.h>
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <obd_ost.h>
-#include <libcfs/list.h>
-#include <linux/lvfs.h>
-#include <lustre_fsfilt.h>
-#include <lustre_disk.h>
-#include <lustre_param.h>
-#include "mgs_internal.h"
-
-/******************** Class functions *********************/
-
-/* Caller must list_del and OBD_FREE each dentry from the list */
-int class_dentry_readdir(struct obd_device *obd, struct dentry *dir,
-                         struct vfsmount *inmnt, 
-                         struct list_head *dentry_list){
-        /* see mds_cleanup_pending */
-        struct lvfs_run_ctxt saved;
-        struct file *file;
-        struct dentry *dentry;
-        struct vfsmount *mnt;
-        int rc = 0;
-        ENTRY;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        dentry = dget(dir);
-        if (IS_ERR(dentry))
-                GOTO(out_pop, rc = PTR_ERR(dentry));
-        mnt = mntget(inmnt);
-        if (IS_ERR(mnt)) {
-                l_dput(dentry);
-                GOTO(out_pop, rc = PTR_ERR(mnt));
-        }
-
-        file = dentry_open(dentry, mnt, O_RDONLY);
-        if (IS_ERR(file))
-                /* dentry_open_it() drops the dentry, mnt refs */
-                GOTO(out_pop, rc = PTR_ERR(file));
-
-        INIT_LIST_HEAD(dentry_list);
-        rc = l_readdir(file, dentry_list);
-        filp_close(file, 0);
-        /*  filp_close->fput() drops the dentry, mnt refs */
-
-out_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        RETURN(rc);
-}
-
-/******************** DB functions *********************/
-
-static inline int name_create(char **newname, char *prefix, char *suffix)
-{
-        LASSERT(newname);
-        OBD_ALLOC(*newname, strlen(prefix) + strlen(suffix) + 1);
-        if (!*newname) 
-                return -ENOMEM;
-        sprintf(*newname, "%s%s", prefix, suffix);
-        return 0;
-}
-
-static inline void name_destroy(char **name)
-{        
-        if (*name)
-                OBD_FREE(*name, strlen(*name) + 1);
-        *name = NULL;
-}
-
-/* from the (client) config log, figure out:
-        1. which ost's/mdt's are configured (by index)
-        2. what the last config step is
-        3. COMPAT_146 lov name
-        4. COMPAT_146 mdt lov name
-        5. COMPAT_146 mdc name 
-*/
-/* It might be better to have a separate db file, instead of parsing the info
-   out of the client log.  This is slow and potentially error-prone. */
-static int mgs_fsdb_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, 
-                            void *data)
-{
-        struct fs_db *fsdb = (struct fs_db *)data;
-        int cfg_len = rec->lrh_len;
-        char *cfg_buf = (char*) (rec + 1);
-        struct lustre_cfg *lcfg;
-        __u32 index;
-        int rc = 0;
-        ENTRY;
-
-        if (rec->lrh_type != OBD_CFG_REC) {
-                CERROR("unhandled lrh_type: %#x\n", rec->lrh_type);
-                RETURN(-EINVAL);
-        }
-
-        rc = lustre_cfg_sanity_check(cfg_buf, cfg_len);
-        if (rc) {
-                CERROR("Insane cfg\n");
-                RETURN(rc);
-        }
-
-        lcfg = (struct lustre_cfg *)cfg_buf;
-
-        CDEBUG(D_INFO, "cmd %x %s %s\n", lcfg->lcfg_command, 
-               lustre_cfg_string(lcfg, 0), lustre_cfg_string(lcfg, 1));
-
-        /* Figure out ost indicies */ 
-        /* lov_modify_tgts add 0:lov1  1:ost1_UUID  2(index):0  3(gen):1 */
-        if (lcfg->lcfg_command == LCFG_LOV_ADD_OBD ||
-            lcfg->lcfg_command == LCFG_LOV_DEL_OBD) {
-                index = simple_strtoul(lustre_cfg_string(lcfg, 2),
-                                       NULL, 10);
-                CDEBUG(D_MGS, "OST index for %s is %u (%s)\n",
-                       lustre_cfg_string(lcfg, 1), index, 
-                       lustre_cfg_string(lcfg, 2));
-                set_bit(index, fsdb->fsdb_ost_index_map);
-        }
-        
-        /* Figure out mdt indicies */
-        /* attach   0:MDC_uml1_mdsA_MNT_client  1:mdc  2:1d834_MNT_client_03f */
-        if ((lcfg->lcfg_command == LCFG_ATTACH) &&
-            (strcmp(lustre_cfg_string(lcfg, 1), LUSTRE_MDC_NAME) == 0)) {
-                rc = server_name2index(lustre_cfg_string(lcfg, 0),
-                                       &index, NULL);
-                if (rc != LDD_F_SV_TYPE_MDT) {
-                        CWARN("Unparsable MDC name %s, assuming index 0\n",
-                              lustre_cfg_string(lcfg, 0));
-                        index = 0;
-                }
-                rc = 0;
-                CDEBUG(D_MGS, "MDT index is %u\n", index);
-                set_bit(index, fsdb->fsdb_mdt_index_map);
-        }
-
-        /* COMPAT_146 */
-        /* figure out the old LOV name. fsdb_gen = 0 means old log */
-        /* #01 L attach 0:lov_mdsA 1:lov 2:cdbe9_lov_mdsA_dc8cf7f3bb */
-        if ((fsdb->fsdb_gen == 0) && (lcfg->lcfg_command == LCFG_ATTACH) &&
-            (strcmp(lustre_cfg_string(lcfg, 1), LUSTRE_LOV_NAME) == 0)) {
-                fsdb->fsdb_flags |= FSDB_OLDLOG14;
-                name_destroy(&fsdb->fsdb_clilov);
-                rc = name_create(&fsdb->fsdb_clilov, 
-                                 lustre_cfg_string(lcfg, 0), "");
-                if (rc) 
-                        RETURN(rc);
-                CDEBUG(D_MGS, "client lov name is %s\n", fsdb->fsdb_clilov);
-        }
-
-        /* figure out the old MDT lov name from the MDT uuid */
-        if ((fsdb->fsdb_gen == 0) && (lcfg->lcfg_command == LCFG_SETUP) &&
-            (strncmp(lustre_cfg_string(lcfg, 0), "MDC_", 4) == 0)) {
-                char *ptr;
-                fsdb->fsdb_flags |= FSDB_OLDLOG14;
-                ptr = strstr(lustre_cfg_string(lcfg, 1), "_UUID");
-                if (!ptr) {
-                        CERROR("Can't parse MDT uuid %s\n", 
-                               lustre_cfg_string(lcfg, 1));
-                        RETURN(-EINVAL);
-                }
-                *ptr = '\0';
-                name_destroy(&fsdb->fsdb_mdtlov);
-                rc = name_create(&fsdb->fsdb_mdtlov, 
-                                 "lov_", lustre_cfg_string(lcfg, 1));
-                if (rc) 
-                        RETURN(rc);
-                name_destroy(&fsdb->fsdb_mdc);
-                rc = name_create(&fsdb->fsdb_mdc, 
-                                 lustre_cfg_string(lcfg, 0), "");
-                if (rc) 
-                        RETURN(rc);
-                CDEBUG(D_MGS, "MDT lov name is %s\n", fsdb->fsdb_mdtlov);
-        }
-        /* end COMPAT_146 */
-
-        /* Keep track of the latest marker step */
-        if (lcfg->lcfg_command == LCFG_MARKER) {
-                struct cfg_marker *marker;
-                marker = lustre_cfg_buf(lcfg, 1);
-                fsdb->fsdb_gen = max(fsdb->fsdb_gen, marker->cm_step);
-        }
-
-        RETURN(rc);
-}
-
-static int mgs_get_fsdb_from_llog(struct obd_device *obd, struct fs_db *fsdb)
-{
-        char *logname;
-        struct llog_handle *loghandle;
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        int rc, rc2;
-        ENTRY;
-
-        ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-        LASSERT(ctxt != NULL);
-        name_create(&logname, fsdb->fsdb_name, "-client");
-        down(&fsdb->fsdb_sem);
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = llog_create(ctxt, &loghandle, NULL, logname);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-
-        if (llog_get_size(loghandle) <= 1)
-                fsdb->fsdb_flags |= FSDB_LOG_EMPTY;
-
-        rc = llog_process(loghandle, mgs_fsdb_handler, (void *)fsdb, NULL);
-        CDEBUG(D_INFO, "get_db = %d\n", rc);
-out_close:
-        rc2 = llog_close(loghandle);
-        if (!rc)
-                rc = rc2;
-out_pop:
-        llog_ctxt_put(ctxt);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        up(&fsdb->fsdb_sem);
-        name_destroy(&logname);
-
-        RETURN(rc);
-}
-
-static struct fs_db *mgs_find_fsdb(struct obd_device *obd, char *fsname)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct fs_db *fsdb;
-        struct list_head *tmp;
-
-        list_for_each(tmp, &mgs->mgs_fs_db_list) {
-                fsdb = list_entry(tmp, struct fs_db, fsdb_list);
-                if (strcmp(fsdb->fsdb_name, fsname) == 0)
-                        return fsdb;
-        }
-        return NULL;
-}
-
-/* caller must hold the mgs->mgs_fs_db_lock */
-static struct fs_db *mgs_new_fsdb(struct obd_device *obd, char *fsname)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct fs_db *fsdb;
-        int rc;
-        ENTRY;
-        
-        OBD_ALLOC_PTR(fsdb);
-        if (!fsdb) 
-                RETURN(NULL);
-
-        OBD_ALLOC(fsdb->fsdb_ost_index_map, INDEX_MAP_SIZE);
-        OBD_ALLOC(fsdb->fsdb_mdt_index_map, INDEX_MAP_SIZE);
-        if (!fsdb->fsdb_ost_index_map || !fsdb->fsdb_mdt_index_map) {
-                CERROR("No memory for index maps\n");
-                GOTO(err, 0);
-        }
-        
-        strncpy(fsdb->fsdb_name, fsname, sizeof(fsdb->fsdb_name));
-        fsdb->fsdb_name[sizeof(fsdb->fsdb_name) - 1] = 0;
-        rc = name_create(&fsdb->fsdb_mdtlov, fsname, "-mdtlov");
-        if (rc) 
-                GOTO(err, rc);
-        rc = name_create(&fsdb->fsdb_clilov, fsname, "-clilov");
-        if (rc) 
-                GOTO(err, rc);
-
-        sema_init(&fsdb->fsdb_sem, 1);
-        list_add(&fsdb->fsdb_list, &mgs->mgs_fs_db_list);
-        lproc_mgs_add_live(obd, fsdb);
-
-        RETURN(fsdb);
-err:
-        if (fsdb->fsdb_ost_index_map) 
-                OBD_FREE(fsdb->fsdb_ost_index_map, INDEX_MAP_SIZE);
-        if (fsdb->fsdb_mdt_index_map) 
-                OBD_FREE(fsdb->fsdb_mdt_index_map, INDEX_MAP_SIZE);
-        name_destroy(&fsdb->fsdb_clilov); 
-        name_destroy(&fsdb->fsdb_mdtlov); 
-        OBD_FREE_PTR(fsdb);
-        RETURN(NULL);
-}
-
-static void mgs_free_fsdb(struct obd_device *obd, struct fs_db *fsdb)
-{
-        /* wait for anyone with the sem */
-        down(&fsdb->fsdb_sem);
-        lproc_mgs_del_live(obd, fsdb);
-        list_del(&fsdb->fsdb_list);
-        OBD_FREE(fsdb->fsdb_ost_index_map, INDEX_MAP_SIZE);
-        OBD_FREE(fsdb->fsdb_mdt_index_map, INDEX_MAP_SIZE);
-        name_destroy(&fsdb->fsdb_clilov); 
-        name_destroy(&fsdb->fsdb_mdtlov); 
-        name_destroy(&fsdb->fsdb_mdc); 
-        OBD_FREE_PTR(fsdb);
-}
-
-int mgs_init_fsdb_list(struct obd_device *obd)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        INIT_LIST_HEAD(&mgs->mgs_fs_db_list);
-        return 0;
-}
-
-int mgs_cleanup_fsdb_list(struct obd_device *obd)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct fs_db *fsdb;
-        struct list_head *tmp, *tmp2;
-        down(&mgs->mgs_sem);
-        list_for_each_safe(tmp, tmp2, &mgs->mgs_fs_db_list) {
-                fsdb = list_entry(tmp, struct fs_db, fsdb_list);
-                mgs_free_fsdb(obd, fsdb);
-        }
-        up(&mgs->mgs_sem);
-        return 0;
-}
-
-static int mgs_find_or_make_fsdb(struct obd_device *obd, char *name, 
-                               struct fs_db **dbh)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct fs_db *fsdb;
-        int rc = 0;
-
-        down(&mgs->mgs_sem);
-        fsdb = mgs_find_fsdb(obd, name);
-        if (fsdb) {
-                up(&mgs->mgs_sem);
-                *dbh = fsdb;
-                return 0;
-        }
-
-        CDEBUG(D_MGS, "Creating new db\n");
-        fsdb = mgs_new_fsdb(obd, name);
-        up(&mgs->mgs_sem);
-        if (!fsdb) 
-                return -ENOMEM;
-
-        /* populate the db from the client llog */
-        rc = mgs_get_fsdb_from_llog(obd, fsdb);
-        if (rc) {
-                CERROR("Can't get db from client log %d\n", rc);
-                mgs_free_fsdb(obd, fsdb);
-                return rc;
-        }
-
-        *dbh = fsdb;
-        
-        return 0;
-}
-
-/* 1 = index in use
-   0 = index unused 
-   -1= empty client log */
-int mgs_check_index(struct obd_device *obd, struct mgs_target_info *mti)
-{
-        struct fs_db *fsdb;
-        void *imap;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(!(mti->mti_flags & LDD_F_NEED_INDEX));
-
-        rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); 
-        if (rc) {
-                CERROR("Can't get db for %s\n", mti->mti_fsname);
-                RETURN(rc);
-        }
-
-        if (fsdb->fsdb_flags & FSDB_LOG_EMPTY) 
-                RETURN(-1);
-
-        if (mti->mti_flags & LDD_F_SV_TYPE_OST) 
-                imap = fsdb->fsdb_ost_index_map;
-        else if (mti->mti_flags & LDD_F_SV_TYPE_MDT) 
-                imap = fsdb->fsdb_mdt_index_map;
-        else
-                RETURN(-EINVAL);
-
-        if (test_bit(mti->mti_stripe_index, imap)) 
-                RETURN(1);
-        RETURN(0);
-}
-
-static __inline__ int next_index(void *index_map, int map_len)
-{
-        int i;
-        for (i = 0; i < map_len * 8; i++)
-                 if (!test_bit(i, index_map)) {
-                         return i;
-                 }
-        CERROR("max index %d exceeded.\n", i);
-        return -1;
-}
-
-/* Return codes:
-        0  newly marked as in use
-        <0 err
-        +EALREADY for update of an old index */
-int mgs_set_index(struct obd_device *obd, struct mgs_target_info *mti)
-{
-        struct fs_db *fsdb;
-        void *imap;
-        int rc = 0;
-        ENTRY;
-
-        rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); 
-        if (rc) {
-                CERROR("Can't get db for %s\n", mti->mti_fsname);
-                RETURN(rc);
-        }
-
-        if (mti->mti_flags & LDD_F_SV_TYPE_OST) 
-                imap = fsdb->fsdb_ost_index_map;
-        else if (mti->mti_flags & LDD_F_SV_TYPE_MDT) 
-                imap = fsdb->fsdb_mdt_index_map;
-        else
-                RETURN(-EINVAL);
-
-        if (mti->mti_flags & LDD_F_NEED_INDEX) {
-                rc = next_index(imap, INDEX_MAP_SIZE);
-                if (rc == -1)
-                        RETURN(-ERANGE);
-                mti->mti_stripe_index = rc;
-        }
-
-        /* Remove after CMD */
-        if ((mti->mti_flags & LDD_F_SV_TYPE_MDT) && 
-            (mti->mti_stripe_index > 0)) {
-                LCONSOLE_ERROR_MSG(0x13e, "MDT index must = 0 (until Clustered "
-                                   "MetaData feature is ready.)\n");
-                mti->mti_stripe_index = 0;
-        }
-
-        if (mti->mti_stripe_index >= INDEX_MAP_SIZE * 8) {
-                LCONSOLE_ERROR_MSG(0x13f, "Server %s requested index %d, but the"
-                                   "max index is %d.\n", 
-                                   mti->mti_svname, mti->mti_stripe_index,
-                                   INDEX_MAP_SIZE * 8);
-                RETURN(-ERANGE);
-        }
-         
-        if (test_bit(mti->mti_stripe_index, imap)) {
-                if (mti->mti_flags & LDD_F_VIRGIN) {
-                        LCONSOLE_ERROR_MSG(0x140, "Server %s requested index "
-                                           "%d, but that index is already in "
-                                           "use\n", mti->mti_svname, 
-                                           mti->mti_stripe_index);
-                        RETURN(-EADDRINUSE);
-                } else {
-                        CDEBUG(D_MGS, "Server %s updating index %d\n",
-                               mti->mti_svname, mti->mti_stripe_index);
-                        RETURN(EALREADY);
-                }
-        }
-
-        set_bit(mti->mti_stripe_index, imap);
-        fsdb->fsdb_flags &= ~FSDB_LOG_EMPTY;
-        server_make_name(mti->mti_flags, mti->mti_stripe_index,
-                         mti->mti_fsname, mti->mti_svname);
-
-        CDEBUG(D_MGS, "Set index for %s to %d\n", mti->mti_svname, 
-               mti->mti_stripe_index);
-
-        RETURN(0);
-}
-
-struct mgs_modify_lookup {
-        struct cfg_marker mml_marker;
-        int               mml_modified;
-};
-
-static int mgs_modify_handler(struct llog_handle *llh, struct llog_rec_hdr *rec, 
-                              void *data)
-{
-        struct mgs_modify_lookup *mml = (struct mgs_modify_lookup *)data;
-        struct cfg_marker *marker;
-        struct lustre_cfg *lcfg = (struct lustre_cfg *)(rec + 1);
-        int cfg_len = rec->lrh_len - sizeof(struct llog_rec_hdr) - 
-                sizeof(struct llog_rec_tail);
-        int rc;
-        ENTRY;
-
-        if (rec->lrh_type != OBD_CFG_REC) {
-                CERROR("unhandled lrh_type: %#x\n", rec->lrh_type);
-                RETURN(-EINVAL);
-        }
-
-        rc = lustre_cfg_sanity_check(lcfg, cfg_len);
-        if (rc) {
-                CERROR("Insane cfg\n");
-                RETURN(rc);
-        }
-
-        /* We only care about markers */
-        if (lcfg->lcfg_command != LCFG_MARKER)
-                RETURN(0); 
-        
-        marker = lustre_cfg_buf(lcfg, 1);
-        if ((strcmp(mml->mml_marker.cm_comment, marker->cm_comment) == 0) && 
-            (strcmp(mml->mml_marker.cm_tgtname, marker->cm_tgtname) == 0) &&
-            !(marker->cm_flags & CM_SKIP)) {
-                /* Found a non-skipped marker match */
-                CDEBUG(D_MGS, "Changing rec %u marker %d %x->%x: %s %s\n",
-                       rec->lrh_index, marker->cm_step, 
-                       marker->cm_flags, mml->mml_marker.cm_flags,
-                       marker->cm_tgtname, marker->cm_comment);
-                /* Overwrite the old marker llog entry */
-                marker->cm_flags &= ~CM_EXCLUDE; /* in case we're unexcluding */
-                marker->cm_flags |= mml->mml_marker.cm_flags;
-                marker->cm_canceltime = mml->mml_marker.cm_canceltime;
-                /* Header and tail are added back to lrh_len in 
-                   llog_lvfs_write_rec */
-                rec->lrh_len = cfg_len; 
-                rc = llog_write_rec(llh, rec, NULL, 0, (void *)lcfg, 
-                                    rec->lrh_index);
-                if (!rc) 
-                         mml->mml_modified++;
-        }
-
-        RETURN(rc);
-}
-
-/* Modify an existing config log record (for CM_SKIP or CM_EXCLUDE) */
-static int mgs_modify(struct obd_device *obd, struct fs_db *fsdb,
-                      struct mgs_target_info *mti, char *logname, 
-                      char *devname, char *comment, int flags)
-{
-        struct llog_handle *loghandle;
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        struct mgs_modify_lookup *mml;
-        int rc, rc2;
-        ENTRY;
-
-        CDEBUG(D_MGS, "modify %s/%s/%s\n", logname, devname, comment);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-       
-        ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-        LASSERT(ctxt != NULL);
-        rc = llog_create(ctxt, &loghandle, NULL, logname);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-
-        if (llog_get_size(loghandle) <= 1)
-                GOTO(out_close, rc = 0);
-
-        OBD_ALLOC_PTR(mml);
-        if (!mml) 
-                GOTO(out_close, rc = -ENOMEM);
-        strcpy(mml->mml_marker.cm_comment, comment);
-        strcpy(mml->mml_marker.cm_tgtname, devname);
-        /* Modify mostly means cancel */
-        mml->mml_marker.cm_flags = flags;
-        mml->mml_marker.cm_canceltime = flags ? cfs_time_current_sec() : 0;
-        mml->mml_modified = 0;
-        rc = llog_process(loghandle, mgs_modify_handler, (void *)mml, NULL);
-        if (!rc && !mml->mml_modified) 
-                rc = -ENODEV;
-        OBD_FREE_PTR(mml);
-
-out_close:
-        rc2 = llog_close(loghandle);
-        if (!rc)
-                rc = rc2;
-out_pop:
-        llog_ctxt_put(ctxt);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (rc && rc != -ENODEV) 
-                CERROR("modify %s/%s failed %d\n",
-                       mti->mti_svname, comment, rc);
-
-        RETURN(rc);
-}
-
-                           
-/******************** config log recording functions *********************/
-
-static int record_lcfg(struct obd_device *obd, struct llog_handle *llh,
-                         struct lustre_cfg *lcfg)
-{
-        struct lvfs_run_ctxt   saved;
-        struct llog_rec_hdr    rec;
-        int buflen, rc;
-
-        if (!lcfg || !llh) 
-                return -ENOMEM;
-
-        LASSERT(llh->lgh_ctxt);        
-
-        buflen = lustre_cfg_len(lcfg->lcfg_bufcount,
-                                lcfg->lcfg_buflens);
-        rec.lrh_len = llog_data_len(buflen);
-        rec.lrh_type = OBD_CFG_REC;
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        /* idx = -1 means append */
-        rc = llog_write_rec(llh, &rec, NULL, 0, (void *)lcfg, -1);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (rc) 
-                CERROR("failed %d\n", rc);
-        return rc;
-}
-
-static int record_base(struct obd_device *obd, struct llog_handle *llh,
-                     char *cfgname, lnet_nid_t nid, int cmd,
-                     char *s1, char *s2, char *s3, char *s4)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg     *lcfg;
-        int rc;
-               
-        CDEBUG(D_MGS, "lcfg %s %#x %s %s %s %s\n", cfgname,
-               cmd, s1, s2, s3, s4); 
-
-        lustre_cfg_bufs_reset(&bufs, cfgname);
-        if (s1) 
-                lustre_cfg_bufs_set_string(&bufs, 1, s1);
-        if (s2) 
-                lustre_cfg_bufs_set_string(&bufs, 2, s2);
-        if (s3) 
-                lustre_cfg_bufs_set_string(&bufs, 3, s3);
-        if (s4) 
-                lustre_cfg_bufs_set_string(&bufs, 4, s4);
-
-        lcfg = lustre_cfg_new(cmd, &bufs);
-        if (!lcfg) 
-                return -ENOMEM;
-        lcfg->lcfg_nid = nid;
-
-        rc = record_lcfg(obd, llh, lcfg);
-        
-        lustre_cfg_free(lcfg);
-        
-        if (rc) {
-                CERROR("error %d: lcfg %s %#x %s %s %s %s\n", rc, cfgname,
-                       cmd, s1, s2, s3, s4); 
-        }
-        return(rc);
-}
-
-
-static inline int record_add_uuid(struct obd_device *obd, 
-                                  struct llog_handle *llh, 
-                                  __u64 nid, char *uuid)
-{
-        return record_base(obd,llh,NULL,nid,LCFG_ADD_UUID,uuid,0,0,0);
-
-}
-
-static inline int record_add_conn(struct obd_device *obd, 
-                                  struct llog_handle *llh,
-                                  char *devname,
-                                  char *uuid)
-{
-        return record_base(obd,llh,devname,0,LCFG_ADD_CONN,uuid,0,0,0);
-}
-
-static inline int record_attach(struct obd_device *obd, struct llog_handle *llh,
-                                char *devname, char *type, char *uuid)
-{
-        return record_base(obd,llh,devname,0,LCFG_ATTACH,type,uuid,0,0);
-}
-
-static inline int record_setup(struct obd_device *obd, struct llog_handle *llh,
-                               char *devname, 
-                               char *s1, char *s2, char *s3, char *s4)
-{
-        return record_base(obd,llh,devname,0,LCFG_SETUP,s1,s2,s3,s4);
-}
-
-static int record_lov_setup(struct obd_device *obd, struct llog_handle *llh,
-                            char *devname, struct lov_desc *desc)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int rc;
-
-        lustre_cfg_bufs_reset(&bufs, devname);
-        lustre_cfg_bufs_set(&bufs, 1, desc, sizeof(*desc));
-        lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
-        if (!lcfg) 
-                return -ENOMEM;
-        rc = record_lcfg(obd, llh, lcfg);
-
-        lustre_cfg_free(lcfg);
-        return rc;
-}
-
-static inline int record_lov_add(struct obd_device *obd,
-                                 struct llog_handle *llh,
-                                 char *lov_name, char *ost_uuid,
-                                 char *index, char *gen)
-{
-        return record_base(obd,llh,lov_name,0,LCFG_LOV_ADD_OBD,
-                           ost_uuid,index,gen,0);
-}                                  
-
-static inline int record_mount_opt(struct obd_device *obd, 
-                                   struct llog_handle *llh,
-                                   char *profile, char *lov_name,
-                                   char *mdc_name)
-{
-        return record_base(obd,llh,NULL,0,LCFG_MOUNTOPT,
-                           profile,lov_name,mdc_name,0);
-}                
-
-static int record_marker(struct obd_device *obd, struct llog_handle *llh,
-                         struct fs_db *fsdb, __u32 flags,
-                         char *tgtname, char *comment)
-{
-        struct cfg_marker marker;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int rc;
-
-        if (flags & CM_START) 
-                fsdb->fsdb_gen++;
-        marker.cm_step = fsdb->fsdb_gen;
-        marker.cm_flags = flags;
-        marker.cm_vers = LUSTRE_VERSION_CODE;
-        strncpy(marker.cm_tgtname, tgtname, sizeof(marker.cm_tgtname)); 
-        strncpy(marker.cm_comment, comment, sizeof(marker.cm_comment)); 
-        marker.cm_createtime = cfs_time_current_sec();
-        marker.cm_canceltime = 0;
-        lustre_cfg_bufs_reset(&bufs, NULL);
-        lustre_cfg_bufs_set(&bufs, 1, &marker, sizeof(marker));
-        lcfg = lustre_cfg_new(LCFG_MARKER, &bufs);
-        if (!lcfg) 
-                return -ENOMEM;
-        rc = record_lcfg(obd, llh, lcfg);
-
-        lustre_cfg_free(lcfg);
-        return rc;
-}
-
-static int record_start_log(struct obd_device *obd, 
-                            struct llog_handle **llh, char *name)
-{
-        static struct obd_uuid cfg_uuid = { .uuid = "config_uuid" };
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        int rc = 0;
-        
-        if (*llh) 
-                GOTO(out, rc = -EBUSY);
-
-        ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-        if (!ctxt)
-                GOTO(out, rc = -ENODEV);
-        
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = llog_create(ctxt, llh, NULL, name);
-        if (rc == 0)
-                llog_init_handle(*llh, LLOG_F_IS_PLAIN, &cfg_uuid);
-        else
-                *llh = NULL;
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-
-out:
-        if (rc) {
-                CERROR("Can't start log %s: %d\n", name, rc);
-        }
-        RETURN(rc);
-}
-
-static int record_end_log(struct obd_device *obd, struct llog_handle **llh)
-{
-        struct lvfs_run_ctxt saved;
-        int rc = 0;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        
-        rc = llog_close(*llh);
-        *llh = NULL;
-        
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        RETURN(rc);
-}
-
-static int mgs_log_is_empty(struct obd_device *obd, char *name)
-{
-        struct lvfs_run_ctxt saved;
-        struct llog_handle *llh;
-        struct llog_ctxt *ctxt;
-        int rc = 0;
-
-        ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-        LASSERT(ctxt != NULL);
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc == 0) {
-                llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-                rc = llog_get_size(llh);
-                llog_close(llh);
-        }
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-        /* header is record 1 */
-        return(rc <= 1);
-}
-
-/******************** config "macros" *********************/
-
-/* write an lcfg directly into a log (with markers) */
-static int mgs_write_log_direct(struct obd_device *obd, struct fs_db *fsdb,
-                                char *logname, struct lustre_cfg *lcfg, 
-                                char *devname, char *comment)
-{
-        struct llog_handle *llh = NULL;
-        int rc;
-        ENTRY;
-
-        if (!lcfg) 
-                RETURN(-ENOMEM);
-
-        rc = record_start_log(obd, &llh, logname);
-        if (rc) 
-                RETURN(rc);
-        
-        /* FIXME These should be a single journal transaction */
-        rc = record_marker(obd, llh, fsdb, CM_START, devname, comment); 
-        
-        rc = record_lcfg(obd, llh, lcfg);
-
-        rc = record_marker(obd, llh, fsdb, CM_END, devname, comment); 
-        rc = record_end_log(obd, &llh);
-        
-        RETURN(rc);
-}
-
-/* write the lcfg in all logs for the given fs */
-int mgs_write_log_direct_all(struct obd_device *obd, struct fs_db *fsdb,
-                             struct mgs_target_info *mti, 
-                             struct lustre_cfg *lcfg,
-                             char *devname, char *comment)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        struct list_head dentry_list;
-        struct l_linux_dirent *dirent, *n;
-        char *fsname = mti->mti_fsname;
-        char *logname;
-        int rc = 0, len = strlen(fsname);
-        ENTRY;
-        
-        /* We need to set params for any future logs 
-           as well. FIXME Append this file to every new log. 
-           Actually, we should store as params (text), not llogs.  Or
-           in a database. */
-        name_create(&logname, fsname, "-params");
-        if (mgs_log_is_empty(obd, logname)) {
-                struct llog_handle *llh = NULL;
-                rc = record_start_log(obd, &llh, logname);
-                record_end_log(obd, &llh);
-        }
-        name_destroy(&logname);
-        if (rc) 
-                RETURN(rc);
-
-        /* Find all the logs in the CONFIGS directory */
-        rc = class_dentry_readdir(obd, mgs->mgs_configs_dir,
-                                  mgs->mgs_vfsmnt, &dentry_list);
-        if (rc) {
-                CERROR("Can't read %s dir\n", MOUNT_CONFIGS_DIR);
-                RETURN(rc);
-        }
-                                                                                
-        /* Could use fsdb index maps instead of directory listing */
-        list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) {
-                list_del(&dirent->lld_list);
-                if (strncmp(fsname, dirent->lld_name, len) == 0) {
-                        CDEBUG(D_MGS, "Changing log %s\n", dirent->lld_name);
-                        /* Erase any old settings of this same parameter */
-                        mgs_modify(obd, fsdb, mti, dirent->lld_name, devname, 
-                                   comment, CM_SKIP);
-                        /* Write the new one */
-                        rc = mgs_write_log_direct(obd, fsdb, dirent->lld_name,
-                                                  lcfg, devname, comment);
-                        if (rc)
-                                CERROR("err %d writing log %s\n", rc, 
-                                       dirent->lld_name);
-                }
-                OBD_FREE(dirent, sizeof(*dirent));
-        }
-        
-        RETURN(rc);
-}
-
-/* lov is the first thing in the mdt and client logs */
-static int mgs_write_log_lov(struct obd_device *obd, struct fs_db *fsdb, 
-                             struct mgs_target_info *mti,
-                             char *logname, char *lovname)
-{
-        struct llog_handle *llh = NULL;
-        struct lov_desc *lovdesc;
-        char *uuid;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_MGS, "Writing log %s\n", logname);
-
-        /*
-        #01 L attach   0:lov_mdsA  1:lov  2:71ccb_lov_mdsA_19f961a9e1
-        #02 L lov_setup 0:lov_mdsA 1:(struct lov_desc)
-              uuid=lov1_UUID, stripe count=1, size=1048576, offset=0, pattern=0
-        */
-
-        /* FIXME just make lov_setup accept empty desc (put uuid in buf 2) */
-        OBD_ALLOC(lovdesc, sizeof(*lovdesc));
-        if (lovdesc == NULL)
-                RETURN(-ENOMEM);
-        lovdesc->ld_magic = LOV_DESC_MAGIC;
-        lovdesc->ld_tgt_count = 0;
-        /* Defaults.  Can be changed later by lcfg config_param */ 
-        lovdesc->ld_default_stripe_count = 1;
-        lovdesc->ld_pattern = LOV_PATTERN_RAID0;
-        lovdesc->ld_default_stripe_size = 1024 * 1024;
-        lovdesc->ld_default_stripe_offset = 0;
-        lovdesc->ld_qos_maxage = QOS_DEFAULT_MAXAGE;
-        sprintf((char*)lovdesc->ld_uuid.uuid, "%s_UUID", lovname);
-        /* can these be the same? */
-        uuid = (char *)lovdesc->ld_uuid.uuid;
-
-        /* This should always be the first entry in a log.
-        rc = mgs_clear_log(obd, logname); */
-        rc = record_start_log(obd, &llh, logname);
-        if (rc) 
-                GOTO(out, rc);
-        /* FIXME these should be a single journal transaction */
-        rc = record_marker(obd, llh, fsdb, CM_START, lovname, "lov setup"); 
-        rc = record_attach(obd, llh, lovname, "lov", uuid);
-        rc = record_lov_setup(obd, llh, lovname, lovdesc);
-        rc = record_marker(obd, llh, fsdb, CM_END, lovname, "lov setup"); 
-        rc = record_end_log(obd, &llh);
-out:        
-        OBD_FREE(lovdesc, sizeof(*lovdesc));
-        RETURN(rc);
-}
-
-/* add failnids to open log */
-static int mgs_write_log_failnids(struct obd_device *obd,
-                                  struct mgs_target_info *mti,
-                                  struct llog_handle *llh,
-                                  char *cliname)
-{
-        char *failnodeuuid = NULL;
-        char *ptr = mti->mti_params;
-        lnet_nid_t nid;
-        int rc = 0;
-
-        /*
-        #03 L add_uuid  nid=uml1@tcp(0x20000c0a80201) nal=90 0:  1:uml1_UUID
-        #04 L add_uuid  nid=1@elan(0x1000000000001)   nal=90 0:  1:uml1_UUID
-        #05 L setup    0:OSC_uml1_ost1_mdsA  1:ost1_UUID  2:uml1_UUID
-        #06 L add_uuid  nid=uml2@tcp(0x20000c0a80202) nal=90 0:  1:uml2_UUID
-        #0x L add_uuid  nid=2@elan(0x1000000000002)   nal=90 0:  1:uml2_UUID
-        #07 L add_conn 0:OSC_uml1_ost1_mdsA  1:uml2_UUID
-        */
-
-        /* Pull failnid info out of params string */
-        while (class_find_param(ptr, PARAM_FAILNODE, &ptr) == 0) {
-                while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                        if (failnodeuuid == NULL) {
-                                /* We don't know the failover node name, 
-                                   so just use the first nid as the uuid */
-                                rc = name_create(&failnodeuuid,
-                                                 libcfs_nid2str(nid), "");
-                                if (rc) 
-                                        return rc;
-                        }
-                        CDEBUG(D_MGS, "add nid %s for failover uuid %s, "
-                               "client %s\n", libcfs_nid2str(nid),
-                               failnodeuuid, cliname);
-                        rc = record_add_uuid(obd, llh, nid, failnodeuuid);
-                }
-                if (failnodeuuid) {
-                        rc = record_add_conn(obd, llh, cliname, failnodeuuid);
-                        name_destroy(&failnodeuuid);
-                        failnodeuuid = NULL;
-                }
-        }
-
-        return rc;
-}
-
-static int mgs_write_log_mdt(struct obd_device *obd, struct fs_db *fsdb,
-                             struct mgs_target_info *mti)
-{
-        struct llog_handle *llh = NULL;
-        char *cliname, *mdcname, *nodeuuid, *mdcuuid;
-        int rc, i, first_log = 0;
-        ENTRY;
-
-        CDEBUG(D_MGS, "writing new mdt %s\n", mti->mti_svname);
-        
-        if (mti->mti_uuid[0] == '\0') {
-                /* Make up our own uuid */
-                snprintf(mti->mti_uuid, sizeof(mti->mti_uuid),
-                         "%s_UUID", mti->mti_svname);
-        }
-
-        /* Append mdt info to mdt log */
-        if (mgs_log_is_empty(obd, mti->mti_svname)) {
-                /* This is the first time for all logs for this fs, 
-                   since any ost should have already started the mdt log. */
-                first_log++;
-                rc = mgs_write_log_lov(obd, fsdb, mti, mti->mti_svname,
-                                       fsdb->fsdb_mdtlov);
-        } 
-        /* else there's already some ost entries in the mdt log. */
-
-        /* We added the lov, maybe some osc's, now for the mdt.
-           We might add more ost's after this. Note that during the parsing
-           of this log, this is when the mdt will start. (This was not 
-           formerly part of the old mds log, it was directly executed by
-           lconf.) */ 
-        /*
-        mount_option 0:  1:mdsA  2:lov_mdsA
-        attach mds mdsA mdsA_UUID
-        setup /dev/loop2 ldiskfs mdsA errors=remount-ro,user_xattr
-        */
-        rc = record_start_log(obd, &llh, mti->mti_svname);
-        if (rc) 
-                RETURN(rc);
-        /* FIXME this whole fn should be a single journal transaction */
-        rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,"add mdt"); 
-        rc = record_mount_opt(obd, llh, mti->mti_svname, fsdb->fsdb_mdtlov, 0);
-        rc = record_attach(obd, llh, mti->mti_svname, LUSTRE_MDS_NAME, 
-                           mti->mti_uuid);
-        rc = record_setup(obd, llh, mti->mti_svname,
-                          "dev"/*ignored*/, "type"/*ignored*/,
-                          mti->mti_svname, 0/*options*/);
-        rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, "add mdt"); 
-        rc = record_end_log(obd, &llh);
-
-        /* Append the mdt info to the client log */
-        name_create(&cliname, mti->mti_fsname, "-client");
-        if (first_log) { 
-                /* Start client log */
-                rc = mgs_write_log_lov(obd, fsdb, mti, cliname,
-                                       fsdb->fsdb_clilov);
-        }
-
-        name_create(&nodeuuid, libcfs_nid2str(mti->mti_nids[0]),/*"_UUID"*/"");
-        name_create(&mdcname, mti->mti_svname, "-mdc");
-        name_create(&mdcuuid, mdcname, "_UUID");
-        /* 
-        #09 L add_uuid nid=uml1@tcp(0x20000c0a80201) 0:  1:uml1_UUID
-        #10 L attach   0:MDC_uml1_mdsA_MNT_client  1:mdc  2:1d834_MNT_client_03f
-        #11 L setup    0:MDC_uml1_mdsA_MNT_client  1:mdsA_UUID  2:uml1_UUID
-        #12 L add_uuid nid=uml2@tcp(0x20000c0a80202) 0:  1:uml2_UUID
-        #13 L add_conn 0:MDC_uml1_mdsA_MNT_client  1:uml2_UUID
-        #14 L mount_option 0:  1:client  2:lov1  3:MDC_uml1_mdsA_MNT_client
-        */
-        rc = record_start_log(obd, &llh, cliname);
-        if (rc) 
-                GOTO(out, rc);
-        rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,"add mdc");
-        /* COMPAT_146 */
-        if (fsdb->fsdb_flags & FSDB_OLDLOG14) {
-                /* Old client log already has MDC entry, but needs mount opt 
-                   for new client name (lustre-client) */
-                /* FIXME Old MDT log already has an old mount opt 
-                   which we should remove (currently handled by
-                   class_del_profiles()) */
-                rc = record_mount_opt(obd, llh, cliname, fsdb->fsdb_clilov,
-                                      fsdb->fsdb_mdc);
-                /* Only add failnids with --writeconf 
-                rc = mgs_write_log_failnids(obd, mti, llh, fsdb->fsdb_mdc);
-                */
-                /* end COMPAT_146 */
-        } else {
-                for (i = 0; i < mti->mti_nid_count; i++) {
-                        CDEBUG(D_MGS, "add nid %s\n",
-                               libcfs_nid2str(mti->mti_nids[i]));
-                        rc = record_add_uuid(obd, llh, mti->mti_nids[i],
-                                             nodeuuid);
-                }
-                rc = record_attach(obd, llh, mdcname, LUSTRE_MDC_NAME, mdcuuid);
-                rc = record_setup(obd, llh, mdcname, mti->mti_uuid,nodeuuid,
-                                  0, 0);
-                rc = mgs_write_log_failnids(obd, mti, llh, mdcname);
-                rc = record_mount_opt(obd, llh, cliname, fsdb->fsdb_clilov,
-                                      mdcname);
-        }
-        rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, "add mdc"); 
-        rc = record_end_log(obd, &llh);
-out:
-        name_destroy(&mdcuuid);
-        name_destroy(&mdcname);
-        name_destroy(&nodeuuid);
-        name_destroy(&cliname);
-        RETURN(rc);
-}
-
-/* Add the ost info to the client/mdt lov */
-static int mgs_write_log_osc(struct obd_device *obd, struct fs_db *fsdb,
-                             struct mgs_target_info *mti,
-                             char *logname, char *lovname, int flags)
-{
-        struct llog_handle *llh = NULL;
-        char *nodeuuid, *oscname, *oscuuid, *lovuuid;
-        char index[5];
-        int i, rc;
-
-        if (mgs_log_is_empty(obd, logname)) {
-                /* The first item in the log must be the lov, so we have
-                   somewhere to add our osc. */
-                rc = mgs_write_log_lov(obd, fsdb, mti, logname, lovname);
-        }
-  
-        CDEBUG(D_MGS, "adding osc for %s to log %s\n",
-               mti->mti_svname, logname);
-
-        name_create(&nodeuuid, libcfs_nid2str(mti->mti_nids[0]), "");
-        name_create(&oscname, mti->mti_svname, "-osc");
-        name_create(&oscuuid, oscname, "_UUID");
-        name_create(&lovuuid, lovname, "_UUID");
-
-        /*
-        #03 L add_uuid nid=uml1@tcp(0x20000c0a80201) 0:  1:uml1_UUID
-        multihomed (#4)
-        #04 L add_uuid  nid=1@elan(0x1000000000001)  nal=90 0:  1:uml1_UUID
-        #04 L attach   0:OSC_uml1_ost1_MNT_client  1:osc  2:89070_lov1_a41dff51a
-        #05 L setup    0:OSC_uml1_ost1_MNT_client  1:ost1_UUID  2:uml1_UUID
-        failover (#6,7)
-        #06 L add_uuid nid=uml2@tcp(0x20000c0a80202) 0:  1:uml2_UUID
-        #07 L add_conn 0:OSC_uml1_ost1_MNT_client  1:uml2_UUID
-        #08 L lov_modify_tgts add 0:lov1  1:ost1_UUID  2(index):0  3(gen):1
-        */
-        rc = record_start_log(obd, &llh, logname);
-        if (rc) 
-                GOTO(out, rc);
-        /* FIXME these should be a single journal transaction */
-        rc = record_marker(obd, llh, fsdb, CM_START | flags, mti->mti_svname,
-                           "add osc"); 
-        for (i = 0; i < mti->mti_nid_count; i++) {
-                CDEBUG(D_MGS, "add nid %s\n", libcfs_nid2str(mti->mti_nids[i]));
-                rc = record_add_uuid(obd, llh, mti->mti_nids[i], nodeuuid);
-        }
-        rc = record_attach(obd, llh, oscname, LUSTRE_OSC_NAME, lovuuid);
-        rc = record_setup(obd, llh, oscname, mti->mti_uuid, nodeuuid, 0, 0);
-        rc = mgs_write_log_failnids(obd, mti, llh, oscname);
-        snprintf(index, sizeof(index), "%d", mti->mti_stripe_index);
-        rc = record_lov_add(obd, llh, lovname, mti->mti_uuid, index, "1");
-        rc = record_marker(obd, llh, fsdb, CM_END | flags, mti->mti_svname,
-                           "add osc"); 
-        rc = record_end_log(obd, &llh);
-out:        
-        name_destroy(&lovuuid);
-        name_destroy(&oscuuid);
-        name_destroy(&oscname);
-        name_destroy(&nodeuuid);
-        return rc;
-}
-
-static int mgs_write_log_ost(struct obd_device *obd, struct fs_db *fsdb,
-                             struct mgs_target_info *mti)
-{
-        struct llog_handle *llh = NULL;
-        char *logname;
-        char *ptr = mti->mti_params;
-        int rc, flags = 0, failout = 0;
-        ENTRY;
-        
-        CDEBUG(D_MGS, "writing new ost %s\n", mti->mti_svname);
-
-        /* The ost startup log */
-
-        /* If the ost log already exists, that means that someone reformatted
-           the ost and it called target_add again. */
-        if (!mgs_log_is_empty(obd, mti->mti_svname)) {
-                LCONSOLE_ERROR_MSG(0x141, "The config log for %s already "
-                                   "exists, yet the server claims it never "
-                                   "registered. It may have been reformatted, "
-                                   "or the index changed. writeconf the MDT to "
-                                   "regenerate all logs.\n", mti->mti_svname);
-                RETURN(-EALREADY);
-        }
-        /*
-        attach obdfilter ost1 ost1_UUID
-        setup /dev/loop2 ldiskfs f|n errors=remount-ro,user_xattr
-        */
-        if (class_find_param(ptr, PARAM_FAILMODE, &ptr) == 0) 
-                failout = (strncmp(ptr, "failout", 7) == 0);
-        rc = record_start_log(obd, &llh, mti->mti_svname);
-        if (rc) 
-                RETURN(rc);
-        /* FIXME these should be a single journal transaction */
-        rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,"add ost"); 
-        if (*mti->mti_uuid == '\0') 
-                snprintf(mti->mti_uuid, sizeof(mti->mti_uuid),
-                         "%s_UUID", mti->mti_svname);
-        rc = record_attach(obd, llh, mti->mti_svname,
-                           "obdfilter"/*LUSTRE_OST_NAME*/, mti->mti_uuid);
-        rc = record_setup(obd, llh, mti->mti_svname,
-                          "dev"/*ignored*/, "type"/*ignored*/,
-                          failout ? "n" : "f", 0/*options*/);
-        rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname, "add ost"); 
-        rc = record_end_log(obd, &llh);
-
-        /* We also have to update the other logs where this osc is part of 
-           the lov */
-
-        if (fsdb->fsdb_flags & FSDB_OLDLOG14) {
-                /* If we're upgrading, the old mdt log already has our
-                   entry. Let's do a fake one for fun. */
-                /* Note that we can't add any new failnids, since we don't
-                   know the old osc names. */
-                flags = CM_SKIP | CM_UPGRADE146;
-        } else if ((mti->mti_flags & LDD_F_UPDATE) != LDD_F_UPDATE) {
-                /* If the update flag isn't set, don't really update
-                   client/mdt logs. */
-                flags |= CM_SKIP;
-                LCONSOLE_WARN("Client log for %s was not updated; writeconf "
-                              "the MDT first to regenerate it.\n",
-                              mti->mti_svname);
-        }
-        
-        /* Append ost info to mdt log */
-        /* FIXME add to all MDT logs for CMD */
-        /* FIXME need real MDT name, but MDT may not have registered yet! */
-        name_create(&logname, mti->mti_fsname, "-MDT0000");
-        rc = mgs_write_log_osc(obd, fsdb, mti, logname, fsdb->fsdb_mdtlov,
-                               flags);
-        name_destroy(&logname);
-        
-        /* Append ost info to the client log */
-        name_create(&logname, mti->mti_fsname, "-client");
-        rc = mgs_write_log_osc(obd, fsdb, mti, logname, fsdb->fsdb_clilov, 
-                               flags);
-        name_destroy(&logname);
-        
-        RETURN(rc);
-}
-
-/* Add additional failnids to an existing log.  
-   The mdc/osc must have been added to logs first */
-/* tcp nids must be in dotted-quad ascii -
-   we can't resolve hostnames from the kernel. */
-static int mgs_write_log_add_failnid(struct obd_device *obd, struct fs_db *fsdb,
-                                     struct mgs_target_info *mti)
-{
-        char *logname, *cliname;
-        struct llog_handle *llh = NULL;
-        int rc;
-        ENTRY;
-
-        /* FIXME how do we delete a failnid? Currently --writeconf is the
-           only way.  Maybe make --erase-params pass a flag to really 
-           erase all params from logs - except it can't erase the failnids
-           given when a target first registers, since they aren't processed
-           as params... */
-
-        /* Verify that we know about this target */
-        if (mgs_log_is_empty(obd, mti->mti_svname)) {
-                LCONSOLE_ERROR_MSG(0x142, "The target %s has not registered "
-                                   "yet. It must be started before failnids can"
-                                   " be added.\n", mti->mti_svname);
-                RETURN(-ENOENT);
-        }
-
-        /* Create mdc/osc client name (e.g. lustre-OST0001-osc) */
-        if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
-                /* COMPAT_146 */ 
-                if (fsdb->fsdb_mdc)
-                        name_create(&cliname, fsdb->fsdb_mdc, "");
-                else 
-                        name_create(&cliname, mti->mti_svname, "-mdc");
-        } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
-                /* COMPAT_146 */
-                if (fsdb->fsdb_flags & FSDB_OLDLOG14) {
-                        LCONSOLE_ERROR_MSG(0x143, "Failover NIDs cannot be "
-                                           "added to upgraded client logs for "
-                                           "%s. Consider updating the "
-                                           "configuration with --writeconf.\n", 
-                                           mti->mti_svname);
-                        RETURN(-EINVAL);
-                }
-                name_create(&cliname, mti->mti_svname, "-osc");
-        } else {
-                RETURN(-EINVAL);
-        }
-        
-        /* Add failover nids to client log */
-        name_create(&logname, mti->mti_fsname, "-client");
-        rc = record_start_log(obd, &llh, logname);
-        if (!rc) { 
-                /* FIXME this fn should be a single journal transaction */
-                rc = record_marker(obd, llh, fsdb, CM_START, mti->mti_svname,
-                                   "add failnid");
-                rc = mgs_write_log_failnids(obd, mti, llh, cliname);
-                rc = record_marker(obd, llh, fsdb, CM_END, mti->mti_svname,
-                                   "add failnid"); 
-                rc = record_end_log(obd, &llh);
-        }
-        name_destroy(&logname);
-
-        if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
-                /* Add OST failover nids to the MDT log as well */
-                name_create(&logname, mti->mti_fsname, "-MDT0000");
-                rc = record_start_log(obd, &llh, logname);
-                if (!rc) {
-                        rc = record_marker(obd, llh, fsdb, CM_START, 
-                                           mti->mti_svname, "add failnid");
-                        rc = mgs_write_log_failnids(obd, mti, llh, cliname);
-                        rc = record_marker(obd, llh, fsdb, CM_END, 
-                                           mti->mti_svname, "add failnid"); 
-                        rc = record_end_log(obd, &llh);
-                }
-                name_destroy(&logname);
-        }
-
-        name_destroy(&cliname);
-        RETURN(rc);
-}
-
-static int mgs_wlp_lcfg(struct obd_device *obd, struct fs_db *fsdb, 
-                        struct mgs_target_info *mti,
-                        char *logname, struct lustre_cfg_bufs *bufs,
-                        char *tgtname, char *ptr)
-{
-        char comment[MTI_NAME_MAXLEN];
-        char *tmp;
-        struct lustre_cfg *lcfg;
-        int rc;
-        
-        /* Erase any old settings of this same parameter */
-        memcpy(comment, ptr, MTI_NAME_MAXLEN);
-        comment[MTI_NAME_MAXLEN - 1] = 0;
-        /* But don't try to match the value. */
-        if ((tmp = strchr(comment, '=')))
-            *tmp = 0;
-        /* FIXME we should skip settings that are the same as old values */
-        rc = mgs_modify(obd, fsdb, mti, logname, tgtname, comment, CM_SKIP);
-        LCONSOLE_INFO("%sing parameter %s.%s in log %s\n", rc ?
-                      "Sett" : "Modify", tgtname, comment, logname);
-
-        lustre_cfg_bufs_reset(bufs, tgtname);
-        lustre_cfg_bufs_set_string(bufs, 1, ptr);
-        lcfg = lustre_cfg_new(LCFG_PARAM, bufs);
-        if (!lcfg) 
-                return -ENOMEM;
-        rc = mgs_write_log_direct(obd, fsdb, logname, lcfg, tgtname, comment);
-        lustre_cfg_free(lcfg);
-        return rc;
-}
-
-static int mgs_write_log_params(struct obd_device *obd, struct fs_db *fsdb,
-                                struct mgs_target_info *mti)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        char *logname;
-        char *ptr = mti->mti_params;
-        char *endptr, *tmp;
-        int rc = 0;
-        ENTRY;
-
-        if (!mti->mti_params) 
-                RETURN(0);
-
-        /* For various parameter settings, we have to figure out which logs
-           care about them (e.g. both mdt and client for lov settings) */
-        while (ptr) {
-                while (*ptr == ' ') 
-                        ptr++;
-                if (*ptr == '\0')
-                        break;
-                endptr = strchr(ptr, ' ');
-                if (endptr) 
-                        *endptr = '\0';
-                CDEBUG(D_MGS, "next param '%s'\n", ptr);
-
-                /* The params are stored in MOUNT_DATA_FILE and modified 
-                   via tunefs.lustre */
-
-                /* Processed in lustre_start_mgc */
-                if (class_match_param(ptr, PARAM_MGSNODE, NULL) == 0) 
-                        goto end_while;
-
-                /* Processed in mgs_write_log_ost */
-                if (class_match_param(ptr, PARAM_FAILMODE, NULL) == 0) {
-                        if (mti->mti_flags & LDD_F_PARAM) {
-                                LCONSOLE_ERROR_MSG(0x169, "%s can only be "
-                                                   "changed with tunefs.lustre "
-                                                   "and --writeconf\n", ptr);
-                                rc = -EPERM;
-                        }
-                        goto end_while;
-                }
-
-                if (class_match_param(ptr, PARAM_FAILNODE, NULL) == 0) {
-                        /* Add a failover nidlist */
-                        rc = 0;
-                        /* We already processed failovers params for new
-                           targets in mgs_write_log_target */
-                        if (mti->mti_flags & LDD_F_PARAM) {
-                                CDEBUG(D_MGS, "Adding failnode\n");
-                                rc = mgs_write_log_add_failnid(obd, fsdb, mti);
-                        }
-                        goto end_while;
-                }
-
-                if (class_match_param(ptr, PARAM_SYS_TIMEOUT, &tmp) == 0) {
-                        /* Change obd timeout */
-                        int timeout;
-                        timeout = simple_strtoul(tmp, NULL, 0);
-
-                        CDEBUG(D_MGS, "obd timeout %d\n", timeout);
-                        
-                        lustre_cfg_bufs_reset(&bufs, NULL);
-                        lcfg = lustre_cfg_new(LCFG_SET_TIMEOUT, &bufs);
-                        lcfg->lcfg_num = timeout;
-                        /* modify all servers and clients */
-                        rc = mgs_write_log_direct_all(obd, fsdb, mti, lcfg,
-                                                      mti->mti_fsname,
-                                                      "timeout"); 
-                        lustre_cfg_free(lcfg);
-                        goto end_while;
-                }
-
-                if (class_match_param(ptr, PARAM_OSC""PARAM_ACTIVE, &tmp) == 0){ 
-                        /* active=0 means off, anything else means on */
-                        int flag = (*tmp == '0') ? CM_EXCLUDE : 0;
-                        if (!(mti->mti_flags & LDD_F_SV_TYPE_OST)) {
-                                LCONSOLE_ERROR_MSG(0x144, "%s: Only OSCs can be"
-                                                   " (de)activated.\n", 
-                                                   mti->mti_svname);
-                                rc = -EINVAL;
-                                goto end_while;
-                        }
-                        LCONSOLE_WARN("Permanently %sactivating %s\n",
-                                      flag ? "de": "re", mti->mti_svname);
-                        /* Modify clilov */
-                        name_create(&logname, mti->mti_fsname, "-client");
-                        rc = mgs_modify(obd, fsdb, mti, logname, 
-                                        mti->mti_svname, "add osc", flag);
-                        name_destroy(&logname);
-                        if (rc) 
-                                goto active_err;
-                        /* Modify mdtlov */
-                        /* FIXME add to all MDT logs for CMD */
-                        name_create(&logname, mti->mti_fsname, "-MDT0000");
-                        rc = mgs_modify(obd, fsdb, mti, logname, 
-                                        mti->mti_svname, "add osc", flag);
-                        name_destroy(&logname);
-active_err:
-                        if (rc) {
-                                LCONSOLE_ERROR_MSG(0x145, "Couldn't find %s in "
-                                                  "log (%d). No permanent "
-                                                  "changes were made to the "
-                                                  "config log.\n", 
-                                                  mti->mti_svname, rc);
-                                if (fsdb->fsdb_flags & FSDB_OLDLOG14) 
-                                        LCONSOLE_ERROR_MSG(0x146, "This may be "
-                                        "because the log is in the old 1.4 "
-                                        "style. Consider --writeconf to "
-                                        "update the logs.\n");
-                                goto end_while;
-                        }
-                        /* Fall through to osc proc for deactivating 
-                           live OSC on running MDT / clients. */
-                }
-
-                /* Below here, let obd's XXX_process_config methods handle it */
-
-                /* All lov. in proc */
-                if (class_match_param(ptr, PARAM_LOV, NULL) == 0) {
-                        CDEBUG(D_MGS, "lov param %s\n", ptr);
-                        if (!(mti->mti_flags & LDD_F_SV_TYPE_MDT)) {
-                                LCONSOLE_ERROR_MSG(0x147, "LOV params must be "
-                                                   "set on the MDT, not %s. "
-                                                   "Ignoring.\n", 
-                                                   mti->mti_svname);
-                                rc = 0;
-                                goto end_while;
-                        }
-
-                        /* Modify mdtlov */
-                        if (mgs_log_is_empty(obd, mti->mti_svname)) {
-                                rc = -ENODEV;
-                                goto end_while;
-                        }
-                        rc = mgs_wlp_lcfg(obd, fsdb, mti, mti->mti_svname, 
-                                          &bufs, fsdb->fsdb_mdtlov, ptr);
-                        if (rc) 
-                                goto end_while;
-
-                        /* Modify clilov */
-                        name_create(&logname, mti->mti_fsname, "-client");
-                        rc = mgs_wlp_lcfg(obd, fsdb, mti, logname, &bufs,
-                                          fsdb->fsdb_clilov, ptr);
-                        name_destroy(&logname);
-                        goto end_while;
-                }
-
-                /* All osc., mdc., llite. params in proc */
-                if ((class_match_param(ptr, PARAM_OSC, NULL) == 0) || 
-                    (class_match_param(ptr, PARAM_MDC, NULL) == 0) || 
-                    (class_match_param(ptr, PARAM_LLITE, NULL) == 0)) {
-                        char *cname;
-                        if (memcmp(ptr, PARAM_LLITE, strlen(PARAM_LLITE)) == 0) {
-                                name_create(&cname, mti->mti_fsname, "-client");
-                        /* Add the client type to match the obdname 
-                           in class_config_llog_handler */
-                        } else if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
-                                /* COMPAT_146 */
-                                if (fsdb->fsdb_mdc)
-                                        name_create(&cname, fsdb->fsdb_mdc, "");
-                                else
-                                        name_create(&cname, mti->mti_svname, 
-                                                    "-mdc");
-                        } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
-                                /* COMPAT_146 */
-                                if (fsdb->fsdb_flags & FSDB_OLDLOG14) {
-                                      LCONSOLE_ERROR_MSG(0x148, "Upgraded client"
-                                           " logs for %s cannot be modified. "
-                                           "Consider updating the "
-                                           "configuration with --writeconf\n",
-                                           mti->mti_svname);
-                                        /* We don't know the names of all the
-                                           old oscs*/
-                                        rc = -EINVAL;
-                                        goto end_while;
-                                }
-                                name_create(&cname, mti->mti_svname, "-osc");
-                        } else {       
-                                rc = -EINVAL;
-                                goto end_while;
-                        }
-
-                        CDEBUG(D_MGS, "%.3s param %s\n", ptr, ptr + 4);
-                        
-                        /* Modify client */
-                        name_create(&logname, mti->mti_fsname, "-client");
-                        rc = mgs_wlp_lcfg(obd, fsdb, mti, logname, &bufs, 
-                                          cname, ptr);
-                        name_destroy(&logname);
-                        
-                        /* osc params affect the MDT as well */
-                        if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
-                                /* FIXME add to all MDT logs for CMD */
-                                name_create(&logname, mti->mti_fsname,
-                                            "-MDT0000");
-                                if (!mgs_log_is_empty(obd, logname))
-                                        rc = mgs_wlp_lcfg(obd, fsdb, mti,
-                                                          logname, &bufs, 
-                                                          cname, ptr);
-                                name_destroy(&logname);
-                        }
-                        name_destroy(&cname);
-                        goto end_while;
-                }
-
-                /* All mdt., ost. params in proc */
-                if ((class_match_param(ptr, PARAM_MDT, NULL) == 0) || 
-                    (class_match_param(ptr, PARAM_OST, NULL) == 0)) {
-                        CDEBUG(D_MGS, "%.3s param %s\n", ptr, ptr + 4);
-                        if (mgs_log_is_empty(obd, mti->mti_svname)) {
-                                rc = -ENODEV;
-                                goto end_while;
-                        }
-                        rc = mgs_wlp_lcfg(obd, fsdb, mti, mti->mti_svname,
-                                          &bufs, mti->mti_svname, ptr);
-                        goto end_while;
-                }
-
-                LCONSOLE_WARN("Ignoring unrecognized param '%s'\n", ptr);
-
-end_while:
-                if (rc) {
-                        CERROR("err %d on param '%s\n", rc, ptr);
-                        break;
-                }
-                
-                if (!endptr)
-                        /* last param */
-                        break;
-                 
-                *endptr = ' ';
-                ptr = endptr + 1;
-        }
-
-        RETURN(rc);
-}
-
-int mgs_check_failnid(struct obd_device *obd, struct mgs_target_info *mti)
-{
-        /* Not implementing automatic failover nid addition at this time. */
-        return 0;
-#if 0
-        struct fs_db *fsdb;
-        int rc;
-        ENTRY;
-
-        rc = mgs_find_or_make_fsdb(obd, fsname, &fsdb); 
-        if (rc) 
-                RETURN(rc);
-
-        if (mgs_log_is_empty(obd, mti->mti_svname)) 
-                /* should never happen */
-                RETURN(-ENOENT);
-
-        CDEBUG(D_MGS, "Checking for new failnids for %s\n", mti->mti_svname);
-
-        /* FIXME We can just check mti->params to see if we're already in
-           the failover list.  Modify mti->params for rewriting back at 
-           server_register_target(). */
-        
-        down(&fsdb->fsdb_sem);
-        rc = mgs_write_log_add_failnid(obd, fsdb, mti);
-        up(&fsdb->fsdb_sem);
-
-        RETURN(rc);
-#endif
-}
-
-int mgs_write_log_target(struct obd_device *obd,
-                         struct mgs_target_info *mti)
-{
-        struct fs_db *fsdb;
-        int rc = -EINVAL;
-        ENTRY;
-
-        /* set/check the new target index */
-        rc = mgs_set_index(obd, mti);
-        if (rc < 0) {
-                CERROR("Can't get index (%d)\n", rc);
-                RETURN(rc);
-        }
-        /* COMPAT_146 */
-        if (mti->mti_flags & LDD_F_UPGRADE14) {
-                if (rc == EALREADY) {
-                        LCONSOLE_INFO("Found index %d for %s 1.4 log, "
-                                      "upgrading\n", mti->mti_stripe_index, 
-                                      mti->mti_svname);
-                } else {
-                        LCONSOLE_ERROR_MSG(0x149, "Failed to find %s in the old"
-                                           " client log. Apparently it is not "
-                                           "part of this filesystem, or the old"
-                                           " log is wrong.\nUse 'writeconf' on "
-                                           "the MDT to force log regeneration."
-                                           "\n", mti->mti_svname);
-                        /* Not in client log?  Upgrade anyhow...*/
-                        /* Argument against upgrading: reformat MDT,
-                           upgrade OST, then OST will start but will be SKIPped
-                           in client logs.  Maybe error now is better. */
-                        /* RETURN(-EINVAL); */
-                }
-                /* end COMPAT_146 */
-        } else {
-                if (rc == EALREADY) {
-                        /* This might be a params update, or a 
-                           local writeconf. (For "full" writeconf, the client
-                           log won't have an entry for this target, so we 
-                           won't get here.) */
-                        LCONSOLE_WARN("Found index %d for %s, updating log\n", 
-                                      mti->mti_stripe_index, mti->mti_svname);
-                        /* We would like to mark old log sections as invalid 
-                           and add new log sections in the client and mdt logs.
-                           But if we add new sections, then live clients will
-                           get repeat setup instructions for already running
-                           osc's. So don't update the client/mdt logs. */
-                        mti->mti_flags &= ~LDD_F_UPDATE;
-                }
-        }
-
-        rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb); 
-        if (rc) {
-                CERROR("Can't get db for %s\n", mti->mti_fsname);
-                RETURN(rc);
-        }
-
-        down(&fsdb->fsdb_sem);
-
-        if (mti->mti_flags & 
-            (LDD_F_VIRGIN | LDD_F_UPGRADE14 | LDD_F_WRITECONF)) {
-                /* Generate a log from scratch */
-                if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
-                        rc = mgs_write_log_mdt(obd, fsdb, mti);
-                } else if (mti->mti_flags & LDD_F_SV_TYPE_OST) {
-                        rc = mgs_write_log_ost(obd, fsdb, mti);
-                } else {
-                        CERROR("Unknown target type %#x, can't create log for "
-                               "%s\n", mti->mti_flags, mti->mti_svname);
-                }
-                if (rc) {
-                        CERROR("Can't write logs for %s (%d)\n",
-                               mti->mti_svname, rc);
-                        GOTO(out_up, rc);
-                }
-        } else {
-                /* Just update the params from tunefs in mgs_write_log_params */
-                CDEBUG(D_MGS, "Update params for %s\n", mti->mti_svname);
-                mti->mti_flags |= LDD_F_PARAM;
-        }
-        
-        rc = mgs_write_log_params(obd, fsdb, mti);
-
-out_up:
-        up(&fsdb->fsdb_sem);
-        RETURN(rc);
-}
-
-/* COMPAT_146 */
-/* verify that we can handle the old config logs */ 
-int mgs_upgrade_sv_14(struct obd_device *obd, struct mgs_target_info *mti)
-{
-        struct fs_db *fsdb;
-        int rc = 0;
-        ENTRY;
-
-        /* Create ost log normally, as servers register.  Servers 
-           register with their old uuids (from last_rcvd), so old
-           (MDT and client) logs should work.
-         - new MDT won't know about old OSTs, only the ones that have 
-           registered, so we need the old MDT log to get the LOV right 
-           in order for old clients to work. 
-         - Old clients connect to the MDT, not the MGS, for their logs, and 
-           will therefore receive the old client log from the MDT /LOGS dir. 
-         - Old clients can continue to use and connect to old or new OSTs
-         - New clients will contact the MGS for their log 
-        */
-
-        LCONSOLE_INFO("upgrading server %s from pre-1.6\n", mti->mti_svname); 
-        server_mti_print("upgrade", mti);
-        
-        rc = mgs_find_or_make_fsdb(obd, mti->mti_fsname, &fsdb);
-        if (rc) 
-                RETURN(rc);
-        
-        if (fsdb->fsdb_flags & FSDB_LOG_EMPTY) {
-                LCONSOLE_ERROR_MSG(0x14a, "The old client log %s-client is "
-                                   "missing.  Was tunefs.lustre successful?\n",
-                                   mti->mti_fsname);
-                RETURN(-ENOENT);
-        }
-
-        if (fsdb->fsdb_gen == 0) {
-                /* There were no markers in the client log, meaning we have 
-                   not updated the logs for this fs */
-                CDEBUG(D_MGS, "found old, unupdated client log\n");
-        }
-
-        if (mti->mti_flags & LDD_F_SV_TYPE_MDT) {
-                if (mgs_log_is_empty(obd, mti->mti_svname)) {
-                        LCONSOLE_ERROR_MSG(0x14b, "The old MDT log %s is "
-                                           "missing. Was tunefs.lustre "
-                                           "successful?\n",
-                                           mti->mti_svname);
-                        RETURN(-ENOENT);
-                }
-
-                /* We're starting with an old uuid.  Assume old name for lov
-                   as well since the lov entry already exists in the log. */
-                CDEBUG(D_MGS, "old mds uuid %s\n", mti->mti_uuid);
-                if (strncmp(mti->mti_uuid, fsdb->fsdb_mdtlov + 4, 
-                            strlen(fsdb->fsdb_mdtlov) - 4) != 0) {
-                        CERROR("old mds uuid %s doesn't match log %s (%s)\n",
-                               mti->mti_uuid, fsdb->fsdb_mdtlov, 
-                               fsdb->fsdb_mdtlov + 4);
-                        RETURN(-EINVAL);
-                }
-        }
-
-        if (!(fsdb->fsdb_flags & FSDB_OLDLOG14)) {
-                LCONSOLE_ERROR_MSG(0x14c, "%s-client is supposedly an old log, "
-                                   "but no old LOV or MDT was found. Consider "
-                                   "updating the configuration with "
-                                   "--writeconf.\n", mti->mti_fsname);
-        }
-
-        RETURN(rc);
-}
-/* end COMPAT_146 */
-
-int mgs_erase_log(struct obd_device *obd, char *name)
-{
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        struct llog_handle *llh;
-        int rc = 0;
-
-        ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-        LASSERT(ctxt != NULL);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc == 0) {
-                llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-                rc = llog_destroy(llh);
-                llog_free_handle(llh);
-        }
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-
-        if (rc)
-                CERROR("failed to clear log %s: %d\n", name, rc);
-
-        return(rc);
-}
-
-/* erase all logs for the given fs */
-int mgs_erase_logs(struct obd_device *obd, char *fsname)
-{
-        struct mgs_obd *mgs = &obd->u.mgs;
-        static struct fs_db *fsdb;
-        struct list_head dentry_list;
-        struct l_linux_dirent *dirent, *n;
-        int rc, len = strlen(fsname);
-        ENTRY;
-        
-        /* Find all the logs in the CONFIGS directory */
-        rc = class_dentry_readdir(obd, mgs->mgs_configs_dir,
-                                  mgs->mgs_vfsmnt, &dentry_list);
-        if (rc) {
-                CERROR("Can't read %s dir\n", MOUNT_CONFIGS_DIR);
-                RETURN(rc);
-        }
-                                                                                
-        down(&mgs->mgs_sem);
-        
-        /* Delete the fs db */
-        fsdb = mgs_find_fsdb(obd, fsname);
-        if (fsdb) 
-                mgs_free_fsdb(obd, fsdb);
-
-        list_for_each_entry_safe(dirent, n, &dentry_list, lld_list) {
-                list_del(&dirent->lld_list);
-                if (strncmp(fsname, dirent->lld_name, len) == 0) {
-                        CDEBUG(D_MGS, "Removing log %s\n", dirent->lld_name);
-                        mgs_erase_log(obd, dirent->lld_name);
-                }
-                OBD_FREE(dirent, sizeof(*dirent));
-        }
-        
-        up(&mgs->mgs_sem);
-
-        RETURN(rc);
-}
-
-/* from llog_swab */
-static void print_lustre_cfg(struct lustre_cfg *lcfg)
-{
-        int i;
-        ENTRY;
-
-        CDEBUG(D_MGS, "lustre_cfg: %p\n", lcfg);
-        CDEBUG(D_MGS, "\tlcfg->lcfg_version: %#x\n", lcfg->lcfg_version);
-
-        CDEBUG(D_MGS, "\tlcfg->lcfg_command: %#x\n", lcfg->lcfg_command);
-        CDEBUG(D_MGS, "\tlcfg->lcfg_num: %#x\n", lcfg->lcfg_num);
-        CDEBUG(D_MGS, "\tlcfg->lcfg_flags: %#x\n", lcfg->lcfg_flags);
-        CDEBUG(D_MGS, "\tlcfg->lcfg_nid: %s\n", libcfs_nid2str(lcfg->lcfg_nid));
-
-        CDEBUG(D_MGS, "\tlcfg->lcfg_bufcount: %d\n", lcfg->lcfg_bufcount);
-        if (lcfg->lcfg_bufcount < LUSTRE_CFG_MAX_BUFCOUNT)
-                for (i = 0; i < lcfg->lcfg_bufcount; i++) {
-                        CDEBUG(D_MGS, "\tlcfg->lcfg_buflens[%d]: %d %s\n",
-                               i, lcfg->lcfg_buflens[i], 
-                               lustre_cfg_string(lcfg, i));
-                }
-        EXIT;
-}
-
-/* Set a permanent (config log) param for a target or fs */
-int mgs_setparam(struct obd_device *obd, struct lustre_cfg *lcfg, char *fsname)
-{
-        struct fs_db *fsdb;
-        struct mgs_target_info *mti;
-        char *devname, *param;
-        char *ptr, *tmp;
-        __u32 index;
-        int rc = 0;
-        ENTRY;
-
-        print_lustre_cfg(lcfg);
-        
-        /* lustre, lustre-mdtlov, lustre-client, lustre-MDT0000 */
-        devname = lustre_cfg_string(lcfg, 0);
-        param = lustre_cfg_string(lcfg, 1);
-        if (!devname) {
-                /* Assume device name embedded in param:
-                   lustre-OST0000.osc.max_dirty_mb=32 */
-                ptr = strchr(param, '.');
-                if (ptr) {
-                        devname = param;
-                        *ptr = 0;
-                        param = ptr + 1;
-                }
-        }
-        if (!devname) {
-                LCONSOLE_ERROR_MSG(0x14d, "No target specified: %s\n", param);
-                RETURN(-ENOSYS);
-        }
-
-        /* Extract fsname */
-        ptr = strrchr(devname, '-');
-        memset(fsname, 0, MTI_NAME_MAXLEN);
-        if (ptr && (server_name2index(ptr, &index, NULL) >= 0)) {
-                strncpy(fsname, devname, ptr - devname);
-        } else {
-                /* assume devname is the fsname */
-                strncpy(fsname, devname, MTI_NAME_MAXLEN);
-        }
-        fsname[MTI_NAME_MAXLEN - 1] = 0;
-        CDEBUG(D_MGS, "setparam on fs %s device %s\n", fsname, devname);
-
-        rc = mgs_find_or_make_fsdb(obd, fsname, &fsdb); 
-        if (rc) 
-                RETURN(rc);
-        if (fsdb->fsdb_flags & FSDB_LOG_EMPTY) {
-                CERROR("No filesystem targets for %s.  cfg_device from lctl "
-                       "is '%s'\n", fsname, devname);
-                mgs_free_fsdb(obd, fsdb);
-                RETURN(-EINVAL);
-        }
-
-        /* Create a fake mti to hold everything */
-        OBD_ALLOC_PTR(mti);
-        if (!mti) 
-                GOTO(out, rc = -ENOMEM);
-        strncpy(mti->mti_fsname, fsname, MTI_NAME_MAXLEN);
-        strncpy(mti->mti_svname, devname, MTI_NAME_MAXLEN);
-        strncpy(mti->mti_params, param, sizeof(mti->mti_params));
-        rc = server_name2index(mti->mti_svname, &mti->mti_stripe_index, &tmp);
-        if (rc < 0) 
-                /* Not a valid server; may be only fsname */
-                rc = 0;
-        else
-                /* Strip -osc or -mdc suffix from svname */
-                if (server_make_name(rc, mti->mti_stripe_index, mti->mti_fsname, 
-                                     mti->mti_svname)) 
-                        GOTO(out, rc = -EINVAL);
-
-        mti->mti_flags = rc | LDD_F_PARAM;
-
-        down(&fsdb->fsdb_sem);
-        rc = mgs_write_log_params(obd, fsdb, mti); 
-        up(&fsdb->fsdb_sem);
-
-out:
-        OBD_FREE_PTR(mti);
-        RETURN(rc);
-}
-
-
-#if 0
-/******************** unused *********************/
-static int mgs_backup_llog(struct obd_device *obd, char* fsname)
-{
-        struct file *filp, *bak_filp;
-        struct lvfs_run_ctxt saved;
-        char *logname, *buf;
-        loff_t soff = 0 , doff = 0;
-        int count = 4096, len;
-        int rc = 0;
-
-        OBD_ALLOC(logname, PATH_MAX);
-        if (logname == NULL)
-                return -ENOMEM;
-
-        OBD_ALLOC(buf, count);
-        if (!buf)
-                GOTO(out , rc = -ENOMEM);
-
-        len = snprintf(logname, PATH_MAX, "%s/%s.bak",
-                       MOUNT_CONFIGS_DIR, fsname);
-
-        if (len >= PATH_MAX - 1) {
-                GOTO(out, -ENAMETOOLONG);
-        } 
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                
-        bak_filp = l_filp_open(logname, O_RDWR|O_CREAT|O_TRUNC, 0660);
-        if (IS_ERR(bak_filp)) {
-                rc = PTR_ERR(bak_filp);
-                CERROR("backup logfile open %s: %d\n", logname, rc);
-                GOTO(pop, rc);
-        }
-        sprintf(logname, "%s/%s", MOUNT_CONFIGS_DIR, fsname);
-        filp = l_filp_open(logname, O_RDONLY, 0);
-        if (IS_ERR(filp)) {
-                rc = PTR_ERR(filp);
-                CERROR("logfile open %s: %d\n", logname, rc);
-                GOTO(close1f, rc);
-        }
-
-        while ((rc = lustre_fread(filp, buf, count, &soff)) > 0) {
-                rc = lustre_fwrite(bak_filp, buf, count, &doff);
-                break;
-        }
-
-        filp_close(filp, 0);
-close1f:
-        filp_close(bak_filp, 0);
-pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-out:
-        if (buf)
-                OBD_FREE(buf, count);
-        OBD_FREE(logname, PATH_MAX);
-        return rc;
-}
-
-
-
-#endif
diff --git a/lustre/nodist b/lustre/nodist
deleted file mode 100644
index 24f55bb96b97dc62f3cd1556f669ca14d600809b..0000000000000000000000000000000000000000
--- a/lustre/nodist
+++ /dev/null
@@ -1,9 +0,0 @@
-obd-*/obd-*
-CVS
-*~
-make.rules
-config.*
-*.o
-*.orig
-*.backup
-.depfiles
diff --git a/lustre/obdclass/.cvsignore b/lustre/obdclass/.cvsignore
deleted file mode 100644
index 829b50de9ed9187d24ea1f7a84058202c6f4d822..0000000000000000000000000000000000000000
--- a/lustre/obdclass/.cvsignore
+++ /dev/null
@@ -1,17 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.*.d
-.*.ver
-.tmp_versions
-.depend
diff --git a/lustre/obdclass/Info.plist b/lustre/obdclass/Info.plist
deleted file mode 100644
index 0b7e71876af6c602a8ef5eaf97b62470f24f5834..0000000000000000000000000000000000000000
--- a/lustre/obdclass/Info.plist
+++ /dev/null
@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>obdclass</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.clusterfs.lustre.obdclass</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>KEXT</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.1</string>
-        <key>OSBundleCompatibleVersion</key>
-        <string>1.0.0</string>
-	<key>OSBundleLibraries</key>
-	<dict>
-		<key>com.apple.kpi.bsd</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.libkern</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.mach</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.unsupported</key>
-		<string>8.0.0b1</string>
-                <key>com.clusterfs.lustre.libcfs</key>
-                <string>1.0.0</string>
-                <key>com.clusterfs.lustre.lvfs</key>
-                <string>1.0.0</string>
-	</dict>
-</dict>
-</plist>
diff --git a/lustre/obdclass/Makefile.in b/lustre/obdclass/Makefile.in
deleted file mode 100644
index d81ee84bd84218d80888b448babe4cd7645c1ea6..0000000000000000000000000000000000000000
--- a/lustre/obdclass/Makefile.in
+++ /dev/null
@@ -1,37 +0,0 @@
-MODULES := obdclass llog_test
-
-obdclass-linux-objs := linux-module.o linux-obdo.o linux-sysctl.o
-ifeq ($(PATCHLEVEL),6)
-obdclass-linux-objs := $(addprefix linux/,$(obdclass-linux-objs))
-endif
-
-default: all
-
-ifeq (@linux25@,no)
-sources:
-	@for i in $(obdclass-linux-objs:%.o=%.c) ; do \
-		echo "ln -s @srcdir@/linux/$$i ." ; \
-		ln -sf @srcdir@/linux/$$i . || exit 1 ; \
-	done
-
-else
-sources:
-
-endif
-
-obdclass-all-objs := llog.o llog_cat.o llog_lvfs.o llog_obd.o llog_swab.o
-obdclass-all-objs += class_obd.o class_hash.o
-obdclass-all-objs += debug.o genops.o uuid.o llog_ioctl.o
-obdclass-all-objs += lprocfs_status.o lustre_handles.o lustre_peer.o
-obdclass-all-objs += statfs_pack.o obdo.o obd_config.o obd_mount.o
-
-obdclass-objs := $(obdclass-linux-objs) $(obdclass-all-objs)
-
-ifeq ($(PATCHLEVEL),6)
-llog_test-objs := llog-test.o
-
-$(obj)/llog-test.c: $(obj)/llog_test.c
-	ln -sf $< $@
-endif
-
-@INCLUDE_RULES@
diff --git a/lustre/obdclass/autoMakefile.am b/lustre/obdclass/autoMakefile.am
deleted file mode 100644
index 40d964ce23a36a1d7bb29298621156313e3d6bb1..0000000000000000000000000000000000000000
--- a/lustre/obdclass/autoMakefile.am
+++ /dev/null
@@ -1,54 +0,0 @@
-SUBDIRS := linux
-if DARWIN
-SUBDIRS += darwin
-endif
-DIST_SUBDIRS := $(SUBDIRS)
-
-if LIBLUSTRE
-
-noinst_LIBRARIES = liblustreclass.a
-liblustreclass_a_SOURCES = class_obd.c debug.c genops.c statfs_pack.c uuid.c 
-liblustreclass_a_SOURCES += lustre_handles.c lustre_peer.c lprocfs_status.c class_hash.c
-liblustreclass_a_SOURCES += obdo.c obd_config.c llog.c llog_obd.c llog_cat.c 
-liblustreclass_a_SOURCES += llog_lvfs.c llog_swab.c 
-liblustreclass_a_SOURCES += #llog_ioctl.c rbtree.c
-liblustreclass_a_CPPFLAGS = $(LLCPPFLAGS)
-liblustreclass_a_CFLAGS = $(LLCFLAGS)
-
-endif
-
-
-if MODULES
-
-if LINUX
-modulefs_DATA = obdclass$(KMODEXT)
-noinst_DATA = llog_test$(KMODEXT)
-endif # LINUX
-
-if DARWIN
-macos_PROGRAMS := obdclass
-
-obdclass_SOURCES := \
-        darwin/darwin-module.c darwin/darwin-sysctl.c 		\
-        class_obd.c genops.c lprocfs_status.c           	\
-        lustre_handles.c lustre_peer.c obd_config.c     	\
-        obdo.c debug.c llog_ioctl.c uuid.c                      \
-        llog_swab.c llog_obd.c llog.c llog_cat.c llog_lvfs.c
-
-obdclass_CFLAGS := $(EXTRA_KCFLAGS)
-obdclass_LDFLAGS := $(EXTRA_KLDFLAGS)
-obdclass_LDADD := $(EXTRA_KLIBS)
-
-plist_DATA := Info.plist
-
-install_data_hook := fix-kext-ownership
-
-endif # DARWIN
-
-endif # MODULES
-
-install-data-hook: $(install_data_hook)
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@  llog-test.c
-MOSTLYCLEANFILES += linux/*.o darwin/*.o
-DIST_SOURCES = $(filter-out llog-test.c,$(obdclass-all-objs:.o=.c)) $(llog-test-objs:.o=.c) llog_test.c llog_internal.h
diff --git a/lustre/obdclass/class_hash.c b/lustre/obdclass/class_hash.c
deleted file mode 100644
index c5785642517089791f5ba2d51088572c864c415e..0000000000000000000000000000000000000000
--- a/lustre/obdclass/class_hash.c
+++ /dev/null
@@ -1,756 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2005 Cluster File Systems, Inc.
- *   Author: YuZhangyong <yzy@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org/
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- *   Implement a hash class for hash process in lustre system.
- */
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#include <obd.h>
-#endif
-
-#include <obd_class.h>
-#include <class_hash.h>
-#include <lustre_export.h>
-#include <obd_support.h>
-#include <lustre_net.h>
-#include <lustre_quota.h>
-
-int lustre_hash_init(struct lustre_class_hash_body **hash_body_new,
-                     char *hashname, __u32 hashsize,
-                     struct lustre_hash_operations *hash_operations)
-{
-        int i, n = 0;
-        struct lustre_class_hash_body *hash_body = NULL;
-
-        LASSERT(hashsize > 0);
-        LASSERT(hash_operations != NULL);
-        ENTRY;
-
-        i = hashsize;
-        while (i != 0) {
-                if (i & 0x1)
-                        n++;
-                i >>= 1;
-        }
-
-        LASSERTF(n == 1, "hashsize %u isn't 2^n\n", hashsize);
-
-        /* alloc space for hash_body */
-        OBD_ALLOC(hash_body, sizeof(*hash_body));
-
-        if (hash_body == NULL) {
-                CERROR("Cannot alloc space for hash body, hashname = %s \n",
-                        hashname);
-                RETURN(-ENOMEM);
-        }
-
-        LASSERT(hashname != NULL &&
-                strlen(hashname) <= sizeof(hash_body->hashname));
-        strcpy(hash_body->hashname, hashname);
-        hash_body->lchb_hash_max_size = hashsize;
-        hash_body->lchb_hash_operations = hash_operations;
-
-        /* alloc space for the hash tables */
-        OBD_ALLOC(hash_body->lchb_hash_tables,
-                  sizeof(*hash_body->lchb_hash_tables) * hash_body->lchb_hash_max_size);
-
-        if (hash_body->lchb_hash_tables == NULL) {
-                OBD_FREE(hash_body, sizeof(*hash_body));
-                CERROR("Cannot alloc space for hashtables, hashname = %s \n",
-                        hash_body->hashname);
-                RETURN(-ENOMEM);
-        }
-
-        spin_lock_init(&hash_body->lchb_lock); /* initialize the body lock */
-
-        for(i = 0 ; i < hash_body->lchb_hash_max_size; i++) {
-                /* initial the bucket lock and list_head */
-                INIT_HLIST_HEAD(&hash_body->lchb_hash_tables[i].lhb_head);
-                spin_lock_init(&hash_body->lchb_hash_tables[i].lhb_lock);
-        }
-        *hash_body_new = hash_body;
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(lustre_hash_init);
-
-void lustre_hash_exit(struct lustre_class_hash_body **new_hash_body)
-{
-        int i;
-        struct lustre_class_hash_body *hash_body = NULL;
-        ENTRY;
-
-        hash_body = *new_hash_body;
-
-        if (hash_body == NULL) {
-                CWARN("hash body has been deleted\n");
-                goto out_hash;
-        }
-
-        spin_lock(&hash_body->lchb_lock); /* lock the hash tables */
-
-        if (hash_body->lchb_hash_tables == NULL ) {
-                spin_unlock(&hash_body->lchb_lock);
-                CWARN("hash tables has been deleted\n");
-                goto out_hash;
-        }
-
-        for( i = 0; i < hash_body->lchb_hash_max_size; i++ ) {
-                struct lustre_hash_bucket * bucket;
-                struct hlist_node * actual_hnode, *pos;
-
-                bucket = &hash_body->lchb_hash_tables[i];
-                spin_lock(&bucket->lhb_lock); /* lock the bucket */
-                hlist_for_each_safe(actual_hnode, pos, &(bucket->lhb_head)) {
-                        lustre_hash_delitem_nolock(hash_body, i, actual_hnode);
-                }
-                spin_unlock(&bucket->lhb_lock);
-        }
-
-        /* free the hash_tables's memory space */
-        OBD_FREE(hash_body->lchb_hash_tables,
-                 sizeof(*hash_body->lchb_hash_tables) *
-                 hash_body->lchb_hash_max_size);
-
-        hash_body->lchb_hash_tables = NULL;
-
-        spin_unlock(&hash_body->lchb_lock);
-
-out_hash : 
-        /* free the hash_body's memory space */
-        if (hash_body != NULL) {
-                OBD_FREE(hash_body, sizeof(*hash_body));
-                *new_hash_body = NULL;
-        }
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_exit);
-
-/*
- * only allow unique @key in hashtables, if the same @key has existed 
- * in hashtables, it will return with fails.
- */
-int lustre_hash_additem_unique(struct lustre_class_hash_body *hash_body, 
-                               void *key, struct hlist_node *actual_hnode)
-{
-        int hashent;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        ENTRY;
-
-        LASSERT(hlist_unhashed(actual_hnode));
-        hashent = hop->lustre_hashfn(hash_body, key);
-
-        /* get the hash-bucket and lock it */
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        spin_lock(&bucket->lhb_lock);
-
-        if ( (lustre_hash_getitem_in_bucket_nolock(hash_body, hashent, key)) != NULL) {
-                /* the added-item exist in hashtables, so cannot add it again */
-                spin_unlock(&bucket->lhb_lock);
-
-                CWARN("Already found the key in hash [%s]\n", 
-                      hash_body->hashname);
-                RETURN(-EALREADY);
-        }
-
-        hlist_add_head(actual_hnode, &(bucket->lhb_head));
-
-#ifdef LUSTRE_HASH_DEBUG
-        /* hash distribute debug */
-        hash_body->lchb_hash_tables[hashent].lhb_item_count++; 
-        CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", 
-                        hash_body->hashname, hashent, 
-                        hash_body->lchb_hash_tables[hashent].lhb_item_count);
-#endif  
-        hop->lustre_hash_object_refcount_get(actual_hnode); 
-
-        spin_unlock(&bucket->lhb_lock);
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(lustre_hash_additem_unique);
-
-/*
- * only allow unique @key in hashtables, if the same @key has existed 
- * in hashtables, it will return with fails.
- */
-void* lustre_hash_findadd_unique(struct lustre_class_hash_body *hash_body, 
-                                     void *key, struct hlist_node *actual_hnode)
-{
-        int hashent;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        struct hlist_node * hash_item_hnode = NULL;
-        void *obj;
-        ENTRY;
-
-        LASSERT(hlist_unhashed(actual_hnode));
-        hashent = hop->lustre_hashfn(hash_body, key);
-
-        /* get the hash-bucket and lock it */
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        spin_lock(&bucket->lhb_lock);
-
-        hash_item_hnode = lustre_hash_getitem_in_bucket_nolock(hash_body,
-                                                               hashent, key);
-        if ( hash_item_hnode != NULL) {
-                /* the added-item exist in hashtables, so cannot add it again */
-                obj = hop->lustre_hash_object_refcount_get(hash_item_hnode);
-                spin_unlock(&bucket->lhb_lock);
-                RETURN(obj);
-        }
-
-        hlist_add_head(actual_hnode, &(bucket->lhb_head));
-
-#ifdef LUSTRE_HASH_DEBUG
-        /* hash distribute debug */
-        hash_body->lchb_hash_tables[hashent].lhb_item_count++; 
-        CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", 
-                        hash_body->hashname, hashent, 
-                        hash_body->lchb_hash_tables[hashent].lhb_item_count);
-#endif
-        obj = hop->lustre_hash_object_refcount_get(actual_hnode);
-
-        spin_unlock(&bucket->lhb_lock);
-
-        RETURN(obj);
-}
-EXPORT_SYMBOL(lustre_hash_findadd_unique);
-
-/*
- * this version of additem, it allow multi same @key <key, value> in hashtables. 
- * in this additem version, we don't need to check if exist same @key in hash 
- * tables, we only add it to related hashbucket.
- * example: maybe same nid will be related to multi difference export
- */
-int lustre_hash_additem(struct lustre_class_hash_body *hash_body, void *key, 
-                         struct hlist_node *actual_hnode)
-{
-        int hashent;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        ENTRY;
-
-        LASSERT(hlist_unhashed(actual_hnode));
-
-        hashent = hop->lustre_hashfn(hash_body, key);
-
-        /* get the hashbucket and lock it */
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        spin_lock(&bucket->lhb_lock);
-
-        hlist_add_head(actual_hnode, &(bucket->lhb_head));
-
-#ifdef LUSTRE_HASH_DEBUG
-        /* hash distribute debug */
-        hash_body->lchb_hash_tables[hashent].lhb_item_count++; 
-        CDEBUG(D_INFO, "hashname[%s] bucket[%d] has [%d] hashitem\n", 
-                        hash_body->hashname, hashent, 
-                        hash_body->lchb_hash_tables[hashent].lhb_item_count);
-#endif  
-        hop->lustre_hash_object_refcount_get(actual_hnode); 
-
-        spin_unlock(&bucket->lhb_lock);
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(lustre_hash_additem);
-
-
-/*
- * this version of delitem will delete a hashitem with given @key, 
- * we need to search the <@key, @value> in hashbucket with @key, 
- * if match, the hashitem will be delete. 
- * we have a no-search version of delitem, it will directly delete a hashitem, 
- * doesn't need to search it in hashtables, so it is a O(1) delete.
- */
-int lustre_hash_delitem_by_key(struct lustre_class_hash_body *hash_body, 
-                               void *key)
-{
-        int hashent ;
-        struct hlist_node * hash_item;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        int retval = 0;
-        ENTRY;
-
-        hashent = hop->lustre_hashfn(hash_body, key);
-
-        /* first, lock the hashbucket */
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        spin_lock(&bucket->lhb_lock);
-
-        /* get the hash_item from hash_bucket */
-        hash_item = lustre_hash_getitem_in_bucket_nolock(hash_body, hashent, 
-                                                         key);
-
-        if (hash_item == NULL) {
-                spin_unlock(&bucket->lhb_lock);
-                RETURN(-ENOENT);
-        }
-
-        /* call delitem_nolock() to delete the hash_item */
-        retval = lustre_hash_delitem_nolock(hash_body, hashent, hash_item);
-
-        spin_unlock(&bucket->lhb_lock);
-
-        RETURN(retval);
-}
-EXPORT_SYMBOL(lustre_hash_delitem_by_key);
-
-/*
- * the O(1) version of delete hash item, 
- * it will directly delete the hashitem with given @hash_item,
- * the parameter @key used to get the relation hash bucket and lock it.
- */
-int lustre_hash_delitem(struct lustre_class_hash_body *hash_body, 
-                        void *key, struct hlist_node * hash_item)
-{  
-        int hashent = 0;
-        int retval = 0;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        ENTRY;
-
-        hashent = hop->lustre_hashfn(hash_body, key);
-
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        spin_lock(&bucket->lhb_lock);
-
-        /* call delitem_nolock() to delete the hash_item */
-        retval = lustre_hash_delitem_nolock(hash_body, hashent, hash_item);
-
-        spin_unlock(&bucket->lhb_lock);
-
-        RETURN(retval);
-}
-EXPORT_SYMBOL(lustre_hash_delitem);
-
-void lustre_hash_bucket_iterate(struct lustre_class_hash_body *hash_body,
-                                void *key, hash_item_iterate_cb func, void *data)
-{
-        int hashent, find = 0;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct hlist_node *hash_item_node = NULL;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        struct obd_export *tmp = NULL;
-
-        ENTRY;
-
-        hashent = hop->lustre_hashfn(hash_body, key);
-        bucket = &hash_body->lchb_hash_tables[hashent];
-
-        spin_lock(&bucket->lhb_lock);
-        hlist_for_each(hash_item_node, &(bucket->lhb_head)) {
-                find = hop->lustre_hash_key_compare(key, hash_item_node);
-                if (find) {
-                        tmp = hop->lustre_hash_object_refcount_get(hash_item_node);
-                        func(tmp, data);
-                        hop->lustre_hash_object_refcount_put(hash_item_node);
-                }
-        }
-        spin_unlock(&bucket->lhb_lock);
-}
-EXPORT_SYMBOL(lustre_hash_bucket_iterate);
-
-void lustre_hash_iterate_all(struct lustre_class_hash_body *hash_body,
-                            hash_item_iterate_cb func, void *data)
-{
-        int i;
-        struct lustre_hash_operations *hop = hash_body->lchb_hash_operations;
-        ENTRY;
-
-        for( i = 0; i < hash_body->lchb_hash_max_size; i++ ) {
-                struct lustre_hash_bucket * bucket;
-                struct hlist_node * actual_hnode, *pos;
-                void *obj;
-
-                bucket = &hash_body->lchb_hash_tables[i];
-#ifdef LUSTRE_HASH_DEBUG
-                CDEBUG(D_INFO, "idx %d - bucket %p\n", i, bucket);
-#endif
-                spin_lock(&bucket->lhb_lock); /* lock the bucket */
-                hlist_for_each_safe(actual_hnode, pos, &(bucket->lhb_head)) {
-                        obj = hop->lustre_hash_object_refcount_get(actual_hnode);
-                        func(obj, data);
-                        hop->lustre_hash_object_refcount_put(actual_hnode);
-                }
-                spin_unlock(&bucket->lhb_lock);
-        }
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_hash_iterate_all);
-
-
-void * lustre_hash_get_object_by_key(struct lustre_class_hash_body *hash_body,
-                                     void *key)
-{
-        int hashent ;
-        struct hlist_node * hash_item_hnode = NULL;
-        void * obj_value = NULL;
-        struct lustre_hash_bucket *bucket = NULL;
-        struct lustre_hash_operations * hop = hash_body->lchb_hash_operations;
-        ENTRY;
-
-        /* get the hash value from the given item */
-        hashent = hop->lustre_hashfn(hash_body, key);
-
-        bucket = &hash_body->lchb_hash_tables[hashent];
-        spin_lock(&bucket->lhb_lock); /* lock the bucket */
-
-        hash_item_hnode = lustre_hash_getitem_in_bucket_nolock(hash_body, 
-                                                               hashent, key);
-
-        if (hash_item_hnode == NULL) {
-                spin_unlock(&bucket->lhb_lock); /* lock the bucket */
-                RETURN(NULL);
-        }
-
-        obj_value = hop->lustre_hash_object_refcount_get(hash_item_hnode);
-        spin_unlock(&bucket->lhb_lock); /* lock the bucket */
-
-        RETURN(obj_value);
-}
-EXPORT_SYMBOL(lustre_hash_get_object_by_key);
-
-/* string hashing using djb2 hash algorithm */
-__u32 djb2_hashfn(struct lustre_class_hash_body *hash_body,  void* key, 
-                  size_t size)
-{
-        __u32 hash = 5381;
-        int i;
-        char *ptr = key;
-
-        LASSERT(key != NULL);
-
-        for (i=0; i<size; i++) 
-                hash = hash * 33 + ptr[i];
-
-        hash &= (hash_body->lchb_hash_max_size - 1);
-
-        RETURN(hash);
-}
-
-/*
- * define (uuid <-> export) hash operations and function define
- */
-
-/* define the uuid hash operations */
-struct lustre_hash_operations uuid_hash_operations = {
-        .lustre_hashfn = uuid_hashfn,
-        .lustre_hash_key_compare = uuid_hash_key_compare,
-        .lustre_hash_object_refcount_get = uuid_export_refcount_get,
-        .lustre_hash_object_refcount_put = uuid_export_refcount_put,
-};
-
-__u32 uuid_hashfn(struct lustre_class_hash_body *hash_body,  void * key)
-{
-        struct obd_uuid * uuid_key = key;
-
-        return djb2_hashfn(hash_body, uuid_key->uuid, sizeof(uuid_key->uuid));
-}
-
-/* Note, it is impossible to find an export that is in failed state with
- * this function */
-int uuid_hash_key_compare(void *key, struct hlist_node *compared_hnode)
-{
-        struct obd_export *export = NULL;
-        struct obd_uuid *uuid_key = NULL, *compared_uuid = NULL;
-
-        LASSERT( key != NULL);
-
-        uuid_key = (struct obd_uuid*)key;
-
-        export = hlist_entry(compared_hnode, struct obd_export, exp_uuid_hash);
-
-        compared_uuid = &export->exp_client_uuid;
-
-        RETURN(obd_uuid_equals(uuid_key, compared_uuid) &&
-               !export->exp_failed);
-}
-
-void * uuid_export_refcount_get(struct hlist_node * actual_hnode)
-{
-        struct obd_export *export = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        export = hlist_entry(actual_hnode, struct obd_export, exp_uuid_hash);
-
-        LASSERT(export != NULL);
-
-        class_export_get(export);
-
-        RETURN(export);
-}
-
-void uuid_export_refcount_put(struct hlist_node * actual_hnode)
-{
-        struct obd_export *export = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        export = hlist_entry(actual_hnode, struct obd_export, exp_uuid_hash);
-
-        LASSERT(export != NULL);
-
-        class_export_put(export);
-}
-
-/*
- * define (nid <-> export) hash operations and function define
- */
-
-/* define the nid hash operations */
-struct lustre_hash_operations nid_hash_operations = {
-        .lustre_hashfn = nid_hashfn,
-        .lustre_hash_key_compare = nid_hash_key_compare,
-        .lustre_hash_object_refcount_get = nid_export_refcount_get,
-        .lustre_hash_object_refcount_put = nid_export_refcount_put,
-};
-
-__u32 nid_hashfn(struct lustre_class_hash_body *hash_body,  void * key)
-{
-        return djb2_hashfn(hash_body, key, sizeof(lnet_nid_t));
-}
-
-/* Note, it is impossible to find an export that is in failed state with
- * this function */
-int nid_hash_key_compare(void *key, struct hlist_node *compared_hnode)
-{
-        struct obd_export *export = NULL;
-        lnet_nid_t *nid_key = NULL;
-
-        LASSERT( key != NULL);
-
-        nid_key = (lnet_nid_t*)key;
-
-        export = hlist_entry(compared_hnode, struct obd_export, exp_nid_hash);
-
-        return (export->exp_connection->c_peer.nid == *nid_key &&
-                !export->exp_failed);
-}
-
-void *nid_export_refcount_get(struct hlist_node *actual_hnode)
-{
-        struct obd_export *export = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        export = hlist_entry(actual_hnode, struct obd_export, exp_nid_hash);
-
-        LASSERT(export != NULL);
-
-        class_export_get(export);
-
-        RETURN(export);
-}
-
-void nid_export_refcount_put(struct hlist_node *actual_hnode)
-{
-        struct obd_export *export = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        export = hlist_entry(actual_hnode, struct obd_export, exp_nid_hash);
-
-        LASSERT(export != NULL);
-
-        class_export_put(export);
-}
-
-/*
- * define (net_peer <-> connection) hash operations and function define
- */
-
-/* define the conn hash operations */
-struct lustre_hash_operations conn_hash_operations = {
-        .lustre_hashfn = conn_hashfn,
-        .lustre_hash_key_compare = conn_hash_key_compare,
-        .lustre_hash_object_refcount_get = conn_refcount_get,
-        .lustre_hash_object_refcount_put = conn_refcount_put,
-};
-EXPORT_SYMBOL(conn_hash_operations);
-
-__u32 conn_hashfn(struct lustre_class_hash_body *hash_body,  void * key)
-{
-        return djb2_hashfn(hash_body, key, sizeof(lnet_process_id_t));
-}
-
-int conn_hash_key_compare(void *key, struct hlist_node *compared_hnode)
-{
-        struct ptlrpc_connection *c = NULL;
-        lnet_process_id_t *conn_key = NULL;
-
-        LASSERT( key != NULL);
-
-        conn_key = (lnet_process_id_t*)key;
-
-        c = hlist_entry(compared_hnode, struct ptlrpc_connection, c_hash);
-
-        return (conn_key->nid == c->c_peer.nid &&
-                conn_key->pid == c->c_peer.pid);
-}
-
-void *conn_refcount_get(struct hlist_node *actual_hnode)
-{
-        struct ptlrpc_connection *c = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        c = hlist_entry(actual_hnode, struct ptlrpc_connection, c_hash);
-
-        LASSERT(c != NULL);
-
-        atomic_inc(&c->c_refcount);
-
-        RETURN(c);
-}
-
-void conn_refcount_put(struct hlist_node *actual_hnode)
-{
-        struct ptlrpc_connection *c = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        c = hlist_entry(actual_hnode, struct ptlrpc_connection, c_hash);
-
-        LASSERT(c != NULL);
-
-        atomic_dec(&c->c_refcount);
-}
-
-/*******************************************************************************/
-/* ( nid<>nidstats ) hash operations define */
-
-struct lustre_hash_operations nid_stat_hash_operations = {
-        .lustre_hashfn = nid_hashfn,
-        .lustre_hash_key_compare = nidstats_hash_key_compare,
-        .lustre_hash_object_refcount_get = nidstats_refcount_get,
-        .lustre_hash_object_refcount_put = nidstats_refcount_put,
-};
-EXPORT_SYMBOL(nid_stat_hash_operations);
-
-int nidstats_hash_key_compare(void *key, struct hlist_node * compared_hnode)
-{
-        struct nid_stat *data;
-        lnet_nid_t *nid_key;
-
-        LASSERT( key != NULL);
-
-        nid_key = (lnet_nid_t*)key;
-        data = hlist_entry(compared_hnode, struct nid_stat, nid_hash);
-
-        return (data->nid == *nid_key);
-}
-
-void* nidstats_refcount_get(struct hlist_node * actual_hnode)
-{
-        struct nid_stat *data;
-
-        data = hlist_entry(actual_hnode, struct nid_stat, nid_hash);
-        data->nid_exp_ref_count++;
-
-        RETURN(data);
-}
-
-void nidstats_refcount_put(struct hlist_node * actual_hnode)
-{
-        struct nid_stat *data;
-
-        data = hlist_entry(actual_hnode, struct nid_stat, nid_hash);
-        data->nid_exp_ref_count--;
-
-}
-
-/*******************************************************************************/
-
-#ifdef __KERNEL__
-/*
- * define ( lqs <-> qctxt ) hash operations and function define
- */
-
-/* define the conn hash operations */
-struct lustre_hash_operations lqs_hash_operations = {
-        .lustre_hashfn = lqs_hashfn,
-        .lustre_hash_key_compare = lqs_hash_key_compare,
-        .lustre_hash_object_refcount_get = lqs_refcount_get,
-        .lustre_hash_object_refcount_put = lqs_refcount_put,
-};
-EXPORT_SYMBOL(lqs_hash_operations);
-
-/* string hashing using djb2 hash algorithm */
-__u32 lqs_hashfn(struct lustre_class_hash_body *hash_body,  void * key)
-{
-        struct quota_adjust_qunit *lqs_key = NULL;
-        __u32 hash;
-
-        LASSERT(key != NULL);
-
-        lqs_key = (struct quota_adjust_qunit *)key;
-
-        hash = QAQ_IS_GRP(lqs_key) ? 5381 : 5387;
-        hash *= lqs_key->qaq_id;
-
-        hash &= (hash_body->lchb_hash_max_size - 1);
-
-        RETURN(hash);
-}
-
-int lqs_hash_key_compare(void *key, struct hlist_node *compared_hnode)
-{
-        struct quota_adjust_qunit *lqs_key = NULL;
-        struct lustre_qunit_size *q = NULL;
-        int retval = 0;
-
-        LASSERT( key != NULL);
-
-        lqs_key = (struct quota_adjust_qunit *)key;
-
-        q = hlist_entry(compared_hnode, struct lustre_qunit_size, lqs_hash);
-
-        spin_lock(&q->lqs_lock);
-        if (lqs_key->qaq_id == q->lqs_id && QAQ_IS_GRP(lqs_key) == LQS_IS_GRP(q))
-                 retval = 1;
-        spin_unlock(&q->lqs_lock);
-
-        return retval;
-}
-
-void * lqs_refcount_get(struct hlist_node * actual_hnode)
-{
-        struct lustre_qunit_size *q = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        q = hlist_entry(actual_hnode, struct lustre_qunit_size, lqs_hash);
-
-        LASSERT(q != NULL);
-
-        lqs_getref(q);
-
-        RETURN(q);
-}
-
-void lqs_refcount_put(struct hlist_node * actual_hnode)
-{
-        struct lustre_qunit_size *q = NULL;
-
-        LASSERT(actual_hnode != NULL);
-
-        q = hlist_entry(actual_hnode, struct lustre_qunit_size, lqs_hash);
-
-        LASSERT(q != NULL);
-
-        lqs_putref(q);
-}
-#endif
diff --git a/lustre/obdclass/class_obd.c b/lustre/obdclass/class_obd.c
deleted file mode 100644
index 0ada5c989da2246bbe479588e1833720461e10ba..0000000000000000000000000000000000000000
--- a/lustre/obdclass/class_obd.c
+++ /dev/null
@@ -1,635 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Object Devices Class Driver
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * These are the only exported functions, they provide some generic
- * infrastructure for managing object devices
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_debug.h>
-#include <lprocfs_status.h>
-#include <lustre/lustre_build_version.h>
-#include <libcfs/list.h>
-#include "llog_internal.h"
-
-#ifndef __KERNEL__
-/* liblustre workaround */
-atomic_t libcfs_kmemory = {0};
-#endif
-
-struct obd_device *obd_devs[MAX_OBD_DEVICES];
-struct list_head obd_types;
-spinlock_t obd_dev_lock = SPIN_LOCK_UNLOCKED;
-
-/* The following are visible and mutable through /proc/sys/lustre/. */
-unsigned int obd_debug_peer_on_timeout;
-unsigned int obd_dump_on_timeout;
-unsigned int obd_dump_on_eviction;
-unsigned int obd_timeout = OBD_TIMEOUT_DEFAULT;   /* seconds */
-unsigned int ldlm_timeout = LDLM_TIMEOUT_DEFAULT; /* seconds */
-unsigned int obd_max_dirty_pages = 256;
-atomic_t obd_dirty_pages;
-
-cfs_waitq_t obd_race_waitq;
-int obd_race_state;
-
-#ifdef __KERNEL__
-unsigned int obd_print_fail_loc(void)
-{
-        CWARN("obd_fail_loc = %x\n", obd_fail_loc);
-        return obd_fail_loc;
-}
-
-void obd_set_fail_loc(unsigned int fl)
-{
-        obd_fail_loc = fl;
-}
-
-/*  opening /dev/obd */
-static int obd_class_open(unsigned long flags, void *args)
-{
-        ENTRY;
-
-        PORTAL_MODULE_USE;
-        RETURN(0);
-}
-
-/*  closing /dev/obd */
-static int obd_class_release(unsigned long flags, void *args)
-{
-        ENTRY;
-
-        PORTAL_MODULE_UNUSE;
-        RETURN(0);
-}
-#endif
-
-static inline void obd_data2conn(struct lustre_handle *conn,
-                                 struct obd_ioctl_data *data)
-{
-        memset(conn, 0, sizeof *conn);
-        conn->cookie = data->ioc_cookie;
-}
-
-static inline void obd_conn2data(struct obd_ioctl_data *data,
-                                 struct lustre_handle *conn)
-{
-        data->ioc_cookie = conn->cookie;
-}
-
-int class_resolve_dev_name(__u32 len, const char *name)
-{
-        int rc;
-        int dev;
-
-        ENTRY;
-        if (!len || !name) {
-                CERROR("No name passed,!\n");
-                GOTO(out, rc = -EINVAL);
-        }
-        if (name[len - 1] != 0) {
-                CERROR("Name not nul terminated!\n");
-                GOTO(out, rc = -EINVAL);
-        }
-
-        CDEBUG(D_IOCTL, "device name %s\n", name);
-        dev = class_name2dev(name);
-        if (dev == -1) {
-                CDEBUG(D_IOCTL, "No device for name %s!\n", name);
-                GOTO(out, rc = -EINVAL);
-        }
-
-        CDEBUG(D_IOCTL, "device name %s, dev %d\n", name, dev);
-        rc = dev;
-
-out:
-        RETURN(rc);
-}
-
-int class_handle_ioctl(unsigned int cmd, unsigned long arg)
-{
-        char *buf = NULL;
-        struct obd_ioctl_data *data;
-        struct libcfs_debug_ioctl_data *debug_data;
-        struct obd_device *obd = NULL;
-        int err = 0, len = 0;
-        ENTRY;
-
-        /* only for debugging */
-        if (cmd == LIBCFS_IOC_DEBUG_MASK) {
-                debug_data = (struct libcfs_debug_ioctl_data*)arg;
-                libcfs_subsystem_debug = debug_data->subs;
-                libcfs_debug = debug_data->debug;
-                return 0;
-        }
-
-        CDEBUG(D_IOCTL, "cmd = %x\n", cmd);
-        if (obd_ioctl_getdata(&buf, &len, (void *)arg)) {
-                CERROR("OBD ioctl: data error\n");
-                GOTO(out, err = -EINVAL);
-        }
-        data = (struct obd_ioctl_data *)buf;
-
-        switch (cmd) {
-        case OBD_IOC_PROCESS_CFG: {
-                struct lustre_cfg *lcfg;
-
-                if (!data->ioc_plen1 || !data->ioc_pbuf1) {
-                        CERROR("No config buffer passed!\n");
-                        GOTO(out, err = -EINVAL);
-                }
-                OBD_ALLOC(lcfg, data->ioc_plen1);
-                if (lcfg == NULL)
-                        GOTO(out, err = -ENOMEM);
-                err = copy_from_user(lcfg, data->ioc_pbuf1, data->ioc_plen1);
-                if (!err)
-                        err = lustre_cfg_sanity_check(lcfg, data->ioc_plen1);
-                if (!err)
-                        err = class_process_config(lcfg);
-                OBD_FREE(lcfg, data->ioc_plen1);
-                GOTO(out, err);
-        }
-
-        case OBD_GET_VERSION:
-                if (!data->ioc_inlbuf1) {
-                        CERROR("No buffer passed in ioctl\n");
-                        GOTO(out, err = -EINVAL);
-                }
-
-                if (strlen(BUILD_VERSION) + 1 > data->ioc_inllen1) {
-                        CERROR("ioctl buffer too small to hold version\n");
-                        GOTO(out, err = -EINVAL);
-                }
-
-                memcpy(data->ioc_bulk, BUILD_VERSION,
-                       strlen(BUILD_VERSION) + 1);
-
-                err = obd_ioctl_popdata((void *)arg, data, len);
-                if (err)
-                        err = -EFAULT;
-                GOTO(out, err);
-
-        case OBD_IOC_NAME2DEV: {
-                /* Resolve a device name.  This does not change the
-                 * currently selected device.
-                 */
-                int dev;
-
-                dev = class_resolve_dev_name(data->ioc_inllen1,
-                                             data->ioc_inlbuf1);
-                data->ioc_dev = dev;
-                if (dev < 0)
-                        GOTO(out, err = -EINVAL);
-
-                err = obd_ioctl_popdata((void *)arg, data, sizeof(*data));
-                if (err)
-                        err = -EFAULT;
-                GOTO(out, err);
-        }
-
-        case OBD_IOC_UUID2DEV: {
-                /* Resolve a device uuid.  This does not change the
-                 * currently selected device.
-                 */
-                int dev;
-                struct obd_uuid uuid;
-
-                if (!data->ioc_inllen1 || !data->ioc_inlbuf1) {
-                        CERROR("No UUID passed!\n");
-                        GOTO(out, err = -EINVAL);
-                }
-                if (data->ioc_inlbuf1[data->ioc_inllen1 - 1] != 0) {
-                        CERROR("UUID not NUL terminated!\n");
-                        GOTO(out, err = -EINVAL);
-                }
-
-                CDEBUG(D_IOCTL, "device name %s\n", data->ioc_inlbuf1);
-                obd_str2uuid(&uuid, data->ioc_inlbuf1);
-                dev = class_uuid2dev(&uuid);
-                data->ioc_dev = dev;
-                if (dev == -1) {
-                        CDEBUG(D_IOCTL, "No device for UUID %s!\n",
-                               data->ioc_inlbuf1);
-                        GOTO(out, err = -EINVAL);
-                }
-
-                CDEBUG(D_IOCTL, "device name %s, dev %d\n", data->ioc_inlbuf1,
-                       dev);
-                err = obd_ioctl_popdata((void *)arg, data, sizeof(*data));
-                if (err)
-                        err = -EFAULT;
-                GOTO(out, err);
-        }
-
-        case OBD_IOC_CLOSE_UUID: {
-                CDEBUG(D_IOCTL, "closing all connections to uuid %s (NOOP)\n",
-                       data->ioc_inlbuf1);
-                GOTO(out, err = 0);
-        }
-
-        case OBD_IOC_GETDEVICE: {
-                int     index = data->ioc_count;
-                char    *status, *str;
-
-                if (!data->ioc_inlbuf1) {
-                        CERROR("No buffer passed in ioctl\n");
-                        GOTO(out, err = -EINVAL);
-                } 
-                if (data->ioc_inllen1 < 128) {
-                        CERROR("ioctl buffer too small to hold version\n");
-                        GOTO(out, err = -EINVAL);
-                }
-                                
-                obd = class_num2obd(index);
-                if (!obd)
-                        GOTO(out, err = -ENOENT);
-                
-                if (obd->obd_stopping)
-                        status = "ST";
-                else if (obd->obd_set_up)
-                        status = "UP";
-                else if (obd->obd_attached)
-                        status = "AT";
-                else
-                        status = "--"; 
-                str = (char *)data->ioc_bulk;
-                snprintf(str, len - sizeof(*data), "%3d %s %s %s %s %d",
-                         (int)index, status, obd->obd_type->typ_name,
-                         obd->obd_name, obd->obd_uuid.uuid,
-                         atomic_read(&obd->obd_refcount));
-                err = obd_ioctl_popdata((void *)arg, data, len);
-
-                GOTO(out, err = 0);
-        }
-
-        }
-
-        if (data->ioc_dev >= class_devno_max()) {
-                CERROR("OBD ioctl: No device\n");
-                GOTO(out, err = -EINVAL);
-        }
-
-        obd = class_num2obd(data->ioc_dev);
-        if (obd == NULL) {
-                CERROR("OBD ioctl : No Device %d\n", data->ioc_dev);
-                GOTO(out, err = -EINVAL);
-        }
-        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-
-        if (!obd->obd_set_up || obd->obd_stopping) {
-                CERROR("OBD ioctl: device not setup %d \n", data->ioc_dev);
-                GOTO(out, err = -EINVAL);
-        }
-
-        switch(cmd) {
-        case OBD_IOC_NO_TRANSNO: {
-                if (!obd->obd_attached) {
-                        CERROR("Device %d not attached\n", obd->obd_minor);
-                        GOTO(out, err = -ENODEV);
-                }
-                CDEBUG(D_HA, "%s: disabling committed-transno notification\n",
-                       obd->obd_name);
-                obd->obd_no_transno = 1;
-                GOTO(out, err = 0);
-        }
-
-        default: {
-                err = obd_iocontrol(cmd, obd->obd_self_export, len, data, NULL);
-                if (err)
-                        GOTO(out, err);
-
-                err = obd_ioctl_popdata((void *)arg, data, len);
-                if (err)
-                        err = -EFAULT;
-                GOTO(out, err);
-        }
-        }
-
- out:
-        if (buf)
-                obd_ioctl_freedata(buf, len);
-        RETURN(err);
-} /* class_handle_ioctl */
-
-
-
-#define OBD_MINOR 241
-#ifdef __KERNEL__
-/* to control /dev/obd */
-static int obd_class_ioctl (struct cfs_psdev_file *pfile, unsigned long cmd,
-                            void *arg)
-{
-        return class_handle_ioctl(cmd, (unsigned long)arg);
-}
-
-/* declare character device */
-struct cfs_psdev_ops obd_psdev_ops = {
-        /* .p_open    = */ obd_class_open,      /* open */
-        /* .p_close   = */ obd_class_release,   /* release */
-        /* .p_read    = */ NULL,
-        /* .p_write   = */ NULL,
-        /* .p_ioctl   = */ obd_class_ioctl     /* ioctl */
-};
-
-extern cfs_psdev_t obd_psdev;
-#else
-void *obd_psdev = NULL;
-#endif
-
-EXPORT_SYMBOL(obd_devs);
-EXPORT_SYMBOL(obd_print_fail_loc);
-EXPORT_SYMBOL(obd_race_waitq);
-EXPORT_SYMBOL(obd_race_state);
-EXPORT_SYMBOL(obd_debug_peer_on_timeout);
-EXPORT_SYMBOL(obd_dump_on_timeout);
-EXPORT_SYMBOL(obd_dump_on_eviction);
-EXPORT_SYMBOL(obd_timeout);
-EXPORT_SYMBOL(ldlm_timeout);
-EXPORT_SYMBOL(obd_max_dirty_pages);
-EXPORT_SYMBOL(obd_dirty_pages);
-EXPORT_SYMBOL(ptlrpc_put_connection_superhack);
-
-EXPORT_SYMBOL(proc_lustre_root);
-
-EXPORT_SYMBOL(class_register_type);
-EXPORT_SYMBOL(class_unregister_type);
-EXPORT_SYMBOL(class_get_type);
-EXPORT_SYMBOL(class_put_type);
-EXPORT_SYMBOL(class_name2dev);
-EXPORT_SYMBOL(class_name2obd);
-EXPORT_SYMBOL(class_uuid2dev);
-EXPORT_SYMBOL(class_uuid2obd);
-EXPORT_SYMBOL(class_find_client_obd);
-EXPORT_SYMBOL(class_find_client_notype);
-EXPORT_SYMBOL(class_devices_in_group);
-EXPORT_SYMBOL(class_conn2export);
-EXPORT_SYMBOL(class_exp2obd);
-EXPORT_SYMBOL(class_conn2obd);
-EXPORT_SYMBOL(class_exp2cliimp);
-EXPORT_SYMBOL(class_conn2cliimp);
-EXPORT_SYMBOL(class_disconnect);
-EXPORT_SYMBOL(class_num2obd);
-
-/* uuid.c */
-EXPORT_SYMBOL(class_uuid_unparse);
-EXPORT_SYMBOL(lustre_uuid_to_peer);
-
-EXPORT_SYMBOL(class_handle_hash);
-EXPORT_SYMBOL(class_handle_unhash);
-EXPORT_SYMBOL(class_handle2object);
-EXPORT_SYMBOL(class_handle_free_cb);
-
-/* obd_config.c */
-EXPORT_SYMBOL(class_incref);
-EXPORT_SYMBOL(class_decref);
-EXPORT_SYMBOL(class_get_profile);
-EXPORT_SYMBOL(class_del_profile);
-EXPORT_SYMBOL(class_del_profiles);
-EXPORT_SYMBOL(class_process_config);
-EXPORT_SYMBOL(class_process_proc_param);
-EXPORT_SYMBOL(class_config_parse_llog);
-EXPORT_SYMBOL(class_config_dump_llog);
-EXPORT_SYMBOL(class_attach);
-EXPORT_SYMBOL(class_setup);
-EXPORT_SYMBOL(class_cleanup);
-EXPORT_SYMBOL(class_detach);
-EXPORT_SYMBOL(class_manual_cleanup);
-
-#define OBD_INIT_CHECK
-#ifdef OBD_INIT_CHECK
-int obd_init_checks(void)
-{
-        __u64 u64val, div64val;
-        char buf[64];
-        int len, ret = 0;
-
-        CDEBUG(D_INFO, "LPU64=%s, LPD64=%s, LPX64=%s, LPSZ=%s, LPSSZ=%s\n",
-               LPU64, LPD64, LPX64, LPSZ, LPSSZ);
-
-        CDEBUG(D_INFO, "OBD_OBJECT_EOF = "LPX64"\n", (__u64)OBD_OBJECT_EOF);
-
-        u64val = OBD_OBJECT_EOF;
-        CDEBUG(D_INFO, "u64val OBD_OBJECT_EOF = "LPX64"\n", u64val);
-        if (u64val != OBD_OBJECT_EOF) {
-                CERROR("__u64 "LPX64"(%d) != 0xffffffffffffffff\n",
-                       u64val, (int)sizeof(u64val));
-                ret = -EINVAL;
-        }
-        len = snprintf(buf, sizeof(buf), LPX64, u64val);
-        if (len != 18) {
-                CWARN("LPX64 wrong length! strlen(%s)=%d != 18\n", buf, len);
-                ret = -EINVAL;
-        }
-
-        div64val = OBD_OBJECT_EOF;
-        CDEBUG(D_INFO, "u64val OBD_OBJECT_EOF = "LPX64"\n", u64val);
-        if (u64val != OBD_OBJECT_EOF) {
-                CERROR("__u64 "LPX64"(%d) != 0xffffffffffffffff\n",
-                       u64val, (int)sizeof(u64val));
-                ret = -EOVERFLOW;
-        }
-        if (u64val >> 8 != OBD_OBJECT_EOF >> 8) {
-                CERROR("__u64 "LPX64"(%d) != 0xffffffffffffffff\n",
-                       u64val, (int)sizeof(u64val));
-                return -EOVERFLOW;
-        }
-        if (do_div(div64val, 256) != (u64val & 255)) {
-                CERROR("do_div("LPX64",256) != "LPU64"\n", u64val, u64val &255);
-                return -EOVERFLOW;
-        }
-        if (u64val >> 8 != div64val) {
-                CERROR("do_div("LPX64",256) "LPU64" != "LPU64"\n",
-                       u64val, div64val, u64val >> 8);
-                return -EOVERFLOW;
-        }
-        len = snprintf(buf, sizeof(buf), LPX64, u64val);
-        if (len != 18) {
-                CWARN("LPX64 wrong length! strlen(%s)=%d != 18\n", buf, len);
-                ret = -EINVAL;
-        }
-        len = snprintf(buf, sizeof(buf), LPU64, u64val);
-        if (len != 20) {
-                CWARN("LPU64 wrong length! strlen(%s)=%d != 20\n", buf, len);
-                ret = -EINVAL;
-        }
-        len = snprintf(buf, sizeof(buf), LPD64, u64val);
-        if (len != 2) {
-                CWARN("LPD64 wrong length! strlen(%s)=%d != 2\n", buf, len);
-                ret = -EINVAL;
-        }
-        if ((u64val & ~CFS_PAGE_MASK) >= CFS_PAGE_SIZE) {
-                CWARN("mask failed: u64val "LPU64" >= %lu\n", u64val, 
-                      CFS_PAGE_SIZE);
-                ret = -EINVAL;
-        }
-
-        return ret;
-}
-#else
-#define obd_init_checks() do {} while(0)
-#endif
-
-extern spinlock_t obd_types_lock;
-extern int class_procfs_init(void);
-extern int class_procfs_clean(void);
-
-#ifdef __KERNEL__
-static int __init init_obdclass(void)
-#else
-int init_obdclass(void)
-#endif
-{
-        int i, err;
-#ifdef __KERNEL__
-        int lustre_register_fs(void);
-
-        printk(KERN_INFO "Lustre: OBD class driver, info@clusterfs.com\n");
-        printk(KERN_INFO "        Lustre Version: "LUSTRE_VERSION_STRING"\n");
-        printk(KERN_INFO "        Build Version: "BUILD_VERSION"\n");
-#else
-        CDEBUG(D_INFO, "Lustre: OBD class driver, info@clusterfs.com\n");
-        CDEBUG(D_INFO, "        Lustre Version: "LUSTRE_VERSION_STRING"\n");
-        CDEBUG(D_INFO, "        Build Version: "BUILD_VERSION"\n");
-#endif
-
-        spin_lock_init(&obd_types_lock);
-        cfs_waitq_init(&obd_race_waitq);
-        obd_zombie_impexp_init();
-#ifdef LPROCFS
-        obd_memory = lprocfs_alloc_stats(OBD_STATS_NUM, 
-                                         LPROCFS_STATS_FLAG_PERCPU);
-        if (obd_memory == NULL) {
-                CERROR("kmalloc of 'obd_memory' failed\n");
-                RETURN(-ENOMEM);
-        }
-
-        lprocfs_counter_init(obd_memory, OBD_MEMORY_STAT,
-                             LPROCFS_CNTR_AVGMINMAX, 
-                             "memused", "bytes");
-        lprocfs_counter_init(obd_memory, OBD_MEMORY_PAGES_STAT,
-                             LPROCFS_CNTR_AVGMINMAX, 
-                             "pagesused", "pages");
-#endif
-        err = obd_init_checks();
-        if (err == -EOVERFLOW)
-                return err;
-
-        class_init_uuidlist();
-        err = class_handle_init();
-        if (err)
-                return err;
-
-        spin_lock_init(&obd_dev_lock);
-        CFS_INIT_LIST_HEAD(&obd_types);
-
-        err = cfs_psdev_register(&obd_psdev);
-        if (err) {
-                CERROR("cannot register %d err %d\n", OBD_MINOR, err);
-                return err;
-        }
-
-        /* This struct is already zerod for us (static global) */
-        for (i = 0; i < class_devno_max(); i++)
-                obd_devs[i] = NULL;
-
-        /* Default the dirty page cache cap to 1/2 of system memory */
-        obd_max_dirty_pages = num_physpages / 2;
-
-        err = obd_init_caches();
-        if (err)
-                return err;
-#ifdef __KERNEL__
-        err = class_procfs_init();
-        if (err)
-                return err;
-        err = lustre_register_fs();
-#endif
-
-        return err;
-}
-
-/* liblustre doesn't call cleanup_obdclass, apparently.  we carry on in this
- * ifdef to the end of the file to cover module and versioning goo.*/
-#ifdef __KERNEL__
-static void cleanup_obdclass(void)
-{
-        int i;
-        __u64 memory_leaked, pages_leaked;
-        __u64 memory_max, pages_max;
-        int lustre_unregister_fs(void);
-        ENTRY;
-
-        lustre_unregister_fs();
-
-        cfs_psdev_deregister(&obd_psdev);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd && obd->obd_set_up &&
-                    OBT(obd) && OBP(obd, detach)) {
-                        /* XXX should this call generic detach otherwise? */
-                        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-                        OBP(obd, detach)(obd);
-                }
-        }
-
-        obd_cleanup_caches();
-        obd_sysctl_clean();
-
-        class_procfs_clean();
-
-        class_handle_cleanup();
-        class_exit_uuidlist();
-
-        memory_leaked = obd_memory_sum();
-        pages_leaked = obd_pages_sum();
-
-        memory_max = obd_memory_max();
-        pages_max = obd_pages_max();
-
-        lprocfs_free_stats(&obd_memory);
-        CDEBUG((memory_leaked | pages_leaked) ? D_ERROR : D_INFO,
-               "obd_memory max: "LPU64", leaked: "LPU64" "
-               "obd_memory_pages max: "LPU64", leaked: "LPU64"\n",
-               memory_max, memory_leaked, 
-               pages_max, pages_leaked);
-
-        EXIT;
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Class Driver Build Version: " BUILD_VERSION);
-MODULE_LICENSE("GPL");
-
-cfs_module(obdclass, LUSTRE_VERSION_STRING, init_obdclass, cleanup_obdclass);
-#endif
diff --git a/lustre/obdclass/darwin/.cvsignore b/lustre/obdclass/darwin/.cvsignore
deleted file mode 100644
index 70845e08eb0b807b1022dc47cd27e67f726d4a0f..0000000000000000000000000000000000000000
--- a/lustre/obdclass/darwin/.cvsignore
+++ /dev/null
@@ -1 +0,0 @@
-Makefile.in
diff --git a/lustre/obdclass/darwin/Makefile.am b/lustre/obdclass/darwin/Makefile.am
deleted file mode 100644
index 75ba623f65832cbdd34f1d215ca9b6a8259dfbbf..0000000000000000000000000000000000000000
--- a/lustre/obdclass/darwin/Makefile.am
+++ /dev/null
@@ -1,3 +0,0 @@
-EXTRA_DIST := 		\
-	darwin-module.c	\
-	darwin-sysctl.c
diff --git a/lustre/obdclass/darwin/darwin-module.c b/lustre/obdclass/darwin/darwin-module.c
deleted file mode 100644
index 287d9425232594dc595632be6feedc2155a297af..0000000000000000000000000000000000000000
--- a/lustre/obdclass/darwin/darwin-module.c
+++ /dev/null
@@ -1,181 +0,0 @@
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#include <mach/mach_types.h>
-#include <string.h>
-#include <sys/file.h>
-#include <sys/conf.h>
-#include <miscfs/devfs/devfs.h>
-
-#include <libcfs/libcfs.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-
-#ifndef OBD_MAX_IOCTL_BUFFER
-#define OBD_MAX_IOCTL_BUFFER 8192
-#endif
-
-/* buffer MUST be at least the size of obd_ioctl_hdr */
-int obd_ioctl_getdata(char **buf, int *len, void *arg)
-{
-        struct obd_ioctl_hdr *hdr;
-        struct obd_ioctl_data *data;
-        int err = 0;
-        int offset = 0;
-        ENTRY;
-
-	hdr = (struct obd_ioctl_hdr *)arg;
-        if (hdr->ioc_version != OBD_IOCTL_VERSION) {
-                CERROR("Version mismatch kernel vs application\n");
-                RETURN(-EINVAL);
-        }
-
-        if (hdr->ioc_len > OBD_MAX_IOCTL_BUFFER) {
-                CERROR("User buffer len %d exceeds %d max buffer\n",
-                       hdr->ioc_len, OBD_MAX_IOCTL_BUFFER);
-                RETURN(-EINVAL);
-        }
-
-        if (hdr->ioc_len < sizeof(struct obd_ioctl_data)) {
-                CERROR("OBD: user buffer too small for ioctl (%d)\n", hdr->ioc_len);
-                RETURN(-EINVAL);
-        }
-
-        /* XXX allocate this more intelligently, using kmalloc when
-         * appropriate */
-        OBD_VMALLOC(*buf, hdr->ioc_len);
-        if (*buf == NULL) {
-                CERROR("Cannot allocate control buffer of len %d\n",
-                       hdr->ioc_len);
-                RETURN(-EINVAL);
-        }
-        *len = hdr->ioc_len;
-        data = (struct obd_ioctl_data *)*buf;
-
-	bzero(data, hdr->ioc_len);
-	memcpy(data, (void *)arg, sizeof(struct obd_ioctl_data));
-	if (data->ioc_inlbuf1)
-		err = copy_from_user(&data->ioc_bulk[0], (void *)data->ioc_inlbuf1,
-				     hdr->ioc_len - ((void *)&data->ioc_bulk[0] - (void *)data));
-
-        if (obd_ioctl_is_invalid(data)) {
-                CERROR("ioctl not correctly formatted\n");
-                return -EINVAL;
-        }
-
-        if (data->ioc_inllen1) {
-                data->ioc_inlbuf1 = &data->ioc_bulk[0];
-                offset += size_round(data->ioc_inllen1);
-        }
-
-        if (data->ioc_inllen2) {
-                data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset;
-                offset += size_round(data->ioc_inllen2);
-        }
-
-        if (data->ioc_inllen3) {
-                data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset;
-                offset += size_round(data->ioc_inllen3);
-        }
-
-        if (data->ioc_inllen4) {
-                data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset;
-        }
-
-        EXIT;
-        return 0;
-}
-
-int obd_ioctl_popdata(void *arg, void *data, int len)
-{
-	/* 
-	 * Xnu ioctl copyout(uaddr, arg, sizeof(struct obd_ioctl_data)),
-	 * we have to copyout data exceed sizeof(struct obd_ioctl_data)
-	 * by ourself.
-	 */
-	if (len <= sizeof(struct obd_ioctl_data)) {
-		memcpy(arg, data, len);
-		return 0;
-	} else {
-		int err;
-		struct obd_ioctl_data *u = (struct obd_ioctl_data *)arg;
-		struct obd_ioctl_data *k = (struct obd_ioctl_data *)data;
-		err = copy_to_user((void *)u->ioc_inlbuf1, &k->ioc_bulk[0],
-				    len -((void *)&k->ioc_bulk[0] -(void *)k));
-		memcpy(arg, data, sizeof(struct obd_ioctl_data));
-		return err;
-	}
-}
-/*
- * cfs pseudo device
- */
-extern struct cfs_psdev_ops          obd_psdev_ops;
-
-static int
-obd_class_open(dev_t dev, int flags, int devtype, struct proc *p)
-{
-	if (obd_psdev_ops.p_open != NULL)
-		return -obd_psdev_ops.p_open(0, NULL);
-	return EPERM;
-}
-
-/*  closing /dev/obd */
-static int
-obd_class_release(dev_t dev, int flags, int mode, struct proc *p)
-{
-	if (obd_psdev_ops.p_close != NULL)
-		return -obd_psdev_ops.p_close(0, NULL);
-	return EPERM;
-}
-
-static int
-obd_class_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *p)
-{
-	int err = 0;
-	ENTRY;
-
-	if (!is_suser())
-		RETURN (EPERM);
-	if (obd_psdev_ops.p_ioctl != NULL)
-		err = -obd_psdev_ops.p_ioctl(NULL, cmd, (void *)arg);
-	else
-		err = EPERM;
-
-	RETURN(err);
-}
-
-static struct cdevsw obd_psdevsw = {
-	obd_class_open,
-	obd_class_release,
-	NULL,
-	NULL,
-	obd_class_ioctl,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-	NULL,
-};
-
-cfs_psdev_t obd_psdev = {
-	-1,
-	NULL,
-	"obd",
-	&obd_psdevsw
-};
-
-int class_procfs_init(void)
-{
-	return 0;
-}
-
-int class_procfs_clean(void)
-{
-	return 0;
-}
diff --git a/lustre/obdclass/darwin/darwin-sysctl.c b/lustre/obdclass/darwin/darwin-sysctl.c
deleted file mode 100644
index f953cf84b630746aa91c0a23435fedb077c9e73d..0000000000000000000000000000000000000000
--- a/lustre/obdclass/darwin/darwin-sysctl.c
+++ /dev/null
@@ -1,154 +0,0 @@
-#include <sys/param.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/systm.h>
-#include <sys/sysctl.h>
-#include <sys/proc.h>
-#include <sys/unistd.h>
-#include <mach/mach_types.h>
-#include <lustre/lustre_build_version.h>
-
-#define DEBUG_SUBSYSTEM S_CLASS
-                                                                                                                                                                     
-#include <libcfs/libcfs.h>
-#ifndef BUILD_VERSION	
-#define BUILD_VERSION		"Unknown"
-#endif
-#ifndef LUSTRE_KERNEL_VERSION
-#define LUSTRE_KERNEL_VERSION	"Unknown Darwin version"
-#endif
-
-cfs_sysctl_table_header_t *obd_table_header = NULL;
-
-int proc_fail_loc SYSCTL_HANDLER_ARGS;
-int proc_obd_timeout SYSCTL_HANDLER_ARGS;
-extern unsigned int obd_fail_loc;
-extern unsigned int obd_dump_on_timeout;
-extern unsigned int obd_timeout;
-extern unsigned int ldlm_timeout;
-extern unsigned int obd_sync_filter;
-extern atomic_t obd_memory;
-
-int read_build_version SYSCTL_HANDLER_ARGS;
-int read_lustre_kernel_version SYSCTL_HANDLER_ARGS;
-
-SYSCTL_NODE (,                  OID_AUTO,       lustre,	    CTLFLAG_RW,
-	     0,                 "lustre sysctl top");
-SYSCTL_PROC(_lustre,		OID_AUTO,       fail_loc, 
-	    CTLTYPE_INT | CTLFLAG_RW ,		&obd_fail_loc,
-	    0,		&proc_fail_loc,		"I",	"obd_fail_loc");
-SYSCTL_PROC(_lustre,		OID_AUTO,       timeout, 
-	    CTLTYPE_INT | CTLFLAG_RW ,		&obd_timeout,
-	    0,		&proc_obd_timeout,	"I",	"obd_timeout");
-SYSCTL_PROC(_lustre,		OID_AUTO,       build_version, 
-	    CTLTYPE_STRING | CTLFLAG_RD ,	NULL,
-	    0,		&read_build_version,	"A",	"lustre_build_version");
-SYSCTL_PROC(_lustre,		OID_AUTO,       lustre_kernel_version,
-	    CTLTYPE_STRING | CTLFLAG_RD ,	NULL,
-	    0,		&read_lustre_kernel_version,	"A",	"lustre_build_version");
-SYSCTL_INT(_lustre,		OID_AUTO,	dump_on_timeout, 
-	   CTLTYPE_INT | CTLFLAG_RW,		&obd_dump_on_timeout,
-	   0,		"lustre_dump_on_timeout");
-SYSCTL_INT(_lustre,		OID_AUTO,	debug_peer_on_timeout, 
-	   CTLTYPE_INT | CTLFLAG_RW,		&obd_debug_peer_on_timeout,
-	   0,		"lustre_debug_peer_on_timeout");
-SYSCTL_INT(_lustre,		OID_AUTO,	memused, 
-	   CTLTYPE_INT | CTLFLAG_RW,		(int *)&obd_memory.counter,
-	   0,		"lustre_memory_used");
-SYSCTL_INT(_lustre,		OID_AUTO,	ldlm_timeout, 
-	   CTLTYPE_INT | CTLFLAG_RW,		&ldlm_timeout,
-	   0,		"ldlm_timeout");
-
-static cfs_sysctl_table_t      parent_table[] = {
-	&sysctl__lustre,
-	&sysctl__lustre_fail_loc,
-	&sysctl__lustre_timeout,
-	&sysctl__lustre_dump_on_timeout,
-	&sysctl__lustre_debug_peer_on_timeout,
-	&sysctl__lustre_upcall,
-	&sysctl__lustre_memused,
-	&sysctl__lustre_filter_sync_on_commit,
-	&sysctl__lustre_ldlm_timeout,
-};
-
-extern cfs_waitq_t obd_race_waitq;
-
-int proc_fail_loc SYSCTL_HANDLER_ARGS
-{ 
-	int error = 0; 
-	int old_fail_loc = obd_fail_loc;
-	
-	error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); 
-	if (!error && req->newptr != USER_ADDR_NULL) {
-		if (old_fail_loc != obd_fail_loc) 
-			cfs_waitq_signal(&obd_race_waitq);
-	} else  if (req->newptr != USER_ADDR_NULL) { 
-		/* Something was wrong with the write request */ 
-		printf ("sysctl fail loc fault: %d.\n", error);
-	} else { 
-		/* Read request */ 
-		error = SYSCTL_OUT(req, &obd_fail_loc, sizeof obd_fail_loc);
-	}
-	return error;
-}
-
-int proc_obd_timeout SYSCTL_HANDLER_ARGS
-{ 
-	int error = 0;
-
-	error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); 
-	if (!error && req->newptr != USER_ADDR_NULL) {
-		if (ldlm_timeout >= obd_timeout)
-			ldlm_timeout = max(obd_timeout / 3, 1U);
-	} else  if (req->newptr != USER_ADDR_NULL) { 
-		printf ("sysctl fail obd_timeout: %d.\n", error);
-	} else {
-		/* Read request */ 
-		error = SYSCTL_OUT(req, &obd_timeout, sizeof obd_timeout);
-	}
-	return error;
-}
-
-int read_build_version SYSCTL_HANDLER_ARGS
-{
-	int error = 0;
-
-	error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); 
-	if ( req->newptr != USER_ADDR_NULL) {
-		printf("sysctl read_build_version is read-only!\n");
-	} else {
-		error = SYSCTL_OUT(req, BUILD_VERSION, strlen(BUILD_VERSION));
-	}
-	return error;
-}
-
-int read_lustre_kernel_version SYSCTL_HANDLER_ARGS
-{
-	int error = 0;
-
-	error = sysctl_handle_long(oidp, oidp->oid_arg1, oidp->oid_arg2, req); 
-	if ( req->newptr != NULL) {
-		printf("sysctl lustre_kernel_version is read-only!\n");
-	} else {
-		error = SYSCTL_OUT(req, LUSTRE_KERNEL_VERSION, strlen(LUSTRE_KERNEL_VERSION));
-	}
-	return error;
-}
-
-void obd_sysctl_init (void)
-{
-#if 1 
-	if ( !obd_table_header ) 
-		obd_table_header = cfs_register_sysctl_table(parent_table, 0);
-#endif
-}
-                                                                                                                                                                     
-void obd_sysctl_clean (void)
-{
-#if 1 
-	if ( obd_table_header ) 
-		cfs_unregister_sysctl_table(obd_table_header); 
-	obd_table_header = NULL;
-#endif
-}
-
diff --git a/lustre/obdclass/debug.c b/lustre/obdclass/debug.c
deleted file mode 100644
index 7d3d313648066a35b8e6162d716f16c235c7a6c7..0000000000000000000000000000000000000000
--- a/lustre/obdclass/debug.c
+++ /dev/null
@@ -1,187 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * Helper routines for dumping data structs for debugging.
- */
-
-#define DEBUG_SUBSYSTEM D_OTHER
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_ost.h>
-#include <obd_support.h>
-#include <lustre_debug.h>
-#include <lustre_net.h>
-
-int dump_ioo(struct obd_ioobj *ioo)
-{
-        CERROR("obd_ioobj: ioo_id="LPD64", ioo_gr="LPD64", ioo_type=%d, "
-               "ioo_bufct=%d\n",
-               ioo->ioo_id, ioo->ioo_gr, ioo->ioo_type, ioo->ioo_bufcnt);
-        return -EINVAL;
-}
-
-int dump_lniobuf(struct niobuf_local *nb)
-{
-        CERROR("niobuf_local: offset="LPD64", len=%d, page=%p, rc=%d\n",
-               nb->offset, nb->len, nb->page, nb->rc);
-        CERROR("nb->page: index = %ld\n", nb->page ? cfs_page_index(nb->page) : -1);
-
-        return -EINVAL;
-}
-
-int dump_rniobuf(struct niobuf_remote *nb)
-{
-        CERROR("niobuf_remote: offset="LPU64", len=%d, flags=%x\n",
-               nb->offset, nb->len, nb->flags);
-
-        return -EINVAL;
-}
-
-int dump_obdo(struct obdo *oa)
-{
-        __u32 valid = oa->o_valid;
-
-        CERROR("obdo: o_valid = %08x\n", valid);
-        if (valid & OBD_MD_FLID)
-                CERROR("obdo: o_id = "LPD64"\n", oa->o_id);
-        if (valid & OBD_MD_FLATIME)
-                CERROR("obdo: o_atime = "LPD64"\n", oa->o_atime);
-        if (valid & OBD_MD_FLMTIME)
-                CERROR("obdo: o_mtime = "LPD64"\n", oa->o_mtime);
-        if (valid & OBD_MD_FLCTIME)
-                CERROR("obdo: o_ctime = "LPD64"\n", oa->o_ctime);
-        if (valid & OBD_MD_FLSIZE)
-                CERROR("obdo: o_size = "LPD64"\n", oa->o_size);
-        if (valid & OBD_MD_FLBLOCKS)   /* allocation of space */
-                CERROR("obdo: o_blocks = "LPD64"\n", oa->o_blocks);
-        if (valid & OBD_MD_FLBLKSZ)
-                CERROR("obdo: o_blksize = %d\n", oa->o_blksize);
-        if (valid & (OBD_MD_FLTYPE | OBD_MD_FLMODE))
-                CERROR("obdo: o_mode = %o\n",
-                       oa->o_mode & ((valid & OBD_MD_FLTYPE ?  S_IFMT : 0) |
-                                     (valid & OBD_MD_FLMODE ? ~S_IFMT : 0)));
-        if (valid & OBD_MD_FLUID)
-                CERROR("obdo: o_uid = %u\n", oa->o_uid);
-        if (valid & OBD_MD_FLGID)
-                CERROR("obdo: o_gid = %u\n", oa->o_gid);
-        if (valid & OBD_MD_FLFLAGS)
-                CERROR("obdo: o_flags = %x\n", oa->o_flags);
-        if (valid & OBD_MD_FLNLINK)
-                CERROR("obdo: o_nlink = %u\n", oa->o_nlink);
-        if (valid & OBD_MD_FLGENER)
-                CERROR("obdo: o_generation = %u\n", oa->o_generation);
-
-        return -EINVAL;
-}
-
-void dump_lsm(int level, struct lov_stripe_md *lsm)
-{
-        CDEBUG(level, "lsm %p, objid "LPX64", maxbytes "LPX64", magic 0x%08X, "
-               "stripe_size %u, stripe_count %u\n", lsm,
-               lsm->lsm_object_id, lsm->lsm_maxbytes, lsm->lsm_magic,
-               lsm->lsm_stripe_size, lsm->lsm_stripe_count);
-}
-
-/* XXX assumes only a single page in request */
-/*
-int dump_req(struct ptlrpc_request *req)
-{
-        struct ost_body *body = lustre_msg_buf(req->rq_reqmsg, 0);
-        struct obd_ioobj *ioo = lustre_msg_buf(req->rq_reqmsg, 1);
-        //struct niobuf *nb = lustre_msg_buf(req->rq_reqmsg, 2);
-
-        dump_obdo(&body->oa);
-        //dump_niobuf(nb);
-        dump_ioo(ioo);
-
-        return -EINVAL;
-}
-*/
-
-#define LPDS sizeof(__u64)
-int block_debug_setup(void *addr, int len, __u64 off, __u64 id)
-{
-        LASSERT(addr);
-
-        off = cpu_to_le64 (off);
-        id = cpu_to_le64 (id);
-        memcpy(addr, (char *)&off, LPDS);
-        memcpy(addr + LPDS, (char *)&id, LPDS);
-
-        addr += len - LPDS - LPDS;
-        memcpy(addr, (char *)&off, LPDS);
-        memcpy(addr + LPDS, (char *)&id, LPDS);
-
-        return 0;
-}
-
-int block_debug_check(char *who, void *addr, int end, __u64 off, __u64 id)
-{
-        __u64 ne_off;
-        int err = 0;
-
-        LASSERT(addr);
-
-        ne_off = le64_to_cpu (off);
-        id = le64_to_cpu (id);
-        if (memcmp(addr, (char *)&ne_off, LPDS)) {
-                CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" off: "LPX64" != "
-                       LPX64"\n", who, id, off, *(__u64 *)addr, ne_off);
-                err = -EINVAL;
-        }
-        if (memcmp(addr + LPDS, (char *)&id, LPDS)) {
-                CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" id: "LPX64" != "LPX64"\n",
-                       who, id, off, *(__u64 *)(addr + LPDS), id);
-                err = -EINVAL;
-        }
-
-        addr += end - LPDS - LPDS;
-        if (memcmp(addr, (char *)&ne_off, LPDS)) {
-                CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" end off: "LPX64" != "
-                       LPX64"\n", who, id, off, *(__u64 *)addr, ne_off);
-                err = -EINVAL;
-        }
-        if (memcmp(addr + LPDS, (char *)&id, LPDS)) {
-                CDEBUG(D_ERROR, "%s: id "LPX64" offset "LPU64" end id: "LPX64" != "
-                       LPX64"\n", who, id, off, *(__u64 *)(addr + LPDS), id);
-                err = -EINVAL;
-        }
-
-        return err;
-}
-#undef LPDS
-
-EXPORT_SYMBOL(dump_lniobuf);
-EXPORT_SYMBOL(dump_rniobuf);
-EXPORT_SYMBOL(dump_ioo);
-//EXPORT_SYMBOL(dump_req);
-EXPORT_SYMBOL(dump_obdo);
-EXPORT_SYMBOL(dump_lsm);
-EXPORT_SYMBOL(block_debug_setup);
-EXPORT_SYMBOL(block_debug_check);
diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
deleted file mode 100644
index 63d52c26b54f4332b4b6b37baf3f7c3a72c66760..0000000000000000000000000000000000000000
--- a/lustre/obdclass/genops.c
+++ /dev/null
@@ -1,1318 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * These are the only exported functions, they provide some generic
- * infrastructure for managing object devices
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-#include <obd_ost.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include <class_hash.h>
-
-extern struct list_head obd_types;
-spinlock_t obd_types_lock;
-
-cfs_mem_cache_t *obd_device_cachep;
-cfs_mem_cache_t *obdo_cachep;
-EXPORT_SYMBOL(obdo_cachep);
-cfs_mem_cache_t *import_cachep;
-
-struct list_head  obd_zombie_imports;
-struct list_head  obd_zombie_exports;
-spinlock_t        obd_zombie_impexp_lock;
-void            (*obd_zombie_impexp_notify)(void) = NULL;
-EXPORT_SYMBOL(obd_zombie_impexp_notify);
-
-
-int (*ptlrpc_put_connection_superhack)(struct ptlrpc_connection *c);
-
-/*
- * support functions: we could use inter-module communication, but this
- * is more portable to other OS's
- */
-static struct obd_device *obd_device_alloc(void)
-{
-        struct obd_device *obd;
-
-        OBD_SLAB_ALLOC_PTR(obd, obd_device_cachep);
-        if (obd != NULL) {
-                obd->obd_magic = OBD_DEVICE_MAGIC;
-        }
-        return obd;
-}
-EXPORT_SYMBOL(obd_device_alloc);
-
-static void obd_device_free(struct obd_device *obd)
-{
-        LASSERT(obd != NULL);
-        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "obd %p obd_magic %08x != %08x\n", 
-                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
-        OBD_SLAB_FREE_PTR(obd, obd_device_cachep);
-}
-EXPORT_SYMBOL(obd_device_free);
-
-struct obd_type *class_search_type(const char *name)
-{
-        struct list_head *tmp;
-        struct obd_type *type;
-
-        spin_lock(&obd_types_lock);
-        list_for_each(tmp, &obd_types) {
-                type = list_entry(tmp, struct obd_type, typ_chain);
-                if (strcmp(type->typ_name, name) == 0) {
-                        spin_unlock(&obd_types_lock);
-                        return type;
-                }
-        }
-        spin_unlock(&obd_types_lock);
-        return NULL;
-}
-
-struct obd_type *class_get_type(const char *name)
-{
-        struct obd_type *type = class_search_type(name);
-
-#ifdef CONFIG_KMOD
-        if (!type) {
-                const char *modname = name;
-                if (strcmp(modname, LUSTRE_MDT_NAME) == 0) 
-                        modname = LUSTRE_MDS_NAME;
-                if (!request_module(modname)) {
-                        CDEBUG(D_INFO, "Loaded module '%s'\n", modname);
-                        type = class_search_type(name);
-                } else {
-                        LCONSOLE_ERROR_MSG(0x158, "Can't load module '%s'\n",
-                                           modname);
-                }
-        }
-#endif
-        if (type) {
-                spin_lock(&type->obd_type_lock);
-                type->typ_refcnt++;
-                try_module_get(type->typ_ops->o_owner);
-                spin_unlock(&type->obd_type_lock);
-        }
-        return type;
-}
-
-void class_put_type(struct obd_type *type)
-{
-        LASSERT(type);
-        spin_lock(&type->obd_type_lock);
-        type->typ_refcnt--;
-        module_put(type->typ_ops->o_owner);
-        spin_unlock(&type->obd_type_lock);
-}
-
-int class_register_type(struct obd_ops *ops, struct lprocfs_vars *vars,
-                        const char *name)
-{
-        struct obd_type *type;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(strnlen(name, 1024) < 1024);    /* sanity check */
-
-        if (class_search_type(name)) {
-                CDEBUG(D_IOCTL, "Type %s already registered\n", name);
-                RETURN(-EEXIST);
-        }
-
-        rc = -ENOMEM;
-        OBD_ALLOC(type, sizeof(*type));
-        if (type == NULL)
-                RETURN(rc);
-
-        OBD_ALLOC(type->typ_ops, sizeof(*type->typ_ops));
-        OBD_ALLOC(type->typ_name, strlen(name) + 1);
-        if (type->typ_ops == NULL || type->typ_name == NULL)
-                GOTO (failed, rc);
-
-        *(type->typ_ops) = *ops;
-        strcpy(type->typ_name, name);
-        spin_lock_init(&type->obd_type_lock);
-
-#ifdef LPROCFS
-        type->typ_procroot = lprocfs_register(type->typ_name, proc_lustre_root,
-                                              vars, type);
-        if (IS_ERR(type->typ_procroot)) {
-                rc = PTR_ERR(type->typ_procroot);
-                type->typ_procroot = NULL;
-                GOTO (failed, rc);
-        }
-#endif
-
-        spin_lock(&obd_types_lock);
-        list_add(&type->typ_chain, &obd_types);
-        spin_unlock(&obd_types_lock);
-
-        RETURN (0);
-
- failed:
-        if (type->typ_name != NULL)
-                OBD_FREE(type->typ_name, strlen(name) + 1);
-        if (type->typ_ops != NULL)
-                OBD_FREE (type->typ_ops, sizeof (*type->typ_ops));
-        OBD_FREE(type, sizeof(*type));
-        RETURN(rc);
-}
-
-int class_unregister_type(const char *name)
-{
-        struct obd_type *type = class_search_type(name);
-        ENTRY;
-
-        if (!type) {
-                CERROR("unknown obd type\n");
-                RETURN(-EINVAL);
-        }
-
-        if (type->typ_refcnt) {
-                CERROR("type %s has refcount (%d)\n", name, type->typ_refcnt);
-                /* This is a bad situation, let's make the best of it */
-                /* Remove ops, but leave the name for debugging */
-                OBD_FREE(type->typ_ops, sizeof(*type->typ_ops));
-                RETURN(-EBUSY);
-        }
-
-        if (type->typ_procroot) 
-                lprocfs_remove(&type->typ_procroot);
-
-        spin_lock(&obd_types_lock);
-        list_del(&type->typ_chain);
-        spin_unlock(&obd_types_lock);
-        OBD_FREE(type->typ_name, strlen(name) + 1);
-        if (type->typ_ops != NULL)
-                OBD_FREE(type->typ_ops, sizeof(*type->typ_ops));
-        OBD_FREE(type, sizeof(*type));
-        RETURN(0);
-} /* class_unregister_type */
-
-struct obd_device *class_newdev(const char *type_name, const char *name)
-{
-        struct obd_device *result = NULL;
-        struct obd_device *newdev;
-        struct obd_type *type = NULL;
-        int i;
-        int new_obd_minor = 0;
-
-        if (strlen(name) > MAX_OBD_NAME) {
-                CERROR("name/uuid must be < %u bytes long\n", MAX_OBD_NAME);
-                RETURN(ERR_PTR(-EINVAL));
-        }
-
-        type = class_get_type(type_name);
-        if (type == NULL){
-                CERROR("OBD: unknown type: %s\n", type_name);
-                RETURN(ERR_PTR(-ENODEV));
-        }
-
-        newdev = obd_device_alloc();
-        if (newdev == NULL) { 
-                class_put_type(type);
-                RETURN(ERR_PTR(-ENOMEM));
-        }
-        LASSERT(newdev->obd_magic == OBD_DEVICE_MAGIC);
-
-        spin_lock(&obd_dev_lock);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd && obd->obd_name && (strcmp(name, obd->obd_name) == 0)){
-                        CERROR("Device %s already exists, won't add\n", name);
-                        if (result) {
-                                LASSERTF(result->obd_magic == OBD_DEVICE_MAGIC,
-                                         "%p obd_magic %08x != %08x\n", result,
-                                         result->obd_magic, OBD_DEVICE_MAGIC);
-                                LASSERTF(result->obd_minor == new_obd_minor,
-                                         "%p obd_minor %d != %d\n", result,
-                                         result->obd_minor, new_obd_minor);
-
-                                obd_devs[result->obd_minor] = NULL;
-                                result->obd_name[0]='\0';
-                        }
-                        result = ERR_PTR(-EEXIST);
-                        break;
-                }
-                if (!result && !obd) {
-                        result = newdev;
-                        result->obd_minor = i;
-                        new_obd_minor = i;
-                        result->obd_type = type;
-                        memcpy(result->obd_name, name, strlen(name));
-                        obd_devs[i] = result;
-                }
-        }
-        spin_unlock(&obd_dev_lock);
-        
-        if (result == NULL && i >= class_devno_max()) {
-                CERROR("all %u OBD devices used, increase MAX_OBD_DEVICES\n",
-                       class_devno_max());
-                result = ERR_PTR(-EOVERFLOW);
-        }
-        
-        if (IS_ERR(result)) {
-                obd_device_free(newdev);
-                class_put_type(type);
-        } else {
-                CDEBUG(D_IOCTL, "Adding new device %s (%p)\n",
-                       result->obd_name, result);
-        }
-        return result;
-}
-
-void class_release_dev(struct obd_device *obd)
-{
-        struct obd_type *obd_type = obd->obd_type;
-
-        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "%p obd_magic %08x != %08x\n",
-                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
-        LASSERTF(obd == obd_devs[obd->obd_minor], "obd %p != obd_devs[%d] %p\n",
-                 obd, obd->obd_minor, obd_devs[obd->obd_minor]);
-        LASSERT(obd_type != NULL);
-
-        CDEBUG(D_INFO, "Release obd device %s obd_type name =%s\n",
-               obd->obd_name,obd->obd_type->typ_name);
-
-        spin_lock(&obd_dev_lock);
-        obd_devs[obd->obd_minor] = NULL;
-        spin_unlock(&obd_dev_lock);
-        obd_device_free(obd);
-
-        class_put_type(obd_type);
-}
-
-int class_name2dev(const char *name)
-{
-        int i;
-
-        if (!name)
-                return -1;
-
-        spin_lock(&obd_dev_lock);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd && obd->obd_name && strcmp(name, obd->obd_name) == 0) {
-                        /* Make sure we finished attaching before we give
-                           out any references */
-                        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-                        if (obd->obd_attached) {
-                                spin_unlock(&obd_dev_lock);
-                                return i;
-                        }
-                        break;
-                }
-        }
-        spin_unlock(&obd_dev_lock);
-
-        return -1;
-}
-
-struct obd_device *class_name2obd(const char *name)
-{
-        int dev = class_name2dev(name);
-
-        if (dev < 0 || dev > class_devno_max())
-                return NULL;
-        return class_num2obd(dev);
-}
-
-int class_uuid2dev(struct obd_uuid *uuid)
-{
-        int i;
-
-        spin_lock(&obd_dev_lock);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd && obd_uuid_equals(uuid, &obd->obd_uuid)) {
-                        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-                        spin_unlock(&obd_dev_lock);
-                        return i;
-                }
-        }
-        spin_unlock(&obd_dev_lock);
-
-        return -1;
-}
-
-struct obd_device *class_uuid2obd(struct obd_uuid *uuid)
-{
-        int dev = class_uuid2dev(uuid);
-        if (dev < 0)
-                return NULL;
-        return class_num2obd(dev);
-}
-
-struct obd_device *class_num2obd(int num)
-{
-        struct obd_device *obd = NULL;
-
-        if (num < class_devno_max()) {
-                obd = obd_devs[num];
-                if (obd == NULL) {
-                        return NULL;
-                }
-
-                LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC,
-                         "%p obd_magic %08x != %08x\n",
-                         obd, obd->obd_magic, OBD_DEVICE_MAGIC);
-                LASSERTF(obd->obd_minor == num,
-                         "%p obd_minor %0d != %0d\n",
-                         obd, obd->obd_minor, num);
-        }
-
-        return obd;
-}
-
-void class_obd_list(void)
-{
-        char *status;
-        int i;
-
-        spin_lock(&obd_dev_lock);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd == NULL)
-                        continue;
-                if (obd->obd_stopping)
-                        status = "ST";
-                else if (obd->obd_set_up)
-                        status = "UP";
-                else if (obd->obd_attached)
-                        status = "AT";
-                else
-                        status = "--";
-                LCONSOLE(D_CONFIG, "%3d %s %s %s %s %d\n",
-                         i, status, obd->obd_type->typ_name,
-                         obd->obd_name, obd->obd_uuid.uuid,
-                         atomic_read(&obd->obd_refcount));
-        }
-        spin_unlock(&obd_dev_lock);
-        return;
-}
-
-/* Search for a client OBD connected to tgt_uuid.  If grp_uuid is
-   specified, then only the client with that uuid is returned,
-   otherwise any client connected to the tgt is returned. */
-struct obd_device * class_find_client_obd(struct obd_uuid *tgt_uuid,
-                                          const char * typ_name,
-                                          struct obd_uuid *grp_uuid)
-{
-        int i;
-
-        spin_lock(&obd_dev_lock);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd == NULL)
-                        continue;
-                if ((strncmp(obd->obd_type->typ_name, typ_name,
-                             strlen(typ_name)) == 0)) {
-                        if (obd_uuid_equals(tgt_uuid,
-                                            &obd->u.cli.cl_target_uuid) &&
-                            ((grp_uuid)? obd_uuid_equals(grp_uuid,
-                                                         &obd->obd_uuid) : 1)) {
-                                spin_unlock(&obd_dev_lock);
-                                return obd;
-                        }
-                }
-        }
-        spin_unlock(&obd_dev_lock);
-
-        return NULL;
-}
-
-struct obd_device *class_find_client_notype(struct obd_uuid *tgt_uuid,
-                                            struct obd_uuid *grp_uuid)
-{
-        struct obd_device *obd;
-
-        obd = class_find_client_obd(tgt_uuid, LUSTRE_MDC_NAME, NULL);
-        if (!obd)
-                obd = class_find_client_obd(tgt_uuid, LUSTRE_OSC_NAME,
-                                            grp_uuid);
-        return obd;
-}
-
-/* Iterate the obd_device list looking devices have grp_uuid. Start
-   searching at *next, and if a device is found, the next index to look
-   at is saved in *next. If next is NULL, then the first matching device
-   will always be returned. */
-struct obd_device * class_devices_in_group(struct obd_uuid *grp_uuid, int *next)
-{
-        int i;
-
-        if (next == NULL)
-                i = 0;
-        else if (*next >= 0 && *next < class_devno_max())
-                i = *next;
-        else
-                return NULL;
-
-        spin_lock(&obd_dev_lock);
-        for (; i < class_devno_max(); i++) {
-                struct obd_device *obd = class_num2obd(i);
-                if (obd == NULL)
-                        continue;
-                if (obd_uuid_equals(grp_uuid, &obd->obd_uuid)) {
-                        if (next != NULL)
-                                *next = i+1;
-                        spin_unlock(&obd_dev_lock);
-                        return obd;
-                }
-        }
-        spin_unlock(&obd_dev_lock);
-
-        return NULL;
-}
-
-
-void obd_cleanup_caches(void)
-{
-        int rc;
-
-        ENTRY;
-        if (obd_device_cachep) {
-                rc = cfs_mem_cache_destroy(obd_device_cachep);
-                LASSERTF(rc == 0, "Cannot destropy ll_obd_device_cache: rc %d\n", rc);
-                obd_device_cachep = NULL;
-        }
-        if (obdo_cachep) {
-                rc = cfs_mem_cache_destroy(obdo_cachep);
-                LASSERTF(rc == 0, "Cannot destory ll_obdo_cache\n");
-                obdo_cachep = NULL;
-        }
-        if (import_cachep) {
-                rc = cfs_mem_cache_destroy(import_cachep);
-                LASSERTF(rc == 0, "Cannot destory ll_import_cache\n");
-                import_cachep = NULL;
-        }
-        EXIT;
-}
-
-int obd_init_caches(void)
-{
-        ENTRY;
-
-        LASSERT(obd_device_cachep == NULL);
-        obd_device_cachep = cfs_mem_cache_create("ll_obd_dev_cache",
-                                                 sizeof(struct obd_device), 
-                                                 0, 0);
-        if (!obd_device_cachep)
-                GOTO(out, -ENOMEM);
-
-        LASSERT(obdo_cachep == NULL);
-        obdo_cachep = cfs_mem_cache_create("ll_obdo_cache", sizeof(struct obdo),
-                                           0, 0);
-        if (!obdo_cachep)
-                GOTO(out, -ENOMEM);
-
-        LASSERT(import_cachep == NULL);
-        import_cachep = cfs_mem_cache_create("ll_import_cache",
-                                             sizeof(struct obd_import),
-                                             0, 0);
-        if (!import_cachep)
-                GOTO(out, -ENOMEM);
-
-        RETURN(0);
- out:
-        obd_cleanup_caches();
-        RETURN(-ENOMEM);
-
-}
-
-/* map connection to client */
-struct obd_export *class_conn2export(struct lustre_handle *conn)
-{
-        struct obd_export *export;
-        ENTRY;
-
-        if (!conn) {
-                CDEBUG(D_CACHE, "looking for null handle\n");
-                RETURN(NULL);
-        }
-
-        if (conn->cookie == -1) {  /* this means assign a new connection */
-                CDEBUG(D_CACHE, "want a new connection\n");
-                RETURN(NULL);
-        }
-
-        CDEBUG(D_INFO, "looking for export cookie "LPX64"\n", conn->cookie);
-        export = class_handle2object(conn->cookie);
-        RETURN(export);
-}
-
-struct obd_device *class_exp2obd(struct obd_export *exp)
-{
-        if (exp)
-                return exp->exp_obd;
-        return NULL;
-}
-
-struct obd_device *class_conn2obd(struct lustre_handle *conn)
-{
-        struct obd_export *export;
-        export = class_conn2export(conn);
-        if (export) {
-                struct obd_device *obd = export->exp_obd;
-                class_export_put(export);
-                return obd;
-        }
-        return NULL;
-}
-
-struct obd_import *class_exp2cliimp(struct obd_export *exp)
-{
-        struct obd_device *obd = exp->exp_obd;
-        if (obd == NULL)
-                return NULL;
-        return obd->u.cli.cl_import;
-}
-
-struct obd_import *class_conn2cliimp(struct lustre_handle *conn)
-{
-        struct obd_device *obd = class_conn2obd(conn);
-        if (obd == NULL)
-                return NULL;
-        return obd->u.cli.cl_import;
-}
-
-/* Export management functions */
-static void export_handle_addref(void *export)
-{
-        class_export_get(export);
-}
-
-void __class_export_put(struct obd_export *exp)
-{
-        if (atomic_dec_and_test(&exp->exp_refcount)) {
-                LASSERT (list_empty(&exp->exp_obd_chain));
-
-                CDEBUG(D_IOCTL, "final put %p/%s\n",
-                       exp, exp->exp_client_uuid.uuid);
-        
-                spin_lock(&obd_zombie_impexp_lock);
-                list_add(&exp->exp_obd_chain, &obd_zombie_exports);
-                spin_unlock(&obd_zombie_impexp_lock);
-
-                if (obd_zombie_impexp_notify != NULL)
-                        obd_zombie_impexp_notify();
-        }
-}
-EXPORT_SYMBOL(__class_export_put);
-
-void class_export_destroy(struct obd_export *exp)
-{
-        struct obd_device *obd = exp->exp_obd;
-
-        LASSERT (atomic_read(&exp->exp_refcount) == 0);
-
-        CDEBUG(D_IOCTL, "destroying export %p/%s\n", exp,
-               exp->exp_client_uuid.uuid);
-
-        LASSERT(obd != NULL);
-
-        /* "Local" exports (lctl, LOV->{mdc,osc}) have no connection. */
-        if (exp->exp_connection)
-                ptlrpc_put_connection_superhack(exp->exp_connection);
-
-        LASSERT(list_empty(&exp->exp_outstanding_replies));
-        obd_destroy_export(exp);
-
-        OBD_FREE_RCU(exp, sizeof(*exp), &exp->exp_handle);
-        class_decref(obd);
-}
-
-/* Creates a new export, adds it to the hash table, and returns a
- * pointer to it. The refcount is 2: one for the hash reference, and
- * one for the pointer returned by this function. */
-struct obd_export *class_new_export(struct obd_device *obd,
-                                    struct obd_uuid *cluuid)
-{
-        struct obd_export *export;
-        int rc = 0;
-
-        OBD_ALLOC(export, sizeof(*export));
-        if (!export)
-                return ERR_PTR(-ENOMEM);
-
-        export->exp_conn_cnt = 0;
-        atomic_set(&export->exp_refcount, 2);
-        atomic_set(&export->exp_rpc_count, 0);
-        export->exp_obd = obd;
-        CFS_INIT_LIST_HEAD(&export->exp_outstanding_replies);
-        /* XXX this should be in LDLM init */
-        CFS_INIT_LIST_HEAD(&export->exp_ldlm_data.led_held_locks);
-        spin_lock_init(&export->exp_ldlm_data.led_lock);
-
-        CFS_INIT_LIST_HEAD(&export->exp_handle.h_link);
-        class_handle_hash(&export->exp_handle, export_handle_addref);
-        export->exp_last_request_time = cfs_time_current_sec();
-        spin_lock_init(&export->exp_lock);
-        INIT_HLIST_NODE(&export->exp_uuid_hash);
-        INIT_HLIST_NODE(&export->exp_nid_hash);
-
-        export->exp_client_uuid = *cluuid;
-        obd_init_export(export);
-
-        if (!obd_uuid_equals(cluuid, &obd->obd_uuid)) {
-               rc = lustre_hash_additem_unique(obd->obd_uuid_hash_body, cluuid, 
-                                               &export->exp_uuid_hash);
-               if (rc != 0) {
-                       CWARN("%s: denying duplicate export for %s\n",
-                             obd->obd_name, cluuid->uuid);
-                       class_handle_unhash(&export->exp_handle);
-                       OBD_FREE_PTR(export);
-                       return ERR_PTR(-EALREADY);
-               }
-        }
-
-        spin_lock(&obd->obd_dev_lock);
-        LASSERT(!obd->obd_stopping); /* shouldn't happen, but might race */
-        class_incref(obd);
-        list_add(&export->exp_obd_chain, &export->exp_obd->obd_exports);
-        list_add_tail(&export->exp_obd_chain_timed,
-                      &export->exp_obd->obd_exports_timed);
-        export->exp_obd->obd_num_exports++;
-        spin_unlock(&obd->obd_dev_lock);
-
-        return export;
-}
-EXPORT_SYMBOL(class_new_export);
-
-void class_unlink_export(struct obd_export *exp)
-{
-        class_handle_unhash(&exp->exp_handle);
-
-        spin_lock(&exp->exp_obd->obd_dev_lock);
-        /* delete an uuid-export hashitem from hashtables */
-        if (!hlist_unhashed(&exp->exp_uuid_hash)) {
-                lustre_hash_delitem(exp->exp_obd->obd_uuid_hash_body, 
-                                    &exp->exp_client_uuid, &exp->exp_uuid_hash);
-        }
-        list_del_init(&exp->exp_obd_chain);
-        list_del_init(&exp->exp_obd_chain_timed);
-        exp->exp_obd->obd_num_exports--;
-        spin_unlock(&exp->exp_obd->obd_dev_lock);
-
-        class_export_put(exp);
-}
-EXPORT_SYMBOL(class_unlink_export);
-
-/* Import management functions */
-static void import_handle_addref(void *import)
-{
-        class_import_get(import);
-}
-
-struct obd_import *class_import_get(struct obd_import *import)
-{
-        LASSERT(atomic_read(&import->imp_refcount) >= 0);
-        LASSERT(atomic_read(&import->imp_refcount) < 0x5a5a5a);
-        atomic_inc(&import->imp_refcount);
-        CDEBUG(D_INFO, "import %p refcount=%d\n", import,
-               atomic_read(&import->imp_refcount));
-        return import;
-}
-EXPORT_SYMBOL(class_import_get);
-
-void class_import_put(struct obd_import *import)
-{
-        ENTRY;
-
-        CDEBUG(D_INFO, "import %p refcount=%d\n", import,
-               atomic_read(&import->imp_refcount) - 1);
-
-        LASSERT(atomic_read(&import->imp_refcount) > 0);
-        LASSERT(atomic_read(&import->imp_refcount) < 0x5a5a5a);
-        LASSERT(list_empty(&import->imp_zombie_chain));
-
-        if (atomic_dec_and_test(&import->imp_refcount)) {
-
-                CDEBUG(D_INFO, "final put import %p\n", import);
-                
-                spin_lock(&obd_zombie_impexp_lock);
-                list_add(&import->imp_zombie_chain, &obd_zombie_imports);
-                spin_unlock(&obd_zombie_impexp_lock);
-
-                if (obd_zombie_impexp_notify != NULL)
-                        obd_zombie_impexp_notify();
-        }
-
-        EXIT;
-}
-
-void class_import_destroy(struct obd_import *import)
-{
-        ENTRY;
-        
-        CDEBUG(D_IOCTL, "destroying import %p\n", import);
-
-        LASSERT(atomic_read(&import->imp_refcount) == 0);
-
-        ptlrpc_put_connection_superhack(import->imp_connection);
-
-        while (!list_empty(&import->imp_conn_list)) {
-                struct obd_import_conn *imp_conn;
-
-                imp_conn = list_entry(import->imp_conn_list.next,
-                                      struct obd_import_conn, oic_item);
-                list_del(&imp_conn->oic_item);
-                ptlrpc_put_connection_superhack(imp_conn->oic_conn);
-                OBD_FREE(imp_conn, sizeof(*imp_conn));
-        }
-
-        class_decref(import->imp_obd);
-        OBD_FREE_RCU(import, sizeof(*import), &import->imp_handle);
-        EXIT;
-}
-EXPORT_SYMBOL(class_import_put);
-
-static void init_imp_at(struct imp_at *at) {
-        int i;
-        at_init(&at->iat_net_latency, 0, 0);
-        for (i = 0; i < IMP_AT_MAX_PORTALS; i++) {
-                /* max service estimates are tracked on the server side, so
-                   don't use the AT history here, just use the last reported
-                   val. (But keep hist for proc histogram, worst_ever) */
-                at_init(&at->iat_service_estimate[i], INITIAL_CONNECT_TIMEOUT,
-                        AT_FLG_NOHIST);
-        }
-}
-
-struct obd_import *class_new_import(struct obd_device *obd)
-{
-        struct obd_import *imp;
-
-        OBD_ALLOC(imp, sizeof(*imp));
-        if (imp == NULL)
-                return NULL;
-
-        CFS_INIT_LIST_HEAD(&imp->imp_zombie_chain);
-        CFS_INIT_LIST_HEAD(&imp->imp_replay_list);
-        CFS_INIT_LIST_HEAD(&imp->imp_sending_list);
-        CFS_INIT_LIST_HEAD(&imp->imp_delayed_list);
-        spin_lock_init(&imp->imp_lock);
-        imp->imp_last_success_conn = 0;
-        imp->imp_state = LUSTRE_IMP_NEW;
-        imp->imp_obd = class_incref(obd);
-        cfs_waitq_init(&imp->imp_recovery_waitq);
-
-        atomic_set(&imp->imp_refcount, 2);
-        atomic_set(&imp->imp_inflight, 0);
-        atomic_set(&imp->imp_replay_inflight, 0);
-        atomic_set(&imp->imp_inval_count, 0);
-        CFS_INIT_LIST_HEAD(&imp->imp_conn_list);
-        CFS_INIT_LIST_HEAD(&imp->imp_handle.h_link);
-        class_handle_hash(&imp->imp_handle, import_handle_addref);
-        init_imp_at(&imp->imp_at);
-
-#ifdef HAVE_DEFAULT_V2_CONNECT
-        /* the default magic is V2, will be used in connect RPC, and
-         * then adjusted according to the flags in request/reply. */
-        imp->imp_msg_magic = LUSTRE_MSG_MAGIC_V2;
-#else
-        /* the default magic is V1, will be used in connect RPC, and
-         * then adjusted according to the flags in request/reply. */
-        imp->imp_msg_magic = LUSTRE_MSG_MAGIC_V1;
-#endif
-
-        return imp;
-}
-EXPORT_SYMBOL(class_new_import);
-
-void class_destroy_import(struct obd_import *import)
-{
-        LASSERT(import != NULL);
-        LASSERT(import != LP_POISON);
-
-        class_handle_unhash(&import->imp_handle);
-
-        spin_lock(&import->imp_lock);
-        import->imp_generation++;
-        spin_unlock(&import->imp_lock);
-
-        class_import_put(import);
-}
-EXPORT_SYMBOL(class_destroy_import);
-
-/* A connection defines an export context in which preallocation can
-   be managed. This releases the export pointer reference, and returns
-   the export handle, so the export refcount is 1 when this function
-   returns. */
-int class_connect(struct lustre_handle *conn, struct obd_device *obd,
-                  struct obd_uuid *cluuid)
-{
-        struct obd_export *export;
-        LASSERT(conn != NULL);
-        LASSERT(obd != NULL);
-        LASSERT(cluuid != NULL);
-        ENTRY;
-
-        export = class_new_export(obd, cluuid);
-        if (IS_ERR(export))
-                RETURN(PTR_ERR(export));
-
-        conn->cookie = export->exp_handle.h_cookie;
-        class_export_put(export);
-
-        CDEBUG(D_IOCTL, "connect: client %s, cookie "LPX64"\n",
-               cluuid->uuid, conn->cookie);
-        RETURN(0);
-}
-EXPORT_SYMBOL(class_connect);
-
-/* This function removes two references from the export: one for the
- * hash entry and one for the export pointer passed in.  The export
- * pointer passed to this function is destroyed should not be used
- * again. */
-int class_disconnect(struct obd_export *export)
-{
-        int already_disconnected;
-        ENTRY;
-
-        if (export == NULL) {
-                fixme();
-                CDEBUG(D_IOCTL, "attempting to free NULL export %p\n", export);
-                RETURN(-EINVAL);
-        }
-
-        spin_lock(&export->exp_lock);
-        already_disconnected = export->exp_disconnected;
-        export->exp_disconnected = 1;
-
-        if (!hlist_unhashed(&export->exp_nid_hash)) {
-                lustre_hash_delitem(export->exp_obd->obd_nid_hash_body,
-                                    &export->exp_connection->c_peer.nid, &export->exp_nid_hash);
-        }
-        spin_unlock(&export->exp_lock);
-
-        /* class_cleanup(), abort_recovery(), and class_fail_export()
-         * all end up in here, and if any of them race we shouldn't
-         * call extra class_export_puts(). */
-        if (already_disconnected)
-                RETURN(0);
-
-        CDEBUG(D_IOCTL, "disconnect: cookie "LPX64"\n",
-               export->exp_handle.h_cookie);
-
-        class_unlink_export(export);
-        class_export_put(export);
-        RETURN(0);
-}
-
-static void class_disconnect_export_list(struct list_head *list, int flags)
-{
-        int rc;
-        struct lustre_handle fake_conn;
-        struct obd_export *fake_exp, *exp;
-        ENTRY;
-
-        /* It's possible that an export may disconnect itself, but
-         * nothing else will be added to this list. */
-        while (!list_empty(list)) {
-                exp = list_entry(list->next, struct obd_export, exp_obd_chain);
-                class_export_get(exp);
-
-                spin_lock(&exp->exp_lock);
-                exp->exp_flags = flags;
-                spin_unlock(&exp->exp_lock);
-
-                if (obd_uuid_equals(&exp->exp_client_uuid,
-                                    &exp->exp_obd->obd_uuid)) {
-                        CDEBUG(D_HA,
-                               "exp %p export uuid == obd uuid, don't discon\n",
-                               exp);
-                        /* Need to delete this now so we don't end up pointing
-                         * to work_list later when this export is cleaned up. */
-                        list_del_init(&exp->exp_obd_chain);
-                        class_export_put(exp);
-                        continue;
-                }
-
-                fake_conn.cookie = exp->exp_handle.h_cookie;
-                fake_exp = class_conn2export(&fake_conn);
-                if (!fake_exp) {
-                        class_export_put(exp);
-                        continue;
-                }
-
-                spin_lock(&fake_exp->exp_lock);
-                fake_exp->exp_flags = flags;
-                spin_unlock(&fake_exp->exp_lock);
-
-                CDEBUG(D_HA, "%s: disconnecting export at %s (%p), "
-                       "last request at %ld\n",
-                       exp->exp_obd->obd_name, obd_export_nid2str(exp),
-                       exp, exp->exp_last_request_time);
-                rc = obd_disconnect(fake_exp);
-                class_export_put(exp);
-        }
-        EXIT;
-}
-
-static inline int get_exp_flags_from_obd(struct obd_device *obd)
-{
-        return ((obd->obd_fail ? OBD_OPT_FAILOVER : 0) |
-                (obd->obd_force ? OBD_OPT_FORCE : 0));
-}
-
-void class_disconnect_exports(struct obd_device *obd)
-{
-        struct list_head work_list;
-        ENTRY;
-
-        /* Move all of the exports from obd_exports to a work list, en masse. */
-        spin_lock(&obd->obd_dev_lock);
-        list_add(&work_list, &obd->obd_exports);
-        list_del_init(&obd->obd_exports);
-        spin_unlock(&obd->obd_dev_lock);
-
-        CDEBUG(D_HA, "OBD device %d (%p) has exports, "
-               "disconnecting them\n", obd->obd_minor, obd);
-        class_disconnect_export_list(&work_list, get_exp_flags_from_obd(obd));
-        EXIT;
-}
-EXPORT_SYMBOL(class_disconnect_exports);
-
-/* Remove exports that have not completed recovery.
- */
-void class_disconnect_stale_exports(struct obd_device *obd)
-{
-        struct list_head work_list;
-        struct list_head *pos, *n;
-        struct obd_export *exp;
-        int cnt = 0;
-        ENTRY;
-
-        CFS_INIT_LIST_HEAD(&work_list);
-        spin_lock(&obd->obd_dev_lock);
-        list_for_each_safe(pos, n, &obd->obd_exports) {
-                exp = list_entry(pos, struct obd_export, exp_obd_chain);
-                if (exp->exp_replay_needed) {
-                        list_del(&exp->exp_obd_chain);
-                        list_add(&exp->exp_obd_chain, &work_list);
-                        cnt++;
-                }
-        }
-        spin_unlock(&obd->obd_dev_lock);
-
-        CDEBUG(D_ERROR, "%s: disconnecting %d stale clients\n",
-               obd->obd_name, cnt);
-        class_disconnect_export_list(&work_list, get_exp_flags_from_obd(obd));
-        EXIT;
-}
-EXPORT_SYMBOL(class_disconnect_stale_exports);
-
-int oig_init(struct obd_io_group **oig_out)
-{
-        struct obd_io_group *oig;
-        ENTRY;
-
-        OBD_ALLOC(oig, sizeof(*oig));
-        if (oig == NULL)
-                RETURN(-ENOMEM);
-
-        spin_lock_init(&oig->oig_lock);
-        oig->oig_rc = 0;
-        oig->oig_pending = 0;
-        atomic_set(&oig->oig_refcount, 1);
-        cfs_waitq_init(&oig->oig_waitq);
-        CFS_INIT_LIST_HEAD(&oig->oig_occ_list);
-
-        *oig_out = oig;
-        RETURN(0);
-};
-EXPORT_SYMBOL(oig_init);
-
-static inline void oig_grab(struct obd_io_group *oig)
-{
-        atomic_inc(&oig->oig_refcount);
-}
-
-void oig_release(struct obd_io_group *oig)
-{
-        if (atomic_dec_and_test(&oig->oig_refcount))
-                OBD_FREE(oig, sizeof(*oig));
-}
-EXPORT_SYMBOL(oig_release);
-
-int oig_add_one(struct obd_io_group *oig, struct oig_callback_context *occ)
-{
-        int rc = 0;
-        CDEBUG(D_CACHE, "oig %p ready to roll\n", oig);
-        spin_lock(&oig->oig_lock);
-        if (oig->oig_rc) {
-                rc = oig->oig_rc;
-        } else {
-                oig->oig_pending++;
-                if (occ != NULL)
-                        list_add_tail(&occ->occ_oig_item, &oig->oig_occ_list);
-        }
-        spin_unlock(&oig->oig_lock);
-        oig_grab(oig);
-
-        return rc;
-}
-EXPORT_SYMBOL(oig_add_one);
-
-void oig_complete_one(struct obd_io_group *oig,
-                      struct oig_callback_context *occ, int rc)
-{
-        cfs_waitq_t *wake = NULL;
-        int old_rc;
-
-        spin_lock(&oig->oig_lock);
-
-        if (occ != NULL)
-                list_del_init(&occ->occ_oig_item);
-
-        old_rc = oig->oig_rc;
-        if (oig->oig_rc == 0 && rc != 0)
-                oig->oig_rc = rc;
-
-        if (--oig->oig_pending <= 0)
-                wake = &oig->oig_waitq;
-
-        spin_unlock(&oig->oig_lock);
-
-        CDEBUG(D_CACHE, "oig %p completed, rc %d -> %d via %d, %d now "
-                        "pending (racey)\n", oig, old_rc, oig->oig_rc, rc,
-                        oig->oig_pending);
-        if (wake)
-                cfs_waitq_signal(wake);
-        oig_release(oig);
-}
-EXPORT_SYMBOL(oig_complete_one);
-
-static int oig_done(struct obd_io_group *oig)
-{
-        int rc = 0;
-        spin_lock(&oig->oig_lock);
-        if (oig->oig_pending <= 0)
-                rc = 1;
-        spin_unlock(&oig->oig_lock);
-        return rc;
-}
-
-static void interrupted_oig(void *data)
-{
-        struct obd_io_group *oig = data;
-        struct oig_callback_context *occ;
-
-        spin_lock(&oig->oig_lock);
-        /* We need to restart the processing each time we drop the lock, as
-         * it is possible other threads called oig_complete_one() to remove
-         * an entry elsewhere in the list while we dropped lock.  We need to
-         * drop the lock because osc_ap_completion() calls oig_complete_one()
-         * which re-gets this lock ;-) as well as a lock ordering issue. */
-restart:
-        list_for_each_entry(occ, &oig->oig_occ_list, occ_oig_item) {
-                if (occ->interrupted)
-                        continue;
-                occ->interrupted = 1;
-                spin_unlock(&oig->oig_lock);
-                occ->occ_interrupted(occ);
-                spin_lock(&oig->oig_lock);
-                goto restart;
-        }
-        spin_unlock(&oig->oig_lock);
-}
-
-int oig_wait(struct obd_io_group *oig)
-{
-        struct l_wait_info lwi = LWI_INTR(interrupted_oig, oig);
-        int rc;
-
-        CDEBUG(D_CACHE, "waiting for oig %p\n", oig);
-
-        do {
-                rc = l_wait_event(oig->oig_waitq, oig_done(oig), &lwi);
-                LASSERTF(rc == 0 || rc == -EINTR, "rc: %d\n", rc);
-                /* we can't continue until the oig has emptied and stopped
-                 * referencing state that the caller will free upon return */
-                if (rc == -EINTR)
-                        lwi = (struct l_wait_info){ 0, };
-        } while (rc == -EINTR);
-
-        LASSERTF(oig->oig_pending == 0,
-                 "exiting oig_wait(oig = %p) with %d pending\n", oig,
-                 oig->oig_pending);
-
-        CDEBUG(D_CACHE, "done waiting on oig %p rc %d\n", oig, oig->oig_rc);
-        return oig->oig_rc;
-}
-EXPORT_SYMBOL(oig_wait);
-
-void class_fail_export(struct obd_export *exp)
-{
-        int rc, already_failed;
-
-        spin_lock(&exp->exp_lock);
-        already_failed = exp->exp_failed;
-        exp->exp_failed = 1;
-        spin_unlock(&exp->exp_lock);
-
-        if (already_failed) {
-                CDEBUG(D_HA, "disconnecting dead export %p/%s; skipping\n",
-                       exp, exp->exp_client_uuid.uuid);
-                return;
-        }
-
-        CDEBUG(D_HA, "disconnecting export %p/%s\n",
-               exp, exp->exp_client_uuid.uuid);
-
-        if (obd_dump_on_timeout)
-                libcfs_debug_dumplog();
-
-        /* Most callers into obd_disconnect are removing their own reference
-         * (request, for example) in addition to the one from the hash table.
-         * We don't have such a reference here, so make one. */
-        class_export_get(exp);
-        rc = obd_disconnect(exp);
-        if (rc)
-                CERROR("disconnecting export %p failed: %d\n", exp, rc);
-        else
-                CDEBUG(D_HA, "disconnected export %p/%s\n",
-                       exp, exp->exp_client_uuid.uuid);
-}
-EXPORT_SYMBOL(class_fail_export);
-
-char *obd_export_nid2str(struct obd_export *exp)
-{
-        if (exp->exp_connection != NULL)
-                return libcfs_nid2str(exp->exp_connection->c_peer.nid);
-        
-        return "(no nid)";
-}
-EXPORT_SYMBOL(obd_export_nid2str);
-
-int obd_export_evict_by_nid(struct obd_device *obd, char *nid)
-{
-        struct obd_export *doomed_exp = NULL;
-        int exports_evicted = 0;
-
-        lnet_nid_t nid_key = libcfs_str2nid(nid);
-
-        do {
-                doomed_exp = lustre_hash_get_object_by_key(obd->obd_nid_hash_body,
-                                                           &nid_key);
-
-                if (doomed_exp == NULL)
-                        break;
-
-                LASSERTF(doomed_exp->exp_connection->c_peer.nid == nid_key,
-                         "nid %s found, wanted nid %s, requested nid %s\n",
-                         obd_export_nid2str(doomed_exp),
-                         libcfs_nid2str(nid_key), nid);
-        
-                exports_evicted++;
-                CDEBUG(D_HA, "%s: evict NID '%s' (%s) #%d at adminstrative request\n",
-                       obd->obd_name, nid, doomed_exp->exp_client_uuid.uuid,
-                       exports_evicted);
-                class_fail_export(doomed_exp);
-                class_export_put(doomed_exp);
-        } while (1);
-
-        if (!exports_evicted)
-                CDEBUG(D_HA,"%s: can't disconnect NID '%s': no exports found\n",
-                       obd->obd_name, nid);
-        return exports_evicted;
-}
-EXPORT_SYMBOL(obd_export_evict_by_nid);
-
-int obd_export_evict_by_uuid(struct obd_device *obd, char *uuid)
-{
-        struct obd_export *doomed_exp = NULL;
-        struct obd_uuid doomed;
-        int exports_evicted = 0;
-
-        obd_str2uuid(&doomed, uuid);
-        if(obd_uuid_equals(&doomed, &obd->obd_uuid)) {
-                CERROR("%s: can't evict myself\n", obd->obd_name);
-                return exports_evicted;
-        }
-
-        doomed_exp = lustre_hash_get_object_by_key(obd->obd_uuid_hash_body, 
-                                                   &doomed);
-
-        if (doomed_exp == NULL) {
-                CERROR("%s: can't disconnect %s: no exports found\n",
-                       obd->obd_name, uuid);
-        } else {
-                CWARN("%s: evicting %s at adminstrative request\n",
-                       obd->obd_name, doomed_exp->exp_client_uuid.uuid);
-                class_fail_export(doomed_exp);
-                class_export_put(doomed_exp);
-                exports_evicted++;
-        }
-
-        return exports_evicted;
-}
-EXPORT_SYMBOL(obd_export_evict_by_uuid);
-
-void obd_zombie_impexp_cull(void) 
-{
-        struct obd_import *import;
-        struct obd_export *export;
-        
-        do {
-                spin_lock (&obd_zombie_impexp_lock);
-
-                import = NULL;
-                if (!list_empty(&obd_zombie_imports)) {
-                        import = list_entry(obd_zombie_imports.next,
-                                            struct obd_import,
-                                            imp_zombie_chain);
-                        list_del(&import->imp_zombie_chain);
-                }
-                
-                export = NULL;
-                if (!list_empty(&obd_zombie_exports)) {
-                        export = list_entry(obd_zombie_exports.next,
-                                            struct obd_export,
-                                            exp_obd_chain);
-                        list_del_init(&export->exp_obd_chain);
-                }
-
-                spin_unlock(&obd_zombie_impexp_lock);
-                
-                if (import != NULL)
-                        class_import_destroy(import);
-
-                if (export != NULL)
-                        class_export_destroy(export);
-
-        } while (import != NULL || export != NULL);
-}
-EXPORT_SYMBOL(obd_zombie_impexp_cull);
-
-void obd_zombie_impexp_init(void)
-{
-        CFS_INIT_LIST_HEAD(&obd_zombie_imports);
-        CFS_INIT_LIST_HEAD(&obd_zombie_exports);
-        spin_lock_init(&obd_zombie_impexp_lock);
-}
diff --git a/lustre/obdclass/linux/.cvsignore b/lustre/obdclass/linux/.cvsignore
deleted file mode 100644
index 13e3fc445ed0deb51b239256eb0d328cd32daba9..0000000000000000000000000000000000000000
--- a/lustre/obdclass/linux/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-.linux-module.o.cmd
-.linux-obdo.o.cmd
-.linux-sysctl.o.cmd
diff --git a/lustre/obdclass/linux/Makefile.am b/lustre/obdclass/linux/Makefile.am
deleted file mode 100644
index bf958927616a85706de7cc941fd1dcd02e5f9cc7..0000000000000000000000000000000000000000
--- a/lustre/obdclass/linux/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-EXTRA_DIST :=                   \
-        linux-module.c        	\
-	linux-sysctl.c          \
-	linux-obdo.c
diff --git a/lustre/obdclass/linux/linux-module.c b/lustre/obdclass/linux/linux-module.c
deleted file mode 100644
index c9807f521c62abdae66f8e9b0d790c22bbeaec49..0000000000000000000000000000000000000000
--- a/lustre/obdclass/linux/linux-module.c
+++ /dev/null
@@ -1,431 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Object Devices Class Driver
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * These are the only exported functions, they provide some generic
- * infrastructure for managing object devices
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#ifdef __KERNEL__
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h> /* for CONFIG_PROC_FS */
-#endif
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/major.h>
-#include <linux/sched.h>
-#include <linux/lp.h>
-#include <linux/slab.h>
-#include <linux/ioport.h>
-#include <linux/fcntl.h>
-#include <linux/delay.h>
-#include <linux/skbuff.h>
-#include <linux/proc_fs.h>
-#include <linux/fs.h>
-#include <linux/poll.h>
-#include <linux/init.h>
-#include <linux/list.h>
-#include <linux/highmem.h>
-#include <asm/io.h>
-#include <asm/ioctls.h>
-#include <asm/system.h>
-#include <asm/poll.h>
-#include <asm/uaccess.h>
-#include <linux/miscdevice.h>
-#include <linux/smp_lock.h>
-#include <linux/seq_file.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <libcfs/libcfs.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include <lustre_ver.h>
-#include <lustre/lustre_build_version.h>
-#ifdef __KERNEL__
-#include <linux/lustre_version.h>
-
-int proc_version;
-
-/* buffer MUST be at least the size of obd_ioctl_hdr */
-int obd_ioctl_getdata(char **buf, int *len, void *arg)
-{
-        struct obd_ioctl_hdr hdr;
-        struct obd_ioctl_data *data;
-        int err;
-        int offset = 0;
-        ENTRY;
-
-        err = copy_from_user(&hdr, (void *)arg, sizeof(hdr));
-        if ( err ) 
-                RETURN(err);
-
-        if (hdr.ioc_version != OBD_IOCTL_VERSION) {
-                CERROR("Version mismatch kernel (%x) vs application (%x)\n",
-                       OBD_IOCTL_VERSION, hdr.ioc_version);
-                RETURN(-EINVAL);
-        }
-
-        if (hdr.ioc_len > OBD_MAX_IOCTL_BUFFER) {
-                CERROR("User buffer len %d exceeds %d max buffer\n",
-                       hdr.ioc_len, OBD_MAX_IOCTL_BUFFER);
-                RETURN(-EINVAL);
-        }
-
-        if (hdr.ioc_len < sizeof(struct obd_ioctl_data)) {
-                CERROR("User buffer too small for ioctl (%d)\n", hdr.ioc_len);
-                RETURN(-EINVAL);
-        }
-
-        /* XXX allocate this more intelligently, using kmalloc when
-         * appropriate */
-        OBD_VMALLOC(*buf, hdr.ioc_len);
-        if (*buf == NULL) {
-                CERROR("Cannot allocate control buffer of len %d\n",
-                       hdr.ioc_len);
-                RETURN(-EINVAL);
-        }
-        *len = hdr.ioc_len;
-        data = (struct obd_ioctl_data *)*buf;
-
-        err = copy_from_user(*buf, (void *)arg, hdr.ioc_len);
-        if ( err ) {
-                OBD_VFREE(*buf, hdr.ioc_len);
-                RETURN(err);
-        }
-
-        if (obd_ioctl_is_invalid(data)) {
-                CERROR("ioctl not correctly formatted\n");
-                OBD_VFREE(*buf, hdr.ioc_len);
-                RETURN(-EINVAL);
-        }
-
-        if (data->ioc_inllen1) {
-                data->ioc_inlbuf1 = &data->ioc_bulk[0];
-                offset += size_round(data->ioc_inllen1);
-        }
-
-        if (data->ioc_inllen2) {
-                data->ioc_inlbuf2 = &data->ioc_bulk[0] + offset;
-                offset += size_round(data->ioc_inllen2);
-        }
-
-        if (data->ioc_inllen3) {
-                data->ioc_inlbuf3 = &data->ioc_bulk[0] + offset;
-                offset += size_round(data->ioc_inllen3);
-        }
-
-        if (data->ioc_inllen4) {
-                data->ioc_inlbuf4 = &data->ioc_bulk[0] + offset;
-        }
-
-        EXIT;
-        return 0;
-}
-
-int obd_ioctl_popdata(void *arg, void *data, int len)
-{
-        int err; 
-        
-        err = copy_to_user(arg, data, len);
-        if (err)
-                err = -EFAULT;
-        return err;
-}
-
-EXPORT_SYMBOL(obd_ioctl_getdata);
-EXPORT_SYMBOL(obd_ioctl_popdata);
-
-#define OBD_MINOR 241
-extern struct cfs_psdev_ops          obd_psdev_ops;
-
-/*  opening /dev/obd */
-static int obd_class_open(struct inode * inode, struct file * file)
-{
-        if (obd_psdev_ops.p_open != NULL)
-                return obd_psdev_ops.p_open(0, NULL);
-        return -EPERM;
-}
-
-/*  closing /dev/obd */
-static int obd_class_release(struct inode * inode, struct file * file)
-{
-        if (obd_psdev_ops.p_close != NULL)
-                return obd_psdev_ops.p_close(0, NULL);
-        return -EPERM;
-}
-
-/* to control /dev/obd */
-static int obd_class_ioctl(struct inode *inode, struct file *filp,
-                           unsigned int cmd, unsigned long arg)
-{
-        int err = 0;
-        ENTRY;
-
-        if (current->fsuid != 0)
-                RETURN(err = -EACCES);
-        if ((cmd & 0xffffff00) == ((int)'T') << 8) /* ignore all tty ioctls */
-                RETURN(err = -ENOTTY);
-
-        if (obd_psdev_ops.p_ioctl != NULL)
-                err = obd_psdev_ops.p_ioctl(NULL, cmd, (void *)arg);
-        else
-                err = -EPERM;
-
-        RETURN(err);
-}
-
-/* declare character device */
-static struct file_operations obd_psdev_fops = {
-        .owner   = THIS_MODULE,
-        .ioctl   = obd_class_ioctl,     /* ioctl */
-        .open    = obd_class_open,      /* open */
-        .release = obd_class_release,   /* release */
-};
-
-/* modules setup */
-cfs_psdev_t obd_psdev = {
-        .minor = OBD_MINOR,
-        .name  = "obd_psdev",
-        .fops  = &obd_psdev_fops,
-};
-
-#endif
-
-#ifdef LPROCFS
-int obd_proc_read_version(char *page, char **start, off_t off, int count,
-                          int *eof, void *data)
-{
-        *eof = 1;
-#ifdef HAVE_VFS_INTENT_PATCHES
-        return snprintf(page, count, "lustre: %s\nkernel: %u\nbuild:  %s\n",
-                        LUSTRE_VERSION_STRING, LUSTRE_KERNEL_VERSION,
-                        BUILD_VERSION);
-#else
-        return snprintf(page, count, "lustre: %s\nkernel: %s\nbuild:  %s\n",
-                        LUSTRE_VERSION_STRING, "patchless", BUILD_VERSION);
-#endif
-}
-
-int obd_proc_read_pinger(char *page, char **start, off_t off, int count,
-                         int *eof, void *data)
-{
-        *eof = 1;
-        return snprintf(page, count, "%s\n",
-#ifdef ENABLE_PINGER
-                        "on"
-#else
-                        "off"
-#endif
-                       );
-}
-
-static int obd_proc_read_health(char *page, char **start, off_t off,
-                                int count, int *eof, void *data)
-{
-        int rc = 0, i;
-        *eof = 1;
-
-        if (libcfs_catastrophe)
-                rc += snprintf(page + rc, count - rc, "LBUG\n");
-
-        spin_lock(&obd_dev_lock);
-        for (i = 0; i < class_devno_max(); i++) {
-                struct obd_device *obd;
-
-                obd = class_num2obd(i);
-                if (obd == NULL)
-                        continue;
-
-                LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-                if (obd->obd_stopping)
-                        continue;
-
-                class_incref(obd);
-                spin_unlock(&obd_dev_lock);
-
-                if (obd_health_check(obd)) {
-                        rc += snprintf(page + rc, count - rc,
-                                       "device %s reported unhealthy\n",
-                                       obd->obd_name);
-                }
-                class_decref(obd);
-                spin_lock(&obd_dev_lock);
-        }
-        spin_unlock(&obd_dev_lock);
-
-        if (rc == 0)
-                return snprintf(page, count, "healthy\n");
-
-        rc += snprintf(page + rc, count - rc, "NOT HEALTHY\n");
-        return rc;
-}
-
-/* Root for /proc/fs/lustre */
-struct proc_dir_entry *proc_lustre_root = NULL;
-
-struct lprocfs_vars lprocfs_base[] = {
-        { "version", obd_proc_read_version, NULL, NULL },
-        { "pinger", obd_proc_read_pinger, NULL, NULL },
-        { "health_check", obd_proc_read_health, NULL, NULL },
-        { 0 }
-};
-#else
-#define lprocfs_base NULL
-#endif /* LPROCFS */
-
-#ifdef __KERNEL__
-static void *obd_device_list_seq_start(struct seq_file *p, loff_t *pos)
-{
-        if (*pos >= class_devno_max())
-                return NULL;
-
-        return pos;
-}
-
-static void obd_device_list_seq_stop(struct seq_file *p, void *v)
-{
-}
-
-static void *obd_device_list_seq_next(struct seq_file *p, void *v, loff_t *pos)
-{      
-        ++*pos;
-        if (*pos >= class_devno_max())
-                return NULL;
-
-        return pos;
-}
-
-static int obd_device_list_seq_show(struct seq_file *p, void *v)
-{
-        loff_t index = *(loff_t *)v;
-        struct obd_device *obd = class_num2obd((int)index);
-        char *status;
-
-        if (obd == NULL)
-                return 0;
-
-        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-        if (obd->obd_stopping)
-                status = "ST";
-        else if (obd->obd_inactive)
-                status = "IN";
-        else if (obd->obd_set_up)
-                status = "UP";
-        else if (obd->obd_attached)
-                status = "AT";
-        else
-                status = "--";
-
-        return seq_printf(p, "%3d %s %s %s %s %d\n",
-                          (int)index, status, obd->obd_type->typ_name,
-                          obd->obd_name, obd->obd_uuid.uuid,
-                          atomic_read(&obd->obd_refcount));
-}
-
-struct seq_operations obd_device_list_sops = {
-        .start = obd_device_list_seq_start,
-        .stop = obd_device_list_seq_stop,
-        .next = obd_device_list_seq_next,
-        .show = obd_device_list_seq_show,
-};
-
-static int obd_device_list_open(struct inode *inode, struct file *file)
-{
-        struct proc_dir_entry *dp = PDE(inode);
-        struct seq_file *seq;
-        int rc = seq_open(file, &obd_device_list_sops);
-
-        if (rc)
-                return rc;
-
-        seq = file->private_data;
-        seq->private = dp->data;
-
-        return 0;
-}
-
-struct file_operations obd_device_list_fops = {
-        .owner   = THIS_MODULE,
-        .open    = obd_device_list_open,
-        .read    = seq_read,
-        .llseek  = seq_lseek,
-        .release = seq_release,
-};
-#endif
-
-int class_procfs_init(void)
-{
-#ifdef __KERNEL__
-        struct proc_dir_entry *entry;
-        ENTRY;
-
-        obd_sysctl_init();
-        proc_lustre_root = proc_mkdir("lustre", proc_root_fs);
-        if (!proc_lustre_root) {
-                printk(KERN_ERR
-                       "LustreError: error registering /proc/fs/lustre\n");
-                RETURN(-ENOMEM);
-        }
-        proc_version = lprocfs_add_vars(proc_lustre_root, lprocfs_base, NULL);
-        entry = create_proc_entry("devices", 0444, proc_lustre_root);
-        if (entry == NULL) {
-                CERROR("error registering /proc/fs/lustre/devices\n");
-                lprocfs_remove(&proc_lustre_root);
-                RETURN(-ENOMEM);
-        }
-        entry->proc_fops = &obd_device_list_fops;
-#else
-        ENTRY;
-#endif
-        RETURN(0);
-}
-
-#ifdef __KERNEL__
-int class_procfs_clean(void)
-{
-        ENTRY;
-        if (proc_lustre_root) 
-                lprocfs_remove(&proc_lustre_root);
-        RETURN(0);
-}
-
-
-/* Check that we're building against the appropriate version of the Lustre
- * kernel patch */
-#include <linux/lustre_version.h>
-#ifdef LUSTRE_KERNEL_VERSION
-#define LUSTRE_MIN_VERSION 45
-#define LUSTRE_MAX_VERSION 47
-#if (LUSTRE_KERNEL_VERSION < LUSTRE_MIN_VERSION)
-# error Cannot continue: Your Lustre kernel patch is older than the sources
-#elif (LUSTRE_KERNEL_VERSION > LUSTRE_MAX_VERSION)
-# error Cannot continue: Your Lustre sources are older than the kernel patch
-#endif
-#endif
-#endif
diff --git a/lustre/obdclass/linux/linux-obdo.c b/lustre/obdclass/linux/linux-obdo.c
deleted file mode 100644
index a5bf3b990feb679d32f3b4b546cf83fb996454b4..0000000000000000000000000000000000000000
--- a/lustre/obdclass/linux/linux-obdo.c
+++ /dev/null
@@ -1,288 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Object Devices Class Driver
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * These are the only exported functions, they provide some generic
- * infrastructure for managing object devices
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#else
-#include <linux/module.h>
-#include <obd_class.h>
-#include <lustre/lustre_idl.h>
-#endif
-
-#ifdef __KERNEL__
-#include <linux/fs.h>
-#include <linux/pagemap.h> /* for PAGE_CACHE_SIZE */
-
-void obdo_from_iattr(struct obdo *oa, struct iattr *attr, unsigned int ia_valid)
-{
-        if (ia_valid & ATTR_ATIME) {
-                oa->o_atime = LTIME_S(attr->ia_atime);
-                oa->o_valid |= OBD_MD_FLATIME;
-        }
-        if (ia_valid & ATTR_MTIME) {
-                oa->o_mtime = LTIME_S(attr->ia_mtime);
-                oa->o_valid |= OBD_MD_FLMTIME;
-        }
-        if (ia_valid & ATTR_CTIME) {
-                oa->o_ctime = LTIME_S(attr->ia_ctime);
-                oa->o_valid |= OBD_MD_FLCTIME;
-        }
-        if (ia_valid & ATTR_SIZE) {
-                oa->o_size = attr->ia_size;
-                oa->o_valid |= OBD_MD_FLSIZE;
-        }
-        if (ia_valid & ATTR_MODE) {
-                oa->o_mode = attr->ia_mode;
-                oa->o_valid |= OBD_MD_FLTYPE | OBD_MD_FLMODE;
-                if (!in_group_p(oa->o_gid) && !capable(CAP_FSETID))
-                        oa->o_mode &= ~S_ISGID;
-        }
-        if (ia_valid & ATTR_UID) {
-                oa->o_uid = attr->ia_uid;
-                oa->o_valid |= OBD_MD_FLUID;
-        }
-        if (ia_valid & ATTR_GID) {
-                oa->o_gid = attr->ia_gid;
-                oa->o_valid |= OBD_MD_FLGID;
-        }
-}
-EXPORT_SYMBOL(obdo_from_iattr);
-
-void iattr_from_obdo(struct iattr *attr, struct obdo *oa, obd_flag valid)
-{
-        valid &= oa->o_valid;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid "LPX64", new time "LPU64"/"LPU64"\n",
-                       oa->o_valid, oa->o_mtime, oa->o_ctime);
-
-        attr->ia_valid = 0;
-        if (valid & OBD_MD_FLATIME) {
-                LTIME_S(attr->ia_atime) = oa->o_atime;
-                attr->ia_valid |= ATTR_ATIME;
-        }
-        if (valid & OBD_MD_FLMTIME) {
-                LTIME_S(attr->ia_mtime) = oa->o_mtime;
-                attr->ia_valid |= ATTR_MTIME;
-        }
-        if (valid & OBD_MD_FLCTIME) {
-                LTIME_S(attr->ia_ctime) = oa->o_ctime;
-                attr->ia_valid |= ATTR_CTIME;
-        }
-        if (valid & OBD_MD_FLSIZE) {
-                attr->ia_size = oa->o_size;
-                attr->ia_valid |= ATTR_SIZE;
-        }
-#if 0   /* you shouldn't be able to change a file's type with setattr */
-        if (valid & OBD_MD_FLTYPE) {
-                attr->ia_mode = (attr->ia_mode & ~S_IFMT)|(oa->o_mode & S_IFMT);
-                attr->ia_valid |= ATTR_MODE;
-        }
-#endif
-        if (valid & OBD_MD_FLMODE) {
-                attr->ia_mode = (attr->ia_mode & S_IFMT)|(oa->o_mode & ~S_IFMT);
-                attr->ia_valid |= ATTR_MODE;
-                if (!in_group_p(oa->o_gid) && !capable(CAP_FSETID))
-                        attr->ia_mode &= ~S_ISGID;
-        }
-        if (valid & OBD_MD_FLUID) {
-                attr->ia_uid = oa->o_uid;
-                attr->ia_valid |= ATTR_UID;
-        }
-        if (valid & OBD_MD_FLGID) {
-                attr->ia_gid = oa->o_gid;
-                attr->ia_valid |= ATTR_GID;
-        }
-}
-EXPORT_SYMBOL(iattr_from_obdo);
-
-/* WARNING: the file systems must take care not to tinker with
-   attributes they don't manage (such as blocks). */
-void obdo_from_inode(struct obdo *dst, struct inode *src, obd_flag valid)
-{
-        obd_flag newvalid = 0;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n",
-                       valid, LTIME_S(src->i_mtime), 
-                       LTIME_S(src->i_ctime));
-
-        if (valid & OBD_MD_FLATIME) {
-                dst->o_atime = LTIME_S(src->i_atime);
-                newvalid |= OBD_MD_FLATIME;
-        }
-        if (valid & OBD_MD_FLMTIME) {
-                dst->o_mtime = LTIME_S(src->i_mtime);
-                newvalid |= OBD_MD_FLMTIME;
-        }
-        if (valid & OBD_MD_FLCTIME) {
-                dst->o_ctime = LTIME_S(src->i_ctime);
-                newvalid |= OBD_MD_FLCTIME;
-        }
-        if (valid & OBD_MD_FLSIZE) {
-                dst->o_size = i_size_read(src);
-                newvalid |= OBD_MD_FLSIZE;
-        }
-        if (valid & OBD_MD_FLBLOCKS) {  /* allocation of space (x512 bytes) */
-                dst->o_blocks = src->i_blocks;
-                newvalid |= OBD_MD_FLBLOCKS;
-        }
-        if (valid & OBD_MD_FLBLKSZ) {   /* optimal block size */
-                dst->o_blksize = 1<<src->i_blkbits;
-                newvalid |= OBD_MD_FLBLKSZ;
-        }
-        if (valid & OBD_MD_FLTYPE) {
-                dst->o_mode = (dst->o_mode & S_IALLUGO)|(src->i_mode & S_IFMT);
-                newvalid |= OBD_MD_FLTYPE;
-        }
-        if (valid & OBD_MD_FLMODE) {
-                dst->o_mode = (dst->o_mode & S_IFMT)|(src->i_mode & S_IALLUGO);
-                newvalid |= OBD_MD_FLMODE;
-        }
-        if (valid & OBD_MD_FLUID) {
-                dst->o_uid = src->i_uid;
-                newvalid |= OBD_MD_FLUID;
-        }
-        if (valid & OBD_MD_FLGID) {
-                dst->o_gid = src->i_gid;
-                newvalid |= OBD_MD_FLGID;
-        }
-        if (valid & OBD_MD_FLFLAGS) {
-                dst->o_flags = src->i_flags;
-                newvalid |= OBD_MD_FLFLAGS;
-        }
-        if (valid & OBD_MD_FLGENER) {
-                dst->o_generation = src->i_generation;
-                newvalid |= OBD_MD_FLGENER;
-        }
-        if (valid & OBD_MD_FLFID) {
-                dst->o_fid = src->i_ino;
-                newvalid |= OBD_MD_FLFID;
-        }
-
-        dst->o_valid |= newvalid;
-}
-EXPORT_SYMBOL(obdo_from_inode);
-
-void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid)
-{
-        valid &= src->o_valid;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE,
-                       "valid "LPX64", cur time %lu/%lu, new "LPU64"/"LPU64"\n",
-                       src->o_valid, LTIME_S(dst->i_mtime),
-                       LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime);
-
-        if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime))
-                LTIME_S(dst->i_atime) = src->o_atime;
-
-        /* mtime is always updated with ctime, but can be set in past.
-           As write and utime(2) may happen within 1 second, and utime's
-           mtime has a priority over write's one, leave mtime from mds 
-           for the same ctimes. */
-        if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(dst->i_ctime)) {
-                LTIME_S(dst->i_ctime) = src->o_ctime;
-                if (valid & OBD_MD_FLMTIME)
-                        LTIME_S(dst->i_mtime) = src->o_mtime;
-        }
-        if (valid & OBD_MD_FLSIZE)
-                i_size_write(dst, src->o_size);
-        /* optimum IO size */
-        if (valid & OBD_MD_FLBLKSZ && src->o_blksize > (1<<dst->i_blkbits)) {
-                dst->i_blkbits = ffs(src->o_blksize)-1;
-#ifdef HAVE_INODE_BLKSIZE
-                dst->i_blksize = src->o_blksize;
-#endif
-        }
-
-        if (dst->i_blkbits < CFS_PAGE_SHIFT) {
-#ifdef HAVE_INODE_BLKSIZE
-                dst->i_blksize = CFS_PAGE_SIZE;
-#endif
-                dst->i_blkbits = CFS_PAGE_SHIFT;
-        }
-
-        /* allocation of space */
-        if (valid & OBD_MD_FLBLOCKS && src->o_blocks > dst->i_blocks)
-                dst->i_blocks = src->o_blocks;
-}
-EXPORT_SYMBOL(obdo_refresh_inode);
-
-void obdo_to_inode(struct inode *dst, struct obdo *src, obd_flag valid)
-{
-        valid &= src->o_valid;
-
-        if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME))
-                CDEBUG(D_INODE,
-                       "valid "LPX64", cur time %lu/%lu, new "LPU64"/"LPU64"\n",
-                       src->o_valid, LTIME_S(dst->i_mtime),
-                       LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime);
-
-        if (valid & OBD_MD_FLATIME)
-                LTIME_S(dst->i_atime) = src->o_atime;
-        if (valid & OBD_MD_FLMTIME)
-                LTIME_S(dst->i_mtime) = src->o_mtime;
-        if (valid & OBD_MD_FLCTIME && src->o_ctime > LTIME_S(dst->i_ctime))
-                LTIME_S(dst->i_ctime) = src->o_ctime;
-        if (valid & OBD_MD_FLSIZE)
-                i_size_write(dst, src->o_size);
-        if (valid & OBD_MD_FLBLOCKS) { /* allocation of space */
-                dst->i_blocks = src->o_blocks;
-                if (dst->i_blocks < src->o_blocks) /* overflow */
-                        dst->i_blocks = -1;
-
-        }
-        if (valid & OBD_MD_FLBLKSZ) {
-                dst->i_blkbits = ffs(src->o_blksize)-1;
-#ifdef HAVE_INODE_BLKSIZE
-                dst->i_blksize = src->o_blksize;
-#endif
-        }
-        if (valid & OBD_MD_FLTYPE)
-                dst->i_mode = (dst->i_mode & ~S_IFMT) | (src->o_mode & S_IFMT);
-        if (valid & OBD_MD_FLMODE)
-                dst->i_mode = (dst->i_mode & S_IFMT) | (src->o_mode & ~S_IFMT);
-        if (valid & OBD_MD_FLUID)
-                dst->i_uid = src->o_uid;
-        if (valid & OBD_MD_FLGID)
-                dst->i_gid = src->o_gid;
-        if (valid & OBD_MD_FLFLAGS)
-                dst->i_flags = src->o_flags;
-        if (valid & OBD_MD_FLGENER)
-                dst->i_generation = src->o_generation;
-}
-EXPORT_SYMBOL(obdo_to_inode);
-#endif
-
diff --git a/lustre/obdclass/linux/linux-sysctl.c b/lustre/obdclass/linux/linux-sysctl.c
deleted file mode 100644
index 0f860c3c9bd376854a3f8e63b46a0c05ce1e85bf..0000000000000000000000000000000000000000
--- a/lustre/obdclass/linux/linux-sysctl.c
+++ /dev/null
@@ -1,348 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001, 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#include <linux/module.h>
-#include <linux/autoconf.h>
-#include <linux/sysctl.h>
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/sysctl.h>
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/swapctl.h>
-#endif
-#include <linux/proc_fs.h>
-#include <linux/slab.h>
-#include <linux/stat.h>
-#include <linux/ctype.h>
-#include <asm/bitops.h>
-#include <asm/uaccess.h>
-#include <linux/utsname.h>
-
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <obd_support.h>
-#include <lprocfs_status.h>
-
-cfs_sysctl_table_header_t *obd_table_header = NULL;
-
-#define OBD_SYSCTL 300
-
-enum {
-        OBD_FAIL_LOC = 1,       /* control test failures instrumentation */
-        OBD_FAIL_VAL,           /* userdata for fail loc */
-        OBD_TIMEOUT,            /* RPC timeout before recovery/intr */
-        OBD_DUMP_ON_TIMEOUT,    /* dump kernel debug log upon eviction */
-        OBD_MEMUSED,            /* bytes currently OBD_ALLOCated */
-        OBD_PAGESUSED,          /* pages currently OBD_PAGE_ALLOCated */
-        OBD_MAXMEMUSED,         /* maximum bytes OBD_ALLOCated concurrently */
-        OBD_MAXPAGESUSED,       /* maximum pages OBD_PAGE_ALLOCated concurrently */
-        OBD_SYNCFILTER,         /* XXX temporary, as we play with sync osts.. */
-        OBD_LDLM_TIMEOUT,       /* LDLM timeout for ASTs before client eviction */
-        OBD_DUMP_ON_EVICTION,   /* dump kernel debug log upon eviction */
-        OBD_DEBUG_PEER_ON_TIMEOUT, /* dump peer debug when RPC times out */
-        OBD_ALLOC_FAIL_RATE,    /* memory allocation random failure rate */
-};
-
-int LL_PROC_PROTO(proc_fail_loc)
-{
-        int rc;
-        int old_fail_loc = obd_fail_loc;
-
-        rc = ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
-        if (old_fail_loc != obd_fail_loc)
-                wake_up(&obd_race_waitq);
-        return rc;
-}
-
-int LL_PROC_PROTO(proc_set_timeout)
-{
-        int rc;
-
-        rc = ll_proc_dointvec(table, write, filp, buffer, lenp, ppos);
-        if (ldlm_timeout >= obd_timeout)
-                ldlm_timeout = max(obd_timeout / 3, 1U);
-        return rc;
-}
-
-#ifdef RANDOM_FAIL_ALLOC
-int LL_PROC_PROTO(proc_alloc_fail_rate)
-{
-        int rc = 0;
-        DECLARE_LL_PROC_PPOS_DECL;
-
-        if (!table->data || !table->maxlen || !*lenp || (*ppos && !write)) {
-                *lenp = 0;
-                return 0;
-        }
-        if (write) {
-                rc = lprocfs_write_frac_helper(buffer, *lenp, 
-                                               (unsigned int*)table->data,
-                                               OBD_ALLOC_FAIL_MULT);
-        } else {
-                char buf[21];
-                int  len;
-
-                len = lprocfs_read_frac_helper(buf, sizeof(buf),
-                                               *(unsigned int*)table->data,
-                                               OBD_ALLOC_FAIL_MULT);
-                if (len > *lenp)
-                        len = *lenp;
-                buf[len] = '\0';
-                if (copy_to_user(buffer, buf, len))
-                        return -EFAULT;
-                *lenp = len;
-        }
-        *ppos += *lenp;
-        return rc;
-}
-#endif
-
-int LL_PROC_PROTO(proc_memory_alloc)
-{
-        char buf[22];
-        int len;
-        DECLARE_LL_PROC_PPOS_DECL;
-
-        if (!*lenp || (*ppos && !write)) {
-                *lenp = 0;
-                return 0;
-        }
-        if (write) 
-                return -EINVAL;
-        
-        len = snprintf(buf, sizeof(buf), LPU64"\n", obd_memory_sum());
-        if (len > *lenp)
-                len = *lenp;
-        buf[len] = '\0';
-        if (copy_to_user(buffer, buf, len))
-                return -EFAULT;
-        *lenp = len;
-        *ppos += *lenp;
-        return 0;
-}
-
-int LL_PROC_PROTO(proc_pages_alloc)
-{
-        char buf[22];
-        int len;
-        DECLARE_LL_PROC_PPOS_DECL;
-
-        if (!*lenp || (*ppos && !write)) {
-                *lenp = 0;
-                return 0;
-        }
-        if (write)
-                return -EINVAL;
-
-        len = snprintf(buf, sizeof(buf), LPU64"\n", obd_pages_sum());
-        if (len > *lenp)
-                len = *lenp;
-        buf[len] = '\0';
-        if (copy_to_user(buffer, buf, len))
-                return -EFAULT;
-        *lenp = len;
-        *ppos += *lenp;
-        return 0;
-}
-
-int LL_PROC_PROTO(proc_mem_max)
-{
-        char buf[22];
-        int len;
-        DECLARE_LL_PROC_PPOS_DECL;
-
-        if (!*lenp || (*ppos && !write)) {
-                *lenp = 0;
-                return 0;
-        }
-        if (write)
-                return -EINVAL;
-
-        len = snprintf(buf, sizeof(buf), LPU64"\n", obd_memory_max());
-        if (len > *lenp)
-                len = *lenp;
-        buf[len] = '\0';
-        if (copy_to_user(buffer, buf, len))
-                return -EFAULT;
-        *lenp = len;
-        *ppos += *lenp;
-        return 0;
-}
-
-int LL_PROC_PROTO(proc_pages_max)
-{
-        char buf[22];
-        int len;
-        DECLARE_LL_PROC_PPOS_DECL;
-
-        if (!*lenp || (*ppos && !write)) {
-                *lenp = 0;
-                return 0;
-        }
-        if (write)
-                return -EINVAL;
-
-        len = snprintf(buf, sizeof(buf), LPU64"\n", obd_pages_max());
-        if (len > *lenp)
-                len = *lenp;
-        buf[len] = '\0';
-        if (copy_to_user(buffer, buf, len))
-                return -EFAULT;
-        *lenp = len;
-        *ppos += *lenp;
-        return 0;
-}
-
-static cfs_sysctl_table_t obd_table[] = {
-        {
-                .ctl_name = OBD_FAIL_LOC,
-                .procname = "fail_loc",
-                .data     = &obd_fail_loc,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_fail_loc
-        },
-        {
-                .ctl_name = OBD_FAIL_VAL,
-                .procname = "fail_val",
-                .data     = &obd_fail_val,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_dointvec
-        },
-        {
-                .ctl_name = OBD_TIMEOUT,
-                .procname = "timeout",
-                .data     = &obd_timeout,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_set_timeout
-        },
-        {
-                .ctl_name = OBD_DEBUG_PEER_ON_TIMEOUT,
-                .procname = "debug_peer_on_timeout",
-                .data     = &obd_debug_peer_on_timeout,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_dointvec
-        },
-        {
-                .ctl_name = OBD_DUMP_ON_TIMEOUT,
-                .procname = "dump_on_timeout",
-                .data     = &obd_dump_on_timeout,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_dointvec
-        },
-        {
-                .ctl_name = OBD_DUMP_ON_EVICTION,
-                .procname = "dump_on_eviction",
-                .data     = &obd_dump_on_eviction,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_dointvec
-        },
-        {
-                .ctl_name = OBD_MEMUSED,
-                .procname = "memused",
-                .data     = NULL,
-                .maxlen   = 0,
-                .mode     = 0444,
-                .proc_handler = &proc_memory_alloc
-        },
-        {
-                .ctl_name = OBD_PAGESUSED,
-                .procname = "pagesused",
-                .data     = NULL,
-                .maxlen   = 0,
-                .mode     = 0444,
-                .proc_handler = &proc_pages_alloc
-        },
-        {
-                .ctl_name = OBD_MAXMEMUSED,
-                .procname = "memused_max",
-                .data     = NULL,
-                .maxlen   = 0,
-                .mode     = 0444,
-                .proc_handler = &proc_mem_max
-        },
-        {
-                .ctl_name = OBD_MAXPAGESUSED,
-                .procname = "pagesused_max",
-                .data     = NULL,
-                .maxlen   = 0,
-                .mode     = 0444,
-                .proc_handler = &proc_pages_max
-        },
-        {
-                .ctl_name = OBD_LDLM_TIMEOUT,
-                .procname = "ldlm_timeout",
-                .data     = &ldlm_timeout,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_set_timeout
-        },
-#ifdef RANDOM_FAIL_ALLOC
-        {
-                .ctl_name = OBD_ALLOC_FAIL_RATE,
-                .procname = "alloc_fail_rate",
-                .data     = &obd_alloc_fail_rate,
-                .maxlen   = sizeof(int),
-                .mode     = 0644,
-                .proc_handler = &proc_alloc_fail_rate
-        },
-#endif
-        { 0 }
-};
-
-static cfs_sysctl_table_t parent_table[] = {
-       {
-               .ctl_name = OBD_SYSCTL,
-               .procname = "lustre",
-               .data     = NULL,
-               .maxlen   = 0,
-               .mode     = 0555,
-               .child    = obd_table
-       },
-       {0}
-};
-
-void obd_sysctl_init (void)
-{
-#ifdef CONFIG_SYSCTL
-        if ( !obd_table_header )
-                obd_table_header = cfs_register_sysctl_table(parent_table, 0);
-#endif
-}
-
-void obd_sysctl_clean (void)
-{
-#ifdef CONFIG_SYSCTL
-        if ( obd_table_header )
-                cfs_unregister_sysctl_table(obd_table_header);
-        obd_table_header = NULL;
-#endif
-}
diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c
deleted file mode 100644
index 977b489367f4a9b38351ce9bccab8af634398e84..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog.c
+++ /dev/null
@@ -1,424 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * OST<->MDS recovery logging infrastructure.
- *
- * Invariants in implementation:
- * - we do not share logs among different OST<->MDS connections, so that
- *   if an OST or MDS fails it need only look at log(s) relevant to itself
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <libcfs/list.h>
-
-/* Allocate a new log or catalog handle */
-struct llog_handle *llog_alloc_handle(void)
-{
-        struct llog_handle *loghandle;
-        ENTRY;
-
-        OBD_ALLOC(loghandle, sizeof(*loghandle));
-        if (loghandle == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-
-        init_rwsem(&loghandle->lgh_lock);
-
-        RETURN(loghandle);
-}
-EXPORT_SYMBOL(llog_alloc_handle);
-
-
-void llog_free_handle(struct llog_handle *loghandle)
-{
-        if (!loghandle)
-                return;
-
-        if (!loghandle->lgh_hdr)
-                goto out;
-        if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN)
-                list_del_init(&loghandle->u.phd.phd_entry);
-        if (loghandle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)
-                LASSERT(list_empty(&loghandle->u.chd.chd_head));
-        OBD_FREE(loghandle->lgh_hdr, LLOG_CHUNK_SIZE);
-
- out:
-        OBD_FREE(loghandle, sizeof(*loghandle));
-}
-EXPORT_SYMBOL(llog_free_handle);
-
-/* returns negative on error; 0 if success; 1 if success & log destroyed */
-int llog_cancel_rec(struct llog_handle *loghandle, int index)
-{
-        struct llog_log_hdr *llh = loghandle->lgh_hdr;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_RPCTRACE, "canceling %d in log "LPX64"\n",
-               index, loghandle->lgh_id.lgl_oid);
-
-        if (index == 0) {
-                CERROR("cannot cancel index 0 (which is header)\n");
-                RETURN(-EINVAL);
-        }
-
-        if (!ext2_clear_bit(index, llh->llh_bitmap)) {
-                CDEBUG(D_RPCTRACE, "catalog index %u already clear?\n", index);
-                RETURN(-EINVAL);
-        }
-
-        llh->llh_count--;
-
-        if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) &&
-            (llh->llh_count == 1) &&
-            (loghandle->lgh_last_idx == (LLOG_BITMAP_BYTES * 8) - 1)) {
-                rc = llog_destroy(loghandle);
-                if (rc) {
-                        CERROR("failure destroying log after last cancel: %d\n",
-                               rc);
-                        ext2_set_bit(index, llh->llh_bitmap);
-                        llh->llh_count++;
-                } else {
-                        rc = 1;
-                }
-                RETURN(rc);
-        }
-
-        rc = llog_write_rec(loghandle, &llh->llh_hdr, NULL, 0, NULL, 0);
-        if (rc) {
-                CERROR("failure re-writing header %d\n", rc);
-                ext2_set_bit(index, llh->llh_bitmap);
-                llh->llh_count++;
-        }
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cancel_rec);
-
-int llog_init_handle(struct llog_handle *handle, int flags,
-                     struct obd_uuid *uuid)
-{
-        int rc;
-        struct llog_log_hdr *llh;
-        ENTRY;
-        LASSERT(handle->lgh_hdr == NULL);
-
-        OBD_ALLOC(llh, sizeof(*llh));
-        if (llh == NULL)
-                RETURN(-ENOMEM);
-        handle->lgh_hdr = llh;
-        /* first assign flags to use llog_client_ops */
-        llh->llh_flags = flags;
-        rc = llog_read_header(handle);
-        if (rc == 0) {
-                flags = llh->llh_flags;
-                if (uuid && !obd_uuid_equals(uuid, &llh->llh_tgtuuid)) {
-                        CERROR("uuid mismatch: %s/%s\n", (char *)uuid->uuid,
-                               (char *)llh->llh_tgtuuid.uuid);
-                        rc = -EEXIST;
-                }
-                GOTO(out, rc);
-        } else if (rc != LLOG_EEMPTY || !flags) {
-                /* set a pesudo flag for initialization */
-                flags = LLOG_F_IS_CAT;
-                GOTO(out, rc);
-        }
-        rc = 0;
-
-        handle->lgh_last_idx = 0; /* header is record with index 0 */
-        llh->llh_count = 1;         /* for the header record */
-        llh->llh_hdr.lrh_type = LLOG_HDR_MAGIC;
-        llh->llh_hdr.lrh_len = llh->llh_tail.lrt_len = LLOG_CHUNK_SIZE;
-        llh->llh_hdr.lrh_index = llh->llh_tail.lrt_index = 0;
-        llh->llh_timestamp = CURRENT_SECONDS;
-        if (uuid)
-                memcpy(&llh->llh_tgtuuid, uuid, sizeof(llh->llh_tgtuuid));
-        llh->llh_bitmap_offset = offsetof(typeof(*llh),llh_bitmap);
-        ext2_set_bit(0, llh->llh_bitmap);
-
-out:
-        if (flags & LLOG_F_IS_CAT) {
-                CFS_INIT_LIST_HEAD(&handle->u.chd.chd_head);
-                llh->llh_size = sizeof(struct llog_logid_rec);
-        } else if (flags & LLOG_F_IS_PLAIN) {
-                CFS_INIT_LIST_HEAD(&handle->u.phd.phd_entry);
-        } else {
-                CERROR("Unknown flags: %#x (Expected %#x or %#x\n",
-                       flags, LLOG_F_IS_CAT, LLOG_F_IS_PLAIN);
-                LBUG();
-        }
-
-        if (rc) {
-                OBD_FREE(llh, sizeof(*llh));
-                handle->lgh_hdr = NULL;
-        }
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_init_handle);
-
-int llog_close(struct llog_handle *loghandle)
-{
-        struct llog_operations *lop;
-        int rc;
-        ENTRY;
-
-        rc = llog_handle2ops(loghandle, &lop);
-        if (rc)
-                GOTO(out, rc);
-        if (lop->lop_close == NULL)
-                GOTO(out, -EOPNOTSUPP);
-        rc = lop->lop_close(loghandle);
- out:
-        llog_free_handle(loghandle);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_close);
-
-int llog_process(struct llog_handle *loghandle, llog_cb_t cb,
-                 void *data, void *catdata)
-{
-        struct llog_log_hdr *llh = loghandle->lgh_hdr;
-        struct llog_process_cat_data *cd = catdata;
-        char *buf;
-        __u64 cur_offset = LLOG_CHUNK_SIZE, last_offset;
-        int rc = 0, index = 1, last_index;
-        int saved_index = 0, last_called_index = 0;
-        ENTRY;
-
-        LASSERT(llh);
-
-        OBD_ALLOC(buf, LLOG_CHUNK_SIZE);
-        if (!buf)
-                RETURN(-ENOMEM);
-
-        if (cd != NULL) {
-                last_called_index = cd->first_idx;
-                index = cd->first_idx + 1;
-        }
-        if (cd != NULL && cd->last_idx)
-                last_index = cd->last_idx;
-        else
-                last_index = LLOG_BITMAP_BYTES * 8 - 1;
-
-        while (rc == 0) {
-                struct llog_rec_hdr *rec;
-
-                /* skip records not set in bitmap */
-                while (index <= last_index &&
-                       !ext2_test_bit(index, llh->llh_bitmap))
-                        ++index;
-
-                LASSERT(index <= last_index + 1);
-                if (index == last_index + 1)
-                        break;
-
-                CDEBUG(D_OTHER, "index: %d last_index %d\n",
-                       index, last_index);
-
-                /* get the buf with our target record; avoid old garbage */
-                last_offset = cur_offset;
-                rc = llog_next_block(loghandle, &saved_index, index,
-                                     &cur_offset, buf, LLOG_CHUNK_SIZE);
-                if (rc)
-                        GOTO(out, rc);
-
-                /* NB: when rec->lrh_len is accessed it is already swabbed
-                 * since it is used at the "end" of the loop and the rec
-                 * swabbing is done at the beginning of the loop. */
-                for (rec = (struct llog_rec_hdr *)buf;
-                     (char *)rec < buf + LLOG_CHUNK_SIZE;
-                     rec = (struct llog_rec_hdr *)((char *)rec + rec->lrh_len)){
-
-                        CDEBUG(D_OTHER, "processing rec 0x%p type %#x\n",
-                               rec, rec->lrh_type);
-
-                        if (LLOG_REC_HDR_NEEDS_SWABBING(rec))
-                                lustre_swab_llog_rec(rec, NULL);
-
-                        CDEBUG(D_OTHER, "after swabbing, type=%#x idx=%d\n",
-                               rec->lrh_type, rec->lrh_index);
-                        
-                        if (rec->lrh_index == 0)
-                                GOTO(out, 0); /* no more records */
-
-                        if (rec->lrh_len == 0 || rec->lrh_len >LLOG_CHUNK_SIZE){
-                                CWARN("invalid length %d in llog record for "
-                                      "index %d/%d\n", rec->lrh_len,
-                                      rec->lrh_index, index);
-                                GOTO(out, rc = -EINVAL);
-                        }
-
-                        if (rec->lrh_index < index) {
-                                CDEBUG(D_OTHER, "skipping lrh_index %d\n",
-                                       rec->lrh_index);
-                                continue;
-                        }
-
-                        CDEBUG(D_OTHER, 
-                               "lrh_index: %d lrh_len: %d (%d remains)\n",
-                               rec->lrh_index, rec->lrh_len,
-                               (int)(buf + LLOG_CHUNK_SIZE - (char *)rec));
-
-                        loghandle->lgh_cur_idx = rec->lrh_index;
-                        loghandle->lgh_cur_offset = (char *)rec - (char *)buf +
-                                last_offset;
-
-                        /* if set, process the callback on this record */
-                        if (ext2_test_bit(index, llh->llh_bitmap)) {
-                                rc = cb(loghandle, rec, data);
-                                last_called_index = index;
-                                if (rc == LLOG_PROC_BREAK) {
-                                        CDEBUG(D_HA, "recovery from log: "LPX64
-                                               ":%x stopped\n",
-                                               loghandle->lgh_id.lgl_oid,
-                                               loghandle->lgh_id.lgl_ogen);
-                                        GOTO(out, rc);
-                                } else if (rc == LLOG_DEL_RECORD) {
-                                        llog_cancel_rec(loghandle, rec->lrh_index);
-                                        rc = 0;
-                                }
-                                if (rc)
-                                        GOTO(out, rc);
-                        } else {
-                                CDEBUG(D_OTHER, "Skipped index %d\n", index);
-                        }
-
-                        /* next record, still in buffer? */
-                        ++index;
-                        if (index > last_index)
-                                GOTO(out, rc = 0);
-                }
-        }
-
- out:
-        if (cd != NULL)
-                cd->last_idx = last_called_index;
-        if (buf)
-                OBD_FREE(buf, LLOG_CHUNK_SIZE);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_process);
-
-inline int llog_get_size(struct llog_handle *loghandle)
-{
-        if (loghandle && loghandle->lgh_hdr)
-                return loghandle->lgh_hdr->llh_count;
-        return 0;
-}
-EXPORT_SYMBOL(llog_get_size);
-
-int llog_reverse_process(struct llog_handle *loghandle, llog_cb_t cb,
-                         void *data, void *catdata)
-{
-        struct llog_log_hdr *llh = loghandle->lgh_hdr;
-        struct llog_process_cat_data *cd = catdata;
-        void *buf;
-        int rc = 0, first_index = 1, index, idx;
-        ENTRY;
-
-        OBD_ALLOC(buf, LLOG_CHUNK_SIZE);
-        if (!buf)
-                RETURN(-ENOMEM);
-
-        if (cd != NULL)
-                first_index = cd->first_idx + 1;
-        if (cd != NULL && cd->last_idx)
-                index = cd->last_idx;
-        else
-                index = LLOG_BITMAP_BYTES * 8 - 1;
-
-        while (rc == 0) {
-                struct llog_rec_hdr *rec;
-                struct llog_rec_tail *tail;
-
-                /* skip records not set in bitmap */
-                while (index >= first_index &&
-                       !ext2_test_bit(index, llh->llh_bitmap))
-                        --index;
-
-                LASSERT(index >= first_index - 1);
-                if (index == first_index - 1)
-                        break;
-
-                /* get the buf with our target record; avoid old garbage */
-                memset(buf, 0, LLOG_CHUNK_SIZE);
-                rc = llog_prev_block(loghandle, index, buf, LLOG_CHUNK_SIZE);
-                if (rc)
-                        GOTO(out, rc);
-
-                rec = buf;
-                idx = le32_to_cpu(rec->lrh_index);
-                if (idx < index)
-                        CDEBUG(D_RPCTRACE, "index %u : idx %u\n", index, idx);
-                while (idx < index) {
-                        rec = ((void *)rec + le32_to_cpu(rec->lrh_len));
-                        idx ++;
-                }
-                tail = (void *)rec + le32_to_cpu(rec->lrh_len) - sizeof(*tail);
-
-                /* process records in buffer, starting where we found one */
-                while ((void *)tail > buf) {
-                        rec = (void *)tail - le32_to_cpu(tail->lrt_len) +
-                                sizeof(*tail);
-
-                        if (rec->lrh_index == 0)
-                                GOTO(out, 0); /* no more records */
-
-                        /* if set, process the callback on this record */
-                        if (ext2_test_bit(index, llh->llh_bitmap)) {
-                                rc = cb(loghandle, rec, data);
-                                if (rc == LLOG_PROC_BREAK) {
-                                        CWARN("recovery from log: "LPX64":%x"
-                                              " stopped\n",
-                                              loghandle->lgh_id.lgl_oid,
-                                              loghandle->lgh_id.lgl_ogen);
-                                        GOTO(out, rc);
-                                }
-                                if (rc)
-                                        GOTO(out, rc);
-                        }
-
-                        /* previous record, still in buffer? */
-                        --index;
-                        if (index < first_index)
-                                GOTO(out, rc = 0);
-                        tail = (void *)rec - sizeof(*tail);
-                }
-        }
-
-out:
-        if (buf)
-                OBD_FREE(buf, LLOG_CHUNK_SIZE);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_reverse_process);
diff --git a/lustre/obdclass/llog_cat.c b/lustre/obdclass/llog_cat.c
deleted file mode 100644
index 6cb3175295f6e9df1853939f6856db882282e1fe..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_cat.c
+++ /dev/null
@@ -1,539 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * OST<->MDS recovery logging infrastructure.
- *
- * Invariants in implementation:
- * - we do not share logs among different OST<->MDS connections, so that
- *   if an OST or MDS fails it need only look at log(s) relevant to itself
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <libcfs/list.h>
-
-/* Create a new log handle and add it to the open list.
- * This log handle will be closed when all of the records in it are removed.
- *
- * Assumes caller has already pushed us into the kernel context and is locking.
- */
-static struct llog_handle *llog_cat_new_log(struct llog_handle *cathandle)
-{
-        struct llog_handle *loghandle;
-        struct llog_log_hdr *llh;
-        struct llog_logid_rec rec = { { 0 }, };
-        int rc, index, bitmap_size;
-        ENTRY;
-
-        llh = cathandle->lgh_hdr;
-        bitmap_size = LLOG_BITMAP_SIZE(llh);
-
-        index = (cathandle->lgh_last_idx + 1) % bitmap_size;
-
-        /* maximum number of available slots in catlog is bitmap_size - 2 */
-        if (llh->llh_cat_idx == index) {
-                CERROR("no free catalog slots for log...\n");
-                RETURN(ERR_PTR(-ENOSPC));
-        }
-
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_MDS_LLOG_CREATE_FAILED))
-                RETURN(ERR_PTR(-ENOSPC));
-        
-        rc = llog_create(cathandle->lgh_ctxt, &loghandle, NULL, NULL);
-        if (rc)
-                RETURN(ERR_PTR(rc));
-        
-        rc = llog_init_handle(loghandle,
-                              LLOG_F_IS_PLAIN | LLOG_F_ZAP_WHEN_EMPTY,
-                              &cathandle->lgh_hdr->llh_tgtuuid);
-        if (rc)
-                GOTO(out_destroy, rc);
-        if (index == 0)
-                index = 1;
-        if (ext2_set_bit(index, llh->llh_bitmap)) {
-                CERROR("argh, index %u already set in log bitmap?\n",
-                       index);
-                LBUG(); /* should never happen */
-        }
-        cathandle->lgh_last_idx = index;
-        llh->llh_count++;
-        llh->llh_tail.lrt_index = index;
-
-        CDEBUG(D_RPCTRACE,"new recovery log "LPX64":%x for index %u of catalog "
-               LPX64"\n", loghandle->lgh_id.lgl_oid, loghandle->lgh_id.lgl_ogen,
-               index, cathandle->lgh_id.lgl_oid);
-        /* build the record for this log in the catalog */
-        rec.lid_hdr.lrh_len = sizeof(rec);
-        rec.lid_hdr.lrh_index = index;
-        rec.lid_hdr.lrh_type = LLOG_LOGID_MAGIC;
-        rec.lid_id = loghandle->lgh_id;
-        rec.lid_tail.lrt_len = sizeof(rec);
-        rec.lid_tail.lrt_index = index;
-
-        /* update the catalog: header and record */
-        rc = llog_write_rec(cathandle, &rec.lid_hdr,
-                            &loghandle->u.phd.phd_cookie, 1, NULL, index);
-        if (rc < 0) {
-                GOTO(out_destroy, rc);
-        }
-
-        loghandle->lgh_hdr->llh_cat_idx = index;
-        cathandle->u.chd.chd_current_log = loghandle;
-        LASSERT(list_empty(&loghandle->u.phd.phd_entry));
-        list_add_tail(&loghandle->u.phd.phd_entry, &cathandle->u.chd.chd_head);
-
- out_destroy:
-        if (rc < 0)
-                llog_destroy(loghandle);
-
-        RETURN(loghandle);
-}
-EXPORT_SYMBOL(llog_cat_new_log);
-
-/* Open an existent log handle and add it to the open list.
- * This log handle will be closed when all of the records in it are removed.
- *
- * Assumes caller has already pushed us into the kernel context and is locking.
- * We return a lock on the handle to ensure nobody yanks it from us.
- */
-int llog_cat_id2handle(struct llog_handle *cathandle, struct llog_handle **res,
-                       struct llog_logid *logid)
-{
-        struct llog_handle *loghandle;
-        int rc = 0;
-        ENTRY;
-
-        if (cathandle == NULL)
-                RETURN(-EBADF);
-
-        list_for_each_entry(loghandle, &cathandle->u.chd.chd_head,
-                            u.phd.phd_entry) {
-                struct llog_logid *cgl = &loghandle->lgh_id;
-                if (cgl->lgl_oid == logid->lgl_oid) {
-                        if (cgl->lgl_ogen != logid->lgl_ogen) {
-                                CERROR("log "LPX64" generation %x != %x\n",
-                                       logid->lgl_oid, cgl->lgl_ogen,
-                                       logid->lgl_ogen);
-                                continue;
-                        }
-                        loghandle->u.phd.phd_cat_handle = cathandle;
-                        GOTO(out, rc = 0);
-                }
-        }
-
-        rc = llog_create(cathandle->lgh_ctxt, &loghandle, logid, NULL);
-        if (rc) {
-                CERROR("error opening log id "LPX64":%x: rc %d\n",
-                       logid->lgl_oid, logid->lgl_ogen, rc);
-        } else {
-                rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL);
-                if (!rc) {
-                        list_add(&loghandle->u.phd.phd_entry,
-                                 &cathandle->u.chd.chd_head);
-                }
-        }
-        if (!rc) {
-                loghandle->u.phd.phd_cat_handle = cathandle;
-                loghandle->u.phd.phd_cookie.lgc_lgl = cathandle->lgh_id;
-                loghandle->u.phd.phd_cookie.lgc_index = 
-                        loghandle->lgh_hdr->llh_cat_idx;
-        }
-
-out:
-        *res = loghandle;
-        RETURN(rc);
-}
-
-int llog_cat_put(struct llog_handle *cathandle)
-{
-        struct llog_handle *loghandle, *n;
-        int rc;
-        ENTRY;
-
-        list_for_each_entry_safe(loghandle, n, &cathandle->u.chd.chd_head,
-                                 u.phd.phd_entry) {
-                int err = llog_close(loghandle);
-                if (err)
-                        CERROR("error closing loghandle\n");
-        }
-        rc = llog_close(cathandle);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_put);
-
-/* Return the currently active log handle.  If the current log handle doesn't
- * have enough space left for the current record, start a new one.
- *
- * If reclen is 0, we only want to know what the currently active log is,
- * otherwise we get a lock on this log so nobody can steal our space.
- *
- * Assumes caller has already pushed us into the kernel context and is locking.
- *
- * NOTE: loghandle is write-locked upon successful return
- */
-static struct llog_handle *llog_cat_current_log(struct llog_handle *cathandle,
-                                                int create)
-{
-        struct llog_handle *loghandle = NULL;
-        ENTRY;
-
-        down_read(&cathandle->lgh_lock);
-        loghandle = cathandle->u.chd.chd_current_log;
-        if (loghandle) {
-                struct llog_log_hdr *llh = loghandle->lgh_hdr;
-                down_write(&loghandle->lgh_lock);
-                if (loghandle->lgh_last_idx < LLOG_BITMAP_SIZE(llh) - 1) {
-                        up_read(&cathandle->lgh_lock);
-                        RETURN(loghandle);
-                } else {
-                        up_write(&loghandle->lgh_lock);
-                }
-        }
-        if (!create) {
-                if (loghandle)
-                        down_write(&loghandle->lgh_lock);
-                up_read(&cathandle->lgh_lock);
-                RETURN(loghandle);
-        }
-        up_read(&cathandle->lgh_lock);
-
-        /* time to create new log */
-
-        /* first, we have to make sure the state hasn't changed */
-        down_write(&cathandle->lgh_lock);
-        loghandle = cathandle->u.chd.chd_current_log;
-        if (loghandle) {
-                struct llog_log_hdr *llh = loghandle->lgh_hdr;
-                down_write(&loghandle->lgh_lock);
-                if (loghandle->lgh_last_idx < LLOG_BITMAP_SIZE(llh) - 1) {
-                        up_write(&cathandle->lgh_lock);
-                        RETURN(loghandle);
-                } else {
-                        up_write(&loghandle->lgh_lock);
-                }
-        }
-
-        CDEBUG(D_INODE, "creating new log\n");
-        loghandle = llog_cat_new_log(cathandle);
-        if (!IS_ERR(loghandle))
-                down_write(&loghandle->lgh_lock);
-        up_write(&cathandle->lgh_lock);
-        RETURN(loghandle);
-}
-
-/* Add a single record to the recovery log(s) using a catalog
- * Returns as llog_write_record
- *
- * Assumes caller has already pushed us into the kernel context.
- */
-int llog_cat_add_rec(struct llog_handle *cathandle, struct llog_rec_hdr *rec,
-                     struct llog_cookie *reccookie, void *buf)
-{
-        struct llog_handle *loghandle;
-        int rc;
-        ENTRY;
-
-        LASSERT(rec->lrh_len <= LLOG_CHUNK_SIZE);
-        loghandle = llog_cat_current_log(cathandle, 1);
-        if (IS_ERR(loghandle))
-                RETURN(PTR_ERR(loghandle));
-        /* loghandle is already locked by llog_cat_current_log() for us */
-        rc = llog_write_rec(loghandle, rec, reccookie, 1, buf, -1);
-        up_write(&loghandle->lgh_lock);
-        if (rc == -ENOSPC) {
-                /* to create a new plain log */
-                loghandle = llog_cat_current_log(cathandle, 1);
-                if (IS_ERR(loghandle))
-                        RETURN(PTR_ERR(loghandle));
-                rc = llog_write_rec(loghandle, rec, reccookie, 1, buf, -1);
-                up_write(&loghandle->lgh_lock);
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_add_rec);
-
-/* For each cookie in the cookie array, we clear the log in-use bit and either:
- * - the log is empty, so mark it free in the catalog header and delete it
- * - the log is not empty, just write out the log header
- *
- * The cookies may be in different log files, so we need to get new logs
- * each time.
- *
- * Assumes caller has already pushed us into the kernel context.
- */
-int llog_cat_cancel_records(struct llog_handle *cathandle, int count,
-                        struct llog_cookie *cookies)
-{
-        int i, index, rc = 0;
-        ENTRY;
-
-        down_write(&cathandle->lgh_lock);
-        for (i = 0; i < count; i++, cookies++) {
-                struct llog_handle *loghandle;
-                struct llog_logid *lgl = &cookies->lgc_lgl;
-
-                rc = llog_cat_id2handle(cathandle, &loghandle, lgl);
-                if (rc) {
-                        CERROR("Cannot find log "LPX64"\n", lgl->lgl_oid);
-                        break;
-                }
-
-                down_write(&loghandle->lgh_lock);
-                rc = llog_cancel_rec(loghandle, cookies->lgc_index);
-                up_write(&loghandle->lgh_lock);
-
-                if (rc == 1) {          /* log has been destroyed */
-                        index = loghandle->u.phd.phd_cookie.lgc_index;
-                        if (cathandle->u.chd.chd_current_log == loghandle)
-                                cathandle->u.chd.chd_current_log = NULL;
-                        llog_free_handle(loghandle);
-
-                        LASSERT(index);
-                        llog_cat_set_first_idx(cathandle, index);
-                        rc = llog_cancel_rec(cathandle, index);
-                        if (rc == 0)
-                                CDEBUG(D_RPCTRACE,"cancel plain log at index %u"
-                                       " of catalog "LPX64"\n",
-                                       index, cathandle->lgh_id.lgl_oid);
-                }
-        }
-        up_write(&cathandle->lgh_lock);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_cancel_records);
-
-int llog_cat_process_cb(struct llog_handle *cat_llh, struct llog_rec_hdr *rec,
-                        void *data)
-{
-        struct llog_process_data *d = data;
-        struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
-        struct llog_handle *llh;
-        int rc;
-
-        ENTRY;
-        if (rec->lrh_type != LLOG_LOGID_MAGIC) {
-                CERROR("invalid record in catalog\n");
-                RETURN(-EINVAL);
-        }
-        CDEBUG(D_HA, "processing log "LPX64":%x at index %u of catalog "
-               LPX64"\n", lir->lid_id.lgl_oid, lir->lid_id.lgl_ogen,
-               rec->lrh_index, cat_llh->lgh_id.lgl_oid);
-
-        rc = llog_cat_id2handle(cat_llh, &llh, &lir->lid_id);
-        if (rc) {
-                CERROR("Cannot find handle for log "LPX64"\n",
-                       lir->lid_id.lgl_oid);
-                RETURN(rc);
-        }
-
-        rc = llog_process(llh, d->lpd_cb, d->lpd_data, NULL);
-        RETURN(rc);
-}
-
-int llog_cat_process(struct llog_handle *cat_llh, llog_cb_t cb, void *data)
-{
-        struct llog_process_data d;
-        struct llog_process_cat_data cd;
-        struct llog_log_hdr *llh = cat_llh->lgh_hdr;
-        int rc;
-        ENTRY;
-
-        LASSERT(llh->llh_flags & LLOG_F_IS_CAT);
-        d.lpd_data = data;
-        d.lpd_cb = cb;
-
-        if (llh->llh_cat_idx > cat_llh->lgh_last_idx) {
-                CWARN("catlog "LPX64" crosses index zero\n",
-                      cat_llh->lgh_id.lgl_oid);
-
-                cd.first_idx = llh->llh_cat_idx;
-                cd.last_idx = 0;
-                rc = llog_process(cat_llh, llog_cat_process_cb, &d, &cd);
-                if (rc != 0)
-                        RETURN(rc);
-
-                cd.first_idx = 0;
-                cd.last_idx = cat_llh->lgh_last_idx;
-                rc = llog_process(cat_llh, llog_cat_process_cb, &d, &cd);
-        } else {
-                rc = llog_process(cat_llh, llog_cat_process_cb, &d, NULL);
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_process);
-
-static int llog_cat_reverse_process_cb(struct llog_handle *cat_llh,
-                                       struct llog_rec_hdr *rec, void *data)
-{
-        struct llog_process_data *d = data;
-        struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
-        struct llog_handle *llh;
-        int rc;
-
-        if (le32_to_cpu(rec->lrh_type) != LLOG_LOGID_MAGIC) {
-                CERROR("invalid record in catalog\n");
-                RETURN(-EINVAL);
-        }
-        CDEBUG(D_HA, "processing log "LPX64":%x at index %u of catalog "
-               LPX64"\n", lir->lid_id.lgl_oid, lir->lid_id.lgl_ogen,
-               le32_to_cpu(rec->lrh_index), cat_llh->lgh_id.lgl_oid);
-
-        rc = llog_cat_id2handle(cat_llh, &llh, &lir->lid_id);
-        if (rc) {
-                CERROR("Cannot find handle for log "LPX64"\n",
-                       lir->lid_id.lgl_oid);
-                RETURN(rc);
-        }
-
-        rc = llog_reverse_process(llh, d->lpd_cb, d->lpd_data, NULL);
-        RETURN(rc);
-}
-
-int llog_cat_reverse_process(struct llog_handle *cat_llh,
-                             llog_cb_t cb, void *data)
-{
-        struct llog_process_data d;
-        struct llog_process_cat_data cd;
-        struct llog_log_hdr *llh = cat_llh->lgh_hdr;
-        int rc;
-        ENTRY;
-
-        LASSERT(llh->llh_flags & LLOG_F_IS_CAT);
-        d.lpd_data = data;
-        d.lpd_cb = cb;
-
-        if (llh->llh_cat_idx > cat_llh->lgh_last_idx) {
-                CWARN("catalog "LPX64" crosses index zero\n",
-                      cat_llh->lgh_id.lgl_oid);
-
-                cd.first_idx = 0;
-                cd.last_idx = cat_llh->lgh_last_idx;
-                rc = llog_reverse_process(cat_llh, llog_cat_reverse_process_cb,
-                                          &d, &cd);
-                if (rc != 0)
-                        RETURN(rc);
-
-                cd.first_idx = le32_to_cpu(llh->llh_cat_idx);
-                cd.last_idx = 0;
-                rc = llog_reverse_process(cat_llh, llog_cat_reverse_process_cb,
-                                          &d, &cd);
-        } else {
-                rc = llog_reverse_process(cat_llh, llog_cat_reverse_process_cb,
-                                          &d, NULL);
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_reverse_process);
-
-int llog_cat_set_first_idx(struct llog_handle *cathandle, int index)
-{
-        struct llog_log_hdr *llh = cathandle->lgh_hdr;
-        int i, bitmap_size, idx;
-        ENTRY;
-
-        bitmap_size = LLOG_BITMAP_SIZE(llh);
-        if (llh->llh_cat_idx == (index - 1)) {
-                idx = llh->llh_cat_idx + 1;
-                llh->llh_cat_idx = idx;
-                if (idx == cathandle->lgh_last_idx)
-                        goto out;
-                for (i = (index + 1) % bitmap_size;
-                     i != cathandle->lgh_last_idx;
-                     i = (i + 1) % bitmap_size) {
-                        if (!ext2_test_bit(i, llh->llh_bitmap)) {
-                                idx = llh->llh_cat_idx + 1;
-                                llh->llh_cat_idx = idx;
-                        } else if (i == 0) {
-                                llh->llh_cat_idx = 0;
-                        } else {
-                                break;
-                        }
-                }
-out:
-                CDEBUG(D_RPCTRACE, "set catlog "LPX64" first idx %u\n",
-                       cathandle->lgh_id.lgl_oid, llh->llh_cat_idx);
-        }
-
-        RETURN(0);
-}
-
-#if 0
-/* Assumes caller has already pushed us into the kernel context. */
-int llog_cat_init(struct llog_handle *cathandle, struct obd_uuid *tgtuuid)
-{
-        struct llog_log_hdr *llh;
-        loff_t offset = 0;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(sizeof(*llh) == LLOG_CHUNK_SIZE);
-
-        down(&cathandle->lgh_lock);
-        llh = cathandle->lgh_hdr;
-
-        if (i_size_read(cathandle->lgh_file->f_dentry->d_inode) == 0) {
-                llog_write_rec(cathandle, &llh->llh_hdr, NULL, 0, NULL, 0);
-
-write_hdr:
-                rc = lustre_fwrite(cathandle->lgh_file, llh, LLOG_CHUNK_SIZE,
-                                   &offset);
-                if (rc != LLOG_CHUNK_SIZE) {
-                        CERROR("error writing catalog header: rc %d\n", rc);
-                        OBD_FREE(llh, sizeof(*llh));
-                        if (rc >= 0)
-                                rc = -ENOSPC;
-                } else
-                        rc = 0;
-        } else {
-                rc = lustre_fread(cathandle->lgh_file, llh, LLOG_CHUNK_SIZE,
-                                  &offset);
-                if (rc != LLOG_CHUNK_SIZE) {
-                        CERROR("error reading catalog header: rc %d\n", rc);
-                        /* Can we do much else if the header is bad? */
-                        goto write_hdr;
-                } else
-                        rc = 0;
-        }
-
-        cathandle->lgh_tgtuuid = &llh->llh_tgtuuid;
-        up(&cathandle->lgh_lock);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_init);
-
-#endif
diff --git a/lustre/obdclass/llog_internal.h b/lustre/obdclass/llog_internal.h
deleted file mode 100644
index d4be19c2820ce86cfe9d869b8c05fc53cf9d62b4..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_internal.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __LLOG_INTERNAL_H__
-#define __LLOG_INTERNAL_H__
-
-int llog_put_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
-                      char *name, int count, struct llog_catid *idarray);
-int llog_cat_id2handle(struct llog_handle *cathandle, struct llog_handle **res,
-                       struct llog_logid *logid);
-int class_config_dump_handler(struct llog_handle * handle,
-                              struct llog_rec_hdr *rec, void *data);
-#endif
diff --git a/lustre/obdclass/llog_ioctl.c b/lustre/obdclass/llog_ioctl.c
deleted file mode 100644
index bc8afc60e9b5d2b469c07b56e697076c753d4ab7..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_ioctl.c
+++ /dev/null
@@ -1,452 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2005 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <libcfs/list.h>
-#include "llog_internal.h"
-
-static int str2logid(struct llog_logid *logid, char *str, int len)
-{
-        char *start, *end, *endp;
-
-        ENTRY;
-        start = str;
-        if (*start != '#')
-                RETURN(-EINVAL);
-
-        start++;
-        if (start - str >= len - 1)
-                RETURN(-EINVAL);
-        end = strchr(start, '#');
-        if (end == NULL || end == start)
-                RETURN(-EINVAL);
-
-        *end = '\0';
-        logid->lgl_oid = simple_strtoull(start, &endp, 0);
-        if (endp != end)
-                RETURN(-EINVAL);
-
-        start = ++end;
-        if (start - str >= len - 1)
-                RETURN(-EINVAL);
-        end = strchr(start, '#');
-        if (end == NULL || end == start)
-                RETURN(-EINVAL);
-
-        *end = '\0';
-        logid->lgl_ogr = simple_strtoull(start, &endp, 0);
-        if (endp != end)
-                RETURN(-EINVAL);
-
-        start = ++end;
-        if (start - str >= len - 1)
-                RETURN(-EINVAL);
-        logid->lgl_ogen = simple_strtoul(start, &endp, 16);
-        if (*endp != '\0')
-                RETURN(-EINVAL);
-
-        RETURN(0);
-}
-
-static int llog_check_cb(struct llog_handle *handle, struct llog_rec_hdr *rec,
-                         void *data)
-{
-        struct obd_ioctl_data *ioc_data = (struct obd_ioctl_data *)data;
-        static int l, remains, from, to;
-        static char *out;
-        char *endp;
-        int cur_index, rc = 0;
-
-        ENTRY;
-        cur_index = rec->lrh_index;
-
-        if (ioc_data && (ioc_data->ioc_inllen1)) {
-                l = 0;
-                remains = ioc_data->ioc_inllen4 +
-                        size_round(ioc_data->ioc_inllen1) +
-                        size_round(ioc_data->ioc_inllen2) +
-                        size_round(ioc_data->ioc_inllen3);
-                from = simple_strtol(ioc_data->ioc_inlbuf2, &endp, 0);
-                if (*endp != '\0')
-                        RETURN(-EINVAL);
-                to = simple_strtol(ioc_data->ioc_inlbuf3, &endp, 0);
-                if (*endp != '\0')
-                        RETURN(-EINVAL);
-                ioc_data->ioc_inllen1 = 0;
-                out = ioc_data->ioc_bulk;
-                if (cur_index < from)
-                        RETURN(0);
-                if (to > 0 && cur_index > to)
-                        RETURN(-LLOG_EEMPTY);
-        }
-        if (handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) {
-                struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
-                struct llog_handle *log_handle;
-
-                if (rec->lrh_type != LLOG_LOGID_MAGIC) {
-                        l = snprintf(out, remains, "[index]: %05d  [type]: "
-                                     "%02x  [len]: %04d failed\n",
-                                     cur_index, rec->lrh_type,
-                                     rec->lrh_len);
-                }
-                if (handle->lgh_ctxt == NULL)
-                        RETURN(-EOPNOTSUPP);
-                rc = llog_cat_id2handle(handle, &log_handle, &lir->lid_id);
-                if (rc) {
-                        CDEBUG(D_IOCTL,
-                               "cannot find log #"LPX64"#"LPX64"#%08x\n",
-                               lir->lid_id.lgl_oid, lir->lid_id.lgl_ogr,
-                               lir->lid_id.lgl_ogen);
-                        RETURN(rc);
-                }
-                rc = llog_process(log_handle, llog_check_cb, NULL, NULL);
-                llog_close(log_handle);
-        } else {
-                switch (rec->lrh_type) {
-                case OST_SZ_REC:
-                case OST_RAID1_REC:
-                case MDS_UNLINK_REC:
-                case MDS_SETATTR_REC:
-                case OBD_CFG_REC:
-                case LLOG_HDR_MAGIC: {
-                         l = snprintf(out, remains, "[index]: %05d  [type]: "
-                                      "%02x  [len]: %04d ok\n",
-                                      cur_index, rec->lrh_type,
-                                      rec->lrh_len);
-                         out += l;
-                         remains -= l;
-                         if (remains <= 0) {
-                                CERROR("no space to print log records\n");
-                                RETURN(-LLOG_EEMPTY);
-                         }
-                         RETURN(0);
-                }
-                default: {
-                         l = snprintf(out, remains, "[index]: %05d  [type]: "
-                                      "%02x  [len]: %04d failed\n",
-                                      cur_index, rec->lrh_type,
-                                      rec->lrh_len);
-                         out += l;
-                         remains -= l;
-                         if (remains <= 0) {
-                                CERROR("no space to print log records\n");
-                                RETURN(-LLOG_EEMPTY);
-                         }
-                         RETURN(0);
-                }
-                }
-        }
-        RETURN(rc);
-}
-
-static int llog_print_cb(struct llog_handle *handle, struct llog_rec_hdr *rec,
-                         void *data)
-{
-        struct obd_ioctl_data *ioc_data = (struct obd_ioctl_data *)data;
-        static int l, remains, from, to;
-        static char *out;
-        char *endp;
-        int cur_index;
-
-        ENTRY;
-        if (ioc_data->ioc_inllen1) {
-                l = 0;
-                remains = ioc_data->ioc_inllen4 +
-                        size_round(ioc_data->ioc_inllen1) +
-                        size_round(ioc_data->ioc_inllen2) +
-                        size_round(ioc_data->ioc_inllen3);
-                from = simple_strtol(ioc_data->ioc_inlbuf2, &endp, 0);
-                if (*endp != '\0')
-                        RETURN(-EINVAL);
-                to = simple_strtol(ioc_data->ioc_inlbuf3, &endp, 0);
-                if (*endp != '\0')
-                        RETURN(-EINVAL);
-                out = ioc_data->ioc_bulk;
-                ioc_data->ioc_inllen1 = 0;
-        }
-
-        cur_index = rec->lrh_index;
-        if (cur_index < from)
-                RETURN(0);
-        if (to > 0 && cur_index > to)
-                RETURN(-LLOG_EEMPTY);
-
-        if (handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) {
-                struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
-                if (rec->lrh_type != LLOG_LOGID_MAGIC) {
-                        CERROR("invalid record in catalog\n");
-                        RETURN(-EINVAL);
-                }
-
-                l = snprintf(out, remains,
-                             "[index]: %05d  [logid]: #"LPX64"#"LPX64"#%08x\n",
-                             cur_index, lir->lid_id.lgl_oid,
-                             lir->lid_id.lgl_ogr, lir->lid_id.lgl_ogen);
-        } else {
-                l = snprintf(out, remains,
-                             "[index]: %05d  [type]: %02x  [len]: %04d\n",
-                             cur_index, rec->lrh_type,
-                             rec->lrh_len);
-        }
-        out += l;
-        remains -= l;
-        if (remains <= 0) {
-                CERROR("not enough space for print log records\n");
-                RETURN(-LLOG_EEMPTY);
-        }
-
-        RETURN(0);
-}
-static int llog_remove_log(struct llog_handle *cat, struct llog_logid *logid)
-{
-        struct llog_handle *log;
-        int rc, index = 0;
-
-        ENTRY;
-        down_write(&cat->lgh_lock);
-        rc = llog_cat_id2handle(cat, &log, logid);
-        if (rc) {
-                CDEBUG(D_IOCTL, "cannot find log #"LPX64"#"LPX64"#%08x\n",
-                       logid->lgl_oid, logid->lgl_ogr, logid->lgl_ogen);
-                GOTO(out, rc = -ENOENT);
-        }
-
-        index = log->u.phd.phd_cookie.lgc_index;
-        LASSERT(index);
-        rc = llog_destroy(log);
-        if (rc) {
-                CDEBUG(D_IOCTL, "cannot destroy log\n");
-                GOTO(out, rc);
-        }
-        llog_cat_set_first_idx(cat, index);
-        rc = llog_cancel_rec(cat, index);
-out:
-        llog_free_handle(log);
-        up_write(&cat->lgh_lock);
-        RETURN(rc);
-
-}
-
-static int llog_delete_cb(struct llog_handle *handle, struct llog_rec_hdr *rec,
-                          void *data)
-{
-        struct  llog_logid_rec *lir = (struct llog_logid_rec*)rec;
-        int     rc;
-
-        ENTRY;
-        if (rec->lrh_type != LLOG_LOGID_MAGIC)
-              RETURN (-EINVAL);
-        rc = llog_remove_log(handle, &lir->lid_id);
-
-        RETURN(rc);
-}
-
-
-int llog_ioctl(struct llog_ctxt *ctxt, int cmd, struct obd_ioctl_data *data)
-{
-        struct llog_logid logid;
-        int err = 0;
-        struct llog_handle *handle = NULL;
-
-        ENTRY;
-        if (*data->ioc_inlbuf1 == '#') {
-                err = str2logid(&logid, data->ioc_inlbuf1, data->ioc_inllen1);
-                if (err)
-                        GOTO(out, err);
-                err = llog_create(ctxt, &handle, &logid, NULL);
-                if (err)
-                        GOTO(out, err);
-        } else if (*data->ioc_inlbuf1 == '$') {
-                char *name = data->ioc_inlbuf1 + 1;
-                err = llog_create(ctxt, &handle, NULL, name);
-                if (err)
-                        GOTO(out, err);
-        } else {
-                GOTO(out, err = -EINVAL);
-        }
-
-        err = llog_init_handle(handle, 0, NULL);
-        if (err)
-                GOTO(out_close, err = -ENOENT);
-
-        switch (cmd) {
-        case OBD_IOC_LLOG_INFO: {
-                int l;
-                int remains = data->ioc_inllen2 +
-                        size_round(data->ioc_inllen1);
-                char *out = data->ioc_bulk;
-
-                l = snprintf(out, remains,
-                             "logid:            #"LPX64"#"LPX64"#%08x\n"
-                             "flags:            %x (%s)\n"
-                             "records count:    %d\n"
-                             "last index:       %d\n",
-                             handle->lgh_id.lgl_oid, handle->lgh_id.lgl_ogr,
-                             handle->lgh_id.lgl_ogen,
-                             handle->lgh_hdr->llh_flags,
-                             handle->lgh_hdr->llh_flags &
-                             LLOG_F_IS_CAT ? "cat" : "plain",
-                             handle->lgh_hdr->llh_count,
-                             handle->lgh_last_idx);
-                out += l;
-                remains -= l;
-                if (remains <= 0)
-                        CERROR("not enough space for log header info\n");
-
-                GOTO(out_close, err);
-        }
-        case OBD_IOC_LLOG_CHECK: {
-                LASSERT(data->ioc_inllen1);
-                err = llog_process(handle, llog_check_cb, data, NULL);
-                if (err == -LLOG_EEMPTY)
-                        err = 0;
-                GOTO(out_close, err);
-        }
-
-        case OBD_IOC_LLOG_PRINT: {
-                LASSERT(data->ioc_inllen1);
-                err = llog_process(handle, class_config_dump_handler,data,NULL);
-                if (err == -LLOG_EEMPTY)
-                        err = 0;
-                else
-                        err = llog_process(handle, llog_print_cb, data, NULL);
-
-                GOTO(out_close, err);
-        }
-        case OBD_IOC_LLOG_CANCEL: {
-                struct llog_cookie cookie;
-                struct llog_logid plain;
-                char *endp;
-
-                cookie.lgc_index = simple_strtoul(data->ioc_inlbuf3, &endp, 0);
-                if (*endp != '\0')
-                        GOTO(out_close, err = -EINVAL);
-
-                if (handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT) {
-                        down_write(&handle->lgh_lock);
-                        err = llog_cancel_rec(handle, cookie.lgc_index);
-                        up_write(&handle->lgh_lock);
-                        GOTO(out_close, err);
-                }
-
-                err = str2logid(&plain, data->ioc_inlbuf2, data->ioc_inllen2);
-                if (err)
-                        GOTO(out_close, err);
-                cookie.lgc_lgl = plain;
-
-                if (!(handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT))
-                        GOTO(out_close, err = -EINVAL);
-
-                err = llog_cat_cancel_records(handle, 1, &cookie);
-                GOTO(out_close, err);
-        }
-        case OBD_IOC_LLOG_REMOVE: {
-                struct llog_logid plain;
-
-                if (handle->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN) {
-                        err = llog_destroy(handle);
-                        if (!err)
-                                llog_free_handle(handle);
-                        GOTO(out, err);
-                }
-
-                if (!(handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT))
-                        GOTO(out_close, err = -EINVAL);
-
-                if (data->ioc_inlbuf2) {
-                        /*remove indicate log from the catalog*/
-                        err = str2logid(&plain, data->ioc_inlbuf2,
-                                        data->ioc_inllen2);
-                        if (err)
-                                GOTO(out_close, err);
-                        err = llog_remove_log(handle, &plain);
-                } else {
-                        /*remove all the log of the catalog*/
-                        llog_process(handle, llog_delete_cb, NULL, NULL);
-                }
-                GOTO(out_close, err);
-        }
-        }
-
-out_close:
-        if (handle->lgh_hdr &&
-            handle->lgh_hdr->llh_flags & LLOG_F_IS_CAT)
-                llog_cat_put(handle);
-        else
-                llog_close(handle);
-out:
-        RETURN(err);
-}
-EXPORT_SYMBOL(llog_ioctl);
-
-int llog_catalog_list(struct obd_device *obd, int count,
-                      struct obd_ioctl_data *data)
-{
-        int size, i;
-        struct llog_catid *idarray;
-        struct llog_logid *id;
-        char name[32] = CATLIST;
-        char *out;
-        int l, remains, rc = 0;
-
-        ENTRY;
-        size = sizeof(*idarray) * count;
-
-        OBD_ALLOC(idarray, size);
-        if (!idarray)
-                RETURN(-ENOMEM);
-        memset(idarray, 0, size);
-
-        rc = llog_get_cat_list(obd, obd, name, count, idarray);
-        if (rc) {
-                OBD_FREE(idarray, size);
-                RETURN(rc);
-        }
-
-        out = data->ioc_bulk;
-        remains = data->ioc_inllen1;
-        for (i = 0; i < count; i++) {
-                id = &idarray[i].lci_logid;
-                l = snprintf(out, remains,
-                             "catalog log: #"LPX64"#"LPX64"#%08x\n",
-                             id->lgl_oid, id->lgl_ogr, id->lgl_ogen);
-                out += l;
-                remains -= l;
-                if (remains <= 0) {
-                        CWARN("not enough memory for catlog list\n");
-                        break;
-                }
-        }
-        OBD_FREE(idarray, size);
-        RETURN(0);
-
-}
-EXPORT_SYMBOL(llog_catalog_list);
diff --git a/lustre/obdclass/llog_lvfs.c b/lustre/obdclass/llog_lvfs.c
deleted file mode 100644
index 6204fac22891643afb817a9342d21695cb948cc7..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_lvfs.c
+++ /dev/null
@@ -1,926 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * OST<->MDS recovery logging infrastructure.
- *
- * Invariants in implementation:
- * - we do not share logs among different OST<->MDS connections, so that
- *   if an OST or MDS fails it need only look at log(s) relevant to itself
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <obd.h>
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <obd_ost.h>
-#include <libcfs/list.h>
-#include <lvfs.h>
-#include <lustre_fsfilt.h>
-#include <lustre_disk.h>
-#include "llog_internal.h"
-
-#if defined(__KERNEL__) && defined(LLOG_LVFS)
-
-static int llog_lvfs_pad(struct obd_device *obd, struct l_file *file,
-                                int len, int index)
-{
-        struct llog_rec_hdr rec = { 0 };
-        struct llog_rec_tail tail;
-        int rc;
-        ENTRY;
-
-        LASSERT(len >= LLOG_MIN_REC_SIZE && (len & 0x7) == 0);
-
-        tail.lrt_len = rec.lrh_len = len;
-        tail.lrt_index = rec.lrh_index = index;
-        rec.lrh_type = LLOG_PAD_MAGIC;
-
-        rc = fsfilt_write_record(obd, file, &rec, sizeof(rec), &file->f_pos, 0);
-        if (rc) {
-                CERROR("error writing padding record: rc %d\n", rc);
-                goto out;
-        }
-
-        file->f_pos += len - sizeof(rec) - sizeof(tail);
-        rc = fsfilt_write_record(obd, file, &tail, sizeof(tail),&file->f_pos,0);
-        if (rc) {
-                CERROR("error writing padding record: rc %d\n", rc);
-                goto out;
-        }
-
- out:
-        RETURN(rc);
-}
-
-static int llog_lvfs_write_blob(struct obd_device *obd, struct l_file *file,
-                                struct llog_rec_hdr *rec, void *buf, loff_t off)
-{
-        int rc;
-        struct llog_rec_tail end;
-        loff_t saved_off = file->f_pos;
-        int buflen = rec->lrh_len;
-        ENTRY;
-
-        file->f_pos = off;
-
-        if (buflen == 0) 
-                CWARN("0-length record\n");
-
-        if (!buf) {
-                rc = fsfilt_write_record(obd, file, rec, buflen,&file->f_pos,0);
-                if (rc) {
-                        CERROR("error writing log record: rc %d\n", rc);
-                        goto out;
-                }
-                GOTO(out, rc = 0);
-        }
-
-        /* the buf case */
-        rec->lrh_len = sizeof(*rec) + buflen + sizeof(end);
-        rc = fsfilt_write_record(obd, file, rec, sizeof(*rec), &file->f_pos, 0);
-        if (rc) {
-                CERROR("error writing log hdr: rc %d\n", rc);
-                goto out;
-        }
-
-        rc = fsfilt_write_record(obd, file, buf, buflen, &file->f_pos, 0);
-        if (rc) {
-                CERROR("error writing log buffer: rc %d\n", rc);
-                goto out;
-        }
-
-        end.lrt_len = rec->lrh_len;
-        end.lrt_index = rec->lrh_index;
-        rc = fsfilt_write_record(obd, file, &end, sizeof(end), &file->f_pos, 0);
-        if (rc) {
-                CERROR("error writing log tail: rc %d\n", rc);
-                goto out;
-        }
-
-        rc = 0;
- out:
-        if (saved_off > file->f_pos)
-                file->f_pos = saved_off;
-        LASSERT(rc <= 0);
-        RETURN(rc);
-}
-
-static int llog_lvfs_read_blob(struct obd_device *obd, struct l_file *file,
-                                void *buf, int size, loff_t off)
-{
-        loff_t offset = off;
-        int rc;
-        ENTRY;
-
-        rc = fsfilt_read_record(obd, file, buf, size, &offset);
-        if (rc) {
-                CERROR("error reading log record: rc %d\n", rc);
-                RETURN(rc);
-        }
-        RETURN(0);
-}
-
-static int llog_lvfs_read_header(struct llog_handle *handle)
-{
-        struct obd_device *obd;
-        int rc;
-        ENTRY;
-
-        LASSERT(sizeof(*handle->lgh_hdr) == LLOG_CHUNK_SIZE);
-
-        obd = handle->lgh_ctxt->loc_exp->exp_obd;
-
-        if (i_size_read(handle->lgh_file->f_dentry->d_inode) == 0) {
-                CDEBUG(D_RPCTRACE, "not reading header from 0-byte log\n");
-                RETURN(LLOG_EEMPTY);
-        }
-
-        rc = llog_lvfs_read_blob(obd, handle->lgh_file, handle->lgh_hdr,
-                                 LLOG_CHUNK_SIZE, 0);
-        if (rc) {
-                CERROR("error reading log header from %.*s\n",
-                       handle->lgh_file->f_dentry->d_name.len,
-                       handle->lgh_file->f_dentry->d_name.name);
-        } else {
-                struct llog_rec_hdr *llh_hdr = &handle->lgh_hdr->llh_hdr;
-
-                if (LLOG_REC_HDR_NEEDS_SWABBING(llh_hdr))
-                        lustre_swab_llog_hdr(handle->lgh_hdr);
-
-                if (llh_hdr->lrh_type != LLOG_HDR_MAGIC) {
-                        CERROR("bad log %.*s header magic: %#x (expected %#x)\n",
-                               handle->lgh_file->f_dentry->d_name.len,
-                               handle->lgh_file->f_dentry->d_name.name,
-                               llh_hdr->lrh_type, LLOG_HDR_MAGIC);
-                        rc = -EIO;
-                } else if (llh_hdr->lrh_len != LLOG_CHUNK_SIZE) {
-                        CERROR("incorrectly sized log %.*s header: %#x "
-                               "(expected %#x)\n",
-                               handle->lgh_file->f_dentry->d_name.len,
-                               handle->lgh_file->f_dentry->d_name.name,
-                               llh_hdr->lrh_len, LLOG_CHUNK_SIZE);
-                        CERROR("you may need to re-run lconf --write_conf.\n");
-                        rc = -EIO;
-                }
-        }
-
-        handle->lgh_last_idx = handle->lgh_hdr->llh_tail.lrt_index;
-        handle->lgh_file->f_pos = i_size_read(handle->lgh_file->f_dentry->d_inode);
-
-        RETURN(rc);
-}
-
-/* returns negative in on error; 0 if success && reccookie == 0; 1 otherwise */
-/* appends if idx == -1, otherwise overwrites record idx. */
-static int llog_lvfs_write_rec(struct llog_handle *loghandle,
-                               struct llog_rec_hdr *rec,
-                               struct llog_cookie *reccookie, int cookiecount,
-                               void *buf, int idx)
-{
-        struct llog_log_hdr *llh;
-        int reclen = rec->lrh_len, index, rc;
-        struct llog_rec_tail *lrt;
-        struct obd_device *obd;
-        struct file *file;
-        size_t left;
-        ENTRY;
-
-        llh = loghandle->lgh_hdr;
-        file = loghandle->lgh_file;
-        obd = loghandle->lgh_ctxt->loc_exp->exp_obd;
-
-        /* record length should not bigger than LLOG_CHUNK_SIZE */
-        if (buf)
-                rc = (reclen > LLOG_CHUNK_SIZE - sizeof(struct llog_rec_hdr) -
-                      sizeof(struct llog_rec_tail)) ? -E2BIG : 0;
-        else
-                rc = (reclen > LLOG_CHUNK_SIZE) ? -E2BIG : 0;
-        if (rc)
-                RETURN(rc);
-
-        if (buf)
-                /* write_blob adds header and tail to lrh_len. */ 
-                reclen = sizeof(*rec) + rec->lrh_len + 
-                        sizeof(struct llog_rec_tail);
-
-        if (idx != -1) {
-                loff_t saved_offset;
-
-                /* no header: only allowed to insert record 1 */
-                if (idx != 1 && !i_size_read(file->f_dentry->d_inode)) {
-                        CERROR("idx != -1 in empty log\n");
-                        LBUG();
-                }
-
-                if (idx && llh->llh_size && llh->llh_size != rec->lrh_len)
-                        RETURN(-EINVAL);
-
-                if (!ext2_test_bit(idx, llh->llh_bitmap)) 
-                        CERROR("Modify unset record %u\n", idx);
-                if (idx != rec->lrh_index)
-                        CERROR("Index mismatch %d %u\n", idx, rec->lrh_index);
-
-                rc = llog_lvfs_write_blob(obd, file, &llh->llh_hdr, NULL, 0);
-                /* we are done if we only write the header or on error */
-                if (rc || idx == 0)
-                        RETURN(rc);
-
-                /* Assumes constant lrh_len */
-                saved_offset = sizeof(*llh) + (idx - 1) * reclen;
-
-                if (buf) {
-                        struct llog_rec_hdr check;
-
-                        /* We assume that caller has set lgh_cur_* */
-                        saved_offset = loghandle->lgh_cur_offset;
-                        CDEBUG(D_OTHER,
-                               "modify record "LPX64": idx:%d/%u/%d, len:%u "
-                               "offset %llu\n",
-                               loghandle->lgh_id.lgl_oid, idx, rec->lrh_index,
-                               loghandle->lgh_cur_idx, rec->lrh_len,
-                               (long long)(saved_offset - sizeof(*llh)));
-                        if (rec->lrh_index != loghandle->lgh_cur_idx) {
-                                CERROR("modify idx mismatch %u/%d\n",
-                                       idx, loghandle->lgh_cur_idx);
-                                RETURN(-EFAULT);
-                        }
-#if 1  /* FIXME remove this safety check at some point */
-                        /* Verify that the record we're modifying is the 
-                           right one. */
-                        rc = llog_lvfs_read_blob(obd, file, &check,
-                                                 sizeof(check), saved_offset);
-                        if (check.lrh_index != idx || check.lrh_len != reclen) {
-                                CERROR("Bad modify idx %u/%u size %u/%u (%d)\n",
-                                       idx, check.lrh_index, reclen, 
-                                       check.lrh_len, rc);
-                                RETURN(-EFAULT);
-                        }
-#endif
-                }
-
-                rc = llog_lvfs_write_blob(obd, file, rec, buf, saved_offset);
-                if (rc == 0 && reccookie) {
-                        reccookie->lgc_lgl = loghandle->lgh_id;
-                        reccookie->lgc_index = idx;
-                        rc = 1;
-                }
-                RETURN(rc);
-        }
-
-        /* Make sure that records don't cross a chunk boundary, so we can
-         * process them page-at-a-time if needed.  If it will cross a chunk
-         * boundary, write in a fake (but referenced) entry to pad the chunk.
-         *
-         * We know that llog_current_log() will return a loghandle that is
-         * big enough to hold reclen, so all we care about is padding here.
-         */
-        left = LLOG_CHUNK_SIZE - (file->f_pos & (LLOG_CHUNK_SIZE - 1));
-
-        /* NOTE: padding is a record, but no bit is set */
-        if (left != 0 && left != reclen &&
-            left < (reclen + LLOG_MIN_REC_SIZE)) {
-                loghandle->lgh_last_idx++;
-                rc = llog_lvfs_pad(obd, file, left, loghandle->lgh_last_idx);
-                if (rc)
-                        RETURN(rc);
-                /* if it's the last idx in log file, then return -ENOSPC */
-                if (loghandle->lgh_last_idx == LLOG_BITMAP_SIZE(llh) - 1)
-                        RETURN(-ENOSPC);
-        }
-
-        loghandle->lgh_last_idx++;
-        index = loghandle->lgh_last_idx;
-        LASSERT(index < LLOG_BITMAP_SIZE(llh));
-        rec->lrh_index = index;
-        if (buf == NULL) {
-                lrt = (struct llog_rec_tail *)
-                        ((char *)rec + rec->lrh_len - sizeof(*lrt));
-                lrt->lrt_len = rec->lrh_len;
-                lrt->lrt_index = rec->lrh_index;
-        }
-        if (ext2_set_bit(index, llh->llh_bitmap)) {
-                CERROR("argh, index %u already set in log bitmap?\n", index);
-                LBUG(); /* should never happen */
-        }
-        llh->llh_count++;
-        llh->llh_tail.lrt_index = index;
-
-        rc = llog_lvfs_write_blob(obd, file, &llh->llh_hdr, NULL, 0);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_lvfs_write_blob(obd, file, rec, buf, file->f_pos);
-        if (rc)
-                RETURN(rc);
-
-        CDEBUG(D_RPCTRACE, "added record "LPX64": idx: %u, %u bytes\n",
-               loghandle->lgh_id.lgl_oid, index, rec->lrh_len);
-        if (rc == 0 && reccookie) {
-                reccookie->lgc_lgl = loghandle->lgh_id;
-                reccookie->lgc_index = index;
-                if ((rec->lrh_type == MDS_UNLINK_REC) || 
-                                (rec->lrh_type == MDS_SETATTR_REC))
-                        reccookie->lgc_subsys = LLOG_MDS_OST_ORIG_CTXT;
-                else if (rec->lrh_type == OST_SZ_REC)
-                        reccookie->lgc_subsys = LLOG_SIZE_ORIG_CTXT;
-                else if (rec->lrh_type == OST_RAID1_REC)
-                        reccookie->lgc_subsys = LLOG_RD1_ORIG_CTXT;
-                else
-                        reccookie->lgc_subsys = -1;
-                rc = 1;
-        }
-        if (rc == 0 && rec->lrh_type == LLOG_GEN_REC)
-                rc = 1;
-
-        RETURN(rc);
-}
-
-/* We can skip reading at least as many log blocks as the number of
-* minimum sized log records we are skipping.  If it turns out
-* that we are not far enough along the log (because the
-* actual records are larger than minimum size) we just skip
-* some more records. */
-
-static void llog_skip_over(__u64 *off, int curr, int goal)
-{
-        if (goal <= curr)
-                return;
-        *off = (*off + (goal-curr-1) * LLOG_MIN_REC_SIZE) &
-                ~(LLOG_CHUNK_SIZE - 1);
-}
-
-
-/* sets:
- *  - cur_offset to the furthest point read in the log file
- *  - cur_idx to the log index preceeding cur_offset
- * returns -EIO/-EINVAL on error
- */
-static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx,
-                                int next_idx, __u64 *cur_offset, void *buf,
-                                int len)
-{
-        int rc;
-        ENTRY;
-
-        if (len == 0 || len & (LLOG_CHUNK_SIZE - 1))
-                RETURN(-EINVAL);
-
-        CDEBUG(D_OTHER, "looking for log index %u (cur idx %u off "LPU64")\n",
-               next_idx, *cur_idx, *cur_offset);
-
-        while (*cur_offset < i_size_read(loghandle->lgh_file->f_dentry->d_inode)) {
-                struct llog_rec_hdr *rec;
-                struct llog_rec_tail *tail;
-                loff_t ppos;
-
-                llog_skip_over(cur_offset, *cur_idx, next_idx);
-
-                ppos = *cur_offset;
-                rc = fsfilt_read_record(loghandle->lgh_ctxt->loc_exp->exp_obd,
-                                        loghandle->lgh_file, buf, len,
-                                        &ppos);
-                if (rc) {
-                        CERROR("Cant read llog block at log id "LPU64
-                               "/%u offset "LPU64"\n",
-                               loghandle->lgh_id.lgl_oid,
-                               loghandle->lgh_id.lgl_ogen,
-                               *cur_offset);
-                        RETURN(rc);
-                }
-
-                /* put number of bytes read into rc to make code simpler */
-                rc = ppos - *cur_offset;
-                *cur_offset = ppos;
-                
-                if (rc < len) {
-                        /* signal the end of the valid buffer to llog_process */
-                        memset(buf + rc, 0, len - rc);
-                }
-
-                if (rc == 0) /* end of file, nothing to do */
-                        RETURN(0);
-
-                if (rc < sizeof(*tail)) {
-                        CERROR("Invalid llog block at log id "LPU64"/%u offset "
-                               LPU64"\n", loghandle->lgh_id.lgl_oid,
-                               loghandle->lgh_id.lgl_ogen, *cur_offset);
-                        RETURN(-EINVAL);
-                }
-
-                rec = buf;
-                tail = (struct llog_rec_tail *)((char *)buf + rc -
-                                                sizeof(struct llog_rec_tail));
-
-                if (LLOG_REC_HDR_NEEDS_SWABBING(rec)) {
-                        lustre_swab_llog_rec(rec, tail);
-                }
-
-                *cur_idx = tail->lrt_index;
-
-                /* this shouldn't happen */
-                if (tail->lrt_index == 0) {
-                        CERROR("Invalid llog tail at log id "LPU64"/%u offset "
-                               LPU64"\n", loghandle->lgh_id.lgl_oid,
-                               loghandle->lgh_id.lgl_ogen, *cur_offset);
-                        RETURN(-EINVAL);
-                }
-                if (tail->lrt_index < next_idx)
-                        continue;
-
-                /* sanity check that the start of the new buffer is no farther
-                 * than the record that we wanted.  This shouldn't happen. */
-                if (rec->lrh_index > next_idx) {
-                        CERROR("missed desired record? %u > %u\n",
-                               rec->lrh_index, next_idx);
-                        RETURN(-ENOENT);
-                }
-                RETURN(0);
-        }
-        RETURN(-EIO);
-}
-
-static int llog_lvfs_prev_block(struct llog_handle *loghandle,
-                                int prev_idx, void *buf, int len)
-{
-        __u64 cur_offset;
-        int rc;
-        ENTRY;
-
-        if (len == 0 || len & (LLOG_CHUNK_SIZE - 1))
-                RETURN(-EINVAL);
-
-        CDEBUG(D_OTHER, "looking for log index %u\n", prev_idx);
-
-        cur_offset = LLOG_CHUNK_SIZE;
-        llog_skip_over(&cur_offset, 0, prev_idx);
-
-        while (cur_offset < i_size_read(loghandle->lgh_file->f_dentry->d_inode)) {
-                struct llog_rec_hdr *rec;
-                struct llog_rec_tail *tail;
-                loff_t ppos;
-
-                ppos = cur_offset;
-
-                rc = fsfilt_read_record(loghandle->lgh_ctxt->loc_exp->exp_obd,
-                                        loghandle->lgh_file, buf, len,
-                                        &ppos);
-                if (rc) {
-                        CERROR("Cant read llog block at log id "LPU64
-                               "/%u offset "LPU64"\n",
-                               loghandle->lgh_id.lgl_oid,
-                               loghandle->lgh_id.lgl_ogen,
-                               cur_offset);
-                        RETURN(rc);
-                }
-
-                /* put number of bytes read into rc to make code simpler */
-                rc = ppos - cur_offset;
-                cur_offset = ppos;
-
-                if (rc == 0) /* end of file, nothing to do */
-                        RETURN(0);
-
-                if (rc < sizeof(*tail)) {
-                        CERROR("Invalid llog block at log id "LPU64"/%u offset "
-                               LPU64"\n", loghandle->lgh_id.lgl_oid,
-                               loghandle->lgh_id.lgl_ogen, cur_offset);
-                        RETURN(-EINVAL);
-                }
-
-                tail = buf + rc - sizeof(struct llog_rec_tail);
-
-                /* this shouldn't happen */
-                if (tail->lrt_index == 0) {
-                        CERROR("Invalid llog tail at log id "LPU64"/%u offset "
-                               LPU64"\n", loghandle->lgh_id.lgl_oid,
-                               loghandle->lgh_id.lgl_ogen, cur_offset);
-                        RETURN(-EINVAL);
-                }
-                if (le32_to_cpu(tail->lrt_index) < prev_idx)
-                        continue;
-
-                /* sanity check that the start of the new buffer is no farther
-                 * than the record that we wanted.  This shouldn't happen. */
-                rec = buf;
-                if (le32_to_cpu(rec->lrh_index) > prev_idx) {
-                        CERROR("missed desired record? %u > %u\n",
-                               le32_to_cpu(rec->lrh_index), prev_idx);
-                        RETURN(-ENOENT);
-                }
-                RETURN(0);
-        }
-        RETURN(-EIO);
-}
-
-static struct file *llog_filp_open(char *dir, char *name, int flags, int mode)
-{
-        char *logname;
-        struct file *filp;
-        int len;
-
-        OBD_ALLOC(logname, PATH_MAX);
-        if (logname == NULL)
-                return ERR_PTR(-ENOMEM);
-
-        len = snprintf(logname, PATH_MAX, "%s/%s", dir, name);
-        if (len >= PATH_MAX - 1) {
-                filp = ERR_PTR(-ENAMETOOLONG);
-        } else {
-                filp = l_filp_open(logname, flags, mode);
-                if (IS_ERR(filp))
-                        CERROR("logfile creation %s: %ld\n", logname,
-                               PTR_ERR(filp));
-        }
-        OBD_FREE(logname, PATH_MAX);
-        return filp;
-}
-
-/* This is a callback from the llog_* functions.
- * Assumes caller has already pushed us into the kernel context. */
-static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
-                            struct llog_logid *logid, char *name)
-{
-        struct llog_handle *handle;
-        struct obd_device *obd;
-        struct l_dentry *dchild = NULL;
-        struct obdo *oa = NULL;
-        int rc = 0, cleanup_phase = 1;
-        int open_flags = O_RDWR | O_CREAT | O_LARGEFILE;
-        ENTRY;
-
-        handle = llog_alloc_handle();
-        if (handle == NULL)
-                RETURN(-ENOMEM);
-        *res = handle;
-
-        LASSERT(ctxt);
-        LASSERT(ctxt->loc_exp);
-        obd = ctxt->loc_exp->exp_obd;
-
-        if (logid != NULL) {
-                dchild = obd_lvfs_fid2dentry(ctxt->loc_exp, logid->lgl_oid,
-                                             logid->lgl_ogen, logid->lgl_ogr);
-
-                if (IS_ERR(dchild)) {
-                        rc = PTR_ERR(dchild);
-                        CERROR("error looking up logfile "LPX64":0x%x: rc %d\n",
-                               logid->lgl_oid, logid->lgl_ogen, rc);
-                        GOTO(cleanup, rc);
-                }
-
-                cleanup_phase = 2;
-                if (dchild->d_inode == NULL) {
-                        rc = -ENOENT;
-                        CERROR("nonexistent log file "LPX64":"LPX64": rc %d\n",
-                               logid->lgl_oid, logid->lgl_ogr, rc);
-                        GOTO(cleanup, rc);
-                }
-
-                handle->lgh_file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild,
-                                                    O_RDWR | O_LARGEFILE);
-                if (IS_ERR(handle->lgh_file)) {
-                        rc = PTR_ERR(handle->lgh_file);
-                        CERROR("error opening logfile "LPX64"0x%x: rc %d\n",
-                               logid->lgl_oid, logid->lgl_ogen, rc);
-                        GOTO(cleanup, rc);
-                }
-
-                /* assign the value of lgh_id for handle directly */
-                handle->lgh_id = *logid;
-
-        } else if (name) {
-                /* COMPAT_146 */
-                if (strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME) == 0) {
-                        handle->lgh_file = llog_filp_open(MDT_LOGS_DIR, name, 
-                                                          open_flags, 0644);
-                } else {
-                        /* end COMPAT_146 */
-                        handle->lgh_file = llog_filp_open(MOUNT_CONFIGS_DIR,
-                                                          name, open_flags, 
-                                                          0644);
-                }
-                if (IS_ERR(handle->lgh_file))
-                        GOTO(cleanup, rc = PTR_ERR(handle->lgh_file));
-
-                handle->lgh_id.lgl_ogr = 1;
-                handle->lgh_id.lgl_oid =
-                        handle->lgh_file->f_dentry->d_inode->i_ino;
-                handle->lgh_id.lgl_ogen =
-                        handle->lgh_file->f_dentry->d_inode->i_generation;
-        } else {
-                OBDO_ALLOC(oa);
-                if (oa == NULL)
-                        GOTO(cleanup, rc = -ENOMEM);
-
-                oa->o_gr = FILTER_GROUP_LLOG;
-                oa->o_valid = OBD_MD_FLGENER | OBD_MD_FLGROUP;
-
-                rc = obd_create(ctxt->loc_exp, oa, NULL, NULL);
-                if (rc)
-                        GOTO(cleanup, rc);
-
-                dchild = obd_lvfs_fid2dentry(ctxt->loc_exp, oa->o_id,
-                                             oa->o_generation, oa->o_gr);
-
-                if (IS_ERR(dchild))
-                        GOTO(cleanup, rc = PTR_ERR(dchild));
-                cleanup_phase = 2;
-                handle->lgh_file = l_dentry_open(&obd->obd_lvfs_ctxt, dchild,
-                                                 open_flags);
-                if (IS_ERR(handle->lgh_file))
-                        GOTO(cleanup, rc = PTR_ERR(handle->lgh_file));
-
-                handle->lgh_id.lgl_ogr = oa->o_gr;
-                handle->lgh_id.lgl_oid = oa->o_id;
-                handle->lgh_id.lgl_ogen = oa->o_generation;
-        }
-
-        handle->lgh_ctxt = ctxt;
- finish:
-        if (oa)
-                OBDO_FREE(oa);
-        RETURN(rc);
-cleanup:
-        switch (cleanup_phase) {
-        case 2:
-                l_dput(dchild);
-        case 1:
-                llog_free_handle(handle);
-        }
-        goto finish;
-}
-
-static int llog_lvfs_close(struct llog_handle *handle)
-{
-        int rc;
-        ENTRY;
-
-        rc = filp_close(handle->lgh_file, 0);
-        if (rc)
-                CERROR("error closing log: rc %d\n", rc);
-        RETURN(rc);
-}
-
-static int llog_lvfs_destroy(struct llog_handle *handle)
-{
-        struct dentry *fdentry;
-        struct obdo *oa;
-        struct obd_device *obd = handle->lgh_ctxt->loc_exp->exp_obd;
-        char *dir;
-        int rc;
-        ENTRY;
-
-        /* COMPAT_146 */
-        if (strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME) == 0)
-                dir = MDT_LOGS_DIR;
-        else
-                /* end COMPAT_146 */
-                dir = MOUNT_CONFIGS_DIR;
-
-        fdentry = handle->lgh_file->f_dentry;
-        if (strcmp(fdentry->d_parent->d_name.name, dir) == 0) {
-                struct inode *inode = fdentry->d_parent->d_inode;
-                struct lvfs_run_ctxt saved;
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                dget(fdentry);
-                rc = llog_lvfs_close(handle);
-
-                if (rc == 0) {
-                        LOCK_INODE_MUTEX(inode);
-                        rc = vfs_unlink(inode, fdentry);
-                        UNLOCK_INODE_MUTEX(inode);
-                }
-
-                dput(fdentry);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                RETURN(rc);
-        }
-
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                RETURN(-ENOMEM);
-
-        oa->o_id = handle->lgh_id.lgl_oid;
-        oa->o_gr = handle->lgh_id.lgl_ogr;
-        oa->o_generation = handle->lgh_id.lgl_ogen;
-        oa->o_valid = OBD_MD_FLID | OBD_MD_FLGROUP | OBD_MD_FLGENER;
-
-        rc = llog_lvfs_close(handle);
-        if (rc)
-                GOTO(out, rc);
-
-        rc = obd_destroy(handle->lgh_ctxt->loc_exp, oa, NULL, NULL, NULL);
- out:
-        OBDO_FREE(oa);
-        RETURN(rc);
-}
-
-/* reads the catalog list */
-int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
-                      char *name, int count, struct llog_catid *idarray)
-{
-        struct lvfs_run_ctxt saved;
-        struct l_file *file;
-        int rc;
-        int size = sizeof(*idarray) * count;
-        loff_t off = 0;
-        ENTRY;
-
-        if (!count) 
-                RETURN(0);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        file = filp_open(name, O_RDWR | O_CREAT | O_LARGEFILE, 0700);
-        if (!file || IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("OBD filter: cannot open/create %s: rc = %d\n",
-                       name, rc);
-                GOTO(out, rc);
-        }
-        
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", name,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(out, rc = -ENOENT);
-        }
-
-        CDEBUG(D_CONFIG, "cat list: disk size=%d, read=%d\n",
-               (int)i_size_read(file->f_dentry->d_inode), size);
-
-        rc = fsfilt_read_record(disk_obd, file, idarray, size, &off);
-        if (rc) {
-                CERROR("OBD filter: error reading %s: rc %d\n", name, rc);
-                GOTO(out, rc);
-        }
-
-        EXIT;
- out:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (file && !IS_ERR(file))
-                rc = filp_close(file, 0);
-        return rc;
-}
-EXPORT_SYMBOL(llog_get_cat_list);
-
-/* writes the cat list */
-int llog_put_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
-                      char *name, int count, struct llog_catid *idarray)
-{
-        struct lvfs_run_ctxt saved;
-        struct l_file *file;
-        int rc;
-        int size = sizeof(*idarray) * count;
-        loff_t off = 0;
-
-        if (!count) 
-                return (0);
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        file = filp_open(name, O_RDWR | O_CREAT | O_LARGEFILE, 0700);
-        if (!file || IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("OBD filter: cannot open/create %s: rc = %d\n",
-                       name, rc);
-                GOTO(out, rc);
-        }
-
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", name,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(out, rc = -ENOENT);
-        }
-
-        rc = fsfilt_write_record(disk_obd, file, idarray, size, &off, 1);
-        if (rc) {
-                CDEBUG(D_INODE,"OBD filter: error reading %s: rc %d\n",
-                       name, rc);
-                GOTO(out, rc);
-        }
-
- out:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (file && !IS_ERR(file))
-                rc = filp_close(file, 0);
-        RETURN(rc);
-}
-
-struct llog_operations llog_lvfs_ops = {
-        lop_write_rec:   llog_lvfs_write_rec,
-        lop_next_block:  llog_lvfs_next_block,
-        lop_prev_block:  llog_lvfs_prev_block,
-        lop_read_header: llog_lvfs_read_header,
-        lop_create:      llog_lvfs_create,
-        lop_destroy:     llog_lvfs_destroy,
-        lop_close:       llog_lvfs_close,
-        //        lop_cancel: llog_lvfs_cancel,
-};
-
-EXPORT_SYMBOL(llog_lvfs_ops);
-
-#else /* !__KERNEL__ */
-
-static int llog_lvfs_read_header(struct llog_handle *handle)
-{
-        LBUG();
-        return 0;
-}
-
-static int llog_lvfs_write_rec(struct llog_handle *loghandle,
-                               struct llog_rec_hdr *rec,
-                               struct llog_cookie *reccookie, int cookiecount,
-                               void *buf, int idx)
-{
-        LBUG();
-        return 0;
-}
-
-static int llog_lvfs_next_block(struct llog_handle *loghandle, int *cur_idx,
-                                int next_idx, __u64 *cur_offset, void *buf,
-                                int len)
-{
-        LBUG();
-        return 0;
-}
-
-static int llog_lvfs_prev_block(struct llog_handle *loghandle,
-                                int prev_idx, void *buf, int len)
-{
-        LBUG();
-        return 0;
-}
-
-static int llog_lvfs_create(struct llog_ctxt *ctxt, struct llog_handle **res,
-                            struct llog_logid *logid, char *name)
-{
-        LBUG();
-        return 0;
-}
-
-static int llog_lvfs_close(struct llog_handle *handle)
-{
-        LBUG();
-        return 0;
-}
-
-static int llog_lvfs_destroy(struct llog_handle *handle)
-{
-        LBUG();
-        return 0;
-}
-
-int llog_get_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
-                      char *name, int count, struct llog_catid *idarray)
-{
-        LBUG();
-        return 0;
-}
-
-int llog_put_cat_list(struct obd_device *obd, struct obd_device *disk_obd,
-                      char *name, int count, struct llog_catid *idarray)
-{
-        LBUG();
-        return 0;
-}
-
-struct llog_operations llog_lvfs_ops = {
-        lop_write_rec:   llog_lvfs_write_rec,
-        lop_next_block:  llog_lvfs_next_block,
-        lop_prev_block:  llog_lvfs_prev_block,
-        lop_read_header: llog_lvfs_read_header,
-        lop_create:      llog_lvfs_create,
-        lop_destroy:     llog_lvfs_destroy,
-        lop_close:       llog_lvfs_close,
-//        lop_cancel:      llog_lvfs_cancel,
-};
-#endif
diff --git a/lustre/obdclass/llog_obd.c b/lustre/obdclass/llog_obd.c
deleted file mode 100644
index c9e9a95d1ae99e150b6fa384fabdc7d0864082f6..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_obd.c
+++ /dev/null
@@ -1,434 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2005 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <libcfs/list.h>
-#include "llog_internal.h"
-
-/* helper functions for calling the llog obd methods */
-static struct llog_ctxt* llog_new_ctxt(struct obd_device *obd)
-{
-        struct llog_ctxt *ctxt;
-
-        OBD_ALLOC(ctxt, sizeof(*ctxt));
-        if (!ctxt)
-                return NULL;
-        
-        ctxt->loc_obd = obd;
-        atomic_set(&ctxt->loc_refcount, 1);
-        
-        return ctxt;
-}
-
-static void llog_ctxt_destroy(struct llog_ctxt *ctxt)
-{
-        if (ctxt->loc_exp)
-                class_export_put(ctxt->loc_exp);
-        OBD_FREE(ctxt, sizeof(*ctxt));
-        return;
-}
-
-int __llog_ctxt_put(struct llog_ctxt *ctxt)
-{
-        struct obd_device *obd;
-        int rc = 0;
-
-        obd = ctxt->loc_obd;
-        spin_lock(&obd->obd_dev_lock);
-        if (!atomic_dec_and_test(&ctxt->loc_refcount)) {
-                spin_unlock(&obd->obd_dev_lock);
-                return rc;
-        }
-        obd->obd_llog_ctxt[ctxt->loc_idx] = NULL;
-        spin_unlock(&obd->obd_dev_lock);
-
-	LASSERT(obd->obd_stopping == 1 || obd->obd_set_up == 0);
-        /* cleanup the llog ctxt here */
-        if (CTXTP(ctxt, cleanup))
-                rc = CTXTP(ctxt, cleanup)(ctxt);
- 
-        llog_ctxt_destroy(ctxt);
-        wake_up(&obd->obd_llog_waitq);
-        return rc;
-}
-EXPORT_SYMBOL(__llog_ctxt_put);
- 
-int llog_cleanup(struct llog_ctxt *ctxt)
-{
-        struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
-        struct obd_device *obd = ctxt->loc_obd;
-        int rc, idx;
-        ENTRY;
-
-        if (!ctxt) {
-                CERROR("No ctxt\n");
-                RETURN(-ENODEV);
-        }
-
-        /*banlance the ctxt get when calling llog_cleanup */
-        llog_ctxt_put(ctxt);
-
-        /* sync with other llog ctxt user thread */
-        spin_lock(&obd->obd_dev_lock);
-	LASSERT(obd->obd_stopping == 1 || obd->obd_set_up == 0);
-        spin_unlock(&obd->obd_dev_lock);
-
-        idx = ctxt->loc_idx;
-        /*try to free the ctxt */
-        rc = __llog_ctxt_put(ctxt);
-
-        l_wait_event(obd->obd_llog_waitq, llog_ctxt_null(obd, idx), &lwi);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cleanup);
-
-int llog_setup(struct obd_device *obd, int index, struct obd_device *disk_obd,
-               int count, struct llog_logid *logid, struct llog_operations *op)
-{
-        int rc = 0;
-        struct llog_ctxt *ctxt;
-        ENTRY;
-
-        if (index < 0 || index >= LLOG_MAX_CTXTS)
-                RETURN(-EFAULT);
-
-        ctxt = llog_get_context(obd, index); 
-        if (ctxt) {
-                /* mds_lov_update_mds might call here multiple times. So if the
-                   llog is already set up then don't to do it again. */
-                CDEBUG(D_CONFIG, "obd %s ctxt %d already set up\n", 
-                       obd->obd_name, index);
-                LASSERT(ctxt->loc_obd == obd);
-                LASSERT(ctxt->loc_exp == disk_obd->obd_self_export);
-                LASSERT(ctxt->loc_logops == op);
-                llog_ctxt_put(ctxt); 
-                GOTO(out, rc = 0);
-        }
-        ctxt = llog_new_ctxt(obd);
-        if (!ctxt)
-                GOTO(out, rc = -ENOMEM);
-
-        obd->obd_llog_ctxt[index] = ctxt;
-        ctxt->loc_exp = class_export_get(disk_obd->obd_self_export);
-        ctxt->loc_idx = index;
-        ctxt->loc_logops = op;
-        sema_init(&ctxt->loc_sem, 1);
-
-        if (op->lop_setup)
-                rc = op->lop_setup(obd, index, disk_obd, count, logid);
-
-        if (rc) {
-                llog_ctxt_destroy(ctxt);
-                obd->obd_llog_ctxt[index] = NULL;
-        }
-out:
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_setup);
-
-int llog_sync(struct llog_ctxt *ctxt, struct obd_export *exp)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (!ctxt)
-                RETURN(0);
-
-        if (CTXTP(ctxt, sync))
-                rc = CTXTP(ctxt, sync)(ctxt, exp);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_sync);
-
-int llog_add(struct llog_ctxt *ctxt, struct llog_rec_hdr *rec,
-                struct lov_stripe_md *lsm, struct llog_cookie *logcookies,
-                int numcookies)
-{
-        __u32 cap;
-        int rc;
-        ENTRY;
-
-        if (!ctxt) {
-                CERROR("No ctxt\n");
-                RETURN(-ENODEV);
-        }
-        
-        CTXT_CHECK_OP(ctxt, add, -EOPNOTSUPP);
-        cap = current->cap_effective;             
-        cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
-        rc = CTXTP(ctxt, add)(ctxt, rec, lsm, logcookies, numcookies);
-        current->cap_effective = cap; 
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_add);
-
-int llog_cancel(struct llog_ctxt *ctxt, struct lov_stripe_md *lsm,
-                int count, struct llog_cookie *cookies, int flags)
-{
-        int rc;
-        ENTRY;
-
-        if (!ctxt) {
-                CERROR("No ctxt\n");
-                RETURN(-ENODEV);
-        }
-        
-        CTXT_CHECK_OP(ctxt, cancel, -EOPNOTSUPP);
-        rc = CTXTP(ctxt, cancel)(ctxt, lsm, count, cookies, flags);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cancel);
-
-/* callback func for llog_process in llog_obd_origin_setup */
-static int cat_cancel_cb(struct llog_handle *cathandle,
-                          struct llog_rec_hdr *rec, void *data)
-{
-        struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
-        struct llog_handle *loghandle;
-        struct llog_log_hdr *llh;
-        int rc, index;
-        ENTRY;
-
-        if (rec->lrh_type != LLOG_LOGID_MAGIC) {
-                CERROR("invalid record in catalog\n");
-                RETURN(-EINVAL);
-        }
-        CDEBUG(D_HA, "processing log "LPX64":%x at index %u of catalog "
-               LPX64"\n", lir->lid_id.lgl_oid, lir->lid_id.lgl_ogen,
-               rec->lrh_index, cathandle->lgh_id.lgl_oid);
-
-        rc = llog_cat_id2handle(cathandle, &loghandle, &lir->lid_id);
-        if (rc) {
-                CERROR("Cannot find handle for log "LPX64"\n",
-                       lir->lid_id.lgl_oid);
-                RETURN(rc);
-        }
-
-        llh = loghandle->lgh_hdr;
-        if ((llh->llh_flags & LLOG_F_ZAP_WHEN_EMPTY) &&
-            (llh->llh_count == 1)) {
-                rc = llog_destroy(loghandle);
-                if (rc)
-                        CERROR("failure destroying log in postsetup: %d\n", rc);
-
-                index = loghandle->u.phd.phd_cookie.lgc_index;
-                llog_free_handle(loghandle);
-
-                LASSERT(index);
-                llog_cat_set_first_idx(cathandle, index);
-                rc = llog_cancel_rec(cathandle, index);
-                if (rc == 0)
-                        CDEBUG(D_HA, "cancel log "LPX64":%x at index %u of "
-                               "catalog "LPX64"\n", lir->lid_id.lgl_oid,
-                               lir->lid_id.lgl_ogen, rec->lrh_index,
-                               cathandle->lgh_id.lgl_oid);
-        }
-
-        RETURN(rc);
-}
-
-/* lop_setup method for filter/osc */
-// XXX how to set exports
-int llog_obd_origin_setup(struct obd_device *obd, int index,
-                          struct obd_device *disk_obd, int count,
-                          struct llog_logid *logid)
-{
-        struct llog_ctxt *ctxt;
-        struct llog_handle *handle;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        ENTRY;
-
-        if (count == 0)
-                RETURN(0);
-
-        LASSERT(count == 1);
-
-        ctxt = llog_get_context(obd, index);
-        LASSERT(ctxt);
-        llog_gen_init(ctxt);
-
-        if (logid->lgl_oid)
-                rc = llog_create(ctxt, &handle, logid, NULL);
-        else {
-                rc = llog_create(ctxt, &handle, NULL, NULL);
-                if (!rc)
-                        *logid = handle->lgh_id;
-        }
-        if (rc)
-                GOTO(out, rc);
-
-        ctxt->loc_handle = handle;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        rc = llog_init_handle(handle, LLOG_F_IS_CAT, NULL);
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        rc = llog_process(handle, (llog_cb_t)cat_cancel_cb, NULL, NULL);
-        if (rc)
-                CERROR("llog_process with cat_cancel_cb failed: %d\n", rc);
-out:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_obd_origin_setup);
-
-int llog_obd_origin_cleanup(struct llog_ctxt *ctxt)
-{
-        struct llog_handle *cathandle, *n, *loghandle;
-        struct llog_log_hdr *llh;
-        int rc, index;
-        ENTRY;
-
-        if (!ctxt)
-                RETURN(0);
-
-        cathandle = ctxt->loc_handle;
-        if (cathandle) {
-                list_for_each_entry_safe(loghandle, n,
-                                         &cathandle->u.chd.chd_head,
-                                         u.phd.phd_entry) {
-                        llh = loghandle->lgh_hdr;
-                        if ((llh->llh_flags &
-                                LLOG_F_ZAP_WHEN_EMPTY) &&
-                            (llh->llh_count == 1)) {
-                                rc = llog_destroy(loghandle);
-                                if (rc)
-                                        CERROR("failure destroying log during "
-                                               "cleanup: %d\n", rc);
-
-                                index = loghandle->u.phd.phd_cookie.lgc_index;
-                                llog_free_handle(loghandle);
-
-                                LASSERT(index);
-                                llog_cat_set_first_idx(cathandle, index);
-                                rc = llog_cancel_rec(cathandle, index);
-                                if (rc == 0)
-                                        CDEBUG(D_RPCTRACE, "cancel plain log at"
-                                               "index %u of catalog "LPX64"\n",
-                                               index,cathandle->lgh_id.lgl_oid);
-                        }
-                }
-                llog_cat_put(ctxt->loc_handle);
-        }
-        RETURN(0);
-}
-EXPORT_SYMBOL(llog_obd_origin_cleanup);
-
-/* add for obdfilter/sz and mds/unlink */
-int llog_obd_origin_add(struct llog_ctxt *ctxt,
-                        struct llog_rec_hdr *rec, struct lov_stripe_md *lsm,
-                        struct llog_cookie *logcookies, int numcookies)
-{
-        struct llog_handle *cathandle;
-        int rc;
-        ENTRY;
-
-        cathandle = ctxt->loc_handle;
-        LASSERT(cathandle != NULL);
-        rc = llog_cat_add_rec(cathandle, rec, logcookies, NULL);
-        if (rc != 1)
-                CERROR("write one catalog record failed: %d\n", rc);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_obd_origin_add);
-
-int llog_cat_initialize(struct obd_device *obd, int count,
-                        struct obd_uuid *uuid)
-{
-        char name[32] = CATLIST;
-        struct llog_catid *idarray = NULL;
-        int size = sizeof(*idarray) * count;
-        int rc;
-        ENTRY;
-
-        if (count) {
-                OBD_VMALLOC(idarray, size);
-                if (!idarray)
-                        RETURN(-ENOMEM);
-        }
-
-        rc = llog_get_cat_list(obd, obd, name, count, idarray);
-        if (rc) {
-                CERROR("rc: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        rc = obd_llog_init(obd, obd, count, idarray, uuid);
-        if (rc) {
-                CERROR("rc: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        rc = llog_put_cat_list(obd, obd, name, count, idarray);
-        if (rc) {
-                CERROR("rc: %d\n", rc);
-                GOTO(out, rc);
-        }
-
- out:
-        if (idarray)
-                OBD_VFREE(idarray, size);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_cat_initialize);
-
-int obd_llog_init(struct obd_device *obd, struct obd_device *disk_obd,
-                  int count, struct llog_catid *logid, struct obd_uuid *uuid)
-{
-        int rc;
-        ENTRY;
-        OBD_CHECK_OP(obd, llog_init, 0);
-        OBD_COUNTER_INCREMENT(obd, llog_init);
-
-        rc = OBP(obd, llog_init)(obd, disk_obd, count, logid, uuid);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(obd_llog_init);
-
-int obd_llog_finish(struct obd_device *obd, int count)
-{
-        int rc;
-        ENTRY;
-        OBD_CHECK_OP(obd, llog_finish, 0);
-        OBD_COUNTER_INCREMENT(obd, llog_finish);
-
-        rc = OBP(obd, llog_finish)(obd, count);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(obd_llog_finish);
diff --git a/lustre/obdclass/llog_swab.c b/lustre/obdclass/llog_swab.c
deleted file mode 100644
index 4f45df02cd7328a688472b119561f74b1e70ff2a..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_swab.c
+++ /dev/null
@@ -1,253 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2004-2005 Cluster File Systems, Inc.
- *   Author: jacob berkman  <jacob@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * Swabbing of llog datatypes (from disk or over the wire).
- *
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <lustre_log.h>
-
-static void print_llogd_body(struct llogd_body *d)
-{
-        CDEBUG(D_OTHER, "llogd body: %p\n", d);
-        CDEBUG(D_OTHER, "\tlgd_logid.lgl_oid: "LPX64"\n", d->lgd_logid.lgl_oid);
-        CDEBUG(D_OTHER, "\tlgd_logid.lgl_ogr: "LPX64"\n", d->lgd_logid.lgl_ogr);
-        CDEBUG(D_OTHER, "\tlgd_logid.lgl_ogen: %#x\n", d->lgd_logid.lgl_ogen);
-        CDEBUG(D_OTHER, "\tlgd_ctxt_idx: %#x\n", d->lgd_ctxt_idx);
-        CDEBUG(D_OTHER, "\tlgd_llh_flags: %#x\n", d->lgd_llh_flags);
-        CDEBUG(D_OTHER, "\tlgd_index: %#x\n", d->lgd_index);
-        CDEBUG(D_OTHER, "\tlgd_saved_index: %#x\n", d->lgd_saved_index);
-        CDEBUG(D_OTHER, "\tlgd_len: %#x\n", d->lgd_len);
-        CDEBUG(D_OTHER, "\tlgd_cur_offset: "LPX64"\n", d->lgd_cur_offset);
-}
-
-void lustre_swab_llogd_body (struct llogd_body *d)
-{
-        ENTRY;
-        print_llogd_body(d);
-        __swab64s (&d->lgd_logid.lgl_oid);
-        __swab64s (&d->lgd_logid.lgl_ogr);
-        __swab32s (&d->lgd_logid.lgl_ogen);
-        __swab32s (&d->lgd_ctxt_idx);
-        __swab32s (&d->lgd_llh_flags);
-        __swab32s (&d->lgd_index);
-        __swab32s (&d->lgd_saved_index);
-        __swab32s (&d->lgd_len);
-        __swab64s (&d->lgd_cur_offset);
-        print_llogd_body(d);
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_swab_llogd_body);
-
-void lustre_swab_llogd_conn_body (struct llogd_conn_body *d)
-{
-        __swab64s (&d->lgdc_gen.mnt_cnt);
-        __swab64s (&d->lgdc_gen.conn_cnt);
-        __swab64s (&d->lgdc_logid.lgl_oid);
-        __swab64s (&d->lgdc_logid.lgl_ogr);
-        __swab32s (&d->lgdc_logid.lgl_ogen);
-        __swab32s (&d->lgdc_ctxt_idx);
-}
-EXPORT_SYMBOL(lustre_swab_llogd_conn_body);
-
-void lustre_swab_ll_fid(struct ll_fid *fid)
-{
-        __swab64s (&fid->id);
-        __swab32s (&fid->generation);
-        __swab32s (&fid->f_type);
-}
-EXPORT_SYMBOL(lustre_swab_ll_fid);
-
-void lustre_swab_llog_rec(struct llog_rec_hdr *rec, struct llog_rec_tail *tail)
-{
-        __swab32s(&rec->lrh_len);
-        __swab32s(&rec->lrh_index);
-        __swab32s(&rec->lrh_type);
-
-        switch (rec->lrh_type) {
-        case OST_SZ_REC: {
-                struct llog_size_change_rec *lsc =
-                        (struct llog_size_change_rec *)rec;
-
-                lustre_swab_ll_fid(&lsc->lsc_fid);
-                __swab32s(&lsc->lsc_io_epoch);
-
-                break;
-        }
-
-        case OST_RAID1_REC:
-                break;
-
-        case MDS_UNLINK_REC: {
-                struct llog_unlink_rec *lur = (struct llog_unlink_rec *)rec;
-
-                __swab64s(&lur->lur_oid);
-                __swab32s(&lur->lur_ogen);
-
-                break;
-        }
-
-        case MDS_SETATTR_REC: {
-                struct llog_setattr_rec *lsr = (struct llog_setattr_rec *)rec;
-
-                __swab64s(&lsr->lsr_oid);
-                __swab32s(&lsr->lsr_ogen);
-                __swab32s(&lsr->lsr_uid);
-                __swab32s(&lsr->lsr_gid);
-
-                break;
-        }
-
-        case OBD_CFG_REC:
-        case PTL_CFG_REC:                       /* obsolete */
-                /* these are swabbed as they are consumed */
-                break;
-
-        case LLOG_HDR_MAGIC: {
-                struct llog_log_hdr *llh = (struct llog_log_hdr *)rec;
-
-                __swab64s(&llh->llh_timestamp);
-                __swab32s(&llh->llh_count);
-                __swab32s(&llh->llh_bitmap_offset);
-                __swab32s(&llh->llh_flags);
-                __swab32s(&llh->llh_size);
-                __swab32s(&llh->llh_cat_idx);
-                if (tail != &llh->llh_tail) {
-                        __swab32s(&llh->llh_tail.lrt_index);
-                        __swab32s(&llh->llh_tail.lrt_len);
-                }
-
-                break;
-        }
-
-        case LLOG_LOGID_MAGIC: {
-                struct llog_logid_rec *lid = (struct llog_logid_rec *)rec;
-
-                __swab64s(&lid->lid_id.lgl_oid);
-                __swab64s(&lid->lid_id.lgl_ogr);
-                __swab32s(&lid->lid_id.lgl_ogen);
-                break;
-        }
-
-        case LLOG_PAD_MAGIC:
-        /* ignore old pad records of type 0 */
-        case 0:
-                break;
-
-        default:
-                CERROR("Unknown llog rec type %#x swabbing rec %p\n",
-                       rec->lrh_type, rec);
-        }
-
-        if (tail) {
-                __swab32s(&tail->lrt_len);
-                __swab32s(&tail->lrt_index);
-        }
-}
-EXPORT_SYMBOL(lustre_swab_llog_rec);
-
-static void print_llog_hdr(struct llog_log_hdr *h)
-{
-        CDEBUG(D_OTHER, "llog header: %p\n", h);
-        CDEBUG(D_OTHER, "\tllh_hdr.lrh_index: %#x\n", h->llh_hdr.lrh_index);
-        CDEBUG(D_OTHER, "\tllh_hdr.lrh_len: %#x\n", h->llh_hdr.lrh_len);
-        CDEBUG(D_OTHER, "\tllh_hdr.lrh_type: %#x\n", h->llh_hdr.lrh_type);
-        CDEBUG(D_OTHER, "\tllh_timestamp: "LPX64"\n", h->llh_timestamp);
-        CDEBUG(D_OTHER, "\tllh_count: %#x\n", h->llh_count);
-        CDEBUG(D_OTHER, "\tllh_bitmap_offset: %#x\n", h->llh_bitmap_offset);
-        CDEBUG(D_OTHER, "\tllh_flags: %#x\n", h->llh_flags);
-        CDEBUG(D_OTHER, "\tllh_size: %#x\n", h->llh_size);
-        CDEBUG(D_OTHER, "\tllh_cat_idx: %#x\n", h->llh_cat_idx);
-        CDEBUG(D_OTHER, "\tllh_tail.lrt_index: %#x\n", h->llh_tail.lrt_index);
-        CDEBUG(D_OTHER, "\tllh_tail.lrt_len: %#x\n", h->llh_tail.lrt_len);
-}
-
-void lustre_swab_llog_hdr (struct llog_log_hdr *h)
-{
-        ENTRY;
-        print_llog_hdr(h);
-
-        lustre_swab_llog_rec(&h->llh_hdr, &h->llh_tail);
-
-        print_llog_hdr(h);
-        EXIT;
-}
-EXPORT_SYMBOL(lustre_swab_llog_hdr);
-
-static void print_lustre_cfg(struct lustre_cfg *lcfg)
-{
-        int i;
-        ENTRY;
-
-        if (!(libcfs_debug & D_OTHER)) /* don't loop on nothing */
-                return;
-        CDEBUG(D_OTHER, "lustre_cfg: %p\n", lcfg);
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_version: %#x\n", lcfg->lcfg_version);
-
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_command: %#x\n", lcfg->lcfg_command);
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_num: %#x\n", lcfg->lcfg_num);
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_flags: %#x\n", lcfg->lcfg_flags);
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_nid: %s\n", libcfs_nid2str(lcfg->lcfg_nid));
-
-        CDEBUG(D_OTHER, "\tlcfg->lcfg_bufcount: %d\n", lcfg->lcfg_bufcount);
-        if (lcfg->lcfg_bufcount < LUSTRE_CFG_MAX_BUFCOUNT)
-                for (i = 0; i < lcfg->lcfg_bufcount; i++)
-                        CDEBUG(D_OTHER, "\tlcfg->lcfg_buflens[%d]: %d\n",
-                               i, lcfg->lcfg_buflens[i]);
-        EXIT;
-}
-
-void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg)
-{
-        int i;
-        ENTRY;
-
-        __swab32s(&lcfg->lcfg_version);
-
-        if (lcfg->lcfg_version != LUSTRE_CFG_VERSION) {
-                CERROR("not swabbing lustre_cfg version %#x (expecting %#x)\n",
-                       lcfg->lcfg_version, LUSTRE_CFG_VERSION);
-                EXIT;
-                return;
-        }
-
-        __swab32s(&lcfg->lcfg_command);
-        __swab32s(&lcfg->lcfg_num);
-        __swab32s(&lcfg->lcfg_flags);
-        __swab64s(&lcfg->lcfg_nid);
-        __swab32s(&lcfg->lcfg_bufcount);
-        for (i = 0; i < lcfg->lcfg_bufcount && i < LUSTRE_CFG_MAX_BUFCOUNT; i++)
-                __swab32s(&lcfg->lcfg_buflens[i]);
-
-        print_lustre_cfg(lcfg);
-        EXIT;
-        return;
-}
-EXPORT_SYMBOL(lustre_swab_lustre_cfg);
diff --git a/lustre/obdclass/llog_test.c b/lustre/obdclass/llog_test.c
deleted file mode 100644
index 641137e8b470dd6d5937558c603683b43144b787..0000000000000000000000000000000000000000
--- a/lustre/obdclass/llog_test.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2003 Cluster File Systems, Inc.
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * A kernel module which tests the llog API from the OBD setup function.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/module.h>
-#include <linux/init.h>
-
-#include <obd_class.h>
-#include <lustre_log.h>
-
-static int llog_test_rand;
-static struct obd_uuid uuid = { .uuid = "test_uuid" };
-static struct llog_logid cat_logid;
-
-struct llog_mini_rec {
-        struct llog_rec_hdr     lmr_hdr;
-        struct llog_rec_tail    lmr_tail;
-} __attribute__((packed));
-
-static int verify_handle(char *test, struct llog_handle *llh, int num_recs)
-{
-        int i;
-        int last_idx = 0;
-        int active_recs = 0;
-
-        for (i = 0; i < LLOG_BITMAP_BYTES * 8; i++) {
-                if (ext2_test_bit(i, llh->lgh_hdr->llh_bitmap)) {
-                        last_idx = i;
-                        active_recs++;
-                }
-        }
-
-        if (active_recs != num_recs) {
-                CERROR("%s: expected %d active recs after write, found %d\n",
-                       test, num_recs, active_recs);
-                RETURN(-ERANGE);
-        }
-
-        if (llh->lgh_hdr->llh_count != num_recs) {
-                CERROR("%s: handle->count is %d, expected %d after write\n",
-                       test, llh->lgh_hdr->llh_count, num_recs);
-                RETURN(-ERANGE);
-        }
-
-        if (llh->lgh_last_idx < last_idx) {
-                CERROR("%s: handle->last_idx is %d, expected %d after write\n",
-                       test, llh->lgh_last_idx, last_idx);
-                RETURN(-ERANGE);
-        }
-
-        RETURN(0);
-}
-
-/* Test named-log create/open, close */
-static int llog_test_1(struct obd_device *obd, char *name)
-{
-        struct llog_handle *llh;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-        int rc;
-        int rc2;
-        ENTRY;
-
-        CWARN("1a: create a log with name: %s\n", name);
-        LASSERT(ctxt);
-
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc) {
-                CERROR("1a: llog_create with name %s failed: %d\n", name, rc);
-                llog_ctxt_put(ctxt);
-                RETURN(rc);
-        }
-        llog_init_handle(llh, LLOG_F_IS_PLAIN, &uuid);
-
-        if ((rc = verify_handle("1", llh, 1)))
-                GOTO(out, rc);
-
- out:
-        CWARN("1b: close newly-created log\n");
-        rc2 = llog_close(llh);
-        llog_ctxt_put(ctxt);
-        if (rc2) {
-                CERROR("1b: close log %s failed: %d\n", name, rc2);
-                if (rc == 0)
-                        rc = rc2;
-        }
-        RETURN(rc);
-}
-
-/* Test named-log reopen; returns opened log on success */
-static int llog_test_2(struct obd_device *obd, char *name,
-                       struct llog_handle **llh)
-{
-        struct llog_handle *loghandle;
-        struct llog_logid logid;
-        int rc;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-        ENTRY;
-
-        CWARN("2a: re-open a log with name: %s\n", name);
-        rc = llog_create(ctxt, llh, NULL, name);
-        if (rc) {
-                CERROR("2a: re-open log with name %s failed: %d\n", name, rc);
-                GOTO(out, rc);
-        }
-        llog_init_handle(*llh, LLOG_F_IS_PLAIN, &uuid);
-
-        if ((rc = verify_handle("2", *llh, 1)))
-                GOTO(out, rc);
-
-        CWARN("2b: create a log without specified NAME & LOGID\n");
-        rc = llog_create(ctxt, &loghandle, NULL, NULL);
-        if (rc) {
-                CERROR("2b: create log failed\n");
-                GOTO(out, rc);
-        }
-        llog_init_handle(loghandle, LLOG_F_IS_PLAIN, &uuid);
-        logid = loghandle->lgh_id;
-        llog_close(loghandle);
-
-        CWARN("2b: re-open the log by LOGID\n");
-        rc = llog_create(ctxt, &loghandle, &logid, NULL);
-        if (rc) {
-                CERROR("2b: re-open log by LOGID failed\n");
-                GOTO(out, rc);
-        }
-        llog_init_handle(loghandle, LLOG_F_IS_PLAIN, &uuid);
-
-        CWARN("2b: destroy this log\n");
-        rc = llog_destroy(loghandle);
-        if (rc) {
-                CERROR("2b: destroy log failed\n");
-                GOTO(out, rc);
-        }
-        llog_free_handle(loghandle);
-out:
-        llog_ctxt_put(ctxt);
-
-        RETURN(rc);
-}
-
-/* Test record writing, single and in bulk */
-static int llog_test_3(struct obd_device *obd, struct llog_handle *llh)
-{
-        struct llog_create_rec lcr;
-        int rc, i;
-        int num_recs = 1;       /* 1 for the header */
-        ENTRY;
-
-        lcr.lcr_hdr.lrh_len = lcr.lcr_tail.lrt_len = sizeof(lcr);
-        lcr.lcr_hdr.lrh_type = OST_SZ_REC;
-
-        CWARN("3a: write one create_rec\n");
-        rc = llog_write_rec(llh,  &lcr.lcr_hdr, NULL, 0, NULL, -1);
-        num_recs++;
-        if (rc) {
-                CERROR("3a: write one log record failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        if ((rc = verify_handle("3a", llh, num_recs)))
-                RETURN(rc);
-
-        CWARN("3b: write 10 cfg log records with 8 bytes bufs\n");
-        for (i = 0; i < 10; i++) {
-                struct llog_rec_hdr hdr;
-                char buf[8];
-                hdr.lrh_len = 8;
-                hdr.lrh_type = OBD_CFG_REC;
-                memset(buf, 0, sizeof buf);
-                rc = llog_write_rec(llh, &hdr, NULL, 0, buf, -1);
-                if (rc) {
-                        CERROR("3b: write 10 records failed at #%d: %d\n",
-                               i + 1, rc);
-                        RETURN(rc);
-                }
-                num_recs++;
-                if ((rc = verify_handle("3c", llh, num_recs)))
-                        RETURN(rc);
-        }
-
-        if ((rc = verify_handle("3b", llh, num_recs)))
-                RETURN(rc);
-
-        CWARN("3c: write 1000 more log records\n");
-        for (i = 0; i < 1000; i++) {
-                rc = llog_write_rec(llh, &lcr.lcr_hdr, NULL, 0, NULL, -1);
-                if (rc) {
-                        CERROR("3c: write 1000 records failed at #%d: %d\n",
-                               i + 1, rc);
-                        RETURN(rc);
-                }
-                num_recs++;
-                if ((rc = verify_handle("3b", llh, num_recs)))
-                        RETURN(rc);
-        }
-
-        if ((rc = verify_handle("3c", llh, num_recs)))
-                RETURN(rc);
-
-        RETURN(rc);
-}
-
-/* Test catalogue additions */
-static int llog_test_4(struct obd_device *obd)
-{
-        struct llog_handle *cath;
-        char name[10];
-        int rc, i, buflen;
-        struct llog_mini_rec lmr;
-        struct llog_cookie cookie;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-        int num_recs = 0;
-        char *buf;
-        struct llog_rec_hdr rec;
-
-        ENTRY;
-
-        lmr.lmr_hdr.lrh_len = lmr.lmr_tail.lrt_len = LLOG_MIN_REC_SIZE;
-        lmr.lmr_hdr.lrh_type = 0xf00f00;
-
-        sprintf(name, "%x", llog_test_rand+1);
-        CWARN("4a: create a catalog log with name: %s\n", name);
-        rc = llog_create(ctxt, &cath, NULL, name);
-        if (rc) {
-                CERROR("1a: llog_create with name %s failed: %d\n", name, rc);
-                GOTO(out, rc);
-        }
-        llog_init_handle(cath, LLOG_F_IS_CAT, &uuid);
-        num_recs++;
-        cat_logid = cath->lgh_id;
-
-        CWARN("4b: write 1 record into the catalog\n");
-        rc = llog_cat_add_rec(cath, &lmr.lmr_hdr, &cookie, NULL);
-        if (rc != 1) {
-                CERROR("4b: write 1 catalog record failed at: %d\n", rc);
-                GOTO(out, rc);
-        }
-        num_recs++;
-        if ((rc = verify_handle("4b", cath, 2)))
-                GOTO(ctxt_release, rc);
-
-        if ((rc = verify_handle("4b", cath->u.chd.chd_current_log, num_recs)))
-                GOTO(ctxt_release, rc);
-
-        CWARN("4c: cancel 1 log record\n");
-        rc = llog_cat_cancel_records(cath, 1, &cookie);
-        if (rc) {
-                CERROR("4c: cancel 1 catalog based record failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-        num_recs--;
-
-        if ((rc = verify_handle("4c", cath->u.chd.chd_current_log, num_recs)))
-                GOTO(ctxt_release, rc);
-
-        CWARN("4d: write 40,000 more log records\n");
-        for (i = 0; i < 40000; i++) {
-                rc = llog_cat_add_rec(cath, &lmr.lmr_hdr, NULL, NULL);
-                if (rc) {
-                        CERROR("4d: write 40000 records failed at #%d: %d\n",
-                               i + 1, rc);
-                        GOTO(out, rc);
-                }
-                num_recs++;
-        }
-
-        CWARN("4e: add 5 large records, one record per block\n");
-        buflen = LLOG_CHUNK_SIZE - sizeof(struct llog_rec_hdr)
-                        - sizeof(struct llog_rec_tail);
-        OBD_ALLOC(buf, buflen);
-        if (buf == NULL)
-                GOTO(out, rc = -ENOMEM);
-        for (i = 0; i < 5; i++) {
-                rec.lrh_len = buflen;
-                rec.lrh_type = OBD_CFG_REC;
-                rc = llog_cat_add_rec(cath, &rec, NULL, buf);
-                if (rc) {
-                        CERROR("4e: write 5 records failed at #%d: %d\n",
-                               i + 1, rc);
-                        OBD_FREE(buf, buflen);
-                        GOTO(out, rc);
-                }
-                num_recs++;
-        }
-        OBD_FREE(buf, buflen);
-
- out:
-        CWARN("4f: put newly-created catalog\n");
-        rc = llog_cat_put(cath);
-ctxt_release:
-        llog_ctxt_put(ctxt);
-        if (rc)
-                CERROR("1b: close log %s failed: %d\n", name, rc);
-        RETURN(rc);
-}
-
-static int cat_print_cb(struct llog_handle *llh, struct llog_rec_hdr *rec,
-                        void *data)
-{
-        struct llog_logid_rec *lir = (struct llog_logid_rec *)rec;
-
-        if (rec->lrh_type != LLOG_LOGID_MAGIC) {
-                CERROR("invalid record in catalog\n");
-                RETURN(-EINVAL);
-        }
-
-        CWARN("seeing record at index %d - "LPX64":%x in log "LPX64"\n",
-               rec->lrh_index, lir->lid_id.lgl_oid,
-               lir->lid_id.lgl_ogen, llh->lgh_id.lgl_oid);
-        RETURN(0);
-}
-
-static int plain_print_cb(struct llog_handle *llh, struct llog_rec_hdr *rec,
-                          void *data)
-{
-        if (!(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN)) {
-                CERROR("log is not plain\n");
-                RETURN(-EINVAL);
-        }
-
-        CWARN("seeing record at index %d in log "LPX64"\n",
-               rec->lrh_index, llh->lgh_id.lgl_oid);
-        RETURN(0);
-}
-
-static int llog_cancel_rec_cb(struct llog_handle *llh, struct llog_rec_hdr *rec,
-                              void *data)
-{
-        struct llog_cookie cookie;
-        static int i = 0;
-
-        if (!(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN)) {
-                CERROR("log is not plain\n");
-                RETURN(-EINVAL);
-        }
-
-        cookie.lgc_lgl = llh->lgh_id;
-        cookie.lgc_index = rec->lrh_index;
-
-        llog_cat_cancel_records(llh->u.phd.phd_cat_handle, 1, &cookie);
-        i++;
-        if (i == 40000)
-                RETURN(-4711);
-        RETURN(0);
-}
-
-/* Test log and catalogue processing */
-static int llog_test_5(struct obd_device *obd)
-{
-        struct llog_handle *llh = NULL;
-        char name[10];
-        int rc;
-        struct llog_mini_rec lmr;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-
-        ENTRY;
-
-        lmr.lmr_hdr.lrh_len = lmr.lmr_tail.lrt_len = LLOG_MIN_REC_SIZE;
-        lmr.lmr_hdr.lrh_type = 0xf00f00;
-
-        CWARN("5a: re-open catalog by id\n");
-        rc = llog_create(ctxt, &llh, &cat_logid, NULL);
-        if (rc) {
-                CERROR("5a: llog_create with logid failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-        llog_init_handle(llh, LLOG_F_IS_CAT, &uuid);
-
-        CWARN("5b: print the catalog entries.. we expect 2\n");
-        rc = llog_process(llh, cat_print_cb, "test 5", NULL);
-        if (rc) {
-                CERROR("5b: process with cat_print_cb failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("5c: Cancel 40000 records, see one log zapped\n");
-        rc = llog_cat_process(llh, llog_cancel_rec_cb, "foobar");
-        if (rc != -4711) {
-                CERROR("5c: process with cat_cancel_cb failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("5d: add 1 record to the log with many canceled empty pages\n");
-        rc = llog_cat_add_rec(llh, &lmr.lmr_hdr, NULL, NULL);
-        if (rc) {
-                CERROR("5d: add record to the log with many canceled empty\
-                       pages failed\n");
-                GOTO(out, rc);
-        }
-
-        CWARN("5b: print the catalog entries.. we expect 1\n");
-        rc = llog_process(llh, cat_print_cb, "test 5", NULL);
-        if (rc) {
-                CERROR("5b: process with cat_print_cb failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("5e: print plain log entries.. expect 6\n");
-        rc = llog_cat_process(llh, plain_print_cb, "foobar");
-        if (rc) {
-                CERROR("5e: process with plain_print_cb failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        CWARN("5f: print plain log entries reversely.. expect 6\n");
-        rc = llog_cat_reverse_process(llh, plain_print_cb, "foobar");
-        if (rc) {
-                CERROR("5f: reversely process with plain_print_cb failed: %d\n", rc);
-                GOTO(out, rc);
-        }
-
- out:
-        CWARN("5: close re-opened catalog\n");
-        if (llh)
-                rc = llog_cat_put(llh);
-        if (rc)
-                CERROR("1b: close log %s failed: %d\n", name, rc);
-        llog_ctxt_put(ctxt);
-
-        RETURN(rc);
-}
-
-/* Test client api; open log by name and process */
-static int llog_test_6(struct obd_device *obd, char *name)
-{
-        struct obd_device *mdc_obd;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-        struct obd_uuid *mds_uuid = &ctxt->loc_exp->exp_obd->obd_uuid;
-        struct lustre_handle exph = {0, };
-        struct obd_export *exp;
-        struct obd_uuid uuid = {"LLOG_TEST6_UUID"};
-        struct llog_handle *llh = NULL;
-        struct llog_ctxt *nctxt;
-        int rc;
-
-        CWARN("6a: re-open log %s using client API\n", name);
-        mdc_obd = class_find_client_obd(mds_uuid, LUSTRE_MDC_NAME, NULL);
-        if (mdc_obd == NULL) {
-                CERROR("6: no MDC devices connected to %s found.\n",
-                       mds_uuid->uuid);
-                GOTO(ctxt_release, rc = -ENOENT);
-        }
-
-        rc = obd_connect(&exph, mdc_obd, &uuid, NULL /* obd_connect_data */,
-                         NULL);
-        if (rc) {
-                CERROR("6: failed to connect to MDC: %s\n", mdc_obd->obd_name);
-                GOTO(ctxt_release, rc);
-        }
-        exp = class_conn2export(&exph);
-
-        nctxt = llog_get_context(mdc_obd, LLOG_CONFIG_REPL_CTXT);
-        rc = llog_create(nctxt, &llh, NULL, name);
-        if (rc) {
-                CERROR("6: llog_create failed %d\n", rc);
-                llog_ctxt_put(nctxt);
-                GOTO(ctxt_release, rc);
-        }
-
-        rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc) {
-                CERROR("6: llog_init_handle failed %d\n", rc);
-                GOTO(parse_out, rc);
-        }
-
-        rc = llog_process(llh, plain_print_cb, NULL, NULL);
-        if (rc)
-                CERROR("6: llog_process failed %d\n", rc);
-
-        rc = llog_reverse_process(llh, plain_print_cb, NULL, NULL);
-        if (rc)
-                CERROR("6: llog_reverse_process failed %d\n", rc);
-
-parse_out:
-        rc = llog_close(llh);
-        llog_ctxt_put(nctxt);
-        if (rc) {
-                CERROR("6: llog_close failed: rc = %d\n", rc);
-        }
-        rc = obd_disconnect(exp);
-ctxt_release:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-static int llog_test_7(struct obd_device *obd)
-{
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-        struct llog_handle *llh;
-        struct llog_create_rec lcr;
-        char name[10];
-        int rc;
-        ENTRY;
-
-        sprintf(name, "%x", llog_test_rand+2);
-        CWARN("7: create a log with name: %s\n", name);
-        LASSERT(ctxt);
-
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc) {
-                CERROR("7: llog_create with name %s failed: %d\n", name, rc);
-                GOTO(ctxt_release, rc);
-        }
-        llog_init_handle(llh, LLOG_F_IS_PLAIN, &uuid);
-
-        lcr.lcr_hdr.lrh_len = lcr.lcr_tail.lrt_len = sizeof(lcr);
-        lcr.lcr_hdr.lrh_type = OST_SZ_REC;
-        rc = llog_write_rec(llh,  &lcr.lcr_hdr, NULL, 0, NULL, -1);
-        if (rc) {
-                CERROR("7: write one log record failed: %d\n", rc);
-                GOTO(ctxt_release, rc);
-        }
-
-        rc = llog_destroy(llh);
-        if (rc) 
-                CERROR("7: llog_destroy failed: %d\n", rc);
-        else
-                llog_free_handle(llh); 
-ctxt_release:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-/* -------------------------------------------------------------------------
- * Tests above, boring obd functions below
- * ------------------------------------------------------------------------- */
-static int llog_run_tests(struct obd_device *obd)
-{
-        struct llog_handle *llh;
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_TEST_ORIG_CTXT);
-        int rc, err, cleanup_phase = 0;
-        char name[10];
-        ENTRY;
-
-        sprintf(name, "%x", llog_test_rand);
-        push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-
-        rc = llog_test_1(obd, name);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = llog_test_2(obd, name, &llh);
-        if (rc)
-                GOTO(cleanup, rc);
-        cleanup_phase = 1; /* close llh */
-
-        rc = llog_test_3(obd, llh);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = llog_test_4(obd);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = llog_test_5(obd);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = llog_test_6(obd, name);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = llog_test_7(obd);
-        if (rc)
-                GOTO(cleanup, rc);
-
- cleanup:
-        switch (cleanup_phase) {
-        case 1:
-                err = llog_close(llh);
-                if (err)
-                        CERROR("cleanup: llog_close failed: %d\n", err);
-                if (!rc)
-                        rc = err;
-        case 0:
-                pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-        }
-        llog_ctxt_put(ctxt);
-        return rc;
-}
-
-
-static int llog_test_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                               int count, struct llog_catid *logid,
-                               struct obd_uuid *uuid)
-{
-        int rc;
-        ENTRY;
-
-        rc = llog_setup(obd, LLOG_TEST_ORIG_CTXT, tgt, 0, NULL, &llog_lvfs_ops);
-        RETURN(rc);
-}
-
-static int llog_test_llog_finish(struct obd_device *obd, int count)
-{
-        int rc;
-        ENTRY;
-
-        rc = llog_cleanup(llog_get_context(obd, LLOG_TEST_ORIG_CTXT));
-        RETURN(rc);
-}
-
-static int llog_test_cleanup(struct obd_device *obd)
-{
-        int rc = obd_llog_finish(obd, 0);
-        if (rc)
-                CERROR("failed to llog_test_llog_finish: %d\n", rc);
-
-        lprocfs_obd_cleanup(obd);
-
-        return rc;
-}
-
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_llog_test_obd_vars[] = { {0} };
-static struct lprocfs_vars lprocfs_llog_test_module_vars[] = { {0} };
-static void lprocfs_llog_test_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_llog_test_module_vars;
-    lvars->obd_vars     = lprocfs_llog_test_obd_vars;
-}
-#endif
-
-static int llog_test_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        struct lustre_cfg *lcfg = buf;
-        struct obd_device *tgt;
-        int rc;
-        ENTRY;
-
-        if (lcfg->lcfg_bufcount < 2) {
-                CERROR("requires a TARGET OBD name\n");
-                RETURN(-EINVAL);
-        }
-
-        if (lcfg->lcfg_buflens[1] < 1) {
-                CERROR("requires a TARGET OBD name\n");
-                RETURN(-EINVAL);
-        }
-
-        tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
-        if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
-                CERROR("target device not attached or not set up (%s)\n",
-                       lustre_cfg_string(lcfg, 1));
-                RETURN(-EINVAL);
-        }
-
-        rc = obd_llog_init(obd, tgt, 0, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        llog_test_rand = ll_rand();
-
-        rc = llog_run_tests(obd);
-        if (rc)
-                llog_test_cleanup(obd);
-
-        lprocfs_llog_test_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        RETURN(rc);
-}
-
-static struct obd_ops llog_obd_ops = {
-        .o_owner       = THIS_MODULE,
-        .o_setup       = llog_test_setup,
-        .o_cleanup     = llog_test_cleanup,
-        .o_llog_init   = llog_test_llog_init,
-        .o_llog_finish = llog_test_llog_finish,
-};
-
-static int __init llog_test_init(void)
-{
-        struct lprocfs_static_vars lvars;
-
-        lprocfs_llog_test_init_vars(&lvars);
-        return class_register_type(&llog_obd_ops,lvars.module_vars,"llog_test");
-}
-
-static void __exit llog_test_exit(void)
-{
-        class_unregister_type("llog_test");
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("llog test module");
-MODULE_LICENSE("GPL");
-
-module_init(llog_test_init);
-module_exit(llog_test_exit);
diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c
deleted file mode 100644
index 99edb9d51abf749002b580dba990d04085595fc2..0000000000000000000000000000000000000000
--- a/lustre/obdclass/lprocfs_status.c
+++ /dev/null
@@ -1,1932 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Hariharan Thantry <thantry@users.sourceforge.net>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include <lustre_fsfilt.h>
-
-#if defined(LPROCFS)
-
-#define MAX_STRING_SIZE 128
-
-/* for bug 10866, global variable */
-DECLARE_RWSEM(_lprocfs_lock);
-EXPORT_SYMBOL(_lprocfs_lock);
-
-int lprocfs_seq_release(struct inode *inode, struct file *file)
-{
-        LPROCFS_EXIT();
-        return seq_release(inode, file);
-}
-EXPORT_SYMBOL(lprocfs_seq_release);
-
-struct proc_dir_entry *lprocfs_srch(struct proc_dir_entry *head,
-                                    const char *name)
-{
-        struct proc_dir_entry *temp;
-
-        if (head == NULL)
-                return NULL;
-
-        LPROCFS_ENTRY();
-        temp = head->subdir;
-        while (temp != NULL) {
-                if (strcmp(temp->name, name) == 0) {
-                        LPROCFS_EXIT();
-                        return temp;
-                }
-
-                temp = temp->next;
-        }
-        LPROCFS_ENTRY();
-        return NULL;
-}
-
-/* lprocfs API calls */
-
-/* Function that emulates snprintf but also has the side effect of advancing
-   the page pointer for the next write into the buffer, incrementing the total
-   length written to the buffer, and decrementing the size left in the
-   buffer. */
-static int lprocfs_obd_snprintf(char **page, int end, int *len,
-                                const char *format, ...)
-{
-        va_list list;
-        int n;
-
-        if (*len >= end)
-                return 0;
-
-        va_start(list, format);
-        n = vsnprintf(*page, end - *len, format, list);
-        va_end(list);
-
-        *page += n; *len += n;
-        return n;
-}
-
-int lprocfs_add_simple(struct proc_dir_entry *root, char *name,
-                       read_proc_t *read_proc, write_proc_t *write_proc,
-                       void *data)
-{
-        struct proc_dir_entry *proc;
-        mode_t mode = 0;
-        
-        if (root == NULL || name == NULL)
-                return -EINVAL;
-        if (read_proc)
-                mode = 0444;
-        if (write_proc)
-                mode |= 0200;
-        proc = create_proc_entry(name, mode, root);
-        if (!proc) {
-                CERROR("LprocFS: No memory to create /proc entry %s", name);
-                return -ENOMEM;
-        }
-        proc->read_proc = read_proc;
-        proc->write_proc = write_proc;
-        proc->data = data;
-        return 0;
-}
-
-
-static ssize_t lprocfs_fops_read(struct file *f, char __user *buf, size_t size, loff_t *ppos)
-{
-        struct proc_dir_entry *dp = PDE(f->f_dentry->d_inode);
-        char *page, *start = NULL;
-        int rc = 0, eof = 1, count;
-
-        if (*ppos >= PAGE_SIZE)
-                return 0;
-
-        page = (char *)__get_free_page(GFP_KERNEL);
-        if (page == NULL)
-                return -ENOMEM;
-
-        LPROCFS_ENTRY();
-        OBD_FAIL_TIMEOUT(OBD_FAIL_LPROC_REMOVE, 10);
-        if (!dp->deleted && dp->read_proc)
-                rc = dp->read_proc(page, &start, *ppos, PAGE_SIZE, 
-                        &eof, dp->data);
-        LPROCFS_EXIT();
-        if (rc <= 0)
-                goto out;
-
-        /* for lustre proc read, the read count must be less than PAGE_SIZE */
-        LASSERT(eof == 1);
-
-        if (start == NULL) {
-                rc -= *ppos;
-                if (rc < 0)
-                        rc = 0;
-                if (rc == 0)
-                        goto out;
-                start = page + *ppos;
-        } else if (start < page) {
-                start = page;
-        }
-
-        count = (rc < size) ? rc : size;
-        if (copy_to_user(buf, start, count)) {
-                rc = -EFAULT;
-                goto out;
-        }
-        *ppos += count;
-
-out:
-        free_page((unsigned long)page);
-        return rc;
-}
-
-static ssize_t lprocfs_fops_write(struct file *f, const char __user *buf, size_t size, loff_t *ppos)
-{
-        struct proc_dir_entry *dp = PDE(f->f_dentry->d_inode);
-        int rc = 0;
-
-        LPROCFS_ENTRY();
-        if (!dp->deleted && dp->write_proc)
-                rc = dp->write_proc(f, buf, size, dp->data);
-        LPROCFS_EXIT();
-        return rc;
-}
-
-static struct file_operations lprocfs_generic_fops = {
-        .owner = THIS_MODULE,
-        .read = lprocfs_fops_read,
-        .write = lprocfs_fops_write,
-};
-
-int lprocfs_evict_client_open(struct inode *inode, struct file *f)
-{
-        struct proc_dir_entry *dp = PDE(f->f_dentry->d_inode);
-        struct obd_device *obd = dp->data;
-
-        atomic_inc(&obd->obd_evict_inprogress);
-
-        return 0;
-}
-
-int lprocfs_evict_client_release(struct inode *inode, struct file *f)
-{
-        struct proc_dir_entry *dp = PDE(f->f_dentry->d_inode);
-        struct obd_device *obd = dp->data;
-
-        atomic_dec(&obd->obd_evict_inprogress);
-        wake_up(&obd->obd_evict_inprogress_waitq);
-        LPROCFS_EXIT();
-
-        return 0;
-}
-
-struct file_operations lprocfs_evict_client_fops = {
-        .owner = THIS_MODULE,
-        .read = lprocfs_fops_read,
-        .write = lprocfs_fops_write,
-        .open = lprocfs_evict_client_open,
-        .release = lprocfs_evict_client_release,
-};
-EXPORT_SYMBOL(lprocfs_evict_client_fops);
-
-int lprocfs_add_vars(struct proc_dir_entry *root, struct lprocfs_vars *list,
-                     void *data)
-{
-        if (root == NULL || list == NULL)
-                return -EINVAL;
-
-        while (list->name != NULL) {
-                struct proc_dir_entry *cur_root, *proc;
-                char *pathcopy, *cur, *next, pathbuf[64];
-                int pathsize = strlen(list->name) + 1;
-
-                proc = NULL;
-                cur_root = root;
-
-                /* need copy of path for strsep */
-                if (strlen(list->name) > sizeof(pathbuf) - 1) {
-                        OBD_ALLOC(pathcopy, pathsize);
-                        if (pathcopy == NULL)
-                                return -ENOMEM;
-                } else {
-                        pathcopy = pathbuf;
-                }
-
-                next = pathcopy;
-                strcpy(pathcopy, list->name);
-
-                while (cur_root != NULL && (cur = strsep(&next, "/"))) {
-                        if (*cur =='\0') /* skip double/trailing "/" */
-                                continue;
-
-                        proc = lprocfs_srch(cur_root, cur);
-                        CDEBUG(D_OTHER, "cur_root=%s, cur=%s, next=%s, (%s)\n",
-                               cur_root->name, cur, next,
-                               (proc ? "exists" : "new"));
-                        if (next != NULL) {
-                                cur_root = (proc ? proc :
-                                            proc_mkdir(cur, cur_root));
-                        } else if (proc == NULL) {
-                                mode_t mode = 0;
-                                if (list->read_fptr)
-                                        mode = 0444;
-                                if (list->write_fptr)
-                                        mode |= 0200;
-                                proc = create_proc_entry(cur, mode, cur_root);
-                        }
-                }
-
-                if (pathcopy != pathbuf)
-                        OBD_FREE(pathcopy, pathsize);
-
-                if (cur_root == NULL || proc == NULL) {
-                        CERROR("LprocFS: No memory to create /proc entry %s",
-                               list->name);
-                        return -ENOMEM;
-                }
-
-                if (list->fops)
-                        proc->proc_fops = list->fops;
-                else
-                        proc->proc_fops = &lprocfs_generic_fops;
-                proc->read_proc = list->read_fptr;
-                proc->write_proc = list->write_fptr;
-                proc->data = (list->data ? list->data : data);
-                list++;
-        }
-        return 0;
-}
-
-void lprocfs_remove(struct proc_dir_entry **rooth)
-{
-        struct proc_dir_entry *root = *rooth;
-        struct proc_dir_entry *temp = root;
-        struct proc_dir_entry *rm_entry;
-        struct proc_dir_entry *parent;
-
-        if (!root)
-                return;
-        *rooth = NULL;
-
-        parent = root->parent;
-        LASSERT(parent != NULL);
-        LPROCFS_ENTRY(); /* search vs remove race */
-
-        while (1) {
-                while (temp->subdir != NULL)
-                        temp = temp->subdir;
-
-                rm_entry = temp;
-                temp = temp->parent;
-
-                /* Memory corruption once caused this to fail, and
-                   without this LASSERT we would loop here forever. */
-                LASSERTF(strlen(rm_entry->name) == rm_entry->namelen,
-                         "0x%p  %s/%s len %d\n", rm_entry, temp->name,
-                         rm_entry->name, (int)strlen(rm_entry->name));
-
-                /* Now, the rm_entry->deleted flags is protected 
-                 * by _lprocfs_lock. */
-                rm_entry->data = NULL;
-                remove_proc_entry(rm_entry->name, temp);
-                if (temp == parent)
-                        break;
-        }
-        LPROCFS_EXIT();
-}
-
-struct proc_dir_entry *lprocfs_register(const char *name,
-                                        struct proc_dir_entry *parent,
-                                        struct lprocfs_vars *list, void *data)
-{
-        struct proc_dir_entry *newchild;
-
-        newchild = lprocfs_srch(parent, name);
-        if (newchild != NULL) {
-                CERROR(" Lproc: Attempting to register %s more than once \n",
-                       name);
-                return ERR_PTR(-EALREADY);
-        }
-
-        newchild = proc_mkdir(name, parent);
-        if (newchild != NULL && list != NULL) {
-                int rc = lprocfs_add_vars(newchild, list, data);
-                if (rc) {
-                        lprocfs_remove(&newchild);
-                        return ERR_PTR(rc);
-                }
-        }
-        return newchild;
-}
-
-/* Generic callbacks */
-int lprocfs_rd_uint(char *page, char **start, off_t off,
-                    int count, int *eof, void *data)
-{
-        unsigned int *temp = (unsigned int *)data;
-        return snprintf(page, count, "%u\n", *temp);
-}
-
-int lprocfs_wr_uint(struct file *file, const char *buffer,
-                    unsigned long count, void *data)
-{
-        unsigned *p = data;
-        char dummy[MAX_STRING_SIZE + 1], *end;
-        unsigned long tmp;
-
-        dummy[MAX_STRING_SIZE] = '\0';
-        if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
-                return -EFAULT;
-
-        tmp = simple_strtoul(dummy, &end, 0);
-        if (dummy == end)
-                return -EINVAL;
-
-        *p = (unsigned int)tmp;
-        return count;
-}
-
-int lprocfs_rd_u64(char *page, char **start, off_t off,
-                   int count, int *eof, void *data)
-{
-        LASSERT(data != NULL);
-        *eof = 1;
-        return snprintf(page, count, LPU64"\n", *(__u64 *)data);
-}
-
-int lprocfs_rd_atomic(char *page, char **start, off_t off,
-                   int count, int *eof, void *data)
-{
-        atomic_t *atom = (atomic_t *)data;
-        LASSERT(atom != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%d\n", atomic_read(atom));
-}
-
-int lprocfs_wr_atomic(struct file *file, const char *buffer,
-                      unsigned long count, void *data)
-{
-        atomic_t *atm = data;
-        int val = 0;
-        int rc;
-        
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc < 0)
-                return rc;
-
-        if (val <= 0)
-                return -ERANGE;
-                
-        atomic_set(atm, val);
-        return count;
-}
-
-int lprocfs_rd_uuid(char *page, char **start, off_t off, int count,
-                    int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device*)data;
-
-        LASSERT(obd != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%s\n", obd->obd_uuid.uuid);
-}
-
-int lprocfs_rd_name(char *page, char **start, off_t off, int count,
-                    int *eof, void* data)
-{
-        struct obd_device *dev = (struct obd_device *)data;
-
-        LASSERT(dev != NULL);
-        LASSERT(dev->obd_name != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%s\n", dev->obd_name);
-}
-
-int lprocfs_rd_fstype(char *page, char **start, off_t off, int count, int *eof,
-                      void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->obd_fsops != NULL);
-        LASSERT(obd->obd_fsops->fs_type != NULL);
-        return snprintf(page, count, "%s\n", obd->obd_fsops->fs_type);
-}
-
-int lprocfs_rd_blksize(char *page, char **start, off_t off, int count,
-                       int *eof, void *data)
-{
-        struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, cfs_time_current_64() - HZ,
-                            OBD_STATFS_NODELAY);
-        if (!rc) {
-                *eof = 1;
-                rc = snprintf(page, count, "%u\n", osfs.os_bsize);
-        }
-        return rc;
-}
-
-int lprocfs_rd_kbytestotal(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, cfs_time_current_64() - HZ,
-                            OBD_STATFS_NODELAY);
-        if (!rc) {
-                __u32 blk_size = osfs.os_bsize >> 10;
-                __u64 result = osfs.os_blocks;
-
-                while (blk_size >>= 1)
-                        result <<= 1;
-
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", result);
-        }
-        return rc;
-}
-
-int lprocfs_rd_kbytesfree(char *page, char **start, off_t off, int count,
-                          int *eof, void *data)
-{
-        struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, cfs_time_current_64() - HZ,
-                            OBD_STATFS_NODELAY);
-        if (!rc) {
-                __u32 blk_size = osfs.os_bsize >> 10;
-                __u64 result = osfs.os_bfree;
-
-                while (blk_size >>= 1)
-                        result <<= 1;
-
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", result);
-        }
-        return rc;
-}
-
-int lprocfs_rd_kbytesavail(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, cfs_time_current_64() - HZ,
-                            OBD_STATFS_NODELAY);
-        if (!rc) {
-                __u32 blk_size = osfs.os_bsize >> 10;
-                __u64 result = osfs.os_bavail;
-
-                while (blk_size >>= 1)
-                        result <<= 1;
-
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", result);
-        }
-        return rc;
-}
-
-int lprocfs_rd_filestotal(char *page, char **start, off_t off, int count,
-                          int *eof, void *data)
-{
-        struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, cfs_time_current_64() - HZ,
-                            OBD_STATFS_NODELAY);
-        if (!rc) {
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", osfs.os_files);
-        }
-
-        return rc;
-}
-
-int lprocfs_rd_filesfree(char *page, char **start, off_t off, int count,
-                         int *eof, void *data)
-{
-        struct obd_statfs osfs;
-        int rc = obd_statfs(data, &osfs, cfs_time_current_64() - HZ,
-                            OBD_STATFS_NODELAY);
-        if (!rc) {
-                *eof = 1;
-                rc = snprintf(page, count, LPU64"\n", osfs.os_ffree);
-        }
-        return rc;
-}
-
-int lprocfs_rd_server_uuid(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        struct obd_import *imp;
-        char *imp_state_name = NULL;
-        int rc = 0;
-
-        LASSERT(obd != NULL);
-        LPROCFS_CLIMP_CHECK(obd);
-        imp = obd->u.cli.cl_import;
-        imp_state_name = ptlrpc_import_state_name(imp->imp_state);
-        *eof = 1;
-        rc = snprintf(page, count, "%s\t%s%s\n",
-                        obd2cli_tgt(obd), imp_state_name,
-                        imp->imp_deactive ? "\tDEACTIVATED" : "");
-
-        LPROCFS_CLIMP_EXIT(obd);
-        return rc;
-}
-
-int lprocfs_rd_conn_uuid(char *page, char **start, off_t off, int count,
-                         int *eof,  void *data)
-{
-        struct obd_device *obd = (struct obd_device*)data;
-        struct ptlrpc_connection *conn;
-        int rc = 0;
-
-        LASSERT(obd != NULL); 
-        LPROCFS_CLIMP_CHECK(obd);
-        conn = obd->u.cli.cl_import->imp_connection;
-        LASSERT(conn != NULL);
-        *eof = 1;
-        rc = snprintf(page, count, "%s\n", conn->c_remote_uuid.uuid);
-
-        LPROCFS_CLIMP_EXIT(obd);
-        return rc;
-}
-
-int lprocfs_at_hist_helper(char *page, int count, int rc, 
-                           struct adaptive_timeout *at)
-{
-        int i;
-        for (i = 0; i < AT_BINS; i++)
-                rc += snprintf(page + rc, count - rc, "%3u ", at->at_hist[i]); 
-        rc += snprintf(page + rc, count - rc, "\n");
-        return rc;
-}
-
-/* See also ptlrpc_lprocfs_rd_timeouts */
-int lprocfs_rd_timeouts(char *page, char **start, off_t off, int count,
-                        int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        struct obd_import *imp;
-        unsigned int cur, worst;
-        time_t now, worstt;
-        struct dhms ts;
-        int i, rc = 0;
-
-        LASSERT(obd != NULL);
-        LPROCFS_CLIMP_CHECK(obd);
-        imp = obd->u.cli.cl_import;
-        *eof = 1;
-
-        now = cfs_time_current_sec();
-
-        /* Some network health info for kicks */
-        s2dhms(&ts, now - imp->imp_last_reply_time);
-        rc += snprintf(page + rc, count - rc, 
-                       "%-10s : %ld, "DHMS_FMT" ago\n",
-                       "last reply", imp->imp_last_reply_time, DHMS_VARS(&ts));
-
-
-        cur = at_get(&imp->imp_at.iat_net_latency);
-        worst = imp->imp_at.iat_net_latency.at_worst_ever;
-        worstt = imp->imp_at.iat_net_latency.at_worst_time;
-        s2dhms(&ts, now - worstt);
-        rc += snprintf(page + rc, count - rc, 
-                       "%-10s : cur %3u  worst %3u (at %ld, "DHMS_FMT" ago) ",
-                       "network", cur, worst, worstt, DHMS_VARS(&ts)); 
-        rc = lprocfs_at_hist_helper(page, count, rc,
-                                    &imp->imp_at.iat_net_latency); 
-
-        for(i = 0; i < IMP_AT_MAX_PORTALS; i++) {
-                if (imp->imp_at.iat_portal[i] == 0)
-                        break;
-                cur = at_get(&imp->imp_at.iat_service_estimate[i]);
-                worst = imp->imp_at.iat_service_estimate[i].at_worst_ever;
-                worstt = imp->imp_at.iat_service_estimate[i].at_worst_time;
-                s2dhms(&ts, now - worstt);
-                rc += snprintf(page + rc, count - rc,
-                               "portal %-2d  : cur %3u  worst %3u (at %ld, "
-                               DHMS_FMT" ago) ", imp->imp_at.iat_portal[i], 
-                               cur, worst, worstt, DHMS_VARS(&ts));
-                rc = lprocfs_at_hist_helper(page, count, rc,
-                                          &imp->imp_at.iat_service_estimate[i]);
-        }
-
-        LPROCFS_CLIMP_EXIT(obd);
-        return rc;
-}
-
-static const char *obd_connect_names[] = {
-        "read_only",
-        "lov_index",
-        "unused",
-        "write_grant",
-        "server_lock",
-        "version",
-        "request_portal",
-        "acl",
-        "xattr",
-        "create_on_write",
-        "truncate_lock",
-        "initial_transno",
-        "inode_bit_locks",
-        "join_file",
-        "getattr_by_fid",
-        "no_oh_for_devices",
-        "local_1.8_client",
-        "remote_1.8_client",
-        "max_byte_per_rpc",
-        "64bit_qdata",
-        "fid_capability",
-        "oss_capability",
-        "early_lock_cancel",
-        "size_on_mds",
-        "adaptive_timeout",
-        "lru_resize",
-        "mds_mds_connection",
-        "real_conn",
-        "change_qunit_size",
-        "alt_checksum_algorithm",
-        "fid_is_enabled",
-        NULL
-};
-
-int lprocfs_rd_connect_flags(char *page, char **start, off_t off,
-                             int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        __u64 mask = 1, flags;
-        int i, ret = 0;
-
-        LPROCFS_CLIMP_CHECK(obd);
-        flags = obd->u.cli.cl_import->imp_connect_data.ocd_connect_flags;
-        ret = snprintf(page, count, "flags="LPX64"\n", flags);
-        for (i = 0; obd_connect_names[i] != NULL; i++, mask <<= 1) {
-                if (flags & mask)
-                        ret += snprintf(page + ret, count - ret, "%s\n",
-                                        obd_connect_names[i]);
-        }
-        if (flags & ~(mask - 1))
-                ret += snprintf(page + ret, count - ret,
-                                "unknown flags "LPX64"\n", flags & ~(mask - 1));
-
-        LPROCFS_CLIMP_EXIT(obd);
-        return ret;
-}
-EXPORT_SYMBOL(lprocfs_rd_connect_flags);
-
-int lprocfs_rd_num_exports(char *page, char **start, off_t off, int count,
-                           int *eof,  void *data)
-{
-        struct obd_device *obd = (struct obd_device*)data;
-
-        LASSERT(obd != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%u\n", obd->obd_num_exports);
-}
-
-int lprocfs_rd_numrefs(char *page, char **start, off_t off, int count,
-                       int *eof, void *data)
-{
-        struct obd_type *class = (struct obd_type*) data;
-
-        LASSERT(class != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%d\n", class->typ_refcnt);
-}
-
-int lprocfs_obd_setup(struct obd_device *obd, struct lprocfs_vars *list)
-{
-        int rc = 0;
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->obd_magic == OBD_DEVICE_MAGIC);
-        LASSERT(obd->obd_type->typ_procroot != NULL);
-
-        obd->obd_proc_entry = lprocfs_register(obd->obd_name,
-                                               obd->obd_type->typ_procroot,
-                                               list, obd);
-        if (IS_ERR(obd->obd_proc_entry)) {
-                rc = PTR_ERR(obd->obd_proc_entry);
-                CERROR("error %d setting up lprocfs for %s\n",rc,obd->obd_name);
-                obd->obd_proc_entry = NULL;
-        }
-        return rc;
-}
-
-int lprocfs_obd_cleanup(struct obd_device *obd)
-{
-        if (!obd) 
-                return -EINVAL;
-        if (obd->obd_proc_exports_entry) {
-                /* Should be no exports left */
-                LASSERT(obd->obd_proc_exports_entry->subdir == NULL);
-                lprocfs_remove(&obd->obd_proc_exports_entry);
-        }
-        lprocfs_remove(&obd->obd_proc_entry);
-        return 0;
-}
-
-void lprocfs_free_client_stats(void *obj, void *data)
-{
-        struct nid_stat *client_stat = obj;
-
-        CDEBUG(D_CONFIG, "stat %p - data %p/%p/%p\n", client_stat,
-               client_stat->nid_proc, client_stat->nid_stats,
-               client_stat->nid_brw_stats);
-
-        LASSERTF(client_stat->nid_exp_ref_count == 0, "count %d\n",
-                 client_stat->nid_exp_ref_count);
-
-        hlist_del_init(&client_stat->nid_hash);
-        list_del(&client_stat->nid_list);
-
-        if (client_stat->nid_proc)
-                lprocfs_remove(&client_stat->nid_proc);
-
-        if (client_stat->nid_stats)
-                lprocfs_free_stats(&client_stat->nid_stats);
-
-        if (client_stat->nid_brw_stats)
-                OBD_FREE(client_stat->nid_brw_stats, sizeof(struct brw_stats));
-
-        OBD_FREE(client_stat, sizeof(*client_stat));
-        return;
-
-}
-
-void lprocfs_free_per_client_stats(struct obd_device *obd)
-{
-        struct nid_stat *stat;
-        ENTRY;
-
-        /* we need extra list - because hash_exit called to early */
-        while(!list_empty(&obd->obd_nid_stats)) {
-                stat = list_entry(obd->obd_nid_stats.next,
-                                  struct nid_stat, nid_list);
-                lprocfs_free_client_stats(stat, NULL);
-        }
-
-        EXIT;
-}
-
-struct lprocfs_stats *lprocfs_alloc_stats(unsigned int num,
-                                          enum lprocfs_stats_flags flags)
-{
-        struct lprocfs_stats *stats;
-        struct lprocfs_percpu *percpu;
-        unsigned int percpusize;
-        unsigned int i;
-        unsigned int num_cpu;
-
-        if (num == 0)
-                return NULL;
-
-        if (flags & LPROCFS_STATS_FLAG_NOPERCPU)
-                num_cpu = 1;
-        else
-                num_cpu = num_possible_cpus();
-
-        OBD_ALLOC(stats, offsetof(typeof(*stats), ls_percpu[num_cpu]));
-        if (stats == NULL)
-                return NULL;
-
-        if (flags & LPROCFS_STATS_FLAG_NOPERCPU) {
-                stats->ls_flags = flags;
-                spin_lock_init(&stats->ls_lock);
-                /* Use this lock only if there are no percpu areas */
-        } else {
-                stats->ls_flags = 0;
-        }
-
-        percpusize = offsetof(typeof(*percpu), lp_cntr[num]);
-        if (num_cpu > 1)
-                percpusize = L1_CACHE_ALIGN(percpusize);
-
-        stats->ls_percpu_size = num_cpu * percpusize;
-        OBD_ALLOC(stats->ls_percpu[0], stats->ls_percpu_size);
-        if (stats->ls_percpu[0] == NULL) {
-                OBD_FREE(stats, offsetof(typeof(*stats),
-                                         ls_percpu[num_cpu]));
-                return NULL;
-        }
-
-        stats->ls_num = num;
-        for (i = 1; i < num_cpu; i++)
-                stats->ls_percpu[i] = (void *)(stats->ls_percpu[i - 1]) +
-                        percpusize;
-
-        return stats;
-}
-
-void lprocfs_free_stats(struct lprocfs_stats **statsh)
-{
-        struct lprocfs_stats *stats = *statsh;
-        unsigned int num_cpu;
-        
-        if (!stats || (stats->ls_num == 0))
-                return;
-        *statsh = NULL;
-        if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU)
-                num_cpu = 1;
-        else
-                num_cpu = num_possible_cpus();
-
-        OBD_FREE(stats->ls_percpu[0], stats->ls_percpu_size);
-        OBD_FREE(stats, offsetof(typeof(*stats), ls_percpu[num_cpu]));
-}
-
-void lprocfs_clear_stats(struct lprocfs_stats *stats)
-{
-        struct lprocfs_counter *percpu_cntr;
-        int i, j;
-        unsigned int num_cpu;
-
-        num_cpu = lprocfs_stats_lock(stats, LPROCFS_GET_NUM_CPU);
-
-        for (i = 0; i < num_cpu; i++) {
-                for (j = 0; j < stats->ls_num; j++) {
-                        percpu_cntr = &(stats->ls_percpu[i])->lp_cntr[j];
-                        atomic_inc(&percpu_cntr->lc_cntl.la_entry);
-                        percpu_cntr->lc_count = 0;
-                        percpu_cntr->lc_sum = 0;
-                        percpu_cntr->lc_min = LC_MIN_INIT;
-                        percpu_cntr->lc_max = 0;
-                        percpu_cntr->lc_sumsquare = 0;
-                        atomic_inc(&percpu_cntr->lc_cntl.la_exit);
-                }
-        }
-
-        lprocfs_stats_unlock(stats);
-}
-
-static ssize_t lprocfs_stats_seq_write(struct file *file, const char *buf,
-                                       size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct lprocfs_stats *stats = seq->private;
-
-        lprocfs_clear_stats(stats);
-
-        return len;
-}
-
-static void *lprocfs_stats_seq_start(struct seq_file *p, loff_t *pos)
-{
-        struct lprocfs_stats *stats = p->private;
-        /* return 1st cpu location */
-        return (*pos >= stats->ls_num) ? NULL :
-                &(stats->ls_percpu[0]->lp_cntr[*pos]);
-}
-
-static void lprocfs_stats_seq_stop(struct seq_file *p, void *v)
-{
-}
-
-static void *lprocfs_stats_seq_next(struct seq_file *p, void *v, loff_t *pos)
-{
-        struct lprocfs_stats *stats = p->private;
-        ++*pos;
-        return (*pos >= stats->ls_num) ? NULL :
-                &(stats->ls_percpu[0]->lp_cntr[*pos]);
-}
-
-/* seq file export of one lprocfs counter */
-static int lprocfs_stats_seq_show(struct seq_file *p, void *v)
-{
-       struct lprocfs_stats *stats = p->private;
-       struct lprocfs_counter  *cntr = v;
-       struct lprocfs_counter  t, ret = { .lc_min = LC_MIN_INIT };
-       int i, idx, rc = 0;
-       unsigned int num_cpu;
-
-       if (cntr == &(stats->ls_percpu[0])->lp_cntr[0]) {
-               struct timeval now;
-               do_gettimeofday(&now);
-               rc = seq_printf(p, "%-25s %lu.%lu secs.usecs\n",
-                               "snapshot_time", now.tv_sec, now.tv_usec);
-               if (rc < 0)
-                       return rc;
-       }
-       idx = cntr - &(stats->ls_percpu[0])->lp_cntr[0];
-
-       if (stats->ls_flags & LPROCFS_STATS_FLAG_NOPERCPU)
-               num_cpu = 1;
-       else
-               num_cpu = num_possible_cpus();
-
-       for (i = 0; i < num_cpu; i++) {
-               struct lprocfs_counter *percpu_cntr =
-                       &(stats->ls_percpu[i])->lp_cntr[idx];
-               int centry;
-
-               do {
-                       centry = atomic_read(&percpu_cntr->lc_cntl.la_entry);
-                       t.lc_count = percpu_cntr->lc_count;
-                       t.lc_sum = percpu_cntr->lc_sum;
-                       t.lc_min = percpu_cntr->lc_min;
-                       t.lc_max = percpu_cntr->lc_max;
-                       t.lc_sumsquare = percpu_cntr->lc_sumsquare;
-               } while (centry != atomic_read(&percpu_cntr->lc_cntl.la_entry) &&
-                        centry != atomic_read(&percpu_cntr->lc_cntl.la_exit));
-               ret.lc_count += t.lc_count;
-               ret.lc_sum += t.lc_sum;
-               if (t.lc_min < ret.lc_min)
-                       ret.lc_min = t.lc_min;
-               if (t.lc_max > ret.lc_max)
-                       ret.lc_max = t.lc_max;
-               ret.lc_sumsquare += t.lc_sumsquare;
-       }
-
-       if (ret.lc_count == 0)
-               goto out;
-
-       rc = seq_printf(p, "%-25s "LPD64" samples [%s]", cntr->lc_name,
-                       ret.lc_count, cntr->lc_units);
-       if (rc < 0)
-               goto out;
-
-       if ((cntr->lc_config & LPROCFS_CNTR_AVGMINMAX) && (ret.lc_count > 0)) {
-               rc = seq_printf(p, " "LPD64" "LPD64" "LPD64,
-                               ret.lc_min, ret.lc_max, ret.lc_sum);
-               if (rc < 0)
-                       goto out;
-               if (cntr->lc_config & LPROCFS_CNTR_STDDEV)
-                       rc = seq_printf(p, " "LPD64, ret.lc_sumsquare);
-               if (rc < 0)
-                       goto out;
-       }
-       rc = seq_printf(p, "\n");
- out:
-       return (rc < 0) ? rc : 0;
-}
-
-struct seq_operations lprocfs_stats_seq_sops = {
-        start: lprocfs_stats_seq_start,
-        stop:  lprocfs_stats_seq_stop,
-        next:  lprocfs_stats_seq_next,
-        show:  lprocfs_stats_seq_show,
-};
-
-static int lprocfs_stats_seq_open(struct inode *inode, struct file *file)
-{
-        struct proc_dir_entry *dp = PDE(inode);
-        struct seq_file *seq;
-        int rc;
-
-        LPROCFS_ENTRY_AND_CHECK(dp);
-        rc = seq_open(file, &lprocfs_stats_seq_sops);
-        if (rc) {
-                LPROCFS_EXIT();
-                return rc;
-        }
-
-        seq = file->private_data;
-        seq->private = dp->data;
-        return 0;
-}
-
-struct file_operations lprocfs_stats_seq_fops = {
-        .owner   = THIS_MODULE,
-        .open    = lprocfs_stats_seq_open,
-        .read    = seq_read,
-        .write   = lprocfs_stats_seq_write,
-        .llseek  = seq_lseek,
-        .release = lprocfs_seq_release,
-};
-
-int lprocfs_register_stats(struct proc_dir_entry *root, const char *name,
-                           struct lprocfs_stats *stats)
-{
-        struct proc_dir_entry *entry;
-        LASSERT(root != NULL);
-
-        entry = create_proc_entry(name, 0644, root);
-        if (entry == NULL)
-                return -ENOMEM;
-        entry->proc_fops = &lprocfs_stats_seq_fops;
-        entry->data = (void *)stats;
-        return 0;
-}
-
-void lprocfs_counter_init(struct lprocfs_stats *stats, int index,
-                          unsigned conf, const char *name, const char *units)
-{
-        struct lprocfs_counter *c;
-        int i;
-        unsigned int num_cpu;
-
-        LASSERT(stats != NULL);
-
-        num_cpu = lprocfs_stats_lock(stats, LPROCFS_GET_NUM_CPU);
-
-        for (i = 0; i < num_cpu; i++) {
-                c = &(stats->ls_percpu[i]->lp_cntr[index]);
-                c->lc_config = conf;
-                c->lc_count = 0;
-                c->lc_sum = 0;
-                c->lc_min = LC_MIN_INIT;
-                c->lc_max = 0;
-                c->lc_name = name;
-                c->lc_units = units;
-        }
-
-        lprocfs_stats_unlock(stats);
-}
-EXPORT_SYMBOL(lprocfs_counter_init);
-
-#define LPROCFS_OBD_OP_INIT(base, stats, op)                               \
-do {                                                                       \
-        unsigned int coffset = base + OBD_COUNTER_OFFSET(op);              \
-        LASSERT(coffset < stats->ls_num);                                  \
-        lprocfs_counter_init(stats, coffset, 0, #op, "reqs");              \
-} while (0)
-
-void lprocfs_init_ops_stats(int num_private_stats, struct lprocfs_stats *stats)
-{
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, iocontrol);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, get_info);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_info_async);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, attach);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, detach);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, setup);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, precleanup);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, cleanup);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, process_config);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, postrecov);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, add_conn);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, del_conn);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, connect);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, reconnect);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, disconnect);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, statfs_async);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, packmd);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpackmd);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, checkmd);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, preallocate);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, precreate);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, create);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, setattr_async);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, getattr_async);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, brw_async);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, prep_async_page);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, queue_async_io);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, queue_group_io);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, trigger_group_io);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, set_async_flags);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, teardown_async_page);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, merge_lvb);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, adjust_kms);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, punch);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, sync);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, migrate);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, copy);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, iterate);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, preprw);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, commitrw);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, enqueue);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, match);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, change_cbdata);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, cancel_unused);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, join_lru);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, init_export);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, destroy_export);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, extent_calc);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_init);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, llog_finish);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, pin);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, unpin);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, import_event);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, notify);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, health_check);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, quotacheck);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, quotactl);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, quota_adjust_qunit);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, ping);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, register_page_removal_cb);
-        LPROCFS_OBD_OP_INIT(num_private_stats,stats,unregister_page_removal_cb);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats, register_lock_cancel_cb);
-        LPROCFS_OBD_OP_INIT(num_private_stats, stats,unregister_lock_cancel_cb);
-}
-
-int lprocfs_alloc_obd_stats(struct obd_device *obd, unsigned num_private_stats)
-{
-        struct lprocfs_stats *stats;
-        unsigned int num_stats;
-        int rc, i;
-
-        LASSERT(obd->obd_stats == NULL);
-        LASSERT(obd->obd_proc_entry != NULL);
-        LASSERT(obd->obd_cntr_base == 0);
-
-        num_stats = ((int)sizeof(*obd->obd_type->typ_ops) / sizeof(void *)) +
-                num_private_stats - 1 /* o_owner */;
-        stats = lprocfs_alloc_stats(num_stats, 0);
-        if (stats == NULL)
-                return -ENOMEM;
-
-        lprocfs_init_ops_stats(num_private_stats, stats);
-
-        for (i = num_private_stats; i < num_stats; i++) {
-                /* If this LBUGs, it is likely that an obd
-                 * operation was added to struct obd_ops in
-                 * <obd.h>, and that the corresponding line item
-                 * LPROCFS_OBD_OP_INIT(.., .., opname)
-                 * is missing from the list above. */
-                LASSERTF(stats->ls_percpu[0]->lp_cntr[i].lc_name != NULL,
-                         "Missing obd_stat initializer obd_op "
-                         "operation at offset %d.\n", i - num_private_stats);
-        }
-        rc = lprocfs_register_stats(obd->obd_proc_entry, "stats", stats);
-        if (rc < 0) {
-                lprocfs_free_stats(&stats);
-        } else {
-                obd->obd_stats  = stats;
-                obd->obd_cntr_base = num_private_stats;
-        }
-        return rc;
-}
-
-void lprocfs_free_obd_stats(struct obd_device *obd)
-{
-        if (obd->obd_stats) 
-                lprocfs_free_stats(&obd->obd_stats);
-}
-
-int lprocfs_exp_rd_nid(char *page, char **start, off_t off, int count,
-                         int *eof,  void *data)
-{
-        struct obd_export *exp = (struct obd_export*)data;
-        LASSERT(exp != NULL);
-        *eof = 1;
-        return snprintf(page, count, "%s\n", obd_export_nid2str(exp));
-}
-
-struct exp_uuid_cb_data {
-        char                   *page;
-        int                     count;
-        int                    *eof;
-        int                    *len;
-};
-
-void lprocfs_exp_print_uuid(void *obj, void *cb_data)
-{
-        struct obd_export *exp = (struct obd_export *)obj;
-        struct exp_uuid_cb_data *data = (struct exp_uuid_cb_data *)cb_data;
-
-        if (exp->exp_nid_stats)
-                *data->len += snprintf((data->page + *data->len),
-                                       data->count, "%s\n",
-                                       obd_uuid2str(&exp->exp_client_uuid));
-}
-
-int lprocfs_exp_rd_uuid(char *page, char **start, off_t off, int count,
-                        int *eof,  void *data)
-{
-        struct nid_stat *stats = (struct nid_stat *)data;
-        struct exp_uuid_cb_data cb_data;
-        struct obd_device *obd = stats->nid_obd;
-        int len = 0;
-
-        *eof = 1;
-        page[0] = '\0';
-        LASSERT(obd != NULL);
-
-        cb_data.page = page;
-        cb_data.count = count;
-        cb_data.eof = eof;
-        cb_data.len = &len;
-        lustre_hash_bucket_iterate(obd->obd_nid_hash_body,
-                                   &stats->nid, lprocfs_exp_print_uuid,
-                                   &cb_data);
-        return (*cb_data.len);
-}
-
-int lprocfs_nid_stats_clear_read(char *page, char **start, off_t off,
-                                        int count, int *eof,  void *data)
-{
-        *eof = 1;
-        return snprintf(page, count, "%s\n",
-                        "Write into this file to clear all nid stats and "
-                        "stale nid entries");
-}
-EXPORT_SYMBOL(lprocfs_nid_stats_clear_read);
-
-void lprocfs_nid_stats_clear_write_cb(void *obj, void *data)
-{
-        struct nid_stat *client_stat = obj;
-        int i;
-
-        if(client_stat->nid_exp_ref_count == 1) {
-                hlist_del_init(&client_stat->nid_hash);
-                lprocfs_free_client_stats(client_stat, data);
-                OBD_FREE(client_stat, sizeof(struct nid_stat));
-                EXIT;
-                return;
-        }
-        /* we has reference to object - only clear data*/
-        if (client_stat->nid_stats) {
-                lprocfs_clear_stats(client_stat->nid_stats);
-        }
-
-        if (client_stat->nid_brw_stats) {
-                for (i = 0; i < BRW_LAST; i++)
-                        lprocfs_oh_clear(&client_stat->nid_brw_stats->hist[i]);
-        }
-        EXIT;
-        return;
-}
-
-
-int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer,
-                                         unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-
-
-        lustre_hash_iterate_all(obd->obd_nid_stats_hash_body,
-                                lprocfs_free_client_stats, NULL);
-
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_nid_stats_clear_write);
-
-int lprocfs_exp_setup(struct obd_export *exp, lnet_nid_t nid, int *newnid)
-{
-        int rc = 0;
-        struct nid_stat *tmp = NULL, *tmp1;
-        struct obd_device *obd = NULL;
-        ENTRY;
-
-        *newnid = 0;
-
-        if (!exp || !exp->exp_obd || !exp->exp_obd->obd_proc_exports_entry ||
-            !exp->exp_obd->obd_nid_stats_hash_body)
-                RETURN(-EINVAL);
-
-        if (!nid)
-                RETURN(0);
-
-        obd = exp->exp_obd;
-
-        CDEBUG(D_CONFIG, "using hash %p\n", obd->obd_nid_stats_hash_body);
-
-        OBD_ALLOC(tmp, sizeof(struct nid_stat));
-        if (tmp == NULL)
-                RETURN(-ENOMEM);
-
-        tmp->nid = nid;
-        tmp->nid_obd = exp->exp_obd;
-        tmp->nid_exp_ref_count = 1; /* need live in hash after destroy export */
-
-        tmp1= lustre_hash_findadd_unique(obd->obd_nid_stats_hash_body, &nid,
-                                         &tmp->nid_hash);
-        CDEBUG(D_INFO, "Found stats %p for nid %s - ref %d\n",
-               tmp1, libcfs_nid2str(nid), tmp->nid_exp_ref_count);
-
-        if (tmp1 != tmp) {
-                exp->exp_nid_stats = tmp1;
-                GOTO(destroy_new, rc = 0);
-        }
-        /* not found - create */
-        tmp->nid_proc = proc_mkdir(libcfs_nid2str(nid),
-                                   obd->obd_proc_exports_entry);
-        if (!tmp->nid_proc) {
-                CERROR("Error making export directory for"
-                       " nid %s\n", libcfs_nid2str(nid));
-                lustre_hash_delitem(obd->obd_nid_stats_hash_body, &nid,
-                                    &tmp->nid_hash);
-                GOTO(destroy_new, rc = -ENOMEM);
-        }
-
-        rc = lprocfs_add_simple(tmp->nid_proc, "uuid",
-                                lprocfs_exp_rd_uuid, NULL, tmp);
-        if (rc)
-                CWARN("Error adding the uuid file\n");
-
-        /* protect competitive add to list, not need locking on destroy */
-        spin_lock(&obd->nid_lock);
-        list_add(&tmp->nid_list, &obd->obd_nid_stats);
-        spin_unlock(&obd->nid_lock);
-
-        exp->exp_nid_stats = tmp;
-        *newnid = 1;
-        RETURN(rc);
-
-destroy_new:
-        OBD_FREE(tmp, sizeof(struct nid_stat));
-        RETURN(rc);
-}
-int lprocfs_exp_cleanup(struct obd_export *exp)
-{
-        struct nid_stat *stat = exp->exp_nid_stats;
-
-        if(!stat)
-                RETURN(0);
-
-        stat->nid_exp_ref_count--;
-        CDEBUG(D_INFO, "Put stat %p - %d\n", stat, stat->nid_exp_ref_count);
-
-        exp->exp_nid_stats = NULL;
-        lprocfs_free_stats(&exp->exp_ldlm_stats);
-        lprocfs_free_stats(&exp->exp_ops_stats);
-
-        return 0;
-}
-
-int lprocfs_write_helper(const char *buffer, unsigned long count,
-                         int *val)
-{
-        return lprocfs_write_frac_helper(buffer, count, val, 1);
-}
-
-int lprocfs_write_frac_helper(const char *buffer, unsigned long count,
-                              int *val, int mult)
-{
-        char kernbuf[20], *end, *pbuf;
-
-        if (count > (sizeof(kernbuf) - 1))
-                return -EINVAL;
-
-        if (copy_from_user(kernbuf, buffer, count))
-                return -EFAULT;
-
-        kernbuf[count] = '\0';
-        pbuf = kernbuf;
-        if (*pbuf == '-') {
-                mult = -mult;
-                pbuf++;
-        }
-
-        *val = (int)simple_strtoul(pbuf, &end, 10) * mult;
-        if (pbuf == end)
-                return -EINVAL;
-
-        if (end != NULL && *end == '.') {
-                int temp_val, pow = 1;
-                int i;
-
-                pbuf = end + 1;
-                if (strlen(pbuf) > 5)
-                        pbuf[5] = '\0'; /*only allow 5bits fractional*/
-
-                temp_val = (int)simple_strtoul(pbuf, &end, 10) * mult;
-
-                if (pbuf < end) {
-                        for (i = 0; i < (end - pbuf); i++)
-                                pow *= 10;
-
-                        *val += temp_val / pow;
-                }
-        }
-        return 0;
-}
-
-int lprocfs_read_frac_helper(char *buffer, unsigned long count, long val, int mult)
-{
-        long decimal_val, frac_val;
-        int prtn;
-
-        if (count < 10)
-                return -EINVAL;
-
-        decimal_val = val / mult;
-        prtn = snprintf(buffer, count, "%ld", decimal_val);
-        frac_val = val % mult;
-
-        if (prtn < (count - 4) && frac_val > 0) {
-                long temp_frac;
-                int i, temp_mult = 1, frac_bits = 0;
-
-                temp_frac = frac_val * 10;
-                buffer[prtn++] = '.';
-                while (frac_bits < 2 && (temp_frac / mult) < 1 ) { /*only reserved 2bits fraction*/
-                        buffer[prtn++] ='0';
-                        temp_frac *= 10;
-                        frac_bits++;
-                }
-                /*
-                  Need to think these cases :
-                        1. #echo x.00 > /proc/xxx       output result : x
-                        2. #echo x.0x > /proc/xxx       output result : x.0x
-                        3. #echo x.x0 > /proc/xxx       output result : x.x
-                        4. #echo x.xx > /proc/xxx       output result : x.xx
-                        Only reserved 2bits fraction.       
-                 */
-                for (i = 0; i < (5 - prtn); i++)
-                        temp_mult *= 10;
-
-                frac_bits = min((int)count - prtn, 3 - frac_bits);
-                prtn += snprintf(buffer + prtn, frac_bits, "%ld", frac_val * temp_mult / mult);
-
-                prtn--;
-                while(buffer[prtn] < '1' || buffer[prtn] > '9') {
-                        prtn--;
-                        if (buffer[prtn] == '.') {
-                                prtn--;
-                                break;
-                        }
-                }
-                prtn++;
-        }
-        buffer[prtn++] ='\n';
-        return prtn;
-}
-
-int lprocfs_write_u64_helper(const char *buffer, unsigned long count,__u64 *val)
-{
-        return lprocfs_write_frac_u64_helper(buffer, count, val, 1);
-}
-
-int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
-                              __u64 *val, int mult)
-{
-        char kernbuf[22], *end, *pbuf;
-        __u64 whole, frac = 0, units;
-        unsigned frac_d = 1;
-
-        if (count > (sizeof(kernbuf) - 1) )
-                return -EINVAL;
-
-        if (copy_from_user(kernbuf, buffer, count))
-                return -EFAULT;
-
-        kernbuf[count] = '\0';
-        pbuf = kernbuf;
-        if (*pbuf == '-') {
-                mult = -mult;
-                pbuf++;
-        }
-
-        whole = simple_strtoull(pbuf, &end, 10);
-        if (pbuf == end)
-                return -EINVAL;
-
-        if (end != NULL && *end == '.') {
-                int i;
-                pbuf = end + 1;
-
-                /* need to limit frac_d to a __u32 */
-                if (strlen(pbuf) > 10)
-                        pbuf[10] = '\0';
-
-                frac = simple_strtoull(pbuf, &end, 10);
-                /* count decimal places */
-                for (i = 0; i < (end - pbuf); i++)
-                        frac_d *= 10;
-        }
-
-        units = 1;
-        switch(*end) {
-        case 'p': case 'P':
-                units <<= 10;
-        case 't': case 'T':
-                units <<= 10;
-        case 'g': case 'G':
-                units <<= 10;
-        case 'm': case 'M':
-                units <<= 10;
-        case 'k': case 'K':
-                units <<= 10;
-        }
-        /* Specified units override the multiplier */
-        if (units)
-                mult = mult < 0 ? -units : units;
-
-        frac *= mult;
-        do_div(frac, frac_d);
-        *val = whole * mult + frac;
-        return 0;
-}
-
-int lprocfs_seq_create(cfs_proc_dir_entry_t *parent, 
-                       char *name, mode_t mode,
-                       struct file_operations *seq_fops, void *data)
-{
-        struct proc_dir_entry *entry;
-        ENTRY;
-
-        entry = create_proc_entry(name, mode, parent);
-        if (entry == NULL)
-                RETURN(-ENOMEM);
-        entry->proc_fops = seq_fops;
-        entry->data = data;
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(lprocfs_seq_create);
-
-__inline__ int lprocfs_obd_seq_create(struct obd_device *dev, char *name,
-                                      mode_t mode,
-                                      struct file_operations *seq_fops,
-                                      void *data)
-{
-        return (lprocfs_seq_create(dev->obd_proc_entry, name, 
-                                   mode, seq_fops, data));
-}
-EXPORT_SYMBOL(lprocfs_obd_seq_create);
-
-void lprocfs_oh_tally(struct obd_histogram *oh, unsigned int value)
-{
-        if (value >= OBD_HIST_MAX)
-                value = OBD_HIST_MAX - 1;
-
-        spin_lock(&oh->oh_lock);
-        oh->oh_buckets[value]++;
-        spin_unlock(&oh->oh_lock);
-}
-EXPORT_SYMBOL(lprocfs_oh_tally);
-
-void lprocfs_oh_tally_log2(struct obd_histogram *oh, unsigned int value)
-{
-        unsigned int val;
-
-        for (val = 0; ((1 << val) < value) && (val <= OBD_HIST_MAX); val++)
-                ;
-
-        lprocfs_oh_tally(oh, val);
-}
-EXPORT_SYMBOL(lprocfs_oh_tally_log2);
-
-unsigned long lprocfs_oh_sum(struct obd_histogram *oh)
-{
-        unsigned long ret = 0;
-        int i;
-
-        for (i = 0; i < OBD_HIST_MAX; i++)
-                ret +=  oh->oh_buckets[i];
-        return ret;
-}
-EXPORT_SYMBOL(lprocfs_oh_sum);
-
-void lprocfs_oh_clear(struct obd_histogram *oh)
-{
-        spin_lock(&oh->oh_lock);
-        memset(oh->oh_buckets, 0, sizeof(oh->oh_buckets));
-        spin_unlock(&oh->oh_lock);
-}
-EXPORT_SYMBOL(lprocfs_oh_clear);
-
-int lprocfs_obd_rd_recovery_status(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        int len = 0, size;
-
-        LASSERT(obd != NULL);
-        LASSERT(count >= 0);
-
-        /* Set start of user data returned to
-           page + off since the user may have
-           requested to read much smaller than
-           what we need to read */
-        *start = page + off;
-
-        /* We know we are allocated a page here.
-           Also we know that this function will
-           not need to write more than a page
-           so we can truncate at CFS_PAGE_SIZE.  */
-        size = min(count + (int)off + 1, (int)CFS_PAGE_SIZE);
-
-        /* Initialize the page */
-        memset(page, 0, size);
-
-        if (lprocfs_obd_snprintf(&page, size, &len, "status: ") <= 0)
-                goto out;
-        if (obd->obd_max_recoverable_clients == 0) {
-                if (lprocfs_obd_snprintf(&page, size, &len, "INACTIVE\n") <= 0)
-                        goto out;
-
-                goto fclose;
-        }
-
-        /* sampled unlocked, but really... */
-        if (obd->obd_recovering == 0) {
-                if (lprocfs_obd_snprintf(&page, size, &len, "COMPLETE\n") <= 0)
-                        goto out;
-                if (lprocfs_obd_snprintf(&page, size, &len,
-                                         "recovery_start: %lu\n",
-                                         obd->obd_recovery_start) <= 0)
-                        goto out;
-                if (lprocfs_obd_snprintf(&page, size, &len,
-                                         "recovery_duration: %lu\n",
-                                         obd->obd_recovery_end -
-                                         obd->obd_recovery_start) <= 0)
-                        goto out;
-                /* Number of clients that have completed recovery */
-                if (lprocfs_obd_snprintf(&page, size, &len,
-                                         "completed_clients: %d/%d\n",
-                                         obd->obd_max_recoverable_clients -
-                                         obd->obd_recoverable_clients,
-                                         obd->obd_max_recoverable_clients) <= 0)
-                        goto out;
-                if (lprocfs_obd_snprintf(&page, size, &len,
-                                         "replayed_requests: %d\n",
-                                         obd->obd_replayed_requests) <= 0)
-                        goto out;
-                if (lprocfs_obd_snprintf(&page, size, &len,
-                                         "last_transno: "LPD64"\n",
-                                         obd->obd_next_recovery_transno - 1)<=0)
-                        goto out;
-                goto fclose;
-        }
-
-        if (lprocfs_obd_snprintf(&page, size, &len, "RECOVERING\n") <= 0)
-                goto out;
-        if (lprocfs_obd_snprintf(&page, size, &len, "recovery_start: %lu\n",
-                                 obd->obd_recovery_start) <= 0)
-                goto out;
-        if (lprocfs_obd_snprintf(&page, size, &len, "time_remaining: %lu\n",
-                           cfs_time_current_sec() >= obd->obd_recovery_end ? 0 :
-                           obd->obd_recovery_end - cfs_time_current_sec()) <= 0)
-                goto out;
-        if (lprocfs_obd_snprintf(&page, size, &len,"connected_clients: %d/%d\n",
-                                 obd->obd_connected_clients,
-                                 obd->obd_max_recoverable_clients) <= 0)
-                goto out;
-        /* Number of clients that have completed recovery */
-        if (lprocfs_obd_snprintf(&page, size, &len,"completed_clients: %d/%d\n",
-                                 obd->obd_max_recoverable_clients -
-                                 obd->obd_recoverable_clients,
-                                 obd->obd_max_recoverable_clients) <= 0)
-                goto out;
-        if (lprocfs_obd_snprintf(&page, size, &len,"replayed_requests: %d/??\n",
-                                 obd->obd_replayed_requests) <= 0)
-                goto out;
-        if (lprocfs_obd_snprintf(&page, size, &len, "queued_requests: %d\n",
-                                 obd->obd_requests_queued_for_recovery) <= 0)
-                goto out;
-        if (lprocfs_obd_snprintf(&page, size, &len, "next_transno: "LPD64"\n",
-                                 obd->obd_next_recovery_transno) <= 0)
-                goto out;
-
-fclose:
-        *eof = 1;
-out:
-        return min(count, len - (int)off);
-}
-EXPORT_SYMBOL(lprocfs_obd_rd_recovery_status);
-
-#ifdef CRAY_XT3
-int lprocfs_obd_rd_recovery_maxtime(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%lu\n", 
-                        obd->obd_recovery_max_time);
-}
-EXPORT_SYMBOL(lprocfs_obd_rd_recovery_maxtime);
-
-int lprocfs_obd_wr_recovery_maxtime(struct file *file, const char *buffer,
-                                    unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        obd->obd_recovery_max_time = val;
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_obd_wr_recovery_maxtime);
-#endif /* CRAY_XT3 */
-
-#ifdef HAVE_QUOTA_SUPPORT
-int lprocfs_quota_rd_bunit(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_bunit_sz);
-}
-EXPORT_SYMBOL(lprocfs_quota_rd_bunit);
-
-int lprocfs_quota_wr_bunit(struct file *file, const char *buffer,
-                           unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val % QUOTABLOCK_SIZE ||
-            val <= obd->u.obt.obt_qctxt.lqc_btune_sz)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_bunit_sz = val;
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_quota_wr_bunit);
-
-int lprocfs_quota_rd_btune(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_btune_sz);
-}
-EXPORT_SYMBOL(lprocfs_quota_rd_btune);
-
-int lprocfs_quota_wr_btune(struct file *file, const char *buffer,
-                           unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val <= QUOTABLOCK_SIZE * MIN_QLIMIT || val % QUOTABLOCK_SIZE ||
-            val >= obd->u.obt.obt_qctxt.lqc_bunit_sz)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_btune_sz = val;
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_quota_wr_btune);
-
-int lprocfs_quota_rd_iunit(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_iunit_sz);
-}
-EXPORT_SYMBOL(lprocfs_quota_rd_iunit);
-
-int lprocfs_quota_wr_iunit(struct file *file, const char *buffer,
-                           unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val <= obd->u.obt.obt_qctxt.lqc_itune_sz)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_iunit_sz = val;
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_quota_wr_iunit);
-
-int lprocfs_quota_rd_itune(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%lu\n",
-                        obd->u.obt.obt_qctxt.lqc_itune_sz);
-}
-EXPORT_SYMBOL(lprocfs_quota_rd_itune);
-
-int lprocfs_quota_wr_itune(struct file *file, const char *buffer,
-                           unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val <= MIN_QLIMIT ||
-            val >= obd->u.obt.obt_qctxt.lqc_iunit_sz)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_itune_sz = val;
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_quota_wr_itune);
-
-int lprocfs_quota_rd_switch_seconds(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        LASSERT(obd != NULL);
-
-        return snprintf(page, count, "%d\n",
-                        obd->u.obt.obt_qctxt.lqc_switch_seconds);
-}
-EXPORT_SYMBOL(lprocfs_quota_rd_switch_seconds);
-
-int lprocfs_quota_wr_switch_seconds(struct file *file, const char *buffer,
-                                    unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        int val, rc;
-        LASSERT(obd != NULL);
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val <= 10)
-                return -EINVAL;
-
-        obd->u.obt.obt_qctxt.lqc_switch_seconds = val;
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_quota_wr_switch_seconds);
-
-#endif
-
-
-EXPORT_SYMBOL(lprocfs_register);
-EXPORT_SYMBOL(lprocfs_srch);
-EXPORT_SYMBOL(lprocfs_remove);
-EXPORT_SYMBOL(lprocfs_add_vars);
-EXPORT_SYMBOL(lprocfs_obd_setup);
-EXPORT_SYMBOL(lprocfs_obd_cleanup);
-EXPORT_SYMBOL(lprocfs_add_simple);
-EXPORT_SYMBOL(lprocfs_free_per_client_stats);
-EXPORT_SYMBOL(lprocfs_alloc_stats);
-EXPORT_SYMBOL(lprocfs_free_stats);
-EXPORT_SYMBOL(lprocfs_clear_stats);
-EXPORT_SYMBOL(lprocfs_register_stats);
-EXPORT_SYMBOL(lprocfs_init_ops_stats);
-EXPORT_SYMBOL(lprocfs_alloc_obd_stats);
-EXPORT_SYMBOL(lprocfs_free_obd_stats);
-EXPORT_SYMBOL(lprocfs_exp_setup);
-EXPORT_SYMBOL(lprocfs_exp_cleanup);
-
-EXPORT_SYMBOL(lprocfs_rd_u64);
-EXPORT_SYMBOL(lprocfs_rd_atomic);
-EXPORT_SYMBOL(lprocfs_wr_atomic);
-EXPORT_SYMBOL(lprocfs_rd_uint);
-EXPORT_SYMBOL(lprocfs_wr_uint);
-EXPORT_SYMBOL(lprocfs_rd_uuid);
-EXPORT_SYMBOL(lprocfs_rd_name);
-EXPORT_SYMBOL(lprocfs_rd_fstype);
-EXPORT_SYMBOL(lprocfs_rd_server_uuid);
-EXPORT_SYMBOL(lprocfs_rd_conn_uuid);
-EXPORT_SYMBOL(lprocfs_rd_num_exports);
-EXPORT_SYMBOL(lprocfs_rd_numrefs);
-EXPORT_SYMBOL(lprocfs_at_hist_helper);
-EXPORT_SYMBOL(lprocfs_rd_timeouts);
-EXPORT_SYMBOL(lprocfs_rd_blksize);
-EXPORT_SYMBOL(lprocfs_rd_kbytestotal);
-EXPORT_SYMBOL(lprocfs_rd_kbytesfree);
-EXPORT_SYMBOL(lprocfs_rd_kbytesavail);
-EXPORT_SYMBOL(lprocfs_rd_filestotal);
-EXPORT_SYMBOL(lprocfs_rd_filesfree);
-
-EXPORT_SYMBOL(lprocfs_write_helper);
-EXPORT_SYMBOL(lprocfs_write_frac_helper);
-EXPORT_SYMBOL(lprocfs_read_frac_helper);
-EXPORT_SYMBOL(lprocfs_write_u64_helper);
-EXPORT_SYMBOL(lprocfs_write_frac_u64_helper);
-#endif /* LPROCFS*/
diff --git a/lustre/obdclass/lustre_handles.c b/lustre/obdclass/lustre_handles.c
deleted file mode 100644
index 05b10c4bc94c74e90d84738dd112e5d063d81750..0000000000000000000000000000000000000000
--- a/lustre/obdclass/lustre_handles.c
+++ /dev/null
@@ -1,251 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <lustre_handles.h>
-#include <lustre_lib.h>
-
-#if !defined(HAVE_RCU) || !defined(__KERNEL__)
-# define list_add_rcu            list_add
-# define list_del_rcu            list_del
-# define list_for_each_rcu       list_for_each
-# define list_for_each_safe_rcu  list_for_each_safe
-# define rcu_read_lock()         spin_lock(&bucket->lock)
-# define rcu_read_unlock()       spin_unlock(&bucket->lock)
-#endif /* ifndef HAVE_RCU */
-
-static __u64 handle_base;
-#define HANDLE_INCR 7
-static spinlock_t handle_base_lock;
-
-static struct handle_bucket {
-        spinlock_t lock;
-        struct list_head head;
-} *handle_hash;
-
-static atomic_t handle_count = ATOMIC_INIT(0);
-
-#ifdef __arch_um__
-/* For unknown reason, UML uses kmalloc rather than vmalloc to allocate
- * memory(OBD_VMALLOC). Therefore, we have to redefine the
- * HANDLE_HASH_SIZE to make the hash heads don't exceed 128K.
- */
-#define HANDLE_HASH_SIZE 4096
-#else
-#define HANDLE_HASH_SIZE (1 << 14)
-#endif /* ifdef __arch_um__ */
-
-#define HANDLE_HASH_MASK (HANDLE_HASH_SIZE - 1)
-
-/*
- * Generate a unique 64bit cookie (hash) for a handle and insert it into
- * global (per-node) hash-table.
- */
-void class_handle_hash(struct portals_handle *h, portals_handle_addref_cb cb)
-{
-        struct handle_bucket *bucket;
-        ENTRY;
-
-        LASSERT(h != NULL);
-        LASSERT(list_empty(&h->h_link));
-
-        /*
-         * This is fast, but simplistic cookie generation algorithm, it will
-         * need a re-do at some point in the future for security.
-         */
-        spin_lock(&handle_base_lock);
-        handle_base += HANDLE_INCR;
-
-        h->h_cookie = handle_base;
-        if (unlikely(handle_base == 0)) {
-                /*
-                 * Cookie of zero is "dangerous", because in many places it's
-                 * assumed that 0 means "unassigned" handle, not bound to any
-                 * object.
-                 */
-                CWARN("The universe has been exhausted: cookie wrap-around.\n");
-                handle_base += HANDLE_INCR;
-        }
-        spin_unlock(&handle_base_lock);
-
-        atomic_inc(&handle_count);
-        h->h_addref = cb;
-        spin_lock_init(&h->h_lock);
-
-        bucket = &handle_hash[h->h_cookie & HANDLE_HASH_MASK];
-        spin_lock(&bucket->lock);
-        list_add_rcu(&h->h_link, &bucket->head);
-        h->h_in = 1;
-        spin_unlock(&bucket->lock);
-
-        CDEBUG(D_INFO, "added object %p with handle "LPX64" to hash\n",
-               h, h->h_cookie);
-        EXIT;
-}
-
-static void class_handle_unhash_nolock(struct portals_handle *h)
-{
-        if (list_empty(&h->h_link)) {
-                CERROR("removing an already-removed handle ("LPX64")\n",
-                       h->h_cookie);
-                return;
-        }
-
-        CDEBUG(D_INFO, "removing object %p with handle "LPX64" from hash\n",
-               h, h->h_cookie);
-
-        spin_lock(&h->h_lock);
-        if (h->h_in == 0) {
-                spin_unlock(&h->h_lock);
-                return;
-        }
-        h->h_in = 0;
-        spin_unlock(&h->h_lock);
-        list_del_rcu(&h->h_link);
-}
-
-void class_handle_unhash(struct portals_handle *h)
-{
-        struct handle_bucket *bucket;
-        bucket = handle_hash + (h->h_cookie & HANDLE_HASH_MASK);
-
-        spin_lock(&bucket->lock);
-        class_handle_unhash_nolock(h);
-        spin_unlock(&bucket->lock);
-
-        atomic_dec(&handle_count);
-}
-
-void *class_handle2object(__u64 cookie)
-{
-        struct handle_bucket *bucket;
-        struct list_head *tmp;
-        void *retval = NULL;
-        ENTRY;
-
-        LASSERT(handle_hash != NULL);
-
-        /* Be careful when you want to change this code. See the 
-         * rcu_read_lock() definition on top this file. - jxiong */
-        bucket = handle_hash + (cookie & HANDLE_HASH_MASK);
-
-        rcu_read_lock();
-        list_for_each_rcu(tmp, &bucket->head) {
-                struct portals_handle *h;
-                h = list_entry(tmp, struct portals_handle, h_link);
-                if (h->h_cookie != cookie)
-                        continue;
-
-                spin_lock(&h->h_lock);
-                if (likely(h->h_cookie != 0)) {
-                        h->h_addref(h);
-                        retval = h;
-                }
-                spin_unlock(&h->h_lock);
-                break;
-        }
-        rcu_read_unlock();
-
-        RETURN(retval);
-}
-
-void class_handle_free_cb(struct rcu_head *rcu)
-{
-        struct portals_handle *h = RCU2HANDLE(rcu);
-        if (h->h_free_cb) {
-                h->h_free_cb(h->h_ptr, h->h_size);
-        } else {
-                void *ptr = h->h_ptr;
-                unsigned int size = h->h_size;
-                OBD_FREE(ptr, size);
-        }
-}
-
-
-int class_handle_init(void)
-{
-        struct handle_bucket *bucket;
-
-        LASSERT(handle_hash == NULL);
-
-        OBD_VMALLOC(handle_hash, sizeof(*bucket) * HANDLE_HASH_SIZE);
-        if (handle_hash == NULL)
-                return -ENOMEM;
-
-        spin_lock_init(&handle_base_lock);
-        for (bucket = handle_hash + HANDLE_HASH_SIZE - 1; bucket >= handle_hash;
-             bucket--) {
-                CFS_INIT_LIST_HEAD(&bucket->head);
-                spin_lock_init(&bucket->lock);
-        }
-
-        ll_get_random_bytes(&handle_base, sizeof(handle_base));
-        LASSERT(handle_base != 0ULL);
-
-        return 0;
-}
-
-static void cleanup_all_handles(void)
-{
-        int i;
-
-        for (i = 0; i < HANDLE_HASH_SIZE; i++) {
-                struct list_head *tmp, *pos;
-                spin_lock(&handle_hash[i].lock);
-                list_for_each_safe_rcu(tmp, pos, &(handle_hash[i].head)) {
-                        struct portals_handle *h;
-                        h = list_entry(tmp, struct portals_handle, h_link);
-
-                        CERROR("force clean handle "LPX64" addr %p addref %p\n",
-                               h->h_cookie, h, h->h_addref);
-
-                        class_handle_unhash_nolock(h);
-                }
-                spin_unlock(&handle_hash[i].lock);
-        }
-}
-
-void class_handle_cleanup(void)
-{
-        int count;
-        LASSERT(handle_hash != NULL);
-
-        count = atomic_read(&handle_count);
-        if (count != 0) {
-                CERROR("handle_count at cleanup: %d\n", count);
-                cleanup_all_handles();
-        }
-
-        OBD_VFREE(handle_hash, sizeof(*handle_hash) * HANDLE_HASH_SIZE);
-        handle_hash = NULL;
-
-        if (atomic_read(&handle_count))
-                CERROR("leaked %d handles\n", atomic_read(&handle_count));
-}
diff --git a/lustre/obdclass/lustre_peer.c b/lustre/obdclass/lustre_peer.c
deleted file mode 100644
index c08b600f43969b21e827061cab40bc6fc2c6b279..0000000000000000000000000000000000000000
--- a/lustre/obdclass/lustre_peer.c
+++ /dev/null
@@ -1,181 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-#include <obd.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_lib.h>
-#include <lustre_ha.h>
-#include <lustre_net.h>
-#include <lprocfs_status.h>
-
-struct uuid_nid_data {
-        struct list_head un_list;
-        lnet_nid_t       un_nid;
-        char            *un_uuid;
-        int              un_count;  /* nid/uuid pair refcount */
-};
-
-/* FIXME: This should probably become more elegant than a global linked list */
-static struct list_head g_uuid_list;
-static spinlock_t       g_uuid_lock;
-
-void class_init_uuidlist(void)
-{
-        CFS_INIT_LIST_HEAD(&g_uuid_list);
-        spin_lock_init(&g_uuid_lock);
-}
-
-void class_exit_uuidlist(void)
-{
-        /* delete all */
-        class_del_uuid(NULL);
-}
-
-int lustre_uuid_to_peer(char *uuid, lnet_nid_t *peer_nid, int index)
-{
-        struct list_head *tmp;
-
-        spin_lock (&g_uuid_lock);
-
-        list_for_each(tmp, &g_uuid_list) {
-                struct uuid_nid_data *data =
-                        list_entry(tmp, struct uuid_nid_data, un_list);
-
-                if (!strcmp(data->un_uuid, uuid) &&
-                    index-- == 0) {
-                        *peer_nid = data->un_nid;
-
-                        spin_unlock (&g_uuid_lock);
-                        return 0;
-                }
-        }
-
-        spin_unlock (&g_uuid_lock);
-        return -ENOENT;
-}
-
-/* Add a nid to a niduuid.  Multiple nids can be added to a single uuid; 
-   LNET will choose the best one. */
-int class_add_uuid(char *uuid, __u64 nid)
-{
-        struct uuid_nid_data *data, *entry;
-        int nob = strnlen (uuid, CFS_PAGE_SIZE) + 1;
-        int found = 0;
-
-        LASSERT(nid != 0);  /* valid newconfig NID is never zero */
-
-        if (nob > CFS_PAGE_SIZE)
-                return -EINVAL;
-
-        OBD_ALLOC(data, sizeof(*data));
-        if (data == NULL)
-                return -ENOMEM;
-
-        OBD_ALLOC(data->un_uuid, nob);
-        if (data == NULL) {
-                OBD_FREE(data, sizeof(*data));
-                return -ENOMEM;
-        }
-
-        memcpy(data->un_uuid, uuid, nob);
-        data->un_nid = nid;
-        data->un_count = 1;
-
-        spin_lock (&g_uuid_lock);
-        list_for_each_entry(entry, &g_uuid_list, un_list) {
-                if (entry->un_nid == nid && 
-                    (strcmp(entry->un_uuid, uuid) == 0)) {
-                        found++;
-                        entry->un_count++;
-                        break;
-                }
-        }
-        if (!found) 
-                list_add(&data->un_list, &g_uuid_list);
-        spin_unlock (&g_uuid_lock);
-
-        if (found) {
-                CDEBUG(D_INFO, "found uuid %s %s cnt=%d\n", uuid, 
-                       libcfs_nid2str(nid), entry->un_count);
-                OBD_FREE(data->un_uuid, nob);
-                OBD_FREE(data, sizeof(*data));
-        } else {
-                CDEBUG(D_INFO, "add uuid %s %s\n", uuid, libcfs_nid2str(nid));
-        }
-        return 0;
-}
-
-/* Delete the nids for one uuid if specified, otherwise delete all */
-int class_del_uuid (char *uuid)
-{
-        struct list_head  deathrow;
-        struct uuid_nid_data *data;
-        int found = 0;
-
-        CFS_INIT_LIST_HEAD (&deathrow);
-
-        spin_lock (&g_uuid_lock);
-        if (uuid == NULL) {
-                list_splice_init(&g_uuid_list, &deathrow);
-                found = 1;
-        } else {
-                list_for_each_entry(data, &g_uuid_list, un_list) {
-                        if (strcmp(data->un_uuid, uuid))
-                                continue;
-                        --data->un_count;
-                        LASSERT(data->un_count >= 0);
-                        if (data->un_count == 0)
-                                list_move(&data->un_list, &deathrow);
-                        found = 1;
-                        break;
-                }
-        }
-        spin_unlock (&g_uuid_lock);
-
-        if (!found) {
-                if (uuid)
-                        CERROR("Try to delete a non-existent uuid %s\n", uuid);
-                return -EINVAL;
-        }
-
-        while (!list_empty(&deathrow)) {
-                data = list_entry(deathrow.next, struct uuid_nid_data, un_list);
-                list_del(&data->un_list);
-
-                CDEBUG(D_INFO, "del uuid %s %s\n", data->un_uuid,
-                       libcfs_nid2str(data->un_nid));
-
-                OBD_FREE(data->un_uuid, strlen(data->un_uuid) + 1);
-                OBD_FREE(data, sizeof(*data));
-        }
-
-        return 0;
-}
diff --git a/lustre/obdclass/obd_config.c b/lustre/obdclass/obd_config.c
deleted file mode 100644
index 54cdc8f73fa97963e2ab18e0d631fe9614af4415..0000000000000000000000000000000000000000
--- a/lustre/obdclass/obd_config.c
+++ /dev/null
@@ -1,1243 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2006 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * Config API
- *
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifdef __KERNEL__
-#include <obd_class.h>
-#include <linux/string.h>
-#else
-#include <liblustre.h>
-#include <obd_class.h>
-#include <obd.h>
-#endif
-#include <lustre_log.h>
-#include <lprocfs_status.h>
-#include <libcfs/list.h>
-#include <lustre_param.h>
-#include <class_hash.h>
-
-extern struct lustre_hash_operations uuid_hash_operations;
-extern struct lustre_hash_operations nid_hash_operations;
-
-/*********** string parsing utils *********/
-
-/* returns 0 if we find this key in the buffer, else 1 */
-int class_find_param(char *buf, char *key, char **valp)
-{
-        char *ptr;
-
-        if (!buf) 
-                return 1;
-
-        if ((ptr = strstr(buf, key)) == NULL) 
-                return 1;
-
-        if (valp) 
-                *valp = ptr + strlen(key);
-        
-        return 0;
-}
-
-/* returns 0 if this is the first key in the buffer, else 1.
-   valp points to first char after key. */
-int class_match_param(char *buf, char *key, char **valp)
-{
-        if (!buf) 
-                return 1;
-
-        if (memcmp(buf, key, strlen(key)) != 0) 
-                return 1;
-
-        if (valp) 
-                *valp = buf + strlen(key);
-        
-        return 0;
-}
-
-/* 0 is good nid, 
-   1 not found
-   < 0 error
-   endh is set to next separator */
-int class_parse_nid(char *buf, lnet_nid_t *nid, char **endh)
-{
-        char tmp, *endp;
-
-        if (!buf) 
-                return 1;
-        while (*buf == ',' || *buf == ':') 
-                buf++;
-        if (*buf == ' ' || *buf == '/' || *buf == '\0') 
-                return 1;
-
-        /* nid separators or end of nids */
-        endp = strpbrk(buf, ",: /");
-        if (endp == NULL) 
-                endp = buf + strlen(buf);
-
-        tmp = *endp;
-        *endp = '\0';
-        *nid = libcfs_str2nid(buf);
-        if (*nid == LNET_NID_ANY) {
-                LCONSOLE_ERROR_MSG(0x159, "Can't parse NID '%s'\n", buf);
-                *endp = tmp;
-                return -EINVAL;
-        }
-        *endp = tmp;
-
-        if (endh) 
-                *endh = endp;
-        CDEBUG(D_INFO, "Nid %s\n", libcfs_nid2str(*nid));
-        return 0;
-}
-
-EXPORT_SYMBOL(class_find_param);
-EXPORT_SYMBOL(class_match_param);
-EXPORT_SYMBOL(class_parse_nid);
-
-/********************** class fns **********************/
-
-/* Create a new device and set the type, name and uuid.  If
- * successful, the new device can be accessed by either name or uuid.
- */
-int class_attach(struct lustre_cfg *lcfg)
-{
-        struct obd_device *obd = NULL;
-        char *typename, *name, *uuid;
-        int rc, len;
-        ENTRY;
-
-        if (!LUSTRE_CFG_BUFLEN(lcfg, 1)) {
-                CERROR("No type passed!\n");
-                RETURN(-EINVAL);
-        }
-        typename = lustre_cfg_string(lcfg, 1);
-
-        if (!LUSTRE_CFG_BUFLEN(lcfg, 0)) {
-                CERROR("No name passed!\n");
-                RETURN(-EINVAL);
-        }
-        name = lustre_cfg_string(lcfg, 0);
-
-        if (!LUSTRE_CFG_BUFLEN(lcfg, 2)) {
-                CERROR("No UUID passed!\n");
-                RETURN(-EINVAL);
-        }
-        uuid = lustre_cfg_string(lcfg, 2);
-
-        CDEBUG(D_IOCTL, "attach type %s name: %s uuid: %s\n",
-               MKSTR(typename), MKSTR(name), MKSTR(uuid));
-
-        /* Mountconf transitional hack, should go away after 1.6.
-           1.4.7 uses the old names, so translate back if the
-           mountconf flag is set.
-           1.6 should set this flag, and translate the other way here
-           if not set. */
-        if (lcfg->lcfg_flags & LCFG_FLG_MOUNTCONF){
-                char *tmp = NULL;
-                if (strcmp(typename, "mds") == 0)
-                        tmp = "mdt";
-                if (strcmp(typename, "mdt") == 0)
-                        tmp = "mds";
-                if (strcmp(typename, "osd") == 0)
-                        tmp = "obdfilter";
-                if (tmp) {
-                        LCONSOLE_WARN("Using type %s for %s %s\n", tmp,
-                                      MKSTR(typename), MKSTR(name));
-                        typename = tmp;
-                }
-        }
-
-        obd = class_newdev(typename, name);
-        if (IS_ERR(obd)) {
-                /* Already exists or out of obds */
-                rc = PTR_ERR(obd);
-                obd = NULL;
-                CERROR("Cannot create device %s of type %s : %d\n",
-                       name, typename, rc);
-                GOTO(out, rc);
-        }
-        LASSERTF(obd != NULL, "Cannot get obd device %s of type %s\n",
-                 name, typename);
-        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, 
-                 "obd %p obd_magic %08X != %08X\n",
-                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
-        LASSERTF(strncmp(obd->obd_name, name, strlen(name)) == 0, "%p obd_name %s != %s\n",
-                 obd, obd->obd_name, name);
-
-        CFS_INIT_LIST_HEAD(&obd->obd_exports);
-        CFS_INIT_LIST_HEAD(&obd->obd_exports_timed);
-        CFS_INIT_LIST_HEAD(&obd->obd_nid_stats);
-        spin_lock_init(&obd->nid_lock);
-        spin_lock_init(&obd->obd_dev_lock);
-        sema_init(&obd->obd_dev_sem, 1);
-        spin_lock_init(&obd->obd_osfs_lock);
-        /* obd->obd_osfs_age must be set to a value in the distant
-         * past to guarantee a fresh statfs is fetched on mount. */
-        obd->obd_osfs_age = cfs_time_shift_64(-1000);
-
-        /* XXX belongs in setup not attach  */
-        /* recovery data */
-        cfs_init_timer(&obd->obd_recovery_timer);
-        spin_lock_init(&obd->obd_processing_task_lock);
-        cfs_waitq_init(&obd->obd_next_transno_waitq);
-        cfs_waitq_init(&obd->obd_evict_inprogress_waitq);
-        cfs_waitq_init(&obd->obd_llog_waitq);
-        CFS_INIT_LIST_HEAD(&obd->obd_recovery_queue);
-        CFS_INIT_LIST_HEAD(&obd->obd_delayed_reply_queue);
-
-        spin_lock_init(&obd->obd_uncommitted_replies_lock);
-        CFS_INIT_LIST_HEAD(&obd->obd_uncommitted_replies);
-
-        len = strlen(uuid);
-        if (len >= sizeof(obd->obd_uuid)) {
-                CERROR("uuid must be < "LPSZ" bytes long\n",
-                       sizeof(obd->obd_uuid));
-                GOTO(out, rc = -EINVAL);
-        }
-        memcpy(obd->obd_uuid.uuid, uuid, len);
-
-        /* do the attach */
-        if (OBP(obd, attach)) {
-                rc = OBP(obd,attach)(obd, sizeof *lcfg, lcfg);
-                if (rc)
-                        GOTO(out, rc = -EINVAL);
-        }
-
-        /* Detach drops this */
-        spin_lock(&obd->obd_dev_lock);
-        atomic_set(&obd->obd_refcount, 1);
-        spin_unlock(&obd->obd_dev_lock);
-
-        obd->obd_attached = 1;
-        CDEBUG(D_IOCTL, "OBD: dev %d attached type %s with refcount %d\n",
-               obd->obd_minor, typename, atomic_read(&obd->obd_refcount));
-        RETURN(0);
- out:
-        if (obd != NULL) {
-                class_release_dev(obd);
-        }
-        return rc;
-}
-
-int class_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
-{
-        int err = 0;
-        struct obd_export *exp;
-        ENTRY;
-
-        LASSERT(obd != NULL);
-        LASSERTF(obd == class_num2obd(obd->obd_minor), "obd %p != obd_devs[%d] %p\n", 
-                 obd, obd->obd_minor, class_num2obd(obd->obd_minor));
-        LASSERTF(obd->obd_magic == OBD_DEVICE_MAGIC, "obd %p obd_magic %08x != %08x\n", 
-                 obd, obd->obd_magic, OBD_DEVICE_MAGIC);
-
-        /* have we attached a type to this device? */
-        if (!obd->obd_attached) {
-                CERROR("Device %d not attached\n", obd->obd_minor);
-                RETURN(-ENODEV);
-        }
-
-        if (obd->obd_set_up) {
-                CERROR("Device %d already setup (type %s)\n",
-                       obd->obd_minor, obd->obd_type->typ_name);
-                RETURN(-EEXIST);
-        }
-
-        /* is someone else setting us up right now? (attach inits spinlock) */
-        spin_lock(&obd->obd_dev_lock);
-        if (obd->obd_starting) {
-                spin_unlock(&obd->obd_dev_lock);
-                CERROR("Device %d setup in progress (type %s)\n",
-                       obd->obd_minor, obd->obd_type->typ_name);
-                RETURN(-EEXIST);
-        }
-        /* just leave this on forever.  I can't use obd_set_up here because
-           other fns check that status, and we're not actually set up yet. */
-        obd->obd_starting = 1;
-        spin_unlock(&obd->obd_dev_lock);
-
-        /* create an uuid-export hash body */
-        err = lustre_hash_init(&obd->obd_uuid_hash_body, "UUID_HASH",
-                               128, &uuid_hash_operations);
-        if (err)
-                GOTO(err_hash, err);
-
-        /* create a nid-export hash body */
-        err = lustre_hash_init(&obd->obd_nid_hash_body, "NID_HASH",
-                               128, &nid_hash_operations);
-        if (err)
-                GOTO(err_hash, err);
-
-        /* create a nid-stats hash body */
-        err = lustre_hash_init(&obd->obd_nid_stats_hash_body, "NID_STATS",
-                               128, &nid_stat_hash_operations);
-        if (err)
-                GOTO(err_hash, err);
-
-
-        exp = class_new_export(obd, &obd->obd_uuid);
-        if (IS_ERR(exp))
-                RETURN(PTR_ERR(exp));
-        obd->obd_self_export = exp;
-        list_del_init(&exp->exp_obd_chain_timed);
-        class_export_put(exp);
-
-        err = obd_setup(obd, sizeof(*lcfg), lcfg);
-        if (err)
-                GOTO(err_exp, err);
-
-        obd->obd_set_up = 1;
-        spin_lock(&obd->obd_dev_lock);
-        /* cleanup drops this */
-        class_incref(obd);
-        spin_unlock(&obd->obd_dev_lock);
-
-        CDEBUG(D_IOCTL, "finished setup of obd %s (uuid %s)\n",
-               obd->obd_name, obd->obd_uuid.uuid);
-
-        RETURN(0);
-
-err_exp:
-        class_unlink_export(obd->obd_self_export);
-        obd->obd_self_export = NULL;
-err_hash:
-        lustre_hash_exit(&obd->obd_uuid_hash_body);
-        lustre_hash_exit(&obd->obd_nid_hash_body);
-        lustre_hash_exit(&obd->obd_nid_stats_hash_body);
-        obd->obd_starting = 0;
-        CERROR("setup %s failed (%d)\n", obd->obd_name, err);
-        RETURN(err);
-}
-
-int class_detach(struct obd_device *obd, struct lustre_cfg *lcfg)
-{
-        ENTRY;
-
-        if (obd->obd_set_up) {
-                CERROR("OBD device %d still set up\n", obd->obd_minor);
-                RETURN(-EBUSY);
-        }
-
-        spin_lock(&obd->obd_dev_lock);
-        if (!obd->obd_attached) {
-                spin_unlock(&obd->obd_dev_lock);
-                CERROR("OBD device %d not attached\n", obd->obd_minor);
-                RETURN(-ENODEV);
-        }
-        obd->obd_attached = 0;
-        spin_unlock(&obd->obd_dev_lock);
-
-        CDEBUG(D_IOCTL, "detach on obd %s (uuid %s)\n",
-               obd->obd_name, obd->obd_uuid.uuid);
-
-        class_decref(obd);
-        
-        /* not strictly necessary, but cleans up eagerly */
-        obd_zombie_impexp_cull();
-        
-        RETURN(0);
-}
-
-static void dump_exports(struct obd_device *obd)
-{
-        struct obd_export *exp, *n;
-
-        list_for_each_entry_safe(exp, n, &obd->obd_exports, exp_obd_chain) {
-                struct ptlrpc_reply_state *rs;
-                struct ptlrpc_reply_state *first_reply = NULL;
-                int                        nreplies = 0;
-
-                list_for_each_entry (rs, &exp->exp_outstanding_replies,
-                                     rs_exp_list) {
-                        if (nreplies == 0)
-                                first_reply = rs;
-                        nreplies++;
-                }
-
-                CDEBUG(D_IOCTL, "%s: %p %s %s %d %d %d: %p %s\n",
-                       obd->obd_name, exp, exp->exp_client_uuid.uuid,
-                       obd_export_nid2str(exp),
-                       atomic_read(&exp->exp_refcount),
-                       exp->exp_failed, nreplies, first_reply,
-                       nreplies > 3 ? "..." : "");
-        }
-}
-
-int class_cleanup(struct obd_device *obd, struct lustre_cfg *lcfg)
-{
-        int err = 0;
-        char *flag;
-        ENTRY;
-
-        OBD_RACE(OBD_FAIL_LDLM_RECOV_CLIENTS);
-
-        if (!obd->obd_set_up) {
-                CERROR("Device %d not setup\n", obd->obd_minor);
-                RETURN(-ENODEV);
-        }
-
-        spin_lock(&obd->obd_dev_lock);
-        if (obd->obd_stopping) {
-                spin_unlock(&obd->obd_dev_lock);
-                CERROR("OBD %d already stopping\n", obd->obd_minor);
-                RETURN(-ENODEV);
-        }
-        /* Leave this on forever */
-        obd->obd_stopping = 1;
-        spin_unlock(&obd->obd_dev_lock);
-
-        if (lcfg->lcfg_bufcount >= 2 && LUSTRE_CFG_BUFLEN(lcfg, 1) > 0) {
-                for (flag = lustre_cfg_string(lcfg, 1); *flag != 0; flag++)
-                        switch (*flag) {
-                        case 'F':
-                                obd->obd_force = 1;
-                                break;
-                        case 'A':
-                                LCONSOLE_WARN("Failing over %s\n", 
-                                              obd->obd_name);
-                                obd->obd_fail = 1;
-                                obd->obd_no_transno = 1;
-                                obd->obd_no_recov = 1;
-                                /* Set the obd readonly if we can */
-                                if (OBP(obd, iocontrol))
-                                        obd_iocontrol(OBD_IOC_SET_READONLY,
-                                                      obd->obd_self_export,
-                                                      0, NULL, NULL);
-                                break;
-                        default:
-                                CERROR("unrecognised flag '%c'\n",
-                                       *flag);
-                        }
-        }
-
-        /* The three references that should be remaining are the
-         * obd_self_export and the attach and setup references. */
-        if (atomic_read(&obd->obd_refcount) > 3) {
-#if 0           /* We should never fail to cleanup with mountconf */ 
-                if (!(obd->obd_fail || obd->obd_force)) {
-                        CERROR("OBD %s is still busy with %d references\n"
-                               "You should stop active file system users,"
-                               " or use the --force option to cleanup.\n",
-                               obd->obd_name, atomic_read(&obd->obd_refcount));
-                        dump_exports(obd);
-                        /* Allow a failed cleanup to try again. */
-                        obd->obd_stopping = 0;
-                        RETURN(-EBUSY);
-                }
-#endif
-                /* refcounf - 3 might be the number of real exports 
-                   (excluding self export). But class_incref is called
-                   by other things as well, so don't count on it. */
-                CDEBUG(D_IOCTL, "%s: forcing exports to disconnect: %d\n",
-                       obd->obd_name, atomic_read(&obd->obd_refcount) - 3);
-                dump_exports(obd);
-                class_disconnect_exports(obd);
-        }
-
-        LASSERT(obd->obd_self_export);
-
-        /* destroy an uuid-export hash body */
-        lustre_hash_exit(&obd->obd_uuid_hash_body);
-
-        /* destroy a nid-export hash body */
-        lustre_hash_exit(&obd->obd_nid_hash_body);
-
-        /* destroy a nid-stats hash body */
-        lustre_hash_exit(&obd->obd_nid_stats_hash_body);
-
-        /* Precleanup stage 1, we must make sure all exports (other than the
-           self-export) get destroyed. */
-        err = obd_precleanup(obd, OBD_CLEANUP_EXPORTS);
-        if (err)
-                CERROR("Precleanup %s returned %d\n",
-                       obd->obd_name, err);
-
-        class_decref(obd);
-        obd->obd_set_up = 0;
-
-        RETURN(0);
-}
-
-struct obd_device *class_incref(struct obd_device *obd)
-{
-        atomic_inc(&obd->obd_refcount);
-        CDEBUG(D_INFO, "incref %s (%p) now %d\n", obd->obd_name, obd,
-               atomic_read(&obd->obd_refcount));
-
-        return obd;
-}
-
-void class_decref(struct obd_device *obd)
-{
-        int err;
-        int refs;
-
-        spin_lock(&obd->obd_dev_lock);
-        atomic_dec(&obd->obd_refcount);
-        refs = atomic_read(&obd->obd_refcount);
-        spin_unlock(&obd->obd_dev_lock);
-
-        CDEBUG(D_INFO, "Decref %s (%p) now %d\n", obd->obd_name, obd, refs);
-
-        if ((refs == 1) && obd->obd_stopping) {
-                /* All exports (other than the self-export) have been
-                   destroyed; there should be no more in-progress ops
-                   by this point.*/
-                /* if we're not stopping, we didn't finish setup */
-                /* Precleanup stage 2,  do other type-specific
-                   cleanup requiring the self-export. */
-                err = obd_precleanup(obd, OBD_CLEANUP_SELF_EXP);
-                if (err)
-                        CERROR("Precleanup %s returned %d\n",
-                               obd->obd_name, err);
-
-                spin_lock(&obd->obd_self_export->exp_lock);
-                obd->obd_self_export->exp_flags |=
-                        (obd->obd_fail ? OBD_OPT_FAILOVER : 0) |
-                        (obd->obd_force ? OBD_OPT_FORCE : 0);
-                spin_unlock(&obd->obd_self_export->exp_lock);
-
-                /* note that we'll recurse into class_decref again */
-                class_unlink_export(obd->obd_self_export);
-                return;
-        }
-
-        if (refs == 0) {
-                CDEBUG(D_CONFIG, "finishing cleanup of obd %s (%s)\n",
-                       obd->obd_name, obd->obd_uuid.uuid);
-                LASSERT(!obd->obd_attached);
-                if (obd->obd_stopping) {
-                        /* If we're not stopping, we were never set up */
-                        err = obd_cleanup(obd);
-                        if (err)
-                                CERROR("Cleanup %s returned %d\n",
-                                       obd->obd_name, err);
-                }
-                if (OBP(obd, detach)) {
-                        err = OBP(obd,detach)(obd);
-                        if (err)
-                                CERROR("Detach returned %d\n", err);
-                }
-                class_release_dev(obd);
-        }
-}
-
-int class_add_conn(struct obd_device *obd, struct lustre_cfg *lcfg)
-{
-        struct obd_import *imp;
-        struct obd_uuid uuid;
-        int rc;
-        ENTRY;
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1 ||
-            LUSTRE_CFG_BUFLEN(lcfg, 1) > sizeof(struct obd_uuid)) {
-                CERROR("invalid conn_uuid\n");
-                RETURN(-EINVAL);
-        }
-        if (strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) &&
-            strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME) && 
-            strcmp(obd->obd_type->typ_name, LUSTRE_MGC_NAME)) {
-                CERROR("can't add connection on non-client dev\n");
-                RETURN(-EINVAL);
-        }
-
-        imp = obd->u.cli.cl_import;
-        if (!imp) {
-                CERROR("try to add conn on immature client dev\n");
-                RETURN(-EINVAL);
-        }
-
-        obd_str2uuid(&uuid, lustre_cfg_string(lcfg, 1));
-        rc = obd_add_conn(imp, &uuid, lcfg->lcfg_num);
-
-        RETURN(rc);
-}
-
-int class_del_conn(struct obd_device *obd, struct lustre_cfg *lcfg)
-{
-        struct obd_import *imp;
-        struct obd_uuid uuid;
-        int rc;
-        ENTRY;
-
-        if (LUSTRE_CFG_BUFLEN(lcfg, 1) < 1 ||
-            LUSTRE_CFG_BUFLEN(lcfg, 1) > sizeof(struct obd_uuid)) {
-                CERROR("invalid conn_uuid\n");
-                RETURN(-EINVAL);
-        }
-        if (strcmp(obd->obd_type->typ_name, LUSTRE_MDC_NAME) &&
-            strcmp(obd->obd_type->typ_name, LUSTRE_OSC_NAME)) {
-                CERROR("can't del connection on non-client dev\n");
-                RETURN(-EINVAL);
-        }
-
-        imp = obd->u.cli.cl_import;
-        if (!imp) {
-                CERROR("try to del conn on immature client dev\n");
-                RETURN(-EINVAL);
-        }
-
-        obd_str2uuid(&uuid, lustre_cfg_string(lcfg, 1));
-        rc = obd_del_conn(imp, &uuid);
-
-        RETURN(rc);
-}
-
-CFS_LIST_HEAD(lustre_profile_list);
-
-struct lustre_profile *class_get_profile(char * prof)
-{
-        struct lustre_profile *lprof;
-
-        ENTRY;
-        list_for_each_entry(lprof, &lustre_profile_list, lp_list) {
-                if (!strcmp(lprof->lp_profile, prof)) {
-                        RETURN(lprof);
-                }
-        }
-        RETURN(NULL);
-}
-
-int class_add_profile(int proflen, char *prof, int osclen, char *osc,
-                      int mdclen, char *mdc)
-{
-        struct lustre_profile *lprof;
-        int err = 0;
-        ENTRY;
-
-        CDEBUG(D_CONFIG, "Add profile %s\n", prof);
-
-        OBD_ALLOC(lprof, sizeof(*lprof));
-        if (lprof == NULL)
-                RETURN(-ENOMEM);
-        CFS_INIT_LIST_HEAD(&lprof->lp_list);
-
-        LASSERT(proflen == (strlen(prof) + 1));
-        OBD_ALLOC(lprof->lp_profile, proflen);
-        if (lprof->lp_profile == NULL)
-                GOTO(out, err = -ENOMEM);
-        memcpy(lprof->lp_profile, prof, proflen);
-
-        LASSERT(osclen == (strlen(osc) + 1));
-        OBD_ALLOC(lprof->lp_osc, osclen);
-        if (lprof->lp_osc == NULL)
-                GOTO(out, err = -ENOMEM);
-        memcpy(lprof->lp_osc, osc, osclen);
-
-        if (mdclen > 0) {
-                LASSERT(mdclen == (strlen(mdc) + 1));
-                OBD_ALLOC(lprof->lp_mdc, mdclen);
-                if (lprof->lp_mdc == NULL)
-                        GOTO(out, err = -ENOMEM);
-                memcpy(lprof->lp_mdc, mdc, mdclen);
-        }
-
-        list_add(&lprof->lp_list, &lustre_profile_list);
-        RETURN(err);
-
-out:
-        if (lprof->lp_mdc)
-                OBD_FREE(lprof->lp_mdc, mdclen);
-        if (lprof->lp_osc)
-                OBD_FREE(lprof->lp_osc, osclen);
-        if (lprof->lp_profile)
-                OBD_FREE(lprof->lp_profile, proflen);
-        OBD_FREE(lprof, sizeof(*lprof));        
-        RETURN(err);
-}
-
-void class_del_profile(char *prof)
-{
-        struct lustre_profile *lprof;
-        ENTRY;
-
-        CDEBUG(D_CONFIG, "Del profile %s\n", prof);
-
-        lprof = class_get_profile(prof);
-        if (lprof) {
-                list_del(&lprof->lp_list);
-                OBD_FREE(lprof->lp_profile, strlen(lprof->lp_profile) + 1);
-                OBD_FREE(lprof->lp_osc, strlen(lprof->lp_osc) + 1);
-                if (lprof->lp_mdc)
-                        OBD_FREE(lprof->lp_mdc, strlen(lprof->lp_mdc) + 1);
-                OBD_FREE(lprof, sizeof *lprof);
-        }
-        EXIT;
-}
-
-/* COMPAT_146 */
-void class_del_profiles(void)
-{
-        struct lustre_profile *lprof, *n;
-        ENTRY;
-
-        list_for_each_entry_safe(lprof, n, &lustre_profile_list, lp_list) {
-                list_del(&lprof->lp_list);
-                OBD_FREE(lprof->lp_profile, strlen(lprof->lp_profile) + 1);
-                OBD_FREE(lprof->lp_osc, strlen(lprof->lp_osc) + 1);
-                if (lprof->lp_mdc)
-                        OBD_FREE(lprof->lp_mdc, strlen(lprof->lp_mdc) + 1);
-                OBD_FREE(lprof, sizeof *lprof);
-        }
-        EXIT;
-}
-
-/* We can't call ll_process_config directly because it lives in a module that
-   must be loaded after this one. */
-static int (*client_process_config)(struct lustre_cfg *lcfg) = NULL;
-
-void lustre_register_client_process_config(int (*cpc)(struct lustre_cfg *lcfg))
-{
-        client_process_config = cpc;
-}
-EXPORT_SYMBOL(lustre_register_client_process_config);
-
-int class_process_config(struct lustre_cfg *lcfg)
-{
-        struct obd_device *obd;
-        int err;
-
-        LASSERT(lcfg && !IS_ERR(lcfg));
-        CDEBUG(D_IOCTL, "processing cmd: %x\n", lcfg->lcfg_command);
-
-        /* Commands that don't need a device */
-        switch(lcfg->lcfg_command) {
-        case LCFG_ATTACH: {
-                err = class_attach(lcfg);
-                GOTO(out, err);
-        }
-        case LCFG_ADD_UUID: {
-                CDEBUG(D_IOCTL, "adding mapping from uuid %s to nid "LPX64
-                       " (%s)\n", lustre_cfg_string(lcfg, 1),
-                       lcfg->lcfg_nid, libcfs_nid2str(lcfg->lcfg_nid));
-
-                err = class_add_uuid(lustre_cfg_string(lcfg, 1), lcfg->lcfg_nid);
-                GOTO(out, err);
-        }
-        case LCFG_DEL_UUID: {
-                CDEBUG(D_IOCTL, "removing mappings for uuid %s\n",
-                       (lcfg->lcfg_bufcount < 2 || LUSTRE_CFG_BUFLEN(lcfg, 1) == 0)
-                       ? "<all uuids>" : lustre_cfg_string(lcfg, 1));
-
-                err = class_del_uuid(lustre_cfg_string(lcfg, 1));
-                GOTO(out, err);
-        }
-        case LCFG_MOUNTOPT: {
-                CDEBUG(D_IOCTL, "mountopt: profile %s osc %s mdc %s\n",
-                       lustre_cfg_string(lcfg, 1),
-                       lustre_cfg_string(lcfg, 2),
-                       lustre_cfg_string(lcfg, 3));
-                /* set these mount options somewhere, so ll_fill_super
-                 * can find them. */
-                err = class_add_profile(LUSTRE_CFG_BUFLEN(lcfg, 1),
-                                        lustre_cfg_string(lcfg, 1),
-                                        LUSTRE_CFG_BUFLEN(lcfg, 2),
-                                        lustre_cfg_string(lcfg, 2),
-                                        LUSTRE_CFG_BUFLEN(lcfg, 3),
-                                        lustre_cfg_string(lcfg, 3));
-                GOTO(out, err);
-        }
-        case LCFG_DEL_MOUNTOPT: {
-                CDEBUG(D_IOCTL, "mountopt: profile %s\n",
-                       lustre_cfg_string(lcfg, 1));
-                class_del_profile(lustre_cfg_string(lcfg, 1));
-                GOTO(out, err = 0);
-        }
-        case LCFG_SET_TIMEOUT: {
-                CDEBUG(D_IOCTL, "changing lustre timeout from %d to %d\n",
-                       obd_timeout, lcfg->lcfg_num);
-                obd_timeout = max(lcfg->lcfg_num, 1U);
-                GOTO(out, err = 0);
-        }
-        case LCFG_SET_UPCALL: {
-                LCONSOLE_ERROR_MSG(0x15a, "recovery upcall is deprecated\n");
-                /* COMPAT_146 Don't fail on old configs */
-                GOTO(out, err = 0);
-        }
-        case LCFG_MARKER: {
-                struct cfg_marker *marker;
-                marker = lustre_cfg_buf(lcfg, 1);
-                CDEBUG(D_IOCTL, "marker %d (%#x) %.16s %s\n", marker->cm_step,
-                      marker->cm_flags, marker->cm_tgtname, marker->cm_comment);
-                GOTO(out, err = 0);
-        }
-        case LCFG_PARAM: {
-                /* llite has no obd */
-                if ((class_match_param(lustre_cfg_string(lcfg, 1), 
-                                       PARAM_LLITE, 0) == 0) &&
-                    client_process_config) {
-                        err = (*client_process_config)(lcfg);
-                        GOTO(out, err);
-                }
-                /* Fall through */
-                break;
-        }
-        }
-
-        /* Commands that require a device */
-        obd = class_name2obd(lustre_cfg_string(lcfg, 0));
-        if (obd == NULL) {
-                if (!LUSTRE_CFG_BUFLEN(lcfg, 0))
-                        CERROR("this lcfg command requires a device name\n");
-                else
-                        CERROR("no device for: %s\n",
-                               lustre_cfg_string(lcfg, 0));
-
-                GOTO(out, err = -EINVAL);
-        }
-
-        switch(lcfg->lcfg_command) {
-        case LCFG_SETUP: {
-                err = class_setup(obd, lcfg);
-                GOTO(out, err);
-        }
-        case LCFG_DETACH: {
-                err = class_detach(obd, lcfg);
-                GOTO(out, err = 0);
-        }
-        case LCFG_CLEANUP: {
-                err = class_cleanup(obd, lcfg);
-                GOTO(out, err = 0);
-        }
-        case LCFG_ADD_CONN: {
-                err = class_add_conn(obd, lcfg);
-                GOTO(out, err = 0);
-        }
-        case LCFG_DEL_CONN: {
-                err = class_del_conn(obd, lcfg);
-                GOTO(out, err = 0);
-        }
-        default: {
-                err = obd_process_config(obd, sizeof(*lcfg), lcfg);
-                GOTO(out, err);
-
-        }
-        }
-out:
-        if ((err < 0) && !(lcfg->lcfg_command & LCFG_REQUIRED)) {
-                CWARN("Ignoring error %d on optional command %#x\n", err, 
-                      lcfg->lcfg_command);
-                err = 0;
-        }
-        return err;
-}
-
-int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, 
-                             struct lustre_cfg *lcfg, void *data)
-{
-#ifdef __KERNEL__
-        struct lprocfs_vars *var;
-        char *key, *sval;
-        int i, vallen;
-        int matched = 0, j = 0;
-        int rc = 0;
-        ENTRY;
-
-        if (lcfg->lcfg_command != LCFG_PARAM) {
-                CERROR("Unknown command: %d\n", lcfg->lcfg_command);
-                RETURN(-EINVAL);
-        }
-
-        /* e.g. tunefs.lustre --param mdt.group_upcall=foo /r/tmp/lustre-mdt
-           or   lctl conf_param lustre-MDT0000.mdt.group_upcall=bar
-           or   lctl conf_param lustre-OST0000.osc.max_dirty_mb=36 */
-        for (i = 1; i < lcfg->lcfg_bufcount; i++) {
-                key = lustre_cfg_buf(lcfg, i);
-                /* Strip off prefix */
-                class_match_param(key, prefix, &key);
-                sval = strchr(key, '=');
-                if (!sval || (*(sval + 1) == 0)) {
-                        CERROR("Can't parse param %s\n", key);
-                        rc = -EINVAL;
-                        /* continue parsing other params */
-                        continue;
-                }
-                sval++;
-                vallen = strlen(sval);
-                matched = 0;
-                j = 0;
-                /* Search proc entries */
-                while (lvars[j].name) {
-                        var = &lvars[j];
-                        if (class_match_param(key, (char *)var->name, 0) == 0) {
-                                matched++;
-                                rc = -EROFS;
-                                if (var->write_fptr) {
-                                        mm_segment_t oldfs;
-                                        oldfs = get_fs();
-                                        set_fs(KERNEL_DS);
-                                        rc = (var->write_fptr)(NULL, sval,
-                                                               vallen, data);
-                                        set_fs(oldfs);
-                                }
-                                if (rc < 0) 
-                                        CERROR("writing proc entry %s err %d\n", 
-                                               var->name, rc);
-                                break;
-                        }
-                        j++;
-                }    
-                if (!matched) {
-                        CERROR("%s: unknown param %s\n",
-                               (char *)lustre_cfg_string(lcfg, 0), key);
-                        rc = -EINVAL;
-                        /* continue parsing other params */
-                } else {
-                        LCONSOLE_INFO("%s.%.*s: set parameter %.*s=%s\n", 
-                                      (char *)lustre_cfg_string(lcfg, 0),
-                                      (int)strlen(prefix) - 1, prefix,
-                                      (int)(sval - key - 1), key, sval);
-                }
-        }
-        
-        if (rc > 0) 
-                rc = 0;
-        RETURN(rc);
-#else
-        CDEBUG(D_CONFIG, "liblustre can't process params.\n");
-        /* Don't throw config error */
-        RETURN(0);
-#endif
-}
-
-int class_config_dump_handler(struct llog_handle * handle,
-                              struct llog_rec_hdr *rec, void *data);
-
-#ifdef __KERNEL__
-extern int lustre_check_exclusion(struct super_block *sb, char *svname);
-#else
-#define lustre_check_exclusion(a,b)  0
-#endif
-
-static int class_config_llog_handler(struct llog_handle * handle,
-                                     struct llog_rec_hdr *rec, void *data)
-{
-        struct config_llog_instance *clli = data;
-        int cfg_len = rec->lrh_len;
-        char *cfg_buf = (char*) (rec + 1);
-        int rc = 0;
-        ENTRY;
-        
-        //class_config_dump_handler(handle, rec, data);
-
-        switch (rec->lrh_type) {
-        case OBD_CFG_REC: {
-                struct lustre_cfg *lcfg, *lcfg_new;
-                struct lustre_cfg_bufs bufs;
-                char *inst_name = NULL;
-                int inst_len = 0;
-                int inst = 0;
-
-                lcfg = (struct lustre_cfg *)cfg_buf;
-                if (lcfg->lcfg_version == __swab32(LUSTRE_CFG_VERSION))
-                        lustre_swab_lustre_cfg(lcfg);
-
-                rc = lustre_cfg_sanity_check(cfg_buf, cfg_len);
-                if (rc)
-                        GOTO(out, rc);
-
-                /* Figure out config state info */
-                if (lcfg->lcfg_command == LCFG_MARKER) {
-                        struct cfg_marker *marker = lustre_cfg_buf(lcfg, 1);
-                        CDEBUG(D_CONFIG, "Marker, inst_flg=%#x mark_flg=%#x\n",
-                               clli->cfg_flags, marker->cm_flags);
-                        if (marker->cm_flags & CM_START) {
-                                /* all previous flags off */
-                                clli->cfg_flags = CFG_F_MARKER;
-                                if (marker->cm_flags & CM_SKIP) { 
-                                        clli->cfg_flags |= CFG_F_SKIP;
-                                        CDEBUG(D_CONFIG, "SKIP #%d\n",
-                                               marker->cm_step);
-                                } else if ((marker->cm_flags & CM_EXCLUDE) ||
-                                           lustre_check_exclusion(clli->cfg_sb, 
-                                                          marker->cm_tgtname)) {
-                                        clli->cfg_flags |= CFG_F_EXCLUDE;
-                                        CDEBUG(D_CONFIG, "EXCLUDE %d\n",
-                                               marker->cm_step);
-                                }
-                        } else if (marker->cm_flags & CM_END) {
-                                clli->cfg_flags = 0;
-                        }
-                }
-                /* A config command without a start marker before it is 
-                   illegal (post 146) */
-                if (!(clli->cfg_flags & CFG_F_COMPAT146) &&
-                    !(clli->cfg_flags & CFG_F_MARKER) && 
-                    (lcfg->lcfg_command != LCFG_MARKER)) {
-                        CWARN("Config not inside markers, ignoring! (%#x)\n", 
-                              clli->cfg_flags);
-                        clli->cfg_flags |= CFG_F_SKIP;
-                }
-
-                if (clli->cfg_flags & CFG_F_SKIP) {
-                        CDEBUG(D_CONFIG, "skipping %#x\n",
-                               clli->cfg_flags);
-                        rc = 0;
-                        /* No processing! */
-                        break;
-                }
-
-                if ((clli->cfg_flags & CFG_F_EXCLUDE) && 
-                    (lcfg->lcfg_command == LCFG_LOV_ADD_OBD))
-                        /* Add inactive instead */
-                        lcfg->lcfg_command = LCFG_LOV_ADD_INA;
-
-                lustre_cfg_bufs_init(&bufs, lcfg);
-
-                if (clli && clli->cfg_instance && 
-                    LUSTRE_CFG_BUFLEN(lcfg, 0) > 0){
-                        inst = 1;
-                        inst_len = LUSTRE_CFG_BUFLEN(lcfg, 0) +
-                                strlen(clli->cfg_instance) + 1;
-                        OBD_ALLOC(inst_name, inst_len);
-                        if (inst_name == NULL)
-                                GOTO(out, rc = -ENOMEM);
-                        sprintf(inst_name, "%s-%s",
-                                lustre_cfg_string(lcfg, 0),
-                                clli->cfg_instance);
-                        lustre_cfg_bufs_set_string(&bufs, 0, inst_name);
-                        CDEBUG(D_CONFIG, "cmd %x, instance name: %s\n", 
-                               lcfg->lcfg_command, inst_name);
-                }
-
-                /* we override the llog's uuid for clients, to insure they
-                are unique */
-                if (clli && clli->cfg_instance && 
-                    lcfg->lcfg_command == LCFG_ATTACH) {
-                        lustre_cfg_bufs_set_string(&bufs, 2,
-                                                   clli->cfg_uuid.uuid);
-                }
-
-                lcfg_new = lustre_cfg_new(lcfg->lcfg_command, &bufs);
-
-                lcfg_new->lcfg_num   = lcfg->lcfg_num;
-                lcfg_new->lcfg_flags = lcfg->lcfg_flags;
-
-                /* XXX Hack to try to remain binary compatible with
-                 * pre-newconfig logs */
-                if (lcfg->lcfg_nal != 0 &&      /* pre-newconfig log? */
-                    (lcfg->lcfg_nid >> 32) == 0) {
-                        __u32 addr = (__u32)(lcfg->lcfg_nid & 0xffffffff);
-
-                        lcfg_new->lcfg_nid =
-                                LNET_MKNID(LNET_MKNET(lcfg->lcfg_nal, 0), addr);
-                        CWARN("Converted pre-newconfig NAL %d NID %x to %s\n",
-                              lcfg->lcfg_nal, addr,
-                              libcfs_nid2str(lcfg_new->lcfg_nid));
-                } else {
-                        lcfg_new->lcfg_nid = lcfg->lcfg_nid;
-                }
-
-                lcfg_new->lcfg_nal = 0; /* illegal value for obsolete field */
-
-                rc = class_process_config(lcfg_new);
-                lustre_cfg_free(lcfg_new);
-
-                if (inst)
-                        OBD_FREE(inst_name, inst_len);
-                break;
-        }
-        default:
-                CERROR("Unknown llog record type %#x encountered\n",
-                       rec->lrh_type);
-                break;
-        }
-out:
-        if (rc) {
-                CERROR("Err %d on cfg command:\n", rc);
-                class_config_dump_handler(handle, rec, data);
-        }
-        RETURN(rc);
-}
-
-int class_config_parse_llog(struct llog_ctxt *ctxt, char *name,
-                            struct config_llog_instance *cfg)
-{
-        struct llog_process_cat_data cd = {0, 0};
-        struct llog_handle *llh;
-        int rc, rc2;
-        ENTRY;
-
-        CDEBUG(D_INFO, "looking up llog %s\n", name);
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc)
-                GOTO(parse_out, rc);
-
-        /* continue processing from where we last stopped to end-of-log */
-        if (cfg)
-                cd.first_idx = cfg->cfg_last_idx;
-        cd.last_idx = 0;
-
-        rc = llog_process(llh, class_config_llog_handler, cfg, &cd);
-
-        CDEBUG(D_CONFIG, "Processed log %s gen %d-%d (rc=%d)\n", name, 
-               cd.first_idx + 1, cd.last_idx, rc);
-        if (cfg)
-                cfg->cfg_last_idx = cd.last_idx;
-
-parse_out:
-        rc2 = llog_close(llh);
-        if (rc == 0)
-                rc = rc2;
-
-        RETURN(rc);
-}
-
-int class_config_dump_handler(struct llog_handle * handle,
-                              struct llog_rec_hdr *rec, void *data)
-{
-        int cfg_len = rec->lrh_len;
-        char *cfg_buf = (char*) (rec + 1);
-        char *outstr, *ptr, *end;
-        int rc = 0;
-        ENTRY;
-
-        OBD_ALLOC(outstr, 256);
-        end = outstr + 256;
-        ptr = outstr;
-        if (!outstr) {
-                RETURN(-ENOMEM);
-        }
-        if (rec->lrh_type == OBD_CFG_REC) {
-                struct lustre_cfg *lcfg;
-                int i;
-
-                rc = lustre_cfg_sanity_check(cfg_buf, cfg_len);
-                if (rc)
-                        GOTO(out, rc);
-                lcfg = (struct lustre_cfg *)cfg_buf;
-
-                ptr += snprintf(ptr, end-ptr, "cmd=%05x ",
-                                lcfg->lcfg_command);
-                if (lcfg->lcfg_flags) {
-                        ptr += snprintf(ptr, end-ptr, "flags=%#08x ",
-                                        lcfg->lcfg_flags);
-                }
-                if (lcfg->lcfg_num) {
-                        ptr += snprintf(ptr, end-ptr, "num=%#08x ",
-                                        lcfg->lcfg_num);
-                }
-                if (lcfg->lcfg_nid) {
-                        ptr += snprintf(ptr, end-ptr, "nid=%s("LPX64")\n     ",
-                                        libcfs_nid2str(lcfg->lcfg_nid),
-                                        lcfg->lcfg_nid);
-                }
-                if (lcfg->lcfg_command == LCFG_MARKER) {
-                        struct cfg_marker *marker = lustre_cfg_buf(lcfg, 1);
-                        ptr += snprintf(ptr, end-ptr, "marker=%d(%#x)%s '%s'",
-                                        marker->cm_step, marker->cm_flags, 
-                                        marker->cm_tgtname, marker->cm_comment);
-                } else {
-                        for (i = 0; i <  lcfg->lcfg_bufcount; i++) {
-                                ptr += snprintf(ptr, end-ptr, "%d:%s  ", i,
-                                                lustre_cfg_string(lcfg, i));
-                        }
-                }
-                LCONSOLE(D_WARNING, "   %s\n", outstr);
-        } else {
-                LCONSOLE(D_WARNING, "unhandled lrh_type: %#x\n", rec->lrh_type);
-                rc = -EINVAL;
-        }
-out:
-        OBD_FREE(outstr, 256);
-        RETURN(rc);
-}
-
-int class_config_dump_llog(struct llog_ctxt *ctxt, char *name,
-                           struct config_llog_instance *cfg)
-{
-        struct llog_handle *llh;
-        int rc, rc2;
-        ENTRY;
-
-        LCONSOLE_INFO("Dumping config log %s\n", name);
-
-        rc = llog_create(ctxt, &llh, NULL, name);
-        if (rc)
-                RETURN(rc);
-
-        rc = llog_init_handle(llh, LLOG_F_IS_PLAIN, NULL);
-        if (rc)
-                GOTO(parse_out, rc);
-
-        rc = llog_process(llh, class_config_dump_handler, cfg, NULL);
-parse_out:
-        rc2 = llog_close(llh);
-        if (rc == 0)
-                rc = rc2;
-
-        LCONSOLE_INFO("End config log %s\n", name);
-        RETURN(rc);
-
-}
-
-/* Cleanup and detach */
-int class_manual_cleanup(struct obd_device *obd)
-{
-        struct lustre_cfg *lcfg;
-        struct lustre_cfg_bufs bufs;
-        int rc;
-        char flags[3]="";
-        ENTRY;
-
-        if (!obd) {
-                CERROR("empty cleanup\n");
-                RETURN(-EALREADY);
-        }
-
-        if (obd->obd_force)
-                strcat(flags, "F");
-        if (obd->obd_fail)
-                strcat(flags, "A");
-
-        CDEBUG(D_CONFIG, "Manual cleanup of %s (flags='%s')\n",
-               obd->obd_name, flags);
-
-        lustre_cfg_bufs_reset(&bufs, obd->obd_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, flags);
-        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-
-        rc = class_process_config(lcfg);
-        if (rc) {
-                CERROR("cleanup failed %d: %s\n", rc, obd->obd_name);
-                GOTO(out, rc);
-        }
-
-        /* the lcfg is almost the same for both ops */
-        lcfg->lcfg_command = LCFG_DETACH;
-        rc = class_process_config(lcfg);
-        if (rc)
-                CERROR("detach failed %d: %s\n", rc, obd->obd_name);
-out:
-        lustre_cfg_free(lcfg);
-        RETURN(rc);
-}
-
diff --git a/lustre/obdclass/obd_mount.c b/lustre/obdclass/obd_mount.c
deleted file mode 100644
index 8e42a9a9ad75ff11c42ae587d8393cb8d58493f3..0000000000000000000000000000000000000000
--- a/lustre/obdclass/obd_mount.c
+++ /dev/null
@@ -1,2058 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/obdclass/obd_mount.c
- *  Client/server mount routines
- *
- *  Copyright (c) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org/
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#define D_MOUNT D_SUPER|D_CONFIG /*|D_WARNING */
-#define PRINT_CMD CDEBUG
-#define PRINT_MASK D_SUPER|D_CONFIG
-
-#include <obd.h>
-#include <lvfs.h>
-#include <lustre_fsfilt.h>
-#include <obd_class.h>
-#include <lustre/lustre_user.h>
-#include <linux/version.h>
-#include <lustre_log.h>
-#include <lustre_disk.h>
-#include <lustre_param.h>
-
-static int (*client_fill_super)(struct super_block *sb) = NULL;
-static void (*kill_super_cb)(struct super_block *sb) = NULL;
-
-/*********** mount lookup *********/
-
-DECLARE_MUTEX(lustre_mount_info_lock);
-struct list_head server_mount_info_list = LIST_HEAD_INIT(server_mount_info_list);
-
-static struct lustre_mount_info *server_find_mount(char *name)
-{
-        struct list_head *tmp;
-        struct lustre_mount_info *lmi;
-        ENTRY;
-
-        list_for_each(tmp, &server_mount_info_list) {
-                lmi = list_entry(tmp, struct lustre_mount_info, lmi_list_chain);
-                if (strcmp(name, lmi->lmi_name) == 0)
-                        RETURN(lmi);
-        }
-        RETURN(NULL);
-}
-
-/* we must register an obd for a mount before we call the setup routine.
-   *_setup will call lustre_get_mount to get the mnt struct
-   by obd_name, since we can't pass the pointer to setup. */
-static int server_register_mount(char *name, struct super_block *sb,
-                          struct vfsmount *mnt)
-{
-        struct lustre_mount_info *lmi;
-        char *name_cp;
-        ENTRY;
-
-        LASSERT(mnt);
-        LASSERT(sb);
-
-        OBD_ALLOC(lmi, sizeof(*lmi));
-        if (!lmi)
-                RETURN(-ENOMEM);
-        OBD_ALLOC(name_cp, strlen(name) + 1);
-        if (!name_cp) {
-                OBD_FREE(lmi, sizeof(*lmi));
-                RETURN(-ENOMEM);
-        }
-        strcpy(name_cp, name);
-
-        down(&lustre_mount_info_lock);
-
-        if (server_find_mount(name)) {
-                up(&lustre_mount_info_lock);
-                OBD_FREE(lmi, sizeof(*lmi));
-                OBD_FREE(name_cp, strlen(name) + 1);
-                CERROR("Already registered %s\n", name);
-                RETURN(-EEXIST);
-        }
-        lmi->lmi_name = name_cp;
-        lmi->lmi_sb = sb;
-        lmi->lmi_mnt = mnt;
-        list_add(&lmi->lmi_list_chain, &server_mount_info_list);
-
-        up(&lustre_mount_info_lock);
-
-        CDEBUG(D_MOUNT, "reg_mnt %p from %s, vfscount=%d\n",
-               lmi->lmi_mnt, name, atomic_read(&lmi->lmi_mnt->mnt_count));
-
-        RETURN(0);
-}
-
-/* when an obd no longer needs a mount */
-static int server_deregister_mount(char *name)
-{
-        struct lustre_mount_info *lmi;
-        ENTRY;
-
-        down(&lustre_mount_info_lock);
-        lmi = server_find_mount(name);
-        if (!lmi) {
-                up(&lustre_mount_info_lock);
-                CERROR("%s not registered\n", name);
-                RETURN(-ENOENT);
-        }
-
-        CDEBUG(D_MOUNT, "dereg_mnt %p from %s, vfscount=%d\n",
-               lmi->lmi_mnt, name, atomic_read(&lmi->lmi_mnt->mnt_count));
-
-        OBD_FREE(lmi->lmi_name, strlen(lmi->lmi_name) + 1);
-        list_del(&lmi->lmi_list_chain);
-        OBD_FREE(lmi, sizeof(*lmi));
-        up(&lustre_mount_info_lock);
-
-        RETURN(0);
-}
-
-/* obd's look up a registered mount using their obdname. This is just
-   for initial obd setup to find the mount struct.  It should not be
-   called every time you want to mntget. */
-struct lustre_mount_info *server_get_mount(char *name)
-{
-        struct lustre_mount_info *lmi;
-        struct lustre_sb_info *lsi;
-        ENTRY;
-
-        down(&lustre_mount_info_lock);
-        lmi = server_find_mount(name);
-        up(&lustre_mount_info_lock);
-        if (!lmi) {
-                CERROR("Can't find mount for %s\n", name);
-                RETURN(NULL);
-        }
-        lsi = s2lsi(lmi->lmi_sb);
-        mntget(lmi->lmi_mnt);
-        atomic_inc(&lsi->lsi_mounts);
-
-        CDEBUG(D_MOUNT, "get_mnt %p from %s, refs=%d, vfscount=%d\n",
-               lmi->lmi_mnt, name, atomic_read(&lsi->lsi_mounts),
-               atomic_read(&lmi->lmi_mnt->mnt_count));
-
-        RETURN(lmi);
-}
-
-static void unlock_mntput(struct vfsmount *mnt)
-{
-        if (kernel_locked()) {
-                unlock_kernel();
-                mntput(mnt);
-                lock_kernel();
-        } else {
-                mntput(mnt);
-        }
-}
-
-static int lustre_put_lsi(struct super_block *sb);
-
-/* to be called from obd_cleanup methods */
-int server_put_mount(char *name, struct vfsmount *mnt)
-{
-        struct lustre_mount_info *lmi;
-        struct lustre_sb_info *lsi;
-        int count = atomic_read(&mnt->mnt_count) - 1;
-        ENTRY;
-
-        /* This might be the last one, can't deref after this */
-        unlock_mntput(mnt);
-        
-        down(&lustre_mount_info_lock);
-        lmi = server_find_mount(name);
-        up(&lustre_mount_info_lock);
-        if (!lmi) {
-                CERROR("Can't find mount for %s\n", name);
-                RETURN(-ENOENT);
-        }
-        LASSERT(lmi->lmi_mnt == mnt);
-        /* Note if lsi is poisoned, it's probably because server_wait_finished
-           didn't wait long enough and the sb was freed at the umount. */
-        lsi = s2lsi(lmi->lmi_sb);
-
-        CDEBUG(D_MOUNT, "put_mnt %p from %s, refs=%d, vfscount=%d\n",
-               lmi->lmi_mnt, name, atomic_read(&lsi->lsi_mounts), count);
-
-        if (lustre_put_lsi(lmi->lmi_sb)) {
-                CDEBUG(D_MOUNT, "Last put of mnt %p from %s, vfscount=%d\n",
-                       lmi->lmi_mnt, name, count);
-                /* last mount is the One True Mount */
-                if (count > 1)
-                        CERROR("%s: mount busy, vfscount=%d!\n", name, count);
-        }
-
-        /* this obd should never need the mount again */
-        server_deregister_mount(name);
-
-        RETURN(0);
-}
-
-
-/******* mount helper utilities *********/
-
-static void ldd_print(struct lustre_disk_data *ldd)
-{
-        PRINT_CMD(PRINT_MASK, "  disk data:\n");
-        PRINT_CMD(PRINT_MASK, "server:  %s\n", ldd->ldd_svname);
-        PRINT_CMD(PRINT_MASK, "uuid:    %s\n", (char *)ldd->ldd_uuid);
-        PRINT_CMD(PRINT_MASK, "fs:      %s\n", ldd->ldd_fsname);
-        PRINT_CMD(PRINT_MASK, "index:   %04x\n", ldd->ldd_svindex);
-        PRINT_CMD(PRINT_MASK, "config:  %d\n", ldd->ldd_config_ver);
-        PRINT_CMD(PRINT_MASK, "flags:   %#x\n", ldd->ldd_flags);
-        PRINT_CMD(PRINT_MASK, "diskfs:  %s\n", MT_STR(ldd));
-        PRINT_CMD(PRINT_MASK, "options: %s\n", ldd->ldd_mount_opts);
-        PRINT_CMD(PRINT_MASK, "params:  %s\n", ldd->ldd_params);
-        PRINT_CMD(PRINT_MASK, "comment: %s\n", ldd->ldd_userdata);
-}
-
-static int ldd_parse(struct lvfs_run_ctxt *mount_ctxt,
-                           struct lustre_disk_data *ldd)
-{
-        struct lvfs_run_ctxt saved;
-        struct file *file;
-        loff_t off = 0;
-        unsigned long len;
-        int rc;
-        ENTRY;
-
-        push_ctxt(&saved, mount_ctxt, NULL);
-
-        file = filp_open(MOUNT_DATA_FILE, O_RDONLY, 0644);
-        if (IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("cannot open %s: rc = %d\n", MOUNT_DATA_FILE, rc);
-                GOTO(out, rc);
-        }
-
-        len = i_size_read(file->f_dentry->d_inode);
-        CDEBUG(D_MOUNT, "Have %s, size %lu\n", MOUNT_DATA_FILE, len);
-        if (len != sizeof(*ldd)) {
-                CERROR("disk data size does not match: see %lu expect "LPSZ"\n",
-                       len, sizeof(*ldd));
-                GOTO(out_close, rc = -EINVAL);
-        }
-
-        rc = lustre_fread(file, ldd, len, &off);
-        if (rc != len) {
-                CERROR("error reading %s: read %d of %lu\n",
-                       MOUNT_DATA_FILE, rc, len);
-                GOTO(out_close, rc = -EINVAL);
-        }
-        rc = 0;
-
-        if (ldd->ldd_magic != LDD_MAGIC) {
-                /* FIXME add swabbing support */
-                CERROR("Bad magic in %s: %x!=%x\n", MOUNT_DATA_FILE,
-                       ldd->ldd_magic, LDD_MAGIC);
-                GOTO(out_close, rc = -EINVAL);
-        }
-
-        if (ldd->ldd_feature_incompat & ~LDD_INCOMPAT_SUPP) {
-                CERROR("%s: unsupported incompat filesystem feature(s) %x\n",
-                       ldd->ldd_svname,
-                       ldd->ldd_feature_incompat & ~LDD_INCOMPAT_SUPP);
-                GOTO(out_close, rc = -EINVAL);
-        }
-        if (ldd->ldd_feature_rocompat & ~LDD_ROCOMPAT_SUPP) {
-                CERROR("%s: unsupported read-only filesystem feature(s) %x\n",
-                       ldd->ldd_svname,
-                       ldd->ldd_feature_rocompat & ~LDD_ROCOMPAT_SUPP);
-                /* Do something like remount filesystem read-only */
-                GOTO(out_close, rc = -EINVAL);
-        }
-
-        ldd_print(ldd);
-
-out_close:
-        filp_close(file, 0);
-out:
-        pop_ctxt(&saved, mount_ctxt, NULL);
-        RETURN(rc);
-}
-
-static int ldd_write(struct lvfs_run_ctxt *mount_ctxt,
-                     struct lustre_disk_data *ldd)
-{
-        struct lvfs_run_ctxt saved;
-        struct file *file;
-        loff_t off = 0;
-        unsigned long len = sizeof(struct lustre_disk_data);
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(ldd->ldd_magic == LDD_MAGIC);
-
-        ldd->ldd_config_ver++;
-
-        push_ctxt(&saved, mount_ctxt, NULL);
-
-        file = filp_open(MOUNT_DATA_FILE, O_RDWR, 0644);
-        if (IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("cannot open %s: rc = %d\n", MOUNT_DATA_FILE, rc);
-                GOTO(out, rc);
-        }
-
-        rc = lustre_fwrite(file, ldd, len, &off);
-        if (rc != len) {
-                CERROR("error writing %s: read %d of %lu\n",
-                       MOUNT_DATA_FILE, rc, len);
-                GOTO(out_close, rc = -EINVAL);
-        }
-
-        rc = 0;
-        ldd_print(ldd);
-
-out_close:
-        filp_close(file, 0);
-out:
-        pop_ctxt(&saved, mount_ctxt, NULL);
-        RETURN(rc);
-}
-
-
-/**************** config llog ********************/
-
-/* Get a config log from the MGS and process it.
-   This func is called for both clients and servers.
-   Continue to process new statements appended to the logs
-   (whenever the config lock is revoked) until lustre_end_log
-   is called. */
-int lustre_process_log(struct super_block *sb, char *logname,
-                     struct config_llog_instance *cfg)
-{
-        struct lustre_cfg *lcfg;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device *mgc = lsi->lsi_mgc;
-        int rc;
-        ENTRY;
-
-        LASSERT(mgc);
-        LASSERT(cfg);
-
-        /* mgc_process_config */
-        lustre_cfg_bufs_reset(&bufs, mgc->obd_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, logname);
-        lustre_cfg_bufs_set(&bufs, 2, cfg, sizeof(*cfg));
-        lustre_cfg_bufs_set(&bufs, 3, &sb, sizeof(sb));
-        lcfg = lustre_cfg_new(LCFG_LOG_START, &bufs);
-        rc = obd_process_config(mgc, sizeof(*lcfg), lcfg);
-        lustre_cfg_free(lcfg);
-
-        if (rc == -EINVAL)
-                LCONSOLE_ERROR_MSG(0x15b, "%s: The configuration from log '%s' "
-                                   "failed (%d). Make sure this client and "
-                                   "the MGS are running compatible versions of "
-                                   "Lustre.\n",
-                                   mgc->obd_name, logname, rc);
-
-        if (rc)
-                LCONSOLE_ERROR_MSG(0x15c, "%s: The configuration from log '%s' "
-                                   "failed (%d). This may be the result of "
-                                   "communication errors between this node and "
-                                   "the MGS, a bad configuration, or other "
-                                   "errors. See the syslog for more "
-                                   "information.\n", mgc->obd_name, logname, 
-                                   rc);
-
-        /* class_obd_list(); */
-        RETURN(rc);
-}
-
-/* Stop watching this config log for updates */
-int lustre_end_log(struct super_block *sb, char *logname,
-                       struct config_llog_instance *cfg)
-{
-        struct lustre_cfg *lcfg;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device *mgc = lsi->lsi_mgc;
-        int rc;
-        ENTRY;
-
-        if (!mgc)
-                RETURN(-ENOENT);
-
-        /* mgc_process_config */
-        lustre_cfg_bufs_reset(&bufs, mgc->obd_name);
-        lustre_cfg_bufs_set_string(&bufs, 1, logname);
-        if (cfg)
-                lustre_cfg_bufs_set(&bufs, 2, cfg, sizeof(*cfg));
-        lcfg = lustre_cfg_new(LCFG_LOG_END, &bufs);
-        rc = obd_process_config(mgc, sizeof(*lcfg), lcfg);
-        lustre_cfg_free(lcfg);
-        RETURN(rc);
-}
-
-/**************** obd start *******************/
-
-int do_lcfg(char *cfgname, lnet_nid_t nid, int cmd,
-            char *s1, char *s2, char *s3, char *s4)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg    * lcfg = NULL;
-        int rc;
-
-        CDEBUG(D_TRACE, "lcfg %s %#x %s %s %s %s\n", cfgname,
-               cmd, s1, s2, s3, s4);
-
-        lustre_cfg_bufs_reset(&bufs, cfgname);
-        if (s1)
-                lustre_cfg_bufs_set_string(&bufs, 1, s1);
-        if (s2)
-                lustre_cfg_bufs_set_string(&bufs, 2, s2);
-        if (s3)
-                lustre_cfg_bufs_set_string(&bufs, 3, s3);
-        if (s4)
-                lustre_cfg_bufs_set_string(&bufs, 4, s4);
-
-        lcfg = lustre_cfg_new(cmd, &bufs);
-        lcfg->lcfg_nid = nid;
-        rc = class_process_config(lcfg);
-        lustre_cfg_free(lcfg);
-        return(rc);
-}
-
-static int lustre_start_simple(char *obdname, char *type, char *uuid,
-                               char *s1, char *s2)
-{
-        int rc;
-        CDEBUG(D_MOUNT, "Starting obd %s (typ=%s)\n", obdname, type);
-
-        rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, 0, 0);
-        if (rc) {
-                CERROR("%s attach error %d\n", obdname, rc);
-                return(rc);
-        }
-        rc = do_lcfg(obdname, 0, LCFG_SETUP, s1, s2, 0, 0);
-        if (rc) {
-                CERROR("%s setup error %d\n", obdname, rc);
-                do_lcfg(obdname, 0, LCFG_DETACH, 0, 0, 0, 0);
-        }
-        return rc;
-}
-
-/* Set up a MGS to serve startup logs */
-static int server_start_mgs(struct super_block *sb)
-{
-        struct lustre_sb_info    *lsi = s2lsi(sb);
-        struct vfsmount          *mnt = lsi->lsi_srv_mnt;
-        struct lustre_mount_info *lmi;
-        int    rc = 0;
-        ENTRY;
-        LASSERT(mnt);
-
-        /* It is impossible to have more than 1 MGS per node, since
-           MGC wouldn't know which to connect to */
-        lmi = server_find_mount(LUSTRE_MGS_OBDNAME);
-        if (lmi) {
-                lsi = s2lsi(lmi->lmi_sb);
-                LCONSOLE_ERROR_MSG(0x15d, "The MGS service was already started "
-                                   "from server %s\n", lsi->lsi_ldd->ldd_svname);
-                RETURN(-EALREADY);
-        }
-
-        CDEBUG(D_CONFIG, "Start MGS service %s\n", LUSTRE_MGS_OBDNAME);
-
-        rc = server_register_mount(LUSTRE_MGS_OBDNAME, sb, mnt);
-
-        if (!rc &&
-            ((rc = lustre_start_simple(LUSTRE_MGS_OBDNAME, LUSTRE_MGS_NAME,
-                                       LUSTRE_MGS_OBDNAME, 0, 0))))
-                server_deregister_mount(LUSTRE_MGS_OBDNAME);
-
-        if (rc)
-                LCONSOLE_ERROR_MSG(0x15e, "Failed to start MGS '%s' (%d).  Is "
-                                   "the 'mgs' module loaded?\n", 
-                                   LUSTRE_MGS_OBDNAME, rc);
-
-        RETURN(rc);
-}
-
-static int server_stop_mgs(struct super_block *sb)
-{
-        struct obd_device *obd;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MOUNT, "Stop MGS service %s\n", LUSTRE_MGS_OBDNAME);
-
-        /* There better be only one MGS */
-        obd = class_name2obd(LUSTRE_MGS_OBDNAME);
-        if (!obd) {
-                CDEBUG(D_CONFIG, "mgs %s not running\n", LUSTRE_MGS_OBDNAME);
-                RETURN(-EALREADY);
-        }
-
-        /* The MGS should always stop when we say so */
-        obd->obd_force = 1;
-        rc = class_manual_cleanup(obd);
-        RETURN(rc);
-}
-
-DECLARE_MUTEX(mgc_start_lock);
-
-/* Set up a mgcobd to process startup logs */
-static int lustre_start_mgc(struct super_block *sb)
-{
-        struct lustre_handle mgc_conn = {0, };
-        struct obd_connect_data *data = NULL;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device *obd;
-        struct obd_export *exp;
-        struct obd_uuid *uuid;
-        class_uuid_t uuidc;
-        lnet_nid_t nid;
-        char *mgcname, *niduuid;
-        char *ptr;
-        int recov_bk;
-        int rc = 0, i = 0, j, len;
-        ENTRY;
-
-        LASSERT(lsi->lsi_lmd);
-
-        /* Find the first non-lo MGS nid for our MGC name */
-        if (lsi->lsi_flags & LSI_SERVER) {
-                ptr = lsi->lsi_ldd->ldd_params;
-                /* Use mgsnode= nids */
-                if ((class_find_param(ptr, PARAM_MGSNODE, &ptr) == 0) &&
-                    (class_parse_nid(ptr, &nid, &ptr) == 0)) {
-                        i++;
-                } else if (IS_MGS(lsi->lsi_ldd)) {
-                        lnet_process_id_t id;
-                        while ((rc = LNetGetId(i++, &id)) != -ENOENT) {
-                                if (LNET_NETTYP(LNET_NIDNET(id.nid)) == LOLND)
-                                        continue;
-                                nid = id.nid;
-                                i++;
-                                break;
-                        }
-                }
-        } else { /* client */
-                /* Use nids from mount line: uml1,1@elan:uml2,2@elan:/lustre */
-                ptr = lsi->lsi_lmd->lmd_dev;
-                if (class_parse_nid(ptr, &nid, &ptr) == 0)
-                        i++;
-        }
-        if (i == 0) {
-                CERROR("No valid MGS nids found.\n");
-                RETURN(-EINVAL);
-        }
-
-        len = strlen(LUSTRE_MGC_OBDNAME) + strlen(libcfs_nid2str(nid)) + 1;
-        OBD_ALLOC(mgcname, len);
-        OBD_ALLOC(niduuid, len + 2);
-        if (!mgcname || !niduuid)
-                GOTO(out_free, rc = -ENOMEM);
-        sprintf(mgcname, "%s%s", LUSTRE_MGC_OBDNAME, libcfs_nid2str(nid));
-
-        mutex_down(&mgc_start_lock);
-
-        obd = class_name2obd(mgcname);
-        if (obd) {
-                /* Re-using an existing MGC */
-                atomic_inc(&obd->u.cli.cl_mgc_refcount);
-
-                recov_bk = 0;
-                /* If we are restarting the MGS, don't try to keep the MGC's
-                   old connection, or registration will fail. */
-                if ((lsi->lsi_flags & LSI_SERVER) && IS_MGS(lsi->lsi_ldd)) {
-                        CDEBUG(D_MOUNT, "New MGS with live MGC\n");
-                        recov_bk = 1;
-                }
-
-                /* Try all connections, but only once (again).
-                   We don't want to block another target from starting
-                   (using its local copy of the log), but we do want to connect
-                   if at all possible. */
-                recov_bk++;
-                CDEBUG(D_MOUNT, "%s: Set MGC reconnect %d\n", mgcname,recov_bk);
-                rc = obd_set_info_async(obd->obd_self_export,
-                                        strlen(KEY_INIT_RECOV_BACKUP),
-                                        KEY_INIT_RECOV_BACKUP,
-                                        sizeof(recov_bk), &recov_bk, NULL);
-                GOTO(out, rc = 0);
-        }
-
-        CDEBUG(D_MOUNT, "Start MGC '%s'\n", mgcname);
-
-        /* Add the primary nids for the MGS */
-        i = 0;
-        sprintf(niduuid, "%s_%x", mgcname, i);
-        if (lsi->lsi_flags & LSI_SERVER) {
-                ptr = lsi->lsi_ldd->ldd_params;
-                if (IS_MGS(lsi->lsi_ldd)) {
-                        /* Use local nids (including LO) */
-                        lnet_process_id_t id;
-                        while ((rc = LNetGetId(i++, &id)) != -ENOENT) {
-                                rc = do_lcfg(mgcname, id.nid,
-                                             LCFG_ADD_UUID, niduuid, 0,0,0);
-                        }
-                } else {
-                        /* Use mgsnode= nids */
-                        if (class_find_param(ptr, PARAM_MGSNODE, &ptr) != 0) {
-                                CERROR("No MGS nids given.\n");
-                                GOTO(out_free, rc = -EINVAL);
-                        }
-                        while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                                rc = do_lcfg(mgcname, nid,
-                                             LCFG_ADD_UUID, niduuid, 0,0,0);
-                                i++;
-                        }
-                }
-        } else { /* client */
-                /* Use nids from mount line: uml1,1@elan:uml2,2@elan:/lustre */
-                ptr = lsi->lsi_lmd->lmd_dev;
-                while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                        rc = do_lcfg(mgcname, nid,
-                                     LCFG_ADD_UUID, niduuid, 0,0,0);
-                        i++;
-                        /* Stop at the first failover nid */
-                        if (*ptr == ':')
-                                break;
-                }
-        }
-        if (i == 0) {
-                CERROR("No valid MGS nids found.\n");
-                GOTO(out_free, rc = -EINVAL);
-        }
-        lsi->lsi_lmd->lmd_mgs_failnodes = 1;
-
-        /* Random uuid for MGC allows easier reconnects */
-        OBD_ALLOC_PTR(uuid);
-        ll_generate_random_uuid(uuidc);
-        class_uuid_unparse(uuidc, uuid);
-
-        /* Start the MGC */
-        rc = lustre_start_simple(mgcname, LUSTRE_MGC_NAME,
-                                 (char *)uuid->uuid, LUSTRE_MGS_OBDNAME,
-                                 niduuid);
-        OBD_FREE_PTR(uuid);
-        if (rc)
-                GOTO(out_free, rc);
-
-        /* Add any failover MGS nids */
-        i = 1;
-        while ((*ptr == ':' ||
-                class_find_param(ptr, PARAM_MGSNODE, &ptr) == 0)) {
-                /* New failover node */
-                sprintf(niduuid, "%s_%x", mgcname, i);
-                j = 0;
-                while (class_parse_nid(ptr, &nid, &ptr) == 0) {
-                        j++;
-                        rc = do_lcfg(mgcname, nid,
-                                     LCFG_ADD_UUID, niduuid, 0,0,0);
-                        if (*ptr == ':')
-                                break;
-                }
-                if (j > 0) {
-                        rc = do_lcfg(mgcname, 0, LCFG_ADD_CONN,
-                                     niduuid, 0, 0, 0);
-                        i++;
-                } else {
-                        /* at ":/fsname" */
-                        break;
-                }
-        }
-        lsi->lsi_lmd->lmd_mgs_failnodes = i;
-
-        obd = class_name2obd(mgcname);
-        if (!obd) {
-                CERROR("Can't find mgcobd %s\n", mgcname);
-                GOTO(out_free, rc = -ENOTCONN);
-        }
-
-        /* Keep a refcount of servers/clients who started with "mount",
-           so we know when we can get rid of the mgc. */
-        atomic_set(&obd->u.cli.cl_mgc_refcount, 1);
-
-        /* Try all connections, but only once. */
-        recov_bk = 1;
-        rc = obd_set_info_async(obd->obd_self_export,
-                                strlen(KEY_INIT_RECOV_BACKUP),
-                                KEY_INIT_RECOV_BACKUP,
-                                sizeof(recov_bk), &recov_bk, NULL);
-        if (rc)
-                /* nonfatal */
-                CWARN("can't set %s %d\n", KEY_INIT_RECOV_BACKUP, rc);
-
-        OBD_ALLOC_PTR(data);
-        if (data == NULL)
-                GOTO(out, rc = -ENOMEM);
-        data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_AT;
-        data->ocd_version = LUSTRE_VERSION_CODE;
-        /* We connect to the MGS at setup, and don't disconnect until cleanup */
-        rc = obd_connect(&mgc_conn, obd, &(obd->obd_uuid), data, NULL);
-        OBD_FREE_PTR(data);
-        if (rc) {
-                CERROR("connect failed %d\n", rc);
-                GOTO(out, rc);
-        }
-
-        exp = class_conn2export(&mgc_conn);
-        obd->u.cli.cl_mgc_mgsexp = exp;
-
-out:
-        /* Keep the mgc info in the sb. Note that many lsi's can point
-           to the same mgc.*/
-        lsi->lsi_mgc = obd;
-out_free:
-        mutex_up(&mgc_start_lock);
-
-        if (mgcname)
-                OBD_FREE(mgcname, len);
-        if (niduuid)
-                OBD_FREE(niduuid, len + 2);
-        RETURN(rc);
-}
-
-static int lustre_stop_mgc(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device *obd;
-        char *niduuid = 0, *ptr = 0;
-        int i, rc = 0, len = 0;
-        ENTRY;
-
-        if (!lsi)
-                RETURN(-ENOENT);
-        obd = lsi->lsi_mgc;
-        if (!obd)
-                RETURN(-ENOENT);
-
-        lsi->lsi_mgc = NULL;
-        mutex_down(&mgc_start_lock);
-        if (!atomic_dec_and_test(&obd->u.cli.cl_mgc_refcount)) {
-                /* This is not fatal, every client that stops
-                   will call in here. */
-                CDEBUG(D_MOUNT, "mgc still has %d references.\n",
-                       atomic_read(&obd->u.cli.cl_mgc_refcount));
-                GOTO(out, rc = -EBUSY);
-        }
-
-        /* The MGC has no recoverable data in any case. 
-         * force shotdown set in umount_begin */
-        obd->obd_no_recov = 1;
-
-        if (obd->u.cli.cl_mgc_mgsexp) {
-                /* An error is not fatal, if we are unable to send the
-                   disconnect mgs ping evictor cleans up the export */
-                rc = obd_disconnect(obd->u.cli.cl_mgc_mgsexp);
-                if (rc)
-                        CDEBUG(D_MOUNT, "disconnect failed %d\n", rc);
-        }
-
-        /* Save the obdname for cleaning the nid uuids, which are
-           obdname_XX */
-        len = strlen(obd->obd_name) + 6;
-        OBD_ALLOC(niduuid, len);
-        if (niduuid) {
-                strcpy(niduuid, obd->obd_name);
-                ptr = niduuid + strlen(niduuid);
-        }
-
-        rc = class_manual_cleanup(obd);
-        if (rc)
-                GOTO(out, rc);
-
-        /* Clean the nid uuids */
-        if (!niduuid)
-                GOTO(out, rc = -ENOMEM);
-
-        for (i = 0; i < lsi->lsi_lmd->lmd_mgs_failnodes; i++) {
-                sprintf(ptr, "_%x", i);
-                rc = do_lcfg(LUSTRE_MGC_OBDNAME, 0, LCFG_DEL_UUID,
-                             niduuid, 0, 0, 0);
-                if (rc)
-                        CERROR("del MDC UUID %s failed: rc = %d\n",
-                               niduuid, rc);
-        }
-out:
-        if (niduuid)
-                OBD_FREE(niduuid, len);
-
-        /* class_import_put will get rid of the additional connections */
-        mutex_up(&mgc_start_lock);
-        RETURN(rc);
-}
-
-/* Since there's only one mgc per node, we have to change it's fs to get
-   access to the right disk. */
-static int server_mgc_set_fs(struct obd_device *mgc, struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MOUNT, "Set mgc disk for %s\n", lsi->lsi_lmd->lmd_dev);
-
-        /* cl_mgc_sem in mgc insures we sleep if the mgc_fs is busy */
-        rc = obd_set_info_async(mgc->obd_self_export,
-                                strlen("set_fs"), "set_fs",
-                                sizeof(*sb), sb, NULL);
-        if (rc) {
-                CERROR("can't set_fs %d\n", rc);
-        }
-
-        RETURN(rc);
-}
-
-static int server_mgc_clear_fs(struct obd_device *mgc)
-{
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MOUNT, "Unassign mgc disk\n");
-
-        rc = obd_set_info_async(mgc->obd_self_export,
-                                strlen("clear_fs"), "clear_fs",
-                                0, NULL, NULL);
-        RETURN(rc);
-}
-
-DECLARE_MUTEX(server_start_lock);
-
-/* Stop MDS/OSS if nobody is using them */
-static int server_stop_servers(int lddflags, int lsiflags)
-{
-        struct obd_device *obd = NULL;
-        struct obd_type *type = NULL;
-        int rc = 0;
-        ENTRY;
-
-        mutex_down(&server_start_lock);
-
-        /* Either an MDT or an OST or neither  */
-        /* if this was an MDT, and there are no more MDT's, clean up the MDS */
-        if ((lddflags & LDD_F_SV_TYPE_MDT) &&
-            (obd = class_name2obd(LUSTRE_MDS_OBDNAME))) {
-                /*FIXME pre-rename, should eventually be LUSTRE_MDT_NAME*/
-                type = class_search_type(LUSTRE_MDS_NAME);
-        }
-        /* if this was an OST, and there are no more OST's, clean up the OSS */
-        if ((lddflags & LDD_F_SV_TYPE_OST) &&
-            (obd = class_name2obd(LUSTRE_OSS_OBDNAME))) {
-                type = class_search_type(LUSTRE_OST_NAME);
-        }
-
-        if (obd && (!type || !type->typ_refcnt)) {
-                int err;
-                obd->obd_force = 1;
-                /* obd_fail doesn't mean much on a server obd */
-                err = class_manual_cleanup(obd);
-                if (!rc)
-                        rc = err;
-        }
-
-        mutex_up(&server_start_lock);
-
-        RETURN(rc);
-}
-
-int server_mti_print(char *title, struct mgs_target_info *mti)
-{
-        PRINT_CMD(PRINT_MASK, "mti %s\n", title);
-        PRINT_CMD(PRINT_MASK, "server: %s\n", mti->mti_svname);
-        PRINT_CMD(PRINT_MASK, "fs:     %s\n", mti->mti_fsname);
-        PRINT_CMD(PRINT_MASK, "uuid:   %s\n", mti->mti_uuid);
-        PRINT_CMD(PRINT_MASK, "ver: %d  flags: %#x\n",
-                  mti->mti_config_ver, mti->mti_flags);
-        return(0);
-}
-
-static int server_sb2mti(struct super_block *sb, struct mgs_target_info *mti)
-{
-        struct lustre_sb_info   *lsi = s2lsi(sb);
-        struct lustre_disk_data *ldd = lsi->lsi_ldd;
-        lnet_process_id_t        id;
-        int i = 0;
-        ENTRY;
-
-        if (!(lsi->lsi_flags & LSI_SERVER))
-                RETURN(-EINVAL);
-
-        strncpy(mti->mti_fsname, ldd->ldd_fsname,
-                sizeof(mti->mti_fsname));
-        strncpy(mti->mti_svname, ldd->ldd_svname,
-                sizeof(mti->mti_svname));
-
-        mti->mti_nid_count = 0;
-        while (LNetGetId(i++, &id) != -ENOENT) {
-                if (LNET_NETTYP(LNET_NIDNET(id.nid)) == LOLND)
-                        continue;
-                mti->mti_nids[mti->mti_nid_count] = id.nid;
-                mti->mti_nid_count++;
-                if (mti->mti_nid_count >= MTI_NIDS_MAX) {
-                        CWARN("Only using first %d nids for %s\n",
-                              mti->mti_nid_count, mti->mti_svname);
-                        break;
-                }
-        }
-
-        mti->mti_lustre_ver = LUSTRE_VERSION_CODE;
-        mti->mti_config_ver = 0;
-        mti->mti_flags = ldd->ldd_flags;
-        mti->mti_stripe_index = ldd->ldd_svindex;
-        memcpy(mti->mti_uuid, ldd->ldd_uuid, sizeof(mti->mti_uuid));
-        if (strlen(ldd->ldd_params) > sizeof(mti->mti_params)) {
-                CERROR("params too big for mti\n");
-                RETURN(-ENOMEM);
-        }
-        memcpy(mti->mti_params, ldd->ldd_params, sizeof(mti->mti_params));
-        RETURN(0);
-}
-
-/* Register an old or new target with the MGS. If needed MGS will construct
-   startup logs and assign index */
-int server_register_target(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device *mgc = lsi->lsi_mgc;
-        struct lustre_disk_data *ldd = lsi->lsi_ldd;
-        struct mgs_target_info *mti = NULL;
-        int rc;
-        ENTRY;
-
-        LASSERT(mgc);
-
-        if (!(lsi->lsi_flags & LSI_SERVER))
-                RETURN(-EINVAL);
-
-        OBD_ALLOC_PTR(mti);
-        if (!mti)
-                RETURN(-ENOMEM);
-        rc = server_sb2mti(sb, mti);
-        if (rc)
-                GOTO(out, rc);
-
-        CDEBUG(D_MOUNT, "Registration %s, fs=%s, %s, index=%04x, flags=%#x\n",
-               mti->mti_svname, mti->mti_fsname,
-               libcfs_nid2str(mti->mti_nids[0]), mti->mti_stripe_index,
-               mti->mti_flags);
-
-        /* Register the target */
-        /* FIXME use mgc_process_config instead */
-        rc = obd_set_info_async(mgc->u.cli.cl_mgc_mgsexp,
-                                strlen("register_target"), "register_target",
-                                sizeof(*mti), mti, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        /* Always update our flags */
-        ldd->ldd_flags = mti->mti_flags & ~LDD_F_REWRITE_LDD;
-
-        /* If this flag is set, it means the MGS wants us to change our
-           on-disk data. (So far this means just the index.) */
-        if (mti->mti_flags & LDD_F_REWRITE_LDD) {
-                char *label;
-                int err;
-                CDEBUG(D_MOUNT, "Changing on-disk index from %#x to %#x "
-                       "for %s\n", ldd->ldd_svindex, mti->mti_stripe_index,
-                       mti->mti_svname);
-                ldd->ldd_svindex = mti->mti_stripe_index;
-                strncpy(ldd->ldd_svname, mti->mti_svname,
-                        sizeof(ldd->ldd_svname));
-                /* or ldd_make_sv_name(ldd); */
-                ldd_write(&mgc->obd_lvfs_ctxt, ldd);
-
-                err = fsfilt_set_label(mgc, lsi->lsi_srv_mnt->mnt_sb,
-                                       mti->mti_svname);
-                if (err)
-                        CERROR("Label set error %d\n", err);
-                label = fsfilt_get_label(mgc, lsi->lsi_srv_mnt->mnt_sb);
-                if (label)
-                        CDEBUG(D_MOUNT, "Disk label changed to %s\n", label);
-
-                /* Flush the new ldd to disk */
-                fsfilt_sync(mgc, lsi->lsi_srv_mnt->mnt_sb);
-        }
-
-out:
-        if (mti)
-                OBD_FREE_PTR(mti);
-        RETURN(rc);
-}
-
-/* Start targets */
-static int server_start_targets(struct super_block *sb, struct vfsmount *mnt)
-{
-        struct obd_device *obd;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct config_llog_instance cfg;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MOUNT, "starting target %s\n", lsi->lsi_ldd->ldd_svname);
-
-        /* If we're an MDT, make sure the global MDS is running */
-        if (lsi->lsi_ldd->ldd_flags & LDD_F_SV_TYPE_MDT) {
-                /* make sure the MDS is started */
-                mutex_down(&server_start_lock);
-                obd = class_name2obd(LUSTRE_MDS_OBDNAME);
-                if (!obd) {
-                        rc = lustre_start_simple(LUSTRE_MDS_OBDNAME,
-                    /* FIXME pre-rename, should eventually be LUSTRE_MDS_NAME */
-                                                 LUSTRE_MDT_NAME,
-                                                 LUSTRE_MDS_OBDNAME"_uuid",
-                                                 0, 0);
-                        if (rc) {
-                                mutex_up(&server_start_lock);
-                                CERROR("failed to start MDS: %d\n", rc);
-                                RETURN(rc);
-                        }
-                }
-                mutex_up(&server_start_lock);
-        }
-
-        /* If we're an OST, make sure the global OSS is running */
-        if (lsi->lsi_ldd->ldd_flags & LDD_F_SV_TYPE_OST) {
-                /* make sure OSS is started */
-                mutex_down(&server_start_lock);
-                obd = class_name2obd(LUSTRE_OSS_OBDNAME);
-                if (!obd) {
-                        rc = lustre_start_simple(LUSTRE_OSS_OBDNAME,
-                                                 LUSTRE_OSS_NAME,
-                                                 LUSTRE_OSS_OBDNAME"_uuid",
-                                                 0, 0);
-                        if (rc) {
-                                mutex_up(&server_start_lock);
-                                CERROR("failed to start OSS: %d\n", rc);
-                                RETURN(rc);
-                        }
-                }
-                mutex_up(&server_start_lock);
-        }
-
-        /* Set the mgc fs to our server disk.  This allows the MGC
-           to read and write configs locally. */
-        rc = server_mgc_set_fs(lsi->lsi_mgc, sb);
-        if (rc)
-                RETURN(rc);
-
-        /* Register with MGS */
-        rc = server_register_target(sb);
-        if (rc && (lsi->lsi_ldd->ldd_flags &
-                   (LDD_F_NEED_INDEX | LDD_F_UPDATE | LDD_F_UPGRADE14))){
-                CERROR("Required registration failed for %s: %d\n",
-                       lsi->lsi_ldd->ldd_svname, rc);
-                if (rc == -EIO) {
-                        LCONSOLE_ERROR_MSG(0x15f, "Communication error with the"
-                                           " MGS.  Is the MGS running?\n");
-                }
-                GOTO(out_mgc, rc);
-        }
-        if (rc == -EINVAL) {
-                LCONSOLE_ERROR_MSG(0x160, "The MGS is refusing to allow this "
-                                   "server (%s) to start.  Please see messages "
-                                   "on the MGS node.\n", 
-                                   lsi->lsi_ldd->ldd_svname);
-                GOTO(out_mgc, rc);
-        }
-        /* non-fatal error of registeration with MGS */
-        if (rc)
-                CDEBUG(D_MOUNT, "Cannot register with MGS: %d\n", rc);
-
-        /* Let the target look up the mount using the target's name
-           (we can't pass the sb or mnt through class_process_config.) */
-        rc = server_register_mount(lsi->lsi_ldd->ldd_svname, sb, mnt);
-        if (rc)
-                GOTO(out_mgc, rc);
-
-        /* Start targets using the llog named for the target */
-        memset(&cfg, 0, sizeof(cfg));
-        rc = lustre_process_log(sb, lsi->lsi_ldd->ldd_svname, &cfg);
-        if (rc) {
-                CERROR("failed to start server %s: %d\n",
-                       lsi->lsi_ldd->ldd_svname, rc);
-                GOTO(out_mgc, rc);
-        }
-
-out_mgc:
-        /* Release the mgc fs for others to use */
-        server_mgc_clear_fs(lsi->lsi_mgc);
-
-        if (!rc) {
-                obd = class_name2obd(lsi->lsi_ldd->ldd_svname);
-                if (!obd) {
-                        CERROR("no server named %s was started\n",
-                               lsi->lsi_ldd->ldd_svname);
-                        RETURN(-ENXIO);
-                }
-
-                if ((lsi->lsi_lmd->lmd_flags & LMD_FLG_ABORT_RECOV) &&
-                    (OBP(obd, iocontrol))) {
-                        obd_iocontrol(OBD_IOC_ABORT_RECOVERY,
-                                      obd->obd_self_export, 0, NULL, NULL);
-                }
-
-                /* log has been fully processed */
-                obd_notify(obd, NULL, OBD_NOTIFY_CONFIG, (void *)CONFIG_LOG);
-        }
-
-        RETURN(rc);
-}
-
-/***************** lustre superblock **************/
-
-struct lustre_sb_info *lustre_init_lsi(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = NULL;
-        ENTRY;
-
-        OBD_ALLOC(lsi, sizeof(*lsi));
-        if (!lsi)
-                RETURN(NULL);
-        OBD_ALLOC(lsi->lsi_lmd, sizeof(*lsi->lsi_lmd));
-        if (!lsi->lsi_lmd) {
-                OBD_FREE(lsi, sizeof(*lsi));
-                RETURN(NULL);
-        }
-
-        lsi->lsi_lmd->lmd_exclude_count = 0;
-        s2lsi_nocast(sb) = lsi;
-        /* we take 1 extra ref for our setup */
-        atomic_set(&lsi->lsi_mounts, 1);
-
-        /* Default umount style */
-        lsi->lsi_flags = LSI_UMOUNT_FAILOVER;
-        RETURN(lsi);
-}
-
-static int lustre_free_lsi(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        ENTRY;
-
-        if (!lsi)
-                RETURN(0);
-
-        CDEBUG(D_MOUNT, "Freeing lsi\n");
-
-        /* someone didn't call server_put_mount. */
-        LASSERT(atomic_read(&lsi->lsi_mounts) == 0);
-
-        if (lsi->lsi_ldd != NULL)
-                OBD_FREE(lsi->lsi_ldd, sizeof(*lsi->lsi_ldd));
-
-        if (lsi->lsi_lmd != NULL) {
-                if (lsi->lsi_lmd->lmd_dev != NULL)
-                        OBD_FREE(lsi->lsi_lmd->lmd_dev,
-                                 strlen(lsi->lsi_lmd->lmd_dev) + 1);
-                if (lsi->lsi_lmd->lmd_profile != NULL)
-                        OBD_FREE(lsi->lsi_lmd->lmd_profile,
-                                 strlen(lsi->lsi_lmd->lmd_profile) + 1);
-                if (lsi->lsi_lmd->lmd_opts != NULL)
-                        OBD_FREE(lsi->lsi_lmd->lmd_opts,
-                                 strlen(lsi->lsi_lmd->lmd_opts) + 1);
-                if (lsi->lsi_lmd->lmd_exclude_count)
-                        OBD_FREE(lsi->lsi_lmd->lmd_exclude,
-                                 sizeof(lsi->lsi_lmd->lmd_exclude[0]) *
-                                 lsi->lsi_lmd->lmd_exclude_count);
-                OBD_FREE(lsi->lsi_lmd, sizeof(*lsi->lsi_lmd));
-        }
-
-        LASSERT(lsi->lsi_llsbi == NULL);
-
-        OBD_FREE(lsi, sizeof(*lsi));
-        s2lsi_nocast(sb) = NULL;
-
-        RETURN(0);
-}
-
-/* The lsi has one reference for every server that is using the disk -
-   e.g. MDT, MGS, and potentially MGC */
-static int lustre_put_lsi(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        ENTRY;
-
-        LASSERT(lsi);
-
-        CDEBUG(D_MOUNT, "put %p %d\n", sb, atomic_read(&lsi->lsi_mounts));
-
-        if (atomic_dec_and_test(&lsi->lsi_mounts)) {
-                lustre_free_lsi(sb);
-                RETURN(1);
-        }
-        RETURN(0);
-}
-
-/*************** server mount ******************/
-
-/* Kernel mount using mount options in MOUNT_DATA_FILE */
-static struct vfsmount *server_kernel_mount(struct super_block *sb)
-{
-        struct lvfs_run_ctxt mount_ctxt;
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct lustre_disk_data *ldd;
-        struct lustre_mount_data *lmd = lsi->lsi_lmd;
-        struct vfsmount *mnt;
-        char *options = NULL;
-        unsigned long page, s_flags;
-        struct page *__page;
-        int rc;
-        ENTRY;
-
-        OBD_ALLOC(ldd, sizeof(*ldd));
-        if (!ldd)
-                RETURN(ERR_PTR(-ENOMEM));
-
-        /* In the past, we have always used flags = 0.
-           Note ext3/ldiskfs can't be mounted ro. */
-        s_flags = sb->s_flags;
-
-        /* Pre-mount ldiskfs to read the MOUNT_DATA_FILE */
-        CDEBUG(D_MOUNT, "Pre-mount ldiskfs %s\n", lmd->lmd_dev);
-        mnt = ll_kern_mount("ldiskfs", s_flags, lmd->lmd_dev, 0);
-        if (IS_ERR(mnt)) {
-                rc = PTR_ERR(mnt);
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-                /* 2.6 kernels: if ldiskfs fails, try ldiskfs2 */
-                mnt = ll_kern_mount("ldiskfs2", s_flags, lmd->lmd_dev, 0);
-                if (IS_ERR(mnt)) {
-                        int rc2 = PTR_ERR(mnt);
-                        CERROR("premount %s:%#lx ldiskfs failed: %d, ldiskfs2 "
-                               "failed: %d.  Is the ldiskfs module available?\n",
-                               lmd->lmd_dev, s_flags, rc, rc2);
-                        GOTO(out_free, rc);
-                }
-#else
-                /* 2.4 kernels: if ldiskfs fails, try ext3 */
-                mnt = ll_kern_mount("ext3", s_flags, lmd->lmd_dev, 0);
-                if (IS_ERR(mnt)) {
-                        rc = PTR_ERR(mnt);
-                        CERROR("premount ext3 failed: rc = %d\n", rc);
-                        GOTO(out_free, rc);
-                }
-#endif
-        }
-
-        OBD_SET_CTXT_MAGIC(&mount_ctxt);
-        mount_ctxt.pwdmnt = mnt;
-        mount_ctxt.pwd = mnt->mnt_root;
-        mount_ctxt.fs = get_ds();
-
-        rc = ldd_parse(&mount_ctxt, ldd);
-        unlock_mntput(mnt);
-
-        if (rc) {
-                CERROR("premount parse options failed: rc = %d\n", rc);
-                GOTO(out_free, rc);
-        }
-
-        /* Done with our pre-mount, now do the real mount. */
-
-        /* Glom up mount options */
-        OBD_PAGE_ALLOC(__page, CFS_ALLOC_STD);
-        if (!__page)
-                GOTO(out_free, rc = -ENOMEM);
-        page = (unsigned long)cfs_page_address(__page);
-
-        options = (char *)page;
-        memset(options, 0, CFS_PAGE_SIZE);
-        strncpy(options, ldd->ldd_mount_opts, CFS_PAGE_SIZE - 2);
-
-        /* Add in any mount-line options */
-        if (lmd->lmd_opts && (*(lmd->lmd_opts) != 0)) {
-                int len = CFS_PAGE_SIZE - strlen(options) - 2;
-                if (*options != 0)
-                        strcat(options, ",");
-                strncat(options, lmd->lmd_opts, len);
-        }
-
-        /* Special permanent mount flags */
-        if (IS_OST(ldd))
-            s_flags |= MS_NOATIME | MS_NODIRATIME;
-
-        CDEBUG(D_MOUNT, "kern_mount: %s %s %s\n",
-               MT_STR(ldd), lmd->lmd_dev, options);
-        mnt = ll_kern_mount(MT_STR(ldd), s_flags, lmd->lmd_dev,
-                            (void *)options);
-        OBD_PAGE_FREE(__page);
-        if (IS_ERR(mnt)) {
-                rc = PTR_ERR(mnt);
-                CERROR("ll_kern_mount failed: rc = %d\n", rc);
-                GOTO(out_free, rc);
-        }
-
-        lsi->lsi_ldd = ldd;   /* freed at lsi cleanup */
-        CDEBUG(D_SUPER, "%s: mnt = %p\n", lmd->lmd_dev, mnt);
-        RETURN(mnt);
-
-out_free:
-        OBD_FREE(ldd, sizeof(*ldd));
-        lsi->lsi_ldd = NULL;
-        RETURN(ERR_PTR(rc));
-}
-
-static void server_wait_finished(struct vfsmount *mnt)
-{
-        wait_queue_head_t   waitq;
-        struct l_wait_info  lwi;
-        int                 retries = 330;
-
-        init_waitqueue_head(&waitq);
-
-        while ((atomic_read(&mnt->mnt_count) > 1) && (retries > 0)) {
-                LCONSOLE_WARN("Mount still busy with %d refs, waiting for "
-                              "%d secs...\n",
-                              atomic_read(&mnt->mnt_count), retries);
-
-                /* Wait for a bit */
-                retries -= 5;
-                lwi = LWI_TIMEOUT(5 * HZ, NULL, NULL);
-                l_wait_event(waitq, 0, &lwi);
-        }
-        if (atomic_read(&mnt->mnt_count) > 1) {
-                CERROR("Mount %p is still busy (%d refs), giving up.\n",
-                       mnt, atomic_read(&mnt->mnt_count));
-        }
-}
-
-static void server_put_super(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct obd_device     *obd;
-        struct vfsmount       *mnt = lsi->lsi_srv_mnt;
-        char *tmpname, *extraname = NULL;
-        int tmpname_sz;
-        int lddflags = lsi->lsi_ldd->ldd_flags;
-        int lsiflags = lsi->lsi_flags;
-        int rc;
-        ENTRY;
-
-        LASSERT(lsiflags & LSI_SERVER);
-
-        tmpname_sz = strlen(lsi->lsi_ldd->ldd_svname) + 1;
-        OBD_ALLOC(tmpname, tmpname_sz);
-        memcpy(tmpname, lsi->lsi_ldd->ldd_svname, tmpname_sz);
-        CDEBUG(D_MOUNT, "server put_super %s\n", tmpname);
-
-        /* Stop the target */
-        if (IS_MDT(lsi->lsi_ldd) || IS_OST(lsi->lsi_ldd)) {
-                struct lustre_profile *lprof = NULL;
-
-                /* tell the mgc to drop the config log */
-                lustre_end_log(sb, lsi->lsi_ldd->ldd_svname, NULL);
-
-                /* COMPAT_146 - profile may get deleted in mgc_cleanup.
-                   If there are any setup/cleanup errors, save the lov
-                   name for safety cleanup later. */
-                lprof = class_get_profile(lsi->lsi_ldd->ldd_svname);
-                if (lprof && lprof->lp_osc) {
-                        OBD_ALLOC(extraname, strlen(lprof->lp_osc) + 1);
-                        strcpy(extraname, lprof->lp_osc);
-                }
-
-                obd = class_name2obd(lsi->lsi_ldd->ldd_svname);
-                if (obd) {
-                        CDEBUG(D_MOUNT, "stopping %s\n", obd->obd_name);
-                        if (lsi->lsi_flags & LSI_UMOUNT_FAILOVER)
-                                obd->obd_fail = 1;
-                        /* We can't seem to give an error return code
-                         * to .put_super, so we better make sure we clean up! */
-                        obd->obd_force = 1;
-                        class_manual_cleanup(obd);
-                } else {
-                        CERROR("no obd %s\n", lsi->lsi_ldd->ldd_svname);
-                        server_deregister_mount(lsi->lsi_ldd->ldd_svname);
-                }
-
-        }
-
-        /* If they wanted the mgs to stop separately from the mdt, they
-           should have put it on a different device. */
-        if (IS_MGS(lsi->lsi_ldd)) {
-                /* stop the mgc before the mgs so the connection gets cleaned
-                   up */
-                lustre_stop_mgc(sb);
-                server_stop_mgs(sb);
-        }
-
-        /* Clean the mgc and sb */
-        rc = lustre_common_put_super(sb);
-        /* FIXME how can I report a failure to umount? */
-
-        /* Wait for the targets to really clean up - can't exit (and let the
-           sb get destroyed) while the mount is still in use */
-        server_wait_finished(mnt);
-
-        /* drop the One True Mount */
-        unlock_mntput(mnt);
-
-        /* Stop the servers (MDS, OSS) if no longer needed.  We must wait
-           until the target is really gone so that our type refcount check
-           is right. */
-        server_stop_servers(lddflags, lsiflags);
-
-        /* In case of startup or cleanup err, stop related obds */
-        if (extraname) {
-                obd = class_name2obd(extraname);
-                if (obd) {
-                        CWARN("Cleaning orphaned obd %s\n", extraname);
-                        obd->obd_force = 1;
-                        class_manual_cleanup(obd);
-                }
-                OBD_FREE(extraname, strlen(extraname) + 1);
-        }
-
-        LCONSOLE_WARN("server umount %s complete\n", tmpname);
-        OBD_FREE(tmpname, tmpname_sz);
-        EXIT;
-}
-#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT
-static void server_umount_begin(struct vfsmount *vfsmnt, int flags)
-{
-        struct super_block *sb = vfsmnt->mnt_sb;
-#else
-static void server_umount_begin(struct super_block *sb)
-{
-#endif
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        ENTRY;
-
-#ifdef HAVE_UMOUNTBEGIN_VFSMOUNT
-        if (!(flags & MNT_FORCE)) {
-                EXIT;
-                return;
-        }
-#endif
-
-        CDEBUG(D_MOUNT, "umount -f\n");
-        /* umount = failover
-           umount -f = force
-           no third way to do non-force, non-failover */
-        lsi->lsi_flags &= ~LSI_UMOUNT_FAILOVER;
-        lsi->lsi_flags |= LSI_UMOUNT_FORCE;
-        EXIT;
-}
-
-#ifndef HAVE_STATFS_DENTRY_PARAM
-static int server_statfs (struct super_block *sb, struct kstatfs *buf)
-{
-#else
-static int server_statfs (struct dentry *dentry, struct kstatfs *buf)
-{
-        struct super_block *sb = dentry->d_sb;
-#endif
-        struct vfsmount *mnt = s2lsi(sb)->lsi_srv_mnt;
-        ENTRY;
-
-        if (mnt && mnt->mnt_sb && mnt->mnt_sb->s_op->statfs) {
-#ifdef HAVE_STATFS_DENTRY_PARAM
-                int rc = mnt->mnt_sb->s_op->statfs(mnt->mnt_root, buf);
-#else
-                int rc = mnt->mnt_sb->s_op->statfs(mnt->mnt_sb, buf);
-#endif
-                if (!rc) {
-                        buf->f_type = sb->s_magic;
-                        RETURN(0);
-                }
-        }
-
-        /* just return 0 */
-        buf->f_type = sb->s_magic;
-        buf->f_bsize = sb->s_blocksize;
-        buf->f_blocks = 1;
-        buf->f_bfree = 0;
-        buf->f_bavail = 0;
-        buf->f_files = 1;
-        buf->f_ffree = 0;
-        buf->f_namelen = NAME_MAX;
-        RETURN(0);
-}
-
-static int server_show_options(struct seq_file *seq, struct vfsmount *vfsmnt)
-{
-        struct vfsmount *mnt = s2lsi(vfsmnt->mnt_sb)->lsi_srv_mnt;
-        ENTRY;
-
-        if (mnt && mnt->mnt_sb && mnt->mnt_sb->s_op->show_options) {
-                int rc = mnt->mnt_sb->s_op->show_options(seq, mnt);
-                RETURN(rc);
-        }
-        RETURN(0);
-}
-
-static struct super_operations server_ops =
-{
-        .put_super      = server_put_super,
-        .umount_begin   = server_umount_begin, /* umount -f */
-        .statfs         = server_statfs,
-        .show_options   = server_show_options,
-};
-
-#define log2(n) ffz(~(n))
-#define LUSTRE_SUPER_MAGIC 0x0BD00BD1
-
-static int server_fill_super_common(struct super_block *sb)
-{
-        struct inode *root = 0;
-        ENTRY;
-
-        CDEBUG(D_MOUNT, "Server sb, dev=%d\n", (int)sb->s_dev);
-
-        sb->s_blocksize = 4096;
-        sb->s_blocksize_bits = log2(sb->s_blocksize);
-        sb->s_magic = LUSTRE_SUPER_MAGIC;
-        sb->s_maxbytes = 0; //PAGE_CACHE_MAXBYTES;
-        sb->s_flags |= MS_RDONLY;
-        sb->s_op = &server_ops;
-
-        root = new_inode(sb);
-        if (!root) {
-                CERROR("Can't make root inode\n");
-                RETURN(-EIO);
-        }
-
-        /* returns -EIO for every operation */
-        /* make_bad_inode(root); -- badness - can't umount */
-        /* apparently we need to be a directory for the mount to finish */
-        root->i_mode = S_IFDIR;
-
-        sb->s_root = d_alloc_root(root);
-        if (!sb->s_root) {
-                CERROR("Can't make root dentry\n");
-                iput(root);
-                RETURN(-EIO);
-        }
-
-        RETURN(0);
-}
-
-static int server_fill_super(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct vfsmount *mnt;
-        int rc;
-        ENTRY;
-
-        /* the One True Mount */
-        mnt = server_kernel_mount(sb);
-        if (IS_ERR(mnt)) {
-                rc = PTR_ERR(mnt);
-                CERROR("Unable to mount device %s: %d\n",
-                      lsi->lsi_lmd->lmd_dev, rc);
-                lustre_put_lsi(sb);
-                GOTO(out, rc);
-        }
-        lsi->lsi_srv_mnt = mnt;
-
-        LASSERT(lsi->lsi_ldd);
-        CDEBUG(D_MOUNT, "Found service %s for fs '%s' on device %s\n",
-               lsi->lsi_ldd->ldd_svname, lsi->lsi_ldd->ldd_fsname,
-               lsi->lsi_lmd->lmd_dev);
-
-        if (class_name2obd(lsi->lsi_ldd->ldd_svname)) {
-                LCONSOLE_ERROR_MSG(0x161, "The target named %s is already "
-                                   "running. Double-mount may have compromised "
-                                   "the disk journal.\n", 
-                                   lsi->lsi_ldd->ldd_svname);
-                unlock_mntput(mnt);
-                lustre_put_lsi(sb);
-                GOTO(out, rc = -EALREADY);
-        }
-
-        /* start MGS before MGC */
-        if (IS_MGS(lsi->lsi_ldd)) {
-                rc = server_start_mgs(sb);
-                if (rc)
-                        GOTO(out_mnt, rc);
-        }
-
-        rc = lustre_start_mgc(sb);
-        if (rc)
-                GOTO(out_mnt, rc);
-
-        /* Set up all obd devices for service */
-        if (!(lsi->lsi_lmd->lmd_flags & LMD_FLG_NOSVC) &&
-                (IS_OST(lsi->lsi_ldd) || IS_MDT(lsi->lsi_ldd))) {
-                rc = server_start_targets(sb, mnt);
-                if (rc < 0) {
-                        CERROR("Unable to start targets: %d\n", rc);
-                        GOTO(out_mnt, rc);
-                }
-        /* FIXME overmount client here,
-           or can we just start a client log and client_fill_super on this sb?
-           We need to make sure server_put_super gets called too - ll_put_super
-           calls lustre_common_put_super; check there for LSI_SERVER flag,
-           call s_p_s if so.
-           Probably should start client from new thread so we can return.
-           Client will not finish until all servers are connected.
-           Note - MGS-only server does NOT get a client, since there is no
-           lustre fs associated - the MGS is for all lustre fs's */
-        }
-
-        rc = server_fill_super_common(sb);
-        if (rc)
-                GOTO(out_mnt, rc);
-
-        LCONSOLE_WARN("Server %s on device %s has started\n",
-                      lsi->lsi_ldd->ldd_svname, lsi->lsi_lmd->lmd_dev);
-
-        RETURN(0);
-
-out_mnt:
-        server_put_super(sb);
-out:
-        RETURN(rc);
-}
-
-/* Get the index from the obd name.
-   rc = server type, or
-   rc < 0  on error
-   if endptr isn't NULL it is set to end of name */
-int server_name2index(char *svname, __u32 *idx, char **endptr)
-{
-        unsigned long index;
-        int rc;
-        char *dash = strchr(svname, '-');
-        if (!dash)
-                return(-EINVAL);
-
-        if (strncmp(dash + 1, "MDT", 3) == 0)
-                rc = LDD_F_SV_TYPE_MDT;
-        else if (strncmp(dash + 1, "OST", 3) == 0)
-                rc = LDD_F_SV_TYPE_OST;
-        else
-                return(-EINVAL);
-
-        index = simple_strtoul(dash + 4, endptr, 16);
-        *idx = index;
-        return rc;
-}
-
-/*************** mount common betweeen server and client ***************/
-
-/* Common umount */
-int lustre_common_put_super(struct super_block *sb)
-{
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MOUNT, "dropping sb %p\n", sb);
-
-        /* Drop a ref to the MGC */
-        rc = lustre_stop_mgc(sb);
-        if (rc && (rc != -ENOENT)) {
-                if (rc != -EBUSY) {
-                        CERROR("Can't stop MGC: %d\n", rc);
-                        RETURN(rc);
-                }
-                /* BUSY just means that there's some other obd that
-                   needs the mgc.  Let him clean it up. */
-                CDEBUG(D_MOUNT, "MGC still in use\n");
-        }
-        /* Drop a ref to the mounted disk */
-        lustre_put_lsi(sb);
-        RETURN(rc);
-}
-
-static void lmd_print(struct lustre_mount_data *lmd)
-{
-        int i;
-
-        PRINT_CMD(PRINT_MASK, "  mount data:\n");
-        if (lmd_is_client(lmd))
-                PRINT_CMD(PRINT_MASK, "profile: %s\n", lmd->lmd_profile);
-        PRINT_CMD(PRINT_MASK, "device:  %s\n", lmd->lmd_dev);
-        PRINT_CMD(PRINT_MASK, "flags:   %x\n", lmd->lmd_flags);
-        if (lmd->lmd_opts)
-                PRINT_CMD(PRINT_MASK, "options: %s\n", lmd->lmd_opts);
-        for (i = 0; i < lmd->lmd_exclude_count; i++) {
-                PRINT_CMD(PRINT_MASK, "exclude %d:  OST%04x\n", i,
-                          lmd->lmd_exclude[i]);
-        }
-}
-
-/* Is this server on the exclusion list */
-int lustre_check_exclusion(struct super_block *sb, char *svname)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-        struct lustre_mount_data *lmd = lsi->lsi_lmd;
-        __u32 index;
-        int i, rc;
-        ENTRY;
-
-        rc = server_name2index(svname, &index, NULL);
-        if (rc != LDD_F_SV_TYPE_OST)
-                /* Only exclude OSTs */
-                RETURN(0);
-
-        CDEBUG(D_MOUNT, "Check exclusion %s (%d) in %d of %s\n", svname,
-               index, lmd->lmd_exclude_count, lmd->lmd_dev);
-
-        for(i = 0; i < lmd->lmd_exclude_count; i++) {
-                if (index == lmd->lmd_exclude[i]) {
-                        CWARN("Excluding %s (on exclusion list)\n", svname);
-                        RETURN(1);
-                }
-        }
-        RETURN(0);
-}
-
-/* mount -v  -o exclude=lustre-OST0001:lustre-OST0002 -t lustre ... */
-static int lmd_make_exclusion(struct lustre_mount_data *lmd, char *ptr)
-{
-        char *s1 = ptr, *s2;
-        __u32 index, *exclude_list;
-        int rc = 0, devmax;
-        ENTRY;
-
-        /* The shortest an ost name can be is 8 chars: -OST0000.
-           We don't actually know the fsname at this time, so in fact
-           a user could specify any fsname. */
-        devmax = strlen(ptr) / 8 + 1;
-
-        /* temp storage until we figure out how many we have */
-        OBD_ALLOC(exclude_list, sizeof(index) * devmax);
-        if (!exclude_list)
-                RETURN(-ENOMEM);
-
-        /* we enter this fn pointing at the '=' */
-        while (*s1 && *s1 != ' ' && *s1 != ',') {
-                s1++;
-                rc = server_name2index(s1, &index, &s2);
-                if (rc < 0) {
-                        CERROR("Can't parse server name '%s'\n", s1);
-                        break;
-                }
-                if (rc == LDD_F_SV_TYPE_OST)
-                        exclude_list[lmd->lmd_exclude_count++] = index;
-                else
-                        CDEBUG(D_MOUNT, "ignoring exclude %.7s\n", s1);
-                s1 = s2;
-                /* now we are pointing at ':' (next exclude)
-                   or ',' (end of excludes) */
-
-                if (lmd->lmd_exclude_count >= devmax)
-                        break;
-        }
-        if (rc >= 0) /* non-err */
-                rc = 0;
-
-        if (lmd->lmd_exclude_count) {
-                /* permanent, freed in lustre_free_lsi */
-                OBD_ALLOC(lmd->lmd_exclude, sizeof(index) *
-                          lmd->lmd_exclude_count);
-                if (lmd->lmd_exclude) {
-                        memcpy(lmd->lmd_exclude, exclude_list,
-                               sizeof(index) * lmd->lmd_exclude_count);
-                } else {
-                        rc = -ENOMEM;
-                        lmd->lmd_exclude_count = 0;
-                }
-        }
-        OBD_FREE(exclude_list, sizeof(index) * devmax);
-        RETURN(rc);
-}
-
-/* mount -v -t lustre uml1:uml2:/lustre-client /mnt/lustre */
-static int lmd_parse(char *options, struct lustre_mount_data *lmd)
-{
-        char *s1, *s2, *devname = NULL;
-        struct lustre_mount_data *raw = (struct lustre_mount_data *)options;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(lmd);
-        if (!options) {
-                LCONSOLE_ERROR_MSG(0x162, "Missing mount data: check that "
-                                   "/sbin/mount.lustre is installed.\n");
-                RETURN(-EINVAL);
-        }
-
-        /* Options should be a string - try to detect old lmd data */
-        if ((raw->lmd_magic & 0xffffff00) == (LMD_MAGIC & 0xffffff00)) {
-                LCONSOLE_ERROR_MSG(0x163, "You're using an old version of "
-                                   "/sbin/mount.lustre.  Please install "
-                                   "version %s\n", LUSTRE_VERSION_STRING);
-                RETURN(-EINVAL);
-        }
-        lmd->lmd_magic = LMD_MAGIC;
-
-        /* Set default flags here */
-
-        s1 = options;
-        while (*s1) {
-                int clear = 0;
-                /* Skip whitespace and extra commas */
-                while (*s1 == ' ' || *s1 == ',')
-                        s1++;
-
-                /* Client options are parsed in ll_options: eg. flock,
-                   user_xattr, acl */
-
-                /* Parse non-ldiskfs options here. Rather than modifying
-                   ldiskfs, we just zero these out here */
-                if (strncmp(s1, "abort_recov", 11) == 0) {
-                        lmd->lmd_flags |= LMD_FLG_ABORT_RECOV;
-                        clear++;
-                } else if (strncmp(s1, "nosvc", 5) == 0) {
-                        lmd->lmd_flags |= LMD_FLG_NOSVC;
-                        clear++;
-                /* ost exclusion list */
-                } else if (strncmp(s1, "exclude=", 8) == 0) {
-                        rc = lmd_make_exclusion(lmd, s1 + 7);
-                        if (rc)
-                                goto invalid;
-                        clear++;
-                }
-
-                /* Linux 2.4 doesn't pass the device, so we stuck it at the
-                   end of the options. */
-                else if (strncmp(s1, "device=", 7) == 0) {
-                        devname = s1 + 7;
-                        /* terminate options right before device.  device
-                           must be the last one. */
-                        *s1 = '\0';
-                        break;
-                }
-
-                /* Find next opt */
-                s2 = strchr(s1, ',');
-                if (s2 == NULL) {
-                        if (clear)
-                                *s1 = '\0';
-                        break;
-                }
-                s2++;
-                if (clear)
-                        memmove(s1, s2, strlen(s2) + 1);
-                else
-                        s1 = s2;
-        }
-
-        if (!devname) {
-                LCONSOLE_ERROR_MSG(0x164, "Can't find the device name "
-                                   "(need mount option 'device=...')\n");
-                goto invalid;
-        }
-
-        s1 = strrchr(devname, ':');
-        if (s1) {
-                lmd->lmd_flags = LMD_FLG_CLIENT;
-                /* Remove leading /s from fsname */
-                while (*++s1 == '/') ;
-                /* Freed in lustre_free_lsi */
-                OBD_ALLOC(lmd->lmd_profile, strlen(s1) + 8);
-                if (!lmd->lmd_profile)
-                        RETURN(-ENOMEM);
-                sprintf(lmd->lmd_profile, "%s-client", s1);
-        }
-
-        /* Freed in lustre_free_lsi */
-        OBD_ALLOC(lmd->lmd_dev, strlen(devname) + 1);
-        if (!lmd->lmd_dev)
-                RETURN(-ENOMEM);
-        strcpy(lmd->lmd_dev, devname);
-
-        /* Save mount options */
-        s1 = options + strlen(options) - 1;
-        while (s1 >= options && (*s1 == ',' || *s1 == ' '))
-                *s1-- = 0;
-        if (*options != 0) {
-                /* Freed in lustre_free_lsi */
-                OBD_ALLOC(lmd->lmd_opts, strlen(options) + 1);
-                if (!lmd->lmd_opts)
-                        RETURN(-ENOMEM);
-                strcpy(lmd->lmd_opts, options);
-        }
-
-        lmd->lmd_magic = LMD_MAGIC;
-
-        lmd_print(lmd);
-        RETURN(rc);
-
-invalid:
-        CERROR("Bad mount options %s\n", options);
-        RETURN(-EINVAL);
-}
-
-
-/* Common mount */
-int lustre_fill_super(struct super_block *sb, void *data, int silent)
-{
-        struct lustre_mount_data *lmd;
-        struct lustre_sb_info *lsi;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_MOUNT|D_VFSTRACE, "VFS Op: sb %p\n", sb);
-
-        lsi = lustre_init_lsi(sb);
-        if (!lsi)
-                RETURN(-ENOMEM);
-        lmd = lsi->lsi_lmd;
-
-        /* Figure out the lmd from the mount options */
-        if (lmd_parse((char *)data, lmd)) {
-                lustre_put_lsi(sb);
-                RETURN(-EINVAL);
-        }
-
-        if (lmd_is_client(lmd)) {
-                CDEBUG(D_MOUNT, "Mounting client %s\n", lmd->lmd_profile);
-                if (!client_fill_super) {
-                        LCONSOLE_ERROR_MSG(0x165, "Nothing registered for "
-                                           "client mount! Is the 'lustre' "
-                                           "module loaded?\n");
-                        rc = -ENODEV;
-                } else {
-                        rc = lustre_start_mgc(sb);
-                        if (rc) {
-                                lustre_stop_mgc(sb);
-                                goto out;
-                        }
-                        /* Connect and start */
-                        /* (should always be ll_fill_super) */
-                        rc = (*client_fill_super)(sb);
-                        /* c_f_s will call lustre_common_put_super on failure */
-
-                }
-        } else {
-                CDEBUG(D_MOUNT, "Mounting server from %s\n", lmd->lmd_dev);
-                lsi->lsi_flags |= LSI_SERVER;
-                rc = server_fill_super(sb);
-                /* s_f_s calls lustre_start_mgc after the mount because we need
-                   the MGS nids which are stored on disk.  Plus, we may
-                   need to start the MGS first. */
-                /* s_f_s will call server_put_super on failure */
-        }
-
-out:
-        if (rc){
-                CERROR("Unable to mount %s (%d)\n",
-                       s2lsi(sb) ? lmd->lmd_dev : "", rc);
-        } else {
-                CDEBUG(D_SUPER, "mount %s complete\n", lmd->lmd_dev);
-        }
-        RETURN(rc);
-}
-
-
-/* We can't call ll_fill_super by name because it lives in a module that
-   must be loaded after this one. */
-void lustre_register_client_fill_super(int (*cfs)(struct super_block *sb))
-{
-        client_fill_super = cfs;
-}
-
-void lustre_register_kill_super_cb(void (*cfs)(struct super_block *sb))
-{
-        kill_super_cb = cfs;
-}
-
-/***************** FS registration ******************/
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-/* 2.5 and later */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18))
-struct super_block * lustre_get_sb(struct file_system_type *fs_type,
-                               int flags, const char *devname, void * data)
-{
-        /* calls back in fill super */
-        /* we could append devname= onto options (*data) here,
-           but 2.4 doesn't get devname.  So we do it in mount_lustre.c */
-        return get_sb_nodev(fs_type, flags, data, lustre_fill_super);
-}
-#else
-int lustre_get_sb(struct file_system_type *fs_type,
-                               int flags, const char *devname, void * data,
-                               struct vfsmount *mnt)
-{
-        /* calls back in fill super */
-        /* we could append devname= onto options (*data) here,
-           but 2.4 doesn't get devname.  So we do it in mount_lustre.c */
-        return get_sb_nodev(fs_type, flags, data, lustre_fill_super, mnt);
-}
-#endif
-
-void lustre_kill_super(struct super_block *sb)
-{
-        struct lustre_sb_info *lsi = s2lsi(sb);
-
-        if (kill_super_cb && lsi && !(lsi->lsi_flags & LSI_SERVER))
-                (*kill_super_cb)(sb);
-
-        kill_anon_super(sb);
-}
-
-struct file_system_type lustre_fs_type = {
-        .owner        = THIS_MODULE,
-        .name         = "lustre",
-        .get_sb       = lustre_get_sb,
-        .kill_sb      = lustre_kill_super,
-        .fs_flags     = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV,
-};
-
-#else
-/* 2.4 */
-static struct super_block *lustre_read_super(struct super_block *sb,
-                                             void *data, int silent)
-{
-        int rc;
-        ENTRY;
-
-        rc = lustre_fill_super(sb, data, silent);
-        if (rc)
-                RETURN(NULL);
-        RETURN(sb);
-}
-
-static struct file_system_type lustre_fs_type = {
-        .owner          = THIS_MODULE,
-        .name           = "lustre",
-        .fs_flags       = FS_NFSEXP_FSID,
-        .read_super     = lustre_read_super,
-};
-#endif
-
-int lustre_register_fs(void)
-{
-        return register_filesystem(&lustre_fs_type);
-}
-
-int lustre_unregister_fs(void)
-{
-        return unregister_filesystem(&lustre_fs_type);
-}
-
-EXPORT_SYMBOL(lustre_register_client_fill_super);
-EXPORT_SYMBOL(lustre_register_kill_super_cb);
-EXPORT_SYMBOL(lustre_common_put_super);
-EXPORT_SYMBOL(lustre_process_log);
-EXPORT_SYMBOL(lustre_end_log);
-EXPORT_SYMBOL(server_get_mount);
-EXPORT_SYMBOL(server_put_mount);
-EXPORT_SYMBOL(server_register_target);
-EXPORT_SYMBOL(server_name2index);
-EXPORT_SYMBOL(server_mti_print);
-EXPORT_SYMBOL(do_lcfg);
-
-
diff --git a/lustre/obdclass/obdo.c b/lustre/obdclass/obdo.c
deleted file mode 100644
index 6b61657ad6e64723dcb5690168e1ffd8ca5985d5..0000000000000000000000000000000000000000
--- a/lustre/obdclass/obdo.c
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Object Devices Class Driver
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * These are the only exported functions, they provide some generic
- * infrastructure for managing object devices
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#else
-#include <obd_class.h>
-#include <lustre/lustre_idl.h>
-#endif
-
-void obdo_cpy_md(struct obdo *dst, struct obdo *src, obd_flag valid)
-{
-#ifdef __KERNEL__
-        CLASSERT(sizeof(struct lustre_handle) +
-                 sizeof(struct llog_cookie) <= sizeof(src->o_inline));
-        
-        CDEBUG(D_INODE, "src obdo "LPX64" valid "LPX64", dst obdo "LPX64"\n",
-               src->o_id, src->o_valid, dst->o_id);
-#endif
-        if (valid & OBD_MD_FLATIME)
-                dst->o_atime = src->o_atime;
-        if (valid & OBD_MD_FLMTIME)
-                dst->o_mtime = src->o_mtime;
-        if (valid & OBD_MD_FLCTIME)
-                dst->o_ctime = src->o_ctime;
-        if (valid & OBD_MD_FLSIZE)
-                dst->o_size = src->o_size;
-        if (valid & OBD_MD_FLBLOCKS) /* allocation of space */
-                dst->o_blocks = src->o_blocks;
-        if (valid & OBD_MD_FLBLKSZ)
-                dst->o_blksize = src->o_blksize;
-        if (valid & OBD_MD_FLTYPE)
-                dst->o_mode = (dst->o_mode & ~S_IFMT) | (src->o_mode & S_IFMT);
-        if (valid & OBD_MD_FLMODE)
-                dst->o_mode = (dst->o_mode & S_IFMT) | (src->o_mode & ~S_IFMT);
-        if (valid & OBD_MD_FLUID)
-                dst->o_uid = src->o_uid;
-        if (valid & OBD_MD_FLGID)
-                dst->o_gid = src->o_gid;
-        if (valid & OBD_MD_FLFLAGS)
-                dst->o_flags = src->o_flags;
-        if (valid & OBD_MD_FLGENER)
-                dst->o_generation = src->o_generation;
-        if (valid & OBD_MD_FLINLINE)
-                memcpy(dst->o_inline, src->o_inline, sizeof(src->o_inline));
-
-        dst->o_valid |= valid;
-}
-EXPORT_SYMBOL(obdo_cpy_md);
-
-void obdo_to_ioobj(struct obdo *oa, struct obd_ioobj *ioobj)
-{
-        ioobj->ioo_id = oa->o_id;
-        if (oa->o_valid & OBD_MD_FLGROUP)
-                ioobj->ioo_gr = oa->o_gr;
-        else 
-                ioobj->ioo_gr = 0;
-        ioobj->ioo_type = oa->o_mode;
-}
-EXPORT_SYMBOL(obdo_to_ioobj);
diff --git a/lustre/obdclass/statfs_pack.c b/lustre/obdclass/statfs_pack.c
deleted file mode 100644
index 8e20f850a4fa7e84eaccf3843694b3f64c2ed4bb..0000000000000000000000000000000000000000
--- a/lustre/obdclass/statfs_pack.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * (Un)packing of OST/MDS requests
- *
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <lustre_export.h>
-#include <lustre_net.h>
-#include <obd_support.h>
-#include <obd_class.h>
-
-void statfs_pack(struct obd_statfs *osfs, struct kstatfs *sfs)
-{
-        memset(osfs, 0, sizeof(*osfs));
-        osfs->os_type = sfs->f_type;
-        osfs->os_blocks = sfs->f_blocks;
-        osfs->os_bfree = sfs->f_bfree;
-        osfs->os_bavail = sfs->f_bavail;
-        osfs->os_files = sfs->f_files;
-        osfs->os_ffree = sfs->f_ffree;
-        osfs->os_bsize = sfs->f_bsize;
-        osfs->os_namelen = sfs->f_namelen;
-}
-
-void statfs_unpack(struct kstatfs *sfs, struct obd_statfs *osfs)
-{
-        memset(sfs, 0, sizeof(*sfs));
-        sfs->f_type = osfs->os_type;
-        sfs->f_blocks = osfs->os_blocks;
-        sfs->f_bfree = osfs->os_bfree;
-        sfs->f_bavail = osfs->os_bavail;
-        sfs->f_files = osfs->os_files;
-        sfs->f_ffree = osfs->os_ffree;
-        sfs->f_bsize = osfs->os_bsize;
-        sfs->f_namelen = osfs->os_namelen;
-}
-
-EXPORT_SYMBOL(statfs_pack);
-EXPORT_SYMBOL(statfs_unpack);
diff --git a/lustre/obdclass/uuid.c b/lustre/obdclass/uuid.c
deleted file mode 100644
index 5783e09f733fef892dba9e6d6217ceedfb2d5bb7..0000000000000000000000000000000000000000
--- a/lustre/obdclass/uuid.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Public include file for the UUID library
- *
- * Copyright (C) 2007 Cluster File System
- */
-
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#ifndef __KERNEL__
-# include <liblustre.h>
-#else
-# include <libcfs/kp30.h>
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-
-
-static inline __u32 consume(int nob, __u8 **ptr)
-{
-	__u32 value;
-
-	LASSERT(nob <= sizeof value);
-
-	for (value = 0; nob > 0; --nob)
-		value = (value << 8) | *((*ptr)++);
-	return value;
-}
-
-#define CONSUME(val, ptr) (val) = consume(sizeof(val), (ptr))
-
-static void uuid_unpack(class_uuid_t in, __u16 *uu, int nr)
-{
-        __u8 *ptr = in;
-
-	LASSERT(nr * sizeof *uu == sizeof(class_uuid_t));
-
-	while (nr-- > 0)
-		CONSUME(uu[nr], &ptr);
-}
-
-void class_uuid_unparse(class_uuid_t uu, struct obd_uuid *out)
-{
-	/* uu as an array of __u16's */
-        __u16 uuid[sizeof(class_uuid_t) / sizeof(__u16)];
-
-	CLASSERT(ARRAY_SIZE(uuid) == 8);
-
-        uuid_unpack(uu, uuid, ARRAY_SIZE(uuid));
-        sprintf(out->uuid, "%04x%04x-%04x-%04x-%04x-%04x%04x%04x",
-		uuid[0], uuid[1], uuid[2], uuid[3],
-		uuid[4], uuid[5], uuid[6], uuid[7]);
-}
diff --git a/lustre/obdecho/.cvsignore b/lustre/obdecho/.cvsignore
deleted file mode 100644
index 5d26f004c3ff3840392e34cb4aaed5287963f9a1..0000000000000000000000000000000000000000
--- a/lustre/obdecho/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
diff --git a/lustre/obdecho/Info.plist b/lustre/obdecho/Info.plist
deleted file mode 100644
index 19a6096e1596d3d134fd27994e0c6a52a72648ef..0000000000000000000000000000000000000000
--- a/lustre/obdecho/Info.plist
+++ /dev/null
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>obdecho</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.clusterfs.lustre.obdecho</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>KEXT</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.1</string> 
-	<key>OSBundleCompatibleVersion</key> 
-	<string>1.0.0</string>
-	<key>OSBundleLibraries</key>
-	<dict> 
-		<key>com.apple.kpi.bsd</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.libkern</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.mach</key>
-		<string>8.0.0b1</string>
-                <key>com.apple.kpi.unsupported</key>
-		<string>8.0.0b1</string>
-		<key>com.clusterfs.lustre.libcfs</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.lvfs</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.obdclass</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.ptlrpc</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.osc</key> 
-		<string>1.0.0</string>
-	</dict>
-</dict>
-</plist>
diff --git a/lustre/obdecho/Makefile.in b/lustre/obdecho/Makefile.in
deleted file mode 100644
index 66e61ed8a9abc9e9a8b27d3cc0354611aa6861b9..0000000000000000000000000000000000000000
--- a/lustre/obdecho/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := obdecho
-obdecho-objs := echo.o echo_client.o lproc_echo.o
-
-@INCLUDE_RULES@
diff --git a/lustre/obdecho/autoMakefile.am b/lustre/obdecho/autoMakefile.am
deleted file mode 100644
index d08aa571a9fbe339ea1d24c737272a6f0987fc94..0000000000000000000000000000000000000000
--- a/lustre/obdecho/autoMakefile.am
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if LIBLUSTRE
-noinst_LIBRARIES = libobdecho.a
-libobdecho_a_SOURCES = echo_client.c 
-libobdecho_a_CPPFLAGS = $(LLCPPFLAGS)
-libobdecho_a_CFLAGS = $(LLCFLAGS)
-endif
-
-if MODULES
-if LINUX
-modulefs_DATA = obdecho$(KMODEXT)
-endif
-
-if DARWIN
-macos_PROGRAMS := obdecho
-obdecho_SOURCES := \
-        lproc_echo.c \
-        echo.c \
-        echo_client.c
-
-obdecho_CFLAGS := $(EXTRA_KCFLAGS)
-obdecho_LDFLAGS := $(EXTRA_KLDFLAGS)
-obdecho_LDADD := $(EXTRA_KLIBS)
-
-plist_DATA := Info.plist
-
-install_data_hook := fix-kext-ownership
-
-endif # darwin
-
-endif # MODULES
-
-install-data-hook: $(install_data_hook)
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES = $(obdecho-objs:%.o=%.c)
diff --git a/lustre/obdecho/echo.c b/lustre/obdecho/echo.c
deleted file mode 100644
index f8f9826b87878478531622e60b13eac9ffdef47f..0000000000000000000000000000000000000000
--- a/lustre/obdecho/echo.c
+++ /dev/null
@@ -1,620 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#define DEBUG_SUBSYSTEM S_ECHO
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <obd_echo.h>
-#include <lustre_debug.h>
-#include <lustre_dlm.h>
-#include <lprocfs_status.h>
-
-#define ECHO_INIT_OBJID      0x1000000000000000ULL
-#define ECHO_HANDLE_MAGIC    0xabcd0123fedc9876ULL
-
-#define ECHO_PERSISTENT_PAGES (ECHO_PERSISTENT_SIZE >> CFS_PAGE_SHIFT)
-static cfs_page_t *echo_persistent_pages[ECHO_PERSISTENT_PAGES];
-
-enum {
-        LPROC_ECHO_READ_BYTES = 1,
-        LPROC_ECHO_WRITE_BYTES = 2,
-        LPROC_ECHO_LAST = LPROC_ECHO_WRITE_BYTES +1
-};
-
-static int echo_connect(struct lustre_handle *conn, struct obd_device *obd,
-                        struct obd_uuid *cluuid, struct obd_connect_data *data,
-                        void *localdata)
-{
-        data->ocd_connect_flags &= ECHO_CONNECT_SUPPORTED;
-        return class_connect(conn, obd, cluuid);
-}
-
-static int echo_disconnect(struct obd_export *exp)
-{
-        LASSERT (exp != NULL);
-
-        ldlm_cancel_locks_for_export(exp);
-
-        /* complete all outstanding replies */
-        spin_lock(&exp->exp_lock);
-        while (!list_empty(&exp->exp_outstanding_replies)) {
-                struct ptlrpc_reply_state *rs =
-                        list_entry(exp->exp_outstanding_replies.next,
-                                   struct ptlrpc_reply_state, rs_exp_list);
-                struct ptlrpc_service *svc = rs->rs_service;
-
-                spin_lock(&svc->srv_lock);
-                list_del_init(&rs->rs_exp_list);
-                ptlrpc_schedule_difficult_reply(rs);
-                spin_unlock(&svc->srv_lock);
-        }
-        spin_unlock(&exp->exp_lock);
-
-        return class_disconnect(exp);
-}
-
-static int echo_destroy_export(struct obd_export *exp)
-{
-        ENTRY;
-
-        target_destroy_export(exp);
-
-        RETURN(0);
-}
-
- static __u64 echo_next_id(struct obd_device *obddev)
-{
-        obd_id id;
-
-        spin_lock(&obddev->u.echo.eo_lock);
-        id = ++obddev->u.echo.eo_lastino;
-        spin_unlock(&obddev->u.echo.eo_lock);
-
-        return id;
-}
-
-int echo_create(struct obd_export *exp, struct obdo *oa,
-                struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-
-        if (!obd) {
-                CERROR("invalid client cookie "LPX64"\n",
-                       exp->exp_handle.h_cookie);
-                return -EINVAL;
-        }
-
-        if (!(oa->o_mode && S_IFMT)) {
-                CERROR("echo obd: no type!\n");
-                return -ENOENT;
-        }
-
-        if (!(oa->o_valid & OBD_MD_FLTYPE)) {
-                CERROR("invalid o_valid "LPX64"\n", oa->o_valid);
-                return -EINVAL;
-        }
-
-        oa->o_id = echo_next_id(obd);
-        oa->o_valid = OBD_MD_FLID;
-
-        return 0;
-}
-
-int echo_destroy(struct obd_export *exp, struct obdo *oa,
-                 struct lov_stripe_md *ea, struct obd_trans_info *oti, 
-                 struct obd_export *md_exp)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-
-        ENTRY;
-        if (!obd) {
-                CERROR("invalid client cookie "LPX64"\n",
-                       exp->exp_handle.h_cookie);
-                RETURN(-EINVAL);
-        }
-
-        if (!(oa->o_valid & OBD_MD_FLID)) {
-                CERROR("obdo missing FLID valid flag: "LPX64"\n", oa->o_valid);
-                RETURN(-EINVAL);
-        }
-
-        if (oa->o_id > obd->u.echo.eo_lastino || oa->o_id < ECHO_INIT_OBJID) {
-                CERROR("bad destroy objid: "LPX64"\n", oa->o_id);
-                RETURN(-EINVAL);
-        }
-
-        RETURN(0);
-}
-
-static int echo_getattr(struct obd_export *exp, struct obd_info *oinfo)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        obd_id id = oinfo->oi_oa->o_id;
-
-        ENTRY;
-        if (!obd) {
-                CERROR("invalid client cookie "LPX64"\n",
-                       exp->exp_handle.h_cookie);
-                RETURN(-EINVAL);
-        }
-
-        if (!(oinfo->oi_oa->o_valid & OBD_MD_FLID)) {
-                CERROR("obdo missing FLID valid flag: "LPX64"\n", 
-                       oinfo->oi_oa->o_valid);
-                RETURN(-EINVAL);
-        }
-
-        obdo_cpy_md(oinfo->oi_oa, &obd->u.echo.eo_oa, oinfo->oi_oa->o_valid);
-        oinfo->oi_oa->o_id = id;
-
-        RETURN(0);
-}
-
-static int echo_setattr(struct obd_export *exp, struct obd_info *oinfo,
-                        struct obd_trans_info *oti)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-
-        ENTRY;
-        if (!obd) {
-                CERROR("invalid client cookie "LPX64"\n",
-                       exp->exp_handle.h_cookie);
-                RETURN(-EINVAL);
-        }
-
-        if (!(oinfo->oi_oa->o_valid & OBD_MD_FLID)) {
-                CERROR("obdo missing FLID valid flag: "LPX64"\n", 
-                       oinfo->oi_oa->o_valid);
-                RETURN(-EINVAL);
-        }
-
-        memcpy(&obd->u.echo.eo_oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
-
-        if (oinfo->oi_oa->o_id & 4) {
-                /* Save lock to force ACKed reply */
-                ldlm_lock_addref (&obd->u.echo.eo_nl_lock, LCK_NL);
-                oti->oti_ack_locks[0].mode = LCK_NL;
-                oti->oti_ack_locks[0].lock = obd->u.echo.eo_nl_lock;
-        }
-
-        RETURN(0);
-}
-
-static void
-echo_page_debug_setup(cfs_page_t *page, int rw, obd_id id,
-                      __u64 offset, int len)
-{
-        int   page_offset = offset & ~CFS_PAGE_MASK;
-        char *addr        = ((char *)cfs_kmap(page)) + page_offset;
-
-        if (len % OBD_ECHO_BLOCK_SIZE != 0)
-                CERROR("Unexpected block size %d\n", len);
-
-        while (len > 0) {
-                if (rw & OBD_BRW_READ)
-                        block_debug_setup(addr, OBD_ECHO_BLOCK_SIZE,
-                                          offset, id);
-                else
-                        block_debug_setup(addr, OBD_ECHO_BLOCK_SIZE,
-                                          0xecc0ecc0ecc0ecc0ULL,
-                                          0xecc0ecc0ecc0ecc0ULL);
-
-                addr   += OBD_ECHO_BLOCK_SIZE;
-                offset += OBD_ECHO_BLOCK_SIZE;
-                len    -= OBD_ECHO_BLOCK_SIZE;
-        }
-
-        cfs_kunmap(page);
-}
-
-static int
-echo_page_debug_check(cfs_page_t *page, obd_id id,
-                      __u64 offset, int len)
-{
-        int   page_offset = offset & ~CFS_PAGE_MASK;
-        char *addr        = ((char *)cfs_kmap(page)) + page_offset;
-        int   rc          = 0;
-        int   rc2;
-
-        if (len % OBD_ECHO_BLOCK_SIZE != 0)
-                CERROR("Unexpected block size %d\n", len);
-
-        while (len > 0) {
-                rc2 = block_debug_check("echo", addr, OBD_ECHO_BLOCK_SIZE,
-                                        offset, id);
-
-                if (rc2 != 0 && rc == 0)
-                        rc = rc2;
-
-                addr   += OBD_ECHO_BLOCK_SIZE;
-                offset += OBD_ECHO_BLOCK_SIZE;
-                len    -= OBD_ECHO_BLOCK_SIZE;
-        }
-
-        cfs_kunmap(page);
-
-        return (rc);
-}
-
-/* This allows us to verify that desc_private is passed unmolested */
-#define DESC_PRIV 0x10293847
-
-int echo_preprw(int cmd, struct obd_export *export, struct obdo *oa,
-                int objcount, struct obd_ioobj *obj, int niocount,
-                struct niobuf_remote *nb, struct niobuf_local *res,
-                struct obd_trans_info *oti)
-{
-        struct obd_device *obd;
-        struct niobuf_local *r = res;
-        int tot_bytes = 0;
-        int rc = 0;
-        int i;
-        ENTRY;
-
-        obd = export->exp_obd;
-        if (obd == NULL)
-                RETURN(-EINVAL);
-
-        /* Temp fix to stop falling foul of osc_announce_cached() */
-        oa->o_valid &= ~(OBD_MD_FLBLOCKS | OBD_MD_FLGRANT);
-
-        memset(res, 0, sizeof(*res) * niocount);
-
-        CDEBUG(D_PAGE, "%s %d obdos with %d IOs\n",
-               cmd == OBD_BRW_READ ? "reading" : "writing", objcount, niocount);
-
-        if (oti)
-                oti->oti_handle = (void *)DESC_PRIV;
-
-        for (i = 0; i < objcount; i++, obj++) {
-                int gfp_mask = (obj->ioo_id & 1) ? CFS_ALLOC_HIGHUSER : CFS_ALLOC_STD;
-                int ispersistent = obj->ioo_id == ECHO_PERSISTENT_OBJID;
-                int debug_setup = (!ispersistent &&
-                                   (oa->o_valid & OBD_MD_FLFLAGS) != 0 &&
-                                   (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0);
-                int j;
-
-                for (j = 0 ; j < obj->ioo_bufcnt ; j++, nb++, r++) {
-
-                        if (ispersistent &&
-                            (nb->offset >> CFS_PAGE_SHIFT) < ECHO_PERSISTENT_PAGES) {
-                                r->page = echo_persistent_pages[nb->offset >>
-                                                                CFS_PAGE_SHIFT];
-                                /* Take extra ref so __free_pages() can be called OK */
-                                cfs_get_page (r->page);
-                        } else {
-                                OBD_PAGE_ALLOC(r->page, gfp_mask);
-                                if (r->page == NULL) {
-                                        CERROR("can't get page %u/%u for id "
-                                               LPU64"\n",
-                                               j, obj->ioo_bufcnt, obj->ioo_id);
-                                        GOTO(preprw_cleanup, rc = -ENOMEM);
-                                }
-                        }
-
-                        tot_bytes += nb->len;
-
-                        atomic_inc(&obd->u.echo.eo_prep);
-
-                        r->offset = nb->offset;
-                        r->len = nb->len;
-                        LASSERT((r->offset & ~CFS_PAGE_MASK) + r->len <= CFS_PAGE_SIZE);
-
-                        CDEBUG(D_PAGE, "$$$$ get page %p @ "LPU64" for %d\n",
-                               r->page, r->offset, r->len);
-
-                        if (cmd & OBD_BRW_READ)
-                                r->rc = r->len;
-
-                        if (debug_setup)
-                                echo_page_debug_setup(r->page, cmd, obj->ioo_id,
-                                                      r->offset, r->len);
-                }
-        }
-        if (cmd & OBD_BRW_READ)
-                lprocfs_counter_add(obd->obd_stats, LPROC_ECHO_READ_BYTES,
-                                    tot_bytes);
-        else
-                lprocfs_counter_add(obd->obd_stats, LPROC_ECHO_WRITE_BYTES,
-                                    tot_bytes);
-
-        CDEBUG(D_PAGE, "%d pages allocated after prep\n",
-               atomic_read(&obd->u.echo.eo_prep));
-
-        RETURN(0);
-
-preprw_cleanup:
-        /* It is possible that we would rather handle errors by  allow
-         * any already-set-up pages to complete, rather than tearing them
-         * all down again.  I believe that this is what the in-kernel
-         * prep/commit operations do.
-         */
-        CERROR("cleaning up %ld pages (%d obdos)\n", (long)(r - res), objcount);
-        while (r-- > res) {
-                cfs_kunmap(r->page);
-                /* NB if this is a persistent page, __free_pages will just
-                 * lose the extra ref gained above */
-                OBD_PAGE_FREE(r->page);
-                atomic_dec(&obd->u.echo.eo_prep);
-        }
-        memset(res, 0, sizeof(*res) * niocount);
-
-        return rc;
-}
-
-int echo_commitrw(int cmd, struct obd_export *export, struct obdo *oa,
-                  int objcount, struct obd_ioobj *obj, int niocount,
-                  struct niobuf_local *res, struct obd_trans_info *oti, int rc)
-{
-        struct obd_device *obd;
-        struct niobuf_local *r = res;
-        int i, vrc = 0;
-        ENTRY;
-
-        obd = export->exp_obd;
-        if (obd == NULL)
-                RETURN(-EINVAL);
-
-        if (rc)
-                GOTO(commitrw_cleanup, rc);
-
-        if ((cmd & OBD_BRW_RWMASK) == OBD_BRW_READ) {
-                CDEBUG(D_PAGE, "reading %d obdos with %d IOs\n",
-                       objcount, niocount);
-        } else {
-                CDEBUG(D_PAGE, "writing %d obdos with %d IOs\n",
-                       objcount, niocount);
-        }
-
-        if (niocount && !r) {
-                CERROR("NULL res niobuf with niocount %d\n", niocount);
-                RETURN(-EINVAL);
-        }
-
-        LASSERT(oti == NULL || oti->oti_handle == (void *)DESC_PRIV);
-
-        for (i = 0; i < objcount; i++, obj++) {
-                int verify = (rc == 0 &&
-                              obj->ioo_id != ECHO_PERSISTENT_OBJID &&
-                              (oa->o_valid & OBD_MD_FLFLAGS) != 0 &&
-                              (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0);
-                int j;
-
-                for (j = 0 ; j < obj->ioo_bufcnt ; j++, r++) {
-                        cfs_page_t *page = r->page;
-                        void *addr;
-
-                        if (page == NULL) {
-                                CERROR("null page objid "LPU64":%p, buf %d/%d\n",
-                                       obj->ioo_id, page, j, obj->ioo_bufcnt);
-                                GOTO(commitrw_cleanup, rc = -EFAULT);
-                        }
-
-                        addr = cfs_kmap(page);
-
-                        CDEBUG(D_PAGE, "$$$$ use page %p, addr %p@"LPU64"\n",
-                               r->page, addr, r->offset);
-
-                        if (verify) {
-                                vrc = echo_page_debug_check(page, obj->ioo_id,
-                                                            r->offset, r->len);
-                                /* check all the pages always */
-                                if (vrc != 0 && rc == 0)
-                                        rc = vrc;
-                        }
-
-                        cfs_kunmap(page);
-                        /* NB see comment above regarding persistent pages */
-                        OBD_PAGE_FREE(page);
-                        atomic_dec(&obd->u.echo.eo_prep);
-                }
-        }
-        CDEBUG(D_PAGE, "%d pages remain after commit\n",
-               atomic_read(&obd->u.echo.eo_prep));
-        RETURN(rc);
-
-commitrw_cleanup:
-        CERROR("cleaning up %ld pages (%d obdos)\n",
-               niocount - (long)(r - res) - 1, objcount);
-        while (++r < res + niocount) {
-                cfs_page_t *page = r->page;
-
-                /* NB see comment above regarding persistent pages */
-                OBD_PAGE_FREE(page);
-                atomic_dec(&obd->u.echo.eo_prep);
-        }
-        return rc;
-}
-
-static int echo_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        int                        rc;
-        int                        lock_flags = 0;
-        struct ldlm_res_id         res_id = {.name = {1}};
-        ENTRY;
-
-        spin_lock_init(&obd->u.echo.eo_lock);
-        obd->u.echo.eo_lastino = ECHO_INIT_OBJID;
-
-        obd->obd_namespace = ldlm_namespace_new("echo-tgt",
-                                                LDLM_NAMESPACE_SERVER,
-                                                LDLM_NAMESPACE_GREEDY);
-        if (obd->obd_namespace == NULL) {
-                LBUG();
-                RETURN(-ENOMEM);
-        }
-
-        rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, LDLM_PLAIN, 
-                                    NULL, LCK_NL, &lock_flags, NULL, 
-                                    ldlm_completion_ast, NULL, NULL, 
-                                    0, NULL, &obd->u.echo.eo_nl_lock);
-        LASSERT (rc == ELDLM_OK);
-
-        lprocfs_echo_init_vars(&lvars);
-        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0 &&
-            lprocfs_alloc_obd_stats(obd, LPROC_ECHO_LAST) == 0) {
-                lprocfs_counter_init(obd->obd_stats, LPROC_ECHO_READ_BYTES,
-                                     LPROCFS_CNTR_AVGMINMAX,
-                                     "read_bytes", "bytes");
-                lprocfs_counter_init(obd->obd_stats, LPROC_ECHO_WRITE_BYTES,
-                                     LPROCFS_CNTR_AVGMINMAX,
-                                     "write_bytes", "bytes");
-        }
-
-        ptlrpc_init_client (LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL,
-                            "echo_ldlm_cb_client", &obd->obd_ldlm_client);
-        RETURN(0);
-}
-
-static int echo_cleanup(struct obd_device *obd)
-{
-        int leaked;
-        ENTRY;
-
-        lprocfs_obd_cleanup(obd);
-        lprocfs_free_obd_stats(obd);
-
-        ldlm_lock_decref (&obd->u.echo.eo_nl_lock, LCK_NL);
-
-        /* XXX Bug 3413; wait for a bit to ensure the BL callback has
-         * happened before calling ldlm_namespace_free() */
-        set_current_state (TASK_UNINTERRUPTIBLE);
-        cfs_schedule_timeout (CFS_TASK_UNINT, cfs_time_seconds(1));
-
-        ldlm_namespace_free(obd->obd_namespace, obd->obd_force);
-
-        leaked = atomic_read(&obd->u.echo.eo_prep);
-        if (leaked != 0)
-                CERROR("%d prep/commitrw pages leaked\n", leaked);
-
-        RETURN(0);
-}
-
-static struct obd_ops echo_obd_ops = {
-        .o_owner           = THIS_MODULE,
-        .o_connect         = echo_connect,
-        .o_disconnect      = echo_disconnect,
-        .o_destroy_export  = echo_destroy_export,
-        .o_create          = echo_create,
-        .o_destroy         = echo_destroy,
-        .o_getattr         = echo_getattr,
-        .o_setattr         = echo_setattr,
-        .o_preprw          = echo_preprw,
-        .o_commitrw        = echo_commitrw,
-        .o_setup           = echo_setup,
-        .o_cleanup         = echo_cleanup
-};
-
-extern int echo_client_init(void);
-extern void echo_client_exit(void);
-
-static void
-echo_persistent_pages_fini (void)
-{
-        int     i;
-
-        for (i = 0; i < ECHO_PERSISTENT_PAGES; i++)
-                if (echo_persistent_pages[i] != NULL) {
-                        OBD_PAGE_FREE(echo_persistent_pages[i]);
-                        echo_persistent_pages[i] = NULL;
-                }
-}
-
-static int
-echo_persistent_pages_init (void)
-{
-        cfs_page_t *pg;
-        int          i;
-
-        for (i = 0; i < ECHO_PERSISTENT_PAGES; i++) {
-                int gfp_mask = (i < ECHO_PERSISTENT_PAGES/2) ?
-                        CFS_ALLOC_STD : CFS_ALLOC_HIGHUSER;
-
-                OBD_PAGE_ALLOC(pg, gfp_mask);
-                if (pg == NULL) {
-                        echo_persistent_pages_fini ();
-                        return (-ENOMEM);
-                }
-
-                memset (cfs_kmap (pg), 0, CFS_PAGE_SIZE);
-                cfs_kunmap (pg);
-
-                echo_persistent_pages[i] = pg;
-        }
-
-        return (0);
-}
-
-static int __init obdecho_init(void)
-{
-        struct lprocfs_static_vars lvars;
-        int rc;
-
-        ENTRY;
-        printk(KERN_INFO "Lustre: Echo OBD driver; info@clusterfs.com\n");
-
-        LASSERT(CFS_PAGE_SIZE % OBD_ECHO_BLOCK_SIZE == 0);
-
-        lprocfs_echo_init_vars(&lvars);
-
-        rc = echo_persistent_pages_init ();
-        if (rc != 0)
-                goto failed_0;
-
-        rc = class_register_type(&echo_obd_ops, lvars.module_vars,
-                                 LUSTRE_ECHO_NAME);
-        if (rc != 0)
-                goto failed_1;
-
-        rc = echo_client_init();
-        if (rc == 0)
-                RETURN (0);
-
-        class_unregister_type(LUSTRE_ECHO_NAME);
- failed_1:
-        echo_persistent_pages_fini ();
- failed_0:
-        RETURN(rc);
-}
-
-static void /*__exit*/ obdecho_exit(void)
-{
-        echo_client_exit();
-        class_unregister_type(LUSTRE_ECHO_NAME);
-        echo_persistent_pages_fini ();
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Testing Echo OBD driver");
-MODULE_LICENSE("GPL");
-
-cfs_module(obdecho, "1.0.0", obdecho_init, obdecho_exit);
diff --git a/lustre/obdecho/echo_client.c b/lustre/obdecho/echo_client.c
deleted file mode 100644
index 050bf89613cbecc40a8386fb9bcd6716b3f298f7..0000000000000000000000000000000000000000
--- a/lustre/obdecho/echo_client.c
+++ /dev/null
@@ -1,1510 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_ECHO
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <obd_echo.h>
-#include <lustre_debug.h>
-#include <lprocfs_status.h>
-
-static obd_id last_object_id;
-
-#if 0
-static void
-echo_printk_object (char *msg, struct ec_object *eco)
-{
-        struct lov_stripe_md *lsm = eco->eco_lsm;
-        int                   i;
-
-        printk (KERN_INFO "Lustre: %s: object %p: "LPX64", refs %d%s: "LPX64
-                "=%u!%u\n", msg, eco, eco->eco_id, eco->eco_refcount,
-                eco->eco_deleted ? "(deleted) " : "",
-                lsm->lsm_object_id, lsm->lsm_stripe_size,
-                lsm->lsm_stripe_count);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++)
-                printk (KERN_INFO "Lustre:   @%2u:"LPX64"\n",
-                        lsm->lsm_oinfo[i].loi_ost_idx,
-                        lsm->lsm_oinfo[i].loi_id);
-}
-#endif
-
-static struct ec_object *
-echo_find_object_locked (struct obd_device *obd, obd_id id)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct ec_object       *eco = NULL;
-        struct list_head       *el;
-
-        list_for_each (el, &ec->ec_objects) {
-                eco = list_entry (el, struct ec_object, eco_obj_chain);
-
-                if (eco->eco_id == id)
-                        return (eco);
-        }
-        return (NULL);
-}
-
-static int
-echo_copyout_lsm (struct lov_stripe_md *lsm, void *_ulsm, int ulsm_nob)
-{
-        struct lov_stripe_md *ulsm = _ulsm;
-        int nob, i;
-
-        nob = offsetof (struct lov_stripe_md, lsm_oinfo[lsm->lsm_stripe_count]);
-        if (nob > ulsm_nob)
-                return (-EINVAL);
-
-        if (copy_to_user (ulsm, lsm, sizeof(ulsm)))
-                return (-EFAULT);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                if (copy_to_user (ulsm->lsm_oinfo[i], lsm->lsm_oinfo[i],
-                                  sizeof(lsm->lsm_oinfo[0])))
-                        return (-EFAULT);
-        }
-        return (0);
-}
-
-static int
-echo_copyin_lsm (struct obd_device *obd, struct lov_stripe_md *lsm,
-                 void *ulsm, int ulsm_nob)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        int                     i;
-
-        if (ulsm_nob < sizeof (*lsm))
-                return (-EINVAL);
-
-        if (copy_from_user (lsm, ulsm, sizeof (*lsm)))
-                return (-EFAULT);
-
-        if (lsm->lsm_stripe_count > ec->ec_nstripes ||
-            lsm->lsm_magic != LOV_MAGIC ||
-            (lsm->lsm_stripe_size & (~CFS_PAGE_MASK)) != 0 ||
-            ((__u64)lsm->lsm_stripe_size * lsm->lsm_stripe_count > ~0UL))
-                return (-EINVAL);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                if (copy_from_user(lsm->lsm_oinfo[i],
-                                   ((struct lov_stripe_md *)ulsm)->lsm_oinfo[i],
-                                   sizeof(lsm->lsm_oinfo[0])))
-                        return (-EFAULT);
-        }
-
-        return (0);
-}
-
-static struct ec_object *
-echo_allocate_object (struct obd_device *obd)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct ec_object       *eco;
-        int rc;
-
-        OBD_ALLOC(eco, sizeof (*eco));
-        if (eco == NULL)
-                return NULL;
-
-        rc = obd_alloc_memmd(ec->ec_exp, &eco->eco_lsm);
-        if (rc < 0) {
-                OBD_FREE(eco, sizeof (*eco));
-                return NULL;
-        }
-
-        eco->eco_device = obd;
-        eco->eco_deleted = 0;
-        eco->eco_refcount = 0;
-        eco->eco_lsm->lsm_magic = LOV_MAGIC;
-        /* leave stripe count 0 by default */
-
-        return (eco);
-}
-
-static void
-echo_free_object (struct ec_object *eco)
-{
-        struct obd_device      *obd = eco->eco_device;
-        struct echo_client_obd *ec = &obd->u.echo_client;
-
-        LASSERT (eco->eco_refcount == 0);
-        if (!eco->eco_lsm) 
-                CERROR("No object %s\n", obd->obd_name);
-        else 
-                obd_free_memmd(ec->ec_exp, &eco->eco_lsm);
-        OBD_FREE (eco, sizeof (*eco));
-}
-
-static int echo_create_object(struct obd_device *obd, int on_target,
-                              struct obdo *oa, void *ulsm, int ulsm_nob,
-                              struct obd_trans_info *oti)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct ec_object       *eco2;
-        struct ec_object       *eco;
-        struct lov_stripe_md   *lsm;
-        int                     rc;
-        int                     i, idx;
-
-        if ((oa->o_valid & OBD_MD_FLID) == 0 && /* no obj id */
-            (on_target ||                       /* set_stripe */
-             ec->ec_nstripes != 0)) {           /* LOV */
-                CERROR ("No valid oid\n");
-                return (-EINVAL);
-        }
-
-        if (ulsm != NULL) {
-                eco = echo_allocate_object (obd);
-                if (eco == NULL) 
-                        return (-ENOMEM);
-
-                lsm = eco->eco_lsm;
-
-                rc = echo_copyin_lsm (obd, lsm, ulsm, ulsm_nob);
-                if (rc != 0)
-                        goto failed;
-
-                /* setup object ID here for !on_target and LOV hint */
-                if ((oa->o_valid & OBD_MD_FLID) != 0)
-                        eco->eco_id = lsm->lsm_object_id = oa->o_id;
-
-                if (lsm->lsm_stripe_count == 0)
-                        lsm->lsm_stripe_count = ec->ec_nstripes;
-
-                if (lsm->lsm_stripe_size == 0)
-                        lsm->lsm_stripe_size = CFS_PAGE_SIZE;
-
-                idx = ll_rand();
-
-                /* setup stripes: indices + default ids if required */
-                for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                        if (lsm->lsm_oinfo[i]->loi_id == 0)
-                                lsm->lsm_oinfo[i]->loi_id = lsm->lsm_object_id;
-
-                        lsm->lsm_oinfo[i]->loi_ost_idx =
-                                (idx + i) % ec->ec_nstripes;
-                }
-        } else {
-                OBD_ALLOC(eco, sizeof(*eco));
-                if (!eco) 
-                        return (-ENOMEM);
-                eco->eco_device = obd;
-                lsm = NULL;
-        }
-
-        if (oa->o_id == 0)
-                oa->o_id = ++last_object_id;
-
-        if (on_target) {
-                oa->o_gr = FILTER_GROUP_ECHO;
-                oa->o_valid |= OBD_MD_FLGROUP;
-
-                rc = obd_create(ec->ec_exp, oa, &lsm, oti);
-                if (rc != 0)
-                        goto failed;
-
-                /* See what object ID we were given */
-                eco->eco_id = oa->o_id = lsm->lsm_object_id;
-                oa->o_valid |= OBD_MD_FLID;
-
-                LASSERT(eco->eco_lsm == NULL || eco->eco_lsm == lsm);
-                eco->eco_lsm = lsm;
-        }
-
-        spin_lock (&ec->ec_lock);
-
-        eco2 = echo_find_object_locked (obd, oa->o_id);
-        if (eco2 != NULL) {                     /* conflict */
-                spin_unlock (&ec->ec_lock);
-
-                CERROR ("Can't create object id "LPX64": id already exists%s\n",
-                        oa->o_id, on_target ? " (undoing create)" : "");
-
-                if (on_target)
-                        obd_destroy(ec->ec_exp, oa, lsm, oti, NULL);
-
-                rc = -EEXIST;
-                goto failed;
-        }
-
-        list_add (&eco->eco_obj_chain, &ec->ec_objects);
-        spin_unlock (&ec->ec_lock);
-        CDEBUG (D_INFO,
-                "created %p: "LPX64"=%u#%u@%u refs %d del %d\n",
-                eco, eco->eco_id,
-                eco->eco_lsm->lsm_stripe_size,
-                eco->eco_lsm->lsm_stripe_count,
-                eco->eco_lsm->lsm_oinfo[0]->loi_ost_idx,
-                eco->eco_refcount, eco->eco_deleted);
-        return (0);
-
- failed:
-        echo_free_object (eco);
-        if (rc) 
-                CERROR("%s: err %d on create\n", obd->obd_name, rc);
-        return (rc);
-}
-
-static int
-echo_get_object (struct ec_object **ecop, struct obd_device *obd,
-                 struct obdo *oa)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct ec_object       *eco;
-        struct ec_object       *eco2;
-        int                     rc;
-
-        if ((oa->o_valid & OBD_MD_FLID) == 0 ||
-            oa->o_id == 0)                      /* disallow use of object id 0 */
-        {
-                CERROR ("No valid oid\n");
-                return (-EINVAL);
-        }
-
-        spin_lock (&ec->ec_lock);
-        eco = echo_find_object_locked (obd, oa->o_id);
-        if (eco != NULL) {
-                if (eco->eco_deleted) {           /* being deleted */
-                        spin_unlock(&ec->ec_lock);/* (see comment in cleanup) */
-                        return (-EAGAIN);
-                }
-
-                eco->eco_refcount++;
-                spin_unlock (&ec->ec_lock);
-                *ecop = eco;
-                CDEBUG (D_INFO,
-                        "found %p: "LPX64"=%u#%u@%u refs %d del %d\n",
-                        eco, eco->eco_id,
-                        eco->eco_lsm->lsm_stripe_size,
-                        eco->eco_lsm->lsm_stripe_count,
-                        eco->eco_lsm->lsm_oinfo[0]->loi_ost_idx,
-                        eco->eco_refcount, eco->eco_deleted);
-                return (0);
-        }
-        spin_unlock (&ec->ec_lock);
-
-        if (ec->ec_nstripes != 0)               /* striping required */
-                return (-ENOENT);
-
-        eco = echo_allocate_object (obd);
-        if (eco == NULL)
-                return (-ENOMEM);
-
-        eco->eco_id = eco->eco_lsm->lsm_object_id = oa->o_id;
-
-        spin_lock (&ec->ec_lock);
-
-        eco2 = echo_find_object_locked (obd, oa->o_id);
-        if (eco2 == NULL) {                     /* didn't race */
-                list_add (&eco->eco_obj_chain, &ec->ec_objects);
-                spin_unlock (&ec->ec_lock);
-                eco->eco_refcount = 1;
-                *ecop = eco;
-                CDEBUG (D_INFO,
-                        "created %p: "LPX64"=%u#%u@%d refs %d del %d\n",
-                        eco, eco->eco_id,
-                        eco->eco_lsm->lsm_stripe_size,
-                        eco->eco_lsm->lsm_stripe_count,
-                        eco->eco_lsm->lsm_oinfo[0]->loi_ost_idx,
-                        eco->eco_refcount, eco->eco_deleted);
-                return (0);
-        }
-
-        if (eco2->eco_deleted)
-                rc = -EAGAIN;                   /* lose race */
-        else {
-                eco2->eco_refcount++;           /* take existing */
-                *ecop = eco2;
-                rc = 0;
-                LASSERT (eco2->eco_id == eco2->eco_lsm->lsm_object_id);
-                CDEBUG (D_INFO,
-                        "found(2) %p: "LPX64"=%u#%u@%d refs %d del %d\n",
-                        eco2, eco2->eco_id,
-                        eco2->eco_lsm->lsm_stripe_size,
-                        eco2->eco_lsm->lsm_stripe_count,
-                        eco2->eco_lsm->lsm_oinfo[0]->loi_ost_idx,
-                        eco2->eco_refcount, eco2->eco_deleted);
-        }
-
-        spin_unlock (&ec->ec_lock);
-
-        echo_free_object (eco);
-        return (rc);
-}
-
-static void
-echo_put_object (struct ec_object *eco)
-{
-        struct obd_device      *obd = eco->eco_device;
-        struct echo_client_obd *ec = &obd->u.echo_client;
-
-        /* Release caller's ref on the object.
-         * delete => mark for deletion when last ref goes
-         */
-
-        spin_lock (&ec->ec_lock);
-
-        eco->eco_refcount--;
-        LASSERT (eco->eco_refcount >= 0);
-
-        CDEBUG(D_INFO, "put %p: "LPX64"=%u#%u@%d refs %d del %d\n",
-               eco, eco->eco_id,
-               eco->eco_lsm->lsm_stripe_size,
-               eco->eco_lsm->lsm_stripe_count,
-               eco->eco_lsm->lsm_oinfo[0]->loi_ost_idx,
-               eco->eco_refcount, eco->eco_deleted);
-
-        if (eco->eco_refcount != 0 || !eco->eco_deleted) {
-                spin_unlock (&ec->ec_lock);
-                return;
-        }
-
-        spin_unlock (&ec->ec_lock);
-
-        /* NB leave obj in the object list.  We must prevent anyone from
-         * attempting to enqueue on this object number until we can be
-         * sure there will be no more lock callbacks.
-         */
-        obd_cancel_unused(ec->ec_exp, eco->eco_lsm, 0, NULL);
-
-        /* now we can let it go */
-        spin_lock (&ec->ec_lock);
-        list_del (&eco->eco_obj_chain);
-        spin_unlock (&ec->ec_lock);
-
-        LASSERT (eco->eco_refcount == 0);
-
-        echo_free_object (eco);
-}
-
-static void
-echo_get_stripe_off_id (struct lov_stripe_md *lsm, obd_off *offp, obd_id *idp)
-{
-        unsigned long stripe_count;
-        unsigned long stripe_size;
-        unsigned long width;
-        unsigned long woffset;
-        int           stripe_index;
-        obd_off       offset;
-
-        if (lsm->lsm_stripe_count <= 1)
-                return;
-
-        offset       = *offp;
-        stripe_size  = lsm->lsm_stripe_size;
-        stripe_count = lsm->lsm_stripe_count;
-
-        /* width = # bytes in all stripes */
-        width = stripe_size * stripe_count;
-
-        /* woffset = offset within a width; offset = whole number of widths */
-        woffset = do_div (offset, width);
-
-        stripe_index = woffset / stripe_size;
-
-        *idp = lsm->lsm_oinfo[stripe_index]->loi_id;
-        *offp = offset * stripe_size + woffset % stripe_size;
-}
-
-static void 
-echo_client_page_debug_setup(struct lov_stripe_md *lsm, 
-                             cfs_page_t *page, int rw, obd_id id, 
-                             obd_off offset, obd_off count)
-{
-        char    *addr;
-        obd_off  stripe_off;
-        obd_id   stripe_id;
-        int      delta;
-
-        /* no partial pages on the client */
-        LASSERT(count == CFS_PAGE_SIZE);
-
-        addr = cfs_kmap(page);
-
-        for (delta = 0; delta < CFS_PAGE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
-                if (rw == OBD_BRW_WRITE) {
-                        stripe_off = offset + delta;
-                        stripe_id = id;
-                        echo_get_stripe_off_id(lsm, &stripe_off, &stripe_id);
-                } else {
-                        stripe_off = 0xdeadbeef00c0ffeeULL;
-                        stripe_id = 0xdeadbeef00c0ffeeULL;
-                }
-                block_debug_setup(addr + delta, OBD_ECHO_BLOCK_SIZE, 
-                                  stripe_off, stripe_id);
-        }
-
-        cfs_kunmap(page);
-}
-
-static int
-echo_client_page_debug_check(struct lov_stripe_md *lsm, 
-                             cfs_page_t *page, obd_id id, 
-                             obd_off offset, obd_off count)
-{
-        obd_off stripe_off;
-        obd_id  stripe_id;
-        char   *addr;
-        int     delta;
-        int     rc;
-        int     rc2;
-
-        /* no partial pages on the client */
-        LASSERT(count == CFS_PAGE_SIZE);
-
-        addr = cfs_kmap(page);
-
-        for (rc = delta = 0; delta < CFS_PAGE_SIZE; delta += OBD_ECHO_BLOCK_SIZE) {
-                stripe_off = offset + delta;
-                stripe_id = id;
-                echo_get_stripe_off_id (lsm, &stripe_off, &stripe_id);
-
-                rc2 = block_debug_check("test_brw", 
-                                        addr + delta, OBD_ECHO_BLOCK_SIZE, 
-                                        stripe_off, stripe_id);
-                if (rc2 != 0) {
-                        CERROR ("Error in echo object "LPX64"\n", id);
-                        rc = rc2;
-                }
-        }
-
-        cfs_kunmap(page);
-        return rc;
-}
-
-static int echo_client_kbrw(struct obd_device *obd, int rw, struct obdo *oa,
-                            struct lov_stripe_md *lsm, obd_off offset,
-                            obd_size count, struct obd_trans_info *oti)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct obd_info         oinfo = { { { 0 } } };
-        obd_count               npages;
-        struct brw_page        *pga;
-        struct brw_page        *pgp;
-        obd_off                 off;
-        int                     i;
-        int                     rc;
-        int                     verify;
-        int                     gfp_mask;
-
-        verify = ((oa->o_id) != ECHO_PERSISTENT_OBJID &&
-                  (oa->o_valid & OBD_MD_FLFLAGS) != 0 &&
-                  (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0);
-
-        gfp_mask = ((oa->o_id & 2) == 0) ? CFS_ALLOC_STD : CFS_ALLOC_HIGHUSER;
-
-        LASSERT(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ);
-        LASSERT(lsm != NULL);
-        LASSERT(lsm->lsm_object_id == oa->o_id);
-
-        if (count <= 0 ||
-            (count & (~CFS_PAGE_MASK)) != 0)
-                return (-EINVAL);
-
-        /* XXX think again with misaligned I/O */
-        npages = count >> CFS_PAGE_SHIFT;
-
-        OBD_ALLOC(pga, npages * sizeof(*pga));
-        if (pga == NULL)
-                return (-ENOMEM);
-
-        for (i = 0, pgp = pga, off = offset;
-             i < npages;
-             i++, pgp++, off += CFS_PAGE_SIZE) {
-
-                LASSERT (pgp->pg == NULL);      /* for cleanup */
-
-                rc = -ENOMEM;
-                OBD_PAGE_ALLOC(pgp->pg, gfp_mask);
-                if (pgp->pg == NULL)
-                        goto out;
-
-                pgp->count = CFS_PAGE_SIZE;
-                pgp->off = off;
-                pgp->flag = 0;
-
-                if (verify)
-                        echo_client_page_debug_setup(lsm, pgp->pg, rw,
-                                                     oa->o_id, off, pgp->count);
-        }
-
-        oinfo.oi_oa = oa;
-        oinfo.oi_md = lsm;
-        rc = obd_brw(rw, ec->ec_exp, &oinfo, npages, pga, oti);
-
- out:
-        if (rc != 0 || rw != OBD_BRW_READ)
-                verify = 0;
-
-        for (i = 0, pgp = pga; i < npages; i++, pgp++) {
-                if (pgp->pg == NULL)
-                        continue;
-
-                if (verify) {
-                        int vrc;
-                        vrc = echo_client_page_debug_check(lsm, pgp->pg, oa->o_id,
-                                                           pgp->off, pgp->count);
-                        if (vrc != 0 && rc == 0)
-                                rc = vrc;
-                }
-                OBD_PAGE_FREE(pgp->pg);
-        }
-        OBD_FREE(pga, npages * sizeof(*pga));
-        return (rc);
-}
-
-#ifdef __KERNEL__
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include <linux/iobuf.h>
-
-static int echo_client_ubrw(struct obd_device *obd, int rw,
-                            struct obdo *oa, struct lov_stripe_md *lsm,
-                            obd_off offset, obd_size count, char *buffer,
-                            struct obd_trans_info *oti)
-{
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct obd_info         oinfo = { { { 0 } } };
-        obd_count               npages;
-        struct brw_page        *pga;
-        struct brw_page        *pgp;
-        obd_off                 off;
-        struct kiobuf          *kiobuf;
-        int                     i;
-        int                     rc;
-
-        LASSERT (rw == OBD_BRW_WRITE || rw == OBD_BRW_READ);
-
-        /* NB: for now, only whole pages, page aligned */
-
-        if (count <= 0 ||
-            ((long)buffer & (~CFS_PAGE_MASK)) != 0 ||
-            (count & (~CFS_PAGE_MASK)) != 0 ||
-            (lsm != NULL && lsm->lsm_object_id != oa->o_id))
-                return (-EINVAL);
-
-        /* XXX think again with misaligned I/O */
-        npages = count >> CFS_PAGE_SHIFT;
-
-        OBD_ALLOC(pga, npages * sizeof(*pga));
-        if (pga == NULL)
-                return (-ENOMEM);
-
-        rc = alloc_kiovec (1, &kiobuf);
-        if (rc != 0)
-                goto out_1;
-
-        rc = map_user_kiobuf ((rw == OBD_BRW_READ) ? READ : WRITE,
-                              kiobuf, (unsigned long)buffer, count);
-        if (rc != 0)
-                goto out_2;
-
-        LASSERT (kiobuf->offset == 0);
-        LASSERT (kiobuf->nr_pages == npages);
-
-        for (i = 0, off = offset, pgp = pga;
-             i < npages;
-             i++, off += CFS_PAGE_SIZE, pgp++) {
-                pgp->off = off;
-                pgp->pg = kiobuf->maplist[i];
-                pgp->count = CFS_PAGE_SIZE;
-                pgp->flag = 0;
-        }
-
-        oinfo.oi_oa = oa;
-        oinfo.oi_md = lsm;
-        rc = obd_brw(rw, ec->ec_exp, &oinfo, npages, pga, oti);
-
-        //        if (rw == OBD_BRW_READ)
-        //                mark_dirty_kiobuf (kiobuf, count);
-
-        unmap_kiobuf (kiobuf);
- out_2:
-        free_kiovec (1, &kiobuf);
- out_1:
-        OBD_FREE(pga, npages * sizeof(*pga));
-        return (rc);
-}
-#else
-static int echo_client_ubrw(struct obd_device *obd, int rw,
-                            struct obdo *oa, struct lov_stripe_md *lsm,
-                            obd_off offset, obd_size count, char *buffer,
-                            struct obd_trans_info *oti)
-{
-        /* echo_client_ubrw() needs to be ported on 2.6 yet */
-        LBUG();
-        return 0;
-}
-#endif
-#endif
-
-struct echo_async_state;
-
-#define EAP_MAGIC 79277927
-struct echo_async_page {
-        int                     eap_magic;
-        cfs_page_t             *eap_page;
-        void                    *eap_cookie;
-        obd_off                 eap_off;
-        struct echo_async_state *eap_eas;
-        struct list_head        eap_item;
-};
-
-#define EAP_FROM_COOKIE(c)                                                      \
-        (LASSERT(((struct echo_async_page *)(c))->eap_magic == EAP_MAGIC),      \
-         (struct echo_async_page *)(c))
-
-struct echo_async_state {
-        spinlock_t              eas_lock;
-        obd_off                 eas_next_offset;
-        obd_off                 eas_end_offset;
-        int                     eas_in_flight;
-        int                     eas_rc;
-        cfs_waitq_t             eas_waitq;
-        struct list_head        eas_avail;
-        struct obdo             eas_oa;
-        struct lov_stripe_md    *eas_lsm;
-};
-
-static int eas_should_wake(struct echo_async_state *eas)
-{
-        int rc = 0;
-
-        spin_lock(&eas->eas_lock);
-        if (eas->eas_rc == 0 && !list_empty(&eas->eas_avail))
-            rc = 1;
-        spin_unlock(&eas->eas_lock);
-        return rc;
-};
-
-static int ec_ap_make_ready(void *data, int cmd)
-{
-        /* our pages are issued ready */
-        LBUG();
-        return 0;
-}
-static int ec_ap_refresh_count(void *data, int cmd)
-{
-        /* our pages are issued with a stable count */
-        LBUG();
-        return CFS_PAGE_SIZE;
-}
-static void ec_ap_fill_obdo(void *data, int cmd, struct obdo *oa)
-{
-        struct echo_async_page *eap = EAP_FROM_COOKIE(data);
-
-        memcpy(oa, &eap->eap_eas->eas_oa, sizeof(*oa));
-}
-
-static int ec_ap_completion(void *data, int cmd, struct obdo *oa, int rc)
-{
-        struct echo_async_page *eap = EAP_FROM_COOKIE(data);
-        struct echo_async_state *eas;
-
-        eas = eap->eap_eas;
-
-        if (cmd == OBD_BRW_READ &&
-            eas->eas_oa.o_id != ECHO_PERSISTENT_OBJID &&
-            (eas->eas_oa.o_valid & OBD_MD_FLFLAGS) != 0 &&
-            (eas->eas_oa.o_flags & OBD_FL_DEBUG_CHECK) != 0)
-                echo_client_page_debug_check(eas->eas_lsm, eap->eap_page, 
-                                             eas->eas_oa.o_id, eap->eap_off,
-                                             CFS_PAGE_SIZE);
-
-        spin_lock(&eas->eas_lock);
-        if (rc && !eas->eas_rc)
-                eas->eas_rc = rc;
-        eas->eas_in_flight--;
-        list_add(&eap->eap_item, &eas->eas_avail);
-        cfs_waitq_signal(&eas->eas_waitq);
-        spin_unlock(&eas->eas_lock);
-        return 0;
-}
-
-static struct obd_async_page_ops ec_async_page_ops = {
-        .ap_make_ready =        ec_ap_make_ready,
-        .ap_refresh_count =     ec_ap_refresh_count,
-        .ap_fill_obdo =         ec_ap_fill_obdo,
-        .ap_completion =        ec_ap_completion,
-};
-
-static int echo_client_async_page(struct obd_export *exp, int rw,
-                                   struct obdo *oa, struct lov_stripe_md *lsm,
-                                   obd_off offset, obd_size count,
-                                   obd_size batching)
-{
-        obd_count npages, i;
-        struct echo_async_page *eap;
-        struct echo_async_state eas;
-        int rc = 0;
-        struct echo_async_page **aps = NULL;
-
-        ENTRY;
-#if 0
-        int                     verify;
-        int                     gfp_mask;
-
-        verify = ((oa->o_id) != ECHO_PERSISTENT_OBJID &&
-                  (oa->o_valid & OBD_MD_FLFLAGS) != 0 &&
-                  (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0);
-
-        gfp_mask = ((oa->o_id & 2) == 0) ? GFP_KERNEL : GFP_HIGHUSER;
-#endif
-
-        LASSERT(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ);
-
-        if (count <= 0 ||
-            (count & (~CFS_PAGE_MASK)) != 0 ||
-            (lsm != NULL &&
-             lsm->lsm_object_id != oa->o_id))
-                return (-EINVAL);
-
-        /* XXX think again with misaligned I/O */
-        npages = batching >> CFS_PAGE_SHIFT;
-
-        memcpy(&eas.eas_oa, oa, sizeof(*oa));
-        eas.eas_next_offset = offset;
-        eas.eas_end_offset = offset + count;
-        spin_lock_init(&eas.eas_lock);
-        cfs_waitq_init(&eas.eas_waitq);
-        eas.eas_in_flight = 0;
-        eas.eas_rc = 0;
-        eas.eas_lsm = lsm;
-        CFS_INIT_LIST_HEAD(&eas.eas_avail);
-
-        OBD_ALLOC(aps, npages * sizeof aps[0]);
-        if (aps == NULL)
-                return (-ENOMEM);
-
-        /* prepare the group of pages that we're going to be keeping
-         * in flight */
-        for (i = 0; i < npages; i++) {
-                cfs_page_t *page;
-                OBD_PAGE_ALLOC(page, CFS_ALLOC_STD);
-                if (page == NULL)
-                        GOTO(out, rc = -ENOMEM);
-
-                OBD_ALLOC(eap, sizeof(*eap));
-                if (eap == NULL) {
-                        OBD_PAGE_FREE(page);
-                        GOTO(out, rc = -ENOMEM);
-                }
-
-                eap->eap_magic = EAP_MAGIC;
-                eap->eap_page = page;
-                eap->eap_eas = &eas;
-                list_add_tail(&eap->eap_item, &eas.eas_avail);
-                aps[i] = eap;
-        }
-
-        /* first we spin queueing io and being woken by its completion */
-        spin_lock(&eas.eas_lock);
-        for(;;) {
-                int rc;
-
-                /* sleep until we have a page to send */
-                spin_unlock(&eas.eas_lock);
-                rc = wait_event_interruptible(eas.eas_waitq, 
-                                              eas_should_wake(&eas));
-                spin_lock(&eas.eas_lock);
-                if (rc && !eas.eas_rc)
-                        eas.eas_rc = rc;
-                if (eas.eas_rc)
-                        break;
-                if (list_empty(&eas.eas_avail))
-                        continue;
-                eap = list_entry(eas.eas_avail.next, struct echo_async_page,
-                                 eap_item);
-                list_del(&eap->eap_item);
-                spin_unlock(&eas.eas_lock);
-
-                /* unbind the eap from its old page offset */
-                if (eap->eap_cookie != NULL) {
-                        obd_teardown_async_page(exp, lsm, NULL, 
-                                                eap->eap_cookie);
-                        eap->eap_cookie = NULL;
-                }
-
-                eas.eas_next_offset += CFS_PAGE_SIZE;
-                eap->eap_off = eas.eas_next_offset;
-
-                rc = obd_prep_async_page(exp, lsm, NULL, eap->eap_page,
-                                         eap->eap_off, &ec_async_page_ops,
-                                         eap, &eap->eap_cookie, 1, NULL);
-                if (rc) {
-                        spin_lock(&eas.eas_lock);
-                        eas.eas_rc = rc;
-                        break;
-                }
-
-                if (oa->o_id != ECHO_PERSISTENT_OBJID &&
-                    (oa->o_valid & OBD_MD_FLFLAGS) != 0 &&
-                    (oa->o_flags & OBD_FL_DEBUG_CHECK) != 0)
-                        echo_client_page_debug_setup(lsm, eap->eap_page, rw, 
-                                                     oa->o_id, 
-                                                     eap->eap_off, CFS_PAGE_SIZE);
-
-                /* always asserts urgent, which isn't quite right */
-                rc = obd_queue_async_io(exp, lsm, NULL, eap->eap_cookie,
-                                        rw, 0, CFS_PAGE_SIZE, 0,
-                                        ASYNC_READY | ASYNC_URGENT |
-                                        ASYNC_COUNT_STABLE);
-                spin_lock(&eas.eas_lock);
-                if (rc && !eas.eas_rc) {
-                        eas.eas_rc = rc;
-                        break;
-                }
-                eas.eas_in_flight++;
-                if (eas.eas_next_offset == eas.eas_end_offset)
-                        break;
-        } 
-
-        /* still hold the eas_lock here.. */
-
-        /* now we just spin waiting for all the rpcs to complete */
-        while(eas.eas_in_flight) {
-                spin_unlock(&eas.eas_lock);
-                wait_event_interruptible(eas.eas_waitq, 
-                                         eas.eas_in_flight == 0);
-                spin_lock(&eas.eas_lock);
-        }
-        spin_unlock(&eas.eas_lock);
-
-out:
-        if (aps != NULL) {
-                for (i = 0; i < npages; ++ i) {
-                        cfs_page_t *page;
-
-                        eap = aps[i];
-                        page = eap->eap_page;
-                        if (eap->eap_cookie != NULL)
-                                obd_teardown_async_page(exp, lsm, NULL,
-                                                        eap->eap_cookie);
-                        OBD_FREE(eap, sizeof(*eap));
-                        OBD_PAGE_FREE(page);
-                }
-                OBD_FREE(aps, npages * sizeof aps[0]);
-        }
-
-        RETURN(rc);
-}
-
-static int echo_client_prep_commit(struct obd_export *exp, int rw,
-                                   struct obdo *oa, struct lov_stripe_md *lsm,
-                                   obd_off offset, obd_size count,  
-                                   obd_size batch, struct obd_trans_info *oti)
-{
-        struct obd_ioobj ioo;
-        struct niobuf_local *lnb;
-        struct niobuf_remote *rnb;
-        obd_off off;
-        obd_size npages, tot_pages;
-        int i, ret = 0;
-        ENTRY;
-
-        if (count <= 0 || (count & (~CFS_PAGE_MASK)) != 0 ||
-            (lsm != NULL && lsm->lsm_object_id != oa->o_id))
-                RETURN(-EINVAL);
-
-        npages = batch >> CFS_PAGE_SHIFT;
-        tot_pages = count >> CFS_PAGE_SHIFT;
-
-        OBD_ALLOC(lnb, npages * sizeof(struct niobuf_local));
-        OBD_ALLOC(rnb, npages * sizeof(struct niobuf_remote));
-
-        if (lnb == NULL || rnb == NULL)
-                GOTO(out, ret = -ENOMEM);
-
-        obdo_to_ioobj(oa, &ioo);
-
-        off = offset;
-
-        for(; tot_pages; tot_pages -= npages) {
-                if (tot_pages < npages)
-                        npages = tot_pages;
-
-                for (i = 0; i < npages; i++, off += CFS_PAGE_SIZE) {
-                        rnb[i].offset = off;
-                        rnb[i].len = CFS_PAGE_SIZE;
-                }
-
-                ioo.ioo_bufcnt = npages;
-                oti->oti_transno = 0;
-
-                ret = obd_preprw(rw, exp, oa, 1, &ioo, npages, rnb, lnb, oti);
-                if (ret != 0)
-                        GOTO(out, ret);
-
-                for (i = 0; i < npages; i++) {
-                        cfs_page_t *page = lnb[i].page;
-
-                        /* read past eof? */
-                        if (page == NULL && lnb[i].rc == 0)
-                                continue;
-
-                        if (oa->o_id == ECHO_PERSISTENT_OBJID ||
-                            (oa->o_valid & OBD_MD_FLFLAGS) == 0 ||
-                            (oa->o_flags & OBD_FL_DEBUG_CHECK) == 0)
-                                continue;
-
-                        if (rw == OBD_BRW_WRITE)
-                                echo_client_page_debug_setup(lsm, page, rw,
-                                                             oa->o_id,
-                                                             rnb[i].offset,
-                                                             rnb[i].len);
-                        else
-                                echo_client_page_debug_check(lsm, page,
-                                                             oa->o_id,
-                                                             rnb[i].offset,
-                                                             rnb[i].len);
-                }
-
-                ret = obd_commitrw(rw, exp, oa, 1, &ioo, npages, lnb, oti, ret);
-                if (ret != 0)
-                        GOTO(out, ret);
-        }
-
-out:
-        if (lnb)
-                OBD_FREE(lnb, npages * sizeof(struct niobuf_local));
-        if (rnb)
-                OBD_FREE(rnb, npages * sizeof(struct niobuf_remote));
-        RETURN(ret);
-}
-
-int echo_client_brw_ioctl(int rw, struct obd_export *exp,
-                          struct obd_ioctl_data *data)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct obd_trans_info dummy_oti = { .oti_thread_id = -1 };
-        struct ec_object *eco;
-        int rc;
-        ENTRY;
-
-        rc = echo_get_object(&eco, obd, &data->ioc_obdo1);
-        if (rc)
-                RETURN(rc);
-
-        data->ioc_obdo1.o_valid &= ~OBD_MD_FLHANDLE;
-        data->ioc_obdo1.o_valid |= OBD_MD_FLGROUP;
-        data->ioc_obdo1.o_gr = FILTER_GROUP_ECHO;
-
-        switch((long)data->ioc_pbuf1) {
-        case 1:
-                if (data->ioc_pbuf2 == NULL) { // NULL user data pointer
-                        rc = echo_client_kbrw(obd, rw, &data->ioc_obdo1,
-                                              eco->eco_lsm, data->ioc_offset,
-                                              data->ioc_count, &dummy_oti);
-                } else {
-#ifdef __KERNEL__
-                        rc = echo_client_ubrw(obd, rw, &data->ioc_obdo1,
-                                              eco->eco_lsm, data->ioc_offset,
-                                              data->ioc_count, data->ioc_pbuf2,
-                                              &dummy_oti);
-#endif
-                }
-                break;
-        case 2:
-                rc = echo_client_async_page(ec->ec_exp, rw, &data->ioc_obdo1,
-                                           eco->eco_lsm, data->ioc_offset,
-                                           data->ioc_count, data->ioc_plen1);
-                break;
-        case 3:
-                rc = echo_client_prep_commit(ec->ec_exp, rw, &data->ioc_obdo1,
-                                            eco->eco_lsm, data->ioc_offset,
-                                            data->ioc_count, data->ioc_plen1,
-                                            &dummy_oti);
-                break;
-        default:
-                rc = -EINVAL;
-        }
-        echo_put_object(eco);
-        RETURN(rc);
-}
-
-static int
-echo_ldlm_callback (struct ldlm_lock *lock, struct ldlm_lock_desc *new,
-                    void *data, int flag)
-{
-        struct ec_object       *eco = (struct ec_object *)data;
-        struct echo_client_obd *ec = &(eco->eco_device->u.echo_client);
-        struct lustre_handle    lockh;
-        struct list_head       *el;
-        int                     found = 0;
-        int                     rc;
-
-        ldlm_lock2handle (lock, &lockh);
-
-        /* #ifdef this out if we're not feeling paranoid */
-        spin_lock (&ec->ec_lock);
-        list_for_each (el, &ec->ec_objects) {
-                found = (eco == list_entry(el, struct ec_object,
-                                           eco_obj_chain));
-                if (found)
-                        break;
-        }
-        spin_unlock (&ec->ec_lock);
-        LASSERT (found);
-
-        switch (flag) {
-        case LDLM_CB_BLOCKING:
-                CDEBUG(D_INFO, "blocking callback on "LPX64", handle "LPX64"\n",
-                       eco->eco_id, lockh.cookie);
-                rc = ldlm_cli_cancel (&lockh);
-                if (rc != ELDLM_OK)
-                        CERROR ("ldlm_cli_cancel failed: %d\n", rc);
-                break;
-
-        case LDLM_CB_CANCELING:
-                CDEBUG(D_INFO, "cancel callback on "LPX64", handle "LPX64"\n",
-                       eco->eco_id, lockh.cookie);
-                break;
-
-        default:
-                LBUG ();
-        }
-
-        return (0);
-}
-
-static int
-echo_client_enqueue(struct obd_export *exp, struct obdo *oa,
-                    int mode, obd_off offset, obd_size nob)
-{
-        struct obd_device      *obd = exp->exp_obd;
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct lustre_handle   *ulh = obdo_handle (oa);
-        struct ldlm_enqueue_info einfo = { 0 };
-        struct obd_info oinfo = { { { 0 } } };
-        struct ec_object       *eco;
-        struct ec_lock         *ecl;
-        int                     rc;
-
-        if (!(mode == LCK_PR || mode == LCK_PW))
-                return -EINVAL;
-
-        if ((offset & (~CFS_PAGE_MASK)) != 0 ||
-            (nob & (~CFS_PAGE_MASK)) != 0)
-                return -EINVAL;
-
-        rc = echo_get_object (&eco, obd, oa);
-        if (rc != 0)
-                return rc;
-
-        rc = -ENOMEM;
-        OBD_ALLOC (ecl, sizeof (*ecl));
-        if (ecl == NULL)
-                goto failed_0;
-
-        ecl->ecl_mode = mode;
-        ecl->ecl_object = eco;
-        ecl->ecl_policy.l_extent.start = offset;
-        ecl->ecl_policy.l_extent.end =
-                (nob == 0) ? ((obd_off) -1) : (offset + nob - 1);
-
-        einfo.ei_type = LDLM_EXTENT;
-        einfo.ei_mode = mode;
-        einfo.ei_cb_bl = echo_ldlm_callback;
-        einfo.ei_cb_cp = ldlm_completion_ast;
-        einfo.ei_cb_gl = NULL;
-        einfo.ei_cbdata = eco;
-
-        oinfo.oi_policy = ecl->ecl_policy;
-        oinfo.oi_lockh = &ecl->ecl_lock_handle;
-        oinfo.oi_md = eco->eco_lsm;
-        rc = obd_enqueue(ec->ec_exp, &oinfo, &einfo, NULL);
-        if (rc != 0)
-                goto failed_1;
-
-        CDEBUG(D_INFO, "enqueue handle "LPX64"\n", ecl->ecl_lock_handle.cookie);
-
-        /* NB ecl takes object ref from echo_get_object() above */
-        spin_lock(&ec->ec_lock);
-
-        list_add(&ecl->ecl_exp_chain, &exp->exp_ec_data.eced_locks);
-        ulh->cookie = ecl->ecl_cookie = ec->ec_unique++;
-
-        spin_unlock(&ec->ec_lock);
-
-        oa->o_valid |= OBD_MD_FLHANDLE;
-        return 0;
-
- failed_1:
-        OBD_FREE (ecl, sizeof (*ecl));
- failed_0:
-        echo_put_object (eco);
-        return (rc);
-}
-
-static int
-echo_client_cancel(struct obd_export *exp, struct obdo *oa)
-{
-        struct obd_device      *obd = exp->exp_obd;
-        struct echo_client_obd *ec = &obd->u.echo_client;
-        struct lustre_handle   *ulh = obdo_handle (oa);
-        struct ec_lock         *ecl = NULL;
-        int                     found = 0;
-        struct list_head       *el;
-        int                     rc;
-
-        if ((oa->o_valid & OBD_MD_FLHANDLE) == 0)
-                return -EINVAL;
-
-        spin_lock (&ec->ec_lock);
-
-        list_for_each (el, &exp->exp_ec_data.eced_locks) {
-                ecl = list_entry (el, struct ec_lock, ecl_exp_chain);
-                found = (ecl->ecl_cookie == ulh->cookie);
-                if (found) {
-                        list_del (&ecl->ecl_exp_chain);
-                        break;
-                }
-        }
-
-        spin_unlock (&ec->ec_lock);
-
-        if (!found)
-                return (-ENOENT);
-
-        rc = obd_cancel(ec->ec_exp, ecl->ecl_object->eco_lsm, ecl->ecl_mode,
-                        &ecl->ecl_lock_handle);
-
-        echo_put_object (ecl->ecl_object);
-        OBD_FREE (ecl, sizeof (*ecl));
-
-        return rc;
-}
-
-static int
-echo_client_iocontrol(unsigned int cmd, struct obd_export *exp,
-                      int len, void *karg, void *uarg)
-{
-        struct obd_device      *obd;
-        struct echo_client_obd *ec;
-        struct ec_object       *eco;
-        struct obd_ioctl_data  *data = karg;
-        struct obd_trans_info   dummy_oti;
-        struct oti_req_ack_lock *ack_lock;
-        struct obdo            *oa;
-        int                     rw = OBD_BRW_READ;
-        int                     rc = 0;
-        int                     i;
-        ENTRY;
-
-        unlock_kernel();
-
-        memset(&dummy_oti, 0, sizeof(dummy_oti));
-
-        obd = exp->exp_obd;
-        ec = &obd->u.echo_client;
-
-        switch (cmd) {
-        case OBD_IOC_CREATE:                    /* may create echo object */
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, rc = -EPERM);
-
-                rc = echo_create_object (obd, 1, &data->ioc_obdo1,
-                                         data->ioc_pbuf1, data->ioc_plen1,
-                                         &dummy_oti);
-                GOTO(out, rc);
-
-        case OBD_IOC_DESTROY:
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, rc = -EPERM);
-                rc = echo_get_object (&eco, obd, &data->ioc_obdo1);
-                if (rc == 0) {
-                        oa = &data->ioc_obdo1;
-                        oa->o_gr = FILTER_GROUP_ECHO;
-                        oa->o_valid |= OBD_MD_FLGROUP;
-                        rc = obd_destroy(ec->ec_exp, oa, eco->eco_lsm,
-                                         &dummy_oti, NULL);
-                        if (rc == 0)
-                                eco->eco_deleted = 1;
-                        echo_put_object(eco);
-                }
-                GOTO(out, rc);
-
-        case OBD_IOC_GETATTR:
-                rc = echo_get_object (&eco, obd, &data->ioc_obdo1);
-                if (rc == 0) {
-                        struct obd_info oinfo = { { { 0 } } };
-                        oinfo.oi_md = eco->eco_lsm;
-                        oinfo.oi_oa = &data->ioc_obdo1;
-                        rc = obd_getattr(ec->ec_exp, &oinfo);
-                        echo_put_object(eco);
-                }
-                GOTO(out, rc);
-
-        case OBD_IOC_SETATTR:
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, rc = -EPERM);
-
-                rc = echo_get_object (&eco, obd, &data->ioc_obdo1);
-                if (rc == 0) {
-                        struct obd_info oinfo = { { { 0 } } };
-                        oinfo.oi_oa = &data->ioc_obdo1;
-                        oinfo.oi_md = eco->eco_lsm;
-
-                        rc = obd_setattr(ec->ec_exp, &oinfo, NULL);
-                        echo_put_object(eco);
-                }
-                GOTO(out, rc);
-
-        case OBD_IOC_BRW_WRITE:
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, rc = -EPERM);
-
-                rw = OBD_BRW_WRITE;
-                /* fall through */
-        case OBD_IOC_BRW_READ:
-                rc = echo_client_brw_ioctl(rw, exp, data);
-                GOTO(out, rc);
-
-        case ECHO_IOC_GET_STRIPE:
-                rc = echo_get_object(&eco, obd, &data->ioc_obdo1);
-                if (rc == 0) {
-                        rc = echo_copyout_lsm(eco->eco_lsm, data->ioc_pbuf1,
-                                              data->ioc_plen1);
-                        echo_put_object(eco);
-                }
-                GOTO(out, rc);
-
-        case ECHO_IOC_SET_STRIPE:
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, rc = -EPERM);
-
-                if (data->ioc_pbuf1 == NULL) {  /* unset */
-                        rc = echo_get_object(&eco, obd, &data->ioc_obdo1);
-                        if (rc == 0) {
-                                eco->eco_deleted = 1;
-                                echo_put_object(eco);
-                        }
-                } else {
-                        rc = echo_create_object(obd, 0, &data->ioc_obdo1,
-                                                data->ioc_pbuf1,
-                                                data->ioc_plen1, &dummy_oti);
-                }
-                GOTO (out, rc);
-
-        case ECHO_IOC_ENQUEUE:
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, rc = -EPERM);
-
-                rc = echo_client_enqueue(exp, &data->ioc_obdo1,
-                                         data->ioc_conn1, /* lock mode */
-                                   data->ioc_offset, data->ioc_count);/*extent*/
-                GOTO (out, rc);
-
-        case ECHO_IOC_CANCEL:
-                rc = echo_client_cancel(exp, &data->ioc_obdo1);
-                GOTO (out, rc);
-
-        default:
-                CERROR ("echo_ioctl(): unrecognised ioctl %#x\n", cmd);
-                GOTO (out, rc = -ENOTTY);
-        }
-
-        EXIT;
- out:
-
-        /* XXX this should be in a helper also called by target_send_reply */
-        for (ack_lock = dummy_oti.oti_ack_locks, i = 0; i < 4; 
-             i++, ack_lock++) {
-                if (!ack_lock->mode)
-                        break;
-                ldlm_lock_decref(&ack_lock->lock, ack_lock->mode);
-        }
-
-        lock_kernel();
-
-        return rc;
-}
-
-static int
-echo_client_setup(struct obd_device *obddev, obd_count len, void *buf)
-{
-        struct lustre_cfg* lcfg = buf;
-        struct echo_client_obd *ec = &obddev->u.echo_client;
-        struct obd_device *tgt;
-        struct lustre_handle conn = {0, };
-        struct obd_uuid echo_uuid = { "ECHO_UUID" };
-        struct obd_connect_data *ocd = NULL;
-        int rc;
-        ENTRY;
-
-        if (lcfg->lcfg_bufcount < 2 || LUSTRE_CFG_BUFLEN(lcfg, 1) < 1) {
-                CERROR("requires a TARGET OBD name\n");
-                RETURN(-EINVAL);
-        }
-
-        tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
-        if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
-                CERROR("device not attached or not set up (%s)\n",
-                       lustre_cfg_string(lcfg, 1));
-                RETURN(-EINVAL);
-        }
-
-        spin_lock_init (&ec->ec_lock);
-        CFS_INIT_LIST_HEAD (&ec->ec_objects);
-        ec->ec_unique = 0;
-
-        OBD_ALLOC(ocd, sizeof(*ocd));
-        if (ocd == NULL) {
-                CERROR("Can't alloc ocd connecting to %s\n",
-                       lustre_cfg_string(lcfg, 1));
-                return -ENOMEM;
-        }
-
-        ocd->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_REQPORTAL;
-        ocd->ocd_version = LUSTRE_VERSION_CODE;
-
-        rc = obd_connect(&conn, tgt, &echo_uuid, ocd, NULL);
-
-        OBD_FREE(ocd, sizeof(*ocd));
-
-        if (rc != 0) {
-                CERROR("fail to connect to device %s\n",
-                       lustre_cfg_string(lcfg, 1));
-                return (rc);
-        }
-        ec->ec_exp = class_conn2export(&conn);
-
-        RETURN(rc);
-}
-
-static int echo_client_cleanup(struct obd_device *obddev)
-{
-        struct list_head       *el;
-        struct ec_object       *eco;
-        struct echo_client_obd *ec = &obddev->u.echo_client;
-        int rc;
-        ENTRY;
-
-        if (!list_empty(&obddev->obd_exports)) {
-                CERROR("still has clients!\n");
-                RETURN(-EBUSY);
-        }
-
-        /* XXX assuming sole access */
-        while (!list_empty(&ec->ec_objects)) {
-                el = ec->ec_objects.next;
-                eco = list_entry(el, struct ec_object, eco_obj_chain);
-
-                LASSERT(eco->eco_refcount == 0);
-                eco->eco_refcount = 1;
-                eco->eco_deleted = 1;
-                echo_put_object(eco);
-        }
-
-        rc = obd_disconnect(ec->ec_exp);
-        if (rc != 0)
-                CERROR("fail to disconnect device: %d\n", rc);
-
-        RETURN(rc);
-}
-
-static int echo_client_connect(struct lustre_handle *conn,
-                               struct obd_device *src, struct obd_uuid *cluuid,
-                               struct obd_connect_data *data, void *localdata)
-{
-        struct obd_export *exp;
-        int                rc;
-
-        ENTRY;
-        rc = class_connect(conn, src, cluuid);
-        if (rc == 0) {
-                exp = class_conn2export(conn);
-                CFS_INIT_LIST_HEAD(&exp->exp_ec_data.eced_locks);
-                class_export_put(exp);
-        }
-
-        RETURN (rc);
-}
-
-static int echo_client_disconnect(struct obd_export *exp)
-{
-        struct obd_device      *obd;
-        struct echo_client_obd *ec;
-        struct ec_lock         *ecl;
-        int                     rc;
-        ENTRY;
-
-        if (exp == NULL)
-                GOTO(out, rc = -EINVAL);
-
-        obd = exp->exp_obd;
-        ec = &obd->u.echo_client;
-
-        /* no more contention on export's lock list */
-        while (!list_empty (&exp->exp_ec_data.eced_locks)) {
-                ecl = list_entry (exp->exp_ec_data.eced_locks.next,
-                                  struct ec_lock, ecl_exp_chain);
-                list_del (&ecl->ecl_exp_chain);
-
-                rc = obd_cancel(ec->ec_exp, ecl->ecl_object->eco_lsm,
-                                 ecl->ecl_mode, &ecl->ecl_lock_handle);
-
-                CDEBUG (D_INFO, "Cancel lock on object "LPX64" on disconnect "
-                        "(%d)\n", ecl->ecl_object->eco_id, rc);
-
-                echo_put_object (ecl->ecl_object);
-                OBD_FREE (ecl, sizeof (*ecl));
-        }
-
-        rc = class_disconnect(exp);
-        GOTO(out, rc);
- out:
-        return rc;
-}
-
-static struct obd_ops echo_obd_ops = {
-        .o_owner       = THIS_MODULE,
-        .o_setup       = echo_client_setup,
-        .o_cleanup     = echo_client_cleanup,
-        .o_iocontrol   = echo_client_iocontrol,
-        .o_connect     = echo_client_connect,
-        .o_disconnect  = echo_client_disconnect
-};
-
-int echo_client_init(void)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-
-        lprocfs_echo_init_vars(&lvars);
-        return class_register_type(&echo_obd_ops, lvars.module_vars,
-                                   LUSTRE_ECHO_CLIENT_NAME);
-}
-
-void echo_client_exit(void)
-{
-        class_unregister_type(LUSTRE_ECHO_CLIENT_NAME);
-}
diff --git a/lustre/obdecho/lproc_echo.c b/lustre/obdecho/lproc_echo.c
deleted file mode 100644
index 42ded58b9645b77c05ea187326981a1c63a8bc68..0000000000000000000000000000000000000000
--- a/lustre/obdecho/lproc_echo.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_ECHO
-
-#include <lprocfs_status.h>
-#include <obd_class.h>
-
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_echo_obd_vars[] = {
-        { "uuid",         lprocfs_rd_uuid,        0, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_echo_module_vars[] = {
-        { "num_refs",     lprocfs_rd_numrefs,     0, 0 },
-        { 0 }
-};
-
-void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_echo_module_vars;
-    lvars->obd_vars     = lprocfs_echo_obd_vars;
-}
-#endif /* LPROCFS */
diff --git a/lustre/obdfilter/.cvsignore b/lustre/obdfilter/.cvsignore
deleted file mode 100644
index 5d26f004c3ff3840392e34cb4aaed5287963f9a1..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
diff --git a/lustre/obdfilter/Makefile.in b/lustre/obdfilter/Makefile.in
deleted file mode 100644
index 8305eb56bec321f4e5ab5e3486d897c35ad6c439..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/Makefile.in
+++ /dev/null
@@ -1,12 +0,0 @@
-MODULES := obdfilter
-
-obdfilter-objs := filter.o filter_io.o filter_log.o
-obdfilter-objs += lproc_obdfilter.o filter_lvb.o
-
-ifeq ($(PATCHLEVEL),4)
-obdfilter-objs += filter_io_24.o
-else
-obdfilter-objs += filter_io_26.o
-endif # PATCHLEVEL 
-
-@INCLUDE_RULES@
diff --git a/lustre/obdfilter/autoMakefile.am b/lustre/obdfilter/autoMakefile.am
deleted file mode 100644
index 5f90afb7a720c1ec8d1c81fcc134aa3e742d88ea..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/autoMakefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if MODULES
-modulefs_DATA = obdfilter$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES = $(obdfilter-objs:%.o=%.c) filter_io_24.c filter_io_26.c filter_internal.h
diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c
deleted file mode 100644
index fd63b93b701f76dc1c1b44f48f951039b60f3b42..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter.c
+++ /dev/null
@@ -1,3746 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/fs/obdfilter/filter.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-/*
- * Invariant: Get O/R i_mutex for lookup, if needed, before any journal ops
- *            (which need to get journal_lock, may block if journal full).
- *
- * Invariant: Call filter_start_transno() before any journal ops to avoid the
- *            same deadlock problem.  We can (and want) to get rid of the
- *            transno sem in favour of the dir/inode i_mutex to avoid single
- *            threaded operation on the OST.
- */
-
-#define DEBUG_SUBSYSTEM S_FILTER
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/dcache.h>
-#include <linux/init.h>
-#include <linux/version.h>
-#include <linux/sched.h>
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-# include <linux/mount.h>
-# include <linux/buffer_head.h>
-#endif
-
-#include <obd_class.h>
-#include <obd_lov.h>
-#include <lustre_dlm.h>
-#include <lustre_fsfilt.h>
-#include <lprocfs_status.h>
-#include <lustre_log.h>
-#include <lustre_commit_confd.h>
-#include <libcfs/list.h>
-#include <lustre_disk.h>
-#include <lustre_quota.h>
-#include <linux/slab.h>
-#include <lustre_param.h>
-
-#include "filter_internal.h"
-
-static struct lvfs_callback_ops filter_lvfs_ops;
-cfs_mem_cache_t *ll_fmd_cachep;
-
-static void filter_commit_cb(struct obd_device *obd, __u64 transno,
-                             void *cb_data, int error)
-{
-        obd_transno_commit_cb(obd, transno, error);
-}
-
-/* Assumes caller has already pushed us into the kernel context. */
-int filter_finish_transno(struct obd_export *exp, struct obd_trans_info *oti,
-                          int rc, int force_sync)
-{
-        struct filter_obd *filter = &exp->exp_obd->u.filter;
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        struct filter_client_data *fcd = fed->fed_fcd;
-        __u64 last_rcvd;
-        loff_t off;
-        int err, log_pri = D_RPCTRACE;
-
-        /* Propagate error code. */
-        if (rc)
-                RETURN(rc);
-
-        if (!exp->exp_obd->obd_replayable || oti == NULL)
-                RETURN(rc);
-
-        /* we don't allocate new transnos for replayed requests */
-        if (oti->oti_transno == 0) {
-                spin_lock(&filter->fo_translock);
-                last_rcvd = le64_to_cpu(filter->fo_fsd->lsd_last_transno) + 1;
-                filter->fo_fsd->lsd_last_transno = cpu_to_le64(last_rcvd);
-                spin_unlock(&filter->fo_translock);
-                oti->oti_transno = last_rcvd;
-        } else {
-                spin_lock(&filter->fo_translock);
-                last_rcvd = oti->oti_transno;
-                if (last_rcvd > le64_to_cpu(filter->fo_fsd->lsd_last_transno))
-                        filter->fo_fsd->lsd_last_transno =
-                                cpu_to_le64(last_rcvd);
-                spin_unlock(&filter->fo_translock);
-        }
-        fcd->fcd_last_rcvd = cpu_to_le64(last_rcvd);
-
-        /* could get xid from oti, if it's ever needed */
-        fcd->fcd_last_xid = 0;
-
-        off = fed->fed_lr_off;
-        if (off <= 0) {
-                CERROR("%s: client idx %d is %lld\n", exp->exp_obd->obd_name,
-                       fed->fed_lr_idx, fed->fed_lr_off);
-                err = -EINVAL;
-        } else {
-                if (!force_sync)
-                        force_sync = fsfilt_add_journal_cb(exp->exp_obd, 
-                                                           last_rcvd,
-                                                           oti->oti_handle,
-                                                           filter_commit_cb,
-                                                           NULL);
-
-                err = fsfilt_write_record(exp->exp_obd, filter->fo_rcvd_filp,
-                                          fcd, sizeof(*fcd), &off,
-                                          force_sync | exp->exp_need_sync);
-                if (force_sync)
-                        filter_commit_cb(exp->exp_obd, last_rcvd, NULL, err);
-        }
-        if (err) {
-                log_pri = D_ERROR;
-                if (rc == 0)
-                        rc = err;
-        }
-
-        CDEBUG(log_pri, "wrote trans "LPU64" for client %s at #%d: err = %d\n",
-               last_rcvd, fcd->fcd_uuid, fed->fed_lr_idx, err);
-
-        RETURN(rc);
-}
-
-void f_dput(struct dentry *dentry)
-{
-        /* Can't go inside filter_ddelete because it can block */
-        CDEBUG(D_INODE, "putting %s: %p, count = %d\n",
-               dentry->d_name.name, dentry, atomic_read(&dentry->d_count) - 1);
-        LASSERT(atomic_read(&dentry->d_count) > 0);
-
-        dput(dentry);
-}
-
-static void init_brw_stats(struct brw_stats *brw_stats)
-{
-        int i;
-        for (i = 0; i < BRW_LAST; i++)
-                spin_lock_init(&brw_stats->hist[i].oh_lock);
-}
-
-static int lprocfs_init_rw_stats(struct obd_device *obd,
-                                 struct lprocfs_stats **stats)
-{
-        int num_stats;
-
-        num_stats = (sizeof(*obd->obd_type->typ_ops) / sizeof(void *)) +
-                                                        LPROC_FILTER_LAST - 1;
-        *stats = lprocfs_alloc_stats(num_stats, 0);
-        if (*stats == NULL)
-                return -ENOMEM;
-
-        lprocfs_init_ops_stats(LPROC_FILTER_LAST, *stats);
-        lprocfs_counter_init(*stats, LPROC_FILTER_READ_BYTES,
-                             LPROCFS_CNTR_AVGMINMAX, "read_bytes", "bytes");
-        lprocfs_counter_init(*stats, LPROC_FILTER_WRITE_BYTES,
-                             LPROCFS_CNTR_AVGMINMAX, "write_bytes", "bytes");
-
-        return(0);
-}
-
-/* brw_stats are 2128, ops are 3916, ldlm are 204, so 6248 bytes per client,
-   plus the procfs overhead :( */
-static int filter_export_stats_init(struct obd_device *obd,
-                                    struct obd_export *exp,
-                                    lnet_nid_t client_nid)
-{
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        struct proc_dir_entry *brw_entry;
-        int rc, newnid = 0;
-        ENTRY;
-
-        init_brw_stats(&fed->fed_brw_stats);
-
-        if (obd_uuid_equals(&exp->exp_client_uuid, &obd->obd_uuid))
-                /* Self-export gets no proc entry */
-                RETURN(0);
-        rc = lprocfs_exp_setup(exp, client_nid, &newnid);
-        if (rc)
-                RETURN(rc);
-
-        if (client_nid && newnid) {
-                struct nid_stat *tmp = exp->exp_nid_stats;
-                LASSERT(tmp != NULL);
-
-                OBD_ALLOC(tmp->nid_brw_stats, sizeof(struct brw_stats));
-                if (tmp->nid_brw_stats == NULL)
-                        RETURN(-ENOMEM);
-
-                init_brw_stats(tmp->nid_brw_stats);
-
-                brw_entry = create_proc_entry("brw_stats", 0644,
-                                              exp->exp_nid_stats->nid_proc);
-                if (brw_entry == NULL)
-                       RETURN(-ENOMEM);
-
-                brw_entry->proc_fops = &filter_per_nid_stats_fops;
-                brw_entry->data = exp->exp_nid_stats;
-
-                rc = lprocfs_init_rw_stats(obd, &exp->exp_nid_stats->nid_stats);
-                if (rc)
-                        RETURN(rc);
-
-                rc = lprocfs_register_stats(tmp->nid_proc, "stats",
-                                            tmp->nid_stats);
-                if (rc)
-                        RETURN(rc);
-        }
-
-        RETURN(0);
-}
-
-/* Add client data to the FILTER.  We use a bitmap to locate a free space
- * in the last_rcvd file if cl_idx is -1 (i.e. a new client).
- * Otherwise, we have just read the data from the last_rcvd file and
- * we know its offset. */
-static int filter_client_add(struct obd_device *obd, struct obd_export *exp,
-                             int cl_idx, lnet_nid_t client_nid)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        unsigned long *bitmap = filter->fo_last_rcvd_slots;
-        int new_client = (cl_idx == -1);
-
-        ENTRY;
-
-        LASSERT(bitmap != NULL);
-        LASSERTF(cl_idx > -2, "%d\n", cl_idx);
-
-        /* Self-export */
-        if (strcmp(fed->fed_fcd->fcd_uuid, obd->obd_uuid.uuid) == 0)
-                RETURN(0);
-
-        /* the bitmap operations can handle cl_idx > sizeof(long) * 8, so
-         * there's no need for extra complication here
-         */
-        if (new_client) {
-                cl_idx = find_first_zero_bit(bitmap, LR_MAX_CLIENTS);
-        repeat:
-                if (cl_idx >= LR_MAX_CLIENTS) {
-                        CERROR("no room for %u clients - fix LR_MAX_CLIENTS\n",
-                               cl_idx);
-                        RETURN(-EOVERFLOW);
-                }
-                if (test_and_set_bit(cl_idx, bitmap)) {
-                        cl_idx = find_next_zero_bit(bitmap, LR_MAX_CLIENTS,
-                                                    cl_idx);
-                        goto repeat;
-                }
-        } else {
-                if (test_and_set_bit(cl_idx, bitmap)) {
-                        CERROR("FILTER client %d: bit already set in bitmap!\n",
-                               cl_idx);
-                        LBUG();
-                }
-        }
-
-        fed->fed_lr_idx = cl_idx;
-        fed->fed_lr_off = le32_to_cpu(filter->fo_fsd->lsd_client_start) +
-                cl_idx * le16_to_cpu(filter->fo_fsd->lsd_client_size);
-        LASSERTF(fed->fed_lr_off > 0, "fed_lr_off = %llu\n", fed->fed_lr_off);
-
-        CDEBUG(D_INFO, "client at index %d (%llu) with UUID '%s' added\n",
-               fed->fed_lr_idx, fed->fed_lr_off, fed->fed_fcd->fcd_uuid);
-
-        if (new_client) {
-                struct lvfs_run_ctxt saved;
-                loff_t off = fed->fed_lr_off;
-                void *handle;
-                int rc;
-
-                CDEBUG(D_INFO, "writing client fcd at idx %u (%llu) (len %u)\n",
-                       fed->fed_lr_idx,off,(unsigned int)sizeof(*fed->fed_fcd));
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                /* Transaction needed to fix bug 1403 */
-                handle = fsfilt_start(obd,
-                                      filter->fo_rcvd_filp->f_dentry->d_inode,
-                                      FSFILT_OP_SETATTR, NULL);
-                if (IS_ERR(handle)) {
-                        rc = PTR_ERR(handle);
-                        CERROR("unable to start transaction: rc %d\n", rc);
-                } else {
-                        rc = fsfilt_add_journal_cb(obd, 0, handle,
-                                                   target_client_add_cb, exp);
-                        if (rc == 0) {
-                                spin_lock(&exp->exp_lock);
-                                exp->exp_need_sync = 1;
-                                spin_unlock(&exp->exp_lock);
-                        }
-                        rc = fsfilt_write_record(obd, filter->fo_rcvd_filp,
-                                                 fed->fed_fcd,
-                                                 sizeof(*fed->fed_fcd),
-                                                 &off, rc /* sync if no cb */);
-                        fsfilt_commit(obd,
-                                      filter->fo_rcvd_filp->f_dentry->d_inode,
-                                      handle, 0);
-                }
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                if (rc) {
-                        CERROR("error writing %s client idx %u: rc %d\n",
-                               LAST_RCVD, fed->fed_lr_idx, rc);
-                        RETURN(rc);
-                }
-        }
-        RETURN(0);
-}
-
-static int filter_client_free(struct obd_export *exp)
-{
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        struct filter_obd *filter = &exp->exp_obd->u.filter;
-        struct obd_device *obd = exp->exp_obd;
-        struct filter_client_data zero_fcd;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        loff_t off;
-        ENTRY;
-
-        if (fed->fed_fcd == NULL)
-                RETURN(0);
-
-        /* XXX if fcd_uuid were a real obd_uuid, I could use obd_uuid_equals */
-        if (strcmp(fed->fed_fcd->fcd_uuid, obd->obd_uuid.uuid ) == 0)
-                GOTO(free, 0);
-
-        CDEBUG(D_INFO, "freeing client at idx %u, offset %lld with UUID '%s'\n",
-               fed->fed_lr_idx, off, fed->fed_fcd->fcd_uuid);
-
-        LASSERT(filter->fo_last_rcvd_slots != NULL);
-
-        off = fed->fed_lr_off;
-
-        /* Don't clear fed_lr_idx here as it is likely also unset.  At worst
-         * we leak a client slot that will be cleaned on the next recovery. */
-        if (off <= 0) {
-                CERROR("%s: client idx %d has med_off %lld\n",
-                       obd->obd_name, fed->fed_lr_idx, off);
-                GOTO(free, rc = -EINVAL);
-        }
-
-        /* Clear the bit _after_ zeroing out the client so we don't
-           race with filter_client_add and zero out new clients.*/
-        if (!test_bit(fed->fed_lr_idx, filter->fo_last_rcvd_slots)) {
-                CERROR("FILTER client %u: bit already clear in bitmap!!\n",
-                       fed->fed_lr_idx);
-                LBUG();
-        }
-
-        if (!(exp->exp_flags & OBD_OPT_FAILOVER)) {
-                memset(&zero_fcd, 0, sizeof zero_fcd);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = fsfilt_write_record(obd, filter->fo_rcvd_filp, &zero_fcd,
-                                         sizeof(zero_fcd), &off,
-                                         (!exp->exp_libclient ||
-                                          exp->exp_need_sync));
-
-                if (rc == 0)
-                        /* update server's transno */
-                        filter_update_server_data(obd, filter->fo_rcvd_filp,
-                                                  filter->fo_fsd,
-                                                  !exp->exp_libclient);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                CDEBUG(rc == 0 ? D_INFO : D_ERROR,
-                       "zeroing out client %s at idx %u (%llu) in %s rc %d\n",
-                       fed->fed_fcd->fcd_uuid, fed->fed_lr_idx, fed->fed_lr_off,
-                       LAST_RCVD, rc);
-        }
-
-        if (!test_and_clear_bit(fed->fed_lr_idx, filter->fo_last_rcvd_slots)) {
-                CERROR("FILTER client %u: bit already clear in bitmap!!\n",
-                       fed->fed_lr_idx);
-                LBUG();
-        }
-
-        EXIT;
-free:
-        OBD_FREE(fed->fed_fcd, sizeof(*fed->fed_fcd));
-        fed->fed_fcd = NULL;
-
-        return 0;
-}
-
-/* drop fmd reference, free it if last ref. must be called with fed_lock held.*/
-static inline void filter_fmd_put_nolock(struct filter_export_data *fed,
-                                         struct filter_mod_data *fmd)
-{
-        LASSERT_SPIN_LOCKED(&fed->fed_lock);
-        if (--fmd->fmd_refcount == 0) {
-                /* XXX when we have persistent reservations and the handle
-                 * is stored herein we need to drop it here. */
-                fed->fed_mod_count--;
-                list_del(&fmd->fmd_list);
-                OBD_SLAB_FREE(fmd, ll_fmd_cachep, sizeof(*fmd));
-        }
-}
-
-/* drop fmd reference, free it if last ref */
-void filter_fmd_put(struct obd_export *exp, struct filter_mod_data *fmd)
-{
-        struct filter_export_data *fed;
-
-        if (fmd == NULL)
-                return;
-
-        fed = &exp->exp_filter_data;
-        spin_lock(&fed->fed_lock);
-        filter_fmd_put_nolock(fed, fmd); /* caller reference */
-        spin_unlock(&fed->fed_lock);
-}
-
-/* expire entries from the end of the list if there are too many
- * or they are too old */
-static void filter_fmd_expire_nolock(struct filter_obd *filter,
-                                     struct filter_export_data *fed,
-                                     struct filter_mod_data *keep)
-{
-        struct filter_mod_data *fmd, *tmp;
-
-        list_for_each_entry_safe(fmd, tmp, &fed->fed_mod_list, fmd_list) {
-                if (fmd == keep)
-                        break;
-
-                if (time_before(jiffies, fmd->fmd_expire) &&
-                    fed->fed_mod_count < filter->fo_fmd_max_num)
-                        break;
-
-                list_del_init(&fmd->fmd_list);
-                filter_fmd_put_nolock(fed, fmd); /* list reference */
-        }
-}
-
-void filter_fmd_expire(struct obd_export *exp)
-{
-        spin_lock(&exp->exp_filter_data.fed_lock);
-        filter_fmd_expire_nolock(&exp->exp_obd->u.filter,
-                                 &exp->exp_filter_data, NULL);
-        spin_unlock(&exp->exp_filter_data.fed_lock);
-}
-
-/* find specified objid, group in export fmd list.
- * caller must hold fed_lock and take fmd reference itself */
-static struct filter_mod_data *filter_fmd_find_nolock(struct filter_obd *filter,
-                                                struct filter_export_data *fed,
-                                                obd_id objid, obd_gr group)
-{
-        struct filter_mod_data *found = NULL, *fmd;
-
-        LASSERT_SPIN_LOCKED(&fed->fed_lock);
-
-        list_for_each_entry_reverse(fmd, &fed->fed_mod_list, fmd_list) {
-                if (fmd->fmd_id == objid && fmd->fmd_gr == group) {
-                        found = fmd;
-                        list_del(&fmd->fmd_list);
-                        list_add_tail(&fmd->fmd_list, &fed->fed_mod_list);
-                        fmd->fmd_expire = jiffies + filter->fo_fmd_max_age;
-                        break;
-                }
-        }
-
-        filter_fmd_expire_nolock(filter, fed, found);
-
-        return found;
-}
-
-/* Find fmd based on objid and group, or return NULL if not found. */
-struct filter_mod_data *filter_fmd_find(struct obd_export *exp,
-                                        obd_id objid, obd_gr group)
-{
-        struct filter_mod_data *fmd;
-
-        spin_lock(&exp->exp_filter_data.fed_lock);
-        fmd = filter_fmd_find_nolock(&exp->exp_obd->u.filter,
-                                     &exp->exp_filter_data, objid, group);
-        if (fmd)
-                fmd->fmd_refcount++;    /* caller reference */
-        spin_unlock(&exp->exp_filter_data.fed_lock);
-
-        return fmd;
-}
-
-/* Find fmd based on objid and group, or create a new one if none is found.
- * It is possible for this function to return NULL under memory pressure,
- * or if objid = 0 is passed (which will only cause old entries to expire).
- * Currently this is not fatal because any fmd state is transient and
- * may also be freed when it gets sufficiently old. */
-struct filter_mod_data *filter_fmd_get(struct obd_export *exp,
-                                       obd_id objid, obd_gr group)
-{
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        struct filter_mod_data *found = NULL, *fmd_new = NULL;
-
-        OBD_SLAB_ALLOC(fmd_new, ll_fmd_cachep, CFS_ALLOC_IO, sizeof(*fmd_new));
-
-        spin_lock(&fed->fed_lock);
-        found = filter_fmd_find_nolock(&exp->exp_obd->u.filter,fed,objid,group);
-        if (fmd_new) {
-                if (found == NULL) {
-                        list_add_tail(&fmd_new->fmd_list, &fed->fed_mod_list);
-                        fmd_new->fmd_id = objid;
-                        fmd_new->fmd_gr = group;
-                        fmd_new->fmd_refcount++;   /* list reference */
-                        found = fmd_new;
-                        fed->fed_mod_count++;
-                } else {
-                        OBD_SLAB_FREE(fmd_new, ll_fmd_cachep, sizeof(*fmd_new));
-                }
-        }
-        if (found) {
-                found->fmd_refcount++;          /* caller reference */
-                found->fmd_expire = jiffies +
-                        exp->exp_obd->u.filter.fo_fmd_max_age;
-        }
-
-        spin_unlock(&fed->fed_lock);
-
-        return found;
-}
-
-#ifdef DO_FMD_DROP
-/* drop fmd list reference so it will disappear when last reference is put.
- * This isn't so critical because it would in fact only affect the one client
- * that is doing the unlink and at worst we have an stale entry referencing
- * an object that should never be used again. */
-static void filter_fmd_drop(struct obd_export *exp, obd_id objid, obd_gr group)
-{
-        struct filter_mod_data *found = NULL;
-
-        spin_lock(&exp->exp_filter_data.fed_lock);
-        found = filter_fmd_find_nolock(&exp->exp_filter_data, objid, group);
-        if (found) {
-                list_del_init(&found->fmd_list);
-                filter_fmd_put_nolock(&exp->exp_filter_data, found);
-        }
-        spin_unlock(&exp->exp_filter_data.fed_lock);
-}
-#else
-#define filter_fmd_drop(exp, objid, group)
-#endif
-
-/* remove all entries from fmd list */
-static void filter_fmd_cleanup(struct obd_export *exp)
-{
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        struct filter_mod_data *fmd = NULL, *tmp;
-
-        spin_lock(&fed->fed_lock);
-        list_for_each_entry_safe(fmd, tmp, &fed->fed_mod_list, fmd_list) {
-                list_del_init(&fmd->fmd_list);
-                filter_fmd_put_nolock(fed, fmd);
-        }
-        spin_unlock(&fed->fed_lock);
-}
-
-static int filter_init_export(struct obd_export *exp)
-{
-        spin_lock_init(&exp->exp_filter_data.fed_lock);
-        INIT_LIST_HEAD(&exp->exp_filter_data.fed_mod_list);
-        
-        spin_lock(&exp->exp_lock);
-        exp->exp_connecting = 1;
-        spin_unlock(&exp->exp_lock);
-
-        return 0;
-}
-
-static int filter_free_server_data(struct filter_obd *filter)
-{
-        OBD_FREE(filter->fo_fsd, sizeof(*filter->fo_fsd));
-        filter->fo_fsd = NULL;
-        OBD_FREE(filter->fo_last_rcvd_slots, LR_MAX_CLIENTS / 8);
-        filter->fo_last_rcvd_slots = NULL;
-        return 0;
-}
-
-/* assumes caller is already in kernel ctxt */
-int filter_update_server_data(struct obd_device *obd, struct file *filp,
-                              struct lr_server_data *fsd, int force_sync)
-{
-        loff_t off = 0;
-        int rc;
-        ENTRY;
-
-        CDEBUG(D_INODE, "server uuid      : %s\n", fsd->lsd_uuid);
-        CDEBUG(D_INODE, "server last_rcvd : "LPU64"\n",
-               le64_to_cpu(fsd->lsd_last_transno));
-        CDEBUG(D_INODE, "server last_mount: "LPU64"\n",
-               le64_to_cpu(fsd->lsd_mount_count));
-
-        fsd->lsd_compat14 = fsd->lsd_last_transno;
-        rc = fsfilt_write_record(obd, filp, fsd, sizeof(*fsd), &off,force_sync);
-        if (rc)
-                CERROR("error writing lr_server_data: rc = %d\n", rc);
-
-        RETURN(rc);
-}
-
-int filter_update_last_objid(struct obd_device *obd, obd_gr group,
-                             int force_sync)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        __u64 tmp;
-        loff_t off = 0;
-        int rc;
-        ENTRY;
-
-        if (filter->fo_last_objid_files[group] == NULL) {
-                CERROR("Object group "LPU64" not fully setup; not updating "
-                       "last_objid\n", group);
-                RETURN(-EINVAL);
-        }
-
-        CDEBUG(D_INODE, "%s: server last_objid for group "LPU64": "LPU64"\n",
-               obd->obd_name, group, filter->fo_last_objids[group]);
-
-        tmp = cpu_to_le64(filter->fo_last_objids[group]);
-        rc = fsfilt_write_record(obd, filter->fo_last_objid_files[group],
-                                 &tmp, sizeof(tmp), &off, force_sync);
-        if (rc)
-                CERROR("error writing group "LPU64" last objid: rc = %d\n",
-                       group, rc);
-        RETURN(rc);
-}
-
-/* assumes caller has already in kernel ctxt */
-static int filter_init_server_data(struct obd_device *obd, struct file * filp)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        struct lr_server_data *fsd;
-        struct filter_client_data *fcd = NULL;
-        struct inode *inode = filp->f_dentry->d_inode;
-        unsigned long last_rcvd_size = i_size_read(inode);
-        __u64 mount_count;
-        int cl_idx;
-        loff_t off = 0;
-        int rc;
-
-        /* ensure padding in the struct is the correct size */
-        CLASSERT (offsetof(struct lr_server_data, lsd_padding) +
-                 sizeof(fsd->lsd_padding) == LR_SERVER_SIZE);
-        CLASSERT (offsetof(struct filter_client_data, fcd_padding) +
-                 sizeof(fcd->fcd_padding) == LR_CLIENT_SIZE);
-
-        OBD_ALLOC(fsd, sizeof(*fsd));
-        if (!fsd)
-                RETURN(-ENOMEM);
-        filter->fo_fsd = fsd;
-
-        OBD_ALLOC(filter->fo_last_rcvd_slots, LR_MAX_CLIENTS / 8);
-        if (filter->fo_last_rcvd_slots == NULL) {
-                OBD_FREE(fsd, sizeof(*fsd));
-                RETURN(-ENOMEM);
-        }
-
-        if (last_rcvd_size == 0) {
-                LCONSOLE_WARN("%s: new disk, initializing\n", obd->obd_name);
-
-                memcpy(fsd->lsd_uuid, obd->obd_uuid.uuid,sizeof(fsd->lsd_uuid));
-                fsd->lsd_last_transno = 0;
-                mount_count = fsd->lsd_mount_count = 0;
-                fsd->lsd_server_size = cpu_to_le32(LR_SERVER_SIZE);
-                fsd->lsd_client_start = cpu_to_le32(LR_CLIENT_START);
-                fsd->lsd_client_size = cpu_to_le16(LR_CLIENT_SIZE);
-                fsd->lsd_subdir_count = cpu_to_le16(FILTER_SUBDIR_COUNT);
-                filter->fo_subdir_count = FILTER_SUBDIR_COUNT;
-                fsd->lsd_feature_incompat = cpu_to_le32(OBD_INCOMPAT_OST);
-        } else {
-                rc = fsfilt_read_record(obd, filp, fsd, sizeof(*fsd), &off);
-                if (rc) {
-                        CDEBUG(D_INODE,"OBD filter: error reading %s: rc %d\n",
-                               LAST_RCVD, rc);
-                        GOTO(err_fsd, rc);
-                }
-                if (strcmp(fsd->lsd_uuid, obd->obd_uuid.uuid) != 0) {
-                        LCONSOLE_ERROR_MSG(0x134, "Trying to start OBD %s using"
-                                           " the wrong disk %s. Were the /dev/ "
-                                           "assignments rearranged?\n",
-                                           obd->obd_uuid.uuid, fsd->lsd_uuid);
-                        GOTO(err_fsd, rc = -EINVAL);
-                }
-                mount_count = le64_to_cpu(fsd->lsd_mount_count);
-                filter->fo_subdir_count = le16_to_cpu(fsd->lsd_subdir_count);
-                /* COMPAT_146 */
-                /* Assume old last_rcvd format unless I_C_LR is set */
-                if (!(fsd->lsd_feature_incompat &
-                      cpu_to_le32(OBD_INCOMPAT_COMMON_LR)))
-                        fsd->lsd_last_transno = fsd->lsd_compat14;
-                /* end COMPAT_146 */
-        }
-
-        if (fsd->lsd_feature_incompat & ~cpu_to_le32(FILTER_INCOMPAT_SUPP)) {
-                CERROR("%s: unsupported incompat filesystem feature(s) %x\n",
-                       obd->obd_name, le32_to_cpu(fsd->lsd_feature_incompat) &
-                       ~FILTER_INCOMPAT_SUPP);
-                GOTO(err_fsd, rc = -EINVAL);
-        }
-        if (fsd->lsd_feature_rocompat & ~cpu_to_le32(FILTER_ROCOMPAT_SUPP)) {
-                CERROR("%s: unsupported read-only filesystem feature(s) %x\n",
-                       obd->obd_name, le32_to_cpu(fsd->lsd_feature_rocompat) &
-                       ~FILTER_ROCOMPAT_SUPP);
-                /* Do something like remount filesystem read-only */
-                GOTO(err_fsd, rc = -EINVAL);
-        }
-
-        CDEBUG(D_INODE, "%s: server last_transno : "LPU64"\n",
-               obd->obd_name, le64_to_cpu(fsd->lsd_last_transno));
-        CDEBUG(D_INODE, "%s: server mount_count: "LPU64"\n",
-               obd->obd_name, mount_count + 1);
-        CDEBUG(D_INODE, "%s: server data size: %u\n",
-               obd->obd_name, le32_to_cpu(fsd->lsd_server_size));
-        CDEBUG(D_INODE, "%s: per-client data start: %u\n",
-               obd->obd_name, le32_to_cpu(fsd->lsd_client_start));
-        CDEBUG(D_INODE, "%s: per-client data size: %u\n",
-               obd->obd_name, le32_to_cpu(fsd->lsd_client_size));
-        CDEBUG(D_INODE, "%s: server subdir_count: %u\n",
-               obd->obd_name, le16_to_cpu(fsd->lsd_subdir_count));
-        CDEBUG(D_INODE, "%s: last_rcvd clients: %lu\n", obd->obd_name,
-               last_rcvd_size <= le32_to_cpu(fsd->lsd_client_start) ? 0 :
-               (last_rcvd_size - le32_to_cpu(fsd->lsd_client_start)) /
-                le16_to_cpu(fsd->lsd_client_size));
-
-        if (!obd->obd_replayable) {
-                CWARN("%s: recovery support OFF\n", obd->obd_name);
-                GOTO(out, rc = 0);
-        }
-
-        for (cl_idx = 0, off = le32_to_cpu(fsd->lsd_client_start);
-             off < last_rcvd_size; cl_idx++) {
-                __u64 last_rcvd;
-                struct obd_export *exp;
-                struct filter_export_data *fed;
-
-                if (!fcd) {
-                        OBD_ALLOC(fcd, sizeof(*fcd));
-                        if (!fcd)
-                                GOTO(err_client, rc = -ENOMEM);
-                }
-
-                /* Don't assume off is incremented properly by
-                 * fsfilt_read_record(), in case sizeof(*fcd)
-                 * isn't the same as fsd->lsd_client_size.  */
-                off = le32_to_cpu(fsd->lsd_client_start) +
-                        cl_idx * le16_to_cpu(fsd->lsd_client_size);
-                rc = fsfilt_read_record(obd, filp, fcd, sizeof(*fcd), &off);
-                if (rc) {
-                        CERROR("error reading FILT %s idx %d off %llu: rc %d\n",
-                               LAST_RCVD, cl_idx, off, rc);
-                        break; /* read error shouldn't cause startup to fail */
-                }
-
-                if (fcd->fcd_uuid[0] == '\0') {
-                        CDEBUG(D_INFO, "skipping zeroed client at offset %d\n",
-                               cl_idx);
-                        continue;
-                }
-
-                last_rcvd = le64_to_cpu(fcd->fcd_last_rcvd);
-
-                /* These exports are cleaned up by filter_disconnect(), so they
-                 * need to be set up like real exports as filter_connect() does.
-                 */
-                exp = class_new_export(obd, (struct obd_uuid *)fcd->fcd_uuid);
-                CDEBUG(D_HA, "RCVRNG CLIENT uuid: %s idx: %d lr: "LPU64
-                       " srv lr: "LPU64"\n", fcd->fcd_uuid, cl_idx,
-                       last_rcvd, le64_to_cpu(fsd->lsd_last_transno));
-                if (IS_ERR(exp)) {
-                        if (PTR_ERR(exp) == -EALREADY) {
-                                /* export already exists, zero out this one */
-                                CERROR("Zeroing out duplicate export due to "
-                                       "bug 10479.\n");
-                                fcd->fcd_uuid[0] = '\0';
-                        } else {
-                                GOTO(err_client, rc = PTR_ERR(exp));
-                        }
-                } else {
-                        fed = &exp->exp_filter_data;
-                        fed->fed_fcd = fcd;
-                        filter_export_stats_init(obd, exp, 0);
-                        rc = filter_client_add(obd, exp, cl_idx, 0);
-                        /* can't fail for existing client */
-                        LASSERTF(rc == 0, "rc = %d\n", rc);
-
-                        fcd = NULL;
-
-                        spin_lock(&exp->exp_lock);
-                        exp->exp_replay_needed = 1;
-                        exp->exp_connecting = 0;
-                        spin_unlock(&exp->exp_lock);
-
-                        obd->obd_recoverable_clients++;
-                        obd->obd_max_recoverable_clients++;
-                        class_export_put(exp);
-                }
-
-                /* Need to check last_rcvd even for duplicated exports. */
-                CDEBUG(D_OTHER, "client at idx %d has last_rcvd = "LPU64"\n",
-                       cl_idx, last_rcvd);
-
-                if (last_rcvd > le64_to_cpu(fsd->lsd_last_transno))
-                        fsd->lsd_last_transno = cpu_to_le64(last_rcvd);
-        }
-
-        if (fcd)
-                OBD_FREE(fcd, sizeof(*fcd));
-
-        obd->obd_last_committed = le64_to_cpu(fsd->lsd_last_transno);
-
-        if (obd->obd_recoverable_clients) {
-                CWARN("RECOVERY: service %s, %d recoverable clients, "
-                      "last_rcvd "LPU64"\n", obd->obd_name,
-                      obd->obd_recoverable_clients,
-                      le64_to_cpu(fsd->lsd_last_transno));
-                obd->obd_next_recovery_transno = obd->obd_last_committed + 1;
-                obd->obd_recovering = 1;
-                obd->obd_recovery_start = 0;
-                obd->obd_recovery_end = 0;
-                obd->obd_recovery_timeout = OBD_RECOVERY_FACTOR * obd_timeout;
-#ifdef CRAY_XT3
-                /* b13079: this should be set to desired value for ost */
-                obd->obd_recovery_max_time = OBD_RECOVERY_MAX_TIME;
-#endif
-        }
-
-out:
-        filter->fo_mount_count = mount_count + 1;
-        fsd->lsd_mount_count = cpu_to_le64(filter->fo_mount_count);
-
-        /* save it, so mount count and last_transno is current */
-        rc = filter_update_server_data(obd, filp, filter->fo_fsd, 1);
-        if (rc)
-                GOTO(err_client, rc);
-
-        RETURN(0);
-
-err_client:
-        class_disconnect_exports(obd);
-err_fsd:
-        filter_free_server_data(filter);
-        RETURN(rc);
-}
-
-static int filter_cleanup_groups(struct obd_device *obd)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        struct file *filp;
-        struct dentry *dentry;
-        int i;
-        ENTRY;
-
-        if (filter->fo_dentry_O_groups != NULL) {
-                for (i = 0; i < FILTER_GROUPS; i++) {
-                        dentry = filter->fo_dentry_O_groups[i];
-                        if (dentry != NULL)
-                                f_dput(dentry);
-                }
-                OBD_FREE(filter->fo_dentry_O_groups,
-                         FILTER_GROUPS * sizeof(*filter->fo_dentry_O_groups));
-                filter->fo_dentry_O_groups = NULL;
-        }
-        if (filter->fo_last_objid_files != NULL) {
-                for (i = 0; i < FILTER_GROUPS; i++) {
-                        filp = filter->fo_last_objid_files[i];
-                        if (filp != NULL)
-                                filp_close(filp, 0);
-                }
-                OBD_FREE(filter->fo_last_objid_files,
-                         FILTER_GROUPS * sizeof(*filter->fo_last_objid_files));
-                filter->fo_last_objid_files = NULL;
-        }
-        if (filter->fo_dentry_O_sub != NULL) {
-                for (i = 0; i < filter->fo_subdir_count; i++) {
-                        dentry = filter->fo_dentry_O_sub[i];
-                        if (dentry != NULL)
-                                f_dput(dentry);
-                }
-                OBD_FREE(filter->fo_dentry_O_sub,
-                         filter->fo_subdir_count *
-                         sizeof(*filter->fo_dentry_O_sub));
-                filter->fo_dentry_O_sub = NULL;
-        }
-        if (filter->fo_last_objids != NULL) {
-                OBD_FREE(filter->fo_last_objids,
-                         FILTER_GROUPS * sizeof(*filter->fo_last_objids));
-                filter->fo_last_objids = NULL;
-        }
-        if (filter->fo_dentry_O != NULL) {
-                f_dput(filter->fo_dentry_O);
-                filter->fo_dentry_O = NULL;
-        }
-        RETURN(0);
-}
-
-/* FIXME: object groups */
-static int filter_prep_groups(struct obd_device *obd)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        struct dentry *dentry, *O_dentry;
-        struct file *filp;
-        int i, rc = 0, cleanup_phase = 0;
-        ENTRY;
-
-        O_dentry = simple_mkdir(current->fs->pwd, "O", 0700, 1);
-        CDEBUG(D_INODE, "got/created O: %p\n", O_dentry);
-        if (IS_ERR(O_dentry)) {
-                rc = PTR_ERR(O_dentry);
-                CERROR("cannot open/create O: rc = %d\n", rc);
-                GOTO(cleanup, rc);
-        }
-        filter->fo_dentry_O = O_dentry;
-        cleanup_phase = 1; /* O_dentry */
-
-        OBD_ALLOC(filter->fo_last_objids, FILTER_GROUPS * sizeof(__u64));
-        if (filter->fo_last_objids == NULL)
-                GOTO(cleanup, rc = -ENOMEM);
-        cleanup_phase = 2; /* groups */
-
-        OBD_ALLOC(filter->fo_dentry_O_groups, FILTER_GROUPS * sizeof(dentry));
-        if (filter->fo_dentry_O_groups == NULL)
-                GOTO(cleanup, rc = -ENOMEM);
-        OBD_ALLOC(filter->fo_last_objid_files, FILTER_GROUPS * sizeof(filp));
-        if (filter->fo_last_objid_files == NULL)
-                GOTO(cleanup, rc = -ENOMEM);
-
-        for (i = 0; i < FILTER_GROUPS; i++) {
-                char name[25];
-                loff_t off = 0;
-
-                sprintf(name, "%d", i);
-                dentry = simple_mkdir(O_dentry, name, 0700, 1);
-                CDEBUG(D_INODE, "got/created O/%s: %p\n", name, dentry);
-                if (IS_ERR(dentry)) {
-                        rc = PTR_ERR(dentry);
-                        CERROR("cannot lookup/create O/%s: rc = %d\n",
-                               name, rc);
-                        GOTO(cleanup, rc);
-                }
-                filter->fo_dentry_O_groups[i] = dentry;
-
-                sprintf(name, "O/%d/LAST_ID", i);
-                filp = filp_open(name, O_CREAT | O_RDWR, 0700);
-                if (IS_ERR(filp)) {
-                        rc = PTR_ERR(filp);
-                        CERROR("cannot create %s: rc = %d\n", name, rc);
-                        GOTO(cleanup, rc);
-                }
-                filter->fo_last_objid_files[i] = filp;
-
-                if (i_size_read(filp->f_dentry->d_inode) == 0) {
-                        filter->fo_last_objids[i] = FILTER_INIT_OBJID;
-                        rc = filter_update_last_objid(obd, i, 1);
-                        if (rc)
-                                GOTO(cleanup, rc);
-                        continue;
-                }
-
-                rc = fsfilt_read_record(obd, filp, &filter->fo_last_objids[i],
-                                        sizeof(__u64), &off);
-                if (rc) {
-                        CDEBUG(D_INODE,"OBD filter: error reading %s: rc %d\n",
-                               name, rc);
-                        GOTO(cleanup, rc);
-                }
-                filter->fo_last_objids[i] =
-                        le64_to_cpu(filter->fo_last_objids[i]);
-                CDEBUG(D_HA, "%s: server last_objid group %d: "LPU64"\n",
-                       obd->obd_name, i, filter->fo_last_objids[i]);
-        }
-
-        if (filter->fo_subdir_count) {
-                O_dentry = filter->fo_dentry_O_groups[0];
-                OBD_ALLOC(filter->fo_dentry_O_sub,
-                          filter->fo_subdir_count * sizeof(dentry));
-                if (filter->fo_dentry_O_sub == NULL)
-                        GOTO(cleanup, rc = -ENOMEM);
-
-                for (i = 0; i < filter->fo_subdir_count; i++) {
-                        char dir[20];
-                        snprintf(dir, sizeof(dir), "d%u", i);
-
-                        dentry = simple_mkdir(O_dentry, dir, 0700, 1);
-                        CDEBUG(D_INODE, "got/created O/0/%s: %p\n", dir,dentry);
-                        if (IS_ERR(dentry)) {
-                                rc = PTR_ERR(dentry);
-                                CERROR("can't lookup/create O/0/%s: rc = %d\n",
-                                       dir, rc);
-                                GOTO(cleanup, rc);
-                        }
-                        filter->fo_dentry_O_sub[i] = dentry;
-                }
-        }
-        RETURN(0);
-
- cleanup:
-        filter_cleanup_groups(obd);
-        return rc;
-}
-
-/* setup the object store with correct subdirectories */
-static int filter_prep(struct obd_device *obd)
-{
-        struct lvfs_run_ctxt saved;
-        struct filter_obd *filter = &obd->u.filter;
-        struct file *file;
-        struct inode *inode;
-        int rc = 0;
-        ENTRY;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        file = filp_open(LAST_RCVD, O_RDWR | O_CREAT | O_LARGEFILE, 0700);
-        if (!file || IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("OBD filter: cannot open/create %s: rc = %d\n",
-                       LAST_RCVD, rc);
-                GOTO(out, rc);
-        }
-        filter->fo_rcvd_filp = file;
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", LAST_RCVD,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(err_filp, rc = -ENOENT);
-        }
-
-        inode = file->f_dentry->d_parent->d_inode;
-        /* We use i_op->unlink directly in filter_vfs_unlink() */
-        if (!inode->i_op || !inode->i_op->create || !inode->i_op->unlink) {
-                CERROR("%s: filesystem does not support create/unlink ops\n",
-                       obd->obd_name);
-                GOTO(err_filp, rc = -EOPNOTSUPP);
-        }
-
-        rc = filter_init_server_data(obd, file);
-        if (rc) {
-                CERROR("cannot read %s: rc = %d\n", LAST_RCVD, rc);
-                GOTO(err_filp, rc);
-        }
-        /* open and create health check io file*/
-        file = filp_open(HEALTH_CHECK, O_RDWR | O_CREAT, 0644);
-        if (IS_ERR(file)) {
-                rc = PTR_ERR(file);
-                CERROR("OBD filter: cannot open/create %s rc = %d\n",
-                       HEALTH_CHECK, rc);
-                GOTO(err_filp, rc);
-        }
-        filter->fo_health_check_filp = file;
-        if (!S_ISREG(file->f_dentry->d_inode->i_mode)) {
-                CERROR("%s is not a regular file!: mode = %o\n", HEALTH_CHECK,
-                       file->f_dentry->d_inode->i_mode);
-                GOTO(err_health_check, rc = -ENOENT);
-        }
-        rc = lvfs_check_io_health(obd, file);
-        if (rc)
-                GOTO(err_health_check, rc);
-
-        rc = filter_prep_groups(obd);
-        if (rc)
-                GOTO(err_server_data, rc);
- out:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        return(rc);
-
- err_server_data:
-        //class_disconnect_exports(obd, 0);
-        filter_free_server_data(filter);
- err_health_check:
-        if (filp_close(filter->fo_health_check_filp, 0))
-                CERROR("can't close %s after error\n", HEALTH_CHECK);
-        filter->fo_health_check_filp = NULL;
- err_filp:
-        if (filp_close(filter->fo_rcvd_filp, 0))
-                CERROR("can't close %s after error\n", LAST_RCVD);
-        filter->fo_rcvd_filp = NULL;
-        goto out;
-}
-
-/* cleanup the filter: write last used object id to status file */
-static void filter_post(struct obd_device *obd)
-{
-        struct lvfs_run_ctxt saved;
-        struct filter_obd *filter = &obd->u.filter;
-        int rc, i;
-
-        /* XXX: filter_update_lastobjid used to call fsync_dev.  It might be
-         * best to start a transaction with h_sync, because we removed this
-         * from lastobjid */
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = filter_update_server_data(obd, filter->fo_rcvd_filp,
-                                       filter->fo_fsd, 0);
-        if (rc)
-                CERROR("error writing server data: rc = %d\n", rc);
-
-        for (i = 0; i < FILTER_GROUPS; i++) {
-                rc = filter_update_last_objid(obd, i, (i == FILTER_GROUPS - 1));
-                if (rc)
-                        CERROR("error writing group %d lastobjid: rc = %d\n",
-                               i, rc);
-        }
-
-        rc = filp_close(filter->fo_rcvd_filp, 0);
-        filter->fo_rcvd_filp = NULL;
-        if (rc)
-                CERROR("error closing %s: rc = %d\n", LAST_RCVD, rc);
-
-        rc = filp_close(filter->fo_health_check_filp, 0);
-        filter->fo_health_check_filp = NULL;
-        if (rc)
-                CERROR("error closing %s: rc = %d\n", HEALTH_CHECK, rc);
-
-        filter_cleanup_groups(obd);
-        filter_free_server_data(filter);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-}
-
-static void filter_set_last_id(struct filter_obd *filter,
-                               obd_id id, obd_gr group)
-{
-        LASSERT(filter->fo_fsd != NULL);
-        LASSERT(group <= FILTER_GROUPS);
-
-        spin_lock(&filter->fo_objidlock);
-        filter->fo_last_objids[group] = id;
-        spin_unlock(&filter->fo_objidlock);
-}
-
-obd_id filter_last_id(struct filter_obd *filter, obd_gr group)
-{
-        obd_id id;
-        LASSERT(filter->fo_fsd != NULL);
-        LASSERT(group <= FILTER_GROUPS);
-
-        /* FIXME: object groups */
-        spin_lock(&filter->fo_objidlock);
-        id = filter->fo_last_objids[group];
-        spin_unlock(&filter->fo_objidlock);
-
-        return id;
-}
-
-static int filter_lock_dentry(struct obd_device *obd, struct dentry *dparent)
-{
-        LOCK_INODE_MUTEX(dparent->d_inode);
-        return 0;
-}
-
-/* We never dget the object parent, so DON'T dput it either */
-struct dentry *filter_parent(struct obd_device *obd, obd_gr group, obd_id objid)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        LASSERT(group < FILTER_GROUPS); /* FIXME: object groups */
-
-        if (group > 0 || filter->fo_subdir_count == 0)
-                return filter->fo_dentry_O_groups[group];
-
-        return filter->fo_dentry_O_sub[objid & (filter->fo_subdir_count - 1)];
-}
-
-/* We never dget the object parent, so DON'T dput it either */
-struct dentry *filter_parent_lock(struct obd_device *obd, obd_gr group,
-                                  obd_id objid)
-{
-        unsigned long now = jiffies;
-        struct dentry *dparent = filter_parent(obd, group, objid);
-        int rc;
-
-        if (IS_ERR(dparent))
-                return dparent;
-
-        rc = filter_lock_dentry(obd, dparent);
-        fsfilt_check_slow(obd, now, "parent lock");
-        return rc ? ERR_PTR(rc) : dparent;
-}
-
-/* We never dget the object parent, so DON'T dput it either */
-static void filter_parent_unlock(struct dentry *dparent)
-{
-        UNLOCK_INODE_MUTEX(dparent->d_inode);
-}
-
-/* How to get files, dentries, inodes from object id's.
- *
- * If dir_dentry is passed, the caller has already locked the parent
- * appropriately for this operation (normally a write lock).  If
- * dir_dentry is NULL, we do a read lock while we do the lookup to
- * avoid races with create/destroy and such changing the directory
- * internal to the filesystem code. */
-struct dentry *filter_fid2dentry(struct obd_device *obd,
-                                 struct dentry *dir_dentry,
-                                 obd_gr group, obd_id id)
-{
-        struct dentry *dparent = dir_dentry;
-        struct dentry *dchild;
-        char name[32];
-        int len;
-        ENTRY;
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_ENOENT) &&
-            !obd->u.filter.fo_destroy_in_progress) {
-                /* don't fail lookups for orphan recovery, it causes
-                 * later LBUGs when objects still exist during precreate */
-                CDEBUG(D_INFO, "*** obd_fail_loc=%x ***\n",OBD_FAIL_OST_ENOENT);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        if (id == 0) {
-                CERROR("fatal: invalid object id 0\n");
-                RETURN(ERR_PTR(-ESTALE));
-        }
-
-        len = sprintf(name, LPU64, id);
-        if (dir_dentry == NULL) {
-                dparent = filter_parent_lock(obd, group, id);
-                if (IS_ERR(dparent)) {
-                        CERROR("%s: error getting object "LPU64":"LPU64
-                               " parent: rc %ld\n", obd->obd_name,
-                               id, group, PTR_ERR(dparent));
-                        RETURN(dparent);
-                }
-        }
-        CDEBUG(D_INODE, "looking up object O/%.*s/%s\n",
-               dparent->d_name.len, dparent->d_name.name, name);
-        dchild = /*ll_*/lookup_one_len(name, dparent, len);
-        if (dir_dentry == NULL)
-                filter_parent_unlock(dparent);
-        if (IS_ERR(dchild)) {
-                CERROR("%s: child lookup error %ld\n", obd->obd_name,
-                       PTR_ERR(dchild));
-                RETURN(dchild);
-        }
-
-        if (dchild->d_inode != NULL && is_bad_inode(dchild->d_inode)) {
-                CERROR("%s: got bad object "LPU64" inode %lu\n",
-                       obd->obd_name, id, dchild->d_inode->i_ino);
-                f_dput(dchild);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        CDEBUG(D_INODE, "got child objid %s: %p, count = %d\n",
-               name, dchild, atomic_read(&dchild->d_count));
-
-        LASSERT(atomic_read(&dchild->d_count) > 0);
-
-        RETURN(dchild);
-}
-
-static int filter_prepare_destroy(struct obd_device *obd, obd_id objid)
-{
-        struct lustre_handle lockh;
-        int flags = LDLM_AST_DISCARD_DATA, rc;
-        struct ldlm_res_id res_id = { .name = { objid } };
-        ldlm_policy_data_t policy = { .l_extent = { 0, OBD_OBJECT_EOF } };
-
-        ENTRY;
-        /* Tell the clients that the object is gone now and that they should
-         * throw away any cached pages. */
-        rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id, LDLM_EXTENT,
-                                    &policy, LCK_PW, &flags, ldlm_blocking_ast,
-                                    ldlm_completion_ast, NULL, NULL, 0, NULL,
-                                    &lockh);
-
-        /* We only care about the side-effects, just drop the lock. */
-        if (rc == ELDLM_OK)
-                ldlm_lock_decref(&lockh, LCK_PW);
-
-        RETURN(rc);
-}
-
-/* This is vfs_unlink() without down(i_sem).  If we call regular vfs_unlink()
- * we have 2.6 lock ordering issues with filter_commitrw_write() as it takes
- * i_sem before starting a handle, while filter_destroy() + vfs_unlink do the
- * reverse.  Caller must take i_sem before starting the transaction and we
- * drop it here before the inode is removed from the dentry.  bug 4180/6984 */
-int filter_vfs_unlink(struct inode *dir, struct dentry *dentry)
-{
-        int rc;
-        ENTRY;
-
-        /* don't need dir->i_zombie for 2.4, it is for rename/unlink of dir
-         * itself we already hold dir->i_mutex for child create/unlink ops */
-        LASSERT(dentry->d_inode != NULL);
-        LASSERT(TRYLOCK_INODE_MUTEX(dir) == 0);
-        LASSERT(TRYLOCK_INODE_MUTEX(dentry->d_inode) == 0);
-
-
-        /* may_delete() */
-        if (/*!dentry->d_inode ||*/dentry->d_parent->d_inode != dir)
-                GOTO(out, rc = -ENOENT);
-
-        rc = ll_permission(dir, MAY_WRITE | MAY_EXEC, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        if (IS_APPEND(dir))
-                GOTO(out, rc = -EPERM);
-
-        /* check_sticky() */
-        if ((dentry->d_inode->i_uid != current->fsuid && !capable(CAP_FOWNER))||
-            IS_APPEND(dentry->d_inode) || IS_IMMUTABLE(dentry->d_inode))
-                GOTO(out, rc = -EPERM);
-
-        /* NOTE: This might need to go outside i_mutex, though it isn't clear if
-         *       that was done because of journal_start (which is already done
-         *       here) or some other ordering issue. */
-        DQUOT_INIT(dir);
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        rc = security_inode_unlink(dir, dentry);
-        if (rc)
-                GOTO(out, rc);
-#endif
-
-        rc = dir->i_op->unlink(dir, dentry);
-out:
-        /* need to drop i_mutex before we lose inode reference */
-        UNLOCK_INODE_MUTEX(dentry->d_inode);
-        if (rc == 0)
-                d_delete(dentry);
-
-        RETURN(rc);
-}
-
-/* Caller must hold LCK_PW on parent and push us into kernel context.
- * Caller must hold child i_mutex, we drop it always.
- * Caller is also required to ensure that dchild->d_inode exists. */
-static int filter_destroy_internal(struct obd_device *obd, obd_id objid,
-                                   obd_gr group, struct dentry *dparent,
-                                   struct dentry *dchild)
-{
-        struct inode *inode = dchild->d_inode;
-        int rc;
-
-        if (inode->i_nlink != 1 || atomic_read(&inode->i_count) != 1) {
-                CERROR("destroying objid %.*s ino %lu nlink %lu count %d\n",
-                       dchild->d_name.len, dchild->d_name.name, inode->i_ino,
-                       (unsigned long)inode->i_nlink,
-                       atomic_read(&inode->i_count));
-        }
-
-        rc = filter_vfs_unlink(dparent->d_inode, dchild);
-        if (rc)
-                CERROR("error unlinking objid %.*s: rc %d\n",
-                       dchild->d_name.len, dchild->d_name.name, rc);
-        return(rc);
-}
-
-struct filter_intent_args {
-        struct ldlm_lock **victim;
-        __u64 size;
-        int *liblustre;
-};
-
-static enum interval_iter filter_intent_cb(struct interval_node *n,
-                                           void *args)
-{
-        struct ldlm_interval *node = (struct ldlm_interval *)n;
-        struct filter_intent_args *arg = (struct filter_intent_args*)args;
-        __u64 size = arg->size;
-        struct ldlm_lock **v = arg->victim;
-        struct ldlm_lock *lck;
-
-        /* If the interval is lower than the current file size,
-         * just break. */
-        if (interval_high(n) <= size)
-                return INTERVAL_ITER_STOP;
-
-        list_for_each_entry(lck, &node->li_group, l_sl_policy) {
-                /* Don't send glimpse ASTs to liblustre clients.
-                 * They aren't listening for them, and they do
-                 * entirely synchronous I/O anyways. */
-                if (lck->l_export == NULL ||
-                    lck->l_export->exp_libclient == 1)
-                        continue;
-
-                if (*arg->liblustre)
-                        *arg->liblustre = 0;
-
-                if (*v == NULL) {
-                        *v = LDLM_LOCK_GET(lck);
-                } else if ((*v)->l_policy_data.l_extent.start <
-                           lck->l_policy_data.l_extent.start) {
-                        LDLM_LOCK_PUT(*v);
-                        *v = LDLM_LOCK_GET(lck);
-                }
-
-                /* the same policy group - every lock has the
-                 * same extent, so needn't do it any more */
-                break;
-        }
-
-        return INTERVAL_ITER_CONT;
-}
-
-static int filter_intent_policy(struct ldlm_namespace *ns,
-                                struct ldlm_lock **lockp, void *req_cookie,
-                                ldlm_mode_t mode, int flags, void *data)
-{
-        struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
-        struct ptlrpc_request *req = req_cookie;
-        struct ldlm_lock *lock = *lockp, *l = NULL;
-        struct ldlm_resource *res = lock->l_resource;
-        ldlm_processing_policy policy;
-        struct ost_lvb *res_lvb, *reply_lvb;
-        struct ldlm_reply *rep;
-        ldlm_error_t err;
-        int idx, rc, tmpflags = 0, only_liblustre = 1;
-        struct ldlm_interval_tree *tree;
-        struct filter_intent_args arg;
-        int repsize[3] = { [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                           [DLM_LOCKREPLY_OFF]   = sizeof(*rep),
-                           [DLM_REPLY_REC_OFF]   = sizeof(*reply_lvb) };
-        ENTRY;
-
-        policy = ldlm_get_processing_policy(res);
-        LASSERT(policy != NULL);
-        LASSERT(req != NULL);
-
-        rc = lustre_pack_reply(req, 3, repsize, NULL);
-        if (rc)
-                RETURN(req->rq_status = rc);
-
-        rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF, sizeof(*rep));
-        LASSERT(rep != NULL);
-
-        reply_lvb = lustre_msg_buf(req->rq_repmsg, DLM_REPLY_REC_OFF,
-                                   sizeof(*reply_lvb));
-        LASSERT(reply_lvb != NULL);
-
-        //fixup_handle_for_resent_req(req, lock, &lockh);
-
-        /* If we grant any lock at all, it will be a whole-file read lock.
-         * Call the extent policy function to see if our request can be
-         * granted, or is blocked. 
-         * If the OST lock has LDLM_FL_HAS_INTENT set, it means a glimpse lock
-         */
-        lock->l_policy_data.l_extent.start = 0;
-        lock->l_policy_data.l_extent.end = OBD_OBJECT_EOF;
-        lock->l_req_mode = LCK_PR;
-
-        LASSERT(ns == res->lr_namespace);
-        lock_res(res);
-        rc = policy(lock, &tmpflags, 0, &err, &rpc_list);
-        check_res_locked(res);
-
-        /* FIXME: we should change the policy function slightly, to not make
-         * this list at all, since we just turn around and free it */
-        while (!list_empty(&rpc_list)) {
-                struct ldlm_lock *wlock =
-                        list_entry(rpc_list.next, struct ldlm_lock, l_cp_ast);
-                LASSERT((lock->l_flags & LDLM_FL_AST_SENT) == 0);
-                LASSERT(lock->l_flags & LDLM_FL_CP_REQD);
-                lock->l_flags &= ~LDLM_FL_CP_REQD;
-                list_del_init(&wlock->l_cp_ast);
-                LDLM_LOCK_PUT(wlock);
-        }
-
-        /* The lock met with no resistance; we're finished. */
-        if (rc == LDLM_ITER_CONTINUE) {
-                /* do not grant locks to the liblustre clients: they cannot
-                 * handle ASTs robustly.  We need to do this while still
-                 * holding ns_lock to avoid the lock remaining on the res_link
-                 * list (and potentially being added to l_pending_list by an
-                 * AST) when we are going to drop this lock ASAP. */
-                if (lock->l_export->exp_libclient ||
-                    OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2)) {
-                        ldlm_resource_unlink_lock(lock);
-                        err = ELDLM_LOCK_ABORTED;
-                } else {
-                        err = ELDLM_LOCK_REPLACED;
-                }
-                unlock_res(res);
-                RETURN(err);
-        }
-
-        /* Do not grant any lock, but instead send GL callbacks.  The extent
-         * policy nicely created a list of all PW locks for us.  We will choose
-         * the highest of those which are larger than the size in the LVB, if
-         * any, and perform a glimpse callback. */
-        res_lvb = res->lr_lvb_data;
-        LASSERT(res_lvb != NULL);
-        *reply_lvb = *res_lvb;
-
-        /*
-         * ->ns_lock guarantees that no new locks are granted, and,
-         * therefore, that res->lr_lvb_data cannot increase beyond the
-         * end of already granted lock. As a result, it is safe to
-         * check against "stale" reply_lvb->lvb_size value without
-         * res->lr_lvb_sem.
-         */
-        arg.size = reply_lvb->lvb_size;
-        arg.victim = &l;
-        arg.liblustre = &only_liblustre;
-        for (idx = 0; idx < LCK_MODE_NUM; idx++) {
-                tree = &res->lr_itree[idx];
-                if (tree->lit_mode == LCK_PR)
-                        continue;
-
-                interval_iterate_reverse(tree->lit_root, 
-                                         filter_intent_cb, &arg);
-        }
-        unlock_res(res);
-
-        /* There were no PW locks beyond the size in the LVB; finished. */
-        if (l == NULL) {
-                if (only_liblustre) {
-                        /* If we discovered a liblustre client with a PW lock,
-                         * however, the LVB may be out of date!  The LVB is
-                         * updated only on glimpse (which we don't do for
-                         * liblustre clients) and cancel (which the client
-                         * obviously has not yet done).  So if it has written
-                         * data but kept the lock, the LVB is stale and needs
-                         * to be updated from disk.
-                         *
-                         * Of course, this will all disappear when we switch to
-                         * taking liblustre locks on the OST. */
-                        ldlm_res_lvbo_update(res, NULL, 0, 1);
-                }
-                RETURN(ELDLM_LOCK_ABORTED);
-        }
-
-        /*
-         * This check is for lock taken in filter_prepare_destroy() that does
-         * not have l_glimpse_ast set. So the logic is: if there is a lock
-         * with no l_glimpse_ast set, this object is being destroyed already.
-         *
-         * Hence, if you are grabbing DLM locks on the server, always set
-         * non-NULL glimpse_ast (e.g., ldlm_request.c:ldlm_glimpse_ast()).
-         */
-        if (l->l_glimpse_ast == NULL) {
-                /* We are racing with unlink(); just return -ENOENT */
-                rep->lock_policy_res1 = -ENOENT;
-                goto out;
-        }
-
-        LASSERTF(l->l_glimpse_ast != NULL, "l == %p", l);
-        rc = l->l_glimpse_ast(l, NULL); /* this will update the LVB */
-        /* Update the LVB from disk if the AST failed (this is a legal race) */
-        /*
-         * XXX nikita: situation when ldlm_server_glimpse_ast() failed before
-         * sending ast is not handled. This can result in lost client writes.
-         */
-        if (rc != 0)
-                ldlm_res_lvbo_update(res, NULL, 0, 1);
-
-        lock_res(res);
-        *reply_lvb = *res_lvb;
-        unlock_res(res);
-
- out:
-        LDLM_LOCK_PUT(l);
-
-        RETURN(ELDLM_LOCK_ABORTED);
-}
-
-/*
- * per-obd_device iobuf pool.
- *
- * To avoid memory deadlocks in low-memory setups, amount of dynamic
- * allocations in write-path has to be minimized (see bug 5137).
- *
- * Pages, niobuf_local's and niobuf_remote's are pre-allocated and attached to
- * OST threads (see ost_thread_{init,done}()).
- *
- * "iobuf's" used by filter cannot be attached to OST thread, however, because
- * at the OST layer there are only (potentially) multiple obd_device of type
- * unknown at the time of OST thread creation.
- *
- * Instead array of iobuf's is attached to struct filter_obd (->fo_iobuf_pool
- * field). This array has size OST_MAX_THREADS, so that each OST thread uses
- * it's very own iobuf.
- *
- * Functions below
- *
- *     filter_kiobuf_pool_init()
- *
- *     filter_kiobuf_pool_done()
- *
- *     filter_iobuf_get()
- *
- * operate on this array. They are "generic" in a sense that they don't depend
- * on actual type of iobuf's (the latter depending on Linux kernel version).
- */
-
-/*
- * destroy pool created by filter_iobuf_pool_init
- */
-static void filter_iobuf_pool_done(struct filter_obd *filter)
-{
-        struct filter_iobuf **pool;
-        int i;
-
-        ENTRY;
-
-        pool = filter->fo_iobuf_pool;
-        if (pool != NULL) {
-                for (i = 0; i < filter->fo_iobuf_count; ++ i) {
-                        if (pool[i] != NULL)
-                                filter_free_iobuf(pool[i]);
-                }
-                OBD_FREE(pool, filter->fo_iobuf_count * sizeof pool[0]);
-                filter->fo_iobuf_pool = NULL;
-        }
-        EXIT;
-}
-
-/*
- * pre-allocate pool of iobuf's to be used by filter_{prep,commit}rw_write().
- */
-static int filter_iobuf_pool_init(struct filter_obd *filter)
-{
-        void **pool;
-
-        ENTRY;
-
-        OBD_ALLOC_GFP(filter->fo_iobuf_pool, OSS_THREADS_MAX * sizeof(*pool),
-                      GFP_KERNEL);
-        if (filter->fo_iobuf_pool == NULL)
-                RETURN(-ENOMEM);
-
-        filter->fo_iobuf_count = OSS_THREADS_MAX;
-
-        RETURN(0);
-}
-
-/* Return iobuf allocated for @thread_id.  We don't know in advance how
- * many threads there will be so we allocate a large empty array and only
- * fill in those slots that are actually in use.
- * If we haven't allocated a pool entry for this thread before, do so now. */
-void *filter_iobuf_get(struct filter_obd *filter, struct obd_trans_info *oti)
-{
-        int thread_id                    = oti ? oti->oti_thread_id : -1;
-        struct filter_iobuf  *pool       = NULL;
-        struct filter_iobuf **pool_place = NULL;
-
-        if (thread_id >= 0) {
-                LASSERT(thread_id < filter->fo_iobuf_count);
-                pool = *(pool_place = &filter->fo_iobuf_pool[thread_id]);
-        }
-
-        if (unlikely(pool == NULL)) {
-                pool = filter_alloc_iobuf(filter, OBD_BRW_WRITE,
-                                          PTLRPC_MAX_BRW_PAGES);
-                if (pool_place != NULL)
-                        *pool_place = pool;
-        }
-
-        return pool;
-}
-
-/* mount the file system (secretly).  lustre_cfg parameters are:
- * 1 = device
- * 2 = fstype
- * 3 = flags: failover=f, failout=n
- * 4 = mount options
- */
-int filter_common_setup(struct obd_device *obd, obd_count len, void *buf,
-                        void *option)
-{
-        struct lustre_cfg* lcfg = buf;
-        struct filter_obd *filter = &obd->u.filter;
-        struct vfsmount *mnt;
-        struct lustre_mount_info *lmi;
-        struct obd_uuid uuid;
-        __u8 *uuid_ptr;
-        char *str, *label;
-        char ns_name[48];
-        int rc;
-        ENTRY;
-
-        if (lcfg->lcfg_bufcount < 3 ||
-            LUSTRE_CFG_BUFLEN(lcfg, 1) < 1 ||
-            LUSTRE_CFG_BUFLEN(lcfg, 2) < 1)
-                RETURN(-EINVAL);
-
-        lmi = server_get_mount(obd->obd_name);
-        if (lmi) {
-                /* We already mounted in lustre_fill_super.
-                   lcfg bufs 1, 2, 4 (device, fstype, mount opts) are ignored.*/
-                struct lustre_sb_info *lsi = s2lsi(lmi->lmi_sb);
-                mnt = lmi->lmi_mnt;
-                obd->obd_fsops = fsfilt_get_ops(MT_STR(lsi->lsi_ldd));
-        } else {
-                /* old path - used by lctl */
-                CERROR("Using old MDS mount method\n");
-                mnt = ll_kern_mount(lustre_cfg_string(lcfg, 2),
-                                    MS_NOATIME|MS_NODIRATIME,
-                                    lustre_cfg_string(lcfg, 1), option);
-                if (IS_ERR(mnt)) {
-                        rc = PTR_ERR(mnt);
-                        LCONSOLE_ERROR_MSG(0x135, "Can't mount disk %s (%d)\n",
-                                           lustre_cfg_string(lcfg, 1), rc);
-                        RETURN(rc);
-                }
-
-                obd->obd_fsops = fsfilt_get_ops(lustre_cfg_string(lcfg, 2));
-        }
-        if (IS_ERR(obd->obd_fsops))
-                GOTO(err_mntput, rc = PTR_ERR(obd->obd_fsops));
-
-        rc = filter_iobuf_pool_init(filter);
-        if (rc != 0)
-                GOTO(err_ops, rc);
-
-        LASSERT(!lvfs_check_rdonly(lvfs_sbdev(mnt->mnt_sb)));
-
-        /* failover is the default */
-        obd->obd_replayable = 1;
-
-        if (lcfg->lcfg_bufcount > 3 && LUSTRE_CFG_BUFLEN(lcfg, 3) > 0) {
-                str = lustre_cfg_string(lcfg, 3);
-                if (strchr(str, 'n')) {
-                        CWARN("%s: recovery disabled\n", obd->obd_name);
-                        obd->obd_replayable = 0;
-                }
-        }
-
-        filter->fo_vfsmnt = mnt;
-        obd->u.obt.obt_sb = mnt->mnt_sb;
-        filter->fo_fstype = mnt->mnt_sb->s_type->name;
-        CDEBUG(D_SUPER, "%s: mnt = %p\n", filter->fo_fstype, mnt);
-
-        rc = fsfilt_setup(obd, obd->u.obt.obt_sb);
-        if (rc)
-                GOTO(err_ops, rc);
-
-        OBD_SET_CTXT_MAGIC(&obd->obd_lvfs_ctxt);
-        obd->obd_lvfs_ctxt.pwdmnt = mnt;
-        obd->obd_lvfs_ctxt.pwd = mnt->mnt_root;
-        obd->obd_lvfs_ctxt.fs = get_ds();
-        obd->obd_lvfs_ctxt.cb_ops = filter_lvfs_ops;
-
-        rc = filter_prep(obd);
-        if (rc)
-                GOTO(err_ops, rc);
-
-        filter->fo_destroy_in_progress = 0;
-        sema_init(&filter->fo_create_lock, 1);
-        spin_lock_init(&filter->fo_translock);
-        spin_lock_init(&filter->fo_objidlock);
-        INIT_LIST_HEAD(&filter->fo_export_list);
-        sema_init(&filter->fo_alloc_lock, 1);
-        init_brw_stats(&filter->fo_filter_stats);
-        filter->fo_readcache_max_filesize = FILTER_MAX_CACHE_SIZE;
-        filter->fo_fmd_max_num = FILTER_FMD_MAX_NUM_DEFAULT;
-        filter->fo_fmd_max_age = FILTER_FMD_MAX_AGE_DEFAULT;
-
-        sprintf(ns_name, "filter-%s", obd->obd_uuid.uuid);
-        obd->obd_namespace = ldlm_namespace_new(ns_name, LDLM_NAMESPACE_SERVER,
-                                                LDLM_NAMESPACE_GREEDY);
-        if (obd->obd_namespace == NULL)
-                GOTO(err_post, rc = -ENOMEM);
-        obd->obd_namespace->ns_lvbp = obd;
-        obd->obd_namespace->ns_lvbo = &filter_lvbo;
-        ldlm_register_intent(obd->obd_namespace, filter_intent_policy);
-
-        ptlrpc_init_client(LDLM_CB_REQUEST_PORTAL, LDLM_CB_REPLY_PORTAL,
-                           "filter_ldlm_cb_client", &obd->obd_ldlm_client);
-
-        rc = llog_cat_initialize(obd, 1, NULL);
-        if (rc) {
-                CERROR("failed to setup llogging subsystems\n");
-                GOTO(err_post, rc);
-        }
-
-        rc = lquota_setup(filter_quota_interface_ref, obd);
-        if (rc)
-                GOTO(err_post, rc);
-
-        uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb);
-        if (uuid_ptr != NULL) {
-                class_uuid_unparse(uuid_ptr, &uuid);
-                str = uuid.uuid;
-        } else {
-                str = "no UUID";
-        }
-
-        label = fsfilt_get_label(obd, obd->u.obt.obt_sb);
-
-        if (obd->obd_recovering) {
-                LCONSOLE_WARN("OST %s now serving %s (%s%s%s), but will be in "
-                              "recovery for at least %d:%.02d, or until %d "
-                              "client%s reconnect. During this time new clients"
-                              " will not be allowed to connect. "
-                              "Recovery progress can be monitored by watching "
-                              "/proc/fs/lustre/obdfilter/%s/recovery_status.\n",
-                              obd->obd_name, lustre_cfg_string(lcfg, 1),
-                              label ?: "", label ? "/" : "", str,
-                              obd->obd_recovery_timeout / 60,
-                              obd->obd_recovery_timeout % 60,
-                              obd->obd_max_recoverable_clients,
-                              (obd->obd_max_recoverable_clients == 1) ? "":"s",
-                              obd->obd_name);
-        } else {
-                LCONSOLE_INFO("OST %s now serving %s (%s%s%s) with recovery "
-                              "%s\n", obd->obd_name, lustre_cfg_string(lcfg, 1),
-                              label ?: "", label ? "/" : "", str,
-                              obd->obd_replayable ? "enabled" : "disabled");
-        }
-
-        RETURN(0);
-
-err_post:
-        filter_post(obd);
-err_ops:
-        fsfilt_put_ops(obd->obd_fsops);
-        filter_iobuf_pool_done(filter);
-err_mntput:
-        server_put_mount(obd->obd_name, mnt);
-        obd->u.obt.obt_sb = 0;
-        return rc;
-}
-
-static int filter_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars;
-        struct lustre_cfg* lcfg = buf;
-        unsigned long addr;
-        struct page *page;
-        int rc;
-
-        CLASSERT(offsetof(struct obd_device, u.obt) ==
-                 offsetof(struct obd_device, u.filter.fo_obt));
-
-        if (!LUSTRE_CFG_BUFLEN(lcfg, 1) || !LUSTRE_CFG_BUFLEN(lcfg, 2))
-                RETURN(-EINVAL);
-
-        /* 2.6.9 selinux wants a full option page for do_kern_mount (bug6471) */
-        OBD_PAGE_ALLOC(page, CFS_ALLOC_STD);
-        if (!page)
-                RETURN(-ENOMEM);
-        addr = (unsigned long)cfs_page_address(page);
-        clear_page((void *)addr);
-
-        /* lprocfs must be setup before the filter so state can be safely added
-         * to /proc incrementally as the filter is setup */
-        lprocfs_filter_init_vars(&lvars);
-        if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0 &&
-            lprocfs_alloc_obd_stats(obd, LPROC_FILTER_LAST) == 0) {
-                /* Init obdfilter private stats here */
-                lprocfs_counter_init(obd->obd_stats, LPROC_FILTER_READ_BYTES,
-                                     LPROCFS_CNTR_AVGMINMAX,
-                                     "read_bytes", "bytes");
-                lprocfs_counter_init(obd->obd_stats, LPROC_FILTER_WRITE_BYTES,
-                                     LPROCFS_CNTR_AVGMINMAX,
-                                     "write_bytes", "bytes");
-                lproc_filter_attach_seqstat(obd);
-                obd->obd_proc_exports_entry = proc_mkdir("exports",
-                                                         obd->obd_proc_entry);
-        }
-        if (obd->obd_proc_exports_entry)
-                lprocfs_add_simple(obd->obd_proc_exports_entry, "clear",
-                                   lprocfs_nid_stats_clear_read,
-                                   lprocfs_nid_stats_clear_write, obd);
-
-        memcpy((void *)addr, lustre_cfg_buf(lcfg, 4),
-               LUSTRE_CFG_BUFLEN(lcfg, 4));
-        rc = filter_common_setup(obd, len, buf, (void *)addr);
-        OBD_PAGE_FREE(page);
-
-        if (rc) {
-                remove_proc_entry("clear", obd->obd_proc_exports_entry);
-                lprocfs_free_per_client_stats(obd);
-                lprocfs_free_obd_stats(obd);
-                lprocfs_obd_cleanup(obd);
-        }
-
-        return rc;
-}
-
-static struct llog_operations filter_mds_ost_repl_logops /* initialized below*/;
-static struct llog_operations filter_size_orig_logops = {
-        lop_setup: llog_obd_origin_setup,
-        lop_cleanup: llog_obd_origin_cleanup,
-        lop_add: llog_obd_origin_add
-};
-
-static int filter_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                            int count, struct llog_catid *catid,
-                            struct obd_uuid *uuid)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        OBD_ALLOC(filter->fo_lcm, sizeof(struct llog_commit_master));
-        if (!filter->fo_lcm)
-                RETURN(-ENOMEM);
-
-        rc = llog_init_commit_master((struct llog_commit_master *)
-                                     filter->fo_lcm);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        filter_mds_ost_repl_logops = llog_client_ops;
-        filter_mds_ost_repl_logops.lop_cancel = llog_obd_repl_cancel;
-        filter_mds_ost_repl_logops.lop_connect = llog_repl_connect;
-        filter_mds_ost_repl_logops.lop_sync = llog_obd_repl_sync;
-
-        rc = llog_setup(obd, LLOG_MDS_OST_REPL_CTXT, tgt, 0, NULL,
-                        &filter_mds_ost_repl_logops);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        /* FIXME - assign unlink_cb for filter's recovery */
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_REPL_CTXT);
-        ctxt->llog_proc_cb = filter_recov_log_mds_ost_cb;
-        ctxt->loc_lcm = obd->u.filter.fo_lcm;
-        rc = llog_start_commit_thread(ctxt->loc_lcm);
-        llog_ctxt_put(ctxt);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = llog_setup(obd, LLOG_SIZE_ORIG_CTXT, tgt, 0, NULL,
-                        &filter_size_orig_logops);
-
-cleanup:
-        if (rc) {
-                llog_cleanup_commit_master(filter->fo_lcm, 0);
-                OBD_FREE(filter->fo_lcm, sizeof(struct llog_commit_master));
-                filter->fo_lcm = NULL;
-        }
-        RETURN(rc);
-}
-
-static int filter_llog_finish(struct obd_device *obd, int count)
-{
-        struct llog_ctxt *ctxt;
-        int rc = 0, rc2 = 0;
-        ENTRY;
-
-        if (obd->u.filter.fo_lcm) { 
-                llog_cleanup_commit_master((struct llog_commit_master *)
-                                           obd->u.filter.fo_lcm, 0);
-                OBD_FREE(obd->u.filter.fo_lcm, 
-                         sizeof(struct llog_commit_master));
-                obd->u.filter.fo_lcm = NULL;
-        }
-
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_REPL_CTXT);
-        if (ctxt)
-                rc = llog_cleanup(ctxt);
-
-        ctxt = llog_get_context(obd, LLOG_SIZE_ORIG_CTXT);
-        if (ctxt)
-                rc2 = llog_cleanup(ctxt);
-        if (!rc)
-                rc = rc2;
-
-        RETURN(rc);
-}
-
-static int filter_precleanup(struct obd_device *obd,
-                             enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch(stage) {
-        case OBD_CLEANUP_EARLY:
-                break;
-        case OBD_CLEANUP_EXPORTS:
-                target_cleanup_recovery(obd);
-                rc = filter_llog_finish(obd, 0);
-                break;
-        case OBD_CLEANUP_SELF_EXP:
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-static int filter_cleanup(struct obd_device *obd)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        ENTRY;
-
-        if (obd->obd_fail)
-                LCONSOLE_WARN("%s: shutting down for failover; client state "
-                              "will be preserved.\n", obd->obd_name);
-
-        if (!list_empty(&obd->obd_exports)) {
-                CERROR("%s: still has clients!\n", obd->obd_name);
-                class_disconnect_exports(obd);
-                if (!list_empty(&obd->obd_exports)) {
-                        CERROR("still has exports after forced cleanup?\n");
-                        RETURN(-EBUSY);
-                }
-        }
-
-        remove_proc_entry("clear", obd->obd_proc_exports_entry);
-        lprocfs_free_per_client_stats(obd);
-        lprocfs_free_obd_stats(obd);
-        lprocfs_obd_cleanup(obd);
-
-        lquota_cleanup(filter_quota_interface_ref, obd);
-
-        ldlm_namespace_free(obd->obd_namespace, obd->obd_force);
-
-        if (obd->u.obt.obt_sb == NULL)
-                RETURN(0);
-
-        filter_post(obd);
-
-        shrink_dcache_parent(obd->u.obt.obt_sb->s_root);
-
-        LL_DQUOT_OFF(obd->u.obt.obt_sb);
-
-        server_put_mount(obd->obd_name, filter->fo_vfsmnt);
-        obd->u.obt.obt_sb = NULL;
-
-        fsfilt_put_ops(obd->obd_fsops);
-
-        filter_iobuf_pool_done(filter);
-
-        LCONSOLE_INFO("OST %s has stopped.\n", obd->obd_name);
-
-        RETURN(0);
-}
-
-static int filter_connect_internal(struct obd_export *exp,
-                                   struct obd_connect_data *data)
-{
-        if (!data)
-                RETURN(0);
-
-        CDEBUG(D_RPCTRACE, "%s: cli %s/%p ocd_connect_flags: "LPX64
-               " ocd_version: %x ocd_grant: %d ocd_index: %u\n",
-               exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
-               data->ocd_connect_flags, data->ocd_version,
-               data->ocd_grant, data->ocd_index);
-
-        data->ocd_connect_flags &= OST_CONNECT_SUPPORTED;
-        exp->exp_connect_flags = data->ocd_connect_flags;
-        data->ocd_version = LUSTRE_VERSION_CODE;
-
-        if (exp->exp_connect_flags & OBD_CONNECT_GRANT) {
-                struct filter_export_data *fed = &exp->exp_filter_data;
-                obd_size left, want;
-
-                spin_lock(&exp->exp_obd->obd_osfs_lock);
-                left = filter_grant_space_left(exp);
-                want = data->ocd_grant;
-                filter_grant(exp, fed->fed_grant, want, left);
-                data->ocd_grant = fed->fed_grant;
-                spin_unlock(&exp->exp_obd->obd_osfs_lock);
-
-                CDEBUG(D_CACHE, "%s: cli %s/%p ocd_grant: %d want: "
-                       LPU64" left: "LPU64"\n", exp->exp_obd->obd_name,
-                       exp->exp_client_uuid.uuid, exp,
-                       data->ocd_grant, want, left);
-        }
-
-        if (data->ocd_connect_flags & OBD_CONNECT_INDEX) {
-                struct filter_obd *filter = &exp->exp_obd->u.filter;
-                struct lr_server_data *lsd = filter->fo_fsd;
-                int index = le32_to_cpu(lsd->lsd_ost_index);
-
-                if (!(lsd->lsd_feature_compat &
-                      cpu_to_le32(OBD_COMPAT_OST))) {
-                        /* this will only happen on the first connect */
-                        lsd->lsd_ost_index = cpu_to_le32(data->ocd_index);
-                        lsd->lsd_feature_compat |= cpu_to_le32(OBD_COMPAT_OST);
-                        filter_update_server_data(exp->exp_obd,
-                                                  filter->fo_rcvd_filp, lsd, 1);
-                } else if (index != data->ocd_index) {
-                        LCONSOLE_ERROR_MSG(0x136, "Connection from %s to index "
-                                           "%u doesn't match actual OST index "
-                                           "%u in last_rcvd file, bad "
-                                           "configuration?\n",
-                                           obd_export_nid2str(exp), index,
-                                           data->ocd_index);
-                        RETURN(-EBADF);
-                }
-        }
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_SIZE)) {
-                data->ocd_brw_size = 65536;
-        } else if (data->ocd_connect_flags & OBD_CONNECT_BRW_SIZE) {
-                data->ocd_brw_size = min(data->ocd_brw_size,
-                                         (__u32)(PTLRPC_MAX_BRW_PAGES <<
-                                                 CFS_PAGE_SHIFT));
-                LASSERT(data->ocd_brw_size);
-        }
-
-        if (data->ocd_connect_flags & OBD_CONNECT_CKSUM) {
-                __u32 cksum_types = data->ocd_cksum_types;
-
-                /* The client set in ocd_cksum_types the checksum types it
-                 * supports. We have to mask off the algorithms that we don't
-                 * support */
-                if (cksum_types & OBD_CKSUM_ALL)
-                        data->ocd_cksum_types &= OBD_CKSUM_ALL;
-                else
-                        data->ocd_cksum_types = OBD_CKSUM_CRC32;
-
-                CDEBUG(D_RPCTRACE, "%s: cli %s supports cksum type %x, return "
-                                   "%x\n", exp->exp_obd->obd_name,
-                                   obd_export_nid2str(exp), cksum_types,
-                                   data->ocd_cksum_types);
-        } else {
-                /* This client does not support OBD_CONNECT_CKSUM
-                 * fall back to CRC32 */
-                CDEBUG(D_RPCTRACE, "%s: cli %s does not support "
-                                   "OBD_CONNECT_CKSUM, CRC32 will be used\n",
-                                   exp->exp_obd->obd_name,
-                                   obd_export_nid2str(exp));
-        }
-
-        /* FIXME: Do the same with the MDS UUID and fsd_peeruuid.
-         * FIXME: We don't strictly need the COMPAT flag for that,
-         * FIXME: as fsd_peeruuid[0] will tell us if that is set.
-         * FIXME: We needed it for the index, as index 0 is valid. */
-
-        RETURN(0);
-}
-
-static int filter_reconnect(struct obd_export *exp, struct obd_device *obd,
-                            struct obd_uuid *cluuid,
-                            struct obd_connect_data *data)
-{
-        int rc;
-        ENTRY;
-
-        if (exp == NULL || obd == NULL || cluuid == NULL)
-                RETURN(-EINVAL);
-
-        rc = filter_connect_internal(exp, data);
-
-        RETURN(rc);
-}
-
-/* nearly identical to mds_connect */
-static int filter_connect(struct lustre_handle *conn, struct obd_device *obd,
-                          struct obd_uuid *cluuid,
-                          struct obd_connect_data *data,
-                          void *localdata)
-{
-        struct obd_export *exp;
-        struct filter_export_data *fed;
-        struct filter_client_data *fcd = NULL;
-        lnet_nid_t *client_nid = (lnet_nid_t *)localdata;
-        int rc;
-        ENTRY;
-
-        if (conn == NULL || obd == NULL || cluuid == NULL)
-                RETURN(-EINVAL);
-
-        rc = class_connect(conn, obd, cluuid);
-        if (rc)
-                RETURN(rc);
-        exp = class_conn2export(conn);
-        LASSERT(exp != NULL);
-
-        fed = &exp->exp_filter_data;
-
-        rc = filter_connect_internal(exp, data);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        filter_export_stats_init(obd, exp, *client_nid);
-
-        if (!obd->obd_replayable)
-                GOTO(cleanup, rc = 0);
-
-        OBD_ALLOC(fcd, sizeof(*fcd));
-        if (!fcd) {
-                CERROR("filter: out of memory for client data\n");
-                GOTO(cleanup, rc = -ENOMEM);
-        }
-
-        memcpy(fcd->fcd_uuid, cluuid, sizeof(fcd->fcd_uuid));
-        fed->fed_fcd = fcd;
-
-        rc = filter_client_add(obd, exp, -1, *client_nid);
-
-        GOTO(cleanup, rc);
-
-cleanup:
-        if (rc) {
-                if (fcd) {
-                        OBD_FREE(fcd, sizeof(*fcd));
-                        fed->fed_fcd = NULL;
-                }
-                class_disconnect(exp);
-        } else {
-                class_export_put(exp);
-        }
-
-        RETURN(rc);
-}
-
-/* Do extra sanity checks for grant accounting.  We do this at connect,
- * disconnect, and statfs RPC time, so it shouldn't be too bad.  We can
- * always get rid of it or turn it off when we know accounting is good. */
-static void filter_grant_sanity_check(struct obd_device *obd, const char *func)
-{
-        struct filter_export_data *fed;
-        struct obd_export *exp;
-        obd_size maxsize = obd->obd_osfs.os_blocks * obd->obd_osfs.os_bsize;
-        obd_size tot_dirty = 0, tot_pending = 0, tot_granted = 0;
-        obd_size fo_tot_dirty, fo_tot_pending, fo_tot_granted;
-
-        if (list_empty(&obd->obd_exports))
-                return;
-
-        /* We don't want to do this for large machines that do lots of
-           mounts or unmounts.  It burns... */
-        if (obd->obd_num_exports > 100)
-                return;
-
-        spin_lock(&obd->obd_osfs_lock);
-        spin_lock(&obd->obd_dev_lock);
-        list_for_each_entry(exp, &obd->obd_exports, exp_obd_chain) {
-                int error = 0;
-                fed = &exp->exp_filter_data;
-                if (fed->fed_grant < 0 || fed->fed_pending < 0 ||
-                    fed->fed_dirty < 0)
-                        error = 1;
-                if (maxsize > 0) { /* we may not have done a statfs yet */
-                        LASSERTF(fed->fed_grant + fed->fed_pending <= maxsize,
-                                 "%s: cli %s/%p %ld+%ld > "LPU64"\n", func,
-                                 exp->exp_client_uuid.uuid, exp,
-                                 fed->fed_grant, fed->fed_pending, maxsize);
-                        LASSERTF(fed->fed_dirty <= maxsize,
-                                 "%s: cli %s/%p %ld > "LPU64"\n", func,
-                                 exp->exp_client_uuid.uuid, exp,
-                                 fed->fed_dirty, maxsize);
-                }
-                if (error)
-                        CERROR("%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
-                               obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                               fed->fed_dirty, fed->fed_pending,fed->fed_grant);
-                else
-                        CDEBUG(D_CACHE, "%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
-                               obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                               fed->fed_dirty, fed->fed_pending,fed->fed_grant);
-                tot_granted += fed->fed_grant + fed->fed_pending;
-                tot_pending += fed->fed_pending;
-                tot_dirty += fed->fed_dirty;
-        }
-        fo_tot_granted = obd->u.filter.fo_tot_granted;
-        fo_tot_pending = obd->u.filter.fo_tot_pending;
-        fo_tot_dirty = obd->u.filter.fo_tot_dirty;
-        spin_unlock(&obd->obd_dev_lock);
-        spin_unlock(&obd->obd_osfs_lock);
-
-        /* Do these assertions outside the spinlocks so we don't kill system */
-        if (tot_granted != fo_tot_granted)
-                CERROR("%s: tot_granted "LPU64" != fo_tot_granted "LPU64"\n",
-                       func, tot_granted, fo_tot_granted);
-        if (tot_pending != fo_tot_pending)
-                CERROR("%s: tot_pending "LPU64" != fo_tot_pending "LPU64"\n",
-                       func, tot_pending, fo_tot_pending);
-        if (tot_dirty != fo_tot_dirty)
-                CERROR("%s: tot_dirty "LPU64" != fo_tot_dirty "LPU64"\n",
-                       func, tot_dirty, fo_tot_dirty);
-        if (tot_pending > tot_granted)
-                CERROR("%s: tot_pending "LPU64" > tot_granted "LPU64"\n",
-                       func, tot_pending, tot_granted);
-        if (tot_granted > maxsize)
-                CERROR("%s: tot_granted "LPU64" > maxsize "LPU64"\n",
-                       func, tot_granted, maxsize);
-        if (tot_dirty > maxsize)
-                CERROR("%s: tot_dirty "LPU64" > maxsize "LPU64"\n",
-                       func, tot_dirty, maxsize);
-}
-
-/* Remove this client from the grant accounting totals.  We also remove
- * the export from the obd device under the osfs and dev locks to ensure
- * that the filter_grant_sanity_check() calculations are always valid.
- * The client should do something similar when it invalidates its import. */
-static void filter_grant_discard(struct obd_export *exp)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct filter_obd *filter = &obd->u.filter;
-        struct filter_export_data *fed = &exp->exp_filter_data;
-
-        spin_lock(&obd->obd_osfs_lock);
-        spin_lock(&obd->obd_dev_lock);
-        list_del_init(&exp->exp_obd_chain);
-        spin_unlock(&obd->obd_dev_lock);
-
-        LASSERTF(filter->fo_tot_granted >= fed->fed_grant,
-                 "%s: tot_granted "LPU64" cli %s/%p fed_grant %ld\n",
-                 obd->obd_name, filter->fo_tot_granted,
-                 exp->exp_client_uuid.uuid, exp, fed->fed_grant);
-        filter->fo_tot_granted -= fed->fed_grant;
-        LASSERTF(filter->fo_tot_pending >= fed->fed_pending,
-                 "%s: tot_pending "LPU64" cli %s/%p fed_pending %ld\n",
-                 obd->obd_name, filter->fo_tot_pending,
-                 exp->exp_client_uuid.uuid, exp, fed->fed_pending);
-        /* fo_tot_pending is handled in filter_grant_commit as bulk finishes */
-        LASSERTF(filter->fo_tot_dirty >= fed->fed_dirty,
-                 "%s: tot_dirty "LPU64" cli %s/%p fed_dirty %ld\n",
-                 obd->obd_name, filter->fo_tot_dirty,
-                 exp->exp_client_uuid.uuid, exp, fed->fed_dirty);
-        filter->fo_tot_dirty -= fed->fed_dirty;
-        fed->fed_dirty = 0;
-        fed->fed_grant = 0;
-
-        spin_unlock(&obd->obd_osfs_lock);
-}
-
-static int filter_destroy_export(struct obd_export *exp)
-{
-        ENTRY;
-
-        if (exp->exp_filter_data.fed_pending)
-                CERROR("%s: cli %s/%p has %lu pending on destroyed export\n",
-                       exp->exp_obd->obd_name, exp->exp_client_uuid.uuid,
-                       exp, exp->exp_filter_data.fed_pending);
-
-        lquota_clearinfo(filter_quota_interface_ref, exp, exp->exp_obd);
-
-        target_destroy_export(exp);
-
-        if (obd_uuid_equals(&exp->exp_client_uuid, &exp->exp_obd->obd_uuid))
-                RETURN(0);
-
-        lprocfs_exp_cleanup(exp);
-
-        if (exp->exp_obd->obd_replayable)
-                filter_client_free(exp);
-        else
-                fsfilt_sync(exp->exp_obd, exp->exp_obd->u.obt.obt_sb);
-
-        filter_grant_discard(exp);
-        filter_fmd_cleanup(exp);
-
-        if (!(exp->exp_flags & OBD_OPT_FORCE))
-                filter_grant_sanity_check(exp->exp_obd, __FUNCTION__);
-
-        RETURN(0);
-}
-
-/* also incredibly similar to mds_disconnect */
-static int filter_disconnect(struct obd_export *exp)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct llog_ctxt *ctxt;
-        int rc, err;
-        ENTRY;
-
-        LASSERT(exp);
-        class_export_get(exp);
-
-        if (!(exp->exp_flags & OBD_OPT_FORCE))
-                filter_grant_sanity_check(obd, __FUNCTION__);
-        filter_grant_discard(exp);
-
-        /* Disconnect early so that clients can't keep using export */
-        rc = class_disconnect(exp);
-        if (exp->exp_obd->obd_namespace != NULL)
-                ldlm_cancel_locks_for_export(exp);
-
-        /* flush any remaining cancel messages out to the target */
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_REPL_CTXT);
-        err = llog_sync(ctxt, exp);
-        llog_ctxt_put(ctxt);
-
-        if (err)
-                CERROR("error flushing logs to MDS: rc %d\n", err);
-
-        class_export_put(exp);
-        RETURN(rc);
-}
-
-static int filter_ping(struct obd_export *exp)
-{
-        filter_fmd_expire(exp);
-
-        return 0;
-}
-
-struct dentry *__filter_oa2dentry(struct obd_device *obd, struct obdo *oa,
-                                  const char *what, int quiet)
-{
-        struct dentry *dchild = NULL;
-
-        if (!(oa->o_valid & OBD_MD_FLGROUP))
-                oa->o_gr = 0;
-
-        dchild = filter_fid2dentry(obd, NULL, oa->o_gr, oa->o_id);
-
-        if (IS_ERR(dchild)) {
-                CERROR("%s error looking up object: "LPU64"\n",
-                       what, oa->o_id);
-                RETURN(dchild);
-        }
-
-        if (dchild->d_inode == NULL) {
-                if (!quiet)
-                        CERROR("%s: %s on non-existent object: "LPU64"\n",
-                               obd->obd_name, what, oa->o_id);
-                f_dput(dchild);
-                RETURN(ERR_PTR(-ENOENT));
-        }
-
-        return dchild;
-}
-
-static int filter_getattr(struct obd_export *exp, struct obd_info *oinfo)
-{
-        struct dentry *dentry = NULL;
-        struct obd_device *obd;
-        int rc = 0;
-        ENTRY;
-
-        obd = class_exp2obd(exp);
-        if (obd == NULL) {
-                CDEBUG(D_IOCTL, "invalid client export %p\n", exp);
-                RETURN(-EINVAL);
-        }
-
-        dentry = filter_oa2dentry(obd, oinfo->oi_oa);
-        if (IS_ERR(dentry))
-                RETURN(PTR_ERR(dentry));
-
-        /* Limit the valid bits in the return data to what we actually use */
-        oinfo->oi_oa->o_valid = OBD_MD_FLID;
-        obdo_from_inode(oinfo->oi_oa, dentry->d_inode, FILTER_VALID_FLAGS);
-
-        f_dput(dentry);
-        RETURN(rc);
-}
-
-/* this should be enabled/disabled in condition to enabled/disabled large
- * inodes (fast EAs) in backing store FS. */
-int filter_update_fidea(struct obd_export *exp, struct inode *inode,
-                        void *handle, struct obdo *oa)
-{
-        struct obd_device *obd = exp->exp_obd;
-        int rc = 0;
-        ENTRY;
-
-        if (oa->o_valid & OBD_MD_FLFID) {
-                struct filter_fid ff;
-
-                if (!(oa->o_valid & OBD_MD_FLGROUP))
-                        oa->o_gr = 0;
-
-                /* packing fid and converting it to LE for storing into EA.
-                 * Here ->o_stripe_idx should be filled by LOV and rest of
-                 * fields - by client. */
-                ff.ff_fid.id = cpu_to_le64(oa->o_fid);
-                ff.ff_fid.f_type = cpu_to_le32(oa->o_stripe_idx);
-                ff.ff_fid.generation = cpu_to_le32(oa->o_generation);
-                ff.ff_objid = cpu_to_le64(oa->o_id);
-                ff.ff_group = cpu_to_le64(oa->o_gr);
-
-                CDEBUG(D_INODE, "storing filter fid EA ("LPU64"/%u/%u"
-                       LPU64"/"LPU64")\n", oa->o_fid, oa->o_stripe_idx,
-                       oa->o_generation, oa->o_id, oa->o_gr);
-
-                rc = fsfilt_set_md(obd, inode, handle, &ff, sizeof(ff), "fid");
-                if (rc)
-                        CERROR("store fid in object failed! rc: %d\n", rc);
-        } else {
-                CDEBUG(D_HA, "OSS object without fid info!\n");
-        }
-
-        RETURN(rc);
-}
-
-/* this is called from filter_truncate() until we have filter_punch() */
-int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
-                            struct obdo *oa, struct obd_trans_info *oti)
-{
-        unsigned int orig_ids[MAXQUOTAS] = {0, 0};
-        struct llog_cookie *fcc = NULL;
-        struct filter_obd *filter;
-        int rc, err, locked = 0, sync = 0;
-        unsigned int ia_valid;
-        struct inode *inode;
-        struct iattr iattr;
-        void *handle;
-        ENTRY;
-
-        LASSERT(dentry != NULL);
-        LASSERT(!IS_ERR(dentry));
-
-        inode = dentry->d_inode;
-        LASSERT(inode != NULL);
-
-        filter = &exp->exp_obd->u.filter;
-        iattr_from_obdo(&iattr, oa, oa->o_valid);
-        ia_valid = iattr.ia_valid;
-
-        if (oa->o_valid & OBD_MD_FLCOOKIE) {
-                OBD_ALLOC(fcc, sizeof(*fcc));
-                if (fcc != NULL)
-                        memcpy(fcc, obdo_logcookie(oa), sizeof(*fcc));
-        }
-
-        if (ia_valid & ATTR_SIZE || ia_valid & (ATTR_UID | ATTR_GID)) {
-                DQUOT_INIT(inode);
-                LOCK_INODE_MUTEX(inode);
-                locked = 1;
-        }
-
-        /* If the inode still has SUID+SGID bits set (see filter_precreate())
-         * then we will accept the UID+GID sent by the client during write for
-         * initializing the ownership of this inode.  We only allow this to
-         * happen once so clear these bits in setattr. In 2.6 kernels it is
-         * possible to get ATTR_UID and ATTR_GID separately, so we only clear
-         * the flags that are actually being set. */
-        if (ia_valid & (ATTR_UID | ATTR_GID)) {
-                CDEBUG(D_INODE, "update UID/GID to %lu/%lu\n",
-                       (unsigned long)oa->o_uid, (unsigned long)oa->o_gid);
-
-                if ((inode->i_mode & S_ISUID) && (ia_valid & ATTR_UID)) {
-                        if (!(ia_valid & ATTR_MODE)) {
-                                iattr.ia_mode = inode->i_mode;
-                                iattr.ia_valid |= ATTR_MODE;
-                        }
-                        iattr.ia_mode &= ~S_ISUID;
-                }
-                if ((inode->i_mode & S_ISGID) && (ia_valid & ATTR_GID)) {
-                        if (!(iattr.ia_valid & ATTR_MODE)) {
-                                iattr.ia_mode = inode->i_mode;
-                                iattr.ia_valid |= ATTR_MODE;
-                        }
-                        iattr.ia_mode &= ~S_ISGID;
-                }
-
-                orig_ids[USRQUOTA] = inode->i_uid;
-                orig_ids[GRPQUOTA] = inode->i_gid;
-                handle = fsfilt_start_log(exp->exp_obd, inode,
-                                          FSFILT_OP_SETATTR, oti, 1);
-
-                if (IS_ERR(handle))
-                        GOTO(out_unlock, rc = PTR_ERR(handle));
-
-                /* update inode EA only once when inode is suid bit marked. As
-                 * on 2.6.x UID and GID may be set separately, we check here
-                 * only one of them to avoid double setting. */
-                if (inode->i_mode & S_ISUID)
-                        filter_update_fidea(exp, inode, handle, oa);
-        } else {
-                handle = fsfilt_start(exp->exp_obd, inode,
-                                      FSFILT_OP_SETATTR, oti);
-
-                if (IS_ERR(handle))
-                        GOTO(out_unlock, rc = PTR_ERR(handle));
-        }
-
-        if (oa->o_valid & OBD_MD_FLFLAGS) {
-                rc = fsfilt_iocontrol(exp->exp_obd, inode, NULL,
-                                      EXT3_IOC_SETFLAGS, (long)&oa->o_flags);
-        } else {
-                rc = fsfilt_setattr(exp->exp_obd, dentry, handle, &iattr, 1);
-                if (fcc != NULL)
-                        /* set cancel cookie callback function */
-                        sync = fsfilt_add_journal_cb(exp->exp_obd, 0, handle,
-                                                     filter_cancel_cookies_cb,
-                                                     fcc);
-        }
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_SETATTR_CREDITS))
-                fsfilt_extend(exp->exp_obd, inode, 0, handle);
-
-        /* The truncate might have used up our transaction credits.  Make
-         * sure we have one left for the last_rcvd update. */
-        err = fsfilt_extend(exp->exp_obd, inode, 1, handle);
-        rc = filter_finish_transno(exp, oti, rc, sync);
-        if (sync) {
-                filter_cancel_cookies_cb(exp->exp_obd, 0, fcc, rc);
-                fcc = NULL;
-        }
-
-        err = fsfilt_commit(exp->exp_obd, inode, handle, 0);
-        if (err) {
-                CERROR("error on commit, err = %d\n", err);
-                if (!rc)
-                        rc = err;
-        } else {
-                fcc = NULL;
-        }
-
-        if (locked) {
-                /* Let's flush truncated page on disk immediately, then we can
-                 * avoid need to search for page aliases before directio writes
-                 * and this sort of stuff at expense of somewhat slower
-                 * truncates not on a page boundary. I believe this is the only
-                 * place in filter code that can lead to pages getting to
-                 * pagecache so far. */
-                filter_clear_truncated_page(inode);
-                UNLOCK_INODE_MUTEX(inode);
-                locked = 0;
-        }
-
-        EXIT;
-out_unlock:
-        if (locked)
-                UNLOCK_INODE_MUTEX(inode);
-
-        if (fcc)
-                OBD_FREE(fcc, sizeof(*fcc));
-
-        /* trigger quota release */
-        if (ia_valid & (ATTR_SIZE | ATTR_UID | ATTR_GID)) {
-                unsigned int cur_ids[MAXQUOTAS] = {oa->o_uid, oa->o_gid};
-                int rc2 = lquota_adjust(filter_quota_interface_ref,exp->exp_obd,
-                                        cur_ids, orig_ids,rc,FSFILT_OP_SETATTR);
-                CDEBUG(rc2 ? D_ERROR : D_QUOTA,
-                       "filter adjust qunit. (rc:%d)\n", rc2);
-        }
-        return rc;
-}
-
-/* this is called from filter_truncate() until we have filter_punch() */
-int filter_setattr(struct obd_export *exp, struct obd_info *oinfo,
-                   struct obd_trans_info *oti)
-{
-        struct ldlm_res_id res_id = { .name = { oinfo->oi_oa->o_id } };
-        struct filter_mod_data *fmd;
-        struct lvfs_run_ctxt saved;
-        struct filter_obd *filter;
-        struct ldlm_resource *res;
-        struct dentry *dentry;
-        int rc;
-        ENTRY;
-
-        dentry = __filter_oa2dentry(exp->exp_obd, oinfo->oi_oa,
-                                    __FUNCTION__, 1);
-        if (IS_ERR(dentry))
-                RETURN(PTR_ERR(dentry));
-
-        filter = &exp->exp_obd->u.filter;
-        push_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-        lock_kernel();
-
-        if (oinfo->oi_oa->o_valid &
-            (OBD_MD_FLMTIME | OBD_MD_FLATIME | OBD_MD_FLCTIME)) {
-                fmd = filter_fmd_get(exp,oinfo->oi_oa->o_id,oinfo->oi_oa->o_gr);
-                if (fmd && fmd->fmd_mactime_xid < oti->oti_xid)
-                        fmd->fmd_mactime_xid = oti->oti_xid;
-                filter_fmd_put(exp, fmd);
-        }
-
-        /* setting objects attributes (including owner/group) */
-        rc = filter_setattr_internal(exp, dentry, oinfo->oi_oa, oti);
-        if (rc)
-                GOTO(out_unlock, rc);
-
-        res = ldlm_resource_get(exp->exp_obd->obd_namespace, NULL,
-                                res_id, LDLM_EXTENT, 0);
-
-        if (res != NULL) {
-                rc = ldlm_res_lvbo_update(res, NULL, 0, 0);
-                ldlm_resource_putref(res);
-        }
-
-        oinfo->oi_oa->o_valid = OBD_MD_FLID;
-
-        /* Quota release need uid/gid info */
-        obdo_from_inode(oinfo->oi_oa, dentry->d_inode,
-                        FILTER_VALID_FLAGS | OBD_MD_FLUID | OBD_MD_FLGID);
-
-        EXIT;
-out_unlock:
-        unlock_kernel();
-        f_dput(dentry);
-        pop_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-        return rc;
-}
-
-/* XXX identical to osc_unpackmd */
-static int filter_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
-                           struct lov_mds_md *lmm, int lmm_bytes)
-{
-        int lsm_size;
-        ENTRY;
-
-        if (lmm != NULL) {
-                if (lmm_bytes < sizeof (*lmm)) {
-                        CERROR("lov_mds_md too small: %d, need %d\n",
-                               lmm_bytes, (int)sizeof(*lmm));
-                        RETURN(-EINVAL);
-                }
-                /* XXX LOV_MAGIC etc check? */
-
-                if (lmm->lmm_object_id == cpu_to_le64(0)) {
-                        CERROR("lov_mds_md: zero lmm_object_id\n");
-                        RETURN(-EINVAL);
-                }
-        }
-
-        lsm_size = lov_stripe_md_size(1);
-        if (lsmp == NULL)
-                RETURN(lsm_size);
-
-        if (*lsmp != NULL && lmm == NULL) {
-                OBD_FREE((*lsmp)->lsm_oinfo[0], sizeof(struct lov_oinfo));
-                OBD_FREE(*lsmp, lsm_size);
-                *lsmp = NULL;
-                RETURN(0);
-        }
-
-        if (*lsmp == NULL) {
-                OBD_ALLOC(*lsmp, lsm_size);
-                if (*lsmp == NULL)
-                        RETURN(-ENOMEM);
-                OBD_ALLOC((*lsmp)->lsm_oinfo[0], sizeof(struct lov_oinfo));
-                if ((*lsmp)->lsm_oinfo[0] == NULL) {
-                        OBD_FREE(*lsmp, lsm_size);
-                        RETURN(-ENOMEM);
-                }
-                loi_init((*lsmp)->lsm_oinfo[0]);
-        }
-
-        if (lmm != NULL) {
-                /* XXX zero *lsmp? */
-                (*lsmp)->lsm_object_id = le64_to_cpu (lmm->lmm_object_id);
-                LASSERT((*lsmp)->lsm_object_id);
-        }
-
-        (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
-
-        RETURN(lsm_size);
-}
-
-/* caller must hold fo_create_lock */
-static int filter_destroy_precreated(struct obd_export *exp, struct obdo *oa,
-                                      struct filter_obd *filter)
-{
-        struct obdo doa; /* XXX obdo on stack */
-        obd_id last, id;
-        int rc;
-        ENTRY;
-
-        LASSERT(oa);
-        LASSERT(down_trylock(&filter->fo_create_lock) != 0);
-
-        memset(&doa, 0, sizeof(doa));
-        if (oa->o_valid & OBD_MD_FLGROUP) {
-                doa.o_valid |= OBD_MD_FLGROUP;
-                doa.o_gr = oa->o_gr;
-        } else {
-                doa.o_gr = 0;
-        }
-        doa.o_mode = S_IFREG;
-
-        if (!filter->fo_destroy_in_progress) {
-                CERROR("%s: destroy_in_progress already cleared\n",
-                        exp->exp_obd->obd_name);
-                RETURN(0);
-        }
-
-        last = filter_last_id(filter, doa.o_gr);
-        CWARN("%s: deleting orphan objects from "LPU64" to "LPU64"\n",
-               exp->exp_obd->obd_name, oa->o_id + 1, last);
-        for (id = last; id > oa->o_id; id--) {
-                doa.o_id = id;
-                rc = filter_destroy(exp, &doa, NULL, NULL, NULL);
-                if (rc && rc != -ENOENT) /* this is pretty fatal... */
-                        CEMERG("error destroying precreate objid "LPU64": %d\n",
-                               id, rc);
-                filter_set_last_id(filter, id - 1, doa.o_gr);
-                /* update last_id on disk periodically so that if we restart
-                 * we don't need to re-scan all of the just-deleted objects. */
-                if ((id & 511) == 0)
-                        filter_update_last_objid(exp->exp_obd, doa.o_gr, 0);
-        }
-
-        CDEBUG(D_HA, "%s: after destroy: set last_objids["LPU64"] = "LPU64"\n",
-               exp->exp_obd->obd_name, doa.o_gr, oa->o_id);
-
-        rc = filter_update_last_objid(exp->exp_obd, doa.o_gr, 1);
-        filter->fo_destroy_in_progress = 0;
-
-        RETURN(rc);
-}
-
-static int filter_precreate(struct obd_device *obd, struct obdo *oa,
-                            obd_gr group, int *num);
-/* returns a negative error or a nonnegative number of files to create */
-static int filter_handle_precreate(struct obd_export *exp, struct obdo *oa,
-                                   obd_gr group, struct obd_trans_info *oti)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct filter_obd *filter = &obd->u.filter;
-        int diff, rc;
-        ENTRY;
-
-        /* delete orphans request */
-        if ((oa->o_valid & OBD_MD_FLFLAGS) && (oa->o_flags & OBD_FL_DELORPHAN)){
-                if (oti->oti_conn_cnt < exp->exp_conn_cnt) {
-                        CERROR("%s: dropping old orphan cleanup request\n",
-                               obd->obd_name);
-                        RETURN(0);
-                }
-
-                /* This causes inflight precreates to abort and drop lock */
-                filter->fo_destroy_in_progress = 1;
-                down(&filter->fo_create_lock);
-                diff = oa->o_id - filter_last_id(filter, group);
-                CDEBUG(D_HA, "filter_last_id() = "LPU64" -> diff = %d\n",
-                       filter_last_id(filter, group), diff);
-
-                if (-diff > OST_MAX_PRECREATE) {
-                        CERROR("%s: ignoring bogus orphan destroy request: "
-                               "obdid "LPU64" last_id "LPU64"\n", obd->obd_name,
-                               oa->o_id, filter_last_id(filter, group));
-                        /* FIXME: should reset precreate_next_id on MDS */
-                        GOTO(out, rc = -EINVAL);
-                }
-                if (diff < 0) {
-                        rc = filter_destroy_precreated(exp, oa, filter);
-                        if (rc)
-                                CERROR("%s: unable to write lastobjid, but "
-                                       "orphans were deleted\n", obd->obd_name);
-                        GOTO(out, rc);
-                } else {
-                        /*XXX used by MDS for the first time! */
-                        filter->fo_destroy_in_progress = 0;
-                }
-        } else {
-                down(&filter->fo_create_lock);
-                if (oti->oti_conn_cnt < exp->exp_conn_cnt) {
-                        CERROR("%s: dropping old precreate request\n",
-                               obd->obd_name);
-                        GOTO(out, rc = 0);
-                }
-                /* only precreate if group == 0 and o_id is specfied */
-                if (group != 0 || oa->o_id == 0)
-                        diff = 1;
-                else
-                        diff = oa->o_id - filter_last_id(filter, group);
-                CDEBUG(D_RPCTRACE, "filter_last_id() = "LPU64" -> diff = %d\n",
-                       filter_last_id(filter, group), diff);
-
-                LASSERTF(diff >= 0,"%s: "LPU64" - "LPU64" = %d\n",obd->obd_name,
-                         oa->o_id, filter_last_id(filter, group), diff);
-        }
-
-        if (diff > 0) {
-                oa->o_id = filter_last_id(&obd->u.filter, group);
-                rc = filter_precreate(obd, oa, group, &diff);
-                oa->o_id = filter_last_id(&obd->u.filter, group);
-                oa->o_valid = OBD_MD_FLID;
-                GOTO(out, rc);
-        }
-        /* else diff == 0 */
-        GOTO(out, rc = 0);
-out:
-        up(&filter->fo_create_lock);
-        return rc;
-}
-
-static int filter_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                         __u64 max_age, __u32 flags)
-{
-        struct filter_obd *filter = &obd->u.filter;
-        int blockbits = obd->u.obt.obt_sb->s_blocksize_bits;
-        int rc;
-        ENTRY;
-
-        /* at least try to account for cached pages.  its still racey and
-         * might be under-reporting if clients haven't announced their
-         * caches with brw recently */
-        spin_lock(&obd->obd_osfs_lock);
-        rc = fsfilt_statfs(obd, obd->u.obt.obt_sb, max_age);
-        memcpy(osfs, &obd->obd_osfs, sizeof(*osfs));
-        spin_unlock(&obd->obd_osfs_lock);
-
-        CDEBUG(D_SUPER | D_CACHE, "blocks cached "LPU64" granted "LPU64
-               " pending "LPU64" free "LPU64" avail "LPU64"\n",
-               filter->fo_tot_dirty, filter->fo_tot_granted,
-               filter->fo_tot_pending,
-               osfs->os_bfree << blockbits, osfs->os_bavail << blockbits);
-
-        filter_grant_sanity_check(obd, __FUNCTION__);
-
-        osfs->os_bavail -= min(osfs->os_bavail, GRANT_FOR_LLOG(obd) +
-                               ((filter->fo_tot_dirty + filter->fo_tot_pending +
-                                 osfs->os_bsize - 1) >> blockbits));
-
-        /* set EROFS to state field if FS is mounted as RDONLY. The goal is to
-         * stop creating files on MDS if OST is not good shape to create
-         * objects.*/
-        osfs->os_state = (filter->fo_obt.obt_sb->s_flags & MS_RDONLY) ?
-                EROFS : 0;
-        RETURN(rc);
-}
-
-static int filter_use_existing_obj(struct obd_device *obd,
-                                   struct dentry *dchild, void **handle,
-                                   int *cleanup_phase)
-{
-        struct inode *inode = dchild->d_inode;
-        struct iattr iattr;
-        int rc;
-
-        if ((inode->i_mode & (S_ISUID | S_ISGID)) == (S_ISUID|S_ISGID))
-                return 0;
-
-        *handle = fsfilt_start_log(obd, inode, FSFILT_OP_SETATTR, NULL, 1);
-        if (IS_ERR(*handle))
-                return PTR_ERR(*handle);
-
-        iattr.ia_valid = ATTR_MODE;
-        iattr.ia_mode = S_ISUID | S_ISGID |0666;
-        rc = fsfilt_setattr(obd, dchild, *handle, &iattr, 1);
-        if (rc == 0)
-                *cleanup_phase = 3;
-
-        return rc;
-}
-
-
-/* We rely on the fact that only one thread will be creating files in a given
- * group at a time, which is why we don't need an atomic filter_get_new_id.
- * Even if we had that atomic function, the following race would exist:
- *
- * thread 1: gets id x from filter_next_id
- * thread 2: gets id (x + 1) from filter_next_id
- * thread 2: creates object (x + 1)
- * thread 1: tries to create object x, gets -ENOSPC
- *
- * Caller must hold fo_create_lock
- */
-static int filter_precreate(struct obd_device *obd, struct obdo *oa,
-                            obd_gr group, int *num)
-{
-        struct dentry *dchild = NULL, *dparent = NULL;
-        struct filter_obd *filter;
-        int err = 0, rc = 0, recreate_obj = 0, i;
-        cfs_time_t enough_time = cfs_time_shift(DISK_TIMEOUT/2);
-        obd_id next_id;
-        void *handle = NULL;
-        ENTRY;
-
-        filter = &obd->u.filter;
-
-        LASSERT(down_trylock(&filter->fo_create_lock) != 0);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_TGT_DELAY_PRECREATE, obd_timeout / 2);
-
-        if ((oa->o_valid & OBD_MD_FLFLAGS) &&
-            (oa->o_flags & OBD_FL_RECREATE_OBJS)) {
-                recreate_obj = 1;
-        } else {
-                struct obd_statfs *osfs;
-
-                OBD_ALLOC(osfs, sizeof(*osfs));
-                if (osfs == NULL)
-                        RETURN(-ENOMEM);
-                rc = filter_statfs(obd, osfs, cfs_time_current_64() - HZ, 0);
-                if (rc == 0 && osfs->os_bavail < (osfs->os_blocks >> 10)) {
-                        CDEBUG(D_RPCTRACE,"%s: not enough space for create "
-                               LPU64"\n", obd->obd_name, osfs->os_bavail <<
-                               filter->fo_vfsmnt->mnt_sb->s_blocksize_bits);
-                        *num = 0;
-                        rc = -ENOSPC;
-                }
-                OBD_FREE(osfs, sizeof(*osfs));
-                if (rc)
-                        RETURN(rc);
-        }
-
-        CDEBUG(D_RPCTRACE, "%s: precreating %d objects in group "LPU64
-               " at "LPU64"\n", obd->obd_name, *num, group, oa->o_id);
-
-        for (i = 0; i < *num && err == 0; i++) {
-                int cleanup_phase = 0;
-
-                if (recreate_obj) {
-                        __u64 last_id;
-                        next_id = oa->o_id;
-                        last_id = filter_last_id(filter, group);
-                        if (next_id > last_id) {
-                                CERROR("%s: trying to recreate obj greater"
-                                       "than last id "LPD64" > "LPD64"\n",
-                                       obd->obd_name, next_id, last_id);
-                                GOTO(cleanup, rc = -EINVAL);
-                        }
-                } else if (filter->fo_destroy_in_progress) {
-                        CWARN("%s: precreate aborted by destroy\n",
-                              obd->obd_name);
-                        rc = -EAGAIN;
-                        break;
-                } else
-                        next_id = filter_last_id(filter, group) + 1;
-
-                CDEBUG(D_INFO, "precreate objid "LPU64"\n", next_id);
-
-                dparent = filter_parent_lock(obd, group, next_id);
-                if (IS_ERR(dparent))
-                        GOTO(cleanup, rc = PTR_ERR(dparent));
-                cleanup_phase = 1;      /* filter_parent_unlock(dparent) */
-
-                dchild = filter_fid2dentry(obd, dparent, group, next_id);
-                if (IS_ERR(dchild))
-                        GOTO(cleanup, rc = PTR_ERR(dchild));
-                cleanup_phase = 2;      /* f_dput(dchild) */
-
-                if (dchild->d_inode != NULL) {
-                        /* This would only happen if lastobjid was bad on disk*/
-                        /* Could also happen if recreating missing obj but it
-                         * already exists. */
-                        if (recreate_obj) {
-                                CERROR("%s: recreating existing object %.*s?\n",
-                                       obd->obd_name, dchild->d_name.len,
-                                       dchild->d_name.name);
-                        } else {
-                                /* Use these existing objects if they are
-                                 * zero length. */
-                                if (dchild->d_inode->i_size == 0) {
-                                        rc = filter_use_existing_obj(obd,dchild,
-                                                      &handle, &cleanup_phase);
-                                        if (rc == 0)
-                                                goto set_last_id;
-                                        else
-                                                GOTO(cleanup, rc);
-                                }
-
-                                CERROR("%s: Serious error: objid %.*s already "
-                                       "exists; is this filesystem corrupt?\n",
-                                       obd->obd_name, dchild->d_name.len,
-                                       dchild->d_name.name);
-                                LBUG();
-                        }
-                        GOTO(cleanup, rc = -EEXIST);
-                }
-
-                handle = fsfilt_start_log(obd, dparent->d_inode,
-                                          FSFILT_OP_CREATE, NULL, 1);
-                if (IS_ERR(handle))
-                        GOTO(cleanup, rc = PTR_ERR(handle));
-                cleanup_phase = 3;
-
-                /* We mark object SUID+SGID to flag it for accepting UID+GID
-                 * from client on first write.  Currently the permission bits
-                 * on the OST are never used, so this is OK. */
-                rc = ll_vfs_create(dparent->d_inode, dchild,
-                                   S_IFREG |  S_ISUID | S_ISGID | 0666, NULL);
-                if (rc) {
-                        CERROR("create failed rc = %d\n", rc);
-                        GOTO(cleanup, rc);
-                }
-
-set_last_id:
-                if (!recreate_obj) {
-                        filter_set_last_id(filter, next_id, group);
-                        err = filter_update_last_objid(obd, group, 0);
-                        if (err)
-                                CERROR("unable to write lastobjid "
-                                       "but file created\n");
-                }
-
-        cleanup:
-                switch(cleanup_phase) {
-                case 3:
-                        err = fsfilt_commit(obd, dparent->d_inode, handle, 0);
-                        if (err) {
-                                CERROR("error on commit, err = %d\n", err);
-                                if (!rc)
-                                        rc = err;
-                        }
-                case 2:
-                        f_dput(dchild);
-                case 1:
-                        filter_parent_unlock(dparent);
-                case 0:
-                        break;
-                }
-
-                if (rc)
-                        break;
-                if (cfs_time_after(cfs_time_current(), enough_time)) {
-                        CDEBUG(D_RPCTRACE,
-                               "%s: precreate slow - want %d got %d \n",
-                               obd->obd_name, *num, i);
-                        break;
-                }
-        }
-        *num = i;
-
-        CDEBUG(D_RPCTRACE,
-               "%s: created %d objects for group "LPU64": "LPU64" rc %d\n",
-               obd->obd_name, i, group, filter->fo_last_objids[group], rc);
-
-        RETURN(rc);
-}
-
-int filter_recreate(struct obd_device *obd, struct obdo *oa)
-{
-        struct ldlm_res_id res_id = { .name = { oa->o_id } };
-        struct ldlm_valblock_ops *ns_lvbo;
-        struct ldlm_resource *res;
-        obd_valid old_valid = oa->o_valid;
-        obd_flag old_flags = oa->o_flags;
-        int diff = 1, rc;
-        ENTRY;
-
-        if (oa->o_id > filter_last_id(&obd->u.filter, oa->o_gr)) {
-                CERROR("recreate objid "LPU64" > last id "LPU64"\n",
-                       oa->o_id, filter_last_id(&obd->u.filter, oa->o_gr));
-                RETURN(-EINVAL);
-        }
-
-        if ((oa->o_valid & OBD_MD_FLFLAGS) == 0) {
-                oa->o_valid |= OBD_MD_FLFLAGS;
-                oa->o_flags = OBD_FL_RECREATE_OBJS;
-        } else {
-                oa->o_flags |= OBD_FL_RECREATE_OBJS;
-        }
-
-        down(&obd->u.filter.fo_create_lock);
-        rc = filter_precreate(obd, oa, oa->o_gr, &diff);
-        up(&obd->u.filter.fo_create_lock);
-
-        res = ldlm_resource_get(obd->obd_namespace, NULL,
-                                res_id, LDLM_EXTENT, 0);
-        if (res != NULL) {
-                /* Update lvb->lvb_blocks for the recreated object */
-                ns_lvbo = res->lr_namespace->ns_lvbo;
-                if (ns_lvbo && ns_lvbo->lvbo_update) {
-                        rc = ns_lvbo->lvbo_update(res, NULL, 0, 1);
-                        if (rc)
-                                RETURN(rc);
-                }
-                ldlm_resource_putref(res);
-        }
-
-        if (rc == 0)
-                CWARN("%s: recreated missing object "LPU64"/"LPU64"\n",
-                      obd->obd_name, oa->o_id, oa->o_gr);
-
-        oa->o_valid = old_valid;
-        oa->o_flags = old_flags;
-        RETURN(rc);
-}
-
-static int filter_create(struct obd_export *exp, struct obdo *oa,
-                         struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct obd_device *obd = NULL;
-        struct lvfs_run_ctxt saved;
-        struct lov_stripe_md *lsm = NULL;
-        struct ldlm_res_id res_id = { .name = { oa->o_id } };
-        ldlm_policy_data_t policy = { .l_extent = { 0, OBD_OBJECT_EOF } };
-        struct lustre_handle lockh;
-        int flags = 0;
-        int rc = 0;
-        ENTRY;
-
-        if (!(oa->o_valid & OBD_MD_FLGROUP))
-                oa->o_gr = 0;
-
-        CDEBUG(D_INFO, "object "LPU64"/"LPU64"\n", oa->o_id, oa->o_gr);
-        if (ea != NULL) {
-                lsm = *ea;
-                if (lsm == NULL) {
-                        rc = obd_alloc_memmd(exp, &lsm);
-                        if (rc < 0)
-                                RETURN(rc);
-                }
-        }
-
-        obd = exp->exp_obd;
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        if ((oa->o_valid & OBD_MD_FLFLAGS) &&
-            (oa->o_flags & OBD_FL_RECREATE_OBJS)) {
-                /* Cancel all conflicting extent locks on recreating object,
-                 * thus object's metadata will be updated on the clients */
-                rc = ldlm_cli_enqueue_local(obd->obd_namespace, &res_id,
-                                            LDLM_EXTENT, &policy, LCK_PW,
-                                            &flags, ldlm_blocking_ast,
-                                            ldlm_completion_ast,
-                                            ldlm_glimpse_ast, NULL, 0,
-                                            NULL, &lockh);
-                rc = filter_recreate(obd, oa);
-                ldlm_lock_decref(&lockh, LCK_PW);
-        } else {
-                rc = filter_handle_precreate(exp, oa, oa->o_gr, oti);
-        }
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (rc && ea != NULL && *ea != lsm) {
-                obd_free_memmd(exp, &lsm);
-        } else if (rc == 0 && ea != NULL) {
-                /* XXX LOV STACKING: the lsm that is passed to us from
-                 * LOV does not have valid lsm_oinfo data structs, so
-                 * don't go touching that.  This needs to be fixed in a
-                 * big way. */
-                lsm->lsm_object_id = oa->o_id;
-                *ea = lsm;
-        }
-
-        RETURN(rc);
-}
-
-int filter_destroy(struct obd_export *exp, struct obdo *oa,
-                   struct lov_stripe_md *md, struct obd_trans_info *oti,
-                   struct obd_export *md_exp)
-{
-        unsigned int qcids[MAXQUOTAS] = {0, 0};
-        struct obd_device *obd;
-        struct filter_obd *filter;
-        struct dentry *dchild = NULL, *dparent = NULL;
-        struct lvfs_run_ctxt saved;
-        void *handle = NULL;
-        struct llog_cookie *fcc = NULL;
-        int rc, rc2, cleanup_phase = 0, sync = 0;
-        struct iattr iattr;
-        ENTRY;
-
-        if (!(oa->o_valid & OBD_MD_FLGROUP))
-                oa->o_gr = 0;
-
-        obd = exp->exp_obd;
-        filter = &obd->u.filter;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        cleanup_phase = 1;
-
-        dchild = filter_fid2dentry(obd, NULL, oa->o_gr, oa->o_id);
-        if (IS_ERR(dchild))
-                GOTO(cleanup, rc = PTR_ERR(dchild));
-        cleanup_phase = 2;
-
-        if (dchild->d_inode == NULL) {
-                CDEBUG(D_INODE, "destroying non-existent object "LPU64"\n",
-                       oa->o_id);
-                /* If object already gone, cancel cookie right now */
-                if (oa->o_valid & OBD_MD_FLCOOKIE) {
-                        struct llog_ctxt *ctxt;
-                        fcc = obdo_logcookie(oa);
-                        ctxt = llog_get_context(obd, fcc->lgc_subsys + 1);
-                        llog_cancel(ctxt, NULL, 1, fcc, 0);
-                        llog_ctxt_put(ctxt);
-                        fcc = NULL; /* we didn't allocate fcc, don't free it */
-                }
-                GOTO(cleanup, rc = -ENOENT);
-        }
-        
-        filter_prepare_destroy(obd, oa->o_id);
-
-        /* Our MDC connection is established by the MDS to us */
-        if (oa->o_valid & OBD_MD_FLCOOKIE) {
-                OBD_ALLOC(fcc, sizeof(*fcc));
-                if (fcc != NULL)
-                        memcpy(fcc, obdo_logcookie(oa), sizeof(*fcc));
-        }
-        DQUOT_INIT(dchild->d_inode);
-
-        /* we're gonna truncate it first in order to avoid possible deadlock:
-         *      P1                      P2
-         * open trasaction      open transaction
-         * down(i_zombie)       down(i_zombie)
-         *                      restart transaction
-         * (see BUG 4180) -bzzz
-         */
-        LOCK_INODE_MUTEX(dchild->d_inode);
-        handle = fsfilt_start_log(obd, dchild->d_inode, FSFILT_OP_SETATTR,
-                                  NULL, 1);
-        if (IS_ERR(handle)) {
-                UNLOCK_INODE_MUTEX(dchild->d_inode);
-                GOTO(cleanup, rc = PTR_ERR(handle));
-        }
-
-        iattr.ia_valid = ATTR_SIZE;
-        iattr.ia_size = 0;
-        rc = fsfilt_setattr(obd, dchild, handle, &iattr, 1);
-        rc2 = fsfilt_commit(obd, dchild->d_inode, handle, 0);
-        UNLOCK_INODE_MUTEX(dchild->d_inode);
-        if (rc)
-                GOTO(cleanup, rc);
-        if (rc2)
-                GOTO(cleanup, rc = rc2);
-
-        /* We don't actually need to lock the parent until we are unlinking
-         * here, and not while truncating above.  That avoids holding the
-         * parent lock for a long time during truncate, which can block other
-         * threads from doing anything to objects in that directory. bug 7171 */
-        dparent = filter_parent_lock(obd, oa->o_gr, oa->o_id);
-        if (IS_ERR(dparent))
-                GOTO(cleanup, rc = PTR_ERR(dparent));
-        cleanup_phase = 3; /* filter_parent_unlock */
-
-        LOCK_INODE_MUTEX(dchild->d_inode);
-        handle = fsfilt_start_log(obd, dparent->d_inode,FSFILT_OP_UNLINK,oti,1);
-        if (IS_ERR(handle)) {
-                UNLOCK_INODE_MUTEX(dchild->d_inode);
-                GOTO(cleanup, rc = PTR_ERR(handle));
-        }
-        cleanup_phase = 4; /* fsfilt_commit */
-
-        /* Quota release need uid/gid of inode */
-        obdo_from_inode(oa, dchild->d_inode, OBD_MD_FLUID|OBD_MD_FLGID);
-
-        filter_fmd_drop(exp, oa->o_id, oa->o_gr);
-
-        /* this drops dchild->d_inode->i_mutex unconditionally */
-        rc = filter_destroy_internal(obd, oa->o_id, oa->o_gr, dparent, dchild);
-
-        EXIT;
-cleanup:
-        switch(cleanup_phase) {
-        case 4:
-                if (fcc != NULL)
-                        sync = fsfilt_add_journal_cb(obd, 0, oti ?
-                                                     oti->oti_handle : handle,
-                                                     filter_cancel_cookies_cb,
-                                                     fcc);
-                /* If add_journal_cb failed, then filter_finish_transno
-                 * will commit the handle and we will do a sync 
-                 * on commit. then we call callback directly to free 
-                 * the fcc. 
-                 */
-                rc = filter_finish_transno(exp, oti, rc, sync);
-                if (sync) {
-                        filter_cancel_cookies_cb(obd, 0, fcc, rc); 
-                        fcc = NULL;
-                }
-                rc2 = fsfilt_commit(obd, dparent->d_inode, handle, 0);
-                if (rc2) {
-                        CERROR("error on commit, err = %d\n", rc2);
-                        if (!rc)
-                                rc = rc2;
-                } else {
-                        fcc = NULL;
-                }
-        case 3:
-                filter_parent_unlock(dparent);
-        case 2:
-                f_dput(dchild);
-                if (fcc != NULL)
-                        OBD_FREE(fcc, sizeof(*fcc));
-        case 1:
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                break;
-        default:
-                CERROR("invalid cleanup_phase %d\n", cleanup_phase);
-                LBUG();
-        }
-
-        /* trigger quota release */
-        qcids[USRQUOTA] = oa->o_uid;
-        qcids[GRPQUOTA] = oa->o_gid;
-        rc2 = lquota_adjust(filter_quota_interface_ref, obd, qcids, NULL, rc,
-                            FSFILT_OP_UNLINK);
-        if (rc2)
-                CERROR("filter adjust qunit! (rc:%d)\n", rc2);
-        return rc;
-}
-
-/* NB start and end are used for punch, but not truncate */
-static int filter_truncate(struct obd_export *exp, struct obd_info *oinfo,
-                           struct obd_trans_info *oti,
-                           struct ptlrpc_request_set *rqset)
-{
-        int rc;
-        ENTRY;
-
-        if (oinfo->oi_policy.l_extent.end != OBD_OBJECT_EOF) {
-                CERROR("PUNCH not supported, only truncate: end = "LPX64"\n",
-                       oinfo->oi_policy.l_extent.end);
-                RETURN(-EFAULT);
-        }
-
-        CDEBUG(D_INODE, "calling truncate for object "LPU64", valid = "LPX64
-               ", o_size = "LPD64"\n", oinfo->oi_oa->o_id,
-               oinfo->oi_oa->o_valid, oinfo->oi_policy.l_extent.start);
-
-        oinfo->oi_oa->o_size = oinfo->oi_policy.l_extent.start;
-        rc = filter_setattr(exp, oinfo, oti);
-
-        RETURN(rc);
-}
-
-static int filter_sync(struct obd_export *exp, struct obdo *oa,
-                       struct lov_stripe_md *lsm, obd_off start, obd_off end)
-{
-        struct lvfs_run_ctxt saved;
-        struct filter_obd *filter;
-        struct dentry *dentry;
-        struct llog_ctxt *ctxt;
-        int rc, rc2;
-        ENTRY;
-
-        filter = &exp->exp_obd->u.filter;
-
-        /* an objid of zero is taken to mean "sync whole filesystem" */
-        if (!oa || !(oa->o_valid & OBD_MD_FLID)) {
-                rc = fsfilt_sync(exp->exp_obd, filter->fo_obt.obt_sb);
-                /* flush any remaining cancel messages out to the target */
-                ctxt = llog_get_context(exp->exp_obd, LLOG_MDS_OST_REPL_CTXT);
-                llog_sync(ctxt, exp);
-                llog_ctxt_put(ctxt);
-                RETURN(rc);
-        }
-
-        dentry = filter_oa2dentry(exp->exp_obd, oa);
-        if (IS_ERR(dentry))
-                RETURN(PTR_ERR(dentry));
-
-        push_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-
-        LOCK_INODE_MUTEX(dentry->d_inode);
-
-        rc = filemap_fdatawrite(dentry->d_inode->i_mapping);
-        if (rc == 0) {
-                /* just any file to grab fsync method - "file" arg unused */
-                struct file *file = filter->fo_rcvd_filp;
-
-                if (file->f_op && file->f_op->fsync)
-                        rc = file->f_op->fsync(NULL, dentry, 1);
-
-                rc2 = filemap_fdatawait(dentry->d_inode->i_mapping);
-                if (!rc)
-                        rc = rc2;
-        }
-        UNLOCK_INODE_MUTEX(dentry->d_inode);
-
-        oa->o_valid = OBD_MD_FLID;
-        obdo_from_inode(oa, dentry->d_inode, FILTER_VALID_FLAGS);
-
-        pop_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-
-        f_dput(dentry);
-        RETURN(rc);
-}
-
-static int filter_get_info(struct obd_export *exp, __u32 keylen,
-                           void *key, __u32 *vallen, void *val)
-{
-        struct obd_device *obd;
-        ENTRY;
-
-        obd = class_exp2obd(exp);
-        if (obd == NULL) {
-                CDEBUG(D_IOCTL, "invalid client export %p\n", exp);
-                RETURN(-EINVAL);
-        }
-
-        if (KEY_IS("blocksize")) {
-                __u32 *blocksize = val;
-                if (blocksize) {
-                        if (*vallen < sizeof(*blocksize))
-                                RETURN(-EOVERFLOW);
-                        *blocksize = obd->u.obt.obt_sb->s_blocksize;
-                }
-                *vallen = sizeof(*blocksize);
-                RETURN(0);
-        }
-
-        if (KEY_IS("blocksize_bits")) {
-                __u32 *blocksize_bits = val;
-                if (blocksize_bits) {
-                        if (*vallen < sizeof(*blocksize_bits))
-                                RETURN(-EOVERFLOW);
-                        *blocksize_bits = obd->u.obt.obt_sb->s_blocksize_bits;
-                }
-                *vallen = sizeof(*blocksize_bits);
-                RETURN(0);
-        }
-
-        if (KEY_IS("last_id")) {
-                obd_id *last_id = val;
-                /* FIXME: object groups */
-                if (last_id) {
-                        if (*vallen < sizeof(*last_id))
-                                RETURN(-EOVERFLOW);
-                        *last_id = filter_last_id(&obd->u.filter, 0);
-                }
-                *vallen = sizeof(*last_id);
-                RETURN(0);
-        }
-
-        CDEBUG(D_IOCTL, "invalid key\n");
-        RETURN(-EINVAL);
-}
-
-static int filter_set_info_async(struct obd_export *exp, __u32 keylen,
-                                 void *key, __u32 vallen, void *val,
-                                 struct ptlrpc_request_set *set)
-{
-        struct obd_device *obd;
-        struct llog_ctxt *ctxt;
-        int rc = 0;
-        ENTRY;
-
-        obd = exp->exp_obd;
-        if (obd == NULL) {
-                CDEBUG(D_IOCTL, "invalid export %p\n", exp);
-                RETURN(-EINVAL);
-        }
-
-        if (!KEY_IS(KEY_MDS_CONN))
-                RETURN(-EINVAL);
-
-        LCONSOLE_WARN("%s: received MDS connection from %s\n", obd->obd_name,
-                      obd_export_nid2str(exp));
-        obd->u.filter.fo_mdc_conn.cookie = exp->exp_handle.h_cookie;
-
-        /* setup llog imports */
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_REPL_CTXT);
-        rc = llog_receptor_accept(ctxt, exp->exp_imp_reverse);
-        llog_ctxt_put(ctxt);
-
-        lquota_setinfo(filter_quota_interface_ref, exp, obd);
-
-        RETURN(rc);
-}
-
-int filter_iocontrol(unsigned int cmd, struct obd_export *exp,
-                     int len, void *karg, void *uarg)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_ioctl_data *data = karg;
-        int rc = 0;
-
-        switch (cmd) {
-        case OBD_IOC_ABORT_RECOVERY: {
-                CERROR("aborting recovery for device %s\n", obd->obd_name);
-                target_abort_recovery(obd);
-                RETURN(0);
-        }
-
-        case OBD_IOC_SYNC: {
-                CDEBUG(D_RPCTRACE, "syncing ost %s\n", obd->obd_name);
-                rc = fsfilt_sync(obd, obd->u.obt.obt_sb);
-                RETURN(rc);
-        }
-
-        case OBD_IOC_SET_READONLY: {
-                void *handle;
-                struct super_block *sb = obd->u.obt.obt_sb;
-                struct inode *inode = sb->s_root->d_inode;
-                BDEVNAME_DECLARE_STORAGE(tmp);
-                LCONSOLE_WARN("*** setting obd %s device '%s' read-only ***\n",
-                              obd->obd_name, ll_bdevname(sb, tmp));
-
-                handle = fsfilt_start(obd, inode, FSFILT_OP_MKNOD, NULL);
-                if (!IS_ERR(handle))
-                        rc = fsfilt_commit(obd, inode, handle, 1);
-
-                CDEBUG(D_HA, "syncing ost %s\n", obd->obd_name);
-                rc = fsfilt_sync(obd, obd->u.obt.obt_sb);
-
-                lvfs_set_rdonly(obd, obd->u.obt.obt_sb);
-                RETURN(0);
-        }
-
-        case OBD_IOC_CATLOGLIST: {
-                rc = llog_catalog_list(obd, 1, data);
-                RETURN(rc);
-        }
-
-        case OBD_IOC_LLOG_CANCEL:
-        case OBD_IOC_LLOG_REMOVE:
-        case OBD_IOC_LLOG_INFO:
-        case OBD_IOC_LLOG_PRINT: {
-                /* FIXME to be finished */
-                RETURN(-EOPNOTSUPP);
-/*
-                struct llog_ctxt *ctxt = NULL;
-
-                push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-                rc = llog_ioctl(ctxt, cmd, data);
-                pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-
-                RETURN(rc);
-*/
-        }
-
-
-        default:
-                RETURN(-EINVAL);
-        }
-        RETURN(0);
-}
-
-static int filter_health_check(struct obd_device *obd)
-{
-#ifdef USE_HEALTH_CHECK_WRITE
-        struct filter_obd *filter = &obd->u.filter;
-#endif
-        int rc = 0;
-
-        /*
-         * health_check to return 0 on healthy
-         * and 1 on unhealthy.
-         */
-        if (obd->u.obt.obt_sb->s_flags & MS_RDONLY)
-                rc = 1;
-
-#ifdef USE_HEALTH_CHECK_WRITE
-        LASSERT(filter->fo_health_check_filp != NULL);
-        rc |= !!lvfs_check_io_health(obd, filter->fo_health_check_filp);
-#endif
-
-        return rc;
-}
-
-static struct dentry *filter_lvfs_fid2dentry(__u64 id, __u32 gen, __u64 gr,
-                                             void *data)
-{
-        return filter_fid2dentry(data, NULL, gr, id);
-}
-
-static int filter_process_config(struct obd_device *obd,obd_count len,void *buf)
-{
-        struct lustre_cfg *lcfg = buf;
-        struct lprocfs_static_vars lvars;
-        int rc = 0;
-
-        lprocfs_filter_init_vars(&lvars);
-
-        rc = class_process_proc_param(PARAM_OST, lvars.obd_vars, lcfg, obd);
-
-        return(rc);
-}
-
-static struct lvfs_callback_ops filter_lvfs_ops = {
-        l_fid2dentry:     filter_lvfs_fid2dentry,
-};
-
-static struct obd_ops filter_obd_ops = {
-        .o_owner          = THIS_MODULE,
-        .o_get_info       = filter_get_info,
-        .o_set_info_async = filter_set_info_async,
-        .o_setup          = filter_setup,
-        .o_precleanup     = filter_precleanup,
-        .o_cleanup        = filter_cleanup,
-        .o_connect        = filter_connect,
-        .o_reconnect      = filter_reconnect,
-        .o_disconnect     = filter_disconnect,
-        .o_ping           = filter_ping,
-        .o_init_export    = filter_init_export,
-        .o_destroy_export = filter_destroy_export,
-        .o_statfs         = filter_statfs,
-        .o_getattr        = filter_getattr,
-        .o_unpackmd       = filter_unpackmd,
-        .o_create         = filter_create,
-        .o_setattr        = filter_setattr,
-        .o_destroy        = filter_destroy,
-        .o_brw            = filter_brw,
-        .o_punch          = filter_truncate,
-        .o_sync           = filter_sync,
-        .o_preprw         = filter_preprw,
-        .o_commitrw       = filter_commitrw,
-        .o_llog_init      = filter_llog_init,
-        .o_llog_finish    = filter_llog_finish,
-        .o_iocontrol      = filter_iocontrol,
-        .o_health_check   = filter_health_check,
-        .o_process_config = filter_process_config,
-};
-
-quota_interface_t *filter_quota_interface_ref;
-extern quota_interface_t filter_quota_interface;
-
-static int __init obdfilter_init(void)
-{
-        struct lprocfs_static_vars lvars;
-        int rc;
-
-        printk(KERN_INFO "Lustre: Filtering OBD driver; info@clusterfs.com\n");
-
-        lprocfs_filter_init_vars(&lvars);
-
-        request_module("lquota");
-        OBD_ALLOC(obdfilter_created_scratchpad,
-                  OBDFILTER_CREATED_SCRATCHPAD_ENTRIES *
-                  sizeof(*obdfilter_created_scratchpad));
-        if (obdfilter_created_scratchpad == NULL)
-                return -ENOMEM;
-
-        ll_fmd_cachep = cfs_mem_cache_create("ll_fmd_cache",
-                                             sizeof(struct filter_mod_data),
-                                             0, 0);
-        if (!ll_fmd_cachep)
-                GOTO(out, rc = -ENOMEM);
-
-        filter_quota_interface_ref = PORTAL_SYMBOL_GET(filter_quota_interface);
-        init_obd_quota_ops(filter_quota_interface_ref, &filter_obd_ops);
-
-        rc = class_register_type(&filter_obd_ops, lvars.module_vars,
-                                 LUSTRE_OST_NAME);
-        if (rc) {
-                int err;
-
-                err = cfs_mem_cache_destroy(ll_fmd_cachep);
-                LASSERTF(err == 0, "Cannot destroy ll_fmd_cachep: rc %d\n",err);
-                ll_fmd_cachep = NULL;
-out:
-                if (filter_quota_interface_ref)
-                        PORTAL_SYMBOL_PUT(filter_quota_interface);
-
-                OBD_FREE(obdfilter_created_scratchpad,
-                         OBDFILTER_CREATED_SCRATCHPAD_ENTRIES *
-                         sizeof(*obdfilter_created_scratchpad));
-        }
-
-        return rc;
-}
-
-static void __exit obdfilter_exit(void)
-{
-        if (filter_quota_interface_ref)
-                PORTAL_SYMBOL_PUT(filter_quota_interface);
-
-        if (ll_fmd_cachep) {
-                int rc = cfs_mem_cache_destroy(ll_fmd_cachep);
-                LASSERTF(rc == 0, "Cannot destroy ll_fmd_cachep: rc %d\n", rc);
-                ll_fmd_cachep = NULL;
-        }
-
-        class_unregister_type(LUSTRE_OST_NAME);
-        OBD_FREE(obdfilter_created_scratchpad,
-                 OBDFILTER_CREATED_SCRATCHPAD_ENTRIES *
-                 sizeof(*obdfilter_created_scratchpad));
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Filtering OBD driver");
-MODULE_LICENSE("GPL");
-
-module_init(obdfilter_init);
-module_exit(obdfilter_exit);
diff --git a/lustre/obdfilter/filter_internal.h b/lustre/obdfilter/filter_internal.h
deleted file mode 100644
index 27611c94de98f3b25cc1f54d0ede524fba0633c3..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter_internal.h
+++ /dev/null
@@ -1,197 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _FILTER_INTERNAL_H
-#define _FILTER_INTERNAL_H
-
-#ifdef __KERNEL__
-# include <linux/spinlock.h>
-#endif
-#include <lustre_disk.h>
-#include <lustre_handles.h>
-#include <lustre_debug.h>
-#include <obd.h>
-#include <lprocfs_status.h>
-
-#define FILTER_LAYOUT_VERSION "2"
-
-#define FILTER_INIT_OBJID 0
-
-#define FILTER_SUBDIR_COUNT      32            /* set to zero for no subdirs */
-#define FILTER_GROUPS 3 /* must be at least 3; not dynamic yet */
-
-#define FILTER_ROCOMPAT_SUPP (0)
-
-#define FILTER_INCOMPAT_SUPP (OBD_INCOMPAT_GROUPS | OBD_INCOMPAT_OST | \
-                              OBD_INCOMPAT_COMMON_LR)
-
-#define FILTER_GRANT_CHUNK (2ULL * PTLRPC_MAX_BRW_SIZE)
-#define GRANT_FOR_LLOG(obd) 16
-
-extern struct file_operations filter_per_export_stats_fops;
-extern struct file_operations filter_per_nid_stats_fops;
-
-/* Data stored per client in the last_rcvd file.  In le32 order. */
-struct filter_client_data {
-        __u8  fcd_uuid[40];        /* client UUID */
-        __u64 fcd_last_rcvd;       /* last completed transaction ID */
-        __u64 fcd_last_xid;        /* client RPC xid for the last transaction */
-        __u8  fcd_padding[LR_CLIENT_SIZE - 56];
-};
-
-/* Limit the returned fields marked valid to those that we actually might set */
-#define FILTER_VALID_FLAGS (OBD_MD_FLTYPE | OBD_MD_FLMODE | OBD_MD_FLGENER  |\
-                            OBD_MD_FLSIZE | OBD_MD_FLBLOCKS | OBD_MD_FLBLKSZ|\
-                            OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME)
-
-struct filter_fid {
-        struct ll_fid   ff_fid;         /* ff_fid.f_type == file stripe number */
-        __u64           ff_objid;
-        __u64           ff_group;
-};
-
-/* per-client-per-object persistent state (LRU) */
-struct filter_mod_data {
-        struct list_head fmd_list;      /* linked to fed_mod_list */
-        __u64            fmd_id;        /* object being written to */
-        __u64            fmd_gr;        /* group being written to */
-        __u64            fmd_mactime_xid;/* xid highest {m,a,c}time setattr */
-        unsigned long    fmd_expire;    /* jiffies when it should expire */
-        int              fmd_refcount;  /* reference counter - list holds 1 */
-};
-
-#ifdef BGL_SUPPORT
-#define FILTER_FMD_MAX_NUM_DEFAULT 128 /* many active files per client on BGL */
-#else
-#define FILTER_FMD_MAX_NUM_DEFAULT  32
-#endif
-/* Client cache seconds */
-#define FILTER_FMD_MAX_AGE_DEFAULT ((obd_timeout + 10) * HZ)
-
-struct filter_mod_data *filter_fmd_find(struct obd_export *exp,
-                                        obd_id objid, obd_gr group);
-struct filter_mod_data *filter_fmd_get(struct obd_export *exp,
-                                       obd_id objid, obd_gr group);
-void filter_fmd_put(struct obd_export *exp, struct filter_mod_data *fmd);
-void filter_fmd_expire(struct obd_export *exp);
-
-enum {
-        LPROC_FILTER_READ_BYTES = 0,
-        LPROC_FILTER_WRITE_BYTES = 1,
-        LPROC_FILTER_LAST,
-};
-
-//#define FILTER_MAX_CACHE_SIZE (32 * 1024 * 1024) /* was OBD_OBJECT_EOF */
-#define FILTER_MAX_CACHE_SIZE OBD_OBJECT_EOF
-
-/* We have to pass a 'created' array to fsfilt_map_inode_pages() which we
- * then ignore.  So we pre-allocate one that everyone can use... */
-#define OBDFILTER_CREATED_SCRATCHPAD_ENTRIES 1024
-extern int *obdfilter_created_scratchpad;
-
-/* filter.c */
-void f_dput(struct dentry *);
-struct dentry *filter_fid2dentry(struct obd_device *, struct dentry *dir,
-                                 obd_gr group, obd_id id);
-struct dentry *__filter_oa2dentry(struct obd_device *obd, struct obdo *oa,
-                                  const char *what, int quiet);
-#define filter_oa2dentry(obd, oa) __filter_oa2dentry(obd, oa, __FUNCTION__, 0)
-
-int filter_finish_transno(struct obd_export *, struct obd_trans_info *, int rc,
-                          int force_sync);
-__u64 filter_next_id(struct filter_obd *, struct obdo *);
-__u64 filter_last_id(struct filter_obd *, obd_gr group);
-int filter_update_fidea(struct obd_export *exp, struct inode *inode,
-                        void *handle, struct obdo *oa);
-int filter_update_server_data(struct obd_device *, struct file *,
-                              struct lr_server_data *, int force_sync);
-int filter_update_last_objid(struct obd_device *, obd_gr, int force_sync);
-int filter_common_setup(struct obd_device *, obd_count len, void *buf,
-                        void *option);
-int filter_destroy(struct obd_export *exp, struct obdo *oa,
-                   struct lov_stripe_md *md, struct obd_trans_info *,
-                   struct obd_export *);
-int filter_setattr_internal(struct obd_export *exp, struct dentry *dentry,
-                            struct obdo *oa, struct obd_trans_info *oti);
-int filter_setattr(struct obd_export *exp, struct obd_info *oinfo,
-                   struct obd_trans_info *oti);
-int filter_recreate(struct obd_device *obd, struct obdo *oa);
-
-struct dentry *filter_create_object(struct obd_device *obd, struct obdo *oa);
-
-/* filter_lvb.c */
-extern struct ldlm_valblock_ops filter_lvbo;
-
-
-/* filter_io.c */
-int filter_preprw(int cmd, struct obd_export *, struct obdo *, int objcount,
-                  struct obd_ioobj *, int niocount, struct niobuf_remote *,
-                  struct niobuf_local *, struct obd_trans_info *);
-int filter_commitrw(int cmd, struct obd_export *, struct obdo *, int objcount,
-                    struct obd_ioobj *, int niocount, struct niobuf_local *,
-                    struct obd_trans_info *, int rc);
-int filter_brw(int cmd, struct obd_export *, struct obd_info *oinfo,
-               obd_count oa_bufs, struct brw_page *pga, struct obd_trans_info *);
-void flip_into_page_cache(struct inode *inode, struct page *new_page);
-
-/* filter_io_*.c */
-struct filter_iobuf;
-int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount,
-                          struct obd_ioobj *obj, int niocount,
-                          struct niobuf_local *res, struct obd_trans_info *oti,
-                          int rc);
-obd_size filter_grant_space_left(struct obd_export *exp);
-long filter_grant(struct obd_export *exp, obd_size current_grant,
-                  obd_size want, obd_size fs_space_left);
-void filter_grant_commit(struct obd_export *exp, int niocount,
-                         struct niobuf_local *res);
-struct filter_iobuf *filter_alloc_iobuf(struct filter_obd *, int rw,
-                                        int num_pages);
-void filter_free_iobuf(struct filter_iobuf *iobuf);
-int filter_iobuf_add_page(struct obd_device *obd, struct filter_iobuf *iobuf,
-                          struct inode *inode, struct page *page);
-void *filter_iobuf_get(struct filter_obd *filter, struct obd_trans_info *oti);
-void filter_iobuf_put(struct filter_obd *filter, struct filter_iobuf *iobuf,
-                      struct obd_trans_info *oti);
-int filter_direct_io(int rw, struct dentry *dchild, struct filter_iobuf *iobuf,
-                     struct obd_export *exp, struct iattr *attr,
-                     struct obd_trans_info *oti, void **wait_handle);
-int filter_clear_truncated_page(struct inode *inode);
-
-/* filter_log.c */
-struct ost_filterdata {
-        __u32  ofd_epoch;
-};
-int filter_log_sz_change(struct llog_handle *cathandle,
-                         struct ll_fid *mds_fid,
-                         __u32 io_epoch,
-                         struct llog_cookie *logcookie,
-                         struct inode *inode);
-//int filter_get_catalog(struct obd_device *);
-void filter_cancel_cookies_cb(struct obd_device *obd, __u64 transno,
-                              void *cb_data, int error);
-int filter_recov_log_mds_ost_cb(struct llog_handle *llh,
-                               struct llog_rec_hdr *rec, void *data);
-
-#ifdef LPROCFS
-void filter_tally(struct obd_export *exp, struct page **pages, int nr_pages,
-                  unsigned long *blocks, int blocks_per_page, int wr);
-int lproc_filter_attach_seqstat(struct obd_device *dev);
-void lprocfs_filter_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline void filter_tally(struct obd_export *exp, struct page **pages,
-                                int nr_pages, unsigned long *blocks,
-                                int blocks_per_page, int wr) {}
-static inline int lproc_filter_attach_seqstat(struct obd_device *dev) {}
-static void lprocfs_filter_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-/* Quota stuff */
-extern quota_interface_t *filter_quota_interface_ref;
-
-
-#endif /* _FILTER_INTERNAL_H */
diff --git a/lustre/obdfilter/filter_io.c b/lustre/obdfilter/filter_io.c
deleted file mode 100644
index cd5f1d1fa1aff6fc786308aa01cf9062e46a98c5..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter_io.c
+++ /dev/null
@@ -1,862 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/fs/obdfilter/filter_io.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/pagemap.h> // XXX kill me soon
-#include <linux/version.h>
-
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include "filter_internal.h"
-
-int *obdfilter_created_scratchpad;
-
-static int filter_alloc_dio_page(struct obd_device *obd, struct inode *inode,
-                                 struct niobuf_local *lnb)
-{
-        struct page *page;
-
-        LASSERT(lnb->page != NULL);
-
-        page = lnb->page;
-#if 0
-        POISON_PAGE(page, 0xf1);
-        if (lnb->len != CFS_PAGE_SIZE) {
-                memset(kmap(page) + lnb->len, 0, CFS_PAGE_SIZE - lnb->len);
-                kunmap(page);
-        }
-#endif
-        page->index = lnb->offset >> CFS_PAGE_SHIFT;
-
-        RETURN(0);
-}
-
-static void filter_free_dio_pages(int objcount, struct obd_ioobj *obj,
-                           int niocount, struct niobuf_local *res)
-{
-        int i, j;
-
-        for (i = 0; i < objcount; i++, obj++) {
-                for (j = 0 ; j < obj->ioo_bufcnt ; j++, res++)
-                                res->page = NULL;
-        }
-}
-
-/* Grab the dirty and seen grant announcements from the incoming obdo.
- * We will later calculate the clients new grant and return it.
- * Caller must hold osfs lock */
-static void filter_grant_incoming(struct obd_export *exp, struct obdo *oa)
-{
-        struct filter_export_data *fed;
-        struct obd_device *obd = exp->exp_obd;
-        ENTRY;
-
-        LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock);
-
-        if ((oa->o_valid & (OBD_MD_FLBLOCKS|OBD_MD_FLGRANT)) !=
-                                        (OBD_MD_FLBLOCKS|OBD_MD_FLGRANT)) {
-                oa->o_valid &= ~OBD_MD_FLGRANT;
-                EXIT;
-                return;
-        }
-
-        fed = &exp->exp_filter_data;
-
-        /* Add some margin, since there is a small race if other RPCs arrive
-         * out-or-order and have already consumed some grant.  We want to
-         * leave this here in case there is a large error in accounting. */
-        CDEBUG(D_CACHE,
-               "%s: cli %s/%p reports grant: "LPU64" dropped: %u, local: %lu\n",
-               obd->obd_name, exp->exp_client_uuid.uuid, exp, oa->o_grant,
-               oa->o_dropped, fed->fed_grant);
-
-        /* Update our accounting now so that statfs takes it into account.
-         * Note that fed_dirty is only approximate and can become incorrect
-         * if RPCs arrive out-of-order.  No important calculations depend
-         * on fed_dirty however, but we must check sanity to not assert. */
-        if ((long long)oa->o_dirty < 0)
-                oa->o_dirty = 0;
-        else if (oa->o_dirty > fed->fed_grant + 4 * FILTER_GRANT_CHUNK)
-                oa->o_dirty = fed->fed_grant + 4 * FILTER_GRANT_CHUNK;
-        obd->u.filter.fo_tot_dirty += oa->o_dirty - fed->fed_dirty;
-        if (fed->fed_grant < oa->o_dropped) {
-                CDEBUG(D_CACHE,"%s: cli %s/%p reports %u dropped > grant %lu\n",
-                       obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                       oa->o_dropped, fed->fed_grant);
-                oa->o_dropped = 0;
-        }
-        if (obd->u.filter.fo_tot_granted < oa->o_dropped) {
-                CERROR("%s: cli %s/%p reports %u dropped > tot_grant "LPU64"\n",
-                       obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                       oa->o_dropped, obd->u.filter.fo_tot_granted);
-                oa->o_dropped = 0;
-        }
-        obd->u.filter.fo_tot_granted -= oa->o_dropped;
-        fed->fed_grant -= oa->o_dropped;
-        fed->fed_dirty = oa->o_dirty;
-        if (fed->fed_dirty < 0 || fed->fed_grant < 0 || fed->fed_pending < 0) {
-                CERROR("%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
-                       obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                       fed->fed_dirty, fed->fed_pending, fed->fed_grant);
-                spin_unlock(&obd->obd_osfs_lock);
-                LBUG();
-        }
-        EXIT;
-}
-
-/* Figure out how much space is available between what we've granted
- * and what remains in the filesystem.  Compensate for ext3 indirect
- * block overhead when computing how much free space is left ungranted.
- *
- * Caller must hold obd_osfs_lock. */
-obd_size filter_grant_space_left(struct obd_export *exp)
-{
-        struct obd_device *obd = exp->exp_obd;
-        int blockbits = obd->u.obt.obt_sb->s_blocksize_bits;
-        obd_size tot_granted = obd->u.filter.fo_tot_granted, avail, left = 0;
-        int rc, statfs_done = 0;
-
-        LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock);
-
-        if (cfs_time_before_64(obd->obd_osfs_age, cfs_time_current_64() - HZ)) {
-restat:
-                rc = fsfilt_statfs(obd, obd->u.obt.obt_sb,
-                                   cfs_time_current_64() + HZ);
-                if (rc) /* N.B. statfs can't really fail */
-                        RETURN(0);
-                statfs_done = 1;
-        }
-
-        avail = obd->obd_osfs.os_bavail;
-        left = avail - (avail >> (blockbits - 3)); /* (d)indirect */
-        if (left > GRANT_FOR_LLOG(obd)) {
-                left = (left - GRANT_FOR_LLOG(obd)) << blockbits;
-        } else {
-                left = 0 /* << blockbits */;
-        }
-
-        if (!statfs_done && left < 32 * FILTER_GRANT_CHUNK + tot_granted) {
-                CDEBUG(D_CACHE, "fs has no space left and statfs too old\n");
-                goto restat;
-        }
-
-        if (left >= tot_granted) {
-                left -= tot_granted;
-        } else {
-                if (left < tot_granted - obd->u.filter.fo_tot_pending) {
-                        CERROR("%s: cli %s/%p grant "LPU64" > available "
-                               LPU64" and pending "LPU64"\n", obd->obd_name,
-                               exp->exp_client_uuid.uuid, exp, tot_granted,
-                               left, obd->u.filter.fo_tot_pending);
-                }
-                left = 0;
-        }
-
-        CDEBUG(D_CACHE, "%s: cli %s/%p free: "LPU64" avail: "LPU64" grant "LPU64
-               " left: "LPU64" pending: "LPU64"\n", obd->obd_name,
-               exp->exp_client_uuid.uuid, exp,
-               obd->obd_osfs.os_bfree << blockbits, avail << blockbits,
-               tot_granted, left, obd->u.filter.fo_tot_pending);
-
-        return left;
-}
-
-/* Calculate how much grant space to allocate to this client, based on how
- * much space is currently free and how much of that is already granted.
- *
- * Caller must hold obd_osfs_lock. */
-long filter_grant(struct obd_export *exp, obd_size current_grant,
-                  obd_size want, obd_size fs_space_left)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        int blockbits = obd->u.obt.obt_sb->s_blocksize_bits;
-        __u64 grant = 0;
-
-        LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock);
-
-        /* Grant some fraction of the client's requested grant space so that
-         * they are not always waiting for write credits (not all of it to
-         * avoid overgranting in face of multiple RPCs in flight).  This
-         * essentially will be able to control the OSC_MAX_RIF for a client.
-         *
-         * If we do have a large disparity between what the client thinks it
-         * has and what we think it has, don't grant very much and let the
-         * client consume its grant first.  Either it just has lots of RPCs
-         * in flight, or it was evicted and its grants will soon be used up. */
-        if (want > 0x7fffffff) {
-                CERROR("%s: client %s/%p requesting > 2GB grant "LPU64"\n",
-                       obd->obd_name, exp->exp_client_uuid.uuid, exp, want);
-        } else if (current_grant < want &&
-                   current_grant < fed->fed_grant + FILTER_GRANT_CHUNK) {
-                grant = min((want >> blockbits),
-                            (fs_space_left >> blockbits) / 8);
-                grant <<= blockbits;
-
-                if (grant) {
-                        /* Allow >FILTER_GRANT_CHUNK size when clients
-                         * reconnect due to a server reboot.
-                         */
-                        if ((grant > FILTER_GRANT_CHUNK) &&
-                            (!obd->obd_recovering))
-                                grant = FILTER_GRANT_CHUNK;
-
-                        obd->u.filter.fo_tot_granted += grant;
-                        fed->fed_grant += grant;
-                        if (fed->fed_grant < 0) {
-                                CERROR("%s: cli %s/%p grant %ld want "LPU64
-                                       "current"LPU64"\n",
-                                       obd->obd_name, exp->exp_client_uuid.uuid,
-                                       exp, fed->fed_grant, want,current_grant);
-                                spin_unlock(&obd->obd_osfs_lock);
-                                LBUG();
-                        }
-                }
-        }
-
-        CDEBUG(D_CACHE,
-               "%s: cli %s/%p wants: "LPU64" current grant "LPU64 
-               " granting: "LPU64"\n", obd->obd_name, exp->exp_client_uuid.uuid,
-               exp, want, current_grant, grant);
-        CDEBUG(D_CACHE,
-               "%s: cli %s/%p tot cached:"LPU64" granted:"LPU64
-               " num_exports: %d\n", obd->obd_name, exp->exp_client_uuid.uuid,
-               exp, obd->u.filter.fo_tot_dirty,
-               obd->u.filter.fo_tot_granted, obd->obd_num_exports);
-
-        return grant;
-}
-
-static int filter_preprw_read(int cmd, struct obd_export *exp, struct obdo *oa,
-                              int objcount, struct obd_ioobj *obj,
-                              int niocount, struct niobuf_remote *nb,
-                              struct niobuf_local *res,
-                              struct obd_trans_info *oti)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct lvfs_run_ctxt saved;
-        struct niobuf_remote *rnb;
-        struct niobuf_local *lnb;
-        struct dentry *dentry = NULL;
-        struct inode *inode;
-        void *iobuf = NULL;
-        int rc = 0, i, tot_bytes = 0;
-        unsigned long now = jiffies;
-        ENTRY;
-
-        /* We are currently not supporting multi-obj BRW_READ RPCS at all.
-         * When we do this function's dentry cleanup will need to be fixed.
-         * These values are verified in ost_brw_write() from the wire. */
-        LASSERTF(objcount == 1, "%d\n", objcount);
-        LASSERTF(obj->ioo_bufcnt > 0, "%d\n", obj->ioo_bufcnt);
-
-        if (oa->o_valid & OBD_MD_FLGRANT) {
-                spin_lock(&obd->obd_osfs_lock);
-                filter_grant_incoming(exp, oa);
-
-                oa->o_grant = 0;
-                spin_unlock(&obd->obd_osfs_lock);
-        }
-
-        iobuf = filter_iobuf_get(&obd->u.filter, oti);
-        if (IS_ERR(iobuf))
-                RETURN(PTR_ERR(iobuf));
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        dentry = filter_oa2dentry(obd, oa);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                dentry = NULL;
-                GOTO(cleanup, rc);
-        }
-
-        inode = dentry->d_inode;
-
-        obdo_to_inode(inode, oa, OBD_MD_FLATIME);
-        fsfilt_check_slow(obd, now, "preprw_read setup");
-
-        for (i = 0, lnb = res, rnb = nb; i < obj->ioo_bufcnt;
-             i++, rnb++, lnb++) {
-                lnb->dentry = dentry;
-                lnb->offset = rnb->offset;
-                lnb->len    = rnb->len;
-                lnb->flags  = rnb->flags;
-
-                /*
-                 * ost_brw_write()->ost_nio_pages_get() already initialized
-                 * lnb->page to point to the page from the per-thread page
-                 * pool (bug 5137), initialize page.
-                 */
-                LASSERT(lnb->page != NULL);
-
-                if (i_size_read(inode) <= rnb->offset)
-                        /* If there's no more data, abort early.  lnb->rc == 0,
-                         * so it's easy to detect later. */
-                        break;
-                else
-                        filter_alloc_dio_page(obd, inode, lnb);
-
-                if (i_size_read(inode) < lnb->offset + lnb->len - 1)
-                        lnb->rc = i_size_read(inode) - lnb->offset;
-                else
-                        lnb->rc = lnb->len;
-
-                tot_bytes += lnb->rc;
-
-                filter_iobuf_add_page(obd, iobuf, inode, lnb->page);
-        }
-
-        fsfilt_check_slow(obd, now, "start_page_read");
-
-        rc = filter_direct_io(OBD_BRW_READ, dentry, iobuf,
-                              exp, NULL, NULL, NULL);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        lprocfs_counter_add(obd->obd_stats, LPROC_FILTER_READ_BYTES, tot_bytes);
-        if (exp->exp_nid_stats && exp->exp_nid_stats->nid_stats)
-                lprocfs_counter_add(exp->exp_nid_stats->nid_stats,
-                                    LPROC_FILTER_READ_BYTES, tot_bytes);
-
-        EXIT;
-
- cleanup:
-        if (rc != 0) {
-                filter_free_dio_pages(objcount, obj, niocount, res);
-
-                if (dentry != NULL)
-                        f_dput(dentry);
-        }
-
-        filter_iobuf_put(&obd->u.filter, iobuf, oti);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        if (rc)
-                CERROR("io error %d\n", rc);
-
-        return rc;
-}
-
-/* When clients have dirtied as much space as they've been granted they
- * fall through to sync writes.  These sync writes haven't been expressed
- * in grants and need to error with ENOSPC when there isn't room in the
- * filesystem for them after grants are taken into account.  However,
- * writeback of the dirty data that was already granted space can write
- * right on through.
- *
- * Caller must hold obd_osfs_lock. */
-static int filter_grant_check(struct obd_export *exp, struct obdo *oa, 
-                              int objcount, struct fsfilt_objinfo *fso, 
-                              int niocount, struct niobuf_remote *rnb,
-                              struct niobuf_local *lnb, obd_size *left,
-                              struct inode *inode)
-{
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        int blocksize = exp->exp_obd->u.obt.obt_sb->s_blocksize;
-        unsigned long used = 0, ungranted = 0, using;
-        int i, rc = -ENOSPC, obj, n = 0;
-
-        LASSERT_SPIN_LOCKED(&exp->exp_obd->obd_osfs_lock);
-
-        for (obj = 0; obj < objcount; obj++) {
-                for (i = 0; i < fso[obj].fso_bufcnt; i++, n++) {
-                        int tmp, bytes;
-
-                        /* should match the code in osc_exit_cache */
-                        bytes = rnb[n].len;
-                        bytes += rnb[n].offset & (blocksize - 1);
-                        tmp = (rnb[n].offset + rnb[n].len) & (blocksize - 1);
-                        if (tmp)
-                                bytes += blocksize - tmp;
-
-                        if ((rnb[n].flags & OBD_BRW_FROM_GRANT) &&
-                            (oa->o_valid & OBD_MD_FLGRANT)) {
-                                if (fed->fed_grant < used + bytes) {
-                                        CDEBUG(D_CACHE,
-                                               "%s: cli %s/%p claims %ld+%d "
-                                               "GRANT, real grant %lu idx %d\n",
-                                               exp->exp_obd->obd_name,
-                                               exp->exp_client_uuid.uuid, exp,
-                                               used, bytes, fed->fed_grant, n);
-                                } else {
-                                        used += bytes;
-                                        rnb[n].flags |= OBD_BRW_GRANTED;
-                                        lnb[n].lnb_grant_used = bytes;
-                                        CDEBUG(0, "idx %d used=%lu\n", n, used);
-                                        rc = 0;
-                                        continue;
-                                }
-                        }
-                        if (*left > ungranted + bytes) {
-                                /* if enough space, pretend it was granted */
-                                ungranted += bytes;
-                                rnb[n].flags |= OBD_BRW_GRANTED;
-                                lnb[n].lnb_grant_used = bytes;
-                                CDEBUG(0, "idx %d ungranted=%lu\n",n,ungranted);
-                                rc = 0;
-                                continue;
-                        }
-
-                        /* We can't check for already-mapped blocks here, as
-                         * it requires dropping the osfs lock to do the bmap.
-                         * Instead, we return ENOSPC and in that case we need
-                         * to go through and verify if all of the blocks not
-                         * marked BRW_GRANTED are already mapped and we can
-                         * ignore this error. */
-                        lnb[n].rc = -ENOSPC;
-                        rnb[n].flags &= ~OBD_BRW_GRANTED;
-                        CDEBUG(D_CACHE,"%s: cli %s/%p idx %d no space for %d\n",
-                               exp->exp_obd->obd_name,
-                               exp->exp_client_uuid.uuid, exp, n, bytes);
-                }
-        }
-
-        /* Now substract what client have used already.  We don't subtract
-         * this from the tot_granted yet, so that other client's can't grab
-         * that space before we have actually allocated our blocks.  That
-         * happens in filter_grant_commit() after the writes are done. */
-        *left -= ungranted;
-        fed->fed_grant -= used;
-        fed->fed_pending += used + ungranted;
-        exp->exp_obd->u.filter.fo_tot_granted += ungranted;
-        exp->exp_obd->u.filter.fo_tot_pending += used + ungranted;
-
-        CDEBUG(D_CACHE,
-               "%s: cli %s/%p used: %lu ungranted: %lu grant: %lu dirty: %lu\n",
-               exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp, used,
-               ungranted, fed->fed_grant, fed->fed_dirty);
-
-        /* Rough calc in case we don't refresh cached statfs data */
-        using = (used + ungranted + 1 ) >>
-                exp->exp_obd->u.obt.obt_sb->s_blocksize_bits;
-        if (exp->exp_obd->obd_osfs.os_bavail > using)
-                exp->exp_obd->obd_osfs.os_bavail -= using;
-        else
-                exp->exp_obd->obd_osfs.os_bavail = 0;
-
-        if (fed->fed_dirty < used) {
-                CERROR("%s: cli %s/%p claims used %lu > fed_dirty %lu\n",
-                       exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                       used, fed->fed_dirty);
-                used = fed->fed_dirty;
-        }
-        exp->exp_obd->u.filter.fo_tot_dirty -= used;
-        fed->fed_dirty -= used;
-
-        if (fed->fed_dirty < 0 || fed->fed_grant < 0 || fed->fed_pending < 0) {
-                CERROR("%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
-                       exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                       fed->fed_dirty, fed->fed_pending, fed->fed_grant);
-                spin_unlock(&exp->exp_obd->obd_osfs_lock);
-                LBUG();
-        }
-        return rc;
-}
-
-/* If we ever start to support multi-object BRW RPCs, we will need to get locks
- * on mulitple inodes.  That isn't all, because there still exists the
- * possibility of a truncate starting a new transaction while holding the ext3
- * rwsem = write while some writes (which have started their transactions here)
- * blocking on the ext3 rwsem = read => lock inversion.
- *
- * The handling gets very ugly when dealing with locked pages.  It may be easier
- * to just get rid of the locked page code (which has problems of its own) and
- * either discover we do not need it anymore (i.e. it was a symptom of another
- * bug) or ensure we get the page locks in an appropriate order. */
-static int filter_preprw_write(int cmd, struct obd_export *exp, struct obdo *oa,
-                               int objcount, struct obd_ioobj *obj,
-                               int niocount, struct niobuf_remote *nb,
-                               struct niobuf_local *res,
-                               struct obd_trans_info *oti)
-{
-        struct lvfs_run_ctxt saved;
-        struct niobuf_remote *rnb;
-        struct niobuf_local *lnb = res;
-        struct fsfilt_objinfo fso;
-        struct filter_mod_data *fmd;
-        struct dentry *dentry = NULL;
-        void *iobuf;
-        obd_size left;
-        unsigned long now = jiffies;
-        int rc = 0, i, tot_bytes = 0, cleanup_phase = 0;
-        ENTRY;
-        LASSERT(objcount == 1);
-        LASSERT(obj->ioo_bufcnt > 0);
-
-        push_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-        iobuf = filter_iobuf_get(&exp->exp_obd->u.filter, oti);
-        if (IS_ERR(iobuf))
-                GOTO(cleanup, rc = PTR_ERR(iobuf));
-        cleanup_phase = 1;
-
-        dentry = filter_fid2dentry(exp->exp_obd, NULL, obj->ioo_gr,
-                                   obj->ioo_id);
-        if (IS_ERR(dentry))
-                GOTO(cleanup, rc = PTR_ERR(dentry));
-        cleanup_phase = 2;
-
-        if (dentry->d_inode == NULL) {
-                CERROR("%s: trying to BRW to non-existent file "LPU64"\n",
-                       exp->exp_obd->obd_name, obj->ioo_id);
-                GOTO(cleanup, rc = -ENOENT);
-        }
-
-        fso.fso_dentry = dentry;
-        fso.fso_bufcnt = obj->ioo_bufcnt;
-
-        fsfilt_check_slow(exp->exp_obd, now, "preprw_write setup");
-
-        /* Don't update inode timestamps if this write is older than a
-         * setattr which modifies the timestamps. b=10150 */
-        /* XXX when we start having persistent reservations this needs to
-         * be changed to filter_fmd_get() to create the fmd if it doesn't
-         * already exist so we can store the reservation handle there. */
-        fmd = filter_fmd_find(exp, obj->ioo_id, obj->ioo_gr);
-
-        LASSERT(oa != NULL);
-        spin_lock(&exp->exp_obd->obd_osfs_lock);
- 
-        filter_grant_incoming(exp, oa);
-        if (fmd && fmd->fmd_mactime_xid > oti->oti_xid)
-                oa->o_valid &= ~(OBD_MD_FLMTIME | OBD_MD_FLCTIME |
-                                 OBD_MD_FLATIME);
-        else
-                obdo_to_inode(dentry->d_inode, oa, OBD_MD_FLATIME |
-                              OBD_MD_FLMTIME | OBD_MD_FLCTIME);
-        cleanup_phase = 3;
-
-        left = filter_grant_space_left(exp);
-
-        rc = filter_grant_check(exp, oa, objcount, &fso, niocount, nb, res,
-                                &left, dentry->d_inode);
-
-        /* do not zero out oa->o_valid as it is used in filter_commitrw_write()
-         * for setting UID/GID and fid EA in first write time. */
-        if (oa->o_valid & OBD_MD_FLGRANT)
-                oa->o_grant = filter_grant(exp,oa->o_grant,oa->o_undirty,left);
-
-        spin_unlock(&exp->exp_obd->obd_osfs_lock);
-        filter_fmd_put(exp, fmd);
-
-        if (rc)
-                GOTO(cleanup, rc);
-
-        for (i = 0, rnb = nb, lnb = res; i < obj->ioo_bufcnt;
-             i++, lnb++, rnb++) {
-                /* We still set up for ungranted pages so that granted pages
-                 * can be written to disk as they were promised, and portals
-                 * needs to keep the pages all aligned properly. */
-                lnb->dentry = dentry;
-                lnb->offset = rnb->offset;
-                lnb->len    = rnb->len;
-                lnb->flags  = rnb->flags;
-
-                /*
-                 * ost_brw_write()->ost_nio_pages_get() already initialized
-                 * lnb->page to point to the page from the per-thread page
-                 * pool (bug 5137), initialize page.
-                 */
-                LASSERT(lnb->page != NULL);
-                if (lnb->len != CFS_PAGE_SIZE) {
-                        memset(kmap(lnb->page) + lnb->len,
-                               0, CFS_PAGE_SIZE - lnb->len);
-                        kunmap(lnb->page);
-                }
-                lnb->page->index = lnb->offset >> CFS_PAGE_SHIFT;
-
-                cleanup_phase = 4;
-
-                /* If the filter writes a partial page, then has the file
-                 * extended, the client will read in the whole page.  the
-                 * filter has to be careful to zero the rest of the partial
-                 * page on disk.  we do it by hand for partial extending
-                 * writes, send_bio() is responsible for zeroing pages when
-                 * asked to read unmapped blocks -- brw_kiovec() does this. */
-                if (lnb->len != CFS_PAGE_SIZE) {
-                        __s64 maxidx;
-
-                        maxidx = ((i_size_read(dentry->d_inode) +
-                                   CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT) - 1;
-                        if (maxidx >= lnb->page->index) {
-                                LL_CDEBUG_PAGE(D_PAGE, lnb->page, "write %u @ "
-                                               LPU64" flg %x before EOF %llu\n",
-                                               lnb->len, lnb->offset,lnb->flags,
-                                               i_size_read(dentry->d_inode));
-                                filter_iobuf_add_page(exp->exp_obd, iobuf,
-                                                      dentry->d_inode,
-                                                      lnb->page);
-                        } else {
-                                long off;
-                                char *p = kmap(lnb->page);
-
-                                off = lnb->offset & ~CFS_PAGE_MASK;
-                                if (off)
-                                        memset(p, 0, off);
-                                off = (lnb->offset + lnb->len) & ~CFS_PAGE_MASK;
-                                if (off)
-                                        memset(p + off, 0, CFS_PAGE_SIZE - off);
-                                kunmap(lnb->page);
-                        }
-                }
-                if (lnb->rc == 0)
-                        tot_bytes += lnb->len;
-        }
-
-        rc = filter_direct_io(OBD_BRW_READ, dentry, iobuf, exp,
-                              NULL, NULL, NULL);
-
-        fsfilt_check_slow(exp->exp_obd, now, "start_page_write");
-
-        lprocfs_counter_add(exp->exp_obd->obd_stats, LPROC_FILTER_WRITE_BYTES,
-                            tot_bytes);
-        if (exp->exp_nid_stats && exp->exp_nid_stats->nid_stats)
-                lprocfs_counter_add(exp->exp_nid_stats->nid_stats,
-                                    LPROC_FILTER_WRITE_BYTES, tot_bytes);
-        EXIT;
-cleanup:
-        switch(cleanup_phase) {
-        case 4:
-        case 3:
-                filter_iobuf_put(&exp->exp_obd->u.filter, iobuf, oti);
-        case 2:
-                pop_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-                if (rc)
-                        f_dput(dentry);
-                break;
-        case 1:
-                filter_iobuf_put(&exp->exp_obd->u.filter, iobuf, oti);
-        case 0:
-                spin_lock(&exp->exp_obd->obd_osfs_lock);
-                if (oa)
-                        filter_grant_incoming(exp, oa);
-                spin_unlock(&exp->exp_obd->obd_osfs_lock);
-                pop_ctxt(&saved, &exp->exp_obd->obd_lvfs_ctxt, NULL);
-                break;
-        default:;
-        }
-        return rc;
-}
-
-int filter_preprw(int cmd, struct obd_export *exp, struct obdo *oa,
-                  int objcount, struct obd_ioobj *obj, int niocount,
-                  struct niobuf_remote *nb, struct niobuf_local *res,
-                  struct obd_trans_info *oti)
-{
-        if (cmd == OBD_BRW_WRITE)
-                return filter_preprw_write(cmd, exp, oa, objcount, obj,
-                                           niocount, nb, res, oti);
-        if (cmd == OBD_BRW_READ)
-                return filter_preprw_read(cmd, exp, oa, objcount, obj,
-                                          niocount, nb, res, oti);
-        LBUG();
-        return -EPROTO;
-}
-
-void filter_release_read_page(struct filter_obd *filter, struct inode *inode,
-                              struct page *page)
-{
-        int drop = 0;
-
-        if (inode != NULL &&
-            (i_size_read(inode) > filter->fo_readcache_max_filesize))
-                drop = 1;
-
-        /* drop from cache like truncate_list_pages() */
-        if (drop && !TryLockPage(page)) {
-                if (page->mapping)
-                        ll_truncate_complete_page(page);
-                unlock_page(page);
-        }
-        page_cache_release(page);
-}
-
-static int filter_commitrw_read(struct obd_export *exp, struct obdo *oa,
-                                int objcount, struct obd_ioobj *obj,
-                                int niocount, struct niobuf_local *res,
-                                struct obd_trans_info *oti, int rc)
-{
-        struct inode *inode = NULL;
-        struct ldlm_res_id res_id = { .name = { obj->ioo_id } };
-        struct ldlm_resource *resource = NULL;
-        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
-        ENTRY;
-
-        /* If oa != NULL then filter_preprw_read updated the inode atime
-         * and we should update the lvb so that other glimpses will also
-         * get the updated value. bug 5972 */
-        if (oa && ns && ns->ns_lvbo && ns->ns_lvbo->lvbo_update) {
-                resource = ldlm_resource_get(ns, NULL, res_id, LDLM_EXTENT, 0);
-
-                if (resource != NULL) {
-                        ns->ns_lvbo->lvbo_update(resource, NULL, 0, 1);
-                        ldlm_resource_putref(resource);
-                }
-        }
-
-        if (res->dentry != NULL)
-                inode = res->dentry->d_inode;
-
-        filter_free_dio_pages(objcount, obj, niocount, res);
-
-        if (res->dentry != NULL)
-                f_dput(res->dentry);
-        RETURN(rc);
-}
-
-void flip_into_page_cache(struct inode *inode, struct page *new_page)
-{
-        struct page *old_page;
-        int rc;
-
-        do {
-                /* the dlm is protecting us from read/write concurrency, so we
-                 * expect this find_lock_page to return quickly.  even if we
-                 * race with another writer it won't be doing much work with
-                 * the page locked.  we do this 'cause t_c_p expects a
-                 * locked page, and it wants to grab the pagecache lock
-                 * as well. */
-                old_page = find_lock_page(inode->i_mapping, new_page->index);
-                if (old_page) {
-                        ll_truncate_complete_page(old_page);
-                        unlock_page(old_page);
-                        page_cache_release(old_page);
-                }
-
-#if 0 /* this should be a /proc tunable someday */
-                /* racing o_directs (no locking ioctl) could race adding
-                 * their pages, so we repeat the page invalidation unless
-                 * we successfully added our new page */
-                rc = add_to_page_cache_unique(new_page, inode->i_mapping,
-                                              new_page->index,
-                                              page_hash(inode->i_mapping,
-                                                        new_page->index));
-                if (rc == 0) {
-                        /* add_to_page_cache clears uptodate|dirty and locks
-                         * the page */
-                        SetPageUptodate(new_page);
-                        unlock_page(new_page);
-                }
-#else
-                rc = 0;
-#endif
-        } while (rc != 0);
-}
-
-void filter_grant_commit(struct obd_export *exp, int niocount,
-                         struct niobuf_local *res)
-{
-        struct filter_obd *filter = &exp->exp_obd->u.filter;
-        struct niobuf_local *lnb = res;
-        unsigned long pending = 0;
-        int i;
-
-        spin_lock(&exp->exp_obd->obd_osfs_lock);
-        for (i = 0, lnb = res; i < niocount; i++, lnb++)
-                pending += lnb->lnb_grant_used;
-
-        LASSERTF(exp->exp_filter_data.fed_pending >= pending,
-                 "%s: cli %s/%p fed_pending: %lu grant_used: %lu\n",
-                 exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                 exp->exp_filter_data.fed_pending, pending);
-        exp->exp_filter_data.fed_pending -= pending;
-        LASSERTF(filter->fo_tot_granted >= pending,
-                 "%s: cli %s/%p tot_granted: "LPU64" grant_used: %lu\n",
-                 exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                 exp->exp_obd->u.filter.fo_tot_granted, pending);
-        filter->fo_tot_granted -= pending;
-        LASSERTF(filter->fo_tot_pending >= pending,
-                 "%s: cli %s/%p tot_pending: "LPU64" grant_used: %lu\n",
-                 exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
-                 filter->fo_tot_pending, pending);
-        filter->fo_tot_pending -= pending;
-
-        spin_unlock(&exp->exp_obd->obd_osfs_lock);
-}
-
-int filter_commitrw(int cmd, struct obd_export *exp, struct obdo *oa,
-                    int objcount, struct obd_ioobj *obj, int niocount,
-                    struct niobuf_local *res, struct obd_trans_info *oti,
-                    int rc)
-{
-        if (cmd == OBD_BRW_WRITE)
-                return filter_commitrw_write(exp, oa, objcount, obj, niocount,
-                                             res, oti, rc);
-        if (cmd == OBD_BRW_READ)
-                return filter_commitrw_read(exp, oa, objcount, obj, niocount,
-                                            res, oti, rc);
-        LBUG();
-        return -EPROTO;
-}
-
-int filter_brw(int cmd, struct obd_export *exp, struct obd_info *oinfo,
-               obd_count oa_bufs, struct brw_page *pga,
-               struct obd_trans_info *oti)
-{
-        struct obd_ioobj ioo;
-        struct niobuf_local *lnb;
-        struct niobuf_remote *rnb;
-        obd_count i;
-        int ret = 0;
-        ENTRY;
-
-        OBD_ALLOC(lnb, oa_bufs * sizeof(struct niobuf_local));
-        OBD_ALLOC(rnb, oa_bufs * sizeof(struct niobuf_remote));
-
-        if (lnb == NULL || rnb == NULL)
-                GOTO(out, ret = -ENOMEM);
-
-        for (i = 0; i < oa_bufs; i++) {
-                lnb[i].page = pga[i].pg;
-                rnb[i].offset = pga[i].off;
-                rnb[i].len = pga[i].count;
-        }
-
-        obdo_to_ioobj(oinfo->oi_oa, &ioo);
-        ioo.ioo_bufcnt = oa_bufs;
-
-        ret = filter_preprw(cmd, exp, oinfo->oi_oa, 1, &ioo,
-                            oa_bufs, rnb, lnb, oti);
-        if (ret != 0)
-                GOTO(out, ret);
-
-        ret = filter_commitrw(cmd, exp, oinfo->oi_oa, 1, &ioo,
-                              oa_bufs, lnb, oti, ret);
-
-out:
-        if (lnb)
-                OBD_FREE(lnb, oa_bufs * sizeof(struct niobuf_local));
-        if (rnb)
-                OBD_FREE(rnb, oa_bufs * sizeof(struct niobuf_remote));
-        RETURN(ret);
-}
diff --git a/lustre/obdfilter/filter_io_24.c b/lustre/obdfilter/filter_io_24.c
deleted file mode 100644
index a2042f898e4489148b0eaacd6a295079a4f8471d..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter_io_24.c
+++ /dev/null
@@ -1,544 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/fs/obdfilter/filter_io.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/pagemap.h> // XXX kill me soon
-#include <linux/version.h>
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <linux/iobuf.h>
-#include <linux/locks.h>
-
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include "filter_internal.h"
-
-/* Bug 2254 -- this is better done in ext3_map_inode_page, but this
- * workaround will suffice until everyone has upgraded their kernels */
-static void check_pending_bhs(unsigned long *blocks, int nr_pages, dev_t dev,
-                              int size)
-{
-#if (LUSTRE_KERNEL_VERSION < 32)
-        struct buffer_head *bh;
-        int i;
-
-        for (i = 0; i < nr_pages; i++) {
-                bh = get_hash_table(dev, blocks[i], size);
-                if (bh == NULL)
-                        continue;
-                if (!buffer_dirty(bh)) {
-                        put_bh(bh);
-                        continue;
-                }
-                mark_buffer_clean(bh);
-                wait_on_buffer(bh);
-                clear_bit(BH_Req, &bh->b_state);
-                __brelse(bh);
-        }
-#endif
-}
-
-/* when brw_kiovec() is asked to read from block -1UL it just zeros
- * the page.  this gives us a chance to verify the write mappings
- * as well */
-static int filter_cleanup_mappings(int rw, struct kiobuf *iobuf,
-                                   struct inode *inode)
-{
-        int i, blocks_per_page_bits = CFS_PAGE_SHIFT - inode->i_blkbits;
-        ENTRY;
-
-        for (i = 0 ; i < iobuf->nr_pages << blocks_per_page_bits; i++) {
-                if (KIOBUF_GET_BLOCKS(iobuf)[i] > 0)
-                        continue;
-
-                if (rw == OBD_BRW_WRITE)
-                        RETURN(-EINVAL);
-
-                KIOBUF_GET_BLOCKS(iobuf)[i] = -1UL;
-        }
-        RETURN(0);
-}
-
-#if 0
-static void dump_page(int rw, unsigned long block, struct page *page)
-{
-        char *blah = kmap(page);
-        CDEBUG(D_PAGE, "rw %d block %lu: %02x %02x %02x %02x\n", rw, block,
-                       blah[0], blah[1], blah[2], blah[3]);
-        kunmap(page);
-}
-#endif
-
-/* These are our hacks to keep our directio/bh IO coherent with ext3's
- * page cache use.  Most notably ext3 reads file data into the page
- * cache when it is zeroing the tail of partial-block truncates and
- * leaves it there, sometimes generating io from it at later truncates.
- * This removes the partial page and its buffers from the page cache,
- * so it should only ever cause a wait in rare cases, as otherwise we
- * always do full-page IO to the OST.
- *
- * The call to truncate_complete_page() will call journal_flushpage() to
- * free the buffers and drop the page from cache.  The buffers should not
- * be dirty, because we already called fdatasync/fdatawait on them.
- */
-static int filter_sync_inode_data(struct inode *inode)
-{
-        int rc, rc2;
-
-        /* This is nearly generic_osync_inode, without the waiting on the inode
-        rc = generic_osync_inode(inode, inode->i_mapping,
-                                 OSYNC_DATA|OSYNC_METADATA);
-         */
-        rc = filemap_fdatasync(inode->i_mapping);
-        rc2 = fsync_inode_data_buffers(inode);
-        if (rc == 0)
-                rc = rc2;
-        rc2 = filemap_fdatawait(inode->i_mapping);
-        if (rc == 0)
-                rc = rc2;
-
-        return rc;
-}
-
-static int filter_clear_page_cache(struct inode *inode, struct kiobuf *iobuf)
-{
-        struct page *page;
-        int i, rc;
-
-        check_pending_bhs(KIOBUF_GET_BLOCKS(iobuf), iobuf->nr_pages,
-                          inode->i_dev, 1 << inode->i_blkbits);
-
-        rc = filter_sync_inode_data(inode);
-        if (rc != 0)
-                RETURN(rc);
-
-        /* be careful to call this after fsync_inode_data_buffers has waited
-         * for IO to complete before we evict it from the cache */
-        for (i = 0; i < iobuf->nr_pages ; i++) {
-                page = find_lock_page(inode->i_mapping,
-                                      iobuf->maplist[i]->index);
-                if (page == NULL)
-                        continue;
-                if (page->mapping != NULL) {
-                        /* Now that the only source of such pages in truncate
-                         * path flushes these pages to disk and and then
-                         * discards, this is error condition */
-                        CERROR("Data page in page cache during write!\n");
-                        ll_truncate_complete_page(page);
-                }
-
-                unlock_page(page);
-                page_cache_release(page);
-        }
-
-        return 0;
-}
-
-int filter_clear_truncated_page(struct inode *inode)
-{
-        struct page *page;
-        int rc;
-
-        /* Truncate on page boundary, so nothing to flush? */
-        if (!(i_size_read(inode) & ~CFS_PAGE_MASK))
-                return 0;
-
-        rc = filter_sync_inode_data(inode);
-        if (rc != 0)
-                RETURN(rc);
-
-        /* be careful to call this after fsync_inode_data_buffers has waited
-         * for IO to complete before we evict it from the cache */
-        page = find_lock_page(inode->i_mapping,
-                              i_size_read(inode) >> CFS_PAGE_SHIFT);
-        if (page) {
-                if (page->mapping != NULL)
-                        ll_truncate_complete_page(page);
-
-                unlock_page(page);
-                page_cache_release(page);
-        }
-
-        return 0;
-}
-
-/* Must be called with i_sem taken for writes; this will drop it */
-int filter_direct_io(int rw, struct dentry *dchild, struct filter_iobuf *buf,
-                     struct obd_export *exp, struct iattr *attr,
-                     struct obd_trans_info *oti, void **wait_handle)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct inode *inode = dchild->d_inode;
-        struct kiobuf *iobuf = (void *)buf;
-        int rc, create = (rw == OBD_BRW_WRITE), committed = 0;
-        int blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits, cleanup_phase = 0;
-        struct semaphore *sem = NULL;
-        ENTRY;
-
-        LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw);
-
-        if (iobuf->nr_pages == 0)
-                GOTO(cleanup, rc = 0);
-
-        if (iobuf->nr_pages * blocks_per_page > KIO_MAX_SECTORS)
-                GOTO(cleanup, rc = -EINVAL);
-
-        if (iobuf->nr_pages * blocks_per_page >
-            OBDFILTER_CREATED_SCRATCHPAD_ENTRIES)
-                GOTO(cleanup, rc = -EINVAL);
-
-        cleanup_phase = 1;
-
-        rc = lock_kiovec(1, &iobuf, 1);
-        if (rc < 0)
-                GOTO(cleanup, rc);
-        cleanup_phase = 2;
-
-        if (rw == OBD_BRW_WRITE) {
-                create = 1;
-                sem = &obd->u.filter.fo_alloc_lock;
-        }
-        rc = fsfilt_map_inode_pages(obd, inode, iobuf->maplist,
-                                    iobuf->nr_pages, KIOBUF_GET_BLOCKS(iobuf),
-                                    obdfilter_created_scratchpad, create, sem);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        rc = filter_cleanup_mappings(rw, iobuf, inode);
-        if (rc)
-                GOTO(cleanup, rc);
-
-        if (rw == OBD_BRW_WRITE) {
-                if (rc == 0) {
-                        filter_tally(exp, iobuf->maplist, iobuf->nr_pages,
-                                     KIOBUF_GET_BLOCKS(iobuf), blocks_per_page,
-                                     1);
-
-                        if (attr->ia_size > i_size_read(inode))
-                                attr->ia_valid |= ATTR_SIZE;
-                        rc = fsfilt_setattr(obd, dchild,
-                                            oti->oti_handle, attr, 0);
-                        if (rc)
-                                GOTO(cleanup, rc);
-                }
-
-                up(&inode->i_sem);
-                cleanup_phase = 3;
-
-                rc = filter_finish_transno(exp, oti, 0, 0);
-                if (rc)
-                        GOTO(cleanup, rc);
-
-                rc = fsfilt_commit_async(obd,inode,oti->oti_handle,wait_handle);
-                committed = 1;
-                if (rc)
-                        GOTO(cleanup, rc);
-        } else {
-                filter_tally(exp, iobuf->maplist, iobuf->nr_pages,
-                             KIOBUF_GET_BLOCKS(iobuf), blocks_per_page, 0);
-        }
-
-        rc = filter_clear_page_cache(inode, iobuf);
-        if (rc < 0)
-                GOTO(cleanup, rc);
-
-        rc = fsfilt_send_bio(rw, obd, inode, iobuf);
-
-        CDEBUG(D_INFO, "tried to %s %d pages, rc = %d\n",
-               rw & OBD_BRW_WRITE ? "write" : "read", iobuf->nr_pages, rc);
-
-        if (rc > 0)
-                rc = 0;
-
-        EXIT;
-cleanup:
-        if (!committed && (rw == OBD_BRW_WRITE)) {
-                int err = fsfilt_commit_async(obd, inode,
-                                              oti->oti_handle, wait_handle);
-                if (err)
-                        CERROR("can't close transaction: %d\n", err);
-                /*
-                 * this is error path, so we prefer to return
-                 * original error, not this one
-                 */
-        }
-
-        switch(cleanup_phase) {
-        case 3:
-        case 2:
-                unlock_kiovec(1, &iobuf);
-        case 1:
-        case 0:
-                if (cleanup_phase != 3 && rw == OBD_BRW_WRITE)
-                        up(&inode->i_sem);
-                break;
-        default:
-                CERROR("corrupt cleanup_phase (%d)?\n", cleanup_phase);
-                LBUG();
-                break;
-        }
-        return rc;
-}
-
-/* See if there are unallocated parts in given file region */
-int filter_range_is_mapped(struct inode *inode, obd_size offset, int len)
-{
-        int (*fs_bmap)(struct address_space *, long) =
-                inode->i_mapping->a_ops->bmap;
-        int j;
-
-        /* We can't know if the range is mapped already or not */
-        if (fs_bmap == NULL)
-                return 0;
-
-        offset >>= inode->i_blkbits;
-        len >>= inode->i_blkbits;
-
-        for (j = 0; j < len; j++)
-                if (fs_bmap(inode->i_mapping, offset + j) == 0)
-                        return 0;
-
-        return 1;
-}
-
-/* some kernels require alloc_kiovec callers to zero members through the use of
- * map_user_kiobuf and unmap_.. we don't use those, so we have a little helper
- * that makes sure we don't break the rules. */
-static void clear_kiobuf(struct kiobuf *iobuf)
-{
-        int i;
-
-        for (i = 0; i < iobuf->array_len; i++)
-                iobuf->maplist[i] = NULL;
-
-        iobuf->nr_pages = 0;
-        iobuf->offset = 0;
-        iobuf->length = 0;
-}
-
-struct filter_iobuf *filter_alloc_iobuf(struct filter_obd *filter,
-                                        int rw, int num_pages)
-{
-        struct kiobuf *iobuf;
-        int rc;
-        ENTRY;
-
-        LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw);
-
-        rc = alloc_kiovec(1, &iobuf);
-        if (rc)
-                RETURN(ERR_PTR(rc));
-
-        rc = expand_kiobuf(iobuf, num_pages);
-        if (rc) {
-                free_kiovec(1, &iobuf);
-                RETURN(ERR_PTR(rc));
-        }
-
-#ifdef HAVE_KIOBUF_DOVARY
-        iobuf->dovary = 0; /* this prevents corruption, not present in 2.4.20 */
-#endif
-        clear_kiobuf(iobuf);
-        RETURN((void *)iobuf);
-}
-
-void filter_free_iobuf(struct filter_iobuf *buf)
-{
-        struct kiobuf *iobuf = (void *)buf;
-
-        clear_kiobuf(iobuf);
-        free_kiovec(1, &iobuf);
-}
-
-void filter_iobuf_put(struct filter_obd *filter, struct filter_iobuf *iobuf,
-                      struct obd_trans_info *oti)
-{
-        int thread_id = oti ? oti->oti_thread_id : -1;
-
-        if (unlikely(thread_id < 0)) {
-                filter_free_iobuf(iobuf);
-                return;
-        }
-
-        LASSERTF(filter->fo_iobuf_pool[thread_id] == iobuf,
-                 "iobuf mismatch for thread %d: pool %p iobuf %p\n",
-                 thread_id, filter->fo_iobuf_pool[thread_id], iobuf);
-        clear_kiobuf((void *)iobuf);
-}
-
-int filter_iobuf_add_page(struct obd_device *obd, struct filter_iobuf *buf,
-                           struct inode *inode, struct page *page)
-{
-        struct kiobuf *iobuf = (void *)buf;
-
-        iobuf->maplist[iobuf->nr_pages++] = page;
-        iobuf->length += CFS_PAGE_SIZE;
-
-        return 0;
-}
-
-int filter_commitrw_write(struct obd_export *exp, struct obdo *oa, int objcount,
-                          struct obd_ioobj *obj, int niocount,
-                          struct niobuf_local *res, struct obd_trans_info *oti,
-                          int rc)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct lvfs_run_ctxt saved;
-        struct niobuf_local *lnb;
-        struct fsfilt_objinfo fso;
-        struct iattr iattr = { 0 };
-        void *iobuf = NULL;
-        struct inode *inode = NULL;
-        int i, n, cleanup_phase = 0, err;
-        unsigned long now = jiffies; /* DEBUGGING OST TIMEOUTS */
-        void *wait_handle;
-        ENTRY;
-        LASSERT(oti != NULL);
-        LASSERT(objcount == 1);
-        LASSERT(current->journal_info == NULL);
-
-        if (rc != 0)
-                GOTO(cleanup, rc);
-
-        iobuf = filter_iobuf_get(&obd->u.filter, oti);
-        if (IS_ERR(iobuf))
-                GOTO(cleanup, rc = PTR_ERR(iobuf));
-        cleanup_phase = 1;
-
-        fso.fso_dentry = res->dentry;
-        fso.fso_bufcnt = obj->ioo_bufcnt;
-        inode = res->dentry->d_inode;
-
-        for (i = 0, lnb = res, n = 0; i < obj->ioo_bufcnt; i++, lnb++) {
-                loff_t this_size;
-
-                /* If overwriting an existing block, we don't need a grant */
-                if (!(lnb->flags & OBD_BRW_GRANTED) && lnb->rc == -ENOSPC &&
-                    filter_range_is_mapped(inode, lnb->offset, lnb->len))
-                        lnb->rc = 0;
-
-                if (lnb->rc) /* ENOSPC, network RPC error */
-                        continue;
-
-                filter_iobuf_add_page(obd, iobuf, inode, lnb->page);
-
-                /* We expect these pages to be in offset order, but we'll
-                 * be forgiving */
-                this_size = lnb->offset + lnb->len;
-                if (this_size > iattr.ia_size)
-                        iattr.ia_size = this_size;
-        }
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        cleanup_phase = 2;
-
-        down(&inode->i_sem);
-        oti->oti_handle = fsfilt_brw_start(obd, objcount, &fso, niocount, res,
-                                           oti);
-        if (IS_ERR(oti->oti_handle)) {
-                up(&inode->i_sem);
-                rc = PTR_ERR(oti->oti_handle);
-                CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR,
-                       "error starting transaction: rc = %d\n", rc);
-                oti->oti_handle = NULL;
-                GOTO(cleanup, rc);
-        }
-
-        fsfilt_check_slow(obd, now, "brw_start");
-
-        i = OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME;
-
-        /* If the inode still has SUID+SGID bits set (see filter_precreate())
-         * then we will accept the UID+GID if sent by the client for
-         * initializing the ownership of this inode.  We only allow this to
-         * happen once (so clear these bits) and later only allow setattr. */
-        if (inode->i_mode & S_ISUID)
-                i |= OBD_MD_FLUID;
-        if (inode->i_mode & S_ISGID)
-                i |= OBD_MD_FLGID;
-
-        iattr_from_obdo(&iattr, oa, i);
-        if (iattr.ia_valid & (ATTR_UID | ATTR_GID)) {
-                CDEBUG(D_INODE, "update UID/GID to %lu/%lu\n",
-                       (unsigned long)oa->o_uid, (unsigned long)oa->o_gid);
-
-                cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
-
-                iattr.ia_valid |= ATTR_MODE;
-                iattr.ia_mode = inode->i_mode;
-                if (iattr.ia_valid & ATTR_UID)
-                        iattr.ia_mode &= ~S_ISUID;
-                if (iattr.ia_valid & ATTR_GID)
-                        iattr.ia_mode &= ~S_ISGID;
-
-                rc = filter_update_fidea(exp, inode, oti->oti_handle, oa);
-        }
-
-        /* filter_direct_io drops i_sem */
-        rc = filter_direct_io(OBD_BRW_WRITE, res->dentry, iobuf, exp, &iattr,
-                              oti, &wait_handle);
-        if (rc == 0)
-                obdo_from_inode(oa, inode, FILTER_VALID_FLAGS);
-
-        fsfilt_check_slow(obd, now, "direct_io");
-
-        err = fsfilt_commit_wait(obd, inode, wait_handle);
-        if (err) {
-                CERROR("Failure to commit OST transaction (%d)?\n", err);
-                rc = err;
-        }
-        if (obd->obd_replayable && !rc)
-                LASSERTF(oti->oti_transno <= obd->obd_last_committed,
-                         "oti_transno "LPU64" last_committed "LPU64"\n",
-                         oti->oti_transno, obd->obd_last_committed);
-        fsfilt_check_slow(obd, now, "commitrw commit");
-
-cleanup:
-        filter_grant_commit(exp, niocount, res);
-
-        switch (cleanup_phase) {
-        case 2:
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                LASSERT(current->journal_info == NULL);
-        case 1:
-                filter_iobuf_put(&obd->u.filter, iobuf, oti);
-        case 0:
-                /*
-                 * lnb->page automatically returns back into per-thread page
-                 * pool (bug 5137)
-                 */
-                f_dput(res->dentry);
-        }
-
-        RETURN(rc);
-}
diff --git a/lustre/obdfilter/filter_io_26.c b/lustre/obdfilter/filter_io_26.c
deleted file mode 100644
index cf13af18613acf1f42b17e6c32b38d90e6f0dfc2..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter_io_26.c
+++ /dev/null
@@ -1,810 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/fs/obdfilter/filter_io.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/pagemap.h> // XXX kill me soon
-#include <linux/version.h>
-#include <linux/buffer_head.h>
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include <lustre_quota.h>
-#include "filter_internal.h"
-
-/* 512byte block min */
-#define MAX_BLOCKS_PER_PAGE (CFS_PAGE_SIZE / 512)
-struct filter_iobuf {
-        atomic_t          dr_numreqs;  /* number of reqs being processed */
-        wait_queue_head_t dr_wait;
-        int               dr_max_pages;
-        int               dr_npages;
-        int               dr_error;
-        struct page     **dr_pages;
-        unsigned long    *dr_blocks;
-        spinlock_t        dr_lock;              /* IRQ lock */
-        unsigned int      dr_ignore_quota:1;
-        struct filter_obd *dr_filter;
-};
-
-static void record_start_io(struct filter_iobuf *iobuf, int rw, int size,
-                            struct obd_export *exp)
-{
-        struct filter_obd *filter = iobuf->dr_filter;
-
-        atomic_inc(&iobuf->dr_numreqs);
-
-        if (rw == OBD_BRW_READ) {
-                atomic_inc(&filter->fo_r_in_flight);
-                lprocfs_oh_tally(&filter->fo_filter_stats.hist[BRW_R_RPC_HIST],
-                                 atomic_read(&filter->fo_r_in_flight));
-                lprocfs_oh_tally_log2(&filter->fo_filter_stats.hist[BRW_R_DISK_IOSIZE], size);
-                lprocfs_oh_tally(&exp->exp_filter_data.fed_brw_stats.hist[BRW_R_RPC_HIST],
-                                 atomic_read(&filter->fo_r_in_flight));
-                lprocfs_oh_tally_log2(&exp->exp_filter_data.fed_brw_stats.hist[BRW_R_DISK_IOSIZE], size);
-        } else {
-                atomic_inc(&filter->fo_w_in_flight);
-                lprocfs_oh_tally(&filter->fo_filter_stats.hist[BRW_W_RPC_HIST],
-                                 atomic_read(&filter->fo_w_in_flight));
-                lprocfs_oh_tally_log2(&filter->fo_filter_stats.hist[BRW_W_DISK_IOSIZE], size);
-                lprocfs_oh_tally(&exp->exp_filter_data.fed_brw_stats.hist[BRW_W_RPC_HIST],
-                                 atomic_read(&filter->fo_w_in_flight));
-                lprocfs_oh_tally_log2(&exp->exp_filter_data.fed_brw_stats.hist[BRW_W_DISK_IOSIZE], size);
-        }
-}
-
-static void record_finish_io(struct filter_iobuf *iobuf, int rw, int rc)
-{
-        struct filter_obd *filter = iobuf->dr_filter;
-
-        /* CAVEAT EMPTOR: possibly in IRQ context 
-         * DO NOT record procfs stats here!!! */
-
-        if (rw == OBD_BRW_READ)
-                atomic_dec(&filter->fo_r_in_flight);
-        else
-                atomic_dec(&filter->fo_w_in_flight);
-
-        if (atomic_dec_and_test(&iobuf->dr_numreqs))
-                wake_up(&iobuf->dr_wait);
-}
-
-static int dio_complete_routine(struct bio *bio, unsigned int done, int error)
-{
-        struct filter_iobuf *iobuf = bio->bi_private;
-        unsigned long        flags;
-
-#ifdef HAVE_PAGE_CONSTANT
-        struct bio_vec *bvl;
-        int i;
-#endif
-
-        /* CAVEAT EMPTOR: possibly in IRQ context 
-         * DO NOT record procfs stats here!!! */
-
-        if (bio->bi_size)                       /* Not complete */
-                return 1;
-
-        if (iobuf == NULL) {
-                CERROR("***** bio->bi_private is NULL!  This should never "
-                       "happen.  Normally, I would crash here, but instead I "
-                       "will dump the bio contents to the console.  Please "
-                       "report this to CFS, along with any interesting "
-                       "messages leading up to this point (like SCSI errors, "
-                       "perhaps).  Because bi_private is NULL, I can't wake up "
-                       "the thread that initiated this I/O -- so you will "
-                       "probably have to reboot this node.\n");
-                CERROR("bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d, "
-                       "bi_idx: %d, bi->size: %d, bi_end_io: %p, bi_cnt: %d, "
-                       "bi_private: %p\n", bio->bi_next, bio->bi_flags,
-                       bio->bi_rw, bio->bi_vcnt, bio->bi_idx, bio->bi_size,
-                       bio->bi_end_io, atomic_read(&bio->bi_cnt),
-                       bio->bi_private);
-                return 0;
-        }
-
-#ifdef HAVE_PAGE_CONSTANT
-        bio_for_each_segment(bvl, bio, i)
-                ClearPageConstant(bvl->bv_page);
-#endif
-
-        spin_lock_irqsave(&iobuf->dr_lock, flags);
-        if (iobuf->dr_error == 0)
-                iobuf->dr_error = error;
-        spin_unlock_irqrestore(&iobuf->dr_lock, flags);
-
-        record_finish_io(iobuf, test_bit(BIO_RW, &bio->bi_rw) ?
-                         OBD_BRW_WRITE : OBD_BRW_READ, error);
-
-        /* Completed bios used to be chained off iobuf->dr_bios and freed in
-         * filter_clear_dreq().  It was then possible to exhaust the biovec-256
-         * mempool when serious on-disk fragmentation was encountered,
-         * deadlocking the OST.  The bios are now released as soon as complete
-         * so the pool cannot be exhausted while IOs are competing. bug 10076 */
-        bio_put(bio);
-        return 0;
-}
-
-static int can_be_merged(struct bio *bio, sector_t sector)
-{
-        unsigned int size;
-
-        if (!bio)
-                return 0;
-
-        size = bio->bi_size >> 9;
-        return bio->bi_sector + size == sector ? 1 : 0;
-}
-
-struct filter_iobuf *filter_alloc_iobuf(struct filter_obd *filter,
-                                        int rw, int num_pages)
-{
-        struct filter_iobuf *iobuf;
-
-        LASSERTF(rw == OBD_BRW_WRITE || rw == OBD_BRW_READ, "%x\n", rw);
-
-        OBD_ALLOC(iobuf, sizeof(*iobuf));
-        if (iobuf == NULL)
-                goto failed_0;
-
-        OBD_ALLOC(iobuf->dr_pages, num_pages * sizeof(*iobuf->dr_pages));
-        if (iobuf->dr_pages == NULL)
-                goto failed_1;
-
-        OBD_ALLOC(iobuf->dr_blocks,
-                  MAX_BLOCKS_PER_PAGE * num_pages * sizeof(*iobuf->dr_blocks));
-        if (iobuf->dr_blocks == NULL)
-                goto failed_2;
-
-        iobuf->dr_filter = filter;
-        init_waitqueue_head(&iobuf->dr_wait);
-        atomic_set(&iobuf->dr_numreqs, 0);
-        spin_lock_init(&iobuf->dr_lock);
-        iobuf->dr_max_pages = num_pages;
-        iobuf->dr_npages = 0;
-        iobuf->dr_error = 0;
-
-        RETURN(iobuf);
-
- failed_2:
-        OBD_FREE(iobuf->dr_pages,
-                 num_pages * sizeof(*iobuf->dr_pages));
- failed_1:
-        OBD_FREE(iobuf, sizeof(*iobuf));
- failed_0:
-        RETURN(ERR_PTR(-ENOMEM));
-}
-
-static void filter_clear_iobuf(struct filter_iobuf *iobuf)
-{
-        iobuf->dr_npages = 0;
-        iobuf->dr_error = 0;
-        atomic_set(&iobuf->dr_numreqs, 0);
-}
-
-void filter_free_iobuf(struct filter_iobuf *iobuf)
-{
-        int num_pages = iobuf->dr_max_pages;
-
-        filter_clear_iobuf(iobuf);
-
-        OBD_FREE(iobuf->dr_blocks,
-                 MAX_BLOCKS_PER_PAGE * num_pages * sizeof(*iobuf->dr_blocks));
-        OBD_FREE(iobuf->dr_pages,
-                 num_pages * sizeof(*iobuf->dr_pages));
-        OBD_FREE_PTR(iobuf);
-}
-
-void filter_iobuf_put(struct filter_obd *filter, struct filter_iobuf *iobuf,
-                      struct obd_trans_info *oti)
-{
-        int thread_id = oti ? oti->oti_thread_id : -1;
-
-        if (unlikely(thread_id < 0)) {
-                filter_free_iobuf(iobuf);
-                return;
-        }
-
-        LASSERTF(filter->fo_iobuf_pool[thread_id] == iobuf,
-                 "iobuf mismatch for thread %d: pool %p iobuf %p\n",
-                 thread_id, filter->fo_iobuf_pool[thread_id], iobuf);
-        filter_clear_iobuf(iobuf);
-}
-
-int filter_iobuf_add_page(struct obd_device *obd, struct filter_iobuf *iobuf,
-                          struct inode *inode, struct page *page)
-{
-        LASSERT(iobuf->dr_npages < iobuf->dr_max_pages);
-        iobuf->dr_pages[iobuf->dr_npages++] = page;
-
-        return 0;
-}
-
-int filter_do_bio(struct obd_export *exp, struct inode *inode,
-                  struct filter_iobuf *iobuf, int rw)
-{
-        struct obd_device *obd = exp->exp_obd;
-        int            blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits;
-        struct page  **pages = iobuf->dr_pages;
-        int            npages = iobuf->dr_npages;
-        unsigned long *blocks = iobuf->dr_blocks;
-        int            total_blocks = npages * blocks_per_page;
-        int            sector_bits = inode->i_sb->s_blocksize_bits - 9;
-        unsigned int   blocksize = inode->i_sb->s_blocksize;
-        struct bio    *bio = NULL;
-        int            frags = 0;
-        unsigned long  start_time = jiffies;
-        struct page   *page;
-        unsigned int   page_offset;
-        sector_t       sector;
-        int            nblocks;
-        int            block_idx;
-        int            page_idx;
-        int            i;
-        int            rc = 0;
-        ENTRY;
-
-        LASSERT(iobuf->dr_npages == npages);
-        LASSERT(total_blocks <= OBDFILTER_CREATED_SCRATCHPAD_ENTRIES);
-
-        for (page_idx = 0, block_idx = 0;
-             page_idx < npages;
-             page_idx++, block_idx += blocks_per_page) {
-
-                page = pages[page_idx];
-                LASSERT (block_idx + blocks_per_page <= total_blocks);
-
-                for (i = 0, page_offset = 0;
-                     i < blocks_per_page;
-                     i += nblocks, page_offset += blocksize * nblocks) {
-
-                        nblocks = 1;
-
-                        if (blocks[block_idx + i] == 0) {  /* hole */
-                                LASSERT(rw == OBD_BRW_READ);
-                                memset(kmap(page) + page_offset, 0, blocksize);
-                                kunmap(page);
-                                continue;
-                        }
-
-                        sector = (sector_t)blocks[block_idx + i] << sector_bits;
-
-                        /* Additional contiguous file blocks? */
-                        while (i + nblocks < blocks_per_page &&
-                               (sector + (nblocks << sector_bits)) ==
-                               ((sector_t)blocks[block_idx + i + nblocks] <<
-                                sector_bits))
-                                nblocks++;
-
-#ifdef HAVE_PAGE_CONSTANT
-                        /* I only set the page to be constant only if it 
-                         * is mapped to a contiguous underlying disk block(s). 
-                         * It will then make sure the corresponding device 
-                         * cache of raid5 will be overwritten by this page. 
-                         * - jay */
-                        if ((rw == OBD_BRW_WRITE) && 
-                            (nblocks == blocks_per_page) && 
-                            mapping_cap_page_constant_write(inode->i_mapping))
-                                SetPageConstant(page);
-#endif
-
-                        if (bio != NULL &&
-                            can_be_merged(bio, sector) &&
-                            bio_add_page(bio, page,
-                                         blocksize * nblocks, page_offset) != 0)
-                                continue;       /* added this frag OK */
-
-                        if (bio != NULL) {
-                                request_queue_t *q =
-                                        bdev_get_queue(bio->bi_bdev);
-
-                                /* Dang! I have to fragment this I/O */
-                                CDEBUG(D_INODE, "bio++ sz %d vcnt %d(%d) "
-                                       "sectors %d(%d) psg %d(%d) hsg %d(%d)\n",
-                                       bio->bi_size,
-                                       bio->bi_vcnt, bio->bi_max_vecs,
-                                       bio->bi_size >> 9, q->max_sectors,
-                                       bio_phys_segments(q, bio),
-                                       q->max_phys_segments,
-                                       bio_hw_segments(q, bio),
-                                       q->max_hw_segments);
-
-                                record_start_io(iobuf, rw, bio->bi_size, exp);
-                                rc = fsfilt_send_bio(rw, obd, inode, bio);
-                                if (rc < 0) {
-                                        CERROR("Can't send bio: %d\n", rc);
-                                        record_finish_io(iobuf, rw, rc);
-                                        goto out;
-                                }
-                                frags++;
-                        }
-
-                        /* allocate new bio */
-                        bio = bio_alloc(GFP_NOIO,
-                                        (npages - page_idx) * blocks_per_page);
-                        if (bio == NULL) {
-                                CERROR("Can't allocate bio %u*%u = %u pages\n",
-                                       (npages - page_idx), blocks_per_page,
-                                       (npages - page_idx) * blocks_per_page);
-                                rc = -ENOMEM;
-                                goto out;
-                        }
-
-                        bio->bi_bdev = inode->i_sb->s_bdev;
-                        bio->bi_sector = sector;
-                        bio->bi_end_io = dio_complete_routine;
-                        bio->bi_private = iobuf;
-
-                        rc = bio_add_page(bio, page,
-                                          blocksize * nblocks, page_offset);
-                        LASSERT (rc != 0);
-                }
-        }
-
-        if (bio != NULL) {
-                record_start_io(iobuf, rw, bio->bi_size, exp);
-                rc = fsfilt_send_bio(rw, obd, inode, bio);
-                if (rc >= 0) {
-                        frags++;
-                        rc = 0;
-                } else {
-                        CERROR("Can't send bio: %d\n", rc);
-                        record_finish_io(iobuf, rw, rc);
-                }
-        }
-
- out:
-        wait_event(iobuf->dr_wait, atomic_read(&iobuf->dr_numreqs) == 0);
-
-        if (rw == OBD_BRW_READ) {
-                lprocfs_oh_tally(&obd->u.filter.fo_filter_stats.hist[BRW_R_DIO_FRAGS], frags);
-                lprocfs_oh_tally(&exp->exp_filter_data.fed_brw_stats.hist[BRW_R_DIO_FRAGS],
-                                 frags);
-                lprocfs_oh_tally_log2(&obd->u.filter.fo_filter_stats.hist[BRW_R_IO_TIME],
-                                      jiffies - start_time);
-                lprocfs_oh_tally_log2(&exp->exp_filter_data.fed_brw_stats.hist[BRW_R_IO_TIME],
-                                 jiffies - start_time);
-                if (exp->exp_nid_stats && exp->exp_nid_stats->nid_brw_stats) {
-                        lprocfs_oh_tally(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_R_DIO_FRAGS],
-                                         frags);
-                        lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_R_IO_TIME],
-                                              jiffies - start_time);
-                }
-        } else {
-                lprocfs_oh_tally(&obd->u.filter.fo_filter_stats.hist[BRW_W_DIO_FRAGS], frags);
-                lprocfs_oh_tally(&exp->exp_filter_data.fed_brw_stats.hist[BRW_W_DIO_FRAGS],
-                                 frags);
-                lprocfs_oh_tally_log2(&obd->u.filter.fo_filter_stats.hist[BRW_W_IO_TIME],
-                                      jiffies - start_time);
-                lprocfs_oh_tally_log2(&exp->exp_filter_data.fed_brw_stats.hist[BRW_W_IO_TIME],
-                                 jiffies - start_time);
-                if (exp->exp_nid_stats && exp->exp_nid_stats->nid_brw_stats) {
-                        lprocfs_oh_tally(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_DIO_FRAGS],
-                                         frags);
-                        lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_IO_TIME],
-                                              jiffies - start_time);
-                }
-        }
-
-        if (rc == 0)
-                rc = iobuf->dr_error;
-        RETURN(rc);
-}
-
-/* These are our hacks to keep our directio/bh IO coherent with ext3's
- * page cache use.  Most notably ext3 reads file data into the page
- * cache when it is zeroing the tail of partial-block truncates and
- * leaves it there, sometimes generating io from it at later truncates.
- * This removes the partial page and its buffers from the page cache,
- * so it should only ever cause a wait in rare cases, as otherwise we
- * always do full-page IO to the OST.
- *
- * The call to truncate_complete_page() will call journal_invalidatepage()
- * to free the buffers and drop the page from cache.  The buffers should
- * not be dirty, because we already called fdatasync/fdatawait on them.
- */
-static int filter_sync_inode_data(struct inode *inode, int locked)
-{
-        int rc = 0;
-
-        /* This is nearly do_fsync(), without the waiting on the inode */
-        /* XXX: in 2.6.16 (at least) we don't need to hold i_mutex over
-         * filemap_fdatawrite() and filemap_fdatawait(), so we may no longer
-         * need this lock here at all. */
-        if (!locked)
-                LOCK_INODE_MUTEX(inode);
-        if (inode->i_mapping->nrpages) {
-#ifdef PF_SYNCWRITE
-                current->flags |= PF_SYNCWRITE;
-#endif
-                rc = filemap_fdatawrite(inode->i_mapping);
-                if (rc == 0)
-                        rc = filemap_fdatawait(inode->i_mapping);
-#ifdef PF_SYNCWRITE
-                current->flags &= ~PF_SYNCWRITE;
-#endif
-        }
-        if (!locked)
-                UNLOCK_INODE_MUTEX(inode);
-
-        return rc;
-}
-
-/* Clear pages from the mapping before we do direct IO to that offset.
- * Now that the only source of such pages in the truncate path flushes
- * these pages to disk and then discards them, this is error condition.
- * If add back read cache this will happen again.  This could be disabled
- * until that time if we never see the below error. */
-static int filter_clear_page_cache(struct inode *inode,
-                                   struct filter_iobuf *iobuf)
-{
-        struct page *page;
-        int i, rc;
-
-        rc = filter_sync_inode_data(inode, 0);
-        if (rc != 0)
-                RETURN(rc);
-
-        /* be careful to call this after fsync_inode_data_buffers has waited
-         * for IO to complete before we evict it from the cache */
-        for (i = 0; i < iobuf->dr_npages; i++) {
-                page = find_lock_page(inode->i_mapping,
-                                      iobuf->dr_pages[i]->index);
-                if (page == NULL)
-                        continue;
-                if (page->mapping != NULL) {
-                        CERROR("page %lu (%d/%d) in page cache during write!\n",
-                               page->index, i, iobuf->dr_npages);
-                        wait_on_page_writeback(page);
-                        ll_truncate_complete_page(page);
-                }
-
-                unlock_page(page);
-                page_cache_release(page);
-        }
-
-        return 0;
-}
-
-int filter_clear_truncated_page(struct inode *inode)
-{
-        struct page *page;
-        int rc;
-
-        /* Truncate on page boundary, so nothing to flush? */
-        if (!(i_size_read(inode) & ~CFS_PAGE_MASK))
-                return 0;
-
-        rc = filter_sync_inode_data(inode, 1);
-        if (rc != 0)
-                RETURN(rc);
-
-        /* be careful to call this after fsync_inode_data_buffers has waited
-         * for IO to complete before we evict it from the cache */
-        page = find_lock_page(inode->i_mapping,
-                              i_size_read(inode) >> CFS_PAGE_SHIFT);
-        if (page) {
-                if (page->mapping != NULL) {
-                        wait_on_page_writeback(page);
-                        ll_truncate_complete_page(page);
-                }
-                unlock_page(page);
-                page_cache_release(page);
-        }
-
-        return 0;
-}
-
-/* Must be called with i_mutex taken for writes; this will drop it */
-int filter_direct_io(int rw, struct dentry *dchild, struct filter_iobuf *iobuf,
-                     struct obd_export *exp, struct iattr *attr,
-                     struct obd_trans_info *oti, void **wait_handle)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct inode *inode = dchild->d_inode;
-        int blocks_per_page = CFS_PAGE_SIZE >> inode->i_blkbits;
-        int rc, rc2, create;
-        struct semaphore *sem;
-        ENTRY;
-
-        LASSERTF(iobuf->dr_npages <= iobuf->dr_max_pages, "%d,%d\n",
-                 iobuf->dr_npages, iobuf->dr_max_pages);
-        LASSERT(iobuf->dr_npages <= OBDFILTER_CREATED_SCRATCHPAD_ENTRIES);
-
-        if (rw == OBD_BRW_READ) {
-                if (iobuf->dr_npages == 0)
-                        RETURN(0);
-                create = 0;
-                sem = NULL;
-        } else {
-                LASSERTF(rw == OBD_BRW_WRITE, "%x\n", rw);
-                LASSERT(iobuf->dr_npages > 0);
-                create = 1;
-                sem = &obd->u.filter.fo_alloc_lock;
-
-                lquota_enforce(filter_quota_interface_ref, obd,
-                               iobuf->dr_ignore_quota);
-        }
-
-        rc = fsfilt_map_inode_pages(obd, inode, iobuf->dr_pages,
-                                    iobuf->dr_npages, iobuf->dr_blocks,
-                                    obdfilter_created_scratchpad, create, sem);
-
-        if (rw == OBD_BRW_WRITE) {
-                if (rc == 0) {
-                        filter_tally(exp, iobuf->dr_pages,
-                                     iobuf->dr_npages, iobuf->dr_blocks,
-                                     blocks_per_page, 1);
-                        if (attr->ia_size > i_size_read(inode))
-                                attr->ia_valid |= ATTR_SIZE;
-                        rc = fsfilt_setattr(obd, dchild,
-                                            oti->oti_handle, attr, 0);
-                }
-
-                UNLOCK_INODE_MUTEX(inode);
-
-                rc2 = filter_finish_transno(exp, oti, 0, 0);
-                if (rc2 != 0) {
-                        CERROR("can't close transaction: %d\n", rc2);
-                        if (rc == 0)
-                                rc = rc2;
-                }
-
-                rc2 =fsfilt_commit_async(obd,inode,oti->oti_handle,wait_handle);
-                if (rc == 0)
-                        rc = rc2;
-                if (rc != 0)
-                        RETURN(rc);
-        } else if (rc == 0) {
-                filter_tally(exp, iobuf->dr_pages, iobuf->dr_npages,
-                             iobuf->dr_blocks, blocks_per_page, 0);
-        }
-
-        rc = filter_clear_page_cache(inode, iobuf);
-        if (rc != 0)
-                RETURN(rc);
-
-        RETURN(filter_do_bio(exp, inode, iobuf, rw));
-}
-
-/* See if there are unallocated parts in given file region */
-static int filter_range_is_mapped(struct inode *inode, obd_size offset, int len)
-{
-        sector_t (*fs_bmap)(struct address_space *, sector_t) =
-                inode->i_mapping->a_ops->bmap;
-        int j;
-
-        /* We can't know if we are overwriting or not */
-        if (fs_bmap == NULL)
-                return 0;
-
-        offset >>= inode->i_blkbits;
-        len >>= inode->i_blkbits;
-
-        for (j = 0; j <= len; j++)
-                if (fs_bmap(inode->i_mapping, offset + j) == 0)
-                        return 0;
-
-        return 1;
-}
-
-int filter_commitrw_write(struct obd_export *exp, struct obdo *oa,
-                          int objcount, struct obd_ioobj *obj, int niocount,
-                          struct niobuf_local *res, struct obd_trans_info *oti,
-                          int rc)
-{
-        struct niobuf_local *lnb;
-        struct filter_iobuf *iobuf = NULL;
-        struct lvfs_run_ctxt saved;
-        struct fsfilt_objinfo fso;
-        struct iattr iattr = { 0 };
-        struct inode *inode = NULL;
-        unsigned long now = jiffies;
-        int i, err, cleanup_phase = 0;
-        struct obd_device *obd = exp->exp_obd;
-        void *wait_handle;
-        int total_size = 0;
-        int rec_pending = 0;
-        unsigned int qcids[MAXQUOTAS] = {0, 0};
-        ENTRY;
-
-        LASSERT(oti != NULL);
-        LASSERT(objcount == 1);
-        LASSERT(current->journal_info == NULL);
-
-        if (rc != 0)
-                GOTO(cleanup, rc);
-
-        /* we try to get enough quota to write here, and let ldiskfs
-         * decide if it is out of quota or not b=14783 */
-        lquota_chkquota(filter_quota_interface_ref, obd, oa->o_uid,
-                        oa->o_gid, niocount, &rec_pending);
-
-        iobuf = filter_iobuf_get(&obd->u.filter, oti);
-        if (IS_ERR(iobuf))
-                GOTO(cleanup, rc = PTR_ERR(iobuf));
-        cleanup_phase = 1;
-
-        fso.fso_dentry = res->dentry;
-        fso.fso_bufcnt = obj->ioo_bufcnt;
-        inode = res->dentry->d_inode;
-
-        iobuf->dr_ignore_quota = 0;
-        for (i = 0, lnb = res; i < obj->ioo_bufcnt; i++, lnb++) {
-                loff_t this_size;
-
-                /* If overwriting an existing block, we don't need a grant */
-                if (!(lnb->flags & OBD_BRW_GRANTED) && lnb->rc == -ENOSPC &&
-                    filter_range_is_mapped(inode, lnb->offset, lnb->len))
-                        lnb->rc = 0;
-
-                if (lnb->rc) { /* ENOSPC, network RPC error, etc. */
-                        CDEBUG(D_INODE, "Skipping [%d] == %d\n", i, lnb->rc);
-                        continue;
-                }
-
-                err = filter_iobuf_add_page(obd, iobuf, inode, lnb->page);
-                LASSERT (err == 0);
-
-                total_size += lnb->len;
-
-                /* we expect these pages to be in offset order, but we'll
-                 * be forgiving */
-                this_size = lnb->offset + lnb->len;
-                if (this_size > iattr.ia_size)
-                        iattr.ia_size = this_size;
-
-                /* if one page is a write-back page from client cache, or it's
-                 * written by root, then mark the whole io request as ignore
-                 * quota request */
-                if (lnb->flags & (OBD_BRW_FROM_GRANT | OBD_BRW_NOQUOTA))
-                        iobuf->dr_ignore_quota = 1;
-        }
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        cleanup_phase = 2;
-
-        DQUOT_INIT(inode);
-
-        LOCK_INODE_MUTEX(inode);
-        fsfilt_check_slow(obd, now, "i_mutex");
-        oti->oti_handle = fsfilt_brw_start(obd, objcount, &fso, niocount, res,
-                                           oti);
-        if (IS_ERR(oti->oti_handle)) {
-                UNLOCK_INODE_MUTEX(inode);
-                rc = PTR_ERR(oti->oti_handle);
-                CDEBUG(rc == -ENOSPC ? D_INODE : D_ERROR,
-                       "error starting transaction: rc = %d\n", rc);
-                oti->oti_handle = NULL;
-                GOTO(cleanup, rc);
-        }
-        /* have to call fsfilt_commit() from this point on */
-
-        fsfilt_check_slow(obd, now, "brw_start");
-
-        i = OBD_MD_FLATIME | OBD_MD_FLMTIME | OBD_MD_FLCTIME;
-
-        /* If the inode still has SUID+SGID bits set (see filter_precreate())
-         * then we will accept the UID+GID if sent by the client for
-         * initializing the ownership of this inode.  We only allow this to
-         * happen once (so clear these bits) and later only allow setattr. */
-        if (inode->i_mode & S_ISUID)
-                i |= OBD_MD_FLUID;
-        if (inode->i_mode & S_ISGID)
-                i |= OBD_MD_FLGID;
-
-        iattr_from_obdo(&iattr, oa, i);
-        if (iattr.ia_valid & (ATTR_UID | ATTR_GID)) {
-                unsigned int save;
-
-                CDEBUG(D_INODE, "update UID/GID to %lu/%lu\n",
-                       (unsigned long)oa->o_uid, (unsigned long)oa->o_gid);
-
-                cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
-
-                iattr.ia_valid |= ATTR_MODE;
-                iattr.ia_mode = inode->i_mode;
-                if (iattr.ia_valid & ATTR_UID)
-                        iattr.ia_mode &= ~S_ISUID;
-                if (iattr.ia_valid & ATTR_GID)
-                        iattr.ia_mode &= ~S_ISGID;
-
-                rc = filter_update_fidea(exp, inode, oti->oti_handle, oa);
-
-                /* To avoid problems with quotas, UID and GID must be set
-                 * in the inode before filter_direct_io() - see bug 10357. */
-                save = iattr.ia_valid;
-                iattr.ia_valid &= (ATTR_UID | ATTR_GID);
-                rc = fsfilt_setattr(obd, res->dentry, oti->oti_handle, &iattr, 0);
-                CDEBUG(D_QUOTA, "set uid(%u)/gid(%u) to ino(%lu). rc(%d)\n", 
-                                iattr.ia_uid, iattr.ia_gid, inode->i_ino, rc);
-                iattr.ia_valid = save & ~(ATTR_UID | ATTR_GID);
-        }
-
-        /* filter_direct_io drops i_mutex */
-        rc = filter_direct_io(OBD_BRW_WRITE, res->dentry, iobuf, exp, &iattr,
-                              oti, &wait_handle);
-        if (rc == 0)
-                obdo_from_inode(oa, inode,
-                                FILTER_VALID_FLAGS |OBD_MD_FLUID |OBD_MD_FLGID);
-        else
-                obdo_from_inode(oa, inode, OBD_MD_FLUID | OBD_MD_FLGID);
-
-        lquota_getflag(filter_quota_interface_ref, obd, oa);
-
-        fsfilt_check_slow(obd, now, "direct_io");
-
-        err = fsfilt_commit_wait(obd, inode, wait_handle);
-        if (err) {
-                CERROR("Failure to commit OST transaction (%d)?\n", err);
-                rc = err;
-        }
-
-        if (obd->obd_replayable && !rc)
-                LASSERTF(oti->oti_transno <= obd->obd_last_committed,
-                         "oti_transno "LPU64" last_committed "LPU64"\n",
-                         oti->oti_transno, obd->obd_last_committed);
-
-        fsfilt_check_slow(obd, now, "commitrw commit");
-
-cleanup:
-        if (rec_pending)
-                lquota_pending_commit(filter_quota_interface_ref, obd, oa->o_uid,
-                                      oa->o_gid, niocount);
-
-        filter_grant_commit(exp, niocount, res);
-
-        switch (cleanup_phase) {
-        case 2:
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                LASSERT(current->journal_info == NULL);
-        case 1:
-                filter_iobuf_put(&obd->u.filter, iobuf, oti);
-        case 0:
-                /*
-                 * lnb->page automatically returns back into per-thread page
-                 * pool (bug 5137)
-                 */
-                f_dput(res->dentry);
-        }
-
-        /* trigger quota pre-acquire */
-        qcids[USRQUOTA] = oa->o_uid;
-        qcids[GRPQUOTA] = oa->o_gid;
-        err = lquota_adjust(filter_quota_interface_ref, obd, qcids, NULL, rc,
-                            FSFILT_OP_CREATE);
-        CDEBUG(err ? D_ERROR : D_QUOTA,
-               "filter adjust qunit! (rc:%d)\n", err);
-
-        RETURN(rc);
-}
diff --git a/lustre/obdfilter/filter_log.c b/lustre/obdfilter/filter_log.c
deleted file mode 100644
index 50a1acee9553dd7b64a27ad78dfe8423d1c437da..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter_log.c
+++ /dev/null
@@ -1,254 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/fs/obdfilter/filter_log.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/version.h>
-
-#include <libcfs/list.h>
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include <lustre_commit_confd.h>
-
-#include "filter_internal.h"
-
-int filter_log_sz_change(struct llog_handle *cathandle,
-                         struct ll_fid *mds_fid,
-                         __u32 io_epoch,
-                         struct llog_cookie *logcookie,
-                         struct inode *inode)
-{
-        struct llog_size_change_rec *lsc;
-        int rc;
-        struct ost_filterdata *ofd;
-        ENTRY;
-
-        LOCK_INODE_MUTEX(inode);
-        ofd = inode->i_filterdata;
-
-        if (ofd && ofd->ofd_epoch >= io_epoch) {
-                if (ofd->ofd_epoch > io_epoch)
-                        CERROR("client sent old epoch %d for obj ino %ld\n",
-                               io_epoch, inode->i_ino);
-                UNLOCK_INODE_MUTEX(inode);
-                RETURN(0);
-        }
-
-        if (ofd && ofd->ofd_epoch < io_epoch) {
-                ofd->ofd_epoch = io_epoch;
-        } else if (!ofd) {
-                OBD_ALLOC(ofd, sizeof(*ofd));
-                if (!ofd)
-                        GOTO(out, rc = -ENOMEM);
-                igrab(inode);
-                inode->i_filterdata = ofd;
-                ofd->ofd_epoch = io_epoch;
-        }
-        /* the decision to write a record is now made, unlock */
-        UNLOCK_INODE_MUTEX(inode);
-
-        OBD_ALLOC(lsc, sizeof(*lsc));
-        if (lsc == NULL)
-                RETURN(-ENOMEM);
-        lsc->lsc_hdr.lrh_len = lsc->lsc_tail.lrt_len = sizeof(*lsc);
-        lsc->lsc_hdr.lrh_type =  OST_SZ_REC;
-        lsc->lsc_fid = *mds_fid;
-        lsc->lsc_io_epoch = io_epoch;
-
-        rc = llog_cat_add_rec(cathandle, &lsc->lsc_hdr, logcookie, NULL);
-        OBD_FREE(lsc, sizeof(*lsc));
-
-        if (rc > 0) {
-                LASSERT(rc == sizeof(*logcookie));
-                rc = 0;
-        }
-
-        out:
-        RETURN(rc);
-}
-
-/* When this (destroy) operation is committed, return the cancel cookie */
-void filter_cancel_cookies_cb(struct obd_device *obd, __u64 transno,
-                              void *cb_data, int error)
-{
-        struct llog_cookie *cookie = cb_data;
-        struct llog_ctxt *ctxt;
-        int rc;
-
-        if (error != 0 || obd->obd_stopping) {
-                CDEBUG(D_INODE, "not cancel logcookie err %d stopping %d \n",
-                       error, obd->obd_stopping);
-                OBD_FREE(cookie, sizeof(*cookie));
-                return;
-        }
-
-        ctxt = llog_get_context(obd, cookie->lgc_subsys + 1);
-        if (!ctxt)
-                GOTO(out, rc = 0);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_OST_CANCEL_COOKIE_TIMEOUT, 30);
-
-        rc = llog_cancel(ctxt, NULL, 1, cookie, 0);
-        if (rc)
-                CERROR("error cancelling log cookies: rc = %d\n", rc);
-out:
-        llog_ctxt_put(ctxt);
-        OBD_FREE(cookie, sizeof(*cookie));
-}
-
-/* Callback for processing the unlink log record received from MDS by 
- * llog_client_api. */
-static int filter_recov_log_unlink_cb(struct llog_ctxt *ctxt,
-                                      struct llog_rec_hdr *rec,
-                                      struct llog_cookie *cookie)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct obd_export *exp = obd->obd_self_export;
-        struct llog_unlink_rec *lur;
-        struct obdo *oa;
-        obd_id oid;
-        int rc = 0;
-        ENTRY;
-
-        lur = (struct llog_unlink_rec *)rec;
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                RETURN(-ENOMEM);
-        oa->o_valid |= OBD_MD_FLCOOKIE;
-        oa->o_id = lur->lur_oid;
-        oa->o_gr = lur->lur_ogen;
-        memcpy(obdo_logcookie(oa), cookie, sizeof(*cookie));
-        oid = oa->o_id;
-
-        rc = filter_destroy(exp, oa, NULL, NULL, NULL);
-        OBDO_FREE(oa);
-        if (rc == -ENOENT) {
-                CDEBUG(D_RPCTRACE, "object already removed, send cookie\n");
-                llog_cancel(ctxt, NULL, 1, cookie, 0);
-                RETURN(0);
-        }
-
-        if (rc == 0)
-                CDEBUG(D_RPCTRACE, "object "LPU64" is destroyed\n", oid);
-
-        RETURN(rc);
-}
-
-/* Callback for processing the setattr log record received from MDS by
- * llog_client_api. */
-static int filter_recov_log_setattr_cb(struct llog_ctxt *ctxt,
-                                       struct llog_rec_hdr *rec,
-                                       struct llog_cookie *cookie)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        struct obd_export *exp = obd->obd_self_export;
-        struct llog_setattr_rec *lsr;
-        struct obd_info oinfo = { { { 0 } } };
-        obd_id oid;
-        int rc = 0;
-        ENTRY;
-
-        lsr = (struct llog_setattr_rec *)rec;
-        OBDO_ALLOC(oinfo.oi_oa);
-
-        oinfo.oi_oa->o_valid |= (OBD_MD_FLID | OBD_MD_FLUID | OBD_MD_FLGID |
-                                 OBD_MD_FLCOOKIE);
-        oinfo.oi_oa->o_id = lsr->lsr_oid;
-        oinfo.oi_oa->o_gr = lsr->lsr_ogen;
-        oinfo.oi_oa->o_uid = lsr->lsr_uid;
-        oinfo.oi_oa->o_gid = lsr->lsr_gid;
-        memcpy(obdo_logcookie(oinfo.oi_oa), cookie, sizeof(*cookie));
-        oid = oinfo.oi_oa->o_id;
-
-        rc = filter_setattr(exp, &oinfo, NULL);
-        OBDO_FREE(oinfo.oi_oa);
-
-        if (rc == -ENOENT) {
-                CDEBUG(D_RPCTRACE, "object already removed, send cookie\n");
-                llog_cancel(ctxt, NULL, 1, cookie, 0);
-                RETURN(0);
-        }
-
-        if (rc == 0)
-                CDEBUG(D_RPCTRACE, "object "LPU64" is chown/chgrp\n", oid);
-
-        RETURN(rc);
-}
-
-int filter_recov_log_mds_ost_cb(struct llog_handle *llh,
-                               struct llog_rec_hdr *rec, void *data)
-{
-        struct llog_ctxt *ctxt = llh->lgh_ctxt;
-        struct llog_cookie cookie;
-        int rc = 0;
-        ENTRY;
-
-        if (ctxt->loc_obd->obd_stopping)
-                RETURN(LLOG_PROC_BREAK);
-
-        if (!(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN)) {
-                CERROR("log is not plain\n");
-                RETURN(-EINVAL);
-        }
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_OST_LLOG_RECOVERY_TIMEOUT, 30);
-        cookie.lgc_lgl = llh->lgh_id;
-        cookie.lgc_subsys = LLOG_MDS_OST_ORIG_CTXT;
-        cookie.lgc_index = rec->lrh_index;
-
-        switch (rec->lrh_type) {
-        case MDS_UNLINK_REC:
-                rc = filter_recov_log_unlink_cb(ctxt, rec, &cookie);
-                break;
-        case MDS_SETATTR_REC:
-                rc = filter_recov_log_setattr_cb(ctxt, rec, &cookie);
-                break;
-        case LLOG_GEN_REC: {
-                struct llog_gen_rec *lgr = (struct llog_gen_rec *)rec;
-                if (llog_gen_lt(lgr->lgr_gen, ctxt->loc_gen))
-                        rc = 0;
-                else
-                        rc = LLOG_PROC_BREAK;
-                CDEBUG(D_HA, "fetch generation log, send cookie\n");
-                llog_cancel(ctxt, NULL, 1, &cookie, 0);
-                RETURN(rc);
-                }
-                break;
-        default:
-                CERROR("log record type %08x unknown\n", rec->lrh_type);
-                RETURN(-EINVAL);
-                break;
-        }
-
-        RETURN(rc);
-}
diff --git a/lustre/obdfilter/filter_lvb.c b/lustre/obdfilter/filter_lvb.c
deleted file mode 100644
index cb0eb9ce0da71c3749fcbf31b8d4cb534b8a2219..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/filter_lvb.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  linux/fs/obdfilter/filter_log.c
- *
- *  Copyright (c) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter Braam <braam@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_FILTER
-
-#ifndef AUTOCONF_INCLUDED
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/version.h>
-
-#include <libcfs/list.h>
-#include <obd_class.h>
-#include <lustre_dlm.h>
-
-#include "filter_internal.h"
-
-/* Called with res->lr_lvb_sem held */
-static int filter_lvbo_init(struct ldlm_resource *res)
-{
-        struct ost_lvb *lvb = NULL;
-        struct obd_device *obd;
-        struct dentry *dentry;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(res);
-        LASSERT_SEM_LOCKED(&res->lr_lvb_sem);
-
-        /* we only want lvb's for object resources */
-        /* check for internal locks: these have name[1] != 0 */
-        if (res->lr_name.name[1])
-                RETURN(0);
-
-        if (res->lr_lvb_data)
-                RETURN(0);
-
-        OBD_ALLOC(lvb, sizeof(*lvb));
-        if (lvb == NULL)
-                RETURN(-ENOMEM);
-
-        res->lr_lvb_data = lvb;
-        res->lr_lvb_len = sizeof(*lvb);
-
-        obd = res->lr_namespace->ns_lvbp;
-        LASSERT(obd != NULL);
-
-        dentry = filter_fid2dentry(obd, NULL, 0, res->lr_name.name[0]);
-        if (IS_ERR(dentry)) {
-                rc = PTR_ERR(dentry);
-                CERROR("%s: bad object "LPU64"/"LPU64": rc %d\n", obd->obd_name,
-                       res->lr_name.name[0], res->lr_name.name[1], rc);
-                RETURN(rc);
-        }
-
-        if (dentry->d_inode == NULL)
-                /* This is always true for test_brw */
-                GOTO(out_dentry, rc = -ENOENT);
-
-        inode_init_lvb(dentry->d_inode, lvb);
-
-        CDEBUG(D_DLMTRACE, "res: "LPU64" initial lvb size: "LPU64", "
-               "mtime: "LPU64", blocks: "LPU64"\n",
-               res->lr_name.name[0], lvb->lvb_size,
-               lvb->lvb_mtime, lvb->lvb_blocks);
-
-        EXIT;
-out_dentry:
-        f_dput(dentry);
-
-        if (rc)
-                OST_LVB_SET_ERR(lvb->lvb_blocks, rc);
-        /* Don't free lvb data on lookup error */
-        return rc;
-}
-
-/* This will be called in two ways:
- *
- *   m != NULL : called by the DLM itself after a glimpse callback
- *   m == NULL : called by the filter after a disk write
- *
- *   If 'increase_only' is true, don't allow values to move backwards.
- */
-static int filter_lvbo_update(struct ldlm_resource *res, struct lustre_msg *m,
-                              int buf_idx, int increase_only)
-{
-        int rc = 0;
-        struct ost_lvb *lvb;
-        struct obd_device *obd;
-        struct dentry *dentry;
-        ENTRY;
-
-        LASSERT(res);
-
-        /* we only want lvb's for object resources */
-        /* check for internal locks: these have name[1] != 0 */
-        if (res->lr_name.name[1])
-                RETURN(0);
-
-        down(&res->lr_lvb_sem);
-        lvb = res->lr_lvb_data;
-        if (lvb == NULL) {
-                CERROR("No lvb when running lvbo_update!\n");
-                GOTO(out, rc = 0);
-        }
-
-        /* Update the LVB from the network message */
-        if (m != NULL) {
-                struct ost_lvb *new;
-
-                new = lustre_swab_buf(m, buf_idx, sizeof(*new),
-                                      lustre_swab_ost_lvb);
-                if (new == NULL) {
-                        CERROR("lustre_swab_buf failed\n");
-                        goto disk_update;
-                }
-                if (new->lvb_size > lvb->lvb_size || !increase_only) {
-                        CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb size: "
-                               LPU64" -> "LPU64"\n", res->lr_name.name[0],
-                               lvb->lvb_size, new->lvb_size);
-                        lvb->lvb_size = new->lvb_size;
-                }
-                if (new->lvb_mtime > lvb->lvb_mtime || !increase_only) {
-                        CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb mtime: "
-                               LPU64" -> "LPU64"\n", res->lr_name.name[0],
-                               lvb->lvb_mtime, new->lvb_mtime);
-                        lvb->lvb_mtime = new->lvb_mtime;
-                }
-                if (new->lvb_atime > lvb->lvb_atime || !increase_only) {
-                        CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb atime: "
-                               LPU64" -> "LPU64"\n", res->lr_name.name[0],
-                               lvb->lvb_atime, new->lvb_atime);
-                        lvb->lvb_atime = new->lvb_atime;
-                }
-                if (new->lvb_ctime > lvb->lvb_ctime || !increase_only) {
-                        CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb ctime: "
-                               LPU64" -> "LPU64"\n", res->lr_name.name[0],
-                               lvb->lvb_ctime, new->lvb_ctime);
-                        lvb->lvb_ctime = new->lvb_ctime;
-                }
-        }
-
- disk_update:
-        /* Update the LVB from the disk inode */
-        obd = res->lr_namespace->ns_lvbp;
-        LASSERT(obd);
-
-        dentry = filter_fid2dentry(obd, NULL, 0, res->lr_name.name[0]);
-        if (IS_ERR(dentry))
-                GOTO(out, rc = PTR_ERR(dentry));
-
-        if (dentry->d_inode == NULL)
-                GOTO(out_dentry, rc = -ENOENT);
-
-        if (i_size_read(dentry->d_inode) > lvb->lvb_size || !increase_only) {
-                CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb size from disk: "
-                       LPU64" -> %llu\n", res->lr_name.name[0],
-                       lvb->lvb_size, i_size_read(dentry->d_inode));
-                lvb->lvb_size = i_size_read(dentry->d_inode);
-        }
-
-        if (LTIME_S(dentry->d_inode->i_mtime) >lvb->lvb_mtime|| !increase_only){
-                CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb mtime from disk: "
-                       LPU64" -> %lu\n", res->lr_name.name[0],
-                       lvb->lvb_mtime, LTIME_S(dentry->d_inode->i_mtime));
-                lvb->lvb_mtime = LTIME_S(dentry->d_inode->i_mtime);
-        }
-        if (LTIME_S(dentry->d_inode->i_atime) >lvb->lvb_atime|| !increase_only){
-                CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb atime from disk: "
-                       LPU64" -> %lu\n", res->lr_name.name[0],
-                       lvb->lvb_atime, LTIME_S(dentry->d_inode->i_atime));
-                lvb->lvb_atime = LTIME_S(dentry->d_inode->i_atime);
-        }
-        if (LTIME_S(dentry->d_inode->i_ctime) >lvb->lvb_ctime|| !increase_only){
-                CDEBUG(D_DLMTRACE, "res: "LPU64" updating lvb ctime from disk: "
-                       LPU64" -> %lu\n", res->lr_name.name[0],
-                       lvb->lvb_ctime, LTIME_S(dentry->d_inode->i_ctime));
-                lvb->lvb_ctime = LTIME_S(dentry->d_inode->i_ctime);
-        }
-        if (lvb->lvb_blocks != dentry->d_inode->i_blocks) {
-                CDEBUG(D_DLMTRACE,"res: "LPU64" updating lvb blocks from disk: "
-                       LPU64" -> %lu\n", res->lr_name.name[0],
-                       lvb->lvb_blocks, dentry->d_inode->i_blocks);
-                lvb->lvb_blocks = dentry->d_inode->i_blocks;
-        }
-
-out_dentry:
-        f_dput(dentry);
-
-out:
-        up(&res->lr_lvb_sem);
-        return rc;
-}
-
-struct ldlm_valblock_ops filter_lvbo = {
-        lvbo_init: filter_lvbo_init,
-        lvbo_update: filter_lvbo_update
-};
diff --git a/lustre/obdfilter/lproc_obdfilter.c b/lustre/obdfilter/lproc_obdfilter.c
deleted file mode 100644
index 7b6aafaa06ad21283fab4ac862274759cc8fa211..0000000000000000000000000000000000000000
--- a/lustre/obdfilter/lproc_obdfilter.c
+++ /dev/null
@@ -1,458 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#include <lprocfs_status.h>
-#include <obd.h>
-#include <linux/seq_file.h>
-#include <linux/version.h>
-
-#include "filter_internal.h"
-
-#ifdef LPROCFS
-static int lprocfs_filter_rd_groups(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        *eof = 1;
-        return snprintf(page, count, "%u\n", FILTER_GROUPS);
-}
-
-static int lprocfs_filter_rd_tot_dirty(char *page, char **start, off_t off,
-                                       int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        *eof = 1;
-        return snprintf(page, count, LPU64"\n", obd->u.filter.fo_tot_dirty);
-}
-
-static int lprocfs_filter_rd_tot_granted(char *page, char **start, off_t off,
-                                         int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        *eof = 1;
-        return snprintf(page, count, LPU64"\n", obd->u.filter.fo_tot_granted);
-}
-
-static int lprocfs_filter_rd_tot_pending(char *page, char **start, off_t off,
-                                         int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        *eof = 1;
-        return snprintf(page, count, LPU64"\n", obd->u.filter.fo_tot_pending);
-}
-
-static int lprocfs_filter_rd_mntdev(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-
-        LASSERT(obd != NULL);
-        LASSERT(obd->u.filter.fo_vfsmnt->mnt_devname);
-        *eof = 1;
-        return snprintf(page, count, "%s\n",
-                        obd->u.filter.fo_vfsmnt->mnt_devname);
-}
-
-static int lprocfs_filter_rd_last_id(char *page, char **start, off_t off,
-                                     int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        if (obd == NULL)
-                return 0;
-
-        return snprintf(page, count, LPU64"\n",
-                        filter_last_id(&obd->u.filter, 0));
-}
-
-int lprocfs_filter_rd_readcache(char *page, char **start, off_t off, int count,
-                                int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        int rc;
-
-        rc = snprintf(page, count, LPU64"\n",
-                      obd->u.filter.fo_readcache_max_filesize);
-        return rc;
-}
-
-int lprocfs_filter_wr_readcache(struct file *file, const char *buffer,
-                                unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        __u64 val;
-        int rc;
-
-        rc = lprocfs_write_u64_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        obd->u.filter.fo_readcache_max_filesize = val;
-        return count;
-}
-
-int lprocfs_filter_rd_fmd_max_num(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        int rc;
-
-        rc = snprintf(page, count, "%u\n", obd->u.filter.fo_fmd_max_num);
-        return rc;
-}
-
-int lprocfs_filter_wr_fmd_max_num(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val;
-        int rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val > 65536 || val < 1)
-                return -EINVAL;
-
-        obd->u.filter.fo_fmd_max_num = val;
-        return count;
-}
-
-int lprocfs_filter_rd_fmd_max_age(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        int rc;
-
-        rc = snprintf(page, count, "%u\n", obd->u.filter.fo_fmd_max_age / HZ);
-        return rc;
-}
-
-int lprocfs_filter_wr_fmd_max_age(struct file *file, const char *buffer,
-                                  unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val;
-        int rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val > 65536 || val < 1)
-                return -EINVAL;
-
-        obd->u.filter.fo_fmd_max_age = val * HZ;
-        return count;
-}
-
-static struct lprocfs_vars lprocfs_filter_obd_vars[] = {
-        { "uuid",         lprocfs_rd_uuid,          0, 0 },
-        { "blocksize",    lprocfs_rd_blksize,       0, 0 },
-        { "kbytestotal",  lprocfs_rd_kbytestotal,   0, 0 },
-        { "kbytesfree",   lprocfs_rd_kbytesfree,    0, 0 },
-        { "kbytesavail",  lprocfs_rd_kbytesavail,   0, 0 },
-        { "filestotal",   lprocfs_rd_filestotal,    0, 0 },
-        { "filesfree",    lprocfs_rd_filesfree,     0, 0 },
-        { "filegroups",   lprocfs_filter_rd_groups, 0, 0 },
-        { "fstype",       lprocfs_rd_fstype,        0, 0 },
-        { "mntdev",       lprocfs_filter_rd_mntdev, 0, 0 },
-        { "last_id",      lprocfs_filter_rd_last_id,0, 0 },
-        { "tot_dirty",    lprocfs_filter_rd_tot_dirty,   0, 0 },
-        { "tot_pending",  lprocfs_filter_rd_tot_pending, 0, 0 },
-        { "tot_granted",  lprocfs_filter_rd_tot_granted, 0, 0 },
-        { "recovery_status", lprocfs_obd_rd_recovery_status, 0, 0 },
-#ifdef CRAY_XT3
-        { "recovery_maxtime", lprocfs_obd_rd_recovery_maxtime,
-                              lprocfs_obd_wr_recovery_maxtime, 0},
-#endif
-        { "evict_client", 0, lprocfs_wr_evict_client, 0,
-                                &lprocfs_evict_client_fops},
-        { "num_exports",  lprocfs_rd_num_exports,   0, 0 },
-        { "readcache_max_filesize",
-                          lprocfs_filter_rd_readcache,
-                          lprocfs_filter_wr_readcache, 0 },
-#ifdef HAVE_QUOTA_SUPPORT
-        { "quota_bunit_sz", lprocfs_quota_rd_bunit,
-                            lprocfs_quota_wr_bunit, 0},
-        { "quota_btune_sz", lprocfs_quota_rd_btune,
-                            lprocfs_quota_wr_btune, 0},
-        { "quota_iunit_sz", lprocfs_quota_rd_iunit,
-                            lprocfs_quota_wr_iunit, 0},
-        { "quota_itune_sz", lprocfs_quota_rd_itune,
-                            lprocfs_quota_wr_itune, 0},
-        { "quota_type",     lprocfs_quota_rd_type,
-                            lprocfs_quota_wr_type, 0},
-        { "quota_switch_seconds",  lprocfs_quota_rd_switch_seconds,
-                            lprocfs_quota_wr_switch_seconds, 0 },
-
-#endif
-        { "client_cache_count", lprocfs_filter_rd_fmd_max_num,
-                          lprocfs_filter_wr_fmd_max_num, 0 },
-        { "client_cache_seconds", lprocfs_filter_rd_fmd_max_age,
-                          lprocfs_filter_wr_fmd_max_age, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_filter_module_vars[] = {
-        { "num_refs",     lprocfs_rd_numrefs,       0, 0 },
-        { 0 }
-};
-
-void filter_tally(struct obd_export *exp, struct page **pages, int nr_pages,
-                  unsigned long *blocks, int blocks_per_page, int wr)
-{
-        struct filter_obd *filter = &exp->exp_obd->u.filter;
-        struct filter_export_data *fed = &exp->exp_filter_data;
-        struct page *last_page = NULL;
-        unsigned long *last_block = NULL;
-        unsigned long discont_pages = 0;
-        unsigned long discont_blocks = 0;
-        int i;
-
-        if (nr_pages == 0)
-                return;
-
-        lprocfs_oh_tally_log2(&filter->fo_filter_stats.hist[BRW_R_PAGES + wr],
-                              nr_pages);
-        lprocfs_oh_tally_log2(&fed->fed_brw_stats.hist[BRW_R_PAGES + wr],
-                              nr_pages);
-        if (exp->exp_nid_stats && exp->exp_nid_stats->nid_brw_stats)
-                lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_PAGES + wr],
-                                      nr_pages);
-
-        while (nr_pages-- > 0) {
-                if (last_page && (*pages)->index != (last_page->index + 1))
-                        discont_pages++;
-                last_page = *pages;
-                pages++;
-                for (i = 0; i < blocks_per_page; i++) {
-                        if (last_block && *blocks != (*last_block + 1))
-                                discont_blocks++;
-                        last_block = blocks++;
-                }
-        }
-
-        lprocfs_oh_tally(&filter->fo_filter_stats.hist[BRW_R_DISCONT_PAGES +wr],
-                         discont_pages);
-        lprocfs_oh_tally(&fed->fed_brw_stats.hist[BRW_R_DISCONT_PAGES + wr],
-                         discont_pages);
-        lprocfs_oh_tally(&filter->fo_filter_stats.hist[BRW_R_DISCONT_BLOCKS+wr],
-                         discont_blocks);
-        lprocfs_oh_tally(&fed->fed_brw_stats.hist[BRW_R_DISCONT_BLOCKS + wr],
-                         discont_blocks);
-
-        if (exp->exp_nid_stats && exp->exp_nid_stats->nid_brw_stats) {
-                lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_DISCONT_PAGES + wr],
-                                      discont_pages);
-                lprocfs_oh_tally_log2(&exp->exp_nid_stats->nid_brw_stats->hist[BRW_W_DISCONT_BLOCKS + wr],
-                                      discont_blocks);
-        }
-}
-
-#define pct(a,b) (b ? a * 100 / b : 0)
-
-static void display_brw_stats(struct seq_file *seq, char *name, char *units,
-        struct obd_histogram *read, struct obd_histogram *write, int log2)
-{
-        unsigned long read_tot, write_tot, r, w, read_cum = 0, write_cum = 0;
-        int i;
-
-        seq_printf(seq, "\n%26s read      |     write\n", " ");
-        seq_printf(seq, "%-22s %-5s %% cum %% |  %-5s %% cum %%\n", 
-                   name, units, units);
-
-        read_tot = lprocfs_oh_sum(read);
-        write_tot = lprocfs_oh_sum(write);
-        for (i = 0; i < OBD_HIST_MAX; i++) {
-                r = read->oh_buckets[i];
-                w = write->oh_buckets[i];
-                read_cum += r;
-                write_cum += w;
-                if (read_cum == 0 && write_cum == 0)
-                        continue;
-
-                if (!log2) 
-                        seq_printf(seq, "%u", i);
-                else if (i < 10)
-                        seq_printf(seq, "%u", 1<<i);
-                else if (i < 20)
-                        seq_printf(seq, "%uK", 1<<(i-10));
-                else
-                        seq_printf(seq, "%uM", 1<<(i-20));
-
-                seq_printf(seq, ":\t\t%10lu %3lu %3lu   | %4lu %3lu %3lu\n",
-                           r, pct(r, read_tot), pct(read_cum, read_tot), 
-                           w, pct(w, write_tot), pct(write_cum, write_tot));
-
-                if (read_cum == read_tot && write_cum == write_tot)
-                        break;
-        }
-}
-
-static void brw_stats_show(struct seq_file *seq, struct brw_stats *brw_stats)
-{
-        struct timeval now;
-
-        /* this sampling races with updates */
-        do_gettimeofday(&now);
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
-
-        display_brw_stats(seq, "pages per bulk r/w", "rpcs",
-                          &brw_stats->hist[BRW_R_PAGES],
-                          &brw_stats->hist[BRW_W_PAGES], 1);
-
-        display_brw_stats(seq, "discontiguous pages", "rpcs",
-                          &brw_stats->hist[BRW_R_DISCONT_PAGES],
-                          &brw_stats->hist[BRW_W_DISCONT_PAGES], 0);
-
-        display_brw_stats(seq, "discontiguous blocks", "rpcs",
-                          &brw_stats->hist[BRW_R_DISCONT_BLOCKS],
-                          &brw_stats->hist[BRW_W_DISCONT_BLOCKS], 0);
-
-        display_brw_stats(seq, "disk fragmented I/Os", "ios",
-                          &brw_stats->hist[BRW_R_DIO_FRAGS],
-                          &brw_stats->hist[BRW_W_DIO_FRAGS], 0);
-
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0))
-        display_brw_stats(seq, "disk I/Os in flight", "ios",
-                          &brw_stats->hist[BRW_R_RPC_HIST],
-                          &brw_stats->hist[BRW_W_RPC_HIST], 0);
-
-        {
-                char title[24];
-                sprintf(title, "I/O time (1/%ds)", HZ);
-                display_brw_stats(seq, title, "ios",
-                                  &brw_stats->hist[BRW_R_IO_TIME],
-                                  &brw_stats->hist[BRW_W_IO_TIME], 1);
-        }
-
-        display_brw_stats(seq, "disk I/O size", "ios",
-                          &brw_stats->hist[BRW_R_DISK_IOSIZE],
-                          &brw_stats->hist[BRW_W_DISK_IOSIZE], 1);
-#endif
-}
-
-#undef pct
-
-static int filter_brw_stats_seq_show(struct seq_file *seq, void *v)
-{
-        struct obd_device *dev = seq->private;
-        struct filter_obd *filter = &dev->u.filter;
-
-        brw_stats_show(seq, &filter->fo_filter_stats);
-
-        return 0;
-}
-
-static ssize_t filter_brw_stats_seq_write(struct file *file, const char *buf,
-                                       size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct obd_device *dev = seq->private;
-        struct filter_obd *filter = &dev->u.filter;
-        int i;
-
-        for (i = 0; i < BRW_LAST; i++)
-                lprocfs_oh_clear(&filter->fo_filter_stats.hist[i]);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(filter_brw_stats);
-
-int lproc_filter_attach_seqstat(struct obd_device *dev)
-{
-        return lprocfs_obd_seq_create(dev, "brw_stats", 0444,
-                                      &filter_brw_stats_fops, dev);
-}
-
-static int filter_per_export_stats_seq_show(struct seq_file *seq, void *v)
-{
-        struct filter_export_data *fed = seq->private;
-
-        brw_stats_show(seq, &fed->fed_brw_stats);
-
-        return 0;
-}
-
-static ssize_t filter_per_export_stats_seq_write(struct file *file,
-                                       const char *buf, size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct filter_export_data *fed = seq->private;
-        int i;
-
-        for (i = 0; i < BRW_LAST; i++)
-                lprocfs_oh_clear(&fed->fed_brw_stats.hist[i]);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(filter_per_export_stats);
-
-void lprocfs_filter_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_filter_module_vars;
-    lvars->obd_vars     = lprocfs_filter_obd_vars;
-}
-
-static int filter_per_nid_stats_seq_show(struct seq_file *seq, void *v)
-{
-        nid_stat_t *tmp = seq->private;
-
-        if (tmp->nid_brw_stats)
-                brw_stats_show(seq, tmp->nid_brw_stats);
-
-        return 0;
-}
-
-static ssize_t filter_per_nid_stats_seq_write(struct file *file,
-                                              const char *buf, size_t len,
-                                              loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        nid_stat_t *tmp = seq->private;
-        int i;
-
-        if (tmp->nid_brw_stats)
-                for (i = 0; i < BRW_LAST; i++)
-                        lprocfs_oh_clear(&tmp->nid_brw_stats->hist[i]);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(filter_per_nid_stats);
-
-#endif /* LPROCFS */
diff --git a/lustre/osc/.cvsignore b/lustre/osc/.cvsignore
deleted file mode 100644
index 5d26f004c3ff3840392e34cb4aaed5287963f9a1..0000000000000000000000000000000000000000
--- a/lustre/osc/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
diff --git a/lustre/osc/Info.plist b/lustre/osc/Info.plist
deleted file mode 100644
index 727980da515a282f6c970ea2e0f0ff9629eb0e26..0000000000000000000000000000000000000000
--- a/lustre/osc/Info.plist
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>osc</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.clusterfs.lustre.osc</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>KEXT</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.1</string> 
-	<key>OSBundleCompatibleVersion</key> 
-	<string>1.0.0</string>
-	<key>OSBundleLibraries</key>
-	<dict> 
-                <key>com.apple.kpi.bsd</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.libkern</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.mach</key>
-		<string>8.0.0b1</string>
-		<key>com.apple.kpi.unsupported</key>
-		<string>8.0.0b1</string>
-		<key>com.clusterfs.lustre.libcfs</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.lvfs</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.obdclass</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.ptlrpc</key> 
-		<string>1.0.0</string>
-	</dict>
-</dict>
-</plist>
diff --git a/lustre/osc/Makefile.in b/lustre/osc/Makefile.in
deleted file mode 100644
index 2eb2eea34dac9a74e521c1d3903e3c67662d4763..0000000000000000000000000000000000000000
--- a/lustre/osc/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := osc
-osc-objs := osc_request.o lproc_osc.o osc_create.o cache.o
-
-@INCLUDE_RULES@
diff --git a/lustre/osc/autoMakefile.am b/lustre/osc/autoMakefile.am
deleted file mode 100644
index 985e4739d1e302c383731c3a751353492f1c3ddd..0000000000000000000000000000000000000000
--- a/lustre/osc/autoMakefile.am
+++ /dev/null
@@ -1,41 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if LIBLUSTRE
-noinst_LIBRARIES = libosc.a
-libosc_a_SOURCES = osc_request.c osc_create.c osc_internal.h cache.c
-libosc_a_CPPFLAGS = $(LLCPPFLAGS)
-libosc_a_CFLAGS = $(LLCFLAGS)
-endif
-
-if MODULES
-
-if LINUX
-modulefs_DATA = osc$(KMODEXT)
-endif
-
-if DARWIN
-macos_PROGRAMS := osc
-
-osc_SOURCES := \
-        osc_create.c \
-        osc_request.c
-
-osc_CFLAGS := $(EXTRA_KCFLAGS)
-osc_LDFLAGS := $(EXTRA_KLDFLAGS)
-osc_LDADD := $(EXTRA_KLIBS)
-
-plist_DATA := Info.plist
-
-install_data_hook := fix-kext-ownership
-
-endif # Darwin
-
-endif
-
-install-data-hook: $(install_data_hook)
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES = $(osc-objs:%.o=%.c) osc_internal.h
diff --git a/lustre/osc/cache.c b/lustre/osc/cache.c
deleted file mode 100644
index c144d96e887125f896c48e81e4a7d39ce3b5877a..0000000000000000000000000000000000000000
--- a/lustre/osc/cache.c
+++ /dev/null
@@ -1,398 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author Oleg Drokin <green@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * Cache of triples - object, lock, extent
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_OSC
-
-#ifdef __KERNEL__
-# include <linux/version.h>
-# include <linux/module.h>
-# include <linux/list.h>
-#else                           /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <lustre_dlm.h>
-#include <lustre_cache.h>
-#include <obd.h>
-#include <lustre_debug.h>
-
-#include "osc_internal.h"
-
-/* Adding @lock to the @cache */
-int cache_add_lock(struct lustre_cache *cache, struct lustre_handle *lockh)
-{
-        struct ldlm_lock *lock = ldlm_handle2lock(lockh);
-
-        if (!lock)      // Lock disappeared under us.
-                return 0;
-
-        spin_lock(&cache->lc_locks_list_lock);
-        list_add_tail(&lock->l_cache_locks_list, &cache->lc_locks_list);
-        spin_unlock(&cache->lc_locks_list_lock);
-
-        LDLM_LOCK_PUT(lock);
-
-        return 0;
-}
-
-/* Tries to add @extent to lock represented by @lockh if non-NULL, otherwise
-   just tries to match some suitable lock by resource and data contained in
-   @extent */
-/* Should be called with oap->lock held (except on initial addition, see
-   comment in osc_request.c*/
-int cache_add_extent(struct lustre_cache *cache, struct ldlm_res_id *res,
-                     struct osc_async_page *extent, struct lustre_handle *lockh)
-{
-        struct lustre_handle tmplockh;
-        ldlm_policy_data_t tmpex;
-        struct ldlm_lock *lock = NULL;
-        ENTRY;
-
-        /* Don't add anything second time */
-        if (!list_empty(&extent->oap_page_list)) {
-                LBUG();
-                RETURN(0);
-        }
-
-        if (lockh && lustre_handle_is_used(lockh)) {
-                lock = ldlm_handle2lock(lockh);
-                if (!lock)
-                        RETURN(-ENOLCK);
-
-                LASSERTF(lock->l_policy_data.l_extent.start <=
-                         extent->oap_obj_off &&
-                         extent->oap_obj_off + CFS_PAGE_SIZE - 1 <=
-                         lock->l_policy_data.l_extent.end,
-                         "Got wrong lock [" LPU64 "," LPU64 "] for page with "
-                         "offset " LPU64 "\n",
-                         lock->l_policy_data.l_extent.start,
-                         lock->l_policy_data.l_extent.end, extent->oap_obj_off);
-        } else {
-                int mode;
-                /* Real extent width calculation here once we have real
-                 * extents
-                 */
-                tmpex.l_extent.start = extent->oap_obj_off;
-                tmpex.l_extent.end = tmpex.l_extent.start + CFS_PAGE_SIZE - 1;
-
-                /* XXX find lock from extent or something like that */
-                /* The lock mode does not matter. If this is dirty page - then
-                 * there could be only one PW lock. If the page is clean,
-                 * any PR lock is good
-                 */
-                mode = ldlm_lock_match(cache->lc_obd->obd_namespace,
-                                       LDLM_FL_BLOCK_GRANTED |
-                                       LDLM_FL_CBPENDING, res, LDLM_EXTENT,
-                                       &tmpex, LCK_PW | LCK_PR, &tmplockh);
-
-                if (mode <= 0) {
-                        CDEBUG(D_CACHE, "No lock to attach " LPU64 "->" LPU64
-                               " extent to!\n", tmpex.l_extent.start,
-                               tmpex.l_extent.end);
-                        RETURN((mode < 0) ? mode : -ENOLCK);
-                }
-
-                lock = ldlm_handle2lock(&tmplockh);
-                if (!lock) {    // Race - lock disappeared under us (eviction?)
-                        CDEBUG(D_CACHE, "Newly matched lock just disappeared "
-                               "under us\n");
-                        RETURN(-ENOLCK);
-                }
-                ldlm_lock_decref(&tmplockh, mode);
-        }
-
-        spin_lock(&lock->l_extents_list_lock);
-        list_add_tail(&extent->oap_page_list, &lock->l_extents_list);
-        spin_unlock(&lock->l_extents_list_lock);
-        extent->oap_ldlm_lock = lock;
-        LDLM_LOCK_PUT(lock);
-
-        RETURN(0);
-}
-
-static int cache_extent_removal_event(struct lustre_cache *cache,
-                                      void *data, int discard)
-{
-        struct page *page = data;
-        struct page_removal_cb_element *element;
-
-        list_for_each_entry(element, &cache->lc_page_removal_callback_list,
-                            prce_list) {
-                element->prce_callback(page, discard);
-        }
-        return 0;
-}
-
-/* Registers set of pin/remove callbacks for extents. Current limitation is
-   there could be only one pin_cb per cache.
-   @pin_cb is called when we have the page locked to pin it in memory so that
-   it does not disappear after we release page lock (which we need to do
-   to avoid deadlocks).
-   @func_cb is removal callback that is called after page and all spinlocks are
-   released, and is supposed to clean the page and remove it from all
-   (vfs) caches it might be in */
-int cache_add_extent_removal_cb(struct lustre_cache *cache,
-                                obd_page_removal_cb_t func_cb,
-                                obd_pin_extent_cb pin_cb)
-{
-        struct page_removal_cb_element *element;
-
-        if (!func_cb)
-                return 0;
-        OBD_ALLOC(element, sizeof(*element));
-        if (!element)
-                return -ENOMEM;
-        element->prce_callback = func_cb;
-        list_add_tail(&element->prce_list,
-                      &cache->lc_page_removal_callback_list);
-
-        cache->lc_pin_extent_cb = pin_cb;
-        return 0;
-}
-EXPORT_SYMBOL(cache_add_extent_removal_cb);
-
-/* Unregister exntent removal callback registered earlier. If the list of
-   registered removal callbacks becomes empty, we also clear pin callback
-   since it could only be one */
-int cache_del_extent_removal_cb(struct lustre_cache *cache,
-                                obd_page_removal_cb_t func_cb)
-{
-        int found = 0;
-        struct page_removal_cb_element *element, *t;
-
-        list_for_each_entry_safe(element, t,
-                                 &cache->lc_page_removal_callback_list,
-                                 prce_list) {
-                if (element->prce_callback == func_cb) {
-                        list_del(&element->prce_list);
-                        OBD_FREE(element, sizeof(*element));
-                        found = 1;
-                        /* We continue iterating the list in case this function
-                           was registered more than once */
-                }
-        }
-
-        if (list_empty(&cache->lc_page_removal_callback_list))
-                cache->lc_pin_extent_cb = NULL;
-
-        return !found;
-}
-EXPORT_SYMBOL(cache_del_extent_removal_cb);
-
-static int cache_remove_extent_nolock(struct lustre_cache *cache,
-                                      struct osc_async_page *extent)
-{
-        int have_lock = !!extent->oap_ldlm_lock;
-        /* We used to check oap_ldlm_lock for non NULL here, but it might be
-           NULL, in fact, due to parallel page eviction clearing it and waiting
-           on a lock's page list lock */
-        extent->oap_ldlm_lock = NULL;
-
-        if (!list_empty(&extent->oap_page_list))
-                list_del_init(&extent->oap_page_list);
-
-        return have_lock;
-}
-
-/* Request the @extent to be removed from cache and locks it belongs to. */
-void cache_remove_extent(struct lustre_cache *cache,
-                         struct osc_async_page *extent)
-{
-        struct ldlm_lock *lock;
-
-        spin_lock(&extent->oap_lock);
-        lock = extent->oap_ldlm_lock;
-
-        extent->oap_ldlm_lock = NULL;
-        spin_unlock(&extent->oap_lock);
-
-        /* No lock - means this extent is not in any list */
-        if (!lock)
-                return;
-
-        spin_lock(&lock->l_extents_list_lock);
-        if (!list_empty(&extent->oap_page_list))
-                list_del_init(&extent->oap_page_list);
-        spin_unlock(&lock->l_extents_list_lock);
-}
-
-/* Iterate through list of extents in given lock identified by @lockh,
-   calling @cb_func for every such extent. Also passed @data to every call.
-   Stops iterating prematurely if @cb_func returns nonzero. */
-int cache_iterate_extents(struct lustre_cache *cache,
-                          struct lustre_handle *lockh,
-                          cache_iterate_extents_cb_t cb_func, void *data)
-{
-        struct ldlm_lock *lock = ldlm_handle2lock(lockh);
-        struct osc_async_page *extent, *t;
-
-        if (!lock)      // Lock disappeared
-                return 0;
-        /* Parallel page removal from mem pressure can race with us */
-        spin_lock(&lock->l_extents_list_lock);
-        list_for_each_entry_safe(extent, t, &lock->l_extents_list,
-                                 oap_page_list) {
-                if (cb_func(cache, lockh, extent, data))
-                        break;
-        }
-        spin_unlock(&lock->l_extents_list_lock);
-        LDLM_LOCK_PUT(lock);
-
-        return 0;
-}
-
-static int cache_remove_extents_from_lock(struct lustre_cache *cache,
-                                          struct ldlm_lock *lock, void *data)
-{
-        struct osc_async_page *extent;
-        void *ext_data;
-
-        LASSERT(lock);
-
-        spin_lock(&lock->l_extents_list_lock);
-        while (!list_empty(&lock->l_extents_list)) {
-                extent = list_entry(lock->l_extents_list.next,
-                                    struct osc_async_page, oap_page_list);
-
-                spin_lock(&extent->oap_lock);
-                /* If there is no lock referenced from this oap, it means
-                   there is parallel page-removal process waiting to free that
-                   page on l_extents_list_lock and it holds page lock.
-                   We need this page to completely go away and for that to
-                   happen we will just try to truncate it here too.
-                   Serialisation on page lock will achieve that goal for us. */
-                /* Try to add extent back to the cache first, but only if we
-                 * cancel read lock, write locks cannot have other overlapping
-                 * locks. If adding is not possible (or canceling pw lock),
-                 * then remove extent from cache */
-                if (!cache_remove_extent_nolock(cache, extent) ||
-                    (lock->l_granted_mode == LCK_PW) ||
-                    cache_add_extent(cache, &lock->l_resource->lr_name, extent,
-                                     NULL)) {
-                        /* We need to remember this oap_page value now,
-                           once we release spinlocks, extent struct
-                           might be freed and we endup requesting
-                           page with address 0x5a5a5a5a in
-                           cache_extent_removal_event */
-                        ext_data = extent->oap_page;
-                        cache->lc_pin_extent_cb(extent->oap_page);
-                        spin_unlock(&extent->oap_lock);
-                        spin_unlock(&lock->l_extents_list_lock);
-                        cache_extent_removal_event(cache, ext_data,
-                                                   lock->
-                                                   l_flags &
-                                                   LDLM_FL_DISCARD_DATA);
-                        spin_lock(&lock->l_extents_list_lock);
-                } else {
-                        spin_unlock(&extent->oap_lock);
-                }
-        }
-        spin_unlock(&lock->l_extents_list_lock);
-
-        return 0;
-}
-
-/* Remoes @lock from cache after necessary checks. */
-int cache_remove_lock(struct lustre_cache *cache, struct lustre_handle *lockh)
-{
-        struct ldlm_lock *lock = ldlm_handle2lock(lockh);
-
-        if (!lock)  // The lock was removed by somebody just now, nothing to do
-                return 0;
-
-        cache_remove_extents_from_lock(cache, lock, NULL /*data */ );
-
-        spin_lock(&cache->lc_locks_list_lock);
-        list_del_init(&lock->l_cache_locks_list);
-        spin_unlock(&cache->lc_locks_list_lock);
-
-        LDLM_LOCK_PUT(lock);
-
-        return 0;
-}
-
-/* Supposed to iterate through all locks in the cache for given resource.
-   Not implemented atthe moment. */
-int cache_iterate_locks(struct lustre_cache *cache, struct ldlm_res_id *res,
-                        cache_iterate_locks_cb_t cb_fun, void *data)
-{
-        return -ENOTSUPP;
-}
-
-/* Create lustre cache and attach it to @obd */
-struct lustre_cache *cache_create(struct obd_device *obd)
-{
-        struct lustre_cache *cache;
-
-        OBD_ALLOC(cache, sizeof(*cache));
-        if (!cache)
-                GOTO(out, NULL);
-        spin_lock_init(&cache->lc_locks_list_lock);
-        CFS_INIT_LIST_HEAD(&cache->lc_locks_list);
-        CFS_INIT_LIST_HEAD(&cache->lc_page_removal_callback_list);
-        cache->lc_obd = obd;
-
-      out:
-        return cache;
-}
-
-/* Destroy @cache and free its memory */
-int cache_destroy(struct lustre_cache *cache)
-{
-        if (cache) {
-                spin_lock(&cache->lc_locks_list_lock);
-                if (!list_empty(&cache->lc_locks_list)) {
-                        struct ldlm_lock *lock, *tmp;
-                        CERROR("still have locks in the list on cleanup:\n");
-
-                        list_for_each_entry_safe(lock, tmp,
-                                                 &cache->lc_locks_list,
-                                                 l_cache_locks_list) {
-                                list_del_init(&lock->l_cache_locks_list);
-                                /* XXX: Of course natural idea would be to print
-                                   offending locks here, but if we use
-                                   e.g. LDLM_ERROR, we will likely crash here,
-                                   as LDLM error tries to access e.g.
-                                   nonexisting namespace. Normally this kind of
-                                   case could only happen when somebody did not
-                                   release lock reference and we have other ways
-                                   to detect this. */
-                                /* Make sure there are no pages left under the
-                                   lock */
-                                LASSERT(list_empty(&lock->l_extents_list));
-                        }
-                }
-                spin_unlock(&cache->lc_locks_list_lock);
-                LASSERT(list_empty(&cache->lc_page_removal_callback_list));
-                OBD_FREE(cache, sizeof(*cache));
-        }
-
-        return 0;
-}
diff --git a/lustre/osc/lproc_osc.c b/lustre/osc/lproc_osc.c
deleted file mode 100644
index b5c39294ac6109f8056db7279e3d6adb4be6172b..0000000000000000000000000000000000000000
--- a/lustre/osc/lproc_osc.c
+++ /dev/null
@@ -1,555 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#include <asm/statfs.h>
-#endif
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include <linux/seq_file.h>
-#include "osc_internal.h"
-
-#ifdef LPROCFS
-static int osc_rd_active(char *page, char **start, off_t off,
-                         int count, int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        int rc;
-
-        LPROCFS_CLIMP_CHECK(dev);
-        rc = snprintf(page, count, "%d\n", !dev->u.cli.cl_import->imp_deactive);
-        LPROCFS_CLIMP_EXIT(dev);
-        return rc;
-}
-
-static int osc_wr_active(struct file *file, const char *buffer,
-                         unsigned long count, void *data)
-{
-        struct obd_device *dev = data;
-        int val, rc;
-        
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-        if (val < 0 || val > 1)
-                return -ERANGE;
-
-        LPROCFS_CLIMP_CHECK(dev);
-        /* opposite senses */
-        if (dev->u.cli.cl_import->imp_deactive == val) 
-                rc = ptlrpc_set_import_active(dev->u.cli.cl_import, val);
-        else
-                CDEBUG(D_CONFIG, "activate %d: ignoring repeat request\n", val);
-        
-        LPROCFS_CLIMP_EXIT(dev);
-        return count;
-}
-
-
-static int osc_rd_max_pages_per_rpc(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int rc;
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        rc = snprintf(page, count, "%d\n", cli->cl_max_pages_per_rpc);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        return rc;
-}
-
-static int osc_wr_max_pages_per_rpc(struct file *file, const char *buffer,
-                                    unsigned long count, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        struct obd_connect_data *ocd;
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        LPROCFS_CLIMP_CHECK(dev);
-        ocd = &cli->cl_import->imp_connect_data;
-        if (val < 1 || val > ocd->ocd_brw_size >> CFS_PAGE_SHIFT) {
-                LPROCFS_CLIMP_EXIT(dev);
-                return -ERANGE;
-        }
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        cli->cl_max_pages_per_rpc = val;
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        LPROCFS_CLIMP_EXIT(dev);
-        return count;
-}
-
-static int osc_rd_max_rpcs_in_flight(char *page, char **start, off_t off,
-                                     int count, int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int rc;
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        rc = snprintf(page, count, "%u\n", cli->cl_max_rpcs_in_flight);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        return rc;
-}
-
-static int osc_wr_max_rpcs_in_flight(struct file *file, const char *buffer,
-                                     unsigned long count, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        struct ptlrpc_request_pool *pool;
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-        if (val < 1 || val > OSC_MAX_RIF_MAX)
-                return -ERANGE;
-
-        LPROCFS_CLIMP_CHECK(dev);
-        pool = cli->cl_import->imp_rq_pool;
-        if (pool && val > cli->cl_max_rpcs_in_flight)
-                pool->prp_populate(pool, val-cli->cl_max_rpcs_in_flight);
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        cli->cl_max_rpcs_in_flight = val;
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        LPROCFS_CLIMP_EXIT(dev);
-        return count;
-}
-
-static int osc_rd_max_dirty_mb(char *page, char **start, off_t off, int count,
-                               int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        long val;
-        int mult;
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        val = cli->cl_dirty_max;
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        mult = 1 << 20;
-        return lprocfs_read_frac_helper(page, count, val, mult);
-}
-
-static int osc_wr_max_dirty_mb(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int pages_number, mult, rc;
-
-        mult = 1 << (20 - CFS_PAGE_SHIFT);
-        rc = lprocfs_write_frac_helper(buffer, count, &pages_number, mult);
-        if (rc)
-                return rc;
-
-        if (pages_number < 0 || pages_number > OSC_MAX_DIRTY_MB_MAX << (20 - CFS_PAGE_SHIFT) ||
-            pages_number > num_physpages / 4) /* 1/4 of RAM */
-                return -ERANGE;
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        cli->cl_dirty_max = (obd_count)(pages_number << CFS_PAGE_SHIFT);
-        osc_wake_cache_waiters(cli);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        return count;
-}
-
-static int osc_rd_cur_dirty_bytes(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int rc;
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        rc = snprintf(page, count, "%lu\n", cli->cl_dirty);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        return rc;
-}
-
-static int osc_rd_cur_grant_bytes(char *page, char **start, off_t off,
-                                  int count, int *eof, void *data)
-{
-        struct obd_device *dev = data;
-        struct client_obd *cli = &dev->u.cli;
-        int rc;
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        rc = snprintf(page, count, "%lu\n", cli->cl_avail_grant);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        return rc;
-}
-
-static int osc_rd_create_count(char *page, char **start, off_t off, int count,
-                               int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        if (obd == NULL)
-                return 0;
-
-        return snprintf(page, count, "%d\n",
-                        obd->u.cli.cl_oscc.oscc_grow_count);
-}
-
-static int osc_wr_create_count(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val, rc;
-
-        if (obd == NULL)
-                return 0;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < 0)
-                return -ERANGE;
-        if (val > OST_MAX_PRECREATE)
-                return -ERANGE;
-
-        obd->u.cli.cl_oscc.oscc_grow_count = val;
-
-        return count;
-}
-
-static int osc_rd_prealloc_next_id(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        if (obd == NULL)
-                return 0;
-
-        return snprintf(page, count, LPU64"\n",
-                        obd->u.cli.cl_oscc.oscc_next_id);
-}
-
-static int osc_rd_prealloc_last_id(char *page, char **start, off_t off,
-                                   int count, int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        if (obd == NULL)
-                return 0;
-
-        return snprintf(page, count, LPU64"\n",
-                        obd->u.cli.cl_oscc.oscc_last_id);
-}
-
-static int osc_rd_checksum(char *page, char **start, off_t off, int count,
-                           int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        if (obd == NULL)
-                return 0;
-
-        return snprintf(page, count, "%d\n",
-                        obd->u.cli.cl_checksum ? 1 : 0);
-}
-
-static int osc_wr_checksum(struct file *file, const char *buffer,
-                           unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val, rc;
-
-        if (obd == NULL)
-                return 0;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        obd->u.cli.cl_checksum = (val ? 1 : 0);
-
-        return count;
-}
-
-static int osc_rd_checksum_type(char *page, char **start, off_t off, int count,
-                                int *eof, void *data)
-{
-        struct obd_device *obd = data;
-        int i, len =0;
-        DECLARE_CKSUM_NAME;
-
-        if (obd == NULL)
-                return 0;
-
-        for (i = 0; i < ARRAY_SIZE(cksum_name) && len < count; i++) {
-                if (((1 << i) & obd->u.cli.cl_supp_cksum_types) == 0)
-                        continue;
-                if (obd->u.cli.cl_cksum_type == (1 << i))
-                        len += snprintf(page + len, count - len, "[%s] ",
-                                        cksum_name[i]);
-                else
-                        len += snprintf(page + len, count - len, "%s ",
-                                        cksum_name[i]);
-        }
-        if (len < count)
-                len += sprintf(page + len, "\n");
-        return len;
-}
-
-static int osc_wd_checksum_type(struct file *file, const char *buffer,
-                                unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int i;
-        DECLARE_CKSUM_NAME;
-        char kernbuf[10];
-
-        if (obd == NULL)
-                return 0;
-
-        if (count > sizeof(kernbuf) - 1)
-                return -EINVAL;
-        if (copy_from_user(kernbuf, buffer, count))
-                return -EFAULT;
-        if (count > 0 && kernbuf[count - 1] == '\n')
-                kernbuf[count - 1] = '\0';
-        else
-                kernbuf[count] = '\0';
-
-        for (i = 0; i < ARRAY_SIZE(cksum_name); i++) {
-                if (((1 << i) & obd->u.cli.cl_supp_cksum_types) == 0)
-                        continue;
-                if (!strcmp(kernbuf, cksum_name[i])) {
-                       obd->u.cli.cl_cksum_type = 1 << i;
-                       return count;
-                }
-        }
-        return -EINVAL;
-}
-
-static int osc_rd_resend_count(char *page, char **start, off_t off, int count,
-                               int *eof, void *data)
-{
-        struct obd_device *obd = data;
-
-        return snprintf(page, count, "%u\n", atomic_read(&obd->u.cli.cl_resends)); 
-}
-
-static int osc_wr_resend_count(struct file *file, const char *buffer,
-                               unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        int val, rc;
-
-        rc = lprocfs_write_helper(buffer, count, &val);
-        if (rc)
-                return rc;
-
-        if (val < 0)
-               return -EINVAL;
-
-        atomic_set(&obd->u.cli.cl_resends, val);
-
-        return count;
-}
-
-static struct lprocfs_vars lprocfs_osc_obd_vars[] = {
-        { "uuid",            lprocfs_rd_uuid,        0, 0 },
-        { "ping",            0, lprocfs_wr_ping,        0 },
-        { "connect_flags",   lprocfs_rd_connect_flags, 0, 0 },
-        { "blocksize",       lprocfs_rd_blksize,     0, 0 },
-        { "kbytestotal",     lprocfs_rd_kbytestotal, 0, 0 },
-        { "kbytesfree",      lprocfs_rd_kbytesfree,  0, 0 },
-        { "kbytesavail",     lprocfs_rd_kbytesavail, 0, 0 },
-        { "filestotal",      lprocfs_rd_filestotal,  0, 0 },
-        { "filesfree",       lprocfs_rd_filesfree,   0, 0 },
-        //{ "filegroups",      lprocfs_rd_filegroups,  0, 0 },
-        { "ost_server_uuid", lprocfs_rd_server_uuid, 0, 0 },
-        { "ost_conn_uuid",   lprocfs_rd_conn_uuid, 0, 0 },
-        { "active",          osc_rd_active, 
-                             osc_wr_active, 0 },
-        { "max_pages_per_rpc", osc_rd_max_pages_per_rpc,
-                               osc_wr_max_pages_per_rpc, 0 },
-        { "max_rpcs_in_flight", osc_rd_max_rpcs_in_flight,
-                                osc_wr_max_rpcs_in_flight, 0 },
-        { "max_dirty_mb",    osc_rd_max_dirty_mb, osc_wr_max_dirty_mb, 0 },
-        { "cur_dirty_bytes", osc_rd_cur_dirty_bytes, 0, 0 },
-        { "cur_grant_bytes", osc_rd_cur_grant_bytes, 0, 0 },
-        { "create_count",    osc_rd_create_count, osc_wr_create_count, 0 },
-        { "prealloc_next_id", osc_rd_prealloc_next_id, 0, 0 },
-        { "prealloc_last_id", osc_rd_prealloc_last_id, 0, 0 },
-        { "checksums",       osc_rd_checksum, osc_wr_checksum, 0 },
-        { "checksum_type",   osc_rd_checksum_type, osc_wd_checksum_type, 0 },
-        { "resend_count",  osc_rd_resend_count, osc_wr_resend_count, 0},
-        { "timeouts",        lprocfs_rd_timeouts,      0, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_osc_module_vars[] = {
-        { "num_refs",        lprocfs_rd_numrefs,     0, 0 },
-        { 0 }
-};
-
-#define pct(a,b) (b ? a * 100 / b : 0)
-
-static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
-{
-        struct timeval now;
-        struct obd_device *dev = seq->private;
-        struct client_obd *cli = &dev->u.cli;
-        unsigned long read_tot = 0, write_tot = 0, read_cum, write_cum;
-        int i;
-
-        do_gettimeofday(&now);
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        seq_printf(seq, "snapshot_time:         %lu.%lu (secs.usecs)\n",
-                   now.tv_sec, now.tv_usec);
-        seq_printf(seq, "read RPCs in flight:  %d\n",
-                   cli->cl_r_in_flight);
-        seq_printf(seq, "write RPCs in flight: %d\n",
-                   cli->cl_w_in_flight);
-        seq_printf(seq, "pending write pages:  %d\n",
-                   cli->cl_pending_w_pages);
-        seq_printf(seq, "pending read pages:   %d\n",
-                   cli->cl_pending_r_pages);
-
-        seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
-        seq_printf(seq, "pages per rpc         rpcs   %% cum %% |");
-        seq_printf(seq, "       rpcs   %% cum %%\n");
-
-        read_tot = lprocfs_oh_sum(&cli->cl_read_page_hist);
-        write_tot = lprocfs_oh_sum(&cli->cl_write_page_hist);
-
-        read_cum = 0;
-        write_cum = 0;
-        for (i = 0; i < OBD_HIST_MAX; i++) {
-                unsigned long r = cli->cl_read_page_hist.oh_buckets[i];
-                unsigned long w = cli->cl_write_page_hist.oh_buckets[i];
-                read_cum += r;
-                write_cum += w;
-                seq_printf(seq, "%d:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
-                                 1 << i, r, pct(r, read_tot),
-                                 pct(read_cum, read_tot), w,
-                                 pct(w, write_tot),
-                                 pct(write_cum, write_tot));
-                if (read_cum == read_tot && write_cum == write_tot)
-                        break;
-        }
-
-        seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
-        seq_printf(seq, "rpcs in flight        rpcs   %% cum %% |");
-        seq_printf(seq, "       rpcs   %% cum %%\n");
-
-        read_tot = lprocfs_oh_sum(&cli->cl_read_rpc_hist);
-        write_tot = lprocfs_oh_sum(&cli->cl_write_rpc_hist);
-
-        read_cum = 0;
-        write_cum = 0;
-        for (i = 0; i < OBD_HIST_MAX; i++) {
-                unsigned long r = cli->cl_read_rpc_hist.oh_buckets[i];
-                unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
-                read_cum += r;
-                write_cum += w;
-                seq_printf(seq, "%d:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
-                                 i, r, pct(r, read_tot),
-                                 pct(read_cum, read_tot), w,
-                                 pct(w, write_tot),
-                                 pct(write_cum, write_tot));
-                if (read_cum == read_tot && write_cum == write_tot)
-                        break;
-        }
-
-        seq_printf(seq, "\n\t\t\tread\t\t\twrite\n");
-        seq_printf(seq, "offset                rpcs   %% cum %% |");
-        seq_printf(seq, "       rpcs   %% cum %%\n");
-
-        read_tot = lprocfs_oh_sum(&cli->cl_read_offset_hist);
-        write_tot = lprocfs_oh_sum(&cli->cl_write_offset_hist);
-
-        read_cum = 0;
-        write_cum = 0;
-        for (i = 0; i < OBD_HIST_MAX; i++) {
-                unsigned long r = cli->cl_read_offset_hist.oh_buckets[i];
-                unsigned long w = cli->cl_write_offset_hist.oh_buckets[i];
-                read_cum += r;
-                write_cum += w;
-                seq_printf(seq, "%d:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
-                           (i == 0) ? 0 : 1 << (i - 1),
-                           r, pct(r, read_tot), pct(read_cum, read_tot), 
-                           w, pct(w, write_tot), pct(write_cum, write_tot));
-                if (read_cum == read_tot && write_cum == write_tot)
-                        break;
-        }
-
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        return 0;
-}
-#undef pct
-
-static ssize_t osc_rpc_stats_seq_write(struct file *file, const char *buf,
-                                       size_t len, loff_t *off)
-{
-        struct seq_file *seq = file->private_data;
-        struct obd_device *dev = seq->private;
-        struct client_obd *cli = &dev->u.cli;
-
-        lprocfs_oh_clear(&cli->cl_read_rpc_hist);
-        lprocfs_oh_clear(&cli->cl_write_rpc_hist);
-        lprocfs_oh_clear(&cli->cl_read_page_hist);
-        lprocfs_oh_clear(&cli->cl_write_page_hist);
-        lprocfs_oh_clear(&cli->cl_read_offset_hist);
-        lprocfs_oh_clear(&cli->cl_write_offset_hist);
-
-        return len;
-}
-
-LPROC_SEQ_FOPS(osc_rpc_stats);
-
-int lproc_osc_attach_seqstat(struct obd_device *dev)
-{
-        return lprocfs_obd_seq_create(dev, "rpc_stats", 0444,
-                                      &osc_rpc_stats_fops, dev);
-}
-
-void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars)
-{
-        lvars->module_vars = lprocfs_osc_module_vars;
-        lvars->obd_vars    = lprocfs_osc_obd_vars;
-}
-#endif /* LPROCFS */
-
diff --git a/lustre/osc/osc_create.c b/lustre/osc/osc_create.c
deleted file mode 100644
index c26d2e3494e3fe45175f6abd8c3930422d1b0fba..0000000000000000000000000000000000000000
--- a/lustre/osc/osc_create.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author Peter Braam <braam@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- *  For testing and management it is treated as an obd_device,
- *  although * it does not export a full OBD method table (the
- *  requests are coming * in over the wire, so object target modules
- *  do not have a full * method table.)
- *
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_OSC
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#ifdef  __CYGWIN__
-# include <ctype.h>
-#endif
-
-# include <lustre_dlm.h>
-#include <obd_class.h>
-#include "osc_internal.h"
-
-static int osc_interpret_create(struct ptlrpc_request *req, void *data, int rc)
-{
-        struct osc_creator *oscc;
-        struct ost_body *body = NULL;
-        ENTRY;
-
-        if (req->rq_repmsg) {
-                body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                          lustre_swab_ost_body);
-                if (body == NULL && rc == 0)
-                        rc = -EPROTO;
-        }
-
-        oscc = req->rq_async_args.pointer_arg[0];
-        LASSERT(oscc && (oscc->oscc_obd != LP_POISON));
-        
-        spin_lock(&oscc->oscc_lock);
-        oscc->oscc_flags &= ~OSCC_FLAG_CREATING;
-        switch (rc) {
-        case 0: {
-                if (body) {
-                        int diff = body->oa.o_id - oscc->oscc_last_id;
-
-                        if (diff < oscc->oscc_grow_count)
-                                oscc->oscc_grow_count =
-                                        max(diff/3, OST_MIN_PRECREATE);
-                        else
-                                oscc->oscc_flags &= ~OSCC_FLAG_LOW;
-                        oscc->oscc_last_id = body->oa.o_id;
-                }
-                spin_unlock(&oscc->oscc_lock);
-                break;
-        }
-        case -EAGAIN:
-                /* valid race delorphan vs create, or somthing after resend */
-                spin_unlock(&oscc->oscc_lock);
-                DEBUG_REQ(D_INODE, req, "Got EGAIN - resend \n");
-                break;
-        case -ENOSPC:
-        case -EROFS: {
-                oscc->oscc_flags |= OSCC_FLAG_NOSPC;
-                if (body && rc == -ENOSPC) {
-                        oscc->oscc_grow_count = OST_MIN_PRECREATE;
-                        oscc->oscc_last_id = body->oa.o_id;
-                }
-                spin_unlock(&oscc->oscc_lock);
-                DEBUG_REQ(D_INODE, req, "OST out of space, flagging");
-                break;
-        }
-        case -EIO: {
-                /* filter always set body->oa.o_id as the last_id 
-                 * of filter (see filter_handle_precreate for detail)*/
-                if (body && body->oa.o_id > oscc->oscc_last_id)
-                        oscc->oscc_last_id = body->oa.o_id;
-                spin_unlock(&oscc->oscc_lock);
-                break;
-        }
-        default: {
-                oscc->oscc_flags |= OSCC_FLAG_RECOVERING;
-                oscc->oscc_grow_count = OST_MIN_PRECREATE;
-                spin_unlock(&oscc->oscc_lock);
-                DEBUG_REQ(D_ERROR, req,
-                          "unknown rc %d from async create: failing oscc", rc);
-                ptlrpc_fail_import(req->rq_import,
-                                   lustre_msg_get_conn_cnt(req->rq_reqmsg));
-        }
-        }
-
-        CDEBUG(D_RPCTRACE, "prealloc through id "LPU64", next to use "LPU64"\n",
-               oscc->oscc_last_id, oscc->oscc_next_id);
-
-        cfs_waitq_signal(&oscc->oscc_waitq);
-        RETURN(rc);
-}
-
-static int oscc_internal_create(struct osc_creator *oscc)
-{
-        struct ptlrpc_request *request;
-        struct ost_body *body;
-        int size[] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        LASSERT_SPIN_LOCKED(&oscc->oscc_lock);
-
-        if (oscc->oscc_grow_count < OST_MAX_PRECREATE &&
-            !(oscc->oscc_flags & (OSCC_FLAG_LOW | OSCC_FLAG_RECOVERING)) &&
-            (__s64)(oscc->oscc_last_id - oscc->oscc_next_id) <=
-                   (oscc->oscc_grow_count / 4 + 1)) {
-                oscc->oscc_flags |= OSCC_FLAG_LOW;
-                oscc->oscc_grow_count *= 2;
-        }
-
-        if (oscc->oscc_grow_count > OST_MAX_PRECREATE / 2)
-                oscc->oscc_grow_count = OST_MAX_PRECREATE / 2;
-
-        if (oscc->oscc_flags & OSCC_FLAG_CREATING ||
-            oscc->oscc_flags & OSCC_FLAG_RECOVERING) {
-                spin_unlock(&oscc->oscc_lock);
-                RETURN(0);
-        }
-        oscc->oscc_flags |= OSCC_FLAG_CREATING;
-        spin_unlock(&oscc->oscc_lock);
-
-        request = ptlrpc_prep_req(oscc->oscc_obd->u.cli.cl_import,
-                                  LUSTRE_OST_VERSION, OST_CREATE, 2,
-                                  size, NULL);
-        if (request == NULL) {
-                spin_lock(&oscc->oscc_lock);
-                oscc->oscc_flags &= ~OSCC_FLAG_CREATING;
-                spin_unlock(&oscc->oscc_lock);
-                RETURN(-ENOMEM);
-        }
-
-        request->rq_request_portal = OST_CREATE_PORTAL;
-        ptlrpc_at_set_req_timeout(request);
-        body = lustre_msg_buf(request->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-
-        spin_lock(&oscc->oscc_lock);
-        body->oa.o_id = oscc->oscc_last_id + oscc->oscc_grow_count;
-        body->oa.o_valid |= OBD_MD_FLID;
-        spin_unlock(&oscc->oscc_lock);
-        CDEBUG(D_RPCTRACE, "prealloc through id "LPU64" (last seen "LPU64")\n",
-               body->oa.o_id, oscc->oscc_last_id);
-
-        ptlrpc_req_set_repsize(request, 2, size);
-
-        request->rq_async_args.pointer_arg[0] = oscc;
-        request->rq_interpret_reply = osc_interpret_create;
-        ptlrpcd_add_req(request);
-
-        RETURN(0);
-}
-
-static int oscc_has_objects(struct osc_creator *oscc, int count)
-{
-        int have_objs;
-        spin_lock(&oscc->oscc_lock);
-        have_objs = ((__s64)(oscc->oscc_last_id - oscc->oscc_next_id) >= count);
-
-        if (!have_objs) {
-                oscc_internal_create(oscc);
-        } else {
-                spin_unlock(&oscc->oscc_lock);
-        }
-
-        return have_objs;
-}
-
-static int oscc_wait_for_objects(struct osc_creator *oscc, int count)
-{
-        int have_objs;
-        int ost_full;
-        int osc_invalid;
-
-        have_objs = oscc_has_objects(oscc, count);
-
-        spin_lock(&oscc->oscc_lock);
-        ost_full = (oscc->oscc_flags & OSCC_FLAG_NOSPC);
-        spin_unlock(&oscc->oscc_lock);
-
-        osc_invalid = oscc->oscc_obd->u.cli.cl_import->imp_invalid;
-
-        return have_objs || ost_full || osc_invalid;
-}
-
-static int oscc_precreate(struct osc_creator *oscc, int wait)
-{
-        struct l_wait_info lwi = { 0 };
-        int rc = 0;
-        ENTRY;
-
-        if (oscc_has_objects(oscc, oscc->oscc_grow_count / 2))
-                RETURN(0);
-
-        if (!wait)
-                RETURN(0);
-
-        /* no rc check -- a no-INTR, no-TIMEOUT wait can't fail */
-        l_wait_event(oscc->oscc_waitq, oscc_wait_for_objects(oscc, 1), &lwi);
-
-        if (!oscc_has_objects(oscc, 1) && (oscc->oscc_flags & OSCC_FLAG_NOSPC))
-                rc = -ENOSPC;
-
-        if (oscc->oscc_obd->u.cli.cl_import->imp_invalid)
-                rc = -EIO;
-
-        RETURN(rc);
-}
-
-int oscc_recovering(struct osc_creator *oscc)
-{
-        int recov = 0;
-
-        spin_lock(&oscc->oscc_lock);
-        recov = oscc->oscc_flags & OSCC_FLAG_RECOVERING;
-        spin_unlock(&oscc->oscc_lock);
-
-        return recov;
-}
-
-/* decide if the OST has remaining object, return value :
-        0 : the OST has remaining object, and don't need to do precreate.
-        1 : the OST has no remaining object, and will send a RPC for precreate.
-        2 : the OST has no remaining object, and will not get any for
-            a potentially very long time
-     1000 : unusable
- */
-int osc_precreate(struct obd_export *exp)
-{
-        struct osc_creator *oscc = &exp->exp_obd->u.cli.cl_oscc;
-        struct obd_import *imp = exp->exp_imp_reverse;
-        ENTRY;
-
-        LASSERT(oscc != NULL);
-        if (imp != NULL && imp->imp_deactive)
-                RETURN(1000);
-
-        if (oscc->oscc_last_id < oscc->oscc_next_id) {
-                spin_lock(&oscc->oscc_lock);
-                if (oscc->oscc_flags & OSCC_FLAG_NOSPC) {
-                        spin_unlock(&oscc->oscc_lock);
-                        RETURN(1000);
-                }
-                if (oscc->oscc_flags & OSCC_FLAG_SYNC_IN_PROGRESS) {
-                        spin_unlock(&oscc->oscc_lock);
-                        RETURN(1);
-                }
-                if (oscc->oscc_flags & OSCC_FLAG_RECOVERING) {
-                        spin_unlock(&oscc->oscc_lock);
-                        RETURN(2);
-                }
-
-                if (oscc->oscc_flags & OSCC_FLAG_CREATING) {
-                        spin_unlock(&oscc->oscc_lock);
-                        RETURN(1);
-                }
-
-                oscc_internal_create(oscc);
-                RETURN(1);
-        }
-        RETURN(0);
-}
-
-int osc_create(struct obd_export *exp, struct obdo *oa,
-               struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct lov_stripe_md *lsm;
-        struct osc_creator *oscc = &exp->exp_obd->u.cli.cl_oscc;
-        int try_again = 1, rc = 0;
-        ENTRY;
-        LASSERT(oa);
-        LASSERT(ea);
-
-        if ((oa->o_valid & OBD_MD_FLGROUP) && (oa->o_gr != 0))
-                RETURN(osc_real_create(exp, oa, ea, oti));
-
-        if ((oa->o_valid & OBD_MD_FLFLAGS) &&
-            oa->o_flags == OBD_FL_RECREATE_OBJS) {
-                RETURN(osc_real_create(exp, oa, ea, oti));
-        }
-
-        /* this is the special case where create removes orphans */
-        if ((oa->o_valid & OBD_MD_FLFLAGS) &&
-            oa->o_flags == OBD_FL_DELORPHAN) {
-                spin_lock(&oscc->oscc_lock);
-                if (oscc->oscc_flags & OSCC_FLAG_SYNC_IN_PROGRESS) {
-                        spin_unlock(&oscc->oscc_lock);
-                        RETURN(-EBUSY);
-                }
-                if (!(oscc->oscc_flags & OSCC_FLAG_RECOVERING)) {
-                        spin_unlock(&oscc->oscc_lock);
-                        RETURN(0);
-                }
-                oscc->oscc_flags |= OSCC_FLAG_SYNC_IN_PROGRESS;
-                spin_unlock(&oscc->oscc_lock);
-                CDEBUG(D_HA, "%s: oscc recovery started - delete to "LPU64"\n",
-                       oscc->oscc_obd->obd_name, oscc->oscc_next_id - 1);
-
-                /* delete from next_id on up */
-                oa->o_valid |= OBD_MD_FLID;
-                oa->o_id = oscc->oscc_next_id - 1;
-
-                rc = osc_real_create(exp, oa, ea, NULL);
-
-                spin_lock(&oscc->oscc_lock);
-                oscc->oscc_flags &= ~OSCC_FLAG_SYNC_IN_PROGRESS;
-                if (rc == 0 || rc == -ENOSPC) {
-                        if (rc == -ENOSPC)
-                                oscc->oscc_flags |= OSCC_FLAG_NOSPC;
-                        oscc->oscc_flags &= ~OSCC_FLAG_RECOVERING;
-                        oscc->oscc_last_id = oa->o_id;
-                        CDEBUG(D_HA, "%s: oscc recovery finished, last_id: "
-                               LPU64", rc: %d\n", oscc->oscc_obd->obd_name,
-                               oscc->oscc_last_id, rc);
-                        cfs_waitq_signal(&oscc->oscc_waitq);
-                } else {
-                        CDEBUG(D_ERROR, "%s: oscc recovery failed: %d\n",
-                               oscc->oscc_obd->obd_name, rc);
-                }
-                spin_unlock(&oscc->oscc_lock);
-
-
-                RETURN(rc);
-        }
-
-        lsm = *ea;
-        if (lsm == NULL) {
-                rc = obd_alloc_memmd(exp, &lsm);
-                if (rc < 0)
-                        RETURN(rc);
-        }
-
-        while (try_again) {
-                /* If orphans are being recovered, then we must wait until
-                   it is finished before we can continue with create. */
-                if (oscc_recovering(oscc)) {
-                        struct l_wait_info lwi;
-
-                        CDEBUG(D_HA,"%s: oscc recovery in progress, waiting\n",
-                               oscc->oscc_obd->obd_name);
-
-                        lwi = LWI_TIMEOUT(cfs_timeout_cap(cfs_time_seconds(
-                                obd_timeout / 4)), NULL, NULL);
-                        rc = l_wait_event(oscc->oscc_waitq,
-                                          !oscc_recovering(oscc), &lwi);
-                        LASSERT(rc == 0 || rc == -ETIMEDOUT);
-                        if (rc == -ETIMEDOUT) {
-                                CDEBUG(D_HA,"%s: timeout waiting on recovery\n",
-                                       oscc->oscc_obd->obd_name);
-                                RETURN(rc);
-                        }
-                        CDEBUG(D_HA, "%s: oscc recovery over, waking up\n",
-                               oscc->oscc_obd->obd_name);
-                }
-
-                spin_lock(&oscc->oscc_lock);
-                if (oscc->oscc_flags & OSCC_FLAG_EXITING) {
-                        spin_unlock(&oscc->oscc_lock);
-                        break;
-                }
-
-                if (oscc->oscc_last_id >= oscc->oscc_next_id) {
-                        memcpy(oa, &oscc->oscc_oa, sizeof(*oa));
-                        oa->o_id = oscc->oscc_next_id;
-                        lsm->lsm_object_id = oscc->oscc_next_id;
-                        *ea = lsm;
-                        oscc->oscc_next_id++;
-                        try_again = 0;
-
-                        CDEBUG(D_RPCTRACE, "%s: set oscc_next_id = "LPU64"\n",
-                               exp->exp_obd->obd_name, oscc->oscc_next_id);
-                } else if (oscc->oscc_flags & OSCC_FLAG_NOSPC) {
-                        rc = -ENOSPC;
-                        spin_unlock(&oscc->oscc_lock);
-                        break;
-                }
-                spin_unlock(&oscc->oscc_lock);
-                rc = oscc_precreate(oscc, try_again);
-                if (rc)
-                        break;
-        }
-
-        if (rc == 0)
-                CDEBUG(D_INFO, "%s: returning objid "LPU64"\n",
-                       obd2cli_tgt(oscc->oscc_obd), lsm->lsm_object_id);
-        else if (*ea == NULL)
-                obd_free_memmd(exp, &lsm);
-        RETURN(rc);
-}
-
-void oscc_init(struct obd_device *obd)
-{
-        struct osc_creator *oscc;
-
-        if (obd == NULL)
-                return;
-
-        oscc = &obd->u.cli.cl_oscc;
-
-        memset(oscc, 0, sizeof(*oscc));
-        CFS_INIT_LIST_HEAD(&oscc->oscc_list);
-        cfs_waitq_init(&oscc->oscc_waitq);
-        spin_lock_init(&oscc->oscc_lock);
-        oscc->oscc_obd = obd;
-        oscc->oscc_grow_count = OST_MIN_PRECREATE;
-
-        oscc->oscc_next_id = 2;
-        oscc->oscc_last_id = 1;
-        oscc->oscc_flags |= OSCC_FLAG_RECOVERING;
-        /* XXX the export handle should give the oscc the last object */
-        /* oed->oed_oscc.oscc_last_id = exph->....; */
-}
diff --git a/lustre/osc/osc_internal.h b/lustre/osc/osc_internal.h
deleted file mode 100644
index 2f0f41b7d7af46edce496d172d1e44e73a6f0c33..0000000000000000000000000000000000000000
--- a/lustre/osc/osc_internal.h
+++ /dev/null
@@ -1,97 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef OSC_INTERNAL_H
-#define OSC_INTERNAL_H
-
-#define OAP_MAGIC 8675309
-
-struct osc_async_page {
-        int                     oap_magic;
-        unsigned short          oap_cmd;
-        unsigned short          oap_interrupted:1;
-
-        struct list_head        oap_pending_item;
-        struct list_head        oap_urgent_item;
-        struct list_head        oap_rpc_item;
-
-        obd_off                 oap_obj_off;
-        unsigned                oap_page_off;
-        enum async_flags        oap_async_flags;
-
-        struct brw_page         oap_brw_page;
-
-        struct oig_callback_context oap_occ;
-        struct obd_io_group     *oap_oig;
-        struct ptlrpc_request   *oap_request;
-        struct client_obd       *oap_cli;
-        struct lov_oinfo        *oap_loi;
-
-        struct obd_async_page_ops *oap_caller_ops;
-        void                    *oap_caller_data;
-        struct list_head         oap_page_list;
-        struct ldlm_lock        *oap_ldlm_lock;
-        spinlock_t               oap_lock;
-};
-
-#define oap_page        oap_brw_page.pg
-#define oap_count       oap_brw_page.count
-#define oap_brw_flags   oap_brw_page.flag
-
-#define OAP_FROM_COOKIE(c)                                                    \
-        (LASSERT(((struct osc_async_page *)(c))->oap_magic == OAP_MAGIC),     \
-         (struct osc_async_page *)(c))
-
-struct osc_cache_waiter {
-        struct list_head        ocw_entry;
-        cfs_waitq_t             ocw_waitq;
-        struct osc_async_page   *ocw_oap;
-        int                     ocw_rc;
-};
-
-#define OSCC_FLAG_RECOVERING         0x01
-#define OSCC_FLAG_CREATING           0x02
-#define OSCC_FLAG_NOSPC              0x04 /* can't create more objects on OST */
-#define OSCC_FLAG_SYNC_IN_PROGRESS   0x08 /* only allow one thread to sync */
-#define OSCC_FLAG_LOW                0x10
-#define OSCC_FLAG_EXITING            0x20
-
-int osc_precreate(struct obd_export *exp);
-int osc_create(struct obd_export *exp, struct obdo *oa,
-	       struct lov_stripe_md **ea, struct obd_trans_info *oti);
-int osc_real_create(struct obd_export *exp, struct obdo *oa,
-	       struct lov_stripe_md **ea, struct obd_trans_info *oti);
-void oscc_init(struct obd_device *obd);
-void osc_wake_cache_waiters(struct client_obd *cli);
-
-#ifdef LPROCFS
-int lproc_osc_attach_seqstat(struct obd_device *dev);
-void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline int lproc_osc_attach_seqstat(struct obd_device *dev) {return 0;}
-static inline void lprocfs_osc_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-#ifndef min_t
-#define min_t(type,x,y) \
-        ({ type __x = (x); type __y = (y); __x < __y ? __x: __y; })
-#endif
-
-static inline int osc_recoverable_error(int rc)
-{
-        return (rc == -EIO || rc == -EROFS || rc == -ENOMEM || rc == -EAGAIN);
-}
-
-/* return 1 if osc should be resend request */
-static inline int osc_should_resend(int resend, struct client_obd *cli)
-{
-        return atomic_read(&cli->cl_resends) ? 
-                atomic_read(&cli->cl_resends) > resend : 1; 
-}
-
-
-#endif /* OSC_INTERNAL_H */
diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c
deleted file mode 100644
index afc18ba9322c3bd6df9487bcf70d8a873d89fe7c..0000000000000000000000000000000000000000
--- a/lustre/osc/osc_request.c
+++ /dev/null
@@ -1,3988 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author Peter Braam <braam@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- *  For testing and management it is treated as an obd_device,
- *  although * it does not export a full OBD method table (the
- *  requests are coming * in over the wire, so object target modules
- *  do not have a full * method table.)
- *
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_OSC
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-# include <lustre_dlm.h>
-#include <libcfs/kp30.h>
-#include <lustre_net.h>
-#include <lustre/lustre_user.h>
-#include <obd_ost.h>
-#include <obd_lov.h>
-
-#ifdef  __CYGWIN__
-# include <ctype.h>
-#endif
-
-#include <lustre_ha.h>
-#include <lprocfs_status.h>
-#include <lustre_log.h>
-#include <lustre_debug.h>
-#include <lustre_param.h>
-#include <lustre_cache.h>
-#include "osc_internal.h"
-
-static quota_interface_t *quota_interface = NULL;
-extern quota_interface_t osc_quota_interface;
-
-static void osc_release_ppga(struct brw_page **ppga, obd_count count);
-int osc_cleanup(struct obd_device *obd);
-
-static quota_interface_t *quota_interface;
-extern quota_interface_t osc_quota_interface;
-
-/* by default 10s */
-atomic_t osc_resend_time; 
-
-/* Pack OSC object metadata for disk storage (LE byte order). */
-static int osc_packmd(struct obd_export *exp, struct lov_mds_md **lmmp,
-                      struct lov_stripe_md *lsm)
-{
-        int lmm_size;
-        ENTRY;
-
-        lmm_size = sizeof(**lmmp);
-        if (!lmmp)
-                RETURN(lmm_size);
-
-        if (*lmmp && !lsm) {
-                OBD_FREE(*lmmp, lmm_size);
-                *lmmp = NULL;
-                RETURN(0);
-        }
-
-        if (!*lmmp) {
-                OBD_ALLOC(*lmmp, lmm_size);
-                if (!*lmmp)
-                        RETURN(-ENOMEM);
-        }
-
-        if (lsm) {
-                LASSERT(lsm->lsm_object_id);
-                (*lmmp)->lmm_object_id = cpu_to_le64(lsm->lsm_object_id);
-        }
-
-        RETURN(lmm_size);
-}
-
-/* Unpack OSC object metadata from disk storage (LE byte order). */
-static int osc_unpackmd(struct obd_export *exp, struct lov_stripe_md **lsmp,
-                        struct lov_mds_md *lmm, int lmm_bytes)
-{
-        int lsm_size;
-        ENTRY;
-
-        if (lmm != NULL) {
-                if (lmm_bytes < sizeof (*lmm)) {
-                        CERROR("lov_mds_md too small: %d, need %d\n",
-                               lmm_bytes, (int)sizeof(*lmm));
-                        RETURN(-EINVAL);
-                }
-                /* XXX LOV_MAGIC etc check? */
-
-                if (lmm->lmm_object_id == 0) {
-                        CERROR("lov_mds_md: zero lmm_object_id\n");
-                        RETURN(-EINVAL);
-                }
-        }
-
-        lsm_size = lov_stripe_md_size(1);
-        if (lsmp == NULL)
-                RETURN(lsm_size);
-
-        if (*lsmp != NULL && lmm == NULL) {
-                OBD_FREE((*lsmp)->lsm_oinfo[0], sizeof(struct lov_oinfo));
-                OBD_FREE(*lsmp, lsm_size);
-                *lsmp = NULL;
-                RETURN(0);
-        }
-
-        if (*lsmp == NULL) {
-                OBD_ALLOC(*lsmp, lsm_size);
-                if (*lsmp == NULL)
-                        RETURN(-ENOMEM);
-                OBD_ALLOC((*lsmp)->lsm_oinfo[0], sizeof(struct lov_oinfo));
-                if ((*lsmp)->lsm_oinfo[0] == NULL) {
-                        OBD_FREE(*lsmp, lsm_size);
-                        RETURN(-ENOMEM);
-                }
-                loi_init((*lsmp)->lsm_oinfo[0]);
-        }
-
-        if (lmm != NULL) {
-                /* XXX zero *lsmp? */
-                (*lsmp)->lsm_object_id = le64_to_cpu (lmm->lmm_object_id);
-                LASSERT((*lsmp)->lsm_object_id);
-        }
-
-        (*lsmp)->lsm_maxbytes = LUSTRE_STRIPE_MAXBYTES;
-
-        RETURN(lsm_size);
-}
-
-static int osc_getattr_interpret(struct ptlrpc_request *req,
-                                 struct osc_async_args *aa, int rc)
-{
-        struct ost_body *body;
-        ENTRY;
-
-        if (rc != 0)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body) {
-                CDEBUG(D_INODE, "mode: %o\n", body->oa.o_mode);
-                memcpy(aa->aa_oi->oi_oa, &body->oa, sizeof(*aa->aa_oi->oi_oa));
-
-                /* This should really be sent by the OST */
-                aa->aa_oi->oi_oa->o_blksize = PTLRPC_MAX_BRW_SIZE;
-                aa->aa_oi->oi_oa->o_valid |= OBD_MD_FLBLKSZ;
-        } else {
-                CERROR("can't unpack ost_body\n");
-                rc = -EPROTO;
-                aa->aa_oi->oi_oa->o_valid = 0;
-        }
-out:
-        rc = aa->aa_oi->oi_cb_up(aa->aa_oi, rc);
-        RETURN(rc);
-}
-
-static int osc_getattr_async(struct obd_export *exp, struct obd_info *oinfo,
-                             struct ptlrpc_request_set *set)
-{
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        struct osc_async_args *aa;
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_GETATTR, 2, size,NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        req->rq_interpret_reply = osc_getattr_interpret;
-
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct osc_async_args *)&req->rq_async_args;
-        aa->aa_oi = oinfo;
-
-        ptlrpc_set_add_req(set, req);
-        RETURN (0);
-}
-
-static int osc_getattr(struct obd_export *exp, struct obd_info *oinfo)
-{
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_GETATTR, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc) {
-                CERROR("%s failed: rc = %d\n", __FUNCTION__, rc);
-                GOTO(out, rc);
-        }
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR ("can't unpack ost_body\n");
-                GOTO (out, rc = -EPROTO);
-        }
-
-        CDEBUG(D_INODE, "mode: %o\n", body->oa.o_mode);
-        memcpy(oinfo->oi_oa, &body->oa, sizeof(*oinfo->oi_oa));
-
-        /* This should really be sent by the OST */
-        oinfo->oi_oa->o_blksize = PTLRPC_MAX_BRW_SIZE;
-        oinfo->oi_oa->o_valid |= OBD_MD_FLBLKSZ;
-
-        EXIT;
- out:
-        ptlrpc_req_finished(req);
-        return rc;
-}
-
-static int osc_setattr(struct obd_export *exp, struct obd_info *oinfo,
-                       struct obd_trans_info *oti)
-{
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_SETATTR, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                GOTO(out, rc = -EPROTO);
-
-        memcpy(oinfo->oi_oa, &body->oa, sizeof(*oinfo->oi_oa));
-
-        EXIT;
-out:
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-static int osc_setattr_interpret(struct ptlrpc_request *req,
-                                 struct osc_async_args *aa, int rc)
-{
-        struct ost_body *body;
-        ENTRY;
-
-        if (rc != 0)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR("can't unpack ost_body\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        memcpy(aa->aa_oi->oi_oa, &body->oa, sizeof(*aa->aa_oi->oi_oa));
-out:
-        rc = aa->aa_oi->oi_cb_up(aa->aa_oi, rc);
-        RETURN(rc);
-}
-
-static int osc_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
-                             struct obd_trans_info *oti,
-                             struct ptlrpc_request_set *rqset)
-{
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        struct osc_async_args *aa;
-        ENTRY;
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_SETATTR, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-
-        if (oinfo->oi_oa->o_valid & OBD_MD_FLCOOKIE) {
-                LASSERT(oti);
-                memcpy(obdo_logcookie(oinfo->oi_oa), oti->oti_logcookies,
-                       sizeof(*oti->oti_logcookies));
-        }
-
-        memcpy(&body->oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
-        ptlrpc_req_set_repsize(req, 2, size);
-        /* do mds to ost setattr asynchronouly */
-        if (!rqset) {
-                /* Do not wait for response. */
-                ptlrpcd_add_req(req);
-        } else {
-                req->rq_interpret_reply = osc_setattr_interpret;
-
-                CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-                aa = (struct osc_async_args *)&req->rq_async_args;
-                aa->aa_oi = oinfo;
-
-                ptlrpc_set_add_req(rqset, req);
-        }
-
-        RETURN(0);
-}
-
-int osc_real_create(struct obd_export *exp, struct obdo *oa,
-                    struct lov_stripe_md **ea, struct obd_trans_info *oti)
-{
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        struct lov_stripe_md *lsm;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        LASSERT(oa);
-        LASSERT(ea);
-
-        lsm = *ea;
-        if (!lsm) {
-                rc = obd_alloc_memmd(exp, &lsm);
-                if (rc < 0)
-                        RETURN(rc);
-        }
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_CREATE, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->oa, oa, sizeof(body->oa));
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        if (oa->o_valid & OBD_MD_FLINLINE) {
-                LASSERT((oa->o_valid & OBD_MD_FLFLAGS) &&
-                        oa->o_flags == OBD_FL_DELORPHAN);
-                DEBUG_REQ(D_HA, req,
-                          "delorphan from OST integration");
-                /* Don't resend the delorphan req */
-                req->rq_no_resend = req->rq_no_delay = 1;
-        }
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out_req, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR ("can't unpack ost_body\n");
-                GOTO (out_req, rc = -EPROTO);
-        }
-
-        memcpy(oa, &body->oa, sizeof(*oa));
-
-        /* This should really be sent by the OST */
-        oa->o_blksize = PTLRPC_MAX_BRW_SIZE;
-        oa->o_valid |= OBD_MD_FLBLKSZ;
-
-        /* XXX LOV STACKING: the lsm that is passed to us from LOV does not
-         * have valid lsm_oinfo data structs, so don't go touching that.
-         * This needs to be fixed in a big way.
-         */
-        lsm->lsm_object_id = oa->o_id;
-        *ea = lsm;
-
-        if (oti != NULL) {
-                oti->oti_transno = lustre_msg_get_transno(req->rq_repmsg);
-
-                if (oa->o_valid & OBD_MD_FLCOOKIE) {
-                        if (!oti->oti_logcookies)
-                                oti_alloc_cookies(oti, 1);
-                        memcpy(oti->oti_logcookies, obdo_logcookie(oa),
-                               sizeof(oti->oti_onecookie));
-                }
-        }
-
-        CDEBUG(D_HA, "transno: "LPD64"\n",
-               lustre_msg_get_transno(req->rq_repmsg));
-out_req:
-        ptlrpc_req_finished(req);
-out:
-        if (rc && !*ea)
-                obd_free_memmd(exp, &lsm);
-        RETURN(rc);
-}
-
-static int osc_punch_interpret(struct ptlrpc_request *req,
-                               struct osc_async_args *aa, int rc)
-{
-        struct ost_body *body;
-        ENTRY;
-
-        if (rc != 0)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof (*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR ("can't unpack ost_body\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        memcpy(aa->aa_oi->oi_oa, &body->oa, sizeof(*aa->aa_oi->oi_oa));
-out:
-        rc = aa->aa_oi->oi_cb_up(aa->aa_oi, rc);
-        RETURN(rc);
-}
-
-static int osc_punch(struct obd_export *exp, struct obd_info *oinfo,
-                     struct obd_trans_info *oti,
-                     struct ptlrpc_request_set *rqset)
-{
-        struct ptlrpc_request *req;
-        struct osc_async_args *aa;
-        struct ost_body *body;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        if (!oinfo->oi_oa) {
-                CERROR("oa NULL\n");
-                RETURN(-EINVAL);
-        }
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_PUNCH, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        req->rq_request_portal = OST_IO_PORTAL;         /* bug 7198 */
-        ptlrpc_at_set_req_timeout(req);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->oa, oinfo->oi_oa, sizeof(*oinfo->oi_oa));
-
-        /* overload the size and blocks fields in the oa with start/end */
-        body->oa.o_size = oinfo->oi_policy.l_extent.start;
-        body->oa.o_blocks = oinfo->oi_policy.l_extent.end;
-        body->oa.o_valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        req->rq_interpret_reply = osc_punch_interpret;
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct osc_async_args *)&req->rq_async_args;
-        aa->aa_oi = oinfo;
-        ptlrpc_set_add_req(rqset, req);
-
-        RETURN(0);
-}
-
-static int osc_sync(struct obd_export *exp, struct obdo *oa,
-                    struct lov_stripe_md *md, obd_size start, obd_size end)
-{
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        if (!oa) {
-                CERROR("oa NULL\n");
-                RETURN(-EINVAL);
-        }
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_SYNC, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        memcpy(&body->oa, oa, sizeof(*oa));
-
-        /* overload the size and blocks fields in the oa with start/end */
-        body->oa.o_size = start;
-        body->oa.o_blocks = end;
-        body->oa.o_valid |= (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR ("can't unpack ost_body\n");
-                GOTO (out, rc = -EPROTO);
-        }
-
-        memcpy(oa, &body->oa, sizeof(*oa));
-
-        EXIT;
- out:
-        ptlrpc_req_finished(req);
-        return rc;
-}
-
-/* Find and cancel locally locks matched by @mode in the resource found by
- * @objid. Found locks are added into @cancel list. Returns the amount of
- * locks added to @cancels list. */
-static int osc_resource_get_unused(struct obd_export *exp, __u64 objid,
-                                   struct list_head *cancels, ldlm_mode_t mode,
-                                   int lock_flags)
-{
-        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
-        struct ldlm_res_id res_id = { .name = { objid } };
-        struct ldlm_resource *res = ldlm_resource_get(ns, NULL, res_id, 0, 0);
-        int count;
-        ENTRY;
-
-        if (res == NULL)
-                RETURN(0);
-
-        count = ldlm_cancel_resource_local(res, cancels, NULL, mode,
-                                           lock_flags, 0, NULL);
-        ldlm_resource_putref(res);
-        RETURN(count);
-}
-
-static int osc_destroy_interpret(struct ptlrpc_request *req, void *data,
-                                 int rc)
-{
-        struct client_obd *cli = &req->rq_import->imp_obd->u.cli;
-
-        atomic_dec(&cli->cl_destroy_in_flight);
-        cfs_waitq_signal(&cli->cl_destroy_waitq);
-        return 0;
-}
-
-static int osc_can_send_destroy(struct client_obd *cli)
-{
-        if (atomic_inc_return(&cli->cl_destroy_in_flight) <=
-            cli->cl_max_rpcs_in_flight) {
-                /* The destroy request can be sent */
-                return 1;
-        }
-        if (atomic_dec_return(&cli->cl_destroy_in_flight) <
-            cli->cl_max_rpcs_in_flight) {
-                /*
-                 * The counter has been modified between the two atomic
-                 * operations.
-                 */
-                cfs_waitq_signal(&cli->cl_destroy_waitq);
-        }
-        return 0;
-}
-
-/* Destroy requests can be async always on the client, and we don't even really
- * care about the return code since the client cannot do anything at all about
- * a destroy failure.
- * When the MDS is unlinking a filename, it saves the file objects into a
- * recovery llog, and these object records are cancelled when the OST reports
- * they were destroyed and sync'd to disk (i.e. transaction committed).
- * If the client dies, or the OST is down when the object should be destroyed,
- * the records are not cancelled, and when the OST reconnects to the MDS next,
- * it will retrieve the llog unlink logs and then sends the log cancellation
- * cookies to the MDS after committing destroy transactions. */
-static int osc_destroy(struct obd_export *exp, struct obdo *oa,
-                       struct lov_stripe_md *ea, struct obd_trans_info *oti,
-                       struct obd_export *md_export)
-{
-        CFS_LIST_HEAD(cancels);
-        struct ptlrpc_request *req;
-        struct ost_body *body;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body),
-                        sizeof(struct ldlm_request) };
-        int count, bufcount = 2;
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        ENTRY;
-
-        if (!oa) {
-                CERROR("oa NULL\n");
-                RETURN(-EINVAL);
-        }
-
-        LASSERT(oa->o_id != 0);
-
-        count = osc_resource_get_unused(exp, oa->o_id, &cancels, LCK_PW,
-                                        LDLM_FL_DISCARD_DATA);
-        if (exp_connect_cancelset(exp))
-                bufcount = 3;
-        req = ldlm_prep_elc_req(exp, LUSTRE_OST_VERSION, OST_DESTROY, bufcount,
-                                size, REQ_REC_OFF + 1, 0, &cancels, count);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        req->rq_request_portal = OST_IO_PORTAL;         /* bug 7198 */
-        req->rq_interpret_reply = osc_destroy_interpret;
-        ptlrpc_at_set_req_timeout(req);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-
-        if (oti != NULL && oa->o_valid & OBD_MD_FLCOOKIE) {
-                memcpy(obdo_logcookie(oa), oti->oti_logcookies,
-                       sizeof(*oti->oti_logcookies));
-        }
-
-        memcpy(&body->oa, oa, sizeof(*oa));
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        if (!osc_can_send_destroy(cli)) {
-                struct l_wait_info lwi = { 0 };
-
-                /*
-                 * Wait until the number of on-going destroy RPCs drops
-                 * under max_rpc_in_flight
-                 */
-                l_wait_event_exclusive(cli->cl_destroy_waitq,
-                                       osc_can_send_destroy(cli), &lwi);
-        }
-
-        /* Do not wait for response */
-        ptlrpcd_add_req(req);
-        RETURN(0);
-}
-
-static void osc_announce_cached(struct client_obd *cli, struct obdo *oa,
-                                long writing_bytes)
-{
-        obd_flag bits = OBD_MD_FLBLOCKS|OBD_MD_FLGRANT;
-
-        LASSERT(!(oa->o_valid & bits));
-
-        oa->o_valid |= bits;
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        oa->o_dirty = cli->cl_dirty;
-        if (cli->cl_dirty > cli->cl_dirty_max) {
-                CERROR("dirty %lu > dirty_max %lu\n",
-                       cli->cl_dirty, cli->cl_dirty_max);
-                oa->o_undirty = 0;
-        } else if (atomic_read(&obd_dirty_pages) > obd_max_dirty_pages) {
-                CERROR("dirty %d > system dirty_max %d\n",
-                       atomic_read(&obd_dirty_pages), obd_max_dirty_pages);
-                oa->o_undirty = 0;
-        } else if (cli->cl_dirty_max - cli->cl_dirty > 0x7fffffff) {
-                CERROR("dirty %lu - dirty_max %lu too big???\n",
-                       cli->cl_dirty, cli->cl_dirty_max);
-                oa->o_undirty = 0;
-        } else {
-                long max_in_flight = (cli->cl_max_pages_per_rpc << CFS_PAGE_SHIFT)*
-                                (cli->cl_max_rpcs_in_flight + 1);
-                oa->o_undirty = max(cli->cl_dirty_max, max_in_flight);
-        }
-        oa->o_grant = cli->cl_avail_grant;
-        oa->o_dropped = cli->cl_lost_grant;
-        cli->cl_lost_grant = 0;
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        CDEBUG(D_CACHE,"dirty: "LPU64" undirty: %u dropped %u grant: "LPU64"\n",
-               oa->o_dirty, oa->o_undirty, oa->o_dropped, oa->o_grant);
-}
-
-/* caller must hold loi_list_lock */
-static void osc_consume_write_grant(struct client_obd *cli,struct brw_page *pga)
-{
-        atomic_inc(&obd_dirty_pages);
-        cli->cl_dirty += CFS_PAGE_SIZE;
-        cli->cl_avail_grant -= CFS_PAGE_SIZE;
-        pga->flag |= OBD_BRW_FROM_GRANT;
-        CDEBUG(D_CACHE, "using %lu grant credits for brw %p page %p\n",
-               CFS_PAGE_SIZE, pga, pga->pg);
-        LASSERTF(cli->cl_avail_grant >= 0, "invalid avail grant is %ld \n",
-                 cli->cl_avail_grant);
-}
-
-/* the companion to osc_consume_write_grant, called when a brw has completed.
- * must be called with the loi lock held. */
-static void osc_release_write_grant(struct client_obd *cli,
-                                    struct brw_page *pga, int sent)
-{
-        int blocksize = cli->cl_import->imp_obd->obd_osfs.os_bsize ? : 4096;
-        ENTRY;
-
-        if (!(pga->flag & OBD_BRW_FROM_GRANT)) {
-                EXIT;
-                return;
-        }
-
-        pga->flag &= ~OBD_BRW_FROM_GRANT;
-        atomic_dec(&obd_dirty_pages);
-        cli->cl_dirty -= CFS_PAGE_SIZE;
-        if (!sent) {
-                cli->cl_lost_grant += CFS_PAGE_SIZE;
-                CDEBUG(D_CACHE, "lost grant: %lu avail grant: %lu dirty: %lu\n",
-                       cli->cl_lost_grant, cli->cl_avail_grant, cli->cl_dirty);
-        } else if (CFS_PAGE_SIZE != blocksize && pga->count != CFS_PAGE_SIZE) {
-                /* For short writes we shouldn't count parts of pages that
-                 * span a whole block on the OST side, or our accounting goes
-                 * wrong.  Should match the code in filter_grant_check. */
-                int offset = pga->off & ~CFS_PAGE_MASK;
-                int count = pga->count + (offset & (blocksize - 1));
-                int end = (offset + pga->count) & (blocksize - 1);
-                if (end)
-                        count += blocksize - end;
-
-                cli->cl_lost_grant += CFS_PAGE_SIZE - count;
-                CDEBUG(D_CACHE, "lost %lu grant: %lu avail: %lu dirty: %lu\n",
-                       CFS_PAGE_SIZE - count, cli->cl_lost_grant,
-                       cli->cl_avail_grant, cli->cl_dirty);
-        }
-
-        EXIT;
-}
-
-static unsigned long rpcs_in_flight(struct client_obd *cli)
-{
-        return cli->cl_r_in_flight + cli->cl_w_in_flight;
-}
-
-/* caller must hold loi_list_lock */
-void osc_wake_cache_waiters(struct client_obd *cli)
-{
-        struct list_head *l, *tmp;
-        struct osc_cache_waiter *ocw;
-
-        ENTRY;
-        list_for_each_safe(l, tmp, &cli->cl_cache_waiters) {
-                /* if we can't dirty more, we must wait until some is written */
-                if ((cli->cl_dirty + CFS_PAGE_SIZE > cli->cl_dirty_max) ||
-                   ((atomic_read(&obd_dirty_pages)+1)>(obd_max_dirty_pages))) {
-                        CDEBUG(D_CACHE, "no dirty room: dirty: %ld "
-                               "osc max %ld, sys max %d\n", cli->cl_dirty,
-                               cli->cl_dirty_max, obd_max_dirty_pages);
-                        return;
-                }
-
-                /* if still dirty cache but no grant wait for pending RPCs that
-                 * may yet return us some grant before doing sync writes */
-                if (cli->cl_w_in_flight && cli->cl_avail_grant < CFS_PAGE_SIZE) {
-                        CDEBUG(D_CACHE, "%u BRW writes in flight, no grant\n",
-                               cli->cl_w_in_flight);
-                        return;
-                }
-
-                ocw = list_entry(l, struct osc_cache_waiter, ocw_entry);
-                list_del_init(&ocw->ocw_entry);
-                if (cli->cl_avail_grant < CFS_PAGE_SIZE) {
-                        /* no more RPCs in flight to return grant, do sync IO */
-                        ocw->ocw_rc = -EDQUOT;
-                        CDEBUG(D_INODE, "wake oap %p for sync\n", ocw->ocw_oap);
-                } else {
-                        osc_consume_write_grant(cli,
-                                                &ocw->ocw_oap->oap_brw_page);
-                }
-
-                cfs_waitq_signal(&ocw->ocw_waitq);
-        }
-
-        EXIT;
-}
-
-static void osc_init_grant(struct client_obd *cli, struct obd_connect_data *ocd)
-{
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        cli->cl_avail_grant = ocd->ocd_grant;
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        CDEBUG(D_CACHE, "setting cl_avail_grant: %ld cl_lost_grant: %ld\n",
-               cli->cl_avail_grant, cli->cl_lost_grant);
-        LASSERT(cli->cl_avail_grant >= 0);
-}
-
-static void osc_update_grant(struct client_obd *cli, struct ost_body *body)
-{
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        CDEBUG(D_CACHE, "got "LPU64" extra grant\n", body->oa.o_grant);
-        if (body->oa.o_valid & OBD_MD_FLGRANT)
-                cli->cl_avail_grant += body->oa.o_grant;
-        /* waiters are woken in brw_interpret_oap */
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-}
-
-/* We assume that the reason this OSC got a short read is because it read
- * beyond the end of a stripe file; i.e. lustre is reading a sparse file
- * via the LOV, and it _knows_ it's reading inside the file, it's just that
- * this stripe never got written at or beyond this stripe offset yet. */
-static void handle_short_read(int nob_read, obd_count page_count,
-                              struct brw_page **pga)
-{
-        char *ptr;
-        int i = 0;
-
-        /* skip bytes read OK */
-        while (nob_read > 0) {
-                LASSERT (page_count > 0);
-
-                if (pga[i]->count > nob_read) {
-                        /* EOF inside this page */
-                        ptr = cfs_kmap(pga[i]->pg) + 
-                                (pga[i]->off & ~CFS_PAGE_MASK);
-                        memset(ptr + nob_read, 0, pga[i]->count - nob_read);
-                        cfs_kunmap(pga[i]->pg);
-                        page_count--;
-                        i++;
-                        break;
-                }
-
-                nob_read -= pga[i]->count;
-                page_count--;
-                i++;
-        }
-
-        /* zero remaining pages */
-        while (page_count-- > 0) {
-                ptr = cfs_kmap(pga[i]->pg) + (pga[i]->off & ~CFS_PAGE_MASK);
-                memset(ptr, 0, pga[i]->count);
-                cfs_kunmap(pga[i]->pg);
-                i++;
-        }
-}
-
-static int check_write_rcs(struct ptlrpc_request *req,
-                           int requested_nob, int niocount,
-                           obd_count page_count, struct brw_page **pga)
-{
-        int    *remote_rcs, i;
-
-        /* return error if any niobuf was in error */
-        remote_rcs = lustre_swab_repbuf(req, REQ_REC_OFF + 1,
-                                        sizeof(*remote_rcs) * niocount, NULL);
-        if (remote_rcs == NULL) {
-                CERROR("Missing/short RC vector on BRW_WRITE reply\n");
-                return(-EPROTO);
-        }
-        if (lustre_msg_swabbed(req->rq_repmsg))
-                for (i = 0; i < niocount; i++)
-                        __swab32s(&remote_rcs[i]);
-
-        for (i = 0; i < niocount; i++) {
-                if (remote_rcs[i] < 0)
-                        return(remote_rcs[i]);
-
-                if (remote_rcs[i] != 0) {
-                        CERROR("rc[%d] invalid (%d) req %p\n",
-                                i, remote_rcs[i], req);
-                        return(-EPROTO);
-                }
-        }
-
-        if (req->rq_bulk->bd_nob_transferred != requested_nob) {
-                CERROR("Unexpected # bytes transferred: %d (requested %d)\n",
-                       requested_nob, req->rq_bulk->bd_nob_transferred);
-                return(-EPROTO);
-        }
-
-        return (0);
-}
-
-static inline int can_merge_pages(struct brw_page *p1, struct brw_page *p2)
-{
-        if (p1->flag != p2->flag) {
-                unsigned mask = ~OBD_BRW_FROM_GRANT;
-
-                /* warn if we try to combine flags that we don't know to be
-                 * safe to combine */
-                if ((p1->flag & mask) != (p2->flag & mask))
-                        CERROR("is it ok to have flags 0x%x and 0x%x in the "
-                               "same brw?\n", p1->flag, p2->flag);
-                return 0;
-        }
-
-        return (p1->off + p1->count == p2->off);
-}
-
-static obd_count osc_checksum_bulk(int nob, obd_count pg_count,
-                                   struct brw_page **pga, int opc,
-                                   cksum_type_t cksum_type)
-{
-        __u32 cksum;
-        int i = 0;
-
-        LASSERT (pg_count > 0);
-        cksum = init_checksum(cksum_type);
-        while (nob > 0 && pg_count > 0) {
-                unsigned char *ptr = cfs_kmap(pga[i]->pg);
-                int off = pga[i]->off & ~CFS_PAGE_MASK;
-                int count = pga[i]->count > nob ? nob : pga[i]->count;
-
-                /* corrupt the data before we compute the checksum, to
-                 * simulate an OST->client data error */
-                if (i == 0 && opc == OST_READ &&
-                    OBD_FAIL_CHECK_ONCE(OBD_FAIL_OSC_CHECKSUM_RECEIVE))
-                        memcpy(ptr + off, "bad1", min(4, nob));
-                cksum = compute_checksum(cksum, ptr + off, count, cksum_type);
-                cfs_kunmap(pga[i]->pg);
-                LL_CDEBUG_PAGE(D_PAGE, pga[i]->pg, "off %d checksum %x\n",
-                               off, cksum);
-
-                nob -= pga[i]->count;
-                pg_count--;
-                i++;
-        }
-        /* For sending we only compute the wrong checksum instead
-         * of corrupting the data so it is still correct on a redo */
-        if (opc == OST_WRITE && OBD_FAIL_CHECK_ONCE(OBD_FAIL_OSC_CHECKSUM_SEND))
-                cksum++;
-
-        return cksum;
-}
-
-static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
-                                struct lov_stripe_md *lsm, obd_count page_count,
-                                struct brw_page **pga,
-                                struct ptlrpc_request **reqp)
-{
-        struct ptlrpc_request   *req;
-        struct ptlrpc_bulk_desc *desc;
-        struct ost_body         *body;
-        struct obd_ioobj        *ioobj;
-        struct niobuf_remote    *niobuf;
-        int size[4] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int niocount, i, requested_nob, opc, rc;
-        struct ptlrpc_request_pool *pool;
-        struct osc_brw_async_args *aa;
-        struct brw_page *pg_prev;
-
-        ENTRY;
-        OBD_FAIL_RETURN(OBD_FAIL_OSC_BRW_PREP_REQ, -ENOMEM); /* Recoverable */
-        OBD_FAIL_RETURN(OBD_FAIL_OSC_BRW_PREP_REQ2, -EINVAL); /* Fatal */
-
-        opc = ((cmd & OBD_BRW_WRITE) != 0) ? OST_WRITE : OST_READ;
-        pool = ((cmd & OBD_BRW_WRITE) != 0) ? cli->cl_import->imp_rq_pool :NULL;
-
-        for (niocount = i = 1; i < page_count; i++) {
-                if (!can_merge_pages(pga[i - 1], pga[i]))
-                        niocount++;
-        }
-
-        size[REQ_REC_OFF + 1] = sizeof(*ioobj);
-        size[REQ_REC_OFF + 2] = niocount * sizeof(*niobuf);
-
-        req = ptlrpc_prep_req_pool(cli->cl_import, LUSTRE_OST_VERSION, opc, 4, size,
-                                   NULL, pool);
-        if (req == NULL)
-                RETURN (-ENOMEM);
-
-        req->rq_request_portal = OST_IO_PORTAL;         /* bug 7198 */
-        ptlrpc_at_set_req_timeout(req);
-
-        if (opc == OST_WRITE)
-                desc = ptlrpc_prep_bulk_imp (req, page_count,
-                                             BULK_GET_SOURCE, OST_BULK_PORTAL);
-        else
-                desc = ptlrpc_prep_bulk_imp (req, page_count,
-                                             BULK_PUT_SINK, OST_BULK_PORTAL);
-        if (desc == NULL)
-                GOTO(out, rc = -ENOMEM);
-        /* NB request now owns desc and will free it when it gets freed */
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        ioobj = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, sizeof(*ioobj));
-        niobuf = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                                niocount * sizeof(*niobuf));
-
-        memcpy(&body->oa, oa, sizeof(*oa));
-
-        obdo_to_ioobj(oa, ioobj);
-        ioobj->ioo_bufcnt = niocount;
-
-        LASSERT (page_count > 0);
-        pg_prev = pga[0];
-        for (requested_nob = i = 0; i < page_count; i++, niobuf++) {
-                struct brw_page *pg = pga[i];
-
-                LASSERT(pg->count > 0);
-                LASSERTF((pg->off & ~CFS_PAGE_MASK) + pg->count <= CFS_PAGE_SIZE,
-                         "i: %d pg: %p off: "LPU64", count: %u\n", i, pg,
-                         pg->off, pg->count);
-#ifdef __linux__
-                LASSERTF(i == 0 || pg->off > pg_prev->off,
-                         "i %d p_c %u pg %p [pri %lu ind %lu] off "LPU64
-                         " prev_pg %p [pri %lu ind %lu] off "LPU64"\n",
-                         i, page_count,
-                         pg->pg, page_private(pg->pg), pg->pg->index, pg->off,
-                         pg_prev->pg, page_private(pg_prev->pg),
-                         pg_prev->pg->index, pg_prev->off);
-#else
-                LASSERTF(i == 0 || pg->off > pg_prev->off,
-                         "i %d p_c %u\n", i, page_count);
-#endif
-                LASSERT((pga[0]->flag & OBD_BRW_SRVLOCK) ==
-                        (pg->flag & OBD_BRW_SRVLOCK));
-
-                ptlrpc_prep_bulk_page(desc, pg->pg, pg->off & ~CFS_PAGE_MASK,
-                                      pg->count);
-                requested_nob += pg->count;
-
-                if (i > 0 && can_merge_pages(pg_prev, pg)) {
-                        niobuf--;
-                        niobuf->len += pg->count;
-                } else {
-                        niobuf->offset = pg->off;
-                        niobuf->len    = pg->count;
-                        niobuf->flags  = pg->flag;
-                }
-                pg_prev = pg;
-        }
-
-        LASSERTF((void *)(niobuf - niocount) ==
-                lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 2,
-                               niocount * sizeof(*niobuf)),
-                "want %p - real %p\n", lustre_msg_buf(req->rq_reqmsg, 
-                REQ_REC_OFF + 2, niocount * sizeof(*niobuf)), 
-                (void *)(niobuf - niocount));
-
-        osc_announce_cached(cli, &body->oa, opc == OST_WRITE ? requested_nob:0);
-
-        /* size[REQ_REC_OFF] still sizeof (*body) */
-        if (opc == OST_WRITE) {
-                if (cli->cl_checksum) {
-                        /* store cl_cksum_type in a local variable since
-                         * it can be changed via lprocfs */
-                        cksum_type_t cksum_type = cli->cl_cksum_type;
-
-                        if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0)
-                                oa->o_flags = body->oa.o_flags = 0;
-                        body->oa.o_flags |= cksum_type_pack(cksum_type);
-                        body->oa.o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
-                        body->oa.o_cksum = osc_checksum_bulk(requested_nob,
-                                                             page_count, pga,
-                                                             OST_WRITE,
-                                                             cksum_type);
-                        CDEBUG(D_PAGE, "checksum at write origin: %x\n",
-                               body->oa.o_cksum);
-                        /* save this in 'oa', too, for later checking */
-                        oa->o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
-                        oa->o_flags |= cksum_type_pack(cksum_type);
-                } else {
-                        /* clear out the checksum flag, in case this is a
-                         * resend but cl_checksum is no longer set. b=11238 */
-                        oa->o_valid &= ~OBD_MD_FLCKSUM;
-                }
-                oa->o_cksum = body->oa.o_cksum;
-                /* 1 RC per niobuf */
-                size[REPLY_REC_OFF + 1] = sizeof(__u32) * niocount;
-                ptlrpc_req_set_repsize(req, 3, size);
-        } else {
-                if (cli->cl_checksum) {
-                        if ((body->oa.o_valid & OBD_MD_FLFLAGS) == 0)
-                                body->oa.o_flags = 0;
-                        body->oa.o_flags |= cksum_type_pack(cli->cl_cksum_type);
-                        body->oa.o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
-                }
-                /* 1 RC for the whole I/O */
-                ptlrpc_req_set_repsize(req, 2, size);
-        }
-
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct osc_brw_async_args *)&req->rq_async_args;
-        aa->aa_oa = oa;
-        aa->aa_requested_nob = requested_nob;
-        aa->aa_nio_count = niocount;
-        aa->aa_page_count = page_count;
-        aa->aa_resends = 0;
-        aa->aa_ppga = pga;
-        aa->aa_cli = cli;
-        CFS_INIT_LIST_HEAD(&aa->aa_oaps);
-
-        *reqp = req;
-        RETURN (0);
-
- out:
-        ptlrpc_req_finished (req);
-        RETURN (rc);
-}
-
-static int check_write_checksum(struct obdo *oa, const lnet_process_id_t *peer,
-                                __u32 client_cksum, __u32 server_cksum, int nob,
-                                obd_count page_count, struct brw_page **pga,
-                                cksum_type_t client_cksum_type)
-{
-        __u32 new_cksum;
-        char *msg;
-        cksum_type_t cksum_type;
-
-        if (server_cksum == client_cksum) {
-                CDEBUG(D_PAGE, "checksum %x confirmed\n", client_cksum);
-                return 0;
-        }
-
-        if (oa->o_valid & OBD_MD_FLFLAGS)
-                cksum_type = cksum_type_unpack(oa->o_flags);
-        else
-                cksum_type = OBD_CKSUM_CRC32;
-
-        new_cksum = osc_checksum_bulk(nob, page_count, pga, OST_WRITE,
-                                      cksum_type);
-
-        if (cksum_type != client_cksum_type)
-                msg = "the server did not use the checksum type specified in "
-                      "the original request - likely a protocol problem";
-        else if (new_cksum == server_cksum)
-                msg = "changed on the client after we checksummed it - "
-                      "likely false positive due to mmap IO (bug 11742)";
-        else if (new_cksum == client_cksum)
-                msg = "changed in transit before arrival at OST";
-        else
-                msg = "changed in transit AND doesn't match the original - "
-                      "likely false positive due to mmap IO (bug 11742)";
-
-        LCONSOLE_ERROR_MSG(0x132, "BAD WRITE CHECKSUM: %s: from %s inum "
-                           LPU64"/"LPU64" object "LPU64"/"LPU64" extent "
-                           "["LPU64"-"LPU64"]\n",
-                           msg, libcfs_nid2str(peer->nid),
-                           oa->o_valid & OBD_MD_FLFID ? oa->o_fid : (__u64)0,
-                           oa->o_valid & OBD_MD_FLFID ? oa->o_generation : 
-                                                        (__u64)0,
-                           oa->o_id,
-                           oa->o_valid & OBD_MD_FLGROUP ? oa->o_gr : (__u64)0,
-                           pga[0]->off,
-                           pga[page_count-1]->off + pga[page_count-1]->count - 1);
-        CERROR("original client csum %x (type %x), server csum %x (type %x), "
-               "client csum now %x\n", client_cksum, client_cksum_type,
-               server_cksum, cksum_type, new_cksum);
-
-        return 1;
-}
-
-/* Note rc enters this function as number of bytes transferred */
-static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
-{
-        struct osc_brw_async_args *aa = (void *)&req->rq_async_args;
-        const lnet_process_id_t *peer =
-                        &req->rq_import->imp_connection->c_peer;
-        struct client_obd *cli = aa->aa_cli;
-        struct ost_body *body;
-        __u32 client_cksum = 0;
-        ENTRY;
-
-        if (rc < 0 && rc != -EDQUOT)
-                RETURN(rc);
-
-        LASSERTF(req->rq_repmsg != NULL, "rc = %d\n", rc);
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack body\n");
-                RETURN(-EPROTO);
-        }
-
-        /* set/clear over quota flag for a uid/gid */
-        if (lustre_msg_get_opc(req->rq_reqmsg) == OST_WRITE &&
-            body->oa.o_valid & (OBD_MD_FLUSRQUOTA | OBD_MD_FLGRPQUOTA))
-                lquota_setdq(quota_interface, cli, body->oa.o_uid,
-                             body->oa.o_gid, body->oa.o_valid,
-                             body->oa.o_flags);
-
-        if (rc < 0)
-                RETURN(rc);
-
-        if (aa->aa_oa->o_valid & OBD_MD_FLCKSUM)
-                client_cksum = aa->aa_oa->o_cksum; /* save for later */
-
-        osc_update_grant(cli, body);
-
-        if (lustre_msg_get_opc(req->rq_reqmsg) == OST_WRITE) {
-                if (rc > 0) {
-                        CERROR ("Unexpected +ve rc %d\n", rc);
-                        RETURN(-EPROTO);
-                }
-                LASSERT(req->rq_bulk->bd_nob == aa->aa_requested_nob);
-
-                if ((aa->aa_oa->o_valid & OBD_MD_FLCKSUM) && client_cksum &&
-                    check_write_checksum(&body->oa, peer, client_cksum,
-                                         body->oa.o_cksum, aa->aa_requested_nob,
-                                         aa->aa_page_count, aa->aa_ppga,
-                                         cksum_type_unpack(aa->aa_oa->o_flags)))
-                        RETURN(-EAGAIN);
-
-                rc = check_write_rcs(req, aa->aa_requested_nob,aa->aa_nio_count,
-                                     aa->aa_page_count, aa->aa_ppga);
-                GOTO(out, rc);
-        }
-
-        /* The rest of this function executes only for OST_READs */
-        if (rc > aa->aa_requested_nob) {
-                CERROR("Unexpected rc %d (%d requested)\n", rc,
-                       aa->aa_requested_nob);
-                RETURN(-EPROTO);
-        }
-
-        if (rc != req->rq_bulk->bd_nob_transferred) {
-                CERROR ("Unexpected rc %d (%d transferred)\n",
-                        rc, req->rq_bulk->bd_nob_transferred);
-                return (-EPROTO);
-        }
-
-        if (rc < aa->aa_requested_nob)
-                handle_short_read(rc, aa->aa_page_count, aa->aa_ppga);
-
-        if (body->oa.o_valid & OBD_MD_FLCKSUM) {
-                static int cksum_counter;
-                __u32      server_cksum = body->oa.o_cksum;
-                char      *via;
-                char      *router;
-                cksum_type_t cksum_type;
-
-                if (body->oa.o_valid & OBD_MD_FLFLAGS)
-                        cksum_type = cksum_type_unpack(body->oa.o_flags);
-                else
-                        cksum_type = OBD_CKSUM_CRC32;
-                client_cksum = osc_checksum_bulk(rc, aa->aa_page_count,
-                                                 aa->aa_ppga, OST_READ,
-                                                 cksum_type);
-
-                if (peer->nid == req->rq_bulk->bd_sender) {
-                        via = router = "";
-                } else {
-                        via = " via ";
-                        router = libcfs_nid2str(req->rq_bulk->bd_sender);
-                }
-
-                if (server_cksum == ~0 && rc > 0) {
-                        CERROR("Protocol error: server %s set the 'checksum' "
-                               "bit, but didn't send a checksum.  Not fatal, "
-                               "but please tell CFS.\n",
-                               libcfs_nid2str(peer->nid));
-                } else if (server_cksum != client_cksum) {
-                        LCONSOLE_ERROR_MSG(0x133, "%s: BAD READ CHECKSUM: from "
-                                           "%s%s%s inum "LPU64"/"LPU64" object "
-                                           LPU64"/"LPU64" extent "
-                                           "["LPU64"-"LPU64"]\n",
-                                           req->rq_import->imp_obd->obd_name,
-                                           libcfs_nid2str(peer->nid),
-                                           via, router,
-                                           body->oa.o_valid & OBD_MD_FLFID ?
-                                                body->oa.o_fid : (__u64)0,
-                                           body->oa.o_valid & OBD_MD_FLFID ?
-                                                body->oa.o_generation :(__u64)0,
-                                           body->oa.o_id,
-                                           body->oa.o_valid & OBD_MD_FLGROUP ?
-                                                body->oa.o_gr : (__u64)0,
-                                           aa->aa_ppga[0]->off,
-                                           aa->aa_ppga[aa->aa_page_count-1]->off +
-                                           aa->aa_ppga[aa->aa_page_count-1]->count -
-                                                                        1);
-                        CERROR("client %x, server %x, cksum_type %x\n",
-                               client_cksum, server_cksum, cksum_type);
-                        cksum_counter = 0;
-                        aa->aa_oa->o_cksum = client_cksum;
-                        rc = -EAGAIN;
-                } else {
-                        cksum_counter++;
-                        CDEBUG(D_PAGE, "checksum %x confirmed\n", client_cksum);
-                        rc = 0;
-                }
-        } else if (unlikely(client_cksum)) {
-                static int cksum_missed;
-
-                cksum_missed++;
-                if ((cksum_missed & (-cksum_missed)) == cksum_missed)
-                        CERROR("Checksum %u requested from %s but not sent\n",
-                               cksum_missed, libcfs_nid2str(peer->nid));
-        } else {
-                rc = 0;
-        }
-out:
-        if (rc >= 0)
-                memcpy(aa->aa_oa, &body->oa, sizeof(*aa->aa_oa));
-
-        RETURN(rc);
-}
-
-static int osc_brw_internal(int cmd, struct obd_export *exp,struct obdo *oa,
-                            struct lov_stripe_md *lsm,
-                            obd_count page_count, struct brw_page **pga)
-{
-        struct ptlrpc_request *request;
-        int                    rc;
-        cfs_waitq_t            waitq;
-        int                    resends = 0;
-        struct l_wait_info     lwi;
-
-        ENTRY;
-        init_waitqueue_head(&waitq);
-
-restart_bulk:
-        rc = osc_brw_prep_request(cmd, &exp->exp_obd->u.cli, oa, lsm,
-                                  page_count, pga, &request);
-        if (rc != 0)
-                return (rc);
-
-        rc = ptlrpc_queue_wait(request);
-
-        if (rc == -ETIMEDOUT && request->rq_resend) {
-                DEBUG_REQ(D_HA, request,  "BULK TIMEOUT");
-                ptlrpc_req_finished(request);
-                goto restart_bulk;
-        }
-
-        rc = osc_brw_fini_request(request, rc);
-
-        ptlrpc_req_finished(request);
-        if (osc_recoverable_error(rc)) {
-                resends++;
-                if (!osc_should_resend(resends, &exp->exp_obd->u.cli)) {
-                        CERROR("too many resend retries, returning error\n");
-                        RETURN(-EIO);
-                }
-
-                lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(resends), NULL, NULL, NULL);
-                l_wait_event(waitq, 0, &lwi);
-
-                goto restart_bulk;
-        }
-        RETURN(rc);
-}
-
-int osc_brw_redo_request(struct ptlrpc_request *request,
-                         struct osc_brw_async_args *aa)
-{
-        struct ptlrpc_request *new_req;
-        struct ptlrpc_request_set *set = request->rq_set;
-        struct osc_brw_async_args *new_aa;
-        struct osc_async_page *oap;
-        int rc = 0;
-        ENTRY;
-
-        if (!osc_should_resend(aa->aa_resends, aa->aa_cli)) {
-                CERROR("too many resend retries, returning error\n");
-                RETURN(-EIO);
-        }
-
-        DEBUG_REQ(D_ERROR, request, "redo for recoverable error");
-
-        rc = osc_brw_prep_request(lustre_msg_get_opc(request->rq_reqmsg) ==
-                                        OST_WRITE ? OBD_BRW_WRITE :OBD_BRW_READ,
-                                  aa->aa_cli, aa->aa_oa,
-                                  NULL /* lsm unused by osc currently */,
-                                  aa->aa_page_count, aa->aa_ppga, &new_req);
-        if (rc)
-                RETURN(rc);
-
-        client_obd_list_lock(&aa->aa_cli->cl_loi_list_lock);
-
-        list_for_each_entry(oap, &aa->aa_oaps, oap_rpc_item) {
-                if (oap->oap_request != NULL) {
-                        LASSERTF(request == oap->oap_request,
-                                 "request %p != oap_request %p\n",
-                                 request, oap->oap_request);
-                        if (oap->oap_interrupted) {
-                                client_obd_list_unlock(&aa->aa_cli->cl_loi_list_lock);
-                                ptlrpc_req_finished(new_req);
-                                RETURN(-EINTR);
-                        }
-                }
-        }
-        /* New request takes over pga and oaps from old request.
-         * Note that copying a list_head doesn't work, need to move it... */
-        aa->aa_resends++;
-        new_req->rq_interpret_reply = request->rq_interpret_reply;
-        new_req->rq_async_args = request->rq_async_args;
-        new_req->rq_sent = CURRENT_SECONDS + aa->aa_resends;
-
-        new_aa = (struct osc_brw_async_args *)&new_req->rq_async_args;
-
-        CFS_INIT_LIST_HEAD(&new_aa->aa_oaps);
-        list_splice(&aa->aa_oaps, &new_aa->aa_oaps);
-        CFS_INIT_LIST_HEAD(&aa->aa_oaps);
-
-        list_for_each_entry(oap, &new_aa->aa_oaps, oap_rpc_item) {
-                if (oap->oap_request) {
-                        ptlrpc_req_finished(oap->oap_request);
-                        oap->oap_request = ptlrpc_request_addref(new_req);
-                }
-        }
-
-        /* use ptlrpc_set_add_req is safe because interpret functions work 
-         * in check_set context. only one way exist with access to request 
-         * from different thread got -EINTR - this way protected with 
-         * cl_loi_list_lock */
-        ptlrpc_set_add_req(set, new_req);
-
-        client_obd_list_unlock(&aa->aa_cli->cl_loi_list_lock);
-
-        DEBUG_REQ(D_INFO, new_req, "new request");
-        RETURN(0);
-}
-
-static int brw_interpret(struct ptlrpc_request *request, void *data, int rc)
-{
-        struct osc_brw_async_args *aa = data;
-        int                        i;
-        ENTRY;
-
-        rc = osc_brw_fini_request(request, rc);
-        CDEBUG(D_INODE, "request %p aa %p rc %d\n", request, aa, rc);	
-        if (osc_recoverable_error(rc)) {
-                rc = osc_brw_redo_request(request, aa);
-                if (rc == 0)
-                        RETURN(0);
-        }
-        client_obd_list_lock(&aa->aa_cli->cl_loi_list_lock);
-        if (lustre_msg_get_opc(request->rq_reqmsg) == OST_WRITE)
-                aa->aa_cli->cl_w_in_flight--;
-        else
-                aa->aa_cli->cl_r_in_flight--;
-
-        for (i = 0; i < aa->aa_page_count; i++)
-                osc_release_write_grant(aa->aa_cli, aa->aa_ppga[i], 1);
-        client_obd_list_unlock(&aa->aa_cli->cl_loi_list_lock);
-        osc_release_ppga(aa->aa_ppga, aa->aa_page_count);
-
-        RETURN(rc);
-}
-
-static int async_internal(int cmd, struct obd_export *exp, struct obdo *oa,
-                          struct lov_stripe_md *lsm, obd_count page_count,
-                          struct brw_page **pga, struct ptlrpc_request_set *set)
-{
-        struct ptlrpc_request     *request;
-        struct client_obd         *cli = &exp->exp_obd->u.cli;
-        int                        rc, i;
-        struct osc_brw_async_args *aa;
-        ENTRY;
-
-        /* Consume write credits even if doing a sync write -
-         * otherwise we may run out of space on OST due to grant. */
-        if (cmd == OBD_BRW_WRITE) {
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                for (i = 0; i < page_count; i++) {
-                        if (cli->cl_avail_grant >= CFS_PAGE_SIZE)
-                                osc_consume_write_grant(cli, pga[i]);
-                }
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-        }
-
-        rc = osc_brw_prep_request(cmd, &exp->exp_obd->u.cli, oa, lsm,
-                                  page_count, pga, &request);
-
-        aa = (struct osc_brw_async_args *)&request->rq_async_args;
-        if (cmd == OBD_BRW_READ) {
-                lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count);
-                lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight);
-                ptlrpc_lprocfs_brw(request, OST_READ, aa->aa_requested_nob);
-        } else {
-                lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count);
-                lprocfs_oh_tally(&cli->cl_write_rpc_hist,
-                                 cli->cl_w_in_flight);
-                ptlrpc_lprocfs_brw(request, OST_WRITE, aa->aa_requested_nob);
-        }
-
-        if (rc == 0) {
-                request->rq_interpret_reply = brw_interpret;
-                ptlrpc_set_add_req(set, request);
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                if (cmd == OBD_BRW_READ)
-                        cli->cl_r_in_flight++;
-                else
-                        cli->cl_w_in_flight++;
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-        } else if (cmd == OBD_BRW_WRITE) {
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                for (i = 0; i < page_count; i++)
-                        osc_release_write_grant(cli, pga[i], 0);
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-        }
-
-        RETURN (rc);
-}
-
-/*
- * ugh, we want disk allocation on the target to happen in offset order.  we'll
- * follow sedgewicks advice and stick to the dead simple shellsort -- it'll do
- * fine for our small page arrays and doesn't require allocation.  its an
- * insertion sort that swaps elements that are strides apart, shrinking the
- * stride down until its '1' and the array is sorted.
- */
-static void sort_brw_pages(struct brw_page **array, int num)
-{
-        int stride, i, j;
-        struct brw_page *tmp;
-
-        if (num == 1)
-                return;
-        for (stride = 1; stride < num ; stride = (stride * 3) + 1)
-                ;
-
-        do {
-                stride /= 3;
-                for (i = stride ; i < num ; i++) {
-                        tmp = array[i];
-                        j = i;
-                        while (j >= stride && array[j-stride]->off > tmp->off) {
-                                array[j] = array[j - stride];
-                                j -= stride;
-                        }
-                        array[j] = tmp;
-                }
-        } while (stride > 1);
-}
-
-static obd_count max_unfragmented_pages(struct brw_page **pg, obd_count pages)
-{
-        int count = 1;
-        int offset;
-        int i = 0;
-
-        LASSERT (pages > 0);
-        offset = pg[i]->off & (~CFS_PAGE_MASK);
-
-        for (;;) {
-                pages--;
-                if (pages == 0)         /* that's all */
-                        return count;
-
-                if (offset + pg[i]->count < CFS_PAGE_SIZE)
-                        return count;   /* doesn't end on page boundary */
-
-                i++;
-                offset = pg[i]->off & (~CFS_PAGE_MASK);
-                if (offset != 0)        /* doesn't start on page boundary */
-                        return count;
-
-                count++;
-        }
-}
-
-static struct brw_page **osc_build_ppga(struct brw_page *pga, obd_count count)
-{
-        struct brw_page **ppga;
-        int i;
-
-        OBD_ALLOC(ppga, sizeof(*ppga) * count);
-        if (ppga == NULL)
-                return NULL;
-
-        for (i = 0; i < count; i++)
-                ppga[i] = pga + i;
-        return ppga;
-}
-
-static void osc_release_ppga(struct brw_page **ppga, obd_count count)
-{
-        LASSERT(ppga != NULL);
-        OBD_FREE(ppga, sizeof(*ppga) * count);
-}
-
-static int osc_brw(int cmd, struct obd_export *exp, struct obd_info *oinfo,
-                   obd_count page_count, struct brw_page *pga,
-                   struct obd_trans_info *oti)
-{
-        struct obdo *saved_oa = NULL;
-        struct brw_page **ppga, **orig;
-        struct obd_import *imp = class_exp2cliimp(exp);
-        struct client_obd *cli = &imp->imp_obd->u.cli;
-        int rc, page_count_orig;
-        ENTRY;
-
-        if (cmd & OBD_BRW_CHECK) {
-                /* The caller just wants to know if there's a chance that this
-                 * I/O can succeed */
-
-                if (imp == NULL || imp->imp_invalid)
-                        RETURN(-EIO);
-                RETURN(0);
-        }
-
-        /* test_brw with a failed create can trip this, maybe others. */
-        LASSERT(cli->cl_max_pages_per_rpc);
-
-        rc = 0;
-
-        orig = ppga = osc_build_ppga(pga, page_count);
-        if (ppga == NULL)
-                RETURN(-ENOMEM);
-        page_count_orig = page_count;
-
-        sort_brw_pages(ppga, page_count);
-        while (page_count) {
-                obd_count pages_per_brw;
-
-                if (page_count > cli->cl_max_pages_per_rpc)
-                        pages_per_brw = cli->cl_max_pages_per_rpc;
-                else
-                        pages_per_brw = page_count;
-
-                pages_per_brw = max_unfragmented_pages(ppga, pages_per_brw);
-
-                if (saved_oa != NULL) {
-                        /* restore previously saved oa */
-                        *oinfo->oi_oa = *saved_oa;
-                } else if (page_count > pages_per_brw) {
-                        /* save a copy of oa (brw will clobber it) */
-                        OBDO_ALLOC(saved_oa);
-                        if (saved_oa == NULL)
-                                GOTO(out, rc = -ENOMEM);
-                        *saved_oa = *oinfo->oi_oa;
-                }
-
-                rc = osc_brw_internal(cmd, exp, oinfo->oi_oa, oinfo->oi_md,
-                                      pages_per_brw, ppga);
-
-                if (rc != 0)
-                        break;
-
-                page_count -= pages_per_brw;
-                ppga += pages_per_brw;
-        }
-
-out:
-        osc_release_ppga(orig, page_count_orig);
-
-        if (saved_oa != NULL)
-                OBDO_FREE(saved_oa);
-
-        RETURN(rc);
-}
-
-static int osc_brw_async(int cmd, struct obd_export *exp,
-                         struct obd_info *oinfo, obd_count page_count,
-                         struct brw_page *pga, struct obd_trans_info *oti,
-                         struct ptlrpc_request_set *set)
-{
-        struct brw_page **ppga, **orig;
-        int page_count_orig;
-        int rc = 0;
-        ENTRY;
-
-        if (cmd & OBD_BRW_CHECK) {
-                /* The caller just wants to know if there's a chance that this
-                 * I/O can succeed */
-                struct obd_import *imp = class_exp2cliimp(exp);
-
-                if (imp == NULL || imp->imp_invalid)
-                        RETURN(-EIO);
-                RETURN(0);
-        }
-
-        orig = ppga = osc_build_ppga(pga, page_count);
-        if (ppga == NULL)
-                RETURN(-ENOMEM);
-        page_count_orig = page_count;
-
-        sort_brw_pages(ppga, page_count);
-        while (page_count) {
-                struct brw_page **copy;
-                obd_count pages_per_brw;
-
-                pages_per_brw = min_t(obd_count, page_count,
-                    class_exp2cliimp(exp)->imp_obd->u.cli.cl_max_pages_per_rpc);
-
-                pages_per_brw = max_unfragmented_pages(ppga, pages_per_brw);
-
-                /* use ppga only if single RPC is going to fly */
-                if (pages_per_brw != page_count_orig || ppga != orig) {
-                        OBD_ALLOC(copy, pages_per_brw * sizeof(*copy));
-                        if (copy == NULL)
-                                GOTO(out, rc = -ENOMEM);
-                        memcpy(copy, ppga, pages_per_brw * sizeof(*copy));
-                } else
-                        copy = ppga;
-
-                rc = async_internal(cmd, exp, oinfo->oi_oa, oinfo->oi_md,
-                                    pages_per_brw, copy, set);
-
-                if (rc != 0) {
-                        if (copy != ppga)
-                                OBD_FREE(copy, pages_per_brw * sizeof(*copy));
-                        break;
-                }
-
-                if (copy == orig) {
-                        /* we passed it to async_internal() which is
-                         * now responsible for releasing memory */
-                        orig = NULL;
-                }
-
-                page_count -= pages_per_brw;
-                ppga += pages_per_brw;
-        }
-out:
-        if (orig)
-                osc_release_ppga(orig, page_count_orig);
-        RETURN(rc);
-}
-
-static void osc_check_rpcs(struct client_obd *cli);
-
-/* The companion to osc_enter_cache(), called when @oap is no longer part of
- * the dirty accounting.  Writeback completes or truncate happens before
- * writing starts.  Must be called with the loi lock held. */
-static void osc_exit_cache(struct client_obd *cli, struct osc_async_page *oap,
-                           int sent)
-{
-        osc_release_write_grant(cli, &oap->oap_brw_page, sent);
-}
-
-/* This maintains the lists of pending pages to read/write for a given object
- * (lop).  This is used by osc_check_rpcs->osc_next_loi() and loi_list_maint()
- * to quickly find objects that are ready to send an RPC. */
-static int lop_makes_rpc(struct client_obd *cli, struct loi_oap_pages *lop,
-                         int cmd)
-{
-        int optimal;
-        ENTRY;
-
-        if (lop->lop_num_pending == 0)
-                RETURN(0);
-
-        /* if we have an invalid import we want to drain the queued pages
-         * by forcing them through rpcs that immediately fail and complete
-         * the pages.  recovery relies on this to empty the queued pages
-         * before canceling the locks and evicting down the llite pages */
-        if (cli->cl_import == NULL || cli->cl_import->imp_invalid)
-                RETURN(1);
-
-        /* stream rpcs in queue order as long as as there is an urgent page
-         * queued.  this is our cheap solution for good batching in the case
-         * where writepage marks some random page in the middle of the file
-         * as urgent because of, say, memory pressure */
-        if (!list_empty(&lop->lop_urgent)) {
-                CDEBUG(D_CACHE, "urgent request forcing RPC\n");
-                RETURN(1);
-        }
-
-        /* fire off rpcs when we have 'optimal' rpcs as tuned for the wire. */
-        optimal = cli->cl_max_pages_per_rpc;
-        if (cmd & OBD_BRW_WRITE) {
-                /* trigger a write rpc stream as long as there are dirtiers
-                 * waiting for space.  as they're waiting, they're not going to
-                 * create more pages to coallesce with what's waiting.. */
-                if (!list_empty(&cli->cl_cache_waiters)) {
-                        CDEBUG(D_CACHE, "cache waiters forcing RPC\n");
-                        RETURN(1);
-                }
-
-                /* +16 to avoid triggering rpcs that would want to include pages
-                 * that are being queued but which can't be made ready until
-                 * the queuer finishes with the page. this is a wart for
-                 * llite::commit_write() */
-                optimal += 16;
-        }
-        if (lop->lop_num_pending >= optimal)
-                RETURN(1);
-
-        RETURN(0);
-}
-
-static void on_list(struct list_head *item, struct list_head *list,
-                    int should_be_on)
-{
-        if (list_empty(item) && should_be_on)
-                list_add_tail(item, list);
-        else if (!list_empty(item) && !should_be_on)
-                list_del_init(item);
-}
-
-/* maintain the loi's cli list membership invariants so that osc_send_oap_rpc
- * can find pages to build into rpcs quickly */
-static void loi_list_maint(struct client_obd *cli, struct lov_oinfo *loi)
-{
-        on_list(&loi->loi_cli_item, &cli->cl_loi_ready_list,
-                lop_makes_rpc(cli, &loi->loi_write_lop, OBD_BRW_WRITE) ||
-                lop_makes_rpc(cli, &loi->loi_read_lop, OBD_BRW_READ));
-
-        on_list(&loi->loi_write_item, &cli->cl_loi_write_list,
-                loi->loi_write_lop.lop_num_pending);
-
-        on_list(&loi->loi_read_item, &cli->cl_loi_read_list,
-                loi->loi_read_lop.lop_num_pending);
-}
-
-static void lop_update_pending(struct client_obd *cli,
-                               struct loi_oap_pages *lop, int cmd, int delta)
-{
-        lop->lop_num_pending += delta;
-        if (cmd & OBD_BRW_WRITE)
-                cli->cl_pending_w_pages += delta;
-        else
-                cli->cl_pending_r_pages += delta;
-}
-
-/* this is called when a sync waiter receives an interruption.  Its job is to
- * get the caller woken as soon as possible.  If its page hasn't been put in an
- * rpc yet it can dequeue immediately.  Otherwise it has to mark the rpc as
- * desiring interruption which will forcefully complete the rpc once the rpc
- * has timed out */
-static void osc_occ_interrupted(struct oig_callback_context *occ)
-{
-        struct osc_async_page *oap;
-        struct loi_oap_pages *lop;
-        struct lov_oinfo *loi;
-        ENTRY;
-
-        /* XXX member_of() */
-        oap = list_entry(occ, struct osc_async_page, oap_occ);
-
-        client_obd_list_lock(&oap->oap_cli->cl_loi_list_lock);
-
-        oap->oap_interrupted = 1;
-
-        /* ok, it's been put in an rpc. only one oap gets a request reference */
-        if (oap->oap_request != NULL) {
-                ptlrpc_mark_interrupted(oap->oap_request);
-                ptlrpcd_wake(oap->oap_request);
-                GOTO(unlock, 0);
-        }
-
-        /* we don't get interruption callbacks until osc_trigger_group_io()
-         * has been called and put the sync oaps in the pending/urgent lists.*/
-        if (!list_empty(&oap->oap_pending_item)) {
-                list_del_init(&oap->oap_pending_item);
-                list_del_init(&oap->oap_urgent_item);
-
-                loi = oap->oap_loi;
-                lop = (oap->oap_cmd & OBD_BRW_WRITE) ?
-                        &loi->loi_write_lop : &loi->loi_read_lop;
-                lop_update_pending(oap->oap_cli, lop, oap->oap_cmd, -1);
-                loi_list_maint(oap->oap_cli, oap->oap_loi);
-
-                oig_complete_one(oap->oap_oig, &oap->oap_occ, -EINTR);
-                oap->oap_oig = NULL;
-        }
-
-unlock:
-        client_obd_list_unlock(&oap->oap_cli->cl_loi_list_lock);
-}
-
-/* this is trying to propogate async writeback errors back up to the
- * application.  As an async write fails we record the error code for later if
- * the app does an fsync.  As long as errors persist we force future rpcs to be
- * sync so that the app can get a sync error and break the cycle of queueing
- * pages for which writeback will fail. */
-static void osc_process_ar(struct osc_async_rc *ar, __u64 xid,
-                           int rc)
-{
-        if (rc) {
-                if (!ar->ar_rc)
-                        ar->ar_rc = rc;
-
-                ar->ar_force_sync = 1;
-                ar->ar_min_xid = ptlrpc_sample_next_xid();
-                return;
-
-        }
-
-        if (ar->ar_force_sync && (xid >= ar->ar_min_xid))
-                ar->ar_force_sync = 0;
-}
-
-static void osc_oap_to_pending(struct osc_async_page *oap)
-{
-        struct loi_oap_pages *lop;
-
-        if (oap->oap_cmd & OBD_BRW_WRITE)
-                lop = &oap->oap_loi->loi_write_lop;
-        else
-                lop = &oap->oap_loi->loi_read_lop;
-
-        if (oap->oap_async_flags & ASYNC_URGENT)
-                list_add(&oap->oap_urgent_item, &lop->lop_urgent);
-        list_add_tail(&oap->oap_pending_item, &lop->lop_pending);
-        lop_update_pending(oap->oap_cli, lop, oap->oap_cmd, 1);
-}
-
-/* this must be called holding the loi list lock to give coverage to exit_cache,
- * async_flag maintenance, and oap_request */
-static void osc_ap_completion(struct client_obd *cli, struct obdo *oa,
-                              struct osc_async_page *oap, int sent, int rc)
-{
-        __u64 xid = 0;
-
-        ENTRY;
-        if (oap->oap_request != NULL) {
-                xid = ptlrpc_req_xid(oap->oap_request);
-                ptlrpc_req_finished(oap->oap_request);
-                oap->oap_request = NULL;
-        }
-
-        oap->oap_async_flags = 0;
-        oap->oap_interrupted = 0;
-
-        if (oap->oap_cmd & OBD_BRW_WRITE) {
-                osc_process_ar(&cli->cl_ar, xid, rc);
-                osc_process_ar(&oap->oap_loi->loi_ar, xid, rc);
-        }
-
-        if (rc == 0 && oa != NULL) {
-                if (oa->o_valid & OBD_MD_FLBLOCKS)
-                        oap->oap_loi->loi_lvb.lvb_blocks = oa->o_blocks;
-                if (oa->o_valid & OBD_MD_FLMTIME)
-                        oap->oap_loi->loi_lvb.lvb_mtime = oa->o_mtime;
-                if (oa->o_valid & OBD_MD_FLATIME)
-                        oap->oap_loi->loi_lvb.lvb_atime = oa->o_atime;
-                if (oa->o_valid & OBD_MD_FLCTIME)
-                        oap->oap_loi->loi_lvb.lvb_ctime = oa->o_ctime;
-        }
-
-        if (oap->oap_oig) {
-                osc_exit_cache(cli, oap, sent);
-                oig_complete_one(oap->oap_oig, &oap->oap_occ, rc);
-                oap->oap_oig = NULL;
-                EXIT;
-                return;
-        }
-
-        rc = oap->oap_caller_ops->ap_completion(oap->oap_caller_data,
-                                                oap->oap_cmd, oa, rc);
-
-        /* ll_ap_completion (from llite) drops PG_locked. so, a new
-         * I/O on the page could start, but OSC calls it under lock
-         * and thus we can add oap back to pending safely */
-        if (rc)
-                /* upper layer wants to leave the page on pending queue */
-                osc_oap_to_pending(oap);
-        else
-                osc_exit_cache(cli, oap, sent);
-        EXIT;
-}
-
-static int brw_interpret_oap(struct ptlrpc_request *request, void *data, int rc)
-{
-        struct osc_brw_async_args *aa = data;
-        struct osc_async_page *oap, *tmp;
-        struct client_obd *cli;
-        ENTRY;
-
-        rc = osc_brw_fini_request(request, rc);
-        CDEBUG(D_INODE, "request %p aa %p rc %d\n", request, aa, rc);
-
-        if (osc_recoverable_error(rc)) {
-                rc = osc_brw_redo_request(request, aa);
-                if (rc == 0)
-                        RETURN(0);
-        }
-
-        cli = aa->aa_cli;
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        /* We need to decrement before osc_ap_completion->osc_wake_cache_waiters
-         * is called so we know whether to go to sync BRWs or wait for more
-         * RPCs to complete */
-        if (lustre_msg_get_opc(request->rq_reqmsg) == OST_WRITE)
-                cli->cl_w_in_flight--;
-        else
-                cli->cl_r_in_flight--;
-
-        /* the caller may re-use the oap after the completion call so
-         * we need to clean it up a little */
-        list_for_each_entry_safe(oap, tmp, &aa->aa_oaps, oap_rpc_item) {
-                list_del_init(&oap->oap_rpc_item);
-                osc_ap_completion(cli, aa->aa_oa, oap, 1, rc);
-        }
-
-        osc_wake_cache_waiters(cli);
-        osc_check_rpcs(cli);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        OBDO_FREE(aa->aa_oa);
-
-        osc_release_ppga(aa->aa_ppga, aa->aa_page_count);
-        RETURN(rc);
-}
-
-static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
-                                            struct list_head *rpc_list,
-                                            int page_count, int cmd)
-{
-        struct ptlrpc_request *req;
-        struct brw_page **pga = NULL;
-        struct osc_brw_async_args *aa;
-        struct obdo *oa = NULL;
-        struct obd_async_page_ops *ops = NULL;
-        void *caller_data = NULL;
-        struct osc_async_page *oap;
-        int i, rc;
-
-        ENTRY;
-        LASSERT(!list_empty(rpc_list));
-
-        OBD_ALLOC(pga, sizeof(*pga) * page_count);
-        if (pga == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-
-        OBDO_ALLOC(oa);
-        if (oa == NULL)
-                GOTO(out, req = ERR_PTR(-ENOMEM));
-
-        i = 0;
-        list_for_each_entry(oap, rpc_list, oap_rpc_item) {
-                if (ops == NULL) {
-                        ops = oap->oap_caller_ops;
-                        caller_data = oap->oap_caller_data;
-                }
-                pga[i] = &oap->oap_brw_page;
-                pga[i]->off = oap->oap_obj_off + oap->oap_page_off;
-                CDEBUG(0, "put page %p index %lu oap %p flg %x to pga\n",
-                       pga[i]->pg, cfs_page_index(oap->oap_page), oap, pga[i]->flag);
-                i++;
-        }
-
-        /* always get the data for the obdo for the rpc */
-        LASSERT(ops != NULL);
-        ops->ap_fill_obdo(caller_data, cmd, oa);
-
-        sort_brw_pages(pga, page_count);
-        rc = osc_brw_prep_request(cmd, cli, oa, NULL, page_count, pga, &req);
-        if (rc != 0) {
-                CERROR("prep_req failed: %d\n", rc);
-                GOTO(out, req = ERR_PTR(rc));
-        }
-
-        /* Need to update the timestamps after the request is built in case
-         * we race with setattr (locally or in queue at OST).  If OST gets
-         * later setattr before earlier BRW (as determined by the request xid),
-         * the OST will not use BRW timestamps.  Sadly, there is no obvious
-         * way to do this in a single call.  bug 10150 */
-        ops->ap_update_obdo(caller_data, cmd, oa,
-                            OBD_MD_FLMTIME | OBD_MD_FLCTIME | OBD_MD_FLATIME);
-
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct osc_brw_async_args *)&req->rq_async_args;
-        CFS_INIT_LIST_HEAD(&aa->aa_oaps);
-        list_splice(rpc_list, &aa->aa_oaps);
-        CFS_INIT_LIST_HEAD(rpc_list);
-
-out:
-        if (IS_ERR(req)) {
-                if (oa)
-                        OBDO_FREE(oa);
-                if (pga)
-                        OBD_FREE(pga, sizeof(*pga) * page_count);
-        }
-        RETURN(req);
-}
-
-/* the loi lock is held across this function but it's allowed to release
- * and reacquire it during its work */
-static int osc_send_oap_rpc(struct client_obd *cli, struct lov_oinfo *loi,
-                            int cmd, struct loi_oap_pages *lop)
-{
-        struct ptlrpc_request *req;
-        obd_count page_count = 0;
-        struct osc_async_page *oap = NULL, *tmp;
-        struct osc_brw_async_args *aa;
-        struct obd_async_page_ops *ops;
-        CFS_LIST_HEAD(rpc_list);
-        unsigned int ending_offset;
-        unsigned  starting_offset = 0;
-        int srvlock = 0;
-        ENTRY;
-
-        /* first we find the pages we're allowed to work with */
-        list_for_each_entry_safe(oap, tmp, &lop->lop_pending, oap_pending_item){
-                ops = oap->oap_caller_ops;
-
-                LASSERT(oap->oap_magic == OAP_MAGIC);
-
-                if (page_count != 0 &&
-                    srvlock != !!(oap->oap_brw_flags & OBD_BRW_SRVLOCK)) {
-                        CDEBUG(D_PAGE, "SRVLOCK flag mismatch,"
-                               " oap %p, page %p, srvlock %u\n",
-                               oap, oap->oap_brw_page.pg, (unsigned)!srvlock);
-                        break;
-                }
-                /* in llite being 'ready' equates to the page being locked
-                 * until completion unlocks it.  commit_write submits a page
-                 * as not ready because its unlock will happen unconditionally
-                 * as the call returns.  if we race with commit_write giving
-                 * us that page we dont' want to create a hole in the page
-                 * stream, so we stop and leave the rpc to be fired by
-                 * another dirtier or kupdated interval (the not ready page
-                 * will still be on the dirty list).  we could call in
-                 * at the end of ll_file_write to process the queue again. */
-                if (!(oap->oap_async_flags & ASYNC_READY)) {
-                        int rc = ops->ap_make_ready(oap->oap_caller_data, cmd);
-                        if (rc < 0)
-                                CDEBUG(D_INODE, "oap %p page %p returned %d "
-                                                "instead of ready\n", oap,
-                                                oap->oap_page, rc);
-                        switch (rc) {
-                        case -EAGAIN:
-                                /* llite is telling us that the page is still
-                                 * in commit_write and that we should try
-                                 * and put it in an rpc again later.  we
-                                 * break out of the loop so we don't create
-                                 * a hole in the sequence of pages in the rpc
-                                 * stream.*/
-                                oap = NULL;
-                                break;
-                        case -EINTR:
-                                /* the io isn't needed.. tell the checks
-                                 * below to complete the rpc with EINTR */
-                                oap->oap_async_flags |= ASYNC_COUNT_STABLE;
-                                oap->oap_count = -EINTR;
-                                break;
-                        case 0:
-                                oap->oap_async_flags |= ASYNC_READY;
-                                break;
-                        default:
-                                LASSERTF(0, "oap %p page %p returned %d "
-                                            "from make_ready\n", oap,
-                                            oap->oap_page, rc);
-                                break;
-                        }
-                }
-                if (oap == NULL)
-                        break;
-                /*
-                 * Page submitted for IO has to be locked. Either by
-                 * ->ap_make_ready() or by higher layers.
-                 *
-                 * XXX nikita: this assertion should be adjusted when lustre
-                 * starts using PG_writeback for pages being written out.
-                 */
-#if defined(__KERNEL__) && defined(__linux__)
-                LASSERT(PageLocked(oap->oap_page));
-#endif
-                /* If there is a gap at the start of this page, it can't merge
-                 * with any previous page, so we'll hand the network a
-                 * "fragmented" page array that it can't transfer in 1 RDMA */
-                if (page_count != 0 && oap->oap_page_off != 0)
-                        break;
-
-                /* take the page out of our book-keeping */
-                list_del_init(&oap->oap_pending_item);
-                lop_update_pending(cli, lop, cmd, -1);
-                list_del_init(&oap->oap_urgent_item);
-
-                if (page_count == 0)
-                        starting_offset = (oap->oap_obj_off+oap->oap_page_off) &
-                                          (PTLRPC_MAX_BRW_SIZE - 1);
-
-                /* ask the caller for the size of the io as the rpc leaves. */
-                if (!(oap->oap_async_flags & ASYNC_COUNT_STABLE))
-                        oap->oap_count =
-                                ops->ap_refresh_count(oap->oap_caller_data,cmd);
-                if (oap->oap_count <= 0) {
-                        CDEBUG(D_CACHE, "oap %p count %d, completing\n", oap,
-                               oap->oap_count);
-                        osc_ap_completion(cli, NULL, oap, 0, oap->oap_count);
-                        continue;
-                }
-
-                /* now put the page back in our accounting */
-                list_add_tail(&oap->oap_rpc_item, &rpc_list);
-                if (page_count == 0)
-                        srvlock = !!(oap->oap_brw_flags & OBD_BRW_SRVLOCK);
-                if (++page_count >= cli->cl_max_pages_per_rpc)
-                        break;
-
-                /* End on a PTLRPC_MAX_BRW_SIZE boundary.  We want full-sized
-                 * RPCs aligned on PTLRPC_MAX_BRW_SIZE boundaries to help reads
-                 * have the same alignment as the initial writes that allocated
-                 * extents on the server. */
-                ending_offset = (oap->oap_obj_off + oap->oap_page_off +
-                                 oap->oap_count) & (PTLRPC_MAX_BRW_SIZE - 1);
-                if (ending_offset == 0)
-                        break;
-
-                /* If there is a gap at the end of this page, it can't merge
-                 * with any subsequent pages, so we'll hand the network a
-                 * "fragmented" page array that it can't transfer in 1 RDMA */
-                if (oap->oap_page_off + oap->oap_count < CFS_PAGE_SIZE)
-                        break;
-        }
-
-        osc_wake_cache_waiters(cli);
-
-        if (page_count == 0)
-                RETURN(0);
-
-        loi_list_maint(cli, loi);
-
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        req = osc_build_req(cli, &rpc_list, page_count, cmd);
-        if (IS_ERR(req)) {
-                /* this should happen rarely and is pretty bad, it makes the
-                 * pending list not follow the dirty order */
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                list_for_each_entry_safe(oap, tmp, &rpc_list, oap_rpc_item) {
-                        list_del_init(&oap->oap_rpc_item);
-
-                        /* queued sync pages can be torn down while the pages
-                         * were between the pending list and the rpc */
-                        if (oap->oap_interrupted) {
-                                CDEBUG(D_INODE, "oap %p interrupted\n", oap);
-                                osc_ap_completion(cli, NULL, oap, 0,
-                                                  oap->oap_count);
-                                continue;
-                        }
-                        osc_ap_completion(cli, NULL, oap, 0, PTR_ERR(req));
-                }
-                loi_list_maint(cli, loi);
-                RETURN(PTR_ERR(req));
-        }
-
-        aa = (struct osc_brw_async_args *)&req->rq_async_args;
-        if (cmd == OBD_BRW_READ) {
-                lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count);
-                lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight);
-                lprocfs_oh_tally_log2(&cli->cl_read_offset_hist,
-                                      (starting_offset >> CFS_PAGE_SHIFT) + 1);
-                ptlrpc_lprocfs_brw(req, OST_READ, aa->aa_requested_nob);
-        } else {
-                lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count);
-                lprocfs_oh_tally(&cli->cl_write_rpc_hist,
-                                 cli->cl_w_in_flight);
-                lprocfs_oh_tally_log2(&cli->cl_write_offset_hist,
-                                      (starting_offset >> CFS_PAGE_SHIFT) + 1);
-                ptlrpc_lprocfs_brw(req, OST_WRITE, aa->aa_requested_nob);
-        }
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        if (cmd == OBD_BRW_READ)
-                cli->cl_r_in_flight++;
-        else
-                cli->cl_w_in_flight++;
-
-        /* queued sync pages can be torn down while the pages
-         * were between the pending list and the rpc */
-        tmp = NULL;
-        list_for_each_entry(oap, &aa->aa_oaps, oap_rpc_item) {
-                /* only one oap gets a request reference */
-                if (tmp == NULL)
-                        tmp = oap;
-                if (oap->oap_interrupted && !req->rq_intr) {
-                        CDEBUG(D_INODE, "oap %p in req %p interrupted\n",
-                               oap, req);
-                        ptlrpc_mark_interrupted(req);
-                }
-        }
-        if (tmp != NULL)
-                tmp->oap_request = ptlrpc_request_addref(req);
-
-        DEBUG_REQ(D_INODE, req, "%d pages, aa %p. now %dr/%dw in flight",
-                  page_count, aa, cli->cl_r_in_flight, cli->cl_w_in_flight);
-
-        req->rq_interpret_reply = brw_interpret_oap;
-        ptlrpcd_add_req(req);
-        RETURN(1);
-}
-
-#define LOI_DEBUG(LOI, STR, args...)                                     \
-        CDEBUG(D_INODE, "loi ready %d wr %d:%d rd %d:%d " STR,           \
-               !list_empty(&(LOI)->loi_cli_item),                        \
-               (LOI)->loi_write_lop.lop_num_pending,                     \
-               !list_empty(&(LOI)->loi_write_lop.lop_urgent),            \
-               (LOI)->loi_read_lop.lop_num_pending,                      \
-               !list_empty(&(LOI)->loi_read_lop.lop_urgent),             \
-               args)                                                     \
-
-/* This is called by osc_check_rpcs() to find which objects have pages that
- * we could be sending.  These lists are maintained by lop_makes_rpc(). */
-struct lov_oinfo *osc_next_loi(struct client_obd *cli)
-{
-        ENTRY;
-        /* first return all objects which we already know to have
-         * pages ready to be stuffed into rpcs */
-        if (!list_empty(&cli->cl_loi_ready_list))
-                RETURN(list_entry(cli->cl_loi_ready_list.next,
-                                  struct lov_oinfo, loi_cli_item));
-
-        /* then if we have cache waiters, return all objects with queued
-         * writes.  This is especially important when many small files
-         * have filled up the cache and not been fired into rpcs because
-         * they don't pass the nr_pending/object threshhold */
-        if (!list_empty(&cli->cl_cache_waiters) &&
-            !list_empty(&cli->cl_loi_write_list))
-                RETURN(list_entry(cli->cl_loi_write_list.next,
-                                  struct lov_oinfo, loi_write_item));
-
-        /* then return all queued objects when we have an invalid import
-         * so that they get flushed */
-        if (cli->cl_import == NULL || cli->cl_import->imp_invalid) {
-                if (!list_empty(&cli->cl_loi_write_list))
-                        RETURN(list_entry(cli->cl_loi_write_list.next,
-                                          struct lov_oinfo, loi_write_item));
-                if (!list_empty(&cli->cl_loi_read_list))
-                        RETURN(list_entry(cli->cl_loi_read_list.next,
-                                          struct lov_oinfo, loi_read_item));
-        }
-        RETURN(NULL);
-}
-
-/* called with the loi list lock held */
-static void osc_check_rpcs(struct client_obd *cli)
-{
-        struct lov_oinfo *loi;
-        int rc = 0, race_counter = 0;
-        ENTRY;
-
-        while ((loi = osc_next_loi(cli)) != NULL) {
-                LOI_DEBUG(loi, "%lu in flight\n", rpcs_in_flight(cli));
-
-                if (rpcs_in_flight(cli) >= cli->cl_max_rpcs_in_flight)
-                        break;
-
-                /* attempt some read/write balancing by alternating between
-                 * reads and writes in an object.  The makes_rpc checks here
-                 * would be redundant if we were getting read/write work items
-                 * instead of objects.  we don't want send_oap_rpc to drain a
-                 * partial read pending queue when we're given this object to
-                 * do io on writes while there are cache waiters */
-                if (lop_makes_rpc(cli, &loi->loi_write_lop, OBD_BRW_WRITE)) {
-                        rc = osc_send_oap_rpc(cli, loi, OBD_BRW_WRITE,
-                                              &loi->loi_write_lop);
-                        if (rc < 0)
-                                break;
-                        if (rc > 0)
-                                race_counter = 0;
-                        else
-                                race_counter++;
-                }
-                if (lop_makes_rpc(cli, &loi->loi_read_lop, OBD_BRW_READ)) {
-                        rc = osc_send_oap_rpc(cli, loi, OBD_BRW_READ,
-                                              &loi->loi_read_lop);
-                        if (rc < 0)
-                                break;
-                        if (rc > 0)
-                                race_counter = 0;
-                        else
-                                race_counter++;
-                }
-
-                /* attempt some inter-object balancing by issueing rpcs
-                 * for each object in turn */
-                if (!list_empty(&loi->loi_cli_item))
-                        list_del_init(&loi->loi_cli_item);
-                if (!list_empty(&loi->loi_write_item))
-                        list_del_init(&loi->loi_write_item);
-                if (!list_empty(&loi->loi_read_item))
-                        list_del_init(&loi->loi_read_item);
-
-                loi_list_maint(cli, loi);
-
-                /* send_oap_rpc fails with 0 when make_ready tells it to
-                 * back off.  llite's make_ready does this when it tries
-                 * to lock a page queued for write that is already locked.
-                 * we want to try sending rpcs from many objects, but we
-                 * don't want to spin failing with 0.  */
-                if (race_counter == 10)
-                        break;
-        }
-        EXIT;
-}
-
-/* we're trying to queue a page in the osc so we're subject to the
- * 'cl_dirty_max' limit on the number of pages that can be queued in the osc.
- * If the osc's queued pages are already at that limit, then we want to sleep
- * until there is space in the osc's queue for us.  We also may be waiting for
- * write credits from the OST if there are RPCs in flight that may return some
- * before we fall back to sync writes.
- *
- * We need this know our allocation was granted in the presence of signals */
-static int ocw_granted(struct client_obd *cli, struct osc_cache_waiter *ocw)
-{
-        int rc;
-        ENTRY;
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-        rc = list_empty(&ocw->ocw_entry) || rpcs_in_flight(cli) == 0;
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        RETURN(rc);
-};
-
-/* Caller must hold loi_list_lock - we drop/regain it if we need to wait for
- * grant or cache space. */
-static int osc_enter_cache(struct client_obd *cli, struct lov_oinfo *loi,
-                           struct osc_async_page *oap)
-{
-        struct osc_cache_waiter ocw;
-        struct l_wait_info lwi = { 0 };
-        ENTRY;
-
-        CDEBUG(D_CACHE, "dirty: %ld/%d dirty_max: %ld/%d dropped: %lu "
-               "grant: %lu\n", cli->cl_dirty, atomic_read(&obd_dirty_pages),
-               cli->cl_dirty_max, obd_max_dirty_pages,
-               cli->cl_lost_grant, cli->cl_avail_grant);
-
-        /* force the caller to try sync io.  this can jump the list
-         * of queued writes and create a discontiguous rpc stream */
-        if (cli->cl_dirty_max < CFS_PAGE_SIZE || cli->cl_ar.ar_force_sync ||
-            loi->loi_ar.ar_force_sync)
-                RETURN(-EDQUOT);
-
-        /* Hopefully normal case - cache space and write credits available */
-        if ((cli->cl_dirty + CFS_PAGE_SIZE <= cli->cl_dirty_max) &&
-            (atomic_read(&obd_dirty_pages) + 1 <= obd_max_dirty_pages) &&
-            (cli->cl_avail_grant >= CFS_PAGE_SIZE)) {
-                /* account for ourselves */
-                osc_consume_write_grant(cli, &oap->oap_brw_page);
-                RETURN(0);
-        }
-
-        /* Make sure that there are write rpcs in flight to wait for.  This
-         * is a little silly as this object may not have any pending but
-         * other objects sure might. */
-        if (cli->cl_w_in_flight) {
-                list_add_tail(&ocw.ocw_entry, &cli->cl_cache_waiters);
-                cfs_waitq_init(&ocw.ocw_waitq);
-                ocw.ocw_oap = oap;
-                ocw.ocw_rc = 0;
-
-                loi_list_maint(cli, loi);
-                osc_check_rpcs(cli);
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-                CDEBUG(D_CACHE, "sleeping for cache space\n");
-                l_wait_event(ocw.ocw_waitq, ocw_granted(cli, &ocw), &lwi);
-
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                if (!list_empty(&ocw.ocw_entry)) {
-                        list_del(&ocw.ocw_entry);
-                        RETURN(-EINTR);
-                }
-                RETURN(ocw.ocw_rc);
-        }
-
-        RETURN(-EDQUOT);
-}
-
-int osc_prep_async_page(struct obd_export *exp, struct lov_stripe_md *lsm,
-                        struct lov_oinfo *loi, cfs_page_t *page,
-                        obd_off offset, struct obd_async_page_ops *ops,
-                        void *data, void **res, int nocache,
-                        struct lustre_handle *lockh)
-{
-        struct osc_async_page *oap;
-        struct ldlm_res_id oid = {{0}};
-        int rc = 0;
-        
-        ENTRY;
-
-        if (!page)
-                return size_round(sizeof(*oap));
-
-        oap = *res;
-        oap->oap_magic = OAP_MAGIC;
-        oap->oap_cli = &exp->exp_obd->u.cli;
-        oap->oap_loi = loi;
-
-        oap->oap_caller_ops = ops;
-        oap->oap_caller_data = data;
-
-        oap->oap_page = page;
-        oap->oap_obj_off = offset;
-
-        CFS_INIT_LIST_HEAD(&oap->oap_pending_item);
-        CFS_INIT_LIST_HEAD(&oap->oap_urgent_item);
-        CFS_INIT_LIST_HEAD(&oap->oap_rpc_item);
-        CFS_INIT_LIST_HEAD(&oap->oap_page_list);
-
-        oap->oap_occ.occ_interrupted = osc_occ_interrupted;
-
-        spin_lock_init(&oap->oap_lock);
-
-        /* If the page was marked as notcacheable - don't add to any locks */ 
-        if (!nocache) {
-                oid.name[0] = loi->loi_id;
-                /* This is the only place where we can call cache_add_extent
-                   without oap_lock, because this page is locked now, and
-                   the lock we are adding it to is referenced, so cannot lose
-                   any pages either. */
-                rc = cache_add_extent(oap->oap_cli->cl_cache, &oid, oap, lockh);
-                if (rc)
-                        RETURN(rc);
-        }
-
-        CDEBUG(D_CACHE, "oap %p page %p obj off "LPU64"\n", oap, page, offset);
-        RETURN(0);
-}
-
-struct osc_async_page *oap_from_cookie(void *cookie)
-{
-        struct osc_async_page *oap = cookie;
-        if (oap->oap_magic != OAP_MAGIC)
-                return ERR_PTR(-EINVAL);
-        return oap;
-};
-
-static int osc_queue_async_io(struct obd_export *exp, struct lov_stripe_md *lsm,
-                              struct lov_oinfo *loi, void *cookie,
-                              int cmd, obd_off off, int count,
-                              obd_flag brw_flags, enum async_flags async_flags)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        struct osc_async_page *oap;
-        int rc = 0;
-        ENTRY;
-
-        oap = oap_from_cookie(cookie);
-        if (IS_ERR(oap))
-                RETURN(PTR_ERR(oap));
-
-        if (cli->cl_import == NULL || cli->cl_import->imp_invalid)
-                RETURN(-EIO);
-
-        if (!list_empty(&oap->oap_pending_item) ||
-            !list_empty(&oap->oap_urgent_item) ||
-            !list_empty(&oap->oap_rpc_item))
-                RETURN(-EBUSY);
-
-        /* check if the file's owner/group is over quota */
-#ifdef HAVE_QUOTA_SUPPORT
-        if ((cmd & OBD_BRW_WRITE) && !(cmd & OBD_BRW_NOQUOTA)){
-                struct obd_async_page_ops *ops;
-                struct obdo *oa;
-
-                OBDO_ALLOC(oa);
-                if (oa == NULL)
-                        RETURN(-ENOMEM);
-
-                ops = oap->oap_caller_ops;
-                ops->ap_fill_obdo(oap->oap_caller_data, cmd, oa);
-                if (lquota_chkdq(quota_interface, cli, oa->o_uid, oa->o_gid) ==
-                    NO_QUOTA)
-                        rc = -EDQUOT;
-
-                OBDO_FREE(oa);
-                if (rc)
-                        RETURN(rc);
-        }
-#endif
-
-        if (loi == NULL)
-                loi = lsm->lsm_oinfo[0];
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        oap->oap_cmd = cmd;
-        oap->oap_page_off = off;
-        oap->oap_count = count;
-        oap->oap_brw_flags = brw_flags;
-        oap->oap_async_flags = async_flags;
-
-        if (cmd & OBD_BRW_WRITE) {
-                rc = osc_enter_cache(cli, loi, oap);
-                if (rc) {
-                        client_obd_list_unlock(&cli->cl_loi_list_lock);
-                        RETURN(rc);
-                }
-        }
-
-        osc_oap_to_pending(oap);
-        loi_list_maint(cli, loi);
-
-        LOI_DEBUG(loi, "oap %p page %p added for cmd %d\n", oap, oap->oap_page,
-                  cmd);
-
-        osc_check_rpcs(cli);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        RETURN(0);
-}
-
-/* aka (~was & now & flag), but this is more clear :) */
-#define SETTING(was, now, flag) (!(was & flag) && (now & flag))
-
-static int osc_set_async_flags(struct obd_export *exp,
-                               struct lov_stripe_md *lsm,
-                               struct lov_oinfo *loi, void *cookie,
-                               obd_flag async_flags)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        struct loi_oap_pages *lop;
-        struct osc_async_page *oap;
-        int rc = 0;
-        ENTRY;
-
-        oap = oap_from_cookie(cookie);
-        if (IS_ERR(oap))
-                RETURN(PTR_ERR(oap));
-
-        /*
-         * bug 7311: OST-side locking is only supported for liblustre for now
-         * (and liblustre never calls obd_set_async_flags(). I hope.), generic
-         * implementation has to handle case where OST-locked page was picked
-         * up by, e.g., ->writepage().
-         */
-        LASSERT(!(oap->oap_brw_flags & OBD_BRW_SRVLOCK));
-        LASSERT(!LIBLUSTRE_CLIENT); /* check that liblustre angels do fear to
-                                     * tread here. */
-
-        if (cli->cl_import == NULL || cli->cl_import->imp_invalid)
-                RETURN(-EIO);
-
-        if (loi == NULL)
-                loi = lsm->lsm_oinfo[0];
-
-        if (oap->oap_cmd & OBD_BRW_WRITE) {
-                lop = &loi->loi_write_lop;
-        } else {
-                lop = &loi->loi_read_lop;
-        }
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        if (list_empty(&oap->oap_pending_item))
-                GOTO(out, rc = -EINVAL);
-
-        if ((oap->oap_async_flags & async_flags) == async_flags)
-                GOTO(out, rc = 0);
-
-        if (SETTING(oap->oap_async_flags, async_flags, ASYNC_READY))
-                oap->oap_async_flags |= ASYNC_READY;
-
-        if (SETTING(oap->oap_async_flags, async_flags, ASYNC_URGENT)) {
-                if (list_empty(&oap->oap_rpc_item)) {
-                        list_add(&oap->oap_urgent_item, &lop->lop_urgent);
-                        loi_list_maint(cli, loi);
-                }
-        }
-
-        LOI_DEBUG(loi, "oap %p page %p has flags %x\n", oap, oap->oap_page,
-                        oap->oap_async_flags);
-out:
-        osc_check_rpcs(cli);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        RETURN(rc);
-}
-
-static int osc_queue_group_io(struct obd_export *exp, struct lov_stripe_md *lsm,
-                             struct lov_oinfo *loi,
-                             struct obd_io_group *oig, void *cookie,
-                             int cmd, obd_off off, int count,
-                             obd_flag brw_flags,
-                             obd_flag async_flags)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        struct osc_async_page *oap;
-        struct loi_oap_pages *lop;
-        int rc = 0;
-        ENTRY;
-
-        oap = oap_from_cookie(cookie);
-        if (IS_ERR(oap))
-                RETURN(PTR_ERR(oap));
-
-        if (cli->cl_import == NULL || cli->cl_import->imp_invalid)
-                RETURN(-EIO);
-
-        if (!list_empty(&oap->oap_pending_item) ||
-            !list_empty(&oap->oap_urgent_item) ||
-            !list_empty(&oap->oap_rpc_item))
-                RETURN(-EBUSY);
-
-        if (loi == NULL)
-                loi = lsm->lsm_oinfo[0];
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        oap->oap_cmd = cmd;
-        oap->oap_page_off = off;
-        oap->oap_count = count;
-        oap->oap_brw_flags = brw_flags;
-        oap->oap_async_flags = async_flags;
-
-        if (cmd & OBD_BRW_WRITE)
-                lop = &loi->loi_write_lop;
-        else
-                lop = &loi->loi_read_lop;
-
-        list_add_tail(&oap->oap_pending_item, &lop->lop_pending_group);
-        if (oap->oap_async_flags & ASYNC_GROUP_SYNC) {
-                oap->oap_oig = oig;
-                rc = oig_add_one(oig, &oap->oap_occ);
-        }
-
-        LOI_DEBUG(loi, "oap %p page %p on group pending: rc %d\n",
-                  oap, oap->oap_page, rc);
-
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        RETURN(rc);
-}
-
-static void osc_group_to_pending(struct client_obd *cli, struct lov_oinfo *loi,
-                                 struct loi_oap_pages *lop, int cmd)
-{
-        struct list_head *pos, *tmp;
-        struct osc_async_page *oap;
-
-        list_for_each_safe(pos, tmp, &lop->lop_pending_group) {
-                oap = list_entry(pos, struct osc_async_page, oap_pending_item);
-                list_del(&oap->oap_pending_item);
-                osc_oap_to_pending(oap);
-        }
-        loi_list_maint(cli, loi);
-}
-
-static int osc_trigger_group_io(struct obd_export *exp,
-                                struct lov_stripe_md *lsm,
-                                struct lov_oinfo *loi,
-                                struct obd_io_group *oig)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        ENTRY;
-
-        if (loi == NULL)
-                loi = lsm->lsm_oinfo[0];
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        osc_group_to_pending(cli, loi, &loi->loi_write_lop, OBD_BRW_WRITE);
-        osc_group_to_pending(cli, loi, &loi->loi_read_lop, OBD_BRW_READ);
-
-        osc_check_rpcs(cli);
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-        RETURN(0);
-}
-
-static int osc_teardown_async_page(struct obd_export *exp,
-                                   struct lov_stripe_md *lsm,
-                                   struct lov_oinfo *loi, void *cookie)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        struct loi_oap_pages *lop;
-        struct osc_async_page *oap;
-        int rc = 0;
-        ENTRY;
-
-        oap = oap_from_cookie(cookie);
-        if (IS_ERR(oap))
-                RETURN(PTR_ERR(oap));
-
-        if (loi == NULL)
-                loi = lsm->lsm_oinfo[0];
-
-        if (oap->oap_cmd & OBD_BRW_WRITE) {
-                lop = &loi->loi_write_lop;
-        } else {
-                lop = &loi->loi_read_lop;
-        }
-
-        client_obd_list_lock(&cli->cl_loi_list_lock);
-
-        if (!list_empty(&oap->oap_rpc_item))
-                GOTO(out, rc = -EBUSY);
-
-        osc_exit_cache(cli, oap, 0);
-        osc_wake_cache_waiters(cli);
-
-        if (!list_empty(&oap->oap_urgent_item)) {
-                list_del_init(&oap->oap_urgent_item);
-                oap->oap_async_flags &= ~ASYNC_URGENT;
-        }
-        if (!list_empty(&oap->oap_pending_item)) {
-                list_del_init(&oap->oap_pending_item);
-                lop_update_pending(cli, lop, oap->oap_cmd, -1);
-        }
-        loi_list_maint(cli, loi);
-        cache_remove_extent(cli->cl_cache, oap);
-
-        LOI_DEBUG(loi, "oap %p page %p torn down\n", oap, oap->oap_page);
-out:
-        client_obd_list_unlock(&cli->cl_loi_list_lock);
-        RETURN(rc);
-}
-
-int osc_extent_blocking_cb(struct ldlm_lock *lock,
-                           struct ldlm_lock_desc *new, void *data,
-                           int flag)
-{
-        struct lustre_handle lockh = { 0 };
-        int rc;
-        ENTRY;  
-                
-        if ((unsigned long)data > 0 && (unsigned long)data < 0x1000) {
-                LDLM_ERROR(lock, "cancelling lock with bad data %p", data);
-                LBUG(); 
-        }       
-
-        switch (flag) {
-        case LDLM_CB_BLOCKING:
-                ldlm_lock2handle(lock, &lockh);
-                rc = ldlm_cli_cancel(&lockh);
-                if (rc != ELDLM_OK)
-                        CERROR("ldlm_cli_cancel failed: %d\n", rc);
-                break;
-        case LDLM_CB_CANCELING: {
-
-                ldlm_lock2handle(lock, &lockh);
-                /* This lock wasn't granted, don't try to do anything */
-                if (lock->l_req_mode != lock->l_granted_mode)
-                        RETURN(0);
-
-                cache_remove_lock(lock->l_conn_export->exp_obd->u.cli.cl_cache,
-                                  &lockh);
-
-                if (lock->l_conn_export->exp_obd->u.cli.cl_ext_lock_cancel_cb)
-                        lock->l_conn_export->exp_obd->u.cli.cl_ext_lock_cancel_cb(
-                                                          lock, new, data,flag);
-                break;
-        }
-        default:
-                LBUG();
-        }
-
-        RETURN(0);
-}
-EXPORT_SYMBOL(osc_extent_blocking_cb);
-
-static void osc_set_data_with_check(struct lustre_handle *lockh, void *data,
-                                    int flags)
-{
-        struct ldlm_lock *lock = ldlm_handle2lock(lockh);
-
-        if (lock == NULL) {
-                CERROR("lockh %p, data %p - client evicted?\n", lockh, data);
-                return;
-        }
-        lock_res_and_lock(lock);
-#if defined (__KERNEL__) && defined (__linux__)
-        /* Liang XXX: Darwin and Winnt checking should be added */
-        if (lock->l_ast_data && lock->l_ast_data != data) {
-                struct inode *new_inode = data;
-                struct inode *old_inode = lock->l_ast_data;
-                if (!(old_inode->i_state & I_FREEING))
-                        LDLM_ERROR(lock, "inconsistent l_ast_data found");
-                LASSERTF(old_inode->i_state & I_FREEING,
-                         "Found existing inode %p/%lu/%u state %lu in lock: "
-                         "setting data to %p/%lu/%u\n", old_inode,
-                         old_inode->i_ino, old_inode->i_generation,
-                         old_inode->i_state,
-                         new_inode, new_inode->i_ino, new_inode->i_generation);
-        }
-#endif
-        lock->l_ast_data = data;
-        lock->l_flags |= (flags & LDLM_FL_NO_LRU);
-        unlock_res_and_lock(lock);
-        LDLM_LOCK_PUT(lock);
-}
-
-static int osc_change_cbdata(struct obd_export *exp, struct lov_stripe_md *lsm,
-                             ldlm_iterator_t replace, void *data)
-{
-        struct ldlm_res_id res_id = { .name = {lsm->lsm_object_id} };
-        struct obd_device *obd = class_exp2obd(exp);
-
-        ldlm_resource_iterate(obd->obd_namespace, &res_id, replace, data);
-        return 0;
-}
-
-static int osc_enqueue_fini(struct obd_device *obd, struct ptlrpc_request *req,
-                            struct obd_info *oinfo, int intent, int rc)
-{
-        ENTRY;
-
-        if (intent) {
-                /* The request was created before ldlm_cli_enqueue call. */
-                if (rc == ELDLM_LOCK_ABORTED) {
-                        struct ldlm_reply *rep;
-
-                        /* swabbed by ldlm_cli_enqueue() */
-                        LASSERT(lustre_rep_swabbed(req, DLM_LOCKREPLY_OFF));
-                        rep = lustre_msg_buf(req->rq_repmsg, DLM_LOCKREPLY_OFF,
-                                             sizeof(*rep));
-                        LASSERT(rep != NULL);
-                        if (rep->lock_policy_res1)
-                                rc = rep->lock_policy_res1;
-                }
-        }
-
-        if ((intent && rc == ELDLM_LOCK_ABORTED) || !rc) {
-                CDEBUG(D_INODE,"got kms "LPU64" blocks "LPU64" mtime "LPU64"\n",
-                       oinfo->oi_md->lsm_oinfo[0]->loi_lvb.lvb_size,
-                       oinfo->oi_md->lsm_oinfo[0]->loi_lvb.lvb_blocks,
-                       oinfo->oi_md->lsm_oinfo[0]->loi_lvb.lvb_mtime);
-        }
-
-        if (!rc)
-                cache_add_lock(obd->u.cli.cl_cache, oinfo->oi_lockh);
-
-        /* Call the update callback. */
-        rc = oinfo->oi_cb_up(oinfo, rc);
-        RETURN(rc);
-}
-
-static int osc_enqueue_interpret(struct ptlrpc_request *req,
-                                 struct osc_enqueue_args *aa, int rc)
-{
-        int intent = aa->oa_oi->oi_flags & LDLM_FL_HAS_INTENT;
-        struct lov_stripe_md *lsm = aa->oa_oi->oi_md;
-        struct ldlm_lock *lock;
-
-        /* ldlm_cli_enqueue is holding a reference on the lock, so it must
-         * be valid. */
-        lock = ldlm_handle2lock(aa->oa_oi->oi_lockh);
-
-        /* Complete obtaining the lock procedure. */
-        rc = ldlm_cli_enqueue_fini(aa->oa_exp, req, aa->oa_ei->ei_type, 1,
-                                   aa->oa_ei->ei_mode,
-                                   &aa->oa_oi->oi_flags,
-                                   &lsm->lsm_oinfo[0]->loi_lvb,
-                                   sizeof(lsm->lsm_oinfo[0]->loi_lvb),
-                                   lustre_swab_ost_lvb,
-                                   aa->oa_oi->oi_lockh, rc);
-
-        /* Complete osc stuff. */
-        rc = osc_enqueue_fini(aa->oa_exp->exp_obd, req, aa->oa_oi, intent, rc);
-
-        /* Release the lock for async request. */
-        if (lustre_handle_is_used(aa->oa_oi->oi_lockh) && rc == ELDLM_OK)
-                ldlm_lock_decref(aa->oa_oi->oi_lockh, aa->oa_ei->ei_mode);
-
-        LASSERTF(lock != NULL, "lockh %p, req %p, aa %p - client evicted?\n",
-                 aa->oa_oi->oi_lockh, req, aa);
-        LDLM_LOCK_PUT(lock);
-        return rc;
-}
-
-/* When enqueuing asynchronously, locks are not ordered, we can obtain a lock
- * from the 2nd OSC before a lock from the 1st one. This does not deadlock with
- * other synchronous requests, however keeping some locks and trying to obtain
- * others may take a considerable amount of time in a case of ost failure; and
- * when other sync requests do not get released lock from a client, the client
- * is excluded from the cluster -- such scenarious make the life difficult, so
- * release locks just after they are obtained. */
-static int osc_enqueue(struct obd_export *exp, struct obd_info *oinfo,
-                       struct ldlm_enqueue_info *einfo,
-                       struct ptlrpc_request_set *rqset)
-{
-        struct ldlm_res_id res_id = { .name = {oinfo->oi_md->lsm_object_id} };
-        struct obd_device *obd = exp->exp_obd;
-        struct ldlm_reply *rep;
-        struct ptlrpc_request *req = NULL;
-        int intent = oinfo->oi_flags & LDLM_FL_HAS_INTENT;
-        ldlm_mode_t mode;
-        int rc;
-        ENTRY;
-
-        /* Filesystem lock extents are extended to page boundaries so that
-         * dealing with the page cache is a little smoother.  */
-        oinfo->oi_policy.l_extent.start -=
-                oinfo->oi_policy.l_extent.start & ~CFS_PAGE_MASK;
-        oinfo->oi_policy.l_extent.end |= ~CFS_PAGE_MASK;
-
-        if (oinfo->oi_md->lsm_oinfo[0]->loi_kms_valid == 0)
-                goto no_match;
-
-        /* Next, search for already existing extent locks that will cover us */
-        /* If we're trying to read, we also search for an existing PW lock.  The
-         * VFS and page cache already protect us locally, so lots of readers/
-         * writers can share a single PW lock.
-         *
-         * There are problems with conversion deadlocks, so instead of
-         * converting a read lock to a write lock, we'll just enqueue a new
-         * one.
-         *
-         * At some point we should cancel the read lock instead of making them
-         * send us a blocking callback, but there are problems with canceling
-         * locks out from other users right now, too. */
-        mode = einfo->ei_mode;
-        if (einfo->ei_mode == LCK_PR)
-                mode |= LCK_PW;
-        mode = ldlm_lock_match(obd->obd_namespace,
-                               oinfo->oi_flags | LDLM_FL_LVB_READY, &res_id,
-                               einfo->ei_type, &oinfo->oi_policy, mode,
-                               oinfo->oi_lockh);
-        if (mode) {
-                /* addref the lock only if not async requests and PW lock is
-                 * matched whereas we asked for PR. */
-                if (!rqset && einfo->ei_mode != mode)
-                        ldlm_lock_addref(oinfo->oi_lockh, LCK_PR);
-                osc_set_data_with_check(oinfo->oi_lockh, einfo->ei_cbdata,
-                                        oinfo->oi_flags);
-                if (intent) {
-                        /* I would like to be able to ASSERT here that rss <=
-                         * kms, but I can't, for reasons which are explained in
-                         * lov_enqueue() */
-                }
-
-                /* We already have a lock, and it's referenced */
-                oinfo->oi_cb_up(oinfo, ELDLM_OK);
-
-                /* For async requests, decref the lock. */
-                if (einfo->ei_mode != mode)
-                        ldlm_lock_decref(oinfo->oi_lockh, LCK_PW);
-                else if (rqset)
-                        ldlm_lock_decref(oinfo->oi_lockh, einfo->ei_mode);
-
-                RETURN(ELDLM_OK);
-        }
-
- no_match:
-        if (intent) {
-                int size[3] = {
-                        [MSG_PTLRPC_BODY_OFF] = sizeof(struct ptlrpc_body),
-                        [DLM_LOCKREQ_OFF]     = sizeof(struct ldlm_request),
-                        [DLM_LOCKREQ_OFF + 1] = 0 };
-
-                req = ldlm_prep_enqueue_req(exp, 2, size, NULL, 0);
-                if (req == NULL)
-                        RETURN(-ENOMEM);
-
-                size[DLM_LOCKREPLY_OFF] = sizeof(*rep);
-                size[DLM_REPLY_REC_OFF] = 
-                        sizeof(oinfo->oi_md->lsm_oinfo[0]->loi_lvb);
-                ptlrpc_req_set_repsize(req, 3, size);
-        }
-
-        /* users of osc_enqueue() can pass this flag for ldlm_lock_match() */
-        oinfo->oi_flags &= ~LDLM_FL_BLOCK_GRANTED;
-
-        rc = ldlm_cli_enqueue(exp, &req, einfo, res_id,
-                              &oinfo->oi_policy, &oinfo->oi_flags,
-                              &oinfo->oi_md->lsm_oinfo[0]->loi_lvb,
-                              sizeof(oinfo->oi_md->lsm_oinfo[0]->loi_lvb),
-                              lustre_swab_ost_lvb, oinfo->oi_lockh,
-                              rqset ? 1 : 0);
-        if (rqset) {
-                if (!rc) {
-                        struct osc_enqueue_args *aa;
-                        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-                        aa = (struct osc_enqueue_args *)&req->rq_async_args;
-                        aa->oa_oi = oinfo;
-                        aa->oa_ei = einfo;
-                        aa->oa_exp = exp;
-
-                        req->rq_interpret_reply = osc_enqueue_interpret;
-                        ptlrpc_set_add_req(rqset, req);
-                } else if (intent) {
-                        ptlrpc_req_finished(req);
-                }
-                RETURN(rc);
-        }
-
-        rc = osc_enqueue_fini(obd, req, oinfo, intent, rc);
-        if (intent)
-                ptlrpc_req_finished(req);
-
-        RETURN(rc);
-}
-
-static int osc_match(struct obd_export *exp, struct lov_stripe_md *lsm,
-                     __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                     int *flags, void *data, struct lustre_handle *lockh)
-{
-        struct ldlm_res_id res_id = { .name = {lsm->lsm_object_id} };
-        struct obd_device *obd = exp->exp_obd;
-        int lflags = *flags;
-        ldlm_mode_t rc;
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_OSC_MATCH, -EIO);
-
-        /* Filesystem lock extents are extended to page boundaries so that
-         * dealing with the page cache is a little smoother */
-        policy->l_extent.start -= policy->l_extent.start & ~CFS_PAGE_MASK;
-        policy->l_extent.end |= ~CFS_PAGE_MASK;
-
-        /* Next, search for already existing extent locks that will cover us */
-        /* If we're trying to read, we also search for an existing PW lock.  The
-         * VFS and page cache already protect us locally, so lots of readers/
-         * writers can share a single PW lock. */
-        rc = mode;
-        if (mode == LCK_PR)
-                rc |= LCK_PW;
-        rc = ldlm_lock_match(obd->obd_namespace, lflags | LDLM_FL_LVB_READY,
-                             &res_id, type, policy, rc, lockh);
-        if (rc) {
-                osc_set_data_with_check(lockh, data, lflags);
-                if (!(lflags & LDLM_FL_TEST_LOCK) && mode != rc) {
-                        ldlm_lock_addref(lockh, LCK_PR);
-                        ldlm_lock_decref(lockh, LCK_PW);
-                }
-                RETURN(rc);
-        }
-
-        RETURN(rc);
-}
-
-static int osc_cancel(struct obd_export *exp, struct lov_stripe_md *md,
-                      __u32 mode, struct lustre_handle *lockh)
-{
-        ENTRY;
-
-        if (unlikely(mode == LCK_GROUP))
-                ldlm_lock_decref_and_cancel(lockh, mode);
-        else
-                ldlm_lock_decref(lockh, mode);
-
-        RETURN(0);
-}
-
-static int osc_cancel_unused(struct obd_export *exp,
-                             struct lov_stripe_md *lsm, int flags, void *opaque)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct ldlm_res_id res_id = { .name = {lsm->lsm_object_id} };
-
-        return ldlm_cli_cancel_unused(obd->obd_namespace, &res_id, flags,
-                                      opaque);
-}
-
-static int osc_join_lru(struct obd_export *exp,
-                        struct lov_stripe_md *lsm, int join)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct ldlm_res_id res_id = { .name = {lsm->lsm_object_id} };
-
-        return ldlm_cli_join_lru(obd->obd_namespace, &res_id, join);
-}
-
-static int osc_statfs_interpret(struct ptlrpc_request *req,
-                                struct osc_async_args *aa, int rc)
-{
-        struct obd_statfs *msfs;
-        ENTRY;
-
-        if (rc != 0)
-                GOTO(out, rc);
-
-        msfs = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*msfs),
-                                  lustre_swab_obd_statfs);
-        if (msfs == NULL) {
-                CERROR("Can't unpack obd_statfs\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        memcpy(aa->aa_oi->oi_osfs, msfs, sizeof(*msfs));
-out:
-        rc = aa->aa_oi->oi_cb_up(aa->aa_oi, rc);
-        RETURN(rc);
-}
-
-static int osc_statfs_async(struct obd_device *obd, struct obd_info *oinfo,
-                            __u64 max_age, struct ptlrpc_request_set *rqset)
-{
-        struct ptlrpc_request *req;
-        struct osc_async_args *aa;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*oinfo->oi_osfs) };
-        ENTRY;
-
-        /* We could possibly pass max_age in the request (as an absolute
-         * timestamp or a "seconds.usec ago") so the target can avoid doing
-         * extra calls into the filesystem if that isn't necessary (e.g.
-         * during mount that would help a bit).  Having relative timestamps
-         * is not so great if request processing is slow, while absolute
-         * timestamps are not ideal because they need time synchronization. */
-        req = ptlrpc_prep_req(obd->u.cli.cl_import, LUSTRE_OST_VERSION,
-                              OST_STATFS, 1, NULL, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        req->rq_request_portal = OST_CREATE_PORTAL;
-        ptlrpc_at_set_req_timeout(req);
-        if (oinfo->oi_flags & OBD_STATFS_NODELAY) {
-                /* procfs requests not want stat in wait for avoid deadlock */
-                req->rq_no_resend = 1;
-                req->rq_no_delay = 1;
-        }
-
-        req->rq_interpret_reply = osc_statfs_interpret;
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct osc_async_args *)&req->rq_async_args;
-        aa->aa_oi = oinfo;
-
-        ptlrpc_set_add_req(rqset, req);
-        RETURN(0);
-}
-
-static int osc_statfs(struct obd_device *obd, struct obd_statfs *osfs,
-                      __u64 max_age, __u32 flags)
-{
-        struct obd_statfs *msfs;
-        struct ptlrpc_request *req;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*osfs) };
-        ENTRY;
-
-        /* We could possibly pass max_age in the request (as an absolute
-         * timestamp or a "seconds.usec ago") so the target can avoid doing
-         * extra calls into the filesystem if that isn't necessary (e.g.
-         * during mount that would help a bit).  Having relative timestamps
-         * is not so great if request processing is slow, while absolute
-         * timestamps are not ideal because they need time synchronization. */
-        req = ptlrpc_prep_req(obd->u.cli.cl_import, LUSTRE_OST_VERSION,
-                              OST_STATFS, 1, NULL, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        req->rq_request_portal = OST_CREATE_PORTAL;
-        ptlrpc_at_set_req_timeout(req);
-
-        if (flags & OBD_STATFS_NODELAY) {
-                /* procfs requests not want stat in wait for avoid deadlock */
-                req->rq_no_resend = 1;
-                req->rq_no_delay = 1;
-        }
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out, rc);
-
-        msfs = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*msfs),
-                                  lustre_swab_obd_statfs);
-        if (msfs == NULL) {
-                CERROR("Can't unpack obd_statfs\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        memcpy(osfs, msfs, sizeof(*osfs));
-
-        EXIT;
- out:
-        ptlrpc_req_finished(req);
-        return rc;
-}
-
-/* Retrieve object striping information.
- *
- * @lmmu is a pointer to an in-core struct with lmm_ost_count indicating
- * the maximum number of OST indices which will fit in the user buffer.
- * lmm_magic must be LOV_MAGIC (we only use 1 slot here).
- */
-static int osc_getstripe(struct lov_stripe_md *lsm, struct lov_user_md *lump)
-{
-        struct lov_user_md lum, *lumk;
-        int rc = 0, lum_size;
-        ENTRY;
-
-        if (!lsm)
-                RETURN(-ENODATA);
-
-        if (copy_from_user(&lum, lump, sizeof(lum)))
-                RETURN(-EFAULT);
-
-        if (lum.lmm_magic != LOV_USER_MAGIC)
-                RETURN(-EINVAL);
-
-        if (lum.lmm_stripe_count > 0) {
-                lum_size = sizeof(lum) + sizeof(lum.lmm_objects[0]);
-                OBD_ALLOC(lumk, lum_size);
-                if (!lumk)
-                        RETURN(-ENOMEM);
-
-                lumk->lmm_objects[0].l_object_id = lsm->lsm_object_id;
-        } else {
-                lum_size = sizeof(lum);
-                lumk = &lum;
-        }
-
-        lumk->lmm_object_id = lsm->lsm_object_id;
-        lumk->lmm_stripe_count = 1;
-
-        if (copy_to_user(lump, lumk, lum_size))
-                rc = -EFAULT;
-
-        if (lumk != &lum)
-                OBD_FREE(lumk, lum_size);
-
-        RETURN(rc);
-}
-
-
-static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
-                         void *karg, void *uarg)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_ioctl_data *data = karg;
-        int err = 0;
-        ENTRY;
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_INC_USE_COUNT;
-#else
-        if (!try_module_get(THIS_MODULE)) {
-                CERROR("Can't get module. Is it alive?");
-                return -EINVAL;
-        }
-#endif
-        switch (cmd) {
-        case OBD_IOC_LOV_GET_CONFIG: {
-                char *buf;
-                struct lov_desc *desc;
-                struct obd_uuid uuid;
-
-                buf = NULL;
-                len = 0;
-                if (obd_ioctl_getdata(&buf, &len, (void *)uarg))
-                        GOTO(out, err = -EINVAL);
-
-                data = (struct obd_ioctl_data *)buf;
-
-                if (sizeof(*desc) > data->ioc_inllen1) {
-                        obd_ioctl_freedata(buf, len);
-                        GOTO(out, err = -EINVAL);
-                }
-
-                if (data->ioc_inllen2 < sizeof(uuid)) {
-                        obd_ioctl_freedata(buf, len);
-                        GOTO(out, err = -EINVAL);
-                }
-
-                desc = (struct lov_desc *)data->ioc_inlbuf1;
-                desc->ld_tgt_count = 1;
-                desc->ld_active_tgt_count = 1;
-                desc->ld_default_stripe_count = 1;
-                desc->ld_default_stripe_size = 0;
-                desc->ld_default_stripe_offset = 0;
-                desc->ld_pattern = 0;
-                memcpy(&desc->ld_uuid, &obd->obd_uuid, sizeof(uuid));
-
-                memcpy(data->ioc_inlbuf2, &obd->obd_uuid, sizeof(uuid));
-
-                err = copy_to_user((void *)uarg, buf, len);
-                if (err)
-                        err = -EFAULT;
-                obd_ioctl_freedata(buf, len);
-                GOTO(out, err);
-        }
-        case LL_IOC_LOV_SETSTRIPE:
-                err = obd_alloc_memmd(exp, karg);
-                if (err > 0)
-                        err = 0;
-                GOTO(out, err);
-        case LL_IOC_LOV_GETSTRIPE:
-                err = osc_getstripe(karg, uarg);
-                GOTO(out, err);
-        case OBD_IOC_CLIENT_RECOVER:
-                err = ptlrpc_recover_import(obd->u.cli.cl_import,
-                                            data->ioc_inlbuf1);
-                if (err > 0)
-                        err = 0;
-                GOTO(out, err);
-        case IOC_OSC_SET_ACTIVE:
-                err = ptlrpc_set_import_active(obd->u.cli.cl_import,
-                                               data->ioc_offset);
-                GOTO(out, err);
-        case OBD_IOC_POLL_QUOTACHECK:
-                err = lquota_poll_check(quota_interface, exp,
-                                        (struct if_quotacheck *)karg);
-                GOTO(out, err);
-        case OBD_IOC_DESTROY: {
-                struct obdo            *oa;
-
-                if (!capable (CAP_SYS_ADMIN))
-                        GOTO (out, err = -EPERM);
-                oa = &data->ioc_obdo1;
-
-                if (oa->o_id == 0)
-                        GOTO(out, err = -EINVAL);
-
-                oa->o_valid |= OBD_MD_FLGROUP;
-
-                err = osc_destroy(exp, oa, NULL, NULL, NULL);
-                GOTO(out, err);
-        }
-        default:
-                CDEBUG(D_INODE, "unrecognised ioctl %#x by %s\n",
-                       cmd, cfs_curproc_comm());
-                GOTO(out, err = -ENOTTY);
-        }
-out:
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-        MOD_DEC_USE_COUNT;
-#else
-        module_put(THIS_MODULE);
-#endif
-        return err;
-}
-
-static int osc_get_info(struct obd_export *exp, obd_count keylen,
-                        void *key, __u32 *vallen, void *val)
-{
-        ENTRY;
-        if (!vallen || !val)
-                RETURN(-EFAULT);
-
-        if (KEY_IS("lock_to_stripe")) {
-                __u32 *stripe = val;
-                *vallen = sizeof(*stripe);
-                *stripe = 0;
-                RETURN(0);
-        } else if (KEY_IS("last_id")) {
-                struct ptlrpc_request *req;
-                obd_id *reply;
-                char *bufs[2] = { NULL, key };
-                int rc, size[2] = { sizeof(struct ptlrpc_body), keylen };
-
-                req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                                      OST_GET_INFO, 2, size, bufs);
-                if (req == NULL)
-                        RETURN(-ENOMEM);
-
-                size[REPLY_REC_OFF] = *vallen;
-                ptlrpc_req_set_repsize(req, 2, size);
-                rc = ptlrpc_queue_wait(req);
-                if (rc)
-                        GOTO(out, rc);
-
-                reply = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*reply),
-                                           lustre_swab_ost_last_id);
-                if (reply == NULL) {
-                        CERROR("Can't unpack OST last ID\n");
-                        GOTO(out, rc = -EPROTO);
-                }
-                *((obd_id *)val) = *reply;
-        out:
-                ptlrpc_req_finished(req);
-                RETURN(rc);
-        }
-        RETURN(-EINVAL);
-}
-
-static int osc_setinfo_mds_conn_interpret(struct ptlrpc_request *req,
-                                          void *aa, int rc)
-{
-        struct llog_ctxt *ctxt;
-        struct obd_import *imp = req->rq_import;
-        ENTRY;
-
-        if (rc != 0)
-                RETURN(rc);
-
-        ctxt = llog_get_context(imp->imp_obd, LLOG_MDS_OST_ORIG_CTXT);
-        if (ctxt) {
-                if (rc == 0)
-                        rc = llog_initiator_connect(ctxt);
-                else
-                        CERROR("cannot establish connection for "
-                               "ctxt %p: %d\n", ctxt, rc);
-        }
-
-        llog_ctxt_put(ctxt);
-        spin_lock(&imp->imp_lock);
-        imp->imp_server_timeout = 1;
-        imp->imp_pingable = 1;
-        spin_unlock(&imp->imp_lock);
-        CDEBUG(D_RPCTRACE, "pinging OST %s\n", obd2cli_tgt(imp->imp_obd));
-
-        RETURN(rc);
-}
-
-static int osc_set_info_async(struct obd_export *exp, obd_count keylen,
-                              void *key, obd_count vallen, void *val,
-                              struct ptlrpc_request_set *set)
-{
-        struct ptlrpc_request *req;
-        struct obd_device  *obd = exp->exp_obd;
-        struct obd_import *imp = class_exp2cliimp(exp);
-        int size[3] = { sizeof(struct ptlrpc_body), keylen, vallen };
-        char *bufs[3] = { NULL, key, val };
-        ENTRY;
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_SHUTDOWN, 10);
-
-        if (KEY_IS(KEY_NEXT_ID)) {
-                if (vallen != sizeof(obd_id))
-                        RETURN(-EINVAL);
-                obd->u.cli.cl_oscc.oscc_next_id = *((obd_id*)val) + 1;
-                CDEBUG(D_HA, "%s: set oscc_next_id = "LPU64"\n",
-                       exp->exp_obd->obd_name,
-                       obd->u.cli.cl_oscc.oscc_next_id);
-
-                RETURN(0);
-        }
-
-        if (KEY_IS("unlinked")) {
-                struct osc_creator *oscc = &obd->u.cli.cl_oscc;
-                spin_lock(&oscc->oscc_lock);
-                oscc->oscc_flags &= ~OSCC_FLAG_NOSPC;
-                spin_unlock(&oscc->oscc_lock);
-                RETURN(0);
-        }
-
-        if (KEY_IS(KEY_INIT_RECOV)) {
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-                spin_lock(&imp->imp_lock);
-                imp->imp_initial_recov = *(int *)val;
-                spin_unlock(&imp->imp_lock);
-                CDEBUG(D_HA, "%s: set imp_initial_recov = %d\n",
-                       exp->exp_obd->obd_name,
-                       imp->imp_initial_recov);
-                RETURN(0);
-        }
-
-        if (KEY_IS("checksum")) {
-                if (vallen != sizeof(int))
-                        RETURN(-EINVAL);
-                exp->exp_obd->u.cli.cl_checksum = (*(int *)val) ? 1 : 0;
-                RETURN(0);
-        }
-
-        if (!set)
-                RETURN(-EINVAL);
-
-        /* We pass all other commands directly to OST. Since nobody calls osc
-           methods directly and everybody is supposed to go through LOV, we
-           assume lov checked invalid values for us.
-           The only recognised values so far are evict_by_nid and mds_conn.
-           Even if something bad goes through, we'd get a -EINVAL from OST
-           anyway. */
-
-        req = ptlrpc_prep_req(imp, LUSTRE_OST_VERSION, OST_SET_INFO, 3, size,
-                              bufs);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        if (KEY_IS(KEY_MDS_CONN))
-                req->rq_interpret_reply = osc_setinfo_mds_conn_interpret;
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-        ptlrpc_set_add_req(set, req);
-        ptlrpc_check_set(set);
-
-        RETURN(0);
-}
-
-
-static struct llog_operations osc_size_repl_logops = {
-        lop_cancel: llog_obd_repl_cancel
-};
-
-static struct llog_operations osc_mds_ost_orig_logops;
-static int osc_llog_init(struct obd_device *obd, struct obd_device *tgt,
-                         int count, struct llog_catid *catid, 
-                         struct obd_uuid *uuid)
-{
-        int rc;
-        ENTRY;
-
-        spin_lock(&obd->obd_dev_lock);
-        if (osc_mds_ost_orig_logops.lop_setup != llog_obd_origin_setup) {
-                osc_mds_ost_orig_logops = llog_lvfs_ops;
-                osc_mds_ost_orig_logops.lop_setup = llog_obd_origin_setup;
-                osc_mds_ost_orig_logops.lop_cleanup = llog_obd_origin_cleanup;
-                osc_mds_ost_orig_logops.lop_add = llog_obd_origin_add;
-                osc_mds_ost_orig_logops.lop_connect = llog_origin_connect;
-        }
-        spin_unlock(&obd->obd_dev_lock);
-
-        rc = llog_setup(obd, LLOG_MDS_OST_ORIG_CTXT, tgt, count,
-                        &catid->lci_logid, &osc_mds_ost_orig_logops);
-        if (rc) {
-                CERROR("failed LLOG_MDS_OST_ORIG_CTXT\n");
-                GOTO (out, rc);
-        }
-
-        rc = llog_setup(obd, LLOG_SIZE_REPL_CTXT, tgt, count, NULL,
-                        &osc_size_repl_logops);
-        if (rc) 
-                CERROR("failed LLOG_SIZE_REPL_CTXT\n");
-out:
-        if (rc) {
-                CERROR("osc '%s' tgt '%s' cnt %d catid %p rc=%d\n", 
-                       obd->obd_name, tgt->obd_name, count, catid, rc);
-                CERROR("logid "LPX64":0x%x\n",
-                       catid->lci_logid.lgl_oid, catid->lci_logid.lgl_ogen);
-        }
-        RETURN(rc);
-}
-
-static int osc_llog_finish(struct obd_device *obd, int count)
-{
-        struct llog_ctxt *ctxt;
-        int rc = 0, rc2 = 0;
-        ENTRY;
-
-        ctxt = llog_get_context(obd, LLOG_MDS_OST_ORIG_CTXT);
-        if (ctxt)
-                rc = llog_cleanup(ctxt);
-
-        ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT);
-        if (ctxt)
-                rc2 = llog_cleanup(ctxt);
-        if (!rc)
-                rc = rc2;
-
-        RETURN(rc);
-}
-
-static int osc_reconnect(struct obd_export *exp, struct obd_device *obd,
-                         struct obd_uuid *cluuid,
-                         struct obd_connect_data *data)
-{
-        struct client_obd *cli = &obd->u.cli;
-
-        if (data != NULL && (data->ocd_connect_flags & OBD_CONNECT_GRANT)) {
-                long lost_grant;
-
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                data->ocd_grant = cli->cl_avail_grant ?:
-                                2 * cli->cl_max_pages_per_rpc << CFS_PAGE_SHIFT;
-                lost_grant = cli->cl_lost_grant;
-                cli->cl_lost_grant = 0;
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-                CDEBUG(D_CACHE, "request ocd_grant: %d cl_avail_grant: %ld "
-                       "cl_lost_grant: %ld\n", data->ocd_grant,
-                       cli->cl_avail_grant, lost_grant);
-                CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d"
-                       " ocd_grant: %d\n", data->ocd_connect_flags,
-                       data->ocd_version, data->ocd_grant);
-        }
-
-        RETURN(0);
-}
-
-static int osc_disconnect(struct obd_export *exp)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_SIZE_REPL_CTXT);
-        int rc;
-
-        if (obd->u.cli.cl_conn_count == 1)
-                /* flush any remaining cancel messages out to the target */
-                llog_sync(ctxt, exp);
-        
-        llog_ctxt_put(ctxt);
-
-        rc = client_disconnect_export(exp);
-        return rc;
-}
-
-static int osc_import_event(struct obd_device *obd,
-                            struct obd_import *imp,
-                            enum obd_import_event event)
-{
-        struct client_obd *cli;
-        int rc = 0;
-
-        ENTRY;
-        LASSERT(imp->imp_obd == obd);
-
-        switch (event) {
-        case IMP_EVENT_DISCON: {
-                /* Only do this on the MDS OSC's */
-                if (imp->imp_server_timeout) {
-                        struct osc_creator *oscc = &obd->u.cli.cl_oscc;
-
-                        spin_lock(&oscc->oscc_lock);
-                        oscc->oscc_flags |= OSCC_FLAG_RECOVERING;
-                        spin_unlock(&oscc->oscc_lock);
-                }
-                cli = &obd->u.cli;
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                cli->cl_avail_grant = 0;
-                cli->cl_lost_grant = 0;
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-                ptlrpc_import_setasync(imp, -1);
-
-                break;
-        }
-        case IMP_EVENT_INACTIVE: {
-                rc = obd_notify_observer(obd, obd, OBD_NOTIFY_INACTIVE, NULL);
-                break;
-        }
-        case IMP_EVENT_INVALIDATE: {
-                struct ldlm_namespace *ns = obd->obd_namespace;
-
-                /* Reset grants */
-                cli = &obd->u.cli;
-                client_obd_list_lock(&cli->cl_loi_list_lock);
-                /* all pages go to failing rpcs due to the invalid import */
-                osc_check_rpcs(cli);
-                client_obd_list_unlock(&cli->cl_loi_list_lock);
-
-                ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
-
-                break;
-        }
-        case IMP_EVENT_ACTIVE: {
-                /* Only do this on the MDS OSC's */
-                if (imp->imp_server_timeout) {
-                        struct osc_creator *oscc = &obd->u.cli.cl_oscc;
-
-                        spin_lock(&oscc->oscc_lock);
-                        oscc->oscc_flags &= ~OSCC_FLAG_NOSPC;
-                        spin_unlock(&oscc->oscc_lock);
-                }
-                rc = obd_notify_observer(obd, obd, OBD_NOTIFY_ACTIVE, NULL);
-                break;
-        }
-        case IMP_EVENT_OCD: {
-                struct obd_connect_data *ocd = &imp->imp_connect_data;
-
-                if (ocd->ocd_connect_flags & OBD_CONNECT_GRANT)
-                        osc_init_grant(&obd->u.cli, ocd);
-
-                /* See bug 7198 */
-                if (ocd->ocd_connect_flags & OBD_CONNECT_REQPORTAL)
-                        imp->imp_client->cli_request_portal =OST_REQUEST_PORTAL;
-
-                ptlrpc_import_setasync(imp, 1);
-                rc = obd_notify_observer(obd, obd, OBD_NOTIFY_OCD, NULL);
-                break;
-        }
-        default:
-                CERROR("Unknown import event %d\n", event);
-                LBUG();
-        }
-        RETURN(rc);
-}
-
-int osc_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        int rc;
-        ENTRY;
-
-        ENTRY;
-        rc = ptlrpcd_addref();
-        if (rc)
-                RETURN(rc);
-
-        rc = client_obd_setup(obd, len, buf);
-        if (rc) {
-                ptlrpcd_decref();
-        } else {
-                struct lprocfs_static_vars lvars = { 0 };
-                struct client_obd *cli = &obd->u.cli;
-
-                lprocfs_osc_init_vars(&lvars);
-                if (lprocfs_obd_setup(obd, lvars.obd_vars) == 0) {
-                        lproc_osc_attach_seqstat(obd);
-                        ptlrpc_lprocfs_register_obd(obd);
-                }
-
-                oscc_init(obd);
-                /* We need to allocate a few requests more, because
-                   brw_interpret_oap tries to create new requests before freeing
-                   previous ones. Ideally we want to have 2x max_rpcs_in_flight
-                   reserved, but I afraid that might be too much wasted RAM
-                   in fact, so 2 is just my guess and still should work. */
-                cli->cl_import->imp_rq_pool =
-                        ptlrpc_init_rq_pool(cli->cl_max_rpcs_in_flight + 2,
-                                            OST_MAXREQSIZE,
-                                            ptlrpc_add_rqs_to_pool);
-                cli->cl_cache = cache_create(obd);
-                if (!cli->cl_cache) {
-                        osc_cleanup(obd);
-                        rc = -ENOMEM;
-                }
-        }
-
-        RETURN(rc);
-}
-
-static int osc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
-{
-        int rc = 0;
-        ENTRY;
-
-        switch (stage) {
-        case OBD_CLEANUP_EARLY: {
-                struct obd_import *imp;
-                imp = obd->u.cli.cl_import;
-                CDEBUG(D_HA, "Deactivating import %s\n", obd->obd_name);
-                /* ptlrpc_abort_inflight to stop an mds_lov_synchronize */
-                ptlrpc_deactivate_import(imp);
-                break;
-        }
-        case OBD_CLEANUP_EXPORTS: {
-                /* If we set up but never connected, the
-                   client import will not have been cleaned. */
-                if (obd->u.cli.cl_import) {
-                        struct obd_import *imp;
-                        imp = obd->u.cli.cl_import;
-                        CDEBUG(D_CONFIG, "%s: client import never connected\n",
-                               obd->obd_name);
-                        ptlrpc_invalidate_import(imp);
-                        ptlrpc_free_rq_pool(imp->imp_rq_pool);
-                        class_destroy_import(imp);
-                        obd->u.cli.cl_import = NULL;
-                }
-                break;
-        }
-        case OBD_CLEANUP_SELF_EXP:
-                rc = obd_llog_finish(obd, 0);
-                if (rc != 0)
-                        CERROR("failed to cleanup llogging subsystems\n");
-                break;
-        case OBD_CLEANUP_OBD:
-                break;
-        }
-        RETURN(rc);
-}
-
-int osc_cleanup(struct obd_device *obd)
-{
-        struct osc_creator *oscc = &obd->u.cli.cl_oscc;
-        int rc;
-
-        ENTRY;
-        ptlrpc_lprocfs_unregister_obd(obd);
-        lprocfs_obd_cleanup(obd);
-
-        spin_lock(&oscc->oscc_lock);
-        oscc->oscc_flags &= ~OSCC_FLAG_RECOVERING;
-        oscc->oscc_flags |= OSCC_FLAG_EXITING;
-        spin_unlock(&oscc->oscc_lock);
-
-        /* free memory of osc quota cache */
-        lquota_cleanup(quota_interface, obd);
-
-        cache_destroy(obd->u.cli.cl_cache);
-        rc = client_obd_cleanup(obd);
-
-        ptlrpcd_decref();
-        RETURN(rc);
-}
-
-static int osc_register_page_removal_cb(struct obd_export *exp,
-                                        obd_page_removal_cb_t func,
-                                        obd_pin_extent_cb pin_cb)
-{
-        return cache_add_extent_removal_cb(exp->exp_obd->u.cli.cl_cache, func,
-                                           pin_cb);
-}
-
-static int osc_unregister_page_removal_cb(struct obd_export *exp,
-                                          obd_page_removal_cb_t func)
-{
-        return cache_del_extent_removal_cb(exp->exp_obd->u.cli.cl_cache, func);
-}
-
-static int osc_register_lock_cancel_cb(struct obd_export *exp,
-                                       obd_lock_cancel_cb cb)
-{
-        LASSERT(exp->exp_obd->u.cli.cl_ext_lock_cancel_cb == NULL);
-
-        exp->exp_obd->u.cli.cl_ext_lock_cancel_cb = cb;
-        return 0;
-}
-
-static int osc_unregister_lock_cancel_cb(struct obd_export *exp,
-                                         obd_lock_cancel_cb cb)
-{
-        if (exp->exp_obd->u.cli.cl_ext_lock_cancel_cb != cb) {
-                CERROR("Unregistering cancel cb %p, while only %p was "
-                       "registered\n", cb,
-                       exp->exp_obd->u.cli.cl_ext_lock_cancel_cb);
-                RETURN(-EINVAL);
-        }
-
-        exp->exp_obd->u.cli.cl_ext_lock_cancel_cb = NULL;
-        return 0;
-}
-
-static int osc_process_config(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lustre_cfg *lcfg = buf;
-        struct lprocfs_static_vars lvars = { 0 };
-        int rc = 0;
-
-        lprocfs_osc_init_vars(&lvars);
-
-        rc = class_process_proc_param(PARAM_OSC, lvars.obd_vars, lcfg, obd);
-        return(rc);
-}
-
-struct obd_ops osc_obd_ops = {
-        .o_owner                = THIS_MODULE,
-        .o_setup                = osc_setup,
-        .o_precleanup           = osc_precleanup,
-        .o_cleanup              = osc_cleanup,
-        .o_add_conn             = client_import_add_conn,
-        .o_del_conn             = client_import_del_conn,
-        .o_connect              = client_connect_import,
-        .o_reconnect            = osc_reconnect,
-        .o_disconnect           = osc_disconnect,
-        .o_statfs               = osc_statfs,
-        .o_statfs_async         = osc_statfs_async,
-        .o_packmd               = osc_packmd,
-        .o_unpackmd             = osc_unpackmd,
-        .o_precreate            = osc_precreate,
-        .o_create               = osc_create,
-        .o_destroy              = osc_destroy,
-        .o_getattr              = osc_getattr,
-        .o_getattr_async        = osc_getattr_async,
-        .o_setattr              = osc_setattr,
-        .o_setattr_async        = osc_setattr_async,
-        .o_brw                  = osc_brw,
-        .o_brw_async            = osc_brw_async,
-        .o_prep_async_page      = osc_prep_async_page,
-        .o_queue_async_io       = osc_queue_async_io,
-        .o_set_async_flags      = osc_set_async_flags,
-        .o_queue_group_io       = osc_queue_group_io,
-        .o_trigger_group_io     = osc_trigger_group_io,
-        .o_teardown_async_page  = osc_teardown_async_page,
-        .o_punch                = osc_punch,
-        .o_sync                 = osc_sync,
-        .o_enqueue              = osc_enqueue,
-        .o_match                = osc_match,
-        .o_change_cbdata        = osc_change_cbdata,
-        .o_cancel               = osc_cancel,
-        .o_cancel_unused        = osc_cancel_unused,
-        .o_join_lru             = osc_join_lru,
-        .o_iocontrol            = osc_iocontrol,
-        .o_get_info             = osc_get_info,
-        .o_set_info_async       = osc_set_info_async,
-        .o_import_event         = osc_import_event,
-        .o_llog_init            = osc_llog_init,
-        .o_llog_finish          = osc_llog_finish,
-        .o_process_config       = osc_process_config,
-        .o_register_page_removal_cb = osc_register_page_removal_cb,
-        .o_unregister_page_removal_cb = osc_unregister_page_removal_cb,
-        .o_register_lock_cancel_cb = osc_register_lock_cancel_cb,
-        .o_unregister_lock_cancel_cb = osc_unregister_lock_cancel_cb,
-};
-int __init osc_init(void)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-        int rc;
-        ENTRY;
-
-        lprocfs_osc_init_vars(&lvars);
-
-        request_module("lquota");
-        quota_interface = PORTAL_SYMBOL_GET(osc_quota_interface);
-        lquota_init(quota_interface);
-        init_obd_quota_ops(quota_interface, &osc_obd_ops);
-
-        rc = class_register_type(&osc_obd_ops, lvars.module_vars,
-                                 LUSTRE_OSC_NAME);
-        if (rc) {
-                if (quota_interface)
-                        PORTAL_SYMBOL_PUT(osc_quota_interface);
-                RETURN(rc);
-        }
-
-        RETURN(rc);
-}
-
-#ifdef __KERNEL__
-static void /*__exit*/ osc_exit(void)
-{
-        lquota_exit(quota_interface);
-        if (quota_interface)
-                PORTAL_SYMBOL_PUT(osc_quota_interface);
-
-        class_unregister_type(LUSTRE_OSC_NAME);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Object Storage Client (OSC)");
-MODULE_LICENSE("GPL");
-
-cfs_module(osc, LUSTRE_VERSION_STRING, osc_init, osc_exit);
-#endif
diff --git a/lustre/ost/.cvsignore b/lustre/ost/.cvsignore
deleted file mode 100644
index 5d26f004c3ff3840392e34cb4aaed5287963f9a1..0000000000000000000000000000000000000000
--- a/lustre/ost/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
diff --git a/lustre/ost/Makefile.in b/lustre/ost/Makefile.in
deleted file mode 100644
index 99002e4a8a16f3043d2dda85c051c776d5b1d4f4..0000000000000000000000000000000000000000
--- a/lustre/ost/Makefile.in
+++ /dev/null
@@ -1,4 +0,0 @@
-MODULES := ost
-ost-objs := ost_handler.o lproc_ost.o
-
-@INCLUDE_RULES@
diff --git a/lustre/ost/autoMakefile.am b/lustre/ost/autoMakefile.am
deleted file mode 100644
index f178425e6e2d10ca874b7688785083baada13391..0000000000000000000000000000000000000000
--- a/lustre/ost/autoMakefile.am
+++ /dev/null
@@ -1,11 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if MODULES
-modulefs_DATA = ost$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES = $(ost-objs:%.o=%.c) ost_internal.h
diff --git a/lustre/ost/lproc_ost.c b/lustre/ost/lproc_ost.c
deleted file mode 100644
index 77eeacad64cf567ee80a81b5f7b48ad1492caf51..0000000000000000000000000000000000000000
--- a/lustre/ost/lproc_ost.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_OST
-
-#include <obd_class.h>
-#include <lprocfs_status.h>
-#include <linux/seq_file.h>
-#include "ost_internal.h"
-
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_ost_obd_vars[] = {
-        { "uuid",            lprocfs_rd_uuid,   0, 0 },
-        { 0 }
-};
-
-static struct lprocfs_vars lprocfs_ost_module_vars[] = {
-        { "num_refs",       lprocfs_rd_numrefs, 0, 0 },
-        { 0 }
-};
-
-void lprocfs_ost_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_ost_module_vars;
-    lvars->obd_vars     = lprocfs_ost_obd_vars;
-}
-#endif /* LPROCFS */
diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c
deleted file mode 100644
index a032b829f81b74613485984d65edd1c600743af1..0000000000000000000000000000000000000000
--- a/lustre/ost/ost_handler.c
+++ /dev/null
@@ -1,1998 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- *  Storage Target Handling functions
- *  Lustre Object Server Module (OST)
- *
- *  This server is single threaded at present (but can easily be multi
- *  threaded). For testing and management it is treated as an
- *  obd_device, although it does not export a full OBD method table
- *  (the requests are coming in over the wire, so object target
- *  modules do not have a full method table.)
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_OST
-
-#include <linux/module.h>
-#include <obd_ost.h>
-#include <lustre_net.h>
-#include <lustre_dlm.h>
-#include <lustre_export.h>
-#include <lustre_debug.h>
-#include <linux/init.h>
-#include <lprocfs_status.h>
-#include <lustre_commit_confd.h>
-#include <libcfs/list.h>
-#include <lustre_quota.h>
-#include "ost_internal.h"
-
-static int oss_num_threads;
-CFS_MODULE_PARM(oss_num_threads, "i", int, 0444,
-                "number of OSS service threads to start");
-
-static int ost_num_threads;
-CFS_MODULE_PARM(ost_num_threads, "i", int, 0444,
-                "number of OST service threads to start (deprecated)");
-
-static int oss_num_create_threads;
-CFS_MODULE_PARM(oss_num_create_threads, "i", int, 0444,
-                "number of OSS create threads to start");
-
-void oti_to_request(struct obd_trans_info *oti, struct ptlrpc_request *req)
-{
-        struct oti_req_ack_lock *ack_lock;
-        int i;
-
-        if (oti == NULL)
-                return;
-
-        if (req->rq_repmsg)
-                lustre_msg_set_transno(req->rq_repmsg, oti->oti_transno);
-        req->rq_transno = oti->oti_transno;
-
-        /* XXX 4 == entries in oti_ack_locks??? */
-        for (ack_lock = oti->oti_ack_locks, i = 0; i < 4; i++, ack_lock++) {
-                if (!ack_lock->mode)
-                        break;
-                /* XXX not even calling target_send_reply in some cases... */
-                ptlrpc_save_lock (req, &ack_lock->lock, ack_lock->mode);
-        }
-}
-
-static int ost_destroy(struct obd_export *exp, struct ptlrpc_request *req,
-                       struct obd_trans_info *oti)
-{
-        struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        if (body->oa.o_id == 0)
-                RETURN(-EPROTO);
-
-        if (lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1)) {
-                struct ldlm_request *dlm;
-                dlm = lustre_swab_reqbuf(req, REQ_REC_OFF + 1, sizeof(*dlm),
-                                         lustre_swab_ldlm_request);
-                if (dlm == NULL)
-                        RETURN (-EFAULT);
-                ldlm_request_cancel(req, dlm, 0);
-        }
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        if (body->oa.o_valid & OBD_MD_FLCOOKIE)
-                oti->oti_logcookies = obdo_logcookie(&body->oa);
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
-        req->rq_status = obd_destroy(exp, &body->oa, NULL, oti, NULL);
-        RETURN(0);
-}
-
-static int ost_getattr(struct obd_export *exp, struct ptlrpc_request *req)
-{
-        struct ost_body *body, *repbody;
-        struct obd_info oinfo = { { { 0 } } };
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
-
-        oinfo.oi_oa = &repbody->oa;
-        req->rq_status = obd_getattr(exp, &oinfo);
-        RETURN(0);
-}
-
-static int ost_statfs(struct ptlrpc_request *req)
-{
-        struct obd_statfs *osfs;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*osfs) };
-        ENTRY;
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        osfs = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*osfs));
-
-        req->rq_status = obd_statfs(req->rq_export->exp_obd, osfs, 
-                                    cfs_time_current_64() - HZ, 0);
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_ENOSPC))
-                osfs->os_bfree = osfs->os_bavail = 64;
-        if (req->rq_status != 0)
-                CERROR("ost: statfs failed: rc %d\n", req->rq_status);
-
-        RETURN(0);
-}
-
-static int ost_create(struct obd_export *exp, struct ptlrpc_request *req,
-                      struct obd_trans_info *oti)
-{
-        struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
-        oti->oti_logcookies = obdo_logcookie(&repbody->oa);
-        req->rq_status = obd_create(exp, &repbody->oa, NULL, oti);
-        //obd_log_cancel(conn, NULL, 1, oti->oti_logcookies, 0);
-        RETURN(0);
-}
-
-/*
- * Helper function for ost_punch(): if asked by client, acquire [size, EOF]
- * lock on the file being truncated.
- */
-static int ost_punch_lock_get(struct obd_export *exp, struct obdo *oa,
-                              struct lustre_handle *lh)
-{
-        int flags;
-        struct ldlm_res_id res_id = { .name = { oa->o_id } };
-        ldlm_policy_data_t policy;
-        __u64 start;
-        __u64 finis;
-
-        ENTRY;
-
-        LASSERT(!lustre_handle_is_used(lh));
-
-        if (!(oa->o_valid & OBD_MD_FLFLAGS) ||
-            !(oa->o_flags & OBD_FL_TRUNCLOCK))
-                RETURN(0);
-
-        CDEBUG(D_INODE, "OST-side truncate lock.\n");
-
-        start = oa->o_size;
-        finis = start + oa->o_blocks;
-
-        /*
-         * standard truncate optimization: if file body is completely
-         * destroyed, don't send data back to the server.
-         */
-        flags = (start == 0) ? LDLM_AST_DISCARD_DATA : 0;
-
-        policy.l_extent.start = start & CFS_PAGE_MASK;
-
-        /*
-         * If ->o_blocks is EOF it means "lock till the end of the
-         * file". Otherwise, it's size of a hole being punched (in bytes)
-         */
-        if (oa->o_blocks == OBD_OBJECT_EOF || finis < start)
-                policy.l_extent.end = OBD_OBJECT_EOF;
-        else
-                policy.l_extent.end = finis | ~CFS_PAGE_MASK;
-
-        RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id, 
-                                      LDLM_EXTENT, &policy, LCK_PW, &flags,
-                                      ldlm_blocking_ast, ldlm_completion_ast,
-                                      ldlm_glimpse_ast, NULL, 0, NULL, lh));
-}
-
-/*
- * Helper function for ost_punch(): release lock acquired by
- * ost_punch_lock_get(), if any.
- */
-static void ost_punch_lock_put(struct obd_export *exp, struct obdo *oa,
-                               struct lustre_handle *lh)
-{
-        ENTRY;
-        if (lustre_handle_is_used(lh))
-                ldlm_lock_decref(lh, LCK_PW);
-        EXIT;
-}
-
-static int ost_punch(struct obd_export *exp, struct ptlrpc_request *req,
-                     struct obd_trans_info *oti)
-{
-        struct obd_info oinfo = { { { 0 } } };
-        struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
-        struct lustre_handle lh = {0,};
-        ENTRY;
-
-        /* check that we do support OBD_CONNECT_TRUNCLOCK. */
-        CLASSERT(OST_CONNECT_SUPPORTED & OBD_CONNECT_TRUNCLOCK);
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        oinfo.oi_oa = &body->oa;
-        oinfo.oi_policy.l_extent.start = oinfo.oi_oa->o_size;
-        oinfo.oi_policy.l_extent.end = oinfo.oi_oa->o_blocks;
-
-        if ((oinfo.oi_oa->o_valid & (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS)) !=
-            (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS))
-                RETURN(-EINVAL);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        rc = ost_punch_lock_get(exp, oinfo.oi_oa, &lh);
-        if (rc == 0) {
-                if (oinfo.oi_oa->o_valid & OBD_MD_FLFLAGS &&
-                    oinfo.oi_oa->o_flags == OBD_FL_TRUNCLOCK)
-                        /*
-                         * If OBD_FL_TRUNCLOCK is the only bit set in
-                         * ->o_flags, clear OBD_MD_FLFLAGS to avoid falling
-                         * through filter_setattr() to filter_iocontrol().
-                         */
-                        oinfo.oi_oa->o_valid &= ~OBD_MD_FLFLAGS;
-
-                req->rq_status = obd_punch(exp, &oinfo, oti, NULL);
-                ost_punch_lock_put(exp, oinfo.oi_oa, &lh);
-        }
-        repbody->oa = *oinfo.oi_oa;
-        RETURN(rc);
-}
-
-static int ost_sync(struct obd_export *exp, struct ptlrpc_request *req)
-{
-        struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
-        req->rq_status = obd_sync(exp, &repbody->oa, NULL, repbody->oa.o_size,
-                                  repbody->oa.o_blocks);
-        RETURN(0);
-}
-
-static int ost_setattr(struct obd_export *exp, struct ptlrpc_request *req,
-                       struct obd_trans_info *oti)
-{
-        struct ost_body *body, *repbody;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repbody) };
-        struct obd_info oinfo = { { { 0 } } };
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL)
-                RETURN(-EFAULT);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        memcpy(&repbody->oa, &body->oa, sizeof(body->oa));
-
-        oinfo.oi_oa = &repbody->oa;
-        req->rq_status = obd_setattr(exp, &oinfo, oti);
-        RETURN(0);
-}
-
-static int ost_bulk_timeout(void *data)
-{
-        ENTRY;
-        /* We don't fail the connection here, because having the export
-         * killed makes the (vital) call to commitrw very sad.
-         */
-        RETURN(1);
-}
-
-static int get_per_page_niobufs(struct obd_ioobj *ioo, int nioo,
-                                struct niobuf_remote *rnb, int nrnb,
-                                struct niobuf_remote **pp_rnbp)
-{
-        /* Copy a remote niobuf, splitting it into page-sized chunks
-         * and setting ioo[i].ioo_bufcnt accordingly */
-        struct niobuf_remote *pp_rnb;
-        int   i;
-        int   j;
-        int   page;
-        int   rnbidx = 0;
-        int   npages = 0;
-
-        /*
-         * array of sufficient size already preallocated by caller
-         */
-        LASSERT(pp_rnbp != NULL);
-        LASSERT(*pp_rnbp != NULL);
-
-        /* first count and check the number of pages required */
-        for (i = 0; i < nioo; i++)
-                for (j = 0; j < ioo->ioo_bufcnt; j++, rnbidx++) {
-                        obd_off offset = rnb[rnbidx].offset;
-                        obd_off p0 = offset >> CFS_PAGE_SHIFT;
-                        obd_off pn = (offset + rnb[rnbidx].len - 1)>>CFS_PAGE_SHIFT;
-
-                        LASSERT(rnbidx < nrnb);
-
-                        npages += (pn + 1 - p0);
-
-                        if (rnb[rnbidx].len == 0) {
-                                CERROR("zero len BRW: obj %d objid "LPX64
-                                       " buf %u\n", i, ioo[i].ioo_id, j);
-                                return -EINVAL;
-                        }
-                        if (j > 0 &&
-                            rnb[rnbidx].offset <= rnb[rnbidx-1].offset) {
-                                CERROR("unordered BRW: obj %d objid "LPX64
-                                       " buf %u offset "LPX64" <= "LPX64"\n",
-                                       i, ioo[i].ioo_id, j, rnb[rnbidx].offset,
-                                       rnb[rnbidx].offset);
-                                return -EINVAL;
-                        }
-                }
-
-        LASSERT(rnbidx == nrnb);
-
-        if (npages == nrnb) {       /* all niobufs are for single pages */
-                *pp_rnbp = rnb;
-                return npages;
-        }
-
-        pp_rnb = *pp_rnbp;
-
-        /* now do the actual split */
-        page = rnbidx = 0;
-        for (i = 0; i < nioo; i++) {
-                int  obj_pages = 0;
-
-                for (j = 0; j < ioo[i].ioo_bufcnt; j++, rnbidx++) {
-                        obd_off off = rnb[rnbidx].offset;
-                        int     nob = rnb[rnbidx].len;
-
-                        LASSERT(rnbidx < nrnb);
-                        do {
-                                obd_off  poff = off & ~CFS_PAGE_MASK;
-                                int      pnob = (poff + nob > CFS_PAGE_SIZE) ?
-                                                CFS_PAGE_SIZE - poff : nob;
-
-                                LASSERT(page < npages);
-                                pp_rnb[page].len = pnob;
-                                pp_rnb[page].offset = off;
-                                pp_rnb[page].flags = rnb[rnbidx].flags;
-
-                                CDEBUG(0, "   obj %d id "LPX64
-                                       "page %d(%d) "LPX64" for %d, flg %x\n",
-                                       i, ioo[i].ioo_id, obj_pages, page,
-                                       pp_rnb[page].offset, pp_rnb[page].len,
-                                       pp_rnb[page].flags);
-                                page++;
-                                obj_pages++;
-
-                                off += pnob;
-                                nob -= pnob;
-                        } while (nob > 0);
-                        LASSERT(nob == 0);
-                }
-                ioo[i].ioo_bufcnt = obj_pages;
-        }
-        LASSERT(page == npages);
-
-        return npages;
-}
-
-static __u32 ost_checksum_bulk(struct ptlrpc_bulk_desc *desc, int opc,
-                               cksum_type_t cksum_type)
-{
-        __u32 cksum;
-        int i;
-
-        cksum = init_checksum(cksum_type);
-        for (i = 0; i < desc->bd_iov_count; i++) {
-                struct page *page = desc->bd_iov[i].kiov_page;
-                int off = desc->bd_iov[i].kiov_offset & ~CFS_PAGE_MASK;
-                char *ptr = kmap(page) + off;
-                int len = desc->bd_iov[i].kiov_len;
-
-                /* corrupt the data before we compute the checksum, to
-                 * simulate a client->OST data error */
-                if (i == 0 && opc == OST_WRITE &&
-                    OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_CHECKSUM_RECEIVE))
-                        memcpy(ptr, "bad3", min(4, len));
-                cksum = compute_checksum(cksum, ptr, len, cksum_type);
-                /* corrupt the data after we compute the checksum, to
-                 * simulate an OST->client data error */
-                if (i == 0 && opc == OST_READ &&
-                    OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_CHECKSUM_SEND))
-                        memcpy(ptr, "bad4", min(4, len));
-                kunmap(page);
-        }
-
-        return cksum;
-}
-
-/*
- * populate @nio by @nrpages pages from per-thread page pool
- */
-static void ost_nio_pages_get(struct ptlrpc_request *req,
-                              struct niobuf_local *nio, int nrpages)
-{
-        int i;
-        struct ost_thread_local_cache *tls;
-
-        ENTRY;
-
-        LASSERT(nrpages <= OST_THREAD_POOL_SIZE);
-        LASSERT(req != NULL);
-        LASSERT(req->rq_svc_thread != NULL);
-
-        tls = ost_tls(req);
-        LASSERT(tls != NULL);
-
-        memset(nio, 0, nrpages * sizeof *nio);
-        for (i = 0; i < nrpages; ++ i) {
-                struct page *page;
-
-                page = tls->page[i];
-                LASSERT(page != NULL);
-                POISON_PAGE(page, 0xf1);
-                nio[i].page = page;
-                LL_CDEBUG_PAGE(D_INFO, page, "%d\n", i);
-        }
-        EXIT;
-}
-
-/*
- * Dual for ost_nio_pages_get(). Poison pages in pool for debugging
- */
-static void ost_nio_pages_put(struct ptlrpc_request *req,
-                              struct niobuf_local *nio, int nrpages)
-{
-        int i;
-
-        ENTRY;
-
-        LASSERT(nrpages <= OST_THREAD_POOL_SIZE);
-
-        for (i = 0; i < nrpages; ++ i)
-                POISON_PAGE(nio[i].page, 0xf2);
-        EXIT;
-}
-
-static int ost_brw_lock_get(int mode, struct obd_export *exp,
-                            struct obd_ioobj *obj, struct niobuf_remote *nb,
-                            struct lustre_handle *lh)
-{
-        int flags                 = 0;
-        int nrbufs                = obj->ioo_bufcnt;
-        struct ldlm_res_id res_id = { .name = { obj->ioo_id } };
-        ldlm_policy_data_t policy;
-        int i;
-
-        ENTRY;
-
-        LASSERT(mode == LCK_PR || mode == LCK_PW);
-        LASSERT(!lustre_handle_is_used(lh));
-
-        if (nrbufs == 0 || !(nb[0].flags & OBD_BRW_SRVLOCK))
-                RETURN(0);
-
-        /* EXPENSIVE ASSERTION */
-        for (i = 1; i < nrbufs; i ++)
-                LASSERT((nb[0].flags & OBD_BRW_SRVLOCK) ==
-                        (nb[i].flags & OBD_BRW_SRVLOCK));
-
-        policy.l_extent.start = nb[0].offset & CFS_PAGE_MASK;
-        policy.l_extent.end   = (nb[nrbufs - 1].offset +
-                                 nb[nrbufs - 1].len - 1) | ~CFS_PAGE_MASK;
-
-        RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id, 
-                                      LDLM_EXTENT, &policy, mode, &flags,
-                                      ldlm_blocking_ast, ldlm_completion_ast,
-                                      ldlm_glimpse_ast, NULL, 0, NULL, lh));
-}
-
-static void ost_brw_lock_put(int mode,
-                             struct obd_ioobj *obj, struct niobuf_remote *niob,
-                             struct lustre_handle *lh)
-{
-        ENTRY;
-        LASSERT(mode == LCK_PR || mode == LCK_PW);
-        LASSERT((obj->ioo_bufcnt > 0 && (niob[0].flags & OBD_BRW_SRVLOCK)) ==
-                lustre_handle_is_used(lh));
-        if (lustre_handle_is_used(lh))
-                ldlm_lock_decref(lh, mode);
-        EXIT;
-}
-
-struct ost_prolong_data {
-        struct obd_export *opd_exp;
-        ldlm_policy_data_t opd_policy;
-        ldlm_mode_t opd_mode;
-};
-
-static int ost_prolong_locks_iter(struct ldlm_lock *lock, void *data)
-{
-        struct ost_prolong_data *opd = data;
-
-        LASSERT(lock->l_resource->lr_type == LDLM_EXTENT);
-
-        if (lock->l_req_mode != lock->l_granted_mode) {
-                /* scan granted locks only */
-                return LDLM_ITER_STOP;
-        }
-
-        if (lock->l_export != opd->opd_exp) {
-                /* prolong locks only for given client */
-                return LDLM_ITER_CONTINUE;
-        }
-
-        if (!(lock->l_granted_mode & opd->opd_mode)) {
-                /* we aren't interesting in all type of locks */
-                return LDLM_ITER_CONTINUE;
-        }
-
-        if (lock->l_policy_data.l_extent.end < opd->opd_policy.l_extent.start ||
-            lock->l_policy_data.l_extent.start > opd->opd_policy.l_extent.end) {
-                /* the request doesn't cross the lock, skip it */
-                return LDLM_ITER_CONTINUE;
-        }
-
-        if (!(lock->l_flags & LDLM_FL_AST_SENT)) {
-                /* ignore locks not being cancelled */
-                return LDLM_ITER_CONTINUE;
-        }
-
-        /* OK. this is a possible lock the user holds doing I/O
-         * let's refresh eviction timer for it */
-        ldlm_refresh_waiting_lock(lock);
-
-        return LDLM_ITER_CONTINUE;
-}
-
-static void ost_prolong_locks(struct obd_export *exp, struct obd_ioobj *obj,
-                              struct niobuf_remote *nb, ldlm_mode_t mode)
-{
-        struct ldlm_res_id res_id = { .name = { obj->ioo_id } };
-        int nrbufs = obj->ioo_bufcnt;
-        struct ost_prolong_data opd;
-
-        ENTRY;
-
-        opd.opd_mode = mode;
-        opd.opd_exp = exp;
-        opd.opd_policy.l_extent.start = nb[0].offset & CFS_PAGE_MASK;
-        opd.opd_policy.l_extent.end = (nb[nrbufs - 1].offset +
-                                       nb[nrbufs - 1].len - 1) | ~CFS_PAGE_MASK;
-
-        CDEBUG(D_DLMTRACE,"refresh locks: "LPU64"/"LPU64" ("LPU64"->"LPU64")\n",
-               res_id.name[0], res_id.name[1], opd.opd_policy.l_extent.start,
-               opd.opd_policy.l_extent.end);
-        ldlm_resource_iterate(exp->exp_obd->obd_namespace, &res_id,
-                              ost_prolong_locks_iter, &opd);
-}
-
-static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
-{
-        struct ptlrpc_bulk_desc *desc;
-        struct obd_export       *exp = req->rq_export;
-        struct niobuf_remote *remote_nb;
-        struct niobuf_remote *pp_rnb = NULL;
-        struct niobuf_local *local_nb;
-        struct obd_ioobj *ioo;
-        struct ost_body *body, *repbody;
-        struct l_wait_info lwi;
-        struct lustre_handle lockh = { 0 };
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int niocount, npages, nob = 0, rc, i;
-        int no_reply = 0;
-        ENTRY;
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_READ_BULK))
-                GOTO(out, rc = -EIO);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_BULK, (obd_timeout + 1) / 4);
-
-        /* Check if there is eviction in progress, and if so, wait for it to
-         * finish */
-        if (unlikely(atomic_read(&exp->exp_obd->obd_evict_inprogress))) {
-                lwi = LWI_INTR(NULL, NULL); // We do not care how long it takes
-                rc = l_wait_event(exp->exp_obd->obd_evict_inprogress_waitq,
-                        !atomic_read(&exp->exp_obd->obd_evict_inprogress),
-                        &lwi);
-        }
-        if (exp->exp_failed)
-                GOTO(out, rc = -ENOTCONN);
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR("Missing/short ost_body\n");
-                GOTO(out, rc = -EFAULT);
-        }
-
-        ioo = lustre_swab_reqbuf(req, REQ_REC_OFF + 1, sizeof(*ioo),
-                                 lustre_swab_obd_ioobj);
-        if (ioo == NULL) {
-                CERROR("Missing/short ioobj\n");
-                GOTO(out, rc = -EFAULT);
-        }
-
-        niocount = ioo->ioo_bufcnt;
-        if (niocount > PTLRPC_MAX_BRW_PAGES) {
-                DEBUG_REQ(D_ERROR, req, "bulk has too many pages (%d)",
-                          niocount);
-                GOTO(out, rc = -EFAULT);
-        }
-
-        remote_nb = lustre_swab_reqbuf(req, REQ_REC_OFF + 2,
-                                       niocount * sizeof(*remote_nb),
-                                       lustre_swab_niobuf_remote);
-        if (remote_nb == NULL) {
-                CERROR("Missing/short niobuf\n");
-                GOTO(out, rc = -EFAULT);
-        }
-        if (lustre_msg_swabbed(req->rq_reqmsg)) { /* swab remaining niobufs */
-                for (i = 1; i < niocount; i++)
-                        lustre_swab_niobuf_remote (&remote_nb[i]);
-        }
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        /*
-         * Per-thread array of struct niobuf_{local,remote}'s was allocated by
-         * ost_thread_init().
-         */
-        local_nb = ost_tls(req)->local;
-        pp_rnb   = ost_tls(req)->remote;
-
-        /* FIXME all niobuf splitting should be done in obdfilter if needed */
-        /* CAVEAT EMPTOR this sets ioo->ioo_bufcnt to # pages */
-        npages = get_per_page_niobufs(ioo, 1, remote_nb, niocount, &pp_rnb);
-        if (npages < 0)
-                GOTO(out, rc = npages);
-
-        LASSERT(npages <= OST_THREAD_POOL_SIZE);
-
-        ost_nio_pages_get(req, local_nb, npages);
-
-        desc = ptlrpc_prep_bulk_exp(req, npages,
-                                     BULK_PUT_SOURCE, OST_BULK_PORTAL);
-        if (desc == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        rc = ost_brw_lock_get(LCK_PR, exp, ioo, pp_rnb, &lockh);
-        if (rc != 0)
-                GOTO(out_bulk, rc);
-
-        /* 
-         * If getting the lock took more time than
-         * client was willing to wait, drop it. b=11330
-         */
-        if (cfs_time_current_sec() > req->rq_deadline || 
-            OBD_FAIL_CHECK(OBD_FAIL_OST_DROP_REQ)) {
-                no_reply = 1;
-                CERROR("Dropping timed-out read from %s because locking"
-                       "object "LPX64" took %ld seconds (limit was %ld).\n",
-                       libcfs_id2str(req->rq_peer), ioo->ioo_id,
-                       cfs_time_current_sec() - req->rq_arrival_time.tv_sec,
-                       req->rq_deadline - req->rq_arrival_time.tv_sec);
-                GOTO(out_lock, rc = -ETIMEDOUT);
-        }
-
-        rc = obd_preprw(OBD_BRW_READ, exp, &body->oa, 1,
-                        ioo, npages, pp_rnb, local_nb, oti);
-        if (rc != 0)
-                GOTO(out_lock, rc);
-
-        ost_prolong_locks(exp, ioo, pp_rnb, LCK_PW | LCK_PR);
-
-        nob = 0;
-        for (i = 0; i < npages; i++) {
-                int page_rc = local_nb[i].rc;
-
-                if (page_rc < 0) {              /* error */
-                        rc = page_rc;
-                        break;
-                }
-
-                LASSERTF(page_rc <= pp_rnb[i].len, "page_rc (%d) > "
-                         "pp_rnb[%d].len (%d)\n", page_rc, i, pp_rnb[i].len);
-                nob += page_rc;
-                if (page_rc != 0) {             /* some data! */
-                        LASSERT (local_nb[i].page != NULL);
-                        ptlrpc_prep_bulk_page(desc, local_nb[i].page,
-                                              pp_rnb[i].offset & ~CFS_PAGE_MASK,
-                                              page_rc);
-                }
-
-                if (page_rc != pp_rnb[i].len) { /* short read */
-                        /* All subsequent pages should be 0 */
-                        while(++i < npages)
-                                LASSERT(local_nb[i].rc == 0);
-                        break;
-                }
-        }
-
-        if (body->oa.o_valid & OBD_MD_FLCKSUM) {
-                cksum_type_t cksum_type = OBD_CKSUM_CRC32;
-
-                if (body->oa.o_valid & OBD_MD_FLFLAGS)
-                        cksum_type = cksum_type_unpack(body->oa.o_flags);
-                body->oa.o_flags = cksum_type_pack(cksum_type);
-                body->oa.o_valid = OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
-                body->oa.o_cksum = ost_checksum_bulk(desc, OST_READ, cksum_type);
-                CDEBUG(D_PAGE,"checksum at read origin: %x\n",body->oa.o_cksum);
-        } else {
-                body->oa.o_valid = 0;
-        }
-        /* We're finishing using body->oa as an input variable */
-
-        /* Check if client was evicted while we were doing i/o before touching
-           network */
-        if (rc == 0) {
-                /* Check if there is eviction in progress, and if so, wait for
-                 * it to finish */
-                if (unlikely(atomic_read(&exp->exp_obd->
-                                                obd_evict_inprogress))) {
-                        lwi = LWI_INTR(NULL, NULL);
-                        rc = l_wait_event(exp->exp_obd->
-                                                obd_evict_inprogress_waitq,
-                                          !atomic_read(&exp->exp_obd->
-                                                        obd_evict_inprogress),
-                                          &lwi);
-                }
-                if (exp->exp_failed)
-                        rc = -ENOTCONN;
-                else
-                        rc = ptlrpc_start_bulk_transfer(desc);
-                if (rc == 0) {
-                        time_t start = cfs_time_current_sec();
-                        do {
-                                long timeoutl = req->rq_deadline - 
-                                        cfs_time_current_sec();
-                                cfs_duration_t timeout = (timeoutl <= 0 || rc) ? 
-                                        CFS_TICK : cfs_time_seconds(timeoutl);
-                                lwi = LWI_TIMEOUT_INTERVAL(timeout, 
-                                                           cfs_time_seconds(1),
-                                                           ost_bulk_timeout, 
-                                                           desc);
-                                rc = l_wait_event(desc->bd_waitq, 
-                                                  !ptlrpc_bulk_active(desc) ||
-                                                  exp->exp_failed, &lwi);
-                                LASSERT(rc == 0 || rc == -ETIMEDOUT);
-                                /* Wait again if we changed deadline */
-                        } while ((rc == -ETIMEDOUT) && 
-                                 (req->rq_deadline > cfs_time_current_sec()));
-
-                        if (rc == -ETIMEDOUT) {
-                                DEBUG_REQ(D_ERROR, req,
-                                          "timeout on bulk PUT after %ld%+lds",
-                                          req->rq_deadline - start,
-                                          cfs_time_current_sec() -
-                                          req->rq_deadline);
-                                ptlrpc_abort_bulk(desc);
-                        } else if (exp->exp_failed) {
-                                DEBUG_REQ(D_ERROR, req, "Eviction on bulk PUT");
-                                rc = -ENOTCONN;
-                                ptlrpc_abort_bulk(desc);
-                        } else if (!desc->bd_success ||
-                                   desc->bd_nob_transferred != desc->bd_nob) {
-                                DEBUG_REQ(D_ERROR, req, "%s bulk PUT %d(%d)",
-                                          desc->bd_success ?
-                                          "truncated" : "network error on",
-                                          desc->bd_nob_transferred,
-                                          desc->bd_nob);
-                                /* XXX should this be a different errno? */
-                                rc = -ETIMEDOUT;
-                        }
-                } else {
-                        DEBUG_REQ(D_ERROR, req, "bulk PUT failed: rc %d", rc);
-                }
-                no_reply = rc != 0;
-        }
-
-        /* Must commit after prep above in all cases */
-        rc = obd_commitrw(OBD_BRW_READ, exp, &body->oa, 1,
-                          ioo, npages, local_nb, oti, rc);
-
-        ost_nio_pages_put(req, local_nb, npages);
-
-        if (rc == 0) {
-                repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                         sizeof(*repbody));
-                memcpy(&repbody->oa, &body->oa, sizeof(repbody->oa));
-        }
-
- out_lock:
-        ost_brw_lock_put(LCK_PR, ioo, pp_rnb, &lockh);
- out_bulk:
-        ptlrpc_free_bulk(desc);
- out:
-        LASSERT(rc <= 0);
-        if (rc == 0) {
-                req->rq_status = nob;
-                target_committed_to_req(req);
-                ptlrpc_reply(req);
-        } else if (!no_reply) {
-                /* Only reply if there was no comms problem with bulk */
-                target_committed_to_req(req);
-                req->rq_status = rc;
-                ptlrpc_error(req);
-        } else {
-                /* reply out callback would free */
-                ptlrpc_req_drop_rs(req);
-                CWARN("%s: ignoring bulk IO comm error with %s@%s id %s - "
-                      "client will retry\n",
-                      exp->exp_obd->obd_name,
-                      exp->exp_client_uuid.uuid,
-                      exp->exp_connection->c_remote_uuid.uuid,
-                      libcfs_id2str(req->rq_peer));
-        }
-
-        RETURN(rc);
-}
-
-static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
-{
-        struct ptlrpc_bulk_desc *desc;
-        struct obd_export       *exp = req->rq_export;
-        struct niobuf_remote    *remote_nb;
-        struct niobuf_remote    *pp_rnb;
-        struct niobuf_local     *local_nb;
-        struct obd_ioobj        *ioo;
-        struct ost_body         *body, *repbody;
-        struct l_wait_info       lwi;
-        struct lustre_handle     lockh = {0};
-        __u32                   *rcs;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int objcount, niocount, npages;
-        int rc, swab, i, j;
-        obd_count                client_cksum = 0, server_cksum = 0;
-        cksum_type_t             cksum_type = OBD_CKSUM_CRC32;
-        int                      no_reply = 0; 
-        ENTRY;
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_WRITE_BULK))
-                GOTO(out, rc = -EIO);
-        if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_WRITE_BULK2))
-                GOTO(out, rc = -EFAULT);
-
-        /* pause before transaction has been started */
-        OBD_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_BULK, (obd_timeout + 1) / 4);
-
-        /* Check if there is eviction in progress, and if so, wait for it to
-         * finish */
-        if (unlikely(atomic_read(&exp->exp_obd->obd_evict_inprogress))) {
-                lwi = LWI_INTR(NULL, NULL); // We do not care how long it takes
-                rc = l_wait_event(exp->exp_obd->obd_evict_inprogress_waitq,
-                        !atomic_read(&exp->exp_obd->obd_evict_inprogress),
-                        &lwi);
-        }
-        if (exp->exp_failed)
-                GOTO(out, rc = -ENOTCONN);
-
-        swab = lustre_msg_swabbed(req->rq_reqmsg);
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_ost_body);
-        if (body == NULL) {
-                CERROR("Missing/short ost_body\n");
-                GOTO(out, rc = -EFAULT);
-        }
-
-        lustre_set_req_swabbed(req, REQ_REC_OFF + 1);
-        objcount = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1) /
-                   sizeof(*ioo);
-        if (objcount == 0) {
-                CERROR("Missing/short ioobj\n");
-                GOTO(out, rc = -EFAULT);
-        }
-        if (objcount > 1) {
-                CERROR("too many ioobjs (%d)\n", objcount);
-                GOTO(out, rc = -EFAULT);
-        }
-
-        ioo = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1,
-                             objcount * sizeof(*ioo));
-        LASSERT (ioo != NULL);
-        for (niocount = i = 0; i < objcount; i++) {
-                if (swab)
-                        lustre_swab_obd_ioobj(&ioo[i]);
-                if (ioo[i].ioo_bufcnt == 0) {
-                        CERROR("ioo[%d] has zero bufcnt\n", i);
-                        GOTO(out, rc = -EFAULT);
-                }
-                niocount += ioo[i].ioo_bufcnt;
-        }
-
-        if (niocount > PTLRPC_MAX_BRW_PAGES) {
-                DEBUG_REQ(D_ERROR, req, "bulk has too many pages (%d)",
-                          niocount);
-                GOTO(out, rc = -EFAULT);
-        }
-
-        remote_nb = lustre_swab_reqbuf(req, REQ_REC_OFF + 2,
-                                       niocount * sizeof(*remote_nb),
-                                       lustre_swab_niobuf_remote);
-        if (remote_nb == NULL) {
-                CERROR("Missing/short niobuf\n");
-                GOTO(out, rc = -EFAULT);
-        }
-        if (swab) {                             /* swab the remaining niobufs */
-                for (i = 1; i < niocount; i++)
-                        lustre_swab_niobuf_remote (&remote_nb[i]);
-        }
-
-        size[REPLY_REC_OFF + 1] = niocount * sizeof(*rcs);
-        rc = lustre_pack_reply(req, 3, size, NULL);
-        if (rc != 0)
-                GOTO(out, rc);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_OST_BRW_PAUSE_PACK, obd_fail_val);
-        rcs = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1,
-                             niocount * sizeof(*rcs));
-
-        /*
-         * Per-thread array of struct niobuf_{local,remote}'s was allocated by
-         * ost_thread_init().
-         */
-        local_nb = ost_tls(req)->local;
-        pp_rnb   = ost_tls(req)->remote;
-
-        /* FIXME all niobuf splitting should be done in obdfilter if needed */
-        /* CAVEAT EMPTOR this sets ioo->ioo_bufcnt to # pages */
-        npages = get_per_page_niobufs(ioo, objcount,remote_nb,niocount,&pp_rnb);
-        if (npages < 0)
-                GOTO(out, rc = npages);
-
-        LASSERT(npages <= OST_THREAD_POOL_SIZE);
-
-        ost_nio_pages_get(req, local_nb, npages);
-
-        desc = ptlrpc_prep_bulk_exp(req, npages,
-                                     BULK_GET_SINK, OST_BULK_PORTAL);
-        if (desc == NULL)
-                GOTO(out, rc = -ENOMEM);
-
-        rc = ost_brw_lock_get(LCK_PW, exp, ioo, pp_rnb, &lockh);
-        if (rc != 0)
-                GOTO(out_bulk, rc);
-
-        /* 
-         * If getting the lock took more time than
-         * client was willing to wait, drop it. b=11330
-         */
-        if (cfs_time_current_sec() > req->rq_deadline || 
-            OBD_FAIL_CHECK(OBD_FAIL_OST_DROP_REQ)) {
-                no_reply = 1;
-                CERROR("Dropping timed-out write from %s because locking "
-                       "object "LPX64" took %ld seconds (limit was %ld).\n",
-                       libcfs_id2str(req->rq_peer), ioo->ioo_id,
-                       cfs_time_current_sec() - req->rq_arrival_time.tv_sec,
-                       req->rq_deadline - req->rq_arrival_time.tv_sec);
-                GOTO(out_lock, rc = -ETIMEDOUT);
-        }
-
-        ost_prolong_locks(exp, ioo, pp_rnb, LCK_PW);
-
-        /* obd_preprw clobbers oa->valid, so save what we need */
-        if (body->oa.o_valid & OBD_MD_FLCKSUM) {
-                client_cksum = body->oa.o_cksum;
-                if (body->oa.o_valid & OBD_MD_FLFLAGS)
-                        cksum_type = cksum_type_unpack(body->oa.o_flags);
-        }
-
-        /* Because we already sync grant info with client when reconnect,
-         * grant info will be cleared for resent req, then fed_grant and 
-         * total_grant will not be modified in following preprw_write*/ 
-        if (lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT | MSG_REPLAY)) {
-                DEBUG_REQ(D_CACHE, req, "clear resent/replay req grant info");
-                body->oa.o_valid &= ~OBD_MD_FLGRANT;
-        }
-
-        rc = obd_preprw(OBD_BRW_WRITE, exp, &body->oa, objcount,
-                        ioo, npages, pp_rnb, local_nb, oti);
-        if (rc != 0)
-                GOTO(out_lock, rc);
-
-        /* NB Having prepped, we must commit... */
-
-        for (i = 0; i < npages; i++)
-                ptlrpc_prep_bulk_page(desc, local_nb[i].page,
-                                      pp_rnb[i].offset & ~CFS_PAGE_MASK,
-                                      pp_rnb[i].len);
-
-        /* Check if client was evicted while we were doing i/o before touching
-           network */
-        if (desc->bd_export->exp_failed)
-                rc = -ENOTCONN;
-        else
-                rc = ptlrpc_start_bulk_transfer (desc);
-        if (rc == 0) {
-                time_t start = cfs_time_current_sec();
-                do {
-                        long timeoutl = req->rq_deadline - 
-                                cfs_time_current_sec();
-                        cfs_duration_t timeout = (timeoutl <= 0 || rc) ? 
-                                CFS_TICK : cfs_time_seconds(timeoutl);
-                        lwi = LWI_TIMEOUT_INTERVAL(timeout, cfs_time_seconds(1),
-                                                   ost_bulk_timeout, desc);
-                        rc = l_wait_event(desc->bd_waitq, 
-                                          !ptlrpc_bulk_active(desc) ||
-                                          desc->bd_export->exp_failed, &lwi);
-                        LASSERT(rc == 0 || rc == -ETIMEDOUT);
-                        /* Wait again if we changed deadline */
-                } while ((rc == -ETIMEDOUT) && 
-                         (req->rq_deadline > cfs_time_current_sec()));
-
-                if (rc == -ETIMEDOUT) {
-                        DEBUG_REQ(D_ERROR, req,
-                                  "timeout on bulk GET after %ld%+lds",
-                                  req->rq_deadline - start,
-                                  cfs_time_current_sec() -
-                                  req->rq_deadline);
-                        ptlrpc_abort_bulk(desc);
-                } else if (desc->bd_export->exp_failed) {
-                        DEBUG_REQ(D_ERROR, req, "Eviction on bulk GET");
-                        rc = -ENOTCONN;
-                        ptlrpc_abort_bulk(desc);
-                } else if (!desc->bd_success ||
-                           desc->bd_nob_transferred != desc->bd_nob) {
-                        DEBUG_REQ(D_ERROR, req, "%s bulk GET %d(%d)",
-                                  desc->bd_success ?
-                                  "truncated" : "network error on",
-                                  desc->bd_nob_transferred, desc->bd_nob);
-                        /* XXX should this be a different errno? */
-                        rc = -ETIMEDOUT;
-                }
-        } else {
-                DEBUG_REQ(D_ERROR, req, "ptlrpc_bulk_get failed: rc %d", rc);
-        }
-        no_reply = rc != 0;
-
-        repbody = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                 sizeof(*repbody));
-        memcpy(&repbody->oa, &body->oa, sizeof(repbody->oa));
-
-        if (client_cksum != 0 && rc == 0) {
-                static int cksum_counter;
-
-                repbody->oa.o_valid |= OBD_MD_FLCKSUM | OBD_MD_FLFLAGS;
-                repbody->oa.o_flags &= ~OBD_FL_CKSUM_ALL;
-                repbody->oa.o_flags |= cksum_type_pack(cksum_type);
-                server_cksum = ost_checksum_bulk(desc, OST_WRITE, cksum_type);
-                repbody->oa.o_cksum = server_cksum;
-                cksum_counter++;
-                if (unlikely(client_cksum != server_cksum)) {
-                        CERROR("client csum %x, server csum %x\n",
-                               client_cksum, server_cksum);
-                        cksum_counter = 0;
-                } else if ((cksum_counter & (-cksum_counter)) == cksum_counter){
-                        CDEBUG(D_INFO, "Checksum %u from %s OK: %x\n",
-                               cksum_counter, libcfs_id2str(req->rq_peer),
-                               server_cksum);
-                }
-        }
-
-        /* Check if there is eviction in progress, and if so, wait for
-         * it to finish */
-        if (unlikely(atomic_read(&exp->exp_obd->obd_evict_inprogress))) {
-                lwi = LWI_INTR(NULL, NULL);
-                rc = l_wait_event(exp->exp_obd->obd_evict_inprogress_waitq,
-                        !atomic_read(&exp->exp_obd->obd_evict_inprogress),
-                        &lwi);
-        }
-        if (rc == 0 && exp->exp_failed)
-                rc = -ENOTCONN;
-
-        /* Must commit after prep above in all cases */
-        rc = obd_commitrw(OBD_BRW_WRITE, exp, &repbody->oa,
-                           objcount, ioo, npages, local_nb, oti, rc);
-
-        if (unlikely(client_cksum != server_cksum && rc == 0)) {
-                int  new_cksum = ost_checksum_bulk(desc, OST_WRITE, cksum_type);
-                char *msg;
-                char *via;
-                char *router;
-
-                if (new_cksum == server_cksum)
-                        msg = "changed in transit before arrival at OST";
-                else if (new_cksum == client_cksum)
-                        msg = "initial checksum before message complete";
-                else
-                        msg = "changed in transit AND after initial checksum";
-
-                if (req->rq_peer.nid == desc->bd_sender) {
-                        via = router = "";
-                } else {
-                        via = " via ";
-                        router = libcfs_nid2str(desc->bd_sender);
-                }
-
-                LCONSOLE_ERROR_MSG(0x168, "%s: BAD WRITE CHECKSUM: %s from %s"
-                                   "%s%s inum "LPU64"/"LPU64" object "LPU64"/"
-                                   LPU64" extent ["LPU64"-"LPU64"]\n",
-                                   exp->exp_obd->obd_name, msg,
-                                   libcfs_id2str(req->rq_peer),
-                                   via, router,
-                                   body->oa.o_valid & OBD_MD_FLFID ?
-                                                body->oa.o_fid : (__u64)0,
-                                   body->oa.o_valid & OBD_MD_FLFID ?
-                                                body->oa.o_generation :(__u64)0,
-                                   body->oa.o_id,
-                                   body->oa.o_valid & OBD_MD_FLGROUP ?
-                                                body->oa.o_gr : (__u64)0,
-                                   pp_rnb[0].offset,
-                                   pp_rnb[npages-1].offset+pp_rnb[npages-1].len
-                                   - 1 );
-                CERROR("client csum %x, original server csum %x, "
-                       "server csum now %x\n",
-                       client_cksum, server_cksum, new_cksum);
-        }
-
-        ost_nio_pages_put(req, local_nb, npages);
-
-        if (rc == 0) {
-                /* set per-requested niobuf return codes */
-                for (i = j = 0; i < niocount; i++) {
-                        int nob = remote_nb[i].len;
-
-                        rcs[i] = 0;
-                        do {
-                                LASSERT(j < npages);
-                                if (local_nb[j].rc < 0)
-                                        rcs[i] = local_nb[j].rc;
-                                nob -= pp_rnb[j].len;
-                                j++;
-                        } while (nob > 0);
-                        LASSERT(nob == 0);
-                }
-                LASSERT(j == npages);
-        }
-
- out_lock:
-        ost_brw_lock_put(LCK_PW, ioo, pp_rnb, &lockh);
- out_bulk:
-        ptlrpc_free_bulk(desc);
- out:
-        if (rc == 0) {
-                oti_to_request(oti, req);
-                target_committed_to_req(req);
-                rc = ptlrpc_reply(req);
-        } else if (!no_reply) {
-                /* Only reply if there was no comms problem with bulk */
-                target_committed_to_req(req);
-                req->rq_status = rc;
-                ptlrpc_error(req);
-        } else {
-                /* reply out callback would free */
-                ptlrpc_req_drop_rs(req);
-                CWARN("%s: ignoring bulk IO comm error with %s@%s id %s - "
-                      "client will retry\n",
-                      exp->exp_obd->obd_name,
-                      exp->exp_client_uuid.uuid,
-                      exp->exp_connection->c_remote_uuid.uuid,
-                      libcfs_id2str(req->rq_peer));
-        }
-        RETURN(rc);
-}
-
-static int ost_set_info(struct obd_export *exp, struct ptlrpc_request *req)
-{
-        char *key, *val = NULL;
-        int keylen, vallen, rc = 0;
-        ENTRY;
-
-        key = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, 1);
-        if (key == NULL) {
-                DEBUG_REQ(D_HA, req, "no set_info key");
-                RETURN(-EFAULT);
-        }
-        keylen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF);
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        vallen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF + 1);
-        if (vallen)
-                val = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF + 1, 0);
-
-        if (KEY_IS("evict_by_nid")) {
-                if (val && vallen)
-                        obd_export_evict_by_nid(exp->exp_obd, val);
-
-                GOTO(out, rc = 0);
-        }
-
-        rc = obd_set_info_async(exp, keylen, key, vallen, val, NULL);
-out:
-        lustre_msg_set_status(req->rq_repmsg, 0);
-        RETURN(rc);
-}
-
-static int ost_get_info(struct obd_export *exp, struct ptlrpc_request *req)
-{
-        void *key, *reply;
-        int keylen, rc = 0;
-        int size[2] = { sizeof(struct ptlrpc_body), 0 };
-        ENTRY;
-
-        key = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, 1);
-        if (key == NULL) {
-                DEBUG_REQ(D_HA, req, "no get_info key");
-                RETURN(-EFAULT);
-        }
-        keylen = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF);
-
-        /* call once to get the size to allocate the reply buffer */
-        rc = obd_get_info(exp, keylen, key, &size[1], NULL);
-        if (rc)
-                RETURN(rc);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                RETURN(rc);
-
-        reply = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*reply));
-        /* call again to fill in the reply buffer */
-        rc = obd_get_info(exp, keylen, key, size, reply);
-        lustre_msg_set_status(req->rq_repmsg, 0);
-
-        RETURN(rc);
-}
-
-static int ost_handle_quotactl(struct ptlrpc_request *req)
-{
-        struct obd_quotactl *oqctl, *repoqc;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*repoqc) };
-        ENTRY;
-
-        oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),
-                                   lustre_swab_obd_quotactl);
-        if (oqctl == NULL)
-                GOTO(out, rc = -EPROTO);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-
-        repoqc = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*repoqc));
-
-        req->rq_status = obd_quotactl(req->rq_export, oqctl);
-        *repoqc = *oqctl;
-out:
-        RETURN(rc);
-}
-
-static int ost_handle_quotacheck(struct ptlrpc_request *req)
-{
-        struct obd_quotactl *oqctl;
-        int rc;
-        ENTRY;
-
-        oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),
-                                   lustre_swab_obd_quotactl);
-        if (oqctl == NULL) 
-                RETURN(-EPROTO);
-
-        rc = lustre_pack_reply(req, 1, NULL, NULL);
-        if (rc)
-                RETURN(rc);
-
-        req->rq_status = obd_quotacheck(req->rq_export, oqctl);
-        RETURN(0);
-}
-
-static int ost_handle_quota_adjust_qunit(struct ptlrpc_request *req)
-{
-        struct quota_adjust_qunit *oqaq, *repoqa;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*repoqa) };
-        int rc;
-        ENTRY;
-
-        oqaq = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqaq),
-                                  lustre_swab_quota_adjust_qunit);
-
-        if (oqaq == NULL)
-                GOTO(out, rc = -EPROTO);
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out, rc);
-        repoqa = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*repoqa));
-        req->rq_status = obd_quota_adjust_qunit(req->rq_export, oqaq);
-        *repoqa = *oqaq;
- out:
-        RETURN(rc);
-}
-
-static int ost_filter_recovery_request(struct ptlrpc_request *req,
-                                       struct obd_device *obd, int *process)
-{
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-        case OST_CONNECT: /* This will never get here, but for completeness. */
-        case OST_DISCONNECT:
-               *process = 1;
-               RETURN(0);
-
-        case OBD_PING:
-        case OST_CREATE:
-        case OST_DESTROY:
-        case OST_PUNCH:
-        case OST_SETATTR:
-        case OST_SYNC:
-        case OST_WRITE:
-        case OBD_LOG_CANCEL:
-        case LDLM_ENQUEUE:
-                *process = target_queue_recovery_request(req, obd);
-                RETURN(0);
-
-        default:
-                DEBUG_REQ(D_ERROR, req, "not permitted during recovery");
-                *process = 0;
-                /* XXX what should we set rq_status to here? */
-                req->rq_status = -EAGAIN;
-                RETURN(ptlrpc_error(req));
-        }
-}
-
-int ost_msg_check_version(struct lustre_msg *msg)
-{
-        int rc;
-
-        switch(lustre_msg_get_opc(msg)) {
-        case OST_CONNECT:
-        case OST_DISCONNECT:
-        case OBD_PING:
-                rc = lustre_msg_check_version(msg, LUSTRE_OBD_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_OBD_VERSION);
-                break;
-        case OST_CREATE:
-        case OST_DESTROY:
-        case OST_GETATTR:
-        case OST_SETATTR:
-        case OST_WRITE:
-        case OST_READ:
-        case OST_PUNCH:
-        case OST_STATFS:
-        case OST_SYNC:
-        case OST_SET_INFO:
-        case OST_GET_INFO:
-        case OST_QUOTACHECK:
-        case OST_QUOTACTL:
-        case OST_QUOTA_ADJUST_QUNIT:
-                rc = lustre_msg_check_version(msg, LUSTRE_OST_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_OST_VERSION);
-                break;
-        case LDLM_ENQUEUE:
-        case LDLM_CONVERT:
-        case LDLM_CANCEL:
-        case LDLM_BL_CALLBACK:
-        case LDLM_CP_CALLBACK:
-                rc = lustre_msg_check_version(msg, LUSTRE_DLM_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_DLM_VERSION);
-                break;
-        case LLOG_ORIGIN_CONNECT:
-        case OBD_LOG_CANCEL:
-                rc = lustre_msg_check_version(msg, LUSTRE_LOG_VERSION);
-                if (rc)
-                        CERROR("bad opc %u version %08x, expecting %08x\n",
-                               lustre_msg_get_opc(msg),
-                               lustre_msg_get_version(msg),
-                               LUSTRE_LOG_VERSION);
-                break;
-        default:
-                CERROR("Unexpected opcode %d\n", lustre_msg_get_opc(msg));
-                rc = -ENOTSUPP;
-        }
-        return rc;
-}
-
-static int ost_handle(struct ptlrpc_request *req)
-{
-        struct obd_trans_info trans_info = { 0, };
-        struct obd_trans_info *oti = &trans_info;
-        int should_process, fail = OBD_FAIL_OST_ALL_REPLY_NET, rc = 0;
-        struct obd_device *obd = NULL;
-        ENTRY;
-
-        LASSERT(current->journal_info == NULL);
-        /* XXX identical to MDS */
-        if (lustre_msg_get_opc(req->rq_reqmsg) != OST_CONNECT) {
-                int abort_recovery, recovering;
-
-                if (req->rq_export == NULL) {
-                        CDEBUG(D_HA,"operation %d on unconnected OST from %s\n",
-                               lustre_msg_get_opc(req->rq_reqmsg),
-                               libcfs_id2str(req->rq_peer));
-                        req->rq_status = -ENOTCONN;
-                        GOTO(out, rc = -ENOTCONN);
-                }
-
-                obd = req->rq_export->exp_obd;
-
-                /* Check for aborted recovery. */
-                spin_lock_bh(&obd->obd_processing_task_lock);
-                abort_recovery = obd->obd_abort_recovery;
-                recovering = obd->obd_recovering;
-                spin_unlock_bh(&obd->obd_processing_task_lock);
-                if (abort_recovery) {
-                        target_abort_recovery(obd);
-                } else if (recovering) {
-                        rc = ost_filter_recovery_request(req, obd,
-                                                         &should_process);
-                        if (rc || !should_process)
-                                RETURN(rc);
-                }
-        }
-
-        oti_init(oti, req);
-        rc = ost_msg_check_version(req->rq_reqmsg);
-        if (rc)
-                RETURN(rc);
-
-        rc = ost_msg_check_version(req->rq_reqmsg);
-        if (rc)
-                RETURN(rc);
-
-        switch (lustre_msg_get_opc(req->rq_reqmsg)) {
-        case OST_CONNECT: {
-                CDEBUG(D_INODE, "connect\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_CONNECT_NET, 0);
-                rc = target_handle_connect(req, ost_handle);
-                OBD_FAIL_RETURN(OBD_FAIL_OST_CONNECT_NET2, 0);
-                if (!rc)
-                        obd = req->rq_export->exp_obd;
-                break;
-        }
-        case OST_DISCONNECT:
-                CDEBUG(D_INODE, "disconnect\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_DISCONNECT_NET, 0);
-                rc = target_handle_disconnect(req);
-                break;
-        case OST_CREATE:
-                CDEBUG(D_INODE, "create\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_CREATE_NET, 0);
-                OBD_FAIL_TIMEOUT_MS(OBD_FAIL_OST_PAUSE_CREATE, obd_fail_val);
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_ENOSPC))
-                        GOTO(out, rc = -ENOSPC);
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_EROFS))
-                        GOTO(out, rc = -EROFS);
-                rc = ost_create(req->rq_export, req, oti);
-                break;
-        case OST_DESTROY:
-                CDEBUG(D_INODE, "destroy\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_DESTROY_NET, 0);
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_EROFS))
-                        GOTO(out, rc = -EROFS);
-                rc = ost_destroy(req->rq_export, req, oti);
-                break;
-        case OST_GETATTR:
-                CDEBUG(D_INODE, "getattr\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_GETATTR_NET, 0);
-                rc = ost_getattr(req->rq_export, req);
-                break;
-        case OST_SETATTR:
-                CDEBUG(D_INODE, "setattr\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_SETATTR_NET, 0);
-                rc = ost_setattr(req->rq_export, req, oti);
-                break;
-        case OST_WRITE:
-                CDEBUG(D_INODE, "write\n");
-                /* req->rq_request_portal would be nice, if it was set */
-                if (req->rq_rqbd->rqbd_service->srv_req_portal !=OST_IO_PORTAL){
-                        CERROR("%s: deny write request from %s to portal %u\n",
-                               req->rq_export->exp_obd->obd_name,
-                               obd_export_nid2str(req->rq_export),
-                               req->rq_rqbd->rqbd_service->srv_req_portal);
-                        GOTO(out, rc = -EPROTO);
-                }
-                OBD_FAIL_RETURN(OBD_FAIL_OST_BRW_NET, 0);
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_ENOSPC))
-                        GOTO(out, rc = -ENOSPC);
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_EROFS))
-                        GOTO(out, rc = -EROFS);
-                rc = ost_brw_write(req, oti);
-                LASSERT(current->journal_info == NULL);
-                /* ost_brw_write sends its own replies */
-                RETURN(rc);
-        case OST_READ:
-                CDEBUG(D_INODE, "read\n");
-                /* req->rq_request_portal would be nice, if it was set */
-                if (req->rq_rqbd->rqbd_service->srv_req_portal !=OST_IO_PORTAL){
-                        CERROR("%s: deny read request from %s to portal %u\n",
-                               req->rq_export->exp_obd->obd_name,
-                               obd_export_nid2str(req->rq_export),
-                               req->rq_rqbd->rqbd_service->srv_req_portal);
-                        GOTO(out, rc = -EPROTO);
-                }
-                OBD_FAIL_RETURN(OBD_FAIL_OST_BRW_NET, 0);
-                rc = ost_brw_read(req, oti);
-                LASSERT(current->journal_info == NULL);
-                /* ost_brw_read sends its own replies */
-                RETURN(rc);
-        case OST_PUNCH:
-                CDEBUG(D_INODE, "punch\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_PUNCH_NET, 0);
-                if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_EROFS))
-                        GOTO(out, rc = -EROFS);
-                rc = ost_punch(req->rq_export, req, oti);
-                break;
-        case OST_STATFS:
-                CDEBUG(D_INODE, "statfs\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_STATFS_NET, 0);
-                rc = ost_statfs(req);
-                break;
-        case OST_SYNC:
-                CDEBUG(D_INODE, "sync\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_SYNC_NET, 0);
-                rc = ost_sync(req->rq_export, req);
-                break;
-        case OST_SET_INFO:
-                DEBUG_REQ(D_INODE, req, "set_info");
-                rc = ost_set_info(req->rq_export, req);
-                break;
-        case OST_GET_INFO:
-                DEBUG_REQ(D_INODE, req, "get_info");
-                rc = ost_get_info(req->rq_export, req);
-                break;
-        case OST_QUOTACHECK:
-                CDEBUG(D_INODE, "quotacheck\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_QUOTACHECK_NET, 0);
-                rc = ost_handle_quotacheck(req);
-                break;
-        case OST_QUOTACTL:
-                CDEBUG(D_INODE, "quotactl\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OST_QUOTACTL_NET, 0);
-                rc = ost_handle_quotactl(req);
-                break;
-        case OST_QUOTA_ADJUST_QUNIT:
-                CDEBUG(D_INODE, "quota_adjust_qunit\n");
-                rc = ost_handle_quota_adjust_qunit(req);
-                break;
-        case OBD_PING:
-                DEBUG_REQ(D_INODE, req, "ping");
-                rc = target_handle_ping(req);
-                break;
-        /* FIXME - just reply status */
-        case LLOG_ORIGIN_CONNECT:
-                DEBUG_REQ(D_INODE, req, "log connect");
-                rc = llog_handle_connect(req);
-                req->rq_status = rc;
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc)
-                        RETURN(rc);
-                RETURN(ptlrpc_reply(req));
-        case OBD_LOG_CANCEL:
-                CDEBUG(D_INODE, "log cancel\n");
-                OBD_FAIL_RETURN(OBD_FAIL_OBD_LOG_CANCEL_NET, 0);
-                rc = llog_origin_handle_cancel(req);
-                req->rq_status = rc;
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc)
-                        RETURN(rc);
-                RETURN(ptlrpc_reply(req));
-        case LDLM_ENQUEUE:
-                CDEBUG(D_INODE, "enqueue\n");
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_ENQUEUE, 0);
-                rc = ldlm_handle_enqueue(req, ldlm_server_completion_ast,
-                                         ldlm_server_blocking_ast,
-                                         ldlm_server_glimpse_ast);
-                fail = OBD_FAIL_OST_LDLM_REPLY_NET;
-                break;
-        case LDLM_CONVERT:
-                CDEBUG(D_INODE, "convert\n");
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_CONVERT, 0);
-                rc = ldlm_handle_convert(req);
-                break;
-        case LDLM_CANCEL:
-                CDEBUG(D_INODE, "cancel\n");
-                OBD_FAIL_RETURN(OBD_FAIL_LDLM_CANCEL, 0);
-                rc = ldlm_handle_cancel(req);
-                break;
-        case LDLM_BL_CALLBACK:
-        case LDLM_CP_CALLBACK:
-                CDEBUG(D_INODE, "callback\n");
-                CERROR("callbacks should not happen on OST\n");
-                /* fall through */
-        default:
-                CERROR("Unexpected opcode %d\n",
-                       lustre_msg_get_opc(req->rq_reqmsg));
-                req->rq_status = -ENOTSUPP;
-                rc = ptlrpc_error(req);
-                RETURN(rc);
-        }
-
-        LASSERT(current->journal_info == NULL);
-
-        EXIT;
-        /* If we're DISCONNECTing, the export_data is already freed */
-        if (!rc && lustre_msg_get_opc(req->rq_reqmsg) != OST_DISCONNECT)
-                target_committed_to_req(req);
-
-out:
-        if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_LAST_REPLAY) {
-                if (obd && obd->obd_recovering) {
-                        DEBUG_REQ(D_HA, req, "LAST_REPLAY, queuing reply");
-                        return target_queue_last_replay_reply(req, rc);
-                }
-                /* Lost a race with recovery; let the error path DTRT. */
-                rc = req->rq_status = -ENOTCONN;
-        }
-
-        if (!rc)
-                oti_to_request(oti, req);
-
-        target_send_reply(req, rc, fail);
-        return 0;
-}
-
-/*
- * free per-thread pool created by ost_thread_init().
- */
-static void ost_thread_done(struct ptlrpc_thread *thread)
-{
-        int i;
-        struct ost_thread_local_cache *tls; /* TLS stands for Thread-Local
-                                             * Storage */
-
-        ENTRY;
-
-        LASSERT(thread != NULL);
-
-        /*
-         * be prepared to handle partially-initialized pools (because this is
-         * called from ost_thread_init() for cleanup.
-         */
-        tls = thread->t_data;
-        if (tls != NULL) {
-                for (i = 0; i < OST_THREAD_POOL_SIZE; ++ i) {
-                        if (tls->page[i] != NULL)
-                                OBD_PAGE_FREE(tls->page[i]);
-                }
-                OBD_FREE_PTR(tls);
-                thread->t_data = NULL;
-        }
-        EXIT;
-}
-
-/*
- * initialize per-thread page pool (bug 5137).
- */
-static int ost_thread_init(struct ptlrpc_thread *thread)
-{
-        int result;
-        int i;
-        struct ost_thread_local_cache *tls;
-
-        ENTRY;
-
-        LASSERT(thread != NULL);
-        LASSERT(thread->t_data == NULL);
-        LASSERTF(thread->t_id <= OSS_THREADS_MAX, "%u\n", thread->t_id);
-
-        OBD_ALLOC_PTR(tls);
-        if (tls != NULL) {
-                result = 0;
-                thread->t_data = tls;
-                /*
-                 * populate pool
-                 */
-                for (i = 0; i < OST_THREAD_POOL_SIZE; ++ i) {
-                        OBD_PAGE_ALLOC(tls->page[i], OST_THREAD_POOL_GFP);
-                        if (tls->page[i] == NULL) {
-                                ost_thread_done(thread);
-                                result = -ENOMEM;
-                                break;
-                        }
-                }
-        } else
-                result = -ENOMEM;
-        RETURN(result);
-}
-
-/* Sigh - really, this is an OSS, the _server_, not the _target_ */
-static int ost_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct ost_obd *ost = &obd->u.ost;
-        struct lprocfs_static_vars lvars;
-        int oss_min_threads;
-        int oss_max_threads;
-        int oss_min_create_threads;
-        int oss_max_create_threads;
-        int rc;
-        ENTRY;
-
-        rc = cleanup_group_info();
-        if (rc)
-                RETURN(rc);
-        lprocfs_ost_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        sema_init(&ost->ost_health_sem, 1);
-
-        if (oss_num_threads) {
-                /* If oss_num_threads is set, it is the min and the max. */
-                if (oss_num_threads > OSS_THREADS_MAX) 
-                        oss_num_threads = OSS_THREADS_MAX;
-                if (oss_num_threads < OSS_THREADS_MIN)
-                        oss_num_threads = OSS_THREADS_MIN;
-                oss_max_threads = oss_min_threads = oss_num_threads;
-        } else {
-                /* Base min threads on memory and cpus */
-                oss_min_threads = num_possible_cpus() * num_physpages >> 
-                        (27 - CFS_PAGE_SHIFT);
-                if (oss_min_threads < OSS_THREADS_MIN)
-                        oss_min_threads = OSS_THREADS_MIN;
-                /* Insure a 4x range for dynamic threads */
-                if (oss_min_threads > OSS_THREADS_MAX / 4) 
-                        oss_min_threads = OSS_THREADS_MAX / 4;
-                oss_max_threads = min(OSS_THREADS_MAX, oss_min_threads * 4);
-        }
-
-        ost->ost_service =
-                ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE,
-                                OST_MAXREPSIZE, OST_REQUEST_PORTAL,
-                                OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR, 
-                                ost_handle, LUSTRE_OSS_NAME,
-                                obd->obd_proc_entry, target_print_req,
-                                oss_min_threads, oss_max_threads, "ll_ost");
-        if (ost->ost_service == NULL) {
-                CERROR("failed to start OST service\n");
-                GOTO(out_lprocfs, rc = -ENOMEM);
-        }
-
-        rc = ptlrpc_start_threads(obd, ost->ost_service);
-        if (rc)
-                GOTO(out_service, rc = -EINVAL);
-
-        if (oss_num_create_threads) {
-                if (oss_num_create_threads > OSS_MAX_CREATE_THREADS)
-                        oss_num_create_threads = OSS_MAX_CREATE_THREADS;
-                if (oss_num_create_threads < OSS_DEF_CREATE_THREADS)
-                        oss_num_create_threads = OSS_DEF_CREATE_THREADS;
-                oss_min_create_threads = oss_max_create_threads = 
-                        oss_num_create_threads;
-        } else {
-                oss_min_create_threads = OSS_DEF_CREATE_THREADS;
-                oss_max_create_threads = OSS_MAX_CREATE_THREADS;
-        }
-
-        ost->ost_create_service =
-                ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE,
-                                OST_MAXREPSIZE, OST_CREATE_PORTAL,
-                                OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR,
-                                ost_handle, "ost_create",
-                                obd->obd_proc_entry, target_print_req,
-                                oss_min_create_threads,
-                                oss_max_create_threads,
-                                "ll_ost_creat");
-        if (ost->ost_create_service == NULL) {
-                CERROR("failed to start OST create service\n");
-                GOTO(out_service, rc = -ENOMEM);
-        }
-
-        rc = ptlrpc_start_threads(obd, ost->ost_create_service);
-        if (rc)
-                GOTO(out_create, rc = -EINVAL);
-
-        ost->ost_io_service =
-                ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE,
-                                OST_MAXREPSIZE, OST_IO_PORTAL,
-                                OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR, 
-                                ost_handle, "ost_io",
-                                obd->obd_proc_entry, target_print_req,
-                                oss_min_threads, oss_max_threads, "ll_ost_io");
-        if (ost->ost_io_service == NULL) {
-                CERROR("failed to start OST I/O service\n");
-                GOTO(out_create, rc = -ENOMEM);
-        }
-
-        ost->ost_io_service->srv_init = ost_thread_init;
-        ost->ost_io_service->srv_done = ost_thread_done;
-        ost->ost_io_service->srv_cpu_affinity = 1;
-        rc = ptlrpc_start_threads(obd, ost->ost_io_service);
-        if (rc)
-                GOTO(out_io, rc = -EINVAL);
-
-        ping_evictor_start();
-
-        RETURN(0);
-
-out_io:
-        ptlrpc_unregister_service(ost->ost_io_service);
-        ost->ost_io_service = NULL;
-out_create:
-        ptlrpc_unregister_service(ost->ost_create_service);
-        ost->ost_create_service = NULL;
-out_service:
-        ptlrpc_unregister_service(ost->ost_service);
-        ost->ost_service = NULL;
-out_lprocfs:
-        lprocfs_obd_cleanup(obd);
-        RETURN(rc);
-}
-
-static int ost_cleanup(struct obd_device *obd)
-{
-        struct ost_obd *ost = &obd->u.ost;
-        int err = 0;
-        ENTRY;
-
-        ping_evictor_stop();
-
-        spin_lock_bh(&obd->obd_processing_task_lock);
-        if (obd->obd_recovering) {
-                target_cancel_recovery_timer(obd);
-                obd->obd_recovering = 0;
-        }
-        spin_unlock_bh(&obd->obd_processing_task_lock);
-
-        down(&ost->ost_health_sem);
-        ptlrpc_unregister_service(ost->ost_service);
-        ptlrpc_unregister_service(ost->ost_create_service);
-        ptlrpc_unregister_service(ost->ost_io_service);
-        ost->ost_service = NULL;
-        ost->ost_create_service = NULL;
-        up(&ost->ost_health_sem);
-
-        lprocfs_obd_cleanup(obd);
-
-        RETURN(err);
-}
-
-static int ost_health_check(struct obd_device *obd)
-{
-        struct ost_obd *ost = &obd->u.ost;
-        int rc = 0;
-
-        down(&ost->ost_health_sem);
-        rc |= ptlrpc_service_health_check(ost->ost_service);
-        rc |= ptlrpc_service_health_check(ost->ost_create_service);
-        rc |= ptlrpc_service_health_check(ost->ost_io_service);
-        up(&ost->ost_health_sem);
-
-        /*
-         * health_check to return 0 on healthy
-         * and 1 on unhealthy.
-         */
-        if( rc != 0)
-                rc = 1;
-
-        return rc;
-}
-
-struct ost_thread_local_cache *ost_tls(struct ptlrpc_request *r)
-{
-        return (struct ost_thread_local_cache *)(r->rq_svc_thread->t_data);
-}
-
-/* use obd ops to offer management infrastructure */
-static struct obd_ops ost_obd_ops = {
-        .o_owner        = THIS_MODULE,
-        .o_setup        = ost_setup,
-        .o_cleanup      = ost_cleanup,
-        .o_health_check = ost_health_check,
-};
-
-
-static int __init ost_init(void)
-{
-        struct lprocfs_static_vars lvars;
-        int rc;
-        ENTRY;
-
-        lprocfs_ost_init_vars(&lvars);
-        rc = class_register_type(&ost_obd_ops, lvars.module_vars,
-                                 LUSTRE_OSS_NAME);
-
-        if (ost_num_threads != 0 && oss_num_threads == 0) {
-                LCONSOLE_INFO("ost_num_threads module parameter is deprecated, "
-                              "use oss_num_threads instead or unset both for "
-                              "dynamic thread startup\n");
-                oss_num_threads = ost_num_threads;
-        }
-
-        RETURN(rc);
-}
-
-static void /*__exit*/ ost_exit(void)
-{
-        class_unregister_type(LUSTRE_OSS_NAME);
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Object Storage Target (OST) v0.01");
-MODULE_LICENSE("GPL");
-
-module_init(ost_init);
-module_exit(ost_exit);
diff --git a/lustre/ost/ost_internal.h b/lustre/ost/ost_internal.h
deleted file mode 100644
index 18630a31df7b75975eb7fe0230cc98ff4b65c63f..0000000000000000000000000000000000000000
--- a/lustre/ost/ost_internal.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef OST_INTERNAL_H
-#define OST_INTERNAL_H
-
-#define OSS_SERVICE_WATCHDOG_FACTOR 2000
-
-/*
- * tunables for per-thread page pool (bug 5137)
- */
-#define OST_THREAD_POOL_SIZE PTLRPC_MAX_BRW_PAGES  /* pool size in pages */
-#define OST_THREAD_POOL_GFP  CFS_ALLOC_HIGHUSER    /* GFP mask for pool pages */
-
-struct page;
-struct niobuf_local;
-struct niobuf_remote;
-struct ptlrpc_request;
-
-/*
- * struct ost_thread_local_cache is allocated and initialized for each OST
- * thread by ost_thread_init().
- */
-struct ost_thread_local_cache {
-        /*
-         * pool of pages and nio buffers used by write-path
-         */
-        struct page          *page  [OST_THREAD_POOL_SIZE];
-        struct niobuf_local   local [OST_THREAD_POOL_SIZE];
-        struct niobuf_remote  remote[OST_THREAD_POOL_SIZE];
-};
-
-struct ost_thread_local_cache *ost_tls(struct ptlrpc_request *r);
-
-#define OSS_DEF_CREATE_THREADS  2UL
-#define OSS_MAX_CREATE_THREADS 16UL
-
-/* Quota stuff */
-extern quota_interface_t *quota_interface;
-
-#ifdef LPROCFS
-void lprocfs_ost_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static void lprocfs_ost_init_vars(struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-#endif /* OST_INTERNAL_H */
diff --git a/lustre/ptlrpc/.cvsignore b/lustre/ptlrpc/.cvsignore
deleted file mode 100644
index 74962329ea0494c8b81f1484e6f6dbfb76776e87..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/.cvsignore
+++ /dev/null
@@ -1,16 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-tags
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.flags
-.tmp_versions
-.depend
diff --git a/lustre/ptlrpc/Info.plist b/lustre/ptlrpc/Info.plist
deleted file mode 100644
index 2b7d35fa11c632fa62ffe6ceb5f67d8725d6d2a2..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/Info.plist
+++ /dev/null
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>CFBundleDevelopmentRegion</key>
-	<string>English</string>
-	<key>CFBundleExecutable</key>
-	<string>ptlrpc</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.clusterfs.lustre.ptlrpc</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundlePackageType</key>
-	<string>KEXT</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
-	<string>1.0.1</string> 
-	<key>OSBundleCompatibleVersion</key> 
-	<string>1.0.0</string>
-	<key>OSBundleLibraries</key>
-	<dict> 
-		<key>com.clusterfs.lustre.libcfs</key> 
-		<string>1.0.0</string> 
-		<key>com.clusterfs.lustre.lnet</key> 
-		<string>1.0.0</string>
-		<key>com.clusterfs.lustre.obdclass</key> 
-		<string>1.0.0</string>
-	</dict>
-</dict>
-</plist>
diff --git a/lustre/ptlrpc/Makefile.in b/lustre/ptlrpc/Makefile.in
deleted file mode 100644
index 535acacb2df6280b031fabdc70c66dac3973a733..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/Makefile.in
+++ /dev/null
@@ -1,34 +0,0 @@
-MODULES := ptlrpc
-ifeq ($(PATCHLEVEL),6)
-LDLM := @top_srcdir@/lustre/ldlm/
-else
-LDLM :=
-endif
-ldlm_objs := $(LDLM)l_lock.o $(LDLM)ldlm_lock.o 
-ldlm_objs += $(LDLM)ldlm_resource.o $(LDLM)ldlm_lib.o
-ldlm_objs += $(LDLM)ldlm_plain.o $(LDLM)ldlm_extent.o
-ldlm_objs += $(LDLM)ldlm_request.o $(LDLM)ldlm_lockd.o
-ldlm_objs += $(LDLM)ldlm_flock.o $(LDLM)ldlm_inodebits.o
-ldlm_objs += $(LDLM)ldlm_pool.o
-ldlm_objs += $(LDLM)interval_tree.o
-ptlrpc_objs := client.o recover.o connection.o niobuf.o pack_generic.o
-ptlrpc_objs += events.o ptlrpc_module.o service.o pinger.o recov_thread.o
-ptlrpc_objs += llog_net.o llog_client.o llog_server.o import.o ptlrpcd.o
-ptlrpc_objs += pers.o lproc_ptlrpc.o wiretest.o
-
-ptlrpc-objs := $(ldlm_objs) $(ptlrpc_objs)
-
-default: all
-
-ldlm_%.c: @LUSTRE@/ldlm/ldlm_%.c
-	ln -sf $< $@
-
-l_lock.c: @LUSTRE@/ldlm/l_lock.c
-	ln -sf $< $@
-
-interval_tree.c: @LUSTRE@/ldlm/interval_tree.c
-	ln -sf $< $@
-
-EXTRA_PRE_CFLAGS := -I@LUSTRE@/ldlm
-
-@INCLUDE_RULES@
diff --git a/lustre/ptlrpc/autoMakefile.am b/lustre/ptlrpc/autoMakefile.am
deleted file mode 100644
index 66fbf83687770993b906aa270f2813b64cf61310..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/autoMakefile.am
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-LDLM_COMM_SOURCES= $(top_srcdir)/lustre/ldlm/l_lock.c	\
-	$(top_srcdir)/lustre/ldlm/ldlm_lock.c		\
-	$(top_srcdir)/lustre/ldlm/interval_tree.c       \
-	$(top_srcdir)/lustre/ldlm/ldlm_resource.c	\
-	$(top_srcdir)/lustre/ldlm/ldlm_lib.c		\
-	$(top_srcdir)/lustre/ldlm/ldlm_plain.c		\
-	$(top_srcdir)/lustre/ldlm/ldlm_extent.c		\
-	$(top_srcdir)/lustre/ldlm/ldlm_request.c	\
-	$(top_srcdir)/lustre/ldlm/ldlm_lockd.c		\
-	$(top_srcdir)/lustre/ldlm/ldlm_internal.h	\
-	$(top_srcdir)/lustre/ldlm/ldlm_inodebits.c	\
-	$(top_srcdir)/lustre/ldlm/ldlm_flock.c 		\
-	$(top_srcdir)/lustre/ldlm/ldlm_pool.c
-
-COMMON_SOURCES =  client.c recover.c connection.c niobuf.c pack_generic.c   \
-    events.c ptlrpc_module.c service.c pinger.c recov_thread.c llog_net.c   \
-    llog_client.c llog_server.c import.c ptlrpcd.c pers.c lproc_ptlrpc.c wiretest.c \
-    ptlrpc_internal.h $(LDLM_COMM_SOURCES)
-
-if LIBLUSTRE
-
-noinst_LIBRARIES = libptlrpc.a
-libptlrpc_a_SOURCES = $(COMMON_SOURCES)
-libptlrpc_a_CPPFLAGS = $(LLCPPFLAGS)
-libptlrpc_a_CFLAGS = $(LLCFLAGS)
-
-endif
-
-if MODULES
-
-if LINUX
-modulefs_DATA = ptlrpc$(KMODEXT)
-endif #LINUX
-
-if DARWIN
-macos_PROGRAMS := ptlrpc
-
-ptlrpc_SOURCES := \
-        ptlrpc_module.c \
-        client.c \
-        connection.c \
-        events.c \
-        import.c \
-        llog_client.c \
-        llog_net.c \
-        llog_server.c \
-        lproc_ptlrpc.c \
-        niobuf.c \
-        pack_generic.c \
-        pers.c \
-        pinger.c \
-        ptlrpcd.c \
-        recover.c \
-        recov_thread.c \
-        service.c \
-	wiretest.c \
-        $(LDLM_COMM_SOURCES)
-
-ptlrpc_CFLAGS := $(EXTRA_KCFLAGS)
-ptlrpc_LDFLAGS := $(EXTRA_KLDFLAGS)
-ptlrpc_LDADD := $(EXTRA_KLIBS)
-
-plist_DATA := Info.plist
-
-install_data_hook := fix-kext-ownership
-
-endif # DARWIN
-
-endif # MODULES
-
-install-data-hook: $(install_data_hook)
-DIST_SOURCES = $(ptlrpc_objs:.o=.c) ptlrpc_internal.h
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@  ldlm_*.c l_lock.c interval_tree.c
diff --git a/lustre/ptlrpc/client.c b/lustre/ptlrpc/client.c
deleted file mode 100644
index b7b22eca7db3b98047bbcad1b4a642a1daf49bf8..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/client.c
+++ /dev/null
@@ -1,2149 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-#include <errno.h>
-#include <signal.h>
-#include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_lib.h>
-#include <lustre_ha.h>
-#include <lustre_import.h>
-
-#include "ptlrpc_internal.h"
-
-void ptlrpc_init_client(int req_portal, int rep_portal, char *name,
-                        struct ptlrpc_client *cl)
-{
-        cl->cli_request_portal = req_portal;
-        cl->cli_reply_portal   = rep_portal;
-        cl->cli_name           = name;
-}
-
-struct ptlrpc_connection *ptlrpc_uuid_to_connection(struct obd_uuid *uuid)
-{
-        struct ptlrpc_connection *c;
-        lnet_nid_t                self;
-        lnet_process_id_t         peer;
-        int                       err;
-
-        err = ptlrpc_uuid_to_peer(uuid, &peer, &self);
-        if (err != 0) {
-                CERROR("cannot find peer %s!\n", uuid->uuid);
-                return NULL;
-        }
-
-        c = ptlrpc_get_connection(peer, self, uuid);
-        if (c) {
-                memcpy(c->c_remote_uuid.uuid,
-                       uuid->uuid, sizeof(c->c_remote_uuid.uuid));
-        }
-
-        CDEBUG(D_INFO, "%s -> %p\n", uuid->uuid, c);
-
-        return c;
-}
-
-void ptlrpc_readdress_connection(struct ptlrpc_connection *conn,
-                                 struct obd_uuid *uuid)
-{
-        lnet_nid_t        self;
-        lnet_process_id_t peer;
-        int               err;
-
-        err = ptlrpc_uuid_to_peer(uuid, &peer, &self);
-        if (err != 0) {
-                CERROR("cannot find peer %s!\n", uuid->uuid);
-                return;
-        }
-
-        conn->c_peer = peer;
-        conn->c_self = self;
-        return;
-}
-
-static inline struct ptlrpc_bulk_desc *new_bulk(int npages, int type, int portal)
-{
-        struct ptlrpc_bulk_desc *desc;
-
-        OBD_ALLOC(desc, offsetof (struct ptlrpc_bulk_desc, bd_iov[npages]));
-        if (!desc)
-                return NULL;
-
-        spin_lock_init(&desc->bd_lock);
-        cfs_waitq_init(&desc->bd_waitq);
-        desc->bd_max_iov = npages;
-        desc->bd_iov_count = 0;
-        desc->bd_md_h = LNET_INVALID_HANDLE;
-        desc->bd_portal = portal;
-        desc->bd_type = type;
-
-        return desc;
-}
-
-struct ptlrpc_bulk_desc *ptlrpc_prep_bulk_imp (struct ptlrpc_request *req,
-                                               int npages, int type, int portal)
-{
-        struct obd_import *imp = req->rq_import;
-        struct ptlrpc_bulk_desc *desc;
-
-        ENTRY;
-        LASSERT(type == BULK_PUT_SINK || type == BULK_GET_SOURCE);
-        desc = new_bulk(npages, type, portal);
-        if (desc == NULL)
-                RETURN(NULL);
-
-        desc->bd_import_generation = req->rq_import_generation;
-        desc->bd_import = class_import_get(imp);
-        desc->bd_req = req;
-
-        desc->bd_cbid.cbid_fn  = client_bulk_callback;
-        desc->bd_cbid.cbid_arg = desc;
-
-        /* This makes req own desc, and free it when she frees herself */
-        req->rq_bulk = desc;
-
-        return desc;
-}
-
-struct ptlrpc_bulk_desc *ptlrpc_prep_bulk_exp (struct ptlrpc_request *req,
-                                               int npages, int type, int portal)
-{
-        struct obd_export *exp = req->rq_export;
-        struct ptlrpc_bulk_desc *desc;
-
-        ENTRY;
-        LASSERT(type == BULK_PUT_SOURCE || type == BULK_GET_SINK);
-
-        desc = new_bulk(npages, type, portal);
-        if (desc == NULL)
-                RETURN(NULL);
-
-        desc->bd_export = class_export_get(exp);
-        desc->bd_req = req;
-
-        desc->bd_cbid.cbid_fn  = server_bulk_callback;
-        desc->bd_cbid.cbid_arg = desc;
-
-        /* NB we don't assign rq_bulk here; server-side requests are
-         * re-used, and the handler frees the bulk desc explicitly. */
-
-        return desc;
-}
-
-void ptlrpc_prep_bulk_page(struct ptlrpc_bulk_desc *desc,
-                           cfs_page_t *page, int pageoffset, int len)
-{
-        LASSERT(desc->bd_iov_count < desc->bd_max_iov);
-        LASSERT(page != NULL);
-        LASSERT(pageoffset >= 0);
-        LASSERT(len > 0);
-        LASSERT(pageoffset + len <= CFS_PAGE_SIZE);
-
-        desc->bd_nob += len;
-
-        ptlrpc_add_bulk_page(desc, page, pageoffset, len);
-}
-
-void ptlrpc_free_bulk(struct ptlrpc_bulk_desc *desc)
-{
-        ENTRY;
-
-        LASSERT(desc != NULL);
-        LASSERT(desc->bd_iov_count != LI_POISON); /* not freed already */
-        LASSERT(!desc->bd_network_rw);         /* network hands off or */
-        LASSERT((desc->bd_export != NULL) ^ (desc->bd_import != NULL));
-        if (desc->bd_export)
-                class_export_put(desc->bd_export);
-        else
-                class_import_put(desc->bd_import);
-
-        OBD_FREE(desc, offsetof(struct ptlrpc_bulk_desc,
-                                bd_iov[desc->bd_max_iov]));
-        EXIT;
-}
-
-/* Set server timelimit for this req */
-void ptlrpc_at_set_req_timeout(struct ptlrpc_request *req)
-{
-        __u32 serv_est;
-        int idx;
-        struct imp_at *at;
-
-        LASSERT(req->rq_import);
-
-        if (AT_OFF) {
-                /* non-AT settings */
-                req->rq_timeout = req->rq_import->imp_server_timeout ? 
-                        obd_timeout / 2 : obd_timeout;
-                lustre_msg_set_timeout(req->rq_reqmsg, req->rq_timeout);
-                return;
-        }
-
-        at = &req->rq_import->imp_at;
-        idx = import_at_get_index(req->rq_import, 
-                                  req->rq_request_portal);
-        serv_est = at_get(&at->iat_service_estimate[idx]);
-        /* add an arbitrary minimum: 125% +5 sec */
-        req->rq_timeout = serv_est + (serv_est >> 2) + 5;
-        /* We could get even fancier here, using history to predict increased
-           loading... */
-             
-        /* Let the server know what this RPC timeout is by putting it in the 
-           reqmsg*/
-        lustre_msg_set_timeout(req->rq_reqmsg, req->rq_timeout);
-}
-
-/* Adjust max service estimate based on server value */
-static void ptlrpc_at_adj_service(struct ptlrpc_request *req) 
-{
-        int idx;
-        unsigned int serv_est, oldse;
-        struct imp_at *at = &req->rq_import->imp_at;
-
-        LASSERT(req->rq_import);
-        
-        /* service estimate is returned in the repmsg timeout field,
-           may be 0 on err */
-        serv_est = lustre_msg_get_timeout(req->rq_repmsg);
-
-        idx = import_at_get_index(req->rq_import, req->rq_request_portal);
-        /* max service estimates are tracked on the server side,
-           so just keep minimal history here */
-        oldse = at_add(&at->iat_service_estimate[idx], serv_est);
-        if (oldse != 0)
-                CDEBUG(D_ADAPTTO, "The RPC service estimate for %s ptl %d "
-                       "has changed from %d to %d\n", 
-                       req->rq_import->imp_obd->obd_name,req->rq_request_portal,
-                       oldse, at_get(&at->iat_service_estimate[idx]));
-}
-
-/* Expected network latency per remote node (secs) */
-int ptlrpc_at_get_net_latency(struct ptlrpc_request *req)
-{
-        return AT_OFF ? 0 : at_get(&req->rq_import->imp_at.iat_net_latency);
-}
-
-/* Adjust expected network latency */
-static void ptlrpc_at_adj_net_latency(struct ptlrpc_request *req)
-{
-        unsigned int st, nl, oldnl;
-        struct imp_at *at = &req->rq_import->imp_at;
-        time_t now = cfs_time_current_sec();
-
-        LASSERT(req->rq_import);
-        
-        st = lustre_msg_get_service_time(req->rq_repmsg);
-        
-        /* Network latency is total time less server processing time */
-        nl = max_t(int, now - req->rq_sent - st, 0) + 1/*st rounding*/;
-        if (st > now - req->rq_sent + 2 /* rounding */)
-                CERROR("Reported service time %u > total measured time %ld\n",
-                       st, now - req->rq_sent);
-
-        oldnl = at_add(&at->iat_net_latency, nl);
-        if (oldnl != 0)
-                CDEBUG(D_ADAPTTO, "The network latency for %s (nid %s) "
-                       "has changed from %d to %d\n", 
-                       req->rq_import->imp_obd->obd_name,
-                       obd_uuid2str(
-                               &req->rq_import->imp_connection->c_remote_uuid),
-                       oldnl, at_get(&at->iat_net_latency));
-}
-
-static int unpack_reply(struct ptlrpc_request *req)
-{
-        int rc;
-
-        /* Clear reply swab mask; we may have already swabbed an early reply */
-        req->rq_rep_swab_mask = 0;
-
-        rc = lustre_unpack_msg(req->rq_repmsg, req->rq_nob_received);
-        if (rc) {
-                DEBUG_REQ(D_ERROR, req, "unpack_rep failed: %d", rc);
-                return(-EPROTO);
-        }
-
-        rc = lustre_unpack_rep_ptlrpc_body(req, MSG_PTLRPC_BODY_OFF);
-        if (rc) {
-                DEBUG_REQ(D_ERROR, req, "unpack ptlrpc body failed: %d", rc);
-                return(-EPROTO);
-        }
-        return 0;
-}
-
-/* Handle an early reply message.
-   We can't risk the real reply coming in and changing rq_repmsg, 
-   so this fn must be called under the rq_lock */
-static int ptlrpc_at_recv_early_reply(struct ptlrpc_request *req) {
-        struct lustre_msg *oldmsg, *msgcpy;
-        time_t olddl;
-        int oldlen, rc;
-        ENTRY;
-
-        req->rq_early = 0;
-
-        rc = unpack_reply(req);
-        if (rc) 
-                /* Let's just ignore it - same as if it never got here */ 
-                RETURN(rc);
-
-        /* We've got to make sure another early reply doesn't land on
-           top of our current repbuf.  Make a copy and verify checksum. */
-        oldlen = req->rq_replen;
-        spin_unlock(&req->rq_lock);
-        OBD_ALLOC(msgcpy, oldlen);
-        if (!msgcpy) {
-                spin_lock(&req->rq_lock);
-                RETURN(-ENOMEM);
-        }
-        spin_lock(&req->rq_lock);
-        /* Another reply might have changed the repmsg and replen while 
-           we dropped the lock; doesn't really matter, just use the latest.
-           If it doesn't fit in oldlen, checksum will be wrong. */
-        oldmsg = req->rq_repmsg;
-        memcpy(msgcpy, oldmsg, oldlen);
-        if (lustre_msg_get_cksum(msgcpy) != 
-            lustre_msg_calc_cksum(msgcpy)) {
-                CDEBUG(D_ADAPTTO, "Early reply checksum mismatch, "
-                       "discarding %x != %x\n", lustre_msg_get_cksum(msgcpy),
-                       lustre_msg_calc_cksum(msgcpy));
-                GOTO(out, rc = -EINVAL); 
-        }
-
-        /* Our copied msg is valid, now we can adjust the timeouts without 
-           worrying that a new reply will land on the copy. */
-        req->rq_repmsg = msgcpy;
-
-        /* Expecting to increase the service time estimate here */
-        ptlrpc_at_adj_service(req);
-        ptlrpc_at_adj_net_latency(req);
-
-        /* Adjust the local timeout for this req */
-        ptlrpc_at_set_req_timeout(req);
-
-        olddl = req->rq_deadline;
-        /* server assumes it now has rq_timeout from when it sent the 
-           early reply, so client should give it at least that long. */
-        req->rq_deadline = cfs_time_current_sec() + req->rq_timeout + 
-                    ptlrpc_at_get_net_latency(req);
-
-        DEBUG_REQ(D_ADAPTTO, req, 
-                  "Early reply #%d, new deadline in %lds (%+lds)", 
-                  req->rq_early_count, req->rq_deadline -
-                  cfs_time_current_sec(), req->rq_deadline - olddl);
-        
-        req->rq_repmsg = oldmsg;
-        
-out:
-        OBD_FREE(msgcpy, oldlen);
-        RETURN(rc);
-}
-
-void ptlrpc_free_rq_pool(struct ptlrpc_request_pool *pool)
-{
-        struct list_head *l, *tmp;
-        struct ptlrpc_request *req;
-
-        if (!pool)
-                return;
-
-        list_for_each_safe(l, tmp, &pool->prp_req_list) {
-                req = list_entry(l, struct ptlrpc_request, rq_list);
-                list_del(&req->rq_list);
-                LASSERT (req->rq_reqmsg);
-                OBD_FREE(req->rq_reqmsg, pool->prp_rq_size);
-                OBD_FREE(req, sizeof(*req));
-        }
-        OBD_FREE(pool, sizeof(*pool));
-}
-
-void ptlrpc_add_rqs_to_pool(struct ptlrpc_request_pool *pool, int num_rq)
-{
-        int i;
-        int size = 1;
-
-        while (size < pool->prp_rq_size)
-                size <<= 1;
-
-        LASSERTF(list_empty(&pool->prp_req_list) || size == pool->prp_rq_size,
-                 "Trying to change pool size with nonempty pool "
-                 "from %d to %d bytes\n", pool->prp_rq_size, size);
-
-        spin_lock(&pool->prp_lock);
-        pool->prp_rq_size = size;
-        for (i = 0; i < num_rq; i++) {
-                struct ptlrpc_request *req;
-                struct lustre_msg *msg;
-
-                spin_unlock(&pool->prp_lock);
-                OBD_ALLOC(req, sizeof(struct ptlrpc_request));
-                if (!req)
-                        return;
-                OBD_ALLOC_GFP(msg, size, CFS_ALLOC_STD);
-                if (!msg) {
-                        OBD_FREE(req, sizeof(struct ptlrpc_request));
-                        return;
-                }
-                req->rq_reqmsg = msg;
-                req->rq_pool = pool;
-                spin_lock(&pool->prp_lock);
-                list_add_tail(&req->rq_list, &pool->prp_req_list);
-        }
-        spin_unlock(&pool->prp_lock);
-        return;
-}
-
-struct ptlrpc_request_pool *ptlrpc_init_rq_pool(int num_rq, int msgsize,
-                                                void (*populate_pool)(struct ptlrpc_request_pool *, int))
-{
-        struct ptlrpc_request_pool *pool;
-
-        OBD_ALLOC(pool, sizeof (struct ptlrpc_request_pool));
-        if (!pool)
-                return NULL;
-
-        /* Request next power of two for the allocation, because internally
-           kernel would do exactly this */
-
-        spin_lock_init(&pool->prp_lock);
-        CFS_INIT_LIST_HEAD(&pool->prp_req_list);
-        pool->prp_rq_size = msgsize;
-        pool->prp_populate = populate_pool;
-
-        populate_pool(pool, num_rq);
-
-        if (list_empty(&pool->prp_req_list)) {
-                /* have not allocated a single request for the pool */
-                OBD_FREE(pool, sizeof (struct ptlrpc_request_pool));
-                pool = NULL;
-        }
-        return pool;
-}
-
-static struct ptlrpc_request *ptlrpc_prep_req_from_pool(struct ptlrpc_request_pool *pool)
-{
-        struct ptlrpc_request *request;
-        struct lustre_msg *reqmsg;
-
-        if (!pool)
-                return NULL;
-
-        spin_lock(&pool->prp_lock);
-
-        /* See if we have anything in a pool, and bail out if nothing,
-         * in writeout path, where this matters, this is safe to do, because
-         * nothing is lost in this case, and when some in-flight requests
-         * complete, this code will be called again. */
-        if (unlikely(list_empty(&pool->prp_req_list))) {
-                spin_unlock(&pool->prp_lock);
-                return NULL;
-        }
-
-        request = list_entry(pool->prp_req_list.next, struct ptlrpc_request,
-                             rq_list);
-        list_del(&request->rq_list);
-        spin_unlock(&pool->prp_lock);
-
-        LASSERT(request->rq_reqmsg);
-        LASSERT(request->rq_pool);
-
-        reqmsg = request->rq_reqmsg;
-        memset(request, 0, sizeof(*request));
-        request->rq_reqmsg = reqmsg;
-        request->rq_pool = pool;
-        request->rq_reqlen = pool->prp_rq_size;
-        return request;
-}
-
-struct ptlrpc_request *
-ptlrpc_prep_req_pool(struct obd_import *imp, __u32 version, int opcode,
-                     int count, int *lengths, char **bufs,
-                     struct ptlrpc_request_pool *pool)
-{
-        struct ptlrpc_request *request = NULL;
-        int rc;
-        ENTRY;
-
-        /* The obd disconnected */
-        if (imp == NULL)
-                return NULL;
-
-        LASSERT(imp != LP_POISON);
-        LASSERT((unsigned long)imp->imp_client > 0x1000);
-        LASSERT(imp->imp_client != LP_POISON);
-
-        if (pool)
-                request = ptlrpc_prep_req_from_pool(pool);
-
-        if (!request)
-                OBD_ALLOC(request, sizeof(*request));
-
-        if (!request) {
-                CERROR("request allocation out of memory\n");
-                RETURN(NULL);
-        }
-
-        rc = lustre_pack_request(request, imp->imp_msg_magic, count, lengths,
-                                 bufs);
-        if (rc) {
-                LASSERT(!request->rq_pool);
-                OBD_FREE(request, sizeof(*request));
-                RETURN(NULL);
-        }
-
-        lustre_msg_add_version(request->rq_reqmsg, version);
-        request->rq_send_state = LUSTRE_IMP_FULL;
-        request->rq_type = PTL_RPC_MSG_REQUEST;
-        request->rq_import = class_import_get(imp);
-        request->rq_export = NULL;
-
-        request->rq_req_cbid.cbid_fn  = request_out_callback;
-        request->rq_req_cbid.cbid_arg = request;
-
-        request->rq_reply_cbid.cbid_fn  = reply_in_callback;
-        request->rq_reply_cbid.cbid_arg = request;
-
-        request->rq_phase = RQ_PHASE_NEW;
-
-        request->rq_request_portal = imp->imp_client->cli_request_portal;
-        request->rq_reply_portal = imp->imp_client->cli_reply_portal;
-        
-        ptlrpc_at_set_req_timeout(request);
-
-        spin_lock_init(&request->rq_lock);
-        CFS_INIT_LIST_HEAD(&request->rq_list);
-        CFS_INIT_LIST_HEAD(&request->rq_replay_list);
-        CFS_INIT_LIST_HEAD(&request->rq_set_chain);
-        CFS_INIT_LIST_HEAD(&request->rq_history_list);
-        cfs_waitq_init(&request->rq_reply_waitq);
-        request->rq_xid = ptlrpc_next_xid();
-        atomic_set(&request->rq_refcount, 1);
-
-        lustre_msg_set_opc(request->rq_reqmsg, opcode);
-        lustre_msghdr_set_flags(request->rq_reqmsg, imp->imp_msghdr_flags);
-
-        RETURN(request);
-}
-
-struct ptlrpc_request *
-ptlrpc_prep_req(struct obd_import *imp, __u32 version, int opcode, int count,
-                int *lengths, char **bufs)
-{
-        return ptlrpc_prep_req_pool(imp, version, opcode, count, lengths, bufs,
-                                    NULL);
-}
-
-struct ptlrpc_request_set *ptlrpc_prep_set(void)
-{
-        struct ptlrpc_request_set *set;
-
-        ENTRY;
-        OBD_ALLOC(set, sizeof *set);
-        if (!set)
-                RETURN(NULL);
-        CFS_INIT_LIST_HEAD(&set->set_requests);
-        cfs_waitq_init(&set->set_waitq);
-        set->set_remaining = 0;
-        spin_lock_init(&set->set_new_req_lock);
-        CFS_INIT_LIST_HEAD(&set->set_new_requests);
-        CFS_INIT_LIST_HEAD(&set->set_cblist);
-
-        RETURN(set);
-}
-
-/* Finish with this set; opposite of prep_set. */
-void ptlrpc_set_destroy(struct ptlrpc_request_set *set)
-{
-        struct list_head *tmp;
-        struct list_head *next;
-        int               expected_phase;
-        int               n = 0;
-        ENTRY;
-
-        /* Requests on the set should either all be completed, or all be new */
-        expected_phase = (set->set_remaining == 0) ?
-                         RQ_PHASE_COMPLETE : RQ_PHASE_NEW;
-        list_for_each (tmp, &set->set_requests) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-
-                LASSERT(req->rq_phase == expected_phase);
-                n++;
-        }
-
-        LASSERT(set->set_remaining == 0 || set->set_remaining == n);
-
-        list_for_each_safe(tmp, next, &set->set_requests) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-                list_del_init(&req->rq_set_chain);
-
-                LASSERT(req->rq_phase == expected_phase);
-
-                if (req->rq_phase == RQ_PHASE_NEW) {
-
-                        if (req->rq_interpret_reply != NULL) {
-                                int (*interpreter)(struct ptlrpc_request *,
-                                                   void *, int) =
-                                        req->rq_interpret_reply;
-
-                                /* higher level (i.e. LOV) failed;
-                                 * let the sub reqs clean up */
-                                req->rq_status = -EBADR;
-                                interpreter(req, &req->rq_async_args,
-                                            req->rq_status);
-                        }
-                        set->set_remaining--;
-                }
-
-                req->rq_set = NULL;
-                ptlrpc_req_finished (req);
-        }
-
-        LASSERT(set->set_remaining == 0);
-
-        OBD_FREE(set, sizeof(*set));
-        EXIT;
-}
-
-int ptlrpc_set_add_cb(struct ptlrpc_request_set *set,
-                      set_interpreter_func fn, void *data)
-{
-        struct ptlrpc_set_cbdata *cbdata;
-
-        OBD_SLAB_ALLOC(cbdata, ptlrpc_cbdata_slab, 
-                        CFS_ALLOC_STD, sizeof(*cbdata));
-        if (cbdata == NULL)
-                RETURN(-ENOMEM);
-
-        cbdata->psc_interpret = fn;
-        cbdata->psc_data = data;
-        list_add_tail(&cbdata->psc_item, &set->set_cblist);
-        
-        RETURN(0);
-}
-
-void ptlrpc_set_add_req(struct ptlrpc_request_set *set,
-                        struct ptlrpc_request *req)
-{
-        /* The set takes over the caller's request reference */
-        list_add_tail(&req->rq_set_chain, &set->set_requests);
-        req->rq_set = set;
-        set->set_remaining++;
-
-        atomic_inc(&req->rq_import->imp_inflight);
-}
-
-/* lock so many callers can add things, the context that owns the set
- * is supposed to notice these and move them into the set proper. */
-void ptlrpc_set_add_new_req(struct ptlrpc_request_set *set,
-                            struct ptlrpc_request *req)
-{
-        spin_lock(&set->set_new_req_lock);
-        /* The set takes over the caller's request reference */
-        list_add_tail(&req->rq_set_chain, &set->set_new_requests);
-        req->rq_set = set;
-        spin_unlock(&set->set_new_req_lock);
-}
-
-/*
- * Based on the current state of the import, determine if the request
- * can be sent, is an error, or should be delayed.
- *
- * Returns true if this request should be delayed. If false, and
- * *status is set, then the request can not be sent and *status is the
- * error code.  If false and status is 0, then request can be sent.
- *
- * The imp->imp_lock must be held.
- */
-static int ptlrpc_import_delay_req(struct obd_import *imp,
-                                   struct ptlrpc_request *req, int *status)
-{
-        int delay = 0;
-        ENTRY;
-
-        LASSERT (status != NULL);
-        *status = 0;
-
-        if (imp->imp_state == LUSTRE_IMP_NEW) {
-                DEBUG_REQ(D_ERROR, req, "Uninitialized import.");
-                *status = -EIO;
-                LBUG();
-        } else if (imp->imp_state == LUSTRE_IMP_CLOSED) {
-                DEBUG_REQ(D_ERROR, req, "IMP_CLOSED ");
-                *status = -EIO;
-        } else if (req->rq_send_state == LUSTRE_IMP_CONNECTING &&
-                 imp->imp_state == LUSTRE_IMP_CONNECTING) {
-                /* allow CONNECT even if import is invalid */ ;
-                if (atomic_read(&imp->imp_inval_count) != 0) {
-                        DEBUG_REQ(D_ERROR, req, "invalidate in flight");
-                        *status = -EIO;
-                }
-        } else if ((imp->imp_invalid && (!imp->imp_recon_bk)) ||
-                                         imp->imp_obd->obd_no_recov) {
-                /* If the import has been invalidated (such as by an OST
-                 * failure), and if the import(MGC) tried all of its connection
-                 * list (Bug 13464), the request must fail with -ESHUTDOWN.
-                 * This indicates the requests should be discarded; an -EIO
-                 * may result in a resend of the request. */
-                if (!imp->imp_deactive)
-                        DEBUG_REQ(D_ERROR, req, "IMP_INVALID");
-                *status = -ESHUTDOWN; /* bz 12940 */
-        } else if (req->rq_import_generation != imp->imp_generation) {
-                DEBUG_REQ(D_ERROR, req, "req wrong generation:");
-                *status = -EIO;
-        } else if (req->rq_send_state != imp->imp_state) {
-                /* invalidate in progress - any requests should be drop */
-                if (atomic_read(&imp->imp_inval_count) != 0) {
-                        DEBUG_REQ(D_ERROR, req, "invalidate in flight");
-                        *status = -EIO;
-                } else if (imp->imp_dlm_fake || req->rq_no_delay) {
-                        *status = -EWOULDBLOCK;
-                } else {
-                        delay = 1;
-                }
-        }
-
-        RETURN(delay);
-}
-
-static int ptlrpc_check_reply(struct ptlrpc_request *req)
-{
-        int rc = 0;
-        ENTRY;
-
-        /* serialise with network callback */
-        spin_lock(&req->rq_lock);
-
-        if (req->rq_replied)
-                GOTO(out, rc = 1);
-
-        if (req->rq_net_err && !req->rq_timedout) {
-                spin_unlock(&req->rq_lock);
-                rc = ptlrpc_expire_one_request(req);
-                spin_lock(&req->rq_lock);
-                GOTO(out, rc);
-        }
-
-        if (req->rq_err)
-                GOTO(out, rc = 1);
-
-        if (req->rq_resend)
-                GOTO(out, rc = 1);
-
-        if (req->rq_restart)
-                GOTO(out, rc = 1);
-
-        if (req->rq_early) {
-                ptlrpc_at_recv_early_reply(req);
-                GOTO(out, rc = 0); /* keep waiting */
-        }
-
-        EXIT;
- out:
-        spin_unlock(&req->rq_lock);
-        DEBUG_REQ(D_NET, req, "rc = %d for", rc);
-        return rc;
-}
-
-static int ptlrpc_check_status(struct ptlrpc_request *req)
-{
-        int err;
-        ENTRY;
-
-        err = lustre_msg_get_status(req->rq_repmsg);
-        if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) {
-                struct obd_import *imp = req->rq_import;
-                __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
-
-                LCONSOLE_ERROR_MSG(0x011,"an error occurred while communicating"
-                               " with %s. The %s operation failed with %d\n",
-                               libcfs_nid2str(imp->imp_connection->c_peer.nid),
-                               ll_opcode2str(opc), err);
-                RETURN(err < 0 ? err : -EINVAL);
-        }
-
-        if (err < 0) {
-                DEBUG_REQ(D_INFO, req, "status is %d", err);
-        } else if (err > 0) {
-                /* XXX: translate this error from net to host */
-                DEBUG_REQ(D_INFO, req, "status is %d", err);
-        }
-
-        RETURN(err);
-}
-
-static int after_reply(struct ptlrpc_request *req)
-{
-        struct obd_import *imp = req->rq_import;
-        struct obd_device *obd = req->rq_import->imp_obd;
-        int rc;
-        struct timeval work_start;
-        long timediff;
-        ENTRY;
-
-        LASSERT(!req->rq_receiving_reply);
-        LASSERT(obd);
-
-        /* NB Until this point, the whole of the incoming message,
-         * including buflens, status etc is in the sender's byte order. */
-
-        LASSERT (req->rq_nob_received <= req->rq_replen);
-        rc = unpack_reply(req);
-        if (rc) 
-                RETURN(rc);
-
-        do_gettimeofday(&work_start);
-        timediff = cfs_timeval_sub(&work_start, &req->rq_arrival_time, NULL);
-        if (obd->obd_svc_stats != NULL)
-                lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQWAIT_CNTR,
-                                    timediff);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_PAUSE_REP, obd_fail_val);
-        ptlrpc_at_adj_service(req);
-        ptlrpc_at_adj_net_latency(req);
-
-        if (lustre_msg_get_type(req->rq_repmsg) != PTL_RPC_MSG_REPLY &&
-            lustre_msg_get_type(req->rq_repmsg) != PTL_RPC_MSG_ERR) {
-                DEBUG_REQ(D_ERROR, req, "invalid packet received (type=%u)",
-                          lustre_msg_get_type(req->rq_repmsg));
-                RETURN(-EPROTO);
-        }
-
-        rc = ptlrpc_check_status(req);
-        if (rc) {
-                /* Either we've been evicted, or the server has failed for
-                 * some reason. Try to reconnect, and if that fails, punt to
-                 * the upcall. */
-                if (ll_rpc_recoverable_error(rc)) {
-                        if (req->rq_send_state != LUSTRE_IMP_FULL ||
-                            imp->imp_obd->obd_no_recov || imp->imp_dlm_fake) {
-                                RETURN(rc);
-                        }
-                        ptlrpc_request_handle_notconn(req);
-                        RETURN(rc);
-                }
-        } else {
-                /* Let's look if server send slv. Do it only for RPC with 
-                 * rc == 0. */
-                if (imp->imp_obd->obd_namespace) {
-                        /* Disconnect rpc is sent when namespace is already 
-                         * destroyed. Let's check this and will not try update
-                         * pool. */
-                        ldlm_cli_update_pool(req);
-                }
-        }
-
-        /* Store transno in reqmsg for replay. */
-        req->rq_transno = lustre_msg_get_transno(req->rq_repmsg);
-        lustre_msg_set_transno(req->rq_reqmsg, req->rq_transno);
-
-        if (req->rq_import->imp_replayable) {
-                spin_lock(&imp->imp_lock);
-                /* no point in adding already-committed requests to the replay
-                 * list, we will just remove them immediately. b=9829 */
-                if (req->rq_transno != 0 && 
-                    (req->rq_transno > 
-                     lustre_msg_get_last_committed(req->rq_repmsg) ||
-                     req->rq_replay))
-                        ptlrpc_retain_replayable_request(req, imp);
-                else if (req->rq_commit_cb != NULL) {
-                        spin_unlock(&imp->imp_lock);
-                        req->rq_commit_cb(req);
-                        spin_lock(&imp->imp_lock);
-                }
-
-                /* Replay-enabled imports return commit-status information. */
-                if (lustre_msg_get_last_committed(req->rq_repmsg))
-                        imp->imp_peer_committed_transno =
-                                lustre_msg_get_last_committed(req->rq_repmsg);
-                ptlrpc_free_committed(imp);
-                spin_unlock(&imp->imp_lock);
-        }
-
-        RETURN(rc);
-}
-
-static int ptlrpc_send_new_req(struct ptlrpc_request *req)
-{
-        struct obd_import     *imp;
-        int rc;
-        ENTRY;
-
-        LASSERT(req->rq_phase == RQ_PHASE_NEW);
-        if (req->rq_sent && (req->rq_sent > CURRENT_SECONDS))
-                RETURN (0);
-        
-        req->rq_phase = RQ_PHASE_RPC;
-
-        imp = req->rq_import;
-        spin_lock(&imp->imp_lock);
-
-        req->rq_import_generation = imp->imp_generation;
-
-        if (ptlrpc_import_delay_req(imp, req, &rc)) {
-                spin_lock (&req->rq_lock);
-                req->rq_waiting = 1;
-                spin_unlock (&req->rq_lock);
-
-                DEBUG_REQ(D_HA, req, "req from PID %d waiting for recovery: "
-                          "(%s != %s)",
-                          lustre_msg_get_status(req->rq_reqmsg) ,
-                          ptlrpc_import_state_name(req->rq_send_state),
-                          ptlrpc_import_state_name(imp->imp_state));
-                LASSERT(list_empty (&req->rq_list));
-
-                list_add_tail(&req->rq_list, &imp->imp_delayed_list);
-                spin_unlock(&imp->imp_lock);
-                RETURN(0);
-        }
-
-        if (rc != 0) {
-                spin_unlock(&imp->imp_lock);
-                req->rq_status = rc;
-                req->rq_phase = RQ_PHASE_INTERPRET;
-                RETURN(rc);
-        }
-
-        /* XXX this is the same as ptlrpc_queue_wait */
-        LASSERT(list_empty(&req->rq_list));
-        list_add_tail(&req->rq_list, &imp->imp_sending_list);
-        spin_unlock(&imp->imp_lock);
-
-        lustre_msg_set_status(req->rq_reqmsg, cfs_curproc_pid());
-        CDEBUG(D_RPCTRACE, "Sending RPC pname:cluuid:pid:xid:nid:opc"
-               " %s:%s:%d:"LPU64":%s:%d\n", cfs_curproc_comm(),
-               imp->imp_obd->obd_uuid.uuid,
-               lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
-               libcfs_nid2str(imp->imp_connection->c_peer.nid),
-               lustre_msg_get_opc(req->rq_reqmsg));
-
-        rc = ptl_send_rpc(req, 0);
-        if (rc) {
-                DEBUG_REQ(D_HA, req, "send failed (%d); expect timeout", rc);
-                req->rq_net_err = 1;
-                RETURN(rc);
-        }
-        RETURN(0);
-}
-
-/* this sends any unsent RPCs in @set and returns TRUE if all are sent */
-int ptlrpc_check_set(struct ptlrpc_request_set *set)
-{
-        struct list_head *tmp;
-        int force_timer_recalc = 0;
-        ENTRY;
-
-        if (set->set_remaining == 0)
-                RETURN(1);
-
-        list_for_each(tmp, &set->set_requests) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-                struct obd_import *imp = req->rq_import;
-                int rc = 0;
-
-                if (req->rq_phase == RQ_PHASE_NEW &&
-                    ptlrpc_send_new_req(req)) {
-                        force_timer_recalc = 1;
-                }
-                /* delayed send - skip */
-                if (req->rq_phase == RQ_PHASE_NEW && req->rq_sent)
-                        continue;
-
-                if (!(req->rq_phase == RQ_PHASE_RPC ||
-                      req->rq_phase == RQ_PHASE_BULK ||
-                      req->rq_phase == RQ_PHASE_INTERPRET ||
-                      req->rq_phase == RQ_PHASE_COMPLETE)) {
-                        DEBUG_REQ(D_ERROR, req, "bad phase %x", req->rq_phase);
-                        LBUG();
-                }
-
-                if (req->rq_phase == RQ_PHASE_COMPLETE)
-                        continue;
-
-                if (req->rq_phase == RQ_PHASE_INTERPRET)
-                        GOTO(interpret, req->rq_status);
-
-                if (req->rq_net_err && !req->rq_timedout)
-                        ptlrpc_expire_one_request(req);
-
-                if (req->rq_err) {
-                        ptlrpc_unregister_reply(req);
-                        if (req->rq_status == 0)
-                                req->rq_status = -EIO;
-                        req->rq_phase = RQ_PHASE_INTERPRET;
-
-                        spin_lock(&imp->imp_lock);
-                        list_del_init(&req->rq_list);
-                        spin_unlock(&imp->imp_lock);
-
-                        GOTO(interpret, req->rq_status);
-                }
-
-                /* ptlrpc_queue_wait->l_wait_event guarantees that rq_intr
-                 * will only be set after rq_timedout, but the oig waiting
-                 * path sets rq_intr irrespective of whether ptlrpcd has
-                 * seen a timeout.  our policy is to only interpret
-                 * interrupted rpcs after they have timed out */
-                if (req->rq_intr && (req->rq_timedout || req->rq_waiting)) {
-                        /* NB could be on delayed list */
-                        ptlrpc_unregister_reply(req);
-                        req->rq_status = -EINTR;
-                        req->rq_phase = RQ_PHASE_INTERPRET;
-
-                        spin_lock(&imp->imp_lock);
-                        list_del_init(&req->rq_list);
-                        spin_unlock(&imp->imp_lock);
-
-                        GOTO(interpret, req->rq_status);
-                }
-
-                if (req->rq_phase == RQ_PHASE_RPC) {
-                        if (req->rq_timedout||req->rq_waiting||req->rq_resend) {
-                                int status;
-
-                                ptlrpc_unregister_reply(req);
-
-                                spin_lock(&imp->imp_lock);
-
-                                if (ptlrpc_import_delay_req(imp, req, &status)){
-                                        spin_unlock(&imp->imp_lock);
-                                        continue;
-                                }
-
-                                list_del_init(&req->rq_list);
-                                if (status != 0)  {
-                                        req->rq_status = status;
-                                        req->rq_phase = RQ_PHASE_INTERPRET;
-                                        spin_unlock(&imp->imp_lock);
-                                        GOTO(interpret, req->rq_status);
-                                }
-                                if (req->rq_no_resend) {
-                                        req->rq_status = -ENOTCONN;
-                                        req->rq_phase = RQ_PHASE_INTERPRET;
-                                        spin_unlock(&imp->imp_lock);
-                                        GOTO(interpret, req->rq_status);
-                                }
-                                list_add_tail(&req->rq_list,
-                                              &imp->imp_sending_list);
-
-                                spin_unlock(&imp->imp_lock);
-
-                                req->rq_waiting = 0;
-                                if (req->rq_resend) {
-                                        lustre_msg_add_flags(req->rq_reqmsg,
-                                                             MSG_RESENT);
-                                        if (req->rq_bulk) {
-                                                __u64 old_xid = req->rq_xid;
-
-                                                ptlrpc_unregister_bulk (req);
-
-                                                /* ensure previous bulk fails */
-                                                req->rq_xid = ptlrpc_next_xid();
-                                                CDEBUG(D_HA, "resend bulk "
-                                                       "old x"LPU64
-                                                       " new x"LPU64"\n",
-                                                       old_xid, req->rq_xid);
-                                        }
-                                }
-
-                                rc = ptl_send_rpc(req, 0);
-                                if (rc) {
-                                        DEBUG_REQ(D_HA, req, "send failed (%d)",
-                                                  rc);
-                                        force_timer_recalc = 1;
-                                        req->rq_net_err = 1;
-                                }
-                                /* need to reset the timeout */
-                                force_timer_recalc = 1;
-                        }
-
-                        spin_lock(&req->rq_lock);
-
-                        if (req->rq_early) {
-                                ptlrpc_at_recv_early_reply(req);
-                                spin_unlock(&req->rq_lock);
-                                continue;
-                        }
-
-                        /* Still waiting for a reply? */
-                        if (req->rq_receiving_reply) {
-                                spin_unlock(&req->rq_lock);
-                                continue;
-                        }
-
-                        /* Did we actually receive a reply? */
-                        if (!req->rq_replied) {
-                                spin_unlock(&req->rq_lock);
-                                continue;
-                        }
-
-                        spin_unlock(&req->rq_lock);
-
-                        spin_lock(&imp->imp_lock);
-                        list_del_init(&req->rq_list);
-                        spin_unlock(&imp->imp_lock);
-
-                        req->rq_status = after_reply(req);
-                        if (req->rq_resend) {
-                                /* Add this req to the delayed list so
-                                   it can be errored if the import is
-                                   evicted after recovery. */
-                                spin_lock(&imp->imp_lock);
-                                list_add_tail(&req->rq_list,
-                                              &imp->imp_delayed_list);
-                                spin_unlock(&imp->imp_lock);
-                                continue;
-                        }
-
-                        /* If there is no bulk associated with this request,
-                         * then we're done and should let the interpreter
-                         * process the reply.  Similarly if the RPC returned
-                         * an error, and therefore the bulk will never arrive.
-                         */
-                        if (req->rq_bulk == NULL || req->rq_status != 0) {
-                                req->rq_phase = RQ_PHASE_INTERPRET;
-                                GOTO(interpret, req->rq_status);
-                        }
-
-                        req->rq_phase = RQ_PHASE_BULK;
-                }
-
-                LASSERT(req->rq_phase == RQ_PHASE_BULK);
-                if (ptlrpc_bulk_active(req->rq_bulk))
-                        continue;
-
-                if (!req->rq_bulk->bd_success) {
-                        /* The RPC reply arrived OK, but the bulk screwed
-                         * up!  Dead wierd since the server told us the RPC
-                         * was good after getting the REPLY for her GET or
-                         * the ACK for her PUT. */
-                        DEBUG_REQ(D_ERROR, req, "bulk transfer failed");
-                        req->rq_status = -EIO;
-                        req->rq_phase = RQ_PHASE_INTERPRET;
-                        GOTO(interpret, req->rq_status);
-                }
-
-                req->rq_phase = RQ_PHASE_INTERPRET;
-
-        interpret:
-                LASSERT(req->rq_phase == RQ_PHASE_INTERPRET);
-                LASSERT(!req->rq_receiving_reply);
-
-                ptlrpc_unregister_reply(req);
-                if (req->rq_bulk != NULL)
-                        ptlrpc_unregister_bulk (req);
-
-                if (req->rq_interpret_reply != NULL) {
-                        int (*interpreter)(struct ptlrpc_request *,void *,int) =
-                                req->rq_interpret_reply;
-                        req->rq_status = interpreter(req, &req->rq_async_args,
-                                                     req->rq_status);
-                }
-                req->rq_phase = RQ_PHASE_COMPLETE;
-
-                CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:"
-                       "opc %s:%s:%d:"LPU64":%s:%d\n", cfs_curproc_comm(),
-                       imp->imp_obd->obd_uuid.uuid,
-                       lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
-                       libcfs_nid2str(imp->imp_connection->c_peer.nid),
-                       lustre_msg_get_opc(req->rq_reqmsg));
-
-                set->set_remaining--;
-
-                atomic_dec(&imp->imp_inflight);
-                cfs_waitq_signal(&imp->imp_recovery_waitq);
-        }
-
-        /* If we hit an error, we want to recover promptly. */
-        RETURN(set->set_remaining == 0 || force_timer_recalc);
-}
-
-/* Return 1 if we should give up, else 0 */
-int ptlrpc_expire_one_request(struct ptlrpc_request *req)
-{
-        struct obd_import *imp = req->rq_import;
-        int rc = 0;
-        ENTRY;
-
-        DEBUG_REQ(D_NETERROR, req, "%s (sent at %lu, %lus ago)",
-                  req->rq_net_err ? "network error" : "timeout",
-                  (long)req->rq_sent, cfs_time_current_sec() - req->rq_sent);
-
-        if (imp) {
-                LCONSOLE_WARN("Request x"LPU64" sent from %s to NID %s %lus ago"
-                              " has timed out (limit %lus).\n", req->rq_xid,
-                              req->rq_import->imp_obd->obd_name,
-                              libcfs_nid2str(imp->imp_connection->c_peer.nid),
-                              cfs_time_current_sec() - req->rq_sent,
-                              req->rq_deadline - req->rq_sent);
-        }
-
-        if (imp != NULL && obd_debug_peer_on_timeout)
-                LNetCtl(IOC_LIBCFS_DEBUG_PEER, &imp->imp_connection->c_peer);
-
-        spin_lock(&req->rq_lock);
-        req->rq_timedout = 1;
-        spin_unlock(&req->rq_lock);
-
-        ptlrpc_unregister_reply (req);
-
-        if (obd_dump_on_timeout)
-                libcfs_debug_dumplog();
-
-        if (req->rq_bulk != NULL)
-                ptlrpc_unregister_bulk (req);
-
-        if (imp == NULL) {
-                DEBUG_REQ(D_HA, req, "NULL import: already cleaned up?");
-                RETURN(1);
-        }
-
-        /* The DLM server doesn't want recovery run on its imports. */
-        if (imp->imp_dlm_fake)
-                RETURN(1);
-
-        /* If this request is for recovery or other primordial tasks,
-         * then error it out here. */
-        if (req->rq_send_state != LUSTRE_IMP_FULL ||
-            imp->imp_obd->obd_no_recov) {
-                DEBUG_REQ(D_RPCTRACE, req, "err -110, sent_state=%s (now=%s)",
-                          ptlrpc_import_state_name(req->rq_send_state),
-                          ptlrpc_import_state_name(imp->imp_state));
-                spin_lock(&req->rq_lock);
-                req->rq_status = -ETIMEDOUT;
-                req->rq_err = 1;
-                spin_unlock(&req->rq_lock);
-                RETURN(1);
-        }
-
-        /* if a request can't be resent we can't wait for an answer after 
-           the timeout */
-        if (req->rq_no_resend) {
-                DEBUG_REQ(D_RPCTRACE, req, "TIMEOUT-NORESEND:");
-                rc = 1;
-        }
-
-        ptlrpc_fail_import(imp, lustre_msg_get_conn_cnt(req->rq_reqmsg));
-
-        RETURN(rc);
-}
-
-int ptlrpc_expired_set(void *data)
-{
-        struct ptlrpc_request_set *set = data;
-        struct list_head          *tmp;
-        time_t                     now = cfs_time_current_sec();
-        ENTRY;
-
-        LASSERT(set != NULL);
-
-        /* A timeout expired; see which reqs it applies to... */
-        list_for_each (tmp, &set->set_requests) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-
-                /* request in-flight? */
-                if (!((req->rq_phase == RQ_PHASE_RPC && !req->rq_waiting &&
-                       !req->rq_resend) ||
-                      (req->rq_phase == RQ_PHASE_BULK)))
-                        continue;
-
-                if (req->rq_timedout ||           /* already dealt with */
-                    req->rq_deadline > now) /* not expired */
-                        continue;
-
-                /* deal with this guy */
-                ptlrpc_expire_one_request (req);
-        }
-
-        /* When waiting for a whole set, we always to break out of the
-         * sleep so we can recalculate the timeout, or enable interrupts
-         * iff everyone's timed out.
-         */
-        RETURN(1);
-}
-
-void ptlrpc_mark_interrupted(struct ptlrpc_request *req)
-{
-        spin_lock(&req->rq_lock);
-        req->rq_intr = 1;
-        spin_unlock(&req->rq_lock);
-}
-
-void ptlrpc_interrupted_set(void *data)
-{
-        struct ptlrpc_request_set *set = data;
-        struct list_head *tmp;
-
-        LASSERT(set != NULL);
-        CERROR("INTERRUPTED SET %p\n", set);
-
-        list_for_each(tmp, &set->set_requests) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-
-                if (req->rq_phase != RQ_PHASE_RPC)
-                        continue;
-
-                ptlrpc_mark_interrupted(req);
-        }
-}
-
-/* get the smallest timeout in the set; this does NOT set a timeout. */
-int ptlrpc_set_next_timeout(struct ptlrpc_request_set *set)
-{
-        struct list_head      *tmp;
-        time_t                 now = cfs_time_current_sec();
-        int                    timeout = 0;
-        struct ptlrpc_request *req;
-        int                    deadline;
-        ENTRY;
-
-        SIGNAL_MASK_ASSERT(); /* XXX BUG 1511 */
-
-        list_for_each(tmp, &set->set_requests) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-
-                /* request in-flight? */
-                if (!(((req->rq_phase == RQ_PHASE_RPC) && !req->rq_waiting) ||
-                      (req->rq_phase == RQ_PHASE_BULK) || 
-                      (req->rq_phase == RQ_PHASE_NEW)))
-                        continue;
-
-                if (req->rq_timedout)   /* already timed out */
-                        continue;
-
-                if (req->rq_phase == RQ_PHASE_NEW)
-                        deadline = req->rq_sent;        /* delayed send */
-                else
-                        deadline = req->rq_deadline;
-
-                if (deadline <= now) {  /* actually expired already */
-                        timeout = 1;    /* ASAP */
-                        break;
-                } 
-                if ((timeout == 0) || (timeout > (deadline - now))) {
-                        timeout = deadline - now;
-                }
-        }
-        RETURN(timeout);
-}
-
-int ptlrpc_set_wait(struct ptlrpc_request_set *set)
-{
-        struct list_head      *tmp;
-        struct ptlrpc_request *req;
-        struct l_wait_info     lwi;
-        int                    rc, timeout;
-        ENTRY;
-
-        if (list_empty(&set->set_requests))
-                RETURN(0);
-
-        list_for_each(tmp, &set->set_requests) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-                if (req->rq_phase == RQ_PHASE_NEW)
-                        (void)ptlrpc_send_new_req(req);
-        }
-
-        do {
-                timeout = ptlrpc_set_next_timeout(set);
-
-                /* wait until all complete, interrupted, or an in-flight
-                 * req times out */
-                CDEBUG(D_RPCTRACE, "set %p going to sleep for %d seconds\n",
-                       set, timeout);
-                lwi = LWI_TIMEOUT_INTR(cfs_time_seconds(timeout ? timeout : 1),
-                                       ptlrpc_expired_set,
-                                       ptlrpc_interrupted_set, set);
-                rc = l_wait_event(set->set_waitq, ptlrpc_check_set(set), &lwi);
-
-                LASSERT(rc == 0 || rc == -EINTR || rc == -ETIMEDOUT);
-
-                /* -EINTR => all requests have been flagged rq_intr so next
-                 * check completes.
-                 * -ETIMEOUTD => someone timed out.  When all reqs have
-                 * timed out, signals are enabled allowing completion with
-                 * EINTR.
-                 * I don't really care if we go once more round the loop in
-                 * the error cases -eeb. */
-        } while (rc != 0 || set->set_remaining != 0);
-
-        LASSERT(set->set_remaining == 0);
-
-        rc = 0;
-        list_for_each(tmp, &set->set_requests) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_set_chain);
-
-                LASSERT(req->rq_phase == RQ_PHASE_COMPLETE);
-                if (req->rq_status != 0)
-                        rc = req->rq_status;
-        }
-
-        if (set->set_interpret != NULL) {
-                int (*interpreter)(struct ptlrpc_request_set *set,void *,int) =
-                        set->set_interpret;
-                rc = interpreter (set, set->set_arg, rc);
-        } else {
-                struct ptlrpc_set_cbdata *cbdata, *n;
-                int err;
-
-                list_for_each_entry_safe(cbdata, n, 
-                                         &set->set_cblist, psc_item) {
-                        list_del_init(&cbdata->psc_item);
-                        err = cbdata->psc_interpret(set, cbdata->psc_data, rc);
-                        if (err && !rc)
-                                rc = err;
-                        OBD_SLAB_FREE(cbdata, ptlrpc_cbdata_slab, 
-                                        sizeof(*cbdata));
-                }
-        }
-
-        RETURN(rc);
-}
-
-static void __ptlrpc_free_req_to_pool(struct ptlrpc_request *request)
-{
-        struct ptlrpc_request_pool *pool = request->rq_pool;
-
-        spin_lock(&pool->prp_lock);
-        list_add_tail(&request->rq_list, &pool->prp_req_list);
-        spin_unlock(&pool->prp_lock);
-}
-
-static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked)
-{
-        ENTRY;
-        if (request == NULL) {
-                EXIT;
-                return;
-        }
-
-        LASSERTF(!request->rq_receiving_reply, "req %p\n", request);
-        LASSERTF(request->rq_rqbd == NULL, "req %p\n",request);/* client-side */
-        LASSERTF(list_empty(&request->rq_list), "req %p\n", request);
-        LASSERTF(list_empty(&request->rq_set_chain), "req %p\n", request);
-
-        /* We must take it off the imp_replay_list first.  Otherwise, we'll set
-         * request->rq_reqmsg to NULL while osc_close is dereferencing it. */
-        if (request->rq_import != NULL) {
-                if (!locked)
-                        spin_lock(&request->rq_import->imp_lock);
-                list_del_init(&request->rq_replay_list);
-                if (!locked)
-                        spin_unlock(&request->rq_import->imp_lock);
-        }
-        LASSERTF(list_empty(&request->rq_replay_list), "req %p\n", request);
-
-        if (atomic_read(&request->rq_refcount) != 0) {
-                DEBUG_REQ(D_ERROR, request,
-                          "freeing request with nonzero refcount");
-                LBUG();
-        }
-
-        if (request->rq_repbuf != NULL) {
-                OBD_FREE(request->rq_repbuf, request->rq_replen);
-                request->rq_repbuf = NULL;
-                request->rq_repmsg = NULL;
-        }
-        if (request->rq_export != NULL) {
-                class_export_put(request->rq_export);
-                request->rq_export = NULL;
-        }
-        if (request->rq_import != NULL) {
-                class_import_put(request->rq_import);
-                request->rq_import = NULL;
-        }
-        if (request->rq_bulk != NULL)
-                ptlrpc_free_bulk(request->rq_bulk);
-
-        if (request->rq_pool) {
-                __ptlrpc_free_req_to_pool(request);
-        } else {
-                if (request->rq_reqmsg != NULL) {
-                        OBD_FREE(request->rq_reqmsg, request->rq_reqlen);
-                        request->rq_reqmsg = NULL;
-                }
-                OBD_FREE(request, sizeof(*request));
-        }
-        EXIT;
-}
-
-void ptlrpc_free_req(struct ptlrpc_request *request)
-{
-        __ptlrpc_free_req(request, 0);
-}
-
-static int __ptlrpc_req_finished(struct ptlrpc_request *request, int locked);
-void ptlrpc_req_finished_with_imp_lock(struct ptlrpc_request *request)
-{
-        LASSERT_SPIN_LOCKED(&request->rq_import->imp_lock);
-        (void)__ptlrpc_req_finished(request, 1);
-}
-
-static int __ptlrpc_req_finished(struct ptlrpc_request *request, int locked)
-{
-        ENTRY;
-        if (request == NULL)
-                RETURN(1);
-
-        if (request == LP_POISON ||
-            request->rq_reqmsg == LP_POISON) {
-                CERROR("dereferencing freed request (bug 575)\n");
-                LBUG();
-                RETURN(1);
-        }
-
-        DEBUG_REQ(D_INFO, request, "refcount now %u",
-                  atomic_read(&request->rq_refcount) - 1);
-
-        if (atomic_dec_and_test(&request->rq_refcount)) {
-                __ptlrpc_free_req(request, locked);
-                RETURN(1);
-        }
-
-        RETURN(0);
-}
-
-void ptlrpc_req_finished(struct ptlrpc_request *request)
-{
-        __ptlrpc_req_finished(request, 0);
-}
-
-__u64 ptlrpc_req_xid(struct ptlrpc_request *request)
-{
-        return request->rq_xid;
-}
-EXPORT_SYMBOL(ptlrpc_req_xid);
-
-/* Disengage the client's reply buffer from the network
- * NB does _NOT_ unregister any client-side bulk.
- * IDEMPOTENT, but _not_ safe against concurrent callers.
- * The request owner (i.e. the thread doing the I/O) must call...
- */
-void ptlrpc_unregister_reply (struct ptlrpc_request *request)
-{
-        int                rc;
-        cfs_waitq_t       *wq;
-        struct l_wait_info lwi;
-        ENTRY;
-
-        LASSERT(!in_interrupt ());             /* might sleep */
-        if (!ptlrpc_client_recv_or_unlink(request))
-                /* Nothing left to do */
-                return;
-
-        LNetMDUnlink (request->rq_reply_md_h);
-
-        /* We have to l_wait_event() whatever the result, to give liblustre
-         * a chance to run reply_in_callback(), and to make sure we've 
-         * unlinked before returning a req to the pool */
-
-        if (request->rq_set != NULL)
-                wq = &request->rq_set->set_waitq;
-        else
-                wq = &request->rq_reply_waitq;
-
-        for (;;) {
-                /* Network access will complete in finite time but the HUGE
-                 * timeout lets us CWARN for visibility of sluggish NALs */
-                lwi = LWI_TIMEOUT(cfs_time_seconds(LONG_UNLINK), NULL, NULL);
-                rc = l_wait_event (*wq, !ptlrpc_client_recv_or_unlink(request),
-                                   &lwi);
-                if (rc == 0)
-                        return;
-
-                LASSERT (rc == -ETIMEDOUT);
-                DEBUG_REQ(D_WARNING, request, "Unexpectedly long timeout "
-                          "rvcng=%d unlnk=%d", request->rq_receiving_reply,
-                          request->rq_must_unlink);
-        }
-        EXIT;
-}
-
-/* caller must hold imp->imp_lock */
-void ptlrpc_free_committed(struct obd_import *imp)
-{
-        struct list_head *tmp, *saved;
-        struct ptlrpc_request *req;
-        struct ptlrpc_request *last_req = NULL; /* temporary fire escape */
-        ENTRY;
-
-        LASSERT(imp != NULL);
-
-        LASSERT_SPIN_LOCKED(&imp->imp_lock);
-
-
-        if (imp->imp_peer_committed_transno == imp->imp_last_transno_checked &&
-            imp->imp_generation == imp->imp_last_generation_checked) {
-                CDEBUG(D_RPCTRACE, "%s: skip recheck: last_committed "LPU64"\n",
-                       imp->imp_obd->obd_name, imp->imp_peer_committed_transno);
-                EXIT;
-                return;
-        }
-
-        CDEBUG(D_RPCTRACE, "%s: committing for last_committed "LPU64" gen %d\n",
-               imp->imp_obd->obd_name, imp->imp_peer_committed_transno,
-               imp->imp_generation);
-        imp->imp_last_transno_checked = imp->imp_peer_committed_transno;
-        imp->imp_last_generation_checked = imp->imp_generation;
-
-        list_for_each_safe(tmp, saved, &imp->imp_replay_list) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_replay_list);
-
-                /* XXX ok to remove when 1357 resolved - rread 05/29/03  */
-                LASSERT(req != last_req);
-                last_req = req;
-
-                if (req->rq_import_generation < imp->imp_generation) {
-                        DEBUG_REQ(D_RPCTRACE, req, "free request with old gen");
-                        GOTO(free_req, 0);
-                }
-
-                if (req->rq_replay) {
-                        DEBUG_REQ(D_RPCTRACE, req, "keeping (FL_REPLAY)");
-                        continue;
-                }
-
-                /* not yet committed */
-                if (req->rq_transno > imp->imp_peer_committed_transno) {
-                        DEBUG_REQ(D_RPCTRACE, req, "stopping search");
-                        break;
-                }
-
-                DEBUG_REQ(D_RPCTRACE, req, "commit (last_committed "LPU64")",
-                          imp->imp_peer_committed_transno);
-free_req:
-                spin_lock(&req->rq_lock);
-                req->rq_replay = 0;
-                spin_unlock(&req->rq_lock);
-                if (req->rq_commit_cb != NULL)
-                        req->rq_commit_cb(req);
-                list_del_init(&req->rq_replay_list);
-                __ptlrpc_req_finished(req, 1);
-        }
-
-        EXIT;
-        return;
-}
-
-void ptlrpc_cleanup_client(struct obd_import *imp)
-{
-        ENTRY;
-        EXIT;
-        return;
-}
-
-void ptlrpc_resend_req(struct ptlrpc_request *req)
-{
-        DEBUG_REQ(D_HA, req, "going to resend");
-        lustre_msg_set_handle(req->rq_reqmsg, &(struct lustre_handle){ 0 });
-        req->rq_status = -EAGAIN;
-
-        spin_lock(&req->rq_lock);
-        req->rq_resend = 1;
-        req->rq_net_err = 0;
-        req->rq_timedout = 0;
-        if (req->rq_bulk) {
-                __u64 old_xid = req->rq_xid;
-
-                /* ensure previous bulk fails */
-                req->rq_xid = ptlrpc_next_xid();
-                CDEBUG(D_HA, "resend bulk old x"LPU64" new x"LPU64"\n",
-                       old_xid, req->rq_xid);
-        }
-        ptlrpc_wake_client_req(req);
-        spin_unlock(&req->rq_lock);
-}
-
-/* XXX: this function and rq_status are currently unused */
-void ptlrpc_restart_req(struct ptlrpc_request *req)
-{
-        DEBUG_REQ(D_HA, req, "restarting (possibly-)completed request");
-        req->rq_status = -ERESTARTSYS;
-
-        spin_lock(&req->rq_lock);
-        req->rq_restart = 1;
-        req->rq_timedout = 0;
-        ptlrpc_wake_client_req(req);
-        spin_unlock(&req->rq_lock);
-}
-
-static void interrupted_request(void *data)
-{
-        struct ptlrpc_request *req = data;
-        DEBUG_REQ(D_HA, req, "request interrupted");
-        spin_lock(&req->rq_lock);
-        req->rq_intr = 1;
-        spin_unlock(&req->rq_lock);
-}
-
-struct ptlrpc_request *ptlrpc_request_addref(struct ptlrpc_request *req)
-{
-        ENTRY;
-        atomic_inc(&req->rq_refcount);
-        RETURN(req);
-}
-
-void ptlrpc_retain_replayable_request(struct ptlrpc_request *req,
-                                      struct obd_import *imp)
-{
-        struct list_head *tmp;
-
-        LASSERT_SPIN_LOCKED(&imp->imp_lock);
-
-        /* clear this for new requests that were resent as well
-           as resent replayed requests. */
-        lustre_msg_clear_flags(req->rq_reqmsg, MSG_RESENT);
-
-        /* don't re-add requests that have been replayed */
-        if (!list_empty(&req->rq_replay_list))
-                return;
-
-        lustre_msg_add_flags(req->rq_reqmsg, MSG_REPLAY);
-
-        LASSERT(imp->imp_replayable);
-        /* Balanced in ptlrpc_free_committed, usually. */
-        ptlrpc_request_addref(req);
-        list_for_each_prev(tmp, &imp->imp_replay_list) {
-                struct ptlrpc_request *iter =
-                        list_entry(tmp, struct ptlrpc_request, rq_replay_list);
-
-                /* We may have duplicate transnos if we create and then
-                 * open a file, or for closes retained if to match creating
-                 * opens, so use req->rq_xid as a secondary key.
-                 * (See bugs 684, 685, and 428.)
-                 * XXX no longer needed, but all opens need transnos!
-                 */
-                if (iter->rq_transno > req->rq_transno)
-                        continue;
-
-                if (iter->rq_transno == req->rq_transno) {
-                        LASSERT(iter->rq_xid != req->rq_xid);
-                        if (iter->rq_xid > req->rq_xid)
-                                continue;
-                }
-
-                list_add(&req->rq_replay_list, &iter->rq_replay_list);
-                return;
-        }
-
-        list_add_tail(&req->rq_replay_list, &imp->imp_replay_list);
-}
-
-int ptlrpc_queue_wait(struct ptlrpc_request *req)
-{
-        int rc = 0;
-        int brc;
-        struct l_wait_info lwi;
-        struct obd_import *imp = req->rq_import;
-        cfs_duration_t timeout = CFS_TICK;
-        long timeoutl;
-        ENTRY;
-
-        LASSERT(req->rq_set == NULL);
-        LASSERT(!req->rq_receiving_reply);
-        atomic_inc(&imp->imp_inflight);
-
-        /* for distributed debugging */
-        lustre_msg_set_status(req->rq_reqmsg, cfs_curproc_pid());
-        LASSERT(imp->imp_obd != NULL);
-        CDEBUG(D_RPCTRACE, "Sending RPC pname:cluuid:pid:xid:nid:opc "
-               "%s:%s:%d:"LPU64":%s:%d\n", cfs_curproc_comm(),
-               imp->imp_obd->obd_uuid.uuid,
-               lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
-               libcfs_nid2str(imp->imp_connection->c_peer.nid),
-               lustre_msg_get_opc(req->rq_reqmsg));
-
-        /* Mark phase here for a little debug help */
-        req->rq_phase = RQ_PHASE_RPC;
-
-        spin_lock(&imp->imp_lock);
-        req->rq_import_generation = imp->imp_generation;
-restart:
-        if (ptlrpc_import_delay_req(imp, req, &rc)) {
-                list_del(&req->rq_list);
-
-                list_add_tail(&req->rq_list, &imp->imp_delayed_list);
-                spin_unlock(&imp->imp_lock);
-
-                DEBUG_REQ(D_HA, req, "\"%s\" waiting for recovery: (%s != %s)",
-                          cfs_curproc_comm(),
-                          ptlrpc_import_state_name(req->rq_send_state),
-                          ptlrpc_import_state_name(imp->imp_state));
-                lwi = LWI_INTR(interrupted_request, req);
-                rc = l_wait_event(req->rq_reply_waitq,
-                                  (req->rq_send_state == imp->imp_state ||
-                                   req->rq_err || req->rq_intr),
-                                  &lwi);
-                DEBUG_REQ(D_HA, req, "\"%s\" awake: (%s == %s or %d/%d == 1)",
-                          cfs_curproc_comm(),
-                          ptlrpc_import_state_name(imp->imp_state),
-                          ptlrpc_import_state_name(req->rq_send_state),
-                          req->rq_err, req->rq_intr);
-
-                spin_lock(&imp->imp_lock);
-                list_del_init(&req->rq_list);
-
-                if (req->rq_err) {
-                        /* rq_status was set locally */
-                        rc = -EIO;
-                }
-                else if (req->rq_intr) {
-                        rc = -EINTR;
-                }
-                else if (req->rq_no_resend) {
-                        spin_unlock(&imp->imp_lock);
-                        GOTO(out, rc = -ETIMEDOUT);
-                }
-                else {
-                        GOTO(restart, rc);
-                }
-        }
-
-        if (rc != 0) {
-                list_del_init(&req->rq_list);
-                spin_unlock(&imp->imp_lock);
-                req->rq_status = rc; // XXX this ok?
-                GOTO(out, rc);
-        }
-
-        if (req->rq_resend) {
-                lustre_msg_add_flags(req->rq_reqmsg, MSG_RESENT);
-
-                if (req->rq_bulk != NULL) {
-                        ptlrpc_unregister_bulk (req);
-
-                        /* bulk requests are supposed to be
-                         * idempotent, so we are free to bump the xid
-                         * here, which we need to do before
-                         * registering the bulk again (bug 6371).
-                         * print the old xid first for sanity.
-                         */
-                        DEBUG_REQ(D_HA, req, "bumping xid for bulk: ");
-                        req->rq_xid = ptlrpc_next_xid();
-                }
-
-                DEBUG_REQ(D_HA, req, "resending: ");
-        }
-
-        /* XXX this is the same as ptlrpc_set_wait */
-        LASSERT(list_empty(&req->rq_list));
-        list_add_tail(&req->rq_list, &imp->imp_sending_list);
-        spin_unlock(&imp->imp_lock);
-
-        rc = ptl_send_rpc(req, 0);
-        if (rc) 
-                DEBUG_REQ(D_HA, req, "send failed (%d); recovering", rc);
-        do {
-                timeoutl = req->rq_deadline - cfs_time_current_sec();
-                timeout = (timeoutl <= 0 || rc) ? CFS_TICK :
-                        cfs_time_seconds(timeoutl);
-                DEBUG_REQ(D_NET, req, 
-                          "-- sleeping for "CFS_DURATION_T" ticks", timeout);
-                lwi = LWI_TIMEOUT_INTR(timeout, NULL, interrupted_request, req);
-                brc = l_wait_event(req->rq_reply_waitq, ptlrpc_check_reply(req),
-                                  &lwi);
-                /* Wait again if we changed deadline */
-        } while ((brc == -ETIMEDOUT) && 
-                 (req->rq_deadline > cfs_time_current_sec()));
-
-        if ((brc == -ETIMEDOUT) && !ptlrpc_expire_one_request(req)) {
-                /* Wait forever for reconnect / replay or failure */
-                lwi = LWI_INTR(interrupted_request, req);
-                rc = l_wait_event(req->rq_reply_waitq, ptlrpc_check_reply(req),
-                                  &lwi);
-        }
-
-        CDEBUG(D_RPCTRACE, "Completed RPC pname:cluuid:pid:xid:nid:opc "
-               "%s:%s:%d:"LPU64":%s:%d\n", cfs_curproc_comm(),
-               imp->imp_obd->obd_uuid.uuid,
-               lustre_msg_get_status(req->rq_reqmsg), req->rq_xid,
-               libcfs_nid2str(imp->imp_connection->c_peer.nid),
-               lustre_msg_get_opc(req->rq_reqmsg));
-
-        spin_lock(&imp->imp_lock);
-        list_del_init(&req->rq_list);
-        spin_unlock(&imp->imp_lock);
-
-        /* If the reply was received normally, this just grabs the spinlock
-         * (ensuring the reply callback has returned), sees that
-         * req->rq_receiving_reply is clear and returns. */
-        ptlrpc_unregister_reply (req);
-
-
-        if (req->rq_err) {
-                DEBUG_REQ(D_RPCTRACE, req, "err rc=%d status=%d", 
-                          rc, req->rq_status);
-                GOTO(out, rc = -EIO);
-        }
-
-        if (req->rq_intr) {
-                /* Should only be interrupted if we timed out. */
-                if (!req->rq_timedout)
-                        DEBUG_REQ(D_ERROR, req,
-                                  "rq_intr set but rq_timedout not");
-                GOTO(out, rc = -EINTR);
-        }
-
-        /* Resend if we need to */
-        if (req->rq_resend) {
-                /* ...unless we were specifically told otherwise. */
-                if (req->rq_no_resend)
-                        GOTO(out, rc = -ETIMEDOUT);
-                spin_lock(&imp->imp_lock);
-                goto restart;
-        }
-
-        if (req->rq_timedout) {                 /* non-recoverable timeout */
-                GOTO(out, rc = -ETIMEDOUT);
-        }
-
-        if (!req->rq_replied) {
-                /* How can this be? -eeb */
-                DEBUG_REQ(D_ERROR, req, "!rq_replied: ");
-                LBUG();
-                GOTO(out, rc = req->rq_status);
-        }
-
-        rc = after_reply(req);
-        /* NB may return +ve success rc */
-        if (req->rq_resend) {
-                spin_lock(&imp->imp_lock);
-                goto restart;
-        }
-
- out:
-        if (req->rq_bulk != NULL) {
-                if (rc >= 0) {
-                        /* success so far.  Note that anything going wrong
-                         * with bulk now, is EXTREMELY strange, since the
-                         * server must have believed that the bulk
-                         * tranferred OK before she replied with success to
-                         * me. */
-                        lwi = LWI_TIMEOUT(timeout, NULL, NULL);
-                        brc = l_wait_event(req->rq_reply_waitq,
-                                           !ptlrpc_bulk_active(req->rq_bulk),
-                                           &lwi);
-                        LASSERT(brc == 0 || brc == -ETIMEDOUT);
-                        if (brc != 0) {
-                                LASSERT(brc == -ETIMEDOUT);
-                                DEBUG_REQ(D_ERROR, req, "bulk timed out");
-                                rc = brc;
-                        } else if (!req->rq_bulk->bd_success) {
-                                DEBUG_REQ(D_ERROR, req, "bulk transfer failed");
-                                rc = -EIO;
-                        }
-                }
-                if (rc < 0)
-                        ptlrpc_unregister_bulk (req);
-        }
-
-        LASSERT(!req->rq_receiving_reply);
-        req->rq_phase = RQ_PHASE_INTERPRET;
-
-        atomic_dec(&imp->imp_inflight);
-        cfs_waitq_signal(&imp->imp_recovery_waitq);
-        RETURN(rc);
-}
-
-struct ptlrpc_replay_async_args {
-        int praa_old_state;
-        int praa_old_status;
-};
-
-static int ptlrpc_replay_interpret(struct ptlrpc_request *req,
-                                    void * data, int rc)
-{
-        struct ptlrpc_replay_async_args *aa = data;
-        struct obd_import *imp = req->rq_import;
-
-        ENTRY;
-        atomic_dec(&imp->imp_replay_inflight);
-
-        if (!req->rq_replied) {
-                CERROR("request replay timed out, restarting recovery\n");
-                GOTO(out, rc = -ETIMEDOUT);
-        }
-
-        if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR &&
-            (lustre_msg_get_status(req->rq_repmsg) == -ENOTCONN ||
-             lustre_msg_get_status(req->rq_repmsg) == -ENODEV))
-                GOTO(out, rc = lustre_msg_get_status(req->rq_repmsg));
-
-        /* The transno had better not change over replay. */
-        LASSERT(lustre_msg_get_transno(req->rq_reqmsg) ==
-                lustre_msg_get_transno(req->rq_repmsg));
-
-        DEBUG_REQ(D_HA, req, "got rep");
-
-        /* let the callback do fixups, possibly including in the request */
-        if (req->rq_replay_cb)
-                req->rq_replay_cb(req);
-
-        if (req->rq_replied &&
-            lustre_msg_get_status(req->rq_repmsg) != aa->praa_old_status) {
-                DEBUG_REQ(D_ERROR, req, "status %d, old was %d",
-                          lustre_msg_get_status(req->rq_repmsg),
-                          aa->praa_old_status);
-        } else {
-                /* Put it back for re-replay. */
-                lustre_msg_set_status(req->rq_repmsg, aa->praa_old_status);
-        }
-
-        spin_lock(&imp->imp_lock);
-        imp->imp_last_replay_transno = req->rq_transno;
-        spin_unlock(&imp->imp_lock);
-
-        /* continue with recovery */
-        rc = ptlrpc_import_recovery_state_machine(imp);
- out:
-        req->rq_send_state = aa->praa_old_state;
-
-        if (rc != 0)
-                /* this replay failed, so restart recovery */
-                ptlrpc_connect_import(imp, NULL);
-
-        RETURN(rc);
-}
-
-
-int ptlrpc_replay_req(struct ptlrpc_request *req)
-{
-        struct ptlrpc_replay_async_args *aa;
-        ENTRY;
-
-        LASSERT(req->rq_import->imp_state == LUSTRE_IMP_REPLAY);
-        /* Not handling automatic bulk replay yet (or ever?) */
-        LASSERT(req->rq_bulk == NULL);
-
-        LASSERT (sizeof (*aa) <= sizeof (req->rq_async_args));
-        aa = (struct ptlrpc_replay_async_args *)&req->rq_async_args;
-        memset(aa, 0, sizeof *aa);
-
-        /* Prepare request to be resent with ptlrpcd */
-        aa->praa_old_state = req->rq_send_state;
-        req->rq_send_state = LUSTRE_IMP_REPLAY;
-        req->rq_phase = RQ_PHASE_NEW;
-        if (req->rq_repmsg)
-                aa->praa_old_status = lustre_msg_get_status(req->rq_repmsg);
-        req->rq_status = 0;
-        req->rq_interpret_reply = ptlrpc_replay_interpret;
-        /* Readjust the timeout for current conditions */
-        ptlrpc_at_set_req_timeout(req);
-
-        DEBUG_REQ(D_HA, req, "REPLAY");
-
-        atomic_inc(&req->rq_import->imp_replay_inflight);
-        ptlrpc_request_addref(req); /* ptlrpcd needs a ref */
-
-        ptlrpcd_add_req(req);
-        RETURN(0);
-}
-
-void ptlrpc_abort_inflight(struct obd_import *imp)
-{
-        struct list_head *tmp, *n;
-        ENTRY;
-
-        /* Make sure that no new requests get processed for this import.
-         * ptlrpc_{queue,set}_wait must (and does) hold imp_lock while testing
-         * this flag and then putting requests on sending_list or delayed_list.
-         */
-        spin_lock(&imp->imp_lock);
-
-        /* XXX locking?  Maybe we should remove each request with the list
-         * locked?  Also, how do we know if the requests on the list are
-         * being freed at this time?
-         */
-        list_for_each_safe(tmp, n, &imp->imp_sending_list) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_list);
-
-                DEBUG_REQ(D_RPCTRACE, req, "inflight");
-
-                spin_lock (&req->rq_lock);
-                if (req->rq_import_generation < imp->imp_generation) {
-                        req->rq_err = 1;
-                        req->rq_status = -EINTR;
-                        ptlrpc_wake_client_req(req);
-                }
-                spin_unlock (&req->rq_lock);
-        }
-
-        list_for_each_safe(tmp, n, &imp->imp_delayed_list) {
-                struct ptlrpc_request *req =
-                        list_entry(tmp, struct ptlrpc_request, rq_list);
-
-                DEBUG_REQ(D_RPCTRACE, req, "aborting waiting req");
-
-                spin_lock (&req->rq_lock);
-                if (req->rq_import_generation < imp->imp_generation) {
-                        req->rq_err = 1;
-                        req->rq_status = -EINTR;
-                        ptlrpc_wake_client_req(req);
-                }
-                spin_unlock (&req->rq_lock);
-        }
-
-        /* Last chance to free reqs left on the replay list, but we
-         * will still leak reqs that haven't committed.  */
-        if (imp->imp_replayable)
-                ptlrpc_free_committed(imp);
-
-        spin_unlock(&imp->imp_lock);
-
-        EXIT;
-}
-
-static __u64 ptlrpc_last_xid = 0;
-spinlock_t ptlrpc_last_xid_lock;
-
-__u64 ptlrpc_next_xid(void)
-{
-        __u64 tmp;
-        spin_lock(&ptlrpc_last_xid_lock);
-        tmp = ++ptlrpc_last_xid;
-        spin_unlock(&ptlrpc_last_xid_lock);
-        return tmp;
-}
-
-__u64 ptlrpc_sample_next_xid(void)
-{
-        __u64 tmp;
-        spin_lock(&ptlrpc_last_xid_lock);
-        tmp = ptlrpc_last_xid + 1;
-        spin_unlock(&ptlrpc_last_xid_lock);
-        return tmp;
-}
-EXPORT_SYMBOL(ptlrpc_sample_next_xid);
-
diff --git a/lustre/ptlrpc/connection.c b/lustre/ptlrpc/connection.c
deleted file mode 100644
index cd09f2b34aa25099d9d6661d050cc03070568083..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/connection.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifdef __KERNEL__
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include "ptlrpc_internal.h"
-#include <class_hash.h>
-
-static spinlock_t conn_lock;
-static struct list_head conn_list;
-static struct list_head conn_unused_list;
-static struct lustre_class_hash_body *conn_hash_body;
-static struct lustre_class_hash_body *conn_unused_hash_body;
-
-extern struct lustre_hash_operations conn_hash_operations;
-
-void ptlrpc_dump_connections(void)
-{
-        struct list_head *tmp;
-        struct ptlrpc_connection *c;
-        ENTRY;
-
-        list_for_each(tmp, &conn_list) {
-                c = list_entry(tmp, struct ptlrpc_connection, c_link);
-                CERROR("Connection %p/%s has refcount %d (nid=%s->%s)\n",
-                       c, c->c_remote_uuid.uuid, atomic_read(&c->c_refcount),
-                       libcfs_nid2str(c->c_self), 
-                       libcfs_nid2str(c->c_peer.nid));
-        }
-        EXIT;
-}
-
-struct ptlrpc_connection*
-ptlrpc_lookup_conn_locked (lnet_process_id_t peer)
-{
-        struct ptlrpc_connection *c;
-
-        c = lustre_hash_get_object_by_key(conn_hash_body, &peer);
-        if (c != NULL)
-                return c;
-
-        c = lustre_hash_get_object_by_key(conn_unused_hash_body, &peer);
-        if (c != NULL)
-                return c;
-
-        return NULL;
-}
-
-
-struct ptlrpc_connection *ptlrpc_get_connection(lnet_process_id_t peer,
-                                                lnet_nid_t self, struct obd_uuid *uuid)
-{
-        struct ptlrpc_connection *c;
-        struct ptlrpc_connection *c2;
-        int rc = 0;
-        ENTRY;
-
-        CDEBUG(D_INFO, "self %s peer %s\n", 
-               libcfs_nid2str(self), libcfs_id2str(peer));
-
-        spin_lock(&conn_lock);
-
-        c = ptlrpc_lookup_conn_locked(peer);
-        
-        spin_unlock(&conn_lock);
-
-        if (c != NULL)
-                RETURN (c);
-        
-        OBD_ALLOC(c, sizeof(*c));
-        if (c == NULL)
-                RETURN (NULL);
-
-        atomic_set(&c->c_refcount, 1);
-        c->c_peer = peer;
-        c->c_self = self;
-	INIT_HLIST_NODE(&c->c_hash);
-	CFS_INIT_LIST_HEAD(&c->c_link);
-        if (uuid != NULL)
-                obd_str2uuid(&c->c_remote_uuid, uuid->uuid);
-
-        spin_lock(&conn_lock);
-
-        c2 = ptlrpc_lookup_conn_locked(peer);
-        if (c2 == NULL) {
-                list_add(&c->c_link, &conn_list);
-                rc = lustre_hash_additem_unique(conn_hash_body, &peer, 
-                                                &c->c_hash);
-                if (rc != 0) {
-                        list_del(&c->c_link);
-                        CERROR("Cannot add connection to conn_hash_body\n");
-                        goto out_conn;
-                }
-        }
-
-out_conn:
-
-        spin_unlock(&conn_lock);
-
-        if (c2 == NULL && rc == 0)
-                RETURN (c);
-
-        if (c != NULL) 
-                OBD_FREE(c, sizeof(*c));
-        RETURN (c2);
-}
-
-int ptlrpc_put_connection(struct ptlrpc_connection *c)
-{
-        int rc = 0;
-        lnet_process_id_t peer;
-        ENTRY;
-
-        if (c == NULL) {
-                CERROR("NULL connection\n");
-                RETURN(0);
-        }
-
-        peer = c->c_peer;
-
-        CDEBUG (D_INFO, "connection=%p refcount %d to %s\n",
-                c, atomic_read(&c->c_refcount) - 1, 
-                libcfs_nid2str(c->c_peer.nid));
-
-        spin_lock(&conn_lock);
-        LASSERT(!hlist_unhashed(&c->c_hash));
-        spin_unlock(&conn_lock);
-
-        if (atomic_dec_return(&c->c_refcount) == 1) {
-
-                spin_lock(&conn_lock);
-
-                lustre_hash_delitem(conn_hash_body, &peer, &c->c_hash);
-                list_del(&c->c_link);
-
-                list_add(&c->c_link, &conn_unused_list);
-                rc = lustre_hash_additem_unique(conn_unused_hash_body, &peer, 
-                                                &c->c_hash);
-                if (rc != 0) {
-                        spin_unlock(&conn_lock);
-                        CERROR("Cannot hash connection to conn_hash_body\n");
-                        GOTO(ret, rc);
-                }
-
-                spin_unlock(&conn_lock);
-                rc = 1;
- 
-        } 
-
-        if (atomic_read(&c->c_refcount) < 0)
-                CERROR("connection %p refcount %d!\n",
-                       c, atomic_read(&c->c_refcount));
-ret :
-
-        RETURN(rc);
-}
-
-struct ptlrpc_connection *ptlrpc_connection_addref(struct ptlrpc_connection *c)
-{
-        ENTRY;
-        atomic_inc(&c->c_refcount);
-        CDEBUG (D_INFO, "connection=%p refcount %d to %s\n",
-                c, atomic_read(&c->c_refcount),
-                libcfs_nid2str(c->c_peer.nid));
-        RETURN(c);
-}
-
-int ptlrpc_init_connection(void)
-{
-        int rc = 0;
-        CFS_INIT_LIST_HEAD(&conn_list);
-        rc = lustre_hash_init(&conn_hash_body, "CONN_HASH", 
-                              128, &conn_hash_operations);
-        if (rc)
-                GOTO(ret, rc);
-
-        CFS_INIT_LIST_HEAD(&conn_unused_list);
-        rc = lustre_hash_init(&conn_unused_hash_body, "CONN_UNUSED_HASH", 
-                              128, &conn_hash_operations);
-        if (rc)
-                GOTO(ret, rc);
-
-        spin_lock_init(&conn_lock);
-ret:
-        if (rc) {
-                lustre_hash_exit(&conn_hash_body);
-                lustre_hash_exit(&conn_unused_hash_body);
-        }
-        RETURN(rc);
-}
-
-void ptlrpc_cleanup_connection(void)
-{
-        struct list_head *tmp, *pos;
-        struct ptlrpc_connection *c;
-
-        spin_lock(&conn_lock);
-
-        lustre_hash_exit(&conn_unused_hash_body);
-        list_for_each_safe(tmp, pos, &conn_unused_list) {
-                c = list_entry(tmp, struct ptlrpc_connection, c_link);
-                list_del(&c->c_link);
-                OBD_FREE(c, sizeof(*c));
-        }
-
-        lustre_hash_exit(&conn_hash_body);
-        list_for_each_safe(tmp, pos, &conn_list) {
-                c = list_entry(tmp, struct ptlrpc_connection, c_link);
-                CERROR("Connection %p/%s has refcount %d (nid=%s)\n",
-                       c, c->c_remote_uuid.uuid, atomic_read(&c->c_refcount),
-                       libcfs_nid2str(c->c_peer.nid));
-                list_del(&c->c_link);
-                OBD_FREE(c, sizeof(*c));
-        }
-        spin_unlock(&conn_lock);
-}
diff --git a/lustre/ptlrpc/import.c b/lustre/ptlrpc/import.c
deleted file mode 100644
index fc2c87b8e02e2d3ffdb27ede5c4d4aca33f0de6c..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/import.c
+++ /dev/null
@@ -1,1333 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Mike Shaver <shaver@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <lustre_ha.h>
-#include <lustre_net.h>
-#include <lustre_import.h>
-#include <lustre_export.h>
-#include <obd.h>
-#include <obd_class.h>
-
-#include "ptlrpc_internal.h"
-
-struct ptlrpc_connect_async_args {
-         __u64 pcaa_peer_committed;
-        int pcaa_initial_connect;
-};
-
-/* A CLOSED import should remain so. */
-#define IMPORT_SET_STATE_NOLOCK(imp, state)                                    \
-do {                                                                           \
-        if (imp->imp_state != LUSTRE_IMP_CLOSED) {                             \
-               CDEBUG(D_HA, "%p %s: changing import state from %s to %s\n",    \
-                      imp, obd2cli_tgt(imp->imp_obd),                          \
-                      ptlrpc_import_state_name(imp->imp_state),                \
-                      ptlrpc_import_state_name(state));                        \
-               imp->imp_state = state;                                         \
-        }                                                                      \
-} while(0)
-
-#define IMPORT_SET_STATE(imp, state)            \
-do {                                            \
-        spin_lock(&imp->imp_lock);              \
-        IMPORT_SET_STATE_NOLOCK(imp, state);    \
-        spin_unlock(&imp->imp_lock);            \
-} while(0)
-
-
-static int ptlrpc_connect_interpret(struct ptlrpc_request *request,
-                                    void * data, int rc);
-int ptlrpc_import_recovery_state_machine(struct obd_import *imp);
-
-/* Only this function is allowed to change the import state when it is
- * CLOSED. I would rather refcount the import and free it after
- * disconnection like we do with exports. To do that, the client_obd
- * will need to save the peer info somewhere other than in the import,
- * though. */
-int ptlrpc_init_import(struct obd_import *imp)
-{
-        spin_lock(&imp->imp_lock);
-
-        imp->imp_generation++;
-        imp->imp_state =  LUSTRE_IMP_NEW;
-
-        spin_unlock(&imp->imp_lock);
-
-        return 0;
-}
-EXPORT_SYMBOL(ptlrpc_init_import);
-
-#define UUID_STR "_UUID"
-static void deuuidify(char *uuid, const char *prefix, char **uuid_start,
-                      int *uuid_len)
-{
-        *uuid_start = !prefix || strncmp(uuid, prefix, strlen(prefix))
-                ? uuid : uuid + strlen(prefix);
-
-        *uuid_len = strlen(*uuid_start);
-
-        if (*uuid_len < strlen(UUID_STR))
-                return;
-
-        if (!strncmp(*uuid_start + *uuid_len - strlen(UUID_STR),
-                    UUID_STR, strlen(UUID_STR)))
-                *uuid_len -= strlen(UUID_STR);
-}
-
-/* Returns true if import was FULL, false if import was already not
- * connected.
- * @imp - import to be disconnected
- * @conn_cnt - connection count (epoch) of the request that timed out
- *             and caused the disconnection.  In some cases, multiple
- *             inflight requests can fail to a single target (e.g. OST
- *             bulk requests) and if one has already caused a reconnection
- *             (increasing the import->conn_cnt) the older failure should
- *             not also cause a reconnection.  If zero it forces a reconnect.
- */
-int ptlrpc_set_import_discon(struct obd_import *imp, __u32 conn_cnt)
-{
-        int rc = 0;
-
-        spin_lock(&imp->imp_lock);
-
-        if (imp->imp_state == LUSTRE_IMP_FULL &&
-            (conn_cnt == 0 || conn_cnt == imp->imp_conn_cnt)) {
-                char *target_start;
-                int   target_len;
-
-                deuuidify(obd2cli_tgt(imp->imp_obd), NULL,
-                          &target_start, &target_len);
-                if (imp->imp_replayable) {
-                        LCONSOLE_WARN("%s: Connection to service %.*s via nid "
-                               "%s was lost; in progress operations using this "
-                               "service will wait for recovery to complete.\n",
-                               imp->imp_obd->obd_name, target_len, target_start,
-                               libcfs_nid2str(imp->imp_connection->c_peer.nid));
-                } else {
-                        LCONSOLE_ERROR_MSG(0x166, "%s: Connection to service "
-                               "%.*s via nid %s was lost; in progress "
-                               "operations using this service will fail.\n",
-                               imp->imp_obd->obd_name, target_len, target_start, 
-                               libcfs_nid2str(imp->imp_connection->c_peer.nid));
-                }
-                IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_DISCON);
-                spin_unlock(&imp->imp_lock);
-    
-                if (obd_dump_on_timeout)
-                        libcfs_debug_dumplog();
-
-                obd_import_event(imp->imp_obd, imp, IMP_EVENT_DISCON);
-                rc = 1;
-        } else {
-                spin_unlock(&imp->imp_lock);
-                CDEBUG(D_HA, "%s: import %p already %s (conn %u, was %u): %s\n",
-                       imp->imp_client->cli_name, imp,
-                       (imp->imp_state == LUSTRE_IMP_FULL &&
-                        imp->imp_conn_cnt > conn_cnt) ?
-                       "reconnected" : "not connected", imp->imp_conn_cnt,
-                       conn_cnt, ptlrpc_import_state_name(imp->imp_state));
-        }
-
-        return rc;
-}
-
-/* Must be called with imp_lock held! */
-static void ptlrpc_deactivate_and_unlock_import(struct obd_import *imp)
-{
-        ENTRY;
-        LASSERT_SPIN_LOCKED(&imp->imp_lock);
-
-        CDEBUG(D_HA, "setting import %s INVALID\n", obd2cli_tgt(imp->imp_obd));
-        imp->imp_invalid = 1;
-        imp->imp_generation++;
-        spin_unlock(&imp->imp_lock);
-
-        ptlrpc_abort_inflight(imp);
-        obd_import_event(imp->imp_obd, imp, IMP_EVENT_INACTIVE);
-}
-
-/*
- * This acts as a barrier; all existing requests are rejected, and
- * no new requests will be accepted until the import is valid again.
- */
-void ptlrpc_deactivate_import(struct obd_import *imp)
-{
-        spin_lock(&imp->imp_lock);
-        ptlrpc_deactivate_and_unlock_import(imp);
-}
-
-/*
- * This function will invalidate the import, if necessary, then block
- * for all the RPC completions, and finally notify the obd to
- * invalidate its state (ie cancel locks, clear pending requests,
- * etc).
- */
-void ptlrpc_invalidate_import(struct obd_import *imp)
-{
-        struct list_head *tmp, *n;
-        struct ptlrpc_request *req;
-        struct l_wait_info lwi;
-        int rc;
-
-        atomic_inc(&imp->imp_inval_count);
-
-        if (!imp->imp_invalid)
-                ptlrpc_deactivate_import(imp);
-
-        LASSERT(imp->imp_invalid);
-
-        /* wait for all requests to error out and call completion callbacks.
-           Cap it at obd_timeout -- these should all have been locally
-           cancelled by ptlrpc_abort_inflight. */
-        lwi = LWI_TIMEOUT_INTERVAL(
-                cfs_timeout_cap(cfs_time_seconds(obd_timeout)),
-                cfs_time_seconds(1), NULL, NULL);
-        rc = l_wait_event(imp->imp_recovery_waitq,
-                          (atomic_read(&imp->imp_inflight) == 0), &lwi);
-
-        if (rc) {
-                CERROR("%s: rc = %d waiting for callback (%d != 0)\n",
-                       obd2cli_tgt(imp->imp_obd), rc,
-                       atomic_read(&imp->imp_inflight));
-                spin_lock(&imp->imp_lock);
-                list_for_each_safe(tmp, n, &imp->imp_sending_list) {
-                        req = list_entry(tmp, struct ptlrpc_request, rq_list);
-                        DEBUG_REQ(D_ERROR, req, "still on sending list");
-                }
-                list_for_each_safe(tmp, n, &imp->imp_delayed_list) {
-                        req = list_entry(tmp, struct ptlrpc_request, rq_list);
-                        DEBUG_REQ(D_ERROR, req, "still on delayed list");
-                }
-                spin_unlock(&imp->imp_lock);
-                LASSERT(atomic_read(&imp->imp_inflight) == 0);
-        }
-
-        obd_import_event(imp->imp_obd, imp, IMP_EVENT_INVALIDATE);
-
-        atomic_dec(&imp->imp_inval_count);
-        cfs_waitq_signal(&imp->imp_recovery_waitq);
-}
-
-/* unset imp_invalid */
-void ptlrpc_activate_import(struct obd_import *imp)
-{
-        struct obd_device *obd = imp->imp_obd;
-
-        spin_lock(&imp->imp_lock);
-        imp->imp_invalid = 0;
-        spin_unlock(&imp->imp_lock);
-
-        obd_import_event(obd, imp, IMP_EVENT_ACTIVE);
-}
-
-void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt)
-{
-        ENTRY;
-
-        LASSERT(!imp->imp_dlm_fake);
-
-        if (ptlrpc_set_import_discon(imp, conn_cnt)) {
-                if (!imp->imp_replayable) {
-                        CDEBUG(D_HA, "import %s@%s for %s not replayable, "
-                               "auto-deactivating\n",
-                               obd2cli_tgt(imp->imp_obd),
-                               imp->imp_connection->c_remote_uuid.uuid,
-                               imp->imp_obd->obd_name);
-                        ptlrpc_deactivate_import(imp);
-                }
-
-                CDEBUG(D_HA, "%s: waking up pinger\n",
-                       obd2cli_tgt(imp->imp_obd));
-
-                spin_lock(&imp->imp_lock);
-                imp->imp_force_verify = 1;
-                spin_unlock(&imp->imp_lock);
-
-                ptlrpc_pinger_wake_up();
-        }
-        EXIT;
-}
-
-int ptlrpc_reconnect_import(struct obd_import *imp)
-{
-        
-        ptlrpc_set_import_discon(imp, 0); 
-        /* Force a new connect attempt */
-        ptlrpc_invalidate_import(imp);
-        /* Do a fresh connect next time by zeroing the handle */
-        ptlrpc_disconnect_import(imp, 1);
-        /* Wait for all invalidate calls to finish */
-        if (atomic_read(&imp->imp_inval_count) > 0) {
-                int rc;
-                struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
-                rc = l_wait_event(imp->imp_recovery_waitq,
-                                  (atomic_read(&imp->imp_inval_count) == 0),
-                                  &lwi);
-                if (rc)
-                        CERROR("Interrupted, inval=%d\n", 
-                               atomic_read(&imp->imp_inval_count));
-        }
-
-        /* 
-         * Allow reconnect attempts. Note: Currently, the function is
-         * only called by MGC. So assume this is a recoverable import,
-         * and force import to be recoverable. fix this if you need to 
-         */
-        
-        imp->imp_obd->obd_no_recov = 0;
-        /* Remove 'invalid' flag */
-        ptlrpc_activate_import(imp);
-        /* Attempt a new connect */
-        ptlrpc_recover_import(imp, NULL);
-        return 0;
-}
-
-EXPORT_SYMBOL(ptlrpc_reconnect_import);
-
-static int import_select_connection(struct obd_import *imp)
-{
-        struct obd_import_conn *imp_conn = NULL, *conn;
-        struct obd_export *dlmexp;
-        int tried_all = 1;
-        ENTRY;
-
-        spin_lock(&imp->imp_lock);
-
-        if (list_empty(&imp->imp_conn_list)) {
-                CERROR("%s: no connections available\n",
-                        imp->imp_obd->obd_name);
-                spin_unlock(&imp->imp_lock);
-                RETURN(-EINVAL);
-        }
-
-        list_for_each_entry(conn, &imp->imp_conn_list, oic_item) {
-                CDEBUG(D_HA, "%s: connect to NID %s last attempt "LPU64"\n",
-                       imp->imp_obd->obd_name,
-                       libcfs_nid2str(conn->oic_conn->c_peer.nid),
-                       conn->oic_last_attempt);
-                
-                /* Don't thrash connections */
-                if (cfs_time_before_64(cfs_time_current_64(),
-                                     conn->oic_last_attempt + 
-                                     cfs_time_seconds(CONNECTION_SWITCH_MIN))) {
-                        continue;
-                }
-
-                /* If we have not tried this connection since the
-                   the last successful attempt, go with this one */
-                if ((conn->oic_last_attempt == 0) ||
-                    cfs_time_beforeq_64(conn->oic_last_attempt,
-                                       imp->imp_last_success_conn)) {
-                        imp_conn = conn;
-                        tried_all = 0;
-                        break;
-                }
-
-                /* If all of the connections have already been tried
-                   since the last successful connection; just choose the
-                   least recently used */
-                if (!imp_conn)
-                        imp_conn = conn;
-                else if (cfs_time_before_64(conn->oic_last_attempt,
-                                            imp_conn->oic_last_attempt))
-                        imp_conn = conn;
-        }
-
-        /* if not found, simply choose the current one */
-        if (!imp_conn) {
-                LASSERT(imp->imp_conn_current);
-                imp_conn = imp->imp_conn_current;
-                tried_all = 0;
-        }
-        LASSERT(imp_conn->oic_conn);
-
-        /* If we've tried everything, and we're back to the beginning of the
-           list, increase our timeout and try again. It will be reset when
-           we do finally connect. (FIXME: really we should wait for all network
-           state associated with the last connection attempt to drain before
-           trying to reconnect on it.) */
-        if (tried_all && (imp->imp_conn_list.next == &imp_conn->oic_item) &&
-            !imp->imp_recon_bk /* not retrying */) {
-                if (at_get(&imp->imp_at.iat_net_latency) <
-                    CONNECTION_SWITCH_MAX) {
-                        at_add(&imp->imp_at.iat_net_latency,
-                               at_get(&imp->imp_at.iat_net_latency) +
-                               CONNECTION_SWITCH_INC);
-                }
-                LASSERT(imp_conn->oic_last_attempt);
-                CWARN("%s: tried all connections, increasing latency to %ds\n",
-                      imp->imp_obd->obd_name,
-                      at_get(&imp->imp_at.iat_net_latency));
-        }
-
-        imp_conn->oic_last_attempt = cfs_time_current_64();
-
-        /* switch connection, don't mind if it's same as the current one */
-        if (imp->imp_connection)
-                ptlrpc_put_connection(imp->imp_connection);
-        imp->imp_connection = ptlrpc_connection_addref(imp_conn->oic_conn);
-
-        dlmexp =  class_conn2export(&imp->imp_dlm_handle);
-        LASSERT(dlmexp != NULL);
-        if (dlmexp->exp_connection)
-                ptlrpc_put_connection(dlmexp->exp_connection);
-        dlmexp->exp_connection = ptlrpc_connection_addref(imp_conn->oic_conn);
-        class_export_put(dlmexp);
-
-        if (imp->imp_conn_current != imp_conn) {
-                if (imp->imp_conn_current)
-                        LCONSOLE_INFO("Changing connection for %s to %s/%s\n",
-                                      imp->imp_obd->obd_name,
-                                      imp_conn->oic_uuid.uuid,
-                                      libcfs_nid2str(imp_conn->oic_conn->c_peer.nid));
-                imp->imp_conn_current = imp_conn;
-        }
-
-        CDEBUG(D_HA, "%s: import %p using connection %s/%s\n",
-               imp->imp_obd->obd_name, imp, imp_conn->oic_uuid.uuid,
-               libcfs_nid2str(imp_conn->oic_conn->c_peer.nid));
-
-        spin_unlock(&imp->imp_lock);
-
-        RETURN(0);
-}
-
-int ptlrpc_connect_import(struct obd_import *imp, char *new_uuid)
-{
-        struct obd_device *obd = imp->imp_obd;
-        int initial_connect = 0;
-        int rc;
-        __u64 committed_before_reconnect = 0;
-        struct ptlrpc_request *request;
-        int size[] = { sizeof(struct ptlrpc_body),
-                       sizeof(imp->imp_obd->u.cli.cl_target_uuid),
-                       sizeof(obd->obd_uuid),
-                       sizeof(imp->imp_dlm_handle),
-                       sizeof(imp->imp_connect_data) };
-        char *tmp[] = { NULL,
-                        obd2cli_tgt(imp->imp_obd),
-                        obd->obd_uuid.uuid,
-                        (char *)&imp->imp_dlm_handle,
-                        (char *)&imp->imp_connect_data };
-        struct ptlrpc_connect_async_args *aa;
-
-        ENTRY;
-        spin_lock(&imp->imp_lock);
-        if (imp->imp_state == LUSTRE_IMP_CLOSED) {
-                spin_unlock(&imp->imp_lock);
-                CERROR("can't connect to a closed import\n");
-                RETURN(-EINVAL);
-        } else if (imp->imp_state == LUSTRE_IMP_FULL) {
-                spin_unlock(&imp->imp_lock);
-                CERROR("already connected\n");
-                RETURN(0);
-        } else if (imp->imp_state == LUSTRE_IMP_CONNECTING) {
-                spin_unlock(&imp->imp_lock);
-                CERROR("already connecting\n");
-                RETURN(-EALREADY);
-        }
-
-        IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_CONNECTING);
-
-        imp->imp_conn_cnt++;
-        imp->imp_resend_replay = 0;
-
-        if (!lustre_handle_is_used(&imp->imp_remote_handle))
-                initial_connect = 1;
-        else
-                committed_before_reconnect = imp->imp_peer_committed_transno;
-
-        spin_unlock(&imp->imp_lock);
-
-        if (new_uuid) {
-                struct obd_uuid uuid;
-
-                obd_str2uuid(&uuid, new_uuid);
-                rc = import_set_conn_priority(imp, &uuid);
-                if (rc)
-                        GOTO(out, rc);
-        }
-
-        rc = import_select_connection(imp);
-        if (rc)
-                GOTO(out, rc);
-
-        /* last in connection list */
-        if (imp->imp_conn_current->oic_item.next == &imp->imp_conn_list) {
-                if (imp->imp_initial_recov_bk && initial_connect) {
-                        CDEBUG(D_HA, "Last connection attempt (%d) for %s\n",
-                               imp->imp_conn_cnt, obd2cli_tgt(imp->imp_obd));
-                        /* Don't retry if connect fails */
-                        rc = 0;
-                        obd_set_info_async(obd->obd_self_export,
-                                           strlen(KEY_INIT_RECOV),
-                                           KEY_INIT_RECOV,
-                                           sizeof(rc), &rc, NULL);
-                }
-                if (imp->imp_recon_bk) {
-                        CDEBUG(D_HA, "Last reconnection attempt (%d) for %s\n",
-                               imp->imp_conn_cnt, obd2cli_tgt(imp->imp_obd));
-                        spin_lock(&imp->imp_lock);
-                        imp->imp_last_recon = 1;
-                        spin_unlock(&imp->imp_lock);
-                }
-        }
-
-        /* Reset connect flags to the originally requested flags, in case
-         * the server is updated on-the-fly we will get the new features. */
-        imp->imp_connect_data.ocd_connect_flags = imp->imp_connect_flags_orig;
-        imp->imp_msghdr_flags &= ~MSGHDR_AT_SUPPORT;
-
-        rc = obd_reconnect(imp->imp_obd->obd_self_export, obd,
-                           &obd->obd_uuid, &imp->imp_connect_data);
-        if (rc)
-                GOTO(out, rc);
-
-        request = ptlrpc_prep_req(imp, LUSTRE_OBD_VERSION, imp->imp_connect_op,
-                                  5, size, tmp);
-        if (!request)
-                GOTO(out, rc = -ENOMEM);
-
-#ifndef __KERNEL__
-        lustre_msg_add_op_flags(request->rq_reqmsg, MSG_CONNECT_LIBCLIENT);
-#endif
-        if (imp->imp_msg_magic == LUSTRE_MSG_MAGIC_V1)
-                lustre_msg_add_op_flags(request->rq_reqmsg,
-                                        MSG_CONNECT_NEXT_VER);
-
-        request->rq_send_state = LUSTRE_IMP_CONNECTING;
-        /* Allow a slightly larger reply for future growth compatibility */
-        size[REPLY_REC_OFF] = sizeof(struct obd_connect_data) +
-                              16 * sizeof(__u64);
-        ptlrpc_req_set_repsize(request, 2, size);
-        request->rq_interpret_reply = ptlrpc_connect_interpret;
-
-        CLASSERT(sizeof (*aa) <= sizeof (request->rq_async_args));
-        aa = (struct ptlrpc_connect_async_args *)&request->rq_async_args;
-        memset(aa, 0, sizeof *aa);
-
-        aa->pcaa_peer_committed = committed_before_reconnect;
-        aa->pcaa_initial_connect = initial_connect;
-        if (aa->pcaa_initial_connect) {
-                spin_lock(&imp->imp_lock);
-                imp->imp_replayable = 1;
-                spin_unlock(&imp->imp_lock);
-                if (AT_OFF)
-                        /* AT will use INITIAL_CONNECT_TIMEOUT the first
-                           time, adaptive after that. */
-                        request->rq_timeout = INITIAL_CONNECT_TIMEOUT;
-        }
-
-        DEBUG_REQ(D_RPCTRACE, request, "%sconnect request %d",
-                  aa->pcaa_initial_connect ? "initial " : "re", 
-                  imp->imp_conn_cnt);
-        ptlrpcd_add_req(request);
-        rc = 0;
-out:
-        if (rc != 0) {
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_DISCON);
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(ptlrpc_connect_import);
-
-static void ptlrpc_maybe_ping_import_soon(struct obd_import *imp)
-{
-#ifdef __KERNEL__
-        struct obd_import_conn *imp_conn;
-#endif
-        int wake_pinger = 0;
-
-        ENTRY;
-
-        spin_lock(&imp->imp_lock);
-        if (list_empty(&imp->imp_conn_list))
-                GOTO(unlock, 0);
-
-#ifdef __KERNEL__
-        imp_conn = list_entry(imp->imp_conn_list.prev,
-                              struct obd_import_conn,
-                              oic_item);
-
-        /* XXX: When the failover node is the primary node, it is possible
-         * to have two identical connections in imp_conn_list. We must 
-         * compare not conn's pointers but NIDs, otherwise we can defeat
-         * connection throttling. (See bug 14774.) */
-        if (imp->imp_conn_current->oic_conn->c_self != 
-                                imp_conn->oic_conn->c_self) {
-                ptlrpc_ping_import_soon(imp);
-                wake_pinger = 1;
-        }
-
-#else
-        /* liblustre has no pinger thead, so we wakup pinger anyway */
-        wake_pinger = 1;
-#endif 
- unlock:
-        spin_unlock(&imp->imp_lock);
-
-        if (wake_pinger)
-                ptlrpc_pinger_wake_up();
-
-        EXIT;
-}
-
-static int ptlrpc_connect_interpret(struct ptlrpc_request *request,
-                                    void * data, int rc)
-{
-        struct ptlrpc_connect_async_args *aa = data;
-        struct obd_import *imp = request->rq_import;
-        struct client_obd *cli = &imp->imp_obd->u.cli;
-        struct lustre_handle old_hdl;
-        int msg_flags;
-        ENTRY;
-
-        spin_lock(&imp->imp_lock);
-        if (imp->imp_state == LUSTRE_IMP_CLOSED) {
-                spin_unlock(&imp->imp_lock);
-                RETURN(0);
-        }
-        spin_unlock(&imp->imp_lock);
-
-        if (rc)
-                GOTO(out, rc);
-
-        LASSERT(imp->imp_conn_current);
-
-        msg_flags = lustre_msg_get_op_flags(request->rq_repmsg);
-
-        /* All imports are pingable */
-        spin_lock(&imp->imp_lock);
-        imp->imp_pingable = 1;
-
-        if (aa->pcaa_initial_connect) {
-                if (msg_flags & MSG_CONNECT_REPLAYABLE) {
-                        imp->imp_replayable = 1;
-                        spin_unlock(&imp->imp_lock);
-                        CDEBUG(D_HA, "connected to replayable target: %s\n",
-                               obd2cli_tgt(imp->imp_obd));
-                } else {
-                        imp->imp_replayable = 0;
-                        spin_unlock(&imp->imp_lock);
-                }
-
-                if ((request->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V1 &&
-                     msg_flags & MSG_CONNECT_NEXT_VER) ||
-                    request->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V2) {
-                        imp->imp_msg_magic = LUSTRE_MSG_MAGIC_V2;
-                        CDEBUG(D_RPCTRACE, "connect to %s with lustre_msg_v2\n",
-                               obd2cli_tgt(imp->imp_obd));
-                } else {
-                        CDEBUG(D_RPCTRACE, "connect to %s with lustre_msg_v1\n",
-                               obd2cli_tgt(imp->imp_obd));
-                }
-
-                imp->imp_remote_handle =
-                                *lustre_msg_get_handle(request->rq_repmsg);
-
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_FULL);
-                ptlrpc_activate_import(imp);
-                GOTO(finish, rc = 0);
-        } else {
-                spin_unlock(&imp->imp_lock);
-        }
-
-        /* Determine what recovery state to move the import to. */
-        if (MSG_CONNECT_RECONNECT & msg_flags) {
-                memset(&old_hdl, 0, sizeof(old_hdl));
-                if (!memcmp(&old_hdl, lustre_msg_get_handle(request->rq_repmsg),
-                            sizeof (old_hdl))) {
-                        CERROR("%s@%s didn't like our handle "LPX64
-                               ", failed\n", obd2cli_tgt(imp->imp_obd),
-                               imp->imp_connection->c_remote_uuid.uuid,
-                               imp->imp_dlm_handle.cookie);
-                        GOTO(out, rc = -ENOTCONN);
-                }
-
-                if (memcmp(&imp->imp_remote_handle,
-                           lustre_msg_get_handle(request->rq_repmsg),
-                           sizeof(imp->imp_remote_handle))) {
-
-                        CWARN("%s@%s changed server handle from "
-                               LPX64" to "LPX64" - evicting.\n",
-                               obd2cli_tgt(imp->imp_obd),
-                               imp->imp_connection->c_remote_uuid.uuid,
-                               imp->imp_remote_handle.cookie,
-                               lustre_msg_get_handle(request->rq_repmsg)->
-                                         cookie);
-                        imp->imp_remote_handle =
-                                     *lustre_msg_get_handle(request->rq_repmsg);
-
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_EVICTED);
-                        GOTO(finish, rc = 0);
-                } else {
-                        CDEBUG(D_HA, "reconnected to %s@%s after partition\n",
-                               obd2cli_tgt(imp->imp_obd),
-                               imp->imp_connection->c_remote_uuid.uuid);
-                }
-
-                if (imp->imp_invalid) {
-                        CDEBUG(D_HA, "%s: reconnected but import is invalid; "
-                               "marking evicted\n", imp->imp_obd->obd_name);
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_EVICTED);
-                } else if (MSG_CONNECT_RECOVERING & msg_flags) {
-                        CDEBUG(D_HA, "%s: reconnected to %s during replay\n",
-                               imp->imp_obd->obd_name,
-                               obd2cli_tgt(imp->imp_obd));
-
-                        spin_lock(&imp->imp_lock);
-                        imp->imp_resend_replay = 1;
-                        spin_unlock(&imp->imp_lock);
-
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_REPLAY);
-                } else {
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_RECOVER);
-                }
-        } else if ((MSG_CONNECT_RECOVERING & msg_flags) && !imp->imp_invalid) {
-                LASSERT(imp->imp_replayable);
-                imp->imp_remote_handle =
-                                *lustre_msg_get_handle(request->rq_repmsg);
-                imp->imp_last_replay_transno = 0;
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_REPLAY);
-        } else {
-                DEBUG_REQ(D_HA, request, "evicting (not initial connect and "
-                          "flags reconnect/recovering not set: %x)",msg_flags);
-                imp->imp_remote_handle =
-                                *lustre_msg_get_handle(request->rq_repmsg);
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_EVICTED);
-        }
-
-        /* Sanity checks for a reconnected import. */
-        if (!(imp->imp_replayable) != !(msg_flags & MSG_CONNECT_REPLAYABLE)) {
-                CERROR("imp_replayable flag does not match server "
-                       "after reconnect. We should LBUG right here.\n");
-        }
-
-        if (lustre_msg_get_last_committed(request->rq_repmsg) <
-            aa->pcaa_peer_committed) {
-                CERROR("%s went back in time (transno "LPD64
-                       " was previously committed, server now claims "LPD64
-                       ")!  See https://bugzilla.clusterfs.com/"
-                       "long_list.cgi?buglist=9646\n",
-                       obd2cli_tgt(imp->imp_obd), aa->pcaa_peer_committed,
-                       lustre_msg_get_last_committed(request->rq_repmsg));
-        }
-
-finish:
-        rc = ptlrpc_import_recovery_state_machine(imp);
-        if (rc != 0) {
-                if (rc == -ENOTCONN) {
-                        CDEBUG(D_HA, "evicted/aborted by %s@%s during recovery;"
-                               "invalidating and reconnecting\n",
-                               obd2cli_tgt(imp->imp_obd),
-                               imp->imp_connection->c_remote_uuid.uuid);
-                        ptlrpc_connect_import(imp, NULL);
-                        RETURN(0);
-                }
-        } else {
-                struct obd_connect_data *ocd;
-                struct obd_export *exp;
-
-                ocd = lustre_swab_repbuf(request, REPLY_REC_OFF, sizeof(*ocd),
-                                         lustre_swab_connect);
-                spin_lock(&imp->imp_lock);
-                list_del(&imp->imp_conn_current->oic_item);
-                list_add(&imp->imp_conn_current->oic_item, &imp->imp_conn_list);
-                imp->imp_last_success_conn =
-                        imp->imp_conn_current->oic_last_attempt;
-
-                if (ocd == NULL) {
-                        spin_unlock(&imp->imp_lock);
-                        CERROR("Wrong connect data from server\n");
-                        rc = -EPROTO;
-                        GOTO(out, rc);
-                }
-
-                imp->imp_connect_data = *ocd;
-
-                exp = class_conn2export(&imp->imp_dlm_handle);
-                spin_unlock(&imp->imp_lock);
-
-                /* check that server granted subset of flags we asked for. */
-                LASSERTF((ocd->ocd_connect_flags &
-                          imp->imp_connect_flags_orig) ==
-                         ocd->ocd_connect_flags, LPX64" != "LPX64,
-                         imp->imp_connect_flags_orig, ocd->ocd_connect_flags);
-
-                if (!exp) {
-                        /* This could happen if export is cleaned during the 
-                           connect attempt */
-                        CERROR("Missing export for %s\n", 
-                               imp->imp_obd->obd_name);
-                        GOTO(out, rc = -ENODEV);
-                }
-                exp->exp_connect_flags = ocd->ocd_connect_flags;
-                imp->imp_obd->obd_self_export->exp_connect_flags = ocd->ocd_connect_flags;
-                class_export_put(exp);
-
-                obd_import_event(imp->imp_obd, imp, IMP_EVENT_OCD);
-
-                if (!ocd->ocd_ibits_known &&
-                    ocd->ocd_connect_flags & OBD_CONNECT_IBITS)
-                        CERROR("Inodebits aware server returned zero compatible"
-                               " bits?\n");
-
-                if ((ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
-                    (ocd->ocd_version > LUSTRE_VERSION_CODE +
-                                        LUSTRE_VERSION_OFFSET_WARN ||
-                     ocd->ocd_version < LUSTRE_VERSION_CODE -
-                                        LUSTRE_VERSION_OFFSET_WARN)) {
-                        /* Sigh, some compilers do not like #ifdef in the middle
-                           of macro arguments */
-#ifdef __KERNEL__
-                        const char *older =
-                                "older.  Consider upgrading this client";
-#else
-                        const char *older =
-                                "older.  Consider recompiling this application";
-#endif
-                        const char *newer = "newer than client version";
-
-                        LCONSOLE_WARN("Server %s version (%d.%d.%d.%d) "
-                                      "is much %s (%s)\n",
-                                      obd2cli_tgt(imp->imp_obd),
-                                      OBD_OCD_VERSION_MAJOR(ocd->ocd_version),
-                                      OBD_OCD_VERSION_MINOR(ocd->ocd_version),
-                                      OBD_OCD_VERSION_PATCH(ocd->ocd_version),
-                                      OBD_OCD_VERSION_FIX(ocd->ocd_version),
-                                      ocd->ocd_version > LUSTRE_VERSION_CODE ?
-                                      newer : older, LUSTRE_VERSION_STRING);
-                }
-
-                if (ocd->ocd_connect_flags & OBD_CONNECT_CKSUM) {
-                        /* We sent to the server ocd_cksum_types with bits set
-                         * for algorithms we understand. The server masked off
-                         * the checksum types it doesn't support */
-                        if ((ocd->ocd_cksum_types & OBD_CKSUM_ALL) == 0) {
-                                LCONSOLE_WARN("The negotiation of the checksum "
-                                              "alogrithm to use with server %s "
-                                              "failed (%x/%x), disabling "
-                                              "checksums\n",
-                                              obd2cli_tgt(imp->imp_obd),
-                                              ocd->ocd_cksum_types,
-                                              OBD_CKSUM_ALL);
-                                cli->cl_checksum = 0;
-                                cli->cl_supp_cksum_types = OBD_CKSUM_CRC32;
-                                cli->cl_cksum_type = OBD_CKSUM_CRC32;
-                        } else {
-                                cli->cl_supp_cksum_types = ocd->ocd_cksum_types;
-
-                                if (ocd->ocd_cksum_types & OSC_DEFAULT_CKSUM)
-                                        cli->cl_cksum_type = OSC_DEFAULT_CKSUM;
-                                else if (ocd->ocd_cksum_types & OBD_CKSUM_ADLER)
-                                        cli->cl_cksum_type = OBD_CKSUM_ADLER;
-                                else
-                                        cli->cl_cksum_type = OBD_CKSUM_CRC32;
-                        }
-                } else {
-                        /* The server does not support OBD_CONNECT_CKSUM.
-                         * Enforce CRC32 for backward compatibility*/
-                        cli->cl_supp_cksum_types = OBD_CKSUM_CRC32;
-                        cli->cl_cksum_type = OBD_CKSUM_CRC32;
-                }
-
-                if (ocd->ocd_connect_flags & OBD_CONNECT_BRW_SIZE) {
-                        cli->cl_max_pages_per_rpc = 
-                                ocd->ocd_brw_size >> CFS_PAGE_SHIFT;
-                }
-
-                imp->imp_obd->obd_namespace->ns_connect_flags = 
-                        ocd->ocd_connect_flags;
-                imp->imp_obd->obd_namespace->ns_orig_connect_flags = 
-                        ocd->ocd_connect_flags;
-
-                if ((ocd->ocd_connect_flags & OBD_CONNECT_AT) &&
-                    (imp->imp_msg_magic == LUSTRE_MSG_MAGIC_V2))
-                        /* We need a per-message support flag, because 
-                           a. we don't know if the incoming connect reply
-                              supports AT or not (in reply_in_callback)
-                              until we unpack it.
-                           b. failovered server means export and flags are gone
-                              (in ptlrpc_send_reply).
-                           Can only be set when we know AT is supported at 
-                           both ends */
-                        imp->imp_msghdr_flags |= MSGHDR_AT_SUPPORT;
-                else
-                        imp->imp_msghdr_flags &= ~MSGHDR_AT_SUPPORT;
-
-                LASSERT((cli->cl_max_pages_per_rpc <= PTLRPC_MAX_BRW_PAGES) &&
-                        (cli->cl_max_pages_per_rpc > 0));
-        }
-
- out:
-        if (rc != 0) {
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_DISCON);
-                spin_lock(&imp->imp_lock);
-                if (aa->pcaa_initial_connect && !imp->imp_initial_recov &&
-                    (request->rq_import_generation == imp->imp_generation))
-                        ptlrpc_deactivate_and_unlock_import(imp);
-                else
-                        spin_unlock(&imp->imp_lock);
-
-                if (imp->imp_recon_bk && imp->imp_last_recon) {
-                        /* Give up trying to reconnect */
-                        imp->imp_obd->obd_no_recov = 1;
-                        ptlrpc_deactivate_import(imp);
-                }
-
-                if (rc == -EPROTO) {
-                        struct obd_connect_data *ocd;
-                        ocd = lustre_swab_repbuf(request, REPLY_REC_OFF,
-                                                 sizeof *ocd,
-                                                 lustre_swab_connect);
-                        if (ocd &&
-                            (ocd->ocd_connect_flags & OBD_CONNECT_VERSION) &&
-                            (ocd->ocd_version != LUSTRE_VERSION_CODE)) {
-                           /* Actually servers are only supposed to refuse
-                              connection from liblustre clients, so we should
-                              never see this from VFS context */
-                                LCONSOLE_ERROR_MSG(0x16a, "Server %s version "
-                                        "(%d.%d.%d.%d)"
-                                        " refused connection from this client "
-                                        "with an incompatible version (%s).  "
-                                        "Client must be recompiled\n",
-                                        obd2cli_tgt(imp->imp_obd),
-                                        OBD_OCD_VERSION_MAJOR(ocd->ocd_version),
-                                        OBD_OCD_VERSION_MINOR(ocd->ocd_version),
-                                        OBD_OCD_VERSION_PATCH(ocd->ocd_version),
-                                        OBD_OCD_VERSION_FIX(ocd->ocd_version),
-                                        LUSTRE_VERSION_STRING);
-                                ptlrpc_deactivate_import(imp);
-                                IMPORT_SET_STATE(imp, LUSTRE_IMP_CLOSED);
-                        }
-                        RETURN(-EPROTO);
-                }
-
-                ptlrpc_maybe_ping_import_soon(imp);
-
-                CDEBUG(D_HA, "recovery of %s on %s failed (%d)\n",
-                       obd2cli_tgt(imp->imp_obd),
-                       (char *)imp->imp_connection->c_remote_uuid.uuid, rc);
-        }
-        
-        spin_lock(&imp->imp_lock);
-        imp->imp_last_recon = 0;
-        spin_unlock(&imp->imp_lock);
-
-        cfs_waitq_signal(&imp->imp_recovery_waitq);
-        RETURN(rc);
-}
-
-static int completed_replay_interpret(struct ptlrpc_request *req,
-                                    void * data, int rc)
-{
-        ENTRY;
-        atomic_dec(&req->rq_import->imp_replay_inflight);
-        if (req->rq_status == 0) {
-                ptlrpc_import_recovery_state_machine(req->rq_import);
-        } else {
-                CDEBUG(D_HA, "%s: LAST_REPLAY message error: %d, "
-                       "reconnecting\n",
-                       req->rq_import->imp_obd->obd_name, req->rq_status);
-                ptlrpc_connect_import(req->rq_import, NULL);
-        }
-
-        RETURN(0);
-}
-
-static int signal_completed_replay(struct obd_import *imp)
-{
-        struct ptlrpc_request *req;
-        ENTRY;
-
-        LASSERT(atomic_read(&imp->imp_replay_inflight) == 0);
-        atomic_inc(&imp->imp_replay_inflight);
-
-        req = ptlrpc_prep_req(imp, LUSTRE_OBD_VERSION, OBD_PING, 1, NULL, NULL);
-        if (!req) {
-                atomic_dec(&imp->imp_replay_inflight);
-                RETURN(-ENOMEM);
-        }
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-        req->rq_send_state = LUSTRE_IMP_REPLAY_WAIT;
-        lustre_msg_add_flags(req->rq_reqmsg, MSG_LAST_REPLAY);
-        req->rq_timeout *= 3;
-        req->rq_interpret_reply = completed_replay_interpret;
-
-        ptlrpcd_add_req(req);
-        RETURN(0);
-}
-
-#ifdef __KERNEL__
-static int ptlrpc_invalidate_import_thread(void *data)
-{
-        struct obd_import *imp = data;
-
-        ENTRY;
-
-        ptlrpc_daemonize("ll_imp_inval");
-        
-        CDEBUG(D_HA, "thread invalidate import %s to %s@%s\n",
-               imp->imp_obd->obd_name, obd2cli_tgt(imp->imp_obd),
-               imp->imp_connection->c_remote_uuid.uuid);
-
-        ptlrpc_invalidate_import(imp);
-
-        if (obd_dump_on_eviction) {
-                CERROR("dump the log upon eviction\n");
-                libcfs_debug_dumplog();
-        }
-
-        IMPORT_SET_STATE(imp, LUSTRE_IMP_RECOVER);
-        ptlrpc_import_recovery_state_machine(imp);
-
-        RETURN(0);
-}
-#endif
-
-int ptlrpc_import_recovery_state_machine(struct obd_import *imp)
-{
-        int rc = 0;
-        int inflight;
-        char *target_start;
-        int target_len;
-
-        ENTRY;
-        if (imp->imp_state == LUSTRE_IMP_EVICTED) {
-                deuuidify(obd2cli_tgt(imp->imp_obd), NULL,
-                          &target_start, &target_len);
-                /* Don't care about MGC eviction */
-                if (strcmp(imp->imp_obd->obd_type->typ_name,
-                           LUSTRE_MGC_NAME) != 0) {
-                        LCONSOLE_ERROR_MSG(0x167, "This client was evicted by "
-                                           "%.*s; in progress operations using "
-                                           "this service will fail.\n",
-                                           target_len, target_start);
-                }
-                CDEBUG(D_HA, "evicted from %s@%s; invalidating\n",
-                       obd2cli_tgt(imp->imp_obd),
-                       imp->imp_connection->c_remote_uuid.uuid);
-
-#ifdef __KERNEL__
-                rc = cfs_kernel_thread(ptlrpc_invalidate_import_thread, imp,
-                                   CLONE_VM | CLONE_FILES);
-                if (rc < 0)
-                        CERROR("error starting invalidate thread: %d\n", rc);
-                else
-                        rc = 0;
-                RETURN(rc);
-#else
-                ptlrpc_invalidate_import(imp);
-
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_RECOVER);
-#endif
-        }
-
-        if (imp->imp_state == LUSTRE_IMP_REPLAY) {
-                CDEBUG(D_HA, "replay requested by %s\n",
-                       obd2cli_tgt(imp->imp_obd));
-                rc = ptlrpc_replay_next(imp, &inflight);
-                if (inflight == 0 &&
-                    atomic_read(&imp->imp_replay_inflight) == 0) {
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_REPLAY_LOCKS);
-                        rc = ldlm_replay_locks(imp);
-                        if (rc)
-                                GOTO(out, rc);
-                }
-                rc = 0;
-        }
-
-        if (imp->imp_state == LUSTRE_IMP_REPLAY_LOCKS) {
-                if (atomic_read(&imp->imp_replay_inflight) == 0) {
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_REPLAY_WAIT);
-                        rc = signal_completed_replay(imp);
-                        if (rc)
-                                GOTO(out, rc);
-                }
-
-        }
-
-        if (imp->imp_state == LUSTRE_IMP_REPLAY_WAIT) {
-                if (atomic_read(&imp->imp_replay_inflight) == 0) {
-                        IMPORT_SET_STATE(imp, LUSTRE_IMP_RECOVER);
-                }
-        }
-
-        if (imp->imp_state == LUSTRE_IMP_RECOVER) {
-                CDEBUG(D_HA, "reconnected to %s@%s\n",
-                       obd2cli_tgt(imp->imp_obd),
-                       imp->imp_connection->c_remote_uuid.uuid);
-
-                rc = ptlrpc_resend(imp);
-                if (rc)
-                        GOTO(out, rc);
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_FULL);
-                ptlrpc_activate_import(imp);
-
-                deuuidify(obd2cli_tgt(imp->imp_obd), NULL,
-                          &target_start, &target_len);
-                LCONSOLE_INFO("%s: Connection restored to service %.*s "
-                              "using nid %s.\n", imp->imp_obd->obd_name,
-                              target_len, target_start,
-                              libcfs_nid2str(imp->imp_connection->c_peer.nid));
-        }
-
-        if (imp->imp_state == LUSTRE_IMP_FULL) {
-                cfs_waitq_signal(&imp->imp_recovery_waitq);
-                ptlrpc_wake_delayed(imp);
-        }
-
- out:
-        RETURN(rc);
-}
-
-static int back_to_sleep(void *unused)
-{
-        return 0;
-}
-
-int ptlrpc_disconnect_import(struct obd_import *imp, int noclose)
-{
-        struct ptlrpc_request *req;
-        int rq_opc, rc = 0;
-        int nowait = imp->imp_obd->obd_force;
-        ENTRY;
-
-        if (nowait)
-                GOTO(set_state, rc);
-
-        switch (imp->imp_connect_op) {
-        case OST_CONNECT: rq_opc = OST_DISCONNECT; break;
-        case MDS_CONNECT: rq_opc = MDS_DISCONNECT; break;
-        case MGS_CONNECT: rq_opc = MGS_DISCONNECT; break;
-        default:
-                CERROR("don't know how to disconnect from %s (connect_op %d)\n",
-                       obd2cli_tgt(imp->imp_obd), imp->imp_connect_op);
-                RETURN(-EINVAL);
-        }
-
-        if (ptlrpc_import_in_recovery(imp)) {
-                struct l_wait_info lwi;
-                cfs_duration_t timeout;
-
-                if (AT_OFF) {
-                        timeout = cfs_time_seconds(obd_timeout);
-                } else {
-                        int idx = import_at_get_index(imp, 
-                                imp->imp_client->cli_request_portal);
-                        timeout = cfs_time_seconds(
-                                at_get(&imp->imp_at.iat_service_estimate[idx]));
-                }
-                lwi = LWI_TIMEOUT_INTR(cfs_timeout_cap(timeout), 
-                                       back_to_sleep, LWI_ON_SIGNAL_NOOP, NULL);
-                rc = l_wait_event(imp->imp_recovery_waitq,
-                                  !ptlrpc_import_in_recovery(imp), &lwi);
-        }
-
-        spin_lock(&imp->imp_lock);
-        if (imp->imp_state != LUSTRE_IMP_FULL)
-                GOTO(out, 0);
-
-        spin_unlock(&imp->imp_lock);
-
-        req = ptlrpc_prep_req(imp, LUSTRE_OBD_VERSION, rq_opc, 1, NULL, NULL);
-        if (req) {
-                /* We are disconnecting, do not retry a failed DISCONNECT rpc if
-                 * it fails.  We can get through the above with a down server
-                 * if the client doesn't know the server is gone yet. */
-                req->rq_no_resend = 1;
-                
-#ifndef CRAY_XT3
-                /* We want client umounts to happen quickly, no matter the 
-                   server state... */
-                req->rq_timeout = min_t(int, req->rq_timeout,
-                                        INITIAL_CONNECT_TIMEOUT);
-#else
-                /* ... but we always want liblustre clients to nicely 
-                   disconnect, so only use the adaptive value. */
-                if (AT_OFF)
-                        req->rq_timeout = obd_timeout / 3;
-#endif
-
-                IMPORT_SET_STATE(imp, LUSTRE_IMP_CONNECTING);
-                req->rq_send_state =  LUSTRE_IMP_CONNECTING;
-                ptlrpc_req_set_repsize(req, 1, NULL);
-                rc = ptlrpc_queue_wait(req);
-                ptlrpc_req_finished(req);
-        }
-
-set_state:
-        spin_lock(&imp->imp_lock);
-out:
-        if (noclose) 
-                IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_DISCON);
-        else
-                IMPORT_SET_STATE_NOLOCK(imp, LUSTRE_IMP_CLOSED);
-        memset(&imp->imp_remote_handle, 0, sizeof(imp->imp_remote_handle));
-        /* Try all connections in the future - bz 12758 */ 
-        imp->imp_last_recon = 0;
-        spin_unlock(&imp->imp_lock);
-
-        RETURN(rc);
-}
-
-/* Sets maximal number of RPCs possible originating from other side of this
-   import (server) to us and number of async RPC replies that we are not waiting
-   for arriving */
-void ptlrpc_import_setasync(struct obd_import *imp, int count)
-{
-        LNetSetAsync(imp->imp_connection->c_peer, count);
-}
-
-
-/* Adaptive Timeout utils */
-extern unsigned int at_min, at_max, at_history;
-
-/* Bin into timeslices using AT_BINS bins.
-   This gives us a max of the last binlimit*AT_BINS secs without the storage,
-   but still smoothing out a return to normalcy from a slow response.
-   (E.g. remember the maximum latency in each minute of the last 4 minutes.) */
-int at_add(struct adaptive_timeout *at, unsigned int val) 
-{
-        unsigned int old = at->at_current;
-        time_t now = cfs_time_current_sec();
-        time_t binlimit = max_t(time_t, at_history / AT_BINS, 1);
-
-        LASSERT(at);
-#if 0
-        CDEBUG(D_INFO, "add %u to %p time=%lu v=%u (%u %u %u %u)\n", 
-               val, at, now - at->at_binstart, at->at_current,
-               at->at_hist[0], at->at_hist[1], at->at_hist[2], at->at_hist[3]);
-#endif
-        if (val == 0) 
-                /* 0's don't count, because we never want our timeout to 
-                   drop to 0, and because 0 could mean an error */
-                return 0;
-
-        spin_lock(&at->at_lock);
-
-        if (unlikely(at->at_binstart == 0)) {
-                /* Special case to remove default from history */
-                at->at_current = val;
-                at->at_worst_ever = val;
-                at->at_worst_time = now;
-                at->at_hist[0] = val;
-                at->at_binstart = now;
-        } else if (now - at->at_binstart < binlimit ) {
-                /* in bin 0 */
-                at->at_hist[0] = max(val, at->at_hist[0]);
-                at->at_current = max(val, at->at_current);
-        } else {
-                int i, shift;
-                unsigned int maxv = val;
-                /* move bins over */
-                shift = (now - at->at_binstart) / binlimit;
-                LASSERT(shift > 0);
-                for(i = AT_BINS - 1; i >= 0; i--) {
-                        if (i >= shift) {
-                                at->at_hist[i] = at->at_hist[i - shift];
-                                maxv = max(maxv, at->at_hist[i]);
-                        } else {
-                                at->at_hist[i] = 0;
-                        }
-                }
-                at->at_hist[0] = val;
-                at->at_current = maxv;
-                at->at_binstart += shift * binlimit;
-        }
-
-        if (at->at_current > at->at_worst_ever) {
-                at->at_worst_ever = at->at_current;
-                at->at_worst_time = now;
-        }
-
-        if (at->at_flags & AT_FLG_NOHIST)
-                /* Only keep last reported val; keeping the rest of the history
-                   for proc only */
-                at->at_current = val;
-
-        if (at_max > 0)
-                at->at_current =  min(at->at_current, at_max);
-        at->at_current =  max(at->at_current, at_min);
-
-#if 0
-        if (at->at_current != old)
-                CDEBUG(D_ADAPTTO, "AT %p change: old=%u new=%u delta=%d "
-                       "(val=%u) hist %u %u %u %u\n", at,
-                       old, at->at_current, at->at_current - old, val,
-                       at->at_hist[0], at->at_hist[1], at->at_hist[2],
-                       at->at_hist[3]);
-#endif
-        
-        /* if we changed, report the old value */
-        old = (at->at_current != old) ? old : 0;
-        
-        spin_unlock(&at->at_lock);
-        return old;
-}
-
-/* Find the imp_at index for a given portal; assign if space available */
-int import_at_get_index(struct obd_import *imp, int portal) 
-{
-        struct imp_at *at = &imp->imp_at;
-        int i;
-
-        for (i = 0; i < IMP_AT_MAX_PORTALS; i++) {
-                if (at->iat_portal[i] == portal) 
-                        return i;
-                if (at->iat_portal[i] == 0)
-                        /* unused */
-                        break;
-        }
-
-        /* Not found in list, add it under a lock */
-        spin_lock(&imp->imp_lock);
-
-        /* Check unused under lock */
-        for (; i < IMP_AT_MAX_PORTALS; i++) {
-                if (at->iat_portal[i] == portal) 
-                        goto out;
-                if (at->iat_portal[i] == 0)
-                        /* unused */
-                        break;
-        }
-        
-        /* Not enough portals? */
-        LASSERT(i < IMP_AT_MAX_PORTALS);
-
-        at->iat_portal[i] = portal;
-out:
-        spin_unlock(&imp->imp_lock);
-        return i;
-}
-
diff --git a/lustre/ptlrpc/llog_client.c b/lustre/ptlrpc/llog_client.c
deleted file mode 100644
index 27578a4f5eb15a0a143bf53347b0314b13fa4778..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/llog_client.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2004 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- *  remote api for llog - client side
- *
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <lustre_net.h>
-#include <libcfs/list.h>
-
-/* This is a callback from the llog_* functions.
- * Assumes caller has already pushed us into the kernel context. */
-static int llog_client_create(struct llog_ctxt *ctxt, struct llog_handle **res,
-                              struct llog_logid *logid, char *name)
-{
-        struct obd_import *imp;
-        struct llogd_body req_body;
-        struct llogd_body *body;
-        struct llog_handle *handle;
-        struct ptlrpc_request *req = NULL;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(req_body) };
-        char *bufs[3] = { NULL, (char*)&req_body };
-        int bufcount = 2;
-        int rc;
-        ENTRY;
-
-        if (ctxt->loc_imp == NULL) {
-                /* This used to be an assert; bug 6200 */
-                CERROR("ctxt->loc_imp == NULL for context idx %d.  Unable to "
-                       "complete MDS/OSS recovery, but I'll try again next "
-                       "time.  Not fatal.\n", ctxt->loc_idx);
-                RETURN(-EINVAL);
-        }
-        imp = ctxt->loc_imp;
-
-        handle = llog_alloc_handle();
-        if (handle == NULL)
-                RETURN(-ENOMEM);
-        *res = handle;
-
-        memset(&req_body, 0, sizeof(req_body));
-        if (logid)
-                req_body.lgd_logid = *logid;
-        req_body.lgd_ctxt_idx = ctxt->loc_idx - 1;
-
-        if (name) {
-                size[bufcount] = strlen(name) + 1;
-                bufs[bufcount] = name;
-                bufcount++;
-        }
-
-        req = ptlrpc_prep_req(imp, LUSTRE_LOG_VERSION,
-                              LLOG_ORIGIN_HANDLE_CREATE, bufcount, size, bufs);
-        if (!req)
-                GOTO(err_free, rc = -ENOMEM);
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(err_free, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                 lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                GOTO(err_free, rc =-EFAULT);
-        }
-
-        handle->lgh_id = body->lgd_logid;
-        handle->lgh_ctxt = ctxt;
-
-out:
-        if (req)
-                ptlrpc_req_finished(req);
-        RETURN(rc);
-
-err_free:
-        llog_free_handle(handle);
-        goto out;
-}
-
-static int llog_client_destroy(struct llog_handle *loghandle)
-{
-        struct obd_import *imp = loghandle->lgh_ctxt->loc_imp;
-        struct ptlrpc_request *req = NULL;
-        struct llogd_body *body;
-        int size[] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(imp, LUSTRE_LOG_VERSION, 
-                              LLOG_ORIGIN_HANDLE_DESTROY, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        body->lgd_logid = loghandle->lgh_id;
-        body->lgd_llh_flags = loghandle->lgh_hdr->llh_flags;
-
-        ptlrpc_req_set_repsize(req, 2, size);
-        rc = ptlrpc_queue_wait(req);
-        
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-
-static int llog_client_next_block(struct llog_handle *loghandle,
-                                  int *cur_idx, int next_idx,
-                                  __u64 *cur_offset, void *buf, int len)
-{
-        struct obd_import *imp = loghandle->lgh_ctxt->loc_imp;
-        struct ptlrpc_request *req = NULL;
-        struct llogd_body *body;
-        void * ptr;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(imp, LUSTRE_LOG_VERSION,
-                              LLOG_ORIGIN_HANDLE_NEXT_BLOCK, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        body->lgd_logid = loghandle->lgh_id;
-        body->lgd_ctxt_idx = loghandle->lgh_ctxt->loc_idx - 1;
-        body->lgd_llh_flags = loghandle->lgh_hdr->llh_flags;
-        body->lgd_index = next_idx;
-        body->lgd_saved_index = *cur_idx;
-        body->lgd_len = len;
-        body->lgd_cur_offset = *cur_offset;
-
-        size[REPLY_REC_OFF + 1] = len;
-        ptlrpc_req_set_repsize(req, 3, size);
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                 lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                GOTO(out, rc =-EFAULT);
-        }
-
-        /* The log records are swabbed as they are processed */
-        ptr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, len);
-        if (ptr == NULL) {
-                CERROR ("Can't unpack bitmap\n");
-                GOTO(out, rc =-EFAULT);
-        }
-
-        *cur_idx = body->lgd_saved_index;
-        *cur_offset = body->lgd_cur_offset;
-
-        memcpy(buf, ptr, len);
-
-out:
-        if (req)
-                ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-static int llog_client_prev_block(struct llog_handle *loghandle,
-                                  int prev_idx, void *buf, int len)
-{
-        struct obd_import *imp = loghandle->lgh_ctxt->loc_imp;
-        struct ptlrpc_request *req = NULL;
-        struct llogd_body *body;
-        void * ptr;
-        int size[3] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(imp, LUSTRE_LOG_VERSION,
-                              LLOG_ORIGIN_HANDLE_PREV_BLOCK, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        body->lgd_logid = loghandle->lgh_id;
-        body->lgd_ctxt_idx = loghandle->lgh_ctxt->loc_idx - 1;
-        body->lgd_llh_flags = loghandle->lgh_hdr->llh_flags;
-        body->lgd_index = prev_idx;
-        body->lgd_len = len;
-
-        size[REPLY_REC_OFF + 1] = len;
-        ptlrpc_req_set_repsize(req, 3, size);
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out, rc);
-
-        body = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*body),
-                                 lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                GOTO(out, rc =-EFAULT);
-        }
-
-        ptr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF + 1, len);
-        if (ptr == NULL) {
-                CERROR ("Can't unpack bitmap\n");
-                GOTO(out, rc =-EFAULT);
-        }
-
-        memcpy(buf, ptr, len);
-
-out:
-        if (req)
-                ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-static int llog_client_read_header(struct llog_handle *handle)
-{
-        struct obd_import *imp = handle->lgh_ctxt->loc_imp;
-        struct ptlrpc_request *req = NULL;
-        struct llogd_body *body;
-        struct llog_log_hdr *hdr;
-        struct llog_rec_hdr *llh_hdr;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int repsize[2] = { sizeof(struct ptlrpc_body), sizeof(*hdr) };
-        int rc;
-        ENTRY;
-
-        req = ptlrpc_prep_req(imp, LUSTRE_LOG_VERSION,
-                              LLOG_ORIGIN_HANDLE_READ_HEADER, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        body->lgd_logid = handle->lgh_id;
-        body->lgd_ctxt_idx = handle->lgh_ctxt->loc_idx - 1;
-        body->lgd_llh_flags = handle->lgh_hdr->llh_flags;
-
-        ptlrpc_req_set_repsize(req, 2, repsize);
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                GOTO(out, rc);
-
-        hdr = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*hdr),
-                                 lustre_swab_llog_hdr);
-        if (hdr == NULL) {
-                CERROR ("Can't unpack llog_hdr\n");
-                GOTO(out, rc =-EFAULT);
-        }
-
-        memcpy(handle->lgh_hdr, hdr, sizeof (*hdr));
-        handle->lgh_last_idx = handle->lgh_hdr->llh_tail.lrt_index;
-
-        /* sanity checks */
-        llh_hdr = &handle->lgh_hdr->llh_hdr;
-        if (llh_hdr->lrh_type != LLOG_HDR_MAGIC) {
-                CERROR("bad log header magic: %#x (expecting %#x)\n",
-                       llh_hdr->lrh_type, LLOG_HDR_MAGIC);
-                rc = -EIO;
-        } else if (llh_hdr->lrh_len != LLOG_CHUNK_SIZE) {
-                CERROR("incorrectly sized log header: %#x "
-                       "(expecting %#x)\n",
-                       llh_hdr->lrh_len, LLOG_CHUNK_SIZE);
-                CERROR("you may need to re-run lconf --write_conf.\n");
-                rc = -EIO;
-        }
-
-out:
-        if (req)
-                ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-static int llog_client_close(struct llog_handle *handle)
-{
-        /* this doesn't call LLOG_ORIGIN_HANDLE_CLOSE because
-           the servers all close the file at the end of every
-           other LLOG_ RPC. */
-        return(0);
-}
-
-
-struct llog_operations llog_client_ops = {
-        lop_next_block:  llog_client_next_block,
-        lop_prev_block:  llog_client_prev_block,
-        lop_read_header: llog_client_read_header,
-        lop_create:      llog_client_create,
-        lop_destroy:     llog_client_destroy,
-        lop_close:       llog_client_close,
-};
diff --git a/lustre/ptlrpc/llog_net.c b/lustre/ptlrpc/llog_net.c
deleted file mode 100644
index 3779ed5a52c1e12eb5e590a2783e2db0ec2a50eb..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/llog_net.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * OST<->MDS recovery logging infrastructure.
- *
- * Invariants in implementation:
- * - we do not share logs among different OST<->MDS connections, so that
- *   if an OST or MDS fails it need only look at log(s) relevant to itself
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifdef __KERNEL__
-#include <libcfs/libcfs.h>
-#else
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <libcfs/list.h>
-#include <lvfs.h>
-#include <lustre_fsfilt.h>
-
-#ifdef __KERNEL__
-int llog_origin_connect(struct llog_ctxt *ctxt, int count,
-                        struct llog_logid *logid, struct llog_gen *gen,
-                        struct obd_uuid *uuid)
-{
-        struct llog_gen_rec *lgr;
-        struct obd_import *imp;
-        struct ptlrpc_request *request;
-        struct llogd_conn_body *req_body;
-        int size[2] = { sizeof(struct ptlrpc_body),
-                        sizeof(struct llogd_conn_body) };
-        struct inode* inode = ctxt->loc_handle->lgh_file->f_dentry->d_inode;
-        void *handle;
-        int rc, rc1;
-        ENTRY;
-
-        if (list_empty(&ctxt->loc_handle->u.chd.chd_head)) {
-                CDEBUG(D_HA, "there is no record related to ctxt %p\n", ctxt);
-                RETURN(0);
-        }
-
-        /* FIXME what value for gen->conn_cnt */
-        LLOG_GEN_INC(ctxt->loc_gen);
-
-        /* first add llog_gen_rec */
-        OBD_ALLOC(lgr, sizeof(*lgr));
-        if (!lgr)
-                RETURN(-ENOMEM);
-        lgr->lgr_hdr.lrh_len = lgr->lgr_tail.lrt_len = sizeof(*lgr);
-        lgr->lgr_hdr.lrh_type = LLOG_GEN_REC;
-
-        handle = fsfilt_start_log(ctxt->loc_exp->exp_obd, inode, 
-                                  FSFILT_OP_CANCEL_UNLINK, NULL, 1);
-       
-        if (IS_ERR(handle)) {
-                CERROR("fsfilt_start failed: %ld\n", PTR_ERR(handle));
-                OBD_FREE(lgr, sizeof(*lgr));
-                rc = PTR_ERR(handle);
-                RETURN(rc);
-        }
-        lgr->lgr_gen = ctxt->loc_gen;
-        rc = llog_add(ctxt, &lgr->lgr_hdr, NULL, NULL, 1);
-        OBD_FREE(lgr, sizeof(*lgr));
-        
-        rc1 = fsfilt_commit(ctxt->loc_exp->exp_obd, inode, handle, 0);
-        if (rc != 1 || rc1 != 0) {
-                rc = (rc != 1) ? rc : rc1;
-                RETURN(rc);
-        }
-
-        LASSERT(ctxt->loc_imp);
-        imp = ctxt->loc_imp;
-
-        request = ptlrpc_prep_req(imp, LUSTRE_LOG_VERSION,
-                                  LLOG_ORIGIN_CONNECT, 2, size, NULL);
-        if (!request)
-                RETURN(-ENOMEM);
-
-        req_body = lustre_msg_buf(request->rq_reqmsg, REQ_REC_OFF,
-                                  sizeof(*req_body));
-
-        req_body->lgdc_gen = ctxt->loc_gen;
-        req_body->lgdc_logid = ctxt->loc_handle->lgh_id;
-        req_body->lgdc_ctxt_idx = ctxt->loc_idx + 1;
-        ptlrpc_req_set_repsize(request, 1, NULL);
-
-        rc = ptlrpc_queue_wait(request);
-        ptlrpc_req_finished(request);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_origin_connect);
-
-int llog_handle_connect(struct ptlrpc_request *req)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct llogd_conn_body *req_body;
-        struct llog_ctxt *ctxt;
-        int rc;
-        ENTRY;
-
-        req_body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                  sizeof(*req_body));
-
-        ctxt = llog_get_context(obd, req_body->lgdc_ctxt_idx);
-        rc = llog_connect(ctxt, 1, &req_body->lgdc_logid,
-                          &req_body->lgdc_gen, NULL);
-
-        llog_ctxt_put(ctxt);
-        if (rc != 0)
-                CERROR("failed at llog_relp_connect\n");
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_handle_connect);
-
-int llog_receptor_accept(struct llog_ctxt *ctxt, struct obd_import *imp)
-{
-        ENTRY;
-        LASSERT(ctxt);
-        ctxt->loc_imp = imp;
-        RETURN(0);
-}
-EXPORT_SYMBOL(llog_receptor_accept);
-
-int llog_initiator_connect(struct llog_ctxt *ctxt)
-{
-        ENTRY;
-        LASSERT(ctxt);
-        ctxt->loc_imp = ctxt->loc_obd->u.cli.cl_import;
-        RETURN(0);
-}
-EXPORT_SYMBOL(llog_initiator_connect);
-
-#else /* !__KERNEL__ */
-
-int llog_origin_connect(struct llog_ctxt *ctxt, int count,
-                        struct llog_logid *logid, struct llog_gen *gen,
-                        struct obd_uuid *uuid)
-{
-        return 0;
-}
-
-int llog_initiator_connect(struct llog_ctxt *ctxt)
-{
-        return 0;
-}
-#endif
diff --git a/lustre/ptlrpc/llog_server.c b/lustre/ptlrpc/llog_server.c
deleted file mode 100644
index dff4397534b5c576be4c4f93ac3377964944f61d..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/llog_server.c
+++ /dev/null
@@ -1,716 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- *  remote api for llog - server side
- *
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-#define EXPORT_SYMTAB
-#endif
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_log.h>
-#include <lustre_net.h>
-#include <libcfs/list.h>
-#include <lustre_fsfilt.h>
-
-#if defined(__KERNEL__) && defined(LUSTRE_LOG_SERVER)
-
-int llog_origin_handle_create(struct ptlrpc_request *req)
-{
-        struct obd_export *exp = req->rq_export;
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_device *disk_obd;
-        struct llog_handle  *loghandle;
-        struct llogd_body *body;
-        struct lvfs_run_ctxt saved;
-        struct llog_logid *logid = NULL;
-        struct llog_ctxt *ctxt;
-        char * name = NULL;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int rc, rc2;
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                 lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                RETURN(-EFAULT);
-        }
-
-        if (body->lgd_logid.lgl_oid > 0)
-                logid = &body->lgd_logid;
-
-        if (lustre_msg_bufcount(req->rq_reqmsg) > 2) {
-                name = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF + 1, 0);
-                if (name == NULL) {
-                        CERROR("Can't unpack name\n");
-                        RETURN(-EFAULT);
-                }
-                CDEBUG(D_INFO, "opening log %s\n", name);
-        }
-
-        ctxt = llog_get_context(obd, body->lgd_ctxt_idx);
-        if (ctxt == NULL)
-                RETURN(-EINVAL);
-        disk_obd = ctxt->loc_exp->exp_obd;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-
-        rc = llog_create(ctxt, &loghandle, logid, name);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out_close, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*body));
-        body->lgd_logid = loghandle->lgh_id;
-
-out_close:
-        rc2 = llog_close(loghandle);
-        if (!rc)
-                rc = rc2;
-out_pop:
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-int llog_origin_handle_destroy(struct ptlrpc_request *req)
-{
-        struct obd_export *exp = req->rq_export;
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_device *disk_obd;
-        struct llog_handle  *loghandle;
-        struct llogd_body *body;
-        struct lvfs_run_ctxt saved;
-        struct llog_logid *logid = NULL;
-        struct llog_ctxt *ctxt;
-        int size[] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int rc;
-        __u32 flags;
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                 lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                RETURN(-EFAULT);
-        }
-
-        if (body->lgd_logid.lgl_oid > 0)
-                logid = &body->lgd_logid;
-
-        ctxt = llog_get_context(obd, body->lgd_ctxt_idx);
-        if (ctxt == NULL)
-                RETURN(-EINVAL);
-
-        disk_obd = ctxt->loc_exp->exp_obd;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-
-        rc = llog_create(ctxt, &loghandle, logid, NULL);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out_close, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof (*body));
-        body->lgd_logid = loghandle->lgh_id;
-        flags = body->lgd_llh_flags;
-        rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-        rc = llog_destroy(loghandle);
-        if (rc)
-                GOTO(out_close, rc);
-        llog_free_handle(loghandle);
-
-out_close:
-        if (rc)
-                llog_close(loghandle);
-out_pop:
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-int llog_origin_handle_next_block(struct ptlrpc_request *req)
-{
-        struct obd_export *exp = req->rq_export;
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_device *disk_obd;
-        struct llog_handle  *loghandle;
-        struct llogd_body *body;
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        __u32 flags;
-        __u8 *buf;
-        void * ptr;
-        int size[3] = { sizeof(struct ptlrpc_body),
-                        sizeof(*body),
-                        LLOG_CHUNK_SIZE };
-        int rc, rc2;
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                RETURN(-EFAULT);
-        }
-
-        OBD_ALLOC(buf, LLOG_CHUNK_SIZE);
-        if (!buf)
-                RETURN(-ENOMEM);
-
-        ctxt = llog_get_context(obd, body->lgd_ctxt_idx);
-        if (ctxt == NULL)
-                GOTO(out_free, rc = -EINVAL);
-        disk_obd = ctxt->loc_exp->exp_obd;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-
-        rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        flags = body->lgd_llh_flags;
-        rc = llog_init_handle(loghandle, flags, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-
-        memset(buf, 0, LLOG_CHUNK_SIZE);
-        rc = llog_next_block(loghandle, &body->lgd_saved_index,
-                             body->lgd_index,
-                             &body->lgd_cur_offset, buf, LLOG_CHUNK_SIZE);
-        if (rc)
-                GOTO(out_close, rc);
-
-
-        rc = lustre_pack_reply(req, 3, size, NULL);
-        if (rc)
-                GOTO(out_close, rc = -ENOMEM);
-
-        ptr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof (body));
-        memcpy(ptr, body, sizeof(*body));
-
-        ptr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF+1, LLOG_CHUNK_SIZE);
-        memcpy(ptr, buf, LLOG_CHUNK_SIZE);
-
-out_close:
-        rc2 = llog_close(loghandle);
-        if (!rc)
-                rc = rc2;
-
-out_pop:
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-out_free:
-        OBD_FREE(buf, LLOG_CHUNK_SIZE);
-        RETURN(rc);
-}
-
-int llog_origin_handle_prev_block(struct ptlrpc_request *req)
-{
-        struct obd_export *exp = req->rq_export;
-        struct obd_device *obd = exp->exp_obd;
-        struct llog_handle  *loghandle;
-        struct llogd_body *body;
-        struct obd_device *disk_obd;
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        __u32 flags;
-        __u8 *buf;
-        void * ptr;
-        int size[] = { sizeof(struct ptlrpc_body),
-                       sizeof(*body),
-                       LLOG_CHUNK_SIZE };
-        int rc, rc2;
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                RETURN(-EFAULT);
-        }
-
-        OBD_ALLOC(buf, LLOG_CHUNK_SIZE);
-        if (!buf)
-                RETURN(-ENOMEM);
-
-        ctxt = llog_get_context(obd, body->lgd_ctxt_idx);
-        LASSERT(ctxt != NULL);
-        disk_obd = ctxt->loc_exp->exp_obd;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-
-        rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        flags = body->lgd_llh_flags;
-        rc = llog_init_handle(loghandle, flags, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-
-        memset(buf, 0, LLOG_CHUNK_SIZE);
-        rc = llog_prev_block(loghandle, body->lgd_index,
-                             buf, LLOG_CHUNK_SIZE);
-        if (rc)
-                GOTO(out_close, rc);
-
-        rc = lustre_pack_reply(req, 3, size, NULL);
-        if (rc)
-                GOTO(out_close, rc = -ENOMEM);
-
-        ptr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(body));
-        memcpy(ptr, body, sizeof(*body));
-
-        ptr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF+1, LLOG_CHUNK_SIZE);
-        memcpy(ptr, buf, LLOG_CHUNK_SIZE);
-
-out_close:
-        rc2 = llog_close(loghandle);
-        if (!rc)
-                rc = rc2;
-
-out_pop:
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-        OBD_FREE(buf, LLOG_CHUNK_SIZE);
-        RETURN(rc);
-}
-
-int llog_origin_handle_read_header(struct ptlrpc_request *req)
-{
-        struct obd_export *exp = req->rq_export;
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_device *disk_obd;
-        struct llog_handle  *loghandle;
-        struct llogd_body *body;
-        struct llog_log_hdr *hdr;
-        struct lvfs_run_ctxt saved;
-        struct llog_ctxt *ctxt;
-        __u32 flags;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*hdr) };
-        int rc, rc2;
-        ENTRY;
-
-        body = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*body),
-                                  lustre_swab_llogd_body);
-        if (body == NULL) {
-                CERROR ("Can't unpack llogd_body\n");
-                RETURN(-EFAULT);
-        }
-
-        ctxt = llog_get_context(obd, body->lgd_ctxt_idx);
-        if (ctxt == NULL)
-                RETURN(-EINVAL);
-        disk_obd = ctxt->loc_exp->exp_obd;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-
-        rc = llog_create(ctxt, &loghandle, &body->lgd_logid, NULL);
-        if (rc)
-                GOTO(out_pop, rc);
-
-        /* init_handle reads the header */
-        flags = body->lgd_llh_flags;
-        rc = llog_init_handle(loghandle, flags, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out_close, rc = -ENOMEM);
-
-        hdr = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*hdr));
-        memcpy(hdr, loghandle->lgh_hdr, sizeof(*hdr));
-
-out_close:
-        rc2 = llog_close(loghandle);
-        if (!rc)
-                rc = rc2;
-out_pop:
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-int llog_origin_handle_close(struct ptlrpc_request *req)
-{
-        int rc;
-
-        rc = 0;
-
-        RETURN(rc);
-}
-
-int llog_origin_handle_cancel(struct ptlrpc_request *req)
-{
-        struct obd_device *obd = req->rq_export->exp_obd;
-        struct obd_device *disk_obd;
-        struct llog_cookie *logcookies;
-        struct llog_ctxt *ctxt = NULL;
-        int num_cookies, rc = 0, err, i;
-        struct lvfs_run_ctxt saved;
-        struct llog_handle *cathandle;
-        struct inode *inode;
-        void *handle;
-        ENTRY;
-
-        logcookies = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                    sizeof(*logcookies));
-        num_cookies = lustre_msg_buflen(req->rq_reqmsg, REQ_REC_OFF) /
-                      sizeof(*logcookies);
-        if (logcookies == NULL || num_cookies == 0) {
-                DEBUG_REQ(D_HA, req, "no cookies sent");
-                RETURN(-EFAULT);
-        }
-
-        ctxt = llog_get_context(obd, logcookies->lgc_subsys);
-        if (ctxt == NULL) {
-                CWARN("llog subsys not setup or already cleanup\n");
-                RETURN(-ENOENT);
-        }
-
-        disk_obd = ctxt->loc_exp->exp_obd;
-        push_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        for (i = 0; i < num_cookies; i++, logcookies++) {
-                cathandle = ctxt->loc_handle;
-                LASSERT(cathandle != NULL);
-                inode = cathandle->lgh_file->f_dentry->d_inode;
-
-                handle = fsfilt_start_log(disk_obd, inode,
-                                          FSFILT_OP_CANCEL_UNLINK, NULL, 1);
-                if (IS_ERR(handle)) {
-                        CERROR("fsfilt_start failed: %ld\n", PTR_ERR(handle));
-                        GOTO(pop_ctxt, rc = PTR_ERR(handle));
-                }
-
-                rc = llog_cat_cancel_records(cathandle, 1, logcookies);
-
-                err = fsfilt_commit(disk_obd, inode, handle, 0);
-                if (err) {
-                        CERROR("error committing transaction: %d\n", err);
-                        if (!rc)
-                                rc = err;
-                        GOTO(pop_ctxt, rc);
-                }
-        }
-pop_ctxt:
-        pop_ctxt(&saved, &disk_obd->obd_lvfs_ctxt, NULL);
-        if (rc)
-                CERROR("cancel %d llog-records failed: %d\n", num_cookies, rc);
-        else
-                CDEBUG(D_RPCTRACE, "cancel %d llog-records\n", num_cookies);
-
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_origin_handle_cancel);
-
-static int llog_catinfo_config(struct obd_device *obd, char *buf, int buf_len,
-                               char *client)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-        struct lvfs_run_ctxt saved;
-        struct llog_handle *handle = NULL;
-        char name[4][64];
-        int rc, i, l, remains = buf_len;
-        char *out = buf;
-
-        if (ctxt == NULL || mds == NULL)
-                GOTO(release_ctxt, rc = -EOPNOTSUPP);
-
-        push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-
-        sprintf(name[0], "%s", mds->mds_profile);
-        sprintf(name[1], "%s-clean", mds->mds_profile);
-        sprintf(name[2], "%s", client);
-        sprintf(name[3], "%s-clean", client);
-
-        for (i = 0; i < 4; i++) {
-                int index, uncanceled = 0;
-                rc = llog_create(ctxt, &handle, NULL, name[i]);
-                if (rc)
-                        GOTO(out_pop, rc);
-                rc = llog_init_handle(handle, 0, NULL);
-                if (rc) {
-                        llog_close(handle);
-                        GOTO(out_pop, rc = -ENOENT);
-                }
-
-                for (index = 1; index < (LLOG_BITMAP_BYTES * 8); index ++) {
-                        if (ext2_test_bit(index, handle->lgh_hdr->llh_bitmap))
-                                uncanceled++;
-                }
-
-                l = snprintf(out, remains, "[Log Name]: %s\nLog Size: %llu\n"
-                             "Last Index: %d\nUncanceled Records: %d\n\n",
-                             name[i],
-                             i_size_read(handle->lgh_file->f_dentry->d_inode),
-                             handle->lgh_last_idx, uncanceled);
-                out += l;
-                remains -= l;
-
-                llog_close(handle);
-                if (remains <= 0)
-                        break;
-        }
-out_pop:
-        pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-release_ctxt:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-struct cb_data {
-        struct llog_ctxt *ctxt;
-        char *out;
-        int  remains;
-        int  init;
-};
-
-static int llog_catinfo_cb(struct llog_handle *cat,
-                           struct llog_rec_hdr *rec, void *data)
-{
-        static char *out = NULL;
-        static int remains = 0;
-        struct llog_ctxt *ctxt = NULL;
-        struct llog_handle *handle;
-        struct llog_logid *logid;
-        struct llog_logid_rec *lir;
-        int l, rc, index, count = 0;
-        struct cb_data *cbd = (struct cb_data*)data;
-
-        if (cbd->init) {
-                out = cbd->out;
-                remains = cbd->remains;
-                cbd->init = 0;
-        }
-
-        if (!(cat->lgh_hdr->llh_flags & LLOG_F_IS_CAT)) 
-                RETURN(-EINVAL);
-
-        if (!cbd->ctxt)
-                RETURN(-EINVAL);
-        
-        lir = (struct llog_logid_rec *)rec;
-        logid = &lir->lid_id;
-        rc = llog_create(ctxt, &handle, logid, NULL);
-        if (rc)
-                RETURN(-EINVAL);
-        rc = llog_init_handle(handle, 0, NULL);
-        if (rc)
-                GOTO(out_close, rc);
-
-        for (index = 1; index < (LLOG_BITMAP_BYTES * 8); index++) {
-                if (ext2_test_bit(index, handle->lgh_hdr->llh_bitmap))
-                        count++;
-        }
-
-        l = snprintf(out, remains, "\t[Log ID]: #"LPX64"#"LPX64"#%08x\n"
-                     "\tLog Size: %llu\n\tLast Index: %d\n"
-                     "\tUncanceled Records: %d\n",
-                     logid->lgl_oid, logid->lgl_ogr, logid->lgl_ogen,
-                     i_size_read(handle->lgh_file->f_dentry->d_inode),
-                     handle->lgh_last_idx, count);
-        out += l;
-        remains -= l;
-        cbd->out = out;
-        cbd->remains = remains;
-        if (remains <= 0) {
-                CWARN("Not enough memory\n");
-                rc = -ENOMEM;
-        }
-
-out_close:
-        llog_close(handle);
-        RETURN(rc);
-}
-
-static int llog_catinfo_deletions(struct obd_device *obd, char *buf,
-                                  int buf_len)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct llog_handle *handle;
-        struct lvfs_run_ctxt saved;
-        int size, i, count;
-        struct llog_catid *idarray;
-        struct llog_logid *id;
-        char name[32] = CATLIST;
-        int rc;
-        struct cb_data data;
-        struct llog_ctxt *ctxt = llog_get_context(obd, LLOG_CONFIG_ORIG_CTXT);
-
-        if (ctxt == NULL || mds == NULL)
-                GOTO(release_ctxt, rc = -EOPNOTSUPP);
-       
-        count = mds->mds_lov_desc.ld_tgt_count;
-        size = sizeof(*idarray) * count;
-
-        OBD_ALLOC(idarray, size);
-        if (!idarray)
-                GOTO(release_ctxt, rc = -ENOMEM);
-
-        rc = llog_get_cat_list(obd, obd, name, count, idarray);
-        if (rc)
-                GOTO(out_free, rc);
-
-        push_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-
-        data.ctxt = ctxt;
-        data.out = buf;
-        data.remains = buf_len;
-        for (i = 0; i < count; i++) {
-                int l, index, uncanceled = 0;
-
-                id = &idarray[i].lci_logid;
-                rc = llog_create(ctxt, &handle, id, NULL);
-                if (rc)
-                        GOTO(out_pop, rc);
-                rc = llog_init_handle(handle, 0, NULL);
-                if (rc) {
-                        llog_close(handle);
-                        GOTO(out_pop, rc = -ENOENT);
-                }
-                for (index = 1; index < (LLOG_BITMAP_BYTES * 8); index++) {
-                        if (ext2_test_bit(index, handle->lgh_hdr->llh_bitmap))
-                                uncanceled++;
-                }
-                l = snprintf(data.out, data.remains,
-                             "\n[Catlog ID]: #"LPX64"#"LPX64"#%08x  "
-                             "[Log Count]: %d\n",
-                             id->lgl_oid, id->lgl_ogr, id->lgl_ogen,
-                             uncanceled);
-
-                data.out += l;
-                data.remains -= l;
-                data.init = 1;
-
-                llog_process(handle, llog_catinfo_cb, &data, NULL);
-                llog_close(handle);
-
-                if (data.remains <= 0)
-                        break;
-        }
-out_pop:
-        pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
-out_free:
-        OBD_FREE(idarray, size);
-release_ctxt:
-        llog_ctxt_put(ctxt);
-
-        RETURN(rc);
-}
-
-int llog_catinfo(struct ptlrpc_request *req)
-{
-        struct obd_export *exp = req->rq_export;
-        struct obd_device *obd = exp->exp_obd;
-        char *keyword;
-        char *buf, *reply;
-        int rc, buf_len = LLOG_CHUNK_SIZE;
-        int size[2] = { sizeof(struct ptlrpc_body), buf_len };
-
-        OBD_ALLOC(buf, buf_len);
-        if (buf == NULL)
-                return -ENOMEM;
-        memset(buf, 0, buf_len);
-
-        keyword = lustre_msg_string(req->rq_reqmsg, REQ_REC_OFF, 0);
-
-        if (strcmp(keyword, "config") == 0) {
-                char *client = lustre_msg_string(req->rq_reqmsg,
-                                                 REQ_REC_OFF + 1, 0);
-                rc = llog_catinfo_config(obd, buf, buf_len, client);
-        } else if (strcmp(keyword, "deletions") == 0) {
-                rc = llog_catinfo_deletions(obd, buf, buf_len);
-        } else {
-                rc = -EOPNOTSUPP;
-        }
-
-        rc = lustre_pack_reply(req, 2, size, NULL);
-        if (rc)
-                GOTO(out_free, rc = -ENOMEM);
-
-        reply = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, buf_len);
-        if (strlen(buf) == 0)
-                sprintf(buf, "%s", "No log informations\n");
-        memcpy(reply, buf, buf_len);
-
-out_free:
-        OBD_FREE(buf, buf_len);
-        return rc;
-}
-
-#else /* !__KERNEL__ */
-int llog_origin_handle_create(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-
-int llog_origin_handle_destroy(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-
-int llog_origin_handle_next_block(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-int llog_origin_handle_prev_block(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-int llog_origin_handle_read_header(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-int llog_origin_handle_close(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-int llog_origin_handle_cancel(struct ptlrpc_request *req)
-{
-        LBUG();
-        return 0;
-}
-#endif
diff --git a/lustre/ptlrpc/lproc_ptlrpc.c b/lustre/ptlrpc/lproc_ptlrpc.c
deleted file mode 100644
index 8a2c3756a2242fbe55ca89406708616ee8e1c969..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/lproc_ptlrpc.c
+++ /dev/null
@@ -1,634 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <obd.h>
-#include <lprocfs_status.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_net.h>
-#include <obd_class.h>
-#include "ptlrpc_internal.h"
-
-
-struct ll_rpc_opcode {
-     __u32       opcode;
-     const char *opname;
-} ll_rpc_opcode_table[LUSTRE_MAX_OPCODES] = {
-        { OST_REPLY,        "ost_reply" },
-        { OST_GETATTR,      "ost_getattr" },
-        { OST_SETATTR,      "ost_setattr" },
-        { OST_READ,         "ost_read" },
-        { OST_WRITE,        "ost_write" },
-        { OST_CREATE ,      "ost_create" },
-        { OST_DESTROY,      "ost_destroy" },
-        { OST_GET_INFO,     "ost_get_info" },
-        { OST_CONNECT,      "ost_connect" },
-        { OST_DISCONNECT,   "ost_disconnect" },
-        { OST_PUNCH,        "ost_punch" },
-        { OST_OPEN,         "ost_open" },
-        { OST_CLOSE,        "ost_close" },
-        { OST_STATFS,       "ost_statfs" },
-        { 14,                NULL },    /* formerly OST_SAN_READ */
-        { 15,                NULL },    /* formerly OST_SAN_WRITE */
-        { OST_SYNC,         "ost_sync" },
-        { OST_SET_INFO,     "ost_set_info" },
-        { OST_QUOTACHECK,   "ost_quotacheck" },
-        { OST_QUOTACTL,     "ost_quotactl" },
-        { OST_QUOTA_ADJUST_QUNIT, "ost_quota_adjust_qunit" },
-        { MDS_GETATTR,      "mds_getattr" },
-        { MDS_GETATTR_NAME, "mds_getattr_lock" },
-        { MDS_CLOSE,        "mds_close" },
-        { MDS_REINT,        "mds_reint" },
-        { MDS_READPAGE,     "mds_readpage" },
-        { MDS_CONNECT,      "mds_connect" },
-        { MDS_DISCONNECT,   "mds_disconnect" },
-        { MDS_GETSTATUS,    "mds_getstatus" },
-        { MDS_STATFS,       "mds_statfs" },
-        { MDS_PIN,          "mds_pin" },
-        { MDS_UNPIN,        "mds_unpin" },
-        { MDS_SYNC,         "mds_sync" },
-        { MDS_DONE_WRITING, "mds_done_writing" },
-        { MDS_SET_INFO,     "mds_set_info" },
-        { MDS_QUOTACHECK,   "mds_quotacheck" },
-        { MDS_QUOTACTL,     "mds_quotactl" },
-        { MDS_GETXATTR,     "mds_getxattr" },
-        { MDS_SETXATTR,     "mds_setxattr" },
-        { LDLM_ENQUEUE,     "ldlm_enqueue" },
-        { LDLM_CONVERT,     "ldlm_convert" },
-        { LDLM_CANCEL,      "ldlm_cancel" },
-        { LDLM_BL_CALLBACK, "ldlm_bl_callback" },
-        { LDLM_CP_CALLBACK, "ldlm_cp_callback" },
-        { LDLM_GL_CALLBACK, "ldlm_gl_callback" },
-        { MGS_CONNECT,      "mgs_connect" },
-        { MGS_DISCONNECT,   "mgs_disconnect" },
-        { MGS_EXCEPTION,    "mgs_exception" },
-        { MGS_TARGET_REG,   "mgs_target_reg" },
-        { MGS_TARGET_DEL,   "mgs_target_del" },
-        { MGS_SET_INFO,     "mgs_set_info" },
-        { OBD_PING,         "obd_ping" },
-        { OBD_LOG_CANCEL,   "llog_origin_handle_cancel" },
-        { OBD_QC_CALLBACK,  "obd_quota_callback" },
-        { LLOG_ORIGIN_HANDLE_CREATE,     "llog_origin_handle_create" },
-        { LLOG_ORIGIN_HANDLE_NEXT_BLOCK, "llog_origin_handle_next_block"},
-        { LLOG_ORIGIN_HANDLE_READ_HEADER,"llog_origin_handle_read_header" },
-        { LLOG_ORIGIN_HANDLE_WRITE_REC,  "llog_origin_handle_write_rec" },
-        { LLOG_ORIGIN_HANDLE_CLOSE,      "llog_origin_handle_close" },
-        { LLOG_ORIGIN_CONNECT,           "llog_origin_connect" },
-        { LLOG_CATINFO,                  "llog_catinfo" },
-        { LLOG_ORIGIN_HANDLE_PREV_BLOCK, "llog_origin_handle_prev_block" },
-        { LLOG_ORIGIN_HANDLE_DESTROY,    "llog_origin_handle_destroy" },
-};
-
-struct ll_eopcode {
-     __u32       opcode;
-     const char *opname;
-} ll_eopcode_table[EXTRA_LAST_OPC] = {
-        { LDLM_GLIMPSE_ENQUEUE, "ldlm_glimpse_enqueue" },
-        { LDLM_PLAIN_ENQUEUE,   "ldlm_plain_enqueue" },
-        { LDLM_EXTENT_ENQUEUE,  "ldlm_extent_enqueue" },
-        { LDLM_FLOCK_ENQUEUE,   "ldlm_flock_enqueue" },
-        { LDLM_IBITS_ENQUEUE,   "ldlm_ibits_enqueue" },
-        { MDS_REINT_CREATE,     "mds_reint_create" },
-        { MDS_REINT_LINK,       "mds_reint_link" },
-        { MDS_REINT_OPEN,       "mds_reint_open" },
-        { MDS_REINT_SETATTR,    "mds_reint_setattr" },
-        { MDS_REINT_RENAME,     "mds_reint_rename" },
-        { MDS_REINT_UNLINK,     "mds_reint_unlink" }
-};
-
-const char *ll_opcode2str(__u32 opcode)
-{
-        /* When one of the assertions below fail, chances are that:
-         *     1) A new opcode was added in lustre_idl.h, but was
-         *        is missing from the table above.
-         * or  2) The opcode space was renumbered or rearranged,
-         *        and the opcode_offset() function in
-         *        ptlrpc_internal.h needs to be modified.
-         */
-        __u32 offset = opcode_offset(opcode);
-        LASSERT(offset < LUSTRE_MAX_OPCODES);
-        LASSERT(ll_rpc_opcode_table[offset].opcode == opcode);
-        return ll_rpc_opcode_table[offset].opname;
-}
-
-const char* ll_eopcode2str(__u32 opcode)
-{
-        LASSERT(ll_eopcode_table[opcode].opcode == opcode);
-        return ll_eopcode_table[opcode].opname;
-}
-#ifdef LPROCFS
-void ptlrpc_lprocfs_register(struct proc_dir_entry *root, char *dir,
-                             char *name, struct proc_dir_entry **procroot_ret,
-                             struct lprocfs_stats **stats_ret)
-{
-        struct proc_dir_entry *svc_procroot;
-        struct lprocfs_stats *svc_stats;
-        int i, rc;
-        unsigned int svc_counter_config = LPROCFS_CNTR_AVGMINMAX |
-                                          LPROCFS_CNTR_STDDEV;
-
-        LASSERT(*procroot_ret == NULL);
-        LASSERT(*stats_ret == NULL);
-
-        svc_stats = lprocfs_alloc_stats(EXTRA_MAX_OPCODES + LUSTRE_MAX_OPCODES, 0);
-        if (svc_stats == NULL)
-                return;
-
-        if (dir) {
-                svc_procroot = lprocfs_register(dir, root, NULL, NULL);
-                if (IS_ERR(svc_procroot)) {
-                        lprocfs_free_stats(&svc_stats);
-                        return;
-                }
-        } else {
-                svc_procroot = root;
-        }
-
-        lprocfs_counter_init(svc_stats, PTLRPC_REQWAIT_CNTR,
-                             svc_counter_config, "req_waittime", "usec");
-        lprocfs_counter_init(svc_stats, PTLRPC_REQQDEPTH_CNTR,
-                             svc_counter_config, "req_qdepth", "reqs");
-        lprocfs_counter_init(svc_stats, PTLRPC_REQACTIVE_CNTR,
-                             svc_counter_config, "req_active", "reqs");
-        lprocfs_counter_init(svc_stats, PTLRPC_TIMEOUT,
-                             svc_counter_config, "req_timeout", "sec");
-        lprocfs_counter_init(svc_stats, PTLRPC_REQBUF_AVAIL_CNTR,
-                             svc_counter_config, "reqbuf_avail", "bufs");
-        for (i = 0; i < EXTRA_LAST_OPC; i++) {
-                lprocfs_counter_init(svc_stats, PTLRPC_LAST_CNTR + i,
-                                     svc_counter_config,
-                                     ll_eopcode2str(i), "reqs");
-        }
-        for (i = 0; i < LUSTRE_MAX_OPCODES; i++) {
-                __u32 opcode = ll_rpc_opcode_table[i].opcode;
-                lprocfs_counter_init(svc_stats,
-                                     EXTRA_MAX_OPCODES + i, svc_counter_config,
-                                     ll_opcode2str(opcode), "usec");
-        }
-
-        rc = lprocfs_register_stats(svc_procroot, name, svc_stats);
-        if (rc < 0) {
-                if (dir)
-                        lprocfs_remove(&svc_procroot);
-                lprocfs_free_stats(&svc_stats);
-        } else {
-                if (dir)
-                        *procroot_ret = svc_procroot;
-                *stats_ret = svc_stats;
-        }
-}
-
-static int
-ptlrpc_lprocfs_read_req_history_len(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct ptlrpc_service *svc = data;
-
-        *eof = 1;
-        return snprintf(page, count, "%d\n", svc->srv_n_history_rqbds);
-}
-
-static int
-ptlrpc_lprocfs_read_req_history_max(char *page, char **start, off_t off,
-                                    int count, int *eof, void *data)
-{
-        struct ptlrpc_service *svc = data;
-
-        *eof = 1;
-        return snprintf(page, count, "%d\n", svc->srv_max_history_rqbds);
-}
-
-static int
-ptlrpc_lprocfs_write_req_history_max(struct file *file, const char *buffer,
-                                     unsigned long count, void *data)
-{
-        struct ptlrpc_service *svc = data;
-        int                    bufpages;
-        int                    val;
-        int                    rc = lprocfs_write_helper(buffer, count, &val);
-
-        if (rc < 0)
-                return rc;
-
-        if (val < 0)
-                return -ERANGE;
-
-        /* This sanity check is more of an insanity check; we can still
-         * hose a kernel by allowing the request history to grow too
-         * far. */
-        bufpages = (svc->srv_buf_size + CFS_PAGE_SIZE - 1) >> CFS_PAGE_SHIFT;
-        if (val > num_physpages/(2*bufpages))
-                return -ERANGE;
-
-        spin_lock(&svc->srv_lock);
-        svc->srv_max_history_rqbds = val;
-        spin_unlock(&svc->srv_lock);
-
-        return count;
-}
-
-struct ptlrpc_srh_iterator {
-        __u64                  srhi_seq;
-        struct ptlrpc_request *srhi_req;
-};
-
-int
-ptlrpc_lprocfs_svc_req_history_seek(struct ptlrpc_service *svc,
-                                    struct ptlrpc_srh_iterator *srhi,
-                                    __u64 seq)
-{
-        struct list_head      *e;
-        struct ptlrpc_request *req;
-
-        if (srhi->srhi_req != NULL &&
-            srhi->srhi_seq > svc->srv_request_max_cull_seq &&
-            srhi->srhi_seq <= seq) {
-                /* If srhi_req was set previously, hasn't been culled and
-                 * we're searching for a seq on or after it (i.e. more
-                 * recent), search from it onwards.
-                 * Since the service history is LRU (i.e. culled reqs will
-                 * be near the head), we shouldn't have to do long
-                 * re-scans */
-                LASSERT (srhi->srhi_seq == srhi->srhi_req->rq_history_seq);
-                LASSERT (!list_empty(&svc->srv_request_history));
-                e = &srhi->srhi_req->rq_history_list;
-        } else {
-                /* search from start */
-                e = svc->srv_request_history.next;
-        }
-
-        while (e != &svc->srv_request_history) {
-                req = list_entry(e, struct ptlrpc_request, rq_history_list);
-
-                if (req->rq_history_seq >= seq) {
-                        srhi->srhi_seq = req->rq_history_seq;
-                        srhi->srhi_req = req;
-                        return 0;
-                }
-                e = e->next;
-        }
-
-        return -ENOENT;
-}
-
-static void *
-ptlrpc_lprocfs_svc_req_history_start(struct seq_file *s, loff_t *pos)
-{
-        struct ptlrpc_service       *svc = s->private;
-        struct ptlrpc_srh_iterator  *srhi;
-        int                          rc;
-
-        OBD_ALLOC(srhi, sizeof(*srhi));
-        if (srhi == NULL)
-                return NULL;
-
-        srhi->srhi_seq = 0;
-        srhi->srhi_req = NULL;
-
-        spin_lock(&svc->srv_lock);
-        rc = ptlrpc_lprocfs_svc_req_history_seek(svc, srhi, *pos);
-        spin_unlock(&svc->srv_lock);
-
-        if (rc == 0) {
-                *pos = srhi->srhi_seq;
-                return srhi;
-        }
-
-        OBD_FREE(srhi, sizeof(*srhi));
-        return NULL;
-}
-
-static void
-ptlrpc_lprocfs_svc_req_history_stop(struct seq_file *s, void *iter)
-{
-        struct ptlrpc_srh_iterator *srhi = iter;
-
-        if (srhi != NULL)
-                OBD_FREE(srhi, sizeof(*srhi));
-}
-
-static void *
-ptlrpc_lprocfs_svc_req_history_next(struct seq_file *s,
-                                    void *iter, loff_t *pos)
-{
-        struct ptlrpc_service       *svc = s->private;
-        struct ptlrpc_srh_iterator  *srhi = iter;
-        int                          rc;
-
-        spin_lock(&svc->srv_lock);
-        rc = ptlrpc_lprocfs_svc_req_history_seek(svc, srhi, *pos + 1);
-        spin_unlock(&svc->srv_lock);
-
-        if (rc != 0) {
-                OBD_FREE(srhi, sizeof(*srhi));
-                return NULL;
-        }
-
-        *pos = srhi->srhi_seq;
-        return srhi;
-}
-
-/* common ost/mdt srv_request_history_print_fn */
-void target_print_req(void *seq_file, struct ptlrpc_request *req)
-{
-        /* Called holding srv_lock with irqs disabled.
-         * Print specific req contents and a newline.
-         * CAVEAT EMPTOR: check request message length before printing!!!
-         * You might have received any old crap so you must be just as
-         * careful here as the service's request parser!!! */
-        struct seq_file *sf = seq_file;
-
-        switch (req->rq_phase) {
-        case RQ_PHASE_NEW:
-                /* still awaiting a service thread's attention, or rejected
-                 * because the generic request message didn't unpack */
-                seq_printf(sf, "<not swabbed>\n");
-                break;
-        case RQ_PHASE_INTERPRET:
-                /* being handled, so basic msg swabbed, and opc is valid
-                 * but racing with mds_handle() */
-        case RQ_PHASE_COMPLETE:
-                /* been handled by mds_handle() reply state possibly still
-                 * volatile */
-                seq_printf(sf, "opc %d\n", lustre_msg_get_opc(req->rq_reqmsg));
-                break;
-        default:
-                DEBUG_REQ(D_ERROR, req, "bad phase %d", req->rq_phase);
-        }
-}
-EXPORT_SYMBOL(target_print_req);
-
-static int ptlrpc_lprocfs_svc_req_history_show(struct seq_file *s, void *iter)
-{
-        struct ptlrpc_service      *svc = s->private;
-        struct ptlrpc_srh_iterator *srhi = iter;
-        struct ptlrpc_request      *req;
-        int                         rc;
-
-        spin_lock(&svc->srv_lock);
-
-        rc = ptlrpc_lprocfs_svc_req_history_seek(svc, srhi, srhi->srhi_seq);
-
-        if (rc == 0) {
-                req = srhi->srhi_req;
-
-                /* Print common req fields.
-                 * CAVEAT EMPTOR: we're racing with the service handler
-                 * here.  The request could contain any old crap, so you
-                 * must be just as careful as the service's request
-                 * parser. Currently I only print stuff here I know is OK
-                 * to look at coz it was set up in request_in_callback()!!! */
-                seq_printf(s, LPD64":%s:%s:x"LPD64":%d:%s:%ld:%lds(%+lds) ",
-                           req->rq_history_seq, libcfs_nid2str(req->rq_self), 
-                           libcfs_id2str(req->rq_peer), req->rq_xid, 
-                           req->rq_reqlen, ptlrpc_rqphase2str(req),
-                           req->rq_arrival_time.tv_sec,
-                           req->rq_sent - req->rq_arrival_time.tv_sec,
-                           req->rq_sent - req->rq_deadline);
-                if (svc->srv_request_history_print_fn == NULL)
-                        seq_printf(s, "\n");
-                else
-                        svc->srv_request_history_print_fn(s, srhi->srhi_req);
-        }
-
-        spin_unlock(&svc->srv_lock);
-
-        return rc;
-}
-
-static int
-ptlrpc_lprocfs_svc_req_history_open(struct inode *inode, struct file *file)
-{
-        static struct seq_operations sops = {
-                .start = ptlrpc_lprocfs_svc_req_history_start,
-                .stop  = ptlrpc_lprocfs_svc_req_history_stop,
-                .next  = ptlrpc_lprocfs_svc_req_history_next,
-                .show  = ptlrpc_lprocfs_svc_req_history_show,
-        };
-        struct proc_dir_entry *dp = PDE(inode);
-        struct seq_file       *seqf;
-        int                    rc;
-
-        LPROCFS_ENTRY_AND_CHECK(dp);
-        rc = seq_open(file, &sops);
-        if (rc) {
-                LPROCFS_EXIT();
-                return rc;
-        }
-
-        seqf = file->private_data;
-        seqf->private = dp->data;
-        return 0;
-}
-
-/* See also lprocfs_rd_timeouts */
-static int ptlrpc_lprocfs_rd_timeouts(char *page, char **start, off_t off,
-                                      int count, int *eof, void *data)
-{
-        struct ptlrpc_service *svc = data;
-        unsigned int cur, worst;
-        time_t worstt;
-        struct dhms ts;
-        int rc = 0;
-
-        *eof = 1;
-        cur = at_get(&svc->srv_at_estimate);
-        worst = svc->srv_at_estimate.at_worst_ever;
-        worstt = svc->srv_at_estimate.at_worst_time;
-        s2dhms(&ts, cfs_time_current_sec() - worstt);
-        if (AT_OFF)
-                rc += snprintf(page + rc, count - rc,
-                              "adaptive timeouts off, using obd_timeout %u\n",
-                              obd_timeout);
-        rc += snprintf(page + rc, count - rc, 
-                       "%10s : cur %3u  worst %3u (at %ld, "DHMS_FMT" ago) ",
-                       "service", cur, worst, worstt, 
-                       DHMS_VARS(&ts));
-        rc = lprocfs_at_hist_helper(page, count, rc,
-                                    &svc->srv_at_estimate);
-        return rc;
-}               
-
-void ptlrpc_lprocfs_register_service(struct proc_dir_entry *entry,
-                                     struct ptlrpc_service *svc)
-{
-        struct lprocfs_vars lproc_vars[] = {
-                {.name       = "req_buffer_history_len",
-                 .write_fptr = NULL,
-                 .read_fptr  = ptlrpc_lprocfs_read_req_history_len,
-                 .data       = svc},
-                {.name       = "req_buffer_history_max",
-                 .write_fptr = ptlrpc_lprocfs_write_req_history_max,
-                 .read_fptr  = ptlrpc_lprocfs_read_req_history_max,
-                 .data       = svc},
-                {.name       = "timeouts",
-                 .read_fptr  = ptlrpc_lprocfs_rd_timeouts,
-                 .data       = svc},
-                {NULL}
-        };
-        static struct file_operations req_history_fops = {
-                .owner       = THIS_MODULE,
-                .open        = ptlrpc_lprocfs_svc_req_history_open,
-                .read        = seq_read,
-                .llseek      = seq_lseek,
-                .release     = lprocfs_seq_release,
-        };
-        struct proc_dir_entry *req_history;
-
-        ptlrpc_lprocfs_register(entry, svc->srv_name,
-                                "stats", &svc->srv_procroot,
-                                &svc->srv_stats);
-
-        if (svc->srv_procroot == NULL)
-                return;
-
-        lprocfs_add_vars(svc->srv_procroot, lproc_vars, NULL);
-
-        req_history = create_proc_entry("req_history", 0400,
-                                        svc->srv_procroot);
-        if (req_history != NULL) {
-                req_history->data = svc;
-                req_history->proc_fops = &req_history_fops;
-        }
-}
-
-void ptlrpc_lprocfs_register_obd(struct obd_device *obddev)
-{
-        ptlrpc_lprocfs_register(obddev->obd_proc_entry, NULL, "stats",
-                                &obddev->obd_svc_procroot,
-                                &obddev->obd_svc_stats);
-}
-EXPORT_SYMBOL(ptlrpc_lprocfs_register_obd);
-
-void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req)
-{
-        struct lprocfs_stats *svc_stats;
-        __u32 op = lustre_msg_get_opc(req->rq_reqmsg);
-        int opc = opcode_offset(op);
-
-        svc_stats = req->rq_import->imp_obd->obd_svc_stats;
-        if (svc_stats == NULL || opc <= 0)
-                return;
-        LASSERT(opc < LUSTRE_MAX_OPCODES);
-        /* These two use the ptlrpc_lprocfs_brw below */
-        if (!(opc == OST_WRITE || opc == OST_READ || op == LDLM_ENQUEUE
-              || op == MDS_REINT))
-                lprocfs_counter_add(svc_stats, opc + EXTRA_MAX_OPCODES, 0);
-}
-
-void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc, int bytes)
-{
-        struct lprocfs_stats *svc_stats;
-        svc_stats = req->rq_import->imp_obd->obd_svc_stats;
-        if (!svc_stats) 
-                return;
-        lprocfs_counter_add(svc_stats, opc + EXTRA_MAX_OPCODES, bytes);
-}
-EXPORT_SYMBOL(ptlrpc_lprocfs_brw);
-
-void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc)
-{
-        if (svc->srv_procroot != NULL) 
-                lprocfs_remove(&svc->srv_procroot);
-        if (svc->srv_stats) 
-                lprocfs_free_stats(&svc->srv_stats);
-}
-
-void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd)
-{
-        if (obd->obd_svc_procroot)
-                lprocfs_remove(&obd->obd_svc_procroot);
-        if (obd->obd_svc_stats)
-                lprocfs_free_stats(&obd->obd_svc_stats);
-}
-EXPORT_SYMBOL(ptlrpc_lprocfs_unregister_obd);
-
-
-int lprocfs_wr_evict_client(struct file *file, const char *buffer,
-                            unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        char tmpbuf[sizeof(struct obd_uuid)];
-
-        /* Kludge code(deadlock situation): the lprocfs lock has been held 
-         * since the client is evicted by writting client's
-         * uuid/nid to procfs "evict_client" entry. However, 
-         * obd_export_evict_by_uuid() will call lprocfs_remove() to destroy
-         * the proc entries under the being destroyed export{}, so I have
-         * to drop the lock at first here. 
-         * - jay, jxiong@clusterfs.com */
-        class_incref(obd);
-        LPROCFS_EXIT();
-
-        sscanf(buffer, "%40s", tmpbuf);
-        if (strncmp(tmpbuf, "nid:", 4) == 0)
-                obd_export_evict_by_nid(obd, tmpbuf + 4);
-        else if (strncmp(tmpbuf, "uuid:", 5) == 0)
-                obd_export_evict_by_uuid(obd, tmpbuf + 5);
-        else
-                obd_export_evict_by_uuid(obd, tmpbuf);
-
-        LPROCFS_ENTRY();
-        class_decref(obd);
-
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_wr_evict_client);
-
-int lprocfs_wr_ping(struct file *file, const char *buffer,
-                    unsigned long count, void *data)
-{
-        struct obd_device *obd = data;
-        struct ptlrpc_request *req;
-        int rc;
-        ENTRY;
-
-        LPROCFS_CLIMP_CHECK(obd);
-        req = ptlrpc_prep_req(obd->u.cli.cl_import, LUSTRE_OBD_VERSION,
-                              OBD_PING, 1, NULL, NULL);
-        LPROCFS_CLIMP_EXIT(obd);
-        if (req == NULL)
-                RETURN(-ENOMEM);
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-        req->rq_send_state = LUSTRE_IMP_FULL;
-        req->rq_no_resend = 1;
-        req->rq_no_delay = 1;
-
-        rc = ptlrpc_queue_wait(req);
-
-        ptlrpc_req_finished(req);
-        if (rc >= 0)
-                RETURN(count);
-        RETURN(rc);
-}
-EXPORT_SYMBOL(lprocfs_wr_ping);
-
-#endif /* LPROCFS */
diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c
deleted file mode 100644
index d8960d22c65a26cc7c0ca40f5b6abd1c914548ae..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/niobuf.c
+++ /dev/null
@@ -1,639 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-#include <obd_support.h>
-#include <lustre_net.h>
-#include <lustre_lib.h>
-#include <obd.h>
-#include "ptlrpc_internal.h"
-
-static int ptl_send_buf (lnet_handle_md_t *mdh, void *base, int len,
-                         lnet_ack_req_t ack, struct ptlrpc_cb_id *cbid,
-                         struct ptlrpc_connection *conn, int portal, __u64 xid,
-                         unsigned int offset)
-{
-        int              rc;
-        lnet_md_t         md;
-        ENTRY;
-
-        LASSERT (portal != 0);
-        LASSERT (conn != NULL);
-        CDEBUG (D_INFO, "conn=%p id %s\n", conn, libcfs_id2str(conn->c_peer));
-        md.start     = base;
-        md.length    = len;
-        md.threshold = (ack == LNET_ACK_REQ) ? 2 : 1;
-        md.options   = PTLRPC_MD_OPTIONS;
-        md.user_ptr  = cbid;
-        md.eq_handle = ptlrpc_eq_h;
-
-        if (ack == LNET_ACK_REQ &&
-            OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_ACK | OBD_FAIL_ONCE)) {
-                /* don't ask for the ack to simulate failing client */
-                ack = LNET_NOACK_REQ;
-                obd_fail_loc |= OBD_FAIL_ONCE | OBD_FAILED;
-        }
-
-        rc = LNetMDBind (md, LNET_UNLINK, mdh);
-        if (rc != 0) {
-                CERROR ("LNetMDBind failed: %d\n", rc);
-                LASSERT (rc == -ENOMEM);
-                RETURN (-ENOMEM);
-        }
-
-        CDEBUG(D_NET, "Sending %d bytes to portal %d, xid "LPD64", offset %u\n",
-               len, portal, xid, offset);
-
-        rc = LNetPut (conn->c_self, *mdh, ack, 
-                      conn->c_peer, portal, xid, offset, 0);
-        if (rc != 0) {
-                int rc2;
-                /* We're going to get an UNLINK event when I unlink below,
-                 * which will complete just like any other failed send, so
-                 * I fall through and return success here! */
-                CERROR("LNetPut(%s, %d, "LPD64") failed: %d\n",
-                       libcfs_id2str(conn->c_peer), portal, xid, rc);
-                rc2 = LNetMDUnlink(*mdh);
-                LASSERTF(rc2 == 0, "rc2 = %d\n", rc2);
-        }
-
-        RETURN (0);
-}
-
-int ptlrpc_start_bulk_transfer (struct ptlrpc_bulk_desc *desc)
-{
-        struct ptlrpc_connection *conn = desc->bd_export->exp_connection;
-        int                       rc;
-        int                       rc2;
-        lnet_md_t                 md;
-        __u64                     xid;
-        ENTRY;
-
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_BULK_PUT_NET)) 
-                RETURN(0);
-
-        /* NB no locking required until desc is on the network */
-        LASSERT (!desc->bd_network_rw);
-        LASSERT (desc->bd_type == BULK_PUT_SOURCE ||
-                 desc->bd_type == BULK_GET_SINK);
-        desc->bd_success = 0;
-        desc->bd_sender = LNET_NID_ANY;
-
-        md.user_ptr = &desc->bd_cbid;
-        md.eq_handle = ptlrpc_eq_h;
-        md.threshold = 2; /* SENT and ACK/REPLY */
-        md.options = PTLRPC_MD_OPTIONS;
-        ptlrpc_fill_bulk_md(&md, desc);
-
-        LASSERT (desc->bd_cbid.cbid_fn == server_bulk_callback);
-        LASSERT (desc->bd_cbid.cbid_arg == desc);
-
-        /* NB total length may be 0 for a read past EOF, so we send a 0
-         * length bulk, since the client expects a bulk event. */
-
-        rc = LNetMDBind(md, LNET_UNLINK, &desc->bd_md_h);
-        if (rc != 0) {
-                CERROR("LNetMDBind failed: %d\n", rc);
-                LASSERT (rc == -ENOMEM);
-                RETURN(-ENOMEM);
-        }
-
-        /* Client's bulk and reply matchbits are the same */
-        xid = desc->bd_req->rq_xid;
-        CDEBUG(D_NET, "Transferring %u pages %u bytes via portal %d "
-               "id %s xid "LPX64"\n", desc->bd_iov_count,
-               desc->bd_nob, desc->bd_portal, 
-               libcfs_id2str(conn->c_peer), xid);
-
-        /* Network is about to get at the memory */
-        desc->bd_network_rw = 1;
-
-        if (desc->bd_type == BULK_PUT_SOURCE)
-                rc = LNetPut (conn->c_self, desc->bd_md_h, LNET_ACK_REQ, 
-                              conn->c_peer, desc->bd_portal, xid, 0, 0);
-        else
-                rc = LNetGet (conn->c_self, desc->bd_md_h, 
-                              conn->c_peer, desc->bd_portal, xid, 0);
-
-        if (rc != 0) {
-                /* Can't send, so we unlink the MD bound above.  The UNLINK
-                 * event this creates will signal completion with failure,
-                 * so we return SUCCESS here! */
-                CERROR("Transfer(%s, %d, "LPX64") failed: %d\n",
-                       libcfs_id2str(conn->c_peer), desc->bd_portal, xid, rc);
-                rc2 = LNetMDUnlink(desc->bd_md_h);
-                LASSERT (rc2 == 0);
-        }
-
-        RETURN(0);
-}
-
-void ptlrpc_abort_bulk (struct ptlrpc_bulk_desc *desc)
-{
-        /* Server side bulk abort. Idempotent. Not thread-safe (i.e. only
-         * serialises with completion callback) */
-        struct l_wait_info lwi;
-        int                rc;
-
-        LASSERT (!in_interrupt ());             /* might sleep */
-
-        if (!ptlrpc_bulk_active(desc))          /* completed or */
-                return;                         /* never started */
-        
-        /* Do not send any meaningful data over the wire for evicted clients */
-        if (desc->bd_export && desc->bd_export->exp_failed)
-                ptl_rpc_wipe_bulk_pages(desc);
-
-        /* The unlink ensures the callback happens ASAP and is the last
-         * one.  If it fails, it must be because completion just happened,
-         * but we must still l_wait_event() in this case, to give liblustre
-         * a chance to run server_bulk_callback()*/
-
-        LNetMDUnlink (desc->bd_md_h);
-
-        for (;;) {
-                /* Network access will complete in finite time but the HUGE
-                 * timeout lets us CWARN for visibility of sluggish NALs */
-                lwi = LWI_TIMEOUT (cfs_time_seconds(300), NULL, NULL);
-                rc = l_wait_event(desc->bd_waitq, 
-                                  !ptlrpc_bulk_active(desc), &lwi);
-                if (rc == 0)
-                        return;
-
-                LASSERT(rc == -ETIMEDOUT);
-                CWARN("Unexpectedly long timeout: desc %p\n", desc);
-        }
-}
-
-int ptlrpc_register_bulk (struct ptlrpc_request *req)
-{
-        struct ptlrpc_bulk_desc *desc = req->rq_bulk;
-        lnet_process_id_t peer;
-        int rc;
-        int rc2;
-        lnet_handle_me_t  me_h;
-        lnet_md_t         md;
-        ENTRY;
-
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_BULK_GET_NET)) 
-                RETURN(0);
-
-        /* NB no locking required until desc is on the network */
-        LASSERT (desc->bd_nob > 0);
-        LASSERT (!desc->bd_network_rw);
-        LASSERT (desc->bd_iov_count <= PTLRPC_MAX_BRW_PAGES);
-        LASSERT (desc->bd_req != NULL);
-        LASSERT (desc->bd_type == BULK_PUT_SINK ||
-                 desc->bd_type == BULK_GET_SOURCE);
-
-        desc->bd_success = 0;
-        desc->bd_sender = LNET_NID_ANY;
-
-        peer = desc->bd_import->imp_connection->c_peer;
-
-        md.user_ptr = &desc->bd_cbid;
-        md.eq_handle = ptlrpc_eq_h;
-        md.threshold = 1;                       /* PUT or GET */
-        md.options = PTLRPC_MD_OPTIONS | 
-                     ((desc->bd_type == BULK_GET_SOURCE) ? 
-                      LNET_MD_OP_GET : LNET_MD_OP_PUT);
-        ptlrpc_fill_bulk_md(&md, desc);
-
-        LASSERT (desc->bd_cbid.cbid_fn == client_bulk_callback);
-        LASSERT (desc->bd_cbid.cbid_arg == desc);
-
-        /* XXX Registering the same xid on retried bulk makes my head
-         * explode trying to understand how the original request's bulk
-         * might interfere with the retried request -eeb */
-        LASSERTF (!desc->bd_registered || req->rq_xid != desc->bd_last_xid,
-                  "registered: %d  rq_xid: "LPU64" bd_last_xid: "LPU64"\n",
-                  desc->bd_registered, req->rq_xid, desc->bd_last_xid);
-        desc->bd_registered = 1;
-        desc->bd_last_xid = req->rq_xid;
-
-        rc = LNetMEAttach(desc->bd_portal, peer,
-                         req->rq_xid, 0, LNET_UNLINK, LNET_INS_AFTER, &me_h);
-        if (rc != 0) {
-                CERROR("LNetMEAttach failed: %d\n", rc);
-                LASSERT (rc == -ENOMEM);
-                RETURN (-ENOMEM);
-        }
-
-        /* About to let the network at it... */
-        desc->bd_network_rw = 1;
-        rc = LNetMDAttach(me_h, md, LNET_UNLINK, &desc->bd_md_h);
-        if (rc != 0) {
-                CERROR("LNetMDAttach failed: %d\n", rc);
-                LASSERT (rc == -ENOMEM);
-                desc->bd_network_rw = 0;
-                rc2 = LNetMEUnlink (me_h);
-                LASSERT (rc2 == 0);
-                RETURN (-ENOMEM);
-        }
-
-        CDEBUG(D_NET, "Setup bulk %s buffers: %u pages %u bytes, xid "LPX64", "
-               "portal %u\n",
-               desc->bd_type == BULK_GET_SOURCE ? "get-source" : "put-sink",
-               desc->bd_iov_count, desc->bd_nob,
-               req->rq_xid, desc->bd_portal);
-        RETURN(0);
-}
-
-void ptlrpc_unregister_bulk (struct ptlrpc_request *req)
-{
-        /* Disconnect a bulk desc from the network. Idempotent. Not
-         * thread-safe (i.e. only interlocks with completion callback). */
-        struct ptlrpc_bulk_desc *desc = req->rq_bulk;
-        cfs_waitq_t             *wq;
-        struct l_wait_info       lwi;
-        int                      rc;
-
-        LASSERT (!in_interrupt ());     /* might sleep */
-
-        if (!ptlrpc_bulk_active(desc))  /* completed or */
-                return;                 /* never registered */
-
-        LASSERT (desc->bd_req == req);  /* bd_req NULL until registered */
-
-        /* the unlink ensures the callback happens ASAP and is the last
-         * one.  If it fails, it must be because completion just happened,
-         * but we must still l_wait_event() in this case to give liblustre
-         * a chance to run client_bulk_callback() */
-
-        LNetMDUnlink (desc->bd_md_h);
-        
-        if (req->rq_set != NULL)
-                wq = &req->rq_set->set_waitq;
-        else
-                wq = &req->rq_reply_waitq;
-
-        for (;;) {
-                /* Network access will complete in finite time but the HUGE
-                 * timeout lets us CWARN for visibility of sluggish NALs */
-                lwi = LWI_TIMEOUT (cfs_time_seconds(300), NULL, NULL);
-                rc = l_wait_event(*wq, !ptlrpc_bulk_active(desc), &lwi);
-                if (rc == 0)
-                        return;
-
-                LASSERT (rc == -ETIMEDOUT);
-                DEBUG_REQ(D_WARNING,req,"Unexpectedly long timeout: desc %p",
-                          desc);
-        }
-}
-
-int ptlrpc_send_reply (struct ptlrpc_request *req, int flags)
-{
-        struct ptlrpc_service     *svc = req->rq_rqbd->rqbd_service;
-        struct ptlrpc_reply_state *rs = req->rq_reply_state;
-        struct ptlrpc_connection  *conn;
-        int                        service_time;
-        unsigned int               offset = 0;
-        int                        rc;
-
-        /* We must already have a reply buffer (only ptlrpc_error() may be
-         * called without one).  We must also have a request buffer which
-         * is either the actual (swabbed) incoming request, or a saved copy
-         * if this is a req saved in target_queue_final_reply(). */
-        LASSERT (req->rq_reqmsg != NULL);
-        LASSERT (req->rq_repmsg != NULL);
-        LASSERT (rs != NULL);
-        LASSERT (req->rq_repmsg == rs->rs_msg);
-        LASSERT ((flags & PTLRPC_REPLY_MAYBE_DIFFICULT) || !rs->rs_difficult);
-        LASSERT (rs->rs_cb_id.cbid_fn == reply_out_callback);
-        LASSERT (rs->rs_cb_id.cbid_arg == rs);
-
-        /* There may be no rq_export during failover */
-
-        if (req->rq_export && req->rq_export->exp_obd &&
-            req->rq_export->exp_obd->obd_fail) {
-                /* Failed obd's only send ENODEV */
-                req->rq_type = PTL_RPC_MSG_ERR;
-                req->rq_status = -ENODEV;
-                CDEBUG(D_HA, "sending ENODEV from failed obd %d\n",
-                       req->rq_export->exp_obd->obd_minor);
-        }
-
-        if (req->rq_type != PTL_RPC_MSG_ERR)
-                req->rq_type = PTL_RPC_MSG_REPLY;
-
-        lustre_msg_set_type(req->rq_repmsg, req->rq_type);
-        lustre_msg_set_status(req->rq_repmsg, req->rq_status);
-        lustre_msg_set_opc(req->rq_repmsg, lustre_msg_get_opc(req->rq_reqmsg));
-        
-        service_time = max_t(int, cfs_time_current_sec() -
-                             req->rq_arrival_time.tv_sec, 1);
-        if (!(flags & PTLRPC_REPLY_EARLY) && 
-            (req->rq_type != PTL_RPC_MSG_ERR)) {
-                /* early replies and errors don't count toward our service
-                   time estimate */
-                int oldse = at_add(&svc->srv_at_estimate, service_time);
-                if (oldse != 0)
-                        DEBUG_REQ(D_ADAPTTO, req,
-                                  "svc %s changed estimate from %d to %d",
-                                  svc->srv_name, oldse, 
-                                  at_get(&svc->srv_at_estimate));
-        }
-        /* Report actual service time for client latency calc */
-        lustre_msg_set_service_time(req->rq_repmsg, service_time);
-        /* Report service time estimate for future client reqs */
-        lustre_msg_set_timeout(req->rq_repmsg, at_get(&svc->srv_at_estimate));
-
-        if (req->rq_export && req->rq_export->exp_obd)
-                target_pack_pool_reply(req);
-
-        if (lustre_msghdr_get_flags(req->rq_reqmsg) & MSGHDR_AT_SUPPORT) {
-                /* early replies go to offset 0, regular replies go after that*/
-                if (flags & PTLRPC_REPLY_EARLY) {
-                        offset = 0;
-                        /* Include a checksum on early replies - must be done
-                           after all other lustre_msg_set_* */
-                        lustre_msg_set_cksum(req->rq_repmsg, 
-                                         lustre_msg_calc_cksum(req->rq_repmsg));
-                } else {
-                        offset = lustre_msg_early_size();
-                }
-        } else {
-                CDEBUG(D_ADAPTTO, "No early reply support: flags=%#x "
-                       "req_flags=%#x magic=%d:%x/%x len=%d\n", 
-                      flags, lustre_msg_get_flags(req->rq_reqmsg),
-                      lustre_msg_is_v1(req->rq_reqmsg),
-                      lustre_msg_get_magic(req->rq_reqmsg),
-                      lustre_msg_get_magic(req->rq_repmsg), req->rq_replen);
-        }
-
-        if (req->rq_export == NULL || req->rq_export->exp_connection == NULL)
-                conn = ptlrpc_get_connection(req->rq_peer, req->rq_self, NULL);
-        else
-                conn = ptlrpc_connection_addref(req->rq_export->exp_connection);
-
-        if (conn == NULL) {
-                CERROR("not replying on NULL connection\n"); /* bug 9635 */
-                return -ENOTCONN;
-        }
-        
-        atomic_inc (&svc->srv_outstanding_replies);
-        ptlrpc_rs_addref(rs);                   /* +1 ref for the network */
-        req->rq_sent = cfs_time_current_sec();
-        
-        rc = ptl_send_buf (&rs->rs_md_h, req->rq_repmsg, req->rq_replen,
-                           rs->rs_difficult ? LNET_ACK_REQ : LNET_NOACK_REQ,
-                           &rs->rs_cb_id, conn, svc->srv_rep_portal,
-                           req->rq_xid, offset);
-        if (rc != 0) {
-                atomic_dec (&svc->srv_outstanding_replies);
-                ptlrpc_req_drop_rs(req);
-        }
-        ptlrpc_put_connection(conn);
-        return rc;
-}
-
-int ptlrpc_reply (struct ptlrpc_request *req)
-{
-        return (ptlrpc_send_reply (req, 0));
-}
-
-int ptlrpc_error(struct ptlrpc_request *req)
-{
-        int rc;
-        ENTRY;
-
-        if (!req->rq_repmsg) {
-                rc = lustre_pack_reply(req, 1, NULL, NULL);
-                if (rc)
-                        RETURN(rc);
-        }
-
-        req->rq_type = PTL_RPC_MSG_ERR;
-
-        rc = ptlrpc_send_reply(req, 0);
-        RETURN(rc);
-}
-
-int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
-{
-        int rc;
-        int rc2;
-        struct ptlrpc_connection *connection;
-        lnet_handle_me_t  reply_me_h;
-        lnet_md_t         reply_md;
-        struct obd_device *obd = request->rq_import->imp_obd;
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_PTLRPC_DROP_RPC, 0); 
-
-        LASSERT (request->rq_type == PTL_RPC_MSG_REQUEST);
-
-        /* If this is a re-transmit, we're required to have disengaged
-         * cleanly from the previous attempt */
-        LASSERT (!request->rq_receiving_reply);
-
-        if (request->rq_import->imp_obd &&
-            request->rq_import->imp_obd->obd_fail) {
-                CDEBUG(D_HA, "muting rpc for failed imp obd %s\n",
-                       request->rq_import->imp_obd->obd_name);
-                /* this prevents us from waiting in ptlrpc_queue_wait */
-                request->rq_err = 1;
-                RETURN(-ENODEV);
-        }
-
-        connection = request->rq_import->imp_connection;
-
-        if (request->rq_bulk != NULL) {
-                rc = ptlrpc_register_bulk (request);
-                if (rc != 0)
-                        RETURN(rc);
-        }
-
-        lustre_msg_set_handle(request->rq_reqmsg,
-                              &request->rq_import->imp_remote_handle);
-        lustre_msg_set_type(request->rq_reqmsg, PTL_RPC_MSG_REQUEST);
-        lustre_msg_set_conn_cnt(request->rq_reqmsg,
-                                request->rq_import->imp_conn_cnt);
-
-        if (!noreply) {
-                LASSERT (request->rq_replen != 0);
-                if (request->rq_repbuf == NULL)
-                        OBD_ALLOC(request->rq_repbuf, request->rq_replen);
-                if (request->rq_repbuf == NULL)
-                        GOTO(cleanup_bulk, rc = -ENOMEM);
-                request->rq_repmsg = NULL;
-
-                rc = LNetMEAttach(request->rq_reply_portal,/*XXX FIXME bug 249*/
-                                  connection->c_peer, request->rq_xid, 0,
-                                  LNET_UNLINK, LNET_INS_AFTER, &reply_me_h);
-                if (rc != 0) {
-                        CERROR("LNetMEAttach failed: %d\n", rc);
-                        LASSERT (rc == -ENOMEM);
-                        GOTO(cleanup_repmsg, rc = -ENOMEM);
-                }
-        }
-
-        spin_lock(&request->rq_lock);
-        /* If the MD attach succeeds, there _will_ be a reply_in callback */
-        request->rq_receiving_reply = !noreply;
-        /* We are responsible for unlinking the reply buffer */
-        request->rq_must_unlink = !noreply;
-        /* Clear any flags that may be present from previous sends. */
-        request->rq_replied = 0;
-        request->rq_err = 0;
-        request->rq_timedout = 0;
-        request->rq_net_err = 0;
-        request->rq_resend = 0;
-        request->rq_restart = 0;
-        spin_unlock(&request->rq_lock);
-
-        if (!noreply) {
-                reply_md.start     = request->rq_repbuf;
-                reply_md.length    = request->rq_replen;
-                /* Allow multiple early replies */
-                reply_md.threshold = LNET_MD_THRESH_INF;
-                /* Manage remote for early replies */
-                reply_md.options   = PTLRPC_MD_OPTIONS | LNET_MD_OP_PUT |
-                        LNET_MD_MANAGE_REMOTE;
-                reply_md.user_ptr  = &request->rq_reply_cbid;
-                reply_md.eq_handle = ptlrpc_eq_h;
-
-                /* We must see the unlink callback to unset rq_must_unlink,
-                   so we can't auto-unlink */
-                rc = LNetMDAttach(reply_me_h, reply_md, LNET_RETAIN, 
-                                 &request->rq_reply_md_h);
-                if (rc != 0) {
-                        CERROR("LNetMDAttach failed: %d\n", rc);
-                        LASSERT (rc == -ENOMEM);
-                        spin_lock(&request->rq_lock);
-                        /* ...but the MD attach didn't succeed... */
-                        request->rq_receiving_reply = 0;
-                        spin_unlock(&request->rq_lock);
-                        GOTO(cleanup_me, rc -ENOMEM);
-                }
-
-                CDEBUG(D_NET, "Setup reply buffer: %u bytes, xid "LPU64
-                       ", portal %u\n",
-                       request->rq_replen, request->rq_xid,
-                       request->rq_reply_portal);
-        }
-
-        /* add references on request for request_out_callback */
-        ptlrpc_request_addref(request);
-        if (obd->obd_svc_stats != NULL)
-                lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQACTIVE_CNTR,
-                                    request->rq_import->imp_inflight.counter);
-
-        OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND, request->rq_timeout + 5);
-
-        request->rq_sent = cfs_time_current_sec();
-        do_gettimeofday(&request->rq_arrival_time);
-        /* We give the server rq_timeout secs to process the req, and 
-           add the network latency for our local timeout. */
-        request->rq_deadline = request->rq_sent + request->rq_timeout + 
-                    ptlrpc_at_get_net_latency(request);
-
-        ptlrpc_pinger_sending_on_import(request->rq_import);
-        
-        DEBUG_REQ(D_INFO, request, "send flg=%x",
-                  lustre_msg_get_flags(request->rq_reqmsg));
-        rc = ptl_send_buf(&request->rq_req_md_h,
-                          request->rq_reqmsg, request->rq_reqlen,
-                          LNET_NOACK_REQ, &request->rq_req_cbid,
-                          connection,
-                          request->rq_request_portal,
-                          request->rq_xid, 0);
-        if (rc == 0) {
-                ptlrpc_lprocfs_rpc_sent(request);
-                RETURN(rc);
-        }
-
-        ptlrpc_req_finished(request);
-        if (noreply)
-                RETURN(rc);
-
- cleanup_me:
-        /* MEUnlink is safe; the PUT didn't even get off the ground, and
-         * nobody apart from the PUT's target has the right nid+XID to
-         * access the reply buffer. */
-        rc2 = LNetMEUnlink(reply_me_h);
-        LASSERT (rc2 == 0);
-        /* UNLINKED callback called synchronously */
-        LASSERT (!request->rq_receiving_reply);
-
- cleanup_repmsg:
-        OBD_FREE(request->rq_repbuf, request->rq_replen);
-        request->rq_repbuf = NULL;
-        request->rq_repmsg = NULL; //remove
-
- cleanup_bulk:
-        if (request->rq_bulk != NULL)
-                ptlrpc_unregister_bulk(request);
-
-        return rc;
-}
-
-int ptlrpc_register_rqbd (struct ptlrpc_request_buffer_desc *rqbd)
-{
-        struct ptlrpc_service   *service = rqbd->rqbd_service;
-        static lnet_process_id_t  match_id = {LNET_NID_ANY, LNET_PID_ANY};
-        int                      rc;
-        lnet_md_t                 md;
-        lnet_handle_me_t          me_h;
-
-        CDEBUG(D_NET, "LNetMEAttach: portal %d\n",
-               service->srv_req_portal);
-
-        if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_PTLRPC_RQBD))
-                return (-ENOMEM);
-
-        rc = LNetMEAttach(service->srv_req_portal,
-                          match_id, 0, ~0, LNET_UNLINK, LNET_INS_AFTER, &me_h);
-        if (rc != 0) {
-                CERROR("LNetMEAttach failed: %d\n", rc);
-                return (-ENOMEM);
-        }
-
-        LASSERT(rqbd->rqbd_refcount == 0);
-        rqbd->rqbd_refcount = 1;
-
-        md.start     = rqbd->rqbd_buffer;
-        md.length    = service->srv_buf_size;
-        md.max_size  = service->srv_max_req_size;
-        md.threshold = LNET_MD_THRESH_INF;
-        md.options   = PTLRPC_MD_OPTIONS | LNET_MD_OP_PUT | LNET_MD_MAX_SIZE;
-        md.user_ptr  = &rqbd->rqbd_cbid;
-        md.eq_handle = ptlrpc_eq_h;
-        
-        rc = LNetMDAttach(me_h, md, LNET_UNLINK, &rqbd->rqbd_md_h);
-        if (rc == 0)
-                return (0);
-
-        CERROR("LNetMDAttach failed: %d; \n", rc);
-        LASSERT (rc == -ENOMEM);
-        rc = LNetMEUnlink (me_h);
-        LASSERT (rc == 0);
-        rqbd->rqbd_refcount = 0;
-        
-        return (-ENOMEM);
-}
diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c
deleted file mode 100644
index 3f3d746538a00b44b7efd81ff92a99d08fb6724f..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/pack_generic.c
+++ /dev/null
@@ -1,2729 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Eric Barton <eeb@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * (Un)packing of OST requests
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <libcfs/libcfs.h>
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-
-#if LUSTRE_VERSION_CODE > OBD_OCD_VERSION(1,8,0,0)
-#error "lustre_msg_v1 has been deprecated since 1.6.0, please remove it"
-#elif LUSTRE_VERSION_CODE > OBD_OCD_VERSION(1,6,50,0)
-#warning "lustre_msg_v1 has been deprecated since 1.6.0, consider removing it"
-#endif
-
-static inline int lustre_msg_hdr_size_v1(int count)
-{
-        return size_round(offsetof(struct lustre_msg_v1, lm_buflens[count]));
-}
-
-static inline int lustre_msg_hdr_size_v2(int count)
-{
-        return size_round(offsetof(struct lustre_msg_v2, lm_buflens[count]));
-}
-
-int lustre_msg_swabbed(struct lustre_msg *msg)
-{
-        return (msg->lm_magic == LUSTRE_MSG_MAGIC_V1_SWABBED) ||
-               (msg->lm_magic == LUSTRE_MSG_MAGIC_V2_SWABBED);
-}
-
-static inline int
-lustre_msg_check_version_v2(struct lustre_msg_v2 *msg, __u32 version)
-{
-        __u32 ver = lustre_msg_get_version(msg);
-        return (ver & LUSTRE_VERSION_MASK) != version;
-}
-
-int lustre_msg_check_version(struct lustre_msg *msg, __u32 version)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return lustre_msg_check_version_v2(msg, version);
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-                return -EINVAL;
-        }
-}
-
-/* early reply size */
-int lustre_msg_early_size() {
-        static int size = 0;
-        if (!size) 
-                size = lustre_msg_size(LUSTRE_MSG_MAGIC_V2, 1, NULL);
-        return size;
-}
-EXPORT_SYMBOL(lustre_msg_early_size);
-
-static inline int lustre_msg_size_v1(int count, int *lengths)
-{
-        int size;
-        int i;
-
-        LASSERT(count >= 0);
-        size = lustre_msg_hdr_size_v1(count);
-        for (i = 0; i < count; i++)
-                size += size_round(lengths[i]);
-
-        return size;
-}
-
-static inline int lustre_msg_size_v2(int count, int *lengths)
-{
-        int size;
-        int i;
-
-        size = lustre_msg_hdr_size_v2(count);
-        for (i = 0; i < count; i++)
-                size += size_round(lengths[i]);
-
-        return size;
-}
-
-/* This returns the size of the buffer that is required to hold a lustre_msg
- * with the given sub-buffer lengths.
- * NOTE: this should only be used for NEW requests, and should always be
- *       in the form of a v2 request.  If this is a connection to a v1
- *       target then the first buffer will be stripped because the ptlrpc
- *       data is part of the lustre_msg_v1 header. b=14043 */
-int lustre_msg_size(__u32 magic, int count, int *lens)
-{
-        int size[] = { sizeof(struct ptlrpc_body) };
-
-        if (!lens) {
-                LASSERT(count == 1);
-                lens = size;
-        }
-
-        LASSERT(count > 0);
-        LASSERT(lens[MSG_PTLRPC_BODY_OFF] == sizeof(struct ptlrpc_body));
-
-        switch (magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                return lustre_msg_size_v1(count - 1, lens + 1);
-        case LUSTRE_MSG_MAGIC_V2:
-                return lustre_msg_size_v2(count, lens);
-        default:
-                CERROR("incorrect message magic: %08x\n", magic);
-                return 0;
-        }
-}
-
-/* This is used to determine the size of a buffer that was already packed
- * and will correctly handle the different message formats. */
-int lustre_packed_msg_size(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1: {
-                struct lustre_msg_v1 *v1_msg = (struct lustre_msg_v1 *)msg;
-                return lustre_msg_size_v1(v1_msg->lm_bufcount,
-                                          v1_msg->lm_buflens);
-        }
-        case LUSTRE_MSG_MAGIC_V2:
-                return lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens);
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-static void
-lustre_init_msg_v1(void *m, int count, int *lens, char **bufs)
-{
-        struct lustre_msg_v1 *msg = (struct lustre_msg_v1 *)m;
-        char *ptr;
-        int i;
-
-        LASSERT(count >= 0);
-        msg->lm_magic = LUSTRE_MSG_MAGIC_V1;
-        msg->lm_version = PTLRPC_MSG_VERSION;
-        msg->lm_bufcount = count;
-
-        for (i = 0; i < count; i++)
-                msg->lm_buflens[i] = lens[i];
-
-        if (bufs == NULL)
-                return;
-
-        ptr = (char *)msg + lustre_msg_hdr_size_v1(count);
-        for (i = 0; i < count; i++) {
-                char *tmp = bufs[i];
-                LOGL(tmp, lens[i], ptr);
-        }
-}
-
-static void
-lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, int *lens, char **bufs)
-{
-        char *ptr;
-        int i;
-
-        msg->lm_bufcount = count;
-        /* XXX: lm_secflvr uninitialized here */
-        msg->lm_magic = LUSTRE_MSG_MAGIC_V2;
-
-        for (i = 0; i < count; i++)
-                msg->lm_buflens[i] = lens[i];
-
-        if (bufs == NULL)
-                return;
-
-        ptr = (char *)msg + lustre_msg_hdr_size_v2(count);
-        for (i = 0; i < count; i++) {
-                char *tmp = bufs[i];
-                LOGL(tmp, lens[i], ptr);
-        }
-}
-
-static int lustre_pack_request_v1(struct ptlrpc_request *req,
-                                  int count, int *lens, char **bufs)
-{
-        int reqlen;
-
-        reqlen = lustre_msg_size_v1(count, lens);
-
-        /* See if we got it from prealloc pool */
-        if (req->rq_reqmsg) {
-                /* Cannot return error here, that would create
-                   infinite loop in ptlrpc_prep_req_pool */
-                /* In this case ptlrpc_prep_req_from_pool sets req->rq_reqlen
-                   to maximum size that would fit into this preallocated
-                   request */
-                LASSERTF(req->rq_reqlen >= reqlen, "req->rq_reqlen %d, "
-                                                   "reqlen %d\n",req->rq_reqlen,
-                                                    reqlen);
-                memset(req->rq_reqmsg, 0, reqlen);
-        } else {
-                OBD_ALLOC(req->rq_reqmsg, reqlen);
-                if (req->rq_reqmsg == NULL) {
-                        CERROR("alloc reqmsg (len %d) failed\n", reqlen);
-                        return -ENOMEM;
-                }
-        }
-
-        req->rq_reqlen = reqlen;
-
-        lustre_init_msg_v1(req->rq_reqmsg, count, lens, bufs);
-        return 0;
-}
-
-static int lustre_pack_request_v2(struct ptlrpc_request *req,
-                                  int count, int *lens, char **bufs)
-{
-        int reqlen;
-
-        reqlen = lustre_msg_size_v2(count, lens);
-
-        /* See if we got it from prealloc pool */
-        if (req->rq_reqmsg) {
-                /* Cannot return error here, that would create
-                   infinite loop in ptlrpc_prep_req_pool */
-                /* In this case ptlrpc_prep_req_from_pool sets req->rq_reqlen
-                   to maximum size that would fit into this preallocated
-                   request */
-                LASSERTF(req->rq_reqlen >= reqlen, "req->rq_reqlen %d, "
-                                                   "reqlen %d\n",req->rq_reqlen,
-                                                    reqlen);
-                memset(req->rq_reqmsg, 0, reqlen);
-        } else {
-                OBD_ALLOC(req->rq_reqmsg, reqlen);
-                if (req->rq_reqmsg == NULL) {
-                        CERROR("alloc reqmsg (len %d) failed\n", reqlen);
-                        return -ENOMEM;
-                }
-        }
-
-        req->rq_reqlen = reqlen;
-
-        lustre_init_msg_v2(req->rq_reqmsg, count, lens, bufs);
-        lustre_msg_add_version(req->rq_reqmsg, PTLRPC_MSG_VERSION);
-        lustre_set_req_swabbed(req, MSG_PTLRPC_BODY_OFF);
-
-        return 0;
-}
-
-int lustre_pack_request(struct ptlrpc_request *req, __u32 magic, int count,
-                        int *lens, char **bufs)
-{
-        int size[] = { sizeof(struct ptlrpc_body) };
-
-        if (!lens) {
-                LASSERT(count == 1);
-                lens = size;
-        }
-
-        LASSERT(count > 0);
-        LASSERT(lens[MSG_PTLRPC_BODY_OFF] == sizeof(struct ptlrpc_body));
-
-        switch (magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                return lustre_pack_request_v1(req, count - 1, lens + 1,
-                                              bufs ? bufs + 1 : NULL);
-        case LUSTRE_MSG_MAGIC_V2:
-                return lustre_pack_request_v2(req, count, lens, bufs);
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", magic);
-                return -EINVAL;
-        }
-}
-
-#if RS_DEBUG
-CFS_LIST_HEAD(ptlrpc_rs_debug_lru);
-spinlock_t ptlrpc_rs_debug_lock;
-
-#define PTLRPC_RS_DEBUG_LRU_ADD(rs)                                     \
-do {                                                                    \
-        spin_lock(&ptlrpc_rs_debug_lock);                               \
-        list_add_tail(&(rs)->rs_debug_list, &ptlrpc_rs_debug_lru);      \
-        spin_unlock(&ptlrpc_rs_debug_lock);                             \
-} while (0)
-
-#define PTLRPC_RS_DEBUG_LRU_DEL(rs)             \
-do {                                            \
-        spin_lock(&ptlrpc_rs_debug_lock);       \
-        list_del(&(rs)->rs_debug_list);         \
-        spin_unlock(&ptlrpc_rs_debug_lock);     \
-} while (0)
-#else
-# define PTLRPC_RS_DEBUG_LRU_ADD(rs) do {} while(0)
-# define PTLRPC_RS_DEBUG_LRU_DEL(rs) do {} while(0)
-#endif
-
-static struct ptlrpc_reply_state *lustre_get_emerg_rs(struct ptlrpc_service *svc,
-                                                      int size)
-{
-        struct ptlrpc_reply_state *rs = NULL;
-
-        spin_lock(&svc->srv_lock);
-        /* See if we have anything in a pool, and wait if nothing */
-        while (list_empty(&svc->srv_free_rs_list)) {
-                struct l_wait_info lwi;
-                int rc;
-                spin_unlock(&svc->srv_lock);
-                /* If we cannot get anything for some long time, we better
-                   bail out instead of waiting infinitely */
-                lwi = LWI_TIMEOUT(cfs_time_seconds(10), NULL, NULL);
-                rc = l_wait_event(svc->srv_free_rs_waitq,
-                                  !list_empty(&svc->srv_free_rs_list), &lwi);
-                if (rc)
-                        goto out;
-                spin_lock(&svc->srv_lock);
-        }
-        
-        rs = list_entry(svc->srv_free_rs_list.next, struct ptlrpc_reply_state,
-                        rs_list);
-        list_del(&rs->rs_list);
-        spin_unlock(&svc->srv_lock);
-        LASSERT(rs);
-        LASSERTF(svc->srv_max_reply_size > size, "Want %d, prealloc %d\n", size,
-                 svc->srv_max_reply_size);
-        memset(rs, 0, size);
-        rs->rs_prealloc = 1;
-out:
-        return rs;
-}
-
-static int lustre_pack_reply_v1(struct ptlrpc_request *req, int count,
-                                int *lens, char **bufs, int flags)
-{
-        struct ptlrpc_reply_state *rs;
-        int                        msg_len;
-        int                        size;
-        ENTRY;
-
-        LASSERT(req->rq_reply_state == NULL);
-
-        if ((flags & LPRFL_EARLY_REPLY) == 0)
-                req->rq_packed_final = 1;
-
-        msg_len = lustre_msg_size_v1(count, lens);
-        size = sizeof(struct ptlrpc_reply_state) + msg_len;
-        OBD_ALLOC(rs, size);
-        if (unlikely(rs == NULL)) {
-                rs = lustre_get_emerg_rs(req->rq_rqbd->rqbd_service, size);
-                if (!rs) 
-                        RETURN (-ENOMEM);
-        }
-        atomic_set(&rs->rs_refcount, 1);        /* 1 ref for rq_reply_state */
-        rs->rs_cb_id.cbid_fn = reply_out_callback;
-        rs->rs_cb_id.cbid_arg = rs;
-        rs->rs_service = req->rq_rqbd->rqbd_service;
-        rs->rs_size = size;
-        CFS_INIT_LIST_HEAD(&rs->rs_exp_list);
-        CFS_INIT_LIST_HEAD(&rs->rs_obd_list);
-        rs->rs_msg = (struct lustre_msg *)(rs + 1);
-
-        req->rq_replen = msg_len;
-        req->rq_reply_state = rs;
-        req->rq_repmsg = rs->rs_msg;
-
-        lustre_init_msg_v1(rs->rs_msg, count, lens, bufs);
-
-        PTLRPC_RS_DEBUG_LRU_ADD(rs);
-
-        RETURN (0);
-}
-
-static int lustre_pack_reply_v2(struct ptlrpc_request *req, int count,
-                                int *lens, char **bufs, int flags)
-{
-        struct ptlrpc_reply_state *rs;
-        int                        msg_len;
-        int                        size;
-        ENTRY;
-
-        LASSERT(req->rq_reply_state == NULL);
-
-        if ((flags & LPRFL_EARLY_REPLY) == 0)
-                req->rq_packed_final = 1;
-
-        msg_len = lustre_msg_size_v2(count, lens);
-        size = sizeof(struct ptlrpc_reply_state) + msg_len;
-        OBD_ALLOC(rs, size);
-        if (unlikely(rs == NULL)) {
-                rs = lustre_get_emerg_rs(req->rq_rqbd->rqbd_service, size);
-                if (!rs) 
-                        RETURN (-ENOMEM);
-        }
-        atomic_set(&rs->rs_refcount, 1);        /* 1 ref for rq_reply_state */
-        rs->rs_cb_id.cbid_fn = reply_out_callback;
-        rs->rs_cb_id.cbid_arg = rs;
-        rs->rs_service = req->rq_rqbd->rqbd_service;
-        rs->rs_size = size;
-        CFS_INIT_LIST_HEAD(&rs->rs_exp_list);
-        CFS_INIT_LIST_HEAD(&rs->rs_obd_list);
-        rs->rs_msg = (struct lustre_msg *)(rs + 1);
-
-        req->rq_replen = msg_len;
-        req->rq_reply_state = rs;
-        req->rq_repmsg = rs->rs_msg;
-
-        /* server side, no rq_repbuf */
-        lustre_init_msg_v2(rs->rs_msg, count, lens, bufs);
-        lustre_msg_add_version(rs->rs_msg, PTLRPC_MSG_VERSION);
-        lustre_set_rep_swabbed(req, MSG_PTLRPC_BODY_OFF);
-
-        PTLRPC_RS_DEBUG_LRU_ADD(rs);
-
-        RETURN(0);
-}
-
-int lustre_pack_reply_flags(struct ptlrpc_request *req, int count, int *lens,
-                            char **bufs, int flags)
-{
-        int size[] = { sizeof(struct ptlrpc_body) };
-
-        if (!lens) {
-                LASSERT(count == 1);
-                lens = size;
-        }
-
-        LASSERT(count > 0);
-        LASSERT(lens[MSG_PTLRPC_BODY_OFF] == sizeof(struct ptlrpc_body));
-
-        switch (req->rq_reqmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return lustre_pack_reply_v1(req, count - 1, lens + 1,
-                                            bufs ? bufs + 1 : NULL, flags);
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return lustre_pack_reply_v2(req, count, lens, bufs, flags);
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n",
-                         req->rq_reqmsg->lm_magic);
-                return -EINVAL;
-        }
-}
-
-int lustre_pack_reply(struct ptlrpc_request *req, int count, int *lens,
-                      char **bufs)
-{
-        int rc = lustre_pack_reply_flags(req, count, lens, bufs, 0);
-        if (rc != 0)
-                CERROR("lustre_pack_reply failed: rc=%d size=%d\n", rc,
-                       lustre_msg_size(req->rq_reqmsg->lm_magic, count, lens));
-        return rc;
-}
-
-
-void *lustre_msg_buf_v1(void *msg, int n, int min_size)
-{
-        struct lustre_msg_v1 *m = (struct lustre_msg_v1 *)msg;
-        int i, offset, buflen, bufcount;
-
-        LASSERT(m != NULL);
-        LASSERT(n >= 0);
-
-        bufcount = m->lm_bufcount;
-        if (n >= bufcount) {
-                CDEBUG(D_INFO, "msg %p buffer[%d] not present (count %d)\n",
-                       m, n, bufcount);
-                return NULL;
-        }
-
-        buflen = m->lm_buflens[n];
-        if (buflen < min_size) {
-                CERROR("msg %p buffer[%d] size %d too small (required %d)\n",
-                       m, n, buflen, min_size);
-                LBUG();
-                return NULL;
-        }
-
-        offset = lustre_msg_hdr_size_v1(bufcount);
-        for (i = 0; i < n; i++)
-                offset += size_round(m->lm_buflens[i]);
-
-        return (char *)m + offset;
-}
-
-void *lustre_msg_buf_v2(struct lustre_msg_v2 *m, int n, int min_size)
-{
-        int i, offset, buflen, bufcount;
-
-        LASSERT(m != NULL);
-        LASSERT(n >= 0);
-
-        bufcount = m->lm_bufcount;
-        if (n >= bufcount) {
-                CDEBUG(D_INFO, "msg %p buffer[%d] not present (count %d)\n",
-                       m, n, bufcount);
-                return NULL;
-        }
-
-        buflen = m->lm_buflens[n];
-        if (buflen < min_size) {
-                CERROR("msg %p buffer[%d] size %d too small (required %d)\n",
-                       m, n, buflen, min_size);
-                return NULL;
-        }
-
-        offset = lustre_msg_hdr_size_v2(bufcount);
-        for (i = 0; i < n; i++)
-                offset += size_round(m->lm_buflens[i]);
-
-        return (char *)m + offset;
-}
-
-void *lustre_msg_buf(struct lustre_msg *m, int n, int min_size)
-{
-        switch (m->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return lustre_msg_buf_v1(m, n - 1, min_size);
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return lustre_msg_buf_v2(m, n, min_size);
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", m->lm_magic);
-                return NULL;
-        }
-}
-
-void lustre_shrink_reply_v1(struct ptlrpc_request *req, int segment,
-                            unsigned int newlen, int move_data)
-{
-        struct lustre_msg_v1 *msg = (struct lustre_msg_v1 *)req->rq_repmsg;
-        char *tail = NULL, *newpos;
-        int tail_len = 0, n;
-
-        LASSERT(req->rq_reply_state);
-        LASSERT(msg);
-        LASSERT(segment >= 0);
-        LASSERT(msg->lm_bufcount > segment);
-        LASSERT(msg->lm_buflens[segment] >= newlen);
-
-        if (msg->lm_buflens[segment] == newlen)
-                return;
-
-        if (move_data && msg->lm_bufcount > segment + 1) {
-                tail = lustre_msg_buf_v1(msg, segment + 1, 0);
-                for (n = segment + 1; n < msg->lm_bufcount; n++)
-                        tail_len += size_round(msg->lm_buflens[n]);
-        }
-
-        msg->lm_buflens[segment] = newlen;
-
-        if (tail && tail_len) {
-                newpos = lustre_msg_buf_v1(msg, segment + 1, 0);
-                LASSERT(newpos <= tail);
-                if (newpos != tail)
-                        memcpy(newpos, tail, tail_len);
-        }
-
-        if (newlen == 0 && msg->lm_bufcount > segment + 1) {
-                memmove(&msg->lm_buflens[segment], &msg->lm_buflens[segment + 1],
-                        (msg->lm_bufcount - segment - 1) * sizeof(__u32));
-                msg->lm_buflens[msg->lm_bufcount - 1] = 0;
-        }
-
-        req->rq_replen = lustre_msg_size_v1(msg->lm_bufcount, (int *)msg->lm_buflens);
-}
-
-void lustre_shrink_reply_v2(struct ptlrpc_request *req, int segment,
-                            unsigned int newlen, int move_data)
-{
-        struct lustre_msg_v2 *msg = req->rq_repmsg;
-        char *tail = NULL, *newpos;
-        int tail_len = 0, n;
-
-        LASSERT(req->rq_reply_state);
-        LASSERT(msg);
-        LASSERT(msg->lm_bufcount > segment);
-        LASSERT(msg->lm_buflens[segment] >= newlen);
-
-        if (msg->lm_buflens[segment] == newlen)
-                return;
-
-        if (move_data && msg->lm_bufcount > segment + 1) {
-                tail = lustre_msg_buf_v2(msg, segment + 1, 0);
-                for (n = segment + 1; n < msg->lm_bufcount; n++)
-                        tail_len += size_round(msg->lm_buflens[n]);
-        }
-
-        msg->lm_buflens[segment] = newlen;
-
-        if (tail && tail_len) {
-                newpos = lustre_msg_buf_v2(msg, segment + 1, 0);
-                LASSERT(newpos <= tail);
-                if (newpos != tail)
-                        memcpy(newpos, tail, tail_len);
-        }
-
-        if (newlen == 0 && msg->lm_bufcount > segment + 1) {
-                memmove(&msg->lm_buflens[segment], &msg->lm_buflens[segment + 1],
-                        (msg->lm_bufcount - segment - 1) * sizeof(__u32));
-                msg->lm_buflens[msg->lm_bufcount - 1] = 0;
-        }
-
-        req->rq_replen = lustre_msg_size_v2(msg->lm_bufcount, (int *)msg->lm_buflens);
-}
-
-/*
- * shrink @segment to size @newlen. if @move_data is non-zero, we also move
- * data forward from @segment + 1.
- * 
- * if @newlen == 0, we remove the segment completely, but we still keep the
- * totally bufcount the same to save possible data moving. this will leave a
- * unused segment with size 0 at the tail, but that's ok.
- *
- * CAUTION:
- * + if any buffers higher than @segment has been filled in, must call shrink
- *   with non-zero @move_data.
- * + caller should NOT keep pointers to msg buffers which higher than @segment
- *   after call shrink.
- */
-void lustre_shrink_reply(struct ptlrpc_request *req, int segment,
-                        unsigned int newlen, int move_data)
-{
-        switch (req->rq_repmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                lustre_shrink_reply_v1(req, segment - 1, newlen, move_data);
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-                lustre_shrink_reply_v2(req, segment, newlen, move_data);
-                return;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n",
-                         req->rq_repmsg->lm_magic);
-        }
-}
-
-void lustre_free_reply_state(struct ptlrpc_reply_state *rs)
-{
-        PTLRPC_RS_DEBUG_LRU_DEL(rs);
-
-        LASSERT (atomic_read(&rs->rs_refcount) == 0);
-        LASSERT (!rs->rs_difficult || rs->rs_handled);
-        LASSERT (!rs->rs_on_net);
-        LASSERT (!rs->rs_scheduled);
-        LASSERT (rs->rs_export == NULL);
-        LASSERT (rs->rs_nlocks == 0);
-        LASSERT (list_empty(&rs->rs_exp_list));
-        LASSERT (list_empty(&rs->rs_obd_list));
-
-        if (unlikely(rs->rs_prealloc)) {
-                struct ptlrpc_service *svc = rs->rs_service;
-
-                spin_lock(&svc->srv_lock);
-                list_add(&rs->rs_list,
-                         &svc->srv_free_rs_list);
-                spin_unlock(&svc->srv_lock);
-                cfs_waitq_signal(&svc->srv_free_rs_waitq);
-        } else {
-                OBD_FREE(rs, rs->rs_size);
-        }
-}
-
-int lustre_unpack_msg_v1(void *msg, int len)
-{
-        struct lustre_msg_v1 *m = (struct lustre_msg_v1 *)msg;
-        int flipped, required_len, i;
-        ENTRY;
-
-        /* Now we know the sender speaks my language. */
-        required_len = lustre_msg_hdr_size_v1(0);
-        if (len < required_len) {
-                /* can't even look inside the message */
-                CERROR("message length %d too small for lustre_msg\n", len);
-                RETURN(-EINVAL);
-        }
-
-        flipped = lustre_msg_swabbed((struct lustre_msg *)m);
-
-        if (flipped) {
-                __swab32s(&m->lm_type);
-                __swab32s(&m->lm_version);
-                __swab32s(&m->lm_opc);
-                __swab64s(&m->lm_last_xid);
-                __swab64s(&m->lm_last_committed);
-                __swab64s(&m->lm_transno);
-                __swab32s(&m->lm_status);
-                __swab32s(&m->lm_flags);
-                __swab32s(&m->lm_conn_cnt);
-                __swab32s(&m->lm_bufcount);
-        }
-
-        if (m->lm_version != PTLRPC_MSG_VERSION) {
-                CERROR("wrong lustre_msg version %08x\n", m->lm_version);
-                RETURN(-EINVAL);
-        }
-
-        required_len = lustre_msg_hdr_size_v1(m->lm_bufcount);
-        if (len < required_len) {
-                /* didn't receive all the buffer lengths */
-                CERROR("message length %d too small for %d buflens\n",
-                        len, m->lm_bufcount);
-                RETURN(-EINVAL);
-        }
-
-        for (i = 0; i < m->lm_bufcount; i++) {
-                if (flipped)
-                        __swab32s (&m->lm_buflens[i]);
-                required_len += size_round(m->lm_buflens[i]);
-        }
-
-        if (len < required_len) {
-                CERROR("len: %d, required_len %d\n", len, required_len);
-                CERROR("bufcount: %d\n", m->lm_bufcount);
-                for (i = 0; i < m->lm_bufcount; i++)
-                        CERROR("buffer %d length %d\n", i, m->lm_buflens[i]);
-                RETURN(-EINVAL);
-        }
-
-        RETURN(0);
-}
-
-static int lustre_unpack_msg_v2(struct lustre_msg_v2 *m, int len)
-{
-        int flipped, required_len, i;
-
-        /* Now we know the sender speaks my language. */
-        required_len = lustre_msg_hdr_size_v2(0);
-        if (len < required_len) {
-                /* can't even look inside the message */
-                CERROR("message length %d too small for lustre_msg\n", len);
-                RETURN(-EINVAL);
-        }
-
-        flipped = lustre_msg_swabbed(m);
-
-        if (flipped) {
-                __swab32s(&m->lm_bufcount);
-                __swab32s(&m->lm_secflvr);
-                __swab32s(&m->lm_repsize);
-                __swab32s(&m->lm_cksum);
-                __swab32s(&m->lm_flags);
-                CLASSERT(offsetof(typeof(*m), lm_padding_2) != 0);
-                CLASSERT(offsetof(typeof(*m), lm_padding_3) != 0);
-        }
-
-        required_len = lustre_msg_hdr_size_v2(m->lm_bufcount);
-        if (len < required_len) {
-                /* didn't receive all the buffer lengths */
-                CERROR ("message length %d too small for %d buflens\n",
-                        len, m->lm_bufcount);
-                return -EINVAL;
-        }
-
-        for (i = 0; i < m->lm_bufcount; i++) {
-                if (flipped)
-                        __swab32s(&m->lm_buflens[i]);
-                required_len += size_round(m->lm_buflens[i]);
-        }
-
-        if (len < required_len) {
-                CERROR("len: %d, required_len %d\n", len, required_len);
-                CERROR("bufcount: %d\n", m->lm_bufcount);
-                for (i = 0; i < m->lm_bufcount; i++)
-                        CERROR("buffer %d length %d\n", i, m->lm_buflens[i]);
-                return -EINVAL;
-        }
-
-        return 0;
-}
-
-int lustre_unpack_msg(struct lustre_msg *m, int len)
-{
-        int required_len, rc;
-        ENTRY;
-
-        /* We can provide a slightly better error log, if we check the
-         * message magic and version first.  In the future, struct
-         * lustre_msg may grow, and we'd like to log a version mismatch,
-         * rather than a short message.
-         *
-         */
-        required_len = offsetof(struct lustre_msg, lm_magic) +
-                       sizeof(m->lm_magic);
-        if (len < required_len) {
-                /* can't even look inside the message */
-                CERROR("message length %d too small for magic/version check\n",
-                       len);
-                RETURN(-EINVAL);
-        }
-
-        switch (m->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                rc = lustre_unpack_msg_v1(m, len);
-                break;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                rc = lustre_unpack_msg_v2(m, len);
-                break;
-        default:
-                CERROR("bad lustre msg magic: %#08X\n", m->lm_magic);
-                return -EINVAL;
-        }
-
-        RETURN(rc);
-}
-
-static inline int lustre_unpack_ptlrpc_body_v2(struct lustre_msg_v2 *m,
-                                               int offset)
-{
-        struct ptlrpc_body *pb;
-
-        pb = lustre_msg_buf_v2(m, offset, sizeof(*pb));
-        if (!pb) {
-                CERROR("error unpacking ptlrpc body\n");
-                return -EFAULT;
-        }
-        if (lustre_msg_swabbed(m))
-                lustre_swab_ptlrpc_body(pb);
-
-        if ((pb->pb_version & ~LUSTRE_VERSION_MASK) != PTLRPC_MSG_VERSION) {
-                 CERROR("wrong lustre_msg version %08x\n", pb->pb_version);
-                 return -EINVAL;
-        }
-
-        return 0;
-}
-
-int lustre_unpack_req_ptlrpc_body(struct ptlrpc_request *req, int offset)
-{
-        switch (req->rq_reqmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                lustre_set_req_swabbed(req, offset);
-                return lustre_unpack_ptlrpc_body_v2(req->rq_reqmsg, offset);
-        default:
-                CERROR("bad lustre msg magic: %#08X\n",
-                       req->rq_reqmsg->lm_magic);
-                return -EINVAL;
-        }
-}
-
-int lustre_unpack_rep_ptlrpc_body(struct ptlrpc_request *req, int offset)
-{
-        switch (req->rq_repmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                lustre_set_rep_swabbed(req, offset);
-                return lustre_unpack_ptlrpc_body_v2(req->rq_repmsg, offset);
-        default:
-                CERROR("bad lustre msg magic: %#08X\n",
-                       req->rq_repmsg->lm_magic);
-                return -EINVAL;
-        }
-}
-
-static inline int lustre_msg_buflen_v1(void *msg, int n)
-{
-        struct lustre_msg_v1 *m = (struct lustre_msg_v1 *)msg;
-
-        LASSERT(n >= 0);
-        if (n >= m->lm_bufcount)
-                return 0;
-
-        return m->lm_buflens[n];
-}
-
-static inline int lustre_msg_buflen_v2(struct lustre_msg_v2 *m, int n)
-{
-        if (n >= m->lm_bufcount)
-                return 0;
-
-        return m->lm_buflens[n];
-}
-
-/**
- * lustre_msg_buflen - return the length of buffer @n in message @m
- * @m - lustre_msg (request or reply) to look at
- * @n - message index (base 0)
- *
- * returns zero for non-existent message indices
- */
-int lustre_msg_buflen(struct lustre_msg *m, int n)
-{
-        switch (m->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return lustre_msg_buflen_v1(m, n - 1);
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return lustre_msg_buflen_v2(m, n);
-        default:
-                CERROR("incorrect message magic: %08x\n", m->lm_magic);
-                return -EINVAL;
-        }
-}
-EXPORT_SYMBOL(lustre_msg_buflen);
-
-static inline void lustre_msg_set_buflen_v1(void *msg, int n, int len)
-{
-        struct lustre_msg_v1 *m = (struct lustre_msg_v1 *)msg;
-
-        LASSERT(n >= 0);
-        if (n >= m->lm_bufcount)
-                LBUG();
-
-        m->lm_buflens[n] = len;
-}
-
-static inline void
-lustre_msg_set_buflen_v2(struct lustre_msg_v2 *m, int n, int len)
-{
-        if (n >= m->lm_bufcount)
-                LBUG();
-
-        m->lm_buflens[n] = len;
-}
-
-void lustre_msg_set_buflen(struct lustre_msg *m, int n, int len)
-{
-        switch (m->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                lustre_msg_set_buflen_v1(m, n - 1, len);
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-                lustre_msg_set_buflen_v2(m, n, len);
-                return;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", m->lm_magic);
-        }
-}
-
-EXPORT_SYMBOL(lustre_msg_set_buflen);
-
-/* NB return the bufcount for lustre_msg_v2 format, so if message is packed
- * in V1 format, the result is one bigger. (add struct ptlrpc_body). */
-int lustre_msg_bufcount(struct lustre_msg *m)
-{
-        switch (m->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)m)->lm_bufcount + 1;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return m->lm_bufcount;
-        default:
-                CERROR("incorrect message magic: %08x\n", m->lm_magic);
-                return -EINVAL;
-        }
-}
-EXPORT_SYMBOL(lustre_msg_bufcount);
-
-char *lustre_msg_string(struct lustre_msg *m, int index, int max_len)
-{
-        /* max_len == 0 means the string should fill the buffer */
-        char *str;
-        int slen, blen;
-
-        switch (m->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                str = lustre_msg_buf_v1(m, index - 1, 0);
-                blen = lustre_msg_buflen_v1(m, index - 1);
-                break;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                str = lustre_msg_buf_v2(m, index, 0);
-                blen = lustre_msg_buflen_v2(m, index);
-                break;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", m->lm_magic);
-        }
-
-        if (str == NULL) {
-                CERROR ("can't unpack string in msg %p buffer[%d]\n", m, index);
-                return NULL;
-        }
-
-        slen = strnlen(str, blen);
-
-        if (slen == blen) {                     /* not NULL terminated */
-                CERROR("can't unpack non-NULL terminated string in "
-                        "msg %p buffer[%d] len %d\n", m, index, blen);
-                return NULL;
-        }
-
-        if (max_len == 0) {
-                if (slen != blen - 1) {
-                        CERROR("can't unpack short string in msg %p "
-                               "buffer[%d] len %d: strlen %d\n",
-                               m, index, blen, slen);
-                        return NULL;
-                }
-        } else if (slen > max_len) {
-                CERROR("can't unpack oversized string in msg %p "
-                       "buffer[%d] len %d strlen %d: max %d expected\n",
-                       m, index, blen, slen, max_len);
-                return NULL;
-        }
-
-        return str;
-}
-
-/* Wrap up the normal fixed length cases */
-void *lustre_swab_buf(struct lustre_msg *msg, int index, int min_size,
-                      void *swabber)
-{
-        void *ptr = NULL;
-
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                ptr = lustre_msg_buf_v1(msg, index - 1, min_size);
-                break;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                ptr = lustre_msg_buf_v2(msg, index, min_size);
-                break;
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-        }
-        if (ptr == NULL)
-                return NULL;
-
-        if (swabber != NULL && lustre_msg_swabbed(msg))
-                ((void (*)(void *))swabber)(ptr);
-
-        return ptr;
-}
-
-void *lustre_swab_reqbuf(struct ptlrpc_request *req, int index, int min_size,
-                         void *swabber)
-{
-        lustre_set_req_swabbed(req, index);
-        return lustre_swab_buf(req->rq_reqmsg, index, min_size, swabber);
-}
-
-void *lustre_swab_repbuf(struct ptlrpc_request *req, int index, int min_size,
-                         void *swabber)
-{
-        lustre_set_rep_swabbed(req, index);
-        return lustre_swab_buf(req->rq_repmsg, index, min_size, swabber);
-}
-
-__u32 lustre_msghdr_get_flags(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                /* already in host endian */
-                return msg->lm_flags;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-void lustre_msghdr_set_flags(struct lustre_msg *msg, __u32 flags)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-                msg->lm_flags = flags;
-                return;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-__u32 lustre_msg_get_flags(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_flags &
-                       MSG_GEN_FLAG_MASK;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_flags;
-        }
-        default:
-                /* flags might be printed in debug code while message
-                 * uninitialized */
-                return 0;
-        }
-}
-
-void lustre_msg_add_flags(struct lustre_msg *msg, int flags)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_flags |=
-                                        MSG_GEN_FLAG_MASK & flags;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_flags |= flags;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_flags(struct lustre_msg *msg, int flags)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_flags &= ~MSG_GEN_FLAG_MASK;
-                ((struct lustre_msg_v1 *)msg)->lm_flags |=
-                                        MSG_GEN_FLAG_MASK & flags;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_flags = flags;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_clear_flags(struct lustre_msg *msg, int flags)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                ((struct lustre_msg_v1 *)msg)->lm_flags &=
-                                        ~(MSG_GEN_FLAG_MASK & flags);
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_flags &= ~(MSG_GEN_FLAG_MASK & flags);
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-__u32 lustre_msg_get_op_flags(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_flags >>
-                       MSG_OP_FLAG_SHIFT;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_op_flags;
-        }
-        default:
-                return 0;
-        }
-}
-
-void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_flags |=
-                        (flags & MSG_GEN_FLAG_MASK) << MSG_OP_FLAG_SHIFT;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_op_flags |= flags;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_op_flags(struct lustre_msg *msg, int flags)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_flags &= ~MSG_OP_FLAG_MASK;
-                ((struct lustre_msg_v1 *)msg)->lm_flags |=
-                        ((flags & MSG_GEN_FLAG_MASK) <<MSG_OP_FLAG_SHIFT);
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_op_flags |= flags;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-struct lustre_handle *lustre_msg_get_handle(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return &((struct lustre_msg_v1 *)msg)->lm_handle;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return NULL;
-                }
-                return &pb->pb_handle;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return NULL;
-        }
-}
-
-__u32 lustre_msg_get_type(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_type;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return PTL_RPC_MSG_ERR;
-                }
-                return pb->pb_type;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return PTL_RPC_MSG_ERR;
-        }
-}
-
-__u32 lustre_msg_get_version(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_version;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_version;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-void lustre_msg_add_version(struct lustre_msg *msg, int version)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_version |= version;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-__u32 lustre_msg_get_opc(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_opc;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_opc;
-        }
-        default:
-                CERROR( "incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u64 lustre_msg_get_last_xid(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_last_xid;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_last_xid;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u64 lustre_msg_get_last_committed(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_last_committed;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_last_committed;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u64 lustre_msg_get_transno(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_transno;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_transno;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-int lustre_msg_get_status(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_status;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return -EINVAL;
-                }
-                return pb->pb_status;
-        }
-        default:
-                /* status might be printed in debug code while message
-                 * uninitialized */
-                return -EINVAL;
-        }
-}
-
-__u64 lustre_msg_get_slv(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 1;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return -EINVAL;
-                }
-                return pb->pb_slv;
-        }
-        default:
-                CERROR("invalid msg magic %x\n", msg->lm_magic);
-                return -EINVAL;
-        }
-}
-
-
-void lustre_msg_set_slv(struct lustre_msg *msg, __u64 slv)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return;
-                }
-                pb->pb_slv = slv;
-                return;
-        }
-        default:
-                CERROR("invalid msg magic %x\n", msg->lm_magic);
-                return;
-        }
-}
-
-__u32 lustre_msg_get_limit(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 1;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return -EINVAL;
-                }
-                return pb->pb_limit;
-        }
-        default:
-                CERROR("invalid msg magic %x\n", msg->lm_magic);
-                return -EINVAL;
-        }
-}
-
-
-void lustre_msg_set_limit(struct lustre_msg *msg, __u64 limit)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return;
-                }
-                pb->pb_limit = limit;
-                return;
-        }
-        default:
-                CERROR("invalid msg magic %x\n", msg->lm_magic);
-                return;
-        }
-}
-
-__u32 lustre_msg_get_conn_cnt(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return ((struct lustre_msg_v1 *)msg)->lm_conn_cnt;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                }
-                return pb->pb_conn_cnt;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-int lustre_msg_is_v1(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 1;
-        default:
-                return 0;
-        }
-}
-
-__u32 lustre_msg_get_magic(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return msg->lm_magic;
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u32 lustre_msg_get_timeout(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-                
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                        
-                }
-                return pb->pb_timeout;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u32 lustre_msg_get_service_time(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-        
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                if (!pb) {
-                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
-                        return 0;
-                        
-                }
-                return pb->pb_service_time;
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u32 lustre_msg_get_cksum(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return msg->lm_cksum;
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-__u32 lustre_msg_calc_cksum(struct lustre_msg *msg)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 0;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED: {
-                struct ptlrpc_body *pb;
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                return crc32_le(~(__u32)0, (char *)pb, sizeof(*pb));
-        }
-        default:
-                CERROR("incorrect message magic: %08x\n", msg->lm_magic);
-                return 0;
-        }
-}
-
-void lustre_msg_set_handle(struct lustre_msg *msg, struct lustre_handle *handle)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_handle = *handle;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_handle = *handle;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_type(struct lustre_msg *msg, __u32 type)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_type = type;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_type = type;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_opc(struct lustre_msg *msg, __u32 opc)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_opc = opc;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_opc = opc;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_last_xid(struct lustre_msg *msg, __u64 last_xid)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_last_xid = last_xid;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_last_xid = last_xid;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_last_committed(struct lustre_msg *msg, __u64 last_committed)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_last_committed=last_committed;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_last_committed = last_committed;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_transno(struct lustre_msg *msg, __u64 transno)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_transno = transno;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_transno = transno;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_status(struct lustre_msg *msg, __u32 status)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_status = status;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_status = status;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_conn_cnt(struct lustre_msg *msg, __u32 conn_cnt)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                ((struct lustre_msg_v1 *)msg)->lm_conn_cnt = conn_cnt;
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_conn_cnt = conn_cnt;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_timeout(struct lustre_msg *msg, __u32 timeout)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-                
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_timeout = timeout;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_service_time(struct lustre_msg *msg, __u32 service_time)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                return;
-        case LUSTRE_MSG_MAGIC_V2: {
-                struct ptlrpc_body *pb;
-
-                pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(*pb));
-                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
-                pb->pb_service_time = service_time;
-                return;
-        }
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-void lustre_msg_set_cksum(struct lustre_msg *msg, __u32 cksum)
-{
-        switch (msg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-                return;
-        case LUSTRE_MSG_MAGIC_V2:
-                msg->lm_cksum = cksum;
-                return;
-        default:
-                LASSERTF(0, "incorrect message magic: %08x\n", msg->lm_magic);
-        }
-}
-
-
-/* byte flipping routines for all wire types declared in
- * lustre_idl.h implemented here.
- */
-void lustre_swab_ptlrpc_body(struct ptlrpc_body *b)
-{
-        __swab32s (&b->pb_type);
-        __swab32s (&b->pb_version);
-        __swab32s (&b->pb_opc);
-        __swab32s (&b->pb_status);
-        __swab64s (&b->pb_last_xid);
-        __swab64s (&b->pb_last_seen);
-        __swab64s (&b->pb_last_committed);
-        __swab64s (&b->pb_transno);
-        __swab32s (&b->pb_flags);
-        __swab32s (&b->pb_op_flags);
-        __swab32s (&b->pb_conn_cnt);
-        __swab32s (&b->pb_timeout);
-        __swab32s (&b->pb_service_time);
-        __swab64s (&b->pb_slv);
-        __swab32s (&b->pb_limit);
-}
-
-void lustre_swab_connect(struct obd_connect_data *ocd)
-{
-        __swab64s(&ocd->ocd_connect_flags);
-        __swab32s(&ocd->ocd_version);
-        __swab32s(&ocd->ocd_grant);
-        __swab32s(&ocd->ocd_index);
-        __swab32s(&ocd->ocd_brw_size);
-        __swab64s(&ocd->ocd_ibits_known);
-        __swab32s(&ocd->ocd_nllu);
-        __swab32s(&ocd->ocd_nllg);
-        __swab64s(&ocd->ocd_transno);
-        __swab32s(&ocd->ocd_group);
-        __swab32s(&ocd->ocd_cksum_types);
-        CLASSERT(offsetof(typeof(*ocd), padding1) != 0);
-        CLASSERT(offsetof(typeof(*ocd), padding2) != 0);
-}
-
-void lustre_swab_obdo (struct obdo  *o)
-{
-        __swab64s (&o->o_valid);
-        __swab64s (&o->o_id);
-        __swab64s (&o->o_gr);
-        __swab64s (&o->o_fid);
-        __swab64s (&o->o_size);
-        __swab64s (&o->o_mtime);
-        __swab64s (&o->o_atime);
-        __swab64s (&o->o_ctime);
-        __swab64s (&o->o_blocks);
-        __swab64s (&o->o_grant);
-        __swab32s (&o->o_blksize);
-        __swab32s (&o->o_mode);
-        __swab32s (&o->o_uid);
-        __swab32s (&o->o_gid);
-        __swab32s (&o->o_flags);
-        __swab32s (&o->o_nlink);
-        __swab32s (&o->o_generation);
-        __swab32s (&o->o_misc);
-        __swab32s (&o->o_easize);
-        __swab32s (&o->o_mds);
-        __swab32s (&o->o_stripe_idx);
-        __swab32s (&o->o_padding_1);
-        /* o_inline is opaque */
-}
-
-void lustre_swab_obd_statfs (struct obd_statfs *os)
-{
-        __swab64s (&os->os_type);
-        __swab64s (&os->os_blocks);
-        __swab64s (&os->os_bfree);
-        __swab64s (&os->os_bavail);
-        __swab64s (&os->os_files);
-        __swab64s (&os->os_ffree);
-        /* no need to swab os_fsid */
-        __swab32s (&os->os_bsize);
-        __swab32s (&os->os_namelen);
-        __swab64s (&os->os_maxbytes);
-        __swab32s (&os->os_state);
-        /* no need to swap os_spare */
-}
-
-void lustre_swab_obd_ioobj (struct obd_ioobj *ioo)
-{
-        __swab64s (&ioo->ioo_id);
-        __swab64s (&ioo->ioo_gr);
-        __swab32s (&ioo->ioo_type);
-        __swab32s (&ioo->ioo_bufcnt);
-}
-
-void lustre_swab_niobuf_remote (struct niobuf_remote *nbr)
-{
-        __swab64s (&nbr->offset);
-        __swab32s (&nbr->len);
-        __swab32s (&nbr->flags);
-}
-
-void lustre_swab_ost_body (struct ost_body *b)
-{
-        lustre_swab_obdo (&b->oa);
-}
-
-void lustre_swab_ost_last_id(obd_id *id)
-{
-        __swab64s(id);
-}
-
-void lustre_swab_ost_lvb(struct ost_lvb *lvb)
-{
-        __swab64s(&lvb->lvb_size);
-        __swab64s(&lvb->lvb_mtime);
-        __swab64s(&lvb->lvb_atime);
-        __swab64s(&lvb->lvb_ctime);
-        __swab64s(&lvb->lvb_blocks);
-}
-
-void lustre_swab_mds_status_req (struct mds_status_req *r)
-{
-        __swab32s (&r->flags);
-        __swab32s (&r->repbuf);
-}
-
-void lustre_swab_mds_body (struct mds_body *b)
-{
-        lustre_swab_ll_fid (&b->fid1);
-        lustre_swab_ll_fid (&b->fid2);
-        /* handle is opaque */
-        __swab64s (&b->valid);
-        __swab64s (&b->size);
-        __swab64s (&b->mtime);
-        __swab64s (&b->atime);
-        __swab64s (&b->ctime);
-        __swab64s (&b->blocks);
-        __swab64s (&b->io_epoch);
-        __swab64s (&b->ino);
-        __swab32s (&b->fsuid);
-        __swab32s (&b->fsgid);
-        __swab32s (&b->capability);
-        __swab32s (&b->mode);
-        __swab32s (&b->uid);
-        __swab32s (&b->gid);
-        __swab32s (&b->flags);
-        __swab32s (&b->rdev);
-        __swab32s (&b->nlink);
-        __swab32s (&b->generation);
-        __swab32s (&b->suppgid);
-        __swab32s (&b->eadatasize);
-        __swab32s (&b->aclsize);
-        __swab32s (&b->max_mdsize);
-        __swab32s (&b->max_cookiesize);
-        __swab32s (&b->padding_4);
-}
-
-void lustre_swab_mgs_target_info(struct mgs_target_info *mti)
-{
-        int i;
-        __swab32s(&mti->mti_lustre_ver);
-        __swab32s(&mti->mti_stripe_index);
-        __swab32s(&mti->mti_config_ver);
-        __swab32s(&mti->mti_flags);
-        __swab32s(&mti->mti_nid_count);
-        CLASSERT(sizeof(lnet_nid_t) == sizeof(__u64));
-        for (i = 0; i < MTI_NIDS_MAX; i++) 
-                __swab64s(&mti->mti_nids[i]);
-}
-
-static void lustre_swab_obd_dqinfo (struct obd_dqinfo *i)
-{
-        __swab64s (&i->dqi_bgrace);
-        __swab64s (&i->dqi_igrace);
-        __swab32s (&i->dqi_flags);
-        __swab32s (&i->dqi_valid);
-}
-
-static void lustre_swab_obd_dqblk (struct obd_dqblk *b)
-{
-        __swab64s (&b->dqb_ihardlimit);
-        __swab64s (&b->dqb_isoftlimit);
-        __swab64s (&b->dqb_curinodes);
-        __swab64s (&b->dqb_bhardlimit);
-        __swab64s (&b->dqb_bsoftlimit);
-        __swab64s (&b->dqb_curspace);
-        __swab64s (&b->dqb_btime);
-        __swab64s (&b->dqb_itime);
-        __swab32s (&b->dqb_valid);
-        CLASSERT(offsetof(typeof(*b), padding) != 0);
-}
-
-void lustre_swab_obd_quotactl (struct obd_quotactl *q)
-{
-        __swab32s (&q->qc_cmd);
-        __swab32s (&q->qc_type);
-        __swab32s (&q->qc_id);
-        __swab32s (&q->qc_stat);
-        lustre_swab_obd_dqinfo (&q->qc_dqinfo);
-        lustre_swab_obd_dqblk (&q->qc_dqblk);
-}
-
-void lustre_swab_quota_adjust_qunit (struct quota_adjust_qunit *q)
-{
-        __swab32s (&q->qaq_flags);
-        __swab32s (&q->qaq_id);
-        __swab64s (&q->qaq_bunit_sz);
-        __swab64s (&q->qaq_iunit_sz);
-}
-
-void lustre_swab_mds_rec_setattr (struct mds_rec_setattr *sa)
-{
-        __swab32s (&sa->sa_opcode);
-        __swab32s (&sa->sa_fsuid);
-        __swab32s (&sa->sa_fsgid);
-        __swab32s (&sa->sa_cap);
-        __swab32s (&sa->sa_suppgid);
-        __swab32s (&sa->sa_mode);
-        lustre_swab_ll_fid (&sa->sa_fid);
-        __swab64s (&sa->sa_valid);
-        __swab64s (&sa->sa_size);
-        __swab64s (&sa->sa_mtime);
-        __swab64s (&sa->sa_atime);
-        __swab64s (&sa->sa_ctime);
-        __swab32s (&sa->sa_uid);
-        __swab32s (&sa->sa_gid);
-        __swab32s (&sa->sa_attr_flags);
-        CLASSERT(offsetof(typeof(*sa), sa_padding) != 0);
-}
-
-void lustre_swab_mds_rec_join (struct mds_rec_join *jr)
-{
-        __swab64s(&jr->jr_headsize);
-        lustre_swab_ll_fid(&jr->jr_fid);
-}
-
-void lustre_swab_mds_rec_create (struct mds_rec_create *cr)
-{
-        __swab32s (&cr->cr_opcode);
-        __swab32s (&cr->cr_fsuid);
-        __swab32s (&cr->cr_fsgid);
-        __swab32s (&cr->cr_cap);
-        __swab32s (&cr->cr_flags); /* for use with open */
-        __swab32s (&cr->cr_mode);
-        lustre_swab_ll_fid (&cr->cr_fid);
-        lustre_swab_ll_fid (&cr->cr_replayfid);
-        __swab64s (&cr->cr_time);
-        __swab64s (&cr->cr_rdev);
-        __swab32s (&cr->cr_suppgid);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_4) != 0);
-        CLASSERT(offsetof(typeof(*cr), cr_padding_5) != 0);
-}
-
-void lustre_swab_mds_rec_link (struct mds_rec_link *lk)
-{
-        __swab32s (&lk->lk_opcode);
-        __swab32s (&lk->lk_fsuid);
-        __swab32s (&lk->lk_fsgid);
-        __swab32s (&lk->lk_cap);
-        __swab32s (&lk->lk_suppgid1);
-        __swab32s (&lk->lk_suppgid2);
-        lustre_swab_ll_fid (&lk->lk_fid1);
-        lustre_swab_ll_fid (&lk->lk_fid2);
-        __swab64s (&lk->lk_time);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*lk), lk_padding_4) != 0);
-}
-
-void lustre_swab_mds_rec_unlink (struct mds_rec_unlink *ul)
-{
-        __swab32s (&ul->ul_opcode);
-        __swab32s (&ul->ul_fsuid);
-        __swab32s (&ul->ul_fsgid);
-        __swab32s (&ul->ul_cap);
-        __swab32s (&ul->ul_suppgid);
-        __swab32s (&ul->ul_mode);
-        lustre_swab_ll_fid (&ul->ul_fid1);
-        lustre_swab_ll_fid (&ul->ul_fid2);
-        __swab64s (&ul->ul_time);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*ul), ul_padding_4) != 0);
-}
-
-void lustre_swab_mds_rec_rename (struct mds_rec_rename *rn)
-{
-        __swab32s (&rn->rn_opcode);
-        __swab32s (&rn->rn_fsuid);
-        __swab32s (&rn->rn_fsgid);
-        __swab32s (&rn->rn_cap);
-        __swab32s (&rn->rn_suppgid1);
-        __swab32s (&rn->rn_suppgid2);
-        lustre_swab_ll_fid (&rn->rn_fid1);
-        lustre_swab_ll_fid (&rn->rn_fid2);
-        __swab64s (&rn->rn_time);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_1) != 0);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_2) != 0);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_3) != 0);
-        CLASSERT(offsetof(typeof(*rn), rn_padding_4) != 0);
-}
-
-void lustre_swab_lov_desc (struct lov_desc *ld)
-{
-        __swab32s (&ld->ld_tgt_count);
-        __swab32s (&ld->ld_active_tgt_count);
-        __swab32s (&ld->ld_default_stripe_count);
-        __swab64s (&ld->ld_default_stripe_size);
-        __swab64s (&ld->ld_default_stripe_offset);
-        __swab32s (&ld->ld_pattern);
-        __swab32s (&ld->ld_qos_maxage);
-        /* uuid endian insensitive */
-}
-
-static void print_lum (struct lov_user_md *lum)
-{
-        CDEBUG(D_OTHER, "lov_user_md %p:\n", lum);
-        CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lum->lmm_magic);
-        CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lum->lmm_pattern);
-        CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lum->lmm_object_id);
-        CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lum->lmm_object_gr);
-        CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lum->lmm_stripe_size);
-        CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lum->lmm_stripe_count);
-        CDEBUG(D_OTHER, "\tlmm_stripe_offset: %#x\n", lum->lmm_stripe_offset);
-}
-
-void lustre_swab_lov_user_md(struct lov_user_md *lum)
-{
-        ENTRY;
-        CDEBUG(D_IOCTL, "swabbing lov_user_md\n");
-        __swab32s(&lum->lmm_magic);
-        __swab32s(&lum->lmm_pattern);
-        __swab64s(&lum->lmm_object_id);
-        __swab64s(&lum->lmm_object_gr);
-        __swab32s(&lum->lmm_stripe_size);
-        __swab16s(&lum->lmm_stripe_count);
-        __swab16s(&lum->lmm_stripe_offset);
-        print_lum(lum);
-        EXIT;
-}
-
-static void print_lumj (struct lov_user_md_join *lumj)
-{
-        CDEBUG(D_OTHER, "lov_user_md %p:\n", lumj);
-        CDEBUG(D_OTHER, "\tlmm_magic: %#x\n", lumj->lmm_magic);
-        CDEBUG(D_OTHER, "\tlmm_pattern: %#x\n", lumj->lmm_pattern);
-        CDEBUG(D_OTHER, "\tlmm_object_id: "LPU64"\n", lumj->lmm_object_id);
-        CDEBUG(D_OTHER, "\tlmm_object_gr: "LPU64"\n", lumj->lmm_object_gr);
-        CDEBUG(D_OTHER, "\tlmm_stripe_size: %#x\n", lumj->lmm_stripe_size);
-        CDEBUG(D_OTHER, "\tlmm_stripe_count: %#x\n", lumj->lmm_stripe_count);
-        CDEBUG(D_OTHER, "\tlmm_extent_count: %#x\n", lumj->lmm_extent_count);
-}
-
-void lustre_swab_lov_user_md_join(struct lov_user_md_join *lumj)
-{
-        ENTRY;
-        CDEBUG(D_IOCTL, "swabbing lov_user_md_join\n");
-        __swab32s(&lumj->lmm_magic);
-        __swab32s(&lumj->lmm_pattern);
-        __swab64s(&lumj->lmm_object_id);
-        __swab64s(&lumj->lmm_object_gr);
-        __swab32s(&lumj->lmm_stripe_size);
-        __swab32s(&lumj->lmm_stripe_count);
-        __swab32s(&lumj->lmm_extent_count);
-        print_lumj(lumj);
-        EXIT;
-}
-
-static void print_lum_objs(struct lov_user_md *lum)
-{
-        struct lov_user_ost_data *lod;
-        int i;
-        ENTRY;
-        if (!(libcfs_debug & D_OTHER)) /* don't loop on nothing */
-                return;
-        CDEBUG(D_OTHER, "lov_user_md_objects: %p\n", lum);
-        for (i = 0; i < lum->lmm_stripe_count; i++) {
-                lod = &lum->lmm_objects[i];
-                CDEBUG(D_OTHER, "(%i) lod->l_object_id: "LPX64"\n", i, lod->l_object_id);
-                CDEBUG(D_OTHER, "(%i) lod->l_object_gr: "LPX64"\n", i, lod->l_object_gr);
-                CDEBUG(D_OTHER, "(%i) lod->l_ost_gen: %#x\n", i, lod->l_ost_gen);
-                CDEBUG(D_OTHER, "(%i) lod->l_ost_idx: %#x\n", i, lod->l_ost_idx);
-        }
-        EXIT;
-}
-
-void lustre_swab_lov_user_md_objects(struct lov_user_md *lum)
-{
-        struct lov_user_ost_data *lod;
-        int i;
-        ENTRY;
-        for (i = 0; i < lum->lmm_stripe_count; i++) {
-                lod = &lum->lmm_objects[i];
-                __swab64s(&lod->l_object_id);
-                __swab64s(&lod->l_object_gr);
-                __swab32s(&lod->l_ost_gen);
-                __swab32s(&lod->l_ost_idx);
-        }
-        print_lum_objs(lum);
-        EXIT;
-}
-
-void lustre_swab_ldlm_res_id (struct ldlm_res_id *id)
-{
-        int  i;
-
-        for (i = 0; i < RES_NAME_SIZE; i++)
-                __swab64s (&id->name[i]);
-}
-
-void lustre_swab_ldlm_policy_data (ldlm_policy_data_t *d)
-{
-        /* the lock data is a union and the first two fields are always an
-         * extent so it's ok to process an LDLM_EXTENT and LDLM_FLOCK lock
-         * data the same way. */
-        __swab64s(&d->l_extent.start);
-        __swab64s(&d->l_extent.end);
-        __swab64s(&d->l_extent.gid);
-        __swab32s(&d->l_flock.pid);
-}
-
-void lustre_swab_ldlm_intent (struct ldlm_intent *i)
-{
-        __swab64s (&i->opc);
-}
-
-void lustre_swab_ldlm_resource_desc (struct ldlm_resource_desc *r)
-{
-        __swab32s (&r->lr_type);
-        CLASSERT(offsetof(typeof(*r), lr_padding) != 0);
-        lustre_swab_ldlm_res_id (&r->lr_name);
-}
-
-void lustre_swab_ldlm_lock_desc (struct ldlm_lock_desc *l)
-{
-        lustre_swab_ldlm_resource_desc (&l->l_resource);
-        __swab32s (&l->l_req_mode);
-        __swab32s (&l->l_granted_mode);
-        lustre_swab_ldlm_policy_data (&l->l_policy_data);
-}
-
-void lustre_swab_ldlm_request (struct ldlm_request *rq)
-{
-        __swab32s (&rq->lock_flags);
-        lustre_swab_ldlm_lock_desc (&rq->lock_desc);
-        __swab32s (&rq->lock_count);
-        /* lock_handle[] opaque */
-}
-
-void lustre_swab_ldlm_reply (struct ldlm_reply *r)
-{
-        __swab32s (&r->lock_flags);
-        CLASSERT(offsetof(typeof(*r), lock_padding) != 0);
-        lustre_swab_ldlm_lock_desc (&r->lock_desc);
-        /* lock_handle opaque */
-        __swab64s (&r->lock_policy_res1);
-        __swab64s (&r->lock_policy_res2);
-}
-
-/* no one calls this */
-int llog_log_swabbed(struct llog_log_hdr *hdr)
-{
-        if (hdr->llh_hdr.lrh_type == __swab32(LLOG_HDR_MAGIC))
-                return 1;
-        if (hdr->llh_hdr.lrh_type == LLOG_HDR_MAGIC)
-                return 0;
-        return -1;
-}
-
-void lustre_swab_qdata(struct qunit_data *d)
-{
-        __swab32s (&d->qd_id);
-        __swab32s (&d->qd_flags);
-        __swab64s (&d->qd_count);
-        __swab64s (&d->qd_qunit);
-}
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-void lustre_swab_qdata_old(struct qunit_data_old *d)
-{
-        __swab32s (&d->qd_id);
-        __swab32s (&d->qd_type);
-        __swab32s (&d->qd_count);
-        __swab32s (&d->qd_isblk);
-}
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-void lustre_swab_qdata_old2(struct qunit_data_old2 *d)
-{
-        __swab32s (&d->qd_id);
-        __swab32s (&d->qd_flags);
-        __swab64s (&d->qd_count);
-}
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#ifdef __KERNEL__
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-void qdata_v1_v3(struct qunit_data_old *d,
-                             struct qunit_data *qdata)
-{
-        LASSERT(d);
-        LASSERT(qdata);
-
-        qdata->qd_id = d->qd_id;
-        if (d->qd_type)
-                QDATA_SET_GRP(qdata);
-        if (d->qd_isblk)
-                QDATA_SET_BLK(qdata);
-        qdata->qd_count = d->qd_count;
-}
-
-struct qunit_data_old *qdata_v3_to_v1(struct qunit_data *d)
-{
-        struct qunit_data tmp;
-        struct qunit_data_old *ret;
-        ENTRY;
-
-        if (!d)
-                return NULL;
-
-        tmp = *d;
-        ret = (struct qunit_data_old *)d;
-        ret->qd_id = tmp.qd_id;
-        ret->qd_type = (QDATA_IS_GRP(&tmp) ? GRPQUOTA : USRQUOTA);
-        ret->qd_count = (__u32)tmp.qd_count;
-        ret->qd_isblk = (QDATA_IS_BLK(&tmp) ? 1 : 0);
-        RETURN(ret);
-}
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-void qdata_v2_to_v3(struct qunit_data_old2 *d,
-                              struct qunit_data *qdata)
-{
-        LASSERT(d);
-        LASSERT(qdata);
-
-        qdata->qd_id = d->qd_id;
-        qdata->qd_flags = d->qd_flags;
-        qdata->qd_count = d->qd_count;
-}
-
-struct qunit_data_old2 *qdata_v3_to_v2(struct qunit_data *d)
-{
-        struct qunit_data tmp;
-        struct qunit_data_old2 *ret;
-        ENTRY;
-
-        if (!d)
-                return NULL;
-
-        tmp = *d;
-        ret = (struct qunit_data_old2 *)d;
-        ret->qd_id = tmp.qd_id;
-        ret->qd_flags = tmp.qd_flags & LQUOTA_QUNIT_FLAGS;
-        ret->qd_count = tmp.qd_count;
-        RETURN(ret);
-}
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-/* got qdata from request(req/rep) */
-int quota_get_qdata(void *request, struct qunit_data *qdata,
-                    int is_req, int is_exp)
-{
-        struct ptlrpc_request *req = (struct ptlrpc_request *)request;
-        struct qunit_data *new;
-        struct qunit_data_old *old;
-        struct qunit_data_old2 *old2;
-        int size  = sizeof(struct qunit_data_old);
-        int size2 = sizeof(struct qunit_data_old2);
-        __u64  flags = is_exp ? req->rq_export->exp_connect_flags :
-                       req->rq_import->imp_connect_data.ocd_connect_flags;
-
-        LASSERT(req);
-        LASSERT(qdata);
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-        if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_QD_COUNT_32BIT))
-                goto quota32;
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-        if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS))
-                goto without_change_qs;
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-        /* support for quota64 and change_qs */
-        if (flags & OBD_CONNECT_CHANGE_QS) {
-                if (!(flags & OBD_CONNECT_QUOTA64)) {
-                        CDEBUG(D_ERROR, "Wire protocol for qunit is broken!\n");
-                        return -EINVAL;
-                }
-                if (is_req == QUOTA_REQUEST)
-                        new = lustre_swab_reqbuf(req, REQ_REC_OFF,
-                                                 sizeof(struct qunit_data),
-                                                 lustre_swab_qdata);
-                else
-                        new = lustre_swab_repbuf(req, REPLY_REC_OFF,
-                                                 sizeof(struct qunit_data),
-                                                 lustre_swab_qdata);
-                *qdata = *new;
-                QDATA_SET_CHANGE_QS(qdata);
-                return 0;
-        } else {
-                QDATA_CLR_CHANGE_QS(qdata);
-        }
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-without_change_qs:
-        /* only support for quota64 */
-        if (flags & OBD_CONNECT_QUOTA64) {
-
-                if (is_req == QUOTA_REQUEST)
-                        old2 = lustre_swab_reqbuf(req, REQ_REC_OFF, size2,
-                                                  lustre_swab_qdata_old2);
-                else
-                        old2 = lustre_swab_repbuf(req, REPLY_REC_OFF, size2,
-                                                  lustre_swab_qdata_old2);
-                qdata_v2_to_v3(old2, qdata);
-
-                return 0;
-        }
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-quota32:
-        /* not support for quota64 and change_qs */
-        if (is_req == QUOTA_REQUEST)
-                old = lustre_swab_reqbuf(req, REQ_REC_OFF, size,
-                                         lustre_swab_qdata_old);
-        else
-                old = lustre_swab_repbuf(req, REPLY_REC_OFF, size,
-                                         lustre_swab_qdata_old);
-        qdata_v1_v3(old, qdata);
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-        return 0;
-}
-EXPORT_SYMBOL(quota_get_qdata);
-
-/* copy qdata to request(req/rep) */
-int quota_copy_qdata(void *request, struct qunit_data *qdata,
-                     int is_req, int is_exp)
-{
-        struct ptlrpc_request *req = (struct ptlrpc_request *)request;
-        void *target;
-        struct qunit_data_old *old;
-        struct qunit_data_old2 *old2;
-        __u64  flags = is_exp ? req->rq_export->exp_connect_flags :
-                req->rq_import->imp_connect_data.ocd_connect_flags;
-
-        LASSERT(req);
-        LASSERT(qdata);
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-        if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_QD_COUNT_32BIT))
-                goto quota32;
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-        if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS))
-                goto without_change_qs;
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-        /* support for quota64 and change_qs */
-        if (flags & OBD_CONNECT_CHANGE_QS) {
-                if (!(flags & OBD_CONNECT_QUOTA64)) {
-                        CERROR("Wire protocol for qunit is broken!\n");
-                        return -EINVAL;
-                }
-                if (is_req == QUOTA_REQUEST)
-                        target = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                                sizeof(struct qunit_data));
-                else
-                        target = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                                sizeof(struct qunit_data));
-                if (!target)
-                        return -EINVAL;
-                memcpy(target, qdata, sizeof(*qdata));
-                return 0;
-        }
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-without_change_qs:
-        /* only support for quota64 */
-        if (flags & OBD_CONNECT_QUOTA64) {
-                if (is_req == QUOTA_REQUEST)
-                        target = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                                sizeof(struct qunit_data_old2));
-                else
-                        target = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                                sizeof(struct qunit_data_old2));
-                if (!target)
-                        return -EINVAL;
-                old2 = qdata_v3_to_v2(qdata);
-                memcpy(target, old2, sizeof(*old2));
-                return 0;
-        }
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-quota32:
-        /* not support for quota64 and change_qs */
-        if (is_req == QUOTA_REQUEST)
-                target = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF,
-                                        sizeof(struct qunit_data_old));
-        else
-                target = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF,
-                                        sizeof(struct qunit_data_old));
-        if (!target)
-                return -EINVAL;
-        old = qdata_v3_to_v1(qdata);
-        memcpy(target, old, sizeof(*old));
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-
-        return 0;
-}
-EXPORT_SYMBOL(quota_copy_qdata);
-
-int quota_get_qunit_data_size(__u64 flag)
-{
-        int size;
-
-        if (flag & OBD_CONNECT_CHANGE_QS) {
-                size = sizeof(struct qunit_data);
-        } else {
-                /* write in this way because sizes of qunit_data_old and
-                 * qunit_data_old2 are same */
-                LASSERT(sizeof(struct qunit_data_old) ==
-                        sizeof(struct qunit_data_old2));
-                size = sizeof(struct qunit_data_old);
-        }
-
-        return(size);
-}
-EXPORT_SYMBOL(quota_get_qunit_data_size);
-#endif /* __KERNEL__ */
-
-static inline int req_ptlrpc_body_swabbed(struct ptlrpc_request *req)
-{
-        LASSERT(req->rq_reqmsg);
-
-        switch (req->rq_reqmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 1;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return lustre_req_swabbed(req, MSG_PTLRPC_BODY_OFF);
-        default:
-                CERROR("bad lustre msg magic: %#08X\n",
-                       req->rq_reqmsg->lm_magic);
-        }
-        return 0;
-}
-
-static inline int rep_ptlrpc_body_swabbed(struct ptlrpc_request *req)
-{
-        LASSERT(req->rq_repmsg);
-
-        switch (req->rq_repmsg->lm_magic) {
-        case LUSTRE_MSG_MAGIC_V1:
-        case LUSTRE_MSG_MAGIC_V1_SWABBED:
-                return 1;
-        case LUSTRE_MSG_MAGIC_V2:
-        case LUSTRE_MSG_MAGIC_V2_SWABBED:
-                return lustre_rep_swabbed(req, MSG_PTLRPC_BODY_OFF);
-        default:
-                /* uninitialized yet */
-                return 0;
-        }
-}
-
-void _debug_req(struct ptlrpc_request *req, __u32 mask,
-                struct libcfs_debug_msg_data *data, const char *fmt, ... )
-
-{
-        va_list args;
-
-        va_start(args, fmt);
-        libcfs_debug_vmsg2(data->msg_cdls, data->msg_subsys, mask, data->msg_file,
-                           data->msg_fn, data->msg_line, fmt, args,
-                           " req@%p x"LPD64"/t"LPD64" o%d->%s@%s:%d/%d "
-                           "lens %d/%d e %d to %d dl %ld ref %d "
-                           "fl "REQ_FLAGS_FMT"/%x/%x rc %d/%d\n",
-                           req, req->rq_xid, req->rq_transno,
-                           req->rq_reqmsg ? lustre_msg_get_opc(req->rq_reqmsg) : -1,
-                           req->rq_import ? obd2cli_tgt(req->rq_import->imp_obd) :
-                           req->rq_export ?
-                                (char*)req->rq_export->exp_client_uuid.uuid : "<?>",
-                           req->rq_import ?
-                                (char *)req->rq_import->imp_connection->c_remote_uuid.uuid :
-                           req->rq_export ?
-                                (char *)req->rq_export->exp_connection->c_remote_uuid.uuid : "<?>",
-                           req->rq_request_portal,  req->rq_reply_portal,
-                           req->rq_reqlen, req->rq_replen,
-                           req->rq_early_count, req->rq_timeout, req->rq_deadline,
-                           atomic_read(&req->rq_refcount), DEBUG_REQ_FLAGS(req),
-                           req->rq_reqmsg ? lustre_msg_get_flags(req->rq_reqmsg) : 0,
-                           req->rq_repmsg ? lustre_msg_get_flags(req->rq_repmsg) : 0,
-                           req->rq_status,
-                           req->rq_repmsg ? lustre_msg_get_status(req->rq_repmsg) : 0);
-        va_end(args);
-}
-
-EXPORT_SYMBOL(_debug_req);
diff --git a/lustre/ptlrpc/pers.c b/lustre/ptlrpc/pers.c
deleted file mode 100644
index 865dcf001ca0ba353e38f476fbdd282c5da1e234..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/pers.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2004 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-#include <errno.h>
-#include <signal.h>
-#include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_lib.h>
-#include <lustre_ha.h>
-#include <lustre_import.h>
-
-#include "ptlrpc_internal.h"
-
-#ifdef __KERNEL__
-
-void ptlrpc_fill_bulk_md (lnet_md_t *md, struct ptlrpc_bulk_desc *desc)
-{
-        LASSERT (desc->bd_iov_count <= PTLRPC_MAX_BRW_PAGES);
-        LASSERT (!(md->options & (LNET_MD_IOVEC | LNET_MD_KIOV | LNET_MD_PHYS)));
-
-        md->options |= LNET_MD_KIOV;
-        md->start = &desc->bd_iov[0];
-        md->length = desc->bd_iov_count;
-}
-
-void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page,
-                          int pageoffset, int len)
-{
-        lnet_kiov_t *kiov = &desc->bd_iov[desc->bd_iov_count];
-
-        kiov->kiov_page = page;
-        kiov->kiov_offset = pageoffset;
-        kiov->kiov_len = len;
-
-        desc->bd_iov_count++;
-}
-
-void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc)
-{
-        int i;
-        
-        for (i = 0; i < desc->bd_iov_count ; i++) {
-                lnet_kiov_t *kiov = &desc->bd_iov[i];
-                memset(cfs_kmap(kiov->kiov_page)+kiov->kiov_offset, 0xab,
-                       kiov->kiov_len);
-                cfs_kunmap(kiov->kiov_page);
-        }
-}
-
-#else /* !__KERNEL__ */
-
-void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc)
-{
-        LASSERT (!(md->options & (LNET_MD_IOVEC | LNET_MD_KIOV | LNET_MD_PHYS)));
-        if (desc->bd_iov_count == 1) {
-                md->start = desc->bd_iov[0].iov_base;
-                md->length = desc->bd_iov[0].iov_len;
-                return;
-        }
-        
-        md->options |= LNET_MD_IOVEC;
-        md->start = &desc->bd_iov[0];
-        md->length = desc->bd_iov_count;
-}
-
-static int can_merge_iovs(lnet_md_iovec_t *existing, lnet_md_iovec_t *candidate)
-{
-        if (existing->iov_base + existing->iov_len == candidate->iov_base) 
-                return 1;
-#if 0
-        /* Enable this section to provide earlier evidence of fragmented bulk */
-        CERROR("Can't merge iovs %p for %x, %p for %x\n",
-               existing->iov_base, existing->iov_len,
-               candidate->iov_base, candidate->iov_len);
-#endif
-        return 0;
-}
-
-void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page, 
-                          int pageoffset, int len)
-{
-        lnet_md_iovec_t *iov = &desc->bd_iov[desc->bd_iov_count];
-
-        iov->iov_base = page->addr + pageoffset;
-        iov->iov_len = len;
-
-        if (desc->bd_iov_count > 0 && can_merge_iovs(iov - 1, iov)) {
-                (iov - 1)->iov_len += len;
-        } else {
-                desc->bd_iov_count++;
-        }
-}
-
-void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc)
-{
-        int i;
-
-        for(i = 0; i < desc->bd_iov_count; i++) {
-                lnet_md_iovec_t *iov = &desc->bd_iov[i];
-
-                memset(iov->iov_base, 0xab, iov->iov_len);
-        }
-}
-#endif /* !__KERNEL__ */
diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c
deleted file mode 100644
index 59ccff3ba27d95438e0f8b40dbbc350d6010299e..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/pinger.c
+++ /dev/null
@@ -1,702 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Portal-RPC reconnection and replay operations, for use in recovery.
- *
- *  Copyright (c) 2003 Cluster File Systems, Inc.
- *   Authors: Phil Schwan <phil@clusterfs.com>
- *            Mike Shaver <shaver@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#else
-#define DEBUG_SUBSYSTEM S_RPC
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include "ptlrpc_internal.h"
-
-struct semaphore pinger_sem;
-static struct list_head pinger_imports = CFS_LIST_HEAD_INIT(pinger_imports);
-
-int ptlrpc_ping(struct obd_import *imp)
-{
-        struct ptlrpc_request *req;
-        int rc = 0;
-        ENTRY;
-
-        req = ptlrpc_prep_req(imp, LUSTRE_OBD_VERSION, OBD_PING, 
-                              1, NULL, NULL);
-        if (req) {
-                DEBUG_REQ(D_INFO, req, "pinging %s->%s",
-                          imp->imp_obd->obd_uuid.uuid,
-                          obd2cli_tgt(imp->imp_obd));
-                req->rq_no_resend = req->rq_no_delay = 1;
-                ptlrpc_req_set_repsize(req, 1, NULL);
-                ptlrpcd_add_req(req);
-        } else {
-                CERROR("OOM trying to ping %s->%s\n",
-                       imp->imp_obd->obd_uuid.uuid,
-                       obd2cli_tgt(imp->imp_obd));
-                rc = -ENOMEM;
-        }
-
-        RETURN(rc);
-}
-
-void ptlrpc_update_next_ping(struct obd_import *imp)
-{
-#ifdef ENABLE_PINGER
-        int time = PING_INTERVAL;
-        if (imp->imp_state == LUSTRE_IMP_DISCON) {
-                int dtime = max_t(int, CONNECTION_SWITCH_MIN,
-                                  AT_OFF ? 0 :
-                                  at_get(&imp->imp_at.iat_net_latency));
-                time = min(time, dtime);
-        }
-        imp->imp_next_ping = cfs_time_shift(time);
-#endif /* ENABLE_PINGER */
-}
-
-void ptlrpc_ping_import_soon(struct obd_import *imp)
-{
-        imp->imp_next_ping = cfs_time_current();
-}
-
-#ifdef __KERNEL__
-static int ptlrpc_pinger_main(void *arg)
-{
-        struct ptlrpc_svc_data *data = (struct ptlrpc_svc_data *)arg;
-        struct ptlrpc_thread *thread = data->thread;
-        ENTRY;
-
-        cfs_daemonize(data->name);
-
-        /* Record that the thread is running */
-        thread->t_flags = SVC_RUNNING;
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-
-        /* And now, loop forever, pinging as needed. */
-        while (1) {
-                cfs_time_t this_ping = cfs_time_current();
-                struct l_wait_info lwi;
-                cfs_duration_t time_to_next_ping;
-                struct list_head *iter;
-
-                mutex_down(&pinger_sem);
-                list_for_each(iter, &pinger_imports) {
-                        struct obd_import *imp =
-                                list_entry(iter, struct obd_import,
-                                           imp_pinger_chain);
-                        int force, level;
-
-                        spin_lock(&imp->imp_lock);
-                        level = imp->imp_state;
-                        force = imp->imp_force_verify;
-                        imp->imp_force_verify = 0;
-                        spin_unlock(&imp->imp_lock);
-
-                        CDEBUG(level == LUSTRE_IMP_FULL ? D_INFO : D_RPCTRACE,
-                               "level %s/%u force %u deactive %u pingable %u\n",
-                               ptlrpc_import_state_name(level), level,
-                               force, imp->imp_deactive, imp->imp_pingable);
-
-                        if (force ||
-                            /* if the next ping is within, say, 5 jiffies from
-                               now, go ahead and ping. See note below. */
-                            cfs_time_aftereq(this_ping, 
-                                             imp->imp_next_ping - 5 * CFS_TICK)) {
-                                if (level == LUSTRE_IMP_DISCON &&
-                                    !imp->imp_deactive) {
-                                        /* wait at least a timeout before
-                                           trying recovery again. */
-                                        imp->imp_next_ping = cfs_time_shift(obd_timeout);
-                                        ptlrpc_initiate_recovery(imp);
-                                } else if (level != LUSTRE_IMP_FULL ||
-                                         imp->imp_obd->obd_no_recov ||
-                                         imp->imp_deactive) {
-                                        CDEBUG(D_HA, "not pinging %s "
-                                               "(in recovery: %s or recovery "
-                                               "disabled: %u/%u)\n",
-                                               obd2cli_tgt(imp->imp_obd),
-                                               ptlrpc_import_state_name(level),
-                                               imp->imp_deactive,
-                                               imp->imp_obd->obd_no_recov);
-                                } else if (imp->imp_pingable || force) {
-                                        ptlrpc_ping(imp);
-                                }
-                        } else {
-                                if (!imp->imp_pingable)
-                                        continue;
-                                CDEBUG(D_INFO,
-                                       "don't need to ping %s ("CFS_TIME_T
-                                       " > "CFS_TIME_T")\n",
-                                       obd2cli_tgt(imp->imp_obd),
-                                       imp->imp_next_ping, this_ping);
-                        }
-
-                        /* obd_timeout might have changed */
-                        if (cfs_time_after(imp->imp_next_ping,
-                                           cfs_time_add(this_ping, 
-                                                        cfs_time_seconds(PING_INTERVAL))))
-                                ptlrpc_update_next_ping(imp);
-                }
-                mutex_up(&pinger_sem);
-                /* update memory usage info */
-                obd_update_maxusage();
-
-                /* Wait until the next ping time, or until we're stopped. */
-                time_to_next_ping = cfs_time_sub(cfs_time_add(this_ping, 
-                                                              cfs_time_seconds(PING_INTERVAL)), 
-                                                 cfs_time_current());
-
-                /* The ping sent by ptlrpc_send_rpc may get sent out
-                   say .01 second after this.
-                   ptlrpc_pinger_eending_on_import will then set the
-                   next ping time to next_ping + .01 sec, which means
-                   we will SKIP the next ping at next_ping, and the
-                   ping will get sent 2 timeouts from now!  Beware. */
-                CDEBUG(D_INFO, "next ping in "CFS_DURATION_T" ("CFS_TIME_T")\n", 
-                               time_to_next_ping, 
-                               cfs_time_add(this_ping, cfs_time_seconds(PING_INTERVAL)));
-                if (time_to_next_ping > 0) {
-                        lwi = LWI_TIMEOUT(max_t(cfs_duration_t, time_to_next_ping, cfs_time_seconds(1)),
-                                          NULL, NULL);
-                        l_wait_event(thread->t_ctl_waitq,
-                                     thread->t_flags & (SVC_STOPPING|SVC_EVENT),
-                                     &lwi);
-                        if (thread->t_flags & SVC_STOPPING) {
-                                thread->t_flags &= ~SVC_STOPPING;
-                                EXIT;
-                                break;
-                        } else if (thread->t_flags & SVC_EVENT) {
-                                /* woken after adding import to reset timer */
-                                thread->t_flags &= ~SVC_EVENT;
-                        }
-                }
-        }
-
-        thread->t_flags = SVC_STOPPED;
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-
-        CDEBUG(D_NET, "pinger thread exiting, process %d\n", cfs_curproc_pid());
-        return 0;
-}
-
-static struct ptlrpc_thread *pinger_thread = NULL;
-
-int ptlrpc_start_pinger(void)
-{
-        struct l_wait_info lwi = { 0 };
-        struct ptlrpc_svc_data d;
-        int rc;
-#ifndef ENABLE_PINGER
-        return 0;
-#endif
-        ENTRY;
-
-        if (pinger_thread != NULL)
-                RETURN(-EALREADY);
-
-        OBD_ALLOC(pinger_thread, sizeof(*pinger_thread));
-        if (pinger_thread == NULL)
-                RETURN(-ENOMEM);
-        cfs_waitq_init(&pinger_thread->t_ctl_waitq);
-
-        d.name = "ll_ping";
-        d.thread = pinger_thread;
-
-        /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
-         * just drop the VM and FILES in ptlrpc_daemonize() right away. */
-        rc = cfs_kernel_thread(ptlrpc_pinger_main, &d, CLONE_VM | CLONE_FILES);
-        if (rc < 0) {
-                CERROR("cannot start thread: %d\n", rc);
-                OBD_FREE(pinger_thread, sizeof(*pinger_thread));
-                pinger_thread = NULL;
-                RETURN(rc);
-        }
-        l_wait_event(pinger_thread->t_ctl_waitq,
-                     pinger_thread->t_flags & SVC_RUNNING, &lwi);
-
-        RETURN(0);
-}
-
-int ptlrpc_stop_pinger(void)
-{
-        struct l_wait_info lwi = { 0 };
-        int rc = 0;
-#ifndef ENABLE_PINGER
-        return 0;
-#endif
-        ENTRY;
-
-        if (pinger_thread == NULL)
-                RETURN(-EALREADY);
-        mutex_down(&pinger_sem);
-        pinger_thread->t_flags = SVC_STOPPING;
-        cfs_waitq_signal(&pinger_thread->t_ctl_waitq);
-        mutex_up(&pinger_sem);
-
-        l_wait_event(pinger_thread->t_ctl_waitq,
-                     (pinger_thread->t_flags & SVC_STOPPED), &lwi);
-
-        OBD_FREE(pinger_thread, sizeof(*pinger_thread));
-        pinger_thread = NULL;
-        RETURN(rc);
-}
-
-void ptlrpc_pinger_sending_on_import(struct obd_import *imp)
-{
-        ptlrpc_update_next_ping(imp);
-}
-
-int ptlrpc_pinger_add_import(struct obd_import *imp)
-{
-        ENTRY;
-        if (!list_empty(&imp->imp_pinger_chain))
-                RETURN(-EALREADY);
-
-        mutex_down(&pinger_sem);
-        CDEBUG(D_HA, "adding pingable import %s->%s\n",
-               imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
-        /* if we add to pinger we want recovery on this import */
-        imp->imp_obd->obd_no_recov = 0;
-
-        ptlrpc_update_next_ping(imp);
-        /* XXX sort, blah blah */
-        list_add_tail(&imp->imp_pinger_chain, &pinger_imports);
-        class_import_get(imp);
-
-        ptlrpc_pinger_wake_up();
-        mutex_up(&pinger_sem);
-
-        RETURN(0);
-}
-
-int ptlrpc_pinger_del_import(struct obd_import *imp)
-{
-        ENTRY;
-        if (list_empty(&imp->imp_pinger_chain))
-                RETURN(-ENOENT);
-
-        mutex_down(&pinger_sem);
-        list_del_init(&imp->imp_pinger_chain);
-        CDEBUG(D_HA, "removing pingable import %s->%s\n",
-               imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
-        /* if we remove from pinger we don't want recovery on this import */
-        imp->imp_obd->obd_no_recov = 1;
-        class_import_put(imp);
-        mutex_up(&pinger_sem);
-        RETURN(0);
-}
-
-void ptlrpc_pinger_wake_up()
-{
-#ifdef ENABLE_PINGER
-        pinger_thread->t_flags |= SVC_EVENT;
-        cfs_waitq_signal(&pinger_thread->t_ctl_waitq);
-#endif
-}
-
-/* Ping evictor thread */
-#define PET_READY     1
-#define PET_TERMINATE 2
-
-static int               pet_refcount = 0;
-static int               pet_state;
-static wait_queue_head_t pet_waitq;
-static struct obd_export *pet_exp = NULL;
-static spinlock_t        pet_lock = SPIN_LOCK_UNLOCKED;
-
-int ping_evictor_wake(struct obd_export *exp)
-{
-        spin_lock(&pet_lock);
-        if (pet_exp || (pet_state != PET_READY)) {
-                /* eventually the new obd will call here again. */
-                spin_unlock(&pet_lock);
-                return 1;
-        }
-
-        /* We have to make sure the obd isn't destroyed between now and when
-         * the ping evictor runs.  We'll take a reference here, and drop it
-         * when we finish in the evictor.  We don't really care about this
-         * export in particular; we just need one to keep the obd alive. */
-        pet_exp = class_export_get(exp);
-        spin_unlock(&pet_lock);
-
-        wake_up(&pet_waitq);
-        return 0;
-}
-
-static int ping_evictor_main(void *arg)
-{
-        struct obd_device *obd;
-        struct obd_export *exp;
-        struct l_wait_info lwi = { 0 };
-        time_t expire_time;
-        ENTRY;
-
-        ptlrpc_daemonize("ll_evictor");
-
-        CDEBUG(D_HA, "Starting Ping Evictor\n");
-        pet_exp = NULL;
-        pet_state = PET_READY;
-        while (1) {
-                l_wait_event(pet_waitq, pet_exp ||
-                             (pet_state == PET_TERMINATE), &lwi);
-                if (pet_state == PET_TERMINATE)
-                        break;
-
-                /* we only get here if pet_exp != NULL, and the end of this
-                 * loop is the only place which sets it NULL again, so lock
-                 * is not strictly necessary. */
-                spin_lock(&pet_lock);
-                obd = pet_exp->exp_obd;
-                spin_unlock(&pet_lock);
-
-                expire_time = cfs_time_current_sec() - PING_EVICT_TIMEOUT;
-
-                CDEBUG(D_HA, "evicting all exports of obd %s older than %ld\n",
-                       obd->obd_name, expire_time);
-
-                /* Exports can't be deleted out of the list while we hold
-                 * the obd lock (class_unlink_export), which means we can't
-                 * lose the last ref on the export.  If they've already been
-                 * removed from the list, we won't find them here. */
-                spin_lock(&obd->obd_dev_lock);
-                while (!list_empty(&obd->obd_exports_timed)) {
-                        exp = list_entry(obd->obd_exports_timed.next,
-                                         struct obd_export,exp_obd_chain_timed);
-                        if (expire_time > exp->exp_last_request_time) {
-                                class_export_get(exp);
-                                spin_unlock(&obd->obd_dev_lock);
-                                LCONSOLE_WARN("%s: haven't heard from client %s"
-                                              " (at %s) in %ld seconds. I think"
-                                              " it's dead, and I am evicting"
-                                              " it.\n", obd->obd_name,
-                                              obd_uuid2str(&exp->exp_client_uuid),
-                                              obd_export_nid2str(exp),
-                                              (long)(cfs_time_current_sec() -
-                                                     exp->exp_last_request_time));
-                                CDEBUG(D_HA, "Last request was at %ld\n",
-                                       exp->exp_last_request_time);
-                                class_fail_export(exp);
-                                class_export_put(exp);
-                                spin_lock(&obd->obd_dev_lock);
-                        } else {
-                                /* List is sorted, so everyone below is ok */
-                                break;
-                        }
-                }
-                spin_unlock(&obd->obd_dev_lock);
-
-                class_export_put(pet_exp);
-
-                spin_lock(&pet_lock);
-                pet_exp = NULL;
-                spin_unlock(&pet_lock);
-        }
-        CDEBUG(D_HA, "Exiting Ping Evictor\n");
-
-        RETURN(0);
-}
-
-void ping_evictor_start(void)
-{
-        int rc;
-
-        if (++pet_refcount > 1)
-                return;
-
-        init_waitqueue_head(&pet_waitq);
-
-        rc = cfs_kernel_thread(ping_evictor_main, NULL, CLONE_VM | CLONE_FILES);
-        if (rc < 0) {
-                pet_refcount--;
-                CERROR("Cannot start ping evictor thread: %d\n", rc);
-        }
-}
-EXPORT_SYMBOL(ping_evictor_start);
-
-void ping_evictor_stop(void)
-{
-        if (--pet_refcount > 0)
-                return;
-
-        pet_state = PET_TERMINATE;
-        wake_up(&pet_waitq);
-}
-EXPORT_SYMBOL(ping_evictor_stop);
-#else /* !__KERNEL__ */
-
-/* XXX
- * the current implementation of pinger in liblustre is not optimized
- */
-
-#ifdef ENABLE_PINGER
-static struct pinger_data {
-        int             pd_recursion;
-        cfs_time_t      pd_this_ping;   /* jiffies */
-        cfs_time_t      pd_next_ping;   /* jiffies */
-        struct ptlrpc_request_set *pd_set;
-} pinger_args;
-
-static int pinger_check_rpcs(void *arg)
-{
-        cfs_time_t curtime = cfs_time_current();
-        struct ptlrpc_request *req;
-        struct ptlrpc_request_set *set;
-        struct list_head *iter;
-        struct pinger_data *pd = &pinger_args;
-        int rc;
-
-        /* prevent recursion */
-        if (pd->pd_recursion++) {
-                CDEBUG(D_HA, "pinger: recursion! quit\n");
-                LASSERT(pd->pd_set);
-                pd->pd_recursion--;
-                return 0;
-        }
-
-        /* have we reached ping point? */
-        if (!pd->pd_set && time_before(curtime, pd->pd_next_ping)) {
-                pd->pd_recursion--;
-                return 0;
-        }
-
-        /* if we have rpc_set already, continue processing it */
-        if (pd->pd_set) {
-                LASSERT(pd->pd_this_ping);
-                set = pd->pd_set;
-                goto do_check_set;
-        }
-
-        pd->pd_this_ping = curtime;
-        pd->pd_set = ptlrpc_prep_set();
-        if (pd->pd_set == NULL)
-                goto out;
-        set = pd->pd_set;
-
-        /* add rpcs into set */
-        mutex_down(&pinger_sem);
-        list_for_each(iter, &pinger_imports) {
-                struct obd_import *imp =
-                        list_entry(iter, struct obd_import, imp_pinger_chain);
-                int generation, level;
-
-                if (cfs_time_aftereq(pd->pd_this_ping, 
-                                     imp->imp_next_ping - 5 * CFS_TICK)) {
-                        /* Add a ping. */
-                        spin_lock(&imp->imp_lock);
-                        generation = imp->imp_generation;
-                        level = imp->imp_state;
-                        spin_unlock(&imp->imp_lock);
-
-                        if (level != LUSTRE_IMP_FULL) {
-                                CDEBUG(D_HA,
-                                       "not pinging %s (in recovery)\n",
-                                       obd2cli_tgt(imp->imp_obd));
-                                continue;
-                        }
-
-                        req = ptlrpc_prep_req(imp, LUSTRE_OBD_VERSION, OBD_PING,
-                                              1, NULL, NULL);
-                        if (!req) {
-                                CERROR("out of memory\n");
-                                break;
-                        }
-                        req->rq_no_resend = 1;
-                        ptlrpc_req_set_repsize(req, 1, NULL);
-                        req->rq_send_state = LUSTRE_IMP_FULL;
-                        req->rq_phase = RQ_PHASE_RPC;
-                        req->rq_import_generation = generation;
-                        ptlrpc_set_add_req(set, req);
-                } else {
-                        CDEBUG(D_INFO, "don't need to ping %s ("CFS_TIME_T
-                               " > "CFS_TIME_T")\n", obd2cli_tgt(imp->imp_obd),
-                               imp->imp_next_ping, pd->pd_this_ping);
-                }
-        }
-        pd->pd_this_ping = curtime;
-        mutex_up(&pinger_sem);
-
-        /* Might be empty, that's OK. */
-        if (set->set_remaining == 0)
-                CDEBUG(D_RPCTRACE, "nothing to ping\n");
-
-        list_for_each(iter, &set->set_requests) {
-                struct ptlrpc_request *req =
-                        list_entry(iter, struct ptlrpc_request,
-                                   rq_set_chain);
-                DEBUG_REQ(D_RPCTRACE, req, "pinging %s->%s",
-                          req->rq_import->imp_obd->obd_uuid.uuid,
-                          obd2cli_tgt(req->rq_import->imp_obd));
-                (void)ptl_send_rpc(req, 0);
-        }
-
-do_check_set:
-        rc = ptlrpc_check_set(set);
-
-        /* not finished, and we are not expired, simply return */
-        if (!rc && cfs_time_before(curtime, cfs_time_add(pd->pd_this_ping,
-                                            cfs_time_seconds(PING_INTERVAL)))) {
-                CDEBUG(D_RPCTRACE, "not finished, but also not expired\n");
-                pd->pd_recursion--;
-                return 0;
-        }
-
-        /* Expire all the requests that didn't come back. */
-        mutex_down(&pinger_sem);
-        list_for_each(iter, &set->set_requests) {
-                req = list_entry(iter, struct ptlrpc_request,
-                                 rq_set_chain);
-
-                if (req->rq_phase == RQ_PHASE_COMPLETE)
-                        continue;
-
-                req->rq_phase = RQ_PHASE_COMPLETE;
-                atomic_dec(&req->rq_import->imp_inflight);
-                set->set_remaining--;
-                /* If it was disconnected, don't sweat it. */
-                if (list_empty(&req->rq_import->imp_pinger_chain)) {
-                        ptlrpc_unregister_reply(req);
-                        continue;
-                }
-
-                CDEBUG(D_RPCTRACE, "pinger initiate expire_one_request\n");
-                ptlrpc_expire_one_request(req);
-        }
-        mutex_up(&pinger_sem);
-
-        ptlrpc_set_destroy(set);
-        pd->pd_set = NULL;
-
-out:
-        pd->pd_next_ping = cfs_time_add(pd->pd_this_ping,
-                                        cfs_time_seconds(PING_INTERVAL));
-        pd->pd_this_ping = 0; /* XXX for debug */
-
-        CDEBUG(D_INFO, "finished a round ping\n");
-        pd->pd_recursion--;
-        return 0;
-}
-
-static void *pinger_callback = NULL;
-#endif /* ENABLE_PINGER */
-
-int ptlrpc_start_pinger(void)
-{
-#ifdef ENABLE_PINGER
-        memset(&pinger_args, 0, sizeof(pinger_args));
-        pinger_callback = liblustre_register_wait_callback("pinger_check_rpcs",
-                                                           &pinger_check_rpcs,
-                                                           &pinger_args);
-#endif
-        return 0;
-}
-
-int ptlrpc_stop_pinger(void)
-{
-#ifdef ENABLE_PINGER
-        if (pinger_callback)
-                liblustre_deregister_wait_callback(pinger_callback);
-#endif
-        return 0;
-}
-
-void ptlrpc_pinger_sending_on_import(struct obd_import *imp)
-{
-#ifdef ENABLE_PINGER
-        mutex_down(&pinger_sem);
-        ptlrpc_update_next_ping(imp);
-        if (pinger_args.pd_set == NULL &&
-            time_before(imp->imp_next_ping, pinger_args.pd_next_ping)) {
-                CDEBUG(D_HA, "set next ping to "CFS_TIME_T"(cur "CFS_TIME_T")\n",
-                        imp->imp_next_ping, cfs_time_current());
-                pinger_args.pd_next_ping = imp->imp_next_ping;
-        }
-        mutex_up(&pinger_sem);
-#endif
-}
-
-int ptlrpc_pinger_add_import(struct obd_import *imp)
-{
-        ENTRY;
-        if (!list_empty(&imp->imp_pinger_chain))
-                RETURN(-EALREADY);
-
-        CDEBUG(D_HA, "adding pingable import %s->%s\n",
-               imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
-        ptlrpc_pinger_sending_on_import(imp);
-
-        mutex_down(&pinger_sem);
-        list_add_tail(&imp->imp_pinger_chain, &pinger_imports);
-        class_import_get(imp);
-        mutex_up(&pinger_sem);
-
-        RETURN(0);
-}
-
-int ptlrpc_pinger_del_import(struct obd_import *imp)
-{
-        ENTRY;
-        if (list_empty(&imp->imp_pinger_chain))
-                RETURN(-ENOENT);
-
-        mutex_down(&pinger_sem);
-        list_del_init(&imp->imp_pinger_chain);
-        CDEBUG(D_HA, "removing pingable import %s->%s\n",
-               imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
-        class_import_put(imp);
-        mutex_up(&pinger_sem);
-        RETURN(0);
-}
-
-void ptlrpc_pinger_wake_up()
-{
-#ifdef ENABLE_PINGER
-        ENTRY;
-        /* XXX force pinger to run, if needed */
-        struct obd_import *imp;
-        list_for_each_entry(imp, &pinger_imports, imp_pinger_chain) {
-                CDEBUG(D_RPCTRACE, "checking import %s->%s\n",
-                       imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd));
-#ifdef ENABLE_LIBLUSTRE_RECOVERY
-                if (imp->imp_state == LUSTRE_IMP_DISCON && !imp->imp_deactive)
-#else
-                /*XXX only recover for the initial connection */
-                if (!lustre_handle_is_used(&imp->imp_remote_handle) &&
-                    imp->imp_state == LUSTRE_IMP_DISCON && !imp->imp_deactive)
-#endif
-                        ptlrpc_initiate_recovery(imp);
-                else if (imp->imp_state != LUSTRE_IMP_FULL)
-                        CDEBUG(D_HA, "Refused to recover import %s->%s "
-                                     "state %d, deactive %d\n",
-                                     imp->imp_obd->obd_uuid.uuid,
-                                     obd2cli_tgt(imp->imp_obd), imp->imp_state,
-                                     imp->imp_deactive);
-        }
-#endif
-        EXIT;
-}
-#endif /* !__KERNEL__ */
diff --git a/lustre/ptlrpc/ptlrpc_internal.h b/lustre/ptlrpc/ptlrpc_internal.h
deleted file mode 100644
index 4dd83e56d6a492c36169119a522154507556c59c..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/ptlrpc_internal.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-/* Intramodule declarations for ptlrpc. */
-
-#ifndef PTLRPC_INTERNAL_H
-#define PTLRPC_INTERNAL_H
-
-#include "../ldlm/ldlm_internal.h"
-
-struct ldlm_namespace;
-struct obd_import;
-struct ldlm_res_id;
-struct ptlrpc_request_set;
-extern int test_req_buffer_pressure;
-extern cfs_mem_cache_t *ptlrpc_cbdata_slab;
-
-void ptlrpc_request_handle_notconn(struct ptlrpc_request *);
-void lustre_assert_wire_constants(void);
-int ptlrpc_import_in_recovery(struct obd_import *imp);
-int ptlrpc_set_import_discon(struct obd_import *imp, __u32 conn_cnt);
-void ptlrpc_handle_failed_import(struct obd_import *imp);
-int ptlrpc_replay_next(struct obd_import *imp, int *inflight);
-void ptlrpc_initiate_recovery(struct obd_import *imp);
-
-int lustre_unpack_req_ptlrpc_body(struct ptlrpc_request *req, int offset);
-int lustre_unpack_rep_ptlrpc_body(struct ptlrpc_request *req, int offset);
-
-#ifdef LPROCFS
-void ptlrpc_lprocfs_register_service(struct proc_dir_entry *proc_entry,
-                                     struct ptlrpc_service *svc);
-void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc);
-void ptlrpc_lprocfs_rpc_sent(struct ptlrpc_request *req);
-void ptlrpc_lprocfs_do_request_stat (struct ptlrpc_request *req,
-                                     long q_usec, long work_usec);
-#else
-#define ptlrpc_lprocfs_register_service(params...) do{}while(0)
-#define ptlrpc_lprocfs_unregister_service(params...) do{}while(0)
-#define ptlrpc_lprocfs_rpc_sent(params...) do{}while(0)
-#define ptlrpc_lprocfs_do_request_stat(params...) do{}while(0)
-#endif /* LPROCFS */
-
-/* recovd_thread.c */
-int ptlrpc_expire_one_request(struct ptlrpc_request *req);
-
-/* pers.c */
-void ptlrpc_fill_bulk_md(lnet_md_t *md, struct ptlrpc_bulk_desc *desc);
-void ptlrpc_add_bulk_page(struct ptlrpc_bulk_desc *desc, cfs_page_t *page,
-                          int pageoffset, int len);
-void ptl_rpc_wipe_bulk_pages(struct ptlrpc_bulk_desc *desc);
-
-/* pinger.c */
-int ptlrpc_start_pinger(void);
-int ptlrpc_stop_pinger(void);
-void ptlrpc_pinger_sending_on_import(struct obd_import *imp);
-void ptlrpc_pinger_wake_up(void);
-void ptlrpc_ping_import_soon(struct obd_import *imp);
-#ifdef __KERNEL__
-int ping_evictor_wake(struct obd_export *exp);
-#else
-#define ping_evictor_wake(exp)     1
-#endif
-
-static inline int ll_rpc_recoverable_error(int rc)
-{ 
-        return (rc == -ENOTCONN || rc == -ENODEV);
-}
-#endif /* PTLRPC_INTERNAL_H */
diff --git a/lustre/ptlrpc/ptlrpc_module.c b/lustre/ptlrpc/ptlrpc_module.c
deleted file mode 100644
index 4f0e2a2a3ad4f8a0682a680d72358bf6e33e4a90..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/ptlrpc_module.c
+++ /dev/null
@@ -1,313 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_RPC
-
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-
-#include "ptlrpc_internal.h"
-cfs_mem_cache_t *ptlrpc_cbdata_slab;
-extern spinlock_t ptlrpc_last_xid_lock;
-extern spinlock_t ptlrpc_rs_debug_lock;
-extern spinlock_t ptlrpc_all_services_lock;
-extern struct semaphore pinger_sem;
-extern struct semaphore ptlrpcd_sem;
-extern int ptlrpc_init_portals(void);
-extern void ptlrpc_exit_portals(void);
-
-__init int ptlrpc_init(void)
-{
-        int rc, cleanup_phase = 0;
-        ENTRY;
-
-        lustre_assert_wire_constants();
-        spin_lock_init(&ptlrpc_last_xid_lock);
-        spin_lock_init(&ptlrpc_rs_debug_lock);
-        spin_lock_init(&ptlrpc_all_services_lock);
-        init_mutex(&pinger_sem);
-        init_mutex(&ptlrpcd_sem);
-
-        rc = ptlrpc_init_portals();
-        if (rc)
-                RETURN(rc);
-        cleanup_phase = 1;
-
-        rc = ptlrpc_init_connection();
-        if (rc)
-                GOTO(cleanup, rc);
-        cleanup_phase = 2;
-
-        ptlrpc_put_connection_superhack = ptlrpc_put_connection;
-
-        rc = ptlrpc_start_pinger();
-        if (rc)
-                GOTO(cleanup, rc);
-        cleanup_phase = 3;
-
-        rc = ldlm_init();
-        if (rc)
-                GOTO(cleanup, rc);
-        cleanup_phase = 4;
-
-        ptlrpc_cbdata_slab = cfs_mem_cache_create("ptlrpc_cbdatas",
-                                sizeof (struct ptlrpc_set_cbdata), 0, 
-                                SLAB_HWCACHE_ALIGN);
-        if (ptlrpc_cbdata_slab == NULL)
-                GOTO(cleanup, rc);
-
-        RETURN(0);
-
-cleanup:
-        switch(cleanup_phase) {
-        case 4:
-                ldlm_exit();
-        case 3:
-                ptlrpc_stop_pinger();
-        case 2:
-                ptlrpc_cleanup_connection();
-        case 1:
-                ptlrpc_exit_portals();
-        default: ;
-        }
-
-        return rc;
-}
-
-#ifdef __KERNEL__
-static void __exit ptlrpc_exit(void)
-{
-        ldlm_exit();
-        ptlrpc_stop_pinger();
-        ptlrpc_exit_portals();
-        ptlrpc_cleanup_connection();
-        cfs_mem_cache_destroy(ptlrpc_cbdata_slab);
-}
-
-/* connection.c */
-EXPORT_SYMBOL(ptlrpc_dump_connections);
-EXPORT_SYMBOL(ptlrpc_readdress_connection);
-EXPORT_SYMBOL(ptlrpc_get_connection);
-EXPORT_SYMBOL(ptlrpc_put_connection);
-EXPORT_SYMBOL(ptlrpc_connection_addref);
-EXPORT_SYMBOL(ptlrpc_init_connection);
-EXPORT_SYMBOL(ptlrpc_cleanup_connection);
-
-/* niobuf.c */
-EXPORT_SYMBOL(ptlrpc_start_bulk_transfer);
-EXPORT_SYMBOL(ptlrpc_abort_bulk);
-EXPORT_SYMBOL(ptlrpc_register_bulk);
-EXPORT_SYMBOL(ptlrpc_unregister_bulk);
-EXPORT_SYMBOL(ptlrpc_send_reply);
-EXPORT_SYMBOL(ptlrpc_reply);
-EXPORT_SYMBOL(ptlrpc_error);
-EXPORT_SYMBOL(ptlrpc_resend_req);
-EXPORT_SYMBOL(ptl_send_rpc);
-
-/* client.c */
-EXPORT_SYMBOL(ptlrpc_init_client);
-EXPORT_SYMBOL(ptlrpc_cleanup_client);
-EXPORT_SYMBOL(ptlrpc_uuid_to_connection);
-EXPORT_SYMBOL(ptlrpc_queue_wait);
-EXPORT_SYMBOL(ptlrpc_replay_req);
-EXPORT_SYMBOL(ptlrpc_restart_req);
-EXPORT_SYMBOL(ptlrpc_add_rqs_to_pool);
-EXPORT_SYMBOL(ptlrpc_init_rq_pool);
-EXPORT_SYMBOL(ptlrpc_free_rq_pool);
-EXPORT_SYMBOL(ptlrpc_prep_req_pool);
-EXPORT_SYMBOL(ptlrpc_at_set_req_timeout);
-EXPORT_SYMBOL(ptlrpc_prep_req);
-EXPORT_SYMBOL(ptlrpc_free_req);
-EXPORT_SYMBOL(ptlrpc_unregister_reply);
-EXPORT_SYMBOL(ptlrpc_req_finished);
-EXPORT_SYMBOL(ptlrpc_req_finished_with_imp_lock);
-EXPORT_SYMBOL(ptlrpc_request_addref);
-EXPORT_SYMBOL(ptlrpc_prep_bulk_imp);
-EXPORT_SYMBOL(ptlrpc_prep_bulk_exp);
-EXPORT_SYMBOL(ptlrpc_free_bulk);
-EXPORT_SYMBOL(ptlrpc_prep_bulk_page);
-EXPORT_SYMBOL(ptlrpc_abort_inflight);
-EXPORT_SYMBOL(ptlrpc_retain_replayable_request);
-EXPORT_SYMBOL(ptlrpc_next_xid);
-
-EXPORT_SYMBOL(ptlrpc_prep_set);
-EXPORT_SYMBOL(ptlrpc_set_add_cb);
-EXPORT_SYMBOL(ptlrpc_set_add_req);
-EXPORT_SYMBOL(ptlrpc_set_add_new_req);
-EXPORT_SYMBOL(ptlrpc_set_destroy);
-EXPORT_SYMBOL(ptlrpc_set_next_timeout);
-EXPORT_SYMBOL(ptlrpc_check_set);
-EXPORT_SYMBOL(ptlrpc_set_wait);
-EXPORT_SYMBOL(ptlrpc_expired_set);
-EXPORT_SYMBOL(ptlrpc_interrupted_set);
-EXPORT_SYMBOL(ptlrpc_mark_interrupted);
-
-/* service.c */
-EXPORT_SYMBOL(ptlrpc_save_lock);
-EXPORT_SYMBOL(ptlrpc_schedule_difficult_reply);
-EXPORT_SYMBOL(ptlrpc_commit_replies);
-EXPORT_SYMBOL(ptlrpc_init_svc);
-EXPORT_SYMBOL(ptlrpc_stop_all_threads);
-EXPORT_SYMBOL(ptlrpc_start_threads);
-EXPORT_SYMBOL(ptlrpc_start_thread);
-EXPORT_SYMBOL(ptlrpc_unregister_service);
-EXPORT_SYMBOL(ptlrpc_daemonize);
-EXPORT_SYMBOL(ptlrpc_service_health_check);
-
-/* pack_generic.c */
-EXPORT_SYMBOL(lustre_msg_swabbed);
-EXPORT_SYMBOL(lustre_msg_check_version);
-EXPORT_SYMBOL(lustre_pack_request);
-EXPORT_SYMBOL(lustre_pack_reply);
-EXPORT_SYMBOL(lustre_pack_reply_flags);
-EXPORT_SYMBOL(lustre_shrink_reply);
-EXPORT_SYMBOL(lustre_free_reply_state);
-EXPORT_SYMBOL(lustre_msg_size);
-EXPORT_SYMBOL(lustre_packed_msg_size);
-EXPORT_SYMBOL(lustre_unpack_msg);
-EXPORT_SYMBOL(lustre_msg_buf);
-EXPORT_SYMBOL(lustre_msg_string);
-EXPORT_SYMBOL(lustre_swab_buf);
-EXPORT_SYMBOL(lustre_swab_reqbuf);
-EXPORT_SYMBOL(lustre_swab_repbuf);
-EXPORT_SYMBOL(lustre_swab_obdo);
-EXPORT_SYMBOL(lustre_swab_obd_statfs);
-EXPORT_SYMBOL(lustre_swab_obd_ioobj);
-EXPORT_SYMBOL(lustre_swab_niobuf_remote);
-EXPORT_SYMBOL(lustre_swab_ost_body);
-EXPORT_SYMBOL(lustre_swab_ost_last_id);
-EXPORT_SYMBOL(lustre_swab_ost_lvb);
-EXPORT_SYMBOL(lustre_swab_mds_status_req);
-EXPORT_SYMBOL(lustre_swab_mds_body);
-EXPORT_SYMBOL(lustre_swab_obd_quotactl);
-EXPORT_SYMBOL(lustre_swab_mds_rec_setattr);
-EXPORT_SYMBOL(lustre_swab_mds_rec_create);
-EXPORT_SYMBOL(lustre_swab_mds_rec_join);
-EXPORT_SYMBOL(lustre_swab_mds_rec_link);
-EXPORT_SYMBOL(lustre_swab_mds_rec_unlink);
-EXPORT_SYMBOL(lustre_swab_mds_rec_rename);
-EXPORT_SYMBOL(lustre_swab_lov_desc);
-EXPORT_SYMBOL(lustre_swab_lov_user_md);
-EXPORT_SYMBOL(lustre_swab_lov_user_md_objects);
-EXPORT_SYMBOL(lustre_swab_lov_user_md_join);
-EXPORT_SYMBOL(lustre_swab_ldlm_res_id);
-EXPORT_SYMBOL(lustre_swab_ldlm_policy_data);
-EXPORT_SYMBOL(lustre_swab_ldlm_intent);
-EXPORT_SYMBOL(lustre_swab_ldlm_resource_desc);
-EXPORT_SYMBOL(lustre_swab_ldlm_lock_desc);
-EXPORT_SYMBOL(lustre_swab_ldlm_request);
-EXPORT_SYMBOL(lustre_swab_ldlm_reply);
-EXPORT_SYMBOL(lustre_swab_qdata);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-EXPORT_SYMBOL(lustre_swab_qdata_old);
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 9, 0, 0)
-EXPORT_SYMBOL(lustre_swab_qdata_old2);
-#else
-#warning "remove quota code above for format absolete in new release"
-#endif
-EXPORT_SYMBOL(lustre_swab_quota_adjust_qunit);
-EXPORT_SYMBOL(lustre_msg_get_flags);
-EXPORT_SYMBOL(lustre_msg_add_flags);
-EXPORT_SYMBOL(lustre_msg_set_flags);
-EXPORT_SYMBOL(lustre_msg_clear_flags);
-EXPORT_SYMBOL(lustre_msg_get_op_flags);
-EXPORT_SYMBOL(lustre_msg_add_op_flags);
-EXPORT_SYMBOL(lustre_msg_set_op_flags);
-EXPORT_SYMBOL(lustre_msg_get_handle );
-EXPORT_SYMBOL(lustre_msg_get_type);
-EXPORT_SYMBOL(lustre_msg_get_version);
-EXPORT_SYMBOL(lustre_msg_add_version);
-EXPORT_SYMBOL(lustre_msg_get_opc);
-EXPORT_SYMBOL(lustre_msg_get_last_xid);
-EXPORT_SYMBOL(lustre_msg_get_last_committed);
-EXPORT_SYMBOL(lustre_msg_get_transno);
-EXPORT_SYMBOL(lustre_msg_get_status);
-EXPORT_SYMBOL(lustre_msg_get_slv);
-EXPORT_SYMBOL(lustre_msg_get_limit);
-EXPORT_SYMBOL(lustre_msg_set_slv);
-EXPORT_SYMBOL(lustre_msg_set_limit);
-EXPORT_SYMBOL(lustre_msg_get_conn_cnt);
-EXPORT_SYMBOL(lustre_msg_is_v1);
-EXPORT_SYMBOL(lustre_msg_get_magic);
-EXPORT_SYMBOL(lustre_msg_set_handle);
-EXPORT_SYMBOL(lustre_msg_set_type);
-EXPORT_SYMBOL(lustre_msg_set_opc);
-EXPORT_SYMBOL(lustre_msg_set_last_xid);
-EXPORT_SYMBOL(lustre_msg_set_last_committed);
-EXPORT_SYMBOL(lustre_msg_set_transno);
-EXPORT_SYMBOL(lustre_msg_set_status);
-EXPORT_SYMBOL(lustre_msg_set_conn_cnt);
-EXPORT_SYMBOL(lustre_swab_mgs_target_info);
-
-/* recover.c */
-EXPORT_SYMBOL(ptlrpc_disconnect_import);
-EXPORT_SYMBOL(ptlrpc_resend);
-EXPORT_SYMBOL(ptlrpc_wake_delayed);
-EXPORT_SYMBOL(ptlrpc_set_import_active);
-EXPORT_SYMBOL(ptlrpc_activate_import);
-EXPORT_SYMBOL(ptlrpc_deactivate_import);
-EXPORT_SYMBOL(ptlrpc_invalidate_import);
-EXPORT_SYMBOL(ptlrpc_fail_import);
-EXPORT_SYMBOL(ptlrpc_recover_import);
-EXPORT_SYMBOL(ptlrpc_import_setasync);
-
-/* pinger.c */
-EXPORT_SYMBOL(ptlrpc_pinger_add_import);
-EXPORT_SYMBOL(ptlrpc_pinger_del_import);
-EXPORT_SYMBOL(ptlrpc_pinger_sending_on_import);
-
-/* ptlrpcd.c */
-EXPORT_SYMBOL(ptlrpcd_addref);
-EXPORT_SYMBOL(ptlrpcd_decref);
-EXPORT_SYMBOL(ptlrpcd_add_req);
-EXPORT_SYMBOL(ptlrpcd_wake);
-
-/* llogd.c */
-EXPORT_SYMBOL(llog_origin_handle_create);
-EXPORT_SYMBOL(llog_origin_handle_destroy);
-EXPORT_SYMBOL(llog_origin_handle_next_block);
-EXPORT_SYMBOL(llog_origin_handle_prev_block);
-EXPORT_SYMBOL(llog_origin_handle_read_header);
-EXPORT_SYMBOL(llog_origin_handle_close);
-EXPORT_SYMBOL(llog_client_ops);
-EXPORT_SYMBOL(llog_catinfo);
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Request Processor and Lock Management");
-MODULE_LICENSE("GPL");
-
-cfs_module(ptlrpc, "1.0.0", ptlrpc_init, ptlrpc_exit);
-#endif
diff --git a/lustre/ptlrpc/ptlrpcd.c b/lustre/ptlrpc/ptlrpcd.c
deleted file mode 100644
index d0abb2eb85e0fc5f94fb5ace7546ad09c5591e82..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/ptlrpcd.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2001-2003 Cluster File Systems, Inc.
- *   Author Peter Braam <braam@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-# include <ctype.h>
-#endif
-
-#include <libcfs/kp30.h>
-#include <lustre_net.h>
-# include <lustre_lib.h>
-
-#include <lustre_ha.h>
-#include <obd_class.h>   /* for obd_zombie */
-#include <obd_support.h> /* for OBD_FAIL_CHECK */
-#include <lprocfs_status.h>
-
-#define LIOD_STOP 0
-struct ptlrpcd_ctl {
-        unsigned long             pc_flags;
-        spinlock_t                pc_lock;
-        struct completion         pc_starting;
-        struct completion         pc_finishing;
-        struct ptlrpc_request_set *pc_set;
-        char                      pc_name[16];
-#ifndef __KERNEL__
-        int                       pc_recurred;
-        void                     *pc_wait_callback;
-        void                     *pc_idle_callback;
-#endif
-};
-
-static struct ptlrpcd_ctl ptlrpcd_pc;
-static struct ptlrpcd_ctl ptlrpcd_recovery_pc;
-
-struct semaphore ptlrpcd_sem;
-static int ptlrpcd_users = 0;
-
-void ptlrpcd_wake(struct ptlrpc_request *req)
-{
-        struct ptlrpc_request_set *rq_set = req->rq_set;
-
-        LASSERT(rq_set != NULL);
-
-        cfs_waitq_signal(&rq_set->set_waitq);
-}
-
-/* requests that are added to the ptlrpcd queue are sent via
- * ptlrpcd_check->ptlrpc_check_set() */
-void ptlrpcd_add_req(struct ptlrpc_request *req)
-{
-        struct ptlrpcd_ctl *pc;
-
-        if (req->rq_send_state == LUSTRE_IMP_FULL)
-                pc = &ptlrpcd_pc;
-        else
-                pc = &ptlrpcd_recovery_pc;
-
-        ptlrpc_set_add_new_req(pc->pc_set, req);
-        cfs_waitq_signal(&pc->pc_set->set_waitq);
-}
-
-static int ptlrpcd_check(struct ptlrpcd_ctl *pc)
-{
-        struct list_head *tmp, *pos;
-        struct ptlrpc_request *req;
-        int rc = 0;
-        ENTRY;
-
-        if (test_bit(LIOD_STOP, &pc->pc_flags))
-                RETURN(1);
-
-        obd_zombie_impexp_cull();
-
-        spin_lock(&pc->pc_set->set_new_req_lock);
-        list_for_each_safe(pos, tmp, &pc->pc_set->set_new_requests) {
-                req = list_entry(pos, struct ptlrpc_request, rq_set_chain);
-                list_del_init(&req->rq_set_chain);
-                ptlrpc_set_add_req(pc->pc_set, req);
-                rc = 1; /* need to calculate its timeout */
-        }
-        spin_unlock(&pc->pc_set->set_new_req_lock);
-
-        if (pc->pc_set->set_remaining) {
-                rc = rc | ptlrpc_check_set(pc->pc_set);
-
-                /* XXX our set never completes, so we prune the completed
-                 * reqs after each iteration. boy could this be smarter. */
-                list_for_each_safe(pos, tmp, &pc->pc_set->set_requests) {
-                        req = list_entry(pos, struct ptlrpc_request,
-                                         rq_set_chain);
-                        if (req->rq_phase != RQ_PHASE_COMPLETE)
-                                continue;
-
-                        list_del_init(&req->rq_set_chain);
-                        req->rq_set = NULL;
-                        ptlrpc_req_finished (req);
-                }
-        }
-
-        if (rc == 0) {
-                /* If new requests have been added, make sure to wake up */
-                spin_lock(&pc->pc_set->set_new_req_lock);
-                rc = !list_empty(&pc->pc_set->set_new_requests);
-                spin_unlock(&pc->pc_set->set_new_req_lock);
-        }
-
-        RETURN(rc);
-}
-
-#ifdef __KERNEL__
-/* ptlrpc's code paths like to execute in process context, so we have this
- * thread which spins on a set which contains the io rpcs.  llite specifies
- * ptlrpcd's set when it pushes pages down into the oscs */
-static int ptlrpcd(void *arg)
-{
-        struct ptlrpcd_ctl *pc = arg;
-        int rc;
-        ENTRY;
-
-        if ((rc = cfs_daemonize_ctxt(pc->pc_name))) {
-                complete(&pc->pc_starting);
-                return rc;
-        }
-
-        complete(&pc->pc_starting);
-
-        /* this mainloop strongly resembles ptlrpc_set_wait except
-         * that our set never completes.  ptlrpcd_check calls ptlrpc_check_set
-         * when there are requests in the set.  new requests come in
-         * on the set's new_req_list and ptlrpcd_check moves them into
-         * the set. */
-        while (1) {
-                struct l_wait_info lwi;
-                cfs_duration_t timeout;
-
-                timeout = cfs_time_seconds(ptlrpc_set_next_timeout(pc->pc_set));
-                lwi = LWI_TIMEOUT(timeout, ptlrpc_expired_set, pc->pc_set);
-
-                l_wait_event(pc->pc_set->set_waitq, ptlrpcd_check(pc), &lwi);
-
-                if (test_bit(LIOD_STOP, &pc->pc_flags))
-                        break;
-        }
-        /* wait for inflight requests to drain */
-        if (!list_empty(&pc->pc_set->set_requests))
-                ptlrpc_set_wait(pc->pc_set);
-        complete(&pc->pc_finishing);
-        return 0;
-}
-
-static void ptlrpcd_zombie_impexp_notify(void)
-{
-        LASSERT(ptlrpcd_pc.pc_set != NULL); // call before ptlrpcd inited ?
-
-        cfs_waitq_signal(&ptlrpcd_pc.pc_set->set_waitq);
-}
-
-#else
-
-int ptlrpcd_check_async_rpcs(void *arg)
-{
-        struct ptlrpcd_ctl *pc = arg;
-        int                  rc = 0;
-
-        /* single threaded!! */
-        pc->pc_recurred++;
-
-        if (pc->pc_recurred == 1) {
-                rc = ptlrpcd_check(pc);
-                if (!rc)
-                        ptlrpc_expired_set(pc->pc_set);
-                /*XXX send replay requests */
-                if (pc == &ptlrpcd_recovery_pc)
-                        rc = ptlrpcd_check(pc);
-        }
-
-        pc->pc_recurred--;
-        return rc;
-}
-
-int ptlrpcd_idle(void *arg)
-{
-        struct ptlrpcd_ctl *pc = arg;
-
-        return (list_empty(&pc->pc_set->set_new_requests) &&
-                pc->pc_set->set_remaining == 0);
-}
-
-#endif
-
-static int ptlrpcd_start(char *name, struct ptlrpcd_ctl *pc)
-{
-        int rc;
-
-        ENTRY;
-        memset(pc, 0, sizeof(*pc));
-        init_completion(&pc->pc_starting);
-        init_completion(&pc->pc_finishing);
-        pc->pc_flags = 0;
-        spin_lock_init(&pc->pc_lock);
-        snprintf (pc->pc_name, sizeof (pc->pc_name), name);
-
-        pc->pc_set = ptlrpc_prep_set();
-        if (pc->pc_set == NULL)
-                RETURN(-ENOMEM);
-
-#ifdef __KERNEL__
-        /* wake ptlrpcd when zombie imports or exports exist */
-        obd_zombie_impexp_notify = ptlrpcd_zombie_impexp_notify;
-        
-        rc = cfs_kernel_thread(ptlrpcd, pc, 0);
-        if (rc < 0)  {
-                ptlrpc_set_destroy(pc->pc_set);
-                RETURN(rc);
-        }
-
-        wait_for_completion(&pc->pc_starting);
-#else
-        pc->pc_wait_callback =
-                liblustre_register_wait_callback("ptlrpcd_check_async_rpcs",
-                                                 &ptlrpcd_check_async_rpcs, pc);
-        pc->pc_idle_callback =
-                liblustre_register_idle_callback("ptlrpcd_check_idle_rpcs",
-                                                 &ptlrpcd_idle, pc);
-        (void)rc;
-#endif
-        RETURN(0);
-}
-
-static void ptlrpcd_stop(struct ptlrpcd_ctl *pc)
-{
-        set_bit(LIOD_STOP, &pc->pc_flags);
-        cfs_waitq_signal(&pc->pc_set->set_waitq);
-#ifdef __KERNEL__
-        obd_zombie_impexp_notify = NULL;
-        wait_for_completion(&pc->pc_finishing);
-#else
-        liblustre_deregister_wait_callback(pc->pc_wait_callback);
-        liblustre_deregister_idle_callback(pc->pc_idle_callback);
-#endif
-        ptlrpc_set_destroy(pc->pc_set);
-}
-
-int ptlrpcd_addref(void)
-{
-        int rc = 0;
-        ENTRY;
-
-        mutex_down(&ptlrpcd_sem);
-        if (++ptlrpcd_users != 1)
-                GOTO(out, rc);
-
-        rc = ptlrpcd_start("ptlrpcd", &ptlrpcd_pc);
-        if (rc) {
-                --ptlrpcd_users;
-                GOTO(out, rc);
-        }
-
-        rc = ptlrpcd_start("ptlrpcd-recov", &ptlrpcd_recovery_pc);
-        if (rc) {
-                ptlrpcd_stop(&ptlrpcd_pc);
-                --ptlrpcd_users;
-                GOTO(out, rc);
-        }
-out:
-        mutex_up(&ptlrpcd_sem);
-        RETURN(rc);
-}
-
-void ptlrpcd_decref(void)
-{
-        mutex_down(&ptlrpcd_sem);
-        if (--ptlrpcd_users == 0) {
-                ptlrpcd_stop(&ptlrpcd_pc);
-                ptlrpcd_stop(&ptlrpcd_recovery_pc);
-        }
-        mutex_up(&ptlrpcd_sem);
-}
diff --git a/lustre/ptlrpc/recov_thread.c b/lustre/ptlrpc/recov_thread.c
deleted file mode 100644
index 9ec70741140c4be69f4e482dcbb9fc8c9b0d77da..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/recov_thread.c
+++ /dev/null
@@ -1,644 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2003 Cluster File Systems, Inc.
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- * OST<->MDS recovery logging thread.
- *
- * Invariants in implementation:
- * - we do not share logs among different OST<->MDS connections, so that
- *   if an OST or MDS fails it need only look at log(s) relevant to itself
- */
-
-#define DEBUG_SUBSYSTEM S_LOG
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else
-# include <libcfs/list.h>
-# include <liblustre.h>
-#endif
-
-#include <libcfs/kp30.h>
-#include <obd_class.h>
-#include <lustre_commit_confd.h>
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lnet/types.h>
-#include <libcfs/list.h>
-#include <lustre_log.h>
-#include "ptlrpc_internal.h"
-
-#ifdef __KERNEL__
-
-/* Allocate new commit structs in case we do not have enough.
- * Make the llcd size small enough that it fits into a single page when we
- * are sending/receiving it. */
-static int llcd_alloc(struct llog_commit_master *lcm)
-{
-        struct llog_canceld_ctxt *llcd;
-        int llcd_size;
-
-        /* payload of lustre_msg V2 is bigger */
-        llcd_size = 4096 - lustre_msg_size(LUSTRE_MSG_MAGIC_V2, 1, NULL);
-        OBD_ALLOC(llcd,
-                  llcd_size + offsetof(struct llog_canceld_ctxt, llcd_cookies));
-        if (llcd == NULL)
-                return -ENOMEM;
-
-        llcd->llcd_size = llcd_size;
-        llcd->llcd_lcm = lcm;
-
-        spin_lock(&lcm->lcm_llcd_lock);
-        list_add(&llcd->llcd_list, &lcm->lcm_llcd_free);
-        atomic_inc(&lcm->lcm_llcd_numfree);
-        spin_unlock(&lcm->lcm_llcd_lock);
-
-        return 0;
-}
-
-/* Get a free cookie struct from the list */
-static struct llog_canceld_ctxt *llcd_grab(struct llog_commit_master *lcm)
-{
-        struct llog_canceld_ctxt *llcd;
-
-repeat:
-        spin_lock(&lcm->lcm_llcd_lock);
-        if (list_empty(&lcm->lcm_llcd_free)) {
-                spin_unlock(&lcm->lcm_llcd_lock);
-                if (llcd_alloc(lcm) < 0) {
-                        CERROR("unable to allocate log commit data!\n");
-                        return NULL;
-                }
-                /* check new llcd wasn't grabbed while lock dropped, b=7407 */
-                goto repeat;
-        }
-
-        llcd = list_entry(lcm->lcm_llcd_free.next, typeof(*llcd), llcd_list);
-        list_del(&llcd->llcd_list);
-        atomic_dec(&lcm->lcm_llcd_numfree);
-        spin_unlock(&lcm->lcm_llcd_lock);
-
-        llcd->llcd_cookiebytes = 0;
-
-        return llcd;
-}
-
-static void llcd_put(struct llog_canceld_ctxt *llcd)
-{
-        struct llog_commit_master *lcm = llcd->llcd_lcm;
-
-        llog_ctxt_put(llcd->llcd_ctxt);
-        if (atomic_read(&lcm->lcm_llcd_numfree) >= lcm->lcm_llcd_maxfree) {
-                int llcd_size = llcd->llcd_size +
-                         offsetof(struct llog_canceld_ctxt, llcd_cookies);
-                OBD_FREE(llcd, llcd_size);
-        } else {
-                spin_lock(&lcm->lcm_llcd_lock);
-                list_add(&llcd->llcd_list, &lcm->lcm_llcd_free);
-                atomic_inc(&lcm->lcm_llcd_numfree);
-                spin_unlock(&lcm->lcm_llcd_lock);
-        }
-}
-
-/* Send some cookies to the appropriate target */
-static void llcd_send(struct llog_canceld_ctxt *llcd)
-{
-        if (!(llcd->llcd_lcm->lcm_flags & LLOG_LCM_FL_EXIT)) {
-                spin_lock(&llcd->llcd_lcm->lcm_llcd_lock);
-                list_add_tail(&llcd->llcd_list,
-                              &llcd->llcd_lcm->lcm_llcd_pending);
-                spin_unlock(&llcd->llcd_lcm->lcm_llcd_lock);
-        }
-        cfs_waitq_signal_nr(&llcd->llcd_lcm->lcm_waitq, 1);
-}
-
-/* deleted objects have a commit callback that cancels the MDS
- * log record for the deletion.  The commit callback calls this
- * function
- */
-int llog_obd_repl_cancel(struct llog_ctxt *ctxt,
-                         struct lov_stripe_md *lsm, int count,
-                         struct llog_cookie *cookies, int flags)
-{
-        struct llog_canceld_ctxt *llcd;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(ctxt);
-
-        mutex_down(&ctxt->loc_sem);
-        if (ctxt->loc_imp == NULL) {
-                CDEBUG(D_RPCTRACE, "no import for ctxt %p\n", ctxt);
-                GOTO(out, rc = 0);
-        }
-
-        llcd = ctxt->loc_llcd;
-
-        if (count > 0 && cookies != NULL) {
-                if (llcd == NULL) {
-                        llcd = llcd_grab(ctxt->loc_lcm);
-                        if (llcd == NULL) {
-                                CERROR("couldn't get an llcd - dropped "LPX64
-                                       ":%x+%u\n",
-                                       cookies->lgc_lgl.lgl_oid,
-                                       cookies->lgc_lgl.lgl_ogen,
-                                       cookies->lgc_index);
-                                GOTO(out, rc = -ENOMEM);
-                        }
-                        llcd->llcd_ctxt = llog_ctxt_get(ctxt);
-                        ctxt->loc_llcd = llcd;
-                }
-
-                memcpy((char *)llcd->llcd_cookies + llcd->llcd_cookiebytes,
-                       cookies, sizeof(*cookies));
-                llcd->llcd_cookiebytes += sizeof(*cookies);
-        } else {
-                if (llcd == NULL || !(flags & OBD_LLOG_FL_SENDNOW))
-                        GOTO(out, rc);
-        }
-
-        if ((llcd->llcd_size - llcd->llcd_cookiebytes) < sizeof(*cookies) ||
-            (flags & OBD_LLOG_FL_SENDNOW)) {
-                CDEBUG(D_RPCTRACE, "send llcd %p:%p\n", llcd, llcd->llcd_ctxt);
-                ctxt->loc_llcd = NULL;
-                llcd_send(llcd);
-        }
-out:
-        mutex_up(&ctxt->loc_sem);
-        return rc;
-}
-EXPORT_SYMBOL(llog_obd_repl_cancel);
-
-int llog_obd_repl_sync(struct llog_ctxt *ctxt, struct obd_export *exp)
-{
-        int rc = 0;
-        ENTRY;
-
-        if (exp && (ctxt->loc_imp == exp->exp_imp_reverse)) {
-                CDEBUG(D_RPCTRACE,"reverse import disconnect, put llcd %p:%p\n",
-                       ctxt->loc_llcd, ctxt);
-                mutex_down(&ctxt->loc_sem);
-                if (ctxt->loc_llcd != NULL) {
-                        llcd_put(ctxt->loc_llcd);
-                        ctxt->loc_llcd = NULL;
-                }
-                ctxt->loc_imp = NULL;
-                mutex_up(&ctxt->loc_sem);
-        } else {
-                rc = llog_cancel(ctxt, NULL, 0, NULL, OBD_LLOG_FL_SENDNOW);
-        }
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_obd_repl_sync);
-
-static void llog_lcm_dec(struct llog_commit_master *lcm)
-{
-        atomic_dec(&lcm->lcm_thread_total);
-        cfs_waitq_signal(&lcm->lcm_waitq);
-}
-
-static int log_commit_thread(void *arg)
-{
-        struct llog_commit_daemon *lcd = arg;
-        struct llog_commit_master *lcm = lcd->lcd_lcm;
-        struct llog_canceld_ctxt *llcd, *n;
-        struct obd_import *import = NULL;
-        ENTRY;
-
-        THREAD_NAME(cfs_curproc_comm(), CFS_CURPROC_COMM_MAX - 1,
-                    "ll_log_comt_%02d", lcd->lcd_index);
-        
-        ptlrpc_daemonize(cfs_curproc_comm()); /* thread never needs to do IO */
-        CDEBUG(D_HA, "%s started\n", cfs_curproc_comm());
-        
-        do {
-                struct ptlrpc_request *request;
-                struct list_head *sending_list;
-                int rc = 0;
-
-                if (import)
-                        class_import_put(import);
-                import = NULL;
-
-                /* If we do not have enough pages available, allocate some */
-                while (atomic_read(&lcm->lcm_llcd_numfree) <
-                       lcm->lcm_llcd_minfree) {
-                        if (llcd_alloc(lcm) < 0)
-                                break;
-                }
-
-                spin_lock(&lcm->lcm_thread_lock);
-                atomic_inc(&lcm->lcm_thread_numidle);
-                list_move(&lcd->lcd_lcm_list, &lcm->lcm_thread_idle);
-                spin_unlock(&lcm->lcm_thread_lock);
-
-                wait_event_interruptible(lcm->lcm_waitq,
-                                         !list_empty(&lcm->lcm_llcd_pending) ||
-                                         lcm->lcm_flags & LLOG_LCM_FL_EXIT);
-
-                /* If we are the last available thread, start a new one in case
-                 * we get blocked on an RPC (nobody else will start a new one)*/
-                spin_lock(&lcm->lcm_thread_lock);
-                atomic_dec(&lcm->lcm_thread_numidle);
-                list_move(&lcd->lcd_lcm_list, &lcm->lcm_thread_busy);
-                spin_unlock(&lcm->lcm_thread_lock);
-
-                sending_list = &lcm->lcm_llcd_pending;
-        resend:
-                if (import)
-                        class_import_put(import);
-                import = NULL;
-                if (lcm->lcm_flags & LLOG_LCM_FL_EXIT) {
-                        lcm->lcm_llcd_maxfree = 0;
-                        lcm->lcm_llcd_minfree = 0;
-                        lcm->lcm_thread_max = 0;
-
-                        if (list_empty(&lcm->lcm_llcd_pending) ||
-                            lcm->lcm_flags & LLOG_LCM_FL_EXIT_FORCE)
-                                break;
-                }
-
-                if (atomic_read(&lcm->lcm_thread_numidle) <= 1 &&
-                    atomic_read(&lcm->lcm_thread_total) < lcm->lcm_thread_max) {
-                        rc = llog_start_commit_thread(lcm);
-                        if (rc < 0)
-                                CERROR("error starting thread: rc %d\n", rc);
-                }
-
-                /* Move all of the pending cancels from the same OST off of
-                 * the list, so we don't get multiple threads blocked and/or
-                 * doing upcalls on the same OST in case of failure. */
-                spin_lock(&lcm->lcm_llcd_lock);
-                if (!list_empty(sending_list)) {
-                        list_move_tail(sending_list->next,
-                                       &lcd->lcd_llcd_list);
-                        llcd = list_entry(lcd->lcd_llcd_list.next,
-                                          typeof(*llcd), llcd_list);
-                        LASSERT(llcd->llcd_lcm == lcm);
-                        import = llcd->llcd_ctxt->loc_imp;
-                        if (import)
-                                class_import_get(import);
-                }
-                list_for_each_entry_safe(llcd, n, sending_list, llcd_list) {
-                        LASSERT(llcd->llcd_lcm == lcm);
-                        if (import == llcd->llcd_ctxt->loc_imp)
-                                list_move_tail(&llcd->llcd_list,
-                                               &lcd->lcd_llcd_list);
-                }
-                if (sending_list != &lcm->lcm_llcd_resend) {
-                        list_for_each_entry_safe(llcd, n, &lcm->lcm_llcd_resend,
-                                                 llcd_list) {
-                                LASSERT(llcd->llcd_lcm == lcm);
-                                if (import == llcd->llcd_ctxt->loc_imp)
-                                        list_move_tail(&llcd->llcd_list,
-                                                       &lcd->lcd_llcd_list);
-                        }
-                }
-                spin_unlock(&lcm->lcm_llcd_lock);
-
-                /* We are the only one manipulating our local list - no lock */
-                list_for_each_entry_safe(llcd,n, &lcd->lcd_llcd_list,llcd_list){
-                        int size[2] = { sizeof(struct ptlrpc_body),
-                                        llcd->llcd_cookiebytes };
-                        char *bufs[2] = { NULL, (char *)llcd->llcd_cookies };
-
-                        list_del(&llcd->llcd_list);
-                        if (llcd->llcd_cookiebytes == 0) {
-                                CDEBUG(D_RPCTRACE, "put empty llcd %p:%p\n",
-                                       llcd, llcd->llcd_ctxt);
-                                llcd_put(llcd);
-                                continue;
-                        }
-
-                        mutex_down(&llcd->llcd_ctxt->loc_sem);
-                        if (llcd->llcd_ctxt->loc_imp == NULL) {
-                                mutex_up(&llcd->llcd_ctxt->loc_sem);
-                                CWARN("import will be destroyed, put "
-                                      "llcd %p:%p\n", llcd, llcd->llcd_ctxt);
-                                llcd_put(llcd);
-                                continue;
-                        }
-                        mutex_up(&llcd->llcd_ctxt->loc_sem);
-
-                        if (!import || (import == LP_POISON) ||
-                            (import->imp_client == LP_POISON)) {
-                                CERROR("No import %p (llcd=%p, ctxt=%p)\n",
-                                       import, llcd, llcd->llcd_ctxt);
-                                llcd_put(llcd);
-                                continue;
-                        }
-
-                        OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_RECOV, 10);
-
-                        request = ptlrpc_prep_req(import, LUSTRE_LOG_VERSION,
-                                                  OBD_LOG_CANCEL, 2, size,bufs);
-                        if (request == NULL) {
-                                rc = -ENOMEM;
-                                CERROR("error preparing commit: rc %d\n", rc);
-
-                                spin_lock(&lcm->lcm_llcd_lock);
-                                list_splice(&lcd->lcd_llcd_list,
-                                            &lcm->lcm_llcd_resend);
-                                CFS_INIT_LIST_HEAD(&lcd->lcd_llcd_list);
-                                spin_unlock(&lcm->lcm_llcd_lock);
-                                break;
-                        }
-
-                        /* bug 5515 */
-                        request->rq_request_portal = LDLM_CANCEL_REQUEST_PORTAL;
-                        request->rq_reply_portal = LDLM_CANCEL_REPLY_PORTAL;
-                        ptlrpc_at_set_req_timeout(request);
-
-                        ptlrpc_req_set_repsize(request, 1, NULL);
-                        mutex_down(&llcd->llcd_ctxt->loc_sem);
-                        if (llcd->llcd_ctxt->loc_imp == NULL) {
-                                mutex_up(&llcd->llcd_ctxt->loc_sem);
-                                CWARN("import will be destroyed, put "
-                                      "llcd %p:%p\n", llcd, llcd->llcd_ctxt);
-                                llcd_put(llcd);
-                                ptlrpc_req_finished(request);
-                                continue;
-                        }
-                        mutex_up(&llcd->llcd_ctxt->loc_sem);
-                        rc = ptlrpc_queue_wait(request);
-                        ptlrpc_req_finished(request);
-
-                        /* If the RPC failed, we put this and the remaining
-                         * messages onto the resend list for another time. */
-                        if (rc == 0) {
-                                llcd_put(llcd);
-                                continue;
-                        }
-
-                        CERROR("commit %p:%p drop %d cookies: rc %d\n",
-                               llcd, llcd->llcd_ctxt,
-                               (int)(llcd->llcd_cookiebytes /
-                                     sizeof(*llcd->llcd_cookies)), rc);
-                        llcd_put(llcd);
-                }
-
-                if (rc == 0) {
-                        sending_list = &lcm->lcm_llcd_resend;
-                        if (!list_empty(sending_list))
-                                goto resend;
-                }
-        } while(1);
-
-        if (import)
-                class_import_put(import);
-
-        /* If we are force exiting, just drop all of the cookies. */
-        if (lcm->lcm_flags & LLOG_LCM_FL_EXIT_FORCE) {
-                spin_lock(&lcm->lcm_llcd_lock);
-                list_splice(&lcm->lcm_llcd_pending, &lcd->lcd_llcd_list);
-                list_splice(&lcm->lcm_llcd_resend, &lcd->lcd_llcd_list);
-                list_splice(&lcm->lcm_llcd_free, &lcd->lcd_llcd_list);
-                spin_unlock(&lcm->lcm_llcd_lock);
-
-                list_for_each_entry_safe(llcd, n, &lcd->lcd_llcd_list,llcd_list)
-                        llcd_put(llcd);
-        }
-
-
-        CDEBUG(D_HA, "%s exiting\n", cfs_curproc_comm());
-
-        spin_lock(&lcm->lcm_thread_lock);
-        list_del(&lcd->lcd_lcm_list);
-        spin_unlock(&lcm->lcm_thread_lock);
-        OBD_FREE_PTR(lcd);
-        llog_lcm_dec(lcm);
-
-        RETURN(0);
-}
-
-int llog_start_commit_thread(struct llog_commit_master *lcm)
-{
-        struct llog_commit_daemon *lcd;
-        int rc, index; 
-        ENTRY;
-
-        if (atomic_read(&lcm->lcm_thread_total) >= lcm->lcm_thread_max)
-                RETURN(0);
-
-        /* Check whether it will be cleanup llog commit thread first,
-         * If not, increate the lcm_thread_total count to prevent the 
-         * lcm being freed when the log_commit_thread is started */
-        spin_lock(&lcm->lcm_thread_lock);
-        if (!lcm->lcm_flags & LLOG_LCM_FL_EXIT) { 
-                atomic_inc(&lcm->lcm_thread_total);
-                index = atomic_read(&lcm->lcm_thread_total);
-                spin_unlock(&lcm->lcm_thread_lock);
-        } else {
-                spin_unlock(&lcm->lcm_thread_lock);
-                RETURN(0);
-        }
-
-        OBD_ALLOC_PTR(lcd);
-        if (lcd == NULL)
-                GOTO(cleanup, rc = -ENOMEM);
-
-        CFS_INIT_LIST_HEAD(&lcd->lcd_lcm_list);
-        CFS_INIT_LIST_HEAD(&lcd->lcd_llcd_list);
-        lcd->lcd_index = index;
-        lcd->lcd_lcm = lcm;
-
-        rc = cfs_kernel_thread(log_commit_thread, lcd, CLONE_VM | CLONE_FILES);
-cleanup:
-        if (rc < 0) {
-                CERROR("error starting thread #%d: %d\n", lcd->lcd_index, rc);
-                llog_lcm_dec(lcm);
-                if (lcd) 
-                        OBD_FREE_PTR(lcd);
-                RETURN(rc);
-        }
-        RETURN(0);
-}
-EXPORT_SYMBOL(llog_start_commit_thread);
-
-static struct llog_process_args {
-        struct semaphore         llpa_sem;
-        struct llog_ctxt        *llpa_ctxt;
-        void                    *llpa_cb;
-        void                    *llpa_arg;
-} llpa;
-
-int llog_init_commit_master(struct llog_commit_master *lcm)
-{
-        CFS_INIT_LIST_HEAD(&lcm->lcm_thread_busy);
-        CFS_INIT_LIST_HEAD(&lcm->lcm_thread_idle);
-        spin_lock_init(&lcm->lcm_thread_lock);
-        atomic_set(&lcm->lcm_thread_numidle, 0);
-        cfs_waitq_init(&lcm->lcm_waitq);
-        CFS_INIT_LIST_HEAD(&lcm->lcm_llcd_pending);
-        CFS_INIT_LIST_HEAD(&lcm->lcm_llcd_resend);
-        CFS_INIT_LIST_HEAD(&lcm->lcm_llcd_free);
-        spin_lock_init(&lcm->lcm_llcd_lock);
-        atomic_set(&lcm->lcm_llcd_numfree, 0);
-        lcm->lcm_llcd_minfree = 0;
-        lcm->lcm_thread_max = 5;
-        /* FIXME initialize semaphore for llog_process_args */
-        sema_init(&llpa.llpa_sem, 1);
-        return 0;
-}
-EXPORT_SYMBOL(llog_init_commit_master);
-
-int llog_cleanup_commit_master(struct llog_commit_master *lcm,
-                               int force)
-{
-        spin_lock(&lcm->lcm_thread_lock);
-        lcm->lcm_flags |= LLOG_LCM_FL_EXIT;
-        if (force)
-                lcm->lcm_flags |= LLOG_LCM_FL_EXIT_FORCE;
-        
-        spin_unlock(&lcm->lcm_thread_lock);
-        
-        cfs_waitq_signal(&lcm->lcm_waitq);
-
-        wait_event_interruptible(lcm->lcm_waitq,
-                                 atomic_read(&lcm->lcm_thread_total) == 0);
-        return 0;
-}
-EXPORT_SYMBOL(llog_cleanup_commit_master);
-
-static int log_process_thread(void *args)
-{
-        struct llog_process_args *data = args;
-        struct llog_ctxt *ctxt = data->llpa_ctxt;
-        void   *cb = data->llpa_cb;
-        struct llog_logid logid = *(struct llog_logid *)(data->llpa_arg);
-        struct llog_handle *llh = NULL;
-        int rc;
-        ENTRY;
-
-        mutex_up(&data->llpa_sem);
-        ptlrpc_daemonize("llog_process");     /* thread does IO to log files */
-
-        rc = llog_create(ctxt, &llh, &logid, NULL);
-        if (rc) {
-                CERROR("llog_create failed %d\n", rc);
-                GOTO(out, rc);
-        }
-        rc = llog_init_handle(llh, LLOG_F_IS_CAT, NULL);
-        if (rc) {
-                CERROR("llog_init_handle failed %d\n", rc);
-                GOTO(release_llh, rc);
-        }
-
-        if (cb) {
-                rc = llog_cat_process(llh, (llog_cb_t)cb, NULL);
-                if (rc != LLOG_PROC_BREAK)
-                        CERROR("llog_cat_process failed %d\n", rc);
-        } else {
-                CWARN("no callback function for recovery\n");
-        }
-
-        CDEBUG(D_HA, "send llcd %p:%p forcibly after recovery\n",
-               ctxt->loc_llcd, ctxt);
-        llog_sync(ctxt, NULL);
-
-release_llh:
-        rc = llog_cat_put(llh);
-        if (rc)
-                CERROR("llog_cat_put failed %d\n", rc);
-out:
-        llog_ctxt_put(ctxt);
-        RETURN(rc);
-}
-
-static int llog_recovery_generic(struct llog_ctxt *ctxt, void *handle,void *arg)
-{
-        struct obd_device *obd = ctxt->loc_obd;
-        int rc;
-        ENTRY;
-
-        if (obd->obd_stopping)
-                RETURN(-ENODEV);
-
-        mutex_down(&llpa.llpa_sem);
-        llpa.llpa_cb = handle;
-        llpa.llpa_arg = arg;
-        llpa.llpa_ctxt = llog_get_context(ctxt->loc_obd, ctxt->loc_idx);
-        if (!llpa.llpa_ctxt) {
-                mutex_up(&llpa.llpa_sem);
-                RETURN(-ENODEV);
-        }
-        rc = cfs_kernel_thread(log_process_thread, &llpa, CLONE_VM | CLONE_FILES);
-        if (rc < 0)
-                CERROR("error starting log_process_thread: %d\n", rc);
-        else {
-                CDEBUG(D_HA, "log_process_thread: %d\n", rc);
-                rc = 0;
-        }
-
-        RETURN(rc);
-}
-
-int llog_repl_connect(struct llog_ctxt *ctxt, int count,
-                      struct llog_logid *logid, struct llog_gen *gen,
-                      struct obd_uuid *uuid)
-{
-        struct llog_canceld_ctxt *llcd;
-        int rc;
-        ENTRY;
-
-        /* send back llcd before recovery from llog */
-        if (ctxt->loc_llcd != NULL) {
-                CWARN("llcd %p:%p not empty\n", ctxt->loc_llcd, ctxt);
-                llog_sync(ctxt, NULL);
-        }
-
-        mutex_down(&ctxt->loc_sem);
-        ctxt->loc_gen = *gen;
-        llcd = llcd_grab(ctxt->loc_lcm);
-        if (llcd == NULL) {
-                CERROR("couldn't get an llcd\n");
-                mutex_up(&ctxt->loc_sem);
-                RETURN(-ENOMEM);
-        }
-        llcd->llcd_ctxt = llog_ctxt_get(ctxt);
-        ctxt->loc_llcd = llcd;
-        mutex_up(&ctxt->loc_sem);
-
-        rc = llog_recovery_generic(ctxt, ctxt->llog_proc_cb, logid);
-        if (rc != 0)
-                CERROR("error recovery process: %d\n", rc);
-
-        RETURN(rc);
-}
-EXPORT_SYMBOL(llog_repl_connect);
-
-#else /* !__KERNEL__ */
-
-int llog_obd_repl_cancel(struct llog_ctxt *ctxt,
-                         struct lov_stripe_md *lsm, int count,
-                         struct llog_cookie *cookies, int flags)
-{
-        return 0;
-}
-#endif
diff --git a/lustre/ptlrpc/recover.c b/lustre/ptlrpc/recover.c
deleted file mode 100644
index cc9448ce4055b53cd807110b7aca693a4a9e36f8..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/recover.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Portal-RPC reconnection and replay operations, for use in recovery.
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *   Author: Mike Shaver <shaver@clusterfs.com>
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-#else
-# include <liblustre.h>
-#endif
-
-#include <obd_support.h>
-#include <lustre_ha.h>
-#include <lustre_net.h>
-#include <lustre_import.h>
-#include <lustre_export.h>
-#include <obd.h>
-#include <obd_ost.h>
-#include <obd_class.h>
-#include <obd_lov.h> /* for IOC_LOV_SET_OSC_ACTIVE */
-#include <libcfs/list.h>
-
-#include "ptlrpc_internal.h"
-
-static int ptlrpc_recover_import_no_retry(struct obd_import *, char *);
-
-void ptlrpc_initiate_recovery(struct obd_import *imp)
-{
-        ENTRY;
-
-        CDEBUG(D_HA, "%s: starting recovery\n", obd2cli_tgt(imp->imp_obd));
-        ptlrpc_connect_import(imp, NULL);
-
-        EXIT;
-}
-
-int ptlrpc_replay_next(struct obd_import *imp, int *inflight)
-{
-        int rc = 0;
-        struct list_head *tmp, *pos;
-        struct ptlrpc_request *req = NULL;
-        __u64 last_transno;
-        ENTRY;
-
-        *inflight = 0;
-
-        /* It might have committed some after we last spoke, so make sure we
-         * get rid of them now.
-         */
-        spin_lock(&imp->imp_lock);
-        imp->imp_last_transno_checked = 0;
-        ptlrpc_free_committed(imp);
-        last_transno = imp->imp_last_replay_transno;
-        spin_unlock(&imp->imp_lock);
-
-        CDEBUG(D_HA, "import %p from %s committed "LPU64" last "LPU64"\n",
-               imp, obd2cli_tgt(imp->imp_obd),
-               imp->imp_peer_committed_transno, last_transno);
-
-        /* Do I need to hold a lock across this iteration?  We shouldn't be
-         * racing with any additions to the list, because we're in recovery
-         * and are therefore not processing additional requests to add.  Calls
-         * to ptlrpc_free_committed might commit requests, but nothing "newer"
-         * than the one we're replaying (it can't be committed until it's
-         * replayed, and we're doing that here).  l_f_e_safe protects against
-         * problems with the current request being committed, in the unlikely
-         * event of that race.  So, in conclusion, I think that it's safe to
-         * perform this list-walk without the imp_lock held.
-         *
-         * But, the {mdc,osc}_replay_open callbacks both iterate
-         * request lists, and have comments saying they assume the
-         * imp_lock is being held by ptlrpc_replay, but it's not. it's
-         * just a little race...
-         */
-        list_for_each_safe(tmp, pos, &imp->imp_replay_list) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_replay_list);
-
-                /* If need to resend the last sent transno (because a
-                   reconnect has occurred), then stop on the matching
-                   req and send it again. If, however, the last sent
-                   transno has been committed then we continue replay
-                   from the next request. */
-                if (imp->imp_resend_replay && 
-                    req->rq_transno == last_transno) {
-                        lustre_msg_add_flags(req->rq_reqmsg, MSG_RESENT);
-                        break;
-                }
-
-                if (req->rq_transno > last_transno) {
-                        imp->imp_last_replay_transno = req->rq_transno;
-                        break;
-                }
-
-                req = NULL;
-        }
-
-        spin_lock(&imp->imp_lock);
-        imp->imp_resend_replay = 0;
-        spin_unlock(&imp->imp_lock);
-
-        if (req != NULL) {
-                rc = ptlrpc_replay_req(req);
-                if (rc) {
-                        CERROR("recovery replay error %d for req "
-                               LPD64"\n", rc, req->rq_xid);
-                        RETURN(rc);
-                }
-                *inflight = 1;
-        }
-        RETURN(rc);
-}
-
-int ptlrpc_resend(struct obd_import *imp)
-{
-        struct ptlrpc_request *req, *next;
-
-        ENTRY;
-
-        /* As long as we're in recovery, nothing should be added to the sending
-         * list, so we don't need to hold the lock during this iteration and
-         * resend process.
-         */
-        /* Well... what if lctl recover is called twice at the same time?
-         */
-        spin_lock(&imp->imp_lock);
-        if (imp->imp_state != LUSTRE_IMP_RECOVER) {
-                spin_unlock(&imp->imp_lock);
-                RETURN(-1);
-        }
-
-        list_for_each_entry_safe(req, next, &imp->imp_sending_list, rq_list) {
-                LASSERTF((long)req > CFS_PAGE_SIZE && req != LP_POISON,
-                         "req %p bad\n", req);
-                LASSERTF(req->rq_type != LI_POISON, "req %p freed\n", req);
-                if (!req->rq_no_resend)
-                        ptlrpc_resend_req(req);
-        }
-        spin_unlock(&imp->imp_lock);
-
-        RETURN(0);
-}
-
-void ptlrpc_wake_delayed(struct obd_import *imp)
-{
-        struct list_head *tmp, *pos;
-        struct ptlrpc_request *req;
-
-        spin_lock(&imp->imp_lock);
-        list_for_each_safe(tmp, pos, &imp->imp_delayed_list) {
-                req = list_entry(tmp, struct ptlrpc_request, rq_list);
-
-                DEBUG_REQ(D_HA, req, "waking (set %p):", req->rq_set);
-                ptlrpc_wake_client_req(req);
-        }
-        spin_unlock(&imp->imp_lock);
-}
-
-void ptlrpc_request_handle_notconn(struct ptlrpc_request *failed_req)
-{
-        struct obd_import *imp = failed_req->rq_import;
-        ENTRY;
-
-        CDEBUG(D_HA, "import %s of %s@%s abruptly disconnected: reconnecting\n",
-               imp->imp_obd->obd_name, obd2cli_tgt(imp->imp_obd),
-               imp->imp_connection->c_remote_uuid.uuid);
-
-        if (ptlrpc_set_import_discon(imp,
-                              lustre_msg_get_conn_cnt(failed_req->rq_reqmsg))) {
-                if (!imp->imp_replayable) {
-                        CDEBUG(D_HA, "import %s@%s for %s not replayable, "
-                               "auto-deactivating\n",
-                               obd2cli_tgt(imp->imp_obd),
-                               imp->imp_connection->c_remote_uuid.uuid,
-                               imp->imp_obd->obd_name);
-                        ptlrpc_deactivate_import(imp);
-                }
-                /* to control recovery via lctl {disable|enable}_recovery */
-                if (imp->imp_deactive == 0)
-                        ptlrpc_connect_import(imp, NULL);
-        }
-
-        /* Wait for recovery to complete and resend. If evicted, then
-           this request will be errored out later.*/
-        spin_lock(&failed_req->rq_lock);
-        if (!failed_req->rq_no_resend)
-                failed_req->rq_resend = 1;
-        spin_unlock(&failed_req->rq_lock);
-
-        EXIT;
-}
-
-/*
- * Administratively active/deactive a client. 
- * This should only be called by the ioctl interface, currently
- *  - the lctl deactivate and activate commands
- *  - echo 0/1 >> /proc/osc/XXX/active
- *  - client umount -f (ll_umount_begin)
- */
-int ptlrpc_set_import_active(struct obd_import *imp, int active)
-{
-        struct obd_device *obd = imp->imp_obd;
-        int rc = 0;
-
-        ENTRY;
-        LASSERT(obd);
-
-        /* When deactivating, mark import invalid, and abort in-flight
-         * requests. */
-        if (!active) {
-                LCONSOLE_WARN("setting import %s INACTIVE by administrator "
-                              "request\n", obd2cli_tgt(imp->imp_obd));
-                ptlrpc_invalidate_import(imp);
-
-                spin_lock(&imp->imp_lock);
-                imp->imp_deactive = 1;
-                spin_unlock(&imp->imp_lock);
-        }
-
-        /* When activating, mark import valid, and attempt recovery */
-        if (active) {
-                spin_lock(&imp->imp_lock);
-                imp->imp_deactive = 0;
-                spin_unlock(&imp->imp_lock);
-
-                CDEBUG(D_HA, "setting import %s VALID\n",
-                       obd2cli_tgt(imp->imp_obd));
-                rc = ptlrpc_recover_import(imp, NULL);
-        }
-
-        RETURN(rc);
-}
-
-/* Attempt to reconnect an import */
-int ptlrpc_recover_import(struct obd_import *imp, char *new_uuid)
-{
-        int rc;
-        ENTRY;
-
-        /* force import to be disconnected. */
-        ptlrpc_set_import_discon(imp, 0);
-
-        spin_lock(&imp->imp_lock);
-        imp->imp_deactive = 0;
-        spin_unlock(&imp->imp_lock);
-
-        rc = ptlrpc_recover_import_no_retry(imp, new_uuid);
-
-        RETURN(rc);
-}
-
-int ptlrpc_import_in_recovery(struct obd_import *imp)
-{
-        int in_recovery = 1;
-        spin_lock(&imp->imp_lock);
-        if (imp->imp_state == LUSTRE_IMP_FULL ||
-            imp->imp_state == LUSTRE_IMP_CLOSED ||
-            imp->imp_state == LUSTRE_IMP_DISCON)
-                in_recovery = 0;
-        spin_unlock(&imp->imp_lock);
-        return in_recovery;
-}
-
-static int ptlrpc_recover_import_no_retry(struct obd_import *imp,
-                                          char *new_uuid)
-{
-        int rc;
-        int in_recovery = 0;
-        struct l_wait_info lwi;
-        ENTRY;
-
-        /* Check if reconnect is already in progress */
-        spin_lock(&imp->imp_lock);
-        if (imp->imp_state != LUSTRE_IMP_DISCON) {
-                in_recovery = 1;
-        }
-        spin_unlock(&imp->imp_lock);
-
-        if (in_recovery == 1)
-                RETURN(-EALREADY);
-
-        rc = ptlrpc_connect_import(imp, new_uuid);
-        if (rc)
-                RETURN(rc);
-
-        CDEBUG(D_HA, "%s: recovery started, waiting\n",
-               obd2cli_tgt(imp->imp_obd));
-
-        lwi = LWI_TIMEOUT(cfs_timeout_cap(cfs_time_seconds(obd_timeout)), 
-                          NULL, NULL);
-        rc = l_wait_event(imp->imp_recovery_waitq,
-                          !ptlrpc_import_in_recovery(imp), &lwi);
-        CDEBUG(D_HA, "%s: recovery finished\n",
-               obd2cli_tgt(imp->imp_obd));
-
-        RETURN(rc);
-}
diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c
deleted file mode 100644
index 9d8c81181d2c78db9c800c602d81b69a0ac3ec7d..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/service.c
+++ /dev/null
@@ -1,1743 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of the Lustre file system, http://www.lustre.org
- *   Lustre is a trademark of Cluster File Systems, Inc.
- *
- *   You may have signed or agreed to another license before downloading
- *   this software.  If so, you are bound by the terms and conditions
- *   of that agreement, and the following does not apply to you.  See the
- *   LICENSE file included with this distribution for more information.
- *
- *   If you did not agree to a different license, then this copy of Lustre
- *   is open source software; you can redistribute it and/or modify it
- *   under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   In either case, Lustre 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
- *   license text for more details.
- *
- */
-
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-#include <liblustre.h>
-#include <libcfs/kp30.h>
-#endif
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lnet/types.h>
-#include "ptlrpc_internal.h"
-
-/* The following are visible and mutable through /sys/module/ptlrpc */
-int test_req_buffer_pressure = 0;
-CFS_MODULE_PARM(test_req_buffer_pressure, "i", int, 0444,
-                "set non-zero to put pressure on request buffer pools");
-unsigned int at_min = 0;
-CFS_MODULE_PARM(at_min, "i", int, 0644,
-                "Adaptive timeout minimum (sec)");
-
-#ifdef HAVE_AT_SUPPORT
-unsigned int at_max = 600;
-#else
-unsigned int at_max = 0;
-#endif
-
-EXPORT_SYMBOL(at_max);
-CFS_MODULE_PARM(at_max, "i", int, 0644,
-                "Adaptive timeout maximum (sec)");
-unsigned int at_history = 600;
-CFS_MODULE_PARM(at_history, "i", int, 0644,
-                "Adaptive timeouts remember the slowest event that took place "
-                "within this period (sec)");
-static int at_early_margin = 5;
-CFS_MODULE_PARM(at_early_margin, "i", int, 0644,
-                "How soon before an RPC deadline to send an early reply");
-static int at_extra = 30;
-CFS_MODULE_PARM(at_extra, "i", int, 0644,
-                "How much extra time to give with each early reply");
-
-
-/* forward ref */
-static int ptlrpc_server_post_idle_rqbds (struct ptlrpc_service *svc);
-
-static CFS_LIST_HEAD (ptlrpc_all_services);
-spinlock_t ptlrpc_all_services_lock;
-
-static char *
-ptlrpc_alloc_request_buffer (int size)
-{
-        char *ptr;
-
-        if (size > SVC_BUF_VMALLOC_THRESHOLD)
-                OBD_VMALLOC(ptr, size);
-        else
-                OBD_ALLOC(ptr, size);
-
-        return (ptr);
-}
-
-static void
-ptlrpc_free_request_buffer (char *ptr, int size)
-{
-        if (size > SVC_BUF_VMALLOC_THRESHOLD)
-                OBD_VFREE(ptr, size);
-        else
-                OBD_FREE(ptr, size);
-}
-
-struct ptlrpc_request_buffer_desc *
-ptlrpc_alloc_rqbd (struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request_buffer_desc *rqbd;
-
-        OBD_ALLOC(rqbd, sizeof (*rqbd));
-        if (rqbd == NULL)
-                return (NULL);
-
-        rqbd->rqbd_service = svc;
-        rqbd->rqbd_refcount = 0;
-        rqbd->rqbd_cbid.cbid_fn = request_in_callback;
-        rqbd->rqbd_cbid.cbid_arg = rqbd;
-        CFS_INIT_LIST_HEAD(&rqbd->rqbd_reqs);
-        rqbd->rqbd_buffer = ptlrpc_alloc_request_buffer(svc->srv_buf_size);
-
-        if (rqbd->rqbd_buffer == NULL) {
-                OBD_FREE(rqbd, sizeof (*rqbd));
-                return (NULL);
-        }
-
-        spin_lock(&svc->srv_lock);
-        list_add(&rqbd->rqbd_list, &svc->srv_idle_rqbds);
-        svc->srv_nbufs++;
-        spin_unlock(&svc->srv_lock);
-
-        return (rqbd);
-}
-
-void
-ptlrpc_free_rqbd (struct ptlrpc_request_buffer_desc *rqbd)
-{
-        struct ptlrpc_service *svc = rqbd->rqbd_service;
-
-        LASSERT (rqbd->rqbd_refcount == 0);
-        LASSERT (list_empty(&rqbd->rqbd_reqs));
-
-        spin_lock(&svc->srv_lock);
-        list_del(&rqbd->rqbd_list);
-        svc->srv_nbufs--;
-        spin_unlock(&svc->srv_lock);
-
-        ptlrpc_free_request_buffer (rqbd->rqbd_buffer, svc->srv_buf_size);
-        OBD_FREE (rqbd, sizeof (*rqbd));
-}
-
-int
-ptlrpc_grow_req_bufs(struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request_buffer_desc *rqbd;
-        int                                i;
-
-        CDEBUG(D_RPCTRACE, "%s: allocate %d new %d-byte reqbufs (%d/%d left)\n",
-               svc->srv_name, svc->srv_nbuf_per_group, svc->srv_buf_size,
-               svc->srv_nrqbd_receiving, svc->srv_nbufs);
-        for (i = 0; i < svc->srv_nbuf_per_group; i++) {
-                rqbd = ptlrpc_alloc_rqbd(svc);
-
-                if (rqbd == NULL) {
-                        CERROR ("%s: Can't allocate request buffer\n",
-                                svc->srv_name);
-                        return (-ENOMEM);
-                }
-
-                if (ptlrpc_server_post_idle_rqbds(svc) < 0)
-                        return (-EAGAIN);
-        }
-
-        return (0);
-}
-
-void
-ptlrpc_save_lock (struct ptlrpc_request *req,
-                  struct lustre_handle *lock, int mode)
-{
-        struct ptlrpc_reply_state *rs = req->rq_reply_state;
-        int                        idx;
-
-        LASSERT(rs != NULL);
-        LASSERT(rs->rs_nlocks < RS_MAX_LOCKS);
-
-        idx = rs->rs_nlocks++;
-        rs->rs_locks[idx] = *lock;
-        rs->rs_modes[idx] = mode;
-        rs->rs_difficult = 1;
-}
-
-void
-ptlrpc_schedule_difficult_reply (struct ptlrpc_reply_state *rs)
-{
-        struct ptlrpc_service *svc = rs->rs_service;
-
-#ifdef CONFIG_SMP
-        LASSERT (spin_is_locked (&svc->srv_lock));
-#endif
-        LASSERT (rs->rs_difficult);
-        rs->rs_scheduled_ever = 1;              /* flag any notification attempt */
-
-        if (rs->rs_scheduled)                   /* being set up or already notified */
-                return;
-
-        rs->rs_scheduled = 1;
-        list_del (&rs->rs_list);
-        list_add (&rs->rs_list, &svc->srv_reply_queue);
-        cfs_waitq_signal (&svc->srv_waitq);
-}
-
-void
-ptlrpc_commit_replies (struct obd_device *obd)
-{
-        struct list_head   *tmp;
-        struct list_head   *nxt;
-
-        /* Find any replies that have been committed and get their service
-         * to attend to complete them. */
-
-        /* CAVEAT EMPTOR: spinlock ordering!!! */
-        spin_lock(&obd->obd_uncommitted_replies_lock);
-
-        list_for_each_safe (tmp, nxt, &obd->obd_uncommitted_replies) {
-                struct ptlrpc_reply_state *rs =
-                        list_entry(tmp, struct ptlrpc_reply_state, rs_obd_list);
-
-                LASSERT (rs->rs_difficult);
-
-                if (rs->rs_transno <= obd->obd_last_committed) {
-                        struct ptlrpc_service *svc = rs->rs_service;
-
-                        spin_lock (&svc->srv_lock);
-                        list_del_init (&rs->rs_obd_list);
-                        ptlrpc_schedule_difficult_reply (rs);
-                        spin_unlock (&svc->srv_lock);
-                }
-        }
-
-        spin_unlock(&obd->obd_uncommitted_replies_lock);
-}
-
-static int
-ptlrpc_server_post_idle_rqbds (struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request_buffer_desc *rqbd;
-        int                                rc;
-        int                                posted = 0;
-
-        for (;;) {
-                spin_lock(&svc->srv_lock);
-
-                if (list_empty (&svc->srv_idle_rqbds)) {
-                        spin_unlock(&svc->srv_lock);
-                        return (posted);
-                }
-
-                rqbd = list_entry(svc->srv_idle_rqbds.next,
-                                  struct ptlrpc_request_buffer_desc,
-                                  rqbd_list);
-                list_del (&rqbd->rqbd_list);
-
-                /* assume we will post successfully */
-                svc->srv_nrqbd_receiving++;
-                list_add (&rqbd->rqbd_list, &svc->srv_active_rqbds);
-
-                spin_unlock(&svc->srv_lock);
-
-                rc = ptlrpc_register_rqbd(rqbd);
-                if (rc != 0)
-                        break;
-
-                posted = 1;
-        }
-
-        spin_lock(&svc->srv_lock);
-
-        svc->srv_nrqbd_receiving--;
-        list_del(&rqbd->rqbd_list);
-        list_add_tail(&rqbd->rqbd_list, &svc->srv_idle_rqbds);
-
-        /* Don't complain if no request buffers are posted right now; LNET
-         * won't drop requests because we set the portal lazy! */
-
-        spin_unlock(&svc->srv_lock);
-
-        return (-1);
-}
-
-static void ptlrpc_at_timer(unsigned long castmeharder)
-{
-        struct ptlrpc_service *svc = (struct ptlrpc_service *)castmeharder;
-        CDEBUG(D_INFO, "at timer %s hit at %ld%s\n",
-               svc->srv_name, cfs_time_current_sec(), 
-               list_empty(&svc->srv_at_list) ? ", empty" : ""); 
-        svc->srv_at_check = 1;
-        cfs_waitq_signal(&svc->srv_waitq);
-}
-
-/* @threadname should be 11 characters or less - 3 will be added on */
-struct ptlrpc_service *
-ptlrpc_init_svc(int nbufs, int bufsize, int max_req_size, int max_reply_size,
-                int req_portal, int rep_portal, int watchdog_factor,
-                svc_handler_t handler, char *name,
-                cfs_proc_dir_entry_t *proc_entry,
-                svcreq_printfn_t svcreq_printfn, 
-                int min_threads, int max_threads, char *threadname)
-{
-        int                    rc;
-        struct ptlrpc_service *service;
-        ENTRY;
-
-        LASSERT (nbufs > 0);
-        LASSERT (bufsize >= max_req_size);
-        
-        OBD_ALLOC(service, sizeof(*service));
-        if (service == NULL)
-                RETURN(NULL);
-
-        /* First initialise enough for early teardown */
-
-        service->srv_name = name;
-        spin_lock_init(&service->srv_lock);
-        CFS_INIT_LIST_HEAD(&service->srv_threads);
-        cfs_waitq_init(&service->srv_waitq);
-
-        service->srv_nbuf_per_group = test_req_buffer_pressure ? 1 : nbufs;
-        service->srv_max_req_size = max_req_size;
-        service->srv_buf_size = bufsize;
-        service->srv_rep_portal = rep_portal;
-        service->srv_req_portal = req_portal;
-        service->srv_watchdog_factor = watchdog_factor;
-        service->srv_handler = handler;
-        service->srv_request_history_print_fn = svcreq_printfn;
-        service->srv_request_seq = 1;           /* valid seq #s start at 1 */
-        service->srv_request_max_cull_seq = 0;
-        service->srv_threads_min = min_threads;
-        service->srv_threads_max = max_threads;
-        service->srv_thread_name = threadname;
-
-        rc = LNetSetLazyPortal(service->srv_req_portal);
-        LASSERT (rc == 0);
-
-        CFS_INIT_LIST_HEAD(&service->srv_request_queue);
-        CFS_INIT_LIST_HEAD(&service->srv_idle_rqbds);
-        CFS_INIT_LIST_HEAD(&service->srv_active_rqbds);
-        CFS_INIT_LIST_HEAD(&service->srv_history_rqbds);
-        CFS_INIT_LIST_HEAD(&service->srv_request_history);
-        CFS_INIT_LIST_HEAD(&service->srv_active_replies);
-        CFS_INIT_LIST_HEAD(&service->srv_reply_queue);
-        CFS_INIT_LIST_HEAD(&service->srv_free_rs_list);
-        cfs_waitq_init(&service->srv_free_rs_waitq);
-
-        spin_lock_init(&service->srv_at_lock);
-        CFS_INIT_LIST_HEAD(&service->srv_req_in_queue);
-        CFS_INIT_LIST_HEAD(&service->srv_at_list);
-        cfs_timer_init(&service->srv_at_timer, ptlrpc_at_timer, service);
-        /* At SOW, service time should be quick; 10s seems generous. If client 
-           timeout is less than this, we'll be sending an early reply. */
-        at_init(&service->srv_at_estimate, 10, 0);
-
-        spin_lock (&ptlrpc_all_services_lock);
-        list_add (&service->srv_list, &ptlrpc_all_services);
-        spin_unlock (&ptlrpc_all_services_lock);
-        
-        /* Now allocate the request buffers */
-        rc = ptlrpc_grow_req_bufs(service);
-        /* We shouldn't be under memory pressure at startup, so
-         * fail if we can't post all our buffers at this time. */
-        if (rc != 0)
-                GOTO(failed, NULL);
-
-        /* Now allocate pool of reply buffers */
-        /* Increase max reply size to next power of two */
-        service->srv_max_reply_size = 1;
-        while (service->srv_max_reply_size < max_reply_size)
-                service->srv_max_reply_size <<= 1;
-
-        if (proc_entry != NULL)
-                ptlrpc_lprocfs_register_service(proc_entry, service);
-
-        CDEBUG(D_NET, "%s: Started, listening on portal %d\n",
-               service->srv_name, service->srv_req_portal);
-
-        RETURN(service);
-failed:
-        ptlrpc_unregister_service(service);
-        return NULL;
-}
-
-static void ptlrpc_server_req_decref(struct ptlrpc_request *req)
-{
-        struct ptlrpc_request_buffer_desc *rqbd = req->rq_rqbd;
-
-        if (!atomic_dec_and_test(&req->rq_refcount))
-                return;
-
-        LASSERT(list_empty(&req->rq_timed_list));
-        if (req != &rqbd->rqbd_req) {
-                /* NB request buffers use an embedded
-                 * req if the incoming req unlinked the
-                 * MD; this isn't one of them! */
-                OBD_FREE(req, sizeof(*req));
-        } else {
-                struct ptlrpc_service *svc = rqbd->rqbd_service;
-                /* schedule request buffer for re-use.
-                 * NB I can only do this after I've disposed of their
-                 * reqs; particularly the embedded req */
-                spin_lock(&svc->srv_lock);
-                list_add_tail(&rqbd->rqbd_list, &svc->srv_idle_rqbds);
-                spin_unlock(&svc->srv_lock);
-        }
-}
-
-static void __ptlrpc_server_free_request(struct ptlrpc_request *req)
-{
-        list_del(&req->rq_list);
-        ptlrpc_req_drop_rs(req);
-        ptlrpc_server_req_decref(req);
-}
-
-static void ptlrpc_server_free_request(struct ptlrpc_request *req)
-{
-        struct ptlrpc_request_buffer_desc *rqbd = req->rq_rqbd;
-        struct ptlrpc_service             *svc = rqbd->rqbd_service;
-        int                                refcount;
-        struct list_head                  *tmp;
-        struct list_head                  *nxt;
-
-        if (req->rq_phase != RQ_PHASE_NEW) /* incorrect message magic */
-                DEBUG_REQ(D_INFO, req, "free req");
-        spin_lock(&svc->srv_at_lock);
-        req->rq_sent_final = 1;
-        list_del_init(&req->rq_timed_list);
-        spin_unlock(&svc->srv_at_lock);
-
-        spin_lock(&svc->srv_lock);
-
-        svc->srv_n_active_reqs--;
-        list_add(&req->rq_list, &rqbd->rqbd_reqs);
-
-        refcount = --(rqbd->rqbd_refcount);
-        if (refcount == 0) {
-                /* request buffer is now idle: add to history */
-                list_del(&rqbd->rqbd_list);
-                list_add_tail(&rqbd->rqbd_list, &svc->srv_history_rqbds);
-                svc->srv_n_history_rqbds++;
-
-                /* cull some history?
-                 * I expect only about 1 or 2 rqbds need to be recycled here */
-                while (svc->srv_n_history_rqbds > svc->srv_max_history_rqbds) {
-                        rqbd = list_entry(svc->srv_history_rqbds.next,
-                                          struct ptlrpc_request_buffer_desc,
-                                          rqbd_list);
-
-                        list_del(&rqbd->rqbd_list);
-                        svc->srv_n_history_rqbds--;
-
-                        /* remove rqbd's reqs from svc's req history while
-                         * I've got the service lock */
-                        list_for_each(tmp, &rqbd->rqbd_reqs) {
-                                req = list_entry(tmp, struct ptlrpc_request,
-                                                 rq_list);
-                                /* Track the highest culled req seq */
-                                if (req->rq_history_seq >
-                                    svc->srv_request_max_cull_seq)
-                                        svc->srv_request_max_cull_seq =
-                                                req->rq_history_seq;
-                                list_del(&req->rq_history_list);
-                        }
-
-                        spin_unlock(&svc->srv_lock);
-
-                        list_for_each_safe(tmp, nxt, &rqbd->rqbd_reqs) {
-                                req = list_entry(rqbd->rqbd_reqs.next,
-                                                 struct ptlrpc_request,
-                                                 rq_list);
-                                __ptlrpc_server_free_request(req);
-                        }
-
-                        spin_lock(&svc->srv_lock);
-                }
-        } else if (req->rq_reply_state && req->rq_reply_state->rs_prealloc) {
-                 /* If we are low on memory, we are not interested in
-                    history */
-                list_del(&req->rq_history_list);
-                __ptlrpc_server_free_request(req);
-        }
-
-        spin_unlock(&svc->srv_lock);
-}
-
-/* This function makes sure dead exports are evicted in a timely manner.
-   This function is only called when some export receives a message (i.e.,
-   the network is up.) */
-static void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
-{
-        struct obd_export *oldest_exp;
-        time_t oldest_time;
-
-        ENTRY;
-
-        LASSERT(exp);
-
-        /* Compensate for slow machines, etc, by faking our request time
-           into the future.  Although this can break the strict time-ordering
-           of the list, we can be really lazy here - we don't have to evict
-           at the exact right moment.  Eventually, all silent exports
-           will make it to the top of the list. */
-        exp->exp_last_request_time = max(exp->exp_last_request_time,
-                                         cfs_time_current_sec() + extra_delay);
-
-        CDEBUG(D_INFO, "updating export %s at %ld\n",
-               exp->exp_client_uuid.uuid,
-               exp->exp_last_request_time);
-
-        /* exports may get disconnected from the chain even though the
-           export has references, so we must keep the spin lock while
-           manipulating the lists */
-        spin_lock(&exp->exp_obd->obd_dev_lock);
-
-        if (list_empty(&exp->exp_obd_chain_timed)) {
-                /* this one is not timed */
-                spin_unlock(&exp->exp_obd->obd_dev_lock);
-                EXIT;
-                return;
-        }
-
-        list_move_tail(&exp->exp_obd_chain_timed,
-                       &exp->exp_obd->obd_exports_timed);
-
-        oldest_exp = list_entry(exp->exp_obd->obd_exports_timed.next,
-                                struct obd_export, exp_obd_chain_timed);
-        oldest_time = oldest_exp->exp_last_request_time;
-        spin_unlock(&exp->exp_obd->obd_dev_lock);
-
-        if (exp->exp_obd->obd_recovering) {
-                /* be nice to everyone during recovery */
-                EXIT;
-                return;
-        }
-
-        /* Note - racing to start/reset the obd_eviction timer is safe */
-        if (exp->exp_obd->obd_eviction_timer == 0) {
-                /* Check if the oldest entry is expired. */
-                if (cfs_time_current_sec() > (oldest_time + PING_EVICT_TIMEOUT +
-                                              extra_delay)) {
-                        /* We need a second timer, in case the net was down and
-                         * it just came back. Since the pinger may skip every
-                         * other PING_INTERVAL (see note in ptlrpc_pinger_main),
-                         * we better wait for 3. */
-                        exp->exp_obd->obd_eviction_timer =
-                                cfs_time_current_sec() + 3 * PING_INTERVAL;
-                        CDEBUG(D_HA, "%s: Think about evicting %s from %ld\n",
-                               exp->exp_obd->obd_name, obd_export_nid2str(exp),
-                               oldest_time);
-                }
-        } else {
-                if (cfs_time_current_sec() > 
-                    (exp->exp_obd->obd_eviction_timer + extra_delay)) {
-                        /* The evictor won't evict anyone who we've heard from
-                         * recently, so we don't have to check before we start
-                         * it. */
-                        if (!ping_evictor_wake(exp))
-                                exp->exp_obd->obd_eviction_timer = 0;
-                }
-        }
-
-        EXIT;
-}
-
-static int ptlrpc_check_req(struct ptlrpc_request *req)
-{
-        if (lustre_msg_get_conn_cnt(req->rq_reqmsg) < 
-            req->rq_export->exp_conn_cnt) {
-                DEBUG_REQ(D_ERROR, req,
-                          "DROPPING req from old connection %d < %d",
-                          lustre_msg_get_conn_cnt(req->rq_reqmsg),
-                          req->rq_export->exp_conn_cnt);
-                return -EEXIST;
-        }
-        if (req->rq_export->exp_obd && req->rq_export->exp_obd->obd_fail) {
-             /* Failing over, don't handle any more reqs, send
-                error response instead. */
-                CDEBUG(D_RPCTRACE, "Dropping req %p for failed obd %s\n",
-                       req, req->rq_export->exp_obd->obd_name);
-                req->rq_status = -ENODEV;
-                ptlrpc_error(req);
-                return -ENODEV;
-        }
-        return 0;
-}
-
-static void ptlrpc_at_set_timer(struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request *rq;
-        time_t next;
-
-        spin_lock(&svc->srv_at_lock);
-        if (list_empty(&svc->srv_at_list)) {
-                cfs_timer_disarm(&svc->srv_at_timer);
-                spin_unlock(&svc->srv_at_lock);
-                return;
-        }
-
-        /* Set timer for closest deadline */
-        rq = list_entry(svc->srv_at_list.next, struct ptlrpc_request, 
-                        rq_timed_list);
-        next = rq->rq_deadline - cfs_time_current_sec() - at_early_margin;
-        if (next <= 0) 
-                ptlrpc_at_timer((unsigned long)svc);
-        else
-                cfs_timer_arm(&svc->srv_at_timer, cfs_time_shift(next));
-        spin_unlock(&svc->srv_at_lock);
-        CDEBUG(D_INFO, "armed %s at %+lds\n", svc->srv_name, next);
-}
-
-/* Add rpc to early reply check list */
-static int ptlrpc_at_add_timed(struct ptlrpc_request *req)
-{
-        struct ptlrpc_service *svc = req->rq_rqbd->rqbd_service;
-        struct ptlrpc_request *rq;
-        int found = 0;
-
-        if (AT_OFF) 
-                return(0);
-
-        if ((lustre_msghdr_get_flags(req->rq_reqmsg) & MSGHDR_AT_SUPPORT) == 0)
-                return(-ENOSYS);
-        
-        DEBUG_REQ(D_ADAPTTO, req, "add timed %lds", 
-                  req->rq_deadline - cfs_time_current_sec());
-        
-        spin_lock(&svc->srv_at_lock);
-
-        if (unlikely(req->rq_sent_final)) {
-                spin_unlock(&svc->srv_at_lock);
-                return 0;
-        }
-
-        LASSERT(list_empty(&req->rq_timed_list));
-        /* Add to sorted list.  Presumably latest rpcs will have the latest
-           deadlines, so search backward. */
-        list_for_each_entry_reverse(rq, &svc->srv_at_list, rq_timed_list) {
-                if (req->rq_deadline > rq->rq_deadline) {
-                        list_add(&req->rq_timed_list, &rq->rq_timed_list);
-                        found++;
-                        break;
-                }
-        }
-        if (!found)
-                /* Add to front if shortest deadline or list empty */
-                list_add(&req->rq_timed_list, &svc->srv_at_list);
-
-        /* Check if we're the head of the list */
-        found = (svc->srv_at_list.next == &req->rq_timed_list);
-
-        spin_unlock(&svc->srv_at_lock);
-
-        if (found)
-                ptlrpc_at_set_timer(svc);
-
-        return 0;
-}            
-
-static int ptlrpc_at_send_early_reply(struct ptlrpc_request *req, 
-                                      int extra_time)
-{
-        struct ptlrpc_service *svc = req->rq_rqbd->rqbd_service;
-        struct ptlrpc_request *reqcopy;
-        struct lustre_msg *reqmsg;
-        long olddl = req->rq_deadline - cfs_time_current_sec();
-        time_t newdl;
-        int rc;
-        ENTRY;
-                            
-        /* deadline is when the client expects us to reply, margin is the 
-           difference between clients' and servers' expectations */
-        DEBUG_REQ(D_ADAPTTO, req, 
-                  "%ssending early reply (deadline %+lds, margin %+lds) for "
-                  "%d+%d", AT_OFF ? "AT off - not " : "",
-                  olddl, olddl - at_get(&svc->srv_at_estimate),
-                  at_get(&svc->srv_at_estimate), extra_time);
-
-        if (AT_OFF) 
-                RETURN(0);
-        
-        if (olddl < 0) {
-                CDEBUG(D_WARNING, "x"LPU64": Already past deadline (%+lds), not"
-                       " sending early reply. Increase at_early_margin (%d)?\n",
-                       req->rq_xid, olddl, at_early_margin);
-                /* Return an error so we're not re-added to the timed list. */
-                RETURN(-ETIMEDOUT);
-        }
-
-        if ((lustre_msghdr_get_flags(req->rq_reqmsg) & MSGHDR_AT_SUPPORT) == 0){
-                CDEBUG(D_INFO, "Wanted to ask client for more time, but no AT "
-                      "support\n");
-                RETURN(-ENOSYS);
-        }
-
-        if (extra_time) {
-                /* Fake our processing time into the future to ask the
-                   clients for some extra amount of time */
-                extra_time += cfs_time_current_sec() -
-                        req->rq_arrival_time.tv_sec;
-                at_add(&svc->srv_at_estimate, extra_time);
-        }
-
-        newdl = req->rq_arrival_time.tv_sec + at_get(&svc->srv_at_estimate);
-        if (req->rq_deadline >= newdl) {
-                /* We're not adding any time, no need to send an early reply
-                   (e.g. maybe at adaptive_max) */
-                CDEBUG(D_ADAPTTO, "x"LPU64": Couldn't add any time (%ld/%ld), "
-                       "not sending early reply\n", req->rq_xid, olddl,
-                       newdl - cfs_time_current_sec());
-                RETURN(-ETIMEDOUT);
-        }
-
-        OBD_ALLOC(reqcopy, sizeof *reqcopy);
-        if (reqcopy == NULL)
-                RETURN(-ENOMEM);
-        OBD_ALLOC(reqmsg, req->rq_reqlen);
-        if (!reqmsg) {
-                OBD_FREE(reqcopy, sizeof *reqcopy);
-                RETURN(-ENOMEM);
-        }
-        
-        *reqcopy = *req;
-        reqcopy->rq_reply_state = NULL;
-        reqcopy->rq_rep_swab_mask = 0;
-        /* We only need the reqmsg for the magic */
-        reqcopy->rq_reqmsg = reqmsg;
-        memcpy(reqmsg, req->rq_reqmsg, req->rq_reqlen);
-
-        if (req->rq_sent_final) {
-                CDEBUG(D_ADAPTTO, "x"LPU64": normal reply already sent out, "
-                       "abort sending early reply\n", req->rq_xid);
-                GOTO(out, rc = 0);
-        }
-
-        /* Connection ref */
-        reqcopy->rq_export = class_conn2export(
-                                     lustre_msg_get_handle(reqcopy->rq_reqmsg));
-        if (reqcopy->rq_export == NULL)
-                GOTO(out, rc = -ENODEV);
-
-        /* RPC ref */
-        class_export_rpc_get(reqcopy->rq_export);
-        if (reqcopy->rq_export->exp_obd && 
-            reqcopy->rq_export->exp_obd->obd_fail)
-                GOTO(out_put, rc = -ENODEV);
-
-        rc = lustre_pack_reply_flags(reqcopy, 1, NULL, NULL, LPRFL_EARLY_REPLY);
-        if (rc) 
-                GOTO(out_put, rc);
-
-        rc = ptlrpc_send_reply(reqcopy, PTLRPC_REPLY_EARLY);
-
-        if (!rc) {
-                /* Adjust our own deadline to what we told the client */
-                req->rq_deadline = newdl;
-                req->rq_early_count++; /* number sent, server side */
-        } else {
-                DEBUG_REQ(D_ERROR, req, "Early reply send failed %d", rc);
-        }
-
-        /* Free the (early) reply state from lustre_pack_reply. 
-           (ptlrpc_send_reply takes it's own rs ref, so this is safe here) */
-        ptlrpc_req_drop_rs(reqcopy);
-
-out_put:
-        class_export_rpc_put(reqcopy->rq_export);
-        class_export_put(reqcopy->rq_export);
-out:
-        OBD_FREE(reqmsg, req->rq_reqlen);
-        OBD_FREE(reqcopy, sizeof *reqcopy);
-        RETURN(rc);
-}
-
-/* Send early replies to everybody expiring within at_early_margin
-   asking for at_extra time */
-static int ptlrpc_at_check_timed(struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request *rq, *n;
-        struct list_head work_list;
-        time_t now = cfs_time_current_sec();
-        int first, counter = 0;
-        ENTRY;
-
-        spin_lock(&svc->srv_at_lock);
-        if (svc->srv_at_check == 0) {
-                spin_unlock(&svc->srv_at_lock);
-                RETURN(0);
-        }
-        svc->srv_at_check = 0;
-        
-        if (list_empty(&svc->srv_at_list)) {
-                spin_unlock(&svc->srv_at_lock);
-                RETURN(0);      
-        }
-
-        /* The timer went off, but maybe the nearest rpc already completed. */
-        rq = list_entry(svc->srv_at_list.next, struct ptlrpc_request,
-                        rq_timed_list);
-        first = (int)(rq->rq_deadline - now);
-        if (first > at_early_margin) {
-                /* We've still got plenty of time.  Reset the timer. */
-                spin_unlock(&svc->srv_at_lock);
-                ptlrpc_at_set_timer(svc);
-                RETURN(0);      
-        }
-
-        /* We're close to a timeout, and we don't know how much longer the 
-           server will take. Send early replies to everyone expiring soon. */
-        CFS_INIT_LIST_HEAD(&work_list);
-        list_for_each_entry_safe(rq, n, &svc->srv_at_list, rq_timed_list) {
-                if (rq->rq_deadline <= now + at_early_margin) {
-                        list_move(&rq->rq_timed_list, &work_list);
-                        counter++;
-                } else {
-                        break;
-                }
-        }
-
-        spin_unlock(&svc->srv_at_lock);
-
-        /* we have a new earliest deadline, restart the timer */
-        ptlrpc_at_set_timer(svc);
-
-        CDEBUG(D_ADAPTTO, "timeout in %+ds, asking for %d secs on %d early "
-               "replies\n", first, at_extra, counter);
-        if (first < 0)
-                /* We're already past request deadlines before we even get a 
-                   chance to send early replies */
-                LCONSOLE_WARN("%s: This server is not able to keep up with "
-                              "request traffic (cpu-bound).\n", svc->srv_name);
-
-        /* ptlrpc_server_free_request may delete an entry out of the work
-           list */
-        spin_lock(&svc->srv_at_lock);
-        while (!list_empty(&work_list)) {
-                rq = list_entry(work_list.next, struct ptlrpc_request,
-                                rq_timed_list);
-                list_del_init(&rq->rq_timed_list);
-                /* if the entry is still in the worklist, it hasn't been
-                   deleted, and is safe to take a ref to keep the req around */
-                atomic_inc(&rq->rq_refcount);
-                spin_unlock(&svc->srv_at_lock);
-
-                if (ptlrpc_at_send_early_reply(rq, at_extra) == 0)
-                        ptlrpc_at_add_timed(rq);
-
-                ptlrpc_server_req_decref(rq);
-                spin_lock(&svc->srv_at_lock);
-        }
-        spin_unlock(&svc->srv_at_lock);
-
-        RETURN(0);      
-}
-
-/* Handle freshly incoming reqs, add to timed early reply list,
-   pass on to regular request queue */
-static int
-ptlrpc_server_handle_req_in(struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request *req;
-        __u32                  deadline;
-        int                    rc;
-        ENTRY;
-
-        LASSERT(svc);
-
-        spin_lock(&svc->srv_lock);
-        if (list_empty(&svc->srv_req_in_queue)) {
-                spin_unlock(&svc->srv_lock);
-                RETURN(0);
-        }
-
-        req = list_entry(svc->srv_req_in_queue.next,
-                         struct ptlrpc_request, rq_list);
-        list_del_init (&req->rq_list);
-        /* Consider this still a "queued" request as far as stats are
-           concerned */
-        spin_unlock(&svc->srv_lock);
-        
-        /* Clear request swab mask; this is a new request */
-        req->rq_req_swab_mask = 0;
-
-        rc = lustre_unpack_msg(req->rq_reqmsg, req->rq_reqlen);
-        if (rc != 0) {
-                CERROR ("error unpacking request: ptl %d from %s"
-                        " xid "LPU64"\n", svc->srv_req_portal,
-                        libcfs_id2str(req->rq_peer), req->rq_xid);
-                goto err_req;
-        }
-
-        rc = lustre_unpack_req_ptlrpc_body(req, MSG_PTLRPC_BODY_OFF);
-        if (rc) {
-                CERROR ("error unpacking ptlrpc body: ptl %d from %s"
-                        " xid "LPU64"\n", svc->srv_req_portal,
-                        libcfs_id2str(req->rq_peer), req->rq_xid);
-                goto err_req;
-        }
-
-        rc = -EINVAL;
-        if (lustre_msg_get_type(req->rq_reqmsg) != PTL_RPC_MSG_REQUEST) {
-                CERROR("wrong packet type received (type=%u) from %s\n",
-                       lustre_msg_get_type(req->rq_reqmsg),
-                       libcfs_id2str(req->rq_peer));
-                goto err_req;
-        }
-
-        CDEBUG(D_NET, "got req "LPD64"\n", req->rq_xid);
-        
-        req->rq_export = class_conn2export(
-                lustre_msg_get_handle(req->rq_reqmsg));
-        if (req->rq_export) {
-                rc = ptlrpc_check_req(req);
-                class_export_put(req->rq_export);
-                req->rq_export = NULL;
-                if (rc) 
-                        goto err_req;
-        }
-
-        /* req_in handling should/must be fast */
-        if (cfs_time_current_sec() - req->rq_arrival_time.tv_sec > 5) 
-                DEBUG_REQ(D_WARNING, req, "Slow req_in handling %lus",
-                          cfs_time_current_sec() - req->rq_arrival_time.tv_sec);
-
-        /* Set rpc server deadline and add it to the timed list */
-        deadline = (lustre_msghdr_get_flags(req->rq_reqmsg) &
-                    MSGHDR_AT_SUPPORT) ? 
-                   /* The max time the client expects us to take */
-                   lustre_msg_get_timeout(req->rq_reqmsg) : obd_timeout;
-        LASSERT(deadline > 0);
-        req->rq_deadline = req->rq_arrival_time.tv_sec + deadline;
-        
-        ptlrpc_at_add_timed(req);
-
-        /* Move it over to the request processing queue */
-        spin_lock(&svc->srv_lock);
-        list_add_tail(&req->rq_list, &svc->srv_request_queue);
-        cfs_waitq_signal(&svc->srv_waitq);
-        spin_unlock(&svc->srv_lock);
-        RETURN(1);
-
-err_req:
-        spin_lock(&svc->srv_lock);
-        svc->srv_n_queued_reqs--;
-        svc->srv_n_active_reqs++;
-        spin_unlock(&svc->srv_lock);
-        ptlrpc_server_free_request(req);
-
-        RETURN(1);
-}
-
-static int
-ptlrpc_server_handle_request(struct ptlrpc_service *svc,
-                             struct ptlrpc_thread *thread)
-{
-        struct obd_export     *export = NULL;
-        struct ptlrpc_request *request;
-        struct timeval         work_start;
-        struct timeval         work_end;
-        long                   timediff;
-        int                    rc;
-        ENTRY;
-
-        LASSERT(svc);
-
-        spin_lock(&svc->srv_lock);
-        if (list_empty (&svc->srv_request_queue) ||
-            (
-#ifndef __KERNEL__
-             /* !@%$# liblustre only has 1 thread */
-             svc->srv_n_difficult_replies != 0 &&
-#endif
-             svc->srv_n_active_reqs >= (svc->srv_threads_running - 1))) {
-                /* Don't handle regular requests in the last thread, in order               * remain free to handle any 'difficult' replies (that might
-                 * to handle difficult replies (which might block other threads)
-                 * as well as handle any incoming reqs, early replies, etc. 
-                 * That means we always need at least 2 service threads. */
-                spin_unlock(&svc->srv_lock);
-                RETURN(0);
-        }
-
-        request = list_entry (svc->srv_request_queue.next,
-                              struct ptlrpc_request, rq_list);
-        list_del_init (&request->rq_list);
-        svc->srv_n_queued_reqs--;
-        svc->srv_n_active_reqs++;
-
-        spin_unlock(&svc->srv_lock);
-
-        do_gettimeofday(&work_start);
-        timediff = cfs_timeval_sub(&work_start, &request->rq_arrival_time,NULL);
-        if (svc->srv_stats != NULL) {
-                lprocfs_counter_add(svc->srv_stats, PTLRPC_REQWAIT_CNTR,
-                                    timediff);
-                lprocfs_counter_add(svc->srv_stats, PTLRPC_REQQDEPTH_CNTR,
-                                    svc->srv_n_queued_reqs);
-                lprocfs_counter_add(svc->srv_stats, PTLRPC_REQACTIVE_CNTR,
-                                    svc->srv_n_active_reqs);
-                lprocfs_counter_add(svc->srv_stats, PTLRPC_TIMEOUT,
-                                    at_get(&svc->srv_at_estimate));
-        }
-        
-        CDEBUG(D_NET, "got req "LPD64"\n", request->rq_xid);
-        
-        request->rq_svc_thread = thread;
-        request->rq_export = class_conn2export(
-                                     lustre_msg_get_handle(request->rq_reqmsg));
-
-        if (request->rq_export) {
-                if (ptlrpc_check_req(request))
-                        goto put_conn;
-                ptlrpc_update_export_timer(request->rq_export, timediff >> 19);
-                export = class_export_rpc_get(request->rq_export);
-        }
-
-        /* Discard requests queued for longer than the deadline.  
-           The deadline is increased if we send an early reply. */
-        if (cfs_time_current_sec() > request->rq_deadline) {
-                DEBUG_REQ(D_ERROR, request, "Dropping timed-out request from %s"
-                          ": deadline %ld%+lds ago\n",
-                          libcfs_id2str(request->rq_peer),
-                          request->rq_deadline -
-                          request->rq_arrival_time.tv_sec,
-                          cfs_time_current_sec() - request->rq_deadline);
-                goto put_rpc_export;
-        }
-
-        request->rq_phase = RQ_PHASE_INTERPRET;
-
-        CDEBUG(D_RPCTRACE, "Handling RPC pname:cluuid+ref:pid:xid:nid:opc "
-               "%s:%s+%d:%d:x"LPU64":%s:%d\n", cfs_curproc_comm(),
-               (request->rq_export ?
-                (char *)request->rq_export->exp_client_uuid.uuid : "0"),
-               (request->rq_export ?
-                atomic_read(&request->rq_export->exp_refcount) : -99),
-               lustre_msg_get_status(request->rq_reqmsg), request->rq_xid,
-               libcfs_id2str(request->rq_peer),
-               lustre_msg_get_opc(request->rq_reqmsg));
-
-        OBD_FAIL_TIMEOUT_MS(OBD_FAIL_PTLRPC_PAUSE_REQ, obd_fail_val);
-
-        rc = svc->srv_handler(request);
-        
-        request->rq_phase = RQ_PHASE_COMPLETE;
-
-        CDEBUG(D_RPCTRACE, "Handled RPC pname:cluuid+ref:pid:xid:nid:opc "
-               "%s:%s+%d:%d:x"LPU64":%s:%d\n", cfs_curproc_comm(),
-               (request->rq_export ?
-                (char *)request->rq_export->exp_client_uuid.uuid : "0"),
-               (request->rq_export ?
-                atomic_read(&request->rq_export->exp_refcount) : -99),
-               lustre_msg_get_status(request->rq_reqmsg), request->rq_xid,
-               libcfs_id2str(request->rq_peer),
-               lustre_msg_get_opc(request->rq_reqmsg));
-
-put_rpc_export:
-        if (export != NULL)
-                class_export_rpc_put(export);
-
-put_conn:
-        if (request->rq_export != NULL)
-                class_export_put(request->rq_export);
-
-        if (cfs_time_current_sec() > request->rq_deadline) {
-                DEBUG_REQ(D_WARNING, request, "Request x"LPU64" took longer "
-                          "than estimated (%ld%+lds); client may timeout.",
-                          request->rq_xid, request->rq_deadline -
-                          request->rq_arrival_time.tv_sec,
-                          cfs_time_current_sec() - request->rq_deadline);
-        }
-
-        do_gettimeofday(&work_end);
-        timediff = cfs_timeval_sub(&work_end, &work_start, NULL);
-        CDEBUG(D_RPCTRACE, "request x"LPU64" opc %u from %s processed in "
-               "%ldus (%ldus total) trans "LPU64" rc %d/%d\n",
-               request->rq_xid, lustre_msg_get_opc(request->rq_reqmsg),
-               libcfs_id2str(request->rq_peer), timediff,
-               cfs_timeval_sub(&work_end, &request->rq_arrival_time, NULL),
-               request->rq_repmsg ? lustre_msg_get_transno(request->rq_repmsg) :
-               request->rq_transno, request->rq_status,
-               request->rq_repmsg ? lustre_msg_get_status(request->rq_repmsg): 
-               -999);
-        if (svc->srv_stats != NULL) {
-                __u32 op = lustre_msg_get_opc(request->rq_reqmsg);
-                int opc = opcode_offset(op);
-                if (opc > 0 && !(op == LDLM_ENQUEUE || op == MDS_REINT)) {
-                        LASSERT(opc < LUSTRE_MAX_OPCODES);
-                        lprocfs_counter_add(svc->srv_stats,
-                                            opc + EXTRA_MAX_OPCODES,
-                                            timediff);
-                }
-        }
-        if (request->rq_early_count) {
-                DEBUG_REQ(D_ADAPTTO, request, 
-                          "sent %d early replies before finishing in %lds",
-                          request->rq_early_count,
-                          work_end.tv_sec - request->rq_arrival_time.tv_sec);
-        }
-
-        ptlrpc_server_free_request(request);
-
-        RETURN(1);
-}
-
-static int
-ptlrpc_server_handle_reply (struct ptlrpc_service *svc)
-{
-        struct ptlrpc_reply_state *rs;
-        struct obd_export         *exp;
-        struct obd_device         *obd;
-        int                        nlocks;
-        int                        been_handled;
-        ENTRY;
-
-        spin_lock(&svc->srv_lock);
-        if (list_empty (&svc->srv_reply_queue)) {
-                spin_unlock(&svc->srv_lock);
-                RETURN(0);
-        }
-
-        rs = list_entry (svc->srv_reply_queue.next,
-                         struct ptlrpc_reply_state, rs_list);
-
-        exp = rs->rs_export;
-        obd = exp->exp_obd;
-
-        LASSERT (rs->rs_difficult);
-        LASSERT (rs->rs_scheduled);
-
-        list_del_init (&rs->rs_list);
-
-        /* Disengage from notifiers carefully (lock order - irqrestore below!)*/
-        spin_unlock(&svc->srv_lock);
-
-        spin_lock (&obd->obd_uncommitted_replies_lock);
-        /* Noop if removed already */
-        list_del_init (&rs->rs_obd_list);
-        spin_unlock (&obd->obd_uncommitted_replies_lock);
-
-        spin_lock (&exp->exp_lock);
-        /* Noop if removed already */
-        list_del_init (&rs->rs_exp_list);
-        spin_unlock (&exp->exp_lock);
-
-        spin_lock(&svc->srv_lock);
-
-        been_handled = rs->rs_handled;
-        rs->rs_handled = 1;
-
-        nlocks = rs->rs_nlocks;                 /* atomic "steal", but */
-        rs->rs_nlocks = 0;                      /* locks still on rs_locks! */
-
-        if (nlocks == 0 && !been_handled) {
-                /* If we see this, we should already have seen the warning
-                 * in mds_steal_ack_locks()  */
-                CWARN("All locks stolen from rs %p x"LPD64".t"LPD64
-                      " o%d NID %s\n",
-                      rs,
-                      rs->rs_xid, rs->rs_transno,
-                      lustre_msg_get_opc(rs->rs_msg),
-                      libcfs_nid2str(exp->exp_connection->c_peer.nid));
-        }
-
-        if ((!been_handled && rs->rs_on_net) || nlocks > 0) {
-                spin_unlock(&svc->srv_lock);
-
-                if (!been_handled && rs->rs_on_net) {
-                        LNetMDUnlink(rs->rs_md_h);
-                        /* Ignore return code; we're racing with
-                         * completion... */
-                }
-
-                while (nlocks-- > 0)
-                        ldlm_lock_decref(&rs->rs_locks[nlocks],
-                                         rs->rs_modes[nlocks]);
-
-                spin_lock(&svc->srv_lock);
-        }
-
-        rs->rs_scheduled = 0;
-
-        if (!rs->rs_on_net) {
-                /* Off the net */
-                svc->srv_n_difficult_replies--;
-                spin_unlock(&svc->srv_lock);
-
-                class_export_put (exp);
-                rs->rs_export = NULL;
-                ptlrpc_rs_decref (rs);
-                atomic_dec (&svc->srv_outstanding_replies);
-                RETURN(1);
-        }
-
-        /* still on the net; callback will schedule */
-        spin_unlock(&svc->srv_lock);
-        RETURN(1);
-}
-
-#ifndef __KERNEL__
-/* FIXME make use of timeout later */
-int
-liblustre_check_services (void *arg)
-{
-        int  did_something = 0;
-        int  rc;
-        struct list_head *tmp, *nxt;
-        ENTRY;
-
-        /* I'm relying on being single threaded, not to have to lock
-         * ptlrpc_all_services etc */
-        list_for_each_safe (tmp, nxt, &ptlrpc_all_services) {
-                struct ptlrpc_service *svc =
-                        list_entry (tmp, struct ptlrpc_service, srv_list);
-
-                if (svc->srv_threads_running != 0)     /* I've recursed */
-                        continue;
-
-                /* service threads can block for bulk, so this limits us
-                 * (arbitrarily) to recursing 1 stack frame per service.
-                 * Note that the problem with recursion is that we have to
-                 * unwind completely before our caller can resume. */
-
-                svc->srv_threads_running++;
-
-                do {
-                        rc = ptlrpc_server_handle_req_in(svc);
-                        rc |= ptlrpc_server_handle_reply(svc);
-                        rc |= ptlrpc_at_check_timed(svc);
-                        rc |= ptlrpc_server_handle_request(svc, NULL);
-                        rc |= (ptlrpc_server_post_idle_rqbds(svc) > 0);
-                        did_something |= rc;
-                } while (rc);
-
-                svc->srv_threads_running--;
-        }
-
-        RETURN(did_something);
-}
-#define ptlrpc_stop_all_threads(s) do {} while (0)
-
-#else /* __KERNEL__ */
-
-/* Don't use daemonize, it removes fs struct from new thread (bug 418) */
-void ptlrpc_daemonize(char *name)
-{
-        struct fs_struct *fs = current->fs;
-
-        atomic_inc(&fs->count);
-        cfs_daemonize(name);
-        exit_fs(cfs_current());
-        current->fs = fs;
-        ll_set_fs_pwd(current->fs, init_task.fs->pwdmnt, init_task.fs->pwd);
-}
-
-static void
-ptlrpc_check_rqbd_pool(struct ptlrpc_service *svc)
-{
-        int avail = svc->srv_nrqbd_receiving;
-        int low_water = test_req_buffer_pressure ? 0 :
-                        svc->srv_nbuf_per_group/2;
-
-        /* NB I'm not locking; just looking. */
-
-        /* CAVEAT EMPTOR: We might be allocating buffers here because we've
-         * allowed the request history to grow out of control.  We could put a
-         * sanity check on that here and cull some history if we need the
-         * space. */
-
-        if (avail <= low_water)
-                ptlrpc_grow_req_bufs(svc);
-
-        if (svc->srv_stats)
-                lprocfs_counter_add(svc->srv_stats, PTLRPC_REQBUF_AVAIL_CNTR,
-                                    avail);
-}
-
-static int
-ptlrpc_retry_rqbds(void *arg)
-{
-        struct ptlrpc_service *svc = (struct ptlrpc_service *)arg;
-
-        svc->srv_rqbd_timeout = 0;
-        return (-ETIMEDOUT);
-}
-
-static int ptlrpc_main(void *arg)
-{
-        struct ptlrpc_svc_data *data = (struct ptlrpc_svc_data *)arg;
-        struct ptlrpc_service  *svc = data->svc;
-        struct ptlrpc_thread   *thread = data->thread;
-        struct obd_device      *dev = data->dev;
-        struct ptlrpc_reply_state *rs;
-        struct lc_watchdog     *watchdog;
-#ifdef WITH_GROUP_INFO
-        struct group_info *ginfo = NULL;
-#endif
-        int counter = 0, rc = 0;
-        ENTRY;
-
-        ptlrpc_daemonize(data->name);
-
-#if defined(HAVE_NODE_TO_CPUMASK) && defined(CONFIG_NUMA)
-        /* we need to do this before any per-thread allocation is done so that
-         * we get the per-thread allocations on local node.  bug 7342 */
-        if (svc->srv_cpu_affinity) {
-                int cpu, num_cpu;
-
-                for (cpu = 0, num_cpu = 0; cpu < num_possible_cpus(); cpu++) {
-                        if (!cpu_online(cpu))
-                                continue;
-                        if (num_cpu == thread->t_id % num_online_cpus())
-                                break;
-                        num_cpu++;
-                }
-                set_cpus_allowed(cfs_current(), node_to_cpumask(cpu_to_node(cpu)));
-        }
-#endif
-
-#ifdef WITH_GROUP_INFO
-        ginfo = groups_alloc(0);
-        if (!ginfo) {
-                rc = -ENOMEM;
-                goto out;
-        }
-
-        set_current_groups(ginfo);
-        put_group_info(ginfo);
-#endif
-
-        if (svc->srv_init != NULL) {
-                rc = svc->srv_init(thread);
-                if (rc)
-                        goto out;
-        }
-
-        /* Alloc reply state structure for this one */
-        OBD_ALLOC_GFP(rs, svc->srv_max_reply_size, CFS_ALLOC_STD);
-        if (!rs) {
-                rc = -ENOMEM;
-                goto out_srv_init;
-        }
-
-        /* Record that the thread is running */
-        thread->t_flags = SVC_RUNNING;
-        /*
-         * wake up our creator. Note: @data is invalid after this point,
-         * because it's allocated on ptlrpc_start_thread() stack.
-         */
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-
-        watchdog = lc_watchdog_add(max_t(int, obd_timeout, AT_OFF ? 0 : 
-                                   at_get(&svc->srv_at_estimate)) * 
-                                   svc->srv_watchdog_factor, NULL, NULL);
-
-        spin_lock(&svc->srv_lock);
-        svc->srv_threads_running++;
-        list_add(&rs->rs_list, &svc->srv_free_rs_list);
-        spin_unlock(&svc->srv_lock);
-        cfs_waitq_signal(&svc->srv_free_rs_waitq);
-
-        CDEBUG(D_NET, "service thread %d (#%d) started\n", thread->t_id,
-               svc->srv_threads_running);
-
-        /* XXX maintain a list of all managed devices: insert here */
-
-        while ((thread->t_flags & SVC_STOPPING) == 0 ||
-               svc->srv_n_difficult_replies != 0) {
-                /* Don't exit while there are replies to be handled */
-                struct l_wait_info lwi = LWI_TIMEOUT(svc->srv_rqbd_timeout,
-                                                     ptlrpc_retry_rqbds, svc);
-
-                lc_watchdog_disable(watchdog);
-
-                cond_resched();
-
-                l_wait_event_exclusive (svc->srv_waitq,
-                              ((thread->t_flags & SVC_STOPPING) != 0 &&
-                               svc->srv_n_difficult_replies == 0) ||
-                              (!list_empty(&svc->srv_idle_rqbds) &&
-                               svc->srv_rqbd_timeout == 0) ||
-                              !list_empty(&svc->srv_req_in_queue) ||
-                              !list_empty(&svc->srv_reply_queue) ||
-                              (!list_empty(&svc->srv_request_queue) &&
-                               (svc->srv_n_active_reqs <
-                                (svc->srv_threads_running - 1))) ||
-                              svc->srv_at_check,
-                              &lwi);
-
-                lc_watchdog_touch_ms(watchdog, max_t(int, obd_timeout,
-                                     AT_OFF ? 0 : 
-                                     at_get(&svc->srv_at_estimate)) * 
-                                     svc->srv_watchdog_factor);
-
-                ptlrpc_check_rqbd_pool(svc);
-
-                if ((svc->srv_threads_started < svc->srv_threads_max) &&
-                    (svc->srv_n_active_reqs >= (svc->srv_threads_started - 1))){
-                        /* Ignore return code - we tried... */
-                        ptlrpc_start_thread(dev, svc);
-                }
-
-                if (!list_empty(&svc->srv_reply_queue))
-                        ptlrpc_server_handle_reply (svc);
-
-                if (!list_empty(&svc->srv_req_in_queue)) {
-                        /* Process all incoming reqs before handling any */
-                        ptlrpc_server_handle_req_in(svc);
-                        /* but limit ourselves in case of flood */ 
-                        if (counter++ < 1000)
-                                continue;
-                        counter = 0;
-                }
-
-                if (svc->srv_at_check) 
-                        ptlrpc_at_check_timed(svc);
-
-                /* don't handle requests in the last thread */
-                if (!list_empty (&svc->srv_request_queue) &&
-                    (svc->srv_n_active_reqs < (svc->srv_threads_running - 1)))
-                        ptlrpc_server_handle_request(svc, thread);
-
-                if (!list_empty(&svc->srv_idle_rqbds) &&
-                    ptlrpc_server_post_idle_rqbds(svc) < 0) {
-                        /* I just failed to repost request buffers.  Wait
-                         * for a timeout (unless something else happens)
-                         * before I try again */
-                        svc->srv_rqbd_timeout = cfs_time_seconds(1)/10;
-                        CDEBUG(D_RPCTRACE,"Posted buffers: %d\n",
-                               svc->srv_nrqbd_receiving);
-                }
-        }
-
-        lc_watchdog_delete(watchdog);
-
-out_srv_init:
-        /*
-         * deconstruct service specific state created by ptlrpc_start_thread()
-         */
-        if (svc->srv_done != NULL)
-                svc->srv_done(thread);
-
-out:
-        CDEBUG(D_NET, "service thread %d exiting: rc %d\n", thread->t_id, rc);
-
-        spin_lock(&svc->srv_lock);
-        svc->srv_threads_running--;              /* must know immediately */
-        thread->t_id = rc;
-        thread->t_flags = SVC_STOPPED;
-
-        cfs_waitq_signal(&thread->t_ctl_waitq);
-        spin_unlock(&svc->srv_lock);
-
-        return rc;
-}
-
-static void ptlrpc_stop_thread(struct ptlrpc_service *svc,
-                               struct ptlrpc_thread *thread)
-{
-        struct l_wait_info lwi = { 0 };
-
-        spin_lock(&svc->srv_lock);
-        thread->t_flags = SVC_STOPPING;
-        spin_unlock(&svc->srv_lock);
-
-        cfs_waitq_broadcast(&svc->srv_waitq);
-        l_wait_event(thread->t_ctl_waitq, (thread->t_flags & SVC_STOPPED),
-                     &lwi);
-
-        spin_lock(&svc->srv_lock);
-        list_del(&thread->t_link);
-        spin_unlock(&svc->srv_lock);
-
-        OBD_FREE(thread, sizeof(*thread));
-}
-
-void ptlrpc_stop_all_threads(struct ptlrpc_service *svc)
-{
-        struct ptlrpc_thread *thread;
-
-        spin_lock(&svc->srv_lock);
-        while (!list_empty(&svc->srv_threads)) {
-                thread = list_entry(svc->srv_threads.next,
-                                    struct ptlrpc_thread, t_link);
-
-                spin_unlock(&svc->srv_lock);
-                ptlrpc_stop_thread(svc, thread);
-                spin_lock(&svc->srv_lock);
-        }
-
-        spin_unlock(&svc->srv_lock);
-}
-
-int ptlrpc_start_threads(struct obd_device *dev, struct ptlrpc_service *svc)
-{
-        int i, rc = 0;
-        ENTRY;
-
-        /* We require 2 threads min - see note in 
-           ptlrpc_server_handle_request */
-        LASSERT(svc->srv_threads_min >= 2);
-        for (i = 0; i < svc->srv_threads_min; i++) {
-                rc = ptlrpc_start_thread(dev, svc);
-                if (rc) {
-                        CERROR("cannot start %s thread #%d: rc %d\n",
-                               svc->srv_thread_name, i, rc);
-                        ptlrpc_stop_all_threads(svc);
-                }
-        }
-        RETURN(rc);
-}
-
-int ptlrpc_start_thread(struct obd_device *dev, struct ptlrpc_service *svc)
-{
-        struct l_wait_info lwi = { 0 };
-        struct ptlrpc_svc_data d;
-        struct ptlrpc_thread *thread;
-        char name[32];
-        int id, rc;
-        ENTRY;
-
-        CDEBUG(D_RPCTRACE, "%s started %d min %d max %d running %d\n",
-               svc->srv_name, svc->srv_threads_started, svc->srv_threads_min,
-               svc->srv_threads_max, svc->srv_threads_running);
-        if (svc->srv_threads_started >= svc->srv_threads_max)
-                RETURN(-EMFILE);
-
-        OBD_ALLOC(thread, sizeof(*thread));
-        if (thread == NULL)
-                RETURN(-ENOMEM);
-        cfs_waitq_init(&thread->t_ctl_waitq);
-
-        spin_lock(&svc->srv_lock);
-        if (svc->srv_threads_started >= svc->srv_threads_max) {
-                spin_unlock(&svc->srv_lock);
-                OBD_FREE(thread, sizeof(*thread));
-                RETURN(-EMFILE);
-        }
-        list_add(&thread->t_link, &svc->srv_threads);
-        id = svc->srv_threads_started++;
-        spin_unlock(&svc->srv_lock);
-
-        thread->t_id = id;
-        sprintf(name, "%s_%02d", svc->srv_thread_name, id);
-        d.dev = dev;
-        d.svc = svc;
-        d.name = name;
-        d.thread = thread;
-
-        CDEBUG(D_RPCTRACE, "starting thread '%s'\n", name);
-        
-        /* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
-         * just drop the VM and FILES in ptlrpc_daemonize() right away.
-         */
-        rc = cfs_kernel_thread(ptlrpc_main, &d, CLONE_VM | CLONE_FILES);
-        if (rc < 0) {
-                CERROR("cannot start thread '%s': rc %d\n", name, rc);
-
-                spin_lock(&svc->srv_lock);
-                list_del(&thread->t_link);
-                --svc->srv_threads_started;
-                spin_unlock(&svc->srv_lock);
-
-                OBD_FREE(thread, sizeof(*thread));
-                RETURN(rc);
-        }
-        l_wait_event(thread->t_ctl_waitq,
-                     thread->t_flags & (SVC_RUNNING | SVC_STOPPED), &lwi);
-
-        rc = (thread->t_flags & SVC_STOPPED) ? thread->t_id : 0;
-        RETURN(rc);
-}
-#endif
-
-int ptlrpc_unregister_service(struct ptlrpc_service *service)
-{
-        int                   rc;
-        struct l_wait_info    lwi;
-        struct list_head     *tmp;
-        struct ptlrpc_reply_state *rs, *t;
-
-        cfs_timer_disarm(&service->srv_at_timer);
-
-        ptlrpc_stop_all_threads(service);
-        LASSERT(list_empty(&service->srv_threads));
-
-        spin_lock (&ptlrpc_all_services_lock);
-        list_del_init (&service->srv_list);
-        spin_unlock (&ptlrpc_all_services_lock);
-
-        ptlrpc_lprocfs_unregister_service(service);
-
-        /* All history will be culled when the next request buffer is
-         * freed */
-        service->srv_max_history_rqbds = 0;
-
-        CDEBUG(D_NET, "%s: tearing down\n", service->srv_name);
-
-        rc = LNetClearLazyPortal(service->srv_req_portal);
-        LASSERT (rc == 0);
-
-        /* Unlink all the request buffers.  This forces a 'final' event with
-         * its 'unlink' flag set for each posted rqbd */
-        list_for_each(tmp, &service->srv_active_rqbds) {
-                struct ptlrpc_request_buffer_desc *rqbd =
-                        list_entry(tmp, struct ptlrpc_request_buffer_desc, 
-                                   rqbd_list);
-
-                rc = LNetMDUnlink(rqbd->rqbd_md_h);
-                LASSERT (rc == 0 || rc == -ENOENT);
-        }
-
-        /* Wait for the network to release any buffers it's currently
-         * filling */
-        for (;;) {
-                spin_lock(&service->srv_lock);
-                rc = service->srv_nrqbd_receiving;
-                spin_unlock(&service->srv_lock);
-
-                if (rc == 0)
-                        break;
-
-                /* Network access will complete in finite time but the HUGE
-                 * timeout lets us CWARN for visibility of sluggish NALs */
-                lwi = LWI_TIMEOUT(cfs_time_seconds(LONG_UNLINK), NULL, NULL);
-                rc = l_wait_event(service->srv_waitq,
-                                  service->srv_nrqbd_receiving == 0,
-                                  &lwi);
-                if (rc == -ETIMEDOUT)
-                        CWARN("Service %s waiting for request buffers\n",
-                              service->srv_name);
-        }
-
-        /* schedule all outstanding replies to terminate them */
-        spin_lock(&service->srv_lock);
-        while (!list_empty(&service->srv_active_replies)) {
-                struct ptlrpc_reply_state *rs =
-                        list_entry(service->srv_active_replies.next,
-                                   struct ptlrpc_reply_state, rs_list);
-                ptlrpc_schedule_difficult_reply(rs);
-        }
-        spin_unlock(&service->srv_lock);
-
-        /* purge the request queue.  NB No new replies (rqbds all unlinked)
-         * and no service threads, so I'm the only thread noodling the
-         * request queue now */
-        while (!list_empty(&service->srv_req_in_queue)) {
-                struct ptlrpc_request *req =
-                        list_entry(service->srv_req_in_queue.next,
-                                   struct ptlrpc_request,
-                                   rq_list);
-
-                list_del(&req->rq_list);
-                service->srv_n_queued_reqs--;
-                service->srv_n_active_reqs++;
-                ptlrpc_server_free_request(req);
-        }
-        while (!list_empty(&service->srv_request_queue)) {
-                struct ptlrpc_request *req =
-                        list_entry(service->srv_request_queue.next,
-                                   struct ptlrpc_request,
-                                   rq_list);
-
-                list_del(&req->rq_list);
-                service->srv_n_queued_reqs--;
-                service->srv_n_active_reqs++;
-                ptlrpc_server_free_request(req);
-        }
-        LASSERT(service->srv_n_queued_reqs == 0);
-        LASSERT(service->srv_n_active_reqs == 0);
-        LASSERT(service->srv_n_history_rqbds == 0);
-        LASSERT(list_empty(&service->srv_active_rqbds));
-
-        /* Now free all the request buffers since nothing references them
-         * any more... */
-        while (!list_empty(&service->srv_idle_rqbds)) {
-                struct ptlrpc_request_buffer_desc *rqbd =
-                        list_entry(service->srv_idle_rqbds.next,
-                                   struct ptlrpc_request_buffer_desc,
-                                   rqbd_list);
-
-                ptlrpc_free_rqbd(rqbd);
-        }
-
-        /* wait for all outstanding replies to complete (they were
-         * scheduled having been flagged to abort above) */
-        while (atomic_read(&service->srv_outstanding_replies) != 0) {
-                struct l_wait_info lwi = LWI_TIMEOUT(cfs_time_seconds(10), NULL, NULL);
-
-                rc = l_wait_event(service->srv_waitq,
-                                  !list_empty(&service->srv_reply_queue), &lwi);
-                LASSERT(rc == 0 || rc == -ETIMEDOUT);
-
-                if (rc == 0) {
-                        ptlrpc_server_handle_reply(service);
-                        continue;
-                }
-                CWARN("Unexpectedly long timeout %p\n", service);
-        }
-
-        list_for_each_entry_safe(rs, t, &service->srv_free_rs_list, rs_list) {
-                list_del(&rs->rs_list);
-                OBD_FREE(rs, service->srv_max_reply_size);
-        }
-
-        /* In case somebody rearmed this in the meantime */
-        cfs_timer_disarm(&service->srv_at_timer);
-
-        OBD_FREE(service, sizeof(*service));
-        return 0;
-}
-
-/* Returns 0 if the service is healthy.
- *
- * Right now, it just checks to make sure that requests aren't languishing
- * in the queue.  We'll use this health check to govern whether a node needs
- * to be shot, so it's intentionally non-aggressive. */
-int ptlrpc_service_health_check(struct ptlrpc_service *svc)
-{
-        struct ptlrpc_request *request;
-        struct timeval         right_now;
-        long                   timediff;
-
-        if (svc == NULL)
-                return 0;
-
-        do_gettimeofday(&right_now);
-
-        spin_lock(&svc->srv_lock);
-        if (list_empty(&svc->srv_request_queue)) {
-                spin_unlock(&svc->srv_lock);
-                return 0;
-        }
-        
-        /* How long has the next entry been waiting? */
-        request = list_entry(svc->srv_request_queue.next,
-                             struct ptlrpc_request, rq_list);
-        timediff = cfs_timeval_sub(&right_now, &request->rq_arrival_time, NULL);
-        spin_unlock(&svc->srv_lock);
-
-        if ((timediff / ONE_MILLION) > (AT_OFF ? obd_timeout * 3/2 : 
-                                        at_max)) {
-                CERROR("%s: unhealthy - request has been waiting %lds\n",
-                       svc->srv_name, timediff / ONE_MILLION);
-                return (-1);
-        }
-
-        return 0;
-}
diff --git a/lustre/ptlrpc/wirehdr.c b/lustre/ptlrpc/wirehdr.c
deleted file mode 100644
index a674953085d8dfbb5a2b60f2144649fd90d009b4..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/wirehdr.c
+++ /dev/null
@@ -1,28 +0,0 @@
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#ifdef __KERNEL__
-# ifndef AUTOCONF_INCLUDED
-#  include <linux/config.h>
-# endif
-# ifdef CONFIG_FS_POSIX_ACL
-#  include <linux/fs.h>
-#  ifdef HAVE_XATTR_ACL
-#   include <linux/xattr_acl.h>
-#  else
-#   define xattr_acl_entry  posix_acl_xattr_entry
-#   define xattr_acl_header posix_acl_xattr_header
-#  endif
-#  ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
-#   include <linux/posix_acl_xattr.h>
-#  endif
-# endif
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lustre_disk.h>
-
diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c
deleted file mode 100644
index 243af8c0e3904ff29e62a57a07e9bfb1845800c9..0000000000000000000000000000000000000000
--- a/lustre/ptlrpc/wiretest.c
+++ /dev/null
@@ -1,2234 +0,0 @@
-#define DEBUG_SUBSYSTEM S_RPC
-#ifndef __KERNEL__
-# include <liblustre.h>
-#endif
-
-#ifdef __KERNEL__
-# ifndef AUTOCONF_INCLUDED
-#  include <linux/config.h>
-# endif
-# ifdef CONFIG_FS_POSIX_ACL
-#  include <linux/fs.h>
-#  ifdef HAVE_XATTR_ACL
-#   include <linux/xattr_acl.h>
-#  else
-#   define xattr_acl_entry  posix_acl_xattr_entry
-#   define xattr_acl_header posix_acl_xattr_header
-#  endif
-#  ifdef HAVE_LINUX_POSIX_ACL_XATTR_H
-#   include <linux/posix_acl_xattr.h>
-#  endif
-# endif
-#endif
-
-#include <obd_support.h>
-#include <obd_class.h>
-#include <lustre_net.h>
-#include <lustre_disk.h>
-
-void lustre_assert_wire_constants(void)
-{
-        /* Wire protocol assertions generated by 'wirecheck'
-         * (make -C lustre/utils newwiretest)
-         * running on Linux xlab.hostel 2.6.23.12-52.fc7 #1 SMP Tue Dec 18 21:18:02 EST 2007 i686 i68
-         * with gcc version 3.4.6 20060404 (Red Hat 3.4.6-7) */
-
-
-        /* Constants... */
-        LASSERTF(LUSTRE_MSG_MAGIC_V1 == 0x0BD00BD0," found %lld\n",
-                 (long long)LUSTRE_MSG_MAGIC_V1);
-        LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0BD00BD3," found %lld\n",
-                 (long long)LUSTRE_MSG_MAGIC_V2);
-        LASSERTF(PTLRPC_MSG_VERSION == 0x00000003," found %lld\n",
-                 (long long)PTLRPC_MSG_VERSION);
-        LASSERTF(MSGHDR_AT_SUPPORT == 1, " found %lld\n",
-                 (long long)MSGHDR_AT_SUPPORT);
-        LASSERTF(PTL_RPC_MSG_REQUEST == 4711, " found %lld\n",
-                 (long long)PTL_RPC_MSG_REQUEST);
-        LASSERTF(PTL_RPC_MSG_ERR == 4712, " found %lld\n",
-                 (long long)PTL_RPC_MSG_ERR);
-        LASSERTF(PTL_RPC_MSG_REPLY == 4713, " found %lld\n",
-                 (long long)PTL_RPC_MSG_REPLY);
-        LASSERTF(MSG_LAST_REPLAY == 1, " found %lld\n",
-                 (long long)MSG_LAST_REPLAY);
-        LASSERTF(MSG_RESENT == 2, " found %lld\n",
-                 (long long)MSG_RESENT);
-        LASSERTF(MSG_REPLAY == 4, " found %lld\n",
-                 (long long)MSG_REPLAY);
-        LASSERTF(MSG_CONNECT_RECOVERING == 1, " found %lld\n",
-                 (long long)MSG_CONNECT_RECOVERING);
-        LASSERTF(MSG_CONNECT_RECONNECT == 2, " found %lld\n",
-                 (long long)MSG_CONNECT_RECONNECT);
-        LASSERTF(MSG_CONNECT_REPLAYABLE == 4, " found %lld\n",
-                 (long long)MSG_CONNECT_REPLAYABLE);
-        LASSERTF(OST_REPLY == 0, " found %lld\n",
-                 (long long)OST_REPLY);
-        LASSERTF(OST_GETATTR == 1, " found %lld\n",
-                 (long long)OST_GETATTR);
-        LASSERTF(OST_SETATTR == 2, " found %lld\n",
-                 (long long)OST_SETATTR);
-        LASSERTF(OST_READ == 3, " found %lld\n",
-                 (long long)OST_READ);
-        LASSERTF(OST_WRITE == 4, " found %lld\n",
-                 (long long)OST_WRITE);
-        LASSERTF(OST_CREATE == 5, " found %lld\n",
-                 (long long)OST_CREATE);
-        LASSERTF(OST_DESTROY == 6, " found %lld\n",
-                 (long long)OST_DESTROY);
-        LASSERTF(OST_GET_INFO == 7, " found %lld\n",
-                 (long long)OST_GET_INFO);
-        LASSERTF(OST_CONNECT == 8, " found %lld\n",
-                 (long long)OST_CONNECT);
-        LASSERTF(OST_DISCONNECT == 9, " found %lld\n",
-                 (long long)OST_DISCONNECT);
-        LASSERTF(OST_PUNCH == 10, " found %lld\n",
-                 (long long)OST_PUNCH);
-        LASSERTF(OST_OPEN == 11, " found %lld\n",
-                 (long long)OST_OPEN);
-        LASSERTF(OST_CLOSE == 12, " found %lld\n",
-                 (long long)OST_CLOSE);
-        LASSERTF(OST_STATFS == 13, " found %lld\n",
-                 (long long)OST_STATFS);
-        LASSERTF(OST_SYNC == 16, " found %lld\n",
-                 (long long)OST_SYNC);
-        LASSERTF(OST_QUOTACHECK == 18, " found %lld\n",
-                 (long long)OST_QUOTACHECK);
-        LASSERTF(OST_QUOTACTL == 19, " found %lld\n",
-                 (long long)OST_QUOTACTL);
-        LASSERTF(OST_QUOTA_ADJUST_QUNIT == 20, " found %lld\n",
-                 (long long)OST_QUOTA_ADJUST_QUNIT);
-        LASSERTF(OST_LAST_OPC == 21, " found %lld\n",
-                 (long long)OST_LAST_OPC);
-        LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL," found %lld\n",
-                 (long long)OBD_OBJECT_EOF);
-        LASSERTF(MDS_GETATTR == 33, " found %lld\n",
-                 (long long)MDS_GETATTR);
-        LASSERTF(MDS_GETATTR_NAME == 34, " found %lld\n",
-                 (long long)MDS_GETATTR_NAME);
-        LASSERTF(MDS_CLOSE == 35, " found %lld\n",
-                 (long long)MDS_CLOSE);
-        LASSERTF(MDS_REINT == 36, " found %lld\n",
-                 (long long)MDS_REINT);
-        LASSERTF(MDS_READPAGE == 37, " found %lld\n",
-                 (long long)MDS_READPAGE);
-        LASSERTF(MDS_CONNECT == 38, " found %lld\n",
-                 (long long)MDS_CONNECT);
-        LASSERTF(MDS_DISCONNECT == 39, " found %lld\n",
-                 (long long)MDS_DISCONNECT);
-        LASSERTF(MDS_GETSTATUS == 40, " found %lld\n",
-                 (long long)MDS_GETSTATUS);
-        LASSERTF(MDS_STATFS == 41, " found %lld\n",
-                 (long long)MDS_STATFS);
-        LASSERTF(MDS_PIN == 42, " found %lld\n",
-                 (long long)MDS_PIN);
-        LASSERTF(MDS_UNPIN == 43, " found %lld\n",
-                 (long long)MDS_UNPIN);
-        LASSERTF(MDS_SYNC == 44, " found %lld\n",
-                 (long long)MDS_SYNC);
-        LASSERTF(MDS_DONE_WRITING == 45, " found %lld\n",
-                 (long long)MDS_DONE_WRITING);
-        LASSERTF(MDS_SET_INFO == 46, " found %lld\n",
-                 (long long)MDS_SET_INFO);
-        LASSERTF(MDS_QUOTACHECK == 47, " found %lld\n",
-                 (long long)MDS_QUOTACHECK);
-        LASSERTF(MDS_QUOTACTL == 48, " found %lld\n",
-                 (long long)MDS_QUOTACTL);
-        LASSERTF(MDS_LAST_OPC == 51, " found %lld\n",
-                 (long long)MDS_LAST_OPC);
-        LASSERTF(REINT_SETATTR == 1, " found %lld\n",
-                 (long long)REINT_SETATTR);
-        LASSERTF(REINT_CREATE == 2, " found %lld\n",
-                 (long long)REINT_CREATE);
-        LASSERTF(REINT_LINK == 3, " found %lld\n",
-                 (long long)REINT_LINK);
-        LASSERTF(REINT_UNLINK == 4, " found %lld\n",
-                 (long long)REINT_UNLINK);
-        LASSERTF(REINT_RENAME == 5, " found %lld\n",
-                 (long long)REINT_RENAME);
-        LASSERTF(REINT_OPEN == 6, " found %lld\n",
-                 (long long)REINT_OPEN);
-        LASSERTF(REINT_MAX == 7, " found %lld\n",
-                 (long long)REINT_MAX);
-        LASSERTF(MGS_CONNECT == 250, " found %lld\n",
-                 (long long)MGS_CONNECT);
-        LASSERTF(MGS_DISCONNECT == 251, " found %lld\n",
-                 (long long)MGS_DISCONNECT);
-        LASSERTF(MGS_EXCEPTION == 252, " found %lld\n",
-                 (long long)MGS_EXCEPTION);
-        LASSERTF(MGS_TARGET_REG == 253, " found %lld\n",
-                 (long long)MGS_TARGET_REG);
-        LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
-                 (long long)MGS_TARGET_DEL);
-        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",
-                 (long long)MGS_SET_INFO);
-        LASSERTF(DISP_IT_EXECD == 1, " found %lld\n",
-                 (long long)DISP_IT_EXECD);
-        LASSERTF(DISP_LOOKUP_EXECD == 2, " found %lld\n",
-                 (long long)DISP_LOOKUP_EXECD);
-        LASSERTF(DISP_LOOKUP_NEG == 4, " found %lld\n",
-                 (long long)DISP_LOOKUP_NEG);
-        LASSERTF(DISP_LOOKUP_POS == 8, " found %lld\n",
-                 (long long)DISP_LOOKUP_POS);
-        LASSERTF(DISP_OPEN_CREATE == 16, " found %lld\n",
-                 (long long)DISP_OPEN_CREATE);
-        LASSERTF(DISP_OPEN_OPEN == 32, " found %lld\n",
-                 (long long)DISP_OPEN_OPEN);
-        LASSERTF(MDS_STATUS_CONN == 1, " found %lld\n",
-                 (long long)MDS_STATUS_CONN);
-        LASSERTF(MDS_STATUS_LOV == 2, " found %lld\n",
-                 (long long)MDS_STATUS_LOV);
-        LASSERTF(LDLM_ENQUEUE == 101, " found %lld\n",
-                 (long long)LDLM_ENQUEUE);
-        LASSERTF(LDLM_CONVERT == 102, " found %lld\n",
-                 (long long)LDLM_CONVERT);
-        LASSERTF(LDLM_CANCEL == 103, " found %lld\n",
-                 (long long)LDLM_CANCEL);
-        LASSERTF(LDLM_BL_CALLBACK == 104, " found %lld\n",
-                 (long long)LDLM_BL_CALLBACK);
-        LASSERTF(LDLM_CP_CALLBACK == 105, " found %lld\n",
-                 (long long)LDLM_CP_CALLBACK);
-        LASSERTF(LDLM_GL_CALLBACK == 106, " found %lld\n",
-                 (long long)LDLM_GL_CALLBACK);
-        LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
-                 (long long)LDLM_LAST_OPC);
-        LASSERTF(LCK_EX == 1, " found %lld\n",
-                 (long long)LCK_EX);
-        LASSERTF(LCK_PW == 2, " found %lld\n",
-                 (long long)LCK_PW);
-        LASSERTF(LCK_PR == 4, " found %lld\n",
-                 (long long)LCK_PR);
-        LASSERTF(LCK_CW == 8, " found %lld\n",
-                 (long long)LCK_CW);
-        LASSERTF(LCK_CR == 16, " found %lld\n",
-                 (long long)LCK_CR);
-        LASSERTF(LCK_NL == 32, " found %lld\n",
-                 (long long)LCK_NL);
-        LASSERTF(LCK_GROUP == 64, " found %lld\n",
-                 (long long)LCK_GROUP);
-        LASSERTF(LCK_MAXMODE == 65, " found %lld\n",
-                 (long long)LCK_MAXMODE);
-        LASSERTF(LCK_MODE_NUM == 7, " found %lld\n",
-                 (long long)LCK_MODE_NUM);
-        CLASSERT(LDLM_PLAIN == 10);
-        CLASSERT(LDLM_EXTENT == 11);
-        CLASSERT(LDLM_FLOCK == 12);
-        CLASSERT(LDLM_IBITS == 13);
-        LASSERTF(OBD_PING == 400, " found %lld\n",
-                 (long long)OBD_PING);
-        LASSERTF(OBD_LOG_CANCEL == 401, " found %lld\n",
-                 (long long)OBD_LOG_CANCEL);
-        LASSERTF(OBD_QC_CALLBACK == 402, " found %lld\n",
-                 (long long)OBD_QC_CALLBACK);
-        LASSERTF(OBD_LAST_OPC == 403, " found %lld\n",
-                 (long long)OBD_LAST_OPC);
-        LASSERTF(QUOTA_DQACQ == 601, " found %lld\n",
-                 (long long)QUOTA_DQACQ);
-        LASSERTF(QUOTA_DQREL == 602, " found %lld\n",
-                 (long long)QUOTA_DQREL);
-        LASSERTF(MGS_CONNECT == 250, " found %lld\n",
-                 (long long)MGS_CONNECT);
-        LASSERTF(MGS_DISCONNECT == 251, " found %lld\n",
-                 (long long)MGS_DISCONNECT);
-        LASSERTF(MGS_EXCEPTION == 252, " found %lld\n",
-                 (long long)MGS_EXCEPTION);
-        LASSERTF(MGS_TARGET_REG == 253, " found %lld\n",
-                 (long long)MGS_TARGET_REG);
-        LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
-                 (long long)MGS_TARGET_DEL);
-        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",
-                 (long long)MGS_SET_INFO);
-        /* Sizes and Offsets */
-
-        /* Checks for struct obd_uuid */
-        LASSERTF((int)sizeof(struct obd_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_uuid));
-
-        /* Checks for struct lustre_handle */
-        LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_handle));
-        LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_handle, cookie));
-        LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));
-
-        /* Checks for struct lustre_msg_v1 */
-        LASSERTF((int)sizeof(struct lustre_msg_v1) == 64, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_msg_v1));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_handle) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_handle));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_magic) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_magic));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_type) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_type));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_type));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_version) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_version));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_version));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_opc) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_opc));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_xid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_last_xid));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_committed) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_last_committed));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_transno) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_transno));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_status) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_status));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_status) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_status));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_flags) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_flags));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_conn_cnt) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_conn_cnt));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_bufcount) == 60, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_bufcount));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_buflens[0]) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_buflens[0]));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]));
-
-        /* Checks for struct lustre_msg_v2 */
-        LASSERTF((int)sizeof(struct lustre_msg_v2) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_msg_v2));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_bufcount) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_bufcount));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_secflvr) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_secflvr));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_magic) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_magic));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_repsize) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_repsize));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_cksum) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_cksum));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_flags) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_flags));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_2) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_2));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_3) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_3));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_buflens[0]) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_buflens[0]));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]));
-        LASSERT(offsetof(struct lustre_msg_v1, lm_magic) == offsetof(struct lustre_msg_v2, lm_magic));
-
-        /* Checks for struct ptlrpc_body */
-        LASSERTF((int)sizeof(struct ptlrpc_body) == 88, " found %lld\n",
-                 (long long)(int)sizeof(struct ptlrpc_body));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_handle) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_handle));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_handle));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_type) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_type));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_type));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_version) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_version));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_version));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_opc) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_opc));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_opc) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_opc));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_status) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_status));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_status) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_status));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_xid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_xid));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_xid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_xid));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_seen) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_seen));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_seen) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_seen));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_committed) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_committed));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_committed) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_committed));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_transno) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_transno));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_transno) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_transno));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_flags) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_flags));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_flags));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_op_flags) == 60, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_op_flags));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_op_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_op_flags));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_conn_cnt) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_conn_cnt));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_conn_cnt) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_conn_cnt));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_timeout) == 68, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_timeout));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_timeout) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_timeout));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_service_time) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_service_time));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_service_time) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_service_time));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_slv) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_slv));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_slv) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_slv));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_limit) == 76, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_limit));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_limit) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_limit));
-
-        /* Checks for struct obd_connect_data */
-        LASSERTF((int)sizeof(struct obd_connect_data) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_connect_data));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_version) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_version));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_version));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_grant));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_index) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_index));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_index));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_brw_size) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_brw_size));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_brw_size) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_brw_size));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_ibits_known) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_ibits_known));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_ibits_known) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_ibits_known));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_nllu) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_nllu));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_nllu) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_nllu));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_nllg) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_nllg));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_nllg) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_nllg));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_transno) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_transno) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_transno));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_group) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_group));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_group) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_group));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_cksum_types) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_cksum_types));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types));
-        LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, padding1));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
-        LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, padding2));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding2) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->padding2));
-        CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL);
-        CLASSERT(OBD_CONNECT_INDEX == 0x2ULL);
-        CLASSERT(OBD_CONNECT_GRANT == 0x8ULL);
-        CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL);
-        CLASSERT(OBD_CONNECT_VERSION == 0x20ULL);
-        CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL);
-        CLASSERT(OBD_CONNECT_ACL == 0x80ULL);
-        CLASSERT(OBD_CONNECT_XATTR == 0x100ULL);
-        CLASSERT(OBD_CONNECT_CROW == 0x200ULL);
-        CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL);
-        CLASSERT(OBD_CONNECT_TRANSNO == 0x800ULL);
-        CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL);
-        CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL);
-        CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL);
-        CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL);
-        CLASSERT(OBD_CONNECT_LCL_CLIENT == 0x10000ULL);
-        CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x20000ULL);
-        CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL);
-        CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL);
-        CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL);
-        CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL);
-        CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL);
-        CLASSERT(OBD_CONNECT_SOM == 0x00800000ULL);
-        CLASSERT(OBD_CONNECT_AT == 0x01000000ULL);
-        CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x02000000ULL);
-        CLASSERT(OBD_CONNECT_MDS_MDS == 0x04000000ULL);
-        CLASSERT(OBD_CONNECT_REAL == 0x08000000ULL);
-        CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
-
-        /* Checks for struct obdo */
-        LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",
-                 (long long)(int)sizeof(struct obdo));
-        LASSERTF((int)offsetof(struct obdo, o_valid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_valid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_valid));
-        LASSERTF((int)offsetof(struct obdo, o_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_id));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_id));
-        LASSERTF((int)offsetof(struct obdo, o_gr) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_gr));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_gr));
-        LASSERTF((int)offsetof(struct obdo, o_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_fid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_fid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_fid));
-        LASSERTF((int)offsetof(struct obdo, o_size) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_size));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_size));
-        LASSERTF((int)offsetof(struct obdo, o_mtime) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_mtime));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_mtime));
-        LASSERTF((int)offsetof(struct obdo, o_atime) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_atime));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_atime));
-        LASSERTF((int)offsetof(struct obdo, o_ctime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_ctime));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_ctime));
-        LASSERTF((int)offsetof(struct obdo, o_blocks) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_blocks));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_blocks));
-        LASSERTF((int)offsetof(struct obdo, o_grant) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_grant));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_grant));
-        LASSERTF((int)offsetof(struct obdo, o_blksize) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_blksize));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_blksize));
-        LASSERTF((int)offsetof(struct obdo, o_mode) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_mode));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_mode));
-        LASSERTF((int)offsetof(struct obdo, o_uid) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_uid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_uid));
-        LASSERTF((int)offsetof(struct obdo, o_gid) == 92, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_gid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_gid));
-        LASSERTF((int)offsetof(struct obdo, o_flags) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_flags));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_flags));
-        LASSERTF((int)offsetof(struct obdo, o_nlink) == 100, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_nlink));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_nlink));
-        LASSERTF((int)offsetof(struct obdo, o_generation) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_generation));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_generation) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_generation));
-        LASSERTF((int)offsetof(struct obdo, o_misc) == 108, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_misc));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_misc));
-        LASSERTF((int)offsetof(struct obdo, o_easize) == 112, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_easize));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_easize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_easize));
-        LASSERTF((int)offsetof(struct obdo, o_mds) == 116, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_mds));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_mds) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_mds));
-        LASSERTF((int)offsetof(struct obdo, o_stripe_idx) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_stripe_idx));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_stripe_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_stripe_idx));
-        LASSERTF((int)offsetof(struct obdo, o_padding_1) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_padding_1));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_1));
-        LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_inline));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_inline));
-        LASSERTF(OBD_INLINESZ == 80, " found %lld\n",
-                 (long long)OBD_INLINESZ);
-        CLASSERT(OBD_MD_FLID == (0x00000001ULL));
-        CLASSERT(OBD_MD_FLATIME == (0x00000002ULL));
-        CLASSERT(OBD_MD_FLMTIME == (0x00000004ULL));
-        CLASSERT(OBD_MD_FLCTIME == (0x00000008ULL));
-        CLASSERT(OBD_MD_FLSIZE == (0x00000010ULL));
-        CLASSERT(OBD_MD_FLBLOCKS == (0x00000020ULL));
-        CLASSERT(OBD_MD_FLBLKSZ == (0x00000040ULL));
-        CLASSERT(OBD_MD_FLMODE == (0x00000080ULL));
-        CLASSERT(OBD_MD_FLTYPE == (0x00000100ULL));
-        CLASSERT(OBD_MD_FLUID == (0x00000200ULL));
-        CLASSERT(OBD_MD_FLGID == (0x00000400ULL));
-        CLASSERT(OBD_MD_FLFLAGS == (0x00000800ULL));
-        CLASSERT(OBD_MD_FLNLINK == (0x00002000ULL));
-        CLASSERT(OBD_MD_FLGENER == (0x00004000ULL));
-        CLASSERT(OBD_MD_FLINLINE == (0x00008000ULL));
-        CLASSERT(OBD_MD_FLRDEV == (0x00010000ULL));
-        CLASSERT(OBD_MD_FLEASIZE == (0x00020000ULL));
-        CLASSERT(OBD_MD_LINKNAME == (0x00040000ULL));
-        CLASSERT(OBD_MD_FLHANDLE == (0x00080000ULL));
-        CLASSERT(OBD_MD_FLCKSUM == (0x00100000ULL));
-        CLASSERT(OBD_MD_FLQOS == (0x00200000ULL));
-        CLASSERT(OBD_MD_FLCOOKIE == (0x00800000ULL));
-        CLASSERT(OBD_MD_FLGROUP == (0x01000000ULL));
-        CLASSERT(OBD_MD_FLFID == (0x02000000ULL));
-        CLASSERT(OBD_MD_FLEPOCH == (0x04000000ULL));
-        CLASSERT(OBD_MD_FLGRANT == (0x08000000ULL));
-        CLASSERT(OBD_MD_FLDIREA == (0x10000000ULL));
-        CLASSERT(OBD_MD_FLUSRQUOTA == (0x20000000ULL));
-        CLASSERT(OBD_MD_FLGRPQUOTA == (0x40000000ULL));
-        CLASSERT(OBD_MD_FLMODEASIZE == (0x80000000ULL));
-        CLASSERT(OBD_MD_MDS == (0x0000000100000000ULL));
-        CLASSERT(OBD_MD_REINT == (0x0000000200000000ULL));
-        CLASSERT(OBD_MD_FLXATTR == (0x0000001000000000ULL));
-        CLASSERT(OBD_MD_FLXATTRLS == (0x0000002000000000ULL));
-        CLASSERT(OBD_MD_FLXATTRRM == (0x0000004000000000ULL));
-        CLASSERT(OBD_MD_FLACL == (0x0000008000000000ULL));
-        CLASSERT(OBD_FL_INLINEDATA == (0x00000001));
-        CLASSERT(OBD_FL_OBDMDEXISTS == (0x00000002));
-        CLASSERT(OBD_FL_DELORPHAN == (0x00000004));
-        CLASSERT(OBD_FL_NORPC == (0x00000008));
-        CLASSERT(OBD_FL_IDONLY == (0x00000010));
-        CLASSERT(OBD_FL_RECREATE_OBJS == (0x00000020));
-        CLASSERT(OBD_FL_DEBUG_CHECK == (0x00000040));
-        CLASSERT(OBD_FL_NO_USRQUOTA == (0x00000100));
-        CLASSERT(OBD_FL_NO_GRPQUOTA == (0x00000200));
-        CLASSERT(OBD_FL_CREATE_CROW == (0x00000400));
-        CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800));
-        CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000));
-        CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000));
-        CLASSERT(OBD_CKSUM_CRC32 == 1);
-        CLASSERT(OBD_CKSUM_ADLER == 2);
-
-        /* Checks for struct lov_mds_md_v1 */
-        LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_mds_md_v1));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_gr));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects));
-
-        /* Checks for struct lov_ost_data_v1 */
-        LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_ost_data_v1));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
-        CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0);
-        CLASSERT(LOV_MAGIC_JOIN == 0x0BD20BD0);
-        LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
-                 (long long)LOV_PATTERN_RAID0);
-        LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
-                 (long long)LOV_PATTERN_RAID1);
-
-        /* Checks for struct lov_mds_md_join */
-        LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_mds_md_join));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_md) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_md));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_array_id) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_array_id));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_extent_count) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_extent_count));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count));
-
-        /* Checks for struct obd_statfs */
-        LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_statfs));
-        LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_type));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
-        LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_blocks));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
-        LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_bfree));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
-        LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_bavail));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
-        LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_ffree));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
-        LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_fsid));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
-        LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_bsize));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
-        LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_namelen));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
-        LASSERTF((int)offsetof(struct obd_statfs, os_state) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_state));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_state));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare1) == 108, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare1));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare1));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare2) == 112, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare2));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare2));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare3) == 116, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare3));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare3));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare4) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare4));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare4) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare4));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare5) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare5));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare5) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare5));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare6) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare6));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare6) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare6));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare7) == 132, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare7));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare7) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare7));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare8) == 136, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare8));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare8) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare8));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare9) == 140, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare9));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare9) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare9));
-
-        /* Checks for struct obd_ioobj */
-        LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_ioobj));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_id));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_gr));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_type));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
-
-        /* Checks for struct obd_quotactl */
-        LASSERTF((int)sizeof(struct obd_quotactl) == 112, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_quotactl));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_cmd) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_cmd));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_cmd) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_cmd));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_type) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_type));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_type));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_id));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_id));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_stat) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_stat));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_stat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_stat));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_dqinfo) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_dqinfo));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo) == 24, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_dqblk) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_dqblk));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqblk) == 72, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqblk));
-
-        /* Checks for struct obd_dqinfo */
-        LASSERTF((int)sizeof(struct obd_dqinfo) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_dqinfo));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_bgrace) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_bgrace));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_igrace) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_igrace));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_flags) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_flags));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_flags));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_valid) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_valid));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_valid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_valid));
-
-        /* Checks for struct obd_dqblk */
-        LASSERTF((int)sizeof(struct obd_dqblk) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_dqblk));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_bhardlimit) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_bhardlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_bsoftlimit) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_bsoftlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_curspace) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_curspace));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curspace) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curspace));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_ihardlimit) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_ihardlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_isoftlimit) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_isoftlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_curinodes) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_curinodes));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_btime) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_btime));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_btime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_btime));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_itime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_itime));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_itime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_itime));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_valid) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_valid));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_valid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_valid));
-        LASSERTF((int)offsetof(struct obd_dqblk, padding) == 68, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, padding));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->padding));
-        LASSERTF(Q_QUOTACHECK == 0x800100," found %lld\n",
-                 (long long)Q_QUOTACHECK);
-        LASSERTF(Q_INITQUOTA == 0x800101," found %lld\n",
-                 (long long)Q_INITQUOTA);
-        LASSERTF(Q_GETOINFO == 0x800102," found %lld\n",
-                 (long long)Q_GETOINFO);
-        LASSERTF(Q_GETOQUOTA == 0x800103," found %lld\n",
-                 (long long)Q_GETOQUOTA);
-
-        /* Checks for struct niobuf_remote */
-        LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct niobuf_remote));
-        LASSERTF((int)offsetof(struct niobuf_remote, offset) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct niobuf_remote, offset));
-        LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct niobuf_remote *)0)->offset));
-        LASSERTF((int)offsetof(struct niobuf_remote, len) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct niobuf_remote, len));
-        LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct niobuf_remote *)0)->len));
-        LASSERTF((int)offsetof(struct niobuf_remote, flags) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct niobuf_remote, flags));
-        LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct niobuf_remote *)0)->flags));
-        LASSERTF(OBD_BRW_READ == 1, " found %lld\n",
-                 (long long)OBD_BRW_READ);
-        LASSERTF(OBD_BRW_WRITE == 2, " found %lld\n",
-                 (long long)OBD_BRW_WRITE);
-        LASSERTF(OBD_BRW_SYNC == 8, " found %lld\n",
-                 (long long)OBD_BRW_SYNC);
-        LASSERTF(OBD_BRW_FROM_GRANT == 32, " found %lld\n",
-                 (long long)OBD_BRW_FROM_GRANT);
-        LASSERTF(OBD_BRW_NOQUOTA == 256, " found %lld\n",
-                 (long long)OBD_BRW_NOQUOTA);
-
-        /* Checks for struct ost_body */
-        LASSERTF((int)sizeof(struct ost_body) == 208, " found %lld\n",
-                 (long long)(int)sizeof(struct ost_body));
-        LASSERTF((int)offsetof(struct ost_body, oa) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_body, oa));
-        LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_body *)0)->oa));
-
-        /* Checks for struct ll_fid */
-        LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct ll_fid));
-        LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ll_fid, id));
-        LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ll_fid *)0)->id));
-        LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ll_fid, generation));
-        LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ll_fid *)0)->generation));
-        LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct ll_fid, f_type));
-        LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
-
-        /* Checks for struct mds_status_req */
-        LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_status_req));
-        LASSERTF((int)offsetof(struct mds_status_req, flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_status_req, flags));
-        LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_status_req *)0)->flags));
-        LASSERTF((int)offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_status_req, repbuf));
-        LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf));
-
-        /* Checks for struct mds_body */
-        LASSERTF((int)sizeof(struct mds_body) == 168, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_body));
-        LASSERTF((int)offsetof(struct mds_body, fid1) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fid1));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fid1));
-        LASSERTF((int)offsetof(struct mds_body, fid2) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fid2));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fid2));
-        LASSERTF((int)offsetof(struct mds_body, handle) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, handle));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->handle));
-        LASSERTF((int)offsetof(struct mds_body, size) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, size));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->size));
-        LASSERTF((int)offsetof(struct mds_body, blocks) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, blocks));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->blocks));
-        LASSERTF((int)offsetof(struct mds_body, io_epoch) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, io_epoch));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->io_epoch));
-        LASSERTF((int)offsetof(struct mds_body, ino) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, ino));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->ino));
-        LASSERTF((int)offsetof(struct mds_body, valid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, valid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->valid));
-        LASSERTF((int)offsetof(struct mds_body, fsuid) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fsuid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fsuid));
-        LASSERTF((int)offsetof(struct mds_body, fsgid) == 108, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fsgid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fsgid));
-        LASSERTF((int)offsetof(struct mds_body, capability) == 112, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, capability));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->capability) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->capability));
-        LASSERTF((int)offsetof(struct mds_body, mode) == 116, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, mode));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->mode));
-        LASSERTF((int)offsetof(struct mds_body, uid) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, uid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->uid));
-        LASSERTF((int)offsetof(struct mds_body, gid) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, gid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->gid));
-        LASSERTF((int)offsetof(struct mds_body, mtime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, mtime));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->mtime));
-        LASSERTF((int)offsetof(struct mds_body, ctime) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, ctime));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->ctime));
-        LASSERTF((int)offsetof(struct mds_body, atime) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, atime));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->atime));
-        LASSERTF((int)offsetof(struct mds_body, flags) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, flags));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->flags));
-        LASSERTF((int)offsetof(struct mds_body, rdev) == 132, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, rdev));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->rdev));
-        LASSERTF((int)offsetof(struct mds_body, nlink) == 136, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, nlink));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->nlink));
-        LASSERTF((int)offsetof(struct mds_body, generation) == 140, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, generation));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->generation));
-        LASSERTF((int)offsetof(struct mds_body, suppgid) == 144, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, suppgid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->suppgid));
-        LASSERTF((int)offsetof(struct mds_body, eadatasize) == 148, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, eadatasize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->eadatasize));
-        LASSERTF((int)offsetof(struct mds_body, aclsize) == 152, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, aclsize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->aclsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->aclsize));
-        LASSERTF((int)offsetof(struct mds_body, max_mdsize) == 156, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, max_mdsize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->max_mdsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->max_mdsize));
-        LASSERTF((int)offsetof(struct mds_body, max_cookiesize) == 160, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, max_cookiesize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->max_cookiesize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->max_cookiesize));
-        LASSERTF((int)offsetof(struct mds_body, padding_4) == 164, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, padding_4));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->padding_4) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->padding_4));
-        LASSERTF(FMODE_READ == 1, " found %lld\n",
-                 (long long)FMODE_READ);
-        LASSERTF(FMODE_WRITE == 2, " found %lld\n",
-                 (long long)FMODE_WRITE);
-        LASSERTF(MDS_FMODE_EXEC == 4, " found %lld\n",
-                 (long long)MDS_FMODE_EXEC);
-        CLASSERT(MDS_OPEN_CREAT == 00000100);
-        CLASSERT(MDS_OPEN_EXCL == 00000200);
-        CLASSERT(MDS_OPEN_TRUNC == 00001000);
-        CLASSERT(MDS_OPEN_APPEND == 00002000);
-        CLASSERT(MDS_OPEN_SYNC == 00010000);
-        CLASSERT(MDS_OPEN_DIRECTORY == 00200000);
-        CLASSERT(MDS_OPEN_DELAY_CREATE == 0100000000);
-        CLASSERT(MDS_OPEN_OWNEROVERRIDE == 0200000000);
-        CLASSERT(MDS_OPEN_JOIN_FILE == 0400000000);
-        CLASSERT(MDS_OPEN_HAS_EA == 010000000000);
-        CLASSERT(MDS_OPEN_HAS_OBJS == 020000000000);
-        CLASSERT(MDS_SYNC_FL == 0x00000008);
-        CLASSERT(MDS_IMMUTABLE_FL == 0x00000010);
-        CLASSERT(MDS_APPEND_FL == 0x00000020);
-        CLASSERT(MDS_NOATIME_FL == 0x00000080);
-        CLASSERT(MDS_DIRSYNC_FL == 0x00010000);
-        CLASSERT(MDS_BFLAG_EXT_FLAGS == 0x80000000);
-        CLASSERT(MDS_INODELOCK_LOOKUP == 0x000001);
-        CLASSERT(MDS_INODELOCK_UPDATE == 0x000002);
-        CLASSERT(MDS_INODELOCK_OPEN == 0x000004);
-
-        /* Checks for struct mds_rec_setattr */
-        LASSERTF((int)sizeof(struct mds_rec_setattr) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_setattr));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
-        CLASSERT(MDS_ATTR_MODE == 0x1ULL);
-        CLASSERT(MDS_ATTR_UID == 0x2ULL);
-        CLASSERT(MDS_ATTR_GID == 0x4ULL);
-        CLASSERT(MDS_ATTR_SIZE == 0x8ULL);
-        CLASSERT(MDS_ATTR_ATIME == 0x10ULL);
-        CLASSERT(MDS_ATTR_MTIME == 0x20ULL);
-        CLASSERT(MDS_ATTR_CTIME == 0x40ULL);
-        CLASSERT(MDS_ATTR_ATIME_SET == 0x80ULL);
-        CLASSERT(MDS_ATTR_MTIME_SET == 0x100ULL);
-        CLASSERT(MDS_ATTR_FORCE == 0x200ULL);
-        CLASSERT(MDS_ATTR_ATTR_FLAG == 0x400ULL);
-        CLASSERT(MDS_ATTR_KILL_SUID == 0x800ULL);
-        CLASSERT(MDS_ATTR_KILL_SGID == 0x1000ULL);
-        CLASSERT(MDS_ATTR_CTIME_SET == 0x2000ULL);
-        CLASSERT(MDS_ATTR_FROM_OPEN == 0x4000ULL);
-
-        /* Checks for struct mds_rec_create */
-        LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_create));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_time));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
-
-        /* Checks for struct mds_rec_link */
-        LASSERTF((int)sizeof(struct mds_rec_link) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_link));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_time));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
-
-        /* Checks for struct mds_rec_unlink */
-        LASSERTF((int)sizeof(struct mds_rec_unlink) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_unlink));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
-
-        /* Checks for struct mds_rec_rename */
-        LASSERTF((int)sizeof(struct mds_rec_rename) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_rename));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_time));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
-
-        /* Checks for struct mds_rec_join */
-        LASSERTF((int)sizeof(struct mds_rec_join) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_join));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_fid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_headsize) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_headsize));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_headsize) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_headsize));
-
-        /* Checks for struct lov_desc */
-        LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_desc));
-        LASSERTF((int)offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_tgt_count));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count));
-        LASSERTF((int)offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_active_tgt_count));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count));
-        LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_count));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count));
-        LASSERTF((int)offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_pattern));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern));
-        LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_size));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size));
-        LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
-        LASSERTF((int)offsetof(struct lov_desc, ld_qos_maxage) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_qos_maxage));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_qos_maxage) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_qos_maxage));
-        LASSERTF((int)offsetof(struct lov_desc, ld_padding_1) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_padding_1));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_1));
-        LASSERTF((int)offsetof(struct lov_desc, ld_padding_2) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_padding_2));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_2));
-        LASSERTF((int)offsetof(struct lov_desc, ld_uuid) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_uuid));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid));
-
-        /* Checks for struct ldlm_res_id */
-        LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_res_id));
-        LASSERTF((int)offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_res_id, name[4]));
-        LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4]));
-
-        /* Checks for struct ldlm_extent */
-        LASSERTF((int)sizeof(struct ldlm_extent) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_extent));
-        LASSERTF((int)offsetof(struct ldlm_extent, start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_extent, start));
-        LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_extent *)0)->start));
-        LASSERTF((int)offsetof(struct ldlm_extent, end) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_extent, end));
-        LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_extent *)0)->end));
-        LASSERTF((int)offsetof(struct ldlm_extent, gid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_extent, gid));
-        LASSERTF((int)sizeof(((struct ldlm_extent *)0)->gid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_extent *)0)->gid));
-
-        /* Checks for struct ldlm_flock */
-        LASSERTF((int)sizeof(struct ldlm_flock) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_flock));
-        LASSERTF((int)offsetof(struct ldlm_flock, start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, start));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->start));
-        LASSERTF((int)offsetof(struct ldlm_flock, end) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, end));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->end));
-        LASSERTF((int)offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, blocking_pid));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid));
-        LASSERTF((int)offsetof(struct ldlm_flock, pid) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, pid));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->pid));
-
-        /* Checks for struct ldlm_inodebits */
-        LASSERTF((int)sizeof(struct ldlm_inodebits) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_inodebits));
-        LASSERTF((int)offsetof(struct ldlm_inodebits, bits) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_inodebits, bits));
-        LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->bits) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_inodebits *)0)->bits));
-
-        /* Checks for struct ldlm_intent */
-        LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_intent));
-        LASSERTF((int)offsetof(struct ldlm_intent, opc) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_intent, opc));
-        LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_intent *)0)->opc));
-
-        /* Checks for struct ldlm_resource_desc */
-        LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_resource_desc));
-        LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_resource_desc, lr_type));
-        LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type));
-        LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_padding) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_resource_desc, lr_padding));
-        LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_padding));
-        LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_resource_desc, lr_name));
-        LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name));
-
-        /* Checks for struct ldlm_lock_desc */
-        LASSERTF((int)sizeof(struct ldlm_lock_desc) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_lock_desc));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_resource));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_req_mode));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_granted_mode));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_policy_data));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data));
-
-        /* Checks for struct ldlm_request */
-        LASSERTF((int)sizeof(struct ldlm_request) == 104, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_request));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_flags));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_count) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_count));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_count));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_desc));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_handle) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_handle));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle));
-
-        /* Checks for struct ldlm_reply */
-        LASSERTF((int)sizeof(struct ldlm_reply) == 112, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_reply));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_flags));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_padding) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_padding));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_padding));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_desc) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_desc));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_desc) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_desc));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_handle) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_handle));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res1) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_policy_res1));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res2) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_policy_res2));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
-
-        /* Checks for struct ost_lvb */
-        LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct ost_lvb));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_size));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_mtime));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_atime));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_ctime));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_blocks));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
-
-        /* Checks for struct llog_logid */
-        LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_logid));
-        LASSERTF((int)offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid, lgl_oid));
-        LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid));
-        LASSERTF((int)offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid, lgl_ogr));
-        LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr));
-        LASSERTF((int)offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid, lgl_ogen));
-        LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen));
-        CLASSERT(OST_SZ_REC == 274730752);
-        CLASSERT(OST_RAID1_REC == 274731008);
-        CLASSERT(MDS_UNLINK_REC == 274801668);
-        CLASSERT(MDS_SETATTR_REC == 274801665);
-        CLASSERT(OBD_CFG_REC == 274857984);
-        CLASSERT(PTL_CFG_REC == 274923520);
-        CLASSERT(LLOG_GEN_REC == 274989056);
-        CLASSERT(LLOG_JOIN_REC == 275054592);
-        CLASSERT(LLOG_HDR_MAGIC == 275010873);
-        CLASSERT(LLOG_LOGID_MAGIC == 275010875);
-
-        /* Checks for struct llog_catid */
-        LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_catid));
-        LASSERTF((int)offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_logid));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid));
-        LASSERTF((int)offsetof(struct llog_catid, lci_padding1) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_padding1));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding1));
-        LASSERTF((int)offsetof(struct llog_catid, lci_padding2) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_padding2));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding2));
-        LASSERTF((int)offsetof(struct llog_catid, lci_padding3) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_padding3));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding3));
-
-        /* Checks for struct llog_rec_hdr */
-        LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_rec_hdr));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, lrh_len));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, lrh_index));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, lrh_type));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, padding) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, padding));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->padding));
-
-        /* Checks for struct llog_rec_tail */
-        LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_rec_tail));
-        LASSERTF((int)offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_tail, lrt_len));
-        LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len));
-        LASSERTF((int)offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_tail, lrt_index));
-        LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index));
-
-        /* Checks for struct llog_logid_rec */
-        LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_logid_rec));
-        LASSERTF((int)offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, lid_hdr));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr));
-        LASSERTF((int)offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, lid_id));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding1) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding1));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding1));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding2));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding2));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding3) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding3));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding3));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding4) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding4));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding4) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding4));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding5) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding5));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding5) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding5));
-        LASSERTF((int)offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, lid_tail));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail));
-
-        /* Checks for struct llog_create_rec */
-        LASSERTF((int)sizeof(struct llog_create_rec) == 56, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_create_rec));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_hdr));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_fid));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_oid));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_ogen));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen));
-        LASSERTF((int)offsetof(struct llog_create_rec, padding) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->padding));
-
-        /* Checks for struct llog_orphan_rec */
-        LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_orphan_rec));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_hdr));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_oid));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_ogen));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, padding) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_tail));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail));
-
-        /* Checks for struct llog_unlink_rec */
-        LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_unlink_rec));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_hdr));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_oid));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, padding) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_tail));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail));
-
-        /* Checks for struct llog_setattr_rec */
-        LASSERTF((int)sizeof(struct llog_setattr_rec) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_setattr_rec));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_hdr));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_hdr));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_oid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_oid));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_ogen) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_ogen));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_uid) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_uid));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_gid) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_gid));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_gid));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, padding) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_tail) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_tail));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail));
-
-        /* Checks for struct llog_size_change_rec */
-        LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_size_change_rec));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_hdr));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_fid));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_io_epoch));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, padding) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_tail));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
-
-        /* Checks for struct llog_gen */
-        LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_gen));
-        LASSERTF((int)offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen, mnt_cnt));
-        LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt));
-        LASSERTF((int)offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen, conn_cnt));
-        LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt));
-
-        /* Checks for struct llog_gen_rec */
-        LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_gen_rec));
-        LASSERTF((int)offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen_rec, lgr_hdr));
-        LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr));
-        LASSERTF((int)offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen_rec, lgr_gen));
-        LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen));
-        LASSERTF((int)offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen_rec, lgr_tail));
-        LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail));
-
-        /* Checks for struct llog_log_hdr */
-        LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_log_hdr));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_hdr));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_timestamp));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_count));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap_offset));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_size));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_flags));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_cat_idx));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_tgtuuid));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_reserved));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_tail));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));
-
-        /* Checks for struct llog_cookie */
-        LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_cookie));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_lgl));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_subsys));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_index));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_padding) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_padding));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_padding));
-
-        /* Checks for struct llogd_body */
-        LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct llogd_body));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_logid));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_ctxt_idx));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_llh_flags));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_index));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_saved_index));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_len));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_cur_offset));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
-        CLASSERT(LLOG_ORIGIN_HANDLE_CREATE == 501);
-        CLASSERT(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502);
-        CLASSERT(LLOG_ORIGIN_HANDLE_READ_HEADER == 503);
-        CLASSERT(LLOG_ORIGIN_HANDLE_WRITE_REC == 504);
-        CLASSERT(LLOG_ORIGIN_HANDLE_CLOSE == 505);
-        CLASSERT(LLOG_ORIGIN_CONNECT == 506);
-        CLASSERT(LLOG_CATINFO == 507);
-        CLASSERT(LLOG_ORIGIN_HANDLE_PREV_BLOCK == 508);
-        CLASSERT(LLOG_ORIGIN_HANDLE_DESTROY == 509);
-
-        /* Checks for struct llogd_conn_body */
-        LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llogd_conn_body));
-        LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_conn_body, lgdc_gen));
-        LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen));
-        LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_conn_body, lgdc_logid));
-        LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid));
-        LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx));
-        LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
-
-        /* Checks for struct llog_array_rec */
-        LASSERTF((int)sizeof(struct llog_array_rec) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_array_rec));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_hdr));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_hdr));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_med) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_med));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_med) == 48, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_med));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_tail) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_tail));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_tail));
-
-        /* Checks for struct mds_extent_desc */
-        LASSERTF((int)sizeof(struct mds_extent_desc) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_extent_desc));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_start));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_start));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_len) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_len));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_len) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_len));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_lmm) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_lmm));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_lmm) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm));
-
-        /* Checks for struct qunit_data */
-        LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data));
-        LASSERTF((int)offsetof(struct qunit_data, qd_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data, qd_flags) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_flags));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_flags));
-        LASSERTF((int)offsetof(struct qunit_data, qd_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_count));
-        LASSERTF((int)offsetof(struct qunit_data, qd_qunit) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_qunit));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_qunit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_qunit));
-        LASSERTF((int)offsetof(struct qunit_data, padding) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, padding));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->padding) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->padding));
-
-        /* Checks for struct qunit_data_old2 */
-        LASSERTF((int)sizeof(struct qunit_data_old2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data_old2));
-        LASSERTF((int)offsetof(struct qunit_data_old2, qd_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old2, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data_old2 *)0)->qd_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old2 *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data_old2, qd_flags) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old2, qd_flags));
-        LASSERTF((int)sizeof(((struct qunit_data_old2 *)0)->qd_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old2 *)0)->qd_flags));
-        LASSERTF((int)offsetof(struct qunit_data_old2, qd_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old2, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data_old2 *)0)->qd_count) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old2 *)0)->qd_count));
-
-        /* Checks for struct qunit_data_old */
-        LASSERTF((int)sizeof(struct qunit_data_old) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data_old));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_type) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_type));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_type));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_count));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_isblk) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_isblk));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_isblk) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_isblk));
-
-        /* Checks for struct quota_adjust_qunit */
-        LASSERTF((int)sizeof(struct quota_adjust_qunit) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct quota_adjust_qunit));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_flags));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_id) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_id));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz));
-
-        /* Checks for struct mgs_target_info */
-        LASSERTF((int)sizeof(struct mgs_target_info) == 4544, " found %lld\n",
-                 (long long)(int)sizeof(struct mgs_target_info));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_lustre_ver) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_lustre_ver));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_lustre_ver) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_lustre_ver));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_stripe_index) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_stripe_index));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_stripe_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_stripe_index));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_config_ver) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_config_ver));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_config_ver) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_config_ver));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_flags) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_flags));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_flags));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_nid_count) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_nid_count));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_nid_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_nid_count));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_fsname) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_fsname));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_fsname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_fsname));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_svname) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_svname));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_svname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_svname));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_uuid) == 152, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_uuid));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_uuid));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_nids) == 192, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_nids));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_nids) == 256, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_nids));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_params) == 448, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_params));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_params) == 4096, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_params));
-
-        /* Checks for struct lustre_disk_data */
-        LASSERTF((int)sizeof(struct lustre_disk_data) == 12288, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_disk_data));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_magic) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_magic));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_magic));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_compat) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_compat));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_rocompat) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_rocompat));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_incompat) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_incompat));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_config_ver) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_config_ver));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_flags) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_flags));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_flags));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svindex) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_svindex));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_type) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_type));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_fsname) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_fsname));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svname) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_svname));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svname));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_uuid) == 160, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_uuid));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_userdata) == 200, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_userdata));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata) == 824, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_opts) == 4096, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_opts));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts) == 4096, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_params) == 8192, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_params));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params));
-#ifdef LIBLUSTRE_POSIX_ACL
-
-        /* Checks for type posix_acl_xattr_entry */
-        LASSERTF((int)sizeof(xattr_acl_entry) == 8, " found %lld\n",
-                 (long long)(int)sizeof(xattr_acl_entry));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_tag) == 0, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_tag));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_tag) == 2, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_tag));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_perm) == 2, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_perm));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_perm) == 2, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_perm));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_id) == 4, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_id));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_id));
-
-        /* Checks for type posix_acl_xattr_header */
-        LASSERTF((int)sizeof(xattr_acl_header) == 4, " found %lld\n",
-                 (long long)(int)sizeof(xattr_acl_header));
-        LASSERTF((int)offsetof(xattr_acl_header, a_version) == 0, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_header, a_version));
-        LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_header *)0)->a_version));
-        LASSERTF((int)offsetof(xattr_acl_header, a_entries) == 4, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_header, a_entries));
-        LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_entries) == 0, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_header *)0)->a_entries));
-#endif
-}
-
diff --git a/lustre/quota/.cvsignore b/lustre/quota/.cvsignore
deleted file mode 100644
index d5103fafd735a92dd05fc733eaa24d9d40e41390..0000000000000000000000000000000000000000
--- a/lustre/quota/.cvsignore
+++ /dev/null
@@ -1,15 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-.deps
-TAGS
-.*.cmd
-autoMakefile.in
-autoMakefile
-*.ko
-*.mod.c
-.*.o.flags
-.tmp_versions
-.depend
diff --git a/lustre/quota/Makefile.in b/lustre/quota/Makefile.in
deleted file mode 100644
index 2f1bfad372111ed6d135308d5f6409c86e54785b..0000000000000000000000000000000000000000
--- a/lustre/quota/Makefile.in
+++ /dev/null
@@ -1,10 +0,0 @@
-MODULES := lquota
-MODULES += quotactl_test quotacheck_test
-
-lquota-objs := quota_check.o quota_context.o quota_ctl.o quota_interface.o
-lquota-objs += quota_master.o quota_adjust_qunit.o
-quotactl-objs := quotactl_test.o
-quotaccheck-objs := quotacheck_test.o
-
-@INCLUDE_RULES@
-
diff --git a/lustre/quota/autoMakefile.am b/lustre/quota/autoMakefile.am
deleted file mode 100644
index a3971904d8f3a05b86f41f6edd706de997c79a46..0000000000000000000000000000000000000000
--- a/lustre/quota/autoMakefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-# Copyright (C) 2005  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-if LIBLUSTRE
-noinst_LIBRARIES = libquota.a
-libquota_a_SOURCES = quota_check.c quota_ctl.c quota_interface.c quota_adjust_qunit.c
-libquota_a_CPPFLAGS = $(LLCPPFLAGS)
-libquota_a_CFLAGS = $(LLCFLAGS)
-endif
-
-if MODULES
-modulefs_DATA = lquota$(KMODEXT)
-endif
-
-MOSTLYCLEANFILES := @MOSTLYCLEANFILES@ 
-DIST_SOURCES := $(lquota-objs:%.o=%.c) quota_internal.h
-DIST_SOURCES += quotactl_test.c quotacheck_test.c
diff --git a/lustre/quota/quota_adjust_qunit.c b/lustre/quota/quota_adjust_qunit.c
deleted file mode 100644
index 3283a75906d308f18543ddada522d7dd03ab2919..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_adjust_qunit.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/quota/quota_adjust_qunit.c
- *
- *  Copyright (c) 2005 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifdef __KERNEL__
-# include <linux/version.h>
-# include <linux/module.h>
-# include <linux/init.h>
-# include <linux/fs.h>
-# include <linux/jbd.h>
-# include <linux/ext3_fs.h>
-# include <linux/quota.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/smp_lock.h>
-#  include <linux/buffer_head.h>
-#  include <linux/workqueue.h>
-#  include <linux/mount.h>
-# else
-#  include <linux/locks.h>
-# endif
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_cfg.h>
-#include <obd_ost.h>
-#include <lustre_fsfilt.h>
-#include <linux/lustre_quota.h>
-#include <class_hash.h>
-#include "quota_internal.h"
-
-#ifdef __KERNEL__
-/* this function is charge of recording lqs_ino_rec and
- * lqs_blk_rec. when a lquota slave checks a quota
- * request(check_cur_qunit) and finishes a quota
- * request(dqacq_completion), it will be called.
- * is_chk: whether it is checking quota; otherwise, it is finishing
- * is_acq: whether it is acquiring; otherwise, it is releasing
- */
-void quota_compute_lqs(struct qunit_data *qdata, struct lustre_qunit_size *lqs,
-                      int is_chk, int is_acq)
-{
-        int is_blk;
-
-        LASSERT(qdata && lqs);
-        LASSERT_SPIN_LOCKED(&lqs->lqs_lock);
-        is_blk = QDATA_IS_BLK(qdata);
-
-        if (is_chk) {
-                if (is_acq) {
-                        if (is_blk)
-                                lqs->lqs_blk_rec += qdata->qd_count;
-                        else
-                                lqs->lqs_ino_rec += qdata->qd_count;
-                } else {
-                        if (is_blk)
-                                lqs->lqs_blk_rec -= qdata->qd_count;
-                        else
-                                lqs->lqs_ino_rec -= qdata->qd_count;
-                }
-        } else {
-                if (is_acq) {
-                        if (is_blk)
-                                lqs->lqs_blk_rec -= qdata->qd_count;
-                        else
-                                lqs->lqs_ino_rec -= qdata->qd_count;
-                } else {
-                        if (is_blk)
-                                lqs->lqs_blk_rec += qdata->qd_count;
-                        else
-                                lqs->lqs_ino_rec += qdata->qd_count;
-                }
-        }
-}
-
-void qdata_to_oqaq(struct qunit_data *qdata, struct quota_adjust_qunit *oqaq)
-{
-        LASSERT(qdata);
-        LASSERT(oqaq);
-
-        oqaq->qaq_flags = qdata->qd_flags;
-        oqaq->qaq_id    = qdata->qd_id;
-        if (QDATA_IS_ADJBLK(qdata))
-                oqaq->qaq_bunit_sz = qdata->qd_qunit;
-        if (QDATA_IS_ADJINO(qdata))
-                oqaq->qaq_iunit_sz = qdata->qd_qunit;
-}
-
-int quota_search_lqs(struct qunit_data *qdata, struct quota_adjust_qunit *oqaq,
-                     struct lustre_quota_ctxt *qctxt,
-                     struct lustre_qunit_size **lqs_return)
-{
-        struct quota_adjust_qunit *oqaq_tmp = NULL;
-        ENTRY;
-
-        LASSERT(*lqs_return == NULL);
-        LASSERT(oqaq || qdata);
-
-        if (!oqaq) {
-                OBD_ALLOC_PTR(oqaq_tmp);
-                if (!oqaq_tmp)
-                        RETURN(-ENOMEM);
-                qdata_to_oqaq(qdata, oqaq_tmp);
-        } else {
-                oqaq_tmp = oqaq;
-        }
-
-        *lqs_return = lustre_hash_get_object_by_key(LQC_HASH_BODY(qctxt),
-                                                    oqaq_tmp);
-        if (*lqs_return)
-                LQS_DEBUG((*lqs_return), "show lqs\n");
-
-        if (!oqaq)
-                OBD_FREE_PTR(oqaq_tmp);
-        RETURN(0);
-}
-
-int quota_create_lqs(struct qunit_data *qdata, struct quota_adjust_qunit *oqaq,
-                     struct lustre_quota_ctxt *qctxt,
-                     struct lustre_qunit_size **lqs_return)
-{
-        int rc = 0;
-        struct quota_adjust_qunit *oqaq_tmp = NULL;
-        struct lustre_qunit_size *lqs = NULL;
-        ENTRY;
-
-        LASSERT(*lqs_return == NULL);
-        LASSERT(oqaq || qdata);
-
-        if (!oqaq) {
-                OBD_ALLOC_PTR(oqaq_tmp);
-                if (!oqaq_tmp)
-                        RETURN(-ENOMEM);
-                qdata_to_oqaq(qdata, oqaq_tmp);
-        } else {
-                oqaq_tmp = oqaq;
-        }
-
-        OBD_ALLOC_PTR(lqs);
-        if (!lqs)
-                GOTO(out, rc = -ENOMEM);
-
-        spin_lock_init(&lqs->lqs_lock);
-        lqs->lqs_bwrite_pending = 0;
-        lqs->lqs_iwrite_pending = 0;
-        lqs->lqs_ino_rec = 0;
-        lqs->lqs_blk_rec = 0;
-        lqs->lqs_id = oqaq_tmp->qaq_id;
-        lqs->lqs_flags = QAQ_IS_GRP(oqaq_tmp);
-        lqs->lqs_bunit_sz = qctxt->lqc_bunit_sz;
-        lqs->lqs_iunit_sz = qctxt->lqc_iunit_sz;
-        lqs->lqs_btune_sz = qctxt->lqc_btune_sz;
-        lqs->lqs_itune_sz = qctxt->lqc_itune_sz;
-        if (qctxt->lqc_handler) {
-                lqs->lqs_last_bshrink  = 0;
-                lqs->lqs_last_ishrink  = 0;
-        }
-        lqs_initref(lqs);
-        rc = lustre_hash_additem_unique(LQC_HASH_BODY(qctxt),
-                                        oqaq_tmp, &lqs->lqs_hash);
-        LQS_DEBUG(lqs, "create lqs\n");
-        if (!rc) {
-                lqs_getref(lqs);
-                *lqs_return = lqs;
-        }
- out:
-        if (rc && lqs)
-                OBD_FREE_PTR(lqs);
-        if (!oqaq)
-                OBD_FREE_PTR(oqaq_tmp);
-        RETURN(rc);
-}
-
-int quota_adjust_slave_lqs(struct quota_adjust_qunit *oqaq,
-                           struct lustre_quota_ctxt *qctxt)
-{
-        struct lustre_qunit_size *lqs = NULL;
-        unsigned long *lbunit, *liunit, *lbtune, *litune;
-        signed long b_tmp = 0, i_tmp = 0;
-        cfs_time_t time_limit = 0;
-        int rc = 0;
-        ENTRY;
-
-        if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS))
-                RETURN(0);
-
-        LASSERT(qctxt);
-search_lqs:
-        rc = quota_search_lqs(NULL, oqaq, qctxt, &lqs);
-
-        /* deleting the lqs, because a user sets lfs quota 0 0 0 0  */
-        if (!oqaq->qaq_bunit_sz && !oqaq->qaq_iunit_sz && QAQ_IS_ADJBLK(oqaq) &&
-            QAQ_IS_ADJINO(oqaq)) {
-                if (lqs) {
-                        LQS_DEBUG(lqs, "release lqs\n");
-                        /* this is for quota_search_lqs */
-                        lqs_putref(lqs);
-                        /* this is for deleting this lqs */
-                        lqs_putref(lqs);
-                }
-                RETURN(rc);
-        }
-
-        if (!lqs) {
-                rc = quota_create_lqs(NULL, oqaq, qctxt, &lqs);
-                if (rc == -EALREADY)
-                        goto search_lqs;
-                if (rc < 0)
-                        RETURN(rc);
-        }
-
-        lbunit = &lqs->lqs_bunit_sz;
-        liunit = &lqs->lqs_iunit_sz;
-        lbtune = &lqs->lqs_btune_sz;
-        litune = &lqs->lqs_itune_sz;
-
-        spin_lock(&lqs->lqs_lock);
-        CDEBUG(D_QUOTA, "before: bunit: %lu, iunit: %lu.\n", *lbunit, *liunit);
-        /* adjust the slave's block qunit size */
-        if (QAQ_IS_ADJBLK(oqaq)) {
-                cfs_duration_t sec = cfs_time_seconds(qctxt->lqc_switch_seconds);
-
-                b_tmp = *lbunit - oqaq->qaq_bunit_sz;
-
-                if (qctxt->lqc_handler && b_tmp > 0)
-                        lqs->lqs_last_bshrink = cfs_time_current();
-
-                if (qctxt->lqc_handler && b_tmp < 0) {
-                        time_limit = cfs_time_add(lqs->lqs_last_bshrink, sec);
-                        if (!lqs->lqs_last_bshrink ||
-                            cfs_time_after(cfs_time_current(), time_limit)) {
-                                *lbunit = oqaq->qaq_bunit_sz;
-                                *lbtune = (*lbunit) / 2;
-                        } else {
-                                b_tmp = 0;
-                        }
-                } else {
-                        *lbunit = oqaq->qaq_bunit_sz;
-                        *lbtune = (*lbunit) / 2;
-                }
-        }
-
-        /* adjust the slave's file qunit size */
-        if (QAQ_IS_ADJINO(oqaq)) {
-                i_tmp = *liunit - oqaq->qaq_iunit_sz;
-
-                if (qctxt->lqc_handler && i_tmp > 0)
-                        lqs->lqs_last_ishrink  = cfs_time_current();
-
-                if (qctxt->lqc_handler && i_tmp < 0) {
-                        time_limit = cfs_time_add(lqs->lqs_last_ishrink,
-                                                  cfs_time_seconds(qctxt->
-                                                  lqc_switch_seconds));
-                        if (!lqs->lqs_last_ishrink ||
-                            cfs_time_after(cfs_time_current(), time_limit)) {
-                                *liunit = oqaq->qaq_iunit_sz;
-                                *litune = (*liunit) / 2;
-                        } else {
-                                i_tmp = 0;
-                        }
-                } else {
-                        *liunit = oqaq->qaq_iunit_sz;
-                        *litune = (*liunit) / 2;
-                }
-        }
-        CDEBUG(D_QUOTA, "after: bunit: %lu, iunit: %lu.\n", *lbunit, *liunit);
-        spin_unlock(&lqs->lqs_lock);
-
-        lqs_putref(lqs);
-
-        if (b_tmp > 0)
-                rc |= LQS_BLK_DECREASE;
-        else if (b_tmp < 0)
-                rc |= LQS_BLK_INCREASE;
-
-        if (i_tmp > 0)
-                rc |= LQS_INO_DECREASE;
-        else if (i_tmp < 0)
-                rc |= LQS_INO_INCREASE;
-
-        RETURN(rc);
-}
-
-int filter_quota_adjust_qunit(struct obd_export *exp,
-                              struct quota_adjust_qunit *oqaq)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        unsigned int uid = 0, gid = 0;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(oqaq);
-        LASSERT(QAQ_IS_ADJBLK(oqaq));
-        rc = quota_adjust_slave_lqs(oqaq, qctxt);
-        if (rc < 0) {
-                CERROR("adjust mds slave's qunit size failed!(rc:%d)\n", rc);
-                RETURN(rc);
-        }
-        if (QAQ_IS_GRP(oqaq))
-                gid = oqaq->qaq_id;
-        else
-                uid = oqaq->qaq_id;
-
-        if (rc > 0) {
-                rc = qctxt_adjust_qunit(obd, qctxt, uid, gid, 1, 0);
-                if (rc == -EDQUOT || rc == -EBUSY) {
-                        CDEBUG(D_QUOTA, "rc: %d.\n", rc);
-                        rc = 0;
-                }
-                if (rc)
-                        CERROR("slave adjust block quota failed!(rc:%d)\n", rc);
-        }
-        RETURN(rc);
-}
-#endif /* __KERNEL__ */
-
-int client_quota_adjust_qunit(struct obd_export *exp,
-                              struct quota_adjust_qunit *oqaq)
-{
-        struct ptlrpc_request *req;
-        struct quota_adjust_qunit *oqa;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*oqaq) };
-        int rc = 0;
-        ENTRY;
-
-        /* client don't support this kind of operation, abort it */
-        if (!(exp->exp_connect_flags & OBD_CONNECT_CHANGE_QS)||
-            OBD_FAIL_CHECK(OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS)) {
-                CDEBUG(D_QUOTA, "osc: %s don't support change qunit size\n",
-                       exp->exp_obd->obd_name);
-                RETURN(rc);
-        }
-        if (strcmp(exp->exp_obd->obd_type->typ_name, LUSTRE_OSC_NAME))
-                RETURN(-EINVAL);
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), LUSTRE_OST_VERSION,
-                              OST_QUOTA_ADJUST_QUNIT, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        oqa = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*oqaq));
-        *oqa = *oqaq;
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        if (rc) {
-                CERROR("%s: %s failed: rc = %d\n", exp->exp_obd->obd_name,
-                       __FUNCTION__, rc);
-                GOTO(out, rc);
-        }
-        ptlrpc_req_finished(req);
-out:
-        RETURN (rc);
-}
-
-int lov_quota_adjust_qunit(struct obd_export *exp,
-                           struct quota_adjust_qunit *oqaq)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        int i, rc = 0;
-        ENTRY;
-
-        if (!QAQ_IS_ADJBLK(oqaq)) {
-                CERROR("bad qaq_flags %x for lov obd.\n", oqaq->qaq_flags);
-                RETURN(-EFAULT);
-        }
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                int err;
-
-                if (!lov->lov_tgts[i]->ltd_active) {
-                        CDEBUG(D_HA, "ost %d is inactive\n", i);
-                        continue;
-                }
-
-                err = obd_quota_adjust_qunit(lov->lov_tgts[i]->ltd_exp, oqaq);
-                if (err) {
-                        if (lov->lov_tgts[i]->ltd_active && !rc)
-                                rc = err;
-                        continue;
-                }
-        }
-        RETURN(rc);
-}
diff --git a/lustre/quota/quota_check.c b/lustre/quota/quota_check.c
deleted file mode 100644
index bde6b6ed20b7e00e1b63bb5803a60205a19b485b..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_check.c
+++ /dev/null
@@ -1,237 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/quota/quota_check.c
- *
- *  Copyright (c) 2005 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifdef __KERNEL__
-# include <linux/version.h>
-# include <linux/module.h>
-# include <linux/init.h>
-# include <linux/fs.h>
-# include <linux/jbd.h>
-# include <linux/ext3_fs.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/smp_lock.h>
-#  include <linux/buffer_head.h>
-#  include <linux/workqueue.h>
-#  include <linux/mount.h>
-# else
-#  include <linux/locks.h>
-# endif
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_cfg.h>
-#include <obd_ost.h>
-#include <lustre_fsfilt.h>
-#include <lustre_quota.h>
-#include "quota_internal.h"
-
-#ifdef __KERNEL__
-static int target_quotacheck_callback(struct obd_export *exp,
-                                      struct obd_quotactl *oqctl)
-{
-        struct ptlrpc_request *req;
-        struct obd_quotactl *body;
-        int rc, size[2] = { sizeof(struct ptlrpc_body), sizeof(*oqctl) };
-        ENTRY;
-
-        req = ptlrpc_prep_req(exp->exp_imp_reverse, LUSTRE_OBD_VERSION,
-                              OBD_QC_CALLBACK, 2, size, NULL);
-        if (!req)
-                RETURN(-ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        *body = *oqctl;
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-
-        rc = ptlrpc_queue_wait(req);
-        ptlrpc_req_finished(req);
-
-        RETURN(rc);
-}
-
-static int target_quotacheck_thread(void *data)
-{
-        struct quotacheck_thread_args *qta = data;
-        struct obd_export *exp;
-        struct obd_device *obd;
-        struct obd_quotactl *oqctl;
-        struct lvfs_run_ctxt saved;
-        int rc;
-
-        ptlrpc_daemonize("quotacheck");
-
-        exp = qta->qta_exp;
-        obd = exp->exp_obd;
-        oqctl = &qta->qta_oqctl;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        rc = fsfilt_quotacheck(obd, qta->qta_sb, oqctl);
-        if (rc)
-                CERROR("%s: fsfilt_quotacheck: %d\n", obd->obd_name, rc);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        rc = target_quotacheck_callback(exp, oqctl);
-
-        atomic_inc(qta->qta_sem);
-
-        OBD_FREE_PTR(qta);
-        return rc;
-}
-
-int target_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_device_target *obt = &obd->u.obt;
-        struct quotacheck_thread_args *qta;
-        int rc = 0;
-        ENTRY;
-
-        if (!atomic_dec_and_test(&obt->obt_quotachecking)) {
-                CDEBUG(D_INFO, "other people are doing quotacheck\n");
-                GOTO(out, rc = -EBUSY);
-        }
-
-        OBD_ALLOC_PTR(qta);
-        if (!qta)
-                GOTO(out, rc = -ENOMEM);
-
-        qta->qta_exp = exp;
-        qta->qta_oqctl = *oqctl;
-        qta->qta_sb = obt->obt_sb;
-        qta->qta_sem = &obt->obt_quotachecking;
-
-        if (!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME)) {
-                /* quota master */
-                rc = init_admin_quotafiles(obd, &qta->qta_oqctl);
-                if (rc) {
-                        CERROR("init_admin_quotafiles failed: %d\n", rc);
-                        OBD_FREE_PTR(qta);
-                        GOTO(out, rc);
-                }
-        }
-
-        rc = kernel_thread(target_quotacheck_thread, qta, CLONE_VM|CLONE_FILES);
-        if (rc >= 0) {
-                CDEBUG(D_INFO, "%s: target_quotacheck_thread: %d\n",
-                       obd->obd_name, rc);
-                RETURN(0);
-        }
-
-        CERROR("%s: error starting quotacheck_thread: %d\n",
-               obd->obd_name, rc);
-        OBD_FREE_PTR(qta);
-out:
-        atomic_inc(&obt->obt_quotachecking);
-        RETURN(rc);
-}
-
-#endif /* __KERNEL__ */
-
-int client_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        struct ptlrpc_request *req;
-        struct obd_quotactl *body;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*body) };
-        int ver, opc, rc;
-        ENTRY;
-
-        if (!strcmp(exp->exp_obd->obd_type->typ_name, LUSTRE_MDC_NAME)) {
-                ver = LUSTRE_MDS_VERSION;
-                opc = MDS_QUOTACHECK;
-        } else if (!strcmp(exp->exp_obd->obd_type->typ_name, LUSTRE_OSC_NAME)) {
-                ver = LUSTRE_OST_VERSION;
-                opc = OST_QUOTACHECK;
-        } else {
-                RETURN(-EINVAL);
-        }
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), ver, opc, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        body = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*body));
-        *body = *oqctl;
-
-        ptlrpc_req_set_repsize(req, 1, NULL);
-
-        /* the next poll will find -ENODATA, that means quotacheck is
-         * going on */
-        cli->cl_qchk_stat = -ENODATA;
-        rc = ptlrpc_queue_wait(req);
-        if (rc)
-                cli->cl_qchk_stat = rc;
-out:
-        ptlrpc_req_finished(req);
-        RETURN(rc);
-}
-
-int client_quota_poll_check(struct obd_export *exp, struct if_quotacheck *qchk)
-{
-        struct client_obd *cli = &exp->exp_obd->u.cli;
-        int rc;
-        ENTRY;
-
-        rc = cli->cl_qchk_stat;
-
-        /* the client is not the previous one */
-        if (rc == CL_NOT_QUOTACHECKED)
-                rc = -EINTR;
-
-        qchk->obd_uuid = cli->cl_target_uuid;
-        /* FIXME change strncmp to strcmp and save the strlen op */
-        if (strncmp(exp->exp_obd->obd_type->typ_name, LUSTRE_OSC_NAME,
-                    strlen(LUSTRE_OSC_NAME)) == 0)
-                memcpy(qchk->obd_type, LUSTRE_OST_NAME,
-                       strlen(LUSTRE_OST_NAME));
-        else if (strncmp(exp->exp_obd->obd_type->typ_name, LUSTRE_MDC_NAME,
-                         strlen(LUSTRE_MDC_NAME)) == 0)
-                memcpy(qchk->obd_type, LUSTRE_MDS_NAME,
-                       strlen(LUSTRE_MDS_NAME));
-
-        RETURN(rc);
-}
-
-int lov_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                int err;
-
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) {
-                        CERROR("lov idx %d inactive\n", i);
-                        RETURN(-EIO);
-                }
-
-                err = obd_quotacheck(lov->lov_tgts[i]->ltd_exp, oqctl);
-                if (err && lov->lov_tgts[i]->ltd_active && !rc)
-                        rc = err;
-        }
-
-        RETURN(rc);
-}
diff --git a/lustre/quota/quota_context.c b/lustre/quota/quota_context.c
deleted file mode 100644
index 11b7a91562e2884f73c3f07bd6231a4b88162313..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_context.c
+++ /dev/null
@@ -1,1160 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/quota/quota_context.c
- *  Lustre Quota Context
- *
- *  Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *   Author: Niu YaWei <niu@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/version.h>
-#include <linux/fs.h>
-#include <asm/unistd.h>
-#include <linux/slab.h>
-#include <linux/quotaops.h>
-#include <linux/module.h>
-#include <linux/init.h>
-
-#include <obd_class.h>
-#include <lustre_quota.h>
-#include <lustre_fsfilt.h>
-#include <class_hash.h>
-#include "quota_internal.h"
-
-extern struct lustre_hash_operations lqs_hash_operations;
-
-unsigned long default_bunit_sz = 128 * 1024 * 1024; /* 128M bytes */
-unsigned long default_btune_ratio = 50;             /* 50 percentage */
-unsigned long default_iunit_sz = 5120;              /* 5120 inodes */
-unsigned long default_itune_ratio = 50;             /* 50 percentage */
-
-cfs_mem_cache_t *qunit_cachep = NULL;
-struct list_head qunit_hash[NR_DQHASH];
-spinlock_t qunit_hash_lock = SPIN_LOCK_UNLOCKED;
-
-/* please sync qunit_state with qunit_state_names */
-enum qunit_state {
-        QUNIT_CREATED      = 0,   /* a qunit is created */
-        QUNIT_IN_HASH      = 1,   /* a qunit is added into qunit hash, that means
-                                   * a quota req will be sent or is flying */
-        QUNIT_RM_FROM_HASH = 2,   /* a qunit is removed from qunit hash, that
-                                   * means a quota req is handled and comes
-                                   * back */
-        QUNIT_FINISHED     = 3,   /* qunit can wake up all threads waiting
-                                   * for it */
-};
-
-static const char *qunit_state_names[] = {
-        [QUNIT_CREATED]      = "CREATED",
-        [QUNIT_IN_HASH]      = "IN_HASH",
-        [QUNIT_RM_FROM_HASH] = "RM_FROM_HASH",
-        [QUNIT_FINISHED]     = "FINISHED",
-};
-
-struct lustre_qunit {
-        struct list_head lq_hash;          /* Hash list in memory */
-        atomic_t lq_refcnt;                /* Use count */
-        struct lustre_quota_ctxt *lq_ctxt; /* Quota context this applies to */
-        struct qunit_data lq_data;         /* See qunit_data */
-        unsigned int lq_opc;               /* QUOTA_DQACQ, QUOTA_DQREL */
-        cfs_waitq_t lq_waitq;              /* Threads waiting for this qunit */
-        spinlock_t lq_lock;                /* Protect the whole structure */
-        enum qunit_state lq_state;         /* Present the status of qunit */
-        int lq_rc;                         /* The rc of lq_data */
-};
-
-#define QUNIT_SET_STATE(qunit, state)                                   \
-do {                                                                    \
-        spin_lock(&qunit->lq_lock);                                     \
-        QDATA_DEBUG((&qunit->lq_data), "qunit(%p) lq_state(%s->%s), "   \
-                    "lq_rc(%d)\n",                                      \
-                    qunit, qunit_state_names[qunit->lq_state],          \
-                    qunit_state_names[state], qunit->lq_rc);            \
-        qunit->lq_state = state;                                        \
-        spin_unlock(&qunit->lq_lock);                                   \
-} while(0)
-
-#define QUNIT_SET_STATE_AND_RC(qunit, state, rc)                        \
-do {                                                                    \
-        spin_lock(&qunit->lq_lock);                                     \
-        qunit->lq_rc = rc;                                              \
-        QDATA_DEBUG((&qunit->lq_data), "qunit(%p) lq_state(%s->%s), "   \
-                    "lq_rc(%d)\n",                                      \
-                    qunit, qunit_state_names[qunit->lq_state],          \
-                    qunit_state_names[state], qunit->lq_rc);            \
-        qunit->lq_state = state;                                        \
-        spin_unlock(&qunit->lq_lock);                                   \
-} while(0)
-
-
-int should_translate_quota (struct obd_import *imp)
-{
-        ENTRY;
-
-        LASSERT(imp);
-#if LUSTRE_VERSION_CODE < OBD_OCD_VERSION(1, 7, 0, 0)
-        if (imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_QUOTA64 &&
-            !OBD_FAIL_CHECK(OBD_FAIL_QUOTA_QD_COUNT_32BIT))
-#else
-        if (imp->imp_connect_data.ocd_connect_flags & OBD_CONNECT_QUOTA64)
-#endif
-                RETURN(0);
-        else
-                RETURN(1);
-}
-
-void qunit_cache_cleanup(void)
-{
-        int i;
-        ENTRY;
-
-        spin_lock(&qunit_hash_lock);
-        for (i = 0; i < NR_DQHASH; i++)
-                LASSERT(list_empty(qunit_hash + i));
-        spin_unlock(&qunit_hash_lock);
-
-        if (qunit_cachep) {
-                int rc;
-                rc = cfs_mem_cache_destroy(qunit_cachep);
-                LASSERTF(rc == 0, "couldn't destory qunit_cache slab\n");
-                qunit_cachep = NULL;
-        }
-        EXIT;
-}
-
-int qunit_cache_init(void)
-{
-        int i;
-        ENTRY;
-
-        LASSERT(qunit_cachep == NULL);
-        qunit_cachep = cfs_mem_cache_create("ll_qunit_cache",
-                                            sizeof(struct lustre_qunit),
-                                            0, 0);
-        if (!qunit_cachep)
-                RETURN(-ENOMEM);
-
-        spin_lock(&qunit_hash_lock);
-        for (i = 0; i < NR_DQHASH; i++)
-                INIT_LIST_HEAD(qunit_hash + i);
-        spin_unlock(&qunit_hash_lock);
-        RETURN(0);
-}
-
-static inline int
-qunit_hashfn(struct lustre_quota_ctxt *qctxt, struct qunit_data *qdata)
-             __attribute__((__const__));
-
-static inline int
-qunit_hashfn(struct lustre_quota_ctxt *qctxt, struct qunit_data *qdata)
-{
-        unsigned int id = qdata->qd_id;
-        unsigned int type = QDATA_IS_GRP(qdata);
-
-        unsigned long tmp = ((unsigned long)qctxt >> L1_CACHE_SHIFT) ^ id;
-        tmp = (tmp * (MAXQUOTAS - type)) % NR_DQHASH;
-        return tmp;
-}
-
-/* caller must hold qunit_hash_lock */
-static inline struct lustre_qunit *find_qunit(unsigned int hashent,
-                                              struct lustre_quota_ctxt *qctxt,
-                                              struct qunit_data *qdata)
-{
-        struct lustre_qunit *qunit = NULL;
-        struct qunit_data *tmp;
-
-        LASSERT_SPIN_LOCKED(&qunit_hash_lock);
-        list_for_each_entry(qunit, qunit_hash + hashent, lq_hash) {
-                tmp = &qunit->lq_data;
-                if (qunit->lq_ctxt == qctxt &&
-                    qdata->qd_id == tmp->qd_id &&
-                    (qdata->qd_flags & LQUOTA_QUNIT_FLAGS) ==
-                    (tmp->qd_flags & LQUOTA_QUNIT_FLAGS))
-                        return qunit;
-        }
-        return NULL;
-}
-
-/* check_cur_qunit - check the current usage of qunit.
- * @qctxt: quota context
- * @qdata: the type of quota unit to be checked
- *
- * return: 1 - need acquire qunit;
- * 	   2 - need release qunit;
- * 	   0 - need do nothing.
- * 	 < 0 - error.
- */
-static int
-check_cur_qunit(struct obd_device *obd,
-                struct lustre_quota_ctxt *qctxt, struct qunit_data *qdata)
-{
-        struct super_block *sb = qctxt->lqc_sb;
-        unsigned long qunit_sz, tune_sz;
-        __u64 usage, limit, limit_org, pending_write = 0;
-        long long record = 0;
-        struct obd_quotactl *qctl;
-        struct lustre_qunit_size *lqs = NULL;
-        int ret = 0;
-        ENTRY;
-
-        if (!sb_any_quota_enabled(sb))
-                RETURN(0);
-
-        OBD_ALLOC_PTR(qctl);
-        if (qctl == NULL)
-                RETURN(-ENOMEM);
-
-        /* get fs quota usage & limit */
-        qctl->qc_cmd = Q_GETQUOTA;
-        qctl->qc_id = qdata->qd_id;
-        qctl->qc_type = QDATA_IS_GRP(qdata);
-        ret = fsfilt_quotactl(obd, sb, qctl);
-        if (ret) {
-                if (ret == -ESRCH)      /* no limit */
-                        ret = 0;
-                else
-                        CERROR("can't get fs quota usage! (rc:%d)\n", ret);
-                GOTO(out, ret);
-        }
-
-        if (QDATA_IS_BLK(qdata)) {
-                usage = qctl->qc_dqblk.dqb_curspace;
-                limit = qctl->qc_dqblk.dqb_bhardlimit << QUOTABLOCK_BITS;
-        } else {
-                usage = qctl->qc_dqblk.dqb_curinodes;
-                limit = qctl->qc_dqblk.dqb_ihardlimit;
-        }
-
-        /* ignore the no quota limit case; and it can avoid creating
-         * unnecessary lqs for uid/gid */
-        if (!limit)
-                GOTO(out, ret = 0);
-
- search_lqs:
-        quota_search_lqs(qdata, NULL, qctxt, &lqs);
-        if (!lqs) {
-                CDEBUG(D_QUOTA, "Can't find the lustre qunit size!\n");
-                ret = quota_create_lqs(qdata, NULL, qctxt, &lqs);
-                if (ret == -EALREADY) {
-                        ret = 0;
-                        goto search_lqs;
-                }
-                if (ret < 0)
-                        GOTO (out, ret);
-        }
-        spin_lock(&lqs->lqs_lock);
-
-        if (QDATA_IS_BLK(qdata)) {
-                qunit_sz = lqs->lqs_bunit_sz;
-                tune_sz  = lqs->lqs_btune_sz;
-                pending_write = lqs->lqs_bwrite_pending * CFS_PAGE_SIZE;
-                record   = lqs->lqs_blk_rec;
-                LASSERT(!(qunit_sz % QUOTABLOCK_SIZE));
-        } else {
-                /* we didn't need change inode qunit size now */
-                qunit_sz = lqs->lqs_iunit_sz;
-                tune_sz  = lqs->lqs_itune_sz;
-                pending_write = lqs->lqs_iwrite_pending;
-                record   = lqs->lqs_ino_rec;
-        }
-
-        /* we don't count the MIN_QLIMIT */
-        if ((limit == MIN_QLIMIT && !QDATA_IS_BLK(qdata)) ||
-            (toqb(limit) == MIN_QLIMIT && QDATA_IS_BLK(qdata)))
-                limit = 0;
-
-        usage += pending_write;
-        limit_org = limit;
-        /* when a releasing quota req is sent, before it returned
-           limit is assigned a small value. limit will overflow */
-        if (limit + record < 0)
-                usage -= record;
-        else
-                limit += record;
-
-        LASSERT(qdata->qd_count == 0);
-        if (limit <= usage + tune_sz) {
-                while (qdata->qd_count + limit <=
-                       usage + tune_sz)
-                        qdata->qd_count += qunit_sz;
-                ret = 1;
-        } else if (limit > usage + qunit_sz + tune_sz &&
-                   limit_org > qdata->qd_count + qunit_sz) {
-                while (limit - qdata->qd_count > usage + qunit_sz + tune_sz &&
-                       limit_org > qdata->qd_count + qunit_sz)
-                        qdata->qd_count += qunit_sz;
-                ret = 2;
-        }
-        CDEBUG(D_QUOTA, "type: %c, limit: "LPU64", usage: "LPU64
-               ", pending_write: "LPU64", record: "LPD64
-               ", qunit_sz: %lu, tune_sz: %lu, ret: %d.\n",
-               QDATA_IS_BLK(qdata) ? 'b' : 'i', limit, usage, pending_write,
-               record, qunit_sz, tune_sz, ret);
-        LASSERT(ret == 0 || qdata->qd_count);
-
-        spin_unlock(&lqs->lqs_lock);
-        lqs_putref(lqs);
-        EXIT;
- out:
-        OBD_FREE_PTR(qctl);
-        return ret;
-}
-
-/* compute the remaining quota for certain gid or uid b=11693 */
-int compute_remquota(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-                     struct qunit_data *qdata, int isblk)
-{
-        struct super_block *sb = qctxt->lqc_sb;
-        __u64 usage, limit;
-        struct obd_quotactl *qctl;
-        int ret = QUOTA_RET_OK;
-        ENTRY;
-
-        if (!sb_any_quota_enabled(sb))
-                RETURN(QUOTA_RET_NOQUOTA);
-
-        /* ignore root user */
-        if (qdata->qd_id == 0 && QDATA_IS_GRP(qdata) == USRQUOTA)
-                RETURN(QUOTA_RET_NOLIMIT);
-
-        OBD_ALLOC_PTR(qctl);
-        if (qctl == NULL)
-                RETURN(-ENOMEM);
-
-        /* get fs quota usage & limit */
-        qctl->qc_cmd = Q_GETQUOTA;
-        qctl->qc_id = qdata->qd_id;
-        qctl->qc_type = QDATA_IS_GRP(qdata);
-        ret = fsfilt_quotactl(obd, sb, qctl);
-        if (ret) {
-                if (ret == -ESRCH)      /* no limit */
-                        ret = QUOTA_RET_NOLIMIT;
-                else
-                        CDEBUG(D_QUOTA, "can't get fs quota usage! (rc:%d)",
-                               ret);
-                GOTO(out, ret);
-        }
-
-        usage = isblk ? qctl->qc_dqblk.dqb_curspace :
-                qctl->qc_dqblk.dqb_curinodes;
-        limit = isblk ? qctl->qc_dqblk.dqb_bhardlimit << QUOTABLOCK_BITS :
-                qctl->qc_dqblk.dqb_ihardlimit;
-        if (!limit){            /* no limit */
-                ret = QUOTA_RET_NOLIMIT;
-                GOTO(out, ret);
-        }
-
-        if (limit >= usage)
-                qdata->qd_count = limit - usage;
-        else
-                qdata->qd_count = 0;
-        EXIT;
-out:
-        OBD_FREE_PTR(qctl);
-        return ret;
-}
-
-/* caller must hold qunit_hash_lock */
-static struct lustre_qunit *dqacq_in_flight(struct lustre_quota_ctxt *qctxt,
-                                            struct qunit_data *qdata)
-{
-        unsigned int hashent = qunit_hashfn(qctxt, qdata);
-        struct lustre_qunit *qunit;
-        ENTRY;
-
-        LASSERT_SPIN_LOCKED(&qunit_hash_lock);
-        qunit = find_qunit(hashent, qctxt, qdata);
-        RETURN(qunit);
-}
-
-static struct lustre_qunit *alloc_qunit(struct lustre_quota_ctxt *qctxt,
-                                        struct qunit_data *qdata, int opc)
-{
-        struct lustre_qunit *qunit = NULL;
-        ENTRY;
-
-        OBD_SLAB_ALLOC(qunit, qunit_cachep, CFS_ALLOC_IO, sizeof(*qunit));
-        if (qunit == NULL)
-                RETURN(NULL);
-
-        INIT_LIST_HEAD(&qunit->lq_hash);
-        init_waitqueue_head(&qunit->lq_waitq);
-        atomic_set(&qunit->lq_refcnt, 1);
-        qunit->lq_ctxt = qctxt;
-        memcpy(&qunit->lq_data, qdata, sizeof(*qdata));
-        qunit->lq_opc = opc;
-        qunit->lq_lock = SPIN_LOCK_UNLOCKED;
-        QUNIT_SET_STATE_AND_RC(qunit, QUNIT_CREATED, 0);
-        RETURN(qunit);
-}
-
-static inline void free_qunit(struct lustre_qunit *qunit)
-{
-        OBD_SLAB_FREE(qunit, qunit_cachep, sizeof(*qunit));
-}
-
-static inline void qunit_get(struct lustre_qunit *qunit)
-{
-        atomic_inc(&qunit->lq_refcnt);
-}
-
-static void qunit_put(struct lustre_qunit *qunit)
-{
-        LASSERT(atomic_read(&qunit->lq_refcnt));
-        if (atomic_dec_and_test(&qunit->lq_refcnt))
-                free_qunit(qunit);
-}
-
-static void
-insert_qunit_nolock(struct lustre_quota_ctxt *qctxt, struct lustre_qunit *qunit)
-{
-        struct list_head *head;
-
-        LASSERT(list_empty(&qunit->lq_hash));
-        head = qunit_hash + qunit_hashfn(qctxt, &qunit->lq_data);
-        list_add(&qunit->lq_hash, head);
-        QUNIT_SET_STATE(qunit, QUNIT_IN_HASH);
-}
-
-static void compute_lqs_after_removing_qunit(struct lustre_qunit *qunit)
-{
-        struct lustre_qunit_size *lqs = NULL;
-
-        quota_search_lqs(&qunit->lq_data, NULL, qunit->lq_ctxt, &lqs);
-        if (lqs) {
-                spin_lock(&lqs->lqs_lock);
-                if (qunit->lq_opc == QUOTA_DQACQ)
-                        quota_compute_lqs(&qunit->lq_data, lqs, 0, 1);
-                if (qunit->lq_opc == QUOTA_DQREL)
-                        quota_compute_lqs(&qunit->lq_data, lqs, 0, 0);
-                spin_unlock(&lqs->lqs_lock);
-                /* this is for quota_search_lqs */
-                lqs_putref(lqs);
-                /* this is for schedule_dqacq */
-                lqs_putref(lqs);
-        }
-
-}
-
-static void remove_qunit_nolock(struct lustre_qunit *qunit)
-{
-        LASSERT(!list_empty(&qunit->lq_hash));
-        LASSERT_SPIN_LOCKED(&qunit_hash_lock);
-
-        list_del_init(&qunit->lq_hash);
-        QUNIT_SET_STATE(qunit, QUNIT_RM_FROM_HASH);
-}
-
-#define INC_QLIMIT(limit, count) (limit == MIN_QLIMIT) ? \
-                                 (limit = count) : (limit += count)
-
-
-/* FIXME check if this mds is the master of specified id */
-static int
-is_master(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-          unsigned int id, int type)
-{
-        return qctxt->lqc_handler ? 1 : 0;
-}
-
-static int
-schedule_dqacq(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-               struct qunit_data *qdata, int opc, int wait);
-
-static int split_before_schedule_dqacq(struct obd_device *obd,
-                                       struct lustre_quota_ctxt *qctxt,
-                                       struct qunit_data *qdata, int opc, int wait)
-{
-        int rc = 0;
-        unsigned long factor;
-        struct qunit_data tmp_qdata;
-        ENTRY;
-
-        LASSERT(qdata && qdata->qd_count);
-        QDATA_DEBUG(qdata, "%s quota split.\n",
-                    QDATA_IS_BLK(qdata) ? "block" : "inode");
-        if (QDATA_IS_BLK(qdata))
-                factor = MAX_QUOTA_COUNT32 / qctxt->lqc_bunit_sz *
-                        qctxt->lqc_bunit_sz;
-        else
-                factor = MAX_QUOTA_COUNT32 / qctxt->lqc_iunit_sz *
-                        qctxt->lqc_iunit_sz;
-
-        if (qctxt->lqc_import && should_translate_quota(qctxt->lqc_import) &&
-            qdata->qd_count > factor) {
-                tmp_qdata = *qdata;
-                tmp_qdata.qd_count = factor;
-                qdata->qd_count -= tmp_qdata.qd_count;
-                QDATA_DEBUG((&tmp_qdata), "be split.\n");
-                rc = schedule_dqacq(obd, qctxt, &tmp_qdata, opc, wait);
-        } else{
-                QDATA_DEBUG(qdata, "don't be split.\n");
-                rc = schedule_dqacq(obd, qctxt, qdata, opc, wait);
-        }
-
-        RETURN(rc);
-}
-
-static int
-dqacq_completion(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-                 struct qunit_data *qdata, int rc, int opc)
-{
-        struct lustre_qunit *qunit = NULL;
-        struct super_block *sb = qctxt->lqc_sb;
-        int err = 0;
-        struct quota_adjust_qunit *oqaq = NULL;
-        int rc1 = 0;
-        ENTRY;
-
-        LASSERT(qdata);
-        QDATA_DEBUG(qdata, "obd(%s): complete %s quota req\n",
-                    obd->obd_name, (opc == QUOTA_DQACQ) ? "acq" : "rel");
-
-        /* update local operational quota file */
-        if (rc == 0) {
-                __u32 count = QUSG(qdata->qd_count, QDATA_IS_BLK(qdata));
-                struct obd_quotactl *qctl;
-                __u64 *hardlimit;
-
-                OBD_ALLOC_PTR(qctl);
-                if (qctl == NULL)
-                        GOTO(out, err = -ENOMEM);
-
-                /* acq/rel qunit for specified uid/gid is serialized,
-                 * so there is no race between get fs quota limit and
-                 * set fs quota limit */
-                qctl->qc_cmd = Q_GETQUOTA;
-                qctl->qc_id = qdata->qd_id;
-                qctl->qc_type = QDATA_IS_GRP(qdata);
-                err = fsfilt_quotactl(obd, sb, qctl);
-                if (err) {
-                        CERROR("error get quota fs limit! (rc:%d)\n", err);
-                        GOTO(out_mem, err);
-                }
-
-                if (QDATA_IS_BLK(qdata)) {
-                        qctl->qc_dqblk.dqb_valid = QIF_BLIMITS;
-                        hardlimit = &qctl->qc_dqblk.dqb_bhardlimit;
-                } else {
-                        qctl->qc_dqblk.dqb_valid = QIF_ILIMITS;
-                        hardlimit = &qctl->qc_dqblk.dqb_ihardlimit;
-                }
-
-                CDEBUG(D_QUOTA, "hardlimt: "LPU64"\n", *hardlimit);
-                switch (opc) {
-                case QUOTA_DQACQ:
-                        INC_QLIMIT(*hardlimit, count);
-                        break;
-                case QUOTA_DQREL:
-                        LASSERTF(count < *hardlimit,
-                                 "count: %d, hardlimit: "LPU64".\n",
-                                 count, *hardlimit);
-                        *hardlimit -= count;
-                        break;
-                default:
-                        LBUG();
-                }
-
-                /* clear quota limit */
-                if (count == 0)
-                        *hardlimit = 0;
-
-                qctl->qc_cmd = Q_SETQUOTA;
-                err = fsfilt_quotactl(obd, sb, qctl);
-                if (err)
-                        CERROR("error set quota fs limit! (rc:%d)\n", err);
-
-                QDATA_DEBUG(qdata, "%s completion\n",
-                            opc == QUOTA_DQACQ ? "DQACQ" : "DQREL");
-out_mem:
-                OBD_FREE_PTR(qctl);
-        } else if (rc == -EDQUOT) {
-                QDATA_DEBUG(qdata, "acquire qunit got EDQUOT.\n");
-        } else if (rc == -EBUSY) {
-                QDATA_DEBUG(qdata, "it's is recovering, got EBUSY.\n");
-        } else {
-                CERROR("acquire qunit got error! (rc:%d)\n", rc);
-        }
-out:
-        /* remove the qunit from hash */
-        spin_lock(&qunit_hash_lock);
-
-        qunit = dqacq_in_flight(qctxt, qdata);
-        /* this qunit has been removed by qctxt_cleanup() */
-        if (!qunit) {
-                spin_unlock(&qunit_hash_lock);
-                QDATA_DEBUG(qdata, "%s is discarded because qunit isn't found\n",
-                            opc == QUOTA_DQACQ ? "DQACQ" : "DQREL");
-                RETURN(err);
-        }
-
-        LASSERT(opc == qunit->lq_opc);
-        /* remove this qunit from lq_hash so that new processes cannot be added
-         * to qunit->lq_waiters */
-        remove_qunit_nolock(qunit);
-        spin_unlock(&qunit_hash_lock);
-
-        compute_lqs_after_removing_qunit(qunit);
-
-        /* wake up all waiters */
-        QUNIT_SET_STATE_AND_RC(qunit, QUNIT_FINISHED, rc);
-        wake_up(&qunit->lq_waitq);
-
-        qunit_put(qunit);
-        if (rc < 0 && rc != -EDQUOT)
-                 RETURN(err);
-
-        /* don't reschedule in such cases:
-         *   - acq/rel failure and qunit isn't changed,
-         *     but not for quota recovery.
-         *   - local dqacq/dqrel.
-         *   - local disk io failure.
-         */
-         OBD_ALLOC_PTR(oqaq);
-         if (!oqaq)
-                 RETURN(-ENOMEM);
-         qdata_to_oqaq(qdata, oqaq);
-         /* adjust the qunit size in slaves */
-         rc1 = quota_adjust_slave_lqs(oqaq, qctxt);
-         OBD_FREE_PTR(oqaq);
-         if (rc1 < 0) {
-                 CERROR("adjust slave's qunit size failed!(rc:%d)\n", rc1);
-                 RETURN(rc1);
-         }
-         if (err || (rc && rc != -EBUSY && rc1 == 0) ||
-             is_master(obd, qctxt, qdata->qd_id, QDATA_IS_GRP(qdata)))
-                RETURN(err);
-
-        /* reschedule another dqacq/dqrel if needed */
-        qdata->qd_count = 0;
-        qdata->qd_flags &= LQUOTA_QUNIT_FLAGS;
-        rc1 = check_cur_qunit(obd, qctxt, qdata);
-        if (rc1 > 0) {
-                int opc;
-                opc = rc1 == 1 ? QUOTA_DQACQ : QUOTA_DQREL;
-                rc1 = split_before_schedule_dqacq(obd, qctxt, qdata, opc, 0);
-                QDATA_DEBUG(qdata, "reschedudle opc(%d) rc(%d)\n", opc, rc1);
-        }
-        RETURN(err);
-}
-
-struct dqacq_async_args {
-        struct lustre_quota_ctxt *aa_ctxt;
-        struct lustre_qunit *aa_qunit;
-};
-
-static int dqacq_interpret(struct ptlrpc_request *req, void *data, int rc)
-{
-        struct dqacq_async_args *aa = (struct dqacq_async_args *)data;
-        struct lustre_quota_ctxt *qctxt = aa->aa_ctxt;
-        struct lustre_qunit *qunit = aa->aa_qunit;
-        struct obd_device *obd = req->rq_import->imp_obd;
-        struct qunit_data *qdata = NULL;
-        int rc1 = 0;
-        ENTRY;
-
-        LASSERT(req);
-        LASSERT(req->rq_import);
-
-        /* there are several forms of qunit(historic causes), so we need to
-         * adjust qunit from slaves to the same form here */
-        OBD_ALLOC(qdata, sizeof(struct qunit_data));
-        if (!qdata)
-                RETURN(-ENOMEM);
-
-        if (rc == -EIO || rc == -EINTR || rc == -ENOTCONN )
-                /* if a quota req timeouts or is dropped, we should update quota
-                 * statistics which will be handled in dqacq_completion. And in
-                 * this situation we should get qdata from request instead of
-                 * reply */
-                rc1 = quota_get_qdata(req, qdata, QUOTA_REQUEST, QUOTA_IMPORT);
-        else
-                rc1 = quota_get_qdata(req, qdata, QUOTA_REPLY, QUOTA_IMPORT);
-        if (rc1 < 0) {
-                DEBUG_REQ(D_ERROR, req, "error unpacking qunit_data\n");
-                GOTO(exit, rc = -EPROTO);
-        }
-
-        QDATA_DEBUG(qdata, "qdata: interpret rc(%d).\n", rc);
-        QDATA_DEBUG((&qunit->lq_data), "lq_data: \n");
-
-        if (qdata->qd_id != qunit->lq_data.qd_id ||
-            OBD_FAIL_CHECK_ONCE(OBD_FAIL_QUOTA_RET_QDATA)) {
-                CDEBUG(D_ERROR, "the returned qd_id isn't expected!"
-                       "(qdata: %u, lq_data: %u)\n", qdata->qd_id,
-                       qunit->lq_data.qd_id);
-                qdata->qd_id = qunit->lq_data.qd_id;
-                rc = -EPROTO;
-        }
-        if (QDATA_IS_GRP(qdata) != QDATA_IS_GRP(&qunit->lq_data)) {
-                CDEBUG(D_ERROR, "the returned grp/usr isn't expected!"
-                       "(qdata: %u, lq_data: %u)\n", qdata->qd_flags,
-                       qunit->lq_data.qd_flags);
-                if (QDATA_IS_GRP(&qunit->lq_data))
-                        QDATA_SET_GRP(qdata);
-                else
-                        QDATA_CLR_GRP(qdata);
-                rc = -EPROTO;
-        }
-        if (qdata->qd_count > qunit->lq_data.qd_count) {
-                CDEBUG(D_ERROR, "the returned qd_count isn't expected!"
-                       "(qdata: "LPU64", lq_data: "LPU64")\n", qdata->qd_count,
-                       qunit->lq_data.qd_count);
-                rc = -EPROTO;
-        }
-
-        rc = dqacq_completion(obd, qctxt, qdata, rc,
-                              lustre_msg_get_opc(req->rq_reqmsg));
-
-exit:
-        OBD_FREE(qdata, sizeof(struct qunit_data));
-
-        RETURN(rc);
-}
-
-static int got_qunit(struct lustre_qunit *qunit)
-{
-        int rc;
-        ENTRY;
-
-        spin_lock(&qunit->lq_lock);
-        switch (qunit->lq_state) {
-        case QUNIT_IN_HASH:
-        case QUNIT_RM_FROM_HASH:
-                rc = 0;
-                break;
-        case QUNIT_FINISHED:
-                rc = 1;
-                break;
-        default:
-                rc = 0;
-                CERROR("invalid qunit state %d\n", qunit->lq_state);
-        }
-        spin_unlock(&qunit->lq_lock);
-        RETURN(rc);
-}
-
-static int
-schedule_dqacq(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-               struct qunit_data *qdata, int opc, int wait)
-{
-        struct lustre_qunit *qunit, *empty;
-        struct l_wait_info lwi = { 0 };
-        struct ptlrpc_request *req;
-        struct dqacq_async_args *aa;
-        int size[2] = { sizeof(struct ptlrpc_body), 0 };
-        struct obd_import *imp = NULL;
-        unsigned long factor;
-        struct lustre_qunit_size *lqs = NULL;
-        int rc = 0;
-        ENTRY;
-
-        if ((empty = alloc_qunit(qctxt, qdata, opc)) == NULL)
-                RETURN(-ENOMEM);
-
-        spin_lock(&qunit_hash_lock);
-        qunit = dqacq_in_flight(qctxt, qdata);
-        if (qunit) {
-                if (wait)
-                        qunit_get(qunit);
-                spin_unlock(&qunit_hash_lock);
-                free_qunit(empty);
-
-                goto wait_completion;
-        }
-        qunit = empty;
-        insert_qunit_nolock(qctxt, qunit);
-        spin_unlock(&qunit_hash_lock);
-
-        LASSERT(qunit);
-
-        quota_search_lqs(qdata, NULL, qctxt, &lqs);
-        if (lqs) {
-                spin_lock(&lqs->lqs_lock);
-                quota_compute_lqs(qdata, lqs, 1, (opc == QUOTA_DQACQ) ? 1 : 0);
-                /* when this qdata returned from mds, it will call lqs_putref */
-                lqs_getref(lqs);
-                spin_unlock(&lqs->lqs_lock);
-                /* this is for quota_search_lqs */
-                lqs_putref(lqs);
-        } else {
-                CDEBUG(D_ERROR, "Can't find the lustre qunit size!\n");
-        }
-
-        QDATA_DEBUG(qdata, "obd(%s): send %s quota req\n",
-                    obd->obd_name, (opc == QUOTA_DQACQ) ? "acq" : "rel");
-        /* master is going to dqacq/dqrel from itself */
-        if (is_master(obd, qctxt, qdata->qd_id, QDATA_IS_GRP(qdata))) {
-                int rc2;
-                QDATA_DEBUG(qdata, "local %s.\n",
-                            opc == QUOTA_DQACQ ? "DQACQ" : "DQREL");
-                rc = qctxt->lqc_handler(obd, qdata, opc);
-                rc2 = dqacq_completion(obd, qctxt, qdata, rc, opc);
-                RETURN(rc ? rc : rc2);
-        }
-
-        spin_lock(&qctxt->lqc_lock);
-        if (!qctxt->lqc_import) {
-                spin_unlock(&qctxt->lqc_lock);
-                QDATA_DEBUG(qdata, "lqc_import is invalid.\n");
-
-                spin_lock(&qunit_hash_lock);
-                remove_qunit_nolock(qunit);
-                spin_unlock(&qunit_hash_lock);
-
-                compute_lqs_after_removing_qunit(qunit);
-
-                QUNIT_SET_STATE_AND_RC(qunit, QUNIT_FINISHED, -EAGAIN);
-                wake_up(&qunit->lq_waitq);
-
-                qunit_put(qunit);
-                RETURN(-EAGAIN);
-        }
-        imp = class_import_get(qctxt->lqc_import);
-        spin_unlock(&qctxt->lqc_lock);
-
-        /* build dqacq/dqrel request */
-        LASSERT(imp);
-        size[1] = quota_get_qunit_data_size(imp->
-                                            imp_connect_data.ocd_connect_flags);
-
-        req = ptlrpc_prep_req(imp, LUSTRE_MDS_VERSION, opc, 2,
-                              size, NULL);
-        if (!req) {
-                dqacq_completion(obd, qctxt, qdata, -ENOMEM, opc);
-                class_import_put(imp);
-                RETURN(-ENOMEM);
-        }
-
-        if (QDATA_IS_BLK(qdata))
-                factor = MAX_QUOTA_COUNT32 / qctxt->lqc_bunit_sz *
-                        qctxt->lqc_bunit_sz;
-        else
-                factor = MAX_QUOTA_COUNT32 / qctxt->lqc_iunit_sz *
-                        qctxt->lqc_iunit_sz;
-
-        LASSERTF(!should_translate_quota(imp) || qdata->qd_count <= factor,
-                 "qd_count: "LPU64"; should_translate_quota: %d.\n",
-                 qdata->qd_count, should_translate_quota(imp));
-        rc = quota_copy_qdata(req, qdata, QUOTA_REQUEST, QUOTA_IMPORT);
-        if (rc < 0) {
-                CDEBUG(D_ERROR, "Can't pack qunit_data\n");
-                RETURN(-EPROTO);
-        }
-        ptlrpc_req_set_repsize(req, 2, size);
-        class_import_put(imp);
-
-        if (wait && qunit) 
-                qunit_get(qunit);
-
-        CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
-        aa = (struct dqacq_async_args *)&req->rq_async_args;
-        aa->aa_ctxt = qctxt;
-        aa->aa_qunit = qunit;
-
-        req->rq_interpret_reply = dqacq_interpret;
-        ptlrpcd_add_req(req);
-
-        QDATA_DEBUG(qdata, "%s scheduled.\n",
-                    opc == QUOTA_DQACQ ? "DQACQ" : "DQREL");
-wait_completion:
-        if (wait && qunit) {
-                struct qunit_data *p = &qunit->lq_data;
-
-                QDATA_DEBUG(p, "qunit(%p) is waiting for dqacq.\n", qunit);
-                l_wait_event(qunit->lq_waitq, got_qunit(qunit), &lwi);
-                /* rc = -EAGAIN, it means a quota req is finished;
-                 * rc = -EDQUOT, it means out of quota
-                 * rc = -EBUSY, it means recovery is happening
-                 * other rc < 0, it means real errors, functions who call
-                 * schedule_dqacq should take care of this */
-                spin_lock(&qunit->lq_lock);
-                if (qunit->lq_rc == 0)
-                        rc = -EAGAIN;
-                else
-                        rc = qunit->lq_rc;
-                spin_unlock(&qunit->lq_lock);
-                CDEBUG(D_QUOTA, "qunit(%p) finishes waiting. (rc:%d)\n",
-                       qunit, rc);
-                qunit_put(qunit);
-        }
-        RETURN(rc);
-}
-
-int
-qctxt_adjust_qunit(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-                   uid_t uid, gid_t gid, __u32 isblk, int wait)
-{
-        int ret, rc = 0, i = USRQUOTA;
-        __u32 id[MAXQUOTAS] = { uid, gid };
-        struct qunit_data qdata[MAXQUOTAS];
-        ENTRY;
-
-        CLASSERT(MAXQUOTAS < 4);
-        if (!sb_any_quota_enabled(qctxt->lqc_sb))
-                RETURN(0);
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                qdata[i].qd_id = id[i];
-                qdata[i].qd_flags = i;
-                if (isblk)
-                        QDATA_SET_BLK(&qdata[i]);
-                qdata[i].qd_count = 0;
-
-                ret = check_cur_qunit(obd, qctxt, &qdata[i]);
-                if (ret > 0) {
-                        int opc;
-                        /* need acquire or release */
-                        opc = ret == 1 ? QUOTA_DQACQ : QUOTA_DQREL;
-                        ret = split_before_schedule_dqacq(obd, qctxt, &qdata[i], 
-                                                          opc, wait);
-                        if (!rc)
-                                rc = ret;
-                } else if (wait == 1) {
-                        /* when wait equates 1, that means mds_quota_acquire
-                         * or filter_quota_acquire is calling it. */
-                        qctxt_wait_pending_dqacq(qctxt, id[i], i, isblk);
-                }
-        }
-
-        RETURN(rc);
-}
-
-int
-qctxt_wait_pending_dqacq(struct lustre_quota_ctxt *qctxt, unsigned int id,
-                         unsigned short type, int isblk)
-{
-        struct lustre_qunit *qunit = NULL;
-        struct qunit_data qdata;
-        struct l_wait_info lwi = { 0 };
-        ENTRY;
-
-        qdata.qd_id = id;
-        qdata.qd_flags = type;
-        if (isblk)
-                QDATA_SET_BLK(&qdata);
-        qdata.qd_count = 0;
-
-        spin_lock(&qunit_hash_lock);
-        qunit = dqacq_in_flight(qctxt, &qdata);
-        if (qunit)
-                /* grab reference on this qunit to handle races with
-                 * dqacq_completion(). Otherwise, this qunit could be freed just
-                 * after we release the qunit_hash_lock */
-                qunit_get(qunit);
-        spin_unlock(&qunit_hash_lock);
-
-        if (qunit) {
-                struct qunit_data *p = &qunit->lq_data;
-
-                QDATA_DEBUG(p, "qunit(%p) is waiting for dqacq.\n", qunit);
-                l_wait_event(qunit->lq_waitq, got_qunit(qunit), &lwi);
-                CDEBUG(D_QUOTA, "qunit(%p) finishes waiting. (rc:%d)\n",
-                       qunit, qunit->lq_rc);
-                qunit_put(qunit);
-        }
-        RETURN(0);
-}
-
-int
-qctxt_init(struct lustre_quota_ctxt *qctxt, struct super_block *sb,
-           dqacq_handler_t handler)
-{
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(qctxt);
-
-        rc = ptlrpcd_addref();
-        if (rc)
-                RETURN(rc);
-
-        spin_lock_init(&qctxt->lqc_lock);
-        spin_lock(&qctxt->lqc_lock);
-        qctxt->lqc_handler = handler;
-        qctxt->lqc_sb = sb;
-        qctxt->lqc_import = NULL;
-        qctxt->lqc_recovery = 0;
-        qctxt->lqc_switch_qs = 1; /* Change qunit size in default setting */
-        qctxt->lqc_cqs_boundary_factor = 4;
-        qctxt->lqc_cqs_least_bunit = PTLRPC_MAX_BRW_SIZE;
-        qctxt->lqc_cqs_least_iunit = 1;
-        qctxt->lqc_cqs_qs_factor = 2;
-        qctxt->lqc_atype = 0;
-        qctxt->lqc_status= 0;
-        qctxt->lqc_bunit_sz = default_bunit_sz;
-        qctxt->lqc_btune_sz = default_bunit_sz / 100 * default_btune_ratio;
-        qctxt->lqc_iunit_sz = default_iunit_sz;
-        qctxt->lqc_itune_sz = default_iunit_sz * default_itune_ratio / 100;
-        qctxt->lqc_switch_seconds = 300; /* enlarging will wait 5 minutes
-                                          * after the last shrinking */
-        rc = lustre_hash_init(&LQC_HASH_BODY(qctxt), "LQS_HASH",128,
-                              &lqs_hash_operations);
-        if (rc) {
-                CDEBUG(D_ERROR, "initialize hash lqs on ost error!\n");
-                lustre_hash_exit(&LQC_HASH_BODY(qctxt));
-        }
-        spin_unlock(&qctxt->lqc_lock);
-
-        RETURN(rc);
-}
-
-void qctxt_cleanup(struct lustre_quota_ctxt *qctxt, int force)
-{
-        struct lustre_qunit *qunit, *tmp;
-        struct list_head tmp_list;
-        int i;
-        ENTRY;
-
-        INIT_LIST_HEAD(&tmp_list);
-
-        spin_lock(&qunit_hash_lock);
-        for (i = 0; i < NR_DQHASH; i++) {
-                list_for_each_entry_safe(qunit, tmp, &qunit_hash[i], lq_hash) {
-                        if (qunit->lq_ctxt != qctxt)
-                                continue;
-                        remove_qunit_nolock(qunit);
-                        list_add(&qunit->lq_hash, &tmp_list);
-                }
-        }
-        spin_unlock(&qunit_hash_lock);
-
-        list_for_each_entry_safe(qunit, tmp, &tmp_list, lq_hash) {
-                list_del_init(&qunit->lq_hash);
-                compute_lqs_after_removing_qunit(qunit);
-
-                /* wake up all waiters */
-                QUNIT_SET_STATE_AND_RC(qunit, QUNIT_FINISHED, 0);
-                wake_up(&qunit->lq_waitq);
-                qunit_put(qunit);
-        }
-
-        lustre_hash_exit(&LQC_HASH_BODY(qctxt));
-        ptlrpcd_decref();
-
-        EXIT;
-}
-
-struct qslave_recov_thread_data {
-        struct obd_device *obd;
-        struct lustre_quota_ctxt *qctxt;
-        struct completion comp;
-};
-
-/* FIXME only recovery block quota by now */
-static int qslave_recovery_main(void *arg)
-{
-        struct qslave_recov_thread_data *data = arg;
-        struct obd_device *obd = data->obd;
-        struct lustre_quota_ctxt *qctxt = data->qctxt;
-        unsigned int type;
-        int rc = 0;
-        ENTRY;
-
-        ptlrpc_daemonize("qslave_recovd");
-
-        complete(&data->comp);
-
-        if (qctxt->lqc_recovery)
-                RETURN(0);
-        qctxt->lqc_recovery = 1;
-
-        for (type = USRQUOTA; type < MAXQUOTAS; type++) {
-                struct qunit_data qdata;
-                struct quota_info *dqopt = sb_dqopt(qctxt->lqc_sb);
-                struct list_head id_list;
-                struct dquot_id *dqid, *tmp;
-                int ret;
-
-                LOCK_DQONOFF_MUTEX(dqopt);
-                if (!sb_has_quota_enabled(qctxt->lqc_sb, type)) {
-                        UNLOCK_DQONOFF_MUTEX(dqopt);
-                        break;
-                }
-
-                LASSERT(dqopt->files[type] != NULL);
-                INIT_LIST_HEAD(&id_list);
-#ifndef KERNEL_SUPPORTS_QUOTA_READ
-                rc = fsfilt_qids(obd, dqopt->files[type], NULL, type, &id_list);
-#else
-                rc = fsfilt_qids(obd, NULL, dqopt->files[type], type, &id_list);
-#endif
-                UNLOCK_DQONOFF_MUTEX(dqopt);
-                if (rc)
-                        CERROR("Get ids from quota file failed. (rc:%d)\n", rc);
-
-                list_for_each_entry_safe(dqid, tmp, &id_list, di_link) {
-                        list_del_init(&dqid->di_link);
-                        /* skip slave recovery on itself */
-                        if (is_master(obd, qctxt, dqid->di_id, type))
-                                goto free;
-                        if (rc && rc != -EBUSY)
-                                goto free;
-
-                        qdata.qd_id = dqid->di_id;
-                        qdata.qd_flags = type;
-                        QDATA_SET_BLK(&qdata);
-                        qdata.qd_count = 0;
-
-                        ret = check_cur_qunit(obd, qctxt, &qdata);
-                        if (ret > 0) {
-                                int opc;
-                                opc = ret == 1 ? QUOTA_DQACQ : QUOTA_DQREL;
-                                rc = split_before_schedule_dqacq(obd, qctxt,
-                                                                 &qdata, opc,
-                                                                 0);
-                                if (rc == -EDQUOT)
-                                        rc = 0;
-                        } else {
-                                rc = 0;
-                        }
-
-                        if (rc)
-                                CDEBUG(rc == -EBUSY ? D_QUOTA : D_ERROR,
-                                       "qslave recovery failed! (id:%d type:%d "
-                                       " rc:%d)\n", dqid->di_id, type, rc);
-free:
-                        kfree(dqid);
-                }
-        }
-
-        qctxt->lqc_recovery = 0;
-        RETURN(rc);
-}
-
-void
-qslave_start_recovery(struct obd_device *obd, struct lustre_quota_ctxt *qctxt)
-{
-        struct qslave_recov_thread_data data;
-        int rc;
-        ENTRY;
-
-        if (!sb_any_quota_enabled(qctxt->lqc_sb))
-                goto exit;
-
-        data.obd = obd;
-        data.qctxt = qctxt;
-        init_completion(&data.comp);
-
-        rc = kernel_thread(qslave_recovery_main, &data, CLONE_VM|CLONE_FILES);
-        if (rc < 0) {
-                CERROR("Cannot start quota recovery thread: rc %d\n", rc);
-                goto exit;
-        }
-        wait_for_completion(&data.comp);
-exit:
-        EXIT;
-}
-
diff --git a/lustre/quota/quota_ctl.c b/lustre/quota/quota_ctl.c
deleted file mode 100644
index 8ab7c0eeba7ff6efb7340d96a212b157d1cdf122..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_ctl.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/quota/quota_ctl.c
- *
- *  Copyright (c) 2005 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifdef __KERNEL__
-# include <linux/version.h>
-# include <linux/module.h>
-# include <linux/init.h>
-# include <linux/fs.h>
-# include <linux/jbd.h>
-# include <linux/ext3_fs.h>
-# include <linux/quota.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/smp_lock.h>
-#  include <linux/buffer_head.h>
-#  include <linux/workqueue.h>
-#  include <linux/mount.h>
-# else
-#  include <linux/locks.h>
-# endif
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_cfg.h>
-#include <obd_ost.h>
-#include <lustre_fsfilt.h>
-#include <lustre_quota.h>
-#include "quota_internal.h"
-
-#ifdef __KERNEL__
-int mds_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct obd_device *obd = exp->exp_obd;
-        int rc = 0;
-        ENTRY;
-
-        switch (oqctl->qc_cmd) {
-        case Q_QUOTAON:
-                rc = mds_quota_on(obd, oqctl);
-                break;
-        case Q_QUOTAOFF:
-                mds_quota_off(obd, oqctl);
-                break;
-        case Q_SETINFO:
-                rc = mds_set_dqinfo(obd, oqctl);
-                break;
-        case Q_GETINFO:
-                rc = mds_get_dqinfo(obd, oqctl);
-                break;
-        case Q_SETQUOTA:
-                rc = mds_set_dqblk(obd, oqctl);
-                break;
-        case Q_GETQUOTA:
-                rc = mds_get_dqblk(obd, oqctl);
-                break;
-        case Q_GETOINFO:
-        case Q_GETOQUOTA:
-                rc = mds_get_obd_quota(obd, oqctl);
-                break;
-        case LUSTRE_Q_INVALIDATE:
-                rc = mds_quota_invalidate(obd, oqctl);
-                break;
-        default:
-                CERROR("%s: unsupported mds_quotactl command: %d\n",
-                       obd->obd_name, oqctl->qc_cmd);
-                RETURN(-EFAULT);
-        }
-
-        if (rc)
-                CDEBUG(D_INFO, "mds_quotactl admin quota command %d, id %u, "
-                               "type %d, failed: rc = %d\n",
-                       oqctl->qc_cmd, oqctl->qc_id, oqctl->qc_type, rc);
-
-        RETURN(rc);
-}
-
-int filter_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct obd_device *obd = exp->exp_obd;
-        struct obd_device_target *obt = &obd->u.obt;
-        struct lvfs_run_ctxt saved;
-        int rc = 0;
-        ENTRY;
-
-        switch (oqctl->qc_cmd) {
-        case Q_QUOTAON:
-        case Q_QUOTAOFF:
-                if (!atomic_dec_and_test(&obt->obt_quotachecking)) {
-                        CDEBUG(D_INFO, "other people are doing quotacheck\n");
-                        atomic_inc(&obt->obt_quotachecking);
-                        rc = -EBUSY;
-                        break;
-                }
-        case Q_GETOINFO:
-        case Q_GETOQUOTA:
-        case Q_GETQUOTA:
-                /* In recovery scenario, this pending dqacq/dqrel might have
-                 * been processed by master successfully before it's dquot
-                 * on master enter recovery mode. We must wait for this 
-                 * dqacq/dqrel done then return the correct limits to master */
-                if (oqctl->qc_stat == QUOTA_RECOVERING)
-                        qctxt_wait_pending_dqacq(&obd->u.obt.obt_qctxt,
-                                                 oqctl->qc_id, oqctl->qc_type, 
-                                                 1);
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                if (oqctl->qc_cmd == Q_QUOTAON || oqctl->qc_cmd == Q_QUOTAOFF) {
-                        if (!rc)
-                                obt->obt_qctxt.lqc_status = 
-                                        (oqctl->qc_cmd == Q_QUOTAON) ? 1 : 0;
-                        atomic_inc(&obt->obt_quotachecking);
-                }
-                break;
-        case Q_SETQUOTA:
-                /* currently, it is only used for nullifying the quota */
-                qctxt_wait_pending_dqacq(&obd->u.obt.obt_qctxt,
-                                         oqctl->qc_id, oqctl->qc_type, 1);
-
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-
-                if (!rc) {
-                        oqctl->qc_cmd = Q_SYNC;
-                        fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-                        oqctl->qc_cmd = Q_SETQUOTA;
-                }
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                break;
-        case Q_INITQUOTA:
-                {
-                unsigned int uid = 0, gid = 0;
-
-                /* Initialize quota limit to MIN_QLIMIT */
-                LASSERT(oqctl->qc_dqblk.dqb_valid == QIF_BLIMITS);
-                LASSERT(oqctl->qc_dqblk.dqb_bsoftlimit == 0);
-
-                /* There might be a pending dqacq/dqrel (which is going to
-                 * clear stale limits on slave). we should wait for it's
-                 * completion then initialize limits */
-                qctxt_wait_pending_dqacq(&obd->u.obt.obt_qctxt,
-                                         oqctl->qc_id, oqctl->qc_type, 1);
-
-                if (!oqctl->qc_dqblk.dqb_bhardlimit)
-                        goto adjust;
-
-                LASSERT(oqctl->qc_dqblk.dqb_bhardlimit == MIN_QLIMIT);
-                push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-                rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-
-                /* Update on-disk quota, in case of lose the changed limits
-                 * (MIN_QLIMIT) on crash, which cannot be recovered.*/
-                if (!rc) {
-                        oqctl->qc_cmd = Q_SYNC;
-                        fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-                        oqctl->qc_cmd = Q_INITQUOTA;
-                }
-                pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-                if (rc)
-                        RETURN(rc);
-adjust:
-                /* Trigger qunit pre-acquire */
-                if (oqctl->qc_type == USRQUOTA)
-                        uid = oqctl->qc_id;
-                else
-                        gid = oqctl->qc_id;
-
-                rc = qctxt_adjust_qunit(obd, &obd->u.obt.obt_qctxt, 
-                                        uid, gid, 1, 0);
-                if (rc == -EDQUOT || rc == -EBUSY) {
-                        CDEBUG(D_QUOTA, "rc: %d.\n", rc);
-                        rc = 0;
-                }
-
-                break;
-                }
-        default:
-                CERROR("%s: unsupported filter_quotactl command: %d\n",
-                       obd->obd_name, oqctl->qc_cmd);
-                RETURN(-EFAULT);
-        }
-
-        RETURN(rc);
-}
-#endif /* __KERNEL__ */
-
-int client_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct ptlrpc_request *req;
-        struct obd_quotactl *oqc;
-        int size[2] = { sizeof(struct ptlrpc_body), sizeof(*oqctl) };
-        int ver, opc, rc;
-        ENTRY;
-
-        if (!strcmp(exp->exp_obd->obd_type->typ_name, LUSTRE_MDC_NAME)) {
-                ver = LUSTRE_MDS_VERSION,
-                opc = MDS_QUOTACTL;
-        } else if (!strcmp(exp->exp_obd->obd_type->typ_name, LUSTRE_OSC_NAME)) {
-                ver = LUSTRE_OST_VERSION,
-                opc = OST_QUOTACTL;
-        } else {
-                RETURN(-EINVAL);
-        }
-
-        req = ptlrpc_prep_req(class_exp2cliimp(exp), ver, opc, 2, size, NULL);
-        if (!req)
-                GOTO(out, rc = -ENOMEM);
-
-        oqc = lustre_msg_buf(req->rq_reqmsg, REQ_REC_OFF, sizeof(*oqctl));
-        *oqc = *oqctl;
-
-        ptlrpc_req_set_repsize(req, 2, size);
-
-        rc = ptlrpc_queue_wait(req);
-        oqc = lustre_swab_repbuf(req, REPLY_REC_OFF, sizeof(*oqc),
-                                 lustre_swab_obd_quotactl);
-        if (oqc == NULL) {
-                CERROR ("Can't unpack obd_quotactl\n");
-                GOTO(out, rc = -EPROTO);
-        }
-
-        *oqctl = *oqc;
-        EXIT;
-out:
-        ptlrpc_req_finished(req);
-        return rc;
-}
-
-int lov_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl)
-{
-        struct obd_device *obd = class_exp2obd(exp);
-        struct lov_obd *lov = &obd->u.lov;
-        __u64 curspace = 0;
-        __u64 bhardlimit = 0;
-        int i, rc = 0;
-        ENTRY;
-
-        if (oqctl->qc_cmd != Q_QUOTAON && oqctl->qc_cmd != Q_QUOTAOFF &&
-            oqctl->qc_cmd != Q_GETOQUOTA && oqctl->qc_cmd != Q_INITQUOTA &&
-            oqctl->qc_cmd != Q_SETQUOTA) {
-                CERROR("bad quota opc %x for lov obd", oqctl->qc_cmd);
-                RETURN(-EFAULT);
-        }
-
-        for (i = 0; i < lov->desc.ld_tgt_count; i++) {
-                int err;
-
-                if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active) {
-                        if (oqctl->qc_cmd == Q_GETOQUOTA) {
-                                CERROR("ost %d is inactive\n", i);
-                                rc = -EIO;
-                        } else {
-                                CDEBUG(D_HA, "ost %d is inactive\n", i);
-                        }
-                        continue;
-                }
-
-                err = obd_quotactl(lov->lov_tgts[i]->ltd_exp, oqctl);
-                if (err) {
-                        if (lov->lov_tgts[i]->ltd_active && !rc)
-                                rc = err;
-                        continue;
-                }
-
-                if (oqctl->qc_cmd == Q_GETOQUOTA) {
-                        curspace += oqctl->qc_dqblk.dqb_curspace;
-                        bhardlimit += oqctl->qc_dqblk.dqb_bhardlimit;
-                }
-        }
-
-        if (oqctl->qc_cmd == Q_GETOQUOTA) {
-                oqctl->qc_dqblk.dqb_curspace = curspace;
-                oqctl->qc_dqblk.dqb_bhardlimit = bhardlimit;
-        }
-        RETURN(rc);
-}
-
diff --git a/lustre/quota/quota_interface.c b/lustre/quota/quota_interface.c
deleted file mode 100644
index 7e388ab340e715523f512a159f5ab6d88d889ff5..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_interface.c
+++ /dev/null
@@ -1,947 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * lustre/quota/quota_interface.c
- *
- * Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *
- * This file is part of Lustre, http://www.lustre.org.
- *
- * No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_MDS
-
-#ifdef __KERNEL__
-# include <linux/version.h>
-# include <linux/module.h>
-# include <linux/init.h>
-# include <linux/fs.h>
-# include <linux/jbd.h>
-# include <linux/ext3_fs.h>
-# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-#  include <linux/smp_lock.h>
-#  include <linux/buffer_head.h>
-#  include <linux/workqueue.h>
-#  include <linux/mount.h>
-# else
-#  include <linux/locks.h>
-# endif
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
-#include <obd_class.h>
-#include <lustre_mds.h>
-#include <lustre_dlm.h>
-#include <lustre_cfg.h>
-#include <obd_ost.h>
-#include <lustre_fsfilt.h>
-#include <lustre_quota.h>
-#include <lprocfs_status.h>
-#include "quota_internal.h"
-
-#ifdef __KERNEL__
-
-/* quota proc file handling functions */
-#ifdef LPROCFS
-
-#define USER_QUOTA      1
-#define GROUP_QUOTA     2
-
-#define MAX_STYPE_SIZE  5
-int lprocfs_quota_rd_type(char *page, char **start, off_t off, int count,
-                          int *eof, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        char stype[MAX_STYPE_SIZE + 1] = "";
-        int type = obd->u.obt.obt_qctxt.lqc_atype;
-        LASSERT(obd != NULL);
-
-        if (type == 0) {
-                strcpy(stype, "off");
-        } else {
-                if (type & USER_QUOTA)
-                        strcat(stype, "u");
-                if (type & GROUP_QUOTA)
-                        strcat(stype, "g");
-        }
-
-        /* append with quota version on MDS */
-        if (!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME)) {
-                int rc;
-                lustre_quota_version_t version;
-
-                rc = mds_quota_get_version(obd, &version);
-                if (rc)
-                        return rc;
-
-                switch (version) {
-                        case LUSTRE_QUOTA_V1:
-                                strcat(stype, "1");
-                                break;
-                        case LUSTRE_QUOTA_V2:
-                                strcat(stype, "2");
-                                break;
-                        default:
-                                return -ENOSYS;
-                }
-        }
-
-        return snprintf(page, count, "%s\n", stype);
-}
-EXPORT_SYMBOL(lprocfs_quota_rd_type);
-
-static int auto_quota_on(struct obd_device *obd, int type,
-                         struct super_block *sb, int is_master)
-{
-        struct obd_quotactl *oqctl;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        ENTRY;
-
-        LASSERT(type == USRQUOTA || type == GRPQUOTA || type == UGQUOTA);
-
-        /* quota already turned on */
-        if (obd->u.obt.obt_qctxt.lqc_status)
-                RETURN(0);
-
-        OBD_ALLOC_PTR(oqctl);
-        if (!oqctl)
-                RETURN(-ENOMEM);
-
-        oqctl->qc_type = type;
-        oqctl->qc_cmd = Q_QUOTAON;
-        oqctl->qc_id = QFMT_LDISKFS;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        if (!is_master)
-                goto local_quota;
-
-        /* turn on cluster wide quota */
-        rc = mds_admin_quota_on(obd, oqctl);
-        if (rc) {
-                CDEBUG(rc == -ENOENT ? D_QUOTA : D_ERROR,
-                       "auto-enable admin quota failed. rc=%d\n", rc);
-                GOTO(out_pop, rc);
-        }
-local_quota:
-        /* turn on local quota */
-        rc = fsfilt_quotactl(obd, sb, oqctl);
-        if (rc) {
-                CDEBUG(rc == -ENOENT ? D_QUOTA : D_ERROR,
-                       "auto-enable local quota failed. rc=%d\n", rc);
-                if (is_master)
-                        mds_quota_off(obd, oqctl);
-        } else {
-                obd->u.obt.obt_qctxt.lqc_status = 1;
-        }
-out_pop:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        OBD_FREE_PTR(oqctl);
-        RETURN(rc);
-}
-
-int lprocfs_quota_wr_type(struct file *file, const char *buffer,
-                          unsigned long count, void *data)
-{
-        struct obd_device *obd = (struct obd_device *)data;
-        struct obd_device_target *obt = &obd->u.obt;
-        int type = 0;
-        unsigned long i;
-        char stype[MAX_STYPE_SIZE + 1] = "";
-        LASSERT(obd != NULL);
-
-        if (count > MAX_STYPE_SIZE)
-                return -EINVAL;
-
-        if (copy_from_user(stype, buffer, count))
-                return -EFAULT;
-
-        for (i = 0 ; i < count ; i++) {
-                int rc;
-
-                switch (stype[i]) {
-                case 'u' :
-                        type |= USER_QUOTA;
-                        break;
-                case 'g' :
-                        type |= GROUP_QUOTA;
-                        break;
-                /* quota version specifiers */
-                case '1' :
-                        if (strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME))
-                                break;
-
-                        rc = mds_quota_set_version(obd, LUSTRE_QUOTA_V1);
-                        if (rc) {
-                                CDEBUG(D_QUOTA, "failed to set quota v1! %d\n", rc);
-                                return rc;
-                        }
-                        break;
-                case '2' :
-                        if (strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME))
-                                break;
-
-                        rc = mds_quota_set_version(obd, LUSTRE_QUOTA_V2);
-                        if (rc) {
-                                CDEBUG(D_QUOTA, "could not set quota v2! %d\n", rc);
-                                return rc;
-                        }
-                        break;
-                default  : /* just skip stray symbols like \n */
-                        break;
-                }
-        }
-
-        obt->obt_qctxt.lqc_atype = type;
-
-        if (type == 0)
-                return count;
-
-        if (!strcmp(obd->obd_type->typ_name, LUSTRE_MDS_NAME))
-                auto_quota_on(obd, type - 1, obt->obt_sb, 1);
-        else if (!strcmp(obd->obd_type->typ_name, LUSTRE_OST_NAME))
-                auto_quota_on(obd, type - 1, obt->obt_sb, 0);
-        else
-                return -EFAULT;
-
-        return count;
-}
-EXPORT_SYMBOL(lprocfs_quota_wr_type);
-
-#endif /* LPROCFS */
-
-static int filter_quota_setup(struct obd_device *obd)
-{
-        int rc = 0;
-        struct obd_device_target *obt = &obd->u.obt;
-        ENTRY;
-
-        atomic_set(&obt->obt_quotachecking, 1);
-        rc = qctxt_init(&obt->obt_qctxt, obt->obt_sb, NULL);
-        if (rc) {
-                CERROR("initialize quota context failed! (rc:%d)\n", rc);
-                RETURN(rc);
-        }
-        RETURN(rc);
-}
-
-static int filter_quota_cleanup(struct obd_device *obd)
-{
-        qctxt_cleanup(&obd->u.obt.obt_qctxt, 0);
-        return 0;
-}
-
-static int filter_quota_setinfo(struct obd_export *exp, struct obd_device *obd)
-{
-        struct obd_import *imp;
-
-        /* setup the quota context import */
-        spin_lock(&obd->u.obt.obt_qctxt.lqc_lock);
-        obd->u.obt.obt_qctxt.lqc_import = exp->exp_imp_reverse;
-        spin_unlock(&obd->u.obt.obt_qctxt.lqc_lock);
-
-        /* make imp's connect flags equal relative exp's connect flags
-         * adding it to avoid the scan export list
-         */
-        imp = exp->exp_imp_reverse;
-        if (imp)
-                imp->imp_connect_data.ocd_connect_flags |=
-                        (exp->exp_connect_flags &
-                         (OBD_CONNECT_QUOTA64 | OBD_CONNECT_CHANGE_QS));
-
-        /* start quota slave recovery thread. (release high limits) */
-        qslave_start_recovery(obd, &obd->u.obt.obt_qctxt);
-        return 0;
-}
-
-static int filter_quota_clearinfo(struct obd_export *exp, struct obd_device *obd)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-
-        /* lquota may be not set up before destroying export, b=14896 */
-        if (!obd->obd_set_up)
-                return 0;
-
-        /* when exp->exp_imp_reverse is destroyed, the corresponding lqc_import
-         * should be invalid b=12374 */
-        if (qctxt->lqc_import == exp->exp_imp_reverse) {
-                spin_lock(&qctxt->lqc_lock);
-                qctxt->lqc_import = NULL;
-                spin_unlock(&qctxt->lqc_lock);
-        }
-
-        return 0;
-}
-
-static int filter_quota_enforce(struct obd_device *obd, unsigned int ignore)
-{
-        ENTRY;
-
-        if (!sb_any_quota_enabled(obd->u.obt.obt_sb))
-                RETURN(0);
-
-        if (ignore)
-                cap_raise(current->cap_effective, CAP_SYS_RESOURCE);
-        else
-                cap_lower(current->cap_effective, CAP_SYS_RESOURCE);
-
-        RETURN(0);
-}
-
-static int filter_quota_getflag(struct obd_device *obd, struct obdo *oa)
-{
-        struct obd_device_target *obt = &obd->u.obt;
-        int err, cnt, rc = 0;
-        struct obd_quotactl *oqctl;
-        ENTRY;
-
-        if (!sb_any_quota_enabled(obt->obt_sb))
-                RETURN(0);
-
-        oa->o_flags &= ~(OBD_FL_NO_USRQUOTA | OBD_FL_NO_GRPQUOTA);
-
-        OBD_ALLOC_PTR(oqctl);
-        if (!oqctl) {
-                CERROR("Not enough memory!");
-                RETURN(-ENOMEM);
-        }
-
-        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-                memset(oqctl, 0, sizeof(*oqctl));
-
-                oqctl->qc_cmd = Q_GETQUOTA;
-                oqctl->qc_type = cnt;
-                oqctl->qc_id = (cnt == USRQUOTA) ? oa->o_uid : oa->o_gid;
-                err = fsfilt_quotactl(obd, obt->obt_sb, oqctl);
-                if (err) {
-                        if (!rc)
-                                rc = err;
-                        continue;
-                }
-
-                /* set over quota flags for a uid/gid */
-                oa->o_valid |= (cnt == USRQUOTA) ?
-                               OBD_MD_FLUSRQUOTA : OBD_MD_FLGRPQUOTA;
-                if (oqctl->qc_dqblk.dqb_bhardlimit &&
-                   (toqb(oqctl->qc_dqblk.dqb_curspace) >
-                    oqctl->qc_dqblk.dqb_bhardlimit))
-                        oa->o_flags |= (cnt == USRQUOTA) ?
-                                OBD_FL_NO_USRQUOTA : OBD_FL_NO_GRPQUOTA;
-        }
-        OBD_FREE_PTR(oqctl);
-        RETURN(rc);
-}
-
-static int filter_quota_acquire(struct obd_device *obd, unsigned int uid,
-                                unsigned int gid)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        int rc;
-        ENTRY;
-
-        rc = qctxt_adjust_qunit(obd, qctxt, uid, gid, LQUOTA_FLAGS_BLK, 1);
-        RETURN(rc);
-}
-
-/* check whether the left quota of certain uid and gid can satisfy a block_write
- * or inode_create rpc. When need to acquire quota, return QUOTA_RET_ACQUOTA */
-static int quota_check_common(struct obd_device *obd, unsigned int uid,
-                              unsigned int gid, int count, int cycle, int isblk)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        int i;
-        __u32 id[MAXQUOTAS] = { uid, gid };
-        struct qunit_data qdata[MAXQUOTAS];
-        int rc = 0, rc2[2] = { 0, 0 };
-        ENTRY;
-
-        CLASSERT(MAXQUOTAS < 4);
-        if (!sb_any_quota_enabled(qctxt->lqc_sb))
-                RETURN(rc);
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct lustre_qunit_size *lqs = NULL;
-
-                qdata[i].qd_id = id[i];
-                qdata[i].qd_flags = i;
-                if (isblk)
-                        QDATA_SET_BLK(&qdata[i]);
-                qdata[i].qd_count = 0;
-
-                /* ignore root user */
-                if (qdata[i].qd_id == 0 && !QDATA_IS_GRP(&qdata[i]))
-                        continue;
-
-                quota_search_lqs(&qdata[i], NULL, qctxt, &lqs);
-                if (!lqs)
-                        continue;
-
-                rc2[i] = compute_remquota(obd, qctxt, &qdata[i], isblk);
-                spin_lock(&lqs->lqs_lock);
-                if (!cycle) {
-                        rc = QUOTA_RET_INC_PENDING;
-                        if (isblk)
-                                lqs->lqs_bwrite_pending += count;
-                        else
-                                lqs->lqs_iwrite_pending += count;
-                }
-
-                CDEBUG(D_QUOTA, "write pending: %lu, qd_count: "LPU64".\n",
-                       isblk ? lqs->lqs_bwrite_pending : lqs->lqs_iwrite_pending,
-                       qdata[i].qd_count);
-                if (rc2[i] == QUOTA_RET_OK) {
-                        if (isblk && qdata[i].qd_count <
-                            lqs->lqs_bwrite_pending * CFS_PAGE_SIZE)
-                                rc2[i] = QUOTA_RET_ACQUOTA;
-                        if (!isblk && qdata[i].qd_count <
-                            lqs->lqs_iwrite_pending)
-                                rc2[i] = QUOTA_RET_ACQUOTA;
-                }
-
-                spin_unlock(&lqs->lqs_lock);
-
-                /* When cycle is zero, lqs_*_pending will be changed. We will
-                 * get reference of the lqs here and put reference of lqs in
-                 * quota_pending_commit b=14784 */
-                if (!cycle)
-                        lqs_getref(lqs);
-
-                /* this is for quota_search_lqs */
-                lqs_putref(lqs);
-        }
-
-        if (rc2[0] == QUOTA_RET_ACQUOTA || rc2[1] == QUOTA_RET_ACQUOTA)
-                RETURN(rc | QUOTA_RET_ACQUOTA);
-        else
-                RETURN(rc);
-}
-
-static int quota_chk_acq_common(struct obd_device *obd, unsigned int uid,
-                                unsigned int gid, int count, int *pending,
-                                int isblk, quota_acquire acquire)
-{
-        int rc = 0, cycle = 0, count_err = 0;
-        ENTRY;
-
-        /* Unfortunately, if quota master is too busy to handle the
-         * pre-dqacq in time and quota hash on ost is used up, we
-         * have to wait for the completion of in flight dqacq/dqrel,
-         * in order to get enough quota for write b=12588 */
-        while ((rc = quota_check_common(obd, uid, gid, count, cycle, isblk)) &
-               QUOTA_RET_ACQUOTA) {
-
-                if (rc & QUOTA_RET_INC_PENDING)
-                        *pending = 1;
-
-                cycle++;
-                if (isblk)
-                        OBD_FAIL_TIMEOUT(OBD_FAIL_OST_HOLD_WRITE_RPC, 90);
-                /* after acquire(), we should run quota_check_common again
-                 * so that we confirm there are enough quota to finish write */
-                rc = acquire(obd, uid, gid);
-
-                /* please reference to dqacq_completion for the below */
-                /* a new request is finished, try again */
-                if (rc == -EAGAIN) {
-                        CDEBUG(D_QUOTA, "finish a quota req, try again\n");
-                        continue;
-                }
-
-                /* it is out of quota already */
-                if (rc == -EDQUOT) {
-                        CDEBUG(D_QUOTA, "out of quota,  return -EDQUOT\n");
-                        break;
-                }
-
-                /* -EBUSY and others, try 10 times */
-                if (rc < 0 && count_err < 10) {
-                        CDEBUG(D_QUOTA, "rc: %d, count_err: %d\n", rc, count_err++);
-                        cfs_schedule_timeout(CFS_TASK_INTERRUPTIBLE, HZ);
-                        continue;
-                }
-
-                if (count_err >= 10 || cycle >= 1000) {
-                        CDEBUG(D_ERROR, "we meet 10 errors or run too many"
-                               " cycles when acquiring quota, quit checking with"
-                               " rc: %d, cycle: %d.\n", rc, cycle);
-                        break;
-                }
-
-                CDEBUG(D_QUOTA, "recheck quota with rc: %d, cycle: %d\n", rc,
-                       cycle);
-        }
-
-        if (!cycle && rc & QUOTA_RET_INC_PENDING)
-                *pending = 1;
-
-        RETURN(rc);
-}
-
-
-static int filter_quota_check(struct obd_device *obd, unsigned int uid,
-                              unsigned int gid, int npage, int *flag,
-                              quota_acquire acquire)
-{
-        return quota_chk_acq_common(obd, uid, gid, npage, flag, LQUOTA_FLAGS_BLK,
-                                    acquire);
-}
-
-/* when a block_write or inode_create rpc is finished, adjust the record for
- * pending blocks and inodes*/
-static int quota_pending_commit(struct obd_device *obd, unsigned int uid,
-                                unsigned int gid, int count, int isblk)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        int i;
-        __u32 id[MAXQUOTAS] = { uid, gid };
-        struct qunit_data qdata[MAXQUOTAS];
-        ENTRY;
-
-        CLASSERT(MAXQUOTAS < 4);
-        if (!sb_any_quota_enabled(qctxt->lqc_sb))
-                RETURN(0);
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct lustre_qunit_size *lqs = NULL;
-
-                qdata[i].qd_id = id[i];
-                qdata[i].qd_flags = i;
-                if (isblk)
-                        QDATA_SET_BLK(&qdata[i]);
-                qdata[i].qd_count = 0;
-
-                if (qdata[i].qd_id == 0 && !QDATA_IS_GRP(&qdata[i]))
-                        continue;
-
-                quota_search_lqs(&qdata[i], NULL, qctxt, &lqs);
-                if (lqs) {
-                        int flag = 0;
-                        spin_lock(&lqs->lqs_lock);
-                        CDEBUG(D_QUOTA, "pending: %lu, count: %d.\n",
-                               isblk ? lqs->lqs_bwrite_pending :
-                               lqs->lqs_iwrite_pending, count);
-
-                        if (isblk) {
-                                if (lqs->lqs_bwrite_pending >= count) {
-                                        lqs->lqs_bwrite_pending -= count;
-                                        flag = 1;
-                                } else {
-                                        CDEBUG(D_ERROR,
-                                               "there are too many blocks!\n");
-                                }
-                        } else {
-                                if (lqs->lqs_iwrite_pending >= count) {
-                                        lqs->lqs_iwrite_pending -= count;
-                                        flag = 1;
-                                } else {
-                                        CDEBUG(D_ERROR,
-                                               "there are too many files!\n");
-                                }
-                        }
-
-                        spin_unlock(&lqs->lqs_lock);
-                        lqs_putref(lqs);
-                        /* When lqs_*_pening is changed back, we'll putref lqs
-                         * here b=14784 */
-                        if (flag)
-                                lqs_putref(lqs);
-                }
-        }
-
-        RETURN(0);
-}
-
-static int filter_quota_pending_commit(struct obd_device *obd, unsigned int uid,
-                                       unsigned int gid, int npage)
-{
-        return quota_pending_commit(obd, uid, gid, npage, LQUOTA_FLAGS_BLK);
-}
-
-static int mds_quota_init(void)
-{
-        return lustre_dquot_init();
-}
-
-static int mds_quota_exit(void)
-{
-        lustre_dquot_exit();
-        return 0;
-}
-
-static int mds_quota_setup(struct obd_device *obd)
-{
-        struct obd_device_target *obt = &obd->u.obt;
-        struct mds_obd *mds = &obd->u.mds;
-        int rc;
-        ENTRY;
-
-        mds->mds_quota_info.qi_version = LUSTRE_QUOTA_V2;
-        atomic_set(&obt->obt_quotachecking, 1);
-        /* initialize quota master and quota context */
-        sema_init(&mds->mds_qonoff_sem, 1);
-        rc = qctxt_init(&obt->obt_qctxt, obt->obt_sb, dqacq_handler);
-        if (rc) {
-                CERROR("initialize quota context failed! (rc:%d)\n", rc);
-                RETURN(rc);
-        }
-        RETURN(rc);
-}
-
-static int mds_quota_cleanup(struct obd_device *obd)
-{
-        qctxt_cleanup(&obd->u.obt.obt_qctxt, 0);
-        RETURN(0);
-}
-
-static int mds_quota_fs_cleanup(struct obd_device *obd)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        int i;
-        ENTRY;
-
-        /* close admin quota files */
-        down(&mds->mds_qonoff_sem);
-        for (i = 0; i < MAXQUOTAS; i++) {
-                if (mds->mds_quota_info.qi_files[i]) {
-                        filp_close(mds->mds_quota_info.qi_files[i], 0);
-                        mds->mds_quota_info.qi_files[i] = NULL;
-                }
-        }
-        up(&mds->mds_qonoff_sem);
-        RETURN(0);
-}
-
-static int mds_quota_check(struct obd_device *obd, unsigned int uid,
-                           unsigned int gid, int inodes, int *flag,
-                           quota_acquire acquire)
-{
-        return quota_chk_acq_common(obd, uid, gid, inodes, flag, 0, acquire);
-}
-
-static int mds_quota_acquire(struct obd_device *obd, unsigned int uid,
-                             unsigned int gid)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        int rc;
-        ENTRY;
-
-        rc = qctxt_adjust_qunit(obd, qctxt, uid, gid, 0, 1);
-        RETURN(rc);
-}
-
-static int mds_quota_pending_commit(struct obd_device *obd, unsigned int uid,
-                                    unsigned int gid, int inodes)
-{
-        return quota_pending_commit(obd, uid, gid, inodes, 0);
-}
-#endif /* __KERNEL__ */
-
-struct osc_quota_info {
-        struct list_head        oqi_hash;       /* hash list */
-        struct client_obd      *oqi_cli;        /* osc obd */
-        unsigned int            oqi_id;         /* uid/gid of a file */
-        short                   oqi_type;       /* quota type */
-};
-
-spinlock_t qinfo_list_lock = SPIN_LOCK_UNLOCKED;
-
-static struct list_head qinfo_hash[NR_DQHASH];
-/* SLAB cache for client quota context */
-cfs_mem_cache_t *qinfo_cachep = NULL;
-
-static inline int hashfn(struct client_obd *cli, unsigned long id, int type)
-                         __attribute__((__const__));
-
-static inline int hashfn(struct client_obd *cli, unsigned long id, int type)
-{
-        unsigned long tmp = ((unsigned long)cli>>6) ^ id;
-        tmp = (tmp * (MAXQUOTAS - type)) % NR_DQHASH;
-        return tmp;
-}
-
-/* caller must hold qinfo_list_lock */
-static inline void insert_qinfo_hash(struct osc_quota_info *oqi)
-{
-        struct list_head *head = qinfo_hash +
-                hashfn(oqi->oqi_cli, oqi->oqi_id, oqi->oqi_type);
-
-        LASSERT_SPIN_LOCKED(&qinfo_list_lock);
-        list_add(&oqi->oqi_hash, head);
-}
-
-/* caller must hold qinfo_list_lock */
-static inline void remove_qinfo_hash(struct osc_quota_info *oqi)
-{
-        LASSERT_SPIN_LOCKED(&qinfo_list_lock);
-        list_del_init(&oqi->oqi_hash);
-}
-
-/* caller must hold qinfo_list_lock */
-static inline struct osc_quota_info *find_qinfo(struct client_obd *cli,
-                                                unsigned int id, int type)
-{
-        unsigned int hashent = hashfn(cli, id, type);
-        struct osc_quota_info *oqi;
-
-        LASSERT_SPIN_LOCKED(&qinfo_list_lock);
-        list_for_each_entry(oqi, &qinfo_hash[hashent], oqi_hash) {
-                if (oqi->oqi_cli == cli &&
-                    oqi->oqi_id == id && oqi->oqi_type == type)
-                        return oqi;
-        }
-        return NULL;
-}
-
-static struct osc_quota_info *alloc_qinfo(struct client_obd *cli,
-                                          unsigned int id, int type)
-{
-        struct osc_quota_info *oqi;
-        ENTRY;
-
-        OBD_SLAB_ALLOC(oqi, qinfo_cachep, CFS_ALLOC_STD, sizeof(*oqi));
-        if(!oqi)
-                RETURN(NULL);
-
-        CFS_INIT_LIST_HEAD(&oqi->oqi_hash);
-        oqi->oqi_cli = cli;
-        oqi->oqi_id = id;
-        oqi->oqi_type = type;
-
-        RETURN(oqi);
-}
-
-static void free_qinfo(struct osc_quota_info *oqi)
-{
-        OBD_SLAB_FREE(oqi, qinfo_cachep, sizeof(*oqi));
-}
-
-int osc_quota_chkdq(struct client_obd *cli, unsigned int uid, unsigned int gid)
-{
-        unsigned int id;
-        int cnt, rc = QUOTA_OK;
-        ENTRY;
-
-        spin_lock(&qinfo_list_lock);
-        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-                struct osc_quota_info *oqi = NULL;
-
-                id = (cnt == USRQUOTA) ? uid : gid;
-                oqi = find_qinfo(cli, id, cnt);
-                if (oqi) {
-                        rc = NO_QUOTA;
-                        break;
-                }
-        }
-        spin_unlock(&qinfo_list_lock);
-
-        RETURN(rc);
-}
-
-int osc_quota_setdq(struct client_obd *cli, unsigned int uid, unsigned int gid,
-                    obd_flag valid, obd_flag flags)
-{
-        unsigned int id;
-        obd_flag noquota;
-        int cnt, rc = 0;
-        ENTRY;
-
-
-        for (cnt = 0; cnt < MAXQUOTAS; cnt++) {
-                struct osc_quota_info *oqi, *old;
-
-                if (!(valid & ((cnt == USRQUOTA) ?
-                    OBD_MD_FLUSRQUOTA : OBD_MD_FLGRPQUOTA)))
-                        continue;
-
-                id = (cnt == USRQUOTA) ? uid : gid;
-                noquota = (cnt == USRQUOTA) ?
-                    (flags & OBD_FL_NO_USRQUOTA) : (flags & OBD_FL_NO_GRPQUOTA);
-
-                oqi = alloc_qinfo(cli, id, cnt);
-                if (oqi) {
-                        spin_lock(&qinfo_list_lock);
-
-                        old = find_qinfo(cli, id, cnt);
-                        if (old && !noquota)
-                                remove_qinfo_hash(old);
-                        else if (!old && noquota)
-                                insert_qinfo_hash(oqi);
-
-                        spin_unlock(&qinfo_list_lock);
-
-                        if (old || !noquota)
-                                free_qinfo(oqi);
-                        if (old && !noquota)
-                                free_qinfo(old);
-                } else {
-                        CERROR("not enough mem!\n");
-                        rc = -ENOMEM;
-                        break;
-                }
-        }
-
-        RETURN(rc);
-}
-
-int osc_quota_cleanup(struct obd_device *obd)
-{
-        struct client_obd *cli = &obd->u.cli;
-        struct osc_quota_info *oqi, *n;
-        int i;
-        ENTRY;
-
-        spin_lock(&qinfo_list_lock);
-        for (i = 0; i < NR_DQHASH; i++) {
-                list_for_each_entry_safe(oqi, n, &qinfo_hash[i], oqi_hash) {
-                        if (oqi->oqi_cli != cli)
-                                continue;
-                        remove_qinfo_hash(oqi);
-                        free_qinfo(oqi);
-                }
-        }
-        spin_unlock(&qinfo_list_lock);
-
-        RETURN(0);
-}
-
-int osc_quota_init(void)
-{
-        int i;
-        ENTRY;
-
-        LASSERT(qinfo_cachep == NULL);
-        qinfo_cachep = cfs_mem_cache_create("osc_quota_info",
-                                            sizeof(struct osc_quota_info),
-                                            0, 0);
-        if (!qinfo_cachep)
-                RETURN(-ENOMEM);
-
-        for (i = 0; i < NR_DQHASH; i++)
-                CFS_INIT_LIST_HEAD(qinfo_hash + i);
-
-        RETURN(0);
-}
-
-int osc_quota_exit(void)
-{
-        struct osc_quota_info *oqi, *n;
-        int i, rc;
-        ENTRY;
-
-        spin_lock(&qinfo_list_lock);
-        for (i = 0; i < NR_DQHASH; i++) {
-                list_for_each_entry_safe(oqi, n, &qinfo_hash[i], oqi_hash) {
-                        remove_qinfo_hash(oqi);
-                        free_qinfo(oqi);
-                }
-        }
-        spin_unlock(&qinfo_list_lock);
-
-        rc = cfs_mem_cache_destroy(qinfo_cachep);
-        LASSERTF(rc == 0, "couldn't destory qinfo_cachep slab\n");
-        qinfo_cachep = NULL;
-
-        RETURN(0);
-}
-
-#ifdef __KERNEL__
-quota_interface_t mds_quota_interface = {
-        .quota_init     = mds_quota_init,
-        .quota_exit     = mds_quota_exit,
-        .quota_setup    = mds_quota_setup,
-        .quota_cleanup  = mds_quota_cleanup,
-        .quota_check    = target_quota_check,
-        .quota_ctl      = mds_quota_ctl,
-        .quota_fs_cleanup       =mds_quota_fs_cleanup,
-        .quota_recovery = mds_quota_recovery,
-        .quota_adjust   = mds_quota_adjust,
-        .quota_chkquota = mds_quota_check,
-        .quota_acquire  = mds_quota_acquire,
-        .quota_pending_commit = mds_quota_pending_commit,
-};
-
-quota_interface_t filter_quota_interface = {
-        .quota_setup    = filter_quota_setup,
-        .quota_cleanup  = filter_quota_cleanup,
-        .quota_check    = target_quota_check,
-        .quota_ctl      = filter_quota_ctl,
-        .quota_setinfo  = filter_quota_setinfo,
-        .quota_clearinfo = filter_quota_clearinfo,
-        .quota_enforce  = filter_quota_enforce,
-        .quota_getflag  = filter_quota_getflag,
-        .quota_acquire  = filter_quota_acquire,
-        .quota_adjust   = filter_quota_adjust,
-        .quota_chkquota = filter_quota_check,
-        .quota_adjust_qunit   = filter_quota_adjust_qunit,
-        .quota_pending_commit = filter_quota_pending_commit,
-};
-#endif /* __KERNEL__ */
-
-quota_interface_t mdc_quota_interface = {
-        .quota_ctl      = client_quota_ctl,
-        .quota_check    = client_quota_check,
-        .quota_poll_check = client_quota_poll_check,
-};
-
-quota_interface_t osc_quota_interface = {
-        .quota_ctl      = client_quota_ctl,
-        .quota_check    = client_quota_check,
-        .quota_poll_check = client_quota_poll_check,
-        .quota_init     = osc_quota_init,
-        .quota_exit     = osc_quota_exit,
-        .quota_chkdq    = osc_quota_chkdq,
-        .quota_setdq    = osc_quota_setdq,
-        .quota_cleanup  = osc_quota_cleanup,
-        .quota_adjust_qunit = client_quota_adjust_qunit,
-};
-
-quota_interface_t lov_quota_interface = {
-        .quota_check    = lov_quota_check,
-        .quota_ctl      = lov_quota_ctl,
-        .quota_adjust_qunit = lov_quota_adjust_qunit,
-};
-
-#ifdef __KERNEL__
-static int __init init_lustre_quota(void)
-{
-        int rc = qunit_cache_init();
-        if (rc)
-                return rc;
-        PORTAL_SYMBOL_REGISTER(filter_quota_interface);
-        PORTAL_SYMBOL_REGISTER(mds_quota_interface);
-        PORTAL_SYMBOL_REGISTER(mdc_quota_interface);
-        PORTAL_SYMBOL_REGISTER(osc_quota_interface);
-        PORTAL_SYMBOL_REGISTER(lov_quota_interface);
-        return 0;
-}
-
-static void /*__exit*/ exit_lustre_quota(void)
-{
-        PORTAL_SYMBOL_UNREGISTER(filter_quota_interface);
-        PORTAL_SYMBOL_UNREGISTER(mds_quota_interface);
-        PORTAL_SYMBOL_UNREGISTER(mdc_quota_interface);
-        PORTAL_SYMBOL_UNREGISTER(osc_quota_interface);
-        PORTAL_SYMBOL_UNREGISTER(lov_quota_interface);
-
-        qunit_cache_cleanup();
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("Lustre Quota");
-MODULE_LICENSE("GPL");
-
-cfs_module(lquota, "1.0.0", init_lustre_quota, exit_lustre_quota);
-
-EXPORT_SYMBOL(mds_quota_interface);
-EXPORT_SYMBOL(filter_quota_interface);
-EXPORT_SYMBOL(mdc_quota_interface);
-EXPORT_SYMBOL(osc_quota_interface);
-EXPORT_SYMBOL(lov_quota_interface);
-#endif /* __KERNEL */
diff --git a/lustre/quota/quota_internal.h b/lustre/quota/quota_internal.h
deleted file mode 100644
index d269c0b1265d50e61e33f14151c2ac610d86e06c..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_internal.h
+++ /dev/null
@@ -1,180 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/quota/quota_internal.h
- *
- *  Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-
-#ifndef __QUOTA_INTERNAL_H
-#define __QUOTA_INTERNAL_H
-
-#include <lustre_quota.h>
-
-/* QUSG covnert bytes to blocks when counting block quota */
-#define QUSG(count, isblk)      (isblk ? toqb(count) : count)
-
-/* This flag is set in qc_stat to distinguish if the current getquota
- * operation is for quota recovery */
-#define QUOTA_RECOVERING    0x01
-
-#ifdef __KERNEL__
-
-#define DQUOT_DEBUG(dquot, fmt, arg...)                                       \
-        CDEBUG(D_QUOTA, "refcnt(%u) id(%u) type(%u) off(%llu) flags(%lu) "    \
-               "bhardlimit("LPU64") curspace("LPU64") ihardlimit("LPU64")"    \
-               "curinodes("LPU64"): " fmt, dquot->dq_refcnt,                  \
-               dquot->dq_id, dquot->dq_type, dquot->dq_off,  dquot->dq_flags, \
-               dquot->dq_dqb.dqb_bhardlimit, dquot->dq_dqb.dqb_curspace,      \
-               dquot->dq_dqb.dqb_ihardlimit, dquot->dq_dqb.dqb_curinodes,     \
-               ## arg);                                                       \
-
-#define QINFO_DEBUG(qinfo, fmt, arg...)                                       \
-        CDEBUG(D_QUOTA, "files (%p/%p) flags(%lu/%lu) blocks(%u/%u) "         \
-               "free_blk(/%u/%u) free_entry(%u/%u): " fmt,                    \
-               qinfo->qi_files[0], qinfo->qi_files[1],                        \
-               qinfo->qi_info[0].dqi_flags, qinfo->qi_info[1].dqi_flags,      \
-               qinfo->qi_info[0].dqi_blocks, qinfo->qi_info[1].dqi_blocks,    \
-               qinfo->qi_info[0].dqi_free_blk, qinfo->qi_info[1].dqi_free_blk,\
-               qinfo->qi_info[0].dqi_free_entry,                              \
-               qinfo->qi_info[1].dqi_free_entry, ## arg);
-
-#define QDATA_DEBUG(qd, fmt, arg...)                                          \
-        CDEBUG(D_QUOTA, "id(%u) flag(%u) type(%c) isblk(%c) count("LPU64") "  \
-               "qd_qunit("LPU64"): " fmt, qd->qd_id, qd->qd_flags,            \
-               QDATA_IS_GRP(qd) ? 'g' : 'u', QDATA_IS_BLK(qd) ? 'b': 'i',     \
-               qd->qd_count,                                                  \
-               (QDATA_IS_ADJBLK(qd) | QDATA_IS_ADJINO(qd)) ? qd->qd_qunit : 0,\
-               ## arg);
-
-#define QAQ_DEBUG(qaq, fmt, arg...)                                           \
-        CDEBUG(D_QUOTA, "id(%u) flag(%u) type(%c) bunit("LPU64") "            \
-               "iunit("LPU64"): " fmt, qaq->qaq_id, qaq->qaq_flags,           \
-               QAQ_IS_GRP(qaq) ? 'g': 'u', qaq->qaq_bunit_sz,                 \
-               qaq->qaq_iunit_sz, ## arg);
-
-#define LQS_DEBUG(lqs, fmt, arg...)                                           \
-        CDEBUG(D_QUOTA, "lqs(%p) id(%u) flag(%lu) type(%c) bunit(%lu) "       \
-               "btune(%lu) iunit(%lu) itune(%lu) lqs_bwrite_pending(%lu) "    \
-               "lqs_iwrite_pending(%lu) ino_rec("LPD64") blk_rec("LPD64" )"   \
-               "refcount(%d): "                                               \
-               fmt, lqs, lqs->lqs_id, lqs->lqs_flags,                         \
-               LQS_IS_GRP(lqs) ? 'g' : 'u',                                   \
-               lqs->lqs_bunit_sz, lqs->lqs_btune_sz, lqs->lqs_iunit_sz,       \
-               lqs->lqs_itune_sz, lqs->lqs_bwrite_pending,                    \
-               lqs->lqs_iwrite_pending, lqs->lqs_ino_rec,                     \
-               lqs->lqs_blk_rec, atomic_read(&lqs->lqs_refcount), ## arg);
-
-
-/* quota_context.c */
-void qunit_cache_cleanup(void);
-int qunit_cache_init(void);
-int qctxt_adjust_qunit(struct obd_device *obd, struct lustre_quota_ctxt *qctxt,
-                       uid_t uid, gid_t gid, __u32 isblk, int wait);
-int qctxt_wait_pending_dqacq(struct lustre_quota_ctxt *qctxt, unsigned int id,
-                             unsigned short type, int isblk);
-int qctxt_init(struct lustre_quota_ctxt *qctxt, struct super_block *sb,
-               dqacq_handler_t handler);
-void qctxt_cleanup(struct lustre_quota_ctxt *qctxt, int force);
-void qslave_start_recovery(struct obd_device *obd,
-                           struct lustre_quota_ctxt *qctxt);
-int compute_remquota(struct obd_device *obd,
-                     struct lustre_quota_ctxt *qctxt, struct qunit_data *qdata,
-                     int isblk);
-/* quota_master.c */
-int lustre_dquot_init(void);
-void lustre_dquot_exit(void);
-int dqacq_handler(struct obd_device *obd, struct qunit_data *qdata, int opc);
-int mds_quota_adjust(struct obd_device *obd, unsigned int qcids[],
-                     unsigned int qpids[], int rc, int opc);
-int filter_quota_adjust(struct obd_device *obd, unsigned int qcids[],
-                        unsigned int qpids[], int rc, int opc);
-int init_admin_quotafiles(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_quota_get_version(struct obd_device *obd, lustre_quota_version_t *ver);
-int mds_quota_set_version(struct obd_device *obd, lustre_quota_version_t ver);
-int mds_quota_invalidate(struct obd_device *obd, struct obd_quotactl *oqctl);
-
-int mds_admin_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_quota_off(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_set_dqinfo(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_get_dqinfo(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_set_dqblk(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_get_dqblk(struct obd_device *obd, struct obd_quotactl *oqctl);
-int mds_quota_recovery(struct obd_device *obd);
-int mds_get_obd_quota(struct obd_device *obd, struct obd_quotactl *oqctl);
-int dquot_create_oqaq(struct lustre_quota_ctxt *qctxt, struct lustre_dquot
-                      *dquot, __u32 ost_num, __u32 mdt_num, int type,
-                      struct quota_adjust_qunit *oqaq);
-#endif
-
-/* quota_ctl.c */
-int mds_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl);
-int filter_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl);
-int client_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl);
-int lov_quota_ctl(struct obd_export *exp, struct obd_quotactl *oqctl);
-
-/* quota_chk.c */
-int target_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl);
-int client_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl);
-int lov_quota_check(struct obd_export *exp, struct obd_quotactl *oqctl);
-int client_quota_poll_check(struct obd_export *exp, struct if_quotacheck *qchk);
-
-#ifdef LPROCFS
-void lprocfs_quotactl_test_init_vars(struct lprocfs_static_vars *lvars);
-void lprocfs_quotacheck_test_init_vars(struct lprocfs_static_vars *lvars);
-#else
-static inline void lprocfs_quotactl_test_init_vars
-                                (struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-static inline void lprocfs_quotacheck_test_init_vars
-                                (struct lprocfs_static_vars *lvars)
-{
-        memset(lvars, 0, sizeof(*lvars));
-}
-#endif
-
-/* quota_adjust_qunit.c */
-int client_quota_adjust_qunit(struct obd_export *exp, struct
-                              quota_adjust_qunit *oqaq);
-int lov_quota_adjust_qunit(struct obd_export *exp, struct
-                           quota_adjust_qunit *oqaq);
-int quota_adjust_slave_lqs(struct quota_adjust_qunit *oqaq, struct
-                          lustre_quota_ctxt *qctxt);
-void qdata_to_oqaq(struct qunit_data *qdata,
-                   struct quota_adjust_qunit *oqaq);
-#ifdef __KERNEL__
-int quota_search_lqs(struct qunit_data *qdata,
-                     struct quota_adjust_qunit *oqaq,
-                     struct lustre_quota_ctxt *qctxt,
-                     struct lustre_qunit_size **lqs_return);
-int quota_create_lqs(struct qunit_data *qdata,
-                     struct quota_adjust_qunit *oqaq,
-                     struct lustre_quota_ctxt *qctxt,
-                     struct lustre_qunit_size **lqs_return);
-void quota_compute_lqs(struct qunit_data *qdata, struct lustre_qunit_size *lqs,
-                       int is_chk, int is_acq);
-
-
-extern int quote_get_qdata(struct ptlrpc_request *req, struct qunit_data *qdata,
-                           int is_req, int is_exp);
-extern int quote_copy_qdata(struct ptlrpc_request *req, struct qunit_data *qdata,
-                            int is_req, int is_exp);
-int filter_quota_adjust_qunit(struct obd_export *exp, struct
-                              quota_adjust_qunit *oqaq);
-#endif
-
-#define LQS_BLK_DECREASE 1
-#define LQS_BLK_INCREASE 2
-#define LQS_INO_DECREASE 4
-#define LQS_INO_INCREASE 8
-
-
-#endif
diff --git a/lustre/quota/quota_master.c b/lustre/quota/quota_master.c
deleted file mode 100644
index 31dc70fdc39ef99cc638a9f64178540532e32203..0000000000000000000000000000000000000000
--- a/lustre/quota/quota_master.c
+++ /dev/null
@@ -1,1591 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  lustre/quota/quota_master.c
- *  Lustre Quota Master request handler
- *
- *  Copyright (c) 2001-2005 Cluster File Systems, Inc.
- *   Author: Niu YaWei <niu@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- */
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-
-#define DEBUG_SUBSYSTEM S_MDS
-
-#include <linux/version.h>
-#include <linux/fs.h>
-#include <asm/unistd.h>
-#include <linux/slab.h>
-#include <linux/quotaops.h>
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/quota.h>
-
-#include <obd_class.h>
-#include <lustre_quota.h>
-#include <lustre_fsfilt.h>
-#include <lustre_mds.h>
-
-#include "quota_internal.h"
-
-/* lock ordering: mds->mds_qonoff_sem > dquot->dq_sem */
-static struct list_head lustre_dquot_hash[NR_DQHASH];
-static spinlock_t dquot_hash_lock = SPIN_LOCK_UNLOCKED;
-
-cfs_mem_cache_t *lustre_dquot_cachep;
-
-int lustre_dquot_init(void)
-{
-        int i;
-        ENTRY;
-
-        LASSERT(lustre_dquot_cachep == NULL);
-        lustre_dquot_cachep = cfs_mem_cache_create("lustre_dquot_cache",
-                                                   sizeof(struct lustre_dquot),
-                                                   0, 0);
-        if (!lustre_dquot_cachep)
-                return (-ENOMEM);
-
-        for (i = 0; i < NR_DQHASH; i++) {
-                INIT_LIST_HEAD(lustre_dquot_hash + i);
-        }
-        RETURN(0);
-}
-
-void lustre_dquot_exit(void)
-{
-        int i;
-        ENTRY;
-        /* FIXME cleanup work ?? */
-
-        for (i = 0; i < NR_DQHASH; i++) {
-                LASSERT(list_empty(lustre_dquot_hash + i));
-        }
-        if (lustre_dquot_cachep) {
-                int rc;
-                rc = cfs_mem_cache_destroy(lustre_dquot_cachep);
-                LASSERTF(rc == 0,"couldn't destroy lustre_dquot_cachep slab\n");
-                lustre_dquot_cachep = NULL;
-        }
-        EXIT;
-}
-
-static inline int
-dquot_hashfn(struct lustre_quota_info *info, unsigned int id, int type)
-             __attribute__((__const__));
-
-static inline int
-dquot_hashfn(struct lustre_quota_info *info, unsigned int id, int type)
-{
-        unsigned long tmp = ((unsigned long)info >> L1_CACHE_SHIFT) ^ id;
-        tmp = (tmp * (MAXQUOTAS - type)) % NR_DQHASH;
-        return tmp;
-}
-
-/* caller must hold dquot_hash_lock */
-static struct lustre_dquot *find_dquot(int hashent,
-                                       struct lustre_quota_info *lqi, qid_t id,
-                                       int type)
-{
-        struct lustre_dquot *dquot;
-        ENTRY;
-
-        LASSERT_SPIN_LOCKED(&dquot_hash_lock);
-        list_for_each_entry(dquot, &lustre_dquot_hash[hashent], dq_hash) {
-                if (dquot->dq_info == lqi &&
-                    dquot->dq_id == id && dquot->dq_type == type)
-                        RETURN(dquot);
-        }
-        RETURN(NULL);
-}
-
-static struct lustre_dquot *alloc_dquot(struct lustre_quota_info *lqi,
-                                        qid_t id, int type)
-{
-        struct lustre_dquot *dquot = NULL;
-        ENTRY;
-
-        OBD_SLAB_ALLOC(dquot, lustre_dquot_cachep, CFS_ALLOC_IO, sizeof(*dquot));
-        if (dquot == NULL)
-                RETURN(NULL);
-
-        INIT_LIST_HEAD(&dquot->dq_hash);
-        init_mutex_locked(&dquot->dq_sem);
-        dquot->dq_refcnt = 1;
-        dquot->dq_info = lqi;
-        dquot->dq_id = id;
-        dquot->dq_type = type;
-        dquot->dq_status = DQ_STATUS_AVAIL;
-
-        RETURN(dquot);
-}
-
-static void free_dquot(struct lustre_dquot *dquot)
-{
-        OBD_SLAB_FREE(dquot, lustre_dquot_cachep, sizeof(*dquot));
-}
-
-static void insert_dquot_nolock(struct lustre_dquot *dquot)
-{
-        struct list_head *head = lustre_dquot_hash +
-            dquot_hashfn(dquot->dq_info, dquot->dq_id, dquot->dq_type);
-        LASSERT(list_empty(&dquot->dq_hash));
-        list_add(&dquot->dq_hash, head);
-}
-
-static void remove_dquot_nolock(struct lustre_dquot *dquot)
-{
-        LASSERT(!list_empty(&dquot->dq_hash));
-        list_del_init(&dquot->dq_hash);
-}
-
-static void lustre_dqput(struct lustre_dquot *dquot)
-{
-        ENTRY;
-        spin_lock(&dquot_hash_lock);
-        LASSERT(dquot->dq_refcnt);
-        dquot->dq_refcnt--;
-        if (!dquot->dq_refcnt) {
-                remove_dquot_nolock(dquot);
-                free_dquot(dquot);
-        }
-        spin_unlock(&dquot_hash_lock);
-        EXIT;
-}
-
-static struct lustre_dquot *lustre_dqget(struct obd_device *obd,
-                                         struct lustre_quota_info *lqi,
-                                         qid_t id, int type)
-{
-        unsigned int hashent = dquot_hashfn(lqi, id, type);
-        struct lustre_dquot *dquot, *empty;
-        ENTRY;
-
-        if ((empty = alloc_dquot(lqi, id, type)) == NULL)
-                RETURN(ERR_PTR(-ENOMEM));
-
-        spin_lock(&dquot_hash_lock);
-        if ((dquot = find_dquot(hashent, lqi, id, type)) != NULL) {
-                dquot->dq_refcnt++;
-                spin_unlock(&dquot_hash_lock);
-                free_dquot(empty);
-        } else {
-                int rc;
-
-                dquot = empty;
-                insert_dquot_nolock(dquot);
-                spin_unlock(&dquot_hash_lock);
-
-                rc = fsfilt_dquot(obd, dquot, QFILE_RD_DQUOT);
-                up(&dquot->dq_sem);
-                if (rc) {
-                        CERROR("can't read dquot from admin quotafile! "
-                               "(rc:%d)\n", rc);
-                        lustre_dqput(dquot);
-                        RETURN(ERR_PTR(rc));
-                }
-
-        }
-
-        LASSERT(dquot);
-        RETURN(dquot);
-}
-
-static void init_oqaq(struct quota_adjust_qunit *oqaq,
-                      struct lustre_quota_ctxt *qctxt,
-                      qid_t id, int type)
-{
-        struct lustre_qunit_size *lqs = NULL;
-
-        oqaq->qaq_id = id;
-        oqaq->qaq_flags = type;
-        quota_search_lqs(NULL, oqaq, qctxt, &lqs);
-        if (lqs) {
-                spin_lock(&lqs->lqs_lock);
-                oqaq->qaq_bunit_sz = lqs->lqs_bunit_sz;
-                oqaq->qaq_iunit_sz = lqs->lqs_iunit_sz;
-                oqaq->qaq_flags    = lqs->lqs_flags;
-                spin_unlock(&lqs->lqs_lock);
-                lqs_putref(lqs);
-        } else {
-                CDEBUG(D_QUOTA, "Can't find the lustre qunit size!\n");
-                oqaq->qaq_bunit_sz = qctxt->lqc_bunit_sz;
-                oqaq->qaq_iunit_sz = qctxt->lqc_iunit_sz;
-        }
-}
-
-int dqacq_adjust_qunit_sz(struct obd_device *obd, qid_t id, int type,
-                          __u32 is_blk)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_ctxt *qctxt = &mds->mds_obt.obt_qctxt;
-        struct obd_device *lov_mds_obd = class_exp2obd(mds->mds_osc_exp);
-        struct lov_obd *lov = &lov_mds_obd->u.lov;
-        __u32 ost_num = lov->desc.ld_tgt_count, mdt_num = 1;
-        struct quota_adjust_qunit *oqaq = NULL;
-        unsigned int uid = 0, gid = 0;
-        struct lustre_quota_info *info = &mds->mds_quota_info;
-        struct lustre_dquot *dquot = NULL;
-        int adjust_res = 0;
-        int rc = 0;
-        ENTRY;
-
-        LASSERT(mds);
-        dquot = lustre_dqget(obd, info, id, type);
-        if (IS_ERR(dquot))
-                RETURN(PTR_ERR(dquot));
-
-        OBD_ALLOC_PTR(oqaq);
-        if (!oqaq)
-                GOTO(out, rc = -ENOMEM);
-
-        down(&dquot->dq_sem);
-        init_oqaq(oqaq, qctxt, id, type);
-
-        rc = dquot_create_oqaq(qctxt, dquot, ost_num, mdt_num,
-                               is_blk ? LQUOTA_FLAGS_ADJBLK :
-                               LQUOTA_FLAGS_ADJINO, oqaq);
-
-        if (rc < 0) {
-                CDEBUG(D_ERROR, "create oqaq failed! (rc:%d)\n", rc);
-                GOTO(out_sem, rc);
-        }
-        QAQ_DEBUG(oqaq, "show oqaq.\n")
-
-        if (!QAQ_IS_ADJBLK(oqaq) && !QAQ_IS_ADJINO(oqaq))
-                GOTO(out_sem, rc);
-
-        /* adjust the mds slave qunit size */
-        adjust_res = quota_adjust_slave_lqs(oqaq, qctxt);
-        if (adjust_res <= 0) {
-                if (adjust_res < 0) {
-                        rc = adjust_res;
-                        CDEBUG(D_ERROR, "adjust mds slave's qunit size failed! \
-                               (rc:%d)\n", rc);
-                } else {
-                        CDEBUG(D_QUOTA, "qunit doesn't need to be adjusted.\n");
-                }
-                GOTO(out_sem, rc);
-        }
-
-        if (type)
-                gid = dquot->dq_id;
-        else
-                uid = dquot->dq_id;
-
-        up(&dquot->dq_sem);
-
-        rc = qctxt_adjust_qunit(obd, qctxt, uid, gid, is_blk, 0);
-        if (rc == -EDQUOT || rc == -EBUSY) {
-                CDEBUG(D_QUOTA, "rc: %d.\n", rc);
-                rc = 0;
-        }
-        if (rc) {
-                CDEBUG(D_ERROR, "mds fail to adjust file quota! \
-                               (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        /* only when block qunit is reduced, boardcast to osts */
-        if ((adjust_res & LQS_BLK_DECREASE) && QAQ_IS_ADJBLK(oqaq))
-                rc = obd_quota_adjust_qunit(mds->mds_osc_exp, oqaq);
-
-out:
-        lustre_dqput(dquot);
-        if (oqaq)
-                OBD_FREE_PTR(oqaq);
-
-        RETURN(rc);
-out_sem:
-	up(&dquot->dq_sem);
-	goto out;
-}
-
-int dqacq_handler(struct obd_device *obd, struct qunit_data *qdata, int opc)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_ctxt *qctxt = &mds->mds_obt.obt_qctxt;
-        struct lustre_quota_info *info = &mds->mds_quota_info;
-        struct lustre_dquot *dquot = NULL;
-        __u64 *usage = NULL;
-        __u64 hlimit = 0, slimit = 0;
-        time_t *time = NULL;
-        unsigned int grace = 0;
-        struct lustre_qunit_size *lqs = NULL;
-        int rc = 0;
-        ENTRY;
-
-        OBD_FAIL_RETURN(OBD_FAIL_OBD_DQACQ, -EIO);
-
-        dquot = lustre_dqget(obd, info, qdata->qd_id, QDATA_IS_GRP(qdata));
-        if (IS_ERR(dquot))
-                RETURN(PTR_ERR(dquot));
-
-        DQUOT_DEBUG(dquot, "get dquot in dqacq_handler\n");
-        QINFO_DEBUG(dquot->dq_info, "get dquot in dqadq_handler\n");
-
-        down(&mds->mds_qonoff_sem);
-        down(&dquot->dq_sem);
-
-        if (dquot->dq_status & DQ_STATUS_RECOVERY) {
-                DQUOT_DEBUG(dquot, "this dquot is under recovering.\n");
-                GOTO(out, rc = -EBUSY);
-        }
-
-        if (QDATA_IS_BLK(qdata)) {
-                grace = info->qi_info[QDATA_IS_GRP(qdata)].dqi_bgrace;
-                usage = &dquot->dq_dqb.dqb_curspace;
-                hlimit = dquot->dq_dqb.dqb_bhardlimit;
-                slimit = dquot->dq_dqb.dqb_bsoftlimit;
-                time = &dquot->dq_dqb.dqb_btime;
-        } else {
-                grace = info->qi_info[QDATA_IS_GRP(qdata)].dqi_igrace;
-                usage = (__u64 *) & dquot->dq_dqb.dqb_curinodes;
-                hlimit = dquot->dq_dqb.dqb_ihardlimit;
-                slimit = dquot->dq_dqb.dqb_isoftlimit;
-                time = &dquot->dq_dqb.dqb_itime;
-        }
-
-        /* if the quota limit in admin quotafile is zero, we just inform
-         * slave to clear quota limit with zero qd_count */
-        if (hlimit == 0 && slimit == 0) {
-                qdata->qd_count = 0;
-                GOTO(out, rc);
-        }
-
-        switch (opc) {
-        case QUOTA_DQACQ:
-                if (hlimit &&
-                    QUSG(*usage + qdata->qd_count, QDATA_IS_BLK(qdata)) > hlimit)
-                {
-                        if (QDATA_IS_CHANGE_QS(qdata) &&
-                            QUSG(*usage, QDATA_IS_BLK(qdata)) < hlimit)
-                                qdata->qd_count = (hlimit -
-                                        QUSG(*usage, QDATA_IS_BLK(qdata)))
-                                        * QUOTABLOCK_SIZE;
-                        else
-                                GOTO(out, rc = -EDQUOT);
-                }
-
-                if (slimit &&
-                    QUSG(*usage + qdata->qd_count, QDATA_IS_BLK(qdata)) > slimit) {
-                        if (*time && cfs_time_current_sec() >= *time)
-                                GOTO(out, rc = -EDQUOT);
-                        else if (!*time)
-                                *time = cfs_time_current_sec() + grace;
-                }
-
-                *usage += qdata->qd_count;
-                break;
-        case QUOTA_DQREL:
-                /* The usage in administrative file might be incorrect before
-                 * recovery done */
-                if (*usage - qdata->qd_count < 0)
-                        *usage = 0;
-                else
-                        *usage -= qdata->qd_count;
-
-                /* (usage <= soft limit) but not (usage < soft limit) */
-                if (!slimit || QUSG(*usage, QDATA_IS_BLK(qdata)) <= slimit)
-                        *time = 0;
-                break;
-        default:
-                LBUG();
-        }
-
-        rc = fsfilt_dquot(obd, dquot, QFILE_WR_DQUOT);
-        EXIT;
-out:
-        up(&dquot->dq_sem);
-        up(&mds->mds_qonoff_sem);
-        lustre_dqput(dquot);
-        if (rc != -EDQUOT)
-                dqacq_adjust_qunit_sz(obd, qdata->qd_id, QDATA_IS_GRP(qdata),
-                                      QDATA_IS_BLK(qdata));
-
-        quota_search_lqs(qdata, NULL, qctxt, &lqs);
-        if (QDATA_IS_BLK(qdata)) {
-                if (!lqs) {
-                        CDEBUG(D_INFO, "Can't find the lustre qunit size!\n");
-                        qdata->qd_qunit  = qctxt->lqc_bunit_sz;
-                } else {
-                        spin_lock(&lqs->lqs_lock);
-                        qdata->qd_qunit  = lqs->lqs_bunit_sz;
-                        spin_unlock(&lqs->lqs_lock);
-                }
-                QDATA_SET_ADJBLK(qdata);
-        } else {
-                if (!lqs) {
-                        CDEBUG(D_INFO, "Can't find the lustre qunit size!\n");
-                        qdata->qd_qunit  = qctxt->lqc_iunit_sz;
-                } else {
-                        spin_lock(&lqs->lqs_lock);
-                        qdata->qd_qunit  = lqs->lqs_iunit_sz;
-                        spin_unlock(&lqs->lqs_lock);
-                }
-                QDATA_SET_ADJINO(qdata);
-        }
-
-        QDATA_DEBUG(qdata, "alloc/release qunit in dqacq_handler\n");
-        if (lqs)
-                lqs_putref(lqs);
-
-        return rc;
-}
-
-int mds_quota_adjust(struct obd_device *obd, unsigned int qcids[],
-                     unsigned int qpids[], int rc, int opc)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        int rc2 = 0;
-        ENTRY;
-
-        if (rc && rc != -EDQUOT && rc != ENOLCK)
-                RETURN(0);
-
-        switch (opc) {
-        case FSFILT_OP_RENAME:
-                /* acquire/release block quota on owner of original parent */
-                rc2 = qctxt_adjust_qunit(obd, qctxt, qpids[2], qpids[3], 1, 0);
-                /* fall-through */
-        case FSFILT_OP_SETATTR:
-                /* acquire/release file quota on original owner */
-                rc2 |= qctxt_adjust_qunit(obd, qctxt, qpids[0], qpids[1], 0, 0);
-                /* fall-through */
-        case FSFILT_OP_CREATE:
-        case FSFILT_OP_UNLINK:
-                /* acquire/release file/block quota on owner of child
-                 * (or current owner) */
-                rc2 |= qctxt_adjust_qunit(obd, qctxt, qcids[0], qcids[1], 0, 0);
-                rc2 |= qctxt_adjust_qunit(obd, qctxt, qcids[0], qcids[1], 1, 0);
-                /* acquire/release block quota on owner of parent
-                 * (or original owner) */
-                rc2 |= qctxt_adjust_qunit(obd, qctxt, qpids[0], qpids[1], 1, 0);
-                break;
-        default:
-                LBUG();
-                break;
-        }
-
-        if (rc2)
-                CDEBUG(rc2 == -EAGAIN ? D_QUOTA: D_ERROR,
-                       "mds adjust qunit failed! (opc:%d rc:%d)\n", opc, rc2);
-        RETURN(0);
-}
-
-int filter_quota_adjust(struct obd_device *obd, unsigned int qcids[],
-                        unsigned int qpids[], int rc, int opc)
-{
-        struct lustre_quota_ctxt *qctxt = &obd->u.obt.obt_qctxt;
-        int rc2 = 0;
-        ENTRY;
-
-        if (rc && rc != -EDQUOT)
-                RETURN(0);
-
-        switch (opc) {
-        case FSFILT_OP_SETATTR:
-                /* acquire/release block quota on original & current owner */
-                rc = qctxt_adjust_qunit(obd, qctxt, qcids[0], qcids[1], 1, 0);
-                rc2 = qctxt_adjust_qunit(obd, qctxt, qpids[0], qpids[1], 1, 0);
-                break;
-        case FSFILT_OP_UNLINK:
-                /* release block quota on this owner */
-        case FSFILT_OP_CREATE: /* XXX for write operation on obdfilter */
-                /* acquire block quota on this owner */
-                rc = qctxt_adjust_qunit(obd, qctxt, qcids[0], qcids[1], 1, 0);
-                break;
-        default:
-                LBUG();
-                break;
-        }
-
-        if (rc || rc2) {
-                if (!rc)
-                        rc = rc2;
-                CDEBUG(rc == -EAGAIN ? D_QUOTA: D_ERROR,
-                       "filter adjust qunit failed! (opc:%d rc%d)\n",
-                       opc, rc);
-        }
-
-        RETURN(0);
-}
-
-static const char prefix[] = "OBJECTS/";
-
-int mds_quota_get_version(struct obd_device *obd,
-                          lustre_quota_version_t *version)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-
-        *version = qinfo->qi_version;
-
-        return 0;
-}
-
-int mds_quota_set_version(struct obd_device *obd, lustre_quota_version_t version)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        int rc = 0, i;
-
-        if (version != LUSTRE_QUOTA_V1 &&
-            version != LUSTRE_QUOTA_V2)
-                return -EINVAL;
-
-        down(&mds->mds_qonoff_sem);
-
-        /* no need to change version? nothing to do then */
-        if (qinfo->qi_version == version)
-                goto out;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                /* quota file has been opened ? */
-                if (qinfo->qi_files[i]) {
-                        rc = -EBUSY;
-                        goto out;
-                }
-        }
-
-        CDEBUG(D_INFO, "changing quota version %d -> %d\n", qinfo->qi_version,
-               version);
-
-        qinfo->qi_version = version;
-
-out:
-        up(&mds->mds_qonoff_sem);
-
-        return rc;
-}
-
-int mds_quota_invalidate(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        int rc = 0, i;
-        char *quotafiles_v1[] = LUSTRE_ADMIN_QUOTAFILES_V1;
-        char *quotafiles_v2[] = LUSTRE_ADMIN_QUOTAFILES_V2;
-        char name[64];
-        struct lvfs_run_ctxt saved;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        down(&mds->mds_qonoff_sem);
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct file *fp;
-                char* quotafile = (qinfo->qi_version == LUSTRE_QUOTA_V1)?
-                                   quotafiles_v1[i]:quotafiles_v2[i];
-
-                if (!Q_TYPESET(oqctl, i))
-                        continue;
-
-                /* quota file has been opened ? */
-                if (qinfo->qi_files[i]) {
-                        rc = -EBUSY;
-                        goto out;
-                }
-
-                LASSERT(strlen(quotafile) + sizeof(prefix) <= sizeof(name));
-                sprintf(name, "%s%s", prefix, quotafile);
-
-                fp = filp_open(name, O_CREAT | O_TRUNC, 0644);
-                if (IS_ERR(fp)) {
-                        rc = PTR_ERR(fp);
-                        CERROR("error invalidating admin quotafile %s (rc:%d)\n",
-                               name, rc);
-                }
-                else
-                        filp_close(fp, 0);
-        }
-
-out:
-        up(&mds->mds_qonoff_sem);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        return rc;
-}
-
-int init_admin_quotafiles(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        char *quotafiles_v1[] = LUSTRE_ADMIN_QUOTAFILES_V1;
-        char *quotafiles_v2[] = LUSTRE_ADMIN_QUOTAFILES_V2;
-        struct lvfs_run_ctxt saved;
-        char name[64];
-        int i, rc = 0;
-        ENTRY;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        down(&mds->mds_qonoff_sem);
-
-        for (i = 0; i < MAXQUOTAS && !rc; i++) {
-                struct file *fp;
-                char* quotafile = (qinfo->qi_version == LUSTRE_QUOTA_V1)?
-                                        quotafiles_v1[i]:quotafiles_v2[i];
-
-                if (!Q_TYPESET(oqctl, i))
-                        continue;
-
-                /* quota file has been opened ? */
-                if (qinfo->qi_files[i]) {
-                        CWARN("init %s admin quotafile while quota on.\n",
-                              i == USRQUOTA ? "user" : "group");
-                        continue;
-                }
-
-                LASSERT(strlen(quotafile) + sizeof(prefix) <= sizeof(name));
-                sprintf(name, "%s%s", prefix, quotafile);
-
-                /* check if quota file exists and is correct */
-                fp = filp_open(name, O_RDONLY, 0);
-                if (!IS_ERR(fp)) {
-                        /* irregular file is not the right place for quota */
-                        if (!S_ISREG(fp->f_dentry->d_inode->i_mode)) {
-                                CERROR("admin quota file %s is not "
-                                       "regular!", quotafile);
-                                filp_close(fp, 0);
-                                rc = -EINVAL;
-                                break;
-                        }
-                        qinfo->qi_files[i] = fp;
-                        rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_CHK);
-                        qinfo->qi_files[i] = 0;
-                        filp_close(fp, 0);
-                }
-                else
-                        rc = PTR_ERR(fp);
-
-                if (!rc)
-                        continue;
-
-                /* -EINVAL may be returned by quotainfo for bad quota file */
-                if (rc != -ENOENT && rc != -EINVAL) {
-                        CERROR("error opening old quota file %s (%d)\n",
-                               name, rc);
-                        break;
-                }
-
-                CDEBUG(D_INFO, "%s new quota file %s\n", name,
-                       rc == -ENOENT ? "creating" : "overwriting");
-
-                /* create quota file overwriting old if needed */
-                fp = filp_open(name, O_CREAT | O_TRUNC, 0644);
-                if (IS_ERR(fp)) {
-                        rc = PTR_ERR(fp);
-                        CERROR("error creating admin quotafile %s (rc:%d)\n",
-                               name, rc);
-                        break;
-                }
-
-                qinfo->qi_files[i] = fp;
-
-                switch (qinfo->qi_version) {
-                case LUSTRE_QUOTA_V1:
-                        rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_INIT_INFO);
-                        if (rc)
-                                CERROR("error init %s admin quotafile! (rc:%d)\n",
-                                       i == USRQUOTA ? "user" : "group", rc);
-                        break;
-                case LUSTRE_QUOTA_V2:
-                        rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_CONVERT);
-                        if (rc)
-                                CERROR("error convert %s admin quotafile! (rc:%d)\n",
-                                       i == USRQUOTA ? "user" : "group", rc);
-                        break;
-                default:
-                        LBUG();
-                }
-
-                filp_close(fp, 0);
-                qinfo->qi_files[i] = NULL;
-        }
-        up(&mds->mds_qonoff_sem);
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        RETURN(rc);
-}
-
-static int close_quota_files(struct obd_quotactl *oqctl,
-                             struct lustre_quota_info *qinfo)
-{
-        int i, rc = 0;
-        ENTRY;
-
-        for (i = 0; i < MAXQUOTAS; i++) {
-                if (!Q_TYPESET(oqctl, i))
-                        continue;
-                if (qinfo->qi_files[i] == NULL) {
-                        rc = -ESRCH;
-                        continue;
-                }
-                filp_close(qinfo->qi_files[i], 0);
-                qinfo->qi_files[i] = NULL;
-        }
-        RETURN(rc);
-}
-
-int mds_admin_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        const char *quotafiles_v1[] = LUSTRE_ADMIN_QUOTAFILES_V1;
-        const char *quotafiles_v2[] = LUSTRE_ADMIN_QUOTAFILES_V2;
-        char name[64];
-        int i, rc = 0;
-        ENTRY;
-
-        /* open admin quota files and read quotafile info */
-        for (i = 0; i < MAXQUOTAS; i++) {
-                struct file *fp;
-                const char* quotafile = qinfo->qi_version == LUSTRE_QUOTA_V1?
-                                        quotafiles_v1[i] : quotafiles_v2[i];
-
-                if (!Q_TYPESET(oqctl, i))
-                        continue;
-
-                LASSERT(strlen(quotafile)
-                        + sizeof(prefix) <= sizeof(name));
-                sprintf(name, "%s%s", prefix, quotafile);
-
-                if (qinfo->qi_files[i] != NULL) {
-                        rc = -EBUSY;
-                        break;
-                }
-
-                fp = filp_open(name, O_RDWR, 0);
-                /* handle transparent migration to 64 bit quota file */
-                if (IS_ERR(fp) && PTR_ERR(fp) == -ENOENT &&
-                    qinfo->qi_version == LUSTRE_QUOTA_V2) {
-                        CDEBUG(D_INFO, "attempting to convert V1 quota file to"
-                                       " V2 format\n");
-                        fp = filp_open(name, O_CREAT | O_TRUNC, 0644);
-                        if (!IS_ERR(fp)) {
-                                qinfo->qi_files[i] = fp;
-                                rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_CONVERT);
-                                if (rc) {
-                                        CERROR("error convert %s admin "
-                                               "quotafile! (rc:%d)\n",
-                                               i == USRQUOTA ? "user" : "group",
-                                               rc);
-                                        break;
-                                }
-                        }
-                }
-
-                if (IS_ERR(fp) || !S_ISREG(fp->f_dentry->d_inode->i_mode)) {
-                        rc = IS_ERR(fp) ? PTR_ERR(fp) : -EINVAL;
-                        CERROR("error open/create %s! (rc:%d)\n", name, rc);
-                        break;
-                }
-                qinfo->qi_files[i] = fp;
-
-                rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_CHK);
-                if (rc) {
-                        CERROR("invalid quota file %s! (rc:%d)\n", name, rc);
-                        break;
-                }
-
-                rc = fsfilt_quotainfo(obd, qinfo, i, QFILE_RD_INFO);
-                if (rc) {
-                        CERROR("error read quotainfo of %s! (rc:%d)\n", name,
-                               rc);
-                        break;
-                }
-        }
-
-        if (rc && rc != -EBUSY)
-                close_quota_files(oqctl, qinfo);
-
-        RETURN(rc);
-}
-
-static int mds_admin_quota_off(struct obd_device *obd,
-                               struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        int rc;
-        ENTRY;
-
-        /* close admin quota files */
-        rc = close_quota_files(oqctl, qinfo);
-        RETURN(rc);
-}
-
-int mds_quota_on(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_device_target *obt = &obd->u.obt;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        ENTRY;
-
-        if (!atomic_dec_and_test(&obt->obt_quotachecking)) {
-                CDEBUG(D_INFO, "other people are doing quotacheck\n");
-                atomic_inc(&obt->obt_quotachecking);
-                RETURN(-EBUSY);
-        }
-
-        down(&mds->mds_qonoff_sem);
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = mds_admin_quota_on(obd, oqctl);
-        if (rc)
-                goto out;
-
-        rc = obd_quotactl(mds->mds_osc_exp, oqctl);
-        if (rc)
-                goto out;
-
-        rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-        if (!rc)
-                obt->obt_qctxt.lqc_status = 1;
-out:
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        up(&mds->mds_qonoff_sem);
-        atomic_inc(&obt->obt_quotachecking);
-        RETURN(rc);
-}
-
-int mds_quota_off(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_device_target *obt = &obd->u.obt;
-        struct lvfs_run_ctxt saved;
-        int rc, rc2;
-        ENTRY;
-
-        if (!atomic_dec_and_test(&obt->obt_quotachecking)) {
-                CDEBUG(D_INFO, "other people are doing quotacheck\n");
-                atomic_inc(&obt->obt_quotachecking);
-                RETURN(-EBUSY);
-        }
-
-        down(&mds->mds_qonoff_sem);
-        /* close admin quota files */
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        mds_admin_quota_off(obd, oqctl);
-
-        rc = obd_quotactl(mds->mds_osc_exp, oqctl);
-        rc2 = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-        if (!rc2)
-                obt->obt_qctxt.lqc_status = 0;
-
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        up(&mds->mds_qonoff_sem);
-        atomic_inc(&obt->obt_quotachecking);
-
-        RETURN(rc ?: rc2);
-}
-
-int mds_set_dqinfo(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        struct obd_dqinfo *dqinfo = &oqctl->qc_dqinfo;
-        int rc;
-        ENTRY;
-
-        down(&mds->mds_qonoff_sem);
-        if (qinfo->qi_files[oqctl->qc_type] == NULL) {
-                rc = -ESRCH;
-                goto out;
-        }
-
-        qinfo->qi_info[oqctl->qc_type].dqi_bgrace = dqinfo->dqi_bgrace;
-        qinfo->qi_info[oqctl->qc_type].dqi_igrace = dqinfo->dqi_igrace;
-        qinfo->qi_info[oqctl->qc_type].dqi_flags = dqinfo->dqi_flags;
-
-        rc = fsfilt_quotainfo(obd, qinfo, oqctl->qc_type, QFILE_WR_INFO);
-
-out:
-        up(&mds->mds_qonoff_sem);
-        RETURN(rc);
-}
-
-int mds_get_dqinfo(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        struct obd_dqinfo *dqinfo = &oqctl->qc_dqinfo;
-        int rc = 0;
-        ENTRY;
-
-        down(&mds->mds_qonoff_sem);
-        if (qinfo->qi_files[oqctl->qc_type] == NULL) {
-                rc = -ESRCH;
-                goto out;
-        }
-
-        dqinfo->dqi_bgrace = qinfo->qi_info[oqctl->qc_type].dqi_bgrace;
-        dqinfo->dqi_igrace = qinfo->qi_info[oqctl->qc_type].dqi_igrace;
-        dqinfo->dqi_flags = qinfo->qi_info[oqctl->qc_type].dqi_flags;
-
-out:
-        up(&mds->mds_qonoff_sem);
-        RETURN(rc);
-}
-
-int dquot_create_oqaq(struct lustre_quota_ctxt *qctxt,
-                      struct lustre_dquot *dquot, __u32 ost_num, __u32 mdt_num,
-                      int type, struct quota_adjust_qunit *oqaq)
-{
-        __u64 bunit_curr_o, iunit_curr_o;
-        unsigned long shrink_qunit_limit = qctxt->lqc_cqs_boundary_factor;
-        unsigned long cqs_factor = qctxt->lqc_cqs_qs_factor;
-        __u64 blimit = dquot->dq_dqb.dqb_bhardlimit ?
-                dquot->dq_dqb.dqb_bhardlimit : dquot->dq_dqb.dqb_bsoftlimit;
-        __u64 ilimit = dquot->dq_dqb.dqb_ihardlimit ?
-                dquot->dq_dqb.dqb_ihardlimit : dquot->dq_dqb.dqb_isoftlimit;
-        int rc = 0;
-        ENTRY;
-
-        if (!dquot || !oqaq)
-                RETURN(-EINVAL);
-        LASSERT_SEM_LOCKED(&dquot->dq_sem);
-        LASSERT(oqaq->qaq_iunit_sz);
-        LASSERT(oqaq->qaq_bunit_sz);
-
-        /* don't change qunit size */
-        if (!qctxt->lqc_switch_qs)
-                RETURN(rc);
-
-        bunit_curr_o = oqaq->qaq_bunit_sz;
-        iunit_curr_o = oqaq->qaq_iunit_sz;
-
-        if (dquot->dq_type == GRPQUOTA)
-                QAQ_SET_GRP(oqaq);
-
-        if ((type & LQUOTA_FLAGS_ADJBLK) && blimit) {
-                __u64 b_limitation =
-                        oqaq->qaq_bunit_sz * ost_num * shrink_qunit_limit;
-                /* enlarge block qunit size */
-                while (blimit >
-                       QUSG(dquot->dq_dqb.dqb_curspace + 2 * b_limitation, 1)) {
-                        oqaq->qaq_bunit_sz =
-                                QUSG(oqaq->qaq_bunit_sz * cqs_factor, 1)
-                                << QUOTABLOCK_BITS;
-                        b_limitation = oqaq->qaq_bunit_sz * ost_num *
-                                shrink_qunit_limit;
-                }
-
-                if (oqaq->qaq_bunit_sz > qctxt->lqc_bunit_sz)
-                        oqaq->qaq_bunit_sz = qctxt->lqc_bunit_sz;
-
-                /* shrink block qunit size */
-                while (blimit <
-                       QUSG(dquot->dq_dqb.dqb_curspace + b_limitation, 1)) {
-                        do_div(oqaq->qaq_bunit_sz , cqs_factor);
-                        oqaq->qaq_bunit_sz = QUSG(oqaq->qaq_bunit_sz, 1) <<
-                                QUOTABLOCK_BITS;
-                        b_limitation = oqaq->qaq_bunit_sz * ost_num *
-                                shrink_qunit_limit;
-                        if (oqaq->qaq_bunit_sz <  qctxt->lqc_cqs_least_bunit)
-                                break;
-                }
-
-                if (oqaq->qaq_bunit_sz < qctxt->lqc_cqs_least_bunit)
-                        oqaq->qaq_bunit_sz = qctxt->lqc_cqs_least_bunit;
-
-                if (bunit_curr_o != oqaq->qaq_bunit_sz)
-                        QAQ_SET_ADJBLK(oqaq);
-
-        }
-
-        if ((type & LQUOTA_FLAGS_ADJINO) && ilimit) {
-                __u64 i_limitation =
-                        oqaq->qaq_iunit_sz * mdt_num * shrink_qunit_limit;
-                /* enlarge file qunit size */
-                while (ilimit > dquot->dq_dqb.dqb_curinodes
-                       + 2 * i_limitation) {
-                        oqaq->qaq_iunit_sz = oqaq->qaq_iunit_sz * cqs_factor;
-                        i_limitation = oqaq->qaq_iunit_sz * mdt_num *
-                                shrink_qunit_limit;
-                }
-
-                if (oqaq->qaq_iunit_sz > qctxt->lqc_iunit_sz)
-                        oqaq->qaq_iunit_sz = qctxt->lqc_iunit_sz;
-
-                /* shrink file qunit size */
-                while (ilimit < dquot->dq_dqb.dqb_curinodes
-                       + i_limitation) {
-                        do_div(oqaq->qaq_iunit_sz, cqs_factor);
-                        i_limitation = oqaq->qaq_iunit_sz * mdt_num *
-                                       shrink_qunit_limit;
-                        if (oqaq->qaq_iunit_sz < qctxt->lqc_cqs_least_iunit)
-                                break;
-                }
-
-                if (oqaq->qaq_iunit_sz < qctxt->lqc_cqs_least_iunit)
-                        oqaq->qaq_iunit_sz = qctxt->lqc_cqs_least_iunit;
-
-                if (iunit_curr_o != oqaq->qaq_iunit_sz)
-                        QAQ_SET_ADJINO(oqaq);
-
-        }
-
-        if (!dquot->dq_dqb.dqb_bhardlimit && !dquot->dq_dqb.dqb_bsoftlimit &&
-            !dquot->dq_dqb.dqb_ihardlimit && !dquot->dq_dqb.dqb_isoftlimit) {
-                oqaq->qaq_bunit_sz = 0;
-                oqaq->qaq_iunit_sz = 0;
-                QAQ_SET_ADJBLK(oqaq);
-                QAQ_SET_ADJINO(oqaq);
-        }
-
-        QAQ_DEBUG(oqaq, "the oqaq computed\n");
-
-        RETURN(rc);
-}
-
-static int mds_init_slave_ilimits(struct obd_device *obd,
-                                  struct obd_quotactl *oqctl, int set,
-                                  struct quota_adjust_qunit *oqaq)
-{
-        /* XXX: for file limits only adjust local now */
-        struct obd_device_target *obt = &obd->u.obt;
-        struct lustre_quota_ctxt *qctxt = &obt->obt_qctxt;
-        unsigned int uid = 0, gid = 0;
-        struct obd_quotactl *ioqc = NULL;
-        int flag;
-        int rc;
-        ENTRY;
-
-        /* if we are going to set zero limit, needn't init slaves */
-        if (!oqctl->qc_dqblk.dqb_ihardlimit && !oqctl->qc_dqblk.dqb_isoftlimit &&
-            set)
-                RETURN(0);
-
-        OBD_ALLOC_PTR(ioqc);
-        if (!ioqc)
-                RETURN(-ENOMEM);
-
-        flag = oqctl->qc_dqblk.dqb_ihardlimit ||
-               oqctl->qc_dqblk.dqb_isoftlimit || set;
-        ioqc->qc_cmd = flag ? Q_INITQUOTA : Q_SETQUOTA;
-        ioqc->qc_id = oqctl->qc_id;
-        ioqc->qc_type = oqctl->qc_type;
-        ioqc->qc_dqblk.dqb_valid = QIF_ILIMITS;
-        ioqc->qc_dqblk.dqb_ihardlimit = flag ? MIN_QLIMIT : 0;
-
-        if (QAQ_IS_ADJINO(oqaq)) {
-                /* adjust the mds slave's inode qunit size */
-                rc = quota_adjust_slave_lqs(oqaq, qctxt);
-                if (rc < 0)
-                        CDEBUG(D_ERROR, "adjust mds slave's inode qunit size \
-                               failed! (rc:%d)\n", rc);
-        }
-
-        /* set local limit to MIN_QLIMIT */
-        rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, ioqc);
-        if (rc)
-                GOTO(out, rc);
-
-        /* trigger local qunit pre-acquire */
-        if (oqctl->qc_type == USRQUOTA)
-                uid = oqctl->qc_id;
-        else
-                gid = oqctl->qc_id;
-
-        rc = qctxt_adjust_qunit(obd, &obd->u.obt.obt_qctxt, uid, gid, 0, 0);
-        if (rc == -EDQUOT || rc == -EBUSY) {
-                CDEBUG(D_QUOTA, "rc: %d.\n", rc);
-                rc = 0;
-        }
-        if (rc) {
-                CDEBUG(D_QUOTA,"error mds adjust local file quota! (rc:%d)\n",
-                       rc);
-                GOTO(out, rc);
-        }
-        /* FIXME initialize all slaves in CMD */
-        EXIT;
-out:
-        if (ioqc)
-                OBD_FREE_PTR(ioqc);
-        return rc;
-}
-
-static int mds_init_slave_blimits(struct obd_device *obd,
-                                  struct obd_quotactl *oqctl, int set,
-                                  struct quota_adjust_qunit *oqaq)
-{
-        struct obd_device_target *obt = &obd->u.obt;
-        struct lustre_quota_ctxt *qctxt = &obt->obt_qctxt;
-        struct mds_obd *mds = &obd->u.mds;
-        struct obd_quotactl *ioqc;
-        unsigned int uid = 0, gid = 0;
-        int rc, rc1 = 0;
-        int flag;
-        ENTRY;
-
-        /* if we are going to set zero limit, needn't init slaves */
-        if (!oqctl->qc_dqblk.dqb_bhardlimit && !oqctl->qc_dqblk.dqb_bsoftlimit &&
-            set)
-                RETURN(0);
-
-        OBD_ALLOC_PTR(ioqc);
-        if (!ioqc)
-                RETURN(-ENOMEM);
-
-        flag = oqctl->qc_dqblk.dqb_bhardlimit ||
-               oqctl->qc_dqblk.dqb_bsoftlimit || set;
-        ioqc->qc_cmd = flag ? Q_INITQUOTA : Q_SETQUOTA;
-        ioqc->qc_id = oqctl->qc_id;
-        ioqc->qc_type = oqctl->qc_type;
-        ioqc->qc_dqblk.dqb_valid = QIF_BLIMITS;
-        ioqc->qc_dqblk.dqb_bhardlimit = flag ? MIN_QLIMIT : 0;
-        if (QAQ_IS_ADJBLK(oqaq)) {
-                /* adjust the mds slave's block qunit size */
-                rc1 = quota_adjust_slave_lqs(oqaq, qctxt);
-                if (rc1 < 0)
-                        CERROR("adjust mds slave's block qunit size failed!"
-                               "(rc:%d)\n", rc1);
-        }
-
-        rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, ioqc);
-        if (rc)
-                GOTO(out, rc);
-
-        /* trigger local qunit pre-acquire */
-        if (oqctl->qc_type == USRQUOTA)
-                uid = oqctl->qc_id;
-        else
-                gid = oqctl->qc_id;
-
-        /* initialize all slave's limit */
-        rc = obd_quotactl(mds->mds_osc_exp, ioqc);
-
-        rc = qctxt_adjust_qunit(obd, &obd->u.obt.obt_qctxt, uid, gid, 1, 0);
-        if (rc == -EDQUOT || rc == -EBUSY) {
-                CDEBUG(D_QUOTA, "rc: %d.\n", rc);
-                rc = 0;
-        }
-        if (rc) {
-                CERROR("error mds adjust local block quota! (rc:%d)\n", rc);
-                GOTO(out, rc);
-        }
-
-        /* adjust all slave's qunit size when setting quota
-         * this is will create a lqs for every ost, which will present
-         * certain uid/gid is set quota or not */
-        QAQ_SET_ADJBLK(oqaq);
-        rc = obd_quota_adjust_qunit(mds->mds_osc_exp, oqaq);
-
-        EXIT;
-out:
-        OBD_FREE_PTR(ioqc);
-        return rc;
-}
-
-int mds_set_dqblk(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_ctxt *qctxt = &mds->mds_obt.obt_qctxt;
-        struct obd_device *lov_obd = class_exp2obd(mds->mds_osc_exp);
-        struct lov_obd *lov = &lov_obd->u.lov;
-        struct quota_adjust_qunit *oqaq = NULL;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        __u64 ihardlimit, isoftlimit, bhardlimit, bsoftlimit;
-        time_t btime, itime;
-        struct lustre_dquot *dquot;
-        struct obd_dqblk *dqblk = &oqctl->qc_dqblk;
-        int set, rc, rc2 = 0, flag = 0;
-        ENTRY;
-
-        OBD_ALLOC_PTR(oqaq);
-        if (!oqaq)
-                RETURN(-ENOMEM);
-        down(&mds->mds_qonoff_sem);
-        init_oqaq(oqaq, qctxt, oqctl->qc_id, oqctl->qc_type);
-
-        if (qinfo->qi_files[oqctl->qc_type] == NULL)
-                GOTO(out_sem, rc = -ESRCH);
-
-        dquot = lustre_dqget(obd, qinfo, oqctl->qc_id, oqctl->qc_type);
-        if (IS_ERR(dquot))
-                GOTO(out_sem, rc = PTR_ERR(dquot));
-        DQUOT_DEBUG(dquot, "get dquot in mds_set_blk\n");
-        QINFO_DEBUG(dquot->dq_info, "get dquot in mds_set_blk\n");
-
-        down(&dquot->dq_sem);
-
-        if (dquot->dq_status) {
-                up(&dquot->dq_sem);
-                lustre_dqput(dquot);
-                GOTO(out_sem, rc = -EBUSY);
-        }
-        dquot->dq_status |= DQ_STATUS_SET;
-
-        ihardlimit = dquot->dq_dqb.dqb_ihardlimit;
-        isoftlimit = dquot->dq_dqb.dqb_isoftlimit;
-        bhardlimit = dquot->dq_dqb.dqb_bhardlimit;
-        bsoftlimit = dquot->dq_dqb.dqb_bsoftlimit;
-        btime = dquot->dq_dqb.dqb_btime;
-        itime = dquot->dq_dqb.dqb_itime;
-
-        if (dqblk->dqb_valid & QIF_BTIME)
-                dquot->dq_dqb.dqb_btime = dqblk->dqb_btime;
-        if (dqblk->dqb_valid & QIF_ITIME)
-                dquot->dq_dqb.dqb_itime = dqblk->dqb_itime;
-
-        if (dqblk->dqb_valid & QIF_BLIMITS) {
-                dquot->dq_dqb.dqb_bhardlimit = dqblk->dqb_bhardlimit;
-                dquot->dq_dqb.dqb_bsoftlimit = dqblk->dqb_bsoftlimit;
-                /* clear usage (limit pool) */
-                if (!dquot->dq_dqb.dqb_bhardlimit &&
-                    !dquot->dq_dqb.dqb_bsoftlimit)
-                        dquot->dq_dqb.dqb_curspace = 0;
-
-                /* clear grace time */
-                if (!dqblk->dqb_bsoftlimit ||
-                    toqb(dquot->dq_dqb.dqb_curspace) <= dqblk->dqb_bsoftlimit)
-                        dquot->dq_dqb.dqb_btime = 0;
-                /* set grace only if user hasn't provided his own */
-                else if (!(dqblk->dqb_valid & QIF_BTIME))
-                        dquot->dq_dqb.dqb_btime = cfs_time_current_sec() +
-                                qinfo->qi_info[dquot->dq_type].dqi_bgrace;
-
-                flag |= LQUOTA_FLAGS_ADJBLK;
-        }
-
-        if (dqblk->dqb_valid & QIF_ILIMITS) {
-                dquot->dq_dqb.dqb_ihardlimit = dqblk->dqb_ihardlimit;
-                dquot->dq_dqb.dqb_isoftlimit = dqblk->dqb_isoftlimit;
-                /* clear usage (limit pool) */
-                if (!dquot->dq_dqb.dqb_ihardlimit &&
-                    !dquot->dq_dqb.dqb_isoftlimit)
-                        dquot->dq_dqb.dqb_curinodes = 0;
-
-                if (!dqblk->dqb_isoftlimit ||
-                    dquot->dq_dqb.dqb_curinodes <= dqblk->dqb_isoftlimit)
-                        dquot->dq_dqb.dqb_itime = 0;
-                else if (!(dqblk->dqb_valid & QIF_ITIME))
-                        dquot->dq_dqb.dqb_itime = cfs_time_current_sec() +
-                                qinfo->qi_info[dquot->dq_type].dqi_igrace;
-
-                flag |= LQUOTA_FLAGS_ADJINO;
-        }
-        QAQ_DEBUG(oqaq, "before dquot_create_oqaq\n");
-        rc = dquot_create_oqaq(qctxt, dquot, lov->desc.ld_tgt_count, 1,
-                               flag, oqaq);
-        QAQ_DEBUG(oqaq, "after dquot_create_oqaq\n");
-        if (rc < 0)
-                CDEBUG(D_QUOTA, "adjust qunit size failed! (rc:%d)\n", rc);
-
-
-        rc = fsfilt_dquot(obd, dquot, QFILE_WR_DQUOT);
-
-        up(&dquot->dq_sem);
-
-        if (rc) {
-                CERROR("set limit failed! (rc:%d)\n", rc);
-                goto out;
-        }
-
-        up(&mds->mds_qonoff_sem);
-        if (dqblk->dqb_valid & QIF_ILIMITS) {
-                set = !(ihardlimit || isoftlimit);
-                down(&dquot->dq_sem);
-                dquot->dq_dqb.dqb_curinodes = 0;
-                up(&dquot->dq_sem);
-                rc = mds_init_slave_ilimits(obd, oqctl, set, oqaq);
-                if (rc) {
-                        CERROR("init slave ilimits failed! (rc:%d)\n", rc);
-                        goto revoke_out;
-                }
-        }
-
-        if (dqblk->dqb_valid & QIF_BLIMITS) {
-                set = !(bhardlimit || bsoftlimit);
-                down(&dquot->dq_sem);
-                dquot->dq_dqb.dqb_curspace = 0;
-                up(&dquot->dq_sem);
-                rc = mds_init_slave_blimits(obd, oqctl, set, oqaq);
-                if (rc) {
-                        CERROR("init slave blimits failed! (rc:%d)\n", rc);
-                        goto revoke_out;
-                }
-        }
-
-revoke_out:
-        down(&mds->mds_qonoff_sem);
-        down(&dquot->dq_sem);
-        if (rc) {
-                /* cancel previous setting */
-                dquot->dq_dqb.dqb_ihardlimit = ihardlimit;
-                dquot->dq_dqb.dqb_isoftlimit = isoftlimit;
-                dquot->dq_dqb.dqb_bhardlimit = bhardlimit;
-                dquot->dq_dqb.dqb_bsoftlimit = bsoftlimit;
-                dquot->dq_dqb.dqb_btime = btime;
-                dquot->dq_dqb.dqb_itime = itime;
-        }
-        rc2 = fsfilt_dquot(obd, dquot, QFILE_WR_DQUOT);
-        up(&dquot->dq_sem);
-
-out:
-        down(&dquot->dq_sem);
-        dquot->dq_status &= ~DQ_STATUS_SET;
-        up(&dquot->dq_sem);
-        lustre_dqput(dquot);
-        EXIT;
-out_sem:
-        up(&mds->mds_qonoff_sem);
-
-        if (oqaq)
-                OBD_FREE_PTR(oqaq);
-
-        return rc ? rc : rc2;
-}
-
-static int mds_get_space(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct obd_quotactl *soqc;
-        struct lvfs_run_ctxt saved;
-        int rc, rc1;
-        ENTRY;
-
-        OBD_ALLOC_PTR(soqc);
-        if (!soqc)
-                RETURN(-ENOMEM);
-
-        soqc->qc_cmd = Q_GETOQUOTA;
-        soqc->qc_id = oqctl->qc_id;
-        soqc->qc_type = oqctl->qc_type;
-
-        rc = obd_quotactl(obd->u.mds.mds_osc_exp, soqc);
-
-        oqctl->qc_dqblk.dqb_curspace = soqc->qc_dqblk.dqb_curspace;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        soqc->qc_dqblk.dqb_curspace = 0;
-        rc1 = fsfilt_quotactl(obd, obd->u.obt.obt_sb, soqc);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        oqctl->qc_dqblk.dqb_curinodes += soqc->qc_dqblk.dqb_curinodes;
-        if (!rc1)
-                oqctl->qc_dqblk.dqb_valid |= QIF_INODES;
-        oqctl->qc_dqblk.dqb_curspace += soqc->qc_dqblk.dqb_curspace;
-        if (!rc && !rc1)
-                oqctl->qc_dqblk.dqb_valid |= QIF_USAGE;
-
-        OBD_FREE_PTR(soqc);
-
-        if (!rc)
-                rc = rc1;
-        RETURN(rc);
-}
-
-int mds_get_dqblk(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-        struct lustre_dquot *dquot;
-        struct obd_dqblk *dqblk = &oqctl->qc_dqblk;
-        int rc;
-        ENTRY;
-
-        down(&mds->mds_qonoff_sem);
-        dqblk->dqb_valid = 0;
-        if (qinfo->qi_files[oqctl->qc_type] == NULL)
-                GOTO(out, rc = -ESRCH);
-
-        dquot = lustre_dqget(obd, qinfo, oqctl->qc_id, oqctl->qc_type);
-        if (IS_ERR(dquot))
-                GOTO(out, rc = PTR_ERR(dquot));
-
-        down(&dquot->dq_sem);
-        dqblk->dqb_ihardlimit = dquot->dq_dqb.dqb_ihardlimit;
-        dqblk->dqb_isoftlimit = dquot->dq_dqb.dqb_isoftlimit;
-        dqblk->dqb_bhardlimit = dquot->dq_dqb.dqb_bhardlimit;
-        dqblk->dqb_bsoftlimit = dquot->dq_dqb.dqb_bsoftlimit;
-        dqblk->dqb_btime = dquot->dq_dqb.dqb_btime;
-        dqblk->dqb_itime = dquot->dq_dqb.dqb_itime;
-        dqblk->dqb_valid |= QIF_LIMITS | QIF_TIMES;
-        up(&dquot->dq_sem);
-
-        lustre_dqput(dquot);
-
-        /* the usages in admin quota file is inaccurate */
-        dqblk->dqb_curinodes = 0;
-        dqblk->dqb_curspace = 0;
-        rc = mds_get_space(obd, oqctl);
-        EXIT;
-out:
-        up(&mds->mds_qonoff_sem);
-        return rc;
-}
-
-int mds_get_obd_quota(struct obd_device *obd, struct obd_quotactl *oqctl)
-{
-        struct lvfs_run_ctxt saved;
-        int rc;
-        ENTRY;
-
-        push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-        rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, oqctl);
-        pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
-
-        RETURN(rc);
-}
-
-
-/* FIXME we only recovery block limit by now, need recovery inode
- * limits also after CMD involved in */
-static int 
-dquot_recovery(struct obd_device *obd, unsigned int id, unsigned short type)
-{
-        struct mds_obd *mds = &obd->u.mds;
-        struct lustre_quota_info *qinfo= &obd->u.mds.mds_quota_info;
-        struct lustre_dquot *dquot;
-        struct obd_quotactl *qctl;
-        __u64 total_limits = 0;
-        int rc;
-        ENTRY;
-
-        OBD_ALLOC_PTR(qctl);
-        if (qctl == NULL)
-                RETURN(-ENOMEM);
-
-        dquot = lustre_dqget(obd, qinfo, id, type);
-        if (IS_ERR(dquot)) {
-                CERROR("Get dquot failed. (rc:%ld)\n", PTR_ERR(dquot));
-                OBD_FREE_PTR(qctl);
-                RETURN(PTR_ERR(dquot));
-        }
-
-        down(&dquot->dq_sem);
-
-        /* don't recovery the dquot without limits or under setting */
-        if (!(dquot->dq_dqb.dqb_bhardlimit || dquot->dq_dqb.dqb_bsoftlimit) ||
-            dquot->dq_status)
-                GOTO(skip, rc = 0);
-        dquot->dq_status |= DQ_STATUS_RECOVERY;
-
-        up(&dquot->dq_sem);
-
-        /* get real bhardlimit from all slaves. */
-        qctl->qc_cmd = Q_GETOQUOTA;
-        qctl->qc_type = type;
-        qctl->qc_id = id;
-        qctl->qc_stat = QUOTA_RECOVERING;
-        rc = obd_quotactl(obd->u.mds.mds_osc_exp, qctl);
-        if (rc)
-                GOTO(out, rc);
-        total_limits = qctl->qc_dqblk.dqb_bhardlimit;
-
-        /* get real bhardlimit from master */
-        rc = fsfilt_quotactl(obd, obd->u.obt.obt_sb, qctl);
-        if (rc)
-                GOTO(out, rc);
-        total_limits += qctl->qc_dqblk.dqb_bhardlimit;
-
-        /* amend the usage of the administrative quotafile */
-        down(&mds->mds_qonoff_sem);
-        down(&dquot->dq_sem);
-
-        dquot->dq_dqb.dqb_curspace = total_limits << QUOTABLOCK_BITS;
-
-        rc = fsfilt_dquot(obd, dquot, QFILE_WR_DQUOT);
-        if (rc)
-                CERROR("write dquot failed! (rc:%d)\n", rc);
-
-        up(&dquot->dq_sem);
-        up(&mds->mds_qonoff_sem);
-        EXIT;
-out:
-        down(&dquot->dq_sem);
-        dquot->dq_status &= ~DQ_STATUS_RECOVERY;
-skip:
-        up(&dquot->dq_sem);
-
-        lustre_dqput(dquot);
-        OBD_FREE_PTR(qctl);
-        return rc;
-}
-
-struct qmaster_recov_thread_data {
-        struct obd_device *obd;
-        struct completion comp;
-};
-
-static int qmaster_recovery_main(void *arg)
-{
-        struct qmaster_recov_thread_data *data = arg;
-        struct obd_device *obd = data->obd;
-        int rc = 0;
-        unsigned short type;
-        ENTRY;
-
-        ptlrpc_daemonize("qmaster_recovd");
-
-        complete(&data->comp);
-
-        for (type = USRQUOTA; type < MAXQUOTAS; type++) {
-                struct mds_obd *mds = &obd->u.mds;
-                struct lustre_quota_info *qinfo = &mds->mds_quota_info;
-                struct list_head id_list;
-                struct dquot_id *dqid, *tmp;
-
-                down(&mds->mds_qonoff_sem);
-                if (qinfo->qi_files[type] == NULL) {
-                        up(&mds->mds_qonoff_sem);
-                        continue;
-                }
-                INIT_LIST_HEAD(&id_list);
-                rc = fsfilt_qids(obd, qinfo->qi_files[type], NULL, type,
-                                 &id_list);
-                up(&mds->mds_qonoff_sem);
-
-                if (rc)
-                        CERROR("error get ids from admin quotafile.(%d)\n", rc);
-
-                list_for_each_entry_safe(dqid, tmp, &id_list, di_link) {
-                        list_del_init(&dqid->di_link);
-                        if (rc)
-                                goto free;
-
-                        rc = dquot_recovery(obd, dqid->di_id, type);
-                        if (rc)
-                                CERROR("qmaster recovery failed! (id:%d type:%d"
-                                       " rc:%d)\n", dqid->di_id, type, rc);
-free:
-                        kfree(dqid);
-                }
-        }
-        RETURN(rc);
-}
-
-int mds_quota_recovery(struct obd_device *obd)
-{
-        struct lov_obd *lov = &obd->u.mds.mds_osc_obd->u.lov;
-        struct qmaster_recov_thread_data data;
-        int rc = 0;
-        ENTRY;
-
-        mutex_down(&lov->lov_lock);
-        if (lov->desc.ld_tgt_count != lov->desc.ld_active_tgt_count) {
-                CWARN("Not all osts are active, abort quota recovery\n");
-                mutex_up(&lov->lov_lock);
-                RETURN(rc);
-        }
-        mutex_up(&lov->lov_lock);
-
-        data.obd = obd;
-        init_completion(&data.comp);
-
-        rc = kernel_thread(qmaster_recovery_main, &data, CLONE_VM|CLONE_FILES);
-        if (rc < 0)
-                CERROR("Cannot start quota recovery thread: rc %d\n", rc);
-
-        wait_for_completion(&data.comp);
-        RETURN(rc);
-}
diff --git a/lustre/quota/quotacheck_test.c b/lustre/quota/quotacheck_test.c
deleted file mode 100644
index a75f7231d452e6e52be9835df448573507cd9fac..0000000000000000000000000000000000000000
--- a/lustre/quota/quotacheck_test.c
+++ /dev/null
@@ -1,223 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2005 Cluster File Systems, Inc.
- *   Author: Lai Siyao <lsy@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org/
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- * A kernel module which tests the fsfilt quotacheck API from the OBD setup function.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/module.h>
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/jbd.h>
-#include <linux/slab.h>
-#include <linux/pagemap.h>
-#include <linux/quotaops.h>
-#include <linux/ext3_fs.h>
-#include <linux/ext3_jbd.h>
-#include <linux/version.h>
-#include <linux/bitops.h>
-
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include <lustre_mds.h>
-#include <obd_ost.h>
-
-char *test_quotafile[] = {"aquotacheck.user", "aquotacheck.group"};
-
-static inline struct ext3_group_desc *
-get_group_desc(struct super_block *sb, int group)
-{
-        unsigned long desc_block, desc;
-        struct ext3_group_desc *gdp;
-
-        desc_block = group / EXT3_DESC_PER_BLOCK(sb);
-        desc = group % EXT3_DESC_PER_BLOCK(sb);
-        gdp = (struct ext3_group_desc *)
-              EXT3_SB(sb)->s_group_desc[desc_block]->b_data;
-
-        return gdp + desc;
-}
-
-static inline struct buffer_head *
-read_inode_bitmap(struct super_block *sb, unsigned long group)
-{
-        struct ext3_group_desc *desc;
-        struct buffer_head *bh;
-
-        desc = get_group_desc(sb, group);
-        bh = sb_bread(sb, le32_to_cpu(desc->bg_inode_bitmap));
-
-        return bh;
-}
-
-static inline struct inode *ext3_iget_inuse(struct super_block *sb,
-                                     struct buffer_head *bitmap_bh,
-                                     int index, unsigned long ino)
-{
-        struct inode *inode = NULL;
-
-        if (ext3_test_bit(index, bitmap_bh->b_data)) {
-                CERROR("i: %d, ino: %lu\n", index, ino);
-                ll_sleep(1);
-                inode = iget(sb, ino);
-        }
-
-        return inode;
-}
-
-static void print_inode(struct inode *inode)
-{
-        loff_t size = 0;
-
-        if (S_ISDIR(inode->i_mode) ||
-            S_ISREG(inode->i_mode) ||
-            S_ISLNK(inode->i_mode))
-                size = inode_get_bytes(inode);
-
-         CERROR("%lu: uid: %u, size: %llu, blocks: %llu, real size: %llu\n",
-               inode->i_ino, inode->i_uid, i_size_read(inode),
-               (long long)inode->i_blocks, size);
-}
-
-/* Test quotaon */
-static int quotacheck_test_1(struct obd_device *obd, struct super_block *sb)
-{
-        struct ext3_sb_info *sbi = EXT3_SB(sb);
-        struct buffer_head *bitmap_bh = NULL;
-        struct inode *inode;
-        unsigned long ino;
-        int i, group;
-        ENTRY;
-
-        for (group = 0; group < sbi->s_groups_count; group++) {
-                ino = group * sbi->s_inodes_per_group + 1;
-                brelse(bitmap_bh);
-                bitmap_bh = read_inode_bitmap(sb, group);
-
-                if (group == 0)
-                        CERROR("groups_count: %lu, inodes_per_group: %lu, first_ino: %u, inodes_count: %u\n",
-                               sbi->s_groups_count, sbi->s_inodes_per_group,
-                               sbi->s_first_ino, le32_to_cpu(sbi->s_es->s_inodes_count));
-
-                for (i = 0; i < sbi->s_inodes_per_group; i++, ino++) {
-                        if (ino < sbi->s_first_ino)
-                                continue;
-                        if (ino > le32_to_cpu(sbi->s_es->s_inodes_count)) {
-                                CERROR("bad inode number: %lu > s_inodes_count\n", ino);
-                                brelse(bitmap_bh);
-                                RETURN(-E2BIG);
-                        }
-                        inode = ext3_iget_inuse(sb, bitmap_bh, i, ino);
-                        if (inode)
-                                print_inode(inode);
-                        iput(inode);
-                }
-        }
-        brelse(bitmap_bh);
-
-        RETURN(0);
-}
-
-/* -------------------------------------------------------------------------
- * Tests above, boring obd functions below
- * ------------------------------------------------------------------------- */
-static int quotacheck_run_tests(struct obd_device *obd, struct obd_device *tgt)
-{
-        int rc;
-        ENTRY;
-
-        if (strcmp(tgt->obd_type->typ_name, LUSTRE_MDS_NAME) &&
-            !strcmp(tgt->obd_type->typ_name, "obdfilter")) {
-                CERROR("TARGET OBD should be mds or ost\n");
-                RETURN(-EINVAL);
-        }
-
-        rc = quotacheck_test_1(tgt, tgt->u.obt.obt_sb);
-
-        return rc;
-}
-
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_quotacheck_test_obd_vars[] = { {0} };
-static struct lprocfs_vars lprocfs_quotacheck_test_module_vars[] = { {0} };
-#endif
-
-void lprocfs_quotacheck_test_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_quotacheck_test_module_vars;
-    lvars->obd_vars     = lprocfs_quotacheck_test_obd_vars;
-}
-
-static int quotacheck_test_cleanup(struct obd_device *obd)
-{
-        lprocfs_obd_cleanup(obd);
-        return 0;
-}
-
-static int quotacheck_test_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-        struct lustre_cfg *lcfg = buf;
-        struct obd_device *tgt;
-        int rc;
-        ENTRY;
-
-        if (lcfg->lcfg_bufcount < 1) {
-                CERROR("requires a mds OBD name\n");
-                RETURN(-EINVAL);
-        }
-
-        tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
-        if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
-                CERROR("target device not attached or not set up (%s)\n",
-                       lustre_cfg_string(lcfg, 1));
-                RETURN(-EINVAL);
-        }
-
-        rc = quotacheck_run_tests(obd, tgt);
-        if (rc)
-                quotacheck_test_cleanup(obd);
-
-        lprocfs_quotacheck_test_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        RETURN(rc);
-}
-
-static struct obd_ops quotacheck_obd_ops = {
-        .o_owner       = THIS_MODULE,
-        .o_setup       = quotacheck_test_setup,
-        .o_cleanup     = quotacheck_test_cleanup,
-};
-
-static int __init quotacheck_test_init(void)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-
-        lprocfs_quotacheck_test_init_vars(&lvars);
-        return class_register_type(&quotacheck_obd_ops, lvars.module_vars,
-                                   "quotacheck_test");
-}
-
-static void __exit quotacheck_test_exit(void)
-{
-        class_unregister_type("quotacheck_test");
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("quotacheck test module");
-MODULE_LICENSE("GPL");
-
-module_init(quotacheck_test_init);
-module_exit(quotacheck_test_exit);
diff --git a/lustre/quota/quotactl_test.c b/lustre/quota/quotactl_test.c
deleted file mode 100644
index 90cb5b98c14db25a82f0b3112380d3be6c1942b7..0000000000000000000000000000000000000000
--- a/lustre/quota/quotactl_test.c
+++ /dev/null
@@ -1,363 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2005 Cluster File Systems, Inc.
- *   Author: Lai Siyao <lsy@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org/
- *
- *   No redistribution or use is permitted outside of Cluster File Systems, Inc.
- *
- * A kernel module which tests the fsfilt quotactl API from the OBD setup function.
- */
-
-#ifndef EXPORT_SYMTAB
-# define EXPORT_SYMTAB
-#endif
-#define DEBUG_SUBSYSTEM S_CLASS
-
-#include <linux/module.h>
-#include <linux/init.h>
-
-#include <obd_class.h>
-#include <lustre_fsfilt.h>
-#include <lustre_mds.h>
-#include <obd_ost.h>
-
-static struct obd_quotactl oqctl;
-
-/* Test quotaon */
-static int quotactl_test_1(struct obd_device *obd, struct super_block *sb)
-{
-        int rc;
-        ENTRY;
-
-        oqctl.qc_cmd = Q_QUOTAON;
-        oqctl.qc_id = QFMT_LDISKFS;
-        oqctl.qc_type = UGQUOTA;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc)
-                CERROR("1a: quotactl Q_QUOTAON failed: %d\n", rc);
-        RETURN(rc);
-}
-
-#if 0 /* set/getinfo not supported, this is for cluster-wide quotas */
-/* Test set/getinfo */
-static int quotactl_test_2(struct obd_device *obd, struct super_block *sb)
-{
-        struct obd_quotactl oqctl;
-        int rc;
-        ENTRY;
-
-        oqctl.qc_cmd = Q_SETINFO;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_dqinfo.dqi_bgrace = 1616;
-        oqctl.qc_dqinfo.dqi_igrace = 2828;
-        oqctl.qc_dqinfo.dqi_flags = 0;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("2a: quotactl Q_SETINFO failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        oqctl.qc_cmd = Q_GETINFO;
-        oqctl.qc_type = USRQUOTA;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("2b: quotactl Q_GETINFO failed: %d\n", rc);
-                RETURN(rc);
-        }
-        if (oqctl.qc_dqinfo.dqi_bgrace != 1616 ||
-            oqctl.qc_dqinfo.dqi_igrace != 2828 ||
-            oqctl.qc_dqinfo.dqi_flags != 0) {
-                CERROR("2c: quotactl Q_GETINFO get wrong result: %d, %d, %d\n",
-                       oqctl.qc_dqinfo.dqi_bgrace,
-                       oqctl.qc_dqinfo.dqi_igrace,
-                       oqctl.qc_dqinfo.dqi_flags);
-                RETURN(-EINVAL);
-        }
-
-        RETURN(0);
-}
-#endif
-       
-/* Test set/getquota */
-static int quotactl_test_3(struct obd_device *obd, struct super_block *sb)
-{
-        int rc;
-        ENTRY;
-
-        oqctl.qc_cmd = Q_SETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        oqctl.qc_dqblk.dqb_bhardlimit = 919;
-        oqctl.qc_dqblk.dqb_bsoftlimit = 818;
-        oqctl.qc_dqblk.dqb_ihardlimit = 616;
-        oqctl.qc_dqblk.dqb_isoftlimit = 515;
-        oqctl.qc_dqblk.dqb_valid = QIF_LIMITS;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3a: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        oqctl.qc_cmd = Q_GETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3b: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-        if (oqctl.qc_dqblk.dqb_bhardlimit != 919 ||
-            oqctl.qc_dqblk.dqb_bsoftlimit != 818 ||
-            oqctl.qc_dqblk.dqb_ihardlimit != 616 ||
-            oqctl.qc_dqblk.dqb_isoftlimit != 515) {
-                CERROR("3c: quotactl Q_GETQUOTA get wrong result:"
-                       LPU64", "LPU64", "LPU64", "LPU64"\n",
-                       oqctl.qc_dqblk.dqb_bhardlimit,
-                       oqctl.qc_dqblk.dqb_bsoftlimit,
-                       oqctl.qc_dqblk.dqb_ihardlimit,
-                       oqctl.qc_dqblk.dqb_isoftlimit);
-                RETURN(-EINVAL);
-        }
-
-        oqctl.qc_cmd = Q_SETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        oqctl.qc_dqblk.dqb_curspace = 717;
-        oqctl.qc_dqblk.dqb_curinodes = 414;
-        oqctl.qc_dqblk.dqb_valid = QIF_USAGE;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3d: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        oqctl.qc_cmd = Q_GETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3e: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-        if (oqctl.qc_dqblk.dqb_curspace != 717 ||
-            oqctl.qc_dqblk.dqb_curinodes != 414) {
-                CERROR("3f: quotactl Q_GETQUOTA get wrong result: "
-                       LPU64", "LPU64"\n", oqctl.qc_dqblk.dqb_curspace,
-                       oqctl.qc_dqblk.dqb_curinodes);
-                RETURN(-EINVAL);
-        }
-
-        oqctl.qc_cmd = Q_SETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_dqblk.dqb_btime = 313;
-        oqctl.qc_dqblk.dqb_itime = 212;
-        oqctl.qc_id = 500;
-        oqctl.qc_dqblk.dqb_valid = QIF_TIMES;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3g: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        oqctl.qc_cmd = Q_GETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3h: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-        if (oqctl.qc_dqblk.dqb_btime != 313 ||
-            oqctl.qc_dqblk.dqb_itime != 212) {
-                CERROR("3i: quotactl Q_GETQUOTA get wrong result: "
-                       LPU64", "LPU64"\n", oqctl.qc_dqblk.dqb_btime,
-                       oqctl.qc_dqblk.dqb_itime);
-                RETURN(-EINVAL);
-        }
-
-        oqctl.qc_cmd = Q_SETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        oqctl.qc_dqblk.dqb_bhardlimit = 919;
-        oqctl.qc_dqblk.dqb_bsoftlimit = 818;
-        oqctl.qc_dqblk.dqb_curspace = 717;
-        oqctl.qc_dqblk.dqb_ihardlimit = 616;
-        oqctl.qc_dqblk.dqb_isoftlimit = 515;
-        oqctl.qc_dqblk.dqb_curinodes = 414;
-        oqctl.qc_dqblk.dqb_btime = 313;
-        oqctl.qc_dqblk.dqb_itime = 212;
-        oqctl.qc_dqblk.dqb_valid = QIF_ALL;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3j: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        oqctl.qc_cmd = Q_GETQUOTA;
-        oqctl.qc_type = USRQUOTA;
-        oqctl.qc_id = 500;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("3k: quotactl Q_SETQUOTA failed: %d\n", rc);
-                RETURN(rc);
-        }
-        if (oqctl.qc_dqblk.dqb_bhardlimit != 919 ||
-            oqctl.qc_dqblk.dqb_bsoftlimit != 818 ||
-            oqctl.qc_dqblk.dqb_ihardlimit != 616 ||
-            oqctl.qc_dqblk.dqb_isoftlimit != 515 ||
-            oqctl.qc_dqblk.dqb_curspace != 717 ||
-            oqctl.qc_dqblk.dqb_curinodes != 414 ||
-            oqctl.qc_dqblk.dqb_btime != 0 ||
-            oqctl.qc_dqblk.dqb_itime != 0) {
-                CERROR("3l: quotactl Q_GETQUOTA get wrong result:"
-                       LPU64", "LPU64", "LPU64", "LPU64", "LPU64", "LPU64", "
-                       LPU64", "LPU64"\n", oqctl.qc_dqblk.dqb_bhardlimit,
-                       oqctl.qc_dqblk.dqb_bsoftlimit,
-                       oqctl.qc_dqblk.dqb_ihardlimit,
-                       oqctl.qc_dqblk.dqb_isoftlimit,
-                       oqctl.qc_dqblk.dqb_curspace,
-                       oqctl.qc_dqblk.dqb_curinodes,
-                       oqctl.qc_dqblk.dqb_btime,
-                       oqctl.qc_dqblk.dqb_itime);
-                RETURN(-EINVAL);
-        }
-
-        RETURN(0);
-}
-
-/* Test quotaoff */
-static int quotactl_test_4(struct obd_device *obd, struct super_block *sb)
-{
-        int rc;
-        ENTRY;
-
-        oqctl.qc_cmd = Q_QUOTAOFF;
-        oqctl.qc_id = 500;
-        oqctl.qc_type = UGQUOTA;
-        rc = fsfilt_quotactl(obd, sb, &oqctl);
-        if (rc) {
-                CERROR("4a: quotactl Q_QUOTAOFF failed: %d\n", rc);
-                RETURN(rc);
-        }
-
-        RETURN(0);
-}
-
-/* -------------------------------------------------------------------------
- * Tests above, boring obd functions below
- * ------------------------------------------------------------------------- */
-static int quotactl_run_tests(struct obd_device *obd, struct obd_device *tgt)
-{
-        struct super_block *sb;
-        struct lvfs_run_ctxt saved;
-        int rc;
-        ENTRY;
-
-        if (strcmp(tgt->obd_type->typ_name, LUSTRE_MDS_NAME) &&
-            !strcmp(tgt->obd_type->typ_name, "obdfilter")) {
-                CERROR("TARGET OBD should be mds or ost\n");
-                RETURN(-EINVAL);
-        }
-
-        sb = tgt->u.obt.obt_sb;
-
-        push_ctxt(&saved, &tgt->obd_lvfs_ctxt, NULL);
-
-        rc = quotactl_test_1(tgt, sb);
-        if (rc)
-                GOTO(cleanup, rc);
-
-#if 0
-        rc = quotactl_test_2(tgt, sb);
-        if (rc)
-                GOTO(cleanup, rc);
-#endif
-
-        rc = quotactl_test_3(tgt, sb);
-        if (rc)
-                GOTO(cleanup, rc);
-
- cleanup:
-        quotactl_test_4(tgt, sb);
-
-        pop_ctxt(&saved, &tgt->obd_lvfs_ctxt, NULL);
-
-        return rc;
-}
-
-#ifdef LPROCFS
-static struct lprocfs_vars lprocfs_quotactl_test_obd_vars[] = { {0} };
-static struct lprocfs_vars lprocfs_quotactl_test_module_vars[] = { {0} };
-
-void lprocfs_quotactl_test_init_vars(struct lprocfs_static_vars *lvars)
-{
-    lvars->module_vars  = lprocfs_quotactl_test_module_vars;
-    lvars->obd_vars     = lprocfs_quotactl_test_obd_vars;
-}
-#endif
-
-static int quotactl_test_cleanup(struct obd_device *obd)
-{
-        lprocfs_obd_cleanup(obd);
-        return 0;
-}
-
-static int quotactl_test_setup(struct obd_device *obd, obd_count len, void *buf)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-        struct lustre_cfg *lcfg = buf;
-        struct obd_device *tgt;
-        int rc;
-        ENTRY;
-
-        if (lcfg->lcfg_bufcount < 1) {
-                CERROR("requires a mds OBD name\n");
-                RETURN(-EINVAL);
-        }
-
-        tgt = class_name2obd(lustre_cfg_string(lcfg, 1));
-        if (!tgt || !tgt->obd_attached || !tgt->obd_set_up) {
-                CERROR("target device not attached or not set up (%s)\n",
-                       lustre_cfg_string(lcfg, 1));
-                RETURN(-EINVAL);
-        }
-
-        lprocfs_quotactl_test_init_vars(&lvars);
-        lprocfs_obd_setup(obd, lvars.obd_vars);
-
-        rc = quotactl_run_tests(obd, tgt);
-
-        quotactl_test_cleanup(obd);
-
-        RETURN(rc);
-}
-
-static struct obd_ops quotactl_obd_ops = {
-        .o_owner       = THIS_MODULE,
-        .o_setup       = quotactl_test_setup,
-        .o_cleanup     = quotactl_test_cleanup,
-};
-
-static int __init quotactl_test_init(void)
-{
-        struct lprocfs_static_vars lvars = { 0 };
-
-        lprocfs_quotactl_test_init_vars(&lvars);
-        return class_register_type(&quotactl_obd_ops, lvars.module_vars,
-                                   "quotactl_test");
-}
-
-static void __exit quotactl_test_exit(void)
-{
-        class_unregister_type("quotactl_test");
-}
-
-MODULE_AUTHOR("Cluster File Systems, Inc. <info@clusterfs.com>");
-MODULE_DESCRIPTION("quotactl test module");
-MODULE_LICENSE("GPL");
-
-module_init(quotactl_test_init);
-module_exit(quotactl_test_exit);
diff --git a/lustre/scripts/.cvsignore b/lustre/scripts/.cvsignore
deleted file mode 100644
index e5a85d6db503f37ae1a70dd1d49603a676295a36..0000000000000000000000000000000000000000
--- a/lustre/scripts/.cvsignore
+++ /dev/null
@@ -1,18 +0,0 @@
-.Xrefs
-lustre.spec
-config.log
-config.status
-configure
-Makefile
-Makefile.in
-.deps
-TAGS
-version_tag.pl
-lustre_createcsv
-lustre_config
-lc_net
-lc_modprobe
-lc_hb
-lc_cluman
-lc_md
-lc_lvm
diff --git a/lustre/scripts/Makefile.am b/lustre/scripts/Makefile.am
deleted file mode 100644
index f0a44a33e4ca7ad55b8da3670a6064b5e35a6ab4..0000000000000000000000000000000000000000
--- a/lustre/scripts/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-
-sbinscripts = lc_servip lustre_up14 lustre_rmmod
-
-# These are scripts that are generated from .in files
-genscripts = lustre_config lc_modprobe lc_net lc_hb lc_cluman lustre_createcsv lc_md lc_lvm
-
-sbin_SCRIPTS = $(genscripts) $(sbinscripts)
-bin_SCRIPTS = lustre_req_history
-
-EXTRA_DIST = license-status maketags.sh version_tag.pl.in lc_common \
-	     $(addsuffix .in,$(genscripts)) lc_mon $(sbinscripts) \
-	     $(bin_SCRIPTS)
-
-scriptlibdir = $(libdir)/@PACKAGE@
-scriptlib_DATA = lc_common
-
-CLEANFILES = $(genscripts)
-
-$(genscripts): %: %.in
-	sed -e 's#@scriptlibdir@#$(scriptlibdir)#' < $< > $@
-	chmod +x $@
diff --git a/lustre/scripts/bdev-io-survey.sh b/lustre/scripts/bdev-io-survey.sh
deleted file mode 100755
index 084ca5a810fc21d1fb94b06e865896edd35f9ba6..0000000000000000000000000000000000000000
--- a/lustre/scripts/bdev-io-survey.sh
+++ /dev/null
@@ -1,883 +0,0 @@
-#!/bin/bash
-
-# for now all the units are in 'k', but we could introduce some helpers
-# would be nice to run tests in the background and trap signals and kill
-#
-#  todo:
-#	make sure devices aren't in use before going to town
-#	really use threads with iozone
-#	look into what sgp_dd is really doing, update arguments
-# 	rename config/prepare/setup/cleanup/finish/teardown
-# 	do something with sf and fpp iterating
-#	discard first vmstat line
-#
-
-HOSTNAME=`hostname`
-# a temp dir that is setup and torn down for each script run
-tmpdir=""
-# so we can kill background processes as the test cleans up
-declare -a cleanup_pids
-# to unmount mounts in our tmpdir before removing it
-declare -a cleanup_mounts
-# global for completing the table.  XXX this is a wart that could go
-cur_y="0"
-# a global which funcs use to get at the blocks[] array
-last_block=-1
-# prefix to run oprofile or readprofile
-oprofile=""
-readprofile=""
-
-# defaults for some options:
-min_threads=1
-max_threads=4
-possible_tests="sgp_dd ext2_iozone echo_filter"
-run_tests="$possible_tests"
-echo_module=""
-
-# optional output directory
-output_dir=""
- 
-die() {
-        echo $* 1>&2
-        exit 1
-}
-rm_or_die() {
-        for path in $*; do
-                [ -e $path ] || continue;
-                [ -f $path ] || die "needed to remove non-file $path"
-                rm -f $path || die "couldn't remove $path"
-        done
-}
-save_output() {
-	[ ! -z "$output_dir" ] && mv -f $1 $output_dir/$2
-}
-cleanup() {
-	# only cleanup test runs if we have block devices
-	if [ $last_block != -1 ]; then
-		for pid in ${cleanup_pids[*]}; do
-			kill $pid
-		done
-		cleanup_echo_filter
-		for a in ${cleanup_mounts[*]}; do
-			umount -f $a
-		done
-	fi
-
-        [ ${#tmpdir} == 18 ] && [ -d $tmpdir ] && rm -rf $tmpdir
-}
-trap cleanup EXIT
-
-pid_now_running() {
-	local pid=$1
-	cleanup_pids[$pid]=$pid
-}
-pid_has_stopped() {
-	local pid=$1
-	unset cleanup_pids[$pid]
-}
-                                                                                
-commas() {
-	echo $* | sed -e 's/ /,/g'
-}
-do_bc_scale() {
-	local scale=$1
-	shift
-        echo "scale=$scale; $*" | bc
-}
-do_bc() {
-	do_bc_scale 10 $*
-}
-mean_stddev() {
-	local points=$*
-
-	local avg=0
-	local num=0
-	for p in $points; do
-		avg=`do_bc $avg + $p`
-		num=`do_bc $num + 1`
-	done
-	case $num in
-		0) echo '??' ; return ;;
-		1) echo "$avg:0" ; return ;;
-	esac
-
-	avg=`do_bc $avg / $num`
-	local tmp=0
-	for p in $points; do
-	        local dev=`do_bc \($p - $avg\) \^ 2`
-	        tmp=`do_bc $tmp + $dev`
-	done
-	tmp=`do_bc_scale 1 sqrt \( $tmp / \($num - 1\) \)`
-	avg=`do_bc_scale 1 $avg / 1`
-	echo "$avg:$tmp"
-}
-
-usage() {
-        echo $*
-        echo "       -b <block device to profile>"
-        echo "       -d <summary output directory>"
-        echo "       -l <max io len>"
-        echo "       -t <minimum number of threads per device>"
-        echo "       -T <maximum number of threads per device>"
-        echo "       -r <tests to run>"
-        exit;
-}
-
-# some cute code for handling tables whose columns fit
-set_max() {
-        local target=$1
-        local val=$2
-                                                                                
-        if [ $val -gt ${!target:-0} ]; then
-                eval $target=$val
-        fi
-}
-table_set() {
-        local name="_table_$1"
-        local col=$2
-        local row=$3
-        local val=$4
-        local num
-                                                                                
-        eval ${name}_${row}_${col}="'$val'"
-                                                                                
-        set_max ${name}_${col}_longest ${#val}
-        set_max ${name}_num_col $(($col + 1))
-        set_max ${name}_num_row $(($row + 1))
-}
-                                                                                
-table_get() {
-        local name="_table_$1"
-        local col=$2
-        local row=$3
-        tmp="${name}_${row}_${col}"
-        echo ${!tmp}
-}
-                                                                                
-table_dump() {
-        local name="_table_$1"
-        local num_col;
-        local num_row;
-        local fmt="";
-        local tmp
-        local sep
-                                                                                
-        tmp="${name}_num_col"
-        num_col="${!tmp:-0}"
-        tmp="${name}_num_row"
-        num_row="${!tmp:-0}"
-                                                                                
-        # iterate through the columns to find the longest
-                                                                                
-        sep=" "
-        for x in `seq 0 $num_col`; do
-                tmp="${name}_${x}_longest"
-                tmp=${!tmp:-0}
-                [ $tmp -eq 0 ] && continue
-                                                                                
-                [ $x -eq $((num_col - 1)) ] && sep='\n'
-                                                                                
-                fmt="$fmt%-${tmp}s$sep"
-        done
-                                                                                
-        # nothing in the table to print
-        [ -z "$fmt" ] && return
-                                                                                
-        for y in `seq 0 $num_row`; do
-                local row=""
-                for x in `seq 0 $num_col`; do
-                                                                                
-                        # skip this element if the column is empty
-                        tmp="${name}_${x}_longest"
-                        [ ${!tmp:-0} -eq 0 ] && continue
-                                                                                
-                        # fill this cell with the value or '' for printf
-                        tmp="${name}_${y}_${x}"
-                        row="$row'${!tmp:-""}' "
-                done
-                eval printf "'$fmt'" $row
-        done
-}
-
-######################################################################
-# the sgp_dd tests
-sgp_dd_banner() {
-	echo sgp_dd using dio=1 and thr=
-}
-sgp_dd_config() {
-	# it could be making sure that the block dev
-	# isn't in use by something else
-	local nothing=0
-}
-sgp_dd_prepare() {
-	if ! which sgp_dd; then
-		echo "can't find sgp_dd binary"
-		return 1
-	fi
-	return 0
-}
-sgp_dd_setup() {
-	# it could be making sure that the block dev
-	# isn't in use by something else
-	local nothing=0
-}
-sgp_dd_start() {
-	local threads=$1
-	local iosize=$2
-	local wor=$3
-	local i=$4
-	local ifof;
-	local bdev=${blocks[$i]};
-
-	case "$wor" in
-		[wo]) ifof="if=/dev/zero of=$bdev" ;;
-		r) ifof="if=$bdev of=/dev/null" ;;
-		*) die "asked to do io with $wor?"
-	esac
-	echo sgp_dd $ifof bs=$iosize"k" count=$(($io_len / $iosize)) time=1 \
-			dio=1 thr=$threads
-}
-sgp_dd_result() {
-	local output=$1
-
-	awk '($(NF) == "MB/sec") {print $(NF-1)}' < $output
-}
-sgp_dd_cleanup() {
-	# got me
-	local nothing=0
-}
-sgp_dd_finish() {
-	# got me
-	local nothing=0
-}
-sgp_dd_teardown() {
-	# got me
-	local nothing=0
-}
-
-######################################################################
-# the iozone tests
-ext2_iozone_banner() {
-	echo "iozone -I on a clean ext2 fs"
-}
-ext2_iozone_config() {
-	local nothing=0
-}
-ext2_iozone_prepare() {
-	local index=$1
-	local bdev=${blocks[$index]}
-	local mntpnt=$tmpdir/mount_$index
-
-	if ! which iozone; then
-		echo "iozone binary not found in PATH"
-		return 1
-	fi
-	if ! iozone -i 0 -w -+o -s 1k -r 1k -f /dev/null > /dev/null; then
-		echo "iozone doesn't support -+o"
-		return 1
-	fi
-	if ! which mke2fs; then
-		echo "mke2fs binary not found in PATH"
-		return 1
-	fi
-
-	if ! mkdir -p $mntpnt ; then
-		echo "$mntpnt isn't a directory?"
-	fi
-
-	echo making ext2 filesystem on $bdev
-	if ! mke2fs -b 4096 $bdev; then
-		echo "mke2fs failed"
-		return 1;
-	fi
-
-	if ! mount -t ext2 $bdev $mntpnt; then 
-		echo "couldn't mount $bdev on $mntpnt"
-		return 1;
-	fi
-
-	cleanup_mounts[$index]="$mntpnt"
-	return 0
-}
-ext2_iozone_setup() {
-	local id=$1
-	local wor=$2
-	local f="$tmpdir/mount_$id/iozone"
-
-	case "$wor" in
-		w) rm -f $f ;;
-		[or]) ;;
-		*) die "asked to do io with $wor?"
-	esac
-}
-ext2_iozone_start() {
-	local threads=$1
-	local iosize=$2
-	local wor=$3
-	local id=$4
-	local args;
-	local f="$tmpdir/mount_$id/iozone"
-
-	case "$wor" in
-		[wo]) args="-i 0 -w" ;;
-		r) args="-i 1" ;;
-		*) die "asked to do io with $wor?"
-	esac
-
-	echo iozone "$args -r ${iosize}k -s $(($io_len / $threads))k \
-			-t $threads -+o -x -I -f $f"
-}
-ext2_iozone_result() {
-	local output=$1
-	local wor=$2
-	local string
-	local field
-
-	case "$wor" in
-		[wo]) string="writers" 
-		   field=7 
-			;;
-		r) string="readers" 
-		   field=6
-			;;
-		*) die "asked to do io with $wor?"
-	esac
-
-	do_bc_scale 1 `awk '($1 == "Parent" && $'$field' == "'$string'") \
-			{print $'$(($field + 2))'}' $output` / 1024
-}
-ext2_iozone_cleanup() {
-	# the final read w/o -w removed the file
-	local nothing=0
-}
-ext2_iozone_finish() {
-	local index=$1
-	local mntpnt=$tmpdir/mount_$index
-
-	umount -f $mntpnt
-	unset cleanup_mounts[$index]
-}
-ext2_iozone_teardown() {
-	local nothing=0
-}
-
-######################################################################
-# the lctl test_brw via the echo_client on top of the filter
-
-# the echo_client setup is nutty enough to warrant its own clenaup
-running_config=""
-running_module=""
-declare -a running_names
-declare -a running_oids
-
-cleanup_echo_filter() {
-	local i
-
-	for i in `seq 0 $last_block`; do
-		[ -z "${running_oids[$i]}" ] && continue
-		lctl --device "\$"echo_$i destroy ${running_oids[$i]} \
-			$running_threads
-	done
-	unset running_oids
-
-	for n in ${running_names[*]}; do
-# I can't believe leading whitespace matters here.
-lctl << EOF
-cfg_device $n
-cleanup
-detach
-quit
-EOF
-	done
-	unset running_names
-
-	for m in $running_module; do
-		rmmod $m
-	done
-	running_module=""
-
-	[ ! -z "$running_config" ] && lconf --cleanup $running_config
-	running_config=""
-}
-
-echo_filter_banner() {
-	echo "test_brw on the echo_client on the filter" 
-}
-echo_filter_config() {
-	local index=$1
-	local bdev=${blocks[$index]}
-	local config="$tmpdir/config.xml"
-
-	if ! which lmc; then
-		echo "lmc binary not found in PATH"
-		return 1
-	fi
-	if ! which lconf; then
-		echo "lconf binary not found in PATH"
-		return 1
-	fi
-	if ! which lctl; then
-		echo "lctl binary not found in PATH"
-		return 1
-	fi
-
-	if [ $index = 0 ]; then
-		if ! lmc -m $config --add net \
-			--node $HOSTNAME --nid $HOSTNAME --nettype tcp; then
-			echo "error adding $HOSTNAME net node"
-			return 1
-		fi
-	fi
-
-	if ! lmc -m $config --add ost --ost ost_$index --node $HOSTNAME \
-			--fstype ext3 --dev $bdev --journal_size 400; then
-		echo "error adding $bdev to config with lmc"
-		return 1
-	fi
-
-	# it would be nice to be able to ask lmc to setup an echo client
-	# to the filter here.  --add echo_client assumes osc
-}
-echo_filter_prepare() {
-	local index=$1
-	local bdev=${blocks[$index]}
-	local config="$tmpdir/config.xml"
-	local name="echo_$index"
-	local uuid="echo_$index_uuid"
-
-	if [ $index = 0 ]; then
-		if ! lconf --reformat $config; then
-			echo "error setting up with lconf"
-			return 1;
-		fi
-		running_config="$config"
-
-		echo 0 > /proc/sys/lnet/debug
-		echo 0 > /proc/sys/lnet/subsystem_debug
-
-		if ! grep -q '^obdecho\>' /proc/modules; then
-			local m
-			if ! modprobe obdecho; then
-				if [ ! -z "$echo_module" ]; then
-					if ! insmod $echo_module; then
-						echo "err: insmod $echo_module"
-						return 1;
-					else
-						m="$echo_module"
-					fi
-				else
-					echo "err: modprobe $obdecho"
-					return 1;
-				fi
-			else
-				m=obdecho
-			fi
-			running_module=`basename $m | cut -d'.' -f 1`
-		fi
-	fi
-
-lctl << EOF
-        newdev
-        attach echo_client $name $uuid
-        setup ost_$index
-        quit
-EOF
-	if [  $? != 0 ]; then
-		echo "error setting up echo_client $name against ost_$index"
-		return 1
-	fi
-	running_names[$index]=$name
-}
-echo_filter_setup() {
-	local id=$1
-	local wor=$2
-	local threads=$3
-	local name="echo_$id"
-	local oid
-
-	case "$wor" in
-		w) ;;
-		[or]) return ;;
-		*) die "asked to do io with $wor?"
-	esac
-
-	running_threads=$threads
-	oid=`lctl --device "\$"$name create $threads | \
-		awk '/ #1 is object id/ { print $6 }'`
-	# XXX need to deal with errors
-	running_oids[$id]=$oid
-}
-echo_filter_start() {
-	local threads=$1
-	local iosize=$2
-	local wor=$3
-	local id=$4
-	local rw
-
-	local name="echo_$id"
-	local len_pages=$(($io_len / $(($page_size / 1024)) / $threads ))
-	local size_pages=$(($iosize / $(($page_size / 1024)) ))
-
-	case "$wor" in
-		[wo]) rw="w" ;;
-		r) rw="r" ;;
-		*) die "asked to do io with $wor?"
-	esac
-
-	echo lctl --threads $threads v "\$"$name \
-		test_brw 1 $rw v $len_pages t${running_oids[$id]} p$size_pages
-}
-echo_filter_result() {
-	local output=$1
-	local total=0
-	local mbs
-
-	for mbs in `awk '($8=="MB/s):"){print substr($7,2)}' < $output`; do
-		total=$(do_bc $total + $mbs)
-	done
-	do_bc_scale 2 $total / 1
-}
-echo_filter_cleanup() {
-	local id=$1
-	local wor=$2
-	local threads=$3
-	local name="echo_$id"
-
-	case "$wor" in
-		[wo]) return ;;
-		r) ;;
-		*) die "asked to do io with $wor?"
-	esac
-
-	lctl --device "\$"$name destroy ${running_oids[$id]} $threads
-	unset running_oids[$id]
-}
-echo_filter_finish() {
-	local index=$1
-	# leave real work for _teardown
-}
-echo_filter_teardown() {
-	cleanup_echo_filter
-}
-
-######################################################################
-# the iteration that drives the tests
-
-test_one() {
-	local test=$1
-	local my_x=$2
-	local threads=$3
-	local iosize=$4
-	local wor=$5
-	local vmstat_pid
-	local vmstat_log="$tmpdir/vmstat.log"
-	local opref="$test-$threads-$iosize-$wor"
-	local -a iostat_pids
-	# sigh.  but this makes it easier to dump into the tables
-	local -a read_req_s
-	local -a mb_s
-	local -a write_req_s
-	local -a sects_req
-	local -a queued_reqs
-	local -a service_ms
-
-	for i in `seq 0 $last_block`; do
-		${test}_setup $i $wor $threads
-	done
-
-	echo $test with $threads threads
-
-	$oprofile opcontrol --start
-
-	# start up vmstat and record its pid
-        nice -19 vmstat 1 > $vmstat_log 2>&1 &
-	[ $? = 0 ] || die "vmstat failed"
-	vmstat_pid=$!
-	pid_now_running $vmstat_pid
-
-	# start up each block device's iostat
-	for i in `seq 0 $last_block`; do
-		nice -19 iostat -x ${blocks[$i]} 1 | awk \
-			'($1 == "'${blocks[$i]}'"){print $0; fflush()}' \
-			> $tmpdir/iostat.$i &
-		local pid=$!
-		pid_now_running $pid
-		iostat_pids[$i]=$pid
-	done
-
-	$oprofile opcontrol --reset
-	$readprofile -r
-
-	# start all the tests.  each returns a pid to wait on
-	pids=""
-	for i in `seq 0 $last_block`; do
-		local cmd=`${test}_start $threads $iosize $wor $i`
-		echo "$cmd" >> $tmpdir/commands
-		$cmd > $tmpdir/$i 2>&1 &
-		local pid=$!
-		pids="$pids $pid"
-		pid_now_running $pid
-	done
-
-	echo -n waiting on pids $pids:
-	for p in $pids; do
-		wait $p
-		echo -n .
-		pid_has_stopped $p
-	done
-
-	# stop vmstat and all the iostats
-	kill $vmstat_pid
-	pid_has_stopped $vmstat_pid
-	for i in `seq 0 $last_block`; do
-		local pid=${iostat_pids[$i]}
-		[ -z "$pid" ] && continue
-
-		kill $pid
-		unset iostat_pids[$i]
-		pid_has_stopped $pid
-	done
-
-	$readprofile | sort -rn > $tmpdir/readprofile
-
-	$oprofile opcontrol --shutdown
-	$oprofile opreport > $tmpdir/oprofile
-	echo >> $tmpdir/oprofile
-	$oprofile opreport -c -l | head -20 >> $tmpdir/oprofile
-
-	save_output $tmpdir/oprofile $opref.oprofile
-	save_output $tmpdir/readprofile $opref.readprofile
-
-	# collect the results of vmstat and iostat
-	cpu=$(mean_stddev $(awk \
-	      '(NR > 3 && NF == 16 && $16 != "id" )	\
-		{print 100 - $16}' < $vmstat_log) )
-	save_output $vmstat_log $opref.vmstat
-
-	for i in `seq 0 $last_block`; do
-		read_req_s[$i]=$(mean_stddev $(awk \
-		      '(NR > 1)	{print $4}' < $tmpdir/iostat.$i) )
-		write_req_s[$i]=$(mean_stddev $(awk \
-		      '(NR > 1)	{print $5}' < $tmpdir/iostat.$i) )
-		sects_req[$i]=$(mean_stddev $(awk \
-		      '(NR > 1)	{print $10}' < $tmpdir/iostat.$i) )
-		queued_reqs[$i]=$(mean_stddev $(awk \
-		      '(NR > 1)	{print $11}' < $tmpdir/iostat.$i) )
-		service_ms[$i]=$(mean_stddev $(awk \
-		      '(NR > 1)	{print $13}' < $tmpdir/iostat.$i) )
-
-		save_output $tmpdir/iostat.$i $opref.iostat.$i
-	done
-
-	# record each index's test results and sum them
-	thru=0
-	for i in `seq 0 $last_block`; do
-		local t=`${test}_result $tmpdir/$i $wor`
-		save_output $tmpdir/$i $opref.$i
-		echo test returned "$t"
-		mb_s[$i]="$t"
-		# some tests return mean:stddev per device, filter out stddev
-		thru=$(do_bc $thru + $(echo $t | sed -e 's/:.*$//g'))
-	done
-
-	for i in `seq 0 $last_block`; do
-		${test}_cleanup $i $wor $threads
-	done
-
-	# tabulate the results
-	echo $test did $thru mb/s with $cpu
-	table_set $test $my_x $cur_y `do_bc_scale 2 $thru / 1`
-	table_set $test $(($my_x + 1)) $cur_y $cpu
-
-	for i in `seq 0 $last_block`; do
-		cur_y=$(($cur_y + 1))
-		table_set $test $(($my_x)) $cur_y ${mb_s[$i]}
-		table_set $test $(($my_x + 1)) $cur_y ${read_req_s[$i]}
-		table_set $test $(($my_x + 2)) $cur_y ${write_req_s[$i]}
-		table_set $test $(($my_x + 3)) $cur_y ${sects_req[$i]}
-		table_set $test $(($my_x + 4)) $cur_y ${queued_reqs[$i]}
-		table_set $test $(($my_x + 5)) $cur_y ${service_ms[$i]}
-	done
-
-	cur_y=$(($cur_y + 1))
-}
-
-test_iterator() {
-	local test=$1
-	local thr=$min_threads
-	local cleanup=""
-	local rc=0
-	local i
-	
-	for i in `seq 0 $last_block`; do
-		if ! ${test}_config $i; then
-			echo "couldn't config $test for bdev ${blocks[$i]}"
-			echo "skipping $test for all block devices"
-			cleanup=$(($i - 1))
-			rc=1;
-			break
-		fi
-	done
-
-	for i in `seq 0 $last_block`; do
-		# don't prepare if _config already failed
-		[ ! -z "$cleanup" ] && break
-		if ! ${test}_prepare $i; then
-			echo "couldn't prepare $test for bdev ${blocks[$i]}"
-			echo "skipping $test for all block devices"
-			cleanup=$(($i - 1))
-			rc=1;
-			break
-		fi
-	done
-
-	while [ -z "$cleanup" -a $thr -lt $(($max_threads + 1)) ]; do
-		for iosize in 128 512; do
-			table_set $test 0 $cur_y $thr
-			table_set $test 1 $cur_y $iosize
-
-			for wor in w o r; do
-				table_set $test 2 $cur_y $wor
-				test_one $test 3 $thr $iosize $wor
-			done
-		done
-		thr=$(($thr + $thr))
-	done
-
-	[ -z "$cleanup" ] && cleanup=$last_block
-
-	if [ "$cleanup" != -1 ]; then
-		for i in `seq $cleanup 0`; do
-			${test}_finish $i
-		done
-	fi
-
-	${test}_teardown
-
-	return $rc;
-}
-
-while getopts ":d:b:l:t:T:r:e:" opt; do
-        case $opt in
-                e) echo_module=$OPTARG                 ;;
-                b) block=$OPTARG                 ;;
-                d) output_dir=$OPTARG                 ;;
-                l) io_len=$OPTARG			;;
-                r) run_tests=$OPTARG			;;
-                t) min_threads=$OPTARG			;;
-                T) max_threads=$OPTARG			;;
-                \?) usage
-        esac
-done
-
-page_size=`getconf PAGE_SIZE` || die '"getconf PAGE_SIZE" failed'
-
-[ ! -z "$echo_module" -a ! -f "$echo_module" ] && \
-	die "obdecho module $echo_module is not a file"
-
-if [ -z "$io_len" ]; then
-	io_len=`awk '($1 == "MemTotal:"){print $2}' < /proc/meminfo`
-	[ -z "$io_len" ] && die "couldn't determine the amount of memory"
-fi
-
-if [ ! -z "$output_dir" ]; then
-	if [ ! -e "$output_dir" ]; then
-		 mkdir -p "$output_dir" || die  "error creating $output_dir"
-	fi
-	[ ! -d "$output_dir" ] && die "$output_dir isn't a directory"
-fi
-
-block=`echo $block | sed -e 's/,/ /g'`
-[ -z "$block" ] && usage "need block devices"
-
-run_tests=`echo $run_tests | sed -e 's/,/ /g'`
-[ -z "$run_tests" ] && usage "need to specify tests to run with -r"
-for t in $run_tests; do
-	if ! echo $possible_tests | grep -q $t ; then
-		die "$t isn't one of the possible tests: $possible_tests"
-	fi
-done
-
-if which opcontrol; then
-        echo generating oprofile results
-        oprofile=""
-else
-        echo not using oprofile
-        oprofile=": "
-fi
-
-if which readprofile; then
-	map="/boot/System.map-`uname -r`"
-	if [ -f /proc/profile -a -f "$map" ]; then
-		echo generating profiles with 'readprofile'
-		readprofile="readprofile -m $map"
-	fi
-fi
-if [ -z "$readprofile" ]; then
-	echo not using readprofile
-	readprofile=": "
-fi
-
-[ $min_threads -gt $max_threads ] && \
-	die "min threads $min_threads must be <= min_threads $min_threads"
-
-for b in $block; do
-	[ ! -e $b ] && die "block device file $b doesn't exist"
-	[ ! -b $b ] && die "$b isn't a block device"
-	dd if=$b of=/dev/null bs=8192 count=1 || \
-		die "couldn't read 8k from $b, is it alive?"
-	[ ! -b $b ] && die "$b isn't a block device"
-	last_block=$(($last_block + 1))
-	blocks[$last_block]=$b
-done	
-
-tmpdir=`mktemp -d /tmp/.surveyXXXXXX` || die "couldn't create tmp dir"
-
-echo each test will operate on $io_len"k"
-
-test_results=""
-
-for t in $run_tests; do
-
-	table_set $t 0 0 "T"
-	table_set $t 1 0 "L"
-	table_set $t 2 0 "m"
-	table_set $t 3 0 "A"
-	table_set $t 4 0 "C"
-	table_set $t 3 1 "MB"
-	table_set $t 4 1 "rR"
-	table_set $t 5 1 "wR"
-	table_set $t 6 1 "SR"
-	table_set $t 7 1 "Q"
-	table_set $t 8 1 "ms"
-	cur_y=2;
-
-	if ! test_iterator $t; then
-		continue;
-	fi
-	test_results="$test_results $t"
-done
-
-save_output $tmpdir/commands commands
-
-[ ! -z "$test_results" ] && (
-	echo
-	echo "T = number of concurrent threads per device"
-	echo "L = base io operation length, in KB"
-	echo "m = IO method: read, write, or over-write"
-	echo "A = aggregate throughput from all devices"
-	echo "C = percentage CPU used, both user and system"
-	echo "MB/s = per-device throughput"
-	echo "rR = read requests issued to the device per second"
-	echo "wR = write requests issued to the device per second"
-	echo "SR = sectors per request; sectors tend to be 512 bytes"
-	echo "Q = the average number of requests queued on the device"
-	echo "ms = the average ms taken by the device to service a req"
-	echo
-	echo "foo:bar represents a mean of foo with a stddev of bar"
-)
-
-for t in $test_results; do
-	${t}_banner
-	table_dump $t
-done
diff --git a/lustre/scripts/dodiff.sh b/lustre/scripts/dodiff.sh
deleted file mode 100755
index 899415d685ad0935903d3db4169a5884b5ff699f..0000000000000000000000000000000000000000
--- a/lustre/scripts/dodiff.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-for f in `cat $1` ; do 
-   diff -u $2-pristine/$f $2/$f 
-done
diff --git a/lustre/scripts/lc_cluman.in b/lustre/scripts/lc_cluman.in
deleted file mode 100644
index 11194a698cf3fe57c6918e32c53e971c31beec55..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_cluman.in
+++ /dev/null
@@ -1,524 +0,0 @@
-#!/bin/bash
-#
-# lc_cluman - script for generating the Red Hat Cluster Manager
-#	      HA software's configuration files
-#
-################################################################################
-
-# Usage
-usage() {
-	cat >&2 <<EOF
-
-Usage:  `basename $0` <-n hostnames> [-s service addresses]
-		      [-c heartbeat channel] [-o heartbeat options] [-v]
-		      <-d target device> [-d target device...]
-
-	-n hostnames            the nodenames of the primary node and its fail-
-				overs
-                        	Multiple nodenames are separated by colon (:)
-                        	delimeter. The first one is the nodename of the 
-				primary node, the others are failover nodenames.
-	-s service addresses    the IP addresses to failover
-				Multiple addresses are separated by colon (:)
-				delimeter.
-	-c heartbeat channel	the method to send/rcv heartbeats on
-				The default method is multicast, and multicast_
-				ipaddress is "225.0.0.11".
-	-o heartbeat options    a "catchall" for other heartbeat configuration 
-				options
-				Multiple options are separated by colon (:)
-				delimeter.
-	-v			verbose mode
-	-d target device        the target device name and mount point
-                        	The device name and mount point are separated by
-				colon (:) delimeter. 
-
-EOF
-	exit 1
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-#****************************** Global variables ******************************#
-TMP_DIR=${CLUMGR_TMP_DIR}		# Temporary directory
-
-declare -a NODE_NAMES			# Node names in the failover group
-declare -a SRV_IPADDRS			# Service IP addresses
-
-# Lustre target device names, service names and mount points
-declare -a TARGET_DEVNAMES TARGET_SRVNAMES TARGET_MNTPNTS
-declare -i TARGET_NUM=0			# Number of targets
-
-# Get and check the positional parameters
-VERBOSE_OUTPUT=false
-while getopts "n:s:c:o:vd:" OPTION; do
-	case $OPTION in
-        n)
-		HOSTNAME_OPT=$OPTARG 
-		PRIM_NODENAME=`echo ${HOSTNAME_OPT} | awk -F":" '{print $1}'`
-		if [ -z "${PRIM_NODENAME}" ]; then
-			echo >&2 $"`basename $0`: Missing primary nodename!"
-			usage
-		fi
-		HOSTNAME_NUM=`echo ${HOSTNAME_OPT} | awk -F":" '{print NF}'`
-		if [ ${HOSTNAME_NUM} -lt 2 ]; then
-			echo >&2 $"`basename $0`: Missing failover nodenames!"
-			usage
-		fi
-		;;
-        s)
-		SRVADDR_OPT=$OPTARG 
-		;;
-        c)
-		HBCHANNEL_OPT=$OPTARG
-		HBCHANNEL_OPT=`echo "${HBCHANNEL_OPT}" | sed 's/^"//' \
-                               | sed 's/"$//'` 
-		if [ -n "${HBCHANNEL_OPT}" ] \
-   		&& [ "${HBCHANNEL_OPT}" = "${HBCHANNEL_OPT#*broadcast*}" ] \
-   		&& [ "${HBCHANNEL_OPT}" = "${HBCHANNEL_OPT#*multicast*}" ]; then
-			echo >&2 $"`basename $0`: Invalid Heartbeat channel" \
-				  "- ${HBCHANNEL_OPT}!"
-			usage
-		fi
-		;;
-        o)
-		HBOPT_OPT=$OPTARG 
-		HBOPT_OPT=`echo "${HBOPT_OPT}" | sed 's/^"//' | sed 's/"$//'`
-		;;
-	v) 
-		VERBOSE_OUTPUT=true
-		;;
-        d)
-		DEVICE_OPT=$OPTARG 
-		TARGET_DEVNAMES[TARGET_NUM]=`echo ${DEVICE_OPT}|awk -F: '{print $1}'`
-		TARGET_MNTPNTS[TARGET_NUM]=`echo ${DEVICE_OPT}|awk -F: '{print $2}'`
-		if [ -z "${TARGET_DEVNAMES[TARGET_NUM]}" ]; then
-			echo >&2 $"`basename $0`: Missing target device name!"
-			usage
-		fi
-		if [ -z "${TARGET_MNTPNTS[TARGET_NUM]}" ]; then
-			echo >&2 $"`basename $0`: Missing mount point for target"\
-				  "${TARGET_DEVNAMES[TARGET_NUM]}!"
-			usage
-		fi
-		TARGET_NUM=$(( TARGET_NUM + 1 ))
-		;;
-
-        ?) 
-		usage 
-	esac
-done
-
-# Check the required parameters
-if [ -z "${HOSTNAME_OPT}" ]; then
-	echo >&2 $"`basename $0`: Missing -n option!"
-	usage
-fi
-
-if [ -z "${DEVICE_OPT}" ]; then
-	echo >&2 $"`basename $0`: Missing -d option!"
-	usage
-fi
-
-# get_nodenames
-#
-# Get all the node names in this failover group
-get_nodenames() {
-	declare -i idx
-	local nodename_str nodename
-
-	nodename_str=`echo ${HOSTNAME_OPT}|awk '{split($HOSTNAME_OPT, a, ":")}\
-		      END {for (i in a) print a[i]}'`
-	idx=0
-	for nodename in ${nodename_str}
-        do
-		NODE_NAMES[idx]=${nodename}
-		idx=$idx+1
-        done
-
-	return 0
-}
-
-# get_check_srvIPaddrs
-#
-# Get and check all the service IP addresses in this failover group
-get_check_srvIPaddrs() {
-	declare -i idx
-	declare -i i
-	local srvIPaddr_str srvIPaddr
-
-	srvIPaddr_str=`echo ${SRVADDR_OPT}|awk '{split($SRVADDR_OPT, a, ":")}\
-		      END {for (i in a) print a[i]}'`
-	idx=0
-	for srvIPaddr in ${srvIPaddr_str}
-        do
-		SRV_IPADDRS[idx]=${srvIPaddr}
-		idx=$idx+1
-        done
-
-	for ((idx = 0; idx < ${#SRV_IPADDRS[@]}; idx++)); do
-	  for ((i = 0; i < ${#NODE_NAMES[@]}; i++)); do
-	    # Check service IP address
-	    verbose_output "Verifying service IP ${SRV_IPADDRS[idx]} and" \
-	    	           "real IP of host ${NODE_NAMES[i]} are in the" \
-			   "same subnet..."
-	    if ! ${SCRIPT_VERIFY_SRVIP} ${SRV_IPADDRS[idx]} ${NODE_NAMES[i]}
-	    then
-	      return 1
-	    fi
-	    verbose_output "OK"
-	  done
-	done
-
-	return 0
-}
-
-# cluman_running host_name
-# 
-# Run remote command to check whether clumanager service is running in @host_name
-cluman_running() {
-	local host_name=$1
-	local ret_str
-
-	ret_str=`${REMOTE} ${host_name} "service clumanager status" 2>&1`
-	if [ $? -ne 0 ]; then
-		if [ "${ret_str}" != "${ret_str#*unrecognized*}" ]; then
-			echo >&2 "`basename $0`: cluman_running() error:"\
-			"remote command to ${host_name} error: ${ret_str}!"
-			return 2
-		else
-			return 1
-		fi
-	fi
-
-	return 0
-}
-
-# stop_cluman host_name
-#
-# Run remote command to stop clumanager service running in @host_name
-stop_cluman() {
-	local host_name=$1
-	local ret_str
-
-	ret_str=`${REMOTE} ${host_name} "/sbin/service clumanager stop" 2>&1`
-	if [ $? -ne 0 ]; then
-		echo >&2 "`basename $0`: stop_cluman() error:"\
-		"remote command to ${host_name} error: ${ret_str}!"
-		return 1
-	fi
-
-	echo "`basename $0`: Clumanager service is stopped on node ${host_name}."
-	return 0
-}
-
-# check_cluman
-#
-# Run remote command to check each node's clumanager service
-check_cluman() {
-	declare -i idx
-	local OK
-
-	# Get and check all the service IP addresses
-	if [ -n "${SRVADDR_OPT}" ] && ! get_check_srvIPaddrs; then
-		return 1
-	fi
-
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		# Check clumanager service status
-		cluman_running ${NODE_NAMES[idx]}
-		rc=$?
-		if [ "$rc" -eq "2" ]; then
-			return 1
-		elif [ "$rc" -eq "1" ]; then
-			verbose_output "Clumanager service is stopped on"\
-			"node ${NODE_NAMES[idx]}."
-		elif [ "$rc" -eq "0" ]; then
-			OK=
-			echo -n "`basename $0`: Clumanager service is running on"\
-			"${NODE_NAMES[idx]}, go ahead to stop the service and"\
-			"generate new configurations? [y/n]:"
-			read OK
-			if [ "${OK}" = "n" ]; then
-				echo "`basename $0`: New Clumanager configurations"\
-				"are not generated."
-				return 2
-			fi
-
-			# Stop clumanager service	
-			stop_cluman ${NODE_NAMES[idx]}
-		fi
-	done
-
-	return 0
-}
-
-# get_srvname hostname target_devname
-#
-# Get the lustre target server name from the node @hostname
-get_srvname() {
-	local host_name=$1
-	local target_devname=$2
-	local target_srvname=
-	local ret_str
-
-	# Execute remote command to get the target server name
-	ret_str=`${REMOTE} ${host_name} \
-		"${TUNEFS} --print --verbose ${target_devname} | grep Target:" 2>&1`
-	if [ $? -ne 0 ]; then
-		echo "`basename $0`: get_srvname() error:" \
-		     "from host ${host_name} - ${ret_str}"
-		return 1
-	fi
-
-	if [ "${ret_str}" != "${ret_str#*Target: }" ]; then
-		ret_str=${ret_str#*Target: }
-		target_srvname=`echo ${ret_str} | awk '{print $1}'`
-	fi
-	
-	if [ -z "${target_srvname}" ]; then
-		echo "`basename $0`: get_srvname() error: Cannot get the"\
-		     "server name of target ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	echo ${target_srvname}
-	return 0
-} 
-
-# get_srvnames
-#
-# Get server names of all the Lustre targets in this failover group
-get_srvnames() {
-	declare -i i
-
-	# Initialize the TARGET_SRVNAMES array
-	unset TARGET_SRVNAMES
-
-	# Get Lustre target service names
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		TARGET_SRVNAMES[i]=$(get_srvname ${PRIM_NODENAME} \
-				     ${TARGET_DEVNAMES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_SRVNAMES[i]}"
-			return 1
-		fi
-	done
-
-	return 0
-}
-
-# check_retval retval
-#
-# Check the return value of redhat-config-cluster-cmd
-check_retval() {
-	if [ $1 -ne 0 ]; then
-		echo >&2 "`basename $0`: Failed to run ${CONFIG_CMD}!"
-		return 1
-	fi
-
-	return 0
-}
-
-# add_services
-#
-# Add service tags into the cluster.xml file
-add_services() {
-	declare -i idx
-	declare -i i
-
-	# Add service tag
-	for ((i = 0; i < ${#TARGET_SRVNAMES[@]}; i++)); do
-		${CONFIG_CMD} --add_service --name=${TARGET_SRVNAMES[i]}
-		if ! check_retval $?; then
-			return 1
-		fi
-
-		for ((idx = 0; idx < ${#SRV_IPADDRS[@]}; idx++)); do
-			${CONFIG_CMD} --service=${TARGET_SRVNAMES[i]} \
-			--add_service_ipaddress --ipaddress=${SRV_IPADDRS[idx]}
-			if ! check_retval $?; then
-				return 1
-			fi
-		done
-
-		${CONFIG_CMD} --service=${TARGET_SRVNAMES[i]} \
-			      --add_device \
-			      --name=${TARGET_DEVNAMES[i]}
-		if ! check_retval $?; then
-			return 1
-		fi
-
-		${CONFIG_CMD} --service=${TARGET_SRVNAMES[i]} \
-			      --device=${TARGET_DEVNAMES[i]} \
-			      --mount \
-			      --mountpoint=${TARGET_MNTPNTS[i]} \
-			      --fstype=lustre
-		if ! check_retval $?; then
-			return 1
-		fi
-	done
-
-	return 0
-}
-
-# gen_cluster_xml
-#
-# Run redhat-config-cluster-cmd to create the cluster.xml file
-gen_cluster_xml() {
-	declare -i idx
-	declare -i i
-	local mcast_IPaddr
-	local node_names
-	local hbopt
-
-	[ -e "${CLUMAN_DIR}/cluster.xml" ] && \
-	/bin/mv ${CLUMAN_DIR}/cluster.xml ${CLUMAN_DIR}/cluster.xml.old
-
-	# Run redhat-config-cluster-cmd to generate cluster.xml
-	# Add clumembd tag
-   	if [ "${HBCHANNEL_OPT}" != "${HBCHANNEL_OPT#*broadcast*}" ]; then
-		${CONFIG_CMD} --clumembd --broadcast=yes
-		${CONFIG_CMD} --clumembd --multicast=no
-		if ! check_retval $?; then
-			return 1
-		fi
-	elif [ "${HBCHANNEL_OPT}" != "${HBCHANNEL_OPT#*multicast*}" ]; then
-		mcast_IPaddr=`echo ${HBCHANNEL_OPT} | awk '{print $2}'`
-		if [ -n "${mcast_IPaddr}" ]; then
-			${CONFIG_CMD} --clumembd --multicast=yes\
-				      --multicast_ipaddress=${mcast_IPaddr}
-			if ! check_retval $?; then
-				return 1
-			fi
-		fi
-	fi
-
-	# Add cluster tag
-	node_names=
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		node_names=${node_names}"${NODE_NAMES[idx]} "
-	done
-
-	${CONFIG_CMD} --cluster --name="${node_names}failover group"
-	if ! check_retval $?; then
-		return 1
-	fi
-
-	# Add member tag
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		${CONFIG_CMD} --add_member --name=${NODE_NAMES[idx]}
-		if ! check_retval $?; then
-			return 1
-		fi
-	done
-
-	# Add service tag
-	if ! add_services; then
-		return 1
-	fi
-
-	# Add other tags
-	if [ -n "${HBOPT_OPT}" ]; then
-		while read -r hbopt
-        	do
-			${CONFIG_CMD} ${hbopt}
-			if ! check_retval $?; then
-				return 1
-			fi
-        	done < <(echo ${HBOPT_OPT}|awk '{split($HBOPT_OPT, a, ":")}\
-			 END {for (i in a) print a[i]}')
-	fi
-
-	return 0
-}
-
-# create_config
-#
-# Create the cluster.xml file and scp it to the each node's /etc/
-create_config() {
-	declare -i idx
-
-	/bin/mkdir -p ${TMP_DIR}
-	CONFIG_PRIMNODE=${TMP_DIR}$"/cluster.xml."${PRIM_NODENAME}
-	CONFIG_LUSTRE=${TMP_DIR}$"/cluster.xml"${FILE_SUFFIX}
-
-	# Get server names of Lustre targets
-	if ! get_srvnames; then
-		return 1
-	fi
-
-	if [ -s ${CONFIG_PRIMNODE} ]; then
-		if [ -n "`/bin/grep ${TARGET_SRVNAMES[0]} ${CONFIG_PRIMNODE}`" ]
-		then
-			verbose_output "${CONFIG_PRIMNODE} already exists."
-			return 0
-		else
-			[ -e "${CLUMAN_DIR}/cluster.xml" ] && \
-			/bin/mv ${CLUMAN_DIR}/cluster.xml ${CLUMAN_DIR}/cluster.xml.old
-
-			/bin/cp -f ${CONFIG_PRIMNODE} ${CLUMAN_DIR}/cluster.xml 
-
-			# Add services into the cluster.xml file
-			if ! add_services; then
-				return 1
-			fi
-		fi
-	else
-		# Run redhat-config-cluster-cmd to generate cluster.xml
-		verbose_output "Creating cluster.xml file for" \
-			       "${PRIM_NODENAME} failover group hosts..."
-		if ! gen_cluster_xml; then
-			return 1
-		fi
-		verbose_output "OK"
-	fi
-
-	/bin/mv ${CLUMAN_DIR}/cluster.xml ${CONFIG_LUSTRE}
-	[ -e "${CLUMAN_DIR}/cluster.xml.old" ] && \
-	/bin/mv ${CLUMAN_DIR}/cluster.xml.old ${CLUMAN_DIR}/cluster.xml
-
-	# scp the cluster.xml file to all the nodes
-	verbose_output "Remote copying cluster.xml${FILE_SUFFIX} file to" \
-		       "${PRIM_NODENAME} failover group hosts..."
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		/bin/cp -f ${CONFIG_LUSTRE} ${TMP_DIR}$"/cluster.xml."${NODE_NAMES[idx]}
-
-		scp ${CONFIG_LUSTRE} ${NODE_NAMES[idx]}:${CLUMAN_DIR}/
-		if [ $? -ne 0 ]; then
-			echo >&2 "`basename $0`: Failed to scp cluster.xml file"\
-				 "to node ${NODE_NAMES[idx]}!"
-			return 1
-		fi
-	done
-	verbose_output "OK"
-
-	return 0
-}
-
-# Main flow
-# Get all the node names
-if ! get_nodenames; then
-	exit 1
-fi
-
-# Check clumanager services
-verbose_output "Checking clumanager service in the ${PRIM_NODENAME}"\
-	       "failover group hosts..."
-check_cluman
-rc=$?
-if [ "$rc" -eq "2" ]; then
-	verbose_output "OK"
-	exit 0
-elif [ "$rc" -eq "1" ]; then
-	exit 1
-fi
-verbose_output "OK"
-
-# Generate configuration files
-if ! create_config; then
-	exit 1
-fi
-
-exit 0
diff --git a/lustre/scripts/lc_common b/lustre/scripts/lc_common
deleted file mode 100644
index 8b1bcbee9f037b3f011e75a17eb6dfa60631723f..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_common
+++ /dev/null
@@ -1,591 +0,0 @@
-#
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-#
-# lc_common - This file contains functions to be used by most or all
-#             Lustre cluster config scripts.
-#
-################################################################################
-
-# Remote command 
-REMOTE=${REMOTE:-"ssh -x -q"}
-#REMOTE=${REMOTE:-"pdsh -S -R ssh -w"}
-export REMOTE
-
-# Lustre utilities
-CMD_PATH=${CMD_PATH:-"/usr/sbin"}
-MKFS=${MKFS:-"$CMD_PATH/mkfs.lustre"}
-TUNEFS=${TUNEFS:-"$CMD_PATH/tunefs.lustre"}
-LCTL=${LCTL:-"$CMD_PATH/lctl"}
-
-EXPORT_PATH=${EXPORT_PATH:-"PATH=\$PATH:/sbin:/usr/sbin;"}
-
-# Raid command path
-RAID_CMD_PATH=${RAID_CMD_PATH:-"/sbin"}
-MDADM=${MDADM:-"$RAID_CMD_PATH/mdadm"}
-
-# Some scripts to be called
-SCRIPTS_PATH=${CLUSTER_SCRIPTS_PATH:-"$(cd `dirname $0`; echo $PWD)"}
-MODULE_CONFIG=${SCRIPTS_PATH}/lc_modprobe
-VERIFY_CLUSTER_NET=${SCRIPTS_PATH}/lc_net
-GEN_HB_CONFIG=${SCRIPTS_PATH}/lc_hb
-GEN_CLUMGR_CONFIG=${SCRIPTS_PATH}/lc_cluman
-SCRIPT_VERIFY_SRVIP=${SCRIPTS_PATH}/lc_servip
-SCRIPT_GEN_MONCF=${SCRIPTS_PATH}/lc_mon
-SCRIPT_CONFIG_MD=${SCRIPTS_PATH}/lc_md
-SCRIPT_CONFIG_LVM=${SCRIPTS_PATH}/lc_lvm
-
-# Variables of HA software
-HBVER_HBV1="hbv1"                   # Heartbeat version 1
-HBVER_HBV2="hbv2"                   # Heartbeat version 2
-HATYPE_CLUMGR="cluman"              # Cluster Manager
-
-# Configuration directories and files
-HA_DIR=${HA_DIR:-"/etc/ha.d"}		# Heartbeat configuration directory
-MON_DIR=${MON_DIR:-"/etc/mon"}		# mon configuration directory
-CIB_DIR=${CIB_DIR:-"/var/lib/heartbeat/crm"}	# cib.xml directory
-
-HA_CF=${HA_DIR}/ha.cf               # ha.cf file
-HA_RES=${HA_DIR}/haresources        # haresources file
-HA_CIB=${CIB_DIR}/cib.xml
-
-CLUMAN_DIR="/etc"			        # CluManager configuration directory
-CLUMAN_CONFIG=${CLUMAN_DIR}/cluster.xml
-
-CLUMAN_TOOLS_PATH=${CLUMAN_TOOLS_PATH:-"/usr/sbin"}	# CluManager tools
-CONFIG_CMD=${CONFIG_CMD:-"${CLUMAN_TOOLS_PATH}/redhat-config-cluster-cmd"}
-
-HB_TMP_DIR="/tmp/heartbeat"         # Temporary directory
-CLUMGR_TMP_DIR="/tmp/clumanager"
-TMP_DIRS="${HB_TMP_DIR} ${CLUMGR_TMP_DIR}"
-
-FS_TYPE=${FS_TYPE:-"lustre"}        # Lustre filesystem type
-FILE_SUFFIX=${FILE_SUFFIX:-".lustre"}	# Suffix of the generated config files
-
-# Marker of the MD device line
-MD_MARKER=${MD_MARKER:-"MD"}
-
-# Marker of the LVM device line
-PV_MARKER=${PV_MARKER:-"PV"}
-VG_MARKER=${VG_MARKER:-"VG"}
-LV_MARKER=${LV_MARKER:-"LV"}
-
-declare -a CONFIG_ITEM              # Items in each line of the csv file
-declare -a NODE_NAME                # Hostnames of nodes have been configured
-
-# Nodelist variables
-USE_ALLNODES=false                  # default is not to operate on all the nodes
-SPECIFIED_NODELIST=""               # specified list of nodes to be operated on
-EXCLUDED_NODELIST=""                # list of nodes to be excluded
-
-export PATH=$PATH:$CMD_PATH:$SCRIPTS_PATH:$CLUMAN_TOOLS_PATH:$RAID_CMD_PATH:/sbin:/usr/sbin
-
-
-# verbose_output string
-# Output verbose information $string
-verbose_output() {
-    if ${VERBOSE_OUTPUT}; then
-        echo "`basename $0`: $*"
-    fi
-    return 0
-}
-
-# Check whether the reomte command is pdsh
-is_pdsh() {
-    if [ "${REMOTE}" = "${REMOTE#*pdsh}" ]; then
-        return 1
-    fi
-
-    return 0
-}
-
-# check_file csv_file
-# Check the file $csv_file
-check_file() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 "`basename $0`: check_file() error: Missing csv file!"
-        return 1
-    fi
-
-    CSV_FILE=$1
-    if [ ! -s ${CSV_FILE} ]; then
-        echo >&2 "`basename $0`: check_file() error: ${CSV_FILE}"\
-                 "does not exist or is empty!"
-        return 1
-    fi
-
-    return 0
-}
-
-# parse_line line
-# Parse a line in the csv file
-parse_line() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 "`basename $0`: parse_line() error: Missing argument!"
-        return 1
-    fi
-
-    declare -i i=0              # Index of the CONFIG_ITEM array
-    declare -i length=0 
-    declare -i idx=0
-    declare -i s_quote_flag=0   # Flag of the single quote character 
-    declare -i d_quote_flag=0   # Flag of the double quotes character
-    local TMP_LETTER LINE
- 
-    LINE="$*"
-
-    # Initialize the CONFIG_ITEM array
-    unset CONFIG_ITEM
-
-    # Get the length of the line
-    length=${#LINE}
-
-    i=0
-    while [ ${idx} -lt ${length} ]; do
-        # Get a letter from the line
-        TMP_LETTER=${LINE:${idx}:1}
-
-        case "${TMP_LETTER}" in
-        ",")
-            if [ ${s_quote_flag} -eq 1 -o ${d_quote_flag} -eq 1 ]
-            then
-                CONFIG_ITEM[i]=${CONFIG_ITEM[i]}${TMP_LETTER}
-            else
-                i=$i+1
-            fi
-            idx=${idx}+1
-            continue
-            ;;
-        "'")
-            if [ ${s_quote_flag} -eq 0 ]; then
-                s_quote_flag=1
-            else
-                s_quote_flag=0
-            fi
-            ;;
-        "\"")
-            if [ ${d_quote_flag} -eq 0 ]; then
-                d_quote_flag=1
-            else
-                d_quote_flag=0
-            fi
-            ;;
-        "
")
-            idx=${idx}+1
-            continue
-            ;;
-        *)
-            ;;
-        esac
-        CONFIG_ITEM[i]=${CONFIG_ITEM[i]}${TMP_LETTER}
-        idx=${idx}+1
-    done
-
-    # Extract the real value of each field
-    # Remove surrounded double-quotes, etc.
-    for ((idx = 0; idx <= $i; idx++)); do
-        # Strip the leading and trailing space-characters
-        CONFIG_ITEM[idx]=`expr "${CONFIG_ITEM[idx]}" : '[[:space:]]*\(.*\)[[:space:]]*$'`
-
-        [ -z "${CONFIG_ITEM[idx]}" ] && continue
-
-        # Remove the surrounded double-quotes
-        while [ -z "`echo "${CONFIG_ITEM[idx]}"|sed -e 's/^".*"$//'`" ]; do
-            CONFIG_ITEM[idx]=`echo "${CONFIG_ITEM[idx]}" | sed -e 's/^"//' -e 's/"$//'`
-        done
-
-        CONFIG_ITEM[idx]=`echo "${CONFIG_ITEM[idx]}" | sed -e 's/""/"/g'`
-    done
-
-    return 0
-}
-
-# fcanon name
-# If $name is a symbolic link, then display it's value
-fcanon() {
-    local NAME=$1
-
-    if [ -h "$NAME" ]; then
-        readlink -f "$NAME"
-    else
-        echo "$NAME"
-    fi
-}
-
-# configured_host host_name
-#
-# Check whether the devices in $host_name has been configured or not
-configured_host() {
-    local host_name=$1
-    declare -i i
-
-    for ((i = 0; i < ${#NODE_NAME[@]}; i++)); do
-        [ "${host_name}" = "${NODE_NAME[i]}" ] && return 0
-    done
-
-    return 1
-}
-
-# remote_error fn_name host_addr ret_str
-# Verify the return result from remote command
-remote_error() {
-    local fn_name host_addr ret_str
-
-    fn_name=$1
-    shift
-    host_addr=$1
-    shift
-    ret_str=$*
-
-    if [ "${ret_str}" != "${ret_str#*connect:*}" ]; then
-        echo >&2 "`basename $0`: ${fn_name}() error: ${ret_str}"
-        return 0
-    fi
-
-    if [ -z "${ret_str}" ]; then
-        echo >&2 "`basename $0`: ${fn_name}() error:" \
-        "No results from remote!" \
-        "Check network connectivity between the local host and ${host_addr}!"
-        return 0
-    fi
-
-    return 1
-}
-
-# nid2hostname nid
-# Convert $nid to hostname of the lustre cluster node
-nid2hostname() {
-    local nid=$1
-    local host_name=
-    local addr nettype ip_addr
-    local ret_str
-
-    addr=${nid%@*}
-    [ "${nid}" != "${nid#*@*}" ] && nettype=${nid#*@} || nettype=tcp
-    if [ -z "${addr}" ]; then
-        echo "`basename $0`: nid2hostname() error: Invalid nid - \"${nid}\"!"
-        return 1
-    fi
-		
-    case "${nettype}" in
-    lo*)    host_name=`hostname`;;
-    elan*)  # QsNet
-            # FIXME: Parse the /etc/elanhosts configuration file to
-            # convert ElanID to hostname
-            ;;
-    gm*)    # Myrinet
-            # FIXME: Use /usr/sbin/gmlndnid to find the hostname of
-            # the specified GM Global node ID 
-            ;;
-    ptl*)   # Portals
-            # FIXME: Convert portal ID to hostname
-            ;;
-    *)  # tcp, o2ib, cib, openib, iib, vib, ra
-        ip_addr=${addr}
-        # Is it IP address or hostname?
-        if [ -n "`echo ${ip_addr} | sed -e 's/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}//'`" ]
-        then
-            host_name=${ip_addr}
-            echo ${host_name}
-            return 0
-        fi
-
-        # Execute remote command to get the host name
-        ret_str=$(${REMOTE} ${ip_addr} "hostname" 2>&1 </dev/null)
-        if [ ${PIPESTATUS[0]} -ne 0 -a -n "${ret_str}" ]; then
-            echo "`basename $0`: nid2hostname() error:" \
-            "remote command to ${ip_addr} error: ${ret_str}"
-            return 1
-        fi
-        remote_error "nid2hostname" ${ip_addr} "${ret_str}" && return 1
-
-        if is_pdsh; then
-            host_name=`echo ${ret_str} | awk '{print $2}'`
-        else
-            host_name=`echo ${ret_str} | awk '{print $1}'`
-        fi
-        ;;
-    esac
-
-    echo ${host_name}
-    return 0
-}
-
-# nids2hostname nids
-# Get the hostname of the lustre cluster node which has the nids - $nids
-nids2hostname() {
-    local nids=$1
-    local host_name=
-    local nid
-    local nettype
-
-    for nid in ${nids//,/ }; do
-        [ "${nid}" != "${nid#*@*}" ] && nettype=${nid#*@} || nettype=tcp
-
-        case "${nettype}" in
-        lo* | elan* | gm* | ptl*) ;;
-        *)  # tcp, o2ib, cib, openib, iib, vib, ra
-            host_name=$(nid2hostname ${nid})
-            if [ ${PIPESTATUS[0]} -ne 0 ]; then
-                echo "${host_name}"
-                return 1
-            fi
-            ;;
-        esac
-    done
-
-    if [ -z "${host_name}" ]; then
-        echo "`basename $0`: nids2hostname() error:" \
-        "Can not get the hostname from nids - \"${nids}\"!"
-        return 1
-    fi
-
-    echo ${host_name}
-    return 0
-}
-
-# ip2hostname_single_node nids
-# Convert IP addresses in $nids into hostnames
-# NID in $nids are delimited by commas, ie all the $nids belong to one node
-ip2hostname_single_node() {
-    local orig_nids=$1
-    local nids=
-    local nid host_name
-    local nettype
-
-    for nid in ${orig_nids//,/ }; do
-        [ "${nid}" != "${nid#*@*}" ] && nettype=${nid#*@} || nettype=tcp
-
-        case "${nettype}" in
-        lo* | elan* | gm* | ptl*) ;;
-        *)  # tcp, o2ib, cib, openib, iib, vib, ra
-            host_name=$(nid2hostname ${nid})
-            if [ ${PIPESTATUS[0]} -ne 0 ]; then
-                echo "${host_name}"
-                return 1
-            fi
-			
-            nid=${host_name}@${nettype}
-            ;;
-        esac
-
-        [ -z "${nids}" ] && nids=${nid} || nids=${nids},${nid}
-    done
-
-    echo ${nids}
-    return 0
-}
-
-# ip2hostname_multi_node nids
-# Convert IP addresses in $nids into hostnames
-# NIDs belong to multiple nodes are delimited by colons in $nids
-ip2hostname_multi_node() {
-    local orig_nids=$1
-    local nids=
-    local nid
-
-    for nid in ${orig_nids//:/ }; do
-        nid=$(ip2hostname_single_node ${nid})
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo "${nid}"
-            return 1
-        fi
-
-        [ -z "${nids}" ] && nids=${nid} || nids=${nids}:${nid}
-    done
-
-    echo ${nids}
-    return 0
-}
-
-# comma_list space-delimited-list
-# Convert a space-delimited list to a sorted list of unique values
-# separated by commas.
-comma_list() {
-    # the sed converts spaces to commas, but leaves the last space
-    # alone, so the line doesn't end with a comma.
-    echo "$*" | tr -s " " "\n" | sort -b -u | tr "\n" " " | sed 's/ \([^$]\)/,\1/g'
-}
-
-# host_in_hostlist hostname hostlist
-# Given a hostname, and a list of hostnames, return true if the hostname
-# appears in the list of hostnames, or false otherwise.
-host_in_hostlist() {
-    local HOST=$1
-    local HOSTLIST=$2
-
-    [ -z "$HOST" -o -z "$HOSTLIST" ] && false && return
-
-    # Hostnames in the list are separated by commas.
-    [[ ,$HOSTLIST, == *,$HOST,* ]] && true && return
-
-    false && return
-}
-
-# exclude_items_from_list list_of_items list_of_items_to_exclude
-# Given a list of items, and a second list of items to exclude from
-# the first list, return the contents of the first list minus the contents
-# of the second.
-exclude_items_from_list() {
-    local INLIST=$1
-    local EXCLUDELIST=$2
-    local ITEM OUTLIST
-
-    # Handle an empty inlist by throwing back an empty string.
-    if [ -z "$INLIST" ]; then
-        echo ""
-        return 0
-    fi
-
-    # Handle an empty excludelist by throwing back the inlist unmodified.
-    if [ -z "$EXCLUDELIST" ]; then
-        echo $INLIST
-        return 0
-    fi
-
-    for ITEM in ${INLIST//,/ }; do
-        if ! host_in_hostlist $ITEM $EXCLUDELIST; then
-           OUTLIST="$OUTLIST,$ITEM"
-        fi
-    done
-                                
-    # strip leading comma
-    echo ${OUTLIST#,}
-}
-
-# get_csv_nodelist csv_file
-# Get the comma-separated list of all the nodes from the csv file
-get_csv_nodelist() {
-    local csv_file=$1
-    local all_nodelist
-
-    # Check the csv file
-    ! check_file ${csv_file} 2>&1 && return 1
-
-    all_nodelist=$(egrep -v "([[:space:]]|^)#" ${csv_file} | cut -d, -f 1)
-    all_nodelist=$(comma_list ${all_nodelist})
-
-    echo ${all_nodelist}
-    return 0
-}
-
-# get_nodelist
-# Get the comma-separated list of nodes to be operated on
-# Note: CSV_FILE, USE_ALLNODES, SPECIFIED_NODELIST and EXCLUDED_NODELIST
-# are global variables
-get_nodelist() {
-    local ALL_NODELIST
-
-    # Get the list of all the nodes in the csv file
-    ALL_NODELIST=$(get_csv_nodelist ${CSV_FILE})
-    [ ${PIPESTATUS[0]} -ne 0 ] && echo "${ALL_NODELIST}" && return 1
-
-    if [ -z "${ALL_NODELIST}" ]; then
-        echo "`basename $0`: get_nodelist() error:"\
-             "There are no hosts in the ${CSV_FILE} file!"
-        return 1
-    fi
-
-    if ${USE_ALLNODES}; then
-        echo ${ALL_NODELIST} && return 0
-    fi
-
-    if [ -n "${SPECIFIED_NODELIST}" ]; then
-        echo $(exclude_items_from_list ${SPECIFIED_NODELIST} ${EXCLUDED_NODELIST})
-        return 0
-    fi
-
-    if [ -n "${EXCLUDED_NODELIST}" ]; then
-        echo $(exclude_items_from_list ${ALL_NODELIST} ${EXCLUDED_NODELIST})
-        return 0
-    fi
-
-    # No hosts to be operated on
-    echo ""
-    return 0
-}
-
-# check_nodelist nodelist
-# Given a list of nodes to be operated on, check whether the nodelist is 
-# empty or not and output prompt message.
-check_nodelist() {
-    local nodes_to_use=$1
-
-    if [ -z "${nodes_to_use}" ]; then
-        echo "`basename $0`: There are no hosts to be operated on."\
-             "Check the node selection options (-a, -w or -x)."
-        usage
-    else
-        verbose_output "Operating on the following nodes: ${nodes_to_use}"
-    fi
-
-    return 0
-}
-
-# nid_in_nidlist nid nidlist
-# Given a nid, and a list of nids in one node (delimited by comma ','),
-# return true if the nid appears in the list of nids, or false otherwise.
-nid_in_nidlist() {
-    local nid="$1"
-    local nidlist="$2"
-    local my_nid
-
-    [ -z "${nid}" -o -z "${nidlist}" ] && false && return
-
-    if [[ "${nid}" != *@* || "${nid#*@}" == tcp* ]]; then
-        # network type is tcp
-        for my_nid in ${nidlist//,/ }; do
-            [ "${nid%@*}" = "${my_nid%@*}" ] && true && return
-        done
-    else
-        # network type is not tcp
-        [[ ,${nidlist}, == *,${nid},* ]] && true && return
-    fi
-
-    false && return
-}
-
-# get_mgs_nids mgs_hostname mgs_nids
-# Get the corresponding NID(s) of the MGS node ${mgs_hostname} from the
-# "mgs nids" field of one lustre target in the csv file
-get_mgs_nids() {
-    local mgs_node="$1"
-    local all_mgs_nids="$2"
-    local mgs_nids
-    local ret_str
-
-    # Check whether the hostname of the mgs node is in 
-    # the mgs nids string
-    for mgs_nids in ${all_mgs_nids//:/ }; do
-        if nid_in_nidlist ${mgs_node} ${mgs_nids}; then
-            echo ${mgs_nids}
-            return 0
-        fi
-    done
-
-    # Let's use lctl to get the real nids from the mgs node
-    ret_str=$(${REMOTE} ${mgs_node} "${LCTL} list_nids" 2>&1 </dev/null)
-    if [ ${PIPESTATUS[0]} -ne 0 -a -n "${ret_str}" ]; then
-        echo "$(basename $0): get_mgs_nids() error:" \
-        "remote command to ${mgs_node} error: ${ret_str}"
-        return 1
-    fi
-    remote_error "get_mgs_nids" ${mgs_node} "${ret_str}" && return 1
-
-    local real_mgs_nids=${ret_str//${mgs_node}:/}
-    for real_mgs_nid in ${real_mgs_nids}; do
-        for mgs_nids in ${all_mgs_nids//:/ }; do
-            if nid_in_nidlist ${real_mgs_nid} ${mgs_nids}; then
-                echo ${mgs_nids}
-                return 0
-            fi
-        done
-    done
-
-    echo "$(basename $0): get_mgs_nids() error:" \
-    "Can not figure out which nids corresponding to the MGS"\
-    "node ${mgs_node} from \"${all_mgs_nids}\"!"
-
-    return 1
-}
diff --git a/lustre/scripts/lc_hb.in b/lustre/scripts/lc_hb.in
deleted file mode 100644
index 0fa1fb0ac881e759d01d63ff3407043852b73197..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_hb.in
+++ /dev/null
@@ -1,644 +0,0 @@
-#!/bin/bash
-#
-# lc_hb - script for generating the Heartbeat HA software's
-#         configuration files
-#
-###############################################################################
-
-# Usage
-usage() {
-	cat >&2 <<EOF
-
-Usage:	`basename $0`	<-r HBver> <-n hostnames> [-v]
-			<-d target device> [-d target device...]
-
-	-r HBver		the version of Heartbeat software
-                        	The Heartbeat software versions which are curr-
-				ently supported are: hbv1 (Heartbeat version 1) 
-				and hbv2 (Heartbeat version 2).
-	-n hostnames            the nodenames of the primary node and its fail-
-				overs
-                        	Multiple nodenames are separated by colon (:)
-                        	delimeter. The first one is the nodename of the 
-				primary node, the others are failover nodenames.
-	-v			verbose mode
-	-d target device        the target device name and mount point
-                        	The device name and mount point are separated by
-				colon (:) delimeter. 
-
-EOF
-	exit 1
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-#****************************** Global variables ******************************#
-# Heartbeat tools
-HB_TOOLS_PATH=${HB_TOOLS_PATH:-"/usr/lib64/heartbeat"}	# Heartbeat tools path
-CIB_GEN_SCRIPT=${HB_TOOLS_PATH}/haresources2cib.py
-CL_STATUS=${CL_STATUS:-"/usr/bin/cl_status"}
-
-# Service directories and names
-HARES_DIR=${HARES_DIR:-"${HA_DIR}/resource.d"}		# Heartbeat resources
-LUSTRE_SRV=${LUSTRE_SRV:-"Filesystem"}	# Service script provided by Heartbeat
-
-TMP_DIR=${HB_TMP_DIR}			# Temporary directory
-HACF_TEMP=${TMP_DIR}/ha.cf.temp
-AUTHKEYS_TEMP=${TMP_DIR}/authkeys${FILE_SUFFIX}
-
-declare -a NODE_NAMES			# Node names in the failover group
-
-# Lustre target device names, service names and mount points
-declare -a TARGET_DEVNAMES TARGET_SRVNAMES TARGET_MNTPNTS
-declare -i TARGET_NUM=0			# Number of targets
-
-
-# Get and check the positional parameters
-VERBOSE_OUTPUT=false
-while getopts "r:n:vd:" OPTION; do
-	case $OPTION in
-	r) 
-		HBVER_OPT=$OPTARG
-		if [ "${HBVER_OPT}" != "${HBVER_HBV1}" ] \
-		&& [ "${HBVER_OPT}" != "${HBVER_HBV2}" ]; then
-			echo >&2 $"`basename $0`: Invalid Heartbeat software" \
-				  "version - ${HBVER_OPT}!"
-			usage
-		fi
-		;;
-        n)
-		HOSTNAME_OPT=$OPTARG 
-		PRIM_NODENAME=`echo ${HOSTNAME_OPT} | awk -F":" '{print $1}'`
-		if [ -z "${PRIM_NODENAME}" ]; then
-			echo >&2 $"`basename $0`: Missing primary nodename!"
-			usage
-		fi
-		HOSTNAME_NUM=`echo ${HOSTNAME_OPT} | awk -F":" '{print NF}'`
-		if [ ${HOSTNAME_NUM} -lt 2 ]; then
-			echo >&2 $"`basename $0`: Missing failover nodenames!"
-			usage
-		fi
-		if [ "${HBVER_OPT}" = "${HBVER_HBV1}" -a ${HOSTNAME_NUM} -gt 2 ]
-		then
-			echo >&2 $"`basename $0`: Heartbeat version 1 can" \
-				  "only support 2 nodes!"
-			usage
-		fi
-		;;
-	v) 
-		VERBOSE_OUTPUT=true
-		;;
-        d)
-		DEVICE_OPT=$OPTARG 
-		TARGET_DEVNAMES[TARGET_NUM]=`echo ${DEVICE_OPT}|awk -F: '{print $1}'`
-		TARGET_MNTPNTS[TARGET_NUM]=`echo ${DEVICE_OPT}|awk -F: '{print $2}'`
-		if [ -z "${TARGET_DEVNAMES[TARGET_NUM]}" ]; then
-			echo >&2 $"`basename $0`: Missing target device name!"
-			usage
-		fi
-		if [ -z "${TARGET_MNTPNTS[TARGET_NUM]}" ]; then
-			echo >&2 $"`basename $0`: Missing mount point for target"\
-				  "${TARGET_DEVNAMES[TARGET_NUM]}!"
-			usage
-		fi
-		TARGET_NUM=$(( TARGET_NUM + 1 ))
-		;;
-        ?) 
-		usage 
-	esac
-done
-
-# Check the required parameters
-if [ -z "${HBVER_OPT}" ]; then
-	echo >&2 $"`basename $0`: Missing -r option!"
-	usage
-fi
-
-if [ -z "${HOSTNAME_OPT}" ]; then
-	echo >&2 $"`basename $0`: Missing -n option!"
-	usage
-fi
-
-if [ -z "${DEVICE_OPT}" ]; then
-	echo >&2 $"`basename $0`: Missing -d option!"
-	usage
-fi
-
-# get_nodenames
-#
-# Get all the node names in this failover group
-get_nodenames() {
-	declare -i idx
-	local nodename_str nodename
-
-	nodename_str=`echo ${HOSTNAME_OPT}|awk '{split($HOSTNAME_OPT, a, ":")}\
-		      END {for (i in a) print a[i]}'`
-	idx=0
-	for nodename in ${nodename_str}
-        do
-		NODE_NAMES[idx]=${nodename}
-		idx=$idx+1
-        done
-
-	return 0
-}
-
-# check_remote_file host_name file
-#
-# Run remote command to check whether @file exists in @host_name
-check_remote_file() {
-	local host_name=$1
-	local file_name=$2
-
-	if [ -z "${host_name}" ]; then
-		echo >&2 "`basename $0`: check_remote_file() error:"\
-			 "Missing hostname!"
-		return 1
-	fi
-
-	if [ -z "${file_name}" ]; then
-		echo >&2 "`basename $0`: check_remote_file() error:"\
-			 "Missing file name!"
-		return 1
-	fi
-
-	# Execute remote command to check the file 
-	${REMOTE} ${host_name} "[ -e ${file_name} ]"
-	if [ $? -ne 0 ]; then
-		echo >&2 "`basename $0`: check_remote_file() error:"\
-		"${file_name} does not exist in host ${host_name}!"
-		return 1
-	fi
-
-	return 0
-}
-
-# hb_running host_name
-# 
-# Run remote command to check whether heartbeat service is running in @host_name
-hb_running() {
-	local host_name=$1
-	local ret_str
-
-	ret_str=`${REMOTE} ${host_name} "${CL_STATUS} hbstatus" 2>&1`
-	if [ $? -ne 0 ]; then
-		if [ "${ret_str}" = "${ret_str#*stop*}" ]; then
-			echo >&2 "`basename $0`: hb_running() error:"\
-			"remote command to ${host_name} error: ${ret_str}!"
-			return 2
-		else
-			return 1
-		fi
-	fi
-
-	return 0
-}
-
-# stop_heartbeat host_name
-#
-# Run remote command to stop heartbeat service running in @host_name
-stop_heartbeat() {
-	local host_name=$1
-	local ret_str
-
-	ret_str=`${REMOTE} ${host_name} "/sbin/service heartbeat stop" 2>&1`
-	if [ $? -ne 0 ]; then
-		echo >&2 "`basename $0`: stop_heartbeat() error:"\
-		"remote command to ${host_name} error: ${ret_str}!"
-		return 1
-	fi
-
-	echo "`basename $0`: Heartbeat service is stopped on node ${host_name}."
-	return 0
-}
-
-# check_heartbeat
-#
-# Run remote command to check each node's heartbeat service
-check_heartbeat() {
-	declare -i idx
-	local OK
-
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		# Check Heartbeat configuration directory
-		if ! check_remote_file ${NODE_NAMES[idx]} ${HA_DIR}; then
-			echo >&2 "`basename $0`: check_heartbeat() error:"\
-			"Is Heartbeat package installed?"
-			return 1
-		fi
-
-		if [ "${HBVER_OPT}" = "${HBVER_HBV1}" ]; then
-			# Check mon configuration directory
-			if ! check_remote_file ${NODE_NAMES[idx]} ${MON_DIR}; then
-				echo >&2 "`basename $0`: check_heartbeat()"\
-				"error: Is mon package installed?"
-				return 1
-			fi
-		fi
-
-		if [ "${HBVER_OPT}" = "${HBVER_HBV2}" ]; then
-			# Check crm directory
-			if ! check_remote_file ${NODE_NAMES[idx]} ${CIB_DIR}; then
-				echo >&2 "`basename $0`: check_heartbeat()"\
-				"error: Is Heartbeat v2 package installed?"
-				return 1
-			fi
-		fi
-		
-		# Check heartbeat service status
-		hb_running ${NODE_NAMES[idx]}
-		rc=$?
-		if [ "$rc" -eq "2" ]; then
-			return 1
-		elif [ "$rc" -eq "1" ]; then
-			verbose_output "Heartbeat service is stopped on"\
-			"node ${NODE_NAMES[idx]}."
-		elif [ "$rc" -eq "0" ]; then
-			OK=
-			echo -n "`basename $0`: Heartbeat service is running on"\
-			"${NODE_NAMES[idx]}, go ahead to stop the service and"\
-			"generate new configurations? [y/n]:"
-			read OK
-			if [ "${OK}" = "n" ]; then
-				echo "`basename $0`: New Heartbeat configurations"\
-				"are not generated."
-				return 2
-			fi
-
-			# Stop heartbeat service	
-			stop_heartbeat ${NODE_NAMES[idx]}
-		fi
-	done
-
-	return 0
-}
-
-# get_srvname hostname target_devname
-#
-# Get the lustre target server name from the node @hostname
-get_srvname() {
-	local host_name=$1
-	local target_devname=$2
-	local target_srvname=
-	local ret_str
-
-	# Execute remote command to get the target server name
-	ret_str=`${REMOTE} ${host_name} \
-		"${TUNEFS} --print --verbose ${target_devname} | grep Target:" 2>&1`
-	if [ $? -ne 0 ]; then
-		echo "`basename $0`: get_srvname() error:" \
-		     "from host ${host_name} - ${ret_str}"
-		return 1
-	fi
-
-	if [ "${ret_str}" != "${ret_str#*Target: }" ]; then
-		ret_str=${ret_str#*Target: }
-		target_srvname=`echo ${ret_str} | awk '{print $1}'`
-	fi
-	
-	if [ -z "${target_srvname}" ]; then
-		echo "`basename $0`: get_srvname() error: Cannot get the"\
-		     "server name of target ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	echo ${target_srvname}
-	return 0
-} 
-
-# get_srvnames
-#
-# Get server names of all the Lustre targets in this failover group
-get_srvnames() {
-	declare -i i
-
-	# Initialize the TARGET_SRVNAMES array
-	unset TARGET_SRVNAMES
-
-	# Get Lustre target service names
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		TARGET_SRVNAMES[i]=$(get_srvname ${PRIM_NODENAME} \
-				     ${TARGET_DEVNAMES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_SRVNAMES[i]}"
-			return 1
-		fi
-	done
-
-	return 0
-}
-
-# create_template
-#
-# Create the templates for ha.cf and authkeys files
-create_template() {
-	/bin/mkdir -p ${TMP_DIR}
-
-	# Create the template for ha.cf
-	if [ "${HBVER_OPT}" = "${HBVER_HBV1}" ]; then
-		cat >${HACF_TEMP} <<EOF
-debugfile /var/log/ha-debug
-logfile /var/log/ha-log
-logfacility     local0
-keepalive 2
-deadtime 30
-initdead 120
-
-auto_failback off
-
-EOF
-	elif [ "${HBVER_OPT}" = "${HBVER_HBV2}" ]; then
-		cat >${HACF_TEMP} <<EOF
-use_logd        yes
-keepalive 1
-deadtime 10
-initdead 60
-
-crm yes
-
-EOF
-	fi
-
-	# Create the template for authkeys
-	if [ ! -s ${AUTHKEYS_TEMP} ]; then
-		cat >${AUTHKEYS_TEMP} <<EOF
-auth 1
-1 sha1 HelloLustre!
-EOF
-	fi
-
-	return 0
-}
-
-# create_hacf
-#
-# Create the ha.cf file and scp it to each node's /etc/ha.d/
-create_hacf() {
-	HACF_PRIMNODE=${TMP_DIR}$"/ha.cf."${PRIM_NODENAME}
-	HACF_LUSTRE=${TMP_DIR}$"/ha.cf"${FILE_SUFFIX}
-
-	declare -i idx
-
-	if [ -e ${HACF_PRIMNODE} ]; then
-		# The ha.cf file for the primary node has already existed.
-		verbose_output "${HACF_PRIMNODE} already exists."
-		return 0
-	fi
-
-	/bin/cp -f ${HACF_TEMP} ${HACF_LUSTRE}
-
-        for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		echo "node    ${NODE_NAMES[idx]}" >> ${HACF_LUSTRE}
-        done
-
-	# scp ha.cf file to all the nodes
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		touch ${TMP_DIR}$"/ha.cf."${NODE_NAMES[idx]}
-		scp ${HACF_LUSTRE} ${NODE_NAMES[idx]}:${HA_DIR}/
-		if [ $? -ne 0 ]; then
-			echo >&2 "`basename $0`: Failed to scp ha.cf file"\
-				 "to node ${NODE_NAMES[idx]}!"
-			return 1
-		fi
-	done
-
-	return 0
-}
-
-# create_haresources
-#
-# Create the haresources file and scp it to the each node's /etc/ha.d/
-create_haresources() {
-	HARES_PRIMNODE=${TMP_DIR}$"/haresources."${PRIM_NODENAME}
-	HARES_LUSTRE=${TMP_DIR}$"/haresources"${FILE_SUFFIX}
-	declare -i idx
-	local res_line
-
-	if [ -s ${HARES_PRIMNODE} ]; then
-		# The haresources file for the primary node has already existed
-		if [ -n "`/bin/grep ${TARGET_DEVNAMES[0]} ${HARES_PRIMNODE}`" ]; then
-			verbose_output "${HARES_PRIMNODE} already exists."
-			return 0
-		fi
-	fi
-		
-	# Add the resource group line into the haresources file
-	res_line=${PRIM_NODENAME}
-	for ((idx = 0; idx < ${#TARGET_DEVNAMES[@]}; idx++)); do
-		res_line=${res_line}" "${LUSTRE_SRV}::${TARGET_DEVNAMES[idx]}::${TARGET_MNTPNTS[idx]}::${FS_TYPE}
-			
-		if [ "${HBVER_OPT}" = "${HBVER_HBV1}" ]; then
-			res_line=${res_line}" "${TARGET_SRVNAMES[idx]}"-mon"
-		fi
-	done
-	echo "${res_line}" >> ${HARES_LUSTRE}
-
-	# Generate the cib.xml file
-	if [ "${HBVER_OPT}" = "${HBVER_HBV2}" ]; then
-		# Add group haclient and user hacluster
-		[ -z "`grep haclient /etc/group`" ] && groupadd haclient
-		[ -z "`grep hacluster /etc/passwd`" ] && useradd -g haclient hacluster
-
-		CIB_LUSTRE=${TMP_DIR}$"/cib.xml"${FILE_SUFFIX}
-		python ${CIB_GEN_SCRIPT} --stdout \
-		${HARES_LUSTRE} > ${CIB_LUSTRE}
-		if [ $? -ne 0 ]; then
-			echo >&2 "`basename $0`: Failed to generate cib.xml file"\
-				 "for node ${PRIM_NODENAME}!"
-			return 1
-		fi
-	fi
-
-	# scp the haresources file or cib.xml file
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		/bin/cp -f ${HARES_LUSTRE} ${TMP_DIR}$"/haresources."${NODE_NAMES[idx]}
-		scp ${HARES_LUSTRE} ${NODE_NAMES[idx]}:${HA_DIR}/
-		if [ $? -ne 0 ]; then
-			echo >&2 "`basename $0`: Failed to scp haresources file"\
-				 "to node ${NODE_NAMES[idx]}!"
-			return 1
-		fi
-
-		if [ "${HBVER_OPT}" = "${HBVER_HBV2}" ]; then
-			scp ${CIB_LUSTRE} ${NODE_NAMES[idx]}:${CIB_DIR}/
-			if [ $? -ne 0 ]; then
-				echo >&2 "`basename $0`: Failed to scp cib.xml"\
-				 	 "file to node ${NODE_NAMES[idx]}!"
-				return 1
-			fi
-		fi
-	done
-
-	return 0
-}
-
-# create_authkeys
-#
-# Create the authkeys file and scp it to the each node's /etc/ha.d/
-create_authkeys() {
-	AUTHKEYS_PRIMNODE=${TMP_DIR}$"/authkeys."${PRIM_NODENAME}
-	declare -i idx
-
-	if [ -e ${AUTHKEYS_PRIMNODE} ]; then
-		verbose_output "${AUTHKEYS_PRIMNODE} already exists."
-		return 0
-	fi
-
-	# scp the authkeys file to all the nodes
-	chmod 600 ${AUTHKEYS_TEMP}
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		touch ${TMP_DIR}$"/authkeys."${NODE_NAMES[idx]}
-		scp -p ${AUTHKEYS_TEMP} ${NODE_NAMES[idx]}:${HA_DIR}/
-		if [ $? -ne 0 ]; then
-			echo >&2 "`basename $0`: Failed to scp authkeys file"\
-				 "to node ${NODE_NAMES[idx]}!"
-			return 1
-		fi
-	done
-
-	return 0
-}
-
-# create_moncf
-#
-# Create the mon.cf file and scp it to the each node's /etc/mon/
-create_moncf() {
-	MONCF_PRIMNODE=${TMP_DIR}$"/mon.cf."${PRIM_NODENAME}
-	MONCF_LUSTRE=${TMP_DIR}$"/mon.cf"${FILE_SUFFIX}
-	local srv_name params=
-	declare -i idx
-	declare -a OLD_TARGET_SRVNAMES		# targets in other nodes 
-						# in this failover group
-	# Initialize the OLD_TARGET_SRVNAMES array
-	unset OLD_TARGET_SRVNAMES
-
-	if [ -s ${MONCF_PRIMNODE} ]; then
-		if [ -n "`/bin/grep ${TARGET_SRVNAMES[0]} ${MONCF_PRIMNODE}`" ]
-		then
-			verbose_output "${MONCF_PRIMNODE} already exists."
-			return 0
-		else
-			# Get the Lustre target service names 
-			# from the previous mon.cf file
-			idx=0
-			for srv_name in `grep hostgroup ${MONCF_PRIMNODE}\
-					|awk '$2 ~ /-mon/ {print $2}'|xargs`
-			do
-				OLD_TARGET_SRVNAMES[idx]=`echo ${srv_name}\
-							  |sed 's/-mon//g'`
-				idx=$(( idx + 1 ))
-			done
-		fi
-	fi
-
-	# Construct the parameters to mon.cf generation script
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		params=${params}" -n "${NODE_NAMES[idx]}
-	done
-
-	for ((idx = 0; idx < ${#OLD_TARGET_SRVNAMES[@]}; idx++)); do
-		params=${params}" -o "${OLD_TARGET_SRVNAMES[idx]}
-	done
-
-	for ((idx = 0; idx < ${#TARGET_SRVNAMES[@]}; idx++)); do
-		params=${params}" -o "${TARGET_SRVNAMES[idx]}
-	done
-
-	${SCRIPT_GEN_MONCF} ${params}
-	if [ $? -ne 0 ]; then
-		echo >&2 "`basename $0`: Failed to generate mon.cf file"\
-			 "by using ${SCRIPT_GEN_MONCF}!"
-		return 1
-	fi
-
-	/bin/mv *-mon.cfg ${MONCF_LUSTRE}
-
-	# scp the mon.cf file to all the nodes
-	for ((idx = 0; idx < ${#NODE_NAMES[@]}; idx++)); do
-		/bin/cp -f ${MONCF_LUSTRE} ${TMP_DIR}$"/mon.cf."${NODE_NAMES[idx]}
-
-		scp ${MONCF_LUSTRE} ${NODE_NAMES[idx]}:${MON_DIR}/
-		if [ $? -ne 0 ]; then
-			echo >&2 "`basename $0`: Failed to scp mon.cf file"\
-				 "to node ${NODE_NAMES[idx]}!"
-			return 1
-		fi
-	done
-
-	return 0
-}
-
-# generate_config
-#
-# Generate the configuration files for Heartbeat and scp them to all the nodes
-generate_config() {
-	if [ "${HBVER_OPT}" = "${HBVER_HBV1}" ]; then
-		# Get server names of Lustre targets
-		if ! get_srvnames; then
-			return 1
-		fi
-	fi
-	
-	if ! create_template; then
-		return 1
-	fi
-
-	verbose_output "Creating and remote copying ha.cf${FILE_SUFFIX} file to"\
-		       "${PRIM_NODENAME} failover group hosts..." 
-	if ! create_hacf; then
-		return 1
-	fi
-	verbose_output "OK"
-
-	verbose_output "Creating and remote copying haresources${FILE_SUFFIX} file"\
-		       "to ${PRIM_NODENAME} failover group hosts..."
-	if ! create_haresources; then
-		return 1
-	fi
-	verbose_output "OK"
-
-	verbose_output "Creating and remote copying authkeys${FILE_SUFFIX} file to" \
-		       "${PRIM_NODENAME} failover group hosts..."
-	if ! create_authkeys; then
-		return 1
-	fi
-	verbose_output "OK"
-
-	if [ "${HBVER_OPT}" = "${HBVER_HBV1}" ]; then
-		verbose_output "Creating and remote copying mon.cf${FILE_SUFFIX} file to" \
-				"${PRIM_NODENAME} failover group hosts..."
-		if ! create_moncf; then
-			return 1
-		fi
-		verbose_output "OK"
-	fi
-
-	return 0
-}
-
-# Main flow
-# Get all the node names
-if ! get_nodenames; then
-	exit 1
-fi
-
-# Check heartbeat services
-verbose_output "Checking heartbeat service in the ${PRIM_NODENAME}"\
-	       "failover group hosts..."
-check_heartbeat
-rc=$?
-if [ "$rc" -eq "2" ]; then
-	verbose_output "OK"
-	exit 0
-elif [ "$rc" -eq "1" ]; then
-	exit 1
-fi
-verbose_output "OK"
-
-# Generate configuration files
-if ! generate_config; then
-	exit 1
-fi
-
-exit 0
diff --git a/lustre/scripts/lc_lvm.in b/lustre/scripts/lc_lvm.in
deleted file mode 100644
index 98248d7ef612997c41bf2db9b2ef78cc879f052a..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_lvm.in
+++ /dev/null
@@ -1,593 +0,0 @@
-#!/bin/bash
-#
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-#
-# lc_lvm - configure Linux LVM devices from a csv file
-#
-################################################################################
-
-# Usage
-usage() {
-    cat >&2 <<EOF
-
-Usage:  `basename $0` [options] <csv file>
-
-    This script is used to configure Linux LVM devices in a Lustre cluster
-    from a csv file.
-
-    Options:
-    -a          select all the nodes from the csv file to operate on
-    -w hostname,hostname,...
-                select the specified list of nodes (separated by commas)
-    -x hostname,hostname,...
-                exclude the specified list of nodes (separated by commas)
-    -h          help and examples
-    -v          verbose mode
-    csv file    a spreadsheet that contains configuration parameters
-                (separated by commas) for each Linux LVM component
-                (PV, VG, LV) to be configured in a Lustre cluster
-
-EOF
-    exit 1
-}
-
-# Samples 
-sample() {
-    cat <<EOF
-
-This script is used to configure Linux LVM devices in a Lustre cluster
-from a csv file.
-
-LVM is a Logical Volume Manager for the Linux operating system. The
-three-level components of it are PV (Physical Volume), VG (Volume Group)
-and LV (Logical Volume).
-
-Each line marked with "PV" in the csv file represents one or more PVs.
-The format is:
-hostname,PV,pv names,operation mode,options
-
-hostname            hostname of the node in the cluster
-PV                  marker of PV line
-pv names            devices or loopback files to be initialized for later
-                    use by LVM or to be wiped the label, e.g. /dev/sda
-                    Multiple devices or files are separated by space or by
-                    using shell expansions, e.g. "/dev/sd{a,b,c}"
-operation mode      create or remove, default is create
-options             a "catchall" for other pvcreate/pvremove options
-                    e.g. "-vv"
-
-Each line marked with "VG" in the csv file represents one VG.
-The format is:
-hostname,VG,vg name,operation mode,options,pv paths
-
-hostname            hostname of the node in the cluster
-VG                  marker of VG line
-vg name             name of the volume group, e.g. ost_vg
-operation mode      create or remove, default is create
-options             a "catchall" for other vgcreate/vgremove options
-                    e.g. "-s 32M"
-pv paths            physical volumes to construct this VG, required by
-                    create mode
-                    Multiple PVs are separated by space or by using
-                    shell expansions, e.g. "/dev/sd[k-m]1"
-
-Each line marked with "LV" in the csv file represents one LV.
-The format is:
-hostname,LV,lv name,operation mode,options,lv size,vg name
-
-hostname            hostname of the node in the cluster
-LV                  marker of LV line
-lv name             name of the logical volume to be created (optional)
-                    or path of the logical volume to be removed (required
-                    by remove mode)
-operation mode      create or remove, default is create
-options             a "catchall" for other lvcreate/lvremove options
-                    e.g. "-i 2 -I 128"
-lv size             size [kKmMgGtT] to be allocated for the new LV
-                    Default unit is megabytes.
-vg name             name of the VG in which the new LV will be created
-
-Items left blank will be set to defaults.
-
-Example:
--------------------------------------------------------
-# MD/LVM devices on mgsnode
-# Remove the LVM devices in the mgsnode
-mgsnode,LV,/dev/mgs_vg/mdt1,remove
-mgsnode,LV,/dev/mgs_vg/mdt2,remove
-mgsnode,VG,mgs_vg,remove
-mgsnode,PV,"/dev/sd{a,b}1",remove
-
-# Create MD device in the mgsnode
-mgsnode,MD,/dev/md0,,-q,1,/dev/sda1 /dev/sdb1
-
-
-# MD/LVM devices on ostnode
-# Create MD and LVM devices in the ostnode
-ostnode,MD,/dev/md0,,-q -c 128,5,"/dev/sd{a,b,c}"
-ostnode,MD,/dev/md1,,-q -c 128,5,"/dev/sd{d,e,f}"
-
-ostnode,PV,/dev/md0 /dev/md1
-ostnode,VG,ost_vg,,-s 32M,"/dev/md{0,1}"
-ostnode,LV,ost0,,-i 2 -I 128,300G,ost_vg
-ostnode,LV,ost1,,-i 2 -I 128,300G,ost_vg
--------------------------------------------------------
-
-EOF
-    exit 0
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-#***************************** Global variables *****************************#
-# All the LVM device items in the csv file
-declare -a HOST_NAME LINE_MARKER LVM_NAME OP_MODE OP_OPTS SIXTH_ITEM SEVENTH_ITEM
-
-# Variables related to background executions
-declare -a REMOTE_CMD
-declare -a REMOTE_PID
-declare -i pid_num=0
-
-
-VERBOSE_OUTPUT=false
-# Get and check the positional parameters
-while getopts "aw:x:hv" OPTION; do
-    case $OPTION in
-    a)
-        [ -z "${SPECIFIED_NODELIST}" ] && [ -z "${EXCLUDED_NODELIST}" ] \
-        && USE_ALLNODES=true
-        ;;
-    w)
-        USE_ALLNODES=false
-        SPECIFIED_NODELIST=$OPTARG
-        ;;
-    x)
-        USE_ALLNODES=false
-        EXCLUDED_NODELIST=$OPTARG
-        ;;
-    h)
-        sample
-        ;;
-    v)
-        VERBOSE_OUTPUT=true
-        ;;
-    ?)
-        usage 
-    esac
-done
-
-# Toss out the parameters we've already processed
-shift  `expr $OPTIND - 1`
-
-# Here we expect the csv file
-if [ $# -eq 0 ]; then
-    echo >&2 "`basename $0`: Missing csv file!"
-    usage
-fi
-
-# check_lvm_item index
-#
-# Check the items required for managing LVM device ${LVM_NAME[index]}
-check_lvm_item() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 "`basename $0`: check_lvm_item() error:"\
-                 "Missing argument!"
-        return 1
-    fi
-
-    declare -i i=$1
-
-    # Check hostname
-    if [ -z "${HOST_NAME[i]}" ]; then
-        echo >&2 "`basename $0`: check_lvm_item() error:"\
-                 "hostname item has null value!"
-        return 1
-    fi
-
-    # Check LVM device name 
-    if [ -z "${LVM_NAME[i]}" ] \
-    && [ "${LINE_MARKER[i]}" != "${LV_MARKER}" -a "${OP_MODE[i]}" != "remove" ]
-    then
-        echo >&2 "`basename $0`: check_lvm_item() error:"\
-                 "LVM component name item has null value!"
-        return 1
-    fi
-
-    # Check the operation mode
-    if [ -n "${OP_MODE[i]}" ] \
-    && [ "${OP_MODE[i]}" != "create" -a "${OP_MODE[i]}" != "remove" ]
-    then
-        echo >&2 "`basename $0`: check_lvm_item() error:"\
-                 "Invalid operation mode item - \"${OP_MODE[i]}\"!"
-        return 1
-    fi
-
-    # Check items required by create mode
-    if [ -z "${OP_MODE[i]}" -o "${OP_MODE[i]}" = "create" ]; then
-        if [ "${LINE_MARKER[i]}" = "${VG_MARKER}" -a -z "${SIXTH_ITEM[i]}" ]
-        then
-            echo >&2 "`basename $0`: check_lvm_item() error:"\
-            "pv paths item of vg ${LVM_NAME[i]} has null value!"
-            return 1
-        fi
-
-        if [ "${LINE_MARKER[i]}" = "${LV_MARKER}" ]; then
-            if [ -z "${SIXTH_ITEM[i]}" ]; then
-                echo >&2 "`basename $0`: check_lvm_item() error:"\
-                         "lv size item has null value!"
-                return 1
-            fi
-
-            if [ -z "${SEVENTH_ITEM[i]}" ]; then
-                echo >&2 "`basename $0`: check_lvm_item() error:"\
-                         "vg name item has null value!"
-                return 1
-            fi
-        fi
-    fi
-
-    return 0
-}
-
-# get_lvm_items csv_file
-#
-# Get all the LVM device items in the $csv_file and do some checks.
-get_lvm_items() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 "`basename $0`: get_lvm_items() error: Missing csv file!"
-        return 1
-    fi
-
-    CSV_FILE=$1
-    local LINE line_marker
-    local hostname
-    declare -i line_num=0
-    declare -i idx=0
-
-    while read -r LINE; do
-        let "line_num += 1"
-
-        # Skip the comment line
-        [ -z "`echo \"${LINE}\" | egrep -v \"([[:space:]]|^)#\"`" ] && continue
-
-        # Skip the non-LVM line
-        line_marker=$(echo ${LINE} | cut -d, -f 2)
-        [ "${line_marker}" != "${PV_MARKER}" ] \
-        && [ "${line_marker}" != "${VG_MARKER}" ] \
-        && [ "${line_marker}" != "${LV_MARKER}" ] && continue
-
-        # Skip the host which is not specified in the host list
-        if ! ${USE_ALLNODES}; then
-            hostname=$(echo ${LINE} | cut -d, -f 1)
-            ! host_in_hostlist ${hostname} ${NODES_TO_USE} && continue
-        fi
-
-        # Parse the config line into CONFIG_ITEM
-        if ! parse_line "$LINE"; then
-            return 1    
-        fi
-
-        HOST_NAME[idx]=${CONFIG_ITEM[0]}
-        LINE_MARKER[idx]=${CONFIG_ITEM[1]}
-        LVM_NAME[idx]=${CONFIG_ITEM[2]}
-        OP_MODE[idx]=${CONFIG_ITEM[3]}
-        OP_OPTS[idx]=${CONFIG_ITEM[4]}
-        SIXTH_ITEM[idx]=${CONFIG_ITEM[5]}
-        SEVENTH_ITEM[idx]=${CONFIG_ITEM[6]}
-
-        # Check some required items
-        if ! check_lvm_item $idx; then
-            echo >&2 "`basename $0`: check_lvm_item() error:"\
-                     "Occurred on line ${line_num} in ${CSV_FILE}."
-            return 1    
-        fi
-
-        let "idx += 1"
-    done < ${CSV_FILE}
-
-    return 0
-}
-
-# construct_lvm_create_cmdline index
-#
-# Construct the creation command line for ${LVM_NAME[index]}
-construct_lvm_create_cmdline() {
-    declare -i i=$1
-    local lvm_cmd
-
-    case "${LINE_MARKER[i]}" in
-    "${PV_MARKER}")
-        lvm_cmd="pvcreate -ff -y ${OP_OPTS[i]} ${LVM_NAME[i]}"
-        ;;
-    "${VG_MARKER}")
-        lvm_cmd="vgcreate ${OP_OPTS[i]} ${LVM_NAME[i]} ${SIXTH_ITEM[i]}"
-        ;;
-    "${LV_MARKER}")
-        if [ -z "${LVM_NAME[i]}" ]; then
-            lvm_cmd="lvcreate -L ${SIXTH_ITEM[i]} ${OP_OPTS[i]} ${SEVENTH_ITEM[i]}"
-        else
-            lvm_cmd="lvcreate -L ${SIXTH_ITEM[i]} -n ${LVM_NAME[i]} ${OP_OPTS[i]} ${SEVENTH_ITEM[i]}"
-        fi
-        ;;
-    esac
-
-    echo ${lvm_cmd}
-    return 0
-}
-
-# cmdline_rm_LVs vg_name
-#
-# Construct command line to remove all the LVs on $vg_name.
-# If $vg_name is null, then remove all the LVs in the host.
-cmdline_rm_LVs() {
-    local vg_name=$1
-    local lvm_rm_cmd
-
-    lvm_rm_cmd="vgchange -a n ${vg_name} &&"
-    lvm_rm_cmd=${lvm_rm_cmd}" vgdisplay -v ${vg_name} | grep \"LV Name\" | awk '{print \$3}' |"
-    lvm_rm_cmd=${lvm_rm_cmd}" while read lv; do lvremove -f \$lv; done"
-
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-# cmdline_rm_LV lv_path
-#
-# Construct command line to remove LV $lv_path
-cmdline_rm_LV() {
-    local lv_path=$1
-    local lvm_rm_cmd
-
-    lvm_rm_cmd="lvchange -a n ${lv_path} && lvremove -f ${lv_path}"
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-
-# cmdline_rm_VG vg_name
-#
-# Construct command line to remove VG $vg_name
-cmdline_rm_VG() {
-    local vg_name=$1
-    local lvm_rm_cmd
-
-    # Remove all the LVs on this VG
-    lvm_rm_cmd=$(cmdline_rm_LVs ${vg_name})
-
-    # Remove this VG
-    lvm_rm_cmd=${lvm_rm_cmd}" && vgremove ${vg_name}"
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-# cmdline_rm_VGs
-#
-# Construct command line to remove all the VGs in the host
-cmdline_rm_VGs() {
-    local lvm_rm_cmd
-
-    # Remove all the LVs in the host
-    lvm_rm_cmd=$(cmdline_rm_LVs)
-
-    # Remove all the VGs in the host
-    lvm_rm_cmd=${lvm_rm_cmd}" && vgdisplay | grep \"VG Name\" | awk '{print \$3}' |"
-    lvm_rm_cmd=${lvm_rm_cmd}" while read vg; do vgremove \$vg; done"
-
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-# cmdline_rm_PVs
-#
-# Construct command line to remove all the PVs in the host
-cmdline_rm_PVs() {
-    local lvm_rm_cmd
-
-    # Remove all the LVs and VGs in the host
-    lvm_rm_cmd=$(cmdline_rm_VGs)
-
-    # Remove all the PVs in the host
-    lvm_rm_cmd=${lvm_rm_cmd}" && pvdisplay | grep \"PV Name\" | awk '{print \$3}' |"
-    lvm_rm_cmd=${lvm_rm_cmd}" while read pv; do pvremove -ff -y \$pv; done"
-
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-# construct_lvm_teardown_cmdline index
-#
-# Construct the teardown command line for LVM devices in ${HOST_NAME[index]}
-construct_lvm_teardown_cmdline() {
-    declare -i i=$1
-    local lvm_rm_cmd
-
-    case "${LINE_MARKER[i]}" in
-    "${LV_MARKER}")
-        lvm_rm_cmd=$(cmdline_rm_LVs ${SEVENTH_ITEM[i]})
-        ;;
-    "${VG_MARKER}")
-        # Remove all the VGs in the host
-        lvm_rm_cmd=$(cmdline_rm_VGs)
-        ;;
-    "${PV_MARKER}")
-        # Remove all the PVs in the host
-        lvm_rm_cmd=$(cmdline_rm_PVs)
-        ;;
-    esac
-
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-# construct_lvm_rm_cmdline index
-#
-# Construct the remove command line for LVM device ${LVM_NAME[index]}
-construct_lvm_rm_cmdline() {
-    declare -i i=$1
-    local lvm_rm_cmd
-                        
-    case "${LINE_MARKER[i]}" in
-    "${LV_MARKER}")
-        lvm_rm_cmd=$(cmdline_rm_LV ${LVM_NAME[i]})
-        ;;
-    "${VG_MARKER}")
-        lvm_rm_cmd=$(cmdline_rm_VG ${LVM_NAME[i]})
-        ;;
-    "${PV_MARKER}")
-        lvm_rm_cmd="pvremove -ff -y ${LVM_NAME[i]}"
-        ;;
-    esac
-
-    echo ${lvm_rm_cmd}
-    return 0
-}
-
-# construct_lvm_cmdline host_name
-#
-# Construct the command line of LVM utilities to be run in the $host_name
-construct_lvm_cmdline() {
-    LVM_CMDLINE=
-    local host_name=$1
-    local lvm_cmd
-    declare -i i
-
-    # Construct command line
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        lvm_cmd=
-        if [ "${host_name}" = "${HOST_NAME[i]}" ]; then
-            case "${OP_MODE[i]}" in
-            "" | create)
-                    # Construct the create command line
-                    lvm_cmd=$(construct_lvm_create_cmdline ${i})
-                    ;;
-            remove)
-                    if [ -z "${LVM_NAME[i]}" ]; then
-                        # Construct the teardown command line
-                        lvm_cmd=$(construct_lvm_teardown_cmdline ${i})
-                    else    # Remove instead of teardown
-                        # Construct the remove command line
-                        lvm_cmd=$(construct_lvm_rm_cmdline ${i})
-                    fi
-                    ;;
-            *)
-                echo >&2 "`basename $0`: construct_lvm_cmdline() error:"\
-                         "Invalid operation mode - \"${OP_MODE[i]}\"!"
-                return 1
-                ;;
-            esac
-
-            if [ -z "${LVM_CMDLINE}" ]; then
-                LVM_CMDLINE=${lvm_cmd}
-            else
-                LVM_CMDLINE=${LVM_CMDLINE}" && "${lvm_cmd}
-            fi
-        fi
-    done
-
-    return 0
-}
-
-# config_lvm_devs host_name
-#
-# Run remote command to configure LVM devices in $host_name
-config_lvm_devs() {
-    local host_name=$1
-
-    # Construct the LVM utilities command line
-    if ! construct_lvm_cmdline ${host_name}; then
-        return 1
-    fi
-    
-    if [ -z "${LVM_CMDLINE}" ]; then
-        verbose_output "There are no LVM devices on host ${host_name}"\
-        "needed to be configured."
-        return 0
-    fi
-
-    # Run remote command to configure LVM devices in $host_name
-    verbose_output "Configuring LVM devices in host ${host_name}..."
-    verbose_output "Configure command line is: \"${LVM_CMDLINE}\""
-    REMOTE_CMD[pid_num]="${REMOTE} ${host_name} \"${LVM_CMDLINE}\""
-    ${REMOTE} ${host_name} "(${EXPORT_PATH} ${LVM_CMDLINE})" >&2 &
-    REMOTE_PID[pid_num]=$!
-    let "pid_num += 1"
-
-    return 0
-}
-
-# Run remote command to configure all the LVM devices specified
-# in the csv file
-config_lvm() {
-    declare -i i=0
-    declare -i idx=0        # Index of NODE_NAME array
-    local host_name
-    local failed_status
-
-    # Initialize the NODE_NAME array
-    unset NODE_NAME
-
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        host_name=${HOST_NAME[i]}
-        configured_host ${host_name} && continue
-
-        NODE_NAME[idx]=${host_name}
-        let "idx += 1"
-
-        # Run remote command to configure LVM devices in $host_name
-        if ! config_lvm_devs ${host_name}; then
-            return 1
-        fi
-    done
-
-    if [ ${#HOST_NAME[@]} -eq 0 -o ${#REMOTE_PID[@]} -eq 0 ]; then
-        verbose_output "There are no LVM devices to be configured."
-        return 0
-    fi
-
-    # Wait for the exit status of the background remote command
-    verbose_output "Waiting for the return of the remote command..."
-    failed_status=false
-    for ((pid_num = 0; pid_num < ${#REMOTE_PID[@]}; pid_num++)); do
-        wait ${REMOTE_PID[${pid_num}]}
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "`basename $0`: config_lvm() error: Failed"\
-                 "to execute \"${REMOTE_CMD[${pid_num}]}\"!"
-            failed_status=true
-        fi
-    done
-
-    if ${failed_status}; then
-        return 1
-    fi
-
-    verbose_output "All the LVM devices are configured successfully!"
-    return 0
-}
-
-# Main flow
-# Check the csv file
-if ! check_file $1; then
-    exit 1    
-fi
-
-# Get the list of nodes to be operated on
-NODES_TO_USE=$(get_nodelist)
-[ ${PIPESTATUS[0]} -ne 0 ] && echo >&2 "${NODES_TO_USE}" && exit 1
-
-# Check the node list
-check_nodelist ${NODES_TO_USE} || exit 1
-
-# Get all the LVM device items from the csv file 
-if ! get_lvm_items ${CSV_FILE}; then
-    exit 1
-fi
-
-# Configure the LVM devices 
-if ! config_lvm; then
-    exit 1
-fi
-
-exit 0
diff --git a/lustre/scripts/lc_md.in b/lustre/scripts/lc_md.in
deleted file mode 100644
index ab741af0fdac35a3e53a487b819f1c0cbd26e0a4..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_md.in
+++ /dev/null
@@ -1,511 +0,0 @@
-#!/bin/bash
-#
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-#
-# lc_md - configure Linux MD devices from a csv file
-#
-################################################################################
-
-# Usage
-usage() {
-    cat >&2 <<EOF
-
-Usage:  `basename $0` [options] <csv file>
-
-    This script is used to configure Linux MD devices in a Lustre cluster
-    from a csv file.
-
-    Options:
-    -a          select all the nodes from the csv file to operate on
-    -w hostname,hostname,...
-                select the specified list of nodes (separated by commas)
-    -x hostname,hostname,...
-                exclude the specified list of nodes (separated by commas)
-    -h          help and examples
-    -v          verbose mode
-    csv file    a spreadsheet that contains configuration parameters
-                (separated by commas) for each Linux MD device to be
-                configured in a Lustre cluster
-
-EOF
-    exit 1
-}
-
-# Samples 
-sample() {
-    cat <<EOF
-
-This script is used to configure Linux MD devices in a Lustre cluster
-from a csv file.
-
-Each line marked with "MD" in the csv file represents one MD device.
-The format is:
-hostname,MD,md name,operation mode,options,raid level,component devices
-
-hostname            hostname of the node in the cluster
-MD                  marker of MD device line
-md name             MD device name, e.g. /dev/md0
-operation mode      create or remove, default is create
-options             a "catchall" for other mdadm options, e.g. "-c 128"
-raid level          raid level: 0,1,4,5,6,10,linear and multipath
-component devices   block devices to be combined into the MD device
-                    Multiple devices are separated by space or by using
-                    shell expansions, e.g. "/dev/sd{a,b,c}"
-
-Items left blank will be set to defaults.
-
-Example:
--------------------------------------------------------
-# MD devices on mgsnode
-mgsnode,MD,/dev/md0,,-q -c 32,1,/dev/sda1 /dev/sdb1
-mgsnode,MD,/dev/md1,,-q -c 32,1,/dev/sdc1 /dev/sdd1
-mgsnode,MD,/dev/md2,,-q -c 32,0,/dev/md0 /dev/md1
-
-# MD device on ostnode
-ostnode,MD,/dev/md0,,-q -c 128,5,"/dev/sd{a,b,c,d,e}"
--------------------------------------------------------
-
-EOF
-    exit 0
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-#***************************** Global variables *****************************#
-# All the MD device items in the csv file
-declare -a HOST_NAME MD_NAME OP_MODE OP_OPTS RAID_LEVEL MD_DEVS
-
-# Variables related to background executions
-declare -a REMOTE_CMD
-declare -a REMOTE_PID
-declare -i pid_num=0
-
-
-VERBOSE_OUTPUT=false
-# Get and check the positional parameters
-while getopts "aw:x:hv" OPTION; do
-    case $OPTION in
-    a)
-        [ -z "${SPECIFIED_NODELIST}" ] && [ -z "${EXCLUDED_NODELIST}" ] \
-        && USE_ALLNODES=true
-        ;;
-    w)
-        USE_ALLNODES=false
-        SPECIFIED_NODELIST=$OPTARG
-        ;;
-    x)
-        USE_ALLNODES=false
-        EXCLUDED_NODELIST=$OPTARG
-        ;;
-    h)
-        sample
-        ;;
-    v)
-        VERBOSE_OUTPUT=true
-        ;;
-    ?)
-        usage 
-    esac
-done
-
-# Toss out the parameters we've already processed
-shift  `expr $OPTIND - 1`
-
-# Here we expect the csv file
-if [ $# -eq 0 ]; then
-    echo >&2 "`basename $0`: Missing csv file!"
-    usage
-fi
-
-# check_md_item index
-#
-# Check the items required for managing MD device ${MD_NAME[index]}
-check_md_item() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 "`basename $0`: check_md_item() error:"\
-                 "Missing argument!"
-        return 1
-    fi
-
-    declare -i i=$1
-
-    # Check hostname
-    if [ -z "${HOST_NAME[i]}" ]; then
-        echo >&2 "`basename $0`: check_md_item() error:"\
-                 "hostname item has null value!"
-        return 1
-    fi
-
-    # Check items required by create mode
-    if [ -z "${OP_MODE[i]}" -o "${OP_MODE[i]}" = "create" ]; then
-        # Check MD device name 
-        if [ -z "${MD_NAME[i]}" ]; then
-            echo >&2 "`basename $0`: check_md_item() error:"\
-            "md name item has null value!"
-            return 1
-        fi
-
-        if [ -z "${RAID_LEVEL[i]}" ]; then
-            echo >&2 "`basename $0`: check_md_item() error:"\
-            "raid level item of MD device ${MD_NAME[i]} has null value!"
-            return 1
-        fi
-
-        if [ -z "${MD_DEVS[i]}" ]; then
-            echo >&2 "`basename $0`: check_md_item() error:"\
-            "component devices item of ${MD_NAME[i]} has null value!"
-            return 1
-        fi
-    fi
-
-    return 0
-}
-
-# get_md_items csv_file
-#
-# Get all the MD device items in the $csv_file and do some checks.
-get_md_items() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 "`basename $0`: get_md_items() error: Missing csv file!"
-        return 1
-    fi
-
-    CSV_FILE=$1
-    local LINE
-    local hostname
-    declare -i line_num=0
-    declare -i idx=0
-
-    while read -r LINE; do
-        let "line_num += 1"
-
-        # Skip the comment line
-        [ -z "`echo \"${LINE}\" | egrep -v \"([[:space:]]|^)#\"`" ] && continue
-
-        # Skip the non-MD line
-        [ "$(echo ${LINE} | cut -d, -f 2)" != "${MD_MARKER}" ] && continue
-
-        # Skip the host which is not specified in the host list
-        if ! ${USE_ALLNODES}; then
-            hostname=$(echo ${LINE} | cut -d, -f 1)
-            ! host_in_hostlist ${hostname} ${NODES_TO_USE} && continue
-        fi
-
-        # Parse the config line into CONFIG_ITEM
-        if ! parse_line "$LINE"; then
-            return 1    
-        fi
-
-        HOST_NAME[idx]=${CONFIG_ITEM[0]}
-        MD_NAME[idx]=${CONFIG_ITEM[2]}
-        OP_MODE[idx]=${CONFIG_ITEM[3]}
-        OP_OPTS[idx]=${CONFIG_ITEM[4]}
-        RAID_LEVEL[idx]=${CONFIG_ITEM[5]}
-        MD_DEVS[idx]=${CONFIG_ITEM[6]}
-
-        # Check some required items
-        if ! check_md_item $idx; then
-            echo >&2 "`basename $0`: check_md_item() error:"\
-                     "Occurred on line ${line_num} in ${CSV_FILE}."
-            return 1    
-        fi
-
-        let "idx += 1"
-    done < ${CSV_FILE}
-
-    return 0
-}
-
-# md_is_active host_name md_name
-#
-# Run remote command to check whether $md_name is active in @host_name
-md_is_active() {
-    local host_name=$1
-    local md_name=$2
-    local cmd ret_str
-
-    cmd="grep -q ${md_name##*/} /proc/mdstat 2>&1"
-    ret_str=$(${REMOTE} ${host_name} "${cmd}" 2>&1)
-    if [ ${PIPESTATUS[0]} -ne 0 ]; then
-        if [ -n "${ret_str}" ]; then
-            echo >&2 "`basename $0`: md_is_active() error:"\
-            "remote command to ${host_name} error: ${ret_str}!"
-            return 2    # Error occurred
-        else
-            return 1    # inactive
-        fi
-    fi
-
-    return 0            # active
-}
-
-# construct_mdadm_create_cmdline index
-#
-# Construct the create operation command line of mdadm for ${MD_NAME[index]}
-construct_mdadm_create_cmdline() {
-    declare -i i=$1
-    local cmd_line
-    local echo_disk disk line
-    declare -i alldisks=0 
-    declare -i raiddisks=0 
-    declare -i sparedisks=0
-
-    cmd_line="${MDADM} -C -R ${MD_NAME[i]} ${OP_OPTS[i]} -l ${RAID_LEVEL[i]}"
-
-    if [ "${OP_OPTS[i]}" != "${OP_OPTS[i]#* -n*}" ]\
-    || [ "${OP_OPTS[i]}" != "${OP_OPTS[i]#*--raid-devices*}" ]; then
-        cmd_line=${cmd_line}" ${MD_DEVS[i]}"
-        echo ${cmd_line}
-        return 0
-    fi
-
-    # FIXME: Get the number of component devices in the array
-    echo_disk="for disk in ${MD_DEVS[i]}; do echo $disk; done"
-    while read line; do
-        let "alldisks += 1"
-    done < <(${REMOTE} ${HOST_NAME[i]} "${echo_disk}")
-
-    if [ ${alldisks} -eq 0 ]; then
-        echo "`basename $0`: construct_mdadm_create_cmdline() error:"\
-        "Failed to execute remote command to get the number of"\
-        "component devices of array ${MD_NAME[i]} from host ${HOST_NAME[i]}!"
-        return 1
-    fi
-
-    # Get the specified number of spare (eXtra) devices
-    if [ "${OP_OPTS[i]}" != "${OP_OPTS[i]#* -x*}" ]; then
-        sparedisks=`echo ${OP_OPTS[i]##* -x}|awk -F" " '{print $1}'`
-    elif [ "${OP_OPTS[i]}" != "${OP_OPTS[i]#*--spare-devices*}" ]; then
-        sparedisks=`echo ${OP_OPTS[i]##*--spare-devices=}|awk -F" " '{print $1}'`
-    fi
-
-    # Get the number of raid devices in the array
-    # The number of raid devices in the array plus the number of spare devices
-    # listed on the command line must equal the number of component devices 
-    # (including "missing" devices). 
-    let "raiddisks = alldisks - sparedisks"
-
-    if [ ${raiddisks} -lt 1 ]; then
-        echo "`basename $0`: construct_mdadm_create_cmdline() error:"\
-        "Invalid number of raid devices in array ${MD_NAME[i]}: ${raiddisks}!"\
-        "Check the number of spare devices and whether all the component devices"\
-        "\"${MD_DEVS[i]}\" (except \"missing\" devices) exist in host ${HOST_NAME[i]}!"
-        return 1
-    fi
-
-    cmd_line=${cmd_line}" -n ${raiddisks} ${MD_DEVS[i]}"
-
-    echo ${cmd_line}
-    return 0
-}
-
-# construct_mdadm_rm_cmdline index
-#
-# Construct the remove operation command line of mdadm for ${MD_NAME[index]}
-construct_mdadm_rm_cmdline() {
-    declare -i i=$1
-    local mdadm_cmd
-    local real_devs
-
-    # Deactivate the MD array, releasing all resources
-    mdadm_cmd="${MDADM} -S ${MD_NAME[i]}"
-
-    if [ -n "${MD_DEVS[i]}" ]; then
-        # Remove the "missing" devices from the component devices
-        real_devs=`echo ${MD_DEVS[i]} | sed 's/missing//g'`
-        # Over-written the superblock with zeros
-        mdadm_cmd=${mdadm_cmd}" && ${MDADM} --zero-superblock ${real_devs} || true"
-    fi
-
-    echo ${mdadm_cmd}
-    return 0
-}
-
-# construct_mdadm_cmdline host_name
-#
-# Construct the command line of mdadm to be run in $host_name
-construct_mdadm_cmdline() {
-    MDADM_CMDLINE=
-    local host_name=$1
-    local mdadm_stop_cmd mdadm_cmd
-    local rc OK
-    declare -i i
-
-    # Construct command line
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        mdadm_stop_cmd=
-        mdadm_cmd=
-        if [ "${host_name}" = "${HOST_NAME[i]}" ]; then
-            case "${OP_MODE[i]}" in
-            "" | create)
-                    # Check the status of the MD array
-                    md_is_active ${host_name} ${MD_NAME[i]}
-                    rc=${PIPESTATUS[0]}
-                    if [ "$rc" -eq "2" ]; then
-                        return 1
-                    elif [ "$rc" -eq "0" ]; then
-                        OK=
-                        echo -n "`basename $0`: ${MD_NAME[i]} is active on"\
-                        "${host_name}, go ahead to deactivate it and create"\
-                        "the new array? [y/n]:"
-                        read OK
-                        if [ "${OK}" = "n" ]; then
-                                echo "`basename $0`: ${MD_NAME[i]} on host"\
-                                "${host_name} remains as it is."
-                                continue
-                        fi
-
-                        # Construct the remove command line
-                        mdadm_stop_cmd=$(construct_mdadm_rm_cmdline ${i})
-                    fi
-
-                    # Construct the create command line
-                    mdadm_cmd=$(construct_mdadm_create_cmdline ${i})
-                    if [ ${PIPESTATUS[0]} -ne 0 ]; then
-                        echo >&2 "${mdadm_cmd}"
-                        return 1
-                    fi
-
-                    [ -n "${mdadm_stop_cmd}" ] && mdadm_cmd=${mdadm_stop_cmd}" && "${mdadm_cmd}
-                    ;;
-            remove)
-                    if [ -z "${MD_NAME[i]}" ]; then
-                        OK=
-                        echo -n "`basename $0`: Do you really want to remove"\
-                        "all the MD devices in the host ${HOST_NAME[i]}? [y/n]:"
-                        read OK
-                        if [ "${OK}" = "n" ]; then
-                            echo "`basename $0`: MD devices on host"\
-                            "${HOST_NAME[i]} remain as they are."
-                            continue
-                        fi
-
-                        # Construct the teardown command line
-                        mdadm_cmd="(cat /proc/mdstat | egrep \"^md[[:digit:]]\" |"
-                        mdadm_cmd=${mdadm_cmd}" while read md rest; do ${MDADM} -S /dev/\$md; done)"
-                    else
-                        # Construct the remove command line
-                        mdadm_cmd=$(construct_mdadm_rm_cmdline ${i})
-                    fi
-                    ;;
-            *)
-                # Other operations
-                mdadm_cmd="${MDADM} ${OP_MODE[i]} ${MD_NAME[i]} ${OP_OPTS[i]} ${MD_DEVS[i]}"
-                ;;
-            esac
-
-            if [ -z "${MDADM_CMDLINE}" ]; then
-                MDADM_CMDLINE=${mdadm_cmd}
-            else
-                MDADM_CMDLINE=${MDADM_CMDLINE}" && "${mdadm_cmd}
-            fi
-        fi
-    done
-
-    return 0
-}
-
-# config_md_devs host_name
-#
-# Run remote command to configure MD devices in $host_name
-config_md_devs() {
-    local host_name=$1
-
-    # Construct mdadm command line
-    if ! construct_mdadm_cmdline ${host_name}; then
-        return 1
-    fi
-    
-    if [ -z "${MDADM_CMDLINE}" ]; then
-        verbose_output "There are no MD devices on host ${host_name}"\
-        "needed to be configured."
-        return 0
-    fi
-
-    # Run remote command to configure MD devices in $host_name
-    verbose_output "Configuring MD devices in host ${host_name}..."
-    verbose_output "Configure command line is: \"${MDADM_CMDLINE}\""
-    REMOTE_CMD[pid_num]="${REMOTE} ${host_name} \"${MDADM_CMDLINE}\""
-    ${REMOTE} ${host_name} "${MDADM_CMDLINE}" >&2 &
-    REMOTE_PID[pid_num]=$!
-    let "pid_num += 1"
-    sleep 1
-
-    return 0
-}
-
-# Run remote command to configure all the MD devices specified in the csv file
-config_md() {
-    declare -i i=0
-    declare -i idx=0        # Index of NODE_NAME array
-    local host_name
-    local failed_status
-
-    # Initialize the NODE_NAME array
-    unset NODE_NAME
-
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        host_name=${HOST_NAME[i]}
-        configured_host ${host_name} && continue
-
-        NODE_NAME[idx]=${host_name}
-        let "idx += 1"
-
-        # Run remote command to configure MD devices in $host_name
-        if ! config_md_devs ${host_name}; then
-            return 1
-        fi
-    done
-
-    if [ ${#HOST_NAME[@]} -eq 0 -o ${#REMOTE_PID[@]} -eq 0 ]; then
-        verbose_output "There are no MD devices to be configured."
-        return 0
-    fi
-
-    # Wait for the exit status of the background remote command
-    verbose_output "Waiting for the return of the remote command..."
-    failed_status=false
-    for ((pid_num = 0; pid_num < ${#REMOTE_PID[@]}; pid_num++)); do
-        wait ${REMOTE_PID[${pid_num}]}
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "`basename $0`: config_md() error: Failed"\
-                 "to execute \"${REMOTE_CMD[${pid_num}]}\"!"
-            failed_status=true
-        fi
-    done
-
-    if ${failed_status}; then
-        return 1
-    fi
-
-    verbose_output "All the MD devices are configured successfully!"
-    return 0
-}
-
-# Main flow
-# Check the csv file
-if ! check_file $1; then
-    exit 1    
-fi
-
-# Get the list of nodes to be operated on
-NODES_TO_USE=$(get_nodelist)
-[ ${PIPESTATUS[0]} -ne 0 ] && echo >&2 "${NODES_TO_USE}" && exit 1
-
-# Check the node list
-check_nodelist ${NODES_TO_USE} || exit 1
-
-# Get all the MD device items from the csv file 
-if ! get_md_items ${CSV_FILE}; then
-    exit 1
-fi
-
-# Configure the MD devices 
-if ! config_md; then
-    exit 1
-fi
-
-exit 0
diff --git a/lustre/scripts/lc_modprobe.in b/lustre/scripts/lc_modprobe.in
deleted file mode 100644
index 2fe7f786a86a2b5062f70965f22a9c3293234772..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_modprobe.in
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-#
-# lc_modprobe - add lustre module options into modprobe.conf or 
-#	        modules.conf
-#
-#################################################################################
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-# Check the kernel version
-KERNEL_VERSION=`uname -r`
-KERNEL_VERSION=${KERNEL_VERSION:0:3}
-
-if [ "${KERNEL_VERSION}" = "2.4" ]; then
-	MODULE_CONF=/etc/modules.conf
-else
-	MODULE_CONF=/etc/modprobe.conf
-fi
-
-read -r NETWORKS
-MODLINES_FILE=/tmp/modlines$$.txt
-START_MARKER=$"# start lustre config"
-END_MARKER=$"# end lustre config"
-
-# Generate a temp file contains lnet options lines 
-generate_lnet_lines() {
-	local LNET_LINE TMP_LINE
-
-	TMP_LINE="${NETWORKS}"
-
-	echo ${START_MARKER} > ${MODLINES_FILE}
-	echo "# Lustre module options added automatically by `basename $0`" >> ${MODLINES_FILE}
-	while true; do
-		LNET_LINE=${TMP_LINE%%\\n*}
-        	echo ${LNET_LINE} >> ${MODLINES_FILE}
-
-        	TMP_LINE=${TMP_LINE#*\\n}
-
-		if [ "${TMP_LINE}" == "${LNET_LINE}" ]; then
-                	break
-        	fi
-	done
-	echo ${END_MARKER} >> ${MODLINES_FILE}
-
-	#echo "--------------${MODLINES_FILE}--------------"
-	#cat ${MODLINES_FILE}
-	#echo -e "------------------------------------------\n"
-
-	return 0
-}
-
-if ! generate_lnet_lines; then
-	exit 1	
-fi
-
-MODULE_CONF=$(fcanon ${MODULE_CONF})
-# Add lnet options lines to the module configuration file
-if [ -e ${MODULE_CONF} ]; then
-	# Delete the old options
-	sed -i "/${START_MARKER}/,/${END_MARKER}/d" ${MODULE_CONF}
-fi
-
-cat ${MODLINES_FILE} >> ${MODULE_CONF}
-rm -f ${MODLINES_FILE}
-exit 0
diff --git a/lustre/scripts/lc_mon b/lustre/scripts/lc_mon
deleted file mode 100644
index ac4be84e72ea2ce40f60d3e02cef764f6dba39b2..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_mon
+++ /dev/null
@@ -1,139 +0,0 @@
-#!/bin/sh
-
-# Given one or more Lustre objects, create a mon configuration file
-# naming the mon watches based on the Lustre object names 
-# For each Lustre object, the script will create two mon watches
-# The first watch sets a trap, and the second watch clears the 
-# trap if Lustre is healthy.
-
-# This may be more fun in Perl due to the need to support a list
-# of objects
-
-# (plus we could use a Perl format for this goop)
-
-MONBASEDIR=${MONBASEDIR:-/usr/local/lib/mon}
-MONCFGDIR=${MONCFGDIR:-/etc/mon}
-TD=`date +%y_%m%d_%S`
-TMPMONCFG=${TD}-mon.cfg
-# Determines how often we will check Lustre health
-CHECKINTERVAL="3m"
-# Determines how quickly we must clear the trap
-TRAPINTERVAL="6m"
-ALERTSCRIPT=${ALERTSCRIPT:-"fail_lustre.alert"}
-TRAPSCRIPT=${TRAPSCRIPT:-"lustre.mon.trap"}
-
-# We will assume all inputs are Lustre objects
-# file locations and timeouts correct to taste
-# Correct to taste
-print_header() {
-    cat >> $TMPMONCFG <<-EOF
-	cfbasedir     = $MONCFGDIR
-	alertdir      = $MONBASEDIR/alert.d
-	mondir        = $MONBASEDIR/mon.d
-	statedir      = $MONBASEDIR/state.d
-	logdir        = $MONBASEDIR/log.d
-	dtlogfile     = $MONBASEDIR/log.d/downtime.log
-	maxprocs      = 20 
-	histlength    = 100 
-	randstart     = 60s
-	authtype      = getpwnam
-EOF
-}
-
-# Tabs should be preserved in the config file
-# $1 object name
-# we do not set a period, it is assumed monitor is always active
-
-print_trap_rec() {
-    cat >> $TMPMONCFG <<EOF
-#
-watch ${1}-obj
-    service ${1}_ser
-    description triggers heartbeat failure if trap springs on $1
-    traptimeout $TRAPINTERVAL
-    period 
-	alert $ALERTSCRIPT
-
-# end ${1}-obj
-
-EOF
-
-}
-
-print_trap_send() {
-    cat >> $TMPMONCFG <<EOF
-#
-watch ${1}-mon
-    service ${1}_mon_ser
-    description clears trap for $1
-    interval $CHECKINTERVAL
-    monitor $TRAPSCRIPT ${1}-obj ${1}_ser ${1}
-    period
-	alert $ALERTSCRIPT
-# end ${1}-mon
-EOF
-
-}
-
-usage() {
-    echo "$0 -n <node> -n <node> -o <Lustre object> -o <Lustre object>...."
-    echo "Creates the /etc/mon/mon.cf file to monitor Lustre objects"
-    exit 1
-}
-
-
-# Start of script
-
-if [ $# -eq 0 ];then
-    usage
-fi
-
-# This script should work for any number of hosts
-# 
-HOSTCNT=0
-OBJCNT=0
-
-declare -a HOSTS
-declare -a OBJS
-
-while getopts "n:o:" opt; do
-    case $opt in 
-	n) HOSTS[HOSTCNT]=$OPTARG
-	    HOSTCNT=$(( HOSTCNT + 1 ))
-	    ;;
-	o) OBJS[OBJCNT]=$OPTARG
-	    OBJCNT=$(( OBJCNT + 1 ))
-	    ;;
-	*) usage
-	    ;;
-    esac
-done
-
-echo "Found $HOSTCNT hosts"
-echo "Found $OBJCNT Lustre objects"
-
-# First create the host groups
-# we assume 
-# each object will have two watches defined
-# each object hostgroup will have all objects
-
-# Create the file with the declared goop
-print_header
-
-for obj in ${OBJS[@]}
-do
-    echo "hostgroup ${obj}-obj ${HOSTS[@]}" >> $TMPMONCFG
-    echo "hostgroup ${obj}-mon ${HOSTS[@]}" >> $TMPMONCFG
-    echo "#" >> $TMPMONCFG
-done
-    
-# create the monitors
-
-for obj in ${OBJS[@]}
-do
-    print_trap_send $obj
-    print_trap_rec $obj
-done
-
-echo "Mon config completed - new mon config is $TMPMONCFG"
-exit 0
\ No newline at end of file
diff --git a/lustre/scripts/lc_net.in b/lustre/scripts/lc_net.in
deleted file mode 100644
index d618c699a3a52c2c96775dc3d0b37f3ab54bf941..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_net.in
+++ /dev/null
@@ -1,226 +0,0 @@
-#!/bin/bash
-#
-# lc_net - script for Lustre cluster network verification
-#
-###############################################################################
-
-# Usage
-usage() {
-	cat >&2 <<EOF
-
-Usage:	`basename $0` [options] <csv file>
-
-	Options:
-	-a		select all the nodes from the csv file to operate on
-	-w hostname,hostname,...
-			select the specified list of nodes (separated by commas)
-	-x hostname,hostname,...
-			exclude the specified list of nodes (separated by commas)
-	-v		verbose mode
-	csv file	a spreadsheet that contains configuration parameters 
-			(separated by commas) for each target in a Lustre cl-
-			uster, the first field of each line is the host name 
-			of the cluster node
-
-EOF
-	exit 1
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-VERBOSE_OUTPUT=false
-# Get and check the positional parameters
-while getopts "aw:x:v" OPTION; do
-	case $OPTION in
-	a)
-		[ -z "${SPECIFIED_NODELIST}" ] && [ -z "${EXCLUDED_NODELIST}" ]\
-		&& USE_ALLNODES=true
-		;;
-	w)
-		USE_ALLNODES=false
-		SPECIFIED_NODELIST=$OPTARG
-		;;
-	x)
-		USE_ALLNODES=false
-		EXCLUDED_NODELIST=$OPTARG
-		;;
-	v) 
-		VERBOSE_OUTPUT=true
-		;;
-        ?) 
-		usage 
-	esac
-done
-
-# Toss out the parameters we've already processed
-shift  `expr $OPTIND - 1`
-
-# Here we expect the csv file
-if [ $# -eq 0 ]; then
-	echo >&2 $"`basename $0`: Missing csv file!"
-	usage
-fi
-
-# Global variables
-CSV_FILE=$1
-declare -a HOST_NAMES
-declare -a HOST_IPADDRS
-
-# Get the hosts to be operated on
-get_hostnames() {
-	local NODES_TO_USE
-
-	# Initialize the HOST_NAMES array
-	unset HOST_NAMES
-
-	# Get the list of nodes to be operated on
-	NODES_TO_USE=$(get_nodelist)
-	[ ${PIPESTATUS[0]} -ne 0 ] && echo >&2 "${NODES_TO_USE}" && return 1
-
-	# Check the node list
-	if [ -z "${NODES_TO_USE}" ]; then
-		echo "`basename $0`: There are no hosts to be operated on."\
-		"Check the node selection options (-a, -w or -x)."
-		return 1
-	fi
-
-	# Load the hostnames in the nodelist into the array
-	HOST_NAMES=( $(echo ${NODES_TO_USE//,/ }) )
-
-	return 0
-}
-
-# ping_host host_name
-# Check whether host $host_name is reachable. 
-# If it is, then return the IP address of this host.
-ping_host() {
-	local host_name=$1
-	local ip_addr=
-	local ret_str
-
-	if [ -z "${host_name}" ]; then
-		echo "`basename $0`: ping_host() error: Missing hostname!"
-		return 1
-	fi
-
-	# Run ping command
-	ret_str=$(ping -c1 ${host_name} 2>&1)
-	if [ ${PIPESTATUS[0]} -ne 0 ]; then
-		if [ -n "${ret_str}" ]; then
-			echo "`basename $0`: ping_host() error: ${ret_str}!"
-		else
-			echo "`basename $0`: ping_host() error:"\
-			"Host ${host_name} does not respond to ping!"
-		fi
-		return 1
-	fi
-
-	# Get the IP address
-	ip_addr=`echo "${ret_str}" | head -1 | awk '{print $3}' | \
-		sed -e 's/^(//' -e 's/)$//'`
-
-	echo "${ip_addr}"
-	return 0
-}
-
-# local_check index
-# Check the network connectivity between local host and ${HOST_NAMES[index]}.
-local_check() {
-	declare -i i=$1
-
-	# Check whether ${HOST_NAMES[i]} is reachable
-	# and get the IP address of this host from ping
-	HOST_IPADDRS[i]=$(ping_host ${HOST_NAMES[i]})
-	if [ ${PIPESTATUS[0]} -ne 0 ]; then
-		echo >&2 "${HOST_IPADDRS[i]}"
-		return 1
-	fi
-
-	return 0
-}
-
-# remote_check index
-# Check whether ${HOST_NAMES[index]} can resolve its own name and whether
-# this host agrees with the local host about what its name is resolved to.
-remote_check() {
-	declare -i i=$1
-	local cmd ret_str
-	local ip_addr=		# the IP address got from remote ping
-
-	# Execute remote command to check whether ${HOST_NAMES[i]}
-	# can resolve its own name
-	cmd="ping -c1 ${HOST_NAMES[i]} 2>&1"
-	ret_str=$(${REMOTE} ${HOST_NAMES[i]} "${cmd}" 2>&1)
-	if [ ${PIPESTATUS[0]} -ne 0 -a -n "${ret_str}" ]; then
-		echo >&2 "`basename $0`: remote_check() error:"\
-		"remote to ${HOST_NAMES[i]} error: ${ret_str}!"
-		return 1
-	fi
-
-	if [ -z "${ret_str}" ]; then
-		echo >&2 "`basename $0`: remote_check() error:"\
-		"No results from ${HOST_NAMES[i]}! Check the network"\
-		"connectivity between local host and ${HOST_NAMES[i]}!"
-		return 1
-	fi
-
-	# Get the IP address of ${HOST_NAMES[i]} from its own ping
-	if is_pdsh; then
-		ip_addr=`echo "${ret_str}" | head -1 | awk '{print $4}'`
-	else
-		ip_addr=`echo "${ret_str}" | head -1 | awk '{print $3}'`
-	fi
-	ip_addr=`echo "${ip_addr}" | sed -e 's/^(//' -e 's/)$//'`
-
-	# Compare IP addresses
-	# Check whether ${HOST_NAMES[i]} agrees with the local host
-	# about what its name is resolved to.
-	if [ "${ip_addr}" != "${HOST_IPADDRS[i]}" ]; then
-		echo >&2 "`basename $0`: remote_check() error:"\
-		"Local host resolves ${HOST_NAMES[i]} to IP address"\
-		"\"${HOST_IPADDRS[i]}\", while its own resolution is"\
-		"\"${ip_addr}\". They are not the same!"
-		return 1
-	fi
-	
-	return 0
-}
-
-# network_verify
-# Verify name resolution and network connectivity of the Lustre cluster
-network_verify() {
-	declare -i i
-
-	# Initialize the HOST_IPADDRS array
-	unset HOST_IPADDRS
-
-	# Get all the host names to be operated on 
-	! get_hostnames && return 1
-
-	# Check the network connectivity between local host 
-	# and other cluster nodes
-	for ((i = 0; i < ${#HOST_NAMES[@]}; i++)); do
-		[ "${HOST_NAMES[i]}" = "`hostname`" ] && continue
-
-		verbose_output "Verifying network connectivity between"\
-			       "\"`hostname`\" and \"${HOST_NAMES[i]}\"..."
-		! local_check $i && return 1
-		! remote_check $i && return 1
-		verbose_output "OK"
-	done
-
-	return 0
-}
-
-# Main flow
-if ! check_file ${CSV_FILE}; then
-	exit 1	
-fi
-
-# Cluster network verification
-if ! network_verify; then
-	exit 1	
-fi
-
-exit 0
diff --git a/lustre/scripts/lc_servip b/lustre/scripts/lc_servip
deleted file mode 100644
index 92c6ab2cf1b790cd66bf48be08ae25c3ce8db042..0000000000000000000000000000000000000000
--- a/lustre/scripts/lc_servip
+++ /dev/null
@@ -1,250 +0,0 @@
-#!/bin/bash
-#
-# lc_servip - script for verifying the service IP and the real
-#	      interface IP in a remote host are in the same subnet
-#
-###############################################################################
-
-# Usage
-usage() {
-	cat >&2 <<EOF
-
-Usage:  `basename $0` <service IPaddr> <hostname>
-	
-	service IPaddr		the IP address to failover
-	hostname		the hostname of the remote node
-
-EOF
-	exit 1
-}
-
-# Check arguments
-if [ $# -lt 2 ]; then
-        usage
-fi
-
-# Remote command
-REMOTE=${REMOTE:-"ssh -x -q"}
-
-# Check whether the reomte command is pdsh
-is_pdsh() {
-        if [ "${REMOTE}" = "${REMOTE#*pdsh}" ]; then
-                return 1
-        fi
-
-        return 0
-}
-
-#
-# inSameIPsubnet serviceIPaddr interfaceIPaddr mask
-#
-# Given two IP addresses and a subnet mask determine if these IP
-# addresses are in the same subnet. If they are, return 0, else return 1.
-#
-inSameIPsubnet() {
-	declare -i n
-	declare -ia mask 
-	declare -ia ip1 ip2		# IP addresses given
-	declare -i quad1 quad2		# calculated quad words
-
-	#
-	# Remove '.' characters from dotted decimal notation and save
-	# in arrays. i.e.
-	#
-	#	192.168.1.163 -> array[0] = 192
-	#	                 array[1] = 168
-	#	                 array[2] = 1
-	#	                 array[3] = 163
-	#
-	let n=0
-	for quad in $(echo $1 | awk -F. '{print $1 " " $2 " " $3 " " $4}')
-	do
-		ip1[n]=$quad
-	  	let n=n+1
-	done
-
-	let n=0
-	for quad in $(echo $2 | awk -F. '{print $1 " " $2 " " $3 " " $4}')
-	do
-	  	ip2[n]=$quad
-	  	let n=n+1
-	done
-
-	let n=0
-	for quad in $(echo $3 | awk -F. '{print $1 " " $2 " " $3 " " $4}')
-	do
-	  	mask[n]=$quad
-	  	let n=n+1
-	done
-
-	#
-	# For each quad word, logically AND the IP address with the subnet
-	# mask to get the network/subnet quad word.  If the resulting
-	# quad words for both IP addresses are the same they are in the 
-	# same IP subnet.
-	#
-	for n in 0 1 2 3
-	do
-	  	let $((quad1=${ip1[n]} & ${mask[n]}))
-	  	let $((quad2=${ip2[n]} & ${mask[n]}))
-
-	  	if [ $quad1 != $quad2 ]; then
-			echo >&2 $"`basename $0`: Service IP address $1 and"\
-				  "real interface IP address $2 are in"\
-				  "different subnets!"
-	    		return 1	# in different subnets
-	  	fi
-	done
-
-	return 0	# in the same subnet, all quad words matched
-}
-
-#
-# findInterface IPaddr hostname
-#
-# Given a target IP address and a hostname, find the interface in which 
-# this address is configured.  If found return 0, if not return 1.  The
-# interface name is returned to stdout.
-#
-findInterface() {
-	declare ret_line
-	declare line
-	declare intf
-	declare addr
-	declare state
-
-	declare target=$1
-	declare hostname=$2
-
-	while read ret_line
-	do
-		set -- ${ret_line}
-		is_pdsh && shift
-		intf="$1"
-		shift
-		line="$*"
-
-		while read line
-	  	do
-	    		if [ "$line" = "" ]; then	# go to next interface
-	      			continue 2
-	    		fi
-
-	    		set - $line
-	    		addr=
-	    		while [ $# -gt 0 ]; do
-	      			case $1 in
-	        		addr:*)
-	          			addr=${1##addr:}
-	          			if [ -n "$addr" -a "$addr" = "$target" ]
-					then
-	            				echo $intf
-	            				return 0
-	          			fi
-	          			;;
-	      			esac
-	      			shift
-	    		done
-	  	done
-	done < <(${REMOTE} $hostname /sbin/ifconfig)
-
-	echo >&2 "`basename $0`: Cannot find the interface in which" \
-		  "$target is configured in the host $hostname!"
-	return 1
-}
-
-#
-# findNetmask interface hostname
-#
-# Given an interface find the netmask addresses associated with it.
-# Return 0 when found, else return 1. The netmask is returned to stdout.
-#
-findNetmask() {
-	declare ret_line
-	declare line
-	declare addr
-	declare target=$1
-	declare hostname=$2
-
-	while read ret_line
-	do
-		set -- ${ret_line}
-		is_pdsh && shift
-		line="$*"
-
-		set - $line
-
-	  	while [ $# -gt 0 ]; do
-	    		case $1 in
-	      		Mask:*)
-	        		echo ${1##*:} 	# return netmask addr
-	        		return 0 
-	        		;;
- 	    		esac
-	    		shift
-	  	done
-	done < <(${REMOTE} $hostname /sbin/ifconfig $target)
-
-	echo >&2 "`basename $0`: Cannot find the netmask associated with" \
-		  "the interface $target in the host $hostname!"
-	return 1 
-}
-
-#
-# check_srvIPaddr serviceIPaddr hostname
-#
-# Given a service IP address and hostname, check whether the service IP address
-# and the real interface IP address of hostname are in the same subnet. 
-# If they are, return 0, else return 1.
-#
-check_srvIPaddr() {
-	declare real_IPaddr
-	declare real_intf
-	declare netmask
-	declare srv_IPaddr=$1
-	declare hostname=$2
-
-	# Get the corresponding IP address of the hostname from /etc/hosts table
-	real_IPaddr=`egrep "[[:space:]]$hostname([[:space:]]|$)" /etc/hosts \
-                     | awk '{print $1}'`
-        if [ -z "$real_IPaddr" ]; then
-                echo >&2 "`basename $0`: Hostname $hostname does not exist in" \
-                         "the local /etc/hosts table!"
-                return 1
-        fi
-
-        if [ ${#real_IPaddr} -gt 15 ]; then
-                echo >&2 "`basename $0`: More than one IP address line" \
-                         "corresponding to $hostname in the local"  \
-			 "/etc/hosts table!"
-                return 1
-        fi
-
-	# Get the interface in which the real IP address is configured
-	real_intf=$(findInterface $real_IPaddr $hostname)
-	if [ $? -ne 0 ]; then
-		return 1
-	fi
-	real_intf=${real_intf%%:*}
-
-	# Get the netmask address associated with the real interface
-	netmask=$(findNetmask $real_intf $hostname)
-	if [ $? -ne 0 ]; then
-		return 1
-	fi
-
-	# Determine if the service IP address and the real IP address
-	# are in the same subnet
-	inSameIPsubnet $srv_IPaddr $real_IPaddr $netmask
-	if [ $? -ne 0 ]; then
-		return 1
-	fi
-
-	return 0
-}
-
-# Check service IP address
-if ! check_srvIPaddr $1 $2; then
-	exit 1
-fi
-exit 0
diff --git a/lustre/scripts/license-status b/lustre/scripts/license-status
deleted file mode 100755
index 5407b9140abe77214b8fbb754aa43dd82cfdb45b..0000000000000000000000000000000000000000
--- a/lustre/scripts/license-status
+++ /dev/null
@@ -1,26 +0,0 @@
-#! /bin/sh
-# license-status - Display the status of files in the current directory
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-#
-# Gordon Matzigkeit <gord@fig.org>, 2001-09-27
-
-for f in `find . -type f | sort`; do
- case "$f" in
- *~ | *.orig | *.gz | */config.* | *.o | \
- */CVS/* | */.cvsignore | */.depfiles/* | \
- */COPYING | */ChangeLog)
-  continue
-  ;;
- esac
-
- if head -20 "$f" | egrep -e 'GNU' > /dev/null; then
-  echo "gpled $f"
- elif head -20 "$f" | egrep -e '\([Cc]\)' > /dev/null; then
-  echo "copyrighted $f"
- else
-  echo "bare $f"
- fi
-done | sort
diff --git a/lustre/scripts/llite-group.sh b/lustre/scripts/llite-group.sh
deleted file mode 100644
index ed914e82212bb4ddb5ce6614f53958ca65df8db7..0000000000000000000000000000000000000000
--- a/lustre/scripts/llite-group.sh
+++ /dev/null
@@ -1,67 +0,0 @@
-#!/bin/sh
-#
-# llite-group.sh : Cluster Manager service script for Lustre
-#
-# This must be named llite-<group>.sh, where group is the device 
-# group that is being managed by the cluster manager service.
-#
-
-set -e
-set -vx
-
-[ -f ${LUSTRE_CFG:=/etc/lustre/lustre.cfg} ] && . ${LUSTRE_CFG}
-
-LDAPURL=${LDAPURL:-ldap://localhost}
-CONFIG=${CONFIG:-test23}
-
-LACTIVE=${LACTIVE:-/usr/sbin/lactive}
-LCONF=${LCONF:-/usr/sbin/lconf}
-
-group=`basename $0 .sh| cut -d- -f2`
-confopt="--ldapurl $LDAPURL --config $CONFIG"
-
-[ -z "$group" ] && exit 0
-
-node=`hostname -s`
-
-[ -d ${STATUS_DIR:=/var/lustre} ] || mkdir -p $STATUS_DIR
-
-start() {
-        echo -n "Starting $SERVICE: "
-	python2 $LACTIVE $confopt --group $group --active $node
-        python2 $LCONF -v $confopt
-        RETVAL=$?
-	echo done
-}
-
-stop() {
-        echo -n "Shutting down $SERVICE: "
-        python2 $LCONF -v --cleanup --force --failover $confopt
-        RETVAL=$?
-        echo done
-}
-
-status() {
-        RETVAL=0
-}
-
-
-case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  restart)
-	restart
-	;;
-  status)
-	status $SERVICE
-	;;
-  *)
-	echo "Usage: $0 {start|stop|status}"
-	exit 1
-esac
-
-exit $RETVAL
diff --git a/lustre/scripts/lmc2csv.pl b/lustre/scripts/lmc2csv.pl
deleted file mode 100644
index 73da5fe315fe7adc37666261842e184aab3fd55c..0000000000000000000000000000000000000000
--- a/lustre/scripts/lmc2csv.pl
+++ /dev/null
@@ -1,228 +0,0 @@
-#!/usr/bin/perl
-
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-#
-# convert an lmc batch file to a csv file for lustre_config
-#
-use strict; use warnings;
-
-use Data::Dumper;
-
-sub get_arg_val {
-    my $arg = shift;
-    my ($aref) = @_;
-    for (my $i = 0; $i <= $#$aref; $i++) {
-        if ($$aref[$i] eq "--" . $arg) {
-            my @foo = splice(@$aref, $i, 2);
-            return $foo[1];
-        }
-    }
-}
-
-sub get_arg {
-    my $arg = shift;
-    my ($aref) = @_;
-    for (my $i = 0; $i <= $#$aref; $i++) {
-        if ($$aref[$i] eq "--" . $arg) {
-            splice(@$aref, $i, 1);
-            return 1;
-        }
-    }
-
-    return 0;
-}
-
-sub add_net {
-    my $net = {};
-    $net->{"node"} = get_arg_val("node", \@_);
-    $net->{"nid"} = get_arg_val("nid", \@_);
-    $net->{"nettype"} = get_arg_val("nettype", \@_);
-    $net->{"port"} = get_arg_val("port", \@_);
-    if ($#_ > 0) {
-        print STDERR "Unknown arguments to \"--add net\": @_\n";
-        exit(1);
-    }
-    return $net;
-}
-
-sub add_mds {
-    my $mds = {};
-    $mds->{"node"} = get_arg_val("node", \@_);
-    $mds->{"mds"} = get_arg_val("mds", \@_);
-    $mds->{"fstype"} = get_arg_val("fstype", \@_);
-    $mds->{"dev"} = get_arg_val("dev", \@_);
-    $mds->{"size"} = get_arg_val("size", \@_);
-    if ($#_ > 0) {
-        print STDERR "Unknown arguments to \"--add mds\": @_\n";
-        exit(1);
-    }
-    return $mds;
-}
-
-sub add_lov {
-    my $lov = {};
-    $lov->{"lov"} = get_arg_val("lov", \@_);
-    $lov->{"mds"} = get_arg_val("mds", \@_);
-    $lov->{"stripe_sz"} = get_arg_val("stripe_sz", \@_);
-    $lov->{"stripe_cnt"} = get_arg_val("stripe_cnt", \@_);
-    $lov->{"stripe_pattern"} = get_arg_val("stripe_pattern", \@_);
-    if ($#_ > 0) {
-        print STDERR "Unknown arguments to \"--add lov\": @_\n";
-        exit(1);
-    }
-    return $lov;
-}
-
-sub add_ost {
-    my $ost = {};
-    $ost->{"node"} = get_arg_val("node", \@_);
-    $ost->{"ost"} = get_arg_val("ost", \@_);
-    $ost->{"fstype"} = get_arg_val("fstype", \@_);
-    $ost->{"dev"} = get_arg_val("dev", \@_);
-    $ost->{"size"} = get_arg_val("size", \@_);
-    $ost->{"lov"} = get_arg_val("lov", \@_);
-    $ost->{"mountfsoptions"} = get_arg_val("mountfsoptions", \@_);
-    $ost->{"failover"} = get_arg("failover", \@_);
-    if ($#_ > 0) {
-        print STDERR "Unknown arguments to \"--add ost\": @_\n";
-        exit(1);
-    }
-    return $ost;
-}
-
-sub add_mtpt {
-    my $mtpt = {};
-    $mtpt->{"node"} = get_arg_val("node", \@_);
-    $mtpt->{"path"} = get_arg_val("path", \@_);
-    $mtpt->{"mds"} = get_arg_val("mds", \@_);
-    $mtpt->{"lov"} = get_arg_val("lov", \@_);
-    if ($#_ > 0) {
-        print STDERR "Unknown arguments to \"--add mtpt\": @_\n";
-        exit(1);
-    }
-    return $mtpt;
-}
-
-no strict 'refs';
-
-sub find_obj {
-    my $type = shift;
-    my $key = shift;
-    my $value = shift;
-    my @objs = @_;
-
-    foreach my $obj (@objs) {
-        if ($obj->{$key} eq $value) {
-            return $obj;
-        }
-    }
-}
-
-sub lnet_options {
-    my $net = shift;
-
-    my $options_str = "options lnet networks=" . $net->{"nettype"} .
-                   " accept=all";
-    if (defined($net->{"port"})) {
-        $options_str .= " accept_port=" . $net->{"port"};
-    }
-    return $options_str;
-
-}
-
-# main
-
-my %objs;
-my @mgses;
-
-my $MOUNTPT = "/mnt";
-if (defined($ENV{"MOUNTPT"})) {
-    $MOUNTPT = $ENV{"MOUNTPT"};
-}
-
-while(<>) {
-    my @args = split;
-
-    for (my $i = 0; $i <= $#args; $i++) {
-        if ($args[$i] eq "--add") {
-            my $type = "$args[$i + 1]";
-            my $subref = "add_$type";
-            splice(@args, $i, 2);
-            push(@{$objs{$type}}, &$subref(@args));
-            last;
-        }
-        if ($i == $#args) {
-            print STDERR "I don't know how to handle @args\n";
-            exit(1);
-        }
-    }
-}
-
-# link lovs to mdses
-foreach my $lov (@{$objs{"lov"}}) {
-    my $mds = find_obj("mds", "mds", $lov->{"mds"}, @{$objs{"mds"}});
-    $mds->{"lov"} = $lov;
-}
-# XXX could find failover pairs of osts and mdts here and link them to
-# one another and then fill in their details in the csv generators below
-my $COUNT = 1;
-foreach my $mds (@{$objs{"mds"}}) {
-    # find the net for this node
-    my $net = find_obj("net", "node", $mds->{"node"}, @{$objs{"net"}});
-    my $lov = $mds->{"lov"};
-    my $mkfs_options="";
-    if (defined($lov->{"stripe_sz"})) {
-        $mkfs_options .= "lov.stripesize=" . $lov->{"stripe_sz"} . " ";
-    }
-    if (defined($lov->{"stripe_cnt"})) {
-        $mkfs_options .= "lov.stripecount=" . $lov->{"stripe_cnt"} . " ";
-    }
-    if (defined($lov->{"stripe_pattern"})) {
-        $mkfs_options .= "lov.stripetype=" . $lov->{"stripe_pattern"} . " ";
-    }
-    chop($mkfs_options);
-    if ($mkfs_options ne "") {
-        $mkfs_options = " --param=\"$mkfs_options\"";
-    }
-
-    if ($COUNT == 1) {
-        # mgs/mdt
-        printf "%s,%s,%s,$MOUNTPT/%s,mgs|mdt,,,,--device-size=%s --noformat%s,,noauto\n", 
-        $mds->{"node"},
-        lnet_options($net),
-        $mds->{"dev"},
-        $mds->{"mds"},
-        $mds->{"size"},
-        $mkfs_options;
-
-        push(@mgses, $net->{"nid"});
-    } else {
-        # mdt
-        printf "%s,%s,%s,$MOUNTPT/%s,mdt,,\"%s\",,--device-size=%s --noformat,,noauto\n",
-        $mds->{"node"},
-        lnet_options($net),
-        $mds->{"dev"},
-        $mds->{"mds"},
-        join(",", @mgses),
-        $mds->{"size"};
-    }
-    $COUNT++;
-}
-
-foreach my $ost (@{$objs{"ost"}}) {
-    # find the net for this node
-    my $mount_opts="noauto";
-    if (defined($ost->{"mountfsoptions"})) {
-        $mount_opts .= "," . $ost->{"mountfsoptions"};
-    }
-    my $net = find_obj("net", "node", $ost->{"node"}, @{$objs{"net"}});
-    printf "%s,%s,%s,$MOUNTPT/%s,ost,,\"%s\",,--device-size=%s --noformat,,\"%s\"\n", 
-    $ost->{"node"},
-    lnet_options($net),
-    $ost->{"dev"},
-    $ost->{"ost"},
-    join(",", @mgses),
-    $ost->{"size"},
-    $mount_opts;
-}
diff --git a/lustre/scripts/lustre b/lustre/scripts/lustre
deleted file mode 100755
index c2248a1444cf716458e794fc3616fa8e6ed5cf14..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustre
+++ /dev/null
@@ -1,243 +0,0 @@
-#!/bin/sh
-#
-# lustre   This shell script takes care of starting and stopping Lustre
-#
-# chkconfig: - 99 1
-# description: Lustre Lite network File System.
-#              This starts both Lustre client and server functions.
-# processname: lconf
-# config: /etc/lustre/config.xml
-# pidfile: /var/run/lustre.pid
-### BEGIN INIT INFO
-# Provides: lustre
-# Required-Start: $network +sshd
-# Required-Stop: $network
-# Should-Start:
-# Should-Stop:
-# Default-Start: 
-# Default-Stop: 0 1 2 3 4 5 6
-# Short-Description: Lustre Lite network File System.
-# Description: This starts both Lustre client and server functions.
-### END INIT INFO
-
-
-SERVICE=${0##*/}
-
-: ${LUSTRE_CFG:=/etc/lustre/lustre.cfg}
-[ -f ${LUSTRE_CFG} ] && . ${LUSTRE_CFG}
-[ -f /etc/sysconfig/lustre ] && . /etc/sysconfig/lustre
-
-: ${LUSTRE_CONFIG_XML:=/etc/lustre/config.xml}
-: ${LCONF:=lconf}
-: ${LCTL:=lctl}
-# Some distros use modprobe.conf.local
-if [ -f /etc/modprobe.conf.local ]; then
-   : ${MODPROBE_CONF:=/etc/modprobe.conf.local}
-else
-   : ${MODPROBE_CONF:=/etc/modprobe.conf}
-fi
-# Be sure the proper directories are in PATH. 
-export PATH="/sbin:$PATH"
-
-case "$SERVICE" in
-    [SK][[:digit:]][[:digit:]]lustre | lustre)
-        SERVICE="lustre"
-	: ${LCONF_START_ARGS:="${LUSTRE_CONFIG_XML}"}
-	: ${LCONF_STOP_ARGS:="--force --cleanup ${LUSTRE_CONFIG_XML}"}
-	;;
-    *)
-	: ${LCONF_START_ARGS:="--group ${SERVICE} --select ${SERVICE}=${HOSTNAME} ${LUSTRE_CONFIG_XML}"}
-	: ${LCONF_STOP_ARGS:="--group ${SERVICE} --select ${SERVICE}=${HOSTNAME} --failover --cleanup ${LUSTRE_CONFIG_XML}"}
-	;;
-esac
-LOCK=/var/lock/subsys/$SERVICE
-
-# Source function library.
-if [ -f /etc/init.d/functions ] ; then
-	. /etc/init.d/functions
-fi
-
-# Source networking configuration.
-if [ -f /etc/sysconfig/network ] ; then
-	. /etc/sysconfig/network
-fi
-
-check_start_stop() {
-	# Exit codes now LSB compliant
-	# Check that networking is up. - exit 'not running'
-	[ "${NETWORKING}" = "no" ] && exit 7 
-
-	# exit 'not installed' 
-	[ -x ${LCONF} -a -x ${LCTL} ] || exit 5
-
-	if [ ${LUSTRE_CONFIG_XML:0:1} = "/" ] ; then
-			if [ ! -f ${LUSTRE_CONFIG_XML} ] ; then
-			echo "${0##*/}: Configuration file ${LUSTRE_CONFIG_XML} not found; skipping."
-			# exit 'not configured'
-			exit 6
-		fi
-	fi
-
-	# Create /var/lustre directory 
-	# This is used by snmp agent for checking lustre services
-	#    status online/offline/online pending/offline pending.
-
-	[ -d ${STATUS_DIR:=/var/lustre} ] || mkdir -p $STATUS_DIR
-	STATUS=${STATUS_DIR}/sysStatus
-}
-
-start() {
-	if [ -x "/usr/sbin/clustat" -a "${SERVICE}" = "lustre" ] ; then
-		if [ ! -f "/etc/lustre/start-despite-clumanager" ] ; then
-		cat >&2 <<EOF
-This script was run directly, which can be dangerous if you are using
-clumanager to manage Lustre services.
-
-If you are not using clumanager for Lustre services, run the following
-command to have this script start Lustre instead:
-
-touch /etc/lustre/start-despite-clumanager
-EOF
-		RETVAL=6  # program not configured
-		return
-	    fi
-	fi
-	check_start_stop
-	echo -n "Starting $SERVICE: "
-	if [ $UID -ne 0 ]; then
-		echo "Lustre should be started as root"
-		RETVAL=4 # insufficent privileges
-		return
-	fi
-	# Cat the modprobe file and place all lines that follow a trailing backslash on the same line
-	ROUTER=`cat ${MODPROBE_CONF} | sed ':a;N;$!ba;s#\\\[:space:]*\\n##g' | grep lnet | grep forwarding=\"enabled\"`
-	if [[ ! -z ${ROUTER} ]]; then
-		modprobe lnet
-		${LCTL} network configure
-	else
-		${LCONF} ${LCONF_START_ARGS}
-	fi
-	RETVAL=$?
-	echo $SERVICE
-	if [ $RETVAL -eq 0 ]; then
-		touch $LOCK
-		echo "online" >$STATUS
-	else
-		echo "online pending" >$STATUS
-	fi
-}
-
-stop() {
-	check_start_stop
-	echo -n "Shutting down $SERVICE: "
-	if [ $UID -ne 0 ]; then
-		echo "Lustre should be stopped as root"
-		RETVAL=4 # insufficent privileges
-		return
-	fi
-	# Cat the modprobe file and place all lines that follow a trailing backslash on the same line
-	ROUTER=`cat ${MODPROBE_CONF} | sed ':a;N;$!ba;s#\\\[:space:]*\\n##g' | grep lnet | grep forwarding=\"enabled\"`
-	if [[ ! -z ${ROUTER} ]]; then
-		MODULE_LOADED=`lsmod | awk ' { print $1 } ' | grep lnet`
-		if [[ ! -z ${MODULE_LOADED} ]]; then
-			${LCTL} network unconfigure
-		fi
-		${LCTL} modules | awk '{ print $2 }' | xargs rmmod >/dev/null 2>&1
-		# do it again, in case we tried to unload ksocklnd too early
-		${LCTL} modules | awk '{ print $2 }' | xargs rmmod
-
-	else
-		${LCONF} ${LCONF_STOP_ARGS}
-	fi
-	RETVAL=$?
-	echo $SERVICE
-	rm -f $LOCK 
-	if [ $RETVAL -eq 0 ]; then
-		echo "offline" >$STATUS
-	else
-		echo "offline pending" >$STATUS
-	fi
-}
-
-restart() {
-	stop
-	start
-}
-
-status() {
-	STATE="stopped"
-	# LSB compliance - return 3 if service is not running
-	# Lustre-specific returns
-	# 150 - partial startup
-	# 151 - health_check unhealthy
-	# 152 - LBUG
-	RETVAL=3
-	egrep -q "libcfs|lvfs|portals" /proc/modules && STATE="loaded"
-
-	# check for any routes - on a portals router this is the only thing
-	[ "`cat /proc/sys/lnet/routes 2> /dev/null`" ] && STATE="running" && RETVAL=0
-	
-	# check for any configured devices (may indicate partial startup)
-	if [ -d /proc/fs/lustre ]; then
-		[ "`cat /proc/fs/lustre/devices 2> /dev/null`" ] && STATE="partial" && RETVAL=150
-
-		# check for either a server or a client filesystem
-		MDS="`ls /proc/fs/lustre/mds/*/recovery_status 2> /dev/null`"
-		OST="`ls /proc/fs/lustre/obdfilter/*/recovery_status 2> /dev/null`"
-		LLITE="`ls /proc/fs/lustre/llite/fs* 2> /dev/null`"
-		[ "$MDS" -o "$OST" -o "$LLITE" ] && STATE="running" && RETVAL=0
-	else
-		# check if this is a router
-		if [ -d /proc/sys/lnet ]; then
-			ROUTER="`cat /proc/sys/lnet/routes | head -1 | grep -i -c \"Routing enabled\"`"
-			if [[ ! -z ${ROUTER} && ${ROUTER} -ge 1 ]]; then
-				STATE="running"
-				RETVAL=0
-			fi
-		fi
-	fi
-
-	# check for server disconnections 
-	DISCON="`grep -v FULL /proc/fs/lustre/*c/*/*server_uuid 2> /dev/null`"
-	[ "$DISCON" ] && STATE="disconnected" && RETVAL=0
-
-	# check for servers in recovery
-	[ "$MDS$OST" ] && grep -q RECOV $MDS $OST && STATE="recovery" && RETVAL=0
-
-	# check for error in health_check
-	HEALTH="/proc/fs/lustre/health_check"
-	[ -f "$HEALTH" ] && grep -q "NOT HEALTHY" $HEALTH && STATE="unhealthy" && RETVAL=151
-
-	# check for LBUG
-	[ -f  "$HEALTH" ] && grep -q "LBUG" $HEALTH && STATE="LBUG" && RETVAL=152
-
-	# If Lustre is up , check if the service really exists
-        # Skip this is we are not checking a specific service
-	if [ $RETVAL -eq 0 ] && [ $SERVICE != 'lustre' ]; then
-		DUMMY=$( $LCTL dl | grep "$SERVICE")
-		[ $? -ne 0 ] && STATE="not_found" && RETVAL=3
-	fi
-
-	echo $STATE
-}
-
-# See how we were called.
-case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  restart)
-	restart
-	;;
-  status)
-	status $SERVICE
-	;;
-  *)
-	echo "Usage: $SERVICE {start|stop|restart|status}"
-	exit 1
-esac
-
-exit $RETVAL
diff --git a/lustre/scripts/lustre_config.in b/lustre/scripts/lustre_config.in
deleted file mode 100644
index 3fb13e81e4ed00a0e0c57b834f2c43fa4ac460c2..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustre_config.in
+++ /dev/null
@@ -1,1220 +0,0 @@
-#!/bin/bash
-
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-#
-# lustre_config - format and set up multiple lustre servers from a csv file
-#
-# This script is used to parse each line of a spreadsheet (csv file) and 
-# execute remote commands to format (mkfs.lustre) every Lustre target 
-# that will be part of the Lustre cluster.
-# 
-# In addition, it can also verify the network connectivity and hostnames in 
-# the cluster, configure Linux MD/LVM devices and produce High-Availability
-# software configurations for Heartbeat or CluManager.
-#
-################################################################################
-
-# Usage
-usage() {
-    cat >&2 <<EOF
-
-Usage:  `basename $0` [options] <csv file>
-
-    This script is used to format and set up multiple lustre servers from a
-    csv file.
-
-    Options:
-    -h          help and examples
-    -a          select all the nodes from the csv file to operate on
-    -w hostname,hostname,...
-                select the specified list of nodes (separated by commas) to
-                operate on rather than all the nodes in the csv file
-    -x hostname,hostname,...
-                exclude the specified list of nodes (separated by commas)
-    -t HAtype   produce High-Availability software configurations
-                The argument following -t is used to indicate the High-
-                Availability software type. The HA software types which 
-                are currently supported are: hbv1 (Heartbeat version 1)
-                and hbv2 (Heartbeat version 2).
-    -n          no net - don't verify network connectivity and hostnames
-                in the cluster
-    -d          configure Linux MD/LVM devices before formatting the
-                Lustre targets
-    -f          force-format the Lustre targets using --reformat option
-    -m          no fstab change - don't modify /etc/fstab to add the new
-                Lustre targets
-                If using this option, then the value of "mount options"
-                item in the csv file will be passed to mkfs.lustre, else
-                the value will be added into the /etc/fstab.
-    -u          upgrade Lustre targets from 1.4 to 1.6
-    -v          verbose mode
-    csv file    a spreadsheet that contains configuration parameters
-                (separated by commas) for each target in a Lustre cluster
-
-EOF
-    exit 1
-}
-
-# Samples 
-sample() {
-    cat <<EOF
-
-This script is used to parse each line of a spreadsheet (csv file) and 
-execute remote commands to format (mkfs.lustre) every Lustre target 
-that will be part of the Lustre cluster.
-
-It can also optionally: 
- * upgrade Lustre targets from 1.4 to 1.6
- * verify the network connectivity and hostnames in the cluster
- * configure Linux MD/LVM devices
- * modify /etc/modprobe.conf to add Lustre networking info
- * add the Lustre server info to /etc/fstab
- * produce configurations for Heartbeat or CluManager.
-
-There are 5 kinds of line formats in the csv file. They represent the following 
-targets:
-1) Linux MD device
-The format is:
-hostname,MD,md name,operation mode,options,raid level,component devices
-
-hostname            hostname of the node in the cluster
-MD                  marker of MD device line
-md name             MD device name, e.g. /dev/md0
-operation mode      create or remove, default is create
-options             a "catchall" for other mdadm options, e.g. "-c 128"
-raid level          raid level: 0,1,4,5,6,10,linear and multipath
-component devices   block devices to be combined into the MD device
-                    Multiple devices are separated by space or by using
-                    shell expansions, e.g. "/dev/sd{a,b,c}"
-
-2) Linux LVM PV (Physical Volume)
-The format is:
-hostname,PV,pv names,operation mode,options
-
-hostname            hostname of the node in the cluster
-PV                  marker of PV line
-pv names            devices or loopback files to be initialized for later
-                    use by LVM or to be wiped the label, e.g. /dev/sda
-                    Multiple devices or files are separated by space or by
-                    using shell expansions, e.g. "/dev/sd{a,b,c}"
-operation mode      create or remove, default is create
-options             a "catchall" for other pvcreate/pvremove options
-                    e.g. "-vv"
-
-3) Linux LVM VG (Volume Group)
-The format is:
-hostname,VG,vg name,operation mode,options,pv paths
-
-hostname            hostname of the node in the cluster
-VG                  marker of VG line
-vg name             name of the volume group, e.g. ost_vg
-operation mode      create or remove, default is create
-options             a "catchall" for other vgcreate/vgremove options
-                    e.g. "-s 32M"
-pv paths            physical volumes to construct this VG, required by
-                    create mode
-                    Multiple PVs are separated by space or by using
-                    shell expansions, e.g. "/dev/sd[k-m]1"
-
-4) Linux LVM LV (Logical Volume)
-The format is:
-hostname,LV,lv name,operation mode,options,lv size,vg name
-
-hostname            hostname of the node in the cluster
-LV                  marker of LV line
-lv name             name of the logical volume to be created (optional)
-                    or path of the logical volume to be removed (required
-                    by remove mode)
-operation mode      create or remove, default is create
-options             a "catchall" for other lvcreate/lvremove options
-                    e.g. "-i 2 -I 128"
-lv size             size [kKmMgGtT] to be allocated for the new LV
-                    Default unit is megabytes.
-vg name             name of the VG in which the new LV will be created
-
-5) Lustre target
-The format is:
-hostname,module_opts,device name,mount point,device type,fsname,mgs nids,index,
-format options,mkfs options,mount options,failover nids
-
-hostname            hostname of the node in the cluster, must match "uname -n"
-module_opts         Lustre networking module options
-device name         Lustre target (block device or loopback file)
-mount point         Lustre target mount point
-device type         Lustre target type (mgs, mdt, ost, mgs|mdt, mdt|mgs)
-fsname              Lustre filesystem name, should be limited to 8 characters 
-                    Default is "lustre".
-mgs nids            NID(s) of remote mgs node, required for mdt and ost targets
-                    If this item is not given for an mdt, it is assumed that
-                    the mdt will also be an mgs, according to mkfs.lustre.
-index               Lustre target index
-format options      a "catchall" contains options to be passed to mkfs.lustre
-                    "--device-size", "--param", etc. all goes into this item.
-mkfs options        format options to be wrapped with --mkfsoptions="" and
-                    passed to mkfs.lustre
-mount options       If this script is invoked with "-m" option, then the value of
-                    this item will be wrapped with --mountfsoptions="" and passed
-                    to mkfs.lustre, else the value will be added into /etc/fstab.
-failover nids       NID(s) of failover partner node
-
-All the NIDs in one node are delimited by commas (','). When multiple nodes are
-specified, they are delimited by a colon (':').
-
-Items left blank will be set to defaults.
-
-Example 1 - Simple, with combo MGS/MDT:
--------------------------------------------------------------------------------
-# combo mdt/mgs
-lustre-mgs,options lnet networks=tcp,/tmp/mgs,/mnt/mgs,mgs|mdt,,,,--device-size=10240
-
-# ost0
-lustre-ost,options lnet networks=tcp,/tmp/ost0,/mnt/ost0,ost,,lustre-mgs@tcp0,,--device-size=10240
-
-# ost1
-lustre-ost,options lnet networks=tcp,/tmp/ost1,/mnt/ost1,ost,,lustre-mgs@tcp0,,--device-size=10240
--------------------------------------------------------------------------------
-
-Example 2 - Separate MGS/MDT, two networks interfaces:
--------------------------------------------------------------------------------
-# mgs
-lustre-mgs1,options lnet 'networks="tcp,elan"',/dev/sda,/mnt/mgs,mgs,,,,--quiet --param="sys.timeout=50",,"defaults,noauto","lustre-mgs2,2@elan"
-
-# mdt
-lustre-mdt1,options lnet 'networks="tcp,elan"',/dev/sdb,/mnt/mdt,mdt,lustre2,"lustre-mgs1,1@elan:lustre-mgs2,2@elan",,--quiet --param="lov.stripesize=4194304",-J size=16,"defaults,noauto",lustre-mdt2
-
-# ost
-lustre-ost1,options lnet 'networks="tcp,elan"',/dev/sdc,/mnt/ost,ost,lustre2,"lustre-mgs1,1@elan:lustre-mgs2,2@elan",,--quiet,-I 512,"defaults,noauto",lustre-ost2
--------------------------------------------------------------------------------
-
-Example 3 - with combo MGS/MDT failover pair and OST failover pair:
--------------------------------------------------------------------------------
-# combo mgs/mdt
-lustre-mgs1,options lnet networks=tcp,/tmp/mgs,/mnt/mgs,mgs|mdt,,,,--quiet --device-size=10240,,,lustre-mgs2@tcp0
-
-# combo mgs/mdt backup (--noformat)
-lustre-mgs2,options lnet networks=tcp,/tmp/mgs,/mnt/mgs,mgs|mdt,,,,--quiet --device-size=10240 --noformat,,,lustre-mgs1@tcp0
-
-# ost
-lustre-ost1,options lnet networks=tcp,/tmp/ost1,/mnt/ost1,ost,,"lustre-mgs1@tcp0:lustre-mgs2@tcp0",,--quiet --device-size=10240,,,lustre-ost2@tcp0
-
-# ost backup (--noformat) (note different device name)
-lustre-ost2,options lnet networks=tcp,/tmp/ost2,/mnt/ost2,ost,,"lustre-mgs1@tcp0:lustre-mgs2@tcp0",,--quiet --device-size=10240 --noformat,,,lustre-ost1@tcp0
--------------------------------------------------------------------------------
-
-Example 4 - Configure Linux MD/LVM devices before formatting Lustre targets:
--------------------------------------------------------------------------------
-# MD device on mgsnode
-mgsnode,MD,/dev/md0,,-q,1,/dev/sda1 /dev/sdb1
-
-# MD/LVM devices on ostnode
-ostnode,MD,/dev/md0,,-q -c 128,5,"/dev/sd{a,b,c}"
-ostnode,MD,/dev/md1,,-q -c 128,5,"/dev/sd{d,e,f}"
-ostnode,PV,/dev/md0 /dev/md1
-ostnode,VG,ost_vg,,-s 32M,/dev/md0 /dev/md1
-ostnode,LV,ost0,,-i 2 -I 128,300G,ost_vg
-ostnode,LV,ost1,,-i 2 -I 128,300G,ost_vg
-
-# combo mgs/mdt
-mgsnode,options lnet networks=tcp,/dev/md0,/mnt/mgs,mgs|mdt,,,,--quiet
-
-# ost0
-ostnode,options lnet networks=tcp,/dev/ost_vg/ost0,/mnt/ost0,ost,,mgsnode,,--quiet
-
-# ost1
-ostnode,options lnet networks=tcp,/dev/ost_vg/ost1,/mnt/ost1,ost,,mgsnode,,--quiet
--------------------------------------------------------------------------------
-
-EOF
-    exit 0
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-#***************************** Global variables *****************************#
-declare -a MGS_NODENAME             # node names of the MGS servers
-declare -a MGS_IDX                  # indexes of MGSs in the global arrays
-declare -i MGS_NUM                  # number of MGS servers in the cluster
-declare -i INIT_IDX
-
-declare -a NODE_NAMES               # node names in the failover group
-declare -a TARGET_OPTS              # target services in one failover group
-
-# All the items in the csv file
-declare -a HOST_NAME MODULE_OPTS DEVICE_NAME MOUNT_POINT DEVICE_TYPE FS_NAME
-declare -a MGS_NIDS INDEX FORMAT_OPTIONS MKFS_OPTIONS MOUNT_OPTIONS FAILOVERS
-
-# Heartbeat software requires that node names in the configuration directive
-# must (normally) match the "uname -n" of that machine. Since the value of the
-# "failover nids" field in the csv file is the NID(s) of failover partner node,
-# we have to figure out the corresponding hostname of that node.
-declare -a FAILOVERS_NAMES
-
-VERIFY_CONNECT=true
-CONFIG_MD_LVM=false
-MODIFY_FSTAB=true
-UPGRADE_TARGET=false
-VERBOSE_OUTPUT=false
-# Get and check the positional parameters
-while getopts "aw:x:t:ndfmuhv" OPTION; do
-    case $OPTION in
-    a)
-        [ -z "${SPECIFIED_NODELIST}" ] && [ -z "${EXCLUDED_NODELIST}" ] \
-        && USE_ALLNODES=true
-        NODELIST_OPT="${NODELIST_OPT} -a"
-        ;;
-    w)
-        USE_ALLNODES=false
-        SPECIFIED_NODELIST=$OPTARG
-        NODELIST_OPT="${NODELIST_OPT} -w ${SPECIFIED_NODELIST}"
-        ;;
-    x)
-        USE_ALLNODES=false
-        EXCLUDED_NODELIST=$OPTARG
-        NODELIST_OPT="${NODELIST_OPT} -x ${EXCLUDED_NODELIST}"
-        ;;
-    t)
-        HATYPE_OPT=$OPTARG
-        if [ "${HATYPE_OPT}" != "${HBVER_HBV1}" ] \
-        && [ "${HATYPE_OPT}" != "${HBVER_HBV2}" ] \
-        && [ "${HATYPE_OPT}" != "${HATYPE_CLUMGR}" ]; then
-            echo >&2 $"`basename $0`: Invalid HA software type" \
-                      "- ${HATYPE_OPT}!"
-            usage
-        fi
-        ;;
-    n)
-        VERIFY_CONNECT=false
-        ;;
-    d)
-        CONFIG_MD_LVM=true
-        ;;
-    f)
-        REFORMAT_OPTION=$"--reformat "
-        ;;
-    m)
-        MODIFY_FSTAB=false
-        ;;
-    u)
-        UPGRADE_TARGET=true 
-        ;;
-    h)
-        sample
-        ;;
-    v)
-        VERBOSE_OPT=$" -v"
-        VERBOSE_OUTPUT=true
-        ;;
-    ?)
-        usage 
-    esac
-done
-
-# Toss out the parameters we've already processed
-shift  `expr $OPTIND - 1`
-
-# Here we expect the csv file
-if [ $# -eq 0 ]; then
-    echo >&2 $"`basename $0`: Missing csv file!"
-    usage
-fi
-
-# Check the items required for OSTs, MDTs and MGS
-#
-# When formatting an OST, the following items: hostname, module_opts,
-# device name, device type and mgs nids, cannot have null value.
-#
-# When formatting an MDT or MGS, the following items: hostname,
-# module_opts, device name and device type, cannot have null value.
-check_item() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 $"`basename $0`: check_item() error: Missing argument"\
-                  "for function check_item()!"
-        return 1
-    fi
-
-    declare -i i=$1
-
-    # Check hostname, module_opts, device name and device type
-    if [ -z "${HOST_NAME[i]}" ]||[ -z "${MODULE_OPTS[i]}" ]\
-    ||[ -z "${DEVICE_NAME[i]}" ]||[ -z "${DEVICE_TYPE[i]}" ]; then
-        echo >&2 $"`basename $0`: check_item() error: Some required"\
-                  "item has null value! Check hostname, module_opts,"\
-                  "device name and device type!"
-        return 1
-    fi
-
-    # Check mgs nids
-    if [ "${DEVICE_TYPE[i]}" = "ost" ]&&[ -z "${MGS_NIDS[i]}" ]; then
-        echo >&2 $"`basename $0`: check_item() error: OST's mgs nids"\
-                  "item has null value!"
-        return 1
-    fi
-
-    # Check mount point
-    if [ -z "${MOUNT_POINT[i]}" ]; then
-        echo >&2 $"`basename $0`: check_item() error: mount"\
-                  "point item of target ${DEVICE_NAME[i]} has null value!"
-        return 1
-    fi
-
-    return 0
-}
-
-# Get the number of MGS nodes in the cluster
-get_mgs_num() {
-    INIT_IDX=0
-    MGS_NUM=${#MGS_NODENAME[@]}
-    [ -z "${MGS_NODENAME[0]}" ] && let "INIT_IDX += 1" \
-    && let "MGS_NUM += 1"
-}
-
-# is_mgs_node hostname
-# Verify whether @hostname is a MGS node
-is_mgs_node() {
-    local host_name=$1
-    declare -i i
-
-    get_mgs_num
-    for ((i = ${INIT_IDX}; i < ${MGS_NUM}; i++)); do
-        [ "${MGS_NODENAME[i]}" = "${host_name}" ] && return 0
-    done
-
-    return 1
-}
-
-# Check whether the MGS nodes are in the same failover group
-check_mgs_group() {
-    declare -i i
-    declare -i j
-    declare -i idx
-    local mgs_node
-
-    get_mgs_num
-    for ((i = ${INIT_IDX}; i < ${MGS_NUM}; i++)); do
-        mgs_node=${MGS_NODENAME[i]}
-        for ((j = ${INIT_IDX}; j < ${MGS_NUM}; j++)); do
-          [ "${MGS_NODENAME[j]}" = "${mgs_node}" ] && continue 1
-
-          idx=${MGS_IDX[j]}
-          if [ "${FAILOVERS_NAMES[idx]#*$mgs_node*}" = "${FAILOVERS_NAMES[idx]}" ]
-          then
-            echo >&2 $"`basename $0`: check_mgs_group() error:"\
-            "MGS node ${mgs_node} is not in the ${HOST_NAME[idx]}"\
-            "failover group!"
-            return 1
-          fi
-        done
-    done
-
-    return 0
-}
-
-# Get and check MGS servers.
-# There should be no more than one MGS specified in the entire csv file.
-check_mgs() {
-    declare -i i
-    declare -i j
-    declare -i exp_idx    # Index of explicit MGS servers
-    declare -i imp_idx    # Index of implicit MGS servers
-    local is_exp_mgs is_imp_mgs
-    local mgs_node
-
-    # Initialize the MGS_NODENAME and MGS_IDX arrays
-    unset MGS_NODENAME
-    unset MGS_IDX
-
-    exp_idx=1
-    imp_idx=1
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        is_exp_mgs=false
-        is_imp_mgs=false
-
-        # Check whether this node is an explicit MGS node 
-        # or an implicit one
-        if [ "${DEVICE_TYPE[i]#*mgs*}" != "${DEVICE_TYPE[i]}" ]; then
-            verbose_output "Explicit MGS target" \
-            "${DEVICE_NAME[i]} in host ${HOST_NAME[i]}."
-            is_exp_mgs=true
-        fi
-
-        if [ "${DEVICE_TYPE[i]}" = "mdt" -a -z "${MGS_NIDS[i]}" ]; then
-            verbose_output "Implicit MGS target" \
-            "${DEVICE_NAME[i]} in host ${HOST_NAME[i]}."
-            is_imp_mgs=true
-        fi
-
-        # Get and check MGS servers
-        if ${is_exp_mgs} || ${is_imp_mgs}; then
-            # Check whether more than one MGS target in one MGS node
-            if is_mgs_node ${HOST_NAME[i]}; then
-                echo >&2 $"`basename $0`: check_mgs() error:"\
-                "More than one MGS target in the same node -"\
-                "\"${HOST_NAME[i]}\"!"
-                return 1
-            fi
-
-            # Get and check primary MGS server and backup MGS server        
-            if [ "${FORMAT_OPTIONS[i]}" = "${FORMAT_OPTIONS[i]#*noformat*}" ]
-            then
-                # Primary MGS server
-                if [ -z "${MGS_NODENAME[0]}" ]; then
-                    if [ "${is_exp_mgs}" = "true" -a ${imp_idx} -gt 1 ] \
-                    || [ "${is_imp_mgs}" = "true" -a ${exp_idx} -gt 1 ]; then
-                        echo >&2 $"`basename $0`: check_mgs() error:"\
-                        "There exist both explicit and implicit MGS"\
-                        "targets in the csv file!"
-                        return 1
-                    fi
-                    MGS_NODENAME[0]=${HOST_NAME[i]}
-                    MGS_IDX[0]=$i
-                else
-                    mgs_node=${MGS_NODENAME[0]}
-                    if [ "${FAILOVERS_NAMES[i]#*$mgs_node*}" = "${FAILOVERS_NAMES[i]}" ]
-                    then
-                        echo >&2 $"`basename $0`: check_mgs() error:"\
-                        "More than one primary MGS nodes in the csv" \
-                        "file - ${MGS_NODENAME[0]} and ${HOST_NAME[i]}!"
-                    else
-                        echo >&2 $"`basename $0`: check_mgs() error:"\
-                        "MGS nodes ${MGS_NODENAME[0]} and ${HOST_NAME[i]}"\
-                        "are failover pair, one of them should use"\
-                        "\"--noformat\" in the format options item!"
-                    fi
-                    return 1
-                fi
-            else    # Backup MGS server
-                if [ "${is_exp_mgs}" = "true" -a ${imp_idx} -gt 1 ] \
-                || [ "${is_imp_mgs}" = "true" -a ${exp_idx} -gt 1 ]; then
-                    echo >&2 $"`basename $0`: check_mgs() error:"\
-                    "There exist both explicit and implicit MGS"\
-                    "targets in the csv file!"
-                    return 1
-                fi
-
-                if ${is_exp_mgs}; then # Explicit MGS
-                    MGS_NODENAME[exp_idx]=${HOST_NAME[i]}
-                    MGS_IDX[exp_idx]=$i
-                    exp_idx=$(( exp_idx + 1 ))
-                else    # Implicit MGS
-                    MGS_NODENAME[imp_idx]=${HOST_NAME[i]}
-                    MGS_IDX[imp_idx]=$i
-                    imp_idx=$(( imp_idx + 1 ))
-                fi
-            fi
-        fi #End of "if ${is_exp_mgs} || ${is_imp_mgs}"
-    done
-
-    # Check whether the MGS nodes are in the same failover group
-    if ! check_mgs_group; then
-        return 1
-    fi
-
-    return 0
-}
-
-# Construct the command line of mkfs.lustre
-construct_mkfs_cmdline() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 $"`basename $0`: construct_mkfs_cmdline() error:"\
-                  "Missing argument for function construct_mkfs_cmdline()!"
-        return 1
-    fi
-
-    declare -i i=$1
-    local mgsnids mgsnids_str
-    local failnids failnids_str
-
-    if $UPGRADE_TARGET; then
-        MKFS_CMD="$TUNEFS --writeconf"
-    else
-        MKFS_CMD="$MKFS $REFORMAT_OPTION"
-    fi
-
-    case "${DEVICE_TYPE[i]}" in
-    "ost")
-        MKFS_CMD="$MKFS_CMD --ost"
-        ;;
-    "mdt")
-        MKFS_CMD="$MKFS_CMD --mdt"
-        ;;
-    "mgs")
-        MKFS_CMD="$MKFS_CMD --mgs"
-        ;;
-    "mdt|mgs" | "mgs|mdt")
-        MKFS_CMD="$MKFS_CMD --mgs --mdt"
-        ;;
-    *)
-        echo >&2 $"`basename $0`: construct_mkfs_cmdline() error:"\
-                  "Invalid device type - \"${DEVICE_TYPE[i]}\"!"
-        return 1
-        ;;
-    esac
-
-    if [ -n "${FS_NAME[i]}" ]; then
-        MKFS_CMD="$MKFS_CMD --fsname=${FS_NAME[i]}"
-    fi
-
-    if [ -n "${MGS_NIDS[i]}" ]; then
-        mgsnids_str=${MGS_NIDS[i]}
-        for mgsnids in ${mgsnids_str//:/ }; do
-            MKFS_CMD="$MKFS_CMD --mgsnode=$mgsnids"
-        done
-    fi
-
-    if [ -n "${INDEX[i]}" ]; then
-        MKFS_CMD="$MKFS_CMD --index=${INDEX[i]}"
-    fi
-
-    if [ -n "${FORMAT_OPTIONS[i]}" ]; then
-        MKFS_CMD="$MKFS_CMD ${FORMAT_OPTIONS[i]}"
-    fi
-
-    if ! $UPGRADE_TARGET && [ -n "${MKFS_OPTIONS[i]}" ]; then
-        MKFS_CMD="$MKFS_CMD --mkfsoptions=\"${MKFS_OPTIONS[i]}\""
-    fi
-
-    if [ -n "${MOUNT_OPTIONS[i]}" ] && ! $MODIFY_FSTAB; then
-        MKFS_CMD="$MKFS_CMD --mountfsoptions=\"${MOUNT_OPTIONS[i]}\""
-    fi
-
-    if [ -n "${FAILOVERS[i]}" ]; then
-        failnids_str=${FAILOVERS[i]}
-        for failnids in ${failnids_str//:/ }; do
-            MKFS_CMD="$MKFS_CMD --failnode=$failnids"
-        done
-    fi
-
-    MKFS_CMD="$MKFS_CMD ${DEVICE_NAME[i]}"
-    return 0
-} 
-
-# Get all the node names in this failover group
-get_nodenames() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 $"`basename $0`: get_nodenames() error: Missing"\
-                  "argument for function get_nodenames()!"
-        return 1
-    fi
-
-    declare -i i=$1
-    declare -i idx
-    local nids
-
-    # Initialize the NODE_NAMES array
-    unset NODE_NAMES
-
-    NODE_NAMES[0]=${HOST_NAME[i]}
-
-    idx=1
-    for nids in ${FAILOVERS_NAMES[i]//:/ }
-    do
-        NODE_NAMES[idx]=$(nids2hostname ${nids})
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "${NODE_NAMES[idx]}"
-            return 1
-        fi
-    
-        idx=$idx+1
-    done
-
-    return 0
-}
-
-# Verify whether the format line has HA items
-is_ha_line() {
-    declare -i i=$1
-
-    [ -n "${FAILOVERS[i]}" ] && return 0
-
-    return 1
-}
-
-# Produce HA software's configuration files
-gen_ha_config() {
-    declare -i i=$1
-    declare -i idx
-    local  cmd_line
-
-    # Prepare parameters
-    # Hostnames option
-    HOSTNAME_OPT=${HOST_NAME[i]}
-
-    if ! get_nodenames $i; then
-        echo >&2 $"`basename $0`: gen_ha_config() error: Can not get the"\
-        "failover nodenames from failover nids - \"${FAILOVERS[i]}\" in"\
-        "the \"${HOST_NAME[i]}\" failover group!"
-        return 1
-    fi
-
-    for ((idx = 1; idx < ${#NODE_NAMES[@]}; idx++)); do
-        HOSTNAME_OPT=${HOSTNAME_OPT}$":"${NODE_NAMES[idx]}
-    done
-
-    # Target devices option
-    DEVICE_OPT=" -d "${TARGET_OPTS[0]}
-    for ((idx = 1; idx < ${#TARGET_OPTS[@]}; idx++)); do
-        DEVICE_OPT=${DEVICE_OPT}" -d "${TARGET_OPTS[idx]}
-    done
-
-    # Construct the generation script command line
-    case "${HATYPE_OPT}" in
-    "${HBVER_HBV1}"|"${HBVER_HBV2}")    # Heartbeat 
-        cmd_line=${GEN_HB_CONFIG}$" -r ${HATYPE_OPT} -n ${HOSTNAME_OPT}"
-        cmd_line=${cmd_line}${DEVICE_OPT}${VERBOSE_OPT}
-        ;;
-    "${HATYPE_CLUMGR}")                 # CluManager
-        cmd_line=${GEN_CLUMGR_CONFIG}$" -n ${HOSTNAME_OPT}"
-        cmd_line=${cmd_line}${DEVICE_OPT}${VERBOSE_OPT}
-        ;;
-    esac
-    
-    # Execute script to generate HA software's configuration files
-    verbose_output "Generating HA software's configurations in"\
-               "${HOST_NAME[i]} failover group..."
-    verbose_output "${cmd_line}"
-    eval $(echo "${cmd_line}")
-    if [ ${PIPESTATUS[0]} -ne 0 ]; then
-        return 1
-    fi
-    verbose_output "Generate HA software's configurations in"\
-               "${HOST_NAME[i]} failover group OK"
-    
-    return 0
-}
-
-# Configure HA software
-config_ha() {
-    if $UPGRADE_TARGET || [ -z "${HATYPE_OPT}" ]; then
-        return 0
-    fi
-
-    declare -i i j k
-    declare -i prim_idx         # Index for PRIM_HOSTNAMES array
-    declare -i target_idx       # Index for TARGET_OPTS and HOST_INDEX arrays
-
-    declare -a PRIM_HOSTNAMES   # Primary hostnames in all the failover
-                                # groups in the lustre cluster
-    declare -a HOST_INDEX       # Indices for the same node in all the 
-                                # format lines in the csv file
-    local prim_host
-
-    # Initialize the PRIM_HOSTNAMES array
-    prim_idx=0
-    unset PRIM_HOSTNAMES
-
-    # Get failover groups and generate HA configuration files
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        prim_host=${HOST_NAME[i]}
-
-        for ((j = 0; j < ${#PRIM_HOSTNAMES[@]}; j++)); do
-            [ "${prim_host}" = "${PRIM_HOSTNAMES[j]}" ] && continue 2
-        done
-
-        target_idx=0
-        unset HOST_INDEX
-        unset TARGET_OPTS
-        for ((k = 0; k < ${#HOST_NAME[@]}; k++)); do
-            if [ "${prim_host}" = "${HOST_NAME[k]}" ] && is_ha_line "${k}"
-            then
-                HOST_INDEX[target_idx]=$k
-                TARGET_OPTS[target_idx]=${DEVICE_NAME[k]}:${MOUNT_POINT[k]}
-                target_idx=$(( target_idx + 1 ))
-            fi
-        done
-
-        if [ ${#TARGET_OPTS[@]} -ne 0 ]; then
-            PRIM_HOSTNAMES[prim_idx]=${prim_host}
-            prim_idx=$(( prim_idx + 1 ))
-
-            if ! gen_ha_config ${HOST_INDEX[0]}; then
-                return 1
-            fi
-        fi
-    done
-
-    if [ ${#PRIM_HOSTNAMES[@]} -eq 0 ]; then
-        verbose_output "There are no \"failover nids\" items in the"\
-        "csv file. No HA configuration files are generated!"
-    fi
-
-    rm -rf ${TMP_DIRS}
-    return 0
-}
-
-# Get all the items in the csv file and do some checks.
-get_items() {
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 $"`basename $0`: get_items() error: Missing argument"\
-                  "for function get_items()!"
-        return 1
-    fi
-
-    CSV_FILE=$1
-    local LINE
-    local marker
-    local hostname
-    declare -i line_num=0
-    declare -i idx=0
-
-    exec 9< ${CSV_FILE}
-    while read -u 9 -r LINE; do
-        line_num=${line_num}+1
-        # verbose_output "Parsing line ${line_num}: $LINE"
-
-        # Get rid of the empty line
-        if [ -z "`echo ${LINE}|awk '/[[:alnum:]]/ {print $0}'`" ]; then
-            continue
-        fi
-
-        # Get rid of the comment line
-        if [ -z "`echo \"${LINE}\" | egrep -v \"([[:space:]]|^)#\"`" ]
-        then
-            continue
-        fi
-
-        # Skip the Linux MD/LVM line
-        marker=$(echo ${LINE} | cut -d, -f 2)
-        if [ "${marker}" = "${MD_MARKER}" -o "${marker}" = "${PV_MARKER}" ] \
-        || [ "${marker}" = "${VG_MARKER}" -o "${marker}" = "${LV_MARKER}" ]; then
-            continue
-        fi
-
-        # Skip the host which is not specified in the host list
-        if ! ${USE_ALLNODES}; then
-            hostname=$(echo ${LINE} | cut -d, -f 1)
-            ! host_in_hostlist ${hostname} ${NODES_TO_USE} && continue
-        fi
-
-        # Parse the config line into CONFIG_ITEM
-        if ! parse_line "$LINE"; then
-            echo >&2 $"`basename $0`: parse_line() error: Occurred"\
-                  "on line ${line_num} in ${CSV_FILE}: $LINE"
-            return 1    
-        fi
-
-        HOST_NAME[idx]=${CONFIG_ITEM[0]}
-        MODULE_OPTS[idx]=${CONFIG_ITEM[1]}
-        DEVICE_NAME[idx]=${CONFIG_ITEM[2]}
-        MOUNT_POINT[idx]=${CONFIG_ITEM[3]}
-        DEVICE_TYPE[idx]=${CONFIG_ITEM[4]}
-        FS_NAME[idx]=${CONFIG_ITEM[5]}
-        MGS_NIDS[idx]=${CONFIG_ITEM[6]}
-        INDEX[idx]=${CONFIG_ITEM[7]}
-        FORMAT_OPTIONS[idx]=${CONFIG_ITEM[8]}
-        MKFS_OPTIONS[idx]=${CONFIG_ITEM[9]}
-        MOUNT_OPTIONS[idx]=${CONFIG_ITEM[10]}
-        FAILOVERS[idx]=${CONFIG_ITEM[11]}
-
-        MODULE_OPTS[idx]=`echo "${MODULE_OPTS[idx]}" | sed 's/"/\\\"/g'`
-
-        # Convert IP addresses in NIDs to hostnames
-        FAILOVERS_NAMES[idx]=$(ip2hostname_multi_node ${FAILOVERS[idx]})
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "${FAILOVERS_NAMES[idx]}"
-            return 1
-        fi
-
-        # Check some required items for formatting target
-        if ! check_item $idx; then
-            echo >&2 $"`basename $0`: check_item() error:"\
-                  "Occurred on line ${line_num} in ${CSV_FILE}."
-            return 1    
-        fi
-
-        idx=${idx}+1
-    done
-
-    return 0
-}
-
-# check_lnet_connect hostname_index mgs_hostname
-# Check whether the target node can contact the MGS node @mgs_hostname
-# If @mgs_hostname is null, then it means the primary MGS node
-check_lnet_connect() {
-    declare -i i=$1
-    local mgs_node=$2
-
-    local COMMAND RET_STR
-    local mgs_prim_nids
-    local nids_str=
-    local mgs_nid 
-    local ping_mgs
-
-    # Execute remote command to check that 
-    # this node can contact the MGS node
-    verbose_output "Checking lnet connectivity between" \
-    "${HOST_NAME[i]} and the MGS node ${mgs_node}"
-    mgs_prim_nids=`echo ${MGS_NIDS[i]} | awk -F: '{print $1}'`
-
-    if [ -z "${mgs_node}" -o $MGS_NUM -eq 1 ]; then
-        nids_str=${mgs_prim_nids}    # nids of primary MGS node
-        if [ -z "${nids_str}" ]; then
-            echo >&2 $"`basename $0`: check_lnet_connect() error:"\
-            "Check the mgs nids item of host ${HOST_NAME[i]}!"\
-            "Missing nids of the primary MGS node!"
-            return 1
-        fi
-    else
-        # Get the corresponding NID(s) of the MGS node ${mgs_node}
-        # from the "mgs nids" field
-        nids_str=$(get_mgs_nids ${mgs_node} ${MGS_NIDS[i]})
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "${nids_str}"
-            return 1
-        fi
-    fi
-
-    ping_mgs=false
-    for mgs_nid in ${nids_str//,/ }
-    do
-        COMMAND=$"${LCTL} ping ${mgs_nid} 5 || echo failed 2>&1"
-        RET_STR=$(${REMOTE} ${HOST_NAME[i]} "${COMMAND}" 2>&1)
-        if [ ${PIPESTATUS[0]} -eq 0 -a "${RET_STR}" = "${RET_STR#*failed*}" ]
-        then
-            # This node can contact the MGS node
-            verbose_output "${HOST_NAME[i]} can contact the MGS" \
-            "node ${mgs_node} by using nid \"${mgs_nid}\"!"
-            ping_mgs=true
-            break
-        fi
-    done
-
-    if ! ${ping_mgs}; then
-        echo >&2 "`basename $0`: check_lnet_connect() error:" \
-        "${HOST_NAME[i]} cannot contact the MGS node ${mgs_node}"\
-        "with nids - \"${nids_str}\"! Check ${LCTL} command!"
-        return 1
-    fi
-
-    return 0
-}
-
-# Start lnet network in the cluster node and check that 
-# this node can contact the MGS node
-check_lnet() {
-    if ! ${VERIFY_CONNECT}; then
-        return 0
-    fi
-
-    # Check argument
-    if [ $# -eq 0 ]; then
-        echo >&2 $"`basename $0`: check_lnet() error: Missing"\
-              "argument for function check_lnet()!"
-        return 1
-    fi
-
-    declare -i i=$1
-    declare -i j
-    local COMMAND RET_STR
-
-    # Execute remote command to start lnet network
-    verbose_output "Starting lnet network in ${HOST_NAME[i]}"
-    COMMAND="PATH=\$PATH:/sbin:/usr/sbin modprobe lnet; ${LCTL} network up 2>&1"
-    RET_STR=$(${REMOTE} ${HOST_NAME[i]} "${COMMAND}" 2>&1)
-    if [ ${PIPESTATUS[0]} -ne 0 -o "${RET_STR}" = "${RET_STR#*LNET configured*}" ]
-    then
-        echo >&2 "`basename $0`: check_lnet() error: remote" \
-                 "${HOST_NAME[i]} error: ${RET_STR}"
-        return 1
-    fi
-
-    if is_mgs_node ${HOST_NAME[i]}; then
-        return 0
-    fi
-
-    # Execute remote command to check that 
-    # this node can contact the MGS node
-    for ((j = 0; j < ${MGS_NUM}; j++)); do
-        if ! check_lnet_connect $i ${MGS_NODENAME[j]}; then
-            return 1
-        fi
-    done
-
-    return 0
-}
-
-# Start lnet network in the MGS node
-start_mgs_lnet() {
-    declare -i i
-    declare -i idx
-    local COMMAND
-
-    if [ -z "${MGS_NODENAME[0]}" -a  -z "${MGS_NODENAME[1]}" ]; then
-        if ${USE_ALLNODES}; then
-            verbose_output "There is no MGS target in the ${CSV_FILE} file."
-        else
-            verbose_output "There is no MGS target in the node list \"${NODES_TO_USE}\"."
-        fi
-        return 0
-    fi
-
-    for ((i = ${INIT_IDX}; i < ${MGS_NUM}; i++)); do
-        # Execute remote command to add lnet options lines to 
-        # the MGS node's modprobe.conf/modules.conf
-        idx=${MGS_IDX[i]}
-        COMMAND=$"echo \"${MODULE_OPTS[${idx}]}\"|${MODULE_CONFIG}"
-        verbose_output "Adding lnet module options to ${MGS_NODENAME[i]}"
-        ${REMOTE} ${MGS_NODENAME[i]} "${COMMAND}" >&2 
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "`basename $0`: start_mgs_lnet() error:"\
-                 "Failed to execute remote command to" \
-                 "add module options to ${MGS_NODENAME[i]}!"\
-                 "Check ${MODULE_CONFIG}!"
-            return 1
-        fi
-
-        # Start lnet network in the MGS node
-        if ! check_lnet ${idx}; then
-            return 1    
-        fi
-    done
-
-    return 0
-}
-
-# Execute remote command to add lnet options lines to remote nodes'
-# modprobe.conf/modules.conf and format(mkfs.lustre) Lustre targets
-mass_config() {
-    local COMMAND
-    declare -a REMOTE_PID 
-    declare -a REMOTE_CMD 
-    declare -i pid_num=0
-    declare -i i=0
-
-    if [ ${#HOST_NAME[@]} -eq 0 ]; then
-        verbose_output "There are no lustre targets specified."
-        return 0
-    fi
-
-    if ! $UPGRADE_TARGET; then
-        # Start lnet network in the MGS node
-        start_mgs_lnet || return 1    
-    fi
-
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        # Construct the command line of mkfs.lustre
-        if ! construct_mkfs_cmdline $i; then
-            return 1    
-        fi
-
-        # create the mount point on the node
-        COMMAND="mkdir -p ${MOUNT_POINT[i]}"
-        verbose_output "Creating the mount point ${MOUNT_POINT[i]} on" \
-                       "${HOST_NAME[i]}"
-        ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2 
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "`basename $0`: mass_config() error:"\
-                 "Failed to execute remote command to"\
-                 "create the mountpoint on ${HOST_NAME[i]}!"
-            return 1
-        fi
-
-        if ! $UPGRADE_TARGET && ! is_mgs_node ${HOST_NAME[i]}; then
-            # Execute remote command to add lnet options lines to 
-            # modprobe.conf/modules.conf
-            COMMAND=$"echo \"${MODULE_OPTS[i]}\"|${MODULE_CONFIG}"
-            verbose_output "Adding lnet module options to" \
-                       "${HOST_NAME[i]}"
-            ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2 
-            if [ ${PIPESTATUS[0]} -ne 0 ]; then
-                echo >&2 "`basename $0`: mass_config() error:"\
-                     "Failed to execute remote command to"\
-                     "add module options to ${HOST_NAME[i]}!"
-                return 1
-            fi
-
-            # Check lnet networks
-            if ! check_lnet $i; then
-                return 1    
-            fi
-        fi
-
-        # Execute remote command to format or upgrade Lustre target
-        local OP
-        $UPGRADE_TARGET && OP="Upgrading" || OP="Formatting"
-        verbose_output "$OP Lustre target ${DEVICE_NAME[i]} on ${HOST_NAME[i]}..."
-
-        COMMAND="$EXPORT_PATH $MKFS_CMD"
-        REMOTE_CMD[$pid_num]="$REMOTE ${HOST_NAME[i]} \"$COMMAND\""
-        verbose_output "$OP command line is: ${REMOTE_CMD[$pid_num]}"
-
-        $REMOTE ${HOST_NAME[i]} "$COMMAND" &
-        REMOTE_PID[$pid_num]=$!
-        let pid_num=$pid_num+1
-        sleep 1
-    done
-
-    # Wait for the exit status of the background remote command
-    verbose_output "Waiting for the return of the remote command..."
-    fail_exit_status=false
-    for ((pid_num = 0; pid_num < ${#REMOTE_PID[@]}; pid_num++)); do
-        wait ${REMOTE_PID[${pid_num}]}
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "`basename $0`: mass_config() error: Failed"\
-            "to execute \"${REMOTE_CMD[${pid_num}]}\"!"
-            fail_exit_status=true
-        fi
-    done
-
-    if ${fail_exit_status}; then
-        return 1
-    fi    
-
-    verbose_output "Success on all Lustre targets!"
-    return 0
-}
-
-# get_mntopts hostname device_name failovers
-# Construct the mount options of Lustre target @device_name in host @hostname
-get_mntopts() {
-    local host_name=$1
-    local device_name=$2
-    local failovers=$3
-    local mnt_opts=
-    local ret_str
-
-    [ -n "${failovers}" ] && mnt_opts=defaults,noauto || mnt_opts=defaults
-
-    # Execute remote command to check whether the device
-    # is a block device or not
-    ret_str=$(${REMOTE} ${host_name} \
-            "[ -b ${device_name} ] && echo block || echo loop" 2>&1)
-    if [ ${PIPESTATUS[0]} -ne 0 -a -n "${ret_str}" ]; then
-        echo "`basename $0`: get_mntopts() error:" \
-        "remote command to ${host_name} error: ${ret_str}"
-        return 1
-    fi
-
-    if [ -z "${ret_str}" ]; then
-        echo "`basename $0`: get_mntopts() error: remote error:" \
-        "No results from remote!" \
-        "Check network connectivity between the local host and ${host_name}!"
-        return 1
-    fi
-
-    [ "${ret_str}" != "${ret_str#*loop}" ] && mnt_opts=${mnt_opts},loop
-
-    echo ${mnt_opts}
-    return 0
-}
-
-# Execute remote command to modify /etc/fstab to add the new Lustre targets
-modify_fstab() {
-    declare -i i
-    local mntent mntopts device_name
-    local COMMAND
-
-    if ! ${MODIFY_FSTAB}; then
-        return 0    
-    fi
-
-    for ((i = 0; i < ${#HOST_NAME[@]}; i++)); do
-        verbose_output "Modify /etc/fstab of host ${HOST_NAME[i]}"\
-                   "to add Lustre target ${DEVICE_NAME[i]}"
-        mntent=${DEVICE_NAME[i]}"\t\t"${MOUNT_POINT[i]}"\t\t"${FS_TYPE}
-
-        # Get mount options
-        if [ -n "${MOUNT_OPTIONS[i]}" ]; then
-            # The mount options already specified in the csv file.
-            mntopts=${MOUNT_OPTIONS[i]}
-        else
-            mntopts=$(get_mntopts ${HOST_NAME[i]} ${DEVICE_NAME[i]}\
-                    ${FAILOVERS[i]})
-            if [ ${PIPESTATUS[0]} -ne 0 ]; then
-                echo >&2 "${mntopts}"
-                return 1
-            fi
-        fi
-
-        mntent=${mntent}"\t"${mntopts}"\t"0" "0
-        verbose_output "`echo -e ${mntent}`"
-
-        # Execute remote command to modify /etc/fstab
-        device_name=${DEVICE_NAME[i]//\//\\/}
-        COMMAND=". @scriptlibdir@/lc_common; \
-                sed -i \"/^${device_name}\t/d\" \$(fcanon /etc/fstab); \
-                echo -e \"${mntent}\" >> \$(fcanon /etc/fstab)"
-        ${REMOTE} ${HOST_NAME[i]} "${COMMAND}" >&2
-        if [ ${PIPESTATUS[0]} -ne 0 ]; then
-            echo >&2 "`basename $0`: modify_fstab() error:"\
-            "Failed to modify /etc/fstab of host ${HOST_NAME[i]}"\
-            "to add Lustre target ${DEVICE_NAME[i]}!"
-            return 1
-        fi
-    done
-
-    return 0
-}
-
-# Main flow
-# Check the csv file
-if ! check_file $1; then
-    exit 1 
-fi
-
-# Get the list of nodes to be operated on
-NODES_TO_USE=$(get_nodelist)
-[ ${PIPESTATUS[0]} -ne 0 ] && echo >&2 "${NODES_TO_USE}" && exit 1
-
-# Check the node list
-check_nodelist ${NODES_TO_USE} || exit 1
-
-if ${VERIFY_CONNECT}; then
-# Check the network connectivity and hostnames
-    echo "`basename $0`: Checking the cluster network connectivity"\
-         "and hostnames..."
-    if ! ${VERIFY_CLUSTER_NET} ${NODELIST_OPT} ${VERBOSE_OPT} ${CSV_FILE}; then
-        exit 1
-    fi
-    echo "`basename $0`: Check the cluster network connectivity"\
-         "and hostnames OK!"
-    echo
-fi
-
-if $CONFIG_MD_LVM && ! $UPGRADE_TARGET; then
-# Configure Linux MD/LVM devices
-    echo "`basename $0`: Configuring Linux MD/LVM devices..."
-    if ! ${SCRIPT_CONFIG_MD} ${NODELIST_OPT} ${VERBOSE_OPT} ${CSV_FILE}; then
-        exit 1
-    fi
-
-    if ! ${SCRIPT_CONFIG_LVM} ${NODELIST_OPT} ${VERBOSE_OPT} ${CSV_FILE}; then
-        exit 1
-    fi
-    echo "`basename $0`: Configure Linux MD/LVM devices OK!"
-    echo
-fi
-
-# Configure the Lustre cluster
-echo "`basename $0`: ******** Lustre cluster configuration START ********"
-if ! get_items ${CSV_FILE}; then
-    exit 1
-fi
-
-if ! check_mgs; then
-    exit 1
-fi
-
-if ! mass_config; then
-    exit 1
-fi
-
-if ! modify_fstab; then
-    exit 1
-fi
-
-# Produce HA software's configuration files
-if ! config_ha; then
-    rm -rf ${TMP_DIRS}
-    exit 1
-fi
-
-echo "`basename $0`: ******** Lustre cluster configuration END **********"
-
-exit 0
diff --git a/lustre/scripts/lustre_createcsv.in b/lustre/scripts/lustre_createcsv.in
deleted file mode 100644
index 752f3cd635512089d3c035cafc37aab9783f40ad..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustre_createcsv.in
+++ /dev/null
@@ -1,2101 +0,0 @@
-#!/bin/bash
-#
-# lustre_createcsv - generate a csv file from a running lustre cluster
-#
-# This script is used to collect lustre target informations, linux MD/LVM device
-# informations and HA software configurations in a lustre cluster to generate a
-# csv file. In reverse, the csv file could be parsed by lustre_config to 
-# configure multiple lustre servers in parallel.
-#
-# This script should be run on the MGS node.
-#
-################################################################################
-
-# Usage
-usage() {
-	cat >&2 <<EOF
-
-Usage:	`basename $0` [-t HAtype] [-d] [-h] [-v] [-f csv_filename]
-
-	This script is used to collect lustre target informations, linux MD/LVM
-	device informations and HA software configurations from a running lustre
-	cluster to generate a csv file. It should be run on the MGS node.
-
-	-t HAtype	collect High-Availability software configurations
-			The argument following -t is used to indicate the High-
-			Availability software type. The HA software types which 
-			are currently supported are: hbv1 (Heartbeat version 1)
-			and hbv2 (Heartbeat version 2).
-	-d		collect linux MD/LVM device informations
-	-h		help
-	-v		verbose mode
-	-f csv_filename	designate a name for the csv file
-			Default is lustre_config.csv.
-
-EOF
-	exit 1
-}
-
-# Get the library of functions
-. @scriptlibdir@/lc_common
-
-#**************************** Global variables ****************************#
-# csv file
-LUSTRE_CSV_FILE=${LUSTRE_CSV_FILE:-"lustre_config.csv"}
-
-# Lustre proc files
-LUSTRE_PROC=${LUSTRE_PROC:-"/proc/fs/lustre"}
-LUSTRE_PROC_DEVICES=${LUSTRE_PROC}/devices
-
-LNET_PROC=${LNET_PROC:-"/proc/sys/lnet"}
-LNET_PROC_PEERS=${LNET_PROC}/peers
-
-# Default network module options
-DEFAULT_MOD_OPTS=${DEFAULT_MOD_OPTS:-"options lnet networks=tcp"}
-
-# Lustre target obd device types
-MGS_TYPE=${MGS_TYPE:-"mgs"}
-MDT_TYPE=${MDT_TYPE:-"mds"}
-OST_TYPE=${OST_TYPE:-"obdfilter"}
-
-# The obd name of MGS target server
-MGS_SVNAME=${MGS_SVNAME:-"MGS"}		
-
-# Hostnames of the lustre cluster nodes
-declare -a HOST_NAMES			
-MGS_HOSTNAME=${MGS_HOSTNAME:-"`hostname`"} # Hostname of the MGS node
-
-# Configs of lustre targets in one cluster node
-declare -a TARGET_CONFIGS		
-declare -a TARGET_SVNAMES TARGET_DEVNAMES TARGET_DEVSIZES TARGET_MNTPNTS
-declare -a TARGET_DEVTYPES TARGET_FSNAMES TARGET_MGSNIDS TARGET_INDEXES
-declare -a TARGET_FMTOPTS TARGET_MKFSOPTS TARGET_MNTOPTS TARGET_FAILNIDS
-declare -a HA_CONFIGS
-declare -a ALL_TARGET_SVNAMES		# All the target services in the cluster
-declare -a FAILOVER_FMTOPTS		# "--noformat"	
-
-# Informations of linux MD/LVM devices in one cluster node
-declare -a MD_NAME MD_LEVEL MD_DEVS	# MD
-declare -a VG_NAME VG_PVNAMES		# VG
-declare -a LV_NAME LV_SIZE LV_VGNAME	# LV
-
-# Lustre target service types
-let "LDD_F_SV_TYPE_MDT = 0x0001"
-let "LDD_F_SV_TYPE_OST = 0x0002"
-let "LDD_F_SV_TYPE_MGS = 0x0004"
-
-# Permanent mount options for ext3 or ldiskfs
-ALWAYS_MNTOPTS=${ALWAYS_MNTOPTS:-"errors=remount-ro"}
-MDT_MGS_ALWAYS_MNTOPTS=${MDT_MGS_ALWAYS_MNTOPTS:-",iopen_nopriv,user_xattr"}
-OST_ALWAYS_MNTOPTS=${OST_ALWAYS_MNTOPTS:-",asyncdel"}
-OST_DEFAULT_MNTOPTS=${OST_DEFAULT_MNTOPTS:-",extents,mballoc"}
-
-# User-settable parameter keys
-PARAM_MGSNODE=${PARAM_MGSNODE:-"mgsnode="}
-PARAM_FAILNODE=${PARAM_FAILNODE:-"failover.node="}
-
-# Block size
-L_BLOCK_SIZE=4096
-
-# Option string of mkfs.lustre
-OPTSTR_STRIPE_COUNT=${OPTSTR_STRIPE_COUNT:-"--stripe-count-hint="}
-
-
-# Get and check the positional parameters
-VERBOSE_OUTPUT=false
-GET_MDLVM_INFO=false
-while getopts "t:dhvf:" OPTION; do
-	case $OPTION in
-	t) 
-		HATYPE_OPT=$OPTARG
-		if [ "${HATYPE_OPT}" != "${HBVER_HBV1}" ] \
-		&& [ "${HATYPE_OPT}" != "${HBVER_HBV2}" ] \
-		&& [ "${HATYPE_OPT}" != "${HATYPE_CLUMGR}" ]; then
-			echo >&2 "`basename $0`: Invalid HA software type" \
-				 "- ${HATYPE_OPT}!"
-			usage
-		fi
-		;;
-	d)	GET_MDLVM_INFO=true;;
-	h)	usage;;
-	v) 	VERBOSE_OUTPUT=true;;
-	f)	LUSTRE_CSV_FILE=$OPTARG;;
-        ?) 	usage 
-	esac
-done
-
-# Verify the local host is the MGS node
-mgs_node() {
-	if [ ! -e ${LUSTRE_PROC_DEVICES} ]; then
-		echo >&2 "`basename $0`: error: ${LUSTRE_PROC_DEVICES} does" \
-			 "not exist. Lustre kernel modules may not be loaded!"
-		return 1
-	fi
-
-	if [ -z "`cat ${LUSTRE_PROC_DEVICES}`" ]; then
-		echo >&2 "`basename $0`: error: ${LUSTRE_PROC_DEVICES} is" \
-			 "empty. Lustre services may not be started!"
-		return 1
-	fi
-
-	if [ -z "`grep ${MGS_TYPE} ${LUSTRE_PROC_DEVICES}`" ]; then
-		echo >&2 "`basename $0`: error: This node is not a MGS node." \
-                         "The script should be run on the MGS node!"
-		return 1
-	fi
-
-	return 0
-}
-
-# get_hostnames
-# Get lustre cluster node names
-get_hostnames() {
-	declare -a HOST_NIDS
-	declare -i idx		# Index of HOST_NIDS array
-	declare -i i		# Index of HOST_NAMES array
-
-	if ! mgs_node; then
-		return 1
-	fi
-
-	if [ ! -e ${LNET_PROC_PEERS} ]; then
-		echo >&2 "`basename $0`: error: ${LNET_PROC_PEERS} does not" \
-                         "exist. LNET kernel modules may not be loaded" \
-			 "or LNET network may not be up!"
-		return 1
-	fi
-
-	HOST_NAMES[0]=${MGS_HOSTNAME} # MGS node
-	HOST_NIDS[0]=${HOST_NAMES[0]}
-
-	# Get the nids of the nodes which have contacted MGS
-	idx=1
-	for nid in `cat ${LNET_PROC_PEERS} | awk '{print $1}'`; do
-		if [ "${nid}" = "nid" ]; then
-			continue
-		fi
-
-		HOST_NIDS[idx]=${nid}
-		let "idx += 1"
-	done
-
-	if [ ${idx} -eq 1 ]; then
-		verbose_output "Only one node running in the lustre cluster." \
-			       "It's ${HOST_NAMES[0]}."
-		return 0		
-	fi
-
-	# Get the hostnames of the nodes
-	for ((idx = 1, i = 1; idx < ${#HOST_NIDS[@]}; idx++, i++)); do
-		if [ -z "${HOST_NIDS[idx]}" ]; then
-			echo >&2 "`basename $0`: get_hostnames() error:" \
-				 "Invalid nid - \"${HOST_NIDS[idx]}\"!"
-			return 1
-		fi
-
-		HOST_NAMES[i]=$(nid2hostname ${HOST_NIDS[idx]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${HOST_NAMES[i]}"
-			return 1
-		fi
-
-		if [ "${HOST_NAMES[i]}" = "${HOST_NAMES[0]}" ]; then
-			unset HOST_NAMES[i]
-			let "i -= 1"
-		fi
-	done
-
-	return 0
-}
-
-#********************** Linux MD/LVM device informations **********************#
-# get_md_configs hostname
-# Get all the active MD device informations from the node @hostname
-get_md_configs() {
-	declare -i i=0
-	declare -i j=0
-	local host_name=$1
-	local ret_line line first_item
-
-	# Initialize the arrays
-	unset MD_NAME
-	unset MD_LEVEL
-	unset MD_DEVS
-	
-	# Execute remote command to the node ${host_name} and get all the
-	# active MD device informations.
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-		first_item=`echo "${line}" | awk '{print $1}'`
-
-		# Get the MD device name and raid level
-		if [ "${first_item}" = "ARRAY" ]; then
-			MD_NAME[i]=`echo "${line}" | awk '{print $2}'`
-			MD_LEVEL[i]=`echo "${line}" | awk '{print $3}' | sed -e 's/level=//'`
-			let "j = i"
-			let "i += 1"
-		fi
-
-		# Get the MD component devices
-		if [ "${first_item}" != "${first_item#devices=}" ]; then
-			MD_DEVS[j]=`echo "${line}" | sed -e 's/devices=//' -e 's/,/ /g'`
-		fi
-        done < <(${REMOTE} ${host_name} "${MDADM} --detail --scan --verbose")
-
-	if [ $i -eq 0 ]; then
-		verbose_output "There are no active MD devices" \
-			       "in the host ${host_name}!"
-	fi
-
-	return 0
-}
-
-# get_pv_configs hostname
-# Get all the LVM PV informations from the node @hostname
-get_pv_configs() {
-	PV_NAMES=
-	local host_name=$1
-	local cmd ret_str
-
-	# Execute remote command to get all the PV informations.
-	cmd="${EXPORT_PATH} pvdisplay -c | awk -F: '{print \$1}' | xargs"
-	ret_str=`${REMOTE} ${host_name} "${cmd}" 2>&1`
-	if [ $? -ne 0 ]; then
-		if [ -n "${ret_str}" ]; then
-			echo >&2 "`basename $0`: get_pv_configs() error:" \
-			"remote command to ${host_name} error: ${ret_str}"
-		else
-			remote_error "get_pv_configs" ${host_name}
-		fi
-		return 1
-	fi
-
-	PV_NAMES=`echo "${ret_str}" | sed -e 's/^'${host_name}':[[:space:]]//'`
-	if [ -z "${PV_NAMES}" ]; then
-		verbose_output "There are no PVs in the host ${host_name}!"
-		return 0
-	fi
-
-	return 0
-}
-
-# get_vg_pvnames hostname vgname
-# Get the PVs contained in @vgname from the node @hostname
-get_vg_pvnames() {
-	local host_name=$1
-	local vg_name=$2
-	local pv_names=
-	local cmd ret_str
-
-	# Execute remote command to get the PV names.
-	cmd="${EXPORT_PATH} vgdisplay -v ${vg_name} 2>/dev/null\
-	     | grep \"PV Name\" | awk '{print \$3}' | xargs"
-	ret_str=`${REMOTE} ${host_name} "${cmd}" 2>&1`
-	if [ $? -ne 0 ]; then
-		if [ -n "${ret_str}" ]; then
-			echo "`basename $0`: get_vg_pvnames() error:" \
-			"remote command to ${host_name} error: ${ret_str}"
-		else
-			remote_error "get_vg_pvnames" ${host_name}
-		fi
-		return 1
-	fi
-
-	pv_names=`echo "${ret_str}" | sed -e 's/^'${host_name}':[[:space:]]//'`
-	if [ -z "${pv_names}" ]; then
-		echo "`basename $0`: get_vg_pvnames() error:" \
-		"There are no PVs in VG ${vg_name} in the host ${host_name}!"\
-		"Or VG ${vg_name} does not exist."
-		return 1
-	fi
-
-	echo "${pv_names}"
-	return 0
-}
-
-# get_vg_configs hostname
-# Get all the LVM VG informations from the node @hostname
-get_vg_configs() {
-	declare -i i=0
-	local host_name=$1
-	local cmd ret_str
-	local vg_name
-
-	# Initialize the arrays
-	unset VG_NAME
-	unset VG_PVNAMES
-
-	# Execute remote command to get all the VG names.
-	cmd="${EXPORT_PATH} vgdisplay \
-	     | grep \"VG Name\" | awk '{print \$3}' | xargs"
-	ret_str=`${REMOTE} ${host_name} "${cmd}" 2>&1`
-	if [ $? -ne 0 ]; then
-		if [ -n "${ret_str}" ]; then
-			echo >&2 "`basename $0`: get_vg_configs() error:" \
-			"remote command to ${host_name} error: ${ret_str}"
-		else
-			remote_error "get_vg_configs" ${host_name}
-		fi
-		return 1
-	fi
-
-	if [ -z "${ret_str}" ] \
-	|| [ "${ret_str}" != "${ret_str#*No volume groups found*}" ]; then
-		verbose_output "There are no VGs in the host ${host_name}!"
-		return 0
-	fi
-
-	# Get all the VG informations
-	for vg_name in `echo "${ret_str}" | sed -e 's/^'${host_name}'://'`; do
-		VG_NAME[i]=${vg_name}
-		VG_PVNAMES[i]=$(get_vg_pvnames ${host_name} ${VG_NAME[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${VG_PVNAMES[i]}"
-			return 1
-		fi
-		let "i += 1"
-	done
-
-	return 0
-}
-
-# get_lv_configs hostname
-# Get all the LVM LV informations from the node @hostname
-get_lv_configs() {
-	declare -i i=0
-	local host_name=$1
-	local ret_line line
-
-	# Initialize the arrays
-	unset LV_NAME
-	unset LV_SIZE
-	unset LV_VGNAME
-
-	# Execute remote command to get all the LV informations.
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-		[ "${line}" != "${line#*volume group*}" ] && break
-
-		LV_NAME[i]=`echo "${line}" | awk -F: '{print $1}' | sed -e 's/.*\///g'`
-		LV_VGNAME[i]=`echo "${line}" | awk -F: '{print $2}'`
-		LV_SIZE[i]=`echo "${line}" | awk -F: '{print $7}' | sed -e 's/.*/&K/'`
-
-		let "i += 1"
-        done < <(${REMOTE} ${host_name} "${EXPORT_PATH} lvdisplay -c")
-
-	if [ $i -eq 0 ]; then
-		verbose_output "There are no LVs in the host ${host_name}"
-	fi
-
-	return 0
-}
-
-#*************************** Network module options ***************************#
-# last_is_backslash line
-# Check whether the last effective letter of @line is a backslash
-last_is_backslash() {
-	local line="$*"
-	declare -i i
-	declare -i length
-	local letter last_letter
-
-	length=${#line}
-	for ((i = ${length}-1; i >= 0; i--)); do
-		letter=${line:${i}:1}
-        	[ "x${letter}" != "x " -a "x${letter}" != "x	" -a -n "${letter}" ]\
-		&& last_letter=${letter} && break
-	done
-
-	[ "x${last_letter}" = "x\\" ] && return 0
-
-	return 1
-}
-
-# get_module_opts hostname
-# Get the network module options from the node @hostname 
-get_module_opts() {
-	local host_name=$1
-	local ret_str
-	local MODULE_CONF KERNEL_VER
-	local ret_line line find_options
-	local continue_flag
-
-	MODULE_OPTS=${DEFAULT_MOD_OPTS}
-
-	# Execute remote command to get the kernel version
-	ret_str=`${REMOTE} ${host_name} "uname -r" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo >&2 "`basename $0`: get_module_opts() error:" \
-			 "remote command error: ${ret_str}"
-		return 1
-	fi
-	remote_error "get_module_opts" ${host_name} "${ret_str}" && return 1
-
-	if is_pdsh; then
-		KERNEL_VER=`echo ${ret_str} | awk '{print $2}'`
-	else
-		KERNEL_VER=`echo ${ret_str} | awk '{print $1}'`
-	fi
-
-	# Get the module configuration file name
-	if [ "${KERNEL_VER:0:3}" = "2.4" ]; then
-        	MODULE_CONF=/etc/modules.conf
-	else
-        	MODULE_CONF=/etc/modprobe.conf
-	fi
-
-	# Execute remote command to get the lustre network module options
-	continue_flag=false
-	find_options=false
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-		# Get rid of the comment line
-		[ -z "`echo \"${line}\"|egrep -v \"^#\"`" ] && continue
-
-		if [ "${line}" != "${line#*options lnet*}" ]; then
-			if ! ${find_options}; then
-				find_options=true
-				MODULE_OPTS=${line}
-			else
-				MODULE_OPTS=${MODULE_OPTS}$" \n "${line}
-			fi
-
-			last_is_backslash "${line}" && continue_flag=true \
-			|| continue_flag=false
-			continue
-		fi	
-
-		if ${continue_flag}; then
-			MODULE_OPTS=${MODULE_OPTS}$" \n "${line}
-			! last_is_backslash "${line}" && continue_flag=false
-
-		fi
-        done < <(${REMOTE} ${host_name} "cat ${MODULE_CONF}")
-
-	if [ -z "${MODULE_OPTS}" ]; then
-		MODULE_OPTS=${DEFAULT_MOD_OPTS}
-	fi
-
-	return 0
-}
-
-#************************ HA software configurations ************************#
-# is_ha_target hostname target_devname
-# Check whether the target @target_devname was made to be high-available
-is_ha_target() {
-	local host_name=$1
-	local target_svname=$2
-	local res_file
-	local ret_str
-
-	case "${HATYPE_OPT}" in
-	"${HBVER_HBV1}")	res_file=${HA_RES};;
-	"${HBVER_HBV2}")	res_file=${HA_CIB};;
-	"${HATYPE_CLUMGR}")	res_file=${CLUMAN_CONFIG};;
-	esac
-
-	# Execute remote command to check the resource file
-	ret_str=`${REMOTE} ${host_name} \
-		"grep ${target_svname} ${res_file}" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo >&2 "`basename $0`: is_ha_target() error:" \
-			 "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	[ "${ret_str}" = "${ret_str#*${target_svname}*}" ] && return 1
-
-	return 0
-}
-
-# get_hb_configs hostname
-# Get the Heartbeat configurations from the node @hostname
-get_hb_configs() {
-	local host_name=$1
-	local ret_line line
-	declare -i i
-
-	unset HA_CONFIGS
-	HB_CHANNELS=
-	SRV_IPADDRS=
-	HB_OPTIONS=
-
-	# Execute remote command to get the configs of Heartbeat channels, etc
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-                # Get rid of the comment line
-                [ -z "`echo \"${line}\"|egrep -v \"^#\"`" ] && continue
-
-		if [ "${line}" != "${line#*serial*}" ] \
-		|| [ "${line}" != "${line#*cast*}" ]; then
-			if [ -z "${HB_CHANNELS}" ]; then
-				HB_CHANNELS=${line}
-			else
-				HB_CHANNELS=${HB_CHANNELS}:${line}
-			fi
-		fi
-
-		if [ "${line}" != "${line#*stonith*}" ] \
-		|| [ "${line}" != "${line#*ping*}" ] \
-		|| [ "${line}" != "${line#*respawn*}" ] \
-		|| [ "${line}" != "${line#*apiauth*}" ] \
-		|| [ "${line}" != "${line#*compression*}" ]; then
-			if [ -z "${HB_OPTIONS}" ]; then
-				HB_OPTIONS=${line}
-			else
-				HB_OPTIONS=${HB_OPTIONS}:${line}
-			fi
-		fi
-        done < <(${REMOTE} ${host_name} "cat ${HA_CF}")
-
-	if [ -z "${HB_CHANNELS}" ]; then
-		echo >&2 "`basename $0`: get_hb_configs() error:" \
-			 "There are no heartbeat channel configs in ${HA_CF}" \
-			 "of host ${host_name} or ${HA_CF} does not exist!"
-		return 0
-	fi
-
-	# Execute remote command to get Heartbeat service address
-	if [ "${HATYPE_OPT}" = "${HBVER_HBV1}" ]; then
-		while read -r ret_line; do
-			if is_pdsh; then
-                		set -- ${ret_line}
-				shift
-				line="$*"
-			else
-				line="${ret_line}"
-			fi
-
-			# Get rid of the empty line
-                	[ -z "`echo ${line}|awk '/[[:alnum:]]/ {print $0}'`" ]\
-                        && continue
-
-                	# Get rid of the comment line
-                	[ -z "`echo \"${line}\"|egrep -v \"^#\"`" ] && continue
-
-			SRV_IPADDRS=`echo ${line} | awk '{print $2}'`
-			[ -n "${SRV_IPADDRS}" ] \
-			&& [ "`echo ${line} | awk '{print $1}'`" = "${host_name}" ] && break
-        	done < <(${REMOTE} ${host_name} "cat ${HA_RES}")
-	
-		if [ -z "${SRV_IPADDRS}" ]; then
-			echo >&2 "`basename $0`: get_hb_configs() error: There"\
-			 	 "are no service address in ${HA_RES} of host"\
-			 	 "${host_name} or ${HA_RES} does not exist!"
-			return 0
-		fi
-	fi
-
-	# Construct HA configuration items 
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		[ -z "${TARGET_DEVNAMES[i]}" ] && continue
-
-		# Execute remote command to check whether this target service 
-		# was made to be high-available
-		if is_ha_target ${host_name} ${TARGET_DEVNAMES[i]}; then
-			HA_CONFIGS[i]=${HB_CHANNELS},${SRV_IPADDRS},${HB_OPTIONS}
-		fi
-	done
-
-	return 0
-}
-
-# get_cluman_channel hostname
-# Get the Heartbeat channel of CluManager from the node @hostname
-get_cluman_channel() {
-	local host_name=$1
-	local ret_line line
-	local cluman_channel=
-	local mcast_ipaddr
-
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-		if [ "${line}" != "${line#*broadcast*}" ] \
-		&& [ "`echo ${line}|awk '{print $3}'`" = "yes" ]; then
-			cluman_channel="broadcast"
-			break
-		fi
-
-		if [ "${line}" != "${line#*multicast_ipaddress*}" ]; then
-			mcast_ipaddr=`echo ${line}|awk '{print $3}'`
-			if [ "${mcast_ipaddr}" != "225.0.0.11" ]; then
-				cluman_channel="multicast ${mcast_ipaddr}"
-				break
-			fi
-		fi
-        done < <(${REMOTE} ${host_name} "${CONFIG_CMD} --clumembd")
-
-	echo ${cluman_channel}
-	return 0
-}
-
-# get_cluman_srvaddr hostname target_svname
-# Get the service IP addresses of @target_svname from the node @hostname 
-get_cluman_srvaddr() {
-	local host_name=$1
-	local target_svname=$2
-	local ret_line line
-	local srvaddr cluman_srvaddr=
-
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-		if [ "${line}" != "${line#*ipaddress = *}" ]; then
-			srvaddr=`echo ${line}|awk '{print $3}'`
-			if [ -z "${cluman_srvaddr}" ]; then
-				cluman_srvaddr=${srvaddr}			
-			else
-				cluman_srvaddr=${cluman_srvaddr}:${srvaddr}
-			fi
-		fi
-        done < <(${REMOTE} ${host_name} "${CONFIG_CMD} \
-		--service=${target_svname} --service_ipaddresses")
-
-	if [ -z "${cluman_srvaddr}" ]; then
-		echo "`basename $0`: get_cluman_srvaddr() error: Cannot" \
-		"get the service IP addresses of ${target_svname} in" \
-		"${host_name}! Check ${CONFIG_CMD} command!"
-		return 1
-	fi
-
-	echo ${cluman_srvaddr}
-	return 0
-}
-
-# get_cluman_configs hostname
-# Get the CluManager configurations from the node @hostname
-get_cluman_configs() {
-	local host_name=$1
-	local ret_str
-	declare -i i
-
-	unset HA_CONFIGS
-
-	# Execute remote command to get the configs of CluManager
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		HB_CHANNELS=
-		SRV_IPADDRS=
-		HB_OPTIONS=
-		[ -z "${TARGET_DEVNAMES[i]}" ] && continue
-
-		# Execute remote command to check whether this target service 
-		# was made to be high-available
-		! is_ha_target ${host_name} ${TARGET_DEVNAMES[i]} && continue
-
-		# Execute remote command to get Heartbeat channel
-		HB_CHANNELS=$(get_cluman_channel ${host_name})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${HB_CHANNELS}"
-		fi
-
-		# Execute remote command to get service IP address 
-		SRV_IPADDRS=$(get_cluman_srvaddr ${host_name} \
-			      ${TARGET_SVNAMES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${SRV_IPADDRS}"
-			return 0
-		fi
-
-		HA_CONFIGS[i]=${HB_CHANNELS},${SRV_IPADDRS},${HB_OPTIONS}
-	done
-
-	return 0
-}
-
-# get_ha_configs hostname
-# Get the HA software configurations from the node @hostname
-get_ha_configs() {
-	local host_name=$1
-
-	unset HA_CONFIGS
-
-	if [ -z "${HATYPE_OPT}" ]; then
-		return 0
-	fi
-
-	verbose_output "Collecting HA software configurations from host $1..."
-
-	case "${HATYPE_OPT}" in
-	"${HBVER_HBV1}" | "${HBVER_HBV2}") # Heartbeat
-		if ! get_hb_configs ${host_name}; then
-			return 1
-		fi
-		;;
-	"${HATYPE_CLUMGR}") # CluManager
-		if ! get_cluman_configs ${host_name}; then
-			return 1
-		fi
-		;;
-	esac
-
-	return 0
-}
-
-#*********************** Lustre targets configurations ***********************#
-
-# is_failover_service target_svname
-# Check whether a target service @target_svname is a failover service.
-is_failover_service() {
-	local target_svname=$1
-	declare -i i
-
-	for ((i = 0; i < ${#ALL_TARGET_SVNAMES[@]}; i++)); do
-		[ "${target_svname}" = "${ALL_TARGET_SVNAMES[i]}" ] && return 0
-	done
-
-	return 1
-}
-
-# get_svnames hostname
-# Get the lustre target server obd names from the node @hostname
-get_svnames(){
-	declare -i i
-	declare -i j
-	local host_name=$1
-	local ret_line line
-
-        # Initialize the TARGET_SVNAMES array
-	unset TARGET_SVNAMES
-	unset FAILOVER_FMTOPTS
-	
-	# Execute remote command to the node @hostname and figure out what
-	# lustre services are running.
-	i=0
-	j=${#ALL_TARGET_SVNAMES[@]}
-	while read -r ret_line; do
-		if is_pdsh; then
-                	set -- ${ret_line}
-			shift
-			line="$*"
-		else
-			line="${ret_line}"
-		fi
-
-		if [ -z "`echo ${line} | grep ${MGS_TYPE}`" ] \
-		&& [ -z "`echo ${line} | grep ${MDT_TYPE}`" ] \
-		&& [ -z "`echo ${line} | grep ${OST_TYPE}`" ]; then
-			continue
-		fi
-
-		# Get target server name
-		TARGET_SVNAMES[i]=`echo ${line} | awk '{print $4}'`
-		if [ -n "${TARGET_SVNAMES[i]}" ]; then
-			if is_failover_service ${TARGET_SVNAMES[i]}; then
-				FAILOVER_FMTOPTS[i]="--noformat"
-			fi
-			ALL_TARGET_SVNAMES[j]=${TARGET_SVNAMES[i]}
-			let "i += 1"
-			let "j += 1"
-		else
-			echo >&2 "`basename $0`: get_svnames() error: Invalid"\
-			      "line in ${host_name}'s ${LUSTRE_PROC_DEVICES}"\
-			      "- \"${line}\"!"
-			return 1
-		fi
-        done < <(${REMOTE} ${host_name} "cat ${LUSTRE_PROC_DEVICES}")
-
-	if [ $i -eq 0 ]; then
-		verbose_output "There are no lustre services running" \
-			       "on the node ${host_name}!"
-	fi
-
-	return 0
-} 
-
-# is_loopdev devname
-# Check whether a device @devname is a loop device or not
-is_loopdev() {
-	local devname=$1
-
-	if [ -z "${devname}" ] || \
-	[ -z "`echo ${devname}|awk '/\/dev\/loop[[:digit:]]/ {print $0}'`" ]
-	then
-		return 1
-	fi
-
-	return 0
-}
-
-# get_devname hostname svname
-# Get the device name of lustre target @svname from node @hostname
-get_devname() {
-	local host_name=$1
-	local target_svname=$2
-	local target_devname=
-	local ret_str
-	local target_type target_obdtype mntdev_file
-
-	if [ "${target_svname}" = "${MGS_SVNAME}" ]; then
-		# Execute remote command to get the device name of mgs target
-		ret_str=`${REMOTE} ${host_name} \
-			"/sbin/findfs LABEL=${target_svname}" 2>&1`
-		if [ $? -ne 0 -a -n "${ret_str}" ]; then
-			if [ "${ret_str}" = "${ret_str#*Unable to resolve*}" ]
-			then
-				echo "`basename $0`: get_devname() error:" \
-			     	     "remote command error: ${ret_str}"
-				return 1
-			fi
-		fi
-
-		if [ "${ret_str}" = "${ret_str#*Unable to resolve*}" ]; then
-			if is_pdsh; then
-				target_devname=`echo ${ret_str} | awk '{print $2}'`
-			else
-				target_devname=`echo ${ret_str} | awk '{print $1}'`
-			fi
-		fi
-	else	# Execute remote command to get the device name of mdt/ost target
-		target_type=`echo ${target_svname} | cut -d - -f 2`
-		target_obdtype=${target_type:0:3}_TYPE
-		
-		mntdev_file=${LUSTRE_PROC}/${!target_obdtype}/${target_svname}/mntdev
-
-		ret_str=`${REMOTE} ${host_name} "cat ${mntdev_file}" 2>&1`
-		if [ $? -ne 0 -a -n "${ret_str}" ]; then
-			echo "`basename $0`: get_devname() error:" \
-			     "remote command error: ${ret_str}"
-			return 1
-		fi
-
-		if [ "${ret_str}" != "${ret_str#*No such file*}" ]; then
-			echo "`basename $0`: get_devname() error:"\
-			     "${mntdev_file} does not exist in ${host_name}!"
-			return 1
-		else
-			if is_pdsh; then
-				target_devname=`echo ${ret_str} | awk '{print $2}'`
-			else
-				target_devname=`echo ${ret_str} | awk '{print $1}'`
-			fi
-		fi
-	fi
-
-	echo ${target_devname}
-	return 0
-}
-
-# get_devsize hostname target_devname 
-# Get the device size (KB) of @target_devname from node @hostname
-get_devsize() {
-	local host_name=$1
-	local target_devname=$2
-	local target_devsize=
-	local ret_str
-
-	# Execute remote command to get the device size
-	ret_str=`${REMOTE} ${host_name} \
-		"/sbin/blockdev --getsize ${target_devname}" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_devsize() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	if is_pdsh; then
-		target_devsize=`echo ${ret_str} | awk '{print $2}'`
-	else
-		target_devsize=`echo ${ret_str} | awk '{print $1}'`
-	fi
-	
-	if [ -z "`echo ${target_devsize}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_devsize() error: can't" \
-		"get device size of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	let " target_devsize /= 2"
-
-	echo ${target_devsize}
-	return 0
-}
-
-# get_realdevname hostname loop_dev
-# Get the real device name of loop device @loop_dev from node @hostname
-get_realdevname() {
-	local host_name=$1
-	local loop_dev=$2
-	local target_devname=
-	local ret_str
-
-	# Execute remote command to get the real device name
-	ret_str=`${REMOTE} ${host_name} \
-		"/sbin/losetup ${loop_dev}" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_realdevname() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	if is_pdsh; then
-		target_devname=`echo ${ret_str} | awk '{print $4}' \
-				| sed 's/^(//' | sed 's/)$//'`
-	else
-		target_devname=`echo ${ret_str} | awk '{print $3}' \
-				| sed 's/^(//' | sed 's/)$//'`
-	fi
-
-	if [ "${ret_str}" != "${ret_str#*No such*}" ] \
-	|| [ -z "${target_devname}" ]; then
-		echo "`basename $0`: get_realdevname() error: can't" \
-		"get info on device ${loop_dev} in ${host_name}!"
-		return 1
-	fi
-
-	echo ${target_devname}
-	return 0
-}
-
-# get_mntpnt hostname target_devname
-# Get the lustre target mount point from the node @hostname
-get_mntpnt(){
-	local host_name=$1
-	local target_devname=$2
-	local mnt_point=
-	local ret_str
-
-	# Execute remote command to get the mount point
-	ret_str=`${REMOTE} ${host_name} \
-		"cat /etc/mtab | grep ${target_devname}" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_mntpnt() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	if is_pdsh; then
-		mnt_point=`echo ${ret_str} | awk '{print $3}'`
-	else
-		mnt_point=`echo ${ret_str} | awk '{print $2}'`
-	fi
-	
-	if [ -z "${mnt_point}" ]; then
-		echo "`basename $0`: get_mntpnt() error: can't" \
-		"get the mount point of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	echo ${mnt_point}
-	return 0
-}
-
-# get_devnames hostname
-# Get the lustre target device names, mount points
-# and loop device sizes from the node @hostname
-get_devnames(){
-	declare -i i
-	local host_name=$1
-	local ret_line line
-
-        # Initialize the arrays
-	unset TARGET_DEVNAMES
-	unset TARGET_DEVSIZES
-	unset TARGET_MNTPNTS
-
-	for ((i = 0; i < ${#TARGET_SVNAMES[@]}; i++)); do
-		TARGET_DEVNAMES[i]=$(get_devname ${host_name} \
-				     ${TARGET_SVNAMES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_DEVNAMES[i]}"
-			return 1
-		fi
-
-		if [ -z "${TARGET_DEVNAMES[i]}" ]; then
-			if [ "${TARGET_SVNAMES[i]}" = "${MGS_SVNAME}" ]; then
-				verbose_output "There exists combo mgs/mdt"\
-					       "target in ${host_name}."
-				continue
-			else
-				echo >&2 "`basename $0`: get_devname() error:"\
-			      		 "No device corresponding to target" \
-					 "${TARGET_SVNAMES[i]} in ${host_name}!"
-				return 1
-			fi
-		fi
-
-		# Get the mount point of the target
-		TARGET_MNTPNTS[i]=$(get_mntpnt ${host_name} \
-				     ${TARGET_DEVNAMES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_MNTPNTS[i]}"
-			return 1
-		fi
-
-		# The target device is a loop device?
-		if [ -n "${TARGET_DEVNAMES[i]}" ] \
-		&& is_loopdev ${TARGET_DEVNAMES[i]}; then 
-			# Get the device size
-			TARGET_DEVSIZES[i]=$(get_devsize ${host_name} \
-					     ${TARGET_DEVNAMES[i]})
-			if [ $? -ne 0 ]; then
-				echo >&2 "${TARGET_DEVSIZES[i]}"
-				return 1
-			fi
-
-			# Get the real device name
-			TARGET_DEVNAMES[i]=$(get_realdevname ${host_name} \
-					     ${TARGET_DEVNAMES[i]})
-			if [ $? -ne 0 ]; then
-				echo >&2 "${TARGET_DEVNAMES[i]}"
-				return 1
-			fi
-		fi
-        done
-
-	return 0
-}
-
-# is_target target_svtype ldd_flags
-# Check the service type of a lustre target
-is_target() {
-	case "$1" in
-	"mdt") let "ret = $2 & LDD_F_SV_TYPE_MDT";;
-	"ost") let "ret = $2 & LDD_F_SV_TYPE_OST";;
-	"mgs") let "ret = $2 & LDD_F_SV_TYPE_MGS";;
-	"*") 
-		echo >&2 "`basename $0`: is_target() error: Invalid" \
-		"target service type - \"$1\"!"
-		return 1
-		;;
-	esac
-
-	if [ ${ret} -eq 0 ]; then
-		return 1
-	fi
-
-	return 0
-}
-
-# get_devtype ldd_flags
-# Get the service type of a lustre target from @ldd_flags
-get_devtype() {
-	local target_devtype=
-
-	if [ -z "${flags}" ]; then
-		echo "`basename $0`: get_devtype() error: Invalid" \
-			"ldd_flags - it's value is null!"
-		return 1
-	fi
-
-	if is_target "mgs" $1; then
-		if is_target "mdt" $1; then
-			target_devtype="mgs|mdt"
-		else
-			target_devtype="mgs"
-		fi
-	elif is_target "mdt" $1; then
-		target_devtype="mdt"
-	elif is_target "ost" $1; then
-		target_devtype="ost"
-	else
-		echo "`basename $0`: get_devtype() error: Invalid" \
-		"ldd_flags - \"$1\"!"
-		return 1
-	fi
-
-	echo ${target_devtype}
-	return 0
-}
-
-# get_mntopts ldd_mount_opts
-# Get the user-specified lustre target mount options from @ldd_mount_opts
-get_mntopts() {
-	local mount_opts=
-	local ldd_mount_opts=$1
-
-	mount_opts="${ldd_mount_opts#${ALWAYS_MNTOPTS}}"
-	mount_opts="${mount_opts#${MDT_MGS_ALWAYS_MNTOPTS}}"
-	mount_opts="${mount_opts#${OST_ALWAYS_MNTOPTS}}"
-	mount_opts="${mount_opts#${OST_DEFAULT_MNTOPTS}}"
-	mount_opts="`echo \"${mount_opts}\" | sed 's/^,//'`"
-
-	[ "${mount_opts}" != "${mount_opts#*,*}" ] && echo "\""${mount_opts}"\"" \
-	|| echo ${mount_opts}
-
-	return 0
-}
-
-# get_mgsnids ldd_params
-# Get the mgs nids of lustre target from @ldd_params
-get_mgsnids() {
-	local mgs_nids=		# mgs nids in one mgs node
-	local all_mgs_nids=	# mgs nids in all mgs failover nodes
-	local param=
-	local ldd_params="$*"
-
-	for param in ${ldd_params}; do
-		if [ -n "`echo ${param}|awk '/mgsnode=/ {print $0}'`" ]; then
-			mgs_nids=`echo ${param#${PARAM_MGSNODE}}`
-
-			if [ -n "${all_mgs_nids}" ]; then
-				all_mgs_nids=${all_mgs_nids}:${mgs_nids}
-			else
-				all_mgs_nids=${mgs_nids}
-			fi
-		fi
-	done
-
-	[ "${all_mgs_nids}" != "${all_mgs_nids#*,*}" ] \
-	&& echo "\""${all_mgs_nids}"\"" || echo ${all_mgs_nids}
-
-	return 0
-}
-
-# get_failnids ldd_params
-# Get the failover nids of lustre target from @ldd_params
-get_failnids() {
-	local fail_nids=	# failover nids in one failover node
-	local all_fail_nids=	# failover nids in all failover nodes
-				# of this target
-	local param=
-	local ldd_params="$*"
-
-	for param in ${ldd_params}; do
-		if [ -n "`echo ${param}|awk '/failover.node=/ {print $0}'`" ]; then
-			fail_nids=`echo ${param#${PARAM_FAILNODE}}`
-
-			if [ -n "${all_fail_nids}" ]; then
-				all_fail_nids=${all_fail_nids}:${fail_nids}
-			else
-				all_fail_nids=${fail_nids}
-			fi
-		fi
-	done
-
-	[ "${all_fail_nids}" != "${all_fail_nids#*,*}" ] \
-	&& echo "\""${all_fail_nids}"\"" || echo ${all_fail_nids}
-
-	return 0
-}
-
-# get_fmtopts target_devname hostname ldd_params
-# Get other format options of the lustre target @target_devname from @ldd_params
-get_fmtopts() {
-	local target_devname=$1
-	local host_name=$2
-	shift
-	shift
-	local ldd_params="$*"
-	local param= 
-	local fmt_opts=
-
-	for param in ${ldd_params}; do
-		[ -n "`echo ${param}|awk '/mgsnode=/ {print $0}'`" ] && continue
-		[ -n "`echo ${param}|awk '/failover.node=/ {print $0}'`" ] && continue
-
-		if [ -n "${param}" ]; then
-			if [ -n "${fmt_opts}" ]; then
-				fmt_opts=${fmt_opts}" --param=\""${param}"\""
-			else
-				fmt_opts="--param=\""${param}"\""
-			fi
-		fi
-	done
-
-	echo ${fmt_opts}
-	return 0
-}
-
-# get_stripecount host_name target_fsname
-# Get the stripe count for @target_fsname
-get_stripecount() {
-	local host_name=$1
-	local target_fsname=$2
-	local stripe_count=
-	local stripecount_file
-	local ret_str
-
-	# Get the stripe count
-	stripecount_file=${LUSTRE_PROC}/lov/${target_fsname}-mdtlov/stripecount
-	ret_str=`${REMOTE} ${host_name} "cat ${stripecount_file}" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_stripecount() error:" \
-		"remote command to ${host_name} error: ${ret_str}"
-		return 1
-	fi
-
-	if is_pdsh; then
-		stripe_count=`echo ${ret_str} | awk '{print $2}'`
-	else
-		stripe_count=`echo ${ret_str} | awk '{print $1}'`
-	fi
-
-	if [ -z "`echo ${stripe_count}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_stripecount() error: can't" \
-		"get stripe count of ${target_fsname} in ${host_name}!"
-		return 1
-	fi
-
-	echo ${stripe_count}
-	return 0
-}
-
-# get_stripecount_opt host_name target_fsname
-# Get the stripe count option for lustre mdt target
-get_stripecount_opt() {
-	local host_name=$1
-	local target_fsname=$2
-	local stripe_count=
-	local stripecount_opt=
-
-	# Get the stripe count
-	[ -z "${target_fsname}" ] && target_fsname="lustre"
-	stripe_count=$(get_stripecount ${host_name} ${target_fsname})
-	if [ $? -ne 0 ]; then
-		echo "${stripe_count}"
-		return 1
-	fi
-	
-	if [ "${stripe_count}" != "1" ]; then
-		stripecount_opt=${OPTSTR_STRIPE_COUNT}${stripe_count}
-	fi
-
-	echo ${stripecount_opt}
-	return 0
-}
-
-# get_ldds hostname
-# Get the lustre target disk data from the node @hostname
-get_ldds(){
-	declare -i i
-	local host_name=$1
-	local ret_line line
-	local flags mnt_opts params
-	local stripecount_opt
-
-        # Initialize the arrays
-	unset TARGET_DEVTYPES TARGET_FSNAMES TARGET_MGSNIDS TARGET_INDEXES
-	unset TARGET_FMTOPTS  TARGET_MNTOPTS TARGET_FAILNIDS
-	
-	# Get lustre target device type, fsname, index, etc.
-	# from MOUNT_DATA_FILE. Using tunefs.lustre to read it.
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		flags=
-		mnt_opts=
-		params=
-		stripecount_opt=
-		[ -z "${TARGET_DEVNAMES[i]}" ] && continue
-
-		# Execute remote command to read MOUNT_DATA_FILE
-		while read -r ret_line; do
-			if is_pdsh; then
-                		set -- ${ret_line}
-				shift
-				line="$*"
-			else
-				line="${ret_line}"
-			fi
-
-			if [ -n "`echo ${line}|awk '/Index:/ {print $0}'`" ]; then
-				TARGET_INDEXES[i]=`echo ${line}|awk '{print $2}'`
-				continue
-			fi
-
-			if [ -n "`echo ${line}|awk '/Lustre FS:/ {print $0}'`" ]; then
-				TARGET_FSNAMES[i]=`echo ${line}|awk '{print $3}'`
-				continue
-			fi
-			
-			if [ -n "`echo ${line}|awk '/Flags:/ {print $0}'`" ]; then
-				flags=`echo ${line}|awk '{print $2}'`
-				continue
-			fi
-
-			if [ -n "`echo ${line}|awk '/Persistent mount opts:/ {print $0}'`" ]; then
-				mnt_opts=`echo ${line}|awk '{print $0}'`
-				mnt_opts=`echo ${mnt_opts#Persistent mount opts: }`
-				continue
-			fi
-
-			if [ -n "`echo ${line}|awk '/Parameters:/ {print $0}'`" ]; then
-				params=`echo ${line}|awk '{print $0}'`
-				params=`echo ${params#Parameters:}`
-				break
-			fi
-		done < <(${REMOTE} ${host_name} "PATH=\$PATH:/sbin:/usr/sbin
-		${TUNEFS} --print --verbose ${TARGET_DEVNAMES[i]} 2>/dev/null")
-
-		if [ -z "${flags}" ]; then
-			echo >&2 "`basename $0`: get_ldds() error: Invalid" \
-				 "ldd_flags of target ${TARGET_DEVNAMES[i]}" \
-				 "in host ${host_name} - it's value is null!"\
-				 "Check ${TUNEFS} command!"
-			return 1
-		fi
-		
-		if [ "${TARGET_INDEXES[i]}" = "unassigned" ] \
-		|| is_target "mgs" ${flags}; then
-			TARGET_INDEXES[i]=
-		fi
-
-		[ "${TARGET_FSNAMES[i]}" = "lustre" ] && TARGET_FSNAMES[i]=
-
-		# Get the lustre target service type
-		TARGET_DEVTYPES[i]=$(get_devtype ${flags})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_DEVTYPES[i]} From device" \
-			"${TARGET_DEVNAMES[i]} in host ${host_name}!"
-			return 1
-		fi
-
-		# Get the lustre target mount options
-		TARGET_MNTOPTS[i]=$(get_mntopts "${mnt_opts}")
-
-		# Get mgs nids of the lustre target
-		TARGET_MGSNIDS[i]=$(get_mgsnids "${params}")
-
-		# Get failover nids of the lustre target
-		TARGET_FAILNIDS[i]=$(get_failnids "${params}")
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_FAILNIDS[i]} From device" \
-			"${TARGET_DEVNAMES[i]} in host ${host_name}!"
-			return 1
-		fi
-
-		# Get other format options of the lustre target
-		TARGET_FMTOPTS[i]=$(get_fmtopts ${TARGET_DEVNAMES[i]} ${host_name} "${params}")
-		if [ $? -ne 0 ]; then
-			echo >&2 "${TARGET_FMTOPTS[i]}"
-			return 1
-		fi
-
-		if [ -n "${TARGET_DEVSIZES[i]}" ]; then
-			if [ -n "${TARGET_FMTOPTS[i]}" ]; then
-				TARGET_FMTOPTS[i]="--device-size=${TARGET_DEVSIZES[i]} ""${TARGET_FMTOPTS[i]}"
-			else
-				TARGET_FMTOPTS[i]="--device-size=${TARGET_DEVSIZES[i]}"
-			fi
-		fi
-
-		if [ -n "${FAILOVER_FMTOPTS[i]}" ]; then
-			if [ -n "${TARGET_FMTOPTS[i]}" ]; then
-				TARGET_FMTOPTS[i]=${TARGET_FMTOPTS[i]}" "${FAILOVER_FMTOPTS[i]}
-			else
-				TARGET_FMTOPTS[i]=${FAILOVER_FMTOPTS[i]}
-			fi
-		fi
-
-		if is_target "mdt" ${flags}; then
-			# Get the stripe count option
-			stripecount_opt=$(get_stripecount_opt ${host_name} ${TARGET_FSNAMES[i]})
-			if [ $? -ne 0 ]; then
-				echo >&2 "${stripecount_opt}"
-				return 1
-			fi
-
-			if [ -n "${stripecount_opt}" ]; then
-				if [ -n "${TARGET_FMTOPTS[i]}" ]; then
-					TARGET_FMTOPTS[i]=${TARGET_FMTOPTS[i]}" "${stripecount_opt}
-				else
-					TARGET_FMTOPTS[i]=${stripecount_opt}
-				fi
-			fi
-		fi
-
-		if [ "${TARGET_FMTOPTS[i]}" != "${TARGET_FMTOPTS[i]#*,*}" ]; then
-			TARGET_FMTOPTS[i]="\""${TARGET_FMTOPTS[i]}"\""
-		fi
-        done
-
-	return 0
-}
-
-# get_journalsize target_devname hostname
-# Get the journal size of lustre target @target_devname from @hostname
-get_journalsize() {
-	local target_devname=$1
-	local host_name=$2
-	local journal_inode= 
-	local journal_size=
-	local ret_str
-
-	# Execute remote command to get the journal inode number
-	ret_str=`${REMOTE} ${host_name} "/sbin/debugfs -R 'stats -h' \
-		 ${target_devname} | grep 'Journal inode:'" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_journalsize() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	ret_str=${ret_str#${ret_str%Journal inode:*}}
-	journal_inode=`echo ${ret_str} | awk '{print $3}'`
-	if [ -z "`echo ${journal_inode}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_journalsize() error: can't" \
-		"get journal inode of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	# Execute remote command to get the journal size
-	ret_str=`${REMOTE} ${host_name} "/sbin/debugfs -R \
-		'stat <${journal_inode}>' ${target_devname}|grep '^User:'" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_journalsize() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	ret_str=${ret_str#${ret_str%User:*}}
-	journal_size=`echo ${ret_str} | awk '{print $6}'`
-	if [ -z "`echo ${journal_size}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_journalsize() error: can't" \
-		"get journal size of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	let "journal_size /= 1024*1024" # MB
-
-	echo ${journal_size}
-	return 0
-}
-
-# get_defaultjournalsize target_devsize
-# Calculate the default journal size from target device size @target_devsize
-get_defaultjournalsize() {
-	declare -i target_devsize=$1
-	declare -i journal_size=0 
-	declare -i max_size base_size 
-
-	let "base_size = 1024*1024"
-	if [ ${target_devsize} -gt ${base_size} ]; then  # 1GB
-		let "journal_size = target_devsize / 102400"
-		let "journal_size *= 4"
-	fi
-
-	let "max_size = 102400 * L_BLOCK_SIZE"
-	let "max_size >>= 20" # 400MB
-
-	if [ ${journal_size} -gt ${max_size} ]; then
-		let "journal_size = max_size"
-	fi
-
-	echo ${journal_size}
-	return 0
-}
-
-# figure_journal_size target_devname hostname
-# Find a reasonable journal file size given the number of blocks 
-# in the filesystem. This algorithm is derived from figure_journal_size()
-# function in util.c of e2fsprogs-1.38.cfs2-1.src.rpm.
-figure_journal_size() {
-	local target_devname=$1
-	local host_name=$2
-	local ret_str
-	declare -i block_count
-	declare -i journal_blocks
-	declare -i journal_size
-
-	# Execute remote command to get the block count 
-	ret_str=`${REMOTE} ${host_name} "/sbin/debugfs -R 'stats -h' \
-		 ${target_devname} | grep 'Block count:'" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: figure_journal_size() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	ret_str=${ret_str#${ret_str%Block count:*}}
-	block_count=`echo ${ret_str} | awk '{print $3}'`
-	if [ -z "`echo ${block_count}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: figure_journal_size() error: can't" \
-		"get block count of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	if ((block_count < 32768)); then
-		let "journal_blocks = 1024"
-	elif ((block_count < 256*1024)); then
-		let "journal_blocks = 4096"
-	elif ((block_count < 512*1024)); then
-		let "journal_blocks = 8192"
-	elif ((block_count < 1024*1024)); then
-		let "journal_blocks = 16384"
-	else
-		let "journal_blocks = 32768"
-	fi
-
-	let "journal_size = journal_blocks * L_BLOCK_SIZE / 1048576"
-
-	echo ${journal_size}
-	return 0
-}
-
-# get_J_opt hostname target_devname target_devsize
-# Get the mkfs -J option of lustre target @target_devname 
-# from the node @hostname
-get_J_opt() {
-	local host_name=$1
-	local target_devname=$2
-	local target_devsize=$3
-	local journal_size=
-	local default_journal_size=
-	local journal_opt=
-
-	# Get the real journal size of lustre target
-	journal_size=$(get_journalsize ${target_devname} ${host_name})
-	if [ $? -ne 0 ]; then
-		echo "${journal_size}"
-		return 1
-	fi
-
-	# Get the default journal size of lustre target
-	default_journal_size=$(get_defaultjournalsize ${target_devsize})
-	if [ "${default_journal_size}" = "0" ]; then
-		default_journal_size=$(figure_journal_size ${target_devname} \
-				       ${host_name})
-		if [ $? -ne 0 ]; then
-			echo "${default_journal_size}"
-			return 1
-		fi
-	fi
-
-	if [ "${journal_size}" != "${default_journal_size}" ]; then
-		journal_opt="-J size=${journal_size}"
-	fi
-		
-	echo ${journal_opt}
-	return 0
-}
-
-# get_ratio target_devname hostname
-# Get the bytes/inode ratio of lustre target @target_devname from @hostname
-get_ratio() {
-	local target_devname=$1
-	local host_name=$2
-	local inode_count= 
-	local block_count=
-	local ratio=
-	local ret_str
-
-	# Execute remote command to get the inode count
-	ret_str=`${REMOTE} ${host_name} "/sbin/debugfs -R 'stats -h' \
-		 ${target_devname} | grep 'Inode count:'" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_ratio() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	ret_str=${ret_str#${ret_str%Inode count:*}}
-	inode_count=`echo ${ret_str} | awk '{print $3}'`
-	if [ -z "`echo ${inode_count}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_ratio() error: can't" \
-		"get inode count of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	# Execute remote command to get the block count
-	ret_str=`${REMOTE} ${host_name} "/sbin/debugfs -R 'stats -h' \
-		 ${target_devname} | grep 'Block count:'" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_ratio() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	ret_str=${ret_str#${ret_str%Block count:*}}
-	block_count=`echo ${ret_str} | awk '{print $3}'`
-	if [ -z "`echo ${block_count}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_ratio() error: can't" \
-		"get block count of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	let "ratio = block_count*L_BLOCK_SIZE/inode_count"
-
-	echo ${ratio}
-	return 0
-}
-
-# get_default_ratio target_devtype target_devsize
-# Calculate the default bytes/inode ratio from target type @target_devtype
-get_default_ratio() {
-	local target_devtype=$1
-	declare -i target_devsize=$2
-	local ratio=
-
-	case "${target_devtype}" in
-	"mdt" | "mgs|mdt" | "mdt|mgs")
-		ratio=4096;;
-	"ost")
-		[ ${target_devsize} -gt 1000000 ] && ratio=16384;;
-	esac
-
-	[ -z "${ratio}" ] && ratio=${L_BLOCK_SIZE}
-
-	echo ${ratio}
-	return 0
-}
-
-# get_i_opt hostname target_devname target_devtype target_devsize
-# Get the mkfs -i option of lustre target @target_devname 
-# from the node @hostname
-get_i_opt() {
-	local host_name=$1
-	local target_devname=$2
-	local target_devtype=$3
-	local target_devsize=$4
-	local ratio=
-	local default_ratio=
-	local ratio_opt=
-
-	# Get the real bytes/inode ratio of lustre target
-	ratio=$(get_ratio ${target_devname} ${host_name})
-	if [ $? -ne 0 ]; then
-		echo "${ratio}"
-		return 1
-	fi
-
-	# Get the default bytes/inode ratio of lustre target
-	default_ratio=$(get_default_ratio ${target_devtype} ${target_devsize})
-
-	if [ "${ratio}" != "${default_ratio}" ]; then
-		ratio_opt="-i ${ratio}"
-	fi
-		
-	echo ${ratio_opt}
-	return 0
-}
-
-# get_isize target_devname hostname
-# Get the inode size of lustre target @target_devname from @hostname
-get_isize() {
-	local target_devname=$1
-	local host_name=$2
-	local inode_size= 
-	local ret_str
-
-	# Execute remote command to get the inode size 
-	ret_str=`${REMOTE} ${host_name} "/sbin/debugfs -R 'stats -h' \
-		 ${target_devname} | grep 'Inode size:'" 2>&1`
-	if [ $? -ne 0 -a -n "${ret_str}" ]; then
-		echo "`basename $0`: get_isize() error:" \
-		     "remote command error: ${ret_str}"
-		return 1
-	fi
-
-	ret_str=${ret_str#${ret_str%Inode size:*}}
-	inode_size=`echo ${ret_str} | awk '{print $3}'`
-	if [ -z "`echo ${inode_size}|awk '/^[[:digit:]]/ {print $0}'`" ]
-	then
-		echo "`basename $0`: get_isize() error: can't" \
-		"get inode size of ${target_devname} in ${host_name}!"
-		return 1
-	fi
-
-	echo ${inode_size}
-	return 0
-}
-
-# get_mdt_default_isize host_name target_fsname
-# Calculate the default inode size of lustre mdt target
-get_mdt_default_isize() {
-	local host_name=$1
-	local target_fsname=$2
-	declare -i stripe_count
-	local inode_size=
-
-	# Get the stripe count
-	stripe_count=$(get_stripecount ${host_name} ${target_fsname})
-	if [ $? -ne 0 ]; then
-		echo "${stripe_count}"
-		return 1
-	fi
-
-	if ((stripe_count > 77)); then
-		inode_size=512
-	elif ((stripe_count > 34)); then
-		inode_size=2048
-	elif ((stripe_count > 13)); then
-		inode_size=1024
-	else
-		inode_size=512
-	fi
-
-	echo ${inode_size}
-	return 0
-}
-
-# get_default_isize host_name target_devtype target_fsname
-# Calculate the default inode size of lustre target type @target_devtype
-get_default_isize() {
-	local host_name=$1
-	local target_devtype=$2
-	local target_fsname=$3
-	local inode_size=
-
-	case "${target_devtype}" in
-	"mdt" | "mgs|mdt" | "mdt|mgs")
-		inode_size=$(get_mdt_default_isize ${host_name} ${target_fsname})
-		if [ $? -ne 0 ]; then
-			echo "${inode_size}"
-			return 1
-		fi
-		;;
-	"ost")
-		inode_size=256;;
-	esac
-
-	[ -z "${inode_size}" ] && inode_size=128
-
-	echo ${inode_size}
-	return 0
-}
-
-# get_I_opt hostname target_devname target_devtype target_fsname
-# Get the mkfs -I option of lustre target @target_devname 
-# from the node @hostname
-get_I_opt() {
-	local host_name=$1
-	local target_devname=$2
-	local target_devtype=$3
-	local target_fsname=$4
-	local isize=
-	local default_isize=
-	local isize_opt=
-
-	# Get the real inode size of lustre target
-	isize=$(get_isize ${target_devname} ${host_name})
-	if [ $? -ne 0 ]; then
-		echo "${isize}"
-		return 1
-	fi
-
-	# Get the default inode size of lustre target
-	[ -z "${target_fsname}" ] && target_fsname="lustre"
-	default_isize=$(get_default_isize ${host_name} ${target_devtype} \
-			${target_fsname})
-	if [ $? -ne 0 ]; then
-		echo "${default_isize}"
-		return 1
-	fi
-
-	if [ "${isize}" != "${default_isize}" ]; then
-		isize_opt="-I ${isize}"
-	fi
-		
-	echo ${isize_opt}
-	return 0
-}
-
-# get_mkfsopts hostname
-# Get the mkfs options of lustre targets from the node @hostname
-get_mkfsopts(){
-	declare -i i
-	local host_name=$1
-	local journal_opt
-	local ratio_opt
-	local inode_size_opt
-
-        # Initialize the arrays
-	unset TARGET_MKFSOPTS
-	
-	# FIXME: Get other mkfs options of ext3/ldiskfs besides -J, -i and -I
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		journal_opt=
-		ratio_opt=
-		inode_size_opt=
-
-		[ -z "${TARGET_DEVNAMES[i]}" ] && continue
-
-		if [ -z "${TARGET_DEVSIZES[i]}" ]; then
-			# Get the device size
-			TARGET_DEVSIZES[i]=$(get_devsize ${host_name} \
-				         ${TARGET_DEVNAMES[i]})
-			if [ $? -ne 0 ]; then
-				echo >&2 "${TARGET_DEVSIZES[i]}"
-				return 1
-			fi
-		fi
-
-		# Get the journal option
-		journal_opt=$(get_J_opt ${host_name} ${TARGET_DEVNAMES[i]} \
-			      ${TARGET_DEVSIZES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${journal_opt}"
-			return 1
-		fi
-
-		if [ -n "${journal_opt}" ]; then
-			if [ -z "${TARGET_MKFSOPTS[i]}" ]; then
-				TARGET_MKFSOPTS[i]="${journal_opt}"
-			else
-				TARGET_MKFSOPTS[i]=${TARGET_MKFSOPTS[i]}" ${journal_opt}"
-			fi
-		fi
-		
-		# Get the bytes-per-inode ratio option
-		ratio_opt=$(get_i_opt ${host_name} ${TARGET_DEVNAMES[i]} \
-			    ${TARGET_DEVTYPES[i]} ${TARGET_DEVSIZES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${ratio_opt}"
-			return 1
-		fi
-
-		if [ -n "${ratio_opt}" ]; then
-			if [ -z "${TARGET_MKFSOPTS[i]}" ]; then
-				TARGET_MKFSOPTS[i]="${ratio_opt}"
-			else
-				TARGET_MKFSOPTS[i]=${TARGET_MKFSOPTS[i]}" ${ratio_opt}"
-			fi
-		fi
-
-		# Get the inode size option
-		inode_size_opt=$(get_I_opt ${host_name} ${TARGET_DEVNAMES[i]} \
-				 ${TARGET_DEVTYPES[i]} ${TARGET_FSNAMES[i]})
-		if [ $? -ne 0 ]; then
-			echo >&2 "${inode_size_opt}"
-			return 1
-		fi
-
-		if [ -n "${inode_size_opt}" ]; then
-			if [ -z "${TARGET_MKFSOPTS[i]}" ]; then
-				TARGET_MKFSOPTS[i]="${inode_size_opt}"
-			else
-				TARGET_MKFSOPTS[i]=${TARGET_MKFSOPTS[i]}" ${inode_size_opt}"
-			fi
-		fi
-
-		if [ "${TARGET_MKFSOPTS[i]}" != "${TARGET_MKFSOPTS[i]#*,*}" ]; then
-			TARGET_MKFSOPTS[i]="\""${TARGET_MKFSOPTS[i]}"\""
-		fi
-	done
-	return 0
-}
-
-# get_target_configs hostname
-# Get the lustre target informations from the node @hostname
-get_target_configs() {
-	declare -i i
-	local host_name=$1
-	local ret_line line
-
-        # Initialize the arrays
-	unset TARGET_CONFIGS
-
-	# Get lustre target server names
-	if ! get_svnames ${host_name}; then
-		return 1
-	fi
-
-	# Get lustre target device names, mount points and loop device sizes
-	if ! get_devnames ${host_name}; then
-		return 1
-	fi
-
-	# Get lustre target device type, fsname, index, etc.
-	if ! get_ldds ${host_name}; then
-		return 1
-	fi
-
-	# Get mkfs options of lustre targets
-	if ! get_mkfsopts ${host_name}; then
-		return 1
-	fi
-
-	# Construct lustre target configs
-	for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-		[ -z "${TARGET_DEVNAMES[i]}" ] && continue
-		TARGET_CONFIGS[i]=${TARGET_DEVNAMES[i]},${TARGET_MNTPNTS[i]},${TARGET_DEVTYPES[i]},${TARGET_FSNAMES[i]},${TARGET_MGSNIDS[i]},${TARGET_INDEXES[i]},${TARGET_FMTOPTS[i]},${TARGET_MKFSOPTS[i]},${TARGET_MNTOPTS[i]},${TARGET_FAILNIDS[i]}
-	done
-
-	return 0
-}
-
-# get_configs hostname
-# Get all the informations needed to generate a csv file from 
-# the node @hostname
-get_configs() {
-	# Check the hostname
-	if [ -z "$1" ]; then
-		echo >&2 "`basename $0`: get_configs() error:" \
-			 "Missing hostname!"
-		return 1
-	fi
-
-	# Get network module options
-	verbose_output ""
-	verbose_output "Collecting network module options from host $1..."
-	if ! get_module_opts $1; then
-		return 1
-	fi
-	verbose_output "OK"
-
-	# Get lustre target informations
-	verbose_output "Collecting Lustre targets informations from host $1..."
-	if ! get_target_configs $1; then
-		return 1
-	fi
-	verbose_output "OK"
-
-	# Get HA software configurations
-	if ! get_ha_configs $1; then
-		return 1
-	fi
-
-	return 0
-}
-
-# Collect linux MD/LVM device informations from the lustre cluster and
-# append them to the csv file
-get_mdlvm_info() {
-	declare -i idx
-	declare -i i
-	local line
-
-	# Collect and append linux MD/LVM informations to the csv file
-	for ((idx = 0; idx < ${#HOST_NAMES[@]}; idx++)); do
-		[ -z "${HOST_NAMES[idx]}" ] && continue
-
-		# Collect MD device informations
-		! get_md_configs ${HOST_NAMES[idx]} && return 1
-
-		# Append MD device informations to the csv file
-		for ((i = 0; i < ${#MD_NAME[@]}; i++)); do
-			line=${HOST_NAMES[idx]},${MD_MARKER},${MD_NAME[i]},,,${MD_LEVEL[i]},${MD_DEVS[i]}
-			verbose_output "Informations of MD device ${MD_NAME[i]}" \
-				       "in host ${HOST_NAMES[idx]} are as follows:"
-			verbose_output "${line}"
-			echo "${line}" >> ${LUSTRE_CSV_FILE}
-		done
-
-		# Collect PV informations
-		! get_pv_configs ${HOST_NAMES[idx]} && return 1
-
-		# Append PV informations to the csv file
-		if [ -n "${PV_NAMES}" ]; then
-			line=${HOST_NAMES[idx]},${PV_MARKER},${PV_NAMES}
-			verbose_output "Informations of PVs" \
-				       "in host ${HOST_NAMES[idx]} are as follows:"
-			verbose_output "${line}"
-			echo "${line}" >> ${LUSTRE_CSV_FILE}
-		fi
-
-		# Collect VG informations
-		! get_vg_configs ${HOST_NAMES[idx]} && return 1
-
-		# Append VG informations to the csv file
-		for ((i = 0; i < ${#VG_NAME[@]}; i++)); do
-			line=${HOST_NAMES[idx]},${VG_MARKER},${VG_NAME[i]},,,${VG_PVNAMES[i]}
-			verbose_output "Informations of VG ${VG_NAME[i]}" \
-				       "in host ${HOST_NAMES[idx]} are as follows:"
-			verbose_output "${line}"
-			echo "${line}" >> ${LUSTRE_CSV_FILE}
-		done
-
-		# Collect LV informations
-		! get_lv_configs ${HOST_NAMES[idx]} && return 1
-
-		# Append LV informations to the csv file
-		for ((i = 0; i < ${#LV_NAME[@]}; i++)); do
-			line=${HOST_NAMES[idx]},${LV_MARKER},${LV_NAME[i]},,,${LV_SIZE[i]},${LV_VGNAME[i]}
-			verbose_output "Informations of LV /dev/${LV_VGNAME[i]}/${LV_NAME[i]}"\
-				       "in host ${HOST_NAMES[idx]} are as follows:"
-			verbose_output "${line}"
-			echo "${line}" >> ${LUSTRE_CSV_FILE}
-		done
-	done
-	return 0
-}
-
-# Generate the csv file from the lustre cluster
-gen_csvfile() {
-	declare -i idx
-	declare -i i
-	local line
-
-	# Get lustre cluster node names
-	verbose_output "Collecting Lustre cluster node names..."
-	if ! get_hostnames; then
-		return 1
-	fi
-	verbose_output "OK"
-
-	: > ${LUSTRE_CSV_FILE}
-
-	${GET_MDLVM_INFO} && get_mdlvm_info
-
-	# Collect and append lustre target informations to the csv file
-	for ((idx = 0; idx < ${#HOST_NAMES[@]}; idx++)); do
-		# Collect informations
-		if ! get_configs ${HOST_NAMES[idx]}; then
-			rm -f ${LUSTRE_CSV_FILE}
-			return 1
-		fi
-
-		# Append informations to the csv file
-		for ((i = 0; i < ${#TARGET_DEVNAMES[@]}; i++)); do
-			[ -z "${TARGET_DEVNAMES[i]}" ] && continue
-
-			if [ -z "${HA_CONFIGS[i]}" ]; then
-				line=${HOST_NAMES[idx]},${MODULE_OPTS},${TARGET_CONFIGS[i]}
-			else
-				line=${HOST_NAMES[idx]},${MODULE_OPTS},${TARGET_CONFIGS[i]},${HA_CONFIGS[i]}
-			fi
-			verbose_output "Informations of target ${TARGET_DEVNAMES[i]}" \
-				       "in host ${HOST_NAMES[idx]} are as follows:"
-			verbose_output "${line}"
-			echo "" >> ${LUSTRE_CSV_FILE}
-			echo "${line}" >> ${LUSTRE_CSV_FILE}
-		done
-    	done
-
-	return 0
-}
-
-# Main flow
-echo "`basename $0`: ******** Generate csv file -- ${LUSTRE_CSV_FILE} START ********"
-if ! gen_csvfile; then
-	exit 1
-fi
-echo "`basename $0`: ******** Generate csv file -- ${LUSTRE_CSV_FILE} OK **********"
-
-exit 0
diff --git a/lustre/scripts/lustre_req_history b/lustre/scripts/lustre_req_history
deleted file mode 100644
index de280766e33135bc4ed7a44b0ce13afe8c7b489f..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustre_req_history
+++ /dev/null
@@ -1,163 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2006  Cluster File Systems, Inc.
-
-# Purpose:
-# This script displays the history of requests from the local client  
-# to the Lustre servers.
-
-# Requires: tcp network (ksocklnd), ssh
-# In order to execute this script the user needs interaction-free scp access
-# to all the servers
-
-# Limitations:
-# The req_history files only keep a limited amount of data, so the results
-# may not be a complete history.
-
-REQ_FILES_OST="ost/OSS/ost_io/req_history \
-ost/OSS/ost_create/req_history \
-ost/OSS/ost/req_history"
-
-REQ_FILES_MDT="ldlm/services/ldlm_canceld/req_history \
-ldlm/services/ldlm_cbd/req_history \
-mdt/MDS/mds_readpage/req_history \
-mdt/MDS/mds_setattr/req_history \
-mdt/MDS/mds/req_history"
-
-REQ_FILES_CLIENT="ldlm/services/ldlm_canceld/req_history \
-ldlm/services/ldlm_cbd/req_history"
-
-if [ $#  -gt  0 ]; then
-	echo "Usage: $0"
-	echo "  This script collects the history of ptlrpc requests on"
-	echo "the servers from this client. The results are sorted by" 
-	echo "the transaction ID."
-	exit 1
-fi
-
-tempip=`lctl list_nids | cut -d "@" -f1`
-
-echo $tempip | egrep '[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+'
-if [ $? -ne 0 ] ; then
-        CLIENT=`host $tempip | cut -d" " -f4`
-else
-        CLIENT=$tempip
-fi
-
-TMP_DIR_CLIENT=`mktemp -d /tmp/src_req_history.XXXXX`
-chmod ugo+rwx $TMP_DIR_CLIENT
-MDS_NODE=`cat /proc/fs/lustre/mdc/*/mds_conn_uuid | cut -d @ -f1`
-TARGET="OSS"
-i=0
-for NODE in `cat /proc/fs/lustre/osc/*-osc-*/ost_conn_uuid | cut -d @ -f1` ; do
-	NODE_ARRAY[$i]=$NODE
-	i=`expr $i + 1`
-done
-
-# Get the Histories from all the OSS's
-
-k=0
-for NODE in `cat /proc/fs/lustre/osc/*-osc-*/ost_conn_uuid | cut -d @ -f1` ; do
-
-	SAME_OST=0
-	j=0
-	while [ $j -lt $k ]
-	do
-		if [ ${NODE_ARRAY[$j]} = $NODE ]
-		then
-			SAME_OST=1
-               fi
-                j=`expr $j + 1`
-	done
-	k=`expr $k + 1` 
-	if [ $SAME_OST -eq 1 ]
-        then
-                continue
-        fi
-	TMPFILE1=`mktemp /tmp/temp_histories_$NODE.XXXXXXXXXX`
-	TMPFILE2=`mktemp /tmp/temp_histories_$NODE.XXXXXXXXXX`
-	rm -f $TMPFILE1
-	rm -f $TMPFILE2
-	( echo cd /proc/fs/lustre
-	echo touch $TMPFILE1
-	echo touch $TMPFILE2
-	echo chmod go+rw $TMPFILE1
-	echo chmod go+rw $TMPFILE2
-	for FILE in $REQ_FILES_OST; do
-		SERVICE=`echo $FILE | cut -d "/" -f3`
-		echo "cat $FILE |cut -d\" \" -f1 | sed s/$/:$TARGET/| sed s/$/:$SERVICE/ >> $TMPFILE1"
-	done
-	for FILE in $REQ_FILES_CLIENT; do
-                SERVICE=`echo $FILE | cut -d "/" -f3`
-                echo "cat $FILE | sed s/$/:$TARGET/ | sed s/$/:$SERVICE/ >> $TMPFILE1"
-        done
-	if [ $CLIENT = $NODE ]
-	then
-		echo "grep -r 0@lo $TMPFILE1 >> $TMPFILE2"
-	else
-		echo "grep -r $CLIENT $TMPFILE1 >> $TMPFILE2"
-	fi
-	) | ssh $NODE
-	scp $NODE:$TMPFILE2 $TMP_DIR_CLIENT/
-	echo rm -f $TMPFILE1 $TMPFILE2 | ssh $NODE
-done
-
-# Get the Histories from the MDS
-
-TARGET="MDS"
-for NODE in `cat /proc/fs/lustre/mdc/*/mds_conn_uuid | cut -d @ -f1`; do
-	TMPFILE1=`mktemp /tmp/temp_histories_$NODE.XXXXXXXXXX`
-        rm -f $TMPFILE1
-	TMPFILE2=`mktemp /tmp/temp_histories_$NODE.XXXXXXXXXX`
-        rm -f $TMPFILE2
-	( echo cd /proc/fs/lustre
-	echo touch $TMPFILE1
-	echo touch $TMPFILE2
-	echo chmod go+rw $TMPFILE1
-	echo chmod go+rw $TMPFILE2
-	for FILE in $REQ_FILES_MDT; do
-		SERVICE=`echo $FILE | cut -d "/" -f3`
-		echo "cat $FILE | sed s/$/:$TARGET/ | sed s/$/:$SERVICE/ >> $TMPFILE1"
-	done
-	if [ $CLIENT = $NODE ]
-        then
-		echo "grep -r 0@lo $TMPFILE1 >> $TMPFILE2"
-	else
-		echo "grep -r $CLIENT $TMPFILE1 >> $TMPFILE2"
-	fi
-	) | ssh $NODE
-	scp $NODE:$TMPFILE2 $TMP_DIR_CLIENT/
-        echo rm -f $TMPFILE1 $TMPFILE2 | ssh $NODE
-done
-
-# Get the Histories from the CLIENT
-
-TMPFILE1=`mktemp $TMP_DIR_CLIENT/temp_histories_$CLIENT.XXXXXXXXXX`
-TMPFILE2=`mktemp $TMP_DIR_CLIENT/temp_histories_$CLIENT.XXXXXXXXXX`
-TARGET="CLIENT"
-
-for FILE in $REQ_FILES_CLIENT; do
-	SERVICE=`echo $FILE | cut -d "/" -f3`
-	cat /proc/fs/lustre/$FILE | sed s/$/:$TARGET/ | sed s/$/:$SERVICE/ >> $TMPFILE1
-done
-
-grep -r 0@lo $TMPFILE1 >> $TMPFILE2
-rm -f $TMPFILE1
-
-TMPFILE_DEST=`mktemp /tmp/req_histories.XXXXXXXXXX`
-TMPFILE_SORT=`mktemp /tmp/req_histories_sorted.XXXXXXXXXX`
-
-# Merge Histories from OSS's, MDS and CLIENT
-
-for NODE in `ls $TMP_DIR_CLIENT` ; do
-	cat $TMP_DIR_CLIENT/$NODE >> $TMPFILE_DEST
-done
-
-# Sort the histories w.r.t XID
-
-sort -t : -k 4,4n $TMPFILE_DEST >> $TMPFILE_SORT
-rm -f $TMPFILE_DEST
-rm -rf $TMP_DIR_CLIENT
-
-echo "XID  	   Target	Service        Seq  	    	   Status"
-awk -F: '{ printf "%-10d %-10s %-15s   %-10d \t   %-15s \n", $4, $7, $8, $1, $6 }' $TMPFILE_SORT
-rm -f $TMPFILE_SORT
diff --git a/lustre/scripts/lustre_rmmod b/lustre/scripts/lustre_rmmod
deleted file mode 100755
index c3065948e096ff00cdc00afb830afb50c895bfd5..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustre_rmmod
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-#
-# remove all lustre modules.  Won't succeed if they're in use, or if you
-# manually did a 'lctl network up'.
-###############################################################################
-
-SRCDIR=`dirname $0`
-PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
-
-case `uname -r` in
-2.4.*) RMMOD="modprobe -r";;
-*) RMMOD="rmmod";;
-esac
-
-lctl modules | awk '{ print $2 }' | xargs $RMMOD >/dev/null 2>&1
-# do it again, in case we tried to unload the lnd's too early
-lctl modules | awk '{ print $2 }' | xargs $RMMOD >/dev/null 2>&1
-# third times the charm
-lsmod | grep lnet > /dev/null && lctl modules | awk '{ print $2 }' | xargs $RMMOD
-
diff --git a/lustre/scripts/lustre_up14 b/lustre/scripts/lustre_up14
deleted file mode 100644
index 9027237be8006847c4bfd9f01a60a02d92b93be7..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustre_up14
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/bash
-#
-# Reads old MDS config logs for transferring to a MGS
-#
-###############################################################################
-
-TMP=${TMP:-/tmp/logs}
-
-# Usage
-usage() {
-	cat >&2 <<EOF
-
-Usage:  `basename $0` <mdsdev> <newfsname>
-
-	<mdsdev>		the MDS disk device (e.g. /dev/sda1)
-	<newfsname>		the name of the new filesystem (e.g. testfs)
-
-	This script will extract old config logs from an MDS device to a
-	temporary location ($TMP). During the upgrade procedure, mount the
-	MGS disk as type ldiskfs (e.g. mount -t ldiskfs /dev/sda
-	/mnt/temp), then copy these logs into the CONFIGS directory on the
-	MGS (e.g. /mnt/temp/CONFIGS).  Logs from many MDS's can be added
-	in this way.  When done, unmount the MGS, and then re-mount it as
-	type lustre to start the service.
-
-EOF
-	exit 1
-}
-
-if [ $# -lt 2 ]; then
-        usage
-fi
-
-DEV=$1
-FSNAME=$2
-DEBUGFS="debugfs -c -R"
-mkdir -p $TMP
-
-FILES=`$DEBUGFS "ls -l LOGS" $DEV | awk '{print $9}' | awk '/[a-z]/ {print $1}'`
-
-for FILE in ${FILES}; do 
-    $DEBUGFS "dump LOGS/$FILE $TMP/temp" $DEV 2> /dev/null
-    MDC=`strings $TMP/temp | grep MDC`
-    LOV=`strings $TMP/temp | grep lov`
-    if [ -n "$MDC" ]; then
-	TYPE=client
-    else
-	if [ -n "$LOV" ]; then
-	    TYPE=MDT0000
-	else
-	    echo "Can't determine type for log '$FILE', skipping"
-	    continue 
-	fi
-    fi
-    echo -n "Copying log '$FILE' to '${FSNAME}-${TYPE}'. Okay [y/n]?"
-    read OK
-    if [ "$OK" = "y" ]; then
-	mv $TMP/temp $TMP/${FSNAME}-${TYPE}
-    else
-	rm $TMP/temp
-    fi
-done
-
-echo ls -l $TMP
-ls -l $TMP
-
diff --git a/lustre/scripts/lustrefs b/lustre/scripts/lustrefs
deleted file mode 100644
index 18c32b1a795a8a43a0e53703ecd74acdfc943a47..0000000000000000000000000000000000000000
--- a/lustre/scripts/lustrefs
+++ /dev/null
@@ -1,124 +0,0 @@
-#!/bin/bash
-#
-# lustrefs      Mount Lustre filesystems.
-#
-# Authors:      Jacob Berkman <jacob@clusterfs.com>
-#
-# Based on the netfs script:
-#
-# Authors:	Bill Nottingham <notting@redhat.com>
-# 		Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
-#
-# chkconfig: - 26 74
-# description: Mounts and unmounts all Lustre mount points.
-#
-### BEGIN INIT INFO
-# Provides: lustrefs
-# Required-Start: $network $remote_fs +sshd +lustre
-# Required-Stop: $network $remote_fs
-# Should-Start: 
-# Should-Stop: 
-# Default-Start: 3 5
-# Default-Stop: 0 1 2 6
-# Short-Description: Mounts and unmounts all Lustre mount points.
-### END INIT INFO
-
-# Source function library.
-if [ -f /etc/init.d/functions ]; then
-   . /etc/init.d/functions
-fi
-
-# Source networking configuration.
-if [ -f /etc/sysconfig/network ]; then
-   . /etc/sysconfig/network
-fi
-
-# Source lsb-functions.
-if [ -f /lib/lsb/init-functions ]; then
-   . /lib/lsb/init-functions
-fi
-
-[ -x /sbin/fuser ] && FUSER=/sbin/fuser
-[ -x /bin/fuser ] && FUSER=/bin/fuser
-
-# Check that networking is up.
-[ "${NETWORKING}" = "no" ] && exit 0
-
-# Red Hat has it's own "action"-function for RHGB-messages.
-lustre_action () {
-	STRING=$1
-	shift
-	if [ $(typeset -F action) ]; then
-		action "$STRING" $*
-		rc=$?
-	else
-		$*
-		rc=$?
-		if [ $rc = 0 ]; then
-			log_success_msg "$STRING"
-		else
-			log_failure_msg "$STRING"
-		fi
-	fi
-	return $rc
-}
-
-LUSTREFSTAB=`LC_ALL=C awk '!/^#/ && $3 == "lustre" && $4 !~ /noauto/ { print $2 }' /etc/fstab`
-LUSTREMTAB=`LC_ALL=C awk '!/^#/ && ($3 ~ "lustre") { print $2 }' /proc/mounts`
-
-# See how we were called.
-case "$1" in
-  start)
-	[ -n "$LUSTREFSTAB" ] && lustre_action $"Mounting Lustre filesystems: " mount -a -t lustre
-	touch /var/lock/subsys/lustrefs
-	;;
-  stop)
-  	[ -n "$LUSTREMTAB" ] && {
-		sig=
-		retry=3
-		remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^lustre/ && $2 != "/" {print $2}' /proc/mounts`
-		while [ -n "$remaining" -a "$retry" -gt 0 ]
-		do
-			if [ "$retry" -lt 3 ]; then
-				lustre_action $"Unmounting Lustre filesystems (retry): " umount -f -a -t lustre
-			else
-				lustre_action $"Unmounting Lustre filesystems: " umount -a -t lustre
-			fi
-			sleep 2
-			remaining=`LC_ALL=C awk '!/^#/ && $3 ~ /^lustre/ && $2 != "/" {print $2}' /proc/mounts`
-			[ -z "$remaining" ] && break
-			$FUSER -k -m $sig $remaining >/dev/null
-			sleep 5
-			retry=$(($retry - 1))
-			sig=-9
-		done
-	}
-	rm -f /var/lock/subsys/lustrefs
-	;;
-  status)
-	if [ -f /proc/mounts ] ; then
-		[ -n "$LUSTREFSTAB" ] && {
-		      echo $"Configured Lustre mountpoints: "
-		      for fs in $LUSTREFSTAB; do echo $fs ; done
-		}
-		[ -n "$LUSTREMTAB" ] && {
-                      echo $"Active Lustre mountpoints: "
-		      for fs in $LUSTREMTAB; do echo $fs ; done
-		}
-	else
-		echo $"/proc filesystem unavailable"
-	fi
-	;;
-  restart)
-	$0 stop
-	$0 start
-	;;
-  reload)
-        $0 start
-	;;
-  *)
-	echo $"Usage: $0 {start|stop|restart|reload|status}"
-	exit 1
-esac
-
-exit 0
diff --git a/lustre/scripts/maketags.sh b/lustre/scripts/maketags.sh
deleted file mode 100755
index 9bd9f8734625d327e615bd805f5188ea5c38f63e..0000000000000000000000000000000000000000
--- a/lustre/scripts/maketags.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2001  Cluster File Systems, Inc.
-#
-# This code is issued under the GNU General Public License.
-# See the file COPYING in this distribution
-set -vx
-rm -f TAGS ; find . -name '*.h' -or -name '*.c' | xargs etags
-rm -f ctags; find . -name '*.h' -or -name '*.c' | xargs ctags
diff --git a/lustre/scripts/nodelustre b/lustre/scripts/nodelustre
deleted file mode 100755
index b5e6540c1398d8eefde780fa162562a11b1b82e4..0000000000000000000000000000000000000000
--- a/lustre/scripts/nodelustre
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /bin/sh
-# nodelustre - Start and stop Lustre on MCR nodes
-# Copyright (C) 2002  Cluster File Systems, Inc.
-# Gord Eagle <gord@clusterfs.com>, 2002-09-10
-
-# Set this to the shared config file.
-MASTER_CONFIG=http://emcri/lustre.xml
-CONFIG=/etc/lustre/lustre.xml
-COMPUTE_NODE=client
-
-LCONF=/usr/local/cfs/lustre/utils/lconf
-WGET=wget
-
-case "$1" in
-start | stop)
-  # Fetch the config file.  We can't use --output-document because it
-  # makes Wget ignore timestamping.
-  if test -n "$MASTER_CONFIG"; then
-    (cd `echo "$CONFIG" | sed 's%/[^/]*$%%'` && \
-      $WGET --timestamping "$MASTER_CONFIG") || exit $?
-  fi
-
-  # Map all client nodes to the COMPUTE_NODE virtual node.
-  if test -n "$COMPUTE_NODE" && nodeattr compute; then
-    node=" --node $COMPUTE_NODE"
-  else
-    node=
-  fi
-
-  # If we're stopping, do the lconf cleanup.
-  if test "$1" = stop; then
-    cleanup=' --cleanup'
-  else
-    cleanup=
-  fi
-
-  $LCONF$cleanup$node "$CONFIG"
-  ;;
-
-*)
-  echo "$0 {start|stop}" 1>&2
-  exit 1
-  ;;
-esac
-
-exit 0
diff --git a/lustre/scripts/system-profile.sh b/lustre/scripts/system-profile.sh
deleted file mode 100755
index 2914d4c29cca2224154ad6e532a668dfcc62f80c..0000000000000000000000000000000000000000
--- a/lustre/scripts/system-profile.sh
+++ /dev/null
@@ -1,233 +0,0 @@
-#!/bin/sh
-
-#	System Profiling Script
-
-TESTS="oprofile iostat vmstat proc_dump"
-
-# common parameters
-export OUTPUTDIR=/home/op
-export KERNELDIR=/usr/src/linux
-export LUSTREDIR=/usr/src/lustre
-export PORTALSDIR=/usr/src/portals
-NAL=socknal
-
-# Params for OPROFILE
-#CTR0_EVENT=CPU_CLK_UNHALTED
-CTR0_COUNT=10000
-
-# for intel Petium 4 onwards... Also requires Unit Mask
-CTR0_EVENT=GLOBAL_POWER_EVENTS  
-CTR0_UNIT_MASK=0x01
-
-# Params for VMSTAT
-VM_SAMPLING=1 
-
-# Params for IOSTAT
-IO_SAMPLING=1  
-
-# Params for PROC DUMP
-export PROC_SAMPLING=2
-
-#-------------------------------------------------------------------
-oprofile_start() {
-	
-	echo `date +%T`": oprofile started...." >>  $OUTPUTDIR/$HOSTNAME/summary
-	op_start --ctr0-event=$CTR0_EVENT --ctr0-count=$CTR0_COUNT --ctr0-unit-mask=$CTR0_UNIT_MASK --vmlinux=${KERNELDIR}/vmlinux 
-	mkdir -p ${OUTPUTDIR}/${HOSTNAME}/oprofile/prof_source/{obdclass,obdecho,osc,ptlrpc,extN,obdfilter,ost,mdc,mds4mds,mds4mds_extN,llite,portals,$NAL}
-	mkdir -p ${OUTPUTDIR}/${HOSTNAME}/oprofile/profiling
-
-}
-
-iostat_start() {
-	echo `date +%T`": iostat started...." >>  $OUTPUTDIR/$HOSTNAME/summary
-
-	mkdir ${OUTPUTDIR}/${HOSTNAME}/iostat
-
-	iostat $IO_SAMPLING > $OUTPUTDIR/$HOSTNAME/iostat/iostat.op &
-        PID=$!
-        echo $PID > $OUTPUTDIR/$HOSTNAME/tmp/iostat.pid
-}
-
-vmstat_start() {
-
-	echo $OUTPUTDIR;
-	echo `date +%T`": vmstat started...." >>  $OUTPUTDIR/$HOSTNAME/summary
-	
-	mkdir ${OUTPUTDIR}/${HOSTNAME}/vmstat
-
-	vmstat $VM_SAMPLING > $OUTPUTDIR/$HOSTNAME/vmstat/vmstat.op &
-        PID=$!
-        echo $PID > $OUTPUTDIR/$HOSTNAME/tmp/vmstat.pid
-}
-
-proc_dump_start() {
-	echo `date +%T`": proc dump started...." >> $OUTPUTDIR/$HOSTNAME/summary
-	sh -c '
-		CTRFILE=/$OUTPUTDIR/$HOSTNAME/tmp/running.$$.pid;
-                echo $$ > ${CTRFILE};
-                while [ -f $CTRFILE ]; do
-			cat /proc/meminfo >> $OUTPUTDIR/$HOSTNAME/meminfo;
-			cat /proc/interrupts >> $OUTPUTDIR/$HOSTNAME/interrupts;
-			cat /proc/net/dev >> $OUTPUTDIR/$HOSTNAME/net-dev;
-                        sleep ${PROC_SAMPLING};
-                done;
-                ' &
-	CTRFILE=/tmp/running.$!.pid
-	echo "proc_dump_ctrl $CTRFILE" >> /tmp/prof-ctrl
-
-}
-
-oprofile_stop() {
-	op_dump
-	op_stop 
-
-	echo `date +%T`": oprofile stopped...." >>  $OUTPUTDIR/$HOSTNAME/summary
-
-	for i in obdclass obdecho osc ptlrpc extN obdfilter mds ost mdc llite
-	do
-		oprofpp -l ${LUSTREDIR}/${i}/${i}.o >  ${OUTPUTDIR}/${HOSTNAME}/oprofile/profiling/${i}.prof 2>/dev/null
-	done
-	oprofpp -l ${LUSTREDIR}/mds/mds_extN.o > ${OUTPUTDIR}/${HOSTNAME}/oprofile/profiling/mds_extN.prof 2>/dev/null
-	oprofpp -l ${PORTALSDIR}/linux/oslib/portals.o > ${OUTPUTDIR}/${HOSTNAME}/oprofile/profiling/portals.prof 2>/dev/null
-	oprofpp -l ${PORTALSDIR}/linux/${NAL}/k${NAL}.o > ${OUTPUTDIR}/${HOSTNAME}/oprofile/profiling/k${NAL}.prof 2>/dev/null
-
-			
-	for i in obdclass obdecho osc ptlrpc extN obdfilter ost mdc llite
-	do
-		op_to_source --source-dir=${LUSTREDIR}/${i}/ --output-dir=${OUTPUTDIR}/${HOSTNAME}/oprofile/prof_source/${i}/ ${LUSTREDIR}/${i}/${i}.o 2>/dev/null
-	done
-
-	op_to_source --source-dir=${LUSTREDIR}/mds/ --output-dir=${OUTPUTDIR}/${HOSTNAME}/oprofile/prof_source/mds4mds/ ${LUSTREDIR}/mds/mds.o 2>/dev/null
-	op_to_source --source-dir=${LUSTREDIR}/mds/ --output-dir=${OUTPUTDIR}/${HOSTNAME}/oprofile/prof_source/mds4mds_extN/  ${LUSTREDIR}/mds/mds_extN.o 2>/dev/null
-		
-	op_to_source --source-dir=${PORTALSDIR}/linux/oslib/ --output-dir=${OUTPUTDIR}/${HOSTNAME}/oprofile/prof_source/portals ${PORTALSDIR}/linux/oslib/portals.o 2>/dev/null
-	op_to_source --source-dir=${PORTALSDIR}/linux/${NAL}/ --output-dir=${OUTPUTDIR}/${HOSTNAME}/oprofile/prof_source/${NAL} ${PORTALSDIR}/linux/${NAL}/k${NAL}.o 2>/dev/null
-
-	op_time -l > ${OUTPUTDIR}/${HOSTNAME}/oprofile/globalprofile 2>/dev/null
-
-}
-
-iostat_stop() {
-	echo `date +%T`": iostat stopped...." >>  $OUTPUTDIR/$HOSTNAME/summary
-	
-	PID=$(cat $OUTPUTDIR/$HOSTNAME/tmp/iostat.pid)
-        kill $PID
-}
-
-vmstat_stop() { 
-	echo `date +%T`": vmstat stopped...." >>  $OUTPUTDIR/$HOSTNAME/summary
-	
-	PID=$(cat $OUTPUTDIR/$HOSTNAME/tmp/vmstat.pid)
-        kill $PID
-}
-
-oprofile_dump() {
-	op_dump;
-}
-
-proc_dump_stop() {
-	echo `date +%T`": proc dump stopped...." >> $OUTPUTDIR/$HOSTNAME/summary
-	CTRFILE=`cat /tmp/prof-ctrl | awk '$1 == "prof_dump_ctrl" {print $2}'`
-	rm -f $CTRFILE
-}
-#-------------------------------------------------------------------
-
-case "$1" in 
-
-	start)
-
-		shift; 
-		while [ ${#*} -gt 1 ]; do 
-		      	case "$1" in
-                        	-k)
-                               		shift;
-					KERNELDIR=$1;
-					;;
-
-                        	-l)
-                             	   	shift;
-                               		LUSTREDIR=$1;
-                                	;;
-                        	-p)
-                             	   	shift;
-                               		PORTALSDIR=$1;
-                                	;;
-
-                        	-o)
-                             	   	shift;
-                               		OUTPUTDIR=$1;
-                                	;;
-	                         *)
-        		                echo unrecognized option $1
-                        	        break;
-                                	;;
-                	esac
-                	shift;
-        	done
-		echo "kerneldir $KERNELDIR" > /tmp/prof-ctrl
-		echo -e "\nlustredir $LUSTREDIR" >> /tmp/prof-ctrl
-		echo -e "\nportalsdir $PORTALSDIR" >> /tmp/prof-ctrl
-		echo -e "\noutputdir $OUTPUTDIR" >> /tmp/prof-ctrl
-
-		if [ -d ${OUTPUTDIR}/${HOSTNAME} ]; then
-			echo "Output already exists"
-			echo "Please take backup and remove it"
-			exit 1
-		fi
-
-		mkdir -p ${OUTPUTDIR}/${HOSTNAME}
-		echo -e "Profiling started on $HOSTNAME" >  ${OUTPUTDIR}/${HOSTNAME}/summary
-		echo -e "\n\nModules Listing on $HOSTNAME" >> ${OUTPUTDIR}/${HOSTNAME}/summary 
-		/sbin/lsmod >> ${OUTPUTDIR}/${HOSTNAME}/summary
-		echo -e "\n\nKernel : " >> ${OUTPUTDIR}/${HOSTNAME}/summary
-		uname -a  >> ${OUTPUTDIR}/${HOSTNAME}/summary
-		echo -e "\n\nPCI Devices : "  >> ${OUTPUTDIR}/${HOSTNAME}/summary
-		lspci -t -v  >> ${OUTPUTDIR}/${HOSTNAME}/summary
-		echo -e "\n\nTests carried out " >> ${OUTPUTDIR}/${HOSTNAME}/summary
- 	
-		mkdir $OUTPUTDIR/$HOSTNAME/tmp
-		for test in $TESTS; do
-			${test}_start;
-		done
-	;;
-	stop)
-		
-		KERNELDIR=`cat /tmp/prof-ctrl | awk '$1 == "kerneldir" {print $2}'`
-		LUSTREDIR=`cat /tmp/prof-ctrl | awk '$1 == "lustredir" {print $2}'`
-		PORTALSDIR=`cat /tmp/prof-ctrl | awk '$1 == "portalsdir" {print $2}'`
-		OUTPUTDIR=`cat /tmp/prof-ctrl | awk '$1 == "outputdir" {print $2}'`
-		for test in $TESTS; do
-			${test}_stop;
-		done
-		
-		rm -rf ${OUTPUTDIR}/$HOSTNAME/tmp	
-		tar -cf ${OUTPUTDIR}/${HOSTNAME}.tar  ${OUTPUTDIR}/${HOSTNAME}
-		echo "Dumped results in ${OUTPUTDIR}/${HOSTNAME}.tar"
-	;;	
-	dump)
-		if "oprofile" in $TESTS; then
-			oprofile_dump;
-		fi
-	;;
-	clean)	
-
-		OUTPUTDIR=`cat /tmp/prof-ctrl | awk '$1 == "outputdir" {print $2}'`
-		echo Deleting directory $OUTPUTDIR/$HOSTNAME ...
-		rm -rf $OUTPUTDIR/$HOSTNAME
-		echo Deleting file $OUTPUTDIR/${HOSTNAME}.tar ...
-		rm -rf $OUTPUTDIR/${HOSTNAME}.tar
-		echo Deleting oprofile samples ...
-		rm -f /var/lib/oprofile/samples/*
-		rm -f /tmp/prof-ctrl
-	;;
-	*)
-		echo $"Usage : $0 {start|stop|dump|clean} [OPTIONS]";
-		echo $"OPTIONS :"
-		echo $" -l lustre_dir"	
-		echo $" -p portals_dir"	
-		echo $" -k kernel_dir"	
-		echo $" -o output_dir"	
-		exit 1
-esac
-
-exit 0
diff --git a/lustre/scripts/version_tag.pl.in b/lustre/scripts/version_tag.pl.in
deleted file mode 100644
index c3416425ea5f8c16f58e875df669cd71df70a32b..0000000000000000000000000000000000000000
--- a/lustre/scripts/version_tag.pl.in
+++ /dev/null
@@ -1,197 +0,0 @@
-#!/usr/bin/perl
-# -*- Mode: perl; indent-tabs-mode: nil; cperl-indent-level: 4 -*-
-
-use strict;
-use diagnostics;
-use IO::File;
-use Time::Local;
-
-my $pristine = 1;
-my $kernver;
-
-# Use the CVS tag first otherwise use the portals version
-sub get_tag()
-{
-    my $tag;
-    my $line;
-
-    my $tagfile = new IO::File;
-    if (!$tagfile->open("lustre/CVS/Tag")) {
-        my $verfile = new IO::File;
-        if (!$verfile->open("config.h")) {
-          return "UNKNOWN";
-        }
-        while(defined($line = <$verfile>)) {
-            $line =~ /\#define VERSION "(.*)"/;
-            if ($1) {
-                $tag = $1;
-                last;
-            }
-        }
-        $verfile->close();
-        return $tag
-    } else {
-        my $tmp = <$tagfile>;
-        $tagfile->close();
-
-        $tmp =~ m/T(.*)/;
-        return $1;
-    }
-}
-
-sub get_latest_mtime()
-{
-    my %months=("Jan" => 0, "Feb" => 1, "Mar" => 2, "Apr" => 3, "May" => 4,
-                "Jun" => 5, "Jul" => 6, "Aug" => 7, "Sep" => 8, "Oct" => 9,
-                "Nov" => 10, "Dec" => 11);
-
-    my $last_mtime = 0;
-    my @entries = `find . -name Entries`;
-    my $entry_file;
-    foreach $entry_file (@entries) {
-        chomp($entry_file);
-        my $entry = new IO::File;
-        if (!$entry->open($entry_file)) {
-            die "unable to open $entry_file: $!\n";
-        }
-        my $line;
-        while (defined($line = <$entry>)) {
-            chomp($line);
-            #print "line: $line\n";
-            my ($junk, $file, $version, $date) = split(/\//, $line);
-
-            #print "junk: $junk\nfile: $file\nver: $version\ndate: $date\n";
-            #print "last_mtime: " . localtime($last_mtime) . "\n";
-
-            if ($junk eq "D" ||
-                $file eq "lustre.spec.in" ||
-                $file !~ m/\.(c|h|am|in)$/) {
-                next;
-            }
-
-            my $cur_dir = $entry_file;
-            $cur_dir =~ s/\/CVS\/Entries$//;
-            my @statbuf = stat("$cur_dir/$file");
-            my $mtime = $statbuf[9];
-            if (!defined($mtime)) {
-                next;
-            }
-            my $local_date = gmtime($mtime);
-            if ($local_date ne $date &&
-                $file ne "lustre.spec.in") {
-                #print "$file : " . localtime($mtime) . "\n";
-                $pristine = 0;
-            }
-
-            if ($mtime > $last_mtime) {
-                $last_mtime = $mtime;
-            }
-
-            if ($date) {
-                my @t = split(/ +/, $date);
-                if (int(@t) != 5) {
-                    #print "skipping: $date\n";
-                    next;
-                }
-                my ($hours, $min, $sec) = split(/:/, $t[3]);
-                my ($mon, $mday, $year) = ($t[1], $t[2], $t[4]);
-                my $secs = 0;
-                $mon = $months{$mon};
-                $secs = timelocal($sec, $min, $hours, $mday, $mon, $year);
-                if ($secs > $last_mtime) {
-                    $last_mtime = $secs;
-                }
-            }
-        }
-        $entry->close();
-    }
-    return $last_mtime;
-}
-
-sub get_linuxdir()
-{
-    my $config = new IO::File;
-    my ($line, $dir);
-    if (!$config->open("Makefile")) {
-        die "Run ./configure first\n";
-    }
-    while (defined($line = <$config>)) {
-        chomp($line);
-        if ($line =~ /LINUX :?= (.*)/) {
-            $dir = $1;
-            last;
-        }
-    }
-    $config->close();
-    my $ver = new IO::File;
-    if (!$ver->open("$dir/include/linux/version.h")) {
-        die "Run make dep on $dir\n";
-    }
-    while(defined($line = <$ver>)) {
-        $line =~ /\#define UTS_RELEASE "(.*)"/;
-        if ($1) {
-            $kernver = $1;
-            last;
-        }
-    }
-    $ver->close();
-    chomp($kernver);
-    $dir =~ s/\//\./g;
-    return $dir;
-}
-
-sub generate_ver($$$)
-{
-    my $tag = shift;
-    my $mtime = shift;
-    my $linuxdir = shift;
-
-    #print "localtime: " . localtime($mtime) . "\n";
-
-    my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) =
-      localtime($mtime);
-    $year += 1900;
-    $mon++;
-    my $show_last = sprintf("%04d%02d%02d%02d%02d%02d", $year, $mon, $mday,
-                            $hour, $min, $sec);
-
-    print "#define BUILD_VERSION \"";
-
-    my $lustre_vers = $ENV{LUSTRE_VERS};
-
-    if ($lustre_vers) {
-        print "$tag-$lustre_vers\"\n";
-    } elsif ($pristine) {
-        print "$tag-$show_last-PRISTINE-$linuxdir-$kernver\"\n";
-    } else {
-        print "$tag-$show_last-CHANGED-$linuxdir-$kernver\"\n";
-    }
-}
-chomp(my $cwd = `pwd`);
-
-# ARGV[0] = srcdir
-# ARGV[1] = builddir
-
-# for get_latest_mtime and get_tag you need to be in srcdir
-
-if ($ARGV[0]) {
-    chdir($ARGV[0]);
-}
-my $tag = get_tag();
-my $mtime = get_latest_mtime();
-
-# for get_linuxdir you need to be in builddir
-
-#if ($ARGV[1]) {
-#   chdir($cwd);
-#   chdir($ARGV[1]);
-#}
-#my $linuxdir = get_linuxdir();
-
-my $linuxdir = '@LINUX@';
-$linuxdir =~ s/\//\./g;
-$kernver = '@LINUXRELEASE@';
-
-generate_ver($tag, $mtime, $linuxdir);
-
-exit(0);
diff --git a/lustre/tests/.cvsignore b/lustre/tests/.cvsignore
deleted file mode 100644
index 93d391b085d374d6485b82466f098e3f6e7c317b..0000000000000000000000000000000000000000
--- a/lustre/tests/.cvsignore
+++ /dev/null
@@ -1,78 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-Makefile.in
-.deps
-TAGS
-openunlink
-testreq
-truncate
-directio
-openme
-writeme
-mcreate
-munlink
-mlink
-tchmod
-toexcl
-fsx
-test_brw
-newfile
-openclose
-createdestroy
-createmany
-statmany
-mkdirmany
-lovstripe
-*.xml
-stat
-setuid
-multifstat
-checkstat
-wantedi
-createtest
-open_delay
-statone
-opendevunlink
-opendirunlink
-runas
-openfile
-unlinkmany
-fchdir_test
-*.cmd
-getdents
-o_directory
-mkdirdeep
-utime
-small_write
-multiop
-sleeptest
-write_disjoint
-write_append_truncate
-ll_sparseness_verify
-ll_sparseness_write
-mrename
-cmknod
-iopentest1
-iopentest2
-XMLCONFIG
-*.log
-logs
-ostactive
-ll_dirstripe_verify
-openfilleddirunlink
-copy_attr
-rename_many
-memhog
-mmap_sanity
-rmdirmany
-flock_test
-flocks_test
-writemany
-random-reads
-chownmany
-llverdev
-llverfs
-ll_getstripe_info
diff --git a/lustre/tests/2ost.sh b/lustre/tests/2ost.sh
deleted file mode 100644
index 57ddc08036830859b0926bd753bb0ee55ab919e3..0000000000000000000000000000000000000000
--- a/lustre/tests/2ost.sh
+++ /dev/null
@@ -1,54 +0,0 @@
-#!/bin/bash
-
-export PATH=`dirname $0`/../utils:$PATH
-
-config=${1:-`basename $0 .sh`.xml}
-
-LMC="${LMC:-lmc} -m $config"
-TMP=${TMP:-/tmp}
-
-HOSTNAME=`hostname`
-
-MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`}
-MDSSIZE=${MDSSIZE:-400000}
-FSTYPE=${FSTYPE:-ext3}
-MOUNT=${MOUNT:-/mnt/lustre}
-MOUNT2=${MOUNT2:-${MOUNT}2}
-NETTYPE=${NETTYPE:-tcp}
-
-OSTDEV=${OSTDEV:-$TMP/ost-`hostname`}
-OSTSIZE=${OSTSIZE:-400000}
-
-# specific journal size for the ost, in MB
-JSIZE=${JSIZE:-0}
-[ "$JSIZE" -gt 0 ] && JARG="--journal_size $JSIZE"
-MDSISIZE=${MDSISIZE:-0}
-[ "$MDSISIZE" -gt 0 ] && IARG="--inode_size $MDSISIZE"
-
-STRIPE_BYTES=${STRIPE_BYTES:-1048576}
-STRIPES_PER_OBJ=0	# 0 means stripe over all OSTs
-
-rm -f $config
-
-# create nodes
-${LMC} --add node --node $HOSTNAME || exit 10
-${LMC} --add net --node  $HOSTNAME --nid `hostname` --nettype $NETTYPE || exit 11
-${LMC} --add net --node client --nid '*' --nettype $NETTYPE || exit 12
-
-# configure mds server
-${LMC} --add mds --node $HOSTNAME --mds mds1 --fstype $FSTYPE \
-	--dev $MDSDEV --size $MDSSIZE $JARG $IARG $MDSOPT || exit 20
-
-# configure ost
-${LMC} -m $config --add lov --lov lov1 --mds mds1 --stripe_sz $STRIPE_BYTES \
-	--stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0 $LOVOPT || exit 20
-${LMC} --add ost --ost ost1 --node $HOSTNAME --lov lov1 \
-	--fstype $FSTYPE --dev $OSTDEV --size $OSTSIZE $JARG $OSTOPT || exit 30
-${LMC} --add ost --ost ost2 --node $HOSTNAME --lov lov1 \
-	--fstype $FSTYPE --dev ${OSTDEV}2 --size $OSTSIZE $JARG $OSTOPT || exit 30
-
-# create client config
-${LMC} --add mtpt --node $HOSTNAME --path $MOUNT --mds mds1 --lov lov1 \
-	$CLIENTOPT || exit 40
-${LMC} --add mtpt --node client --path $MOUNT2 --mds mds1 --lov lov1 \
-	$CLIENTOPT || exit 41
diff --git a/lustre/tests/Makefile.am b/lustre/tests/Makefile.am
deleted file mode 100644
index 305ff0e500d5ad15807319840a913c25ec324229..0000000000000000000000000000000000000000
--- a/lustre/tests/Makefile.am
+++ /dev/null
@@ -1,63 +0,0 @@
-# Lustre test Makefile
-AM_CPPFLAGS = $(LLCPPFLAGS) -I/opt/lam/include -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DLUSTRE_UTILS
-AM_CFLAGS = $(LLCFLAGS)
-# LDADD = -lldap
-# LDADD := -lreadline -ltermcap # -lefence
-
-noinst_DATA = disk1_4.zip
-noinst_SCRIPTS = leak_finder.pl llecho.sh llmount.sh llmountcleanup.sh
-noinst_SCRIPTS += test-framework.sh runvmstat runiozone runtests
-noinst_SCRIPTS += sanity.sh rundbench acceptance-small.sh compile.sh
-noinst_SCRIPTS += conf-sanity.sh insanity.sh lfscktest.sh oos.sh oos2.sh
-noinst_SCRIPTS += llog-test.sh recovery-small.sh replay-dual.sh sanity-quota.sh
-noinst_SCRIPTS += replay-ost-single.sh replay-single.sh run-llog.sh sanityN.sh
-noinst_SCRIPTS += lockorder.sh socketclient socketserver runmultiop_bg_pause
-nobase_noinst_SCRIPTS = cfg/insanity-local.sh
-nobase_noinst_SCRIPTS += cfg/local.sh acl/make-tree acl/run
-nobase_noinst_DATA = acl/cp.test acl/getfacl-noacl.test acl/inheritance.test
-nobase_noinst_DATA += acl/misc.test acl/permissions.test acl/setfacl.test
-
-EXTRA_DIST = $(noinst_SCRIPTS) $(noinst_DATA) \
-             $(nobase_noinst_SCRIPTS) $(nobase_noinst_DATA)
-
-if TESTS
-noinst_PROGRAMS = openunlink truncate directio openme writeme mlink utime it_test
-noinst_PROGRAMS += tchmod toexcl fsx test_brw openclose createdestroy
-noinst_PROGRAMS += createmany chownmany statmany multifstat createtest
-noinst_PROGRAMS += opendirunlink opendevunlink unlinkmany fchdir_test checkstat
-noinst_PROGRAMS += wantedi statone runas openfile getdents o_directory rmdirmany
-noinst_PROGRAMS += small_write multiop sleeptest ll_sparseness_verify cmknod
-noinst_PROGRAMS += ll_sparseness_write mrename ll_dirstripe_verify mkdirmany
-noinst_PROGRAMS += openfilleddirunlink rename_many memhog iopentest1 iopentest2
-noinst_PROGRAMS += mmap_sanity flock_test writemany random-reads flocks_test
-noinst_PROGRAMS += ll_getstripe_info
-if MPITESTS
-noinst_PROGRAMS += parallel_grouplock write_append_truncate createmany_mpi
-endif
-# noinst_PROGRAMS += ldaptest copy_attr mkdirdeep 
-bin_PROGRAMS = mcreate munlink
-testdir = $(libdir)/lustre/tests
-test_SCRIPTS = $(noinst_SCRIPTS) $(noinst_PROGRAMS)
-nobase_test_SCRIPTS = $(nobase_noinst_SCRIPTS)
-test_DATA = $(noinst_DATA)
-nobase_test_DATA = $(nobase_noinst_DATA)
-endif # TESTS
-
-# mkdirdeep_LDADD=-L$(top_builddir)/lnet/utils -lptlctl $(LIBREADLINE)
-mmap_sanity_SOURCES= mmap_sanity.c
-
-LIBLUSTREAPI := $(top_builddir)/lustre/utils/liblustreapi.a
-ll_getstripe_info_LDADD=$(LIBLUSTREAPI)
-multiop_LDADD=$(LIBLUSTREAPI)
-
-if MPITESTS
-LAM_LD_FLAGS=-L/opt/lam/lib -lmpi -llam -lpthread
-write_append_truncate_SOURCES=write_append_truncate.c
-write_append_truncate_LDADD=$(LAM_LD_FLAGS)
-createmany_mpi_SOURCES=createmany-mpi.c
-createmany_mpi_LDADD=$(LAM_LD_FLAGS)
-parallel_grouplock_SOURCES=parallel_grouplock.c lp_utils.c
-parallel_grouplock_LDADD=$(LAM_LD_FLAGS)
-endif
-
-#copy_attr_LDADD= -lattr
diff --git a/lustre/tests/README b/lustre/tests/README
deleted file mode 100644
index 00634a77eb61ae98021baab7938cf797d46d7b67..0000000000000000000000000000000000000000
--- a/lustre/tests/README
+++ /dev/null
@@ -1,85 +0,0 @@
-1. How to build .xml configs:
-The various .xml configs in the tests/ directory are built by running the
-corresponding .sh script.  The .sh script runs a series of lmc (Lustre make
-config) commands in order to build up an XML file.  It is much easier to
-simply edit a .sh script and rebuild your XML config file than trying to
-edit the XML directly.
-
-For a loopback setup with a mounted filesystem, you could do something like:
-
-   sh local.sh
-   ../utils/lconf --reformat local.xml
-
-This will configure an MDS, an OBD/OST, and a filesystem client all running
-on the same system and communicating over the TCP loopback interface.  If
-the --reformat option is given, then the OST and MDS devices will be
-formatted.  This is required the first time you set up the system, or if
-you think you have corrupted the filesystems after you hit a bug.
-
-A more complex configuration, using a separate host for each of the MDS,
-OBD/OST, and filesystem client functions is in uml.sh.  It configures 3
-systems, and the OST system (uml2) serves up multiple OST devices, and
-the client accesses these via a logical object volume (LOV) driver (which
-essentially stripes both of the OST devices into a single storage device.
-
-This configuration could be run on any 3 systems with the following commands:
-
-    sh uml.sh
-    system1# ../utils/lconf --reformat --node uml1 uml.xml
-    system2# ../utils/lconf --reformat --node uml2 uml.xml
-    system3# ../utils/lconf --node uml3 uml.xml
-
-The "--node <name>" parameter tells lconf to use the configuration for
-the node "name" in the XML configuration file.  If the hostnames were
-already "uml1", "uml2", and "uml3", then the "--node" parameter would
-not need to be given.  The internals of lconf and portals handle the
-configuration details for setting up netowrking.
-
-2. runregression-net.sh and runregression-brw.sh
-
-This test performs raw block and attribute requests against a real or
-"null" OST device.  It is useful for generating isolated load on the
-OST device, while avoiding the need to run tests through the filesystem.
-This can be useful for testing the network part of Lustre in isolation,
-or doing RPC and bulk I/O performance tests against an OST.
-
-If things are alright it goes through a series of tests single threaded,
-multithreaded, using getattr and brw (both read and write, with single
-page and vector I/O, doing basic data checking of each page).
-
-You can create a simple echo client by running the "llecho.sh" to
-run the tests locally (over TCP loopback), or edit llecho.sh to
-specify the SERVER and CLIENT names.  You would then set up as normal:
-
-    # if you are using a remote server, first run:
-    server# ../utils/lconf echo.xml
-
-Configure the client (or if you are running a single system only):
-
-    client# ../utils/lconf echo.xml
-    client# sh runregression-net.sh
-
-3. runtests
-
-The runtests script does a series of simple file-based tests using a
-filesystem.  You need to have an XML file as appropriate for your setup
-(one or more hosts, including an MDS, one or more OSTs, and a mountpoint).
-If the MDS and/or OST is on a remote machine, configure them first:
-
-    ../utils/lconf --reformat <conf>.xml
-
-On the client machine, the runtests script needs the XML configuration
-file as a command-line parameter, as it mounts and unmounts the filesystem
-several times during the test in order to verify that the data is still
-there as expected (ensures that it makes it to disk instead of just into
-the filesystem cache).  If you are running on only a single machine, you
-can just use runtests directly.  If this is only a client machine, the
---reformat parameter is not needed (it will not do anything).
-
-    sh runtests [--reformat] <conf>.xml
-
-This creates a few simple files and directories first, and then untars
-a copy of the /etc filesystem into the Lustre filesystem.  It then does
-data verification both before and after the filesystem is remounted, and
-finally deletes all of the files and verifies that the amount of space
-left in the filesystem is (nearly) the same as it was before the test.
diff --git a/lustre/tests/acceptance-metadata-double.sh b/lustre/tests/acceptance-metadata-double.sh
deleted file mode 100644
index 9c9df63b17fb3ac0d5f6e8de2a9c8f4e1e09634f..0000000000000000000000000000000000000000
--- a/lustre/tests/acceptance-metadata-double.sh
+++ /dev/null
@@ -1,128 +0,0 @@
-#!/bin/sh
-set -e
-
-#
-# Runs create.pl and rename.pl on two mountpoints with increasing load, varying
-# debug levels.  Assumes that the node is already setup with llmount2.sh
-#
-
-SRCDIR="`dirname $0`"
-CREATE=$SRCDIR/create.pl
-RENAME=$SRCDIR/rename.pl
-
-TIME=${TIME:-/usr/bin/time}
-
-display_elapsed_time() {
-    PREVIOUS_TS=$CURRENT_TS
-    CURRENT_TS=`date +%s`
-    BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS`
-    TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS`
-
-    echo " "
-    echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds"
-    echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds"
-    echo " "
-}    
-
-debug_client_on()
-{
-	echo -1 > /proc/sys/lnet/debug
-}
-
-debug_client_off()
-{
-	echo 0x3f0400 > /proc/sys/lnet/debug
-}
-
-MNT=${MNT:-/mnt/lustre}
-
-# Get our initial timestamps.
-START_TS=`date +%s`
-CURRENT_TS=$START_TS
-PREVIOUS_TS=$START_TS
-
-debug_client_on
-echo "create.pl, 2 mounts, 1 thread, 10 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10
-echo "create.pl, 2 mounts, 1 thread, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 10 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=10 --use_mcreate=0
-echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 1 thread, 10 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=10
-echo "rename.pl, 2 mounts, 1 thread, 100 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=100 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 2 mounts, 1 thread, 1000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 1 thread, 1000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=1000 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 1 thread, 1000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --silent
-
-display_elapsed_time
-
-debug_client_on
-echo "create.pl, 2 mounts, 2 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 2 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=2 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 2 thread, 1000 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=1000 --num_threads=2 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 2 mounts, 2 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 2 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 2 threads, 2000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=2 --silent
-
-display_elapsed_time
-
-debug_client_on
-echo "create.pl, 2 mounts, 4 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 4 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=100 --num_threads=4 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 2 mounts, 4 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 4 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 4 threads, 2000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=4 --silent
-
-display_elapsed_time
-
-debug_client_on
-echo "create.pl, 2 mounts, 8 threads, 500 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 8 threads, 500 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=500 --num_threads=8 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 2 mounts, 8 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
-echo "create.pl --use_mcreate=0, 2 mounts, 8 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --use_mcreate=0 --silent
-echo "rename.pl, 2 mounts, 8 threads, 2000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=2 --iterations=2000 --num_threads=8 --silent
-
-display_elapsed_time
diff --git a/lustre/tests/acceptance-metadata-parallel.sh b/lustre/tests/acceptance-metadata-parallel.sh
deleted file mode 100644
index e302ecf75db7081b6f44daab380ecb4798d61825..0000000000000000000000000000000000000000
--- a/lustre/tests/acceptance-metadata-parallel.sh
+++ /dev/null
@@ -1,105 +0,0 @@
-#!/bin/sh
-set -e
-
-#########################################################################
-# Runs create.pl on a single mountpoint and directory with increasing
-# load across multiple clients.
-#########################################################################
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-LTESTDIR=${LTESTDIR:-$LUSTRE/../ltest}
-PATH=$LUSTRE/utils:$LUSTRE/tests:$PATH
- 
-RLUSTRE=${RLUSTRE:-$LUSTRE}
-RPWD=${RPWD:-$PWD}
- 
-. $LUSTRE/tests/test-framework.sh
-
-TIME=${TIME:-/usr/bin/time}
-PDSH=${PDSH:-"pdsh -S -w"}
-MOUNTPT=${MOUNTPT:-"/mnt/lustre"}
-
-CREATE=$LUSTRE/tests/create.pl
-RENAME=$LUSTRE/tests/rename.pl
-
-[ -z "$CLIENTS" ] && exit 1
-#CLIENTS=`comma_list $CLIENTS`
-
-display_elapsed_time() {
-    PREVIOUS_TS=$CURRENT_TS
-    CURRENT_TS=`date +%s`
-    BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS`
-    TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS`
-
-    echo " "
-    echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds"
-    echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds"
-    echo " "
-}    
-
-set_debug_level() 
-{
-    $PDSH $CLIENTS "echo $1 > /proc/sys/lnet/debug"
-}
-
-debug_client_on()
-{
-    set_debug_level -1
-}
-
-debug_client_partial()
-{
-    set_debug_level 0x3f0400
-}
-
-debug_client_off()
-{
-    set_debug_level 0
-}
-
-# Get our initial timestamps.
-START_TS=`date +%s`
-CURRENT_TS=$START_TS
-PREVIOUS_TS=$START_TS
-
-debug_client_off
-
-echo "create.pl, 1 mount, 1 thread, 1000 ops"
-$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --silent"
-#echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent"
-wait
-#echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=1000 --silent"
-
-display_elapsed_time
-
-echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off"
-$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent"
-#echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0  --silent"
-wait
-#echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent#
-
-display_elapsed_time
-
-echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off"
-$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4  --silent"
-#echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4  --use_mcreate=0 --silent"
-wait
-#echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent"
-
-display_elapsed_time
-
-echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off"
-$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8  --silent"
-#echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $CREATE --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8  --use_mcreate=0 --silent"
-wait
-#echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off"
-#$TIME $PDSH $CLIENTS "umask 0022 && cd $RLUSTRE/tests && perl $RENAME --mountpt=${MOUNTPT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent"
-
-display_elapsed_time
diff --git a/lustre/tests/acceptance-metadata-single.sh b/lustre/tests/acceptance-metadata-single.sh
deleted file mode 100644
index ad927fab5dd65d94be697cccac7f2c0e35ce8b30..0000000000000000000000000000000000000000
--- a/lustre/tests/acceptance-metadata-single.sh
+++ /dev/null
@@ -1,153 +0,0 @@
-#!/bin/sh
-set -e
-
-#
-# Runs create.pl and rename.pl on a single mountpoint with increasing
-# load, varying debug levels
-#
-
-SRCDIR="`dirname $0`"
-CREATE=$SRCDIR/create.pl
-RENAME=$SRCDIR/rename.pl
-
-TIME=${TIME:-/usr/bin/time}
-
-display_elapsed_time() {
-    PREVIOUS_TS=$CURRENT_TS
-    CURRENT_TS=`date +%s`
-    BLOCK_ELAPSED=`expr $CURRENT_TS - $PREVIOUS_TS`
-    TOTAL_ELAPSED=`expr $CURRENT_TS - $START_TS`
-
-    echo " "
-    echo "Elapsed time (block): ${BLOCK_ELAPSED} seconds"
-    echo "Elapsed time (TOTAL): ${TOTAL_ELAPSED} seconds"
-    echo " "
-}    
-
-debug_client_on()
-{
-	echo -1 > /proc/sys/lnet/debug
-}
-
-debug_client_off()
-{
-	echo 0x3f0400 > /proc/sys/lnet/debug
-}
-
-MNT=${MNT:-/mnt/lustre}
-
-# Get our initial timestamps.
-START_TS=`date +%s`
-CURRENT_TS=$START_TS
-PREVIOUS_TS=$START_TS
-
-debug_client_on
-echo "create.pl, 1 mount, 1 thread, 10 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10
-echo "create.pl, 1 mount, 1 thread, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent
-echo "create.pl --mcreate=0, 1 mount, 1 thread, 10 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=10 --use_mcreate=0
-echo "create.pl --mcreate=0, 1 mount, 1 thread, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 1 thread, 10 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=10
-echo "rename.pl, 1 mount, 1 thread, 100 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=100 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 1 mount, 1 thread, 1000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent
-echo "create.pl --mcreate=0, 1 mount, 1 thread, 1000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 1 thread, 1000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --silent
-
-display_elapsed_time
-
-debug_client_on
-echo "create.pl, 1 mount, 2 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --silent
-echo "create.pl --mcreate=0, 1 mount, 2 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=2 --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 2 thread, 1000 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=1000 --num_threads=2 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 1 mount, 2 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent
-echo "create.pl --mcreate=0, 1 mount, 2 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --use_mcreate=0  --silent
-wait
-echo "rename.pl, 1 mount, 2 threads, 2000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=2 --silent
-
-display_elapsed_time
-
-debug_client_on
-echo "create.pl, 1 mount, 4 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --silent
-echo "create.pl --mcreate=0, 1 mount, 4 threads, 100 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=100 --num_threads=4 --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 1 mount, 4 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4  --silent
-echo "create.pl --mcreate=0, 1 mount, 4 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4  --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 4 threads, 2000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=4 --silent
-
-display_elapsed_time
-
-debug_client_on
-echo "create.pl, 1 mount, 8 threads, 500 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8  --silent
-echo "create.pl --mcreate=0, 1 mount, 8 threads, 500 ops, debug on"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=500 --num_threads=8  --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug on"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent
-
-display_elapsed_time
-
-debug_client_off
-echo "create.pl, 1 mount, 8 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8  --silent
-echo "create.pl --mcreate=0, 1 mount, 8 threads, 2000 ops, debug off"
-$TIME perl $CREATE --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8  --use_mcreate=0 --silent
-echo "rename.pl, 1 mount, 8 threads, 2000 ops, debug off"
-$TIME perl $RENAME --mountpt=${MNT} --num_mounts=-1 --iterations=2000 --num_threads=8 --silent
-
-display_elapsed_time
-
-$TIME sh rundbench 1
-
-display_elapsed_time
-
-$TIME sh rundbench 2
-
-display_elapsed_time
-
-$TIME sh rundbench 4
-
-display_elapsed_time
-
-$TIME sh rundbench 8
-
-display_elapsed_time
-
-$TIME sh rundbench 16
-
-display_elapsed_time
-
-$TIME sh rundbench 32
-
-display_elapsed_time
diff --git a/lustre/tests/acceptance-small.sh b/lustre/tests/acceptance-small.sh
deleted file mode 100755
index 4a7142fb568133461c3d8c1aa420247c1c379ee9..0000000000000000000000000000000000000000
--- a/lustre/tests/acceptance-small.sh
+++ /dev/null
@@ -1,345 +0,0 @@
-#!/bin/bash
-# script which _must_ complete successfully (at minimum) before checkins to
-# the CVS HEAD are allowed.
-#set -vx
-set -e
-
-PATH=`dirname $0`/../utils:$PATH
-
-[ -z "$CONFIG" -a "$NAME" ] && CONFIGS=$NAME
-[ "$CONFIGS" ] || CONFIGS="local"  #"local lov"
-[ "$MAX_THREADS" ] || MAX_THREADS=20
-RAMKB=`awk '/MemTotal:/ { print $2 }' /proc/meminfo`
-if [ -z "$THREADS" ]; then
-	THREADS=$((RAMKB / 16384))
-	[ $THREADS -gt $MAX_THREADS ] && THREADS=$MAX_THREADS
-fi
-[ "$SIZE" ] || SIZE=$((RAMKB * 2))
-[ "$RSIZE" ] || RSIZE=512
-[ "$UID" ] || UID=1000
-[ "$MOUNT" ] || MOUNT=/mnt/lustre
-[ "$MOUNT2" ] || MOUNT2=${MOUNT}2
-[ "$TMP" ] || TMP=/tmp
-[ "$COUNT" ] || COUNT=1000
-[ "$DEBUG_LVL" ] || DEBUG_LVL=0
-[ "$DEBUG_OFF" ] || DEBUG_OFF="eval sysctl -w lnet.debug=\"$DEBUG_LVL\""
-[ "$DEBUG_ON" ] || DEBUG_ON="eval sysctl -w lnet.debug=0x33f0484"
-
-export TESTSUITE_LIST="RUNTESTS SANITY DBENCH BONNIE IOZONE FSX SANITYN LFSCK LIBLUSTRE REPLAY_SINGLE CONF_SANITY RECOVERY_SMALL REPLAY_OST_SINGLE REPLAY_DUAL INSANITY SANITY_QUOTA"
-
-if [ "$ACC_SM_ONLY" ]; then
-    for O in $TESTSUITE_LIST; do
-	export ${O}="no"
-    done
-    for O in $ACC_SM_ONLY; do
-	O=`echo $O | tr "[:lower:]" "[:upper:]"`
-	export ${O}="yes"
-    done
-fi
-
-LIBLUSTRETESTS=${LIBLUSTRETESTS:-../liblustre/tests}
-
-STARTTIME=`date +%s`
-RANTEST=""
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-
-SETUP=${SETUP:-setupall}
-FORMAT=${FORMAT:-formatall}
-CLEANUP=${CLEANUP:-stopall}
-
-setup_if_needed() {
-    mount | grep $MOUNT && return
-    $FORMAT && $SETUP
-}
-
-title() {
-    log "-----============= acceptance-small: "$*" ============----- `date`"
-    RANTEST=${RANTEST}$*", "
-}
-
-for NAME in $CONFIGS; do
-	export NAME MOUNT START CLEAN
-	. $LUSTRE/tests/cfg/$NAME.sh
-
-	if [ ! -f /lib/modules/$(uname -r)/kernel/fs/lustre/mds.ko -a \
-	    ! -f `dirname $0`/../mds/mds.ko ]; then
-	    export CLIENTMODSONLY=true
-	fi
-	
-	assert_env mds_HOST MDS_MKFS_OPTS MDSDEV
-	assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
-	assert_env FSNAME MOUNT MOUNT2
-
-	setup_if_needed
-
-	if [ "$RUNTESTS" != "no" ]; then
-	        title runtests
-		bash runtests
-		$CLEANUP
-		$SETUP
-		RUNTESTS="done"
-	fi
-
-	if [ "$SANITY" != "no" ]; then
-	        title sanity
-		MOUNT2="" bash sanity.sh
-		$CLEANUP
-		$SETUP
-		SANITY="done"
-	fi
-
-	which dbench > /dev/null 2>&1 || DBENCH=no
-	if [ "$DBENCH" != "no" ]; then
-	        title dbench
-		DBENCHDIR=$MOUNT/$HOSTNAME
-		mkdir -p $DBENCHDIR
-		SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
-		DB_THREADS=$((SPACE / 50000))
-		[ $THREADS -lt $DB_THREADS ] && DB_THREADS=$THREADS
-
-		$DEBUG_OFF
-		myUID=$RUNAS_ID
-		myRUNAS=$RUNAS
-		FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
-		chown $myUID:$myUID $DBENCHDIR
-		duration=""
-		[ "$SLOW" = "no" ] && duration=" -t 120"
-		if [ "$SLOW" != "no" -o $DB_THREADS -eq 1 ]; then
-			DIR=$DBENCHDIR $myRUNAS bash rundbench 1 $duration
-			$DEBUG_ON
-			$CLEANUP
-			$SETUP
-		fi
-		if [ $DB_THREADS -gt 1 ]; then
-			$DEBUG_OFF
-			DIR=$DBENCHDIR $myRUNAS bash rundbench $DB_THREADS $duration
-			$DEBUG_ON
-			$CLEANUP
-			$SETUP
-		fi
-		rm -rf $DBENCHDIR
-		DBENCH="done"
-	fi
-
-	which bonnie++ > /dev/null 2>&1 || BONNIE=no
-	if [ "$BONNIE" != "no" ]; then
-	        title bonnie
-		BONDIR=$MOUNT/d0.bonnie
-		mkdir -p $BONDIR
-		$LFS setstripe -c -1 $BONDIR
-		sync
-		MIN=`cat /proc/fs/lustre/osc/*/kbytesavail | sort -n | head -n1`
-		SPACE=$(( OSTCOUNT * MIN ))
-		[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
-		log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
-		$DEBUG_OFF
-		myUID=$RUNAS_ID
-		myRUNAS=$RUNAS
-		FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
-		chown $myUID:$myUID $BONDIR		
-		$myRUNAS bonnie++ -f -r 0 -s$((SIZE / 1024)) -n 10 -u$myUID:$myUID -d$BONDIR
-		$DEBUG_ON
-		$CLEANUP
-		$SETUP
-		BONNIE="done"
-	fi
-
-	export O_DIRECT
-	[ "$SLOW" = "no" ] && export IOZONE=no # 5 minutes
-
-	which iozone > /dev/null 2>&1 || IOZONE=no
-	if [ "$IOZONE" != "no" ]; then
-	        title iozone
-		IOZDIR=$MOUNT/d0.iozone
-		mkdir -p $IOZDIR
-		$LFS setstripe -c -1 $IOZDIR
-		sync
-		MIN=`cat /proc/fs/lustre/osc/*/kbytesavail | sort -n | head -n1`
-		SPACE=$(( OSTCOUNT * MIN ))
-		[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
-		log "min OST has ${MIN}kB available, using ${SIZE}kB file size"
-		IOZONE_OPTS="-i 0 -i 1 -i 2 -e -+d -r $RSIZE -s $SIZE"
-		IOZFILE="$IOZDIR/iozone"
-		# $SPACE was calculated with all OSTs
-		$DEBUG_OFF
-		myUID=$RUNAS_ID
-		myRUNAS=$RUNAS
-		FAIL_ON_ERROR=false check_runas_id_ret $myUID $myRUNAS || { myRUNAS="" && myUID=$UID; }
-		chown $myUID:$myUID $IOZDIR
-		$myRUNAS iozone $IOZONE_OPTS -f $IOZFILE
-		$DEBUG_ON
-		$CLEANUP
-		$SETUP
-
-		# check if O_DIRECT support is implemented in kernel
-		if [ -z "$O_DIRECT" ]; then
-			touch $MOUNT/f.iozone
-			if ! ./directio write $MOUNT/f.iozone 0 1; then
-				O_DIRECT=no
-			fi
-			rm -f $MOUNT/f.iozone
-		fi
-		if [ "$O_DIRECT" != "no" -a "$IOZONE_DIR" != "no" ]; then
-			$DEBUG_OFF
-			# cd TMP to have write permission for tmp file iozone writes
-			( cd $TMP && $myRUNAS iozone -I $IOZONE_OPTS $IOZFILE.odir )
-			$DEBUG_ON
-			$CLEANUP
-			$SETUP
-		fi
-
-		SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
-		IOZ_THREADS=$((SPACE / SIZE * 2 / 3 ))
-		[ $THREADS -lt $IOZ_THREADS ] && IOZ_THREADS=$THREADS
-		IOZVER=`iozone -v | awk '/Revision:/ {print $3}' | tr -d .`
-		if [ "$IOZ_THREADS" -gt 1 -a "$IOZVER" -ge 3145 ]; then
-			$LFS setstripe -c 1 $IOZDIR
-			$DEBUG_OFF
-			THREAD=1
-			IOZFILE="-F "
-			while [ $THREAD -le $IOZ_THREADS ]; do
-				IOZFILE="$IOZFILE $IOZDIR/iozone.$THREAD"
-				THREAD=$((THREAD + 1))
-			done
-			$myRUNAS iozone $IOZONE_OPTS -t $IOZ_THREADS $IOZFILE
-			$DEBUG_ON
-			$CLEANUP
-			$SETUP
-		elif [ $IOZVER -lt 3145 ]; then
-			VER=`iozone -v | awk '/Revision:/ { print $3 }'`
-			echo "iozone $VER too old for multi-thread test"
-		fi
-		IOZONE="done"
-	fi
-
-	if [ "$FSX" != "no" ]; then
-	        title fsx
-		SPACE=`df -P $MOUNT | tail -n 1 | awk '{ print $4 }'`
-		[ $SPACE -lt $SIZE ] && SIZE=$((SPACE * 3 / 4))
-		$DEBUG_OFF
-		./fsx -c 50 -p 1000 -P $TMP -l $SIZE \
-			-N $(($COUNT * 100)) $MOUNT/fsxfile
-		$DEBUG_ON
-		$CLEANUP
-		$SETUP
-		FSX="done"
-	fi	
-
-	if [ "$SANITYN" != "no" ]; then
-	        title sanityN
-		$DEBUG_OFF
-
-		mkdir -p $MOUNT2
-		mount_client $MOUNT2
-		#echo "can't mount2 for '$NAME', skipping sanityN.sh"
-		START=: CLEAN=: bash sanityN.sh
-		umount $MOUNT2
-
-		$DEBUG_ON
-		$CLEANUP
-		$SETUP
-		SANITYN="done"
-	fi
-
-	if [ "$LFSCK" != "no" -a -x /usr/sbin/lfsck ]; then
-	        title lfsck
-		E2VER=`e2fsck -V 2>&1 | head -n 1 | cut -d' ' -f 2`
-		if grep -q obdfilter /proc/fs/lustre/devices; then
-			if [ `echo $E2VER | cut -d. -f2` -ge 39 ] && \
-			   [ "`echo $E2VER | grep cfs`" -o \
-				"`echo $E2VER | grep sun`" ]; then
-			   		bash lfscktest.sh
-			else
-				e2fsck -V
-				echo "e2fsck does not support lfsck, skipping"
-			fi
-		else
-			echo "remote OST, skipping test"
-		fi
-		LFSCK="done"
-	fi
-
-	if [ "$LIBLUSTRE" != "no" ]; then
-	        title liblustre
-		assert_env MGSNID MOUNT2
-		$CLEANUP
-		unload_modules
-		# Liblustre needs accept=all, noacl
-		[ -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf
-		[ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
-
-		LNETOPTS="$(awk '/^options lnet/ { print $0}' $MODPROBECONF | \
-			sed 's/^options lnet //g') accept=all" \
-			MDS_MOUNT_OPTS=$(echo $MDS_MOUNT_OPTS | sed 's/^[ \t]*//;s/[ \t]*$//') \
-			MDS_MOUNT_OPTS="${MDS_MOUNT_OPTS},noacl" \
-			MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS/#,/-o } \
-			$SETUP
-		export LIBLUSTRE_MOUNT_POINT=$MOUNT2
-		export LIBLUSTRE_MOUNT_TARGET=$MGSNID:/$FSNAME
-		export LIBLUSTRE_TIMEOUT=`cat /proc/sys/lustre/timeout`
-		#export LIBLUSTRE_DEBUG_MASK=`cat /proc/sys/lnet/debug`
-		if [ -x $LIBLUSTRETESTS/sanity ]; then
-			mkdir -p $MOUNT2
-			echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
-			$LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET
-		fi
-		$CLEANUP
-		#$SETUP
-		LIBLUSTRE="done"
-	fi
-
-	$CLEANUP
-done
-
-if [ "$REPLAY_SINGLE" != "no" ]; then
-        title replay-single
-	bash replay-single.sh
-	REPLAY_SINGLE="done"
-fi
-
-if [ "$CONF_SANITY" != "no" ]; then
-        title conf-sanity
-        bash conf-sanity.sh
-        CONF_SANITY="done"
-fi
-
-if [ "$RECOVERY_SMALL" != "no" ]; then
-        title recovery-small
-        bash recovery-small.sh
-        RECOVERY_SMALL="done"
-fi
-
-if [ "$REPLAY_OST_SINGLE" != "no" ]; then
-        title replay-ost-single
-        bash replay-ost-single.sh
-        REPLAY_OST_SINGLE="done"
-fi
-
-if [ "$REPLAY_DUAL" != "no" ]; then
-        title replay-dual
-        bash replay-dual.sh
-        REPLAY_DUAL="done"
-fi
-
-if [ "$INSANITY" != "no" ]; then
-        title insanity
-        bash insanity.sh -r
-        INSANITY="done"
-fi
-
-if [ "$SANITY_QUOTA" != "no" ]; then
-        title sanity-quota
-        bash sanity-quota.sh
-        SANITY_QUOTA="done"
-fi
-
-
-RC=$?
-title FINISHED
-echo "Finished at `date` in $((`date +%s` - $STARTTIME))s"
-echo "Tests ran: $RANTEST"
-print_summary
-echo "$0: completed with rc $RC" && exit $RC
diff --git a/lustre/tests/acl/README b/lustre/tests/acl/README
deleted file mode 100644
index 2d8c219bf1c603186dec1cf4de7cb3a95791f432..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/README
+++ /dev/null
@@ -1,4 +0,0 @@
-- copied from acl-2.2.23/test/
-- add inheritance.test from HP
-- some tests are depend on enviroment. e.g. some succeed on FC2 but fail on
-  FC3 etc. We comment out those items, maybe more will be commented out.
diff --git a/lustre/tests/acl/cp.test b/lustre/tests/acl/cp.test
deleted file mode 100644
index 9a7ea431eceb4c47c21852dcbb4ee3e892448d5b..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/cp.test
+++ /dev/null
@@ -1,50 +0,0 @@
-The cp utility should only copy ACLs if `-p' is given.
- 
-	$ umask 022
-	$ mkdir d
-	$ cd d
-	$ touch f
-	$ setfacl -m u:bin:rw f
-	$ ls -l f | awk -- '{ print $1 }'
-	> -rw-rw-r--+
-	
-	$ cp f g
-	$ ls -l g | awk -- '{ print $1 }'
-	> -rw-r--r--
-	
-	$ rm g
-	$ cp -p f g
-	$ ls -l f | awk -- '{ print $1 }'
-	> -rw-rw-r--+
-	
-	$ mkdir h
-	$ echo blubb > h/x
-	$ cp -rp h i
-	$ cat i/x
-	> blubb
-
-	$ rm -r i
-
-Use to be "$setfacl -R -m u:bin:rwX h", but RHEL4 uncorrectly set the x flag,
-so we change to the following test
-
-	$ setfacl -R -m u:bin:rwx h
-	$ getfacl --omit-header h/x
-	> user::rw-
-	> user:bin:rwx
-	> group::r--
-	> mask::rwx
-	> other::r--
-	>
-
-	$ cp -rp h i
-	$ getfacl --omit-header i/x
-	> user::rw-
-	> user:bin:rwx
-	> group::r--
-	> mask::rwx
-	> other::r--
-	>
-
-	$ cd ..
-	$ rm -r d
diff --git a/lustre/tests/acl/getfacl-noacl.test b/lustre/tests/acl/getfacl-noacl.test
deleted file mode 100644
index 40bf6ea49a19a60c2ad3ace91efd26cfa14b4802..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/getfacl-noacl.test
+++ /dev/null
@@ -1,59 +0,0 @@
-Getfacl utility option parsing tests. This test can be run on a
-filesystem with or without ACL support.
-
-	$ mkdir test
-	$ cd test
-	$ umask 027
-	$ touch x
-	$ getfacl --omit-header x
-	> user::rw-
-	> group::r--
-	> other::---
-	> 
-
-	$ getfacl --omit-header --access x
-	> user::rw-
-	> group::r--
-	> other::---
-	> 
-
-	$ getfacl --omit-header -d x
-	$ getfacl --omit-header -d .
-	$ getfacl --omit-header -d /
-	> getfacl: Removing leading '/' from absolute path names
-	
-	$ getfacl --skip-base x
-	$ getfacl --omit-header --all-effective x
-	> user::rw-
-	> group::r--
-	> other::---
-	> 
-	
-	$ getfacl --omit-header --no-effective x
-	> user::rw-
-	> group::r--
-	> other::---
-	> 
-	
-	$ mkdir d
-	$ touch d/y
-	$ ln -s d l
-	$ getfacl -dR . | grep file | sort
-	> # file: .
-	> # file: d
-	> # file: d/y
-	> # file: x
-	
-	$ ln -s l ll
-#	$ getfacl -dLR ll | grep file | sort
-#       (rhel4)
-#	> # file: ll
-#	> # file: ll/y
-#       (rhel5)
-#	> # file: l
-#	> # file: l/y
-	
-	$ rm l ll x
-	$ rm -rf d
-	$ cd ..
-	$ rmdir test
diff --git a/lustre/tests/acl/inheritance.test b/lustre/tests/acl/inheritance.test
deleted file mode 100644
index 41bce66ea71493847507965674dbbafbc037d4be..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/inheritance.test
+++ /dev/null
@@ -1,131 +0,0 @@
-ACL inheritance test.  Run these tests on a filesystem with ACL support.
- 
-
-	$ id -u
-        > 0
-
- 	$ mkdir d
-        $ setfacl -d -m group:bin:r-x d
-        $ getfacl d
-	> # file: d
-	> # owner: root
-	> # group: root
-	> user::rwx
-	> group::r-x
-	> other::r-x
-	> default:user::rwx
-	> default:group::r-x
-	> default:group:bin:r-x
-	> default:mask::r-x
-	> default:other::r-x
-        >
-
-	$ mkdir d/subdir
-        $ getfacl d/subdir
-	> # file: d/subdir
-	> # owner: root
-	> # group: root
-	> user::rwx
-	> group::r-x
-	> group:bin:r-x
-	> mask::r-x
-	> other::r-x
-	> default:user::rwx
-	> default:group::r-x
-	> default:group:bin:r-x
-	> default:mask::r-x
-	> default:other::r-x
-	>
-
-        $ touch d/f
-        $ ls -l d/f | awk -- '{ print $1 }'
-        > -rw-r--r--+
-	$ getfacl d/f
-	> # file: d/f
-	> # owner: root
-	> # group: root
-	> user::rw-
-	> group::r-x	#effective:r--
-	> group:bin:r-x	#effective:r--
-	> mask::r--
-	> other::r--
-	>
-
-        $ su bin
-        $ echo i >> d/f
-	> d/f: Permission denied
-
-Changed by CFS: (1). reduce the tree level to 2 (for shortening
-time of local tests). (2). add one more getfacl test since dir
-might be distributed around MDS's.
-
-        $ su
-        $ rm d/f
-        $ rmdir d/subdir
-        $ mv d tree 
-        $ ./make-tree
-        $ getfacl tree/dir0/dir5/file4 
-	> # file: tree/dir0/dir5/file4
-	> # owner: root
-	> # group: root
-	> user::rw-
-	> group::r-x	#effective:r--
-	> group:bin:r-x	#effective:r--
-	> mask::r--
-	> other::r--
-	>
-        $ getfacl tree/dir0/dir6/file4 
-	> # file: tree/dir0/dir6/file4
-	> # owner: root
-	> # group: root
-	> user::rw-
-	> group::r-x	#effective:r--
-	> group:bin:r-x	#effective:r--
-	> mask::r--
-	> other::r--
-	>
-	$ echo i >> tree/dir6/dir2/file2
-	$ echo i > tree/dir1/f
-	$ ls -l tree/dir1/f | awk -- '{ print $1 }'
-	> -rw-r--r--+
-in following item, the error message is dependant on distributions.
-success on FC3, but not on FC2 and SLES3 etc. comment out by CFS.
-#	$ su bin
-#	$ echo i > tree/dir6/dir2/f
-#	> tree/dir6/dir2/f: No such file or directory
-#	$ su
-
-        $ rm -rf tree
-
-
-Original scripts, comment out by CFS.
-#
-#        $ su
-#        $ rm d/f
-#        $ rmdir d/subdir
-#        $ mv d tree 
-#        $ ./make-tree
-#        $ getfacl tree/dir0/dir5/dir7/file4 
-#	> # file: tree/dir0/dir5/dir7/file4
-#	> # owner: root
-#	> # group: root
-#	> user::rw-
-#	> group::r-x	#effective:r--
-#	> group:bin:r-x	#effective:r--
-#	> mask::r--
-#	> other::r--
-#	>
-#	$ echo i >> tree/dir6/dir2/dir1/file2
-#	$ echo i > tree/dir1/f
-#	$ ls -l tree/dir1/f | awk -- '{ print $1 }'
-#	> -rw-r--r--+
-#	$ su bin
-#	$ echo i > tree/dir6/dir2/f
-#	> tree/dir6/dir2/f: No such file or directory
-#	$ su
-#
-#        $ rm -rf tree
- 
-
-
-
diff --git a/lustre/tests/acl/make-tree b/lustre/tests/acl/make-tree
deleted file mode 100755
index c27dde8e23f2d942616b699164e2070cdf41805b..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/make-tree
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/sh
-
-# reduce LEVELS from 3 => 2 by CFS
-LEVELS=2 ;		[ -z "$1" ] || LEVELS=$1
-DIRS=10 ;		[ -z "$2" ] || DIRS=$2
-FILES=10 ;		[ -z "$2" ] || FILES=$3
-NUMBER_OF_ACLS=50 ;	[ -z "$3" ] || NUMBER_OF_ACLS=$4
-
-function random_dir() {
-	mkdir -p $1
-	#setfacl -s "u::rwx,u:$[($RANDOM % $NUMBER_OF_ACLS)+1000]:rwx,g::rx,o:-" $1
-}
-
-function random_file() {
-	touch $1
-	#setfacl -s "u::rw,u:$[($RANDOM % $NUMBER_OF_ACLS)+1000]:rw,g::r,o:-" $1
-}
-
-function create () {
-	local LEVEL=$1
-	if [ $LEVEL -eq 0 ]; then
-		local I=0
-		while [ $I -lt $FILES ]; do
-			random_file file$I
-			I=$[$I+1]
-		done
-	else
-		local I=0
-		while [ $I -lt $DIRS ]; do
-			random_dir dir$I
-			cd dir$I
-			create $[$LEVEL-1]
-			cd ..
-			I=$[$I+1]
-		done
-	fi
-	return
-}
-
-mkdir -p tree
-cd tree
-create $LEVELS
-cd ..
-exit 0
-
diff --git a/lustre/tests/acl/misc.test b/lustre/tests/acl/misc.test
deleted file mode 100644
index cf1d4a0b260233df3be2a5c69d7b50a9c0c9930a..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/misc.test
+++ /dev/null
@@ -1,431 +0,0 @@
-Pretty comprehensive ACL tests.
- 
-This must be run on a filesystem with ACL support. Also, you will need
-two dummy users (bin and daemon) and a dummy group (daemon).
- 
-	$ umask 027
-	$ touch f
-	  
-Only change a base ACL:
-	$ setfacl -m u::r f
-	$ setfacl -m u::rw,u:bin:rw f
-	$ ls -dl f | awk '{print $1}'
-	> -rw-rw----+
-	
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:bin:rw-
-	> group::r--
-	> mask::rw-
-	> other::---
-	> 
-
-	$ rm f
-	$ umask 022
-	$ touch f
-	$ setfacl -m u:bin:rw f
-	$ ls -dl f | awk '{print $1}'
-	> -rw-rw-r--+
-
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:bin:rw-
-	> group::r--
-	> mask::rw-
-	> other::r--
-	> 
-
-	$rm f
-	$ umask 027
-	$ mkdir d
-	$ setfacl -m u:bin:rwx d
-	$ ls -dl d | awk '{print $1}'
-	> drwxrwx---+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:rwx
-	> group::r-x
-	> mask::rwx
-	> other::---
-	> 
-
-	$ rmdir d
-	$ umask 022
-	$ mkdir d
-	$ setfacl -m u:bin:rwx d
-	$ ls -dl d | awk '{print $1}'
-	> drwxrwxr-x+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:rwx
-	> group::r-x
-	> mask::rwx
-	> other::r-x
-	> 
-
-	$ rmdir d
-	 
-
-Multiple users
-	 
-	$ umask 022
-	$ touch f
-	$ setfacl -m u:bin:rw,u:daemon:r f
-	$ ls -dl f | awk '{print $1}'
-	> -rw-rw-r--+
-
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:bin:rw-
-	> user:daemon:r--
-	> group::r--
-	> mask::rw-
-	> other::r--
-	> 
-	 
-Multiple groups
-	 
-	$ setfacl -m g:users:rw,g:daemon:r f
-	$ ls -dl f | awk '{print $1}'
-	> -rw-rw-r--+
-
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:bin:rw-
-	> user:daemon:r--
-	> group::r--
-	> group:daemon:r--
-	> group:users:rw-
-	> mask::rw-
-	> other::r--
-	> 
-	 
-Remove one group
-	 
-	$ setfacl -x g:users f
-	$ ls -dl f | awk '{print $1}'
-	> -rw-rw-r--+
-
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:bin:rw-
-	> user:daemon:r--
-	> group::r--
-	> group:daemon:r--
-	> mask::rw-
-	> other::r--
-	> 
-	 
-Remove one user
-	 
-	$ setfacl -x u:daemon f
-	$ ls -dl f | awk '{print $1}'
-	> -rw-rw-r--+
-
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:bin:rw-
-	> group::r--
-	> group:daemon:r--
-	> mask::rw-
-	> other::r--
-	> 
-
-	$ rm f
-	 
-Default ACL
-	 
-	$ umask 027
-	$ mkdir d
-	$ setfacl -m u:bin:rwx,u:daemon:rw,d:u:bin:rwx,d:m:rx d
-	$ ls -dl d | awk '{print $1}'
-	> drwxrwx---+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:rwx
-	> user:daemon:rw-
-	> group::r-x
-	> mask::rwx
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx	#effective:r-x
-	> default:group::r-x
-	> default:mask::r-x
-	> default:other::---
-	> 
-	 
-Umask now ignored?
- 
-	$ umask 027
-	$ touch d/f
-	$ ls -dl d/f | awk '{print $1}'
-	> -rw-r-----+
-
-	$ getfacl --omit-header d/f
-	> user::rw-
-	> user:bin:rwx	#effective:r--
-	> group::r-x	#effective:r--
-	> mask::r--
-	> other::---
-	> 
-
-	$ rm d/f
-	$ umask 022
-	$ touch d/f
-	$ ls -dl d/f | awk '{print $1}'
-	> -rw-r-----+
-
-	$ getfacl --omit-header d/f
-	> user::rw-
-	> user:bin:rwx	#effective:r--
-	> group::r-x	#effective:r--
-	> mask::r--
-	> other::---
-	> 
-
-	$ rm d/f
-	 
-Default ACL copying
- 
-	$ umask 000
-	$ mkdir d/d
-	$ ls -dl d/d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d/d
-	> user::rwx
-	> user:bin:rwx	#effective:r-x
-	> group::r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx	#effective:r-x
-	> default:group::r-x
-	> default:mask::r-x
-	> default:other::---
-	> 
-
-	$ rmdir d/d
-	$ umask 022
-	$ mkdir d/d
-	$ ls -dl d/d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d/d
-	> user::rwx
-	> user:bin:rwx	#effective:r-x
-	> group::r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx	#effective:r-x
-	> default:group::r-x
-	> default:mask::r-x
-	> default:other::---
-	> 
-	 
-Add some users and groups
- 
-	$ setfacl -nm u:daemon:rx,d:u:daemon:rx,g:users:rx,g:daemon:rwx d/d
-	$ ls -dl d/d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d/d
-	> user::rwx
-	> user:bin:rwx	#effective:r-x
-	> user:daemon:r-x
-	> group::r-x
-	> group:daemon:rwx	#effective:r-x
-	> group:users:r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx	#effective:r-x
-	> default:user:daemon:r-x
-	> default:group::r-x
-	> default:mask::r-x
-	> default:other::---
-	> 
-	 
-Symlink in directory with default ACL?
-	 
-	$ ln -s d d/l
-	$ ls -dl d/l | awk '{print $1}'
-	> lrwxrwxrwx
-
-	$ ls -dl -L d/l | awk '{print $1}'
-	> drwxr-x---+
-
-# XXX:there is an issue with getfacl dealing symbol link
-#	$ getfacl --omit-header d/l
-        $ cd d
-	$ getfacl --omit-header l
-	> user::rwx
-	> user:bin:rwx	#effective:r-x
-	> user:daemon:r-x
-	> group::r-x
-	> group:daemon:rwx	#effective:r-x
-	> group:users:r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx	#effective:r-x
-	> default:user:daemon:r-x
-	> default:group::r-x
-	> default:mask::r-x
-	> default:other::---
-	> 
-# XXX
-        $ cd ..
-
-	$ rm d/l
-	 
-Does mask manipulation work?
-	 
-	$ setfacl -m g:daemon:rx,u:bin:rx d/d
-	$ ls -dl d/d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d/d
-	> user::rwx
-	> user:bin:r-x
-	> user:daemon:r-x
-	> group::r-x
-	> group:daemon:r-x
-	> group:users:r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx	#effective:r-x
-	> default:user:daemon:r-x
-	> default:group::r-x
-	> default:mask::r-x
-	> default:other::---
-	> 
-
-	$ setfacl -m d:u:bin:rwx d/d
-	$ ls -dl d/d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d/d
-	> user::rwx
-	> user:bin:r-x
-	> user:daemon:r-x
-	> group::r-x
-	> group:daemon:r-x
-	> group:users:r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:rwx
-	> default:user:daemon:r-x
-	> default:group::r-x
-	> default:mask::rwx
-	> default:other::---
-	> 
-
-	$ rmdir d/d
-	 
-Remove the default ACL
-	 
-	$ setfacl -k d
-	$ ls -dl d | awk '{print $1}'
-	> drwxrwx---+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:rwx
-	> user:daemon:rw-
-	> group::r-x
-	> mask::rwx
-	> other::---
-	> 
-	 
-Reset to base entries
-	 
-	$ setfacl -b d
-	$ ls -dl d | awk '{print $1}'
-	> drwxr-x---
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> group::r-x
-	> other::---
-	> 
-	 
-Now, chmod should change the group_obj entry
-	 
-	$ chmod 775 d
-	$ ls -dl d | awk '{print $1}'
-	> drwxrwxr-x
-	
-	$ getfacl --omit-header d
-	> user::rwx
-	> group::rwx
-	> other::r-x
-	> 
-
-	$ rmdir d
-	$ umask 002
-	$ mkdir d
-	$ setfacl -m u:daemon:rwx,u:bin:rx,d:u:daemon:rwx,d:u:bin:rx d
-	$ ls -dl d | awk '{print $1}'
-	> drwxrwxr-x+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:r-x
-	> user:daemon:rwx
-	> group::rwx
-	> mask::rwx
-	> other::r-x
-	> default:user::rwx
-	> default:user:bin:r-x
-	> default:user:daemon:rwx
-	> default:group::rwx
-	> default:mask::rwx
-	> default:other::r-x
-	> 
-
-	$ chmod 750 d
-	$ ls -dl d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:r-x
-	> user:daemon:rwx	#effective:r-x
-	> group::rwx	#effective:r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:r-x
-	> default:user:daemon:rwx
-	> default:group::rwx
-	> default:mask::rwx
-	> default:other::r-x
-	> 
-
-	$ chmod 750 d
-	$ ls -dl d | awk '{print $1}'
-	> drwxr-x---+
-
-	$ getfacl --omit-header d
-	> user::rwx
-	> user:bin:r-x
-	> user:daemon:rwx	#effective:r-x
-	> group::rwx	#effective:r-x
-	> mask::r-x
-	> other::---
-	> default:user::rwx
-	> default:user:bin:r-x
-	> default:user:daemon:rwx
-	> default:group::rwx
-	> default:mask::rwx
-	> default:other::r-x
-	> 
-
-	$ rmdir d
diff --git a/lustre/tests/acl/permissions.test b/lustre/tests/acl/permissions.test
deleted file mode 100644
index bcf947cb0ebddd5248204a9c1aa9f156e11f2823..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/permissions.test
+++ /dev/null
@@ -1,281 +0,0 @@
-This script tests if file permissions are properly checked with and
-without ACLs. The script must be run as root to allow switching users.
-The following users are required. They must be a member in the groups
-listed in parentheses.
-
-	bin (bin)
-	daemon (bin, daemon)
-
-
-Cry immediately if we are not running as root.
-
-	$ id -u
-	> 0
-
-
-First, set up a temporary directory and create a regular file with
-defined permissions.
-
-	$ mkdir d
-	$ cd d
-	$ umask 027
-	$ touch f
-	$ ls -l f | awk -- '{ print $1, $3, $4 }'
-	> -rw-r----- root root
-
-
-Make sure root has access to the file.  Verify that user daemon does not
-have access to the file owned by root.
-
-	$ echo root > f
-
-	$ su daemon
-	$ echo daemon >> f
-	> f: Permission denied
-
-	$ su
-
-
-Now, change the ownership of the file to bin:bin and verify that this
-gives user bin write access.
-
-	$ chown bin:bin f
-	$ ls -l f | awk -- '{ print $1, $3, $4 }'
-	> -rw-r----- bin bin
-	$ su bin
-	$ echo bin >> f
-
-
-User daemon is a member in the owning group, which has only read access.
-Verify this.
-
-	$ su daemon
-	$ cat f
-	> root
-	> bin
-
-	$ echo daemon >> f
-	> f: Permission denied
-
-
-Now, add an ACL entry for user daemon that grants him rw- access. File
-owners and users capable of CAP_FOWNER are allowed to change ACLs.
-
-	$ su bin
-	$ setfacl -m u:daemon:rw f
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:daemon:rw-
-	> group::r--
-	> mask::rw-
-	> other::---
-	>
-
-
-Verify that the additional ACL entry grants user daemon write access.
-
-	$ su daemon
-	$ echo daemon >> f
-	$ cat f
-	> root
-	> bin
-	> daemon
-
-
-Remove write access from the group class permission bits, and
-verify that this masks daemon's write permission.
-
-	$ su bin
-	$ chmod g-w f
-	$ getfacl --omit-header f
-	> user::rw-
-	> user:daemon:rw-	#effective:r--
-	> group::r--
-	> mask::r--
-	> other::---
-	>
-
-	$ su daemon
-	$ echo daemon >> f
-	> f: Permission denied
-
-
-Add an entry for group daemon with rw- access, and change the
-permissions for user daemon to r--. Also change the others permissions t
-rw-. The user entry should take precedence, so daemon should be denied
-access.
-
-	$ su bin
-	$ setfacl -m u:daemon:r,g:daemon:rw-,o::rw- f
-
-	$ su daemon
-	$ echo daemon >> f
-	> f: Permission denied
-
-
-Remove the entry for user daemon. The group daemon permissions should
-now give user daemon rw- access.
-
-	$ su bin
-	$ setfacl -x u:daemon f
-
-	$ su daemon
-	$ echo daemon2 >> f
-	$ cat f
-	> root
-	> bin
-	> daemon
-	> daemon2
-
-
-Set the group daemon permissions to r-- and verify that after than, user
-daemon does not have write access anymore.
-
-	$ su bin
-	$ setfacl -m g:daemon:r f
-
-	$ su daemon
-	$ echo daemon3 >> f
-	> f: Permission denied
-
-
-Now, remove the group daemon entry. Because user daemon is a member in
-the owning group, he should still have no write access.
-
-	$ su bin
-	$ setfacl -x g:daemon f
-
-	$ su daemon
-	$ echo daemon4 >> f
-	> f: Permission denied
-
-
-Change the owning group. The other permissions should now grant user
-daemon write access.
-
-	$ su
-	$ chgrp root f
-
-	$ su daemon
-	$ echo daemon5 >> f
-	$ cat f
-	> root
-	> bin
-	> daemon
-	> daemon2
-	> daemon5
-
-
-Verify that permissions in separate matching ACL entries do not
-accumulate.
-
-	$ su
-	$ setfacl -m g:bin:r,g:daemon:w f
-
-	$ su daemon
-	$ : < f	 # open for reading
-	$ : > f  # open for writing
-	$ : <> f  # open for read-write
-	> f: Permission denied
-
-
-Test if directories can have ACLs.  We assume that only one access check
-algorithm is used for all file types the file system, so these tests
-only need to verify that ACL permissions make a difference.
-
-	$ su
-	$ mkdir -m 750 e
-	$ touch e/h
-
-	$ su bin
-	$ shopt -s nullglob ; echo e/*
-	>
-
-	$ echo i > e/i
-	> e/i: Permission denied
-
-	$ su
-	$ setfacl -m u:bin:rx e
-
-	$ su bin
-	$ echo e/*
-	> e/h
-following 2 lines seems not valid, which also failed on ext3 in FC3 enviroment,
-although it pass in FC2. commented out by CFS (agreed with HP)
-#	$ echo i > e/i
-#	> e/i: Permission denied
-
-	$ su
-	$ setfacl -m u:bin:rwx e
-
-	$ su bin
-	$ echo i > e/i
-
-
-Test if symlinks are properly followed.
-
-	$ su
-	$ touch g
-	$ ln -s g l
-	$ setfacl -m u:bin:rw l
-	$ ls -l g | awk -- '{ print $1, $3, $4 }'
-	> -rw-rw----+ root root
-
-
-Test if ACLs are effective for block and character special files, fifos,
-sockets. This is done by creating special files locally. The devices do
-not need to exist: The access check is earlier in the code path than the
-test if the device exists.
-
-
-	$ mknod -m 0660 hdt b 91 64	# /dev/hdt
-	$ mknod -m 0660 null c 1 3	# /dev/null
-	$ mkfifo -m 0660 fifo
-
-	$ su bin
-	$ : < hdt
-	> hdt: Permission denied
-	$ : < null
-	> null: Permission denied
-	$ : < fifo
-	> fifo: Permission denied
-
-	$ su
-	$ setfacl -m u:bin:rw hdt null fifo
-
-	$ su bin
-	$ : < hdt
-	> hdt: No such device or address
-	$ : < null
-	$ ( echo blah > fifo & ) ; cat fifo
-	> blah
-
-
-Test if CAP_FOWNER is properly honored for directories. This addresses a
-specific bug in XFS 1.2, which does not grant root access to files in
-directories if the file has an ACL and only CAP_FOWNER would grant them.
-
-	$ su
-	$ mkdir -m 600 x
-	$ chown daemon:daemon x
-	$ echo j > x/j
-	$ ls -l x/j | awk -- '{ print $1, $3, $4 }'
-	> -rw-r----- root root
-
-	$ setfacl -m u:daemon:r x
-
-	$ ls -l x/j | awk -- '{ print $1, $3, $4 }'
-	> -rw-r----- root root
-	(With the bug this gives: `ls: x/j: Permission denied'.)
-
-	$ echo k > x/k
-	(With the bug this gives: `x/k: Permission denied'.)
-
-	$ chmod 750 x
-
-
-Clean up.
-
-	$ su
-	$ cd ..
-	$ rm -rf d
diff --git a/lustre/tests/acl/run b/lustre/tests/acl/run
deleted file mode 100755
index cfc8c05863a20092e19b6f6351aa766a80ae3495..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/run
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/perl -w -U
-
-#
-# Possible improvements:
-#
-# - distinguish stdout and stderr output
-# - add environment variable like assignments
-# - run up to a specific line
-# - resume at a specific line
-#
-
-use strict;
-use FileHandle;
-use Getopt::Std;
-use POSIX qw(isatty setuid);
-use vars qw($opt_v);
-
-no warnings qw(taint);
-
-getopts('v');
-
-my ($OK, $FAILED) = ("ok", "failed");
-if (isatty(fileno(STDOUT))) {
-	$OK = "\033[32m" . $OK . "\033[m";
-	$FAILED = "\033[31m\033[1m" . $FAILED . "\033[m";
-}
-
-sub exec_test($$);
-sub process_test($$$$);
-
-my ($prog, $in, $out) = ([], [], []);
-my $line_number = 0;
-my $prog_line;
-my ($tests, $failed) = (0,0);
-
-for (;;) {
-  my $line = <>; $line_number++;
-  if (defined $line) {
-    # Substitute %VAR and %{VAR} with environment variables.
-    $line =~ s[%(?:(\w+)|\{(\w+)\})][$ENV{"$1$2"}]eg;
-  }
-  if (defined $line) {
-    if ($line =~ s/^\s*< ?//) {
-      push @$in, $line;
-    } elsif ($line =~ s/^\s*> ?//) {
-      push @$out, $line;
-    } else {
-      process_test($prog, $prog_line, $in, $out);
-
-      $prog = [];
-      $prog_line = 0;
-    }
-    if ($line =~ s/^\s*\$ ?//) {
-      $line =~ s/\s+#.*//;  # remove comments here...
-      $prog = [ map { s/\\(.)/$1/g; $_ } split /(?<!\\)\s+/, $line ];
-      $prog_line = $line_number;
-      $in = [];
-      $out = [];
-    }
-  } else {
-    process_test($prog, $prog_line, $in, $out);
-    last;
-  }
-}
-
-my $status = sprintf("%d commands (%d passed, %d failed)",
-	$tests, $tests-$failed, $failed);
-if (isatty(fileno(STDOUT))) {
-	if ($failed) {
-		$status = "\033[31m\033[1m" . $status . "\033[m";
-	} else {
-		$status = "\033[32m" . $status . "\033[m";
-	}
-}
-print $status, "\n";
-exit $failed ? 1 : 0;
-
-
-sub process_test($$$$) {
-  my ($prog, $prog_line, $in, $out) = @_;
-
-  return unless @$prog;
-
-       my $p = [ @$prog ];
-       print "[$prog_line] \$ ", join(' ',
-             map { s/\s/\\$&/g; $_ } @$p), " -- ";
-       my $result = exec_test($prog, $in);
-       my $good = 1;
-       my $nmax = (@$out > @$result) ? @$out : @$result;
-       for (my $n=0; $n < $nmax; $n++) {
-	 if (!defined($out->[$n]) || !defined($result->[$n]) ||
-	     $out->[$n] ne $result->[$n]) {
-		 $good = 0;
-	 }
-       }
-       $tests++;
-       $failed++ unless $good;
-       print $good ? $OK : $FAILED, "\n";
-       if (!$good) {
-         for (my $n=0; $n < $nmax; $n++) {
-	   my $l = defined($out->[$n]) ? $out->[$n] : "~";
-	   chomp $l;
-	   my $r = defined($result->[$n]) ? $result->[$n] : "~";
-	   chomp $r;
-	   print sprintf("%-37s %s %-39s\n", $l, $l eq $r ? "|" : "?", $r);
-         }
-       } elsif ($opt_v) {
-	 print join('', @$result);
-       }
-}
-
-
-sub su($) {
-  my ($user) = @_;
-
-  $user ||= "root";
-
-  my ($login, $pass, $uid, $gid) = getpwnam($user)
-    or return [ "su: user $user does not exist\n" ];
-  my @groups = ();
-  my $fh = new FileHandle("/etc/group")
-    or return [ "opening /etc/group: $!\n" ];
-  while (<$fh>) {
-    chomp;
-    my ($group, $passwd, $gid, $users) = split /:/;
-    foreach my $u (split /,/, $users) {
-      push @groups, $gid
-	if ($user eq $u);
-    }
-  }
-  $fh->close;
-
-  my $groups = join(" ", ($gid, $gid, @groups));
-  #print STDERR "[[$groups]]\n";
-  $! = 0;  # reset errno
-  $> = 0;
-  $( = $gid;
-  $) = $groups;
-  if ($!) {
-    return [ "su: $!\n" ];
-  }
-  if ($uid != 0) {
-    $> = $uid;
-    #$< = $uid;
-    if ($!) {
-      return [ "su: $prog->[1]: $!\n" ];
-    }
-  }
-  #print STDERR "[($>,$<)($(,$))]";
-  return [];
-}
-
-
-sub sg($) {
-  my ($group) = @_;
-
-  my $gid = getgrnam($group)
-    or return [ "sg: group $group does not exist\n" ];
-  my %groups = map { $_ eq $gid ? () : ($_ => 1) } (split /\s/, $));
-  
-  #print STDERR "<<", join("/", keys %groups), ">>\n";
-  my $groups = join(" ", ($gid, $gid, keys %groups));
-  #print STDERR "[[$groups]]\n";
-  $! = 0;  # reset errno
-  if ($> != 0) {
-	  my $uid = $>;
-	  $> = 0;
-	  $( = $gid;
-	  $) = $groups;
-	  $> = $uid;
-  } else {
-	  $( = $gid;
-	  $) = $groups;
-  }
-  if ($!) {
-    return [ "sg: $!\n" ];
-  }
-  print STDERR "[($>,$<)($(,$))]";
-  return [];
-}
-
-
-sub exec_test($$) {
-  my ($prog, $in) = @_;
-  local (*IN, *IN_DUP, *IN2, *OUT_DUP, *OUT, *OUT2);
-  my $needs_shell = (join('', @$prog) =~ /[][|<>"'`\$\*\?]/);
-
-  if ($prog->[0] eq "umask") {
-    umask oct $prog->[1];
-    return [];
-  } elsif ($prog->[0] eq "cd") {
-    if (!chdir $prog->[1]) {
-      return [ "chdir: $prog->[1]: $!\n" ];
-    }
-    return [];
-  } elsif ($prog->[0] eq "su") {
-    return su($prog->[1]);
-  } elsif ($prog->[0] eq "sg") {
-    return sg($prog->[1]);
-  }
-
-  pipe *IN2, *OUT
-    or die "Can't create pipe for reading: $!";
-  open *IN_DUP, "<&STDIN"
-    or *IN_DUP = undef;
-  open *STDIN, "<&IN2"
-    or die "Can't duplicate pipe for reading: $!";
-  close *IN2;
-
-  open *OUT_DUP, ">&STDOUT"
-    or die "Can't duplicate STDOUT: $!";
-  pipe *IN, *OUT2
-    or die "Can't create pipe for writing: $!";
-  open *STDOUT, ">&OUT2"
-    or die "Can't duplicate pipe for writing: $!";
-  close *OUT2;
-
-  *STDOUT->autoflush();
-  *OUT->autoflush();
-
-  if (fork()) {
-    # Server
-    if (*IN_DUP) {
-      open *STDIN, "<&IN_DUP"
-        or die "Can't duplicate STDIN: $!";
-      close *IN_DUP
-        or die "Can't close STDIN duplicate: $!";
-    }
-    open *STDOUT, ">&OUT_DUP"
-      or die "Can't duplicate STDOUT: $!";
-    close *OUT_DUP
-      or die "Can't close STDOUT duplicate: $!";
-
-    foreach my $line (@$in) {
-      #print "> $line";
-      print OUT $line;
-    }
-    close *OUT
-      or die "Can't close pipe for writing: $!";
-
-    my $result = [];
-    while (<IN>) {
-      #print "< $_";
-      if ($needs_shell) {
-	s#^/bin/sh: line \d+: ##;
-	s#^/bin/sh: ##; # temporarily added by ericm
-      }
-      push @$result, $_;
-    }
-    return $result;
-  } else {
-    # Client
-    $< = $>;
-    close IN
-      or die "Can't close read end for input pipe: $!";
-    close OUT
-      or die "Can't close write end for output pipe: $!";
-    close OUT_DUP
-      or die "Can't close STDOUT duplicate: $!";
-    local *ERR_DUP;
-    open ERR_DUP, ">&STDERR"
-      or die "Can't duplicate STDERR: $!";
-    open STDERR, ">&STDOUT"
-      or die "Can't join STDOUT and STDERR: $!";
-
-    if ($needs_shell) {
-      exec ('/bin/sh', '-c', join(" ", @$prog));
-    } else {
-      exec @$prog;
-    }
-    print STDERR $prog->[0], ": $!\n";
-    exit;
-  }
-}
-
diff --git a/lustre/tests/acl/setfacl.test b/lustre/tests/acl/setfacl.test
deleted file mode 100644
index 2c10bd1037ad74daeb95dd6587fe450ff1166022..0000000000000000000000000000000000000000
--- a/lustre/tests/acl/setfacl.test
+++ /dev/null
@@ -1,144 +0,0 @@
-Setfacl utility tests. Run these tests on a filesystem with ACL support.
- 
- 	$ mkdir d
-	$ chown bin:bin d
-	$ cd d
-
-	$ su bin
-	$ sg bin
-	$ umask 027
-	$ touch g
-	$ ls -dl g | awk '{print $1}'
-	> -rw-r-----
-	
-	$ setfacl -m m:- g
-	$ ls -dl g | awk '{print $1}'
-	> -rw-------+
-	
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rw-
-	> group::r--	#effective:---
-	> mask::---
-	> other::---
-	> 
-	
-	$ setfacl -x m g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rw-
-	> group::r--
-	> other::---
-	> 
-	
-	$ setfacl -m u:daemon:rw g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rw-
-	> user:daemon:rw-
-	> group::r--
-	> mask::rw-
-	> other::---
-	> 
-	
-	$ setfacl -m u::rwx,g::r-x,o:- g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rwx
-	> user:daemon:rw-
-	> group::r-x
-	> mask::rwx
-	> other::---
-	> 
-	
-	$ setfacl -m u::rwx,g::r-x,o:-,m:- g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rwx
-	> user:daemon:rw-	#effective:---
-	> group::r-x	#effective:---
-	> mask::---
-	> other::---
-	> 
-	
-	$ setfacl -m u::rwx,g::r-x,o:-,u:root:-,m:- g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rwx
-	> user:root:---
-	> user:daemon:rw-	#effective:---
-	> group::r-x	#effective:---
-	> mask::---
-	> other::---
-	> 
-	
-	$ setfacl -m u::rwx,g::r-x,o:-,u:root:-,m:- g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rwx
-	> user:root:---
-	> user:daemon:rw-	#effective:---
-	> group::r-x	#effective:---
-	> mask::---
-	> other::---
-	> 
-	
-	$ setfacl -m u::rwx,g::r-x,o:-,u:root:- g
-	$ getfacl g
-	> # file: g
-	> # owner: bin
-	> # group: bin
-	> user::rwx
-	> user:root:---
-	> user:daemon:rw-
-	> group::r-x
-	> mask::rwx
-	> other::---
-	> 
-	
-	$ setfacl --test -x u: g
-	> setfacl: g: Malformed access ACL `user:root:---,user:daemon:rw-,group::r-x,mask::rwx,other::---': Missing or wrong entry at entry 1
-	
-	$ setfacl --test -x u:x
-	> setfacl: Option -x: Invalid argument near character 3
-	
-	$ setfacl -m d:u:root:rwx g
-	> setfacl: g: Only directories can have default ACLs
-	
-	$ setfacl -x m g
-	> setfacl: g: Malformed access ACL `user::rwx,user:root:---,user:daemon:rw-,group::r-x,other::---': Missing or wrong entry at entry 5
-	 setfacl --test -m d:u:daemon:rwx setfacl
-	 setfacl --test -n -m d:u:daemon:rwx setfacl
-	
-Check if the mask is properly recalculated
- 
-	$ mkdir d
-	$ setfacl --test -m u::rwx,u:bin:rwx,g::r-x,o::--- d
-	> d: u::rwx,u:bin:rwx,g::r-x,m::rwx,o::---,*
-	
-	$ setfacl --test -m u::rwx,u:bin:rwx,g::r-x,m::---,o::--- d
-	> d: u::rwx,u:bin:rwx,g::r-x,m::---,o::---,*
-	
-	$ setfacl --test -d -m u::rwx,u:bin:rwx,g::r-x,o::--- d
-	> d: *,d:u::rwx,d:u:bin:rwx,d:g::r-x,d:m::rwx,d:o::---
-	
-	$ setfacl --test -d -m u::rwx,u:bin:rwx,g::r-x,m::---,o::--- d
-	> d: *,d:u::rwx,d:u:bin:rwx,d:g::r-x,d:m::---,d:o::---
-	
-	$ su
-	$ cd ..
-	$ rm -r d
diff --git a/lustre/tests/busy.sh b/lustre/tests/busy.sh
deleted file mode 100644
index 2f909862d0059f82fb90b92e2c93bda0f987cdd8..0000000000000000000000000000000000000000
--- a/lustre/tests/busy.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
- mkdir /mnt/lustre/d22
- mkdir /mnt/lustre/d22/etc
- ./mcreate /mnt/lustre/d22/etc/foo
- ls -ld /mnt/lustre/etc
- ls -ld /mnt/lustre/d22/etc
diff --git a/lustre/tests/cfg/insanity-local.sh b/lustre/tests/cfg/insanity-local.sh
deleted file mode 100644
index 0708126455d8bd9213a2d43f5f7367889de57a61..0000000000000000000000000000000000000000
--- a/lustre/tests/cfg/insanity-local.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-FSNAME=lustre
-
-# facet hosts
-mds_HOST=${mds_HOST:-`hostname`}
-mdsfailover_HOST=${mdsfailover_HOST:-""}
-mgs_HOST=${mgs_HOST:-$mds_HOST}
-ost_HOST=${ost_HOST:-`hostname`}
-LIVE_CLIENT=${LIVE_CLIENT:-`hostname`}
-# This should always be a list, not a regexp
-FAIL_CLIENTS=${FAIL_CLIENTS:-""}
-PDSH=${PDSH:-no_dsh}
-
-TMP=${TMP:-/tmp}
-MDSDEV=${MDSDEV:-$TMP/${FSNAME}-mdt}
-MDSSIZE=${MDSSIZE:-100000}
-MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
-
-OSTCOUNT=${OSTCOUNT:-3}
-OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
-OSTSIZE=${OSTSIZE:-200000}
-
-NETTYPE=${NETTYPE:-tcp}
-MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
-FSTYPE=${FSTYPE:-ldiskfs}
-STRIPE_BYTES=${STRIPE_BYTES:-1048576}
-STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
-TIMEOUT=${TIMEOUT:-30}
-PTLDEBUG=${PTLDEBUG:-0x33f0404}
-DEBUG_SIZE=${DEBUG_SIZE:-10}
-SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
-
-L_GETGROUPS=${L_GETGROUPS:-`do_facet mds which l_getgroups || echo`}
-
-MKFSOPT=""
-MOUNTOPT=""
-[ "x$MDSJOURNALSIZE" != "x" ] &&
-    MKFSOPT=$MKFSOPT" -J size=$MDSJOURNALSIZE"
-[ "x$MDSISIZE" != "x" ] &&
-    MKFSOPT=$MKFSOPT" -i $MDSISIZE"
-[ "x$MKFSOPT" != "x" ] &&
-    MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
-[ "x$mdsfailover_HOST" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
-[ "x$STRIPE_BYTES" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
-[ "x$STRIPES_PER_OBJ" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
-[ "x$L_GETGROUPS" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$L_GETGROUPS"
-MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
-
-MKFSOPT=""
-MOUNTOPT=""
-[ "x$OSTJOURNALSIZE" != "x" ] &&
-    MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
-[ "x$MKFSOPT" != "x" ] &&
-    MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
-[ "x$ostfailover_HOST" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
-OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $OSTOPT"
-
-MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop"}
-OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
-MOUNT=${MOUNT:-"/mnt/lustre"}
-
-FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
-POWER_DOWN=${POWER_DOWN:-"powerman --off"}
-POWER_UP=${POWER_UP:-"powerman --on"}
-SLOW=${SLOW:-no}
-FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
diff --git a/lustre/tests/cfg/local.sh b/lustre/tests/cfg/local.sh
deleted file mode 100644
index 00d5796c2b6cfa41e52952d70310d113c68fbc75..0000000000000000000000000000000000000000
--- a/lustre/tests/cfg/local.sh
+++ /dev/null
@@ -1,91 +0,0 @@
-FSNAME=${FSNAME:-lustre}
-
-# facet hosts
-mds_HOST=${mds_HOST:-`hostname`}
-mdsfailover_HOST=${mdsfailover_HOST}
-mgs_HOST=${mgs_HOST:-$mds_HOST}
-ost_HOST=${ost_HOST:-`hostname`}
-ostfailover_HOST=${ostfailover_HOST}
-PDSH=${PDSH:-no_dsh}
-
-TMP=${TMP:-/tmp}
-
-MDSDEV=${MDSDEV:-$TMP/${FSNAME}-mdt}
-MDSSIZE=${MDSSIZE:-400000}
-MDSOPT=${MDSOPT:-"--mountfsoptions=acl"}
-
-OSTCOUNT=${OSTCOUNT:-2}
-OSTDEVBASE=${OSTDEVBASE:-$TMP/${FSNAME}-ost}
-OSTSIZE=${OSTSIZE:-300000}
-OSTOPT=${OSTOPT:-""}
-# Can specify individual ost devs with
-# OSTDEV1="/dev/sda"
-# on specific hosts with
-# ost1_HOST="uml2"
-
-NETTYPE=${NETTYPE:-tcp}
-MGSNID=${MGSNID:-`h2$NETTYPE $mgs_HOST`}
-FSTYPE=${FSTYPE:-ldiskfs}
-STRIPE_BYTES=${STRIPE_BYTES:-1048576}
-STRIPES_PER_OBJ=${STRIPES_PER_OBJ:-0}
-TIMEOUT=${TIMEOUT:-20}
-PTLDEBUG=${PTLDEBUG:-0x33f1504}
-DEBUG_SIZE=${DEBUG_SIZE:-10}
-SUBSYSTEM=${SUBSYSTEM:- 0xffb7e3ff}
-
-L_GETGROUPS=${L_GETGROUPS:-`do_facet mds which l_getgroups || echo`}
-
-MKFSOPT=""
-MOUNTOPT=""
-[ "x$MDSJOURNALSIZE" != "x" ] &&
-    MKFSOPT=$MKFSOPT" -J size=$MDSJOURNALSIZE"
-[ "x$MDSISIZE" != "x" ] &&
-    MKFSOPT=$MKFSOPT" -i $MDSISIZE"
-[ "x$MKFSOPT" != "x" ] &&
-    MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
-[ "x$mdsfailover_HOST" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $mdsfailover_HOST`"
-[ "x$STRIPE_BYTES" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param lov.stripesize=$STRIPE_BYTES"
-[ "x$STRIPES_PER_OBJ" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param lov.stripecount=$STRIPES_PER_OBJ"
-[ "x$L_GETGROUPS" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --param mdt.group_upcall=$L_GETGROUPS"
-MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$MDSSIZE --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $MDSOPT"
-
-MKFSOPT=""
-MOUNTOPT=""
-[ "x$OSTJOURNALSIZE" != "x" ] &&
-    MKFSOPT=$MKFSOPT" -J size=$OSTJOURNALSIZE"
-[ "x$MKFSOPT" != "x" ] &&
-    MKFSOPT="--mkfsoptions=\\\"$MKFSOPT\\\""
-[ "x$ostfailover_HOST" != "x" ] &&
-    MOUNTOPT=$MOUNTOPT" --failnode=`h2$NETTYPE $ostfailover_HOST`"
-OST_MKFS_OPTS="--ost --fsname=$FSNAME --device-size=$OSTSIZE --mgsnode=$MGSNID --param sys.timeout=$TIMEOUT $MKFSOPT $MOUNTOPT $OSTOPT"
-
-MDS_MOUNT_OPTS=${MDS_MOUNT_OPTS:-"-o loop"}
-OST_MOUNT_OPTS=${OST_MOUNT_OPTS:-"-o loop"}
-
-#client
-MOUNT=${MOUNT:-/mnt/${FSNAME}}
-MOUNT1=${MOUNT1:-$MOUNT}
-MOUNT2=${MOUNT2:-${MOUNT}2}
-MOUNTOPT=${MOUNTOPT:-"user_xattr,acl"}
-DIR=${DIR:-$MOUNT}
-DIR1=${DIR:-$MOUNT1}
-DIR2=${DIR2:-$MOUNT2}
-
-if [ $UID -ne 0 ]; then
-        log "running as non-root uid $UID"
-        RUNAS_ID="$UID"
-        RUNAS=""
-else
-        RUNAS_ID=${RUNAS_ID:-500}
-        RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
-fi
-
-FAILURE_MODE=${FAILURE_MODE:-SOFT} # or HARD
-POWER_DOWN=${POWER_DOWN:-"powerman --off"}
-POWER_UP=${POWER_UP:-"powerman --on"}
-SLOW=${SLOW:-no}
-FAIL_ON_ERROR=${FAIL_ON_ERROR:-true}
diff --git a/lustre/tests/checkstat.c b/lustre/tests/checkstat.c
deleted file mode 100644
index c98d6aa3d7fec9c4fc6db6b33b09ff2745277e4b..0000000000000000000000000000000000000000
--- a/lustre/tests/checkstat.c
+++ /dev/null
@@ -1,317 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <pwd.h>
-#include <grp.h>
-
-void
-usage (char *argv0, int help)
-{
-	char *progname = strrchr(argv0, '/');
-
-	if (progname == NULL)
-		progname = argv0;
-
-	fprintf (help ? stdout : stderr,
-		 "Usage: %s [flags] file[s]\n",
-		 progname);
-
-	if (!help)
-	{
-		fprintf (stderr, "   or try '-h' for help\n");
-		exit (1);
-	}
-
-	printf ("Check given files have...\n");
-	printf (" -p    permission       file must have required permissions\n");
-	printf (" -t    dir|file|link    file must be of the specified type\n");
-	printf (" -l    link_name        file must be a link to the given name\n");
-	printf (" -s    size             file must have the given size\n");
-	printf (" -u    user             file must be owned by given user\n");
-	printf (" -g    group            file must be owned by given group\n");
-	printf (" -f                     follow symlinks\n");
-	printf (" -a                     file must be absent\n");
-	printf (" -v                     increase verbosity\n");
-	printf (" -h                     print help\n");
-	printf (" Exit status is 0 on success, 1 on failure\n");
-}
-
-int
-main (int argc, char **argv)
-{
-	int           c;
-	struct stat64 buf;
-	int           perms = -1;
-	uid_t         uid = (uid_t)-1;
-	gid_t         gid = (gid_t)-1;
-	char         *type = NULL;
-	long          absent = 0;
-	char         *checklink = NULL;
-	int           verbose = 0;
-	long long     size = -1;
-	int           follow = 0;
-	char         *term;
-
-	while ((c = getopt (argc, argv, "p:t:l:s:u:g:avfh")) != -1)
-		switch (c)
-		{
-		case 'p':
-			perms = (int)strtol (optarg, &term, 0);
-			if (term == optarg)
-			{
-				fprintf (stderr, "Can't parse permission %s\n", optarg);
-				return (1);
-			}
-			break;
-
-		case 'l':
-			checklink = optarg;
-			break;
-
-		case 's':
-			size = strtoll (optarg, &term, 0);
-			if (term == optarg)
-			{
-				fprintf (stderr, "Can't parse size %s\n", optarg);
-				return (1);
-			}
-			break;
-
-		case 'u':
-			if (*optarg == '#')
-			{
-				uid = (uid_t)strtol (optarg + 1, &term, 0);
-				if (term == optarg + 1)
-				{
-					fprintf (stderr, "Can't parse numeric uid %s\n", optarg);
-					return (1);
-				}
-			} else {
-				struct passwd *pw = getpwnam (optarg);
-
-				if (pw == NULL)
-				{
-					fprintf (stderr, "Can't find user %s\n", optarg);
-					return (1);
-				}
-				uid = pw->pw_uid;
-			}
-			break;
-
-		case 'g':
-			if (*optarg == '#')
-			{
-				gid = (gid_t)strtol (optarg + 1, &term, 0);
-				if (term == optarg + 1)
-				{
-					fprintf (stderr, "Can't parse numeric gid %s\n", optarg);
-					return (1);
-				}
-			} else {
-				struct group *gr = getgrnam (optarg);
-
-				if (gr == NULL)
-				{
-					fprintf (stderr, "Can't find group %s\n", optarg);
-					return (1);
-				}
-				uid = gr->gr_gid;
-			}
-			break;
-
-		case 't':
-			type = optarg;
-			break;
-
-		case 'a':
-			absent = 1;
-			break;
-
-		case 'v':
-			verbose++;
-			break;
-
-		case 'f':
-			follow++;
-			break;
-
-		case 'h':
-			usage (argv[0], 1);
-			return (0);
-
-		default:
-			usage (argv[0], 0);
-		}
-
-	if (optind == argc)
-		usage (argv[0], 0);
-
-	do
-	{
-		char *fname = argv[optind];
-		int rc = follow ? stat64 (fname, &buf) : lstat64 (fname, &buf);
-
-		if (rc != 0)
-		{
-			if (!(absent && errno == ENOENT))
-			{
-				if (verbose)
-					printf ("Can't %sstat %s: %s\n",
-						follow ? "" : "l",
-						fname, strerror (errno));
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s: absent OK\n", fname);
-			continue;
-		}
-
-		if (absent)
-		{
-			if (verbose)
-				printf ("%s exists\n", fname);
-			return (1);
-		}
-
-		if (type != NULL)
-		{
-			if (!strcmp (type, "d") ||
-			    !strcmp (type, "dir"))
-			{
-				if (!S_ISDIR (buf.st_mode))
-				{
-					if (verbose)
-						printf ("%s is not a directory\n",
-							 fname);
-					return (1);
-				}
-			}
-			else if (!strcmp (type, "f") ||
-				 !strcmp (type, "file"))
-			{
-				if (!S_ISREG (buf.st_mode))
-				{
-					if (verbose)
-						printf ("%s is not a regular file\n",
-							fname);
-					return (1);
-				}
-			}
-			else if (!strcmp (type, "l") ||
-				 !strcmp (type, "link"))
-			{
-				if (!S_ISLNK (buf.st_mode))
-				{
-					if (verbose)
-						printf ("%s is not a link\n",
-							fname);
-					return (1);
-				}
-			}
-			else
-			{
-				fprintf (stderr, "Can't parse file type %s\n",
-					 type);
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s has type %s OK\n", fname, type);
-		}
-
-		if (perms != -1)
-		{
-			if ((buf.st_mode & ~S_IFMT) != perms)
-			{
-				if (verbose)
-					printf ("%s has perms 0%o, not 0%o\n",
-						fname, (buf.st_mode & ~S_IFMT),
-						perms);
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s has perms 0%o OK\n",
-					fname, perms);
-		}
-
-		if (size != -1)
-		{
-			if (buf.st_size != size)
-			{
-				if (verbose)
-					printf ("%s has size %Ld, not %Ld\n",
-						fname, (long long)buf.st_size,
-						size);
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s has size %Ld OK\n", fname, size);
-		}
-
-		if (checklink != NULL)
-		{
-			static char lname[4<<10];
-
-			rc = readlink (fname, lname, sizeof (lname) - 1);
-
-			if (rc < 0)
-			{
-				if (verbose)
-					printf ("%s: can't read link: %s\n",
-						fname, strerror (errno));
-				return (1);
-			}
-
-			lname[rc] = 0;
-			if (strcmp (checklink, lname))
-			{
-				if (verbose)
-					printf ("%s is a link to %s and not %s\n",
-						fname, lname, checklink);
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s links to %s OK\n", fname, checklink);
-		}
-
-		if (uid != (uid_t)-1)
-		{
-			if (buf.st_uid != uid)
-			{
-				if (verbose)
-					printf ("%s is owned by user #%ld and not #%ld\n",
-						fname, (long)buf.st_uid, (long)uid);
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s is owned by user #%ld OK\n",
-					fname, (long)uid);
-		}
-
-		if (gid != (gid_t)-1)
-		{
-			if (buf.st_gid != gid)
-			{
-				if (verbose)
-					printf ("%s is owned by group #%ld and not #%ld\n",
-						fname, (long)buf.st_gid, (long)gid);
-				return (1);
-			}
-
-			if (verbose)
-				printf ("%s is owned by group #%ld OK\n",
-					fname, (long)gid);
-		}
-	} while (++optind < argc);
-
-	return (0);
-}
diff --git a/lustre/tests/chownmany.c b/lustre/tests/chownmany.c
deleted file mode 100644
index 64512efc2fe04d8b9eba0160302100d25feb1bb5..0000000000000000000000000000000000000000
--- a/lustre/tests/chownmany.c
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-void usage(char *prog)
-{
-	printf("usage: %s owner filenamefmt count\n", prog);
-	printf("       %s owner filenamefmt start count\n", prog);
-}
-
-int main(int argc, char ** argv)
-{
-        int i, rc = 0, mask = 0;
-        char format[4096], *fmt;
-        char filename[4096];
-        long start, last;
-	long begin = 0, count;
-
-        if (argc < 4 || argc > 5) {
-		usage(argv[0]);
-                return 1;
-        }
-
-        mask = strtol(argv[1], NULL, 0);
-
-        if (strlen(argv[2]) > 4080) {
-                printf("name too long\n");
-                return 1;
-        }
-
-        start = last = time(0);
-
-	if (argc == 4) {
-		count = strtol(argv[3], NULL, 0);
-		if (count < 1) {
-                        printf("count must be at least one\n");
-                        return 1;
-                }
-	} else {
-		begin = strtol(argv[3], NULL, 0);
-		count = strtol(argv[4], NULL, 0);
-	}
-
-	if (strchr(argv[2], '%')) {
-		fmt = argv[2];
-        } else {
-		sprintf(format, "%s%%d", argv[2]);
-		fmt = format;
-	}
-        for (i = 0; i < count; i++, begin++) {
-                sprintf(filename, fmt, begin);
-		rc = chown(filename, mask, -1);
-                if (rc) {
-                        printf("chown (%s) error: %s\n",
-                               filename, strerror(errno));
-                        rc = errno;
-                        break;
-                }
-                if ((i % 10000) == 0) {
-                        printf(" - chowned %d (time %ld ; total %ld ; last "
-                               "%ld)\n", i, time(0), time(0) - start,
-                               time(0) - last);
-                        last = time(0);
-                }
-        }
-        printf("total: %d chowns in %ld seconds: %f chowns/second\n", i,
-               time(0) - start, ((float)i / (time(0) - start)));
-
-        return rc;
-}
diff --git a/lustre/tests/cmknod.c b/lustre/tests/cmknod.c
deleted file mode 100644
index 920ee5b4e43dc1d7ca95d2e73bb3181d364e4e5f..0000000000000000000000000000000000000000
--- a/lustre/tests/cmknod.c
+++ /dev/null
@@ -1,128 +0,0 @@
-/* Simple test to check that device nodes are correctly created and visible */
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-
-#define TEST_MINOR 120
-#define TEST_MAJOR 25
-
-void usage(char *prog)
-{
-	fprintf(stderr, "usage: %s <filename>\n", prog);
-	exit(1);
-}
-
-/* UMKA: This stuff inlined here instead of using appropriate header 
-   to avoid linking to symbols which is not present in newer libc.
-   
-   Currently this is the case, as UML image contains RedHat 9 and 
-   developers use something newer (Fedora, etc.). */
-inline unsigned int
-__gnu_dev_major (unsigned long long int __dev)
-{
-	return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
-}
-
-inline unsigned int
-__gnu_dev_minor (unsigned long long int __dev)
-{
-	return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
-}
-
-inline unsigned long long int
-__gnu_dev_makedev (unsigned int __major, unsigned int __minor)
-{
-	return ((__minor & 0xff) | ((__major & 0xfff) << 8)
-		| (((unsigned long long int) (__minor & ~0xff)) << 12)
-		| (((unsigned long long int) (__major & ~0xfff)) << 32));
-}
-
-#define __minor(dev) __gnu_dev_minor(dev)
-#define __major(dev) __gnu_dev_major(dev)
-#define __makedev(maj, min) __gnu_dev_makedev(maj, min)
-
-int main( int argc, char **argv)
-{
-	char *prog = argv[0];
-	char *filename = argv[1];
-	int rc;
-	struct stat st;
-	dev_t device = __makedev(TEST_MAJOR, TEST_MINOR);
-
-	if (argc != 2) 
-		usage(prog);
-
-	unlink(filename);
-	
-	/* First try block devices */
-	rc = mknod(filename, 0700 | S_IFBLK, device);
-	if ( rc < 0 ) {
-		fprintf(stderr, "%s: mknod(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 2;
-	}
-
-	rc = stat(filename, &st);
-	if ( rc < 0 ) {
-		fprintf(stderr, "%s: stat(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 3;
-	}
-	
-	if ( st.st_rdev != device) {
-		fprintf(stderr, "%s: created device other than requested: (%u,%u) instead of (%u,%u)\n", 
-			prog, __major(st.st_rdev),__minor(st.st_rdev),__major(device),__minor(device));
-		return 4;
-	}
-	if (!S_ISBLK(st.st_mode)) {
-		fprintf(stderr, "%s: created device of different type. Requested block device, got mode %o\n", prog, st.st_mode);
-		return 5;
-	}
-
-	rc = unlink(filename);
-	if ( rc < 0 ) {
-		fprintf(stderr, "%s: Cannot unlink created device %s, rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 6;
-	}
-
-	/* Second try char devices */
-	rc = mknod(filename, 0700 | S_IFCHR, device);
-	if ( rc < 0 ) {
-		fprintf(stderr, "%s: mknod(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 7;
-	}
-
-	rc = stat(filename, &st);
-	if ( rc < 0 ) {
-		fprintf(stderr, "%s: stat(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 8;
-	}
-	if ( st.st_rdev != device) {
-		fprintf(stderr, "%s: created device other than requested: (%u,%u) instead of (%u,%u)\n", 
-			prog, __major(st.st_rdev),__minor(st.st_rdev),__major(device),__minor(device));
-		return 9;
-	}
-	if (!S_ISCHR(st.st_mode)) {
-		fprintf(stderr, "%s: created device of different type. Requested char device, got mode %o\n", prog, st.st_mode);
-		return 10;
-	}
-
-	rc = unlink(filename);
-	if ( rc < 0 ) {
-		fprintf(stderr, "%s: Cannot unlink created device %s, rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 11;
-	}
-
-	printf("%s: device nodes created correctly\n", prog);
-
-	return 0;
-}
diff --git a/lustre/tests/cobd.sh b/lustre/tests/cobd.sh
deleted file mode 100755
index 3b7e8aced75be86a2b9031f7cfb328a8c3241b19..0000000000000000000000000000000000000000
--- a/lustre/tests/cobd.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-
-config=${1:-$(basename $0 .sh)}.xml
-
-LMC=${LMC:-../utils/lmc -m $config}
-TMP=${TMP:-/tmp}
-
-HOSTNAME=`hostname`
-
-MDSDEV=${MDSDEV:-$TMP/mds1-`hostname`}
-MDSSIZE=50000
-FSTYPE=${FSTYPE:-ext3}
-
-OSTDEV=${OSTDEV:-$TMP/ost1-`hostname`}
-OSTSIZE=200000
-
-rm -f $config
-# create nodes
-${LMC} --add node --node $HOSTNAME || exit 10
-${LMC} --add net --node  $HOSTNAME --nid $HOSTNAME --nettype tcp || exit 11
-
-# configure mds server
-${LMC}  --add mds  --node $HOSTNAME --mds mds1 --fstype $FSTYPE --dev $MDSDEV --size $MDSSIZE || exit 20
-
-# configure ost
-${LMC} --add ost --node $HOSTNAME --obd obd1 --fstype $FSTYPE --obdtype obdecho || exit 30
-# configure ost
-${LMC} --add ost --node $HOSTNAME --obd obd2 --fstype $FSTYPE --obdtype obdecho || exit 30
-
-${LMC} --add cobd --node $HOSTNAME --real_obd obd1 --cache_obd obd2
-
-# create client config
-# ${LMC} -m $config --add mtpt --node $HOSTNAME --path /mnt/lustre --mds mds1 --obd obd1 || exit 40
diff --git a/lustre/tests/compile.sh b/lustre/tests/compile.sh
deleted file mode 100644
index a3c6b7a48e25c165c4c8a68a6cc8f96c575debad..0000000000000000000000000000000000000000
--- a/lustre/tests/compile.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/sh
-set -evx
-
-MOUNT=${MOUNT:-/mnt/lustre}
-DIR=${DIR:-$MOUNT}
-SRC=${SRC:-`dirname $0`/../..}
-export CC=${CC:-gcc}
-while date; do
-	for i in lustre; do
-		TGT=$DIR/$i
-		[ -d $TGT ] || cp -av $SRC/$i/ $TGT
-		make -C $TGT clean
-		make -C $TGT -j2
-		make -C $TGT clean
-	done
-done
diff --git a/lustre/tests/conf-sanity.sh b/lustre/tests/conf-sanity.sh
deleted file mode 100644
index 2bdb509f9f29692895e4f464c35819bde6917e48..0000000000000000000000000000000000000000
--- a/lustre/tests/conf-sanity.sh
+++ /dev/null
@@ -1,1568 +0,0 @@
-#!/bin/bash
-# requirement:
-#	add uml1 uml2 uml3 in your /etc/hosts
-
-# FIXME - there is no reason to use all of these different
-#   return codes, espcially when most of them are mapped to something
-#   else anyway.  The combination of test number and return code
-#   figure out what failed.
-
-set -e
-
-ONLY=${ONLY:-"$*"}
-
-# These tests don't apply to mountconf
-#              xml xml xml xml xml xml dumb
-MOUNTCONFSKIP="10  11  12  13  13b 14  15 "
-
-# bug number for skipped test:                     13369
-ALWAYS_EXCEPT=" $CONF_SANITY_EXCEPT $MOUNTCONFSKIP 34a"
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-SRCDIR=`dirname $0`
-PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
-
-SAVE_PWD=$PWD
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-RLUSTRE=${RLUSTRE:-$LUSTRE}
-HOSTNAME=`hostname`
-
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-# use small MDS + OST size to speed formatting time
-MDSSIZE=40000
-OSTSIZE=40000
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-#
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="0 1 2 3 6 7 15 18 24b 25 30 31 32 33 34a "
-
-reformat() {
-        formatall
-}
-
-writeconf() {
-    local facet=mds
-    shift
-    stop ${facet} -f
-    rm -f ${facet}active
-    # who knows if/where $TUNEFS is installed?  Better reformat if it fails...
-    do_facet ${facet} "$TUNEFS --writeconf $MDSDEV" || echo "tunefs failed, reformatting instead" && reformat
-}
-
-gen_config() {
-        reformat
-        # The MGS must be started before the OSTs for a new fs, so start
-        # and stop to generate the startup logs. 
-	start_mds
-	start_ost
-	sleep 5
-	stop_ost
-	stop_mds
-}
-
-start_mds() {
-	echo "start mds service on `facet_active_host mds`"
-	start mds $MDSDEV $MDS_MOUNT_OPTS || return 94
-}
-
-stop_mds() {
-	echo "stop mds service on `facet_active_host mds`"
-	# These tests all use non-failover stop
-	stop mds -f  || return 97
-}
-
-start_ost() {
-	echo "start ost1 service on `facet_active_host ost1`"
-	start ost1 `ostdevname 1` $OST_MOUNT_OPTS || return 95
-}
-
-stop_ost() {
-	echo "stop ost1 service on `facet_active_host ost1`"
-	# These tests all use non-failover stop
-	stop ost1 -f  || return 98
-}
-
-start_ost2() {
-	echo "start ost2 service on `facet_active_host ost2`"
-	start ost2 `ostdevname 2` $OST_MOUNT_OPTS || return 92
-}
-
-stop_ost2() {
-	echo "stop ost2 service on `facet_active_host ost2`"
-	# These tests all use non-failover stop
-	stop ost2 -f  || return 93
-}
-
-start_client() {
-	echo "start client on `facet_active_host client`"
-	start client || return 99 
-}
-
-stop_client() {
-	echo "stop client on `facet_active_host client`"
-	stop client || return 100 
-}
-
-mount_client() {
-	local MOUNTPATH=$1
-	echo "mount $FSNAME on ${MOUNTPATH}....."
-	zconf_mount `hostname` $MOUNTPATH  || return 96
-}
-
-remount_client() {
-	local SAVEMOUNTOPT=$MOUNTOPT
-	MOUNTOPT="remount,$1"
-	local MOUNTPATH=$2
-	echo "remount '$1' lustre on ${MOUNTPATH}....."
-	zconf_mount `hostname`  $MOUNTPATH  || return 96
-	MOUNTOPT=$SAVEMOUNTOPT
-}
-
-umount_client() {
-	local MOUNTPATH=$1
-	echo "umount lustre on ${MOUNTPATH}....."
-	zconf_umount `hostname` $MOUNTPATH || return 97
-}
-
-manual_umount_client(){
-	local rc
-	local FORCE=$1
-	echo "manual umount lustre on ${MOUNT}...."
-	do_facet client "umount -d ${FORCE} $MOUNT"
-	rc=$?
-	return $rc
-}
-
-setup() {
-	start_ost
-	start_mds
-	mount_client $MOUNT
-}
-
-cleanup_nocli() {
-	stop_mds || return 201
-	stop_ost || return 202
-	unload_modules || return 203
-}
-
-cleanup() {
- 	umount_client $MOUNT || return 200
-	cleanup_nocli || return $?
-}
-
-check_mount() {
-	do_facet client "cp /etc/passwd $DIR/a" || return 71
-	do_facet client "rm $DIR/a" || return 72
-	# make sure lustre is actually mounted (touch will block, 
-        # but grep won't, so do it after) 
-        do_facet client "grep $MOUNT' ' /proc/mounts > /dev/null" || return 73
-	echo "setup single mount lustre success"
-}
-
-check_mount2() {
-	do_facet client "touch $DIR/a" || return 71	
-	do_facet client "rm $DIR/a" || return 72	
-	do_facet client "touch $DIR2/a" || return 73	
-	do_facet client "rm $DIR2/a" || return 74	
-	echo "setup double mount lustre success"
-}
-
-build_test_filter
-
-if [ "$ONLY" == "setup" ]; then
-	setup
-	exit
-fi
-
-if [ "$ONLY" == "cleanup" ]; then
-	cleanup
-	exit
-fi
-
-#create single point mountpoint
-
-gen_config
-
-
-test_0() {
-        setup
-	check_mount || return 41
-	cleanup || return $?
-}
-run_test 0 "single mount setup"
-
-test_1() {
-	start_ost
-	echo "start ost second time..."
-	setup
-	check_mount || return 42
-	cleanup || return $?
-}
-run_test 1 "start up ost twice (should return errors)"
-
-test_2() {
-	start_ost
-	start_mds	
-	echo "start mds second time.."
-	start_mds
-	mount_client $MOUNT
-	check_mount || return 43
-	cleanup || return $?
-}
-run_test 2 "start up mds twice (should return err)"
-
-test_3() {
-	setup
-	#mount.lustre returns an error if already in mtab
-	mount_client $MOUNT && return $?
-	check_mount || return 44
-	cleanup || return $?
-}
-run_test 3 "mount client twice (should return err)"
-
-test_4() {
-	setup
-	touch $DIR/$tfile || return 85
-	stop_ost -f
-	cleanup
-	eno=$?
-	# ok for ost to fail shutdown
-	if [ 202 -ne $eno ]; then
-		return $eno;
-	fi
-	return 0
-}
-run_test 4 "force cleanup ost, then cleanup"
-
-test_5a() {	# was test_5
-	setup
-	touch $DIR/$tfile || return 1
-	fuser -m -v $MOUNT && echo "$MOUNT is in use by user space process."
-
-	stop_mds -f || return 2
-
-	# cleanup may return an error from the failed
-	# disconnects; for now I'll consider this successful
-	# if all the modules have unloaded.
- 	umount -d $MOUNT &
-	UMOUNT_PID=$!
-	sleep 6
-	echo "killing umount"
-	kill -TERM $UMOUNT_PID
-	echo "waiting for umount to finish"
-	wait $UMOUNT_PID
-	if grep " $MOUNT " /proc/mounts; then
-		echo "test 5: /proc/mounts after failed umount"
-		umount $MOUNT &
-		UMOUNT_PID=$!
-		sleep 2
-		echo "killing umount"
-		kill -TERM $UMOUNT_PID
-		echo "waiting for umount to finish"
-		wait $UMOUNT_PID
-		grep " $MOUNT " /proc/mounts && echo "test 5: /proc/mounts after second umount" && return 11
-	fi
-
-	manual_umount_client
-	# stop_mds is a no-op here, and should not fail
-	cleanup_nocli || return $?
-	# df may have lingering entry
-	manual_umount_client
-	# mtab may have lingering entry
-	local WAIT=0
-	local MAX_WAIT=20
-	local sleep=1
-	while [ "$WAIT" -ne "$MAX_WAIT" ]; do
-		sleep $sleep
-		grep -q $MOUNT" " /etc/mtab || break
-        	echo "Waiting /etc/mtab updated ... "
-		WAIT=$(( WAIT + sleep))
-	done
-	[ "$WAIT" -eq "$MAX_WAIT" ] && error "/etc/mtab is not updated in $WAIT secs"
-	echo "/etc/mtab updated in $WAIT secs"
-}
-run_test 5a "force cleanup mds, then cleanup"
-
-test_5b() {
-	start_ost
-	[ -d $MOUNT ] || mkdir -p $MOUNT
-	grep " $MOUNT " /etc/mtab && echo "test 5b: mtab before mount" && return 10
-	mount_client $MOUNT && return 1
-	grep " $MOUNT " /etc/mtab && echo "test 5b: mtab after failed mount" && return 11
-	umount_client $MOUNT	
-	# stop_mds is a no-op here, and should not fail
-	cleanup_nocli || return $?
-	return 0
-}
-run_test 5b "mds down, cleanup after failed mount (bug 2712) (should return errs)"
-
-test_5c() {
-	start_ost
-	start_mds
-	[ -d $MOUNT ] || mkdir -p $MOUNT
-	grep " $MOUNT " /etc/mtab && echo "test 5c: mtab before mount" && return 10
-	local oldfs="${FSNAME}"
-	FSNAME="wrong.${FSNAME}"
-	mount_client $MOUNT || :
-	FSNAME=${oldfs}
-	grep " $MOUNT " /etc/mtab && echo "test 5c: mtab after failed mount" && return 11
-	umount_client $MOUNT
-	cleanup_nocli  || return $?
-}
-run_test 5c "cleanup after failed mount (bug 2712) (should return errs)"
-
-test_5d() {
-	start_ost
-	start_mds
-	stop_ost -f
-	grep " $MOUNT " /etc/mtab && echo "test 5d: mtab before mount" && return 10
-	mount_client $MOUNT || return 1
-	cleanup  || return $?
-	grep " $MOUNT " /etc/mtab && echo "test 5d: mtab after unmount" && return 11
-	return 0
-}
-run_test 5d "mount with ost down"
-
-test_5e() {
-	start_ost
-	start_mds
-
-#define OBD_FAIL_PTLRPC_DELAY_SEND       0x506
-	do_facet client "sysctl -w lustre.fail_loc=0x80000506"
-	grep " $MOUNT " /etc/mtab && echo "test 5e: mtab before mount" && return 10
-	mount_client $MOUNT || echo "mount failed (not fatal)"
-	cleanup  || return $?
-	grep " $MOUNT " /etc/mtab && echo "test 5e: mtab after unmount" && return 11
-	return 0
-}
-run_test 5e "delayed connect, don't crash (bug 10268)"
-
-test_6() {
-	setup
-	manual_umount_client
-	mount_client ${MOUNT} || return 87
-	touch $DIR/a || return 86
-	cleanup  || return $?
-}
-run_test 6 "manual umount, then mount again"
-
-test_7() {
-	setup
-	manual_umount_client
-	cleanup_nocli || return $?
-}
-run_test 7 "manual umount, then cleanup"
-
-test_8() {
-	setup
-	mount_client $MOUNT2
-	check_mount2 || return 45
-	umount_client $MOUNT2
-	cleanup  || return $?
-}
-run_test 8 "double mount setup"
-
-test_9() {
-        start_ost
-
-	do_facet ost1 sysctl lnet.debug=\'inode trace\' || return 1
-	do_facet ost1 sysctl lnet.subsystem_debug=\'mds ost\' || return 1
-
-        CHECK_PTLDEBUG="`do_facet ost1 sysctl -n lnet.debug`"
-        if [ "$CHECK_PTLDEBUG" ] && [ "$CHECK_PTLDEBUG" = "trace inode" ];then
-           echo "lnet.debug success"
-        else
-           echo "lnet.debug: want 'trace inode', have '$CHECK_PTLDEBUG'"
-           return 1
-        fi
-        CHECK_SUBSYS="`do_facet ost1 sysctl -n lnet.subsystem_debug`"
-        if [ "$CHECK_SUBSYS" ] && [ "$CHECK_SUBSYS" = "mds ost" ]; then
-           echo "lnet.subsystem_debug success"
-        else
-           echo "lnet.subsystem_debug: want 'mds ost', have '$CHECK_SUBSYS'"
-           return 1
-        fi
-        stop_ost || return $?
-}
-
-run_test 9 "test ptldebug and subsystem for mkfs"
-
-test_10() {
-        echo "generate configuration with the same name for node and mds"
-        OLDXMLCONFIG=$XMLCONFIG
-        XMLCONFIG="broken.xml"
-        [ -f "$XMLCONFIG" ] && rm -f $XMLCONFIG
-        facet="mds"
-        rm -f ${facet}active
-        add_facet $facet
-        echo "the name for node and mds is the same"
-        do_lmc --add mds --node ${facet}_facet --mds ${facet}_facet \
-            --dev $MDSDEV --size $MDSSIZE || return $?
-        do_lmc --add lov --mds ${facet}_facet --lov lov1 --stripe_sz \
-            $STRIPE_BYTES --stripe_cnt $STRIPES_PER_OBJ \
-            --stripe_pattern 0 || return $?
-        add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE
-        facet="client"
-        add_facet $facet --lustre_upcall $UPCALL
-        do_lmc --add mtpt --node ${facet}_facet --mds mds_facet \
-            --lov lov1 --path $MOUNT
-
-        echo "mount lustre"
-        start_ost
-        start_mds
-        mount_client $MOUNT
-        check_mount || return 41
-        cleanup || return $?
-
-        echo "Success!"
-        XMLCONFIG=$OLDXMLCONFIG
-}
-run_test 10 "mount lustre with the same name for node and mds"
-
-test_11() {
-        OLDXMLCONFIG=$XMLCONFIG
-        XMLCONFIG="conf11.xml"
-
-        [ -f "$XMLCONFIG" ] && rm -f $XMLCONFIG
-        add_mds mds --dev $MDSDEV --size $MDSSIZE
-        add_ost ost --dev $OSTDEV --size $OSTSIZE
-        add_client client mds --path $MOUNT --ost ost_svc || return $?
-        echo "Default lov config success!"
-
-        [ -f "$XMLCONFIG" ] && rm -f $XMLCONFIG
-        add_mds mds --dev $MDSDEV --size $MDSSIZE
-        add_ost ost --dev $OSTDEV --size $OSTSIZE
-        add_client client mds --path $MOUNT && return $?
-        echo "--add mtpt with neither --lov nor --ost will return error"
-
-        echo ""
-        echo "Success!"
-        XMLCONFIG=$OLDXMLCONFIG
-}
-run_test 11 "use default lov configuration (should return error)"
-
-test_12() {
-        OLDXMLCONFIG=$XMLCONFIG
-        XMLCONFIG="batch.xml"
-        BATCHFILE="batchfile"
-
-        # test double quote
-        [ -f "$XMLCONFIG" ] && rm -f $XMLCONFIG
-        [ -f "$BATCHFILE" ] && rm -f $BATCHFILE
-        echo "--add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp" > $BATCHFILE
-        echo "--add mds --node $HOSTNAME --mds mds1 --mkfsoptions \"-I 128\"" >> $BATCHFILE
-        # --mkfsoptions "-I 128"
-        do_lmc -m $XMLCONFIG --batch $BATCHFILE || return $?
-        if [ `sed -n '/>-I 128</p' $XMLCONFIG | wc -l` -eq 1 ]; then
-                echo "matched double quote success"
-        else
-                echo "matched double quote fail"
-                return 1
-        fi
-        rm -f $XMLCONFIG
-        rm -f $BATCHFILE
-        echo "--add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp" > $BATCHFILE
-        echo "--add mds --node $HOSTNAME --mds mds1 --mkfsoptions \"-I 128" >> $BATCHFILE
-        # --mkfsoptions "-I 128
-        do_lmc -m $XMLCONFIG --batch $BATCHFILE && return $?
-        echo "unmatched double quote should return error"
-
-        # test single quote
-        rm -f $BATCHFILE
-        echo "--add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp" > $BATCHFILE
-        echo "--add mds --node $HOSTNAME --mds mds1 --mkfsoptions '-I 128'" >> $BATCHFILE
-        # --mkfsoptions '-I 128'
-        do_lmc -m $XMLCONFIG --batch $BATCHFILE || return $?
-        if [ `sed -n '/>-I 128</p' $XMLCONFIG | wc -l` -eq 1 ]; then
-                echo "matched single quote success"
-        else
-                echo "matched single quote fail"
-                return 1
-        fi
-        rm -f $XMLCONFIG
-        rm -f $BATCHFILE
-        echo "--add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp" > $BATCHFILE
-        echo "--add mds --node $HOSTNAME --mds mds1 --mkfsoptions '-I 128" >> $BATCHFILE
-        # --mkfsoptions '-I 128
-        do_lmc -m $XMLCONFIG --batch $BATCHFILE && return $?
-        echo "unmatched single quote should return error"
-
-        # test backslash
-        rm -f $BATCHFILE
-        echo "--add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp" > $BATCHFILE
-        echo "--add mds --node $HOSTNAME --mds mds1 --mkfsoptions \-\I\ \128" >> $BATCHFILE
-        # --mkfsoptions \-\I\ \128
-        do_lmc -m $XMLCONFIG --batch $BATCHFILE || return $?
-        if [ `sed -n '/>-I 128</p' $XMLCONFIG | wc -l` -eq 1 ]; then
-                echo "backslash followed by a whitespace/letter success"
-        else
-                echo "backslash followed by a whitespace/letter fail"
-                return 1
-        fi
-        rm -f $XMLCONFIG
-        rm -f $BATCHFILE
-        echo "--add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp" > $BATCHFILE
-        echo "--add mds --node $HOSTNAME --mds mds1 --mkfsoptions -I\ 128\\" >> $BATCHFILE
-        # --mkfsoptions -I\ 128\
-        do_lmc -m $XMLCONFIG --batch $BATCHFILE && return $?
-        echo "backslash followed by nothing should return error"
-
-        rm -f $BATCHFILE
-        XMLCONFIG=$OLDXMLCONFIG
-}
-run_test 12 "lmc --batch, with single/double quote, backslash in batchfile"
-
-test_13() {
-        OLDXMLCONFIG=$XMLCONFIG
-        XMLCONFIG="conf13-1.xml"
-
-        # check long uuid will be truncated properly and uniquely
-        echo "To generate XML configuration file(with long ost name): $XMLCONFIG"
-        [ -f "$XMLCONFIG" ] && rm -f $XMLCONFIG
-        do_lmc --add net --node $HOSTNAME --nid $HOSTNAME --nettype tcp
-        do_lmc --add mds --node $HOSTNAME --mds mds1_name_longer_than_31characters
-        do_lmc --add mds --node $HOSTNAME --mds mds2_name_longer_than_31characters
-        if [ ! -f "$XMLCONFIG" ]; then
-                echo "Error:no file $XMLCONFIG created!"
-                return 1
-        fi
-        EXPECTEDMDS1UUID="e_longer_than_31characters_UUID"
-        EXPECTEDMDS2UUID="longer_than_31characters_UUID_2"
-        FOUNDMDS1UUID=`awk -F"'" '/<mds .*uuid=/' $XMLCONFIG | sed -n '1p' \
-                       | sed "s/ /\n\r/g" | awk -F"'" '/uuid=/{print $2}'`
-        FOUNDMDS2UUID=`awk -F"'" '/<mds .*uuid=/' $XMLCONFIG | sed -n '2p' \
-                       | sed "s/ /\n\r/g" | awk -F"'" '/uuid=/{print $2}'`
-	[ -z "$FOUNDMDS1UUID" ] && echo "MDS1 UUID empty" && return 1
-	[ -z "$FOUNDMDS2UUID" ] && echo "MDS2 UUID empty" && return 1
-        if ([ $EXPECTEDMDS1UUID = $FOUNDMDS1UUID ] && [ $EXPECTEDMDS2UUID = $FOUNDMDS2UUID ]) || \
-           ([ $EXPECTEDMDS1UUID = $FOUNDMDS2UUID ] && [ $EXPECTEDMDS2UUID = $FOUNDMDS1UUID ]); then
-                echo "Success:long uuid truncated successfully and being unique."
-        else
-                echo "Error:expected uuid for mds1 and mds2: $EXPECTEDMDS1UUID; $EXPECTEDMDS2UUID"
-                echo "but:     found uuid for mds1 and mds2: $FOUNDMDS1UUID; $FOUNDMDS2UUID"
-                return 1
-        fi
-        rm -f $XMLCONFIG
-        XMLCONFIG=$OLDXMLCONFIG
-}
-run_test 13 "check new_uuid of lmc operating correctly"
-
-test_13b() {
-        OLDXMLCONFIG=$XMLCONFIG
-        XMLCONFIG="conf13-1.xml"
-        SECONDXMLCONFIG="conf13-2.xml"
-        # check multiple invocations for lmc generate same XML configuration file
-        rm -f $XMLCONFIG
-        echo "Generate the first XML configuration file"
-        gen_config
-        echo "mv $XMLCONFIG to $SECONDXMLCONFIG"
-        sed -e "s/mtime[^ ]*//" $XMLCONFIG > $SECONDXMLCONFIG || return $?
-        echo "Generate the second XML configuration file"
-        gen_config
-	# don't compare .xml mtime, it will always be different
-        if [ `sed -e "s/mtime[^ ]*//" $XMLCONFIG | diff - $SECONDXMLCONFIG | wc -l` -eq 0 ]; then
-                echo "Success:multiple invocations for lmc generate same XML file"
-        else
-                echo "Error: multiple invocations for lmc generate different XML file"
-                return 1
-        fi
-
-        rm -f $XMLCONFIG $SECONDXMLCONFIG
-        XMLCONFIG=$OLDXMLCONFIG
-}
-run_test 13b "check lmc generates consistent .xml file"
-
-test_14() {
-        rm -f $XMLCONFIG
-
-        # create xml file with --mkfsoptions for ost
-        echo "create xml file with --mkfsoptions for ost"
-        add_mds mds --dev $MDSDEV --size $MDSSIZE
-        add_lov lov1 mds --stripe_sz $STRIPE_BYTES\
-            --stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0
-        add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE \
-            --mkfsoptions "-Llabel_conf_14"
-        add_client client mds --lov lov1 --path $MOUNT
-
-        FOUNDSTRING=`awk -F"<" '/<mkfsoptions>/{print $2}' $XMLCONFIG`
-        EXPECTEDSTRING="mkfsoptions>-Llabel_conf_14"
-        if [ "$EXPECTEDSTRING" != "$FOUNDSTRING" ]; then
-                echo "Error: expected: $EXPECTEDSTRING; found: $FOUNDSTRING"
-                return 1
-        fi
-        echo "Success:mkfsoptions for ost written to xml file correctly."
-
-        # mount lustre to test lconf mkfsoptions-parsing
-        echo "mount lustre"
-        start_ost
-        start_mds
-        mount_client $MOUNT || return $?
-        if [ -z "`do_facet ost1 dumpe2fs -h $OSTDEV | grep label_conf_14`" ]; then
-                echo "Error: the mkoptions not applied to mke2fs of ost."
-                return 1
-        fi
-        cleanup
-        echo "lconf mkfsoptions for ost success"
-
-        gen_config
-}
-run_test 14 "test mkfsoptions of ost for lmc and lconf"
-
-cleanup_15() {
-	trap 0
-	[ -f $MOUNTLUSTRE ] && echo "remove $MOUNTLUSTRE" && rm -f $MOUNTLUSTRE
-	if [ -f $MOUNTLUSTRE.sav ]; then
-		echo "return original $MOUNTLUSTRE.sav to $MOUNTLUSTRE"
-		mv $MOUNTLUSTRE.sav $MOUNTLUSTRE
-	fi
-}
-
-# this only tests the kernel mount command, not anything about lustre.
-test_15() {
-        MOUNTLUSTRE=${MOUNTLUSTRE:-/sbin/mount.lustre}
-	start_ost
-	start_mds
-
-	echo "mount lustre on ${MOUNT} without $MOUNTLUSTRE....."
-	if [ -f "$MOUNTLUSTRE" ]; then
-		echo "save $MOUNTLUSTRE to $MOUNTLUSTRE.sav"
-		mv $MOUNTLUSTRE $MOUNTLUSTRE.sav && trap cleanup_15 EXIT INT
-		if [ -f $MOUNTLUSTRE ]; then
-			skip "$MOUNTLUSTRE cannot be moved, skipping test"
-			return 0
-		fi
-	fi
-
-	mount_client $MOUNT && error "mount succeeded" && return 1
-	echo "mount lustre on $MOUNT without $MOUNTLUSTRE failed as expected"
-	cleanup_15
-	cleanup || return $?
-}
-run_test 15 "zconf-mount without /sbin/mount.lustre (should return error)"
-
-test_16() {
-        TMPMTPT="${MOUNT%/*}/conf16"
-
-        if [ ! -e "$MDSDEV" ]; then
-            log "no $MDSDEV existing, so mount Lustre to create one"
-            setup
-            check_mount || return 41
-            cleanup || return $?
-        fi
-
-        [ -f "$MDSDEV" ] && LOOPOPT="-o loop"
-
-        log "change the mode of $MDSDEV/OBJECTS,LOGS,PENDING to 555"
-        do_facet mds "mkdir -p $TMPMTPT &&
-                      mount $LOOPOPT -t $FSTYPE $MDSDEV $TMPMTPT &&
-                      chmod 555 $TMPMTPT/{OBJECTS,LOGS,PENDING} &&
-                      umount $TMPMTPT" || return $?
-
-        log "mount Lustre to change the mode of OBJECTS/LOGS/PENDING, then umount Lustre"
-	setup
-        check_mount || return 41
-        cleanup || return $?
-
-        log "read the mode of OBJECTS/LOGS/PENDING and check if they has been changed properly"
-        EXPECTEDOBJECTSMODE=`do_facet mds "debugfs -R 'stat OBJECTS' $MDSDEV 2> /dev/null" | grep 'Mode: ' | sed -e "s/.*Mode: *//" -e "s/ *Flags:.*//"`
-        EXPECTEDLOGSMODE=`do_facet mds "debugfs -R 'stat LOGS' $MDSDEV 2> /dev/null" | grep 'Mode: ' | sed -e "s/.*Mode: *//" -e "s/ *Flags:.*//"`
-        EXPECTEDPENDINGMODE=`do_facet mds "debugfs -R 'stat PENDING' $MDSDEV 2> /dev/null" | grep 'Mode: ' | sed -e "s/.*Mode: *//" -e "s/ *Flags:.*//"`
-
-        if [ "$EXPECTEDOBJECTSMODE" = "0777" ]; then
-                log "Success:Lustre change the mode of OBJECTS correctly"
-        else
-                error "Lustre does not change mode of OBJECTS properly"
-        fi
-
-        if [ "$EXPECTEDLOGSMODE" = "0777" ]; then
-                log "Success:Lustre change the mode of LOGS correctly"
-        else
-                error "Lustre does not change mode of LOGS properly"
-        fi
-
-        if [ "$EXPECTEDPENDINGMODE" = "0777" ]; then
-                log "Success:Lustre change the mode of PENDING correctly"
-        else
-                error "Lustre does not change mode of PENDING properly"
-        fi
-}
-run_test 16 "verify that lustre will correct the mode of OBJECTS/LOGS/PENDING"
-
-test_17() {
-        if [ ! -e "$MDSDEV" ]; then
-            echo "no $MDSDEV existing, so mount Lustre to create one"
-	    setup
-            check_mount || return 41
-            cleanup || return $?
-        fi
-
-        echo "Remove mds config log"
-        do_facet mds "debugfs -w -R 'unlink CONFIGS/$FSNAME-MDT0000' $MDSDEV || return \$?" || return $?
-
-        start_ost
-	start_mds && return 42
-	gen_config
-}
-run_test 17 "Verify failed mds_postsetup won't fail assertion (2936) (should return errs)"
-
-test_18() {
-        [ -f $MDSDEV ] && echo "remove $MDSDEV" && rm -f $MDSDEV
-        echo "mount mds with large journal..."
-        local myMDSSIZE=2000000
-        OLD_MDS_MKFS_OPTS=$MDS_MKFS_OPTS
-
-        MDS_MKFS_OPTS="--mgs --mdt --fsname=$FSNAME --device-size=$myMDSSIZE --param sys.timeout=$TIMEOUT $MDSOPT"
-
-        gen_config
-        echo "mount lustre system..."
-	setup
-        check_mount || return 41
-
-        echo "check journal size..."
-        FOUNDSIZE=`do_facet mds "debugfs -c -R 'stat <8>' $MDSDEV" | awk '/Size: / { print $NF; exit;}'`
-        if [ $FOUNDSIZE -gt $((32 * 1024 * 1024)) ]; then
-                log "Success: mkfs creates large journals. Size: $((FOUNDSIZE >> 20))M"
-        else
-                error "expected journal size > 32M, found $((FOUNDSIZE >> 20))M"
-        fi
-
-        cleanup || return $?
-
-        MDS_MKFS_OPTS=$OLD_MDS_MKFS_OPTS
-        gen_config
-}
-run_test 18 "check mkfs creates large journals"
-
-test_19a() {
-	start_mds || return 1
-	stop_mds -f || return 2
-}
-run_test 19a "start/stop MDS without OSTs"
-
-test_19b() {
-	start_ost || return 1
-	stop_ost -f || return 2
-}
-run_test 19b "start/stop OSTs without MDS"
-
-test_20() {
-	# first format the ost/mdt
-	start_ost
-	start_mds
-	mount_client $MOUNT
-	check_mount || return 43
-	rm -f $DIR/$tfile
-	remount_client ro $MOUNT || return 44
-	touch $DIR/$tfile && echo "$DIR/$tfile created incorrectly" && return 45
-	[ -e $DIR/$tfile ] && echo "$DIR/$tfile exists incorrectly" && return 46
-	remount_client rw $MOUNT || return 47
-	touch $DIR/$tfile
-	[ ! -f $DIR/$tfile ] && echo "$DIR/$tfile missing" && return 48
-	MCNT=`grep -c $MOUNT /etc/mtab`
-	[ "$MCNT" -ne 1 ] && echo "$MOUNT in /etc/mtab $MCNT times" && return 49
-	umount_client $MOUNT
-	stop_mds
-	stop_ost
-}
-run_test 20 "remount ro,rw mounts work and doesn't break /etc/mtab"
-
-test_21a() {
-        start_mds
-	start_ost
-	stop_ost
-	stop_mds
-}
-run_test 21a "start mds before ost, stop ost first"
-
-test_21b() {
-        start_ost
-	start_mds
-	stop_mds
-	stop_ost
-}
-run_test 21b "start ost before mds, stop mds first"
-
-test_21c() {
-        start_ost
-	start_mds
-	start_ost2
-	stop_ost
-	stop_ost2
-	stop_mds
-}
-run_test 21c "start mds between two osts, stop mds last"
-
-test_22() {
-        #reformat to remove all logs
-        reformat
-	start_mds
-	echo Client mount before any osts are in the logs
-	mount_client $MOUNT
-	check_mount && return 41
-	pass
-
-	echo Client mount with ost in logs, but none running
-	start_ost
-	stop_ost
-	mount_client $MOUNT
-	# check_mount will block trying to contact ost
-	umount_client $MOUNT
-	pass
-
-	echo Client mount with a running ost
-	start_ost
-	mount_client $MOUNT
-	check_mount || return 41
-	pass
-
-	cleanup
-}
-run_test 22 "start a client before osts (should return errs)"
-
-test_23a() {	# was test_23
-        setup
-        # fail mds
-	stop mds   
-	# force down client so that recovering mds waits for reconnect
-	local running=$(grep -c $MOUNT /proc/mounts) || true
-    	if [ $running -ne 0 ]; then
-        	echo "Stopping client $MOUNT (opts: -f)"
-        	umount -f $MOUNT
-    	fi
-
-	# enter recovery on mds
-	start_mds
-	# try to start a new client
-	mount_client $MOUNT &
-	sleep 5
-	MOUNT_PID=$(ps -ef | grep "t lustre" | grep -v grep | awk '{print $2}')
-	MOUNT_LUSTRE_PID=`ps -ef | grep mount.lustre | grep -v grep | awk '{print $2}'`
-	echo mount pid is ${MOUNT_PID}, mount.lustre pid is ${MOUNT_LUSTRE_PID}
-	ps --ppid $MOUNT_PID
-	ps --ppid $MOUNT_LUSTRE_PID
-	# FIXME why o why can't I kill these? Manual "ctrl-c" works...
-	kill -TERM $MOUNT_LUSTRE_PID
-	echo "waiting for mount to finish"
-	ps -ef | grep mount
-	# we can not wait $MOUNT_PID because it is not a child of this shell
-	local PID1
-	local PID2
-	local WAIT=0
-	local MAX_WAIT=20
-	local sleep=1
-	while [ "$WAIT" -lt "$MAX_WAIT" ]; do
-		sleep $sleep
-		PID1=$(ps -ef | awk '{print $2}' | grep -w $MOUNT_PID)
-		PID2=$(ps -ef | awk '{print $2}' | grep -w $MOUNT_LUSTRE_PID)
-		echo PID1=$PID1
-		echo PID2=$PID2
-		[ -z "$PID1" -a -z "$PID2" ] && break
-		echo "waiting for mount to finish ... "
-		WAIT=$(( WAIT + sleep))
-	done
-	[ "$WAIT" -eq "$MAX_WAIT" ] && error "MOUNT_PID $MOUNT_PID and \
-		MOUNT__LUSTRE_PID $MOUNT__LUSTRE_PID still not killed in $WAIT secs"
-	ps -ef | grep mount
-	stop_mds || error
-	stop_ost || error
-}
-run_test 23a "interrupt client during recovery mount delay"
-
-umount_client $MOUNT
-cleanup_nocli
-
-test_23b() {    # was test_23
-	start_ost
-	start_mds
-	# Simulate -EINTR during mount OBD_FAIL_LDLM_CLOSE_THREAD
-	sysctl -w lustre.fail_loc=0x80000313
-	mount_client $MOUNT
-	cleanup
-}
-run_test 23b "Simulate -EINTR during mount"
-
-fs2mds_HOST=$mds_HOST
-fs2ost_HOST=$ost_HOST
-
-cleanup_24a() {
-	trap 0
-	echo "umount $MOUNT2 ..."
-	umount $MOUNT2 || true
-	echo "stopping fs2mds ..."
-	stop fs2mds -f || true
-	echo "stopping fs2ost ..."
-	stop fs2ost -f || true
-}
-
-test_24a() {
-	[ -n "$ost1_HOST" ] && fs2ost_HOST=$ost1_HOST
-	if [ -z "$fs2ost_DEV" -o -z "$fs2mds_DEV" ]; then
-		do_facet mds [ -b "$MDSDEV" ] && \
-		skip "mixed loopback and real device not working" && return
-	fi
-
-	local fs2mdsdev=${fs2mds_DEV:-${MDSDEV}_2}
-	local fs2ostdev=${fs2ost_DEV:-$(ostdevname 1)_2}
-
-	# test 8-char fsname as well
-	local FSNAME2=test1234
-	add fs2mds $MDS_MKFS_OPTS --fsname=${FSNAME2} --nomgs --mgsnode=$MGSNID --reformat $fs2mdsdev || exit 10
-
-	add fs2ost $OST_MKFS_OPTS --fsname=${FSNAME2} --reformat $fs2ostdev || exit 10
-
-	setup
-	start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS && trap cleanup_24a EXIT INT
-	start fs2ost $fs2ostdev $OST_MOUNT_OPTS
-	mkdir -p $MOUNT2
-	mount -t lustre $MGSNID:/${FSNAME2} $MOUNT2 || return 1
-	# 1 still works
-	check_mount || return 2
-	# files written on 1 should not show up on 2
-	cp /etc/passwd $DIR/$tfile
-	sleep 10
-	[ -e $MOUNT2/$tfile ] && error "File bleed" && return 7
-	# 2 should work
-	cp /etc/passwd $MOUNT2/b || return 3
-	rm $MOUNT2/b || return 4
-	# 2 is actually mounted
-        grep $MOUNT2' ' /proc/mounts > /dev/null || return 5
-	# failover 
-	facet_failover fs2mds
-	facet_failover fs2ost
-	df
- 	umount_client $MOUNT 
-	# the MDS must remain up until last MDT
-	stop_mds
-	MDS=$(do_facet mds "lctl get_param -n devices" | awk '($3 ~ "mdt" && $4 ~ "MDS") { print $4 }')
-	[ -z "$MDS" ] && error "No MDS" && return 8
-	cleanup_24a
-	cleanup_nocli || return 6
-}
-run_test 24a "Multiple MDTs on a single node"
-
-test_24b() {
-	if [ -z "$fs2mds_DEV" ]; then
-		do_facet mds [ -b "$MDSDEV" ] && \
-		skip "mixed loopback and real device not working" && return
-	fi
-
-	local fs2mdsdev=${fs2mds_DEV:-${MDSDEV}_2}
-
-	add fs2mds $MDS_MKFS_OPTS --fsname=${FSNAME}2 --mgs --reformat $fs2mdsdev || exit 10 
-	setup
-	start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS && return 2
-	cleanup || return 6
-}
-run_test 24b "Multiple MGSs on a single node (should return err)"
-
-test_25() {
-	setup
-	check_mount || return 2
-	local MODULES=$($LCTL modules | awk '{ print $2 }')
-	rmmod $MODULES 2>/dev/null || true
-	cleanup || return 6
-}
-run_test 25 "Verify modules are referenced"
-
-test_26() {
-    load_modules
-    # we need modules before mount for sysctl, so make sure...
-    do_facet mds "lsmod | grep -q lustre || modprobe lustre"
-#define OBD_FAIL_MDS_FS_SETUP            0x135
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000135"
-    start_mds && echo MDS started && return 1
-    lctl get_param -n devices
-    DEVS=$(lctl get_param -n devices | wc -l)
-    [ $DEVS -gt 0 ] && return 2
-    unload_modules || return 203
-}
-run_test 26 "MDT startup failure cleans LOV (should return errs)"
-
-set_and_check() {
-	local myfacet=$1
-	local TEST=$2
-	local PARAM=$3
-	local ORIG=$(do_facet $myfacet "$TEST") 
-	if [ $# -gt 3 ]; then
-	    local FINAL=$4
-	else
-	    local -i FINAL
-	    FINAL=$(($ORIG + 5))
-	fi
-	echo "Setting $PARAM from $ORIG to $FINAL"
-	do_facet mds "$LCTL conf_param $PARAM=$FINAL" || error conf_param failed
-	local RESULT
-	local MAX=90
-	local WAIT=0
-	while [ 1 ]; do
-	    sleep 5
-	    RESULT=$(do_facet $myfacet "$TEST") 
-	    if [ $RESULT -eq $FINAL ]; then
-		echo "Updated config after $WAIT sec (got $RESULT)"
-		break
-	    fi
-	    WAIT=$((WAIT + 5))
-	    if [ $WAIT -eq $MAX ]; then
-		echo "Config update not seen: wanted $FINAL got $RESULT"
-		return 3
-	    fi
-	    echo "Waiting $(($MAX - $WAIT)) secs for config update" 
-	done
-}
-
-test_27a() {
-	start_ost || return 1
-	start_mds || return 2
-	echo "Requeue thread should have started: " 
-	ps -e | grep ll_cfg_requeue 
-	set_and_check ost1 "lctl get_param -n obdfilter.$FSNAME-OST0000.client_cache_seconds" "$FSNAME-OST0000.ost.client_cache_seconds" || return 3
-	cleanup_nocli
-}
-run_test 27a "Reacquire MGS lock if OST started first"
-
-test_27b() {
-        setup
-	facet_failover mds
-	set_and_check mds "lctl get_param -n mds.$FSNAME-MDT0000.group_acquire_expire" "$FSNAME-MDT0000.mdt.group_acquire_expire" || return 3
-	set_and_check client "lctl get_param -n mdc.$FSNAME-MDT0000-mdc-*.max_rpcs_in_flight" "$FSNAME-MDT0000.mdc.max_rpcs_in_flight" || return 4
-	cleanup
-}
-run_test 27b "Reacquire MGS lock after failover"
-
-test_28() {
-        setup
-	TEST="lctl get_param -n llite.$FSNAME-*.max_read_ahead_whole_mb"
-	ORIG=$($TEST) 
-	declare -i FINAL
-	FINAL=$(($ORIG + 10))
-	set_and_check client "$TEST" "$FSNAME.llite.max_read_ahead_whole_mb" || return 3
-	set_and_check client "$TEST" "$FSNAME.llite.max_read_ahead_whole_mb" || return 3
- 	umount_client $MOUNT || return 200
-	mount_client $MOUNT
-	RESULT=$($TEST)
-	if [ $RESULT -ne $FINAL ]; then
-	    echo "New config not seen: wanted $FINAL got $RESULT"
-	    return 4
-	else
-	    echo "New config success: got $RESULT"
-	fi
-	cleanup
-}
-run_test 28 "permanent parameter setting"
-
-test_29() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "$OSTCOUNT < 2, skipping" && return
-        setup > /dev/null 2>&1
-	start_ost2
-	sleep 10
-
-	local PARAM="$FSNAME-OST0001.osc.active"
-	local PROC_ACT="osc.$FSNAME-OST0001-osc-*.active"
-	local PROC_UUID="osc.$FSNAME-OST0001-osc-*.ost_server_uuid"
-
-	ACTV=$(lctl get_param -n $PROC_ACT)
-	DEAC=$((1 - $ACTV))
-	set_and_check client "lctl get_param -n $PROC_ACT" "$PARAM" $DEAC || return 2
-        # also check ost_server_uuid status
-	RESULT=$(lctl get_param -n $PROC_UUID | grep DEACTIV)
-	if [ -z "$RESULT" ]; then
-	    echo "Live client not deactivated: $(lctl get_param -n $PROC_UUID)"
-	    return 3
-	else
-	    echo "Live client success: got $RESULT"
-	fi
-
-	# check MDT too 
-	local MPROC="osc.$FSNAME-OST0001-osc.active"
-	local MAX=30
-	local WAIT=0
-	while [ 1 ]; do
-	    sleep 5
-	    RESULT=`do_facet mds " lctl get_param -n $MPROC"`
-	    [ ${PIPESTATUS[0]} = 0 ] || error "Can't read $MPROC"
-	    if [ $RESULT -eq $DEAC ]; then
-		echo "MDT deactivated also after $WAIT sec (got $RESULT)"
-		break
-	    fi
-	    WAIT=$((WAIT + 5))
-	    if [ $WAIT -eq $MAX ]; then
-		echo "MDT not deactivated: wanted $DEAC got $RESULT"
-		return 4
-	    fi
-	    echo "Waiting $(($MAX - $WAIT)) secs for MDT deactivated"
-	done
-
-        # test new client starts deactivated
- 	umount_client $MOUNT || return 200
-	mount_client $MOUNT
-	RESULT=$(lctl get_param -n $PROC_UUID | grep DEACTIV | grep NEW)
-	if [ -z "$RESULT" ]; then
-	    echo "New client not deactivated from start: $(lctl get_param -n $PROC_UUID)"
-	    return 5
-	else
-	    echo "New client success: got $RESULT"
-	fi
-
-	# make sure it reactivates
-	set_and_check client "lctl get_param -n $PROC_ACT" "$PARAM" $ACTV || return 6
-
- 	umount_client $MOUNT
-	stop_ost2
-	cleanup_nocli
-	#writeconf to remove all ost2 traces for subsequent tests
-	writeconf
-	start_mds
-	start_ost
-	cleanup
-}
-run_test 29 "permanently remove an OST"
-
-test_30() {
-	setup
-
-	TEST="lctl get_param -n llite.$FSNAME-*.max_read_ahead_whole_mb"
-	ORIG=$($TEST) 
-	for i in $(seq 1 20); do 
-	    set_and_check client "$TEST" "$FSNAME.llite.max_read_ahead_whole_mb" $i || return 3
-	done
-	# make sure client restart still works 
- 	umount_client $MOUNT
-	mount_client $MOUNT || return 4
-	[ "$($TEST)" -ne "$i" ] && return 5   
-	set_and_check client "$TEST" "$FSNAME.llite.max_read_ahead_whole_mb" $ORIG || return 6
-	cleanup
-}
-run_test 30 "Big config llog"
-
-test_31() { # bug 10734
-        # ipaddr must not exist
-        mount -t lustre 4.3.2.1@tcp:/lustre $MOUNT || true
-	cleanup
-}
-run_test 31 "Connect to non-existent node (returns errors, should not crash)"
-
-test_32a() {
-        # XXX - make this run on client-only systems with real hardware on
-        #       the OST and MDT
-        #       there appears to be a lot of assumption here about loopback
-        #       devices
-        # or maybe this test is just totally useless on a client-only system
-	[ "$mds_HOST" = "`hostname`" ] || { skip "remote MDS" && return 0; }
-	[ "$ost_HOST" = "`hostname`" -o "$ost1_HOST" = "`hostname`" ] || \
-		{ skip "remote OST" && return 0; }
-
-        [ -z "$TUNEFS" ] && skip "No tunefs" && return
-	local DISK1_4=$LUSTRE/tests/disk1_4.zip
-        [ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return
-	unzip -o -j -d $TMP/$tdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; }
-	load_modules
-	sysctl lnet.debug=$PTLDEBUG
-
-	$TUNEFS $TMP/$tdir/mds || error "tunefs failed"
-	# nids are wrong, so client wont work, but server should start
-        start mds $TMP/$tdir/mds "-o loop,exclude=lustre-OST0000" || return 3
-        local UUID=$(lctl get_param -n mds.lustre-MDT0000.uuid)
-	echo MDS uuid $UUID
-	[ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID" 
-
-	$TUNEFS --mgsnode=`hostname` $TMP/$tdir/ost1 || error "tunefs failed"
-	start ost1 $TMP/$tdir/ost1 "-o loop" || return 5
-        UUID=$(cat lctl get_param -n obdfilter.lustre-OST0000.uuid)
-	echo OST uuid $UUID
-	[ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID" 
-
-	local NID=$($LCTL list_nids | head -1)
-
-	echo "OSC changes should return err:" 
-	$LCTL conf_param lustre-OST0000.osc.max_dirty_mb=15 && return 7
-	$LCTL conf_param lustre-OST0000.failover.node=$NID && return 8
-	echo "ok."
-	echo "MDC changes should succeed:" 
-	$LCTL conf_param lustre-MDT0000.mdc.max_rpcs_in_flight=9 || return 9
-	$LCTL conf_param lustre-MDT0000.failover.node=$NID || return 10
-	echo "ok."
-
-	# With a new good MDT failover nid, we should be able to mount a client
-	# (but it cant talk to OST)
-        local OLDMOUNTOPT=$MOUNTOPT
-        MOUNTOPT="exclude=lustre-OST0000"
-	mount_client $MOUNT
-        MOUNTOPT=$OLDMOUNTOPT
-	set_and_check client "lctl get_param -n mdc.*.max_rpcs_in_flight" "lustre-MDT0000.mdc.max_rpcs_in_flight" ||
-		return 11
-
-	zconf_umount `hostname` $MOUNT -f
-	cleanup_nocli
-	load_modules
-
-        # mount a second time to make sure we didnt leave upgrade flag on
-	load_modules
-        $TUNEFS --dryrun $TMP/$tdir/mds || error "tunefs failed"
-	load_modules
-        start mds $TMP/$tdir/mds "-o loop,exclude=lustre-OST0000" || return 12
-        cleanup_nocli
-
-	[ -d $TMP/$tdir ] && rm -rf $TMP/$tdir
-}
-run_test 32a "Upgrade from 1.4 (not live)"
-
-test_32b() {
-        # XXX - make this run on client-only systems with real hardware on
-        #       the OST and MDT
-        #       there appears to be a lot of assumption here about loopback
-        #       devices
-        # or maybe this test is just totally useless on a client-only system
-        [ "$mds_HOST" = "`hostname`" ] || { skip "remote MDS" && return 0; }
-        [ "$ost_HOST" = "`hostname`" -o "$ost1_HOST" = "`hostname`" ] || \
-		{ skip "remote OST" && return 0; }
-
-        [ -z "$TUNEFS" ] && skip "No tunefs" && return
-	local DISK1_4=$LUSTRE/tests/disk1_4.zip
-        [ ! -r $DISK1_4 ] && skip "Cant find $DISK1_4, skipping" && return
-	unzip -o -j -d $TMP/$tdir $DISK1_4 || { skip "Cant unzip $DISK1_4, skipping" && return ; }
-	load_modules
-	sysctl lnet.debug=$PTLDEBUG
-	NEWNAME=sofia
-
-	# writeconf will cause servers to register with their current nids
-	$TUNEFS --writeconf --fsname=$NEWNAME $TMP/$tdir/mds || error "tunefs failed"
-	start mds $TMP/$tdir/mds "-o loop" || return 3
-        local UUID=$(lctl get_param -n mds.${NEWNAME}-MDT0000.uuid)
-	echo MDS uuid $UUID
-	[ "$UUID" == "mdsA_UUID" ] || error "UUID is wrong: $UUID" 
-
-	$TUNEFS --mgsnode=`hostname` --fsname=$NEWNAME --writeconf $TMP/$tdir/ost1 || error "tunefs failed"
-	start ost1 $TMP/$tdir/ost1 "-o loop" || return 5
-        UUID=$(lctl get_param -n obdfilter.${NEWNAME}-OST0000.uuid)
-	echo OST uuid $UUID
-	[ "$UUID" == "ost1_UUID" ] || error "UUID is wrong: $UUID"
-
-	echo "OSC changes should succeed:" 
-	$LCTL conf_param ${NEWNAME}-OST0000.osc.max_dirty_mb=15 || return 7
-	$LCTL conf_param ${NEWNAME}-OST0000.failover.node=$NID || return 8
-	echo "ok."
-	echo "MDC changes should succeed:" 
-	$LCTL conf_param ${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight=9 || return 9
-	echo "ok."
-
-	# MDT and OST should have registered with new nids, so we should have
-	# a fully-functioning client
-	echo "Check client and old fs contents"
-	OLDFS=$FSNAME
-	FSNAME=$NEWNAME
-	mount_client $MOUNT
-	FSNAME=$OLDFS
-	set_and_check client "lctl get_param -n mdc.*.max_rpcs_in_flight" "${NEWNAME}-MDT0000.mdc.max_rpcs_in_flight" || return 11
-	[ "$(cksum $MOUNT/passwd | cut -d' ' -f 1,2)" == "2479747619 779" ] || return 12  
-	echo "ok."
-
-	cleanup
-	[ -d $TMP/$tdir ] && rm -rf $TMP/$tdir
-}
-run_test 32b "Upgrade from 1.4 with writeconf"
-
-test_33a() { # bug 12333, was test_33
-        local rc=0
-        local FSNAME2=test-123
-        [ -n "$ost1_HOST" ] && fs2ost_HOST=$ost1_HOST
-
-        if [ -z "$fs2ost_DEV" -o -z "$fs2mds_DEV" ]; then
-                do_facet mds [ -b "$MDSDEV" ] && \
-                skip "mixed loopback and real device not working" && return
-        fi
-
-        local fs2mdsdev=${fs2mds_DEV:-${MDSDEV}_2}
-        local fs2ostdev=${fs2ost_DEV:-$(ostdevname 1)_2}
-        add fs2mds $MDS_MKFS_OPTS --fsname=${FSNAME2} --reformat $fs2mdsdev || exit 10
-        add fs2ost $OST_MKFS_OPTS --fsname=${FSNAME2} --index=8191 --mgsnode=$MGSNID --reformat $fs2ostdev || exit 10
-
-        start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS && trap cleanup_24a EXIT INT
-        start fs2ost $fs2ostdev $OST_MOUNT_OPTS
-        do_facet mds "$LCTL conf_param $FSNAME2.sys.timeout=200" || rc=1
-        mkdir -p $MOUNT2
-        mount -t lustre $MGSNID:/${FSNAME2} $MOUNT2 || rc=2
-        echo "ok."
-
-        umount -d $MOUNT2
-        stop fs2ost -f
-        stop fs2mds -f
-        rm -rf $MOUNT2 $fs2mdsdev $fs2ostdev
-        cleanup_nocli || rc=6
-        return $rc
-}
-run_test 33a "Mount ost with a large index number"
-
-test_33b() {	# was test_33a
-        setup
-
-        do_facet client dd if=/dev/zero of=$MOUNT/24 bs=1024k count=1
-        # Drop lock cancelation reply during umount
-	#define OBD_FAIL_LDLM_CANCEL             0x304
-        do_facet client sysctl -w lustre.fail_loc=0x80000304
-        #sysctl -w lnet.debug=-1
-        umount_client $MOUNT
-        cleanup
-}
-run_test 33b "Drop cancel during umount"
-
-test_34a() {
-        setup
-	do_facet client "sh runmultiop_bg_pause $DIR/file O_c"
-	manual_umount_client
-	rc=$?
-	do_facet client killall -USR1 multiop
-	if [ $rc -eq 0 ]; then
-		error "umount not fail!"
-	fi
-	sleep 1
-        cleanup
-}
-run_test 34a "umount with opened file should be fail"
-
-
-test_34b() {
-	setup
-	touch $DIR/$tfile || return 1
-	stop_mds --force || return 2
-
- 	manual_umount_client --force
-	rc=$?
-	if [ $rc -ne 0 ]; then
-		error "mtab after failed umount - rc $rc"
-	fi
-
-	cleanup
-	return 0	
-}
-run_test 34b "force umount with failed mds should be normal"
-
-test_34c() {
-	setup
-	touch $DIR/$tfile || return 1
-	stop_ost --force || return 2
-
- 	manual_umount_client --force
-	rc=$?
-	if [ $rc -ne 0 ]; then
-		error "mtab after failed umount - rc $rc"
-	fi
-
-	cleanup
-	return 0	
-}
-run_test 34c "force umount with failed ost should be normal"
-
-test_35() { # bug 12459
-	setup
-
-	debugsave
-	sysctl -w lnet.debug="ha"
-
-	log "Set up a fake failnode for the MDS"
-	FAKENID="127.0.0.2"
-	do_facet mds $LCTL conf_param ${FSNAME}-MDT0000.failover.node=$FAKENID || return 4
-
-	log "Wait for RECONNECT_INTERVAL seconds (10s)"
-	sleep 10
-
-	MSG="conf-sanity.sh test_35 `date +%F%kh%Mm%Ss`"
-	$LCTL clear
-	log "$MSG"
-	log "Stopping the MDT:"
-	stop_mds || return 5
-
-	df $MOUNT > /dev/null 2>&1 &
-	DFPID=$!
-	log "Restarting the MDT:"
-	start_mds || return 6
-	log "Wait for df ($DFPID) ... "
-	wait $DFPID
-	log "done"
-	debugrestore
-
-	# retrieve from the log the first server that the client tried to
-	# contact after the connection loss
-	$LCTL dk $TMP/lustre-log-$TESTNAME.log
-	NEXTCONN=`awk "/${MSG}/ {start = 1;}
-		       /import_select_connection.*${FSNAME}-MDT0000-mdc.* using connection/ {
-				if (start) {
-					if (\\\$NF ~ /$FAKENID/)
-						print \\\$NF;
-					else
-						print 0;
-					exit;
-				}
-		       }" $TMP/lustre-log-$TESTNAME.log`
-	[ "$NEXTCONN" != "0" ] && log "The client didn't try to reconnect to the last active server (tried ${NEXTCONN} instead)" && return 7
-	cleanup
-}
-run_test 35 "Reconnect to the last active server first"
-
-test_36() { # 12743
-        local rc
-        local FSNAME2=test1234
-        local fs3ost_HOST=$ost_HOST
-
-        [ -n "$ost1_HOST" ] && fs2ost_HOST=$ost1_HOST && fs3ost_HOST=$ost1_HOST
-        rc=0
-
-        if [ -z "$fs2ost_DEV" -o -z "$fs2mds_DEV" -o -z "$fs3ost_DEV" ]; then
-		do_facet mds [ -b "$MDSDEV" ] && \
-		skip "mixed loopback and real device not working" && return
-        fi
-        [ $OSTCOUNT -lt 2 ] && skip "skipping test for single OST" && return
-
-	[ "$ost_HOST" = "`hostname`" -o "$ost1_HOST" = "`hostname`" ] || \
-		{ skip "remote OST" && return 0; }
-
-        local fs2mdsdev=${fs2mds_DEV:-${MDSDEV}_2}
-        local fs2ostdev=${fs2ost_DEV:-$(ostdevname 1)_2}
-        local fs3ostdev=${fs3ost_DEV:-$(ostdevname 2)_2}
-        add fs2mds $MDS_MKFS_OPTS --fsname=${FSNAME2} --reformat $fs2mdsdev || exit 10
-        # XXX after we support non 4K disk blocksize, change following --mkfsoptions with
-        # other argument
-        add fs2ost $OST_MKFS_OPTS --mkfsoptions='-b4096' --fsname=${FSNAME2} --mgsnode=$MGSNID --reformat $fs2ostdev || exit 10
-        add fs3ost $OST_MKFS_OPTS --mkfsoptions='-b4096' --fsname=${FSNAME2} --mgsnode=$MGSNID --reformat $fs3ostdev || exit 10
-
-        start fs2mds $fs2mdsdev $MDS_MOUNT_OPTS
-        start fs2ost $fs2ostdev $OST_MOUNT_OPTS
-        start fs3ost $fs3ostdev $OST_MOUNT_OPTS
-        mkdir -p $MOUNT2
-        mount -t lustre $MGSNID:/${FSNAME2} $MOUNT2 || return 1
-
-        sleep 5 # until 11778 fixed
-
-        dd if=/dev/zero of=$MOUNT2/$tfile bs=1M count=7 || return 2
-
-        BKTOTAL=`lctl get_param -n obdfilter.*.kbytestotal | awk 'BEGIN{total=0}; {total+=$1}; END{print total}'`
-        BKFREE=`lctl get_param -n obdfilter.*.kbytesfree | awk 'BEGIN{free=0}; {free+=$1}; END{print free}'`
-        BKAVAIL=`lctl get_param -n obdfilter.*.kbytesavail | awk 'BEGIN{avail=0}; {avail+=$1}; END{print avail}'`
-        STRING=`df -P $MOUNT2 | tail -n 1 | awk '{print $2","$3","$4}'`
-        DFTOTAL=`echo $STRING | cut -d, -f1`
-        DFUSED=`echo $STRING  | cut -d, -f2`
-        DFAVAIL=`echo $STRING | cut -d, -f3`
-        DFFREE=$(($DFTOTAL - $DFUSED))
-
-        ALLOWANCE=$((64 * $OSTCOUNT))
-
-        if [ $DFTOTAL -lt $(($BKTOTAL - $ALLOWANCE)) ] ||  
-           [ $DFTOTAL -gt $(($BKTOTAL + $ALLOWANCE)) ] ; then
-                echo "**** FAIL: df total($DFTOTAL) mismatch OST total($BKTOTAL)"
-                rc=1
-        fi
-        if [ $DFFREE -lt $(($BKFREE - $ALLOWANCE)) ] || 
-           [ $DFFREE -gt $(($BKFREE + $ALLOWANCE)) ] ; then
-                echo "**** FAIL: df free($DFFREE) mismatch OST free($BKFREE)"
-                rc=2
-        fi
-        if [ $DFAVAIL -lt $(($BKAVAIL - $ALLOWANCE)) ] || 
-           [ $DFAVAIL -gt $(($BKAVAIL + $ALLOWANCE)) ] ; then
-                echo "**** FAIL: df avail($DFAVAIL) mismatch OST avail($BKAVAIL)"
-                rc=3
-       fi
-
-        umount -d $MOUNT2
-        stop fs3ost -f || return 200
-        stop fs2ost -f || return 201
-        stop fs2mds -f || return 202
-        rm -rf $MOUNT2 $fs2mdsdev $fs2ostdev $fs3ostdev
-        unload_modules || return 203
-        return $rc
-}
-run_test 36 "df report consistency on OSTs with different block size"
-
-test_37() {
-	[ -n "$CLIENTONLY" -o -n "$CLIENTMODSONLY" ] && skip "client only testing" && return 0
-	LOCAL_MDSDEV="$TMP/mdt.img"
-	SYM_MDSDEV="$TMP/sym_mdt.img"
-
-	echo "MDS :     $LOCAL_MDSDEV"
-	echo "SYMLINK : $SYM_MDSDEV"
-	rm -f $LOCAL_MDSDEV
-
-	touch $LOCAL_MDSDEV
-	mkfs.lustre --reformat --fsname=lustre --mdt --mgs --device-size=9000 $LOCAL_MDSDEV ||
-		error "mkfs.lustre $LOCAL_MDSDEV failed"
-	ln -s $LOCAL_MDSDEV $SYM_MDSDEV
-
-	echo "mount symlink device - $SYM_MDSDEV"
-
-	mount_op=`mount -v -t lustre -o loop $SYM_MDSDEV ${MOUNT%/*}/mds 2>&1 | grep "unable to set tunable"`
-	umount -d ${MOUNT%/*}/mds
-	rm -f $LOCAL_MDSDEV $SYM_MDSDEV
-
-	if [ -n "$mount_op" ]; then
-		error "**** FAIL: set tunables failed for symlink device"
-	fi
-	return 0
-}
-run_test 37 "verify set tunables works for symlink device"
-
-test_38() { # bug 14222
-	setup
-	# like runtests
-	COUNT=10
-	SRC="/etc /bin"
-	FILES=`find $SRC -type f -mtime +1 | head -n $COUNT`
-	log "copying $(echo $FILES | wc -w) files to $DIR/$tdir"
-	mkdir -p $DIR/$tdir
-	tar cf - $FILES | tar xf - -C $DIR/$tdir || \
-		error "copying $SRC to $DIR/$tdir"
-	sync
-	umount_client $MOUNT
-	stop_mds
-	log "rename lov_objid file on MDS"
-	rm -f $TMP/lov_objid.orig
-	do_facet mds "debugfs -c -R \\\"dump lov_objid $TMP/lov_objid.orig\\\" $MDSDEV"
-	do_facet mds "debugfs -w -R \\\"rm lov_objid\\\" $MDSDEV"
-
-	do_facet mds "od -Ax -td8 $TMP/lov_objid.orig"
-	# check create in mds_lov_connect
-	start_mds
-	mount_client $MOUNT
-	for f in $FILES; do
-		[ $V ] && log "verifying $DIR/$tdir/$f"
-		diff -q $f $DIR/$tdir/$f || ERROR=y
-	done
-	do_facet mds "debugfs -c -R \\\"dump lov_objid $TMP/lov_objid.new\\\"  $MDSDEV"
-	do_facet mds "od -Ax -td8 $TMP/lov_objid.new"
-	[ "$ERROR" = "y" ] && error "old and new files are different after connect" || true
-	
-	
-	# check it's updates in sync
-	umount_client $MOUNT
-	stop_mds
-	
-	do_facet mds dd if=/dev/zero of=$TMP/lov_objid.clear bs=4096 count=1
-	do_facet mds "debugfs -w -R \\\"rm lov_objid\\\" $MDSDEV"
-	do_facet mds "debugfs -w -R \\\"write $TMP/lov_objid.clear lov_objid\\\" $MDSDEV "
-
-	start_mds
-	mount_client $MOUNT
-	for f in $FILES; do
-		[ $V ] && log "verifying $DIR/$tdir/$f"
-		diff -q $f $DIR/$tdir/$f || ERROR=y
-	done
-        do_facet mds "debugfs -c -R \\\"dump lov_objid $TMP/lov_objid.new1\\\" $MDSDEV"
-	do_facet mds "od -Ax -td8 $TMP/lov_objid.new1"
-	umount_client $MOUNT
-	stop_mds
-	[ "$ERROR" = "y" ] && error "old and new files are different after sync" || true
-	
-	log "files compared the same"
-	cleanup
-}
-run_test 38 "MDS recreates missing lov_objid file from OST data"
-
-test_39() { #bug 14413
-        PTLDEBUG=+malloc
-        setup
-        cleanup
-        perl $SRCDIR/leak_finder.pl $TMP/debug 2>&1 | egrep '*** Leak:' && 
-                error "memory leak detected" || true
-}
-run_test 39 "leak_finder recognizes both LUSTRE and LNET malloc messages"
-
-equals_msg `basename $0`: test complete
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
diff --git a/lustre/tests/crash-mod.sh b/lustre/tests/crash-mod.sh
deleted file mode 100644
index d5ce47330aad7b08056f0cfcd777b17c356adcea..0000000000000000000000000000000000000000
--- a/lustre/tests/crash-mod.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-TMP=${TMP:-/tmp}
-BASEDIR=${1:-`dirname $0`/..}
-LCMD=$TMP/crash-mod-`hostname`
-echo "Storing crash module info in $LCMD"
-cat /tmp/ogdb-`hostname` | while read JUNK M JUNK; do
-	MOD="$BASEDIR/$M"
-	MODNAME=`basename $MOD .o`
-
-	echo mod -s $MODNAME $MOD  | tee -a $LCMD
-done
diff --git a/lustre/tests/create.pl b/lustre/tests/create.pl
deleted file mode 100644
index 848b4cc0446b9d46eaa3522f78108314d1d97548..0000000000000000000000000000000000000000
--- a/lustre/tests/create.pl
+++ /dev/null
@@ -1,178 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-$|++;
-
-$ENV{PATH}="/bin:/usr/bin";
-$ENV{ENV}="";
-$ENV{BASH_ENV}="";
-use POSIX ":sys_wait_h";
-
-use diagnostics;
-use Getopt::Long;
-
-use vars qw(
-	    $MAX_THREADS
-	    $SCRIPT_NAME
-	    );
-
-# Don't try to run more than this many threads concurrently.
-$MAX_THREADS = 16;
-
-$SCRIPT_NAME = "create.pl";
-
-# Initialize variables
-my $silent = 0;
-my $use_mcreate = 1; # should we use mcreate or open?
-my $num_files = 5;   # number of files to create
-my $iterations = 1;
-my $num_threads = 1;
-my $mountpt;
-my $num_mounts = -1;
-
-# Get options from the command line.
-GetOptions("silent!" => \$silent,
-           "use_mcreate=i" => \$use_mcreate,
-           "num_files=i" => \$num_files,
-	   "mountpt=s" => \$mountpt,
-	   "num_mounts=i" => \$num_mounts,
-	   "iterations=i" => \$iterations,
-	   "num_threads=i" => \$num_threads,
-	   ) || die &usage;
-
-# Check for mandatory args.
-if (!$mountpt || 
-    !$num_mounts) {
-    die &usage;
-}
-
-if ($num_threads > $MAX_THREADS) {
-    print "\nMAX_THREADS is currently set to $MAX_THREADS.\n\n";
-    print "You will have to change this in the source\n";
-    print "if you really want to run with $num_threads threads.\n\n";
-    exit 1;
-}
-
-# Initialize rand() function.
-srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
-
-#########################################################################
-### MAIN
-
-for (my $i=1; $i<=$num_threads; $i++) {
-    my $status = &fork_and_create($i);
-    last if ($status != 0);
-}
-
-# Wait for all our threads to finish.
-my $child = 0;
-do {
-    $child = waitpid(-1, WNOHANG);
-} until $child > 0;
-sleep 1;
-
-exit 0;
-
-#########################################################################
-### SUBROUTINES
-
-sub usage () {
-    print "\nUsage: $0 [--silent] [--use_mcreate=n] [--num_files=n] [--iterations=n] [--num_threads=n] --mountpt=/path/to/lustre/mount --num_mounts=n\n\n";
-    print "\t--silent\tminimal output\n";
-    print "\t--use_mcreate=n\tuse mcreate to create files, default=1 (yes)\n";
-    print "\t--num_files=n\tnumber of files to create per iteration, default=5\n";
-    print "\t--iterations=n\tnumber of iterations to perform, default=1\n";
-    print "\t--num_threads=n\tnumber of thread to run, default=1\n";
-    print "\t--mountpt\tlocation of lustre mount\n";
-    print "\t--num_mounts=n\tnumber of lustre mounts to test across, default=-1 (single mount point without numeric suffix)\n\n";
-    print "example: $0 --mountpt=/mnt/lustre --num_mounts=2 --iterations=50\n";
-    print "         will perform 50 interations in /mnt/lustre1 and /mnt/lustre2\n";
-    print "         $0 --mountpt=/mnt/lustre --num_mounts=-1 --iterations=50\n";
-    print "         will perform 50 iterations in /mnt/lustre only\n\n";
-    exit;
-}
-
-#########################################################################
-sub fork_and_create ($) {
-    my ($thread_num) = @_;
-    
-  FORK: {
-      if (my $pid = fork) {
-	  # parent here
-	  # child process pid is available in $pid
-	  return 0;
-      } elsif (defined $pid) { # $pid is zero here if defined
-	  my $current_iteration=1;
-	  while ($current_iteration <= $iterations) {
-	      for (my $i=1; $i<=$num_files; $i++) {
-		  my $which = "";
-		  if ($num_mounts > 0) {
-		      $which = int(rand() * $num_mounts) + 1;
-		  }
-		  my $d = int(rand() * $num_files);
-		  do_open("${mountpt}${which}/thread${thread_num}.${d}");
-		  
-		  if ($num_mounts > 0) {
-		      $which = int(rand() * $num_mounts) + 1;
-		  }
-		  $d = int(rand() * $num_files);
-		  my $path = "${mountpt}${which}/thread${thread_num}.${d}";
-		  print  "$SCRIPT_NAME - Thread $thread_num: Unlink $path start [" . $$."]...\n" if !$silent;
-		  if (unlink($path)) {
-		      print "$SCRIPT_NAME - Thread $thread_num: Unlink done [$$] $path: Success\n" if !$silent;
-		  } else {
-		      print "$SCRIPT_NAME - Thread $thread_num: Unlink done [$$] $path: $!\n"if !$silent;
-		  }
-	      }
-	      if (($current_iteration) % 100 == 0) {
-		  print "$SCRIPT_NAME - Thread $thread_num: " . $current_iteration . " operations [" . $$ . "]\n";
-	      }
-	      $current_iteration++;
-	  }
-	  
-	  my $which = "";
-	  if ($num_mounts > 0) {
-	      $which = int(rand() * $num_mounts) + 1;
-	  }
-	  for (my $d = 0; $d < $num_files; $d++) {
-	      my $path = "${mountpt}${which}/thread${thread_num}.${d}";
-	      unlink("$path") if (-e $path);
-	  }
-	  
-	  print "$SCRIPT_NAME - Thread $thread_num: Done.\n";
-	  
-	  exit 0;
-
-      } elsif ($! =~ /No more process/) {
-          # EAGAIN, supposedly recoverable fork error
-	  sleep 5;
-	  redo FORK;
-      } else {
-          # weird fork error
-	  die "Can't fork: $!\n";
-      }
-  }
-
-}
-
-#########################################################################
-
-sub do_open ($) {
-    my ($path) = @_;;
-
-    if ($use_mcreate) {
-        my $tmp = `./mcreate $path`;
-        if ($tmp) {
-            print  "$SCRIPT_NAME - Creating $path [" . $$."]...\n" if !$silent;
-            $tmp =~ /.*error: (.*)\n/;
-            print  "$SCRIPT_NAME - Create done [$$] $path: $!\n" if !$silent;
-        } else {
-            print  "$SCRIPT_NAME - Create done [$$] $path: Success\n"if !$silent;
-        }
-    } else {
-        print  "$SCRIPT_NAME - Opening $path [" . $$."]...\n"if !$silent;
-        open(FH, ">$path") || die "open($path: $!";
-        print  "$SCRIPT_NAME - Open done [$$] $path: Success\n"if !$silent;
-        close(FH) || die;
-    }
-}
-
diff --git a/lustre/tests/createdestroy.c b/lustre/tests/createdestroy.c
deleted file mode 100644
index b5b7c2ba1d5e31b9ff9a1fa8ccb7eabf7dbcd417..0000000000000000000000000000000000000000
--- a/lustre/tests/createdestroy.c
+++ /dev/null
@@ -1,225 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <time.h>
-#include <sys/time.h>
-
-int thread;
-
-#define BAD_VERBOSE (-999999999)
-
-#define difftime(a, b)                                          \
-        ((double)(a)->tv_sec - (b)->tv_sec +                    \
-         ((double)((a)->tv_usec - (b)->tv_usec) / 1000000))
-
-static char *cmdname(char *func)
-{
-        static char buf[512];
-
-        if (thread) {
-                sprintf(buf, "%s-%d", func, thread);
-                return buf;
-        }
-
-        return func;
-}
-
-static int be_verbose(int verbose, struct timeval *next_time,
-                      unsigned long num, unsigned long *next_num, int num_total)
-{
-        struct timeval now;
-
-        if (!verbose)
-                return 0;
-
-        if (next_time != NULL)
-                gettimeofday(&now, NULL);
-
-        /* A positive verbosity means to print every X iterations */
-        if (verbose > 0 && (num >= *next_num || num >= num_total)) {
-                *next_num += verbose;
-                if (next_time) {
-                        next_time->tv_sec = now.tv_sec - verbose;
-                        next_time->tv_usec = now.tv_usec;
-                }
-                return 1;
-        }
-
-        /* A negative verbosity means to print at most each X seconds */
-        if (verbose < 0 && next_time != NULL && difftime(&now, next_time) >= 0){
-                next_time->tv_sec = now.tv_sec - verbose;
-                next_time->tv_usec = now.tv_usec;
-                *next_num = num;
-                return 1;
-        }
-
-        return 0;
-}
-
-static int get_verbose(char *func, const char *arg)
-{
-        int verbose;
-        char *end;
-
-        if (!arg || arg[0] == 'v')
-                verbose = 1;
-        else if (arg[0] == 's' || arg[0] == 'q')
-                verbose = 0;
-        else {
-                verbose = (int)strtoul(arg, &end, 0);
-                if (*end) {
-                        fprintf(stderr, "%s: error: bad verbose option '%s'\n",
-                                func, arg);
-                        return BAD_VERBOSE;
-                }
-        }
-
-        if (verbose < 0)
-                printf("Print status every %d seconds\n", -verbose);
-        else if (verbose == 1)
-                printf("Print status every operation\n");
-        else if (verbose > 1)
-                printf("Print status every %d operations\n", verbose);
-
-        return verbose;
-}
-
-int main(int argc, char *argv[])
-{
-        char filename[1024];
-        int verbose = 0;
-        unsigned long count, i;
-        int threads = 0;
-        char *end;
-        int rc = 0;
-
-        if (argc < 3 || argc > 5) {
-                fprintf(stderr,
-                        "usage: %s <filename> <count> [verbose [threads]]\n",
-                        argv[0]);
-                exit(1);
-        }
-
-        count = strtoul(argv[2], &end, 0);
-        if (*end) {
-                fprintf(stderr, "%s: error: bad iteration count '%s'\n",
-                        argv[0], argv[1]);
-                exit(2);
-        }
-        if (argc == 4) {
-                verbose = get_verbose(argv[0], argv[3]);
-                if (verbose == BAD_VERBOSE)
-                        exit(2);
-        }
-        if (argc == 5) {
-                threads = strtoul(argv[4], &end, 0);
-                if (*end) {
-                        fprintf(stderr, "%s: error: bad thread count '%s'\n",
-                                argv[0], argv[1]);
-                        exit(2);
-                }
-        }
-
-        for (i = 1; i <= threads; i++) {
-                rc = fork();
-                if (rc < 0) {
-                        fprintf(stderr, "%s: error: #%ld - %s\n",
-                                cmdname(argv[0]), i, strerror(rc = errno));
-                        break;
-                } else if (rc == 0) {
-                        thread = i;
-                        break;
-                } else
-                        printf("%s: thread #%ld (PID %d) started\n",
-                               cmdname(argv[0]), i, rc);
-                rc = 0;
-        }
-
-        if (threads && thread == 0) {   /* parent process */
-                int live_threads = threads;
-
-                while (live_threads > 0) {
-                        int status;
-                        pid_t ret;
-
-                        ret = waitpid(0, &status, 0);
-                        if (ret == 0) {
-                                continue;
-                        }
-
-                        if (ret < 0) {
-                                fprintf(stderr, "%s: error: wait - %s\n",
-                                        argv[0], strerror(errno));
-                                if (!rc)
-                                        rc = errno;
-                        } else {
-                                /*
-                                 * This is a hack.  We _should_ be able to use
-                                 * WIFEXITED(status) to see if there was an
-                                 * error, but it appears to be broken and it
-                                 * always returns 1 (OK).  See wait(2).
-                                 */
-                                int err = WEXITSTATUS(status);
-                                if (err || WIFSIGNALED(status))
-                                        fprintf(stderr,
-                                                "%s: error: PID %d had rc=%d\n",
-                                                argv[0], ret, err);
-                                if (!rc)
-                                        rc = err;
-
-                                live_threads--;
-                        }
-                }
-        } else {
-                struct timeval start, end, next_time;
-                unsigned long next_count;
-                double diff;
-
-                gettimeofday(&start, NULL);
-                next_time.tv_sec = start.tv_sec - verbose;
-                next_time.tv_usec = start.tv_usec;
-
-                for (i = 0, next_count = verbose; i < count; i++) {
-                        if (threads)
-                                sprintf(filename, "%s-%d-%ld",
-                                        argv[1], thread, i);
-                        else
-                                sprintf(filename, "%s-%ld", argv[1], i);
-
-                        rc = mknod(filename, S_IFREG, 0);
-                        if (rc < 0) {
-                                fprintf(stderr, "%s: error: mknod(%s): %s\n",
-                                        cmdname(argv[0]), filename,
-                                        strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                        if (unlink(filename) < 0) {
-                                fprintf(stderr, "%s: error: unlink(%s): %s\n",
-                                        cmdname(argv[0]), filename,
-                                        strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                        if (be_verbose(verbose, &next_time,i,&next_count,count))
-                                printf("%s: number %ld\n", cmdname(argv[0]), i);
-                }
-
-                gettimeofday(&end, NULL);
-                diff = difftime(&end, &start);
-
-                printf("%s: %ldx2 files in %.4gs (%.4g ops/s): rc = %d: %s",
-                       cmdname(argv[0]), i, diff, (double)i * 2 / diff,
-                       rc, ctime(&end.tv_sec));
-        }
-        return rc;
-}
diff --git a/lustre/tests/createmany-mpi.c b/lustre/tests/createmany-mpi.c
deleted file mode 100644
index 289e07174edb33c1b3e869854243ee0f10672c58..0000000000000000000000000000000000000000
--- a/lustre/tests/createmany-mpi.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdarg.h>
-
-#include "mpi.h"
-
-void usage(char *prog)
-{
-        printf("usage: %s {-o|-m|-l<tgt>} filenamefmt count\n", prog);
-        printf("       %s {-o|-m|-l<tgt>} filenamefmt -seconds\n", prog);
-        printf("       %s {-o|-m|-l<tgt>} filenamefmt start count\n", prog);
-}
-
-/* Print process rank, loop count, message, and exit (i.e. a fatal error) */
-int rprintf(int rank, int loop, const char *fmt, ...)
-{
-        va_list       ap;
-
-        printf("rank %d, loop %d: ", rank, loop);
-
-        va_start(ap, fmt);
-
-        printf(fmt, ap);
-
-        MPI_Finalize();
-        exit(1);
-}
-
-int main(int argc, char ** argv)
-{
-        int i, rc = 0, do_open = 0, do_link = 0, rank;
-        char format[4096], *fmt, *tgt;
-        char filename[4096];
-        long start, last, end;
-        long begin = 0, count;
-
-        rc = MPI_Init(&argc, &argv);
-        if (rc != MPI_SUCCESS)
-                rprintf(-1, -1, "MPI_Init failed: %d\n", rc);
-
-        if (argc < 4 || argc > 5) {
-                usage(argv[0]);
-                return 1;
-        }
-
-        if (strcmp(argv[1], "-o") == 0) {
-                do_open = 1;
-        } else if (strncmp(argv[1], "-l", 2) == 0 && argv[1][2]) {
-                tgt = argv[1] + 2;
-                do_link = 1;
-        } else if (strcmp(argv[1], "-m") != 0) {
-                usage(argv[0]);
-                return 1;
-        }
-
-        if (strlen(argv[2]) > 4080) {
-                printf("name too long\n");
-                return 1;
-        }
-
-        rc = MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-        if (rc != MPI_SUCCESS)
-                rprintf(-1, -1, "MPI_Comm_rank failed: %d\n", rc);
-
-        rc = MPI_Barrier(MPI_COMM_WORLD);
-        if (rc != MPI_SUCCESS)
-                rprintf(rank, -1, "prep MPI_Barrier failed: %d\n", rc);
-
-        start = last = time(0);
-
-        if (argc == 4) {
-                end = strtol(argv[3], NULL, 0);
-        } else {
-                begin = strtol(argv[3], NULL, 0);
-                end = strtol(argv[4], NULL, 0);
-        }
-        if (end > 0) {
-                count = end;
-                end = -1UL >> 1;
-        } else {
-                end = start - end;
-                count = -1UL >> 1;
-        }
-
-        if (strchr(argv[2], '%'))
-                fmt = argv[2];
-        else {
-                sprintf(format, "%s%%d", argv[2]);
-                fmt = format;
-        }
-        printf("starting at %s", ctime(&start));
-        for (i = 0; i < count && time(0) < end; i++, begin++) {
-                sprintf(filename, fmt, begin);
-                if (do_open) {
-                        int fd = open(filename, O_CREAT|O_RDWR, 0644);
-                        if (fd < 0) {
-                                printf("open(%s) error: %s\n", filename,
-                                       strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                        close(fd);
-                } else if (do_link) {
-                        rc = link(tgt, filename);
-                        if (rc) {
-                                printf("link(%s, %s) error: %s\n",
-                                       tgt, filename, strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                } else {
-                        rc = mknod(filename, S_IFREG| 0444, 0);
-                        if (rc) {
-                                printf("mknod(%s) error: %s\n",
-                                       filename, strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                }
-                if ((i % 10000) == 0) {
-                        printf(" - created %d (time %ld total %ld last %ld)\n",
-                               i, time(0), time(0) - start, time(0) - last);
-                        last = time(0);
-                }
-        }
-        printf("total: %d creates in %ld seconds: %f creates/second\n", i,
-               time(0) - start, ((float)i / (time(0) - start)));
-        start = time(0);
-        printf("finish at %s", ctime(&start));
-
-        return rc;
-}
diff --git a/lustre/tests/createmany.c b/lustre/tests/createmany.c
deleted file mode 100644
index 466c1561b8d04a6f7830e77ec828c7bb8ec7dc88..0000000000000000000000000000000000000000
--- a/lustre/tests/createmany.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-void usage(char *prog)
-{
-        printf("usage: %s {-o|-m|-d|-l<tgt>} filenamefmt count\n", prog);
-        printf("       %s {-o|-m|-d|-l<tgt>} filenamefmt -seconds\n", prog);
-        printf("       %s {-o|-m|-d|-l<tgt>} filenamefmt start count\n", prog);
-}
-
-int main(int argc, char ** argv)
-{
-        int i, rc = 0, do_open = 0, do_link = 0, do_mkdir = 0;
-        char format[4096], *fmt, *tgt = NULL;
-        char filename[4096];
-        long start, last, end;
-        long begin = 0, count;
-
-        if (argc < 4 || argc > 5) {
-                usage(argv[0]);
-                return 1;
-        }
-
-        if (strcmp(argv[1], "-d") == 0) {
-                do_mkdir = 1;
-        } else if (strcmp(argv[1], "-o") == 0) {
-                do_open = 1;
-        } else if (strncmp(argv[1], "-l", 2) == 0 && argv[1][2]) {
-                tgt = argv[1] + 2;
-                do_link = 1;
-        } else if (strcmp(argv[1], "-m") != 0) {
-                usage(argv[0]);
-                return 1;
-        }
-
-        if (strlen(argv[2]) > 4080) {
-                printf("name too long\n");
-                return 1;
-        }
-
-        start = last = time(0);
-
-        if (argc == 4) {
-                end = strtol(argv[3], NULL, 0);
-        } else {
-                begin = strtol(argv[3], NULL, 0);
-                end = strtol(argv[4], NULL, 0);
-        }
-
-        if (end > 0) {
-                count = end;
-                end = -1UL >> 1;
-        } else {
-                end = start - end;
-                count = -1UL >> 1;
-        }
-
-        if (strchr(argv[2], '%'))
-                fmt = argv[2];
-        else {
-                sprintf(format, "%s%%d", argv[2]);
-                fmt = format;
-        }
-        for (i = 0; i < count && time(0) < end; i++, begin++) {
-                sprintf(filename, fmt, begin);
-                if (do_open) {
-                        int fd = open(filename, O_CREAT|O_RDWR, 0644);
-                        if (fd < 0) {
-                                printf("open(%s) error: %s\n", filename,
-                                       strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                        close(fd);
-                } else if (do_link) {
-                        rc = link(tgt, filename);
-                        if (rc) {
-                                printf("link(%s, %s) error: %s\n",
-                                       tgt, filename, strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                } else if (do_mkdir) {
-                        rc = mkdir(filename, 0755);
-                        if (rc) {
-                                printf("mkdir(%s) error: %s\n",
-                                       filename, strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                } else {
-                        rc = mknod(filename, S_IFREG| 0444, 0);
-                        if (rc) {
-                                printf("mknod(%s) error: %s\n",
-                                       filename, strerror(errno));
-                                rc = errno;
-                                break;
-                        }
-                }
-                if ((i % 10000) == 0) {
-                        printf(" - created %d (time %ld total %ld last %ld)\n",
-                               i, time(0), time(0) - start, time(0) - last);
-                        last = time(0);
-                }
-        }
-        printf("total: %d creates in %ld seconds: %f creates/second\n", i,
-               time(0) - start, ((float)i / (time(0) - start)));
-
-        return rc;
-}
diff --git a/lustre/tests/createtest.c b/lustre/tests/createtest.c
deleted file mode 100644
index 6223034f6a87212bab4eb0bc4903071c08a0190e..0000000000000000000000000000000000000000
--- a/lustre/tests/createtest.c
+++ /dev/null
@@ -1,142 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-
-#ifndef S_SHIFT
-#define S_SHIFT 12
-#endif
-
-int usage(char *prog)
-{
-	fprintf(stderr, "usage: %s <basename>\n", prog);
-	exit(1);
-}
-
-int main(int argc, char *argv[])
-{
-	char name[4096];
-	int i;
-
-	if (argc != 2)
-		usage(argv[0]);
-
-	umask(0);
-	for (i = 0; i <= S_IFMT; i += (1 << S_SHIFT)) {
-		struct stat st;
-		int mode = i | 0644;
-		int rc;
-
-		sprintf(name, "%s-mknod%06o", argv[1], mode);
-		rc = mknod(name, mode, 0x1234);
-		switch (i) {
-		case 0:
-			mode |= S_IFREG;
-		case S_IFREG:
-		case S_IFCHR: case S_IFBLK:
-			if (rc < 0 && getuid() != 0)
-				continue;
-		case S_IFSOCK: case S_IFIFO:
-			if (rc < 0) {
-				fprintf(stderr, "%s: ERROR mknod %s: %s\n",
-					argv[0], name, strerror(errno));
-				exit(10);
-			}
-			rc = stat(name, &st);
-			if (rc < 0) {
-				fprintf(stderr, "%s: ERROR stat %s: %s",
-					argv[0], name, strerror(errno));
-				exit(11);
-			}
-			if (st.st_mode != mode) {
-				fprintf(stderr, "%s: ERROR mode %s: %o != %o",
-					argv[0], name, st.st_mode, mode);
-				exit(12);
-			}
-			rc = unlink(name);
-			if (rc < 0) {
-				fprintf(stderr, "%s: ERROR unlink %s: %s",
-					argv[0], name, strerror(errno));
-				exit(13);
-			}
-			break;
-		default:
-			if (rc == 0) {
-				fprintf(stderr, "%s: ERROR: %s created\n",
-					argv[0], name);
-				exit(14);
-			}
-		}
-	}
-
-	for (i = 0; i <= S_IFMT; i += (1 << S_SHIFT)) {
-		struct stat st;
-		int mode;
-		int fd;
-		int rc;
-
-		mode = i | 0644;
-		sprintf(name, "%s-creat%06o", argv[1], mode);
-		fd = open(name, O_CREAT|O_RDONLY, mode);
-		if (fd < 0) {
-			fprintf(stderr, "%s: ERROR creat %s: %s\n",
-				argv[0], name, strerror(errno));
-			exit(21);
-		}
-		close(fd);
-		rc = stat(name, &st);
-		if (rc < 0) {
-			fprintf(stderr, "%s: ERROR stat %s: %s",
-				argv[0], name, strerror(errno));
-			exit(11);
-		}
-		if (!S_ISREG(st.st_mode & S_IFMT)) {
-			fprintf(stderr, "%s: ERROR mode %s: %o != %o",
-				argv[0], name, st.st_mode & S_IFMT, S_IFREG);
-			exit(12);
-		}
-		rc = unlink(name);
-		if (rc < 0) {
-			fprintf(stderr, "%s: ERROR unlink %s: %s\n",
-				argv[0], name, strerror(errno));
-			exit(20);
-		}
-	}
-
-	for (i = 0; i <= S_IFMT; i += (1 << S_SHIFT)) {
-		struct stat st;
-		int rc;
-
-		sprintf(name, "%s-mkdir%06o", argv[1], i | 0644);
-		rc = mkdir(name, i | 0664);
-		if (rc < 0) {
-			fprintf(stderr, "%s: ERROR mkdir %s: %s\n",
-				argv[0], name, strerror(errno));
-			exit(30);
-		}
-		rc = stat(name, &st);
-		if (rc < 0) {
-			fprintf(stderr, "%s: ERROR stat %s: %s",
-				argv[0], name, strerror(errno));
-			exit(11);
-		}
-		if (!S_ISDIR(st.st_mode)) {
-			fprintf(stderr, "%s: ERROR mode %s: %o != %o",
-				argv[0], name, st.st_mode & S_IFMT, S_IFDIR);
-			exit(12);
-		}
-		rc = rmdir(name);
-		if (rc < 0) {
-			fprintf(stderr, "%s: ERROR rmdir %s: %s\n",
-				argv[0], name, strerror(errno));
-			exit(31);
-		}
-	}
-
-	printf("%s: SUCCESS\n", argv[0]);
-	return 0;
-}
diff --git a/lustre/tests/directio.c b/lustre/tests/directio.c
deleted file mode 100644
index 1108cba9bdcf897aa3eb07d3329bb6e1146de7e4..0000000000000000000000000000000000000000
--- a/lustre/tests/directio.c
+++ /dev/null
@@ -1,130 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef _GNU_SOURCE
-#define  _GNU_SOURCE
-#endif
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-
-int main(int argc, char **argv)
-{
-#ifdef O_DIRECT
-        int fd;
-        char *wbuf, *fname;
-        int blocks, seek_blocks;
-        long len;
-        off64_t seek;
-        struct stat64 st;
-        char pad = 0xba;
-        int action;
-        int rc;
-
-        if (argc < 5 || argc > 6) {
-                printf("Usage: %s <read/write/rdwr/readhole> file seek nr_blocks [blocksize]\n", argv[0]);
-                return 1;
-        }
-
-        if (!strcmp(argv[1], "read"))
-                action = O_RDONLY;
-        else if (!strcmp(argv[1], "write"))
-                action = O_WRONLY;
-        else if (!strcmp(argv[1], "rdwr"))
-                action = O_RDWR;
-        else if (!strcmp(argv[1], "readhole")) {
-                action = O_RDONLY;
-                pad = 0;
-        } else {
-                printf("Usage: %s <read/write/rdwr> file seek nr_blocks [blocksize]\n", argv[0]);
-                return 1;
-        }
-
-        fname = argv[2];
-        seek_blocks = strtoul(argv[3], 0, 0);
-        blocks = strtoul(argv[4], 0, 0);
-        if (!blocks) {
-                printf("Usage: %s <read/write/rdwr> file seek nr_blocks [blocksize]\n", argv[0]);
-                return 1;
-        }
-
-        fd = open(fname, O_LARGEFILE | O_DIRECT | O_RDWR | O_CREAT, 0644);
-        if (fd == -1) {
-                printf("Cannot open %s:  %s\n", fname, strerror(errno));
-                return 1;
-        }
-
-        if (argc >= 6)
-                st.st_blksize = strtoul(argv[5], 0, 0);
-        else if (fstat64(fd, &st) < 0) {
-                printf("Cannot stat %s:  %s\n", fname, strerror(errno));
-                return 1;
-        }
-
-        printf("directio on %s for %dx%lu bytes \n", fname, blocks,
-               st.st_blksize);
-
-        seek = (off64_t)seek_blocks * (off64_t)st.st_blksize;
-        len = blocks * st.st_blksize;
-
-        wbuf = mmap(0, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 0, 0);
-        if (wbuf == MAP_FAILED) {
-                printf("No memory %s\n", strerror(errno));
-                return 1;
-        }
-        memset(wbuf, pad, len);
-
-        if (action == O_WRONLY || action == O_RDWR) {
-                if (lseek64(fd, seek, SEEK_SET) < 0) {
-                        printf("lseek64 failed: %s\n", strerror(errno));
-                        return 1;
-                }
-
-                rc = write(fd, wbuf, len);
-                if (rc != len) {
-                        printf("Write error %s (rc = %d, len = %ld)\n",
-                               strerror(errno), rc, len);
-                        return 1;
-                }
-        }
-
-        if (action == O_RDONLY || action == O_RDWR) {
-                char *rbuf;
-
-                if (lseek64(fd, seek, SEEK_SET) < 0) {
-                        printf("Cannot seek %s\n", strerror(errno));
-                        return 1;
-                }
-
-                rbuf =mmap(0,len,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,0,0);
-                if (rbuf == MAP_FAILED) {
-                        printf("No memory %s\n", strerror(errno));
-                        return 1;
-                }
-
-                rc = read(fd, rbuf, len);
-                if (rc != len) {
-                        printf("Read error: %s rc = %d\n",strerror(errno),rc);
-                        return 1;
-                }
-
-                if (memcmp(wbuf, rbuf, len)) {
-                        printf("Data mismatch\n");
-                        return 1;
-                }
-        }
-
-        printf("PASS\n");
-        return 0;
-#else /* !O_DIRECT */
-#warning O_DIRECT not defined, directio test will fail
-        printf("O_DIRECT not defined\n");
-        return 1;
-#endif /* !O_DIRECT */
-}
diff --git a/lustre/tests/disk1_4.zip b/lustre/tests/disk1_4.zip
deleted file mode 100644
index 0970c8309df5ec7211f7afc0b23b5e40527c8622..0000000000000000000000000000000000000000
Binary files a/lustre/tests/disk1_4.zip and /dev/null differ
diff --git a/lustre/tests/fchdir_test.c b/lustre/tests/fchdir_test.c
deleted file mode 100644
index 83c096eb19a9025d44a65a8bb63bf451d6f82f58..0000000000000000000000000000000000000000
--- a/lustre/tests/fchdir_test.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <fcntl.h>
-
-
-int main(int argc, char **argv)
-{
-        int fd;
-        int rc;
-
-        fd = open(".", O_RDONLY);
-        if (fd < 0) {
-                perror("opening '.' :");
-                exit(2);
-        }
-
-        rc = chdir("/mnt/lustre/subdir/subdir");
-        if (rc) { 
-                perror("cannot chdir subdir:");
-                exit(3);
-        }
-
-        rc = fchdir(fd);
-        if (rc) { 
-                perror("cannot fchdir back\n");
-                exit(4);
-        }
-
-        rc = close(fd);
-        if (rc) { 
-                perror("cannot close '.'\n");
-                exit(5);
-        }
-
-        return(0);
-}
diff --git a/lustre/tests/filter_survey.sh b/lustre/tests/filter_survey.sh
deleted file mode 100644
index f2cd0800fedc9fa054aceccf3c50b454cb051fb7..0000000000000000000000000000000000000000
--- a/lustre/tests/filter_survey.sh
+++ /dev/null
@@ -1,262 +0,0 @@
-#!/bin/sh
-#
-# this runs prep/commit against filters and generates a
-# table of their write timings.  it needs the names
-# of the filters it will run against and needs the
-# obdecho module loaded.  it spews a lot of junk
-# as it goes, only the last bit is really interesting; 
-# tee it to a log file.
-#
-# ex: FILTER_NAMES="ost1 ost2" sh ./filter_survey.sh
-#
-SRCDIR="`dirname $0`/"
-export PATH=$SRCDIR/../utils:/sbin:/usr/sbin::$PATH
-
-tmp_dir=""
-echo_base="f_s_$$"
-last_filter="-1"
-
-die() {
-	echo $* 1>&2
-	exit 1
-}
-
-cleanup() {
-	[ ! -z "$tmp_dir" ] && [ -d $tmp_dir ] && rm -rf $tmp_dir
-	[ "$last_filter" = "-1" ] && exit 0
-	for i in `seq 0 $last_filter`; do
-		local name="${echo_names[$i]}"
-		echo cleaning up $name
-# I can't believe leading whitespace matters here.
-lctl << EOF
-cfg_device $name
-cleanup
-detach
-quit
-EOF
-	done
-}
-trap cleanup EXIT
-
-not_a_filter() {
-	lctl device_list | awk "/obdfilter $1/ {exit 1}"
-	return $?
-}
-
-# holy crap are these confusing
-sep1="||||"
-sep2="||"
-sep3=""
-sep4="||||"
-
-#
-# build up echo_clients attached to the given filters and record
-# their names and obj numbers for later use and teardown
-#
-[ -z "$FILTER_NAMES" ] && die "please specify filter names to run against"
-for fn in $FILTER_NAMES; do
-	if not_a_filter $fn; then
-		die "'$fn' isn't the name of an obdfilter device"
-	fi
-	en="${echo_base}_$fn"
-lctl << EOF
-	newdev
-	attach echo_client $en ${en}_uuid
-	setup $fn
-	quit
-EOF
-	[ $? -eq 0 ] || die "error setting up echo_client (is obdecho loaded?)"
-
-	obj=`lctl device_list | awk "/echo_client $en/ {print "'$1}'`
-	[ -z "$obj" ] && die "couldn't find my echo_client's object number"
-	echo setup echo_client name $en as object $obj
-	echo_objs="$echo_objs $obj"
-
-	last_filter=$(($last_filter + 1))
-	echo_names[$last_filter]=$en
-
-	# build up the seperators we'll use in generating the wiki
-	sep1="$sep1||||"
-	sep2="$sep2||"
-	sep3="$sep3||"
-	sep4="$sep4||"
-done
-
-
-doit() {
-        $*
-}
-nop() {
-        local nothing;
-}
-if which opcontrol; then
-        echo generating oprofile results
-        oprofile=doit
-else
-        echo not using oprofile
-        oprofile=nop
-fi
- 
-tmp_dir=`mktemp -d /tmp/echo_client_survey_XXXXXX` || die "mktemp failed"
-
-TOT_PAGES=${TOT_PAGES:-524288}
-
-throughput() {
-	local threads="$1"
-	local pages="$2"
-	local time="$3"
-	local tp=`echo 'scale=2; '$threads' * '$pages' * 4096 / ('$time' * 1024 * 1024)' | bc`
-	echo $tp
-}
-
-wait_for_idle_io() {
-	echo "waiting idle io via vmstat"
-	vmstat 1 | awk '
-        ($10 == 0 && $11 == 0) {
-                idle++;
-                if (idle == 3) {
-                        print "idle for 3 seconds, must be done"
-                        exit
-                }
-        }
-        (NR == 13) {
-                "deletion took longer than 10s, bailing";
-                exit
-        } '
-}
-
-#
-# sorry for the wild indenting.  get a wide terminal, its 2003.
-#
-num_rows="0"
-num_summary_rows="0"
-for order_threads in `seq 0 3`; do 
-	nthreads=$(echo "2^$order_threads" | bc)
-
-	for stride in 16 64 128; do 
-		span="<|$(($nthreads +1))>"
-		row="||$span $nthreads||$span $stride||"
-		sum_row="||$nthreads||$stride||"
-
-		for t in `seq 1 $nthreads`; do
-			thread_row[$t]="||"
-		done
-
-		for obj_per_thread in y n; do
-			if [ $obj_per_thread == "y" ]; then
-				offset_prefix=""
-				objid_prefix="t";
-			else 
-				offset_prefix="t"
-				objid_prefix="";
-			fi
-
-			# create the objects that this write/rewrite run
-			# will be using
-			for i in `seq 0 $last_filter`; do
-				oid=`lctl --device "\$"${echo_names[$i]} create $nthreads | \
-					awk '/1 is object id/ { print $6 }'`
-				[ -z "$oid" ] && die "error creating object"
-				oids[$i]=$oid
-			done
-
-			# iterate through write and rewrite
-			for a in 1 2; do
-				total_maxtime="0.0"
-				pids=""
-
-				$oprofile opcontrol --start				
-
-				echo 'nice -19 vmstat 5' > $tmp_dir/vmstat-log
-				nice -19 vmstat 5 >> $tmp_dir/vmstat-log &
-				vmstat_pid="$!"
-
-				$oprofile opcontrol --reset
-
-				# start a test_brw thread in the background
-				# for each given filter
-				for i in `seq 0 $last_filter`; do
-					lctl --threads $nthreads v "\$"${echo_names[$i]} \
-						test_brw ${offset_prefix}1 w v \
-						$TOT_PAGES ${objid_prefix}${oids[$i]} p$stride | \
-							tee $tmp_dir/$i &
-					pids="$pids $!"
-				done
-				echo ------ waiting for $nthreads obj per thread $obj_per_thread rw: $a ----
-				for p in $pids; do 
-					wait $p
-				done
-				$oprofile opcontrol --shutdown
-				echo ------ finished $nthreads obj per thread $obj_per_thread rw: $a ----
-				kill $vmstat_pid
-				cat $tmp_dir/vmstat-log
-				rm $tmp_dir/vmstat-log
-
-			        $oprofile opreport
-				$oprofile opreport -c -l
-
-				for t in `seq 1 $nthreads`; do
-					thread_row[$t]="${thread_row[$t]} ||"
-				done
-				row_tmp=""
-				for i in `seq 0 $last_filter`; do
-					maxtime="0.0"
-					for t in `seq 1 $nthreads`; do
-						f="$tmp_dir/$i"
-						MS=`grep "test_brw-$t" $f | \
-						   awk '($8=="MB/s):"){print $6, substr($7,2);}'`
-						thread_row[$t]="${thread_row[$t]}$MS||"
-						time=`echo $MS | cut -d s -f 1`
-						if [ `echo "$time > $maxtime" | bc` -eq "1" ]; then
-							maxtime=$time;
-						fi
-					done
-					tp=`throughput $nthreads $TOT_PAGES $maxtime`
-					row_tmp="${row_tmp}<#ffffe0>$tp $maxtime||"
-					sum_row="${sum_row}$tp||"
-
-					if [ `echo "$maxtime > $total_maxtime" | bc` -eq "1" ]; then
-						total_maxtime=$maxtime;
-					fi
-				done
-				tp=`throughput $(($nthreads * $(($last_filter +1)))) $TOT_PAGES $total_maxtime`
-				row="${row}<#ffffe0>${tp} $total_maxtime||${row_tmp}"
-			done
-
-			# destroy the objects from this run and wait for
-			# their destruction to complete 
-			for i in `seq 0 $last_filter`; do
-				lctl --device "\$"${echo_names[$i]} destroy ${oids[$i]} $nthreads
-			done
-			wait_for_idle_io
-		done
-
-		num_rows=$(($num_rows + 1))
-		rows[$num_rows]="$row"
-
-		num_summary_rows=$(($num_summary_rows + 1))
-		summary[$num_summary_rows]="$sum_row"
-
-		for t in `seq 1 $nthreads`; do
-			num_rows=$(($num_rows + 1))
-			rows[$num_rows]="${thread_row[$t]}"
-		done
-	done
-done
-
-echo done.
-
-bg='<rowbgcolor="#eoeoff"'
-echo "||$bg|2>threads writing $TOT_PAGES pages||<|2>pages per prep/commit${sep1}oid per thread${sep1}shared oid||"
-echo "$sep2$bg>write${sep2}re-write${sep2}write${sep2}re-write||"
-for r in `seq 1 $num_rows`; do
-	echo ${rows[$r]}
-done
-
-echo summary table
-
-echo "||$bg|2>threads||<|2>pages ${sep4}oid/thread${sep4}shared oid||"
-echo "$sep3$bg>write${sep3}re-write${sep3}write${sep3}re-write||"
-for r in `seq 1 $num_summary_rows`; do
-	echo ${summary[$r]}
-done
diff --git a/lustre/tests/flock.c b/lustre/tests/flock.c
deleted file mode 100644
index 83da7c58e2e2c4510cb42e745b220d781f29b6ee..0000000000000000000000000000000000000000
--- a/lustre/tests/flock.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Lustre Light user test program
- *
- *  Copyright (c) 2002, 2003 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#define _BSD_SOURCE
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <getopt.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/queue.h>
-#include <signal.h>
-#include <errno.h>
-#include <dirent.h>
-#include <sys/uio.h>
-#include <sys/time.h>
-#include <stdarg.h>
-
-static char lustre_path[] = "/mnt/lustre";
-
-#define ENTRY(str)                                                      \
-        do {                                                            \
-                char buf[100];                                          \
-                int len;                                                \
-                sprintf(buf, "===== START %s: %s ", __FUNCTION__, (str)); \
-                len = strlen(buf);                                      \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', 100-len);                  \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-        } while (0)
-
-#define LEAVE()                                                         \
-        do {                                                            \
-                char buf[100];                                          \
-                int len;                                                \
-                sprintf(buf, "===== END TEST %s: successfully ",        \
-                        __FUNCTION__);                                  \
-                len = strlen(buf);                                      \
-                if (len < 79) {                                         \
-                        memset(buf+len, '=', 100-len);                  \
-                        buf[79] = '\n';                                 \
-                        buf[80] = 0;                                    \
-                }                                                       \
-                printf("%s", buf);                                      \
-        } while (0)
-
-#define EXIT return
-
-#define MAX_PATH_LENGTH 4096
-
-
-int t_fcntl(int fd, int cmd, ...)
-{
-	va_list ap;
-	long arg;
-	struct flock *lock;
-	int rc = -1;
-
-	va_start(ap, cmd);
-	switch (cmd) {
-	case F_GETFL:
-		va_end(ap);
-		rc = fcntl(fd, cmd);
-		if (rc == -1) {
-			printf("fcntl GETFL failed: %s\n",
-				 strerror(errno));
-			EXIT(1);
-		}
-		break;
-	case F_SETFL:
-		arg = va_arg(ap, long);
-		va_end(ap);
-		rc = fcntl(fd, cmd, arg);
-		if (rc == -1) {
-			printf("fcntl SETFL %ld failed: %s\n",
-				 arg, strerror(errno));
-			EXIT(1);
-		}
-		break;
-	case F_GETLK:
-	case F_SETLK:
-	case F_SETLKW:
-		lock = va_arg(ap, struct flock *);
-		va_end(ap);
-		rc = fcntl(fd, cmd, lock);
-		if (rc == -1) {
-			printf("fcntl cmd %d failed: %s\n",
-				 cmd, strerror(errno));
-			EXIT(1);
-		}
-		break;
-	case F_DUPFD:
-		arg = va_arg(ap, long);
-		va_end(ap);
-		rc = fcntl(fd, cmd, arg);
-		if (rc == -1) {
-			printf("fcntl F_DUPFD %d failed: %s\n",
-				 (int)arg, strerror(errno));
-			EXIT(1);
-		}
-		break;
-	default:
-		va_end(ap);
-		printf("fcntl cmd %d not supported\n", cmd);
-		EXIT(1);
-	}
-        printf("fcntl %d = %d, ltype = %d\n", cmd, rc, lock->l_type);
-	return rc;
-}
-
-int t_unlink(const char *path)
-{
-        int rc;
-
-        rc = unlink(path);
-        if (rc) {
-                printf("unlink(%s) error: %s\n", path, strerror(errno));
-                EXIT(-1);
-        }
-        return rc;
-}
-
-void t21()
-{
-        char file[MAX_PATH_LENGTH] = "";
-        int fd, ret;
-	struct flock lock = {
-		.l_type = F_RDLCK,
-		.l_whence = SEEK_SET,
-	};
-
-        ENTRY("basic fcntl support");
-        snprintf(file, MAX_PATH_LENGTH, "%s/test_t21_file", lustre_path);
-
-        fd = open(file, O_RDWR|O_CREAT, (mode_t)0666);
-        if (fd < 0) {
-                printf("error open file: %m\n", file);
-                exit(-1);
-        }
-
-        t_fcntl(fd, F_SETFL, O_APPEND);
-        if (!(ret = t_fcntl(fd, F_GETFL)) & O_APPEND) {
-                printf("error get flag: ret %x\n", ret);
-                exit(-1);
-        }
-
-	t_fcntl(fd, F_SETLK, &lock);
-	t_fcntl(fd, F_GETLK, &lock);
-	lock.l_type = F_WRLCK;
-	t_fcntl(fd, F_SETLKW, &lock);
-	t_fcntl(fd, F_GETLK, &lock);
-	lock.l_type = F_UNLCK;
-	t_fcntl(fd, F_SETLK, &lock);
-
-        close(fd);
-        t_unlink(file);
-        LEAVE();
-}
-
-
-int main(int argc, char * const argv[])
-{
-        /* Set D_VFSTRACE to see messages from ll_file_flock.
-           The test passes either with -o flock or -o noflock 
-           mount -o flock -t lustre uml1:/mds1/client /mnt/lustre */
-        t21();
-
-	printf("completed successfully\n");
-	return 0;
-}
diff --git a/lustre/tests/flock_test.c b/lustre/tests/flock_test.c
deleted file mode 100644
index 8ca07978958348c6c700abf937866ad57382bd6a..0000000000000000000000000000000000000000
--- a/lustre/tests/flock_test.c
+++ /dev/null
@@ -1,86 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/file.h>
-#include <sys/wait.h>
-
-void chd_lock_unlock(int);
-char fname[1024];
-
-int main(int argc, char **argv)
-{
-    pid_t pid;
-    int cfd, fd, rc;
-
-    if (argc != 2) {
-        fprintf(stderr, "\nUSAGE: flock_test filepath\n");
-        exit(2);
-    }
-    strncpy(fname, argv[1], 1023);
-    fname[1023] ='\0';
-    fd = open(fname, O_RDWR|O_CREAT, (mode_t)0666);
-    if (fd == -1) {
-        fprintf(stderr, "flock_test: failed to open %s : ", fname);
-        perror("");
-        exit(1);
-    }
-    if (flock(fd, LOCK_EX | LOCK_NB) == -1) {
-        fprintf(stderr, "flock_test: parent attempt to lock %s failed : ", \
-            fname);
-        perror("");
-        exit(1);
-    }
-
-    pid = fork();
-    if (pid == -1) {
-        fprintf(stderr, "flock_test: fork failed : ");
-        perror("");
-        exit(1);
-    }
-
-    if (pid == 0) {
-        pid = getpid();
-        sleep(2);
-        if ((cfd = open(fname, O_RDWR)) == -1) {
-            fprintf(stderr, "flock_test child (%d) cannot open %s: ", \
-                pid, fname);
-            perror("");
-            exit(1);
-        }
-        if(flock(cfd, LOCK_EX | LOCK_NB) != -1) {
-            fprintf(stderr, "flock_test child (%d): %s not yet locked  : ", \
-                pid, fname);
-            exit(1);
-        }
-        if(flock(fd, LOCK_UN) == -1) {
-            fprintf(stderr, "flock_test child (%d): cannot unlock %s: ", \
-                pid, fname);
-            perror("");
-            exit(1);
-        }
-        if(flock(cfd, LOCK_EX | LOCK_NB) == -1 ) {
-            fprintf(stderr, \
-                "flock_test: child (%d) cannot re-lock %s after unlocking : ", \
-                pid, fname);
-            perror("");
-            exit(1);
-        }
-        close(cfd);
-        exit(0);
-    }
-
-    waitpid(pid, &rc, 0);
-    close(fd);
-    unlink(fname);
-    if (WIFEXITED(rc) && WEXITSTATUS(rc) != 0) {
-        fprintf(stderr, "flock_test: child (%d) exit code = %d\n", \
-            pid, WEXITSTATUS(rc));
-        exit(1);
-    }
-    exit(0);
-}
diff --git a/lustre/tests/flocks_test.c b/lustre/tests/flocks_test.c
deleted file mode 100644
index ff54e06369ffe86d4d738708261942f7c7c8a357..0000000000000000000000000000000000000000
--- a/lustre/tests/flocks_test.c
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <errno.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#include <sys/file.h>
-
-void usage(void)
-{
-        fprintf(stderr, "usage: ./flocks_test on|off -c|-f|-l /path/to/file\n");
-        exit(EXIT_FAILURE);
-}
-
-int main(int argc, char *argv[])
-{
-        int fd;
-        int mount_with_flock = 0;
-        int error = 0;
-
-        if (argc != 4)
-                usage();
-        
-        if (!strncmp(argv[1], "on", 3)) {
-                mount_with_flock = 1;
-        } else if (!strncmp(argv[1], "off", 4)) {
-                mount_with_flock = 0;
-        } else {
-                usage();
-        }
-
-        if ((fd = open(argv[3], O_RDWR)) < 0) {
-                fprintf(stderr, "Couldn't open file: %s\n", argv[2]);
-                exit(EXIT_FAILURE);
-        }
-
-        if (!strncmp(argv[2], "-c", 3)) {
-                struct flock fl;
-
-                fl.l_type = F_RDLCK;
-                fl.l_whence = SEEK_SET;
-                fl.l_start = 0;
-                fl.l_len = 1;
-
-                error = fcntl(fd, F_SETLK, &fl);
-        } else if (!strncmp(argv[2], "-l", 3)) {
-                error = lockf(fd, F_LOCK, 1);
-        } else if (!strncmp(argv[2], "-f", 3)) {
-                error = flock(fd, LOCK_EX);
-        } else {
-                usage();
-        }
-
-        if (mount_with_flock)
-                return((error == 0) ? EXIT_SUCCESS : EXIT_FAILURE);
-        else
-                return((error == 0) ? EXIT_FAILURE : EXIT_SUCCESS);
-}
diff --git a/lustre/tests/fsx.c b/lustre/tests/fsx.c
deleted file mode 100644
index dc97fd9d21538e5933a82f1f04c6c4d0de348e18..0000000000000000000000000000000000000000
--- a/lustre/tests/fsx.c
+++ /dev/null
@@ -1,1400 +0,0 @@
-/*
- * Copyright (c) 1998-2001 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_LICENSE_HEADER_START@
- *
- * The contents of this file constitute Original Code as defined in and
- * are subject to the Apple Public Source License Version 1.1 (the
- * "License").  You may not use this file except in compliance with the
- * License.  Please obtain a copy of the License at
- * http://www.apple.com/publicsource and read it before using this file.
- *
- * This Original Code and all software distributed under the License are
- * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
- * License for the specific language governing rights and limitations
- * under the License.
- *
- * @APPLE_LICENSE_HEADER_END@
- *
- *	File:	fsx.c
- *	Author:	Avadis Tevanian, Jr.
- *
- *	File system exerciser.
- *
- *	Rewrite and enhancements 1998-2001 Conrad Minshall -- conrad@mac.com
- *
- *	Various features from Joe Sokol, Pat Dirks, and Clark Warner.
- *
- *	Small changes to work under Linux -- davej@suse.de
- *
- *	Sundry porting patches from Guy Harris 12/2001
- * $FreeBSD: src/tools/regression/fsx/fsx.c,v 1.1 2001/12/20 04:15:57 jkh Exp $
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#if defined(_UWIN) || defined(__linux__)
-# include <sys/param.h>
-# include <limits.h>
-# include <time.h>
-# include <strings.h>
-# include <sys/time.h>
-#endif
-#include <fcntl.h>
-#include <sys/mman.h>
-#ifndef MAP_FILE
-# define MAP_FILE 0
-#endif
-#include <limits.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <errno.h>
-
-#define NUMPRINTCOLUMNS 32	/* # columns of data to print on each line */
-
-/*
- *	A log entry is an operation and a bunch of arguments.
- */
-
-struct log_entry {
-	int	operation;
-	struct timeval tv;
-	int	args[3];
-};
-
-#define	LOGSIZE	1000
-
-struct log_entry	oplog[LOGSIZE];	/* the log */
-int			logptr = 0;	/* current position in log */
-int			logcount = 0;	/* total ops */
-
-/*
- *	Define operations
- */
-
-#define	OP_READ		1
-#define OP_WRITE	2
-#define OP_TRUNCATE	3
-#define OP_CLOSEOPEN	4
-#define OP_MAPREAD	5
-#define OP_MAPWRITE	6
-#define OP_SKIPPED	7
-
-int page_size;
-int page_mask;
-
-char	*original_buf;			/* a pointer to the original data */
-char	*good_buf;			/* a pointer to the correct data */
-char	*temp_buf;			/* a pointer to the current data */
-char	*fname;				/* name of our test file */
-char	logfile[1024];			/* name of our log file */
-char	goodfile[1024];			/* name of our test file */
-
-off_t		file_size = 0;
-off_t		biggest = 0;
-char		state[256];
-unsigned long	testcalls = 0;		/* calls to function "test" */
-
-unsigned long	simulatedopcount = 0;	/* -b flag */
-int	closeprob = 0;			/* -c flag */
-int	debug = 0;			/* -d flag */
-unsigned long	debugstart = 0;		/* -D flag */
-unsigned long	maxfilelen = 256 * 1024;	/* -l flag */
-int	sizechecks = 1;			/* -n flag disables them */
-int	maxoplen = 64 * 1024;		/* -o flag */
-int	quiet = 0;			/* -q flag */
-unsigned long progressinterval = 0;	/* -p flag */
-int	readbdy = 1;			/* -r flag */
-int	style = 0;			/* -s flag */
-int	truncbdy = 1;			/* -t flag */
-int	writebdy = 1;			/* -w flag */
-long	monitorstart = -1;		/* -m flag */
-long	monitorend = -1;		/* -m flag */
-int	lite = 0;			/* -L flag */
-long	numops = -1;			/* -N flag */
-int	randomoplen = 1;		/* -O flag disables it */
-int	seed = 1;			/* -S flag */
-int     mapped_writes = 1;              /* -W flag disables */
-int 	mapped_reads = 1;		/* -R flag disables it */
-int	fsxgoodfd = 0;
-FILE *	fsxlogf = NULL;
-int badoff = -1;
-
-
-void
-vwarnc(code, fmt, ap)
-	int code;
-	const char *fmt;
-	va_list ap;
-{
-	fprintf(stderr, "fsx: ");
-	if (fmt != NULL) {
-		vfprintf(stderr, fmt, ap);
-		fprintf(stderr, ": ");
-	}
-	fprintf(stderr, "%s\n", strerror(code));
-}
-
-
-void
-warn(const char * fmt, ...)
-{
-	va_list ap;
-	va_start(ap, fmt);
-	vwarnc(errno, fmt, ap);
-	va_end(ap);
-}
-
-
-void
-__attribute__((format(printf, 1, 2)))
-prt(char *fmt, ...)
-{
-	va_list args;
-
-	va_start(args, fmt);
-	vfprintf(stdout, fmt, args);
-	va_end(args);
-
-	if (fsxlogf) {
-		va_start(args, fmt);
-		vfprintf(fsxlogf, fmt, args);
-		va_end(args);
-	}
-}
-
-void
-prterr(char *prefix)
-{
-	prt("%s%s%s\n", prefix, prefix ? ": " : "", strerror(errno));
-}
-
-
-void
-log4(int operation, int arg0, int arg1, int arg2, struct timeval *tv)
-{
-	struct log_entry *le;
-
-	le = &oplog[logptr];
-	le->tv = *tv;
-	le->operation = operation;
-	le->args[0] = arg0;
-	le->args[1] = arg1;
-	le->args[2] = arg2;
-	logptr++;
-	logcount++;
-	if (logptr >= LOGSIZE)
-		logptr = 0;
-}
-
-
-void
-logdump(void)
-{
-	int	i, count, down;
-	struct log_entry	*lp;
-
-	prt("LOG DUMP (%d total operations):\n", logcount);
-	if (logcount < LOGSIZE) {
-		i = 0;
-		count = logcount;
-	} else {
-		i = logptr;
-		count = LOGSIZE;
-	}
-	for ( ; count > 0; count--) {
-		int opnum;
-
-		opnum = i+1 + (logcount/LOGSIZE)*LOGSIZE;
-		lp = &oplog[i];
-		prt("%d: %lu.%06lu ", opnum,
-		    lp->tv.tv_sec, lp->tv.tv_usec);
-
-		switch (lp->operation) {
-		case OP_MAPREAD:
-			prt("MAPREAD  0x%x thru 0x%x (0x%x bytes)",
-			    lp->args[0], lp->args[0] + lp->args[1] - 1,
-			    lp->args[1]);
-			if (badoff >= lp->args[0] && badoff <
-						     lp->args[0] + lp->args[1])
-				prt("\t***RRRR***");
-			break;
-		case OP_MAPWRITE:
-			prt("MAPWRITE 0x%x thru 0x%x (0x%x bytes)",
-			    lp->args[0], lp->args[0] + lp->args[1] - 1,
-			    lp->args[1]);
-			if (badoff >= lp->args[0] && badoff <
-						     lp->args[0] + lp->args[1])
-				prt("\t******WWWW");
-			break;
-		case OP_READ:
-			prt("READ     0x%x thru 0x%x (0x%x bytes)",
-			    lp->args[0], lp->args[0] + lp->args[1] - 1,
-			    lp->args[1]);
-			if (badoff >= lp->args[0] &&
-			    badoff < lp->args[0] + lp->args[1])
-				prt("\t***RRRR***");
-			break;
-		case OP_WRITE:
-			prt("WRITE    0x%x thru 0x%x (0x%x bytes)",
-			    lp->args[0], lp->args[0] + lp->args[1] - 1,
-			    lp->args[1]);
-			if (lp->args[0] > lp->args[2])
-				prt(" HOLE");
-			else if (lp->args[0] + lp->args[1] > lp->args[2])
-				prt(" EXTEND");
-			if ((badoff >= lp->args[0] || badoff >=lp->args[2]) &&
-			    badoff < lp->args[0] + lp->args[1])
-				prt("\t***WWWW");
-			break;
-		case OP_TRUNCATE:
-			down = lp->args[0] < lp->args[1];
-			prt("TRUNCATE %s\tfrom 0x%x to 0x%x",
-			    down ? "DOWN" : "UP", lp->args[1], lp->args[0]);
-			if (badoff >= lp->args[!down] &&
-			    badoff < lp->args[!!down])
-				prt("\t******WWWW");
-			break;
-		case OP_CLOSEOPEN:
-			prt("CLOSE/OPEN");
-			break;
-		case OP_SKIPPED:
-			prt("SKIPPED (no operation)");
-			break;
-		default:
-			prt("BOGUS LOG ENTRY (operation code = %d)!",
-			    lp->operation);
-		}
-		prt("\n");
-		i++;
-		if (i == LOGSIZE)
-			i = 0;
-	}
-}
-
-
-void
-save_buffer(char *buffer, off_t bufferlength, int fd)
-{
-	off_t ret;
-	ssize_t byteswritten;
-
-	if (fd <= 0 || bufferlength == 0)
-		return;
-
-	if (bufferlength > SSIZE_MAX) {
-		prt("fsx flaw: overflow in save_buffer\n");
-		exit(67);
-	}
-	if (lite) {
-		off_t size_by_seek = lseek(fd, (off_t)0, SEEK_END);
-		if (size_by_seek == (off_t)-1)
-			prterr("save_buffer: lseek eof");
-		else if (bufferlength > size_by_seek) {
-			warn("save_buffer: .fsxgood file too short... will"
-				"save 0x%llx bytes instead of 0x%llx\n", 
-				(unsigned long long)size_by_seek,
-				(unsigned long long)bufferlength);
-			bufferlength = size_by_seek;
-		}
-	}
-
-	ret = lseek(fd, (off_t)0, SEEK_SET);
-	if (ret == (off_t)-1)
-		prterr("save_buffer: lseek 0");
-
-	byteswritten = write(fd, buffer, (size_t)bufferlength);
-	if (byteswritten != bufferlength) {
-		if (byteswritten == -1)
-			prterr("save_buffer write");
-		else
-			warn("save_buffer: short write, 0x%x bytes instead"
-				"of 0x%llx\n",
-			     (unsigned)byteswritten,
-			     (unsigned long long)bufferlength);
-	}
-}
-
-
-void
-report_failure(int status)
-{
-	logdump();
-
-	if (fsxgoodfd) {
-		if (good_buf) {
-			save_buffer(good_buf, file_size, fsxgoodfd);
-			prt("Correct content saved for comparison\n");
-			prt("(maybe hexdump \"%s\" vs \"%s\")\n",
-			    fname, goodfile);
-		}
-		close(fsxgoodfd);
-	}
-	exit(status);
-}
-
-
-#define short_at(cp) ((unsigned short)((*((unsigned char *)(cp)) << 8) | \
-				        *(((unsigned char *)(cp)) + 1)))
-
-void
-check_buffers(unsigned offset, unsigned size)
-{
-	unsigned char c, t;
-	unsigned i = 0;
-	unsigned n = 0;
-	unsigned op = 0;
-	unsigned bad = 0;
-
-	if (memcmp(good_buf + offset, temp_buf, size) != 0) {
-		prt("READ BAD DATA: offset = 0x%x, size = 0x%x\n",
-		    offset, size);
-		prt("OFFSET\tGOOD\tBAD\tRANGE\n");
-		while (size > 0) {
-			c = good_buf[offset];
-			t = temp_buf[i];
-			if (c != t) {
-			        if (n == 0) {
-					bad = short_at(&temp_buf[i]);
-				        prt("%#07x\t%#06x\t%#06x", offset,
-				            short_at(&good_buf[offset]), bad);
-					op = temp_buf[offset & 1 ? i+1 : i];
-				}
-				n++;
-				badoff = offset;
-			}
-			offset++;
-			i++;
-			size--;
-		}
-		if (n) {
-		        prt("\t%#7x\n", n);
-			if (bad)
-				prt("operation# (mod 256) for the bad data"
-					"may be %u\n", ((unsigned)op & 0xff));
-			else
-				prt("operation# (mod 256) for the bad data"
-					"unknown, check HOLE and EXTEND ops\n");
-		} else
-		        prt("????????????????\n");
-		report_failure(110);
-	}
-}
-
-struct test_file {
-	char *path;
-	int fd;
-} *test_files = NULL;
-
-int num_test_files = 0;
-enum fd_iteration_policy {
-	FD_SINGLE,
-	FD_ROTATE,
-	FD_RANDOM,
-};
-int fd_policy = FD_RANDOM;
-int fd_last = 0;
-
-struct test_file * 
-get_tf(void)
-{
-	unsigned index = 0;
-
-	switch (fd_policy) {
-		case FD_ROTATE:
-			index = fd_last++;
-			break;
-		case FD_RANDOM:
-			index = random();
-			break;
-		case FD_SINGLE:
-			index = 0;
-			break;
-		default:
-			prt("unknown policy");
-			exit(1);
-			break;
-	}
-	return &test_files[ index % num_test_files ];
-}
-
-void
-assign_fd_policy(char *policy)
-{
-	if (!strcmp(policy, "random"))
-		fd_policy = FD_RANDOM;
-	else if (!strcmp(policy, "rotate"))
-		fd_policy = FD_ROTATE;
-	else {
-		prt("unknown -I policy: '%s'\n", policy);
-		exit(1);
-	}
-}
-
-int
-get_fd(void)
-{
-	struct test_file *tf = get_tf();
-	return tf->fd;
-}
-
-static const char *my_basename(const char *path)
-{
-	char *c = strrchr(path, '/');
-
-	return c ? c++ : path;
-}
-
-void
-open_test_files(char **argv, int argc)
-{
-	struct test_file *tf;
-	int i;
-
-	num_test_files = argc;
-	if (num_test_files == 1)
-		fd_policy = FD_SINGLE;
-
-	test_files = calloc(num_test_files, sizeof(*test_files));
-	if (test_files == NULL) {
-		prterr("reallocating space for test files");
-		exit(1);
-	}
-
-	for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
-
-		tf->path = argv[i];
-		tf->fd = open(tf->path, O_RDWR|(lite ? 0 : O_CREAT|O_TRUNC), 
-				0666);
-		if (tf->fd < 0) {
-			prterr(tf->path);
-			exit(91);
-		}
-	}
-
-	if (quiet || fd_policy == FD_SINGLE)
-		return;
-
-	for (i = 0, tf = test_files; i < num_test_files; i++, tf++)
-		prt("fd %d: %s\n", i, tf->path);
-}
-
-void
-close_test_files(void)
-{
-	int i;
-	struct test_file *tf;
-
-	for (i = 0, tf = test_files; i < num_test_files; i++, tf++) {
-		if (close(tf->fd)) {
-			prterr("close");
-			report_failure(99);
-		}
-	}
-}
-
-
-void
-check_size(void)
-{
-	struct stat	statbuf;
-	off_t	size_by_seek;
-	int fd = get_fd();
-
-	if (fstat(fd, &statbuf)) {
-		prterr("check_size: fstat");
-		statbuf.st_size = -1;
-	}
-	size_by_seek = lseek(fd, (off_t)0, SEEK_END);
-	if (file_size != statbuf.st_size || file_size != size_by_seek) {
-		prt("Size error: expected 0x%llx stat 0x%llx seek 0x%llx\n",
-		    (unsigned long long)file_size,
-		    (unsigned long long)statbuf.st_size,
-		    (unsigned long long)size_by_seek);
-		report_failure(120);
-	}
-}
-
-
-void
-check_trunc_hack(void)
-{
-	struct stat statbuf;
-	int fd = get_fd();
-
-	ftruncate(fd, (off_t)0);
-	ftruncate(fd, (off_t)100000);
-	if (fstat(fd, &statbuf)) {
-		prterr("trunc_hack: fstat");
-		statbuf.st_size = -1;
-	}
-	if (statbuf.st_size != (off_t)100000) {
-		prt("no extend on truncate! not posix!\n");
-		exit(130);
-	}
-	ftruncate(fd, 0);
-}
-
-static char *tf_buf = NULL;
-static int max_tf_len = 0;
-
-void
-alloc_tf_buf(void)
-{
-	char dummy = '\0';
-	int highest = num_test_files - 1;
-	int len;
-
-	len = snprintf(&dummy, 0, "%u ", highest);
-	if (len < 1) {
-		prterr("finding max tf_buf");
-		exit(1);
-	}
-	len++;
-	tf_buf = malloc(len);
-	if (tf_buf == NULL) {
-		prterr("allocating tf_buf");
-		exit(1);
-	}
-	max_tf_len = snprintf(tf_buf, len, "%u ", highest);
-	if (max_tf_len < 1) {
-		prterr("fiding max_tv_len\n");
-		exit(1);
-	}
-	if (max_tf_len != len - 1) {
-		warn("snprintf() gave %d instead of %d?\n",
-				max_tf_len, len - 1);
-		exit(1);
-	}
-}
-
-char * 
-fill_tf_buf(struct test_file *tf)
-{
-	if (tf_buf == NULL)
-		alloc_tf_buf();
-
-	sprintf(tf_buf,"%lu ", (unsigned long)(tf - test_files));
-	return tf_buf;
-}
-
-void
-output_line(struct test_file *tf, int op, unsigned offset, 
-		unsigned size, struct timeval *tv)
-{
-	char *tf_num = "";
-
-	char *ops[] = {
-		[OP_READ] = "read",
-		[OP_WRITE] = "write",
-		[OP_TRUNCATE] = "trunc from",
-		[OP_MAPREAD] = "mapread",
-		[OP_MAPWRITE] = "mapwrite",
-	};
-
-	if (fd_policy != FD_SINGLE)
-		tf_num = fill_tf_buf(tf);
-
-	/* W. */
-	if (!(!quiet && ((progressinterval &&
-			testcalls % progressinterval == 0) ||
-		       (debug &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend)))))))
-		return;
-
-	prt("%06lu %lu.%06lu %.*s%-10s %#08x %s %#08x\t(0x%x bytes)\n",
-		testcalls, tv->tv_sec, tv->tv_usec, max_tf_len,
-		tf_num, ops[op], 
-		offset, op == OP_TRUNCATE ? " to " : "thru",
-		offset + size - 1, size);
-}
-
-void
-doread(unsigned offset, unsigned size)
-{
-	struct timeval t;
-	off_t ret;
-	unsigned iret;
-	struct test_file *tf = get_tf();
-	int fd = tf->fd;
-
-	offset -= offset % readbdy;
-	gettimeofday(&t, NULL);
-	if (size == 0) {
-		if (!quiet && testcalls > simulatedopcount)
-			prt("skipping zero size read\n");
-		log4(OP_SKIPPED, OP_READ, offset, size, &t);
-		return;
-	}
-	if (size + offset > file_size) {
-		if (!quiet && testcalls > simulatedopcount)
-			prt("skipping seek/read past end of file\n");
-		log4(OP_SKIPPED, OP_READ, offset, size, &t);
-		return;
-	}
-
-	log4(OP_READ, offset, size, 0, &t);
-
-	if (testcalls <= simulatedopcount)
-		return;
-
-	output_line(tf, OP_READ, offset, size, &t);
-
-	ret = lseek(fd, (off_t)offset, SEEK_SET);
-	if (ret == (off_t)-1) {
-		prterr("doread: lseek");
-		report_failure(140);
-	}
-	iret = read(fd, temp_buf, size);
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu read done\n", t.tv_sec, t.tv_usec);
-	}
-	if (iret != size) {
-		if (iret == -1)
-			prterr("doread: read");
-		else
-			prt("short read: 0x%x bytes instead of 0x%x\n",
-			    iret, size);
-		report_failure(141);
-	}
-	check_buffers(offset, size);
-}
-
-
-void
-domapread(unsigned offset, unsigned size)
-{
-	struct timeval t;
-	unsigned pg_offset;
-	unsigned map_size;
-	char    *p;
-	struct test_file *tf = get_tf();
-	int fd = tf->fd;
-
-	offset -= offset % readbdy;
-	gettimeofday(&t, NULL);
-	if (size == 0) {
-		if (!quiet && testcalls > simulatedopcount)
-			prt("skipping zero size read\n");
-		log4(OP_SKIPPED, OP_MAPREAD, offset, size, &t);
-		return;
-	}
-	if (size + offset > file_size) {
-		if (!quiet && testcalls > simulatedopcount)
-			prt("skipping seek/read past end of file\n");
-		log4(OP_SKIPPED, OP_MAPREAD, offset, size, &t);
-		return;
-	}
-
-	log4(OP_MAPREAD, offset, size, 0, &t);
-
-	if (testcalls <= simulatedopcount)
-		return;
-
-	output_line(tf, OP_MAPREAD, offset, size, &t);
-
-	pg_offset = offset & page_mask;
-	map_size  = pg_offset + size;
-
-	if ((p = mmap(0, map_size, PROT_READ, MAP_FILE | MAP_SHARED, fd,
-		      (off_t)(offset - pg_offset))) == MAP_FAILED) {
-	        prterr("domapread: mmap");
-		report_failure(190);
-	}
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu mmap done\n", t.tv_sec, t.tv_usec);
-	}
-	memcpy(temp_buf, p + pg_offset, size);
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu memcpy done\n", t.tv_sec, t.tv_usec);
-	}
-	if (munmap(p, map_size) != 0) {
-		prterr("domapread: munmap");
-		report_failure(191);
-	}
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu munmap done\n", t.tv_sec, t.tv_usec);
-	}
-
-	check_buffers(offset, size);
-}
-
-
-void
-gendata(char *original_buf, char *good_buf, unsigned offset, unsigned size)
-{
-	while (size--) {
-		good_buf[offset] = testcalls % 256;
-		if (offset % 2)
-			good_buf[offset] += original_buf[offset];
-		offset++;
-	}
-}
-
-
-void
-dowrite(unsigned offset, unsigned size)
-{
-	struct timeval t;
-	off_t ret;
-	unsigned iret;
-	struct test_file *tf = get_tf();
-	int fd = tf->fd;
-
-	offset -= offset % writebdy;
-	gettimeofday(&t, NULL);
-	if (size == 0) {
-		if (!quiet && testcalls > simulatedopcount)
-			prt("skipping zero size write\n");
-		log4(OP_SKIPPED, OP_WRITE, offset, size, &t);
-		return;
-	}
-
-	log4(OP_WRITE, offset, size, file_size, &t);
-
-	gendata(original_buf, good_buf, offset, size);
-	if (file_size < offset + size) {
-		if (file_size < offset)
-			memset(good_buf + file_size, '\0', offset - file_size);
-		file_size = offset + size;
-		if (lite) {
-			warn("Lite file size bug in fsx!");
-			report_failure(149);
-		}
-	}
-
-	if (testcalls <= simulatedopcount)
-		return;
-
-	output_line(tf, OP_WRITE, offset, size, &t);
-
-	ret = lseek(fd, (off_t)offset, SEEK_SET);
-	if (ret == (off_t)-1) {
-		prterr("dowrite: lseek");
-		report_failure(150);
-	}
-	iret = write(fd, good_buf + offset, size);
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu write done\n", t.tv_sec, t.tv_usec);
-	}
-	if (iret != size) {
-		if (iret == -1)
-			prterr("dowrite: write");
-		else
-			prt("short write: 0x%x bytes instead of 0x%x\n",
-			    iret, size);
-		report_failure(151);
-	}
-}
-
-
-void
-domapwrite(unsigned offset, unsigned size)
-{
-	struct timeval t;
-	unsigned pg_offset;
-	unsigned map_size;
-	off_t    cur_filesize;
-	char    *p;
-	struct test_file *tf = get_tf();
-	int fd = tf->fd;
-
-	offset -= offset % writebdy;
-	gettimeofday(&t, NULL);
-	if (size == 0) {
-		if (!quiet && testcalls > simulatedopcount)
-			prt("skipping zero size write\n");
-		log4(OP_SKIPPED, OP_MAPWRITE, offset, size, &t);
-		return;
-	}
-	cur_filesize = file_size;
-
-	log4(OP_MAPWRITE, offset, size, 0, &t);
-
-	gendata(original_buf, good_buf, offset, size);
-	if (file_size < offset + size) {
-		if (file_size < offset)
-			memset(good_buf + file_size, '\0', offset - file_size);
-		file_size = offset + size;
-		if (lite) {
-			warn("Lite file size bug in fsx!");
-			report_failure(200);
-		}
-	}
-
-	if (testcalls <= simulatedopcount)
-		return;
-
-	output_line(tf, OP_MAPWRITE, offset, size, &t);
-
-	if (file_size > cur_filesize) {
-	        if (ftruncate(fd, file_size) == -1) {
-		        prterr("domapwrite: ftruncate");
-			exit(201);
-		}
-		if (!quiet && (debug > 1 &&
-			       (monitorstart == -1 ||
-				(offset + size > monitorstart &&
-				 (monitorend == -1 || offset <= monitorend))))) {
-			gettimeofday(&t, NULL);
-			prt("       %lu.%06lu truncate done\n", t.tv_sec, t.tv_usec);
-	}
-	}
-	pg_offset = offset & page_mask;
-	map_size  = pg_offset + size;
-
-	if ((p = mmap(0, map_size, PROT_READ | PROT_WRITE, MAP_FILE|MAP_SHARED,
-		      fd, (off_t)(offset - pg_offset))) == MAP_FAILED) {
-	        prterr("domapwrite: mmap");
-		report_failure(202);
-	}
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu mmap done\n", t.tv_sec, t.tv_usec);
-	}
-	memcpy(p + pg_offset, good_buf + offset, size);
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu memcpy done\n", t.tv_sec, t.tv_usec);
-	}
-	if (msync(p, map_size, 0) != 0) {
-		prterr("domapwrite: msync");
-		report_failure(203);
-	}
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu msync done\n", t.tv_sec, t.tv_usec);
-	}
-	if (munmap(p, map_size) != 0) {
-		prterr("domapwrite: munmap");
-		report_failure(204);
-	}
-	if (!quiet && (debug > 1 &&
-		        (monitorstart == -1 ||
-			 (offset + size > monitorstart &&
-			  (monitorend == -1 || offset <= monitorend))))) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu munmap done\n", t.tv_sec, t.tv_usec);
-	}
-}
-
-
-void
-dotruncate(unsigned size)
-{
-	struct timeval t;
-	int oldsize = file_size;
-	struct test_file *tf = get_tf();
-	int fd = tf->fd;
-
-	size -= size % truncbdy;
-	gettimeofday(&t, NULL);
-	if (size > biggest) {
-		biggest = size;
-		if (!quiet && testcalls > simulatedopcount)
-			prt("truncating to largest ever: 0x%x\n", size);
-	}
-
-	log4(OP_TRUNCATE, size, (unsigned)file_size, 0, &t);
-
-	if (size > file_size)
-		memset(good_buf + file_size, '\0', size - file_size);
-	file_size = size;
-
-	if (testcalls <= simulatedopcount)
-		return;
-
-	output_line(tf, OP_TRUNCATE, oldsize, size, &t);
-
-	if (ftruncate(fd, (off_t)size) == -1) {
-	        prt("ftruncate1: %x\n", size);
-		prterr("dotruncate: ftruncate");
-		report_failure(160);
-	}
-	if (!quiet && debug > 1) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu trunc done\n", t.tv_sec, t.tv_usec);
-	}
-}
-
-
-void
-writefileimage()
-{
-	ssize_t iret;
-	int fd = get_fd();
-
-	if (lseek(fd, (off_t)0, SEEK_SET) == (off_t)-1) {
-		prterr("writefileimage: lseek");
-		report_failure(171);
-	}
-	iret = write(fd, good_buf, file_size);
-	if ((off_t)iret != file_size) {
-		if (iret == -1)
-			prterr("writefileimage: write");
-		else
-			prt("short write: 0x%lx bytes instead of 0x%llx\n",
-			    (unsigned long)iret, 
-			    (unsigned long long)file_size);
-		report_failure(172);
-	}
-	if (lite ? 0 : ftruncate(fd, file_size) == -1) {
-	        prt("ftruncate2: %llx\n", (unsigned long long)file_size);
-		prterr("writefileimage: ftruncate");
-		report_failure(173);
-	}
-}
-
-
-void
-docloseopen(void)
-{
-	struct timeval t;
-	struct test_file *tf = get_tf();
-
-	if (testcalls <= simulatedopcount)
-		return;
-
-	gettimeofday(&t, NULL);
-	log4(OP_CLOSEOPEN, file_size, (unsigned)file_size, 0, &t);
-
-	if (debug)
-		prt("%06lu %lu.%06lu close/open\n", testcalls, t.tv_sec,
-		    t.tv_usec);
-	if (close(tf->fd)) {
-		prterr("docloseopen: close");
-		report_failure(180);
-	}
-	if (!quiet && debug > 1) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu close done\n", t.tv_sec, t.tv_usec);
-	}
-	tf->fd = open(tf->path, O_RDWR, 0);
-	if (tf->fd < 0) {
-		prterr("docloseopen: open");
-		report_failure(181);
-	}
-	if (!quiet && debug > 1) {
-		gettimeofday(&t, NULL);
-		prt("       %lu.%06lu open done\n", t.tv_sec, t.tv_usec);
-	}
-}
-
-
-void
-test(void)
-{
-	unsigned long	offset;
-	unsigned long	size = maxoplen;
-	unsigned long	rv = random();
-	unsigned long	op = rv % (3 + !lite + mapped_writes);
-
-        /* turn off the map read if necessary */
-
-        if (op == 2 && !mapped_reads)
-            op = 0;
-
-	if (simulatedopcount > 0 && testcalls == simulatedopcount)
-		writefileimage();
-
-	testcalls++;
-
-	if (debugstart > 0 && testcalls >= debugstart)
-		debug = 1;
-
-	if (!quiet && testcalls < simulatedopcount && testcalls % 100000 == 0)
-		prt("%lu...\n", testcalls);
-
-	/*
-	 * READ:	op = 0
-	 * WRITE:	op = 1
-	 * MAPREAD:     op = 2
-	 * TRUNCATE:	op = 3
-	 * MAPWRITE:    op = 3 or 4
-	 */
-	if (lite ? 0 : op == 3 && (style & 1) == 0) /* vanilla truncate? */
-		dotruncate(random() % maxfilelen);
-	else {
-		if (randomoplen)
-			size = random() % (maxoplen+1);
-		if (lite ? 0 : op == 3)
-			dotruncate(size);
-		else {
-			offset = random();
-			if (op == 1 || op == (lite ? 3 : 4)) {
-				offset %= maxfilelen;
-				if (offset + size > maxfilelen)
-					size = maxfilelen - offset;
-				if (op != 1)
-					domapwrite(offset, size);
-				else
-					dowrite(offset, size);
-			} else {
-				if (file_size)
-					offset %= file_size;
-				else
-					offset = 0;
-				if (offset + size > file_size)
-					size = file_size - offset;
-				if (op != 0)
-					domapread(offset, size);
-				else
-					doread(offset, size);
-			}
-		}
-	}
-	if (sizechecks && testcalls > simulatedopcount)
-		check_size();
-	if (closeprob && (rv >> 3) < (1 << 28) / closeprob)
-		docloseopen();
-}
-
-
-void
-cleanup(sig)
-	int	sig;
-{
-	if (sig)
-		prt("signal %d\n", sig);
-	prt("testcalls = %lu\n", testcalls);
-	exit(sig);
-}
-
-
-void
-usage(void)
-{
-	fprintf(stdout, "usage: %s",
-		"fsx [-dnqLOW] [-b opnum] [-c Prob] [-l flen] [-m "
-"start:end] [-o oplen] [-p progressinterval] [-r readbdy] [-s style] [-t "
-"truncbdy] [-w writebdy] [-D startingop] [-N numops] [-P dirpath] [-S seed] "
-"[ -I random|rotate ] fname [additional paths to fname..]\n"
-"	-b opnum: beginning operation number (default 1)\n"
-"	-c P: 1 in P chance of file close+open at each op (default infinity)\n"
-"	-d: debug output for all operations [-d -d = more debugging]\n"
-"	-l flen: the upper bound on file size (default 262144)\n"
-"	-m startop:endop: monitor (print debug output) specified byte rang"
-"(default 0:infinity)\n"
-"	-n: no verifications of file size\n"
-"	-o oplen: the upper bound on operation size (default 65536)\n"
-"	-p progressinterval: debug output at specified operation interval\n"
-"	-q: quieter operation\n"
-"	-r readbdy: 4096 would make reads page aligned (default 1)\n"
-"	-s style: 1 gives smaller truncates (default 0)\n"
-"	-t truncbdy: 4096 would make truncates page aligned (default 1)\n"
-"	-w writebdy: 4096 would make writes page aligned (default 1)\n"
-"	-D startingop: debug output starting at specified operation\n"
-"	-L: fsxLite - no file creations & no file size changes\n"
-"	-N numops: total # operations to do (default infinity)\n"
-"	-O: use oplen (see -o flag) for every op (default random)\n"
-"	-P: save .fsxlog and .fsxgood files in dirpath (default ./)\n"
-"	-S seed: for random # generator (default 1) 0 gets timestamp\n"
-"	-W: mapped write operations DISabled\n"
-"        -R: read() system calls only (mapped reads disabled)\n"
-"	-I: When multiple paths to the file are given each operation uses"
-"           a different path.  Iterate through them in order with 'rotate'"
-"           or chose then at 'random'.  (defaults to random)\n"
-"	fname: this filename is REQUIRED (no default)\n");
-	exit(90);
-}
-
-
-int
-getnum(char *s, char **e)
-{
-	int ret = -1;
-
-	*e = (char *) 0;
-	ret = strtol(s, e, 0);
-	if (*e)
-		switch (**e) {
-		case 'b':
-		case 'B':
-			ret *= 512;
-			*e = *e + 1;
-			break;
-		case 'k':
-		case 'K':
-			ret *= 1024;
-			*e = *e + 1;
-			break;
-		case 'm':
-		case 'M':
-			ret *= 1024*1024;
-			*e = *e + 1;
-			break;
-		case 'w':
-		case 'W':
-			ret *= 4;
-			*e = *e + 1;
-			break;
-		}
-	return (ret);
-}
-
-int
-main(int argc, char **argv)
-{
-	int	i, style, ch;
-	char	*endp;
-	int  dirpath = 0;
-
-	goodfile[0] = 0;
-	logfile[0] = 0;
-
-	page_size = getpagesize();
-	page_mask = page_size - 1;
-
-	setvbuf(stdout, (char *)0, _IOLBF, 0); /* line buffered stdout */
-
-	while ((ch = getopt(argc, argv, 
-				"b:c:dl:m:no:p:qr:s:t:w:D:I:LN:OP:RS:W"))
-	       != EOF)
-		switch (ch) {
-		case 'b':
-			simulatedopcount = getnum(optarg, &endp);
-			if (!quiet)
-				fprintf(stdout, "Will begin at operation"
-					"%ld\n",
-					simulatedopcount);
-			if (simulatedopcount == 0)
-				usage();
-			simulatedopcount -= 1;
-			break;
-		case 'c':
-			closeprob = getnum(optarg, &endp);
-			if (!quiet)
-				fprintf(stdout,
-					"Chance of close/open is 1 in %d\n",
-					closeprob);
-			if (closeprob <= 0)
-				usage();
-			break;
-		case 'd':
-			debug++;
-			break;
-		case 'l':
-			maxfilelen = getnum(optarg, &endp);
-			if (maxfilelen <= 0)
-				usage();
-			break;
-		case 'm':
-			monitorstart = getnum(optarg, &endp);
-			if (monitorstart < 0)
-				usage();
-			if (!endp || *endp++ != ':')
-				usage();
-			monitorend = getnum(endp, &endp);
-			if (monitorend < 0)
-				usage();
-			if (monitorend == 0)
-				monitorend = -1; /* aka infinity */
-			debug = 1;
-		case 'n':
-			sizechecks = 0;
-			break;
-		case 'o':
-			maxoplen = getnum(optarg, &endp);
-			if (maxoplen <= 0)
-				usage();
-			break;
-		case 'p':
-			progressinterval = getnum(optarg, &endp);
-			if (progressinterval < 0)
-				usage();
-			break;
-		case 'q':
-			quiet = 1;
-			break;
-		case 'r':
-			readbdy = getnum(optarg, &endp);
-			if (readbdy <= 0)
-				usage();
-			break;
-		case 's':
-			style = getnum(optarg, &endp);
-			if (style < 0 || style > 1)
-				usage();
-			break;
-		case 't':
-			truncbdy = getnum(optarg, &endp);
-			if (truncbdy <= 0)
-				usage();
-			break;
-		case 'w':
-			writebdy = getnum(optarg, &endp);
-			if (writebdy <= 0)
-				usage();
-			break;
-		case 'D':
-			debugstart = getnum(optarg, &endp);
-			if (debugstart < 1)
-				usage();
-			break;
-		case 'I':
-			assign_fd_policy(optarg);
-			break;
-		case 'L':
-		        lite = 1;
-			break;
-		case 'N':
-			numops = getnum(optarg, &endp);
-			if (numops < 0)
-				usage();
-			break;
-		case 'O':
-			randomoplen = 0;
-			break;
-		case 'P':
-			strncpy(goodfile, optarg, sizeof(goodfile));
-			strcat(goodfile, "/");
-			strncpy(logfile, optarg, sizeof(logfile));
-			strcat(logfile, "/");
-			dirpath = 1;
-			break;
-                case 'R':
-                        mapped_reads = 0;
-                        break;
-		case 'S':
-                        seed = getnum(optarg, &endp);
-			if (seed == 0)
-				seed = time(0) % 10000;
-			if (!quiet)
-				fprintf(stdout, "Seed set to %d\n", seed);
-			if (seed < 0)
-				usage();
-			break;
-		case 'W':
-		        mapped_writes = 0;
-			if (!quiet)
-				fprintf(stdout, "mapped writes DISABLED\n");
-			break;
-
-		default:
-			usage();
-			/* NOTREACHED */
-		}
-	argc -= optind;
-	argv += optind;
-	if (argc < 1)
-		usage();
-	fname = argv[0];
-
-	signal(SIGHUP,	cleanup);
-	signal(SIGINT,	cleanup);
-	signal(SIGPIPE,	cleanup);
-	signal(SIGALRM,	cleanup);
-	signal(SIGTERM,	cleanup);
-	signal(SIGXCPU,	cleanup);
-	signal(SIGXFSZ,	cleanup);
-	signal(SIGVTALRM,	cleanup);
-	signal(SIGUSR1,	cleanup);
-	signal(SIGUSR2,	cleanup);
-
-	initstate(seed, state, 256);
-	setstate(state);
-
-	open_test_files(argv, argc);
-
-	strncat(goodfile, dirpath ? my_basename(fname) : fname, 256);
-	strcat (goodfile, ".fsxgood");
-	fsxgoodfd = open(goodfile, O_RDWR|O_CREAT|O_TRUNC, 0666);
-	if (fsxgoodfd < 0) {
-		prterr(goodfile);
-		exit(92);
-	}
-	strncat(logfile, dirpath ? my_basename(fname) : fname, 256);
-	strcat (logfile, ".fsxlog");
-	fsxlogf = fopen(logfile, "w");
-	if (fsxlogf == NULL) {
-		prterr(logfile);
-		exit(93);
-	}
-	if (lite) {
-		off_t ret;
-		int fd = get_fd();
-		file_size = maxfilelen = lseek(fd, (off_t)0, SEEK_END);
-		if (file_size == (off_t)-1) {
-			prterr(fname);
-			warn("main: lseek eof");
-			exit(94);
-		}
-		ret = lseek(fd, (off_t)0, SEEK_SET);
-		if (ret == (off_t)-1) {
-			prterr(fname);
-			warn("main: lseek 0");
-			exit(95);
-		}
-	}
-	original_buf = (char *) malloc(maxfilelen);
-	for (i = 0; i < maxfilelen; i++)
-		original_buf[i] = random() % 256;
-	good_buf = (char *) malloc(maxfilelen);
-	memset(good_buf, '\0', maxfilelen);
-	temp_buf = (char *) malloc(maxoplen);
-	memset(temp_buf, '\0', maxoplen);
-	if (lite) {	/* zero entire existing file */
-		ssize_t written;
-		int fd = get_fd();
-
-		written = write(fd, good_buf, (size_t)maxfilelen);
-		if (written != maxfilelen) {
-			if (written == -1) {
-				prterr(fname);
-				warn("main: error on write");
-			} else
-				warn("main: short write, 0x%x bytes instead"
-					"of 0x%x\n",
-				     (unsigned)written, maxfilelen);
-			exit(98);
-		}
-	} else
-		check_trunc_hack();
-
-	while (numops == -1 || numops--)
-		test();
-
-	close_test_files();
-	prt("All operations completed A-OK!\n");
-
-	exit(0);
-	return 0;
-}
diff --git a/lustre/tests/getdents.c b/lustre/tests/getdents.c
deleted file mode 100644
index b4155a9c616eaf6bdb0f3d6d642f11a647a801e6..0000000000000000000000000000000000000000
--- a/lustre/tests/getdents.c
+++ /dev/null
@@ -1,31 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-
-int main(int argc, char **argv)
-{
-        DIR *dir;
-        struct dirent64 *entry;
-
-        if (argc < 2) {
-                fprintf(stderr, "Usage: %s dirname\n", argv[0]);
-                return 1;
-        }
-
-        dir = opendir(argv[1]);
-        if (!dir) {
-                int rc = errno;
-                perror("opendir");
-                return rc;
-        }
-
-        while ((entry = readdir64(dir))) {
-                puts(entry->d_name);
-        }
-        
-        closedir(dir);
-
-        return 0;
-}
-                
diff --git a/lustre/tests/insanity.sh b/lustre/tests/insanity.sh
deleted file mode 100755
index 011e66c4921a8b546356c0b6e4f8017f37fb7732..0000000000000000000000000000000000000000
--- a/lustre/tests/insanity.sh
+++ /dev/null
@@ -1,572 +0,0 @@
-#!/bin/sh
-# Test multiple failures, AKA Test 17
-
-set -e
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-
-init_test_env $@
-
-. ${CONFIG:=$LUSTRE/tests/cfg/insanity-local.sh}
-
-ALWAYS_EXCEPT="10 $INSANITY_EXCEPT"
-
-#
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
-
-SETUP=${SETUP:-""}
-CLEANUP=${CLEANUP:-""}
-
-build_test_filter
-
-assert_env mds_HOST MDS_MKFS_OPTS MDSDEV
-assert_env ost_HOST OST_MKFS_OPTS OSTCOUNT
-assert_env LIVE_CLIENT FSNAME
-
-
-# This can be a regexp, to allow more clients
-CLIENTS=${CLIENTS:-"`comma_list $LIVE_CLIENT $FAIL_CLIENTS $EXTRA_CLIENTS`"}
-
-DIR=${DIR:-$MOUNT}
-
-#####
-# fail clients round robin
-
-# list of failable clients
-FAIL_LIST=($FAIL_CLIENTS)
-FAIL_NUM=${#FAIL_LIST[*]}
-FAIL_NEXT=0
-typeset -i  FAIL_NEXT
-DOWN_NUM=0   # number of nodes currently down
-
-# set next client to fail
-set_fail_client() {
-    FAIL_CLIENT=${FAIL_LIST[$FAIL_NEXT]}
-    FAIL_NEXT=$(( (FAIL_NEXT+1) % FAIL_NUM ))
-    echo "fail $FAIL_CLIENT, next is $FAIL_NEXT"
-}
-
-shutdown_client() {
-    client=$1
-    if [ "$FAILURE_MODE" = HARD ]; then
-       $POWER_DOWN $client
-       while ping -w 3 -c 1 $client > /dev/null 2>&1; do 
-	   echo "waiting for node $client to fail"
-	   sleep 1
-       done  
-    elif [ "$FAILURE_MODE" = SOFT ]; then
-       zconf_umount $client $MOUNT -f
-    fi
-}
-
-reboot_node() {
-    NODE=$1
-    if [ "$FAILURE_MODE" = HARD ]; then
-       $POWER_UP $NODE
-    fi
-}
-
-fail_clients() {
-    num=$1
-    if [ -z "$num"  ] || [ "$num" -gt $((FAIL_NUM - DOWN_NUM)) ]; then
-	num=$((FAIL_NUM - DOWN_NUM)) 
-    fi
-    
-    if [ -z "$num" ] || [ "$num" -le 0 ]; then
-        return
-    fi
-
-    client_mkdirs
-
-    for i in `seq $num`; do
-       set_fail_client
-       client=$FAIL_CLIENT
-       DOWN_CLIENTS="$DOWN_CLIENTS $client"
-       shutdown_client $client
-    done
-
-    echo "down clients: $DOWN_CLIENTS"
-
-    for client in $DOWN_CLIENTS; do
-	reboot_node $client
-    done
-    DOWN_NUM=`echo $DOWN_CLIENTS | wc -w`
-    client_rmdirs
-}
-
-reintegrate_clients() {
-    for client in $DOWN_CLIENTS; do
-	wait_for_host $client
-	echo "Restarting $client"
-	zconf_mount $client $MOUNT || return 1
-    done
-    DOWN_CLIENTS=""
-    DOWN_NUM=0
-}
-
-start_ost() {
-    start ost$1 `ostdevname $1` $OST_MOUNT_OPTS
-}
-
-trap exit INT
-
-client_touch() {
-    file=$1
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-	if echo $DOWN_CLIENTS | grep -q $c; then continue; fi
-	$PDSH $c touch $MOUNT/${c}_$file || return 1
-    done
-}
-
-client_rm() {
-    file=$1
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-	$PDSH $c rm $MOUNT/${c}_$file
-    done
-}
-
-client_mkdirs() {
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-	echo "$c mkdir $MOUNT/$c"
-	$PDSH $c "mkdir $MOUNT/$c"
-	$PDSH $c "ls -l $MOUNT/$c" 
-    done
-}
-
-client_rmdirs() {
-    for c in $LIVE_CLIENT $FAIL_CLIENTS;  do
-	echo "rmdir $MOUNT/$c"
-	$PDSH $LIVE_CLIENT "rmdir $MOUNT/$c"
-    done
-}
-
-clients_recover_osts() {
-    facet=$1
-#    do_node $CLIENTS "$LCTL "'--device %OSC_`hostname`_'"${facet}_svc_MNT_client_facet recover"
-}
-
-cleanup_and_setup_lustre
-
-# 9 Different Failure Modes Combinations
-echo "Starting Test 17 at `date`"
-
-test_0() {
-    facet_failover mds
-    echo "Waiting for df pid: $DFPID"
-    wait $DFPID || { echo "df returned $?" && return 1; }
-
-    facet_failover ost1 || return 4
-    echo "Waiting for df pid: $DFPID"
-    wait $DFPID || { echo "df returned $?" && return 2; }
-
-    if [ $OSTCOUNT -gt 1 ]; then
-	facet_failover ost2 || return 5
-	echo "Waiting for df pid: $DFPID"
-	wait $DFPID || { echo "df returned $?" && return 3; }
-    fi
-    return 0
-}
-run_test 0 "Fail all nodes, independently"
-
-############### First Failure Mode ###############
-test_1() {
-echo "Don't do a MDS - MDS Failure Case"
-echo "This makes no sense"
-}
-run_test 1 "MDS/MDS failure"
-###################################################
-
-############### Second Failure Mode ###############
-test_2() {
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-
-    shutdown_facet mds
-    reboot_facet mds
-
-    # prepare for MDS failover
-    change_active mds
-    reboot_facet mds
-
-    client_df &
-    DFPID=$!
-    sleep 5
-
-    shutdown_facet ost1
-
-    echo "Reintegrating OST"
-    reboot_facet ost1
-    wait_for ost1
-    start_ost 1 || return 2
-
-    wait_for mds
-    start mds $MDSDEV $MDS_MOUNT_OPTS || return $?
-
-    #Check FS
-    wait $DFPID
-    clients_recover_osts ost1
-    echo "Verify reintegration"
-    client_df || return 1
-
-}
-run_test 2 "Second Failure Mode: MDS/OST `date`"
-###################################################
-
-
-############### Third Failure Mode ###############
-test_3() {
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-    
-    #MDS Portion
-    facet_failover mds
-    wait $DFPID || echo df failed: $?
-    #Check FS
-
-    echo "Test Lustre stability after MDS failover"
-    client_df
-
-    #CLIENT Portion
-    echo "Failing 2 CLIENTS"
-    fail_clients 2
-    
-    #Check FS
-    echo "Test Lustre stability after CLIENT failure"
-    client_df
-    
-    #Reintegration
-    echo "Reintegrating CLIENTS"
-    reintegrate_clients || return 1
-
-    client_df || return 3
-}
-run_test 3  "Thirdb Failure Mode: MDS/CLIENT `date`"
-###################################################
-
-############### Fourth Failure Mode ###############
-test_4() {
-    echo "Fourth Failure Mode: OST/MDS `date`"
-
-    #OST Portion
-    shutdown_facet ost1
- 
-    #Check FS
-    echo "Test Lustre stability after OST failure"
-    client_df &
-    DFPIDA=$!
-    sleep 5
-
-    #MDS Portion
-    shutdown_facet mds
-    reboot_facet mds
-
-    # prepare for MDS failover
-    change_active mds
-    reboot_facet mds
-
-    client_df &
-    DFPIDB=$!
-    sleep 5
-
-    #Reintegration
-    echo "Reintegrating OST"
-    reboot_facet ost1
-    wait_for ost1
-    start_ost 1
-    
-    wait_for mds
-    start mds $MDSDEV $MDS_MOUNT_OPTS
-    #Check FS
-    
-    wait $DFPIDA
-    wait $DFPIDB
-    clients_recover_osts ost1
-    echo "Test Lustre stability after MDS failover"
-    client_df || return 1
-}
-run_test 4 "Fourth Failure Mode: OST/MDS `date`"
-###################################################
-
-############### Fifth Failure Mode ###############
-test_5() {
-    [ $OSTCOUNT -lt 1 ] && skip "$OSTCOUNT < 1, not enough OSTs" && return 0
-
-    echo "Fifth Failure Mode: OST/OST `date`"
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-    
-    #OST Portion
-    shutdown_facet ost1
-    reboot_facet ost1
-    
-    #Check FS
-    echo "Test Lustre stability after OST failure"
-    client_df &
-    DFPIDA=$!
-    sleep 5
-    
-    #OST Portion
-    shutdown_facet ost2
-    reboot_facet ost2
-
-    #Check FS
-    echo "Test Lustre stability after OST failure"
-    client_df &
-    DFPIDB=$!
-    sleep 5
-
-    #Reintegration
-    echo "Reintegrating OSTs"
-    wait_for ost1
-    start_ost 1
-    wait_for ost2
-    start_ost 2
-    
-    clients_recover_osts ost1
-    clients_recover_osts ost2
-    sleep $TIMEOUT
-
-    wait $DFPIDA
-    wait $DFPIDB
-    client_df || return 2
-}
-run_test 5 "Fifth Failure Mode: OST/OST `date`"
-###################################################
-
-############### Sixth Failure Mode ###############
-test_6() {
-    echo "Sixth Failure Mode: OST/CLIENT `date`"
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-    client_touch testfile || return 2
-	
-    #OST Portion
-    shutdown_facet ost1
-    reboot_facet ost1
-
-    #Check FS
-    echo "Test Lustre stability after OST failure"
-    client_df &
-    DFPIDA=$!
-    sleep 5
-
-    #CLIENT Portion
-    echo "Failing CLIENTs"
-    fail_clients
-    
-    #Check FS
-    echo "Test Lustre stability after CLIENTs failure"
-    client_df &
-    DFPIDB=$!
-    sleep 5
-    
-    #Reintegration
-    echo "Reintegrating OST/CLIENTs"
-    wait_for ost1
-    start_ost 1
-    reintegrate_clients
-    sleep 5 
-
-    wait $DFPIDA
-    wait $DFPIDB
-    echo "Verifying mount"
-    [ -z "$(mounted_lustre_filesystems)" ] && return 3
-    client_df
-}
-run_test 6 "Sixth Failure Mode: OST/CLIENT `date`"
-###################################################
-
-
-############### Seventh Failure Mode ###############
-test_7() {
-    echo "Seventh Failure Mode: CLIENT/MDS `date`"
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-    client_touch testfile  || return 1
-
-    #CLIENT Portion
-    echo "Part 1: Failing CLIENT"
-    fail_clients 2
-    
-    #Check FS
-    echo "Test Lustre stability after CLIENTs failure"
-    client_df
-    $PDSH $LIVE_CLIENT "ls -l $MOUNT"
-    $PDSH $LIVE_CLIENT "rm -f $MOUNT/*_testfile"
-    
-    #Sleep
-    echo "Wait 1 minutes"
-    sleep 60
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && return 2
-
-    client_df
-    client_rm testfile
-
-    #MDS Portion
-    facet_failover mds
-
-    #Check FS
-    echo "Test Lustre stability after MDS failover"
-    wait $DFPID || echo "df on down clients fails " || return 1
-    $PDSH $LIVE_CLIENT "ls -l $MOUNT"
-    $PDSH $LIVE_CLIENT "rm -f $MOUNT/*_testfile"
-
-    #Reintegration
-    echo "Reintegrating CLIENTs"
-    reintegrate_clients || return 2
-    client_df
-    
-    #Sleep
-    echo "wait 1 minutes"
-    sleep 60
-}
-run_test 7 "Seventh Failure Mode: CLIENT/MDS `date`"
-###################################################
-
-
-############### Eighth Failure Mode ###############
-test_8() {
-    echo "Eighth Failure Mode: CLIENT/OST `date`"
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-    client_touch testfile
-	
-    #CLIENT Portion
-    echo "Failing CLIENTs"
-    fail_clients 2
-
-    #Check FS
-    echo "Test Lustre stability after CLIENTs failure"
-    client_df
-    $PDSH $LIVE_CLIENT "ls -l $MOUNT"
-    $PDSH $LIVE_CLIENT "rm -f $MOUNT/*_testfile"
-
-    #Sleep
-    echo "Wait 1 minutes"
-    sleep 60
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-    client_touch testfile
-
-
-    #OST Portion
-    shutdown_facet ost1
-    reboot_facet ost1
-
-    #Check FS
-    echo "Test Lustre stability after OST failure"
-    client_df &
-    DFPID=$!
-    sleep 5
-    #non-failout hangs forever here
-    #$PDSH $LIVE_CLIENT "ls -l $MOUNT"
-    #$PDSH $LIVE_CLIENT "rm -f $MOUNT/*_testfile"
-    
-    #Reintegration
-    echo "Reintegrating CLIENTs/OST"
-    reintegrate_clients || return 3
-    wait_for ost1
-    start_ost 1
-    wait $DFPID
-    client_df || return 1
-    client_touch testfile2 || return 2
-
-    #Sleep
-    echo "Wait 1 minutes"
-    sleep 60
-}
-run_test 8 "Eighth Failure Mode: CLIENT/OST `date`"
-###################################################
-
-
-############### Ninth Failure Mode ###############
-test_9() {
-    echo 
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    [ -z "$(mounted_lustre_filesystems)" ] && error "Lustre is not running"
-
-    client_df
-    client_touch testfile || return 1
-	
-    #CLIENT Portion
-    echo "Failing CLIENTs"
-    fail_clients 2
-
-    #Check FS
-    echo "Test Lustre stability after CLIENTs failure"
-    client_df
-    $PDSH $LIVE_CLIENT "ls -l $MOUNT" || return 1
-    $PDSH $LIVE_CLIENT "rm -f $MOUNT/*_testfile" || return 2
-
-    #Sleep
-    echo "Wait 1 minutes"
-    sleep 60
-
-    #Create files
-    echo "Verify Lustre filesystem is up and running"
-    $PDSH $LIVE_CLIENT "grep -e $DIR /proc/mounts" || return 3
-    $PDSH $LIVE_CLIENT df $MOUNT
-    client_touch testfile || return 4
-
-    #CLIENT Portion
-    echo "Failing CLIENTs"
-    fail_clients 2
-    
-    #Check FS
-    echo "Test Lustre stability after CLIENTs failure"
-    client_df
-    $PDSH $LIVE_CLIENT "ls -l $MOUNT" || return 5
-    $PDSH $LIVE_CLIENT "rm -f $MOUNT/*_testfile" || return 6
-
-    #Reintegration
-    echo "Reintegrating  CLIENTs/CLIENTs"
-    reintegrate_clients || return 7
-    client_df
-    
-    #Sleep
-    echo "Wait 1 minutes"
-    sleep 60
-}
-run_test 9 "Ninth Failure Mode: CLIENT/CLIENT `date`"
-###################################################
-
-test_10() {
-    #Run availability after all failures
-    DURATION=${DURATION:-$((2 * 60 * 60))} # 6 hours default
-    LOADTEST=${LOADTEST:-metadata-load.py}
-    $PWD/availability.sh $CONFIG $DURATION $CLIENTS || return 1
-}
-run_test 10 "Running Availability for 6 hours..."
-
-equals_msg `basename $0`: test complete, cleaning up
-check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
diff --git a/lustre/tests/iopentest1.c b/lustre/tests/iopentest1.c
deleted file mode 100644
index acc1112fa9c4897e39198571ab71897dd5a23369..0000000000000000000000000000000000000000
--- a/lustre/tests/iopentest1.c
+++ /dev/null
@@ -1,101 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libgen.h>
-#include <errno.h>
-
-const char *progname;
-const char usage_fmt[] = "Usage: %s <file> <mountpoint>\n";
-#define INAME_LEN (PATH_MAX + 1)
-
-#define CHECK_IT(exp, pstr) \
-if (!(exp)) { \
-    fprintf(stderr, "%s: at %s:%d: ", progname, __FILE__, __LINE__); \
-    perror((pstr)); \
-    exit(1); \
-}
-
-#define CHECK_SNPRINTF(rc, len) \
-    CHECK_IT((rc) > 0 && (rc) <= (len), "snprintf() failed")
-
-static char *get_iname(char *fname, const char *mtpt)
-{
-        char *iname;
-        int fd, rc;
-        struct stat buf;
-
-        iname = malloc(INAME_LEN);
-        CHECK_IT(iname, "malloc() failed");
-
-        fd = open(fname, O_CREAT, 0644);
-        if (fd < 0 && errno != EISDIR) {
-                fprintf(stderr, "%s:%d: open(%s) failed: %s\n", __FILE__,
-                        __LINE__, fname, strerror(errno));
-                exit(1);
-        }
-
-        if (fd >= 0)
-                close(fd);
-
-        rc = stat(fname, &buf);
-        if (rc != 0) {
-                fprintf(stderr, "%s:%d: stat(%s) failed: %s\n", __FILE__,
-                        __LINE__, fname, strerror(errno));
-                exit(1);
-        }
-
-        rc = snprintf(iname, INAME_LEN,
-                      "%s/__iopen__/%lu", mtpt, (unsigned long)buf.st_ino);
-        CHECK_SNPRINTF(rc, INAME_LEN);
-
-        return iname;
-}
-
-int main(int argc, char *argv[])
-{
-        char *fname, *mtpt, *iname, *pname;
-        struct stat buf;
-        int rc;
-        int i;
-
-        pname = strdup(argv[0]);
-        progname = basename(pname);
-	
-        if (argc != 3) {
-                fprintf(stderr, usage_fmt, progname);
-                return 1;
-        }
-
-        fname = argv[1];
-        mtpt  = argv[2];
-
-        iname = get_iname(fname, mtpt);
-        printf("%s:started...\n", argv[0]);
-        for (i = 0; i < 10000; i++) {
-                rc = stat(fname, &buf);
-                if (rc != 0) {
-                        fprintf(stderr, "%s:%d: stat(%s) failed: %s\n",
-                                __FILE__, __LINE__, fname, strerror(errno));
-                        exit(1);
-                }
-
-                rc = stat(iname, &buf);
-                if (rc != 0) {
-                        fprintf(stderr, "%s:%d: stat(%s) failed: %s\n",
-                                __FILE__, __LINE__, iname, strerror(errno));
-                        exit(1);
-                }
-        }
-        printf("%s:finished...\n", argv[0]);
-
-        return 0;
-}
diff --git a/lustre/tests/iopentest2.c b/lustre/tests/iopentest2.c
deleted file mode 100644
index 046de92b963de676890673be607294439fb96198..0000000000000000000000000000000000000000
--- a/lustre/tests/iopentest2.c
+++ /dev/null
@@ -1,186 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <limits.h>
-#include <stdlib.h>
-#include <string.h>
-#include <libgen.h>
-#include <errno.h>
-#include <sys/wait.h>
-
-const char *progname;
-const char usage_fmt[] = "Usage: %s <mountpoint>\n";
-#define INAME_LEN (PATH_MAX + 1)
-
-#define CHECK_IT(exp, pstr) \
-if (!(exp)) { \
-    fprintf(stderr, "%s: at %s:%d: ", progname, __FILE__, __LINE__); \
-    perror((pstr)); \
-    exit(1); \
-}
-
-#define CHECK_SNPRINTF(rc, len) \
-    CHECK_IT((rc) > 0 && (rc) <= (len), "snprintf() failed")
-
-static char *get_iname(char *fname, const char *mtpt)
-{
-        char *iname;
-        int fd, rc;
-        struct stat buf;
-
-        iname = malloc(INAME_LEN);
-        CHECK_IT(iname, "malloc() failed");
-
-        fd = open(fname, O_CREAT, 0644);
-        if (fd < 0 && errno != EISDIR) {
-                fprintf(stderr, "%s:%d: open(%s) failed: %s\n", __FILE__,
-                        __LINE__, fname, strerror(errno));
-                exit(1);
-        }
-
-        if (fd >= 0)
-                close(fd);
-
-        rc = stat(fname, &buf);
-        if (rc != 0) {
-                fprintf(stderr, "%s:%d: stat(%s) failed: %s\n", __FILE__,
-                        __LINE__, fname, strerror(errno));
-                exit(1);
-        }
-
-        rc = snprintf(iname, INAME_LEN,
-                      "%s/__iopen__/%lu", mtpt, (unsigned long)buf.st_ino);
-        CHECK_SNPRINTF(rc, INAME_LEN);
-
-        return iname;
-}
-
-int main(int argc, char *argv[])
-{
-        char *fname, *mtpt, *pname;
-        char *fname_iname, *dir;
-        char *dir_iname = NULL, *foo = NULL, *bar = NULL;
-        int rc, fd, i, thread = 0;
-        int pidlist[10];
-
-        pname = strdup(argv[0]);
-        progname = basename(argv[0]);
-
-        if (argc != 2) {
-                fprintf(stderr, usage_fmt, progname);
-                return 1;
-        }
- 
-        for (i = 1; i <= 10; i++) {
-                rc = fork();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: #%d - %s\n", argv[0], i,
-                                strerror(rc = errno));
-                        break;
-                } else if (rc == 0) {
-                        thread = i;
-                        break;
-                }
-                printf("%s: thread #%d (PID %d) started\n", argv[0], i, rc);
-                pidlist[i-1] = rc;
-                rc = 0;
-        }
-
-        if (thread != 0) {
-                mtpt  = argv[1];
-                fname = malloc(INAME_LEN);
-                CHECK_IT(fname, "malloc() failed");
-
-                rc = snprintf(fname, INAME_LEN,
-                              "%s/%d", mtpt, getpid());
-                CHECK_SNPRINTF(rc, INAME_LEN);
-
-                rc = mkdir(fname, 0644);
-                if (rc != 0) {
-                        fprintf(stderr, "%s:%d: mkdir(%s) failed: %s\n",
-                                __FILE__, __LINE__, fname, strerror(errno));
-                        exit(1);
-                }
-
-                fname_iname = get_iname(fname, mtpt);
-
-                dir = malloc(INAME_LEN);
-                CHECK_IT(dir, "malloc() failed");
-
-                rc = snprintf(dir, INAME_LEN, "%s/dir", fname_iname);
-                CHECK_SNPRINTF(rc, INAME_LEN);
-
-                foo = malloc(INAME_LEN);
-                CHECK_IT(foo, "malloc() failed");
-
-                bar = malloc(INAME_LEN);
-                CHECK_IT(bar, "malloc() failed");
-
-                for (i = 0; i < 1000; i++) {
-                        rc = mkdir(dir, 0644);
-                        if (rc != 0) {
-                                fprintf(stderr, "%s:%d: mkdir(%s) failed: %s\n",
-                                        __FILE__, __LINE__, dir,
-                                        strerror(errno));
-                                exit(1);
-                        }
-
-                        dir_iname = get_iname(dir, mtpt);
-
-                        rc = snprintf(foo, INAME_LEN, "%s/bar", dir_iname);
-                        CHECK_SNPRINTF(rc, INAME_LEN);
-
-                        rc = snprintf(bar, INAME_LEN, "%s/bar", dir_iname);
-                        CHECK_SNPRINTF(rc, INAME_LEN);
-
-                        fd = open(foo, O_CREAT, 0644);
-                        if (fd < 0) {
-                                fprintf(stderr, "%s:%d: open(%s) failed: %s\n",
-                                        __FILE__, __LINE__, foo,
-                                        strerror(errno));
-                                exit(1);
-                        }
-                        rc = close(fd);
-                        if (rc != 0) {
-                                fprintf(stderr, "%s:%d: close() failed: %s\n",
-                                        __FILE__, __LINE__, strerror(errno));
-                                exit(1);
-                        }
-
-                        rc = rename(foo, bar);
-                        if (rc != 0) {
-                                fprintf(stderr, "%s:%d: rename(%s, %s) failed: "
-                                        "%s\n", __FILE__, __LINE__, foo, bar,
-                                        strerror(errno));
-                                exit(1);
-                        }
-
-                        rc = unlink(bar);
-                        if (rc != 0) {
-                                fprintf(stderr, "%s:%d: unlink(%s) failed: "
-                                        "%s\n", __FILE__, __LINE__, bar,
-                                        strerror(errno));
-                                exit(1);
-                        }
-                        rc = rmdir(dir);
-                        if (rc != 0) {
-                                fprintf(stderr, "%s:%d: rmdir(%s) failed: %s\n",
-                                        __FILE__, __LINE__, dir,
-                                        strerror(errno));
-                                exit(1);
-                        }
-
-                        free(dir_iname);
-                }
-        } else {
-                        for ( i=0; i<10; i++)
-                                waitpid(pidlist[i], NULL, 0);
-        }
-        return 0;
-}
diff --git a/lustre/tests/it_test.c b/lustre/tests/it_test.c
deleted file mode 100644
index da9256da3c96d603509e8af43909f21ed2dbd901..0000000000000000000000000000000000000000
--- a/lustre/tests/it_test.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/* vi:set ts=8 sw=8 expandtab: */
-/* Unit test tool for interval tree.
- * Written by jay <jxiong@clusterfs.com> 
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <time.h>
-#include <sys/time.h>
-
-#include <../ldlm/interval_tree.c>
-
-#define dprintf(fmt, args...) //printf(fmt, ##args)
-#define error(fmt, args...) do {                        \
-        fflush(stdout), fflush(stderr);                 \
-        fprintf(stderr, "\nError:" fmt, ##args);        \
-        abort();                                        \
-} while(0)
-
-#define __F(ext)         (ext)->start, (ext)->end
-#define __S              "[%llx:%llx]"
-
-#define ALIGN_SIZE       4096
-#define ALIGN_MASK       (~(ALIGN_SIZE - 1))
-
-static struct it_node {
-        struct interval_node node;
-        struct list_head list;
-        int hit, valid;
-} *it_array;
-static int it_count;
-CFS_LIST_HEAD(header);
-static unsigned long max_count = ULONG_MAX & ALIGN_MASK;
-static int have_wide_lock = 0;
-
-static void it_test_clear(void)
-{
-        int i = 0;
-        for (i = 0; i < it_count; i++)
-                it_array[i].hit = 0;
-}
-
-static enum interval_iter cb(struct interval_node *n, void *args)
-{
-        struct it_node *node = (struct it_node *)n;
-        static int count = 1;
-
-        if (node->hit == 1) {
-                dprintf("NODE "__S" has ever been accessed\n",
-                        __F(&n->in_extent));
-                return INTERVAL_ITER_CONT;
-                error("duplicate node accessing found\n");
-                return INTERVAL_ITER_STOP;
-        }
-        
-        if (node->valid == 0) {
-                error("A deleted node "__S" being accessed\n",
-                       __F(&n->in_extent));
-                return INTERVAL_ITER_STOP;
-        }
-
-        if (count++ == 8) {
-                dprintf("\n");
-                count = 1;
-        }
-        dprintf(""__S" ", __F(&n->in_extent));
-        fflush(stdout);
-
-        node->hit = 1;
-        return INTERVAL_ITER_CONT;
-}
-
-static int it_test_search(struct interval_node *root)
-{
-        struct it_node *n;
-        struct interval_node_extent ext;
-        int times = 10, i, err = 0;
-
-        while (times--) {
-                it_test_clear();
-                ext.start = (random() % max_count) & ALIGN_MASK;
-                ext.end = random() % (max_count - ext.start + 2) + ext.start;
-                ext.end &= ALIGN_MASK;
-                if (ext.end > max_count)
-                        ext.end = max_count;
-
-                dprintf("\n\nSearching the node overlapped "__S" ..\n",
-                        __F(&ext));
-
-                interval_search(root, &ext, cb, NULL);
-
-                dprintf("\nverifing ...");
-        
-                /* verify */
-                for (i = 0; i < it_count; i++) {
-                        n = &it_array[i];
-                        if (n->valid == 0)
-                                continue;
-
-                        if (extent_overlapped(&ext, &n->node.in_extent) && 
-                            n->hit == 0)
-                                error("node "__S" overlaps" __S","
-                                      "but never to be hit.\n", 
-                                      __F(&n->node.in_extent),
-                                      __F(&ext));
-
-                        if (!extent_overlapped(&ext, &n->node.in_extent) && 
-                            n->hit)
-                                error("node "__S" overlaps" __S", but hit.\n", 
-                                      __F(&n->node.in_extent),
-                                      __F(&ext));
-                }
-                if (err) error("search error\n");
-                dprintf("ok.\n");
-        }
-
-        return 0;
-}
-
-static int it_test_iterate(struct interval_node *root)
-{
-        int i;
-
-        dprintf("\n\nIterate testing start..\n");
-
-        it_test_clear();
-        interval_iterate(root, cb, NULL);
-
-        /* verify */
-        for (i = 0; i < it_count; i++) {
-                if (it_array[i].valid == 0)
-                        continue;
-                if (it_array[i].hit == 0)
-                        error("Node "__S" is not accessed\n",
-                              __F(&it_array[i].node.in_extent));
-        }
-
-        return 0;
-}
-
-static int it_test_iterate_reverse(struct interval_node *root)
-{
-        int i;
-
-        dprintf("\n\niterate reverse testing start..\n");
-        it_test_clear();
-        interval_iterate_reverse(root, cb, NULL);
-
-        /* verify */
-        for (i = 0; i < it_count; i++) {
-                if (it_array[i].valid == 0)
-                        continue;
-                if (it_array[i].hit == 0)
-                        error("Not every extent is accessed\n");
-        }
-
-        return 0;
-}
-
-static int it_test_find(struct interval_node *root)
-{
-        int idx;
-        struct interval_node_extent *ext;
-
-        dprintf("\ninterval_find testing start ..\n");
-        for (idx = 0; idx < it_count; idx++) {
-                if (it_array[idx].valid == 0)
-                        continue;
-
-                ext = &it_array[idx].node.in_extent;
-                dprintf("Try to find "__S"\n", __F(ext));
-                if (!interval_find(root, ext))
-                        error("interval_find, try to find "__S"\n", __F(ext));
-        }
-        return 0;
-}
-
-/* sanity test is tightly coupled with implementation, so when you changed
- * the interval tree implementation, change this code also. */
-static enum interval_iter sanity_cb(struct interval_node *node, void *args)
-{
-        __u64 max_high = node->in_max_high;
-        struct interval_node *tmp, *parent;
-        int left = 1, has = 0, nr = 0;
-
-        parent = node->in_parent;
-        node->in_parent = NULL;
-        interval_for_each(tmp, node) {
-                if ((left && node_compare(tmp, node) > 0) ||
-                    (!left && node_compare(tmp, node) < 0))
-                        error("interval tree sanity test\n");
-
-                if (tmp->in_max_high > max_high) {
-                        dprintf("max high sanity check, max_high is %llu,"
-                                "child max_high: %llu"__S"\n",
-                                max_high, tmp->in_max_high,
-                                __F(&tmp->in_extent));
-                        goto err;
-                } else if (tmp->in_max_high == max_high) {
-                        has = 1;
-                }
-
-                if (tmp == node) {
-                        left = 0;
-                        continue;
-                }
-        }
-
-        if (!has) {
-                int count = 1;
-err:
-                dprintf("node"__S":%llu Child list:\n",
-                        node->in_extent.start,
-                        node->in_extent.end,
-                        node->in_max_high);
-
-                interval_for_each(tmp, node) {
-                        dprintf(""__S":%llu ",
-                                __F(&tmp->in_extent),
-                                tmp->in_max_high);
-                        if (count++ == 8) {
-                                dprintf("\n");
-                                count = 1;
-                        }
-                }
-
-                error("max high sanity check, has == %d\n", has);
-        }
-        node->in_parent = parent;
-
-        tmp = node;
-        while (tmp) {
-                if (node_is_black(tmp))
-                        nr++;
-                else if ((tmp->in_left && node_is_red(tmp->in_left)) ||
-                         (tmp->in_right && node_is_red(tmp->in_right)))
-                        error("wrong tree, a red node has red child\n");
-                tmp = tmp->in_left;
-        }
-
-        tmp = node;
-        while (tmp) {
-                if (node_is_black(tmp))
-                        nr--;
-                tmp = tmp->in_right;
-        }
-        if (nr)
-                error("wrong tree, unbalanced!\n");
-        
-        return 0;
-}
-
-static int it_test_sanity(struct interval_node *root)
-{
-        it_test_clear();
-        interval_iterate(root, sanity_cb, NULL);
-        return 0;
-}
-
-static int it_test_search_hole(struct interval_node *root)
-{
-        int i, count = 10;
-        struct interval_node_extent ext, ext2;
-        struct it_node *n;
-        __u64 low = 0, high = ~0;
-
-        do {
-                if (--count == 0)
-                        return 0;
-
-                ext.start = random() % max_count;
-                ext.end = ext.start;
-        } while (interval_is_overlapped(root, &ext));
-        ext2 = ext;
-
-        interval_expand(root, &ext, NULL);
-        dprintf("Extending "__S" to .."__S"\n", __F(&ext2), __F(&ext));
-        for (i = 0; i < it_count; i++) {
-                n = &it_array[i];
-                if (n->valid == 0)
-                        continue;
-
-                if (extent_overlapped(&ext, &n->node.in_extent)) {
-                        error("Extending "__S" to .."__S" overlaps node"__S"\n",
-                                __F(&ext2), __F(&ext), __F(&n->node.in_extent));
-                }
-
-                if (n->node.in_extent.end < ext2.start)
-                        low = max_u64(n->node.in_extent.end + 1, low);
-
-                if (n->node.in_extent.start > ext2.end)
-                        high = min_u64(n->node.in_extent.start - 1, high);
-        }
-
-        /* only expanding high right now */
-        if (ext2.start != ext.start || high != ext.end) {
-                ext2.start = low, ext2.end = high;
-                error("Real extending result:"__S", expected:"__S"\n",
-                       __F(&ext), __F(&ext2));
-        }
-
-        return 0;
-}
-
-static int contended_count = 0; 
-#define LOOP_COUNT 1000
-static enum interval_iter perf_cb(struct interval_node *n, void *args)
-{
-        unsigned long count = LOOP_COUNT;
-        while (count--);
-        contended_count++;
-        return INTERVAL_ITER_CONT;
-}
-
-static inline long tv_delta(struct timeval *s, struct timeval *e)
-{
-        long c = e->tv_sec - s->tv_sec;
-        c *= 1000;
-        c += (long int)(e->tv_usec - s->tv_usec) / 1000;
-        dprintf("\tStart: %lu:%lu -> End: %lu:%lu\n", 
-                s->tv_sec, s->tv_usec, e->tv_sec, e->tv_usec);
-        return c;
-}
-
-static int it_test_performance(struct interval_node *root, unsigned long len)
-{
-        int i = 0, interval_time, list_time;
-        struct interval_node_extent ext;
-        struct it_node *n;
-        struct timeval start, end;
-        unsigned long count;
-        
-        ext.start = (random() % (max_count - len)) & ALIGN_MASK;
-        ext.end = (ext.start + len) & ALIGN_MASK;
-        if (have_wide_lock) {
-                ext.start = (max_count - len) & ALIGN_MASK;
-                ext.end = max_count;
-        }
-
-        dprintf("Extent search"__S"\n", __F(&ext));
-
-        /* list */
-        contended_count = 0;
-        gettimeofday(&start, NULL);
-        list_for_each_entry(n, &header, list) {
-                if (extent_overlapped(&ext, &n->node.in_extent)) {
-                        count = LOOP_COUNT;
-                        while (count--);
-                        contended_count++;
-                }
-        }
-        gettimeofday(&end, NULL);
-        list_time = tv_delta(&start, &end);
-        i = contended_count;
-
-        /* interval */
-        contended_count = 0;
-        gettimeofday(&start, NULL);
-        interval_search(root, &ext, perf_cb, &contended_count);
-        gettimeofday(&end, NULL);
-        interval_time = tv_delta(&start, &end);
-
-        if (i != contended_count)
-                error("count of contended lock don't match(%d: %d)\n",
-                      i, contended_count);
-
-        printf("\tList vs Int. search: \n\t\t"
-               "(%d vs %d)ms, %d contended lock.\n",
-                list_time, interval_time, contended_count);
-
-        return 0;
-}
-
-static struct interval_node *it_test_helper(struct interval_node *root)
-{
-        int idx, count = 0;
-        struct it_node *n;
-
-        count = random() % it_count;
-        while (count--) {
-                idx = random() % it_count;
-                n = &it_array[idx];
-                if (n->valid) {
-                        if (!interval_find(root, &n->node.in_extent))
-                                error("Cannot find an existent node\n");
-                        dprintf("Erasing a node "__S"\n", 
-                                __F(&n->node.in_extent));
-                        interval_erase(&n->node, &root);
-                        n->valid = 0;
-                        list_del_init(&n->list);
-                } else {
-                        __u64 low, high;
-                        low = (random() % max_count) & ALIGN_MASK;
-                        high = ((random() % max_count + 1) & ALIGN_MASK) + low;
-                        if (high > max_count)
-                                high = max_count;
-                        interval_set(&n->node, low, high);
-                        while (interval_insert(&n->node, &root))
-                                interval_set(&n->node, low, ++high);
-                        dprintf("Adding a node "__S"\n", 
-                                __F(&n->node.in_extent));
-                        n->valid = 1;
-                        list_add(&n->list, &header);
-                }
-        }
-
-        return root;
-}
-
-static struct interval_node *it_test_init(int count)
-{
-        int i;
-        uint64_t high, low, len;
-        struct it_node *n;
-        struct interval_node *root = NULL;
-
-        it_count = count;
-        it_array = (struct it_node *)malloc(sizeof(struct it_node) * count);
-        if (it_array == NULL)
-                error("it_array == NULL, no memory\n");
-
-        have_wide_lock = 0;
-        for (i = 0; i < count; i++) {
-                n = &it_array[i];
-                do {
-                        low = (random() % max_count + 1) & ALIGN_MASK;
-                        len = (random() % 256 + 1) * ALIGN_SIZE;
-                        if (!have_wide_lock && !(random() % count)) {
-                                low = 0;
-                                len = max_count;
-                                have_wide_lock = 1;
-                        }
-                        high = low + (len & ALIGN_MASK);
-
-                        interval_set(&n->node, low, high);
-                } while (interval_insert(&n->node, &root));
-                n->hit = 0;
-                n->valid = 1;
-                if (i == 0)
-                        list_add_tail(&n->list, &header);
-                else
-                        list_add_tail(&n->list, &it_array[rand()%i].list);
-        }
-
-        return root;
-}
-
-static void it_test_fini(void)
-{
-        free(it_array);
-        it_array = NULL;
-        it_count = 0;
-        max_count = 0;
-}
-
-int main(int argc, char *argv[])
-{
-        int count = 5, perf = 0;
-        struct interval_node *root;
-        struct timeval tv;
-
-        gettimeofday(&tv, NULL);
-        srandom(tv.tv_usec);
-
-        if (argc == 2) {
-                if (strcmp(argv[1], "-p"))
-                        error("Unknow options, usage: %s [-p]\n", argv[0]);
-                perf = 1;
-                count = 1;
-        }
-
-        if (perf) {
-                int M = 1024 * 1024;
-                root = it_test_init(1000000);
-                printf("1M locks with 4K request size\n");
-                it_test_performance(root, 4096);
-                printf("1M locks with 128K request size\n");
-                it_test_performance(root, 128 * 1024);
-                printf("1M locks with 256K request size\n");
-                it_test_performance(root, 256 * 1024);
-                printf("1M locks with 1M request size\n");
-                it_test_performance(root, 1 * M);
-                printf("1M locks with 16M request size\n");
-                it_test_performance(root, 16 * M);
-                printf("1M locks with 32M request size\n");
-                it_test_performance(root, 32 * M);
-                printf("1M locks with 64M request size\n");
-                it_test_performance(root, 64 * M);
-                printf("1M locks with 128M request size\n");
-                it_test_performance(root, 128 * M);
-                printf("1M locks with 256M request size\n");
-                it_test_performance(root, 256 * M);
-                printf("1M locks with 512M request size\n");
-                it_test_performance(root, 512 * M);
-                printf("1M locks with 1G request size\n");
-                it_test_performance(root, 1024 * M);
-                printf("1M locks with 2G request size\n");
-                it_test_performance(root, 2048 * M);
-                printf("1M locks with 3G request size\n");
-                it_test_performance(root, 3072 * M);
-                printf("1M locks with 4G request size\n");
-                it_test_performance(root, max_count - 1);
-                it_test_fini();
-                return 0;
-        }
-
-        root = it_test_init(random() % 100000 + 1000);
-        while (count--) {
-                it_test_sanity(root);
-                it_test_iterate(root);
-                it_test_iterate_reverse(root);
-                it_test_find(root);
-                it_test_search_hole(root);
-                it_test_search(root);
-                root = it_test_helper(root);
-        }
-        it_test_fini();
-
-        return 0;
-}
diff --git a/lustre/tests/ldaptest.c b/lustre/tests/ldaptest.c
deleted file mode 100644
index c1a7499f21935fa9f75b9a45cf1861478851f86f..0000000000000000000000000000000000000000
--- a/lustre/tests/ldaptest.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include <ldap.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
-int main(int argc, char **argv)
-{
-        LDAP *ld;
-        int err;
-
-        ld = ldap_init("localhost", 389); 
-        if (!ld) {
-                fprintf(stderr, "ldap_init: %s\n", strerror(errno));
-                exit(1);
-        }
-        
-        err = ldap_bind_s(ld, "cn=Manager,dc=lustre,dc=cfs", "secret", 
-                        LDAP_AUTH_SIMPLE);
-        if (err) { 
-                fprintf(stderr, "ldap_bind: %s\n", ldap_err2string(err));
-                exit(1);
-        }
-
-
-        
-
-}
diff --git a/lustre/tests/leak_finder.pl b/lustre/tests/leak_finder.pl
deleted file mode 100644
index 45d221161bf18ac6f59863095477a28ff1b37eb5..0000000000000000000000000000000000000000
--- a/lustre/tests/leak_finder.pl
+++ /dev/null
@@ -1,84 +0,0 @@
-#!/usr/bin/perl -w
-
-use IO::Handle;
-
-STDOUT->autoflush(1);
-STDERR->autoflush(1);
-
-my ($line, $memory);
-my $debug_line = 0;
-
-my $total = 0;
-my $max = 0;
-
-while ($line = <>) {
-    $debug_line++;
-    my ($file, $func, $lno, $name, $size, $addr, $type);
-    if ($line =~ m/^.*(\.).*\((.*):(\d+):(.*)\(\)\) (k|v|slab-)(.*) '(.*)': (\d+) at ([\da-f]+)/){
-        $file = $2;
-        $lno  = $3;
-        $func = $4;
-        $type = $6;
-        $name = $7;
-        $size = $8;
-        $addr = $9;
-
-	# we can't dump the log after portals has exited, so skip "leaks"
-	# from memory freed in the portals module unloading.
-	if ($func eq 'portals_handle_init') {
-	    next;
-	}
-        printf("%8s %6d bytes at %s called %s (%s:%s:%d)\n", $type, $size,
-               $addr, $name, $file, $func, $lno);
-    } else {
-        next;
-    }
-
-    if (index($type, 'alloced') >= 0) {
-        if (defined($memory->{$addr})) {
-            print STDERR "*** Two allocs with the same address ($size bytes at $addr, $file:$func:$lno)\n";
-            print STDERR "    first malloc at $memory->{$addr}->{file}:$memory->{$addr}->{func}:$memory->{$addr}->{lno}, second at $file:$func:$lno\n";
-            next;
-        }
-
-        $memory->{$addr}->{name} = $name;
-        $memory->{$addr}->{size} = $size;
-        $memory->{$addr}->{file} = $file;
-        $memory->{$addr}->{func} = $func;
-        $memory->{$addr}->{lno} = $lno;
-        $memory->{$addr}->{debug_line} = $debug_line;
-
-        $total += $size;
-        if ($total > $max) {
-            $max = $total;
-        }
-    } else {
-        if (!defined($memory->{$addr})) {
-            print STDERR "*** Free without malloc ($size bytes at $addr, $file:$func:$lno)\n";
-            next;
-        }
-        my ($oldname, $oldsize, $oldfile, $oldfunc, $oldlno) = $memory->{$addr};
-
-        if ($memory->{$addr}->{size} != $size) {
-            print STDERR "*** Free different size ($memory->{$addr}->{size} alloced, $size freed).\n";
-            print STDERR "    malloc at $memory->{$addr}->{file}:$memory->{$addr}->{func}:$memory->{$addr}->{lno}, free at $file:$func:$lno\n";
-            next;
-        }
-
-        delete $memory->{$addr};
-        $total -= $size;
-    }
-}
-
-# Sort leak output by allocation time
-my @sorted = sort {
-    return $memory->{$a}->{debug_line} <=> $memory->{$b}->{debug_line};
-} keys(%{$memory});
-
-my $key;
-foreach $key (@sorted) {
-    my ($oldname, $oldsize, $oldfile, $oldfunc, $oldlno) = $memory->{$key};
-    print STDERR "*** Leak: $memory->{$key}->{size} bytes allocated at $key ($memory->{$key}->{file}:$memory->{$key}->{func}:$memory->{$key}->{lno}, debug file line $memory->{$key}->{debug_line})\n";
-}
-
-print STDERR "maximum used: $max, amount leaked: $total\n";
diff --git a/lustre/tests/lfscktest.sh b/lustre/tests/lfscktest.sh
deleted file mode 100755
index b10190ac45c6a9fb1c332a52155e70d7d2266450..0000000000000000000000000000000000000000
--- a/lustre/tests/lfscktest.sh
+++ /dev/null
@@ -1,238 +0,0 @@
-#!/bin/bash
-#set -vx
-set -e
-
-TESTNAME="lfscktest"
-TMP=${TMP:-/tmp}
-MDSDB=${MDSDB:-$TMP/mdsdb}
-OSTDB=${OSTDB:-$TMP/ostdb}
-LOG=${LOG:-"$TMP/lfscktest.log"}
-L2FSCK_PATH=${L2FSCK_PATH:-""}
-NUMFILES=${NUMFILES:-10}
-NUMDIRS=${NUMDIRS:-4}
-GETSTRIPE=${GETSTRIPE:-"lfs getstripe"}
-GETFATTR=${GETFATTR:-getfattr}
-SETFATTR=${SETFATTR:-setfattr}
-MAX_ERR=1
-
-export PATH=$LFSCK_PATH:`dirname $0`:`dirname $0`/../utils:$PATH
-
-[ -z "`which $GETFATTR`" ] && echo "$0: $GETFATTR not found" && exit 5
-[ -z "`which $SETFATTR`" ] && echo "$0: $SETFATTR not found" && exit 6
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-# if nothing mounted, don't nuke MOUNT variable needed in llmount.sh
-WAS_MOUNTED=$(mounted_lustre_filesystems | head -1)
-if [ -z "$WAS_MOUNTED" ]; then
-       # This code doesn't handle multiple mounts well, so nuke MOUNT2 variable
-        MOUNT2="" sh llmount.sh
-        MOUNT=$(mounted_lustre_filesystems)
-        [ -z "$MOUNT" ] && echo "NAME=$NAME not mounted" && exit 2
-else
-        MOUNT=${WAS_MOUNTED}
-fi
-
-DIR=$DIR/$TESTNAME
-[ -z "`echo $DIR | grep $MOUNT`" ] && echo "$DIR not in $MOUNT" && exit 3
-
-if [ "$WAS_MOUNTED" ]; then
-	LFSCK_SETUP=no
-	MAX_ERR=4		# max expected error from e2fsck
-fi
-
-get_mnt_devs() {
-	DEVS=`cat /proc/fs/lustre/$1/*/mntdev`
-	for DEV in $DEVS; do
-		case $DEV in
-		*loop*) losetup $DEV | sed -e "s/.*(//" -e "s/).*//" ;;
-		*) echo $DEV ;;
-		esac
-	done
-}
-
-if [ "$LFSCK_SETUP" != "no" ]; then
-	#Create test directory 
-	# -- can't remove the mountpoint...
-	[ -z "$DIR" ] && rm -rf $DIR/*
-	mkdir -p $DIR
-	OSTCOUNT=`$GETSTRIPE $MOUNT | grep -c "^[0-9]*: " || true`
-
-	# Create some files on the filesystem
-	for d in `seq -f d%g $NUMDIRS`; do
-		echo "creating files in $DIR/$d"
-		for e in `seq -f d%g $NUMDIRS`; do
-			mkdir -p  $DIR/$d/$e
-			for f in `seq -f test%g $NUMDIRS`; do
-				cp /etc/fstab $DIR/$d/$e/$f ||exit 5
-			done
-		done
-	done
-
-	# Create Files to be modified
-	for f in `seq -f $DIR/testfile.%g $((NUMFILES * 3))`; do
-		echo "creating $f"
-		cp /etc/termcap $f || exit 10
-	done
-
-	#Create some more files
-	for d in `seq -f d%g $((NUMDIRS * 2 + 1)) $((NUMDIRS * 2 + 3))`; do
-		echo "creating files in $DIR/$d"
-		for e in `seq -f d%g $NUMDIRS`; do
-			mkdir -p  $DIR/$d/$e
-			for f in `seq -f test%g $NUMDIRS`; do
-				cp /etc/hosts $DIR/$d/$e/$f ||exit 15
-			done
-		done
-	done
-
-	# these should NOT be taken as duplicates
-	for f in `seq -f $DIR/$d/linkfile.%g $NUMFILES`; do
-		echo "linking files in $DIR/$d"
-		cp /etc/hosts $f
-		ln $f $f.link
-	done
-
-	# Get objids for a file on the OST
-	OST_FILES=`seq -f $DIR/testfile.%g $NUMFILES`
-	OST_REMOVE=`$GETSTRIPE $OST_FILES | awk '$1 == 0 { print $2 }' | head -n $NUMFILES`
-
-	export MDS_DUPE=""
-	for f in `seq -f testfile.%g $((NUMFILES + 1)) $((NUMFILES * 2))`; do
-		TEST_FILE=$DIR/$f
-		echo "DUPLICATING MDS file $TEST_FILE"
-		$GETSTRIPE -v $TEST_FILE >> $LOG || exit 20
-		MDS_DUPE="$MDS_DUPE $TEST_FILE"
-	done
-	MDS_DUPE=`echo $MDS_DUPE | sed "s#$MOUNT/##g"`
-
-	export MDS_REMOVE=""
-	for f in `seq -f testfile.%g $((NUMFILES * 2 + 1)) $((NUMFILES * 3))`; do
-		TEST_FILE=$DIR/$f
-		echo "REMOVING MDS file $TEST_FILE which has info:"
-		$GETSTRIPE -v $TEST_FILE >> $LOG || exit 30
-		MDS_REMOVE="$MDS_REMOVE $TEST_FILE"
-	done
-	MDS_REMOVE=`echo $MDS_REMOVE | sed "s#$MOUNT/##g"`
-
-	MDTDEVS=`get_mnt_devs mds`
-	OSTDEVS=`get_mnt_devs obdfilter`
-	OSTCOUNT=`echo $OSTDEVS | wc -w`
-	sh llmountcleanup.sh || exit 40
-
-	# Remove objects associated with files
-	echo "removing objects: `echo $OST_REMOVE`"
-	DEBUGTMP=`mktemp $TMP/debugfs.XXXXXXXXXX`
-	for i in $OST_REMOVE; do
-		echo "rm O/0/d$((i % 32))/$i" >> $DEBUGTMP
-	done
-	debugfs -w -f $DEBUGTMP `echo $OSTDEVS | cut -d' ' -f 1`
-	RET=$?
-	rm $DEBUGTMP
-	[ $RET -ne 0 ] && exit 50
-
-	SAVE_PWD=$PWD
-        [ "$FSTYPE" = "ldiskfs" ] && load_module ../ldiskfs/ldiskfs/ldiskfs
-	mount -t $FSTYPE -o loop $MDSDEV $MOUNT || exit 60
-	do_umount() {
-		trap 0
-		cd $SAVE_PWD
-		umount -f $MOUNT
-	}
-	trap do_umount EXIT
-
-	#Remove files from mds
-	for f in $MDS_REMOVE; do
-		rm $MOUNT/ROOT/$f || exit 70
-	done
-
-	#Create EAs on files so objects are referenced from different files
-	ATTRTMP=`mktemp $TMP/setfattr.XXXXXXXXXX`
-	cd $MOUNT/ROOT || exit 78
-	for f in $MDS_DUPE; do
-		touch $f.bad || exit 74
-		getfattr -n trusted.lov $f | sed "s#$f#&.bad#" > $ATTRTMP
-		setfattr --restore $ATTRTMP || exit 80
-	done
-	cd $SAVE_PWD
-	rm $ATTRTMP
-
-	do_umount
-else
-	MDTDEVS=`get_mnt_devs mds`
-	OSTDEVS=`get_mnt_devs obdfilter`
-	OSTCOUNT=`echo $OSTDEVS | wc -w`
-fi # LFSCK_SETUP
-
-# Run e2fsck to get mds and ost info
-# a return status of 1 indicates e2fsck successfuly fixed problems found
-set +e
-
-echo "e2fsck -d -v -fn --mdsdb $MDSDB $MDSDEV"
-df > /dev/null	# update statfs data on disk
-e2fsck -d -v -fn --mdsdb $MDSDB $MDSDEV
-RET=$?
-[ $RET -gt $MAX_ERR ] && echo "e2fsck returned $RET" && exit 90 || true
-
-export OSTDB_LIST=""
-i=0
-for OSTDEV in $OSTDEVS; do
-	df > /dev/null	# update statfs data on disk
-	e2fsck -d -v -fn --mdsdb $MDSDB --ostdb $OSTDB-$i $OSTDEV
-	RET=$?
-	[ $RET -gt $MAX_ERR ] && echo "e2fsck returned $RET" && exit 100
-	OSTDB_LIST="$OSTDB_LIST $OSTDB-$i"
-	i=$((i + 1))
-done
-
-#Remount filesystem
-[ "`mount | grep $MOUNT`" ] || setupall
-
-# need to turn off shell error detection to get proper error return
-# lfsck will return 1 if the filesystem had errors fixed
-echo "LFSCK TEST 1"
-echo "lfsck -c -l --mdsdb $MDSDB --ostdb $OSTDB_LIST $MOUNT"
-echo y | lfsck -c -l --mdsdb $MDSDB --ostdb $OSTDB_LIST $MOUNT
-RET=$?
-[ $RET -eq 0 ] && echo "clean after first check" && exit 0
-echo "LFSCK TEST 1 - finished with rc=$RET"
-[ $RET -gt $MAX_ERR ] && exit 110 || true
-
-# make sure everything gets to the backing store
-sync; sleep 2; sync
-
-echo "LFSCK TEST 2"
-echo "e2fsck -d -v -fn --mdsdb $MDSDB $MDSDEV"
-df > /dev/null	# update statfs data on disk
-e2fsck -d -v -fn --mdsdb $MDSDB $MDSDEV
-RET=$?
-[ $RET -gt $MAX_ERR ] && echo "e2fsck returned $RET" && exit 123 || true
-
-i=0
-export OSTDB_LIST=""
-for OSTDEV in $OSTDEVS; do
-	df > /dev/null	# update statfs data on disk
-	e2fsck -d -v -fn --mdsdb $MDSDB --ostdb $OSTDB-$i $OSTDEV
-	RET=$?
-	[ $RET -gt $MAX_ERR ] && echo "e2fsck returned $RET" && exit 124
-	OSTDB_LIST="$OSTDB_LIST $OSTDB-$i"
-	i=$((i + 1))
-done
-
-echo "LFSCK TEST 2"
-echo "lfsck -c -l --mdsdb $MDSDB --ostdb $OSTDB_LIST $MOUNT"
-lfsck -c -l --mdsdb $MDSDB --ostdb $OSTDB_LIST $MOUNT
-RET=$?
-echo "LFSCK TEST 2 - finished with rc=$RET"
-[ $RET -ne 0 ] && exit 125 || true
-if [ -z "$WAS_MOUNTED" ]; then
-	sh llmountcleanup.sh || exit 120
-fi
-
-#Cleanup 
-rm -f $MDSDB $OSTDB-* || true
-
-echo "$0: completed"
diff --git a/lustre/tests/liblustre_sanity_uml.sh b/lustre/tests/liblustre_sanity_uml.sh
deleted file mode 100644
index ee035d0ea182c73a33323000165238a2923706fb..0000000000000000000000000000000000000000
--- a/lustre/tests/liblustre_sanity_uml.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/bash
-
-# liblustre sanity test. specially written for UML for now
-
-LCONF=${LCONF:-../utils/lconf}
-
-LLIP=127.0.0.1
-
-LTREE_KERNEL=${LTREE_KERNEL:-../../lustre}
-LTREE_USER=${LTREE_USER:-../../lustre-lib}
-HOSTNAME=`hostname`
-
-# checking
-if [ ! -e $LTREE_KERNEL ]; then
-	echo "$LTREE_KERNEL dosen't exits"
-	exit 1
-fi
-
-if [ ! -e $LTREE_USER ]; then
-	echo "$LTREE_USER dosen't exits"
-	exit 1
-fi
-
-if [ ! -e $LTREE_USER/liblustre/lltest ]; then
-	echo "$LTREE_USER/liblustre/lltest dosen't exits"
-	exit 1
-fi
-
-workdir=`pwd`
-
-cleanup()
-{
-	curdir=`pwd`
-	cd $LTREE_KERNEL/tests
-	$LCONF --node $HOSTNAME --cleanup --force $LTREE_USER/tests/$configfile 2>&1 > /dev/null
-	cd $curdir
-}
-
-configfile=liblustre_sanity_uml.xml
-
-# generate config file
-rm -f $configfile
-MDSNODE=$HOSTNAME OSTNODES=$HOSTNAME CLIENTS=$LLIP sh uml.sh $configfile
-if [ ! -e $configfile ]; then
-	echo "fail to generate config file $configfile"
-	exit 1
-fi
-
-# generate dump file
-rm -f /tmp/DUMP_FILE
-$LCONF --lctl_dump /tmp/DUMP_FILE --node $LLIP $configfile
-if [ ! -e /tmp/DUMP_FILE ]; then
-	echo "error creating dumpfile"
-	exit 1
-fi
-
-#setup lustre server
-cd $LTREE_KERNEL/tests
-$LCONF --node $HOSTNAME --reformat $LTREE_USER/tests/$configfile
-rc=$?
-if [ $rc -ne 0 ]; then
-	echo "setup lustre server: error $rc"
-	cleanup
-	exit 1
-fi
-cd $workdir
-
-#do liblustre testing
-$LTREE_USER/liblustre/lltest
-rc=$?
-if [ $rc -ne 0 ]; then
-	echo "liblustre test error $rc"
-	cleanup
-	exit 1
-fi
-
-echo "===== liblustre sanity test complete sucessfully ====="
-
-echo -n "===== cleanup... "; cleanup; echo "done ====="
-
-cd $workdir
-
-exit 0
diff --git a/lustre/tests/ll_dirstripe_verify.c b/lustre/tests/ll_dirstripe_verify.c
deleted file mode 100644
index 8edaaaef127026a3f0cd8301a6808a8e73e8c228..0000000000000000000000000000000000000000
--- a/lustre/tests/ll_dirstripe_verify.c
+++ /dev/null
@@ -1,245 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * ll_dirstripe_verify <dir> <file>:
- * - to verify if the file has the same lov_user_md setting as the parent dir.
- * - if dir's offset is set -1, ll_dirstripe_verify <dir> <file1> <file2>
- *      is used to further verify if file1 and file2's obdidx is continuous.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <dirent.h>
-
-#include <liblustre.h>
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_user.h>
-#include <obd_lov.h>
-
-#include <lnet/lnetctl.h>
-
-
-#define MAX_LOV_UUID_COUNT      1000
-
-/* Returns bytes read on success and a negative value on failure.
- * If zero bytes are read it will be treated as failure as such
- * zero cannot be returned from this function.
- */
-int read_proc_entry(char *proc_path, char *buf, int len)
-{
-        int rc, fd;
-
-        memset(buf, 0, len);
-
-        fd = open(proc_path, O_RDONLY);
-        if (fd == -1) {
-                fprintf(stderr, "open('%s') failed: %s\n",
-                        proc_path, strerror(errno));
-                return -2;
-        }
-
-        rc = read(fd, buf, len - 1);
-        if (rc < 0) {
-                fprintf(stderr, "read('%s') failed: %s\n",
-                        proc_path, strerror(errno));
-                rc = -3;
-        } else if (rc == 0) {
-                fprintf(stderr, "read('%s') zero bytes\n", proc_path);
-                rc = -4;
-        } else if (/* rc > 0 && */ buf[rc - 1] == '\n') {
-                buf[rc - 1] = '\0'; /* Remove trailing newline */
-        }
-        close(fd);
-
-        return (rc);
-}
-
-int compare(struct lov_user_md *lum_dir, struct lov_user_md *lum_file1,
-            struct lov_user_md *lum_file2)
-{
-        int stripe_count = 0;
-        int stripe_size = 0;
-        int stripe_offset = -1;
-        int ost_count;
-        char buf[128];
-        char lov_path[PATH_MAX];
-        char tmp_path[PATH_MAX];
-        int i;
-        FILE *fp;
-
-        fp = popen("\\ls -d  /proc/fs/lustre/lov/*lov* | head -1", "r");
-        if (!fp) {
-                fprintf(stderr, "open(lustre/lov/*lov*) failed: %s\n", 
-                        strerror(errno));
-                return 2;
-        }
-        if (fscanf(fp, "%s", lov_path) < 1) { 
-                fprintf(stderr, "read(lustre/lov/*lov*) failed: %s\n",
-                        strerror(errno));
-                pclose(fp);
-                return 3;
-        }
-        pclose(fp);
-
-        if (lum_dir == NULL) {
-                snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/stripecount",
-                         lov_path);
-                if (read_proc_entry(tmp_path, buf, sizeof(buf)) < 0)
-                        return 5;
-
-                stripe_count = atoi(buf);
-        } else {
-                stripe_count = (int)lum_dir->lmm_stripe_count;
-        }
-        if (stripe_count == 0)
-                stripe_count = 1;
-
-        snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/numobd", lov_path);
-        if (read_proc_entry(tmp_path, buf, sizeof(buf)) < 0)
-                return 6;
-
-        ost_count = atoi(buf);
-        stripe_count = stripe_count > 0 ? stripe_count : ost_count;
-
-        if (lum_file1->lmm_stripe_count != stripe_count) {
-                fprintf(stderr, "file1 stripe count %d != dir %d\n",
-                        lum_file1->lmm_stripe_count, stripe_count);
-                return 7;
-        }
-
-        if (lum_dir != NULL)
-                stripe_size = (int)lum_dir->lmm_stripe_size;
-        if (stripe_size == 0) {
-                snprintf(tmp_path, sizeof(tmp_path) - 1, "%s/stripesize",
-                         lov_path);
-                if (read_proc_entry(tmp_path, buf, sizeof(buf)) < 0)
-                        return 5;
-
-                stripe_size = atoi(buf);
-        }
-
-        if (lum_file1->lmm_stripe_size != stripe_size) {
-                fprintf(stderr, "file1 stripe size %d != dir %d\n",
-                        lum_file1->lmm_stripe_size, stripe_size);
-                return 8;
-        }
-
-        if (lum_dir != NULL)
-                stripe_offset = (short int)lum_dir->lmm_stripe_offset;
-        if (stripe_offset != -1) {
-                for (i = 0; i < stripe_count; i++)
-                        if (lum_file1->lmm_objects[i].l_ost_idx !=
-                            (stripe_offset + i) % ost_count) {
-                                fprintf(stderr, "warning: file1 non-sequential "
-                                        "stripe[%d] %d != %d\n", i,
-                                        lum_file1->lmm_objects[i].l_ost_idx,
-                                        (stripe_offset + i) % ost_count);
-                        }
-        } else if (lum_file2 != NULL) {
-                int next, idx, stripe = stripe_count - 1;
-                next = (lum_file1->lmm_objects[stripe].l_ost_idx + 1) %
-                       ost_count;
-                idx = lum_file2->lmm_objects[0].l_ost_idx;
-                if (idx != next) {
-                        fprintf(stderr, "warning: non-sequential "
-                                "file1 stripe[%d] %d != file2 stripe[0] %d\n",
-                                stripe,
-                                lum_file1->lmm_objects[stripe].l_ost_idx, idx);
-                }
-        }
-
-        return 0;
-}
-
-int main(int argc, char **argv)
-{
-        DIR * dir;
-        struct lov_user_md *lum_dir, *lum_file1 = NULL, *lum_file2 = NULL;
-        int rc;
-        int lum_size;
-        char *fname;
-
-        if (argc < 3) {
-                fprintf(stderr, "Usage: %s <dirname> <filename1> [filename2]\n",
-                        argv[0]);
-                return 1;
-        }
-
-        dir = opendir(argv[1]);
-        if (dir == NULL) {
-                fprintf(stderr, "%s opendir failed: %s\n", argv[1], 
-                        strerror(errno));
-                return errno;
-        }
-
-        lum_size = lov_mds_md_size(MAX_LOV_UUID_COUNT);
-        if ((lum_dir = (struct lov_user_md *)malloc(lum_size)) == NULL) {
-                fprintf(stderr, "unable to allocate memory for ioctl's");
-                return errno;
-        }
-
-        rc = ioctl(dirfd(dir), LL_IOC_LOV_GETSTRIPE, lum_dir);
-        if (rc) {
-                if (errno == ENODATA) {
-                        free(lum_dir);
-                        lum_dir = NULL;
-                } else {
-                        rc = errno;
-                        goto cleanup;
-                }
-        }
-
-        if ((lum_file1 = (struct lov_user_md *)malloc(lum_size)) == NULL) {
-                fprintf(stderr, "unable to allocate memory for ioctl's");
-                rc = errno;
-                goto cleanup;
-        }
-
-        fname = strrchr(argv[2], '/');
-        fname = (fname == NULL ? argv[2] : fname + 1);
-
-        strncpy((char *)lum_file1, fname, lum_size);
-        rc = ioctl(dirfd(dir), IOC_MDC_GETFILESTRIPE, lum_file1);
-        if (rc) {
-                rc = errno;
-                goto cleanup;
-        }
-
-        if (argc == 4) {
-                lum_file2 = (struct lov_user_md *)malloc(lum_size);
-                if (lum_file2 == NULL) {
-                        fprintf(stderr,
-                                "unable to allocate memory for ioctl's");
-                        rc = errno;
-                        goto cleanup;
-                }
-
-                fname = strrchr(argv[3], '/');
-                fname = (fname == NULL ? argv[3] : fname + 1);
-                strncpy((char *)lum_file2, fname, lum_size);
-                rc = ioctl(dirfd(dir), IOC_MDC_GETFILESTRIPE, lum_file2);
-                if (rc) {
-                        rc = errno;
-                        goto cleanup;
-                }
-        }
-
-        rc = compare(lum_dir, lum_file1, lum_file2);
-
-cleanup:
-        if (lum_dir != NULL)
-                free(lum_dir);
-        if (lum_file1 != NULL)
-                free(lum_file1);
-        if (lum_file2 != NULL)
-                free(lum_file2);
-
-        return rc;
-}
diff --git a/lustre/tests/ll_getstripe_info.c b/lustre/tests/ll_getstripe_info.c
deleted file mode 100644
index b8df70c6599965be3a6ffd0e15995ffe8ef697c2..0000000000000000000000000000000000000000
--- a/lustre/tests/ll_getstripe_info.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * ll_getstripe_info <file>:
- * - get file's stripe info.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-
-#include <liblustre.h>
-#include <obd.h>
-#include <obd_lov.h>
-
-#include <lustre/liblustreapi.h>
-
-#define MAX_LOV_UUID_COUNT      1000
-
-int main(int argc, char** argv)
-{
-        struct lov_user_md *lum_file = NULL;
-        int rc;
-        int lum_size;
-
-        if (argc != 2) {
-                fprintf(stderr, "Usage: %s <filename>\n", argv[0]);
-                return 1;
-        }
-
-        lum_size = lov_mds_md_size(MAX_LOV_UUID_COUNT);
-
-        if ((lum_file = (struct lov_user_md *)malloc(lum_size)) == NULL) {
-                fprintf(stderr, "unable to allocate memory for ioctl's");
-                rc = errno;
-                goto cleanup;
-        }
-
-        rc = llapi_file_get_stripe(argv[1], lum_file);
-        if (rc) {
-                rc = errno;
-                goto cleanup;
-        }
-
-        /* stripe_size stripe_count stripe_offset */
-        printf("%d %d %d\n", 
-               lum_file->lmm_stripe_size,
-               lum_file->lmm_stripe_count,
-               lum_file->lmm_objects[0].l_ost_idx);
-
-cleanup:
-        if (lum_file != NULL)
-                free(lum_file);
-
-        return rc;
-}
diff --git a/lustre/tests/ll_sparseness_verify.c b/lustre/tests/ll_sparseness_verify.c
deleted file mode 100644
index 574f06449ed65ef9f0705ab3fa292bd356025ef6..0000000000000000000000000000000000000000
--- a/lustre/tests/ll_sparseness_verify.c
+++ /dev/null
@@ -1,102 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * The companion to ll_sparseness_write; walk all the bytes in the file.
- * the bytes at the offsets specified on the command line must be '+', as
- * previously written by ll_sparseness_write.  All other bytes must be
- * 0.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdarg.h>
-
-#define BUFSIZE (1024*1024)    
-
-void error(char *fmt, ...)
-{
-        va_list ap;
-        va_start(ap, fmt);
-        vfprintf(stderr, fmt, ap);
-        va_end(ap);
-        exit(1);
-}
-
-int compare_offsets(const void *a, const void *b)
-{
-        off_t *A = (off_t *)a;
-        off_t *B = (off_t *)b;
-        return *A - *B;
-}
-
-int main(int argc, char **argv)
-{
-        unsigned int num_offsets, cur_off = 0, i;
-        off_t *offsets, pos = 0, end_of_buf = 0;
-        char *end, *buf;
-        struct stat st;
-        ssize_t ret;
-        int fd;
-
-        if (argc < 3)
-                error("Usage: %s <filename> <offset> [ offset ... ]\n", 
-                       argv[0]);
-
-        fd = open(argv[1], O_RDONLY);
-        if (fd < 0)
-                error("couldn't open %s: %s\n", argv[1], strerror(errno));
-
-        buf = malloc(BUFSIZE);
-        if (buf == NULL)
-                error("can't allocate buffer\n");
-
-        num_offsets = argc - 2;
-        offsets = calloc(sizeof(offsets[0]), num_offsets);
-        for (i = 0; i < num_offsets; i++) {
-                offsets[i] = strtoul(argv[i + 2], &end, 10);
-                if (*end) 
-                        error("couldn't parse offset '%s'\n", argv[i + 2]);
-        }
-        qsort(offsets, num_offsets, sizeof(offsets[0]), compare_offsets);
-
-        if (fstat(fd, &st) < 0)
-                error("stat: %s\n", strerror(errno));
-
-        for (i = 0; pos < st.st_size; i++, pos++) {
-                if (pos == end_of_buf) {
-                        ret = read(fd, buf, BUFSIZE);
-                        if (ret < 0)
-                                error("read(): %s\n", strerror(errno));
-                        end_of_buf = pos + ret;
-                        if (end_of_buf > st.st_size)
-                                error("read %d bytes past file size?\n",
-                                      end_of_buf - st.st_size);
-                        i = 0;
-                }
-
-                /* check for 0 when we aren't at a given offset */
-                if (cur_off >= num_offsets || pos != offsets[cur_off]) {
-                        if (buf[i] != 0) 
-                                error("found char 0x%x at pos %lu instead of "
-                                       "0x0\n", buf[i], (long)pos);
-                        continue;
-                }
-
-                /* the command line asks us to check for + at this offset */
-                if (buf[i] != '+') 
-                        error("found char 0x%x at pos %lu instead of "
-                               "'.'\n", buf[i], (long)pos);
-
-                /* skip over duplicate offset arguments */
-                while (cur_off < num_offsets && offsets[cur_off] == pos)
-                        cur_off++;
-        }
-        /* don't bother freeing or closing.. */
-        return 0;
-}
diff --git a/lustre/tests/ll_sparseness_write.c b/lustre/tests/ll_sparseness_write.c
deleted file mode 100644
index 7c110969b12be5bfe72b45cc068345f72871a063..0000000000000000000000000000000000000000
--- a/lustre/tests/ll_sparseness_write.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#define BUFSIZE (1024*1024)   
-
-/* Function: pwrite character '+' to <filename> at <offset> (man pwrite)
- * Return:   0 success
- *           1 failure */
-int main(int argc, char**argv)
-{
-        int p_size;
-        unsigned int offset;
-        char *filename;
-        int fd;
-        char buf[] = "+++";
-        char *end;
-
-        if(argc != 3) {
-                fprintf(stderr, "Usage: %s <filename> <offset>(KB)\n", argv[0]);
-                exit(1);
-        }
-
-        filename = argv[1];
-        offset = strtoul(argv[2], &end, 10);
-        if (*end) {
-                fprintf(stderr, "<offset> parameter should be integer\n");
-                exit(1);
-        }
-
-        fd = open(filename, O_CREAT|O_RDWR, 0644);
-        if (fd == -1) {
-                fprintf(stderr, "Opening %s fails (%s)\n", 
-                        filename, strerror(errno));
-                return 1;
-        }
-
-        /* write the character '+' at offset */
-        p_size = pwrite(fd, buf, 1, offset);
-        if (p_size != 1) {
-                fprintf(stderr, "pwrite %s fails (%s)\n", 
-                        filename, strerror(errno));
-                close(fd);
-                return 1;
-        }
-                
-        close(fd);
-        return 0;
-}
diff --git a/lustre/tests/llecho.sh b/lustre/tests/llecho.sh
deleted file mode 100644
index a345f4f78d6a396072d56b013163d12a5fc4f404..0000000000000000000000000000000000000000
--- a/lustre/tests/llecho.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-
-PATH=`dirname $0`/../utils:$PATH
-
-LCONF=${LCONF:-lconf}
-NAME=${NAME:-echo}
-
-config=$NAME.xml
-mkconfig=$NAME.sh
-
-if [ "$LUSTRE" ]; then
-  lustre_opt="--lustre=$LUSTRE"
-fi
-
-[ -f $config ] || sh -x $mkconfig $config || exit 1
-
-$LCONF $lustre_opt --reformat $@ $OPTS $config || exit 4
-
-cat <<EOF
-
-run getattr tests as:
-`dirname $0`../utils/lctl --device '\$ECHO_$SERVER' test_getattr 1000000
-EOF
diff --git a/lustre/tests/llmount.sh b/lustre/tests/llmount.sh
deleted file mode 100755
index b3024aa0d1311238b8df2795b417bf0ced97767e..0000000000000000000000000000000000000000
--- a/lustre/tests/llmount.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-export PATH=`dirname $0`/../utils:$PATH
-NAME=${NAME:-local}
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-[ -z "$NOFORMAT" ] && formatall
-[ -z "$NOSETUP" ] && setupall
diff --git a/lustre/tests/llmountcleanup.sh b/lustre/tests/llmountcleanup.sh
deleted file mode 100755
index 076faa7be7c1fe7dea8fdf9ec1e261fcbb690679..0000000000000000000000000000000000000000
--- a/lustre/tests/llmountcleanup.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/bash
-export PATH=`dirname $0`/../utils:$PATH
-NAME=${NAME:-local}
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-cleanupall -f
diff --git a/lustre/tests/llog-test.sh b/lustre/tests/llog-test.sh
deleted file mode 100644
index 56c7f0a36e8a1132db6d546dc4754f361a4db34f..0000000000000000000000000000000000000000
--- a/lustre/tests/llog-test.sh
+++ /dev/null
@@ -1,106 +0,0 @@
-#!/bin/sh
-
-set -e
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-
-init_test_env $@
-
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-ostfailover_HOST=${ostfailover_HOST:-$ost_HOST}
-
-gen_config() {
-    rm -f "$XMLCONFIG"
-    add_mds mds --dev "$MDSDEV" --size "$MDSSIZE"
-    add_lov lov1 mds --stripe_sz $STRIPE_BYTES \
-	--stripe_cnt $STRIPES_PER_OBJ --stripe_pattern 0
-    add_ost ost --lov lov1 --dev $OSTDEV --size $OSTSIZE --failover
-    if [ ! -z "$ostfailover_HOST" ]; then
-	 add_ostfailover ost --dev $OSTDEV --size $OSTSIZE
-    fi
-    add_client client mds --lov lov1 --path $MOUNT
-}
-
-cleanup() {
-    # make sure we are using the primary MDS, so the config log will
-    # be able to clean up properly.
-    activeost=`facet_active ost`
-    if [ $activeost != "ost" ]; then
-        fail ost
-    fi
-    zconf_umount `hostname` $MOUNT
-    stop mds ${FORCE} $MDSLCONFARGS
-    stop ost ${FORCE} --dump $TMP/replay-ost-single-`hostname`.log
-    cleanup_check
-}
-
-if [ "$ONLY" == "cleanup" ]; then
-    sysctl -w portals.debug=0
-    FORCE=--force cleanup
-    exit
-fi
-
-build_test_filter
-
-SETUP=${SETUP:-"setup"}
-CLEANUP=${CLEANUP:-"cleanup"}
-
-setup() {
-    gen_config
-
-    start ost --reformat $OSTLCONFARGS
-    [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
-    start mds --reformat $MDSLCONFARGS
-
-    if [ -z "`grep " $MOUNT " /proc/mounts`" ]; then
-	# test "-1" needed during initial client->OST connection
-	log "== test 00: target handle mismatch (bug 5317) === `date +%H:%M:%S`"
-
-	#define OBD_FAIL_OST_ALL_REPLY_NET       0x211
-	do_facet ost "sysctl -w lustre.fail_loc=0x80000211"
-
-	zconf_mount `hostname` $MOUNT && df $MOUNT && pass || error "mount fail"
-    fi
-}
-
-mkdir -p $DIR
-
-$SETUP
-
-LCOUNT=${LCOUNT:-10000}
-
-test_0() {
-    ./createmany -o $DIR/llog-%d $LCOUNT
-    #replay_barrier ost
-}
-run_test 0 "Prepare fileset"
-
-test_1() {
-    ./chownmany 1000 $DIR/llog-%d $LCOUNT
-    sleep 5
-    $CHECKSTAT -u \#1000 $DIR/llog-* || return 4
-}
-run_test 1 "Do chowns"
-
-test_2() {
-    HALFCOUNT=${HALFCOUNT:-17}
-    ./chownmany 500 $DIR/llog-%d 0 $HALFCOUNT
-    fail ost
-    ./chownmany 500 $DIR/llog-%d $HALFCOUNT $LCOUNT
-    sleep 5
-    $CHECKSTAT -u \#500 $DIR/llog-* || return 5
-}
-run_test 2 "Fail OST during chown"
-
-test_3() {
-    ./unlinkmany $DIR/llog-%d $LCOUNT
-    sleep 2
-    $CHECKSTAT -t file $DIR/llog-* && return 10 || true
-}
-run_test 3 "Remove testset"
-
-equals_msg test complete, cleaning up
-FORCE=--force $CLEANUP
-echo "$0: completed"
diff --git a/lustre/tests/lockorder.sh b/lustre/tests/lockorder.sh
deleted file mode 100644
index 10e9573ec540793dfa5117298ef019280476d557..0000000000000000000000000000000000000000
--- a/lustre/tests/lockorder.sh
+++ /dev/null
@@ -1,80 +0,0 @@
-#!/bin/sh
-set -e
-
-export PATH=`dirname $0`:`dirname $0`/../utils:$PATH
-CREATEMANY=${CREATEMANY:-createmany}
-STATMANY=${STATMANY:-statmany}
-UNLINKMANY=${UNLINKMANY:-unlinkmany}
-LCTL=${LCTL:-lctl}
-
-MOUNT1=${MOUNT1:-/mnt/lustre1}
-MOUNT2=${MOUNT2:-/mnt/lustre2}
-DIR=${DIR:-$MOUNT1}
-DIR2=${DIR2:-$MOUNT2}
-COUNT=${COUNT:-100}
-
-cleanup() {
-	[ $CR_PID ] && kill -9 $CR_PID
-	[ $ST_PID ] && kill -9 $ST_PID
-}
-
-trap cleanup EXIT
-
-LOCKDIR=$DIR/lockdir
-LOCKFILE=$LOCKDIR/lockfile
-rm -rf $LOCKDIR
-
-NUM=0
-
-MINDIR=$DIR
-MAXDIR=$DIR
-MINRES=2000000000
-MAXRES=0
-mkdir -p $MINDIR
-while [ $MINRES -gt $MAXRES ]; do
-	FILETMP=$MINDIR/f$$${NUM}
-	DIRTMP=$DIR/d$$/d${NUM}
-	touch $FILETMP
-	mkdir -p $DIRTMP
-	FILERES=`ls -id $FILETMP | awk '{ print $1 }'`
-	DIRRES=`ls -id $DIRTMP | awk '{ print $1 }'`
-	if [ $DIRRES -gt $MAXRES ]; then
-		MAXDIR=$DIRTMP
-		MAXRES=$DIRRES
-	fi
-	if [ $FILERES -lt $MINRES ]; then
-		[ -f "$MINFILE" ] && rm $MINFILE
-		MINFILE=$FILETMP
-		MINRES=$FILERES
-	else
-		rm $FILETMP
-	fi
-	NUM=$(($NUM + 1))
-done
-
-mv $MAXDIR $LOCKDIR
-mv $MINFILE $LOCKFILE
-rm -rf $DIR/d$$
-
-$LCTL mark "start dir: $LOCKDIR=$MAXRES file: $LOCKFILE=$MINRES"
-# link will lock $LOCKFILE and $DIR as it creates ${LOCKFILE}{0,1,...}
-$CREATEMANY -l$LOCKFILE $LOCKFILE -$COUNT &
-CR_PID=$!
-
-while ! test -f ${LOCKFILE}1 ; do
-	sleep 1
-done
-
-# this will lock $DIR and ${LOCKFILE}0
-$STATMANY -s $DIR2/lockdir/lockfile 1 -$COUNT &
-ST_PID=$!
-
-sleep $(($COUNT / 2))
-
-$UNLINKMANY $DIR2/lockdir/lockfile 1 $(($COUNT * 1000)) || true
-
-trap 0
-kill $CR_PID || true
-kill $ST_PID || true
-
-rm -rf $LOCKDIR
diff --git a/lustre/tests/lov-sanity.sh b/lustre/tests/lov-sanity.sh
deleted file mode 100644
index 05ceae665e551575d95da8a394344f8719314677..0000000000000000000000000000000000000000
--- a/lustre/tests/lov-sanity.sh
+++ /dev/null
@@ -1,89 +0,0 @@
-#!/bin/sh
-export OSTCOUNT=6
-export OSTSIZE=81919
-export NAME=lov
-export MOUNTPT=${MOUNTPT:-"/mnt/lustre"}
-export LCONF=${LCONF:-"../utils/lconf"}
-export CONFIG=${CONFIG:-"$NAME.xml"}
-export MCREATE=${MCREATE:-"mcreate"}
-export LFS=${LFS:-"/usr/sbin/lfs"}
-export SETSTRIPE_SIZE=${SETSTRIPE_SIZE:-"131072"}
-export OPENFILE=${OPENFILE:-"./openfile"}
-fail()
-{
-    echo "ERROR $@"
-    exit 1
-}
-lustre_mount()
-{
-    . ./llmount.sh || fail "Mount lustre failed"
-}
-test_0()
-{
-    echo "test 0 IO after open file"
-    mkdir $MOUNTPT/d0 
-    $OPENFILE -f O_RDWR:O_CREAT -m 0755  $MOUNTPT/d0/f       || fail "open file failed."
-    ls -lR >> $MOUNTPT/d0/f                                  || fail "IO after open failed."
-    rm -fr  $MOUNTPT/d0                                      || fail "Unable to ereas dir."
-    echo "test 0 success."
-}
-test_1()
-{
-    echo "test 1 IO after mcreate "
-    mkdir $MOUNTPT/d1
-    $MCREATE $MOUNTPT/d1/f    || fail "mcreate file failed."
-    ls -lR >> $MOUNTPT/d1/f   || fail "IO after mcreate failed."
-    rm -fr  $MOUNTPT/d1       || fail "Unable to ereas the file."
-    echo "test 1 success."
-}
-test_2()
-{
-    echo "test 2 IO after mcreate with strip 1 "
-    mkdir $MOUNTPT/d2
-    $MCREATE $MOUNTPT/d2/f                             || fail "mcreate file failed."
-    $LFS setstripe $MOUNTPT/d2/f $SETSTRIPE_SIZE 0 1   || fail "setstipe to stripe 1 failed"
-    ls -lR >> $MOUNTPT/d2/f                            || fail "IO after mcreate failed."
-    rm -fr  $MOUNTPT/d2                                || fail "Unable to ereas the file."
-    echo "test 2 success."
-}
-
-test_3()
-{
-    echo "test 2 IO after mcreate with strip 4 "
-    mkdir $MOUNTPT/d3
-    $MCREATE $MOUNTPT/d3/f                             || fail "mcreate file failed."
-    $LFS setstripe $MOUNTPT/d3/f $SETSTRIPE_SIZE 0 4   || fail "setstipe to stripe 4 failed"
-    ls -lR >> $MOUNTPT/d3/f                            || fail "IO after mcreate failed."
-    rm -fr  $MOUNTPT/d3                                || fail "Unable to ereas the file."
-    echo "test 3 success."
-}
-test_4()
-{
-    echo "test 4 IO after mcreate with strip 6 "
-    mkdir $MOUNTPT/d3
-    $MCREATE $MOUNTPT/d3/f                             || fail "mcreate file failed."
-    $LFS setstripe $MOUNTPT/d3/f $SETSTRIPE_SIZE 0 6   || fail "setstipe to stripe 6 failed"
-    ls -lR >> $MOUNTPT/d3/f                            || fail "IO after mcreate failed."
-    rm -fr  $MOUNTPT/d3                                || fail "Unable to ereas the file."
-    echo "test 4 success."
-}
-
-lustre_clean()
-{
-    echo "clean up lustre"
-    cd $CURRENT
-    $LCONF --cleanup  $CONFIG  || fail "Unable to clean up lustre."
-    echo "clean up lustre success"
-}
-run_all()
-{
-    lustre_mount 
-    test_0	 
-    test_1
-    test_2
-    test_3
-    test_4
-    lustre_clean 
-}
-run_all 
-
diff --git a/lustre/tests/lp_utils.c b/lustre/tests/lp_utils.c
deleted file mode 100644
index 0ca7a85bdb92f501e46f5dbd1931e2a6dcdb0b3f..0000000000000000000000000000000000000000
--- a/lustre/tests/lp_utils.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: You Feng <youfeng@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <mpi.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <errno.h>
-#include "lustre/lustre_user.h"
-#include "lp_utils.h"
-
-#define MAX_PROCESSES 8
-
-int verbose = 0;
-int debug = 0;
-
-char hostname[1024];
-
-struct timeval t1, t2;
-
-char *timestamp() {
-        static char datestring[80];
-        time_t timestamp;
-
-        fflush(stdout);
-        timestamp = time(NULL);
-        strftime(datestring, 80, "%T", localtime(&timestamp));
-
-        return datestring;
-}
-
-inline void begin(char *str) {
-        if (verbose > 0 && rank == 0) {
-                gettimeofday(&t1, NULL);
-                printf("%s:\tBeginning %s\n", timestamp(), str);
-                fflush(stdout);
-        }
-}
-
-inline void end(char *str) {
-        float elapsed;
-
-        MPI_Barrier(MPI_COMM_WORLD);
-        if (verbose > 0 && rank == 0) {
-                gettimeofday(&t2, NULL);
-                elapsed = (t2.tv_sec + ((float)t2.tv_usec/1000000))
-                          - (t1.tv_sec + ((float)t1.tv_usec/1000000));
-                if (elapsed >= 60) {
-                        printf("%s:\tFinished %-15s(%.2f min)\n",
-                               timestamp(), str, elapsed / 60);
-                } else {
-                        printf("%s:\tFinished %-15s(%.3f sec)\n",
-		               timestamp(), str, elapsed);
-
-                }
-                fflush(stdout);
-        }
-}
-
-void dump_diff(char *orig_buf, char *buf, int size, long _off)
-{
-        int i, diff, off;
-        char *p, *end;
-
-        printf("commpared buf size %d, at offset %lu\n\n", size, _off);
-
-        if (orig_buf) {
-                printf("original buf:\n");
-                p = orig_buf;
-                end = orig_buf + size;
-                i = 1;
-                while (p < end) {
-                        printf(" %8lx", *(long *)p);
-                        p += sizeof(long);
-                        if (i++%8 == 0)
-                                printf("\n");
-                }
-                if (i%8) printf("\n\n");
-                else printf("\n");
-        }
-
-        if (buf) {
-                printf("different data: diff_data(orig_data)\n");
-                diff = 0;
-                off = 0;
-                i = 1;
-                p = buf;
-                end = buf + size;
-                while (p < end) {
-                        if (memcmp(p, orig_buf + off, sizeof(long)) != 0) {
-                                printf("\toff: %5d,\tdata: %8lx (%8lx)\n", off,
-                                       *(unsigned long *)p,
-                                       *(unsigned long *)(orig_buf + off));
-                                diff++;
-                        }
-                        off += sizeof(long);
-                        p += sizeof(long);
-                }
-                printf("\n %d total differents found\n\n", diff);
-        }
-}
-
-void lp_gethostname(void)
-{
-        if (gethostname(hostname, 1024) == -1) {
-                fprintf(stderr, "gethostname: (%d)%s", errno, strerror(errno));
-                MPI_Abort(MPI_COMM_WORLD, 2);
-        }
-}
-
-/* This function does not FAIL if the requested "name" does not exit.
- * This is just to clean up any files or directories left over from
- * previous runs
- */
-void remove_file_or_dir(char *name)
-{
-        struct stat statbuf;
-        char errmsg[MAX_FILENAME_LEN + 20];
-
-        if (stat(name, &statbuf) != -1) {
-                if (S_ISREG(statbuf.st_mode)) {
-                        printf("stale file found\n");
-                        if (unlink(name) == -1) {
-                                sprintf(errmsg, "unlink of %s", name);
-                                FAIL(errmsg);
-                        }
-                }
-                if (S_ISDIR(statbuf.st_mode)) {
-                        printf("stale directory found\n");
-                        if (rmdir(name) == -1) {
-                                sprintf(errmsg, "rmdir of %s", name);
-                                FAIL(errmsg);
-                        }
-                }
-        }
-}
-
-void create_file(char *name, long filesize, int fill)
-{
-        static char filename[MAX_FILENAME_LEN];
-        char errmsg[MAX_FILENAME_LEN + 20];
-        char buf[1024 * 8];
-        char c = 'A' + size;
-        int fd, rc;
-        short zero = 0;
-        long left = filesize;
-
-        /* Process 0 creates the test file(s) */
-        if (rank == 0) {
-                sprintf(filename, "%s/%s", testdir, name);
-                remove_file_or_dir(filename);
-                if ((fd = creat(filename, FILEMODE)) == -1) {
-                        sprintf(errmsg, "create of file %s", filename);
-                        FAIL(errmsg);
-                }
-                if (filesize > 0) {
-                        if (lseek(fd, filesize - 1, SEEK_SET) == -1) {
-                                close(fd);
-                                sprintf(errmsg, "lseek of file %s", filename);
-                                FAIL(errmsg);
-                        }
-                        if (write(fd, &zero, 1) == -1) {
-                                close(fd);
-                                sprintf(errmsg, "write of file %s", filename);
-                                FAIL(errmsg);
-                        }
-                }
-                if (filesize > 0 && fill) {
-                        if (lseek(fd, 0, SEEK_SET) == -1) {
-                                close(fd);
-                                sprintf(errmsg, "lseek of file %s", filename);
-                                FAIL(errmsg);
-                        }
-                        memset(buf, c, 1024);
-                        while (left > 0) {
-                                if ((rc = write(fd, buf,
-                                                left > (1024 * 8) ? (1024 * 8) : left))
-                                    == -1) {
-                                        close(fd);
-                                        sprintf(errmsg, "write of file %s", filename);
-                                        FAIL(errmsg);
-                                }
-                                left -= rc;
-                        }
-                }
-                if (close(fd) == -1) {
-                        sprintf(errmsg, "close of file %s", filename);
-                        FAIL(errmsg);
-                }
-        }
-}
-
-void check_stat(char *filename, struct stat *state, struct stat *old_state)
-{
-        char errmsg[MAX_FILENAME_LEN+20];
-
-        if (stat(filename, state) == -1) {
-                sprintf(errmsg, "stat of file %s", filename);
-                FAIL(errmsg);
-        }
-
-        if (memcmp(state, old_state, sizeof(struct stat)) != 0) {
-                errno = 0;
-                sprintf(errmsg, LP_STAT_FMT, LP_STAT_ARGS);
-                FAIL(errmsg);
-        }
-}
-
-void remove_file(char *name)
-{
-        char filename[MAX_FILENAME_LEN];
-        char errmsg[MAX_FILENAME_LEN + 20];
-
-        /* Process 0 remove the file(s) */
-        if (rank == 0) {
-                sprintf(filename, "%s/%s", testdir, name);
-                if (unlink(filename) == -1) {
-                        sprintf(errmsg, "unlink of file %s", filename);
-                        FAIL(errmsg);
-                }
-        }
-}
-
-void fill_stride(char *buf, int buf_size, long long rank, long long _off)
-{
-        char *p = buf;
-        long long off, data[2];
-        int cp, left = buf_size;
-
-        data[0] = rank;
-        off = _off;
-        while (left > 0) {
-                data[1] = off;
-                cp = left > sizeof(data) ? sizeof(data) : left;
-                memcpy(p, data, cp);
-                off += cp;
-                p += cp;
-                left -= cp;
-        }
-}
diff --git a/lustre/tests/lp_utils.h b/lustre/tests/lp_utils.h
deleted file mode 100644
index 993253aaf134a999a5bff8bd4b49abfd055dccc8..0000000000000000000000000000000000000000
--- a/lustre/tests/lp_utils.h
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: You Feng <youfeng@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#ifndef __LP_UTILS_H__
-#define __LP_UTILS_H__
-
-#include "lustre/lustre_user.h"
-
-#define FAIL(msg) \
- \
-do { \
-        printf("%s: Process %d (%s)\n", timestamp(), rank, hostname); \
-        if (debug) \
-                printf("\tFAILED in %s:%d:%s()\n", __FILE__, __LINE__, __func__); \
-        else \
-                printf("\tFAILED in %s()\n", __func__); \
-        printf("%s", msg); \
-        fflush(stdout); \
-        MPI_Abort(MPI_COMM_WORLD, 1); \
-} while(0)
-
-#define FILEMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH
-#define MAX_FILENAME_LEN 512
-
-extern int verbose;
-extern int debug;
-
-extern int rank;
-extern int size;
-
-extern char hostname[];
-extern char *timestamp();
-extern char *testdir;
-
-extern inline void begin(char *str);
-extern inline void end(char *str);
-
-extern void dump_diff(char *orig_buf, char *buf, int len, long off);
-extern void lp_gethostname(void);
-
-extern void create_file(char *name, long filesize, int fill);
-extern void fill_file(char *name, long filesize);
-
-#define LP_STAT_FMT \
- \
-"Stat error:\n \
-\tfields\t\tvalue\told value\n \
-\tst_dev\t\t%d\t%d\n \
-\tst_ino\t\t%d\t%d\n \
-\tst_mode\t\t%o\t%o\n \
-\tst_nlink\t%d\t%d\n \
-\tst_uid\t\t%d\t%d\n \
-\tst_gid\t\t%d\t%d\n \
-\tst_rdev\t\t%x.%x\t%x.%x\n \
-\tst_size\t\t%lu\t%lu\n \
-\tst_blksize\t%d\t%d\n \
-\tst_blocks\t%u\t%u\n \
-\tst_atime\t%d\t%d\n \
-\tst_mtime\t%d\t%d\n \
-\tst_ctime\t%d\t%d\n"
-                                                                                
-#define LP_STAT_ARGS \
- \
-(int)state->st_dev, (int)old_state->st_dev, \
-(int)state->st_ino, (int)old_state->st_ino, \
-state->st_mode & 07777, old_state->st_mode & 07777, \
-(int)state->st_nlink, (int)old_state->st_nlink, \
-state->st_uid, old_state->st_uid, \
-state->st_gid, old_state->st_gid, \
-(int)((state->st_rdev >> 8) & 0xff), (int)(state->st_rdev & 0xff), \
-(int)((old_state->st_rdev >> 8) & 0xff), (int)(old_state->st_rdev & 0xff), \
-(unsigned long)state->st_size, (unsigned long)old_state->st_size, \
-(int)state->st_blksize, (int)old_state->st_blksize, \
-(unsigned int)state->st_blocks, (unsigned int)old_state->st_blocks, \
-(int)state->st_atime, (int)old_state->st_atime, \
-(int)state->st_mtime, (int)old_state->st_mtime, \
-(int)state->st_ctime, (int)old_state->st_ctime
-
-extern void check_stat(char *filename, struct stat *state, struct stat *old_state);
-extern void remove_file(char *name);
-extern void remove_file_or_dir(char *name);
-extern void fill_stride(char *buf, int buf_size, long long rank, long long _off);
-
-#endif /* __LP_UTILS_H__ */
diff --git a/lustre/tests/mcr.sh b/lustre/tests/mcr.sh
deleted file mode 100755
index 47773379b4901f4059ed816e68714dabbf9ccbd5..0000000000000000000000000000000000000000
--- a/lustre/tests/mcr.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-config=${1:-mcr.xml}
-
-LMC="../utils/lmc -m $config"
-
-# TCP/IP servers
-SERVERS="ba-ost-1  ba-ost-2"
-ROUTER=dev5
-
-# Elan clients
-CLIENT_LO=dev2
-CLIENT_HI=dev25
-
-TCPBUF=1048576
- 
-
-h2elan () {
-    echo $1 | sed 's/[^0-9]*//g'
-}
-
-h2tcp () {
-    echo "${1}"
-}
-
-[ -f $config ] && rm $config
-
-# Client node
-${LMC} --add net --node client --nid '*' --nettype elan || exit 1
-# Router node
-${LMC} --add net --router --node $ROUTER --tcpbuf $TCPBUF --nid `h2tcp $ROUTER` --nettype tcp || exit 1
-${LMC} --add net --node $ROUTER --nid `h2elan $ROUTER` --nettype elan|| exit 1
-${LMC} -m $config --add route --node $ROUTER --nettype elan --gw `h2elan $ROUTER` --lo `h2elan $CLIENT_LO` --hi `h2elan $CLIENT_HI` || exit 2
-
-for s in $SERVERS
- do
-   # server node
-   ${LMC} --add net --node $s --tcpbuf $TCPBUF --nid $s --nettype tcp || exit 1
-   # route to server
-   ${LMC} --add route --node $ROUTER --nettype tcp --gw `h2tcp $ROUTER` --lo $s || exit 2
-   # the device on the server
-   ${LMC} --add ost --node $s --obd obd_$s --obdtype=obdecho || exit 3
-   # attach to the device on the client (this would normally be a mount)
-   ${LMC} --add oscref --node client --osc  OSC_obd_$s || exit 4
-done
diff --git a/lustre/tests/mcreate.c b/lustre/tests/mcreate.c
deleted file mode 100644
index 9d48b11b11f8cc39e9e44b20f0ae4a2a87a8a6d4..0000000000000000000000000000000000000000
--- a/lustre/tests/mcreate.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int main(int argc, char ** argv)
-{
-        int rc;
-
-        if (argc < 2) {
-                printf("Usage %s filename\n", argv[0]);
-                return 1;
-        }
-
-        rc = mknod(argv[1], S_IFREG | 0644, 0);
-        if (rc) {
-                printf("mknod(%s) error: %s\n", argv[1], strerror(errno));
-        }
-        return rc;
-}
diff --git a/lustre/tests/memhog.c b/lustre/tests/memhog.c
deleted file mode 100644
index 11cb734e484d7475fb6e41e4c5a28d72fa57ea56..0000000000000000000000000000000000000000
--- a/lustre/tests/memhog.c
+++ /dev/null
@@ -1,108 +0,0 @@
-#include <sys/types.h>
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#define CHUNK (128 * 1024)
-
-void usage(const char *prog, FILE *out)
-{
-	fprintf(out, "usage: %s allocsize\n", prog);
-	fprintf(out, " allocsize is kbytes, or number[KMGP] (P = pages)\n");
-	exit(out == stderr);
-}
-
-int main(int argc, char *argv[])
-{
-	long long kbtotal = 0, kballoc;
-	int i, j, k, numchunk, alloc, sum, rc = 0;
-	char **mem, *tmp;
-
-	if (argc == 2) {
-		char *end = NULL;
-		kbtotal = strtoull(argv[1], &end, 0);
-
-		switch(*end) {
-		case 'g':
-		case 'G':
-			kbtotal *= 1024;
-		case 'm':
-		case 'M':
-			kbtotal *= 1024;
-		case '\0':
-		case 'k':
-		case 'K':
-			break;
-		case 'p':
-		case 'P':
-			kbtotal *= 4;
-			break;
-		default:
-			usage(argv[0], stderr);
-			break;
-		}
-	}
-
-	if (argc != 2 || kbtotal == 0)
-		usage(argv[0], stderr);
-
-	numchunk = (kbtotal + CHUNK - 1) / CHUNK;
-	mem = calloc(numchunk, sizeof(*mem));
-	if (mem == NULL) {
-		fprintf(stderr, "error allocating initial chunk array\n");
-		exit(-1);
-	}
-
-	alloc = CHUNK;
-	printf("[%d] allocating %lld kbytes in %u kbyte chunks\n",
-	       getpid(), kbtotal, alloc);
-	for (i = kballoc = 0; i < numchunk && alloc > 0; i++, kballoc += alloc){
-		if (kbtotal - kballoc < alloc)
-			alloc = kbtotal - kballoc;
-
-		while (alloc > 0 && (mem[i] = malloc(alloc * 1024)) == NULL) {
-			fprintf(stderr, "malloc(%u) failed (%lld/%lld)\n",
-				alloc * 1024, kballoc, kbtotal);
-			alloc /= 2;
-		}
-		if (alloc == 0)
-			break;
-
-		printf("touching %p ([%lld-%lld]/%lld)\n", mem[i], kballoc,
-		       kballoc + alloc - 1, kbtotal);
-		for (j = 0, tmp = mem[i]; j < alloc; j += 4) {
-			for (k = 0, sum = 0; k < 4095; k++, tmp++)
-				sum += *tmp;
-			*tmp = sum;
-		}
-	}
-	if (kballoc == 0)
-		exit(-2);
-
-	kbtotal = kballoc;
-	printf("touched %lld kbytes\n", kballoc);
-
-	alloc = CHUNK;
-	printf("verifying %lld kbytes in %u kbyte chunks\n", kbtotal, alloc);
-	for (i = kballoc = 0; i < numchunk; i++, kballoc += alloc) {
-		if (kbtotal - kballoc < alloc)
-			alloc = kbtotal - kballoc;
-
-		tmp = mem[i];
-		if (tmp != NULL) {
-			printf("verifying %p (%lld/%lld)\n",
-			       tmp, kballoc, kbtotal);
-			for (j = 0; j < alloc; j += 4) {
-				for (k = 0, sum = 0; k < 4095; k++, tmp++)
-					sum += *tmp;
-				if (*tmp != sum) {
-					fprintf(stderr, "sum %x != %x at %p\n",
-						*tmp, sum, tmp - 4092);
-					rc++;
-				}
-			}
-		}
-	}
-	printf("verified %lld kbytes\n", kballoc);
-	return rc;
-}
diff --git a/lustre/tests/mkdirdeep.c b/lustre/tests/mkdirdeep.c
deleted file mode 100644
index d5f1b276289c7e0a0a0827261b8e73b99a487cc2..0000000000000000000000000000000000000000
--- a/lustre/tests/mkdirdeep.c
+++ /dev/null
@@ -1,258 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Compile with:
- * cc -I../../lnet/include -o mkdirdeep mkdirdeep.c
- *    -L../../lnet/linux/utils -lptlctl
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <linux/limits.h>
-#include <libcfs/lltrace.h>
-
-static int opt_verbose = 0;
-static int opt_trace = 0;
-
-void usage(const char *pname)
-{
-        fprintf(stderr, "Usage: %s --depth <d> [--output <outputtracefilename>]"
-                " [--mknod] [--verbose] [--notrace] <basepath>\n", pname);
-        exit(1);
-}
-
-int do_mkdir(char *path)
-{
-        int rc = mkdir(path, 0755);
-
-        if (rc) {
-                fprintf(stderr, "mkdir(%s) failed: %s\n",
-                        path, strerror(errno));
-                exit(1);
-        }
-        if (opt_verbose)
-                printf("mkdir %s\n", path);
-
-        return rc;
-}
-
-
-int do_mknod(char *path)
-{
-        int rc = mknod(path, 0755, S_IFIFO);
-
-        if (rc) {
-                fprintf(stderr, "mkdir(%s) failed: %s\n",
-                        path, strerror(errno));
-                exit(1);
-        }
-        if (opt_verbose)
-                printf("mknod %s\n", path);
-
-        return rc;
-}
-
-int do_chdir(char* path)
-{
-        int rc = chdir(path);
-
-        if (rc) {
-                fprintf(stderr, "chdir(%s) failed: %s\n",
-                        path, strerror(errno));
-                exit(1);
-        }
-        if (opt_verbose)
-                printf("chdir %s\n", path);
-
-        return rc;
-}
-
-int do_stat(char *path)
-{
-        char mark_buf[PATH_MAX + 50];
-        struct stat mystat;
-        int rc = stat(path, &mystat);
-
-        if (rc) {
-                fprintf(stderr, "stat(%s) failed: %s\n",
-                        path, strerror(errno));
-                exit(1);
-        }
-        if (opt_verbose)
-                printf("stat %s = inode %lu\n", path,
-                       (unsigned long)mystat.st_ino);
-
-        if (opt_trace) {
-                snprintf(mark_buf, PATH_MAX, "stat %s = inode %lu",
-                         path, (unsigned long)mystat.st_ino);
-                ltrace_mark(0, mark_buf);
-        }
-
-        return rc;
-}
-
-int main(int argc, char** argv)
-{
-        int c, i, mypid;
-        int opt_depth = 1;
-        int opt_mknod = 0;
-
-        static struct option long_opt[] = {
-                {"depth", 1, 0, 'd' },
-                {"help", 0, 0, 'h' },
-                {"mknod", 0, 0, 'm' },
-                {"output", 1, 0, 'o' },
-                {"trace", 1, 0, 't' },
-                {"verbose", 0, 0, 'v' },
-                {0,0,0,0}
-        };
-
-        char *outputfilename = NULL;
-        char *base_pathname;
-        char pathname[PATH_MAX];
-        char mark_buf[PATH_MAX + 50];
-        char mycwd[PATH_MAX];
-        char *pname = argv[0];
-
-        while ((c = getopt_long(argc, argv, "d:mhvo:", long_opt, NULL)) != -1) {
-                switch (c) {
-                case 'd':
-                        opt_depth = atoi(optarg);
-                        if ((opt_depth == 0) || (opt_depth > 1100))
-                                usage(pname);
-                        break;
-                case 'm':
-                        opt_mknod = 1;
-                        break;
-                case 't':
-                        opt_trace = 1;
-                        break;
-                case 'v':
-                        opt_verbose = 1;
-                        break;
-                case 'o':
-                        outputfilename = optarg;
-                        break;
-                case 'h':
-                case '?':
-                case ':':
-                default:
-                        usage(pname);
-                        break;
-                }
-        }
-
-        if (optind != (argc - 1))
-                usage(pname);
-
-        base_pathname = argv[optind];
-        mypid = getpid();
-
-        if (!getcwd(&mycwd[0], sizeof(mycwd))) {
-                fprintf(stderr, "%s: unable to getcwd()\n", pname);
-                exit(1);
-        }
-
-        printf("%s(pid=%d) depth=%d mknod=%d, basepathname=%s, trace=%d\n",
-               pname, mypid, opt_depth, opt_mknod, base_pathname, opt_trace);
-
-        if (outputfilename)
-                printf("outputfilename=%s\n", outputfilename);
-
-        if (opt_trace) {
-                ltrace_start();
-                ltrace_clear();
-                snprintf(mark_buf, PATH_MAX, "Initialize - mkdir %s; chdir %s",
-                         base_pathname, base_pathname);
-                ltrace_mark(2, mark_buf);
-        }
-
-        if (do_mkdir(base_pathname)!=0)
-                exit(1);
-        if (do_chdir(base_pathname)!=0)
-                exit(1);
-
-        /* Create directory tree with depth level of subdirectories */
-
-        if (opt_trace) {
-                snprintf(mark_buf, PATH_MAX,
-                         "Create Directory Tree (depth %d)", opt_depth);
-                ltrace_mark(2, mark_buf);
-        }
-
-        for (i = 0; i < opt_depth; i++) {
-                snprintf(pathname, sizeof(pathname), "%d", i + 1);
-
-                if (i == (opt_depth - 1)) {
-                        /* Last Iteration */
-
-                        if (opt_trace) {
-                                snprintf(mark_buf, PATH_MAX,
-                                         "Tree Leaf (%d) %s/stat", i,
-                                         (opt_mknod ? "mknod" : "mkdir"));
-                                ltrace_mark(3, mark_buf);
-                        }
-
-                        if (opt_mknod)
-                                do_mknod(pathname);
-                        else
-                                do_mkdir(pathname);
-                        /* Now stat it */
-                        do_stat(pathname);
-                } else {
-                        /* Not Leaf */
-
-                        if (opt_trace) {
-                                snprintf(mark_buf, sizeof(mark_buf),
-                                         "Tree Level (%d) mkdir/stat/chdir", i);
-                                ltrace_mark(3, mark_buf);
-                        }
-
-                        do_mkdir(pathname);
-                        do_stat(pathname);
-                        do_chdir(pathname);
-                }
-        }
-
-        /* Stat through directory tree with fullpaths */
-
-        if (opt_trace) {
-                snprintf(mark_buf, PATH_MAX, "Walk Directory Tree");
-                ltrace_mark(2, mark_buf);
-        }
-
-        do_chdir(base_pathname);
-
-        strncpy(pathname, base_pathname, sizeof(pathname));
-
-        c = strlen(base_pathname);
-        for (i = 0; i < opt_depth; i++) {
-                c += snprintf(pathname + c, sizeof(pathname) - c, "/%d", i+1);
-
-                if (opt_trace) {
-                        snprintf(mark_buf, PATH_MAX, "stat %s", pathname);
-                        ltrace_mark(2, mark_buf);
-                }
-
-                do_stat(pathname);
-        }
-
-        if (opt_trace && outputfilename) {
-                    ltrace_write_file(outputfilename);
-                    ltrace_add_processnames(outputfilename);
-                    ltrace_stop();
-        }
-
-        do_chdir(base_pathname);
-
-        printf("%s (pid=%d) done.\n", pname, mypid);
-
-        return 0;
-}
diff --git a/lustre/tests/mkdirmany.c b/lustre/tests/mkdirmany.c
deleted file mode 100755
index 0f7a1b6f3c1f554689f3db2a53340a5cfacb6f5c..0000000000000000000000000000000000000000
--- a/lustre/tests/mkdirmany.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int main(int argc, char ** argv)
-{
-        int i, rc = 0, count;
-        char dirname[4096];
-
-        if (argc < 3) {
-                printf("Usage %s dirnamebase count\n", argv[0]);
-                return 1;
-        }
-
-        if (strlen(argv[1]) > 4080) {
-                printf("name too long\n");
-                return 1;
-        }
-
-        count = strtoul(argv[2], NULL, 0);
-
-        for (i = 0; i < count; i++) {
-                sprintf(dirname, "%s-%d", argv[1], i);
-                rc = mkdir(dirname, 0444);
-                if (rc) {
-                        printf("mkdir(%s) error: %s\n",
-                               dirname, strerror(errno));
-                        break;
-                }
-		if ((i % 10000) == 0)
-		    printf(" - created %d (time %ld)\n", i, time(0));
-        }
-        return rc;
-}
diff --git a/lustre/tests/mlink.c b/lustre/tests/mlink.c
deleted file mode 100755
index 5688b9fe1c590d912856696bc49c91e93d6603b6..0000000000000000000000000000000000000000
--- a/lustre/tests/mlink.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int main(int argc, char ** argv)
-{
-        int rc;
-
-        if (argc < 3) { 
-                printf("Usage: %s file link\n", argv[0]);
-                return 1;
-        }
-
-        rc = link(argv[1], argv[2]);
-        if (rc) { 
-                printf("link(%s, %s) error: %s\n", argv[1], argv[2],
-		       strerror(errno));
-		return errno;
-        }
-	return 0;
-} 
diff --git a/lustre/tests/mmap_sanity.c b/lustre/tests/mmap_sanity.c
deleted file mode 100644
index f4d05957f77f9fd88cd08c1805c589084b23bd5d..0000000000000000000000000000000000000000
--- a/lustre/tests/mmap_sanity.c
+++ /dev/null
@@ -1,654 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/mman.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <netinet/in.h>
-#include <sys/socket.h>
-#include <netdb.h>
-#include <string.h>
-#include <sys/wait.h>
-
-char *dir = NULL, *dir2 = NULL;
-long page_size;
-char mmap_sanity[256];
-
-
-static void usage(void)
-{
-        printf("Usage: mmap_sanity -d dir [-m dir2]\n");
-        printf("       dir      lustre mount point\n");
-        printf("       dir2     another mount point\n");
-        exit(127);
-}
-
-static int remote_tst(int tc, char *mnt);
-static int mmap_run(int tc)
-{
-        pid_t child;
-        int rc = 0;
-
-        child = fork();
-        if (child < 0)
-                return errno;
-        else if (child)
-                return 0;
-
-        if (dir2 != NULL) {
-                rc = remote_tst(tc, dir2);
-        } else {
-                rc = EINVAL;
-                fprintf(stderr, "invalid argument!\n");
-        }
-        _exit(rc);
-}
-
-static int mmap_initialize(char *myself)
-{
-        char buf[1024], *file;
-        int fdr, fdw, count, rc = 0;
-        
-        page_size = sysconf(_SC_PAGESIZE);
-        if (page_size == -1) {
-                perror("sysconf(_SC_PAGESIZE)");
-                return errno;
-        }
-
-        /* copy myself to lustre for another client */
-        fdr = open(myself, O_RDONLY);
-        if (fdr < 0) {
-                perror(myself);
-                return EINVAL;
-        }
-        file = strrchr(myself, '/');
-        if (file == NULL) {
-                fprintf(stderr, "can't get test filename\n");
-                close(fdr);
-                return EINVAL;
-        }
-        file++;
-        sprintf(mmap_sanity, "%s/%s", dir, file);
-
-        fdw = open(mmap_sanity, O_CREAT|O_WRONLY, 0777);
-        if (fdw < 0) {
-                perror(mmap_sanity);
-                close(fdr);
-                return EINVAL;
-        }
-        while ((count = read(fdr, buf, sizeof(buf))) != 0) {
-                int writes;
-
-                if (count < 0) {
-                        perror("read()");
-                        rc = errno;
-                        break;
-                }
-                writes = write(fdw, buf, count);
-                if (writes != count) {
-                        perror("write()");
-                        rc = errno;
-                        break;
-                }
-        }
-        close(fdr);
-        close(fdw);
-        return rc;
-}
-
-static void mmap_finalize()
-{
-        unlink(mmap_sanity);
-}
-
-/* basic mmap operation on single node */
-static int mmap_tst1(char *mnt)
-{
-        char *ptr, mmap_file[256];
-        int region, fd, rc = 0;
-
-        region = page_size * 10;
-        sprintf(mmap_file, "%s/%s", mnt, "mmap_file1");
-        
-        if (unlink(mmap_file) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-
-        fd = open(mmap_file, O_CREAT|O_RDWR, 0600);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-        ftruncate(fd, region);
-
-        ptr = mmap(NULL, region, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-        memset(ptr, 'a', region);
-
-        munmap(ptr, region);
-out_close:
-        close(fd);
-        unlink(mmap_file);
-        return rc;
-}
-
-/* MAP_PRIVATE create a copy-on-write mmap */
-static int mmap_tst2(char *mnt)
-{
-        char *ptr, mmap_file[256], buf[256];
-        int fd, rc = 0;
-
-        sprintf(mmap_file, "%s/%s", mnt, "mmap_file2");
-
-        if (unlink(mmap_file) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-
-        fd = open(mmap_file, O_CREAT|O_RDWR, 0600);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-        ftruncate(fd, page_size);
-
-        ptr = mmap(NULL, page_size, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-        memcpy(ptr, "blah", strlen("blah"));
-
-        munmap(ptr, page_size);
-out_close:
-        close(fd);
-        if (rc)
-                return rc;
-
-        fd = open(mmap_file, O_RDONLY);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-        rc = read(fd, buf, sizeof(buf));
-        if (rc < 0) {
-                perror("read()");
-                rc = errno;
-                goto out_close;
-        }
-        rc = 0;
-        
-        if (strncmp("blah", buf, strlen("blah")) == 0) {
-                fprintf(stderr, "mmap write back with MAP_PRIVATE!\n");
-                rc = EFAULT;
-        }
-        close(fd);
-        unlink(mmap_file);
-        return rc;
-}
-
-/* concurrent mmap operations on two nodes */
-static int mmap_tst3(char *mnt)
-{
-        char *ptr, mmap_file[256];
-        int region, fd, rc = 0;
-
-        region = page_size * 100;
-        sprintf(mmap_file, "%s/%s", mnt, "mmap_file3");
-        
-        if (unlink(mmap_file) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-
-        fd = open(mmap_file, O_CREAT|O_RDWR, 0600);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-        ftruncate(fd, region);
-
-        ptr = mmap(NULL, region, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-
-        rc = mmap_run(3);
-        if (rc)
-                goto out_unmap;
-        
-        memset(ptr, 'a', region);
-        sleep(2);       /* wait for remote test finish */
-out_unmap:
-        munmap(ptr, region);
-out_close:
-        close(fd);
-        unlink(mmap_file);
-        return rc;
-}       
-
-static int remote_tst3(char *mnt)
-{
-        char *ptr, mmap_file[256];
-        int region, fd, rc = 0;
-
-        region = page_size * 100;
-        sprintf(mmap_file, "%s/%s", mnt, "mmap_file3");
-
-        fd = open(mmap_file, O_RDWR, 0600);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-
-        ptr = mmap(NULL, region, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-        memset(ptr, 'b', region);
-        memset(ptr, 'c', region);
-        
-        munmap(ptr, region);
-out_close:
-        close(fd);
-        return rc;
-}
-
-/* client1 write to file_4a from mmap()ed file_4b;
- * client2 write to file_4b from mmap()ed file_4a. */
-static int mmap_tst4(char *mnt)
-{
-        char *ptr, filea[256], fileb[256];
-        int region, fdr, fdw, rc = 0;
-
-        region = page_size * 100;
-        sprintf(filea, "%s/%s", mnt, "mmap_file_4a");
-        sprintf(fileb, "%s/%s", mnt, "mmap_file_4b");
-
-        if (unlink(filea) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-        if (unlink(fileb) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-
-        fdr = fdw = -1;
-        fdr = open(fileb, O_CREAT|O_RDWR, 0600);
-        if (fdr < 0) {
-                perror(fileb);
-                return errno;
-        }
-        ftruncate(fdr, region);
-        fdw = open(filea, O_CREAT|O_RDWR, 0600);
-        if (fdw < 0) {
-                perror(filea);
-                rc = errno;
-                goto out_close;
-        }
-        ftruncate(fdw, region);
-        
-        ptr = mmap(NULL, region, PROT_READ|PROT_WRITE, MAP_SHARED, fdr, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-
-        rc = mmap_run(4);
-        if (rc)
-                goto out_unmap;
-        
-        memset(ptr, '1', region);
-        
-        rc = write(fdw, ptr, region);
-        if (rc <= 0) {
-                perror("write()");
-                rc = errno;
-        } else
-                rc = 0;
-
-        sleep(2);       /* wait for remote test finish */
-out_unmap:
-        munmap(ptr, region);
-out_close:
-        if (fdr >= 0)
-                close(fdr);
-        if (fdw >= 0)
-                close(fdw);
-        unlink(filea);
-        unlink(fileb);
-        return rc;
-}
-
-static int remote_tst4(char *mnt)
-{
-        char *ptr, filea[256], fileb[256];
-        int region, fdr, fdw, rc = 0;
-
-        region = page_size * 100;
-        sprintf(filea, "%s/%s", mnt, "mmap_file_4a");
-        sprintf(fileb, "%s/%s", mnt, "mmap_file_4b");
-
-        fdr = fdw = -1;
-        fdr = open(filea, O_RDWR, 0600);
-        if (fdr < 0) {
-                perror(filea);
-                return errno;
-        }
-        fdw = open(fileb, O_RDWR, 0600);
-        if (fdw < 0) {
-                perror(fileb);
-                rc = errno;
-                goto out_close;
-        }
-
-        ptr = mmap(NULL, region, PROT_READ|PROT_WRITE, MAP_SHARED, fdr, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-
-        memset(ptr, '2', region);
-
-        rc = write(fdw, ptr, region);
-        if (rc <= 0) {
-                perror("write()");
-                rc = errno;
-        } else
-                rc = 0;
-     
-        munmap(ptr, region);
-out_close:
-        if (fdr >= 0)
-                close(fdr);
-        if (fdw >= 0)
-                close(fdw);
-        return rc;
-}
-
-static int cancel_lru_locks(char *prefix)
-{
-        char cmd[256], line[1024];
-        FILE *file;
-        pid_t child;
-        int len = 1024, rc = 0;
-
-        child = fork();
-        if (child < 0)
-                return errno;
-        else if (child) {
-                int status;
-                rc = waitpid(child, &status, WNOHANG);
-                if (rc == child)
-                        rc = 0;
-                return rc;
-        }
-
-        if (prefix)
-                sprintf(cmd, "ls /proc/fs/lustre/ldlm/namespaces/*/lru_size | grep -i %s", prefix);
-        else
-                sprintf(cmd, "ls /proc/fs/lustre/ldlm/namespaces/*/lru_size");
-
-        file = popen(cmd, "r");
-        if (file == NULL) {
-                perror("popen()");
-                return errno;
-        }
-
-        while (fgets(line, len, file)) {
-                FILE *f;
-
-                if (!strlen(line))
-                        continue;
-                /* trim newline character */
-                *(line + strlen(line) - 1) = '\0';
-                f = fopen(line, "w");
-                if (f == NULL) {
-                        perror("fopen()");
-                        rc = errno;
-                        break;
-                }
-                rc = fwrite("clear", strlen("clear") + 1, 1, f);
-                if (rc < 1) {
-                        perror("fwrite()");
-                        rc = errno;
-                        fclose(f);
-                        break;
-                }
-                fclose(f);
-        }
-
-        pclose(file);
-        _exit(rc);
-}
-
-/* don't dead lock while read/write file to/from the buffer which
- * mmaped to just this file */
-static int mmap_tst5(char *mnt)
-{
-        char *ptr, mmap_file[256];
-        int region, fd, off, rc = 0;
-
-        region = page_size * 40;
-        off = page_size * 10;
-        sprintf(mmap_file, "%s/%s", mnt, "mmap_file5");
-
-        if (unlink(mmap_file) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-
-        fd = open(mmap_file, O_CREAT|O_RDWR, 0600);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-        ftruncate(fd, region);
-
-        ptr = mmap(NULL, region, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out_close;
-        }
-        memset(ptr, 'a', region);
-
-        /* cancel unused locks */
-        rc = cancel_lru_locks("osc");
-        if (rc)
-                goto out_unmap;
-
-        /* read/write region of file and buffer should be overlap */
-        rc = read(fd, ptr + off, off * 2);
-        if (rc != off * 2) {
-                perror("read()");
-                rc = errno;
-                goto out_unmap;
-        }
-        rc = write(fd, ptr + off, off * 2);
-        if (rc != off * 2) {
-                perror("write()");
-                rc = errno;
-        }
-        rc = 0;
-out_unmap:
-        munmap(ptr, region);
-out_close:
-        close(fd);
-        unlink(mmap_file);
-        return rc;
-}
-
-/* mmap write to a file form client1 then mmap read from client2 */
-static int mmap_tst6(char *mnt)
-{
-        char mmap_file[256], mmap_file2[256];
-        char *ptr = NULL, *ptr2 = NULL;
-        int fd = 0, fd2 = 0, rc = 0;
-
-        sprintf(mmap_file, "%s/%s", mnt, "mmap_file6");
-        sprintf(mmap_file2, "%s/%s", dir2, "mmap_file6");
-        if (unlink(mmap_file) && errno != ENOENT) {
-                perror("unlink()");
-                return errno;
-        }
-
-        fd = open(mmap_file, O_CREAT|O_RDWR, 0600);
-        if (fd < 0) {
-                perror(mmap_file);
-                return errno;
-        }
-        ftruncate(fd, page_size);
-
-        fd2 = open(mmap_file2, O_RDWR, 0600);
-        if (fd2 < 0) {
-                perror(mmap_file2);
-                goto out;
-        }
-
-        ptr = mmap(NULL, page_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
-        if (ptr == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out;
-        }
-        
-        ptr2 = mmap(NULL, page_size, PROT_READ|PROT_WRITE, MAP_SHARED, fd2, 0);
-        if (ptr2 == MAP_FAILED) {
-                perror("mmap()");
-                rc = errno;
-                goto out;
-        }
-
-        rc = cancel_lru_locks("osc");
-        if (rc)
-                goto out;
-
-        memcpy(ptr, "blah", strlen("blah"));
-        if (strncmp(ptr, ptr2, strlen("blah"))) {
-                fprintf(stderr, "client2 mmap mismatch!\n");
-                rc = EFAULT;
-                goto out;
-        }
-        memcpy(ptr2, "foo", strlen("foo"));
-        if (strncmp(ptr, ptr2, strlen("foo"))) {
-                fprintf(stderr, "client1 mmap mismatch!\n");
-                rc = EFAULT;
-        }
-out:
-        if (ptr2)
-                munmap(ptr2, page_size);
-        if (ptr)
-                munmap(ptr, page_size);
-        if (fd2 > 0)
-                close(fd2);
-        if (fd > 0)
-                close(fd);
-        unlink(mmap_file);
-        return rc;
-}
-
-static int remote_tst(int tc, char *mnt)
-{
-        int rc = 0;
-        switch(tc) {
-        case 3:
-                rc = remote_tst3(mnt);
-                break;
-        case 4:
-                rc = remote_tst4(mnt);
-                break;
-        default:
-                fprintf(stderr, "wrong test case number %d\n", tc);
-                rc = EINVAL;
-                break;
-        }
-        return rc;
-}
-        
-struct test_case {
-        int     tc;                     /* test case number */
-        char    *desc;                  /* test description */
-        int     (* test_fn)(char *mnt); /* test function */
-        int     node_cnt;               /* node count */
-};
-
-struct test_case tests[] = {
-        { 1, "mmap test1: basic mmap operation", mmap_tst1, 1 },
-        { 2, "mmap test2: MAP_PRIVATE not write back", mmap_tst2, 1 },
-        { 3, "mmap test3: concurrent mmap ops on two nodes", mmap_tst3, 2 },
-        { 4, "mmap test4: c1 write to f1 from mmapped f2, " 
-             "c2 write to f1 from mmapped f1", mmap_tst4, 2 },
-        { 5, "mmap test5: read/write file to/from the buffer "
-             "which mmapped to just this file", mmap_tst5, 1 },
-        { 6, "mmap test6: check mmap write/read content on two nodes", 
-                mmap_tst6, 2 },
-        { 0, NULL, 0, 0 }
-};
-
-int main(int argc, char **argv)
-{
-        extern char *optarg;
-        struct test_case *test;
-        int c, rc = 0;
-
-        for(;;) {
-                c = getopt(argc, argv, "d:m:");
-                if ( c == -1 )
-                        break;
-
-                switch(c) {
-                        case 'd':
-                                dir = optarg;
-                                break;
-                        case 'm':
-                                dir2 = optarg;
-                                break;
-                        default:
-                        case '?':
-                                usage();
-                                break;
-                }
-        }
-
-        if (dir == NULL)
-                usage();
-
-        if (mmap_initialize(argv[0]) != 0) {
-                fprintf(stderr, "mmap_initialize failed!\n");
-                return EINVAL;
-        }
-
-        for (test = tests; test->tc; test++) {
-                char *rs = "skip";
-                rc = 0;
-                if (test->node_cnt == 1 || dir2 != NULL) {
-                        rc = test->test_fn(dir);
-                        rs = rc ? "fail" : "pass";
-                }
-                fprintf(stderr, "%s (%s)\n", test->desc, rs);
-                if (rc)
-                        break;
-        }
-
-        mmap_finalize();
-        return rc;
-}
diff --git a/lustre/tests/mrename.c b/lustre/tests/mrename.c
deleted file mode 100644
index 1c188806293403ff6f4becc072e8af553aa3fe6b..0000000000000000000000000000000000000000
--- a/lustre/tests/mrename.c
+++ /dev/null
@@ -1,19 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-
-int main(int argc, char *argv[])
-{
-	int rc;
-
-	if (argc != 3) {
-		fprintf(stderr, "usage: %s from to\n", argv[0]);
-		exit(1);
-	}
-
-	rc = rename(argv[1], argv[2]);
-	printf("rename returned %d: %s\n", rc, strerror(errno));
-
-	return rc;
-}
diff --git a/lustre/tests/multifstat.c b/lustre/tests/multifstat.c
deleted file mode 100644
index b3d6479b1c961a2ed441828838b7eeb02a877039..0000000000000000000000000000000000000000
--- a/lustre/tests/multifstat.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-
-int main(int argc, char **argv)
-{
-        int fd1, fd2;
-        struct stat st1, st2;
-
-        if (argc != 3) {
-                printf("Usage %s file1 file2\n", argv[0]);
-                return 1;
-        }
-
-
-        fd1 = open(argv[1], O_CREAT| O_RDWR, 0666);
-        if (fd1 == -1) {
-                printf("Error opening %s: %s\n", argv[1], strerror(errno));
-                return errno;
-        }
-
-        fd2 = open(argv[2], O_RDONLY);
-        if (fd2 == -1) {
-                printf("Error opening %s: %s\n", argv[2], strerror(errno));
-                return errno;
-        }
-
-        sleep(1);
-
-        if ( write(fd1, "hello", strlen("hello")) != strlen("hello")) {
-                printf("Error writing: %s\n", strerror(errno));
-                return errno;
-        }
-
-        if ( fstat(fd1, &st1) ) {
-                printf("Error statting %s: %s\n", argv[1], strerror(errno));
-                return errno;
-        }
-
-        if ( fstat(fd2, &st2) ) {
-                printf("Error statting %s: %s\n", argv[2], strerror(errno));
-                return errno;
-        }
-
-        if ( st1.st_size != st2.st_size ) {
-                printf("Sizes don't match %lu, %lu\n",
-                       (unsigned long)st1.st_size, 
-		       (unsigned long)st2.st_size);
-                return 1;
-        }
-
-        if ( st1.st_mtime != st2.st_mtime ) {
-                printf("Mtimes don't match %ld, %ld\n",
-                       st1.st_mtime, st2.st_mtime);
-                return 1;
-        }
-
-        return 0;
-}
diff --git a/lustre/tests/multiop.c b/lustre/tests/multiop.c
deleted file mode 100755
index 3bd2128b1fcc1f2a7ffcaed1334d65438b691a15..0000000000000000000000000000000000000000
--- a/lustre/tests/multiop.c
+++ /dev/null
@@ -1,425 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE /* pull in O_DIRECTORY in bits/fcntl.h */
-#endif
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mman.h>
-#include <signal.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <lustre/liblustreapi.h>
-
-#define T1 "write data before unlink\n"
-#define T2 "write data after unlink\n"
-char msg[] = "yabba dabba doo, I'm coming for you, I live in a shoe, I don't know what to do.\n'Bigger, bigger,and bigger yet!' cried the Creator.  'You are not yet substantial enough for my boundless intents!'  And ever greater and greater the object became, until all was lost 'neath its momentus bulk.\n";
-char *buf, *buf_align;
-int bufsize = 0;
-#define ALIGN 65535
-
-char usage[] = 
-"Usage: %s filename command-sequence\n"
-"    command-sequence items:\n"
-"        c  close\n"
-"        C[num] create with optional stripes\n"
-"        d  mkdir\n"
-"        D  open(O_DIRECTORY)\n"
-"        L  link\n"
-"        l  symlink\n"
-"        m  mknod\n"
-"        M  rw mmap to EOF (must open and stat prior)\n"
-"        N  rename\n"
-"        o  open(O_RDONLY)\n"
-"        O  open(O_CREAT|O_RDWR)\n"
-"        r[num] read [optional length]\n"
-"        R  reference entire mmap-ed region\n"
-"        s  stat\n"
-"        S  fstat\n"
-"        t  fchmod\n"
-"        T[num] ftruncate [optional position, default 0]\n"
-"        u  unlink\n"
-"        U  munmap\n"
-"        w[num] write optional length\n"
-"        W  write entire mmap-ed region\n"
-"        y  fsync\n"
-"        Y  fdatasync\n"
-"        z[num] seek [optional position, default 0]\n"
-"        _  wait for signal\n";
-
-static int usr1_received;
-void usr1_handler(int unused)
-{
-        usr1_received = 1;
-}
-
-static const char *
-pop_arg(int argc, char *argv[])
-{
-        static int cur_arg = 3;
-
-        if (cur_arg >= argc)
-                return NULL;
-
-        return argv[cur_arg++];
-}
-
-struct flag_mapping {
-       const char *string;
-       const int  flag;
-} flag_table[] = {
-       {"O_RDONLY", O_RDONLY},
-       {"O_WRONLY", O_WRONLY},
-       {"O_RDWR", O_RDWR},
-       {"O_CREAT", O_CREAT},
-       {"O_EXCL", O_EXCL},
-       {"O_NOCTTY", O_NOCTTY},
-       {"O_TRUNC", O_TRUNC},
-       {"O_APPEND", O_APPEND},
-       {"O_NONBLOCK", O_NONBLOCK},
-       {"O_NDELAY", O_NDELAY},
-       {"O_SYNC", O_SYNC},
-#ifdef O_DIRECT
-       {"O_DIRECT", O_DIRECT},
-#endif
-       {"O_LARGEFILE", O_LARGEFILE},
-       {"O_DIRECTORY", O_DIRECTORY},
-       {"O_NOFOLLOW", O_NOFOLLOW},
-       {"", -1}
-};
-
-int get_flags(char *data, int *rflags)
-{
-        char *cloned_flags;
-        char *tmp;
-        int flag_set = 0;
-        int flags = 0;
-        int size = 0;
-
-        cloned_flags = strdup(data);
-        if (cloned_flags == NULL) {
-                fprintf(stderr, "Insufficient memory.\n");
-                exit(-1);
-        }
-
-        for (tmp = strtok(cloned_flags, ":"); tmp;
-             tmp = strtok(NULL, ":")) {
-                int i;
-
-                size = tmp - cloned_flags;
-                for (i = 0; flag_table[i].flag != -1; i++) {
-                        if (!strcmp(tmp, flag_table[i].string)){
-                                flags |= flag_table[i].flag;
-                                size += strlen(flag_table[i].string);
-                                flag_set = 1;
-                                break;
-                        }
-                }
-        }
-        free(cloned_flags);
-
-        if (!flag_set) {
-                *rflags = O_RDONLY;
-                return 0;
-        }
-
-        *rflags = flags;
-        return size;
-}
-
-#define POP_ARG() (pop_arg(argc, argv))
-#define min(a,b) ((a)>(b)?(b):(a))
-
-int main(int argc, char **argv)
-{
-        char *fname, *commands;
-        const char *newfile;
-        struct stat st;
-        size_t mmap_len = 0, i;
-        unsigned char *mmap_ptr = NULL, junk = 0;
-        int rc, len, fd = -1;
-        int flags;
-        int save_errno;
-        int verbose = 0;
-
-        if (argc < 3) {
-                fprintf(stderr, usage, argv[0]);
-                exit(1);
-        }
-
-        signal(SIGUSR1, usr1_handler);
-
-        fname = argv[1];
-
-        for (commands = argv[2]; *commands; commands++) {
-                switch (*commands) {
-                case '_':
-                        if (usr1_received == 0) {
-                                if (verbose) {
-                                        printf("PAUSING\n");
-                                        fflush(stdout);
-                                }
-                                pause();
-                        }
-                        usr1_received = 0;
-                        signal(SIGUSR1, usr1_handler);
-                        break;
-                case 'c':
-                        if (close(fd) == -1) {
-                                save_errno = errno;
-                                perror("close");
-                                exit(save_errno);
-                        }
-                        fd = -1;
-                        break;
-                case 'C':
-                        len = atoi(commands+1);
-                        fd = llapi_file_open(fname, O_CREAT | O_WRONLY, 0644,
-                                             0, 0, len, 0);
-                        if (fd == -1) {
-                                save_errno = errno;
-                                perror("create stripe file");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'd':
-                        if (mkdir(fname, 0755) == -1) {
-                                save_errno = errno;
-                                perror("mkdir(0755)");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'D':
-                        fd = open(fname, O_DIRECTORY);
-                        if (fd == -1) {
-                                save_errno = errno;
-                                perror("open(O_DIRECTORY)");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'l':
-                        newfile = POP_ARG();
-                        if (!newfile)
-                                newfile = fname;
-                        if (symlink(fname, newfile)) {
-                                save_errno = errno;
-                                perror("symlink()");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'L':
-                        newfile = POP_ARG();
-                        if (!newfile)
-                                newfile = fname;
-                        if (link(fname, newfile)) {
-                                save_errno = errno;
-                                perror("symlink()");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'm':
-                        if (mknod(fname, S_IFREG | 0644, 0) == -1) {
-                                save_errno = errno;
-                                perror("mknod(S_IFREG|0644, 0)");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'M':
-                        mmap_len = st.st_size;
-                        mmap_ptr = mmap(NULL, mmap_len, PROT_WRITE | PROT_READ,
-                                        MAP_SHARED, fd, 0);
-                        if (mmap_ptr == MAP_FAILED) {
-                                save_errno = errno;
-                                perror("mmap");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'N':
-                        newfile = POP_ARG();
-                        if (!newfile)
-                                newfile = fname;
-                        if (rename (fname, newfile)) {
-                                save_errno = errno;
-                                perror("rename()");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'O':
-                        fd = open(fname, O_CREAT|O_RDWR, 0644);
-                        if (fd == -1) {
-                                save_errno = errno;
-                                perror("open(O_RDWR|O_CREAT)");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'o':
-                        len = get_flags(commands+1, &flags);
-                        commands += len;
-                        fd = open(fname, flags);
-                        if (fd == -1) {
-                                save_errno = errno;
-                                perror("open");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'r':
-                        len = atoi(commands+1);
-                        if (len <= 0)
-                                len = 1;
-                        if (bufsize < len) {
-                                buf = realloc(buf, len + ALIGN);
-                                if (buf == NULL) {
-                                        save_errno = errno;
-                                        perror("allocating buf for read\n");
-                                        exit(save_errno);
-                                }
-                                bufsize = len;
-                                buf_align = (char *)((long)(buf + ALIGN) &
-                                                     ~ALIGN);
-                        }
-                        while (len > 0) {
-                                rc = read(fd, buf_align, len);
-                                if (rc == -1) {
-                                        save_errno = errno;
-                                        perror("read");
-                                        exit(save_errno);
-                                }
-                                if (rc < len)
-                                        fprintf(stderr, "short read: %u/%u\n",
-                                                rc, len);
-                                len -= rc;
-                        }
-                        break;
-                case 'R':
-                        for (i = 0; i < mmap_len && mmap_ptr; i += 4096)
-                                junk += mmap_ptr[i];
-                        break;
-                case 's':
-                        if (stat(fname, &st) == -1) {
-                                save_errno = errno;
-                                perror("stat");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'S':
-                        if (fstat(fd, &st) == -1) {
-                                save_errno = errno;
-                                perror("fstat");
-                                exit(save_errno);
-                        }
-                        break;
-                case 't':
-                        if (fchmod(fd, 0) == -1) {
-                                save_errno = errno;
-                                perror("fchmod");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'T':
-                        len = atoi(commands+1);
-                        if (ftruncate(fd, len) == -1) {
-                                save_errno = errno;
-                                printf("ftruncate (%d,%d)\n", fd, len);
-                                perror("ftruncate");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'u':
-                        if (unlink(fname) == -1) {
-                                save_errno = errno;
-                                perror("unlink");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'U':
-                        if (munmap(mmap_ptr, mmap_len)) {
-                                save_errno = errno;
-                                perror("munmap");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'v':
-                        verbose = 1;
-                        break;
-                case 'w':
-                        len = atoi(commands+1);
-                        if (len <= 0)
-                                len = 1;
-                        if (bufsize < len) {
-                                buf = realloc(buf, len + ALIGN);
-                                if (buf == NULL) {
-                                        save_errno = errno;
-                                        perror("allocating buf for write\n");
-                                        exit(save_errno);
-                                }
-                                bufsize = len;
-                                buf_align = (char *)((long)(buf + ALIGN) &
-                                                     ~ALIGN);
-                                strncpy(buf_align, msg, bufsize);
-                        }
-                        while (len > 0) {
-                                rc = write(fd, buf_align, len);
-                                if (rc == -1) {
-                                        save_errno = errno;
-                                        perror("write");
-                                        exit(save_errno);
-                                }
-                                if (rc < len)
-                                        fprintf(stderr, "short write: %u/%u\n",
-                                                rc, len);
-                                len -= rc;
-                        }
-                        break;
-                case 'W':
-                        for (i = 0; i < mmap_len && mmap_ptr; i += 4096)
-                                mmap_ptr[i] += junk++;
-                        break;
-                case 'y':
-                        if (fsync(fd) == -1) {
-                                save_errno = errno;
-                                perror("fsync");
-                                exit(save_errno);
-                        }
-                        break;
-                case 'Y':
-                        if (fdatasync(fd) == -1) {
-                                save_errno = errno;
-                                perror("fdatasync");
-                                exit(save_errno);
-                        }
-                case 'z':
-                        len = atoi(commands+1);
-                        if (lseek(fd, len, SEEK_SET) == -1) {
-                                save_errno = errno;
-                                perror("lseek");
-                                exit(save_errno);
-                        }
-                        break;
-                case '0':
-                case '1':
-                case '2':
-                case '3':
-                case '4':
-                case '5':
-                case '6':
-                case '7':
-                case '8':
-                case '9':
-                        break;
-                default:
-                        fprintf(stderr, "unknown command \"%c\"\n", *commands);
-                        fprintf(stderr, usage, argv[0]);
-                        exit(1);
-                }
-        }
-
-        if (buf)
-                free(buf);
-
-        return 0;
-}
diff --git a/lustre/tests/munlink.c b/lustre/tests/munlink.c
deleted file mode 100755
index 2390cd913bfdc052ce099c12c4f275cc5bdf6463..0000000000000000000000000000000000000000
--- a/lustre/tests/munlink.c
+++ /dev/null
@@ -1,35 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-int main(int argc, char ** argv)
-{
-        int rc = 0, i;
-
-        if (argc < 2) {
-                printf("Usage %s filename {filename ...}\n", argv[0]);
-                return 1;
-        }
-
-        for (i = 1; i < argc; i++) {
-                rc = unlink(argv[i]);
-                if (rc) {
-                        printf("unlink(%s): %s ", argv[i], strerror(errno));
-                        rc = access(argv[i], F_OK);
-                        if (rc && errno == ENOENT)
-                                printf("(unlinked anyways)\n");
-                        else if (rc == 0)
-                                printf("(still exists)\n");
-                        else
-                                printf("(%s looking up)\n", strerror(errno));
-                }
-        }
-        return rc;
-}
diff --git a/lustre/tests/o_directory.c b/lustre/tests/o_directory.c
deleted file mode 100644
index b587cd0a21099615d17fc6868cdc094181d0ade6..0000000000000000000000000000000000000000
--- a/lustre/tests/o_directory.c
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-/* for O_DIRECTORY */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-int main(int argc, char **argv)
-{
-        int fd, rc;
-
-        if (argc != 2) {
-                printf("Usage: %s <filename>\n", argv[0]);
-                exit(1);
-        }
-
-        fd = open(argv[1], O_RDONLY | O_CREAT, 0600);
-        if (fd == -1) {
-                printf("Error opening %s for create: %s\n", argv[1],
-                       strerror(errno));
-                exit(1);
-        }
-        rc = close(fd);
-        if (rc < 0) {
-                printf("Error closing %s: %s\n", argv[1], strerror(errno));
-                exit(1);
-        }
-
-        fd = open(argv[1], O_DIRECTORY);
-        if (fd >= 0) {
-                printf("opening %s as directory should have returned an "
-                       "error!\n", argv[1]);
-                exit(1);
-        }
-        if (errno != ENOTDIR) {
-                printf("opening %s as directory, expected -ENOTDIR and got "
-                       "%s\n", argv[1], strerror(errno));
-                exit(1);
-        }
-
-        return 0;
-}
diff --git a/lustre/tests/oos.sh b/lustre/tests/oos.sh
deleted file mode 100755
index 541a8607a0c2c3f65aae1a5f745a1b84331a5800..0000000000000000000000000000000000000000
--- a/lustre/tests/oos.sh
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/bash
-
-set -e
-#set -vx
-
-export PATH=`dirname $0`/../utils:$PATH
-LFS=${LFS:-lfs}
-MOUNT=${MOUNT:-$1}
-MOUNT=${MOUNT:-/mnt/lustre}
-OOS=$MOUNT/oosfile
-TMP=${TMP:-/tmp}
-LOG=$TMP/ooslog
-
-SUCCESS=1
-
-rm -f $OOS $LOG
-
-sync; sleep 1; sync	# to ensure we get up-to-date statfs info
-
-#echo -1 > /proc/sys/lnet/debug
-#echo 0x40a8 > /proc/sys/lnet/subsystem_debug
-#lctl clear
-#lctl debug_daemon start /r/tmp/debug 1024
-
-STRIPECOUNT=`cat /proc/fs/lustre/lov/*/activeobd | head -n 1`
-ORIGFREE=`cat /proc/fs/lustre/llite/*/kbytesavail | head -n 1`
-MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
-if [ $ORIGFREE -gt $MAXFREE ]; then
-	echo "skipping out-of-space test on $OSC"
-	echo "reports ${ORIGFREE}kB free, more than MAXFREE ${MAXFREE}kB"
-	echo "increase $MAXFREE (or reduce test fs size) to proceed"
-	exit 0
-fi
-
-export LANG=C LC_LANG=C # for "No space left on device" message
-
-[ -f $LOG ] && echo "ERROR: log file wasn't removed?" && exit 1
-
-# make sure we stripe over all OSTs to avoid OOS on only a subset of OSTs
-$LFS setstripe $OOS -c $STRIPECOUNT
-if dd if=/dev/zero of=$OOS count=$(($ORIGFREE + 100)) bs=1k 2> $LOG; then
-	echo "ERROR: dd did not fail"
-	SUCCESS=0
-fi
-
-if [ "`grep -c 'No space left on device' $LOG`" -ne 1 ]; then
-	echo "ERROR: dd not return ENOSPC"
-	sed "s/^/LOG: /" $LOG
-	SUCCESS=0
-fi
-
-# flush cache to OST(s) so avail numbers are correct
-sync; sleep 1 ; sync
-
-for OSC in /proc/fs/lustre/osc/*-osc-*; do
-	AVAIL=`cat $OSC/kbytesavail`
-	GRANT=$((`cat $OSC/cur_grant_bytes` / 1024))
-	echo -n "$(basename $OSC) avl=$AVAIL grnt=$GRANT diff=$(($AVAIL - $GRANT))"
-	[ $(($AVAIL - $GRANT)) -lt 400 ] && OSCFULL=full && echo -n " FULL"
-	echo " "
-done
-
-if [ -z "$OSCFULL" ]; then
-	echo "no OSTs are close to full"
-	grep "[0-9]" /proc/fs/lustre/osc/*-osc-*/{kbytesavail,cur*}
-	SUCCESS=0
-fi
-
-RECORDSOUT=`grep "records out" $LOG | cut -d + -f1`
-FILESIZE=`ls -l $OOS | awk '{ print $5 }'`
-if [ -z "$RECORDSOUT" ]; then
-	echo "ERROR: no blocks written by dd?"
-	sed "s/^/LOG: /" $LOG
-	SUCCESS=0
-elif [ "$RECORDSOUT" -ne $((FILESIZE / 1024)) ]; then
-	echo "ERROR: blocks written by dd not equal to the size of file"
-	SUCCESS=0
-fi
-
-#lctl debug_daemon stop
-
-rm -f $OOS
-sync; sleep 1; sync
-
-if [ $SUCCESS -eq 1 ]; then
-	echo "Success!"
-	rm -f $LOG
-else
-	exit 1
-fi
diff --git a/lustre/tests/oos2.sh b/lustre/tests/oos2.sh
deleted file mode 100644
index d3a405014e1ac03840f3dd40b3641bc277ad4be6..0000000000000000000000000000000000000000
--- a/lustre/tests/oos2.sh
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-set -e
-
-export PATH=`dirname $0`/../utils:$PATH
-LFS=${LFS:-lfs}
-MOUNT=${MOUNT:-$1}
-MOUNT=${MOUNT:-/mnt/lustre}
-MOUNT2=${MOUNT2:-$2}
-MOUNT2=${MOUNT2:-${MOUNT}2}
-OOS=$MOUNT/oosfile
-OOS2=$MOUNT2/oosfile2
-TMP=${TMP:-/tmp}
-LOG=$TMP/oosfile
-LOG2=${LOG}2
-
-SUCCESS=1
-
-rm -f $OOS $OOS2 $LOG $LOG2
-
-sync; sleep 1; sync	# to ensure we get up-to-date statfs info
-
-STRIPECOUNT=`cat /proc/fs/lustre/lov/*/activeobd | head -n 1`
-ORIGFREE=`cat /proc/fs/lustre/llite/*/kbytesavail | head -n 1`
-MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
-if [ $ORIGFREE -gt $MAXFREE ]; then
-	echo "skipping out-of-space test on $OSC"
-	echo "reports ${ORIGFREE}kB free, more tham MAXFREE ${MAXFREE}kB"
-	echo "increase $MAXFREE (or reduce test fs size) to proceed"
-	exit 0
-fi
-
-export LANG=C LC_LANG=C # for "No space left on device" message
-
-# make sure we stripe over all OSTs to avoid OOS on only a subset of OSTs
-$LFS setstripe $OOS -c $STRIPECOUNT
-$LFS setstripe $OOS2 -c $STRIPECOUNT
-dd if=/dev/zero of=$OOS count=$((3 * $ORIGFREE / 4 + 100)) bs=1k 2>> $LOG &
-DDPID=$!
-if dd if=/dev/zero of=$OOS2 count=$((3*$ORIGFREE/4 + 100)) bs=1k 2>> $LOG2; then
-	echo "ERROR: dd2 did not fail"
-	SUCCESS=0
-fi
-if wait $DDPID; then
-	echo "ERROR: dd did not fail"
-	SUCCESS=0
-fi
-
-if [ "`cat $LOG $LOG2 | grep -c 'No space left on device'`" -ne 2 ]; then
-        echo "ERROR: dd not return ENOSPC"
-	SUCCESS=0
-fi
-
-# flush cache to OST(s) so avail numbers are correct
-sync; sleep 1 ; sync
-
-for OSC in /proc/fs/lustre/osc/*-osc-*; do
-	AVAIL=`cat $OSC/kbytesavail`
-	GRANT=`cat $OSC/cur_grant_bytes`
-	[ $(($AVAIL - $GRANT / 1024)) -lt 400 ] && OSCFULL=full
-done
-
-# FIXME - This test reports false failures
-# The grants from multiple clients need to be added together and compared 
-# against the kbytesavail.
-#/proc/fs/lustre/osc/lustre-OST0001-osc-c3b04200/kbytesavail:16248
-#/proc/fs/lustre/osc/lustre-OST0001-osc-c3b04200/cur_grant_bytes:4313088
-#/proc/fs/lustre/osc/lustre-OST0001-osc-c3b04e00/cur_grant_bytes:12660736
-
-if [ -z "$OSCFULL" ]; then
-	echo "no OSTs are close to full"
-	grep "[0-9]" /proc/fs/lustre/osc/*-osc-*/{kbytesavail,cur*}|tee -a $LOG
-	SUCCESS=0
-fi
-
-RECORDSOUT=$((`grep "records out" $LOG | cut -d+ -f 1` + \
-              `grep "records out" $LOG2 | cut -d+ -f 1`))
-
-FILESIZE=$((`ls -l $OOS | awk '{print $5}'` + `ls -l $OOS2 | awk '{print $5}'`))
-if [ "$RECORDSOUT" -ne $(($FILESIZE / 1024)) ]; then
-        echo "ERROR: blocks written by dd not equal to the size of file"
-        SUCCESS=0
-fi
-
-rm -f $OOS $OOS2
-sync; sleep 1; sync
-
-if [ $SUCCESS -eq 1 ]; then
-	echo "Success!"
-	rm -f $LOG $LOG2
-else
-	exit 1
-fi
diff --git a/lustre/tests/openclose.c b/lustre/tests/openclose.c
deleted file mode 100644
index 6ca7af7f96facb5fcca72ec49756812894abdacf..0000000000000000000000000000000000000000
--- a/lustre/tests/openclose.c
+++ /dev/null
@@ -1,145 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-/* for O_DIRECT */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <sys/ioctl.h>
-
-#include <lustre/lustre_user.h>
-#ifndef O_DIRECT
-#define O_DIRECT 0
-#endif
-
-int main(int argc, char *argv[])
-{
-        char filename[1024];
-        unsigned long count, i;
-        int thread = 0;
-        int threads = 0;
-        int rc = 0;
-        int fd, ioctl_flags = 0;
-
-        if (argc < 3 || argc > 4) {
-                fprintf(stderr, "usage: %s <filename> <iterations> [threads]\n",
-                        argv[0]);
-                exit(1);
-        }
-
-        count = strtoul(argv[2], NULL, 0);
-        if (argc == 4)
-                threads = strtoul(argv[3], NULL, 0);
-
-        for (i = 1; i <= threads; i++) {
-                rc = fork();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: #%ld - %s\n", argv[0], i,
-                                strerror(rc = errno));
-                        break;
-                } else if (rc == 0) {
-                        thread = i;
-                        argv[2] = "--device";
-                        break;
-                } else
-                        printf("%s: thread #%ld (PID %d) started\n",
-                               argv[0], i, rc);
-                rc = 0;
-        }
-
-        if (threads && thread == 0) {        /* parent process */
-                int live_threads = threads;
-
-                while (live_threads > 0) {
-                        int status;
-                        pid_t ret;
-
-                        ret = waitpid(0, &status, 0);
-                        if (ret == 0)
-                                continue;
-
-                        if (ret < 0) {
-                                if (!rc)
-                                        rc = errno;
-                                fprintf(stderr, "error: %s: wait - %s\n",
-                                        argv[0], strerror(rc));
-                        } else {
-                                /*
-                                 * This is a hack.  We _should_ be able to use
-                                 * WIFEXITED(status) to see if there was an
-                                 * error, but it appears to be broken and it
-                                 * always returns 1 (OK).  See wait(2).
-                                 */
-                                int err = WEXITSTATUS(status);
-                                if (err || WIFSIGNALED(status))
-                                        fprintf(stderr,
-                                                "%s: PID %d had rc=%d\n",
-                                                argv[0], ret, err);
-                                if (!rc)
-                                        rc = err;
-                        }
-                        live_threads--;
-                }
-        } else {
-                if (threads)
-                        sprintf(filename, "%s-%d", argv[1], thread);
-                else
-                        strcpy(filename, argv[1]);
-
-                fd = open(filename, O_RDWR|O_CREAT, 0644);
-                if (fd < 0) {
-                        rc = errno;
-                        fprintf(stderr, "open(%s, O_CREAT): %s\n", filename,
-                                strerror(rc));
-                        exit(rc);
-                }
-                if (close(fd) < 0) {
-                        rc = errno;
-                        fprintf(stderr, "close(): %s\n", strerror(rc));
-                        goto unlink;
-                }
-
-                for (i = 0; i < count; i++) {
-                        fd = open(filename, O_RDWR|O_LARGEFILE|O_DIRECT);
-                        if (fd < 0) {
-                                rc = errno;
-                                fprintf(stderr, "open(%s, O_RDWR): %s\n",
-                                        filename, strerror(rc));
-                                break;
-                        }
-                        if (ioctl(fd, LL_IOC_SETFLAGS, &ioctl_flags) < 0 &&
-                            errno != ENOTTY) {
-                                rc = errno;
-                                fprintf(stderr, "ioctl(): %s\n", strerror(rc));
-                                break;
-                        }
-                        if (close(fd) < 0) {
-                                rc = errno;
-                                fprintf(stderr, "close(): %s\n", strerror(rc));
-                                break;
-                        }
-                }
-        unlink:
-                if (unlink(filename) < 0) {
-                        rc = errno;
-                        fprintf(stderr, "unlink(%s): %s\n", filename,
-                                strerror(rc));
-                }
-                if (threads)
-                        printf("Thread %d done: rc = %d\n", thread, rc);
-                else
-                        printf("Done: rc = %d\n", rc);
-        }
-        return rc;
-}
diff --git a/lustre/tests/opendevunlink.c b/lustre/tests/opendevunlink.c
deleted file mode 100644
index 15ac70836a1390bd99f0d9be1c4fefb65addc360..0000000000000000000000000000000000000000
--- a/lustre/tests/opendevunlink.c
+++ /dev/null
@@ -1,117 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
-        char *dname1, *dname2;
-        int fddev1, fddev2, rc;
-        //DIR *dp;
-        struct stat st1, st2;
-
-        if (argc < 2 || argc > 3) {
-                fprintf(stderr, "usage: %s filename1 [filename2]\n", argv[0]);
-                exit(1);
-        }
-
-        dname1 = argv[1];
-        if (argc == 3)
-                dname2 = argv[2];
-        else
-                dname2 = argv[1];
-
-        //create the special file (right now only test on pipe)
-        fprintf(stderr, "creating special file %s\n", dname1);
-        rc = mknod(dname1, 0777|S_IFIFO, 0);
-        if (rc == -1) {
-                fprintf(stderr, "creating %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        // open the special file again
-        fprintf(stderr, "opening file\n");
-        fddev1 = open(dname1, O_RDONLY | O_NONBLOCK);
-        if (fddev1 == -1) {
-                fprintf(stderr, "open %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        // doesn't matter if the two dirs are the same??
-        fddev2 = open(dname2, O_RDONLY | O_NONBLOCK);
-        if (fddev2 == -1) {
-                fprintf(stderr, "open %s fails: %s\n",
-                        dname2, strerror(errno));
-                exit(1);
-        }
-
-        // delete the special file
-        fprintf (stderr, "unlinking %s\n", dname1);
-        rc = unlink(dname1);
-        if (rc) {
-                fprintf(stderr, "unlink %s error: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        if (access(dname2, F_OK) == 0) {
-                fprintf(stderr, "%s still exists\n", dname2);
-                exit(1);
-        }
-
-        if (access(dname1, F_OK) == 0) {
-                fprintf(stderr, "%s still exists\n", dname1);
-                exit(1);
-        }
-
-        // fchmod one special file
-        rc = fchmod (fddev1, 0777);
-        if (rc == -1) {
-                fprintf(stderr, "fchmod unlinked special file %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        // fstat two files to check if they are the same
-        rc = fstat(fddev1, &st1);
-        if (rc == -1) {
-                fprintf(stderr, "fstat unlinked special file %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        rc = fstat(fddev2, &st2);
-        if (rc == -1) {
-                fprintf(stderr, "fstat file %s fails: %s\n",
-                        dname2, strerror(errno));
-                exit(1);
-        }
-
-#if 0
-        /* We cannot do this any longer, we do not store open special nodes
-         * on MDS after unlink */
-        if (st1.st_mode != st2.st_mode) {  // can we do this?
-                fprintf(stderr, "fstat different value on %s and %s\n",                                 dname1, dname2);
-                exit(1);
-        }
-#endif
-
-        fprintf(stderr, "Ok, everything goes well.\n");
-        return 0;
-}
-
diff --git a/lustre/tests/opendirunlink.c b/lustre/tests/opendirunlink.c
deleted file mode 100644
index f7ad30ff31d4dc21cc817c681072a20b34d87485..0000000000000000000000000000000000000000
--- a/lustre/tests/opendirunlink.c
+++ /dev/null
@@ -1,125 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-/* for O_DIRECTORY */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <string.h>
-
-int main(int argc, char **argv)
-{
-        char *dname1, *dname2;
-        int fddir1, fddir2, rc;
-        //DIR *dp;
-        struct stat st1, st2;
-
-        if (argc < 2 || argc > 3) {
-                fprintf(stderr, "usage: %s dirname1 [dirname2]\n", argv[0]);
-                exit(1);
-        }
-
-        dname1 = argv[1];
-        if (argc == 3)
-                dname2 = argv[2];
-        else
-                dname2 = argv[1];
-
-        //create the directory
-        fprintf(stderr, "creating directory %s\n", dname1);
-        rc = mkdir(dname1, 0744);
-        if (rc == -1) {
-                fprintf(stderr, "creating %s fails: %s\n", 
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        // open the dir again
-        fprintf(stderr, "opening directory\n");
-        fddir1 = open(dname1, O_RDONLY | O_DIRECTORY);
-        if (fddir1 == -1) {
-                fprintf(stderr, "open %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-        
-        // doesn't matter if the two dirs are the same??
-        fddir2 = open(dname2, O_RDONLY | O_DIRECTORY);
-        if (fddir2 == -1) {
-                fprintf(stderr, "open %s fails: %s\n",
-                        dname2, strerror(errno));
-                exit(1);
-        }
-        
-        // another method
-/*        
-        if ( (dp = opendir(dname2)) == NULL) {
-                fprintf(stderr, "opendir() %s\n", strerror(errno));
-                exit(1);
-        }
-        fddir = dirfd(dp);
-*/
-
-        // delete the dir
-        fprintf (stderr, "unlinking %s\n", dname1);
-        rc = rmdir(dname1);
-        if (rc) {
-                fprintf(stderr, "unlink %s error: %s\n", 
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        if (access(dname2, F_OK) == 0){
-                fprintf(stderr, "%s still exists\n", dname2);
-                exit(1);
-        }
-
-        if (access(dname1, F_OK) == 0){
-                fprintf(stderr, "%s still exists\n", dname1);
-                exit(1);
-        }
-
-        // fchmod the dir
-        rc = fchmod (fddir1, 0777);
-        if(rc == -1)
-        {
-                fprintf(stderr, "fchmod unlinked dir fails %s\n", 
-                        strerror(errno));
-                exit(1);
-        }
-                
-        // fstat two dirs to check if they are the same
-        rc = fstat(fddir1, &st1);
-        if(rc == -1)
-        {
-                fprintf(stderr, "fstat unlinked dir %s fails %s\n", 
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        rc = fstat(fddir2, &st2);
-        if (rc == -1) {
-                fprintf(stderr, "fstat dir %s fails %s\n",
-                        dname2, strerror(errno));
-                exit(1);
-        }
-
-        if (st1.st_mode != st2.st_mode) {  // can we do this?
-                fprintf(stderr, "fstat different value on %s and %s\n",                                 dname1, dname2);
-                exit(1);
-        }        
-
-        fprintf(stderr, "Ok, everything goes well.\n");
-        return 0;
-}
-
diff --git a/lustre/tests/openfile.c b/lustre/tests/openfile.c
deleted file mode 100644
index 66aba746891e0c341ec012366eca1cb3250ae498..0000000000000000000000000000000000000000
--- a/lustre/tests/openfile.c
+++ /dev/null
@@ -1,177 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-#if 0
-#define DEBUG
-#endif
-
-/* for O_DIRECTORY and O_DIRECT */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <lustre/lustre_user.h>
-
-typedef struct flag_mapping {
-       const char *string;
-       const int  flag;
-} FLAG_MAPPING;
-
-FLAG_MAPPING flag_table[] = {
-       {"O_RDONLY", O_RDONLY},
-       {"O_WRONLY", O_WRONLY},
-       {"O_RDWR", O_RDWR},
-       {"O_CREAT", O_CREAT},
-       {"O_EXCL", O_EXCL},
-       {"O_NOCTTY", O_NOCTTY},
-       {"O_TRUNC", O_TRUNC},
-       {"O_APPEND", O_APPEND},
-       {"O_NONBLOCK", O_NONBLOCK},
-       {"O_NDELAY", O_NDELAY},
-       {"O_SYNC", O_SYNC},
-#ifdef O_DIRECT
-       {"O_DIRECT", O_DIRECT},
-#endif
-       {"O_LARGEFILE", O_LARGEFILE},
-       {"O_DIRECTORY", O_DIRECTORY},
-       {"O_NOFOLLOW", O_NOFOLLOW},
-       {"O_LOV_DELAY_CREATE", O_LOV_DELAY_CREATE},
-       {"", -1}
-};
-
-void Usage_and_abort(void)
-{
-       fprintf(stderr, "Usage: openfile -f flags [ -m mode ] filename \n");
-       fprintf(stderr, "e.g. openfile -f O_RDWR:O_CREAT -m 0755 /etc/passwd\n");
-       exit(-1);
-}
-
-int main(int argc, char** argv)
-{
-        int    fd;
-        int    flags=0;
-        mode_t mode=0644;
-        char*  fname=NULL;
-        int    mode_set=0;
-        int    flag_set=0;
-        int    file_set=0;
-        int    c;
-        int    save_errno;
-        char*  cloned_flags = NULL;
-
-        if (argc == 1)
-                Usage_and_abort();
-
-        while ((c = getopt (argc, argv, "f:m:")) != -1) {
-                switch (c) {
-                case 'f': {
-                        char *tmp;
-
-                        cloned_flags = (char *)malloc(strlen(optarg)+1);
-                        if (cloned_flags == NULL) {
-                                fprintf(stderr, "Insufficient memory.\n");
-                                exit(-1);
-                        }
-
-                        strncpy(cloned_flags, optarg, strlen(optarg)+1);
-                        flags = atoi(cloned_flags);
-                        if (flags > 0) {
-                                flag_set = 1;
-#ifdef DEBUG
-                                printf("flags = %d\n",flags);
-#endif
-                                break;
-                        } else 
-                                flags = 0;
-                        
-                        for (tmp = strtok(cloned_flags, ":|"); tmp;
-                             tmp = strtok(NULL, ":|")) {
-                                int i = 0;
-#ifdef DEBUG
-                                printf("flags = %s\n",tmp);
-#endif
-                                flag_set = 1;
-                                for (i = 0; flag_table[i].flag != -1; i++) {
-                                        if (!strcmp(tmp, flag_table[i].string)){
-                                                flags |= flag_table[i].flag;
-                                                break;
-                                        }
-                                }
-
-                                if (flag_table[i].flag == -1) {
-                                        fprintf(stderr, "No such flag: %s\n",
-                                                tmp);
-                                        exit(-1);
-                                }
-                        }
-                        free(cloned_flags);
-#ifdef DEBUG
-                        printf("flags = %x\n", flags);
-#endif
-                        break;
-                }
-                case 'm':
-#ifdef DEBUG
-                        printf("mode = %s\n", optarg);
-#endif
-                        mode = strtol(optarg, NULL, 8);
-                        mode_set = 1;
-#ifdef DEBUG
-                        printf("mode = %o\n", mode);
-#endif
-                        break;
-                default:
-                        fprintf(stderr, "Bad parameters.\n");
-                        Usage_and_abort();
-                }
-        }
-
-        if (optind == argc) {
-                fprintf(stderr, "Bad parameters.\n");
-                Usage_and_abort();
-        }
-
-        fname = argv[optind];
-        file_set = 1;
-
-        if (!flag_set || !file_set) {
-                fprintf(stderr, "Missing flag or file-name\n");
-                exit(-1);
-        }
-
-
-        if (flags & O_CREAT)
-                fd = open(fname, flags, mode);
-        else
-                fd = open(fname, flags);
-
-        save_errno = errno;
-
-        if (fd != -1) {
-                printf("Succeed in opening file \"%s\"(flags=%s",
-                       fname, cloned_flags);
-
-                if (mode_set)
-                        printf(", mode=%o", mode);
-                printf(")\n");
-                close(fd);
-                return 0;
-        }
-
-        fprintf(stderr, "Error in opening file \"%s\"(flags=%s",
-                fname, cloned_flags);
-        if (mode_set)
-                fprintf(stderr, ", mode=%o", mode);
-        fprintf(stderr, ") %d: %s\n", save_errno, strerror(save_errno));
-
-        return save_errno;
-}
diff --git a/lustre/tests/openfilleddirunlink.c b/lustre/tests/openfilleddirunlink.c
deleted file mode 100644
index 9b07c649b8824fa8c0278f42b36c777097f7fb42..0000000000000000000000000000000000000000
--- a/lustre/tests/openfilleddirunlink.c
+++ /dev/null
@@ -1,81 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-/* for O_DIRECTORY */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-#include <string.h>
-
-char fname[1024];
-
-
-int main(int argc, char **argv)
-{
-        char *dname1;
-        int fddir1, rc;
-        int fd;
-
-        if (argc != 2) {
-                fprintf(stderr, "usage: %s dirname1\n", argv[0]);
-                exit(1);
-        }
-
-        dname1 = argv[1];
-
-        //create the directory
-        fprintf(stderr, "creating directory %s\n", dname1);
-        rc = mkdir(dname1, 0744);
-        if (rc == -1) {
-                fprintf(stderr, "creating %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        sprintf(fname, "%s/0", dname1);
-        fprintf(stderr, "creating file %s\n", fname);
-        fd = creat(fname, 0666);
-        if (fd < 0) {
-                fprintf(stderr, "creation %s fails: %s\n",
-                        fname, strerror(errno));
-                exit(1);
-        }
-        close(fd);
-
-        // open the dir again
-        fprintf(stderr, "opening directory\n");
-        fddir1 = open(dname1, O_RDONLY | O_DIRECTORY);
-        if (fddir1 == -1) {
-                fprintf(stderr, "open %s fails: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        // delete the dir
-        fprintf(stderr, "unlinking %s\n", dname1);
-        rc = rmdir(dname1);
-        if (rc == 0) {
-                fprintf(stderr, "unlinked non-empty %s successfully\n",
-                        dname1);
-                exit(1);
-        }
-
-        if (access(dname1, F_OK) != 0){
-                fprintf(stderr, "can't access %s: %s\n",
-                        dname1, strerror(errno));
-                exit(1);
-        }
-
-        fprintf(stderr, "Ok, everything goes well.\n");
-        return 0;
-}
diff --git a/lustre/tests/openme.c b/lustre/tests/openme.c
deleted file mode 100644
index 9a1f3f36386d8b720982509d52615cc591cbf187..0000000000000000000000000000000000000000
--- a/lustre/tests/openme.c
+++ /dev/null
@@ -1,23 +0,0 @@
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-
-int main(int argc, char **argv)
-{
-        int fd; 
-
-        if (argc != 2) { 
-                printf("Usage openme <filename>\n"); 
-                exit(1);
-        }
-
-        fd = open(argv[1], O_RDONLY | O_CREAT, 0600);
-        if (fd == -1) { 
-                printf("Error opening %s\n", argv[1]);
-                exit(1);
-        }
-
-        sleep(10000000); 
-        return 0;
-}
diff --git a/lustre/tests/openunlink.c b/lustre/tests/openunlink.c
deleted file mode 100644
index 4a0d8c3a67dd3fdeca7bc1f65acf16c0d070b815..0000000000000000000000000000000000000000
--- a/lustre/tests/openunlink.c
+++ /dev/null
@@ -1,155 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdio.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define T1 "write data before unlink\n"
-#define T2 "write data after unlink\n"
-char buf[128];
-
-int main(int argc, char **argv)
-{
-        char *fname, *fname2;
-        struct stat st;
-        int fd, rc;
-
-        if (argc < 2 || argc > 3) {
-                fprintf(stderr, "usage: %s filename [filename2]\n", argv[0]);
-                exit(1);
-        }
-
-        fname = argv[1];
-        if (argc == 3)
-                fname2 = argv[2];
-        else
-                fname2 = argv[1];
-
-        fprintf(stderr, "opening\n");
-        fd = open(fname, O_RDWR | O_TRUNC | O_CREAT, 0644);
-        if (fd == -1) {
-                fprintf(stderr, "open (normal) %s\n", strerror(errno));
-                exit(1);
-        }
-
-        fprintf(stderr, "writing\n");
-        rc = write(fd, T1, strlen(T1) + 1);
-        if (rc != strlen(T1) + 1) {
-                fprintf(stderr, "write (normal) %s (rc %d)\n",
-                        strerror(errno), rc);
-                exit(1);
-        }
-
-        if (argc == 3) {
-                fprintf (stderr, "unlinking %s\n", fname2);
-                rc = unlink(fname2);
-                if (rc) {
-                        fprintf(stderr, "unlink %s\n", strerror(errno));
-                        exit(1);
-                }
-        } else {
-                printf("unlink %s and press enter\n", fname);
-                getc(stdin);
-        }
-
-        if (access(fname, F_OK) == 0) {
-                fprintf(stderr, "%s still exists\n", fname2);
-                exit(1);
-        }
-
-        fprintf(stderr, "resetting fd offset\n");
-        rc = lseek(fd, 0, SEEK_SET);
-        if (rc) {
-                fprintf(stderr, "seek %s\n", strerror(errno));
-                exit(1);
-        }
-
-        if (access(fname, F_OK) == 0) {
-                fprintf(stderr, "%s still exists\n", fname);
-                exit(1);
-        }
-
-        fprintf(stderr, "fstat...\n");
-        rc = fstat(fd, &st);
-        if (rc) {
-                fprintf(stderr, "fstat (unlink) %s\n", strerror(errno));
-                exit(1);
-        }
-        if (st.st_nlink != 0)
-                fprintf(stderr, "st_nlink = %d\n", (int)st.st_nlink);
-
-        fprintf(stderr, "reading\n");
-        rc = read(fd, buf, strlen(T1) + 1);
-        if (rc != strlen(T1) + 1) {
-                fprintf(stderr, "read (unlink) %s (rc %d)\n",
-                        strerror(errno), rc);
-                exit(1);
-        }
-
-        fprintf(stderr, "comparing data\n");
-        if (memcmp(buf, T1, strlen(T1) + 1) ) {
-                fprintf(stderr, "FAILURE: read wrong data after unlink\n");
-                exit(1);
-        }
-
-        fprintf(stderr, "truncating\n");
-        rc = ftruncate(fd, 0);
-        if (rc) {
-                fprintf(stderr, "truncate (unlink) %s\n", strerror(errno));
-                exit(1);
-        }
-
-        fprintf(stderr, "seeking\n");
-        rc = lseek(fd, 0, SEEK_SET);
-        if (rc) {
-                fprintf(stderr, "seek (after unlink trunc) %s\n",
-                        strerror(errno));
-                exit(1);
-        }
-
-        fprintf(stderr, "writing again\n");
-        rc = write(fd, T2, strlen(T2) + 1);
-        if (rc != strlen(T2) + 1) {
-                fprintf(stderr, "write (after unlink trunc) %s (rc %d)\n",
-                        strerror(errno), rc);
-                exit(1);
-        }
-
-        fprintf(stderr, "seeking\n");
-        rc = lseek(fd, 0, SEEK_SET);
-        if (rc) {
-                fprintf(stderr, "seek (before unlink read) %s\n",
-                        strerror(errno));
-                exit(1);
-        }
-
-        fprintf(stderr, "reading again\n");
-        rc = read(fd, buf, strlen(T2) + 1);
-        if (rc != strlen(T2) + 1) {
-                fprintf(stderr, "read (after unlink rewrite) %s (rc %d)\n",
-                        strerror(errno), rc);
-                exit(1);
-        }
-
-        fprintf(stderr, "comparing data again\n");
-        if (memcmp(buf, T2, strlen(T2) + 1)) {
-                fprintf(stderr, "FAILURE: read wrong data after rewrite\n");
-                exit(1);
-        }
-
-        fprintf(stderr, "closing\n");
-        rc = close(fd);
-        if (rc) {
-                fprintf(stderr, "close (unlink) %s\n", strerror(errno));
-                exit(1);
-        }
-
-        fprintf(stderr, "SUCCESS - goto beer\n");
-        return 0;
-}
diff --git a/lustre/tests/ost_oos.sh b/lustre/tests/ost_oos.sh
deleted file mode 100644
index 73d1ec013d86834d5766284d150dfe3012cb3ee5..0000000000000000000000000000000000000000
--- a/lustre/tests/ost_oos.sh
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/bin/bash
-
-export NAME=${NAME:-local}
-export OSTSIZE=10000
-
-MOUNT=${MOUNT:-/mnt/lustre}
-
-echo "mnt.."
-sh llmount.sh
-echo "done"
-echo ""
-
-SUCCESS=1
-
-FREESPACE=`df |grep $MOUNT|tr -s ' '|cut -d ' ' -f4`
-
-rm -f /tmp/oosfile
-dd if=/dev/zero of=$MOUNT/oosfile count=$[$FREESPACE + 1] bs=1k 2>/tmp/oosfile
-
-RECORDSOUT=`grep "records out" /tmp/oosfile|cut -d + -f1`
-
-[ -z "`grep "No space left on device" /tmp/oosfile`" ] && \
-        echo "failed:dd not return ENOSPC" && SUCCESS=0
-
-[ $FREESPACE -lt $RECORDSOUT ] && \
-        echo "failed:the space written by dd larger than available space" && \
-        SUCCESS=0
-
-FILESIZE=`ls -l $MOUNT/oosfile|tr -s ' '|cut -d ' ' -f5`
-[ $RECORDSOUT -ne $[$FILESIZE/1024] ] && \
-        echo "failed:the space written by dd not equal to the size of file" && \
-        SUCCESS=0
-
-[ $SUCCESS -eq 1 ] && echo "Success!"
-
-rm -f $MOUNT/oosfile*
-rm -f /tmp/oosfile
-
-echo ""
-echo "cln.."
-sh llmountcleanup.sh
diff --git a/lustre/tests/parallel_grouplock.c b/lustre/tests/parallel_grouplock.c
deleted file mode 100644
index 2369209b95553d0e33fa58c5ba149efbb8a23b3d..0000000000000000000000000000000000000000
--- a/lustre/tests/parallel_grouplock.c
+++ /dev/null
@@ -1,899 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: You Feng <youfeng@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <mpi.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <time.h>
-#include <errno.h>
-#include <lustre/lustre_user.h>
-#include "lp_utils.h"
-
-#define LPGL_FILEN 700000
-#define LPGL_TEST_ITEMS 7
-
-#define MAX_GLHOST 4
-
-/* waiting time in 0.1 s */
-#define MAX_WAITING_TIME 20
-int rank = 0;
-int size = 0;
-
-char *testdir = NULL;
-
-/*
- * process1 attempts CW(gid=1) -- granted immediately
- * process2 attempts PR -- blocked, goes on waiting list
- * process3 attempts CW(gid=1) -> should be granted, but may go on
- *                                the waiting list
- */
-void grouplock_test1(char *filename, int fd, char *errmsg)
-{
-        int rc, count, gid = 1;
-        char buf[LPGL_FILEN];
-        char zeros[LPGL_FILEN];
-        MPI_Request req1, req2;
-        int temp1, temp2;
-
-        if (rank == 0) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        if (rank == 1) {
-                memset(zeros, 0x0, sizeof(zeros));
-                lseek(fd, 0, SEEK_SET);
-
-                MPI_Send(&gid, 1, MPI_INT, 2, 1, MPI_COMM_WORLD);
-                count = read(fd, buf, sizeof(buf));
-                if (count != sizeof(buf)) {
-                        if (count > 0)
-                                dump_diff(zeros, buf, count, 0);
-                        sprintf(errmsg, "read of file %s return %d",
-                                filename, count);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 2) {
-                int temp;
-
-                /* Wait for reading task to progress, this is probably somewhat
-                   racey, though, may be adding usleep here would make things
-                   better here. */
-                usleep(100);
-                MPI_Recv(&temp, 1, MPI_INT, 1, 1, MPI_COMM_WORLD,
-                         MPI_STATUS_IGNORE);
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1, flag2;
-                
-                /* reading task will tell us when it completes */
-                MPI_Irecv(&temp1, 1, MPI_INT, 1, 1, MPI_COMM_WORLD, &req1);
-                /* 2nd locking task will tell us when it completes */
-                MPI_Irecv(&temp2, 1, MPI_INT, 2, 1, MPI_COMM_WORLD, &req2);
-
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("2nd locking task is not progressing\n");
-                        }
-                        usleep(100);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                        if (flag1) {
-                                FAIL("PR task progressed even though GROUP lock"
-                                     " is held\n");
-                        }
-                } while (!flag2);
-        }
-
-        /* Now we need to release the lock */
-
-        if (rank == 0 || rank == 2) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1;
-                
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("reading task is not progressing even "
-                                     "though GROUP lock was released\n");
-                                break;
-                        }
-                        usleep(100);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                } while (!flag1);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-}
-
-/*
- * process1 attempts CW(gid=1) -- granted immediately
- * process2 attempts CW(gid=2) -- blocked
- * process3 attempts PR -- blocked
- * process4 attempts CW(gid=2) -- blocked
- * process1 releases CW(gid=1) -- this allows process2's CW lock to be granted
-                                  process3 remains blocked
- */
-void grouplock_test2(char *filename, int fd, char *errmsg)
-{
-        int rc, count, gid = 1;
-        char buf[LPGL_FILEN];
-        char zeros[LPGL_FILEN];
-        MPI_Request req1, req2, req3;
-        int temp1, temp2, temp3;
-
-        if (rank == 0) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        if (rank == 1 || rank == 3) {
-                gid = 2;
-                if (rank == 3) {
-                        MPI_Recv(&temp1, 1, MPI_INT, 2, 1, MPI_COMM_WORLD,
-                                 MPI_STATUS_IGNORE);
-                        usleep(100);
-                }
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 2) {
-                memset(zeros, 0x0, sizeof(zeros));
-                lseek(fd, 0, SEEK_SET);
-
-                MPI_Send(&gid, 1, MPI_INT, 3, 1, MPI_COMM_WORLD);
-                count = read(fd, buf, sizeof(buf));
-                if (count != sizeof(buf)) {
-                        if (count > 0)
-                                dump_diff(zeros, buf, count, 0);
-                        sprintf(errmsg, "read of file %s return %d",
-                                filename, count);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1, flag2, flag3;
-                
-                /* 2nd locking task will tell us when it completes */
-                MPI_Irecv(&temp1, 1, MPI_INT, 1, 1, MPI_COMM_WORLD, &req1);
-                /* 3nd locking task will tell us when it completes */
-                MPI_Irecv(&temp2, 1, MPI_INT, 3, 1, MPI_COMM_WORLD, &req2);
-                /* reading task will tell us when it completes */
-                MPI_Irecv(&temp3, 1, MPI_INT, 2, 1, MPI_COMM_WORLD, &req3);
-
-                do {
-                        iter--;
-                        usleep(100);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                        MPI_Test(&req3, &flag3, MPI_STATUS_IGNORE);
-                        if (flag3) {
-                                FAIL("PR task progressed even though GROUP lock"
-                                     " is held\n");
-                        }
-                        if (flag1 || flag2) {
-                                FAIL("GROUP (gid=2) task progressed even though"
-                                     " GROUP (gid=1) lock is held\n");
-                        }
-
-                } while (iter);
-
-                /* Now let's release first lock */
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                iter = MAX_WAITING_TIME;
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("GROUP(gid=2) tasks are not progressing\n");
-                        }
-                        usleep(100);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                        MPI_Test(&req3, &flag3, MPI_STATUS_IGNORE);
-                        if (flag3) {
-                                fprintf(stderr, "task1 %d, task3 %d\n", flag1,
-                                        flag2);
-                                FAIL("PR task progressed even though GROUP lock"
-                                     " was on the queue task\n");
-                        }
-                } while (!(flag1 && flag2));
-                MPI_Send(&gid, 1, MPI_INT, 1, 1, MPI_COMM_WORLD);
-                MPI_Send(&gid, 1, MPI_INT, 3, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 1 || rank == 3) {
-                /* Do not release the locks until task 0 is ready to watch
-                   for reading task only */
-                MPI_Recv(&temp1, 1, MPI_INT, 0, 1, MPI_COMM_WORLD,
-                         MPI_STATUS_IGNORE);
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag3;
-                
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("reading task is not progressing even "
-                                     "though GROUP locks are released\n");
-                                break;
-                        }
-                        usleep(100);
-                        MPI_Test(&req3, &flag3, MPI_STATUS_IGNORE);
-                } while (!flag3);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-}
-
-/*
- * process1 attempts CW(gid=1) -- granted
- * process2 attempts PR -- blocked
- * process3 attempts CW(gid=1) -> should be granted
- * process3 releases CW(gid=1)
- *   process2 should remain blocked
- * process1 releases CW(gid=1)
- *   process2's PR should be granted
- *
- * This is a lot like test1.
- */
-void grouplock_test3(char *filename, int fd, char *errmsg)
-{
-        int rc, count, gid = 1;
-        char buf[LPGL_FILEN];
-        char zeros[LPGL_FILEN];
-        MPI_Request req1, req2;
-        int temp1, temp2;
-
-        if (rank == 0) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        if (rank == 1) {
-                memset(zeros, 0x0, sizeof(zeros));
-                lseek(fd, 0, SEEK_SET);
-
-                MPI_Send(&gid, 1, MPI_INT, 2, 1, MPI_COMM_WORLD);
-                count = read(fd, buf, sizeof(buf));
-                if (count != sizeof(buf)) {
-                        if (count > 0)
-                                dump_diff(zeros, buf, count, 0);
-                        sprintf(errmsg, "read of file %s return %d",
-                                filename, count);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 2) {
-                int temp;
-
-                /* Wait for reading task to progress, this is probably somewhat
-                   racey, though, may be adding usleep here would make things
-                   better here. */
-                usleep(100);
-                MPI_Recv(&temp, 1, MPI_INT, 1, 1, MPI_COMM_WORLD,
-                         MPI_STATUS_IGNORE);
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1, flag2;
-                
-                /* reading task will tell us when it completes */
-                MPI_Irecv(&temp1, 1, MPI_INT, 1, 1, MPI_COMM_WORLD, &req1);
-                /* 2nd locking task will tell us when it completes */
-                MPI_Irecv(&temp2, 1, MPI_INT, 2, 1, MPI_COMM_WORLD, &req2);
-
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("2nd locking task is not progressing\n");
-                        }
-                        usleep(100);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                        if (flag1) {
-                                FAIL("PR task progressed even though GROUP lock"
-                                     " is held\n");
-                        }
-                } while (!flag2);
-        }
-
-        /* Now we need to release the lock */
-
-        if (rank == 2) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1;
-                
-                do {
-                        iter--;
-                        usleep(100);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                } while (!flag1 && iter);
-                if (iter) {
-                        FAIL("reading task is progressing even "
-                             "though GROUP lock was not fully released\n");
-                }
-
-                iter = MAX_WAITING_TIME;
-
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("reading task is not progressing even "
-                                     "though GROUP lock was released\n");
-                                break;
-                        }
-                        usleep(100);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                } while (!flag1);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-}
-
-/* 
- * process1 attempts CW(gid=1) -- granted
- * process2 attempts PR on non-blocking fd -> should return -EWOULDBLOCK
- * process3 attempts CW(gid=2) on non-blocking fd -> should return -EWOULDBLOCK
- */
-void grouplock_test4(char *filename, int fd, char *errmsg)
-{
-        int rc, count, gid = 1;
-        char buf[LPGL_FILEN];
-        char zeros[LPGL_FILEN];
-
-        if (rank == 0) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        if (rank == 1) {
-                memset(zeros, 0x0, sizeof(zeros));
-                lseek(fd, 0, SEEK_SET);
-
-                count = read(fd, buf, sizeof(buf));
-                if (count != sizeof(buf)) {
-                        if (count == -1 && errno == EWOULDBLOCK) {
-                                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-                                return;
-                        }
-
-                        if (count > 0)
-                                dump_diff(zeros, buf, count, 0);
-                        sprintf(errmsg, "read of file %s return %d",
-                                filename, count);
-                        FAIL(errmsg);
-                } else {
-                        FAIL("PR lock succeed while incompatible "
-                             "GROUP LOCK (gid=1) is still held\n");
-                }
-        }
-
-        if (rank == 2) {
-                gid = 2;
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        if (errno == EWOULDBLOCK) {
-                                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-                                return;
-                        }
-
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                } else {
-                        FAIL("GROUP_LOCK (gid=2) succeed while incompatible "
-                             "GROUP LOCK (gid=1) is still held\n");
-                }
-        }
-
-
-        if ( rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1, flag2;
-                MPI_Request req1, req2;
-                int temp1, temp2;
-                
-                /* reading task will tell us when it completes */
-                MPI_Irecv(&temp1, 1, MPI_INT, 1, 1, MPI_COMM_WORLD, &req1);
-                /* 2nd locking task will tell us when it completes */
-                MPI_Irecv(&temp2, 1, MPI_INT, 2, 1, MPI_COMM_WORLD, &req2);
-
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("non-blocking tasks are not progressing\n");
-                        }
-                        usleep(100);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                } while (!(flag2 && flag1));
-
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s", filename);
-                        FAIL(errmsg);
-                }
-        }
-}
-
-/*
- * process1 attempts CW(gid=1) -- granted
- * process2 attempts CW(gid=2) -- blocked
- * process3 attempts CW(gid=2) -- blocked
- * process1 releases CW(gid=1)
- *   process2's CW(gid=2) should be granted
- *   process3's CW(gid=2) should be granted
- *
- * This is pretty much like test 3
- */
-void grouplock_test5(char *filename, int fd, char *errmsg)
-{
-        int rc, count, gid = 1;
-        char buf[LPGL_FILEN];
-        char zeros[LPGL_FILEN];
-        MPI_Request req1, req2;
-        int temp1, temp2;
-
-        if (rank == 0) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        if (rank == 2 || rank == 1) {
-                gid = 2;
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                MPI_Send(&gid, 1, MPI_INT, 0, 1, MPI_COMM_WORLD);
-        }
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1, flag2;
-                
-                /* 3rd locking task will tell us when it completes */
-                MPI_Irecv(&temp1, 1, MPI_INT, 1, 1, MPI_COMM_WORLD, &req1);
-                /* 2nd locking task will tell us when it completes */
-                MPI_Irecv(&temp2, 1, MPI_INT, 2, 1, MPI_COMM_WORLD, &req2);
-
-                do {
-                        iter--;
-                        usleep(100);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                } while (!flag2 && !flag1 && iter);
-                if (iter) {
-                        FAIL("incomptible locking tasks are progressing\n");
-                }
-        }
-
-        /* Now we need to release the lock */
-
-        if (rank == 0) {
-                int iter = MAX_WAITING_TIME;
-                int flag1, flag2;
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-                
-                do {
-                        iter--;
-                        if (!iter) {
-                                FAIL("locking tasks are not progressing even "
-                                     "though incompatible lock released\n");
-                        }
-                        usleep(100);
-                        MPI_Test(&req1, &flag1, MPI_STATUS_IGNORE);
-                        MPI_Test(&req2, &flag2, MPI_STATUS_IGNORE);
-                } while (!(flag1 && flag2));
-
-        }
-
-        if ( rank == 1 || rank == 2) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-
-}
-
-/*
- * process1 attempts CW(gid=1) -- granted
- * process2 attempts PW -- blocked
- * process2 attempts CW(gid=2) -- blocked
- * process3 attempts CW(gid=2) -- blocked
- * process1 releases CW(gid=1)
- *   process2's CW(gid=2) should be granted
- *   process3's CW(gid=2) should be granted
- *
- * after process1 release CW(gid=1), there are two pathes:
- *   path 1. process2 get PW
- *   path 2. process3 get CW(gid=2)
- *
- * green: Also about test6 - by definition if P* and CW lock are waiting,
- *        CW lock have bigger priority and should be granted first when it becomes
- *        possible. So after process1 releases its CW lock, process3 should always
- *        get CW lock, and when it will release it, process 2 will proceed with read
- *        and then with getting CW lock
- *
- * XXX This test does not make any sence at all the way it is described right
- * now, hence disabled.
- */
-void grouplock_test6(char *filename, int fd, char *errmsg)
-{
-}
-
-/* Just test some error paths with invalid requests */
-void grouplock_errorstest(char *filename, int fd, char *errmsg)
-{
-        int gid = 1;
-        int rc;
-
-        /* To not do lots of separate tests with lots of fd opening/closing,
-           different parts of this test are performed in different processes */
-           
-        if (rank == 0 || rank == 1 ) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_LOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        /* second group lock on same fd, same gid */
-        if (rank == 0) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid)) == -1) {
-                        if (errno != EINVAL) {
-                                sprintf(errmsg, "Double GROUP lock failed with errno %d instead of EINVAL\n", errno);
-                                FAIL(errmsg);
-                        } 
-                } else {
-                        FAIL("Taking second GROUP lock on same fd succeed\n");
-                }
-        }
-
-        /* second group lock on same fd, different gid */
-        if (rank == 1) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_LOCK, gid + 1)) == -1) {
-                        if (errno != EINVAL) {
-                                sprintf(errmsg, "Double GROUP lock different gid failed with errno %d instead of EINVAL\n", errno);
-                                FAIL(errmsg);
-                        } 
-                } else {
-                        FAIL("Taking second GROUP lock on same fd, different gid, succeed\n");
-                }
-        }
-
-        /* GROUP unlock with wrong gid */
-        if (rank == 0 || rank == 1) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid + 1)) == -1) {
-                        if (errno != EINVAL) {
-                                sprintf(errmsg, "GROUP unlock with wrong gid failed with errno %d instead of EINVAL\n",
-                                        errno);
-                                FAIL(errmsg);
-                        } 
-                } else {
-                        FAIL("GROUP unlock with wrong gid succeed\n");
-                }
-        }
-
-        if (rank == 0 || rank == 1) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        sprintf(errmsg, "ioctl GROUP_UNLOCK of file %s return %d",
-                                filename, rc);
-                        FAIL(errmsg);
-                }
-        }
-
-        /* unlock of never locked fd */
-        if (rank == 2) {
-                if ((rc = ioctl(fd, LL_IOC_GROUP_UNLOCK, gid)) == -1) {
-                        if (errno != EINVAL) {
-                                sprintf(errmsg, "GROUP unlock on never locked fd failed with errno %d instead of EINVAL\n",
-                                        errno);
-                                FAIL(errmsg);
-                        } 
-                } else {
-                        FAIL("GROUP unlock on never locked fd succeed\n");
-                }
-        }
-}
-
-void grouplock_file(char *name, int items)
-{
-        int i, fd;
-        char filename[MAX_FILENAME_LEN];
-        char errmsg[MAX_FILENAME_LEN+20];
-
-        sprintf(filename, "%s/%s", testdir, name);
-
-        if (items == 4) {
-                if ((fd = open(filename, O_RDWR | O_NONBLOCK)) == -1) {
-                        sprintf(errmsg, "open of file %s", filename);
-                        FAIL(errmsg);
-                }
-        } else if ((fd = open(filename, O_RDWR)) == -1) {
-                sprintf(errmsg, "open of file %s", filename);
-                FAIL(errmsg);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        switch (items) {
-        case 1:
-                grouplock_test1(filename, fd, errmsg);
-                break;
-        case 2:
-                grouplock_test2(filename, fd, errmsg);
-                break;
-        case 3:
-                grouplock_test3(filename, fd, errmsg);
-                break;
-        case 4:
-                grouplock_test4(filename, fd, errmsg);
-                break;
-        case 5:
-                grouplock_test5(filename, fd, errmsg);
-                break;
-        case 6:
-                grouplock_test6(filename, fd, errmsg);
-                break;
-        case 7:
-                grouplock_errorstest(filename, fd, errmsg);
-                break;
-        default:
-                sprintf(errmsg, "wrong test case number %d (should be <= %d)",
-                        items, LPGL_TEST_ITEMS);
-                FAIL(errmsg);
-        }
-
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        if (close(fd) == -1) {
-                sprintf(errmsg, "close of file %s", filename);
-                FAIL(errmsg);
-        }
-
-}
-
-void parallel_grouplock(void)
-{
-        int i;
-
-        for (i = 1;i <= LPGL_TEST_ITEMS;++i) {
-                begin("setup");
-                create_file("parallel_grouplock", LPGL_FILEN, 0);
-                end("setup");
-
-                begin("test");
-                grouplock_file("parallel_grouplock", i);
-                end("test");
-
-                begin("cleanup");
-                remove_file("parallel_grouplock");
-                end("cleanup");
-        }
-}
-
-void usage(char *proc)
-{
-        int i;
-
-        if (rank == 0) {
-                printf("Usage: %s [-h] -d <testdir>\n", proc);
-                printf("           [-n \"13\"] [-v] [-V #] [-g]\n");
-                printf("\t-h: prints this help message\n");
-                printf("\t-d: the directory in which the tests will run\n");
-                printf("\t-n: repeat test # times\n");
-                printf("\t-v: increase the verbositly level by 1\n");
-                printf("\t-V: select a specific verbosity level\n");
-                printf("\t-g: debug mode\n");
-        }
-
-        MPI_Initialized(&i);
-        if (i) MPI_Finalize();
-        exit(0);
-}
-
-int main(int argc, char *argv[])
-{
-        char c;
-        int i, iterations = 1;
-        int tr = 1;
-
-        /* Check for -h parameter before MPI_Init so the binary can be
-           called directly, without, for instance, mpirun */
-        for (i = 1; i < argc; ++i) {
-                if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help"))
-                        usage(argv[0]);
-        }
-
-        MPI_Init(&argc, &argv);
-        MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-        MPI_Comm_size(MPI_COMM_WORLD, &size);
-
-//        MPI_Comm_set_attr(MPI_COMM_WORLD, MPI_WTIME_IS_GLOBAL, &tr);
-
-        /* Parse command line options */
-        while (1) {
-                c = getopt(argc, argv, "d:ghn:vV:");
-                if (c == -1)
-                        break;
-
-                switch (c) {
-                case 'd':
-                        testdir = optarg;
-                        break;
-                case 'g':
-                        debug = 1;
-                        break;
-                case 'h':
-                        usage(argv[0]);
-                        break;
-                case 'n':
-                        iterations = atoi(optarg);
-                        break;
-                case 'v':
-                        verbose += 1;
-                        break;
-                case 'V':
-                        verbose = atoi(optarg);
-                        break;
-                }
-        }
-
-        if (rank == 0)
-                printf("%s is running with %d process(es) %s\n",
-                       argv[0], size, debug ? "in DEBUG mode" : "\b\b");
-
-        if (size < MAX_GLHOST) {
-                fprintf(stderr, "Error: "
-                        "should be at least four processes to run the test!\n");
-                MPI_Abort(MPI_COMM_WORLD, 2);
-        }
-
-        if (testdir == NULL && rank == 0) {
-                fprintf(stderr, "Please specify a test directory! (\"%s -h\" for help)\n",
-                       argv[0]);
-                MPI_Abort(MPI_COMM_WORLD, 2);
-        }
-
-        lp_gethostname();
-
-        for (i = 0; i < iterations; ++i) {
-                if (rank == 0)
-                        printf("%s: Running test #%s(iter %d)\n",
-                               timestamp(), argv[0], i);
-
-                parallel_grouplock();
-                MPI_Barrier(MPI_COMM_WORLD);
-        }
-
-        if (rank == 0) {
-                printf("%s: All tests passed!\n", timestamp());
-        }
-        MPI_Finalize();
-        return 0;
-}
diff --git a/lustre/tests/random-reads.c b/lustre/tests/random-reads.c
deleted file mode 100644
index 1722afb34f419dcaa23943e42f86565c3316b7a4..0000000000000000000000000000000000000000
--- a/lustre/tests/random-reads.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/*
- * Lustre Random Reads test
- *
- * Copyright (c) 2005 Cluster File Systems, Inc.
- *
- * Author: Nikita Danilov <nikita@clusterfs.com>
- *
- * This file is part of Lustre, http://www.lustre.org.
- *
- * Lustre is free software; you can redistribute it and/or modify it under the
- * terms of version 2 of the GNU General Public License as published by the
- * Free Software Foundation.
- *
- * Lustre 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 Lustre; if not, write to the Free Software Foundation, Inc., 675 Mass
- * Ave, Cambridge, MA 02139, USA.
- */
-
-#define _XOPEN_SOURCE 500 /* for pread(2) */
-
-#include <errno.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-#include <sys/types.h>
-#include <sys/time.h>
-
-long long atoll(const char *nptr);
-
-static void usage(void)
-{
-	printf("random-reads: read random chunks of a file.\n");
-	printf("Usage:\n\n");
-	printf("random-reads -f <filename> -s <filesize> -b <buffersize> -a <adjacent reads> [-v] [-h] [-C] [-S <seed>] [-n <iterations>] [-w <width>] [-t <timelimit>]\n");
-}
-
-enum {
-	BSIZE_DEFAULT = 16 * 4096
-};
-
-#define LOG(level, ...)				\
-({						\
-	if ((level) <= verbosity)		\
-		fprintf(stderr, __VA_ARGS__);	\
-})
-
-enum {
-	LOG_CRIT,
-	LOG_WARN,
-	LOG_INFO,
-	LOG_DEBUG
-};
-
-enum {
-	RR_OK,
-	RR_PARSE,
-	RR_SET,
-	RR_MALLOC,
-	RR_OPEN,
-	RR_PRECLEAN,
-	RR_READ
-};
-
-int main(int argc, char **argv)
-{
-	int    verbosity = LOG_CRIT;
-	char  *fname = NULL;
-	loff_t size = 0;
-	size_t bsize = 0;
-	int    ad = 1;
-	int    preclean = 0;
-	int    width = 10;
-	unsigned int seed = 0;
-	unsigned long iterations = 0;
-	unsigned long timelimit = 24 * 3600;
-
-	int opt;
-	int fd;
-	unsigned long nblocks;
-	unsigned long i;
-	ssize_t  ret;
-
-	struct timeval start;
-	struct timeval stop;
-
-	double usecs;
-
-	char *buf;
-
-	do {
-		opt = getopt(argc, argv, "f:s:b:va:hCS:n:t:w:");
-		switch (opt) {
-		case -1:
-			break;
-		default:
-			LOG(LOG_CRIT, "Unable to parse command line.\n");
-		case 'h':
-			usage();
-			return RR_PARSE;
-		case 'v':
-			verbosity ++;
-			break;
-		case 'f':
-			fname = strdup(optarg);
-			break;
-		case 's':
-			size = atoll(optarg);
-			break;
-		case 'b':
-			bsize = atol(optarg);
-			break;
-		case 'a':
-			ad = atoi(optarg);
-			break;
-		case 'C':
-			preclean = 1;
-			break;
-		case 'S':
-			seed = atol(optarg);
-			break;
-		case 'n':
-			iterations = atoll(optarg);
-			break;
-		case 't':
-			timelimit = atoll(optarg);
-			break;
-		case 'w':
-			width = atoi(optarg);
-			break;
-		}
-	} while (opt != -1);
-
-	if (fname == NULL || size == 0 || bsize == 0 || ad <= 0) {
-		usage();
-		return RR_SET;
-	}
-
-	bsize /= ad;
-	nblocks = size / bsize;
-	buf = malloc(bsize);
-	if (buf == NULL) {
-		LOG(LOG_CRIT, "malloc(%lu) failure: %s\n", (long)bsize,
-		    strerror(errno));
-		return RR_MALLOC;
-	}
-
-	fd = open(fname, (preclean ? O_RDWR : O_RDONLY) | O_CREAT, 0700);
-	if (fd == -1) {
-		LOG(LOG_CRIT, "malloc(\"%s\") failure: %s\n", fname,
-		    strerror(errno));
-		return RR_OPEN;
-	}
-	if (preclean) {
-		loff_t towrite;
-		size_t count;
-
-		LOG(LOG_INFO, "precleaning");
-		for (i = 0, towrite = size; towrite > 0; towrite -= ret) {
-			count = bsize < towrite ? bsize : towrite;
-			memset(buf, bsize, seed + i++);
-			ret = write(fd, buf, count);
-			if (ret < 0) {
-				LOG(LOG_CRIT, "write() failure: %s\n",
-				    strerror(errno));
-				return RR_PRECLEAN;
-			}
-		}
-	}
-	if (seed != 0)
-		srand(seed);
-	gettimeofday(&start, NULL);
-	timelimit += start.tv_sec;
-	for (i = 0; !iterations || i < iterations; i ++) {
-		unsigned long block_nr;
-		int j;
-
-		block_nr = (int) ((double)nblocks*rand()/(RAND_MAX+1.0));
-		if (i % width == 0)
-			LOG(LOG_INFO, "\n%9lu: ", i);
-		LOG(LOG_INFO, "%7lu ", block_nr);
-		for (j = 0; j < ad; j++) {
-			ret = pread(fd, buf, bsize, (block_nr + j) * bsize);
-			if (ret != bsize) {
-				LOG(LOG_CRIT,
-				    "pread(...%zi, %li) got: %zi, %s\n", bsize,
-				    block_nr * bsize, ret, strerror(errno));
-				return RR_READ;
-			}
-		}
-		gettimeofday(&stop, NULL);
-		if (stop.tv_sec > timelimit)
-			break;
-	}
-	usecs = (stop.tv_sec - start.tv_sec) * 1000000. +
-		stop.tv_usec - start.tv_usec;
-	printf("\n%fs, %gMB/s\n", usecs / 1000000.,
-	       (double)bsize * ad * i / usecs);
-	return RR_OK;
-}
diff --git a/lustre/tests/recovery-small.sh b/lustre/tests/recovery-small.sh
deleted file mode 100755
index 13b61eab464337ad1a207aacdbb35e4fe4b21dbf..0000000000000000000000000000000000000000
--- a/lustre/tests/recovery-small.sh
+++ /dev/null
@@ -1,934 +0,0 @@
-#!/bin/bash
-
-set -e
-
-#         bug  5493
-ALWAYS_EXCEPT="52 $RECOVERY_SMALL_EXCEPT"
-
-#PTLDEBUG=${PTLDEBUG:--1}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-# also long tests: 19, 21a, 21e, 21f, 23, 27
-#                                   1  2.5  2.5    4    4          (min)"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="17  26a  26b    50   51     57"
-
-build_test_filter
-
-# Allow us to override the setup if we already have a mounted system by
-# setting SETUP=" " and CLEANUP=" "
-SETUP=${SETUP:-""}
-CLEANUP=${CLEANUP:-""}
-
-cleanup_and_setup_lustre
-rm -rf $DIR/[df][0-9]*
-
-test_1() {
-    drop_request "mcreate $MOUNT/1"  || return 1
-    drop_reint_reply "mcreate $MOUNT/2"    || return 2
-}
-run_test 1 "mcreate: drop req, drop rep"
-
-test_2() {
-    drop_request "tchmod 111 $MOUNT/2"  || return 1
-    drop_reint_reply "tchmod 666 $MOUNT/2"    || return 2
-}
-run_test 2 "chmod: drop req, drop rep"
-
-test_3() {
-    drop_request "statone $MOUNT/2" || return 1
-    drop_reply "statone $MOUNT/2"   || return 2
-}
-run_test 3 "stat: drop req, drop rep"
-
-SAMPLE_NAME=recovery-small.junk
-SAMPLE_FILE=$TMP/$SAMPLE_NAME
-# make this big, else test 9 doesn't wait for bulk -- bz 5595
-dd if=/dev/urandom of=$SAMPLE_FILE bs=1M count=4
-
-test_4() {
-    do_facet client "cp $SAMPLE_FILE $MOUNT/$SAMPLE_NAME" || return 1
-    drop_request "cat $MOUNT/$SAMPLE_NAME > /dev/null"   || return 2
-    drop_reply "cat $MOUNT/$SAMPLE_NAME > /dev/null"     || return 3
-}
-run_test 4 "open: drop req, drop rep"
-
-test_5() {
-    drop_request "mv $MOUNT/$SAMPLE_NAME $MOUNT/renamed" || return 1
-    drop_reint_reply "mv $MOUNT/renamed $MOUNT/renamed-again" || return 2
-    do_facet client "checkstat -v $MOUNT/renamed-again"  || return 3
-}
-run_test 5 "rename: drop req, drop rep"
-
-[ ! -e $MOUNT/renamed-again ] && cp $SAMPLE_FILE $MOUNT/renamed-again
-test_6() {
-    drop_request "mlink $MOUNT/renamed-again $MOUNT/link1" || return 1
-    drop_reint_reply "mlink $MOUNT/renamed-again $MOUNT/link2"   || return 2
-}
-run_test 6 "link: drop req, drop rep"
-
-[ ! -e $MOUNT/link1 ] && mlink $MOUNT/renamed-again $MOUNT/link1
-[ ! -e $MOUNT/link2 ] && mlink $MOUNT/renamed-again $MOUNT/link2
-test_7() {
-    drop_request "munlink $MOUNT/link1"   || return 1
-    drop_reint_reply "munlink $MOUNT/link2"     || return 2
-}
-run_test 7 "unlink: drop req, drop rep"
-
-#bug 1423
-test_8() {
-    drop_reint_reply "touch $MOUNT/$tfile"    || return 1
-}
-run_test 8 "touch: drop rep (bug 1423)"
-
-SAMPLE_FILE=$TMP/recovery-small.junk
-dd if=/dev/urandom of=$SAMPLE_FILE bs=1M count=4
-
-#bug 1420
-test_9() {
-    pause_bulk "cp /etc/profile $MOUNT/$tfile"       || return 1
-    do_facet client "cp $SAMPLE_FILE $MOUNT/${tfile}.2"  || return 2
-    do_facet client "sync"
-    do_facet client "rm $MOUNT/$tfile $MOUNT/${tfile}.2" || return 3
-}
-run_test 9 "pause bulk on OST (bug 1420)"
-
-#bug 1521
-test_10() {
-    do_facet client mcreate $MOUNT/$tfile        || return 1
-    drop_bl_callback "chmod 0777 $MOUNT/$tfile"  || echo "evicted as expected"
-    # wait for the mds to evict the client
-    #echo "sleep $(($TIMEOUT*2))"
-    #sleep $(($TIMEOUT*2))
-    do_facet client touch $MOUNT/$tfile || echo "touch failed, evicted"
-    do_facet client checkstat -v -p 0777 $MOUNT/$tfile  || return 3
-    do_facet client "munlink $MOUNT/$tfile"
-}
-run_test 10 "finish request on server after client eviction (bug 1521)"
-
-#bug 2460
-# wake up a thread waiting for completion after eviction
-test_11(){
-    do_facet client multiop $MOUNT/$tfile Ow  || return 1
-    do_facet client multiop $MOUNT/$tfile or  || return 2
-
-    cancel_lru_locks osc
-
-    do_facet client multiop $MOUNT/$tfile or  || return 3
-    drop_bl_callback multiop $MOUNT/$tfile Ow || echo "evicted as expected"
-
-    do_facet client munlink $MOUNT/$tfile  || return 4
-}
-run_test 11 "wake up a thread waiting for completion after eviction (b=2460)"
-
-#b=2494
-test_12(){
-    $LCTL mark multiop $MOUNT/$tfile OS_c 
-    do_facet mds "sysctl -w lustre.fail_loc=0x115"
-    clear_failloc mds $((TIMEOUT * 2)) &
-    multiop_bg_pause $MOUNT/$tfile OS_c || return 1
-    PID=$!
-#define OBD_FAIL_MDS_CLOSE_NET           0x115
-    kill -USR1 $PID
-    echo "waiting for multiop $PID"
-    wait $PID || return 2
-    do_facet client munlink $MOUNT/$tfile  || return 3
-}
-run_test 12 "recover from timed out resend in ptlrpcd (b=2494)"
-
-# Bug 113, check that readdir lost recv timeout works.
-test_13() {
-    mkdir $MOUNT/readdir || return 1
-    touch $MOUNT/readdir/newentry || return
-# OBD_FAIL_MDS_READPAGE_NET|OBD_FAIL_ONCE
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000104"
-    ls $MOUNT/readdir || return 3
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    rm -rf $MOUNT/readdir || return 4
-}
-run_test 13 "mdc_readpage restart test (bug 1138)"
-
-# Bug 113, check that readdir lost send timeout works.
-test_14() {
-    mkdir $MOUNT/readdir
-    touch $MOUNT/readdir/newentry
-# OBD_FAIL_MDS_SENDPAGE|OBD_FAIL_ONCE
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000106"
-    ls $MOUNT/readdir || return 1
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-}
-run_test 14 "mdc_readpage resend test (bug 1138)"
-
-test_15() {
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000128"
-    touch $DIR/$tfile && return 1
-    return 0
-}
-run_test 15 "failed open (-ENOMEM)"
-
-READ_AHEAD=`lctl get_param -n llite.*.max_read_ahead_mb | head -n 1`
-stop_read_ahead() {
-   lctl set_param -n llite.*.max_read_ahead_mb 0
-}
-
-start_read_ahead() {
-   lctl set_param -n llite.*.max_read_ahead_mb $READ_AHEAD
-}
-
-test_16() {
-    do_facet client cp $SAMPLE_FILE $MOUNT
-    sync
-    stop_read_ahead
-
-#define OBD_FAIL_PTLRPC_BULK_PUT_NET 0x504 | OBD_FAIL_ONCE
-    do_facet ost1 sysctl -w lustre.fail_loc=0x80000504
-    cancel_lru_locks osc
-    # OST bulk will time out here, client resends
-    do_facet client "cmp $SAMPLE_FILE $MOUNT/${SAMPLE_FILE##*/}" || return 1
-    do_facet ost1 sysctl -w lustre.fail_loc=0
-    # give recovery a chance to finish (shouldn't take long)
-    sleep $TIMEOUT
-    do_facet client "cmp $SAMPLE_FILE $MOUNT/${SAMPLE_FILE##*/}" || return 2
-    start_read_ahead
-}
-run_test 16 "timeout bulk put, don't evict client (2732)"
-
-test_17() {
-    local at_max_saved=0
-
-    # With adaptive timeouts, bulk_get won't expire until adaptive_timeout_max
-    if at_is_valid && at_is_enabled; then
-        at_max_saved=$(at_max_get ost1)
-        at_max_set $TIMEOUT ost1
-    fi
-
-    # OBD_FAIL_PTLRPC_BULK_GET_NET 0x0503 | OBD_FAIL_ONCE
-    # OST bulk will time out here, client retries
-    do_facet ost1 sysctl -w lustre.fail_loc=0x80000503
-    # need to ensure we send an RPC
-    do_facet client cp $SAMPLE_FILE $DIR/$tfile
-    sync
-
-    # with AT, client will wait adaptive_max*factor+net_latency before
-    # expiring the req, hopefully timeout*2 is enough
-    sleep $(($TIMEOUT*2))
-
-    do_facet ost1 sysctl -w lustre.fail_loc=0
-    do_facet client "df $DIR"
-    # expect cmp to succeed, client resent bulk
-    do_facet client "cmp $SAMPLE_FILE $DIR/$tfile" || return 3
-    do_facet client "rm $DIR/$tfile" || return 4
-    [ $at_max_saved -ne 0 ] && $(at_max_set $at_max_saved ost1)
-    return 0
-}
-run_test 17 "timeout bulk get, don't evict client (2732)"
-
-test_18a() {
-    [ -z ${ost2_svc} ] && skip "needs 2 osts" && return 0
-
-    do_facet client mkdir -p $MOUNT/$tdir
-    f=$MOUNT/$tdir/$tfile
-
-    cancel_lru_locks osc
-    pgcache_empty || return 1
-
-    # 1 stripe on ost2
-    lfs setstripe $f -s $((128 * 1024)) -i 1 -c 1
-
-    do_facet client cp $SAMPLE_FILE $f
-    sync
-    local osc2dev=`lctl get_param -n devices | grep ${ost2_svc}-osc- | awk '{print $1}'`
-    $LCTL --device $osc2dev deactivate || return 3
-    # my understanding is that there should be nothing in the page
-    # cache after the client reconnects?     
-    rc=0
-    pgcache_empty || rc=2
-    $LCTL --device $osc2dev activate
-    rm -f $f
-    return $rc
-}
-run_test 18a "manual ost invalidate clears page cache immediately"
-
-test_18b() {
-    do_facet client mkdir -p $MOUNT/$tdir
-    f=$MOUNT/$tdir/$tfile
-    f2=$MOUNT/$tdir/${tfile}-2
-
-    cancel_lru_locks osc
-    pgcache_empty || return 1
-
-    # shouldn't have to set stripe size of count==1
-    lfs setstripe $f -s $((128 * 1024)) -i 0 -c 1
-    lfs setstripe $f2 -s $((128 * 1024)) -i 0 -c 1
-
-    do_facet client cp $SAMPLE_FILE $f
-    sync
-    ost_evict_client
-
-    # force reconnect
-    df $MOUNT > /dev/null 2>&1
-    sleep 2
-    # my understanding is that there should be nothing in the page
-    # cache after the client reconnects?     
-    rc=0
-    pgcache_empty || rc=2
-    rm -f $f $f2
-    return $rc
-}
-run_test 18b "eviction and reconnect clears page cache (2766)"
-
-test_18c() {
-    do_facet client mkdir -p $MOUNT/$tdir
-    f=$MOUNT/$tdir/$tfile
-    f2=$MOUNT/$tdir/${tfile}-2
-
-    cancel_lru_locks osc
-    pgcache_empty || return 1
-
-    # shouldn't have to set stripe size of count==1
-    lfs setstripe $f -s $((128 * 1024)) -i 0 -c 1
-    lfs setstripe $f2 -s $((128 * 1024)) -i 0 -c 1
-
-    do_facet client cp $SAMPLE_FILE $f
-    sync
-    ost_evict_client
-
-    # OBD_FAIL_OST_CONNECT_NET2
-    # lost reply to connect request
-    do_facet ost1 sysctl -w lustre.fail_loc=0x80000225
-    # force reconnect
-    df $MOUNT > /dev/null 2>&1
-    sleep 2
-    # my understanding is that there should be nothing in the page
-    # cache after the client reconnects?     
-    rc=0
-    pgcache_empty || rc=2
-    rm -f $f $f2
-    return $rc
-}
-run_test 18c "Dropped connect reply after eviction handing (14755)"
-
-test_19a() {
-    f=$MOUNT/$tfile
-    do_facet client mcreate $f        || return 1
-    drop_ldlm_cancel "chmod 0777 $f"  || echo "evicted as expected"
-
-    do_facet client checkstat -v -p 0777 $f  || echo evicted
-    # let the client reconnect
-    sleep 5
-    do_facet client "munlink $f"
-}
-run_test 19a "test expired_lock_main on mds (2867)"
-
-test_19b() {
-    f=$MOUNT/$tfile
-    do_facet client multiop $f Ow  || return 1
-    do_facet client multiop $f or  || return 2
-
-    cancel_lru_locks osc
-
-    do_facet client multiop $f or  || return 3
-    drop_ldlm_cancel multiop $f Ow  || echo "client evicted, as expected"
-
-    do_facet client munlink $f  || return 4
-}
-run_test 19b "test expired_lock_main on ost (2867)"
-
-test_20a() {	# bug 2983 - ldlm_handle_enqueue cleanup
-	mkdir -p $DIR/$tdir
-	lfs setstripe $DIR/$tdir/${tfile} -i 0 -c 1
-	multiop_bg_pause $DIR/$tdir/${tfile} O_wc || return 1
-	MULTI_PID=$!
-	cancel_lru_locks osc
-#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308
-	do_facet ost1 sysctl -w lustre.fail_loc=0x80000308
-	kill -USR1 $MULTI_PID
-	wait $MULTI_PID
-	rc=$?
-	[ $rc -eq 0 ] && error "multiop didn't fail enqueue: rc $rc" || true
-}
-run_test 20a "ldlm_handle_enqueue error (should return error)" 
-
-test_20b() {	# bug 2986 - ldlm_handle_enqueue error during open
-	mkdir -p $DIR/$tdir
-	lfs setstripe $DIR/$tdir/${tfile} -i 0 -c 1
-	cancel_lru_locks osc
-#define OBD_FAIL_LDLM_ENQUEUE_EXTENT_ERR 0x308
-	do_facet ost1 sysctl -w lustre.fail_loc=0x80000308
-	dd if=/etc/hosts of=$DIR/$tdir/$tfile && \
-		error "didn't fail open enqueue" || true
-}
-run_test 20b "ldlm_handle_enqueue error (should return error)"
-
-test_21a() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       close_pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000129"
-       multiop $DIR/$tdir-2/f Oc &
-       open_pid=$!
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-       kill -USR1 $close_pid
-       cancel_lru_locks mdc
-       wait $close_pid || return 1
-       wait $open_pid || return 2
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 3
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 4
-
-       rm -rf $DIR/$tdir-*
-}
-run_test 21a "drop close request while close and open are both in flight"
-
-test_21b() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       close_pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
-       mcreate $DIR/$tdir-2/f &
-       open_pid=$!
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       kill -USR1 $close_pid
-       cancel_lru_locks mdc
-       wait $close_pid || return 1
-       wait $open_pid || return 3
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 4
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 5
-       rm -rf $DIR/$tdir-*
-}
-run_test 21b "drop open request while close and open are both in flight"
-
-test_21c() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       close_pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
-       mcreate $DIR/$tdir-2/f &
-       open_pid=$!
-       sleep 3
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-       kill -USR1 $close_pid
-       cancel_lru_locks mdc
-       wait $close_pid || return 1
-       wait $open_pid || return 2
-
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 2
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 3
-       rm -rf $DIR/$tdir-*
-}
-run_test 21c "drop both request while close and open are both in flight"
-
-test_21d() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000129"
-       multiop $DIR/$tdir-2/f Oc &
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
-       kill -USR1 $pid
-       cancel_lru_locks mdc
-       wait $pid || return 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 2
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 3
-
-       rm -rf $DIR/$tdir-*
-}
-run_test 21d "drop close reply while close and open are both in flight"
-
-test_21e() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-       touch $DIR/$tdir-2/f &
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       kill -USR1 $pid
-       cancel_lru_locks mdc
-       wait $pid || return 1
-
-       sleep $TIMEOUT
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 2
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 3
-       rm -rf $DIR/$tdir-*
-}
-run_test 21e "drop open reply while close and open are both in flight"
-
-test_21f() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-       touch $DIR/$tdir-2/f &
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
-       kill -USR1 $pid
-       cancel_lru_locks mdc
-       wait $pid || return 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 2
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 3
-       rm -rf $DIR/$tdir-*
-}
-run_test 21f "drop both reply while close and open are both in flight"
-
-test_21g() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-       touch $DIR/$tdir-2/f &
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-       kill -USR1 $pid
-       cancel_lru_locks mdc
-       wait $pid || return 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 2
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 3
-       rm -rf $DIR/$tdir-*
-}
-run_test 21g "drop open reply and close request while close and open are both in flight"
-
-test_21h() {
-       mkdir -p $DIR/$tdir-1
-       mkdir -p $DIR/$tdir-2
-       multiop_bg_pause $DIR/$tdir-1/f O_c || return 1
-       pid=$!
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
-       touch $DIR/$tdir-2/f &
-       touch_pid=$!
-       sleep 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       do_facet mds "sysctl -w lustre.fail_loc=0x80000122"
-       cancel_lru_locks mdc
-       kill -USR1 $pid
-       wait $pid || return 1
-       do_facet mds "sysctl -w lustre.fail_loc=0"
-
-       wait $touch_pid || return 2
-
-       $CHECKSTAT -t file $DIR/$tdir-1/f || return 3
-       $CHECKSTAT -t file $DIR/$tdir-2/f || return 4
-       rm -rf $DIR/$tdir-*
-}
-run_test 21h "drop open request and close reply while close and open are both in flight"
-
-# bug 3462 - multiple MDC requests
-test_22() {
-    f1=$DIR/${tfile}-1
-    f2=$DIR/${tfile}-2
-    
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-    multiop $f2 Oc &
-    close_pid=$!
-
-    sleep 1
-    multiop $f1 msu || return 1
-
-    cancel_lru_locks mdc
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-
-    wait $close_pid || return 2
-    rm -rf $f2 || return 4
-}
-run_test 22 "drop close request and do mknod"
-
-test_23() { #b=4561
-    multiop_bg_pause $DIR/$tfile O_c || return 1
-    pid=$!
-    # give a chance for open
-    sleep 5
-
-    # try the close
-    drop_request "kill -USR1 $pid"
-
-    fail mds
-    wait $pid || return 1
-    return 0
-}
-run_test 23 "client hang when close a file after mds crash"
-
-test_24() {	# bug 2248 - eviction fails writeback but app doesn't see it
-	mkdir -p $DIR/$tdir
-	cancel_lru_locks osc
-	multiop_bg_pause $DIR/$tdir/$tfile Owy_wyc || return 1
-	MULTI_PID=$!
-	ost_evict_client
-	kill -USR1 $MULTI_PID
-	wait $MULTI_PID
-	rc=$?
-	sysctl -w lustre.fail_loc=0x0
-	client_reconnect
-	[ $rc -eq 0 ] && error_ignore 5494 "multiop didn't fail fsync: rc $rc" || true
-}
-run_test 24 "fsync error (should return error)"
-
-test_26a() {      # was test_26 bug 5921 - evict dead exports by pinger
-# this test can only run from a client on a separate node.
-	remote_ost || { skip "local OST" && return 0; }
-	remote_mds || { skip "local MDS" && return 0; }
-	OST_FILE=obdfilter.${ost1_svc}.num_exports
-        OST_EXP="`do_facet ost1 lctl get_param -n $OST_FILE`"
-	OST_NEXP1=`echo $OST_EXP | cut -d' ' -f2`
-	echo starting with $OST_NEXP1 OST exports
-# OBD_FAIL_PTLRPC_DROP_RPC 0x505
-	do_facet client sysctl -w lustre.fail_loc=0x505
-	# evictor takes up to 2.25x to evict.  But if there's a 
-	# race to start the evictor from various obds, the loser
-	# might have to wait for the next ping.
-	echo Waiting for $(($TIMEOUT * 4)) secs
-	sleep $(($TIMEOUT * 4))
-        OST_EXP="`do_facet ost1 lctl get_param -n $OST_FILE`"
-	OST_NEXP2=`echo $OST_EXP | cut -d' ' -f2`
-	echo ending with $OST_NEXP2 OST exports
-	do_facet client sysctl -w lustre.fail_loc=0x0
-        [ $OST_NEXP1 -le $OST_NEXP2 ] && error "client not evicted"
-	return 0
-}
-run_test 26a "evict dead exports"
-
-test_26b() {      # bug 10140 - evict dead exports by pinger
-	client_df
-	zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2"
-	MDS_FILE=mds.${mds_svc}.num_exports
-        MDS_NEXP1="`do_facet mds lctl get_param -n $MDS_FILE | cut -d' ' -f2`"
-	OST_FILE=obdfilter.${ost1_svc}.num_exports
-        OST_NEXP1="`do_facet ost1 lctl get_param -n $OST_FILE | cut -d' ' -f2`"
-	echo starting with $OST_NEXP1 OST and $MDS_NEXP1 MDS exports
-	#force umount a client; exports should get evicted
-	zconf_umount `hostname` $MOUNT2 -f
-	# evictor takes PING_EVICT_TIMEOUT + 3 * PING_INTERVAL to evict.  
-        # But if there's a race to start the evictor from various obds, 
-        # the loser might have to wait for the next ping.
-	echo Waiting for $(($TIMEOUT * 3)) secs
-	sleep $(($TIMEOUT * 3))
-        OST_NEXP2="`do_facet ost1 lctl get_param -n $OST_FILE | cut -d' ' -f2`"
-        MDS_NEXP2="`do_facet mds lctl get_param -n $MDS_FILE | cut -d' ' -f2`"
-	echo ending with $OST_NEXP2 OST and $MDS_NEXP2 MDS exports
-        [ $OST_NEXP1 -le $OST_NEXP2 ] && error "client not evicted from OST"
-        [ $MDS_NEXP1 -le $MDS_NEXP2 ] && error "client not evicted from MDS"
-	return 0
-}
-run_test 26b "evict dead exports"
-
-test_27() {
-	remote_mds && { skip "remote MDS" && return 0; }
-	mkdir -p $DIR/$tdir
-	writemany -q -a $DIR/$tdir/$tfile 0 5 &
-	CLIENT_PID=$!
-	sleep 1
-	FAILURE_MODE="SOFT"
-	facet_failover mds
-#define OBD_FAIL_OSC_SHUTDOWN            0x407
-	sysctl -w lustre.fail_loc=0x80000407
-	# need to wait for reconnect
-	echo -n waiting for fail_loc
-	while [ `sysctl -n lustre.fail_loc` -eq -2147482617 ]; do
-	    sleep 1
-	    echo -n .
-	done
-	facet_failover mds
-	#no crashes allowed!
-        kill -USR1 $CLIENT_PID
-	wait $CLIENT_PID 
-	true
-}
-run_test 27 "fail LOV while using OSC's"
-
-test_28() {      # bug 6086 - error adding new clients
-	do_facet client mcreate $MOUNT/$tfile       || return 1
-	drop_bl_callback "chmod 0777 $MOUNT/$tfile" ||echo "evicted as expected"
-	#define OBD_FAIL_MDS_ADD_CLIENT 0x12f
-	do_facet mds sysctl -w lustre.fail_loc=0x8000012f
-	# fail once (evicted), reconnect fail (fail_loc), ok
-	df || (sleep 1; df) || (sleep 1; df) || error "reconnect failed"
-	rm -f $MOUNT/$tfile
-	fail mds		# verify MDS last_rcvd can be loaded
-}
-run_test 28 "handle error adding new clients (bug 6086)"
-
-test_50() {
-	mkdir -p $DIR/$tdir
-	debugsave
-	sysctl -w lnet.debug="-dlmtrace -ha"
-	# put a load of file creates/writes/deletes
-	writemany -q $DIR/$tdir/$tfile 0 5 &
-	CLIENT_PID=$!
-	echo writemany pid $CLIENT_PID
-	sleep 10
-	FAILURE_MODE="SOFT"
-	$LCTL mark "$TESTNAME fail mds 1"
-	fail mds
-	# wait for client to reconnect to MDS
-	sleep 60
-	$LCTL mark "$TESTNAME fail mds 2"
-	fail mds
-	sleep 60
-	$LCTL mark "$TESTNAME fail mds 3"
-	fail mds
-	# client process should see no problems even though MDS went down
-	sleep $TIMEOUT
-        kill -USR1 $CLIENT_PID
-	wait $CLIENT_PID 
-	rc=$?
-	echo writemany returned $rc
-	#these may fail because of eviction due to slow AST response.
-	debugrestore
-	[ $rc -eq 0 ] || error_ignore 13652 "writemany returned rc $rc" || true
-}
-run_test 50 "failover MDS under load"
-
-test_51() {
-	mkdir -p $DIR/$tdir
-	# put a load of file creates/writes/deletes
-	writemany -q $DIR/$tdir/$tfile 0 5 &
-	CLIENT_PID=$!
-	sleep 1
-	FAILURE_MODE="SOFT"
-	facet_failover mds
-	# failover at various points during recovery
-	SEQ="1 5 10 $(seq $TIMEOUT 5 $(($TIMEOUT+10)))"
-        echo will failover at $SEQ
-        for i in $SEQ
-          do
-          echo failover in $i sec
-          sleep $i
-	  $LCTL mark "$TESTNAME fail mds $i"
-          facet_failover mds
-        done
-	# client process should see no problems even though MDS went down
-	# and recovery was interrupted
-	sleep $TIMEOUT
-        kill -USR1 $CLIENT_PID
-	wait $CLIENT_PID 
-	rc=$?
-	echo writemany returned $rc
-	[ $rc -eq 0 ] || error_ignore 13652 "writemany returned rc $rc" || true
-}
-run_test 51 "failover MDS during recovery"
-
-test_52_guts() {
-	do_facet client "writemany -q -a $DIR/$tdir/$tfile 300 5" &
-	CLIENT_PID=$!
-	echo writemany pid $CLIENT_PID
-	sleep 10
-	FAILURE_MODE="SOFT"
-	$LCTL mark "$TESTNAME fail ost $1"
-	fail ost1
-	rc=0
-	wait $CLIENT_PID || rc=$?
-	# active client process should see an EIO for down OST
-	[ $rc -eq 5 ] && { echo "writemany correctly failed $rc" && return 0; }
-	# but timing or failover setup may allow success
-	[ $rc -eq 0 ] && { echo "writemany succeeded" && return 0; }
-	echo "writemany returned $rc"
-	return $rc
-}
-
-test_52() {
-	mkdir -p $DIR/$tdir
-	test_52_guts 1
-	rc=$?
-	[ $rc -ne 0 ] && { return $rc; }
-	# wait for client to reconnect to OST
-	sleep 30
-	test_52_guts 2
-	rc=$?
-	[ $rc -ne 0 ] && { return $rc; }
-	sleep 30
-	test_52_guts 3
-	rc=$?
-	client_reconnect
-	#return $rc
-}
-run_test 52 "failover OST under load"
-
-# test of open reconstruct
-test_53() {
-	touch $DIR/$tfile
-	drop_ldlm_reply "openfile -f O_RDWR:O_CREAT -m 0755 $DIR/$tfile" ||\
-		return 2
-}
-run_test 53 "touch: drop rep"
-
-test_54() {
-	zconf_mount `hostname` $MOUNT2
-        touch $DIR/$tfile
-        touch $DIR2/$tfile.1
-        sleep 10
-        cat $DIR2/$tfile.missing # save transno = 0, rc != 0 into last_rcvd
-        fail mds
-        umount $MOUNT2
-        ERROR=`dmesg | egrep "(test 54|went back in time)" | tail -n1 | grep "went back in time"`
-        [ x"$ERROR" == x ] || error "back in time occured"
-}
-run_test 54 "back in time"
-
-# bug 11330 - liblustre application death during I/O locks up OST
-test_55() {
-	remote_ost && { skip "remote OST" && return 0; }
-
-	mkdir -p $DIR/$tdir
-
-	# first dd should be finished quickly
-	dd if=/dev/zero of=$DIR/$tdir/$tfile-1 bs=32M count=4  &
-	DDPID=$!
-	count=0
-	echo  "step1: testing ......"
-	while [ true ]; do
-	    if [ -z `ps x | awk '$1 == '$DDPID' { print $5 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt 64 ]; then
-		error "dd should be finished!"
-	    fi
-	    sleep 1
-	done	
-	echo "(dd_pid=$DDPID, time=$count)successful"
-
-        #define OBD_FAIL_OST_DROP_REQ            0x21d
-	do_facet ost sysctl -w lustre.fail_loc=0x0000021d
-	# second dd will be never finished
-	dd if=/dev/zero of=$DIR/$tdir/$tfile-2 bs=32M count=4  &	
-	DDPID=$!
-	count=0
-	echo  "step2: testing ......"
-	while [ $count -le 64 ]; do
-	    dd_name="`ps x | awk '$1 == '$DDPID' { print $5 }'`"	    
-	    if [ -z  $dd_name ]; then 
-                ls -l $DIR/$tdir
-		echo  "debug: (dd_name=$dd_name, dd_pid=$DDPID, time=$count)"
-		error "dd shouldn't be finished!"
-	    fi
-	    count=$[count+1]
-	    sleep 1
-	done	
-	echo "(dd_pid=$DDPID, time=$count)successful"
-
-	#Recover fail_loc and dd will finish soon
-	do_facet ost sysctl -w lustre.fail_loc=0
-	count=0
-	echo  "step3: testing ......"
-	while [ true ]; do
-	    if [ -z `ps x | awk '$1 == '$DDPID' { print $5 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt 500 ]; then
-		error "dd should be finished!"
-	    fi
-	    sleep 1
-	done	
-	echo "(dd_pid=$DDPID, time=$count)successful"
-
-        rm -rf $DIR/$tdir
-}
-run_test 55 "ost_brw_read/write drops timed-out read/write request"
-
-test_56() { # b=11277
-#define OBD_FAIL_MDS_RESEND      0x136
-        touch $DIR/$tfile
-        do_facet mds sysctl -w lustre.fail_loc=0x80000136
-        stat $DIR/$tfile
-        do_facet mds sysctl -w lustre.fail_loc=0
-        rm -f $DIR/$tfile
-}
-run_test 56 "do not allow reconnect to busy exports"
-
-test_57_helper() {
-        # no oscs means no client or mdt 
-        while lctl get_param osc.*.* > /dev/null 2>&1; do
-                : # loop until proc file is removed
-        done
-}
-
-test_57() { # bug 10866
-        test_57_helper &
-        pid=$!
-        sleep 1
-#define OBD_FAIL_LPROC_REMOVE            0xB00
-        sysctl -w lustre.fail_loc=0x80000B00
-        zconf_umount `hostname` $DIR
-        sysctl -w lustre.fail_loc=0x80000B00
-        fail_abort mds
-        kill -9 $pid
-        sysctl -w lustre.fail_loc=0
-        mount_client $DIR
-        do_facet client "df $DIR"
-}
-run_test 57 "read procfs entries causes kernel crash"
-
-test_58() { # bug 11546
-#define OBD_FAIL_MDC_ENQUEUE_PAUSE        0x801
-        touch $MOUNT/$tfile
-        ls -la $MOUNT/$tfile
-        sysctl -w lustre.fail_loc=0x80000801
-        cp $MOUNT/$tfile /dev/null &
-        pid=$!
-        sleep 1
-        sysctl -w lustre.fail_loc=0
-        drop_bl_callback rm -f $MOUNT/$tfile
-        wait $pid
-        do_facet client "df $DIR"
-}
-run_test 58 "Eviction in the middle of open RPC reply processing"
-
-test_59() { # bug 10589
-	zconf_mount `hostname` $MOUNT2 || error "Failed to mount $MOUNT2"
-	echo $DIR2 | grep -q $MOUNT2 || error "DIR2 is not set properly: $DIR2"
-	sysctl -w lustre.fail_loc=0x311
-	writes=$(LANG=C dd if=/dev/zero of=$DIR2/$tfile count=1 2>&1)
-	[ $? = 0 ] || error "dd write failed"
-	writes=$(echo $writes | awk  -F '+' '/out/ {print $1}')
-	sysctl -w lustre.fail_loc=0
-	sync
-	zconf_umount `hostname` $MOUNT2 -f
-	reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1)
-	[ $? = 0 ] || error "dd read failed"
-	reads=$(echo $reads | awk -F '+' '/in/ {print $1}')
-	[ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes
-}
-run_test 59 "Read cancel race on client eviction"
-
-equals_msg `basename $0`: test complete, cleaning up
-check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
diff --git a/lustre/tests/rename.pl b/lustre/tests/rename.pl
deleted file mode 100644
index dd6b5dc15874e06b555571308639a9c4b0faab76..0000000000000000000000000000000000000000
--- a/lustre/tests/rename.pl
+++ /dev/null
@@ -1,210 +0,0 @@
-#!/usr/bin/perl -w
-use strict;
-$|++;
-
-$ENV{PATH}="/bin:/usr/bin";
-$ENV{ENV}="";
-$ENV{BASH_ENV}="";
-
-use diagnostics;
-use Getopt::Long;
-use POSIX ":sys_wait_h";
-
-use vars qw(
-            $MAX_THREADS
-	    $SCRIPT_NAME
-            );
- 
-# Don't try to run more than this many threads concurrently.
-$MAX_THREADS = 16;
-
-$SCRIPT_NAME = "rename.pl";
-
-# Initialize variables
-my $silent = 0;
-my $create_files = 1; # should we create files or not?
-my $use_mcreate = 1;  # should we use mcreate or open?
-my $num_dirs = 3;     # number of directories to create
-my $num_files = 6;    # number of files to create
-my $iterations = 1;
-my $num_threads = 1;
-my $mountpt;
-my $num_mounts = -1;
-
-GetOptions("silent!"=> \$silent,
-	   "use_mcreate=i" => \$use_mcreate,
-           "create_files=i" => \$create_files,
-	   "use_mcreate=i" => \$use_mcreate,
-	   "num_files=i" => \$num_files,
-	   "num_dirs=i" => \$num_dirs,
-	   "mountpt=s" => \$mountpt,
-           "num_mounts=i" => \$num_mounts,
-	   "iterations=i" => \$iterations,
-           "num_threads=i" => \$num_threads,
-           ) || die &usage;
-
-# Check for mandatory args.
-if (!$mountpt ||
-    !$num_mounts) {
-    die &usage;
-}
-
-if ($num_threads > $MAX_THREADS) {
-    print "\nMAX_THREADS is currently set to $MAX_THREADS.\n\n";
-    print "You will have to change this in the source\n";
-    print "if you really want to run with $num_threads threads.\n\n";
-    exit 1;
-}
-
-# Initialize rand() function.
-srand (time ^ $$ ^ unpack "%L*", `ps axww | gzip`);
-
-#########################################################################
-### MAIN
-
-my $which = "";
-if ($num_mounts > 0) {
-    $which = int(rand() * $num_mounts) + 1;
-}
-
-# Create files and directories (if necessary)
-if ($create_files) {
-    for (my $i=1; $i<=$num_threads;$i++) {
-	for (my $j=0; $j<$num_dirs;$j++) {
-	    my $path = "${mountpt}${which}/${i}.${j}";
-	    mkdir $path, 0755 || die "Can't mkdir $path: $!\n";
-	    for (my $k=0; $k<$num_files; $k++) {
-		my $filepath = "${path}/${k}";
-		&create_file($filepath);
-		if (! -e $filepath) {
-		    die "Error creating $filepath\n";
-		}
-	    }
-	}
-    }
-}
-
-for (my $i=1; $i<=$num_threads; $i++) {
-    my $status = &fork_and_rename($i);
-    last if ($status != 0);
-}
-
-# Wait for all our threads to finish.
-# Wait for all our threads to finish.
-my $child = 0;
-do {
-    $child = waitpid(-1, 0);
-} until $child > 0;
-sleep 1;
-
-# Unlink files and directories (if necessary)
-if ($create_files) {
-    for (my $i=1; $i<=$num_threads;$i++) {
-	for (my $j=0; $j<$num_dirs;$j++) {
-	    my $path = "${mountpt}${which}/${i}.${j}";
-	    for (my $k=0; $k<=$num_files; $k++) {
-		my $filepath = "${path}/${k}";
-		unlink("$filepath") if (-e $filepath);
-	    }
-	    my $rc = rmdir $path;
-	    print "$SCRIPT_NAME - rmdir $path failed: $!\n" if !$rc;	    
-	}
-    }
-}
-
-exit 0;
-
-#########################################################################
-### SUBROUTINES
-
-sub usage () {
-    print "\nUsage: $0 [--silent] [--create_files=n] [--use_mcreate=n] [--num_dirs=n] [--num_files=n] [--iterations=n] [--num_threads=n] --num_mounts=n --mountpt=/path/to/lustre/mount\n\n";
-    print "\t--silent\tminimal output\n";
-    print "\t--create_files=n\create files at start, default=1 (yes)\n";
-    print "\t--use_mcreate=n\tuse mcreate to create files, default=1 (yes)\n";
-    print "\t--num_dirs=n\tnumber of directories to create per iteration, default=3\n";
-    print "\t--num_files=n\tnumber of files to create per directory, default=6\n";
-    print "\t--iterations=n\tnumber of iterations to perform, default=1\n";
-    print "\t--num_threads=n\tnumber of thread to run, default=1\n";
-    print "\t--mountpt\tlocation of lustre mount\n";
-    print "\t--num_mounts=n\tnumber of lustre mounts to test across, default=-1 (single mount point without numeric suffix)\n\n";
-    print "example: $0 --mountpt=/mnt/lustre --num_mounts=2 --iterations=50\n";
-    print "         will perform 50 interations in /mnt/lustre1 and /mnt/lustre2\n";
-    print "         $0 --mountpt=/mnt/lustre --num_mounts=-1 --iterations=50\n";
-    print "         will perform 50 iterations in /mnt/lustre only\n\n";
-    exit;
-}
-
-
-#########################################################################
-sub create_file ($) {
-    my ($path) = @_;;
-    
-    if (-e $path) {
-	warn "$path already exists!\n";
-	return 1;
-    }
-
-    if ($use_mcreate) {
-        my $tmp = `./mcreate $path`;
-	if ($tmp =~ /.*error: (.*)\n/) {
-	    die "Error mcreating $path: $!\n";
-	}
-    } else {
-        open(FH, ">$path") || die "Error opening $path: $!\n";
-        close(FH) || die;
-    }
-    return 0;
-}
-
-#########################################################################
-sub fork_and_rename ($) {
-    my ($thread_num) = @_;
-    
-  FORK: {
-      if (my $pid = fork) {
-          # parent here
-          # child process pid is available in $pid
-	  return 0;
-      } elsif (defined $pid) { # $pid is zero here if defined
-	  
-	  my $current_iteration=1;
-          while ($current_iteration <= $iterations) {
-	      for (my $i=0; $i<$num_files; $i++) {
-		  my $which = "";
-		  if ($num_mounts > 0) {
-		      $which = int(rand() * $num_mounts) + 1;
-		  }
-		  
-		  my $d = int(rand() * $num_dirs);
-		  my $f1 = int(rand() * $num_files);
-		  my $f2 = int(rand() * $num_files);
-		  my $path_f1 = "${mountpt}${which}/${thread_num}.${d}/${f1}";
-		  my $path_f2 = "${mountpt}${which}/${thread_num}.${d}/${f2}";
-		  
-		  print "$SCRIPT_NAME - Thread $thread_num: [$$] $path_f1 $path_f2 ...\n" if !$silent;
-		  my $rc = rename $path_f1, $path_f2;
-		  print "$SCRIPT_NAME - Thread $thread_num: [$$] done: $rc\n" if !$silent;
-	      }
-	      if (($current_iteration) % 100 == 0) {
-		  print "$SCRIPT_NAME - Thread $thread_num: " . $current_iteration . " operations [" . $$ . "]\n";
-		  
-	      }
-	      $current_iteration++;
-	  }
-
-	  print "$SCRIPT_NAME - Thread $thread_num: Done.\n";
-
-	  exit 0;
-
-      } elsif ($! =~ /No more process/) {
-          # EAGAIN, supposedly recoverable fork error
-          sleep 5;
-          redo FORK;
-      } else {
-          # weird fork error
-          die "Can't fork: $!\n";
-      }
-  }
-    
-}
diff --git a/lustre/tests/rename_many.c b/lustre/tests/rename_many.c
deleted file mode 100644
index 5bf46d255554637fe680af412c5c7586c159ba10..0000000000000000000000000000000000000000
--- a/lustre/tests/rename_many.c
+++ /dev/null
@@ -1,262 +0,0 @@
-#define PATH_LENGTH 35
-#include <math.h>
-#include <signal.h>
-#include <unistd.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <getopt.h>
-
-struct names {
-	char from[PATH_LENGTH];
-	char to[PATH_LENGTH];
-} *names;
-
-unsigned int loop_count = 500;
-int file_count = 1000;
-int seed;
-int loops;
-int stop;
-long start;
-
-int opt_exit_on_err;
-int opt_verbose;
-int opt_create_only;
-int opt_rename_only;
-int creat_errors;
-int rename_errors;
-int unlink_errors;
-
-void usage(const char *progname)
-{
-	fprintf(stderr, "usage: %s [-n numfiles] [-s seed] [-v] [-x] [dir]\n"
-		"\t-c: only do the create step of first loop\n"
-		"\t-f: number of files to create/rename/unlink per loop\n"
-		"\t-n: number of test loops (0 to run forever)\n"
-		"\t-r: only do the rename step of first loop\n"
-		"\t-s: starting seed (equals loop number by default)\n"
-		"\t-v: verbose\n"
-		"\t-x: don't exit on error\n", progname);
-}
-
-void handler(int sig) {
-	static long last_time;
-	long now = time(0);
-
-	signal(SIGINT, handler);
-	signal(SIGALRM, handler);
-	printf("%6lds %8d iterations %d/%d/%d errors",
-	       now - start, loops, creat_errors, rename_errors, unlink_errors);
-	if (sig != 0)
-		printf(" - use SIGQUIT (^\\) or ^C^C to kill\n");
-	else
-		printf("\n");
-
-	if (sig == SIGQUIT)
-		stop = 1;
-	else if (sig == SIGINT) {
-		if (now - last_time < 2)
-			stop = 1;
-		last_time = now;
-	}
-	alarm(60);
-}
-
-extern char *optarg;
-extern int optind;
-
-int main(int argc, char *argv[])
-{
-	unsigned long n;
-	char msg[100], *end = NULL;
-	int h1, h2;
-	int i, c;
-
-	while ((c = getopt(argc, argv, "cf:n:rs:vx")) != EOF) {
-		switch(c) {
-		case 'c':
-			++opt_create_only;
-			break;
-		case 'f':
-			i = strtoul(optarg, &end, 0);
-			if (i && end != NULL && *end == '\0') {
-				file_count = i;
-			} else {
-				fprintf(stderr, "bad file count '%s'\n",optarg);
-				usage(argv[0]);
-				return 1;
-			}
-			break;
-		case 'n':
-			i = strtoul(optarg, &end, 0);
-			if (i && end != NULL && *end == '\0') {
-				loop_count = i;
-			} else {
-				fprintf(stderr, "bad loop count '%s'\n",optarg);
-				usage(argv[0]);
-				return 1;
-			}
-			break;
-		case 'r':
-			++opt_rename_only;
-			break;
-		case 's':
-			i = strtoul(optarg, &end, 0);
-			if (end && *end == '\0') {
-				seed = i;
-			} else {
-				seed = random();
-				fprintf(stderr, "using random seed %u\n", seed);
-			}
-			break;
-		case 'v':
-			++opt_verbose;
-			break;
-		case 'x':
-			++opt_exit_on_err;
-			break;
-		default:
-			usage(argv[0]);
-			return 1;
-		}
-	}
-
-	names = malloc(sizeof(struct names) * file_count);
-	if (names == NULL) {
-		perror("calloc");
-		return(1);
-	}
-
-	h2 = sprintf(msg, "%x", file_count); /* just to figure length */
-	h1 = (PATH_LENGTH - h2 - 2) / 4;
-
-	n = (1ULL << h1 * 4) - 1;
-
-	//printf("h1 = %d, h2 = %d n = %lu\n", h1, h2, n);
-
-	start = time(0);
-
-	signal(SIGQUIT, handler);
-	signal(SIGINT, handler);
-	signal(SIGALRM, handler);
-	signal(SIGUSR1, handler);
-	alarm(60);
-
-	if (argc > optind + 1) {
-		fprintf(stderr, "too many extra args %d\n", argc - optind);
-		usage(argv[0]);
-		return 1;
-	} else if (argv[optind] != NULL) {
-		if (chdir(argv[optind]) < 0) {
-			sprintf(msg, "chdir '%s'\n", argv[optind]);
-			perror(msg);
-			return 2;
-		}
-	}
-
-	while (!stop && loop_count != 0 && loops < loop_count) {
-		int j,k,l,m;
-
-		srand(seed + loops);
-		if (mkdir("tmp", S_IRWXU) == -1) {
-			perror("mkdir tmp");
-			return(1);
-		}
-		if (chdir("tmp") == -1) {
-			perror("chdir tmp");
-			return(1);
-		}
-
-		for (i = 0; i < file_count ; i++) {
-			j = random() & n;
-			k = random() & n;
-			l = random() & n;
-			m = random() & n;
-			sprintf(names[i].from, "%0*x%0*x%0*x%0*x0%0*x",
-				h1, j, h1, k, h1, l, h1, m, h2, i);
-			sprintf(names[i].to, "%0*x%0*x%0*x%0*x1%0*x",
-				h1, j, h1, k, h1, l, h1, m, h2, i);
-
-		}
-
-		for (i = 0; i < file_count; i++) {
-			if (mknod(names[i].from, S_IFREG | S_IRWXU, 0) == -1) {
-				sprintf(msg, "loop %d.%d: creat %s",
-					loops, i, names[i].from);
-				perror(msg);
-				creat_errors++;
-				if (!opt_exit_on_err)
-					return 4;
-			}
-		}
-
-		if (opt_create_only)
-			return 0;
-
-		for (i = 0; i < file_count; i++) {
-			if (rename(names[i].from, names[i].to) == -1) {
-				sprintf(msg, "loop %d.%d: rename %s to %s",
-					loops, i, names[i].from, names[i].to);
-				perror(msg);
-				rename_errors++;
-				if (!opt_exit_on_err)
-					return 4;
-			}
-		}
-
-		if (opt_rename_only)
-			return 0;
-
-		for (i = 0; i < file_count; i++) {
-			if (unlink(names[i].to) == -1) {
-				sprintf(msg, "loop %d.%d: unlink %s",
-					loops, i, names[i].to);
-				perror(msg);
-				unlink_errors++;
-				if (!opt_exit_on_err)
-					return 4;
-			}
-		}
-
-		if (chdir("..") == -1) {
-			perror("chdir ..");
-			return(1);
-		}
-
-		if (rmdir("tmp") == -1) {
-			if (chdir("tmp") == -1) {
-				perror("chdir tmp 2");
-				return(1);
-			}
-			for (i = 0; i < file_count; i++) {
-				if (unlink(names[i].from) != -1) {
-					fprintf(stderr, "loop %d.%d: "
-						"unexpected file %s\n",
-						loops, i, names[i].to);
-					unlink_errors++;
-					if (!opt_exit_on_err)
-						return 4;
-				}
-			}
-			if (chdir("..") == -1) {
-				perror("chdir .. 2");
-				return(1);
-			}
-			if (rmdir("tmp") == -1) {
-				perror("rmdir tmp");
-				return(1);
-			}
-		}
-
-		loops++;
-		if (opt_verbose)
-			handler(0);
-	}
-
-	if (!opt_verbose)
-		handler(0);
-	return(0);
-}
diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh
deleted file mode 100755
index 5e499c7bd95d3fc34f207d70a6f642830db36abb..0000000000000000000000000000000000000000
--- a/lustre/tests/replay-dual.sh
+++ /dev/null
@@ -1,440 +0,0 @@
-#!/bin/bash
-
-set -e
-
-# bug number:  10124 
-ALWAYS_EXCEPT="15c   $REPLAY_DUAL_EXCEPT"
-
-SAVE_PWD=$PWD
-PTLDEBUG=${PTLDEBUG:--1}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-SETUP=${SETUP:-""}
-CLEANUP=${CLEANUP:-""}
-MOUNT_2=${MOUNT_2:-"yes"}
-. $LUSTRE/tests/test-framework.sh
-
-init_test_env $@
-
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-#
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 5 14"
-
-build_test_filter
-
-cleanup_and_setup_lustre
-rm -rf $DIR/[df][0-9]*
-
-[ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
-
-test_1() {
-    touch $MOUNT1/a
-    replay_barrier mds
-    touch $MOUNT2/b
-
-    fail mds
-    checkstat $MOUNT2/a || return 1
-    checkstat $MOUNT1/b || return 2
-    rm $MOUNT2/a $MOUNT1/b
-    checkstat $MOUNT1/a && return 3
-    checkstat $MOUNT2/b && return 4
-    return 0
-}
-
-run_test 1 "|X| simple create"
-
-
-test_2() {
-    replay_barrier mds
-    mkdir $MOUNT1/adir
-
-    fail mds
-    checkstat $MOUNT2/adir || return 1
-    rmdir $MOUNT2/adir
-    checkstat $MOUNT2/adir && return 2
-    return 0
-}
-run_test 2 "|X| mkdir adir"
-
-test_3() {
-    replay_barrier mds
-    mkdir $MOUNT1/adir
-    mkdir $MOUNT2/adir/bdir
-
-    fail mds
-    checkstat $MOUNT2/adir      || return 1
-    checkstat $MOUNT1/adir/bdir || return 2
-    rmdir $MOUNT2/adir/bdir $MOUNT1/adir
-    checkstat $MOUNT1/adir      && return 3
-    checkstat $MOUNT2/adir/bdir && return 4
-    return 0
-}
-run_test 3 "|X| mkdir adir, mkdir adir/bdir "
-
-test_4() {
-    mkdir $MOUNT1/adir
-    replay_barrier mds
-    mkdir $MOUNT1/adir  && return 1
-    mkdir $MOUNT2/adir/bdir
-
-    fail mds
-    checkstat $MOUNT2/adir      || return 2
-    checkstat $MOUNT1/adir/bdir || return 3
-
-    rmdir $MOUNT2/adir/bdir $MOUNT1/adir
-    checkstat $MOUNT1/adir      && return 4
-    checkstat $MOUNT2/adir/bdir && return 5
-    return 0
-}
-run_test 4 "|X| mkdir adir (-EEXIST), mkdir adir/bdir "
-
-
-test_5() {
-    # multiclient version of replay_single.sh/test_8
-    mcreate $MOUNT1/a
-    multiop_bg_pause $MOUNT2/a o_tSc || return  1
-    pid=$!
-    rm -f $MOUNT1/a
-    replay_barrier mds
-    kill -USR1 $pid
-    wait $pid || return 1
-
-    fail mds
-    [ -e $MOUNT2/a ] && return 2
-    return 0
-}
-run_test 5 "open, unlink |X| close"
-
-
-test_6() {
-    mcreate $MOUNT1/a
-    multiop_bg_pause $MOUNT2/a o_c || return 1
-    pid1=$!
-    multiop_bg_pause $MOUNT1/a o_c || return 1
-    pid2=$!
-    rm -f $MOUNT1/a
-    replay_barrier mds
-    kill -USR1 $pid1
-    wait $pid1 || return 1
-
-    fail mds
-    kill -USR1 $pid2
-    wait $pid2 || return 1
-    [ -e $MOUNT2/a ] && return 2
-    return 0
-}
-run_test 6 "open1, open2, unlink |X| close1 [fail mds] close2"
-
-test_8() {
-    replay_barrier mds
-    drop_reint_reply "mcreate $MOUNT1/$tfile"    || return 1
-    fail mds
-    checkstat $MOUNT2/$tfile || return 2
-    rm $MOUNT1/$tfile || return 3
-
-    return 0
-}
-run_test 8 "replay of resent request"
-
-test_9() {
-    replay_barrier mds
-    mcreate $MOUNT1/$tfile-1
-    mcreate $MOUNT2/$tfile-2
-    # drop first reint reply
-    do_facet mds sysctl -w lustre.fail_loc=0x80000119
-    fail mds
-    do_facet mds sysctl -w lustre.fail_loc=0
-
-    rm $MOUNT1/$tfile-[1,2] || return 1
-
-    return 0
-}
-run_test 9 "resending a replayed create"
-
-test_10() {
-    mcreate $MOUNT1/$tfile-1
-    replay_barrier mds
-    munlink $MOUNT1/$tfile-1
-    mcreate $MOUNT2/$tfile-2
-    # drop first reint reply
-    do_facet mds sysctl -w lustre.fail_loc=0x80000119
-    fail mds
-    do_facet mds sysctl -w lustre.fail_loc=0
-
-    checkstat $MOUNT1/$tfile-1 && return 1
-    checkstat $MOUNT1/$tfile-2 || return 2
-    rm $MOUNT1/$tfile-2
-
-    return 0
-}
-run_test 10 "resending a replayed unlink"
-
-test_11() {
-    replay_barrier mds
-    mcreate $MOUNT1/$tfile-1
-    mcreate $MOUNT2/$tfile-2
-    mcreate $MOUNT1/$tfile-3
-    mcreate $MOUNT2/$tfile-4
-    mcreate $MOUNT1/$tfile-5
-    # drop all reint replies for a while
-    do_facet mds sysctl -w lustre.fail_loc=0x0119
-    # note that with this fail_loc set, facet_failover df will fail
-    facet_failover mds
-    #sleep for while, let both clients reconnect and timeout
-    sleep $((TIMEOUT * 2))
-    do_facet mds sysctl -w lustre.fail_loc=0
-    client_df
-    while [ -z "$(ls $MOUNT1/$tfile-[1-5] 2>/dev/null)" ]; do
-	sleep 5
-	echo -n "."
-    done
-    ls $MOUNT1/$tfile-[1-5]
-    rm $MOUNT1/$tfile-[1-5] || return 1
-
-    return 0
-}
-run_test 11 "both clients timeout during replay"
-
-test_12() {
-    replay_barrier mds
-
-    multiop_bg_pause $DIR/$tfile mo_c || return 1
-    MULTIPID=$!
-
-#define OBD_FAIL_LDLM_ENQUEUE            0x302
-    do_facet mds sysctl -w lustre.fail_loc=0x80000302
-    facet_failover mds
-    do_facet mds sysctl -w lustre.fail_loc=0
-    df $MOUNT || { kill -USR1 $MULTIPID  && return 1; }
-
-    ls $DIR/$tfile
-    kill -USR1 $MULTIPID || return 3
-    wait $MULTIPID || return 4
-    $CHECKSTAT -t file $DIR/$tfile || return 2
-    rm $DIR/$tfile
-
-    return 0
-}
-run_test 12 "open resend timeout"
-
-test_13() {
-    multiop_bg_pause $DIR/$tfile mo_c || return 1
-    MULTIPID=$!
-
-    replay_barrier mds
-
-    kill -USR1 $MULTIPID || return 3
-    wait $MULTIPID || return 4
-
-    # drop close 
-    do_facet mds sysctl -w lustre.fail_loc=0x80000115
-    facet_failover mds
-    do_facet mds sysctl -w lustre.fail_loc=0
-    df $MOUNT || return 1
-
-    ls $DIR/$tfile
-    $CHECKSTAT -t file $DIR/$tfile || return 2
-    rm $DIR/$tfile
-
-    return 0
-}
-run_test 13 "close resend timeout"
-
-test_14() {
-    replay_barrier mds
-    createmany -o $MOUNT1/$tfile- 25
-    createmany -o $MOUNT2/$tfile-2- 1
-    createmany -o $MOUNT1/$tfile-3- 25
-    umount $MOUNT2
-
-    facet_failover mds
-    # expect recovery to fail due to missing client 2
-    df $MOUNT && return 1
-    sleep 1
-
-    # first 25 files should have been replayed 
-    unlinkmany $MOUNT1/$tfile- 25 || return 2
-
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail" 
-    return 0
-}
-run_test 14 "timeouts waiting for lost client during replay"
-
-test_15() {
-    replay_barrier mds
-    createmany -o $MOUNT1/$tfile- 25
-    createmany -o $MOUNT2/$tfile-2- 1
-    umount $MOUNT2
-
-    facet_failover mds
-    df $MOUNT || return 1
-
-    unlinkmany $MOUNT1/$tfile- 25 || return 2
-    [ -e $MOUNT1/$tfile-2-0 ] && error "$tfile-2-0 exists"
-
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
-    return 0
-}
-run_test 15 "timeout waiting for lost client during replay, 1 client completes"
-
-test_15a() {
-    local ost_last_id=""
-    local osc_last_id=""
-    
-    replay_barrier mds
-    echo "data" > "$MOUNT2/${tfile}-m2"
-
-    umount $MOUNT2
-    facet_failover mds
-    df $MOUNT || return 1
-    
-    ost_last_id=`cat /proc/fs/lustre/obdfilter/*/last_id`
-    mds_last_id=`cat /proc/fs/lustre/osc/*mds*/last_id`
-    
-    echo "Ids after MDS<->OST synchonizing"
-    echo "--------------------------------"
-    echo "MDS last_id:"
-    echo $mds_last_id
-    echo "OST last_id:"
-    echo $ost_last_id
-
-    local i=0
-    echo $ost_last_id | while read id; do
-	ost_ids[$i]=$id
-	((i++))
-    done
-    
-    i=0
-    echo $mds_last_id | while read id; do
-	mds_ids[$i]=$id
-	((i++))
-    done
-    
-    local arr_len=${#mds_ids[*]}
-    for ((i=0;i<$arr_len;i++)); do
-	    mds_id=${mds_ids[i]}
-	    ost_id=${ost_ids[i]}
-	    
-	    test $mds_id -ge $ost_id || {
-		echo "MDS last id ($mds_id) is smaller than OST one ($ost_id)"
-		return 2
-	    }
-    done
-
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
-    return 0
-}
-#CROW run_test 15a "OST clear orphans - synchronize ids on MDS and OST"
-
-test_15b() {
-    replay_barrier mds
-    echo "data" > "$MOUNT2/${tfile}-m2"
-    umount $MOUNT2
-
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000802"
-    facet_failover mds
-
-    df $MOUNT || return 1
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-    
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
-    return 0
-}
-#CROW run_test 15b "multiple delayed OST clear orphans"
-
-test_15c() {
-    replay_barrier mds
-    for ((i = 0; i < 2000; i++)); do
-	echo "data" > "$MOUNT2/${tfile}-$i" || error "create ${tfile}-$i failed"
-    done
-    
-    umount $MOUNT2
-    facet_failover mds
-
-    df $MOUNT || return 1
-    
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
-    return 0
-}
-run_test 15c "remove multiple OST orphans"
-
-test_16() {
-    replay_barrier mds
-    createmany -o $MOUNT1/$tfile- 25
-    createmany -o $MOUNT2/$tfile-2- 1
-    umount $MOUNT2
-
-    facet_failover mds
-    sleep $TIMEOUT
-    facet_failover mds
-    df $MOUNT || return 1
-
-    unlinkmany $MOUNT1/$tfile- 25 || return 2
-
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
-    return 0
-
-}
-run_test 16 "fail MDS during recovery (3571)"
-
-test_17() {
-    createmany -o $MOUNT1/$tfile- 25
-    createmany -o $MOUNT2/$tfile-2- 1
-
-    # Make sure the disconnect is lost
-    replay_barrier ost1
-    umount $MOUNT2
-
-    facet_failover ost1
-    sleep $TIMEOUT
-    facet_failover ost1
-    df $MOUNT || return 1
-
-    unlinkmany $MOUNT1/$tfile- 25 || return 2
-
-    zconf_mount `hostname` $MOUNT2 || error "mount $MOUNT2 fail"
-    return 0
-
-}
-run_test 17 "fail OST during recovery (3571)"
-
-# cleanup with blocked enqueue fails until timer elapses (MDS busy), wait for it
-export NOW=0
-
-test_18() { # bug 3822 - evicting client with enqueued lock
-    #set -vx
-    mkdir -p $MOUNT1/$tdir
-    touch $MOUNT1/$tdir/f0
-#define OBD_FAIL_LDLM_ENQUEUE_BLOCKED    0x30b
-    statmany -s $MOUNT1/$tdir/f 1 500 &
-    OPENPID=$!
-    NOW=`date +%s`
-    do_facet mds sysctl -w lustre.fail_loc=0x8000030b  # hold enqueue
-    sleep 1
-#define OBD_FAIL_LDLM_BL_CALLBACK        0x305
-    do_facet client sysctl -w lustre.fail_loc=0x80000305  # drop cb, evict
-    cancel_lru_locks mdc
-    sleep 0.500s # wait to ensure first client is one that will be evicted
-    openfile -f O_RDONLY $MOUNT2/$tdir/f0
-    wait $OPENPID
-    dmesg | grep "entering recovery in server" && \
-        error "client not evicted" || true
-}
-run_test 18 "ldlm_handle_enqueue succeeds on evicted export (3822)"
-
-test_19() { # Bug 10991 - resend of open request does not fail assertion.
-    replay_barrier mds
-    drop_ldlm_reply "createmany -o $DIR/$tfile 1" || return 1
-    fail mds
-    checkstat $DIR2/${tfile}0 || return 2
-    rm $DIR/${tfile}0 || return 3
-
-    return 0
-}
-run_test 19 "resend of open request"
-
-equals_msg `basename $0`: test complete, cleaning up
-SLEEP=$((`date +%s` - $NOW))
-[ $SLEEP -lt $TIMEOUT ] && sleep $SLEEP
-check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
diff --git a/lustre/tests/replay-ost-single.sh b/lustre/tests/replay-ost-single.sh
deleted file mode 100755
index 8f5765e9c361d0466d1bdd217d9701c8cc159ff5..0000000000000000000000000000000000000000
--- a/lustre/tests/replay-ost-single.sh
+++ /dev/null
@@ -1,176 +0,0 @@
-#!/bin/bash
-
-set -e
-
-PTLDEBUG=${PTLDEBUG:--1}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-SETUP=${SETUP:-""}
-CLEANUP=${CLEANUP:-""}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-ostfailover_HOST=${ostfailover_HOST:-$ost_HOST}
-#failover= must be defined in OST_MKFS_OPTIONS if ostfailover_HOST != ost_HOST
-
-# Tests that fail on uml
-CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
-[ "$CPU" = "UML" ] && EXCEPT="$EXCEPT 6"
-
-# Skip these tests
-# BUG NUMBER: 
-ALWAYS_EXCEPT="$REPLAY_OST_SINGLE_EXCEPT"
-
-#					
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
-
-# It is replay-ost-single, after all
-OSTCOUNT=1
-
-build_test_filter
-
-REFORMAT=--reformat cleanup_and_setup_lustre
-rm -rf $DIR/[df][0-9]*
-
-test_0a() {
-    zconf_umount `hostname` $MOUNT -f
-    # needs to run during initial client->OST connection
-    #define OBD_FAIL_OST_ALL_REPLY_NET       0x211
-    do_facet ost "sysctl -w lustre.fail_loc=0x80000211"
-    zconf_mount `hostname` $MOUNT && df $MOUNT || error "0a mount fail"
-}
-run_test 0a "target handle mismatch (bug 5317) `date +%H:%M:%S`"
-
-test_0b() {
-    fail ost1
-    cp /etc/profile  $DIR/$tfile
-    sync
-    diff /etc/profile $DIR/$tfile
-    rm -f $DIR/$tfile
-}
-run_test 0b "empty replay"
-
-test_1() {
-    date > $DIR/$tfile
-    fail ost1
-    $CHECKSTAT -t file $DIR/$tfile || return 1
-    rm -f $DIR/$tfile
-}
-run_test 1 "touch"
-
-test_2() {
-    for i in `seq 10`; do
-        echo "tag-$i" > $DIR/$tfile-$i
-    done 
-    fail ost1
-    for i in `seq 10`; do
-      grep -q "tag-$i" $DIR/$tfile-$i || error "f2-$i"
-    done 
-    rm -f $DIR/$tfile-*
-}
-run_test 2 "|x| 10 open(O_CREAT)s"
-
-test_3() {
-    verify=$ROOT/tmp/verify-$$
-    dd if=/dev/urandom bs=4096 count=1280 | tee $verify > $DIR/$tfile &
-    ddpid=$!
-    sync &
-    fail ost1
-    wait $ddpid || return 1
-    cmp $verify $DIR/$tfile || return 2
-    rm -f $verify $DIR/$tfile
-}
-run_test 3 "Fail OST during write, with verification"
-
-test_4() {
-    verify=$ROOT/tmp/verify-$$
-    dd if=/dev/urandom bs=4096 count=1280 | tee $verify > $DIR/$tfile
-    # invalidate cache, so that we're reading over the wire
-    cancel_lru_locks osc
-    cmp $verify $DIR/$tfile &
-    cmppid=$!
-    fail ost1
-    wait $cmppid || return 1
-    rm -f $verify $DIR/$tfile
-}
-run_test 4 "Fail OST during read, with verification"
-
-test_5() {
-    [ -z "`which iozone 2> /dev/null`" ] && log "iozone missing" && return
-    FREE=`df -P -h $DIR | tail -n 1 | awk '{ print $3 }'`
-    case $FREE in
-    *T|*G) FREE=1G;;
-    esac
-    IOZONE_OPTS="-i 0 -i 1 -i 2 -+d -r 4 -s $FREE"
-    iozone $IOZONE_OPTS -f $DIR/$tfile &
-    PID=$!
-    
-    sleep 8
-    fail ost1
-    wait $PID
-    RC=$?
-    log "iozone rc=$RC"
-    rm -f $DIR/$tfile
-    [ $RC -ne 0 ] && return $RC || true
-}
-run_test 5 "Fail OST during iozone"
-
-kbytesfree() {
-   awk '{total+=$1} END {print total}' /proc/fs/lustre/osc/*-osc-*/kbytesfree
-}
-
-test_6() {
-    f=$DIR/$tfile
-    rm -f $f
-    sync && sleep 2 && sync	# wait for delete thread
-    before=`kbytesfree`
-    dd if=/dev/urandom bs=4096 count=1280 of=$f || return 28
-    lfs getstripe $f
-    sync
-    sleep 2					# ensure we have a fresh statfs
-    sync
-#define OBD_FAIL_MDS_REINT_NET_REP       0x119
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-    after_dd=`kbytesfree`
-    log "before: $before after_dd: $after_dd"
-    (( $before > $after_dd )) || return 1
-    rm -f $f
-    fail ost1
-    $CHECKSTAT -t file $f && return 2 || true
-    sync
-    # let the delete happen
-    sleep 5
-    after=`kbytesfree`
-    log "before: $before after: $after"
-    (( $before <= $after + 40 )) || return 3	# take OST logs into account
-}
-run_test 6 "Fail OST before obd_destroy"
-
-test_7() {
-    f=$DIR/$tfile
-    rm -f $f
-    sync && sleep 2 && sync	# wait for delete thread
-    before=`kbytesfree`
-    dd if=/dev/urandom bs=4096 count=1280 of=$f || return 4
-    sync
-    sleep 2					# ensure we have a fresh statfs
-    sync
-    after_dd=`kbytesfree`
-    log "before: $before after_dd: $after_dd"
-    (( $before > $after_dd )) || return 1
-    replay_barrier ost1
-    rm -f $f
-    fail ost1
-    $CHECKSTAT -t file $f && return 2 || true
-    sync
-    # let the delete happen
-    sleep 2
-    after=`kbytesfree`
-    log "before: $before after: $after"
-    (( $before <= $after + 40 )) || return 3	# take OST logs into account
-}
-run_test 7 "Fail OST before obd_destroy"
-
-equals_msg `basename $0`: test complete, cleaning up
-check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
diff --git a/lustre/tests/replay-single.sh b/lustre/tests/replay-single.sh
deleted file mode 100755
index 1ce5c2cb1646e495aa622bd1cfada18d065aad20..0000000000000000000000000000000000000000
--- a/lustre/tests/replay-single.sh
+++ /dev/null
@@ -1,1568 +0,0 @@
-#!/bin/bash
-
-set -e
-#set -v
-
-#
-# This test needs to be run on the client
-#
-SAVE_PWD=$PWD
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-SETUP=${SETUP:-}
-CLEANUP=${CLEANUP:-}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-CHECK_GRANT=${CHECK_GRANT:-"yes"}
-GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
-
-# Skip these tests
-# bug number: 
-ALWAYS_EXCEPT="$REPLAY_SINGLE_EXCEPT"
-
-#                                                     63 min  7 min  AT AT AT AT"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="1 2 3 4 6 6b 12 16 44      44b    65 66 67 68"
-
-build_test_filter
-
-cleanup_and_setup_lustre
-
-mkdir -p $DIR
-
-rm -rf $DIR/[df][0-9]*
-
-test_0() {
-    replay_barrier mds
-    fail mds
-}
-run_test 0 "empty replay"
-
-test_0b() {
-    # this test attempts to trigger a race in the precreation code, 
-    # and must run before any other objects are created on the filesystem
-    fail ost1
-    createmany -o $DIR/$tfile 20 || return 1
-    unlinkmany $DIR/$tfile 20 || return 2
-}
-run_test 0b "ensure object created after recover exists. (3284)"
-
-test_1() {
-    replay_barrier mds
-    mcreate $DIR/$tfile
-    fail mds
-    $CHECKSTAT -t file $DIR/$tfile || return 1
-    rm $DIR/$tfile
-}
-run_test 1 "simple create"
-
-test_1a() {
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-
-    rm -fr $DIR/$tfile
-    local old_last_id=`cat $LPROC/obdfilter/*/last_id`
-    touch -o $DIR/$tfile 1
-    sync
-    local new_last_id=`cat $LPROC/obdfilter/*/last_id`
-    
-    test "$old_last_id" = "$new_last_id" || {
-	echo "OST object create is caused by MDS"
-	return 1
-    }
-    
-    old_last_id=`cat $LPROC/obdfilter/*/last_id`
-    echo "data" > $DIR/$tfile
-    sync
-    new_last_id=`cat $LPROC/obdfilter/*/last_id`
-    test "$old_last_id" = "$new_last_id "&& {
-	echo "CROW does not work on write"
-	return 1
-    }
-    
-    rm -fr $DIR/$tfile
-
-#define OBD_FAIL_OST_CROW_EIO | OBD_FAIL_ONCE
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000801"
-
-    rm -fr $DIR/1a1
-    old_last_id=`cat $LPROC/obdfilter/*/last_id`
-    echo "data" > $DIR/1a1
-    sync
-    new_last_id=`cat $LPROC/obdfilter/*/last_id`
-    test "$old_last_id" = "$new_last_id" || {
-	echo "CROW does work with fail_loc=0x80000801"
-	return 1
-    }
-    
-    rm -fr $DIR/1a1
-    
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-}
-#CROW run_test 1a "CROW object create (check OST last_id)"
-
-test_2a() {
-    replay_barrier mds
-    touch $DIR/$tfile
-    fail mds
-    $CHECKSTAT -t file $DIR/$tfile || return 1
-    rm $DIR/$tfile
-}
-run_test 2a "touch"
-
-test_2b() {
-    mcreate $DIR/$tfile
-    replay_barrier mds
-    touch $DIR/$tfile
-    fail mds
-    $CHECKSTAT -t file $DIR/$tfile || return 1
-    rm $DIR/$tfile
-}
-run_test 2b "touch"
-
-test_3a() {
-    replay_barrier mds
-    mcreate $DIR/$tfile
-    o_directory $DIR/$tfile
-    fail mds
-    $CHECKSTAT -t file $DIR/$tfile || return 2
-    rm $DIR/$tfile
-}
-run_test 3a "replay failed open(O_DIRECTORY)"
-
-test_3b() {
-    replay_barrier mds
-#define OBD_FAIL_MDS_OPEN_PACK | OBD_FAIL_ONCE
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000114"
-    touch $DIR/$tfile
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    fail mds
-    $CHECKSTAT -t file $DIR/$tfile && return 2
-    return 0
-}
-run_test 3b "replay failed open -ENOMEM"
-
-test_3c() {
-    replay_barrier mds
-#define OBD_FAIL_MDS_ALLOC_OBDO | OBD_FAIL_ONCE
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000128"
-    touch $DIR/$tfile
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    fail mds
-
-    $CHECKSTAT -t file $DIR/$tfile && return 2
-    return 0
-}
-run_test 3c "replay failed open -ENOMEM"
-
-test_4() {
-    replay_barrier mds
-    for i in `seq 10`; do
-        echo "tag-$i" > $DIR/$tfile-$i
-    done 
-    fail mds
-    for i in `seq 10`; do
-      grep -q "tag-$i" $DIR/$tfile-$i || error "$tfile-$i"
-    done 
-}
-run_test 4 "|x| 10 open(O_CREAT)s"
-
-test_4b() {
-    replay_barrier mds
-    rm -rf $DIR/$tfile-*
-    fail mds
-    $CHECKSTAT -t file $DIR/$tfile-* && return 1 || true
-}
-run_test 4b "|x| rm 10 files"
-
-# The idea is to get past the first block of precreated files on both 
-# osts, and then replay.
-test_5() {
-    replay_barrier mds
-    for i in `seq 220`; do
-        echo "tag-$i" > $DIR/$tfile-$i
-    done 
-    fail mds
-    for i in `seq 220`; do
-      grep -q "tag-$i" $DIR/$tfile-$i || error "f1c-$i"
-    done 
-    rm -rf $DIR/$tfile-*
-    sleep 3
-    # waiting for commitment of removal
-}
-run_test 5 "|x| 220 open(O_CREAT)"
-
-
-test_6() {
-    replay_barrier mds
-    mcreate $DIR/$tdir/$tfile
-    fail mds
-    $CHECKSTAT -t dir $DIR/$tdir || return 1
-    $CHECKSTAT -t file $DIR/$tdir/$tfile || return 2
-    sleep 2
-    # waiting for log process thread
-}
-run_test 6 "mkdir + contained create"
-
-test_6b() {
-    replay_barrier mds
-    rm -rf $DIR/$tdir
-    fail mds
-    $CHECKSTAT -t dir $DIR/$tdir && return 1 || true 
-}
-run_test 6b "|X| rmdir"
-
-test_7() {
-    replay_barrier mds
-    mcreate $DIR/$tdir/$tfile
-    fail mds
-    $CHECKSTAT -t dir $DIR/$tdir || return 1
-    $CHECKSTAT -t file $DIR/$tdir/$tfile || return 2
-    rm -fr $DIR/$tdir
-}
-run_test 7 "mkdir |X| contained create"
-
-test_8() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile mo_c || return 4
-    MULTIPID=$!
-    fail mds
-    ls $DIR/$tfile
-    $CHECKSTAT -t file $DIR/$tfile || return 1
-    kill -USR1 $MULTIPID || return 2
-    wait $MULTIPID || return 3
-    rm $DIR/$tfile
-}
-run_test 8 "creat open |X| close"
-
-test_9() {
-    replay_barrier mds
-    mcreate $DIR/$tfile
-    local old_inum=`ls -i $DIR/$tfile | awk '{print $1}'`
-    fail mds
-    local new_inum=`ls -i $DIR/$tfile | awk '{print $1}'`
-
-    echo " old_inum == $old_inum, new_inum == $new_inum"
-    if [ $old_inum -eq $new_inum  ] ;
-    then
-        echo " old_inum and new_inum match"
-    else
-        echo "!!!! old_inum and new_inum NOT match"
-        return 1
-    fi
-    rm $DIR/$tfile
-}
-run_test 9  "|X| create (same inum/gen)"
-
-test_10() {
-    mcreate $DIR/$tfile
-    replay_barrier mds
-    mv $DIR/$tfile $DIR/$tfile-2
-    rm -f $DIR/$tfile
-    fail mds
-    $CHECKSTAT $DIR/$tfile && return 1
-    $CHECKSTAT $DIR/$tfile-2 ||return 2
-    rm $DIR/$tfile-2
-    return 0
-}
-run_test 10 "create |X| rename unlink"
-
-test_11() {
-    mcreate $DIR/$tfile
-    echo "old" > $DIR/$tfile
-    mv $DIR/$tfile $DIR/$tfile-2
-    replay_barrier mds
-    echo "new" > $DIR/$tfile
-    grep new $DIR/$tfile 
-    grep old $DIR/$tfile-2
-    fail mds
-    grep new $DIR/$tfile || return 1
-    grep old $DIR/$tfile-2 || return 2
-}
-run_test 11 "create open write rename |X| create-old-name read"
-
-test_12() {
-    mcreate $DIR/$tfile 
-    multiop_bg_pause $DIR/$tfile o_tSc || return 3
-    pid=$!
-    rm -f $DIR/$tfile
-    replay_barrier mds
-    kill -USR1 $pid
-    wait $pid || return 1
-
-    fail mds
-    [ -e $DIR/$tfile ] && return 2
-    return 0
-}
-run_test 12 "open, unlink |X| close"
-
-
-# 1777 - replay open after committed chmod that would make
-#        a regular open a failure    
-test_13() {
-    mcreate $DIR/$tfile 
-    multiop_bg_pause $DIR/$tfile O_wc || return 3
-    pid=$!
-    chmod 0 $DIR/$tfile
-    $CHECKSTAT -p 0 $DIR/$tfile
-    replay_barrier mds
-    fail mds
-    kill -USR1 $pid
-    wait $pid || return 1
-
-    $CHECKSTAT -s 1 -p 0 $DIR/$tfile || return 2
-    return 0
-}
-run_test 13 "open chmod 0 |x| write close"
-
-test_14() {
-    multiop_bg_pause $DIR/$tfile O_tSc || return 4
-    pid=$!
-    rm -f $DIR/$tfile
-    replay_barrier mds
-    kill -USR1 $pid || return 1
-    wait $pid || return 2
-
-    fail mds
-    [ -e $DIR/$tfile ] && return 3
-    return 0
-}
-run_test 14 "open(O_CREAT), unlink |X| close"
-
-test_15() {
-    multiop_bg_pause $DIR/$tfile O_tSc || return 5
-    pid=$!
-    rm -f $DIR/$tfile
-    replay_barrier mds
-    touch $DIR/g11 || return 1
-    kill -USR1 $pid
-    wait $pid || return 2
-
-    fail mds
-    [ -e $DIR/$tfile ] && return 3
-    touch $DIR/h11 || return 4
-    return 0
-}
-run_test 15 "open(O_CREAT), unlink |X|  touch new, close"
-
-
-test_16() {
-    replay_barrier mds
-    mcreate $DIR/$tfile
-    munlink $DIR/$tfile
-    mcreate $DIR/$tfile-2
-    fail mds
-    [ -e $DIR/$tfile ] && return 1
-    [ -e $DIR/$tfile-2 ] || return 2
-    munlink $DIR/$tfile-2 || return 3
-}
-run_test 16 "|X| open(O_CREAT), unlink, touch new,  unlink new"
-
-test_17() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile O_c || return 4
-    pid=$!
-    fail mds
-    kill -USR1 $pid || return 1
-    wait $pid || return 2
-    $CHECKSTAT -t file $DIR/$tfile || return 3
-    rm $DIR/$tfile
-}
-run_test 17 "|X| open(O_CREAT), |replay| close"
-
-test_18() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile O_tSc || return 8
-    pid=$!
-    rm -f $DIR/$tfile
-    touch $DIR/$tfile-2 || return 1
-    echo "pid: $pid will close"
-    kill -USR1 $pid
-    wait $pid || return 2
-
-    fail mds
-    [ -e $DIR/$tfile ] && return 3
-    [ -e $DIR/$tfile-2 ] || return 4
-    # this touch frequently fails
-    touch $DIR/$tfile-3 || return 5
-    munlink $DIR/$tfile-2 || return 6
-    munlink $DIR/$tfile-3 || return 7
-    return 0
-}
-run_test 18 "|X| open(O_CREAT), unlink, touch new, close, touch, unlink"
-
-# bug 1855 (a simpler form of test_11 above)
-test_19() {
-    replay_barrier mds
-    mcreate $DIR/$tfile
-    echo "old" > $DIR/$tfile
-    mv $DIR/$tfile $DIR/$tfile-2
-    grep old $DIR/$tfile-2
-    fail mds
-    grep old $DIR/$tfile-2 || return 2
-}
-run_test 19 "|X| mcreate, open, write, rename "
-
-test_20() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile O_tSc || return 3
-    pid=$!
-    rm -f $DIR/$tfile
-
-    fail mds
-    kill -USR1 $pid
-    wait $pid || return 1
-    [ -e $DIR/$tfile ] && return 2
-    return 0
-}
-run_test 20 "|X| open(O_CREAT), unlink, replay, close (test mds_cleanup_orphans)"
-
-test_20b() { # bug 10480
-    BEFOREUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'`
-
-    dd if=/dev/zero of=$DIR/$tfile bs=4k count=10000 &
-    pid=$!
-    while [ ! -e $DIR/$tfile ] ; do
-        sleep 0.060s                           # give dd a chance to start
-    done
-
-    lfs getstripe $DIR/$tfile || return 1
-    rm -f $DIR/$tfile || return 2       # make it an orphan
-    mds_evict_client
-    df -P $DIR || df -P $DIR || true    # reconnect
-
-    fail mds                            # start orphan recovery
-    df -P $DIR || df -P $DIR || true    # reconnect
-    wait_mds_recovery_done || error "MDS recovery not done"
-
-    AFTERUSED=`df -P $DIR | tail -1 | awk '{ print $3 }'`
-    log "before $BEFOREUSED, after $AFTERUSED"
-    [ $AFTERUSED -gt $((BEFOREUSED + 20)) ] && \
-        error "after $AFTERUSED > before $BEFOREUSED" && return 5
-    return 0
-}
-run_test 20b "write, unlink, eviction, replay, (test mds_cleanup_orphans)"
-
-test_20c() { # bug 10480
-    multiop $DIR/$tfile Ow_c &
-    pid=$!
-    # give multiop a chance to open
-    sleep 1
-
-    ls -la $DIR/$tfile
-
-    mds_evict_client
-
-    df -P $DIR || df -P $DIR || true    # reconnect
-
-    kill -USR1 $pid
-    test -s $DIR/$tfile || error "File was truncated"
-
-    return 0
-}
-run_test 20c "check that client eviction does not affect file content"
-
-test_21() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile O_tSc || return 5
-    pid=$!
-    rm -f $DIR/$tfile
-    touch $DIR/g11 || return 1
-
-    fail mds
-    kill -USR1 $pid
-    wait $pid || return 2
-    [ -e $DIR/$tfile ] && return 3
-    touch $DIR/h11 || return 4
-    return 0
-}
-run_test 21 "|X| open(O_CREAT), unlink touch new, replay, close (test mds_cleanup_orphans)"
-
-test_22() {
-    multiop_bg_pause $DIR/$tfile O_tSc || return 3
-    pid=$!
-
-    replay_barrier mds
-    rm -f $DIR/$tfile
-
-    fail mds
-    kill -USR1 $pid
-    wait $pid || return 1
-    [ -e $DIR/$tfile ] && return 2
-    return 0
-}
-run_test 22 "open(O_CREAT), |X| unlink, replay, close (test mds_cleanup_orphans)"
-
-test_23() {
-    multiop_bg_pause $DIR/$tfile O_tSc || return 5
-    pid=$!
-
-    replay_barrier mds
-    rm -f $DIR/$tfile
-    touch $DIR/g11 || return 1
-
-    fail mds
-    kill -USR1 $pid
-    wait $pid || return 2
-    [ -e $DIR/$tfile ] && return 3
-    touch $DIR/h11 || return 4
-    return 0
-}
-run_test 23 "open(O_CREAT), |X| unlink touch new, replay, close (test mds_cleanup_orphans)"
-
-test_24() {
-    multiop_bg_pause $DIR/$tfile O_tSc || return 3
-    pid=$!
-
-    replay_barrier mds
-    fail mds
-    rm -f $DIR/$tfile
-    kill -USR1 $pid
-    wait $pid || return 1
-    [ -e $DIR/$tfile ] && return 2
-    return 0
-}
-run_test 24 "open(O_CREAT), replay, unlink, close (test mds_cleanup_orphans)"
-
-test_25() {
-    multiop_bg_pause $DIR/$tfile O_tSc || return 3
-    pid=$!
-    rm -f $DIR/$tfile
-
-    replay_barrier mds
-    fail mds
-    kill -USR1 $pid
-    wait $pid || return 1
-    [ -e $DIR/$tfile ] && return 2
-    return 0
-}
-run_test 25 "open(O_CREAT), unlink, replay, close (test mds_cleanup_orphans)"
-
-test_26() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile-1 O_tSc || return 5
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile-2 O_tSc || return 6
-    pid2=$!
-    rm -f $DIR/$tfile-1
-    rm -f $DIR/$tfile-2
-    kill -USR1 $pid2
-    wait $pid2 || return 1
-
-    fail mds
-    kill -USR1 $pid1
-    wait $pid1 || return 2
-    [ -e $DIR/$tfile-1 ] && return 3
-    [ -e $DIR/$tfile-2 ] && return 4
-    return 0
-}
-run_test 26 "|X| open(O_CREAT), unlink two, close one, replay, close one (test mds_cleanup_orphans)"
-
-test_27() {
-    replay_barrier mds
-    multiop_bg_pause $DIR/$tfile-1 O_tSc || return 5
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile-2 O_tSc || return 6
-    pid2=$!
-    rm -f $DIR/$tfile-1
-    rm -f $DIR/$tfile-2
-
-    fail mds
-    kill -USR1 $pid1
-    wait $pid1 || return 1
-    kill -USR1 $pid2
-    wait $pid2 || return 2
-    [ -e $DIR/$tfile-1 ] && return 3
-    [ -e $DIR/$tfile-2 ] && return 4
-    return 0
-}
-run_test 27 "|X| open(O_CREAT), unlink two, replay, close two (test mds_cleanup_orphans)"
-
-test_28() {
-    multiop_bg_pause $DIR/$tfile-1 O_tSc || return 5
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile-2 O_tSc || return 6
-    pid2=$!
-    replay_barrier mds
-    rm -f $DIR/$tfile-1
-    rm -f $DIR/$tfile-2
-    kill -USR1 $pid2
-    wait $pid2 || return 1
-
-    fail mds
-    kill -USR1 $pid1
-    wait $pid1 || return 2
-    [ -e $DIR/$tfile-1 ] && return 3
-    [ -e $DIR/$tfile-2 ] && return 4
-    return 0
-}
-run_test 28 "open(O_CREAT), |X| unlink two, close one, replay, close one (test mds_cleanup_orphans)"
-
-test_29() {
-    multiop_bg_pause $DIR/$tfile-1 O_tSc || return 5
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile-2 O_tSc || return 6
-    pid2=$!
-    replay_barrier mds
-    rm -f $DIR/$tfile-1
-    rm -f $DIR/$tfile-2
-
-    fail mds
-    kill -USR1 $pid1
-    wait $pid1 || return 1
-    kill -USR1 $pid2
-    wait $pid2 || return 2
-    [ -e $DIR/$tfile-1 ] && return 3
-    [ -e $DIR/$tfile-2 ] && return 4
-    return 0
-}
-run_test 29 "open(O_CREAT), |X| unlink two, replay, close two (test mds_cleanup_orphans)"
-
-test_30() {
-    multiop_bg_pause $DIR/$tfile-1 O_tSc || return 5
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile-2 O_tSc || return 6
-    pid2=$!
-    rm -f $DIR/$tfile-1
-    rm -f $DIR/$tfile-2
-
-    replay_barrier mds
-    fail mds
-    kill -USR1 $pid1
-    wait $pid1 || return 1
-    kill -USR1 $pid2
-    wait $pid2 || return 2
-    [ -e $DIR/$tfile-1 ] && return 3
-    [ -e $DIR/$tfile-2 ] && return 4
-    return 0
-}
-run_test 30 "open(O_CREAT) two, unlink two, replay, close two (test mds_cleanup_orphans)"
-
-test_31() {
-    multiop_bg_pause $DIR/$tfile-1 O_tSc || return 5
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile-2 O_tSc || return 6
-    pid2=$!
-    rm -f $DIR/$tfile-1
-
-    replay_barrier mds
-    rm -f $DIR/$tfile-2
-    fail mds
-    kill -USR1 $pid1
-    wait $pid1 || return 1
-    kill -USR1 $pid2
-    wait $pid2 || return 2
-    [ -e $DIR/$tfile-1 ] && return 3
-    [ -e $DIR/$tfile-2 ] && return 4
-    return 0
-}
-run_test 31 "open(O_CREAT) two, unlink one, |X| unlink one, close two (test mds_cleanup_orphans)"
-
-# tests for bug 2104; completion without crashing is success.  The close is
-# stale, but we always return 0 for close, so the app never sees it.
-test_32() {
-    multiop_bg_pause $DIR/$tfile O_c || return 2
-    pid1=$!
-    multiop_bg_pause $DIR/$tfile O_c || return 3
-    pid2=$!
-    mds_evict_client
-    df $MOUNT || sleep 1 && df $MOUNT || return 1
-    kill -USR1 $pid1
-    kill -USR1 $pid2
-    sleep 1
-    return 0
-}
-run_test 32 "close() notices client eviction; close() after client eviction"
-
-# Abort recovery before client complete
-test_33() {
-    replay_barrier mds
-    createmany -o $DIR/$tfile-%d 100 
-    fail_abort mds
-    # this file should be gone, because the replay was aborted
-    $CHECKSTAT -t file $DIR/$tfile-* && return 3 
-    unlinkmany $DIR/$tfile-%d 0 100
-    return 0
-}
-run_test 33 "abort recovery before client does replay"
-
-test_34() {
-    multiop_bg_pause $DIR/$tfile O_c || return 2
-    pid=$!
-    rm -f $DIR/$tfile
-
-    replay_barrier mds
-    fail_abort mds
-    kill -USR1 $pid
-    [ -e $DIR/$tfile ] && return 1
-    sync
-    return 0
-}
-run_test 34 "abort recovery before client does replay (test mds_cleanup_orphans)"
-
-# bug 2278 - generate one orphan on OST, then destroy it during recovery from llog 
-test_35() {
-    touch $DIR/$tfile
-
-#define OBD_FAIL_MDS_REINT_NET_REP       0x119
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-    rm -f $DIR/$tfile &
-    sleep 1
-    sync
-    sleep 1
-    # give a chance to remove from MDS
-    fail_abort mds
-    $CHECKSTAT -t file $DIR/$tfile && return 1 || true
-}
-run_test 35 "test recovery from llog for unlink op"
-
-# b=2432 resent cancel after replay uses wrong cookie,
-# so don't resend cancels
-test_36() {
-    replay_barrier mds
-    touch $DIR/$tfile
-    checkstat $DIR/$tfile
-    facet_failover mds
-    cancel_lru_locks mdc
-    if dmesg | grep "unknown lock cookie"; then 
-	echo "cancel after replay failed"
-	return 1
-    fi
-}
-run_test 36 "don't resend cancel"
-
-# b=2368
-# directory orphans can't be unlinked from PENDING directory
-test_37() {
-    rmdir $DIR/$tfile 2>/dev/null
-    multiop_bg_pause $DIR/$tfile dD_c || return 2
-    pid=$!
-    rmdir $DIR/$tfile
-
-    replay_barrier mds
-    # clear the dmesg buffer so we only see errors from this recovery
-    dmesg -c >/dev/null
-    fail_abort mds
-    kill -USR1 $pid
-    dmesg | grep  "mds_unlink_orphan.*error .* unlinking orphan" && return 1
-    sync
-    return 0
-}
-run_test 37 "abort recovery before client does replay (test mds_cleanup_orphans for directories)"
-
-test_38() {
-    createmany -o $DIR/$tfile-%d 800
-    unlinkmany $DIR/$tfile-%d 0 400
-    replay_barrier mds
-    fail mds
-    unlinkmany $DIR/$tfile-%d 400 400
-    sleep 2
-    $CHECKSTAT -t file $DIR/$tfile-* && return 1 || true
-}
-run_test 38 "test recovery from unlink llog (test llog_gen_rec) "
-
-test_39() { # bug 4176
-    createmany -o $DIR/$tfile-%d 800
-    replay_barrier mds
-    unlinkmany $DIR/$tfile-%d 0 400
-    fail mds
-    unlinkmany $DIR/$tfile-%d 400 400
-    sleep 2
-    ls -1f $DIR/$tfile-*
-    $CHECKSTAT -t file $DIR/$tfile-* && return 1 || true
-}
-run_test 39 "test recovery from unlink llog (test llog_gen_rec) "
-
-count_ost_writes() {
-    awk -vwrites=0 '/ost_write/ { writes += $2 } END { print writes; }' $LPROC/osc/*/stats
-}
-
-#b=2477,2532
-test_40(){
-    $LCTL mark multiop $MOUNT/$tfile OS_c 
-    multiop $MOUNT/$tfile OS_c  &
-    PID=$!
-    writeme -s $MOUNT/${tfile}-2 &
-    WRITE_PID=$!
-    sleep 1
-    facet_failover mds
-#define OBD_FAIL_MDS_CONNECT_NET         0x117
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000117"
-    kill -USR1 $PID
-    stat1=`count_ost_writes`
-    sleep $TIMEOUT
-    stat2=`count_ost_writes`
-    echo "$stat1, $stat2"
-    if [ $stat1 -lt $stat2 ]; then 
-       echo "writes continuing during recovery"
-       RC=0
-    else
-       echo "writes not continuing during recovery, bug 2477"
-       RC=4
-    fi
-    echo "waiting for writeme $WRITE_PID"
-    kill $WRITE_PID
-    wait $WRITE_PID 
-
-    echo "waiting for multiop $PID"
-    wait $PID || return 2
-    do_facet client munlink $MOUNT/$tfile  || return 3
-    do_facet client munlink $MOUNT/${tfile}-2  || return 3
-    return $RC
-}
-run_test 40 "cause recovery in ptlrpc, ensure IO continues"
-
-
-#b=2814
-# make sure that a read to one osc doesn't try to double-unlock its page just
-# because another osc is invalid.  trigger_group_io used to mistakenly return
-# an error if any oscs were invalid even after having successfully put rpcs
-# on valid oscs.  This was fatal if the caller was ll_readpage who unlocked
-# the page, guarnateeing that the unlock from the RPC completion would
-# assert on trying to unlock the unlocked page.
-test_41() {
-    [ $OSTCOUNT -lt 2 ] && \
-	skip "skipping test 41: we don't have a second OST to test with" && \
-	return
-
-    local f=$MOUNT/$tfile
-    # make sure the start of the file is ost1
-    lfs setstripe $f -s $((128 * 1024)) -i 0 
-    do_facet client dd if=/dev/zero of=$f bs=4k count=1 || return 3
-    cancel_lru_locks osc
-    # fail ost2 and read from ost1
-    local osc2dev=`grep ${ost2_svc}-osc- $LPROC/devices | awk '{print $1}'`
-    [ "$osc2dev" ] || return 4
-    $LCTL --device $osc2dev deactivate || return 1
-    do_facet client dd if=$f of=/dev/null bs=4k count=1 || return 3
-    $LCTL --device $osc2dev activate || return 2
-    return 0
-}
-run_test 41 "read from a valid osc while other oscs are invalid"
-
-# test MDS recovery after ost failure
-test_42() {
-    blocks=`df -P $MOUNT | tail -n 1 | awk '{ print $2 }'`
-    createmany -o $DIR/$tfile-%d 800
-    replay_barrier ost1
-    unlinkmany $DIR/$tfile-%d 0 400
-    debugsave
-    sysctl -w lnet.debug=-1
-    facet_failover ost1
-    
-    # osc is evicted, fs is smaller (but only with failout OSTs (bug 7287)
-    #blocks_after=`df -P $MOUNT | tail -n 1 | awk '{ print $2 }'`
-    #[ $blocks_after -lt $blocks ] || return 1
-    echo wait for MDS to timeout and recover
-    sleep $((TIMEOUT * 2))
-    debugrestore
-    unlinkmany $DIR/$tfile-%d 400 400
-    $CHECKSTAT -t file $DIR/$tfile-* && return 2 || true
-}
-run_test 42 "recovery after ost failure"
-
-# timeout in MDS/OST recovery RPC will LBUG MDS
-test_43() { # bug 2530
-    replay_barrier mds
-
-    # OBD_FAIL_OST_CREATE_NET 0x204
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000204"
-    fail mds
-    sleep 10
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-
-    return 0
-}
-run_test 43 "mds osc import failure during recovery; don't LBUG"
-
-test_44() {
-    local at_max_saved=0
-
-    mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
-    [ "$mdcdev" ] || exit 2
-
-    # adaptive timeouts slow this way down
-    if at_is_valid && at_is_enabled; then
-        at_max_saved=$(at_max_get mds)
-        at_max_set 40 mds
-    fi
-
-    for i in `seq 1 10`; do
-	echo "$i of 10 ($(date +%s))"
-	do_facet mds "grep service $LPROC/mdt/MDS/mds/timeouts"
-	#define OBD_FAIL_TGT_CONN_RACE     0x701
-	do_facet mds "sysctl -w lustre.fail_loc=0x80000701"
-	$LCTL --device $mdcdev recover
-	df $MOUNT
-    done
-
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    [ $at_max_saved -ne 0 ] && at_max_set $at_max_saved mds
-    return 0
-}
-run_test 44 "race in target handle connect"
-
-test_44b() {
-    mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
-    [ "$mdcdev" ] || exit 2
-    for i in `seq 1 10`; do
-	echo "$i of 10 ($(date +%s))"
-	do_facet mds "grep service $LPROC/mdt/MDS/mds/timeouts"
-	#define OBD_FAIL_TGT_DELAY_RECONNECT 0x704
-	do_facet mds "sysctl -w lustre.fail_loc=0x80000704"
-	$LCTL --device $mdcdev recover
-	df $MOUNT
-    done
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    return 0
-}
-run_test 44b "race in target handle connect"
-
-# Handle failed close
-test_45() {
-    mdcdev=`awk '/-mdc-/ {print $1}' $LPROC/devices`
-    [ "$mdcdev" ] || exit 2
-    $LCTL --device $mdcdev recover
-
-    multiop_bg_pause $DIR/$tfile O_c || return 1
-    pid=$!
-
-    # This will cause the CLOSE to fail before even 
-    # allocating a reply buffer
-    $LCTL --device $mdcdev deactivate || return 4
-
-    # try the close
-    kill -USR1 $pid
-    wait $pid || return 1
-
-    $LCTL --device $mdcdev activate || return 5
-    sleep 1
-
-    $CHECKSTAT -t file $DIR/$tfile || return 2
-    return 0
-}
-run_test 45 "Handle failed close"
-
-test_46() {
-    dmesg -c >/dev/null
-    drop_reply "touch $DIR/$tfile"
-    fail mds
-    # ironically, the previous test, 45, will cause a real forced close,
-    # so just look for one for this test
-    dmesg | grep -i "force closing client file handle for $tfile" && return 1
-    return 0
-}
-run_test 46 "Don't leak file handle after open resend (3325)"
-
-test_47() { # bug 2824
-    # create some files to make sure precreate has been done on all 
-    # OSTs. (just in case this test is run independently)
-    createmany -o $DIR/$tfile 20  || return 1
-
-    # OBD_FAIL_OST_CREATE_NET 0x204
-    fail ost1
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000204"
-    df $MOUNT || return 2
-
-    # let the MDS discover the OST failure, attempt to recover, fail
-    # and recover again.  
-    sleep $((3 * TIMEOUT))
-
-    # Without 2824, this createmany would hang 
-    createmany -o $DIR/$tfile 20 || return 3
-    unlinkmany $DIR/$tfile 20 || return 4
-
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-    return 0
-}
-run_test 47 "MDS->OSC failure during precreate cleanup (2824)"
-
-test_48() {
-    replay_barrier mds
-    createmany -o $DIR/$tfile 20  || return 1
-    # OBD_FAIL_OST_EROFS 0x216
-    fail mds
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000216"
-    df $MOUNT || return 2
-
-    createmany -o $DIR/$tfile 20 20 || return 2
-    unlinkmany $DIR/$tfile 40 || return 3
-
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-    return 0
-}
-run_test 48 "MDS->OSC failure during precreate cleanup (2824)"
-
-test_50() {
-    local oscdev=`do_facet mds grep \'${ost1_svc}-osc \' $LPROC/devices | awk '{print $1}' | head -1`
-    [ "$oscdev" ] || return 1
-    do_facet mds $LCTL --device $oscdev recover || return 2 
-    do_facet mds $LCTL --device $oscdev recover || return 3 
-    # give the mds_lov_sync threads a chance to run
-    sleep 5
-}
-run_test 50 "Double OSC recovery, don't LASSERT (3812)"
-
-# b3764 timed out lock replay
-test_52() {
-    touch $DIR/$tfile
-    cancel_lru_locks mdc
-
-    multiop $DIR/$tfile s || return 1
-    replay_barrier mds
-#define OBD_FAIL_LDLM_REPLY              0x30c
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000030c"
-    fail mds || return 2
-    do_facet mds "sysctl -w lustre.fail_loc=0x0"
-
-    $CHECKSTAT -t file $DIR/$tfile-* && return 3 || true
-}
-run_test 52 "time out lock replay (3764)"
-
-# bug 3462 - simultaneous MDC requests
-test_53a() {
-    mkdir -p $DIR/${tdir}-1
-    mkdir -p $DIR/${tdir}-2
-    multiop $DIR/${tdir}-1/f O_c &
-    close_pid=$!
-    # give multiop a chance to open
-    sleep 1
-
-    #define OBD_FAIL_MDS_CLOSE_NET 0x115
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-    kill -USR1 $close_pid
-    cancel_lru_locks MDC # force the close
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    mcreate $DIR/${tdir}-2/f || return 1
-    
-    # close should still be here
-    [ -d /proc/$close_pid ] || return 2
-    replay_barrier_nodf mds
-    fail mds
-    wait $close_pid || return 3
-
-    $CHECKSTAT -t file $DIR/${tdir}-1/f || return 4
-    $CHECKSTAT -t file $DIR/${tdir}-2/f || return 5
-    rm -rf $DIR/${tdir}-*
-}
-run_test 53a "|X| close request while two MDC requests in flight"
-
-test_53b() {
-    mkdir -p $DIR/$tdir-1
-    mkdir -p $DIR/$tdir-2
-    multiop $DIR/$tdir-1/f O_c &
-    close_pid=$!
-
-    #define OBD_FAIL_MDS_REINT_NET 0x107
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
-    mcreate $DIR/${tdir}-2/f &
-    open_pid=$!
-    sleep 1
-
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    kill -USR1 $close_pid
-    cancel_lru_locks MDC # force the close
-    wait $close_pid || return 1
-    # open should still be here
-    [ -d /proc/$open_pid ] || return 2
-
-    replay_barrier_nodf mds
-    fail mds
-    wait $open_pid || return 3
-
-    $CHECKSTAT -t file $DIR/${tdir}-1/f || return 4
-    $CHECKSTAT -t file $DIR/${tdir}-2/f || return 5
-    rm -rf $DIR/${tdir}-*
-}
-run_test 53b "|X| open request while two MDC requests in flight"
-
-test_53c() {
-    mkdir -p $DIR/${tdir}-1
-    mkdir -p $DIR/${tdir}-2
-    multiop $DIR/${tdir}-1/f O_c &
-    close_pid=$!
-
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
-    mcreate $DIR/${tdir}-2/f &
-    open_pid=$!
-    sleep 1
-
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-    kill -USR1 $close_pid
-    cancel_lru_locks MDC  # force the close
-
-    replay_barrier_nodf mds
-    fail_nodf mds
-    wait $open_pid || return 1
-    sleep 2
-    # close should be gone
-    [ -d /proc/$close_pid ] && return 2
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-
-    $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
-    $CHECKSTAT -t file $DIR/${tdir}-2/f || return 4
-    rm -rf $DIR/${tdir}-*
-}
-run_test 53c "|X| open request and close request while two MDC requests in flight"
-
-test_53d() {
-    mkdir -p $DIR/${tdir}-1
-    mkdir -p $DIR/${tdir}-2
-    multiop $DIR/${tdir}-1/f O_c &
-    close_pid=$!
-    # give multiop a chance to open
-    sleep 1
-
-    # define OBD_FAIL_MDS_CLOSE_NET_REP 0X138    
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000013b"
-    kill -USR1 $close_pid
-    cancel_lru_locks MDC  # force the close
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    mcreate $DIR/${tdir}-2/f || return 1
-    
-    # close should still be here
-    [ -d /proc/$close_pid ] || return 2
-    replay_barrier_nodf mds
-    fail mds
-    wait $close_pid || return 3
-
-    $CHECKSTAT -t file $DIR/${tdir}-1/f || return 4
-    $CHECKSTAT -t file $DIR/${tdir}-2/f || return 5
-    rm -rf $DIR/${tdir}-*
-}
-run_test 53d "|X| close reply while two MDC requests in flight"
-
-test_53e() {
-    mkdir -p $DIR/$tdir-1
-    mkdir -p $DIR/$tdir-2
-    multiop $DIR/$tdir-1/f O_c &
-    close_pid=$!
-
-    #define OBD_FAIL_MDS_REINT_NET_REP       0x119
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-    mcreate $DIR/${tdir}-2/f &
-    open_pid=$!
-    sleep 1
-    
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    kill -USR1 $close_pid
-    cancel_lru_locks MDC  # force the close
-    wait $close_pid || return 1
-    # open should still be here
-    [ -d /proc/$open_pid ] || return 2
-    
-    replay_barrier_nodf mds
-    fail mds
-    wait $open_pid || return 3
-
-    $CHECKSTAT -t file $DIR/${tdir}-1/f || return 4
-    $CHECKSTAT -t file $DIR/${tdir}-2/f || return 5
-    rm -rf $DIR/${tdir}-*
-}
-run_test 53e "|X| open reply while two MDC requests in flight"
-
-test_53f() {
-        mkdir -p $DIR/${tdir}-1
-        mkdir -p $DIR/${tdir}-2
-        multiop $DIR/${tdir}-1/f O_c &
-        close_pid=$!
-
-        do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-        mcreate $DIR/${tdir}-2/f &
-        open_pid=$!
-        sleep 1
-
-        do_facet mds "sysctl -w lustre.fail_loc=0x8000013b"
-        kill -USR1 $close_pid
-        cancel_lru_locks MDC
-
-        replay_barrier_nodf mds
-        fail_nodf mds
-        wait $open_pid || return 1
-        sleep 2
-        #close should be gone
-        [ -d /proc/$close_pid ] && return 2
-        do_facet mds "sysctl -w lustre.fail_loc=0"
-
-        $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
-        $CHECKSTAT -t file $DIR/${tdir}-2/f || return 4
-        rm -rf $DIR/${tdir}-*
-}
-run_test 53f "|X| open reply and close reply while two MDC requests in flight"
-
-test_53g() {
-        mkdir -p $DIR/${tdir}-1
-        mkdir -p $DIR/${tdir}-2
-        multiop $DIR/${tdir}-1/f O_c &
-        close_pid=$!
-
-        do_facet mds "sysctl -w lustre.fail_loc=0x80000119"
-        mcreate $DIR/${tdir}-2/f &
-        open_pid=$!
-        sleep 1
-
-        do_facet mds "sysctl -w lustre.fail_loc=0x80000115"
-        kill -USR1 $close_pid
-        cancel_lru_locks MDC # force the close
-
-        do_facet mds "sysctl -w lustre.fail_loc=0"
-        replay_barrier_nodf mds
-        fail_nodf mds
-        wait $open_pid || return 1
-        sleep 2
-        # close should be gone
-        [ -d /proc/$close_pid ] && return 2
-
-        $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
-        $CHECKSTAT -t file $DIR/${tdir}-2/f || return 4
-        rm -rf $DIR/${tdir}-*
-}
-run_test 53g "|X| drop open reply and close request while close and open are both in flight"
-
-test_53h() {
-    mkdir -p $DIR/${tdir}-1
-    mkdir -p $DIR/${tdir}-2
-    multiop $DIR/${tdir}-1/f O_c &
-    close_pid=$!
-
-    do_facet mds "sysctl -w lustre.fail_loc=0x80000107"
-    mcreate $DIR/${tdir}-2/f &
-    open_pid=$!
-    sleep 1
-    
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000013b"
-    kill -USR1 $close_pid
-    cancel_lru_locks MDC  # force the close
-    sleep 1
-
-    replay_barrier_nodf mds
-    fail_nodf mds
-    wait $open_pid || return 1
-    sleep 2
-    # close should be gone
-    [ -d /proc/$close_pid ] && return 2
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-
-    $CHECKSTAT -t file $DIR/${tdir}-1/f || return 3
-    $CHECKSTAT -t file $DIR/${tdir}-2/f || return 4
-    rm -rf $DIR/${tdir}-*
-}
-run_test 53h "|X| open request and close reply while two MDC requests in flight"
-
-#b3761 ASSERTION(hash != 0) failed
-test_55() {
-# OBD_FAIL_MDS_OPEN_CREATE | OBD_FAIL_ONCE
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000012b"
-    touch $DIR/$tfile &
-    # give touch a chance to run
-    sleep 5
-    do_facet mds "sysctl -w lustre.fail_loc=0x0"
-    rm $DIR/$tfile
-    return 0
-}
-run_test 55 "let MDS_CHECK_RESENT return the original return code instead of 0"
-
-#b3440 ASSERTION(rec->ur_fid2->id) failed
-test_56() {
-    ln -s foo $DIR/$tfile
-    replay_barrier mds
-    #drop_reply "cat $DIR/$tfile"
-    fail mds
-    sleep 10
-}
-run_test 56 "don't replay a symlink open request (3440)"
-
-#recovery one mds-ost setattr from llog
-test_57() {
-#define OBD_FAIL_MDS_OST_SETATTR       0x12c
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000012c"
-    touch $DIR/$tfile
-    replay_barrier mds
-    fail mds
-    sleep 1
-    $CHECKSTAT -t file $DIR/$tfile || return 1
-    do_facet mds "sysctl -w lustre.fail_loc=0x0"
-    rm $DIR/$tfile
-}
-run_test 57 "test recovery from llog for setattr op"
-
-#recovery many mds-ost setattr from llog
-test_58() {
-#define OBD_FAIL_MDS_OST_SETATTR       0x12c
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000012c"
-    createmany -o $DIR/$tdir/$tfile-%d 2500
-    replay_barrier mds
-    fail mds
-    sleep 2
-    $CHECKSTAT -t file $DIR/$tdir/$tfile-* >/dev/null || return 1
-    do_facet mds "sysctl -w lustre.fail_loc=0x0"
-    unlinkmany $DIR/$tdir/$tfile-%d 2500
-    rmdir $DIR/$tdir
-}
-run_test 58 "test recovery from llog for setattr op (test llog_gen_rec)"
-
-# log_commit_thread vs filter_destroy race used to lead to import use after free
-# bug 11658
-test_59() {
-    createmany -o $DIR/$tdir/$tfile-%d 200
-    sync
-    unlinkmany $DIR/$tdir/$tfile-%d 200
-#define OBD_FAIL_PTLRPC_DELAY_RECOV       0x507
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x507"
-    fail ost1
-    fail mds
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x0"
-    sleep 20
-    rmdir $DIR/$tdir
-}
-run_test 59 "test log_commit_thread vs filter_destroy race"
-
-# race between add unlink llog vs cat log init in post_recovery (only for b1_6)
-# bug 12086: should no oops and No ctxt error for this test
-test_60() {
-    createmany -o $DIR/$tdir/$tfile-%d 200
-    replay_barrier mds
-    unlinkmany $DIR/$tdir/$tfile-%d 0 100
-    fail mds
-    unlinkmany $DIR/$tdir/$tfile-%d 100 100
-    local no_ctxt=`dmesg | grep "No ctxt"`
-    [ -z "$no_ctxt" ] || error "ctxt is not initialized in recovery" 
-}
-run_test 60 "test llog post recovery init vs llog unlink"
-
-#test race  llog recovery thread vs llog cleanup
-test_61a() {
-    createmany -o $DIR/$tdir/$tfile-%d 800
-    replay_barrier ost1 
-#   OBD_FAIL_OST_LLOG_RECOVERY_TIMEOUT 0x221 
-    unlinkmany $DIR/$tdir/$tfile-%d 800 
-    do_facet ost "sysctl -w lustre.fail_loc=0x80000221"
-    facet_failover ost1
-    sleep 10 
-    fail ost1
-    sleep 30
-    do_facet ost "sysctl -w lustre.fail_loc=0x0"
-    $CHECKSTAT -t file $DIR/$tdir/$tfile-* && return 1
-    rmdir $DIR/$tdir
-}
-run_test 61a "test race llog recovery vs llog cleanup"
-
-#test race  mds llog sync vs llog cleanup
-test_61b() {
-#   OBD_FAIL_MDS_LLOG_SYNC_TIMEOUT 0x13a 
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000013a"
-    facet_failover mds 
-    sleep 10
-    fail mds
-    do_facet client dd if=/dev/zero of=$DIR/$tfile bs=4k count=1 || return 1
-}
-run_test 61b "test race mds llog sync vs llog cleanup"
-
-#test race  cancel cookie cb vs llog cleanup
-test_61c() {
-#   OBD_FAIL_OST_CANCEL_COOKIE_TIMEOUT 0x222 
-    touch $DIR/$tfile 
-    do_facet ost "sysctl -w lustre.fail_loc=0x80000222"
-    rm $DIR/$tfile    
-    sleep 10
-    fail ost1
-}
-run_test 61c "test race mds llog sync vs llog cleanup"
-
-#Adaptive Timeouts (bug 3055)
-AT_MAX_SET=0
-
-at_start()
-{
-    at_is_valid || skip "AT env is invalid"
-
-    if ! at_is_enabled; then
-        echo "AT is disabled, enable it by force temporarily"
-        at_max_set 600 mds ost client
-        AT_MAX_SET=1
-    fi
-
-    if [ -z "$ATOLDBASE" ]; then
-	local at_history=$(do_facet mds "find /sys/ -name at_history")
-	[ -z "$at_history" ] && skip "missing /sys/.../at_history " && return 1
-	ATOLDBASE=$(do_facet mds "cat $at_history")
-        # speed up the timebase so we can check decreasing AT
-	do_facet mds "echo 8 >> $at_history"
-	do_facet ost1 "echo 8 >> $at_history"
-    fi
-}
-
-test_65a() #bug 3055
-{
-    at_start || return 0
-    $LCTL dk > /dev/null
-    debugsave
-    sysctl -w lnet.debug="+other"
-    # slow down a request
-    do_facet mds sysctl -w lustre.fail_val=30000
-#define OBD_FAIL_PTLRPC_PAUSE_REQ        0x50a
-    do_facet mds sysctl -w lustre.fail_loc=0x8000050a
-    createmany -o $DIR/$tfile 10 > /dev/null
-    unlinkmany $DIR/$tfile 10 > /dev/null
-    # check for log message
-    $LCTL dk | grep "Early reply #" || error "No early reply" 
-    # client should show 30s estimates
-    grep portal $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts
-    sleep 9
-    grep portal $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts
-}
-run_test 65a "AT: verify early replies"
-
-test_65b() #bug 3055
-{
-    at_start || return 0
-    # turn on D_ADAPTTO
-    debugsave
-    sysctl -w lnet.debug="+other"
-    $LCTL dk > /dev/null
-    # slow down bulk i/o
-    do_facet ost1 sysctl -w lustre.fail_val=30
-#define OBD_FAIL_OST_BRW_PAUSE_PACK      0x224
-    do_facet ost1 sysctl -w lustre.fail_loc=0x224
-
-    rm -f $DIR/$tfile
-    lfs setstripe $DIR/$tfile --index=0 --count=1
-    # force some real bulk transfer
-    multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-
-    do_facet ost1 sysctl -w lustre.fail_loc=0
-    # check for log message
-    $LCTL dk | grep "Early reply #" || error "No early reply"
-    debugrestore
-    # client should show 30s estimates
-    grep portal $LPROC/osc/${FSNAME}-OST0000-osc-*/timeouts
-}
-run_test 65b "AT: verify early replies on packed reply / bulk"
-
-test_66a() #bug 3055
-{
-    at_start || return 0
-    grep "portal 12" $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts
-    # adjust 5s at a time so no early reply is sent (within deadline)
-    do_facet mds "sysctl -w lustre.fail_val=5000"
-#define OBD_FAIL_PTLRPC_PAUSE_REQ        0x50a
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000050a"
-    createmany -o $DIR/$tfile 20 > /dev/null
-    unlinkmany $DIR/$tfile 20 > /dev/null
-    grep "portal 12" $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts
-    do_facet mds "sysctl -w lustre.fail_val=10000"
-    do_facet mds "sysctl -w lustre.fail_loc=0x8000050a"
-    createmany -o $DIR/$tfile 20 > /dev/null
-    unlinkmany $DIR/$tfile 20 > /dev/null
-    grep "portal 12" $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts
-    do_facet mds "sysctl -w lustre.fail_loc=0"
-    sleep 9
-    createmany -o $DIR/$tfile 20 > /dev/null
-    unlinkmany $DIR/$tfile 20 > /dev/null
-    grep portal $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts | grep "portal 12"
-    CUR=$(awk '/portal 12/ {print $5}' $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts)
-    WORST=$(awk '/portal 12/ {print $7}' $LPROC/mdc/${FSNAME}-MDT0000-mdc-*/timeouts)
-    echo "Current MDT timeout $CUR, worst $WORST"
-    [ $CUR -lt $WORST ] || error "Current $CUR should be less than worst $WORST" 
-}
-run_test 66a "AT: verify MDT service time adjusts with no early replies"
-
-test_66b() #bug 3055
-{
-    at_start || return 0
-    ORIG=$(awk '/network/ {print $4}' $LPROC/mdc/${FSNAME}-*/timeouts)
-    sysctl -w lustre.fail_val=$(($ORIG + 5))
-#define OBD_FAIL_PTLRPC_PAUSE_REP      0x50c
-    sysctl -w lustre.fail_loc=0x50c
-    ls $DIR/$tfile > /dev/null 2>&1
-    sysctl -w lustre.fail_loc=0
-    CUR=$(awk '/network/ {print $4}' $LPROC/mdc/${FSNAME}-*/timeouts)
-    WORST=$(awk '/network/ {print $6}' $LPROC/mdc/${FSNAME}-*/timeouts)
-    echo "network timeout orig $ORIG, cur $CUR, worst $WORST"
-    [ $WORST -gt $ORIG ] || error "Worst $WORST should be worse than orig $ORIG" 
-}
-run_test 66b "AT: verify net latency adjusts"
-
-test_67a() #bug 3055
-{
-    at_start || return 0
-    CONN1=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
-    # sleeping threads may drive values above this
-    do_facet ost1 "sysctl -w lustre.fail_val=400"
-#define OBD_FAIL_PTLRPC_PAUSE_REQ    0x50a
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x50a"
-    createmany -o $DIR/$tfile 20 > /dev/null
-    unlinkmany $DIR/$tfile 20 > /dev/null
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-    CONN2=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
-    ATTEMPTS=$(($CONN2 - $CONN1))
-    echo "$ATTEMPTS osc reconnect attemps on gradual slow"
-    [ $ATTEMPTS -gt 0 ] && error_ignore 13721 "AT should have prevented reconnect"
-    return 0
-}
-run_test 67a "AT: verify slow request processing doesn't induce reconnects"
-
-test_67b() #bug 3055
-{
-    at_start || return 0
-    CONN1=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
-#define OBD_FAIL_OST_PAUSE_CREATE        0x223
-    do_facet ost1 "sysctl -w lustre.fail_val=20000"
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000223"
-    cp /etc/profile $DIR/$tfile || error "cp failed"
-    client_reconnect
-    cat $LPROC/ost/OSS/ost_create/timeouts
-    log "phase 2"
-    CONN2=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
-    ATTEMPTS=$(($CONN2 - $CONN1))
-    echo "$ATTEMPTS osc reconnect attemps on instant slow"
-    # do it again; should not timeout
-    do_facet ost1 "sysctl -w lustre.fail_loc=0x80000223"
-    cp /etc/profile $DIR/$tfile || error "cp failed"
-    do_facet ost1 "sysctl -w lustre.fail_loc=0"
-    client_reconnect
-    cat $LPROC/ost/OSS/ost_create/timeouts
-    CONN3=$(awk '/_connect/ {total+=$2} END {print total}' $LPROC/osc/*/stats)
-    ATTEMPTS=$(($CONN3 - $CONN2))
-    echo "$ATTEMPTS osc reconnect attemps on 2nd slow"
-    [ $ATTEMPTS -gt 0 ] && error "AT should have prevented reconnect"
-    return 0
-}
-run_test 67b "AT: verify instant slowdown doesn't induce reconnects"
-
-test_68 () #bug 13813
-{
-    at_start || return 0
-    local ldlm_enqueue_min=$(find /sys -name ldlm_enqueue_min)
-    [ -z "$ldlm_enqueue_min" ] && skip "missing /sys/.../ldlm_enqueue_min" && return 0
-    local ENQ_MIN=$(cat $ldlm_enqueue_min)
-    echo $TIMEOUT >> $ldlm_enqueue_min
-    rm -f $DIR/${tfile}_[1-2]
-    lfs setstripe $DIR/$tfile --index=0 --count=1
-#define OBD_FAIL_LDLM_PAUSE_CANCEL       0x312
-    sysctl -w lustre.fail_val=$(($TIMEOUT - 1))
-    sysctl -w lustre.fail_loc=0x80000312
-    cp /etc/profile $DIR/${tfile}_1 || error "1st cp failed $?"
-    sysctl -w lustre.fail_val=$((TIMEOUT * 3 / 2))
-    sysctl -w lustre.fail_loc=0x80000312
-    cp /etc/profile $DIR/${tfile}_2 || error "2nd cp failed $?"
-    sysctl -w lustre.fail_loc=0
-    echo $ENQ_MIN >> $ldlm_enqueue_min
-    return 0
-}
-run_test 68 "AT: verify slowing locks"
-
-if [ -n "$ATOLDBASE" ]; then
-    at_history=$(do_facet mds "find /sys/ -name at_history")
-    do_facet mds "echo $ATOLDBASE >> $at_history" || true
-    do_facet ost1 "echo $ATOLDBASE >> $at_history" || true
-fi
-
-if [ $AT_MAX_SET -ne 0 ]; then
-    echo "restore AT status to be disabled"
-    at_max_set 0 mds ost client
-fi
-
-# end of AT tests includes above lines
-
-equals_msg `basename $0`: test complete, cleaning up
-check_and_cleanup_lustre
-[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG || true
diff --git a/lustre/tests/rmdirmany.c b/lustre/tests/rmdirmany.c
deleted file mode 100755
index d0c663ac80414b1bc727cff2c85b4e3b105d74aa..0000000000000000000000000000000000000000
--- a/lustre/tests/rmdirmany.c
+++ /dev/null
@@ -1,40 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int main(int argc, char ** argv)
-{
-        int i, rc = 0, count;
-        char dirname[4096];
-
-        if (argc < 3) {
-                printf("Usage %s dirnamebase count\n", argv[0]);
-                return 1;
-        }
-
-        if (strlen(argv[1]) > 4080) {
-                printf("name too long\n");
-                return 1;
-        }
-
-        count = strtoul(argv[2], NULL, 0);
-
-        for (i = 0; i < count; i++) {
-                sprintf(dirname, "%s-%d", argv[1], i);
-                rc = rmdir(dirname);
-                if (rc) {
-                        printf("rmdir(%s) error: %s\n",
-                               dirname, strerror(errno));
-                        break;
-                }
-		if ((i % 10000) == 0)
-		    printf(" - deleted %d (time %ld)\n", i, time(0));
-        }
-        return rc;
-}
diff --git a/lustre/tests/run-llog.sh b/lustre/tests/run-llog.sh
deleted file mode 100644
index fe885f7025ccffb3c817b1d9c8c8db6043b23574..0000000000000000000000000000000000000000
--- a/lustre/tests/run-llog.sh
+++ /dev/null
@@ -1,45 +0,0 @@
-#!/bin/bash
-
-load_llog_test() {
-    grep -q llog_test /proc/modules && return
-    # Module should have been placed with other lustre modules...
-    modprobe llog_test 2>&1 | grep -v "llog_test not found"
-    grep -q llog_test /proc/modules && return
-    # But maybe we're running from a developer tree...
-    insmod ../obdclass/llog_test.ko
-    grep -q llog_test /proc/modules && return
-    # This is for 2.4 kernels (deprecated!)
-    insmod ../obdclass/llog_test.o
-    grep -q llog_test /proc/modules && return
-    echo "Unable to load llog_test module!"
-    false
-    return
-}
-
-PATH=`dirname $0`:`dirname $0`/../utils:$PATH
-TMP=${TMP:-/tmp}
-
-MDS=`ls $LPROC/mds | grep -v num_refs | head -n 1`
-[ -z "$MDS" ] && echo "no MDS available, skipping llog test" && exit 0
-
-load_llog_test || exit 0
-lctl modules > $TMP/ogdb-`hostname`
-echo "NOW reload debugging syms.."
-
-RC=0
-lctl <<EOT || RC=2
-attach llog_test llt_name llt_uuid
-setup $MDS
-EOT
-
-# Using ignore_errors will allow lctl to cleanup even if the test fails.
-lctl <<EOC
-device llt_name
-ignore_errors
-cleanup
-detach
-EOC
-rmmod llog_test || RC2=3
-[ $RC -eq 0 -a "$RC2" ] && RC=$RC2
-
-exit $RC
diff --git a/lustre/tests/runas.c b/lustre/tests/runas.c
deleted file mode 100644
index 4db76176848799d655e648feb0e1f0ee34a74903..0000000000000000000000000000000000000000
--- a/lustre/tests/runas.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <string.h>
-#include <errno.h>
-#include <ctype.h>
-#include <sys/types.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/wait.h>
-
-#define DEBUG 0
-
-#ifndef NGROUPS_MAX
-#define NGROUPS_MAX 32
-#endif
-
-static const char usage[] =
-"Usage: %s -u user_id [-g grp_id] [-G[gid0,gid1,...]] command\n"
-"  -u user_id           switch to UID user_id\n"
-"  -g grp_id            switch to GID grp_id\n"
-"  -G[gid0,gid1,...]    set supplementary groups\n";
-
-void Usage_and_abort(const char *name)
-{
-        fprintf(stderr, usage, name);
-        exit(-1);
-}
-
-int main(int argc, char **argv)
-{
-        char **my_argv, *name = argv[0], *grp;
-        int status, c, i;
-        int gid_is_set = 0, uid_is_set = 0, num_supp = -1;
-        uid_t user_id = 0;
-        gid_t grp_id = 0, supp_groups[NGROUPS_MAX] = { 0 };
-
-        if (argc == 1) {
-                fprintf(stderr, "No parameter count\n");
-                Usage_and_abort(name);
-        }
-
-        // get UID and GID
-        while ((c = getopt(argc, argv, "+u:g:hG::")) != -1) {
-                switch (c) {
-                case 'u':
-                        if (!isdigit(optarg[0])) {
-                                struct passwd *pw = getpwnam(optarg);
-                                if (pw == NULL) {
-                                        fprintf(stderr, "parameter '%s' bad\n",
-                                                optarg);
-                                        Usage_and_abort(name);
-                                }
-                                user_id = pw->pw_uid;
-                        } else {
-                                user_id = (uid_t)atoi(optarg);
-                        }
-                        uid_is_set = 1;
-                        if (!gid_is_set)
-                                grp_id = user_id;
-                        break;
-
-                case 'g':
-                        if (!isdigit(optarg[0])) {
-                                struct group *gr = getgrnam(optarg);
-                                if (gr == NULL) {
-                                        fprintf(stderr, "getgrname %s failed\n",
-                                                optarg);
-                                        Usage_and_abort(name);
-                                }
-                                grp_id = gr->gr_gid;
-                        } else {
-                                grp_id = (gid_t)atoi(optarg);
-                        }
-                        gid_is_set = 1;
-                        break;
-
-                case 'G':
-                        num_supp = 0;
-                        if (optarg == NULL || !isdigit(optarg[0]))
-                                break;
-                        while ((grp = strsep(&optarg, ",")) != NULL) {
-                                printf("adding supp group %d\n", atoi(grp));
-                                supp_groups[num_supp++] = atoi(grp);
-                                if (num_supp >= NGROUPS_MAX)
-                                        break;
-                        }
-                        break;
-
-                default:
-                case 'h':
-                        Usage_and_abort(name);
-                        break;
-                }
-        }
-
-        if (!uid_is_set) {
-                fprintf(stderr, "Must specify uid to run.\n");
-                Usage_and_abort(name);
-        }
-
-        if (optind == argc) {
-                fprintf(stderr, "Must specify command to run.\n");
-                Usage_and_abort(name);
-        }
-
-        // assemble the command
-        my_argv = (char**)malloc(sizeof(char*)*(argc+1-optind));
-        if (my_argv == NULL) {
-                fprintf(stderr, "Error in allocating memory. (%s)\n",
-                        strerror(errno));
-                exit(-1);
-        }
-
-        for (i = optind; i < argc; i++) {
-                my_argv[i-optind] = argv[i];
-                //printf("%s\n",my_argv[i-optind]);
-        }
-        my_argv[i-optind] = NULL;
-
-#if DEBUG
-        system("whoami");
-#endif
-
-        // set GID
-        status = setregid(grp_id, grp_id);
-        if (status == -1) {
-                 fprintf(stderr, "Cannot change grp_ID to %d, errno=%d (%s)\n",
-                         grp_id, errno, strerror(errno) );
-                 exit(-1);
-        }
-
-        if (num_supp >= 0) {
-                status = setgroups(num_supp, supp_groups);
-                if (status == -1) {
-                        perror("setting supplementary groups");
-                        exit(-1);
-                }
-        }
-
-        // set UID
-        status = setreuid(user_id, user_id );
-        if(status == -1) {
-                  fprintf(stderr,"Cannot change user_ID to %d, errno=%d (%s)\n",
-                           user_id, errno, strerror(errno) );
-                  exit(-1);
-        }
-
-        fprintf(stderr, "running as UID %d, GID %d", user_id, grp_id);
-        for (i = 0; i < num_supp; i++)
-                fprintf(stderr, ":%d", supp_groups[i]);
-        fprintf(stderr, "\n");
-
-        for (i = 0; i < argc - optind; i++)
-                 fprintf(stderr, " [%s]", my_argv[i]);
-
-        fprintf(stderr, "\n");
-        fflush(stderr);
-
-        // The command to be run
-        execvp(my_argv[0], my_argv);
-        fprintf(stderr, "execvp fails running %s (%d): %s\n", my_argv[0],
-                errno, strerror(errno));
-        exit(-1);
-}
-
diff --git a/lustre/tests/rundbench b/lustre/tests/rundbench
deleted file mode 100755
index 40a8fdea9d58610210c395a2cb03866298bc9994..0000000000000000000000000000000000000000
--- a/lustre/tests/rundbench
+++ /dev/null
@@ -1,20 +0,0 @@
-#!/bin/sh
-MOUNT=${MOUNT:-/mnt/lustre}
-DIR=${DIR:-$MOUNT/`hostname`}
-#[ -e /proc/sys/lnet/debug ] && echo 0 > /proc/sys/lnet/debug 
-mkdir -p $DIR
-TGT=$DIR/client.txt
-DBENCH_LIB=${DBENCH_LIB:-/usr/share/dbench}
-SRC=${SRC:-$DBENCH_LIB/client.txt}
-[ ! -s $TGT -a -s $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-SRC=${SRC:-/usr/lib/dbench/client.txt}
-[ ! -s $TGT -a -s $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-SRC=/usr/lib/dbench/client_plain.txt
-[ ! -s $TGT -a -s $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-[ ! -s $TGT ] && echo "$0: $TGT doesn't exist (SRC=$SRC)" && exit 1
-cd $DIR
-echo "running 'dbench $@' on $PWD at `date`"
-dbench -c client.txt $@
-RC=$?
-[ $RC -ne 0 ] && killall -9 dbench
-exit $RC
diff --git a/lustre/tests/runiozone b/lustre/tests/runiozone
deleted file mode 100755
index 5eacb9c0b97af67c0736a5c4b661586c6eaa36ce..0000000000000000000000000000000000000000
--- a/lustre/tests/runiozone
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-[ -z "$SIZE" ] && SIZE=5g
-[ -z "$COUNT" ] && COUNT=100
-[ -z "$VERIFY" ] && VERIFY="-+d"
-#[ -z "$ODIR" ] && ODIR="-I"
-[ -z "$REC" ] && REC=64
-[ -z "$FILE" ] && FILE=/mnt/lustre/iozone.$$
-[ $1 ] && SIZE=$1
-LOOP=0
-rm -f endiozone
-echo 0 > /proc/sys/lnet/debug
-while date; do
-	LOOP=`expr $LOOP + 1`
-	echo "Test #$LOOP"
-	iozone $VERIFY $ODIR -r $REC -i 0 -i 1 -f $FILE -s $SIZE 2>&1 || exit $?
-	[ -f endiozone -o $LOOP -ge $COUNT ] && rm -f endiozone && exit 0
-done | tee /tmp/iozone.log
diff --git a/lustre/tests/runmultiop_bg_pause b/lustre/tests/runmultiop_bg_pause
deleted file mode 100644
index 823ebddece9d8aa6e474c66b6c6dc141e18728ba..0000000000000000000000000000000000000000
--- a/lustre/tests/runmultiop_bg_pause
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# Run multiop in the background, but wait for it to print
-# "PAUSING" to its stdout before returning from this function.
-
-PTLDEBUG=${PTLDEBUG:--1}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-
-multiop_bg_pause $*
-exit $?
diff --git a/lustre/tests/runobdstat b/lustre/tests/runobdstat
deleted file mode 100644
index 7fd61ee112aa051c03dea3c2c8fc55db75724b04..0000000000000000000000000000000000000000
--- a/lustre/tests/runobdstat
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/sh
-PATH=`dirname $0`/../utils:$PATH
-
-llobdstat $1 1 | while read LINE; do
-	echo "`date +s`: $LINE"
-	[ "$2" ] && echo "`date +s`: $LINE" >> $2
-done
diff --git a/lustre/tests/runtests b/lustre/tests/runtests
deleted file mode 100755
index 8080e311d096d2a507b17e101eadaabc86c80583..0000000000000000000000000000000000000000
--- a/lustre/tests/runtests
+++ /dev/null
@@ -1,154 +0,0 @@
-#!/bin/sh
-#
-# Script which does some basic tests to ensure we haven't regressed.
-# Probably a good idea to run this before doing any checkins.
-# In the future this can become more fancy, but it's OK for now.
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-SRCDIR="`dirname $0`"
-export PATH=/sbin:/usr/sbin:$SRCDIR:$SRCDIR/../utils:$PATH
-
-export NAME=${NAME:-local}
-
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-SETUP=${SETUP:-setupall}
-FORMAT=${FORMAT:-formatall}
-CLEANUP=${CLEANUP:-stopall}
-
-fail() { 
-	echo "ERROR: $1" 1>&2
-	[ $2 ] && RC=$2 || RC=1
-	exit $RC
-}
-
-ERROR=
-RUNTESTS_SRC=${RUNTESTS_SRC:-"/etc /bin"}
-[ "$COUNT" ] || COUNT=1000
-[ "$SLOW" = "no" ] && COUNT=100
-
-[ "$MCREATE" ] || MCREATE=mcreate
-
-[ "$MKDIRMANY" ] || MKDIRMANY="createmany -d"
-
-while [ "$1" ]; do
-	case $1 in
-	*.xml) export NAME=`echo $1 | sed "s/.xml//"` ;;
-	*) OPTS="$OPTS $1" ;;
-	esac
-	shift
-done
-
-MOUNTED=$(mounted_lustre_filesystems | head -1)
-if [ -z "$MOUNTED" ]; then
-	formatall
-	setupall
-	MOUNTED="`mounted_lustre_filesystems`"
-	[ -z "$MOUNTED" ] && error "NAME=$NAME not mounted"
-	I_MOUNTED=yes
-fi
-
-MOUNT=$MOUNTED
-
-OSCTMP=`echo $MOUNT | tr "/" "."`
-USED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
-USED=`expr $USED + 16`	# Some space for the status file
-
-# let's start slowly here...
-START=`date +%s`
-log "touching $MOUNT at `date`"
-touch $MOUNT || fail "can't touch $MOUNT" 2
-HOSTS=$MOUNT/hosts.$$
-TRUNCSIZE=123
-
-if [ $COUNT -gt 10 -o $COUNT -eq 0 ]; then
-	# this will cause the following cp to trigger bug #620096
-	log "create an empty file $HOSTS"
-	mcreate $HOSTS
-	log "copying /etc/hosts to $HOSTS"
-	cp /etc/hosts $HOSTS || fail "can't cp /etc/hosts to $HOSTS" 3
-	log "comparing /etc/hosts and $HOSTS"
-	diff -u /etc/hosts $HOSTS || fail "$HOSTS different" 4
-	log "renaming $HOSTS to $HOSTS.ren"
-	mv $HOSTS $HOSTS.ren || fail "can't rename $HOSTS to $HOSTS.ren" 5
-	log "copying /etc/hosts to $HOSTS again"
-	cp /etc/hosts $HOSTS || fail "can't cp /etc/hosts to $HOSTS again" 6
-	log "truncating $HOSTS"
-	> $HOSTS || fail "can't truncate $HOSTS" 8
-	log "removing $HOSTS"
-	rm $HOSTS || fail "can't remove $HOSTS" 9
-	cp /etc/hosts $HOSTS.2 || fail "can't cp /etc/hosts to $HOSTS.2" 7
-	log "truncating $HOSTS.2 to $TRUNCSIZE bytes"
-	truncate $HOSTS.2 $TRUNCSIZE
-fi
-
-DST=$MOUNT/runtest.$$
-# let's start slowly here...
-log "creating $DST"
-mkdir $DST || fail "can't mkdir $DST" 10
-
-# ok, that hopefully worked, so let's do a little more, with files that
-# haven't changed in the last day (hopefully they don't change during test)
-FILES=`find $RUNTESTS_SRC -type f -mtime +1 | head -n $COUNT`
-[ -z "$FILES" ] && fail "No unchanged files - is $RUNTESTS_SRC a new dir?"
-
-log "copying files from $RUNTESTS_SRC to $DST$RUNTESTS_SRC at `date`"
-tar cf - $FILES | tar xvf - -C $DST > /dev/null || fail "copying $RUNTESTS_SRC" 11
-
-log "comparing newly copied files at `date`"
-for f in $FILES; do
-	[ $V ] && log "verifying $DST/$f"
-	diff -q $f $DST/$f || ERROR=11
-done
-
-[ "$ERROR" ] && fail "old and new files are different" $ERROR
-log "finished at `date` ($(($(date +%s) - START)))"
-
-$CLEANUP || exit 19
-$SETUP || exit 20
-
-log "comparing previously copied files"
-for f in $FILES; do
-	[ $V ] && log "verifying $DST/$f"
-	diff -q $f $DST/$f || ERROR=22
-done
-
-[ "$ERROR" ] && fail "old and new files are different on second diff" $ERROR
-
-$CLEANUP || exit 19
-$SETUP || exit 20
-
-log "removing $DST"
-rm -r $V $DST || fail "can't remove $DST" 37
-
-if [ $COUNT -gt 10 -o $COUNT -eq 0 ]; then
-	log "renaming $HOSTS.ren to $HOSTS"
-	mv $HOSTS.ren $HOSTS || fail "can't rename $HOSTS.ren to $HOSTS" 32
-	log "truncating $HOSTS"
-	> $HOSTS || fail "can't truncate $HOSTS" 34
-	log "removing $HOSTS"
-	rm $HOSTS || fail "can't remove $HOSTS again" 36
-	log "verifying $HOSTS.2 is $TRUNCSIZE bytes"
-	checkstat -s $TRUNCSIZE $HOSTS.2 || \
-		fail "$HOSTS.2 isn't $TRUNCSIZE bytes" 37
-	rm $HOSTS.2 || fail "can't remove $HOSTS.2" 38
-fi
-
-# mkdirmany test (bug 589)
-log "running $MKDIRMANY $MOUNT/base$$ 100"
-$MKDIRMANY $MOUNT/base$$ 100 || fail "mkdirmany failed"
-log "removing mkdirmany directories"
-rmdir $MOUNT/base$$* || fail "mkdirmany cleanup failed"
-
-log "done"
-
-NOWUSED=`df | awk "/$OSCTMP/ { print \\$3 }" | tail -n 1`
-if [ `expr $NOWUSED - $USED` -gt 1024 ]; then
-	echo "Space not all freed: now ${NOWUSED}kB, was ${USED}kB." 1>&2
-fi
-
-if [ "$I_MOUNTED" = "yes" ]; then
-	$CLEANUP
-fi
diff --git a/lustre/tests/runvmstat b/lustre/tests/runvmstat
deleted file mode 100755
index 8a5a7df7c532754eb012f8f275fe78ddb83292de..0000000000000000000000000000000000000000
--- a/lustre/tests/runvmstat
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-DELAY=1
-null() {
-	:
-}
-
-case "$1" in
--q)	echo "echo off"
-	ECHO="null"
-	shift ;;
-[1-9]*)
-	DELAY=$1
-	ECHO=echo
-	shift ;;
-*)
-	echo "echo on"
-	ECHO=echo
-esac
-
-vmstat $DELAY | while read LINE ; do
-	LINE="`date +%s`: $LINE"
-	$ECHO "$LINE"
-	[ "$1" ] && echo "$LINE" >> $1
-done
diff --git a/lustre/tests/sanity-quota.sh b/lustre/tests/sanity-quota.sh
deleted file mode 100644
index c4d6b81cc3bf539b16363013027d3902c8d4f3bd..0000000000000000000000000000000000000000
--- a/lustre/tests/sanity-quota.sh
+++ /dev/null
@@ -1,1438 +0,0 @@
-#!/bin/bash
-#
-# Run select tests by setting ONLY, or as arguments to the script.
-# Skip specific tests by setting EXCEPT.
-#
-# Run test by setting NOSETUP=true when ltest has setup env for us
-set -e
-
-#kernel 2.4.x doesn't support quota
-K_VER=`uname --kernel-release | cut -b 1-3`
-if [ $K_VER = "2.4" ]; then
-    echo "Kernel 2.4 doesn't support quota"
-    exit 0
-fi
-
-SRCDIR=`dirname $0`
-export PATH=$PWD/$SRCDIR:$SRCDIR:$PWD/$SRCDIR/../utils:$PATH:/sbin
-
-ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT="$SANITY_QUOTA_EXCEPT"
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-case `uname -r` in
-2.6*) FSTYPE=${FSTYPE:-ldiskfs};;
-*) error "unsupported kernel" ;;
-esac
-
-[ "$ALWAYS_EXCEPT$EXCEPT" ] && \
-	echo "Skipping tests: `echo $ALWAYS_EXCEPT $EXCEPT`"
-
-TMP=${TMP:-/tmp}
-
-ORIG_PWD=${PWD}
-TSTID=${TSTID:-60000}
-TSTID2=${TSTID2:-60001}
-TSTUSR=${TSTUSR:-"quota_usr"}
-TSTUSR2=${TSTUSR2:-"quota_2usr"}
-BLK_SZ=1024
-BUNIT_SZ=${BUNIT_SZ:-1024}	# min block quota unit(kB)
-IUNIT_SZ=${IUNIT_SZ:-10}	# min inode quota unit
-MAX_DQ_TIME=604800
-MAX_IQ_TIME=604800
-
-TRACE=${TRACE:-""}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="9 10 11"
-
-QUOTALOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
-
-[ "$QUOTALOG" ] && rm -f $QUOTALOG || true
-
-DIR=${DIR:-$MOUNT}
-DIR2=${DIR2:-$MOUNT2}
-
-cleanup_and_setup_lustre
-
-LOVNAME=`cat $LPROC/llite/*/lov/common_name | tail -n 1`
-OSTCOUNT=`cat $LPROC/lov/$LOVNAME/numobd`
-
-SHOW_QUOTA_USER="$LFS quota -u $TSTUSR $DIR"
-SHOW_QUOTA_GROUP="$LFS quota -g $TSTUSR $DIR"
-SHOW_QUOTA_INFO="$LFS quota -t $DIR"
-
-# control the time of tests
-cycle=30
-[ "$SLOW" = "no" ] && cycle=10
-
-build_test_filter
-
-eval ONLY_0=true
-eval ONLY_99=true
-
-# set_blk_tunables(btune_sz)
-set_blk_tunesz() {
-        local i
-	# set btune size on all obdfilters
-	do_facet ost1 "set -x; for i in /proc/fs/lustre/obdfilter/*/quota_btune_sz; do
-		echo $(($1 * BLK_SZ)) >> \\\$i;
-	done"
-	# set btune size on mds
-	do_facet mds "for i in /proc/fs/lustre/mds/${FSNAME}-MDT*/quota_btune_sz; do
-		echo $(($1 * BLK_SZ)) >> \\\$i;
-	done"
-}
-
-# set_blk_unitsz(bunit_sz)
-set_blk_unitsz() {
-        local i
-	do_facet ost1 "for i in /proc/fs/lustre/obdfilter/*/quota_bunit_sz; do
-		echo $(($1 * BLK_SZ)) >> \\\$i;
-	done"
-	do_facet mds "for i in /proc/fs/lustre/mds/${FSNAME}-MDT*/quota_bunit_sz; do
-		echo $(($1 * BLK_SZ)) >> \\\$i;
-	done"
-}
-
-# set_file_tunesz(itune_sz)
-set_file_tunesz() {
-        local i
-	# set iunit and itune size on all obdfilters
-	do_facet ost1 "for i in /proc/fs/lustre/obdfilter/*/quota_itune_sz; do
-		echo $1 >> \\\$i;
-	done"
-	# set iunit and itune size on mds
-	do_facet mds "for i in /proc/fs/lustre/mds/${FSNAME}-MDT*/quota_itune_sz; do
-		echo $1 >> \\\$i;
-	done"
-}
-
-# set_file_unitsz(iunit_sz)
-set_file_unitsz() {
-        local i
-	do_facet ost1 "for i in /proc/fs/lustre/obdfilter/*/quota_iunit_sz; do
-		echo $1 >> \\\$i;
-	done"
-	do_facet mds "for i in /proc/fs/lustre/mds/${FSNAME}-MDT*/quota_iunit_sz; do
-		echo $1 >> \\\$i;
-	done"
-}
-
-lustre_fail() {
-        local fail_node=$1
-	local fail_loc=$2
-
-	case $fail_node in
-	    "mds" )
-		do_facet mds "sysctl -w lustre.fail_loc=$fail_loc" ;;
-	    "ost" )
-		for num in `seq $OSTCOUNT`; do
-		    do_facet ost$num "sysctl -w lustre.fail_loc=$fail_loc"
-		done ;;
-	    "mds_ost" )
-		do_facet mds "sysctl -w lustre.fail_loc=$fail_loc" ;
-		for num in `seq $OSTCOUNT`; do
-		    do_facet ost$num "sysctl -w lustre.fail_loc=$fail_loc"
-		done ;;
-	    * ) echo "usage: lustre_fail fail_node fail_loc" ;
-		return 1 ;;
-	esac
-}
-
-RUNAS="runas -u $TSTID"
-RUNAS2="runas -u $TSTID2"
-FAIL_ON_ERROR=true check_runas_id $TSTID $RUNAS
-FAIL_ON_ERROR=true check_runas_id $TSTID2 $RUNAS2
-
-FAIL_ON_ERROR=false
-
-# set quota
-test_0() {
-	$LFS quotaoff -ug $DIR
-	$LFS quotacheck -ug $DIR
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR
-	$LFS setquota -g $TSTUSR 0 0 0 0 $DIR
-	sysctl -w lnet.debug="+quota"
-}
-run_test 0 "Set quota ============================="
-
-# test for specific quota limitation, qunit, qtune $1=block_quota_limit
-test_1_sub() {
-        LIMIT=$1
-	chmod 0777 $DIR/$tdir
-        TESTFILE="$DIR/$tdir/$tfile-0"
-
-	wait_delete_completed
-
-        # test for user
-        log "  User quota (limit: $LIMIT kbytes)"
-        $LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-	sleep 3
-        $SHOW_QUOTA_USER
-
-        $LFS setstripe $TESTFILE -c 1
-        chown $TSTUSR.$TSTUSR $TESTFILE
-
-        log "    Write ..."
-        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) || error "(usr) write failure, but expect success"
-        log "    Done"
-        log "    Write out of block quota ..."
-	# this time maybe cache write,  ignore it's failure
-        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) seek=$(($LIMIT/2)) || true
-	# flush cache, ensure noquota flag is setted on client
-        sync; sleep 1; sync;
-        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$LIMIT && error "(usr) write success, but expect EDQUOT"
-
-        rm -f $TESTFILE
-	sync; sleep 1; sync;
-	OST0_UUID=`do_facet ost1 $LCTL dl | grep -m1 obdfilter | awk '{print $((NF-1))}'`
-	OST0_QUOTA_USED=`$LFS quota -o $OST0_UUID -u $TSTUSR $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $1 }'`
-	echo $OST0_QUOTA_USED
-	[ $OST0_QUOTA_USED -ne 0 ] && \
-	    ($SHOW_QUOTA_USER; error "quota deleted isn't released")
-	$SHOW_QUOTA_USER
-        $LFS setquota -u $TSTUSR 0 0 0 0 $DIR		# clear user limit
-
-        # test for group
-	log "--------------------------------------"
-        log "  Group quota (limit: $LIMIT kbytes)"
-        $LFS setquota -g $TSTUSR 0 $LIMIT 0 0 $DIR
-	sleep 3
-        $SHOW_QUOTA_GROUP
-        TESTFILE="$DIR/$tdir/$tfile-1"
-
-        $LFS setstripe $TESTFILE -c 1
-        chown $TSTUSR.$TSTUSR $TESTFILE
-
-        log "    Write ..."
-        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) || error "(grp) write failure, but expect success"
-        log "    Done"
-        log "    Write out of block quota ..."
-	# this time maybe cache write, ignore it's failure
-        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT/2)) seek=$(($LIMIT/2)) || true
-        sync; sleep 1; sync;
-        $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$LIMIT && error "(grp) write success, but expect EDQUOT"
-
-	# cleanup
-        rm -f $TESTFILE
-	sync; sleep 1; sync;
-	OST0_UUID=`do_facet ost1 $LCTL dl | grep -m1 obdfilter | awk '{print $((NF-1))}'`
-	OST0_QUOTA_USED=`$LFS quota -o $OST0_UUID -g $TSTUSR $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $1 }'`
-	echo $OST0_QUOTA_USED
-	[ $OST0_QUOTA_USED -ne 0 ] && \
-	    ($SHOW_QUOTA_USER; error "quota deleted isn't released")
-	$SHOW_QUOTA_GROUP
-        $LFS setquota -g $TSTUSR 0 0 0 0 $DIR		# clear group limit
-}
-
-# block hard limit (normal use and out of quota)
-test_1() {
-	for i in `seq 1 $cycle`; do
-	    # define blk_qunit is between 1M and 4M
-	    blk_qunit=$(( $RANDOM % 3072 + 1024 ))
-	    blk_qtune=$(( $RANDOM % $blk_qunit ))
-	    # other osts and mds will occupy at 1M blk quota
-	    b_limit=$(( ($RANDOM - 16384) / 8 +  $OSTCOUNT  * $blk_qunit * 4 ))
-	    set_blk_tunesz $blk_qtune
-	    set_blk_unitsz $blk_qunit
-	    echo "cycle: $i(total $cycle) bunit:$blk_qunit, btune:$blk_qtune, blimit:$b_limit"
-	    test_1_sub $b_limit
-	    echo "=================================================="
-	    set_blk_unitsz $((128 * 1024))
-	    set_blk_tunesz $((128 * 1024 / 2))
-        done
-}
-run_test 1 "Block hard limit (normal use and out of quota) ==="
-
-# test for specific quota limitation, qunit, qtune $1=block_quota_limit
-test_2_sub() {
-        LIMIT=$1
-	chmod 0777 $DIR/$tdir
-        TESTFILE="$DIR/$tdir/$tfile-0"
-
-	wait_delete_completed
-
-        # test for user
-        log "  User quota (limit: $LIMIT files)"
-        $LFS setquota -u $TSTUSR 0 0 0 $LIMIT $DIR
-	sleep 3
-        $SHOW_QUOTA_USER
-
-	log "    Create $LIMIT files ..."
-	$RUNAS createmany -m ${TESTFILE} $LIMIT || \
-		error "(usr) create failure, but except success"
-	log "    Done"
-	log "    Create out of file quota ..."
-	$RUNAS touch ${TESTFILE}_xxx && \
-		error "(usr) touch success, but expect EDQUOT"
-
-	unlinkmany ${TESTFILE} $LIMIT
-	rm -f ${TESTFILE}_xxx
-	sync; sleep 1; sync;
-
-	MDS_UUID=`do_facet mds $LCTL dl | grep -m1 mds | awk '{print $((NF-1))}'`
-	MDS_QUOTA_USED=`$LFS quota -o $MDS_UUID -u $TSTUSR $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $4 }'`
-	echo $MDS_QUOTA_USED
-	[ $MDS_QUOTA_USED -ne 0 ] && \
-	    ($SHOW_QUOTA_USER; error "quota deleted isn't released")
-	$SHOW_QUOTA_USER
-        $LFS setquota -u $TSTUSR 0 0 0 0 $DIR		# clear user limit
-
-        # test for group
-	log "--------------------------------------"
-        log "  Group quota (limit: $LIMIT FILE)"
-        $LFS setquota -g $TSTUSR 0 0 0 $LIMIT $DIR
-	sleep 3
-        $SHOW_QUOTA_GROUP
-        TESTFILE=$DIR/$tdir/$tfile-1
-
-	log "    Create $LIMIT files ..."
-	$RUNAS createmany -m ${TESTFILE} $LIMIT || \
-		error "(usr) create failure, but except success"
-	log "    Done"
-	log "    Create out of file quota ..."
-	$RUNAS touch ${TESTFILE}_xxx && \
-		error "(usr) touch success, but expect EDQUOT"
-
-	unlinkmany ${TESTFILE} $LIMIT
-	rm -f ${TESTFILE}_xxx
-	sync; sleep 1; sync;
-
-	MDS_UUID=`do_facet mds $LCTL dl | grep -m1 mds | awk '{print $((NF-1))}'`
-	MDS_QUOTA_USED=`$LFS quota -o $MDS_UUID -g $TSTUSR $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $4 }'`
-	echo $MDS_QUOTA_USED
-	[ $MDS_QUOTA_USED -ne 0 ] && \
-	    ($SHOW_QUOTA_USER; error "quota deleted isn't released")
-	$SHOW_QUOTA_GROUP
-        $LFS setquota -g $TSTUSR 0 0 0 0 $DIR		# clear user limit
-}
-
-# file hard limit (normal use and out of quota)
-test_2() {
-	for i in `seq 1 $cycle`; do
-	    # define ino_qunit is between 10 and 100
-	    ino_qunit=$(( $RANDOM % 90 + 10 ))
-	    ino_qtune=$(( $RANDOM % $ino_qunit ))
-	    # RANDOM's maxium is 32767
-	    i_limit=$(( $RANDOM % 990 + 10 ))
-            set_file_tunesz $ino_qtune
-	    set_file_unitsz $ino_qunit
-	    echo "cycle: $i(total $cycle) iunit:$ino_qunit, itune:$ino_qtune, ilimit:$i_limit"
-	    test_2_sub $i_limit
-	    echo "=================================================="
-	    set_file_unitsz 5120
-	    set_file_tunesz 2560
-        done
-}
-run_test 2 "File hard limit (normal use and out of quota) ==="
-
-test_block_soft() {
-	TESTFILE=$1
-	TIMER=$(($2 * 3 / 2))
-	OFFSET=0
-
-	wait_delete_completed
-
-	echo "    Write to exceed soft limit"
-	RUNDD="$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ"
-	$RUNDD count=$((BUNIT_SZ+1)) || \
-	        error "write failure, but expect success"
-	OFFSET=$((OFFSET + BUNIT_SZ + 1))
-	sync; sleep 1; sync;
-
-	$SHOW_QUOTA_USER
-	$SHOW_QUOTA_GROUP
-	$SHOW_QUOTA_INFO
-
-	echo "    Write before timer goes off"
-	$RUNDD count=$BUNIT_SZ seek=$OFFSET || \
-	        error "write failure, but expect success"
-	OFFSET=$((OFFSET + BUNIT_SZ))
-	sync; sleep 1; sync;
-	echo "    Done"
-
-        echo "    Sleep $TIMER seconds ..."
-        sleep $TIMER
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-        $SHOW_QUOTA_INFO
-
-	echo "    Write after timer goes off"
-	# maybe cache write, ignore.
-	sync; sleep 1; sync;
-	$RUNDD count=$BUNIT_SZ seek=$OFFSET || true
-	OFFSET=$((OFFSET + BUNIT_SZ))
-	sync; sleep 1; sync;
-	$RUNDD count=$BUNIT_SZ seek=$OFFSET && \
-	        error "write success, but expect EDQUOT"
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-        $SHOW_QUOTA_INFO
-
-	echo "    Unlink file to stop timer"
-	rm -f $TESTFILE
-	sync; sleep 1; sync
-	echo "    Done"
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-        $SHOW_QUOTA_INFO
-
-	echo "    Write ..."
-	$RUNDD count=$BUNIT_SZ || error "write failure, but expect success"
-	echo "    Done"
-
-	# cleanup
-	rm -f $TESTFILE
-	sync; sleep 3; sync;
-}
-
-# block soft limit (start timer, timer goes off, stop timer)
-test_3() {
-	chmod 0777 $DIR/$tdir
-
-        # 1 bunit on mds and 1 bunit on every ost
-	LIMIT=$(( $BUNIT_SZ * ($OSTCOUNT + 1) ))
-	GRACE=10
-
-	echo "  User quota (soft limit: $LIMIT kbytes  grace: $GRACE seconds)"
-	TESTFILE=$DIR/$tdir/$tfile-0
-
-	$LFS setstripe $TESTFILE -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-	$LFS setquota -t -u $GRACE $MAX_IQ_TIME $DIR
-	$LFS setquota -u $TSTUSR $LIMIT 0 0 0 $DIR
-
-	test_block_soft $TESTFILE $GRACE
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR
-
-	echo "  Group quota (soft limit: $LIMIT kbytes  grace: $GRACE seconds)"
-	TESTFILE=$DIR/$tdir/$tfile-1
-
-	$LFS setstripe $TESTFILE -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-	$LFS setquota -t -g $GRACE $MAX_IQ_TIME $DIR
-	$LFS setquota -g $TSTUSR $LIMIT 0 0 0 $DIR
-
-	test_block_soft $TESTFILE $GRACE
-	$LFS setquota -g $TSTUSR 0 0 0 0 $DIR
-}
-run_test 3 "Block soft limit (start timer, timer goes off, stop timer) ==="
-
-test_file_soft() {
-	TESTFILE=$1
-	LIMIT=$2
-	TIMER=$(($3 * 3 / 2))
-
-	wait_delete_completed
-
-	echo "    Create files to exceed soft limit"
-	$RUNAS createmany -m ${TESTFILE}_ $((LIMIT + 1)) || \
-		error "create failure, but expect success"
-	sync; sleep 1; sync
-	echo "    Done"
-
-	echo "    Create file before timer goes off"
-	$RUNAS touch ${TESTFILE}_before || \
-		error "failed create before timer expired, but expect success"
-	sync; sleep 1; sync
-	echo "    Done"
-
-	echo "    Sleep $TIMER seconds ..."
-	sleep $TIMER
-
-	$SHOW_QUOTA_USER
-	$SHOW_QUOTA_GROUP
-	$SHOW_QUOTA_INFO
-
-	echo "    Create file after timer goes off"
-	$RUNAS touch ${TESTFILE}_after ${TESTFILE}_after1 && \
-		error "create after timer expired, but expect EDQUOT"
-	sync; sleep 1; sync
-
-	$SHOW_QUOTA_USER
-	$SHOW_QUOTA_GROUP
-	$SHOW_QUOTA_INFO
-
-	echo "    Unlink files to stop timer"
-	find `dirname $TESTFILE` -name "`basename ${TESTFILE}`*" | xargs rm -f
-	echo "    Done"
-
-	echo "    Create file"
-	$RUNAS touch ${TESTFILE}_xxx || \
-		error "touch after timer stop failure, but expect success"
-	sync; sleep 1; sync
-	echo "    Done"
-
-	# cleanup
-	rm -f ${TESTFILE}_xxx
-	sync; sleep 3; sync;
-}
-
-# file soft limit (start timer, timer goes off, stop timer)
-test_4() {
-	chmod 0777 $DIR/$tdir
-	LIMIT=$(($IUNIT_SZ * 10))	# 10 iunits on mds
-	TESTFILE=$DIR/$tdir/$tfile-0
-
-	GRACE=5
-
-	echo "  User quota (soft limit: $LIMIT files  grace: $GRACE seconds)"
-	$LFS setquota -t -u $MAX_DQ_TIME $GRACE $DIR
-	$LFS setquota -u $TSTUSR 0 0 $LIMIT 0 $DIR
-	$SHOW_QUOTA_USER
-
-	test_file_soft $TESTFILE $LIMIT $GRACE
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR
-
-	echo "  Group quota (soft limit: $LIMIT files  grace: $GRACE seconds)"
-	$LFS setquota -t -g $MAX_DQ_TIME $GRACE $DIR
-	$LFS setquota -g $TSTUSR 0 0 $LIMIT 0 $DIR
-	$SHOW_QUOTA_GROUP
-	TESTFILE=$DIR/$tdir/$tfile-1
-
-	test_file_soft $TESTFILE $LIMIT $GRACE
-	$LFS setquota -g $TSTUSR 0 0 0 0 $DIR
-
-	# cleanup
-	$LFS setquota -t -u $MAX_DQ_TIME $MAX_IQ_TIME $DIR
-	$LFS setquota -t -g $MAX_DQ_TIME $MAX_IQ_TIME $DIR
-}
-run_test 4 "File soft limit (start timer, timer goes off, stop timer) ==="
-
-test_4a() {
-        GR_STR1="1w3d"
-        GR_STR2="1000s"
-        GR_STR3="5s"
-        GR_STR4="1w2d3h4m5s"
-        GR_STR5="5c"
-        GR_STR6="1111111111111111"
-
-	wait_delete_completed
-
-        # test of valid grace strings handling
-        echo "  Valid grace strings test"
-        $LFS setquota -t -u $GR_STR1 $GR_STR2 $DIR
-        $LFS quota -u -t $DIR | grep "Block grace time: $GR_STR1"
-        $LFS setquota -t -g $GR_STR3 $GR_STR4 $DIR
-        $LFS quota -g -t $DIR | grep "Inode grace time: $GR_STR4"
-
-        # test of invalid grace strings handling
-        echo "  Invalid grace strings test"
-        ! $LFS setquota -t -u $GR_STR4 $GR_STR5 $DIR
-        ! $LFS setquota -t -g $GR_STR4 $GR_STR6 $DIR
-
-        # cleanup
-        $LFS setquota -t -u $MAX_DQ_TIME $MAX_IQ_TIME $DIR
-        $LFS setquota -t -g $MAX_DQ_TIME $MAX_IQ_TIME $DIR
-}
-run_test 4a "Grace time strings handling ==="
-
-# chown & chgrp (chown & chgrp successfully even out of block/file quota)
-test_5() {
-	BLIMIT=$(( $BUNIT_SZ * $((OSTCOUNT + 1)) * 10)) # 10 bunits on each server
-	ILIMIT=$(( $IUNIT_SZ * 10 )) # 10 iunits on mds
-
-	wait_delete_completed
-
-	echo "  Set quota limit (0 $BLIMIT 0 $ILIMIT) for $TSTUSR.$TSTUSR"
-	$LFS setquota -u $TSTUSR 0 $BLIMIT 0 $ILIMIT $DIR
-	$LFS setquota -g $TSTUSR 0 $BLIMIT 0 $ILIMIT $DIR
-	$SHOW_QUOTA_USER
-	$SHOW_QUOTA_GROUP
-
-	echo "  Create more than $ILIMIT files and more than $BLIMIT kbytes ..."
-	createmany -m $DIR/$tdir/$tfile-0_ $((ILIMIT + 1)) || \
-		error "touch failure, expect success"
-	dd if=/dev/zero of=$DIR/$tdir/$tfile-0_1 bs=$BLK_SZ count=$((BLIMIT+1)) || error "write failure, expect success"
-
-	echo "  Chown files to $TSTUSR.$TSTUSR ..."
-	for i in `seq 0 $ILIMIT`; do
-	chown $TSTUSR.$TSTUSR $DIR/$tdir/$tfile-0_$i || \
-			error "chown failure, but expect success"
-	done
-
-	# cleanup
-	unlinkmany $DIR/$tdir/$tfile-0_ $((ILIMIT + 1))
-	sync; sleep 3; sync;
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR
-	$LFS setquota -g $TSTUSR 0 0 0 0 $DIR
-}
-run_test 5 "Chown & chgrp successfully even out of block/file quota ==="
-
-# block quota acquire & release
-test_6() {
-	if [ $OSTCOUNT -lt 2 ]; then
-		skip "$OSTCOUNT < 2, too few osts"
-		return 0;
-	fi
-
-	wait_delete_completed
-
-	chmod 0777 $DIR/$tdir
-
-	LIMIT=$((BUNIT_SZ * (OSTCOUNT + 1) * 5)) # 5 bunits per server
-	FILEA="$DIR/$tdir/$tfile-0_a"
-	FILEB="$DIR/$tdir/$tfile-0_b"
-
-	echo "  Set block limit $LIMIT kbytes to $TSTUSR.$TSTUSR"
-	$LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-	$LFS setquota -g $TSTUSR 0 $LIMIT 0 0 $DIR
-	$SHOW_QUOTA_USER
-	$SHOW_QUOTA_GROUP
-
-	echo "  Create filea on OST0 and fileb on OST1"
-	$LFS setstripe $FILEA -i 0 -c 1
-	$LFS setstripe $FILEB -i 1 -c 1
-	chown $TSTUSR.$TSTUSR $FILEA
-	chown $TSTUSR.$TSTUSR $FILEB
-
-	echo "  Exceed quota limit ..."
-        RUNDD="$RUNAS dd if=/dev/zero of=$FILEB bs=$BLK_SZ"
-        $RUNDD count=$((LIMIT - BUNIT_SZ * OSTCOUNT)) || \
-                error "write fileb failure, but expect success"
-
-	sync; sleep 1; sync;
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-        $RUNDD seek=$LIMIT count=$((BUNIT_SZ * OSTCOUNT)) && \
-                error "write fileb success, but expect EDQUOT"
-	sync; sleep 1; sync;
-	echo "  Write to OST0 return EDQUOT"
-	# this write maybe cache write, ignore it's failure
-        RUNDD="$RUNAS dd if=/dev/zero of=$FILEA bs=$BLK_SZ"
-        $RUNDD count=$(($BUNIT_SZ * 2)) || true
-	sync; sleep 1; sync;
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-        $RUNDD count=$((BUNIT_SZ * 2)) seek=$((BUNIT_SZ *2)) && \
-                error "write filea success, but expect EDQUOT"
-
-	echo "  Remove fileb to let OST1 release quota"
-	rm -f $FILEB
-        sync; sleep 10; sync; # need to allow journal commit for small fs
-
-	echo "  Write to OST0"
-	$RUNDD count=$((LIMIT - BUNIT_SZ * OSTCOUNT)) || \
-	        error "write filea failure, expect success"
-	echo "  Done"
-
-	# cleanup
-	rm -f $FILEA
-	sync; sleep 3; sync;
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR
-	$LFS setquota -g $TSTUSR 0 0 0 0 $DIR
-	return 0
-}
-run_test 6 "Block quota acquire & release ========="
-
-# quota recovery (block quota only by now)
-test_7()
-{
-	chmod 0777 $DIR/$tdir
-	remote_mds && skip "remote mds" && return 0
-
-	wait_delete_completed
-
-	LIMIT=$(( $BUNIT_SZ * $(($OSTCOUNT + 1)) ))
-	TESTFILE="$DIR/$tdir/$tfile-0"
-
-	$LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-
-	$LFS setstripe $TESTFILE -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-	echo "  Write to OST0..."
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ || \
-		error "write failure, but expect success"
-
-	#define OBD_FAIL_OBD_DQACQ               0x604
-	lustre_fail mds  0x604
-	echo "  Remove files on OST0"
-	rm -f $TESTFILE
-	lustre_fail mds  0
-
-	echo "  Trigger recovery..."
-	OSC0_UUID="`$LCTL dl | awk '$3 ~ /osc/ { print $1 }'`"
-	for i in $OSC0_UUID; do
-		$LCTL --device $i activate || error "activate osc failed!"
-	done
-
-	# sleep a while to wait for recovery done
-	sleep 20
-
-	# check limits
-	PATTERN="`echo $DIR | sed 's/\//\\\\\//g'`"
-	TOTAL_LIMIT="`$LFS quota -u $TSTUSR $DIR | awk '/^.*'$PATTERN'.*[[:digit:]+][[:space:]+]/ { print $4 }'`"
-	[ $TOTAL_LIMIT -eq $LIMIT ] || error "total limits not recovery!"
-	echo "  total limits = $TOTAL_LIMIT"
-
-        OST0_UUID=`do_facet ost1 "$LCTL dl | grep -m1 obdfilter" | awk '{print $((NF-1))}'`
-        [ -z "$OST0_UUID" ] && OST0_UUID=`do_facet ost1 "$LCTL dl | grep -m1 obdfilter" | awk '{print $((NF-1))}'`
-	OST0_LIMIT="`$LFS quota -o $OST0_UUID -u $TSTUSR $DIR | awk '/^.*[[:digit:]+][[:space:]+]/ { print $3 }'`"
-	[ $OST0_LIMIT -eq $BUNIT_SZ ] || error "high limits not released!"
-	echo "  limits on $OST0_UUID = $OST0_LIMIT"
-
-	# cleanup
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR
-}
-run_test 7 "Quota recovery (only block limit) ======"
-
-# run dbench with quota enabled
-test_8() {
-	BLK_LIMIT=$((100 * 1024 * 1024)) # 100G
-	FILE_LIMIT=1000000
-	DBENCH_LIB=${DBENCH_LIB:-/usr/lib/dbench}
-
-	[ ! -d $DBENCH_LIB ] && skip "dbench not installed" && return 0
-
-	wait_delete_completed
-
-	echo "  Set enough high limit for user: $TSTUSR"
-	$LFS setquota -u $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
-	echo "  Set enough high limit for group: $TSTUSR"
-	$LFS setquota -g $USER 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
-
-	TGT=$DIR/$tdir/client.txt
-	SRC=${SRC:-$DBENCH_LIB/client.txt}
-	[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-	SRC=$DBENCH_LIB/client_plain.txt
-	[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-
-	chmod 0777 $DIR/$tdir
-	SAVE_PWD=$PWD
-	cd $DIR/$tdir
-	local duration=""
-	[ "$SLOW" = "no" ] && duration=" -t 120"
-	$RUNAS dbench -c client.txt 3 $duration
-	RC=$?
-	[ $RC -ne 0 ] && killall -9 dbench
-
-	rm -f client.txt
-	sync; sleep 3; sync;
-
-	cd $SAVE_PWD
-	return $RC
-}
-run_test 8 "Run dbench with quota enabled ==========="
-
-# run for fixing bug10707, it needs a big room. test for 64bit
-KB=1024
-GB=$((KB * 1024 * 1024))
-# Use this as dd bs to decrease time
-# inode->i_blkbits = min(PTLRPC_MAX_BRW_BITS+1, LL_MAX_BLKSIZE_BITS);
-blksize=$((1 << 21)) # 2Mb
-size_file=$((GB * 9 / 2))
-# this check is just for test9 and test10
-OST0_MIN=4900000 #4.67G
-check_whether_skip () {
-    OST0_SIZE=`$LFS df $DIR | awk '/\[OST:0\]/ {print $4}'`
-    log "OST0_SIZE: $OST0_SIZE  required: $OST0_MIN"
-    if [ $OST0_SIZE -lt $OST0_MIN ]; then
-	echo "WARN: OST0 has less than $OST0_MIN free, skip this test."
-	return 0
-    else
-	return 1
-    fi
-}
-
-test_9() {
-	check_whether_skip && return 0
-
-	wait_delete_completed
-
- 	set_blk_tunesz 512
- 	set_blk_unitsz 1024
-
-	chmod 0777 $DIR/$tdir
-        TESTFILE="$DIR/$tdir/$tfile-0"
-
-        BLK_LIMIT=$((100 * KB * KB)) # 100G
-        FILE_LIMIT=1000000
-
-        log "  Set enough high limit(block:$BLK_LIMIT; file: $FILE_LIMIT) for user: $TSTUSR"
-        $LFS setquota -u $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
-        log "  Set enough high limit(block:$BLK_LIMIT; file: $FILE_LIMIT) for group: $TSTUSR"
-        $LFS setquota -g $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
-
-        echo "  Set stripe"
-	$LFS setstripe $TESTFILE -c 1
-        touch $TESTFILE
-        chown $TSTUSR.$TSTUSR $TESTFILE
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-        log "    Write the big file of 4.5G ..."
-        $RUNAS dd if=/dev/zero of=$TESTFILE  bs=$blksize count=$((size_file / blksize)) || \
-               error "(usr) write 4.5G file failure, but expect success"
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-        log "    delete the big file of 4.5G..."
-        $RUNAS rm -f $TESTFILE
-	sync; sleep 3; sync;
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-        RC=$?
-
-	set_blk_unitsz $((128 * 1024))
-	set_blk_tunesz $((128 * 1024 / 2))
-
-        return $RC
-}
-run_test 9 "run for fixing bug10707(64bit) ==========="
-
-# run for fixing bug10707, it need a big room. test for 32bit
-test_10() {
-	chmod 0777 $DIR/$tdir
-	check_whether_skip && return 0
-
-	wait_delete_completed
-
- 	set_blk_tunesz 512
- 	set_blk_unitsz 1024
-
-	# make qd_count 32 bit
-	lustre_fail mds_ost 0xA00
-
-	TESTFILE="$DIR/$tdir/$tfile-0"
-
-	BLK_LIMIT=$((100 * KB * KB)) # 100G
-	FILE_LIMIT=1000000
-
-	log "  Set enough high limit(block:$BLK_LIMIT; file: $FILE_LIMIT) for user: $TSTUSR"
-	$LFS setquota -u $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
-	log "  Set enough high limit(block:$BLK_LIMIT; file: $FILE_LIMIT) for group: $TSTUSR"
-	$LFS setquota -g $TSTUSR 0 $BLK_LIMIT 0 $FILE_LIMIT $DIR
-
-	echo "  Set stripe"
-	$LFS setstripe $TESTFILE -c 1
-	touch $TESTFILE
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-        log "    Write the big file of 4.5 G ..."
-        $RUNAS dd if=/dev/zero of=$TESTFILE  bs=$blksize count=$((size_file / blksize)) || \
-		error "(usr) write 4.5 G file failure, but expect success"
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-        log "    delete the big file of 4.5 G..."
-        $RUNAS rm -f $TESTFILE
-	sync; sleep 3; sync;
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-	RC=$?
-
-	# make qd_count 64 bit
-	lustre_fail mds_ost 0
-
-	set_blk_unitsz $((128 * 1024))
-	set_blk_tunesz $((128 * 1024 / 2))
-
-	return $RC
-}
-run_test 10 "run for fixing bug10707(32bit) ==========="
-
-test_11() {
-       wait_delete_completed
-
-       #prepare the test
-       block_limit=`(echo 0; df -t lustre -P | awk '{print $(NF - 4)}') | tail -n 1`
-       echo $block_limit
-       orig_dbr=`cat /proc/sys/vm/dirty_background_ratio`
-       orig_dec=`cat /proc/sys/vm/dirty_expire_centisecs`
-       orig_dr=`cat /proc/sys/vm/dirty_ratio`
-       orig_dwc=`cat /proc/sys/vm/dirty_writeback_centisecs`
-       echo 1  > /proc/sys/vm/dirty_background_ratio
-       echo 30 > /proc/sys/vm/dirty_expire_centisecs
-       echo 1  > /proc/sys/vm/dirty_ratio
-       echo 50 > /proc/sys/vm/dirty_writeback_centisecs
-       TESTDIR="$DIR/$tdir"
-       local RV=0
-
-       #do the test
-       local SECS=0
-       local REPS=3
-       [ "$SLOW" = no ] && REPS=1
-       local sleep=20
-       local i=1
-       while [ $i -le $REPS ]; do
-	   echo "test: cycle($i of $REPS) start at $(date)"
-	   mkdir -p $DIR/$tdir && chmod 777 $DIR/$tdir
-	   echo -n "    create a file for uid "
-	   for j in `seq 1 30`; do
-	       echo -n "$j "
-               # 30MB per dd for a total of 900MB (if space even permits)
-	       runas -u $j dd if=/dev/zero of=$DIR/$tdir/$tfile  bs=$blksize count=15 > /dev/null 2>&1 &
-	   done
-	   echo ""
-	   PROCS=$(ps -ef | grep -v grep | grep "dd if /dev/zero of $TESTDIR" | wc -l)
-           LAST_USED=0
-	   while [ $PROCS -gt 0 ]; do 
-	     sleep 20
-	     SECS=$((SECS + sleep))
-	     PROCS=$(ps -ef | grep -v grep | grep "dd if /dev/zero of $TESTDIR" | wc -l)
-	     USED=$(du -s $DIR/$tdir | awk '{print $1}')
-	     PCT=$(($USED * 100 / $block_limit))
-	     echo "${i}/${REPS} ${PCT}% p${PROCS} t${SECS}  "
-	     if [ $USED -le $LAST_USED ]; then
-		 kill -9 $(ps -ef | grep "dd if /dev/zero of $DIR/$tdir" | grep -v grep | awk '{ print $2 }')
-		 i=$REPS
-		 RV=2
-		 break
-	     fi
-             LAST_USED=$USED
-	   done
-	   echo "    removing the test files..."
-	   rm -f $DIR/$tdir/$tfile
-	   echo "cycle $i done at $(date)"
-	   i=$[$i+1]
-       done
-       echo "Test took $SECS sec"
-
-       #clean
-       echo $orig_dbr > /proc/sys/vm/dirty_background_ratio
-       echo $orig_dec > /proc/sys/vm/dirty_expire_centisecs
-       echo $orig_dr  > /proc/sys/vm/dirty_ratio
-       echo $orig_dwc > /proc/sys/vm/dirty_writeback_centisecs
-       if [ $RV -ne 0 ]; then
-           error "Nothing was written for $SECS sec ... aborting"
-       fi
-       return $RV
-}
-run_test 11 "run for fixing bug10912 ==========="
-
-
-# test a deadlock between quota and journal b=11693
-test_12() {
-	chmod 0777 $DIR/$tdir
-
-	[ "$(grep $DIR2 /proc/mounts)" ] || mount_client $DIR2 || \
-		{ skip "Need lustre mounted on $MOUNT2 " && retutn 0; }
-
-	if [ $OSTCOUNT -lt 2 ]; then
-		skip "$OSTCOUNT < 2, too few osts"
-		return 0;
-	fi
-
-	LIMIT=$(( $BUNIT_SZ * $(($OSTCOUNT + 1)) * 10)) # 10 bunits each sever
-	TESTFILE="$DIR/$tdir/$tfile-0"
-	TESTFILE2="$DIR2/$tdir/$tfile-1"
-
-	wait_delete_completed
-
-	echo "   User quota (limit: $LIMIT kbytes)"
-	$LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-
-	$LFS setstripe $TESTFILE -i 0 -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-	$LFS setstripe $TESTFILE2 -i 1 -c 1
-        chown $TSTUSR2.$TSTUSR2 $TESTFILE2
-
-	#define OBD_FAIL_OST_HOLD_WRITE_RPC      0x21f
-	lustre_fail ost 0x0000021f
-
-	echo "   step1: write out of block quota ..."
-	$RUNAS2 dd if=/dev/zero of=$TESTFILE2 bs=$BLK_SZ count=102400 &
-	DDPID1=$!
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$(($LIMIT*2)) &
-	DDPID=$!
-
-	echo  "   step2: testing ......"
-	count=0
-	while [ true ]; do
-	    if [ -z `ps -ef | awk '$2 == '${DDPID1}' { print $8 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt 64 ]; then
-		lustre_fail ost 0
-		error "dd should be finished!"
-	    fi
-	    sleep 1
-	done
-	echo "(dd_pid=$DDPID1, time=$count)successful"
-
-	#Recover fail_loc and dd will finish soon
-	lustre_fail ost 0
-
-	echo  "   step3: testing ......"
-	count=0
-	while [ true ]; do
-	    if [ -z `ps -ef | awk '$2 == '${DDPID}' { print $8 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt 100 ]; then
-		error "dd should be finished!"
-	    fi
-	    sleep 1
-	done
-	echo "(dd_pid=$DDPID, time=$count)successful"
-
-	rm -f $TESTFILE $TESTFILE2
-        sync; sleep 3; sync;
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR		# clear user limit
-}
-run_test 12 "test a deadlock between quota and journal ==="
-
-# test multiple clients write block quota b=11693
-test_13() {
-        wait_delete_completed
-
-	# one OST * 10 + (mds + other OSTs)
-	LIMIT=$((BUNIT_SZ * 10 + (BUNIT_SZ * OSTCOUNT)))
-	TESTFILE="$DIR/$tdir/$tfile"
-
-	echo "   User quota (limit: $LIMIT kbytes)"
-	$LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-	$SHOW_QUOTA_USER
-
-	$LFS setstripe $TESTFILE -i 0 -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-	$LFS setstripe $TESTFILE.2 -i 0 -c 1
-        chown $TSTUSR.$TSTUSR $TESTFILE.2
-
-	echo "   step1: write out of block quota ..."
-	# one bunit will give mds
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$[($LIMIT - $BUNIT_SZ) / 2] &
-	DDPID=$!
-	$RUNAS dd if=/dev/zero of=$TESTFILE.2 bs=$BLK_SZ count=$[($LIMIT - $BUNIT_SZ) / 2] &
-	DDPID1=$!
-
-	echo  "   step2: testing ......"
-	count=0
-	while [ true ]; do
-	    if [ -z `ps -ef | awk '$2 == '${DDPID}' { print $8 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt 64 ]; then
-		error "dd should be finished!"
-	    fi
-	    sleep 1
-	done
-	echo "(dd_pid=$DDPID, time=$count)successful"
-
-	count=0
-	while [ true ]; do
-	    if [ -z `ps -ef | awk '$2 == '${DDPID1}' { print $8 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt 64 ]; then
-		error "dd should be finished!"
-	    fi
-	    sleep 1
-	done
-	echo "(dd_pid=$DDPID1, time=$count)successful"
-
-	sync; sleep 5; sync;
-
-	echo  "   step3: checking ......"
-	fz=`stat -c %s $TESTFILE`
-	fz2=`stat -c %s $TESTFILE.2`
-	$SHOW_QUOTA_USER
-	[ $((fz + fz2)) -lt $((BUNIT_SZ * BLK_SZ * 10)) ] && \
-		error "files too small $fz + $fz2 < $((BUNIT_SZ * BLK_SZ * 10))"
-
-	rm -f $TESTFILE $TESTFILE.2
-	sync; sleep 3; sync;
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $DIR		# clear user limit
-}
-run_test 13 "test multiple clients write block quota ==="
-
-check_if_quota_zero(){
-        line=`$LFS quota -$1 $2 $DIR | wc -l`
-	for i in `seq 3 $line`; do
-	    if [ $i -eq 3 ]; then
-		field="3 4 6 7"
-	    else
-		field="3 5"
-	    fi
-	    for j in $field; do
-		tmp=`$LFS quota -$1 $2 $DIR | sed -n ${i}p |
-                     awk  '{print $'"$j"'}'`
-		[ -n "$tmp" ] && [ $tmp -ne 0 ] && $LFS quota -$1 $2 $DIR && \
-		    error "quota on $2 isn't clean"
-	    done
-	done
-	echo "pass check_if_quota_zero"
-}
-
-pre_test_14 () {
-        # reboot the lustre
-        sync; sleep 5; sync
-        cd $T_PWD; sh llmountcleanup.sh || error "llmountcleanup failed"
-        sh llmount.sh
-        run_test 0 "reboot lustre"
-}
-pre_test_14
-
-test_14(){ # b=12223 -- setting quota on root
-	TESTFILE="$DIR/$tdir/$tfile"
-
-	# out of root's file and block quota
-        $LFS setquota -u root 10 10 10 10 $DIR
-	createmany -m ${TESTFILE} 20 || \
-	    error "unexpected: user(root) create files failly!"
-	dd if=/dev/zero of=$TESTFILE bs=4k count=4096 || \
-	    error "unexpected: user(root) write files failly!"
-	chmod 666 $TESTFILE
-	$RUNAS dd if=/dev/zero of=${TESTFILE} seek=4096 bs=4k count=4096 && \
-	    error "unexpected: user(quota_usr) write a file successfully!"
-
-	# trigger the llog
-	chmod 777 $DIR
-	for i in `seq 1 10`; do $RUNAS touch ${TESTFILE}a_$i; done
-	for i in `seq 1 10`; do $RUNAS rm -f ${TESTFILE}a_$i; done
-
-	# do the check
-	dmesg | tail | grep "\-122" |grep llog_obd_origin_add && error "err -122 not found in dmesg"
-	$LFS setquota -u root 0 0 0 0 $DIR
-	#check_if_quota_zero u root
-
-	# clean
-	unlinkmany ${TESTFILE} 15
-	rm -f $TESTFILE
-	sync; sleep 3; sync;
-}
-run_test 14 "test setting quota on root ==="
-
-quota_set_version() {
-        do_facet mds "for i in /proc/fs/lustre/mds/${FSNAME}-MDT*/quota_type; do
-                echo $1 >> \\\$i;
-        done"
-}
-
-test_14a(){
-        # 1. check that required users exist
-        # 2. ensure that switch to new mode will start conversion
-        # 3. start quota in old mode and put some entries
-        # 4. restart quota in new mode forcing conversion and check the entries
-
-        wait_delete_completed
-
-        MISSING_USERS=""
-        for i in `seq 1 30`; do
-                check_runas_id_ret quota15_$i "runas -u quota15_$i"
-                if [ "$?" != "0" ]; then
-                       MISSING_USERS="$MISSING_USERS quota15_$i"
-                fi
-        done
-
-        if [ -n "$MISSING_USERS" ]; then
-                skip "following users are missing: $MISSING_USERS"
-                return 0
-        fi
-
-        $LFS quotaoff -ug $DIR
-        quota_set_version 1
-        $LFS quotacheck -ug $DIR
-
-        for i in `seq 1 30`; do
-                $LFS setquota -u quota15_$i $i $i $i $i $DIR || error "lfs setquota failed"
-        done
-
-        $LFS quotaoff -ug $DIR
-        quota_set_version 2
-        $LFS quotainv -ug $DIR
-        $LFS quotacheck -ug $DIR
-
-        for i in `seq 1 30`; do
-                # the format is "mntpnt   curspace[*]   bsoftlimit   bhardlimit   [time]   curinodes[*]    isoftlimit  ihardlimit"
-                ($LFS quota -u quota15_$i $DIR | grep -E '^ *'$DIR' *[0-9]+\** *'$i' *'$i' *[0-9]+\** *'$i' *'$i) \
-                 || error "lfs quota output is unexpected"
-                $LFS setquota -u quota15_$i 0 0 0 0 $DIR || error "ifs setquota clear failed"
-        done
-}
-run_test 14a "setting 30 quota entries in quota v1 file before conversion ==="
-
-test_15(){
-        LIMIT=$((24 * 1024 * 1024 * 1024 * 1024)) # 24 TB
-        PATTERN="`echo $DIR | sed 's/\//\\\\\//g'`"
-
-	wait_delete_completed
-
-        # test for user
-        $LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR || error "failed setting user quota limit $LIMIT"
-        TOTAL_LIMIT="`$LFS quota -u $TSTUSR $DIR | awk '/^.*'$PATTERN'.*[[:digit:]+][[:space:]+]/ { print $4 }'`"
-        [ $TOTAL_LIMIT -eq $LIMIT ] || error "  (user)total limits = $TOTAL_LIMIT; limit = $LIMIT, failed!"
-        echo "  (user)total limits = $TOTAL_LIMIT; limit = $LIMIT, successful!"
-        $LFS setquota -u $TSTUSR 0 0 0 0 $DIR || error "failed removing user quota limit"
-
-        # test for group
-        $LFS setquota -g $TSTUSR 0 $LIMIT 0 0 $DIR || error "failed setting group quota limit $LIMIT"
-        TOTAL_LIMIT="`$LFS quota -g $TSTUSR $DIR | awk '/^.*'$PATTERN'.*[[:digit:]+][[:space:]+]/ { print $4 }'`"
-        [ $TOTAL_LIMIT -eq $LIMIT ] || error "  (group)total limits = $TOTAL_LIMIT; limit = $LIMIT, failed!"
-        echo "  (group)total limits = $TOTAL_LIMIT; limit = $LIMIT, successful!"
-        $LFS setquota -g $TSTUSR 0 0 0 0 $DIR || error "failed removing group quota limit"
-        $LFS quotaoff -ug $DIR
-        quota_set_version 1
-        $LFS quotacheck -ug $DIR || error "quotacheck failed"
-
-        echo "Testing that >4GB quota limits fail on volume with quota v1"
-        ! $LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-}
-run_test 15 "set block quota more than 4T ==="
-
-# $1=u/g $2=with qunit adjust or not
-test_16_tub() {
-	LIMIT=$(( $BUNIT_SZ * $(($OSTCOUNT + 1)) * 4))
-	TESTFILE="$DIR/$tdir/$tfile"
-
-	wait_delete_completed
-
-	echo "  User quota (limit: $LIMIT kbytes)"
-	if [ $1 == "u" ]; then
-	    $LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $DIR
-	    $SHOW_QUOTA_USER
-	else
-	    $LFS setquota -g $TSTUSR 0 $LIMIT 0 0 $DIR
-	    $SHOW_QUOTA_GROUP
-	fi
-
-	$LFS setstripe $TESTFILE -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-	echo "    Write ..."
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$((BUNIT_SZ * 4)) || \
-	    error "(usr) write failure, but expect success"
-	echo "    Done"
-	echo "    Write out of block quota ..."
-	# this time maybe cache write,  ignore it's failure
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) || true
-	# flush cache, ensure noquota flag is setted on client
-	sync; sleep 1; sync;
-	if [ $2 -eq 1 ]; then
-	    $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) || \
-		error "(write failure, but expect success"
-	else
-	    $RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$BUNIT_SZ seek=$((BUNIT_SZ * 4)) && \
-		error "(write success, but expect EDQUOT"
-	fi
-
-	rm -f $TESTFILE
-	sync; sleep 3; sync;
-	$LFS setquota -$1 $TSTUSR 0 0 0 0 $DIR
-}
-
-# test without adjusting qunit
-test_16 () {
-	set_blk_tunesz $((BUNIT_SZ * 2))
-	set_blk_unitsz $((BUNIT_SZ * 4))
-	for i in u g; do
-	    for j in 0 1; do
-                # define OBD_FAIL_QUOTA_WITHOUT_CHANGE_QS    0xA01
-		echo " grp/usr: $i, adjust qunit: $j"
-		echo "-------------------------------"
-		[ $j -eq 1 ] && lustre_fail mds_ost 0
-		[ $j -eq 0 ] && lustre_fail mds_ost 0xA01
-		test_16_tub $i $j
-	    done
-	done
-	set_blk_unitsz $((128 * 1024))
-	set_blk_tunesz $((128 * 1024 / 2))
-}
-run_test 16 "test without adjusting qunit"
-
-# run for fixing bug14526, failed returned quota reqs shouldn't ruin lustre.
-test_17() {
-	set_blk_tunesz 512
-	set_blk_unitsz 1024
-
-	wait_delete_completed
-
-        #define OBD_FAIL_QUOTA_RET_QDATA | OBD_FAIL_ONCE
-	lustre_fail ost 0x80000A02
-
-	TESTFILE="$DIR/$tdir/$tfile-a"
-	TESTFILE2="$DIR/$tdir/$tfile-b"
-
-	BLK_LIMIT=$((100 * 1024)) # 100M
-
-	log "  Set enough high limit(block:$BLK_LIMIT) for user: $TSTUSR"
-	$LFS setquota -u $TSTUSR 0 $BLK_LIMIT 0 0 $DIR
-	log "  Set enough high limit(block:$BLK_LIMIT) for group: $TSTUSR"
-	$LFS setquota -g $TSTUSR 0 $BLK_LIMIT 0 0 $DIR
-
-	touch $TESTFILE
-	chown $TSTUSR.$TSTUSR $TESTFILE
-	touch $TESTFILE2
-	chown $TSTUSR.$TSTUSR $TESTFILE2
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-	log "    Write the test file1 ..."
-	$RUNAS dd if=/dev/zero of=$TESTFILE  bs=$BLK_SZ count=$(( 10 * 1024 )) \
-	    || echo "write 10M file failure"
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-	log "    write the test file2 ..."
-	$RUNAS dd if=/dev/zero of=$TESTFILE2  bs=$BLK_SZ count=$(( 10 * 1024 )) \
-	    || error "write 10M file failure"
-
-        $SHOW_QUOTA_USER
-        $SHOW_QUOTA_GROUP
-
-	rm -f $TESTFILE $TESTFILE2
-	RC=$?
-	sync; sleep 3; sync;
-
-	# make qd_count 64 bit
-	lustre_fail ost 0
-
-	set_blk_unitsz $((128 * 1024))
-	set_blk_tunesz $((128 * 1024 / 2))
-
-	return $RC
-}
-run_test 17 "run for fixing bug14526 ==========="
-
-# test when mds takes a long time to handle a quota req so that
-# the ost has dropped it, the ost still could work well b=14840
-test_18() {
-	LIMIT=$((100 * 1024 * 1024)) # 100G
-	TESTFILE="$DIR/$tdir/$tfile"
-
-	wait_delete_completed
-
-	set_blk_tunesz 512
-	set_blk_unitsz 1024
-
-	log "   User quota (limit: $LIMIT kbytes)"
-	$LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $MOUNT
-	$SHOW_QUOTA_USER
-
-	$LFS setstripe $TESTFILE -i 0 -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-	#define OBD_FAIL_MDS_BLOCK_QUOTA_REQ      0x13c
-	lustre_fail mds 0x13c
-
-	log "   step1: write 100M block ..."
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$((1024 * 100)) &
-	DDPID=$!
-
-        sleep 5
-        lustre_fail mds 0
-
-	echo  "   step2: testing ......"
-	count=0
-	timeout=$(sysctl -n lustre.timeout)
-	while [ true ]; do
-	    if [ -z `ps -ef | awk '$2 == '${DDPID}' { print $8 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt $((2 * $timeout)) ]; then
-		error "count=$count dd should be finished!"
-	    fi
-	    sleep 1
-	done
-        log "(dd_pid=$DDPID, time=$count, timeout=$timeout)"
-        if [ $count -lt $(($timeout - 10)) ]; then
-            error " should take longer!"
-        else
-            echo " successful"
-        fi
-
-	rm -f $TESTFILE
-	sync; sleep 3; sync;
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $MOUNT		# clear user limit
-
-	set_blk_unitsz $((128 * 1024))
-	set_blk_tunesz $((128 * 1024 / 2))
-}
-run_test 18 "run for fixing bug14840 ==========="
-
-# test when mds drops a quota req, the ost still could work well b=14840
-test_18a() {
-        LIMIT=$((100 * 1024 * 1024)) # 100G
-	TESTFILE="$DIR/$tdir/$tfile-a"
-
-	wait_delete_completed
-
-	set_blk_tunesz 512
-	set_blk_unitsz 1024
-
-	log "   User quota (limit: $LIMIT kbytes)"
-	$LFS setquota -u $TSTUSR 0 $LIMIT 0 0 $MOUNT
-	$SHOW_QUOTA_USER
-
-	$LFS setstripe $TESTFILE -i 0 -c 1
-	chown $TSTUSR.$TSTUSR $TESTFILE
-
-	#define OBD_FAIL_MDS_DROP_QUOTA_REQ | OBD_FAIL_ONCE   0x8000013d
-	lustre_fail mds 0x8000013d
-
-	log "   step1: write 100M block ..."
-	$RUNAS dd if=/dev/zero of=$TESTFILE bs=$BLK_SZ count=$((1024 * 100)) &
-	DDPID=$!
-
-	echo  "   step2: testing ......"
-	count=0
-	timeout=$(sysctl -n lustre.timeout)
-	while [ true ]; do
-	    if [ -z `ps -ef | awk '$2 == '${DDPID}' { print $8 }'` ]; then break; fi
-	    count=$[count+1]
-	    if [ $count -gt $((3 * $timeout)) ]; then
-		lustre_fail mds 0
-		error "count=$count dd should be finished!"
-	    fi
-	    sleep 1
-	done
-        log "(dd_pid=$DDPID, time=$count, timeout=$timeout)"
-        if [ $count -lt $(($timeout - 10)) ]; then
-	    lustre_fail mds 0
-            error " should take longer!"
-        else
-            echo " successful"
-        fi
-
-        lustre_fail mds 0
-
-	rm -f $TESTFILE
-	sync; sleep 3; sync;
-
-	$LFS setquota -u $TSTUSR 0 0 0 0 $MOUNT		# clear user limit
-
-	set_blk_unitsz $((128 * 1024))
-	set_blk_tunesz $((128 * 1024 / 2))
-}
-run_test 18a "run for fixing bug14840 ==========="
-
-# turn off quota
-test_99()
-{
-	$LFS quotaoff $DIR
-	sysctl -w lnet.debug="-quota"
-
-	return 0
-}
-run_test 99 "Quota off ==============================="
-
-
-log "cleanup: ======================================================"
-cd $ORIG_PWD
-check_and_cleanup_lustre
-echo '=========================== finished ==============================='
-[ -f "$QUOTALOG" ] && cat $QUOTALOG && grep -q FAIL $QUOTALOG && exit 1 || true
-echo "$0: completed"
diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh
deleted file mode 100644
index 0d3786136cf1826f2824c9e4ed181065fb63c79d..0000000000000000000000000000000000000000
--- a/lustre/tests/sanity.sh
+++ /dev/null
@@ -1,4890 +0,0 @@
-#!/bin/bash
-#
-# Run select tests by setting ONLY, or as arguments to the script.
-# Skip specific tests by setting EXCEPT.
-#
-# e.g. ONLY="22 23" or ONLY="`seq 32 39`" or EXCEPT="31"
-set -e
-
-ONLY=${ONLY:-"$*"}
-# bug number for skipped test:  13297 2108 9789 3637 9789 3561 12622 13310 10764
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"27u   42a  42b  42c  42d  45   51d   74b   75 $SANITY_EXCEPT" }
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-# Tests that fail on uml, maybe elsewhere, FIXME
-CPU=`awk '/model/ {print $4}' /proc/cpuinfo`
-#                                    buffer i/o errs             sock spc runas
-[ "$CPU" = "UML" ] && EXCEPT="$EXCEPT 27m 27n 27o 27p 27q 27r 31d 54a  64b 99a 99b 99c 99d 99e 99f 101"
-
-case `uname -r` in
-2.4*) FSTYPE=${FSTYPE:-ext3};    ALWAYS_EXCEPT="$ALWAYS_EXCEPT 76"
-	[ "$CPU" = "UML" ] && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 105a";;
-2.6*) FSTYPE=${FSTYPE:-ldiskfs}; ALWAYS_EXCEPT="$ALWAYS_EXCEPT " ;;
-*) error "unsupported kernel" ;;
-esac
-
-SRCDIR=`dirname $0`
-export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH:/sbin
-
-TMP=${TMP:-/tmp}
-
-CHECKSTAT=${CHECKSTAT:-"checkstat -v"}
-CREATETEST=${CREATETEST:-createtest}
-LFS=${LFS:-lfs}
-SETSTRIPE=${SETSTRIPE:-"$LFS setstripe"}
-GETSTRIPE=${GETSTRIPE:-"$LFS getstripe"}
-LSTRIPE=${LSTRIPE:-"$LFS setstripe"}
-LFIND=${LFIND:-"$LFS find"}
-LVERIFY=${LVERIFY:-ll_dirstripe_verify}
-LSTRIPEINFO=${LSTRIPEINFO:-ll_getstripe_info}
-LCTL=${LCTL:-lctl}
-MCREATE=${MCREATE:-mcreate}
-OPENFILE=${OPENFILE:-openfile}
-OPENUNLINK=${OPENUNLINK:-openunlink}
-RANDOM_READS=${RANDOM_READS:-"random-reads"}
-TOEXCL=${TOEXCL:-toexcl}
-TRUNCATE=${TRUNCATE:-truncate}
-MUNLINK=${MUNLINK:-munlink}
-SOCKETSERVER=${SOCKETSERVER:-socketserver}
-SOCKETCLIENT=${SOCKETCLIENT:-socketclient}
-IOPENTEST1=${IOPENTEST1:-iopentest1}
-IOPENTEST2=${IOPENTEST2:-iopentest2}
-MEMHOG=${MEMHOG:-memhog}
-DIRECTIO=${DIRECTIO:-directio}
-ACCEPTOR_PORT=${ACCEPTOR_PORT:-988}
-UMOUNT=${UMOUNT:-"umount -d"}
-CHECK_GRANT=${CHECK_GRANT:-"yes"}
-GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
-
-export NAME=${NAME:-local}
-
-SAVE_PWD=$PWD
-
-CLEANUP=${CLEANUP:-:}
-SETUP=${SETUP:-:}
-TRACE=${TRACE:-""}
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b"
-
-SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
-FAIL_ON_ERROR=false
-
-cleanup() {
-	echo -n "cln.."
-	pgrep ll_sa > /dev/null && { echo "There are ll_sa thread not exit!"; exit 20; }
-	cleanupall ${FORCE} $* || { echo "FAILed to clean up"; exit 20; }
-}
-setup() {
-	echo -n "mnt.."
-        load_modules
-	setupall || exit 10
-	echo "done"
-}
-
-
-check_kernel_version() {
-	VERSION_FILE=version
-	WANT_VER=$1
-	GOT_VER=$(lctl get_param -n $VERSION_FILE | awk '/kernel:/ {print $2}')
-	[ $GOT_VER == "patchless" ] && return 0
-	[ $GOT_VER -ge $WANT_VER ] && return 0
-	log "test needs at least kernel version $WANT_VER, running $GOT_VER"
-	return 1
-}
-
-if [ "$ONLY" == "cleanup" ]; then
- 	sh llmountcleanup.sh
- 	exit 0
-fi
-
-[ "$SANITYLOG" ] && rm -f $SANITYLOG || true
-
-check_and_setup_lustre
-
-DIR=${DIR:-$MOUNT}
-[ -z "`echo $DIR | grep $MOUNT`" ] && echo "$DIR not in $MOUNT" && exit 99
-
-LOVNAME=`lctl get_param -n llite.*.lov.common_name | tail -n 1`
-OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd`
-STRIPECOUNT=`lctl get_param -n lov.$LOVNAME.stripecount`
-STRIPESIZE=`lctl get_param -n lov.$LOVNAME.stripesize`
-ORIGFREE=`lctl get_param -n lov.$LOVNAME.kbytesavail`
-MAXFREE=${MAXFREE:-$((200000 * $OSTCOUNT))}
-
-[ -f $DIR/d52a/foo ] && chattr -a $DIR/d52a/foo
-[ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo
-rm -rf $DIR/[Rdfs][0-9]*
-
-# $RUNAS_ID may get set incorrectly somewhere else
-[ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
-
-check_runas_id $RUNAS_ID $RUNAS
-
-build_test_filter
-
-echo "preparing for tests involving mounts"
-EXT2_DEV=${EXT2_DEV:-$TMP/SANITY.LOOP}
-touch $EXT2_DEV
-mke2fs -j -F $EXT2_DEV 8000 > /dev/null
-echo # add a newline after mke2fs.
-
-umask 077
-
-OLDDEBUG="`sysctl -n lnet.debug 2> /dev/null`"
-sysctl -w lnet.debug=-1 2> /dev/null || true
-test_0() {
-	touch $DIR/$tfile
-	$CHECKSTAT -t file $DIR/$tfile || error
-	rm $DIR/$tfile
-	$CHECKSTAT -a $DIR/$tfile || error
-}
-run_test 0 "touch .../$tfile ; rm .../$tfile ====================="
-
-test_0b() {
-	chmod 0755 $DIR || error
-	$CHECKSTAT -p 0755 $DIR || error
-}
-run_test 0b "chmod 0755 $DIR ============================="
-
-test_1a() {
-	mkdir $DIR/d1
-	mkdir $DIR/d1/d2
-	$CHECKSTAT -t dir $DIR/d1/d2 || error
-}
-run_test 1a "mkdir .../d1; mkdir .../d1/d2 ====================="
-
-test_1b() {
-	rmdir $DIR/d1/d2
-	rmdir $DIR/d1
-	$CHECKSTAT -a $DIR/d1 || error
-}
-run_test 1b "rmdir .../d1/d2; rmdir .../d1 ====================="
-
-test_2a() {
-	mkdir $DIR/d2
-	touch $DIR/d2/f
-	$CHECKSTAT -t file $DIR/d2/f || error
-}
-run_test 2a "mkdir .../d2; touch .../d2/f ======================"
-
-test_2b() {
-	rm -r $DIR/d2
-	$CHECKSTAT -a $DIR/d2 || error
-}
-run_test 2b "rm -r .../d2; checkstat .../d2/f ======================"
-
-test_3a() {
-	mkdir $DIR/d3
-	$CHECKSTAT -t dir $DIR/d3 || error
-}
-run_test 3a "mkdir .../d3 ======================================"
-
-test_3b() {
-	if [ ! -d $DIR/d3 ]; then
-		mkdir $DIR/d3
-	fi
-	touch $DIR/d3/f
-	$CHECKSTAT -t file $DIR/d3/f || error
-}
-run_test 3b "touch .../d3/f ===================================="
-
-test_3c() {
-	rm -r $DIR/d3
-	$CHECKSTAT -a $DIR/d3 || error
-}
-run_test 3c "rm -r .../d3 ======================================"
-
-test_4a() {
-	mkdir $DIR/d4
-	$CHECKSTAT -t dir $DIR/d4 || error
-}
-run_test 4a "mkdir .../d4 ======================================"
-
-test_4b() {
-	if [ ! -d $DIR/d4 ]; then
-		mkdir $DIR/d4
-	fi
-	mkdir $DIR/d4/d2
-	$CHECKSTAT -t dir $DIR/d4/d2 || error
-}
-run_test 4b "mkdir .../d4/d2 ==================================="
-
-test_5() {
-	mkdir $DIR/d5
-	mkdir $DIR/d5/d2
-	chmod 0707 $DIR/d5/d2
-	$CHECKSTAT -t dir -p 0707 $DIR/d5/d2 || error
-}
-run_test 5 "mkdir .../d5 .../d5/d2; chmod .../d5/d2 ============"
-
-test_6a() {
-	touch $DIR/f6a
-	chmod 0666 $DIR/f6a || error
-	$CHECKSTAT -t file -p 0666 -u \#$UID $DIR/f6a || error
-}
-run_test 6a "touch .../f6a; chmod .../f6a ======================"
-
-test_6b() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	if [ ! -f $DIR/f6a ]; then
-		touch $DIR/f6a
-		chmod 0666 $DIR/f6a
-	fi
-	$RUNAS chmod 0444 $DIR/f6a && error
-	$CHECKSTAT -t file -p 0666 -u \#$UID $DIR/f6a || error
-}
-run_test 6b "$RUNAS chmod .../f6a (should return error) =="
-
-test_6c() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	touch $DIR/f6c
-	chown $RUNAS_ID $DIR/f6c || error
-	$CHECKSTAT -t file -u \#$RUNAS_ID $DIR/f6c || error
-}
-run_test 6c "touch .../f6c; chown .../f6c ======================"
-
-test_6d() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	if [ ! -f $DIR/f6c ]; then
-		touch $DIR/f6c
-		chown $RUNAS_ID $DIR/f6c
-	fi
-	$RUNAS chown $UID $DIR/f6c && error
-	$CHECKSTAT -t file -u \#$RUNAS_ID $DIR/f6c || error
-}
-run_test 6d "$RUNAS chown .../f6c (should return error) =="
-
-test_6e() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	touch $DIR/f6e
-	chgrp $RUNAS_ID $DIR/f6e || error
-	$CHECKSTAT -t file -u \#$UID -g \#$RUNAS_ID $DIR/f6e || error
-}
-run_test 6e "touch .../f6e; chgrp .../f6e ======================"
-
-test_6f() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	if [ ! -f $DIR/f6e ]; then
-		touch $DIR/f6e
-		chgrp $RUNAS_ID $DIR/f6e
-	fi
-	$RUNAS chgrp $UID $DIR/f6e && error
-	$CHECKSTAT -t file -u \#$UID -g \#$RUNAS_ID $DIR/f6e || error
-}
-run_test 6f "$RUNAS chgrp .../f6e (should return error) =="
-
-test_6g() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-        mkdir $DIR/d6g || error
-        chmod 777 $DIR/d6g || error
-        $RUNAS mkdir $DIR/d6g/d || error
-        chmod g+s $DIR/d6g/d || error
-        mkdir $DIR/d6g/d/subdir
-	$CHECKSTAT -g \#$RUNAS_ID $DIR/d6g/d/subdir || error
-}
-run_test 6g "Is new dir in sgid dir inheriting group?"
-
-test_6h() { # bug 7331
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	touch $DIR/f6h || error "touch failed"
-	chown $RUNAS_ID:$RUNAS_ID $DIR/f6h || error "initial chown failed"
-	$RUNAS -G$RUNAS_ID chown $RUNAS_ID:0 $DIR/f6h && error "chown worked"
-	$CHECKSTAT -t file -u \#$RUNAS_ID -g \#$RUNAS_ID $DIR/f6h || error
-}
-run_test 6h "$RUNAS chown RUNAS_ID.0 .../f6h (should return error)"
-
-test_7a() {
-	mkdir $DIR/d7
-	$MCREATE $DIR/d7/f
-	chmod 0666 $DIR/d7/f
-	$CHECKSTAT -t file -p 0666 $DIR/d7/f || error
-}
-run_test 7a "mkdir .../d7; mcreate .../d7/f; chmod .../d7/f ===="
-
-test_7b() {
-	if [ ! -d $DIR/d7 ]; then
-		mkdir $DIR/d7
-	fi
-	$MCREATE $DIR/d7/f2
-	echo -n foo > $DIR/d7/f2
-	[ "`cat $DIR/d7/f2`" = "foo" ] || error
-	$CHECKSTAT -t file -s 3 $DIR/d7/f2 || error
-}
-run_test 7b "mkdir .../d7; mcreate d7/f2; echo foo > d7/f2 ====="
-
-test_8() {
-	mkdir $DIR/d8
-	touch $DIR/d8/f
-	chmod 0666 $DIR/d8/f
-	$CHECKSTAT -t file -p 0666 $DIR/d8/f || error
-}
-run_test 8 "mkdir .../d8; touch .../d8/f; chmod .../d8/f ======="
-
-test_9() {
-	mkdir $DIR/d9
-	mkdir $DIR/d9/d2
-	mkdir $DIR/d9/d2/d3
-	$CHECKSTAT -t dir $DIR/d9/d2/d3 || error
-}
-run_test 9 "mkdir .../d9 .../d9/d2 .../d9/d2/d3 ================"
-
-test_10() {
-	mkdir $DIR/d10
-	mkdir $DIR/d10/d2
-	touch $DIR/d10/d2/f
-	$CHECKSTAT -t file $DIR/d10/d2/f || error
-}
-run_test 10 "mkdir .../d10 .../d10/d2; touch .../d10/d2/f ======"
-
-test_11() {
-	mkdir $DIR/d11
-	mkdir $DIR/d11/d2
-	chmod 0666 $DIR/d11/d2
-	chmod 0705 $DIR/d11/d2
-	$CHECKSTAT -t dir -p 0705 $DIR/d11/d2 || error
-}
-run_test 11 "mkdir .../d11 d11/d2; chmod .../d11/d2 ============"
-
-test_12() {
-	mkdir $DIR/d12
-	touch $DIR/d12/f
-	chmod 0666 $DIR/d12/f
-	chmod 0654 $DIR/d12/f
-	$CHECKSTAT -t file -p 0654 $DIR/d12/f || error
-}
-run_test 12 "touch .../d12/f; chmod .../d12/f .../d12/f ========"
-
-test_13() {
-	mkdir $DIR/d13
-	dd if=/dev/zero of=$DIR/d13/f count=10
-	>  $DIR/d13/f
-	$CHECKSTAT -t file -s 0 $DIR/d13/f || error
-}
-run_test 13 "creat .../d13/f; dd .../d13/f; > .../d13/f ========"
-
-test_14() {
-	mkdir $DIR/d14
-	touch $DIR/d14/f
-	rm $DIR/d14/f
-	$CHECKSTAT -a $DIR/d14/f || error
-}
-run_test 14 "touch .../d14/f; rm .../d14/f; rm .../d14/f ======="
-
-test_15() {
-	mkdir $DIR/d15
-	touch $DIR/d15/f
-	mv $DIR/d15/f $DIR/d15/f2
-	$CHECKSTAT -t file $DIR/d15/f2 || error
-}
-run_test 15 "touch .../d15/f; mv .../d15/f .../d15/f2 =========="
-
-test_16() {
-	mkdir $DIR/d16
-	touch $DIR/d16/f
-	rm -rf $DIR/d16/f
-	$CHECKSTAT -a $DIR/d16/f || error
-}
-run_test 16 "touch .../d16/f; rm -rf .../d16/f ================="
-
-test_17a() {
-	mkdir -p $DIR/d17
-	touch $DIR/d17/f
-	ln -s $DIR/d17/f $DIR/d17/l-exist
-	ls -l $DIR/d17
-	$CHECKSTAT -l $DIR/d17/f $DIR/d17/l-exist || error
-	$CHECKSTAT -f -t f $DIR/d17/l-exist || error
-	rm -f $DIR/d17/l-exist
-	$CHECKSTAT -a $DIR/d17/l-exist || error
-}
-run_test 17a "symlinks: create, remove (real) =================="
-
-test_17b() {
-	mkdir -p $DIR/d17
-	ln -s no-such-file $DIR/d17/l-dangle
-	ls -l $DIR/d17
-	$CHECKSTAT -l no-such-file $DIR/d17/l-dangle || error
-	$CHECKSTAT -fa $DIR/d17/l-dangle || error
-	rm -f $DIR/d17/l-dangle
-	$CHECKSTAT -a $DIR/d17/l-dangle || error
-}
-run_test 17b "symlinks: create, remove (dangling) =============="
-
-test_17c() { # bug 3440 - don't save failed open RPC for replay
-	mkdir -p $DIR/d17
-	ln -s foo $DIR/d17/f17c
-	cat $DIR/d17/f17c && error "opened non-existent symlink" || true
-}
-run_test 17c "symlinks: open dangling (should return error) ===="
-
-test_17d() {
-	mkdir -p $DIR/d17
-	ln -s foo $DIR/d17/f17d
-	touch $DIR/d17/f17d || error "creating to new symlink"
-}
-run_test 17d "symlinks: create dangling ========================"
-
-test_17e() {
-	mkdir -p $DIR/$tdir
-	local foo=$DIR/$tdir/$tfile
-	ln -s $foo $foo || error "create symlink failed"
-	ls -l $foo || error "ls -l failed"
-	ls $foo && error "ls not failed" || true
-}
-run_test 17e "symlinks: create recursive symlink (should return error) ===="
-
-test_18() {
-	touch $DIR/f
-	ls $DIR || error
-}
-run_test 18 "touch .../f ; ls ... =============================="
-
-test_19a() {
-	touch $DIR/f19
-	ls -l $DIR
-	rm $DIR/f19
-	$CHECKSTAT -a $DIR/f19 || error
-}
-run_test 19a "touch .../f19 ; ls -l ... ; rm .../f19 ==========="
-
-test_19b() {
-	ls -l $DIR/f19 && error || true
-}
-run_test 19b "ls -l .../f19 (should return error) =============="
-
-test_19c() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	$RUNAS touch $DIR/f19 && error || true
-}
-run_test 19c "$RUNAS touch .../f19 (should return error) =="
-
-test_19d() {
-	cat $DIR/f19 && error || true
-}
-run_test 19d "cat .../f19 (should return error) =============="
-
-test_20() {
-	touch $DIR/f
-	rm $DIR/f
-	log "1 done"
-	touch $DIR/f
-	rm $DIR/f
-	log "2 done"
-	touch $DIR/f
-	rm $DIR/f
-	log "3 done"
-	$CHECKSTAT -a $DIR/f || error
-}
-run_test 20 "touch .../f ; ls -l ... ==========================="
-
-test_21() {
-	mkdir $DIR/d21
-	[ -f $DIR/d21/dangle ] && rm -f $DIR/d21/dangle
-	ln -s dangle $DIR/d21/link
-	echo foo >> $DIR/d21/link
-	cat $DIR/d21/dangle
-	$CHECKSTAT -t link $DIR/d21/link || error
-	$CHECKSTAT -f -t file $DIR/d21/link || error
-}
-run_test 21 "write to dangling link ============================"
-
-test_22() {
-	WDIR=$DIR/$tdir
-	chown $RUNAS_ID $WDIR
-	(cd $WDIR || error "cd $WDIR failed";
-	$RUNAS tar cf - /etc/hosts /etc/sysconfig/network | \
-	$RUNAS tar xf -)
-	ls -lR $WDIR/etc || error "ls -lR $WDIR/etc failed"
-	$CHECKSTAT -t dir $WDIR/etc || error "checkstat -t dir failed"
-	$CHECKSTAT -u \#$RUNAS_ID $WDIR/etc || error "checkstat -u failed"
-}
-run_test 22 "unpack tar archive as non-root user ==============="
-
-test_23() {
-	mkdir $DIR/d23
-	$TOEXCL $DIR/d23/f23
-	$TOEXCL -e $DIR/d23/f23 || error
-}
-run_test 23 "O_CREAT|O_EXCL in subdir =========================="
-
-test_24a() {
-	echo '== rename sanity =============================================='
-	echo '-- same directory rename'
-	mkdir $DIR/R1
-	touch $DIR/R1/f
-	mv $DIR/R1/f $DIR/R1/g
-	$CHECKSTAT -t file $DIR/R1/g || error
-}
-run_test 24a "touch .../R1/f; rename .../R1/f .../R1/g ========="
-
-test_24b() {
-	mkdir $DIR/R2
-	touch $DIR/R2/{f,g}
-	mv $DIR/R2/f $DIR/R2/g
-	$CHECKSTAT -a $DIR/R2/f || error
-	$CHECKSTAT -t file $DIR/R2/g || error
-}
-run_test 24b "touch .../R2/{f,g}; rename .../R2/f .../R2/g ====="
-
-test_24c() {
-	mkdir $DIR/R3
-	mkdir $DIR/R3/f
-	mv $DIR/R3/f $DIR/R3/g
-	$CHECKSTAT -a $DIR/R3/f || error
-	$CHECKSTAT -t dir $DIR/R3/g || error
-}
-run_test 24c "mkdir .../R3/f; rename .../R3/f .../R3/g ========="
-
-test_24d() {
-	mkdir $DIR/R4
-	mkdir $DIR/R4/{f,g}
-	mrename $DIR/R4/f $DIR/R4/g
-	$CHECKSTAT -a $DIR/R4/f || error
-	$CHECKSTAT -t dir $DIR/R4/g || error
-}
-run_test 24d "mkdir .../R4/{f,g}; rename .../R4/f .../R4/g ====="
-
-test_24e() {
-	echo '-- cross directory renames --' 
-	mkdir $DIR/R5{a,b}
-	touch $DIR/R5a/f
-	mv $DIR/R5a/f $DIR/R5b/g
-	$CHECKSTAT -a $DIR/R5a/f || error
-	$CHECKSTAT -t file $DIR/R5b/g || error
-}
-run_test 24e "touch .../R5a/f; rename .../R5a/f .../R5b/g ======"
-
-test_24f() {
-	mkdir $DIR/R6{a,b}
-	touch $DIR/R6a/f $DIR/R6b/g
-	mv $DIR/R6a/f $DIR/R6b/g
-	$CHECKSTAT -a $DIR/R6a/f || error
-	$CHECKSTAT -t file $DIR/R6b/g || error
-}
-run_test 24f "touch .../R6a/f R6b/g; mv .../R6a/f .../R6b/g ===="
-
-test_24g() {
-	mkdir $DIR/R7{a,b}
-	mkdir $DIR/R7a/d
-	mv $DIR/R7a/d $DIR/R7b/e
-	$CHECKSTAT -a $DIR/R7a/d || error
-	$CHECKSTAT -t dir $DIR/R7b/e || error
-}
-run_test 24g "mkdir .../R7{a,b}/d; mv .../R7a/d .../R5b/e ======"
-
-test_24h() {
-	mkdir $DIR/R8{a,b}
-	mkdir $DIR/R8a/d $DIR/R8b/e
-	mrename $DIR/R8a/d $DIR/R8b/e
-	$CHECKSTAT -a $DIR/R8a/d || error
-	$CHECKSTAT -t dir $DIR/R8b/e || error
-}
-run_test 24h "mkdir .../R8{a,b}/{d,e}; rename .../R8a/d .../R8b/e"
-
-test_24i() {
-	echo "-- rename error cases"
-	mkdir $DIR/R9
-	mkdir $DIR/R9/a
-	touch $DIR/R9/f
-	mrename $DIR/R9/f $DIR/R9/a
-	$CHECKSTAT -t file $DIR/R9/f || error
-	$CHECKSTAT -t dir  $DIR/R9/a || error
-	$CHECKSTAT -a file $DIR/R9/a/f || error
-}
-run_test 24i "rename file to dir error: touch f ; mkdir a ; rename f a"
-
-test_24j() {
-	mkdir $DIR/R10
-	mrename $DIR/R10/f $DIR/R10/g
-	$CHECKSTAT -t dir $DIR/R10 || error
-	$CHECKSTAT -a $DIR/R10/f || error
-	$CHECKSTAT -a $DIR/R10/g || error
-}
-run_test 24j "source does not exist ============================" 
-
-test_24k() {
-	mkdir $DIR/R11a $DIR/R11a/d
-	touch $DIR/R11a/f
-	mv $DIR/R11a/f $DIR/R11a/d
-	$CHECKSTAT -a $DIR/R11a/f || error
-	$CHECKSTAT -t file $DIR/R11a/d/f || error
-}
-run_test 24k "touch .../R11a/f; mv .../R11a/f .../R11a/d ======="
-
-# bug 2429 - rename foo foo foo creates invalid file
-test_24l() {
-	f="$DIR/f24l"
-	multiop $f OcNs || error
-}
-run_test 24l "Renaming a file to itself ========================"
-
-test_24m() {
-	f="$DIR/f24m"
-	multiop $f OcLN ${f}2 ${f}2 || error "link ${f}2 ${f}2 failed"
-	# on ext3 this does not remove either the source or target files
-	# though the "expected" operation would be to remove the source
-	$CHECKSTAT -t file ${f} || error "${f} missing"
-	$CHECKSTAT -t file ${f}2 || error "${f}2 missing"
-}
-run_test 24m "Renaming a file to a hard link to itself ========="
-
-test_24n() {
-    f="$DIR/f24n"
-    # this stats the old file after it was renamed, so it should fail
-    touch ${f}
-    $CHECKSTAT ${f}
-    mv ${f} ${f}.rename
-    $CHECKSTAT ${f}.rename
-    $CHECKSTAT -a ${f}
-}
-run_test 24n "Statting the old file after renaming (Posix rename 2)"
-
-test_24o() {
-	check_kernel_version 37 || return 0
-	mkdir -p $DIR/d24o
-	rename_many -s random -v -n 10 $DIR/d24o
-}
-run_test 24o "rename of files during htree split ==============="
-
-test_24p() {
-	mkdir $DIR/R12{a,b}
-	DIRINO=`ls -lid $DIR/R12a | awk '{ print $1 }'`
-	mrename $DIR/R12a $DIR/R12b
-	$CHECKSTAT -a $DIR/R12a || error
-	$CHECKSTAT -t dir $DIR/R12b || error
-	DIRINO2=`ls -lid $DIR/R12b | awk '{ print $1 }'`
-	[ "$DIRINO" = "$DIRINO2" ] || error "R12a $DIRINO != R12b $DIRINO2"
-}
-run_test 24p "mkdir .../R12{a,b}; rename .../R12a .../R12b"
-
-test_24q() {
-	mkdir $DIR/R13{a,b}
-	DIRINO=`ls -lid $DIR/R13a | awk '{ print $1 }'`
-	multiop_bg_pause $DIR/R13b D_c || return 1
-	MULTIPID=$!
-
-	mrename $DIR/R13a $DIR/R13b
-	$CHECKSTAT -a $DIR/R13a || error
-	$CHECKSTAT -t dir $DIR/R13b || error
-	DIRINO2=`ls -lid $DIR/R13b | awk '{ print $1 }'`
-	[ "$DIRINO" = "$DIRINO2" ] || error "R13a $DIRINO != R13b $DIRINO2"
-	kill -USR1 $MULTIPID
-	wait $MULTIPID || error "multiop close failed"
-}
-run_test 24q "mkdir .../R13{a,b}; open R13b rename R13a R13b ==="
-
-test_24r() { #bug 3789
-	mkdir $DIR/R14a $DIR/R14a/b
-	mrename $DIR/R14a $DIR/R14a/b && error "rename to subdir worked!"
-	$CHECKSTAT -t dir $DIR/R14a || error "$DIR/R14a missing"
-	$CHECKSTAT -t dir $DIR/R14a/b || error "$DIR/R14a/b missing"
-}
-run_test 24r "mkdir .../R14a/b; rename .../R14a .../R14a/b ====="
-
-test_24s() {
-	mkdir $DIR/R15a $DIR/R15a/b $DIR/R15a/b/c
-	mrename $DIR/R15a $DIR/R15a/b/c && error "rename to sub-subdir worked!"
-	$CHECKSTAT -t dir $DIR/R15a || error "$DIR/R15a missing"
-	$CHECKSTAT -t dir $DIR/R15a/b/c || error "$DIR/R15a/b/c missing"
-}
-run_test 24s "mkdir .../R15a/b/c; rename .../R15a .../R15a/b/c ="
-test_24t() {
-	mkdir $DIR/R16a $DIR/R16a/b $DIR/R16a/b/c
-	mrename $DIR/R16a/b/c $DIR/R16a && error "rename to sub-subdir worked!"
-	$CHECKSTAT -t dir $DIR/R16a || error "$DIR/R16a missing"
-	$CHECKSTAT -t dir $DIR/R16a/b/c || error "$DIR/R16a/b/c missing"
-}
-run_test 24t "mkdir .../R16a/b/c; rename .../R16a/b/c .../R16a ="
-
-test_24u() { # bug12192
-        multiop $DIR/$tfile C2w$((2048 * 1024))c || error
-        $CHECKSTAT -s $((2048 * 1024)) $DIR/$tfile || error "wrong file size"
-}
-run_test 24u "create stripe file"
-
-test_25a() {
-	echo '== symlink sanity ============================================='
-
-	mkdir $DIR/d25
-	ln -s d25 $DIR/s25
-	touch $DIR/s25/foo || error
-}
-run_test 25a "create file in symlinked directory ==============="
-
-test_25b() {
-	[ ! -d $DIR/d25 ] && test_25a
-	$CHECKSTAT -t file $DIR/s25/foo || error
-}
-run_test 25b "lookup file in symlinked directory ==============="
-
-test_26a() {
-	mkdir $DIR/d26
-	mkdir $DIR/d26/d26-2
-	ln -s d26/d26-2 $DIR/s26
-	touch $DIR/s26/foo || error
-}
-run_test 26a "multiple component symlink ======================="
-
-test_26b() {
-	mkdir -p $DIR/d26b/d26-2
-	ln -s d26b/d26-2/foo $DIR/s26-2
-	touch $DIR/s26-2 || error
-}
-run_test 26b "multiple component symlink at end of lookup ======"
-
-test_26c() {
-	mkdir $DIR/d26.2
-	touch $DIR/d26.2/foo
-	ln -s d26.2 $DIR/s26.2-1
-	ln -s s26.2-1 $DIR/s26.2-2
-	ln -s s26.2-2 $DIR/s26.2-3
-	chmod 0666 $DIR/s26.2-3/foo
-}
-run_test 26c "chain of symlinks ================================"
-
-# recursive symlinks (bug 439)
-test_26d() {
-	ln -s d26-3/foo $DIR/d26-3
-}
-run_test 26d "create multiple component recursive symlink ======"
-
-test_26e() {
-	[ ! -h $DIR/d26-3 ] && test_26d
-	rm $DIR/d26-3
-}
-run_test 26e "unlink multiple component recursive symlink ======"
-
-# recursive symlinks (bug 7022)
-test_26f() {
-	mkdir $DIR/$tdir/$tfile        || error "mkdir $DIR/$tdir/$tfile failed"
-	cd $DIR/$tdir/$tfile           || error "cd $DIR/$tdir/$tfile failed"
-	mkdir -p lndir/bar1      || error "mkdir lndir/bar1 failed"
-	mkdir $tfile             || error "mkdir $tfile failed"
-	cd $tfile                || error "cd $tfile failed"
-	ln -s .. dotdot          || error "ln dotdot failed"
-	ln -s dotdot/lndir lndir || error "ln lndir failed"
-	cd $DIR/$tdir                 || error "cd $DIR/$tdir failed"
-	output=`ls $tfile/$tfile/lndir/bar1`
-	[ "$output" = bar1 ] && error "unexpected output"
-	rm -r $tfile             || error "rm $tfile failed"
-	$CHECKSTAT -a $DIR/$tfile || error "$tfile not gone"
-}
-run_test 26f "rm -r of a directory which has recursive symlink ="
-
-test_27a() {
-	echo '== stripe sanity =============================================='
-	mkdir -p $DIR/d27 || error "mkdir failed"
-	$SETSTRIPE $DIR/d27/f0 -c 1 || error "lstripe failed"
-	$CHECKSTAT -t file $DIR/d27/f0 || error "checkstat failed"
-	pass
-	log "== test 27b: write to one stripe file ========================="
-	cp /etc/hosts $DIR/d27/f0 || error
-}
-run_test 27a "one stripe file =================================="
-
-test_27c() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "skipping 2-stripe test" && return
-	mkdir -p $DIR/d27
-	$SETSTRIPE $DIR/d27/f01 -c 2 || error "lstripe failed"
-	[ `$GETSTRIPE $DIR/d27/f01 | grep -A 10 obdidx | wc -l` -eq 4 ] ||
-		error "two-stripe file doesn't have two stripes"
-	pass
-	log "== test 27d: write to two stripe file file f01 ================"
-	dd if=/dev/zero of=$DIR/d27/f01 bs=4k count=4 || error "dd failed"
-}
-run_test 27c "create two stripe file f01 ======================="
-
-test_27d() {
-	mkdir -p $DIR/d27
-	$SETSTRIPE $DIR/d27/fdef 0 -1 0 || error "lstripe failed"
-	$CHECKSTAT -t file $DIR/d27/fdef || error "checkstat failed"
-	dd if=/dev/zero of=$DIR/d27/fdef bs=4k count=4 || error
-}
-run_test 27d "create file with default settings ================"
-
-test_27e() {
-	mkdir -p $DIR/d27
-	$SETSTRIPE $DIR/d27/f12 -c 2 || error "lstripe failed"
-	$SETSTRIPE $DIR/d27/f12 -c 2 && error "lstripe succeeded twice"
-	$CHECKSTAT -t file $DIR/d27/f12 || error "checkstat failed"
-}
-run_test 27e "lstripe existing file (should return error) ======"
-
-test_27f() {
-	mkdir -p $DIR/d27
-	$SETSTRIPE $DIR/d27/fbad -s 100 -i 0 -c 1 && error "lstripe failed"
-	dd if=/dev/zero of=$DIR/d27/f12 bs=4k count=4 || error "dd failed"
-	$GETSTRIPE $DIR/d27/fbad || error "lfs getstripe failed"
-}
-run_test 27f "lstripe with bad stripe size (should return error)"
-
-test_27g() {
-	mkdir -p $DIR/d27
-	$MCREATE $DIR/d27/fnone || error "mcreate failed"
-	pass
-	log "== test 27h: lfs getstripe with no objects ===================="
-	$GETSTRIPE $DIR/d27/fnone 2>&1 | grep "no stripe info" || error "has object"
-	pass
-	log "== test 27i: lfs getstripe with some objects =================="
-	touch $DIR/d27/fsome || error "touch failed"
-	$GETSTRIPE $DIR/d27/fsome | grep obdidx || error "missing objects"
-}
-run_test 27g "test lfs getstripe ==========================================="
-
-test_27j() {
-	mkdir -p $DIR/d27
-	$SETSTRIPE $DIR/d27/f27j -i $OSTCOUNT && error "lstripe failed"||true
-}
-run_test 27j "lstripe with bad stripe offset (should return error)"
-
-test_27k() { # bug 2844
-	mkdir -p $DIR/d27
-	FILE=$DIR/d27/f27k
-	LL_MAX_BLKSIZE=$((4 * 1024 * 1024))
-	[ ! -d $DIR/d27 ] && mkdir -p $DIR/d27
-	$SETSTRIPE $FILE -s 67108864 || error "lstripe failed"
-	BLKSIZE=`stat $FILE | awk '/IO Block:/ { print $7 }'`
-	[ $BLKSIZE -le $LL_MAX_BLKSIZE ] || error "$BLKSIZE > $LL_MAX_BLKSIZE"
-	dd if=/dev/zero of=$FILE bs=4k count=1
-	BLKSIZE=`stat $FILE | awk '/IO Block:/ { print $7 }'`
-	[ $BLKSIZE -le $LL_MAX_BLKSIZE ] || error "$BLKSIZE > $LL_MAX_BLKSIZE"
-}
-run_test 27k "limit i_blksize for broken user apps ============="
-
-test_27l() {
-	mkdir -p $DIR/d27
-	mcreate $DIR/f27l || error "creating file"
-	$RUNAS $SETSTRIPE $DIR/f27l -c 1 && \
-		error "lstripe should have failed" || true
-}
-run_test 27l "check setstripe permissions (should return error)"
-
-test_27m() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "$OSTCOUNT < 2 OSTs -- skipping" && return
-	if [ $ORIGFREE -gt $MAXFREE ]; then
-		skip "$ORIGFREE > $MAXFREE skipping out-of-space test on OST0"
-		return
-	fi
-	mkdir -p $DIR/d27
-	$SETSTRIPE $DIR/d27/f27m_1 -i 0 -c 1
-	dd if=/dev/zero of=$DIR/d27/f27m_1 bs=1024 count=$MAXFREE && \
-		error "dd should fill OST0"
-	i=2
-	while $SETSTRIPE $DIR/d27/f27m_$i -i 0 -c 1 ; do
-		i=`expr $i + 1`
-		[ $i -gt 256 ] && break
-	done
-	i=`expr $i + 1`
-	touch $DIR/d27/f27m_$i
-	[ `$GETSTRIPE $DIR/d27/f27m_$i | grep -A 10 obdidx | awk '{print $1}'| grep -w "0"` ] && \
-		error "OST0 was full but new created file still use it"
-	i=`expr $i + 1`
-	touch $DIR/d27/f27m_$i
-	[ `$GETSTRIPE $DIR/d27/f27m_$i | grep -A 10 obdidx | awk '{print $1}'| grep -w "0"` ] && \
-		error "OST0 was full but new created file still use it"
-	rm -r $DIR/d27
-}
-run_test 27m "create file while OST0 was full =================="
-
-# osc's keep a NOSPC stick flag that gets unset with rmdir
-reset_enospc() {
-	[ "$1" ] && FAIL_LOC=$1 || FAIL_LOC=0
-	mkdir -p $DIR/d27/nospc
-	rmdir $DIR/d27/nospc
-	sysctl -w lustre.fail_loc=$FAIL_LOC
-}
-
-exhaust_precreations() {
-	OSTIDX=$1
-	OST=$(lctl get_param -n lov.${LOVNAME}.target_obd | grep ${OSTIDX}": " | \
-	    awk '{print $2}' | sed -e 's/_UUID$//')
-	# on the mdt's osc
-	last_id=$(lctl get_param -n osc.${OST}-osc.prealloc_last_id)
-	next_id=$(lctl get_param -n osc.${OST}-osc.prealloc_next_id)
-
-	mkdir -p $DIR/d27/${OST}
-	$SETSTRIPE $DIR/d27/${OST} -i $OSTIDX -c 1
-	#define OBD_FAIL_OST_ENOSPC 0x215
-	sysctl -w lustre.fail_loc=0x215
-	echo "Creating to objid $last_id on ost $OST..."
-	createmany -o $DIR/d27/${OST}/f $next_id $((last_id - next_id + 2))
-	lctl get_param -n osc.${OST}-osc.prealloc* | grep '[0-9]'
-	reset_enospc $2
-}
-
-exhaust_all_precreations() {
-	local i
-	for (( i=0; i < OSTCOUNT; i++ )) ; do
-		exhaust_precreations $i 0x215
-	done
-	reset_enospc $1
-}
-
-test_27n() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-	reset_enospc
-	rm -f $DIR/d27/f27n
-	exhaust_precreations 0 0x80000215
-
-	touch $DIR/d27/f27n || error
-
-	reset_enospc
-}
-run_test 27n "create file with some full OSTs =================="
-
-test_27o() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-	reset_enospc
-	rm -f $DIR/d27/f27o
-	exhaust_all_precreations 0x215
-	sleep 5
-
-	touch $DIR/d27/f27o && error "able to create $DIR/d27/f27o"
-
-	reset_enospc
-}
-run_test 27o "create file with all full OSTs (should error) ===="
-
-test_27p() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-	reset_enospc
-	rm -f $DIR/d27/f27p
-
-	$MCREATE $DIR/d27/f27p || error
-	$TRUNCATE $DIR/d27/f27p 80000000 || error
-	$CHECKSTAT -s 80000000 $DIR/d27/f27p || error
-
-	exhaust_precreations 0 0x80000215
-	echo foo >> $DIR/d27/f27p || error
-	$CHECKSTAT -s 80000004 $DIR/d27/f27p || error
-
-	reset_enospc
-}
-run_test 27p "append to a truncated file with some full OSTs ==="
-
-test_27q() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-	reset_enospc
-	rm -f $DIR/d27/f27q
-
-	$MCREATE $DIR/d27/f27q || error "mcreate $DIR/d27/f27q failed"
-	$TRUNCATE $DIR/d27/f27q 80000000 ||error "truncate $DIR/d27/f27q failed"
-	$CHECKSTAT -s 80000000 $DIR/d27/f27q || error "checkstat failed"
-
-	exhaust_all_precreations 0x215
-
-	echo foo >> $DIR/d27/f27q && error "append succeeded"
-	$CHECKSTAT -s 80000000 $DIR/d27/f27q || error "checkstat 2 failed"
-
-	reset_enospc
-}
-run_test 27q "append to truncated file with all OSTs full (should error) ==="
-
-test_27r() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-	reset_enospc
-	rm -f $DIR/d27/f27r
-	exhaust_precreations 0 0x80000215
-
-	$SETSTRIPE $DIR/d27/f27r -i 0 -c 2 # && error
-
-	reset_enospc
-}
-run_test 27r "stripe file with some full OSTs (shouldn't LBUG) ="
-
-test_27s() { # bug 10725
-	mkdir -p $DIR/$tdir
-	$LSTRIPE $DIR/$tdir $((2048 * 1024 * 1024)) -1 2 && \
-		error "stripe width >= 2^32 succeeded" || true
-}
-run_test 27s "lsm_xfersize overflow (should error) (bug 10725)"
-
-test_27t() { # bug 10864
-        WDIR=`pwd`
-        WLFS=`which lfs`
-        cd $DIR
-        touch $tfile
-        $WLFS getstripe $tfile
-        cd $WDIR
-}
-run_test 27t "check that utils parse path correctly"
-
-test_27u() { # bug 4900
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-        #define OBD_FAIL_MDS_OSC_PRECREATE      0x139
-
-        sysctl -w lustre.fail_loc=0x139
-        mkdir -p $DIR/d27u
-        createmany -o $DIR/d27u/t- 1000
-        sysctl -w lustre.fail_loc=0
-
-        TLOG=$DIR/$tfile.getstripe
-        $GETSTRIPE $DIR/d27u > $TLOG
-        OBJS=`awk -vobj=0 '($1 == 0) { obj += 1 } END { print obj;}' $TLOG`
-        unlinkmany $DIR/d27u/t- 1000
-        [ $OBJS -gt 0 ] && \
-                error "$OBJS objects created on OST-0.  See $TLOG" || pass
-}
-run_test 27u "skip object creation on OSC w/o objects =========="
-
-test_27v() { # bug 4900
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-        exhaust_all_precreations
-
-        mkdir -p $DIR/$tdir
-        $SETSTRIPE $DIR/$tdir -c 1         # 1 stripe / file
-
-        touch $DIR/$tdir/$tfile
-        #define OBD_FAIL_TGT_DELAY_PRECREATE     0x705
-        sysctl -w lustre.fail_loc=0x705
-        START=`date +%s`
-        for F in `seq 1 32`; do
-                touch $DIR/$tdir/$tfile.$F
-        done
-        sysctl -w lustre.fail_loc=0
-
-        FINISH=`date +%s`
-        TIMEOUT=`sysctl -n lustre.timeout`
-        [ $((FINISH - START)) -ge $((TIMEOUT / 2)) ] && \
-               error "$FINISH - $START >= $TIMEOUT / 2"
-
-        reset_enospc
-}
-run_test 27v "skip object creation on slow OST ================="
-
-test_27w() { # bug 10997
-        mkdir -p $DIR/d27w || error "mkdir failed"
-        $LSTRIPE $DIR/d27w/f0 -s 65536 || error "lstripe failed"
-        size=`$LSTRIPEINFO $DIR/d27w/f0 | awk {'print $1'}`
-        [ $size -ne 65536 ] && error "stripe size $size != 65536" || true
-
-        [ "$OSTCOUNT" -lt "2" ] && skip "skipping multiple stripe count/offset test" && return
-        for i in `seq 1 $OSTCOUNT`; do
-                offset=$(($i-1))
-                $LSTRIPE $DIR/d27w/f$i -c $i -i $offset || error "lstripe -c $i -i $offset failed"
-                count=`$LSTRIPEINFO $DIR/d27w/f$i | awk {'print $2'}`
-                index=`$LSTRIPEINFO $DIR/d27w/f$i | awk {'print $3'}`
-                [ $count -ne $i ] && error "stripe count $count != $i" || true
-                [ $index -ne $offset ] && error "stripe offset $index != $offset" || true
-        done
-}
-run_test 27w "check lfs setstripe -c -s -i options ============="
-
-test_28() {
-	mkdir $DIR/d28
-	$CREATETEST $DIR/d28/ct || error
-}
-run_test 28 "create/mknod/mkdir with bad file types ============"
-
-test_29() {
-	cancel_lru_locks mdc
-	mkdir $DIR/d29
-	touch $DIR/d29/foo
-	log 'first d29'
-	ls -l $DIR/d29
-	LOCKCOUNTORIG=`lctl get_param -n ldlm.namespaces.*mdc*.lock_count`
-	LOCKUNUSEDCOUNTORIG=`lctl get_param -n ldlm.namespaces.*mdc*.lock_unused_count`
-	[ -z $"LOCKCOUNTORIG" ] && echo "No mdc lock count" && return 1
-	log 'second d29'
-	ls -l $DIR/d29
-	log 'done'
-	LOCKCOUNTCURRENT=`lctl get_param -n ldlm.namespaces.*mdc*.lock_count`
-	LOCKUNUSEDCOUNTCURRENT=`lctl get_param -n ldlm.namespaces.*mdc*.lock_unused_count`
-	if [ "$LOCKCOUNTCURRENT" -gt "$LOCKCOUNTORIG" ]; then
-		lctl set_param -n ldlm.dump_namespaces ""
-		error "CURRENT: $LOCKCOUNTCURRENT > $LOCKCOUNTORIG"
-		$LCTL dk | sort -k4 -t: > $TMP/test_29.dk
-		log "dumped log to $TMP/test_29.dk (bug 5793)"
-		return 2
-	fi
-	if [ "$LOCKUNUSEDCOUNTCURRENT" -gt "$LOCKUNUSEDCOUNTORIG" ]; then
-		error "UNUSED: $LOCKUNUSEDCOUNTCURRENT > $LOCKUNUSEDCOUNTORIG"
-		$LCTL dk | sort -k4 -t: > $TMP/test_29.dk
-		log "dumped log to $TMP/test_29.dk (bug 5793)"
-		return 3
-	fi
-}
-run_test 29 "IT_GETATTR regression  ============================"
-
-test_30() {
-	cp `which ls` $DIR
-	$DIR/ls /
-	rm $DIR/ls
-}
-run_test 30 "run binary from Lustre (execve) ==================="
-
-test_31a() {
-	$OPENUNLINK $DIR/f31 $DIR/f31 || error
-	$CHECKSTAT -a $DIR/f31 || error
-}
-run_test 31a "open-unlink file =================================="
-
-test_31b() {
-	touch $DIR/f31 || error
-	ln $DIR/f31 $DIR/f31b || error
-	multiop $DIR/f31b Ouc || error
-	$CHECKSTAT -t file $DIR/f31 || error
-}
-run_test 31b "unlink file with multiple links while open ======="
-
-test_31c() {
-	touch $DIR/f31 || error
-	ln $DIR/f31 $DIR/f31c || error
-	multiop_bg_pause $DIR/f31 O_uc || return 1
-	MULTIPID=$!
-	multiop $DIR/f31c Ouc
-	kill -USR1 $MULTIPID
-	wait $MULTIPID
-}
-run_test 31c "open-unlink file with multiple links ============="
-
-test_31d() {
-	opendirunlink $DIR/d31d $DIR/d31d || error
-	$CHECKSTAT -a $DIR/d31d || error
-}
-run_test 31d "remove of open directory ========================="
-
-test_31e() { # bug 2904
-	check_kernel_version 34 || return 0
-	openfilleddirunlink $DIR/d31e || error
-}
-run_test 31e "remove of open non-empty directory ==============="
-
-test_31f() { # bug 4554
-	set -vx
-	mkdir $DIR/d31f
-	$SETSTRIPE $DIR/d31f -s 1048576 -c 1
-	cp /etc/hosts $DIR/d31f
-	ls -l $DIR/d31f
-	$GETSTRIPE $DIR/d31f/hosts
-	multiop_bg_pause $DIR/d31f D_c || return 1
-	MULTIPID=$!
-
-	rm -rv $DIR/d31f || error "first of $DIR/d31f"
-	mkdir $DIR/d31f
-	$SETSTRIPE $DIR/d31f -s 1048576 -c 1
-	cp /etc/hosts $DIR/d31f
-	ls -l $DIR/d31f
-	$DIR/d31f/hosts
-	multiop_bg_pause $DIR/d31f D_c || return 1
-	MULTIPID2=$!
-
-	kill -USR1 $MULTIPID || error "first opendir $MULTIPID not running"
-	wait $MULTIPID || error "first opendir $MULTIPID failed"
-
-	sleep 6
-
-	kill -USR1 $MULTIPID2 || error "second opendir $MULTIPID not running"
-	wait $MULTIPID2 || error "second opendir $MULTIPID2 failed"
-	set +vx
-}
-run_test 31f "remove of open directory with open-unlink file ==="
-
-test_32a() {
-	echo "== more mountpoints and symlinks ================="
-	[ -e $DIR/d32a ] && rm -fr $DIR/d32a
-	mkdir -p $DIR/d32a/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32a/ext2-mountpoint || error
-	$CHECKSTAT -t dir $DIR/d32a/ext2-mountpoint/.. || error  
-	$UMOUNT $DIR/d32a/ext2-mountpoint || error
-}
-run_test 32a "stat d32a/ext2-mountpoint/.. ====================="
-
-test_32b() {
-	[ -e $DIR/d32b ] && rm -fr $DIR/d32b
-	mkdir -p $DIR/d32b/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32b/ext2-mountpoint || error
-	ls -al $DIR/d32b/ext2-mountpoint/.. || error
-	$UMOUNT $DIR/d32b/ext2-mountpoint || error
-}
-run_test 32b "open d32b/ext2-mountpoint/.. ====================="
- 
-test_32c() {
-	[ -e $DIR/d32c ] && rm -fr $DIR/d32c
-	mkdir -p $DIR/d32c/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32c/ext2-mountpoint || error
-	mkdir -p $DIR/d32c/d2/test_dir    
-	$CHECKSTAT -t dir $DIR/d32c/ext2-mountpoint/../d2/test_dir || error
-	$UMOUNT $DIR/d32c/ext2-mountpoint || error
-}
-run_test 32c "stat d32c/ext2-mountpoint/../d2/test_dir ========="
-
-test_32d() {
-	[ -e $DIR/d32d ] && rm -fr $DIR/d32d
-	mkdir -p $DIR/d32d/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32d/ext2-mountpoint || error
-	mkdir -p $DIR/d32d/d2/test_dir    
-	ls -al $DIR/d32d/ext2-mountpoint/../d2/test_dir || error
-	$UMOUNT $DIR/d32d/ext2-mountpoint || error
-}
-run_test 32d "open d32d/ext2-mountpoint/../d2/test_dir ========="
-
-test_32e() {
-	[ -e $DIR/d32e ] && rm -fr $DIR/d32e
-	mkdir -p $DIR/d32e/tmp    
-	TMP_DIR=$DIR/d32e/tmp       
-	ln -s $DIR/d32e $TMP_DIR/symlink11 
-	ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01 
-	$CHECKSTAT -t link $DIR/d32e/tmp/symlink11 || error
-	$CHECKSTAT -t link $DIR/d32e/symlink01 || error
-}
-run_test 32e "stat d32e/symlink->tmp/symlink->lustre-subdir ===="
-
-test_32f() {
-	[ -e $DIR/d32f ] && rm -fr $DIR/d32f
-	mkdir -p $DIR/d32f/tmp    
-	TMP_DIR=$DIR/d32f/tmp       
-	ln -s $DIR/d32f $TMP_DIR/symlink11 
-	ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01 
-	ls $DIR/d32f/tmp/symlink11  || error
-	ls $DIR/d32f/symlink01 || error
-}
-run_test 32f "open d32f/symlink->tmp/symlink->lustre-subdir ===="
-
-test_32g() {
-	TMP_DIR=$DIR/$tdir/tmp       
-	mkdir -p $TMP_DIR $DIR/${tdir}2
-	ln -s $DIR/${tdir}2 $TMP_DIR/symlink12 
-	ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02 
-	$CHECKSTAT -t link $TMP_DIR/symlink12 || error
-	$CHECKSTAT -t link $DIR/$tdir/symlink02 || error
-	$CHECKSTAT -t dir -f $TMP_DIR/symlink12 || error
-	$CHECKSTAT -t dir -f $DIR/$tdir/symlink02 || error
-}
-run_test 32g "stat d32g/symlink->tmp/symlink->lustre-subdir/${tdir}2"
-
-test_32h() {
-	rm -fr $DIR/$tdir $DIR/${tdir}2
-	TMP_DIR=$DIR/$tdir/tmp       
-	mkdir -p $TMP_DIR $DIR/${tdir}2 
-	ln -s $DIR/${tdir}2 $TMP_DIR/symlink12 
-	ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02 
-	ls $TMP_DIR/symlink12 || error
-	ls $DIR/$tdir/symlink02  || error
-}
-run_test 32h "open d32h/symlink->tmp/symlink->lustre-subdir/${tdir}2"
-
-test_32i() {
-	[ -e $DIR/d32i ] && rm -fr $DIR/d32i
-	mkdir -p $DIR/d32i/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32i/ext2-mountpoint || error
-	touch $DIR/d32i/test_file
-	$CHECKSTAT -t file $DIR/d32i/ext2-mountpoint/../test_file || error  
-	$UMOUNT $DIR/d32i/ext2-mountpoint || error
-}
-run_test 32i "stat d32i/ext2-mountpoint/../test_file ==========="
-
-test_32j() {
-	[ -e $DIR/d32j ] && rm -fr $DIR/d32j
-	mkdir -p $DIR/d32j/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32j/ext2-mountpoint || error
-	touch $DIR/d32j/test_file
-	cat $DIR/d32j/ext2-mountpoint/../test_file || error
-	$UMOUNT $DIR/d32j/ext2-mountpoint || error
-}
-run_test 32j "open d32j/ext2-mountpoint/../test_file ==========="
-
-test_32k() {
-	rm -fr $DIR/d32k
-	mkdir -p $DIR/d32k/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32k/ext2-mountpoint  
-	mkdir -p $DIR/d32k/d2
-	touch $DIR/d32k/d2/test_file || error
-	$CHECKSTAT -t file $DIR/d32k/ext2-mountpoint/../d2/test_file || error
-	$UMOUNT $DIR/d32k/ext2-mountpoint || error
-}
-run_test 32k "stat d32k/ext2-mountpoint/../d2/test_file ========"
-
-test_32l() {
-	rm -fr $DIR/d32l
-	mkdir -p $DIR/d32l/ext2-mountpoint 
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32l/ext2-mountpoint || error
-	mkdir -p $DIR/d32l/d2
-	touch $DIR/d32l/d2/test_file
-	cat  $DIR/d32l/ext2-mountpoint/../d2/test_file || error
-	$UMOUNT $DIR/d32l/ext2-mountpoint || error
-}
-run_test 32l "open d32l/ext2-mountpoint/../d2/test_file ========"
-
-test_32m() {
-	rm -fr $DIR/d32m
-	mkdir -p $DIR/d32m/tmp    
-	TMP_DIR=$DIR/d32m/tmp       
-	ln -s $DIR $TMP_DIR/symlink11 
-	ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01 
-	$CHECKSTAT -t link $DIR/d32m/tmp/symlink11 || error
-	$CHECKSTAT -t link $DIR/d32m/symlink01 || error
-}
-run_test 32m "stat d32m/symlink->tmp/symlink->lustre-root ======"
-
-test_32n() {
-	rm -fr $DIR/d32n
-	mkdir -p $DIR/d32n/tmp    
-	TMP_DIR=$DIR/d32n/tmp       
-	ln -s $DIR $TMP_DIR/symlink11 
-	ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01 
-	ls -l $DIR/d32n/tmp/symlink11  || error
-	ls -l $DIR/d32n/symlink01 || error
-}
-run_test 32n "open d32n/symlink->tmp/symlink->lustre-root ======"
-
-test_32o() {
-	rm -fr $DIR/d32o $DIR/$tfile
-	touch $DIR/$tfile 
-	mkdir -p $DIR/d32o/tmp    
-	TMP_DIR=$DIR/d32o/tmp       
-	ln -s $DIR/$tfile $TMP_DIR/symlink12 
-	ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02 
-	$CHECKSTAT -t link $DIR/d32o/tmp/symlink12 || error
-	$CHECKSTAT -t link $DIR/d32o/symlink02 || error
-	$CHECKSTAT -t file -f $DIR/d32o/tmp/symlink12 || error
-	$CHECKSTAT -t file -f $DIR/d32o/symlink02 || error
-}
-run_test 32o "stat d32o/symlink->tmp/symlink->lustre-root/$tfile"
-
-test_32p() {
-    log 32p_1
-	rm -fr $DIR/d32p
-    log 32p_2
-	rm -f $DIR/$tfile
-    log 32p_3
-	touch $DIR/$tfile 
-    log 32p_4
-	mkdir -p $DIR/d32p/tmp    
-    log 32p_5
-	TMP_DIR=$DIR/d32p/tmp       
-    log 32p_6
-	ln -s $DIR/$tfile $TMP_DIR/symlink12 
-    log 32p_7
-	ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02 
-    log 32p_8
-	cat $DIR/d32p/tmp/symlink12 || error
-    log 32p_9
-	cat $DIR/d32p/symlink02 || error
-    log 32p_10
-}
-run_test 32p "open d32p/symlink->tmp/symlink->lustre-root/$tfile"
-
-test_32q() {
-	[ -e $DIR/d32q ] && rm -fr $DIR/d32q
-	mkdir -p $DIR/d32q
-        touch $DIR/d32q/under_the_mount
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32q
-	ls $DIR/d32q/under_the_mount && error || true
-	$UMOUNT $DIR/d32q || error
-}
-run_test 32q "stat follows mountpoints in Lustre (should return error)"
-
-test_32r() {
-	[ -e $DIR/d32r ] && rm -fr $DIR/d32r
-	mkdir -p $DIR/d32r
-        touch $DIR/d32r/under_the_mount
-	mount -t ext2 -o loop $EXT2_DEV $DIR/d32r
-	ls $DIR/d32r | grep -q under_the_mount && error || true
-	$UMOUNT $DIR/d32r || error
-}
-run_test 32r "opendir follows mountpoints in Lustre (should return error)"
-
-test_33() {
-	rm -f $DIR/$tfile
-	touch $DIR/$tfile
-	chmod 444 $DIR/$tfile
-	chown $RUNAS_ID $DIR/$tfile
-	log 33_1
-	$RUNAS $OPENFILE -f O_RDWR $DIR/$tfile && error || true
-	log 33_2
-}
-run_test 33 "write file with mode 444 (should return error) ===="
-
-test_33a() {
-        rm -fr $DIR/d33
-        mkdir -p $DIR/d33
-        chown $RUNAS_ID $DIR/d33
-        $RUNAS $OPENFILE -f O_RDWR:O_CREAT -m 0444 $DIR/d33/f33|| error "create"
-        $RUNAS $OPENFILE -f O_RDWR:O_CREAT -m 0444 $DIR/d33/f33 && \
-		error "open RDWR" || true
-}
-run_test 33a "test open file(mode=0444) with O_RDWR (should return error)"
-
-test_33b() {
-        rm -fr $DIR/d33
-        mkdir -p $DIR/d33
-        chown $RUNAS_ID $DIR/d33
-        $RUNAS $OPENFILE -f 1286739555 $DIR/d33/f33 && error "create" || true
-}
-run_test 33b "test open file with malformed flags (No panic and return error)"
-
-TEST_34_SIZE=${TEST_34_SIZE:-2000000000000}
-test_34a() {
-	rm -f $DIR/f34
-	$MCREATE $DIR/f34 || error
-	$GETSTRIPE $DIR/f34 2>&1 | grep -q "no stripe info" || error
-	$TRUNCATE $DIR/f34 $TEST_34_SIZE || error
-	$GETSTRIPE $DIR/f34 2>&1 | grep -q "no stripe info" || error
-	$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
-}
-run_test 34a "truncate file that has not been opened ==========="
-
-test_34b() {
-	[ ! -f $DIR/f34 ] && test_34a
-	$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
-	$OPENFILE -f O_RDONLY $DIR/f34
-	$GETSTRIPE $DIR/f34 2>&1 | grep -q "no stripe info" || error
-	$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
-}
-run_test 34b "O_RDONLY opening file doesn't create objects ====="
-
-test_34c() {
-	[ ! -f $DIR/f34 ] && test_34a 
-	$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
-	$OPENFILE -f O_RDWR $DIR/f34
-	$GETSTRIPE $DIR/f34 2>&1 | grep -q "no stripe info" && error
-	$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
-}
-run_test 34c "O_RDWR opening file-with-size works =============="
-
-test_34d() {
-	[ ! -f $DIR/f34 ] && test_34a 
-	dd if=/dev/zero of=$DIR/f34 conv=notrunc bs=4k count=1 || error
-	$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
-	rm $DIR/f34
-}
-run_test 34d "write to sparse file ============================="
-
-test_34e() {
-	rm -f $DIR/f34e
-	$MCREATE $DIR/f34e || error
-	$TRUNCATE $DIR/f34e 1000 || error
-	$CHECKSTAT -s 1000 $DIR/f34e || error
-	$OPENFILE -f O_RDWR $DIR/f34e
-	$CHECKSTAT -s 1000 $DIR/f34e || error
-}
-run_test 34e "create objects, some with size and some without =="
-
-test_34f() { # bug 6242, 6243
-	SIZE34F=48000
-	rm -f $DIR/f34f
-	$MCREATE $DIR/f34f || error
-	$TRUNCATE $DIR/f34f $SIZE34F || error "truncating $DIR/f3f to $SIZE34F"
-	dd if=$DIR/f34f of=$TMP/f34f
-	$CHECKSTAT -s $SIZE34F $TMP/f34f || error "$TMP/f34f not $SIZE34F bytes"
-	dd if=/dev/zero of=$TMP/f34fzero bs=$SIZE34F count=1
-	cmp $DIR/f34f $TMP/f34fzero || error "$DIR/f34f not all zero"
-	cmp $TMP/f34f $TMP/f34fzero || error "$TMP/f34f not all zero"
-	rm $TMP/f34f $TMP/f34fzero $DIR/f34f
-}
-run_test 34f "read from a file with no objects until EOF ======="
-
-test_35a() {
-	cp /bin/sh $DIR/f35a
-	chmod 444 $DIR/f35a
-	chown $RUNAS_ID $DIR/f35a
-	$RUNAS $DIR/f35a && error || true
-	rm $DIR/f35a
-}
-run_test 35a "exec file with mode 444 (should return and not leak) ====="
-
-test_36a() {
-	rm -f $DIR/f36
-	utime $DIR/f36 || error
-}
-run_test 36a "MDS utime check (mknod, utime) ==================="
-
-test_36b() {
-	echo "" > $DIR/f36
-	utime $DIR/f36 || error
-}
-run_test 36b "OST utime check (open, utime) ===================="
-
-test_36c() {
-	rm -f $DIR/d36/f36
-	mkdir $DIR/d36
-	chown $RUNAS_ID $DIR/d36
-	$RUNAS utime $DIR/d36/f36 || error
-}
-run_test 36c "non-root MDS utime check (mknod, utime) =========="
-
-test_36d() {
-	[ ! -d $DIR/d36 ] && test_36c
-	echo "" > $DIR/d36/f36
-	$RUNAS utime $DIR/d36/f36 || error
-}
-run_test 36d "non-root OST utime check (open, utime) ==========="
-
-test_36e() {
-	[ $RUNAS_ID -eq $UID ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	mkdir -p $DIR/$tdir
-	touch $DIR/$tdir/$tfile
-	$RUNAS utime $DIR/$tdir/$tfile && \
-		error "utime worked, expected failure" || true
-}
-run_test 36e "utime on non-owned file (should return error) ===="
-
-test_36f() {
-	export LANG=C LC_LANG=C # for date language
-
-	DATESTR="Dec 20  2000"
-	mkdir -p $DIR/$tdir
-	#define OBD_FAIL_OST_BRW_PAUSE_BULK 0x214
-        sysctl -w lustre.fail_loc=0x80000214
-	date; date +%s
-	cp /etc/hosts $DIR/$tdir/$tfile
-	sync & # write RPC generated with "current" inode timestamp, but delayed
-	sleep 1
-	touch --date="$DATESTR" $DIR/$tdir/$tfile # setattr timestamp in past
-	LS_BEFORE="`ls -l $DIR/$tdir/$tfile`" # old timestamp from client cache
-	cancel_lru_locks osc
-	LS_AFTER="`ls -l $DIR/$tdir/$tfile`"  # timestamp from OST object
-	date; date +%s
-	[ "$LS_BEFORE" != "$LS_AFTER" ] && \
-		echo "BEFORE: $LS_BEFORE" && \
-		echo "AFTER : $LS_AFTER" && \
-		echo "WANT  : $DATESTR" && \
-		error "$DIR/$tdir/$tfile timestamps changed" || true
-}
-run_test 36f "utime on file racing with OST BRW write =========="
-
-test_36g() {
-	remote_ost && skip "remote OST" && return
-	export FMD_MAX_AGE=`do_facet ost1 lctl get_param -n obdfilter.*.client_cache_seconds 2> /dev/null | head -n 1`
-	FMD_BEFORE="`awk '/ll_fmd_cache/ { print $2 }' /proc/slabinfo`"
-	touch $DIR/d36/$tfile
-	sleep $((FMD_MAX_AGE + 12))
-	FMD_AFTER="`awk '/ll_fmd_cache/ { print $2 }' /proc/slabinfo`"
-	[ "$FMD_AFTER" -gt "$FMD_BEFORE" ] && \
-		echo "AFTER : $FMD_AFTER > BEFORE $FMD_BEFORE" && \
-		error "fmd didn't expire after ping" || true
-}
-run_test 36g "filter mod data cache expiry ====================="
-
-test_37() {
-	mkdir -p $DIR/$tdir
-	echo f > $DIR/$tdir/fbugfile
-	mount -t ext2 -o loop $EXT2_DEV $DIR/$tdir
-	ls $DIR/$tdir | grep "\<fbugfile\>" && error
-	$UMOUNT $DIR/$tdir || error
-	rm -f $DIR/$tdir/fbugfile || error
-}
-run_test 37 "ls a mounted file system to check old content ====="
-
-test_38() {
-	o_directory $DIR/$tfile
-}
-run_test 38 "open a regular file with O_DIRECTORY =============="
-
-test_39() {
-	touch $DIR/$tfile
-	touch $DIR/${tfile}2
-#	ls -l  $DIR/$tfile $DIR/${tfile}2
-#	ls -lu  $DIR/$tfile $DIR/${tfile}2
-#	ls -lc  $DIR/$tfile $DIR/${tfile}2
-	sleep 2
-	$OPENFILE -f O_CREAT:O_TRUNC:O_WRONLY $DIR/${tfile}2
-	if [ ! $DIR/${tfile}2 -nt $DIR/$tfile ]; then
-		echo "mtime"
-		ls -l  $DIR/$tfile $DIR/${tfile}2
-		echo "atime"
-		ls -lu  $DIR/$tfile $DIR/${tfile}2
-		echo "ctime"
-		ls -lc  $DIR/$tfile $DIR/${tfile}2
-		error "O_TRUNC didn't change timestamps"
-	fi
-}
-run_test 39 "mtime changed on create ==========================="
-
-test_40() {
-	dd if=/dev/zero of=$DIR/f40 bs=4096 count=1
-	$RUNAS $OPENFILE -f O_WRONLY:O_TRUNC $DIR/f40 && error
-	$CHECKSTAT -t file -s 4096 $DIR/f40 || error
-}
-run_test 40 "failed open(O_TRUNC) doesn't truncate ============="
-
-test_41() {
-	# bug 1553
-	small_write $DIR/f41 18
-}
-run_test 41 "test small file write + fstat ====================="
-
-count_ost_writes() {
-        lctl get_param -n osc.*.stats |
-            awk -vwrites=0 '/ost_write/ { writes += $2 } END { print writes; }'
-}
-
-# decent default
-WRITEBACK_SAVE=500
-DIRTY_RATIO_SAVE=40
-MAX_DIRTY_RATIO=50
-BG_DIRTY_RATIO_SAVE=10
-MAX_BG_DIRTY_RATIO=25
-
-start_writeback() {
-	trap 0
-	# in 2.6, restore /proc/sys/vm/dirty_writeback_centisecs,
-	# dirty_ratio, dirty_background_ratio
-	if [ -f /proc/sys/vm/dirty_writeback_centisecs ]; then
-		echo $WRITEBACK_SAVE > /proc/sys/vm/dirty_writeback_centisecs
-		echo $BG_DIRTY_RATIO_SAVE > /proc/sys/vm/dirty_background_ratio
-		echo $DIRTY_RATIO_SAVE > /proc/sys/vm/dirty_ratio
-	else
-		# if file not here, we are a 2.4 kernel
-		kill -CONT `pidof kupdated`
-	fi
-}
-
-stop_writeback() {
-	# setup the trap first, so someone cannot exit the test at the
-	# exact wrong time and mess up a machine
-	trap start_writeback EXIT
-	# in 2.6, save and 0 /proc/sys/vm/dirty_writeback_centisecs
-	if [ -f /proc/sys/vm/dirty_writeback_centisecs ]; then
-		WRITEBACK_SAVE=`cat /proc/sys/vm/dirty_writeback_centisecs`
-		echo 0 > /proc/sys/vm/dirty_writeback_centisecs
-		# save and increase /proc/sys/vm/dirty_ratio
-		DIRTY_RATIO_SAVE=`cat /proc/sys/vm/dirty_ratio`
-		echo $MAX_DIRTY_RATIO > /proc/sys/vm/dirty_ratio
-		# save and increase /proc/sys/vm/dirty_background_ratio
-		BG_DIRTY_RATIO_SAVE=`cat /proc/sys/vm/dirty_background_ratio`
-		echo $MAX_BG_DIRTY_RATIO > /proc/sys/vm/dirty_background_ratio
-	else
-		# if file not here, we are a 2.4 kernel
-		kill -STOP `pidof kupdated`
-	fi
-}
-
-# ensure that all stripes have some grant before we test client-side cache
-setup_test42() {
-	[ "$SETUP_TEST42" ] && return
-	for i in `seq -f $DIR/f42-%g 1 $OSTCOUNT`; do
-		dd if=/dev/zero of=$i bs=4k count=1
-		rm $i
-	done
-	SETUP_TEST42=DONE
-}
-
-# Tests 42* verify that our behaviour is correct WRT caching, file closure,
-# file truncation, and file removal.
-test_42a() {
-	setup_test42
-	cancel_lru_locks osc
-	stop_writeback
-	sync; sleep 1; sync # just to be safe
-	BEFOREWRITES=`count_ost_writes`
-	lctl get_param -n osc.*[oO][sS][cC][_-]*.cur_grant_bytes | grep "[0-9]"
-	dd if=/dev/zero of=$DIR/f42a bs=1024 count=100
-	AFTERWRITES=`count_ost_writes`
-	[ $BEFOREWRITES -eq $AFTERWRITES ] || \
-		error "$BEFOREWRITES < $AFTERWRITES"
-	start_writeback
-}
-run_test 42a "ensure that we don't flush on close =============="
-
-test_42b() {
-	setup_test42
-	cancel_lru_locks osc
-	stop_writeback
-        sync
-        dd if=/dev/zero of=$DIR/f42b bs=1024 count=100
-        BEFOREWRITES=`count_ost_writes`
-        $MUNLINK $DIR/f42b || error "$MUNLINK $DIR/f42b: $?"
-        AFTERWRITES=`count_ost_writes`
-        if [ $BEFOREWRITES -lt $AFTERWRITES ]; then
-                error "$BEFOREWRITES < $AFTERWRITES on unlink"
-        fi
-        BEFOREWRITES=`count_ost_writes`
-        sync || error "sync: $?"
-        AFTERWRITES=`count_ost_writes`
-        if [ $BEFOREWRITES -lt $AFTERWRITES ]; then
-                error "$BEFOREWRITES < $AFTERWRITES on sync"
-        fi
-        dmesg | grep 'error from obd_brw_async' && error 'error writing back'
-	start_writeback
-        return 0
-}
-run_test 42b "test destroy of file with cached dirty data ======"
-
-# if these tests just want to test the effect of truncation,
-# they have to be very careful.  consider:
-# - the first open gets a {0,EOF}PR lock
-# - the first write conflicts and gets a {0, count-1}PW
-# - the rest of the writes are under {count,EOF}PW
-# - the open for truncate tries to match a {0,EOF}PR
-#   for the filesize and cancels the PWs.
-# any number of fixes (don't get {0,EOF} on open, match
-# composite locks, do smarter file size management) fix
-# this, but for now we want these tests to verify that
-# the cancellation with truncate intent works, so we
-# start the file with a full-file pw lock to match against
-# until the truncate.
-trunc_test() {
-        test=$1
-        file=$DIR/$test
-        offset=$2
-	cancel_lru_locks osc
-	stop_writeback
-	# prime the file with 0,EOF PW to match
-	touch $file
-        $TRUNCATE $file 0
-        sync; sync
-	# now the real test..
-        dd if=/dev/zero of=$file bs=1024 count=100
-        BEFOREWRITES=`count_ost_writes`
-        $TRUNCATE $file $offset
-        cancel_lru_locks osc
-        AFTERWRITES=`count_ost_writes`
-	start_writeback
-}
-
-test_42c() {
-        trunc_test 42c 1024
-        [ $BEFOREWRITES -eq $AFTERWRITES ] && \
-            error "beforewrites $BEFOREWRITES == afterwrites $AFTERWRITES on truncate"
-        rm $file
-}
-run_test 42c "test partial truncate of file with cached dirty data"
-
-test_42d() {
-        trunc_test 42d 0
-        [ $BEFOREWRITES -eq $AFTERWRITES ] || \
-            error "beforewrites $BEFOREWRITES != afterwrites $AFTERWRITES on truncate"
-        rm $file
-}
-run_test 42d "test complete truncate of file with cached dirty data"
-
-test_43() {
-	cp -p /bin/ls $DIR/$tdir/$tfile
-	multiop $DIR/$tdir/$tfile Ow_c &
-	pid=$!
-	# give multiop a chance to open
-	sleep 1
-
-	$DIR/$tdir/$tfile && error || true
-	kill -USR1 $pid
-}
-run_test 43 "execution of file opened for write should return -ETXTBSY"
-
-test_43a() {
-        mkdir -p $DIR/d43
-	cp -p `which multiop` $DIR/d43/multiop
-        MULTIOP_PROG=$DIR/d43/multiop multiop_bg_pause $TMP/test43.junk O_c || return 1
-        MULTIOP_PID=$!
-        multiop $DIR/d43/multiop Oc && error "expected error, got success"
-        kill -USR1 $MULTIOP_PID || return 2
-        wait $MULTIOP_PID || return 3
-        rm $TMP/test43.junk
-}
-run_test 43a "open(RDWR) of file being executed should return -ETXTBSY"
-
-test_43b() {
-        mkdir -p $DIR/d43
-	cp -p `which multiop` $DIR/d43/multiop
-        MULTIOP_PROG=$DIR/d43/multiop multiop_bg_pause $TMP/test43.junk O_c || return 1
-        MULTIOP_PID=$!
-        truncate $DIR/d43/multiop 0 && error "expected error, got success"
-        kill -USR1 $MULTIOP_PID || return 2
-        wait $MULTIOP_PID || return 3
-        rm $TMP/test43.junk
-}
-run_test 43b "truncate of file being executed should return -ETXTBSY"
-
-test_43c() {
-	local testdir="$DIR/d43c"
-	mkdir -p $testdir
-	cp $SHELL $testdir/
-	( cd $(dirname $SHELL) && md5sum $(basename $SHELL) ) | \
-		( cd $testdir && md5sum -c)
-}
-run_test 43c "md5sum of copy into lustre========================"
-
-test_44() {
-	[  "$OSTCOUNT" -lt "2" ] && skip "skipping 2-stripe test" && return
-	dd if=/dev/zero of=$DIR/f1 bs=4k count=1 seek=1023
-	dd if=$DIR/f1 of=/dev/null bs=4k count=1
-}
-run_test 44 "zero length read from a sparse stripe ============="
-
-test_44a() {
-    local nstripe=`$LCTL lov_getconfig $DIR | grep default_stripe_count: | \
-                         awk '{print $2}'`
-    [ -z "$nstripe" ] && skip "can't get stripe info" && return
-    [ "$nstripe" -gt "$OSTCOUNT" ] && skip "Wrong default_stripe_count: $nstripe (OSTCOUNT: $OSTCOUNT)" && return
-    local stride=`$LCTL lov_getconfig $DIR | grep default_stripe_size: | \
-                      awk '{print $2}'`
-    if [ $nstripe -eq 0 -o $nstripe -eq -1 ] ; then
-        nstripe=`$LCTL lov_getconfig $DIR | grep obd_count: | awk '{print $2}'`
-    fi
-
-    OFFSETS="0 $((stride/2)) $((stride-1))"
-    for offset in $OFFSETS ; do
-      for i in `seq 0 $((nstripe-1))`; do
-        rm -f $DIR/d44a
-        local GLOBALOFFSETS=""
-        local size=$((((i + 2 * $nstripe )*$stride + $offset)))  # Bytes
-        ll_sparseness_write $DIR/d44a $size  || error "ll_sparseness_write"
-        GLOBALOFFSETS="$GLOBALOFFSETS $size"
-        ll_sparseness_verify $DIR/d44a $GLOBALOFFSETS \
-                            || error "ll_sparseness_verify $GLOBALOFFSETS"
-
-        for j in `seq 0 $((nstripe-1))`; do
-            size=$((((j + $nstripe )*$stride + $offset)))  # Bytes
-            ll_sparseness_write $DIR/d44a $size || error "ll_sparseness_write"
-            GLOBALOFFSETS="$GLOBALOFFSETS $size"
-        done
-        ll_sparseness_verify $DIR/d44a $GLOBALOFFSETS \
-                            || error "ll_sparseness_verify $GLOBALOFFSETS"
-      done
-    done
-}
-run_test 44a "test sparse pwrite ==============================="
-
-dirty_osc_total() {
-	tot=0
-	for d in `lctl get_param -n osc.*.cur_dirty_bytes`; do
-		tot=$(($tot + d))
-	done
-	echo $tot
-}
-do_dirty_record() {
-	before=`dirty_osc_total`
-	echo executing "\"$*\""
-	eval $*
-	after=`dirty_osc_total`
-	echo before $before, after $after
-}
-test_45() {
-	f="$DIR/f45"
-	# Obtain grants from OST if it supports it
-	echo blah > ${f}_grant
-	stop_writeback
-	sync
-	do_dirty_record "echo blah > $f"
-	[ $before -eq $after ] && error "write wasn't cached"
-	do_dirty_record "> $f"
-	[ $before -gt $after ] || error "truncate didn't lower dirty count"
-	do_dirty_record "echo blah > $f"
-	[ $before -eq $after ] && error "write wasn't cached"
-	do_dirty_record "sync"
-	[ $before -gt $after ] || error "writeback didn't lower dirty count"
-	do_dirty_record "echo blah > $f"
-	[ $before -eq $after ] && error "write wasn't cached"
-	do_dirty_record "cancel_lru_locks osc"
-	[ $before -gt $after ] || error "lock cancellation didn't lower dirty count"
-	start_writeback
-}
-run_test 45 "osc io page accounting ============================"
-
-page_size() {
-	getconf PAGE_SIZE
-}
-
-# in a 2 stripe file (lov.sh), page 1023 maps to page 511 in its object.  this
-# test tickles a bug where re-dirtying a page was failing to be mapped to the
-# objects offset and an assert hit when an rpc was built with 1023's mapped 
-# offset 511 and 511's raw 511 offset. it also found general redirtying bugs.
-test_46() {
-	f="$DIR/f46"
-	stop_writeback
-	sync
-	dd if=/dev/zero of=$f bs=`page_size` seek=511 count=1
-	sync
-	dd conv=notrunc if=/dev/zero of=$f bs=`page_size` seek=1023 count=1
-	dd conv=notrunc if=/dev/zero of=$f bs=`page_size` seek=511 count=1
-	sync
-	start_writeback
-}
-run_test 46 "dirtying a previously written page ================"
-
-# Check that device nodes are created and then visible correctly (#2091)
-test_47() {
-	cmknod $DIR/test_47_node || error
-}
-run_test 47 "Device nodes check ================================"
-
-test_48a() { # bug 2399
-	check_kernel_version 34 || return 0
-	mkdir -p $DIR/d48a
-	cd $DIR/d48a
-	mv $DIR/d48a $DIR/d48.new || error "move directory failed"
-	mkdir $DIR/d48a || error "recreate directory failed"
-	touch foo || error "'touch foo' failed after recreating cwd"
-	mkdir bar || error "'mkdir foo' failed after recreating cwd"
-	if check_kernel_version 44; then
-		touch .foo || error "'touch .foo' failed after recreating cwd"
-		mkdir .bar || error "'mkdir .foo' failed after recreating cwd"
-	fi
-	ls . > /dev/null || error "'ls .' failed after recreating cwd"
-	ls .. > /dev/null || error "'ls ..' failed after removing cwd"
-	cd . || error "'cd .' failed after recreating cwd"
-	mkdir . && error "'mkdir .' worked after recreating cwd"
-	rmdir . && error "'rmdir .' worked after recreating cwd"
-	ln -s . baz || error "'ln -s .' failed after recreating cwd"
-	cd .. || error "'cd ..' failed after recreating cwd"
-}
-run_test 48a "Access renamed working dir (should return errors)="
-
-test_48b() { # bug 2399
-	check_kernel_version 34 || return 0
-	mkdir -p $DIR/d48b
-	cd $DIR/d48b
-	rmdir $DIR/d48b || error "remove cwd $DIR/d48b failed"
-	touch foo && error "'touch foo' worked after removing cwd"
-	mkdir foo && error "'mkdir foo' worked after removing cwd"
-	if check_kernel_version 44; then
-		touch .foo && error "'touch .foo' worked after removing cwd"
-		mkdir .foo && error "'mkdir .foo' worked after removing cwd"
-	fi
-	ls . > /dev/null && error "'ls .' worked after removing cwd"
-	ls .. > /dev/null || error "'ls ..' failed after removing cwd"
-	is_patchless || ( cd . && error "'cd .' worked after removing cwd" )
-	mkdir . && error "'mkdir .' worked after removing cwd"
-	rmdir . && error "'rmdir .' worked after removing cwd"
-	ln -s . foo && error "'ln -s .' worked after removing cwd"
-	cd .. || echo "'cd ..' failed after removing cwd `pwd`"  #bug 3517
-}
-run_test 48b "Access removed working dir (should return errors)="
-
-test_48c() { # bug 2350
-	check_kernel_version 36 || return 0
-	#sysctl -w lnet.debug=-1
-	#set -vx
-	mkdir -p $DIR/d48c/dir
-	cd $DIR/d48c/dir
-	$TRACE rmdir $DIR/d48c/dir || error "remove cwd $DIR/d48c/dir failed"
-	$TRACE touch foo && error "'touch foo' worked after removing cwd"
-	$TRACE mkdir foo && error "'mkdir foo' worked after removing cwd"
-	if check_kernel_version 44; then
-		touch .foo && error "'touch .foo' worked after removing cwd"
-		mkdir .foo && error "'mkdir .foo' worked after removing cwd"
-	fi
-	$TRACE ls . && error "'ls .' worked after removing cwd"
-	$TRACE ls .. || error "'ls ..' failed after removing cwd"
-	is_patchless || ( $TRACE cd . && error "'cd .' worked after removing cwd" )
-	$TRACE mkdir . && error "'mkdir .' worked after removing cwd"
-	$TRACE rmdir . && error "'rmdir .' worked after removing cwd"
-	$TRACE ln -s . foo && error "'ln -s .' worked after removing cwd"
-	$TRACE cd .. || echo "'cd ..' failed after removing cwd `pwd`" #bug 3415
-}
-run_test 48c "Access removed working subdir (should return errors)"
-
-test_48d() { # bug 2350
-	check_kernel_version 36 || return 0
-	#sysctl -w lnet.debug=-1
-	#set -vx
-	mkdir -p $DIR/d48d/dir
-	cd $DIR/d48d/dir
-	$TRACE rmdir $DIR/d48d/dir || error "remove cwd $DIR/d48d/dir failed"
-	$TRACE rmdir $DIR/d48d || error "remove parent $DIR/d48d failed"
-	$TRACE touch foo && error "'touch foo' worked after removing parent"
-	$TRACE mkdir foo && error "'mkdir foo' worked after removing parent"
-	if check_kernel_version 44; then
-		touch .foo && error "'touch .foo' worked after removing parent"
-		mkdir .foo && error "'mkdir .foo' worked after removing parent"
-	fi
-	$TRACE ls . && error "'ls .' worked after removing parent"
-	$TRACE ls .. && error "'ls ..' worked after removing parent"
-	is_patchless || ( $TRACE cd . && error "'cd .' worked after recreate parent" )
-	$TRACE mkdir . && error "'mkdir .' worked after removing parent"
-	$TRACE rmdir . && error "'rmdir .' worked after removing parent"
-	$TRACE ln -s . foo && error "'ln -s .' worked after removing parent"
-	is_patchless || ( $TRACE cd .. && error "'cd ..' worked after removing parent" || true )
-}
-run_test 48d "Access removed parent subdir (should return errors)"
-
-test_48e() { # bug 4134
-	check_kernel_version 41 || return 0
-	#sysctl -w lnet.debug=-1
-	#set -vx
-	mkdir -p $DIR/d48e/dir
-	cd $DIR/d48e/dir
-	$TRACE rmdir $DIR/d48e/dir || error "remove cwd $DIR/d48e/dir failed"
-	$TRACE rmdir $DIR/d48e || error "remove parent $DIR/d48e failed"
-	$TRACE touch $DIR/d48e || error "'touch $DIR/d48e' failed"
-	$TRACE chmod +x $DIR/d48e || error "'chmod +x $DIR/d48e' failed"
-	# On a buggy kernel addition of "touch foo" after cd .. will
-	# produce kernel oops in lookup_hash_it
-	touch ../foo && error "'cd ..' worked after recreate parent"
-	cd $DIR
-	$TRACE rm $DIR/d48e || error "rm '$DIR/d48e' failed"
-}
-run_test 48e "Access to recreated parent subdir (should return errors)"
-
-test_50() {
-	# bug 1485
-	mkdir $DIR/d50
-	cd $DIR/d50
-	ls /proc/$$/cwd || error
-}
-run_test 50 "special situations: /proc symlinks  ==============="
-
-test_51() {
-	# bug 1516 - create an empty entry right after ".." then split dir
-	mkdir $DIR/d51
-	touch $DIR/d51/foo
-	$MCREATE $DIR/d51/bar
-	rm $DIR/d51/foo
-	createmany -m $DIR/d51/longfile 201
-	FNUM=202
-	while [ `ls -sd $DIR/d51 | awk '{ print $1 }'` -eq 4 ]; do
-		$MCREATE $DIR/d51/longfile$FNUM
-		FNUM=$(($FNUM + 1))
-		echo -n "+"
-	done
-	echo
-	ls -l $DIR/d51 > /dev/null || error
-}
-run_test 51 "special situations: split htree with empty entry =="
-
-export NUMTEST=70000
-test_51b() {
-	NUMFREE=`df -i -P $DIR | tail -n 1 | awk '{ print $4 }'`
-	[ $NUMFREE -lt 21000 ] && \
-		skip "not enough free inodes ($NUMFREE)" && \
-		return
-
-	check_kernel_version 40 || NUMTEST=31000
-	[ $NUMFREE -lt $NUMTEST ] && NUMTEST=$(($NUMFREE - 50))
-
-	mkdir -p $DIR/d51b
-	createmany -d $DIR/d51b/t- $NUMTEST
-}
-run_test 51b "mkdir .../t-0 --- .../t-$NUMTEST ===================="
-
-test_51c() {
-	[ ! -d $DIR/d51b ] && skip "$DIR/51b missing" && \
-		return
-
-	unlinkmany -d $DIR/d51b/t- $NUMTEST
-}
-run_test 51c "rmdir .../t-0 --- .../t-$NUMTEST ===================="
-
-test_51d() {
-        [  "$OSTCOUNT" -lt "3" ] && skip "skipping test with few OSTs" && return
-        mkdir -p $DIR/d51d
-        createmany -o $DIR/d51d/t- 1000
-        $LFS getstripe $DIR/d51d > $TMP/files
-        for N in `seq 0 $((OSTCOUNT - 1))`; do
-	    OBJS[$N]=`awk -vobjs=0 '($1 == '$N') { objs += 1 } END { print objs;}' $TMP/files`
-	    OBJS0[$N]=`grep -A 1 idx $TMP/files | awk -vobjs=0 '($1 == '$N') { objs += 1 } END { print objs;}'`
-	    log "OST$N has ${OBJS[$N]} objects, ${OBJS0[$N]} are index 0"
-        done
-        unlinkmany $DIR/d51d/t- 1000
-
-        NLAST=0
-        for N in `seq 1 $((OSTCOUNT - 1))`; do
-	    [ ${OBJS[$N]} -lt $((${OBJS[$NLAST]} - 20)) ] && \
-		error "OST $N has less objects vs OST $NLAST (${OBJS[$N]} < ${OBJS[$NLAST]}"
-	    [ ${OBJS[$N]} -gt $((${OBJS[$NLAST]} + 20)) ] && \
-		error "OST $N has less objects vs OST $NLAST (${OBJS[$N]} < ${OBJS[$NLAST]}"
-	    
-	    [ ${OBJS0[$N]} -lt $((${OBJS0[$NLAST]} - 20)) ] && \
-		error "OST $N has less #0 objects vs OST $NLAST (${OBJS0[$N]} < ${OBJS0[$NLAST]}"
-	    [ ${OBJS0[$N]} -gt $((${OBJS0[$NLAST]} + 20)) ] && \
-		error "OST $N has less #0 objects vs OST $NLAST (${OBJS0[$N]} < ${OBJS0[$NLAST]}"
-	    NLAST=$N
-        done
-}
-run_test 51d "check object distribution ===================="
-
-test_52a() {
-	[ -f $DIR/d52a/foo ] && chattr -a $DIR/d52a/foo
-	mkdir -p $DIR/d52a
-	touch $DIR/d52a/foo
-	chattr =a $DIR/d52a/foo || error "chattr =a failed"
-	echo bar >> $DIR/d52a/foo || error "append bar failed"
-	cp /etc/hosts $DIR/d52a/foo && error "cp worked"
-	rm -f $DIR/d52a/foo 2>/dev/null && error "rm worked"
-	link $DIR/d52a/foo $DIR/d52a/foo_link 2>/dev/null && error "link worked"
-	echo foo >> $DIR/d52a/foo || error "append foo failed"
-	mrename $DIR/d52a/foo $DIR/d52a/foo_ren && error "rename worked"
-	lsattr $DIR/d52a/foo | egrep -q "^-+a-+ $DIR/d52a/foo" || error "lsattr"
-	chattr -a $DIR/d52a/foo || error "chattr -a failed"
-
-	rm -fr $DIR/d52a || error "cleanup rm failed"
-}
-run_test 52a "append-only flag test (should return errors) ====="
-
-test_52b() {
-	[ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo
-	mkdir -p $DIR/d52b
-	touch $DIR/d52b/foo
-	chattr =i $DIR/d52b/foo || error
-	cat test > $DIR/d52b/foo && error
-	cp /etc/hosts $DIR/d52b/foo && error
-	rm -f $DIR/d52b/foo 2>/dev/null && error
-	link $DIR/d52b/foo $DIR/d52b/foo_link 2>/dev/null && error
-	echo foo >> $DIR/d52b/foo && error
-	mrename $DIR/d52b/foo $DIR/d52b/foo_ren && error
-	[ -f $DIR/d52b/foo ] || error
-	[ -f $DIR/d52b/foo_ren ] && error
-	lsattr $DIR/d52b/foo | egrep -q "^-+i-+ $DIR/d52b/foo" || error
-	chattr -i $DIR/d52b/foo || error
-
-	rm -fr $DIR/d52b || error
-}
-run_test 52b "immutable flag test (should return errors) ======="
-
-test_52c() { # 12848 simulating client < 1.4.7
-        [ -f $DIR/d52c/foo ] && chattr -i $DIR/d52b/foo
-        mkdir -p $DIR/d52c
-        touch $DIR/d52c/foo
-        # skip MDS_BFLAG_EXT_FLAGS in mdc_getattr_pack
-#define OBD_FAIL_MDC_OLD_EXT_FLAGS       0x802
-        sysctl -w lustre.fail_loc=0x802
-        chattr =i $DIR/d52c/foo || error
-        lsattr $DIR/d52c/foo | egrep -q "^-+i-+ $DIR/d52c/foo" || error
-        chattr -i $DIR/d52c/foo || error
-        sysctl -w lustre.fail_loc=0
-
-        rm -fr $DIR/d52c || error
-}
-run_test 52c "immutable flag test for client < 1.4.7 ======="
-
-test_53() {
-	remote_mds && skip "remote MDS" && return
-	
-	for VALUE in `lctl get_param osc.*-osc.prealloc_last_id`; do
-		param=`echo ${VALUE[0]} | cut -d "=" -f1`;
-		ostname=`echo $param | cut -d "." -f2 | cut -d - -f 1-2`
-		mds_last=`lctl get_param -n $param`
-		ost_last=`lctl get_param -n obdfilter.$ostname.last_id`
-		echo "$ostname.last_id=$ost_last ; MDS.last_id=$mds_last"
-		if [ $ost_last != $mds_last ]; then
-			error "$ostname.last_id=$ost_last ; MDS.last_id=$mds_last"
-		fi
-	done
-}
-run_test 53 "verify that MDS and OSTs agree on pre-creation ===="
-
-test_54a() {
-        [ ! -f "$SOCKETSERVER" ] && skip "no socketserver, skipping" && return
-        [ ! -f "$SOCKETCLIENT" ] && skip "no socketclient, skipping" && return
-     	$SOCKETSERVER $DIR/socket
-     	$SOCKETCLIENT $DIR/socket || error
-      	$MUNLINK $DIR/socket
-}
-run_test 54a "unix domain socket test =========================="
-
-test_54b() {
-	f="$DIR/f54b"
-	mknod $f c 1 3
-	chmod 0666 $f
-	dd if=/dev/zero of=$f bs=`page_size` count=1 
-}
-run_test 54b "char device works in lustre ======================"
-
-find_loop_dev() {
-	[ -b /dev/loop/0 ] && LOOPBASE=/dev/loop/
-	[ -b /dev/loop0 ] && LOOPBASE=/dev/loop
-	[ -z "$LOOPBASE" ] && echo "/dev/loop/0 and /dev/loop0 gone?" && return
-
-	for i in `seq 3 7`; do
-		losetup $LOOPBASE$i > /dev/null 2>&1 && continue
-		LOOPDEV=$LOOPBASE$i
-		LOOPNUM=$i
-		break
-	done
-}
-
-test_54c() {
-	tfile="$DIR/f54c"
-	tdir="$DIR/d54c"
-	loopdev="$DIR/loop54c"
-
-	find_loop_dev 
-	[ -z "$LOOPNUM" ] && echo "couldn't find empty loop device" && return
-	mknod $loopdev b 7 $LOOPNUM
-	echo "make a loop file system with $tfile on $loopdev ($LOOPNUM)..."
-	dd if=/dev/zero of=$tfile bs=`page_size` seek=1024 count=1 > /dev/null
-	losetup $loopdev $tfile || error "can't set up $loopdev for $tfile"
-	mkfs.ext2 $loopdev || error "mke2fs on $loopdev"
-	mkdir -p $tdir
-	mount -t ext2 $loopdev $tdir || error "error mounting $loopdev on $tdir"
-	dd if=/dev/zero of=$tdir/tmp bs=`page_size` count=30 || error "dd write"
-	df $tdir
-	dd if=$tdir/tmp of=/dev/zero bs=`page_size` count=30 || error "dd read"
-	$UMOUNT $tdir
-	losetup -d $loopdev
-	rm $loopdev
-}
-run_test 54c "block device works in lustre ====================="
-
-test_54d() {
-	f="$DIR/f54d"
-	string="aaaaaa"
-	mknod $f p
-	[ "$string" = `echo $string > $f | cat $f` ] || error
-}
-run_test 54d "fifo device works in lustre ======================"
-
-test_54e() {
-	check_kernel_version 46 || return 0
-	f="$DIR/f54e"
-	string="aaaaaa"
-	cp -aL /dev/console $f
-	echo $string > $f || error
-}
-run_test 54e "console/tty device works in lustre ======================"
-
-check_fstype() {
-	grep -q $FSTYPE /proc/filesystems && return 1
-	modprobe $FSTYPE
-	grep -q $FSTYPE /proc/filesystems && return 1
-	insmod ../$FSTYPE/$FSTYPE.o
-	grep -q $FSTYPE /proc/filesystems && return 1
-	insmod ../$FSTYPE/$FSTYPE.ko
-	grep -q $FSTYPE /proc/filesystems && return 1
-	return 0
-}
-
-test_55() {
-        rm -rf $DIR/d55
-        mkdir $DIR/d55
-        check_fstype && skip "can't find fs $FSTYPE" && return
-        mount -t $FSTYPE -o loop,iopen $EXT2_DEV $DIR/d55 || error "mounting"
-        touch $DIR/d55/foo
-        $IOPENTEST1 $DIR/d55/foo $DIR/d55 || error "running $IOPENTEST1"
-        $IOPENTEST2 $DIR/d55 || error "running $IOPENTEST2"
-        echo "check for $EXT2_DEV. Please wait..."
-        rm -rf $DIR/d55/*
-        $UMOUNT $DIR/d55 || error "unmounting"
-}
-run_test 55 "check iopen_connect_dentry() ======================"
-
-test_56() {
-        rm -rf $DIR/d56
-        $SETSTRIPE -d $DIR
-        mkdir $DIR/d56
-        mkdir $DIR/d56/dir
-        NUMFILES=3
-        NUMFILESx2=$(($NUMFILES * 2))
-        for i in `seq 1 $NUMFILES` ; do
-                touch $DIR/d56/file$i
-                touch $DIR/d56/dir/file$i
-        done
-
-        # test lfs getstripe with --recursive
-        FILENUM=`$GETSTRIPE --recursive $DIR/d56 | grep -c obdidx`
-        [ $FILENUM -eq $NUMFILESx2 ] || error \
-                "lfs getstripe --recursive $DIR/d56 wrong: found $FILENUM, expected $NUMFILESx2"
-        FILENUM=`$GETSTRIPE $DIR/d56 | grep -c obdidx`
-        [ $FILENUM -eq $NUMFILES ] || error \
-                "lfs getstripe $DIR/d56 without --recursive wrong: found $FILENUM, expected $NUMFILES"
-        echo "lfs getstripe --recursive passed."
-
-        # test lfs getstripe with file instead of dir
-        FILENUM=`$GETSTRIPE $DIR/d56/file1 | grep -c obdidx`
-        [ $FILENUM  -eq 1 ] || error \
-                 "lfs getstripe $DIR/d56/file1 wrong:found $FILENUM, expected 1"
-        echo "lfs getstripe file passed."
-
-        #test lfs getstripe with --verbose
-        [ `$GETSTRIPE --verbose $DIR/d56 | grep -c lmm_magic` -eq $NUMFILES ] ||\
-                error "lfs getstripe --verbose $DIR/d56 wrong: should find $NUMFILES lmm_magic info"
-        [ `$GETSTRIPE $DIR/d56 | grep -c lmm_magic` -eq 0 ] || error \
-                "lfs getstripe $DIR/d56 without --verbose wrong: should not show lmm_magic info"
-        echo "lfs getstripe --verbose passed."
-
-        #test lfs getstripe with --obd
-        $GETSTRIPE --obd wrong_uuid $DIR/d56 2>&1 | grep -q "unknown obduuid" || \
-                error "lfs getstripe --obd wrong_uuid should return error message"
-
-        [  "$OSTCOUNT" -lt 2 ] && \
-                skip "skipping other lfs getstripe --obd test" && return
-        FILENUM=`$GETSTRIPE --recursive $DIR/d56 | sed -n '/^[	 ]*1[	 ]/p' | wc -l`
-        OBDUUID=`$GETSTRIPE --recursive $DIR/d56 | sed -n '/^[	 ]*1:/p' | awk '{print $2}'`
-        FOUND=`$GETSTRIPE -r --obd $OBDUUID $DIR/d56 | wc -l`
-        [ $FOUND -eq $FILENUM ] || \
-                error "lfs getstripe --obd wrong: found $FOUND, expected $FILENUM"
-        [ `$GETSTRIPE -r -v --obd $OBDUUID $DIR/d56 | sed '/^[	 ]*1[	 ]/d' |\
-                sed -n '/^[	 ]*[0-9][0-9]*[	 ]/p' | wc -l` -eq 0 ] || \
-                error "lfs getstripe --obd wrong: should not show file on other obd"
-        echo "lfs getstripe --obd passed."
-}
-run_test 56 "check lfs getstripe ===================================="
-
-NUMFILES=3
-NUMDIRS=3
-setup_56() {
-        LOCAL_NUMFILES=$1
-        LOCAL_NUMDIRS=$2
-        if [ ! -d "$DIR/${tdir}g" ] ; then
-                mkdir -p $DIR/${tdir}g
-                for i in `seq 1 $LOCAL_NUMFILES` ; do
-                        touch $DIR/${tdir}g/file$i
-                done
-                for i in `seq 1 $LOCAL_NUMDIRS` ; do
-                        mkdir $DIR/${tdir}g/dir$i
-                        for j in `seq 1 $LOCAL_NUMFILES` ; do
-                                touch $DIR/${tdir}g/dir$i/file$j
-                        done
-                done
-        fi
-}
-
-setup_56_special() {
-	LOCAL_NUMFILES=$1
-	LOCAL_NUMDIRS=$2
-	TDIR=$DIR/${tdir}g
-	setup_56 $1 $2
-	if [ ! -e "$TDIR/loop1b" ] ; then
-		for i in `seq 1 $LOCAL_NUMFILES` ; do
-			mknod $TDIR/loop${i}b b 7 $i
-			mknod $TDIR/null${i}c c 1 3
-			ln -s $TDIR/file1 $TDIR/link${i}l
-		done
-		for i in `seq 1 $LOCAL_NUMDIRS` ; do
-			mknod $TDIR/dir$i/loop${i}b b 7 $i
-			mknod $TDIR/dir$i/null${i}c c 1 3
-			ln -s $TDIR/dir$i/file1 $TDIR/dir$i/link${i}l
-		done
-	fi
-}
-
-test_56g() {
-        $LSTRIPE -d $DIR
-
-        setup_56 $NUMFILES $NUMDIRS
-
-        EXPECTED=$(($NUMDIRS + 2))
-        # test lfs find with -name
-        for i in `seq 1 $NUMFILES` ; do
-                NUMS=`$LFIND -name "*$i" $DIR/${tdir}g | wc -l`
-                [ $NUMS -eq $EXPECTED ] || error \
-                        "lfs find -name \"*$i\" $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-        done
-        echo "lfs find -name passed."
-}
-run_test 56g "check lfs find -name ============================="
-
-test_56h() {
-        $LSTRIPE -d $DIR
-
-        setup_56 $NUMFILES $NUMDIRS
-
-        EXPECTED=$((($NUMDIRS+1)*($NUMFILES-1)+$NUMFILES))
-        # test lfs find with ! -name
-        for i in `seq 1 $NUMFILES` ; do
-                NUMS=`$LFIND ! -name "*$i" $DIR/${tdir}g | wc -l`
-                [ $NUMS -eq $EXPECTED ] || error \
-                        "lfs find ! -name \"*$i\" $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-        done
-        echo "lfs find ! -name passed."
-}
-run_test 56h "check lfs find ! -name ============================="
-
-test_56i() {
-       tdir=${tdir}i
-       mkdir -p $DIR/$tdir
-       UUID=`$GETSTRIPE $DIR/$tdir | awk '/0: / { print $2 }'`
-       OUT="`$LFIND -ost $UUID $DIR/$tdir`"
-       [ "$OUT" ] && error "$LFIND returned directory '$OUT'" || true
-}
-run_test 56i "check 'lfs find -ost UUID' skips directories ======="
-
-test_56j() {
-	setup_56_special $NUMFILES $NUMDIRS
-
-	EXPECTED=$((NUMDIRS+1))
-	NUMS=`$LFIND -type d $DIR/${tdir}g | wc -l`
-	[ $NUMS -eq $EXPECTED ] || \
-		error "lfs find -type d $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-}
-run_test 56j "check lfs find -type d ============================="
-
-test_56k() {
-	setup_56_special $NUMFILES $NUMDIRS
-
-	EXPECTED=$(((NUMDIRS+1) * NUMFILES))
-	NUMS=`$LFIND -type f $DIR/${tdir}g | wc -l`
-	[ $NUMS -eq $EXPECTED ] || \
-		error "lfs find -type f $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-}
-run_test 56k "check lfs find -type f ============================="
-
-test_56l() {
-	setup_56_special $NUMFILES $NUMDIRS
-
-	EXPECTED=$((NUMDIRS + NUMFILES))
-	NUMS=`$LFIND -type b $DIR/${tdir}g | wc -l`
-	[ $NUMS -eq $EXPECTED ] || \
-		error "lfs find -type b $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-}
-run_test 56l "check lfs find -type b ============================="
-
-test_56m() {
-	setup_56_special $NUMFILES $NUMDIRS
-
-	EXPECTED=$((NUMDIRS + NUMFILES))
-	NUMS=`$LFIND -type c $DIR/${tdir}g | wc -l`
-	[ $NUMS -eq $EXPECTED ] || \
-		error "lfs find -type c $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-}
-run_test 56m "check lfs find -type c ============================="
-
-test_56n() {
-	setup_56_special $NUMFILES $NUMDIRS
-
-	EXPECTED=$((NUMDIRS + NUMFILES))
-	NUMS=`$LFIND -type l $DIR/${tdir}g | wc -l`
-	[ $NUMS -eq $EXPECTED ] || \
-		error "lfs find -type l $DIR/${tdir}g wrong: found $NUMS, expected $EXPECTED"
-}
-run_test 56n "check lfs find -type l ============================="
-
-test_56o() {
-	setup_56 $NUMFILES $NUMDIRS
-	TDIR=$DIR/${tdir}g
-
-	utime $TDIR/file1 > /dev/null || error
-	utime $TDIR/file2 > /dev/null || error
-	utime $TDIR/dir1 > /dev/null || error
-	utime $TDIR/dir2 > /dev/null || error
-	utime $TDIR/dir1/file1 > /dev/null || error
-
-	EXPECTED=5
-	NUMS=`$LFIND -mtime +1 $TDIR | wc -l`
-	[ $NUMS -eq $EXPECTED ] || \
-		error "lfs find -mtime $TDIR wrong: found $NUMS, expected $EXPECTED"
-}
-run_test 56o "check lfs find -mtime for old files =========================="
-
-test_57a() {
-	remote_mds && skip "remote MDS" && return
-	local MNTDEV="mds.*.mntdev"
-	DEV=$(lctl get_param -n $MNTDEV)
-	[ -z "$DEV" ] && error "can't access $MNTDEV" 
-	for DEV in `lctl get_param -n $MNTDEV`; do
-		dumpe2fs -h $DEV > $TMP/t57a.dump || error "can't access $DEV"
-		DEVISIZE=`awk '/Inode size:/ { print $3 }' $TMP/t57a.dump`
-		[ "$DEVISIZE" -gt 128 ] || error "inode size $DEVISIZE"
-		rm $TMP/t57a.dump
-	done
-}
-run_test 57a "verify MDS filesystem created with large inodes =="
-
-test_57b() {
-	FILECOUNT=100
-	FILE1=$DIR/d57b/f1
-	FILEN=$DIR/d57b/f$FILECOUNT
-	rm -rf $DIR/d57b || error "removing $DIR/d57b"
-	mkdir -p $DIR/d57b || error "creating $DIR/d57b"
-	echo "mcreating $FILECOUNT files"
-	createmany -m $DIR/d57b/f 1 $FILECOUNT || \
-		error "creating files in $DIR/d57b"
-
-	# verify that files do not have EAs yet
-	$GETSTRIPE $FILE1 2>&1 | grep -q "no stripe" || error "$FILE1 has an EA"
-	$GETSTRIPE $FILEN 2>&1 | grep -q "no stripe" || error "$FILEN has an EA"
-
-	MDSFREE="`lctl get_param -n mds.*.kbytesfree 2> /dev/null`"
-	MDCFREE="`lctl get_param -n mdc.*.kbytesfree | head -n 1`"
-	echo "opening files to create objects/EAs"
-	for FILE in `seq -f $DIR/d57b/f%g 1 $FILECOUNT`; do
-		$OPENFILE -f O_RDWR $FILE > /dev/null || error "opening $FILE"
-	done
-
-	# verify that files have EAs now
-	$GETSTRIPE $FILE1 | grep -q "obdidx" || error "$FILE1 missing EA"
-	$GETSTRIPE $FILEN | grep -q "obdidx" || error "$FILEN missing EA"
-
-	sleep 1 # make sure we get new statfs data
-	MDSFREE2="`lctl get_param -n mds.*.kbytesfree 2> /dev/null`"
-	MDCFREE2="`lctl get_param -n mdc.*.kbytesfree | head -n 1`"
-	if [ "$MDCFREE2" -lt "$((MDCFREE - 8))" ]; then
-		if [ "$MDSFREE" != "$MDSFREE2" ]; then
-			error "MDC before $MDCFREE != after $MDCFREE2"
-		else
-			echo "MDC before $MDCFREE != after $MDCFREE2"
-			echo "unable to confirm if MDS has large inodes"
-		fi
-	fi
-	rm -rf $DIR/d57b
-}
-run_test 57b "default LOV EAs are stored inside large inodes ==="
-
-test_58() {
-    [ -z "$(which wiretest 2>/dev/null)" ] && skip "could not find wiretest" && return
-    wiretest
-}
-run_test 58 "verify cross-platform wire constants =============="
-
-test_59() {
-	echo "touch 130 files"
-	createmany -o $DIR/f59- 130
-	echo "rm 130 files"
-	unlinkmany $DIR/f59- 130
-	sync
-	sleep 2
-        # wait for commitment of removal
-}
-run_test 59 "verify cancellation of llog records async ========="
-
-TEST60_HEAD="test_60 run $RANDOM"
-test_60() {
-        [ ! -f run-llog.sh ] && skip "missing subtest run-llog.sh" && return
-	log "$TEST60_HEAD - from kernel mode"
-	sh run-llog.sh
-}
-run_test 60 "llog sanity tests run from kernel module =========="
-
-test_60b() { # bug 6411
-	dmesg > $DIR/$tfile
-	LLOG_COUNT=`dmesg | awk "/$TEST60_HEAD/{marker = 1; from_marker = 0;}
-				 /llog.test/ {
-					 if (marker)
-						 from_marker++
-					 from_begin++
-				 }
-				 END {
-					 if (marker)
-						 print from_marker
-					 else
-						 print from_begin
-				 }"`
-	[ $LLOG_COUNT -gt 50 ] && error "CDEBUG_LIMIT not limiting messages ($LLOG_COUNT)"|| true
-}
-run_test 60b "limit repeated messages from CERROR/CWARN ========"
-
-test_60c() {
-	echo "create 5000 files" 
-	createmany -o $DIR/f60c- 5000
-	#define OBD_FAIL_MDS_LLOG_CREATE_FAILED  0x137
-	sysctl -w lustre.fail_loc=0x80000137
-	unlinkmany $DIR/f60c- 5000
-}
-run_test 60c "unlink file when mds full"
-
-test_60d() {
-	SAVEPRINTK=$(sysctl -n lnet.printk)
-
-	# verify "lctl mark" is even working"
-	MESSAGE="test message ID $RANDOM $$"
-	$LCTL mark "$MESSAGE" || error "$LCTL mark failed"
-	dmesg | grep -q "$MESSAGE" || error "didn't find debug marker in log"
-
-	sysctl -w lnet.printk=0 || error "set lnet.printk failed"
-	sysctl -n lnet.printk | grep emerg || error "lnet.printk dropped emerg"
-
-	MESSAGE="new test message ID $RANDOM $$"
-	# Assume here that libcfs_debug_mark_buffer() uses D_WARNING
-	$LCTL mark "$MESSAGE" || error "$LCTL mark failed"
-	dmesg | grep -q "$MESSAGE" && error "D_WARNING wasn't masked" || true
-
-	sysctl -w lnet.printk="$SAVEPRINTK"
-}
-run_test 60d "test printk console message masking"
-
-test_61() {
-	f="$DIR/f61"
-	dd if=/dev/zero of=$f bs=`page_size` count=1
-	cancel_lru_locks osc
-	multiop $f OSMWUc || error
-	sync
-}
-run_test 61 "mmap() writes don't make sync hang ================"
-
-# bug 2330 - insufficient obd_match error checking causes LBUG
-test_62() {
-        f="$DIR/f62"
-        echo foo > $f
-        cancel_lru_locks osc
-        #define OBD_FAIL_OSC_MATCH 0x405
-        sysctl -w lustre.fail_loc=0x405
-        cat $f && error "cat succeeded, expect -EIO"
-        sysctl -w lustre.fail_loc=0
-}
-# This test is now irrelevant (as of bug 10718 inclusion), we no longer
-# match every page all of the time.
-#run_test 62 "verify obd_match failure doesn't LBUG (should -EIO)"
-
-# bug 2319 - oig_wait() interrupted causes crash because of invalid waitq.
-test_63() {
-	MAX_DIRTY_MB=`lctl get_param -n osc.*.max_dirty_mb | head -n 1`
-	lctl set_param -n osc.*.max_dirty_mb 0
-	for i in `seq 10` ; do
-		dd if=/dev/zero of=$DIR/f63 bs=8k &
-		sleep 5
-		kill $!
-		sleep 1
-	done
-
-	lctl set_param -n osc.*.max_dirty_mb $MAX_DIRTY_MB
-	rm -f $DIR/f63 || true
-}
-run_test 63 "Verify oig_wait interruption does not crash ======="
-
-# bug 2248 - async write errors didn't return to application on sync
-# bug 3677 - async write errors left page locked
-test_63b() {
-	debugsave
-	sysctl -w lnet.debug=-1
-
-	# ensure we have a grant to do async writes
-	dd if=/dev/zero of=$DIR/$tfile bs=4k count=1
-	rm $DIR/$tfile
-
-	#define OBD_FAIL_OSC_BRW_PREP_REQ 0x406
-	sysctl -w lustre.fail_loc=0x80000406
-	multiop $DIR/$tfile Owy && \
-		error "sync didn't return ENOMEM"
-	sync; sleep 2; sync	# do a real sync this time to flush page
-	lctl get_param -n llite.*.dump_page_cache | grep locked && \
-		error "locked page left in cache after async error" || true
-	debugrestore
-}
-run_test 63b "async write errors should be returned to fsync ==="
-
-test_64a () {
-	df $DIR
-	lctl get_param -n osc.*[oO][sS][cC][_-]*.cur* | grep "[0-9]"
-}
-run_test 64a "verify filter grant calculations (in kernel) ====="
-
-test_64b () {
-        [ ! -f oos.sh ] && skip "missing subtest oos.sh" && return
-	sh oos.sh $MOUNT
-}
-run_test 64b "check out-of-space detection on client ==========="
-
-# bug 1414 - set/get directories' stripe info
-test_65a() {
-	mkdir -p $DIR/d65
-	touch $DIR/d65/f1
-	$LVERIFY $DIR/d65 $DIR/d65/f1 || error "lverify failed"
-}
-run_test 65a "directory with no stripe info ===================="
-
-test_65b() {
-	mkdir -p $DIR/d65
-	$SETSTRIPE $DIR/d65 -s $(($STRIPESIZE * 2)) -i 0 -c 1 || error "setstripe"
-	touch $DIR/d65/f2
-	$LVERIFY $DIR/d65 $DIR/d65/f2 || error "lverify failed"
-}
-run_test 65b "directory setstripe $(($STRIPESIZE * 2)) 0 1 ==============="
-
-test_65c() {
-	if [ $OSTCOUNT -gt 1 ]; then
-		mkdir -p $DIR/d65
-    		$SETSTRIPE $DIR/d65 -s $(($STRIPESIZE * 4)) -i 1 \
-			-c $(($OSTCOUNT - 1)) || error "setstripe"
-		touch $DIR/d65/f3
-		$LVERIFY $DIR/d65 $DIR/d65/f3 || error "lverify failed"
-	fi
-}
-run_test 65c "directory setstripe $(($STRIPESIZE * 4)) 1 $(($OSTCOUNT - 1))"
-
-test_65d() {
-	mkdir -p $DIR/d65
-	[ $STRIPECOUNT -le 0 ] && sc=1 || sc=$(($STRIPECOUNT - 1))
-	$SETSTRIPE $DIR/d65 -s $STRIPESIZE -c $sc || error "setstripe"
-	touch $DIR/d65/f4 $DIR/d65/f5
-	$LVERIFY $DIR/d65 $DIR/d65/f4 $DIR/d65/f5 || error "lverify failed"
-}
-run_test 65d "directory setstripe $STRIPESIZE -1 stripe_count =============="
-
-test_65e() {
-	mkdir -p $DIR/d65
-
-	$SETSTRIPE $DIR/d65 || error "setstripe"
-        $GETSTRIPE -v $DIR/d65 | grep "Default" || error "no stripe info failed"
-	touch $DIR/d65/f6
-	$LVERIFY $DIR/d65 $DIR/d65/f6 || error "lverify failed"
-}
-run_test 65e "directory setstripe 0 -1 0 ======================="
-
-test_65f() {
-	mkdir -p $DIR/d65f
-	$RUNAS $SETSTRIPE $DIR/d65f && error "setstripe succeeded" || true
-}
-run_test 65f "dir setstripe permission (should return error) ==="
-
-test_65g() {
-        mkdir -p $DIR/d65
-        $SETSTRIPE $DIR/d65 -s $(($STRIPESIZE * 2)) -i 0 -c 1 || error "setstripe"
-        $SETSTRIPE -d $DIR/d65 || error "setstripe"
-        $GETSTRIPE -v $DIR/d65 | grep "Default" || \
-		error "delete default stripe failed"
-}
-run_test 65g "directory setstripe -d ==========================="
-
-test_65h() {
-        mkdir -p $DIR/d65
-        $SETSTRIPE $DIR/d65 -s $(($STRIPESIZE * 2)) -i 0 -c 1 || error "setstripe"
-        mkdir -p $DIR/d65/dd1
-        [ "`$GETSTRIPE -v $DIR/d65 | grep "^count"`" == \
-          "`$GETSTRIPE -v $DIR/d65/dd1 | grep "^count"`" ] || error "stripe info inherit failed"
-}
-run_test 65h "directory stripe info inherit ===================="
- 
-test_65i() { # bug6367
-        $SETSTRIPE $MOUNT -s 65536 -c -1 
-}
-run_test 65i "set non-default striping on root directory (bug 6367)="
-
-test_65j() { # bug6367
-	sync; sleep 1
-	# if we aren't already remounting for each test, do so for this test
-	if [ "$CLEANUP" = ":" -a "$I_MOUNTED" = "yes" ]; then
-		cleanup || error "failed to unmount"
-		setup
-	fi
-	$SETSTRIPE -d $MOUNT || error "setstripe failed"
-}
-run_test 65j "set default striping on root directory (bug 6367)="
-
-test_65k() { # bug11679
-        [ "$OSTCOUNT" -lt 2 ] && skip "too few OSTs" && return
-        remote_mds_nodsh && skip "remote MDS" && return
-
-        echo "Check OST status: "
-        MDS_OSCS=`do_facet mds lctl dl | awk '/[oO][sS][cC].*md[ts]/ { print $4 }'`
-        for OSC in $MDS_OSCS; do
-                echo $OSC "is activate"
-                do_facet mds lctl --device %$OSC activate
-        done
-        do_facet client mkdir -p $DIR/$tdir
-        for INACTIVE_OSC in $MDS_OSCS; do
-                echo $INACTIVE_OSC "is Deactivate:"
-                do_facet mds lctl --device  %$INACTIVE_OSC deactivate
-                for STRIPE_OSC in $MDS_OSCS; do
-                        STRIPE_OST=`osc_to_ost $STRIPE_OSC`
-                        STRIPE_INDEX=`do_facet mds lctl get_param -n lov.*md*.target_obd |
-                                      grep $STRIPE_OST | awk -F: '{print $1}'`
-                        echo "$SETSTRIPE $DIR/$tdir/${STRIPE_INDEX} -i ${STRIPE_INDEX} -c 1"
-                        do_facet client $SETSTRIPE $DIR/$tdir/${STRIPE_INDEX} -i ${STRIPE_INDEX} -c 1
-                        RC=$?
-                        [ $RC -ne 0 ] && error "setstripe should have succeeded"
-                done
-                do_facet client rm -f $DIR/$tdir/*
-                echo $INACTIVE_OSC "is Activate."
-                do_facet mds lctl --device  %$INACTIVE_OSC activate
-        done
-}
-run_test 65k "validate manual striping works properly with deactivated OSCs"
-
-test_65l() { # bug 12836
-	mkdir -p $DIR/$tdir
-	$SETSTRIPE $DIR/$tdir -c -1
-	$LFS find -mtime -1 $DIR >/dev/null
-}
-run_test 65l "lfs find on -1 stripe dir ========================"
-
-# bug 2543 - update blocks count on client
-test_66() {
-	COUNT=${COUNT:-8}
-	dd if=/dev/zero of=$DIR/f66 bs=1k count=$COUNT
-	sync; sleep 1; sync
-	BLOCKS=`ls -s $DIR/f66 | awk '{ print $1 }'`
-	[ $BLOCKS -ge $COUNT ] || error "$DIR/f66 blocks $BLOCKS < $COUNT"
-}
-run_test 66 "update inode blocks count on client ==============="
-
-test_67() { # bug 3285 - supplementary group fails on MDS, passes on client
-	[ "$RUNAS_ID" = "$UID" ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-	check_kernel_version 35 || return 0
-	mkdir $DIR/$tdir
-	chmod 771 $DIR/$tdir
-	chgrp $RUNAS_ID $DIR/$tdir
-	$RUNAS -u $RUNAS_ID -g $(($RUNAS_ID + 1)) -G1,2,$RUNAS_ID ls $DIR/$tdir
-	RC=$?
-	GROUP_UPCALL=`lctl get_param -n mds.*.group_upcall`
-	[ "$GROUP_UPCALL" = "NONE" -a $RC -eq 0 ] && \
-		error "no-upcall passed" || true
-	[ "$GROUP_UPCALL" != "NONE" -a $RC -ne 0 ] && \
-		error "upcall failed" || true
-}
-run_test 67 "supplementary group failure (should return error) ="
-
-cleanup_67b() {
-	set +vx
-	trap 0
-	lctl set_param -n mds.$MDS.group_upcall NONE
-}
-
-test_67b() { # bug 3285 - supplementary group fails on MDS, passes on client
-	T67_UID=${T67_UID:-1}	# needs to be in /etc/groups on MDS, gid == uid
-	[ "$UID" = "$T67_UID" ] && skip "UID = T67_UID = $UID -- skipping" && return
-	check_kernel_version 35 || return 0
-	remote_mds && skip "remote MDS" && return
-	GROUP_UPCALL=`lctl get_param -n mds.$MDS.group_upcall`
-	[ "$GROUP_UPCALL" != "NONE" ] && skip "skip test - upcall" &&return
-	set -vx
-	trap cleanup_67b EXIT
-	mkdir -p $DIR/$tdir
-	chmod 771 $DIR/$tdir
-	chgrp $T67_UID $DIR/$tdir
-	lctl set_param -n mds.$MDS.group_upcall `which l_getgroups`
-	l_getgroups -d $T67_UID
-	$RUNAS -u $T67_UID -g 999 -G8,9,$T67_UID touch $DIR/$tdir/$tfile || \
-		error "'touch $DIR/$tdir/$tfile' failed"
-	[ -f $DIR/$tdir/$tfile ] || error "$DIR/$tdir/$tfile create error"
-	cleanup_67b
-}
-run_test 67b "supplementary group test ========================="
-
-LLOOP=
-cleanup_68() {
-	trap 0
-	if [ ! -z "$LLOOP" ]; then
-		swapoff $LLOOP || error "swapoff failed"
-		$LCTL blockdev_detach $LLOOP || error "detach failed"
-		rm -f $LLOOP
-		unset LLOOP
-	fi
-	rm -f $DIR/f68
-}
-
-meminfo() {
-	awk '($1 == "'$1':") { print $2 }' /proc/meminfo
-}
-
-swap_used() {
-	swapon -s | awk '($1 == "'$1'") { print $4 }'
-}
-
-
-# excercise swapping to lustre by adding a high priority swapfile entry
-# and then consuming memory until it is used.
-test_68() {
-	[ "$UID" != 0 ] && skip "must run as root" && return
-	lctl get_param -n devices | grep -q obdfilter && \
-		skip "local OST" && return
-
-	grep -q llite_lloop /proc/modules
-	[ $? -ne 0 ] && skip "can't find module llite_lloop" && return
-
-	[ -z "`$LCTL list_nids | grep -v tcp`" ] && \
-		skip "can't reliably test swap with TCP" && return
-
-	MEMTOTAL=`meminfo MemTotal`
-	NR_BLOCKS=$((MEMTOTAL>>8))
-	[[ $NR_BLOCKS -le 2048 ]] && NR_BLOCKS=2048
-
-	LLOOP=$TMP/lloop.`date +%s`.`date +%N`
-	dd if=/dev/zero of=$DIR/f68 bs=64k seek=$NR_BLOCKS count=1
-	mkswap $DIR/f68
-
-	$LCTL blockdev_attach $DIR/f68 $LLOOP || error "attach failed"
-
-	trap cleanup_68 EXIT
-
-	swapon -p 32767 $LLOOP || error "swapon $LLOOP failed"
-
-	echo "before: `swapon -s | grep $LLOOP`"
-	$MEMHOG $MEMTOTAL || error "error allocating $MEMTOTAL kB"
-	echo "after: `swapon -s | grep $LLOOP`"
-	SWAPUSED=`swap_used $LLOOP`
-
-	cleanup_68
-
-	[ $SWAPUSED -eq 0 ] && echo "no swap used???" || true
-}
-run_test 68 "support swapping to Lustre ========================"
-
-# bug5265, obdfilter oa2dentry return -ENOENT
-# #define OBD_FAIL_OST_ENOENT 0x217
-test_69() {
-	[ $(lctl get_param -n devices |  grep -c obdfilter) -eq 0 ] &&
-		skip "skipping test for remote OST" && return
-
-	f="$DIR/$tfile"
-	touch $f
-
-	$DIRECTIO write ${f}.2 0 1 || error "directio write error"
-
-	#define OBD_FAIL_OST_ENOENT 0x217
-	sysctl -w lustre.fail_loc=0x217
-	truncate $f 1 # vmtruncate() will ignore truncate() error.
-	$DIRECTIO write $f 0 2 && error "write succeeded, expect -ENOENT"
-
-	sysctl -w lustre.fail_loc=0
-	$DIRECTIO write $f 0 2 || error "write error"
-
-	cancel_lru_locks osc
-	$DIRECTIO read $f 0 1 || error "read error"
-
-	#define OBD_FAIL_OST_ENOENT 0x217
-	sysctl -w lustre.fail_loc=0x217
-	$DIRECTIO read $f 1 1 && error "read succeeded, expect -ENOENT"
-
-	sysctl -w lustre.fail_loc=0
-	rm -f $f
-}
-run_test 69 "verify oa2dentry return -ENOENT doesn't LBUG ======"
-
-test_71() {
-	which dbench > /dev/null 2>&1 || { skip "dbench not installed, skip this test" && return 0; }
-	DBENCH_LIB=${DBENCH_LIB:-/usr/lib/dbench}
-	PATH=${DBENCH_LIB}:${PATH}
-	cp `which dbench` $DIR
-
-	TGT=$DIR/client.txt
-	SRC=${SRC:-$DBENCH_LIB/client.txt}
-	[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-	SRC=$DBENCH_LIB/client_plain.txt
-	[ ! -e $TGT -a -e $SRC ] && echo "copying $SRC to $TGT" && cp $SRC $TGT
-	echo "copying necessary libs to $DIR"
-	LIBS71=$(ldd $DIR/dbench|sed -e 's/\t*//' -e 's/.*=> //' -e 's/ .*//' -e 's/^\///')
-	(cd / && tar chf - $LIBS71) | (cd $DIR && tar xvf -)
-	[ $? = 0 ] || error "can't copy libs $LIBS71 to $DIR"
-	echo "chroot $DIR /dbench -c client.txt 2"
-	chroot $DIR /dbench -c client.txt 2
-	RC=$?
-
-	rm -rf $DIR/dbench $DIR/lib $DIR/lib64
-
-	return $RC
-}
-run_test 71 "Running dbench on lustre (don't segment fault) ===="
-
-test_72() { # bug 5695 - Test that on 2.6 remove_suid works properly
-	check_kernel_version 43 || return 0
-	[ "$RUNAS_ID" = "$UID" ] && skip "RUNAS_ID = UID = $UID -- skipping" && return
-
-        # Check that testing environment is properly set up. Skip if not
-        FAIL_ON_ERROR=false check_runas_id_ret $RUNAS_ID $RUNAS || {
-                skip "User $RUNAS_ID does not exist - skipping"
-                return 0
-        }
-	touch $DIR/f72
-	chmod 777 $DIR/f72
-	chmod ug+s $DIR/f72
-	$RUNAS dd if=/dev/zero of=$DIR/f72 bs=512 count=1 || error
-	# See if we are still setuid/sgid
-	test -u $DIR/f72 -o -g $DIR/f72 && error "S/gid is not dropped on write"
-	# Now test that MDS is updated too
-	cancel_lru_locks mdc
-	test -u $DIR/f72 -o -g $DIR/f72 && error "S/gid is not dropped on MDS"
-	true
-}
-run_test 72 "Test that remove suid works properly (bug5695) ===="
-
-# bug 3462 - multiple simultaneous MDC requests
-test_73() {
-	mkdir $DIR/d73-1 
-	mkdir $DIR/d73-2
-	multiop_bg_pause $DIR/d73-1/f73-1 O_c || return 1
-	pid1=$!
-
-	#define OBD_FAIL_MDS_PAUSE_OPEN 0x129
-	sysctl -w lustre.fail_loc=0x80000129
-	multiop $DIR/d73-1/f73-2 Oc &
-	sleep 1
-	sysctl -w lustre.fail_loc=0
-
-	multiop $DIR/d73-2/f73-3 Oc &
-	pid3=$!
-
-	kill -USR1 $pid1
-	wait $pid1 || return 1
-
-	sleep 25
-
-	$CHECKSTAT -t file $DIR/d73-1/f73-1 || return 4
-	$CHECKSTAT -t file $DIR/d73-1/f73-2 || return 5 
-	$CHECKSTAT -t file $DIR/d73-2/f73-3 || return 6 
-
-	rm -rf $DIR/d73-*
-}
-run_test 73 "multiple MDC requests (should not deadlock)"
-
-test_74a() { # bug 6149, 6184
-	#define OBD_FAIL_LDLM_ENQUEUE_OLD_EXPORT 0x30e
-	#
-	# very important to OR with OBD_FAIL_ONCE (0x80000000) -- otherwise it
-	# will spin in a tight reconnection loop
-	touch $DIR/f74a
-	sysctl -w lustre.fail_loc=0x8000030e
-	# get any lock that won't be difficult - lookup works.
-	ls $DIR/f74a
-	sysctl -w lustre.fail_loc=0
-	true
-}
-run_test 74a "ldlm_enqueue freed-export error path, ls (shouldn't LBUG)"
-
-test_74b() { # bug 13310
-	#define OBD_FAIL_LDLM_ENQUEUE_OLD_EXPORT 0x30e
-	#
-	# very important to OR with OBD_FAIL_ONCE (0x80000000) -- otherwise it
-	# will spin in a tight reconnection loop
-	sysctl -w lustre.fail_loc=0x8000030e
-	# get a "difficult" lock
-	touch $DIR/f74b
-	sysctl -w lustre.fail_loc=0
-	true
-}
-run_test 74b "ldlm_enqueue freed-export error path, touch (shouldn't LBUG)"
-
-JOIN=${JOIN:-"lfs join"}
-F75=$DIR/f75
-F128k=${F75}_128k
-FHEAD=${F75}_head
-FTAIL=${F75}_tail
-export T75_PREP=no
-test75_prep() {
-        [ $T75_PREP = "yes" ] && return
-        echo "using F75=$F75, F128k=$F128k, FHEAD=$FHEAD, FTAIL=$FTAIL"
- 
-        dd if=/dev/urandom of=${F75}_128k bs=128k count=1 || error "dd failed"
-        log "finished dd"
-        chmod 777 ${F128k}
-        T75_PREP=yes
-}
- 
-test_75a() {
-        test75_prep
- 
-        cp -p ${F128k} ${FHEAD}
-        log "finished cp to $FHEAD"
-        cp -p ${F128k} ${FTAIL}
-        log "finished cp to $FTAIL"
-        cat ${F128k} ${F128k} > ${F75}_sim_sim
- 
-        $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
-        log "finished join $FHEAD to ${F75}_sim_sim"
-        cmp ${FHEAD} ${F75}_sim_sim || error "${FHEAD} ${F75}_sim_sim differ"
-        log "finished cmp $FHEAD to ${F75}_sim_sim"
-        $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} still exist after join"
-}
-run_test 75a "TEST join file ===================================="
- 
-test_75b() {
-        test75_prep
- 
-        cp -p ${F128k} ${FTAIL}
-        cat ${F75}_sim_sim >> ${F75}_join_sim
-        cat ${F128k} >> ${F75}_join_sim
-        $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
-        cmp ${FHEAD} ${F75}_join_sim || \
-                error "${FHEAD} ${F75}_join_sim are different"
-        $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join"
-}
-run_test 75b "TEST join file 2 =================================="
- 
-test_75c() {
-        test75_prep
- 
-        cp -p ${F128k} ${FTAIL}
-        cat ${F128k} >> ${F75}_sim_join
-        cat ${F75}_join_sim >> ${F75}_sim_join
-        $JOIN ${FTAIL} ${FHEAD} || error "join error"
-        cmp ${FTAIL} ${F75}_sim_join || \
-                error "${FTAIL} ${F75}_sim_join are different"
-        $CHECKSTAT -a ${FHEAD} || error "tail ${FHEAD} exist after join"
-}
-run_test 75c "TEST join file 3 =================================="
- 
-test_75d() {
-        test75_prep
- 
-        cp -p ${F128k} ${FHEAD}
-        cp -p ${F128k} ${FHEAD}_tmp
-        cat ${F75}_sim_sim >> ${F75}_join_join
-        cat ${F75}_sim_join >> ${F75}_join_join
-        $JOIN ${FHEAD} ${FHEAD}_tmp || error "join ${FHEAD} ${FHEAD}_tmp error"
-        $JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
-        cmp ${FHEAD} ${F75}_join_join ||error "${FHEAD} ${F75}_join_join differ"        $CHECKSTAT -a ${FHEAD}_tmp || error "${FHEAD}_tmp exist after join"
-        $CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join (2)"
-}
-run_test 75d "TEST join file 4 =================================="
- 
-test_75e() {
-        test75_prep
- 
-        rm -rf ${FHEAD} || "delete join file error"
-}
-run_test 75e "TEST join file 5 (remove joined file) ============="
- 
-test_75f() {
-        test75_prep
- 
-        cp -p ${F128k} ${F75}_join_10_compare
-        cp -p ${F128k} ${F75}_join_10
-        for ((i = 0; i < 10; i++)); do
-                cat ${F128k} >> ${F75}_join_10_compare
-                cp -p ${F128k} ${FTAIL}
-                $JOIN ${F75}_join_10 ${FTAIL} || \
-                        error "join ${F75}_join_10 ${FTAIL} error"
-                $CHECKSTAT -a ${FTAIL} || error "tail file exist after join"
-        done
-        cmp ${F75}_join_10 ${F75}_join_10_compare || \
-                error "files ${F75}_join_10 ${F75}_join_10_compare differ"
-}
-run_test 75f "TEST join file 6 (join 10 files) =================="
- 
-test_75g() {
-        [ ! -f ${F75}_join_10 ] && echo "${F75}_join_10 missing" && return
-        $LFS getstripe ${F75}_join_10
- 
-        $OPENUNLINK ${F75}_join_10 ${F75}_join_10 || error "files unlink open"
- 
-        ls -l $F75*
-}
-run_test 75g "TEST join file 7 (open unlink) ===================="
-
-num_inodes() {
-	awk '/lustre_inode_cache/ {print $2; exit}' /proc/slabinfo
-}
-
-test_76() { # bug 1443
-	DETH=$(grep deathrow /proc/kallsyms /proc/ksyms 2> /dev/null | wc -l)
-	[ $DETH -eq 0 ] && skip "No _iget." && return 0
-	BEFORE_INODES=`num_inodes`
-	echo "before inodes: $BEFORE_INODES"
-	local COUNT=1000
-	[ "$SLOW" = "no" ] && COUNT=100
-	for i in `seq $COUNT`; do
-		touch $DIR/$tfile
-		rm -f $DIR/$tfile
-	done
-	AFTER_INODES=`num_inodes`
-	echo "after inodes: $AFTER_INODES"
-	[ $AFTER_INODES -gt $((BEFORE_INODES + 32)) ] && \
-		error "inode slab grew from $BEFORE_INODES to $AFTER_INODES"
-	true
-}
-run_test 76 "destroy duplicate inodes in client inode cache ===="
-
-export ORIG_CSUM=""
-set_checksums()
-{
-	[ "$ORIG_CSUM" ] || ORIG_CSUM=`lctl get_param -n osc.*.checksums |
-				       head -n1`
-	for f in $LPROC/osc/*/checksums; do
-		echo $1 >> $f
-	done
-	return 0
-}
-
-export ORIG_CSUM_TYPE=""
-CKSUM_TYPES=${CKSUM_TYPES:-"crc32 adler"}
-set_checksum_type()
-{
-	[ "$ORIG_CSUM_TYPE" ] || \
-		ORIG_CSUM_TYPE=`lctl get_param -n osc.*osc-[^mM]*.checksum_type | sed 's/.*\[\(.*\)\].*/\1/g' \
-	                        | head -n1`
-	lctl set_param -n osc.*osc-*.checksum_type $1
-	log "set checksum type to $1"
-	return 0
-}
-F77_TMP=$TMP/f77-temp
-F77SZ=8
-setup_f77() {
-	dd if=/dev/urandom of=$F77_TMP bs=1M count=$F77SZ || \
-		error "error writing to $F77_TMP"
-}
-
-test_77a() { # bug 10889
-	[ ! -f $F77_TMP ] && setup_f77
-	set_checksums 1
-	dd if=$F77_TMP of=$DIR/$tfile bs=1M count=$F77SZ || error "dd error"
-	set_checksums 0
-}
-run_test 77a "normal checksum read/write operation ============="
-
-test_77b() { # bug 10889
-	[ ! -f $F77_TMP ] && setup_f77
-	#define OBD_FAIL_OSC_CHECKSUM_SEND       0x409
-	sysctl -w lustre.fail_loc=0x80000409
-	set_checksums 1
-	dd if=$F77_TMP of=$DIR/f77b bs=1M count=$F77SZ conv=sync || \
-		error "dd error: $?"
-	sysctl -w lustre.fail_loc=0
-	set_checksums 0
-}
-run_test 77b "checksum error on client write ===================="
-
-test_77c() { # bug 10889
-	[ ! -f $DIR/f77b ] && skip "requires 77b - skipping" && return  
-	set_checksums 1
-	for algo in $CKSUM_TYPES; do
-		cancel_lru_locks osc
-		set_checksum_type $algo
-		#define OBD_FAIL_OSC_CHECKSUM_RECEIVE    0x408
-		sysctl -w lustre.fail_loc=0x80000408
-		cmp $F77_TMP $DIR/f77b || error "file compare failed"
-		sysctl -w lustre.fail_loc=0
-	done
-	set_checksums 0
-	set_checksum_type $ORIG_CSUM_TYPE
-}
-run_test 77c "checksum error on client read ==================="
-
-test_77d() { # bug 10889
-	#define OBD_FAIL_OSC_CHECKSUM_SEND       0x409
-	sysctl -w lustre.fail_loc=0x80000409
-	set_checksums 1
-	directio write $DIR/f77 0 $F77SZ $((1024 * 1024)) || \
-		error "direct write: rc=$?"
-	sysctl -w lustre.fail_loc=0
-	set_checksums 0
-}
-run_test 77d "checksum error on OST direct write ==============="
-
-test_77e() { # bug 10889
-	[ ! -f $DIR/f77 ] && skip "requires 77d - skipping" && return  
-	#define OBD_FAIL_OSC_CHECKSUM_RECEIVE    0x408
-	sysctl -w lustre.fail_loc=0x80000408
-	set_checksums 1
-	cancel_lru_locks osc
-	directio read $DIR/f77 0 $F77SZ $((1024 * 1024)) || \
-		error "direct read: rc=$?"
-	sysctl -w lustre.fail_loc=0
-	set_checksums 0
-}
-run_test 77e "checksum error on OST direct read ================"
-
-test_77f() { # bug 10889
-	set_checksums 1
-	for algo in $CKSUM_TYPES; do
-		cancel_lru_locks osc
-		set_checksum_type $algo
-		#define OBD_FAIL_OSC_CHECKSUM_SEND       0x409
-		sysctl -w lustre.fail_loc=0x409
-		directio write $DIR/f77 0 $F77SZ $((1024 * 1024)) && \
-			error "direct write succeeded"
-		sysctl -w lustre.fail_loc=0
-	done
-	set_checksum_type $ORIG_CSUM_TYPE
-	set_checksums 0
-}
-run_test 77f "repeat checksum error on write (expect error) ===="
-
-test_77g() { # bug 10889
-	[ $(lctl get_param -n devices | grep -c obdfilter) -eq 0 ] && \
-		skip "remote OST" && return
-	[ ! -f $F77_TMP ] && setup_f77
-	#define OBD_FAIL_OST_CHECKSUM_RECEIVE       0x21a
-	sysctl -w lustre.fail_loc=0x8000021a
-	set_checksums 1
-	dd if=$F77_TMP of=$DIR/f77g bs=1M count=$F77SZ || \
-		error "write error: rc=$?"
-	sysctl -w lustre.fail_loc=0
-	set_checksums 0
-}
-run_test 77g "checksum error on OST write ======================"
-
-test_77h() { # bug 10889
-	[ $(lctl get_param -n devices | grep -c obdfilter) -eq 0 ] && \
-		skip "remote OST" && return
-	[ ! -f $DIR/f77g ] && skip "requires 77g - skipping" && return  
-	cancel_lru_locks osc
-	#define OBD_FAIL_OST_CHECKSUM_SEND          0x21b
-	sysctl -w lustre.fail_loc=0x8000021b
-	set_checksums 1
-	cmp $F77_TMP $DIR/f77g || error "file compare failed"
-	sysctl -w lustre.fail_loc=0
-	set_checksums 0
-}
-run_test 77h "checksum error on OST read ======================="
-
-test_77i() { # bug 13805
-	#define OBD_FAIL_OSC_CONNECT_CKSUM       0x40b
-	sysctl -w lustre.fail_loc=0x40b
-	remount_client $MOUNT
-	sysctl -w lustre.fail_loc=0
-	for VALUE in `lctl get_param osc.*osc-[^mM]*.checksum_type`; do
-		param=`echo ${VALUE[0]} | cut -d "=" -f1`
-		algo=`lctl get_param -n $param | sed 's/.*\[\(.*\)\].*/\1/g'`
-		[ "$algo" = "crc32" ] || error "algo set to $algo instead of crc32"
-	done
-	remount_client $MOUNT
-}
-run_test 77i "client not supporting OSD_CONNECT_CKSUM =========="
-
-test_77j() { # bug 13805
-	#define OBD_FAIL_OSC_CKSUM_ADLER_ONLY    0x40c
-	sysctl -w lustre.fail_loc=0x40c
-	remount_client $MOUNT
-	sysctl -w lustre.fail_loc=0
-	for VALUE in `lctl get_param osc.*osc-[^mM]*.checksum_type`; do
-		param=`echo ${VALUE[0]} | cut -d "=" -f1`
-		algo=`lctl get_param -n $param | sed 's/.*\[\(.*\)\].*/\1/g'`
-		[ "$algo" = "adler" ] || error "algo set to $algo instead of adler"
-	done
-	remount_client $MOUNT
-}
-run_test 77j "client only supporting ADLER32 ===================="
-
-[ "$ORIG_CSUM" ] && set_checksums $ORIG_CSUM || true
-rm -f $F77_TMP
-unset F77_TMP
-
-test_78() { # bug 10901
- 	NSEQ=5
-	F78SIZE=$(($(awk '/MemFree:/ { print $2 }' /proc/meminfo) / 1024))
-	echo "MemFree: $F78SIZE, Max file size: $MAXFREE"
-	MEMTOTAL=$(($(awk '/MemTotal:/ { print $2 }' /proc/meminfo) / 1024))
-	echo "MemTotal: $MEMTOTAL"
-# reserve 256MB of memory for the kernel and other running processes,
-# and then take 1/2 of the remaining memory for the read/write buffers.
-	MEMTOTAL=$(((MEMTOTAL - 256 ) / 2))
-	echo "Mem to use for directio: $MEMTOTAL"
-	[ $F78SIZE -gt $MEMTOTAL ] && F78SIZE=$MEMTOTAL
-	[ $F78SIZE -gt 512 ] && F78SIZE=512
-	[ $F78SIZE -gt $((MAXFREE / 1024)) ] && F78SIZE=$((MAXFREE / 1024))
-	SMALLESTOST=`lfs df $DIR |grep OST | awk '{print $4}' |sort -n |head -1`
-	echo "Smallest OST: $SMALLESTOST"
-	[ $SMALLESTOST -lt 10240 ] && \
-		skip "too small OSTSIZE, useless to run large O_DIRECT test" && return 0
-
-	[ $F78SIZE -gt $((SMALLESTOST * $OSTCOUNT / 1024 - 5)) ] && \
-		F78SIZE=$((SMALLESTOST * $OSTCOUNT / 1024 - 5))
-	[ "$SLOW" = "no" ] && NSEQ=1 && [ $F78SIZE -gt 32 ] && F78SIZE=32
-	echo "File size: $F78SIZE"
-	$SETSTRIPE $DIR/$tfile -c -1 || error "setstripe failed"
- 	for i in `seq 1 $NSEQ`
- 	do
- 		FSIZE=$(($F78SIZE / ($NSEQ - $i + 1)))
- 		echo directIO rdwr round $i of $NSEQ
-  	 	$DIRECTIO rdwr $DIR/$tfile 0 $FSIZE 1048576||error "rdwr failed"
-  	done
-
-	rm -f $DIR/$tfile
-}
-run_test 78 "handle large O_DIRECT writes correctly ============"
-
-test_79() { # bug 12743
-	[ $(lctl get_param -n devices | grep -c obdfilter) -eq 0 ] &&
-		skip "skipping test for remote OST" && return
-
-	wait_delete_completed
-
-        BKTOTAL=`lctl get_param -n obdfilter.*.kbytestotal |
-                 awk 'BEGIN{total=0}; {total+=$1}; END{print total}'`
-        BKFREE=`lctl get_param -n obdfilter.*.kbytesfree |
-                awk 'BEGIN{free=0}; {free+=$1}; END{print free}'`
-        BKAVAIL=`lctl get_param -n obdfilter.*.kbytesavail |
-                 awk 'BEGIN{avail=0}; {avail+=$1}; END{print avail}'`
-        STRING=`df -P $MOUNT | tail -n 1 | awk '{print $2","$3","$4}'`
-        DFTOTAL=`echo $STRING | cut -d, -f1`
-        DFUSED=`echo $STRING  | cut -d, -f2`
-        DFAVAIL=`echo $STRING | cut -d, -f3`
-        DFFREE=$(($DFTOTAL - $DFUSED))
-
-        ALLOWANCE=$((64 * $OSTCOUNT))
-
-        if [ $DFTOTAL -lt $(($BKTOTAL - $ALLOWANCE)) ] ||  
-           [ $DFTOTAL -gt $(($BKTOTAL + $ALLOWANCE)) ] ; then
-                error "df total($DFTOTAL) mismatch OST total($BKTOTAL)"
-        fi
-        if [ $DFFREE -lt $(($BKFREE - $ALLOWANCE)) ] || 
-           [ $DFFREE -gt $(($BKFREE + $ALLOWANCE)) ] ; then
-                error "df free($DFFREE) mismatch OST free($BKFREE)"
-        fi
-        if [ $DFAVAIL -lt $(($BKAVAIL - $ALLOWANCE)) ] || 
-           [ $DFAVAIL -gt $(($BKAVAIL + $ALLOWANCE)) ] ; then
-                error "df avail($DFAVAIL) mismatch OST avail($BKAVAIL)"
-        fi
-}
-run_test 79 "df report consistency check ======================="
-
-test_80() { # bug 10718
-        dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1M
-        sync; sleep 1; sync
-        BEFORE=`date +%s`
-        cancel_lru_locks OSC
-        AFTER=`date +%s`
-        DIFF=$((AFTER-BEFORE))
-        if [ $DIFF -gt 1 ] ; then
-                error "elapsed for 1M@1T = $DIFF"
-        fi
-        true
-}
-run_test 80 "Page eviction is equally fast at high offsets too  ===="
-
-# on the LLNL clusters, runas will still pick up root's $TMP settings,
-# which will not be writable for the runas user, and then you get a CVS
-# error message with a corrupt path string (CVS bug) and panic.
-# We're not using much space, so just stick it in /tmp, which is safe.
-OLDTMPDIR=$TMPDIR
-OLDTMP=$TMP
-TMPDIR=/tmp
-TMP=/tmp
-OLDHOME=$HOME
-[ $RUNAS_ID -ne $UID ] && HOME=/tmp
-
-test_99a() {
-	mkdir -p $DIR/d99cvsroot || error "mkdir $DIR/d99cvsroot failed"
-	chown $RUNAS_ID $DIR/d99cvsroot || error "chown $DIR/d99cvsroot failed"
-	$RUNAS cvs -d $DIR/d99cvsroot init || error "cvs init failed"
-}
-run_test 99a "cvs init ========================================="
-
-test_99b() {
-	[ ! -d $DIR/d99cvsroot ] && test_99a
-	$RUNAS [ ! -w /tmp ] && skip "/tmp has wrong w permission -- skipping" && return
-	cd /etc/init.d || error "cd /etc/init.d failed"
-	# some versions of cvs import exit(1) when asked to import links or
-	# files they can't read.  ignore those files.
-	TOIGNORE=$(find . -type l -printf '-I %f\n' -o \
-			! -perm +4 -printf '-I %f\n')
-	$RUNAS cvs -d $DIR/d99cvsroot import -m "nomesg" $TOIGNORE \
-		d99reposname vtag rtag > /dev/null || error "cvs import failed"
-}
-run_test 99b "cvs import ======================================="
-
-test_99c() {
-	[ ! -d $DIR/d99cvsroot ] && test_99b
-	cd $DIR || error "cd $DIR failed"
-	mkdir -p $DIR/d99reposname || error "mkdir $DIR/d99reposname failed"
-	chown $RUNAS_ID $DIR/d99reposname || \
-		error "chown $DIR/d99reposname failed"
-	$RUNAS cvs -d $DIR/d99cvsroot co d99reposname > /dev/null || \
-		error "cvs co d99reposname failed"
-}
-run_test 99c "cvs checkout ====================================="
-
-test_99d() {
-	[ ! -d $DIR/d99cvsroot ] && test_99c
-	cd $DIR/d99reposname
-	$RUNAS touch foo99
-	$RUNAS cvs add -m 'addmsg' foo99
-}
-run_test 99d "cvs add =========================================="
-
-test_99e() {
-	[ ! -d $DIR/d99cvsroot ] && test_99c
-	cd $DIR/d99reposname
-	$RUNAS cvs update
-}
-run_test 99e "cvs update ======================================="
-
-test_99f() {
-	[ ! -d $DIR/d99cvsroot ] && test_99d
-	cd $DIR/d99reposname
-	$RUNAS cvs commit -m 'nomsg' foo99
-}
-run_test 99f "cvs commit ======================================="
-
-test_100() {
-	netstat -tna | while read PROT SND RCV LOCAL REMOTE STAT; do
-		[ "$PROT" != "tcp" ] && continue
-		RPORT=`echo $REMOTE | cut -d: -f2`
-		[ "$RPORT" != "$ACCEPTOR_PORT" ] && continue
-		LPORT=`echo $LOCAL | cut -d: -f2`
-		if [ $LPORT -ge 1024 ]; then
-			echo "bad: $PROT $SND $RCV $LOCAL $REMOTE $STAT"
-			netstat -tna
-			error "local: $LPORT > 1024, remote: $RPORT"
-		fi
-	done
-	true
-}
-run_test 100 "check local port using privileged port ==========="
-
-function get_named_value()
-{
-    local tag
-
-    tag=$1
-    while read ;do
-        line=$REPLY
-        case $line in
-        $tag*)
-            echo $line | sed "s/^$tag//"
-            break
-            ;;
-        esac
-    done
-}
-
-export CACHE_MAX=`lctl get_param -n llite/*/max_cached_mb | head -n 1`
-cleanup_101() {
-	lctl set_param -n llite.*.max_cached_mb $CACHE_MAX
-	trap 0
-}
-
-test_101() {
-	local s
-	local discard
-	local nreads=10000
-	[ "$CPU" = "UML" ] && nreads=1000
-	local cache_limit=32
-
-	lctl set_param -n osc.*.rpc_stats 0
-	trap cleanup_101 EXIT
-
-	lctl set_param -n llite.*.read_ahead_stats 0
-	lctl set_param -n llite.*.max_cached_mb $cache_limit
-
-	#
-	# randomly read 10000 of 64K chunks from file 3x 32MB in size
-	#
-	echo "nreads: $nreads file size: $((cache_limit * 3))MB"
-	$RANDOM_READS -f $DIR/$tfile -s$((cache_limit * 3192 * 1024)) -b65536 -C -n$nreads -t 180
-
-	discard=0
-	for s in `lctl get_param -n llite.*.read_ahead_stats | get_named_value 'read but discarded'`; do
-		discard=$(($discard + $s))
-	done
-	cleanup_101
-
-	if [ $(($discard * 10)) -gt $nreads ] ;then
-		lctl get_param osc.*.rpc_stats
-		lctl get_param llite.*.read_ahead_stats
-		error "too many ($discard) discarded pages" 
-	fi
-	rm -f $DIR/$tfile || true
-}
-run_test 101 "check read-ahead for random reads ================"
-
-export SETUP_TEST102=no
-setup_test102() {
-	[ "$SETUP_TEST102" = "yes" ] && return
-	mkdir -p $DIR/$tdir
-	STRIPE_SIZE=65536
-	STRIPE_COUNT=4 
-	STRIPE_OFFSET=2
-
-	trap cleanup_test102 EXIT
-	cd $DIR
-	$SETSTRIPE $tdir -s $STRIPE_SIZE -i $STRIPE_OFFSET -c $STRIPE_COUNT
-	cd $DIR/$tdir 
-	for num in 1 2 3 4
-	do
-		for count in 1 2 3 4
-		do
-			for offset in 0 1 2 3 
-			do
-				local stripe_size=`expr $STRIPE_SIZE \* $num`
-				local file=file"$num-$offset-$count"
-				$SETSTRIPE $file -s $stripe_size -i $offset -c $count
-			done
-		done
-	done
-
-	cd $DIR
-	star -c  f=$TMP/f102.tar $tdir 
-	SETUP_TEST102=yes
-}
-
-cleanup_test102() {
-	[ "$SETUP_TEST102" = "yes" ] || return
-	trap 0
-	rm -f $TMP/f102.tar
-	rm -rf $DIR/$tdir
-	SETUP_TEST102=no
-}
-
-test_102a() {
-	local testfile=$DIR/xattr_testfile
-
-	rm -f $testfile
-        touch $testfile
-
-	[ "$UID" != 0 ] && skip "must run as root" && return
-	[ -z "`lctl get_param -n mdc.*[mM][dD][cC]*.connect_flags | grep xattr`" ] &&
-	skip "must have user_xattr" && return
-	[ -z "$(which setfattr 2>/dev/null)" ] && skip "could not find setfattr" && return
-
-	echo "set/get xattr..."
-        setfattr -n trusted.name1 -v value1 $testfile || error
-        [ "`getfattr -n trusted.name1 $testfile 2> /dev/null | \
-        grep "trusted.name1"`" == "trusted.name1=\"value1\"" ] || error
- 
-        setfattr -n user.author1 -v author1 $testfile || error
-        [ "`getfattr -n user.author1 $testfile 2> /dev/null | \
-        grep "user.author1"`" == "user.author1=\"author1\"" ] || error
-
-	echo "listxattr..."
-        setfattr -n trusted.name2 -v value2 $testfile || error
-        setfattr -n trusted.name3 -v value3 $testfile || error
-        [ `getfattr -d -m "^trusted" $testfile 2> /dev/null | \
-        grep "trusted.name" | wc -l` -eq 3 ] || error
-
- 
-        setfattr -n user.author2 -v author2 $testfile || error
-        setfattr -n user.author3 -v author3 $testfile || error
-        [ `getfattr -d -m "^user" $testfile 2> /dev/null | \
-        grep "user" | wc -l` -eq 3 ] || error
-
-	echo "remove xattr..."
-        setfattr -x trusted.name1 $testfile || error
-        getfattr -d -m trusted $testfile 2> /dev/null | \
-        grep "trusted.name1" && error || true
-
-        setfattr -x user.author1 $testfile || error
-        getfattr -d -m user $testfile 2> /dev/null | \
-        grep "user.author1" && error || true
-
-	# b10667: setting lustre special xattr be silently discarded
-	echo "set lustre special xattr ..."
-	setfattr -n "trusted.lov" -v "invalid value" $testfile || error
-
-	rm -f $testfile
-}
-run_test 102a "user xattr test =================================="
-
-test_102b() {
-	# b10930: get/set/list trusted.lov xattr
-	echo "get/set/list trusted.lov xattr ..."
-	[ "$OSTCOUNT" -lt "2" ] && skip "skipping 2-stripe test" && return
-	local testfile=$DIR/$tfile
-	$SETSTRIPE $testfile -s 65536 -i 1 -c 2
-	getfattr -d -m "^trusted" $testfile 2> /dev/null | \
-	grep "trusted.lov" || error "can't get trusted.lov from $testfile"
-
-	local testfile2=${testfile}2
-	local value=`getfattr -n trusted.lov $testfile 2> /dev/null | \
-		     grep "trusted.lov" |sed -e 's/[^=]\+=//'`
-	
-	$MCREATE $testfile2
-	setfattr -n trusted.lov -v $value $testfile2 	
-	local tmp_file=${testfile}3
-	$GETSTRIPE -v $testfile2 > $tmp_file
-	local stripe_size=`grep "size"  $tmp_file| awk '{print $2}'`
-	local stripe_count=`grep "count"  $tmp_file| awk '{print $2}'`
-	[ $stripe_size -eq 65536 ] || error "stripe size $stripe_size != 65536"
-	[ $stripe_count -eq 2 ] || error "stripe count $stripe_count != 2"
-}
-run_test 102b "getfattr/setfattr for trusted.lov EAs ============"
-
-test_102c() {
-	# b10930: get/set/list lustre.lov xattr
-	echo "get/set/list lustre.lov xattr ..."
-	[ "$OSTCOUNT" -lt "2" ] && skip "skipping 2-stripe test" && return
-	mkdir -p $DIR/$tdir
-	chown $RUNAS_ID $DIR/$tdir
-	local testfile=$DIR/$tdir/$tfile
-	$RUNAS $SETSTRIPE $testfile -s 65536 -i 1 -c 2
-	$RUNAS getfattr -d -m "^lustre" $testfile 2> /dev/null | \
-	grep "lustre.lov" || error "can't get lustre.lov from $testfile"
-
-	local testfile2=${testfile}2
-	local value=`getfattr -n lustre.lov $testfile 2> /dev/null | \
-		     grep "lustre.lov" |sed -e 's/[^=]\+=//'  `
-	
-	$RUNAS $MCREATE $testfile2
-	$RUNAS setfattr -n lustre.lov -v $value $testfile2 	
-	local tmp_file=${testfile}3
-	$RUNAS $GETSTRIPE -v $testfile2 > $tmp_file
-	local stripe_size=`grep "size"  $tmp_file| awk '{print $2}'`
-	local stripe_count=`grep "count"  $tmp_file| awk '{print $2}'`
-	[ "$stripe_size" -eq 65536 ] || error "stripe size $stripe_size != 65536"
-	[ "$stripe_count" -eq 2 ] || error "stripe count $stripe_count != 2"
-}
-run_test 102c "non-root getfattr/setfattr for lustre.lov EAs ==========="
-
-get_stripe_info() {
-	stripe_size=0
-	stripe_count=0
-	stripe_offset=0
-	local lines=`sed -n '/obdidx/=' $1`
-	stripe_size=`awk '{if($1~/size/) print $2}' $1`
-	stripe_count=`awk '{if($1~/count/) print $2}' $1`
-	lines=`expr $lines + 1`
-	stripe_offset=`sed -n ${lines}p $1 |awk '{print $1}'`
-}
-
-compare_stripe_info1() {
-	for num in 1 2 3 4
-	do
-		for count in 1 2 3 4
-		do
-			for offset in 0 1 2 3 
-			do
-				local size=`expr $STRIPE_SIZE \* $num`
-				local file=file"$num-$offset-$count"
-				local tmp_file=out
-				$GETSTRIPE -v $file > $tmp_file 
-				get_stripe_info  $tmp_file
-				if test $stripe_size -ne $size
-				then
-					error "$file: different stripe size" && return
-				fi
-				if test $stripe_count -ne $count
-				then
-					error "$file: different stripe count" && return
-				fi
-				if test $stripe_offset -ne 0
-				then
-					error "$file: different stripe offset" && return
-				fi
-				rm -f $tmp_file
-			done
-		done
-	done
-}
-
-compare_stripe_info2() {
-	for num in 1 2 3 4
-	do
-		for count in 1 2 3 4
-		do
-			for offset in 0 1 2 3 
-			do
-				local size=`expr $STRIPE_SIZE \* $num`
-				local file=file"$num-$offset-$count"
-				local tmp_file=out
-				$GETSTRIPE -v $file > $tmp_file
-				get_stripe_info  $tmp_file
-				if test $stripe_size -ne $size
-				then
-					error "$file: different stripe size" && return	
-				fi
-				if test $stripe_count -ne $count
-				then
-					error "$file: different stripe count" && return
-				fi
-				if test $stripe_offset -ne $offset
-				then
-					error "$file: different stripe offset" && return
-				fi
-				rm -f $tmp_file
-			done
-		done
-	done
-}
-
-test_102d() {
-	# b10930: star test for trusted.lov xattr
-	star --xhelp 2>&1 | grep -q nolustre  
-	if [ $? -ne 0 ]
-	then
-		skip "being skipped because a lustre-aware star is not installed." && return
-	fi
-	[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
-	setup_test102
-	mkdir -p $DIR/d102d
-	star -x  f=$TMP/f102.tar -C $DIR/d102d
-	cd $DIR/d102d/$tdir
-	compare_stripe_info1
-
-}
-run_test 102d "star restore stripe info from tarfile,not keep osts ==========="
-
-test_102e() {
-	# b10930: star test for trusted.lov xattr
-	star --xhelp 2>&1 | grep -q nolustre  
-	[ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
-	[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
-	setup_test102
-	mkdir -p $DIR/d102e
-	star -x  -preserve-osts f=$TMP/f102.tar -C $DIR/d102e
-	cd $DIR/d102e/$tdir
-	compare_stripe_info2
-}
-run_test 102e "star restore stripe info from tarfile, keep osts ==========="
-
-test_102f() {
-	# b10930: star test for trusted.lov xattr
-	star --xhelp 2>&1 | grep -q nolustre  
-	[ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
-	[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
-	setup_test102
-	mkdir -p $DIR/d102f
-	cd $DIR
-	star -copy  $tdir $DIR/d102f
-	cd $DIR/d102f/$tdir
-	compare_stripe_info1
-}
-run_test 102f "star copy files, not keep osts ==========="
-
-test_102g() {
-	# b10930: star test for trusted.lov xattr
-	star --xhelp 2>&1 | grep -q nolustre  
-	[ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
-	[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
-	setup_test102
-	mkdir -p $DIR/d102g
-	cd $DIR
-	star -copy -preserve-osts $tdir $DIR/d102g
-	cd $DIR/d102g/$tdir
-	compare_stripe_info2
-	cleanup_test102
-}
-run_test 102g "star copy files, keep osts ==========="
-
-run_acl_subtest()
-{
-    $LUSTRE/tests/acl/run $LUSTRE/tests/acl/$1.test
-    return $?
-}
-
-test_103 () {
-    [ "$UID" != 0 ] && skip "must run as root" && return
-    [ -z "$(lctl get_param mdc.*[mM][dD][cC]*.connect_flags | grep acl)" ] && skip "must have acl enabled" && return
-    [ -z "$(which setfacl 2>/dev/null)" ] && skip "could not find setfacl" && return
-
-    SAVE_UMASK=`umask`
-    umask 0022
-    cd $DIR
-
-    echo "performing cp ..."
-    run_acl_subtest cp || error
-    echo "performing getfacl-noacl..."
-    run_acl_subtest getfacl-noacl > /dev/null || error
-    echo "performing misc..."
-    run_acl_subtest misc > /dev/null || error
-#    XXX add back permission test when we support supplementary groups.
-#    echo "performing permissions..."
-#    run_acl_subtest permissions || error
-    echo "performing setfacl..."
-    run_acl_subtest setfacl > /dev/null || error
-
-    # inheritance test got from HP
-    echo "performing inheritance..."
-    cp $LUSTRE/tests/acl/make-tree . || error
-    chmod +x make-tree || error
-    run_acl_subtest inheritance > /dev/null || error
-    rm -f make-tree
-
-    cd $SAVE_PWD
-    umask $SAVE_UMASK
-}
-run_test 103 "acl test ========================================="
-
-test_104() {
-	touch $DIR/$tfile
-	lfs df || error "lfs df failed"
-	lfs df -ih || error "lfs df -ih failed"
-	lfs df -h $DIR || error "lfs df -h $DIR failed"
-	lfs df -i $DIR || error "lfs df -i $DIR failed"
-	lfs df $DIR/$tfile || error "lfs df $DIR/$tfile failed"
-	lfs df -ih $DIR/$tfile || error "lfs df -ih $DIR/$tfile failed"
-	
-	OSC=`lctl get_param -n devices | awk '/-osc-|OSC.*MNT/ {print $4}' | head -n 1`
-	lctl --device %$OSC deactivate
-	lfs df || error "lfs df with deactivated OSC failed"
-	lctl --device %$OSC recover
-	lfs df || error "lfs df with reactivated OSC failed"
-}
-run_test 104 "lfs df [-ih] [path] test ========================="
-
-test_105a() {
-	# doesn't work on 2.4 kernels
-        touch $DIR/$tfile
-        if [ -n "`mount | grep \"$DIR.*flock\" | grep -v noflock`" ];
-        then
-                flocks_test on -f $DIR/$tfile || error "fail flock on"
-        else
-                flocks_test off -f $DIR/$tfile || error "fail flock off"
-        fi
-}
-run_test 105a "flock when mounted without -o flock test ========"
-
-test_105b() {
-        touch $DIR/$tfile
-        if [ -n "`mount | grep \"$DIR.*flock\" | grep -v noflock`" ];
-        then
-                flocks_test on -c $DIR/$tfile || error "fail flock on"
-        else
-                flocks_test off -c $DIR/$tfile || error "fail flock off"
-        fi
-}
-run_test 105b "fcntl when mounted without -o flock test ========"
-
-test_105c() {
-        touch $DIR/$tfile
-        if [ -n "`mount | grep \"$DIR.*flock\" | grep -v noflock`" ];
-        then
-                flocks_test on -l $DIR/$tfile || error "fail flock on"
-        else
-                flocks_test off -l $DIR/$tfile || error "fail flock off"
-        fi
-}
-run_test 105c "lockf when mounted without -o flock test ========"
-
-test_106() { #bug 10921
-	$DIR/$tdir && error "exec $DIR/$tdir succeeded"
-	chmod 777 $DIR/$tdir || error "chmod $DIR/$tdir failed"
-}
-run_test 106 "attempt exec of dir followed by chown of that dir"
-
-test_107() {
-        CDIR=`pwd`
-        cd $DIR
-        ulimit -c unlimited
-        sleep 60 &
-        SLEEPPID=$!
-
-        file=`cat /proc/sys/kernel/core_pattern`
-        core_pid=`cat /proc/sys/kernel/core_uses_pid`
-        [ $core_pid -eq 1 ] && file=$file.$SLEEPPID
-        rm -f $file
-        sleep 1
-
-        kill -s 11 $SLEEPPID
-        wait $SLEEPPID
-        if [ -e $file ]; then
-                size=`stat -c%s $file`
-                [ $size -eq 0 ] && error "Zero length core file $file"
-        else
-                error "Fail to create core file $file"
-        fi
-        rm -f $file
-        cd $CDIR
-}
-run_test 107 "Coredump on SIG"
-
-test_115() {
-	OSTIO_pre=$(ps -e|grep ll_ost_io|awk '{print $4}'|sort -n|tail -1|\
-	    cut -c11-20)
-        [ -z "$OSTIO_pre" ] && skip "no OSS threads" && \
-	    return
-        echo "Starting with $OSTIO_pre threads"
-
-	NUMTEST=20000
-	NUMFREE=`df -i -P $DIR | tail -n 1 | awk '{ print $4 }'`
-	[ $NUMFREE -lt $NUMTEST ] && NUMTEST=$(($NUMFREE - 1000))
-	echo "$NUMTEST creates/unlinks"
-	mkdir -p $DIR/$tdir
-	createmany -o $DIR/$tdir/$tfile $NUMTEST
-	unlinkmany $DIR/$tdir/$tfile $NUMTEST
-
-	OSTIO_post=$(ps -e|grep ll_ost_io|awk '{print $4}'|sort -n|tail -1|\
-	    cut -c11-20)
-
-	# don't return an error
-        [ $OSTIO_post -eq $OSTIO_pre ] && echo \
-	    "FAIL: No addition ll_ost_io threads were created ($OSTIO_pre)" &&\
-	    echo "This may be fine, depending on what ran before this test" &&\
-	    echo "and how fast this system is." && return
-
-        echo "Started with $OSTIO_pre threads, ended with $OSTIO_post"
-}
-run_test 115 "verify dynamic thread creation===================="
-
-free_min_max () {
-	wait_delete_completed
-	AVAIL=($(lctl get_param -n osc.*[oO][sS][cC][-_]*.kbytesavail))
-	echo OST kbytes available: ${AVAIL[@]}
-	MAXI=0; MAXV=${AVAIL[0]}
-	MINI=0; MINV=${AVAIL[0]}
-	for ((i = 0; i < ${#AVAIL[@]}; i++)); do
-	    #echo OST $i: ${AVAIL[i]}kb
-	    if [ ${AVAIL[i]} -gt $MAXV ]; then
-		MAXV=${AVAIL[i]}; MAXI=$i
-	    fi
-	    if [ ${AVAIL[i]} -lt $MINV ]; then
-		MINV=${AVAIL[i]}; MINI=$i
-	    fi
-	done
-	echo Min free space: OST $MINI: $MINV 
-	echo Max free space: OST $MAXI: $MAXV 
-}
-
-test_116() {
-	[ "$OSTCOUNT" -lt "2" ] && skip "too few OSTs" && return
-	remote_mds && skip "remote MDS" && return
-
-	echo -n "Free space priority "
-	lctl get_param -n lov.*.qos_prio_free
-	DELAY=$(lctl get_param -n lov.*.qos_maxage | head -1 | awk '{print $1}')
-	declare -a AVAIL
-	free_min_max
-	[ $MINV -gt 960000 ] && skip "too much free space in OST$MINI" &&\
-		return
-
-	# generate uneven OSTs
-	mkdir -p $DIR/$tdir/OST${MINI}
-	declare -i FILL
-	FILL=$(($MINV / 4))
-	echo "Filling 25% remaining space in OST${MINI} with ${FILL}Kb"
-	$SETSTRIPE $DIR/$tdir/OST${MINI} -i $MINI -c 1
-	i=1
-	while [ $FILL -gt 0 ]; do
-	    dd if=/dev/zero of=$DIR/$tdir/OST${MINI}/$tfile-$i bs=2M count=1 2>/dev/null
-	    FILL=$(($FILL - 2048))
-	    echo -n .
-	    i=$(($i + 1))
-	done
-	FILL=$(($MINV / 4))
-	sync
-	sleep $DELAY
-
-	free_min_max
-	DIFF=$(($MAXV - $MINV))
-	DIFF2=$(($DIFF * 100 / $MINV))
-	echo -n "diff=${DIFF}=${DIFF2}% must be > 20% for QOS mode..."
-	if [ $DIFF2 -gt 20 ]; then
-	    echo "ok"
-	else
-	    echo "failed - QOS mode won't be used"
-	    error "QOS imbalance criteria not met"
-	    return
-	fi
-
-	MINI1=$MINI; MINV1=$MINV
-	MAXI1=$MAXI; MAXV1=$MAXV
-
-	# now fill using QOS
-	echo writing a bunch of files to QOS-assigned OSTs
-	$SETSTRIPE $DIR/$tdir -c 1
-	i=1
-	while [ $FILL -gt 0 ]; do
-	    dd if=/dev/zero of=$DIR/$tdir/$tfile-$i bs=1024 count=200 2>/dev/null
-	    FILL=$(($FILL - 200))
-	    echo -n .
-	    i=$(($i + 1))
-	done
-	echo "wrote $i 200k files"
-	sync
-	sleep $DELAY
-
-	echo "Note: free space may not be updated, so measurements might be off"
-	free_min_max
-	DIFF2=$(($MAXV - $MINV))
-	echo "free space delta: orig $DIFF final $DIFF2"
-	[ $DIFF2 -gt $DIFF ] && echo "delta got worse!" 
-	DIFF=$(($MINV1 - ${AVAIL[$MINI1]}))
-	echo "Wrote $DIFF to smaller OST $MINI1"
-	DIFF2=$(($MAXV1 - ${AVAIL[$MAXI1]}))
-	echo "Wrote $DIFF2 to larger OST $MAXI1"
-	[ $DIFF -gt 0 ] && echo "Wrote $(($DIFF2 * 100 / $DIFF - 100))% more data to larger OST $MAXI1"
-
-	# Figure out which files were written where 
-	UUID=$(lctl get_param -n lov.${FSNAME}-clilov-*.target_obd | awk '/'$MINI1': / {print $2; exit}')
-	echo $UUID
-        MINC=$($GETSTRIPE --obd $UUID $DIR/$tdir | wc -l)
-	echo "$MINC files created on smaller OST $MINI1"
-	UUID=$(lctl get_param -n lov.${FSNAME}-clilov-*.target_obd | (awk '/'$MAXI1': / {print $2; exit}'))
-        MAXC=$($GETSTRIPE --obd $UUID $DIR/$tdir | wc -l)
-	echo "$MAXC files created on larger OST $MAXI1"
-	[ $MINC -gt 0 ] && echo "Wrote $(($MAXC * 100 / $MINC - 100))% more files to larger OST $MAXI1"
-	[ $MAXC -gt $MINC ] || error "stripe QOS didn't balance free space"
-}
-run_test 116 "stripe QOS: free space balance ==================="
-
-test_117() # bug 10891
-{
-        dd if=/dev/zero of=$DIR/$tfile bs=1M count=1
-        #define OBD_FAIL_OST_SETATTR_CREDITS 0x21e
-        sysctl -w lustre.fail_loc=0x21e
-        > $DIR/$tfile || error "truncate failed"
-        sysctl -w lustre.fail_loc=0
-        echo "Truncate succeeded."
-}
-run_test 117 "verify fsfilt_extend ============================="
-
-export OLD_RESENDCOUNT=""
-set_resend_count () {
-	local PROC_RESENDCOUNT="osc.${FSNAME}-OST*-osc-*.resend_count"
-	OLD_RESENDCOUNT=$(lctl get_param -n $PROC_RESENDCOUNT | head -1)
-	lctl set_param -n $PROC_RESENDCOUNT $1
-	echo resend_count is set to $(lctl get_param -n $PROC_RESENDCOUNT)
-}
-
-[ "$SLOW" = "no" ] && set_resend_count 4 # for reduce test_118* time (bug 14842)
-
-# Reset async IO behavior after error case
-reset_async() {
-	FILE=$DIR/reset_async
-
-	# Ensure all OSCs are cleared
-	$LSTRIPE $FILE 0 -1 -1
-        dd if=/dev/zero of=$FILE bs=64k count=$OSTCOUNT
-	sync
-        rm $FILE
-}
-
-test_118a() #bug 11710
-{
-	reset_async
-	
- 	multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-	DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param llite.*.dump_page_cache | grep -c writeback)
-
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-		return 1;
-        fi
-}
-run_test 118a "verify O_SYNC works =========="
-
-test_118b()
-{
-	remote_ost_nodsh && skip "remote OST" && return
-
-	reset_async
-
-	#define OBD_FAIL_OST_ENOENT 0x217
-	do_facet ost sysctl -w lustre.fail_loc=0x217
-	multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-	RC=$?
-	do_facet ost sysctl -w lustre.fail_loc=0
-        DIRTY=$(lctl get_param llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-
-	if [[ $RC -eq 0 ]]; then
-		error "Must return error due to dropped pages, rc=$RC"
-		return 1;
-	fi
-
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-		return 1;
-	fi
-
-	echo "Dirty pages not leaked on ENOENT"
-
-	# Due to the above error the OSC will issue all RPCs syncronously
-	# until a subsequent RPC completes successfully without error.
-	multiop $DIR/$tfile Ow4096yc
-	rm -f $DIR/$tfile
-	
-	return 0
-}
-run_test 118b "Reclaim dirty pages on fatal error =========="
-
-test_118c()
-{
-	remote_ost_nodsh && skip "remote OST" && return
-
-	reset_async
-
-	#define OBD_FAIL_OST_EROFS               0x216
-	do_facet ost sysctl -w lustre.fail_loc=0x216
-
-	# multiop should block due to fsync until pages are written
-	multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c &
-	MULTIPID=$!
-	sleep 1
-
-	if [[ `ps h -o comm -p $MULTIPID` != "multiop" ]]; then
-		error "Multiop failed to block on fsync, pid=$MULTIPID"
-	fi
-
-        WRITEBACK=$(lctl get_param -n llite/*/dump_page_cache | grep -c writeback)
-	if [[ $WRITEBACK -eq 0 ]]; then
-		error "No page in writeback, writeback=$WRITEBACK"
-	fi
-
-	do_facet ost sysctl -w lustre.fail_loc=0
-        wait $MULTIPID
-	RC=$?
-	if [[ $RC -ne 0 ]]; then
-		error "Multiop fsync failed, rc=$RC"
-	fi
-
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-	
-	rm -f $DIR/$tfile
-	echo "Dirty pages flushed via fsync on EROFS"
-	return 0
-}
-run_test 118c "Fsync blocks on EROFS until dirty pages are flushed =========="
-
-test_118d()
-{
-	remote_ost_nodsh && skip "remote OST" && return
-
-	reset_async
-
-	#define OBD_FAIL_OST_BRW_PAUSE_BULK
-	do_facet ost sysctl -w lustre.fail_loc=0x214
-	# multiop should block due to fsync until pages are written
-	multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c &	
-	MULTIPID=$!
-	sleep 1
-
-	if [[ `ps h -o comm -p $MULTIPID` != "multiop" ]]; then
-		error "Multiop failed to block on fsync, pid=$MULTIPID"
-	fi
-
-	WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $WRITEBACK -eq 0 ]]; then
-		error "No page in writeback, writeback=$WRITEBACK"
-	fi
-
-        wait $MULTIPID || error "Multiop fsync failed, rc=$?"
-	do_facet ost sysctl -w lustre.fail_loc=0
-
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-
-	rm -f $DIR/$tfile
-	echo "Dirty pages gaurenteed flushed via fsync"
-	return 0
-}
-run_test 118d "Fsync validation inject a delay of the bulk =========="
-
-test_118f() {
-        reset_async
-
-        #define OBD_FAIL_OSC_BRW_PREP_REQ2        0x40a
-        sysctl -w lustre.fail_loc=0x8000040a
-
-	# Should simulate EINVAL error which is fatal
-        multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-        RC=$?
-	if [[ $RC -eq 0 ]]; then
-		error "Must return error due to dropped pages, rc=$RC"
-	fi
-	
-        sysctl -w lustre.fail_loc=0x0
-        
-        LOCKED=$(lctl get_param -n llite.*.dump_page_cache | grep -c locked)
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $LOCKED -ne 0 ]]; then
-		error "Locked pages remain in cache, locked=$LOCKED"
-	fi
-
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-
-	rm -f $DIR/$tfile
-	echo "No pages locked after fsync"
-
-        reset_async
-	return 0
-}
-run_test 118f "Simulate unrecoverable OSC side error =========="
-
-test_118g() {
-        reset_async
-
-	#define OBD_FAIL_OSC_BRW_PREP_REQ        0x406
-        sysctl -w lustre.fail_loc=0x406
-
-	# simulate local -ENOMEM
-        multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-        RC=$?
-	
-        sysctl -w lustre.fail_loc=0
-	if [[ $RC -eq 0 ]]; then
-		error "Must return error due to dropped pages, rc=$RC"
-	fi
-
-        LOCKED=$(lctl get_param -n llite.*.dump_page_cache | grep -c locked)
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $LOCKED -ne 0 ]]; then
-		error "Locked pages remain in cache, locked=$LOCKED"
-	fi
-	
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-
-	rm -f $DIR/$tfile
-	echo "No pages locked after fsync"
-
-        reset_async
-	return 0
-}
-run_test 118g "Don't stay in wait if we got local -ENOMEM  =========="
-
-test_118h() {
-	remote_ost_nodsh && skip "remote OST" && return
-
-        reset_async
-
-	#define OBD_FAIL_OST_BRW_WRITE_BULK      0x20e
-        do_facet ost sysctl -w lustre.fail_loc=0x20e
-	# Should simulate ENOMEM error which is recoverable and should be handled by timeout
-        multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-        RC=$?
-	
-        do_facet ost sysctl -w lustre.fail_loc=0
-	if [[ $RC -eq 0 ]]; then
-		error "Must return error due to dropped pages, rc=$RC"
-	fi
-
-        LOCKED=$(lctl get_param -n llite.*.dump_page_cache | grep -c locked)
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writebac)
-	if [[ $LOCKED -ne 0 ]]; then
-		error "Locked pages remain in cache, locked=$LOCKED"
-	fi
-	
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-
-	rm -f $DIR/$tfile
-	echo "No pages locked after fsync"
-
-	return 0
-}
-run_test 118h "Verify timeout in handling recoverables errors  =========="
-
-test_118i() {
-	remote_ost_nodsh && skip "remote OST" && return
-
-        reset_async
-
-	#define OBD_FAIL_OST_BRW_WRITE_BULK      0x20e
-        do_facet ost sysctl -w lustre.fail_loc=0x20e
-	
-	# Should simulate ENOMEM error which is recoverable and should be handled by timeout
-        multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c &
-	PID=$!
-	sleep 5
-	do_facet ost sysctl -w lustre.fail_loc=0
-	
-	wait $PID
-        RC=$?
-	if [[ $RC -ne 0 ]]; then
-		error "got error, but should be not, rc=$RC"
-	fi
-
-        LOCKED=$(lctl get_param -n llite.*.dump_page_cache | grep -c locked)
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $LOCKED -ne 0 ]]; then
-		error "Locked pages remain in cache, locked=$LOCKED"
-	fi
-	
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-
-	rm -f $DIR/$tfile
-	echo "No pages locked after fsync"
-
-	return 0
-}
-run_test 118i "Fix error before timeout in recoverable error  =========="
-
-test_118j() {
-	remote_ost_nodsh && skip "remote OST" && return
-
-        reset_async
-
-	#define OBD_FAIL_OST_BRW_WRITE_BULK2     0x220
-        do_facet ost sysctl -w lustre.fail_loc=0x220
-
-	# return -EIO from OST
-        multiop $DIR/$tfile oO_CREAT:O_RDWR:O_SYNC:w4096c
-        RC=$?
-        do_facet ost sysctl -w lustre.fail_loc=0x0
-	if [[ $RC -eq 0 ]]; then
-		error "Must return error due to dropped pages, rc=$RC"
-	fi
-
-        LOCKED=$(lctl get_param -n llite.*.dump_page_cache | grep -c locked)
-        DIRTY=$(lctl get_param -n llite.*.dump_page_cache | grep -c dirty)
-        WRITEBACK=$(lctl get_param -n llite.*.dump_page_cache | grep -c writeback)
-	if [[ $LOCKED -ne 0 ]]; then
-		error "Locked pages remain in cache, locked=$LOCKED"
-	fi
-	
-	# in recoverable error on OST we want resend and stay until it finished
-	if [[ $DIRTY -ne 0 || $WRITEBACK -ne 0 ]]; then
-		error "Dirty pages not flushed to disk, dirty=$DIRTY, writeback=$WRITEBACK"
-	fi
-
-	rm -f $DIR/$tfile
-	echo "No pages locked after fsync"
-
- 	return 0
-}
-run_test 118j "Simulate unrecoverable OST side error =========="
-
-test_118k()
-{
-	#define OBD_FAIL_OST_BRW_WRITE_BULK      0x20e
-	do_facet ost sysctl -w lustre.fail_loc=0x20e
-	mkdir -p $DIR/$tdir
-
-        for ((i=0;i<10;i++)); do
-                (dd if=/dev/zero of=$DIR/$tdir/$tfile-$i bs=1M count=10 || \
-			error "dd to $DIR/$tdir/$tfile-$i failed" )&
-	        SLEEPPID=$!
-                sleep 0.500s
-	        kill $SLEEPPID
-	        wait $SLEEPPID
-        done
-
-        sysctl -w lustre.fail_loc=0
-}
-run_test 118k "bio alloc -ENOMEM and IO TERM handling ========="
-
-[ "$SLOW" = "no" ] && [ -n "$OLD_RESENDCOUNT" ] && set_resend_count $OLD_RESENDCOUNT
-
-test_119a() # bug 11737
-{
-        BSIZE=$((512 * 1024))
-        directio write $DIR/$tfile 0 1 $BSIZE
-        # We ask to read two blocks, which is more than a file size.
-        # directio will indicate an error when requested and actual
-        # sizes aren't equeal (a normal situation in this case) and
-        # print actual read amount.
-        NOB=`directio read $DIR/$tfile 0 2 $BSIZE | awk '/error/ {print $6}'`
-        if [ "$NOB" != "$BSIZE" ]; then
-                error "read $NOB bytes instead of $BSIZE"
-        fi
-        rm -f $DIR/$tfile
-}
-run_test 119a "Short directIO read must return actual read amount"
-
-test_119b() # bug 11737
-{
-        [ "$OSTCOUNT" -lt "2" ] && skip "skipping 2-stripe test" && return
-
-        $SETSTRIPE $DIR/$tfile -c 2
-        dd if=/dev/zero of=$DIR/$tfile bs=1M count=1 seek=1 || error "dd failed"
-        sync
-        multiop $DIR/$tfile oO_RDONLY:O_DIRECT:r$((2048 * 1024)) || \
-                error "direct read failed"
-        rm -f $DIR/$tfile
-}
-run_test 119b "Sparse directIO read must return actual read amount"
-
-test_119c() # bug 13099
-{
-        BSIZE=1048576
-        directio write $DIR/$tfile 3 1 $BSIZE || error "direct write failed"
-        directio readhole $DIR/$tfile 0 2 $BSIZE || error "reading hole failed"
-        rm -f $DIR/$tfile
-}
-run_test 119c "Testing for direct read hitting hole"
-
-test_120a() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        cancel_lru_locks mdc
-        stat $DIR/$tdir > /dev/null
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        mkdir -p $DIR/$tdir/d1
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        [ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
-        [ $blk1 -eq $blk2 ] || error $((blk2-blk1)) "blocking RPC occured."
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120a "Early Lock Cancel: mkdir test ==================="
-
-test_120b() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        cancel_lru_locks mdc
-        stat $DIR/$tdir > /dev/null
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        touch $DIR/$tdir/f1
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        [ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
-        [ $blk1 -eq $blk2 ] || error $((blk2-blk1)) "blocking RPC occured."
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120b "Early Lock Cancel: create test =================="
-
-test_120c() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        mkdir -p $DIR/$tdir/d1 $DIR/$tdir/d2
-        touch $DIR/$tdir/d1/f1
-        cancel_lru_locks mdc
-        stat $DIR/$tdir/d1 $DIR/$tdir/d2 $DIR/$tdir/d1/f1 > /dev/null
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        ln $DIR/$tdir/d1/f1 $DIR/$tdir/d2/f2
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        [ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
-        [ $blk1 -eq $blk2 ] || error $((blk2-blk1)) "blocking RPC occured."
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120c "Early Lock Cancel: link test ===================="
-
-test_120d() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        touch $DIR/$tdir
-        cancel_lru_locks mdc
-        stat $DIR/$tdir > /dev/null
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        chmod a+x $DIR/$tdir
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        [ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
-        [ $blk1 -eq $blk2 ] || error $((blk2-blk1)) "blocking RPC occured."
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120d "Early Lock Cancel: setattr test ================="
-
-test_120e() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        dd if=/dev/zero of=$DIR/$tdir/f1 count=1
-        cancel_lru_locks mdc
-        cancel_lru_locks osc
-        dd if=$DIR/$tdir/f1 of=/dev/null
-        stat $DIR/$tdir $DIR/$tdir/f1 > /dev/null
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        unlink $DIR/$tdir/f1
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        [ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
-        [ $blk1 -eq $blk2 ] || error $((blk2-blk1)) "blocking RPC occured."
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120e "Early Lock Cancel: unlink test =================="
-
-test_120f() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        mkdir -p $DIR/$tdir/d1 $DIR/$tdir/d2
-        dd if=/dev/zero of=$DIR/$tdir/d1/f1 count=1
-        dd if=/dev/zero of=$DIR/$tdir/d2/f2 count=1
-        cancel_lru_locks mdc
-        cancel_lru_locks osc
-        dd if=$DIR/$tdir/d1/f1 of=/dev/null
-        dd if=$DIR/$tdir/d2/f2 of=/dev/null
-        stat $DIR/$tdir/d1 $DIR/$tdir/d2 $DIR/$tdir/d1/f1 $DIR/$tdir/d2/f2 > /dev/null
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm/services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        mv $DIR/$tdir/d1/f1 $DIR/$tdir/d2/f2
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        [ $can1 -eq $can2 ] || error $((can2-can1)) "cancel RPC occured."
-        [ $blk1 -eq $blk2 ] || error $((blk2-blk1)) "blocking RPC occured."
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120f "Early Lock Cancel: rename test =================="
-
-test_120g() {
-        [ -z "`lctl get_param -n mdc.*.connect_flags | grep early_lock_cancel`" ] && \
-               skip "no early lock cancel on server" && return 0
-        lru_resize_disable mdc
-        lru_resize_disable osc
-        count=10000
-        echo create $count files
-        mkdir -p $DIR/$tdir
-        cancel_lru_locks mdc
-        cancel_lru_locks osc
-        t0=`date +%s`
-        
-        can0=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk0=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        createmany -o $DIR/$tdir/f $count
-        sync
-        can1=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk1=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        t1=`date +%s`
-        echo total: $((can1-can0)) cancels, $((blk1-blk0)) blockings
-        echo rm $count files
-        rm -r $DIR/$tdir
-        sync
-        can2=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
-        blk2=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
-        t2=`date +%s`
-        echo total: $count removes in $((t2-t1))
-        echo total: $((can2-can1)) cancels, $((blk2-blk1)) blockings
-        sleep 2
-        # wait for commitment of removal
-        lru_resize_enable mdc
-        lru_resize_enable osc
-}
-run_test 120g "Early Lock Cancel: performance test ============="
-
-test_121() { #bug 10589
-	writes=$(LANG=C dd if=/dev/zero of=$DIR/$tfile count=1 2>&1 | awk -F '+' '/out/ {print $1}')
-	sysctl -w lustre.fail_loc=0x310
-	cancel_lru_locks osc > /dev/null
-	reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1 | awk -F '+' '/in/ {print $1}')
-	sysctl -w lustre.fail_loc=0
-	[ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes
-}
-run_test 121 "read cancel race ================================="
-
-test_122() { #bug 11544
-        #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB   0x508
-        sysctl -w lustre.fail_loc=0x508
-        dd if=/dev/zero of=$DIR/$tfile count=1
-        sync
-        sysctl -w lustre.fail_loc=0
-}
-run_test 122 "fail client bulk callback (shouldn't LBUG) ======="
-
-test_123a() { # was test 123, statahead(bug 11401)
-        if [ -z "$(grep "processor.*: 1" /proc/cpuinfo)" ]; then
-                log "testing on UP system. Performance may be not as good as expected."
-        fi
-
-        mkdir -p $DIR/$tdir
-        error=0
-        NUMFREE=`df -i -P $DIR | tail -n 1 | awk '{ print $4 }'`
-        [ $NUMFREE -gt 100000 ] && NUMFREE=100000 || NUMFREE=$((NUMFREE-1000))
-        MULT=10
-        for ((i=1, j=0; i<=$NUMFREE; j=$i, i=$((i * MULT)) )); do
-                createmany -o $DIR/$tdir/$tfile $j $((i - j))
-
-                lctl get_param -n llite.*.statahead_max | grep '[0-9]'
-                cancel_lru_locks mdc
-                cancel_lru_locks osc
-                stime=`date +%s`
-                ls -l $DIR/$tdir > /dev/null
-                etime=`date +%s`
-                delta_sa=$((etime - stime))
-                log "ls $i files with statahead:    $delta_sa sec"
-		lctl get_param -n llite.*.statahead_stats
-
-                max=`lctl get_param -n llite.*.statahead_max | head -n 1`
-                lctl set_param -n llite.*.statahead_max 0
-                lctl get_param llite.*.statahead_max
-                cancel_lru_locks mdc
-                cancel_lru_locks osc
-                stime=`date +%s`
-                ls -l $DIR/$tdir > /dev/null
-                etime=`date +%s`
-                delta=$((etime - stime))
-                log "ls $i files without statahead: $delta sec"
-
-                lctl set_param llite.*.statahead_max=$max
-                if [ $delta_sa -gt $(($delta + 2)) ]; then
-                        log "ls $i files is slower with statahead!"
-                        error=1
-                fi
-
-                [ $delta -gt 20 ] && break
-                [ $delta -gt 8 ] && MULT=$((50 / delta))
-                [ "$SLOW" = "no" -a $delta -gt 3 ] && break
-        done
-        log "ls done"
-
-        stime=`date +%s`
-        rm -r $DIR/$tdir
-        sync
-        etime=`date +%s`
-        delta=$((etime - stime))
-        log "rm -r $DIR/$tdir/: $delta seconds"
-        log "rm done"
-        lctl get_param -n llite.*.statahead_stats
-        # wait for commitment of removal
-        sleep 2
-        [ $error -ne 0 ] && error "statahead is slow!"
-        return 0
-}
-run_test 123a "verify statahead work"
-
-test_123b () { # statahead(bug 15027)
-	mkdir -p $DIR/$tdir
-	createmany -o $DIR/$tdir/$tfile-%d 1000
-	
-        cancel_lru_locks mdc
-        cancel_lru_locks osc
-
-#define OBD_FAIL_MDC_GETATTR_ENQUEUE     0x803
-        sysctl -w lustre.fail_loc=0x80000803
-        ls -lR $DIR/$tdir > /dev/null
-        log "ls done"
-        sysctl -w lustre.fail_loc=0x0
-        lctl get_param -n llite.*.statahead_stats
-        rm -r $DIR/$tdir
-        sync
-
-}
-run_test 123b "not panic with network error in statahead enqueue (bug 15027)"
-
-test_124a() {
-	[ -z "`lctl get_param -n mdc.*.connect_flags | grep lru_resize`" ] && \
-               skip "no lru resize on server" && return 0
-        NR=2000
-        mkdir -p $DIR/$tdir || error "failed to create $DIR/$tdir"
-
-        # use touch to produce $NR new locks
-        log "create $NR files at $DIR/$tdir"
-        createmany -o $DIR/$tdir/f $NR || 
-                error "failed to create $NR files in $DIR/$tdir" 
-        
-        cancel_lru_locks mdc
-        ls -l $DIR/$tdir > /dev/null
-
-        NSDIR=""
-        LRU_SIZE=0
-        for VALUE in `lctl get_param ldlm.namespaces.*mdc-*.lru_size`; do
-                PARAM=`echo ${VALUE[0]} | cut -d "=" -f1`
-                LRU_SIZE=$(lctl get_param -n $PARAM)
-                if [ $LRU_SIZE -gt $(default_lru_size) ]; then
-                        NSDIR=$(echo $PARAM | cut -d "." -f1-3)
-                        log "using $(basename $NSDIR) namespace"
-                        break
-                fi
-        done
-
-        if [ -z "$NSDIR" -o $LRU_SIZE -lt $(default_lru_size) ]; then
-                skip "Not enough cached locks created!"
-                return 0
-        fi
-        log "created $LRU_SIZE lock(s)"
-
-        # we want to sleep 30s to not make test too long
-        SLEEP=30
-        SLEEP_ADD=2
-
-        # we know that lru resize allows one client to hold $LIMIT locks for 10h
-        MAX_HRS=10
-
-        # get the pool limit
-        LIMIT=`lctl get_param -n $NSDIR.pool.limit`
-
-        # calculate lock volume factor taking into account data set size and the
-        # rule that number of locks will be getting smaller durring sleep interval
-        # and we need to additionally enforce LVF to take this into account.
-        # Use $LRU_SIZE_B here to take into account real number of locks created
-        # in the case of CMD, LRU_SIZE_B != $NR in most of cases
-        LVF=$(($MAX_HRS * 60 * 60 * $LIMIT / $SLEEP))
-        LRU_SIZE_B=$LRU_SIZE
-        log "make client drop locks $LVF times faster so that ${SLEEP}s is enough to cancel $LRU_SIZE lock(s)"
-        OLD_LVF=`lctl get_param -n $NSDIR.pool.lock_volume_factor`
-        lctl set_param -n $NSDIR.pool.lock_volume_factor $LVF
-        log "sleep for $((SLEEP+SLEEP_ADD))s"
-        sleep $((SLEEP+SLEEP_ADD))
-        lctl set_param -n $NSDIR.pool.lock_volume_factor $OLD_LVF
-        LRU_SIZE_A=`lctl get_param -n $NSDIR/lru_size`
-
-        [ $LRU_SIZE_B -gt $LRU_SIZE_A ] || {
-                error "No locks dropped in "$((SLEEP+SLEEP_ADD))"s. LRU size: $LRU_SIZE_A"
-                unlinkmany $DIR/$tdir/f $NR
-                return
-        }
-
-        log "Dropped "$((LRU_SIZE_B-LRU_SIZE_A))" locks in "$((SLEEP+SLEEP_ADD))"s"
-        log "unlink $NR files at $DIR/$tdir"
-        unlinkmany $DIR/$tdir/f $NR
-}
-run_test 124a "lru resize ======================================="
-
-test_124b() {
-	[ -z "`lctl get_param -n mdc.*.connect_flags | grep lru_resize`" ] && \
-               skip "no lru resize on server" && return 0
-
-        # even for cmd no matter what metadata namespace to use for getting 
-        # the limit, we use appropriate.
-        LIMIT=`lctl get_param -n ldlm.namespaces.*mdc*.pool.limit`
-
-        NR=$(($(default_lru_size)*20))
-        if [ $NR -gt $LIMIT ]; then
-                NR=$LIMIT
-        fi
-        lru_resize_disable mdc
-        mkdir -p $DIR/$tdir/disable_lru_resize || 
-		error "failed to create $DIR/$tdir/disable_lru_resize"
-
-        createmany -o $DIR/$tdir/disable_lru_resize/f $NR
-        log "doing ls -la $DIR/$tdir/disable_lru_resize 3 times"
-        cancel_lru_locks mdc
-        stime=`date +%s`
-        PID=""
-        ls -la $DIR/$tdir/disable_lru_resize > /dev/null &
-        PID="$PID $!"
-        sleep 2
-        ls -la $DIR/$tdir/disable_lru_resize > /dev/null &
-        PID="$PID $!"
-        sleep 2
-        ls -la $DIR/$tdir/disable_lru_resize > /dev/null &
-        PID="$PID $!"
-        wait $PID
-        etime=`date +%s`
-        nolruresize_delta=$((etime-stime))
-        log "ls -la time: $nolruresize_delta seconds"
-        log "lru_size = $(lctl get_param -n ldlm.namespaces.*mdc*.lru_size)"
-        unlinkmany $DIR/$tdir/disable_lru_resize/f $NR
-
-        lru_resize_enable mdc
-        mkdir -p $DIR/$tdir/enable_lru_resize || 
-		error "failed to create $DIR/$tdir/enable_lru_resize"
-
-        createmany -o $DIR/$tdir/enable_lru_resize/f $NR
-        log "doing ls -la $DIR/$tdir/enable_lru_resize 3 times"
-        cancel_lru_locks mdc
-        stime=`date +%s`
-        PID=""
-        ls -la $DIR/$tdir/enable_lru_resize > /dev/null &
-        PID="$PID $!"
-        sleep 2
-        ls -la $DIR/$tdir/enable_lru_resize > /dev/null &
-        PID="$PID $!"
-        sleep 2
-        ls -la $DIR/$tdir/enable_lru_resize > /dev/null &
-        PID="$PID $!"
-        wait $PID
-        etime=`date +%s`
-        lruresize_delta=$((etime-stime))
-        log "ls -la time: $lruresize_delta seconds"
-        log "lru_size = $(lctl get_param -n ldlm.namespaces.*mdc*.lru_size)"
-
-        if [ $lruresize_delta -gt $nolruresize_delta ]; then
-                log "ls -la is $(((lruresize_delta - $nolruresize_delta) * 100 / $nolruresize_delta))% slower with lru resize enabled"
-        elif [ $nolruresize_delta -gt $lruresize_delta ]; then
-                log "ls -la is $(((nolruresize_delta - $lruresize_delta) * 100 / $nolruresize_delta))% faster with lru resize enabled"
-        else
-                log "lru resize performs the same with no lru resize"
-        fi
-        unlinkmany $DIR/$tdir/enable_lru_resize/f $NR
-}
-run_test 124b "lru resize (performance test) ======================="
-
-test_125() { # 13358
-	[ -z "$(lctl get_param -n mdc.*-mdc-*.connect_flags | grep acl)" ] && skip "must have acl enabled" && return
-	mkdir -p $DIR/d125 || error "mkdir failed"
-	$SETSTRIPE $DIR/d125 -s 65536 -c -1 || error "setstripe failed"
-	setfacl -R -m u:bin:rwx $DIR/d125 || error "setfacl $DIR/d125 failes"
-	ls -ld $DIR/d125 || error "cannot access $DIR/d125"
-}
-run_test 125 "don't return EPROTO when a dir has a non-default striping and ACLs"
-
-test_126() { # bug 12829/13455
-	[ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
-	$RUNAS -u 0 -g 1 touch $DIR/$tfile || error "touch failed"
-	gid=`ls -n $DIR/$tfile | awk '{print $4}'`
-	rm -f $DIR/$tfile
-	[ $gid -eq "1" ] || error "gid is set to" $gid "instead of 1"
-}
-run_test 126 "check that the fsgid provided by the client is taken into account"
-
-TMPDIR=$OLDTMPDIR
-TMP=$OLDTMP
-HOME=$OLDHOME
-
-log "cleanup: ======================================================"
-check_and_cleanup_lustre
-if [ "$I_MOUNTED" != "yes" ]; then
-	sysctl -w lnet.debug="$OLDDEBUG" 2> /dev/null || true
-fi
-
-echo '=========================== finished ==============================='
-[ -f "$SANITYLOG" ] && cat $SANITYLOG && grep -q FAIL $SANITYLOG && exit 1 || true
-echo "$0: completed"
diff --git a/lustre/tests/sanityN.sh b/lustre/tests/sanityN.sh
deleted file mode 100644
index dbcb0c4e7ffd8ccefcb7f90b28dd4d83a6052903..0000000000000000000000000000000000000000
--- a/lustre/tests/sanityN.sh
+++ /dev/null
@@ -1,599 +0,0 @@
-#!/bin/bash
-
-set -e
-
-ONLY=${ONLY:-"$*"}
-# bug number for skipped test:  3192 12652  9977
-ALWAYS_EXCEPT="                 14b  14c    28   $SANITYN_EXCEPT"
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-# bug number for skipped test:                                                    12652 12652
-grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11    14" || true
-
-# Tests that fail on uml
-[ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
-
-SRCDIR=`dirname $0`
-PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
-
-SIZE=${SIZE:-40960}
-CHECKSTAT=${CHECKSTAT:-"checkstat -v"}
-CREATETEST=${CREATETEST:-createtest}
-GETSTRIPE=${GETSTRIPE:-lfs getstripe}
-SETSTRIPE=${SETSTRIPE:-lstripe}
-MCREATE=${MCREATE:-mcreate}
-OPENFILE=${OPENFILE:-openfile}
-OPENUNLINK=${OPENUNLINK:-openunlink}
-TOEXCL=${TOEXCL:-toexcl}
-TRUNCATE=${TRUNCATE:-truncate}
-export TMP=${TMP:-/tmp}
-MOUNT_2=${MOUNT_2:-"yes"}
-CHECK_GRANT=${CHECK_GRANT:-"yes"}
-GRANT_CHECK_LIST=${GRANT_CHECK_LIST:-""}
-
-SAVE_PWD=$PWD
-
-export NAME=${NAME:-local}
-
-LUSTRE=${LUSTRE:-`dirname $0`/..}
-. $LUSTRE/tests/test-framework.sh
-CLEANUP=${CLEANUP:-:}
-SETUP=${SETUP:-:}
-init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
-
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16"
-
-SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
-FAIL_ON_ERROR=false
-
-SETUP=${SETUP:-:}
-TRACE=${TRACE:-""}
-
-LPROC=/proc/fs/lustre
-
-[ "$SANITYLOG" ] && rm -f $SANITYLOG || true
-
-check_and_setup_lustre
-
-LPROC=/proc/fs/lustre
-LOVNAME=`lctl get_param -n llite.*.lov.common_name | tail -n 1`
-OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd`
-
-rm -rf $DIR1/[df][0-9]* $DIR1/lnk
-
-# $RUNAS_ID may get set incorrectly somewhere else
-[ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
-
-check_runas_id $RUNAS_ID $RUNAS
-
-build_test_filter
-
-test_1a() {
-	touch $DIR1/f1
-	[ -f $DIR2/f1 ] || error
-}
-run_test 1a "check create on 2 mtpt's =========================="
-
-test_1b() {
-	chmod 777 $DIR2/f1
-	$CHECKSTAT -t file -p 0777 $DIR1/f1 || error
-	chmod a-x $DIR2/f1
-}
-run_test 1b "check attribute updates on 2 mtpt's ==============="
-
-test_1c() {
-	$CHECKSTAT -t file -p 0666 $DIR1/f1 || error
-}
-run_test 1c "check after remount attribute updates on 2 mtpt's ="
-
-test_1d() {
-	rm $DIR2/f1
-	$CHECKSTAT -a $DIR1/f1 || error
-}
-run_test 1d "unlink on one mountpoint removes file on other ===="
-
-test_2a() {
-	touch $DIR1/f2a
-	ls -l $DIR2/f2a
-	chmod 777 $DIR2/f2a
-	$CHECKSTAT -t file -p 0777 $DIR1/f2a || error
-}
-run_test 2a "check cached attribute updates on 2 mtpt's ========"
-
-test_2b() {
-	touch $DIR1/f2b
-	ls -l $DIR2/f2b
-	chmod 777 $DIR1/f2b
-	$CHECKSTAT -t file -p 0777 $DIR2/f2b || error
-}
-run_test 2b "check cached attribute updates on 2 mtpt's ========"
-
-# NEED TO SAVE ROOT DIR MODE
-test_2c() {
-	chmod 777 $DIR1
-	$CHECKSTAT -t dir -p 0777 $DIR2 || error
-}
-run_test 2c "check cached attribute updates on 2 mtpt's root ==="
-
-test_2d() {
-	chmod 755 $DIR1
-	$CHECKSTAT -t dir -p 0755 $DIR2 || error
-}
-run_test 2d "check cached attribute updates on 2 mtpt's root ==="
-
-test_2e() {
-        chmod 755 $DIR1
-        ls -l $DIR1
-        ls -l $DIR2
-        chmod 777 $DIR1
-        $RUNAS dd if=/dev/zero of=$DIR2/$tfile count=1 || error
-}
-run_test 2e "check chmod on root is propagated to others"
-
-test_3() {
-	( cd $DIR1 ; ln -s this/is/good lnk )
-	[ "this/is/good" = "`perl -e 'print readlink("'$DIR2/lnk'");'`" ] || \
-		error
-}
-run_test 3 "symlink on one mtpt, readlink on another ==========="
-
-test_4() {
-	multifstat $DIR1/f4 $DIR2/f4
-}
-run_test 4 "fstat validation on multiple mount points =========="
-
-test_5() {
-	mcreate $DIR1/f5
-	truncate $DIR2/f5 100
-	$CHECKSTAT -t file -s 100 $DIR1/f5 || error
-	rm $DIR1/f5
-}
-run_test 5 "create a file on one mount, truncate it on the other"
-
-test_6() {
-	openunlink $DIR1/$tfile $DIR2/$tfile || \
-		error "openunlink $DIR1/$tfile $DIR2/$tfile"
-}
-run_test 6 "remove of open file on other node =================="
-
-test_7() {
-	# run_one creates uniq $tdir (bug 13798)
-	# opendirunlink failes if it exists
-	rmdir $DIR1/$tdir || true
-	opendirunlink $DIR1/$tdir $DIR2/$tdir || \
-		error "opendirunlink $DIR1/$tdir $DIR2/$tdir"
-}
-run_test 7 "remove of open directory on other node ============="
-
-test_8() {
-	opendevunlink $DIR1/$tfile $DIR2/$tfile || \
-		error "opendevunlink $DIR1/$tfile $DIR2/$tfile"
-}
-run_test 8 "remove of open special file on other node =========="
-
-test_9() {
-	MTPT=1
-	> $DIR2/f9
-	for C in a b c d e f g h i j k l; do
-		DIR=`eval echo \\$DIR$MTPT`
-		echo -n $C >> $DIR/f9
-		[ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1
-	done
-	[ "`cat $DIR1/f9`" = "abcdefghijkl" ] || \
-		error "`od -a $DIR1/f9` != abcdefghijkl"
-}
-run_test 9 "append of file with sub-page size on multiple mounts"
-
-test_10a() {
-	MTPT=1
-	OFFSET=0
-	> $DIR2/f10
-	for C in a b c d e f g h i j k l; do
-		DIR=`eval echo \\$DIR$MTPT`
-		echo -n $C | dd of=$DIR/f10 bs=1 seek=$OFFSET count=1
-		[ "$MTPT" -eq 1 ] && MTPT=2 || MTPT=1
-		OFFSET=`expr $OFFSET + 1`
-	done
-	[ "`cat $DIR1/f10`" = "abcdefghijkl" ] || \
-		error "`od -a $DIR1/f10` != abcdefghijkl"
-}
-run_test 10a "write of file with sub-page size on multiple mounts "
-
-test_10b() {
-	yes "R" | dd of=$DIR1/f10b bs=3k count=1 || error "dd $DIR1"
-
-	truncate $DIR1/f10b 4096 || error "truncate 4096"
-
-	dd if=$DIR2/f10b of=$TMP/f10b-lustre bs=4k count=1 || error "dd $DIR2"
-
-	# create a test file locally to compare
-	yes "R" | dd of=$TMP/f10b bs=3k count=1 || error "dd random"
-	truncate $TMP/f10b 4096 || error "truncate 4096"
-	cmp $TMP/f10b $TMP/f10b-lustre || error "file miscompare"
-	rm $TMP/f10b $TMP/f10b-lustre
-}
-run_test 10b "write of file with sub-page size on multiple mounts "
-
-test_11() {
-	mkdir $DIR1/d11
-	multiop_bg_pause $DIR1/d11/f O_c || return 1
-	MULTIPID=$!
-	cp -p /bin/ls $DIR1/d11/f
-	$DIR2/d11/f
-	RC=$?
-	kill -USR1 $MULTIPID
-	wait $MULTIPID || error
-	[ $RC -eq 0 ] && error || true
-}
-run_test 11 "execution of file opened for write should return error ===="
-
-test_12() {
-       DIR=$DIR DIR2=$DIR2 sh lockorder.sh
-}
-run_test 12 "test lock ordering (link, stat, unlink) ==========="
-
-test_13() {	# bug 2451 - directory coherency
-       rm -rf $DIR1/d13
-       mkdir $DIR1/d13 || error
-       cd $DIR1/d13 || error
-       ls
-       ( touch $DIR1/d13/f13 ) # needs to be a separate shell
-       ls
-       rm -f $DIR2/d13/f13 || error
-       ls 2>&1 | grep f13 && error "f13 shouldn't return an error (1)" || true
-       # need to run it twice
-       ( touch $DIR1/d13/f13 ) # needs to be a separate shell
-       ls
-       rm -f $DIR2/d13/f13 || error
-       ls 2>&1 | grep f13 && error "f13 shouldn't return an error (2)" || true
-}
-run_test 13 "test directory page revocation ===================="
-
-test_14() {
-	mkdir $DIR1/d14
-	cp -p /bin/ls $DIR1/d14/ls
-	exec 100>> $DIR1/d14/ls
-	$DIR2/d14/ls && error || true
-	exec 100<&-
-}
-run_test 14 "execution of file open for write returns -ETXTBSY ="
-
-test_14a() {
-        mkdir -p $DIR1/d14
-	cp -p `which multiop` $DIR1/d14/multiop || error "cp failed"
-        MULTIOP_PROG=$DIR1/d14/multiop multiop_bg_pause $TMP/test14.junk O_c || return 1
-        MULTIOP_PID=$!
-        multiop $DIR2/d14/multiop Oc && error "expected error, got success"
-        kill -USR1 $MULTIOP_PID || return 2
-        wait $MULTIOP_PID || return 3
-        rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop"
-}
-run_test 14a "open(RDWR) of executing file returns -ETXTBSY ===="
-
-test_14b() { # bug 3192, 7040
-        mkdir -p $DIR1/d14
-	cp -p `which multiop` $DIR1/d14/multiop || error "cp failed"
-        MULTIOP_PROG=$DIR1/d14/multiop multiop_bg_pause $TMP/test14.junk O_c || return 1
-        MULTIOP_PID=$!
-        truncate $DIR2/d14/multiop 0 && kill -9 $MULTIOP_PID && \
-		error "expected truncate error, got success"
-        kill -USR1 $MULTIOP_PID || return 2
-        wait $MULTIOP_PID || return 3
-	cmp `which multiop` $DIR1/d14/multiop || error "binary changed"
-	rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop"
-}
-run_test 14b "truncate of executing file returns -ETXTBSY ======"
-
-test_14c() { # bug 3430, 7040
-	mkdir -p $DIR1/d14
-	cp -p `which multiop` $DIR1/d14/multiop || error "cp failed"
-	MULTIOP_PROG=$DIR1/d14/multiop multiop_bg_pause $TMP/test14.junk O_c || return 1
-        MULTIOP_PID=$!
-	cp /etc/hosts $DIR2/d14/multiop && error "expected error, got success"
-	kill -USR1 $MULTIOP_PID || return 2
-	wait $MULTIOP_PID || return 3
-	cmp `which multiop` $DIR1/d14/multiop || error "binary changed"
-	rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop"
-}
-run_test 14c "open(O_TRUNC) of executing file return -ETXTBSY =="
-
-test_14d() { # bug 10921
-	mkdir -p $DIR1/d14
-	cp -p `which multiop` $DIR1/d14/multiop || error "cp failed"
-	MULTIOP_PROG=$DIR1/d14/multiop multiop_bg_pause $TMP/test14.junk O_c || return 1
-        MULTIOP_PID=$!
-	log chmod
-	chmod 600 $DIR1/d14/multiop || error "chmod failed"
-	kill -USR1 $MULTIOP_PID || return 2
-	wait $MULTIOP_PID || return 3
-	cmp `which multiop` $DIR1/d14/multiop || error "binary changed"
-	rm $TMP/test14.junk $DIR1/d14/multiop || error "removing multiop"
-}
-run_test 14d "chmod of executing file is still possible ========"
-
-test_15() {	# bug 974 - ENOSPC
-	echo "PATH=$PATH"
-	sh oos2.sh $MOUNT1 $MOUNT2
-	grant_error=`dmesg | grep "> available"`
-	[ -z "$grant_error" ] || error "$grant_error"
-}
-run_test 15 "test out-of-space with multiple writers ==========="
-
-test_16() {
-	rm -f $MOUNT1/fsxfile
-	lfs setstripe $MOUNT1/fsxfile -c -1 # b=10919
-	fsx -c 50 -p 100 -N 2500 -l $((SIZE * 256)) -S 0 $MOUNT1/fsxfile $MOUNT2/fsxfile
-}
-run_test 16 "2500 iterations of dual-mount fsx ================="
-
-test_17() { # bug 3513, 3667
-	[ ! -d /proc/fs/lustre/ost ] && skip "remote OST, skipping OST-only test" && return
-
-	cp /etc/termcap $DIR1/f17
-	cancel_lru_locks osc > /dev/null
-	#define OBD_FAIL_ONCE|OBD_FAIL_LDLM_CREATE_RESOURCE    0x30a
-	sysctl -w lustre.fail_loc=0x8000030a
-	ls -ls $DIR1/f17 | awk '{ print $1,$6 }' > $DIR1/f17-1 & \
-	ls -ls $DIR2/f17 | awk '{ print $1,$6 }' > $DIR2/f17-2
-	wait
-	diff -u $DIR1/f17-1 $DIR2/f17-2 || error "files are different"
-}
-run_test 17 "resource creation/LVB creation race ==============="
-
-test_18() {
-	./mmap_sanity -d $MOUNT1 -m $MOUNT2
-	sync; sleep 1; sync
-}
-run_test 18 "mmap sanity check ================================="
-
-test_19() { # bug3811
-	[ -d /proc/fs/lustre/obdfilter ] || return 0
-
-	MAX=`cat /proc/fs/lustre/obdfilter/*/readcache_max_filesize | head -n 1`
-	for O in /proc/fs/lustre/obdfilter/*OST*; do
-		echo 4096 > $O/readcache_max_filesize
-	done
-	dd if=/dev/urandom of=$TMP/f19b bs=512k count=32
-	SUM=`cksum $TMP/f19b | cut -d" " -f 1,2`
-	cp $TMP/f19b $DIR1/f19b
-	for i in `seq 1 20`; do
-		[ $((i % 5)) -eq 0 ] && log "test_18 loop $i"
-		cancel_lru_locks osc > /dev/null
-		cksum $DIR1/f19b | cut -d" " -f 1,2 > $TMP/sum1 & \
-		cksum $DIR2/f19b | cut -d" " -f 1,2 > $TMP/sum2
-		wait
-		[ "`cat $TMP/sum1`" = "$SUM" ] || \
-			error "$DIR1/f19b `cat $TMP/sum1` != $SUM"
-		[ "`cat $TMP/sum2`" = "$SUM" ] || \
-			error "$DIR2/f19b `cat $TMP/sum2` != $SUM"
-	done
-	for O in /proc/fs/lustre/obdfilter/*OST*; do
-		echo $MAX > $O/readcache_max_filesize
-	done
-	rm $DIR1/f19b
-}
-#run_test 19 "test concurrent uncached read races ==============="
-
-test_20() {
-	mkdir $DIR1/d20
-	cancel_lru_locks osc
-	CNT=$((`cat /proc/fs/lustre/llite/*/dump_page_cache | wc -l`))
-	multiop $DIR1/f20 Ow8190c
-	multiop $DIR2/f20 Oz8194w8190c
-	multiop $DIR1/f20 Oz0r8190c
-	cancel_lru_locks osc
-	CNTD=$((`cat /proc/fs/lustre/llite/*/dump_page_cache | wc -l` - $CNT))
-	[ $CNTD -gt 0 ] && \
-	    error $CNTD" page left in cache after lock cancel" || true
-}
-run_test 20 "test extra readahead page left in cache ===="
-
-cleanup_21() {
-	trap 0
-	umount $DIR1/d21
-}
-
-test_21() { # Bug 5907
-	mkdir $DIR1/d21
-	mount /etc $DIR1/d21 --bind || error "mount failed" # Poor man's mount.
-	trap cleanup_21 EXIT
-	rmdir -v $DIR1/d21 && error "Removed mounted directory"
-	rmdir -v $DIR2/d21 && echo "Removed mounted directory from another mountpoint, needs to be fixed"
-	test -d $DIR1/d21 || error "Mounted directory disappeared"
-	cleanup_21
-	test -d $DIR2/d21 || test -d $DIR1/d21 && error "Removed dir still visible after umount"
-	true
-}
-run_test 21 " Try to remove mountpoint on another dir ===="
-
-JOIN=${JOIN:-"lfs join"}
-
-test_22() { # Bug 9926
-	mkdir $DIR1/d21
-	dd if=/dev/urandom of=$DIR1/d21/128k bs=1024 count=128
-	cp -p $DIR1/d21/128k $DIR1/d21/f_head
-	for ((i=0;i<10;i++)); do
-		cp -p $DIR1/d21/128k $DIR1/d21/f_tail
-		$JOIN $DIR1/d21/f_head $DIR1/d21/f_tail || error "join error"
-		$CHECKSTAT -a $DIR1/d21/f_tail || error "tail file exist after join"
-	done
-	echo aaaaaaaaaaa >> $DIR1/d21/no_joined
-
-	mv $DIR2/d21/f_head $DIR2/
-	munlink $DIR2/f_head || error "unlink joined file error"
-	cat $DIR2/d21/no_joined || error "cat error"
-	rm -rf $DIR2/d21/no_joined || error "unlink normal file error"
-}
-run_test 22 " After joining in one dir,  open/close unlink file in anther dir" 
-
-test_23() { # Bug 5972
-	echo "others should see updated atime while another read" > $DIR1/f23
-	
-	# clear the lock(mode: LCK_PW) gotten from creating operation
-	cancel_lru_locks osc
-	
-	time1=`date +%s`	
-	sleep 2
-	
-	multiop_bg_pause $DIR1/f23 or20_c || return 1
-	MULTIPID=$!
-
-	time2=`stat -c "%X" $DIR2/f23`
-
-	if (( $time2 <= $time1 )); then
-		kill -USR1 $MULTIPID
-		error "atime doesn't update among nodes"
-	fi
-
-	kill -USR1 $MULTIPID || return 1
-	rm -f $DIR1/f23 || error "rm -f $DIR1/f23 failed"
-	true
-}
-run_test 23 " others should see updated atime while another read===="
-
-test_24() {
-	touch $DIR1/$tfile
-	lfs df || error "lfs df failed"
-	lfs df -ih || error "lfs df -ih failed"
-	lfs df -h $DIR1 || error "lfs df -h $DIR1 failed"
-	lfs df -i $DIR2 || error "lfs df -i $DIR2 failed"
-	lfs df $DIR1/$tfile || error "lfs df $DIR1/$tfile failed"
-	lfs df -ih $DIR2/$tfile || error "lfs df -ih $DIR2/$tfile failed"
-	
-	OSC=`lctl dl | awk '/-osc-|OSC.*MNT/ {print $4}' | head -n 1`
-	lctl --device %$OSC deactivate
-	lfs df -i || error "lfs df -i with deactivated OSC failed"
-	lctl --device %$OSC recover
-	lfs df || error "lfs df with reactivated OSC failed"
-}
-run_test 24 "lfs df [-ih] [path] test ========================="
-
-test_25() {
-	[ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] && \
-	    skip "must have acl, skipping" && return
-
-	touch $DIR1/$tdir/f1 || error "touch $DIR1/$tdir/f1"
-	chmod 0755 $DIR1/$tdir/f1 || error "chmod 0755 $DIR1/$tdir/f1"
-
-	$RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #1"
-	setfacl -m u:$RUNAS_ID:--- $DIR1/$tdir || error "setfacl $DIR2/$tdir #1"
-	$RUNAS $CHECKSTAT $DIR2/$tdir/f1 && error "checkstat $DIR2/$tdir/f1 #2"
-	setfacl -m u:$RUNAS_ID:r-x $DIR1/$tdir || error "setfacl $DIR2/$tdir #2"
-	$RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #3"
-	setfacl -m u:$RUNAS_ID:--- $DIR1/$tdir || error "setfacl $DIR2/$tdir #3"
-	$RUNAS $CHECKSTAT $DIR2/$tdir/f1 && error "checkstat $DIR2/$tdir/f1 #4"
-	setfacl -x u:$RUNAS_ID: $DIR1/$tdir || error "setfacl $DIR2/$tdir #4"
-	$RUNAS $CHECKSTAT $DIR2/$tdir/f1 || error "checkstat $DIR2/$tdir/f1 #5"
-
-	rm -rf $DIR1/$tdir
-}
-run_test 25 "change ACL on one mountpoint be seen on another ==="
-
-test_26a() {
-        utime $DIR1/f26a -s $DIR2/f26a || error
-}
-run_test 26a "allow mtime to get older"
-
-test_26b() {
-        touch $DIR1/$tfile
-        sleep 1
-        echo "aaa" >> $DIR1/$tfile
-        sleep 1
-        chmod a+x $DIR2/$tfile
-        mt1=`stat -c %Y $DIR1/$tfile`
-        mt2=`stat -c %Y $DIR2/$tfile`
-        
-        if [ x"$mt1" != x"$mt2" ]; then 
-                error "not equal mtime, client1: "$mt1", client2: "$mt2"."
-        fi
-}
-run_test 26b "sync mtime between ost and mds"
-
-test_27() {
-	cancel_lru_locks OSC
-	lctl clear
-	dd if=/dev/zero of=$DIR2/$tfile bs=$((4096+4))k conv=notrunc count=4 seek=3 &
-	DD2_PID=$!
-	sleep 0.050s
-	log "dd 1 started"
-	
-	dd if=/dev/zero of=$DIR1/$tfile bs=$((16384-1024))k conv=notrunc count=1 seek=4 &
-	DD1_PID=$!
-	log "dd 2 started"
-	
-	sleep 1
-	dd if=/dev/zero of=$DIR1/$tfile bs=8k conv=notrunc count=1 seek=0
-	log "dd 3 finished"
-	lctl set_param -n ldlm.dump_namespaces ""
-	wait $DD1_PID $DD2_PID
-	[ $? -ne 0 ] && lctl dk $TMP/debug || true
-}
-run_test 27 "align non-overlapping extent locks from request ==="
-
-test_28() { # bug 9977
-	ostID=`$LCTL dl | awk '/-osc-|OSC.*MNT/ { ost++; if (ost == 2) { print $1 } }'`
-
-	lfs setstripe $DIR1/$tfile -s 1048576 -i 0 -c 2
-	tOBJID=`lfs getstripe $DIR1/$tfile | awk '/^[[:space:]]+1/ {print $2}'`
-	dd if=/dev/zero of=$DIR1/$tfile bs=1024k count=2
-
-	$LCTL --device $ostID destroy "${tOBJID}"
-    
-	# reading of 1st stripe should pass
-	dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 || error
-	# reading of 2nd stripe should fail (this stripe was destroyed)
-	dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 skip=1 && error
-
-	# now, recreating test file
-	dd if=/dev/zero of=$DIR1/$tfile bs=1024k count=2 || error
-	# reading of 1st stripe should pass
-	dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 || error
-	# reading of 2nd stripe should pass
-	dd if=$DIR2/$tfile of=/dev/null bs=1024k count=1 skip=1 || error
-}
-run_test 28 "read/write/truncate file with lost stripes"
-
-test_29() { # bug 10999
-	touch $DIR1/$tfile
-	#define OBD_FAIL_LDLM_GLIMPSE  0x30f
-	sysctl -w lustre.fail_loc=0x8000030f
-	ls -l $DIR2/$tfile &
-	sleep 0.500s
-	dd if=/dev/zero of=$DIR1/$tfile bs=4k count=1
-	wait
-}
-#bug 11549 - permanently turn test off in b1_5
-#run_test 29 "lock put race between glimpse and enqueue ========="
-
-test_30() { #bug #11110
-    cp -f /bin/bash $DIR1/$tdir/bash
-    /bin/sh -c 'sleep 1; rm -f $DIR2/$tdir/bash; cp /bin/bash $DIR2/$tdir' &
-    err=$($DIR1/$tdir/bash -c 'sleep 2; openfile -f O_RDONLY /proc/$$/exe >& /dev/null; echo $?')
-    wait
-    [ $err -ne 116 ] && error_ignore 12900 "return code ($err) != -ESTALE" && return
-    true
-}
-
-run_test 30 "recreate file race ========="
-
-test_31() {
-        mkdir -p $DIR1/$tdir || error "Creating dir $DIR1/$tdir"
-        writes=`LANG=C dd if=/dev/zero of=$DIR/$tdir/$tfile count=1 2>&1 |
-                awk 'BEGIN { FS="+" } /out/ {print $1}'`
-        #define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE   0x314
-        sysctl -w lustre.fail_loc=0x314
-        reads=`LANG=C dd if=$DIR2/$tdir/$tfile of=/dev/null 2>&1 |
-               awk 'BEGIN { FS="+" } /in/ {print $1}'`
-        [ $reads -eq $writes ] || error "read" $reads "blocks, must be" $writes
-}
-run_test 31 "voluntary cancel / blocking ast race=============="
-
-log "cleanup: ======================================================"
-
-check_and_cleanup_lustre
-
-echo '=========================== finished ==============================='
-[ -f "$SANITYLOG" ] && cat $SANITYLOG && grep -q FAIL $SANITYLOG && exit 1 || true
-echo "$0: completed"
-
diff --git a/lustre/tests/set_dates.sh b/lustre/tests/set_dates.sh
deleted file mode 100644
index b2a9979ac89312e8d541cd2ca41a2befe8bf2865..0000000000000000000000000000000000000000
--- a/lustre/tests/set_dates.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/sh
-[ `hostname` = "uml1" ] && date --set="Mar 14 20:21:41 MDT 1973" #101010101
-[ `hostname` = "uml2" ] && date --set="May 26 22:43:22 MDT 1976" #202020202
-[ `hostname` = "uml3" ] && date --set="Aug  9 01:05:03 MDT 1979" #303030303
diff --git a/lustre/tests/sleeptest.c b/lustre/tests/sleeptest.c
deleted file mode 100644
index d8beceb0ec8850ccca55c033e91edad2c1bc7b41..0000000000000000000000000000000000000000
--- a/lustre/tests/sleeptest.c
+++ /dev/null
@@ -1,115 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <time.h>
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
-
-#define BUFSIZE (4096)
-
-#define min(a,b) ((a) < (b) ? (a) : (b))
-
-int main(int argc, char *argv[])
-{
-
-	FILE *w_str;
-	int read_fd;
-	int rc, iter;
-	int line, delta, next;
-	int sleeptime = 0;
-	char *now_time;
-	const char ok_chars[] = "MonTueWedThuFriSatSun"
-				"JanFebMarAprMayJunJulAugSepOctNovDec"
-				"Line 0123456789 of file, written at:\n";
-
-	char buf_r[BUFSIZE];
-
-	char pathname[256] = "/mnt/lustre/linetest_";
-	char *host;
-
-	if (argc > 1) {
-		strncpy(pathname, argv[1], 255);
-		pathname[255] = '\0';
-	}
-
-	host = getenv("HOSTNAME");
-	if (host)
-		strcat(pathname, host);
-
-	if (argc > 2)
-		sleeptime = strtoul(argv[2], NULL, 0);
-
-	if (sleeptime == 0)
-		sleeptime = 30;
-
-	printf("Test file used is: %s at %ds intervals\n", pathname, sleeptime);
-
-	w_str = fopen(pathname, "wb");
-	if (w_str == NULL) {
-		perror("fopen");
-		exit(1);
-	}
-	read_fd = open(pathname, O_RDONLY);
-	if (read_fd < 0) {
-		perror("open");
-		exit(1);
-	}
-
-	next = 1;
-	delta = 17;
-	iter = 1;
-	while (1) {
-		time_t now;
-		struct tm *t;
-		long offset;
-
-		now = time((time_t *)NULL);
-		t = localtime(&now);
-		now_time = asctime(t);
-
-		printf("iter: %d\n", iter);
-
-		for (line=next; line<(next+delta); line++) {
-			rc = fprintf(w_str, "Line %8d of file, written at: %s",
-				     line, now_time);
-			/* \n comes from ctime() result */
-			if (rc <= 0) {
-				perror("fprintf");
-				exit(4);
-			}
-			rc = fflush(w_str);
-			if (rc != 0) {
-				perror("fflush");
-				exit(5);
-			}
-		}
-		next += delta;
-
-		/* Check for corruption */
-		offset = ftell(w_str);
-		rc = lseek(read_fd, offset & ~4095, SEEK_SET);
-		if (rc != (offset & ~4095)) {
-			perror("lseek");
-			exit(7);
-		}
-
-		rc = read(read_fd, buf_r, min(100, offset & 4095));
-		if (rc != min(100, offset & 4095)) {
-			printf("rc: %d, off %lu buf: '%s'\n", rc,offset,buf_r);
-			exit(8);
-		}
-		buf_r[rc] = 0;
-		/* Chars from "C" days/months, and above Line */
-		if (strspn(buf_r, ok_chars) != rc) {
-			printf("Corruption detected at %lu on %s",
-			       offset & ~4095, now_time);
-			exit(9);
-		}
-
-		sleep(sleeptime);
-		iter++;
-	}
-
-}
diff --git a/lustre/tests/small_write.c b/lustre/tests/small_write.c
deleted file mode 100644
index 442d0fda91fcb2934556fd1328f427e045437293..0000000000000000000000000000000000000000
--- a/lustre/tests/small_write.c
+++ /dev/null
@@ -1,145 +0,0 @@
-#include <stdio.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-
-#define GOTO(label, rc)   do { rc; goto label; } while (0)
-
-int main (int argc, char **argv) {
-	int fd, i, rc = 0;
-	unsigned long bytes, lbytes;
-	struct stat st;
-	char *str, *str2, *readbuf;
-
-	if (argc != 3) {
-		fprintf(stderr, "usage: %s <filename> <bytes>\n", argv[0]);
-		GOTO(out, rc = 1);
-	}
-
-	bytes = strtoul(argv[2], NULL, 10);
-	if (!bytes) {
-		printf("No bytes!\n");
-		GOTO(out, rc = 2);
-	}
-	if (bytes % 2) {
-		printf("Need an even number of bytes!\n");
-		GOTO(out, rc = 3);
-	}
-	lbytes = 3*bytes/2;
-
-	str = malloc(bytes+1);
-	if (!str) {
-		printf("No enough memory for %lu bytes.\n", bytes);
-		GOTO(out, rc = 4);
-	}
-	str2 = malloc(lbytes+1);
-	if (!str2) {
-		printf("No enough memory for %lu bytes.\n", lbytes);
-		GOTO(out_str, rc = 5);
-	}
-	readbuf = malloc(bytes*2);
-	if (!readbuf) {
-		printf("No enough memory for %lu bytes.\n", bytes*2);
-		GOTO(out_str2, rc = 6);
-	}
-
-	for(i=0; i < bytes; i++)
-		str[i] = 'a' + (i % 26);
-	str[i] = '\0';
-
-	memcpy(str2, str, bytes);
-	memcpy(str2+(bytes/2), str, bytes);
-	str2[lbytes] = '\0';
-
-	if (bytes < 320)
-		printf("First  String: %s\nSecond String: %s\n", str, str2);
-
-	fd = open(argv[1], O_CREAT|O_RDWR|O_TRUNC, 0700);
-	if (fd == -1) {
-		printf("Could not open file %s.\n", argv[1]);
-		GOTO(out_readbuf, rc = 7);
-	}
-
-	rc = write(fd, str, bytes);
-	if (rc != bytes) {
-		printf("Write failed!\n");
-		GOTO(out_fd, rc = 8);
-	}
-
-	sleep(1);
-	rc = fstat(fd, &st);
-	if (rc < 0 || st.st_size != bytes) {
-		printf("bad file %lu size first write %lu != %lu: rc %d\n",
-		       (unsigned long)st.st_ino, (unsigned long)st.st_size,
-                       bytes, rc);
-		GOTO(out_fd, rc = 9);
-	}
-
-	rc = lseek(fd, bytes / 2, SEEK_SET);
-	if (rc != bytes / 2) {
-		printf("Seek failed!\n");
-		GOTO(out_fd, rc = 10);
-	}
-
-	rc = write(fd, str, bytes);
-	if (rc != bytes) {
-		printf("Write failed!\n");
-		GOTO(out_fd, rc = 11);
-	}
-
-	rc = fstat(fd, &st);
-	if (rc < 0 || st.st_size != bytes + bytes / 2) {
-		printf("bad file %lu size second write %lu != %lu: rc %d\n",
-		       (unsigned long)st.st_ino, (unsigned long)st.st_size,
-                       bytes, rc);
-		GOTO(out_fd, rc = 12);
-	}
-
-	rc = lseek(fd, 0, SEEK_SET);
-	if (rc != 0) {
-		printf("Seek failed!\n");
-		GOTO(out_fd, rc = 13);
-	}
-
-	rc = read(fd, readbuf, bytes * 2);
-	if (rc != lbytes) {
-		printf("Read %d bytes instead of %lu.\n", rc, lbytes);
-		if (rc == -1)
-			perror("");
-		else
-			printf("%s\n%s\n", readbuf, str2);
-		rc = fstat(fd, &st);
-		if (rc < 0 || st.st_size != bytes + bytes / 2) {
-			printf("bad file size after read %lu != %lu: rc %d\n",
-			       (unsigned long)st.st_size, bytes + bytes / 2,
-                               rc);
-			GOTO(out_fd, rc = 14);
-		}
-
-		GOTO(out_fd, rc = 15);
-	}
-	rc = 0;
-
-	if (bytes < 320)
-		printf("%s\n%s\n", readbuf, str2);
-	if (strcmp(readbuf, str2)) {
-		printf("No match!\n");
-		GOTO(out_fd, rc = 16);
-	}
-
-	printf("Pass!\n");
-out_fd:
-	close(fd);
-out_readbuf:
-        free(readbuf);
-out_str2:
-        free(str2);
-out_str:
-        free(str);
-out:
-        return rc;
-}
diff --git a/lustre/tests/socketclient b/lustre/tests/socketclient
deleted file mode 100755
index 5e6e65959a22b255a4b7c3488f3baa357360d0d2..0000000000000000000000000000000000000000
--- a/lustre/tests/socketclient
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/perl -w
-use Socket;
-use strict;
-my ($rendezvous, $line);
-
-$rendezvous = shift || <@ARGV>;
-socket(SOCK, AF_UNIX, SOCK_STREAM, 0)	|| die "socket: $!";
-connect(SOCK, sockaddr_un($rendezvous))	|| die "connect: $!";
-while (defined($line = <SOCK>)) {
-	print $line;
-}
-exit;  
diff --git a/lustre/tests/socketserver b/lustre/tests/socketserver
deleted file mode 100755
index e2fd66abdc2adb0eff02f16e9ba635b62e36b194..0000000000000000000000000000000000000000
--- a/lustre/tests/socketserver
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /usr/bin/perl -w
-use strict;
-use Socket;
-
-BEGIN { $ENV{PATH} = '/usr/ucb:/bin' }
-sub logmsg { print "$0 $$: @_ at ", scalar localtime, "\n" }
-
-my $NAME = <@ARGV>;
-my $uaddr = sockaddr_un($NAME);
-
-socket(Server,AF_UNIX,SOCK_STREAM,0) 	|| die "socket: $!";
-unlink($NAME);
-bind  (Server, $uaddr) 			|| die "bind: $!";
-listen(Server,SOMAXCONN)			|| die "listen: $!";
-
-logmsg "server started on $NAME";
-
-my $rc = fork();
-if ($rc > 0) { #parent
-    exit();
-} elsif ($rc < 0) { # error
-    logmsg "fork failed: $rc";
-    exit();
-}
-
-accept(Client,Server);
-logmsg "connection on $NAME";
-print Client "from server\n";
-close Client;
diff --git a/lustre/tests/statmany.c b/lustre/tests/statmany.c
deleted file mode 100644
index 63a13adf77df10fd3fa85db50ba7d834317f9ed5..0000000000000000000000000000000000000000
--- a/lustre/tests/statmany.c
+++ /dev/null
@@ -1,215 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <time.h>
-#include <limits.h>
-#include <sys/ioctl.h>
-
-#if 0
-#include <linux/ldiskfs_fs.h>
-#endif
-#include <liblustre.h>
-#include <lustre_lib.h>
-#include <obd.h>
-
-struct option longopts[] = {
-	{"ea", 0, 0, 'e'},
-	{"lookup", 0, 0, 'l'},
-	{"random", 0, 0, 'r'},
-	{"stat", 0, 0, 's'},
-	{NULL, 0, 0, 0},
-};
-char *shortopts = "ehlr:s0123456789";
-
-static int usage(char *prog, FILE *out)
-{
-        fprintf(out,
-		"Usage: %s [-r rand_seed] {-s|-e|-l} filenamebase total_files iterations\n"
-               "-r : random seed\n"
-               "-s : regular stat() calls\n"
-               "-e : open then GET_EA ioctl\n"
-               "-l : lookup ioctl only\n", prog);
-        exit(out == stderr);
-}
-
-#ifndef LONG_MAX
-#define LONG_MAX (1 << ((8 * sizeof(long)) - 1))
-#endif
-
-int main(int argc, char ** argv)
-{
-        long i, c, count, iter = LONG_MAX, mode = 0, offset;
-        long int start, length = LONG_MAX, last, rc = 0;
-        char parent[4096], *t;
-	char *prog = argv[0], *base;
-	int seed = 0;
-	int fd = -1;
-
-	while ((c = getopt_long(argc, argv, shortopts, longopts, NULL)) != -1) {
-		char *e;
-		switch (c) {
-		case 'r':
-			seed = strtoul(optarg, &e, 0);
-			if (*e) {
-				fprintf(stderr, "bad -r option %s\n", optarg);
-				usage(prog, stderr);
-			}
-			break;
-		case 'e':
-		case 'l':
-		case 's':
-			mode = c;
-			break;
-		case '0':
-		case '1':
-		case '2':
-		case '3':
-		case '4':
-		case '5':
-		case '6':
-		case '7':
-		case '8':
-		case '9':
-			if (length == LONG_MAX)
-				length = c - '0';
-			else
-				length = length * 10 + (c - '0');
-			break;
-		case 'h':
-			usage(prog, stdout);
-		case '?':
-			usage(prog, stderr);
-		}
-	}
-
-	if (optind + 2 + (length == LONG_MAX) != argc) {
-		fprintf(stderr, "missing filenamebase, total_files, or iterations\n");
-		usage(prog, stderr);
-	}
-
-        base = argv[optind];
-        if (strlen(base) > 4080) {
-                fprintf(stderr, "filenamebase too long\n");
-                exit(1);
-        }
-
-	if (seed == 0) {
-		int f = open("/dev/urandom", O_RDONLY);
-
-		if (f < 0 || read(f, &seed, sizeof(seed)) < sizeof(seed))
-			seed = time(0);
-		if (f > 0)
-			close(f);
-	}
-
-	printf("using seed %u\n", seed);
-	srand(seed);
-
-        count = strtoul(argv[optind + 1], NULL, 0);
-	if (length == LONG_MAX) {
-		iter = strtoul(argv[optind + 2], NULL, 0);
-		printf("running for %lu iterations\n", iter);
-	} else
-		printf("running for %lu seconds\n", length);
-
-        start = last = time(0);
-
-        t = strrchr(base, '/');
-        if (t == NULL) {
-                strcpy(parent, ".");
-                offset = -1;
-        } else {
-                strncpy(parent, base, t - base);
-                offset = t - base + 1;
-        }
-
-	if (mode == 'l') {
-		fd = open(parent, O_RDONLY);
-		if (fd < 0) {
-			printf("open(%s) error: %s\n", parent,
-			       strerror(errno));
-			exit(errno);
-		}
-	}
-
-        for (i = 0; i < iter && time(0) - start < length; i++) {
-                char filename[4096];
-                int tmp;
-
-                tmp = random() % count;
-                sprintf(filename, "%s%d", base, tmp);
-
-                if (mode == 'e') {
-#if 0
-                        fd = open(filename, O_RDWR|O_LARGEFILE);
-                        if (fd < 0) {
-                                printf("open(%s) error: %s\n", filename,
-                                       strerror(errno));
-                                break;
-                        }
-                        rc = ioctl(fd, LDISKFS_IOC_GETEA, NULL);
-                        if (rc < 0) {
-                                printf("ioctl(%s) error: %s\n", filename,
-                                       strerror(errno));
-                                break;
-                        }
-                        close(fd);
-                        break;
-#endif
-		} else if (mode == 's') {
-                        struct stat buf;
-
-                        rc = stat(filename, &buf);
-                        if (rc < 0) {
-                                printf("stat(%s) error: %s\n", filename,
-                                       strerror(errno));
-                                break;
-                        }
-		} else if (mode == 'l') {
-                        struct obd_ioctl_data data;
-                        char rawbuf[8192];
-                        char *buf = rawbuf;
-                        int max = sizeof(rawbuf);
-
-                        memset(&data, 0, sizeof(data));
-                        data.ioc_version = OBD_IOCTL_VERSION;
-                        data.ioc_len = sizeof(data);
-                        if (offset >= 0)
-                                data.ioc_inlbuf1 = filename + offset;
-                        else
-                                data.ioc_inlbuf1 = filename;
-                        data.ioc_inllen1 = strlen(data.ioc_inlbuf1) + 1;
-
-                        if (obd_ioctl_pack(&data, &buf, max)) {
-                                printf("ioctl_pack failed.\n");
-                                break;
-                        }
-
-                        rc = ioctl(fd, IOC_MDC_LOOKUP, buf);
-                        if (rc < 0) {
-                                printf("ioctl(%s) error: %s\n", filename,
-                                       strerror(errno));
-                                break;
-                        }
-                }
-                if ((i % 10000) == 0) {
-                        printf(" - stat %lu (time %ld ; total %ld ; last %ld)\n",
-                               i, time(0), time(0) - start, time(0) - last);
-                        last = time(0);
-                }
-        }
-
-	if (mode == 'l')
-		close(fd);
-
-        printf("total: %lu stats in %ld seconds: %f stats/second\n", i,
-               time(0) - start, ((float)i / (time(0) - start)));
-
-        exit(rc);
-}
diff --git a/lustre/tests/statone.c b/lustre/tests/statone.c
deleted file mode 100644
index e835eaa09477c8ea80f6a04c58d92483aa77eee4..0000000000000000000000000000000000000000
--- a/lustre/tests/statone.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <liblustre.h>
-#include <lustre_lib.h>
-#include <obd.h>
-
-int main(int argc, char **argv)
-{
-    struct obd_ioctl_data data = { 0 };
-    char rawbuf[8192], parent[4096], *buf = rawbuf, *base, *t;
-    int max = sizeof(rawbuf), fd, offset, rc;
-
-    if (argc != 2) {
-        printf("usage: %s filename\n", argv[0]);
-        return 1;
-    }
-
-    base = argv[1];
-    t = strrchr(base, '/');
-    if (!t) {
-        strcpy(parent, ".");
-        offset = -1;
-    } else {
-        strncpy(parent, base, t - base);
-        offset = t - base - 1;
-    }
-
-    fd = open(parent, O_RDONLY);
-    if (fd < 0) {
-        printf("open(%s) error: %s\n", parent, strerror(errno));
-        exit(errno);
-    }
-
-    data.ioc_version = OBD_IOCTL_VERSION;
-    data.ioc_len = sizeof(data);
-    if (offset >= 0)
-        data.ioc_inlbuf1 = base + offset + 2;
-    else
-        data.ioc_inlbuf1 = base;
-    data.ioc_inllen1 = strlen(data.ioc_inlbuf1) + 1;
-    
-    if (obd_ioctl_pack(&data, &buf, max)) {
-        printf("ioctl_pack failed.\n");
-        exit(1);
-    }
-    
-    rc = ioctl(fd, IOC_MDC_LOOKUP, buf);
-    if (rc < 0) {
-        printf("ioctl(%s/%s) error: %s\n", parent,
-               data.ioc_inlbuf1, strerror(errno));
-        exit(errno);
-    }
-
-    return 0;
-}
diff --git a/lustre/tests/tchmod.c b/lustre/tests/tchmod.c
deleted file mode 100644
index 08732ffcdafd4230ce2cf7bbc869f97a32002c93..0000000000000000000000000000000000000000
--- a/lustre/tests/tchmod.c
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
-        mode_t mode;
-
-        if (argc != 3) { 
-                printf("usage: %s mode name\n", argv[0]);
-                return 1;
-        }
-
-        mode = strtoul(argv[1], NULL, 8); 
-        return chmod(argv[2], mode) ? errno : 0;
-}
diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh
deleted file mode 100644
index fb824d3aa90e35c2c6bab225bda38af4f9399d58..0000000000000000000000000000000000000000
--- a/lustre/tests/test-framework.sh
+++ /dev/null
@@ -1,1440 +0,0 @@
-#!/bin/bash
-# vim:expandtab:shiftwidth=4:softtabstop=4:tabstop=4:
-
-trap 'print_summary && echo "test-framework exiting on error"' ERR
-set -e
-#set -x
-
-
-export REFORMAT=${REFORMAT:-""}
-export VERBOSE=false
-export GMNALNID=${GMNALNID:-/usr/sbin/gmlndnid}
-export CATASTROPHE=${CATASTROPHE:-/proc/sys/lnet/catastrophe}
-#export PDSH="pdsh -S -Rssh -w"
-
-# eg, assert_env LUSTRE MDSNODES OSTNODES CLIENTS
-assert_env() {
-    local failed=""
-    for name in $@; do
-        if [ -z "${!name}" ]; then
-            echo "$0: $name must be set"
-            failed=1
-        fi
-    done
-    [ $failed ] && exit 1 || true
-}
-
-usage() {
-    echo "usage: $0 [-r] [-f cfgfile]"
-    echo "       -r: reformat"
-
-    exit
-}
-
-print_summary () {
-    [ "$TESTSUITE" == "lfscktest" ] && return 0
-    [ -n "$ONLY" ] && echo "WARNING: ONLY is set to ${ONLY}."
-    local form="%-13s %-17s %s\n"
-    printf "$form" "status" "script" "skipped tests E(xcluded) S(low)"
-    echo "------------------------------------------------------------------------------------"
-    for O in $TESTSUITE_LIST; do
-        local skipped=""
-        local slow=""
-        local o=$(echo $O | tr "[:upper:]" "[:lower:]")
-        o=${o//_/-}
-        o=${o//tyn/tyN}
-        local log=${TMP}/${o}.log 
-        [ -f $log ] && skipped=$(grep excluded $log | awk '{ printf " %s", $3 }' | sed 's/test_//g')
-        [ -f $log ] && slow=$(grep SLOW $log | awk '{ printf " %s", $3 }' | sed 's/test_//g')
-        [ "${!O}" = "done" ] && \
-            printf "$form" "Done" "$O" "E=$skipped" && \
-            [ -n "$slow" ] && printf "$form" "-" "-" "S=$slow"
-
-    done
-
-    for O in $TESTSUITE_LIST; do
-        [ "${!O}" = "no" ] && \
-            printf "$form" "Skipped" "$O" ""
-    done
-
-    for O in $TESTSUITE_LIST; do
-        [ "${!O}" = "done" -o "${!O}" = "no" ] || \
-            printf "$form" "UNFINISHED" "$O" ""
-    done
-}
-
-init_test_env() {
-    export LUSTRE=`absolute_path $LUSTRE`
-    export TESTSUITE=`basename $0 .sh`
-    export LTESTDIR=${LTESTDIR:-$LUSTRE/../ltest}
-
-    [ -d /r ] && export ROOT=${ROOT:-/r}
-    export TMP=${TMP:-$ROOT/tmp}
-    export TESTSUITELOG=${TMP}/${TESTSUITE}.log
-    export HOSTNAME=${HOSTNAME:-`hostname`}
-
-    export PATH=:$PATH:$LUSTRE/utils:$LUSTRE/tests
-    export LCTL=${LCTL:-"$LUSTRE/utils/lctl"}
-    export LFS=${LFS:-"$LUSTRE/utils/lfs"}
-    [ ! -f "$LCTL" ] && export LCTL=$(which lctl) 
-    export LFS=${LFS:-"$LUSTRE/utils/lfs"}
-    [ ! -f "$LFS" ] && export LFS=$(which lfs) 
-    export MKFS=${MKFS:-"$LUSTRE/utils/mkfs.lustre"}
-    [ ! -f "$MKFS" ] && export MKFS=$(which mkfs.lustre) 
-    export TUNEFS=${TUNEFS:-"$LUSTRE/utils/tunefs.lustre"}
-    [ ! -f "$TUNEFS" ] && export TUNEFS=$(which tunefs.lustre) 
-    export CHECKSTAT="${CHECKSTAT:-"checkstat -v"} "
-    export FSYTPE=${FSTYPE:-"ldiskfs"}
-    export NAME=${NAME:-local}
-    export LPROC=/proc/fs/lustre
-    export DIR2
-    export AT_MAX_PATH
-
-    if [ "$ACCEPTOR_PORT" ]; then
-        export PORT_OPT="--port $ACCEPTOR_PORT"
-    fi
-
-    # Paths on remote nodes, if different 
-    export RLUSTRE=${RLUSTRE:-$LUSTRE}
-    export RPWD=${RPWD:-$PWD}
-    export I_MOUNTED=${I_MOUNTED:-"no"}
-
-    # command line
-    
-    while getopts "rvf:" opt $*; do 
-        case $opt in
-            f) CONFIG=$OPTARG;;
-            r) REFORMAT=--reformat;;
-            v) VERBOSE=true;;
-            \?) usage;;
-        esac
-    done
-
-    shift $((OPTIND - 1))
-    ONLY=${ONLY:-$*}
-
-    [ "$TESTSUITELOG" ] && rm -f $TESTSUITELOG || true
-
-}
-
-case `uname -r` in
-2.4.*) EXT=".o"; USE_QUOTA=no; [ ! "$CLIENTONLY" ] && FSTYPE=ext3;;
-    *) EXT=".ko"; USE_QUOTA=yes;;
-esac
-
-load_module() {
-    module=$1
-    shift
-    BASE=`basename $module $EXT`
-    lsmod | grep -q ${BASE} || \
-      if [ -f ${LUSTRE}/${module}${EXT} ]; then
-        insmod ${LUSTRE}/${module}${EXT} $@
-    else
-        # must be testing a "make install" or "rpm" installation
-        modprobe $BASE $@
-    fi
-}
-
-load_modules() {
-    if [ -n "$MODPROBE" ]; then
-        # use modprobe
-    return 0
-    fi
-    if [ "$HAVE_MODULES" = true ]; then
-    # we already loaded
-        return 0
-    fi
-    HAVE_MODULES=true
-
-    echo Loading modules from $LUSTRE
-    load_module ../lnet/libcfs/libcfs
-    [ "$PTLDEBUG" ] && sysctl -w lnet.debug=$PTLDEBUG
-    [ "$SUBSYSTEM" ] && sysctl -w lnet.subsystem_debug=${SUBSYSTEM# }
-    [ -f /etc/modprobe.conf ] && MODPROBECONF=/etc/modprobe.conf
-    [ -f /etc/modprobe.d/Lustre ] && MODPROBECONF=/etc/modprobe.d/Lustre
-    [ -z "$LNETOPTS" -a -n "$MODPROBECONF" ] && \
-        LNETOPTS=$(awk '/^options lnet/ { print $0}' $MODPROBECONF | sed 's/^options lnet //g')
-    echo "lnet options: '$LNETOPTS'"
-    # note that insmod will ignore anything in modprobe.conf
-    load_module ../lnet/lnet/lnet $LNETOPTS
-    LNETLND=${LNETLND:-"socklnd/ksocklnd"}
-    load_module ../lnet/klnds/$LNETLND
-    load_module lvfs/lvfs
-    load_module obdclass/obdclass
-    load_module ptlrpc/ptlrpc
-    [ "$USE_QUOTA" = "yes" ] && load_module quota/lquota
-    load_module mdc/mdc
-    load_module osc/osc
-    load_module lov/lov
-    load_module mgc/mgc
-    if [ -z "$CLIENTONLY" ] && [ -z "$CLIENTMODSONLY" ]; then
-        load_module mgs/mgs
-        load_module mds/mds
-        grep -q crc16 /proc/kallsyms || { modprobe crc16 2>/dev/null || true; }
-        [ "$FSTYPE" = "ldiskfs" ] && load_module ../ldiskfs/ldiskfs/ldiskfs
-        load_module lvfs/fsfilt_$FSTYPE
-        load_module ost/ost
-        load_module obdfilter/obdfilter
-    fi
-
-    load_module llite/lustre
-    load_module llite/llite_lloop
-    rm -f $TMP/ogdb-$HOSTNAME
-    OGDB=$TMP
-    [ -d /r ] && OGDB="/r/tmp"
-    $LCTL modules > $OGDB/ogdb-$HOSTNAME
-    # 'mount' doesn't look in $PATH, just sbin
-    [ -f $LUSTRE/utils/mount.lustre ] && cp $LUSTRE/utils/mount.lustre /sbin/. || true
-}
-
-RMMOD=rmmod
-if [ `uname -r | cut -c 3` -eq 4 ]; then
-    RMMOD="modprobe -r"
-fi
-
-wait_for_lnet() {
-    local UNLOADED=0
-    local WAIT=0
-    local MAX=60
-    MODULES=$($LCTL modules | awk '{ print $2 }')
-    while [ -n "$MODULES" ]; do
-    sleep 5
-    $RMMOD $MODULES >/dev/null 2>&1 || true
-    MODULES=$($LCTL modules | awk '{ print $2 }')
-        if [ -z "$MODULES" ]; then
-        return 0
-        else
-            WAIT=$((WAIT + 5))
-            echo "waiting, $((MAX - WAIT)) secs left"
-        fi
-        if [ $WAIT -eq $MAX ]; then
-            echo "LNET modules $MODULES will not unload"
-        lsmod
-            return 3
-        fi
-    done
-}
-
-unload_modules() {
-    wait_exit_ST client # bug 12845
-
-    lsmod | grep libcfs > /dev/null && $LCTL dl
-    local MODULES=$($LCTL modules | awk '{ print $2 }' | grep -v libcfs) || true
-    $RMMOD $MODULES > /dev/null 2>&1 || true
-     # do it again, in case we tried to unload ksocklnd too early
-    MODULES=$($LCTL modules | awk '{ print $2 }' | grep -v libcfs) || true
-    [ -n "$MODULES" ] && $RMMOD $MODULES > /dev/null 2>&1 || true
-    lsmod | grep libcfs > /dev/null && $LCTL dk $TMP/debug
-    $RMMOD libcfs
-    MODULES=$($LCTL modules | awk '{ print $2 }')
-    if [ -n "$MODULES" ]; then
-        echo "Modules still loaded: "
-        echo $MODULES 
-        if [ "$(lctl dl)" ]; then
-            echo "Lustre still loaded"
-            lctl dl || true
-            lsmod
-            return 2
-        else
-            echo "Lustre stopped but LNET is still loaded, waiting..."
-            wait_for_lnet || return 3
-        fi
-    fi
-    HAVE_MODULES=false
-
-    LEAK_LUSTRE=$(dmesg | tail -n 30 | grep "obd mem.*leaked" || true)
-    LEAK_PORTALS=$(dmesg | tail -n 20 | grep "Portals memory leaked" || true)
-    if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
-        echo "$LEAK_LUSTRE" 1>&2
-        echo "$LEAK_PORTALS" 1>&2
-        mv $TMP/debug $TMP/debug-leak.`date +%s` || true
-        echo "Memory leaks detected"
-        [ -n "$IGNORE_LEAK" ] && echo "ignoring leaks" && return 0
-        return 254
-    fi
-    echo "modules unloaded."
-    return 0
-}
-
-# Facet functions
-# start facet device options 
-start() {
-    facet=$1
-    shift
-    device=$1
-    shift
-    echo "Starting ${facet}: $@ ${device} ${MOUNT%/*}/${facet}"
-    do_facet ${facet} mkdir -p ${MOUNT%/*}/${facet}
-    do_facet ${facet} mount -t lustre $@ ${device} ${MOUNT%/*}/${facet} 
-    RC=${PIPESTATUS[0]}
-    if [ $RC -ne 0 ]; then
-        echo "mount -t lustre $@ ${device} ${MOUNT%/*}/${facet}" 
-        echo "Start of ${device} on ${facet} failed ${RC}"
-    else 
-        do_facet ${facet} "sysctl -w lnet.debug=$PTLDEBUG; \
-        sysctl -w lnet.subsystem_debug=${SUBSYSTEM# }; \
-        sysctl -w lnet.debug_mb=${DEBUG_SIZE}"
-
-        do_facet ${facet} sync
-        label=$(do_facet ${facet} "e2label ${device}")
-        [ -z "$label" ] && echo no label for ${device} && exit 1
-        eval export ${facet}_svc=${label}
-        eval export ${facet}_dev=${device}
-        eval export ${facet}_opt=\"$@\"
-        echo Started ${label}
-    fi
-    return $RC
-}
-
-stop() {
-    local running
-    facet=$1
-    shift
-    HOST=`facet_active_host $facet`
-    [ -z $HOST ] && echo stop: no host for $facet && return 0
-
-    running=$(do_facet ${facet} "grep -c ${MOUNT%/*}/${facet}' ' /proc/mounts") || true
-    if [ ${running} -ne 0 ]; then
-        echo "Stopping ${MOUNT%/*}/${facet} (opts:$@)"
-        do_facet ${facet} umount -d $@ ${MOUNT%/*}/${facet}
-    fi
-
-    # umount should block, but we should wait for unrelated obd's
-    # like the MGS or MGC to also stop.
-
-    wait_exit_ST ${facet}
-}
-
-zconf_mount() {
-    local OPTIONS
-    local client=$1
-    local mnt=$2
-    # Only supply -o to mount if we have options
-    if [ -n "$MOUNTOPT" ]; then
-        OPTIONS="-o $MOUNTOPT"
-    fi
-    local device=$MGSNID:/$FSNAME
-    if [ -z "$mnt" -o -z "$FSNAME" ]; then
-        echo Bad zconf mount command: opt=$OPTIONS dev=$device mnt=$mnt
-        exit 1
-    fi
-
-    echo "Starting client: $OPTIONS $device $mnt" 
-    do_node $client mkdir -p $mnt
-    do_node $client mount -t lustre $OPTIONS $device $mnt || return 1
-
-    do_node $client "sysctl -w lnet.debug=$PTLDEBUG;
-        sysctl -w lnet.subsystem_debug=${SUBSYSTEM# };
-        sysctl -w lnet.debug_mb=${DEBUG_SIZE}"
-    [ -d /r ] && $LCTL modules > /r/tmp/ogdb-$HOSTNAME
-    return 0
-}
-
-zconf_umount() {
-    client=$1
-    mnt=$2
-    [ "$3" ] && force=-f
-    local running=$(do_node $client "grep -c $mnt' ' /proc/mounts") || true
-    if [ $running -ne 0 ]; then
-        echo "Stopping client $mnt (opts:$force)"
-        lsof | grep "$mnt" || true
-        do_node $client umount $force $mnt
-    fi
-}
-
-shutdown_facet() {
-    facet=$1
-    if [ "$FAILURE_MODE" = HARD ]; then
-        $POWER_DOWN `facet_active_host $facet`
-        sleep 2 
-    elif [ "$FAILURE_MODE" = SOFT ]; then
-        stop $facet
-    fi
-}
-
-reboot_facet() {
-    facet=$1
-    if [ "$FAILURE_MODE" = HARD ]; then
-        $POWER_UP `facet_active_host $facet`
-    else
-        sleep 10
-    fi
-}
-
-# verify that lustre actually cleaned up properly
-cleanup_check() {
-    [ -f $CATASTROPHE ] && [ `cat $CATASTROPHE` -ne 0 ] && \
-        error "LBUG/LASSERT detected"
-    BUSY=`dmesg | grep -i destruct || true`
-    if [ "$BUSY" ]; then
-        echo "$BUSY" 1>&2
-        [ -e $TMP/debug ] && mv $TMP/debug $TMP/debug-busy.`date +%s`
-        exit 205
-    fi
-    LEAK_LUSTRE=`dmesg | tail -n 30 | grep "obd mem.*leaked" || true`
-    LEAK_PORTALS=`dmesg | tail -n 20 | grep "Portals memory leaked" || true`
-    if [ "$LEAK_LUSTRE" -o "$LEAK_PORTALS" ]; then
-        echo "$0: $LEAK_LUSTRE" 1>&2
-        echo "$0: $LEAK_PORTALS" 1>&2
-        echo "$0: Memory leak(s) detected..." 1>&2
-        mv $TMP/debug $TMP/debug-leak.`date +%s`
-        exit 204
-    fi
-
-    [ "`lctl dl 2> /dev/null | wc -l`" -gt 0 ] && lctl dl && \
-        echo "$0: lustre didn't clean up..." 1>&2 && return 202 || true
-
-    if [ "`/sbin/lsmod 2>&1 | egrep 'lnet|libcfs'`" ]; then
-        echo "$0: modules still loaded..." 1>&2
-        /sbin/lsmod 1>&2
-        return 203
-    fi
-    return 0
-}
-
-wait_delete_completed () {
-    local TOTALPREV=`awk 'BEGIN{total=0}; {total+=$1}; END{print total}' \
-            $LPROC/osc/*/kbytesavail`
-
-    local WAIT=0
-    local MAX_WAIT=20
-    while [ "$WAIT" -ne "$MAX_WAIT" ]; do
-        sleep 1
-        TOTAL=`awk 'BEGIN{total=0}; {total+=$1}; END{print total}' \
-            $LPROC/osc/*/kbytesavail`
-        [ "$TOTAL" -eq "$TOTALPREV" ] && break
-        echo "Waiting delete completed ... prev: $TOTALPREV current: $TOTAL "
-        TOTALPREV=$TOTAL
-        WAIT=$(( WAIT + 1))
-    done
-    echo "Delete completed."
-}
-
-wait_for_host() {
-    HOST=$1
-    check_network "$HOST" 900
-    while ! do_node $HOST "ls -d $LUSTRE " > /dev/null; do sleep 5; done
-}
-
-wait_for() {
-    facet=$1
-    HOST=`facet_active_host $facet`
-    wait_for_host $HOST
-}
-
-wait_mds_recovery_done () {
-    local timeout=`do_facet mds sysctl -n lustre.timeout`
-#define OBD_RECOVERY_TIMEOUT (obd_timeout * 5 / 2)
-# as we are in process of changing obd_timeout in different ways
-# let's set MAX longer than that
-    MAX=$(( timeout * 4 ))
-    WAIT=0
-    while [ $WAIT -lt $MAX ]; do
-        STATUS=`do_facet mds grep status /proc/fs/lustre/mds/*-MDT*/recovery_status`
-        echo $STATUS | grep COMPLETE && return 0
-        sleep 5
-        WAIT=$((WAIT + 5))
-        echo "Waiting $(($MAX - $WAIT)) secs for MDS recovery done"
-    done
-    echo "MDS recovery not done in $MAX sec"
-    return 1            
-}
-
-wait_exit_ST () {
-    local facet=$1
-
-    local WAIT=0
-    local INTERVAL=1
-    # conf-sanity 31 takes a long time cleanup
-    while [ $WAIT -lt 300 ]; do
-        running=$(do_facet ${facet} "lsmod | grep lnet > /dev/null && lctl dl | grep ' ST '") || true
-        [ -z "${running}" ] && return 0
-        echo "waited $WAIT for${running}"
-        [ $INTERVAL -lt 64 ] && INTERVAL=$((INTERVAL + INTERVAL))
-        sleep $INTERVAL
-        WAIT=$((WAIT + INTERVAL))
-    done
-    echo "service didn't stop after $WAIT seconds.  Still running:"
-    echo ${running}
-    return 1
-}
-
-client_df() {
-    # not every config has many clients
-    if [ -n "$CLIENTS" ]; then
-        $PDSH $CLIENTS "df $MOUNT" > /dev/null
-    else
-	df $MOUNT > /dev/null
-    fi
-}
-
-client_reconnect() {
-    uname -n >> $MOUNT/recon
-    if [ ! -z "$CLIENTS" ]; then
-        $PDSH $CLIENTS "df $MOUNT; uname -n >> $MOUNT/recon" > /dev/null
-    fi
-    echo Connected clients:
-    cat $MOUNT/recon
-    ls -l $MOUNT/recon > /dev/null
-    rm $MOUNT/recon
-}
-
-facet_failover() {
-    facet=$1
-    echo "Failing $facet on node `facet_active_host $facet`"
-    shutdown_facet $facet
-    reboot_facet $facet
-    client_df &
-    DFPID=$!
-    echo "df pid is $DFPID"
-    change_active $facet
-    TO=`facet_active_host $facet`
-    echo "Failover $facet to $TO"
-    wait_for $facet
-    local dev=${facet}_dev
-    local opt=${facet}_opt
-    start $facet ${!dev} ${!opt} || error "Restart of $facet failed"
-}
-
-obd_name() {
-    local facet=$1
-}
-
-replay_barrier() {
-    local facet=$1
-    do_facet $facet sync
-    df $MOUNT
-    local svc=${facet}_svc
-    do_facet $facet $LCTL --device %${!svc} readonly
-    do_facet $facet $LCTL --device %${!svc} notransno
-    do_facet $facet $LCTL mark "$facet REPLAY BARRIER on ${!svc}"
-    $LCTL mark "local REPLAY BARRIER on ${!svc}"
-}
-
-replay_barrier_nodf() {
-    local facet=$1    echo running=${running}
-    do_facet $facet sync
-    local svc=${facet}_svc
-    echo Replay barrier on ${!svc}
-    do_facet $facet $LCTL --device %${!svc} readonly
-    do_facet $facet $LCTL --device %${!svc} notransno
-    do_facet $facet $LCTL mark "$facet REPLAY BARRIER on ${!svc}"
-    $LCTL mark "local REPLAY BARRIER on ${!svc}"
-}
-
-mds_evict_client() {
-    UUID=`cat /proc/fs/lustre/mdc/${mds_svc}-mdc-*/uuid`
-    do_facet mds "echo $UUID > /proc/fs/lustre/mds/${mds_svc}/evict_client"
-}
-
-ost_evict_client() {
-    UUID=`cat /proc/fs/lustre/osc/${ost1_svc}-osc-*/uuid`
-    do_facet ost1 "echo $UUID > /proc/fs/lustre/obdfilter/${ost1_svc}/evict_client"
-}
-
-fail() {
-    facet_failover $* || error "failover: $?"
-    df $MOUNT || error "post-failover df: $?"
-}
-
-fail_nodf() {
-    local facet=$1
-    facet_failover $facet
-}
-
-fail_abort() {
-    local facet=$1
-    stop $facet
-    change_active $facet
-    local svc=${facet}_svc
-    local dev=${facet}_dev
-    local opt=${facet}_opt
-    start $facet ${!dev} ${!opt}
-    do_facet $facet lctl --device %${!svc} abort_recovery
-    df $MOUNT || echo "first df failed: $?"
-    sleep 1
-    df $MOUNT || error "post-failover df: $?"
-}
-
-do_lmc() {
-    echo There is no lmc.  This is mountconf, baby.
-    exit 1
-}
-
-h2gm () {
-    if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
-        ID=`$PDSH $1 $GMNALNID -l | cut -d\  -f2`
-        echo $ID"@gm"
-    fi
-}
-
-h2ptl() {
-   if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
-       ID=`xtprocadmin -n $1 2>/dev/null | egrep -v 'NID' | awk '{print $1}'`
-       if [ -z "$ID" ]; then
-           echo "Could not get a ptl id for $1..."
-           exit 1
-       fi
-       echo $ID"@ptl"
-   fi
-}
-declare -fx h2ptl
-
-h2tcp() {
-    if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
-        echo $1"@tcp" 
-    fi
-}
-declare -fx h2tcp
-
-h2elan() {
-    if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
-        if type __h2elan >/dev/null 2>&1; then
-            ID=$(__h2elan $1)
-        else
-            ID=`echo $1 | sed 's/[^0-9]*//g'`
-        fi
-        echo $ID"@elan"
-    fi
-}
-declare -fx h2elan
-
-h2openib() {
-    if [ "$1" = "client" -o "$1" = "'*'" ]; then echo \'*\'; else
-        ID=`echo $1 | sed 's/[^0-9]*//g'`
-        echo $ID"@openib"
-    fi
-}
-declare -fx h2openib
-
-facet_host() {
-    local facet=$1
-    varname=${facet}_HOST
-    if [ -z "${!varname}" ]; then
-        if [ "${facet:0:3}" == "ost" ]; then
-            eval ${facet}_HOST=${ost_HOST}
-        fi
-    fi
-    echo -n ${!varname}
-}
-
-facet_active() {
-    local facet=$1
-    local activevar=${facet}active
-
-    if [ -f ./${facet}active ] ; then
-        source ./${facet}active
-    fi
-
-    active=${!activevar}
-    if [ -z "$active" ] ; then 
-        echo -n ${facet}
-    else
-        echo -n ${active}
-    fi
-}
-
-facet_active_host() {
-    local facet=$1
-    local active=`facet_active $facet`
-    if [ "$facet" == client ]; then
-        echo $HOSTNAME
-    else
-        echo `facet_host $active`
-    fi
-}
-
-change_active() {
-    local facet=$1
-    failover=${facet}failover 
-    host=`facet_host $failover`
-    [ -z "$host" ] && return
-    curactive=`facet_active $facet`
-    if [ -z "${curactive}" -o "$curactive" == "$failover" ] ; then
-        eval export ${facet}active=$facet
-    else
-        eval export ${facet}active=$failover
-    fi
-    # save the active host for this facet
-    activevar=${facet}active
-    echo "$activevar=${!activevar}" > ./$activevar
-}
-
-do_node() {
-    HOST=$1
-    shift
-    local myPDSH=$PDSH
-    if [ "$HOST" = "$HOSTNAME" ]; then
-        myPDSH="no_dsh"
-    elif [ -z "$myPDSH" -o "$myPDSH" = "no_dsh" ]; then
-        echo "cannot run remote command on $HOST with $myPDSH"
-        return 128
-    fi
-    if $VERBOSE; then
-        echo "CMD: $HOST $@" >&2
-        $myPDSH $HOST $LCTL mark "$@" > /dev/null 2>&1 || :
-    fi
-
-    if [ "$myPDSH" = "rsh" ]; then
-# we need this because rsh does not return exit code of an executed command
-	local command_status="$TMP/cs"
-	rsh $HOST ":> $command_status"
-	rsh $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin;
-		    cd $RPWD; sh -c \"$@\") || 
-		    echo command failed >$command_status"
-	[ -n "$($myPDSH $HOST cat $command_status)" ] && return 1 || true
-        return 0
-    fi
-    $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed "s/^${HOST}: //"
-    return ${PIPESTATUS[0]}
-}
-
-do_facet() {
-    facet=$1
-    shift
-    HOST=`facet_active_host $facet`
-    [ -z $HOST ] && echo No host defined for facet ${facet} && exit 1
-    do_node $HOST "$@"
-}
-
-add() {
-    local facet=$1
-    shift
-    # make sure its not already running
-    stop ${facet} -f
-    rm -f ${facet}active
-    do_facet ${facet} $MKFS $*
-}
-
-ostdevname() {
-    num=$1
-    DEVNAME=OSTDEV$num
-    #if $OSTDEVn isn't defined, default is $OSTDEVBASE + num
-    eval DEVPTR=${!DEVNAME:=${OSTDEVBASE}${num}}
-    echo -n $DEVPTR
-}
-
-########
-## MountConf setup
-
-stopall() {
-    # make sure we are using the primary server, so test-framework will
-    # be able to clean up properly.
-    activemds=`facet_active mds`
-    if [ $activemds != "mds" ]; then
-        fail mds
-    fi
-    
-    # assume client mount is local 
-    grep " $MOUNT " /proc/mounts && zconf_umount $HOSTNAME $MOUNT $*
-    grep " $MOUNT2 " /proc/mounts && zconf_umount $HOSTNAME $MOUNT2 $*
-    [ "$CLIENTONLY" ] && return
-    stop mds -f
-    for num in `seq $OSTCOUNT`; do
-        stop ost$num -f
-    done
-    return 0
-}
-
-cleanupall() {
-    stopall $*
-    unload_modules
-}
-
-formatall() {
-    [ "$FSTYPE" ] && FSTYPE_OPT="--backfstype $FSTYPE"
-
-    stopall
-    # We need ldiskfs here, may as well load them all
-    load_modules
-    [ "$CLIENTONLY" ] && return
-    echo Formatting mds, osts
-    if $VERBOSE; then
-        add mds $MDS_MKFS_OPTS $FSTYPE_OPT --reformat $MDSDEV || exit 10
-    else
-        add mds $MDS_MKFS_OPTS $FSTYPE_OPT --reformat $MDSDEV > /dev/null || exit 10
-    fi
-
-    for num in `seq $OSTCOUNT`; do
-        if $VERBOSE; then
-            add ost$num $OST_MKFS_OPTS $FSTYPE_OPT --reformat `ostdevname $num` || exit 10
-        else
-            add ost$num $OST_MKFS_OPTS $FSTYPE_OPT --reformat `ostdevname $num` > /dev/null || exit 10
-        fi
-    done
-}
-
-mount_client() {
-    grep " $1 " /proc/mounts || zconf_mount $HOSTNAME $*
-}
-
-remount_client()
-{
-	zconf_umount `hostname` $1 || error "umount failed"
-	zconf_mount `hostname` $1 || error "mount failed"
-}
-
-set_obd_timeout() {
-    local facet=$1
-    local timeout=$2
-
-    do_facet $facet lsmod | grep -q obdclass || \
-        do_facet $facet "modprobe obdclass"
-
-    do_facet $facet "sysctl -w lustre.timeout=$timeout"
-}
-
-setupall() {
-    load_modules
-    if [ -z "$CLIENTONLY" ]; then
-        echo Setup mdt, osts
-        echo $REFORMAT | grep -q "reformat" \
-	    || do_facet mds "$TUNEFS --writeconf $MDSDEV"
-        set_obd_timeout mds $TIMEOUT
-        start mds $MDSDEV $MDS_MOUNT_OPTS
-        for num in `seq $OSTCOUNT`; do
-            DEVNAME=`ostdevname $num`
-            set_obd_timeout ost$num $TIMEOUT
-            start ost$num $DEVNAME $OST_MOUNT_OPTS
-        done
-    fi
-    [ "$DAEMONFILE" ] && $LCTL debug_daemon start $DAEMONFILE $DAEMONSIZE
-    mount_client $MOUNT
-    if [ "$MOUNT_2" ]; then
-        mount_client $MOUNT2
-    fi
-    sleep 5
-}
-
-mounted_lustre_filesystems() {
-	awk '($3 ~ "lustre" && $1 ~ ":") { print $2 }' /proc/mounts
-}
-
-check_and_setup_lustre() {
-    MOUNTED="`mounted_lustre_filesystems`"
-    if [ -z "$MOUNTED" ]; then
-        [ "$REFORMAT" ] && formatall
-        setupall
-        MOUNTED="`mounted_lustre_filesystems`"
-        [ -z "$MOUNTED" ] && error "NAME=$NAME not mounted"
-        export I_MOUNTED=yes
-    fi
-    if [ "$ONLY" == "setup" ]; then
-        exit 0
-    fi
-}
-
-cleanup_and_setup_lustre() {
-    if [ "$ONLY" == "cleanup" -o "`mount | grep $MOUNT`" ]; then
-        sysctl -w lnet.debug=0 || true
-        cleanupall
-        if [ "$ONLY" == "cleanup" ]; then 
-    	    exit 0
-        fi
-    fi
-    check_and_setup_lustre
-}
-
-check_and_cleanup_lustre() {
-    if [ "`mount | grep $MOUNT`" ]; then
-        [ -n "$DIR" ] && rm -rf $DIR/[Rdfs][0-9]*
-    fi
-    if [ "$I_MOUNTED" = "yes" ]; then
-        cleanupall -f || error "cleanup failed"
-    fi
-    unset I_MOUNTED
-}
-
-####### 
-# General functions
-
-check_network() {
-    local NETWORK=0
-    local WAIT=0
-    local MAX=$2
-    while [ $NETWORK -eq 0 ]; do
-        ping -c 1 -w 3 $1 > /dev/null
-        if [ $? -eq 0 ]; then
-            NETWORK=1
-        else
-            WAIT=$((WAIT + 5))
-            echo "waiting for $1, $((MAX - WAIT)) secs left"
-            sleep 5
-        fi
-        if [ $WAIT -gt $MAX ]; then
-            echo "Network not available"
-            exit 1
-        fi
-    done
-}
-check_port() {
-    while( !($DSH2 $1 "netstat -tna | grep -q $2") ) ; do
-        sleep 9
-    done
-}
-
-no_dsh() {
-    shift
-    eval $@
-}
-
-comma_list() {
-    # the sed converts spaces to commas, but leaves the last space
-    # alone, so the line doesn't end with a comma.
-    echo "$*" | tr -s " " "\n" | sort -b -u | tr "\n" " " | sed 's/ \([^$]\)/,\1/g'
-}
-
-absolute_path() {
-    (cd `dirname $1`; echo $PWD/`basename $1`)
-}
-
-##################################
-# Adaptive Timeouts funcs
-
-at_is_valid() {
-    if [ -z "$AT_MAX_PATH" ]; then
-        AT_MAX_PATH=$(do_facet mds "find /sys/ -name at_max")
-        [ -z "$AT_MAX_PATH" ] && echo "missing /sys/.../at_max " && return 1
-    fi
-    return 0
-}
-
-at_is_enabled() {
-    at_is_valid || error "invalid call"
-
-    # only check mds, we assume at_max is the same on all nodes
-    local at_max=$(do_facet mds "cat $AT_MAX_PATH")
-    if [ $at_max -eq 0 ]; then
-        return 1
-    else
-        return 0
-    fi
-}
-
-at_max_get() {
-    at_is_valid || error "invalid call"
-
-    do_facet $1 "cat $AT_MAX_PATH"
-}
-
-at_max_set() {
-    local at_max=$1
-    shift
-
-    at_is_valid || error "invalid call"
-
-    for facet in $@; do
-        if [ $facet == "ost" ]; then
-            for i in `seq $OSTCOUNT`; do
-                do_facet ost$i "echo $at_max > $AT_MAX_PATH"
-            done
-        else
-            do_facet $facet "echo $at_max > $AT_MAX_PATH"
-        fi
-    done
-}
-
-##################################
-# OBD_FAIL funcs
-
-drop_request() {
-# OBD_FAIL_MDS_ALL_REQUEST_NET
-    RC=0
-    do_facet mds sysctl -w lustre.fail_loc=0x123
-    do_facet client "$1" || RC=$?
-    do_facet mds sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-drop_reply() {
-# OBD_FAIL_MDS_ALL_REPLY_NET
-    RC=0
-    do_facet mds sysctl -w lustre.fail_loc=0x122
-    do_facet client "$@" || RC=$?
-    do_facet mds sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-drop_reint_reply() {
-# OBD_FAIL_MDS_REINT_NET_REP
-    RC=0
-    do_facet mds sysctl -w lustre.fail_loc=0x119
-    do_facet client "$@" || RC=$?
-    do_facet mds sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-pause_bulk() {
-#define OBD_FAIL_OST_BRW_PAUSE_BULK      0x214
-    RC=0
-    do_facet ost1 sysctl -w lustre.fail_loc=0x214
-    do_facet client "$1" || RC=$?
-    do_facet client "sync"
-    do_facet ost1 sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-drop_ldlm_cancel() {
-#define OBD_FAIL_LDLM_CANCEL             0x304
-    RC=0
-    do_facet client sysctl -w lustre.fail_loc=0x304
-    do_facet client "$@" || RC=$?
-    do_facet client sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-drop_bl_callback() {
-#define OBD_FAIL_LDLM_BL_CALLBACK        0x305
-    RC=0
-    do_facet client sysctl -w lustre.fail_loc=0x305
-    do_facet client "$@" || RC=$?
-    do_facet client sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-drop_ldlm_reply() {
-#define OBD_FAIL_LDLM_REPLY              0x30c
-    RC=0
-    do_facet mds sysctl -w lustre.fail_loc=0x30c
-    do_facet client "$@" || RC=$?
-    do_facet mds sysctl -w lustre.fail_loc=0
-    return $RC
-}
-
-clear_failloc() {
-    facet=$1
-    pause=$2
-    sleep $pause
-    echo "clearing fail_loc on $facet"
-    do_facet $facet "sysctl -e -w lustre.fail_loc=0"
-}
-
-cancel_lru_locks() {
-    $LCTL mark "cancel_lru_locks $1 start"
-    for d in `find $LPROC/ldlm/namespaces | egrep -i $1`; do
-        [ -f $d/lru_size ] && echo clear > $d/lru_size
-        [ -f $d/lock_unused_count ] && grep [1-9] $d/lock_unused_count /dev/null
-    done
-    $LCTL mark "cancel_lru_locks $1 stop"
-}
-
-default_lru_size()
-{
-        NR_CPU=$(grep -c "processor" /proc/cpuinfo)
-        DEFAULT_LRU_SIZE=$((100 * NR_CPU))
-        echo "$DEFAULT_LRU_SIZE"
-}
-
-lru_resize_enable()
-{
-        NS=$1
-        test "x$NS" = "x" && NS="mdc"
-        for F in $LPROC/ldlm/namespaces/*$NS*/lru_size; do
-                D=$(dirname $F)
-                log "Enable lru resize for $(basename $D)"
-                echo "0" > $F
-        done
-}
-
-lru_resize_disable()
-{
-        NS=$1
-        test "x$NS" = "x" && NS="mdc"
-        for F in $LPROC/ldlm/namespaces/*$NS*/lru_size; do
-                D=$(dirname $F)
-                log "Disable lru resize for $(basename $D)"
-                DEFAULT_LRU_SIZE=$(default_lru_size)
-                echo "$DEFAULT_LRU_SIZE" > $F
-        done
-}
-
-pgcache_empty() {
-    for a in /proc/fs/lustre/llite/*/dump_page_cache; do
-        if [ `wc -l $a | awk '{print $1}'` -gt 1 ]; then
-            echo there is still data in page cache $a ?
-            cat $a;
-            return 1;
-        fi
-    done
-    return 0
-}
-
-debugsave() {
-    DEBUGSAVE="$(sysctl -n lnet.debug)"
-}
-
-debugrestore() {
-    [ -n "$DEBUGSAVE" ] && sysctl -w lnet.debug="${DEBUGSAVE}"
-    DEBUGSAVE=""
-}
-
-##################################
-# Test interface 
-##################################
-
-error_noexit() {
-    local TYPE=${TYPE:-"FAIL"}
-    local ERRLOG
-    sysctl -e -w lustre.fail_loc=0 || true
-    log " ${TESTSUITE} ${TESTNAME}: @@@@@@ ${TYPE}: $@ "
-    ERRLOG=$TMP/lustre_${TESTSUITE}_${TESTNAME}.$(date +%s)
-    echo "Dumping lctl log to $ERRLOG"
-    # We need to dump the logs on all nodes
-    local NODES=$(nodes_list)
-    for NODE in $NODES; do
-        do_node $NODE $LCTL dk $ERRLOG
-    done
-    debugrestore
-    [ "$TESTSUITELOG" ] && echo "$0: ${TYPE}: $TESTNAME $@" >> $TESTSUITELOG
-}
-
-error() {
-    error_noexit "$@"
-    $FAIL_ON_ERROR && exit 1 || true
-}
-
-error_exit() {
-    error_noexit "$@"
-    exit 1
-}
-
-# use only if we are ignoring failures for this test, bugno required.
-# (like ALWAYS_EXCEPT, but run the test and ignore the results.)
-# e.g. error_ignore 5494 "your message"
-error_ignore() {
-    TYPE="IGNORE (bz$1)"
-    shift
-    error_noexit "$@"
-}
-
-skip () {
-	log " SKIP: ${TESTSUITE} ${TESTNAME} $@"
-	[ "$TESTSUITELOG" ] && echo "${TESTSUITE}: SKIP: $TESTNAME $@" >> $TESTSUITELOG
-}
-
-build_test_filter() {
-    [ "$ONLY" ] && log "only running test `echo $ONLY`"
-    for O in $ONLY; do
-        eval ONLY_${O}=true
-    done
-    [ "$EXCEPT$ALWAYS_EXCEPT" ] && \
-        log "skipping tests: `echo $EXCEPT $ALWAYS_EXCEPT`"
-    [ "$EXCEPT_SLOW" ] && \
-        log "skipping tests SLOW=no: `echo $EXCEPT_SLOW`"
-    for E in $EXCEPT $ALWAYS_EXCEPT; do
-        eval EXCEPT_${E}=true
-    done
-    for E in $EXCEPT_SLOW; do
-        eval EXCEPT_SLOW_${E}=true
-    done
-    for G in $GRANT_CHECK_LIST; do
-        eval GCHECK_ONLY_${G}=true
-   	done
-}
-
-_basetest() {
-    echo $*
-}
-
-basetest() {
-    IFS=abcdefghijklmnopqrstuvwxyz _basetest $1
-}
-
-run_test() {
-    export base=`basetest $1`
-    if [ ! -z "$ONLY" ]; then
-        testname=ONLY_$1
-        if [ ${!testname}x != x ]; then
-            run_one $1 "$2"
-            return $?
-        fi
-        testname=ONLY_$base
-        if [ ${!testname}x != x ]; then
-            run_one $1 "$2"
-            return $?
-        fi
-        echo -n "."
-        return 0
-    fi
-    testname=EXCEPT_$1
-    if [ ${!testname}x != x ]; then
-        TESTNAME=test_$1 skip "skipping excluded test $1"
-        return 0
-    fi
-    testname=EXCEPT_$base
-    if [ ${!testname}x != x ]; then
-        TESTNAME=test_$1 skip "skipping excluded test $1 (base $base)"
-        return 0
-    fi
-    testname=EXCEPT_SLOW_$1
-    if [ ${!testname}x != x ]; then
-        TESTNAME=test_$1 skip "skipping SLOW test $1"
-        return 0
-    fi
-    testname=EXCEPT_SLOW_$base
-    if [ ${!testname}x != x ]; then
-        TESTNAME=test_$1 skip "skipping SLOW test $1 (base $base)"
-        return 0
-    fi
-
-    run_one $1 "$2"
-    
-    return $?
-}
-
-EQUALS="======================================================================"
-equals_msg() {
-    msg="$@"
-
-    local suffixlen=$((${#EQUALS} - ${#msg}))
-    [ $suffixlen -lt 5 ] && suffixlen=5
-    log `echo $(printf '===== %s %.*s\n' "$msg" $suffixlen $EQUALS)`
-}
-
-log() {
-    echo "$*"
-    lsmod | grep lnet > /dev/null || load_modules
-
-    local MSG="$*"
-    # Get rif of '
-    MSG=${MSG//\'/\\\'}
-    MSG=${MSG//\(/\\\(}
-    MSG=${MSG//\)/\\\)}
-    MSG=${MSG//\;/\\\;}
-    MSG=${MSG//\|/\\\|}
-    MSG=${MSG//\>/\\\>}
-    MSG=${MSG//\</\\\<}
-    local NODES=$(nodes_list)
-    for NODE in $NODES; do
-        do_node $NODE $LCTL mark "$MSG" 2> /dev/null || true
-    done
-}
-
-trace() {
-	log "STARTING: $*"
-	strace -o $TMP/$1.strace -ttt $*
-	RC=$?
-	log "FINISHED: $*: rc $RC"
-	return 1
-}
-
-pass() {
-    echo PASS $@
-}
-
-check_mds() {
-    FFREE=`cat /proc/fs/lustre/mds/*/filesfree`
-    FTOTAL=`cat /proc/fs/lustre/mds/*/filestotal`
-    [ $FFREE -ge $FTOTAL ] && error "files free $FFREE > total $FTOTAL" || true
-}
-
-reset_fail_loc () {
-    local myNODES=$(nodes_list)
-    local NODE
-
-    for NODE in $myNODES; do
-        do_node $NODE sysctl -e -w lustre.fail_loc=0 || true
-    done
-}
-
-run_one() {
-    testnum=$1
-    message=$2
-    tfile=f${testnum}
-    export tdir=d0.${TESTSUITE}/d${base}
-    local SAVE_UMASK=`umask`
-    umask 0022
-    mkdir -p $DIR/$tdir
-
-    BEFORE=`date +%s`
-    log "== test $testnum: $message ============ `date +%H:%M:%S` ($BEFORE)"
-    #check_mds
-    export TESTNAME=test_$testnum
-    test_${testnum} || error "test_$testnum failed with $?"
-    #check_mds
-    reset_fail_loc
-    check_grant ${testnum} || error "check_grant $testnum failed with $?"
-    [ -f $CATASTROPHE ] && [ `cat $CATASTROPHE` -ne 0 ] && \
-        error "LBUG/LASSERT detected"
-    ps auxww | grep -v grep | grep -q multiop && error "multiop still running"
-    pass "($((`date +%s` - $BEFORE))s)"
-    rmdir ${DIR}/$tdir >/dev/null 2>&1 || true
-    unset TESTNAME
-    unset tdir
-    umask $SAVE_UMASK
-    cd $SAVE_PWD
-    $CLEANUP
-}
-
-canonical_path() {
-    (cd `dirname $1`; echo $PWD/`basename $1`)
-}
-
-sync_clients() {
-    [ -d $DIR1 ] && cd $DIR1 && sync; sleep 1; sync 
-    [ -d $DIR2 ] && cd $DIR2 && sync; sleep 1; sync 
-	cd $SAVE_PWD
-}
-
-check_grant() {
-    export base=`basetest $1`
-    [ "$CHECK_GRANT" == "no" ] && return 0
-
-	testname=GCHECK_ONLY_${base}
-        [ ${!testname}x == x ] && return 0
-
-	echo -n "checking grant......"
-	cd $SAVE_PWD
-	# write some data to sync client lost_grant
-	rm -f $DIR1/${tfile}_check_grant_* 2>&1
-	for i in `seq $OSTCOUNT`; do
-		$LFS setstripe $DIR1/${tfile}_check_grant_$i -i $(($i -1)) -c 1
-		dd if=/dev/zero of=$DIR1/${tfile}_check_grant_$i bs=4k \
-					      count=1 > /dev/null 2>&1 
-	done
-	# sync all the data and make sure no pending data on server
-	sync_clients
-	
-	#get client grant and server grant 
-	client_grant=0
-    for d in ${LPROC}/osc/*/cur_grant_bytes; do 
-		client_grant=$((client_grant + `cat $d`))
-	done
-	server_grant=0
-	for d in ${LPROC}/obdfilter/*/tot_granted; do
-		server_grant=$((server_grant + `cat $d`))
-	done
-
-	# cleanup the check_grant file
-	for i in `seq $OSTCOUNT`; do
-	        rm $DIR1/${tfile}_check_grant_$i
-	done
-
-	#check whether client grant == server grant 
-	if [ $client_grant != $server_grant ]; then
-		echo "failed: client:${client_grant} server: ${server_grant}"
-		return 1
-	else
-		echo "pass"
-	fi
-}
-
-########################
-# helper functions
-
-osc_to_ost()
-{
-    osc=$1
-    ost=`echo $1 | awk -F_ '{print $3}'`
-    if [ -z $ost ]; then
-        ost=`echo $1 | sed 's/-osc.*//'`
-    fi
-    echo $ost
-}
-
-remote_mds ()
-{
-    [ -z "$(lctl dl | grep mdt)" ]
-}
-
-remote_mds_nodsh()
-{
-    remote_mds && [ "$PDSH" = "no_dsh" -o -z "$PDSH" -o -z "$mds_HOST" ]
-}
-
-remote_ost ()
-{
-    [ -z "$(lctl dl | grep ost)" ]
-}
-
-remote_ost_nodsh()
-{
-    remote_ost && [ "$PDSH" = "no_dsh" -o -z "$PDSH" -o -z "$ost_HOST" ]
-}
-
-osts_nodes () {
-    local OSTNODES=$(facet_host ost1)
-    local NODES_sort
-
-    for num in `seq $OSTCOUNT`; do
-        local myOST=$(facet_host ost$num)
-        OSTNODES="$OSTNODES $myOST"
-    done
-    NODES_sort=$(for i in $OSTNODES; do echo $i; done | sort -u)
-
-    echo $NODES_sort
-}
-
-nodes_list () {
-    # FIXME. We need a list of clients
-    local myNODES=$HOSTNAME
-    local myNODES_sort
-
-    if [ "$PDSH" -a "$PDSH" != "no_dsh" ]; then
-        myNODES="$myNODES $(osts_nodes) $mds_HOST"
-    fi
-
-    myNODES_sort=$(for i in $myNODES; do echo $i; done | sort -u)
-
-    echo $myNODES_sort
-}
-
-is_patchless ()
-{
-    lctl get_param version | grep -q patchless
-}
-
-check_runas_id_ret() {
-    local myRC=0
-    local myRUNAS_ID=$1
-    shift
-    local myRUNAS=$@
-    if [ -z "$myRUNAS" ]; then
-        error_exit "myRUNAS command must be specified for check_runas_id"
-    fi
-    mkdir $DIR/d0_runas_test
-    chmod 0755 $DIR
-    chown $myRUNAS_ID:$myRUNAS_ID $DIR/d0_runas_test
-    $myRUNAS touch $DIR/d0_runas_test/f$$ || myRC=1
-    rm -rf $DIR/d0_runas_test
-    return $myRC
-}
-
-check_runas_id() {
-    local myRUNAS_ID=$1
-    shift
-    local myRUNAS=$@
-    check_runas_id_ret $myRUNAS_ID $myRUNAS || \
-        error "unable to write to $DIR/d0_runas_test as UID $myRUNAS_ID. 
-        Please set RUNAS_ID to some UID which exists on MDS and client or 
-        add user $myRUNAS_ID:$myRUNAS_ID on these nodes."
-}
-
-# Run multiop in the background, but wait for it to print
-# "PAUSING" to its stdout before returning from this function.
-multiop_bg_pause() {
-    MULTIOP_PROG=${MULTIOP_PROG:-multiop}
-    FILE=$1
-    ARGS=$2
-
-    TMPPIPE=/tmp/multiop_open_wait_pipe.$$
-    mkfifo $TMPPIPE
-
-    echo "$MULTIOP_PROG $FILE v$ARGS"
-    $MULTIOP_PROG $FILE v$ARGS > $TMPPIPE &
-
-    echo "TMPPIPE=${TMPPIPE}"
-    read -t 60 multiop_output < $TMPPIPE
-    if [ $? -ne 0 ]; then
-        rm -f $TMPPIPE
-        return 1
-    fi
-    rm -f $TMPPIPE
-    if [ "$multiop_output" != "PAUSING" ]; then
-        echo "Incorrect multiop output: $multiop_output"
-        kill -9 $PID
-        return 1
-    fi
-
-    return 0
-}
diff --git a/lustre/tests/test2.c b/lustre/tests/test2.c
deleted file mode 100755
index fbbe6bb3614bf86a538d224b94a424d4ef505e83..0000000000000000000000000000000000000000
--- a/lustre/tests/test2.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (C) 2001  Cluster File Systems, Inc.
- *
- * This code is issued under the GNU General Public License.
- * See the file COPYING in this distribution
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <sys/types.h>
-
-/* Beware when setting FSROOT that I've not made any attempts to avoid buffer
- * overruns below--this is a test program, it's a static buffer. */
-#define FSROOT "/mnt"
-#define OBD_ITERATIONS 10000
-
-int main (int argc, char * argv[])
-{
-	int fd, rc, err = -1;
-	struct stat stat_buf;
-
-	if (argc < 2) {
-		printf("syntax: %s command\n", argv[0]);
-		printf("Where command is one of \"setup\" or \"create\".\n");
-		exit(1);
-	}
-
-	if (!strcmp(argv[1], "setup")) {
-		printf("This is silly.\n");
-	} else if (!strcmp(argv[1], "create")) {
-		int i, iter;
-
-		if (argc < 3) {
-			printf("create requires a nonzero argument.\n");
-			exit(1);
-		}
-
-		iter = atoi(argv[2]);
-
-		if (iter < 1) {
-			printf("create requires a nonzero argument.\n");
-			exit(1);
-		}
-		printf("creating %d files...\n", iter);
-
-		for (i = 0; i < iter; i++) {
-			fd = creat(FSROOT "/foo123", S_IRWXU);
-			close(fd);
-			unlink(FSROOT "/foo123");
-		}
-	} else {
-		printf("Invalid command, run with no arguments for help.\n");
-	}
-
-	return 0;
-}
diff --git a/lustre/tests/test_brw.c b/lustre/tests/test_brw.c
deleted file mode 100644
index fe180219ce3a60dee14fba767f055bd47702cca4..0000000000000000000000000000000000000000
--- a/lustre/tests/test_brw.c
+++ /dev/null
@@ -1,236 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-
-/* for O_DIRECT */
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/mman.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <liblustre.h>
-
-#define READ  1
-#define WRITE 2
-
-#define LPDS sizeof(__u64)
-int block_debug_setup(void *addr, int len, __u64 off, __u64 id)
-{
-        off = cpu_to_le64(off);
-        id = cpu_to_le64(id);
-        memcpy(addr, (char *)&off, LPDS);
-        memcpy(addr + LPDS, (char *)&id, LPDS);
-
-        addr += len - LPDS - LPDS;
-        memcpy(addr, (char *)&off, LPDS);
-        memcpy(addr + LPDS, (char *)&id, LPDS);
-
-        return 0;
-}
-
-int block_debug_check(char *who, void *addr, int size, __u64 off, __u64 id)
-{
-        __u64 ne_off;
-        int err = 0;
-
-        ne_off = le64_to_cpu(off);
-        id = le64_to_cpu(id);
-        if (memcmp(addr, (char *)&ne_off, LPDS)) {
-                CERROR("%s: for offset "LPU64" off: "LPX64" != "LPX64"\n",
-                       who, off, *(__u64 *)addr, ne_off);
-                err = -EINVAL;
-        }
-        if (memcmp(addr + LPDS, (char *)&id, LPDS)) {
-                CERROR("%s: for offset "LPU64" id: "LPX64" != "LPX64"\n",
-                       who, off, *(__u64 *)(addr + LPDS), id);
-                err = -EINVAL;
-        }
-
-        addr += size - LPDS - LPDS;
-        if (memcmp(addr, (char *)&ne_off, LPDS)) {
-                CERROR("%s: for offset "LPU64" end off: "LPX64" != "LPX64"\n",
-                       who, off, *(__u64 *)addr, ne_off);
-                err = -EINVAL;
-        }
-        if (memcmp(addr + LPDS, (char *)&id, LPDS)) {
-                CERROR("%s: for offset "LPU64" end id: "LPX64" != "LPX64"\n",
-                       who, off, *(__u64 *)(addr + LPDS), id);
-                err = -EINVAL;
-        }
-
-        return err;
-}
-#undef LPDS
-
-void usage(char *prog)
-{
-        fprintf(stderr,
-                "usage: %s file count [[d]{r|w|rw} [pages_per_vec [objid]]]\n",
-                prog);
-        exit(1);
-}
-
-int main(int argc, char **argv)
-{
-        int fd;
-        char *buf;
-        long long count, last, offset;
-        long pg_vec, len;
-        __u64 objid;
-        struct stat st;
-        int flags = 0;
-        int cmd = 0;
-        char *end;
-        int rc;
-
-        if (argc < 3 || argc > 6)
-                usage(argv[0]);
-
-        count = strtoull(argv[2], &end, 0);
-        if (*end) {
-                fprintf(stderr, "%s: invalid count '%s'\n", argv[0], argv[2]);
-                usage(argv[0]);
-        }
-        if (argc >= 4) {
-                if (strchr(argv[3], 'r')) {
-                        cmd = READ;
-                        flags = O_RDONLY;
-                }
-                if (strchr(argv[3], 'w')) {
-                        cmd |= WRITE;
-                        flags = O_RDWR | O_CREAT;
-                }
-                if (strchr(argv[3], 'd')) {
-#ifdef O_DIRECT
-                        flags |= O_DIRECT;
-#else
-                        fprintf(stderr,
-                                "%s: O_DIRECT not supported in this build\n",
-                                argv[0]);
-                        exit(1);
-#endif
-                }
-                if (!cmd)
-                        usage(argv[0]);
-        } else {
-                cmd = READ | WRITE;
-                flags = O_RDWR | O_CREAT;
-#ifdef O_DIRECT
-                flags |= O_DIRECT;
-#else
-                fprintf(stderr, "%s: warning: not setting O_DIRECT\n",
-                        argv[0]);
-#endif
-        }
-
-        if (argc >= 5) {
-                pg_vec = strtoul(argv[4], &end, 0);
-                if (*end) {
-                        fprintf(stderr, "%s: invalid pages_per_vec '%s'\n",
-                                argv[0], argv[4]);
-                        usage(argv[0]);
-                }
-        } else {
-                pg_vec = 16;
-        }
-
-        if (argc >= 6) {
-                objid = strtoull(argv[5], &end, 0);
-                if (*end) {
-                        fprintf(stderr, "%s: invalid objid '%s'\n",
-                                argv[0], argv[5]);
-                        usage(argv[0]);
-                }
-        } else {
-                objid = 3;
-        }
-
-        printf("%s: %s on %s(objid "LPX64") for %llux%ld pages \n",
-               argv[0],
-#ifdef O_DIRECT
-               flags & O_DIRECT ? "directio" : "i/o",
-#else
-               "i/o",
-#endif
-               argv[1], objid, count, pg_vec);
-
-        fd = open(argv[1], flags | O_LARGEFILE);
-        if (fd == -1) {
-                fprintf(stderr, "%s: cannot open %s:  %s\n", argv[0],
-                        argv[1], strerror(errno));
-                return 3;
-        }
-
-        rc = fstat(fd, &st);
-        if (rc < 0) {
-                fprintf(stderr, "%s: cannot stat %s: %s\n", argv[0],
-                        argv[1], strerror(errno));
-                return 4;
-        }
-
-        len = pg_vec * st.st_blksize;
-        last = (long long)count * len;
-
-        buf = mmap(0, len, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON, 0, 0);
-        if (buf == MAP_FAILED) {
-                fprintf(stderr, "%s: no buffer memory %s\n",
-                        argv[0], strerror(errno));
-                return 2;
-        }
-
-        for (offset = 0; offset < last && cmd & WRITE; offset += len) {
-                int i;
-
-                for (i = 0; i < len; i += st.st_blksize)
-                        block_debug_setup(buf + i, st.st_blksize, 
-                                          offset + i, objid);
-
-                rc = write(fd, buf, len);
-
-                for (i = 0; i < len; i += st.st_blksize) {
-                        if (block_debug_check("write", buf + i, st.st_blksize,
-                                              offset + i, objid))
-                                return 10;
-                }
-
-                if (rc != len) {
-                        fprintf(stderr, "%s: write error: %s, rc %d != %ld\n",
-                                argv[0], strerror(errno), rc, len);
-                        return 4;
-                }
-        }
-
-        if (lseek(fd, 0, SEEK_SET) != 0) {
-                fprintf(stderr, "%s: cannot seek %s\n",
-                        argv[0], strerror(errno));
-                return 5;
-        }
-
-        for (offset = 0; offset < last && cmd & READ; offset += len) {
-                int i;
-
-                rc = read(fd, buf, len);
-                if (rc != len) {
-                        fprintf(stderr, "%s: read error: %s, rc %d != %ld\n",
-                                argv[0], strerror(errno), rc, len);
-                        return 6;
-                }
-
-                for (i = 0; i < len; i += st.st_blksize) {
-                        if (block_debug_check("read", buf + i, st.st_blksize,
-                                              offset + i, objid))
-                                return 11;
-                }
-        }
-
-        return 0;
-}
diff --git a/lustre/tests/toexcl.c b/lustre/tests/toexcl.c
deleted file mode 100644
index 7f099e88709e16c278ff800bbde20934905bdabf..0000000000000000000000000000000000000000
--- a/lustre/tests/toexcl.c
+++ /dev/null
@@ -1,77 +0,0 @@
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-
-void
-usage (char *argv0, int help)
-{
-	char *progname = strrchr(argv0, '/');
-
-	if (progname == NULL)
-		progname = argv0;
-	
-	fprintf (help ? stdout : stderr,
-		 "Usage: %s [-e] file\n", progname);
-	
-	if (!help)
-	{
-		fprintf (stderr, "   or try '-h' for help\n");
-		exit (1);
-	}
-	
-	printf ("Create the given file with O_EXCL...\n");
-	printf (" -e    expect EEXIST\n");
-	printf (" -h    print help");
-	printf (" Exit status is 0 on success, 1 on failure\n");
-}
-
-int main(int argc, char **argv)
-{
-        int rc;
-	int want_eexist = 0;
-	
-	while ((rc = getopt (argc, argv, "eh")) != -1)
-		switch (rc)
-		{
-		case 'e':
-			want_eexist = 1;
-			break;
-		case 'h':
-			usage (argv[1], 1);
-			return (0);
-		default:
-			usage (argv[0], 0);
-		}
-	
-        if (optind != argc - 1) { 
-		usage (argv[0], 0);
-                return 1;
-        }
-
-        rc = open(argv[optind], O_CREAT|O_EXCL, 0644);
-        if (rc == -1)
-	{
-		if (want_eexist && errno == EEXIST)
-		{
-			printf("open failed: %s (expected)\n", strerror(errno));
-			return (0);
-		}
-		printf("open failed: %s\n", strerror(errno));
-		return (1);
-	} else {
-		if (want_eexist)
-		{
-			printf("open success (expecting EEXIST).\n");
-			return (1);
-		}
-		printf("open success.\n");
-		return (0);
-	}
-	
-	return ((rc == 0) ? 0 : 1);
-}
diff --git a/lustre/tests/truncate.c b/lustre/tests/truncate.c
deleted file mode 100644
index c49fb15ba05c35b33948770e4d64eb66a0d7b827..0000000000000000000000000000000000000000
--- a/lustre/tests/truncate.c
+++ /dev/null
@@ -1,24 +0,0 @@
-#include <unistd.h>
-#include <stdio.h>
-#include <errno.h>
-#include <string.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
-	unsigned long long off;
-	int err;
-
-	if (argc != 3) {
-		printf("usage %s file bytes\n", argv[0]);
-		return 1;
-	}
-
-	off = strtoull(argv[2], NULL, 0);
-	err = truncate64(argv[1], off);
-	if ( err )
-		printf("Error truncating %s to %Ld: %s\n", argv[1], off,
-		       strerror(errno));
-
-	return err;
-}
diff --git a/lustre/tests/unlinkmany.c b/lustre/tests/unlinkmany.c
deleted file mode 100644
index 080b1c6638d29d815add76010b7946eb0f307a9e..0000000000000000000000000000000000000000
--- a/lustre/tests/unlinkmany.c
+++ /dev/null
@@ -1,84 +0,0 @@
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <time.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-void usage(char *prog)
-{
-	printf("usage: %s filenamefmt count\n", prog);
-	printf("       %s filenamefmt start count\n", prog);
-}
-
-int main(int argc, char ** argv)
-{
-        int i, rc = 0, do_rmdir = 0;
-        char format[4096], *fmt;
-        char filename[4096];
-        long start, last;
-	long begin = 0, count;
-
-        if (argc < 3 || argc > 5) {
-		usage(argv[0]);
-                return 1;
-        }
-
-	if (strcmp(argv[1], "-d") == 0) {
-		do_rmdir = 1;
-		argv++;
-		argc--;
-	}
-
-        if (strlen(argv[1]) > 4080) {
-                printf("name too long\n");
-                return 1;
-        }
-
-        start = last = time(0);
-
-	if (argc == 3) {
-		count = strtol(argv[2], NULL, 0);
-		if (count < 1) {
-                        printf("count must be at least one\n");
-                        return 1;
-                }
-	} else {
-		begin = strtol(argv[2], NULL, 0);
-		count = strtol(argv[3], NULL, 0);
-	}
-
-	if (strchr(argv[1], '%')) {
-		fmt = argv[1];
-        } else {
-		sprintf(format, "%s%%d", argv[1]);
-		fmt = format;
-	}
-        for (i = 0; i < count; i++, begin++) {
-                sprintf(filename, fmt, begin);
-		if (do_rmdir)
-			rc = rmdir(filename);
-		else
-			rc = unlink(filename);
-                if (rc) {
-                        printf("%s(%s) error: %s\n",
-			       do_rmdir ? "rmdir" : "unlink",
-                               filename, strerror(errno));
-                        rc = errno;
-                        break;
-                }
-                if ((i % 10000) == 0) {
-                        printf(" - unlinked %d (time %ld ; total %ld ; last "
-                               "%ld)\n", i, time(0), time(0) - start,
-                               time(0) - last);
-                        last = time(0);
-                }
-        }
-        printf("total: %d unlinks in %ld seconds: %f unlinks/second\n", i,
-               time(0) - start, ((float)i / (time(0) - start)));
-
-        return rc;
-}
diff --git a/lustre/tests/utime.c b/lustre/tests/utime.c
deleted file mode 100644
index 8d8cd08dd3d22a806c0d0e5ebd2939be57631838..0000000000000000000000000000000000000000
--- a/lustre/tests/utime.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/*
- * Simple test for validating mtime on a file create and set via utime.
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <time.h>
-#include <string.h>
-#include <utime.h>
-#include <errno.h>
-
-void usage(char *prog)
-{
-	fprintf(stderr, "usage: %s <filename> [-s <filename>]\n", prog);
-	exit(1);
-}
-
-int main(int argc, char *argv[])
-{
-	long before_mknod, after_mknod;
-	const char *prog = argv[0];
-        const char *filename = argv[1];
-        char *secname = NULL;
-        struct utimbuf utb;
-	struct stat st, st2;
-	int rc;
-        int c;
-
-	utb.actime = 200000;
-	utb.modtime = 100000;
-
-        while ((c = getopt(argc, argv, "s:")) != -1) {
-                switch(c) {
-                case 's':
-                        secname = optarg;
-                        break;
-                default:
-		        usage(argv[0]);
-                }
-        }
-	if (optind + 1 > argc)
-		usage(argv[0]);
-
-	/* Adjust the before time back one second, because the kernel's
-	 * CURRENT_TIME (lockless clock reading, used to set inode times)
-	 * may drift against the do_gettimeofday() time (TSC-corrected and
-	 * locked clock reading, used to return timestamps to user space).
-	 * This means that the mknod time could be a second older than the
-	 * before time, even for a local filesystem such as ext3.
-	 */
-	before_mknod = time(0) - 1;
-	rc = mknod(filename, 0700, S_IFREG);
-	after_mknod = time(0);
-	if (rc && errno != EEXIST) {
-		fprintf(stderr, "%s: mknod(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 2;
-	} else if (!rc) {
-		rc = stat(filename, &st);
-		if (rc) {
-			fprintf(stderr, "%s: stat(%s) failed: rc %d: %s\n",
-				prog, filename, errno, strerror(errno));
-			return 3;
-		}
-
-		if (st.st_mtime < before_mknod || st.st_mtime > after_mknod) {
-			fprintf(stderr,
-				"%s: bad mknod times %lu <= %lu <= %lu false\n",
-				prog, before_mknod, st.st_mtime, after_mknod);
-			return 4;
-		}
-
-		printf("%s: good mknod times %lu%s <= %lu <= %lu for %s\n",
-		       prog, before_mknod, before_mknod == st.st_mtime ? "*":"",
-		       st.st_mtime, after_mknod, filename);
-
-                if (secname) {
-                        sleep(1);
-                        rc = stat(secname, &st2);
-                        if (rc) {
-                                fprintf(stderr, "%s: stat(%s) failed: rc %d: "
-                                        "%s\n", prog, secname, errno,
-                                        strerror(errno));
-                                return 5;
-                        }
-
-                        if (st2.st_mtime < before_mknod || 
-                            st2.st_mtime > after_mknod) {
-                                fprintf(stderr, "%s: bad mknod times %lu <= %lu"
-                                        " <= %lu false\n", prog, before_mknod,
-                                        st2.st_mtime, after_mknod);
-                                return 6;
-                        }
-
-                        printf("%s: good mknod times %lu%s <= %lu <= %lu "
-                               "for %s\n", prog, before_mknod, 
-                               before_mknod == st.st_mtime ? "*":"", 
-                               st2.st_mtime, after_mknod, secname);
-                }
-	}
-
-	/* See above */
-	rc = utime(filename, &utb);
-	if (rc) {
-		fprintf(stderr, "%s: utime(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 7;
-	}
-        
-	rc = stat(filename, &st);
-	if (rc) {
-		fprintf(stderr, "%s: second stat(%s) failed: rc %d: %s\n",
-			prog, filename, errno, strerror(errno));
-		return 8;
-	}
-
-	if (st.st_mtime != utb.modtime ) {
-		fprintf(stderr, "%s: bad utime mtime %lu should be  %lu\n",
-			prog, st.st_mtime, utb.modtime);
-		return 9;
-	}
-
-	if (st.st_atime != utb.actime ) {
-		fprintf(stderr, "%s: bad utime atime %lu should be  %lu\n",
-			prog, st.st_atime, utb.actime);
-		return 10;
-	}
-
-	printf("%s: good utime mtimes %lu, atime %lu\n",
-	       prog, utb.modtime, utb.actime);
-
-        if (secname == NULL)
-                return 0;
-        
-        /* Checking that times in past get updated on another client. */
-	rc = stat(secname, &st2);
-        if (rc) {
-		fprintf(stderr, "%s: second stat(%s) failed: rc %d: %s\n",
-			prog, secname, errno, strerror(errno));
-		return 12;
-	}
-
-	if (st2.st_mtime != st.st_mtime) {
-		fprintf(stderr, "%s: not synced mtime between clients: %lu "
-                        "should be  %lu\n", prog, st2.st_mtime, st.st_mtime);
-		return 13;
-	}
-
-	if (st2.st_ctime != st.st_ctime) {
-		fprintf(stderr, "%s: not synced ctime between clients: %lu "
-                        " should be  %lu\n", prog, st2.st_ctime, st.st_ctime);
-		return 14;
-	}
-	
-        printf("%s: updated times for %s\n", prog, secname);
-        
-	return 0;
-}
diff --git a/lustre/tests/wantedi.c b/lustre/tests/wantedi.c
deleted file mode 100644
index 7c78924ce48af07f8288bb14a01297d816a8ef8a..0000000000000000000000000000000000000000
--- a/lustre/tests/wantedi.c
+++ /dev/null
@@ -1,49 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <unistd.h>
-#include <time.h>
-#include <limits.h>
-#include <sys/ioctl.h>
-#include <liblustre.h>
-#include <obd.h>
-#include <lustre_lib.h>
-
-static int usage(char *prog, FILE *out)
-{
-        fprintf(out,
-		"Usage: %s <dir> <desired child ino>\n", prog);
-        exit(out == stderr);
-}
-
-#define LDISKFS_IOC_CREATE_INUM            _IOW('f', 5, long)
-
-int main(int argc, char ** argv)
-{
-        int dirfd, wantedi, rc;
-
-	if (argc < 2 || argc > 3)
-		usage(argv[0], stderr);
-	
-	dirfd = open(argv[1], O_RDONLY);
-	if (dirfd < 0) {
-	       perror("open");
-	       exit(1);
-	}
-        
-	wantedi = atoi(argv[2]);
-	printf("Creating %s/%d with ino %d\n", argv[1], wantedi, wantedi);
-
-	rc = ioctl(dirfd, LDISKFS_IOC_CREATE_INUM, wantedi);
-	if (rc < 0) {
-	       perror("ioctl(LDISKFS_IOC_CREATE_INUM)");
-	       exit(2);
-	}
-
-        return 0;
-}
diff --git a/lustre/tests/write_append_truncate.c b/lustre/tests/write_append_truncate.c
deleted file mode 100644
index 8f950430f223fe86ff663cb2df5d3996f23e57d4..0000000000000000000000000000000000000000
--- a/lustre/tests/write_append_truncate.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Each loop does 3 things:
- *   - truncate file to zero (not via ftruncate though, to test O_APPEND)
- *   - append a "chunk" of data (should be at file offset 0 after truncate)
- *   - on each of two threads either append or truncate-up the file
- *
- * If the truncate happened first, we should have a hole in the file.
- * If the append happened first, we should have truncated the file down.
- *
- * We pick the CHUNK_SIZE_MAX and APPEND_SIZE_MAX so that we cross a stripe.
- *
- * compile: mpicc -g -Wall -o write_append_truncate write_append_truncate.c
- * run:     mpirun -np 2 -machlist <hostlist file> write_append_truncate <file>
- *  or:     pdsh -w <two hosts> write_append_truncate <file>
- *  or:     prun -n 2 [-N 2] write_append_truncate <file>
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include "mpi.h"
-
-#define DEFAULT_ITER     50000
-
-#define CHUNK_SIZE_MAX   123456
-#define CHUNK_CHAR   'C'
-
-#define APPEND_SIZE_MAX  123456
-#define APPEND_CHAR  'A'
-
-#define TRUNC_SIZE_MAX   (CHUNK_SIZE_MAX+APPEND_SIZE_MAX)
-
-#define HOSTNAME_SIZE 50
-
-void usage(char *prog)
-{
-        printf("usage: %s <filename> [nloops]\n", prog);
-        printf("%s must be run with at least 2 processes\n", prog);
-
-        MPI_Finalize();
-        exit(1);
-}
-
-/* Print process rank, loop count, message, and exit (i.e. a fatal error) */
-void rprintf(int rank, int loop, const char *fmt, ...)
-{
-        va_list       ap;
-
-        printf("rank %d, loop %d: ", rank, loop);
-
-        va_start(ap, fmt);
-
-        vprintf(fmt, ap);
-
-        MPI_Abort(MPI_COMM_WORLD, -1);
-}
-
-int main(int argc, char *argv[])
-{
-        int n, nloops = 0, fd;
-        int rank, size, ret;
-        int chunk_size, append_size, trunc_offset;
-        char append_buf[APPEND_SIZE_MAX];
-        char chunk_buf[CHUNK_SIZE_MAX];
-        char read_buf[TRUNC_SIZE_MAX+APPEND_SIZE_MAX];
-        char trunc_buf[TRUNC_SIZE_MAX];
-        int done;
-        int error;
-        char hostname[HOSTNAME_SIZE];
-        char *fname, *prog;
-
-        error = MPI_Init(&argc, &argv);
-        if (error != MPI_SUCCESS)
-                rprintf(-1, -1, "MPI_Init failed: %d\n", error);
-
-        prog = strrchr(argv[0], '/');
-        if (prog == NULL)
-                prog = argv[0];
-        else
-                prog++;
-
-        if (argc < 2 || argc > 3)
-                usage(prog);
-
-        error = MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-        if (error != MPI_SUCCESS)
-                rprintf(-1, -1, "MPI_Comm_rank failed: %d\n", error);
-
-        error = MPI_Comm_size(MPI_COMM_WORLD, &size);
-        if (error != MPI_SUCCESS)
-                rprintf(rank, -1, "MPI_Comm_size failed: %d\n", error);
-
-        if (size < 2)
-                rprintf(rank, -1, "%s: must run with at least 2 processes\n",
-                        prog);
-
-        memset(append_buf, APPEND_CHAR, APPEND_SIZE_MAX);
-        memset(chunk_buf, CHUNK_CHAR, CHUNK_SIZE_MAX);
-        memset(trunc_buf, 0, TRUNC_SIZE_MAX);
-
-        if (gethostname(hostname, HOSTNAME_SIZE) < 0)
-                rprintf(rank, -1, "gethostname failed: %s\n", strerror(errno));
-
-        fname = argv[1];
-
-        if (argc == 3)
-                nloops = strtoul(argv[2], NULL, 0);
-        if (nloops == 0)
-                nloops = DEFAULT_ITER;
-
-        if (rank == 0) {
-                fd = open(fname, O_WRONLY|O_CREAT|O_TRUNC, 0666);
-                if (fd < 0)
-                        rprintf(0, -1, "create %s failed: %s\n", fname,
-                                strerror(errno));
-                printf("using %s\n", fname);
-        }
-        error = MPI_Barrier(MPI_COMM_WORLD);
-        if (error != MPI_SUCCESS)
-                rprintf(rank, -1, "prep MPI_Barrier failed: %d\n", error);
-
-        fd = open(fname, O_RDWR | O_APPEND);
-        if (fd < 0)
-                rprintf(rank, -1, "open %s failed: %s\n",fname,strerror(errno));
-
-        for (n = 0; n < nloops; n++) {
-                /* reset the environment */
-                chunk_size = (rand()%(CHUNK_SIZE_MAX-1))+1;
-                append_size = (rand()%(APPEND_SIZE_MAX-1))+1;
-                trunc_offset = chunk_size + rand()%append_size;
-                if (rank == 0) {
-                        if (n % 1000 == 0)
-                                printf("loop %5d: chunk %6d/%#07x, "
-                                       "append %6d/%#07x, trunc @ %6d/%#07x\n",
-                                       n, chunk_size, chunk_size, append_size,
-                                       append_size, trunc_offset, trunc_offset);
-
-                        ret = truncate(fname, (off_t)0);
-                        if (ret < 0)
-                                rprintf(0, n, "truncate @ 0: %s\n",
-                                        strerror(errno));
-                        done = 0;
-                        do {
-                                ret = write(fd, chunk_buf+done,chunk_size-done);
-                                if (ret <= 0) {
-                                        rprintf(0, n, "chunk @ %d: %s\n",
-                                                done, strerror(errno));
-                                        break;
-                                }
-                                done += ret;
-                        } while (done != chunk_size);
-                }
-
-                error = MPI_Barrier(MPI_COMM_WORLD);
-                if (error != MPI_SUCCESS)
-                        rprintf(rank, n, "start MPI_Barrier: %d\n",error);
-
-                /* Do the race */
-                if (rank == n % size) {
-                        //
-                        done = 0;
-                        do {
-                                ret = write(fd, append_buf + done,
-                                            append_size - done);
-                                if (ret < 0) {
-                                        rprintf(rank, n,
-                                                "loop %d: append @ %u: %s\n",
-                                                done, strerror(errno));
-                                        break;
-                                }
-                                done += ret;
-                        } while (done != append_size);
-                } else if (rank == (n + 1) % size) {
-                        ret = truncate(fname, (off_t)trunc_offset);
-                        if (ret != 0)
-                                rprintf(rank, n, "truncate @ %u: %s\n",
-                                        trunc_offset, strerror(errno) );
-                }
-
-                error = MPI_Barrier(MPI_COMM_WORLD);
-                if (error != MPI_SUCCESS)
-                        rprintf(rank, n, "end MPI_Barrier: %d\n", error);
-
-                error = 0;
-
-                /* Check the result */
-                if (rank == 0) {
-                        struct stat st;
-                        if (stat(fname, &st) < 0)
-                                rprintf(0, n, "loop %d: stat %s: %s\n",
-                                        fname, strerror(errno));
-
-                        if (lseek(fd, (off_t)0, SEEK_SET) != 0)
-                                rprintf(0, n, "lseek fname 0: %s\n", fname,
-                                        strerror(errno));
-
-                        done = 0;
-                        do {
-                                ret = read(fd, read_buf+done, st.st_size-done);
-                                if (ret < 0) {
-                                        rprintf(0, n, "read @ %u: %s\n",
-                                               done, strerror(errno));
-                                }
-                                done += ret;
-                        } while (done != st.st_size);
-
-                        if (memcmp(read_buf, chunk_buf, chunk_size)) {
-                                printf("loop %d: base chunk bad"
-                                       " [0-%d]/[0-%#x] != %c\n", n,
-                                       chunk_size - 1, chunk_size - 1,
-                                       CHUNK_CHAR);
-                                error = 1;
-                        }
-
-                        if (st.st_size == trunc_offset) {
-                                /* Check case 1: first append then truncate */
-                                error = memcmp(read_buf+chunk_size, append_buf,
-                                               trunc_offset - chunk_size);
-                                if (error) {
-                                        printf("loop %d: trunc-after-append bad"
-                                               " [%d-%d]/[%#x-%#x] != %c\n",
-                                               n, chunk_size, trunc_offset - 1,
-                                               chunk_size, trunc_offset - 1,
-                                               APPEND_CHAR);
-                                }
-                        } else {
-                                /* Check case 2: first truncate then append */
-                                if (memcmp(read_buf+chunk_size, trunc_buf,
-                                           trunc_offset-chunk_size)) {
-                                        printf("loop %d: append-after-TRUNC bad"
-                                               " [%d-%d]/[%#x-%#x] != 0\n",
-                                               n, chunk_size, trunc_offset - 1,
-                                               chunk_size, trunc_offset - 1);
-                                        error = 1;
-                                } else if (memcmp(read_buf+trunc_offset,
-                                                  append_buf, append_size)) {
-                                        printf("loop %d: APPEND-after-trunc bad"
-                                               " [%d-%d]/[%#x-%#x] != %c\n",
-                                               n, trunc_offset, append_size - 1,
-                                               trunc_offset, append_size - 1,
-                                               APPEND_CHAR);
-                                        error = 1;
-                                }
-                        }
-                }
-                ret = MPI_Bcast(&error, 1, MPI_INT, 0, MPI_COMM_WORLD);
-                if (ret != MPI_SUCCESS)
-                        rprintf(rank, n, "MPI_Bcast: %d\n");
-
-                if (error == 1) {
-                        if (rank == 0) {
-                                char command[4096];
-
-                                printf("loop %5d: chunk %6d/%#07x, "
-                                       "append %6d/%#07x, trunc @ %6d/%#07x\n",
-                                       n, chunk_size, chunk_size, append_size,
-                                       append_size, trunc_offset, trunc_offset);
-
-                                sprintf(command, "od -Ax -a %s", fname);
-                                system(command);
-                        }
-                        rprintf(rank, n, "on machine %s with pid %d\n",
-                                hostname, (int)getpid());
-                }
-        }
-
-        printf("rank %d, loop %d: finished\n", rank, n);
-        close(fd);
-
-        if (rank == 0) {
-                error = unlink(fname);
-                if (error < 0)
-                        rprintf(0, n, "unlink %s failed: %s\n",
-                                fname, strerror(errno));
-        }
-
-        MPI_Finalize();
-        return 0;
-}
diff --git a/lustre/tests/write_disjoint.c b/lustre/tests/write_disjoint.c
deleted file mode 100644
index 431c14c77a16fdc1bb5e136661b334b59604aa1c..0000000000000000000000000000000000000000
--- a/lustre/tests/write_disjoint.c
+++ /dev/null
@@ -1,195 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Each loop does 3 things:
- *   - rank 0 truncates to 0
- *   - all ranks agree on a random chunk size
- *   - all ranks race to write their pattern to their chunk of the file
- *   - rank 0 makes sure that the resulting file size is ranks * chunk size
- *   - rank 0 makes sure that everyone's patterns went to the right place
- *
- * compile: mpicc -g -Wall -o write_disjoint write_disjoint.c
- * run:     mpirun -np N -machlist <hostlist file> write_disjoint
- *  or:     pdsh -w <N hosts> write_disjoint
- *  or:     prun -n N [-N M] write_disjoint
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <string.h>
-#include <errno.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include "mpi.h"
-
-#define CHUNK_MAX_SIZE 123456
-
-void rprintf(int rank, int loop, const char *fmt, ...)
-{
-        va_list       ap;
-
-        printf("rank %d, loop %d: ", rank, loop);
-
-        va_start(ap, fmt);
-
-        vprintf(fmt, ap);
-
-        MPI_Abort(MPI_COMM_WORLD, -1); /* This will exit() according to man */
-}
-
-#define CHUNK_SIZE(n) chunk_size[(n) % 2]
-
-int main (int argc, char *argv[]) {
-        int i, n, fd;
-        unsigned long chunk_size[2];
-        int rank, noProcessors, done;
-        int error;
-        off_t offset;
-        char **chunk_buf;
-        char *read_buf, c;
-        struct stat stat_buf;
-        ssize_t ret;
-        char *filename = "/mnt/lustre/write_disjoint";
-        int numloops = 1000;
-
-        error = MPI_Init(&argc, &argv);
-        if (error != MPI_SUCCESS)
-                rprintf(-1, -1, "MPI_Init failed: %d\n", error);
-        /* Parse command line options */
-        while ((c = getopt(argc, argv, "f:n:")) != EOF) {
-                switch (c) {
-                case 'f':
-                        filename = optarg;
-                        break;
-                case 'n':
-                        numloops = strtoul(optarg, NULL, 0);
-                        break;
-                }
-        }
-
-        MPI_Comm_size(MPI_COMM_WORLD, &noProcessors);
-        MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-
-        chunk_buf = malloc(noProcessors * sizeof(chunk_buf[0]));
-        for (i=0; i < noProcessors; i++) {
-                chunk_buf[i] = malloc(CHUNK_MAX_SIZE);
-                memset(chunk_buf[i], 'A'+ i, CHUNK_MAX_SIZE);
-        }
-        read_buf = malloc(noProcessors * CHUNK_MAX_SIZE);
-
-        if (rank == 0) {
-                fd = open(filename, O_WRONLY|O_CREAT|O_TRUNC, 0666);
-                if (fd < 0)
-                        rprintf(rank, -1, "open() returned %s\n",
-                                strerror(errno));
-        }
-        MPI_Barrier(MPI_COMM_WORLD);
-
-        fd = open(filename, O_RDWR);
-        if (fd < 0)
-                rprintf(rank, -1, "open() returned %s\n", strerror(errno));
-
-        for (n = 0; n < numloops; n++) {
-                /* reset the environment */
-                if (rank == 0) {
-                        ret = truncate(filename, 0);
-                        if (ret != 0)
-                                rprintf(rank, n, "truncate() returned %s\n",
-                                        strerror(errno) );
-                }
-                CHUNK_SIZE(n) = rand() % CHUNK_MAX_SIZE;
-
-                if (n % 1000 == 0 && rank == 0)
-                        printf("loop %d: chunk_size %lu\n", n, CHUNK_SIZE(n));
-
-                MPI_Barrier(MPI_COMM_WORLD);
-
-                /* Do the race */
-                offset = rank * CHUNK_SIZE(n);
-                lseek(fd, offset, SEEK_SET);
-
-                done = 0;
-                do {
-                        ret = write(fd, chunk_buf[rank] + done,
-                                    CHUNK_SIZE(n) - done);
-                        if (ret < 0)
-                                rprintf(rank, n, "write() returned %s\n",
-                                        strerror(errno));
-                        done += ret;
-                } while (done != CHUNK_SIZE(n));
-
-                MPI_Barrier(MPI_COMM_WORLD);
-
-                /* Check the result */
-                if (stat(filename, &stat_buf) < 0)
-                        rprintf(rank, n, "error stating %s: %s\n",
-                                filename, strerror(errno));
-
-                if (stat_buf.st_size != CHUNK_SIZE(n) * noProcessors) {
-                        if (n > 0)
-                                printf("loop %d: chunk_size %lu, "
-                                       "file size was %lu\n",
-                                       n - 1, CHUNK_SIZE(n - 1),
-                                       CHUNK_SIZE(n - 1) *noProcessors);
-                        rprintf(rank, n, "invalid file size %lu"
-                                " instead of %lu = %lu * %u\n",
-                                (unsigned long)stat_buf.st_size,
-                                CHUNK_SIZE(n) * noProcessors,
-                                CHUNK_SIZE(n), noProcessors);
-                }
-
-                if (rank == 0) {
-                        if (lseek(fd, 0, SEEK_SET) < 0)
-                                rprintf(rank, n, "error seeking to 0: %s\n",
-                                        strerror(errno));
-
-                        done = 0;
-                        do {
-                                ret = read(fd, read_buf + done,
-                                           CHUNK_SIZE(n) * noProcessors - done);
-                                if (ret < 0)
-                                        rprintf(rank, n, "read returned %s\n",
-                                                strerror(errno));
-
-                                done += ret;
-                        } while (done != CHUNK_SIZE(n) * noProcessors);
-
-                        for (i = 0; i < noProcessors; i++) {
-                                char command[4096];
-                                int j;
-                                if (!memcmp(read_buf + (i * CHUNK_SIZE(n)),
-                                            chunk_buf[i], CHUNK_SIZE(n)))
-                                        continue;
-
-                                /* print out previous chunk sizes */
-                                if (n > 0)
-                                        printf("loop %d: chunk_size %lu\n",
-                                               n - 1, CHUNK_SIZE(n - 1));
-
-                                printf("loop %d: chunk %d corrupted "
-                                       "with chunk_size %lu, page_size %d\n",
-                                       n, i, CHUNK_SIZE(n), getpagesize());
-                                printf("ranks:\tpage boundry\tchunk boundry\t"
-                                       "page boundry\n");
-                                for (j = 1 ; j < noProcessors; j++) {
-                                        int b = j * CHUNK_SIZE(n);
-                                        printf("%c -> %c:\t%d\t%d\t%d\n",
-                                               'A' + j - 1, 'A' + j,
-                                               b & ~(getpagesize()-1), b,
-                                               (b + getpagesize()) &
-                                               ~(getpagesize()-1));
-                                }
-
-                                sprintf(command, "od -Ad -a %s", filename);
-                                system(command);
-                                rprintf(0, n, "data check error - exiting\n");
-                        }
-                }
-        }
-
-        printf("Finished after %d loops\n", n);
-        MPI_Finalize();
-        return 0;
-}
diff --git a/lustre/tests/writemany.c b/lustre/tests/writemany.c
deleted file mode 100644
index 03b48fb388b8cdd43611c6f4af94c21cedc5eb37..0000000000000000000000000000000000000000
--- a/lustre/tests/writemany.c
+++ /dev/null
@@ -1,276 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <time.h>
-#include <sys/time.h>
-
-
-#define difftime(a, b)                                          \
-        ((double)(a)->tv_sec - (b)->tv_sec +                    \
-         ((double)((a)->tv_usec - (b)->tv_usec) / 1000000))
-
-
-
-char cmdname[512];
-int o_abort = 0;
-int o_quiet = 0;
-
-void usage(char *name)
-{
-        fprintf(stderr, "usage: %s [opts] <dirname> <seconds> <threads>\n",
-                name);
-        fprintf(stderr, "  -q quiet\n");
-        fprintf(stderr, "  -a abort other children on first err\n");
-        exit(1);
-}
-
-
-struct kid_list_t {
-        pid_t kid;
-        struct kid_list_t *next;
-};
-
-struct kid_list_t *head = NULL;
-
-int push_kid(pid_t kid)
-{
-        struct kid_list_t *new;
-        new = (struct kid_list_t *)malloc(sizeof(struct kid_list_t));
-        if (new == NULL)
-                return 1;
-
-        new->kid = kid;
-        new->next = head;
-        head = new;
-        return 0;
-}
-
-void kill_kids(void)
-{
-        while(head) {
-                kill(head->kid, SIGTERM);
-                head = head->next;
-        }
-}
-
-static int usr1_received;
-void usr1_handler(int unused)
-{
-        usr1_received = 1;
-        kill_kids();
-}
-
-int wait_for_threads(int live_threads)
-{
-        int rc = 0;
-
-        while (live_threads > 0) {
-                int status;
-                pid_t ret;
-
-                ret = waitpid(0, &status, 0);
-                if (ret == 0) {
-                        continue;
-                }
-
-                if (ret < 0) {
-                        fprintf(stderr, "%s: error: wait - %s\n",
-                                cmdname, strerror(errno));
-                        if (!rc)
-                                rc = errno;
-                } else {
-                        /*
-                         * This is a hack.  We _should_ be able to use
-                         * WIFEXITED(status) to see if there was an
-                         * error, but it appears to be broken and it
-                         * always returns 1 (OK).  See wait(2).
-                         */
-                        int err = WEXITSTATUS(status);
-                        if (err)
-                                fprintf(stderr,
-                                        "%s: error: PID %d had rc=%d\n",
-                                        cmdname, ret, err);
-                        /* Record first error */
-                        if (!rc)
-                                rc = err;
-
-                        /* Give up on first error */
-                        if (rc && o_abort) {
-                                kill_kids();
-                                break;
-                        }
-
-                        live_threads--;
-                }
-        }
-        if (!o_quiet)
-                printf("%s done, rc = %d\n", cmdname, rc);
-        return rc;
-}
-
-void print_err(char *op, char *filename, struct timeval *time, int err)
-{
-        fprintf(stderr, "%s: %d.%.06d error: %s(%s): %s\n",
-                cmdname, (int)(time->tv_sec), (int)(time->tv_usec), op,
-                filename, strerror(errno));
-}
-
-int run_one_child(char *file, int thread, int seconds)
-{
-        struct timeval start, cur;
-        double diff;
-        char filename[1024];
-        char buf[1024];
-        int fd, rc = 0, rand, maxrand, len;
-        long nfiles = 0, nbytes = 0;
-
-        if (!o_quiet)
-                printf("%s: running thread #%d\n", cmdname, thread);
-
-        srandom(thread);
-        /* Higher thread numbers will produce bigger random files.
-           Thread 1 will produce only 0-len files. */
-        maxrand = 1; rand = thread;
-        while (--rand)
-                maxrand *= 10;
-
-        gettimeofday(&start, NULL);
-
-        while(!rc) {
-                if (usr1_received)
-                        break;
-
-                gettimeofday(&cur, NULL);
-                if (seconds) {
-                        if (cur.tv_sec > (start.tv_sec + seconds))
-                                break;
-                }
-                
-                sprintf(filename, "%s-%d-%ld", file, thread, nfiles);
-
-                fd = open(filename, O_RDWR | O_CREAT, 0666);
-                if (fd < 0) {
-                        print_err("open", filename, &cur, errno);
-                        rc = errno;
-                        break;
-                }
-
-                sprintf(buf, "%s %010ld %.19s.%012d\n", cmdname,
-                        nfiles++, ctime(&cur.tv_sec), (int)cur.tv_usec);
-                len = strlen(buf);
-
-                rand = random() % maxrand;
-                while (rand-- > 0) {
-                        if (write(fd, buf, len) != len) {
-                                print_err("write", filename, &cur, errno);
-                                rc = errno;
-                                break;
-                        }
-                        nbytes += len;
-                }
-
-                if (close(fd) < 0) {
-                        print_err("close", filename, &cur, errno);
-                        rc = errno;
-                        break;
-                }
-                if (unlink(filename) < 0) {
-                        print_err("unlink", filename, &cur, errno);
-                        if (errno == ENOENT) {
-                                printf("Ignoring known bug 6082\n");
-                        } else {
-                                rc = errno;
-                                break;
-                        }
-                }
-        }
-
-        diff = difftime(&cur, &start);
-        if (!o_quiet)
-                printf("%s: %7ld files, %4ld MB in %.2fs (%7.2f files/s, "
-                       "%5.2f MB/s): rc = %d\n",
-                       cmdname, nfiles, nbytes >> 20, diff,
-                       (double)nfiles / diff, (double)nbytes/1024/1024 / diff,
-                       rc);
-
-        return rc;
-}
-
-int main(int argc, char *argv[])
-{
-        unsigned long duration;
-        int threads = 0;
-        char *end;
-        char *directory;
-        int i = 1, rc = 0;
-
-        sprintf(cmdname, "%s", argv[0]);
-
-        while((i < argc) && (argv[i][0] == '-')) {
-                switch (argv[i][1]) {
-                case 'q':
-                        o_quiet++;
-                        break;
-                case 'a':
-                        o_abort++;
-                        break;
-                }
-                i++;
-        }
-
-        if ((argc - i) < 3)
-                usage(argv[0]);
-
-        directory = argv[i];
-        duration = strtoul(argv[++i], &end, 0);
-        if (*end) {
-                fprintf(stderr, "%s: error: bad number of seconds '%s'\n",
-                        cmdname, argv[i]);
-                exit(2);
-        }
-
-        threads = strtoul(argv[++i], &end, 0);
-        if (*end) {
-                fprintf(stderr, "%s: error: bad thread count '%s'\n",
-                        cmdname, argv[i]);
-                exit(2);
-        }
-
-        signal(SIGUSR1, usr1_handler);
-
-        for (i = 1; i <= threads; i++) {
-                rc = fork();
-                if (rc < 0) {
-                        if (!o_quiet)
-                                fprintf(stderr, "%s: error: #%d - %s\n",
-                                        cmdname, i, strerror(rc = errno));
-                        return (rc);
-                }
-                if (rc == 0) {
-                        /* children */
-                        sprintf(cmdname, "%s-%d", argv[0], i);
-                        return (run_one_child(directory, i, duration));
-                } else {
-                        /* parent */
-                        rc = push_kid(rc);
-                        if (rc != 0) {
-                                kill_kids();
-                                exit(3);
-                        }
-                }
-        }
-        /* parent process */
-        if (!o_quiet)
-                printf("%s will run for %ld minutes\n", cmdname, duration/60);
-        return (wait_for_threads(threads));
-}
diff --git a/lustre/tests/writeme.c b/lustre/tests/writeme.c
deleted file mode 100644
index bf5c971e611815bc8a6ee2baa2ee1169397a5d06..0000000000000000000000000000000000000000
--- a/lustre/tests/writeme.c
+++ /dev/null
@@ -1,46 +0,0 @@
-#include <fcntl.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-
-void usage(char *prog)
-{
-        printf("usage: %s [-s] filename\n", prog);
-}
-
-int main(int argc, char **argv)
-{
-        int fd, rc;
-	int do_sync = 0;
-        int i = 0;
-	int file_arg = 1;
-        char buf[4096];
-
-        memset(buf, 0, 4096);
-
-        if (argc < 2 || argc > 3) {
-		usage(argv[0]);
-                exit(1);
-        }
-
-        if (strcmp(argv[1], "-s") == 0) {
-                do_sync = 1;
-		file_arg++;
-        }
-
-        fd = open(argv[file_arg], O_RDWR | O_CREAT, 0600);
-        if (fd == -1) {
-                printf("Error opening %s\n", argv[1]);
-                exit(1);
-        }
-
-        while (1) {
-                sprintf(buf, "write %d\n", i);
-                rc = write(fd, buf, sizeof(buf));
-		if (do_sync)
-			sync();
-                sleep(1);
-        }
-        return 0;
-}
diff --git a/lustre/utils/.cvsignore b/lustre/utils/.cvsignore
deleted file mode 100644
index b9424085c5e407106bc838a307676a4b953d1817..0000000000000000000000000000000000000000
--- a/lustre/utils/.cvsignore
+++ /dev/null
@@ -1,31 +0,0 @@
-.Xrefs
-config.log
-config.status
-configure
-Makefile
-Makefile.in
-.deps
-tags
-TAGS
-mkfs.lustre
-mount.lustre
-tunefs.lustre
-lctl
-lfs
-wirecheck
-wiretest
-llog_reader
-lr_reader
-ltrack_stats
-obdio
-obdbarrier
-lload
-llverfs
-llverdev
-l_getgroups
-.*.cmd
-.*.d
-mkfs_lustre
-mount_lustre
-tunefs_lustre
-loadgen
diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am
deleted file mode 100644
index 5a89e03adda502f065e51021e2c6f69421508a37..0000000000000000000000000000000000000000
--- a/lustre/utils/Makefile.am
+++ /dev/null
@@ -1,98 +0,0 @@
-# Administration utilities Makefile
-
-AM_CFLAGS=$(LLCFLAGS)
-AM_CPPFLAGS=$(LLCPPFLAGS) -DLUSTRE_UTILS=1
-AM_LDFLAGS := -L$(top_builddir)/lnet/utils
-
-LIBPTLCTL := $(top_builddir)/lnet/utils/libptlctl.a
-
-sbin_scripts = lrun 
-bin_scripts = llstat llobdstat plot-llstat
-
-if UTILS
-noinst_PROGRAMS = wirecheck obdio obdbarrier
-# mount only finds helpers in /sbin
-rootsbin_PROGRAMS = mount.lustre
-sbin_PROGRAMS = mkfs.lustre tunefs.lustre lctl wiretest \
-	l_getgroups llverfs llverdev llog_reader lr_reader ltrack_stats
-if LIBPTHREAD
-sbin_PROGRAMS += loadgen
-endif
-bin_PROGRAMS = lfs
-bin_SCRIPTS = $(bin_scripts)
-sbin_SCRIPTS = $(sbin_scripts)
-endif # UTILS
-
-lib_LIBRARIES = liblustreapi.a
-
-lctl_SOURCES = parser.c obd.c lustre_cfg.c lctl.c parser.h obdctl.h platform.h
-lctl_LDADD := $(LIBREADLINE) $(LIBPTLCTL)
-lctl_DEPENDENCIES := $(LIBPTLCTL)
-
-lfs_SOURCES = lfs.c parser.c lustre_cfg.c obd.c
-lfs_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL)
-lfs_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a 
-
-loadgen_SOURCES = loadgen.c lustre_cfg.c obd.c
-loadgen_LDADD := $(LIBREADLINE) $(LIBPTLCTL) $(PTHREAD_LIBS)
-loadgen_DEPENDENCIES := $(LIBPTLCTL)
-
-if EXT2FS_DEVEL
-EXT2FSLIB = -lext2fs
-E2PLIB = -le2p
-else
-E2PLIB = 
-EXT2FSLIB =
-endif
-
-if BLKID
-BLKIDLIB = -lblkid
-else
-BLKIDLIB =
-endif
-
-llverfs_LDADD := $(EXT2FSLIB) $(E2PLIB)
-
-llverdev_LDADD := $(EXT2FSLIB) $(BLKIDLIB)
-
-liblustreapi_a_SOURCES = liblustreapi.c
-
-wirecheck_SOURCES = wirecheck.c
-wirecheck_CPPFLAGS = -DCC="\"$(CC)\""
-
-wiretest_SOURCES = wiretest.c
-
-obdio_SOURCES = obdio.c obdiolib.c obdiolib.h
-obdbarrier_SOURCES = obdbarrier.c obdiolib.c obdiolib.h
-
-llog_reader_SOURCES = llog_reader.c
-llog_reader_LDADD := $(LIBPTLCTL)
-llog_reader_DEPENDENCIES := $(LIBPTLCTL)
-
-lr_reader_SOURCES = lr_reader.c
-
-mount_lustre_SOURCES = mount_lustre.c 
-mount_lustre_LDADD := $(LIBPTLCTL)
-mount_lustre_DEPENDENCIES := $(LIBPTLCTL)
-
-mkfs_lustre_SOURCES = mkfs_lustre.c
-mkfs_lustre_CPPFLAGS = -UTUNEFS $(AM_CPPFLAGS)
-mkfs_lustre_LDADD := $(LIBPTLCTL)
-mkfs_lustre_DEPENDENCIES := $(LIBPTLCTL)
-
-tunefs_lustre_SOURCES = $(mkfs_lustre_SOURCES)
-tunefs_lustre_CPPFLAGS = -DTUNEFS $(AM_CPPFLAGS)
-tunefs_lustre_LDADD := $(mkfs_lustre_LDADD)
-tunefs_lustre_DEPENDENCIES := $(mkfs_lustre_DEPENDENCIES)
-
-ltrack_stats_SOURCES = ltrack_stats.c
-
-EXTRA_DIST = $(sbin_scripts) $(bin_scripts)
-
-# NOTE: this should only be run on i386.
-newwiretest: wirehdr.c wirecheck
-	cp wirehdr.c wiretest.c
-	./wirecheck >> wiretest.c
-	cp ../ptlrpc/wirehdr.c ../ptlrpc/wiretest.c
-	./wirecheck >> ../ptlrpc/wiretest.c
-
diff --git a/lustre/utils/l_getgroups.c b/lustre/utils/l_getgroups.c
deleted file mode 100644
index 1aa53e77e5d5b0f946fc4c7b0955f6d5345814c4..0000000000000000000000000000000000000000
--- a/lustre/utils/l_getgroups.c
+++ /dev/null
@@ -1,249 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2004 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdlib.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <pwd.h>
-#include <grp.h>
-#include <stdarg.h>
-#include <stddef.h>
-#include <syslog.h>
-#include <sys/mman.h>
-#include <time.h>
-
-#include <lustre/lustre_user.h>
-
-#define CHECK_DURATION_START                                            \
-do {                                                                    \
-        time_t __check_start = time(NULL)
-
-#define CHECK_DURATION_END(str, secs)                                   \
-        if (time(NULL) > __check_start + (secs))                        \
-                errlog("LONG OP %s: %d elapsed, %d expected\n", str,    \
-                       time(NULL) - __check_start, secs);               \
-} while (0)
-
-void usage(FILE *out, const char *progname)
-{
-        fprintf(out, "\nusage: %s [-v] {-d | <mdsname>} <uid>\n"
-                     "usage: %s [-v] -s\n"
-                     "Normally invoked as an upcall from Lustre, set via:\n"
-                     "  /proc/fs/lustre/mds/{mdsname}/group_upcall\n"
-                     "\t-d: debug, print values to stdout instead of Lustre\n"
-                     "\t-s: sleep, mlock memory in core and sleep forever\n"
-                     "\t-v: verbose, log start/stop to syslog\n",
-                     progname, progname);
-}
-
-static int compare_u32(const void *v1, const void *v2)
-{
-        return (*(__u32 *)v1 - *(__u32 *)v2);
-}
-
-static void errlog(const char *fmt, ...)
-{
-        va_list arg, carg;
-
-        va_start(arg, fmt);
-        va_copy(carg, arg);
-        vsyslog(LOG_NOTICE, fmt, arg);
-        va_end(arg);
-
-        vfprintf(stderr, fmt, carg);
-        va_end(carg);
-}
-
-int get_groups_local(struct mds_grp_downcall_data **grp)
-{
-        struct mds_grp_downcall_data *param;
-        int i, maxgroups, size;
-        struct passwd *pw;
-        struct group  *gr;
-
-        CHECK_DURATION_START;
-        pw = getpwuid((*grp)->mgd_uid);
-        CHECK_DURATION_END("getpwuid", 2);
-        if (!pw) {
-                errlog("no such user %u\n", (*grp)->mgd_uid);
-                (*grp)->mgd_err = errno ? errno : EIDRM;
-                return sizeof(*param);
-        }
-        (*grp)->mgd_gid = pw->pw_gid;
-
-        maxgroups = sysconf(_SC_NGROUPS_MAX);
-        size = offsetof(struct mds_grp_downcall_data, mgd_groups[maxgroups]);
-        param = malloc(size);
-        if (param == NULL) {
-                errlog("fail to alloc %d bytes for uid %u with %d groups\n",
-                       size, (*grp)->mgd_uid, maxgroups);
-                return sizeof(*param);
-        }
-
-        memcpy(param, *grp, sizeof(*param));
-        param->mgd_groups[param->mgd_ngroups++] = pw->pw_gid;
-        *grp = param;
-        CHECK_DURATION_START;
-        while ((gr = getgrent())) {
-                if (gr->gr_gid == pw->pw_gid)
-                        continue;
-                if (!gr->gr_mem)
-                        continue;
-                for (i = 0; gr->gr_mem[i]; i++) {
-                        if (strcmp(gr->gr_mem[i], pw->pw_name) == 0) {
-                                param->mgd_groups[param->mgd_ngroups++] =
-                                        gr->gr_gid;
-                                break;
-                        }
-                }
-                if (param->mgd_ngroups == maxgroups)
-                        break;
-        }
-        CHECK_DURATION_END("getgrent loop", 3);
-        endgrent();
-        qsort(param->mgd_groups, param->mgd_ngroups,
-              sizeof(param->mgd_groups[0]), compare_u32);
-
-        return size;
-}
-
-/* Note that we need to make the downcall regardless of error, so that the
- * MDS doesn't continue to wait on the upcall. */
-int main(int argc, char **argv)
-{
-        int fd, rc, c, size;
-        int debug = 0, sleepy = 0, verbose = 0, print_usage = 0;
-        pid_t mypid;
-        struct mds_grp_downcall_data sparam = { MDS_GRP_DOWNCALL_MAGIC };
-        struct mds_grp_downcall_data *param = &sparam;
-        char pathname[1024], *end, *progname, *mdsname = NULL;
-
-        progname = strrchr(argv[0], '/');
-        if (progname == NULL)
-                progname = argv[0];
-        else
-                progname++;
-
-        if (strstr(progname, "verbose"))
-                verbose++;
-
-        openlog(progname, LOG_PERROR, LOG_AUTHPRIV);
-
-        opterr = 0;
-        while ((c = getopt(argc, argv, "dhsv")) != -1) {
-                switch (c) {
-                case 'd':
-                        debug++;
-                        break;
-                case 's':
-                        sleepy++;
-                        break;
-                case 'v':
-                        verbose++;
-                        break;
-                default:
-                        errlog("bad parameter '%c'\n", optopt);
-                        print_usage++;
-                case 'h':
-                        print_usage++;
-                        break;
-                }
-        }
-
-        /* sleep has 0 param, debug has 1 param, upcall has 2 param */
-        if (!sleepy && optind + !sleepy + !debug != argc)
-                print_usage++;
-
-        if (print_usage) {
-                usage(stderr, progname);
-                return print_usage > 1 ? EINVAL : 0;
-        }
-
-        if (!sleepy) {
-                param->mgd_uid = strtoul(argv[optind + !debug], &end, 0);
-                if (*end) {
-                        errlog("invalid uid '%s'", argv[optind + !debug]);
-                        usage(stderr, progname);
-                        return EINVAL;
-                }
-                if (!debug)
-                        mdsname = argv[optind];
-        }
-
-        mypid = getpid();
-
-        if (verbose)
-                syslog(LOG_DEBUG, "starting l_getgroups(pid %u) for uid %u\n",
-                       mypid, param->mgd_uid);
-
-        CHECK_DURATION_START;
-        size = get_groups_local(&param);
-        CHECK_DURATION_END("get_groups_local", 10);
-        if (debug) {
-                int i;
-                if (param->mgd_err) {
-                        if (param->mgd_err != ENXIO)
-                                errlog("error getting uid %d groups: %s\n",
-                                       param->mgd_uid,strerror(param->mgd_err));
-                        rc = param->mgd_err;
-                } else {
-                        printf("uid=%d gid=", param->mgd_uid);
-                        for (i = 0; i < param->mgd_ngroups; i++)
-                                printf("%s%d", i > 0 ? "," : "",
-                                       param->mgd_groups[i]);
-                        printf("\n");
-                        rc = 0;
-                }
-        } else if (sleepy) {
-                rc = mlockall(MCL_CURRENT);
-                errlog("%s all pages in RAM (pid %u): rc %d\n",
-                       rc ? "failed to lock" : "locked", mypid, rc);
-                sleep(1000000000);
-        } else {
-                snprintf(pathname, 1024, "/proc/fs/lustre/mds/%s/group_info",
-                         mdsname);
-                CHECK_DURATION_START;
-                fd = open(pathname, O_WRONLY);
-                if (fd < 0) {
-                        errlog("can't open device %s: %s\n",
-                               pathname, strerror(errno));
-                        rc = errno;
-                } else {
-                        rc = write(fd, param, size);
-                        if (rc > 0)
-                                rc = 0;
-
-                        close(fd);
-                }
-                CHECK_DURATION_END("group_info write", 1);
-        }
-        if (verbose)
-                syslog(LOG_DEBUG, "ending l_getgroups(pid %u) for uid %u\n",
-                       mypid, param->mgd_uid);
-
-        closelog();
-        return rc;
-}
diff --git a/lustre/utils/lctl.c b/lustre/utils/lctl.c
deleted file mode 100644
index 85e41055c23bce88336f5e87dc6907898dcc1f6e..0000000000000000000000000000000000000000
--- a/lustre/utils/lctl.c
+++ /dev/null
@@ -1,338 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Robert Read <rread@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <lnet/lnetctl.h>
-#include "obdctl.h"
-#include "parser.h"
-
-static int jt_quit(int argc, char **argv) {
-        Parser_quit(argc, argv);
-        return 0;
-}
-
-static int jt_noop(int argc, char **argv) {
-        return 0;
-}
-
-static int jt_opt_ignore_errors(int argc, char **argv) {
-        Parser_ignore_errors(1);
-        return 0;
-}
-
-command_t cmdlist[] = {
-        /* Metacommands */
-        {"===== metacommands =======", jt_noop, 0, "metacommands"},
-        {"--device", jt_opt_device, 0,
-         "run <command> after connecting to device <devno>\n"
-         "--device <devno> <command [args ...]>"},
-        {"--ignore_errors", jt_opt_ignore_errors, 0,
-         "ignore errors that occur during script processing\n"
-         "--ignore_errors"},
-        {"ignore_errors", jt_opt_ignore_errors, 0,
-         "ignore errors that occur during script processing\n"
-         "ignore_errors"},
-
-        /* User interface commands */
-        {"======== control =========", jt_noop, 0, "control commands"},
-        {"help", Parser_help, 0, "help"},
-        {"lustre_build_version", jt_get_version, 0,
-         "print the build version of lustre\n"
-         "usage: lustre_build_version"},
-        {"exit", jt_quit, 0, "quit"},
-        {"quit", jt_quit, 0, "quit"},
-
-        /* Network configuration commands */
-        {"===== network config =====", jt_noop, 0, "network config"},
-        {"--net", jt_opt_net, 0,"run <command> after setting network to <net>\n"
-         "usage: --net <tcp/elan/gm/...> <command>"},
-        {"network", jt_ptl_network, 0, "configure LNET"
-         "usage: network up|down"},
-        {"net", jt_ptl_network, 0, "configure LNET"
-         "usage: net up|down"},
-        {"list_nids", jt_ptl_list_nids, 0, "list local NIDs"
-         "usage: list_nids [all]"},
-        {"which_nid", jt_ptl_which_nid, 0, "choose a NID"
-         "usage: which_nid NID [NID...]"},
-        {"interface_list", jt_ptl_print_interfaces,0,"print interface entries\n"
-         "usage: interface_list"},
-        {"peer_list", jt_ptl_print_peers, 0, "print peer entries\n"
-         "usage: peer_list"},
-        {"conn_list", jt_ptl_print_connections, 0,
-         "print all the connected remote nid\n"
-         "usage: conn_list"},
-        {"active_tx", jt_ptl_print_active_txs, 0, "print active transmits\n"
-         "usage: active_tx"},
-        {"route_list", jt_ptl_print_routes, 0,
-         "print the portals routing table, same as show_route\n"
-         "usage: route_list"},
-        {"show_route", jt_ptl_print_routes, 0,
-         "print the portals routing table, same as route_list\n"
-         "usage: show_route"},
-        {"ping", jt_ptl_ping, 0, "Check LNET connectivity\n"
-         "usage: ping nid [timeout] [pid]"},
-
-        /* Device selection commands */
-        {"==== obd device selection ====", jt_noop, 0, "device selection"},
-        {"device", jt_obd_device, 0,
-         "set current device to <name|devno>\n"
-         "usage: device <%name|$name|devno>"},
-        {"device_list", jt_obd_list, 0, "show all devices\n"
-         "usage: device_list"},
-        {"dl", jt_obd_list, 0, "show all devices\n"
-         "usage: dl"},
-
-        /* Device operations */
-        {"==== obd device operations ===", jt_noop, 0, "device operations"},
-        {"activate", jt_obd_activate, 0, "activate an import\n"},
-        {"deactivate", jt_obd_deactivate, 0, "deactivate an import. "
-         "This command should be used on failed OSC devices in an MDT LOV.\n"},
-        {"abort_recovery", jt_obd_abort_recovery, 0,
-         "abort recovery on a restarting MDT or OST device\n"},
-        {"set_timeout", jt_lcfg_set_timeout, 0,
-         "usage: conf_param obd_timeout=<secs>\n"},
-        {"conf_param", jt_lcfg_mgsparam, 0, "set a permanent config param. "
-         "This command must be run on the MGS node\n"
-         "usage: conf_param <target.keyword=val> ...\n"},
-        {"local_param", jt_lcfg_param, 0, "set a temporary, local param\n"
-         "usage: local_param <target.keyword=val> ...\n"},
-        {"get_param", jt_lcfg_getparam, 0, "get the Lustre or LNET parameter\n"
-         "usage: get_param [-n] path/to/param/file \n"
-         "Get the value of Lustre or LNET parameter from the specified path\n"
-         "Use '-n' to disable printing of the key name when printing values."},
-        {"set_param", jt_lcfg_setparam, 0, "set the Lustre or LNET parameter\n"
-         "usage: set_param [-n] path/to/param/file value\n"
-         "Set the value of the Lustre or LNET parameter at the specified path\n"
-         "Use '-n' to disable printing of the key name when printing values."},
-
-        /* Debug commands */
-        {"==== debugging control ===", jt_noop, 0, "debug"},
-        {"debug_daemon", jt_dbg_debug_daemon, 0,
-         "debug daemon control and dump to a file\n"
-         "usage: debug_daemon {start file [#MB]|stop}"},
-        {"debug_kernel", jt_dbg_debug_kernel, 0,
-         "get debug buffer and dump to a file, same as dk\n"
-         "usage: debug_kernel [file] [raw]"},
-        {"dk", jt_dbg_debug_kernel, 0,
-         "get debug buffer and dump to a file, same as debug_kernel\n"
-         "usage: dk [file] [raw]"},
-        {"debug_file", jt_dbg_debug_file, 0,
-         "convert a binary debug file dumped by the kernel to ASCII text\n"
-         "usage: debug_file <input> [output]"},
-        {"df", jt_dbg_debug_file, 0,
-         "read debug buffer from input and dump to output, same as debug_file\n"
-         "usage: df <input> [output]"},
-        {"clear", jt_dbg_clear_debug_buf, 0, "clear kernel debug buffer\n"
-         "usage: clear"},
-        {"mark", jt_dbg_mark_debug_buf, 0,
-         "insert marker text in kernel debug buffer\n"
-         "usage: mark <text>"},
-        {"filter", jt_dbg_filter, 0, "filter message type\n"
-         "usage: filter <subsystem id/debug mask>"},
-        {"show", jt_dbg_show, 0, "Show specific type of messages\n"
-         "usage: show <subsystem id/debug mask>"},
-        {"debug_list", jt_dbg_list, 0, "list subsystem and debug types\n"
-         "usage: debug_list <subs/types>"},
-        {"modules", jt_dbg_modules, 0,
-         "provide gdb-friendly module information\n"
-         "usage: modules <path>"},
-
-        /* Device configuration commands */
-        {"== obd device setup (these are not normally used post 1.4) ==",
-                jt_noop, 0, "device config"},
-        {"attach", jt_lcfg_attach, 0,
-         "set the type, name, and uuid of the current device\n"
-         "usage: attach type name uuid"},
-        {"detach", jt_obd_detach, 0,
-         "remove driver (and name and uuid) from current device\n"
-         "usage: detach"},
-        {"setup", jt_lcfg_setup, 0,
-         "type specific device configuration information\n"
-         "usage: setup <args...>"},
-        {"cleanup", jt_obd_cleanup, 0, "cleanup previously setup device\n"
-         "usage: cleanup [force | failover]"},
-        {"dump_cfg", jt_cfg_dump_log, 0,
-         "print log of recorded commands for this config to kernel debug log\n"
-         "usage: dump_cfg config-uuid-name"},
-
-        /* virtual block operations */
-        {"==== virtual block device ====", jt_noop, 0, "virtual block device"},
-        {"blockdev_attach", jt_blockdev_attach, 0,
-         "attach a lustre regular file to a virtual block device\n"
-         "usage: blockdev_attach <file_name> <device_name>"},
-        {"blockdev_detach", jt_blockdev_detach, 0,
-         "detach a lustre regular file from a virtual block device\n"
-         "usage: blockdev_detach <device_name>"},
-        {"blockdev_info", jt_blockdev_info, 0,
-         "get the device info of a attached file\n"
-         "usage: blockdev_info <device_name>"},
-
-        /* Test only commands */
-        {"==== testing (DANGEROUS) ====", jt_noop, 0, "testing (DANGEROUS)"},
-        {"--threads", jt_opt_threads, 0,
-         "run <threads> separate instances of <command> on device <devno>\n"
-         "--threads <threads> <verbose> <devno> <command [args ...]>"},
-        {"lookup", jt_obd_mdc_lookup, 0, "report file mode info\n"
-         "usage: lookup <directory> <file>"},
-        {"readonly", jt_obd_set_readonly, 0,
-         "disable writes to the underlying device\n"},
-        {"notransno", jt_obd_no_transno, 0,
-         "disable sending of committed-transno updates\n"},
-        {"add_uuid", jt_lcfg_add_uuid, 0, "associate a UUID with a nid\n"
-         "usage: add_uuid <uuid> <nid>"},
-        {"del_uuid", jt_lcfg_del_uuid, 0, "delete a UUID association\n"
-         "usage: del_uuid <uuid>"},
-        {"add_peer", jt_ptl_add_peer, 0, "add an peer entry\n"
-         "usage: add_peer <nid> <host> <port>"},
-        {"del_peer", jt_ptl_del_peer, 0, "remove an peer entry\n"
-         "usage: del_autoconn [<nid>] [<host>] [ks]"},
-        {"add_conn ", jt_lcfg_add_conn, 0,
-         "usage: add_conn <conn_uuid> [priority]\n"},
-        {"del_conn ", jt_lcfg_del_conn, 0,
-         "usage: del_conn <conn_uuid> \n"},
-        {"disconnect", jt_ptl_disconnect, 0, "disconnect from a remote nid\n"
-         "usage: disconnect [<nid>]"},
-        {"mynid", jt_ptl_mynid, 0, "inform the socknal of the local nid. "
-         "The nid defaults to hostname for tcp networks and is automatically "
-         "setup for elan/myrinet networks.\n"
-         "usage: mynid [<nid>]"},
-        {"fail", jt_ptl_fail_nid, 0, "fail/restore communications.\n"
-         "Omitting the count means indefinitely, 0 means restore, "
-         "otherwise fail 'count' messages.\n"
-         "usage: fail nid|_all_ [count]"},
-        {"getattr", jt_obd_getattr, 0,
-         "get attribute for OST object <objid>\n"
-         "usage: getattr <objid>"},
-        {"setattr", jt_obd_setattr, 0,
-         "set mode attribute for OST object <objid>\n"
-         "usage: setattr <objid> <mode>"},
-         {"create", jt_obd_create, 0,
-         "create <num> OST objects (with <mode>)\n"
-         "usage: create [num [mode [verbose [lsm data]]]]"},
-        {"destroy", jt_obd_destroy, 0,
-         "destroy OST object <objid> [num [verbose]]\n"
-         "usage: destroy <num> objects, starting at objid <objid>"},
-        {"test_getattr", jt_obd_test_getattr, 0,
-         "do <num> getattrs (on OST object <objid> (objid+1 on each thread))\n"
-         "usage: test_getattr <num> [verbose [[t]objid]]"},
-        {"test_setattr", jt_obd_test_setattr, 0,
-         "do <num> setattrs (on OST object <objid> (objid+1 on each thread))\n"
-         "usage: test_setattr <num> [verbose [[t]objid]]"},
-        {"test_brw", jt_obd_test_brw, 0,
-         "do <num> bulk read/writes (<npages> per I/O, on OST object <objid>)\n"
-         "usage: test_brw [t]<num> [write [verbose [npages [[t]objid]]]]"},
-        {"lwt", jt_ptl_lwt, 0,
-         "light-weight tracing\n"
-         "usage: lwt start\n"
-         "       lwt stop [file]"},
-        {"memhog", jt_ptl_memhog, 0,
-         "memory pressure testing\n"
-         "usage: memhog <page count> [<gfp flags>]"},
-
-        {"==== obsolete (DANGEROUS) ====", jt_noop, 0, "obsolete (DANGEROUS)"},
-        /* some test scripts still use these */
-        {"cfg_device", jt_obd_device, 0,
-         "set current device to <name>\n"
-         "usage: device <name>"},
-        {"recover", jt_obd_recover, 0,
-         "try to restore a lost connection immediately\n"
-         "usage: recover [MDC/OSC device]"},
-        /* saving for sanity 44a */
-        {"lov_getconfig", jt_obd_lov_getconfig, 0,
-         "read lov configuration from an mds device\n"
-         "usage: lov_getconfig <mountpoint>"},
-        /* Llog operations */
-        {"llog_catlist", jt_llog_catlist, 0,
-         "list all catalog logs on current device.\n"
-         "usage: llog_catlist"},
-        {"llog_info", jt_llog_info, 0,
-         "print log header information.\n"
-         "usage: llog_info <$logname|#oid#ogr#ogen>\n"
-         "       oid, ogr and ogen are hexadecimal."},
-        {"llog_print", jt_llog_print, 0,
-         "print log content information.\n"
-         "usage: llog_print <$logname|#oid#ogr#ogen> [from] [to]\n"
-         "       oid, ogr and ogen are hexadecimal.\n"
-         "       print all records from index 1 by default."},
-        {"llog_check", jt_llog_check, 0,
-         "print log content information.\n"
-         "usage: llog_check <$logname|#oid#ogr#ogen> [from] [to]\n"
-         "       oid, ogr and ogen are hexadecimal.\n"
-         "       check all records from index 1 by default."},
-         {"llog_cancel", jt_llog_cancel, 0,
-         "cancel one record in log.\n"
-         "usage: llog_cancel <catalog id|catalog name> <log id> <index>"},
-        {"llog_remove", jt_llog_remove, 0,
-         "remove one log from catalog, erase it from disk.\n"
-         "usage: llog_remove <catalog id|catalog name> <log id>"},
-        /* network operations */
-        {"add_interface", jt_ptl_add_interface, 0, "add interface entry\n"
-         "usage: add_interface ip [netmask]"},
-        {"del_interface", jt_ptl_del_interface, 0, "del interface entry\n"
-         "usage: del_interface [ip]"},
-        {"add_route", jt_ptl_add_route, 0,
-         "add an entry to the portals routing table\n"
-         "usage: add_route <gateway> <target> [<target>]"},
-        {"del_route", jt_ptl_del_route, 0,
-         "delete route via gateway to targets from the portals routing table\n"
-         "usage: del_route <gateway> [<target>] [<target>]"},
-        {"set_route", jt_ptl_notify_router, 0,
-         "enable/disable routes via gateway in the portals routing table\n"
-         "usage: set_route <gateway> <up/down> [<time>]"},
-
-        { 0, 0, 0, NULL }
-};
-
-int lctl_main(int argc, char **argv)
-{
-        int rc;
-
-        setlinebuf(stdout);
-
-        ptl_initialize(argc, argv);
-        if (obd_initialize(argc, argv) < 0)
-                exit(2);
-        if (dbg_initialize(argc, argv) < 0)
-                exit(3);
-
-        Parser_init("lctl > ", cmdlist);
-
-        if (argc > 1) {
-                rc = Parser_execarg(argc - 1, argv + 1, cmdlist);
-        } else {
-                rc = Parser_commands();
-        }
-
-        obd_finalize(argc, argv);
-        return rc;
-}
-
-#ifndef LIBLUSTRE_TEST
-int main (int argc, char **argv)
-{
-        return (lctl_main (argc, argv));
-}
-#endif
diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c
deleted file mode 100644
index dba6a473c2acfe855ba04ba336f8ad7f08878ef3..0000000000000000000000000000000000000000
--- a/lustre/utils/lfs.c
+++ /dev/null
@@ -1,1881 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Robert Read <rread@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <getopt.h>
-#include <string.h>
-#include <mntent.h>
-#include <errno.h>
-#include <pwd.h>
-#include <grp.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <dirent.h>
-#include <time.h>
-#include <ctype.h>
-
-#include <lnet/api-support.h>
-#include <lnet/lnetctl.h>
-
-#include <liblustre.h>
-#include <lustre/lustre_idl.h>
-#include <lustre/liblustreapi.h>
-#include <lustre/lustre_user.h>
-
-#include "parser.h"
-#include "obdctl.h"
-
-unsigned int libcfs_subsystem_debug = 0;
-
-/* all functions */
-static int lfs_setstripe(int argc, char **argv);
-static int lfs_find(int argc, char **argv);
-static int lfs_getstripe(int argc, char **argv);
-static int lfs_osts(int argc, char **argv);
-static int lfs_df(int argc, char **argv);
-static int lfs_check(int argc, char **argv);
-static int lfs_catinfo(int argc, char **argv);
-#ifdef HAVE_QUOTA_SUPPORT
-static int lfs_quotachown(int argc, char **argv);
-static int lfs_quotacheck(int argc, char **argv);
-static int lfs_quotaon(int argc, char **argv);
-static int lfs_quotaoff(int argc, char **argv);
-static int lfs_setquota(int argc, char **argv);
-static int lfs_quota(int argc, char **argv);
-static int lfs_quotainv(int argc, char **argv);
-#endif
-static int lfs_join(int argc, char **argv);
-
-/* all avaialable commands */
-command_t cmdlist[] = {
-        {"setstripe", lfs_setstripe, 0,
-         "Create a new file with a specific striping pattern or\n"
-         "set the default striping pattern on an existing directory or\n"
-         "delete the default striping pattern from an existing directory\n"
-         "usage: setstripe <filename|dirname> <stripe_size> <stripe_index> <stripe_count>\n"
-         "       or \n"
-         "       setstripe <filename|dirname> [--size|-s stripe_size]\n"
-         "                                    [--index|-i stripe_index]\n"
-         "                                    [--count|-c stripe_count]\n"
-         "       or \n"
-         "       setstripe -d <dirname>   (to delete default striping)\n"
-         "\tstripe_size:  Number of bytes on each OST (0 filesystem default)\n"
-         "\t              Can be specified with k, m or g (in KB, MB and GB respectively)\n"
-         "\tstripe_index: OST index of first stripe (-1 filesystem default)\n"
-         "\tstripe_count: Number of OSTs to stripe over (0 default, -1 all)"},
-        {"getstripe", lfs_getstripe, 0,
-         "To list the striping info for a given filename or files in a\n"
-         "directory or recursively for all files in a directory tree.\n"
-         "usage: getstripe [--obd|-O <uuid>] [--quiet | -q] [--verbose | -v]\n"
-         "                 [--recursive | -r] <dir|file> ..."},
-        {"find", lfs_find, 0,
-         "To find files that match given parameters recursively in a directory tree.\n"
-         "usage: find <dir/file> ... \n"
-         "     [[!] --atime|-A [+-]N] [[!] --mtime|-M [+-]N] [[!] --ctime|-C [+-]N]\n"
-         "     [--maxdepth|-D N] [[!] --name|-n <pattern>] [--print0|-P]\n"
-         "     [--print|-p] [--obd|-O <uuid>] [[!] --type|-t <filetype>]\n"
-         "\t !: used before an option indicates 'NOT' the requested attribute\n"
-         "\t -: used before an value indicates 'AT MOST' the requested value\n"
-         "\t +: used before an option indicates 'AT LEAST' the requested value\n"},
-        {"check", lfs_check, 0,
-         "Display the status of MDS or OSTs (as specified in the command)\n"
-         "or all the servers (MDS and OSTs).\n"
-         "usage: check <osts|mds|servers>"},
-        {"catinfo", lfs_catinfo, 0,
-         "Show information of specified type logs.\n"
-         "usage: catinfo {keyword} [node name]\n"
-         "\tkeywords are one of followings: config, deletions.\n"
-         "\tnode name must be provided when use keyword config."},
-        {"join", lfs_join, 0,
-         "join two lustre files into one - join A, B, will be like cat B >> A & del B\n"
-         "usage: join <filename_A> <filename_B>\n"},
-        {"osts", lfs_osts, 0, "osts"},
-        {"df", lfs_df, 0,
-         "report filesystem disk space usage or inodes usage"
-         "of each MDS/OSD.\n"
-         "Usage: df [-i] [-h] [path]"},
-#ifdef HAVE_QUOTA_SUPPORT
-        {"quotachown",lfs_quotachown, 0,
-         "Change files' owner or group on the specified filesystem.\n"
-         "usage: quotachown [-i] <filesystem>\n"
-         "\t-i: ignore error if file is not exist\n"},
-        {"quotacheck", lfs_quotacheck, 0,
-         "Scan the specified filesystem for disk usage, and create,\n"
-         "or update quota files.\n"
-         "usage: quotacheck [ -ug ] <filesystem>"},
-        {"quotaon", lfs_quotaon, 0, "Turn filesystem quotas on.\n"
-         "usage: quotaon [ -ugf ] <filesystem>"},
-        {"quotaoff", lfs_quotaoff, 0, "Turn filesystem quotas off.\n"
-         "usage: quotaoff [ -ug ] <filesystem>"},
-        {"setquota", lfs_setquota, 0, "Set filesystem quotas.\n"
-         "usage: setquota [ -u | -g ] <name> <block-softlimit> <block-hardlimit> <inode-softlimit> <inode-hardlimit> <filesystem>\n"
-         "       setquota -t [ -u | -g ] <block-grace> <inode-grace> <filesystem>"},
-        {"quota", lfs_quota, 0, "Display disk usage and limits.\n"
-         "usage: quota [ -o obd_uuid ] [{-u|-g  <name>}|-t] <filesystem>"},
-        {"quotainv", lfs_quotainv, 0, "Invalidate quota data.\n"
-         "usage: quotainv [-u|-g] <filesystem>"},
-#endif
-        {"help", Parser_help, 0, "help"},
-        {"exit", Parser_quit, 0, "quit"},
-        {"quit", Parser_quit, 0, "quit"},
-        { 0, 0, 0, NULL }
-};
-
-/* functions */
-static int lfs_setstripe(int argc, char **argv)
-{
-        char *fname;
-        int result;
-        unsigned long long st_size;
-        int  st_offset, st_count;
-        char *end;
-        int c;
-        int delete = 0;
-        char *stripe_size_arg = NULL;
-        char *stripe_off_arg = NULL;
-        char *stripe_count_arg = NULL;
-        unsigned long long size_units;
-
-        struct option long_opts[] = {
-                {"size",        required_argument, 0, 's'},
-                {"count",       required_argument, 0, 'c'},
-                {"index",       required_argument, 0, 'i'},
-                {"delete",      no_argument,       0, 'd'},
-                {0, 0, 0, 0}
-        };
-
-        st_size = 0;
-        st_offset = -1;
-        st_count = 0;
-        if (argc == 3 && strcmp(argv[1], "-d") == 0) {
-                /* for compatibility with the existing positional parameter
-                 * usage */
-                fname = argv[2];
-                optind = 2;
-        } else if (argc == 5  && 
-                   (argv[2][0] != '-' || isdigit(argv[2][1])) &&
-                   (argv[3][0] != '-' || isdigit(argv[3][1])) &&
-                   (argv[4][0] != '-' || isdigit(argv[4][1])) ) {
-                /* for compatibility with the existing positional parameter
-                 * usage */
-                fname = argv[1];
-                stripe_size_arg = argv[2];
-                stripe_off_arg = argv[3];
-                stripe_count_arg = argv[4];
-                optind = 4;
-        } else {
-                while ((c = getopt_long(argc, argv, "c:di:s:",
-                                                long_opts, NULL)) >= 0) 
-                {
-                        switch (c) {
-                        case 0:
-                                /* Long options. */
-                                break;
-                        case 'c':
-                                stripe_count_arg = optarg;
-                                break;
-                        case 'd':
-                                /* delete the default striping pattern */
-                                delete = 1;
-                                break;
-                        case 'i':
-                                stripe_off_arg = optarg;
-                                break;
-                        case 's':
-                                stripe_size_arg = optarg;
-                                break;
-                        case '?':
-                                return CMD_HELP;
-                        default:
-                                fprintf(stderr, "error: %s: option '%s' "
-                                                "unrecognized\n",
-                                                argv[0], argv[optind - 1]);
-                                return CMD_HELP;
-                        }
-                }
-
-                if (optind < argc)
-                        fname = argv[optind];
-                else
-                        return CMD_HELP;
-
-                if (delete && 
-                    (stripe_size_arg != NULL || stripe_off_arg != NULL || 
-                     stripe_count_arg != NULL)) {
-                        fprintf(stderr, "error: %s: cannot specify -d with "
-                                        "-s, -c or -i options\n",
-                                        argv[0]);
-                        return CMD_HELP;
-                }
-        }
-
-        if (optind != argc - 1) {
-                fprintf(stderr, "error: %s: only 1 filename|dirname can be "
-                                "specified: '%s'\n",
-                                argv[0], argv[argc-1]);
-                return CMD_HELP;
-        }
-
-        /* get the stripe size */
-        if (stripe_size_arg != NULL) {
-                result = parse_size(stripe_size_arg, &st_size, &size_units);
-                if (result) {
-                        fprintf(stderr,"error: bad size '%s'\n",
-                                stripe_size_arg);
-                        return result;
-                }
-        }
-        /* get the stripe offset */
-        if (stripe_off_arg != NULL) {
-                st_offset = strtoul(stripe_off_arg, &end, 0);
-                if (*end != '\0') {
-                        fprintf(stderr, "error: %s: bad stripe offset '%s'\n",
-                                        argv[0], stripe_off_arg);
-                        return CMD_HELP;
-                }
-        }
-        /* get the stripe count */
-        if (stripe_count_arg != NULL) {
-                st_count = strtoul(stripe_count_arg, &end, 0);
-                if (*end != '\0') {
-                        fprintf(stderr, "error: %s: bad stripe count '%s'\n",
-                                        argv[0], stripe_count_arg);
-                        return CMD_HELP;
-                }
-        }
-
-        result = llapi_file_create(fname, st_size, st_offset, st_count, 0);
-        if (result)
-                fprintf(stderr, "error: %s: create stripe file failed\n",
-                                argv[0]);
-
-        return result;
-}
-
-static int set_time(time_t *time, time_t *set, char *str)
-{
-        time_t t;
-        int res = 0;
-        
-        if (str[0] == '+')
-                res = 1;
-        else if (str[0] == '-')
-                res = -1;
-
-        if (res)
-                str++;
-
-        t = strtol(str, NULL, 0);
-        if (*time < t * 24 * 60 * 60) {
-                if (res)
-                        str--;
-                fprintf(stderr, "Wrong time '%s' is specified.\n", str);
-                return INT_MAX;
-        }
-
-        *set = *time - t * 24 * 60 * 60;
-        return res;
-}
-
-static int lfs_find(int argc, char **argv)
-{
-        int new_fashion = 1;
-        int c, ret;
-        time_t t;
-        struct find_param param = { .maxdepth = -1 };
-        char str[1024];
-        struct option long_opts[] = {
-                /* New find options. */
-                {"atime",     required_argument, 0, 'A'},
-                {"ctime",     required_argument, 0, 'C'},
-                {"mtime",     required_argument, 0, 'M'},
-                {"maxdepth",  required_argument, 0, 'D'},
-                {"name",      required_argument, 0, 'n'},
-                /* --obd is considered as a new option. */
-                {"obd",       required_argument, 0, 'O'},
-                {"ost",       required_argument, 0, 'O'},
-                {"print",     no_argument,       0, 'P'},
-                {"print0",    no_argument,       0, 'p'},
-                /* Old find options. */
-                {"quiet",     no_argument,       0, 'q'},
-                {"recursive", no_argument,       0, 'r'},
-                {"size",      required_argument, 0, 's'},
-                {"type",      required_argument, 0, 't'},
-                {"verbose",   no_argument,       0, 'v'},
-                {0, 0, 0, 0}
-        };
-        int pathstart = -1;
-        int pathend = -1;
-        int neg_opt = 0;
-        time_t *xtime;
-        int *xsign;
-        int isoption;
-
-        time(&t);
-
-        while ((c = getopt_long_only(argc, argv, "-A:C:D:M:n:PpO:qrs:t:v",
-                                     long_opts, NULL)) >= 0) {
-                xtime = NULL;
-                xsign = NULL;
-                if (neg_opt)
-                        --neg_opt;
-                /* '!' is part of option */
-                isoption = (c != 1) || (strcmp(optarg, "!") == 0);
-                if (!isoption && pathend != -1) {
-                        fprintf(stderr, "err: %s: filename|dirname must either "
-                                        "precede options or follow options\n",
-                                        argv[0]);
-                        return CMD_HELP;
-                }
-                if (!isoption && pathstart == -1)
-                        pathstart = optind - 1;
-                if (isoption && pathstart != -1 && pathend == -1) {
-                        pathend = optind - 2;
-                        if ((c == 1 && strcmp(optarg, "!") == 0) ||
-                            c == 'P' || c == 'p' || c == 'O' ||
-                            c == 'q' || c == 'r' || c == 'v')
-                                pathend = optind - 1;
-                }
-                switch (c) {
-                case 0:
-                        /* Long options. */
-                        break;
-                case 1:
-                        if (strcmp(optarg, "!") == 0)
-                                neg_opt = 2;
-                      break;
-                case 'A':
-                        xtime = &param.atime;
-                        xsign = &param.asign;
-                case 'C':
-                        if (c == 'C') {
-                                xtime = &param.ctime;
-                                xsign = &param.csign;
-                        }
-                case 'M':
-                        if (c == 'M') {
-                                xtime = &param.mtime;
-                                xsign = &param.msign;
-                        }
-                        new_fashion = 1;
-                        if (neg_opt) {
-                                if (optarg[0] == '-')
-                                        optarg[0] = '+';
-                                else if (optarg[0] == '+')
-                                        optarg[0] = '-';
-                                else {
-                                        str[0] = '-';
-                                        str[1] = '\0';
-                                        strcat(str, optarg);
-                                        optarg = str;
-                                }
-                        }
-                        ret = set_time(&t, xtime, optarg);
-                        if (ret == INT_MAX)
-                                return -1;
-                        if (ret)
-                                *xsign = ret;
-                        break;
-                case 'D':
-                        new_fashion = 1;
-                        param.maxdepth = strtol(optarg, 0, 0);
-                        break;
-                case 'n':
-                        new_fashion = 1;
-                        param.pattern = (char *)optarg;
-                        param.exclude_pattern = !!neg_opt;
-                        break;
-                case 'O': {
-                        char *buf, *token, *next, *p;
-                        int len;
-
-                        len = strlen((char *)optarg);
-                        buf = malloc(len+1);
-                        if (buf == NULL)
-                                return -ENOMEM;
-                        strcpy(buf, (char *)optarg);
-
-                        if (param.num_alloc_obds == 0) {
-                                param.obduuid = (struct obd_uuid *)malloc(FIND_MAX_OSTS *
-                                                       sizeof(struct obd_uuid));
-                                if (param.obduuid == NULL)
-                                        return -ENOMEM;
-                                param.num_alloc_obds = INIT_ALLOC_NUM_OSTS;
-                        }
-
-                        for (token = buf; token && *token; token = next) {
-                                p = strchr(token, ',');
-                                next = 0;
-                                if (p) {
-                                        *p = 0;
-                                        next = p+1;
-                                }
-                                strcpy((char *)&param.obduuid[param.num_obds++].uuid,
-                                       token);
-                        }
-
-                        if (buf)
-                                free(buf);
-                        break;
-                }
-                case 'p':
-                        new_fashion = 1;
-                        param.zeroend = 1;
-                        break;
-                case 'P':
-                        break;
-                case 'q':
-                        new_fashion = 0;
-                        param.quiet++;
-                        param.verbose = 0;
-                        break;
-                case 'r':
-                        new_fashion = 0;
-                        param.recursive = 1;
-                        break;
-                case 't':
-                        param.exclude_type = !!neg_opt;
-                        switch(optarg[0]) {
-                        case 'b': param.type = S_IFBLK; break;
-                        case 'c': param.type = S_IFCHR; break;
-                        case 'd': param.type = S_IFDIR; break;
-                        case 'f': param.type = S_IFREG; break;
-                        case 'l': param.type = S_IFLNK; break;
-                        case 'p': param.type = S_IFIFO; break;
-                        case 's': param.type = S_IFSOCK; break;
-#ifdef S_IFDOOR /* Solaris only */
-                        case 'D': param.type = S_IFDOOR; break;
-#endif
-                        default: fprintf(stderr, "error: %s: bad type '%s'\n",
-                                         argv[0], optarg);
-                                 return CMD_HELP;
-                        };
-                        break;
-                case 's':
-                        if (neg_opt) {
-                                if (optarg[0] == '-')
-                                        optarg[0] = '+';
-                                else if (optarg[0] == '+')
-                                        optarg[0] = '-';
-                                else {
-                                        str[0] = '-';
-                                        str[1] = '\0';
-                                        strcat(str, optarg);
-                                        optarg = str;
-                                }
-                        }
-                        if (optarg[0] == '+')
-                                param.size_sign = -1;
-                        else if (optarg[0] == '-')
-                                param.size_sign = +1;
-
-                        if (param.size_sign)
-                                optarg++;
-                        ret = parse_size(optarg, &param.size,&param.size_units);
-                        if (ret) {
-                                fprintf(stderr,"error: bad size '%s'\n",
-                                        optarg);
-                                return ret;
-                        }
-                        param.size_check = 1;
-                        break;
-                case 'v':
-                        new_fashion = 0;
-                        param.verbose++;
-                        param.quiet = 0;
-                        break;
-                case '?':
-                        return CMD_HELP;
-                default:
-                        fprintf(stderr, "error: %s: option '%s' unrecognized\n",
-                                argv[0], argv[optind - 1]);
-                        return CMD_HELP;
-                };
-        }
-
-        if (pathstart == -1) {
-                fprintf(stderr, "error: %s: no filename|pathname\n",
-                                argv[0]);
-                return CMD_HELP;
-        } else if (pathend == -1) {
-                /* no options */
-                pathend = argc;
-        }
-
-        if (new_fashion) {
-                param.quiet = 1;
-        } else {
-                static int deprecated_warning;
-                if (!deprecated_warning) {
-                        fprintf(stderr, "lfs find: -q, -r, -v options "
-                                "deprecated.  Use 'lfs getstripe' instead.\n");
-                        deprecated_warning = 1;
-                }
-                if (!param.recursive && param.maxdepth == -1)
-                        param.maxdepth = 1;
-        }
-
-        do {
-                if (new_fashion)
-                        ret = llapi_find(argv[pathstart], &param);
-                else
-                        ret = llapi_getstripe(argv[pathstart], &param);
-        } while (++pathstart < pathend && !ret);
-
-        if (ret)
-                fprintf(stderr, "error: %s failed for %s.\n",
-                        argv[0], argv[optind - 1]);
-
-        if (param.obduuid && param.num_alloc_obds)
-                free(param.obduuid);
-
-        return ret;
-}
-
-static int lfs_getstripe(int argc, char **argv)
-{
-        struct option long_opts[] = {
-                {"obd", 1, 0, 'O'},
-                {"quiet", 0, 0, 'q'},
-                {"recursive", 0, 0, 'r'},
-                {"verbose", 0, 0, 'v'},
-                {0, 0, 0, 0}
-        };
-        char short_opts[] = "hO:qrv";
-        int c, rc;
-        struct find_param param = { 0 };
-
-        optind = 0;
-        while ((c = getopt_long(argc, argv, short_opts,
-                                long_opts, NULL)) != -1) {
-                switch (c) {
-                case 'O':
-                        if (param.obduuid) {
-                                fprintf(stderr,
-                                        "error: %s: only one obduuid allowed",
-                                        argv[0]);
-                                return CMD_HELP;
-                        }
-                        param.obduuid = (struct obd_uuid *)optarg;
-                        break;
-                case 'q':
-                        param.quiet++;
-                        param.verbose = 0;
-                        break;
-                case 'r':
-                        param.recursive = 1;
-                        break;
-                case 'v':
-                        param.verbose++;
-                        param.quiet = 0;
-                        break;
-                case '?':
-                        return CMD_HELP;
-                default:
-                        fprintf(stderr, "error: %s: option '%s' unrecognized\n",
-                                argv[0], argv[optind - 1]);
-                        return CMD_HELP;
-                }
-        }
-
-        if (optind >= argc)
-                return CMD_HELP;
-
-        param.maxdepth = param.recursive ? -1 : 1;
-
-        do {
-                rc = llapi_getstripe(argv[optind], &param);
-        } while (++optind < argc && !rc);
-
-        if (rc)
-                fprintf(stderr, "error: %s failed for %s.\n", 
-                        argv[0], argv[optind - 1]);
-        return rc;
-}
-
-static int lfs_osts(int argc, char **argv)
-{
-        FILE *fp;
-        struct mntent *mnt = NULL;
-        struct obd_uuid *obduuid = NULL;
-        struct find_param param;
-        int rc=0;
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        fp = setmntent(MOUNTED, "r");
-
-        if (fp == NULL) {
-                 fprintf(stderr, "%s: setmntent(%s): %s:", argv[0], MOUNTED,
-                        strerror (errno));
-        } else {
-                mnt = getmntent(fp);
-                memset(&param, 0, sizeof(param));
-                param.obduuid = obduuid;
-                while (feof(fp) == 0 && ferror(fp) ==0) {
-                        if (llapi_is_lustre_mnt(mnt)) {
-                                rc = llapi_getstripe(mnt->mnt_dir, &param);
-                                if (rc)
-                                        fprintf(stderr,
-                                               "error: %s: failed on %s\n",
-                                               argv[0], mnt->mnt_dir);
-                        }
-                        mnt = getmntent(fp);
-                }
-                endmntent(fp);
-        }
-
-        return rc;
-}
-
-#define COOK(value)                                                     \
-({                                                                      \
-        int radix = 0;                                                  \
-        while (value > 1024) {                                          \
-                value /= 1024;                                          \
-                radix++;                                                \
-        }                                                               \
-        radix;                                                          \
-})
-#define UUF     "%-20s"
-#define CSF     "%9s"
-#define CDF     "%9llu"
-#define HSF     "%8s"
-#define HDF     "%6.1f"
-#define RSF     "%5s"
-#define RDF     "%4d%%"
-
-static int path2mnt(char *path, FILE *fp, char *mntdir, int dir_len)
-{
-        char rpath[PATH_MAX] = {'\0'};
-        struct mntent *mnt;
-        int rc, len, out_len = 0;
-
-        if (!realpath(path, rpath)) {
-                rc = -errno;
-                fprintf(stderr, "error: lfs df: invalid path '%s': %s\n",
-                        path, strerror(-rc));
-                return rc;
-        }
-
-        len = 0;
-        mnt = getmntent(fp);
-        while (feof(fp) == 0 && ferror(fp) == 0) {
-                if (llapi_is_lustre_mnt(mnt)) {
-                        len = strlen(mnt->mnt_dir);
-                        if (len > out_len &&
-                            !strncmp(rpath, mnt->mnt_dir, len)) {
-                                out_len = len;
-                                memset(mntdir, 0, dir_len);
-                                strncpy(mntdir, mnt->mnt_dir, dir_len);
-                        }
-                }
-                mnt = getmntent(fp);
-        }
-
-        if (out_len > 0)
-                return 0;
-
-        fprintf(stderr, "error: lfs df: %s isn't mounted on lustre\n", path);
-        return -EINVAL;
-}
-
-static int showdf(char *mntdir, struct obd_statfs *stat,
-                  char *uuid, int ishow, int cooked,
-                  char *type, int index, int rc)
-{
-        long long avail, used, total;
-        double ratio = 0;
-        char *suffix = "KMGTPEZY";
-        /* Note if we have >2^64 bytes/fs these buffers will need to be grown */
-        char tbuf[20], ubuf[20], abuf[20], rbuf[20];
-
-        if (!uuid || !stat)
-                return -EINVAL;
-
-        switch (rc) {
-        case 0:
-                if (ishow) {
-                        avail = stat->os_ffree;
-                        used = stat->os_files - stat->os_ffree;
-                        total = stat->os_files;
-                } else {
-                        int shift = cooked ? 0 : 10;
-
-                        avail = (stat->os_bavail * stat->os_bsize) >> shift;
-                        used  = ((stat->os_blocks - stat->os_bfree) *
-                                 stat->os_bsize) >> shift;
-                        total = (stat->os_blocks * stat->os_bsize) >> shift;
-                }
-
-                if (total > 0)
-                        ratio = (double)used / (double)total;
-
-                if (cooked) {
-                        int i;
-                        double cook_val;
-
-                        cook_val = (double)total;
-                        i = COOK(cook_val);
-                        if (i > 0)
-                                sprintf(tbuf, HDF"%c", cook_val, suffix[i - 1]);
-                        else
-                                sprintf(tbuf, CDF, total);
-
-                        cook_val = (double)used;
-                        i = COOK(cook_val);
-                        if (i > 0)
-                                sprintf(ubuf, HDF"%c", cook_val, suffix[i - 1]);
-                        else
-                                sprintf(ubuf, CDF, used);
-
-                        cook_val = (double)avail;
-                        i = COOK(cook_val);
-                        if (i > 0)
-                                sprintf(abuf, HDF"%c", cook_val, suffix[i - 1]);
-                        else
-                                sprintf(abuf, CDF, avail);
-                } else {
-                        sprintf(tbuf, CDF, total);
-                        sprintf(ubuf, CDF, used);
-                        sprintf(abuf, CDF, avail);
-                }
-
-                sprintf(rbuf, RDF, (int)(ratio * 100));
-                printf(UUF" "CSF" "CSF" "CSF" "RSF" %-s",
-                       uuid, tbuf, ubuf, abuf, rbuf, mntdir);
-                if (type)
-                        printf("[%s:%d]\n", type, index);
-                else
-                        printf("\n");
-
-                break;
-        case -ENODATA:
-                printf(UUF": inactive device\n", uuid);
-                break;
-        default:
-                printf(UUF": %s\n", uuid, strerror(-rc));
-                break;
-        }
-
-        return 0;
-}
-
-static int mntdf(char *mntdir, int ishow, int cooked)
-{
-        struct obd_statfs stat_buf, sum = { .os_bsize = 1 };
-        struct obd_uuid uuid_buf;
-        __u32 index;
-        int rc;
-
-        if (ishow)
-                printf(UUF" "CSF" "CSF" "CSF" "RSF" %-s\n",
-                       "UUID", "Inodes", "IUsed", "IFree",
-                       "IUse%", "Mounted on");
-        else
-                printf(UUF" "CSF" "CSF" "CSF" "RSF" %-s\n",
-                       "UUID", cooked ? "bytes" : "1K-blocks",
-                       "Used", "Available", "Use%", "Mounted on");
-
-        for (index = 0; ; index++) {
-                memset(&stat_buf, 0, sizeof(struct obd_statfs));
-                memset(&uuid_buf, 0, sizeof(struct obd_uuid));
-                rc = llapi_obd_statfs(mntdir, LL_STATFS_MDC, index,
-                                      &stat_buf, &uuid_buf);
-                if (rc == -ENODEV)
-                        break;
-
-                if (rc == -EAGAIN)
-                        continue;
-
-                if (rc == -ENOTCONN || rc == -ETIMEDOUT || rc == -EIO ||
-                    rc == -ENODATA || rc == 0) {
-                        showdf(mntdir, &stat_buf, obd_uuid2str(&uuid_buf),
-                               ishow, cooked, "MDT", index, rc);
-                } else {
-                        fprintf(stderr,
-                                "error: llapi_obd_statfs(%s): %s (%d)\n",
-                                obd_uuid2str(&uuid_buf), strerror(-rc), rc);
-                        return rc;
-                }
-                if (rc == 0) {
-                        sum.os_ffree += stat_buf.os_ffree;
-                        sum.os_files += stat_buf.os_files;
-                }
-        }
-
-        for (index = 0; ; index++) {
-                memset(&stat_buf, 0, sizeof(struct obd_statfs));
-                memset(&uuid_buf, 0, sizeof(struct obd_uuid));
-                rc = llapi_obd_statfs(mntdir, LL_STATFS_LOV, index,
-                                      &stat_buf, &uuid_buf);
-                if (rc == -ENODEV)
-                        break;
-
-                if (rc == -EAGAIN)
-                        continue;
-
-                if (rc == -ENOTCONN || rc == -ETIMEDOUT || rc == -EIO ||
-                    rc == -ENODATA || rc == 0) {
-                        showdf(mntdir, &stat_buf, obd_uuid2str(&uuid_buf),
-                               ishow, cooked, "OST", index, rc);
-                } else {
-                        fprintf(stderr,
-                                "error: llapi_obd_statfs failed: %s (%d)\n",
-                                strerror(-rc), rc);
-                        return rc;
-                }
-                if (rc == 0) {
-                        sum.os_blocks += stat_buf.os_blocks * stat_buf.os_bsize;
-                        sum.os_bfree  += stat_buf.os_bfree * stat_buf.os_bsize;
-                        sum.os_bavail += stat_buf.os_bavail * stat_buf.os_bsize;
-                }
-        }
-
-        printf("\n");
-        showdf(mntdir, &sum, "filesystem summary:", ishow, cooked, NULL, 0,0);
-
-        return 0;
-}
-
-static int lfs_df(int argc, char **argv)
-{
-        FILE *fp;
-        char *path = NULL;
-        struct mntent *mnt = NULL;
-        char mntdir[PATH_MAX] = {'\0'};
-        int ishow = 0, cooked = 0;
-        int c, rc = 0;
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ih")) != -1) {
-                switch (c) {
-                case 'i':
-                        ishow = 1;
-                        break;
-                case 'h':
-                        cooked = 1;
-                        break;
-                default:
-                        return CMD_HELP;
-                }
-        }
-        if (optind < argc )
-                path = argv[optind];
-
-        fp = setmntent(MOUNTED, "r");
-        if (fp == NULL) {
-                rc = -errno;
-                fprintf(stderr, "error: %s: open %s failed( %s )\n",
-                        argv[0], MOUNTED, strerror(errno));
-                return rc;
-        }
-        if (path) {
-                rc = path2mnt(path, fp, mntdir, sizeof(mntdir));
-                if (rc) {
-                        endmntent(fp);
-                        return rc;
-                }
-
-                rc = mntdf(mntdir, ishow, cooked);
-                printf("\n");
-                endmntent(fp);
-        } else {
-                mnt = getmntent(fp);
-                while (feof(fp) == 0 && ferror(fp) == 0) {
-                        if (llapi_is_lustre_mnt(mnt)) {
-                                rc = mntdf(mnt->mnt_dir, ishow, cooked);
-                                if (rc)
-                                        break;
-                                printf("\n");
-                        }
-                        mnt = getmntent(fp);
-                }
-                endmntent(fp);
-        }
-
-        return rc;
-}
-
-static int lfs_check(int argc, char **argv)
-{
-        int rc;
-        FILE *fp;
-        struct mntent *mnt = NULL;
-        int num_types = 1;
-        char *obd_types[2];
-        char obd_type1[4];
-        char obd_type2[4];
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        obd_types[0] = obd_type1;
-        obd_types[1] = obd_type2;
-
-        if (strcmp(argv[1], "osts") == 0) {
-                strcpy(obd_types[0], "osc");
-        } else if (strcmp(argv[1], "mds") == 0) {
-                strcpy(obd_types[0], "mdc");
-        } else if (strcmp(argv[1], "servers") == 0) {
-                num_types = 2;
-                strcpy(obd_types[0], "osc");
-                strcpy(obd_types[1], "mdc");
-        } else {
-                fprintf(stderr, "error: %s: option '%s' unrecognized\n",
-                                argv[0], argv[1]);
-                        return CMD_HELP;
-        }
-
-        fp = setmntent(MOUNTED, "r");
-        if (fp == NULL) {
-                 fprintf(stderr, "setmntent(%s): %s:", MOUNTED,
-                        strerror (errno));
-        } else {
-                mnt = getmntent(fp);
-                while (feof(fp) == 0 && ferror(fp) ==0) {
-                        if (llapi_is_lustre_mnt(mnt))
-                                break;
-                        mnt = getmntent(fp);
-                }
-                endmntent(fp);
-        }
-
-        if (!mnt) {
-                fprintf(stderr, "No suitable Lustre mount found\n");
-                return -1;
-        }
-
-        rc = llapi_target_check(num_types, obd_types, mnt->mnt_dir);
-
-        if (rc)
-                fprintf(stderr, "error: %s: %s status failed\n",
-                                argv[0],argv[1]);
-
-        return rc;
-
-}
-
-static int lfs_catinfo(int argc, char **argv)
-{
-        FILE *fp;
-        struct mntent *mnt = NULL;
-        int rc;
-
-        if (argc < 2 || (!strcmp(argv[1],"config") && argc < 3))
-                return CMD_HELP;
-
-        if (strcmp(argv[1], "config") && strcmp(argv[1], "deletions"))
-                return CMD_HELP;
-
-        fp = setmntent(MOUNTED, "r");
-        if (fp == NULL) {
-                 fprintf(stderr, "setmntent(%s): %s:", MOUNTED,
-                         strerror(errno));
-        } else {
-                mnt = getmntent(fp);
-                while (feof(fp) == 0 && ferror(fp) == 0) {
-                        if (llapi_is_lustre_mnt(mnt))
-                                break;
-                        mnt = getmntent(fp);
-                }
-                endmntent(fp);
-        }
-
-        if (mnt) {
-                if (argc == 3)
-                        rc = llapi_catinfo(mnt->mnt_dir, argv[1], argv[2]);
-                else
-                        rc = llapi_catinfo(mnt->mnt_dir, argv[1], NULL);
-        } else {
-                fprintf(stderr, "no lustre_lite mounted.\n");
-                rc = -1;
-        }
-
-        return rc;
-}
-
-int lfs_join(int argc, char **argv)
-{
-        char *name_head, *name_tail;
-        int fd, rc;
-        loff_t size;
-
-        if (argc != 3)
-                return CMD_HELP;
-        name_head = argv[1];
-        fd = open(name_head, O_WRONLY);
-        if (fd < 0) {
-                fprintf(stderr, "Can not open name_head %s rc=%d\n",
-                        name_head, fd);
-                return fd;
-        }
-        size = lseek(fd, 0, SEEK_END);
-        if (size % JOIN_FILE_ALIGN) {
-                fprintf(stderr,"head file %s size %llu must be mutiple of %d\n",
-                        name_head, (long long)size, JOIN_FILE_ALIGN);
-                rc = -EINVAL;
-                goto out;
-        }
-        name_tail = argv[2];
-        rc = ioctl(fd, LL_IOC_JOIN, name_tail);
-out:
-        close(fd);
-        if (rc) {
-                fprintf(stderr, "Lustre joining files: %s, %s, failed\n",
-                        argv[1], argv[2]);
-        }
-        return rc;
-}
-
-#ifdef HAVE_QUOTA_SUPPORT
-static int lfs_quotachown(int argc, char **argv)
-{
-
-        int c,rc;
-        int flag = 0;
-
-        while ((c = getopt(argc, argv, "i")) != -1) {
-                switch (c) {
-                case 'i':
-                        flag++;
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-        if (optind == argc)
-                return CMD_HELP;
-        rc = llapi_quotachown(argv[optind], flag);
-        if(rc)
-                fprintf(stderr,"error: change file owner/group failed.\n");
-        return rc;
-}
-
-
-static int lfs_quotacheck(int argc, char **argv)
-{
-        int c, check_type = 0;
-        char *mnt;
-        struct if_quotacheck qchk;
-        struct if_quotactl qctl;
-        char *obd_type = (char *)qchk.obd_type;
-        int rc;
-
-        memset(&qchk, 0, sizeof(qchk));
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ug")) != -1) {
-                switch (c) {
-                case 'u':
-                        check_type |= 0x01;
-                        break;
-                case 'g':
-                        check_type |= 0x02;
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-
-        if (check_type)
-                check_type--;
-        else    /* do quotacheck for both user & group quota by default */
-                check_type = 0x02;
-
-        if (argc == optind)
-                return CMD_HELP;
-
-        mnt = argv[optind];
-
-        memset(&qctl, 0, sizeof(qctl));
-        qctl.qc_cmd = LUSTRE_Q_QUOTAOFF;
-        qctl.qc_id = QFMT_LDISKFS;
-        qctl.qc_type = check_type;
-        rc = llapi_quotactl(mnt, &qctl);
-        if (rc) {
-                fprintf(stderr, "quota off failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        rc = llapi_quotacheck(mnt, check_type);
-        if (rc) {
-                fprintf(stderr, "quotacheck failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        rc = llapi_poll_quotacheck(mnt, &qchk);
-        if (rc) {
-                if (*obd_type)
-                        fprintf(stderr, "%s %s ", obd_type,
-                                obd_uuid2str(&qchk.obd_uuid));
-                fprintf(stderr, "quota check failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        memset(&qctl, 0, sizeof(qctl));
-        qctl.qc_cmd = LUSTRE_Q_QUOTAON;
-        qctl.qc_id = QFMT_LDISKFS;
-        qctl.qc_type = check_type;
-        rc = llapi_quotactl(mnt, &qctl);
-        if (rc) {
-                if (*obd_type)
-                        fprintf(stderr, "%s %s ", (char *)qctl.obd_type,
-                                obd_uuid2str(&qctl.obd_uuid));
-                fprintf(stderr, "%s turn on quota failed: %s\n",
-                        argv[0], strerror(errno));
-                return rc;
-        }
-
-        return 0;
-}
-
-static int lfs_quotaon(int argc, char **argv)
-{
-        int c;
-        char *mnt;
-        struct if_quotactl qctl;
-        char *obd_type = (char *)qctl.obd_type;
-        int rc;
-
-        memset(&qctl, 0, sizeof(qctl));
-        qctl.qc_cmd = LUSTRE_Q_QUOTAON;
-        qctl.qc_id = QFMT_LDISKFS;
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ugf")) != -1) {
-                switch (c) {
-                case 'u':
-                        qctl.qc_type |= 0x01;
-                        break;
-                case 'g':
-                        qctl.qc_type |= 0x02;
-                        break;
-                case 'f':
-                        qctl.qc_cmd = LUSTRE_Q_QUOTAOFF;
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-
-        if (qctl.qc_type)
-                qctl.qc_type--;
-        else /* by default, enable quota for both user & group */
-                qctl.qc_type = 0x02;
-
-        if (argc == optind)
-                return CMD_HELP;
-
-        mnt = argv[optind];
-
-        rc = llapi_quotactl(mnt, &qctl);
-        if (rc) {
-                if (*obd_type)
-                        fprintf(stderr, "%s %s ", obd_type,
-                                obd_uuid2str(&qctl.obd_uuid));
-                fprintf(stderr, "%s failed: %s\n", argv[0], strerror(errno));
-                return rc;
-        }
-
-        return 0;
-}
-
-static int lfs_quotaoff(int argc, char **argv)
-{
-        int c;
-        char *mnt;
-        struct if_quotactl qctl;
-        char *obd_type = (char *)qctl.obd_type;
-        int rc;
-
-        memset(&qctl, 0, sizeof(qctl));
-        qctl.qc_cmd = LUSTRE_Q_QUOTAOFF;
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ug")) != -1) {
-                switch (c) {
-                case 'u':
-                        qctl.qc_type |= 0x01;
-                        break;
-                case 'g':
-                        qctl.qc_type |= 0x02;
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-
-        if (qctl.qc_type)
-                qctl.qc_type--;
-        else /* by default, disable quota for both user & group */
-                qctl.qc_type = 0x02;
-
-        if (argc == optind)
-                return CMD_HELP;
-
-        mnt = argv[optind];
-
-        rc = llapi_quotactl(mnt, &qctl);
-        if (rc == -1 && errno == ESRCH) {
-                fprintf(stderr, "\n%s quotas are not enabled.\n", 
-                        qctl.qc_type == 0x00 ? "user" : "group");
-                return 0;
-        }
-        if (rc) {
-                if (*obd_type)
-                        fprintf(stderr, "%s %s ", obd_type,
-                                obd_uuid2str(&qctl.obd_uuid));
-                fprintf(stderr, "quotaoff failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        return 0;
-}
-
-static int lfs_quotainv(int argc, char **argv)
-{
-        int c;
-        char *mnt;
-        struct if_quotactl qctl;
-        int rc;
-
-        memset(&qctl, 0, sizeof(qctl));
-        qctl.qc_cmd = LUSTRE_Q_INVALIDATE;
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ug")) != -1) {
-                switch (c) {
-                case 'u':
-                        qctl.qc_type |= 0x01;
-                        break;
-                case 'g':
-                        qctl.qc_type |= 0x02;
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-
-        if (qctl.qc_type)
-                qctl.qc_type--;
-        else /* by default, invalidate quota for both user & group */
-                qctl.qc_type = 0x02;
-
-        if (argc == optind)
-                return CMD_HELP;
-
-        mnt = argv[optind];
-
-        rc = llapi_quotactl(mnt, &qctl);
-        if (rc) {
-                fprintf(stderr, "quotainv failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        return 0;
-}
-
-static int name2id(unsigned int *id, char *name, int type)
-{
-        if (type == USRQUOTA) {
-                struct passwd *entry;
-
-                if (!(entry = getpwnam(name))) {
-                        if (!errno)
-                                errno = ENOENT;
-                        return -1;
-                }
-
-                *id = entry->pw_uid;
-        } else {
-                struct group *entry;
-
-                if (!(entry = getgrnam(name))) {
-                        if (!errno)
-                                errno = ENOENT;
-                        return -1;
-                }
-
-                *id = entry->gr_gid;
-        }
-
-        return 0;
-}
-
-static int id2name(char **name, unsigned int id, int type)
-{
-        if (type == USRQUOTA) {
-                struct passwd *entry;
-
-                if (!(entry = getpwuid(id))) {
-                        if (!errno)
-                                errno = ENOENT;
-                        return -1;
-                }
-
-                *name = entry->pw_name;
-        } else {
-                struct group *entry;
-
-                if (!(entry = getgrgid(id))) {
-                        if (!errno)
-                                errno = ENOENT;
-                        return -1;
-                }
-
-                *name = entry->gr_name;
-        }
-
-        return 0;
-}
-
-#define ARG2INT(nr, str, msg)                                           \
-do {                                                                    \
-        char *endp;                                                     \
-        nr = strtol(str, &endp, 0);                                     \
-        if (*endp) {                                                    \
-                fprintf(stderr, "error: bad %s: %s\n", msg, str);       \
-                return CMD_HELP;                                        \
-        }                                                               \
-} while (0)
-
-#define ADD_OVERFLOW(a,b) ((a + b) < a) ? (a = ULONG_MAX) : (a = a + b)
-
-/* Convert format time string "XXwXXdXXhXXmXXs" into seconds value
- * returns the value or ULONG_MAX on integer overflow or incorrect format
- * Notes:
- *        1. the order of specifiers is arbitrary (may be: 5w3s or 3s5w)
- *        2. specifiers may be encountered multiple times (2s3s is 5 seconds)
- *        3. empty integer value is interpreted as 0
- */
-
-static unsigned long str2sec(const char* timestr) {
-        const char spec[] = "smhdw";
-        const unsigned long mult[] = {1, 60, 60*60, 24*60*60, 7*24*60*60};
-        unsigned long val = 0;
-        char *tail;
-
-        if (strpbrk(timestr, spec) == NULL) {
-                /* no specifiers inside the time string,
-                   should treat it as an integer value */
-                val = strtoul(timestr, &tail, 10);
-                return *tail ? ULONG_MAX : val;
-        }
-
-        /* format string is XXwXXdXXhXXmXXs */
-        while (*timestr) {
-                unsigned long v;
-                int ind;
-                char* ptr;
-
-                v = strtoul(timestr, &tail, 10);
-                if (v == ULONG_MAX || *tail == '\0')
-                        /* value too large (ULONG_MAX or more) 
-                           or missing specifier */
-                        goto error;
-
-                ptr = strchr(spec, *tail);
-                if (ptr == NULL)
-                        /* unknown specifier */
-                        goto error;
-
-                ind = ptr - spec;
-
-                /* check if product will overflow the type */
-                if (!(v < ULONG_MAX / mult[ind]))
-                        goto error;
-
-                ADD_OVERFLOW(val, mult[ind] * v);
-                if (val == ULONG_MAX)
-                        goto error;
-
-                timestr = tail + 1;
-        }
-
-        return val;
-
-error:
-        return ULONG_MAX;
-}
-
-#define ARG2ULL(nr, str, msg)                                           \
-do {                                                                    \
-        char *endp;                                                     \
-        nr = strtoull(str, &endp, 0);                                   \
-        if (*endp) {                                                    \
-                fprintf(stderr, "error: bad %s: %s\n", msg, str);       \
-                return CMD_HELP;                                        \
-        }                                                               \
-} while (0)
-
-
-int lfs_setquota(int argc, char **argv)
-{
-        int c;
-        char *mnt;
-        struct if_quotactl qctl;
-        char *obd_type = (char *)qctl.obd_type;
-        int rc;
-
-        memset(&qctl, 0, sizeof(qctl));
-        qctl.qc_cmd = LUSTRE_Q_SETQUOTA;
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ugt")) != -1) {
-                switch (c) {
-                case 'u':
-                        qctl.qc_type |= 0x01;
-                        break;
-                case 'g':
-                        qctl.qc_type |= 0x02;
-                        break;
-                case 't':
-                        qctl.qc_cmd = LUSTRE_Q_SETINFO;
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-
-        if (qctl.qc_type)
-                qctl.qc_type--;
-
-        if (qctl.qc_type == UGQUOTA) {
-                fprintf(stderr, "error: user and group quotas can't be set "
-                                "both\n");
-                return CMD_HELP;
-        }
-
-        if (qctl.qc_cmd == LUSTRE_Q_SETQUOTA) {
-                struct obd_dqblk *dqb = &qctl.qc_dqblk;
-
-                if (optind + 6 != argc)
-                        return CMD_HELP;
-
-                rc = name2id(&qctl.qc_id, argv[optind++], qctl.qc_type);
-                if (rc) {
-                        fprintf(stderr, "error: find id for name %s failed: %s\n",
-                                argv[optind - 1], strerror(errno));
-                        return CMD_HELP;
-                }
-
-                ARG2ULL(dqb->dqb_bsoftlimit, argv[optind++], "block-softlimit");
-                ARG2ULL(dqb->dqb_bhardlimit, argv[optind++], "block-hardlimit");
-                ARG2ULL(dqb->dqb_isoftlimit, argv[optind++], "inode-softlimit");
-                ARG2ULL(dqb->dqb_ihardlimit, argv[optind++], "inode-hardlimit");
-
-                dqb->dqb_valid = QIF_LIMITS;
-        } else {
-                struct obd_dqinfo *dqi = &qctl.qc_dqinfo;
-
-                if (optind + 3 != argc)
-                        return CMD_HELP;
-
-                if ((dqi->dqi_bgrace = str2sec(argv[optind++])) == ULONG_MAX) {
-                        fprintf(stderr, "error: bad %s: %s\n", "block-grace", argv[optind - 1]);
-                        return CMD_HELP;
-                }
-                if ((dqi->dqi_igrace = str2sec(argv[optind++])) == ULONG_MAX) {
-                        fprintf(stderr, "error: bad %s: %s\n", "inode-grace", argv[optind - 1]);
-                        return CMD_HELP;
-		}
-        }
-
-        mnt = argv[optind];
-
-        rc = llapi_quotactl(mnt, &qctl);
-        if (rc) {
-                if (*obd_type)
-                        fprintf(stderr, "%s %s ", obd_type,
-                                obd_uuid2str(&qctl.obd_uuid));
-                fprintf(stderr, "setquota failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        return 0;
-}
-
-static inline char *type2name(int check_type)
-{
-        if (check_type == USRQUOTA)
-                return "user";
-        else if (check_type == GRPQUOTA)
-                return "group";
-        else
-                return "unknown";
-}
-
-
-/* Converts seconds value into format string
- * result is returned in buf
- * Notes:
- *        1. result is in descenting order: 1w2d3h4m5s
- *        2. zero fields are not filled (except for p. 3): 5d1s
- *        3. zero seconds value is presented as "0s"
- */
-static void sec2str(time_t seconds, char *buf)
-{
-        const char spec[] = "smhdw";
-        const unsigned long mult[] = {1, 60, 60*60, 24*60*60, 7*24*60*60};
-        unsigned long c;
-        char* tail = buf;
-        int i;
-
-        for (i = sizeof(mult) / sizeof(mult[0]) - 1 ; i >= 0; i--) {
-                c = seconds / mult[i];
-
-                if (c > 0 || (i == 0 && buf == tail))
-                        tail += snprintf(tail, 40-(tail-buf), "%lu%c", c, spec[i]);
-
-                seconds %= mult[i];
-        }
-}
-
-
-static void diff2str(time_t seconds, char *buf, time_t now)
-{
-
-        buf[0] = 0;
-        if (!seconds)
-                return;
-        if (seconds <= now) {
-                strcpy(buf, "none");
-                return;
-        }
-        sec2str(seconds - now, buf);
-}
-
-static void print_quota_title(char *name, struct if_quotactl *qctl)
-{
-        printf("Disk quotas for %s %s (%cid %u):\n",
-               type2name(qctl->qc_type), name,
-               *type2name(qctl->qc_type), qctl->qc_id);
-        printf("%15s%8s %7s%8s%8s%8s %7s%8s%8s\n",
-               "Filesystem",
-               "kbytes", "quota", "limit", "grace",
-               "files", "quota", "limit", "grace");
-}
-
-#define GENERAL_QUOTA_INFO 1
-#define MDS_QUOTA_INFO     2
-#define OST_QUOTA_INFO     3
-
-static void print_quota(char *mnt, struct if_quotactl *qctl, int type)
-{
-        time_t now;
-
-        time(&now);
-
-        if (qctl->qc_cmd == LUSTRE_Q_GETQUOTA || qctl->qc_cmd == Q_GETOQUOTA) {
-                int bover = 0, iover = 0;
-                struct obd_dqblk *dqb = &qctl->qc_dqblk;
-
-                if (dqb->dqb_bhardlimit &&
-                    toqb(dqb->dqb_curspace) > dqb->dqb_bhardlimit) {
-                        bover = 1;
-                } else if (dqb->dqb_bsoftlimit &&
-                           toqb(dqb->dqb_curspace) > dqb->dqb_bsoftlimit) {
-                        if (dqb->dqb_btime > now) {
-                                bover = 2;
-                        } else {
-                                bover = 3;
-                        }
-                }
-
-                if (dqb->dqb_ihardlimit &&
-                    dqb->dqb_curinodes > dqb->dqb_ihardlimit) {
-                        iover = 1;
-                } else if (dqb->dqb_isoftlimit &&
-                           dqb->dqb_curinodes > dqb->dqb_isoftlimit) {
-                        if (dqb->dqb_btime > now) {
-                                iover = 2;
-                        } else {
-                                iover = 3;
-                        }
-                }
-
-#if 0           /* XXX: always print quotas even when no usages */
-                if (dqb->dqb_curspace || dqb->dqb_curinodes)
-#endif
-                {
-                        char numbuf[3][32];
-                        char timebuf[40];
-
-                        if (strlen(mnt) > 15)
-                                printf("%s\n%15s", mnt, "");
-                        else
-                                printf("%15s", mnt);
-
-                        if (bover)
-                                diff2str(dqb->dqb_btime, timebuf, now);
-                        sprintf(numbuf[0], (dqb->dqb_valid & QIF_SPACE) ?
-                                LPU64 : "["LPU64"]", toqb(dqb->dqb_curspace));
-                        if (type == GENERAL_QUOTA_INFO)
-                                sprintf(numbuf[1], (dqb->dqb_valid & QIF_BLIMITS)
-                                        ? LPU64 : "["LPU64"]",
-                                        dqb->dqb_bsoftlimit);
-                        else
-                                sprintf(numbuf[1], "%s", "");
-                        sprintf(numbuf[2], (dqb->dqb_valid & QIF_BLIMITS)
-                                ? LPU64 : "["LPU64"]", dqb->dqb_bhardlimit);
-                        printf(" %7s%c %6s %7s %7s",
-                               numbuf[0], bover ? '*' : ' ', numbuf[1],
-                               numbuf[2], bover > 1 ? timebuf : "");
-
-                        if (iover)
-                                diff2str(dqb->dqb_itime, timebuf, now);
-
-                        sprintf(numbuf[0], (dqb->dqb_valid & QIF_INODES) ?
-                                LPU64 : "["LPU64"]", dqb->dqb_curinodes);
-                       if (type == GENERAL_QUOTA_INFO)
-                                sprintf(numbuf[1], (dqb->dqb_valid & QIF_ILIMITS)
-                                        ? LPU64 : "["LPU64"]",
-                                        dqb->dqb_isoftlimit);
-                        else
-                                sprintf(numbuf[1], "%s", "");
-                        sprintf(numbuf[2], (dqb->dqb_valid & QIF_ILIMITS) ?
-                                LPU64 : "["LPU64"]", dqb->dqb_ihardlimit);
-                        if (type != OST_QUOTA_INFO)
-                                printf(" %7s%c %6s %7s %7s",
-                                       numbuf[0], iover ? '*' : ' ', numbuf[1],
-                                       numbuf[2], iover > 1 ? timebuf : "");
-                        printf("\n");
-                }
-        } else if (qctl->qc_cmd == LUSTRE_Q_GETINFO ||
-                   qctl->qc_cmd == Q_GETOINFO) {
-                char bgtimebuf[40];
-                char igtimebuf[40];
-
-                sec2str(qctl->qc_dqinfo.dqi_bgrace, bgtimebuf);
-                sec2str(qctl->qc_dqinfo.dqi_igrace, igtimebuf);
-                printf("Block grace time: %s; Inode grace time: %s\n",
-                       bgtimebuf, igtimebuf);
-        }
-}
-
-static int print_mds_quota(char *mnt, struct if_quotactl *qctl)
-{
-        int rc;
-
-        /* XXX: this is a flag to mark that only mds quota is wanted */
-        qctl->qc_dqblk.dqb_valid = 1;
-        rc = llapi_quotactl(mnt, qctl);
-        if (rc) {
-                fprintf(stderr, "quotactl failed: %s\n", strerror(errno));
-                return rc;
-        }
-
-        print_quota(obd_uuid2str(&qctl->obd_uuid), qctl, MDS_QUOTA_INFO);
-        return 0;
-}
-
-static int print_lov_quota(char *mnt, struct if_quotactl *qctl)
-{
-        DIR *dir;
-        struct obd_uuid *uuids = NULL, *uuidp;
-        int obdcount = 1024;
-        int i, rc = 0, rc1 = 0;
-
-        dir = opendir(mnt);
-        if (!dir) {
-                fprintf(stderr, "open %s failed: %s\n", mnt, strerror(errno));
-                return -ENOENT;
-        }
-
-        uuids = (struct obd_uuid *)malloc(INIT_ALLOC_NUM_OSTS *
-                                          sizeof(struct obd_uuid));
-        if (uuids == NULL)
-                goto out;
-
-retry_get_uuids:
-        rc = llapi_lov_get_uuids(dirfd(dir), uuids, &obdcount);
-        if (rc != 0) {
-                struct obd_uuid *uuids_temp;
-
-                if (rc == -EOVERFLOW) {
-                        uuids_temp = realloc(uuids, obdcount *
-                                             sizeof(struct obd_uuid));
-                        if (uuids_temp != NULL)
-                                goto retry_get_uuids;
-                        else
-                                rc = -ENOMEM;
-                }
-
-                fprintf(stderr, "get ost uuid failed: %s\n", strerror(rc));
-                goto out;
-        }
-
-        for (i = 0, uuidp = uuids; i < obdcount; i++, uuidp++) {
-                memcpy(&qctl->obd_uuid, uuidp, sizeof(*uuidp));
-
-                /* XXX clear this flag to get quota from osts */
-                qctl->qc_dqblk.dqb_valid = 0;
-                rc = llapi_quotactl(mnt, qctl);
-                if (rc) {
-                        if (!rc1)
-                                rc1 = rc;
-                        fprintf(stderr, "%s quotactl failed: %s\n",
-                                uuidp->uuid, strerror(errno));
-                        continue;
-                }
-
-                print_quota((char *)uuidp->uuid, qctl, OST_QUOTA_INFO);
-        }
-
-out:
-        closedir(dir);
-        if (!rc)
-                rc = rc1;
-        return rc;
-}
-
-static int lfs_quota(int argc, char **argv)
-{
-        int c;
-        char *name = NULL, *mnt;
-        struct if_quotactl qctl = { .qc_cmd = LUSTRE_Q_GETQUOTA,
-                                    .qc_type = 0x01 };
-        char *obd_type = (char *)qctl.obd_type;
-        char *obd_uuid = (char *)qctl.obd_uuid.uuid;
-        int rc, rc1 = 0, rc2 = 0, rc3 = 0;
-
-        optind = 0;
-        while ((c = getopt(argc, argv, "ugto:")) != -1) {
-                switch (c) {
-                case 'u':
-                        qctl.qc_type = 0x01;
-                        break;
-                case 'g':
-                        qctl.qc_type = 0x02;
-                        break;
-                case 't':
-                        qctl.qc_cmd = LUSTRE_Q_GETINFO;
-                        break;
-                case 'o':
-                        strncpy(obd_uuid, optarg, sizeof(qctl.obd_uuid));
-                        break;
-                default:
-                        fprintf(stderr, "error: %s: option '-%c' "
-                                        "unrecognized\n", argv[0], c);
-                        return CMD_HELP;
-                }
-        }
-
-        if (qctl.qc_type)
-                qctl.qc_type--;
-
-
-        if (qctl.qc_cmd == LUSTRE_Q_GETQUOTA) {
-                if (optind + 2 != argc) {
-                        fprintf(stderr, "error: missing quota argument(s)\n");
-                        return CMD_HELP;
-                }
-
-                name = argv[optind++];
-                rc = name2id(&qctl.qc_id, name, qctl.qc_type);
-                if (rc) {
-                        fprintf(stderr,"error: can't find id for name %s: %s\n",
-                                name, strerror(errno));
-                        return CMD_HELP;
-                }
-                print_quota_title(name, &qctl);
-        } else if (optind + 1 != argc) {
-                fprintf(stderr, "error: missing quota info argument(s)\n");
-                return CMD_HELP;
-        }
-
-        mnt = argv[optind];
-
-        rc1 = llapi_quotactl(mnt, &qctl);
-        if (rc1 == -1 && errno == ESRCH) {
-                fprintf(stderr, "\n%s quotas are not enabled.\n", 
-                        qctl.qc_type == 0x00 ? "user" : "group");
-                return 0;
-        }
-        if (rc1 && *obd_type)
-                fprintf(stderr, "%s %s ", obd_type, obd_uuid);
-
-        if (!name)
-                rc = id2name(&name, getuid(), qctl.qc_type);
-
-        if (*obd_uuid) {
-                mnt = "";
-                name = obd_uuid;
-        }
-
-        print_quota(mnt, &qctl, GENERAL_QUOTA_INFO);
-
-        if (!*obd_uuid && qctl.qc_cmd != LUSTRE_Q_GETINFO) {
-                rc2 = print_mds_quota(mnt, &qctl);
-                rc3 = print_lov_quota(mnt, &qctl);
-        }
-
-        if (rc1 || rc2 || rc3)
-                printf("Some errors happened when getting quota info. "
-                       "Some devices may be not working or deactivated. "
-                       "The data in \"[]\" is inaccurate.\n");
-        return 0;
-}
-#endif /* HAVE_QUOTA_SUPPORT */
-
-int main(int argc, char **argv)
-{
-        int rc;
-
-        setlinebuf(stdout);
-
-        ptl_initialize(argc, argv);
-        if (obd_initialize(argc, argv) < 0)
-                exit(2);
-        if (dbg_initialize(argc, argv) < 0)
-                exit(3);
-
-        Parser_init("lfs > ", cmdlist);
-
-        if (argc > 1) {
-                rc = Parser_execarg(argc - 1, argv + 1, cmdlist);
-        } else {
-                rc = Parser_commands();
-        }
-
-        obd_finalize(argc, argv);
-        return rc;
-}
diff --git a/lustre/utils/liblustreapi.c b/lustre/utils/liblustreapi.c
deleted file mode 100644
index 40f2f205a40d3c4dd7ef04f55b3cc7ce4e88be23..0000000000000000000000000000000000000000
--- a/lustre/utils/liblustreapi.c
+++ /dev/null
@@ -1,1676 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Robert Read <rread@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/* for O_DIRECTORY */
-#define _GNU_SOURCE
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <stddef.h>
-#include <sys/ioctl.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <dirent.h>
-#include <stdarg.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <sys/syscall.h>
-#include <fnmatch.h>
-#ifdef HAVE_ASM_TYPES_H
-#include <asm/types.h>
-#endif
-#ifdef HAVE_LINUX_UNISTD_H
-#include <linux/unistd.h>
-#else
-#include <unistd.h>
-#endif
-
-#include <liblustre.h>
-#include <lnet/lnetctl.h>
-#include <obd.h>
-#include <lustre_lib.h>
-#include <lustre/liblustreapi.h>
-#include <obd_lov.h>
-
-static unsigned llapi_dir_filetype_table[] = {
-        [DT_UNKNOWN]= 0,
-        [DT_FIFO]= S_IFIFO,
-        [DT_CHR] = S_IFCHR,
-        [DT_DIR] = S_IFDIR,
-        [DT_BLK] = S_IFBLK,
-        [DT_REG] = S_IFREG,
-        [DT_LNK] = S_IFLNK,
-        [DT_SOCK]= S_IFSOCK,
-#if defined(DT_DOOR) && defined(S_IFDOOR)
-        [DT_DOOR]= S_IFDOOR,
-#endif
-};
-
-#if defined(DT_DOOR) && defined(S_IFDOOR)
-static const int DT_MAX = DT_DOOR;
-#else
-static const int DT_MAX = DT_SOCK;
-#endif
-
-static unsigned llapi_filetype_dir_table[] = {
-        [0]= DT_UNKNOWN,
-        [S_IFIFO]= DT_FIFO,
-        [S_IFCHR] = DT_CHR,
-        [S_IFDIR] = DT_DIR,
-        [S_IFBLK] = DT_BLK,
-        [S_IFREG] = DT_REG,
-        [S_IFLNK] = DT_LNK,
-        [S_IFSOCK]= DT_SOCK,
-#if defined(DT_DOOR) && defined(S_IFDOOR)
-        [S_IFDOOR]= DT_DOOR,
-#endif
-};
-
-#if defined(DT_DOOR) && defined(S_IFDOOR)
-static const int S_IFMAX = DT_DOOR;
-#else
-static const int S_IFMAX = DT_SOCK;
-#endif
-
-/* liblustreapi message level */
-static int llapi_msg_level = LLAPI_MSG_MAX;
-
-void llapi_msg_set_level(int level)
-{
-        /* ensure level is in the good range */
-        if (level < LLAPI_MSG_OFF)
-                llapi_msg_level = LLAPI_MSG_OFF;
-        else if (level > LLAPI_MSG_MAX)
-                llapi_msg_level = LLAPI_MSG_MAX;
-        else
-                llapi_msg_level = level;
-}
-
-void llapi_err(int level, char *fmt, ...)
-{
-        va_list args;
-        int tmp_errno = abs(errno);
-
-        if ((level & LLAPI_MSG_MASK) > llapi_msg_level)
-                return;
-
-        va_start(args, fmt);
-        vfprintf(stderr, fmt, args);
-        va_end(args);
-
-        if (level & LLAPI_MSG_NO_ERRNO)
-                fprintf(stderr, "\n");
-        else
-                fprintf(stderr, ": %s (%d)\n", strerror(tmp_errno), tmp_errno);
-}
-
-#define llapi_err_noerrno(level, fmt, a...)                             \
-        llapi_err((level) | LLAPI_MSG_NO_ERRNO, fmt, ## a)
-
-void llapi_printf(int level, char *fmt, ...)
-{
-        va_list args;
-
-        if ((level & LLAPI_MSG_MASK) > llapi_msg_level)
-                return;
-
-        va_start(args, fmt);
-        vfprintf(stdout, fmt, args);
-        va_end(args);
-}
-
-int parse_size(char *optarg, unsigned long long *size,
-               unsigned long long *size_units)
-{
-        char *end;
-
-        *size = strtoul(optarg, &end, 0);
-
-        if (*end != '\0') {
-                if ((*end == 'b') && *(end+1) == '\0' &&
-                    (*size & (~0ULL << (64 - 9))) == 0) {
-                        *size <<= 9;
-                        *size_units = 1 << 9;
-                } else if ((*end == 'k' || *end == 'K') &&
-                           *(end+1) == '\0' && (*size &
-                           (~0ULL << (64 - 10))) == 0) {
-                        *size <<= 10;
-                        *size_units = 1 << 10;
-                } else if ((*end == 'm' || *end == 'M') &&
-                           *(end+1) == '\0' && (*size &
-                           (~0ULL << (64 - 20))) == 0) {
-                        *size <<= 20;
-                        *size_units = 1 << 20;
-                } else if ((*end == 'g' || *end == 'G') &&
-                           *(end+1) == '\0' && (*size &
-                           (~0ULL << (64 - 30))) == 0) {
-                        *size <<= 30;
-                        *size_units = 1 << 30;
-                } else if ((*end == 't' || *end == 'T') &&
-                           *(end+1) == '\0' && (*size &
-                           (~0ULL << (64 - 40))) == 0) {
-                        *size <<= 40;
-                        *size_units = 1ULL << 40;
-                } else if ((*end == 'p' || *end == 'P') &&
-                           *(end+1) == '\0' && (*size &
-                           (~0ULL << (64 - 50))) == 0) {
-                        *size <<= 50;
-                        *size_units = 1ULL << 50;
-                } else if ((*end == 'e' || *end == 'E') &&
-                           *(end+1) == '\0' && (*size &
-                           (~0ULL << (64 - 60))) == 0) {
-                        *size <<= 60;
-                        *size_units = 1ULL << 60;
-                } else {
-                        return -1;
-                }
-        }
-
-        return 0;
-}
-
-int llapi_file_open(const char *name, int flags, int mode,
-                    unsigned long stripe_size, int stripe_offset,
-                    int stripe_count, int stripe_pattern)
-{
-        struct lov_user_md lum = { 0 };
-        int fd, rc = 0;
-        int isdir = 0;
-        int page_size;
-
-        fd = open(name, flags | O_LOV_DELAY_CREATE, mode);
-        if (fd < 0 && errno == EISDIR) {
-                fd = open(name, O_DIRECTORY | O_RDONLY);
-                isdir++;
-        }
-
-        if (fd < 0) {
-                rc = -errno;
-                llapi_err(LLAPI_MSG_ERROR, "unable to open '%s'", name);
-                return rc;
-        }
-
-        /* 64 KB is the largest common page size I'm aware of (on ia64), but
-         * check the local page size just in case. */
-        page_size = LOV_MIN_STRIPE_SIZE;
-        if (getpagesize() > page_size) {
-                page_size = getpagesize();
-                llapi_err_noerrno(LLAPI_MSG_WARN, 
-                                  "warning: your page size (%u) is "
-                                  "larger than expected (%u)", page_size, 
-                                  LOV_MIN_STRIPE_SIZE);
-        }
-        if (stripe_size < 0 || (stripe_size & (LOV_MIN_STRIPE_SIZE - 1))) {
-                errno = rc = -EINVAL;
-                llapi_err(LLAPI_MSG_ERROR, "error: bad stripe_size %lu, "
-                          "must be an even multiple of %d bytes", 
-                          stripe_size, page_size);
-                goto out;
-        }
-        if (stripe_offset < -1 || stripe_offset > MAX_OBD_DEVICES) {
-                errno = rc = -EINVAL;
-                llapi_err(LLAPI_MSG_ERROR, "error: bad stripe offset %d", 
-                          stripe_offset);
-                goto out;
-        }
-        if (stripe_count < -1 || stripe_count > LOV_MAX_STRIPE_COUNT) {
-                errno = rc = -EINVAL;
-                llapi_err(LLAPI_MSG_ERROR, "error: bad stripe count %d", 
-                          stripe_count);
-                goto out;
-        }
-        if (stripe_count > 0 && (__u64)stripe_size * stripe_count > 0xffffffff){
-                errno = rc = -EINVAL;
-                llapi_err(LLAPI_MSG_ERROR, "error: stripe_size %lu * "
-                          "stripe_count %u exceeds 4GB", stripe_size, 
-                          stripe_count);
-                goto out;
-        }
-
-        /*  Initialize IOCTL striping pattern structure */
-        lum.lmm_magic = LOV_USER_MAGIC;
-        lum.lmm_pattern = stripe_pattern;
-        lum.lmm_stripe_size = stripe_size;
-        lum.lmm_stripe_count = stripe_count;
-        lum.lmm_stripe_offset = stripe_offset;
-
-        if (ioctl(fd, LL_IOC_LOV_SETSTRIPE, &lum)) {
-                char *errmsg = "stripe already set";
-                rc = -errno;
-                if (errno != EEXIST && errno != EALREADY)
-                        errmsg = strerror(errno);
-
-                llapi_err_noerrno(LLAPI_MSG_ERROR,
-                                  "error on ioctl "LPX64" for '%s' (%d): %s",
-                                  (__u64)LL_IOC_LOV_SETSTRIPE, name, fd, errmsg);
-        }
-out:
-        if (rc) {
-                close(fd);
-                fd = rc;
-        }
-
-        return fd;
-}
-
-int llapi_file_create(const char *name, unsigned long stripe_size,
-                      int stripe_offset, int stripe_count, int stripe_pattern)
-{
-        int fd;
-
-        fd = llapi_file_open(name, O_CREAT | O_WRONLY, 0644, stripe_size,
-                             stripe_offset, stripe_count, stripe_pattern);
-        if (fd < 0)
-                return fd;
-
-        close(fd);
-        return 0;
-}
-
-typedef int (semantic_func_t)(char *path, DIR *parent, DIR *d,
-                              void *data, struct dirent64 *de);
-
-#define MAX_LOV_UUID_COUNT      max(LOV_MAX_STRIPE_COUNT, 1000)
-#define OBD_NOT_FOUND           (-1)
-
-static int common_param_init(struct find_param *param)
-{
-        param->lumlen = lov_mds_md_size(MAX_LOV_UUID_COUNT);
-        if ((param->lmd = malloc(sizeof(lstat_t) + param->lumlen)) == NULL) {
-                llapi_err(LLAPI_MSG_ERROR, 
-                          "error: allocation of %d bytes for ioctl",
-                          sizeof(lstat_t) + param->lumlen);
-                return -ENOMEM;
-        }
-
-        param->got_uuids = 0;
-        param->obdindexes = NULL;
-        param->obdindex = OBD_NOT_FOUND;
-        return 0;
-}
-
-static void find_param_fini(struct find_param *param)
-{
-        if (param->obdindexes)
-                free(param->obdindexes);
-
-        if (param->lmd)
-                free(param->lmd);
-}
-
-/*
- * If uuidp is NULL, return the number of available obd uuids.
- * If uuidp is non-NULL, then it will return the uuids of the obds. If
- * there are more OSTs then allocated to uuidp, then an error is returned with
- * the ost_count set to number of available obd uuids.
- */
-int llapi_lov_get_uuids(int fd, struct obd_uuid *uuidp, int *ost_count)
-{
-        char lov_name[sizeof(struct obd_uuid)];
-        char buf[1024];
-        FILE *fp;
-        int rc = 0, index = 0;
-
-        /* Get the lov name */
-        rc = ioctl(fd, OBD_IOC_GETNAME, (void *) lov_name);
-        if (rc) {
-                rc = errno;
-                llapi_err(LLAPI_MSG_ERROR, "error: can't get lov name");
-                return rc;
-        }
-
-        /* Now get the ost uuids from /proc */
-        snprintf(buf, sizeof(buf), "/proc/fs/lustre/lov/%s/target_obd",
-                 lov_name);
-        fp = fopen(buf, "r");
-        if (fp == NULL) {
-                rc = errno;
-                llapi_err(LLAPI_MSG_ERROR, "error: opening '%s'", buf);
-                return rc;
-        }
-
-        while (fgets(buf, sizeof(buf), fp) != NULL) {
-                if (uuidp && (index < *ost_count)) {
-                        if (sscanf(buf, "%d: %s", &index, uuidp[index].uuid) <2)
-                                break;
-                }
-                index++;
-        }
-
-        fclose(fp);
-
-        if (uuidp && (index >= *ost_count))
-                return -EOVERFLOW;
-
-        *ost_count = index;
-        return rc;
-}
-
-/* Here, param->obduuid points to a single obduuid, the index of which is
- * returned in param->obdindex */
-static int setup_obd_uuid(DIR *dir, char *dname, struct find_param *param)
-{
-        char uuid[sizeof(struct obd_uuid)];
-        char buf[1024];
-        FILE *fp;
-        int rc = 0, index;
-
-        /* Get the lov name */
-        rc = ioctl(dirfd(dir), OBD_IOC_GETNAME, (void *)uuid);
-        if (rc) {
-                if (errno != ENOTTY) {
-                        rc = errno;
-                        llapi_err(LLAPI_MSG_ERROR, 
-                                  "error: can't get lov name: %s", dname);
-                } else {
-                        rc = 0;
-                }
-                return rc;
-        }
-
-        param->got_uuids = 1;
-
-        /* Now get the ost uuids from /proc */
-        snprintf(buf, sizeof(buf), "/proc/fs/lustre/lov/%s/target_obd",
-                 uuid);
-        fp = fopen(buf, "r");
-        if (fp == NULL) {
-                rc = errno;
-                llapi_err(LLAPI_MSG_ERROR, "error: opening '%s'", buf);
-                return rc;
-        }
-
-        if (!param->obduuid && !param->quiet && !param->obds_printed)
-                llapi_printf(LLAPI_MSG_NORMAL, "OBDS:\n");
-
-        while (fgets(buf, sizeof(buf), fp) != NULL) {
-                if (sscanf(buf, "%d: %s", &index, uuid) < 2)
-                        break;
-
-                if (param->obduuid) {
-                        if (strncmp((char *)param->obduuid->uuid, uuid,
-                                    sizeof(uuid)) == 0) {
-                                param->obdindex = index;
-                                break;
-                        }
-                } else if (!param->quiet && !param->obds_printed) {
-                        /* Print everything */
-                        llapi_printf(LLAPI_MSG_NORMAL, "%s", buf);
-                }
-        }
-        param->obds_printed = 1;
-
-        fclose(fp);
-
-        if (!param->quiet && param->obduuid &&
-            (param->obdindex == OBD_NOT_FOUND)) {
-                llapi_err_noerrno(LLAPI_MSG_ERROR, 
-                                  "error: %s: unknown obduuid: %s",
-                                  __FUNCTION__, param->obduuid->uuid);
-                //rc = EINVAL;
-        }
-
-        return (rc);
-}
-
-/* In this case, param->obduuid will be an array of obduuids and
- * obd index for all these obduuids will be returned in
- * param->obdindexes */
-static int setup_obd_indexes(DIR *dir, struct find_param *param)
-{
-        struct obd_uuid *uuids = NULL;
-        int obdcount = INIT_ALLOC_NUM_OSTS;
-        int ret, obd_valid = 0, obdnum, i;
-
-        uuids = (struct obd_uuid *)malloc(INIT_ALLOC_NUM_OSTS *
-                                          sizeof(struct obd_uuid));
-        if (uuids == NULL)
-                return -ENOMEM;
-
-retry_get_uuids:
-        ret = llapi_lov_get_uuids(dirfd(dir), uuids,
-                                  &obdcount);
-        if (ret) {
-                struct obd_uuid *uuids_temp;
-
-                if (ret == -EOVERFLOW) {
-                        uuids_temp = realloc(uuids, obdcount *
-                                             sizeof(struct obd_uuid));
-                        if (uuids_temp != NULL)
-                                goto retry_get_uuids;
-                        else
-                                ret = -ENOMEM;
-                }
-
-                llapi_err(LLAPI_MSG_ERROR, "get ost uuid failed");
-                return ret;
-        }
-
-        param->obdindexes = malloc(param->num_obds * sizeof(param->obdindex));
-        if (param->obdindexes == NULL)
-                return -ENOMEM;
-
-        for (obdnum = 0; obdnum < param->num_obds; obdnum++) {
-                for (i = 0; i <= obdcount; i++) {
-                        if (strcmp((char *)&param->obduuid[obdnum].uuid,
-                                   (char *)&uuids[i]) == 0) {
-                                param->obdindexes[obdnum] = i;
-                                obd_valid++;
-                                break;
-                        }
-                }
-                if (i == obdcount)
-                        param->obdindexes[obdnum] = OBD_NOT_FOUND;
-        }
-
-        if (obd_valid == 0)
-                param->obdindex = OBD_NOT_FOUND;
-        else
-                param->obdindex = obd_valid;
-
-        param->got_uuids = 1;
-
-        return 0;
-}
-
-void lov_dump_user_lmm_v1(struct lov_user_md_v1 *lum, char *path, int is_dir,
-                          int obdindex, int quiet, int header, int body)
-{
-        int i, obdstripe = 0;
-
-        if (obdindex != OBD_NOT_FOUND) {
-                for (i = 0; !is_dir && i < lum->lmm_stripe_count; i++) {
-                        if (obdindex == lum->lmm_objects[i].l_ost_idx) {
-                                llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                                obdstripe = 1;
-                                break;
-                        }
-                }
-        } else if (!quiet) {
-                llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                obdstripe = 1;
-        }
-
-        /* if it's a directory */
-        if (is_dir) {
-                if (obdstripe == 1) {
-                        if (lum->lmm_object_gr == LOV_OBJECT_GROUP_DEFAULT) {
-                                llapi_printf(LLAPI_MSG_NORMAL, "(Default) ");
-                                lum->lmm_object_gr = LOV_OBJECT_GROUP_CLEAR;
-                        }
-                        llapi_printf(LLAPI_MSG_NORMAL, 
-                                     "stripe_count: %d stripe_size: %u "
-                                     "stripe_offset: %d\n",
-                                     lum->lmm_stripe_count == (__u16)-1 ? -1 :
-                                     lum->lmm_stripe_count,
-                                     lum->lmm_stripe_size,
-                                     lum->lmm_stripe_offset == (__u16)-1 ? -1 :
-                                     lum->lmm_stripe_offset);
-                }
-                return;
-        }
-
-        if (header && (obdstripe == 1)) {
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_magic:          0x%08X\n",
-                             lum->lmm_magic);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_object_gr:      "LPX64"\n",
-                             lum->lmm_object_gr);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_object_id:      "LPX64"\n",
-                             lum->lmm_object_id);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_stripe_count:   %u\n",
-                             (int)lum->lmm_stripe_count);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_stripe_size:    %u\n",
-                             lum->lmm_stripe_size);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_stripe_pattern: %x\n",
-                             lum->lmm_pattern);
-        }
-
-        if (body) {
-                if ((!quiet) && (obdstripe == 1))
-                        llapi_printf(LLAPI_MSG_NORMAL, 
-                                     "\tobdidx\t\t objid\t\tobjid\t\t group\n");
-
-                for (i = 0; i < lum->lmm_stripe_count; i++) {
-                        int idx = lum->lmm_objects[i].l_ost_idx;
-                        long long oid = lum->lmm_objects[i].l_object_id;
-                        long long gr = lum->lmm_objects[i].l_object_gr;
-                        if ((obdindex == OBD_NOT_FOUND) || (obdindex == idx))
-                                llapi_printf(LLAPI_MSG_NORMAL, 
-                                             "\t%6u\t%14llu\t%#13llx\t%14llu%s\n",
-                                             idx, oid, oid, gr,
-                                             obdindex == idx ? " *" : "");
-                }
-                llapi_printf(LLAPI_MSG_NORMAL, "\n");
-        }
-}
-
-void lov_dump_user_lmm_join(struct lov_user_md_v1 *lum, char *path,
-                            int is_dir, int obdindex, int quiet,
-                            int header, int body)
-{
-        struct lov_user_md_join *lumj = (struct lov_user_md_join *)lum;
-        int i, obdstripe = 0;
-
-        if (obdindex != OBD_NOT_FOUND) {
-                for (i = 0; i < lumj->lmm_stripe_count; i++) {
-                        if (obdindex == lumj->lmm_objects[i].l_ost_idx) {
-                                llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                                obdstripe = 1;
-                                break;
-                        }
-                }
-        } else if (!quiet) {
-                llapi_printf(LLAPI_MSG_NORMAL, "%s\n", path);
-                obdstripe = 1;
-        }
-
-        if (header && obdstripe == 1) {
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_magic:          0x%08X\n",  
-                             lumj->lmm_magic);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_object_gr:      "LPX64"\n", 
-                             lumj->lmm_object_gr);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_object_id:      "LPX64"\n", 
-                             lumj->lmm_object_id);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_stripe_count:   %u\n", 
-                             (int)lumj->lmm_stripe_count);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_stripe_size:    %u\n",
-                             lumj->lmm_stripe_size);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_stripe_pattern: %x\n",
-                             lumj->lmm_pattern);
-                llapi_printf(LLAPI_MSG_NORMAL, "lmm_extent_count:   %x\n",
-                             lumj->lmm_extent_count);
-        }
-
-        if (body) {
-                unsigned long long start = -1, end = 0;
-                if (!quiet && obdstripe == 1)
-                        llapi_printf(LLAPI_MSG_NORMAL, 
-                                     "joined\tobdidx\t\t objid\t\tobjid\t\t group"
-                                     "\t\tstart\t\tend\n");
-                for (i = 0; i < lumj->lmm_stripe_count; i++) {
-                        int idx = lumj->lmm_objects[i].l_ost_idx;
-                        long long oid = lumj->lmm_objects[i].l_object_id;
-                        long long gr = lumj->lmm_objects[i].l_object_gr;
-                        if (obdindex == OBD_NOT_FOUND || obdindex == idx)
-                                llapi_printf(LLAPI_MSG_NORMAL, 
-                                             "\t%6u\t%14llu\t%#13llx\t%14llu%s",
-                                             idx, oid, oid, gr,
-                                             obdindex == idx ? " *" : "");
-                        if (start != lumj->lmm_objects[i].l_extent_start ||
-                            end != lumj->lmm_objects[i].l_extent_end) {
-                                start = lumj->lmm_objects[i].l_extent_start;
-                                llapi_printf(LLAPI_MSG_NORMAL, "\t%14llu", start);
-                                end = lumj->lmm_objects[i].l_extent_end;
-                                if (end == (unsigned long long)-1)
-                                        llapi_printf(LLAPI_MSG_NORMAL, "\t\tEOF\n");
-                                else
-                                        llapi_printf(LLAPI_MSG_NORMAL, "\t\t%llu\n",
-                                                  end);
-                        } else {
-                                llapi_printf(LLAPI_MSG_NORMAL, "\t\t\t\t\n");
-                        }
-                }
-                llapi_printf(LLAPI_MSG_NORMAL, "\n");
-        }
-}
-
-void llapi_lov_dump_user_lmm(struct find_param *param,
-                             char *path, int is_dir)
-{
-        switch(*(__u32 *)&param->lmd->lmd_lmm) { /* lum->lmm_magic */
-        case LOV_USER_MAGIC_V1:
-                lov_dump_user_lmm_v1(&param->lmd->lmd_lmm, path, is_dir,
-                                      param->obdindex, param->quiet,
-                                      param->verbose,
-                                      (param->verbose || !param->obduuid));
-                break;
-        case LOV_USER_MAGIC_JOIN:
-                lov_dump_user_lmm_join(&param->lmd->lmd_lmm, path, is_dir,
-                                       param->obdindex, param->quiet,
-                                       param->verbose,
-                                       (param->verbose || !param->obduuid));
-                break;
-        default:
-                llapi_printf(LLAPI_MSG_NORMAL, 
-                             "unknown lmm_magic:  %#x (expecting %#x)\n",
-                       *(__u32 *)&param->lmd->lmd_lmm, LOV_USER_MAGIC_V1);
-                return;
-        }
-}
-
-int llapi_file_get_stripe(const char *path, struct lov_user_md *lum)
-{
-        const char *fname;
-        char *dname;
-        int fd, rc = 0;
-
-        fname = strrchr(path, '/');
-
-        /* It should be a file (or other non-directory) */
-        if (fname == NULL) {
-                dname = (char *)malloc(2);
-                if (dname == NULL)
-                        return ENOMEM;
-                strcpy(dname, ".");
-                fname = (char *)path;
-        } else {
-                dname = (char *)malloc(fname - path + 1);
-                if (dname == NULL)
-                        return ENOMEM;
-                strncpy(dname, path, fname - path);
-                dname[fname - path] = '\0';
-                fname++;
-        }
-
-        if ((fd = open(dname, O_RDONLY)) == -1) {
-                rc = errno;
-                free(dname);
-                return rc;
-        }
-
-        strcpy((char *)lum, fname);
-        if (ioctl(fd, IOC_MDC_GETFILESTRIPE, (void *)lum) == -1)
-                rc = errno;
-
-        if (close(fd) == -1 && rc == 0)
-                rc = errno;
-
-        free(dname);
-
-        return rc;
-}
-
-int llapi_file_lookup(int dirfd, const char *name)
-{
-        struct obd_ioctl_data data = { 0 };
-        char rawbuf[8192];
-        char *buf = rawbuf;
-        int rc;
-
-        if (dirfd < 0 || name == NULL)
-                return -EINVAL;
-
-        data.ioc_version = OBD_IOCTL_VERSION;
-        data.ioc_len = sizeof(data);
-        data.ioc_inlbuf1 = (char *)name;
-        data.ioc_inllen1 = strlen(name) + 1;
-
-        rc = obd_ioctl_pack(&data, &buf, sizeof(rawbuf));
-        if (rc) {
-                llapi_err(LLAPI_MSG_ERROR,
-                          "error: IOC_MDC_LOOKUP pack failed for '%s': rc %d",
-                          name, rc);
-                return rc;
-        }
-
-        return ioctl(dirfd, IOC_MDC_LOOKUP, buf);
-}
-
-int llapi_mds_getfileinfo(char *path, DIR *parent,
-                          struct lov_user_mds_data *lmd)
-{
-        lstat_t *st = &lmd->lmd_st;
-        char *fname = strrchr(path, '/');
-        int ret = 0;
-
-        if (parent == NULL)
-                return -EINVAL;
-
-        fname = (fname == NULL ? path : fname + 1);
-        /* retrieve needed file info */
-        strncpy((char *)lmd, fname, lov_mds_md_size(MAX_LOV_UUID_COUNT));
-        ret = ioctl(dirfd(parent), IOC_MDC_GETFILEINFO, (void *)lmd);
-
-        if (ret) {
-                if (errno == ENOTTY) {
-                        /* ioctl is not supported, it is not a lustre fs.
-                         * Do the regular lstat(2) instead. */
-                        ret = lstat_f(path, st);
-                        if (ret) {
-                                llapi_err(LLAPI_MSG_ERROR, 
-                                          "error: %s: lstat failed for %s",
-                                          __FUNCTION__, path);
-                                return ret;
-                        }
-                } else if (errno == ENOENT) {
-                        llapi_err(LLAPI_MSG_WARN, 
-                                  "warning: %s: %s does not exist", 
-                                  __FUNCTION__, path);
-                        return -ENOENT;
-                } else {
-                        llapi_err(LLAPI_MSG_ERROR, 
-                                  "error: %s: IOC_MDC_GETFILEINFO failed for %s",
-                                  __FUNCTION__, path);
-                        return ret;
-                }
-        }
-
-        return 0;
-}
-
-static DIR *opendir_parent(char *path)
-{
-        DIR *parent;
-        char *fname;
-        char c;
-
-        fname = strrchr(path, '/');
-        if (fname == NULL)
-                return opendir(".");
-
-        c = fname[1];
-        fname[1] = '\0';
-        parent = opendir(path);
-        fname[1] = c;
-        return parent;
-}
-
-static int llapi_semantic_traverse(char *path, int size, DIR *parent,
-                                   semantic_func_t sem_init,
-                                   semantic_func_t sem_fini, void *data,
-                                   struct dirent64 *de)
-{
-        struct dirent64 *dent;
-        int len, ret;
-        DIR *d, *p = NULL;
-
-        ret = 0;
-        len = strlen(path);
-
-        d = opendir(path);
-        if (!d && errno != ENOTDIR) {
-                llapi_err(LLAPI_MSG_ERROR, "%s: Failed to open '%s'",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        } else if (!d && !parent) {
-                /* ENOTDIR. Open the parent dir. */
-                p = opendir_parent(path);
-                if (!p)
-                        GOTO(out, ret = -EINVAL);
-        }
-
-        if (sem_init && (ret = sem_init(path, parent ?: p, d, data, de)))
-                goto err;
-
-        if (!d)
-                GOTO(out, ret = 0);
-
-        while ((dent = readdir64(d)) != NULL) {
-                ((struct find_param *)data)->have_fileinfo = 0;
-
-                if (!strcmp(dent->d_name, ".") || !strcmp(dent->d_name, ".."))
-                        continue;
-
-                path[len] = 0;
-                if ((len + dent->d_reclen + 2) > size) {
-                        llapi_err(LLAPI_MSG_ERROR,
-                                  "error: %s: string buffer is too small",
-                                  __FUNCTION__);
-                        break;
-                }
-                strcat(path, "/");
-                strcat(path, dent->d_name);
-
-                if (dent->d_type == DT_UNKNOWN) {
-                        lstat_t *st = &((struct find_param *)data)->lmd->lmd_st;
-
-                        ret = llapi_mds_getfileinfo(path, d,
-                                             ((struct find_param *)data)->lmd);
-                        if (ret == 0) {
-                                ((struct find_param *)data)->have_fileinfo = 1;
-                                dent->d_type = llapi_filetype_dir_table[st->st_mode &
-                                                                        S_IFMT];
-                        }
-                        if (ret == -ENOENT)
-                                continue;
-                }
-
-                switch (dent->d_type) {
-                case DT_UNKNOWN:
-                        llapi_err(LLAPI_MSG_ERROR, 
-                                  "error: %s: '%s' is UNKNOWN type %d",
-                                  __FUNCTION__, dent->d_name, dent->d_type);
-                        break;
-                case DT_DIR:
-                        ret = llapi_semantic_traverse(path, size, d, sem_init,
-                                                      sem_fini, data, dent);
-                        if (ret < 0)
-                                goto out;
-                        break;
-                default:
-                        ret = 0;
-                        if (sem_init) {
-                                ret = sem_init(path, d, NULL, data, dent);
-                                if (ret < 0)
-                                        goto out;
-                        }
-                        if (sem_fini && ret == 0)
-                                sem_fini(path, d, NULL, data, dent);
-                }
-        }
-
-out:
-        path[len] = 0;
-
-        if (sem_fini)
-                sem_fini(path, parent, d, data, de);
-err:
-        if (d)
-                closedir(d);
-        if (p)
-                closedir(p);
-        return ret;
-}
-
-/* Check if the value matches 1 of the given criteria (e.g. --atime +/-N).
- * @mds indicates if this is MDS timestamps and there are attributes on OSTs.
- *
- * The result is -1 if it does not match, 0 if not yet clear, 1 if matches.
- * The table below gives the answers for the specified parameters (value and
- * sign), 1st column is the answer for the MDS value, the 2nd is for the OST:
- * --------------------------------------
- * 1 | file > limit; sign > 0 | -1 / -1 |
- * 2 | file = limit; sign > 0 |  ? /  1 |
- * 3 | file < limit; sign > 0 |  ? /  1 |
- * 4 | file > limit; sign = 0 | -1 / -1 |
- * 5 | file = limit; sign = 0 |  ? /  1 |  <- (see the Note below)
- * 6 | file < limit; sign = 0 |  ? / -1 |
- * 7 | file > limit; sign < 0 |  1 /  1 |
- * 8 | file = limit; sign < 0 |  ? / -1 |
- * 9 | file < limit; sign < 0 |  ? / -1 |
- * --------------------------------------
- * Note: 5th actually means that the value is within the interval
- * (limit - margin, limit]. */
-static int find_value_cmp(unsigned int file, unsigned int limit, int sign,
-                          unsigned long long margin, int mds)
-{
-        if (sign > 0) {
-                if (file < limit)
-                        return mds ? 0 : 1;
-        }
-
-        if (sign == 0) {
-                if (file <= limit && file + margin > limit)
-                        return mds ? 0 : 1;
-                if (file + margin <= limit)
-                        return mds ? 0 : -1;
-        }
-
-        if (sign < 0) {
-                if (file > limit)
-                        return 1;
-                if (mds)
-                        return 0;
-        }
-
-        return -1;
-}
-
-/* Check if the file time matches all the given criteria (e.g. --atime +/-N).
- * Return -1 or 1 if file timestamp does not or does match the given criteria
- * correspondingly. Return 0 if the MDS time is being checked and there are
- * attributes on OSTs and it is not yet clear if the timespamp matches.
- *
- * If 0 is returned, we need to do another RPC to the OSTs to obtain the
- * updated timestamps. */
-static int find_time_check(lstat_t *st, struct find_param *param, int mds)
-{
-        int ret;
-        int rc = 0;
-
-        /* Check if file is accepted. */
-        if (param->atime) {
-                ret = find_value_cmp(st->st_atime, param->atime,
-                                     param->asign, 24 * 60 * 60, mds);
-                if (ret < 0)
-                        return ret;
-                rc = ret;
-        }
-
-        if (param->mtime) {
-                ret = find_value_cmp(st->st_mtime, param->mtime,
-                                     param->msign, 24 * 60 * 60, mds);
-                if (ret < 0)
-                        return ret;
-
-                /* If the previous check matches, but this one is not yet clear,
-                 * we should return 0 to do an RPC on OSTs. */
-                if (rc == 1)
-                        rc = ret;
-        }
-
-        if (param->ctime) {
-                ret = find_value_cmp(st->st_ctime, param->ctime,
-                                     param->csign, 24 * 60 * 60, mds);
-                if (ret < 0)
-                        return ret;
-
-                /* If the previous check matches, but this one is not yet clear,
-                 * we should return 0 to do an RPC on OSTs. */
-                if (rc == 1)
-                        rc = ret;
-        }
-
-        return rc;
-}
-
-static int cb_find_init(char *path, DIR *parent, DIR *dir,
-                        void *data, struct dirent64 *de)
-{
-        struct find_param *param = (struct find_param *)data;
-        int decision = 1; /* 1 is accepted; -1 is rejected. */
-        lstat_t *st = &param->lmd->lmd_st;
-        int lustre_fs = 1;
-        int checked_type = 0;
-        int ret = 0;
-
-        LASSERT(parent != NULL || dir != NULL);
-
-        param->lmd->lmd_lmm.lmm_stripe_count = 0;
-
-        /* If a regular expression is presented, make the initial decision */
-        if (param->pattern != NULL) {
-                char *fname = strrchr(path, '/');
-                fname = (fname == NULL ? path : fname + 1);
-                ret = fnmatch(param->pattern, fname, 0);
-                if ((ret == FNM_NOMATCH && !param->exclude_pattern) ||
-                    (ret == 0 && param->exclude_pattern))
-                        goto decided;
-        }
-
-        /* See if we can check the file type from the dirent. */
-        if (param->type && de != NULL && de->d_type != DT_UNKNOWN &&
-            de->d_type <= DT_MAX) {
-                checked_type = 1;
-                if (llapi_dir_filetype_table[de->d_type] == param->type) {
-                        if (param->exclude_type)
-                                goto decided;
-                } else {
-                        if (!param->exclude_type)
-                                goto decided;
-                }
-        }
-
-
-        /* If a time or OST should be checked, the decision is not taken yet. */
-        if (param->atime || param->ctime || param->mtime || param->obduuid ||
-            param->size_check)
-                decision = 0;
-
-        ret = 0;
-        /* Request MDS for the stat info. */
-        if (param->have_fileinfo == 0) {
-                if (dir) {
-                        /* retrieve needed file info */
-                        ret = ioctl(dirfd(dir), LL_IOC_MDC_GETINFO,
-                                    (void *)param->lmd);
-                } else {
-                        char *fname = strrchr(path, '/');
-                        fname = (fname == NULL ? path : fname + 1);
-
-                        /* retrieve needed file info */
-                        strncpy((char *)param->lmd, fname, param->lumlen);
-                        ret = ioctl(dirfd(parent), IOC_MDC_GETFILEINFO,
-                                   (void *)param->lmd);
-                }
-        }
-
-        if (ret) {
-                if (errno == ENOTTY) {
-                        /* ioctl is not supported, it is not a lustre fs.
-                         * Do the regular lstat(2) instead. */
-                        lustre_fs = 0;
-                        ret = lstat_f(path, st);
-                        if (ret) {
-                                llapi_err(LLAPI_MSG_ERROR, 
-                                          "error: %s: lstat failed for %s",
-                                          __FUNCTION__, path);
-                                return ret;
-                        }
-                } else if (errno == ENOENT) {
-                        llapi_err(LLAPI_MSG_WARN, 
-                                  "warning: %s: %s does not exist",
-                                  __FUNCTION__, path);
-                        goto decided;
-                } else {
-                        llapi_err(LLAPI_MSG_ERROR, "error: %s: %s failed for %s",
-                                  __FUNCTION__, dir ? "LL_IOC_MDC_GETINFO" :
-                                  "IOC_MDC_GETFILEINFO", path);
-                        return ret;
-                }
-        }
-
-        /* Check the time on mds. */
-        if (!decision) {
-                int for_mds;
-
-                for_mds = lustre_fs ? (S_ISREG(st->st_mode) &&
-                                       param->lmd->lmd_lmm.lmm_stripe_count)
-                                    : 0;
-                decision = find_time_check(st, param, for_mds);
-                if (decision == -1)
-                        goto decided;
-        }
-
-        if (param->type && !checked_type) {
-                if ((st->st_mode & S_IFMT) == param->type) {
-                        if (param->exclude_type)
-                                goto decided;
-                } else {
-                        if (!param->exclude_type)
-                                goto decided;
-                }
-        }
-
-        /* Prepare odb. */
-        if (param->obduuid) {
-                if (lustre_fs && param->got_uuids &&
-                    param->st_dev != st->st_dev) {
-                        /* A lustre/lustre mount point is crossed. */
-                        param->got_uuids = 0;
-                        param->obds_printed = 0;
-                        param->obdindex = OBD_NOT_FOUND;
-                }
-
-                if (lustre_fs && !param->got_uuids) {
-                        ret = setup_obd_indexes(dir ? dir : parent, param);
-                        if (ret)
-                                return ret;
-
-                        param->st_dev = st->st_dev;
-                } else if (!lustre_fs && param->got_uuids) {
-                        /* A lustre/non-lustre mount point is crossed. */
-                        param->got_uuids = 0;
-                        param->obdindex = OBD_NOT_FOUND;
-                }
-        }
-
-        /* If an OBD UUID is specified but no one matches, skip this file. */
-        if (param->obduuid && param->obdindex == OBD_NOT_FOUND)
-                goto decided;
-
-        /* If a OST UUID is given, and some OST matches, check it here. */
-        if (param->obdindex != OBD_NOT_FOUND) {
-                if (!S_ISREG(st->st_mode))
-                        goto decided;
-
-                /* Only those files should be accepted, which have a
-                 * stripe on the specified OST. */
-                if (!param->lmd->lmd_lmm.lmm_stripe_count) {
-                        goto decided;
-                } else {
-                        int i, j;
-                        for (i = 0;
-                             i < param->lmd->lmd_lmm.lmm_stripe_count; i++) {
-                                for (j = 0; j < param->num_obds; j++) {
-                                        if (param->obdindexes[j] ==
-                                            param->lmd->lmd_lmm.lmm_objects[i].l_ost_idx)
-                                                goto obd_matches;
-                                }
-                        }
-
-                        if (i == param->lmd->lmd_lmm.lmm_stripe_count)
-                                goto decided;
-                }
-        }
-
-obd_matches:
-
-        /* If file still fits the request, ask osd for updated info.
-           The regulat stat is almost of the same speed as some new
-           'glimpse-size-ioctl'. */
-        if (!decision && S_ISREG(st->st_mode) &&
-            (param->lmd->lmd_lmm.lmm_stripe_count || param->size_check)) {
-                if (dir) {
-                        ret = ioctl(dirfd(dir), IOC_LOV_GETINFO,
-                                    (void *)param->lmd);
-                } else if (parent) {
-                        ret = ioctl(dirfd(parent), IOC_LOV_GETINFO,
-                                    (void *)param->lmd);
-                }
-
-                if (ret) {
-                        if (errno == ENOENT) {
-                                llapi_err(LLAPI_MSG_ERROR, 
-                                          "warning: %s: %s does not exist",
-                                          __FUNCTION__, path);
-                                goto decided;
-                        } else {
-                                llapi_err(LLAPI_MSG_ERROR, 
-                                          "%s: IOC_LOV_GETINFO on %s failed",
-                                          __FUNCTION__, path);
-                                return ret;
-                        }
-                }
-
-                /* Check the time on osc. */
-                decision = find_time_check(st, param, 0);
-                if (decision == -1)
-                        goto decided;
-        }
-
-        if (param->size_check)
-                decision = find_value_cmp(st->st_size, param->size,
-                                          param->size_sign, param->size_units,
-                                          0);
-
-        if (decision != -1) {
-                llapi_printf(LLAPI_MSG_NORMAL, "%s", path);
-                if (param->zeroend)
-                        llapi_printf(LLAPI_MSG_NORMAL, "%c", '\0');
-                else
-                        llapi_printf(LLAPI_MSG_NORMAL, "\n");
-        }
-
-decided:
-        /* Do not get down anymore? */
-        if (param->depth == param->maxdepth)
-                return 1;
-
-        param->depth++;
-        return 0;
-}
-
-static int cb_common_fini(char *path, DIR *parent, DIR *d, void *data,
-                          struct dirent64 *de)
-{
-        struct find_param *param = (struct find_param *)data;
-        param->depth--;
-        return 0;
-}
-
-int llapi_find(char *path, struct find_param *param)
-{
-        char *buf;
-        int ret, len = strlen(path);
-
-        if (len > PATH_MAX) {
-                llapi_err(LLAPI_MSG_ERROR, "%s: Path name '%s' is too long",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        }
-
-        buf = (char *)malloc(PATH_MAX + 1);
-        if (!buf)
-                return -ENOMEM;
-
-        ret = common_param_init(param);
-        if (ret) {
-                free(buf);
-                return ret;
-        }
-
-        param->depth = 0;
-
-        strncpy(buf, path, PATH_MAX + 1);
-        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_find_init,
-                                      cb_common_fini, param, NULL);
-
-        find_param_fini(param);
-        free(buf);
-        return ret < 0 ? ret : 0;
-}
-
-static int cb_getstripe(char *path, DIR *parent, DIR *d, void *data,
-                        struct dirent64 *de)
-{
-        struct find_param *param = (struct find_param *)data;
-        int ret = 0;
-
-        LASSERT(parent != NULL || d != NULL);
-
-        /* Prepare odb. */
-        if (!param->got_uuids) {
-                ret = setup_obd_uuid(d ? d : parent, path, param);
-                if (ret)
-                        return ret;
-        }
-
-        if (d) {
-                ret = ioctl(dirfd(d), LL_IOC_LOV_GETSTRIPE,
-                            (void *)&param->lmd->lmd_lmm);
-        } else if (parent) {
-                char *fname = strrchr(path, '/');
-                fname = (fname == NULL ? path : fname + 1);
-
-                strncpy((char *)&param->lmd->lmd_lmm, fname, param->lumlen);
-                ret = ioctl(dirfd(parent), IOC_MDC_GETFILESTRIPE,
-                            (void *)&param->lmd->lmd_lmm);
-        }
-
-        if (ret) {
-                if (errno == ENODATA) {
-                        if (!param->obduuid && !param->quiet)
-                                llapi_printf(LLAPI_MSG_NORMAL, 
-                                             "%s has no stripe info\n", path);
-                        goto out;
-                } else if (errno == ENOTTY) {
-                        llapi_err(LLAPI_MSG_ERROR, 
-                                  "%s: '%s' not on a Lustre fs?",
-                                  __FUNCTION__, path);
-                } else if (errno == ENOENT) {
-                        llapi_err(LLAPI_MSG_WARN, 
-                                  "warning: %s: %s does not exist",
-                                  __FUNCTION__, path);
-                        goto out;
-                } else {
-                        llapi_err(LLAPI_MSG_ERROR, 
-                                  "error: %s: %s failed for %s",
-                                   __FUNCTION__, d ? "LL_IOC_LOV_GETSTRIPE" :
-                                  "IOC_MDC_GETFILESTRIPE", path);
-                }
-
-                return ret;
-        }
-
-        llapi_lov_dump_user_lmm(param, path, d ? 1 : 0);
-out:
-        /* Do not get down anymore? */
-        if (param->depth == param->maxdepth)
-                return 1;
-
-        param->depth++;
-        return 0;
-}
-
-int llapi_getstripe(char *path, struct find_param *param)
-{
-        char *buf;
-        int ret = 0, len = strlen(path);
-
-        if (len > PATH_MAX) {
-                llapi_err(LLAPI_MSG_ERROR, 
-                          "%s: Path name '%s' is too long",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        }
-
-        buf = (char *)malloc(PATH_MAX + 1);
-        if (!buf)
-                return -ENOMEM;
-
-        ret = common_param_init(param);
-        if (ret) {
-                free(buf);
-                return ret;
-        }
-
-        param->depth = 0;
-
-        strncpy(buf, path, PATH_MAX + 1);
-        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_getstripe,
-                                      cb_common_fini, param, NULL);
-        find_param_fini(param);
-        free(buf);
-        return ret < 0 ? ret : 0;
-}
-
-int llapi_obd_statfs(char *path, __u32 type, __u32 index,
-                     struct obd_statfs *stat_buf,
-                     struct obd_uuid *uuid_buf)
-{
-        int fd;
-        char raw[OBD_MAX_IOCTL_BUFFER] = {'\0'};
-        char *rawbuf = raw;
-        struct obd_ioctl_data data = { 0 };
-        int rc = 0;
-
-        data.ioc_inlbuf1 = (char *)&type;
-        data.ioc_inllen1 = sizeof(__u32);
-        data.ioc_inlbuf2 = (char *)&index;
-        data.ioc_inllen2 = sizeof(__u32);
-        data.ioc_pbuf1 = (char *)stat_buf;
-        data.ioc_plen1 = sizeof(struct obd_statfs);
-        data.ioc_pbuf2 = (char *)uuid_buf;
-        data.ioc_plen2 = sizeof(struct obd_uuid);
-
-        if ((rc = obd_ioctl_pack(&data, &rawbuf, sizeof(raw))) != 0) {
-                llapi_err(LLAPI_MSG_ERROR, 
-                          "llapi_obd_statfs: error packing ioctl data");
-                return rc;
-        }
-
-        fd = open(path, O_RDONLY);
-        if (errno == EISDIR)
-                fd = open(path, O_DIRECTORY | O_RDONLY);
-
-        if (fd < 0) {
-                rc = errno ? -errno : -EBADF;
-                llapi_err(LLAPI_MSG_ERROR, "error: %s: opening '%s'", 
-                          __FUNCTION__, path);
-                return rc;
-        }
-        rc = ioctl(fd, IOC_OBD_STATFS, (void *)rawbuf);
-        if (rc)
-                rc = errno ? -errno : -EINVAL;
-
-        close(fd);
-        return rc;
-}
-
-#define MAX_STRING_SIZE 128
-#define DEVICES_LIST "/proc/fs/lustre/devices"
-
-int llapi_ping(char *obd_type, char *obd_name)
-{
-        char path[MAX_STRING_SIZE];
-        char buf[1];
-        int rc, fd;
-
-        snprintf(path, MAX_STRING_SIZE, "/proc/fs/lustre/%s/%s/ping",
-                 obd_type, obd_name);
-
-        fd = open(path, O_WRONLY);
-        if (fd < 0) {
-                rc = errno;
-                llapi_err(LLAPI_MSG_ERROR, "error opening %s", path);
-                return rc;
-        }
-
-        rc = write(fd, buf, 1);
-        close(fd);
-
-        if (rc == 1)
-                return 0;
-        return rc;
-}
-
-int llapi_target_iterate(int type_num, char **obd_type, void *args, llapi_cb_t cb)
-{
-        char buf[MAX_STRING_SIZE];
-        FILE *fp = fopen(DEVICES_LIST, "r");
-        int i, rc = 0;
-
-        if (fp == NULL) {
-                rc = errno;
-                llapi_err(LLAPI_MSG_ERROR, "error: opening "DEVICES_LIST);
-                return rc;
-        }
-
-        while (fgets(buf, sizeof(buf), fp) != NULL) {
-                char *obd_type_name = NULL;
-                char *obd_name = NULL;
-                char *obd_uuid = NULL;
-                char rawbuf[OBD_MAX_IOCTL_BUFFER];
-                char *bufl = rawbuf;
-                char *bufp = buf;
-                struct obd_ioctl_data datal = { 0, };
-                struct obd_statfs osfs_buffer;
-
-                while(bufp[0] == ' ')
-                        ++bufp;
-
-                for(i = 0; i < 3; i++) {
-                        obd_type_name = strsep(&bufp, " ");
-                }
-                obd_name = strsep(&bufp, " ");
-                obd_uuid = strsep(&bufp, " ");
-
-                memset(&osfs_buffer, 0, sizeof (osfs_buffer));
-
-                memset(bufl, 0, sizeof(rawbuf));
-                datal.ioc_pbuf1 = (char *)&osfs_buffer;
-                datal.ioc_plen1 = sizeof(osfs_buffer);
-
-                for (i = 0; i < type_num; i++) {
-                        if (strcmp(obd_type_name, obd_type[i]) != 0)
-                                continue;
-
-                        cb(obd_type_name, obd_name, obd_uuid, args);
-                }
-        }
-        fclose(fp);
-        return rc;
-}
-
-static void do_target_check(char *obd_type_name, char *obd_name,
-                            char *obd_uuid, void *args)
-{
-        int rc;
-
-        rc = llapi_ping(obd_type_name, obd_name);
-        if (rc) {
-                llapi_err(LLAPI_MSG_ERROR, "error: check '%s'", obd_name);
-        } else {
-                llapi_printf(LLAPI_MSG_NORMAL, "%s active.\n", obd_name);
-        }
-}
-
-int llapi_target_check(int type_num, char **obd_type, char *dir)
-{
-        return llapi_target_iterate(type_num, obd_type, NULL, do_target_check);
-}
-
-#undef MAX_STRING_SIZE
-
-int llapi_catinfo(char *dir, char *keyword, char *node_name)
-{
-        char raw[OBD_MAX_IOCTL_BUFFER];
-        char out[LLOG_CHUNK_SIZE];
-        char *buf = raw;
-        struct obd_ioctl_data data = { 0 };
-        char key[30];
-        DIR *root;
-        int rc;
-
-        sprintf(key, "%s", keyword);
-        memset(raw, 0, sizeof(raw));
-        memset(out, 0, sizeof(out));
-        data.ioc_inlbuf1 = key;
-        data.ioc_inllen1 = strlen(key) + 1;
-        if (node_name) {
-                data.ioc_inlbuf2 = node_name;
-                data.ioc_inllen2 = strlen(node_name) + 1;
-        }
-        data.ioc_pbuf1 = out;
-        data.ioc_plen1 = sizeof(out);
-        rc = obd_ioctl_pack(&data, &buf, sizeof(raw));
-        if (rc)
-                return rc;
-
-        root = opendir(dir);
-        if (root == NULL) {
-                rc = errno;
-                llapi_err(LLAPI_MSG_ERROR, "open %s failed", dir);
-                return rc;
-        }
-
-        rc = ioctl(dirfd(root), OBD_IOC_LLOG_CATINFO, buf);
-        if (rc)
-                llapi_err(LLAPI_MSG_ERROR, "ioctl OBD_IOC_CATINFO failed");
-        else
-                llapi_printf(LLAPI_MSG_NORMAL, "%s", data.ioc_pbuf1);
-
-        closedir(root);
-        return rc;
-}
-
-/* Is this a lustre fs? */
-int llapi_is_lustre_mnttype(const char *type)
-{
-        return (strcmp(type, "lustre") == 0 || strcmp(type,"lustre_lite") == 0);
-}
-
-/* Is this a lustre client fs? */
-int llapi_is_lustre_mnt(struct mntent *mnt)
-{
-        return (llapi_is_lustre_mnttype(mnt->mnt_type) &&
-                strstr(mnt->mnt_fsname, ":/") != NULL);
-}
-
-int llapi_quotacheck(char *mnt, int check_type)
-{
-        DIR *root;
-        int rc;
-
-        root = opendir(mnt);
-        if (!root) {
-                llapi_err(LLAPI_MSG_ERROR, "open %s failed", mnt);
-                return -1;
-        }
-
-        rc = ioctl(dirfd(root), LL_IOC_QUOTACHECK, check_type);
-
-        closedir(root);
-        return rc;
-}
-
-int llapi_poll_quotacheck(char *mnt, struct if_quotacheck *qchk)
-{
-        DIR *root;
-        int poll_intvl = 2;
-        int rc;
-
-        root = opendir(mnt);
-        if (!root) {
-                llapi_err(LLAPI_MSG_ERROR, "open %s failed", mnt);
-                return -1;
-        }
-
-        while (1) {
-                rc = ioctl(dirfd(root), LL_IOC_POLL_QUOTACHECK, qchk);
-                if (!rc)
-                        break;
-                sleep(poll_intvl);
-                if (poll_intvl < 30)
-                        poll_intvl *= 2;
-        }
-
-        closedir(root);
-        return rc;
-}
-
-int llapi_quotactl(char *mnt, struct if_quotactl *qctl)
-{
-        DIR *root;
-        int rc;
-
-        root = opendir(mnt);
-        if (!root) {
-                llapi_err(LLAPI_MSG_ERROR, "open %s failed", mnt);
-                return -1;
-        }
-
-        rc = ioctl(dirfd(root), LL_IOC_QUOTACTL, qctl);
-
-        closedir(root);
-        return rc;
-}
-
-static int cb_quotachown(char *path, DIR *parent, DIR *d, void *data,
-                         struct dirent64 *de)
-{
-        struct find_param *param = (struct find_param *)data;
-        lstat_t *st;
-        int rc;
-
-        LASSERT(parent != NULL || d != NULL);
-
-        if (d) {
-                rc = ioctl(dirfd(d), LL_IOC_MDC_GETINFO,
-                           (void *)param->lmd);
-        } else if (parent) {
-                char *fname = strrchr(path, '/');
-                fname = (fname == NULL ? path : fname + 1);
-
-                strncpy((char *)param->lmd, fname, param->lumlen);
-                rc = ioctl(dirfd(parent), IOC_MDC_GETFILEINFO,
-                           (void *)param->lmd);
-        } else {
-                return 0;
-        }
-
-        if (rc) {
-                if (errno == ENODATA) {
-                        if (!param->obduuid && !param->quiet)
-                                llapi_err(LLAPI_MSG_ERROR, 
-                                          "%s has no stripe info", path);
-                        rc = 0;
-                } else if (errno == ENOENT) {
-                        llapi_err(LLAPI_MSG_ERROR, 
-                                  "warning: %s: %s does not exist",
-                                  __FUNCTION__, path);
-                        rc = 0;
-                } else if (errno != EISDIR) {
-                        rc = errno;
-                        llapi_err(LLAPI_MSG_ERROR, "%s ioctl failed for %s.",
-                                  d ? "LL_IOC_MDC_GETINFO" :
-                                  "IOC_MDC_GETFILEINFO", path);
-                }
-                return rc;
-        }
-
-        st = &param->lmd->lmd_st;
-
-        /* libc chown() will do extra check, and if the real owner is
-         * the same as the ones to set, it won't fall into kernel, so
-         * invoke syscall directly. */
-        rc = syscall(SYS_chown, path, -1, -1);
-        if (rc)
-                llapi_err(LLAPI_MSG_ERROR, "error: chown %s", path);
-
-        rc = chmod(path, st->st_mode);
-        if (rc)
-                llapi_err(LLAPI_MSG_ERROR, "error: chmod %s (%hu)", 
-                          path, st->st_mode);
-
-        return rc;
-}
-
-int llapi_quotachown(char *path, int flag)
-{
-        struct find_param param;
-        char *buf;
-        int ret = 0, len = strlen(path);
-
-        if (len > PATH_MAX) {
-                llapi_err(LLAPI_MSG_ERROR, "%s: Path name '%s' is too long",
-                          __FUNCTION__, path);
-                return -EINVAL;
-        }
-
-        buf = (char *)malloc(PATH_MAX + 1);
-        if (!buf)
-                return -ENOMEM;
-
-        memset(&param, 0, sizeof(param));
-        param.recursive = 1;
-        param.verbose = 0;
-        param.quiet = 1;
-
-        ret = common_param_init(&param);
-        if (ret)
-                goto out;
-
-        strncpy(buf, path, PATH_MAX + 1);
-        ret = llapi_semantic_traverse(buf, PATH_MAX + 1, NULL, cb_quotachown,
-                                      NULL, &param, NULL);
-out:
-        find_param_fini(&param);
-        free(buf);
-        return ret;
-}
diff --git a/lustre/utils/llanalyze b/lustre/utils/llanalyze
deleted file mode 100644
index c464ff05547fb2f0dcdbb8ba6a9df403257e054c..0000000000000000000000000000000000000000
--- a/lustre/utils/llanalyze
+++ /dev/null
@@ -1,452 +0,0 @@
-#!/usr/bin/perl
-
-use Getopt::Long;
-use Term::ANSIColor;
-
-GetOptions("pid=i" => \$pid, 
-           "trace!" => \$trace, 
-           "silent!" => \$silent, 
-           "rpctrace!" => \$rpctrace, 
-           "nodlm!" => \$nodlm,
-           "dlm_ns=s" => \$dlm_ns,
-           "noclass!" => \$noclass,
-           "nonet!" => \$nonet,
-           "extract_start=s" => \$extract_start,
-           "extract_end=s" => \$extract_end);
-
-
-
-$subsys->{UNDEFINED} = 1 << 0;
-$subsys->{MDC} = 1 << 1;
-$subsys->{MDS} = 1 << 2;
-$subsys->{OSC} = 1 << 3;
-$subsys->{OST} = 1 << 4;
-$subsys->{CLASS} = 1 << 5;
-$subsys->{LOG} = 1 << 6;
-$subsys->{LLITE} = 1 << 7;
-$subsys->{RPC} = 1 << 8;
-$subsys->{MGMT} = 1 << 9;
-$subsys->{PORTALS} = 1 << 10;
-$subsys->{SOCKNAL} = 1 << 11;
-$subsys->{QSWNAL} = 1 << 12;
-$subsys->{PINGER} = 1 << 13;
-$subsys->{FILTER} = 1 << 14;
-$subsys->{PTLBD} = 1 << 15;
-$subsys->{ECHO} = 1 << 16;
-$subsys->{LDLM} = 1 << 17;
-$subsys->{LOV} = 1 << 18;
-$subsys->{GMNAL} = 1 << 19;
-$subsys->{PTLROUTER} = 1 << 20;
-$subsys->{COBD} = 1 << 21;
-$subsys->{OPENIBNAL} = 1 << 22;
-
-
-$masks->{TRACE} = 1 << 0; # /* ENTRY/EXIT markers */
-$masks->{INODE} = 1 << 1; #
-$masks->{SUPER} = 1 << 2; #
-$masks->{EXT2} = 1 << 3; # /* anything from ext2_debug */
-$masks->{MALLOC} = 1 << 4; # /* print malloc, free information */
-$masks->{CACHE} = 1 << 5; # /* cache-related items */
-$masks->{INFO} = 1 << 6; # /* general information */
-$masks->{IOCTL} = 1 << 7; # /* ioctl related information */
-$masks->{BLOCKS} = 1 << 8; # /* ext2 block allocation */
-$masks->{NET} = 1 << 9; # /* network communications */
-$masks->{WARNING} = 1 << 10; #
-$masks->{BUFFS} = 1 << 11; #
-$masks->{OTHER} = 1 << 12; #
-$masks->{DENTRY} = 1 << 13; #
-$masks->{PORTALS} = 1 << 14; # /* ENTRY/EXIT markers */
-$masks->{PAGE} = 1 << 15; # /* bulk page handling */
-$masks->{DLMTRACE} = 1 << 16; #
-$masks->{ERROR} = 1 << 17; # /* CERROR} = ...) == CDEBUG} = D_ERROR, ...) */
-$masks->{EMERG} = 1 << 18; # /* CEMERG} = ...) == CDEBUG} = D_EMERG, ...) */
-$masks->{HA} = 1 << 19; # /* recovery and failover */
-$masks->{RPCTRACE} = 1 << 19; # /* recovery and failover */
-
-sub extractpid
-{
-    $line = shift;
-#    print "$_\n";
-    if ($line =~ /(\d+)\:(\d+)\:(\d+)\:(\d+\.\d+)\:(\d+)\:(\d+)\:.*/) {
-	return $6;
-    }
-}
-
-sub extracthostpid
-{
-    $line = shift;
-#    print "$_\n";
-    if ($line =~ /(\d+)\:(\d+)\:(\d+)\:(\d+\.\d+)\:(\d+)\:(\d+)\:(\d+)\:.*/) {
-	return $7;
-    }
-}
-
-sub entering_rpc
-{
-	$_ = shift;
-	$entering_rpc  = /Handling RPC/;
-	if($entering_rpc) {
-		$oldpid=$pid;
-		$pid = extractpid($_);
-		$leaving_rpc = 0;
-	}
-}
-
-sub leaving_rpc
-{
-	$_ = shift;
-	$leaving_rpc  = /Handled RPC/;
-	if($leaving_rpc) {
-		$pid = $oldpid; 
-		$entering_rpc = 0;
-	}
-}
-
-sub entering
-{
-    $_ = shift;
-    $entering = /Process entered/;
-}
-
-sub leaving
-{
-    $_ = shift;
-    $entering = /Process leaving/;
-}
-
-sub getsubsys
-{
-    my ($subsys, $mask) = split ":";
-    return hex($subsys);
-}
-
-sub getmask
-{
-    my ($subsys, $mask) = split ":";
-    return hex($mask);
-}
-
-sub setcolor
-{
-    my $linemask = shift;
-    my $line = shift;
-    if ($linemask == $masks->{TRACE}) {
-        if(leaving($line)){
-           print color("yellow on_black");
-        } else {
-           print color("green on_black");
-        }
-    }
-    if ($linemask == $masks->{DLMTRACE}) {
-        print color("magenta on_black");
-    }
-    if ($linemask == $masks->{DLM}) {
-        print color("magenta on_black");
-    }
-    if ($linemask == $masks->{DENTRY}) {
-        print color("red on_black");
-    }
-}
-
-sub study_lock
-{
-    $_ = shift;
-    my $rc;
-
-    $rc = /completion callback handler START ns: (.*) lock: (.*) lrc: (.*) mode/;
-    if ($rc) {
-        $completion_callbacks{$1}->{$2} = $3;
-#         print color("white");
-#         print "---CP CB START: $1 $2 $3\n";
-#         print color("reset");
-    }
-    $rc = /callback handler finished.* ns: (.*) lock: (.*) lrc: (.*) mode/;
-    if ($rc) {
-#         print color("white");
-#         print "---CP CB END: $1 $2 $3 deleting $completion_callbacks{$1}->{$2}\n";
-#         print color("reset");
-        delete $completion_callbacks{$1}->{$2};
-    }
-
-    if ($rc) {
-        $rc = /client blocking AST callback handler START ns: (.*) lock: (.*) lrc: (.*) mode/;
-        $blocking_callbacks{$1}->{$2} = $3;
-#         print color("white");
-#         print "---BL CB START: $1 $2\n";
-#         print color("reset");
-    }
-    $rc = /client blocking callback handler END ns: (.*) lock: (.*) lrc: (.*) mode/;
-    if ($rc) {
-#         print color("white");
-#         print "---BL CB END: $1 $2 $3 deleting $blocking_callbacks{$1}->{$2}\n";
-#         print color("reset");
-        delete $blocking_callbacks{$1}->{$2};
-    }
-
-    $rc = /ldlm_lock_addref.*ns: (.*) lock: (.*) lrc: (.*) mode/;
-#     print color("white");
-#     print "------>addref ns: $1 lock: $2 lrc: $3\n" if ($rc);
-#     print color("reset");
-    $locks{$1}->{$2} = {$3} if ($rc);
-    $rc = /ldlm_lock_decref.*ns: (.*) lock: (.*) lrc: (.*) mode/;
-#     print color("white");
-#     print "------>decref ns: $1 lock: $2 lrc: $3\n" if ($rc);
-#     print color("reset");
-    $locks{$1}->{$2} = {$3} if ($rc);
-}
-
-sub hanging_locks 
-{
-    my $found; 
-    my $ns;
-
-    foreach (keys %completion_callbacks) {
-        $ns = $_;
-        $found = 0;
-        foreach (keys %{$completion_callbacks{$ns}}) {
-            if (!$found) {
-                print "Unfinished completions in ns $ns: \n";
-                $found =1;
-            }
-            print "  lock: $_ lrc: $completion_callbacks{$ns}->{$_}\n";
-        }
-    }
-    foreach (keys %blocking_callbacks) {
-        $ns = $_;
-        $found = 0;
-        foreach (keys %{$blocking_callbacks{$ns}}) {
-            if (!$found) {
-                print "Unfinished blocking in ns $ns: \n";
-                $found =1;
-            }
-            printf("  lock: $_ lrc: %s\n", $blocking_callbacks{$ns}->{$_});
-        }
-    }
-
-}
-
-sub study_intent 
-{
-    $_ = shift;
-    my $rc;
-
-    $rc = /D_IT UP dentry (.*) fsdata/;
-    delete $it{$1} if ($rc);
-    $rc = /D_IT DOWN dentry (.*) fsdata/;
-    $it{$1} = "yes"  if ($rc);
-}
-
-sub unmatched_intents { 
-    my $found;
-    foreach (keys %it) {
-        if (!$found) {
-            print "Unmatched intents: \n";
-            $found =1;
-        }
-        print "  $_\n";
-    }
-}
-
-sub usage
-{
-   print "Usage : llanalyze LOGFILE\n";
-   exit;
-}
-
-if ($ARGV[0]) {
-    if(!open(LOG, "<$ARGV[0]")){
-      print "Cannot open $ARGV[0]\n";
-      exit;
-    }
-} else {
-    usage();
-}
-$width = 0;
-if ($ARGV[1]) {
-   $width = $ARGV[1];
-}
-
-print "nodlm $nodlm, nonet $nonet, trace $trace\n";
-print "pid: $pid, dlm_ns: $dlm_ns\n";
-print "extract_start: $extract_start\n";
-print "extract_end:   $extract_end\n";
-while (<LOG>) {
-    if ($extract_start && $extract_start ne "LLANAYZE_FOUND") {
-        next if (index($_, $extract_start, 0) == -1);
-        $extract_start = "LLANAYZE_FOUND";
-    }
-
-    if ($extract_end) {
-	next if ($extract_end eq "LLANAYZE_FOUND");
-        if (index($_, $extract_end, 0) != -1) {
-             $extract_end = "LLANAYZE_FOUND";
-        }
-    }
-
-    $linepid = extractpid($_);
-    $linehpid = extracthostpid($_);
-    $linemask = getmask($_);
-    $linesubsys = getsubsys($_);
-
-#    printf "---> mask %x subsys %x\n", $linemask, $linesubsys;
-
-    if (leaving($_)) {
-        chop $prefix->{$linepid};
-        chop $prefix->{$linepid};
-    }
-
-    if ($linemask == $masks->{DENTRY}) {
-        study_intent($_);
-    }
-    if ($linemask == $masks->{DLMTRACE}) {
-        study_lock($_);
-    }
-
-    if ( !$pid || $linepid == $pid || $linehpid == $pid) {
-        next if (!$entering_rpc && $rpctrace && $linemask != $masks->{RPCTRACE});
-        next if ($trace && $linemask != $masks->{TRACE});
-        next if ($nodlm && 
-                 (  $linesubsys == $subsys->{LDLM}));
-        next if ($dlm_ns &&
-                 (  $linesubsys != $subsys->{LDLM}));
-        next if (($found_dlm_ns = index( $_, $dlm_ns, 0)) == -1);
-        next if ($noclass && 
-                 (  $linesubsys == $subsys->{CLASS}));
-        next if ($nonet && 
-                 (  $linesubsys == $subsys->{RPC} ||
-                    $linesubsys == $subsys->{NET} ||
-                    $linesubsys == $subsys->{PORTALS} ||
-                    $linesubsys == $subsys->{SOCKNAL} ||
-                    $linesubsys == $subsys->{QSWNAL} ||
-                    $linesubsys == $subsys->{OPENIBNAL} ||
-                    $linesubsys == $subsys->{GMNAL}));
-	if(!$entering_rpc) {entering_rpc($_);}
-	if(!$leaving_rpc) {leaving_rpc($_);}
-
-#        printf "sub/mask: %s - %s\n", getsubsys($_), getmask($_);
-        if (!$silent) {
-            setcolor($linemask, $_);
-            my $string = $prefix->{$linepid}.$_;
-            if($width){ 
-               $string = substr($string, 0, $width)."\n";
-            }
-            printf("%s", $string);
-            print color("reset");
-        }
-            #        last if $count++ > 100;
-    }
-    if (entering($_)) {
-        $prefix->{$linepid} .= '  ';
-    } 
-}
-
-
-unmatched_intents();
-hanging_locks();
-# printf "argv %s pid %d\n", $ARGV[0], extractpid($ARGV[0]);
-
-__END__
-
-=head1 NAME
-
-llanalyze - Analyze distributed Lusture debug logs.
-
-=head1 SYNOPSIS
-
-=over 4
-
-=item B<llanalyze> [OPTIONS]... LOG_FILE
-
-=back
-
-=head1 DESCRIPTION
-
-=over
-
-=item
-
-B<llanalyze> formats the distributed lustre debug logs. It is also used for selective display of logs based on component, identifiers and string match.
-
-=over
-
-=head1 OPTIONS
-
-=over 4
-
-=item B<-pid> PID_NUMBER
-
-Display all debug messages with the process identifier specified.
-
-
-=item B<-trace>
-
-
-Display all debug messages which are entry, exit markers.
-
-
-=item B<-silent>
-
-
-Display only those debug messages which are to indicate hanging locks and unmatched intents.
-
-
-=item B<-rpctrace>
-
-
-Displays only those debug messages which are related with subsystem RPC.
-
-
-=item B<-nodlm>
-
-
-Displays all the debug messages except the ones related with subsystem LDLM.
-
-
-=item B<-dlm_ns> STRING
-
-
-Displays all the LDLM related debug messages with the string match.
-
-
-=item B<-noclass>
-
-
-Displays all the debug messages except the ones which are related with subsystem class.
-
-
-=item B<-nonet>
-
-Displays all the debug messages except those related to sub-system NET.
-
-
-=item B<-extract_start> STRING
-
-Displays all the debug messages from the start of the log file till the occurence of the specified string in the debug messages.
-
-
-=item B<-extract_end> STRING
-
-Displays all the debug messages from the occurence of the specified string till the end of the log file.
-
-
-=back
-
-=head1 REPORTING BUGS
-
-Please report all bugs to Cluster FileSystems, support@clusterfs.com
-
-
-=head1 AVAILABILITY
-
-llanalyze is part of the Lustre(7) filesystem package and is available from CFS http://clusterfs.com
-
-=head1 SEE ALSO
-
-=over 4
-
-=item   B<lctl>(8), B<lfs>(1)
-
-=back
-
-=cut
-
diff --git a/lustre/utils/llbackup b/lustre/utils/llbackup
deleted file mode 100755
index 616c8094c1a08f09326530fc2fad1c968020c8cf..0000000000000000000000000000000000000000
--- a/lustre/utils/llbackup
+++ /dev/null
@@ -1,537 +0,0 @@
-#!/bin/bash
-# do a parallel backup and restore of specified files
-#
-#  Copyright (C) 2008 Sun Microsystems, Inc.
-#
-#   This file is part of Lustre, http://www.lustre.org.
-#
-#   Lustre is free software; you can redistribute it and/or
-#   modify it under the terms of version 2 of the GNU General Public
-#   License as published by the Free Software Foundation.
-#
-#   Lustre 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 Lustre; if not, write to the Free Software
-#   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-#
-# Author: Andreas Dilger <adilger@sun.com>
-#
-
-VERSION=1.1.0
-
-export LC_ALL=C
-
-RSH=${RSH:-"ssh"}			# use "bash -c" for local testing
-SPLITMB=${SPLITMB:-8192}		# target chunk size (uncompressed)
-SPLITCOUNT=${SPLITCOUNT:-200}		# number of files to give each client
-TAR=${TAR:-"tar"}			# also htar in theory works (untested)
-
-#PROGPATH=$(which $0 2> /dev/null) || PROGPATH=$PWD/$0
-case $0 in
-	.*) PROGPATH=$PWD/$0 ;;
-	*)  PROGPATH=$0 ;;
-esac
-
-PROGNAME="$(basename $PROGPATH)"
-LOGPREFIX="$PROGNAME"
-log() {
-	echo "$LOGPREFIX: $*" 1>&2
-}
-
-fatal() {
-	log "ERROR: $*"
-	exit 1
-}
-
-usage() {
-	log "$*"
-	echo "usage: $PROGNAME [-chjvxz] [-C directory] [-e rsh] [-i inputlist]"
-	echo -e "\t\t[-l logdir] [-n nodes] [-s splitmb] [-T tar] -f ${FTYPE}base"
-	echo -e "\t-c create archive"
-	echo -e "\t-C directory: relative directory for filenames (default PWD)"
-	echo -e "\t-e rsh: specify the passwordless remote shell (default $RSH)"
-	if [ "$OP" = "backup" ]; then
-		echo -e "\t-f outputfile: specify base output filename for backup"
-	else
-		echo -e "\t-f ${OP}filelist: specify list of files to $OP"
-	fi
-	echo -e "\t-h: print help message and exit (use -x -h for restore help)"
-	if [ "$OP" = "backup" ]; then
-		echo -e "\t-i inputfile: list of files to backup (default stdin)"
-	fi
-	echo -e "\t-j: use bzip2 compression on $FTYPE file(s)"
-	echo -e "\t-l logdir: directory for output logs"
-	echo -e "\t-n nodes: comma-separated list of client nodes to run ${OP}s"
-	if [ "$OP" = "backup" ]; then
-		echo -e "\t-s splitmb: target size for backup chunks " \
-			"(default ${SPLITMB}MiB)"
-		echo -e "\t-S splitcount: number of files sent to each client "\
-			"(default ${SPLITCOUNT})"
-	fi
-	echo -e "\t-t: list table of contents of tarfile"
-	echo -e "\t-T tar: specify the backup command (default $TAR)"
-	echo -e "\t-v: be verbose - list all files being processed"
-	echo -e "\t-V: print version number and exit"
-	echo -e "\t-x: extract files instead of backing them up"
-	echo -e "\t-z: use gzip compression on $FTYPE file(s)"
-	exit 1
-}
-
-usage_inactive() {
-	usage "inactive argument '$1 $2' in '$3' mode"
-}
-
-set_op_type() {
-	case $1 in
-	*backup*)	OP=backup;  FTYPE=output; TAROP="-c" ;;
-	*list*)		OP=list;    FTYPE=input;  TAROP="-t"; SPLITCOUNT=1 ;;
-	*restore*)	OP=restore; FTYPE=input;  TAROP="-x"; SPLITCOUNT=1 ;;
-	*)		FTYPE="output"; usage "unknown archive operation '$1'";;
-	esac
-}
-
-#echo ARGV: "$@"
-
-# --fileonly, --remote are internal-use-only options
-TEMPARGS=$(getopt -n $LOGPREFIX -o cC:e:f:hi:jl:n:ps:S:tT:vVxz --long create,extract,list,restore,directory:,rsh:,outputbase:,help,inputfile:,bzip2,logdir:,nodes:,permissions:splitmb,splitcount,tar:,verbose,version,gzip,fileonly,remote: -- "$@")
-
-eval set -- "$TEMPARGS"
-
-set_op_type $PROGNAME
-
-# parse input arguments, and accumulate the client-specific args
-while true; do
-	case "$1" in
-	-c|--create)	[ "$OP" != "backup" ] &&
-				usage "can't use $1 $TAROP at the same time"
-			OP="backup"; ARGS="$ARGS $1"; shift ;;
-	-C|--directory)	GOTODIR="$2"; cd "$2" || usage "error cd to -C $2";
-					ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-e|--rsh)	RSH="$2"; shift 2;;
-	-f|--outputbase)OUTPUTBASE="$2";ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-h|--help)	ARGS=""; break;;
-	-i|--inputfile) INPUT="$2"; shift 2;;
-	-j|--bzip2)	TARCOMP="-j";	ARGS="$ARGS $1"; shift ;;
-	-l|--logdir)	LOGDIR="$2";	ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-n|--nodes)	NODELIST="$NODELIST,$2";
-					ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-p|--permissions) PERM="-p";	ARGS="$ARGS $1"; shift ;;
-	-s|--splitmb)	[ "$OP" != "backup" ] && usage_inactive $1 $2 $OP
-			SPLITMB=$2;	ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-S|--splitcount)[ "$OP" != "backup" ] && usage_inactive $1 $2 $OP
-			SPLITCOUNT=$2;	ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-t|--list)	[ "$OP" != "backup" -a "$OP" != "list" ] &&
-				usage "can't use $1 $TAROP at the same time"
-			OP="list"; ARGS="$ARGS $1"; shift ;;
-	-T|--tar)	TAR="$2";	ARGS="$ARGS $1 \"$2\""; shift 2 ;;
-	-v|--vebose)	[ "$VERBOSE" = "-v" ] && set -vx # be extra verbose
-			VERBOSE="-v";	ARGS="$ARGS $1"; shift ;;
-	-V|--version)	echo "$LOGPREFIX: version $VERSION"; exit 0;;
-	-x|--extract|--restore)
-			[ "$OP" != "backup" -a "$OP" != "restore" ] &&
-				usage "can't use $1 $TAROP at the same time"
-			OP="restore"; ARGS="$ARGS $1"; shift ;;
-	-z|--gzip)	TARCOMP="-z";	ARGS="$ARGS $1"; shift ;;
-	# these commands are for internal use only
-	--remote)	NODENUM="$2"; LOGPREFIX="$(hostname).$2"; shift 2;;
-	--fileonly)	FILEONLY="yes"; shift;;
-	--)		shift; break;;
-	*) usage "unknown argument '$1'" 1>&2 ;;
-	esac
-done
-
-set_op_type $OP
-
-#log "ARGS: $ARGS"
-
-[ -z "$ARGS" ] && usage "$OP a list of files, running on multiple nodes"
-
-# we should be able to use any backup tool that can accept filenames
-# from an input file instead of just pathnames on the command-line.
-# Unset TARCOMP for htar, as it doesn't support on-the-fly compression.
-TAREXT=
-case "$(basename $TAR)" in
-	htar*)		    TARARG="-L"; TAROUT="-f"; TARCOMP=""; MINKB=0 ;;
-	tar*|gnutar*|gtar*) TARARG="-T"; TAROUT="-b 2048 -f"; TAREXT=.tar ;;
-	*)		fatal "unknown archiver '$TAR'" ;;
-esac
-
-if [ "$OP" = "backup" ]; then
-	[ -z "$OUTPUTBASE" ] && usage "'-f ${FTYPE}base' must be given for $OP"
-	# Make sure we leave some margin free in the output filesystem for the
-	# chunks.  If we are dumping to a network filesystem (denoted by having
-	# a ':' in the name, not sure how else to check) then we assume this
-	# filesystem is shared among all clients and expect the other nodes
-	# to also consume space there.
-	OUTPUTFS=$(dirname $OUTPUTBASE)
-	NETFS=$(df -P $OUTPUTFS | awk '/^[[:alnum:]]*:/ { print $1 }')
-	MINKB=${MINKB:-$((SPLITMB * 2 * 1024))}
-	[ "$NETFS" ] && MINKB=$(($(echo $NODELIST | tr ',' ' ' | wc -w) * $MINKB))
-
-	# Compress the output files as we go.
-	case "$TARCOMP" in
-		-z) TAREXT="$TAREXT.gz";;
-		-j) TAREXT="$TAREXT.bz2";;
-	esac
-else
-	[ -z "$OUTPUTBASE" ] &&
-		usage "-f ${OP}filelist must be specified for $OP"
-	# we want to be able to use this for a list of files to restore
-	# but it is convenient to use $INPUT for reading the pathnames
-	# of the tar files during restore/list operations to handle stdin
-	[ "$INPUT" ] && usage "-i inputbase unsupported for $OP"
-	INPUT=$OUTPUTBASE
-	TARARG=""
-fi
-
-[ -z "$NODELIST" ] && NODELIST="localhost"
-
-# If we are writing to a char or block device (e.g. tape) don't add any suffix
-# We can't currently specify a different target device per client...
-if [ -b "$OUTPUTBASE" -o -c "$OUTPUTBASE" ]; then
-	MINKB=0
-	[ -z "$LOGDIR" ] && LOGDIR="/var/log"
-	LOGBASE="$LOGDIR/$PROGNAME"
-elif [ -d "$OUTPUTBASE" ]; then
-	usage "-f $OUTPUTBASE must be a pathname, not a directory"
-else
-	[ -z "$LOGDIR" ] && LOGBASE="$OUTPUTBASE" || LOGBASE="$LOGDIR/$PROGNAME"
-fi
-LOGBASE="$LOGBASE.$(date +%Y%m%d%H%M)"
-
-# tar up a sinle list of files into a chunk.  We don't exit if there is an
-# error returned, since that might happen frequently with e.g. files moving
-# and no longer being available for backup.
-# usage: run_one_tar {file_list} {chunk_nr} {chunkbytes}
-DONE_MSG="FINISH_THIS_PROGRAM_NOW_I_TELL_YOU"
-KILL_MSG="EXIT_THIS_PROGRAM_NOW_I_TELL_YOU"
-run_one_backup() {
-#set -vx
-	TMPLIST="$1"
-	CHUNK="$2"
-	CHUNKMB="$(($3 / 1048576))"
-	if [ -b "$OUTPUTBASE" -o -c "$OUTPUTBASE" ]; then
-		OUTFILE="$OUTPUTBASE"
-	else
-		OUTFILE="$OUTPUTBASE.$NODENUM.$CHUNK$TAREXT"
-	fi
-	CHUNKBASE="$LOGBASE.$NODENUM.$CHUNK"
-	LISTFILE="$CHUNKBASE.list"
-	LOG="$CHUNKBASE.log"
-
-	cp "$TMPLIST" "$LISTFILE"
-
-	SLEPT=0
-	FREEKB=$(df -P $OUTPUTFS 2> /dev/null | tail -n 1 | awk '{print $4}')
-	while [ $FREEKB -lt $MINKB ]; do
-		sleep 5
-		SLEPT=$((SLEPT + 5))
-		if [ $((SLEPT % 60)) -eq 10 ]; then
-			log "waiting ${SLEPT}s for ${MINKB}kB free in $OUTPUTFS"
-		fi
-		FREEKB=$(df -P $OUTPUTFS | tail -n 1 | awk '{print $4}')
-	done
-	[ $SLEPT -gt 0 ] && log "waited ${SLEPT}s for space in ${OUTPUTFS}"
-	log "$LISTFILE started - est. ${CHUNKMB}MB"
-	START=$(date +%s)
-	eval $TAR $TAROP $PERM $TARARG "$TMPLIST" -v $TARCOMP $TAROUT "$OUTFILE" \
-		2>&1 >>"$LOG" | tee -a $LOG | grep -v "Removing leading"
-	RC=${PIPESTATUS[0]}
-	ELAPSE=$(($(date +%s) - START))
-	if [ $RC -eq 0 ]; then
-	        if [ -f "$OUTFILE" ]; then
-			BYTES=$(stat -c '%s' "$OUTFILE")
-			CHUNKMB=$((BYTES / 1048576))
-			log "$LISTFILE finished - act. ${CHUNKMB}MB/${ELAPSE}s"
-		else
-			log "$LISTFILE finished OK - ${ELAPSE}s"
-		fi
-		echo "OK" > $CHUNKBASE.done
-	else
-		echo "ERROR=$RC" > $CHUNKBASE.done
-		log "ERROR: $LISTFILE exited with rc=$RC"
-	fi
-	rm $TMPLIST
-	return $RC
-}
-
-run_one_restore_or_list() {
-#set -vx
-	INPUTFILE="$1"
-	LOG="$LOGBASE.$(basename $INPUTFILE).restore.log"
-
-	SLEPT=0
-	while [ $MINKB != 0 -a ! -r "$INPUTFILE" ]; do
-		SLEPT=$((SLEPT + 5))
-		if [ $((SLEPT % 60)) -eq 10 ]; then
-			log "waiting ${SLEPT}s for $INPUTFILE staging"
-		fi
-		sleep 5
-	done
-	[ $SLEPT -gt 0 ] && log "waited ${SLEPT}s for $INPUTFILE staging"
-	log "$OP of $INPUTFILE started"
-	START=$(date +%s)
-	eval $TAR $TAROP -v $TARCOMP $TAROUT "$INPUTFILE" 2>&1 >>"$LOG" |
-		tee -a "$LOG" | grep -v "Removing leading"
-	RC=${PIPESTATUS[0]}
-	ELAPSE=$(($(date +%s) - START))
-	[ "$OP" = "list" ] && cat $LOG
-	if [ $RC -eq 0 ]; then
-		log "$INPUTFILE finished OK - ${ELAPSE}s"
-		echo "OK" > $INPUTFILE.restore.done
-	else
-		echo "ERROR=$RC" > $INPUTFILE.restore.done
-		log "ERROR: $OP of $INPUTFILE exited with rc=$RC"
-	fi
-	return $RC
-}
-
-# Run as a remote command and read input filenames from stdin and create tar
-# output files of the requested size.  The input filenames can either be:
-# "bytes filename" or "filename" depending on whether FILEONLY is set.
-#
-# Read filenames until we have either a large enough list of small files,
-# or we get a very large single file that is backed up by itself.
-run_remotely() {
-#set -vx
-	log "started thread"
-	RCMAX=0
-
-	[ "$FILEONLY" ] && PARAMS="FILENAME" || PARAMS="BYTES FILENAME"
-
-	if [ "$OP" = "backup" ]; then
-		TMPBASE=$PROGNAME.$LOGPREFIX.temp
-		TMPFILE="$(mktemp -t $TMPBASE.$(date +%s).XXXXXXX)"
-		OUTPUTFILENUM=0
-		SUMBYTES=0
-	fi
-	BYTES=""
-
-	while read $PARAMS; do
-		[ "$FILENAME" = "$DONE_MSG" -o "$BYTES" = "$DONE_MSG" ] && break
-		if [ "$FILENAME" = "$KILL_MSG" -o "$BYTES" = "$KILL_MSG" ]; then
-			log "exiting $OP on request"
-			[ "$TARPID" ] && kill -9 $TARPID 2> /dev/null
-			exit 9
-		fi
-
-		case "$OP" in
-		list|restore)
-			run_one_restore_or_list $FILENAME; RC=$?
-			;;
-		backup)	STAT=($(stat -c '%s %F' "$FILENAME"))
-			[ "$FILEONLY" ] && BYTES=${STAT[0]}
-			# if this is a directory that has files in it, it will
-			# be backed up as part of this (or some other) backup.
-			# Only include it in the backup if empty, otherwise
-			# the files therein will be backed up multiple times
-			if [ "${STAT[1]}" = "directory" ]; then
-				NUM=`find "$FILENAME" -maxdepth 1|head -2|wc -l`
-				[ "$NUM" -gt 1 ] && continue
-			fi
-			[ "$VERBOSE" ] && log "$FILENAME"
-
-			# if a file is > 3/4 of chunk size, archive by itself
-			# avoid shell math: 1024 * 1024 / (3/4) = 1398101
-			if [ $((BYTES / 1398101)) -gt $SPLITMB ]; then
-				# create a very temp list for just this file
-				TARLIST=$(mktemp -t $TMPBASE.$(date +%s).XXXXXX)
-				echo "$FILENAME" > "$TARLIST"
-				TARBYTES=$BYTES
-			else
-				SUMBYTES=$((SUMBYTES + BYTES))
-				echo "$FILENAME" >> $TMPFILE
-
-				# not large enough input list, keep collecting
-				[ $((SUMBYTES >> 20)) -lt $SPLITMB ] && continue
-
-				TARBYTES=$SUMBYTES
-				SUMBYTES=0
-				TARLIST="$TMPFILE"
-				TMPFILE=$(mktemp -t $TMPBASE.$(date +%s).XXXXXXX)
-			fi
-
-			wait $TARPID
-			RC=$?
-			run_one_backup "$TARLIST" "$OUTPUTFILENUM" $TARBYTES &
-			TARPID=$!
-			OUTPUTFILENUM=$((OUTPUTFILENUM + 1))
-			;;
-		esac
-
-		[ $RC -gt $RCMAX ] && RCMAX=$RC
-	done
-
-	if [ "$TARPID" ]; then
-		wait $TARPID
-		RC=$?
-		[ $RC -gt $RCMAX ] && RCMAX=$RC
-	fi
-
-	if [ -s "$TMPFILE" ]; then
-		run_one_backup "$TMPFILE" "$OUTPUTFILENUM" $SUMBYTES
-		RC=$?
-		[ $RC -gt $RCMAX ] && RCMAX=$RC
-	fi
-	exit $RCMAX
-}
-
-# If we are a client then just run that subroutine and exit
-[ "$NODENUM" ] && run_remotely && exit 0
-
-# Tell the clients to exit.  Their input pipes might be busy so it may
-# take a while for them to consume the files and finish.
-CLEANING=no
-cleanup() {
-	log "cleaning up remote processes"
-	for FD in $(seq $BASEFD $((BASEFD + NUMCLI - 1))); do
-		echo "$DONE_MSG" >&$FD
-	done
-	CLEANING=yes
-
-	SLEPT=0
-	RUN=$(ps auxww | egrep -v "grep|bash" | grep -c "$PROGNAME.*remote")
-	while [ $RUN -gt 0 ]; do
-		set +vx
-		#ps auxww | grep "$PROGNAME.*remote" | egrep -v "grep|bash"
-		sleep 1
-		SLEPT=$((SLEPT + 1))
-		[ $((SLEPT % 30)) -eq 0 ] &&
-			log "wait for $RUN processes to finish"
-		[ $((SLEPT % 300)) -eq 0 ] &&
-			ps auxww |grep "$PROGNAME.*remote" |egrep -v "grep|bash"
-		RUN=$(ps auxww|egrep -v "grep|bash"|grep -c "$PROGNAME.*remote")
-	done
-	trap 0
-}
-
-do_cleanup() {
-	if [ "$CLEANING" = "yes" ]; then
-		log "killing all remote processes - may not stop immediately"
-		for FD in $(seq $BASEFD $((BASEFD + NUMCLI - 1))); do
-			echo "$KILL_MSG" >&$FD
-		done
-		sleep 1
-		PROCS=$(ps auxww|awk '/$PROGNAME.*remote/ { print $2 }')
-		[ "$PROCS" ] && kill -9 $PROCS
-		trap 0
-	fi
-
-	cleanup
-}
-
-# values that only need to be determined on the master
-# always read from stdin, even if it is a file, to be more consistent
-case "$INPUT" in
-	-|"")	INPUT="standard input";;
-	*)	if [ ! -r "$INPUT" ]; then
-			[ "$VERBOSE" ] && ls -l "$INPUT"
-			usage "can't read input file '$INPUT'"
-		fi
-		exec <$INPUT ;;
-esac
-
-# if unspecified, run remote clients in the current PWD to get correct paths
-[ -z "$GOTODIR" ] && ARGS="$ARGS -C \"$PWD\""
-
-# main()
-BASEFD=100
-NUMCLI=0
-
-# Check if the input list has the file size specified or not.  Input
-# lines should be of the form "{bytes} {filename}" or "{filename}".
-# If no size is given then the file sizes are determined by the clients
-# to do the chunking (useful for making a full backup, but not as good
-# at evenly distributing the data among clients).  In rare cases the first
-# file specified may have a blank line and no size - check that as well.
-if [ "$OP" = "backup" ]; then
-	read BYTES FILENAME
-	if [ -z "$FILENAME" -a -e "$BYTES" ]; then
-		FILENAME="$BYTES"
-		BYTES=""
-		FILEONLY="yes" && ARGS="$ARGS --fileonly"
-	elif [ -e "$BYTES $FILENAME" ]; then
-		FILENAME="$BYTES $FILENAME"
-		BYTES=""
-		FILEONLY="yes" && ARGS="$ARGS --fileonly"
-	elif [ ! -e "$FILENAME" ]; then
-		log "input was '$BYTES $FILENAME'"
-		fatal "first line of '$INPUT' is not a file"
-	fi
-else
-	FILEONLY="yes" && ARGS="$ARGS --fileonly"
-fi
-
-# kill the $RSH processes if we get a signal
-trap do_cleanup INT EXIT
-
-# start up the remote processes, each one with its stdin attached to a
-# different output file descriptor, so that we can communicate with them
-# individually when sending files to back up.  We generate a remote log
-# file and also return output to this process.
-for CLIENT in $(echo $NODELIST | tr ',' ' '); do
-	FD=$((BASEFD+NUMCLI))
-	LOG=$OUTPUTBASE.$CLIENT.$FD.log
-	eval "exec $FD> >($RSH $CLIENT '$PROGPATH --remote=$NUMCLI $ARGS')"
-	RC=$?
-	if [ $RC -eq 0 ]; then
-		log "starting $0.$NUMCLI on $CLIENT"
-		NUMCLI=$((NUMCLI + 1))
-	else
-		log "ERROR: failed '$RSH $CLIENT $PROGPATH': RC=$?"
-	fi
-done
-
-if [ $NUMCLI -eq 0 ]; then
-	fatal "unable to start any threads"
-fi
-
-CURRCLI=0
-# We don't want to use "BYTES FILENAME" if the input doesn't include the
-# size, as this might cause problems with files with whitespace in them.
-# Instead we just have two different loops depending on whether the size
-# is in the input file or not.  We dish out the files either by size
-# (to fill a chunk), or just round-robin and hope for the best.
-if [ "$FILEONLY" ]; then
-	if [ "$FILENAME" ]; then
-		[ "$VERBOSE" ] && log "$FILENAME"
-		echo "$FILENAME" 1>&$BASEFD	# rewrite initial line
-	fi
-	# if we don't know the size, just round-robin among the clients
-	while read FILENAME; do
-		FD=$((BASEFD+CURRCLI))
-		[ -n "$VERBOSE" -a "$OP" != "backup" ] && log "$OP $FILENAME"
-		echo "$FILENAME" 1>&$FD
-
-		COUNT=$((COUNT + 1))
-		if [ $COUNT -ge $SPLITCOUNT ]; then
-			CURRCLI=$(((CURRCLI + 1) % NUMCLI))
-			COUNT=0
-		fi
-	done
-else
-	[ "$VERBOSE" ] && log "$FILENAME"
-	echo $BYTES "$FILENAME" 1>&$BASEFD	# rewrite initial line
-	# if we know the size, then give each client enough to start a chunk
-	while read BYTES FILENAME; do
-		FD=$((BASEFD+CURRCLI))
-		[ "$VERBOSE" ] && log "$FILENAME"
-		echo $BYTES "$FILENAME" >&$FD
-
-		# take tar blocking factor into account
-		[ $BYTES -lt 10240 ] && BYTES=10240
-		SUMBYTES=$((SUMBYTES + BYTES))
-		if [ $((SUMBYTES / 1048576)) -ge $SPLITMB ]; then
-			CURRCLI=$(((CURRCLI + 1) % NUMCLI))
-			SUMBYTES=0
-		fi
-	done
-fi
-
-# Once all of the files have been given out, wait for the remote processes
-# to complete.  That might take a while depending on the size of the backup.
-cleanup
diff --git a/lustre/utils/llobdstat b/lustre/utils/llobdstat
deleted file mode 100644
index 300c9d882bbc56ab548eb9124fcd6a19325b9d16..0000000000000000000000000000000000000000
--- a/lustre/utils/llobdstat
+++ /dev/null
@@ -1,170 +0,0 @@
-#!/usr/bin/perl
-# llobdstat is a utility that parses obdfilter statistics files 
-# found at proc/fs/lustre/<ostname>/stats.
-# It is mainly useful to watch the statistics change over time.
-
-my $pname = $0;
-
-my $defaultpath = "/proc/fs/lustre";
-my $obdstats = "stats";
-
-sub usage()
-{
-    print STDERR "Usage: $pname <ost_name> [<interval>]\n";
-    print STDERR "where  ost_name  : ost name under $defaultpath/obdfilter\n";
-    print STDERR "       interval  : sample interaval in seconds\n";
-    print STDERR "example: $pname lustre-OST0000 2\n";
-    print STDERR "Use CTRL + C to stop statistics printing\n";
-    exit 1;
-}
-
-my $statspath = "None";
-my $interval = 0;
-
-if (($#ARGV < 0) || ($#ARGV > 1)) {
-    usage();
-} else {
-    if ( $ARGV[0] =~ /help$/ ) {
-	usage();
-    }
-    if ( -f $ARGV[0] ) {
-	$statspath = $ARGV[0];
-    } elsif ( -f "$ARGV[0]/$obdstats" ) {
-	$statspath = "$ARGV[0]/$obdstats";
-    } else {
-	my $st = `ls $defaultpath/*/$ARGV[0]/$obdstats 2> /dev/null`;
-	chop $st;
-	if ( -f "$st" ) {
-	    $statspath = $st;
-	}
-    }
-    if ( $statspath =~ /^None$/ ) {
-        die "Cannot locate stat file for: $ARGV[0]\n";
-    }
-    if ($#ARGV == 1) {
-	$interval = $ARGV[1];
-    } 
-}
-
-print "$pname on $statspath\n";
-
-my %cur;
-my %last;
-my $mhz = 0;
-
-#Removed some statstics like open, close that obdfilter don't contains.
-#To add statistics parameters one need to specify parameter names in below declarations in same sequence. 
-my ($read_bytes, $write_bytes, $create, $destroy, $statfs, $punch, $snapshot_time) = 
-    ("read_bytes", "write_bytes", "create", "destroy", "statfs", "punch", "snapshot_time"); 
-
-my @extinfo = ($create, $destroy, $statfs, $punch);
-my %shortname = ($create => "cx", $destroy => "dx", $statfs => "st", $punch => "pu");
-
-sub get_cpumhz()
-{
-    my $cpu_freq;
-    my $itc_freq; # On Itanium systems use this
-    if (open(CPUINFO, "/proc/cpuinfo")==0) {
-	return;
-    }
-    while (<CPUINFO>) {
-	if (/^cpu MHz\s+:\s*([\d\.]+)/) { $cpu_freq=$1; }
-	elsif (/^itc MHz\s+:\s*([\d\.]+)/) { $itc_freq=$1; }
-    }
-    if (defined($itc_freq)) { $mhz = $itc_freq; }
-    elsif (defined($cpu_freq)) { $mhz = $cpu_freq; }
-    else { $mhz = 1; }
-    close CPUINFO;
-}
-
-get_cpumhz();
-print "Processor counters run at $mhz MHz\n";
-
-# readstats subroutine reads statistics from obdfilter stats file.
-# This subroutine gets called after every interval specified by user.     
-sub readstat()
-{
-	my $prevcount;
-	my @iodata;
-
-	seek STATS, 0, 0;
-    	while (<STATS>) {
-		chop;
-#		($name, $cumulcount, $samples, $unit, $min, $max, $sum, $sumsquare) 
-		@iodata = split(/\s+/, $_);
-		my $name = $iodata[0];
-
-		$prevcount = $cur{$name};
-		if (defined($prevcount)) {
-	    		$last{$name} = $prevcount; 
-		} 
-		if ($name =~ /^read_bytes$/ || $name =~ /^write_bytes$/) {
-	  		$cur{$name} = $iodata[6];
-		}
-		elsif ($name =~ /^snapshot_time$/) {
-#			$cumulcount =~ /(\d+)/;
-	    		$cur{$name} = $iodata[1];
-		}
-		else {
-	    		$cur{$name} = $iodata[1];
-		}
-    	}
-}
-# process_stats subroutine processes stats information read from obdfilter stats file.
-# This subroutine gets called after every interval specified by user.     
-sub process_stats()
-{
-	my $delta;
-	my $data;
-	my $last_time = $last{$snapshot_time};
-	if (!defined($last_time)) {
-		printf "Read: %-g, Write: %-g, create/destroy: %-g/%-g, stat: %-g, punch: %-g\n",
-		$cur{$read_bytes}, $cur{$write_bytes},  
-		$cur{$create}, $cur{$destroy}, 
-		$cur{$statfs}, $cur{$punch}; 
-                if ($interval) {
-                        print "[NOTE: cx: create, dx: destroy, st: statfs, pu: punch ]\n\n";
-                        print "Timestamp   Read-delta  ReadRate  Write-delta  WriteRate\n";
-                        print "--------------------------------------------------------\n";
-                }
-	}
-	else {
-		my $timespan = $cur{$snapshot_time} - $last{$snapshot_time};
-		my $rdelta = $cur{$read_bytes} - $last{$read_bytes};
-		my $rrate = ($rdelta) / ($timespan * ( 1 << 20 ));
-		my $wdelta = $cur{$write_bytes} - $last{$write_bytes};
-		my $wrate = ($wdelta) / ($timespan * ( 1 << 20 ));
-		$rdelta = ($rdelta) / (1024 * 1024);
-		$wdelta = ($wdelta) / (1024 * 1024);
-		# This print repeats after every interval.
-		printf "%10lu  %6.2fMB  %6.2fMB/s   %6.2fMB  %6.2fMB/s",
-			$cur{$snapshot_time}, $rdelta, $rrate, $wdelta, $wrate;
-
-		$delta = $cur{$getattr} - $last{$getattr};
-		if ( $delta != 0 ) {
-			$rdelta = int ($delta/$timespan);
-			print " ga:$delta,$rdelta/s";
-		}
-		
-		for $data ( @extinfo ) {
-			$delta = $cur{$data} - $last{$data};
-			if ($delta != 0) {
-				print " $shortname{$data}:$delta";
-			}
-		}
-		print "\n";
-		$| = 1;
-	}
-}
-#Open the obdfilter stat file with STATS
-open(STATS, $statspath) || die "Cannot open $statspath: $!\n";
-do {
-	readstat();		# read the statistics from stat file.
-	process_stats();	
-    	if ($interval) { 	
-		sleep($interval); 
-		%last = %cur;
-    	}
-} while ($interval);	# Repeat the statistics printing after every "interval" specified in command line.
-close STATS;
-# llobdfilter.pl ends here.
diff --git a/lustre/utils/llog_reader.c b/lustre/utils/llog_reader.c
deleted file mode 100644
index 117bf647ff755bcf9c8d3fa1c024418089f44aa7..0000000000000000000000000000000000000000
--- a/lustre/utils/llog_reader.c
+++ /dev/null
@@ -1,407 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2006 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
- /* Interpret configuration llogs */
-
-
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include <time.h>
-#include <liblustre.h>
-#include <lustre/lustre_idl.h>
-
-int llog_pack_buffer(int fd, struct llog_log_hdr **llog_buf,
-                     struct llog_rec_hdr ***recs, int *recs_number);
-
-void print_llog_header(struct llog_log_hdr *llog_buf);
-void print_records(struct llog_rec_hdr **recs_buf,int rec_number);
-void llog_unpack_buffer(int fd, struct llog_log_hdr *llog_buf,
-                        struct llog_rec_hdr **recs_buf);
-
-#define CANCELLED 0x678
-
-#define PTL_CMD_BASE 100
-char* portals_command[17]=
-{
-        "REGISTER_PEER_FD",
-        "CLOSE_CONNECTION",
-        "REGISTER_MYNID",
-        "PUSH_CONNECTION",
-        "GET_CONN",
-        "DEL_PEER",
-        "ADD_PEER",
-        "GET_PEER",
-        "GET_TXDESC",
-        "ADD_ROUTE",
-        "DEL_ROUTE",
-        "GET_ROUTE",
-        "NOTIFY_ROUTER",
-        "ADD_INTERFACE",
-        "DEL_INTERFACE",
-        "GET_INTERFACE",
-        ""
-};
-
-int main(int argc, char **argv)
-{
-        int rc = 0;
-        int fd, rec_number;
-        struct llog_log_hdr *llog_buf = NULL;
-        struct llog_rec_hdr **recs_buf = NULL;
-
-        setlinebuf(stdout);
-
-        if(argc != 2 ){
-                printf("Usage: llog_reader filename\n");
-                return -1;
-        }
-
-        fd = open(argv[1],O_RDONLY);
-        if (fd < 0){
-                printf("Could not open the file %s\n", argv[1]);
-                goto out;
-        }
-        rc = llog_pack_buffer(fd, &llog_buf, &recs_buf, &rec_number);
-        if (rc < 0) {
-                printf("Could not pack buffer; rc=%d\n", rc);
-                goto out_fd;
-        }
-
-        print_llog_header(llog_buf);
-        print_records(recs_buf,rec_number);
-        llog_unpack_buffer(fd,llog_buf,recs_buf);
-out_fd:
-        close(fd);
-out:
-        return rc;
-}
-
-
-
-int llog_pack_buffer(int fd, struct llog_log_hdr **llog,
-                     struct llog_rec_hdr ***recs,
-                     int *recs_number)
-{
-        int rc = 0, recs_num,rd;
-        off_t file_size;
-        struct stat st;
-        char *file_buf=NULL, *recs_buf=NULL;
-        struct llog_rec_hdr **recs_pr=NULL;
-        char *ptr=NULL;
-        int i;
-
-        rc = fstat(fd,&st);
-        if (rc < 0){
-                printf("Get file stat error.\n");
-                goto out;
-        }
-        file_size = st.st_size;
-
-        file_buf = malloc(file_size);
-        if (file_buf == NULL){
-                printf("Memory Alloc for file_buf error.\n");
-                rc = -ENOMEM;
-                goto out;
-        }
-        *llog = (struct llog_log_hdr*)file_buf;
-
-        rd = read(fd,file_buf,file_size);
-        if (rd < file_size){
-                printf("Read file error.\n");
-                rc = -EIO; /*FIXME*/
-                goto clear_file_buf;
-        }
-
-        /* the llog header not countable here.*/
-        recs_num = le32_to_cpu((*llog)->llh_count)-1;
-
-        recs_buf = malloc(recs_num * sizeof(struct llog_rec_hdr *));
-        if (recs_buf == NULL){
-                printf("Memory Alloc for recs_buf error.\n");
-                rc = -ENOMEM;
-                goto clear_file_buf;
-        }
-        recs_pr = (struct llog_rec_hdr **)recs_buf;
-
-        ptr = file_buf + le32_to_cpu((*llog)->llh_hdr.lrh_len);
-        i = 0;
-
-        while (i < recs_num){
-                struct llog_rec_hdr *cur_rec = (struct llog_rec_hdr*)ptr;
-                int idx = le32_to_cpu(cur_rec->lrh_index);
-                recs_pr[i] = cur_rec;
-
-                if (ext2_test_bit(idx, (*llog)->llh_bitmap)) {
-                        if (le32_to_cpu(cur_rec->lrh_type) != OBD_CFG_REC) 
-                                printf("rec #%d type=%x len=%u\n", idx,
-                                       cur_rec->lrh_type, cur_rec->lrh_len);
-                } else {
-                        printf("Bit %d of %d not set\n", idx, recs_num);
-                        cur_rec->padding = CANCELLED;
-                        /* The header counts only set records */
-                        i--;
-                }
-                
-                ptr += le32_to_cpu(cur_rec->lrh_len);
-                if ((ptr - file_buf) > file_size) {
-                        printf("The log is corrupt (too big at %d)\n", i);
-                        rc = -EINVAL;
-                        goto clear_recs_buf;
-                }
-                i++;
-        }
-
-        *recs = recs_pr;
-        *recs_number = recs_num;
-
-out:
-        return rc;
-
-clear_recs_buf:
-        free(recs_buf);
-
-clear_file_buf:
-        free(file_buf);
-
-        *llog=NULL;
-        goto out;
-}
-
-void llog_unpack_buffer(int fd, struct llog_log_hdr *llog_buf,
-                        struct llog_rec_hdr **recs_buf)
-{
-        free(llog_buf);
-        free(recs_buf);
-        return;
-}
-
-void print_llog_header(struct llog_log_hdr *llog_buf)
-{
-        time_t t;
-
-        printf("Header size : %u\n",
-                le32_to_cpu(llog_buf->llh_hdr.lrh_len));
-
-        t = le64_to_cpu(llog_buf->llh_timestamp);
-        printf("Time : %s", ctime(&t));
-
-        printf("Number of records: %u\n",
-               le32_to_cpu(llog_buf->llh_count)-1);
-
-        printf("Target uuid : %s \n",
-               (char *)(&llog_buf->llh_tgtuuid));
-
-        /* Add the other info you want to view here */
-
-        printf("-----------------------\n");
-        return;
-}
-
-static void print_1_cfg(struct lustre_cfg *lcfg)
-{
-        int i;
-
-        if (lcfg->lcfg_nid)
-                printf("nid=%s("LPX64")  ", libcfs_nid2str(lcfg->lcfg_nid),
-                       lcfg->lcfg_nid);
-        if (lcfg->lcfg_nal)
-                printf("nal=%d ", lcfg->lcfg_nal);
-        for (i = 0; i <  lcfg->lcfg_bufcount; i++)
-                printf("%d:%.*s  ", i, lcfg->lcfg_buflens[i],
-                       (char*)lustre_cfg_buf(lcfg, i));
-        return;
-}
-
-
-static void print_setup_cfg(struct lustre_cfg *lcfg)
-{
-        struct lov_desc *desc;
-
-        if ((lcfg->lcfg_bufcount == 2) &&
-            (lcfg->lcfg_buflens[1] == sizeof(*desc))) {
-                printf("lov_setup ");
-                printf("0:%s  ", lustre_cfg_string(lcfg, 0));
-                printf("1:(struct lov_desc)\n");
-                desc = (struct lov_desc*)(lustre_cfg_string(lcfg, 1));
-                printf("\t\tuuid=%s  ", (char*)desc->ld_uuid.uuid);
-                printf("stripe:cnt=%u ", desc->ld_default_stripe_count);
-                printf("size="LPU64" ", desc->ld_default_stripe_size);
-                printf("offset="LPU64" ", desc->ld_default_stripe_offset);
-                printf("pattern=%#x", desc->ld_pattern);
-        } else {
-                printf("setup     ");
-                print_1_cfg(lcfg);
-        }
-        return;
-}
-
-void print_lustre_cfg(struct lustre_cfg *lcfg, int *skip)
-{
-        enum lcfg_command_type cmd = le32_to_cpu(lcfg->lcfg_command);
-
-        if (*skip > 0)
-                printf("SKIP ");
-
-        switch(cmd){
-        case(LCFG_ATTACH):{
-                printf("attach    ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_SETUP):{
-                print_setup_cfg(lcfg);
-                break;
-        }
-        case(LCFG_DETACH):{
-                printf("detach    ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_CLEANUP):{
-                printf("cleanup   ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_ADD_UUID):{
-                printf("add_uuid  ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_DEL_UUID):{
-                printf("del_uuid  ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_ADD_CONN):{
-                printf("add_conn  ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_DEL_CONN):{
-                printf("del_conn  ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_LOV_ADD_OBD):{
-                printf("lov_modify_tgts add ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_LOV_DEL_OBD):{
-                printf("lov_modify_tgts del ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_MOUNTOPT):{
-                printf("mount_option ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_DEL_MOUNTOPT):{
-                printf("del_mount_option ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_SET_TIMEOUT):{
-                printf("set_timeout=%d ", lcfg->lcfg_num);
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_SET_UPCALL):{
-                printf("set_lustre_upcall ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_PARAM):{
-                printf("param ");
-                print_1_cfg(lcfg);
-                break;
-        }
-        case(LCFG_MARKER):{
-                struct cfg_marker *marker = lustre_cfg_buf(lcfg, 1);
-                char createtime[26], canceltime[26] = "";
-                if (marker->cm_flags & CM_SKIP) {
-                        if (marker->cm_flags & CM_START) {
-                                printf("SKIP START ");
-                                (*skip)++;
-                        } else {
-                                printf(     "END   ");
-                                *skip = 0;
-                        }
-                }
-                if (marker->cm_flags & CM_EXCLUDE) {
-                        if (marker->cm_flags & CM_START) 
-                                printf("EXCLUDE START ");
-                        else
-                                printf("EXCLUDE END   ");
-                }
-                ctime_r(&marker->cm_createtime, createtime);
-                createtime[strlen(createtime) - 1] = 0;
-                if (marker->cm_canceltime) {
-                        ctime_r(&marker->cm_canceltime, canceltime);
-                        canceltime[strlen(canceltime) - 1] = 0;
-                }
-                printf("marker %3d (flags=%#04x, v%d.%d.%d.%d) %-15s '%s' %s-%s",
-                       marker->cm_step, marker->cm_flags,
-                       OBD_OCD_VERSION_MAJOR(marker->cm_vers),
-                       OBD_OCD_VERSION_MINOR(marker->cm_vers),
-                       OBD_OCD_VERSION_PATCH(marker->cm_vers),
-                       OBD_OCD_VERSION_FIX(marker->cm_vers),
-                       marker->cm_tgtname, marker->cm_comment,
-                       createtime, canceltime);
-                break;
-        }
-        default:
-                printf("unsupported cmd_code = %x\n",cmd);
-        }
-        printf("\n");
-        return;
-}
-
-void print_records(struct llog_rec_hdr **recs, int rec_number)
-{
-        __u32 lopt;
-        int i, skip = 0;
-        
-        for(i = 0; i < rec_number; i++) {
-                printf("#%.2d (%.3d)", le32_to_cpu(recs[i]->lrh_index),
-                       le32_to_cpu(recs[i]->lrh_len));
-
-                lopt = le32_to_cpu(recs[i]->lrh_type);
-
-                if (recs[i]->padding == CANCELLED) 
-                        printf("NOT SET ");
-            
-                if (lopt == OBD_CFG_REC) {
-                        struct lustre_cfg *lcfg;
-                        lcfg = (struct lustre_cfg *)((char*)(recs[i]) +
-                                                     sizeof(struct llog_rec_hdr));
-                        print_lustre_cfg(lcfg, &skip);
-                } else if (lopt == LLOG_PAD_MAGIC) {
-                        printf("padding\n");
-                } else
-                        printf("unknown type %x\n", lopt);
-
-        }
-}
diff --git a/lustre/utils/llstat b/lustre/utils/llstat
deleted file mode 100644
index d3ddd0f5bea3fc1f8f9321c18ed0b7f7ca29fcc6..0000000000000000000000000000000000000000
--- a/lustre/utils/llstat
+++ /dev/null
@@ -1,204 +0,0 @@
-#!/usr/bin/perl
-# llstat is a utility that takes stats files as input with optional 
-# clear-flag. The clear-flag is used to clear the stats file before 
-# printing stats information. The lustre stats files generally located
-# inside proc/fs/lustre/. This program first reads the required statistics
-# information from specified stat file, process the information and prints
-# the output after every interval specified by user.
-
-# Subroutine for printing usages information
-sub usage()
-{
-	print STDERR "Usage: $pname [-c] [-g] [-i <interval>] [-h <help>] <stats_file>\n";
-	print STDERR "       stats_file : /proc/fs/lustre/.../stat\n";
-	print STDERR "       -i interval: polling period\n";
-	print STDERR "       -c         : clear stats file first\n";
-	print STDERR "       -g         : graphable output format\n";
-	print STDERR "       -h         : help, display this information\n";
-	print STDERR "example: $pname -i 1 ost (monitors /proc/fs/lustre/ost/OSS/ost/stats)\n";
-	print STDERR "Use CTRL + C to stop statistics printing\n";
-	exit 1;
-}
-
-sub print_headings()
-{	my $cc = $_[0];
-	if ($graphable) {
-		if ( $print_once && $interval ) {
-			printf "Timestamp [Name Count Rate Total Unit]...";
-			printf "\n--------------------------------------------------------------------";
-			$print_once = 0;
-		}
-		if ($cc && !$starttime) {
-			$starttime = $cc
-		}
-	       	printf "\n%-5.0f", ($cc - $starttime);
-	} else {
-		printf "$statspath @ $cc\n";
-		printf "%-25s %-10s %-10s %-10s", "Name", "Cur.Count", "Cur.Rate", "#Events";
-		if ( $anysum ) {
-			printf "%-8s %10s %10s %12s %10s", "Unit", "last", "min", "avg", "max";
-		}
-		if ( $anysumsquare ) {
-			printf "%10s", "stddev";
-		}
-		printf "\n";
-	}
-}
-
-# known units are: reqs, bytes, usec, bufs, regs, pages
-# readstat subroutine reads and processes statistics from stats file.
-# This subroutine gets called after every interval specified by user.
-sub readstat()
-{
-	seek STATS, 0, 0;
-	while (<STATS>) {
-	chop;
-	($name, $cumulcount, $samples, $unit, $min, $max, $sum, $sumsquare) 
-		= split(/\s+/, $_);
-	$prevcount = %cumulhash->{$name};
-	if (defined($prevcount)) {
-		$diff = $cumulcount - $prevcount;
-		if ($name eq "snapshot_time") {
-			$tdiff = int($diff);
-			&print_headings($cumulcount);
-			$| = 1;
-			if ($tdiff == 0) {
-			    $tdiff = 1; # avoid division by zero
-			}
-		}
-		elsif ($cumulcount!=0) {
-			if ($graphable) {
-			    my $myunit = $unit;
-			    my $myname = $name;
-			    if (defined($sum)) {
-				$myunit = "[reqs]";
-				$myname = $myname . "_rq";
-			    }
-			    printf "   %s %lu %lu %lu %s", 
-			    $myname, $diff, ($diff/$tdiff), $cumulcount, $myunit;
-			} else {
-			    printf "%-25s %-10lu %-10lu %-10lu",
-			    $name, $diff, ($diff/$tdiff), $cumulcount;
-			}
-			if (defined($sum)) {
-				my $sum_orig = $sum;
-				my $sum_diff = $sum - %sumhash->{$name};
-				if ($graphable) {
-				    printf "   %s %lu %.2f %lu %s",
-				    $name, $sum_diff, ($sum_diff/$tdiff), $sum, $unit;
-				} else {
-				    printf "%-8s %10lu %10lu %12.2f %10lu", $unit, 
-				    $sum_diff, $min, ($sum/$cumulcount), $max;
-				}
-				if (defined($sumsquare)) {
-					my $s = $sumsquare - (($sum_orig*$sum_orig)/$cumulcount);
-					if ($s >= 0) {
-						my $cnt = ($cumulcount >= 2) ? $cumulcount : 2 ;
-						my $stddev = sqrt($s/($cnt - 1));
-						if (!$graphable) {
-							printf " %9.2f ", $stddev;
-						}
-					}
-				}
-			}
-			if (!$graphable) {
-				printf "\n";
-			}
-			$| = 1;
-		}
-	} else {
-		if ($cumulcount!=0) {
-			# print info when interval is not specified.
-			printf "%-25s $cumulcount\n", $name
-		}
-		if (defined($sum)) {
-			$anysum = 1;
-		}
-		if (defined($sumsquare)) {
-			$anysumsquare = 1;
-		}
-	}
-	%cumulhash->{$name} = $cumulcount;
-	%sumhash->{$name} = $sum;
-	} #end of while
-}
-
-#Globals
-$pname = $0;
-$defaultpath = "/proc/fs/lustre";
-$obdstats = "stats";
-$clear = 0;
-$graphable = 0;
-$interval = 0;
-$statspath = "None";
-$anysumsquare = 0;
-$mhz = 0;
-$print_once = 1;
-%cumulhash;
-%sumhash;
-$anysum = 0;
-$obddev = "";
-$starttime = 0;
-$ONE_MB = 1048576;
-
-# Command line parameter parsing
-use Getopt::Std;
-getopts('hcgi:') or usage();
-usage() if $opt_h;
-$clear = 1 if $opt_c;
-$graphable = 1 if $opt_g;
-$interval = $opt_i if $opt_i;
-
-my $i = 0;
-foreach (@ARGV) {
-        $obddev = $_;
-        $i++;
-        if ($i > 1) {
-                print "ERROR: extra argument $_\n";
-                usage();
-        }
-}
-if ( !$obddev ) {
-	print "ERROR: Need to specify stats_file\n";
-	usage();
-}
-# Process arguments
-if ( -f $obddev ) {
-	$statspath = $obddev;
-} elsif ( -f "$obddev/$obdstats" ) {
-	$statspath = "$obddev/$obdstats";
-} else {
-	my $st = glob("$defaultpath/*/$obddev/$obdstats");
-	if ( -f "$st" ) {
-		$statspath = $st;
-	} else {
-		$st = glob("$defaultpath/*/*/$obddev/$obdstats");
-		if ( -f "$st" ) {
-			$statspath = $st;
-		}
-	}
-}
-if ( $statspath =~ /^None$/ ) {
-	die "Cannot locate stat file for: $obddev\n";
-}
-# Clears stats file before printing information in intervals
-if ( $clear ) {
-	open ( STATS, "> $statspath") || die "Cannot clear $statspath: $!\n";
-	print STATS " ";
-	close STATS;
-	sleep($interval);	    
-}
-use POSIX qw(strftime);
-$time_v = time();
-$hostname = `lctl list_nids | head -1`;
-chop($hostname);
-print "$pname: STATS on ", strftime("%D", localtime($time_v));
-print " $statspath on $hostname\n";
-open(STATS, $statspath) || die "Cannot open $statspath: $!\n";
-do {
-	readstat();
-	if ($interval) { 
-		sleep($interval);
-	}
-} while ($interval);
-close STATS;
diff --git a/lustre/utils/llverdev.c b/lustre/utils/llverdev.c
deleted file mode 100644
index 91a21c2cb2dbc8e1b253a80bc3d824b73a7519fe..0000000000000000000000000000000000000000
--- a/lustre/utils/llverdev.c
+++ /dev/null
@@ -1,553 +0,0 @@
-/*
- * Large Block Device Verification Tool.
- * This program is used to test whether the block device is correctly
- * handling IO beyond 2TB boundary.
- * This tool have two working modes
- * 1. full mode
- * 2. fast mode
- *	The full mode is basic mode in which program writes the test pattern
- * on entire disk. The test pattern (device offset and timestamp) is written
- * at the beginning of each 4kB block. When the whole device is full then
- * read operation is performed to verify that the test pattern is correct.
- *	In the fast mode the program writes data at the critical locations
- * of the device such as start of the device, before and after multiple of 1GB
- * offset and at the end.
- *	A chunk buffer with default size of 1MB is used to write and read test
- * pattern in bulk.
- */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#ifndef LUSTRE_UTILS
-#define LUSTRE_UTILS
-#endif
-#ifndef _LARGEFILE64_SOURCE
-#define _LARGEFILE64_SOURCE
-#endif
-#ifndef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
-#endif
-
-#include <features.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/ioctl.h>
-#include <sys/mount.h>
-#include <sys/time.h>
-#include <gnu/stubs.h>
-
-#ifdef HAVE_EXT2FS_EXT2FS_H
-#  include <ext2fs/ext2fs.h>
-#endif
-
-#define ONE_MB (1024 * 1024)
-#define ONE_GB (1024 * 1024 * 1024)
-#define HALF_MB (ONE_MB / 2)
-#define ONE_KB 1024
-#define HALF_KB (ONE_KB / 2)
-#define BLOCKSIZE 4096
-
-/* Structure for writting test pattern */
-struct block_data {
-	long long  bd_offset;
-	time_t  bd_time;
-};
-static char *progname;		/* name by which this program was run. */
-static unsigned verbose = 1;	/* prints offset in kB, operation rate */
-static int readoption;		/* run test in read-only (verify) mode */
-static int writeoption;		/* run test in write_only mode */
-const char *devname;		/* name of device to be tested. */
-static unsigned full = 1;	/* flag to full check */
-static int fd;
-static int isatty_flag;
-
-static struct option const longopts[] =
-{
-	{ "chunksize", required_argument, 0, 'c' },
-	{ "force", no_argument, 0, 'f' },
-	{ "help", no_argument, 0, 'h' },
-	{ "offset", required_argument, 0, 'o' },
-	{ "partial", required_argument, 0, 'p' },
-	{ "quiet", required_argument, 0, 'q' },
-	{ "read", no_argument, 0, 'r' },
-	{ "timestamp", required_argument, 0, 't' },
-	{ "verbose", no_argument, 0, 'v' },
-	{ "write", no_argument, 0, 'w' },
-	{ "long", no_argument, 0, 'l' },
-	{ 0, 0, 0, 0}
-};
-
-/*
- * Usage: displays help information, whenever user supply --help option in
- * command or enters incorrect command line.
- */
-void usage(int status)
-{
-	if (status != 0) {
-	      printf("\nUsage: %s [OPTION]... <device-name> ...\n",
-		     progname);
-	      printf("Block device verification tool.\n"
-		     "\t-t {seconds}, --timestamp, "
-		     "set test time  (default=current time())\n"
-		     "\t-o {offset}, --offset, "
-		     "offset in kB of start of test, default=0\n"
-		     "\t-r, --read run test in verify mode\n"
-		     "\t-w, --write run test in test-pattern mode, default=rw\n"
-		     "\t-v, --verbose\n"
-		     "\t-q, --quiet\n"
-		     "\t-l, --long, full check of device\n"
-		     "\t-p, --partial, for partial check (1GB steps)\n"
-		     "\t-c, --chunksize, IO chunk size, default=1048576\n"
-		     "\t-f, --force, force test to run without confirmation\n"
-		     "\t-h, --help display this help and exit\n");
-	}
-	exit(status);
-}
-
-/*
- * Open_dev: Opens device in specified mode and returns fd.
- */
-static int open_dev(const char *devname, int mode)
-{
-#ifdef HAVE_EXT2FS_EXT2FS_H
-	int	mount_flags;
-	char	mountpt[80] = "";
-
-	if (ext2fs_check_mount_point(devname, &mount_flags, mountpt,
-				     sizeof(mountpt))) {
-		fprintf(stderr, "%s: ext2fs_check_mount_point failed:%s",
-			progname, strerror(errno));
-		exit(1);
-	}
-	if (mount_flags & EXT2_MF_MOUNTED){
-		fprintf(stderr, "%s: %s is already mounted\n", progname,
-			devname);
-		exit(1);
-	}
-#endif
-	fd = open(devname, mode | O_EXCL | O_LARGEFILE);
-	if (fd < 0) {
-		fprintf(stderr, "%s: Open failed: %s",progname,strerror(errno));
-		exit(3);
-	}
-	return (fd);
-}
-
-#undef HAVE_BLKID_BLKID_H /* sigh, RHEL3 systems do not have libblkid.so.1 */
-#ifdef HAVE_BLKID_BLKID_H
-#include <blkid/blkid.h>
-#endif
-/*
- * sizeof_dev: Returns size of device in bytes
- */
-static loff_t sizeof_dev(int fd)
-{
-	loff_t numbytes;
-
-#ifdef HAVE_BLKID_BLKID_H
-	numbytes = blkid_get_dev_size(fd);
-	if (numbytes <= 0) {
-		fprintf(stderr, "%s: blkid_get_dev_size(%s) failed",
-			progname, devname);
-		return 1;
-	}
-	goto out;
-#else
-# if defined BLKGETSIZE64	/* in sys/mount.h */
-	if (ioctl(fd, BLKGETSIZE64, &numbytes) >= 0)
-		goto out;
-# endif
-# if defined BLKGETSIZE		/* in sys/mount.h */
-	{
-		unsigned long sectors;
-
-		if (ioctl(fd, BLKGETSIZE, &sectors) >= 0) {
-			numbytes = (loff_t)sectors << 9;
-			goto out;
-		}
-	}
-# endif
-	{
-		struct stat statbuf;
-
-		if (fstat(fd, &statbuf) == 0 && S_ISREG(statbuf.st_mode)) {
-			numbytes = statbuf.st_size;
-			goto out;
-		}
-	}
-	fprintf(stderr, "%s: unable to determine size of %s\n",
-			progname, devname);
-	return 0;
-#endif
-
-out:
-	if (verbose)
-		printf("%s: %s is %llu bytes (%g GB) in size\n",
-		       progname, devname,
-		       (unsigned long long)numbytes, (double)numbytes / ONE_GB);
-
-	return numbytes;
-}
-
-/*
- * Verify_chunk: Verifies test pattern in each 4kB (BLOCKSIZE) is correct.
- * Returns 0 if test offset and timestamp is correct otherwise 1.
- */
-int verify_chunk(char *chunk_buf, size_t chunksize,
-		 unsigned long long chunk_off, time_t time_st)
-{
-	struct block_data *bd;
-	char *chunk_end;
-
-	for (chunk_end = chunk_buf + chunksize - sizeof(*bd);
-	     (char *)chunk_buf < chunk_end;
-	     chunk_buf += BLOCKSIZE, chunk_off += BLOCKSIZE) {
-		bd = (struct block_data *)chunk_buf;
-		if ((bd->bd_offset == chunk_off) && (bd->bd_time == time_st))
-			continue;
-
-		fprintf(stderr, "\n%s: verify failed at offset/timestamp "
-			"%llu/%lu: found %llu/%lu instead\n", progname,
-			chunk_off, time_st, bd->bd_offset, bd->bd_time);
-		return 1;
-	}
-	return 0;
-}
-
-/*
- * fill_chunk: Fills the chunk with current or user specified timestamp
- * and  offset. The test patters is filled at the beginning of
- * each 4kB(BLOCKSIZE) blocks in chunk_buf.
- */
-void fill_chunk(char *chunk_buf, size_t chunksize, loff_t chunk_off,
-		time_t time_st)
-{
-	struct block_data *bd;
-	char *chunk_end;
-
-	for (chunk_end = chunk_buf + chunksize - sizeof(*bd);
-	     (char *)chunk_buf < chunk_end;
-	     chunk_buf += BLOCKSIZE, chunk_off += BLOCKSIZE) {
-		bd = (struct block_data *)chunk_buf;
-		bd->bd_offset = chunk_off;
-		bd->bd_time = time_st;
-	}
-}
-
-void show_rate(char *op, unsigned long long offset, unsigned long long *count)
-{
-	static time_t last;
-	time_t now;
-	double diff;
-
-	now = time(NULL);
-	diff = now - last;
-
-	if (diff > 4) {
-		if (last != 0) {
-			if (isatty_flag)
-				printf("\r");
-			printf("%s offset: %14llukB %5g MB/s            ", op,
-			       offset / ONE_KB, (double)(*count) /ONE_MB /diff);
-			if (isatty_flag)
-				fflush(stdout);
-			else
-				printf("\n");
-
-			*count = 0;
-		}
-		last = now;
-	}
-}
-
-/*
- * write_chunk: write the chunk_buf on the device. The number of write
- * operations are based on the parameters write_end, offset, and chunksize.
- */
-int write_chunks(unsigned long long offset, unsigned long long write_end,
-		 char *chunk_buf, size_t chunksize, time_t time_st)
-{
-	unsigned long long stride, count = 0;
-
-	stride = full ? chunksize : (ONE_GB - chunksize);
-
-	for (offset = offset & ~(chunksize - 1); offset < write_end;
-	     offset += stride) {
-		if (lseek64(fd, offset, SEEK_SET) == -1) {
-			fprintf(stderr, "\n%s: lseek64(%llu) failed: %s\n",
-				progname, offset, strerror(errno));
-			return 1;
-		}
-		if (offset + chunksize > write_end)
-			chunksize = write_end - offset;
-
-		if (!full && offset > chunksize) {
-			fill_chunk(chunk_buf, chunksize, offset, time_st);
-			if (write(fd, chunk_buf, chunksize) < 0) {
-				fprintf(stderr, "\n%s: write %llu failed: %s\n",
-					progname, offset, strerror(errno));
-				return 1;
-			}
-			offset += chunksize;
-			if (offset + chunksize > write_end)
-				chunksize = write_end - offset;
-		}
-
-		fill_chunk(chunk_buf, chunksize, offset, time_st);
-		if (write(fd, chunk_buf, chunksize) < 0) {
-			fprintf(stderr, "\n%s: write %llu failed: %s\n",
-				progname, offset, strerror(errno));
-			return 1;
-		}
-
-		count += chunksize;
-		if (verbose > 1)
-			show_rate("write", offset, &count);
-	}
-	if (verbose > 1) {
-		show_rate("write", offset, &count);
-		printf("\nwrite complete\n");
-	}
-	if (fsync(fd) == -1) {
-		fprintf(stderr, "%s: fsync faild: %s\n", progname,
-			strerror(errno));
-			return 1;
-	}
-	return 0;
-}
-
-/*
- * read_chunk: reads the chunk_buf from the device. The number of read
- * operations are based on the parameters read_end, offset, and chunksize.
- */
-int read_chunks(unsigned long long offset, unsigned long long read_end,
-		char *chunk_buf, size_t chunksize, time_t time_st)
-{
-	unsigned long long stride, count = 0;
-
-	stride = full ? chunksize : (ONE_GB - chunksize);
-
-	if (ioctl(fd, BLKFLSBUF, 0) < 0 && verbose)
-		fprintf(stderr, "%s: ioctl BLKFLSBUF failed: %s (ignoring)\n",
-			progname, strerror(errno));
-
-	for (offset = offset & ~(chunksize - 1); offset < read_end;
-	     offset += stride) {
-		if (lseek64(fd, offset, SEEK_SET) == -1) {
-			fprintf(stderr, "\n%s: lseek64(%llu) failed: %s\n",
-				progname, offset, strerror(errno));
-			return 1;
-		}
-		if (offset + chunksize > read_end)
-			chunksize = read_end - offset;
-
-		if (!full && offset > chunksize) {
-			if (read (fd, chunk_buf, chunksize) < 0) {
-				fprintf(stderr, "\n%s: read %llu failed: %s\n",
-					progname, offset, strerror(errno));
-				return 1;
-			}
-			if (verify_chunk(chunk_buf, chunksize, offset,
-					 time_st) != 0)
-				return 1;
-			offset += chunksize;
-			if (offset + chunksize >= read_end)
-				chunksize = read_end - offset;
-		}
-
-		if (read(fd, chunk_buf, chunksize) < 0) {
-			fprintf(stderr, "\n%s: read failed: %s\n", progname,
-				strerror(errno));
-			return 1;
-		}
-
-		if (verify_chunk(chunk_buf, chunksize, offset, time_st) != 0)
-			return 1;
-
-		count += chunksize;
-		if (verbose > 1)
-			show_rate("read", offset, &count);
-	}
-	if (verbose > 1) {
-		show_rate("read", offset, &count);
-		printf("\nread complete\n");
-	}
-	return 0;
-}
-
-int main(int argc, char **argv)
-{
-	time_t time_st = 0;		/* Default timestamp */
-	long long offset = 0, offset_orig; /* offset in kB */
-	size_t chunksize = ONE_MB;	/* IO chunk size */
-	char *chunk_buf = NULL;
-	unsigned int force = 0;		/* run test run without confirmation*/
-	unsigned long long dev_size = 0;
-	char yesno[4];
-	int mode = O_RDWR;		/* mode which device should be opened */
-	int error = 0, c;
-
-	progname = strrchr(argv[0], '/') == NULL ?
-		argv[0] : strrchr(argv[0], '/') + 1;
-	while ((c = getopt_long(argc, argv, "c:fhlo:pqrt:vw", longopts,
-				NULL)) != -1) {
-		switch (c) {
-		case 'c':
-			chunksize = (strtoul(optarg, NULL, 0) * ONE_MB);
-			if (!chunksize) {
-				fprintf(stderr, "%s: chunk size value should be"
-					"nonzero and multiple of 1MB\n",
-					progname);
-				return -1;
-			}
-			break;
-		case 'f':
-			force = 1;
-			break;
-		case 'l':
-			full = 1;
-			break;
-		case 'o':
-			offset = strtoull(optarg, NULL, 0) * ONE_KB;
-			break;
-		case 'p':
-			full = 0;
-			break;
-		case 'q':
-			verbose = 0;
-			break;
-		case 'r':
-			readoption = 1;
-			mode = O_RDONLY;
-			break;
-		case 't':
-			time_st = (time_t)strtoul(optarg, NULL, 0);
-			break;
-		case 'v':
-			verbose++;
-			break;
-		case 'w':
-			writeoption = 1;
-			mode = O_WRONLY;
-			break;
-		case 'h':
-		default:
-			usage (1);
-			return 0;
-		}
-	}
-	offset_orig = offset;
-	devname = argv[optind];
-	if (!devname) {
-		fprintf(stderr, "%s: device name not given\n", progname);
-		usage (1);
-		return -1;
-	}
-
-	if (readoption && writeoption)
-		mode = O_RDWR;
-	if (!readoption && !writeoption) {
-		readoption = 1;
-		writeoption = 1;
-	}
-
-	if (!force && writeoption) {
-		printf("%s: permanently overwrite all data on %s (yes/no)? ",
-		       progname, devname);
-		scanf("%3s", yesno);
-		if (!(strcasecmp("yes", yesno) || strcasecmp("y", yesno))) {
-			printf("Not continuing due to '%s' response", yesno);
-			return 0;
-		}
-	}
-
-	if (!writeoption && time_st == 0) {
-		fprintf(stderr, "%s: must give timestamp for read-only test\n",
-			progname);
-		usage(1);
-	}
-
-	fd = open_dev(devname, mode);
-	dev_size = sizeof_dev(fd);
-	if (!dev_size) {
-		fprintf(stderr, "%s: cannot test on device size < 1MB\n",
-			progname);
-		error = 7;
-		goto close_dev;
-	}
-
-	if (dev_size < (offset * 2)) {
-		fprintf(stderr, "%s: device size %llu < offset %llu\n",
-			progname, dev_size, offset);
-		error = 6;
-		goto close_dev;
-	}
-	if (!time_st)
-		(void)time(&time_st);
-
-	isatty_flag = isatty(STDOUT_FILENO);
-
-	if (verbose)
-		printf("Timestamp: %lu\n", time_st);
-
-	chunk_buf = (char *)calloc(chunksize, 1);
-	if (chunk_buf == NULL) {
-		fprintf(stderr, "%s: memory allocation failed for chunk_buf\n",
-			progname);
-		error = 4;
-		goto close_dev;
-	}
-	if (writeoption) {
-		if (write_chunks(offset, dev_size, chunk_buf, chunksize,
-				 time_st)) {
-			error = 3;
-			goto chunk_buf;
-		}
-		if (!full) {  /* end of device aligned to a block */
-			offset = ((dev_size - chunksize + BLOCKSIZE - 1) &
-				  ~(BLOCKSIZE - 1));
-			if (write_chunks(offset, dev_size, chunk_buf, chunksize,
-					 time_st)) {
-				error = 3;
-				goto chunk_buf;
-			}
-		}
-		offset = offset_orig;
-	}
-	if (readoption) {
-		if (read_chunks(offset, dev_size, chunk_buf, chunksize,
-				time_st)) {
-			error = 2;
-			goto chunk_buf;
-		}
-		if (!full) { /* end of device aligned to a block */
-			offset = ((dev_size - chunksize + BLOCKSIZE - 1) &
-				  ~(BLOCKSIZE - 1));
-			if (read_chunks(offset, dev_size, chunk_buf, chunksize,
-					time_st)) {
-				error = 2;
-				goto chunk_buf;
-			}
-		}
-		if (verbose)
-			printf("\n%s: data verified successfully\n", progname);
-	}
-	error = 0;
-chunk_buf:
-	free(chunk_buf);
-close_dev:
-	close(fd);
-	return error;
-}
diff --git a/lustre/utils/llverfs.c b/lustre/utils/llverfs.c
deleted file mode 100644
index e1e9e3c27b2736f59e663e6141ec27dd707ede82..0000000000000000000000000000000000000000
--- a/lustre/utils/llverfs.c
+++ /dev/null
@@ -1,650 +0,0 @@
-/*
- * ext3 Filesystem Verification Tool.
- * This program tests the correct operation of ext3 filesystem.
- * This tool have two working modes
- * 1. full mode
- * 2. fast mode
- *	The full mode is basic mode in which program creates a subdirectory
- * in the test fileysytem, writes n(files_in_dir, default=16) large(4GB) files
- * to the directory with the test pattern at the start of each 4kb block.
- * The test pattern contains timestamp, relative file offset and per file
- * unique idenfifier(inode number). this continues until whole filesystem is
- * full and then this tooll verifies that the data in all of the test files
- * is correct.
- *	In the fast mode the tool creates a test directories with
- * EXT3_TOPDIR_FL flag set. the number of directories equals to the number
- * of block groups in the filesystem(e.g. 65536 directories for 8TB filesystem)
- * and then writes a single 1MB file in each directory. The tool then verifies
- * that the data in each file is correct.
- */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-#ifndef LUSTRE_UTILS
-#define LUSTRE_UTILS
-#endif
-#ifndef _LARGEFILE64_SOURCE
-#define _LARGEFILE64_SOURCE
-#endif
-#ifndef _FILE_OFFSET_BITS
-#define _FILE_OFFSET_BITS 64
-#endif
-
-#include <features.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <limits.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <getopt.h>
-#include <time.h>
-#include <dirent.h>
-#include <mntent.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/vfs.h>
-#include <gnu/stubs.h>
-#include <gnu/stubs.h>
-
-#ifdef HAVE_EXT2FS_EXT2FS_H
-#  include <e2p/e2p.h>
-#  include <ext2fs/ext2fs.h>
-#endif
-
-#define ONE_MB (1024 * 1024)
-#define ONE_GB ((unsigned long long)(1024 * 1024 * 1024))
-#define BLOCKSIZE 4096
-
-/* Structure for writing test pattern */
-struct block_data {
-	unsigned long long bd_offset;
-	unsigned long long bd_time;
-	unsigned long long bd_inode;
-};
-static char *progname;		    /* name by which this program was run. */
-static unsigned verbose = 1;	    /* prints offset in kB, operation rate */
-static int readoption;		    /* run test in read-only (verify) mode */
-static int writeoption;		    /* run test in write_only mode */
-char *testdir;			    /* name of device to be tested. */
-static unsigned full = 1;	    /* flag to full check */
-static int errno_local;		    /* local copy of errno */
-static unsigned long num_files;     /* Total number of files for read/write */
-static loff_t file_size = 4*ONE_GB; /* Size of each file */
-static unsigned files_in_dir = 32;  /* number of files in each directioy */
-static unsigned num_dirs = 30000;   /* total number of directories */
-const int dirmode = S_IRWXU | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
-static int fd = -1;
-static int isatty_flag;
-static int perms =  S_IRWXU | S_IRGRP | S_IROTH;
-
-static struct option const longopts[] =
-{
-	{ "chunksize", required_argument, 0, 'c' },
-	{ "help", no_argument, 0, 'h' },
-	{ "offset", required_argument, 0, 'o' },
-	{ "long", no_argument, 0, 'l' },
-	{ "partial", required_argument, 0, 'p' },
-	{ "quiet", required_argument, 0, 'q' },
-	{ "read", no_argument, 0, 'r' },
-	{ "timestamp", required_argument, 0, 't' },
-	{ "verbose", no_argument, 0, 'v' },
-	{ "write", no_argument, 0, 'w' },
-	{ 0, 0, 0, 0}
-};
-
-/*
- * Usages: displays help information, whenever user supply --help option in
- * command or enters incorrect command line.
- */
-void usage(int status)
-{
-	if (status != 0)
-	{
-	      printf("\nUsage: %s [OPTION]... <filesystem path> ...\n",
-			progname);
-	      printf("ext3 filesystem verification tool.\n"
-		  "\t-t {seconds} for --timestamp,  set test time"
-		  "(default=current time())\n"
-		  "\t-o {offset}  for --offset, directory starting offset"
-		  " from which tests should start\n"
-		  "\t-r run test in read (verify) mode\n"
-		  "\t-w run test in write (test-pattern) mode (default=r&w)\n"
-		  "\t-v for verbose\n"
-		  "\t-p for --partial, for partial check (1MB files)\n"
-		  "\t-l for --long, full check (4GB file with 4k blocks)\n"
-		  "\t-c for --chunksize, IO chunk size (default=1048576)\n"
-		  "\t-h display this help and exit\n"
-		  "\t--help display this help and exit\n");
-	}
-	exit(status);
-}
-
-/*
- * open_file: Opens file in specified mode and returns fd.
- */
-static int open_file(const char *file, int flag)
-{
-	fd = open(file, flag, perms);
-	if (fd < 0) {
-		fprintf(stderr, "\n%s: Open '%s' failed:%s\n",
-			progname, file, strerror(errno));
-		exit(3);
-	}
-	return (fd);
-}
-
-/*
- * Verify_chunk: Verifies test pattern in each 4kB (BLOCKSIZE) is correct.
- * Returns 0 if test offset and timestamp is correct otherwise 1.
- */
-int verify_chunk(char *chunk_buf, size_t chunksize,unsigned long long chunk_off,
-		 unsigned long long time_st, unsigned long long inode_st,
-		 char *file)
-{
-	struct block_data *bd;
-	char *chunk_end;
-
-	for (chunk_end = chunk_buf + chunksize - sizeof(*bd);
-	     (char *)chunk_buf < chunk_end;
-	     chunk_buf += BLOCKSIZE, chunk_off += BLOCKSIZE) {
-		bd = (struct block_data *)chunk_buf;
-		if ((bd->bd_offset == chunk_off) && (bd->bd_time == time_st) &&
-		    (bd->bd_inode == inode_st))
-			continue;
-		fprintf(stderr,"\n%s: verify %s failed offset/timestamp/inode "
-			"%llu/%llu/%llu: found %llu/%llu/%llu instead\n",
-			progname, file, chunk_off, time_st, inode_st,
-			bd->bd_offset, bd->bd_time, bd->bd_inode);
-		return 1;
-	}
-	return 0;
-}
-
-/*
- * fill_chunk: Fills the chunk with current or user specified timestamp
- * and  offset. The test patters is filled at the beginning of
- * each 4kB(BLOCKSIZE) blocks in chunk_buf.
- */
-void fill_chunk(char *chunk_buf, size_t chunksize, loff_t chunk_off,
-		time_t time_st, ino_t inode_st)
-{
-	struct block_data *bd;
-	char *chunk_end;
-
-	for (chunk_end = chunk_buf + chunksize - sizeof(*bd);
-	     (char *)chunk_buf < chunk_end;
-	     chunk_buf += BLOCKSIZE, chunk_off += BLOCKSIZE) {
-		bd = (struct block_data *)chunk_buf;
-		bd->bd_offset = chunk_off;
-		bd->bd_time = time_st;
-		bd->bd_inode = inode_st;
-	}
-}
-
-/*
- * write_chunk: write the chunk_buf on the device. The number of write
- * operations are based on the parameters write_end, offset, and chunksize.
- */
-int write_chunks(int fd, unsigned long long offset,unsigned long long write_end,
-		 char *chunk_buf, size_t chunksize, time_t time_st,
-		 ino_t inode_st, const char *file)
-{
-	unsigned long long stride;
-
-	stride = full ? chunksize : (ONE_GB - chunksize);
-	for (offset = offset & ~(chunksize - 1); offset < write_end;
-	     offset += stride) {
-		if (lseek64(fd, offset, SEEK_SET) == -1) {
-			fprintf(stderr, "\n%s: lseek64(%s+%llu) failed: %s\n",
-				progname, file, offset, strerror(errno));
-			return 1;
-		}
-		if (offset + chunksize > write_end)
-			chunksize = write_end - offset;
-		if (!full && offset > chunksize) {
-			fill_chunk(chunk_buf, chunksize, offset, time_st,
-				    inode_st);
-			if (write(fd, chunk_buf, chunksize) < 0) {
-				if (errno == ENOSPC) {
-					errno_local = errno;
-					return 0;
-				}
-				fprintf(stderr,
-					"\n%s: write %s+%llu failed: %s\n",
-					progname, file, offset,strerror(errno));
-				return errno;
-			}
-			offset += chunksize;
-			if (offset + chunksize > write_end)
-				chunksize = write_end - offset;
-		}
-		fill_chunk(chunk_buf, chunksize, offset, time_st, inode_st);
-		if (write(fd, (char *) chunk_buf, chunksize) < 0) {
-			if (errno == ENOSPC) {
-				errno_local = errno;
-				return 0;
-			}
-			fprintf(stderr, "\n%s: write %s+%llu failed: %s\n",
-				progname, file, offset, strerror(errno));
-			return 1;
-		}
-	}
-	return 0;
-}
-
-/*
- * read_chunk: reads the chunk_buf from the device. The number of read
- * operations are based on the parameters read_end, offset, and chunksize.
- */
-int read_chunks(int fd, unsigned long long offset, unsigned long long read_end,
-		char *chunk_buf, size_t chunksize, time_t time_st,
-		ino_t inode_st, char *file)
-{
-	unsigned long long stride;
-
-	stride = full ? chunksize : (ONE_GB - chunksize);
-	for (offset = offset & ~(chunksize - 1); offset < read_end;
-	     offset += stride) {
-		if (lseek64(fd, offset, SEEK_SET) == -1) {
-			fprintf(stderr, "\n%s: lseek64(%s+%llu) failed: %s\n",
-				progname, file, offset, strerror(errno));
-			return 1;
-		}
-		if (offset + chunksize > read_end)
-			chunksize = read_end - offset;
-		if (!full && offset > chunksize) {
-			if (read(fd, chunk_buf, chunksize) < 0) {
-				fprintf(stderr,
-					"\n%s: read %s+%llu failed: %s\n",
-					progname, file, offset,strerror(errno));
-				return 1;
-			}
-			if (verify_chunk(chunk_buf, chunksize, offset,
-					 time_st, inode_st, file) != 0)
-				return 1;
-			offset += chunksize;
-			if (offset + chunksize >= read_end)
-				chunksize = read_end - offset;
-		}
-		if (read(fd, chunk_buf, chunksize) < 0) {
-			fprintf(stderr, "\n%s: read %s+%llu failed: %s\n",
-				progname, file, offset, strerror(errno));
-			return 1;
-		}
-		if (verify_chunk(chunk_buf, chunksize, offset, time_st,
-				 inode_st, file) != 0)
-			return 1;
-	}
-	return 0;
-}
-
-/*
- * new_file: prepares new filename using file counter and current dir.
- */
-char *new_file(char *tempfile, char *cur_dir, int file_num)
-{
-	sprintf(tempfile, "%s/file%03d", cur_dir, file_num);
-	return tempfile;
-}
-
-/*
- * new_dir: prepares new dir name using dir counters.
- */
-char *new_dir(char *tempdir, int dir_num)
-{
-	sprintf(tempdir, "%s/dir%05d", testdir, dir_num);
-	return tempdir;
-}
-
-/*
- * show_filename: Displays name of current file read/write
- */
-void show_filename(char *op, char *filename)
-{
-	static time_t last;
-	time_t now;
-	double diff;
-
-	now = time(NULL);
-	diff = now - last;
-	if (diff > 4 || verbose > 2) {
-		if (isatty_flag)
-			printf("\r");
-		printf("%s File name: %s          ", op, filename);
-		if (isatty_flag)
-			fflush(stdout);
-		else
-			printf("\n");
-		last = now;
-	}
-}
-
-/*
- * dir_write: This function writes directories and files on device.
- * it works for both full and fast modes.
- */
-static int dir_write(char *chunk_buf, size_t chunksize,
-		     time_t time_st, unsigned long dir_num)
-{
-	char tempfile[PATH_MAX];
-	char tempdir[PATH_MAX];
-	struct stat64 file;
-	int file_num = 999999999;
-	ino_t inode_st = 0;
-
-#ifdef HAVE_EXT2FS_EXT2FS_H
-	if (!full && fsetflags(testdir, EXT2_TOPDIR_FL))
-		fprintf(stderr,
-			"\n%s: can't set TOPDIR_FL on %s: %s (ignoring)\n",
-			progname, testdir, strerror(errno));
-#endif
-	for (; dir_num < num_dirs; num_files++, file_num++) {
-		if (file_num >= files_in_dir) {
-			if (dir_num == num_dirs - 1)
-				break;
-
-			file_num = 0;
-			if (mkdir(new_dir(tempdir, dir_num), dirmode) < 0) {
-				if (errno == ENOSPC)
-					break;
-				if (errno != EEXIST) {
-					fprintf(stderr, "\n%s: mkdir %s : %s\n",
-						progname, tempdir,
-						strerror(errno));
-					return 1;
-				}
-			}
-			dir_num++;
-		}
-		fd = open_file(new_file(tempfile, tempdir, file_num),
-			       O_WRONLY | O_CREAT | O_TRUNC | O_LARGEFILE);
-
-		if (fd >= 0 && fstat64(fd, &file) == 0) {
-			inode_st = file.st_ino;
-		} else {
-			fprintf(stderr, "\n%s: write stat64 to file %s: %s",
-				progname, tempfile, strerror(errno));
-			exit(1);
-		}
-
-		if (verbose > 1)
-			show_filename("write", tempfile);
-
-		if (write_chunks(fd, 0, file_size, chunk_buf, chunksize,
-				 time_st, inode_st, tempfile)) {
-			close(fd);
-			return 1;
-		}
-		close(fd);
-
-		if (errno_local == ENOSPC)
-			break;
-	}
-
-	if (verbose) {
-		verbose++;
-		show_filename("write", tempfile);
-		printf("\nwrite complete\n");
-		verbose--;
-	}
-
-	return 0;
-}
-
-/*
- * dir_read: This function reads directories and files on device.
- * it works for both full and fast modes.
- */
-static int dir_read(char *chunk_buf, size_t chunksize,
-		    time_t time_st, unsigned long dir_num)
-{
-	char tempfile[PATH_MAX];
-	char tempdir[PATH_MAX];
-	unsigned long count = 0;
-	struct stat64 file;
-	int file_num = 0;
-	ino_t inode_st = 0;
-
-	for (count = 0; count < num_files && dir_num < num_dirs; count++) {
-		if (file_num == 0) {
-			if (dir_num == num_dirs - 1)
-				break;
-
-			new_dir(tempdir, dir_num);
-			dir_num++;
-		}
-
-		fd = open_file(new_file(tempfile, tempdir, file_num),
-			       O_RDONLY | O_LARGEFILE);
-		if (fd >= 0 && fstat64(fd, &file) == 0) {
-			inode_st = file.st_ino;
-		} else {
-			fprintf(stderr, "\n%s: read stat64 file '%s': %s\n",
-				progname, tempfile, strerror(errno));
-			return 1;
-		}
-
-		if (verbose > 1)
-			show_filename("read", tempfile);
-
-		if (count == num_files)
-			file_size = file.st_size;
-		if (read_chunks(fd, 0, file_size, chunk_buf, chunksize,
-				time_st, inode_st, tempfile)) {
-			close(fd);
-			return 1;
-		}
-		close(fd);
-
-		if (++file_num >= files_in_dir)
-			file_num = 0;
-	}
-	if (verbose > 1){
-		verbose++;
-		show_filename("read", tempfile);
-		printf("\nread complete\n");
-		verbose--;
-	}
-	return 0;
-}
-
-int main(int argc, char **argv)
-{
-	time_t time_st = 0;		/* Default timestamp */
-	size_t chunksize = ONE_MB;	/* IO chunk size(defailt=1MB) */
-	char *chunk_buf;		/* chunk buffer */
-	int error = 0;
-	FILE *countfile = NULL;
-	char filecount[PATH_MAX];
-	unsigned long dir_num = 0, dir_num_orig = 0;/* starting directory */
-	char c;
-
-	progname = strrchr(argv[0], '/') ? strrchr(argv[0], '/') + 1 : argv[0];
-	while ((c = (char)getopt_long(argc, argv, "t:rwvplo:h",
-				      longopts, NULL)) != -1) {
-		switch (c) {
-		case 'c':
-			chunksize = (strtoul(optarg, NULL, 0) * ONE_MB);
-			if (!chunksize) {
-				fprintf(stderr, "%s: Chunk size value should be"
-					"a multiple of 1MB\n", progname);
-				return -1;
-			}
-			break;
-		case 'l':
-			full = 1;
-			break;
-		case 'o': /* offset */
-			dir_num = strtoul(optarg, NULL, 0);
-			break;
-		case 'p':
-			full = 0;
-			break;
-		case 'q':
-			verbose = 0;
-			break;
-		case 'r':
-			readoption = 1;
-			break;
-		case 't':
-			time_st = (time_t)strtoul(optarg, NULL, 0);
-			break;
-		case 'w':
-			writeoption = 1;
-			break;
-		case 'v':
-			verbose++;
-			break;
-
-		case 'h':
-		default:
-			usage(1);
-			return 0;
-		}
-	}
-	testdir = argv[optind];
-
-	if (!testdir) {
-		fprintf(stderr, "%s: pathname not given\n", progname);
-		usage(1);
-		return -1;
-	}
-	if (!readoption && !writeoption) {
-		readoption = 1;
-		writeoption = 1;
-	}
-	if (!time_st)
-		(void) time(&time_st);
-	printf("Timestamp: %lu\n", (unsigned long )time_st);
-	isatty_flag = isatty(STDOUT_FILENO);
-
-	if (!full) {
-#ifdef HAVE_EXT2FS_EXT2FS_H
-		struct mntent *tempmnt;
-		FILE *fp = NULL;
-		ext2_filsys fs;
-
-		if ((fp = setmntent("/etc/mtab", "r")) == NULL){
-			fprintf(stderr, "%s: fail to open /etc/mtab in read"
-				"mode :%s\n", progname, strerror(errno));
-			goto guess;
-		}
-
-		/* find device name using filesystem */
-		while ((tempmnt = getmntent(fp)) != NULL) {
-			if (strcmp(tempmnt->mnt_dir, testdir) == 0)
-				break;
-		}
-
-		if (tempmnt == NULL) {
-			fprintf(stderr, "%s: no device found for '%s'\n",
-				progname, testdir);
-			endmntent(fp);
-			goto guess;
-		}
-
-		if (ext2fs_open(tempmnt->mnt_fsname, 0, 0, 0,
-				unix_io_manager, &fs)) {
-			fprintf(stderr, "%s: unable to open ext3 fs on '%s'\n",
-				progname, testdir);
-			endmntent(fp);
-			goto guess;
-		}
-		endmntent(fp);
-
-		num_dirs = (fs->super->s_blocks_count +
-			    fs->super->s_blocks_per_group - 1) /
-			fs->super->s_blocks_per_group;
-		if (verbose)
-			printf("ext3 block groups: %u, fs blocks: %u "
-			       "blocks per group: %u\n",
-			       num_dirs, fs->super->s_blocks_count,
-			       fs->super->s_blocks_per_group);
-		ext2fs_close(fs);
-#else
-                goto guess;
-#endif
-		if (0) { /* ugh */
-			struct statfs64 statbuf;
-		guess:
-			if (statfs64(testdir, &statbuf) == 0) {
-				num_dirs = (long long)statbuf.f_blocks *
-					statbuf.f_bsize / (128ULL << 20);
-				if (verbose)
-					printf("dirs: %u, fs blocks: %llu\n",
-					       num_dirs,
-					       (long long)statbuf.f_blocks);
-			} else {
-				fprintf(stderr, "%s: unable to stat '%s': %s\n",
-					progname, testdir, strerror(errno));
-				if (verbose)
-					printf("dirs: %u\n", num_dirs);
-			}
-		}
-
-		file_size = ONE_MB;
-		chunksize = ONE_MB;
-		files_in_dir = 1;
-	}
-	chunk_buf = (char *)calloc(chunksize, 1);
-	if (chunk_buf == NULL) {
-		fprintf(stderr, "Memory allocation failed for chunk_buf\n");
-		return 4;
-	}
-	sprintf(filecount, "%s/%s.filecount", testdir, progname);
-	if (writeoption) {
-		(void)mkdir(testdir, dirmode);
-
-		unlink(filecount);
-		if (dir_num != 0) {
-			num_files = dir_num * files_in_dir;
-			if (verbose)
-				printf("\n%s: %lu files already written\n",
-				       progname, num_files);
-		}
-		if (dir_write(chunk_buf, chunksize, time_st, dir_num)) {
-			error = 3;
-			goto out;
-		}
-		countfile = fopen(filecount, "w");
-		if (countfile != NULL) {
-			if (fprintf(countfile, "%lu", num_files) < 1 ||
-			    fflush(countfile) != 0) {
-				fprintf(stderr, "\n%s: writing %s failed :%s\n",
-					progname, filecount, strerror(errno));
-			}
-			fclose(countfile);
-		}
-		dir_num = dir_num_orig;
-	}
-	if (readoption) {
-		if (!writeoption) {
-			countfile = fopen(filecount, "r");
-			if (countfile == NULL ||
-			    fscanf(countfile, "%lu", &num_files) != 1) {
-				fprintf(stderr, "\n%s: reading %s failed :%s\n",
-					progname, filecount, strerror(errno));
-				num_files = num_dirs * files_in_dir;
-			} else {
-				num_files -= (dir_num * files_in_dir);
-			}
-			if (countfile)
-				fclose(countfile);
-		}
-		if (dir_read(chunk_buf, chunksize, time_st, dir_num)) {
-			fprintf(stderr, "\n%s: Data verification failed\n",
-				progname) ;
-			error = 2;
-			goto out;
-		}
-	}
-	error = 0;
-out:
-	free(chunk_buf);
-	return error;
-}
diff --git a/lustre/utils/loadgen.c b/lustre/utils/loadgen.c
deleted file mode 100644
index 4ba3dcd91a67e75f809fb1554bc920e644e780c2..0000000000000000000000000000000000000000
--- a/lustre/utils/loadgen.c
+++ /dev/null
@@ -1,1037 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * loadgen.c
- * See how many local OSCs we can start whaling on a OST
- * We're doing direct ioctls instead of going though a system() call to lctl
- * to avoid the bash overhead.
- * Adds an osc / echo client pair in each thread and starts echo transactions.
- *
- */
-
-#include <pthread.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <signal.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/wait.h>
-#include <time.h>
-#include <sys/time.h>
-
-#include <lnet/lnetctl.h>
-#include "parser.h"
-#include "obdctl.h"
-
-static char cmdname[512];
-static char target[64] = "";
-char nid[64] = "";
-static int live_threads = 0;
-static int sig_received = 0;
-static int o_verbose = 4; /* 0-5 */
-static int my_oss = 0;
-static int my_ecs = 0;
-
-static int jt_quit(int argc, char **argv) {
-        Parser_quit(argc, argv);
-        return 0;
-}
-
-static int loadgen_usage(int argc, char **argv)
-{
-        if (argc == 1) {
-                fprintf(stderr, 
-        "This is a test program used to simulate large numbers of\n"
-        "clients.  The echo obds are used, so the obdecho module must\n"
-        "be loaded.\n"
-        "Typical usage would be:\n"
-        "  loadgen> dev lustre-OST0000       set the target device\n"
-        "  loadgen> start 20                 start 20 echo clients\n"
-        "  loadgen> wr 10 5                  have 10 clients do the brw_write\n"
-        "                                      test 5 times each\n"
-                        );
-        }
-        return (Parser_help(argc, argv));
-}
-
-static int loadgen_verbose(int argc, char **argv);
-static int loadgen_target(int argc, char **argv);
-static int loadgen_start_echosrv(int argc, char **argv);
-static int loadgen_start_clients(int argc, char **argv);
-static int loadgen_wait(int argc, char **argv);
-static int loadgen_write(int argc, char **argv);
-
-command_t cmdlist[] = {
-        {"device", loadgen_target, 0,
-         "set target ost name (e.g. lustre-OST0000)\n"
-         "usage: device <name> [<nid>]"},
-        {"dl", jt_obd_list, 0, "show all devices\n"
-         "usage: dl"},
-        {"echosrv", loadgen_start_echosrv, 0, "start an echo server\n"},
-        {"start", loadgen_start_clients, 0, "set up echo clients\n"
-         "usage: start_clients <num>"},
-        {"verbose", loadgen_verbose, 0, "set verbosity level 0-5\n"
-         "usage: verbose <level>"},
-        {"wait", loadgen_wait, 0,
-         "wait for all threads to finish\n"},
-        {"write", loadgen_write, 0,
-         "start a test_brw write test on X clients for Y iterations\n"
-         "usage: write <num_clients> <num_iter> [<delay>]"},
-
-        /* User interface commands */
-        {"help", loadgen_usage, 0, "help"},
-        {"exit", jt_quit, 0, "quit"},
-        {"quit", jt_quit, 0, "quit"},
-        { 0, 0, 0, NULL }
-};
-
-
-/* Command flags */
-#define C_STOP           0x0001
-#define C_CREATE_EVERY   0x0002  /* destroy and recreate every time */
-#define C_READ           0x0004
-#define C_WRITE          0x0008
-
-struct command_t {
-        int           c_flags;
-        int           c_rpt;
-        int           c_delay;
-};
-
-struct kid_t {
-        struct command_t k_cmd;
-        struct kid_t    *k_next;
-        pthread_t        k_pthread;
-        __u64            k_objid;
-        int              k_id;
-        int              k_dev;
-};
-
-static struct kid_t *kid_list = NULL;
-
-static struct kid_t *push_kid(int tnum)
-{
-        struct kid_t *kid;
-        kid = (struct kid_t *)calloc(1, sizeof(struct kid_t));
-        if (kid == NULL) {
-                fprintf(stderr, "malloc failure\n");
-                return NULL;
-        }
-        kid->k_pthread = pthread_self();
-        kid->k_next = kid_list;
-        kid->k_id = tnum;
-        kid_list = kid;
-        live_threads++;
-        return kid;
-}
-
-int trigger_count = 0;
-int waiting_count = 0;
-int timer_on = 0;
-int all_done = 1;
-struct timeval trigger_start;
-struct command_t trigger_cmd;
-pthread_mutex_t m_trigger = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t cv_trigger = PTHREAD_COND_INITIALIZER;
-
-unsigned long long write_bytes;
-pthread_mutex_t m_count = PTHREAD_MUTEX_INITIALIZER;
-
-static void trigger(int command, int threads, int repeat, int delay)
-{
-
-        pthread_mutex_lock(&m_trigger);
-        trigger_cmd.c_flags = command;
-        trigger_cmd.c_rpt = repeat;
-        trigger_cmd.c_delay = delay;
-        trigger_count = threads;
-        if (o_verbose > 4)
-                printf("trigger %d cmd c=%d f=%x\n", trigger_count,
-                       trigger_cmd.c_rpt, trigger_cmd.c_flags);
-        gettimeofday(&trigger_start, NULL);
-        timer_on = 1;
-        pthread_mutex_lock(&m_count);
-        write_bytes = 0;
-        pthread_mutex_unlock(&m_count);
-
-        pthread_cond_broadcast(&cv_trigger);
-        pthread_mutex_unlock(&m_trigger);
-}
-
-static __inline__ void stop_all(int unused)
-{
-        sig_received++;
-}
-
-static void kill_kids(void)
-{
-        struct kid_t *tmp = kid_list;
-
-        stop_all(SIGINT);
-        trigger(C_STOP, 0, 0, 0);
-        while(tmp) {
-                pthread_kill(tmp->k_pthread, SIGTERM);
-                tmp = tmp->k_next;
-        }
-}
-
-static void sig_master(int unused)
-{
-        stop_all(SIGINT);
-        //jt_quit(0, NULL);
-}
-
-static int wait_for_threads()
-{
-        struct kid_t *tmp = kid_list;
-        int rc = 0, status;
-        void *statusp;
-
-        printf("waiting for %d children\n", live_threads);
-
-        while(tmp) {
-                rc = pthread_join(tmp->k_pthread, &statusp);
-                status = (long)statusp;
-                if (o_verbose > 2)
-                        printf("%d: joined, rc = %d, status = %d\n",
-                               tmp->k_id, rc, status);
-                kid_list = tmp->k_next;
-                free(tmp);
-                tmp = kid_list;
-                live_threads--;
-        }
-
-        if (o_verbose > 0)
-                printf("%s done, rc = %d\n", cmdname, rc);
-        return rc;
-}
-
-static int write_proc(char *proc_path, char *value)
-{
-        int fd, rc;
-
-        fd = open(proc_path, O_WRONLY);
-        if (fd == -1) {
-                fprintf(stderr, "open('%s') failed: %s\n",
-                        proc_path, strerror(errno));
-                rc = errno;
-        } else {
-                rc = write(fd, value, strlen(value));
-                if (rc < 0) {
-                        fprintf(stderr, "write('%s') failed: %s\n",
-                                proc_path, strerror(errno));
-                }
-                close(fd);
-        }
-        return rc;
-}
-
-static int read_proc(char *proc_path, unsigned long long *value)
-{
-        int fd, rc;
-        char buf[50];
-
-        fd = open(proc_path, O_RDONLY);
-        if (fd == -1) {
-                fprintf(stderr, "open('%s') failed: %s\n",
-                        proc_path, strerror(errno));
-                return (errno);
-        }
-
-        rc = read(fd, buf, sizeof(buf));
-        close(fd);
-        if (errno == EOPNOTSUPP) {
-                /* probably an echo server */
-                return rc;
-        }
-        if (rc <= 0) {
-                fprintf(stderr, "read('%s') failed: %s (%d)\n",
-                        proc_path, strerror(errno), errno);
-                return rc;
-        }
-        *value = strtoull(buf, NULL, 10);
-        return 0;
-}
-
-static int grant_estimate(int thread)
-{
-        unsigned long long avail, grant;
-        char proc_path[50];
-        int rc;
-        static int ran = 0;
-
-        /* I don't really care about protecting this with a mutex */
-        if (ran)
-                return 0;
-
-        if (o_verbose < 2)
-                return 0;
-
-        /* Divide /proc/fs/lustre/osc/o_0001/kbytesavail
-           by /proc/fs/lustre/osc/o_0001/cur_grant_bytes to find max clients */
-        sprintf(proc_path, "/proc/fs/lustre/osc/o%.5d/kbytesavail", thread);
-        rc = read_proc(proc_path, &avail);
-        if (rc)
-                return rc;
-        sprintf(proc_path, "/proc/fs/lustre/osc/o%.5d/cur_grant_bytes", thread);
-        rc = read_proc(proc_path, &grant);
-        if (rc)
-                return rc;
-        if (grant == 0) {
-                return -EINVAL;
-        }
-        printf("Estimate %llu clients before we run out of grant space "
-               "(%lluK / %llu)\n", (avail << 10)  / grant, avail, grant);
-        ran++;
-        return 0;
-}
-
-/* We hold a thread mutex around create/cleanup because cur_dev is not
-   shared-memory safe */
-pthread_mutex_t m_config = PTHREAD_MUTEX_INITIALIZER;
-
-static int cleanup(char *obdname, int quiet)
-{
-        char *args[3];
-        int rc;
-
-        pthread_mutex_lock(&m_config);
-
-        args[0] = cmdname;
-        args[1] = obdname;
-        rc = jt_lcfg_device(2, args);
-        if (rc && !quiet)
-                fprintf(stderr, "%s: can't configure '%s' (%d)\n",
-                        cmdname, obdname, rc);
-        args[1] = "force";
-        rc = jt_obd_cleanup(2, args);
-        if (rc && !quiet)
-                fprintf(stderr, "%s: can't cleanup '%s' (%d)\n",
-                        cmdname, obdname, rc);
-        rc = jt_obd_detach(1, args);
-        if (rc && !quiet)
-                fprintf(stderr, "%s: can't detach '%s' (%d)\n",
-                        cmdname, obdname, rc);
-
-        pthread_mutex_unlock(&m_config);
-        return rc;
-}
-
-static int echocli_setup(char *oname, char *ename, int *dev)
-{
-        char *args[5];
-        char proc_path[50];
-        int rc;
-
-        pthread_mutex_lock(&m_config);
-
-        args[0] = cmdname;
-
-        /* OSC */
-        /* attach "osc" oscname oscuuid */
-        args[1] = "osc";
-        args[2] = args[3] = oname;
-        rc = jt_lcfg_attach(4, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't attach osc '%s' (%d)\n",
-                        cmdname, oname, rc);
-                /* Assume we want e.g. an old one cleaned anyhow. */
-                goto clean;
-        }
-        /* setup ostname "OSS_UUID" */
-        args[1] = target;
-        args[2] = "OSS_UUID";
-        rc = jt_lcfg_setup(3, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't setup osc '%s' (%d)\n",
-                        cmdname, oname, rc);
-                goto clean;
-        }
-
-        /* Large grants cause ENOSPC to be reported, even though
-           there's space left.  We can reduce the grant size by
-           minimizing these */
-        sprintf(proc_path, "/proc/fs/lustre/osc/%s/max_dirty_mb", oname);
-        rc = write_proc(proc_path, "1");
-        sprintf(proc_path, "/proc/fs/lustre/osc/%s/max_rpcs_in_flight", oname);
-        rc = write_proc(proc_path, "1");
-
-        /* ECHO CLI */
-        /* attach "echo_client" echoname echouuid */
-        args[1] = "echo_client";
-        args[2] = args[3] = ename;
-        rc = jt_lcfg_attach(4, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't attach '%s' (%d)\n",
-                        cmdname, ename, rc);
-                if (rc == ENODEV)
-                        fprintf(stderr, "%s: is the obdecho module loaded?\n",
-                                cmdname);
-                goto clean;
-        }
-        /* setup oscname */
-        args[1] = oname;
-        rc = jt_lcfg_setup(2, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't setup '%s' (%d)\n",
-                        cmdname, ename, rc);
-                goto clean;
-        }
-
-        args[1] = ename;
-        rc = jt_obd_device(2, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't set device '%s' (%d)\n",
-                        cmdname, ename, rc);
-                goto clean;
-        }
-
-        if (!rc)
-                *dev = jt_obd_get_device();
-        pthread_mutex_unlock(&m_config);
-        return rc;
-
-clean:
-        pthread_mutex_unlock(&m_config);
-        cleanup(ename, 1);
-        cleanup(oname, 1);
-        return rc;
-}
-
-/* We can't use the libptlctl library fns because they are not shared-memory
-   safe with respect to the ioctl device (cur_dev) */
-static int obj_ioctl(int cmd, struct obd_ioctl_data *data, int unpack)
-{
-        char *buf = NULL;
-        int rc;
-
-        //IOC_PACK(cmdname, data);
-        if (obd_ioctl_pack(data, &buf, sizeof(*data))) {
-                fprintf(stderr, "dev %d invalid ioctl\n", data->ioc_dev);
-                rc = EINVAL;
-                goto out;
-        }
-
-        rc = l_ioctl(OBD_DEV_ID, cmd, buf);
-
-        if (unpack) {
-                //IOC_UNPACK(argv[0], data);
-                if (obd_ioctl_unpack(data, buf, sizeof(*data))) {
-                        fprintf(stderr, "dev %d invalid reply\n", data->ioc_dev);
-                        rc = EINVAL;
-                        goto out;
-                }
-        }
-
-out:
-        if (buf)
-                free(buf);
-        return rc;
-}
-
-/* See jt_obd_create */
-static int obj_create(struct kid_t *kid)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        memset(&data, 0, sizeof(data));
-        data.ioc_dev = kid->k_dev;
-        data.ioc_obdo1.o_mode = 0100644;
-        data.ioc_obdo1.o_id = 0;
-        data.ioc_obdo1.o_uid = 0;
-        data.ioc_obdo1.o_gid = 0;
-        data.ioc_obdo1.o_valid = OBD_MD_FLTYPE | OBD_MD_FLMODE |
-                OBD_MD_FLID | OBD_MD_FLUID | OBD_MD_FLGID;
-
-        rc = obj_ioctl(OBD_IOC_CREATE, &data, 1);
-        if (rc) {
-                fprintf(stderr, "%d: create (%d) %s\n",
-                        kid->k_id, rc, strerror(errno));
-                return rc;
-        }
-
-        if (!(data.ioc_obdo1.o_valid & OBD_MD_FLID)) {
-                fprintf(stderr, "%d: create oid not valid "LPX64"\n",
-                        kid->k_id, data.ioc_obdo1.o_valid);
-                return rc;
-        }
-
-        kid->k_objid = data.ioc_obdo1.o_id;
-
-        if (o_verbose > 4)
-                printf("%d: cr "LPX64"\n", kid->k_id, kid->k_objid);
-
-        return rc;
-}
-
-/* See jt_obd_destroy */
-static int obj_delete(struct kid_t *kid)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (o_verbose > 4)
-                printf("%d: del "LPX64"\n", kid->k_id, kid->k_objid);
-
-        memset(&data, 0, sizeof(data));
-        data.ioc_dev = kid->k_dev;
-        data.ioc_obdo1.o_id = kid->k_objid;
-        data.ioc_obdo1.o_mode = S_IFREG | 0644;
-        data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLMODE;
-
-        rc = obj_ioctl(OBD_IOC_DESTROY, &data, 1);
-        if (rc)
-                fprintf(stderr, "%s-%d: can't destroy obj "LPX64" (%d)\n",
-                        cmdname, kid->k_id, kid->k_objid, rc);
-
-        kid->k_objid = 0;
-        return rc;
-}
-
-#define difftime(a, b)                                  \
-        ((a)->tv_sec - (b)->tv_sec +                    \
-         ((a)->tv_usec - (b)->tv_usec) / 1000000.0)
-
-/* See jt_obd_test_brw */
-static int obj_write(struct kid_t *kid)
-{
-        struct obd_ioctl_data data;
-        struct timeval start;
-        __u64 count, len;
-        int rc = 0, i, pages = 0;
-
-        if (o_verbose > 4)
-                printf("%d: wr "LPX64"\n", kid->k_id, kid->k_objid);
-
-        count = 10;
-        pages = 32;
-        len = pages * getpagesize();
-
-        memset(&data, 0, sizeof(data));
-        data.ioc_dev = kid->k_dev;
-        /* communicate the 'type' of brw test and batching to echo_client.
-         * don't start.  we'd love to refactor this lctl->echo_client
-         * interface */
-        data.ioc_pbuf1 = (void *)1;
-        data.ioc_plen1 = 1;
-
-        data.ioc_obdo1.o_id = kid->k_objid;
-        data.ioc_obdo1.o_mode = S_IFREG;
-        data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE |
-                OBD_MD_FLFLAGS;
-        data.ioc_obdo1.o_flags = OBD_FL_DEBUG_CHECK;
-        data.ioc_count = len;
-        data.ioc_offset = 0;
-
-        gettimeofday(&start, NULL);
-
-        for (i = 1; i <= count; i++) {
-                data.ioc_obdo1.o_valid &= ~(OBD_MD_FLBLOCKS|OBD_MD_FLGRANT);
-                rc = obj_ioctl(OBD_IOC_BRW_WRITE, &data, 0);
-                if (rc) {
-                        fprintf(stderr, "%d: write %s\n", kid->k_id,
-                                strerror(rc = errno));
-                        break;
-                }
-
-                data.ioc_offset += len;
-        }
-
-        if (!rc) {
-                struct timeval end;
-                double diff;
-
-                gettimeofday(&end, NULL);
-                diff = difftime(&end, &start);
-
-                --i;
-
-                pthread_mutex_lock(&m_count);
-                write_bytes += i * len;
-                pthread_mutex_unlock(&m_count);
-
-                if (o_verbose > 4)
-                        printf("%d: wrote %dx%d pages in %.3fs (%.3f MB/s): %s",
-                               kid->k_id, i, pages, diff,
-                               ((double)i * len) / (diff * 1048576.0),
-                               ctime(&end.tv_sec));
-        }
-
-        if (rc)
-                fprintf(stderr, "%s-%d: err test_brw obj "LPX64" (%d)\n",
-                        cmdname, kid->k_id, kid->k_objid, rc);
-        return rc;
-}
-
-static int do_work(struct kid_t *kid)
-{
-        int rc = 0, err, iter = 0;
-
-        if (!(kid->k_cmd.c_flags & C_CREATE_EVERY))
-                rc = obj_create(kid);
-
-        for (iter = 0; iter < kid->k_cmd.c_rpt; iter++) {
-                if (rc || sig_received)
-                        break;
-
-                if (kid->k_cmd.c_flags & C_CREATE_EVERY) {
-                        rc = obj_create(kid);
-                        if (rc)
-                                break;
-                }
-
-                if (kid->k_cmd.c_flags & C_WRITE) {
-                        rc = obj_write(kid);
-                        grant_estimate(kid->k_id);
-                }
-
-                if (kid->k_cmd.c_flags & C_CREATE_EVERY) {
-                        err = obj_delete(kid);
-                        if (!rc) rc = err;
-                }
-
-                if ((o_verbose > 3) && (iter % 10 == 0))
-                        printf("%d: i%d\n", kid->k_id, iter);
-                if (!rc)
-                        sleep(kid->k_cmd.c_delay);
-        }
-
-        if (!(kid->k_cmd.c_flags & C_CREATE_EVERY)) {
-                err = obj_delete(kid);
-                if (!rc) rc = err;
-        }
-
-        if (o_verbose > 2)
-                printf("%d: done (%d)\n", kid->k_id, rc);
-
-        return rc;
-}
-
-static void report_perf()
-{
-        struct timeval end;
-        double diff;
-
-        gettimeofday(&end, NULL);
-        diff = difftime(&end, &trigger_start);
-        if (o_verbose > 2) {
-                pthread_mutex_lock(&m_count);
-                printf("wrote %lluMB in %.3fs (%.3f MB/s)\n",
-                       write_bytes >> 20, diff,
-                       (write_bytes >> 20) / diff);
-                pthread_mutex_unlock(&m_count);
-        }
-}
-
-static void *run_one_child(void *threadvp)
-{
-        struct kid_t *kid;
-        char oname[10], ename[10];
-        int thread = (long)threadvp, dev;
-        int rc = 0, err;
-
-        if (o_verbose > 2)
-                printf("%s: running thread #%d\n", cmdname, thread);
-
-        sprintf(oname, "o%.5d", thread);
-        sprintf(ename, "e%.5d", thread);
-        rc = echocli_setup(oname, ename, &dev);
-        if (rc) {
-                fprintf(stderr, "%s: can't setup '%s/%s' (%d)\n",
-                        cmdname, oname, ename, rc);
-                pthread_exit((void *)(long)rc);
-        }
-
-        kid = push_kid(thread);
-        if (!kid) {
-                rc = -ENOMEM;
-                goto out;
-        }
-        kid->k_dev = dev;
-
-        while(!(rc || sig_received)) {
-                pthread_mutex_lock(&m_trigger);
-                waiting_count++;
-                if ((waiting_count == live_threads) && timer_on) {
-                        report_perf();
-                        timer_on = 0;
-                        all_done = 1;
-                }
-                pthread_cond_wait(&cv_trigger, &m_trigger);
-                waiting_count--;
-                all_done = 0;
-
-                /* First trigger_count threads will do the work, the rest
-                   will block again */
-                if (trigger_count) {
-                        if (o_verbose > 4)
-                                printf("%d: trigger %d cmd %x\n",
-                                       kid->k_id, trigger_count,
-                                       trigger_cmd.c_flags);
-                        trigger_count--;
-                        memcpy(&kid->k_cmd, &trigger_cmd, sizeof(trigger_cmd));
-                        pthread_mutex_unlock(&m_trigger);
-                        rc = do_work(kid);
-                } else {
-                        pthread_mutex_unlock(&m_trigger);
-                }
-        }
-
-        if (o_verbose > 1)
-                printf("%s: thread #%d done (%d)\n", cmdname, thread, rc);
-
-        if (rc)
-                stop_all(SIGINT);
-
-out:
-        err = cleanup(ename, 0);
-        if (!rc) rc = err;
-        err = cleanup(oname, 0);
-        if (!rc) rc = err;
-
-        pthread_exit((void *)(long)rc);
-}
-
-static int loadgen_start_clients(int argc, char **argv)
-{
-        int rc = 0, i, numt;
-        struct timespec ts = {0, 1000*1000*100}; /* .1 sec */
-        pthread_attr_t attr;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        numt = strtoul(argv[1], NULL, 0);
-        if (numt < 1)
-                return CMD_HELP;
-
-        if (!target[0]) {
-                fprintf(stderr, "%s: target OST is not defined, use 'device' "
-                        "command\n", cmdname);
-                return -EINVAL;
-        }
-
-        rc = pthread_attr_init(&attr);
-        if (rc) {
-                fprintf(stderr, "%s: pthread_attr_init:(%d) %s\n",
-                        cmdname, rc, strerror(errno));
-                return -errno;
-        }
-        pthread_attr_setstacksize (&attr, PTHREAD_STACK_MIN);
-        pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
-
-        numt += live_threads;
-        i = live_threads;
-        printf("start %d to %d\n", i, numt);
-        while(!rc && !sig_received && (i < numt)) {
-                pthread_t thread;
-
-                i++;
-                rc = pthread_create(&thread, &attr, run_one_child,
-                                    (void *)(long)i);
-                if (rc) {
-                        fprintf(stderr, "%s: pthread: #%d - (%d) %s\n",
-                                cmdname, i, rc, strerror(rc));
-                        break;
-                }
-
-                /* give them slightly different start times */
-                nanosleep(&ts, NULL);
-        }
-
-        pthread_attr_destroy(&attr);
-
-        return -rc;
-}
-
-static int loadgen_target(int argc, char **argv)
-{
-        char *args[3];
-        __u64 nidx = 0;
-        int rc = 0;
-
-        if (argc < 2 || argc > 3)
-                return CMD_HELP;
-
-        args[0] = cmdname;
-
-        if (argc == 3) {
-                nidx = libcfs_str2nid(argv[2]);
-                if (nidx == LNET_NID_ANY) {
-                        fprintf(stderr, "%s: invalid nid '%s'\n",
-                                cmdname, argv[2]);
-                        return -EINVAL;
-                }
-        } else {
-                /* Local device should be in list */
-                args[1] = argv[1];
-                rc = jt_obd_device(2, args);
-                if (rc) {
-                        fprintf(stderr, "%s: local device '%s' doesn't "
-                                "seem to exist. You must use obdfilter device "
-                                "names like 'lustre-OST0000'.  Use 'dl' to "
-                                "list all devices.\n",
-                                cmdname, argv[1]);
-                        return -EINVAL;
-                }
-
-                /* Use the first local nid */
-                args[1] = (char *)(&nidx);
-                args[1][0] = 1; /* hack to get back first nid */
-                rc = jt_ptl_list_nids(2, args);
-                if (rc) {
-                        fprintf(stderr, "%s: can't get local nid (%d)\n",
-                                cmdname, rc);
-                        return rc;
-                }
-        }
-        if (strcmp(nid, libcfs_nid2str(nidx)) != 0) {
-                /* if new, do an add_uuid */
-                sprintf(nid, "%s", libcfs_nid2str(nidx));
-
-                /* Fixme change the uuid for every new one */
-                args[1] = "OSS_UUID";
-                args[2] = nid;
-                rc = jt_lcfg_add_uuid(3, args);
-                if (rc) {
-                        fprintf(stderr, "%s: can't add uuid '%s' (%d)\n",
-                                cmdname, args[2], rc);
-                        return rc;
-                }
-        }
-
-        snprintf(target, sizeof(target), "%s", argv[1]);
-        printf("Target OST name is '%s'\n", target);
-
-        return rc;
-}
-
-static int loadgen_verbose(int argc, char **argv)
-{
-        if (argc != 2)
-                return CMD_HELP;
-        o_verbose = atoi(argv[1]);
-        printf("verbosity set to %d\n", o_verbose);
-        return 0;
-}
-
-static int loadgen_write(int argc, char **argv)
-{
-        int threads;
-
-        if (argc < 3 || argc > 4)
-                return CMD_HELP;
-        threads = atoi(argv[1]);
-        if (threads > live_threads) {
-                fprintf(stderr, "requested %d threads but only %d are running. "
-                        "Use 'start' to start some more.\n",
-                        threads, live_threads);
-                return -EOVERFLOW;
-        }
-        trigger(C_WRITE, threads, atoi(argv[2]), 
-                (argc == 4) ? atoi(argv[3]) : 0);
-        return 0;
-}
-
-char ecsname[] = "echosrv";
-static int loadgen_stop_echosrv(int argc, char **argv)
-{
-        int verbose = (argc != 9);
-        if (my_oss) {
-                char name[]="OSS";
-                cleanup(name, verbose);
-                my_oss = 0;
-        }
-        if (my_ecs || (argc == 9)) {
-                cleanup(ecsname, verbose);
-                my_ecs = 0;
-        }
-        return 0;
-}
-
-static int loadgen_start_echosrv(int argc, char **argv)
-{
-        char *args[5];
-        int rc;
-
-        pthread_mutex_lock(&m_config);
-
-        args[0] = cmdname;
-
-        /* attach obdecho echosrv echosrv_UUID */
-        args[1] = "obdecho";
-        args[2] = args[3] = ecsname;
-        rc = jt_lcfg_attach(4, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't attach echo server (%d)\n",
-                        cmdname, rc);
-                /* Assume we want e.g. an old one cleaned anyhow. */
-                goto clean;
-        }
-        my_ecs = 1;
-
-        /* setup */
-        rc = jt_lcfg_setup(1, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't setup echo server (%d)\n",
-                        cmdname, rc);
-                goto clean;
-        }
-  
-        /* Create an OSS to handle the communications */
-        /* attach ost OSS OSS_UUID */
-        args[1] = "ost";
-        args[2] = args[3] = "OSS";
-
-        rc = jt_lcfg_attach(4, args);
-        if (rc == EEXIST) {
-                /* Already set up for somebody else, that's fine. */
-                printf("OSS already set up, no problem.\n");
-                pthread_mutex_unlock(&m_config);
-                return 0;
-        }
-        if (rc) {
-                fprintf(stderr, "%s: can't attach OSS (%d)\n",
-                        cmdname, rc);
-                goto clean;
-        }
-        my_oss = 1;
-
-        /* setup */
-        rc = jt_lcfg_setup(1, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't setup OSS (%d)\n",
-                        cmdname, rc);
-                goto clean;
-        }
-
-        pthread_mutex_unlock(&m_config);
-        return rc;
-
-clean:
-        pthread_mutex_unlock(&m_config);
-        loadgen_stop_echosrv(9, argv);
-        return rc;
-}
-
-static int loadgen_wait(int argc, char **argv)
-{
-        /* Give scripts a chance to start some threads */   
-        sleep(1);
-        while (!all_done) {
-                sleep(1);
-        }
-        return 0;
-}
-
-static int loadgen_init(int argc, char **argv)
-{
-        char *args[3];
-        int rc;
-
-        sprintf(cmdname, "%s", argv[0]);
-
-        signal(SIGTERM, sig_master);
-        signal(SIGINT, sig_master);
-
-        /* Test to make sure obdecho module is loaded */
-        args[0] = cmdname;
-        args[1] = "echo_client";
-        args[2] = args[3] = "ecc_test";
-        rc = jt_lcfg_attach(4, args);
-        if (rc) {
-                fprintf(stderr, "%s: can't attach echo client (%d)\n",
-                        cmdname, rc);
-                if (rc == ENODEV)
-                        fprintf(stderr, "%s: is the obdecho module loaded?\n",
-                                cmdname);
-        } else {
-                args[1] = args[2];
-                jt_obd_detach(1, args);
-        }
-
-        return rc;
-}
-
-static int loadgen_exit()
-{
-        int rc;
-        
-        printf("stopping %d children\n", live_threads);
-        kill_kids();
-        rc = wait_for_threads();
-
-        loadgen_stop_echosrv(0, NULL);
-
-        return rc;
-}
-
-/* libptlctl interface */
-static int loadgen_main(int argc, char **argv)
-{
-        int rc;
-
-        setlinebuf(stdout);
-        /* without this threaded errors cause segfault */
-        setlinebuf(stderr);
-
-        if ((rc = ptl_initialize(argc, argv)) < 0)
-                exit(rc);
-        if ((rc = obd_initialize(argc, argv)) < 0)
-                exit(rc);
-        if ((rc = dbg_initialize(argc, argv)) < 0)
-                exit(rc);
-
-        Parser_init("loadgen> ", cmdlist);
-
-        rc = loadgen_init(argc, argv);
-        if (rc)
-                goto out;
-
-        if (argc > 1) {
-                rc = Parser_execarg(argc - 1, argv + 1, cmdlist);
-        } else {
-                rc = Parser_commands();
-        }
-
-        rc = loadgen_exit();
-
-out:
-        obd_finalize(argc, argv);
-        return rc;
-}
-
-#ifndef LIBLUSTRE_TEST
-int main (int argc, char **argv)
-{
-        int rc;
-        rc = loadgen_main(argc, argv);
-        pthread_exit((void *)(long)rc);
-
-        return rc;
-}
-#endif
-
diff --git a/lustre/utils/lr_reader.c b/lustre/utils/lr_reader.c
deleted file mode 100644
index f1275b395ce2e615b06eae0965bcc290ea06566c..0000000000000000000000000000000000000000
--- a/lustre/utils/lr_reader.c
+++ /dev/null
@@ -1,209 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
- /* Safely read the last_rcvd file from a device */
-
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <mntent.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mount.h>
-
-#include <string.h>
-#include <getopt.h>
-
-#include <lustre_disk.h>
-#include <lustre_ver.h>
-
-int run_command(char *cmd)
-{
-        char log[] = "/tmp/mkfs_logXXXXXX";
-        int fd, rc;
-        
-        
-        if ((fd = mkstemp(log)) >= 0) {
-                close(fd);
-                strcat(cmd, " >");
-                strcat(cmd, log);
-        }
-        strcat(cmd, " 2>&1");
-
-        /* Can't use popen because we need the rv of the command */
-        rc = system(cmd);
-        if (rc && fd >= 0) {
-                char buf[128];
-                FILE *fp;
-                fp = fopen(log, "r");
-                if (fp) {
-                        while (fgets(buf, sizeof(buf), fp) != NULL) {
-                                if (rc) 
-                                        printf("   %s", buf);
-                        }
-                        fclose(fp);
-                }
-        }
-        if (fd >= 0) 
-                remove(log);
-        return rc;
-}                                                       
-
-
-
-int main(int argc, char *const argv[])
-{
-        char tmpdir[] = "/tmp/dirXXXXXX";
-        char cmd[128];
-        char filepnm[128];
-        char *progname, *dev;
-        struct lr_server_data lsd;
-        FILE *filep;
-        int ret;
-
-        if ((argc < 2) || (argv[argc - 1][0] == '-')) {
-                printf("Usage: %s devicename\n", argv[0]);
-                printf("Read and print the last_rcvd file from a device\n");
-                printf("(safe for mounted devices)\n");
-                return EINVAL;
-        }
-
-        progname = argv[0];
-        dev = argv[argc - 1];
-
-        /* Make a temporary directory to hold Lustre data files. */
-        if (!mkdtemp(tmpdir)) {
-                fprintf(stderr, "%s: Can't create temporary directory %s: %s\n",
-                        progname, tmpdir, strerror(errno));
-                return errno;
-        }
-
-        memset(cmd, 0, sizeof(cmd));
-        sprintf(cmd,
-                "debugfs -c -R 'dump /%s %s/%s' %s",
-                LAST_RCVD, tmpdir, LAST_RCVD, dev);
-
-        ret = run_command(cmd);
-        if (ret) {
-                fprintf(stderr, "%s: Unable to dump %s file\n",
-                        progname, LAST_RCVD);
-                goto out_rmdir;
-        }
-
-        sprintf(filepnm, "%s/%s", tmpdir, LAST_RCVD);
-        filep = fopen(filepnm, "r");
-        if (!filep) {
-                fprintf(stderr, "%s: Unable to read old data\n",
-                        progname);
-                ret = -errno;
-                goto out_rmdir;
-        }
-
-        printf("Reading %s\n", LAST_RCVD);
-        ret = fread(&lsd, 1, sizeof(lsd), filep);
-        if (ret < sizeof(lsd)) {
-                fprintf(stderr, "%s: Short read (%d of %d)\n",
-                        progname, ret, (int)sizeof(lsd));
-                ret = -ferror(filep);
-                if (ret) 
-                        goto out_close;
-        }
-
-        #if 0
-        __u8  lsd_uuid[40];        /* server UUID */
-        __u64 lsd_last_transno;    /* last completed transaction ID */
-        __u64 lsd_compat14;        /* reserved - compat with old last_rcvd */
-        __u64 lsd_mount_count;     /* incarnation number */
-        __u32 lsd_feature_compat;  /* compatible feature flags */
-        __u32 lsd_feature_rocompat;/* read-only compatible feature flags */
-        __u32 lsd_feature_incompat;/* incompatible feature flags */
-        __u32 lsd_server_size;     /* size of server data area */
-        __u32 lsd_client_start;    /* start of per-client data area */
-        __u16 lsd_client_size;     /* size of per-client data area */
-        __u16 lsd_subdir_count;    /* number of subdirectories for objects */
-        __u64 lsd_catalog_oid;     /* recovery catalog object id */
-        __u32 lsd_catalog_ogen;    /* recovery catalog inode generation */
-        __u8  lsd_peeruuid[40];    /* UUID of MDS associated with this OST */
-        __u32 lsd_ost_index;       /* index number of OST in LOV */
-        __u32 lsd_mdt_index;       /* index number of MDT in LMV */
-        __u8  lsd_padding[LR_SERVER_SIZE - 148];
-        #endif
-
-        printf("UUID %s\n", lsd.lsd_uuid);
-        printf("Feature compat=%#x\n", lsd.lsd_feature_compat);
-        printf("Feature incompat=%#x\n", lsd.lsd_feature_incompat);
-        printf("Feature rocompat=%#x\n", lsd.lsd_feature_rocompat);
-        printf("Last transaction %llu\n", (long long)lsd.lsd_last_transno);
-        printf("ost index %u\n", lsd.lsd_ost_index);
-        printf("mdt index %u\n", lsd.lsd_mdt_index);
-
-        if ((lsd.lsd_feature_compat & OBD_COMPAT_OST) ||
-            (lsd.lsd_feature_incompat & OBD_INCOMPAT_OST)) {
-                printf("OST, index %d\n", lsd.lsd_ost_index);
-        } else if ((lsd.lsd_feature_compat & OBD_COMPAT_MDT) ||
-                   (lsd.lsd_feature_incompat & OBD_INCOMPAT_MDT)) {
-                /* We must co-locate so mgs can see old logs.
-                   If user doesn't want this, they can copy the old
-                   logs manually and re-tunefs. */
-                printf("MDS, index %d\n", lsd.lsd_mdt_index);
-        } else  {
-                /* If neither is set, we're pre-1.4.6, make a guess. */
-                /* Construct debugfs command line. */
-                memset(cmd, 0, sizeof(cmd));
-                sprintf(cmd,
-                        "debugfs -c -R 'rdump /%s %s' %s",
-                        MDT_LOGS_DIR, tmpdir, dev);
-
-                run_command(cmd);
-
-                sprintf(filepnm, "%s/%s", tmpdir, MDT_LOGS_DIR);
-                if (lsd.lsd_ost_index > 0) {
-                        printf("non-flagged OST, index %d\n", 
-                               lsd.lsd_ost_index);
-                } else {
-                        /* If there's a LOGS dir, it's an MDT */
-                        if ((ret = access(filepnm, F_OK)) == 0) {
-                                /* Old MDT's are always index 0 
-                                   (pre CMD) */
-                                printf("non-flagged MDS, index 0\n");
-                        } else {
-                                printf("non-flagged OST, index unknown\n");
-                        }
-                }
-        }
-        
-out_close:        
-        fclose(filep);
-
-out_rmdir:
-        memset(cmd, 0, sizeof(cmd));
-        sprintf(cmd, "rm -rf %s", tmpdir);
-        run_command(cmd);
-        return ret;
-}
-
-
-
diff --git a/lustre/utils/lrun b/lustre/utils/lrun
deleted file mode 100755
index e832dc3695aade5fbe67f2546495ebddc6c759c5..0000000000000000000000000000000000000000
--- a/lustre/utils/lrun
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-LIBLUSTRE_MOUNT_POINT=${LIBLUSTRE_MOUNT_POINT:-"/mnt/lustre"}
-LIBLUSTRE_MOUNT_TARGET=${LIBLUSTRE_MOUNT_TARGET:-"TARGET_NOT_SET"}
-LIBLUSTRE_DUMPFILE=${LIBLUSTRE_DUMPFILE:-"/tmp/DUMP_FILE"}
-LIBLUSTRE_DEBUG_MASK=${LIBLUSTRE_DEBUG_MASK:-"0"}
-LIBLUSTRE_DEBUG_SUBSYS=${LIBLUSTRE_DEBUG_SUBSYS:-"0"}
-LD_PRELOAD=${LD_PRELOAD:-"/usr/lib/liblustre.so"}
-
-export LIBLUSTRE_MOUNT_POINT
-export LIBLUSTRE_MOUNT_TARGET
-export LIBLUSTRE_DUMPFILE
-export LIBLUSTRE_DEBUG_MASK
-export LIBLUSTRE_DEBUG_SUBSYS
-export LD_PRELOAD
-
-exec $@
diff --git a/lustre/utils/ltrack_stats.c b/lustre/utils/ltrack_stats.c
deleted file mode 100644
index ccd9e7ee5c6a0f9f3cbaa6c1c885cb819229cf0d..0000000000000000000000000000000000000000
--- a/lustre/utils/ltrack_stats.c
+++ /dev/null
@@ -1,493 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2007 Cluster File Systems, Inc.
- *   Author: Milind Dumbare <milind@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <getopt.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <glob.h>
-#include <signal.h>
-#include <string.h>
-#include <stdlib.h>
-
-
-#define TRACK_BY_GID 0
-#define TRACK_BY_PPID 1
-#define TRACK_BY_PID 2
-#define TRACK_FOR_ALL 3
-
-/* We can have at the most 1024 llstats monitoring 1024 lustre clients
- * at a time */
-#define NO_OF_CLIENTS 1024
-
-/* length of absolute path of vfs_ops_stats */
-#define LEN_STATS 1024
-
-/* Length of llstat command with all its switches and command line options */
-#define LEN_LLSTAT (25 + LEN_STATS)
-
-/* strlen of each lustre client entry in /proc/fs/lustre/llite/ */
-#define LEN_CLIENT 1024
-
-/* size of output of llstat command we read at a time */
-#define MAX 1024
-
-/* max strlen of outfile we get on command line */
-#define LEN_OUT 1024
-
-/* Length of command given on command line */
-#define COMM_LEN 4096
-pid_t llstat[1024];
-
-/* print usage */
-void print_usage()
-{
-        printf("Usage:\n\n");
-        printf("ltrack_stats runs command given and does one of the "
-                "following:\n"
-                "\t1. Writes its pid to "
-                "/proc/fs/lustre/llite/.../stats_track_pid\n"
-                " to collects stats for that process.\n"
-                "\t2. Writes its ppid to "
-                "/proc/fs/lustre/llite/.../stats_track_ppid\n"
-                " to collect stats of that process and all its children \n"
-                "\t3. Sets gid of process to some random gid (444) and also\n"
-                " writes that to/proc/fs/lustre/llite/.../stats_track_gid to"
-                " collect stats \nof all processes in that group\n\n"
-                " It also uses llstat to generate output with interval of 1 "
-                " second and duration\n of run of command for plot-llstat to "
-                "generate a graph\n\n");
-        printf("ltrack_stats [-l filename] [-g <gid> | -a | -i | -c | -h ]\n"
-               "\t<command with arguments ...>\n\n");
-        printf("-l: outputs the llstat.pl's output to given <filename>"
-               "with interval of 1 second \nbetween each output and flag for"
-               "graphable output. If -l flag is not given llstat \nwont be"
-               "executed\n\n");
-
-        printf("-g: for displaying VFS operation statistics collected"
-               "for all processes having \ngroup id as given <gid> \n\n");
-
-        printf("-a: for displaying VFS operations statistics collected"
-               "for all processes\n\n");
-
-        printf("-i: for displaying VFS operation statistics collected"
-               "for only given <command's> \nPID.\n\n");
-
-        printf("-c: for displaying VFS operation statistics collected"
-               " for all processes whose \nparents' PID is same as pid of "
-               "<command> to be executed\n\n");
-
-        printf("-h: for showing this help\n");
-}
-
-/* - type: to which file data should be written to track VFS operations
- * statistics
- * - id: we either need to write gid which is given on command line or pid
- * to collect statistics of that process or its children. */
-
-void write_track_xid(int type, unsigned short id, char* stats_path)
-{
-        FILE *fp;
-
-        /* for loop is used if we have more than one lustre clients on same
-         * machine. glob() return /proc entry for each lustre client */
-
-        switch(type) {
-                case TRACK_BY_GID:
-                        strcat(stats_path, "/stats_track_gid");
-                        break;
-                case TRACK_BY_PPID:
-                        strcat(stats_path, "/stats_track_ppid");
-                        break;
-                case TRACK_BY_PID:
-                        strcat(stats_path, "/stats_track_pid");
-                        break;
-        }
-
-        fp = fopen(stats_path, "w+");
-        if (!fp) {
-                fprintf(stderr, "Error: Couldn't open /proc entry file: %s\n",
-                        stats_path);
-                exit(1);
-        }
-        if (fprintf(fp, "%d", id) < 0) {
-                fprintf(stderr, "Error: Couldn't write id to tracking /proc"
-                        "entry file: %s\n", stats_path);
-                exit(1);
-        }
-        if (fclose(fp)) {
-                fprintf(stderr, "Error: Couldn't close tracking /proc entry"
-                        " file: %s\n", stats_path);
-                exit(1);
-        }
-}
-
-/* Get extra command lines concatenated to "command Function getopt scans
- *  one switch and its optional argument. So if command line is 
- * "-g 1234 make bzImage" 1234 is optarg and "make bzImage" will be collected
- *  with following function to exec it. */
-char* get_command_from_argv(int optind, int argc, char** argv,char* optarg,
-                            char* command)
-{
-        int index = 0;
-
-        strcpy(command, optarg);
-        strcat(command, " ");
-        for (index = optind; index < argc; index++) {
-                strcat(command, argv[index]);
-                strcat(command, " ");
-        }
-        if (strlen(command) == 1) {
-                fprintf(stderr,"Error: command missing \n");
-                print_usage();
-                exit(1);
-        } else if (strlen(command) > COMM_LEN) {
-                fprintf(stderr,"Error: Too long command \n");
-                print_usage();
-                exit(1);
-        }
-
-        return command;
-}
-
-/* Check for the llstat command in $PATH env variable. */
-void check_llstat()
-{
-        int status;
-
-        status = system("which llstat.pl &> /dev/null");
-        if (status) {
-                fprintf(stderr,"Error: llstat.pl not found in PATH\n");
-                exit(1);
-        }
-}
-
-pid_t fork_llstat_command(char* llstat_file,char* stats_path)
-{
-        char truncate_command[100];
-        char llstat_command[LEN_LLSTAT];
-        pid_t pid_llstat_command;
-        FILE *fp_popen, *fp_out;
-        char buffer[MAX];
-        
-        /* Truncating llstat output file as it will be opened in while
-         * loop to append output */
-        sprintf(truncate_command,"> %s",llstat_file);
-        system(truncate_command); 
-
-        strcat(stats_path, "/stats");
-
-        /* creating a string of llstat command to give to
-         * popen */
-        sprintf(llstat_command, "llstat -i 1 -g %s ",
-                stats_path);
-
-        /* fork for llstat */
-        if ((pid_llstat_command = fork()) < 0)
-                fprintf(stderr, "Error: Fork error\n");
-
-        /* in child (llstat) */
-        if (pid_llstat_command == 0) {
-                /* Doing popen for llstat command */
-                fp_popen = popen(llstat_command, "r");
-                if (fp_popen == NULL) {
-                        fprintf(stderr,"Couldn't popen the llstat command:"
-                                "\"%s\"n", llstat_command);
-                        exit(1);
-                }
-                while (fgets(buffer, 1024, fp_popen) != NULL) {
-                        /* Following code should be in while loop as llstat 
-                         * will keep on sending output each second and will
-                         * not exit on itself. It will be killed when we finsh
-                         * with our command so we must make the output file 
-                         * consistent after writing each 1024 bytes chunk */
-
-                        /* opening file where llstat will write its output */
-                        fp_out = fopen(llstat_file, "a");
-                        if (!fp_out) {
-                                fprintf(stderr, "Error: Couldn't open llstat"
-                                        "outfile file: %s\n",
-                                        llstat_file);
-                                exit(1);
-                        }
-                        /* fgets reads the popen output and fprintf writes it to
-                         * output file */
-
-                        if (fputs(buffer, fp_out) == EOF) {
-                                 fprintf(stderr, "Error: Couldn't write output"
-                                         "of llstat to out file\n");
-                                 exit(1);
-                        }
-
-                        /* closing file opened for storing llstat's output */
-                        if (fclose(fp_out)) {
-                                fprintf(stderr, "Error: Couldn't close llstat"
-                                        "outfile: %s\n", llstat_file);
-                                exit(1);
-                        }
-                }
-                /* closing popen for llstat */
-                if (pclose(fp_popen) < 0) {
-                        fprintf(stderr, "Error: Couldn't pclos"
-                                " llstat popen call\n");
-                        exit(1);
-                }
-        } /* child ends */
-        return pid_llstat_command;
-}
-
-pid_t fork_actual_command(int type, unsigned short id, char* stats_path,
-                          char* command)
-{
-        pid_t pid;
-
-        /* starting ltrack_stats functionality here */
-        if ((pid = fork()) < 0)
-                fprintf(stderr, "Error: Fork error\n");
-
-        /* fork for executing command */
-        if (pid == 0) {
-                switch(type) {
-                        case TRACK_BY_GID:
-                                if (setgid(id) < 0) {
-                                        fprintf(stderr, "Error: failed to"
-                                               " setgid\n");
-                                        exit(1);
-                                }
-                                pid = id;
-                                break;
-
-                        case TRACK_BY_PID:
-                        case TRACK_BY_PPID:
-                                pid = getpid();
-                                break;
-
-                        /* 0 has to be written to vfs_track_pid to collect 
-                         * statistics of all processes */
-                        case TRACK_FOR_ALL:
-                                pid = 0;
-                                type = TRACK_BY_PID;
-                                break;
-                }
-                write_track_xid(type, pid, stats_path);
-                execl("/bin/sh", "sh", "-c", command, (char *)0);
-                exit(0);
-        } /* child ends */
-
-        return(pid);
-}
-
-char* get_path_stats(int with_llstat, char* stats_path)
-{
-        glob_t stats_glob_buffer;
-        int choice;
-        char error = 0;
-        int i;
-
-        /* No slots reserved in gl_pathv. Store the found path at 0 location */
-        stats_glob_buffer.gl_offs = 0;
-
-        /* doing glob() for attaching llstat to monitor each vfs_ops_stat for
-         * mulitiple lustre clients */
-        if (glob("/proc/fs/lustre/llite/*", GLOB_DOOFFS, NULL,
-                 &stats_glob_buffer) != 0) {
-                fprintf(stderr,"Error: Couldn't find /proc entry for "
-                        "lustre\n");
-                exit(1);
-        }
-
-        /* If multiple client entries found in /proc/fs/lustre/llite user will
-         * be prompted with choice of all */
-        if (stats_glob_buffer.gl_pathc > 1 && with_llstat) {
-                check_llstat(); 
-                printf("Multiple lustre clients found, continuing... \n");
-                do {
-                        /* If flow is here again it means there was an error
-                         * and notifying that to user */
-                        if (error) {
-                                system("clear");
-                                fprintf(stderr, "Error: Please give correct "
-                                        "choice.\n");
-                        }
-                        /* Simple menu based interface to avoid possible
-                         * spelling mistakes */
-                        printf("\t\tMenu.\n");
-                        for (i = 0; i < stats_glob_buffer.gl_pathc; i++)
-                                printf("\t\t%d. %s\n", i+1, 
-                                       stats_glob_buffer.gl_pathv[i]);
-
-                        printf("\nEnter the lustre client number you want to "
-                               "use:");
-                        scanf(" %d", &choice);
-                        error ++;
-                } while (choice > stats_glob_buffer.gl_pathc || choice < 1);
-                strcpy(stats_path, stats_glob_buffer.gl_pathv[choice - 1]);
-        } else {
-                /*if only one client then simply copying the path from glob */
-                strcpy(stats_path, stats_glob_buffer.gl_pathv[0]);
-        }
-        /* this frees dynamically allocated space by glob() for storing found
-         * paths */
-        globfree(&stats_glob_buffer);
-
-        return stats_path;
-}
-
-/* Writes the id (gid/ pid/ ppid) value in appropriate tracking proc entry file
- * and EXECs the command given */
-void fork_command(int type, unsigned short id, char* command, char* llstat_file)
-{
-        pid_t pid_actual_command = 0;
-        pid_t pid_llstat_command = 0;
-
-        /* counters */
-        int with_llstat = 1;
-        int status;
-        char stats_path[1024];
-        char stats_path_temp[1024];
-
-        if (strlen(llstat_file) == 0)
-                with_llstat = 0;
-
-        get_path_stats(with_llstat, stats_path);
-        strcpy(stats_path_temp, stats_path);
-
-        /* llstat process attached to monitor given command */
-        if (with_llstat)
-                pid_llstat_command = fork_llstat_command(llstat_file,
-                                                         stats_path_temp);
-
-        /* forking a process which will exec command given */
-        pid_actual_command = fork_actual_command(type, id, stats_path,
-                                                 command);
-
-        if (waitpid(pid_actual_command, NULL, 0) != pid_actual_command)
-                fprintf(stderr, "Error: waitpid error\n");
-
-        if (with_llstat) {
-                /* comment #25 of BUG 10968 */
-                sleep(2); 
-
-                /* sending kill to all llstat commands created for each
-                 * lustre-client respectively */
-                kill(pid_llstat_command, 9);
-                waitpid(pid_llstat_command, &status, 0);
-
-                /* if llstat child is killed by KILL only then print note for
-                 * plotting graph and if its exited normally with errornous
-                 * status then it means there were some error and llstat was
-                 * aborted*/
-                if (!WIFEXITED(status))
-                        printf("\n\t[Note: Do \"$plot-llstat %s\" to plot a graph"
-                               " using GNU plot]\n", llstat_file);
-
-        }
-}
-
-/* main */
-int main(int argc, char **argv)
-{
-        char gid_string[5] = "";
-        gid_t gid;
-        int c;
-        char command[COMM_LEN] = "";
-        char llstat_file[100] = "";
-
-        /* Checking for root*/
-        if (getuid()) {
-                fprintf(stderr, "Error: You need to be root\n");
-                exit(1);
-        }
-
-        opterr = 0;
-        /* Parsing command line switches */
-        while ((c = getopt(argc, argv, "l:g:c:i:a:h")) != 1)
-                switch (c) {
-                        case 'l':
-                                strcpy(llstat_file, optarg);
-                                if (strlen(llstat_file) > LEN_OUT) {
-                                        fprintf(stderr, "length of outfile file"
-                                                " is too long\n");
-                                        exit(1);
-                                }
-                                break;
-
-                        /* When any value is written to vfs_track_gid, then VFS
-                         * operation statistics are collected for all
-                         * processes of that group ID.
-                         * write_track_xid writes given <gid> in vfs_track_gid
-                         * here. */
-                        case 'g':
-                                strcpy(gid_string, optarg);
-                                get_command_from_argv(optind, argc, argv, "",
-                                                      command);
-                                gid = atoi(gid_string);
-
-                                fork_command(TRACK_BY_GID, gid, command,
-                                             llstat_file); 
-                                return(0);
-
-                        /* When any value is written to vfs_track_ppid, then VFS
-                         * operation statistics are collected for all processes
-                         * whose parents' PID is same as track_ppid.
-                         *- write_track_xid writes pid to vfs_track_ppid here */
-                        case 'c':
-                                get_command_from_argv(optind, argc, argv,
-                                                      optarg, command);
-                                fork_command(TRACK_BY_PPID, 0, command,
-                                             llstat_file);
-                                return(0);
-
-                        /* When a non-zero value is written to vfs_track_pid,
-                         * then VFS operation statistics are collected for only
-                         * that PID.Write_track_xid writes pid to vfs_track_pid
-                         * here.Wei need to FORK a new process and EXEC it with
-                         * given <command>. */
-                        case 'i':
-                                get_command_from_argv(optind, argc, argv,
-                                                      optarg, command);
-                                fork_command(TRACK_BY_PID, 0, command,
-                                             llstat_file);
-                                return(0);
-
-                        /* When VFS operation statistics for all processes are
-                         * to be collected, "0" is written to vfs_track_pid. */
-                        case 'a':
-                                get_command_from_argv(optind, argc, argv,
-                                                      optarg, command);
-                                fork_command(TRACK_FOR_ALL, 0, command,
-                                             llstat_file);
-                                return(0);
-
-                        /* Help */
-                        case 'h':
-                                print_usage();
-                                return(0);
-
-                        default:
-                                print_usage();
-                                return(1);
-                }
-        return(0);
-} /* main ends */
diff --git a/lustre/utils/lustre_cfg.c b/lustre/utils/lustre_cfg.c
deleted file mode 100644
index 865d115d4828bac23a748864351bb93d3206307c..0000000000000000000000000000000000000000
--- a/lustre/utils/lustre_cfg.c
+++ /dev/null
@@ -1,740 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Robert Read <rread@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <ctype.h>
-#include <glob.h>
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-#include <lustre_lib.h>
-#include <lustre_cfg.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <obd.h>          /* for struct lov_stripe_md */
-#include <obd_lov.h>
-#include <lustre/lustre_build_version.h>
-
-#include <unistd.h>
-#include <sys/un.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <string.h>
-
-
-#include "obdctl.h"
-#include <lnet/lnetctl.h>
-#include "parser.h"
-#include <stdio.h>
-
-static char * lcfg_devname;
-
-int lcfg_set_devname(char *name)
-{
-        if (name) {
-                if (lcfg_devname)
-                        free(lcfg_devname);
-                /* quietly strip the unnecessary '$' */
-                if (*name == '$' || *name == '%')
-                        name++;
-                if (isdigit(*name)) { 
-                        /* We can't translate from dev # to name */
-                        lcfg_devname = NULL;
-                } else {
-                        lcfg_devname = strdup(name);
-                }
-        } else {
-                lcfg_devname = NULL;
-        } 
-        return 0;
-}
-
-char * lcfg_get_devname(void)
-{
-        return lcfg_devname;
-}
-
-int jt_lcfg_device(int argc, char **argv)
-{
-        return jt_obd_device(argc, argv);
-}
-
-int jt_lcfg_attach(int argc, char **argv)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int rc;
-
-        if (argc != 4)
-                return CMD_HELP;
-
-        lustre_cfg_bufs_reset(&bufs, NULL);
-
-        lustre_cfg_bufs_set_string(&bufs, 1, argv[1]);
-        lustre_cfg_bufs_set_string(&bufs, 0, argv[2]);
-        lustre_cfg_bufs_set_string(&bufs, 2, argv[3]);
-
-        lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: LCFG_ATTACH %s\n",
-                        jt_cmdname(argv[0]), strerror(rc = errno));
-        } else if (argc == 3) {
-                char name[1024];
-
-                lcfg_set_devname(argv[2]);
-                if (strlen(argv[2]) > 128) {
-                        printf("Name too long to set environment\n");
-                        return -EINVAL;
-                }
-                snprintf(name, 512, "LUSTRE_DEV_%s", argv[2]);
-                rc = setenv(name, argv[1], 1);
-                if (rc) {
-                        printf("error setting env variable %s\n", name);
-                }
-        } else {
-                lcfg_set_devname(argv[2]);
-        }
-
-        return rc;
-}
-
-int jt_lcfg_setup(int argc, char **argv)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int i;
-        int rc;
-
-        if (lcfg_devname == NULL) {
-                fprintf(stderr, "%s: please use 'device name' to set the "
-                        "device name for config commands.\n", 
-                        jt_cmdname(argv[0])); 
-                return -EINVAL;
-        }
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-
-        if (argc > 6)
-                return CMD_HELP;
-
-        for (i = 1; i < argc; i++) {
-                lustre_cfg_bufs_set_string(&bufs, i, argv[i]);
-        }
-
-        lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_detach(int argc, char **argv)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int rc;
-
-        if (lcfg_devname == NULL) {
-                fprintf(stderr, "%s: please use 'device name' to set the "
-                        "device name for config commands.\n", 
-                        jt_cmdname(argv[0])); 
-                return -EINVAL;
-        }
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        lcfg = lustre_cfg_new(LCFG_DETACH, &bufs);
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_cleanup(int argc, char **argv)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        char force = 'F';
-        char failover = 'A';
-        char flags[3] = { 0 };
-        int flag_cnt = 0, n;
-        int rc;
-
-        if (lcfg_devname == NULL) {
-                fprintf(stderr, "%s: please use 'device name' to set the "
-                        "device name for config commands.\n", 
-                        jt_cmdname(argv[0])); 
-                return -EINVAL;
-        }
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-
-        if (argc < 1 || argc > 3)
-                return CMD_HELP;
-
-        /* we are protected from overflowing our buffer by the argc
-         * check above
-         */
-        for (n = 1; n < argc; n++) {
-                if (strcmp(argv[n], "force") == 0) {
-                        flags[flag_cnt++] = force;
-                } else if (strcmp(argv[n], "failover") == 0) {
-                        flags[flag_cnt++] = failover;
-                } else {
-                        fprintf(stderr, "unknown option: %s", argv[n]);
-                        return CMD_HELP;
-                }
-        }
-
-        if (flag_cnt) {
-                lustre_cfg_bufs_set_string(&bufs, 1, flags);
-        }
-
-        lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-static 
-int do_add_uuid(char * func, char *uuid, lnet_nid_t nid) 
-{
-        int rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-        if (uuid)
-                lustre_cfg_bufs_set_string(&bufs, 1, uuid);
-
-        lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs);
-        lcfg->lcfg_nid = nid;
-        /* Poison NAL -- pre 1.4.6 will LASSERT on 0 NAL, this way it 
-           doesn't work without crashing (bz 10130) */
-        lcfg->lcfg_nal = 0x5a;
-
-#if 0
-        fprintf(stderr, "adding\tnid: %d\tuuid: %s\n",
-               lcfg->lcfg_nid, uuid);
-#endif
-        rc = lcfg_ioctl(func, OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc) {
-                fprintf(stderr, "IOC_PORTAL_ADD_UUID failed: %s\n",
-                        strerror(errno));
-                return -1;
-        }
-
-        printf ("Added uuid %s: %s\n", uuid, libcfs_nid2str(nid));
-        return 0;
-}
-
-int jt_lcfg_add_uuid(int argc, char **argv)
-{
-        lnet_nid_t nid;
-        
-        if (argc != 3) {                
-                return CMD_HELP;
-        }
-
-        nid = libcfs_str2nid(argv[2]);
-        if (nid == LNET_NID_ANY) {
-                fprintf (stderr, "Can't parse NID %s\n", argv[2]);
-                return (-1);
-        }
-
-        return do_add_uuid(argv[0], argv[1], nid);
-}
-
-int obd_add_uuid(char *uuid, lnet_nid_t nid)
-{
-        return do_add_uuid("obd_add_uuid", uuid, nid);
-}
-
-int jt_lcfg_del_uuid(int argc, char **argv)
-{
-        int rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-
-        if (argc != 2) {
-                fprintf(stderr, "usage: %s <uuid>\n", argv[0]);
-                return 0;
-        }
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-        if (strcmp (argv[1], "_all_"))
-                lustre_cfg_bufs_set_string(&bufs, 1, argv[1]);
-        
-        lcfg = lustre_cfg_new(LCFG_DEL_UUID, &bufs);
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc) {
-                fprintf(stderr, "IOC_PORTAL_DEL_UUID failed: %s\n",
-                        strerror(errno));
-                return -1;
-        }
-        return 0;
-}
-
-
-
-
-int jt_lcfg_del_mount_option(int argc, char **argv)
-{
-        int rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-
-        /* profile name */
-        lustre_cfg_bufs_set_string(&bufs, 1, argv[1]);
-
-        lcfg = lustre_cfg_new(LCFG_DEL_MOUNTOPT, &bufs);
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-        return rc;
-}
-
-int jt_lcfg_set_timeout(int argc, char **argv)
-{
-        int rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-
-        fprintf(stderr, "%s has been deprecated. Use conf_param instead.\n"
-                "e.g. conf_param lustre-MDT0000 obd_timeout=50\n",
-                jt_cmdname(argv[0]));
-        return CMD_HELP;
-
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-        lcfg = lustre_cfg_new(LCFG_SET_TIMEOUT, &bufs);
-        lcfg->lcfg_num = atoi(argv[1]);
-        
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        //rc = lcfg_mgs_ioctl(argv[0], OBD_DEV_ID, lcfg);
-
-        lustre_cfg_free(lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-        return rc;
-}
-
-
-
-int jt_lcfg_add_conn(int argc, char **argv)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int priority;
-        int rc;
-
-        if (argc == 2)
-                priority = 0;
-        else if (argc == 3)
-                priority = 1;
-        else
-                return CMD_HELP;
-
-        if (lcfg_devname == NULL) {
-                fprintf(stderr, "%s: please use 'device name' to set the "
-                        "device name for config commands.\n", 
-                        jt_cmdname(argv[0])); 
-                return -EINVAL;
-        }
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-
-        lustre_cfg_bufs_set_string(&bufs, 1, argv[1]);
-
-        lcfg = lustre_cfg_new(LCFG_ADD_CONN, &bufs);
-        lcfg->lcfg_num = priority;
-
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free (lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-
-        return rc;
-}
-
-int jt_lcfg_del_conn(int argc, char **argv)
-{
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-        int rc;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        if (lcfg_devname == NULL) {
-                fprintf(stderr, "%s: please use 'device name' to set the "
-                        "device name for config commands.\n", 
-                        jt_cmdname(argv[0])); 
-                return -EINVAL;
-        }
-
-        lustre_cfg_bufs_reset(&bufs, lcfg_devname);
-
-        /* connection uuid */
-        lustre_cfg_bufs_set_string(&bufs, 1, argv[1]);
-
-        lcfg = lustre_cfg_new(LCFG_DEL_MOUNTOPT, &bufs);
-
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-
-        return rc;
-}
-
-/* Param set locally, directly on target */
-int jt_lcfg_param(int argc, char **argv)
-{
-        int i, rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-
-        if (argc >= LUSTRE_CFG_MAX_BUFCOUNT)
-                return CMD_HELP;
-
-        lustre_cfg_bufs_reset(&bufs, NULL);
-
-        for (i = 1; i < argc; i++) {
-                lustre_cfg_bufs_set_string(&bufs, i, argv[i]);
-        }
-
-        lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
-        
-        rc = lcfg_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-        return rc;
-}
-
-/* Param set in config log on MGS */
-/* conf_param key1=value1 [key2=value2...] */
-int jt_lcfg_mgsparam(int argc, char **argv)
-{
-        int i, rc;
-        struct lustre_cfg_bufs bufs;
-        struct lustre_cfg *lcfg;
-
-        if ((argc >= LUSTRE_CFG_MAX_BUFCOUNT) || (argc <= 1))
-                return CMD_HELP;
-
-        lustre_cfg_bufs_reset(&bufs, NULL);
-
-        for (i = 1; i < argc; i++) {
-                lustre_cfg_bufs_set_string(&bufs, i, argv[i]);
-        }
-
-        /* We could put other opcodes here. */
-        lcfg = lustre_cfg_new(LCFG_PARAM, &bufs);
-
-        rc = lcfg_mgs_ioctl(argv[0], OBD_DEV_ID, lcfg);
-        lustre_cfg_free(lcfg);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-        
-        return rc;
-}
-
-/* Display the path in the same format as sysctl
- * For eg. obdfilter.lustre-OST0000.stats */
-static char *display_name(char *filename)
-{
-        char *tmp;
-
-        filename += strlen("/proc/");
-        if (strncmp(filename, "fs/", strlen("fs/")) == 0)
-                filename += strlen("fs/");
-        else
-                filename += strlen("sys/");
-
-        if (strncmp(filename, "lustre/", strlen("lustre/")) == 0)
-                filename += strlen("lustre/");
-
-        /* replace '/' with '.' to match conf_param and sysctl */
-        tmp = filename;
-        while ((tmp = strchr(tmp, '/')) != NULL)
-                *tmp = '.';
-
-        return filename;
-}
-
-/* Find a character in a length limited string */
-static char *strnchr(const char *p, char c, size_t n)
-{
-       if (!p)
-               return (0);
-
-       while (n-- > 0) {
-               if (*p == c)
-                       return ((char *)p);
-               p++;
-       }
-       return (0);
-}
-
-int jt_lcfg_getparam(int argc, char **argv)
-{
-        int fp;
-        int rc = 0, i, show_path = 0;
-        char pattern[PATH_MAX];
-        char *path, *tmp, *buf;
-        glob_t glob_info;
-
-        if (argc == 3 && strcmp(argv[1], "-n") == 0) {
-                path = argv[2];
-        } else if (argc == 2) {
-                show_path = 1;
-                path = argv[1];
-        } else {
-                return CMD_HELP;
-        }
-
-        /* If the input is in form Eg. obdfilter.*.stats */
-        if (strchr(path, '.')) {
-                tmp = path;
-                while (*tmp != '\0') {
-                        if (*tmp == '.')
-                                *tmp = '/';
-                        tmp ++;
-                }
-        }
-
-        /* If the entire path is specified as input */
-        fp = open(path, O_RDONLY);
-        if (fp < 0)
-                snprintf(pattern, PATH_MAX, "/proc/{fs,sys}/{lnet,lustre}/%s",
-                         path);
-        else {
-                strcpy(pattern, path);
-                close(fp);
-        }
-
-        rc = glob(pattern, GLOB_BRACE, NULL, &glob_info);
-        if (rc) {
-                fprintf(stderr, "error : glob %s: %s \n", pattern,strerror(rc));
-                return rc;
-        }
-
-        buf = malloc(CFS_PAGE_SIZE);
-        for (i = 0; i  < glob_info.gl_pathc; i++) {
-                char *valuename = NULL;
-
-                memset(buf, 0, CFS_PAGE_SIZE);
-                if (show_path) {
-                        char *filename;
-                        filename = strdup(glob_info.gl_pathv[i]);
-                        valuename = display_name(filename);
-                }
-
-                /* Write the contents of file to stdout */
-                fp = open(glob_info.gl_pathv[i], O_RDONLY);
-                if (fp < 0) {
-                        fprintf(stderr, "error: %s: opening('%s') failed: %s\n",
-                                jt_cmdname(argv[0]), glob_info.gl_pathv[i],
-                                strerror(errno));
-                        continue;
-                }
-
-                do {
-                        rc = read(fp, buf, CFS_PAGE_SIZE);
-                        if (rc == 0)
-                                break;
-                        if (rc < 0) {
-                                fprintf(stderr, "error: %s: read('%s') "
-                                        "failed: %s\n", jt_cmdname(argv[0]),
-                                        glob_info.gl_pathv[i], strerror(errno));
-                                break;
-                        }
-                        /* Print the output in the format path=value if the
-                         * value contains no new line character or cab be
-                         * occupied in a line, else print value on new line */
-                        if (valuename && show_path) {
-                                int longbuf = strnchr(buf, rc - 1, '\n') != NULL
-                                              || rc > 60;
-                                printf("%s=%s", valuename, longbuf ? "\n" : buf);
-                                valuename = NULL;
-                                if (!longbuf)
-                                        continue;
-                                fflush(stdout);
-                        }
-                        rc = write(fileno(stdout), buf, rc);
-                        if (rc < 0) {
-                                fprintf(stderr, "error: %s: write to stdout "
-                                        "failed: %s\n", jt_cmdname(argv[0]),
-                                        strerror(errno));
-                                break;
-                        }
-                } while (1);
-                close(fp);
-        }
-
-        globfree(&glob_info);
-        free(buf);
-        return rc;
-}
-
-
-int jt_lcfg_setparam(int argc, char **argv)
-{
-        int rc = 0, i;
-        int fp, show_path = 0;
-        char pattern[PATH_MAX];
-        char *path, *value, *tmp;
-        glob_t glob_info;
-
-        path = argv[1];
-        if (argc == 4 && (strcmp(argv[1], "-n") == 0)) {
-                /* Format: lctl set_param -n param value */
-                path = argv[2];
-                value = argv[3];
-        } else if (argc == 3) {
-                if (strcmp(argv[1], "-n") != 0) {
-                        /* Format: lctl set_param param value */
-                        show_path = 1;
-                        value = argv[2];
-                } else if ((value = strchr(argv[2], '=')) != NULL) {
-                        /* Format: lctl set_param -n param=value */
-                        path = argv[2];
-                        *value = '\0';
-                        value ++;
-                } else {
-                        fprintf(stderr, "error: %s Incorrect arguments."
-                                        "See Usage\n",
-                                jt_cmdname(argv[0]));
-                        return CMD_HELP;
-                }
-        } else if (argc == 2 && ((value = strchr(argv[1], '=')) != NULL)) {
-                /* Format: lctl set_param param=value */
-                show_path = 1;
-                *value = '\0';
-                value++;
-        } else {
-                fprintf(stderr, "error: %s Incorrect arguments. See Usage\n",
-                        jt_cmdname(argv[0]));
-                return CMD_HELP;
-        }
-
-        /* If the input is in form Eg. obdfilter.*.stats */
-        if (strchr(path, '.')) {
-                tmp = path;
-                while (*tmp != '\0') {
-                        if (*tmp == '.')
-                                *tmp = '/';
-                        tmp ++;
-                }
-        }
-
-        fp = open(path, O_RDONLY);
-        if (fp < 0)
-                snprintf(pattern, PATH_MAX, "/proc/{fs,sys}/{lnet,lustre}/%s",
-                         path);
-        else {
-                strcpy(pattern, path);
-                close(fp);
-        }
-
-        rc = glob(pattern, GLOB_BRACE, NULL, &glob_info);
-        if (rc) {
-                fprintf(stderr, "error : glob %s: %s \n", pattern,strerror(rc));
-                return rc;
-        }
-        for (i = 0; i  < glob_info.gl_pathc; i++) {
-                if (show_path) {
-                        char *valuename, *filename;
-                        filename = strdup(glob_info.gl_pathv[i]);
-                        valuename = display_name(filename);
-                        printf("%s=%s\n", valuename, value);
-                }
-                /* Write the new value to the file */
-                fp = open(glob_info.gl_pathv[i], O_WRONLY);
-                if (fp > 0) {
-                        rc = write(fp, value, strlen(value));
-                        if (rc < 0)
-                                fprintf(stderr,
-                                        "error writing to file %s\n",
-                                        glob_info.gl_pathv[i]);
-                        else
-                                rc = 0;
-                        close(fp);
-                } else {
-                        fprintf(stderr, "error: %s: %s opening %s\n",
-                                jt_cmdname(argv[0]), strerror(rc = errno),
-                                glob_info.gl_pathv[i]);
-                }
-        }
-
-        globfree(&glob_info);
-        return rc;
-}
diff --git a/lustre/utils/mkfs_lustre.c b/lustre/utils/mkfs_lustre.c
deleted file mode 100644
index d872ecf6363503d83979676a6fa89ae1cb424532..0000000000000000000000000000000000000000
--- a/lustre/utils/mkfs_lustre.c
+++ /dev/null
@@ -1,1597 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   Copyright (C) 2006 Cluster File Systems, Inc.
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
- /* This source file is compiled into both mkfs.lustre and tunefs.lustre */
-
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdarg.h>
-#include <mntent.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/mount.h>
-#include <sys/utsname.h>
-
-#include <string.h>
-#include <getopt.h>
-#include <limits.h>
-
-#ifdef __linux__
-/* kp30.h is not really needed here, but on SLES10/PPC, fs.h includes idr.h which
- * requires BITS_PER_LONG to be defined */
-#include <libcfs/kp30.h>
-#include <linux/fs.h> /* for BLKGETSIZE64 */
-#include <linux/version.h>
-#endif
-#include <lustre_disk.h>
-#include <lustre_param.h>
-#include <lnet/lnetctl.h>
-#include <lustre_ver.h>
-
-#ifndef PATH_MAX
-#define PATH_MAX 4096
-#endif
-
-#define MAX_LOOP_DEVICES 16
-#define L_BLOCK_SIZE 4096
-#define INDEX_UNASSIGNED 0xFFFF
-#define MO_IS_LOOP     0x01
-#define MO_FORCEFORMAT 0x02
-
-/* used to describe the options to format the lustre disk, not persistent */
-struct mkfs_opts {
-        struct lustre_disk_data mo_ldd; /* to be written in MOUNT_DATA_FILE */
-        char  mo_device[128];           /* disk device name */
-        char  mo_mkfsopts[128];         /* options to the backing-store mkfs */
-        char  mo_loopdev[128];          /* in case a loop dev is needed */
-        __u64 mo_device_sz;             /* in KB */
-        int   mo_stripe_count;
-        int   mo_flags;
-        int   mo_mgs_failnodes;
-};
-
-static char *progname;
-static int verbose = 1;
-static int print_only = 0;
-static int failover = 0;
-
-void usage(FILE *out)
-{
-        fprintf(out, "%s v"LUSTRE_VERSION_STRING"\n", progname);
-        fprintf(out, "usage: %s <target types> [options] <device>\n", progname);
-        fprintf(out,
-                "\t<device>:block device or file (e.g /dev/sda or /tmp/ost1)\n"
-                "\ttarget types:\n"
-                "\t\t--ost: object storage, mutually exclusive with mdt,mgs\n"
-                "\t\t--mdt: metadata storage, mutually exclusive with ost\n"
-                "\t\t--mgs: configuration management service - one per site\n"
-                "\toptions (in order of popularity):\n"
-                "\t\t--mgsnode=<nid>[,<...>] : NID(s) of a remote mgs node\n"
-                "\t\t\trequired for all targets other than the mgs node\n"
-                "\t\t--fsname=<filesystem_name> : default is 'lustre'\n"
-                "\t\t--failnode=<nid>[,<...>] : NID(s) of a failover partner\n"
-                "\t\t--param <key>=<value> : set a permanent parameter\n"
-                "\t\t\te.g. --param sys.timeout=40\n"
-                "\t\t\t     --param lov.stripesize=2M\n"
-                "\t\t--index=#N : target index (i.e. ost index within the lov)\n"
-                /* FIXME implement 1.6.x
-                "\t\t--configdev=<altdevice|file>: store configuration info\n"
-                "\t\t\tfor this device on an alternate device\n"
-                */
-                "\t\t--comment=<user comment>: arbitrary user string (%d bytes)\n"
-                "\t\t--mountfsoptions=<opts> : permanent mount options\n"
-#ifndef TUNEFS
-                "\t\t--backfstype=<fstype> : backing fs type (ext3, ldiskfs)\n"
-                "\t\t--device-size=#N(KB) : device size for loop devices\n"
-                "\t\t--mkfsoptions=<opts> : format options\n"
-                "\t\t--reformat: overwrite an existing disk\n"
-                "\t\t--stripe-count-hint=#N : used for optimizing MDT inode size\n"
-#else
-                "\t\t--erase-params : erase all old parameter settings\n"
-                "\t\t--nomgs: turn off MGS service on this MDT\n"
-                "\t\t--writeconf: erase all config logs for this fs.\n"
-#endif
-                "\t\t--dryrun: just report what we would do; "
-                "don't write to disk\n"
-                "\t\t--verbose : e.g. show mkfs progress\n"
-                "\t\t--quiet\n",
-                (int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata));
-        return;
-}
-
-#define vprint if (verbose > 0) printf
-#define verrprint if (verbose >= 0) printf
-
-static void fatal(void)
-{
-        verbose = 0;
-        fprintf(stderr, "\n%s FATAL: ", progname);
-}
-
-/*================ utility functions =====================*/
-
-char *strscat(char *dst, char *src, int buflen) {
-        dst[buflen - 1] = 0;
-        if (strlen(dst) + strlen(src) >= buflen) {
-                fprintf(stderr, "string buffer overflow (max %d): '%s' + '%s'"
-                        "\n", buflen, dst, src);
-                exit(EOVERFLOW);
-        }
-        return strcat(dst, src);
-
-}
-
-char *strscpy(char *dst, char *src, int buflen) {
-        dst[0] = 0;
-        return strscat(dst, src, buflen);
-}
-
-inline unsigned int
-dev_major (unsigned long long int __dev)
-{
-        return ((__dev >> 8) & 0xfff) | ((unsigned int) (__dev >> 32) & ~0xfff);
-}
-
-inline unsigned int
-dev_minor (unsigned long long int __dev)
-{
-        return (__dev & 0xff) | ((unsigned int) (__dev >> 12) & ~0xff);
-}
-
-int get_os_version()
-{
-        static int version = 0;
-
-        if (!version) {
-                int fd;
-                char release[4] = "";
-
-                fd = open("/proc/sys/kernel/osrelease", O_RDONLY);
-                if (fd < 0)
-                        fprintf(stderr, "%s: Warning: Can't resolve kernel "
-                                "version, assuming 2.6\n", progname);
-                else {
-                        read(fd, release, 4);
-                        close(fd);
-                }
-                if (strncmp(release, "2.4.", 4) == 0)
-                        version = 24;
-                else
-                        version = 26;
-        }
-        return version;
-}
-
-int run_command(char *cmd, int cmdsz)
-{
-        char log[] = "/tmp/mkfs_logXXXXXX";
-        int fd = -1, rc;
-
-        if ((cmdsz - strlen(cmd)) < 6) {
-                fatal();
-                fprintf(stderr, "Command buffer overflow: %.*s...\n",
-                        cmdsz, cmd);
-                return ENOMEM;
-        }
-
-        if (verbose > 1) {
-                printf("cmd: %s\n", cmd);
-        } else {
-                if ((fd = mkstemp(log)) >= 0) {
-                        close(fd);
-                        strcat(cmd, " >");
-                        strcat(cmd, log);
-                }
-        }
-        strcat(cmd, " 2>&1");
-
-        /* Can't use popen because we need the rv of the command */
-        rc = system(cmd);
-        if (rc && (fd >= 0)) {
-                char buf[128];
-                FILE *fp;
-                fp = fopen(log, "r");
-                if (fp) {
-                        while (fgets(buf, sizeof(buf), fp) != NULL) {
-                                printf("   %s", buf);
-                        }
-                        fclose(fp);
-                }
-        }
-        if (fd >= 0)
-                remove(log);
-        return rc;
-}
-
-static int check_mtab_entry(char *spec)
-{
-        FILE *fp;
-        struct mntent *mnt;
-
-        fp = setmntent(MOUNTED, "r");
-        if (fp == NULL)
-                return(0);
-
-        while ((mnt = getmntent(fp)) != NULL) {
-                if (strcmp(mnt->mnt_fsname, spec) == 0) {
-                        endmntent(fp);
-                        fprintf(stderr, "%s: according to %s %s is "
-                                "already mounted on %s\n",
-                                progname, MOUNTED, spec, mnt->mnt_dir);
-                        return(EEXIST);
-                }
-        }
-        endmntent(fp);
-
-        return(0);
-}
-
-/*============ disk dev functions ===================*/
-
-/* Setup a file in the first unused loop_device */
-int loop_setup(struct mkfs_opts *mop)
-{
-        char loop_base[20];
-        char l_device[64];
-        int i,ret = 0;
-
-        /* Figure out the loop device names */
-        if (!access("/dev/loop0", F_OK | R_OK))
-                strcpy(loop_base, "/dev/loop\0");
-        else if (!access("/dev/loop/0", F_OK | R_OK))
-                strcpy(loop_base, "/dev/loop/\0");
-        else {
-                fprintf(stderr, "%s: can't access loop devices\n", progname);
-                return EACCES;
-        }
-
-        /* Find unused loop device */
-        for (i = 0; i < MAX_LOOP_DEVICES; i++) {
-                char cmd[PATH_MAX];
-                int cmdsz = sizeof(cmd);
-
-                sprintf(l_device, "%s%d", loop_base, i);
-                if (access(l_device, F_OK | R_OK))
-                        break;
-                snprintf(cmd, cmdsz, "losetup %s > /dev/null 2>&1", l_device);
-                ret = system(cmd);
-
-                /* losetup gets 1 (ret=256) for non-set-up device */
-                if (ret) {
-                        /* Set up a loopback device to our file */
-                        snprintf(cmd, cmdsz, "losetup %s %s", l_device,
-                                 mop->mo_device);
-                        ret = run_command(cmd, cmdsz);
-                        if (ret) {
-                                fprintf(stderr, "%s: error %d on losetup: %s\n",
-                                        progname, ret, strerror(ret));
-                                return ret;
-                        }
-                        strscpy(mop->mo_loopdev, l_device,
-                                sizeof(mop->mo_loopdev));
-                        return ret;
-                }
-        }
-
-        fprintf(stderr, "%s: out of loop devices!\n", progname);
-        return EMFILE;
-}
-
-int loop_cleanup(struct mkfs_opts *mop)
-{
-        char cmd[150];
-        int ret = 1;
-        if ((mop->mo_flags & MO_IS_LOOP) && *mop->mo_loopdev) {
-                sprintf(cmd, "losetup -d %s", mop->mo_loopdev);
-                ret = run_command(cmd, sizeof(cmd));
-        }
-        return ret;
-}
-
-/* Determine if a device is a block device (as opposed to a file) */
-int is_block(char* devname)
-{
-        struct stat st;
-        int ret = 0;
-
-        ret = access(devname, F_OK);
-        if (ret != 0)
-                return 0;
-        ret = stat(devname, &st);
-        if (ret != 0) {
-                fprintf(stderr, "%s: cannot stat %s\n", progname, devname);
-                return -1;
-        }
-        return S_ISBLK(st.st_mode);
-}
-
-__u64 get_device_size(char* device)
-{
-        int ret, fd;
-        __u64 size = 0;
-
-        fd = open(device, O_RDONLY);
-        if (fd < 0) {
-                fprintf(stderr, "%s: cannot open %s: %s\n",
-                        progname, device, strerror(errno));
-                return 0;
-        }
-
-#ifdef BLKGETSIZE64
-        /* size in bytes. bz5831 */
-        ret = ioctl(fd, BLKGETSIZE64, (void*)&size);
-#else
-        {
-                __u32 lsize = 0;
-                /* size in blocks */
-                ret = ioctl(fd, BLKGETSIZE, (void*)&lsize);
-                size = (__u64)lsize * 512;
-        }
-#endif
-        close(fd);
-        if (ret < 0) {
-                fprintf(stderr, "%s: size ioctl failed: %s\n",
-                        progname, strerror(errno));
-                return 0;
-        }
-
-        vprint("device size = "LPU64"MB\n", size >> 20);
-        /* return value in KB */
-        return size >> 10;
-}
-
-int loop_format(struct mkfs_opts *mop)
-{
-        int ret = 0;
-
-        if (mop->mo_device_sz == 0) {
-                fatal();
-                fprintf(stderr, "loop device requires a --device-size= "
-                        "param\n");
-                return EINVAL;
-        }
-
-        ret = creat(mop->mo_device, S_IRUSR|S_IWUSR);
-        ret = truncate(mop->mo_device, mop->mo_device_sz * 1024);
-        if (ret != 0) {
-                ret = errno;
-                fprintf(stderr, "%s: Unable to create backing store: %d\n",
-                        progname, ret);
-        }
-
-        return ret;
-}
-
-/* Display the need for the latest e2fsprogs to be installed. make_backfs
- * indicates if the caller is make_lustre_backfs() or not. */
-static void disp_old_e2fsprogs_msg(const char *feature, int make_backfs)
-{
-        static int msg_displayed;
-
-        if (msg_displayed) {
-                fprintf(stderr, "WARNING: e2fsprogs does not support %s "
-                        "feature.\n\n", feature);
-                return;
-        }
-
-        msg_displayed++;
-
-        fprintf(stderr, "WARNING: The e2fsprogs package currently installed on "
-                "your system does not support \"%s\" feature.\nPlease install "
-                "the latest version of e2fsprogs from http://www.clusterfs.com/"
-                "downloads/public/Lustre/Tools/e2fsprogs/\nto enable this "
-                "feature.\n", feature);
-
-        if (make_backfs)
-                fprintf(stderr, "Feature will not be enabled until e2fsprogs "
-                        "is updated and 'tune2fs -O %s %%{device}' "
-                        "is run.\n\n", feature);
-}
-
-/* Check whether the file exists in the device */
-static int file_in_dev(char *file_name, char *dev_name)
-{
-        FILE *fp;
-        char debugfs_cmd[256];
-        unsigned int inode_num;
-        int i;
-
-        /* Construct debugfs command line. */
-        snprintf(debugfs_cmd, sizeof(debugfs_cmd),
-                "debugfs -c -R 'stat %s' %s 2>&1 | egrep '(Inode|unsupported)'",
-                file_name, dev_name);
-
-        fp = popen(debugfs_cmd, "r");
-        if (!fp) {
-                fprintf(stderr, "%s: %s\n", progname, strerror(errno));
-                return 0;
-        }
-
-        if (fscanf(fp, "Inode: %u", &inode_num) == 1) { /* exist */
-                pclose(fp);
-                return 1;
-        }
-        i = fread(debugfs_cmd, 1, sizeof(debugfs_cmd), fp);
-        if (i) {
-                debugfs_cmd[i] = 0;
-                fprintf(stderr, "%s", debugfs_cmd);
-                if (strstr(debugfs_cmd, "unsupported feature")) {
-                        disp_old_e2fsprogs_msg("an unknown", 0);
-                }
-                return -1;
-        }
-        pclose(fp);
-        return 0;
-}
-
-/* Check whether the device has already been used with lustre */
-static int is_lustre_target(struct mkfs_opts *mop)
-{
-        int rc;
-        vprint("checking for existing Lustre data: ");
-
-        if ((rc = file_in_dev(MOUNT_DATA_FILE, mop->mo_device))) {
-                vprint("found %s\n",
-                       (rc == 1) ? MOUNT_DATA_FILE : "extents");
-                 /* in the -1 case, 'extents' means this really IS a lustre
-                    target */
-                return rc;
-        }
-
-        if ((rc = file_in_dev(LAST_RCVD, mop->mo_device))) {
-                vprint("found %s\n", LAST_RCVD);
-                return rc;
-        }
-
-        vprint("not found\n");
-        return 0; /* The device is not a lustre target. */
-}
-
-/* Check if a certain feature is supported by e2fsprogs.
- * Firstly we try to use "debugfs supported_features" command to check if
- * the feature is supported. If this fails we try to set this feature with
- * mke2fs to check for its support. */
-static int is_e2fsprogs_feature_supp(const char *feature)
-{
-        FILE *fp;
-        char cmd[PATH_MAX];
-        char imgname[] = "/tmp/test-img-XXXXXX";
-        int fd = -1;
-        int ret = 0;
-
-        snprintf(cmd, sizeof(cmd),
-                 "debugfs -c -R \"supported_features %s\" 2>&1", feature);
-
-        /* Using popen() instead of run_command() since debugfs does not return
-         * proper error code if command is not supported */
-        fp = popen(cmd, "r");
-        if (!fp) {
-                fprintf(stderr, "%s: %s\n", progname, strerror(errno));
-                return 0;
-        }
-        ret = fread(cmd, 1, sizeof(cmd), fp);
-        if (ret > 0) {
-                if (strstr(cmd, feature) && !(strstr(cmd, "Unknown")))
-                        return 0;
-        }
-
-        if ((fd = mkstemp(imgname)) < 0)
-                return -1;
-
-        snprintf(cmd, sizeof(cmd), "mke2fs -F -O %s %s 100 >/dev/null 2>&1",
-                 feature, imgname);
-        /* run_command() displays the output of mke2fs when it fails for
-         * some feature, so use system() directly */
-        ret = system(cmd);
-        if (fd >= 0)
-                remove(imgname);
-
-        return ret;
-}
-
-static void disp_old_kernel_msg(char *feature)
-{
-       fprintf(stderr, "WARNING: ldiskfs filesystem does not support \"%s\" "
-               "feature.\n\n", feature);
-}
-
-static void enable_default_backfs_features(struct mkfs_opts *mop)
-{
-        struct utsname uts;
-        int maj_high, maj_low, min;
-        int ret;
-
-        strscat(mop->mo_mkfsopts, " -O dir_index", sizeof(mop->mo_mkfsopts));
-
-        if (is_e2fsprogs_feature_supp("uninit_groups") == 0)
-                strscat(mop->mo_mkfsopts, ",uninit_groups",
-                        sizeof(mop->mo_mkfsopts));
-        else
-                disp_old_e2fsprogs_msg("uninit_groups", 1);
-
-        ret = uname(&uts);
-        if (ret)
-                return;
-
-        sscanf(uts.release, "%d.%d.%d", &maj_high, &maj_low, &min);
-        printf("%d %d %d\n", maj_high, maj_low, min);
-
-        /* Multiple mount protection is enabled only if failover node is
-         * specified and if kernel version is higher than 2.6.9 */
-        if (failover) {
-                if (KERNEL_VERSION(maj_high, maj_low, min) >=
-                    KERNEL_VERSION(2,6,9)) {
-                        if (is_e2fsprogs_feature_supp("mmp") == 0)
-                                strscat(mop->mo_mkfsopts, ",mmp",
-                                        sizeof(mop->mo_mkfsopts));
-                        else
-                                disp_old_e2fsprogs_msg("mmp", 1);
-                } else {
-                        disp_old_kernel_msg("mmp");
-                }
-        }
-}
-/* Build fs according to type */
-int make_lustre_backfs(struct mkfs_opts *mop)
-{
-        char mkfs_cmd[PATH_MAX];
-        char buf[64];
-        char *dev;
-        int ret = 0;
-        int block_count = 0;
-
-        if (mop->mo_device_sz != 0) {
-                if (mop->mo_device_sz < 8096){
-                        fprintf(stderr, "%s: size of filesystem must be larger "
-                                "than 8MB, but is set to %lluKB\n",
-                                progname, (long long)mop->mo_device_sz);
-                        return EINVAL;
-                }
-                block_count = mop->mo_device_sz / (L_BLOCK_SIZE >> 10);
-        }
-
-        if ((mop->mo_ldd.ldd_mount_type == LDD_MT_EXT3) ||
-            (mop->mo_ldd.ldd_mount_type == LDD_MT_LDISKFS) ||
-            (mop->mo_ldd.ldd_mount_type == LDD_MT_LDISKFS2)) {
-                __u64 device_sz = mop->mo_device_sz;
-
-                /* we really need the size */
-                if (device_sz == 0) {
-                        device_sz = get_device_size(mop->mo_device);
-                        if (device_sz == 0)
-                                return ENODEV;
-                }
-
-                /* Journal size in MB */
-                if (strstr(mop->mo_mkfsopts, "-J") == NULL) {
-                        /* Choose our own default journal size */
-                        long journal_sz = 0, max_sz;
-                        if (device_sz > 1024 * 1024) /* 1GB */
-                                journal_sz = (device_sz / 102400) * 4;
-                        /* man mkfs.ext3 */
-                        max_sz = (102400 * L_BLOCK_SIZE) >> 20; /* 400MB */
-                        if (journal_sz > max_sz)
-                                journal_sz = max_sz;
-                        if (journal_sz) {
-                                sprintf(buf, " -J size=%ld", journal_sz);
-                                strscat(mop->mo_mkfsopts, buf,
-                                        sizeof(mop->mo_mkfsopts));
-                        }
-                }
-
-                /* bytes_per_inode: disk size / num inodes */
-                if (strstr(mop->mo_mkfsopts, "-i") == NULL) {
-                        long bytes_per_inode = 0;
-
-                        if (IS_MDT(&mop->mo_ldd))
-                                bytes_per_inode = 4096;
-
-                        /* Allocate fewer inodes on large OST devices.  Most
-                           filesystems can be much more aggressive than even
-                           this. */
-                        if ((IS_OST(&mop->mo_ldd) && (device_sz > 1000000)))
-                                bytes_per_inode = 16384;
-
-                        if (bytes_per_inode > 0) {
-                                sprintf(buf, " -i %ld", bytes_per_inode);
-                                strscat(mop->mo_mkfsopts, buf,
-                                        sizeof(mop->mo_mkfsopts));
-                        }
-                }
-
-                /* Inode size (for extended attributes).  The LOV EA size is
-                 * 32 (EA hdr) + 32 (lov_mds_md) + stripes * 24 (lov_ost_data),
-                 * and we want some margin above that for ACLs, other EAs... */
-                if (strstr(mop->mo_mkfsopts, "-I") == NULL) {
-                        long inode_size = 0;
-                        if (IS_MDT(&mop->mo_ldd)) {
-                                if (mop->mo_stripe_count > 72)
-                                        inode_size = 512; /* bz 7241 */
-                                /* cray stripes across all osts (>60) */
-                                else if (mop->mo_stripe_count > 32)
-                                        inode_size = 2048;
-                                else if (mop->mo_stripe_count > 10)
-                                        inode_size = 1024;
-                                else
-                                        inode_size = 512;
-                        } else if (IS_OST(&mop->mo_ldd)) {
-                                /* now as we store fids in EA on OST we need
-                                   to make inode bigger */
-                                inode_size = 256;
-                        }
-
-                        if (inode_size > 0) {
-                                sprintf(buf, " -I %ld", inode_size);
-                                strscat(mop->mo_mkfsopts, buf,
-                                        sizeof(mop->mo_mkfsopts));
-                        }
-                }
-
-                if (verbose < 2) {
-                        strscat(mop->mo_mkfsopts, " -q",
-                                sizeof(mop->mo_mkfsopts));
-                }
-
-                if (strstr(mop->mo_mkfsopts, "-O") == NULL)
-                        enable_default_backfs_features(mop);
-
-                /* Allow reformat of full devices (as opposed to
-                   partitions.)  We already checked for mounted dev. */
-                strscat(mop->mo_mkfsopts, " -F", sizeof(mop->mo_mkfsopts));
-
-                snprintf(mkfs_cmd, sizeof(mkfs_cmd),
-                         "mkfs.ext2 -j -b %d -L %s ", L_BLOCK_SIZE,
-                         mop->mo_ldd.ldd_svname);
-
-        } else if (mop->mo_ldd.ldd_mount_type == LDD_MT_REISERFS) {
-                long journal_sz = 0; /* FIXME default journal size */
-                if (journal_sz > 0) {
-                        sprintf(buf, " --journal_size %ld", journal_sz);
-                        strscat(mop->mo_mkfsopts, buf,
-                                sizeof(mop->mo_mkfsopts));
-                }
-                snprintf(mkfs_cmd, sizeof(mkfs_cmd), "mkreiserfs -ff ");
-
-        } else {
-                fprintf(stderr,"%s: unsupported fs type: %d (%s)\n",
-                        progname, mop->mo_ldd.ldd_mount_type,
-                        MT_STR(&mop->mo_ldd));
-                return EINVAL;
-        }
-
-        /* For loop device format the dev, not the filename */
-        dev = mop->mo_device;
-        if (mop->mo_flags & MO_IS_LOOP)
-                dev = mop->mo_loopdev;
-
-        vprint("formatting backing filesystem %s on %s\n",
-               MT_STR(&mop->mo_ldd), dev);
-        vprint("\ttarget name  %s\n", mop->mo_ldd.ldd_svname);
-        vprint("\t4k blocks     %d\n", block_count);
-        vprint("\toptions       %s\n", mop->mo_mkfsopts);
-
-        /* mkfs_cmd's trailing space is important! */
-        strscat(mkfs_cmd, mop->mo_mkfsopts, sizeof(mkfs_cmd));
-        strscat(mkfs_cmd, " ", sizeof(mkfs_cmd));
-        strscat(mkfs_cmd, dev, sizeof(mkfs_cmd));
-        if (block_count != 0) {
-                sprintf(buf, " %d", block_count);
-                strscat(mkfs_cmd, buf, sizeof(mkfs_cmd));
-        }
-
-        vprint("mkfs_cmd = %s\n", mkfs_cmd);
-        ret = run_command(mkfs_cmd, sizeof(mkfs_cmd));
-        if (ret) {
-                fatal();
-                fprintf(stderr, "Unable to build fs %s (%d)\n", dev, ret);
-        }
-        return ret;
-}
-
-/* ==================== Lustre config functions =============*/
-
-void print_ldd(char *str, struct lustre_disk_data *ldd)
-{
-        printf("\n   %s:\n", str);
-        printf("Target:     %s\n", ldd->ldd_svname);
-        if (ldd->ldd_svindex == INDEX_UNASSIGNED)
-                printf("Index:      unassigned\n");
-        else
-                printf("Index:      %d\n", ldd->ldd_svindex);
-        if (ldd->ldd_uuid[0])
-                printf("UUID:       %s\n", (char *)ldd->ldd_uuid);
-        printf("Lustre FS:  %s\n", ldd->ldd_fsname);
-        printf("Mount type: %s\n", MT_STR(ldd));
-        printf("Flags:      %#x\n", ldd->ldd_flags);
-        printf("              (%s%s%s%s%s%s%s%s)\n",
-               IS_MDT(ldd) ? "MDT ":"",
-               IS_OST(ldd) ? "OST ":"",
-               IS_MGS(ldd) ? "MGS ":"",
-               ldd->ldd_flags & LDD_F_NEED_INDEX ? "needs_index ":"",
-               ldd->ldd_flags & LDD_F_VIRGIN     ? "first_time ":"",
-               ldd->ldd_flags & LDD_F_UPDATE     ? "update ":"",
-               ldd->ldd_flags & LDD_F_WRITECONF  ? "writeconf ":"",
-               ldd->ldd_flags & LDD_F_UPGRADE14  ? "upgrade1.4 ":"");
-        printf("Persistent mount opts: %s\n", ldd->ldd_mount_opts);
-        printf("Parameters:%s\n", ldd->ldd_params);
-        if (ldd->ldd_userdata[0])
-                printf("Comment: %s\n", ldd->ldd_userdata);
-        printf("\n");
-}
-
-/* Write the server config files */
-int write_local_files(struct mkfs_opts *mop)
-{
-        char mntpt[] = "/tmp/mntXXXXXX";
-        char filepnm[128];
-        char *dev;
-        FILE *filep;
-        int ret = 0;
-
-        /* Mount this device temporarily in order to write these files */
-        if (!mkdtemp(mntpt)) {
-                fprintf(stderr, "%s: Can't create temp mount point %s: %s\n",
-                        progname, mntpt, strerror(errno));
-                return errno;
-        }
-
-        dev = mop->mo_device;
-        if (mop->mo_flags & MO_IS_LOOP)
-                dev = mop->mo_loopdev;
-
-        ret = mount(dev, mntpt, MT_STR(&mop->mo_ldd), 0, NULL);
-        if (ret) {
-                fprintf(stderr, "%s: Unable to mount %s: %s\n",
-                        progname, dev, strerror(errno));
-                ret = errno;
-                if (errno == ENODEV) {
-                        fprintf(stderr, "Is the %s module available?\n",
-                                MT_STR(&mop->mo_ldd));
-                }
-                goto out_rmdir;
-        }
-
-        /* Set up initial directories */
-        sprintf(filepnm, "%s/%s", mntpt, MOUNT_CONFIGS_DIR);
-        ret = mkdir(filepnm, 0777);
-        if ((ret != 0) && (errno != EEXIST)) {
-                fprintf(stderr, "%s: Can't make configs dir %s: %s\n",
-                        progname, filepnm, strerror(errno));
-                goto out_umnt;
-        } else if (errno == EEXIST) {
-                ret = 0;
-        }
-
-        /* Save the persistent mount data into a file. Lustre must pre-read
-           this file to get the real mount options. */
-        vprint("Writing %s\n", MOUNT_DATA_FILE);
-        sprintf(filepnm, "%s/%s", mntpt, MOUNT_DATA_FILE);
-        filep = fopen(filepnm, "w");
-        if (!filep) {
-                fprintf(stderr, "%s: Unable to create %s file: %s\n",
-                        progname, filepnm, strerror(errno));
-                goto out_umnt;
-        }
-        fwrite(&mop->mo_ldd, sizeof(mop->mo_ldd), 1, filep);
-        fclose(filep);
-
-        /* COMPAT_146 */
-#ifdef TUNEFS
-        /* Check for upgrade */
-        if ((mop->mo_ldd.ldd_flags & (LDD_F_UPGRADE14 | LDD_F_SV_TYPE_MGS))
-            == (LDD_F_UPGRADE14 | LDD_F_SV_TYPE_MGS)) {
-                char cmd[128];
-                char *term;
-                int cmdsz = sizeof(cmd);
-                vprint("Copying old logs\n");
-
-                /* Copy the old client log to fsname-client */
-                sprintf(filepnm, "%s/%s/%s-client",
-                        mntpt, MOUNT_CONFIGS_DIR, mop->mo_ldd.ldd_fsname);
-                snprintf(cmd, cmdsz, "cp %s/%s/client %s", mntpt, MDT_LOGS_DIR,
-                         filepnm);
-                ret = run_command(cmd, cmdsz);
-                if (ret) {
-                        fprintf(stderr, "%s: Can't copy 1.4 config %s/client "
-                                "(%d)\n", progname, MDT_LOGS_DIR, ret);
-                        fprintf(stderr, "mount -t ldiskfs %s somewhere, "
-                                "find the client log for fs %s and "
-                                "copy it manually into %s/%s-client, "
-                                "then umount.\n",
-                                mop->mo_device,
-                                mop->mo_ldd.ldd_fsname, MOUNT_CONFIGS_DIR,
-                                mop->mo_ldd.ldd_fsname);
-                        goto out_umnt;
-                }
-
-                /* We need to use the old mdt log because otherwise mdt won't
-                   have complete lov if old clients connect before all
-                   servers upgrade. */
-                /* Copy the old mdt log to fsname-MDT0000 (get old
-                   name from mdt_UUID) */
-                ret = 1;
-                strscpy(filepnm, (char *)mop->mo_ldd.ldd_uuid, sizeof(filepnm));
-                term = strstr(filepnm, "_UUID");
-                if (term) {
-                        *term = '\0';
-                        snprintf(cmd, cmdsz, "cp %s/%s/%s %s/%s/%s",
-                                 mntpt, MDT_LOGS_DIR, filepnm,
-                                 mntpt, MOUNT_CONFIGS_DIR,
-                                 mop->mo_ldd.ldd_svname);
-                        ret = run_command(cmd, cmdsz);
-                }
-                if (ret) {
-                        fprintf(stderr, "%s: Can't copy 1.4 config %s/%s "
-                                "(%d)\n", progname, MDT_LOGS_DIR, filepnm, ret);
-                        fprintf(stderr, "mount -t ext3 %s somewhere, "
-                                "find the MDT log for fs %s and "
-                                "copy it manually into %s/%s, "
-                                "then umount.\n",
-                                mop->mo_device,
-                                mop->mo_ldd.ldd_fsname, MOUNT_CONFIGS_DIR,
-                                mop->mo_ldd.ldd_svname);
-                        goto out_umnt;
-                }
-        }
-#endif
-        /* end COMPAT_146 */
-
-
-out_umnt:
-        umount(mntpt);
-out_rmdir:
-        rmdir(mntpt);
-        return ret;
-}
-
-int read_local_files(struct mkfs_opts *mop)
-{
-        char tmpdir[] = "/tmp/dirXXXXXX";
-        char cmd[PATH_MAX];
-        char filepnm[128];
-        char *dev;
-        FILE *filep;
-        int ret = 0;
-        int cmdsz = sizeof(cmd);
-
-        /* Make a temporary directory to hold Lustre data files. */
-        if (!mkdtemp(tmpdir)) {
-                fprintf(stderr, "%s: Can't create temporary directory %s: %s\n",
-                        progname, tmpdir, strerror(errno));
-                return errno;
-        }
-
-        dev = mop->mo_device;
-
-        /* Construct debugfs command line. */
-        snprintf(cmd, cmdsz, "debugfs -c -R 'dump /%s %s/mountdata' %s",
-                 MOUNT_DATA_FILE, tmpdir, dev);
-
-        ret = run_command(cmd, cmdsz);
-        if (ret)
-                verrprint("%s: Unable to dump %s dir (%d)\n",
-                          progname, MOUNT_CONFIGS_DIR, ret);
-
-        sprintf(filepnm, "%s/mountdata", tmpdir);
-        filep = fopen(filepnm, "r");
-        if (filep) {
-                vprint("Reading %s\n", MOUNT_DATA_FILE);
-                fread(&mop->mo_ldd, sizeof(mop->mo_ldd), 1, filep);
-        } else {
-                /* COMPAT_146 */
-                /* Try to read pre-1.6 config from last_rcvd */
-                struct lr_server_data lsd;
-                verrprint("%s: Unable to read %d.%d config %s.\n",
-                          progname, LUSTRE_MAJOR, LUSTRE_MINOR, filepnm);
-
-                verrprint("Trying 1.4 config from last_rcvd\n");
-                sprintf(filepnm, "%s/%s", tmpdir, LAST_RCVD);
-
-                /* Construct debugfs command line. */
-                snprintf(cmd, cmdsz, "debugfs -c -R 'dump /%s %s' %s",
-                         LAST_RCVD, filepnm, dev);
-
-                ret = run_command(cmd, cmdsz);
-                if (ret) {
-                        fprintf(stderr, "%s: Unable to dump %s file (%d)\n",
-                                progname, LAST_RCVD, ret);
-                        goto out_rmdir;
-                }
-
-                filep = fopen(filepnm, "r");
-                if (!filep) {
-                        fprintf(stderr, "%s: Unable to open %s: %s\n",
-                                progname, filepnm, strerror(errno));
-                        ret = errno;
-                        verrprint("Contents of %s:\n", tmpdir);
-                        verbose+=2;
-                        snprintf(cmd, cmdsz, "ls -l %s/", tmpdir);
-                        run_command(cmd, cmdsz);
-                        verrprint("Contents of disk:\n");
-                        snprintf(cmd, cmdsz, "debugfs -c -R 'ls -l /' %s", dev);
-                        run_command(cmd, cmdsz);
-
-                        goto out_rmdir;
-                }
-                vprint("Reading %s\n", LAST_RCVD);
-                ret = fread(&lsd, 1, sizeof(lsd), filep);
-                if (ret < sizeof(lsd)) {
-                        fprintf(stderr, "%s: Short read (%d of %d)\n",
-                                progname, ret, (int)sizeof(lsd));
-                        ret = ferror(filep);
-                        if (ret)
-                                goto out_close;
-                }
-                vprint("Feature compat=%x, incompat=%x\n",
-                       lsd.lsd_feature_compat, lsd.lsd_feature_incompat);
-
-                if ((lsd.lsd_feature_compat & OBD_COMPAT_OST) ||
-                    (lsd.lsd_feature_incompat & OBD_INCOMPAT_OST)) {
-                        mop->mo_ldd.ldd_flags = LDD_F_SV_TYPE_OST;
-                        mop->mo_ldd.ldd_svindex = lsd.lsd_ost_index;
-                } else if ((lsd.lsd_feature_compat & OBD_COMPAT_MDT) ||
-                           (lsd.lsd_feature_incompat & OBD_INCOMPAT_MDT)) {
-                        /* We must co-locate so mgs can see old logs.
-                           If user doesn't want this, they can copy the old
-                           logs manually and re-tunefs. */
-                        mop->mo_ldd.ldd_flags =
-                                LDD_F_SV_TYPE_MDT | LDD_F_SV_TYPE_MGS;
-                        mop->mo_ldd.ldd_svindex = lsd.lsd_mdt_index;
-                } else  {
-                        /* If neither is set, we're pre-1.4.6, make a guess. */
-                        /* Construct debugfs command line. */
-                        snprintf(cmd, cmdsz, "debugfs -c -R 'rdump /%s %s' %s",
-                                 MDT_LOGS_DIR, tmpdir, dev);
-                        run_command(cmd, cmdsz);
-
-                        sprintf(filepnm, "%s/%s", tmpdir, MDT_LOGS_DIR);
-                        if (lsd.lsd_ost_index > 0) {
-                                mop->mo_ldd.ldd_flags = LDD_F_SV_TYPE_OST;
-                                mop->mo_ldd.ldd_svindex = lsd.lsd_ost_index;
-                        } else {
-                                /* If there's a LOGS dir, it's an MDT */
-                                if ((ret = access(filepnm, F_OK)) == 0) {
-                                        mop->mo_ldd.ldd_flags =
-                                        LDD_F_SV_TYPE_MDT |
-                                        LDD_F_SV_TYPE_MGS;
-                                        /* Old MDT's are always index 0
-                                           (pre CMD) */
-                                        mop->mo_ldd.ldd_svindex = 0;
-                                } else {
-                                        /* The index may not be correct */
-                                        mop->mo_ldd.ldd_flags =
-                                        LDD_F_SV_TYPE_OST | LDD_F_NEED_INDEX;
-                                        verrprint("OST with unknown index\n");
-                                }
-                        }
-                }
-
-                ret = 0;
-                memcpy(mop->mo_ldd.ldd_uuid, lsd.lsd_uuid,
-                       sizeof(mop->mo_ldd.ldd_uuid));
-                mop->mo_ldd.ldd_flags |= LDD_F_UPGRADE14;
-        }
-        /* end COMPAT_146 */
-out_close:
-        fclose(filep);
-
-out_rmdir:
-        snprintf(cmd, cmdsz, "rm -rf %s", tmpdir);
-        run_command(cmd, cmdsz);
-        if (ret)
-                verrprint("Failed to read old data (%d)\n", ret);
-        return ret;
-}
-
-
-void set_defaults(struct mkfs_opts *mop)
-{
-        mop->mo_ldd.ldd_magic = LDD_MAGIC;
-        mop->mo_ldd.ldd_config_ver = 1;
-        mop->mo_ldd.ldd_flags = LDD_F_NEED_INDEX | LDD_F_UPDATE | LDD_F_VIRGIN;
-        mop->mo_mgs_failnodes = 0;
-        strcpy(mop->mo_ldd.ldd_fsname, "lustre");
-        if (get_os_version() == 24)
-                mop->mo_ldd.ldd_mount_type = LDD_MT_EXT3;
-        else
-                mop->mo_ldd.ldd_mount_type = LDD_MT_LDISKFS;
-
-        mop->mo_ldd.ldd_svindex = INDEX_UNASSIGNED;
-        mop->mo_stripe_count = 1;
-}
-
-static inline void badopt(const char *opt, char *type)
-{
-        fprintf(stderr, "%s: '--%s' only valid for %s\n",
-                progname, opt, type);
-        usage(stderr);
-}
-
-static int clean_param(char *buf, char *key)
-{
-        char *sub, *next;
-
-        if (!buf)
-                return 1;
-        if ((sub = strstr(buf, key)) != NULL) {
-                if ((next = strchr(sub, ' ')) != NULL) {
-                        next++;
-                        memmove(sub, next, strlen(next) + 1);
-                } else {
-                        *sub = '\0';
-                }
-        }
-        return 0;
-}
-
-static int add_param(char *buf, char *key, char *val, int unique)
-{
-        int end = sizeof(((struct lustre_disk_data *)0)->ldd_params);
-        int start;
-        int keylen = 0;
-        char *ptr;
-
-        if (key)
-                keylen = strlen(key);
-        if (unique) {
-                if (key) {
-                        clean_param(buf, key);
-                } else {
-                        if ((ptr = strchr(val, '=')) == NULL)
-                                return 1;
-                        *ptr = '\0';
-                        clean_param(buf, val);
-                        *ptr = '=';
-                }
-        }
-
-        start = strlen(buf);
-        if (start + 1 + keylen + strlen(val) >= end) {
-                fprintf(stderr, "%s: params are too long-\n%s %s%s\n",
-                        progname, buf, key ? key : "", val);
-                return 1;
-        }
-
-        sprintf(buf + start, " %s%s", key ? key : "", val);
-        return 0;
-}
-
-/* from mount_lustre */
-/* Get rid of symbolic hostnames for tcp, since kernel can't do lookups */
-#define MAXNIDSTR 1024
-static char *convert_hostnames(char *s1)
-{
-        char *converted, *s2 = 0, *c;
-        int left = MAXNIDSTR;
-        lnet_nid_t nid;
-
-        converted = malloc(left);
-        c = converted;
-        while ((left > 0) && ((s2 = strsep(&s1, ",: \0")))) {
-                nid = libcfs_str2nid(s2);
-                if (nid == LNET_NID_ANY) {
-                        if (*s2 == '/')
-                                /* end of nids */
-                                break;
-                        fprintf(stderr, "%s: Can't parse NID '%s'\n",
-                                progname, s2);
-                        free(converted);
-                        return NULL;
-                }
-
-                if (strncmp(libcfs_nid2str(nid), "127.0.0.1",
-                            strlen("127.0.0.1")) == 0) {
-                        fprintf(stderr, "%s: The NID '%s' resolves to the "
-                                "loopback address '%s'.  Lustre requires a "
-                                "non-loopback address.\n",
-                                progname, s2, libcfs_nid2str(nid));
-                        free(converted);
-                        return NULL;
-                }
-
-                c += snprintf(c, left, "%s,", libcfs_nid2str(nid));
-                left = converted + MAXNIDSTR - c;
-        }
-        *(c - 1) = '\0';
-        return converted;
-}
-
-int parse_opts(int argc, char *const argv[], struct mkfs_opts *mop,
-               char **mountopts)
-{
-        static struct option long_opt[] = {
-                {"backfstype", 1, 0, 'b'},
-                {"stripe-count-hint", 1, 0, 'c'},
-                {"comment", 1, 0, 'u'},
-                {"configdev", 1, 0, 'C'},
-                {"device-size", 1, 0, 'd'},
-                {"dryrun", 0, 0, 'n'},
-                {"erase-params", 0, 0, 'e'},
-                {"failnode", 1, 0, 'f'},
-                {"failover", 1, 0, 'f'},
-                {"mgs", 0, 0, 'G'},
-                {"help", 0, 0, 'h'},
-                {"index", 1, 0, 'i'},
-                {"mkfsoptions", 1, 0, 'k'},
-                {"mgsnode", 1, 0, 'm'},
-                {"mgsnid", 1, 0, 'm'},
-                {"mdt", 0, 0, 'M'},
-                {"fsname",1, 0, 'L'},
-                {"noformat", 0, 0, 'n'},
-                {"nomgs", 0, 0, 'N'},
-                {"mountfsoptions", 1, 0, 'o'},
-                {"ost", 0, 0, 'O'},
-                {"param", 1, 0, 'p'},
-                {"print", 0, 0, 'n'},
-                {"quiet", 0, 0, 'q'},
-                {"reformat", 0, 0, 'r'},
-                {"verbose", 0, 0, 'v'},
-                {"writeconf", 0, 0, 'w'},
-                {0, 0, 0, 0}
-        };
-        char *optstring = "b:c:C:d:ef:Ghi:k:L:m:MnNo:Op:Pqru:vw";
-        int opt;
-        int rc, longidx;
-        int upcall = 0;
-        const size_t prefix_len = sizeof(PARAM_MDT_UPCALL) - 1;
-
-        while ((opt = getopt_long(argc, argv, optstring, long_opt, &longidx)) !=
-               EOF) {
-                switch (opt) {
-                case 'b': {
-                        int i = 0;
-                        while (i < LDD_MT_LAST) {
-                                if (strcmp(optarg, mt_str(i)) == 0) {
-                                        mop->mo_ldd.ldd_mount_type = i;
-                                        break;
-                                }
-                                i++;
-                        }
-                        break;
-                }
-                case 'c':
-                        if (IS_MDT(&mop->mo_ldd)) {
-                                int stripe_count = atol(optarg);
-                                if (stripe_count <= 0) {
-                                        fprintf(stderr, "%s: bad stripe count "
-                                                "%d\n", progname, stripe_count);
-                                        return 1;
-                                }
-                                mop->mo_stripe_count = stripe_count;
-                        } else {
-                                badopt(long_opt[longidx].name, "MDT");
-                                return 1;
-                        }
-                        break;
-                case 'C': /* Configdev */
-                        //FIXME
-                        printf("Configdev not implemented\n");
-                        return 1;
-                case 'd':
-                        mop->mo_device_sz = atol(optarg);
-                        break;
-                case 'e':
-                        mop->mo_ldd.ldd_params[0] = '\0';
-                        /* Must update the mgs logs */
-                        mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
-                        break;
-                case 'f': {
-                        char *nids = convert_hostnames(optarg);
-                        if (!nids)
-                                return 1;
-                        rc = add_param(mop->mo_ldd.ldd_params, PARAM_FAILNODE,
-                                       nids, 0);
-                        /* Combo needs to add MDT failnodes as MGS failnodes
-                           as well */
-                        if (!rc && IS_MGS(&mop->mo_ldd)) {
-                                rc = add_param(mop->mo_ldd.ldd_params,
-                                               PARAM_MGSNODE, nids, 0);
-                        }
-                        free(nids);
-                        if (rc)
-                                return rc;
-                        /* Must update the mgs logs */
-                        mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
-                        failover = 1;
-                        break;
-                }
-                case 'G':
-                        mop->mo_ldd.ldd_flags |= LDD_F_SV_TYPE_MGS;
-                        break;
-                case 'h':
-                        usage(stdout);
-                        return 1;
-                case 'i':
-                        if (!(mop->mo_ldd.ldd_flags &
-                              (LDD_F_UPGRADE14 | LDD_F_VIRGIN |
-                               LDD_F_WRITECONF))) {
-                                fprintf(stderr, "%s: cannot change the index of"
-                                        " a registered target\n", progname);
-                                return 1;
-                        }
-                        if (IS_MDT(&mop->mo_ldd) || IS_OST(&mop->mo_ldd)) {
-                                mop->mo_ldd.ldd_svindex = atol(optarg);
-                                mop->mo_ldd.ldd_flags &= ~LDD_F_NEED_INDEX;
-                        } else {
-                                badopt(long_opt[longidx].name, "MDT,OST");
-                                return 1;
-                        }
-                        break;
-                case 'k':
-                        strscpy(mop->mo_mkfsopts, optarg,
-                                sizeof(mop->mo_mkfsopts));
-                        break;
-                case 'L': {
-                        char *tmp;
-                        if (!(mop->mo_flags & MO_FORCEFORMAT) &&
-                            (!(mop->mo_ldd.ldd_flags &
-                               (LDD_F_UPGRADE14 | LDD_F_VIRGIN |
-                                LDD_F_WRITECONF)))) {
-                                fprintf(stderr, "%s: cannot change the name of"
-                                        " a registered target\n", progname);
-                                return 1;
-                        }
-                        if ((strlen(optarg) < 1) || (strlen(optarg) > 8)) {
-                                fprintf(stderr, "%s: filesystem name must be "
-                                        "1-8 chars\n", progname);
-                                return 1;
-                        }
-                        if ((tmp = strpbrk(optarg, "/:"))) {
-                                fprintf(stderr, "%s: char '%c' not allowed in "
-                                        "filesystem name\n", progname, *tmp);
-                                return 1;
-                        }
-                        strscpy(mop->mo_ldd.ldd_fsname, optarg,
-                                sizeof(mop->mo_ldd.ldd_fsname));
-                        break;
-                }
-                case 'm': {
-                        char *nids = convert_hostnames(optarg);
-                        if (!nids)
-                                return 1;
-                        rc = add_param(mop->mo_ldd.ldd_params, PARAM_MGSNODE,
-                                       nids, 0);
-                        free(nids);
-                        if (rc)
-                                return rc;
-                        mop->mo_mgs_failnodes++;
-                        break;
-                }
-                case 'M':
-                        mop->mo_ldd.ldd_flags |= LDD_F_SV_TYPE_MDT;
-                        break;
-                case 'n':
-                        print_only++;
-                        break;
-                case 'N':
-                        mop->mo_ldd.ldd_flags &= ~LDD_F_SV_TYPE_MGS;
-                        break;
-                case 'o':
-                        *mountopts = optarg;
-                        break;
-                case 'O':
-                        mop->mo_ldd.ldd_flags |= LDD_F_SV_TYPE_OST;
-                        break;
-                case 'p':
-                        /* Test if the param is valid for mdt.group_upcall */
-                        if (!strncmp(optarg, PARAM_MDT_UPCALL, prefix_len)) {
-                                upcall++;
-                                if (strcmp(optarg + prefix_len, "NONE") &&
-                                    access(optarg + prefix_len, R_OK | X_OK))
-                                        fprintf(stderr, "WARNING: group upcall "
-                                                "parameter not executable: %s\n"
-                                                "NOTE: you can change the path "
-                                                "to the group upcall through "
-                                                "tunefs.lustre(8)\n", optarg +
-                                                prefix_len);
-                        }
-                        rc = add_param(mop->mo_ldd.ldd_params, NULL, optarg, 0);
-                        if (rc)
-                                return rc;
-                        /* Must update the mgs logs */
-                        mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
-                        break;
-                case 'q':
-                        verbose--;
-                        break;
-                case 'r':
-                        mop->mo_flags |= MO_FORCEFORMAT;
-                        break;
-                case 'u':
-                        strscpy(mop->mo_ldd.ldd_userdata, optarg,
-                                sizeof(mop->mo_ldd.ldd_userdata));
-                        break;
-                case 'v':
-                        verbose++;
-                        break;
-                case 'w':
-                        mop->mo_ldd.ldd_flags |= LDD_F_WRITECONF;
-                        break;
-                default:
-                        if (opt != '?') {
-                                fatal();
-                                fprintf(stderr, "Unknown option '%c'\n", opt);
-                        }
-                        return EINVAL;
-                }
-        }//while
-
-        /* Last arg is device */
-        if (optind != argc - 1) {
-                fatal();
-                fprintf(stderr, "Bad argument: %s\n", argv[optind]);
-                return EINVAL;
-        }
-
-#ifndef TUNEFS
-        if (mop->mo_ldd.ldd_flags & LDD_F_SV_TYPE_MDT && 0 == upcall) {
-                if (access("/usr/sbin/l_getgroups", R_OK | X_OK)) {
-                        fprintf(stderr, "WARNING: MDS group upcall is not set, "
-                                "using 'NONE'\n");
-                } else {
-                        rc = add_param(mop->mo_ldd.ldd_params, PARAM_MDT_UPCALL,
-                                       "/usr/sbin/l_getgroups", 1);
-                        if (rc)
-                                return rc;
-                        /* Must update the mgs logs */
-                        mop->mo_ldd.ldd_flags |= LDD_F_UPDATE;
-                }
-        }
-#endif
-
-        return 0;
-}
-
-int main(int argc, char *const argv[])
-{
-        struct mkfs_opts mop;
-        struct lustre_disk_data *ldd;
-        char *mountopts = NULL;
-        char always_mountopts[512] = "";
-        char default_mountopts[512] = "";
-        int  ret = 0;
-
-        if ((progname = strrchr(argv[0], '/')) != NULL)
-                progname++;
-        else
-                progname = argv[0];
-
-        if ((argc < 2) || (argv[argc - 1][0] == '-')) {
-                usage(stderr);
-                return(EINVAL);
-        }
-
-        memset(&mop, 0, sizeof(mop));
-        set_defaults(&mop);
-
-        /* device is last arg */
-        strscpy(mop.mo_device, argv[argc - 1], sizeof(mop.mo_device));
-
-        /* Are we using a loop device? */
-        ret = is_block(mop.mo_device);
-        if (ret < 0)
-                goto out;
-        if (ret == 0)
-                mop.mo_flags |= MO_IS_LOOP;
-
-#ifdef TUNEFS
-        /* For tunefs, we must read in the old values before parsing any
-           new ones. */
-
-        /* Check whether the disk has already been formatted by mkfs.lustre */
-        ret = is_lustre_target(&mop);
-        if (ret == 0) {
-                fatal();
-                fprintf(stderr, "Device %s has not been formatted with "
-                        "mkfs.lustre\n", mop.mo_device);
-                ret = ENODEV;
-                goto out;
-        }
-
-        ret = read_local_files(&mop);
-        if (ret) {
-                fatal();
-                fprintf(stderr, "Failed to read previous Lustre data from %s "
-                        "(%d)\n", mop.mo_device, ret);
-                goto out;
-        }
-        if (strstr(mop.mo_ldd.ldd_params, PARAM_MGSNODE))
-            mop.mo_mgs_failnodes++;
-
-        if (verbose > 0)
-                print_ldd("Read previous values", &(mop.mo_ldd));
-#endif
-
-        ret = parse_opts(argc, argv, &mop, &mountopts);
-        if (ret)
-                goto out;
-
-        ldd = &mop.mo_ldd;
-
-        if (!(IS_MDT(ldd) || IS_OST(ldd) || IS_MGS(ldd))) {
-                fatal();
-                fprintf(stderr, "must set target type: MDT,OST,MGS\n");
-                ret = EINVAL;
-                goto out;
-        }
-
-        if (((IS_MDT(ldd) || IS_MGS(ldd))) && IS_OST(ldd)) {
-                fatal();
-                fprintf(stderr, "OST type is exclusive with MDT,MGS\n");
-                ret = EINVAL;
-                goto out;
-        }
-
-        if ((mop.mo_ldd.ldd_flags & (LDD_F_NEED_INDEX | LDD_F_UPGRADE14)) ==
-            (LDD_F_NEED_INDEX | LDD_F_UPGRADE14)) {
-                fatal();
-                fprintf(stderr, "Can't find the target index, "
-                        "specify with --index\n");
-                ret = EINVAL;
-                goto out;
-        }
-
-        if (!IS_MGS(ldd) && (mop.mo_mgs_failnodes == 0)) {
-                fatal();
-                if (IS_MDT(ldd))
-                        fprintf(stderr, "Must specify --mgs or --mgsnode=\n");
-                else
-                        fprintf(stderr, "Must specify --mgsnode=\n");
-                ret = EINVAL;
-                goto out;
-        }
-
-        /* These are the permanent mount options (always included) */
-        switch (ldd->ldd_mount_type) {
-        case LDD_MT_EXT3:
-        case LDD_MT_LDISKFS:
-        case LDD_MT_LDISKFS2: {
-                sprintf(always_mountopts, "errors=remount-ro");
-                if (IS_MDT(ldd) || IS_MGS(ldd))
-                        strscat(always_mountopts, ",iopen_nopriv,user_xattr",
-                                sizeof(always_mountopts));
-                if ((get_os_version() == 24) && IS_OST(ldd))
-                        strscat(always_mountopts, ",asyncdel",
-                                sizeof(always_mountopts));
-                /* NB: Files created while extents are enabled cannot be read
-                   if mounted with a kernel that doesn't include the CFS
-                   patches! */
-                if (IS_OST(ldd) &&
-                    (ldd->ldd_mount_type == LDD_MT_LDISKFS ||
-                     ldd->ldd_mount_type == LDD_MT_LDISKFS2)) {
-                        strscat(default_mountopts, ",extents,mballoc",
-                                sizeof(default_mountopts));
-                }
-                break;
-        }
-        case LDD_MT_SMFS: {
-                mop.mo_flags |= MO_IS_LOOP;
-                sprintf(always_mountopts, "type=ext3,dev=%s",
-                        mop.mo_device);
-                break;
-        }
-        default: {
-                fatal();
-                fprintf(stderr, "unknown fs type %d '%s'\n",
-                        ldd->ldd_mount_type,
-                        MT_STR(ldd));
-                ret = EINVAL;
-                goto out;
-        }
-        }
-
-        if (mountopts) {
-                /* If user specifies mount opts, don't use defaults,
-                   but always use always_mountopts */
-                sprintf(ldd->ldd_mount_opts, "%s,%s",
-                        always_mountopts, mountopts);
-        } else {
-#ifdef TUNEFS
-                if (ldd->ldd_mount_opts[0] == 0)
-                        /* use the defaults unless old opts exist */
-#endif
-                {
-                        sprintf(ldd->ldd_mount_opts, "%s%s",
-                                always_mountopts, default_mountopts);
-                }
-        }
-
-        server_make_name(ldd->ldd_flags, ldd->ldd_svindex,
-                         ldd->ldd_fsname, ldd->ldd_svname);
-
-        if (verbose >= 0)
-                print_ldd("Permanent disk data", ldd);
-
-        if (print_only) {
-                printf("exiting before disk write.\n");
-                goto out;
-        }
-
-        if (check_mtab_entry(mop.mo_device))
-                return(EEXIST);
-
-        /* Create the loopback file */
-        if (mop.mo_flags & MO_IS_LOOP) {
-                ret = access(mop.mo_device, F_OK);
-                if (ret)
-                        ret = errno;
-#ifndef TUNEFS /* mkfs.lustre */
-                /* Reformat the loopback file */
-                if (ret || (mop.mo_flags & MO_FORCEFORMAT))
-                        ret = loop_format(&mop);
-#endif
-                if (ret == 0)
-                        ret = loop_setup(&mop);
-                if (ret) {
-                        fatal();
-                        fprintf(stderr, "Loop device setup for %s failed: %s\n",
-                                mop.mo_device, strerror(ret));
-                        goto out;
-                }
-        }
-
-#ifndef TUNEFS /* mkfs.lustre */
-        /* Check whether the disk has already been formatted by mkfs.lustre */
-        if (!(mop.mo_flags & MO_FORCEFORMAT)) {
-                ret = is_lustre_target(&mop);
-                if (ret) {
-                        fatal();
-                        fprintf(stderr, "Device %s was previously formatted "
-                                "for lustre. Use --reformat to reformat it, "
-                                "or tunefs.lustre to modify.\n",
-                                mop.mo_device);
-                        goto out;
-                }
-        }
-
-        /* Format the backing filesystem */
-        ret = make_lustre_backfs(&mop);
-        if (ret != 0) {
-                fatal();
-                fprintf(stderr, "mkfs failed %d\n", ret);
-                goto out;
-        }
-#endif
-
-        /* Write our config files */
-        ret = write_local_files(&mop);
-        if (ret != 0) {
-                fatal();
-                fprintf(stderr, "failed to write local files\n");
-                goto out;
-        }
-
-out:
-        loop_cleanup(&mop);
-
-        /* Fix any crazy return values from system() */
-        if (ret && ((ret & 255) == 0))
-                return (1);
-        if (ret)
-                verrprint("%s: exiting with %d (%s)\n",
-                          progname, ret, strerror(ret));
-        return (ret);
-}
diff --git a/lustre/utils/module_cleanup.sh b/lustre/utils/module_cleanup.sh
deleted file mode 100755
index 92f0cce817df99543b65e14f68c60584704a5af3..0000000000000000000000000000000000000000
--- a/lustre/utils/module_cleanup.sh
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-MDIR=/lib/modules/`uname -r`/lustre
-mkdir -p $MDIR
-
-KVER=24
-EXT=o
-FSFLT=fsfilt_ext3
-MODFILE="/etc/modules.conf"
-if [ `uname -r | cut -c 3` -eq 6 ]; then
-    KVER=26
-    EXT=ko
-    FSFLT=fsfilt_ldiskfs
-    MODFILE="/etc/modprobe.conf"
-fi
-
-echo "Removing Lustre modules from "$MDIR
-
-rm -f $MDIR/*
-depmod -a
-rm -f /sbin/mount.lustre
-
diff --git a/lustre/utils/module_setup.sh b/lustre/utils/module_setup.sh
deleted file mode 100755
index bd53892441fe760909382eb5d4be65635a5a2fee..0000000000000000000000000000000000000000
--- a/lustre/utils/module_setup.sh
+++ /dev/null
@@ -1,66 +0,0 @@
-#!/bin/sh
-
-MDIR=/lib/modules/`uname -r`/lustre
-mkdir -p $MDIR
-
-KVER=26
-EXT=ko
-FSFLT=fsfilt_ldiskfs
-if [ -d /etc/modprobe.d ]; then
-    MODFILE="/etc/modprobe.d/Lustre"
-else
-    MODFILE="/etc/modprobe.conf"
-fi
-if [ `uname -r | cut -c 3` -eq 4 ]; then
-    KVER=24
-    EXT=o
-    FSFLT=fsfilt_ext3
-    MODFILE="/etc/modules.conf"
-fi
-
-echo "Copying modules from local build dir to "$MDIR
-
-cp -u ../../lnet/libcfs/libcfs.$EXT $MDIR
-cp -u ../../lnet/lnet/lnet.$EXT $MDIR
-cp -u ../../lnet/klnds/socklnd/ksocklnd.$EXT $MDIR
-cp -u ../lvfs/lvfs.$EXT $MDIR
-cp -u ../obdclass/obdclass.$EXT $MDIR
-cp -u ../ptlrpc/ptlrpc.$EXT $MDIR
-cp -u ../mdc/mdc.$EXT $MDIR
-cp -u ../osc/osc.$EXT $MDIR
-cp -u ../lov/lov.$EXT $MDIR
-cp -u ../mds/mds.$EXT $MDIR
-cp -u ../lvfs/$FSFLT.$EXT $MDIR
-[ $KVER == "26" ] && cp -u ../../ldiskfs/ldiskfs/ldiskfs.$EXT $MDIR
-cp -u ../ost/ost.$EXT $MDIR
-cp -u ../obdfilter/obdfilter.$EXT $MDIR
-cp -u ../llite/lustre.$EXT $MDIR
-cp -u ../mgc/mgc.$EXT $MDIR
-cp -u ../mgs/mgs.$EXT $MDIR
-cp -u ../quota/lquota.$EXT $MDIR
-cp -u ../obdecho/obdecho.$EXT $MDIR
-
-# prevent warnings on my uml
-rm -f /lib/modules/`uname -r`/modules.*
-echo "Depmod"
-depmod -A -e
-
-echo "Copying mount from local build dir to "$MDIR
-cp -u ../utils/mount.lustre /sbin/.
-
-MP="/sbin/modprobe"
-MPI="$MP --ignore-install"
-
-[ -e $MODFILE ] || touch $MODFILE
-if [ `egrep -c "lustre|lnet" $MODFILE` -eq 0 ]; then
-    echo Modifying $MODFILE
-    echo "# Lustre modules added by $0" >> $MODFILE
-    echo "# Networking options, see /sys/module/lnet/parameters" >> $MODFILE
-    echo "options lnet networks=tcp" >> $MODFILE
-    echo "# end Lustre modules" >> $MODFILE
-fi
-
-#  To generate gdb debug file:
-# modprobe lustre; modprobe mds; modprobe obdfilter; modprobe mgs; modprobe mgc
-# rm -f /r/tmp/ogdb-`hostname`
-# ./lctl modules > /r/tmp/ogdb-`hostname`
diff --git a/lustre/utils/mount_lustre.c b/lustre/utils/mount_lustre.c
deleted file mode 100644
index 004890ccad88869893cdf23d4f833982b7b7243d..0000000000000000000000000000000000000000
--- a/lustre/utils/mount_lustre.c
+++ /dev/null
@@ -1,626 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Robert Read <rread@clusterfs.com>
- *   Author: Nathan Rutman <nathan@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-
-#define _GNU_SOURCE
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <string.h>
-#include <sys/mount.h>
-#include <mntent.h>
-#include <getopt.h>
-#include <sys/utsname.h>
-#include "obdctl.h"
-#include <lustre_ver.h>
-#include <glob.h>
-#include <ctype.h>
-#include <limits.h>
-
-#define MAX_HW_SECTORS_KB_PATH  "queue/max_hw_sectors_kb"
-#define MAX_SECTORS_KB_PATH     "queue/max_sectors_kb"
-
-int          verbose = 0;
-int          nomtab = 0;
-int          fake = 0;
-int          force = 0;
-static char *progname = NULL;
-
-void usage(FILE *out)
-{
-        fprintf(out, "%s v"LUSTRE_VERSION_STRING"\n", progname);
-        fprintf(out, "\nThis mount helper should only be invoked via the "
-                "mount (8) command,\ne.g. mount -t lustre dev dir\n\n");
-        fprintf(out, "usage: %s [-fhnv] [-o <mntopt>] <device> <mountpt>\n",
-                progname);
-        fprintf(out,
-                "\t<device>: the disk device, or for a client:\n"
-                "\t\t<mgmtnid>[:<altmgtnid>...]:/<filesystem>-client\n"
-                "\t<filesystem>: name of the Lustre filesystem (e.g. lustre1)\n"
-                "\t<mountpt>: filesystem mountpoint (e.g. /mnt/lustre)\n"
-                "\t-f|--fake: fake mount (updates /etc/mtab)\n"
-                "\t--force: force mount even if already in /etc/mtab\n"
-                "\t-h|--help: print this usage message\n"
-                "\t-n|--nomtab: do not update /etc/mtab after mount\n"
-                "\t-v|--verbose: print verbose config settings\n"
-                "\t<mntopt>: one or more comma separated of:\n"
-                "\t\t(no)flock,(no)user_xattr,(no)acl\n"
-                "\t\tnosvc: only start MGC/MGS obds\n"
-                "\t\texclude=<ostname>[:<ostname>] : colon-separated list of "
-                "inactive OSTs (e.g. lustre-OST0001)\n"
-                );
-        exit((out != stdout) ? EINVAL : 0);
-}
-
-static int check_mtab_entry(char *spec, char *mtpt, char *type)
-{
-        FILE *fp;
-        struct mntent *mnt;
-
-        fp = setmntent(MOUNTED, "r");
-        if (fp == NULL)
-                return(0);
-
-        while ((mnt = getmntent(fp)) != NULL) {
-                if (strcmp(mnt->mnt_fsname, spec) == 0 &&
-                        strcmp(mnt->mnt_dir, mtpt) == 0 &&
-                        strcmp(mnt->mnt_type, type) == 0) {
-                        endmntent(fp);
-                        return(EEXIST);
-                }
-        }
-        endmntent(fp);
-
-        return(0);
-}
-
-static int
-update_mtab_entry(char *spec, char *mtpt, char *type, char *opts,
-                  int flags, int freq, int pass)
-{
-        FILE *fp;
-        struct mntent mnt;
-        int rc = 0;
-
-        mnt.mnt_fsname = spec;
-        mnt.mnt_dir = mtpt;
-        mnt.mnt_type = type;
-        mnt.mnt_opts = opts ? opts : "";
-        mnt.mnt_freq = freq;
-        mnt.mnt_passno = pass;
-
-        fp = setmntent(MOUNTED, "a+");
-        if (fp == NULL) {
-                fprintf(stderr, "%s: setmntent(%s): %s:",
-                        progname, MOUNTED, strerror (errno));
-                rc = 16;
-        } else {
-                if ((addmntent(fp, &mnt)) == 1) {
-                        fprintf(stderr, "%s: addmntent: %s:",
-                                progname, strerror (errno));
-                        rc = 16;
-                }
-                endmntent(fp);
-        }
-
-        return rc;
-}
-
-/* Get rid of symbolic hostnames for tcp, since kernel can't do lookups */
-#define MAXNIDSTR 1024
-static char *convert_hostnames(char *s1)
-{
-        char *converted, *s2 = 0, *c;
-        char sep;
-        int left = MAXNIDSTR;
-        lnet_nid_t nid;
-
-        converted = malloc(left);
-        c = converted;
-        while ((left > 0) && (*s1 != '/')) {
-                s2 = strpbrk(s1, ",:");
-                if (!s2)
-                        goto out_free;
-                sep = *s2;
-                *s2 = '\0';
-                nid = libcfs_str2nid(s1);
-                *s2 = sep;                      /* back to original string */
-                if (nid == LNET_NID_ANY)
-                        goto out_free;
-                c += snprintf(c, left, "%s%c", libcfs_nid2str(nid), sep);
-                left = converted + MAXNIDSTR - c;
-                s1 = s2 + 1;
-        }
-        snprintf(c, left, "%s", s1);
-        return converted;
-out_free:
-        fprintf(stderr, "%s: Can't parse NID '%s'\n", progname, s1);
-        free(converted);
-        return NULL;
-}
-
-/*****************************************************************************
- *
- * This part was cribbed from util-linux/mount/mount.c.  There was no clear
- * license information, but many other files in the package are identified as
- * GNU GPL, so it's a pretty safe bet that was their intent.
- *
- ****************************************************************************/
-struct opt_map {
-        const char *opt;        /* option name */
-        int inv;                /* true if flag value should be inverted */
-        int mask;               /* flag mask value */
-};
-
-static const struct opt_map opt_map[] = {
-  /*"optname", inv,ms_mask */
-  /* These flags are parsed by mount, not lustre */
-  { "defaults", 0, 0         },      /* default options */
-  { "remount",  0, MS_REMOUNT},      /* remount with different options */
-  { "rw",       1, MS_RDONLY },      /* read-write */
-  { "ro",       0, MS_RDONLY },      /* read-only */
-  { "exec",     1, MS_NOEXEC },      /* permit execution of binaries */
-  { "noexec",   0, MS_NOEXEC },      /* don't execute binaries */
-  { "suid",     1, MS_NOSUID },      /* honor suid executables */
-  { "nosuid",   0, MS_NOSUID },      /* don't honor suid executables */
-  { "dev",      1, MS_NODEV  },      /* interpret device files  */
-  { "nodev",    0, MS_NODEV  },      /* don't interpret devices */
-  { "sync",     0, MS_SYNCHRONOUS},  /* synchronous I/O */
-  { "async",    1, MS_SYNCHRONOUS},  /* asynchronous I/O */
-  { "atime",    1, MS_NOATIME  },    /* set file access time on read */
-  { "noatime",  0, MS_NOATIME  },    /* do not set file access time on read */
-#ifdef MS_NODIRATIME
-  { "diratime", 1, MS_NODIRATIME },  /* set file access time on read */
-  { "nodiratime",0,MS_NODIRATIME },  /* do not set file access time on read */
-#endif
-#ifdef MS_RELATIME
-  { "relatime", 0, MS_RELATIME },  /* set file access time on read */
-  { "norelatime",1,MS_RELATIME },  /* do not set file access time on read */
-#endif
-  { "auto",     0, 0         },      /* Can be mounted using -a */
-  { "noauto",   0, 0         },      /* Can only be mounted explicitly */
-  { "nousers",  1, 0         },      /* Forbid ordinary user to mount */
-  { "nouser",   1, 0         },      /* Forbid ordinary user to mount */
-  { "noowner",  1, 0         },      /* Device owner has no special privs */
-  { "_netdev",  0, 0         },      /* Device accessible only via network */
-  { NULL,       0, 0         }
-};
-/****************************************************************************/
-
-/* 1  = don't pass on to lustre
-   0  = pass on to lustre */
-static int parse_one_option(const char *check, int *flagp)
-{
-        const struct opt_map *opt;
-
-        for (opt = &opt_map[0]; opt->opt != NULL; opt++) {
-                if (strncmp(check, opt->opt, strlen(opt->opt)) == 0) {
-                        if (opt->mask) {
-                                if (opt->inv)
-                                        *flagp &= ~(opt->mask);
-                                else
-                                        *flagp |= opt->mask;
-                        }
-                        return 1;
-                }
-        }
-        /* Assume any unknown options are valid and pass them on.  The mount
-           will fail if lmd_parse, ll_options or ldiskfs doesn't recognize it.*/
-        return 0;
-}
-
-/* Replace options with subset of Lustre-specific options, and
-   fill in mount flags */
-int parse_options(char *orig_options, int *flagp)
-{
-        char *options, *opt, *nextopt;
-
-        options = calloc(strlen(orig_options) + 1, 1);
-        *flagp = 0;
-        nextopt = orig_options;
-        while ((opt = strsep(&nextopt, ","))) {
-                if (!*opt)
-                        /* empty option */
-                        continue;
-                if (parse_one_option(opt, flagp) == 0) {
-                        /* pass this on as an option */
-                        if (*options)
-                                strcat(options, ",");
-                        strcat(options, opt);
-                }
-        }
-        strcpy(orig_options, options);
-        free(options);
-        return 0;
-}
-
-
-int read_file(char *path, char *buf, int size)
-{
-        FILE *fd;
-
-        fd = fopen(path, "r");
-        if (fd == NULL)
-                return errno;
-
-        fgets(buf, size, fd);
-        fclose(fd);
-        return 0;
-}
-
-int write_file(char *path, char *buf)
-{
-        FILE *fd;
-
-        fd = fopen(path, "w");
-        if (fd == NULL)
-                return errno;
-
-        fputs(buf, fd);
-        fclose(fd);
-        return 0;
-}
-
-/* This is to tune the kernel for good SCSI performance.
- * For that we set the value of /sys/block/{dev}/queue/max_sectors_kb
- * to the value of /sys/block/{dev}/queue/max_hw_sectors_kb */
-int set_tunables(char *source, int src_len)
-{
-        glob_t glob_info;
-        struct stat stat_buf;
-        char *chk_major, *chk_minor;
-        char *savept, *dev, *s2 = 0;
-        char *ret_path;
-        char buf[PATH_MAX] = {'\0'}, path[PATH_MAX] = {'\0'};
-        char real_path[PATH_MAX] = {'\0'};
-        int i, rc = 0;
-        int major, minor;
-
-        if (!source)
-                return -EINVAL;
-
-        ret_path = realpath(source, real_path);
-        if (ret_path == NULL) {
-                if (verbose)
-                        fprintf(stderr, "warning: %s: cannot resolve: %s",
-                                source, strerror(errno));
-                return -EINVAL;
-        }
-
-        src_len = sizeof(real_path);
-
-        if (strncmp(real_path, "/dev/loop", 9) == 0)
-                return 0;
-
-        if ((real_path[0] != '/') && ((s2 = strpbrk(real_path, ",:")) != NULL))
-                return 0;
-
-        dev = real_path + src_len - 1;
-        while (dev > real_path && (*dev != '/')) {
-                if (isdigit(*dev))
-                        *dev = 0;
-                dev--;
-        }
-        snprintf(path, sizeof(path), "/sys/block%s/%s", dev,
-                 MAX_HW_SECTORS_KB_PATH);
-        rc = read_file(path, buf, sizeof(buf));
-        if (rc == 0 && (strlen(buf) - 1) > 0) {
-                snprintf(path, sizeof(path), "/sys/block%s/%s", dev,
-                         MAX_SECTORS_KB_PATH);
-                rc = write_file(path, buf);
-                if (rc && verbose)
-                        fprintf(stderr, "warning: opening %s: %s\n",
-                                path, strerror(errno));
-                return rc;
-        }
-
-        if (rc != ENOENT)
-                return rc;
-
-        /* The name of the device say 'X' specified in /dev/X may not
-         * match any entry under /sys/block/. In that case we need to
-         * match the major/minor number to find the entry under
-         * sys/block corresponding to /dev/X */
-        dev = real_path + src_len - 1;
-        while (dev > real_path) {
-                if (isdigit(*dev))
-                        *dev = 0;
-                dev--;
-        }
-
-        rc = stat(dev, &stat_buf);
-        if (rc) {
-                if (verbose)
-                        fprintf(stderr, "warning: %s, device %s stat failed\n",
-                                strerror(errno), dev);
-                return rc;
-        }
-
-        major = major(stat_buf.st_rdev);
-        minor = minor(stat_buf.st_rdev);
-        rc = glob("/sys/block/*", GLOB_NOSORT, NULL, &glob_info);
-        if (rc) {
-                if (verbose)
-                        fprintf(stderr, "warning: failed to read entries under "
-                                "/sys/block\n");
-                return rc;
-        }
-
-        for (i = 0; i < glob_info.gl_pathc; i++){
-                snprintf(path, sizeof(path), "%s/dev", glob_info.gl_pathv[i]);
-
-                rc = read_file(path, buf, sizeof(buf));
-                if (rc)
-                        continue;
-
-                if (buf[strlen(buf) - 1] == '\n')
-                        buf[strlen(buf) - 1] = '\0';
-
-                chk_major = strtok_r(buf, ":", &savept);
-                chk_minor = savept;
-                if (major == atoi(chk_major) &&minor == atoi(chk_minor))
-                        break;
-        }
-
-        if (i == glob_info.gl_pathc) {
-                if (verbose)
-                        fprintf(stderr,"warning: device %s does not match any "
-                                "entry under /sys/block\n", real_path);
-                rc = -EINVAL;
-                goto out;
-        }
-
-        snprintf(path, sizeof(path), "%s/%s", glob_info.gl_pathv[i],
-                 MAX_HW_SECTORS_KB_PATH);
-        rc = read_file(path, buf, sizeof(buf));
-        if (rc) {
-                if (verbose)
-                        fprintf(stderr, "warning: opening %s: %s\n",
-                                path, strerror(errno));
-                goto out;
-        }
-
-        if (strlen(buf) - 1 > 0) {
-                snprintf(path, sizeof(path), "%s/%s",
-                         glob_info.gl_pathv[i], MAX_SECTORS_KB_PATH);
-                rc = write_file(path, buf);
-                if (rc && verbose)
-                        fprintf(stderr, "warning: writing to %s: %s\n",
-                                path, strerror(errno));
-        }
-
-out:
-        globfree(&glob_info);
-        return rc;
-}
-
-int main(int argc, char *const argv[])
-{
-        char default_options[] = "";
-        char *usource, *source, *target, *ptr;
-        char *options, *optcopy, *orig_options = default_options;
-        int i, nargs = 3, opt, rc, flags, optlen;
-        static struct option long_opt[] = {
-                {"fake", 0, 0, 'f'},
-                {"force", 0, 0, 1},
-                {"help", 0, 0, 'h'},
-                {"nomtab", 0, 0, 'n'},
-                {"options", 1, 0, 'o'},
-                {"verbose", 0, 0, 'v'},
-                {0, 0, 0, 0}
-        };
-
-        progname = strrchr(argv[0], '/');
-        progname = progname ? progname + 1 : argv[0];
-
-        while ((opt = getopt_long(argc, argv, "fhno:v",
-                                  long_opt, NULL)) != EOF){
-                switch (opt) {
-                case 1:
-                        ++force;
-                        printf("force: %d\n", force);
-                        nargs++;
-                        break;
-                case 'f':
-                        ++fake;
-                        printf("fake: %d\n", fake);
-                        nargs++;
-                        break;
-                case 'h':
-                        usage(stdout);
-                        break;
-                case 'n':
-                        ++nomtab;
-                        printf("nomtab: %d\n", nomtab);
-                        nargs++;
-                        break;
-                case 'o':
-                        orig_options = optarg;
-                        nargs++;
-                        break;
-                case 'v':
-                        ++verbose;
-                        nargs++;
-                        break;
-                default:
-                        fprintf(stderr, "%s: unknown option '%c'\n",
-                                progname, opt);
-                        usage(stderr);
-                        break;
-                }
-        }
-
-        if (optind + 2 > argc) {
-                fprintf(stderr, "%s: too few arguments\n", progname);
-                usage(stderr);
-        }
-
-        usource = argv[optind];
-        source = convert_hostnames(usource);
-        target = argv[optind + 1];
-        ptr = target + strlen(target) - 1;
-        while ((ptr > target) && (*ptr == '/')) {
-                *ptr = 0;
-                ptr--;
-        }
-
-        if (!usource || !source) {
-                usage(stderr);
-        }
-
-        if (verbose) {
-                for (i = 0; i < argc; i++)
-                        printf("arg[%d] = %s\n", i, argv[i]);
-                printf("source = %s (%s), target = %s\n", usource, source, target);
-                printf("options = %s\n", orig_options);
-        }
-
-        options = malloc(strlen(orig_options) + 1);
-        strcpy(options, orig_options);
-        rc = parse_options(options, &flags);
-        if (rc) {
-                fprintf(stderr, "%s: can't parse options: %s\n",
-                        progname, options);
-                return(EINVAL);
-        }
-
-        if (!force) {
-                rc = check_mtab_entry(usource, target, "lustre");
-                if (rc && !(flags & MS_REMOUNT)) {
-                        fprintf(stderr, "%s: according to %s %s is "
-                                "already mounted on %s\n",
-                                progname, MOUNTED, usource, target);
-                        return(EEXIST);
-                }
-                if (!rc && (flags & MS_REMOUNT)) {
-                        fprintf(stderr, "%s: according to %s %s is "
-                                "not already mounted on %s\n",
-                                progname, MOUNTED, usource, target);
-                        return(ENOENT);
-                }
-        }
-        if (flags & MS_REMOUNT)
-                nomtab++;
-
-        rc = access(target, F_OK);
-        if (rc) {
-                rc = errno;
-                fprintf(stderr, "%s: %s inaccessible: %s\n", progname, target,
-                        strerror(errno));
-                return rc;
-        }
-
-        /* In Linux 2.4, the target device doesn't get passed to any of our
-           functions.  So we'll stick it on the end of the options. */
-        optlen = strlen(options) + strlen(",device=") + strlen(source) + 1;
-        optcopy = malloc(optlen);
-        strcpy(optcopy, options);
-        if (*optcopy)
-                strcat(optcopy, ",");
-        strcat(optcopy, "device=");
-        strcat(optcopy, source);
-
-        if (verbose)
-                printf("mounting device %s at %s, flags=%#x options=%s\n",
-                       source, target, flags, optcopy);
-
-        if (set_tunables(source, strlen(source)) && verbose)
-                fprintf(stderr, "%s: unable to set tunables for %s"
-                                " (may cause reduced IO performance)",
-                                argv[0], source);
-
-        if (!fake)
-                /* flags and target get to lustre_get_sb, but not
-                   lustre_fill_super.  Lustre ignores the flags, but mount
-                   does not. */
-                rc = mount(source, target, "lustre", flags, (void *)optcopy);
-
-        if (rc) {
-                char *cli;
-
-                rc = errno;
-
-                cli = strrchr(usource, ':');
-                if (cli && (strlen(cli) > 2))
-                        cli += 2;
-                else
-                        cli = NULL;
-
-                fprintf(stderr, "%s: mount %s at %s failed: %s\n", progname,
-                        usource, target, strerror(errno));
-                if (errno == ENODEV)
-                        fprintf(stderr, "Are the lustre modules loaded?\n"
-                                "Check /etc/modprobe.conf and /proc/filesystems"
-                                "\nNote 'alias lustre llite' should be removed"
-                                " from modprobe.conf\n");
-                if (errno == ENOTBLK)
-                        fprintf(stderr, "Do you need -o loop?\n");
-                if (errno == ENOMEDIUM)
-                        fprintf(stderr,
-                                "This filesystem needs at least 1 OST\n");
-                if (errno == ENOENT) {
-                        fprintf(stderr, "Is the MGS specification correct?\n");
-                        fprintf(stderr, "Is the filesystem name correct?\n");
-                        fprintf(stderr, "If upgrading, is the copied client log"
-                                " valid? (see upgrade docs)\n");
-                }
-                if (errno == EALREADY)
-                        fprintf(stderr, "The target service is already running."
-                                " (%s)\n", usource);
-                if (errno == ENXIO)
-                        fprintf(stderr, "The target service failed to start "
-                                "(bad config log?) (%s).  "
-                                "See /var/log/messages.\n", usource);
-                if (errno == EIO)
-                        fprintf(stderr, "Is the MGS running?\n");
-                if (errno == EADDRINUSE)
-                        fprintf(stderr, "The target service's index is already "
-                                "in use. (%s)\n", usource);
-                if (errno == EINVAL) {
-                        fprintf(stderr, "This may have multiple causes.\n");
-                        if (cli)
-                                fprintf(stderr, "Is '%s' the correct filesystem"
-                                        " name?\n", cli);
-                        fprintf(stderr, "Are the mount options correct?\n");
-                        fprintf(stderr, "Check the syslog for more info.\n");
-                }
-
-                /* May as well try to clean up loop devs */
-                if (strncmp(usource, "/dev/loop", 9) == 0) {
-                        char cmd[256];
-                        sprintf(cmd, "/sbin/losetup -d %s", usource);
-                        system(cmd);
-                }
-
-        } else if (!nomtab) {
-                rc = update_mtab_entry(usource, target, "lustre", orig_options,
-                                       0,0,0);
-        }
-
-        free(optcopy);
-        free(source);
-        return rc;
-}
diff --git a/lustre/utils/obd.c b/lustre/utils/obd.c
deleted file mode 100644
index 4b03997b9b5a3bd559673b4e6d4592d684955b89..0000000000000000000000000000000000000000
--- a/lustre/utils/obd.c
+++ /dev/null
@@ -1,2267 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *   Author: Andreas Dilger <adilger@clusterfs.com>
- *   Author: Robert Read <rread@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdlib.h>
-#include <sys/ioctl.h>
-#include <fcntl.h>
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <sys/stat.h>
-#include <stdio.h>
-#include <stdarg.h>
-#include <signal.h>
-
-#include "obdctl.h"
-
-#include <obd.h>          /* for struct lov_stripe_md */
-#include <lustre/lustre_build_version.h>
-
-#include <unistd.h>
-#include <sys/un.h>
-#include <time.h>
-#include <sys/time.h>
-#include <errno.h>
-#include <string.h>
-#include <ctype.h>
-
-#ifdef HAVE_ASM_PAGE_H
-#include <asm/page.h>           /* needed for PAGE_SIZE - rread */
-#endif
-
-#include <obd_class.h>
-#include <lnet/lnetctl.h>
-#include "parser.h"
-#include "platform.h"
-#include <stdio.h>
-
-#define MAX_STRING_SIZE 128
-#define DEVICES_LIST "/proc/fs/lustre/devices"
-
-#if HAVE_LIBPTHREAD
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <pthread.h>
-
-#define MAX_THREADS 1024
-
-struct shared_data {
-        __u64 counters[MAX_THREADS];
-        __u64 offsets[MAX_THREADS];
-        int   running;
-        int   barrier;
-        int   stop;
-        l_mutex_t mutex;
-        l_cond_t  cond;
-};
-
-static struct shared_data *shared_data;
-static __u64 counter_snapshot[2][MAX_THREADS];
-static int prev_valid;
-static struct timeval prev_time;
-static int thread;
-static int nthreads;
-#else
-const int thread = 0;
-const int nthreads = 1;
-#endif
-
-static char rawbuf[8192];
-static char *buf = rawbuf;
-static int max = sizeof(rawbuf);
-
-static int cur_device = -1;
-
-
-#define MAX_STRIPES     170
-struct lov_oinfo lov_oinfos[MAX_STRIPES];
-
-struct lsm_buffer {
-        struct lov_stripe_md lsm;
-        struct lov_oinfo *ptrs[MAX_STRIPES];
-} lsm_buffer;
-
-static int l2_ioctl(int dev_id, int opc, void *buf)
-{
-        return l_ioctl(dev_id, opc, buf);
-}
-
-#define IOC_INIT(data)                                                  \
-do {                                                                    \
-        memset(&data, 0, sizeof(data));                                 \
-        data.ioc_dev = cur_device;                                      \
-} while (0)
-
-#define IOC_PACK(func, data)                                            \
-do {                                                                    \
-        memset(buf, 0, sizeof(rawbuf));                                 \
-        if (obd_ioctl_pack(&data, &buf, max)) {                         \
-                fprintf(stderr, "error: %s: invalid ioctl\n",           \
-                        jt_cmdname(func));                                 \
-                return -2;                                              \
-        }                                                               \
-} while (0)
-
-#define IOC_UNPACK(func, data)                                          \
-do {                                                                    \
-        if (obd_ioctl_unpack(&data, buf, max)) {                        \
-                fprintf(stderr, "error: %s: invalid reply\n",           \
-                        jt_cmdname(func));                                 \
-                return -2;                                              \
-        }                                                               \
-} while (0)
-
-int lcfg_ioctl(char * func, int dev_id, struct lustre_cfg *lcfg)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-        data.ioc_type = LUSTRE_CFG_TYPE;
-        data.ioc_plen1 = lustre_cfg_len(lcfg->lcfg_bufcount,
-                                        lcfg->lcfg_buflens);
-        data.ioc_pbuf1 = (void *)lcfg;
-        IOC_PACK(func, data);
-
-        rc =  l_ioctl(dev_id, OBD_IOC_PROCESS_CFG, buf);
-
-        return rc;
-}
-
-static int do_device(char *func, char *devname);
-
-int lcfg_mgs_ioctl(char *func, int dev_id, struct lustre_cfg *lcfg)
-{
-        struct obd_ioctl_data data;
-        static int mgs_device = -1;
-        char mgs[] = "$MGS";
-        int rc;
-
-        /* Always operates on MGS dev */
-        if (mgs_device == -1) {
-                do_disconnect(NULL, 1);
-                rc = do_device("mgsioc", mgs);
-                if (rc) {
-                        errno = ENODEV;
-                        return -1;
-                }
-                mgs_device = cur_device;
-        }
-
-        IOC_INIT(data);
-        data.ioc_dev = mgs_device;
-        data.ioc_type = LUSTRE_CFG_TYPE;
-        data.ioc_plen1 = lustre_cfg_len(lcfg->lcfg_bufcount,
-                                        lcfg->lcfg_buflens);
-        data.ioc_pbuf1 = (void *)lcfg;
-        IOC_PACK(func, data);
-
-        rc =  l_ioctl(dev_id, OBD_IOC_PARAM, buf);
-
-        if (rc == ENODEV)
-                fprintf(stderr, "Is the MGS running on this node?\n");
-        if (rc == ENOSYS)
-                fprintf(stderr, "Make sure cfg_device is set first.\n");
-        if (rc == EINVAL)
-                fprintf(stderr, "cfg_device should be of the form "
-                        "'lustre-MDT0000'\n");
-
-        return rc;
-}
-
-char *obdo_print(struct obdo *obd)
-{
-        char buf[1024];
-
-        sprintf(buf, "id: "LPX64"\ngrp: "LPX64"\natime: "LPU64"\nmtime: "LPU64
-                "\nctime: "LPU64"\nsize: "LPU64"\nblocks: "LPU64
-                "\nblksize: %u\nmode: %o\nuid: %d\ngid: %d\nflags: %x\n"
-                "misc: %x\nnlink: %d,\nvalid "LPX64"\n",
-                obd->o_id, obd->o_gr, obd->o_atime, obd->o_mtime, obd->o_ctime,
-                obd->o_size, obd->o_blocks, obd->o_blksize, obd->o_mode,
-                obd->o_uid, obd->o_gid, obd->o_flags, obd->o_misc,
-                obd->o_nlink, obd->o_valid);
-        return strdup(buf);
-}
-
-
-#define BAD_VERBOSE (-999999999)
-
-#define N2D_OFF 0x100      /* So we can tell between error codes and devices */
-
-static int do_name2dev(char *func, char *name)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-
-        data.ioc_inllen1 = strlen(name) + 1;
-        data.ioc_inlbuf1 = name;
-
-        IOC_PACK(func, data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_NAME2DEV, buf);
-        if (rc < 0)
-                return errno;
-        IOC_UNPACK(func, data);
-
-        return data.ioc_dev + N2D_OFF;
-}
-
-/*
- * resolve a device name to a device number.
- * supports a number, $name or %uuid.
- */
-int parse_devname(char *func, char *name)
-{
-        int rc;
-        int ret = -1;
-
-        if (!name)
-                return ret;
-        if (isdigit(name[0])) {
-                ret = strtoul(name, NULL, 0);
-        } else {
-                if (name[0] == '$' || name[0] == '%')
-                        name++;
-                rc = do_name2dev(func, name);
-                if (rc >= N2D_OFF) {
-                        ret = rc - N2D_OFF;
-                        // printf("Name %s is device %d\n", name, ret);
-                } else {
-                        fprintf(stderr, "No device found for name %s: %s\n",
-                               name, strerror(rc));
-                }
-        }
-        return ret;
-}
-
-static void
-reset_lsmb (struct lsm_buffer *lsmb)
-{
-        memset (&lsmb->lsm, 0, sizeof (lsmb->lsm));
-        memset(lov_oinfos, 0, sizeof(lov_oinfos));
-        lsmb->lsm.lsm_magic = LOV_MAGIC;
-}
-
-static int
-parse_lsm (struct lsm_buffer *lsmb, char *string)
-{
-        struct lov_stripe_md *lsm = &lsmb->lsm;
-        char                 *end;
-        int                   i;
-
-        /*
-         * object_id[=size#count[@offset:id]*]
-         */
-
-        reset_lsmb (lsmb);
-
-        lsm->lsm_object_id = strtoull (string, &end, 0);
-        if (end == string)
-                return (-1);
-        string = end;
-
-        if (*string == 0)
-                return (0);
-
-        if (*string != '=')
-                return (-1);
-        string++;
-
-        lsm->lsm_stripe_size = strtoul (string, &end, 0);
-        if (end == string)
-                return (-1);
-        string = end;
-
-        if (*string != '#')
-                return (-1);
-        string++;
-
-        lsm->lsm_stripe_count = strtoul (string, &end, 0);
-        if (end == string)
-                return (-1);
-        string = end;
-
-        if (*string == 0)               /* don't have to specify obj ids */
-                return (0);
-
-        for (i = 0; i < lsm->lsm_stripe_count; i++) {
-                if (*string != '@')
-                        return (-1);
-                string++;
-                lsm->lsm_oinfo[i]->loi_ost_idx = strtoul(string, &end, 0);
-                if (*end != ':')
-                        return (-1);
-                string = end + 1;
-                lsm->lsm_oinfo[i]->loi_id = strtoull(string, &end, 0);
-                string = end;
-        }
-
-        if (*string != 0)
-                return (-1);
-
-        return (0);
-}
-
-char *jt_cmdname(char *func)
-{
-        static char buf[512];
-
-        if (thread) {
-                sprintf(buf, "%s-%d", func, thread);
-                return buf;
-        }
-
-        return func;
-}
-
-#define difftime(a, b)                                  \
-        ((a)->tv_sec - (b)->tv_sec +                    \
-         ((a)->tv_usec - (b)->tv_usec) / 1000000.0)
-
-static int be_verbose(int verbose, struct timeval *next_time,
-                      __u64 num, __u64 *next_num, int num_total)
-{
-        struct timeval now;
-
-        if (!verbose)
-                return 0;
-
-        if (next_time != NULL)
-                gettimeofday(&now, NULL);
-
-        /* A positive verbosity means to print every X iterations */
-        if (verbose > 0 && (num >= *next_num || num >= num_total)) {
-                *next_num += verbose;
-                if (next_time) {
-                        next_time->tv_sec = now.tv_sec - verbose;
-                        next_time->tv_usec = now.tv_usec;
-                }
-                return 1;
-        }
-
-        /* A negative verbosity means to print at most each X seconds */
-        if (verbose < 0 && next_time != NULL &&
-            difftime(&now, next_time) >= 0.0){
-                next_time->tv_sec = now.tv_sec - verbose;
-                next_time->tv_usec = now.tv_usec;
-                *next_num = num;
-                return 1;
-        }
-
-        return 0;
-}
-
-static int get_verbose(char *func, const char *arg)
-{
-        int verbose;
-        char *end;
-
-        if (!arg || arg[0] == 'v')
-                verbose = 1;
-        else if (arg[0] == 's' || arg[0] == 'q')
-                verbose = 0;
-        else {
-                verbose = (int)strtoul(arg, &end, 0);
-                if (*end) {
-                        fprintf(stderr, "error: %s: bad verbose option '%s'\n",
-                                jt_cmdname(func), arg);
-                        return BAD_VERBOSE;
-                }
-        }
-
-        if (verbose < 0)
-                printf("Print status every %d seconds\n", -verbose);
-        else if (verbose == 1)
-                printf("Print status every operation\n");
-        else if (verbose > 1)
-                printf("Print status every %d operations\n", verbose);
-
-        return verbose;
-}
-
-int do_disconnect(char *func, int verbose)
-{
-        lcfg_set_devname(NULL);
-        cur_device = -1;
-        return 0;
-}
-
-#ifdef MAX_THREADS
-static void shmem_setup(void)
-{
-        /* Create new segment */
-        int shmid = shmget(IPC_PRIVATE, sizeof(*shared_data), 0600);
-
-        if (shmid == -1) {
-                fprintf(stderr, "Can't create shared data: %s\n",
-                        strerror(errno));
-                return;
-        }
-
-        /* Attatch to new segment */
-        shared_data = (struct shared_data *)shmat(shmid, NULL, 0);
-
-        if (shared_data == (struct shared_data *)(-1)) {
-                fprintf(stderr, "Can't attach shared data: %s\n",
-                        strerror(errno));
-                shared_data = NULL;
-                return;
-        }
-
-        /* Mark segment as destroyed, so it will disappear when we exit.
-         * Forks will inherit attached segments, so we should be OK.
-         */
-        if (shmctl(shmid, IPC_RMID, NULL) == -1) {
-                fprintf(stderr, "Can't destroy shared data: %s\n",
-                        strerror(errno));
-        }
-}
-
-static inline void shmem_lock(void)
-{
-        l_mutex_lock(&shared_data->mutex);
-}
-
-static inline void shmem_unlock(void)
-{
-        l_mutex_unlock(&shared_data->mutex);
-}
-
-static inline void shmem_reset(int total_threads)
-{
-        if (shared_data == NULL)
-                return;
-
-        memset(shared_data, 0, sizeof(*shared_data));
-        l_mutex_init(&shared_data->mutex);
-        l_cond_init(&shared_data->cond);
-        memset(counter_snapshot, 0, sizeof(counter_snapshot));
-        prev_valid = 0;
-        shared_data->barrier = total_threads;
-}
-
-static inline void shmem_bump(void)
-{
-        static int bumped_running;
-
-        if (shared_data == NULL || thread <= 0 || thread > MAX_THREADS)
-                return;
-
-        shmem_lock();
-        shared_data->counters[thread - 1]++;
-        if (!bumped_running)
-                shared_data->running++;
-        shmem_unlock();
-        bumped_running = 1;
-}
-
-static void shmem_snap(int total_threads, int live_threads)
-{
-        struct timeval this_time;
-        int non_zero = 0;
-        __u64 total = 0;
-        double secs;
-        int running;
-        int i;
-
-        if (shared_data == NULL || total_threads > MAX_THREADS)
-                return;
-
-        shmem_lock();
-        memcpy(counter_snapshot[0], shared_data->counters,
-               total_threads * sizeof(counter_snapshot[0][0]));
-        running = shared_data->running;
-        shmem_unlock();
-
-        gettimeofday(&this_time, NULL);
-
-        for (i = 0; i < total_threads; i++) {
-                long long this_count =
-                        counter_snapshot[0][i] - counter_snapshot[1][i];
-
-                if (this_count != 0) {
-                        non_zero++;
-                        total += this_count;
-                }
-        }
-
-        secs = (this_time.tv_sec + this_time.tv_usec / 1000000.0) -
-               (prev_time.tv_sec + prev_time.tv_usec / 1000000.0);
-
-        if (prev_valid &&
-            live_threads == total_threads &&
-            secs > 0.0)                    /* someone screwed with the time? */
-                printf("%d/%d Total: %f/second\n", non_zero, total_threads, total / secs);
-
-        memcpy(counter_snapshot[1], counter_snapshot[0],
-               total_threads * sizeof(counter_snapshot[0][0]));
-        prev_time = this_time;
-        if (!prev_valid &&
-            running == total_threads)
-                prev_valid = 1;
-}
-
-static void shmem_stop(void)
-{
-        if (shared_data == NULL)
-                return;
-
-        shared_data->stop = 1;
-}
-
-static int shmem_running(void)
-{
-        return (shared_data == NULL ||
-                !shared_data->stop);
-}
-#else
-static void shmem_setup(void)
-{
-}
-
-static inline void shmem_reset(int total_threads)
-{
-}
-
-static inline void shmem_bump(void)
-{
-}
-
-static void shmem_lock()
-{
-}
-
-static void shmem_unlock()
-{
-}
-
-static void shmem_stop(void)
-{
-}
-
-static int shmem_running(void)
-{
-        return 1;
-}
-#endif
-
-extern command_t cmdlist[];
-
-static int do_device(char *func, char *devname)
-{
-        int dev;
-
-        dev = parse_devname(func, devname);
-        if (dev < 0)
-                return -1;
-
-        lcfg_set_devname(devname);
-        cur_device = dev;
-        return 0;
-}
-
-int jt_obd_get_device()
-{
-        return cur_device;
-}
-
-int jt_obd_device(int argc, char **argv)
-{
-        int rc;
-
-        if (argc > 2)
-                return CMD_HELP;
-
-        if (argc == 1) {
-                printf("current device is %d - %s\n",
-                       cur_device, lcfg_get_devname() ? : "not set");
-                return 0;
-        }
-        rc = do_device("device", argv[1]);
-        return rc;
-}
-
-int jt_opt_device(int argc, char **argv)
-{
-        int ret;
-        int rc;
-
-        if (argc < 3)
-                return CMD_HELP;
-
-        rc = do_device("device", argv[1]);
-
-        if (!rc)
-                rc = Parser_execarg(argc - 2, argv + 2, cmdlist);
-
-        ret = do_disconnect(argv[0], 0);
-        if (!rc)
-                rc = ret;
-
-        return rc;
-}
-
-#ifdef MAX_THREADS
-static void parent_sighandler (int sig)
-{
-        return;
-}
-
-int jt_opt_threads(int argc, char **argv)
-{
-        static char      cmdstr[128];
-        sigset_t         saveset;
-        sigset_t         sigset;
-        struct sigaction sigact;
-        struct sigaction saveact1;
-        struct sigaction saveact2;
-        unsigned long    threads;
-        __u64            next_thread;
-        int verbose;
-        int rc = 0;
-        int report_count = -1;
-        char *end;
-        int i;
-
-        if (argc < 5)
-                return CMD_HELP;
-
-        threads = strtoul(argv[1], &end, 0);
-
-        if (*end == '.')
-                report_count = strtoul(end + 1, &end, 0);
-
-        if (*end || threads > MAX_THREADS) {
-                fprintf(stderr, "error: %s: invalid thread count '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-
-        verbose = get_verbose(argv[0], argv[2]);
-        if (verbose == BAD_VERBOSE)
-                return CMD_HELP;
-
-        if (verbose != 0) {
-                snprintf(cmdstr, sizeof(cmdstr), "%s", argv[4]);
-                for (i = 5; i < argc; i++)
-                        snprintf(cmdstr + strlen(cmdstr), sizeof(cmdstr),
-                                 " %s", argv[i]);
-
-                printf("%s: starting %ld threads on device %s running %s\n",
-                       argv[0], threads, argv[3], cmdstr);
-        }
-
-        shmem_reset(threads);
-
-        sigemptyset(&sigset);
-        sigaddset(&sigset, SIGALRM);
-        sigaddset(&sigset, SIGCHLD);
-        sigprocmask(SIG_BLOCK, &sigset, &saveset);
-
-        nthreads = threads;
-
-        for (i = 1, next_thread = verbose; i <= threads; i++) {
-                rc = fork();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: #%d - %s\n", argv[0], i,
-                                strerror(rc = errno));
-                        break;
-                } else if (rc == 0) {
-                        sigprocmask(SIG_SETMASK, &saveset, NULL);
-
-                        thread = i;
-                        argv[2] = "--device";
-                        return jt_opt_device(argc - 2, argv + 2);
-                } else if (be_verbose(verbose, NULL, i, &next_thread, threads))
-                        printf("%s: thread #%d (PID %d) started\n",
-                               argv[0], i, rc);
-                rc = 0;
-        }
-
-        if (!thread) {          /* parent process */
-                int live_threads = threads;
-
-                sigemptyset(&sigset);
-                sigemptyset(&sigact.sa_mask);
-                sigact.sa_handler = parent_sighandler;
-                sigact.sa_flags = 0;
-
-                sigaction(SIGALRM, &sigact, &saveact1);
-                sigaction(SIGCHLD, &sigact, &saveact2);
-
-                while (live_threads > 0) {
-                        int status;
-                        pid_t ret;
-
-                        if (verbose < 0)        /* periodic stats */
-                                alarm(-verbose);
-
-                        sigsuspend(&sigset);
-                        alarm(0);
-
-                        while (live_threads > 0) {
-                                ret = waitpid(0, &status, WNOHANG);
-                                if (ret == 0)
-                                        break;
-
-                                if (ret < 0) {
-                                        fprintf(stderr, "error: %s: wait - %s\n",
-                                                argv[0], strerror(errno));
-                                        if (!rc)
-                                                rc = errno;
-                                        continue;
-                                } else {
-                                        /*
-                                         * This is a hack.  We _should_ be able
-                                         * to use WIFEXITED(status) to see if
-                                         * there was an error, but it appears
-                                         * to be broken and it always returns 1
-                                         * (OK).  See wait(2).
-                                         */
-                                        int err = WEXITSTATUS(status);
-                                        if (err || WIFSIGNALED(status))
-                                                fprintf(stderr,
-                                                        "%s: PID %d had rc=%d\n",
-                                                        argv[0], ret, err);
-                                        if (!rc)
-                                                rc = err;
-
-                                        live_threads--;
-                                }
-                        }
-
-                        /* Show stats while all threads running */
-                        if (verbose < 0) {
-                                shmem_snap(threads, live_threads);
-                                if (report_count > 0 && --report_count == 0)
-                                        shmem_stop();
-                        }
-                }
-                sigaction(SIGCHLD, &saveact2, NULL);
-                sigaction(SIGALRM, &saveact1, NULL);
-        }
-
-        sigprocmask(SIG_SETMASK, &saveset, NULL);
-
-        return rc;
-}
-#else
-int jt_opt_threads(int argc, char **argv)
-{
-        fprintf(stderr, "%s not-supported in a single-threaded runtime\n",
-                jt_cmdname(argv[0]));
-        return CMD_HELP;
-}
-#endif
-
-int jt_opt_net(int argc, char **argv)
-{
-        char *arg2[3];
-        int rc;
-
-        if (argc < 3)
-                return CMD_HELP;
-
-        arg2[0] = argv[0];
-        arg2[1] = argv[1];
-        arg2[2] = NULL;
-        rc = jt_ptl_network (2, arg2);
-
-        if (!rc)
-                rc = Parser_execarg(argc - 2, argv + 2, cmdlist);
-
-        return rc;
-}
-
-int jt_obd_no_transno(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_NO_TRANSNO, buf);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_set_readonly(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_SET_READONLY, buf);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_abort_recovery(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_ABORT_RECOVERY, buf);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_get_version(int argc, char **argv)
-{
-        int rc;
-        char buf[8192];
-        struct obd_ioctl_data *data = (struct obd_ioctl_data *)buf;
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        memset(buf, 0, sizeof(buf));
-        data->ioc_version = OBD_IOCTL_VERSION;
-        data->ioc_inllen1 = sizeof(buf) - size_round(sizeof(*data));
-        data->ioc_inlbuf1 = buf + size_round(sizeof(*data));
-        data->ioc_len = obd_ioctl_packlen(data);
-
-        rc = l2_ioctl(OBD_DEV_ID, OBD_GET_VERSION, buf);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        else {
-                printf("Lustre version: %s\n", data->ioc_bulk);
-        }
-
-        printf("lctl   version: %s\n", BUILD_VERSION);
-        return rc;
-}
-
-/* get device list by ioctl */
-int jt_obd_list_ioctl(int argc, char **argv)
-{
-        int rc, index;
-        char buf[8192];
-        struct obd_ioctl_data *data = (struct obd_ioctl_data *)buf;
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        for (index = 0;; index++) {
-                memset(buf, 0, sizeof(buf));
-                data->ioc_version = OBD_IOCTL_VERSION;
-                data->ioc_inllen1 = sizeof(buf) - size_round(sizeof(*data));
-                data->ioc_inlbuf1 = buf + size_round(sizeof(*data));
-                data->ioc_len = obd_ioctl_packlen(data);
-                data->ioc_count = index;
-
-                rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_GETDEVICE, buf);
-                if (rc != 0)
-                        break;
-                printf("%s\n", (char *)data->ioc_bulk);
-        }
-        if (rc != 0) {
-                if (errno == ENOENT)
-                        /* no device or the last device */
-                        rc = 0;
-                else
-                        fprintf(stderr, "Error getting device list: %s: "
-                                        "check dmesg.\n",
-                                        strerror(errno));
-        }
-        return rc;
-}
-
-int jt_obd_list(int argc, char **argv)
-{
-        int rc;
-        char buf[MAX_STRING_SIZE];
-        FILE *fp = NULL;
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        fp = fopen(DEVICES_LIST, "r");
-        if (fp == NULL) {
-                fprintf(stderr, "error: %s: %s opening "DEVICES_LIST"\n",
-                        jt_cmdname(argv[0]), strerror(rc =  errno));
-                return jt_obd_list_ioctl(argc, argv);
-        }
-
-        while (fgets(buf, sizeof(buf), fp) != NULL)
-                printf("%s", buf);
-
-        fclose(fp);
-        return 0;
-}
-
-
-
-
-/* Create one or more objects, arg[4] may describe stripe meta-data.  If
- * not, defaults assumed.  This echo-client instance stashes the stripe
- * object ids.  Use get_stripe on this node to print full lsm and
- * set_stripe on another node to cut/paste between nodes.
- */
-/* create <count> [<file_create_mode>] [q|v|# verbosity] [striping] */
-int jt_obd_create(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        struct timeval next_time;
-        __u64 count = 1, next_count, base_id = 0;
-        int verbose = 1, mode = 0100644, rc = 0, i, valid_lsm = 0;
-        char *end;
-
-        IOC_INIT(data);
-        if (argc < 2 || argc > 5)
-                return CMD_HELP;
-
-        count = strtoull(argv[1], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: invalid iteration count '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-
-        if (argc > 2) {
-                mode = strtoul(argv[2], &end, 0);
-                if (*end) {
-                        fprintf(stderr, "error: %s: invalid mode '%s'\n",
-                                jt_cmdname(argv[0]), argv[2]);
-                        return CMD_HELP;
-                }
-                if (!(mode & S_IFMT))
-                        mode |= S_IFREG;
-        }
-
-        if (argc > 3) {
-                verbose = get_verbose(argv[0], argv[3]);
-                if (verbose == BAD_VERBOSE)
-                        return CMD_HELP;
-        }
-
-        if (argc < 5)
-                reset_lsmb (&lsm_buffer);       /* will set default */
-        else {
-                rc = parse_lsm (&lsm_buffer, argv[4]);
-                if (rc != 0) {
-                        fprintf(stderr, "error: %s: invalid lsm '%s'\n",
-                                jt_cmdname(argv[0]), argv[4]);
-                        return CMD_HELP;
-                }
-                base_id = lsm_buffer.lsm.lsm_object_id;
-                valid_lsm = 1;
-        }
-
-        printf("%s: "LPD64" objects\n", jt_cmdname(argv[0]), count);
-        gettimeofday(&next_time, NULL);
-        next_time.tv_sec -= verbose;
-
-        for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
-                data.ioc_obdo1.o_mode = mode;
-                data.ioc_obdo1.o_id = base_id;
-                data.ioc_obdo1.o_uid = 0;
-                data.ioc_obdo1.o_gid = 0;
-                data.ioc_obdo1.o_valid = OBD_MD_FLTYPE | OBD_MD_FLMODE |
-                        OBD_MD_FLID | OBD_MD_FLUID | OBD_MD_FLGID;
-
-                if (valid_lsm) {
-                        data.ioc_plen1 = sizeof lsm_buffer;
-                        data.ioc_pbuf1 = (char *)&lsm_buffer;
-                }
-
-                IOC_PACK(argv[0], data);
-                rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_CREATE, buf);
-                IOC_UNPACK(argv[0], data);
-                shmem_bump();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: #%d - %s\n",
-                                jt_cmdname(argv[0]), i, strerror(rc = errno));
-                        break;
-                }
-                if (!(data.ioc_obdo1.o_valid & OBD_MD_FLID)) {
-                        fprintf(stderr,"error: %s: oid not valid #%d:"LPX64"\n",
-                                jt_cmdname(argv[0]), i, data.ioc_obdo1.o_valid);
-                        rc = EINVAL;
-                        break;
-                }
-
-                if (be_verbose(verbose, &next_time, i, &next_count, count))
-                        printf("%s: #%d is object id "LPX64"\n",
-                                jt_cmdname(argv[0]), i, data.ioc_obdo1.o_id);
-        }
-        return rc;
-}
-
-int jt_obd_setattr(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        char *end;
-        int rc;
-
-        IOC_INIT(data);
-        if (argc != 2)
-                return CMD_HELP;
-
-        data.ioc_obdo1.o_id = strtoull(argv[1], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: invalid objid '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-        data.ioc_obdo1.o_mode = S_IFREG | strtoul(argv[2], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: invalid mode '%s'\n",
-                        jt_cmdname(argv[0]), argv[2]);
-                return CMD_HELP;
-        }
-        data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE;
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_SETATTR, buf);
-        if (rc < 0)
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_test_setattr(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        struct timeval start, next_time;
-        __u64 i, count, next_count;
-        int verbose = 1;
-        obd_id objid = 3;
-        char *end;
-        int rc = 0;
-
-        if (argc < 2 || argc > 4)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        count = strtoull(argv[1], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: invalid iteration count '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-
-        if (argc >= 3) {
-                verbose = get_verbose(argv[0], argv[2]);
-                if (verbose == BAD_VERBOSE)
-                        return CMD_HELP;
-        }
-
-        if (argc >= 4) {
-                if (argv[3][0] == 't') {
-                        objid = strtoull(argv[3] + 1, &end, 0);
-                        if (thread)
-                                objid += thread - 1;
-                } else
-                        objid = strtoull(argv[3], &end, 0);
-                if (*end) {
-                        fprintf(stderr, "error: %s: invalid objid '%s'\n",
-                                jt_cmdname(argv[0]), argv[3]);
-                        return CMD_HELP;
-                }
-        }
-
-        gettimeofday(&start, NULL);
-        next_time.tv_sec = start.tv_sec - verbose;
-        next_time.tv_usec = start.tv_usec;
-        if (verbose != 0)
-                printf("%s: setting "LPD64" attrs (objid "LPX64"): %s",
-                       jt_cmdname(argv[0]), count, objid, ctime(&start.tv_sec));
-
-        for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
-                data.ioc_obdo1.o_id = objid;
-                data.ioc_obdo1.o_mode = S_IFREG;
-                data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE;
-                IOC_PACK(argv[0], data);
-                rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_SETATTR, &data);
-                shmem_bump();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: #"LPD64" - %d:%s\n",
-                                jt_cmdname(argv[0]), i, errno, strerror(rc = errno));
-                        break;
-                } else {
-                        if (be_verbose
-                            (verbose, &next_time, i, &next_count, count))
-                                printf("%s: set attr #"LPD64"\n",
-                                       jt_cmdname(argv[0]), i);
-                }
-        }
-
-        if (!rc) {
-                struct timeval end;
-                double diff;
-
-                gettimeofday(&end, NULL);
-
-                diff = difftime(&end, &start);
-
-                --i;
-                if (verbose != 0)
-                        printf("%s: "LPD64" attrs in %.3fs (%.3f attr/s): %s",
-                               jt_cmdname(argv[0]), i, diff, i / diff,
-                               ctime(&end.tv_sec));
-        }
-        return rc;
-}
-
-int jt_obd_destroy(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        struct timeval next_time;
-        __u64 count = 1, next_count;
-        int verbose = 1;
-        __u64 id;
-        char *end;
-        int rc = 0, i;
-
-        IOC_INIT(data);
-        if (argc < 2 || argc > 4)
-                return CMD_HELP;
-
-        id = strtoull(argv[1], &end, 0);
-        if (*end || id == 0 || errno != 0) {
-                fprintf(stderr, "error: %s: invalid objid '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-        if (argc > 2) {
-                count = strtoull(argv[2], &end, 0);
-                if (*end) {
-                        fprintf(stderr,
-                                "error: %s: invalid iteration count '%s'\n",
-                                jt_cmdname(argv[0]), argv[2]);
-                        return CMD_HELP;
-                }
-        }
-
-        if (argc > 3) {
-                verbose = get_verbose(argv[0], argv[3]);
-                if (verbose == BAD_VERBOSE)
-                        return CMD_HELP;
-        }
-
-        printf("%s: "LPD64" objects\n", jt_cmdname(argv[0]), count);
-        gettimeofday(&next_time, NULL);
-        next_time.tv_sec -= verbose;
-
-        for (i = 1, next_count = verbose; i <= count && shmem_running(); i++, id++) {
-                data.ioc_obdo1.o_id = id;
-                data.ioc_obdo1.o_mode = S_IFREG | 0644;
-                data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLMODE;
-
-                IOC_PACK(argv[0], data);
-                rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_DESTROY, buf);
-                IOC_UNPACK(argv[0], data);
-                shmem_bump();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: objid "LPX64": %s\n",
-                                jt_cmdname(argv[0]), id, strerror(rc = errno));
-                        break;
-                }
-
-                if (be_verbose(verbose, &next_time, i, &next_count, count))
-                        printf("%s: #%d is object id "LPX64"\n",
-                               jt_cmdname(argv[0]), i, id);
-        }
-
-        return rc;
-}
-
-int jt_obd_getattr(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        char *end;
-        int rc;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_obdo1.o_id = strtoull(argv[1], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: invalid objid '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-        /* to help obd filter */
-        data.ioc_obdo1.o_mode = 0100644;
-        data.ioc_obdo1.o_valid = 0xffffffff;
-        printf("%s: object id "LPX64"\n", jt_cmdname(argv[0]),data.ioc_obdo1.o_id);
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_GETATTR, buf);
-        IOC_UNPACK(argv[0], data);
-        if (rc) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        } else {
-                printf("%s: object id "LPX64", mode %o\n", jt_cmdname(argv[0]),
-                       data.ioc_obdo1.o_id, data.ioc_obdo1.o_mode);
-        }
-        return rc;
-}
-
-int jt_obd_test_getattr(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        struct timeval start, next_time;
-        __u64 i, count, next_count;
-        int verbose = 1;
-        obd_id objid = 3;
-        char *end;
-        int rc = 0;
-
-        if (argc < 2 || argc > 4)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        count = strtoull(argv[1], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: invalid iteration count '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-
-        if (argc >= 3) {
-                verbose = get_verbose(argv[0], argv[2]);
-                if (verbose == BAD_VERBOSE)
-                        return CMD_HELP;
-        }
-
-        if (argc >= 4) {
-                if (argv[3][0] == 't') {
-                        objid = strtoull(argv[3] + 1, &end, 0);
-                        if (thread)
-                                objid += thread - 1;
-                } else
-                        objid = strtoull(argv[3], &end, 0);
-                if (*end) {
-                        fprintf(stderr, "error: %s: invalid objid '%s'\n",
-                                jt_cmdname(argv[0]), argv[3]);
-                        return CMD_HELP;
-                }
-        }
-
-        gettimeofday(&start, NULL);
-        next_time.tv_sec = start.tv_sec - verbose;
-        next_time.tv_usec = start.tv_usec;
-        if (verbose != 0)
-                printf("%s: getting "LPD64" attrs (objid "LPX64"): %s",
-                       jt_cmdname(argv[0]), count, objid, ctime(&start.tv_sec));
-
-        for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
-                data.ioc_obdo1.o_id = objid;
-                data.ioc_obdo1.o_mode = S_IFREG;
-                data.ioc_obdo1.o_valid = 0xffffffff;
-                IOC_PACK(argv[0], data);
-                rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_GETATTR, &data);
-                shmem_bump();
-                if (rc < 0) {
-                        fprintf(stderr, "error: %s: #"LPD64" - %d:%s\n",
-                                jt_cmdname(argv[0]), i, errno, strerror(rc = errno));
-                        break;
-                } else {
-                        if (be_verbose
-                            (verbose, &next_time, i, &next_count, count))
-                                printf("%s: got attr #"LPD64"\n",
-                                       jt_cmdname(argv[0]), i);
-                }
-        }
-
-        if (!rc) {
-                struct timeval end;
-                double diff;
-
-                gettimeofday(&end, NULL);
-
-                diff = difftime(&end, &start);
-
-                --i;
-                if (verbose != 0)
-                        printf("%s: "LPD64" attrs in %.3fs (%.3f attr/s): %s",
-                               jt_cmdname(argv[0]), i, diff, i / diff,
-                               ctime(&end.tv_sec));
-        }
-        return rc;
-}
-
-/* test_brw <cnt>                                               count
-        <r|w[r(repeat)x(noverify)]>                             mode
-        <q|v|#(print interval)>                                 verbosity
-        <npages[+offset]>                                       blocksize
-        <[[<interleave_threads>]t(inc obj by thread#)]obj>      object
-        [p|g<args>]                                             batch */
-int jt_obd_test_brw(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        struct timeval start, next_time;
-        __u64 count, next_count, len, stride, thr_offset = 0, objid = 3;
-        int write = 0, verbose = 1, cmd, i, rc = 0, pages = 1;
-        int offset_pages = 0;
-        long n;
-        int repeat_offset = 0;
-        unsigned long long ull;
-        int  nthr_per_obj = 0;
-        int  verify = 1;
-        int  obj_idx = 0;
-        char *end;
-
-        if (argc < 2 || argc > 7) {
-                fprintf(stderr, "error: %s: bad number of arguments: %d\n",
-                        jt_cmdname(argv[0]), argc);
-                return CMD_HELP;
-        }
-
-        count = strtoull(argv[1], &end, 0);
-        if (*end) {
-                fprintf(stderr, "error: %s: bad iteration count '%s'\n",
-                        jt_cmdname(argv[0]), argv[1]);
-                return CMD_HELP;
-        }
-
-        if (argc >= 3) {
-                if (argv[2][0] == 'w' || argv[2][0] == '1')
-                        write = 1;
-                /* else it's a read */
-
-                if (argv[2][0] != 0)
-                        for (i = 1; argv[2][i] != 0; i++)
-                                switch (argv[2][i]) {
-                                case 'r':
-                                        repeat_offset = 1;
-                                        break;
-
-                                case 'x':
-                                        verify = 0;
-                                        break;
-
-                                default:
-                                        fprintf (stderr, "Can't parse cmd '%s'\n",
-                                                 argv[2]);
-                                        return CMD_HELP;
-                                }
-        }
-
-        if (argc >= 4) {
-                verbose = get_verbose(argv[0], argv[3]);
-                if (verbose == BAD_VERBOSE)
-                        return CMD_HELP;
-        }
-
-        if (argc >= 5) {
-                pages = strtoul(argv[4], &end, 0);
-
-                if (*end == '+')
-                        offset_pages = strtoul(end + 1, &end, 0);
-
-                if (*end != 0 ||
-                    offset_pages < 0 || offset_pages >= pages) {
-                        fprintf(stderr, "error: %s: bad npages[+offset] parameter '%s'\n",
-                                jt_cmdname(argv[0]), argv[4]);
-                        return CMD_HELP;
-                }
-        }
-
-        if (argc >= 6) {
-                if (thread &&
-                    (n = strtol(argv[5], &end, 0)) > 0 &&
-                    *end == 't' &&
-                    (ull = strtoull(end + 1, &end, 0)) > 0 &&
-                    *end == 0) {
-                        nthr_per_obj = n;
-                        objid = ull;
-                } else if (thread &&
-                           argv[5][0] == 't') {
-                        nthr_per_obj = 1;
-                        objid = strtoull(argv[5] + 1, &end, 0);
-                } else {
-                        nthr_per_obj = 0;
-                        objid = strtoull(argv[5], &end, 0);
-                }
-                if (*end) {
-                        fprintf(stderr, "error: %s: bad objid '%s'\n",
-                                jt_cmdname(argv[0]), argv[5]);
-                        return CMD_HELP;
-                }
-        }
-
-        IOC_INIT(data);
-
-        /* communicate the 'type' of brw test and batching to echo_client.
-         * don't start.  we'd love to refactor this lctl->echo_client
-         * interface */
-        data.ioc_pbuf1 = (void *)1;
-        data.ioc_plen1 = 1;
-
-        if (argc >= 7) {
-                switch(argv[6][0]) {
-                        case 'g': /* plug and unplug */
-                                data.ioc_pbuf1 = (void *)2;
-                                data.ioc_plen1 = strtoull(argv[6] + 1, &end,
-                                                          0);
-                                break;
-                        case 'p': /* prep and commit */
-                                data.ioc_pbuf1 = (void *)3;
-                                data.ioc_plen1 = strtoull(argv[6] + 1, &end,
-                                                          0);
-                                break;
-                        default:
-                                fprintf(stderr, "error: %s: batching '%s' "
-                                        "needs to specify 'p' or 'g'\n",
-                                        jt_cmdname(argv[0]), argv[6]);
-                                return CMD_HELP;
-                }
-
-                if (*end) {
-                        fprintf(stderr, "error: %s: bad batching '%s'\n",
-                                jt_cmdname(argv[0]), argv[6]);
-                        return CMD_HELP;
-                }
-                data.ioc_plen1 *= getpagesize();
-        }
-
-        len = pages * getpagesize();
-        thr_offset = offset_pages * getpagesize();
-        stride = len;
-
-#ifdef MAX_THREADS
-        if (thread) {
-                shmem_lock ();
-                if (nthr_per_obj != 0) {
-                        /* threads interleave */
-                        obj_idx = (thread - 1)/nthr_per_obj;
-                        objid += obj_idx;
-                        stride *= nthr_per_obj;
-                        if (thread == 1)
-                                shared_data->offsets[obj_idx] = stride + thr_offset;
-                        thr_offset += ((thread - 1) % nthr_per_obj) * len;
-                } else {
-                        /* threads disjoint */
-                        thr_offset += (thread - 1) * len;
-                }
-
-                shared_data->barrier--;
-                if (shared_data->barrier == 0)
-                        l_cond_broadcast(&shared_data->cond);
-                else
-                        l_cond_wait(&shared_data->cond,
-                                          &shared_data->mutex);
-
-                shmem_unlock ();
-        }
-#endif
-
-        data.ioc_obdo1.o_id = objid;
-        data.ioc_obdo1.o_mode = S_IFREG;
-        data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE | OBD_MD_FLFLAGS;
-        data.ioc_obdo1.o_flags = (verify ? OBD_FL_DEBUG_CHECK : 0);
-        data.ioc_count = len;
-        data.ioc_offset = (repeat_offset ? 0 : thr_offset);
-
-        gettimeofday(&start, NULL);
-        next_time.tv_sec = start.tv_sec - verbose;
-        next_time.tv_usec = start.tv_usec;
-
-        if (verbose != 0)
-                printf("%s: %s "LPU64"x%d pages (obj "LPX64", off "LPU64"): %s",
-                       jt_cmdname(argv[0]), write ? "writing" : "reading", count,
-                       pages, objid, data.ioc_offset, ctime(&start.tv_sec));
-
-        cmd = write ? OBD_IOC_BRW_WRITE : OBD_IOC_BRW_READ;
-        for (i = 1, next_count = verbose; i <= count && shmem_running(); i++) {
-                data.ioc_obdo1.o_valid &= ~(OBD_MD_FLBLOCKS|OBD_MD_FLGRANT);
-                IOC_PACK(argv[0], data);
-                rc = l2_ioctl(OBD_DEV_ID, cmd, buf);
-                shmem_bump();
-                if (rc) {
-                        fprintf(stderr, "error: %s: #%d - %s on %s\n",
-                                jt_cmdname(argv[0]), i, strerror(rc = errno),
-                                write ? "write" : "read");
-                        break;
-                } else if (be_verbose(verbose, &next_time,i, &next_count,count)) {
-                        shmem_lock ();
-                        printf("%s: %s number %d @ "LPD64":"LPU64" for %d\n",
-                               jt_cmdname(argv[0]), write ? "write" : "read", i,
-                               data.ioc_obdo1.o_id, data.ioc_offset,
-                               (int)(pages * getpagesize()));
-                        shmem_unlock ();
-                }
-
-                if (!repeat_offset) {
-#ifdef MAX_THREADS
-                        if (stride == len) {
-                                data.ioc_offset += stride;
-                        } else if (i < count) {
-                                shmem_lock ();
-                                data.ioc_offset = shared_data->offsets[obj_idx];
-                                shared_data->offsets[obj_idx] += len;
-                                shmem_unlock ();
-                        }
-#else
-                        data.ioc_offset += len;
-                        obj_idx = 0; /* avoids an unused var warning */
-#endif
-                }
-        }
-
-        if (!rc) {
-                struct timeval end;
-                double diff;
-
-                gettimeofday(&end, NULL);
-
-                diff = difftime(&end, &start);
-
-                --i;
-                if (verbose != 0)
-                        printf("%s: %s %dx%d pages in %.3fs (%.3f MB/s): %s",
-                               jt_cmdname(argv[0]), write ? "wrote" : "read",
-                               i, pages, diff,
-                               ((double)i * pages * getpagesize()) /
-                               (diff * 1048576.0),
-                               ctime(&end.tv_sec));
-        }
-
-        return rc;
-}
-
-int jt_obd_lov_getconfig(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        struct lov_desc desc;
-        struct obd_uuid *uuidarray;
-        __u32 *obdgens;
-        char *path;
-        int rc, fd;
-
-        IOC_INIT(data);
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        path = argv[1];
-        fd = open(path, O_RDONLY);
-        if (fd < 0) {
-                fprintf(stderr, "open \"%s\" failed: %s\n", path,
-                        strerror(errno));
-                return -errno;
-        }
-
-        memset(&desc, 0, sizeof(desc));
-        obd_str2uuid(&desc.ld_uuid, argv[1]);
-        desc.ld_tgt_count = ((OBD_MAX_IOCTL_BUFFER-sizeof(data)-sizeof(desc)) /
-                             (sizeof(*uuidarray) + sizeof(*obdgens)));
-
-
-repeat:
-        uuidarray = calloc(desc.ld_tgt_count, sizeof(*uuidarray));
-        if (!uuidarray) {
-                fprintf(stderr, "error: %s: no memory for %d uuid's\n",
-                        jt_cmdname(argv[0]), desc.ld_tgt_count);
-                rc = -ENOMEM;
-                goto out;
-        }
-        obdgens = calloc(desc.ld_tgt_count, sizeof(*obdgens));
-        if (!obdgens) {
-                fprintf(stderr, "error: %s: no memory for %d generation #'s\n",
-                        jt_cmdname(argv[0]), desc.ld_tgt_count);
-                rc = -ENOMEM;
-                goto out_uuidarray;
-        }
-
-        data.ioc_inllen1 = sizeof(desc);
-        data.ioc_inlbuf1 = (char *)&desc;
-        data.ioc_inllen2 = desc.ld_tgt_count * sizeof(*uuidarray);
-        data.ioc_inlbuf2 = (char *)uuidarray;
-        data.ioc_inllen3 = desc.ld_tgt_count * sizeof(*obdgens);
-        data.ioc_inlbuf3 = (char *)obdgens;
-
-        if (obd_ioctl_pack(&data, &buf, max)) {
-                fprintf(stderr, "error: %s: invalid ioctl\n",
-                        jt_cmdname(argv[0]));
-                rc = -EINVAL;
-                goto out_obdgens;
-        }
-        rc = ioctl(fd, OBD_IOC_LOV_GET_CONFIG, buf);
-        if (rc == -ENOSPC) {
-                free(uuidarray);
-                free(obdgens);
-                goto repeat;
-        } else if (rc) {
-                fprintf(stderr, "error: %s: ioctl error: %s\n",
-                        jt_cmdname(argv[0]), strerror(rc = errno));
-        } else {
-                struct obd_uuid *uuidp;
-                __u32 *genp;
-                int i;
-
-                if (obd_ioctl_unpack(&data, buf, max)) {
-                        fprintf(stderr, "error: %s: invalid reply\n",
-                                jt_cmdname(argv[0]));
-                        rc = -EINVAL;
-                        goto out;
-                }
-                if (desc.ld_default_stripe_count == (__u16)-1)
-                        printf("default_stripe_count: %d\n", -1);
-                else
-                        printf("default_stripe_count: %u\n",
-                               desc.ld_default_stripe_count);
-                printf("default_stripe_size: "LPU64"\n",
-                       desc.ld_default_stripe_size);
-                printf("default_stripe_offset: "LPU64"\n",
-                       desc.ld_default_stripe_offset);
-                printf("default_stripe_pattern: %u\n", desc.ld_pattern);
-                printf("obd_count: %u\n", desc.ld_tgt_count);
-                printf("OBDS:\tobdidx\t\tobdgen\t\t obduuid\n");
-                uuidp = uuidarray;
-                genp = obdgens;
-                for (i = 0; i < desc.ld_tgt_count; i++, uuidp++, genp++)
-                        printf("\t%6u\t%14u\t\t %s\n", i, *genp, (char *)uuidp);
-        }
-out_obdgens:
-        free(obdgens);
-out_uuidarray:
-        free(uuidarray);
-out:
-        close(fd);
-        return rc;
-}
-
-int jt_obd_ldlm_regress_start(int argc, char **argv)
-{
-        int rc;
-        struct obd_ioctl_data data;
-        char argstring[200];
-        int i, count = sizeof(argstring) - 1;
-
-        IOC_INIT(data);
-        if (argc > 5)
-                return CMD_HELP;
-
-        argstring[0] = '\0';
-        for (i = 1; i < argc; i++) {
-                strncat(argstring, " ", count);
-                count--;
-                strncat(argstring, argv[i], count);
-                count -= strlen(argv[i]);
-        }
-
-        if (strlen(argstring)) {
-                data.ioc_inlbuf1 = argstring;
-                data.ioc_inllen1 = strlen(argstring) + 1;
-        }
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, IOC_LDLM_REGRESS_START, buf);
-        if (rc)
-                fprintf(stderr, "error: %s: test failed: %s\n",
-                        jt_cmdname(argv[0]), strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_ldlm_regress_stop(int argc, char **argv)
-{
-        int rc;
-        struct obd_ioctl_data data;
-        IOC_INIT(data);
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, IOC_LDLM_REGRESS_STOP, buf);
-
-        if (rc)
-                fprintf(stderr, "error: %s: test failed: %s\n",
-                        jt_cmdname(argv[0]), strerror(rc = errno));
-        return rc;
-}
-
-static int do_activate(int argc, char **argv, int flag)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-        if (argc != 1)
-                return CMD_HELP;
-
-        /* reuse offset for 'active' */
-        data.ioc_offset = flag;
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, IOC_OSC_SET_ACTIVE, buf);
-        if (rc)
-                fprintf(stderr, "error: %s: failed: %s\n",
-                        jt_cmdname(argv[0]), strerror(rc = errno));
-
-        return rc;
-}
-
-int jt_obd_deactivate(int argc, char **argv)
-{
-        return do_activate(argc, argv, 0);
-}
-
-int jt_obd_activate(int argc, char **argv)
-{
-        return do_activate(argc, argv, 1);
-}
-
-int jt_obd_recover(int argc, char **argv)
-{
-        int rc;
-        struct obd_ioctl_data data;
-
-        IOC_INIT(data);
-        if (argc > 2)
-                return CMD_HELP;
-
-        if (argc == 2) {
-                data.ioc_inllen1 = strlen(argv[1]) + 1;
-                data.ioc_inlbuf1 = argv[1];
-        }
-
-        IOC_PACK(argv[0], data);
-        rc = l2_ioctl(OBD_DEV_ID, OBD_IOC_CLIENT_RECOVER, buf);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: %s\n", jt_cmdname(argv[0]),
-                        strerror(rc = errno));
-        }
-
-        return rc;
-}
-
-int jt_obd_mdc_lookup(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        char *parent, *child;
-        int rc, fd, verbose = 1;
-
-        if (argc < 3 || argc > 4)
-                return CMD_HELP;
-
-        parent = argv[1];
-        child = argv[2];
-        if (argc == 4)
-                verbose = get_verbose(argv[0], argv[3]);
-
-        IOC_INIT(data);
-
-        data.ioc_inllen1 = strlen(child) + 1;
-        data.ioc_inlbuf1 = child;
-
-        IOC_PACK(argv[0], data);
-
-        fd = open(parent, O_RDONLY);
-        if (fd < 0) {
-                fprintf(stderr, "open \"%s\" failed: %s\n", parent,
-                        strerror(errno));
-                return -1;
-        }
-
-        rc = ioctl(fd, IOC_MDC_LOOKUP, buf);
-        if (rc < 0) {
-                fprintf(stderr, "error: %s: ioctl error: %s\n",
-                        jt_cmdname(argv[0]), strerror(rc = errno));
-        }
-        close(fd);
-
-        if (verbose) {
-                IOC_UNPACK(argv[0], data);
-                printf("%s: mode %o uid %d gid %d\n", child,
-                       data.ioc_obdo1.o_mode, data.ioc_obdo1.o_uid,
-                       data.ioc_obdo1.o_gid);
-        }
-
-        return rc;
-}
-
-int jt_cfg_dump_log(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        IOC_INIT(data);
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-
-        IOC_PACK(argv[0], data);
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_DUMP_LOG, buf);
-        if (rc < 0)
-                fprintf(stderr, "OBD_IOC_DUMP_LOG failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-}
-
-int jt_llog_catlist(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (argc != 1)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_inllen1 = max - size_round(sizeof(data));
-        IOC_PACK(argv[0], data);
-
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_CATLOGLIST, buf);
-        if (rc == 0)
-                fprintf(stdout, "%s", ((struct obd_ioctl_data*)buf)->ioc_bulk);
-        else
-                fprintf(stderr, "OBD_IOC_CATLOGLIST failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-}
-
-int jt_llog_info(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-        data.ioc_inllen2 = max - size_round(sizeof(data)) -
-                size_round(data.ioc_inllen1);
-        IOC_PACK(argv[0], data);
-
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_LLOG_INFO, buf);
-        if (rc == 0)
-                fprintf(stdout, "%s", ((struct obd_ioctl_data*)buf)->ioc_bulk);
-        else
-                fprintf(stderr, "OBD_IOC_LLOG_INFO failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-}
-
-int jt_llog_print(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (argc != 2 && argc != 4)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-        if (argc == 4) {
-                data.ioc_inllen2 = strlen(argv[2]) + 1;
-                data.ioc_inlbuf2 = argv[2];
-                data.ioc_inllen3 = strlen(argv[3]) + 1;
-                data.ioc_inlbuf3 = argv[3];
-        } else {
-                char from[2] = "1", to[3] = "-1";
-                data.ioc_inllen2 = strlen(from) + 1;
-                data.ioc_inlbuf2 = from;
-                data.ioc_inllen3 = strlen(to) + 1;
-                data.ioc_inlbuf3 = to;
-        }
-        data.ioc_inllen4 = max - size_round(sizeof(data)) -
-                size_round(data.ioc_inllen1) -
-                size_round(data.ioc_inllen2) -
-                size_round(data.ioc_inllen3);
-        IOC_PACK(argv[0], data);
-
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_LLOG_PRINT, buf);
-        if (rc == 0)
-                fprintf(stdout, "%s", ((struct obd_ioctl_data*)buf)->ioc_bulk);
-        else
-                fprintf(stderr, "OBD_IOC_LLOG_PRINT failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-}
-
-int jt_llog_cancel(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (argc != 4)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-        data.ioc_inllen2 = strlen(argv[2]) + 1;
-        data.ioc_inlbuf2 = argv[2];
-        data.ioc_inllen3 = strlen(argv[3]) + 1;
-        data.ioc_inlbuf3 = argv[3];
-        IOC_PACK(argv[0], data);
-
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_LLOG_CANCEL, buf);
-        if (rc == 0)
-                fprintf(stdout, "index %s be canceled.\n", argv[3]);
-        else
-                fprintf(stderr, "OBD_IOC_LLOG_CANCEL failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-
-}
-int jt_llog_check(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (argc != 2 && argc != 4)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-        if (argc == 4) {
-                data.ioc_inllen2 = strlen(argv[2]) + 1;
-                data.ioc_inlbuf2 = argv[2];
-                data.ioc_inllen3 = strlen(argv[3]) + 1;
-                data.ioc_inlbuf3 = argv[3];
-        } else {
-                char from[2] = "1", to[3] = "-1";
-                data.ioc_inllen2 = strlen(from) + 1;
-                data.ioc_inlbuf2 = from;
-                data.ioc_inllen3 = strlen(to) + 1;
-                data.ioc_inlbuf3 = to;
-        }
-        data.ioc_inllen4 = max - size_round(sizeof(data)) -
-                size_round(data.ioc_inllen1) -
-                size_round(data.ioc_inllen2) -
-                size_round(data.ioc_inllen3);
-        IOC_PACK(argv[0], data);
-
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_LLOG_CHECK, buf);
-        if (rc == 0)
-                fprintf(stdout, "%s", ((struct obd_ioctl_data*)buf)->ioc_bulk);
-        else
-                fprintf(stderr, "OBD_IOC_LLOG_CHECK failed: %s\n",
-                        strerror(errno));
-        return rc;
-}
-
-int jt_llog_remove(int argc, char **argv)
-{
-        struct obd_ioctl_data data;
-        int rc;
-
-        if (argc != 3 && argc != 2)
-                return CMD_HELP;
-
-        IOC_INIT(data);
-        data.ioc_inllen1 = strlen(argv[1]) + 1;
-        data.ioc_inlbuf1 = argv[1];
-        if (argc == 3){
-                data.ioc_inllen2 = strlen(argv[2]) + 1;
-                data.ioc_inlbuf2 = argv[2];
-        }
-        IOC_PACK(argv[0], data);
-
-        rc = l_ioctl(OBD_DEV_ID, OBD_IOC_LLOG_REMOVE, buf);
-        if (rc == 0) {
-                if (argc == 3)
-                        fprintf(stdout, "log %s are removed.\n", argv[2]);
-                else
-                        fprintf(stdout, "the log in catalog %s are removed. \n", argv[1]);
-        } else
-                fprintf(stderr, "OBD_IOC_LLOG_REMOVE failed: %s\n",
-                        strerror(errno));
-
-        return rc;
-}
-
-/* attach a regular file to virtual block device.
- * return vaule:
- *  -1: fatal error
- *  1: error, it always means the command run failed
- *  0: success
- */
-static int jt_blockdev_run_process(const char *file, char *argv[])
-{
-        pid_t pid;
-        int rc;
-
-        pid = vfork();
-        if (pid == 0) { /* child process */
-                /* don't print error messages */
-                close(1), close(2);
-                (void)execvp(file, argv);
-                exit(-1);
-        } else if (pid > 0) {
-                int status;
-
-                rc = waitpid(pid, &status, 0);
-                if (rc < 0 || !WIFEXITED(status))
-                        return -1;
-
-                return WEXITSTATUS(status);
-        }
-
-        return -1;
-}
-
-static int jt_blockdev_find_module(const char *module)
-{
-        FILE *fp;
-        int found = 0;
-        char modname[256];
-
-        fp = fopen("/proc/modules", "r");
-        if (fp == NULL)
-                return -1;
-
-        while (fscanf(fp, "%s %*s %*s %*s %*s %*s", modname) == 1) {
-                if (strcmp(module, modname) == 0) {
-                        found = 1;
-                        break;
-                }
-        }
-        fclose(fp);
-
-        return found;
-}
-
-static int jt_blockdev_probe_module(const char *module)
-{
-        char buf[1024];
-        char *argv[10];
-        int c, rc;
-
-        if (jt_blockdev_find_module(module) == 1)
-                return 0;
-
-        /* run modprobe first */
-        c = 0;
-        argv[c++] = "/sbin/modprobe";
-        argv[c++] = "-q";
-        argv[c++] = (char *)module;
-        argv[c++] = NULL;
-        rc = jt_blockdev_run_process("modprobe", argv);
-        if (rc != 1)
-                return rc;
-
-        /* cannot find the module in default directory ... */
-        sprintf(buf, "../llite/%s.ko", module);
-        c = 0;
-        argv[c++] = "/sbin/insmod";
-        argv[c++] = buf;
-        argv[c++] = NULL;
-        rc = jt_blockdev_run_process("insmod", argv);
-        return rc ? -1 : 0;
-}
-
-int jt_blockdev_attach(int argc, char **argv)
-{
-        int rc, fd;
-        struct stat st;
-        char *filename, *devname;
-        unsigned long dev;
-
-        if (argc != 3)
-                return CMD_HELP;
-
-        if (jt_blockdev_probe_module("llite_lloop") < 0) {
-                fprintf(stderr, "error: cannot find module llite_lloop.(k)o\n");
-                return ENOENT;
-        }
-
-        filename = argv[1];
-        devname = argv[2];
-
-        fd = open(filename, O_RDWR);
-        if (fd < 0) {
-                fprintf(stderr, "file %s can't be opened(%s)\n\n",
-                        filename, strerror(errno));
-                return CMD_HELP;
-        }
-
-        rc = ioctl(fd, LL_IOC_LLOOP_ATTACH, &dev);
-        if (rc < 0) {
-                rc = errno;
-                fprintf(stderr, "attach error(%s)\n", strerror(rc));
-                goto out;
-        }
-
-        rc = stat(devname, &st);
-        if (rc == 0 && (!S_ISBLK(st.st_mode) || st.st_rdev != dev)) {
-                rc = EEXIST;
-        } else if (rc < 0) {
-                if (errno == ENOENT &&
-                    !mknod(devname, S_IFBLK|S_IRUSR|S_IWUSR, dev))
-                        rc = 0;
-                else
-                        rc = errno;
-        }
-
-        if (rc) {
-                fprintf(stderr, "error: the file %s could be attached to block "
-                                "device %X but creating %s failed: %s\n"
-                                "now detaching the block device..",
-                        filename, (int)dev, devname, strerror(rc));
-
-                (void)ioctl(fd, LL_IOC_LLOOP_DETACH_BYDEV, dev);
-                fprintf(stderr, "%s\n", strerror(errno));
-        }
-out:
-        close(fd);
-        return -rc;
-}
-
-int jt_blockdev_detach(int argc, char **argv)
-{
-        char *filename;
-        int rc, fd;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        filename = argv[1];
-        fd = open(filename, O_RDONLY);
-        if (fd < 0) {
-                fprintf(stderr, "cannot open file %s error %s\n",
-                        filename, strerror(errno));
-                return CMD_HELP;
-        }
-
-        rc = ioctl(fd, LL_IOC_LLOOP_DETACH, 0);
-        if (rc < 0) {
-                rc = errno;
-                fprintf(stderr, "detach error(%s)\n", strerror(rc));
-        } else {
-                (void)unlink(filename);
-        }
-
-        close(fd);
-        return -rc;
-}
-
-int jt_blockdev_info(int argc, char **argv)
-{
-        char *filename;
-        int rc, fd;
-        __u64  ino;
-
-        if (argc != 2)
-                return CMD_HELP;
-
-        filename = argv[1];
-        fd = open(filename, O_RDONLY);
-        if (fd < 0) {
-                fprintf(stderr, "cannot open file %s error: %s\n",
-                        filename, strerror(errno));
-                return CMD_HELP;
-        }
-
-        rc = ioctl(fd, LL_IOC_LLOOP_INFO, &ino);
-        if (rc < 0) {
-                rc = errno;
-                fprintf(stderr, "error: %s\n", strerror(errno));
-                goto out;
-        }
-        fprintf(stdout, "lloop device info: ");
-        if (ino == 0ULL)
-                fprintf(stdout, "Not attached\n");
-        else
-                fprintf(stdout, "attached to inode %llu\n", ino);
-out:
-        close(fd);
-        return -rc;
-}
-
-static void signal_server(int sig)
-{
-        if (sig == SIGINT) {
-                do_disconnect("sigint", 1);
-                exit(1);
-        } else
-                fprintf(stderr, "%s: got signal %d\n", jt_cmdname("sigint"), sig);
-}
-
-int obd_initialize(int argc, char **argv)
-{
-        int i;
-
-        for (i = 0; i < MAX_STRIPES; i++)
-                lsm_buffer.lsm.lsm_oinfo[i] = lov_oinfos + i;
-
-        shmem_setup();
-        register_ioc_dev(OBD_DEV_ID, OBD_DEV_PATH,
-                         OBD_DEV_MAJOR, OBD_DEV_MINOR);
-
-        return 0;
-}
-
-void obd_finalize(int argc, char **argv)
-{
-        struct sigaction sigact;
-
-        sigact.sa_handler = signal_server;
-        sigfillset(&sigact.sa_mask);
-        sigact.sa_flags = SA_RESTART;
-        sigaction(SIGINT, &sigact, NULL);
-
-        shmem_stop();
-        do_disconnect(argv[0], 1);
-}
diff --git a/lustre/utils/obdbarrier.c b/lustre/utils/obdbarrier.c
deleted file mode 100644
index f2c6eb1f94c98bc22c3e18fa91fc828ff1373265..0000000000000000000000000000000000000000
--- a/lustre/utils/obdbarrier.c
+++ /dev/null
@@ -1,224 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Eric Barton <eeb@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-
-#include <liblustre.h>
-#include "obdiolib.h"
-
-int
-parse_kmg (__u64 *valp, char *str)
-{
-        __u64        val;
-        char            mod[32];
-
-        switch (sscanf (str, LPU64"%1[gGmMkK]", &val, mod))
-        {
-        default:
-                return (-1);
-
-        case 1:
-                *valp = val;
-                return (0);
-
-        case 2:
-                switch (*mod)
-                {
-                case 'g':
-                case 'G':
-                        *valp = val << 30;
-                        return (0);
-
-                case 'm':
-                case 'M':
-                        *valp = val << 20;
-                        return (0);
-
-                case 'k':
-                case 'K':
-                        *valp = val << 10;
-                        return (0);
-
-                default:
-                        *valp = val;
-                        return (0);
-                }
-        }
-}
-
-void
-usage (char *cmdname, int help)
-{
-        char *name = strrchr (cmdname, '/');
-
-        if (name == NULL)
-                name = cmdname;
-
-        fprintf (help ? stdout : stderr,
-                 "usage: %s -d device -s size -o offset [-i id][-n reps][-l] oid\n",
-                 name);
-}
-
-int
-exponential_modulus (int i, int base)
-{
-        int   top = base;
-        int   mod = 1;
-
-        for (;;) {
-                if (i < top)
-                        return (i%mod == 0);
-
-                mod = top;
-                top *= base;
-        }
-}
-
-int
-main (int argc, char **argv)
-{
-        __u64                 bid = (((__u64)gethostid()) << 32) | getpid ();
-        int                   set_bid = 0;
-        __u64                 oid;
-        int                   setup = 0;
-        int                   device = -1;
-        int                   npeers = 0;
-        int                   reps = 1;
-        char                  hostname[128];
-        struct obdio_conn    *conn;
-        struct obdio_barrier *b;
-        char                 *end;
-        __u64                 val;
-        int                   rc;
-        int                   c;
-
-        setvbuf (stdout, NULL, _IOLBF, 0);
-        memset (hostname, 0, sizeof (hostname));
-        gethostname (hostname, sizeof (hostname));
-        hostname[sizeof(hostname) - 1] = 0;
-
-        while ((c = getopt (argc, argv, "hsi:d:n:p:")) != -1)
-                switch (c) {
-                case 'h':
-                        usage (argv[0], 1);
-                        return (0);
-
-                case 'i':
-                        bid = strtoll (optarg, &end, 0);
-                        if (end == optarg || *end != 0) {
-                                fprintf (stderr, "Can't parse id %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        set_bid = 1;
-                        break;
-
-                case 's':
-                        setup = 1;
-                        break;
-
-                case 'd':
-                        device = strtol (optarg, &end, 0);
-                        if (end == optarg || *end != 0 || device < 0) {
-                                fprintf (stderr, "Can't parse device %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        break;
-
-                case 'n':
-                        if (parse_kmg (&val, optarg) != 0) {
-                                fprintf (stderr, "Can't parse reps %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        reps = (int)val;
-                        break;
-
-                case 'p':
-                        npeers = strtol (optarg, &end, 0);
-                        if (end == optarg || *end != 0 || npeers <= 0) {
-                                fprintf (stderr, "Can't parse npeers %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        break;
-
-                default:
-                        usage (argv[0], 0);
-                        return (1);
-        }
-
-        if ((!setup && !set_bid) ||
-            npeers <= 0 ||
-            device < 0 ||
-            optind == argc) {
-                fprintf (stderr, "%s not specified\n",
-                         (!setup && !set_bid) ? "id" :
-                         npeers <= 0 ? "npeers" :
-                         device < 0 ? "device" : "object id");
-                return (1);
-        }
-
-        oid = strtoull (argv[optind], &end, 0);
-        if (end == argv[optind] || *end != 0) {
-                fprintf (stderr, "Can't parse object id %s\n",
-                         argv[optind]);
-                return (1);
-        }
-
-        conn = obdio_connect (device);
-        if (conn == NULL)
-                return (1);
-
-        b = obdio_new_barrier (oid, bid, npeers);
-        if (b == NULL)
-                return (1);
-
-        rc = 0;
-        if (setup) {
-                rc = obdio_setup_barrier (conn, b);
-                if (rc == 0)
-                        printf ("Setup barrier: -d %d -i "LPX64" -p %d -n1 "LPX64"\n",
-                                device, bid, npeers, oid);
-        } else {
-                for (c = 0; c < reps; c++) {
-                        rc = obdio_barrier (conn, b);
-                        if (rc != 0)
-                                break;
-                        if (exponential_modulus (c, 10))
-                                printf ("%s: Barrier %d\n", hostname, c);
-                }
-        }
-
-        free(b);
-
-        obdio_disconnect(conn, 0);
-
-        return (rc == 0 ? 0 : 1);
-}
-
-
diff --git a/lustre/utils/obdctl.c b/lustre/utils/obdctl.c
deleted file mode 100644
index 26bedd1e9c746d28cc5ec8cf5c491c1aac38f6cd..0000000000000000000000000000000000000000
--- a/lustre/utils/obdctl.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Peter J. Braam <braam@clusterfs.com>
- *   Author: Phil Schwan <phil@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#include "obdctl.h"
-#include "parser.h"
-
-/* the functions that were in here are now in obd.c */
-
-static int jt_quit(int argc, char **argv)
-{
-        int rc = 0;
-        Parser_quit(argc, argv);
-
-        return rc;
-}
-
-command_t cmdlist[] = {
-        /* Metacommands */
-        {"--device", jt_opt_device, 0, "--device <devno> <command [args ...]>"},
-        {"--threads", jt_opt_threads, 0,
-         "--threads <threads> <devno> <command [args ...]>"},
-
-        /* Device configuration commands */
-        {"lov_setconfig", jt_obd_lov_setconfig, 0, "configure lov data on MDS "
-         "[usage: lovconfig lov-uuid stripecount, stripesize, pattern, UUID1, [UUID2, ...]"},
-        {"list", jt_obd_list, 0, "list the devices (no args)"},
-        {"newdev", jt_obd_newdev, 0, "set device to a new unused obd (no args)"},
-        {"device", jt_obd_device, 0, "set current device (args device_no name)"},
-        {"name2dev", jt_obd_name2dev, 0,
-         "set device by name [usage: name2dev devname]"},
-        {"attach", jt_obd_attach, 0, "name the type of device (args: type data"},
-        {"setup", jt_obd_setup, 0, "setup device (args: <blkdev> [data]"},
-        {"detach", jt_obd_detach, 0, "detach the current device (arg: )"},
-        {"cleanup", jt_obd_cleanup, 0, "cleanup the current device (arg: )"},
-
-        /* Session commands */
-        {"connect", jt_obd_connect, 0, "connect - get a connection to device"},
-        {"disconnect", jt_obd_disconnect, 0,
-         "disconnect - break connection to device"},
-
-        /* Session operations */
-        {"create", jt_obd_create, 0, "create <count> [mode [verbose]]"},
-        {"destroy", jt_obd_destroy, 0, "destroy <id> [count [verbose]]"},
-        {"getattr", jt_obd_getattr, 0, "getattr <id>"},
-        {"setattr", jt_obd_setattr, 0, "setattr <id> <mode>"},
-        {"newconn", jt_obd_newconn, 0, "newconn <olduuid> [newuuid]"},
-        {"test_getattr", jt_obd_test_getattr, 0, "test_getattr <count> [verbose [[t]objid]]"},
-        {"test_setattr", jt_obd_test_setattr, 0, "test_setattr <count> [verbose [[t]objid]]"},
-        {"test_brw", jt_obd_test_brw, 0, "test_brw [t]<count> [write [verbose [pages [[t]objid]]]]"},
-        {"dump_ldlm", jt_obd_dump_ldlm, 0, "dump all lock manager state (no args)"},
-
-        /* User interface commands */
-        {"help", Parser_help, 0, "help"},
-        {"exit", jt_quit, 0, "quit"},
-        {"quit", jt_quit, 0, "quit"},
-        {0, 0, 0, NULL}
-};
-
-
-int main(int argc, char **argv)
-{
-        int rc;
-
-        setlinebuf(stdout);
-
-        if (obd_initialize(argc, argv) < 0)
-                exit(1);
-
-        Parser_init("obdctl > ", cmdlist);
-
-        if (argc > 1) {
-                rc = Parser_execarg(argc - 1, argv + 1, cmdlist);
-        } else {
-                rc = Parser_commands();
-        }
-
-        obd_finalize(argc, argv);
-        return rc;
-}
diff --git a/lustre/utils/obdctl.h b/lustre/utils/obdctl.h
deleted file mode 100644
index 3f2bf77420b93a95a299b5363172ee1fbfd9bc8e..0000000000000000000000000000000000000000
--- a/lustre/utils/obdctl.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- */
-#ifndef _OBDCTL_H_
-#define _OBDCTL_H_
-
-#ifndef __KERNEL__
-#include <liblustre.h>
-#endif
-
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_dlm.h>
-#include <lustre_cfg.h>
-
-/* obd.c */
-int do_disconnect(char *func, int verbose);
-int obd_initialize(int argc, char **argv);
-void obd_finalize(int argc, char **argv);
-
-
-int jt_opt_device(int argc, char **argv);
-int jt_opt_threads(int argc, char **argv);
-int jt_opt_net(int argc, char **argv);
-
-int jt_obd_get_device();
-int jt_obd_device(int argc, char **argv);
-int jt_obd_detach(int argc, char **argv);
-int jt_obd_cleanup(int argc, char **argv);
-int jt_obd_no_transno(int argc, char **argv);
-int jt_obd_set_readonly(int argc, char **argv);
-int jt_obd_abort_recovery(int argc, char **argv);
-int jt_obd_list(int argc, char **argv);
-int jt_obd_create(int argc, char **argv);
-int jt_obd_setattr(int argc, char **argv);
-int jt_obd_test_setattr(int argc, char **argv);
-int jt_obd_destroy(int argc, char **argv);
-int jt_obd_getattr(int argc, char **argv);
-int jt_obd_test_getattr(int argc, char **argv);
-int jt_obd_test_brw(int argc, char **argv);
-int jt_obd_lov_getconfig(int argc, char **argv);
-int jt_obd_test_ldlm(int argc, char **argv);
-int jt_obd_ldlm_regress_start(int argc, char **argv);
-int jt_obd_ldlm_regress_stop(int argc, char **argv);
-int jt_obd_activate(int argc, char **argv);
-int jt_obd_deactivate(int argc, char **argv);
-int jt_obd_recover(int argc, char **argv);
-int jt_obd_mdc_lookup(int argc, char **argv);
-int jt_get_version(int argc, char **argv);
-int jt_cfg_dump_log(int argc, char **argv);
-
-int jt_llog_catlist(int argc, char **argv);
-int jt_llog_info(int argc, char **argv);
-int jt_llog_print(int argc, char **argv);
-int jt_llog_cancel(int argc, char **argv);
-int jt_llog_remove(int argc, char **argv);
-int jt_llog_check(int argc, char **argv);
-
-int lcfg_ioctl(char * func, int dev_id, struct lustre_cfg *lcfg);
-int lcfg_mgs_ioctl(char *func, int dev_id, struct lustre_cfg *lcfg);
-int parse_devname(char *func, char *name);
-char *jt_cmdname(char *func);
-
-
-/* lustre_cfg.c */
-int lcfg_set_devname(char *name);
-char *lcfg_get_devname(void);
-int jt_lcfg_device(int argc, char **argv);
-int jt_lcfg_newdev(int argc, char **argv);
-int jt_lcfg_attach(int argc, char **argv);
-int jt_lcfg_setup(int argc, char **argv);
-int jt_lcfg_add_uuid(int argc, char **argv);
-int jt_lcfg_del_uuid(int argc, char **argv);
-int jt_lcfg_del_mount_option(int argc, char **argv);
-int jt_lcfg_set_timeout(int argc, char **argv);
-int jt_lcfg_add_conn(int argc, char **argv);
-int jt_lcfg_del_conn(int argc, char **argv);
-int jt_lcfg_param(int argc, char **argv);
-int jt_lcfg_mgsparam(int argc, char **argv);
-int jt_lcfg_getparam(int argc, char **argv);
-int jt_lcfg_setparam(int argc, char **argv);
-
-int obd_add_uuid(char *uuid, lnet_nid_t nid);
-
-int jt_blockdev_attach(int argc, char **argv);
-int jt_blockdev_detach(int argc, char **argv);
-int jt_blockdev_info(int argc, char **argv);
-
-#endif
diff --git a/lustre/utils/obdio.c b/lustre/utils/obdio.c
deleted file mode 100644
index a8a6a73846add21c21e24c906ddcdaf46a920b44..0000000000000000000000000000000000000000
--- a/lustre/utils/obdio.c
+++ /dev/null
@@ -1,297 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *   Author: Eric Barton <eeb@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-
-#include <liblustre.h>
-#include "obdiolib.h"
-
-int
-obdio_test_fixed_extent (struct obdio_conn *conn,
-                         __u32 myhid, __u32 mypid,
-                         int reps, int locked, __u64 oid,
-                         __u64 offset, __u32 size)
-{
-        struct lustre_handle lh;
-        void                *space;
-        void                *buffer;
-        __u32               *ibuf;
-        int                  i;
-        int                  j;
-        int                  rc = 0;
-
-        space = obdio_alloc_aligned_buffer (&buffer, size);
-        if (space == NULL) {
-                fprintf (stderr, "Can't allocate buffer size %d\n", size);
-                return (-1);
-        }
-
-        for (i = 0; i < reps; i++) {
-                ibuf = (__u32 *) buffer;
-                for (j = 0; j < size / (4 * sizeof (*ibuf)); j++) {
-                        ibuf[0] = myhid;
-                        ibuf[1] = mypid;
-                        ibuf[2] = i;
-                        ibuf[3] = j;
-                        ibuf += 4;
-                }
-
-                if (locked) {
-                        rc = obdio_enqueue(conn, oid, LCK_PW, offset, size,&lh);
-                        if (rc != 0) {
-                                fprintf(stderr, "Error on enqueue "LPX64" @ "
-                                        LPU64" for %u: %s\n",
-                                        oid, offset, size, strerror (errno));
-                                goto out;
-                        }
-                }
-
-                rc = obdio_pwrite (conn, oid, buffer, size, offset);
-                if (rc != 0) {
-                        fprintf(stderr, "Error writing "LPX64" @ "LPU64
-                                " for %u: %s\n",
-                                oid, offset, size, strerror (errno));
-                        if (locked)
-                                obdio_cancel (conn, &lh);
-                        rc = -1;
-                        goto out;
-                }
-
-                memset (buffer, 0xbb, size);
-
-                rc = obdio_pread (conn, oid, buffer, size, offset);
-                if (rc != 0) {
-                        fprintf(stderr, "Error reading "LPX64" @ "LPU64
-                                " for %u: %s\n",
-                                oid, offset, size, strerror (errno));
-                        if (locked)
-                                obdio_cancel (conn, &lh);
-                        rc = -1;
-                        goto out;
-                }
-
-                if (locked) {
-                        rc = obdio_cancel (conn, &lh);
-                        if (rc != 0) {
-                                fprintf(stderr, "Error on cancel "LPX64" @ "
-                                        LPU64" for %u: %s\n",
-                                        oid, offset, size, strerror (errno));
-                                rc = -1;
-                                goto out;
-                        }
-                }
-
-                ibuf = (__u32 *) buffer;
-                for (j = 0; j < size / (4 * sizeof (*ibuf)); j++) {
-                        if (ibuf[0] != myhid ||
-                            ibuf[1] != mypid ||
-                            ibuf[2] != i ||
-                            ibuf[3] != j) {
-                                fprintf(stderr, "Error checking "LPX64" @ "
-                                        LPU64" for %u, chunk %d\n",
-                                        oid, offset, size, j);
-                                fprintf(stderr, "Expected [%x,%x,%x,%x], "
-                                        "got [%x,%x,%x,%x]\n",
-                                        myhid, mypid, i, j,
-                                        ibuf[0], ibuf[1], ibuf[2], ibuf[3]);
-                                rc = -1;
-                                goto out;
-                        }
-                        ibuf += 4;
-                }
-        }
- out:
-        free (space);
-        return (rc);
-}
-
-int
-parse_kmg (__u64 *valp, char *str)
-{
-        __u64           val;
-        char            mod[32];
-
-        switch (sscanf (str, LPU64"%1[gGmMkK]", &val, mod))
-        {
-        default:
-                return (-1);
-
-        case 1:
-                *valp = val;
-                return (0);
-
-        case 2:
-                switch (*mod)
-                {
-                case 'g':
-                case 'G':
-                        *valp = val << 30;
-                        return (0);
-
-                case 'm':
-                case 'M':
-                        *valp = val << 20;
-                        return (0);
-
-                case 'k':
-                case 'K':
-                        *valp = val << 10;
-                        return (0);
-
-                default:
-                        *valp = val;
-                        return (0);
-                }
-        }
-}
-
-void
-usage (char *cmdname, int help)
-{
-        char *name = strrchr (cmdname, '/');
-
-        if (name == NULL)
-                name = cmdname;
-
-        fprintf (help ? stdout : stderr,
-                 "usage: %s -d device -s size -o offset [-i id][-n reps][-l] oid\n",
-                 name);
-}
-
-int
-main (int argc, char **argv)
-{
-        __u32             mypid = getpid ();
-        __u32             myhid = gethostid ();
-        __u64             oid;
-        __u64             base_offset = 0;
-        __u32             size = 0;
-        int                set_size = 0;
-        int                device = -1;
-        int                reps = 1;
-        int                locked = 0;
-        char              *end;
-        struct obdio_conn *conn;
-        __u64              val;
-        int                v1;
-        int                v2;
-        int                rc;
-        int                c;
-
-        while ((c = getopt (argc, argv, "hi:s:o:d:n:l")) != -1)
-                switch (c) {
-                case 'h':
-                        usage (argv[0], 1);
-                        return (0);
-
-                case 'i':
-                        switch (sscanf (optarg, "%i.%i", &v1, &v2)) {
-                        case 1:
-                                mypid = v1;
-                                break;
-                        case 2:
-                                myhid = v1;
-                                mypid = v2;
-                                break;
-                        default:
-                                fprintf (stderr, "Can't parse id %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        break;
-
-                case 's':
-                        if (parse_kmg (&val, optarg) != 0) {
-                                fprintf (stderr, "Can't parse size %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        size = (__u32)val;
-                        set_size++;
-                        break;
-
-                case 'o':
-                        if (parse_kmg (&val, optarg) != 0) {
-                                fprintf (stderr, "Can't parse offset %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        base_offset = val;
-                        break;
-
-                case 'd':
-                        device = strtol (optarg, &end, 0);
-                        if (end == optarg || *end != 0 || device < 0) {
-                                fprintf (stderr, "Can't parse device %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        break;
-                case 'n':
-                        if (parse_kmg (&val, optarg) != 0) {
-                                fprintf (stderr, "Can't parse reps %s\n",
-                                         optarg);
-                                return (1);
-                        }
-                        reps = (int)val;
-                        break;
-                case 'l':
-                        locked = 1;
-                        break;
-                default:
-                        usage (argv[0], 0);
-                        return (1);
-        }
-
-        if (!set_size ||
-            device < 0 ||
-            optind == argc) {
-                fprintf (stderr, "No %s specified\n",
-                         !set_size ? "size" :
-                         device < 0 ? "device" : "object id");
-                return (1);
-        }
-
-        oid = strtoull (argv[optind], &end, 0);
-        if (end == argv[optind] || *end != 0) {
-                fprintf (stderr, "Can't parse object id %s\n",
-                         argv[optind]);
-                return (1);
-        }
-
-        conn = obdio_connect (device);
-        if (conn == NULL)
-                return (1);
-
-        rc = obdio_test_fixed_extent(conn, myhid, mypid, reps, locked,
-                                     oid, base_offset, size);
-
-        obdio_disconnect(conn, 0);
-
-        return (rc == 0 ? 0 : 1);
-}
-
-
diff --git a/lustre/utils/obdiolib.c b/lustre/utils/obdiolib.c
deleted file mode 100644
index 9e046e27a9c5600eb624e318740ba25783716786..0000000000000000000000000000000000000000
--- a/lustre/utils/obdiolib.c
+++ /dev/null
@@ -1,386 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2003 Cluster File Systems, Inc.
- *   Author: Eric Barton <eeb@clusterfs.com>
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <string.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <liblustre.h>
-#include "obdiolib.h"
-
-void
-obdio_iocinit (struct obdio_conn *conn)
-{
-        memset (&conn->oc_data, 0, sizeof (conn->oc_data));
-        conn->oc_data.ioc_version = OBD_IOCTL_VERSION;
-        conn->oc_data.ioc_dev = conn->oc_device;
-        conn->oc_data.ioc_len = sizeof (conn->oc_data);
-}
-
-int
-obdio_ioctl (struct obdio_conn *conn, int cmd)
-{
-        char *buf = conn->oc_buffer;
-        int   rc;
-        int   rc2;
-
-        rc = obd_ioctl_pack (&conn->oc_data, &buf, sizeof (conn->oc_buffer));
-        if (rc != 0) {
-                fprintf(stderr, "%s: obd_ioctl_pack: %d (%s)\n",
-                        __FUNCTION__, rc, strerror(errno));
-                abort();
-        }
-
-        rc = ioctl (conn->oc_fd, cmd, buf);
-        if (rc != 0)
-                return (rc);
-
-        rc2 = obd_ioctl_unpack (&conn->oc_data, buf, sizeof (conn->oc_buffer));
-        if (rc2 != 0) {
-                fprintf(stderr, "%s: obd_ioctl_unpack: %d (%s)\n",
-                        __FUNCTION__, rc2, strerror(errno));
-                abort ();
-        }
-
-        return (rc);
-}
-
-struct obdio_conn *
-obdio_connect (int device)
-{
-        struct obdio_conn  *conn;
-
-        conn = malloc (sizeof (*conn));
-        if (conn == NULL) {
-                fprintf (stderr, "%s: no memory\n", __FUNCTION__);
-                return (NULL);
-        }
-        memset (conn, 0, sizeof (*conn));
-
-        conn->oc_fd = open ("/dev/obd", O_RDWR);
-        if (conn->oc_fd < 0) {
-                fprintf(stderr, "%s: Can't open /dev/obd: %s\n",
-                        __FUNCTION__, strerror(errno));
-                goto failed;
-        }
-
-        conn->oc_device = device;
-        return (conn);
-
- failed:
-        free (conn);
-        return (NULL);
-}
-
-void
-obdio_disconnect (struct obdio_conn *conn, int flags)
-{
-        close (conn->oc_fd);
-        /* obdclass will automatically close on last ref */
-        free (conn);
-}
-
-int
-obdio_pread (struct obdio_conn *conn, __u64 oid,
-             void *buffer, __u32 count, __u64 offset)
-{
-        obdio_iocinit (conn);
-
-        conn->oc_data.ioc_obdo1.o_id = oid;
-        conn->oc_data.ioc_obdo1.o_mode = S_IFREG;
-        conn->oc_data.ioc_obdo1.o_valid =
-                OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE;
-
-        conn->oc_data.ioc_pbuf2 = buffer;
-        conn->oc_data.ioc_plen2 = count;
-        conn->oc_data.ioc_count = count;
-        conn->oc_data.ioc_offset = offset;
-
-        return (obdio_ioctl (conn, OBD_IOC_BRW_READ));
-}
-
-int
-obdio_pwrite (struct obdio_conn *conn, __u64 oid,
-              void *buffer, __u32 count, __u64 offset)
-{
-        obdio_iocinit (conn);
-
-        conn->oc_data.ioc_obdo1.o_id = oid;
-        conn->oc_data.ioc_obdo1.o_mode = S_IFREG;
-        conn->oc_data.ioc_obdo1.o_valid =
-                OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE;
-
-        conn->oc_data.ioc_pbuf2 = buffer;
-        conn->oc_data.ioc_plen2 = count;
-        conn->oc_data.ioc_count = count;
-        conn->oc_data.ioc_offset = offset;
-
-        return (obdio_ioctl (conn, OBD_IOC_BRW_WRITE));
-}
-
-int
-obdio_enqueue (struct obdio_conn *conn, __u64 oid,
-               int mode, __u64 offset, __u32 count,
-               struct lustre_handle *lh)
-{
-        int   rc;
-
-        obdio_iocinit (conn);
-
-        conn->oc_data.ioc_obdo1.o_id = oid;
-        conn->oc_data.ioc_obdo1.o_mode = S_IFREG;
-        conn->oc_data.ioc_obdo1.o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLMODE;
-
-        conn->oc_data.ioc_conn1 = mode;
-        conn->oc_data.ioc_count = count;
-        conn->oc_data.ioc_offset = offset;
-
-        rc = obdio_ioctl (conn, ECHO_IOC_ENQUEUE);
-
-        if (rc == 0)
-                memcpy (lh, obdo_handle (&conn->oc_data.ioc_obdo1), sizeof (*lh));
-
-        return (rc);
-}
-
-int
-obdio_cancel (struct obdio_conn *conn, struct lustre_handle *lh)
-{
-        obdio_iocinit (conn);
-
-        memcpy (obdo_handle (&conn->oc_data.ioc_obdo1), lh, sizeof (*lh));
-        conn->oc_data.ioc_obdo1.o_valid = OBD_MD_FLHANDLE;
-
-        return (obdio_ioctl (conn, ECHO_IOC_CANCEL));
-}
-
-void *
-obdio_alloc_aligned_buffer (void **spacep, int size)
-{
-        int   pagemask = getpagesize() - 1;
-        void *space = malloc(size + pagemask);
-
-        if (space == NULL)
-                return (NULL);
-
-        *spacep = (void *)(((unsigned long)space + pagemask) & ~pagemask);
-        return space;
-}
-
-struct obdio_barrier *
-obdio_new_barrier (__u64 oid, __u64 id, int npeers)
-{
-        struct obdio_barrier *b;
-
-        b = malloc(sizeof(*b));
-        if (b == NULL) {
-                fprintf(stderr, "%s "LPX64": Can't allocate\n",
-                        __FUNCTION__, oid);
-                return(NULL);
-        }
-
-        b->ob_id = id;
-        b->ob_oid = oid;
-        b->ob_npeers = npeers;
-        b->ob_ordinal = 0;
-        b->ob_count = 0;
-        return (b);
-}
-
-int
-obdio_setup_barrier (struct obdio_conn *conn, struct obdio_barrier *b)
-{
-        struct lustre_handle    lh;
-        int                     rc;
-        int                     rc2;
-        void                   *space, *fileptr;
-        struct obdio_barrier   *fileb;
-
-        if (b->ob_ordinal != 0 ||
-            b->ob_count != 0) {
-                fprintf(stderr, "%s: invalid parameter\n", __FUNCTION__);
-                abort ();
-        }
-
-        space = obdio_alloc_aligned_buffer(&fileptr, getpagesize());
-        if (space == NULL) {
-                fprintf(stderr, "%s "LPX64": Can't allocate page buffer\n",
-                        __FUNCTION__, b->ob_oid);
-                return (-1);
-        }
-
-        fileb = fileptr;
-        memset(fileb, 0, getpagesize());
-        *fileb = *b;
-
-        rc = obdio_enqueue(conn, b->ob_oid, LCK_PW, 0, getpagesize(), &lh);
-        if (rc != 0) {
-                fprintf(stderr, "%s "LPX64": Error on enqueue: %s\n",
-                        __FUNCTION__, b->ob_oid, strerror(errno));
-                goto out;
-        }
-
-        rc = obdio_pwrite(conn, b->ob_oid, fileb, getpagesize(), 0);
-        if (rc != 0)
-                fprintf(stderr, "%s "LPX64": Error on write: %s\n",
-                        __FUNCTION__, b->ob_oid, strerror(errno));
-
-        rc2 = obdio_cancel (conn, &lh);
-        if (rc == 0 && rc2 != 0) {
-                fprintf(stderr, "%s "LPX64": Error on cancel: %s\n",
-                        __FUNCTION__, b->ob_oid, strerror(errno));
-                rc = rc2;
-        }
- out:
-        free (space);
-        return (rc);
-}
-
-int
-obdio_barrier (struct obdio_conn *conn, struct obdio_barrier *b)
-{
-        struct lustre_handle   lh;
-        int                    rc;
-        int                    rc2;
-        void                  *space, *fileptr;
-        struct obdio_barrier  *fileb;
-        char                  *mode;
-
-        space = obdio_alloc_aligned_buffer(&fileptr, getpagesize());
-        if (space == NULL) {
-                fprintf(stderr, "%s "LPX64": Can't allocate page buffer\n",
-                        __FUNCTION__, b->ob_oid);
-                return (-1);
-        }
-
-        rc = obdio_enqueue(conn, b->ob_oid, LCK_PW, 0, getpagesize(), &lh);
-        if (rc != 0) {
-                fprintf(stderr, "%s "LPX64": Error on PW enqueue: %s\n",
-                        __FUNCTION__, b->ob_oid, strerror(errno));
-                goto out_1;
-        }
-
-        fileb = fileptr;
-        memset(fileb, 0xeb, getpagesize());
-        rc = obdio_pread(conn, b->ob_oid, fileb, getpagesize(), 0);
-        if (rc != 0) {
-                fprintf(stderr, "%s "LPX64": Error on initial read: %s\n",
-                        __FUNCTION__, b->ob_oid, strerror(errno));
-                goto out_2;
-        }
-
-        if (fileb->ob_id != b->ob_id ||
-            fileb->ob_oid != b->ob_oid ||
-            fileb->ob_npeers != b->ob_npeers ||
-            fileb->ob_count >= b->ob_npeers ||
-            fileb->ob_ordinal != b->ob_ordinal) {
-                fprintf(stderr, "%s "LPX64": corrupt on initial read\n",
-                        __FUNCTION__, b->ob_id);
-                fprintf(stderr,
-                        "  got ["LPX64","LPX64","LPX64","LPX64","LPX64"]\n",
-                        fileb->ob_id, fileb->ob_oid, fileb->ob_npeers,
-                        fileb->ob_ordinal, fileb->ob_count);
-                fprintf(stderr,
-                       "  expected ["LPX64","LPX64","LPX64","LPX64","LPX64"]\n",
-                        b->ob_id, b->ob_oid, b->ob_npeers,
-                        b->ob_ordinal, b->ob_count);
-                rc = -1;
-                goto out_2;
-        }
-
-        fileb->ob_count++;
-        if (fileb->ob_count == fileb->ob_npeers) { /* I'm the last joiner */
-                fileb->ob_count = 0;       /* join count for next barrier */
-                fileb->ob_ordinal++;                 /* signal all joined */
-        }
-
-        rc = obdio_pwrite(conn, b->ob_oid, fileb, getpagesize(), 0);
-        if (rc != 0) {
-                fprintf (stderr, "%s "LPX64": Error on initial write: %s\n",
-                         __FUNCTION__, b->ob_oid, strerror(errno));
-                goto out_2;
-        }
-
-        mode = "PW";
-        b->ob_ordinal++;           /* now I wait... */
-        while (fileb->ob_ordinal != b->ob_ordinal) {
-                rc = obdio_cancel (conn, &lh);
-                if (rc != 0) {
-                        fprintf(stderr, "%s "LPX64": Error on %s cancel: %s\n",
-                                __FUNCTION__, b->ob_oid, mode, strerror(errno));
-                        goto out_1;
-                }
-
-                mode = "PR";
-                rc = obdio_enqueue(conn, b->ob_oid, LCK_PR,0,getpagesize(),&lh);
-                if (rc != 0) {
-                        fprintf(stderr, "%s "LPX64": Error on PR enqueue: %s\n",
-                                __FUNCTION__, b->ob_oid, strerror(errno));
-                        goto out_1;
-                }
-
-                memset (fileb, 0xeb, getpagesize());
-                rc = obdio_pread(conn, b->ob_oid, fileb, getpagesize(), 0);
-                if (rc != 0) {
-                        fprintf(stderr, "%s "LPX64": Error on read: %s\n",
-                                __FUNCTION__, b->ob_oid, strerror(errno));
-                        goto out_2;
-                }
-
-                if (fileb->ob_id != b->ob_id ||
-                    fileb->ob_oid != b->ob_oid ||
-                    fileb->ob_npeers != b->ob_npeers ||
-                    fileb->ob_count >= b->ob_npeers ||
-                    (fileb->ob_ordinal != b->ob_ordinal - 1 &&
-                     fileb->ob_ordinal != b->ob_ordinal)) {
-                        fprintf(stderr, "%s "LPX64": corrupt\n",
-                                __FUNCTION__, b->ob_id);
-                        fprintf(stderr, "  got ["LPX64","LPX64","LPX64","
-                                LPX64","LPX64"]\n",
-                                fileb->ob_id, fileb->ob_oid, fileb->ob_npeers,
-                                fileb->ob_ordinal, fileb->ob_count);
-                        fprintf(stderr, "  expected ["LPX64","LPX64","LPX64
-                                ","LPX64","LPX64"]\n",
-                                b->ob_id, b->ob_oid, b->ob_npeers,
-                                b->ob_ordinal, b->ob_count);
-                        rc = -1;
-                        goto out_2;
-                }
-        }
-
- out_2:
-        rc2 = obdio_cancel (conn, &lh);
-        if (rc == 0 && rc2 != 0) {
-                fprintf(stderr, "%s "LPX64": Error on cancel: %s\n",
-                        __FUNCTION__, b->ob_oid, strerror(errno));
-                rc = rc2;
-        }
- out_1:
-        free (space);
-        return (rc);
-}
diff --git a/lustre/utils/obdiolib.h b/lustre/utils/obdiolib.h
deleted file mode 100644
index e9e0642d0b1776f013130652afb0794703edfa14..0000000000000000000000000000000000000000
--- a/lustre/utils/obdiolib.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *   This file is part of Lustre, http://www.lustre.org
- */
-#ifndef _OBDIOLIB_H_
-#define _OBDIOLIB_H_
-
-#include <unistd.h>
-
-#include <sys/types.h>
-#include <sys/stat.h>
-
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <obd_class.h>
-
-struct obdio_conn {
-        int                    oc_fd;
-        __u32                  oc_device;
-        struct obd_ioctl_data  oc_data;
-        char                   oc_buffer[8192];
-};
-
-struct obdio_barrier {
-        __u64                  ob_id;
-        __u64                  ob_oid;
-        __u64                  ob_npeers;
-        __u64                  ob_ordinal;
-        __u64                  ob_count;
-};
-
-extern struct obdio_conn *obdio_connect(int device);
-extern void obdio_disconnect(struct obdio_conn *conn, int flags);
-extern int obdio_open(struct obdio_conn *conn, __u64 oid,
-                      struct lustre_handle *fh);
-extern int obdio_close(struct obdio_conn *conn, __u64 oid,
-                       struct lustre_handle *fh);
-extern int obdio_pread(struct obdio_conn *conn, __u64 oid,
-                       void *buffer, __u32 count, __u64 offset);
-extern int obdio_pwrite(struct obdio_conn *conn, __u64 oid,
-                        void *buffer, __u32 count, __u64 offset);
-extern int obdio_enqueue(struct obdio_conn *conn, __u64 oid,
-                         int mode, __u64 offset, __u32 count,
-                         struct lustre_handle *lh);
-extern int obdio_cancel(struct obdio_conn *conn, struct lustre_handle *lh);
-extern void *obdio_alloc_aligned_buffer(void **spacep, int size);
-extern struct obdio_barrier *obdio_new_barrier(__u64 oid, __u64 id,
-                                               int npeers);
-extern int obdio_setup_barrier(struct obdio_conn *conn,struct obdio_barrier *b);
-extern int obdio_barrier(struct obdio_conn *conn, struct obdio_barrier *b);
-
-#endif
diff --git a/lustre/utils/parser.c b/lustre/utils/parser.c
deleted file mode 100644
index 239c9b99e845e707b4fe0fb378b0c85667d82416..0000000000000000000000000000000000000000
--- a/lustre/utils/parser.c
+++ /dev/null
@@ -1,772 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- * Copyright (C) 2001 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.sf.net/projects/lustre/
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-#include <stdio.h>
-#include <stdlib.h>
-#include <ctype.h>
-#include <string.h>
-#include <stddef.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <assert.h>
-
-#include "platform.h"
-#include "parser.h"
-
-static command_t * top_level;           /* Top level of commands, initialized by
-                                    * InitParser                              */
-static char * parser_prompt = NULL;/* Parser prompt, set by InitParser      */
-static int done;                   /* Set to 1 if user types exit or quit   */
-static int ignore_errors;       /* Normally, the parser will quit when
-                                   an error occurs in non-interacive
-                                   mode. Setting this to non-zero will
-                                   force it to keep buggering on. */
-
-
-/* static functions */
-static char *skipwhitespace(char *s);
-static char *skiptowhitespace(char *s);
-static command_t *find_cmd(char *name, command_t cmds[], char **next);
-static int process(char *s, char **next, command_t *lookup, command_t **result,
-                   char **prev);
-static void print_commands(char *str, command_t *table);
-
-static char * skipwhitespace(char * s)
-{
-        char * t;
-        int    len;
-
-        len = (int)strlen(s);
-        for (t = s; t <= s + len && isspace(*t); t++);
-        return(t);
-}
-
-
-static char * skiptowhitespace(char * s)
-{
-        char * t;
-
-        for (t = s; *t && !isspace(*t); t++);
-        return(t);
-}
-
-static int line2args(char *line, char **argv, int maxargs)
-{
-        char *arg;
-        int i = 0;
-
-        arg = strtok(line, " \t");
-        if ( arg ) {
-                argv[i] = arg;
-                i++;
-        } else
-                return 0;
-
-        while( (arg = strtok(NULL, " \t")) && (i <= maxargs)) {
-                argv[i] = arg;
-                i++;
-        }
-        return i;
-}
-
-/* find a command -- return it if unique otherwise print alternatives */
-static command_t *Parser_findargcmd(char *name, command_t cmds[])
-{
-        command_t *cmd;
-
-        for (cmd = cmds; cmd->pc_name; cmd++) {
-                if (strcmp(name, cmd->pc_name) == 0)
-                        return cmd;
-        }
-        return NULL;
-}
-
-void Parser_ignore_errors(int ignore)
-{
-        ignore_errors = ignore;
-}
-
-int Parser_execarg(int argc, char **argv, command_t cmds[])
-{
-        command_t *cmd;
-
-        cmd = Parser_findargcmd(argv[0], cmds);
-        if ( cmd ) {
-                int rc = (cmd->pc_func)(argc, argv);
-                if (rc == CMD_HELP)
-                        fprintf(stderr, "%s\n", cmd->pc_help);
-                return rc;
-        } else {
-		printf("Try interactive use without arguments or use one of:\n");
-                for (cmd = cmds; cmd->pc_name; cmd++)
-                        printf("\"%s\"\n", cmd->pc_name);
-                printf("as argument.\n");
-        }
-        return -1;
-}
-
-/* returns the command_t * (NULL if not found) corresponding to a
-   _partial_ match with the first token in name.  It sets *next to
-   point to the following token. Does not modify *name. */
-static command_t * find_cmd(char * name, command_t cmds[], char ** next)
-{
-        int    i, len;
-
-        if (!cmds || !name )
-                return NULL;
-
-        /* This sets name to point to the first non-white space character,
-           and next to the first whitespace after name, len to the length: do
-           this with strtok*/
-        name = skipwhitespace(name);
-        *next = skiptowhitespace(name);
-        len = *next - name;
-        if (len == 0)
-                return NULL;
-
-        for (i = 0; cmds[i].pc_name; i++) {
-                if (strncasecmp(name, cmds[i].pc_name, len) == 0) {
-                        *next = skipwhitespace(*next);
-                        return(&cmds[i]);
-                }
-        }
-        return NULL;
-}
-
-/* Recursively process a command line string s and find the command
-   corresponding to it. This can be ambiguous, full, incomplete,
-   non-existent. */
-static int process(char *s, char ** next, command_t *lookup,
-                   command_t **result, char **prev)
-{
-        *result = find_cmd(s, lookup, next);
-        *prev = s;
-
-        /* non existent */
-        if (!*result)
-                return CMD_NONE;
-
-        /* found entry: is it ambigous, i.e. not exact command name and
-           more than one command in the list matches.  Note that find_cmd
-           points to the first ambiguous entry */
-        if (strncasecmp(s, (*result)->pc_name, strlen((*result)->pc_name))) {
-                char *another_next;
-                command_t *another_result = find_cmd(s, (*result) + 1,
-                                                     &another_next);
-                int found_another = 0;
-
-                while (another_result) {
-                        if (strncasecmp(s, another_result->pc_name,
-                                        strlen(another_result->pc_name)) == 0){
-                                *result = another_result;
-                                *next = another_next;
-                                goto got_it;
-                        }
-                        another_result = find_cmd(s, another_result + 1,
-                                                  &another_next);
-                        found_another = 1;
-                }
-                if (found_another)
-                        return CMD_AMBIG;
-        }
-
-got_it:
-        /* found a unique command: component or full? */
-        if ( (*result)->pc_func ) {
-                return CMD_COMPLETE;
-        } else {
-                if ( *next == '\0' ) {
-                        return CMD_INCOMPLETE;
-                } else {
-                        return process(*next, next, (*result)->pc_sub_cmd,
-                                       result, prev);
-                }
-        }
-}
-
-#ifdef HAVE_LIBREADLINE
-static command_t * match_tbl;   /* Command completion against this table */
-static char * command_generator(const char * text, int state)
-{
-        static int index,
-                len;
-        char       *name;
-
-        /* Do we have a match table? */
-        if (!match_tbl)
-                return NULL;
-
-        /* If this is the first time called on this word, state is 0 */
-        if (!state) {
-                index = 0;
-                len = (int)strlen(text);
-        }
-
-        /* Return next name in the command list that paritally matches test */
-        while ( (name = (match_tbl + index)->pc_name) ) {
-                index++;
-
-                if (strncasecmp(name, text, len) == 0) {
-                        return(strdup(name));
-                }
-        }
-
-        /* No more matches */
-        return NULL;
-}
-
-/* probably called by readline */
-static char **command_completion(char * text, int start, int end)
-{
-        command_t   * table;
-        char        * pos;
-
-        match_tbl = top_level;
-        
-        for (table = find_cmd(rl_line_buffer, match_tbl, &pos);
-             table; table = find_cmd(pos, match_tbl, &pos)) 
-        {
-
-                if (*(pos - 1) == ' ') match_tbl = table->pc_sub_cmd;
-        }
-
-        return completion_matches(text, command_generator);
-}
-#endif
-
-/* take a string and execute the function or print help */
-int execute_line(char * line)
-{
-        command_t         *cmd, *ambig;
-        char *prev;
-        char *next, *tmp;
-        char *argv[MAXARGS];
-        int         i;
-        int rc = 0;
-
-        switch (process(line, &next, top_level, &cmd, &prev)) {
-        case CMD_AMBIG:
-                fprintf(stderr, "Ambiguous command \'%s\'\nOptions: ", line);
-                while( (ambig = find_cmd(prev, cmd, &tmp)) ) {
-                        fprintf(stderr, "%s ", ambig->pc_name);
-                        cmd = ambig + 1;
-                }
-                fprintf(stderr, "\n");
-                break;
-        case CMD_NONE:
-                fprintf(stderr, "No such command, type help\n");
-                break;
-        case CMD_INCOMPLETE:
-                fprintf(stderr,
-                        "'%s' incomplete command.  Use '%s x' where x is one of:\n",
-                        line, line);
-                fprintf(stderr, "\t");
-                for (i = 0; cmd->pc_sub_cmd[i].pc_name; i++) {
-                        fprintf(stderr, "%s ", cmd->pc_sub_cmd[i].pc_name);
-                }
-                fprintf(stderr, "\n");
-                break;
-        case CMD_COMPLETE:
-                i = line2args(line, argv, MAXARGS);
-                rc = (cmd->pc_func)(i, argv);
-
-                if (rc == CMD_HELP)
-                        fprintf(stderr, "%s\n", cmd->pc_help);
-
-                break;
-        }
-
-        return rc;
-}
-
-int
-noop_fn ()
-{
-        return (0);
-}
-
-/* just in case you're ever in an airplane and discover you
-   forgot to install readline-dev. :) */
-int init_input()
-{
-        int   interactive = isatty (fileno (stdin));
-
-#ifdef HAVE_LIBREADLINE
-        using_history();
-        stifle_history(HISTORY);
-
-        if (!interactive)
-        {
-                rl_prep_term_function = (rl_vintfunc_t *)noop_fn;
-                rl_deprep_term_function = (rl_voidfunc_t *)noop_fn;
-        }
-
-        rl_attempted_completion_function = (CPPFunction *)command_completion;
-        rl_completion_entry_function = (void *)command_generator;
-#endif
-        return interactive;
-}
-
-#ifndef HAVE_LIBREADLINE
-#define add_history(s)
-char * readline(char * prompt)
-{
-        int size = 2048;
-        char *line = malloc(size);
-        char *ptr = line;
-        int c;
-        int eof = 0;
-
-        if (line == NULL)
-                return NULL;
-        if (prompt)
-                printf ("%s", prompt);
-
-        while (1) {
-                if ((c = fgetc(stdin)) != EOF) {
-                        if (c == '\n')
-                                goto out;
-                        *ptr++ = c;
-
-                        if (ptr - line >= size - 1) {
-                                char *tmp;
-
-                                size *= 2;
-                                tmp = malloc(size);
-                                if (tmp == NULL)
-                                        goto outfree;
-                                memcpy(tmp, line, ptr - line);
-                                ptr = tmp + (ptr - line);
-                                free(line);
-                                line = tmp;
-                        }
-                } else {
-                        eof = 1;
-                        if (ferror(stdin) || feof(stdin))
-                                goto outfree;
-                        goto out;
-                }
-        }
-out:
-        *ptr = 0;
-        if (eof && (strlen(line) == 0)) {
-                free(line);
-                line = NULL;
-        }
-        return line;
-outfree:
-        free(line);
-        return NULL;
-}
-#endif
-
-/* this is the command execution machine */
-int Parser_commands(void)
-{
-        char *line, *s;
-        int rc = 0, save_error = 0;
-        int interactive;
-
-        interactive = init_input();
-
-        while(!done) {
-                line = readline(interactive ? parser_prompt : NULL);
-
-                if (!line) break;
-
-                s = skipwhitespace(line);
-
-                if (*s) {
-                        add_history(s);
-                        rc = execute_line(s);
-                }
-                /* stop on error if not-interactive */
-                if (rc != 0 && !interactive) {
-                        if (save_error == 0)
-                                save_error = rc;
-                        if (!ignore_errors)
-                                done = 1;
-                }
-
-                free(line);
-        }
-        if (save_error)
-                rc = save_error;
-        return rc;
-}
-
-
-/* sets the parser prompt */
-void Parser_init(char * prompt, command_t * cmds)
-{
-        done = 0;
-        top_level = cmds;
-        if (parser_prompt) free(parser_prompt);
-        parser_prompt = strdup(prompt);
-}
-
-/* frees the parser prompt */
-void Parser_exit(int argc, char *argv[])
-{
-        done = 1;
-        free(parser_prompt);
-        parser_prompt = NULL;
-}
-
-/* convert a string to an integer */
-int Parser_int(char *s, int *val)
-{
-        int ret;
-
-        if (*s != '0')
-                ret = sscanf(s, "%d", val);
-        else if (*(s+1) != 'x')
-                ret = sscanf(s, "%o", val);
-        else {
-                s++;
-                ret = sscanf(++s, "%x", val);
-        }
-
-        return(ret);
-}
-
-
-void Parser_qhelp(int argc, char *argv[]) {
-
-        printf("Available commands are:\n");
-
-        print_commands(NULL, top_level);
-        printf("For more help type: help command-name\n");
-}
-
-int Parser_help(int argc, char **argv)
-{
-        char line[1024];
-        char *next, *prev, *tmp;
-        command_t *result, *ambig;
-        int i;
-
-        if ( argc == 1 ) {
-                Parser_qhelp(argc, argv);
-                return 0;
-        }
-
-        line[0]='\0';
-        for ( i = 1 ;  i < argc ; i++ ) {
-                strcat(line, argv[i]);
-        }
-
-        switch ( process(line, &next, top_level, &result, &prev) ) {
-        case CMD_COMPLETE:
-                fprintf(stderr, "%s: %s\n",line, result->pc_help);
-                break;
-        case CMD_NONE:
-                fprintf(stderr, "%s: Unknown command.\n", line);
-                break;
-        case CMD_INCOMPLETE:
-                fprintf(stderr,
-                        "'%s' incomplete command.  Use '%s x' where x is one of:\n",
-                        line, line);
-                fprintf(stderr, "\t");
-                for (i = 0; result->pc_sub_cmd[i].pc_name; i++) {
-                        fprintf(stderr, "%s ", result->pc_sub_cmd[i].pc_name);
-                }
-                fprintf(stderr, "\n");
-                break;
-        case CMD_AMBIG:
-                fprintf(stderr, "Ambiguous command \'%s\'\nOptions: ", line);
-                while( (ambig = find_cmd(prev, result, &tmp)) ) {
-                        fprintf(stderr, "%s ", ambig->pc_name);
-                        result = ambig + 1;
-                }
-                fprintf(stderr, "\n");
-                break;
-        }
-        return 0;
-}
-
-
-void Parser_printhelp(char *cmd)
-{
-        char *argv[] = { "help", cmd };
-        Parser_help(2, argv);
-}
-
-
-/*************************************************************************
- * COMMANDS                                                              *
- *************************************************************************/
-static void print_commands(char * str, command_t * table) {
-        command_t * cmds;
-        char         buf[80];
-
-        for (cmds = table; cmds->pc_name; cmds++) {
-                if (cmds->pc_func) {
-                        if (str) printf("\t%s %s\n", str, cmds->pc_name);
-                        else printf("\t%s\n", cmds->pc_name);
-                }
-                if (cmds->pc_sub_cmd) {
-                        if (str) {
-                                sprintf(buf, "%s %s", str, cmds->pc_name);
-                                print_commands(buf, cmds->pc_sub_cmd);
-                        } else {
-                                print_commands(cmds->pc_name, cmds->pc_sub_cmd);
-                        }
-                }
-        }
-}
-
-char *Parser_getstr(const char *prompt, const char *deft, char *res,
-                    size_t len)
-{
-        char *line = NULL;
-        int size = strlen(prompt) + strlen(deft) + 8;
-        char *theprompt;
-        theprompt = malloc(size);
-        assert(theprompt);
-
-        sprintf(theprompt, "%s [%s]: ", prompt, deft);
-
-        line  = readline(theprompt);
-        free(theprompt);
-
-        if ( line == NULL || *line == '\0' ) {
-                strncpy(res, deft, len);
-        } else {
-                strncpy(res, line, len);
-        }
-
-        if ( line ) {
-                free(line);
-                return res;
-        } else {
-                return NULL;
-        }
-}
-
-/* get integer from prompt, loop forever to get it */
-int Parser_getint(const char *prompt, long min, long max, long deft, int base)
-{
-        int rc;
-        long result;
-        char *line;
-        int size = strlen(prompt) + 40;
-        char *theprompt = malloc(size);
-        assert(theprompt);
-        sprintf(theprompt,"%s [%ld, (0x%lx)]: ", prompt, deft, deft);
-
-        fflush(stdout);
-
-        do {
-                line = NULL;
-                line = readline(theprompt);
-                if ( !line ) {
-                        fprintf(stdout, "Please enter an integer.\n");
-                        fflush(stdout);
-                        continue;
-                }
-                if ( *line == '\0' ) {
-                        free(line);
-                        result =  deft;
-                        break;
-                }
-                rc = Parser_arg2int(line, &result, base);
-                free(line);
-                if ( rc != 0 ) {
-                        fprintf(stdout, "Invalid string.\n");
-                        fflush(stdout);
-                } else if ( result > max || result < min ) {
-                        fprintf(stdout, "Error: response must lie between %ld and %ld.\n",
-                                min, max);
-                        fflush(stdout);
-                } else {
-                        break;
-                }
-        } while ( 1 ) ;
-
-        if (theprompt)
-                free(theprompt);
-        return result;
-
-}
-
-/* get boolean (starting with YyNn; loop forever */
-int Parser_getbool(const char *prompt, int deft)
-{
-        int result = 0;
-        char *line;
-        int size = strlen(prompt) + 8;
-        char *theprompt = malloc(size);
-        assert(theprompt);
-
-        fflush(stdout);
-
-        if ( deft != 0 && deft != 1 ) {
-                fprintf(stderr, "Error: Parser_getbool given bad default %d\n",
-                        deft);
-                assert ( 0 );
-        }
-        sprintf(theprompt, "%s [%s]: ", prompt, (deft==0)? "N" : "Y");
-
-        do {
-                line = NULL;
-                line = readline(theprompt);
-                if ( line == NULL ) {
-                        result = deft;
-                        break;
-                }
-                if ( *line == '\0' ) {
-                        result = deft;
-                        break;
-                }
-                if ( *line == 'y' || *line == 'Y' ) {
-                        result = 1;
-                        break;
-                }
-                if ( *line == 'n' || *line == 'N' ) {
-                        result = 0;
-                        break;
-                }
-                if ( line )
-                        free(line);
-                fprintf(stdout, "Invalid string. Must start with yY or nN\n");
-                fflush(stdout);
-        } while ( 1 );
-
-        if ( line )
-                free(line);
-        if ( theprompt )
-                free(theprompt);
-        return result;
-}
-
-/* parse int out of a string or prompt for it */
-long Parser_intarg(const char *inp, const char *prompt, int deft,
-                   int min, int max, int base)
-{
-        long result;
-        int rc;
-
-        rc = Parser_arg2int(inp, &result, base);
-
-        if ( rc == 0 ) {
-                return result;
-        } else {
-                return Parser_getint(prompt, deft, min, max, base);
-        }
-}
-
-/* parse int out of a string or prompt for it */
-char *Parser_strarg(char *inp, const char *prompt, const char *deft,
-                    char *answer, int len)
-{
-        if ( inp == NULL || *inp == '\0' ) {
-                return Parser_getstr(prompt, deft, answer, len);
-        } else
-                return inp;
-}
-
-/* change a string into a number: return 0 on success. No invalid characters
-   allowed. The processing of base and validity follows strtol(3)*/
-int Parser_arg2int(const char *inp, long *result, int base)
-{
-        char *endptr;
-
-        if ( (base !=0) && (base < 2 || base > 36) )
-                return 1;
-
-        *result = strtol(inp, &endptr, base);
-
-        if ( *inp != '\0' && *endptr == '\0' )
-                return 0;
-        else
-                return 1;
-}
-
-/* Convert human readable size string to and int; "1k" -> 1000 */
-int Parser_size (int *sizep, char *str) {
-        int size;
-        char mod[32];
-
-        switch (sscanf (str, "%d%1[gGmMkK]", &size, mod)) {
-        default:
-                return (-1);
-
-        case 1:
-                *sizep = size;
-                return (0);
-
-        case 2:
-                switch (*mod) {
-                case 'g':
-                case 'G':
-                        *sizep = size << 30;
-                        return (0);
-
-                case 'm':
-                case 'M':
-                        *sizep = size << 20;
-                        return (0);
-
-                case 'k':
-                case 'K':
-                        *sizep = size << 10;
-                        return (0);
-
-                default:
-                        *sizep = size;
-                        return (0);
-                }
-        }
-}
-
-/* Convert a string boolean to an int; "enable" -> 1 */
-int Parser_bool (int *b, char *str) {
-        if (!strcasecmp (str, "no") ||
-            !strcasecmp (str, "n") ||
-            !strcasecmp (str, "off") ||
-            !strcasecmp (str, "down") ||
-            !strcasecmp (str, "disable"))
-        {
-                *b = 0;
-                return (0);
-        }
-
-        if (!strcasecmp (str, "yes") ||
-            !strcasecmp (str, "y") ||
-            !strcasecmp (str, "on") ||
-            !strcasecmp (str, "up") ||
-            !strcasecmp (str, "enable"))
-        {
-                *b = 1;
-                return (0);
-        }
-
-        return (-1);
-}
-
-int Parser_quit(int argc, char **argv)
-{
-        argc = argc;
-        argv = argv;
-        done = 1;
-        return 0;
-}
diff --git a/lustre/utils/parser.h b/lustre/utils/parser.h
deleted file mode 100644
index a1f899bfc880e88f8a016743b1b4b9cb433f664a..0000000000000000000000000000000000000000
--- a/lustre/utils/parser.h
+++ /dev/null
@@ -1,74 +0,0 @@
-#ifndef _PARSER_H_
-#define _PARSER_H_
-
-#define HISTORY	100		/* Don't let history grow unbounded    */
-#define MAXARGS 512
-
-#define CMD_COMPLETE	0
-#define CMD_INCOMPLETE	1
-#define CMD_NONE	2
-#define CMD_AMBIG	3
-#define CMD_HELP	4
-
-typedef struct parser_cmd {
-	char 	*pc_name;
-	int 	(* pc_func)(int, char **);
-	struct parser_cmd * pc_sub_cmd;
-	char *pc_help;
-} command_t;
-
-typedef struct argcmd {
-	char    *ac_name;
-	int      (*ac_func)(int, char **);
-	char     *ac_help;
-} argcmd_t;
-
-typedef struct network {
-	char	*type;
-	char	*server;
-	int	port;
-} network_t;
-
-int  Parser_quit(int argc, char **argv);
-void Parser_init(char *, command_t *);	/* Set prompt and load command list */
-int Parser_commands(void);			/* Start the command parser */
-void Parser_qhelp(int, char **);	/* Quick help routine */
-int Parser_help(int, char **);		/* Detailed help routine */
-void Parser_ignore_errors(int ignore);	/* Set the ignore errors flag */
-void Parser_printhelp(char *);		/* Detailed help routine */
-void Parser_exit(int, char **);		/* Shuts down command parser */
-int Parser_execarg(int argc, char **argv, command_t cmds[]);
-int execute_line(char * line);
-
-/* Converts a string to an integer */
-int Parser_int(char *, int *);
-
-/* Prompts for a string, with default values and a maximum length */
-char *Parser_getstr(const char *prompt, const char *deft, char *res, 
-		    size_t len);
-
-/* Prompts for an integer, with minimum, maximum and default values and base */
-int Parser_getint(const char *prompt, long min, long max, long deft,
-		  int base);
-
-/* Prompts for a yes/no, with default */
-int Parser_getbool(const char *prompt, int deft);
-
-/* Extracts an integer from a string, or prompts if it cannot get one */
-long Parser_intarg(const char *inp, const char *prompt, int deft,
-		   int min, int max, int base);
-
-/* Extracts a word from the input, or propmts if it cannot get one */
-char *Parser_strarg(char *inp, const char *prompt, const char *deft,
-		    char *answer, int len);
-
-/* Extracts an integer from a string  with a base */
-int Parser_arg2int(const char *inp, long *result, int base);
-
-/* Convert human readable size string to and int; "1k" -> 1000 */
-int Parser_size(int *sizep, char *str);
-
-/* Convert a string boolean to an int; "enable" -> 1 */
-int Parser_bool(int *b, char *str);
-
-#endif
diff --git a/lustre/utils/platform.h b/lustre/utils/platform.h
deleted file mode 100644
index 4f5b5c964419374751b675755cb7ff4ce3c75d03..0000000000000000000000000000000000000000
--- a/lustre/utils/platform.h
+++ /dev/null
@@ -1,248 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
- *  Copyright (C) 2002 Cluster File Systems, Inc.
- *
- *   This file is part of Lustre, http://www.lustre.org.
- *
- *   Lustre is free software; you can redistribute it and/or
- *   modify it under the terms of version 2 of the GNU General Public
- *   License as published by the Free Software Foundation.
- *
- *   Lustre 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 Lustre; if not, write to the Free Software
- *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-#ifndef __LUSTRE_UTILS_PLATFORM_H
-#define __LUSTRE_UTILS_PLATFORM_H
-
-#ifdef __linux__
-
-#ifdef HAVE_LIBREADLINE
-#define READLINE_LIBRARY
-#include <readline/readline.h>
-
-/* completion_matches() is #if 0-ed out in modern glibc */
-
-#ifndef completion_matches
-#  define completion_matches rl_completion_matches
-#endif
-extern void using_history(void);
-extern void stifle_history(int);
-extern void add_history(char *);
-#endif /* HAVE_LIBREADLINE */
-
-#include <errno.h>
-#include <string.h>
-#if HAVE_LIBPTHREAD
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <pthread.h>
-
-typedef pthread_mutex_t	l_mutex_t;
-typedef pthread_cond_t	l_cond_t;
-#define l_mutex_init(s)		pthread_mutex_init(s, NULL)
-#define l_mutex_lock(s)		pthread_mutex_lock(s)
-#define l_mutex_unlock(s)	pthread_mutex_unlock(s)
-#define l_cond_init(c)		pthread_cond_init(c, NULL)
-#define l_cond_broadcast(c)	pthread_cond_broadcast(c)
-#define l_cond_wait(c, s)	pthread_cond_wait(c, s)
-#endif
-
-#elif __APPLE__
-
-#ifdef HAVE_LIBREADLINE
-#define READLINE_LIBRARY
-#include <readline/readline.h>
-typedef VFunction       rl_vintfunc_t;
-typedef VFunction       rl_voidfunc_t;
-#endif /* HAVE_LIBREADLINE */
-
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <sys/shm.h>
-#include <sys/semaphore.h>
-
-/*
- * POSIX compliant inter-process synchronization aren't supported well
- * in Darwin, pthread_mutex_t and pthread_cond_t can only work as
- * inter-thread synchronization, they wouldn't work even being put in
- * shared memory for multi-process. PTHREAD_PROCESS_SHARED is not 
- * supported by Darwin also (pthread_mutexattr_setpshared() with the 
- * PTHREAD_PROCESS_SHARED attribute will return EINVAL). 
- *
- * The only inter-process sychronization mechanism can be used in Darwin
- * is POSIX NAMED semaphores and file lock, here we use NAMED semaphore
- * to implement mutex and condition. 
- *
- * XXX Liang:
- * They are just proto-type now, more tests are needed. 
- */
-#define L_LOCK_DEBUG 		(0)		
-
-#define L_SEM_NAMESIZE		32
-
-typedef struct {
-	sem_t           *s_sem;
-#if L_LOCK_DEBUG
-	char            s_name[L_SEM_NAMESIZE];
-#endif
-} l_sem_t;
-
-typedef l_sem_t         l_mutex_t;
-
-typedef struct {
-	l_mutex_t	c_guard;
-	int             c_count;
-	l_sem_t         c_waiter;
-} l_cond_t;
-
-static inline int l_sem_init(l_sem_t *sem, int val)
-{
-	char *s_name;
-#if L_LOCK_DEBUG
-	s_name = sem->s_name;
-#else
-	char buf[L_SEM_NAMESIZE];
-	s_name = buf;
-#endif
-	/* get an unique name for named semaphore */
-	snprintf(s_name, L_SEM_NAMESIZE, "%d-%p", (int)getpid(), sem);
-	sem->s_sem = sem_open(s_name, O_CREAT, 0600, val);
-	if ((int)sem->s_sem == SEM_FAILED) {
-		fprintf(stderr, "lock %s creating fail: %d, %d!\n",
-				s_name, (int)sem->s_sem, errno);
-		return -1;
-	} else {
-#if L_LOCK_DEBUG
-		printf("open lock: %s\n", s_name);
-#endif
-	}
-	return 0;
-}
-
-static inline void l_sem_done(l_sem_t *sem)
-{
-#if L_LOCK_DEBUG
-	printf("close lock: %s.\n", sem->s_name);
-#endif
-	sem_close(sem->s_sem);
-}
-
-static inline void l_sem_down(l_sem_t *sem)
-{
-#if L_LOCK_DEBUG
-	printf("sem down :%s\n", sem->s_name);
-#endif
-	sem_wait(sem->s_sem);
-}
-
-static inline void l_sem_up(l_sem_t *sem)
-{
-#if L_LOCK_DEBUG
-	printf("sem up	:%s\n", sem->s_name);
-#endif
-	sem_post(sem->s_sem);
-}
-
-static inline void l_mutex_init(l_mutex_t *mutex)
-{
-	l_sem_init((l_sem_t *)mutex, 1);
-}
-
-static inline void l_mutex_init_locked(l_mutex_t *mutex)
-{
-	l_sem_init((l_sem_t *)mutex, 0);
-}
-
-static inline void l_mutex_done(l_mutex_t *mutex)
-{
-	l_sem_done((l_sem_t *)mutex);
-}
-
-static inline void l_mutex_lock(l_mutex_t *mutex)
-{
-#if L_LOCK_DEBUG
-	printf("lock mutex  :%s\n", mutex->s_name);
-#endif
-	sem_wait(mutex->s_sem);
-}
-
-static inline void l_mutex_unlock(l_mutex_t *mutex)
-{
-#if L_LOCK_DEBUG
-	printf("unlock mutex: %s\n", mutex->s_name);
-#endif
-	sem_post(mutex->s_sem);
-}
-
-static inline void l_cond_init(l_cond_t *cond)
-{
-	l_mutex_init(&cond->c_guard);
-	l_sem_init(&cond->c_waiter, 0);
-	cond->c_count = 0;
-}
-
-static inline void l_cond_done(l_cond_t *cond)
-{
-	if (cond->c_count != 0)
-		fprintf(stderr, "your waiter list is not empty: %d!\n", cond->c_count);
-	l_mutex_done(&cond->c_guard);
-	l_sem_done(&cond->c_waiter);
-}
-
-static inline void l_cond_wait(l_cond_t *cond, l_mutex_t *lock)
-{
-	l_mutex_lock(&cond->c_guard);
-	cond->c_count --;
-	l_mutex_unlock(&cond->c_guard);
-	l_mutex_unlock(lock);
-	l_sem_down(&cond->c_waiter);
-	l_mutex_lock(lock);
-}
-
-static inline void l_cond_broadcast(l_cond_t *cond)
-{
-	l_mutex_lock(&cond->c_guard);
-	while (cond->c_count < 0) {
-		l_sem_up(&cond->c_waiter);
-		cond->c_count ++;
-	}
-	l_mutex_unlock(&cond->c_guard);
-}
-
-#else /* other platform */
-
-#ifdef HAVE_LIBREADLINE
-#define READLINE_LIBRARY
-#include <readline/readline.h>
-#endif /* HAVE_LIBREADLINE */
-#include <errno.h>
-#include <string.h>
-#if HAVE_LIBPTHREAD
-#include <sys/ipc.h>
-#include <sys/shm.h>
-#include <pthread.h>
-
-typedef pthread_mutex_t	l_mutex_t;
-typedef pthread_cond_t	l_cond_t;
-#define l_mutex_init(s)		pthread_mutex_init(s, NULL)
-#define l_mutex_lock(s)		pthread_mutex_lock(s)
-#define l_mutex_unlock(s)	pthread_mutex_unlock(s)
-#define l_cond_init(c)		pthread_cond_init(c, NULL)
-#define l_cond_broadcast(c)	pthread_cond_broadcast(c)
-#define l_cond_wait(c, s)	pthread_cond_wait(c, s)
-#endif /* HAVE_LIBPTHREAD */
-
-#endif /* __linux__  */
-
-#endif
diff --git a/lustre/utils/plot-llstat b/lustre/utils/plot-llstat
deleted file mode 100644
index 9ffcaeac0353ae0b0f81bfa37f5bb990bba35cd2..0000000000000000000000000000000000000000
--- a/lustre/utils/plot-llstat
+++ /dev/null
@@ -1,182 +0,0 @@
-#!/usr/bin/perl -w
-# Report generation for llstat
-# ===============================
-#        The plot-llstat script is used to generate csv file and
-# instructions files for gnuplot from the output of llstat script.
-# Since llstat is generic in nature, plot-llstat is also generic
-# script.
-#
-# Assume that:
-# operations = { open, close, read_bytes, write_bytes, connect, create, .. etc.}
-# parameters = { Rate, Total}
-#
-#        plot-llstat script creates dat(csv) file using number of operations
-# specified by the user. Number of operations equals to number of columns in csv
-# file. And values in those columns are equals to the corresponding value of
-# the "$param_inx" parameter from the output file.
-#        The plot-llstat also creates .scr file that contains instructions
-# for gnuplot to plot the graph. After generating .dat and .scr files this
-# script invokes gnuplot to display graph.
-
-# Featrues:
-# 1. This script is generic in nature, works with any operations names.
-# 2. User have option to setect operations of their choice for graph generation.
-# 3. This script automatically selects different y axes according to the ranges
-#    of values of the parameter.
-# 4. One can change parameter to be consider for graphing 
-#    by changing value of $param_inx.
-
-# Syntax:
-# $ plot-llstat <results_filename> [parameter index (default=2, i.e. Rate)]
-# [Note: 1. The output filt given to this script must have been generated 
-# 	    with -g option to the llstat script.
-#	 2. This script may need modifications whenever there will be 
-#           modifications in output format of llstat script.]
-
-# arg 0 is filename 
-sub usages_msg(){
-	print "$0 parses and graphs the output of llstat using gnuplot,\n";
-	print "and generates .dat files for use in spreadsheets.\n";
-	print "Usage: $0 <results_filename> [parameter_index]\n";
-	print "         where parameter_index is one of:\n";
-	print "            1 - Count per interval\n";
-	print "            2 - Rate (count per second) (default)\n";
-	print "            3 - Total count\n";
-	print "ex: # llstat -i2 -g -c lustre-OST0000 > log\n";
-	print "    # $0 log 3\n";
-        exit 1;
-}
-
-my $count = 0; 		# count for number of rows in csv(.dat) file.
-my $jumpcolumn = -1;	# Columns to be skiped to get op. name and the "$param_inx" param. 
-my @columns;		# Array for Operations names.
-my $columnvalues = "";  # Values of the "$param_inx" parameter for all operations.
-my @line;		# To store recently read line from log file
-my $param_inx = 2;	# Index of the parameter are you interested in graphing.
-			# Default is 2 for Rate.
-my $GraphTitle;
-if ( !$ARGV[0] ) {
-	usages_msg(); 	
-}
-
-if ( $ARGV[1] ) {
-	$param_inx = $ARGV[1]; 	
-}
-
-$file = $ARGV[0];
-
-# Open log file for reading
-open ( PFILE, "$file") or die "Can't open results log file";
-@alllines = <PFILE>;
-close PFILE;
-LABLE:while ( $count <= $#alllines ) {
-	$line = $alllines[$count];
-	#print "$line\n";
-	chop($line);
-	@line = split(/\s+/,$line); # splits line into tokens
-	# This comparison may be changed if there will be changes log file.
-	if( $line[0] eq "Timestamp" ) { 
-	# decide operations position in the logfile depends on num of 
-	# parameters(Rate, Total, etc.) present in this line.
-		$jumpcolumn = $#line;
-		$count = $count + 2; # skip the "---------" line from result file.
-		last LABLE;
-	}
-	if ($line[1] eq "STATS" && $line[2] eq "on") {
-                $GraphTitle = $line;
-                @GraphTitle = split( /:/, $GraphTitle );
-        }
-	$count++;
-}
-if ($jumpcolumn < 0) {
-	print "Invalid logfile format\n";
-	exit 1;
-}
-$lastline = $alllines[-1];
-@lastline = split(/\s+/,$lastline);
-my $allcolumns = "";
-$i = 1;
-while ($i < $#lastline) {
-	# display operations names for user selection.
-	print "$lastline[$i] ";
-	$allcolumns = "$allcolumns$lastline[$i] "; 
-	# capture the "$param_inx" parameter in $columnvalues, 
-	# used to define axes ranges depends on values.
-	$columnvalues = "$columnvalues$lastline[$i + $param_inx] ";
-	$i = $i + $jumpcolumn;
-}
-print "\nSelect columns(press return to select all): ";
-$columns = <STDIN>;
-# consider all operations if user hit return.
-if ( $columns eq "\n" ) {
-	$columns = $allcolumns;
-}
-chop ($columns);
-@columns = split (/\s+/, $columns);
-# Open .csv file for writting required columns from log file.
-open ( DATAFILE, "> $file.dat" ) or die "Can't open csv file for writting";
-print DATAFILE "0 ";
-for ($i = 0; $i < $#lastline; $i++) {
-	for ($j = 0; $j <= $#columns; $j++) {
-		if ($columns[$j] eq $lastline[$i]) {
-			print DATAFILE "$columns[$j]$lastline[$i + 4] ";
-		}
-		
-	}
-}
-print DATAFILE "\n";
-my $found = 0;
-# depends on $jumpcolumn, capture operation names and value of 
-# the "$param_inx" parameter for that perticular operation.
-while ( $count <= $#alllines )  {
-	$line = $alllines[$count];
-	#print "$line\n";
-	chop($line);
-	@line = split(/\s+/,$line); # splits line into tokens
-	# fill the csv(.dat) file with values of operations. 
-	print DATAFILE "$line[0]";
-	for ($j = 0; $j <= $#columns; $j++) {
-		for ($i = 1; $i < $#line ; $i++) {
-			if ($columns[$j] eq $line[$i]) {
-				# capture the "$param_inx" parameter 
-				print DATAFILE " $line[$i + $param_inx]";
-				$found = 1;
-			}
-		}
-		if (!$found) {
-			print DATAFILE " 0";
-		}
-		$found = 0;
-	}
-	print DATAFILE "\n";
-	$count = $count + 1;
-}
-close DATAFILE;
-
-# Open .csv file for reading columns titles.
-open ( DATAFILE, "$file.dat" ) or die "Can't open csv file for reading titles\n";
-my $titles = <DATAFILE>;
-close DATAFILE;
-chop($titles);
-@titles = split (/\s+/, $titles);
-# Open .scr file for writting instructions for gnuplot.
-open ( SCRFILE, "> $file.scr" ) or die "Can't open scr file for writting\n";
-print SCRFILE "set title \"$GraphTitle[1]\"\n";
-print SCRFILE "set xlabel \"time\"\n";
-if ($param_inx == 1) {
-    print SCRFILE "set ylabel \"units/interval\"\n";
-} elsif ($param_inx == 3) {
-    print SCRFILE "set ylabel \"units\"\n";
-} else {
-    print SCRFILE "set ylabel \"units/sec\"\n";
-}
-my $plot = "plot";
-# generate instructions for gnuplot
-for ($i = 2; $i <= ($#columns + 2); $i++) {
-    print SCRFILE "$plot \"$file.dat\" using 1:$i axes x1y1 title \"$titles[$i - 1]\" with line\n";
-    $plot = "replot";
-}
-print SCRFILE "pause -1\n";
-close SCRFILE;
-# invoke gnuplot to display graph.
-system ("gnuplot $file.scr") == 0 or die "ERROR: while ploting graph.\nMake sure that gnuplot is working properly";
diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c
deleted file mode 100644
index 5a731089d5d36d291dce4990ef3b6681be3897f6..0000000000000000000000000000000000000000
--- a/lustre/utils/wirecheck.c
+++ /dev/null
@@ -1,1341 +0,0 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- */
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-#include <liblustre.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_disk.h>
-
-#define BLANK_LINE()                                            \
-do {                                                            \
-        printf("\n");                                           \
-} while(0)
-
-#define COMMENT(c)                                              \
-do {                                                            \
-        printf("        /* "c" */\n");                          \
-} while(0)
-
-#define STRINGIFY(a) #a
-
-
-#define CHECK_CDEFINE(a)                                        \
-        printf("        CLASSERT("#a" == "STRINGIFY(a) ");\n")
-
-#define CHECK_CVALUE(a)                                         \
-        printf("        CLASSERT("#a" == %lld);\n", (long long)a)
-
-#define CHECK_DEFINE(a)                                         \
-do {                                                            \
-        printf("        LASSERTF("#a" == "STRINGIFY(a)          \
-               ",\" found %%lld\\n\",\n                 "       \
-               "(long long)"#a");\n");   \
-} while(0)
-
-#define CHECK_VALUE(a)                                          \
-do {                                                            \
-        printf("        LASSERTF("#a                            \
-               " == %lld, \" found %%lld\\n\",\n                 "\
-               "(long long)"#a");\n", (long long)a);            \
-} while(0)
-
-#define CHECK_VALUE_64(a)                                       \
-do {                                                            \
-        printf("        LASSERTF("#a                            \
-               " == %lldULL, \" found %%lld\\n\",\n                 "\
-               "(long long)"#a");\n", (long long)a);            \
-} while(0)
-
-#define CHECK_MEMBER_OFFSET(s,m)                                \
-do {                                                            \
-        CHECK_VALUE((int)offsetof(struct s, m));                \
-} while(0)
-
-#define CHECK_MEMBER_OFFSET_TYPEDEF(s,m)                        \
-do {                                                            \
-        CHECK_VALUE((int)offsetof(s, m));                       \
-} while(0)
-
-#define CHECK_MEMBER_SIZEOF(s,m)                                \
-do {                                                            \
-        CHECK_VALUE((int)sizeof(((struct s *)0)->m));           \
-} while(0)
-
-#define CHECK_MEMBER_SIZEOF_TYPEDEF(s,m)                        \
-do {                                                            \
-        CHECK_VALUE((int)sizeof(((s *)0)->m));                  \
-} while(0)
-
-#define CHECK_MEMBER(s,m)                                       \
-do {                                                            \
-        CHECK_MEMBER_OFFSET(s, m);                              \
-        CHECK_MEMBER_SIZEOF(s, m);                              \
-} while(0)
-
-#define CHECK_MEMBER_TYPEDEF(s,m)                               \
-do {                                                            \
-        CHECK_MEMBER_OFFSET_TYPEDEF(s, m);                      \
-        CHECK_MEMBER_SIZEOF_TYPEDEF(s, m);                      \
-} while(0)
-
-#define CHECK_STRUCT(s)                                         \
-do {                                                            \
-        COMMENT("Checks for struct "#s);                        \
-                CHECK_VALUE((int)sizeof(struct s));             \
-} while(0)
-
-#define CHECK_STRUCT_TYPEDEF(s)                                 \
-do {                                                            \
-        COMMENT("Checks for type "#s);                          \
-                CHECK_VALUE((int)sizeof(s));                    \
-} while(0)
-
-static void
-check_lustre_handle(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lustre_handle);
-        CHECK_MEMBER(lustre_handle, cookie);
-}
-
-void
-check_lustre_msg_v1(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lustre_msg_v1);
-        CHECK_MEMBER(lustre_msg_v1, lm_handle);
-        CHECK_MEMBER(lustre_msg_v1, lm_magic);
-        CHECK_MEMBER(lustre_msg_v1, lm_type);
-        CHECK_MEMBER(lustre_msg_v1, lm_version);
-        CHECK_MEMBER(lustre_msg_v1, lm_opc);
-        CHECK_MEMBER(lustre_msg_v1, lm_last_xid);
-        CHECK_MEMBER(lustre_msg_v1, lm_last_committed);
-        CHECK_MEMBER(lustre_msg_v1, lm_transno);
-        CHECK_MEMBER(lustre_msg_v1, lm_status);
-        CHECK_MEMBER(lustre_msg_v1, lm_flags);
-        CHECK_MEMBER(lustre_msg_v1, lm_conn_cnt);
-        CHECK_MEMBER(lustre_msg_v1, lm_bufcount);
-        CHECK_MEMBER(lustre_msg_v1, lm_buflens[0]);
-}
-
-void
-check_lustre_msg_v2(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lustre_msg_v2);
-        CHECK_MEMBER(lustre_msg_v2, lm_bufcount);
-        CHECK_MEMBER(lustre_msg_v2, lm_secflvr);
-        CHECK_MEMBER(lustre_msg_v2, lm_magic);
-        CHECK_MEMBER(lustre_msg_v2, lm_repsize);
-        CHECK_MEMBER(lustre_msg_v2, lm_cksum);
-        CHECK_MEMBER(lustre_msg_v2, lm_flags);
-        CHECK_MEMBER(lustre_msg_v2, lm_padding_2);
-        CHECK_MEMBER(lustre_msg_v2, lm_padding_3);
-        CHECK_MEMBER(lustre_msg_v2, lm_buflens[0]);
-}
-
-void
-check_ptlrpc_body(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ptlrpc_body);
-        CHECK_MEMBER(ptlrpc_body, pb_handle);
-        CHECK_MEMBER(ptlrpc_body, pb_type);
-        CHECK_MEMBER(ptlrpc_body, pb_version);
-        CHECK_MEMBER(ptlrpc_body, pb_opc);
-        CHECK_MEMBER(ptlrpc_body, pb_status);
-        CHECK_MEMBER(ptlrpc_body, pb_last_xid);
-        CHECK_MEMBER(ptlrpc_body, pb_last_seen);
-        CHECK_MEMBER(ptlrpc_body, pb_last_committed);
-        CHECK_MEMBER(ptlrpc_body, pb_transno);
-        CHECK_MEMBER(ptlrpc_body, pb_flags);
-        CHECK_MEMBER(ptlrpc_body, pb_op_flags);
-        CHECK_MEMBER(ptlrpc_body, pb_conn_cnt);
-        CHECK_MEMBER(ptlrpc_body, pb_timeout);
-        CHECK_MEMBER(ptlrpc_body, pb_service_time);
-        CHECK_MEMBER(ptlrpc_body, pb_slv);
-        CHECK_MEMBER(ptlrpc_body, pb_limit);
-}
-
-static void check_obd_connect_data(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(obd_connect_data);
-        CHECK_MEMBER(obd_connect_data, ocd_connect_flags);
-        CHECK_MEMBER(obd_connect_data, ocd_version);
-        CHECK_MEMBER(obd_connect_data, ocd_grant);
-        CHECK_MEMBER(obd_connect_data, ocd_index);
-        CHECK_MEMBER(obd_connect_data, ocd_brw_size);
-        CHECK_MEMBER(obd_connect_data, ocd_ibits_known);
-        CHECK_MEMBER(obd_connect_data, ocd_nllu);
-        CHECK_MEMBER(obd_connect_data, ocd_nllg);
-        CHECK_MEMBER(obd_connect_data, ocd_transno);
-        CHECK_MEMBER(obd_connect_data, ocd_group);
-        CHECK_MEMBER(obd_connect_data, ocd_cksum_types);
-        CHECK_MEMBER(obd_connect_data, padding1);
-        CHECK_MEMBER(obd_connect_data, padding2);
-
-        CHECK_CDEFINE(OBD_CONNECT_RDONLY);
-        CHECK_CDEFINE(OBD_CONNECT_INDEX);
-        CHECK_CDEFINE(OBD_CONNECT_GRANT);
-        CHECK_CDEFINE(OBD_CONNECT_SRVLOCK);
-        CHECK_CDEFINE(OBD_CONNECT_VERSION);
-        CHECK_CDEFINE(OBD_CONNECT_REQPORTAL);
-        CHECK_CDEFINE(OBD_CONNECT_ACL);
-        CHECK_CDEFINE(OBD_CONNECT_XATTR);
-        CHECK_CDEFINE(OBD_CONNECT_CROW);
-        CHECK_CDEFINE(OBD_CONNECT_TRUNCLOCK);
-        CHECK_CDEFINE(OBD_CONNECT_TRANSNO);
-        CHECK_CDEFINE(OBD_CONNECT_IBITS);
-        CHECK_CDEFINE(OBD_CONNECT_JOIN);
-        CHECK_CDEFINE(OBD_CONNECT_ATTRFID);
-        CHECK_CDEFINE(OBD_CONNECT_NODEVOH);
-        CHECK_CDEFINE(OBD_CONNECT_LCL_CLIENT);
-        CHECK_CDEFINE(OBD_CONNECT_RMT_CLIENT);
-        CHECK_CDEFINE(OBD_CONNECT_BRW_SIZE);
-        CHECK_CDEFINE(OBD_CONNECT_QUOTA64);
-        CHECK_CDEFINE(OBD_CONNECT_MDS_CAPA);
-        CHECK_CDEFINE(OBD_CONNECT_OSS_CAPA);
-        CHECK_CDEFINE(OBD_CONNECT_CANCELSET);
-        CHECK_CDEFINE(OBD_CONNECT_SOM);
-        CHECK_CDEFINE(OBD_CONNECT_AT);
-        CHECK_CDEFINE(OBD_CONNECT_LRU_RESIZE);
-        CHECK_CDEFINE(OBD_CONNECT_MDS_MDS);
-        CHECK_CDEFINE(OBD_CONNECT_REAL);
-        CHECK_CDEFINE(OBD_CONNECT_CKSUM);
-}
-
-static void
-check_obdo(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(obdo);
-        CHECK_MEMBER(obdo, o_valid);
-        CHECK_MEMBER(obdo, o_id);
-        CHECK_MEMBER(obdo, o_gr);
-        CHECK_MEMBER(obdo, o_fid);
-        CHECK_MEMBER(obdo, o_size);
-        CHECK_MEMBER(obdo, o_mtime);
-        CHECK_MEMBER(obdo, o_atime);
-        CHECK_MEMBER(obdo, o_ctime);
-        CHECK_MEMBER(obdo, o_blocks);
-        CHECK_MEMBER(obdo, o_grant);
-        CHECK_MEMBER(obdo, o_blksize);
-        CHECK_MEMBER(obdo, o_mode);
-        CHECK_MEMBER(obdo, o_uid);
-        CHECK_MEMBER(obdo, o_gid);
-        CHECK_MEMBER(obdo, o_flags);
-        CHECK_MEMBER(obdo, o_nlink);
-        CHECK_MEMBER(obdo, o_generation);
-        CHECK_MEMBER(obdo, o_misc);
-        CHECK_MEMBER(obdo, o_easize);
-        CHECK_MEMBER(obdo, o_mds);
-        CHECK_MEMBER(obdo, o_stripe_idx);
-        CHECK_MEMBER(obdo, o_padding_1);
-        CHECK_MEMBER(obdo, o_inline);
-
-        CHECK_VALUE(OBD_INLINESZ);
-
-        CHECK_CDEFINE(OBD_MD_FLID);
-        CHECK_CDEFINE(OBD_MD_FLATIME);
-        CHECK_CDEFINE(OBD_MD_FLMTIME);
-        CHECK_CDEFINE(OBD_MD_FLCTIME);
-        CHECK_CDEFINE(OBD_MD_FLSIZE);
-        CHECK_CDEFINE(OBD_MD_FLBLOCKS);
-        CHECK_CDEFINE(OBD_MD_FLBLKSZ);
-        CHECK_CDEFINE(OBD_MD_FLMODE);
-        CHECK_CDEFINE(OBD_MD_FLTYPE);
-        CHECK_CDEFINE(OBD_MD_FLUID);
-        CHECK_CDEFINE(OBD_MD_FLGID);
-        CHECK_CDEFINE(OBD_MD_FLFLAGS);
-        CHECK_CDEFINE(OBD_MD_FLNLINK);
-        CHECK_CDEFINE(OBD_MD_FLGENER);
-        CHECK_CDEFINE(OBD_MD_FLINLINE);
-        CHECK_CDEFINE(OBD_MD_FLRDEV);
-        CHECK_CDEFINE(OBD_MD_FLEASIZE);
-        CHECK_CDEFINE(OBD_MD_LINKNAME);
-        CHECK_CDEFINE(OBD_MD_FLHANDLE);
-        CHECK_CDEFINE(OBD_MD_FLCKSUM);
-        CHECK_CDEFINE(OBD_MD_FLQOS);
-        CHECK_CDEFINE(OBD_MD_FLCOOKIE);
-        CHECK_CDEFINE(OBD_MD_FLGROUP);
-        CHECK_CDEFINE(OBD_MD_FLFID);
-        CHECK_CDEFINE(OBD_MD_FLEPOCH);
-        CHECK_CDEFINE(OBD_MD_FLGRANT);
-        CHECK_CDEFINE(OBD_MD_FLDIREA);
-        CHECK_CDEFINE(OBD_MD_FLUSRQUOTA);
-        CHECK_CDEFINE(OBD_MD_FLGRPQUOTA);
-        CHECK_CDEFINE(OBD_MD_FLMODEASIZE);
-        CHECK_CDEFINE(OBD_MD_MDS);
-        CHECK_CDEFINE(OBD_MD_REINT);
-        CHECK_CDEFINE(OBD_MD_FLXATTR);
-        CHECK_CDEFINE(OBD_MD_FLXATTRLS);
-        CHECK_CDEFINE(OBD_MD_FLXATTRRM);
-        CHECK_CDEFINE(OBD_MD_FLACL);
-
-        CHECK_CDEFINE(OBD_FL_INLINEDATA);
-        CHECK_CDEFINE(OBD_FL_OBDMDEXISTS);
-        CHECK_CDEFINE(OBD_FL_DELORPHAN);
-        CHECK_CDEFINE(OBD_FL_NORPC);
-        CHECK_CDEFINE(OBD_FL_IDONLY);
-        CHECK_CDEFINE(OBD_FL_RECREATE_OBJS);
-        CHECK_CDEFINE(OBD_FL_DEBUG_CHECK);
-        CHECK_CDEFINE(OBD_FL_NO_USRQUOTA);
-        CHECK_CDEFINE(OBD_FL_NO_GRPQUOTA);
-        CHECK_CDEFINE(OBD_FL_CREATE_CROW);
-        CHECK_CDEFINE(OBD_FL_TRUNCLOCK);
-        CHECK_CDEFINE(OBD_FL_CKSUM_CRC32);
-        CHECK_CDEFINE(OBD_FL_CKSUM_ADLER);
-        CHECK_CVALUE(OBD_CKSUM_CRC32);
-        CHECK_CVALUE(OBD_CKSUM_ADLER);
-}
-
-static void
-check_lov_mds_md_v1(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lov_mds_md_v1);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_magic);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_pattern);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_object_id);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_object_gr);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_stripe_size);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_stripe_count);
-        CHECK_MEMBER(lov_mds_md_v1, lmm_objects);
-
-        BLANK_LINE();
-        CHECK_STRUCT(lov_ost_data_v1);
-        CHECK_MEMBER(lov_ost_data_v1, l_object_id);
-        CHECK_MEMBER(lov_ost_data_v1, l_object_gr);
-        CHECK_MEMBER(lov_ost_data_v1, l_ost_gen);
-        CHECK_MEMBER(lov_ost_data_v1, l_ost_idx);
-
-        CHECK_CDEFINE(LOV_MAGIC_V1);
-        CHECK_CDEFINE(LOV_MAGIC_JOIN);
-
-        CHECK_VALUE(LOV_PATTERN_RAID0);
-        CHECK_VALUE(LOV_PATTERN_RAID1);
-}
-
-static void
-check_lov_mds_md_join(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lov_mds_md_join);
-        CHECK_MEMBER(lov_mds_md_join, lmmj_md);
-        CHECK_MEMBER(lov_mds_md_join, lmmj_array_id);
-        CHECK_MEMBER(lov_mds_md_join, lmmj_extent_count);
-}
-
-static void
-check_obd_statfs(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(obd_statfs);
-        CHECK_MEMBER(obd_statfs, os_type);
-        CHECK_MEMBER(obd_statfs, os_blocks);
-        CHECK_MEMBER(obd_statfs, os_bfree);
-        CHECK_MEMBER(obd_statfs, os_bavail);
-        CHECK_MEMBER(obd_statfs, os_ffree);
-        CHECK_MEMBER(obd_statfs, os_fsid);
-        CHECK_MEMBER(obd_statfs, os_bsize);
-        CHECK_MEMBER(obd_statfs, os_namelen);
-        CHECK_MEMBER(obd_statfs, os_state);
-        CHECK_MEMBER(obd_statfs, os_spare1);
-        CHECK_MEMBER(obd_statfs, os_spare2);
-        CHECK_MEMBER(obd_statfs, os_spare3);
-        CHECK_MEMBER(obd_statfs, os_spare4);
-        CHECK_MEMBER(obd_statfs, os_spare5);
-        CHECK_MEMBER(obd_statfs, os_spare6);
-        CHECK_MEMBER(obd_statfs, os_spare7);
-        CHECK_MEMBER(obd_statfs, os_spare8);
-        CHECK_MEMBER(obd_statfs, os_spare9);
-}
-
-static void
-check_obd_ioobj(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(obd_ioobj);
-        CHECK_MEMBER(obd_ioobj, ioo_id);
-        CHECK_MEMBER(obd_ioobj, ioo_gr);
-        CHECK_MEMBER(obd_ioobj, ioo_type);
-        CHECK_MEMBER(obd_ioobj, ioo_bufcnt);
-}
-
-static void
-check_obd_quotactl(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(obd_quotactl);
-        CHECK_MEMBER(obd_quotactl, qc_cmd);
-        CHECK_MEMBER(obd_quotactl, qc_type);
-        CHECK_MEMBER(obd_quotactl, qc_id);
-        CHECK_MEMBER(obd_quotactl, qc_stat);
-        CHECK_MEMBER(obd_quotactl, qc_dqinfo);
-        CHECK_MEMBER(obd_quotactl, qc_dqblk);
-
-        BLANK_LINE();
-        CHECK_STRUCT(obd_dqinfo);
-        CHECK_MEMBER(obd_dqinfo, dqi_bgrace);
-        CHECK_MEMBER(obd_dqinfo, dqi_igrace);
-        CHECK_MEMBER(obd_dqinfo, dqi_flags);
-        CHECK_MEMBER(obd_dqinfo, dqi_valid);
-
-        BLANK_LINE();
-        CHECK_STRUCT(obd_dqblk);
-        CHECK_MEMBER(obd_dqblk, dqb_bhardlimit);
-        CHECK_MEMBER(obd_dqblk, dqb_bsoftlimit);
-        CHECK_MEMBER(obd_dqblk, dqb_curspace);
-        CHECK_MEMBER(obd_dqblk, dqb_ihardlimit);
-        CHECK_MEMBER(obd_dqblk, dqb_isoftlimit);
-        CHECK_MEMBER(obd_dqblk, dqb_curinodes);
-        CHECK_MEMBER(obd_dqblk, dqb_btime);
-        CHECK_MEMBER(obd_dqblk, dqb_itime);
-        CHECK_MEMBER(obd_dqblk, dqb_valid);
-        CHECK_MEMBER(obd_dqblk, padding);
-
-        CHECK_DEFINE(Q_QUOTACHECK);
-        CHECK_DEFINE(Q_INITQUOTA);
-        CHECK_DEFINE(Q_GETOINFO);
-        CHECK_DEFINE(Q_GETOQUOTA);
-}
-
-static void
-check_niobuf_remote(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(niobuf_remote);
-        CHECK_MEMBER(niobuf_remote, offset);
-        CHECK_MEMBER(niobuf_remote, len);
-        CHECK_MEMBER(niobuf_remote, flags);
-
-        CHECK_VALUE(OBD_BRW_READ);
-        CHECK_VALUE(OBD_BRW_WRITE);
-        CHECK_VALUE(OBD_BRW_SYNC);
-        CHECK_VALUE(OBD_BRW_FROM_GRANT);
-        CHECK_VALUE(OBD_BRW_NOQUOTA);
-}
-
-static void
-check_ost_body(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ost_body);
-        CHECK_MEMBER(ost_body, oa);
-}
-
-static void
-check_ll_fid(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ll_fid);
-        CHECK_MEMBER(ll_fid, id);
-        CHECK_MEMBER(ll_fid, generation);
-        CHECK_MEMBER(ll_fid, f_type);
-}
-
-static void
-check_mds_status_req(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_status_req);
-        CHECK_MEMBER(mds_status_req, flags);
-        CHECK_MEMBER(mds_status_req, repbuf);
-}
-
-static void
-check_mds_body(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_body);
-        CHECK_MEMBER(mds_body, fid1);
-        CHECK_MEMBER(mds_body, fid2);
-        CHECK_MEMBER(mds_body, handle);
-        CHECK_MEMBER(mds_body, size);
-        CHECK_MEMBER(mds_body, blocks);
-        CHECK_MEMBER(mds_body, io_epoch);
-        CHECK_MEMBER(mds_body, ino);
-        CHECK_MEMBER(mds_body, valid);
-        CHECK_MEMBER(mds_body, fsuid);
-        CHECK_MEMBER(mds_body, fsgid);
-        CHECK_MEMBER(mds_body, capability);
-        CHECK_MEMBER(mds_body, mode);
-        CHECK_MEMBER(mds_body, uid);
-        CHECK_MEMBER(mds_body, gid);
-        CHECK_MEMBER(mds_body, mtime);
-        CHECK_MEMBER(mds_body, ctime);
-        CHECK_MEMBER(mds_body, atime);
-        CHECK_MEMBER(mds_body, flags);
-        CHECK_MEMBER(mds_body, rdev);
-        CHECK_MEMBER(mds_body, nlink);
-        CHECK_MEMBER(mds_body, generation);
-        CHECK_MEMBER(mds_body, suppgid);
-        CHECK_MEMBER(mds_body, eadatasize);
-        CHECK_MEMBER(mds_body, aclsize);
-        CHECK_MEMBER(mds_body, max_mdsize);
-        CHECK_MEMBER(mds_body, max_cookiesize);
-        CHECK_MEMBER(mds_body, padding_4);
-
-        CHECK_VALUE(FMODE_READ);
-        CHECK_VALUE(FMODE_WRITE);
-        CHECK_VALUE(MDS_FMODE_EXEC);
-
-        CHECK_CDEFINE(MDS_OPEN_CREAT);
-        CHECK_CDEFINE(MDS_OPEN_EXCL);
-        CHECK_CDEFINE(MDS_OPEN_TRUNC);
-        CHECK_CDEFINE(MDS_OPEN_APPEND);
-        CHECK_CDEFINE(MDS_OPEN_SYNC);
-        CHECK_CDEFINE(MDS_OPEN_DIRECTORY);
-        CHECK_CDEFINE(MDS_OPEN_DELAY_CREATE);
-        CHECK_CDEFINE(MDS_OPEN_OWNEROVERRIDE);
-        CHECK_CDEFINE(MDS_OPEN_JOIN_FILE);
-        CHECK_CDEFINE(MDS_OPEN_HAS_EA);
-        CHECK_CDEFINE(MDS_OPEN_HAS_OBJS);
-
-        /* these should be identical to their EXT3_*_FL counterparts, and
-         * are redefined only to avoid dragging in ext3_fs.h */
-        CHECK_CDEFINE(MDS_SYNC_FL);
-        CHECK_CDEFINE(MDS_IMMUTABLE_FL);
-        CHECK_CDEFINE(MDS_APPEND_FL);
-        CHECK_CDEFINE(MDS_NOATIME_FL);
-        CHECK_CDEFINE(MDS_DIRSYNC_FL);
-        CHECK_CDEFINE(MDS_BFLAG_EXT_FLAGS);
-
-        CHECK_CDEFINE(MDS_INODELOCK_LOOKUP);
-        CHECK_CDEFINE(MDS_INODELOCK_UPDATE);
-        CHECK_CDEFINE(MDS_INODELOCK_OPEN);
-}
-
-static void
-check_mds_rec_setattr(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_setattr);
-        CHECK_MEMBER(mds_rec_setattr, sa_opcode);
-        CHECK_MEMBER(mds_rec_setattr, sa_fsuid);
-        CHECK_MEMBER(mds_rec_setattr, sa_fsgid);
-        CHECK_MEMBER(mds_rec_setattr, sa_cap);
-        CHECK_MEMBER(mds_rec_setattr, sa_suppgid);
-        CHECK_MEMBER(mds_rec_setattr, sa_mode);
-        CHECK_MEMBER(mds_rec_setattr, sa_fid);
-        CHECK_MEMBER(mds_rec_setattr, sa_valid);
-        CHECK_MEMBER(mds_rec_setattr, sa_size);
-        CHECK_MEMBER(mds_rec_setattr, sa_mtime);
-        CHECK_MEMBER(mds_rec_setattr, sa_atime);
-        CHECK_MEMBER(mds_rec_setattr, sa_ctime);
-        CHECK_MEMBER(mds_rec_setattr, sa_uid);
-        CHECK_MEMBER(mds_rec_setattr, sa_gid);
-        CHECK_MEMBER(mds_rec_setattr, sa_attr_flags);
-        CHECK_CDEFINE(MDS_ATTR_MODE);
-        CHECK_CDEFINE(MDS_ATTR_UID);
-        CHECK_CDEFINE(MDS_ATTR_GID);
-        CHECK_CDEFINE(MDS_ATTR_SIZE);
-        CHECK_CDEFINE(MDS_ATTR_ATIME);
-        CHECK_CDEFINE(MDS_ATTR_MTIME);
-        CHECK_CDEFINE(MDS_ATTR_CTIME);
-        CHECK_CDEFINE(MDS_ATTR_ATIME_SET);
-        CHECK_CDEFINE(MDS_ATTR_MTIME_SET);
-        CHECK_CDEFINE(MDS_ATTR_FORCE);
-        CHECK_CDEFINE(MDS_ATTR_ATTR_FLAG);
-        CHECK_CDEFINE(MDS_ATTR_KILL_SUID);
-        CHECK_CDEFINE(MDS_ATTR_KILL_SGID);
-        CHECK_CDEFINE(MDS_ATTR_CTIME_SET);
-        CHECK_CDEFINE(MDS_ATTR_FROM_OPEN);
-}
-
-static void
-check_mds_rec_create(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_create);
-        CHECK_MEMBER(mds_rec_create, cr_opcode);
-        CHECK_MEMBER(mds_rec_create, cr_fsuid);
-        CHECK_MEMBER(mds_rec_create, cr_fsgid);
-        CHECK_MEMBER(mds_rec_create, cr_cap);
-        CHECK_MEMBER(mds_rec_create, cr_flags);
-        CHECK_MEMBER(mds_rec_create, cr_mode);
-        CHECK_MEMBER(mds_rec_create, cr_fid);
-        CHECK_MEMBER(mds_rec_create, cr_replayfid);
-        CHECK_MEMBER(mds_rec_create, cr_time);
-        CHECK_MEMBER(mds_rec_create, cr_rdev);
-        CHECK_MEMBER(mds_rec_create, cr_suppgid);
-}
-
-static void
-check_mds_rec_link(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_link);
-        CHECK_MEMBER(mds_rec_link, lk_opcode);
-        CHECK_MEMBER(mds_rec_link, lk_fsuid);
-        CHECK_MEMBER(mds_rec_link, lk_fsgid);
-        CHECK_MEMBER(mds_rec_link, lk_cap);
-        CHECK_MEMBER(mds_rec_link, lk_suppgid1);
-        CHECK_MEMBER(mds_rec_link, lk_suppgid2);
-        CHECK_MEMBER(mds_rec_link, lk_fid1);
-        CHECK_MEMBER(mds_rec_link, lk_fid2);
-        CHECK_MEMBER(mds_rec_link, lk_time);
-}
-
-static void
-check_mds_rec_unlink(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_unlink);
-        CHECK_MEMBER(mds_rec_unlink, ul_opcode);
-        CHECK_MEMBER(mds_rec_unlink, ul_fsuid);
-        CHECK_MEMBER(mds_rec_unlink, ul_fsgid);
-        CHECK_MEMBER(mds_rec_unlink, ul_cap);
-        CHECK_MEMBER(mds_rec_unlink, ul_suppgid);
-        CHECK_MEMBER(mds_rec_unlink, ul_mode);
-        CHECK_MEMBER(mds_rec_unlink, ul_fid1);
-        CHECK_MEMBER(mds_rec_unlink, ul_fid2);
-        CHECK_MEMBER(mds_rec_unlink, ul_time);
-}
-
-static void
-check_mds_rec_rename(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_rename);
-        CHECK_MEMBER(mds_rec_rename, rn_opcode);
-        CHECK_MEMBER(mds_rec_rename, rn_fsuid);
-        CHECK_MEMBER(mds_rec_rename, rn_fsgid);
-        CHECK_MEMBER(mds_rec_rename, rn_cap);
-        CHECK_MEMBER(mds_rec_rename, rn_suppgid1);
-        CHECK_MEMBER(mds_rec_rename, rn_suppgid2);
-        CHECK_MEMBER(mds_rec_rename, rn_fid1);
-        CHECK_MEMBER(mds_rec_rename, rn_fid2);
-        CHECK_MEMBER(mds_rec_rename, rn_time);
-}
-
-static void
-check_mds_rec_join(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_rec_join);
-        CHECK_MEMBER(mds_rec_join, jr_fid);
-        CHECK_MEMBER(mds_rec_join, jr_headsize);
-}
-
-static void
-check_lov_desc(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lov_desc);
-        CHECK_MEMBER(lov_desc, ld_tgt_count);
-        CHECK_MEMBER(lov_desc, ld_active_tgt_count);
-        CHECK_MEMBER(lov_desc, ld_default_stripe_count);
-        CHECK_MEMBER(lov_desc, ld_pattern);
-        CHECK_MEMBER(lov_desc, ld_default_stripe_size);
-        CHECK_MEMBER(lov_desc, ld_default_stripe_offset);
-        CHECK_MEMBER(lov_desc, ld_qos_maxage);
-        CHECK_MEMBER(lov_desc, ld_padding_1);
-        CHECK_MEMBER(lov_desc, ld_padding_2);
-        CHECK_MEMBER(lov_desc, ld_uuid);
-}
-
-static void
-check_ldlm_res_id(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_res_id);
-        CHECK_MEMBER(ldlm_res_id, name[RES_NAME_SIZE]);
-}
-
-static void
-check_ldlm_extent(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_extent);
-        CHECK_MEMBER(ldlm_extent, start);
-        CHECK_MEMBER(ldlm_extent, end);
-        CHECK_MEMBER(ldlm_extent, gid);
-}
-
-static void
-check_ldlm_inodebits(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_inodebits);
-        CHECK_MEMBER(ldlm_inodebits, bits);
-}
-
-static void
-check_ldlm_flock(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_flock);
-        CHECK_MEMBER(ldlm_flock, start);
-        CHECK_MEMBER(ldlm_flock, end);
-        CHECK_MEMBER(ldlm_flock, blocking_pid);
-        CHECK_MEMBER(ldlm_flock, pid);
-}
-
-static void
-check_ldlm_intent(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_intent);
-        CHECK_MEMBER(ldlm_intent, opc);
-}
-
-static void
-check_ldlm_resource_desc(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_resource_desc);
-        CHECK_MEMBER(ldlm_resource_desc, lr_type);
-        CHECK_MEMBER(ldlm_resource_desc, lr_padding);
-        CHECK_MEMBER(ldlm_resource_desc, lr_name);
-}
-
-static void
-check_ldlm_lock_desc(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_lock_desc);
-        CHECK_MEMBER(ldlm_lock_desc, l_resource);
-        CHECK_MEMBER(ldlm_lock_desc, l_req_mode);
-        CHECK_MEMBER(ldlm_lock_desc, l_granted_mode);
-        CHECK_MEMBER(ldlm_lock_desc, l_policy_data);
-}
-
-static void
-check_ldlm_request(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_request);
-        CHECK_MEMBER(ldlm_request, lock_flags);
-        CHECK_MEMBER(ldlm_request, lock_count);
-        CHECK_MEMBER(ldlm_request, lock_desc);
-        CHECK_MEMBER(ldlm_request, lock_handle);
-}
-
-static void
-check_ldlm_reply(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ldlm_reply);
-        CHECK_MEMBER(ldlm_reply, lock_flags);
-        CHECK_MEMBER(ldlm_reply, lock_padding);
-        CHECK_MEMBER(ldlm_reply, lock_desc);
-        CHECK_MEMBER(ldlm_reply, lock_handle);
-        CHECK_MEMBER(ldlm_reply, lock_policy_res1);
-        CHECK_MEMBER(ldlm_reply, lock_policy_res2);
-}
-
-static void
-check_ldlm_lvb(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(ost_lvb);
-        CHECK_MEMBER(ost_lvb, lvb_size);
-        CHECK_MEMBER(ost_lvb, lvb_mtime);
-        CHECK_MEMBER(ost_lvb, lvb_atime);
-        CHECK_MEMBER(ost_lvb, lvb_ctime);
-        CHECK_MEMBER(ost_lvb, lvb_blocks);
-}
-
-
-static void
-check_llog_logid(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_logid);
-        CHECK_MEMBER(llog_logid, lgl_oid);
-        CHECK_MEMBER(llog_logid, lgl_ogr);
-        CHECK_MEMBER(llog_logid, lgl_ogen);
-
-        CHECK_CVALUE(OST_SZ_REC);
-        CHECK_CVALUE(OST_RAID1_REC);
-        CHECK_CVALUE(MDS_UNLINK_REC);
-        CHECK_CVALUE(MDS_SETATTR_REC);
-        CHECK_CVALUE(OBD_CFG_REC);
-        CHECK_CVALUE(PTL_CFG_REC);
-        CHECK_CVALUE(LLOG_GEN_REC);
-        CHECK_CVALUE(LLOG_JOIN_REC);
-        CHECK_CVALUE(LLOG_HDR_MAGIC);
-        CHECK_CVALUE(LLOG_LOGID_MAGIC);
-}
-
-static void
-check_llog_catid(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_catid);
-        CHECK_MEMBER(llog_catid, lci_logid);
-        CHECK_MEMBER(llog_catid, lci_padding1);
-        CHECK_MEMBER(llog_catid, lci_padding2);
-        CHECK_MEMBER(llog_catid, lci_padding3);
-}
-
-static void
-check_llog_rec_hdr(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_rec_hdr);
-        CHECK_MEMBER(llog_rec_hdr, lrh_len);
-        CHECK_MEMBER(llog_rec_hdr, lrh_index);
-        CHECK_MEMBER(llog_rec_hdr, lrh_type);
-        CHECK_MEMBER(llog_rec_hdr, padding);
-}
-
-static void
-check_llog_rec_tail(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_rec_tail);
-        CHECK_MEMBER(llog_rec_tail, lrt_len);
-        CHECK_MEMBER(llog_rec_tail, lrt_index);
-}
-
-static void
-check_llog_logid_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_logid_rec);
-        CHECK_MEMBER(llog_logid_rec, lid_hdr);
-        CHECK_MEMBER(llog_logid_rec, lid_id);
-        CHECK_MEMBER(llog_logid_rec, padding1);
-        CHECK_MEMBER(llog_logid_rec, padding2);
-        CHECK_MEMBER(llog_logid_rec, padding3);
-        CHECK_MEMBER(llog_logid_rec, padding4);
-        CHECK_MEMBER(llog_logid_rec, padding5);
-        CHECK_MEMBER(llog_logid_rec, lid_tail);
-}
-
-static void
-check_llog_create_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_create_rec);
-        CHECK_MEMBER(llog_create_rec, lcr_hdr);
-        CHECK_MEMBER(llog_create_rec, lcr_fid);
-        CHECK_MEMBER(llog_create_rec, lcr_oid);
-        CHECK_MEMBER(llog_create_rec, lcr_ogen);
-        CHECK_MEMBER(llog_create_rec, padding);
-}
-
-static void
-check_llog_orphan_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_orphan_rec);
-        CHECK_MEMBER(llog_orphan_rec, lor_hdr);
-        CHECK_MEMBER(llog_orphan_rec, lor_oid);
-        CHECK_MEMBER(llog_orphan_rec, lor_ogen);
-        CHECK_MEMBER(llog_orphan_rec, padding);
-        CHECK_MEMBER(llog_orphan_rec, lor_tail);
-}
-
-static void
-check_llog_unlink_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_unlink_rec);
-        CHECK_MEMBER(llog_unlink_rec, lur_hdr);
-        CHECK_MEMBER(llog_unlink_rec, lur_oid);
-        CHECK_MEMBER(llog_unlink_rec, lur_ogen);
-        CHECK_MEMBER(llog_unlink_rec, padding);
-        CHECK_MEMBER(llog_unlink_rec, lur_tail);
-}
-
-static void
-check_llog_setattr_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_setattr_rec);
-        CHECK_MEMBER(llog_setattr_rec, lsr_hdr);
-        CHECK_MEMBER(llog_setattr_rec, lsr_oid);
-        CHECK_MEMBER(llog_setattr_rec, lsr_ogen);
-        CHECK_MEMBER(llog_setattr_rec, lsr_uid);
-        CHECK_MEMBER(llog_setattr_rec, lsr_gid);
-        CHECK_MEMBER(llog_setattr_rec, padding);
-        CHECK_MEMBER(llog_setattr_rec, lsr_tail);
-}
-
-static void
-check_llog_size_change_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_size_change_rec);
-        CHECK_MEMBER(llog_size_change_rec, lsc_hdr);
-        CHECK_MEMBER(llog_size_change_rec, lsc_fid);
-        CHECK_MEMBER(llog_size_change_rec, lsc_io_epoch);
-        CHECK_MEMBER(llog_size_change_rec, padding);
-        CHECK_MEMBER(llog_size_change_rec, lsc_tail);
-}
-
-static void
-check_llog_gen(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_gen);
-        CHECK_MEMBER(llog_gen, mnt_cnt);
-        CHECK_MEMBER(llog_gen, conn_cnt);
-}
-
-static void
-check_llog_gen_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_gen_rec);
-        CHECK_MEMBER(llog_gen_rec, lgr_hdr);
-        CHECK_MEMBER(llog_gen_rec, lgr_gen);
-        CHECK_MEMBER(llog_gen_rec, lgr_tail);
-}
-
-static void
-check_llog_log_hdr(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_log_hdr);
-        CHECK_MEMBER(llog_log_hdr, llh_hdr);
-        CHECK_MEMBER(llog_log_hdr, llh_timestamp);
-        CHECK_MEMBER(llog_log_hdr, llh_count);
-        CHECK_MEMBER(llog_log_hdr, llh_bitmap_offset);
-        CHECK_MEMBER(llog_log_hdr, llh_size);
-        CHECK_MEMBER(llog_log_hdr, llh_flags);
-        CHECK_MEMBER(llog_log_hdr, llh_cat_idx);
-        CHECK_MEMBER(llog_log_hdr, llh_tgtuuid);
-        CHECK_MEMBER(llog_log_hdr, llh_reserved);
-        CHECK_MEMBER(llog_log_hdr, llh_bitmap);
-        CHECK_MEMBER(llog_log_hdr, llh_tail);
-}
-
-static void
-check_llog_cookie(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_cookie);
-        CHECK_MEMBER(llog_cookie, lgc_lgl);
-        CHECK_MEMBER(llog_cookie, lgc_subsys);
-        CHECK_MEMBER(llog_cookie, lgc_index);
-        CHECK_MEMBER(llog_cookie, lgc_padding);
-}
-
-static void
-check_llogd_body(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llogd_body);
-        CHECK_MEMBER(llogd_body, lgd_logid);
-        CHECK_MEMBER(llogd_body, lgd_ctxt_idx);
-        CHECK_MEMBER(llogd_body, lgd_llh_flags);
-        CHECK_MEMBER(llogd_body, lgd_index);
-        CHECK_MEMBER(llogd_body, lgd_saved_index);
-        CHECK_MEMBER(llogd_body, lgd_len);
-        CHECK_MEMBER(llogd_body, lgd_cur_offset);
-
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_CREATE);
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_NEXT_BLOCK);
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_READ_HEADER);
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_WRITE_REC);
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_CLOSE);
-        CHECK_CVALUE(LLOG_ORIGIN_CONNECT);
-        CHECK_CVALUE(LLOG_CATINFO);
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_PREV_BLOCK);
-        CHECK_CVALUE(LLOG_ORIGIN_HANDLE_DESTROY);
-}
-
-static void
-check_llogd_conn_body(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llogd_conn_body);
-        CHECK_MEMBER(llogd_conn_body, lgdc_gen);
-        CHECK_MEMBER(llogd_conn_body, lgdc_logid);
-        CHECK_MEMBER(llogd_conn_body, lgdc_ctxt_idx);
-}
-
-static void
-check_mds_extent_desc(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mds_extent_desc);
-        CHECK_MEMBER(mds_extent_desc, med_start);
-        CHECK_MEMBER(mds_extent_desc, med_len);
-        CHECK_MEMBER(mds_extent_desc, med_lmm);
-}
-
-static void
-check_llog_array_rec(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(llog_array_rec);
-        CHECK_MEMBER(llog_array_rec, lmr_hdr);
-        CHECK_MEMBER(llog_array_rec, lmr_med);
-        CHECK_MEMBER(llog_array_rec, lmr_tail);
-}
-
-static void
-check_qunit_data(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(qunit_data);
-        CHECK_MEMBER(qunit_data, qd_id);
-        CHECK_MEMBER(qunit_data, qd_flags);
-        CHECK_MEMBER(qunit_data, qd_count);
-        CHECK_MEMBER(qunit_data, qd_qunit);
-        CHECK_MEMBER(qunit_data, padding );
-}
-
-static void
-check_qunit_data_old2(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(qunit_data_old2);
-        CHECK_MEMBER(qunit_data_old2, qd_id);
-        CHECK_MEMBER(qunit_data_old2, qd_flags);
-        CHECK_MEMBER(qunit_data_old2, qd_count);
-}
-
-static void
-check_qunit_data_old(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(qunit_data_old);
-        CHECK_MEMBER(qunit_data_old, qd_id);
-        CHECK_MEMBER(qunit_data_old, qd_type);
-        CHECK_MEMBER(qunit_data_old, qd_count);
-        CHECK_MEMBER(qunit_data_old, qd_isblk);
-}
-
-static void
-check_mgs_target_info(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(mgs_target_info);
-        CHECK_MEMBER(mgs_target_info, mti_lustre_ver);
-        CHECK_MEMBER(mgs_target_info, mti_stripe_index);
-        CHECK_MEMBER(mgs_target_info, mti_config_ver);
-        CHECK_MEMBER(mgs_target_info, mti_flags);
-        CHECK_MEMBER(mgs_target_info, mti_nid_count);
-        CHECK_MEMBER(mgs_target_info, mti_fsname);
-        CHECK_MEMBER(mgs_target_info, mti_svname);
-        CHECK_MEMBER(mgs_target_info, mti_uuid);
-        CHECK_MEMBER(mgs_target_info, mti_nids);
-        CHECK_MEMBER(mgs_target_info, mti_params);
-}
-
-static void
-check_lustre_disk_data(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(lustre_disk_data);
-        CHECK_MEMBER(lustre_disk_data, ldd_magic);
-        CHECK_MEMBER(lustre_disk_data, ldd_feature_compat);
-        CHECK_MEMBER(lustre_disk_data, ldd_feature_rocompat);
-        CHECK_MEMBER(lustre_disk_data, ldd_feature_incompat);
-        CHECK_MEMBER(lustre_disk_data, ldd_config_ver);
-        CHECK_MEMBER(lustre_disk_data, ldd_flags);
-        CHECK_MEMBER(lustre_disk_data, ldd_svindex);
-        CHECK_MEMBER(lustre_disk_data, ldd_mount_type);
-        CHECK_MEMBER(lustre_disk_data, ldd_fsname);
-        CHECK_MEMBER(lustre_disk_data, ldd_svname);
-        CHECK_MEMBER(lustre_disk_data, ldd_uuid);
-        CHECK_MEMBER(lustre_disk_data, ldd_userdata);
-        CHECK_MEMBER(lustre_disk_data, ldd_mount_opts);
-        CHECK_MEMBER(lustre_disk_data, ldd_params);
-}
-
-#ifdef LIBLUSTRE_POSIX_ACL
-static void
-check_posix_acl_xattr_entry(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT_TYPEDEF(posix_acl_xattr_entry);
-        CHECK_MEMBER_TYPEDEF(posix_acl_xattr_entry, e_tag);
-        CHECK_MEMBER_TYPEDEF(posix_acl_xattr_entry, e_perm);
-        CHECK_MEMBER_TYPEDEF(posix_acl_xattr_entry, e_id);
-}
-
-static void
-check_posix_acl_xattr_header(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT_TYPEDEF(posix_acl_xattr_header);
-        CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_version);
-        CHECK_MEMBER_TYPEDEF(posix_acl_xattr_header, a_entries);
-}
-#endif
-
-static void
-check_quota_adjust_qunit(void)
-{
-        BLANK_LINE();
-        CHECK_STRUCT(quota_adjust_qunit);
-        CHECK_MEMBER(quota_adjust_qunit, qaq_flags);
-        CHECK_MEMBER(quota_adjust_qunit, qaq_id);
-        CHECK_MEMBER(quota_adjust_qunit, qaq_bunit_sz);
-        CHECK_MEMBER(quota_adjust_qunit, qaq_iunit_sz);
-}
-
-static void
-system_string (char *cmdline, char *str, int len)
-{
-        int   fds[2];
-        int   rc;
-        pid_t pid;
-
-        rc = pipe(fds);
-        if (rc != 0)
-                abort();
-
-        pid = fork();
-        if (pid == 0) {
-                /* child */
-                int   fd = fileno(stdout);
-
-                rc = dup2(fds[1], fd);
-                if (rc != fd)
-                        abort();
-
-                exit(system(cmdline));
-                /* notreached */
-        } else if ((int)pid < 0) {
-                abort();
-        } else {
-                FILE *f = fdopen(fds[0], "r");
-
-                if (f == NULL)
-                        abort();
-
-                close(fds[1]);
-
-                if (fgets(str, len, f) == NULL)
-                        abort();
-
-                if (waitpid(pid, &rc, 0) != pid)
-                        abort();
-
-                if (!WIFEXITED(rc) || WEXITSTATUS(rc) != 0)
-                        abort();
-
-                if (strnlen(str, len) == len)
-                        str[len - 1] = 0;
-
-                if (str[strlen(str) - 1] == '\n')
-                        str[strlen(str) - 1] = 0;
-
-                fclose(f);
-        }
-}
-
-int
-main(int argc, char **argv)
-{
-        char unameinfo[80];
-        char gccinfo[80];
-
-        system_string("uname -a", unameinfo, sizeof(unameinfo));
-        system_string(CC " -v 2>&1 | tail -1", gccinfo, sizeof(gccinfo));
-
-        printf ("void lustre_assert_wire_constants(void)\n"
-                "{\n"
-                "        /* Wire protocol assertions generated by 'wirecheck'\n"
-                "         * (make -C lustre/utils newwiretest)\n"
-                "         * running on %s\n"
-                "         * with %s */\n"
-                "\n", unameinfo, gccinfo);
-
-        BLANK_LINE ();
-
-        COMMENT("Constants...");
-        CHECK_DEFINE(LUSTRE_MSG_MAGIC_V1);
-        CHECK_DEFINE(LUSTRE_MSG_MAGIC_V2);
-        CHECK_DEFINE(PTLRPC_MSG_VERSION);
-        CHECK_VALUE(MSGHDR_AT_SUPPORT);
-
-        CHECK_VALUE(PTL_RPC_MSG_REQUEST);
-        CHECK_VALUE(PTL_RPC_MSG_ERR);
-        CHECK_VALUE(PTL_RPC_MSG_REPLY);
-
-        CHECK_VALUE(MSG_LAST_REPLAY);
-        CHECK_VALUE(MSG_RESENT);
-        CHECK_VALUE(MSG_REPLAY);
-
-        CHECK_VALUE(MSG_CONNECT_RECOVERING);
-        CHECK_VALUE(MSG_CONNECT_RECONNECT);
-        CHECK_VALUE(MSG_CONNECT_REPLAYABLE);
-
-        CHECK_VALUE(OST_REPLY);
-        CHECK_VALUE(OST_GETATTR);
-        CHECK_VALUE(OST_SETATTR);
-        CHECK_VALUE(OST_READ);
-        CHECK_VALUE(OST_WRITE);
-        CHECK_VALUE(OST_CREATE);
-        CHECK_VALUE(OST_DESTROY);
-        CHECK_VALUE(OST_GET_INFO);
-        CHECK_VALUE(OST_CONNECT);
-        CHECK_VALUE(OST_DISCONNECT);
-        CHECK_VALUE(OST_PUNCH);
-        CHECK_VALUE(OST_OPEN);
-        CHECK_VALUE(OST_CLOSE);
-        CHECK_VALUE(OST_STATFS);
-        CHECK_VALUE(OST_SYNC);
-        CHECK_VALUE(OST_QUOTACHECK);
-        CHECK_VALUE(OST_QUOTACTL);
-        CHECK_VALUE(OST_QUOTA_ADJUST_QUNIT);
-        CHECK_VALUE(OST_LAST_OPC);
-
-        CHECK_DEFINE(OBD_OBJECT_EOF);
-
-        CHECK_VALUE(MDS_GETATTR);
-        CHECK_VALUE(MDS_GETATTR_NAME);
-        CHECK_VALUE(MDS_CLOSE);
-        CHECK_VALUE(MDS_REINT);
-        CHECK_VALUE(MDS_READPAGE);
-        CHECK_VALUE(MDS_CONNECT);
-        CHECK_VALUE(MDS_DISCONNECT);
-        CHECK_VALUE(MDS_GETSTATUS);
-        CHECK_VALUE(MDS_STATFS);
-        CHECK_VALUE(MDS_PIN);
-        CHECK_VALUE(MDS_UNPIN);
-        CHECK_VALUE(MDS_SYNC);
-        CHECK_VALUE(MDS_DONE_WRITING);
-        CHECK_VALUE(MDS_SET_INFO);
-        CHECK_VALUE(MDS_QUOTACHECK);
-        CHECK_VALUE(MDS_QUOTACTL);
-        CHECK_VALUE(MDS_LAST_OPC);
-
-        CHECK_VALUE(REINT_SETATTR);
-        CHECK_VALUE(REINT_CREATE);
-        CHECK_VALUE(REINT_LINK);
-        CHECK_VALUE(REINT_UNLINK);
-        CHECK_VALUE(REINT_RENAME);
-        CHECK_VALUE(REINT_OPEN);
-        CHECK_VALUE(REINT_MAX);
-
-        CHECK_VALUE(MGS_CONNECT);
-        CHECK_VALUE(MGS_DISCONNECT);
-        CHECK_VALUE(MGS_EXCEPTION);
-        CHECK_VALUE(MGS_TARGET_REG);
-        CHECK_VALUE(MGS_TARGET_DEL);
-        CHECK_VALUE(MGS_SET_INFO);
-
-        CHECK_VALUE(DISP_IT_EXECD);
-        CHECK_VALUE(DISP_LOOKUP_EXECD);
-        CHECK_VALUE(DISP_LOOKUP_NEG);
-        CHECK_VALUE(DISP_LOOKUP_POS);
-        CHECK_VALUE(DISP_OPEN_CREATE);
-        CHECK_VALUE(DISP_OPEN_OPEN);
-
-        CHECK_VALUE(MDS_STATUS_CONN);
-        CHECK_VALUE(MDS_STATUS_LOV);
-
-        CHECK_VALUE(LDLM_ENQUEUE);
-        CHECK_VALUE(LDLM_CONVERT);
-        CHECK_VALUE(LDLM_CANCEL);
-        CHECK_VALUE(LDLM_BL_CALLBACK);
-        CHECK_VALUE(LDLM_CP_CALLBACK);
-        CHECK_VALUE(LDLM_GL_CALLBACK);
-        CHECK_VALUE(LDLM_LAST_OPC);
-
-        CHECK_VALUE(LCK_EX);
-        CHECK_VALUE(LCK_PW);
-        CHECK_VALUE(LCK_PR);
-        CHECK_VALUE(LCK_CW);
-        CHECK_VALUE(LCK_CR);
-        CHECK_VALUE(LCK_NL);
-        CHECK_VALUE(LCK_GROUP);
-        CHECK_VALUE(LCK_MAXMODE);
-        CHECK_VALUE(LCK_MODE_NUM);
-
-        CHECK_CVALUE(LDLM_PLAIN);
-        CHECK_CVALUE(LDLM_EXTENT);
-        CHECK_CVALUE(LDLM_FLOCK);
-        CHECK_CVALUE(LDLM_IBITS);
-
-        CHECK_VALUE(OBD_PING);
-        CHECK_VALUE(OBD_LOG_CANCEL);
-        CHECK_VALUE(OBD_QC_CALLBACK);
-        CHECK_VALUE(OBD_LAST_OPC);
-
-        CHECK_VALUE(QUOTA_DQACQ);
-        CHECK_VALUE(QUOTA_DQREL);
-
-        CHECK_VALUE(MGS_CONNECT);
-        CHECK_VALUE(MGS_DISCONNECT);
-        CHECK_VALUE(MGS_EXCEPTION);   
-        CHECK_VALUE(MGS_TARGET_REG);
-        CHECK_VALUE(MGS_TARGET_DEL);
-        CHECK_VALUE(MGS_SET_INFO);
-
-        COMMENT("Sizes and Offsets");
-        BLANK_LINE();
-        CHECK_STRUCT(obd_uuid);
-        check_lustre_handle();
-        check_lustre_msg_v1();
-        check_lustre_msg_v2();
-        printf("        LASSERT(offsetof(struct lustre_msg_v1, lm_magic) == "
-               "offsetof(struct lustre_msg_v2, lm_magic));\n");
-        check_ptlrpc_body();
-        check_obd_connect_data();
-        check_obdo();
-        check_lov_mds_md_v1();
-        check_lov_mds_md_join();
-        check_obd_statfs();
-        check_obd_ioobj();
-        check_obd_quotactl();
-        check_niobuf_remote();
-        check_ost_body();
-        check_ll_fid();
-        check_mds_status_req();
-        check_mds_body();
-        check_mds_rec_setattr();
-        check_mds_rec_create();
-        check_mds_rec_link();
-        check_mds_rec_unlink();
-        check_mds_rec_rename();
-        check_mds_rec_join();
-        check_lov_desc();
-        check_ldlm_res_id();
-        check_ldlm_extent();
-        check_ldlm_flock();
-        check_ldlm_inodebits();
-        check_ldlm_intent();
-        check_ldlm_resource_desc();
-        check_ldlm_lock_desc();
-        check_ldlm_request();
-        check_ldlm_reply();
-        check_ldlm_lvb();
-        check_llog_logid();
-        check_llog_catid();
-        check_llog_rec_hdr();
-        check_llog_rec_tail();
-        check_llog_logid_rec();
-        check_llog_create_rec();
-        check_llog_orphan_rec();
-        check_llog_unlink_rec();
-        check_llog_setattr_rec();
-        check_llog_size_change_rec();
-        check_llog_gen();
-        check_llog_gen_rec();
-        check_llog_log_hdr();
-        check_llog_cookie();
-        check_llogd_body();
-        check_llogd_conn_body();
-        check_llog_array_rec();
-        check_mds_extent_desc();
-        check_qunit_data();
-        check_qunit_data_old2();
-        check_qunit_data_old();
-        check_quota_adjust_qunit();
-        check_mgs_target_info();
-        check_lustre_disk_data();
-        printf("#ifdef LIBLUSTRE_POSIX_ACL\n");
-        check_posix_acl_xattr_entry();
-        check_posix_acl_xattr_header();
-        printf("#endif\n");
-
-
-        printf("}\n\n");
-
-        return(0);
-}
diff --git a/lustre/utils/wirehdr.c b/lustre/utils/wirehdr.c
deleted file mode 100644
index a0592d169e37c9534f3336da1059fc26d183f3ce..0000000000000000000000000000000000000000
--- a/lustre/utils/wirehdr.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <stdio.h>
-#include <liblustre.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_disk.h>
-
-#undef LASSERT
-#undef LASSERTF
-#define CLASSERT(cond) ({ switch(42) { case (cond): case 0: break; } })
-#define LASSERT(cond) if (!(cond)) { printf("failed " #cond "\n"); ret = 1; }
-#define LASSERTF(cond, fmt, arg) if (!(cond)) { printf("failed '" #cond "'" fmt, arg);ret = 1;}
-
-int ret;
-
-void lustre_assert_wire_constants(void);
-
-int main()
-{
-        lustre_assert_wire_constants();
-
-        if (ret == 0)
-                printf("wire constants OK\n");
-
-        return ret;
-}
-
diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c
deleted file mode 100644
index 7558b47bb1d4f457a542ed87a0bed875ecc28457..0000000000000000000000000000000000000000
--- a/lustre/utils/wiretest.c
+++ /dev/null
@@ -1,2232 +0,0 @@
-#include <stdio.h>
-#include <liblustre.h>
-#include <lustre_lib.h>
-#include <lustre/lustre_idl.h>
-#include <lustre_disk.h>
-
-#undef LASSERT
-#undef LASSERTF
-#define CLASSERT(cond) ({ switch(42) { case (cond): case 0: break; } })
-#define LASSERT(cond) if (!(cond)) { printf("failed " #cond "\n"); ret = 1; }
-#define LASSERTF(cond, fmt, arg) if (!(cond)) { printf("failed '" #cond "'" fmt, arg);ret = 1;}
-
-int ret;
-
-void lustre_assert_wire_constants(void);
-
-int main()
-{
-        lustre_assert_wire_constants();
-
-        if (ret == 0)
-                printf("wire constants OK\n");
-
-        return ret;
-}
-
-void lustre_assert_wire_constants(void)
-{
-        /* Wire protocol assertions generated by 'wirecheck'
-         * (make -C lustre/utils newwiretest)
-         * running on Linux xlab.hostel 2.6.23.12-52.fc7 #1 SMP Tue Dec 18 21:18:02 EST 2007 i686 i68
-         * with gcc version 3.4.6 20060404 (Red Hat 3.4.6-7) */
-
-
-        /* Constants... */
-        LASSERTF(LUSTRE_MSG_MAGIC_V1 == 0x0BD00BD0," found %lld\n",
-                 (long long)LUSTRE_MSG_MAGIC_V1);
-        LASSERTF(LUSTRE_MSG_MAGIC_V2 == 0x0BD00BD3," found %lld\n",
-                 (long long)LUSTRE_MSG_MAGIC_V2);
-        LASSERTF(PTLRPC_MSG_VERSION == 0x00000003," found %lld\n",
-                 (long long)PTLRPC_MSG_VERSION);
-        LASSERTF(MSGHDR_AT_SUPPORT == 1, " found %lld\n",
-                 (long long)MSGHDR_AT_SUPPORT);
-        LASSERTF(PTL_RPC_MSG_REQUEST == 4711, " found %lld\n",
-                 (long long)PTL_RPC_MSG_REQUEST);
-        LASSERTF(PTL_RPC_MSG_ERR == 4712, " found %lld\n",
-                 (long long)PTL_RPC_MSG_ERR);
-        LASSERTF(PTL_RPC_MSG_REPLY == 4713, " found %lld\n",
-                 (long long)PTL_RPC_MSG_REPLY);
-        LASSERTF(MSG_LAST_REPLAY == 1, " found %lld\n",
-                 (long long)MSG_LAST_REPLAY);
-        LASSERTF(MSG_RESENT == 2, " found %lld\n",
-                 (long long)MSG_RESENT);
-        LASSERTF(MSG_REPLAY == 4, " found %lld\n",
-                 (long long)MSG_REPLAY);
-        LASSERTF(MSG_CONNECT_RECOVERING == 1, " found %lld\n",
-                 (long long)MSG_CONNECT_RECOVERING);
-        LASSERTF(MSG_CONNECT_RECONNECT == 2, " found %lld\n",
-                 (long long)MSG_CONNECT_RECONNECT);
-        LASSERTF(MSG_CONNECT_REPLAYABLE == 4, " found %lld\n",
-                 (long long)MSG_CONNECT_REPLAYABLE);
-        LASSERTF(OST_REPLY == 0, " found %lld\n",
-                 (long long)OST_REPLY);
-        LASSERTF(OST_GETATTR == 1, " found %lld\n",
-                 (long long)OST_GETATTR);
-        LASSERTF(OST_SETATTR == 2, " found %lld\n",
-                 (long long)OST_SETATTR);
-        LASSERTF(OST_READ == 3, " found %lld\n",
-                 (long long)OST_READ);
-        LASSERTF(OST_WRITE == 4, " found %lld\n",
-                 (long long)OST_WRITE);
-        LASSERTF(OST_CREATE == 5, " found %lld\n",
-                 (long long)OST_CREATE);
-        LASSERTF(OST_DESTROY == 6, " found %lld\n",
-                 (long long)OST_DESTROY);
-        LASSERTF(OST_GET_INFO == 7, " found %lld\n",
-                 (long long)OST_GET_INFO);
-        LASSERTF(OST_CONNECT == 8, " found %lld\n",
-                 (long long)OST_CONNECT);
-        LASSERTF(OST_DISCONNECT == 9, " found %lld\n",
-                 (long long)OST_DISCONNECT);
-        LASSERTF(OST_PUNCH == 10, " found %lld\n",
-                 (long long)OST_PUNCH);
-        LASSERTF(OST_OPEN == 11, " found %lld\n",
-                 (long long)OST_OPEN);
-        LASSERTF(OST_CLOSE == 12, " found %lld\n",
-                 (long long)OST_CLOSE);
-        LASSERTF(OST_STATFS == 13, " found %lld\n",
-                 (long long)OST_STATFS);
-        LASSERTF(OST_SYNC == 16, " found %lld\n",
-                 (long long)OST_SYNC);
-        LASSERTF(OST_QUOTACHECK == 18, " found %lld\n",
-                 (long long)OST_QUOTACHECK);
-        LASSERTF(OST_QUOTACTL == 19, " found %lld\n",
-                 (long long)OST_QUOTACTL);
-        LASSERTF(OST_QUOTA_ADJUST_QUNIT == 20, " found %lld\n",
-                 (long long)OST_QUOTA_ADJUST_QUNIT);
-        LASSERTF(OST_LAST_OPC == 21, " found %lld\n",
-                 (long long)OST_LAST_OPC);
-        LASSERTF(OBD_OBJECT_EOF == 0xffffffffffffffffULL," found %lld\n",
-                 (long long)OBD_OBJECT_EOF);
-        LASSERTF(MDS_GETATTR == 33, " found %lld\n",
-                 (long long)MDS_GETATTR);
-        LASSERTF(MDS_GETATTR_NAME == 34, " found %lld\n",
-                 (long long)MDS_GETATTR_NAME);
-        LASSERTF(MDS_CLOSE == 35, " found %lld\n",
-                 (long long)MDS_CLOSE);
-        LASSERTF(MDS_REINT == 36, " found %lld\n",
-                 (long long)MDS_REINT);
-        LASSERTF(MDS_READPAGE == 37, " found %lld\n",
-                 (long long)MDS_READPAGE);
-        LASSERTF(MDS_CONNECT == 38, " found %lld\n",
-                 (long long)MDS_CONNECT);
-        LASSERTF(MDS_DISCONNECT == 39, " found %lld\n",
-                 (long long)MDS_DISCONNECT);
-        LASSERTF(MDS_GETSTATUS == 40, " found %lld\n",
-                 (long long)MDS_GETSTATUS);
-        LASSERTF(MDS_STATFS == 41, " found %lld\n",
-                 (long long)MDS_STATFS);
-        LASSERTF(MDS_PIN == 42, " found %lld\n",
-                 (long long)MDS_PIN);
-        LASSERTF(MDS_UNPIN == 43, " found %lld\n",
-                 (long long)MDS_UNPIN);
-        LASSERTF(MDS_SYNC == 44, " found %lld\n",
-                 (long long)MDS_SYNC);
-        LASSERTF(MDS_DONE_WRITING == 45, " found %lld\n",
-                 (long long)MDS_DONE_WRITING);
-        LASSERTF(MDS_SET_INFO == 46, " found %lld\n",
-                 (long long)MDS_SET_INFO);
-        LASSERTF(MDS_QUOTACHECK == 47, " found %lld\n",
-                 (long long)MDS_QUOTACHECK);
-        LASSERTF(MDS_QUOTACTL == 48, " found %lld\n",
-                 (long long)MDS_QUOTACTL);
-        LASSERTF(MDS_LAST_OPC == 51, " found %lld\n",
-                 (long long)MDS_LAST_OPC);
-        LASSERTF(REINT_SETATTR == 1, " found %lld\n",
-                 (long long)REINT_SETATTR);
-        LASSERTF(REINT_CREATE == 2, " found %lld\n",
-                 (long long)REINT_CREATE);
-        LASSERTF(REINT_LINK == 3, " found %lld\n",
-                 (long long)REINT_LINK);
-        LASSERTF(REINT_UNLINK == 4, " found %lld\n",
-                 (long long)REINT_UNLINK);
-        LASSERTF(REINT_RENAME == 5, " found %lld\n",
-                 (long long)REINT_RENAME);
-        LASSERTF(REINT_OPEN == 6, " found %lld\n",
-                 (long long)REINT_OPEN);
-        LASSERTF(REINT_MAX == 7, " found %lld\n",
-                 (long long)REINT_MAX);
-        LASSERTF(MGS_CONNECT == 250, " found %lld\n",
-                 (long long)MGS_CONNECT);
-        LASSERTF(MGS_DISCONNECT == 251, " found %lld\n",
-                 (long long)MGS_DISCONNECT);
-        LASSERTF(MGS_EXCEPTION == 252, " found %lld\n",
-                 (long long)MGS_EXCEPTION);
-        LASSERTF(MGS_TARGET_REG == 253, " found %lld\n",
-                 (long long)MGS_TARGET_REG);
-        LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
-                 (long long)MGS_TARGET_DEL);
-        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",
-                 (long long)MGS_SET_INFO);
-        LASSERTF(DISP_IT_EXECD == 1, " found %lld\n",
-                 (long long)DISP_IT_EXECD);
-        LASSERTF(DISP_LOOKUP_EXECD == 2, " found %lld\n",
-                 (long long)DISP_LOOKUP_EXECD);
-        LASSERTF(DISP_LOOKUP_NEG == 4, " found %lld\n",
-                 (long long)DISP_LOOKUP_NEG);
-        LASSERTF(DISP_LOOKUP_POS == 8, " found %lld\n",
-                 (long long)DISP_LOOKUP_POS);
-        LASSERTF(DISP_OPEN_CREATE == 16, " found %lld\n",
-                 (long long)DISP_OPEN_CREATE);
-        LASSERTF(DISP_OPEN_OPEN == 32, " found %lld\n",
-                 (long long)DISP_OPEN_OPEN);
-        LASSERTF(MDS_STATUS_CONN == 1, " found %lld\n",
-                 (long long)MDS_STATUS_CONN);
-        LASSERTF(MDS_STATUS_LOV == 2, " found %lld\n",
-                 (long long)MDS_STATUS_LOV);
-        LASSERTF(LDLM_ENQUEUE == 101, " found %lld\n",
-                 (long long)LDLM_ENQUEUE);
-        LASSERTF(LDLM_CONVERT == 102, " found %lld\n",
-                 (long long)LDLM_CONVERT);
-        LASSERTF(LDLM_CANCEL == 103, " found %lld\n",
-                 (long long)LDLM_CANCEL);
-        LASSERTF(LDLM_BL_CALLBACK == 104, " found %lld\n",
-                 (long long)LDLM_BL_CALLBACK);
-        LASSERTF(LDLM_CP_CALLBACK == 105, " found %lld\n",
-                 (long long)LDLM_CP_CALLBACK);
-        LASSERTF(LDLM_GL_CALLBACK == 106, " found %lld\n",
-                 (long long)LDLM_GL_CALLBACK);
-        LASSERTF(LDLM_LAST_OPC == 107, " found %lld\n",
-                 (long long)LDLM_LAST_OPC);
-        LASSERTF(LCK_EX == 1, " found %lld\n",
-                 (long long)LCK_EX);
-        LASSERTF(LCK_PW == 2, " found %lld\n",
-                 (long long)LCK_PW);
-        LASSERTF(LCK_PR == 4, " found %lld\n",
-                 (long long)LCK_PR);
-        LASSERTF(LCK_CW == 8, " found %lld\n",
-                 (long long)LCK_CW);
-        LASSERTF(LCK_CR == 16, " found %lld\n",
-                 (long long)LCK_CR);
-        LASSERTF(LCK_NL == 32, " found %lld\n",
-                 (long long)LCK_NL);
-        LASSERTF(LCK_GROUP == 64, " found %lld\n",
-                 (long long)LCK_GROUP);
-        LASSERTF(LCK_MAXMODE == 65, " found %lld\n",
-                 (long long)LCK_MAXMODE);
-        LASSERTF(LCK_MODE_NUM == 7, " found %lld\n",
-                 (long long)LCK_MODE_NUM);
-        CLASSERT(LDLM_PLAIN == 10);
-        CLASSERT(LDLM_EXTENT == 11);
-        CLASSERT(LDLM_FLOCK == 12);
-        CLASSERT(LDLM_IBITS == 13);
-        LASSERTF(OBD_PING == 400, " found %lld\n",
-                 (long long)OBD_PING);
-        LASSERTF(OBD_LOG_CANCEL == 401, " found %lld\n",
-                 (long long)OBD_LOG_CANCEL);
-        LASSERTF(OBD_QC_CALLBACK == 402, " found %lld\n",
-                 (long long)OBD_QC_CALLBACK);
-        LASSERTF(OBD_LAST_OPC == 403, " found %lld\n",
-                 (long long)OBD_LAST_OPC);
-        LASSERTF(QUOTA_DQACQ == 601, " found %lld\n",
-                 (long long)QUOTA_DQACQ);
-        LASSERTF(QUOTA_DQREL == 602, " found %lld\n",
-                 (long long)QUOTA_DQREL);
-        LASSERTF(MGS_CONNECT == 250, " found %lld\n",
-                 (long long)MGS_CONNECT);
-        LASSERTF(MGS_DISCONNECT == 251, " found %lld\n",
-                 (long long)MGS_DISCONNECT);
-        LASSERTF(MGS_EXCEPTION == 252, " found %lld\n",
-                 (long long)MGS_EXCEPTION);
-        LASSERTF(MGS_TARGET_REG == 253, " found %lld\n",
-                 (long long)MGS_TARGET_REG);
-        LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",
-                 (long long)MGS_TARGET_DEL);
-        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",
-                 (long long)MGS_SET_INFO);
-        /* Sizes and Offsets */
-
-        /* Checks for struct obd_uuid */
-        LASSERTF((int)sizeof(struct obd_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_uuid));
-
-        /* Checks for struct lustre_handle */
-        LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_handle));
-        LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_handle, cookie));
-        LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));
-
-        /* Checks for struct lustre_msg_v1 */
-        LASSERTF((int)sizeof(struct lustre_msg_v1) == 64, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_msg_v1));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_handle) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_handle));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_magic) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_magic));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_type) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_type));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_type));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_version) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_version));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_version));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_opc) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_opc));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_xid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_last_xid));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_committed) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_last_committed));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_transno) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_transno));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_status) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_status));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_status) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_status));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_flags) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_flags));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_conn_cnt) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_conn_cnt));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_bufcount) == 60, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_bufcount));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount));
-        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_buflens[0]) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v1, lm_buflens[0]));
-        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]));
-
-        /* Checks for struct lustre_msg_v2 */
-        LASSERTF((int)sizeof(struct lustre_msg_v2) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_msg_v2));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_bufcount) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_bufcount));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_secflvr) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_secflvr));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_magic) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_magic));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_repsize) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_repsize));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_cksum) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_cksum));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_flags) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_flags));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_2) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_2));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_3) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_3));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3));
-        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_buflens[0]) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_msg_v2, lm_buflens[0]));
-        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]));
-        LASSERT(offsetof(struct lustre_msg_v1, lm_magic) == offsetof(struct lustre_msg_v2, lm_magic));
-
-        /* Checks for struct ptlrpc_body */
-        LASSERTF((int)sizeof(struct ptlrpc_body) == 88, " found %lld\n",
-                 (long long)(int)sizeof(struct ptlrpc_body));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_handle) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_handle));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_handle));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_type) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_type));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_type));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_version) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_version));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_version));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_opc) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_opc));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_opc) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_opc));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_status) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_status));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_status) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_status));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_xid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_xid));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_xid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_xid));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_seen) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_seen));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_seen) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_seen));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_committed) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_committed));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_committed) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_committed));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_transno) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_transno));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_transno) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_transno));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_flags) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_flags));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_flags));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_op_flags) == 60, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_op_flags));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_op_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_op_flags));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_conn_cnt) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_conn_cnt));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_conn_cnt) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_conn_cnt));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_timeout) == 68, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_timeout));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_timeout) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_timeout));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_service_time) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_service_time));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_service_time) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_service_time));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_slv) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_slv));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_slv) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_slv));
-        LASSERTF((int)offsetof(struct ptlrpc_body, pb_limit) == 76, " found %lld\n",
-                 (long long)(int)offsetof(struct ptlrpc_body, pb_limit));
-        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_limit) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_limit));
-
-        /* Checks for struct obd_connect_data */
-        LASSERTF((int)sizeof(struct obd_connect_data) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_connect_data));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_connect_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_connect_flags));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_connect_flags));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_version) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_version));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_version));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_grant) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_grant));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_grant) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_grant));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_index) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_index));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_index));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_brw_size) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_brw_size));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_brw_size) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_brw_size));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_ibits_known) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_ibits_known));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_ibits_known) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_ibits_known));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_nllu) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_nllu));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_nllu) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_nllu));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_nllg) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_nllg));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_nllg) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_nllg));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_transno) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_transno));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_transno) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_transno));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_group) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_group));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_group) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_group));
-        LASSERTF((int)offsetof(struct obd_connect_data, ocd_cksum_types) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, ocd_cksum_types));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->ocd_cksum_types));
-        LASSERTF((int)offsetof(struct obd_connect_data, padding1) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, padding1));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding1) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->padding1));
-        LASSERTF((int)offsetof(struct obd_connect_data, padding2) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_connect_data, padding2));
-        LASSERTF((int)sizeof(((struct obd_connect_data *)0)->padding2) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_connect_data *)0)->padding2));
-        CLASSERT(OBD_CONNECT_RDONLY == 0x1ULL);
-        CLASSERT(OBD_CONNECT_INDEX == 0x2ULL);
-        CLASSERT(OBD_CONNECT_GRANT == 0x8ULL);
-        CLASSERT(OBD_CONNECT_SRVLOCK == 0x10ULL);
-        CLASSERT(OBD_CONNECT_VERSION == 0x20ULL);
-        CLASSERT(OBD_CONNECT_REQPORTAL == 0x40ULL);
-        CLASSERT(OBD_CONNECT_ACL == 0x80ULL);
-        CLASSERT(OBD_CONNECT_XATTR == 0x100ULL);
-        CLASSERT(OBD_CONNECT_CROW == 0x200ULL);
-        CLASSERT(OBD_CONNECT_TRUNCLOCK == 0x400ULL);
-        CLASSERT(OBD_CONNECT_TRANSNO == 0x800ULL);
-        CLASSERT(OBD_CONNECT_IBITS == 0x1000ULL);
-        CLASSERT(OBD_CONNECT_JOIN == 0x2000ULL);
-        CLASSERT(OBD_CONNECT_ATTRFID == 0x4000ULL);
-        CLASSERT(OBD_CONNECT_NODEVOH == 0x8000ULL);
-        CLASSERT(OBD_CONNECT_LCL_CLIENT == 0x10000ULL);
-        CLASSERT(OBD_CONNECT_RMT_CLIENT == 0x20000ULL);
-        CLASSERT(OBD_CONNECT_BRW_SIZE == 0x40000ULL);
-        CLASSERT(OBD_CONNECT_QUOTA64 == 0x80000ULL);
-        CLASSERT(OBD_CONNECT_MDS_CAPA == 0x100000ULL);
-        CLASSERT(OBD_CONNECT_OSS_CAPA == 0x200000ULL);
-        CLASSERT(OBD_CONNECT_CANCELSET == 0x400000ULL);
-        CLASSERT(OBD_CONNECT_SOM == 0x00800000ULL);
-        CLASSERT(OBD_CONNECT_AT == 0x01000000ULL);
-        CLASSERT(OBD_CONNECT_LRU_RESIZE == 0x02000000ULL);
-        CLASSERT(OBD_CONNECT_MDS_MDS == 0x04000000ULL);
-        CLASSERT(OBD_CONNECT_REAL == 0x08000000ULL);
-        CLASSERT(OBD_CONNECT_CKSUM == 0x20000000ULL);
-
-        /* Checks for struct obdo */
-        LASSERTF((int)sizeof(struct obdo) == 208, " found %lld\n",
-                 (long long)(int)sizeof(struct obdo));
-        LASSERTF((int)offsetof(struct obdo, o_valid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_valid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_valid));
-        LASSERTF((int)offsetof(struct obdo, o_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_id));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_id));
-        LASSERTF((int)offsetof(struct obdo, o_gr) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_gr));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_gr));
-        LASSERTF((int)offsetof(struct obdo, o_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_fid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_fid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_fid));
-        LASSERTF((int)offsetof(struct obdo, o_size) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_size));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_size));
-        LASSERTF((int)offsetof(struct obdo, o_mtime) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_mtime));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_mtime));
-        LASSERTF((int)offsetof(struct obdo, o_atime) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_atime));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_atime));
-        LASSERTF((int)offsetof(struct obdo, o_ctime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_ctime));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_ctime));
-        LASSERTF((int)offsetof(struct obdo, o_blocks) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_blocks));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_blocks));
-        LASSERTF((int)offsetof(struct obdo, o_grant) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_grant));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_grant) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_grant));
-        LASSERTF((int)offsetof(struct obdo, o_blksize) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_blksize));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_blksize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_blksize));
-        LASSERTF((int)offsetof(struct obdo, o_mode) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_mode));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_mode));
-        LASSERTF((int)offsetof(struct obdo, o_uid) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_uid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_uid));
-        LASSERTF((int)offsetof(struct obdo, o_gid) == 92, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_gid));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_gid));
-        LASSERTF((int)offsetof(struct obdo, o_flags) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_flags));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_flags));
-        LASSERTF((int)offsetof(struct obdo, o_nlink) == 100, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_nlink));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_nlink) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_nlink));
-        LASSERTF((int)offsetof(struct obdo, o_generation) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_generation));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_generation) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_generation));
-        LASSERTF((int)offsetof(struct obdo, o_misc) == 108, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_misc));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_misc) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_misc));
-        LASSERTF((int)offsetof(struct obdo, o_easize) == 112, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_easize));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_easize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_easize));
-        LASSERTF((int)offsetof(struct obdo, o_mds) == 116, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_mds));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_mds) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_mds));
-        LASSERTF((int)offsetof(struct obdo, o_stripe_idx) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_stripe_idx));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_stripe_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_stripe_idx));
-        LASSERTF((int)offsetof(struct obdo, o_padding_1) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_padding_1));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_padding_1));
-        LASSERTF((int)offsetof(struct obdo, o_inline) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct obdo, o_inline));
-        LASSERTF((int)sizeof(((struct obdo *)0)->o_inline) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct obdo *)0)->o_inline));
-        LASSERTF(OBD_INLINESZ == 80, " found %lld\n",
-                 (long long)OBD_INLINESZ);
-        CLASSERT(OBD_MD_FLID == (0x00000001ULL));
-        CLASSERT(OBD_MD_FLATIME == (0x00000002ULL));
-        CLASSERT(OBD_MD_FLMTIME == (0x00000004ULL));
-        CLASSERT(OBD_MD_FLCTIME == (0x00000008ULL));
-        CLASSERT(OBD_MD_FLSIZE == (0x00000010ULL));
-        CLASSERT(OBD_MD_FLBLOCKS == (0x00000020ULL));
-        CLASSERT(OBD_MD_FLBLKSZ == (0x00000040ULL));
-        CLASSERT(OBD_MD_FLMODE == (0x00000080ULL));
-        CLASSERT(OBD_MD_FLTYPE == (0x00000100ULL));
-        CLASSERT(OBD_MD_FLUID == (0x00000200ULL));
-        CLASSERT(OBD_MD_FLGID == (0x00000400ULL));
-        CLASSERT(OBD_MD_FLFLAGS == (0x00000800ULL));
-        CLASSERT(OBD_MD_FLNLINK == (0x00002000ULL));
-        CLASSERT(OBD_MD_FLGENER == (0x00004000ULL));
-        CLASSERT(OBD_MD_FLINLINE == (0x00008000ULL));
-        CLASSERT(OBD_MD_FLRDEV == (0x00010000ULL));
-        CLASSERT(OBD_MD_FLEASIZE == (0x00020000ULL));
-        CLASSERT(OBD_MD_LINKNAME == (0x00040000ULL));
-        CLASSERT(OBD_MD_FLHANDLE == (0x00080000ULL));
-        CLASSERT(OBD_MD_FLCKSUM == (0x00100000ULL));
-        CLASSERT(OBD_MD_FLQOS == (0x00200000ULL));
-        CLASSERT(OBD_MD_FLCOOKIE == (0x00800000ULL));
-        CLASSERT(OBD_MD_FLGROUP == (0x01000000ULL));
-        CLASSERT(OBD_MD_FLFID == (0x02000000ULL));
-        CLASSERT(OBD_MD_FLEPOCH == (0x04000000ULL));
-        CLASSERT(OBD_MD_FLGRANT == (0x08000000ULL));
-        CLASSERT(OBD_MD_FLDIREA == (0x10000000ULL));
-        CLASSERT(OBD_MD_FLUSRQUOTA == (0x20000000ULL));
-        CLASSERT(OBD_MD_FLGRPQUOTA == (0x40000000ULL));
-        CLASSERT(OBD_MD_FLMODEASIZE == (0x80000000ULL));
-        CLASSERT(OBD_MD_MDS == (0x0000000100000000ULL));
-        CLASSERT(OBD_MD_REINT == (0x0000000200000000ULL));
-        CLASSERT(OBD_MD_FLXATTR == (0x0000001000000000ULL));
-        CLASSERT(OBD_MD_FLXATTRLS == (0x0000002000000000ULL));
-        CLASSERT(OBD_MD_FLXATTRRM == (0x0000004000000000ULL));
-        CLASSERT(OBD_MD_FLACL == (0x0000008000000000ULL));
-        CLASSERT(OBD_FL_INLINEDATA == (0x00000001));
-        CLASSERT(OBD_FL_OBDMDEXISTS == (0x00000002));
-        CLASSERT(OBD_FL_DELORPHAN == (0x00000004));
-        CLASSERT(OBD_FL_NORPC == (0x00000008));
-        CLASSERT(OBD_FL_IDONLY == (0x00000010));
-        CLASSERT(OBD_FL_RECREATE_OBJS == (0x00000020));
-        CLASSERT(OBD_FL_DEBUG_CHECK == (0x00000040));
-        CLASSERT(OBD_FL_NO_USRQUOTA == (0x00000100));
-        CLASSERT(OBD_FL_NO_GRPQUOTA == (0x00000200));
-        CLASSERT(OBD_FL_CREATE_CROW == (0x00000400));
-        CLASSERT(OBD_FL_TRUNCLOCK == (0x00000800));
-        CLASSERT(OBD_FL_CKSUM_CRC32 == (0x00001000));
-        CLASSERT(OBD_FL_CKSUM_ADLER == (0x00002000));
-        CLASSERT(OBD_CKSUM_CRC32 == 1);
-        CLASSERT(OBD_CKSUM_ADLER == 2);
-
-        /* Checks for struct lov_mds_md_v1 */
-        LASSERTF((int)sizeof(struct lov_mds_md_v1) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_mds_md_v1));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_magic) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_magic));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_magic));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_pattern) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_pattern));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_pattern));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_id));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_id));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_object_gr) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_object_gr));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_object_gr));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_size) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_size));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_size));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_stripe_count) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_stripe_count));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_stripe_count));
-        LASSERTF((int)offsetof(struct lov_mds_md_v1, lmm_objects) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_v1, lmm_objects));
-        LASSERTF((int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects) == 0, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_v1 *)0)->lmm_objects));
-
-        /* Checks for struct lov_ost_data_v1 */
-        LASSERTF((int)sizeof(struct lov_ost_data_v1) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_ost_data_v1));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_object_id));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_id));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_object_gr) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_object_gr));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_object_gr));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_gen) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_gen));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_gen));
-        LASSERTF((int)offsetof(struct lov_ost_data_v1, l_ost_idx) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_ost_data_v1, l_ost_idx));
-        LASSERTF((int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_ost_data_v1 *)0)->l_ost_idx));
-        CLASSERT(LOV_MAGIC_V1 == 0x0BD10BD0);
-        CLASSERT(LOV_MAGIC_JOIN == 0x0BD20BD0);
-        LASSERTF(LOV_PATTERN_RAID0 == 1, " found %lld\n",
-                 (long long)LOV_PATTERN_RAID0);
-        LASSERTF(LOV_PATTERN_RAID1 == 2, " found %lld\n",
-                 (long long)LOV_PATTERN_RAID1);
-
-        /* Checks for struct lov_mds_md_join */
-        LASSERTF((int)sizeof(struct lov_mds_md_join) == 56, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_mds_md_join));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_md) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_md));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_md));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_array_id) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_array_id));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_array_id));
-        LASSERTF((int)offsetof(struct lov_mds_md_join, lmmj_extent_count) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_mds_md_join, lmmj_extent_count));
-        LASSERTF((int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_mds_md_join *)0)->lmmj_extent_count));
-
-        /* Checks for struct obd_statfs */
-        LASSERTF((int)sizeof(struct obd_statfs) == 144, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_statfs));
-        LASSERTF((int)offsetof(struct obd_statfs, os_type) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_type));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_type) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_type));
-        LASSERTF((int)offsetof(struct obd_statfs, os_blocks) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_blocks));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_blocks));
-        LASSERTF((int)offsetof(struct obd_statfs, os_bfree) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_bfree));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bfree) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bfree));
-        LASSERTF((int)offsetof(struct obd_statfs, os_bavail) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_bavail));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bavail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bavail));
-        LASSERTF((int)offsetof(struct obd_statfs, os_ffree) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_ffree));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_ffree) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_ffree));
-        LASSERTF((int)offsetof(struct obd_statfs, os_fsid) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_fsid));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_fsid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_fsid));
-        LASSERTF((int)offsetof(struct obd_statfs, os_bsize) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_bsize));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_bsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_bsize));
-        LASSERTF((int)offsetof(struct obd_statfs, os_namelen) == 92, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_namelen));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_namelen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_namelen));
-        LASSERTF((int)offsetof(struct obd_statfs, os_state) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_state));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_state) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_state));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare1) == 108, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare1));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare1));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare2) == 112, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare2));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare2));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare3) == 116, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare3));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare3));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare4) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare4));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare4) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare4));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare5) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare5));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare5) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare5));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare6) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare6));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare6) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare6));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare7) == 132, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare7));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare7) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare7));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare8) == 136, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare8));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare8) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare8));
-        LASSERTF((int)offsetof(struct obd_statfs, os_spare9) == 140, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_statfs, os_spare9));
-        LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare9) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_statfs *)0)->os_spare9));
-
-        /* Checks for struct obd_ioobj */
-        LASSERTF((int)sizeof(struct obd_ioobj) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_ioobj));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_id));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_id));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_gr) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_gr));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_gr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_gr));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_type) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_type));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_type));
-        LASSERTF((int)offsetof(struct obd_ioobj, ioo_bufcnt) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_ioobj, ioo_bufcnt));
-        LASSERTF((int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_ioobj *)0)->ioo_bufcnt));
-
-        /* Checks for struct obd_quotactl */
-        LASSERTF((int)sizeof(struct obd_quotactl) == 112, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_quotactl));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_cmd) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_cmd));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_cmd) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_cmd));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_type) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_type));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_type));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_id) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_id));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_id));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_stat) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_stat));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_stat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_stat));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_dqinfo) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_dqinfo));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo) == 24, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqinfo));
-        LASSERTF((int)offsetof(struct obd_quotactl, qc_dqblk) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_quotactl, qc_dqblk));
-        LASSERTF((int)sizeof(((struct obd_quotactl *)0)->qc_dqblk) == 72, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_quotactl *)0)->qc_dqblk));
-
-        /* Checks for struct obd_dqinfo */
-        LASSERTF((int)sizeof(struct obd_dqinfo) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_dqinfo));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_bgrace) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_bgrace));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_bgrace));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_igrace) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_igrace));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_igrace));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_flags) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_flags));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_flags));
-        LASSERTF((int)offsetof(struct obd_dqinfo, dqi_valid) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqinfo, dqi_valid));
-        LASSERTF((int)sizeof(((struct obd_dqinfo *)0)->dqi_valid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqinfo *)0)->dqi_valid));
-
-        /* Checks for struct obd_dqblk */
-        LASSERTF((int)sizeof(struct obd_dqblk) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct obd_dqblk));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_bhardlimit) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_bhardlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bhardlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_bsoftlimit) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_bsoftlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_bsoftlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_curspace) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_curspace));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curspace) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curspace));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_ihardlimit) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_ihardlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_ihardlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_isoftlimit) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_isoftlimit));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_isoftlimit));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_curinodes) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_curinodes));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_curinodes));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_btime) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_btime));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_btime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_btime));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_itime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_itime));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_itime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_itime));
-        LASSERTF((int)offsetof(struct obd_dqblk, dqb_valid) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, dqb_valid));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->dqb_valid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->dqb_valid));
-        LASSERTF((int)offsetof(struct obd_dqblk, padding) == 68, " found %lld\n",
-                 (long long)(int)offsetof(struct obd_dqblk, padding));
-        LASSERTF((int)sizeof(((struct obd_dqblk *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct obd_dqblk *)0)->padding));
-        LASSERTF(Q_QUOTACHECK == 0x800100," found %lld\n",
-                 (long long)Q_QUOTACHECK);
-        LASSERTF(Q_INITQUOTA == 0x800101," found %lld\n",
-                 (long long)Q_INITQUOTA);
-        LASSERTF(Q_GETOINFO == 0x800102," found %lld\n",
-                 (long long)Q_GETOINFO);
-        LASSERTF(Q_GETOQUOTA == 0x800103," found %lld\n",
-                 (long long)Q_GETOQUOTA);
-
-        /* Checks for struct niobuf_remote */
-        LASSERTF((int)sizeof(struct niobuf_remote) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct niobuf_remote));
-        LASSERTF((int)offsetof(struct niobuf_remote, offset) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct niobuf_remote, offset));
-        LASSERTF((int)sizeof(((struct niobuf_remote *)0)->offset) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct niobuf_remote *)0)->offset));
-        LASSERTF((int)offsetof(struct niobuf_remote, len) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct niobuf_remote, len));
-        LASSERTF((int)sizeof(((struct niobuf_remote *)0)->len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct niobuf_remote *)0)->len));
-        LASSERTF((int)offsetof(struct niobuf_remote, flags) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct niobuf_remote, flags));
-        LASSERTF((int)sizeof(((struct niobuf_remote *)0)->flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct niobuf_remote *)0)->flags));
-        LASSERTF(OBD_BRW_READ == 1, " found %lld\n",
-                 (long long)OBD_BRW_READ);
-        LASSERTF(OBD_BRW_WRITE == 2, " found %lld\n",
-                 (long long)OBD_BRW_WRITE);
-        LASSERTF(OBD_BRW_SYNC == 8, " found %lld\n",
-                 (long long)OBD_BRW_SYNC);
-        LASSERTF(OBD_BRW_FROM_GRANT == 32, " found %lld\n",
-                 (long long)OBD_BRW_FROM_GRANT);
-        LASSERTF(OBD_BRW_NOQUOTA == 256, " found %lld\n",
-                 (long long)OBD_BRW_NOQUOTA);
-
-        /* Checks for struct ost_body */
-        LASSERTF((int)sizeof(struct ost_body) == 208, " found %lld\n",
-                 (long long)(int)sizeof(struct ost_body));
-        LASSERTF((int)offsetof(struct ost_body, oa) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_body, oa));
-        LASSERTF((int)sizeof(((struct ost_body *)0)->oa) == 208, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_body *)0)->oa));
-
-        /* Checks for struct ll_fid */
-        LASSERTF((int)sizeof(struct ll_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct ll_fid));
-        LASSERTF((int)offsetof(struct ll_fid, id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ll_fid, id));
-        LASSERTF((int)sizeof(((struct ll_fid *)0)->id) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ll_fid *)0)->id));
-        LASSERTF((int)offsetof(struct ll_fid, generation) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ll_fid, generation));
-        LASSERTF((int)sizeof(((struct ll_fid *)0)->generation) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ll_fid *)0)->generation));
-        LASSERTF((int)offsetof(struct ll_fid, f_type) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct ll_fid, f_type));
-        LASSERTF((int)sizeof(((struct ll_fid *)0)->f_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ll_fid *)0)->f_type));
-
-        /* Checks for struct mds_status_req */
-        LASSERTF((int)sizeof(struct mds_status_req) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_status_req));
-        LASSERTF((int)offsetof(struct mds_status_req, flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_status_req, flags));
-        LASSERTF((int)sizeof(((struct mds_status_req *)0)->flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_status_req *)0)->flags));
-        LASSERTF((int)offsetof(struct mds_status_req, repbuf) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_status_req, repbuf));
-        LASSERTF((int)sizeof(((struct mds_status_req *)0)->repbuf) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_status_req *)0)->repbuf));
-
-        /* Checks for struct mds_body */
-        LASSERTF((int)sizeof(struct mds_body) == 168, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_body));
-        LASSERTF((int)offsetof(struct mds_body, fid1) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fid1));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fid1));
-        LASSERTF((int)offsetof(struct mds_body, fid2) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fid2));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fid2));
-        LASSERTF((int)offsetof(struct mds_body, handle) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, handle));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->handle));
-        LASSERTF((int)offsetof(struct mds_body, size) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, size));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->size));
-        LASSERTF((int)offsetof(struct mds_body, blocks) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, blocks));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->blocks));
-        LASSERTF((int)offsetof(struct mds_body, io_epoch) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, io_epoch));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->io_epoch) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->io_epoch));
-        LASSERTF((int)offsetof(struct mds_body, ino) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, ino));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->ino) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->ino));
-        LASSERTF((int)offsetof(struct mds_body, valid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, valid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->valid));
-        LASSERTF((int)offsetof(struct mds_body, fsuid) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fsuid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fsuid));
-        LASSERTF((int)offsetof(struct mds_body, fsgid) == 108, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, fsgid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->fsgid));
-        LASSERTF((int)offsetof(struct mds_body, capability) == 112, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, capability));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->capability) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->capability));
-        LASSERTF((int)offsetof(struct mds_body, mode) == 116, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, mode));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->mode));
-        LASSERTF((int)offsetof(struct mds_body, uid) == 120, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, uid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->uid));
-        LASSERTF((int)offsetof(struct mds_body, gid) == 124, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, gid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->gid));
-        LASSERTF((int)offsetof(struct mds_body, mtime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, mtime));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->mtime));
-        LASSERTF((int)offsetof(struct mds_body, ctime) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, ctime));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->ctime));
-        LASSERTF((int)offsetof(struct mds_body, atime) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, atime));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->atime));
-        LASSERTF((int)offsetof(struct mds_body, flags) == 128, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, flags));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->flags));
-        LASSERTF((int)offsetof(struct mds_body, rdev) == 132, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, rdev));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->rdev) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->rdev));
-        LASSERTF((int)offsetof(struct mds_body, nlink) == 136, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, nlink));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->nlink) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->nlink));
-        LASSERTF((int)offsetof(struct mds_body, generation) == 140, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, generation));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->generation) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->generation));
-        LASSERTF((int)offsetof(struct mds_body, suppgid) == 144, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, suppgid));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->suppgid));
-        LASSERTF((int)offsetof(struct mds_body, eadatasize) == 148, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, eadatasize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->eadatasize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->eadatasize));
-        LASSERTF((int)offsetof(struct mds_body, aclsize) == 152, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, aclsize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->aclsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->aclsize));
-        LASSERTF((int)offsetof(struct mds_body, max_mdsize) == 156, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, max_mdsize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->max_mdsize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->max_mdsize));
-        LASSERTF((int)offsetof(struct mds_body, max_cookiesize) == 160, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, max_cookiesize));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->max_cookiesize) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->max_cookiesize));
-        LASSERTF((int)offsetof(struct mds_body, padding_4) == 164, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_body, padding_4));
-        LASSERTF((int)sizeof(((struct mds_body *)0)->padding_4) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_body *)0)->padding_4));
-        LASSERTF(FMODE_READ == 1, " found %lld\n",
-                 (long long)FMODE_READ);
-        LASSERTF(FMODE_WRITE == 2, " found %lld\n",
-                 (long long)FMODE_WRITE);
-        LASSERTF(MDS_FMODE_EXEC == 4, " found %lld\n",
-                 (long long)MDS_FMODE_EXEC);
-        CLASSERT(MDS_OPEN_CREAT == 00000100);
-        CLASSERT(MDS_OPEN_EXCL == 00000200);
-        CLASSERT(MDS_OPEN_TRUNC == 00001000);
-        CLASSERT(MDS_OPEN_APPEND == 00002000);
-        CLASSERT(MDS_OPEN_SYNC == 00010000);
-        CLASSERT(MDS_OPEN_DIRECTORY == 00200000);
-        CLASSERT(MDS_OPEN_DELAY_CREATE == 0100000000);
-        CLASSERT(MDS_OPEN_OWNEROVERRIDE == 0200000000);
-        CLASSERT(MDS_OPEN_JOIN_FILE == 0400000000);
-        CLASSERT(MDS_OPEN_HAS_EA == 010000000000);
-        CLASSERT(MDS_OPEN_HAS_OBJS == 020000000000);
-        CLASSERT(MDS_SYNC_FL == 0x00000008);
-        CLASSERT(MDS_IMMUTABLE_FL == 0x00000010);
-        CLASSERT(MDS_APPEND_FL == 0x00000020);
-        CLASSERT(MDS_NOATIME_FL == 0x00000080);
-        CLASSERT(MDS_DIRSYNC_FL == 0x00010000);
-        CLASSERT(MDS_BFLAG_EXT_FLAGS == 0x80000000);
-        CLASSERT(MDS_INODELOCK_LOOKUP == 0x000001);
-        CLASSERT(MDS_INODELOCK_UPDATE == 0x000002);
-        CLASSERT(MDS_INODELOCK_OPEN == 0x000004);
-
-        /* Checks for struct mds_rec_setattr */
-        LASSERTF((int)sizeof(struct mds_rec_setattr) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_setattr));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_cap));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mode));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_fid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_valid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_valid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_valid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_valid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_size) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_size));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_size));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_mtime) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_mtime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_mtime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_atime) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_atime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_atime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_ctime) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_ctime));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_ctime));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_uid) == 80, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_uid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_uid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_gid) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_gid));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_gid));
-        LASSERTF((int)offsetof(struct mds_rec_setattr, sa_attr_flags) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_setattr, sa_attr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_setattr *)0)->sa_attr_flags));
-        CLASSERT(MDS_ATTR_MODE == 0x1ULL);
-        CLASSERT(MDS_ATTR_UID == 0x2ULL);
-        CLASSERT(MDS_ATTR_GID == 0x4ULL);
-        CLASSERT(MDS_ATTR_SIZE == 0x8ULL);
-        CLASSERT(MDS_ATTR_ATIME == 0x10ULL);
-        CLASSERT(MDS_ATTR_MTIME == 0x20ULL);
-        CLASSERT(MDS_ATTR_CTIME == 0x40ULL);
-        CLASSERT(MDS_ATTR_ATIME_SET == 0x80ULL);
-        CLASSERT(MDS_ATTR_MTIME_SET == 0x100ULL);
-        CLASSERT(MDS_ATTR_FORCE == 0x200ULL);
-        CLASSERT(MDS_ATTR_ATTR_FLAG == 0x400ULL);
-        CLASSERT(MDS_ATTR_KILL_SUID == 0x800ULL);
-        CLASSERT(MDS_ATTR_KILL_SGID == 0x1000ULL);
-        CLASSERT(MDS_ATTR_CTIME_SET == 0x2000ULL);
-        CLASSERT(MDS_ATTR_FROM_OPEN == 0x4000ULL);
-
-        /* Checks for struct mds_rec_create */
-        LASSERTF((int)sizeof(struct mds_rec_create) == 96, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_create));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_cap));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_flags) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_flags));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_flags));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_mode));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_fid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_replayfid) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_replayfid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_replayfid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_replayfid));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_time));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_time));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_rdev) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_rdev));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_rdev) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_rdev));
-        LASSERTF((int)offsetof(struct mds_rec_create, cr_suppgid) == 72, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_create, cr_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_create *)0)->cr_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_create *)0)->cr_suppgid));
-
-        /* Checks for struct mds_rec_link */
-        LASSERTF((int)sizeof(struct mds_rec_link) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_link));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_cap));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_link, lk_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_link, lk_time));
-        LASSERTF((int)sizeof(((struct mds_rec_link *)0)->lk_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_link *)0)->lk_time));
-
-        /* Checks for struct mds_rec_unlink */
-        LASSERTF((int)sizeof(struct mds_rec_unlink) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_unlink));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_cap));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_suppgid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_suppgid));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_suppgid));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_mode) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_mode));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_mode));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_unlink, ul_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_unlink, ul_time));
-        LASSERTF((int)sizeof(((struct mds_rec_unlink *)0)->ul_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_unlink *)0)->ul_time));
-
-        /* Checks for struct mds_rec_rename */
-        LASSERTF((int)sizeof(struct mds_rec_rename) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_rename));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_opcode) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_opcode));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_opcode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_opcode));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsuid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsuid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fsgid) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fsgid));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fsgid));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_cap) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_cap));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_cap) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_cap));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid1) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_suppgid2) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_suppgid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_suppgid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid1) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid1));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid1) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid1));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_fid2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_fid2));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_fid2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_fid2));
-        LASSERTF((int)offsetof(struct mds_rec_rename, rn_time) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_rename, rn_time));
-        LASSERTF((int)sizeof(((struct mds_rec_rename *)0)->rn_time) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_rename *)0)->rn_time));
-
-        /* Checks for struct mds_rec_join */
-        LASSERTF((int)sizeof(struct mds_rec_join) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_rec_join));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_fid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_fid));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_fid));
-        LASSERTF((int)offsetof(struct mds_rec_join, jr_headsize) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_rec_join, jr_headsize));
-        LASSERTF((int)sizeof(((struct mds_rec_join *)0)->jr_headsize) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_rec_join *)0)->jr_headsize));
-
-        /* Checks for struct lov_desc */
-        LASSERTF((int)sizeof(struct lov_desc) == 88, " found %lld\n",
-                 (long long)(int)sizeof(struct lov_desc));
-        LASSERTF((int)offsetof(struct lov_desc, ld_tgt_count) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_tgt_count));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_tgt_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_tgt_count));
-        LASSERTF((int)offsetof(struct lov_desc, ld_active_tgt_count) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_active_tgt_count));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_active_tgt_count));
-        LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_count));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_count));
-        LASSERTF((int)offsetof(struct lov_desc, ld_pattern) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_pattern));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_pattern) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_pattern));
-        LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_size) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_size));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_size));
-        LASSERTF((int)offsetof(struct lov_desc, ld_default_stripe_offset) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_default_stripe_offset));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_default_stripe_offset));
-        LASSERTF((int)offsetof(struct lov_desc, ld_qos_maxage) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_qos_maxage));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_qos_maxage) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_qos_maxage));
-        LASSERTF((int)offsetof(struct lov_desc, ld_padding_1) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_padding_1));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_1));
-        LASSERTF((int)offsetof(struct lov_desc, ld_padding_2) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_padding_2));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_padding_2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_padding_2));
-        LASSERTF((int)offsetof(struct lov_desc, ld_uuid) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct lov_desc, ld_uuid));
-        LASSERTF((int)sizeof(((struct lov_desc *)0)->ld_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct lov_desc *)0)->ld_uuid));
-
-        /* Checks for struct ldlm_res_id */
-        LASSERTF((int)sizeof(struct ldlm_res_id) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_res_id));
-        LASSERTF((int)offsetof(struct ldlm_res_id, name[4]) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_res_id, name[4]));
-        LASSERTF((int)sizeof(((struct ldlm_res_id *)0)->name[4]) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_res_id *)0)->name[4]));
-
-        /* Checks for struct ldlm_extent */
-        LASSERTF((int)sizeof(struct ldlm_extent) == 24, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_extent));
-        LASSERTF((int)offsetof(struct ldlm_extent, start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_extent, start));
-        LASSERTF((int)sizeof(((struct ldlm_extent *)0)->start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_extent *)0)->start));
-        LASSERTF((int)offsetof(struct ldlm_extent, end) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_extent, end));
-        LASSERTF((int)sizeof(((struct ldlm_extent *)0)->end) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_extent *)0)->end));
-        LASSERTF((int)offsetof(struct ldlm_extent, gid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_extent, gid));
-        LASSERTF((int)sizeof(((struct ldlm_extent *)0)->gid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_extent *)0)->gid));
-
-        /* Checks for struct ldlm_flock */
-        LASSERTF((int)sizeof(struct ldlm_flock) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_flock));
-        LASSERTF((int)offsetof(struct ldlm_flock, start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, start));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->start));
-        LASSERTF((int)offsetof(struct ldlm_flock, end) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, end));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->end) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->end));
-        LASSERTF((int)offsetof(struct ldlm_flock, blocking_pid) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, blocking_pid));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->blocking_pid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->blocking_pid));
-        LASSERTF((int)offsetof(struct ldlm_flock, pid) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_flock, pid));
-        LASSERTF((int)sizeof(((struct ldlm_flock *)0)->pid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_flock *)0)->pid));
-
-        /* Checks for struct ldlm_inodebits */
-        LASSERTF((int)sizeof(struct ldlm_inodebits) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_inodebits));
-        LASSERTF((int)offsetof(struct ldlm_inodebits, bits) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_inodebits, bits));
-        LASSERTF((int)sizeof(((struct ldlm_inodebits *)0)->bits) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_inodebits *)0)->bits));
-
-        /* Checks for struct ldlm_intent */
-        LASSERTF((int)sizeof(struct ldlm_intent) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_intent));
-        LASSERTF((int)offsetof(struct ldlm_intent, opc) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_intent, opc));
-        LASSERTF((int)sizeof(((struct ldlm_intent *)0)->opc) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_intent *)0)->opc));
-
-        /* Checks for struct ldlm_resource_desc */
-        LASSERTF((int)sizeof(struct ldlm_resource_desc) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_resource_desc));
-        LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_type) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_resource_desc, lr_type));
-        LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_type));
-        LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_padding) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_resource_desc, lr_padding));
-        LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_padding));
-        LASSERTF((int)offsetof(struct ldlm_resource_desc, lr_name) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_resource_desc, lr_name));
-        LASSERTF((int)sizeof(((struct ldlm_resource_desc *)0)->lr_name) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_resource_desc *)0)->lr_name));
-
-        /* Checks for struct ldlm_lock_desc */
-        LASSERTF((int)sizeof(struct ldlm_lock_desc) == 80, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_lock_desc));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_resource) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_resource));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_resource) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_resource));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_req_mode) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_req_mode));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_req_mode));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_granted_mode) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_granted_mode));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_granted_mode));
-        LASSERTF((int)offsetof(struct ldlm_lock_desc, l_policy_data) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_lock_desc, l_policy_data));
-        LASSERTF((int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_lock_desc *)0)->l_policy_data));
-
-        /* Checks for struct ldlm_request */
-        LASSERTF((int)sizeof(struct ldlm_request) == 104, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_request));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_flags));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_flags));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_count) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_count));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_count));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_desc) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_desc));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_desc) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_desc));
-        LASSERTF((int)offsetof(struct ldlm_request, lock_handle) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_request, lock_handle));
-        LASSERTF((int)sizeof(((struct ldlm_request *)0)->lock_handle) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_request *)0)->lock_handle));
-
-        /* Checks for struct ldlm_reply */
-        LASSERTF((int)sizeof(struct ldlm_reply) == 112, " found %lld\n",
-                 (long long)(int)sizeof(struct ldlm_reply));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_flags));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_flags));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_padding) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_padding));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_padding));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_desc) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_desc));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_desc) == 80, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_desc));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_handle) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_handle));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_handle) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_handle));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res1) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_policy_res1));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res1));
-        LASSERTF((int)offsetof(struct ldlm_reply, lock_policy_res2) == 104, " found %lld\n",
-                 (long long)(int)offsetof(struct ldlm_reply, lock_policy_res2));
-        LASSERTF((int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ldlm_reply *)0)->lock_policy_res2));
-
-        /* Checks for struct ost_lvb */
-        LASSERTF((int)sizeof(struct ost_lvb) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct ost_lvb));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_size) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_size));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_size) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_size));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_mtime) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_mtime));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_mtime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_mtime));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_atime) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_atime));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_atime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_atime));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_ctime) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_ctime));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_ctime) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_ctime));
-        LASSERTF((int)offsetof(struct ost_lvb, lvb_blocks) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct ost_lvb, lvb_blocks));
-        LASSERTF((int)sizeof(((struct ost_lvb *)0)->lvb_blocks) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct ost_lvb *)0)->lvb_blocks));
-
-        /* Checks for struct llog_logid */
-        LASSERTF((int)sizeof(struct llog_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_logid));
-        LASSERTF((int)offsetof(struct llog_logid, lgl_oid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid, lgl_oid));
-        LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_oid));
-        LASSERTF((int)offsetof(struct llog_logid, lgl_ogr) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid, lgl_ogr));
-        LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogr) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogr));
-        LASSERTF((int)offsetof(struct llog_logid, lgl_ogen) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid, lgl_ogen));
-        LASSERTF((int)sizeof(((struct llog_logid *)0)->lgl_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid *)0)->lgl_ogen));
-        CLASSERT(OST_SZ_REC == 274730752);
-        CLASSERT(OST_RAID1_REC == 274731008);
-        CLASSERT(MDS_UNLINK_REC == 274801668);
-        CLASSERT(MDS_SETATTR_REC == 274801665);
-        CLASSERT(OBD_CFG_REC == 274857984);
-        CLASSERT(PTL_CFG_REC == 274923520);
-        CLASSERT(LLOG_GEN_REC == 274989056);
-        CLASSERT(LLOG_JOIN_REC == 275054592);
-        CLASSERT(LLOG_HDR_MAGIC == 275010873);
-        CLASSERT(LLOG_LOGID_MAGIC == 275010875);
-
-        /* Checks for struct llog_catid */
-        LASSERTF((int)sizeof(struct llog_catid) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_catid));
-        LASSERTF((int)offsetof(struct llog_catid, lci_logid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_logid));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_logid));
-        LASSERTF((int)offsetof(struct llog_catid, lci_padding1) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_padding1));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding1));
-        LASSERTF((int)offsetof(struct llog_catid, lci_padding2) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_padding2));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding2));
-        LASSERTF((int)offsetof(struct llog_catid, lci_padding3) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_catid, lci_padding3));
-        LASSERTF((int)sizeof(((struct llog_catid *)0)->lci_padding3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_catid *)0)->lci_padding3));
-
-        /* Checks for struct llog_rec_hdr */
-        LASSERTF((int)sizeof(struct llog_rec_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_rec_hdr));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_len) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, lrh_len));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_len));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_index) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, lrh_index));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_index));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, lrh_type) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, lrh_type));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->lrh_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->lrh_type));
-        LASSERTF((int)offsetof(struct llog_rec_hdr, padding) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_hdr, padding));
-        LASSERTF((int)sizeof(((struct llog_rec_hdr *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_hdr *)0)->padding));
-
-        /* Checks for struct llog_rec_tail */
-        LASSERTF((int)sizeof(struct llog_rec_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_rec_tail));
-        LASSERTF((int)offsetof(struct llog_rec_tail, lrt_len) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_tail, lrt_len));
-        LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_len));
-        LASSERTF((int)offsetof(struct llog_rec_tail, lrt_index) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_rec_tail, lrt_index));
-        LASSERTF((int)sizeof(((struct llog_rec_tail *)0)->lrt_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_rec_tail *)0)->lrt_index));
-
-        /* Checks for struct llog_logid_rec */
-        LASSERTF((int)sizeof(struct llog_logid_rec) == 64, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_logid_rec));
-        LASSERTF((int)offsetof(struct llog_logid_rec, lid_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, lid_hdr));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_hdr));
-        LASSERTF((int)offsetof(struct llog_logid_rec, lid_id) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, lid_id));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_id) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_id));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding1) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding1));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding1) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding1));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding2) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding2));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding2) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding2));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding3) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding3));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding3) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding3));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding4) == 48, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding4));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding4) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding4));
-        LASSERTF((int)offsetof(struct llog_logid_rec, padding5) == 52, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, padding5));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->padding5) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->padding5));
-        LASSERTF((int)offsetof(struct llog_logid_rec, lid_tail) == 56, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_logid_rec, lid_tail));
-        LASSERTF((int)sizeof(((struct llog_logid_rec *)0)->lid_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_logid_rec *)0)->lid_tail));
-
-        /* Checks for struct llog_create_rec */
-        LASSERTF((int)sizeof(struct llog_create_rec) == 56, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_create_rec));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_hdr));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_hdr));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_fid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_fid));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_fid));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_oid) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_oid));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_oid));
-        LASSERTF((int)offsetof(struct llog_create_rec, lcr_ogen) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, lcr_ogen));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->lcr_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->lcr_ogen));
-        LASSERTF((int)offsetof(struct llog_create_rec, padding) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_create_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_create_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_create_rec *)0)->padding));
-
-        /* Checks for struct llog_orphan_rec */
-        LASSERTF((int)sizeof(struct llog_orphan_rec) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_orphan_rec));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_hdr));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_hdr));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_oid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_oid));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_oid));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_ogen) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_ogen));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_ogen));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, padding) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_orphan_rec, lor_tail) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_orphan_rec, lor_tail));
-        LASSERTF((int)sizeof(((struct llog_orphan_rec *)0)->lor_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_orphan_rec *)0)->lor_tail));
-
-        /* Checks for struct llog_unlink_rec */
-        LASSERTF((int)sizeof(struct llog_unlink_rec) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_unlink_rec));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_hdr));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_hdr));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_oid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_oid));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_oid));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_ogen) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_ogen));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_ogen));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, padding) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_unlink_rec, lur_tail) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_unlink_rec, lur_tail));
-        LASSERTF((int)sizeof(((struct llog_unlink_rec *)0)->lur_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_unlink_rec *)0)->lur_tail));
-
-        /* Checks for struct llog_setattr_rec */
-        LASSERTF((int)sizeof(struct llog_setattr_rec) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_setattr_rec));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_hdr));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_hdr));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_oid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_oid));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_oid));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_ogen) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_ogen));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_ogen));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_uid) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_uid));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_uid));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_gid) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_gid));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_gid) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_gid));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, padding) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_setattr_rec, lsr_tail) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_setattr_rec, lsr_tail));
-        LASSERTF((int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_setattr_rec *)0)->lsr_tail));
-
-        /* Checks for struct llog_size_change_rec */
-        LASSERTF((int)sizeof(struct llog_size_change_rec) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_size_change_rec));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_hdr));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_hdr));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_fid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_fid));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_fid));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_io_epoch) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_io_epoch));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_io_epoch));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, padding) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, padding));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->padding));
-        LASSERTF((int)offsetof(struct llog_size_change_rec, lsc_tail) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_size_change_rec, lsc_tail));
-        LASSERTF((int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_size_change_rec *)0)->lsc_tail));
-
-        /* Checks for struct llog_gen */
-        LASSERTF((int)sizeof(struct llog_gen) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_gen));
-        LASSERTF((int)offsetof(struct llog_gen, mnt_cnt) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen, mnt_cnt));
-        LASSERTF((int)sizeof(((struct llog_gen *)0)->mnt_cnt) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen *)0)->mnt_cnt));
-        LASSERTF((int)offsetof(struct llog_gen, conn_cnt) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen, conn_cnt));
-        LASSERTF((int)sizeof(((struct llog_gen *)0)->conn_cnt) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen *)0)->conn_cnt));
-
-        /* Checks for struct llog_gen_rec */
-        LASSERTF((int)sizeof(struct llog_gen_rec) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_gen_rec));
-        LASSERTF((int)offsetof(struct llog_gen_rec, lgr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen_rec, lgr_hdr));
-        LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_hdr));
-        LASSERTF((int)offsetof(struct llog_gen_rec, lgr_gen) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen_rec, lgr_gen));
-        LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_gen) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_gen));
-        LASSERTF((int)offsetof(struct llog_gen_rec, lgr_tail) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_gen_rec, lgr_tail));
-        LASSERTF((int)sizeof(((struct llog_gen_rec *)0)->lgr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_gen_rec *)0)->lgr_tail));
-
-        /* Checks for struct llog_log_hdr */
-        LASSERTF((int)sizeof(struct llog_log_hdr) == 8192, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_log_hdr));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_hdr));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_hdr));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_timestamp) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_timestamp));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_timestamp));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_count) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_count));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_count));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap_offset) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap_offset));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap_offset));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_size) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_size));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_size) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_size));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_flags) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_flags));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_flags));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_cat_idx) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_cat_idx));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_cat_idx));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_tgtuuid) == 44, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_tgtuuid));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tgtuuid));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_reserved) == 84, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_reserved));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_reserved) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_reserved));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_bitmap) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_bitmap));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap) == 8096, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_bitmap));
-        LASSERTF((int)offsetof(struct llog_log_hdr, llh_tail) == 8184, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_log_hdr, llh_tail));
-        LASSERTF((int)sizeof(((struct llog_log_hdr *)0)->llh_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_log_hdr *)0)->llh_tail));
-
-        /* Checks for struct llog_cookie */
-        LASSERTF((int)sizeof(struct llog_cookie) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_cookie));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_lgl) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_lgl));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_lgl) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_lgl));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_subsys) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_subsys));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_subsys) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_subsys));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_index) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_index));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_index));
-        LASSERTF((int)offsetof(struct llog_cookie, lgc_padding) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_cookie, lgc_padding));
-        LASSERTF((int)sizeof(((struct llog_cookie *)0)->lgc_padding) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_cookie *)0)->lgc_padding));
-
-        /* Checks for struct llogd_body */
-        LASSERTF((int)sizeof(struct llogd_body) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct llogd_body));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_logid) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_logid));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_logid));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_ctxt_idx) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_ctxt_idx));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_ctxt_idx));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_llh_flags) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_llh_flags));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_llh_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_llh_flags));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_index) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_index));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_index));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_saved_index) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_saved_index));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_saved_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_saved_index));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_len) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_len));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_len) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_len));
-        LASSERTF((int)offsetof(struct llogd_body, lgd_cur_offset) == 40, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_body, lgd_cur_offset));
-        LASSERTF((int)sizeof(((struct llogd_body *)0)->lgd_cur_offset) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_body *)0)->lgd_cur_offset));
-        CLASSERT(LLOG_ORIGIN_HANDLE_CREATE == 501);
-        CLASSERT(LLOG_ORIGIN_HANDLE_NEXT_BLOCK == 502);
-        CLASSERT(LLOG_ORIGIN_HANDLE_READ_HEADER == 503);
-        CLASSERT(LLOG_ORIGIN_HANDLE_WRITE_REC == 504);
-        CLASSERT(LLOG_ORIGIN_HANDLE_CLOSE == 505);
-        CLASSERT(LLOG_ORIGIN_CONNECT == 506);
-        CLASSERT(LLOG_CATINFO == 507);
-        CLASSERT(LLOG_ORIGIN_HANDLE_PREV_BLOCK == 508);
-        CLASSERT(LLOG_ORIGIN_HANDLE_DESTROY == 509);
-
-        /* Checks for struct llogd_conn_body */
-        LASSERTF((int)sizeof(struct llogd_conn_body) == 40, " found %lld\n",
-                 (long long)(int)sizeof(struct llogd_conn_body));
-        LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_gen) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_conn_body, lgdc_gen));
-        LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_gen));
-        LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_logid) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_conn_body, lgdc_logid));
-        LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid) == 20, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_logid));
-        LASSERTF((int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx) == 36, " found %lld\n",
-                 (long long)(int)offsetof(struct llogd_conn_body, lgdc_ctxt_idx));
-        LASSERTF((int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct llogd_conn_body *)0)->lgdc_ctxt_idx));
-
-        /* Checks for struct llog_array_rec */
-        LASSERTF((int)sizeof(struct llog_array_rec) == 72, " found %lld\n",
-                 (long long)(int)sizeof(struct llog_array_rec));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_hdr) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_hdr));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_hdr) == 16, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_hdr));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_med) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_med));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_med) == 48, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_med));
-        LASSERTF((int)offsetof(struct llog_array_rec, lmr_tail) == 64, " found %lld\n",
-                 (long long)(int)offsetof(struct llog_array_rec, lmr_tail));
-        LASSERTF((int)sizeof(((struct llog_array_rec *)0)->lmr_tail) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct llog_array_rec *)0)->lmr_tail));
-
-        /* Checks for struct mds_extent_desc */
-        LASSERTF((int)sizeof(struct mds_extent_desc) == 48, " found %lld\n",
-                 (long long)(int)sizeof(struct mds_extent_desc));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_start) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_start));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_start) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_start));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_len) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_len));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_len) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_len));
-        LASSERTF((int)offsetof(struct mds_extent_desc, med_lmm) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mds_extent_desc, med_lmm));
-        LASSERTF((int)sizeof(((struct mds_extent_desc *)0)->med_lmm) == 32, " found %lld\n",
-                 (long long)(int)sizeof(((struct mds_extent_desc *)0)->med_lmm));
-
-        /* Checks for struct qunit_data */
-        LASSERTF((int)sizeof(struct qunit_data) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data));
-        LASSERTF((int)offsetof(struct qunit_data, qd_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data, qd_flags) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_flags));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_flags));
-        LASSERTF((int)offsetof(struct qunit_data, qd_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_count) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_count));
-        LASSERTF((int)offsetof(struct qunit_data, qd_qunit) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, qd_qunit));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->qd_qunit) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->qd_qunit));
-        LASSERTF((int)offsetof(struct qunit_data, padding) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data, padding));
-        LASSERTF((int)sizeof(((struct qunit_data *)0)->padding) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data *)0)->padding));
-
-        /* Checks for struct qunit_data_old2 */
-        LASSERTF((int)sizeof(struct qunit_data_old2) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data_old2));
-        LASSERTF((int)offsetof(struct qunit_data_old2, qd_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old2, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data_old2 *)0)->qd_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old2 *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data_old2, qd_flags) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old2, qd_flags));
-        LASSERTF((int)sizeof(((struct qunit_data_old2 *)0)->qd_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old2 *)0)->qd_flags));
-        LASSERTF((int)offsetof(struct qunit_data_old2, qd_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old2, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data_old2 *)0)->qd_count) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old2 *)0)->qd_count));
-
-        /* Checks for struct qunit_data_old */
-        LASSERTF((int)sizeof(struct qunit_data_old) == 16, " found %lld\n",
-                 (long long)(int)sizeof(struct qunit_data_old));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_id) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_id));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_id));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_type) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_type));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_type));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_count) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_count));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_count));
-        LASSERTF((int)offsetof(struct qunit_data_old, qd_isblk) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct qunit_data_old, qd_isblk));
-        LASSERTF((int)sizeof(((struct qunit_data_old *)0)->qd_isblk) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct qunit_data_old *)0)->qd_isblk));
-
-        /* Checks for struct quota_adjust_qunit */
-        LASSERTF((int)sizeof(struct quota_adjust_qunit) == 32, " found %lld\n",
-                 (long long)(int)sizeof(struct quota_adjust_qunit));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_flags) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_flags));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_flags));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_id) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_id));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_id));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_bunit_sz));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_bunit_sz));
-        LASSERTF((int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct quota_adjust_qunit, qaq_iunit_sz));
-        LASSERTF((int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz) == 8, " found %lld\n",
-                 (long long)(int)sizeof(((struct quota_adjust_qunit *)0)->qaq_iunit_sz));
-
-        /* Checks for struct mgs_target_info */
-        LASSERTF((int)sizeof(struct mgs_target_info) == 4544, " found %lld\n",
-                 (long long)(int)sizeof(struct mgs_target_info));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_lustre_ver) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_lustre_ver));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_lustre_ver) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_lustre_ver));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_stripe_index) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_stripe_index));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_stripe_index) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_stripe_index));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_config_ver) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_config_ver));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_config_ver) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_config_ver));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_flags) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_flags));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_flags));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_nid_count) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_nid_count));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_nid_count) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_nid_count));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_fsname) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_fsname));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_fsname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_fsname));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_svname) == 88, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_svname));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_svname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_svname));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_uuid) == 152, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_uuid));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_uuid));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_nids) == 192, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_nids));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_nids) == 256, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_nids));
-        LASSERTF((int)offsetof(struct mgs_target_info, mti_params) == 448, " found %lld\n",
-                 (long long)(int)offsetof(struct mgs_target_info, mti_params));
-        LASSERTF((int)sizeof(((struct mgs_target_info *)0)->mti_params) == 4096, " found %lld\n",
-                 (long long)(int)sizeof(((struct mgs_target_info *)0)->mti_params));
-
-        /* Checks for struct lustre_disk_data */
-        LASSERTF((int)sizeof(struct lustre_disk_data) == 12288, " found %lld\n",
-                 (long long)(int)sizeof(struct lustre_disk_data));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_magic) == 0, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_magic));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_magic) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_magic));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_compat) == 4, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_compat));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_compat));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_rocompat) == 8, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_rocompat));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_rocompat));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_feature_incompat) == 12, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_feature_incompat));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_feature_incompat));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_config_ver) == 16, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_config_ver));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_config_ver));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_flags) == 20, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_flags));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_flags) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_flags));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svindex) == 24, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_svindex));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svindex));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_type) == 28, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_type));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_type));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_fsname) == 32, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_fsname));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_fsname));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_svname) == 96, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_svname));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_svname) == 64, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_svname));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_uuid) == 160, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_uuid));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid) == 40, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_uuid));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_userdata) == 200, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_userdata));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata) == 824, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_userdata));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_mount_opts) == 4096, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_mount_opts));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts) == 4096, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_mount_opts));
-        LASSERTF((int)offsetof(struct lustre_disk_data, ldd_params) == 8192, " found %lld\n",
-                 (long long)(int)offsetof(struct lustre_disk_data, ldd_params));
-        LASSERTF((int)sizeof(((struct lustre_disk_data *)0)->ldd_params) == 4096, " found %lld\n",
-                 (long long)(int)sizeof(((struct lustre_disk_data *)0)->ldd_params));
-#ifdef LIBLUSTRE_POSIX_ACL
-
-        /* Checks for type posix_acl_xattr_entry */
-        LASSERTF((int)sizeof(xattr_acl_entry) == 8, " found %lld\n",
-                 (long long)(int)sizeof(xattr_acl_entry));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_tag) == 0, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_tag));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_tag) == 2, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_tag));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_perm) == 2, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_perm));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_perm) == 2, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_perm));
-        LASSERTF((int)offsetof(xattr_acl_entry, e_id) == 4, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_entry, e_id));
-        LASSERTF((int)sizeof(((xattr_acl_entry *)0)->e_id) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_entry *)0)->e_id));
-
-        /* Checks for type posix_acl_xattr_header */
-        LASSERTF((int)sizeof(xattr_acl_header) == 4, " found %lld\n",
-                 (long long)(int)sizeof(xattr_acl_header));
-        LASSERTF((int)offsetof(xattr_acl_header, a_version) == 0, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_header, a_version));
-        LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_version) == 4, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_header *)0)->a_version));
-        LASSERTF((int)offsetof(xattr_acl_header, a_entries) == 4, " found %lld\n",
-                 (long long)(int)offsetof(xattr_acl_header, a_entries));
-        LASSERTF((int)sizeof(((xattr_acl_header *)0)->a_entries) == 0, " found %lld\n",
-                 (long long)(int)sizeof(((xattr_acl_header *)0)->a_entries));
-#endif
-}
-